diff --git a/.bazelrc b/.bazelrc index 390f53bbf659..27219017d277 100644 --- a/.bazelrc +++ b/.bazelrc @@ -28,6 +28,7 @@ build --host_platform=//bazel/platform:host_with_hermetic_toolchain build --extra_toolchains=//toolchain:clang_linux_x64_toolchain build --extra_toolchains=//toolchain:clang_mac_x64_toolchain build --extra_toolchains=//toolchain:clang_mac_arm64_toolchain +build --extra_toolchains=//toolchain:clang_host_mac_x64_target_mac_arm64_toolchain build --extra_toolchains=//toolchain:linux_amd64_ndk_arm64_toolchain build --extra_toolchains=//toolchain:linux_amd64_ndk_arm32_toolchain @@ -81,13 +82,15 @@ build --flag_alias=with_fontations=//bazel/common_config_settings:use_fontations build --flag_alias=with_no_harfbuzz=no//bazel/common_config_settings:use_harfbuzz build --flag_alias=with_icu=//bazel/common_config_settings:use_icu build --flag_alias=with_no_icu=no//bazel/common_config_settings:use_icu +build --flag_alias=enable_build_for_debugger=//bazel/common_config_settings:build_for_debugger +build --flag_alias=disable_build_for_debugger=no//bazel/common_config_settings:build_for_debugger # Flags used by Skia tools, not to be used by clients build --flag_alias=force_cpu_tests=//tests:force_cpu_tests build --flag_alias=disable_gpu_test_utils=no//src/gpu:enable_gpu_test_utils build --flag_alias=enable_gpu_test_utils=//src/gpu:enable_gpu_test_utils build --flag_alias=compile_generated_cpp_files_for_headers=//bazel/common_config_settings:compile_generated_cpp_files_for_headers -build --flag_alias=adb_platform=//tests/adb_test_runner:adb_platform +build --flag_alias=adb_platform=//bazel/adb_test_runner:adb_platform # Public CanvasKit flags build --flag_alias=ck_enable_fonts=//modules/canvaskit:enable_fonts diff --git a/.disabled.go.mod b/.disabled.go.mod index 6c566b6fe65a..19eacc72f691 100644 --- a/.disabled.go.mod +++ b/.disabled.go.mod @@ -12,7 +12,7 @@ require ( github.com/klauspost/compress v1.11.3 // indirect github.com/stretchr/testify v1.7.0 go.chromium.org/luci v0.0.0-20201121231857-b9ab316d7198 // indirect - go.skia.org/infra v0.0.0-20230620024012-ab08126079d3 + go.skia.org/infra v0.0.0-20230807174633-333a87d1ef8a google.golang.org/api v0.74.0 google.golang.org/protobuf v1.28.0 ) diff --git a/.disabled.go.sum b/.disabled.go.sum index 386fc546b475..ee6483ecde77 100644 --- a/.disabled.go.sum +++ b/.disabled.go.sum @@ -94,7 +94,7 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/Jeffail/gabs/v2 v2.6.0/go.mod h1:xCn81vdHKxFUuWWAaD5jCTQDNPBMh5pPs9IJ+NcziBI= github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E= -github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= +github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= @@ -713,8 +713,9 @@ github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDf github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.11.1 h1:+4eQaD7vAZ6DsfsxB15hbE0odUjGI5ARs9yskGu1v4s= +github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -757,6 +758,7 @@ github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd/go.mod h1:hPqNNc0 github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sagikazarmark/crypt v0.3.0/go.mod h1:uD/D+6UF4SrIR1uGEv7bBNkNqLGqUr43MRiaGWX1Nig= github.com/sagikazarmark/crypt v0.4.0/go.mod h1:ALv2SRj7GxYV4HO9elxH9nS6M9gW+xDNxqmyJ6RfDFM= +github.com/santhosh-tekuri/jsonschema/v5 v5.1.1/go.mod h1:FKdcjfQW6rpZSnxxUvEA5H/cDPdvJ/SZJQLWWXWGrZ0= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sendgrid/rest v2.6.9+incompatible/go.mod h1:kXX7q3jZtJXK5c5qK83bSGMdV6tsOE70KbHoqJls4lE= @@ -852,6 +854,7 @@ github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= +github.com/yannh/kubeconform v0.6.3/go.mod h1:4E6oaL+lh7KgCG2SaOabeeAFBkyKu5D9ab0OEekGcbs= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -859,6 +862,7 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zeebo/bencode v1.0.0 h1:zgop0Wu1nu4IexAZeCZ5qbsjU4O1vMrfCrVgUjbHVuA= github.com/zeebo/bencode v1.0.0/go.mod h1:Ct7CkrWIQuLWAy9M3atFHYq4kG9Ao/SsY5cdtCXmp9Y= @@ -889,8 +893,8 @@ go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.skia.org/infra v0.0.0-20230620024012-ab08126079d3 h1:XcuQ9HvMBmMXNmxOX3wCiLjAmY0Jzdls6sH7rD2qsQQ= -go.skia.org/infra v0.0.0-20230620024012-ab08126079d3/go.mod h1:s3s5HPvpFrCItsAbhI0YFuL4GUKfsJbh6y7a+23hThI= +go.skia.org/infra v0.0.0-20230807174633-333a87d1ef8a h1:5ey8a/Kk8G/ASNk1SEYhq0CxVzX4uC6kPfgcVRjLf+o= +go.skia.org/infra v0.0.0-20230807174633-333a87d1ef8a/go.mod h1:ciR8wDS8SF4JQnDDPyYcjTjs0N5l4lp4Zl/sMryVl+I= go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -979,6 +983,7 @@ golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1041,8 +1046,10 @@ golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220325170049-de3da57026de h1:pZB1TWnKi+o4bENlbzAgLrEbY4RMYmUIRobMcSmfeYc= golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1077,6 +1084,7 @@ golang.org/x/sync v0.0.0-20201008141435-b3e1573b7520/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1177,13 +1185,16 @@ golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220405210540-1e041c57c461 h1:kHVeDEnfKn3T238CvrUcz6KeEsFHVaKh4kMTt6Wsysg= -golang.org/x/sys v0.0.0-20220405210540-1e041c57c461/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1192,8 +1203,9 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1278,6 +1290,7 @@ golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/.disabled.go_repositories.bzl b/.disabled.go_repositories.bzl index 354d4ddec009..e057e98ef4cd 100644 --- a/.disabled.go_repositories.bzl +++ b/.disabled.go_repositories.bzl @@ -1567,8 +1567,8 @@ def go_repositories(): go_repository( name = "com_github_masterminds_goutils", importpath = "github.com/Masterminds/goutils", - sum = "h1:zukEsf/1JZwCMgHiK3GZftabmxiCw4apj3a28RPBiVg=", - version = "v1.1.0", + sum = "h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI=", + version = "v1.1.1", ) go_repository( name = "com_github_masterminds_semver", @@ -1919,8 +1919,8 @@ def go_repositories(): go_repository( name = "com_github_prometheus_client_golang", importpath = "github.com/prometheus/client_golang", - sum = "h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ=", - version = "v1.11.0", + sum = "h1:+4eQaD7vAZ6DsfsxB15hbE0odUjGI5ARs9yskGu1v4s=", + version = "v1.11.1", ) go_repository( name = "com_github_prometheus_client_model", @@ -2050,6 +2050,12 @@ def go_repositories(): sum = "h1:Rqcx6Sf/bWQUmmfGQhcFx3wQQEfb2UZWhAKvGRairm0=", version = "v0.4.0", ) + go_repository( + name = "com_github_santhosh_tekuri_jsonschema_v5", + importpath = "github.com/santhosh-tekuri/jsonschema/v5", + sum = "h1:lEOLY2vyGIqKWUI9nzsOJRV3mb3WC9dXYORsLEUcoeY=", + version = "v5.1.1", + ) go_repository( name = "com_github_satori_go_uuid", @@ -2379,12 +2385,18 @@ def go_repositories(): sum = "h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU=", version = "v0.0.0-20201216005158-039620a65673", ) + go_repository( + name = "com_github_yannh_kubeconform", + importpath = "github.com/yannh/kubeconform", + sum = "h1:lNmb/kphyzitA+GBsOxjBsagCEpjLvt3+qo3XMiEOUA=", + version = "v0.6.3", + ) go_repository( name = "com_github_yuin_goldmark", importpath = "github.com/yuin/goldmark", - sum = "h1:/vn0k+RBvwlxEmP5E7SZMqNxPhfMVFEJiykr15/0XKM=", - version = "v1.4.1", + sum = "h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE=", + version = "v1.4.13", ) go_repository( name = "com_github_yusufpapurcu_wmi", @@ -2989,14 +3001,14 @@ def go_repositories(): go_repository( name = "org_golang_x_mod", importpath = "golang.org/x/mod", - sum = "h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o=", - version = "v0.6.0-dev.0.20220106191415-9b9b3d81d5e3", + sum = "h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s=", + version = "v0.6.0-dev.0.20220419223038-86c51ed26bb4", ) go_repository( name = "org_golang_x_net", importpath = "golang.org/x/net", - sum = "h1:pZB1TWnKi+o4bENlbzAgLrEbY4RMYmUIRobMcSmfeYc=", - version = "v0.0.0-20220325170049-de3da57026de", + sum = "h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=", + version = "v0.7.0", ) go_repository( name = "org_golang_x_oauth2", @@ -3019,20 +3031,20 @@ def go_repositories(): go_repository( name = "org_golang_x_sys", importpath = "golang.org/x/sys", - sum = "h1:kHVeDEnfKn3T238CvrUcz6KeEsFHVaKh4kMTt6Wsysg=", - version = "v0.0.0-20220405210540-1e041c57c461", + sum = "h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=", + version = "v0.5.0", ) go_repository( name = "org_golang_x_term", importpath = "golang.org/x/term", - sum = "h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=", - version = "v0.0.0-20210927222741-03fcf44c2211", + sum = "h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY=", + version = "v0.5.0", ) go_repository( name = "org_golang_x_text", importpath = "golang.org/x/text", - sum = "h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=", - version = "v0.3.7", + sum = "h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo=", + version = "v0.7.0", ) go_repository( name = "org_golang_x_time", @@ -3043,8 +3055,8 @@ def go_repositories(): go_repository( name = "org_golang_x_tools", importpath = "golang.org/x/tools", - sum = "h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20=", - version = "v0.1.10", + sum = "h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU=", + version = "v0.1.12", ) go_repository( name = "org_golang_x_xerrors", @@ -3056,8 +3068,8 @@ def go_repositories(): go_repository( name = "org_skia_go_infra", importpath = "go.skia.org/infra", - sum = "h1:XcuQ9HvMBmMXNmxOX3wCiLjAmY0Jzdls6sH7rD2qsQQ=", - version = "v0.0.0-20230620024012-ab08126079d3", + sum = "h1:5ey8a/Kk8G/ASNk1SEYhq0CxVzX4uC6kPfgcVRjLf+o=", + version = "v0.0.0-20230807174633-333a87d1ef8a", ) go_repository( name = "org_uber_go_atomic", diff --git a/AUTHORS b/AUTHORS index 21d4e338cafa..78a79a773e85 100755 --- a/AUTHORS +++ b/AUTHORS @@ -21,6 +21,7 @@ Anthony Catel Andrew Kurushin Bharat Ahuja Biswapriyo Nath +Brian Salomon Callum Moffat Cary Clark Casey Banner @@ -85,9 +86,12 @@ Sylvestre Ledru The Chromium Authors <*@chromium.org> Thiago Fransosi Farina Vibe Inc <*@vibe.us> +William Candillon +Wonmin Park Yandex LLC <*@yandex-team.ru> Yong-Hwan Baek Zhuo Qingliang +Zoho Corporation Private Limited <*@zohocorp.com> # Trusted service accounts. GitHub Dependabot <(\d+)\+dependabot\[bot\]@users.noreply.github.com> diff --git a/BUILD.bazel b/BUILD.bazel index 70eb45c22c5f..f6a975f5ec41 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -41,7 +41,7 @@ skia_cc_library( "//src:deps", "@skia_user_config//:user_config", ] + select({ - "//src/gpu:metal_backend": ["//:skia_objc"], + "//src/gpu:metal_ganesh": ["//:skia_objc"], "//conditions:default": [], }), ) @@ -72,7 +72,7 @@ skia_cc_library( "//src:deps", "@skia_user_config//:user_config", ] + select({ - "//src/gpu:metal_backend": ["//:skia_objc"], + "//src/gpu:metal_ganesh": ["//:skia_objc"], "//conditions:default": [], }), ) diff --git a/BUILD.gn b/BUILD.gn index 7109f8f55ec7..8c5b21e46554 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -48,12 +48,6 @@ config("skia_public") { if (skia_enable_sksl) { defines += [ "SK_ENABLE_SKSL" ] } - if (skia_enable_sksl_in_raster_pipeline) { - defines += [ "SK_ENABLE_SKSL_IN_RASTER_PIPELINE" ] - } - if (skia_enable_skvm) { - defines += [ "SK_ENABLE_SKVM" ] - } if (skia_enable_precompile) { defines += [ "SK_ENABLE_PRECOMPILE" ] } @@ -82,6 +76,9 @@ config("skia_public") { if (skia_use_perfetto) { defines += [ "SK_USE_PERFETTO" ] } + if (skia_use_safe_libcxx) { + defines += [ "_LIBCPP_ENABLE_ASSERTIONS=1" ] + } # Some older versions of the Clang toolchain change the visibility of # symbols decorated with API_AVAILABLE macro to be visible. Users of such @@ -205,16 +202,6 @@ opts("hsw") { } } -opts("skx") { - enabled = is_x86 - sources = skia_opts.skx_sources - if (is_win) { - cflags = [ "/arch:AVX512" ] - } else { - cflags = [ "-march=skylake-avx512" ] - } -} - # Any feature of Skia that requires third-party code should be optional and use this template. template("optional") { if (invoker.enabled) { @@ -526,6 +513,22 @@ optional("fontmgr_win") { "src/ports/SkTypeface_win_dw.cpp", "src/ports/SkTypeface_win_dw.h", ] + if (skia_dwritecore_sdk != "") { + defines = [ "DWRITE_CORE" ] + if (is_win && is_clang) { + # Clang complains about these headers, so mark them as system. These + # headers are hiding SDK headers of the same name, which are also + # included as system headers, so these need to go first in the cflags + # "includes" before the SDK. gn appends configs in the order listed, + # so these flags will be first. + cflags = [ + "-imsvc", + "${skia_dwritecore_sdk}/include", + ] + } else { + include_dirs = [ "${skia_dwritecore_sdk}/include" ] + } + } } optional("fontmgr_win_factory") { enabled = skia_enable_fontmgr_win @@ -744,8 +747,6 @@ if (skia_compile_sksl_tests) { "SKSL_ENABLE_TRACING", "SKSL_STANDALONE", "SK_DISABLE_TRACING", - "SK_ENABLE_SKVM", - "SK_ENABLE_SKSL_IN_RASTER_PIPELINE", "SK_ENABLE_SPIRV_CROSS", "SK_ENABLE_SPIRV_VALIDATION", "SK_ENABLE_WGSL_VALIDATION", @@ -776,7 +777,6 @@ if (skia_compile_sksl_tests) { include_dirs = [ "." ] deps = [ ":run_sksllex", - ":skvm_jit", "//third_party/externals/dawn/src/tint:libtint", "//third_party/externals/spirv-tools:spvtools", "//third_party/externals/spirv-tools:spvtools_val", @@ -830,9 +830,11 @@ if (skia_compile_sksl_tests) { sources += [ src ] foreach(outExtension, invoker.outExtensions) { - # SPIR-V uses separate extensions for .vert shaders. + # SPIR-V uses separate extensions for .vert and .compute shaders. if (ext == "vert" && outExtension == ".asm.frag") { outExtension = ".asm.vert" + } else if (ext == "compute" && outExtension == ".asm.frag") { + outExtension = ".asm.comp" } outputs += [ target_out_dir + "/" + @@ -1153,7 +1155,7 @@ optional("jpeg_decode") { ":jpeg_mpf", ":xml", ] - sources += [ "src/codec/SkJpegXmp.cpp" ] + sources += skia_codec_jpeg_xmp } } @@ -1321,9 +1323,73 @@ optional("typeface_freetype") { ] } +if (skia_use_fontations) { + action("fontations_rust_side") { + bazel_args = [ "--with_fontations" ] + if (is_mac && target_cpu == "arm64") { + # TODO: Normally the target toolchain would be specified with `--platforms` but that doesn't + # work. When building and running on an arm64 mac, setting `--host_platform` seems to do the + # right thing but may not be the right build configuration in the long run. + bazel_args += [ "--host_platform=//bazel/platform:mac_arm64_hermetic" ] + } + if (!is_debug) { + bazel_args += [ "--compilation_mode=opt" ] + } + script = "gn/bazel_build.py" + sources = [ + "src/ports/fontations/BUILD.bazel", + "src/ports/fontations/src/ffi.rs", + ] + outputs = [ "$root_out_dir/libbridge_rust_side.a" ] + args = + [ + "//src/ports/fontations:bridge_rust_side", + rebase_path("//bazel-bin/src/ports/fontations/libbridge_rust_side.a", + root_build_dir), + ] + bazel_args + } + + action("fontations_ffi") { + bazel_args = [ "--with_fontations" ] + if (is_mac && target_cpu == "arm64") { + # TODO: Normally the target toolchain would be specified with `--platforms` but that doesn't + # work. When building and running on an arm64 mac, setting `--host_platform` seems to do the + # right thing but may not be the right build configuration in the long run. + bazel_args += [ "--host_platform=//bazel/platform:mac_arm64_hermetic" ] + } + if (!is_debug) { + bazel_args += [ "--compilation_mode=opt" ] + } + script = "gn/bazel_build.py" + sources = [ + "src/ports/fontations/BUILD.bazel", + "src/ports/fontations/src/ffi.rs", + ] + outputs = [ "$root_out_dir/libfontations_ffi.a" ] + args = [ + "//src/ports/fontations:fontations_ffi", + rebase_path("//bazel-bin/src/ports/fontations/libfontations_ffi.a", + root_build_dir), + ] + bazel_args + } +} + optional("typeface_fontations") { public_defines = [ "SK_TYPEFACE_FACTORY_FONTATIONS" ] enabled = skia_use_fontations + if (enabled) { + public_include_dirs = [ "bazel-bin/" ] + } + + deps = [ + ":fontations_ffi", + ":fontations_rust_side", + ] + + libs = [ + "$root_out_dir/libfontations_ffi.a", + "$root_out_dir/libbridge_rust_side.a", + ] sources = [ "src/ports/SkTypeface_fontations.cpp", "src/ports/SkTypeface_fontations_priv.h", @@ -1359,17 +1425,12 @@ optional("xml") { public_defines = [ "SK_XML" ] deps = [ "//third_party/expat" ] - sources = skia_xml_sources + [ + sources = skia_xml_sources + skia_codec_xmp + [ "src/svg/SkSVGCanvas.cpp", "src/svg/SkSVGDevice.cpp", ] } -optional("skvm_jit") { - enabled = skia_enable_skvm_jit_when_possible - public_defines = [ "SKVM_JIT_WHEN_POSSIBLE" ] -} - if (skia_enable_ganesh && skia_generate_workarounds) { action("workaround_list") { script = "tools/build_workaround_header.py" @@ -1431,9 +1492,8 @@ skia_component("skia") { ":ndk_images", ":png_decode", ":raw", - ":skvm_jit", - ":skx", ":ssse3", + ":typeface_fontations", ":vello", ":webp_decode", ":wuffs", @@ -1479,6 +1539,7 @@ skia_component("skia") { if (skia_enable_sksl) { deps += [ ":minify_sksl" ] sources += skia_sksl_sources + sources += skia_needs_sksl_sources sources += skia_colorfilters_sksl_sources if (skia_enable_sksl_tracing) { @@ -1584,10 +1645,6 @@ skia_component("skia") { defines += [ "SK_ENABLE_SPIRV_VALIDATION" ] } - if (skia_use_fontations) { - deps += [ ":typeface_fontations" ] - } - if (skia_include_multiframe_procs) { sources += [ "tools/SkSharingProc.cpp" ] } @@ -1598,6 +1655,10 @@ skia_component("skia") { defines += [ "SK_ANDROID_FRAMEWORK_USE_PERFETTO" ] sources += [ "src/android/SkAndroidFrameworkPerfettoStaticStorage.cpp" ] } + + if (!skia_enable_ganesh && !skia_enable_graphite) { + sources += skia_no_slug_srcs + } } # DebugCanvas used in experimental/wasm-skp-debugger @@ -1925,7 +1986,10 @@ if (skia_enable_tools) { "tools/gpu/ManagedBackendTexture.h", "tools/gpu/MemoryCache.cpp", "tools/gpu/MemoryCache.h", + "tools/gpu/ProtectedUtils.cpp", + "tools/gpu/ProtectedUtils.h", "tools/gpu/ProxyUtils.cpp", + "tools/gpu/ProxyUtils.h", "tools/gpu/TestContext.cpp", "tools/gpu/TestOps.cpp", "tools/gpu/TestOps.h", @@ -1935,6 +1999,7 @@ if (skia_enable_tools) { # GrContextFactory workaround. "tools/gpu/mock/MockTestContext.cpp", ] + sources += skia_utils_gpu libs = [] frameworks = [] @@ -2007,16 +2072,16 @@ if (skia_enable_tools) { sources += [ "tools/graphite/GraphiteTestContext.h" ] sources += [ "tools/graphite/GraphiteTestContext.cpp" ] if (skia_use_dawn) { - sources += [ "tools/graphite/dawn/DawnTestContext.cpp" ] + sources += [ "tools/graphite/dawn/GraphiteDawnTestContext.cpp" ] sources += [ "tools/graphite/dawn/GraphiteDawnTestContext.h" ] } if (skia_use_metal) { sources += [ "tools/graphite/mtl/GraphiteMtlTestContext.h" ] - sources += [ "tools/graphite/mtl/MtlTestContext.mm" ] + sources += [ "tools/graphite/mtl/GraphiteMtlTestContext.mm" ] } if (skia_use_vulkan) { - sources += [ "tools/graphite/vk/VulkanTestContext.cpp" ] - sources += [ "tools/graphite/vk/VulkanTestContext.h" ] + sources += [ "tools/graphite/vk/GraphiteVulkanTestContext.cpp" ] + sources += [ "tools/graphite/vk/GraphiteVulkanTestContext.h" ] } } @@ -2296,8 +2361,10 @@ if (skia_enable_tools) { deps = [ "modules/skottie:tool_gpu" ] } } - test_app("svg_tool") { - deps = [ "modules/svg:tool" ] + if (skia_enable_svg && skia_use_expat && defined(is_skia_standalone)) { + test_app("svg_tool") { + deps = [ "modules/svg:tool" ] + } } } @@ -2325,28 +2392,6 @@ if (skia_enable_tools) { "modules/skcms", ] } - test_app("fm") { - sources = [ - "dm/DMGpuTestProcs.cpp", # blech - "tools/fm/fm.cpp", - ] - deps = [ - ":common_flags_aa", - ":common_flags_fontmgr", - ":common_flags_gpu", - ":flags", - ":gm", - ":gpu_tool_utils", - ":hash_and_encode", - ":skia", - ":tests", - ":tool_utils", - ":trace", - "modules/skottie", - "modules/skottie:utils", - "modules/svg", - ] - } test_app("dm") { sources = [ "dm/DM.cpp", @@ -2582,6 +2627,9 @@ if (skia_enable_tools) { "tools/debugger/DrawCommand.cpp", "tools/debugger/JsonWriteBuffer.cpp", ] + if (skia_enable_graphite && skia_enable_precompile) { + sources += [ "fuzz/FuzzPrecompile.cpp" ] + } deps = [ ":flags", ":gpu_tool_utils", @@ -2723,12 +2771,8 @@ if (skia_enable_tools) { "tools/sk_app/Application.h", "tools/sk_app/CommandSet.cpp", "tools/sk_app/CommandSet.h", - "tools/sk_app/DisplayParams.h", - "tools/sk_app/RasterWindowContext.h", "tools/sk_app/Window.cpp", "tools/sk_app/Window.h", - "tools/sk_app/WindowContext.cpp", - "tools/sk_app/WindowContext.h", ] libs = [] frameworks = [] @@ -2736,8 +2780,6 @@ if (skia_enable_tools) { if (is_android) { sources += [ "tools/SkGetExecutablePath_linux.cpp", - "tools/sk_app/android/RasterWindowContext_android.cpp", - "tools/sk_app/android/WindowContextFactory_android.h", "tools/sk_app/android/Window_android.cpp", "tools/sk_app/android/Window_android.h", "tools/sk_app/android/main_android.cpp", @@ -2748,8 +2790,6 @@ if (skia_enable_tools) { } else if (is_linux) { sources += [ "tools/SkGetExecutablePath_linux.cpp", - "tools/sk_app/unix/RasterWindowContext_unix.cpp", - "tools/sk_app/unix/WindowContextFactory_unix.h", "tools/sk_app/unix/Window_unix.cpp", "tools/sk_app/unix/Window_unix.h", "tools/sk_app/unix/keysym2ucs.c", @@ -2763,8 +2803,6 @@ if (skia_enable_tools) { } else if (is_win) { sources += [ "tools/SkGetExecutablePath_win.cpp", - "tools/sk_app/win/RasterWindowContext_win.cpp", - "tools/sk_app/win/WindowContextFactory_win.h", "tools/sk_app/win/Window_win.cpp", "tools/sk_app/win/Window_win.h", "tools/sk_app/win/main_win.cpp", @@ -2772,7 +2810,6 @@ if (skia_enable_tools) { } else if (is_mac) { sources += [ "tools/SkGetExecutablePath_mac.cpp", - "tools/sk_app/mac/WindowContextFactory_mac.h", "tools/sk_app/mac/Window_mac.h", "tools/sk_app/mac/Window_mac.mm", "tools/sk_app/mac/main_mac.mm", @@ -2785,7 +2822,6 @@ if (skia_enable_tools) { } else if (is_ios) { sources += [ "tools/SkGetExecutablePath_mac.cpp", - "tools/sk_app/ios/WindowContextFactory_ios.h", "tools/sk_app/ios/Window_ios.h", "tools/sk_app/ios/Window_ios.mm", "tools/sk_app/ios/main_ios.mm", @@ -2793,104 +2829,10 @@ if (skia_enable_tools) { frameworks += [ "QuartzCore.framework" ] } - if (skia_use_gl) { - sources += [ "tools/sk_app/GLWindowContext.cpp" ] - sources += [ "tools/sk_app/GLWindowContext.h" ] - if (is_android) { - sources += [ "tools/sk_app/android/GLWindowContext_android.cpp" ] - } else if (is_linux) { - sources += [ "tools/sk_app/unix/GLWindowContext_unix.cpp" ] - } else if (is_win) { - sources += [ "tools/sk_app/win/GLWindowContext_win.cpp" ] - if (skia_use_angle) { - sources += [ "tools/sk_app/win/ANGLEWindowContext_win.cpp" ] - } - } else if (is_mac) { - sources += [ - "tools/sk_app/mac/GLWindowContext_mac.mm", - "tools/sk_app/mac/RasterWindowContext_mac.mm", - ] - } else if (is_ios) { - sources += [ - "tools/sk_app/ios/GLWindowContext_ios.mm", - "tools/sk_app/ios/RasterWindowContext_ios.mm", - ] - } - } - - if (skia_use_vulkan) { - sources += [ "tools/sk_app/VulkanWindowContext.cpp" ] - sources += [ "tools/sk_app/VulkanWindowContext.h" ] - if (is_android) { - sources += [ "tools/sk_app/android/VulkanWindowContext_android.cpp" ] - } else if (is_linux) { - sources += [ "tools/sk_app/unix/VulkanWindowContext_unix.cpp" ] - libs += [ "X11-xcb" ] - } else if (is_win) { - sources += [ "tools/sk_app/win/VulkanWindowContext_win.cpp" ] - } - } - - if (skia_use_metal) { - sources += [ "tools/sk_app/MetalWindowContext.mm" ] - sources += [ "tools/sk_app/MetalWindowContext.h" ] - if (skia_enable_graphite) { - sources += [ "tools/sk_app/GraphiteMetalWindowContext.mm" ] - sources += [ "tools/sk_app/GraphiteMetalWindowContext.h" ] - } - if (is_mac) { - sources += [ "tools/sk_app/mac/MetalWindowContext_mac.mm" ] - if (skia_enable_graphite) { - sources += [ "tools/sk_app/mac/GraphiteMetalWindowContext_mac.mm" ] - } - } else if (is_ios) { - sources += [ "tools/sk_app/ios/MetalWindowContext_ios.mm" ] - } - } - - if (skia_use_direct3d) { - sources += [ "tools/sk_app/win/D3D12WindowContext_win.cpp" ] - } - - if (skia_use_dawn) { - sources += [ "tools/sk_app/DawnWindowContext.cpp" ] - sources += [ "tools/sk_app/DawnWindowContext.h" ] - if (is_linux) { - if (dawn_enable_vulkan) { - sources += [ "tools/sk_app/unix/DawnVulkanWindowContext_unix.cpp" ] - defines = [ "VK_USE_PLATFORM_XCB_KHR" ] - libs += [ "X11-xcb" ] - if (skia_enable_graphite) { - sources += - [ "tools/sk_app/unix/GraphiteDawnVulkanWindowContext_unix.cpp" ] - sources += [ "tools/sk_app/GraphiteDawnWindowContext.cpp" ] - sources += [ "tools/sk_app/GraphiteDawnWindowContext.h" ] - } - } - } else if (is_win) { - if (dawn_enable_d3d12) { - sources += [ "tools/sk_app/win/DawnD3D12WindowContext_win.cpp" ] - if (skia_enable_graphite) { - sources += - [ "tools/sk_app/win/GraphiteDawnD3D12WindowContext_win.cpp" ] - sources += [ "tools/sk_app/GraphiteDawnWindowContext.cpp" ] - sources += [ "tools/sk_app/GraphiteDawnWindowContext.h" ] - } - } - } else if (is_mac) { - if (dawn_enable_metal) { - sources += [ "tools/sk_app/mac/DawnMTLWindowContext_mac.mm" ] - if (skia_enable_graphite) { - sources += - [ "tools/sk_app/mac/GraphiteDawnMetalWindowContext_mac.mm" ] - sources += [ "tools/sk_app/GraphiteDawnWindowContext.cpp" ] - sources += [ "tools/sk_app/GraphiteDawnWindowContext.h" ] - } - } - } - } - - deps = [ ":tool_utils" ] + deps = [ + ":tool_utils", + "tools/window", + ] if (is_android) { deps += [ "//third_party/native_app_glue" ] } @@ -2979,6 +2921,7 @@ if (skia_enable_tools) { "tools/viewer/PathSlide.cpp", "tools/viewer/PathTessellatorsSlide.cpp", "tools/viewer/PathTextSlide.cpp", + "tools/viewer/ProtectedSlide.cpp", "tools/viewer/QuadStrokerSlide.cpp", "tools/viewer/RectanizerSlide.cpp", "tools/viewer/RepeatTileSlide.cpp", @@ -3350,6 +3293,19 @@ if (skia_enable_tools) { } } + if (skia_enable_graphite && skia_enable_precompile) { + libfuzzer_app("api_precompile") { + include_dirs = [] + sources = [ + "fuzz/FuzzPrecompile.cpp", + "fuzz/oss_fuzz/FuzzPrecompile.cpp", + "tools/fonts/TestFontMgr.cpp", + "tools/fonts/TestTypeface.cpp", + ] + deps = [] + } + } + libfuzzer_app("api_null_canvas") { include_dirs = [ "tools", diff --git a/DEPS b/DEPS index 23ab5d0f5188..3205bf6bfefa 100644 --- a/DEPS +++ b/DEPS @@ -4,7 +4,7 @@ vars = { # Three lines of non-changing comments so that # the commit queue can handle CLs rolling different # dependencies without interference from each other. - 'sk_tool_revision': 'git_revision:850bcdd8dfedeb7f6b230453fc3e4dd9448d9297', + 'sk_tool_revision': 'git_revision:333a87d1ef8ae6440d475a82695ed44d02803673', # ninja CIPD package version. # https://chrome-infra-packages.appspot.com/p/infra/3pp/tools/ninja @@ -19,30 +19,31 @@ vars = { # ./tools/git-sync-deps deps = { "buildtools" : "https://chromium.googlesource.com/chromium/src/buildtools.git@b138e6ce86ae843c42a1a08f37903207bebcca75", - "third_party/externals/angle2" : "https://chromium.googlesource.com/angle/angle.git@84379a5294073b0f702fa0bbe909c93805cc870a", + "third_party/externals/angle2" : "https://chromium.googlesource.com/angle/angle.git@f7d7be8d2ff0bbee438b6030419a0b13082de198", "third_party/externals/brotli" : "https://skia.googlesource.com/external/github.com/google/brotli.git@6d03dfbedda1615c4cba1211f8d81735575209c8", "third_party/externals/d3d12allocator" : "https://skia.googlesource.com/external/github.com/GPUOpen-LibrariesAndSDKs/D3D12MemoryAllocator.git@169895d529dfce00390a20e69c2f516066fe7a3b", # Dawn requires jinja2 and markupsafe for the code generator, tint for SPIRV compilation, and abseil for string formatting. # When the Dawn revision is updated these should be updated from the Dawn DEPS as well. - # "third_party/externals/dawn" : "https://dawn.googlesource.com/dawn.git@0d5e76a2427f1c629a0d709ee0833da43bf79e84", - # "third_party/externals/jinja2" : "https://chromium.googlesource.com/chromium/src/third_party/jinja2@ee69aa00ee8536f61db6a451f3858745cf587de6", + "third_party/externals/dawn" : "https://dawn.googlesource.com/dawn.git@beaf20f90f1bf21d235c99d5b49b8bb507b722b2", + "third_party/externals/jinja2" : "https://chromium.googlesource.com/chromium/src/third_party/jinja2@ee69aa00ee8536f61db6a451f3858745cf587de6", "third_party/externals/markupsafe" : "https://chromium.googlesource.com/chromium/src/third_party/markupsafe@0944e71f4b2cb9a871bcbe353f95e889b64a611a", "third_party/externals/abseil-cpp" : "https://skia.googlesource.com/external/github.com/abseil/abseil-cpp.git@cb436cf0142b4cbe47aae94223443df7f82e2920", "third_party/externals/dng_sdk" : "https://android.googlesource.com/platform/external/dng_sdk.git@c8d0c9b1d16bfda56f15165d39e0ffa360a11123", "third_party/externals/egl-registry" : "https://skia.googlesource.com/external/github.com/KhronosGroup/EGL-Registry@a0bca08de07c7d7651047bedc0b653cfaaa4f2ae", - # "third_party/externals/emsdk" : "https://skia.googlesource.com/external/github.com/emscripten-core/emsdk.git@4a48a752e6a8bef6f222622f2b4926d5eb3bdeb3", + #"third_party/externals/emsdk" : "https://skia.googlesource.com/external/github.com/emscripten-core/emsdk.git@4a48a752e6a8bef6f222622f2b4926d5eb3bdeb3", "third_party/externals/expat" : "https://chromium.googlesource.com/external/github.com/libexpat/libexpat.git@624da0f593bb8d7e146b9f42b06d8e6c80d032a3", - "third_party/externals/freetype" : "https://chromium.googlesource.com/chromium/src/third_party/freetype2.git@d857bd535b6c7e877f262a9b61ed21ee11b35dab", - "third_party/externals/harfbuzz" : "https://github.com/harfbuzz/harfbuzz.git@894a1f72ee93a1fd8dc1d9218cb3fd8f048be29a", + "third_party/externals/freetype" : "https://chromium.googlesource.com/chromium/src/third_party/freetype2.git@5769f13a6b9fafa3840726f06dde07e755501a16", + "third_party/externals/harfbuzz" : "https://chromium.googlesource.com/external/github.com/harfbuzz/harfbuzz.git@894a1f72ee93a1fd8dc1d9218cb3fd8f048be29a", "third_party/externals/highway" : "https://chromium.googlesource.com/external/github.com/google/highway.git@424360251cdcfc314cfc528f53c872ecd63af0f0", "third_party/externals/icu" : "https://chromium.googlesource.com/chromium/deps/icu.git@a0718d4f121727e30b8d52c7a189ebf5ab52421f", "third_party/externals/imgui" : "https://skia.googlesource.com/external/github.com/ocornut/imgui.git@55d35d8387c15bf0cfd71861df67af8cfbda7456", - "third_party/externals/libavif" : "https://github.com/AOMediaCodec/libavif.git@f49462dc93784bf34148715eee36ab6697ca0b35", + "third_party/externals/libavif" : "https://skia.googlesource.com/external/github.com/AOMediaCodec/libavif.git@f49462dc93784bf34148715eee36ab6697ca0b35", "third_party/externals/libgav1" : "https://chromium.googlesource.com/codecs/libgav1.git@0fb779c1e169fe6c229cd1fa9cc6ea6feeb441da", + "third_party/externals/libgrapheme" : "https://skia.googlesource.com/external/github.com/FRIGN/libgrapheme/@c0cab63c5300fa12284194fbef57aa2ed62a94c0", "third_party/externals/libjpeg-turbo" : "https://chromium.googlesource.com/chromium/deps/libjpeg_turbo.git@9b894306ec3b28cea46e84c32b56773a98c483da", "third_party/externals/libjxl" : "https://chromium.googlesource.com/external/gitlab.com/wg1/jpeg-xl.git@a205468bc5d3a353fb15dae2398a101dff52f2d3", "third_party/externals/libpng" : "https://skia.googlesource.com/third_party/libpng.git@f135775ad4e5d4408d2e12ffcc71bb36e6b48551", - "third_party/externals/libwebp" : "https://github.com/webmproject/libwebp.git@ca332209cb5567c9b249c86788cb2dbf8847e760", + "third_party/externals/libwebp" : "https://chromium.googlesource.com/webm/libwebp.git@ca332209cb5567c9b249c86788cb2dbf8847e760", "third_party/externals/libyuv" : "https://chromium.googlesource.com/libyuv/libyuv.git@d248929c059ff7629a85333699717d7a677d8d96", "third_party/externals/microhttpd" : "https://android.googlesource.com/platform/external/libmicrohttpd@748945ec6f1c67b7efc934ab0808e1d32f2fb98d", "third_party/externals/oboe" : "https://chromium.googlesource.com/external/github.com/google/oboe.git@b02a12d1dd821118763debec6b83d00a8a0ee419", @@ -50,19 +51,20 @@ deps = { # "third_party/externals/perfetto" : "https://android.googlesource.com/platform/external/perfetto@93885509be1c9240bc55fa515ceb34811e54a394", "third_party/externals/piex" : "https://android.googlesource.com/platform/external/piex.git@bb217acdca1cc0c16b704669dd6f91a1b509c406", "third_party/externals/sfntly" : "https://chromium.googlesource.com/external/github.com/googlei18n/sfntly.git@b55ff303ea2f9e26702b514cf6a3196a2e3e2974", - # "third_party/externals/swiftshader" : "https://swiftshader.googlesource.com/SwiftShader@ae667fe96db9b7f76edea242015d61f293c7210e", - "third_party/externals/vulkanmemoryallocator" : "https://chromium.googlesource.com/external/github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator@7de5cc00de50e71a3aab22dea52fbb7ff4efceb6", + "third_party/externals/swiftshader" : "https://swiftshader.googlesource.com/SwiftShader@729e92f8ae07d7b695bdcf346318dec4d11d899e", + "third_party/externals/vulkanmemoryallocator" : "https://chromium.googlesource.com/external/github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator@a6bfc237255a6bac1513f7c1ebde6d8aed6b5191", # vulkan-deps is a meta-repo containing several interdependent Khronos Vulkan repositories. # When the vulkan-deps revision is updated, those repos (spirv-*, vulkan-*) should be updated as well. - "third_party/externals/vulkan-deps" : "https://chromium.googlesource.com/vulkan-deps@90577eb35eea01011e237747e92ee1fbe199d4c3", - "third_party/externals/spirv-cross" : "https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Cross@2d3a152081ca6e6bea7093940d0f81088fe4d01c", - "third_party/externals/spirv-headers" : "https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Headers.git@6e09e44cd88a5297433411b2ee52f4cf9f50fa90", - "third_party/externals/spirv-tools" : "https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools.git@a63ac9f73d29cd27cdb6e3388d98d1d934e512bb", - "third_party/externals/vello" : "https://skia.googlesource.com/external/github.com/linebender/vello.git@ef2630ad9c647b90863cb0915701d54725733968", - "third_party/externals/vulkan-headers" : "https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Headers@c1a8560c5cf5e7bd6dbc71fe69b1a317411c36b8", - "third_party/externals/vulkan-tools" : "https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Tools@ca8bb4ee3cc9afdeca4b49c5ef758bad7cce2c72", + "third_party/externals/vulkan-deps" : "https://chromium.googlesource.com/vulkan-deps@c46d48f777b73fa492cdc6424e54e4004bd9ee01", + "third_party/externals/spirv-cross" : "https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Cross@bccaa94db814af33d8ef05c153e7c34d8bd4d685", + "third_party/externals/spirv-headers" : "https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Headers.git@124a9665e464ef98b8b718d572d5f329311061eb", + "third_party/externals/spirv-tools" : "https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools.git@4a9881fe9b32086d4ceac89a498b0dd34084b574", + "third_party/externals/vello" : "https://skia.googlesource.com/external/github.com/linebender/vello.git@443539891c4c1eb3ca4ed891d251cbf4097c9a9c", + "third_party/externals/vulkan-headers" : "https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Headers@450ead13e1064584da027d91192bd7bfb724640f", + "third_party/externals/vulkan-tools" : "https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Tools@1d8188a974ccd08caffb5bd7fec58751e0c7d786", + "third_party/externals/unicodetools" : "https://chromium.googlesource.com/external/github.com/unicode-org/unicodetools@66a3fa9dbdca3b67053a483d130564eabc5fe095", #"third_party/externals/v8" : "https://chromium.googlesource.com/v8/v8.git@5f1ae66d5634e43563b2d25ea652dfb94c31a3b4", - "third_party/externals/wuffs" : "https://skia.googlesource.com/external/github.com/google/wuffs-mirror-release-c.git@a0041ac0310b3156b963e2f2bea09245f25ec073", + "third_party/externals/wuffs" : "https://skia.googlesource.com/external/github.com/google/wuffs-mirror-release-c.git@e3f919ccfe3ef542cfc983a82146070258fb57f8", "third_party/externals/zlib" : "https://chromium.googlesource.com/chromium/src/third_party/zlib@3ca9f16f02950edffa391ec19cea856090158e9e", 'bin': { diff --git a/README.chromium b/README.chromium index c409e909660a..1fcb1b5b170c 100644 --- a/README.chromium +++ b/README.chromium @@ -2,4 +2,6 @@ Name: Skia URL: https://skia.org/ Version: unknown Security Critical: yes +Shipped: yes License: BSD +License File: LICENSE diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 62f6ed508378..5a03d6dc0ce0 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -2,6 +2,45 @@ Skia Graphics Release Notes This file includes a list of high level updates for each milestone release. +Milestone 117 +------------- + * `SkGraphics::AllowJIT()` has been removed. It was previously deprecated (and did nothing). + * New methods are added to `SkImage`, `SkSurface`, and `skgpu::graphite::context` named + `asyncRescaleAndReadPixeksYUVA420`. These function identically to the existing + `asyncRescaleAndReadPixelsYUV420` methods but return a fourth plane containing alpha at full + resolution. + * `SkAutoGraphics` was removed. This was a helper struct that simply called `SkGraphics::Init`. + Any instance of `SkAutoGraphics` can be replaced with a call to `SkGraphics::Init`. + * `SkCanvas::flush()` has been removed. It can be replaced with: + ``` + if (auto dContext = GrAsDirectContext(canvas->recordingContext())) { + dContext->flushAndSubmit(); + } + ``` + + `SkCanvas::recordingContext()` and `SkCanvas::recorder()` are now const. They were implicitly const + but are now declared to be such. + * `SkCanvas::recordingContext()` and `SkCanvas::recorder()` are now const. + They were implicitly const but are now declared to be such. + * `SkMesh::MakeIndexBuffer`, `SkMesh::CopyIndexBuffer`, `SkMesh::MakeVertexBuffer`, and + `SkMesh::CopyVertexBuffer` have been moved to the `SkMeshes` namespace. Ganesh-specific versions + have been created in `include/gpu/ganesh/SkMeshGanesh.h`. + * SkPath now enforces an upper limit of 715 million path verbs. + * `SkRuntimeEffectBuilder::uniforms()`, `SkRuntimeEffectBuilder::children()`, + `SkRuntimeShaderBuilder::makeShader()`, `SkRuntimeColorFilterBuilder::makeColorFilter()`, and + `SkRuntimeBlendBuilder::makeBlender()` are now marked as const. No functional changes internally, + just making explicit what had been implicit. + * `SkRuntimeEffect::makeImage` and `SkRuntimeShaderBuilder::makeImage` have been removed. + * GL-specific calls have been removed from GrBackendSurface.h. Clients should use the + equivalents found in `include/gpu/ganesh/gl/GrGLBackendSurface.h` + * A new `SkTiledImageUtils` namespace (in `SkTiledImageUtils.h`) provides `DrawImage` and `DrawImageRect` methods that directly mirror `SkCanvas'` `drawImage` and `drawImageRect` calls. + + The new entry points will breakup large `SkBitmap`-backed `SkImages` into tiles and draw them if they would be too large to upload to the gpu as one texture. + + They will fall through to their `SkCanvas` correlates if tiling isn't needed or possible. + +* * * + Milestone 116 ------------- * `SkPromiseImageTexture` has been removed from the public API, as well as diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel index 82c2891eb683..470c585bf9a2 100644 --- a/WORKSPACE.bazel +++ b/WORKSPACE.bazel @@ -5,6 +5,7 @@ load("//toolchain:download_toolchains.bzl", "download_toolchains_for_skia") download_toolchains_for_skia("clang_linux_amd64", "clang_mac", "ndk_linux_amd64") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +load("//bazel:gcs_mirror.bzl", "gcs_mirror_url") # See https://github.com/emscripten-core/emsdk/tree/85d27a4a2a60d591613a305b14ae438c2bb3ce11/bazel#setup-instructions http_archive( @@ -255,6 +256,7 @@ rust_register_toolchains( # The rust rules validate a toolchain by sha256 hash, as listed in https://github.com/bazelbuild/rules_rust/blob/dab425760656c449d3a0f73c490be92c240b6ef2/rust/known_shas.bzl "1.68.2", ], + extra_target_triples = ["aarch64-apple-darwin"], ) # https://bazelbuild.github.io/rules_rust/crate_universe.html @@ -481,3 +483,46 @@ exports_files( sha256 = "ed96f7d2f49b83b016e4bdbed432e4734a5a133accb025d7c07685e01489ba93", tag = "git_revision:1c4151ff5c1d6fbf7fa800b8d4bb34d3abc03a41", ) + + +################################## +# Docker rules and dependencies. # +################################## + +http_archive( + name = "io_bazel_rules_docker", + sha256 = "27d53c1d646fc9537a70427ad7b034734d08a9c38924cc6357cc973fed300820", + strip_prefix = "rules_docker-0.24.0", + urls = gcs_mirror_url( + sha256 = "27d53c1d646fc9537a70427ad7b034734d08a9c38924cc6357cc973fed300820", + url = "https://github.com/bazelbuild/rules_docker/releases/download/v0.24.0/rules_docker-v0.24.0.tar.gz", + ), +) + +load( + "@io_bazel_rules_docker//repositories:repositories.bzl", + container_repositories = "repositories", +) + +container_repositories() + +# This is required by the toolchain_container rule. +load( + "@io_bazel_rules_docker//repositories:go_repositories.bzl", + container_go_deps = "go_deps", +) + +container_go_deps() + +load( + "@io_bazel_rules_docker//container:container.bzl", + "container_pull", +) + +# Pulls the gcr.io/skia-public/debugger-app-base container. +container_pull( + name = "debugger-app-base", + digest = "sha256:be6bd0fc62ef967e0d9911c02cd0a212450a503afd07410ed50e9ecbead64a80", + registry = "gcr.io", + repository = "skia-public/debugger-app-base", +) diff --git a/bazel/Makefile b/bazel/Makefile index 7956e5d66fc7..3a5ea5b5df2b 100644 --- a/bazel/Makefile +++ b/bazel/Makefile @@ -6,8 +6,8 @@ generate: generate_go: cd .. && bazelisk run //infra:gazelle -- update infra/bots/task_drivers modules/canvaskit/go \ - bazel/exporter bazel/deps_parser tools/gpu/gl/interface tests/make_adb_test_tarball \ - tests/adb_test_runner + bazel/exporter bazel/deps_parser tools/gpu/gl/interface bazel/make_tarball \ + bazel/adb_test_runner .PHONY: generate_cmake generate_cmake: diff --git a/tests/adb_test.bzl b/bazel/adb_test.bzl similarity index 76% rename from tests/adb_test.bzl rename to bazel/adb_test.bzl index 350c47925ca6..2b87c33eca65 100644 --- a/tests/adb_test.bzl +++ b/bazel/adb_test.bzl @@ -1,13 +1,13 @@ """This module defines the adb_test rule.""" load("@local_config_platform//:constraints.bzl", "HOST_CONSTRAINTS") -load("//bazel:remove_indentation.bzl", "remove_indentation") +load(":remove_indentation.bzl", "remove_indentation") def _adb_test_runner_transition_impl(settings, attr): # buildifier: disable=unused-variable - platform = settings["//tests/adb_test_runner:adb_platform"] + platform = settings["//bazel/adb_test_runner:adb_platform"] # If no platform was specified via --adb_platform, use the host platform. This allows us to - # "bazel test" a skia_android_unit_test on a developer workstation without passing said flag to + # "bazel test" an adb_test target on a developer workstation without passing said flag to # Bazel. if platform == "": # The HOST_CONSTRAINTS list should always be of the form [cpu, os], e.g.: @@ -52,14 +52,30 @@ def _adb_test_runner_transition_impl(settings, attr): # buildifier: disable=unu # running the compiled artifact on a Raspberry Pi in a subsequent CI task. adb_test_runner_transition = transition( implementation = _adb_test_runner_transition_impl, - inputs = ["//tests/adb_test_runner:adb_platform"], + inputs = ["//bazel/adb_test_runner:adb_platform"], outputs = ["//command_line_option:platforms"], ) def _adb_test_impl(ctx): + test_undeclared_outputs_dir_env_var_check = "" + output_dir_flag = "" + if ctx.attr.save_output_files: + test_undeclared_outputs_dir_env_var_check = remove_indentation(""" + if [[ -z "${TEST_UNDECLARED_OUTPUTS_DIR}" ]]; then + echo "FAILED: Environment variable TEST_UNDECLARED_OUTPUTS_DIR is unset. If you" + echo " are running this test outside of Bazel, set said variable to the" + echo " directory where you wish to store any files produced by this test." + + exit 1 + fi + """) + output_dir_flag = "--output-dir $TEST_UNDECLARED_OUTPUTS_DIR" + template = remove_indentation(""" #!/bin/bash + {test_undeclared_outputs_dir_env_var_check} + # Print commands and expand variables for easier debugging. set -x @@ -69,7 +85,8 @@ def _adb_test_impl(ctx): $(rootpath {adb_test_runner}) \ --device {device} \ --archive $(rootpath {archive}) \ - --test-runner $(rootpath {test_runner}) + --test-runner $(rootpath {test_runner}) \ + {output_dir_flag} """) if ctx.attr.device == "unknown": @@ -88,6 +105,8 @@ def _adb_test_impl(ctx): archive = ctx.attr.archive.label, test_runner = ctx.attr.test_runner.label, adb_test_runner = ctx.attr._adb_test_runner[0].label, + test_undeclared_outputs_dir_env_var_check = test_undeclared_outputs_dir_env_var_check, + output_dir_flag = output_dir_flag, ), targets = [ ctx.attr.archive, ctx.attr.test_runner, @@ -108,6 +127,9 @@ def _adb_test_impl(ctx): adb_test = rule( doc = """Runs an Android test on device via `adb`. + Note: This rule is not intended to be used directly in BUILD files. Instead, please use macros + android_unit_test, android_gm_test, etc. + This test rule produces a wrapper shell script that invokes a Go proram that issues adb commands to interact with the device under test. @@ -142,8 +164,16 @@ adb_test = rule( allow_single_file = [".tar.gz"], mandatory = True, ), + "save_output_files": attr.bool( + doc = ( + "If true, save any files produced by this test (e.g. PNG and JSON files in the " + + "case of GM tests) as undeclared outputs (see documentation for the " + + "TEST_UNDECLARED_OUTPUTS_DIR environment variable at " + + "https://bazel.build/reference/test-encyclopedia#initial-conditions)." + ), + ), "_adb_test_runner": attr.label( - default = Label("//tests/adb_test_runner"), + default = Label("//bazel/adb_test_runner"), allow_single_file = True, executable = True, cfg = adb_test_runner_transition, diff --git a/tests/adb_test_runner/BUILD.bazel b/bazel/adb_test_runner/BUILD.bazel similarity index 90% rename from tests/adb_test_runner/BUILD.bazel rename to bazel/adb_test_runner/BUILD.bazel index 709d3cfc465d..f31aec37201f 100644 --- a/tests/adb_test_runner/BUILD.bazel +++ b/bazel/adb_test_runner/BUILD.bazel @@ -1,10 +1,15 @@ +load("//bazel:skia_rules.bzl", "exports_files_legacy") load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") load("//bazel:flags.bzl", "string_flag_with_values") +licenses(["notice"]) + +exports_files_legacy() + go_library( name = "adb_test_runner_lib", srcs = ["adb_test_runner.go"], - importpath = "go.skia.org/skia/tests/adb_test_runner", + importpath = "go.skia.org/skia/bazel/adb_test_runner", visibility = ["//visibility:private"], ) diff --git a/tests/adb_test_runner/adb_test_runner.go b/bazel/adb_test_runner/adb_test_runner.go similarity index 51% rename from tests/adb_test_runner/adb_test_runner.go rename to bazel/adb_test_runner/adb_test_runner.go index f38c8a58d2c4..0e6bf7e9eba8 100644 --- a/tests/adb_test_runner/adb_test_runner.go +++ b/bazel/adb_test_runner/adb_test_runner.go @@ -14,12 +14,19 @@ import ( "fmt" "os" "os/exec" + "path/filepath" "strings" "time" ) -// timeout for this program. -const timeout = time.Hour +const ( + // timeout for this program. + timeout = time.Hour + + // adbTestOutputDirEnvVar is the environment variable that tells the test running on device where + // to write output files, if any. + adbTestOutputDirEnvVar = "ADB_TEST_OUTPUT_DIR" +) type Device string @@ -38,6 +45,7 @@ func main() { deviceFlag := flag.String("device", "", `Device under test, e.g. "pixel_5".`) archiveFlag := flag.String("archive", "", "Tarball with the payload to upload to the device under test.") testRunnerFlag := flag.String("test-runner", "", "Path to the test runner inside the tarball.") + outputDirFlag := flag.String("output-dir", "", "Path on the host machine where to write any outputs produced by the test.") flag.Parse() if *deviceFlag == "" { @@ -50,6 +58,36 @@ func main() { die("Flag --test-runner is required.\n") } + // Fail early if the output directory on the host machine is not empty or if it's non-writable. + if *outputDirFlag != "" { + // Check whether the directory exists. + fileInfo, err := os.Stat(*outputDirFlag) + if err != nil { + die("while stating output dir %q: %s\n", *outputDirFlag, err) + } + if !fileInfo.IsDir() { + die("output dir %q is not a directory.\n", *outputDirFlag) + } + + // Check whether the directory is empty. + entries, err := os.ReadDir(*outputDirFlag) + if err != nil { + die("while listing the contents of output dir %q: %s\n", *outputDirFlag, err) + } + if len(entries) != 0 { + die("output dir %q is not empty.\n", *outputDirFlag) + } + + // Check whether the directory is writable by creating and then removing an empty file. + testFile := filepath.Join(*outputDirFlag, "test") + if err := os.WriteFile(testFile, []byte{}, 0644); err != nil { + die("while writing test file %q in output dir: %s\n", testFile, err) + } + if err := os.Remove(testFile); err != nil { + die("while deleting test file %q in output dir: %s\n", testFile, err) + } + } + var device Device for _, d := range AllDevices { if *deviceFlag == string(d) { @@ -62,13 +100,13 @@ func main() { ctx, cancelFn := context.WithTimeout(context.Background(), timeout) defer cancelFn() - if err := runTest(ctx, device, *archiveFlag, *testRunnerFlag); err != nil { + if err := runTest(ctx, device, *archiveFlag, *testRunnerFlag, *outputDirFlag); err != nil { die("%s\n", err) } } // runTest runs the test on device via adb. -func runTest(ctx context.Context, device Device, archive, testRunner string) error { +func runTest(ctx context.Context, device Device, archive, testRunner, outputDir string) error { // TODO(lovisolo): Add any necessary device-specific setup steps such as turning cores on/off and // setting the CPU/GPU frequencies. @@ -79,7 +117,7 @@ func runTest(ctx context.Context, device Device, archive, testRunner string) err // Clean up the device before running the test. Previous tests might have left the device in a // dirty state. cleanUpDevice := func(device Device) error { - return adb(ctx, "shell", "su", "root", "rm", "-rf", getArchiveExtractionDirOnDevice(device), getArchiveExtractionDirOnDevice(device)) + return adb(ctx, "shell", "su", "root", "rm", "-rf", getArchivePathOnDevice(device), getArchiveExtractionDirOnDevice(device), getOutputDirOnDevice(device)) } if err := cleanUpDevice(device); err != nil { return fmt.Errorf("while cleaning up the device before running the test: %s", err) @@ -105,24 +143,67 @@ func runTest(ctx context.Context, device Device, archive, testRunner string) err return fmt.Errorf("while extracting archive on device: %s", err) } + // Create on-device output dir if necessary. + if outputDir != "" { + if err := adb(ctx, "shell", "su", "root", "mkdir", "-p", getOutputDirOnDevice(device)); err != nil { + return fmt.Errorf("while creating output dir on device: %s", err) + } + } + + // If necessary, we will tell the test runner where to store output files via an environment + // variable. + outputDirEnvVar := "" + if outputDir != "" { + outputDirEnvVar = fmt.Sprintf("%s=%s", adbTestOutputDirEnvVar, getOutputDirOnDevice(device)) + } + // Run test. - stdin := fmt.Sprintf("cd %s && %s", getArchiveExtractionDirOnDevice(device), testRunner) + stdin := fmt.Sprintf("cd %s && %s %s", getArchiveExtractionDirOnDevice(device), outputDirEnvVar, testRunner) if err := adbWithStdin(ctx, stdin, "shell", "su", "root"); err != nil { return fmt.Errorf("while running the test: %s", err) } + // Pull output files from the device if necessary. + if outputDir != "" { + // This will save the output files to /. + if err := adb(ctx, "pull", getOutputDirOnDevice(device), outputDir); err != nil { + return fmt.Errorf("while pulling on-device output dir %q into host output dir %q: %s", getOutputDirOnDevice(device), outputDir, err) + } + + // But we want the output files to be placed in , so we'll move them one by one. + srcDir := filepath.Join(outputDir, filepath.Base(getOutputDirOnDevice(device))) + dstDir := outputDir + entries, err := os.ReadDir(srcDir) + if err != nil { + return fmt.Errorf("while reading the contents of output dir %q: %s", outputDir, err) + } + for _, entry := range entries { + oldPath := filepath.Join(srcDir, entry.Name()) + newPath := filepath.Join(dstDir, entry.Name()) + if err := os.Rename(oldPath, newPath); err != nil { + return fmt.Errorf("while renaming %q to %q: %s", oldPath, newPath, err) + } + } + + // Finally, delete the spurious / directory created by + // "adb pull". + if err := os.Remove(srcDir); err != nil { + return fmt.Errorf("while removing directory %q: %s", srcDir, err) + } + } + return nil } // getArchivePathOnDevice returns the path in the device's file system where the archive should be // uploaded. func getArchivePathOnDevice(device Device) string { - // The /sdcard/revenge_of_the_skiabot directory is writable for non-root users, but files in - // this directory cannot be executed. For this reason, we extract the archive in a directory - // under /data, which allows executing files but requires root privileges. + // The /sdcard directory is writable by non-root users, but files in this directory cannot be + // executed. For this reason, we extract the archive in a directory under /data, which allows + // executing files but requires root privileges. // // This might change in the future based on the device type, whether or not it's rooted, etc. - return "/sdcard/revenge_of_the_skiabot/bazel-adb-test.tar.gz" + return "/sdcard/bazel-adb-test.tar.gz" } // getArchiveExtractionDirOnDevice returns the directory in the device's file system where the @@ -132,6 +213,17 @@ func getArchiveExtractionDirOnDevice(device Device) string { return "/data/bazel-adb-test" } +// getOutputDirOnDevice returns the directory in the device's file system where the test should +// write any output files. These files will then be copied from the device to the machine where adb +// is running. +func getOutputDirOnDevice(device Device) string { + // We have tests write output files to a directory under /sdcard, rather than /data, because the + // /data directory permissions make it impossible to "adb pull" from it. + // + // This might change in the future based on the device type, whether or not it's rooted, etc. + return "/sdcard/bazel-adb-test-output-dir" +} + // adb runs adb with the given arguments. func adb(ctx context.Context, args ...string) error { return adbWithStdin(ctx, "", args...) diff --git a/tests/skia_android_unit_test.bzl b/bazel/android_test.bzl similarity index 60% rename from tests/skia_android_unit_test.bzl rename to bazel/android_test.bzl index 8981a6936fbd..0dd646c9b1e6 100644 --- a/tests/skia_android_unit_test.bzl +++ b/bazel/android_test.bzl @@ -1,22 +1,29 @@ -"""This module defines the skia_android_unit_test macro.""" +"""This module defines the android_test macro.""" load("//bazel:cc_binary_with_flags.bzl", "cc_binary_with_flags") load("//bazel/devices:android_devices.bzl", "ANDROID_DEVICES") -load(":adb_test.bzl", "adb_test") -load(":skia_test_wrapper_with_cmdline_flags.bzl", "skia_test_wrapper_with_cmdline_flags") +load("//bazel:adb_test.bzl", "adb_test") +load("//bazel:binary_wrapper_script_with_cmdline_flags.bzl", "binary_wrapper_script_with_cmdline_flags") -def skia_android_unit_test( +def android_test( name, srcs, + test_runner_if_required_condition_is_satisfied, + test_runner_if_required_condition_is_not_satisfied, deps = [], flags = {}, extra_args = [], requires_condition = "//:always_true", - requires_resources_dir = False): - """Defines a Skia Android unit test. + requires_resources_dir = False, + save_output_files = False): + """Defines an Android test. - This macro compiles one or more C++ unit tests into a single Android binary and produces a - script that runs the test on an attached Android device via `adb`. + Note: This macro is not intended to be used directly in BUILD files. Instead, please use macros + android_unit_test, android_gm_test, etc. + + This macro compiles one or more C++ tests into a single Android binary and produces a script + that runs the test on an attached Android device via `adb`. This macro is compatible with unit, + GM and perf tests. This macro requires a device-specific Android platform such as //bazel/platform:pixel_5. This is used to decide what device-specific set-up steps to apply, such as setting CPU/GPU frequencies. @@ -29,9 +36,14 @@ def skia_android_unit_test( - It produces a .tar.gz archive containing the Android binary, a minimal launcher script that invokes the binary on the device under test with any necessary command-line arguments, - and any static resources needed by the test, such as fonts and images under //resources. + and any static resources needed by the C++ tests, such as fonts and images under //resources. - It produces a test runner script that extracts the tarball into the device via `adb`, sets up the device, runs the test, cleans up and pipes through the test's exit code. + - Optionally, the test runner script can be configured to download from the device any + files produced by the C++ tests (such as PNG and JSON files produced by GM tests). These + files will be available as undeclared test outputs (see documentation for the + TEST_UNDECLARED_OUTPUTS_DIR environment variable at + https://bazel.build/reference/test-encyclopedia#initial-conditions). For CI jobs, rather than invoking "bazel test" on a Raspberry Pi attached to the Android device under test, we compile and run the test in two separate tasks: @@ -49,25 +61,40 @@ def skia_android_unit_test( Args: name: The name of the test. - srcs: A list of C++ source files. This list should not include a main function (see the + srcs: A list of C++ source files. This list should not include a main() function (see the requires_condition argument). - deps: Any dependencies needed by the srcs. This list should not include a main function + test_runner_if_required_condition_is_satisfied: A C++ source file with a main() function to + be appended to the srcs attribute if requires_condition is satisfied. The resulting + program should return exit code 0 if all tests pass, or a non-zero exit code in the + case of failures. See the requires_condition argument. + test_runner_if_required_condition_is_not_satisfied: A C++ source file with a main() + function to be appended to the srcs attribute if requires_condition is *not* satisfied. + The main() function in this source file should do nothing, and the resulting program + should always return exit code 0 to indicate that the test was successful. See the + requires_condition argument. + deps: Any dependencies needed by the srcs. This list should not include a main() function (see the requires_condition argument). flags: A map of strings to lists of strings to specify features that must be compiled in for these tests to work. For example, tests targeting our codec logic will want the various codecs included, but most tests won't need that. extra_args: Additional command-line arguments to pass to the test, for example, any device-specific --skip flags to skip incompatible or buggy test cases. - requires_condition: A necessary condition for the test to work. For example, GPU tests - should set this argument to "//src/gpu:has_gpu_backend". If the condition is satisfied, - //tests:BazelTestRunner.cpp will be appended to the srcs attribute. If the condition is - not satisfied, //tests:BazelNoopRunner.cpp will be included instead, and no deps will - be included. This prevents spurious build failures when using wildcard expressions - (e.g. "bazel build //tests/...") with a configuration that is incompatible with this - test. + requires_condition: A necessary condition for the test to work. For example, Ganesh tests + should set this argument to "//src/gpu:has_ganesh_backend". If the condition is + satisfied, test_runner_if_required_condition_is_satisfied will be appended to the srcs + attribute. + If the condition is not satisfied, test_runner_if_required_condition_is_not_satisfied + will be included as the only source file, and no deps will be included. This prevents + spurious build failures when using wildcard expressions (e.g. + "bazel build //tests/...") with a configuration that is incompatible with this test. requires_resources_dir: If set, the contents of the //resources directory will be included in the tarball that is pushed to the device via `adb push`, and the test binary will be invoked with flag --resourcePath set to the path to said directory. + save_output_files: If true, save any files produced by this test (e.g. PNG and JSON files + in the case of GM tests) as undeclared outputs (see documentation for the + TEST_UNDECLARED_OUTPUTS_DIR environment variable at + https://bazel.build/reference/test-encyclopedia#initial-conditions). + """ test_binary = "%s_binary" % name @@ -75,8 +102,8 @@ def skia_android_unit_test( cc_binary_with_flags( name = test_binary, srcs = select({ - requires_condition: srcs + ["//tests:BazelTestRunner.cpp"], - "//conditions:default": ["//tests:BazelNoopRunner.cpp"], + requires_condition: srcs + [test_runner_if_required_condition_is_satisfied], + "//conditions:default": [test_runner_if_required_condition_is_not_satisfied], }), deps = select({ requires_condition: deps, @@ -88,9 +115,9 @@ def skia_android_unit_test( test_runner = "%s_runner" % name - skia_test_wrapper_with_cmdline_flags( + binary_wrapper_script_with_cmdline_flags( name = test_runner, - test_binary = test_binary, + binary = test_binary, extra_args = extra_args, requires_resources_dir = requires_resources_dir, testonly = True, # Needed to gain access to test-only files. @@ -113,7 +140,7 @@ def skia_android_unit_test( srcs = archive_srcs, outs = ["%s.tar.gz" % name], cmd = """ - $(location //tests/make_adb_test_tarball) \ + $(location //bazel/make_tarball) \ --execpaths "{execpaths}" \ --rootpaths "{rootpaths}" \ --output-file $@ @@ -125,7 +152,7 @@ def skia_android_unit_test( # Tools are always built for the exec platform # (https://bazel.build/reference/be/general#genrule.tools), e.g. Linux on x86_64 when # running on a gLinux workstation or on a Linux GCE machine. - tools = ["//tests/make_adb_test_tarball"], + tools = ["//bazel/make_tarball"], ) adb_test( @@ -140,9 +167,10 @@ def skia_android_unit_test( ("//conditions:default", "unknown"), ], )), + save_output_files = save_output_files, tags = ["no-remote"], # Incompatible with RBE because it requires an Android device. target_compatible_with = select({ - "//bazel/devices:has_android_device": [], + "//bazel/devices:has_android_device": [], # Compatible with everything. "//conditions:default": ["@platforms//:incompatible"], }), ) diff --git a/tests/skia_test_wrapper_with_cmdline_flags.bzl b/bazel/binary_wrapper_script_with_cmdline_flags.bzl similarity index 69% rename from tests/skia_test_wrapper_with_cmdline_flags.bzl rename to bazel/binary_wrapper_script_with_cmdline_flags.bzl index 12666a5cc913..68896837e4aa 100644 --- a/tests/skia_test_wrapper_with_cmdline_flags.bzl +++ b/bazel/binary_wrapper_script_with_cmdline_flags.bzl @@ -1,24 +1,24 @@ -"""This module defines the skia_test_wrapper_with_cmdline_flags rule.""" +"""This module defines the binary_wrapper_script_with_cmdline_flags rule.""" -load("//bazel:remove_indentation.bzl", "remove_indentation") +load(":remove_indentation.bzl", "remove_indentation") # https://bazel.build/rules/lib/builtins/ctx -def _skia_test_wrapper_with_cmdline_flags_impl(ctx): - test_args = ([ +def _binary_wrapper_script_with_cmdline_flags_impl(ctx): + args = ([ "--resourcePath", "$(dirname $(realpath $(rootpath %s)))" % ctx.attr._arbitrary_file_in_resources_dir.label, ] if ctx.attr.requires_resources_dir else []) + ctx.attr.extra_args template = remove_indentation(""" #!/bin/sh - $(rootpath {test_binary}) {test_args} + $(rootpath {binary}) {args} """) template = ctx.expand_location(template.format( - test_binary = ctx.attr.test_binary.label, - test_args = " ".join(test_args), + binary = ctx.attr.binary.label, + args = " ".join(args), ), targets = [ - ctx.attr.test_binary, + ctx.attr.binary, ctx.attr._arbitrary_file_in_resources_dir, ]) @@ -29,22 +29,26 @@ def _skia_test_wrapper_with_cmdline_flags_impl(ctx): runfiles = ctx.runfiles( files = ctx.files._resources_dir if ctx.attr.requires_resources_dir else [], ) - runfiles = runfiles.merge(ctx.attr.test_binary[DefaultInfo].default_runfiles) + runfiles = runfiles.merge(ctx.attr.binary[DefaultInfo].default_runfiles) return [DefaultInfo( executable = output_file, runfiles = runfiles, )] -skia_test_wrapper_with_cmdline_flags = rule( - doc = """Produces a script that invokes a Skia C++ test with a fixed set of command-line flags. +binary_wrapper_script_with_cmdline_flags = rule( + doc = """Produces a script that invokes a C++ binary with a fixed set of command-line flags. + + This rule is intended to wrap C++ unit tests and GMs and therefore has convenience attributes + specific to said binaries, such as requires_resources_dir. The reason why we use a custom rule rather than a genrule is that we wish to select() the extra_args attribute based e.g. on the device under test and various build settings. """, - implementation = _skia_test_wrapper_with_cmdline_flags_impl, + implementation = _binary_wrapper_script_with_cmdline_flags_impl, attrs = { - "test_binary": attr.label( + "binary": attr.label( + doc = "Binary to wrap.", mandatory = True, executable = True, allow_single_file = True, diff --git a/bazel/buildrc b/bazel/buildrc index 9060f9e4579a..317057abc45c 100644 --- a/bazel/buildrc +++ b/bazel/buildrc @@ -82,27 +82,37 @@ build:canvaskit_full --noincompatible_enable_cc_toolchain_resolution \ --ck_enable_canvas_polyfill --ck_enable_skp_serialization --ck_enable_skottie \ --ck_enable_runtime_effect --ck_enable_matrix_js -build:ck_webgl2 --with_gl_standard=webgl_standard --gpu_backend=gl_backend \ +build:ck_webgl2 --with_gl_standard=webgl_standard --gpu_backend=gl_ganesh \ --disable_legacy_shader_context # CPU build needs legacy shader context otherwise SkPerlinNoiseShader does not render build:ck_cpu --enable_sksl --enable_legacy_shader_context +# flags for using the CanvasKit debugger. +build:ck_debugger --enable_build_for_debugger + build:ck_full_webgl2_release --config=canvaskit_full --config=ck_webgl2 --config=release build:ck_full_webgl2_debug --config=canvaskit_full --config=ck_webgl2 --config=debug build:ck_full_cpu_release --config=canvaskit_full --config=ck_cpu --config=release build:ck_full_cpu_debug --config=canvaskit_full --config=ck_cpu --config=debug +build:ck_full_webgl2_debug_debugger --config=canvaskit_full --config=ck_webgl2 \ + --config=debug --config=ck_debugger # TODO(kjlubick) We should be able to configure testing on Chrome or Firefox with this. build:ck_full_webgl2_release_chrome --config=ck_full_webgl2_release build:ck_full_cpu_release_chrome --config=ck_full_cpu_release +# config when building //infra/debugger-app:debugger_container. +# This is invoked in a Louhi flow. +build:debugger_app_container --config=ck_full_webgl2_debug_debugger \ + --workspace_status_command=bazel/get_workspace_status.sh + # We only want to enforce IWYU on debug builds because we have some things that are only # necessary to include in debug mode (e.g. SkDEBUGCODE), but very rarely something that is # only needed in release mode. Thus our C++ debug includes should be a superset of the # release includes. build:enforce_iwyu --features=skia_enforce_iwyu --cc_output_directory_tag=iwyu \ --compilation_mode=dbg --keep_going \ - --with_gl_standard=gl_standard --gpu_backend=gl_backend \ - --gpu_backend=vulkan_backend \ + --with_gl_standard=gl_standard --gpu_backend=gl_ganesh \ + --gpu_backend=vulkan_ganesh \ --enable_gpu_test_utils --force_cpu_tests \ --include_fontmgr=custom_directory_fontmgr --include_fontmgr=custom_embedded_fontmgr \ --include_fontmgr=custom_empty_fontmgr --fontmgr_factory=custom_directory_fontmgr_factory \ @@ -126,19 +136,19 @@ build:cpu_only_release --config=cpu --config=release build:cpu_only_debug_rbe --config=cpu_only_debug --config=use_linux_rbe_pool build:cpu_only_release_rbe --config=cpu_only_release --config=use_linux_rbe_pool -build:gl_ganesh --enable_gpu_test_utils --gpu_backend=gl_backend \ +build:gl_ganesh --enable_gpu_test_utils --gpu_backend=gl_ganesh \ --cc_output_directory_tag=gl_ganesh # We need to have this environment variable set when testing our Ganesh GL backend on Unix, # otherwise, we get "Failed to open X display." and connect make a GL context for testing. build:gl_ganesh --action_env=DISPLAY=:1 -build:vulkan_ganesh --enable_gpu_test_utils --gpu_backend=vulkan_backend \ +build:vulkan_ganesh --enable_gpu_test_utils --gpu_backend=vulkan_ganesh \ --cc_output_directory_tag=vulkan_ganesh -build:dawn_ganesh --enable_gpu_test_utils --gpu_backend=dawn_backend \ +build:dawn_ganesh --enable_gpu_test_utils --gpu_backend=dawn_ganesh \ --cc_output_directory_tag=dawn_ganesh -build:metal_ganesh --enable_gpu_test_utils --gpu_backend=metal_backend \ +build:metal_ganesh --enable_gpu_test_utils --gpu_backend=metal_ganesh\ --cc_output_directory_tag=metal_ganesh # Short-hand aliases diff --git a/bazel/cc_binary_with_flags.bzl b/bazel/cc_binary_with_flags.bzl index ccd33078c4e7..167a8d2ad711 100644 --- a/bazel/cc_binary_with_flags.bzl +++ b/bazel/cc_binary_with_flags.bzl @@ -29,6 +29,7 @@ _bool_flags = [ _string_flags = [ "//bazel/common_config_settings:fontmgr_factory", "//src/gpu:with_gl_standard", + "//gm/vias:via", ] _string_list_flags = [ diff --git a/bazel/cc_test_with_flags.bzl b/bazel/cc_test_with_flags.bzl index ad1200175c0f..dfecf2c27eec 100644 --- a/bazel/cc_test_with_flags.bzl +++ b/bazel/cc_test_with_flags.bzl @@ -58,7 +58,7 @@ transition_test = rule( test = True, ) -def cc_test_with_flags(name, set_flags = {}, copts = DEFAULT_COPTS, linkopts = DEFAULT_LINKOPTS, **kwargs): +def cc_test_with_flags(name, set_flags = {}, copts = DEFAULT_COPTS, linkopts = DEFAULT_LINKOPTS, args = [], **kwargs): """Builds a cc_test as if set_flags were set on the CLI. Args: @@ -70,6 +70,7 @@ def cc_test_with_flags(name, set_flags = {}, copts = DEFAULT_COPTS, linkopts = D It has a sensible list of defaults. linkopts: a list of strings or select statements that control the linker flags. It has a sensible list of defaults. + args: A list of strings with any command-line arguments to pass to the binary. **kwargs: Any flags that a cc_binary normally takes. """ cc_test_name = name + "_native_test" @@ -77,6 +78,7 @@ def cc_test_with_flags(name, set_flags = {}, copts = DEFAULT_COPTS, linkopts = D name = name, actual_test = ":%s" % cc_test_name, set_flags = set_flags, + args = args, testonly = True, ) tags = kwargs.get("tags", []) diff --git a/bazel/common_config_settings/BUILD.bazel b/bazel/common_config_settings/BUILD.bazel index de931a345e41..a0fda3cf4062 100644 --- a/bazel/common_config_settings/BUILD.bazel +++ b/bazel/common_config_settings/BUILD.bazel @@ -228,6 +228,11 @@ bool_flag( default = False, ) +bool_flag( + name = "build_for_debugger", + default = False, +) + # These are some helpers to mean "either the fontmgr was enabled or its factory was" selects.config_setting_group( diff --git a/bazel/deps.bzl b/bazel/deps.bzl index f312455c89c2..285fe272671a 100644 --- a/bazel/deps.bzl +++ b/bazel/deps.bzl @@ -26,7 +26,7 @@ def git_repos_from_deps(ws = "@"): new_git_repository( name = "dawn", build_file = ws + "//bazel/external/dawn:BUILD.bazel", - commit = "0d5e76a2427f1c629a0d709ee0833da43bf79e84", + commit = "beaf20f90f1bf21d235c99d5b49b8bb507b722b2", remote = "https://dawn.googlesource.com/dawn.git", ) @@ -53,14 +53,14 @@ def git_repos_from_deps(ws = "@"): new_git_repository( name = "freetype", build_file = ws + "//bazel/external/freetype:BUILD.bazel", - commit = "d857bd535b6c7e877f262a9b61ed21ee11b35dab", + commit = "5769f13a6b9fafa3840726f06dde07e755501a16", remote = "https://chromium.googlesource.com/chromium/src/third_party/freetype2.git", ) new_git_repository( name = "harfbuzz", build_file = ws + "//bazel/external/harfbuzz:BUILD.bazel", - commit = "09a266236147497bd8149240062c31c16fbc81e3", + commit = "f94508edd60e26a015586c37c29104d6bdc26462", remote = "https://chromium.googlesource.com/external/github.com/harfbuzz/harfbuzz.git", ) @@ -88,7 +88,7 @@ def git_repos_from_deps(ws = "@"): name = "libavif", build_file = ws + "//bazel/external/libavif:BUILD.bazel", commit = "f49462dc93784bf34148715eee36ab6697ca0b35", - remote = "https://github.com/AOMediaCodec/libavif.git", + remote = "https://skia.googlesource.com/external/github.com/AOMediaCodec/libavif.git", ) new_git_repository( @@ -122,7 +122,7 @@ def git_repos_from_deps(ws = "@"): new_git_repository( name = "libwebp", build_file = ws + "//bazel/external/libwebp:BUILD.bazel", - commit = "fd7b5d48464475408d32d2611bdb6947d4246b97", + commit = "fd7bb21c0cb56e8a82e9bfa376164b842f433f3b", remote = "https://chromium.googlesource.com/webm/libwebp.git", ) @@ -150,54 +150,54 @@ def git_repos_from_deps(ws = "@"): new_git_repository( name = "vulkanmemoryallocator", build_file = ws + "//bazel/external/vulkanmemoryallocator:BUILD.bazel", - commit = "7de5cc00de50e71a3aab22dea52fbb7ff4efceb6", + commit = "a6bfc237255a6bac1513f7c1ebde6d8aed6b5191", remote = "https://chromium.googlesource.com/external/github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator", ) new_git_repository( name = "spirv_cross", build_file = ws + "//bazel/external/spirv_cross:BUILD.bazel", - commit = "2d3a152081ca6e6bea7093940d0f81088fe4d01c", + commit = "bccaa94db814af33d8ef05c153e7c34d8bd4d685", remote = "https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Cross", ) git_repository( name = "spirv_headers", - commit = "6e09e44cd88a5297433411b2ee52f4cf9f50fa90", + commit = "124a9665e464ef98b8b718d572d5f329311061eb", remote = "https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Headers.git", ) git_repository( name = "spirv_tools", - commit = "a63ac9f73d29cd27cdb6e3388d98d1d934e512bb", + commit = "4a9881fe9b32086d4ceac89a498b0dd34084b574", remote = "https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools.git", ) new_git_repository( name = "vello", build_file = ws + "//bazel/external/vello:BUILD.bazel", - commit = "ef2630ad9c647b90863cb0915701d54725733968", + commit = "443539891c4c1eb3ca4ed891d251cbf4097c9a9c", remote = "https://skia.googlesource.com/external/github.com/linebender/vello.git", ) new_git_repository( name = "vulkan_headers", build_file = ws + "//bazel/external/vulkan_headers:BUILD.bazel", - commit = "c1a8560c5cf5e7bd6dbc71fe69b1a317411c36b8", + commit = "450ead13e1064584da027d91192bd7bfb724640f", remote = "https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Headers", ) new_git_repository( name = "vulkan_tools", build_file = ws + "//bazel/external/vulkan_tools:BUILD.bazel", - commit = "ca8bb4ee3cc9afdeca4b49c5ef758bad7cce2c72", + commit = "1d8188a974ccd08caffb5bd7fec58751e0c7d786", remote = "https://chromium.googlesource.com/external/github.com/KhronosGroup/Vulkan-Tools", ) new_git_repository( name = "wuffs", build_file = ws + "//bazel/external/wuffs:BUILD.bazel", - commit = "a0041ac0310b3156b963e2f2bea09245f25ec073", + commit = "e3f919ccfe3ef542cfc983a82146070258fb57f8", remote = "https://skia.googlesource.com/external/github.com/google/wuffs-mirror-release-c.git", ) diff --git a/bazel/exporter/gni_exporter.go b/bazel/exporter/gni_exporter.go index 21edf9d49142..4d0eae8cb077 100644 --- a/bazel/exporter/gni_exporter.go +++ b/bazel/exporter/gni_exporter.go @@ -80,8 +80,6 @@ skia_core_sources += skia_skpicture_sources skia_core_public += skia_pathops_public skia_core_public += skia_skpicture_public -# TODO(kjlubick) Move this into Chromium's BUILD.gn file. -skia_core_public += skia_discardable_memory_chromium ` // The footer written to gn/sksl_tests.gni. @@ -92,14 +90,14 @@ const skslTestsFooter = `sksl_glsl_tests_sources = sksl_glsl_settings_tests_sources = sksl_blend_tests + sksl_settings_tests sksl_metal_tests_sources = - sksl_metal_tests + sksl_blend_tests + sksl_shared_tests + sksl_blend_tests + sksl_compute_tests + sksl_metal_tests + sksl_shared_tests sksl_hlsl_tests_sources = sksl_blend_tests + sksl_shared_tests -sksl_wgsl_tests_sources = sksl_blend_tests + sksl_wgsl_tests +sksl_wgsl_tests_sources = sksl_blend_tests + sksl_shared_tests + sksl_wgsl_tests sksl_spirv_tests_sources = - sksl_blend_tests + sksl_shared_tests + sksl_spirv_tests + sksl_blend_tests + sksl_compute_tests + sksl_shared_tests + sksl_spirv_tests sksl_skrp_tests_sources = sksl_folding_tests + sksl_rte_tests + sksl_shared_tests diff --git a/bazel/exporter_tool/main.go b/bazel/exporter_tool/main.go index 73dd7619f989..e8520e5b587b 100644 --- a/bazel/exporter_tool/main.go +++ b/bazel/exporter_tool/main.go @@ -31,9 +31,15 @@ var gniExportDescs = []exporter.GNIExportDesc{ "//src/codec:decode_bmp_srcs", }, }, + {Var: "skia_codec_xmp", + Rules: []string{ + "//src/codec:xmp_srcs", + }, + }, {Var: "skia_codec_jpeg_xmp", Rules: []string{ - "//src/codec:jpeg_xmp", + "//src/codec:jpeg_xmp_hdrs", + "//src/codec:jpeg_xmp_srcs", }, }, }}, @@ -58,8 +64,6 @@ var gniExportDescs = []exporter.GNIExportDesc{ "//src/core:core_skslc_srcs", "//src/core:core_srcs", "//src/core:legacy_draw_looper", - "//src/core:sksl_hdrs", - "//src/core:sksl_srcs", "//src/image:core_hdrs", "//src/image:core_srcs", "//src/lazy:lazy_hdrs", @@ -67,11 +71,16 @@ var gniExportDescs = []exporter.GNIExportDesc{ "//src/opts:private_hdrs", "//src/shaders:shader_hdrs", "//src/shaders:shader_srcs", - "//src/shaders:sksl_hdrs", - "//src/shaders:sksl_srcs", "//src/text:text_hdrs", "//src/text:text_srcs", }}, + {Var: "skia_needs_sksl_sources", + Rules: []string{ + "//src/core:sksl_hdrs", + "//src/core:sksl_srcs", + "//src/shaders:sksl_hdrs", + "//src/shaders:sksl_srcs", + }}, {Var: "skia_pathops_public", Rules: []string{"//include/pathops:public_hdrs"}}, {Var: "skia_pathops_sources", @@ -118,6 +127,8 @@ var gniExportDescs = []exporter.GNIExportDesc{ Rules: []string{"//src/encode:no_webp_encode_srcs"}}, {Var: "skia_discardable_memory_chromium", Rules: []string{"//include/private/chromium:discardable_memory_hdrs"}}, + {Var: "skia_no_slug_srcs", + Rules: []string{"//src/text:no_slug_srcs"}}, }, }, {GNI: "gn/effects.gni", Vars: []exporter.GNIFileListExportDesc{ @@ -175,13 +186,10 @@ var gniExportDescs = []exporter.GNIExportDesc{ Rules: []string{ "//include/private:sksl_private_hdrs", "//include/sksl:public_hdrs", - "//src/sksl:core_hdrs", - "//src/sksl:core_srcs", "//src/sksl/analysis:analysis_hdrs", "//src/sksl/analysis:analysis_srcs", "//src/sksl/codegen:core_srcs", "//src/sksl/codegen:private_hdrs", - "//src/sksl/dsl:srcs", "//src/sksl/ir:ir_hdrs", "//src/sksl/ir:ir_srcs", "//src/sksl/tracing:private_hdrs", @@ -189,6 +197,8 @@ var gniExportDescs = []exporter.GNIExportDesc{ "//src/sksl/tracing:srcs", "//src/sksl/transform:transform_hdrs", "//src/sksl/transform:transform_srcs", + "//src/sksl:core_hdrs", + "//src/sksl:core_srcs", }}, {Var: "skia_sksl_tracing_sources", Rules: []string{ @@ -220,6 +230,7 @@ var gniExportDescs = []exporter.GNIExportDesc{ {Var: "sksl_spirv_tests", Rules: []string{"//resources/sksl:sksl_spirv_tests"}}, {Var: "sksl_wgsl_tests", Rules: []string{"//resources/sksl:sksl_wgsl_tests"}}, {Var: "sksl_shared_tests", Rules: []string{"//resources/sksl:sksl_shared_tests"}}, + {Var: "sksl_compute_tests", Rules: []string{"//resources/sksl:sksl_compute_tests"}}, {Var: "sksl_folding_tests", Rules: []string{"//resources/sksl:sksl_folding_tests"}}, {Var: "sksl_inliner_tests", Rules: []string{"//resources/sksl:sksl_inliner_tests"}}, {Var: "sksl_blend_tests", Rules: []string{"//resources/sksl:sksl_blend_tests"}}, @@ -249,7 +260,13 @@ var gniExportDescs = []exporter.GNIExportDesc{ "//src/utils/mac:core_srcs", "//src/utils/win:core_hdrs", "//src/utils/win:core_srcs", - }}}, + }}, + {Var: "skia_utils_gpu", + Rules: []string{ + "//src/utils:gpu_hdrs", + "//src/utils:gpu_srcs", + }}, + }, }, {GNI: "gn/xps.gni", Vars: []exporter.GNIFileListExportDesc{ {Var: "skia_xps_public", @@ -278,6 +295,7 @@ var gniExportDescs = []exporter.GNIExportDesc{ {Var: "skia_ganesh_private", Rules: []string{ "//include/private/gpu/ganesh:private_hdrs", + "//include/private/gpu/ganesh:gl_private_hdrs", "//src/gpu/ganesh/effects:effects_hdrs", "//src/gpu/ganesh/effects:effects_srcs", "//src/gpu/ganesh/geometry:geometry_hdrs", @@ -307,11 +325,12 @@ var gniExportDescs = []exporter.GNIExportDesc{ }}, {Var: "skia_gpu_chromium_public", Rules: []string{ - "//include/private/chromium:gpu_private_hdrs", + "//include/private/chromium:ganesh_private_hdrs", }}, {Var: "skia_gpu_gl_public", Rules: []string{ "//include/gpu/gl:public_hdrs", + "//include/gpu/ganesh/gl:public_hdrs", }}, {Var: "skia_gpu_gl_private", Rules: []string{ @@ -335,11 +354,10 @@ var gniExportDescs = []exporter.GNIExportDesc{ }}, {Var: "skia_gpu_vk_chromium_public", Rules: []string{ - "//include/private/chromium:vk_chromium_hdrs", + "//include/private/chromium:vk_ganesh_hdrs", }}, {Var: "skia_gpu_vk_private", Rules: []string{ - "//include/gpu/vk:public_hdrs", "//include/private/gpu/ganesh:vk_private_hdrs", "//src/gpu/ganesh/vk:vk_hdrs", "//src/gpu/ganesh/vk:vk_srcs", @@ -483,6 +501,8 @@ var gniExportDescs = []exporter.GNIExportDesc{ Rules: []string{"//modules/skunicode/src:builtin_srcs"}}, {Var: "skia_unicode_runtime_icu_sources", Rules: []string{"//modules/skunicode/src:runtime_srcs"}}, + {Var: "skia_unicode_libgrapheme_sources", + Rules: []string{"//modules/skunicode/src:libgrapheme_srcs"}}, {Var: "skia_unicode_tests", Rules: []string{"//modules/skunicode/tests:tests"}}, }}, diff --git a/bazel/external/cxx/BUILD.bazel.skia b/bazel/external/cxx/BUILD.bazel.skia index 860ffa47cc89..6858f6cb309e 100644 --- a/bazel/external/cxx/BUILD.bazel.skia +++ b/bazel/external/cxx/BUILD.bazel.skia @@ -16,8 +16,23 @@ rust_library( deps = [":core-lib"], ) +config_setting( + name = "linux_x64", + constraint_values = [ + "@platforms//cpu:x86_64", + "@platforms//os:linux", + ], +) + cc_library( name = "core-lib", - srcs = ["src/cxx.cc"], + srcs = [ + "src/cxx.cc", + ] + select( + { + ":linux_x64": ["@clang_linux_amd64//:link_libs"], + "//conditions:default": [], + }, + ), hdrs = ["include/cxx.h"], ) diff --git a/bazel/external/dawn/BUILD.bazel b/bazel/external/dawn/BUILD.bazel index c317d422dd61..0d9423cbb4cc 100644 --- a/bazel/external/dawn/BUILD.bazel +++ b/bazel/external/dawn/BUILD.bazel @@ -31,6 +31,7 @@ genrule( name = "generate_webgpu_cpp", srcs = [ "generator/templates/api_cpp.h", + "generator/templates/api_cpp_chained_struct.h", "generator/templates/api_cpp_print.h", "generator/templates/BSD_LICENSE", "dawn.json", @@ -38,6 +39,7 @@ genrule( ], outs = [ "include/dawn/webgpu_cpp.h", + "include/dawn/webgpu_cpp_chained_struct.h", "include/dawn/webgpu_cpp_print.h", ], cmd = "$(location :dawn_json_generator) " + @@ -248,9 +250,10 @@ DAWN_HDRS = [ DAWN_SRCS = [ # Generated files + "include/dawn/dawn_proc_table.h", "include/dawn/webgpu.h", "include/dawn/webgpu_cpp.h", - "include/dawn/dawn_proc_table.h", + "include/dawn/webgpu_cpp_chained_struct.h", # From dawn/src/dawn/native/BUILD.gn:sources "src/dawn/native/DawnNative.cpp", "src/dawn/native/Adapter.cpp", @@ -272,8 +275,12 @@ DAWN_SRCS = [ "src/dawn/native/BindingInfo.h", "src/dawn/native/BlitBufferToDepthStencil.cpp", "src/dawn/native/BlitBufferToDepthStencil.h", + "src/dawn/native/BlitColorToColorWithDraw.cpp", + "src/dawn/native/BlitColorToColorWithDraw.h", "src/dawn/native/BlitDepthToDepth.cpp", "src/dawn/native/BlitDepthToDepth.h", + "src/dawn/native/BlitTextureToBuffer.cpp", + "src/dawn/native/BlitTextureToBuffer.h", "src/dawn/native/Blob.cpp", "src/dawn/native/Blob.h", "src/dawn/native/BlobCache.cpp", @@ -293,6 +300,7 @@ DAWN_SRCS = [ "src/dawn/native/CachedObject.h", "src/dawn/native/CallbackTaskManager.cpp", "src/dawn/native/CallbackTaskManager.h", + "src/dawn/native/ChainUtils.h", "src/dawn/native/CommandAllocator.cpp", "src/dawn/native/CommandAllocator.h", "src/dawn/native/CommandBuffer.cpp", @@ -457,6 +465,7 @@ DAWN_SRCS = [ "src/dawn/common/ConcurrentCache.h", "src/dawn/common/Constants.h", "src/dawn/common/CoreFoundationRef.h", + "src/dawn/common/ContentLessObjectCache.h", "src/dawn/common/DynamicLib.cpp", "src/dawn/common/DynamicLib.h", "src/dawn/common/GPUInfo.cpp", @@ -479,6 +488,7 @@ DAWN_SRCS = [ "src/dawn/common/RefBase.h", "src/dawn/common/RefCounted.cpp", "src/dawn/common/RefCounted.h", + "src/dawn/common/Ref.h", "src/dawn/common/Result.cpp", "src/dawn/common/Result.h", "src/dawn/common/SerialMap.h", @@ -637,6 +647,7 @@ cc_library( "include/dawn/webgpu.h", "include/dawn/EnumClassBitmasks.h", "include/dawn/webgpu_cpp.h", + "include/dawn/webgpu_cpp_chained_struct.h", "src/dawn/webgpu_cpp.cpp", ], includes = [ @@ -815,6 +826,8 @@ TINT_SRCS = [ "src/tint/ast/transform/expand_compound_assignment.h", "src/tint/ast/transform/first_index_offset.cc", "src/tint/ast/transform/first_index_offset.h", + "src/tint/ast/transform/fold_trivial_lets.cc", + "src/tint/ast/transform/fold_trivial_lets.h", "src/tint/ast/transform/for_loop_to_loop.cc", "src/tint/ast/transform/for_loop_to_loop.h", "src/tint/ast/transform/localize_struct_array_assignment.cc", @@ -926,6 +939,7 @@ TINT_SRCS = [ "src/tint/ast/if_statement.h", "src/tint/ast/increment_decrement_statement.h", "src/tint/ast/index_accessor_expression.h", + "src/tint/ast/index_attribute.h", "src/tint/ast/int_literal_expression.h", "src/tint/ast/internal_attribute.h", "src/tint/ast/interpolate_attribute.h", @@ -1005,6 +1019,7 @@ TINT_SRCS = [ "src/tint/ast/if_statement.cc", "src/tint/ast/increment_decrement_statement.cc", "src/tint/ast/index_accessor_expression.cc", + "src/tint/ast/index_attribute.cc", "src/tint/ast/int_literal_expression.cc", "src/tint/ast/internal_attribute.cc", "src/tint/ast/interpolate_attribute.cc", @@ -1073,6 +1088,8 @@ TINT_SRCS = [ "src/tint/builtin/texel_format.h", # From dawn/src/tint/BUILD.gn:libtint_sem_src + "src/tint/sem/accessor_expression.cc", + "src/tint/sem/accessor_expression.h", "src/tint/sem/array_count.cc", "src/tint/sem/array_count.h", "src/tint/sem/behavior.cc", @@ -1235,6 +1252,8 @@ TINT_SRCS = [ "src/tint/writer/append_vector.h", "src/tint/writer/array_length_from_uniform_options.cc", "src/tint/writer/array_length_from_uniform_options.h", + "src/tint/writer/ast_text_generator.cc", + "src/tint/writer/ast_text_generator.h", "src/tint/writer/binding_point.h", "src/tint/writer/binding_remapper_options.cc", "src/tint/writer/binding_remapper_options.h", diff --git a/bazel/external/harfbuzz/BUILD.bazel b/bazel/external/harfbuzz/BUILD.bazel index 7963c2ee1f50..0c2b7a20758a 100644 --- a/bazel/external/harfbuzz/BUILD.bazel +++ b/bazel/external/harfbuzz/BUILD.bazel @@ -321,12 +321,12 @@ HARFBUZZ_SRCS = [ "src/hb-subset-cff-common.cc", "src/hb-subset-cff-common.hh", "src/hb-subset-cff1.cc", - "src/hb-subset-cff1.hh", "src/hb-subset-cff2.cc", - "src/hb-subset-cff2.hh", "src/hb-subset-input.cc", "src/hb-subset-input.hh", "src/hb-subset-instancer-solver.cc", + "src/hb-subset-instancer-solver.hh", + "src/hb-subset-plan-member-list.hh", "src/hb-subset-plan.cc", "src/hb-subset-plan.hh", "src/hb-subset-repacker.cc", diff --git a/bazel/gcs_mirror.bzl b/bazel/gcs_mirror.bzl new file mode 100644 index 000000000000..61f684bde256 --- /dev/null +++ b/bazel/gcs_mirror.bzl @@ -0,0 +1,39 @@ +"""This module provides the gcs_mirror_url macro.""" + +# Set to True to force the macro to only return the mirror URL. +_TEST_GCS_MIRROR = False + +# Must be kept in sync with the suffixes supported by gcs_mirror (e.g. +# https://skia.googlesource.com/skia/+/8ad66c2340713234df6b249e793415233337a103/bazel/gcs_mirror/gcs_mirror.go#140). +_SUPPORTED_SUFFIXES = [".tar.gz", ".tgz", ".tar.xz", ".deb", ".zip"] + +_GCS_MIRROR_PREFIX = "https://storage.googleapis.com/skia-world-readable/bazel" + +def gcs_mirror_url(url, sha256, ext = None): + """Takes the URL of an external resource and computes its GCS mirror URL. + + We store backup copies of external resources in the skia-world-readable GCS bucket. This macro + returns a list with two elements: the original URL, and the mirrored URL. + + To mirror a new URL, please use the `gcs_mirror` utility found at + https://skia.googlesource.com/skia/+/8ad66c2340713234df6b249e793415233337a103/bazel/gcs_mirror/gcs_mirror.go. + + Args: + url: URL of the mirrored resource. + sha256: SHA256 hash of the mirrored resource. + ext: string matching the extension, if not provided, it will be gleaned from the URL. + The auto-detected suffix must match a list. An arbitrarily provided one does not. + Returns: + A list of the form [original URL, mirror URL]. + """ + extension = "" + if ext == None: + for suffix in _SUPPORTED_SUFFIXES: + if url.endswith(suffix): + extension = suffix + break + if extension == "": + fail("URL %s has an unsupported suffix." % url) + + mirror_url = "%s/%s%s" % (_GCS_MIRROR_PREFIX, sha256, extension) + return [mirror_url] if _TEST_GCS_MIRROR else [mirror_url, url] diff --git a/bazel/get_workspace_status.sh b/bazel/get_workspace_status.sh new file mode 100755 index 000000000000..588407260032 --- /dev/null +++ b/bazel/get_workspace_status.sh @@ -0,0 +1,52 @@ +#!/bin/bash -e +# Copyright 2023 Google LLC +# +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# +# This script is intended to be passed to Bazel using the --workspace_status_command command-line +# flag. It defines various key/value pairs, such as the Git hash or clean/dirty status, which can be +# used from BUILD files, e.g. to tag Docker images. +# +# See https://bazel.build/docs/user-manual#flag--workspace_status_command. + +# Default values used if we are outside of a Git checkout, e.g. when building inside a tryjob. +STABLE_GIT_REVISION=unversioned +STABLE_GIT_STATUS=unversioned + +# If we are inside a Git checkout, then obtain the Git revision and the clean/dirty status. +if git status > /dev/null 2> /dev/null; then + STABLE_GIT_REVISION=`git rev-parse HEAD` + + # Check whether there are any uncommitted changes. + # + # Based on: + # https://skia.googlesource.com/buildbot/+/cdbd6dc7cd9e06604042bb53a6179a77b4c83c25/bash/docker_build.sh#53 + STABLE_GIT_STATUS=clean + # Detect if we have unchecked in local changes, or if we're not on the main branch (possibly at + # an older revision). + git fetch > /dev/null + # diff-index requires update-index --refresh; see: + # https://stackoverflow.com/questions/36367190/git-diff-files-output-changes-after-git-status/36439778#36439778 + if git update-index --refresh > /dev/null ; then + if ! git diff-index --quiet HEAD -- ; then + # Repository is dirty due to modified files. + STABLE_GIT_STATUS=dirty + elif ! git merge-base --is-ancestor HEAD origin/main ; then + # Repository is dirty because we're not on the main branch (possibly an older revision). + STABLE_GIT_STATUS=dirty + fi + else + # Repository is dirty due to checked out files. + STABLE_GIT_STATUS=dirty + fi +fi + +BUILD_DATETIME=`date -u +%Y-%m-%dT%H_%M_%SZ` + +echo "BUILD_DATETIME $BUILD_DATETIME" +echo "STABLE_GIT_REVISION $STABLE_GIT_REVISION" +echo "STABLE_GIT_STATUS $STABLE_GIT_STATUS" + +# If the format of this ever changes then please also update k8s_checker/main.go. +echo "STABLE_DOCKER_TAG ${BUILD_DATETIME}-${USER}-${STABLE_GIT_REVISION:0:7}-${STABLE_GIT_STATUS}" diff --git a/bazel/make_tarball/BUILD.bazel b/bazel/make_tarball/BUILD.bazel new file mode 100644 index 000000000000..91f03b7c98f8 --- /dev/null +++ b/bazel/make_tarball/BUILD.bazel @@ -0,0 +1,19 @@ +load("//bazel:skia_rules.bzl", "exports_files_legacy") +load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") + +licenses(["notice"]) + +exports_files_legacy() + +go_library( + name = "make_tarball_lib", + srcs = ["make_tarball.go"], + importpath = "go.skia.org/skia/bazel/make_tarball", + visibility = ["//visibility:private"], +) + +go_binary( + name = "make_tarball", + embed = [":make_tarball_lib"], + visibility = ["//visibility:public"], +) diff --git a/tests/make_adb_test_tarball/make_adb_test_tarball.go b/bazel/make_tarball/make_tarball.go similarity index 92% rename from tests/make_adb_test_tarball/make_adb_test_tarball.go rename to bazel/make_tarball/make_tarball.go index e87e2f9569b5..2a0236899844 100644 --- a/tests/make_adb_test_tarball/make_adb_test_tarball.go +++ b/bazel/make_tarball/make_tarball.go @@ -2,12 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// This program is used to create a tarball containing a precompiled Android test. This tarball -// can be passed to the adb_test rule to run the test on an Android device via adb. +// This program can be used to create a tarball from Bazel-built artifacts given their execpaths +// and rootpaths. // // Design notes: Currently, building Go with Bazel on Mac can be slow. The problem is compounded // by the fact that we roll the Skia Infra repo into Skia via a go.mod update, which busts Bazel's -// repository cache and causes Bazel to re-download a larg number of Go modules. To mitigate +// repository cache and causes Bazel to re-download a large number of Go modules. To mitigate // slowness on Mac, this program does not use any external dependencies. This by itself does not // necessarily make the build faster on Macs, but it unblocks the following potential optimization. // We could build this binary using a separate, minimalistic go.mod file that does not include the diff --git a/bazel/skia_app_container.bzl b/bazel/skia_app_container.bzl new file mode 100644 index 000000000000..59c35168bc79 --- /dev/null +++ b/bazel/skia_app_container.bzl @@ -0,0 +1,210 @@ +"""This module defines the skia_app_container macro.""" + +load("@io_bazel_rules_docker//container:container.bzl", "container_image", "container_push") +load("@io_bazel_rules_docker//docker/util:run.bzl", "container_run_and_commit") +load("@rules_pkg//:pkg.bzl", "pkg_tar") + +def skia_app_container( + name, + repository, + dirs, + entrypoint = "", + run_commands_root = None, + run_commands_skia = None, + base_image = "@basealpine//image", + env = None, + default_user = "skia"): + """Builds a Docker container for a Skia app, and generates a target to push it to GCR. + + This macro produces the following: + * "" target to build the Docker container with skia as default user. + * "_run_root" target to execute run commands as root on the image. + root will be the default user here. Will be created only + if run_commands_root is specified. + * "_run_skia" target to execute run commands as the "skia" user on the image. + Will be created only if run_commands_skia is specified. + * "push_" target to push the container to GCR. + + Example: + + ``` + # //myapp/BUILD.bazel + + load("//bazel:skia_app_container.bzl", "skia_app_container") + + skia_app_container( + name = "myapp", + dirs = { + "/usr/local/bin/myapp": [ + ["//myapp/go:mybinary", 755"], + ], + "/usr/local/share/myapp": [ + ["//myapp/config:config.cfg", "644"], + ["//myapp/data:data.json", "644"], + ], + }, + entrypoint = "/usr/local/bin/myapp/mybinary", + repository = "skia-public/myapp", + ) + ``` + + The above example will produce a Docker container based on gcr.io/skia-public/basealpine with + the following contents: + + - /usr/local/bin/myapp/mybinary (mode: 755) + - /usr/local/share/myapp/config.cfg (mode: 644) + - /usr/local/share/myapp/data.json (mode: 644) + + To build the container and load it into Docker: + + ``` + $ bazel run //myapp:myapp + ... + Loaded image ID: sha256:c0decafe + Tagging c0decafe as bazel/myapp:myapp + ``` + + To debug the container locally: + + ``` + $ docker run bazel/myapp:myapp + $ docker run -it --entrypoint /bin/sh bazel/myapp:myapp + ``` + + To push the container to GCR: + + ``` + $ bazel run //myapp:push_myapp + ... + Successfully pushed Docker image to gcr.io/skia-public/myapp:... + ``` + + Args: + name: Name of the rule. + repository: Name of the repository under gcr.io. + dirs: Contents of the container, expressed as a dictionary where the keys are directory names + within the container (e.g. "/usr/local/share/myapp"), and the values are an array of + [Bazel label, mode] tuples indicating which files should be copied into the directory (e.g. + ["//myapp/go:mybinary", "755"]). + entrypoint: The entrypoint of the container, which can be a string or an array (e.g. + "/usr/local/share/myapp/mybinary", or ["/usr/local/share/myapp/mybinary", "--someflag"]). + Optional. + run_commands_root: The RUN commands that should be executed on the container by the root + user. Optional. + run_commands_skia: The RUN commands that should be executed on the container by the skia + user. Optional. + base_image: The image to base the container_image on. Optional. + env: A {"var": "val"} dictionary with the environment variables to use when building the + container. Optional. + default_user: The user the container will be run with. Defaults to "skia" but some apps + like skfe requires the default user to be "root". + """ + + # According to the container_image rule's docs[1], the recommended way to place files in + # specific directories is via the pkg_tar rule. + # + # The below loop creates one pkg_tar rule for each file in the container. + # + # [1] https://github.com/bazelbuild/rules_docker/blob/454981e65fa100d37b19210ee85fedb2f7af9626/README.md#container_image + pkg_tars = [] + i = 0 + for dir in dirs: + for file, mode in dirs[dir]: + pkg_tar_name = name + "_pkg_tar_" + str(i) + i += 1 + pkg_tars.append(pkg_tar_name) + + pkg_tar( + name = pkg_tar_name, + srcs = [file], + package_dir = dir, + mode = mode, + tags = ["manual"], # Exclude it from wildcard queries, e.g. "bazel build //...". + ) + + image_name = (name + "_base") if (run_commands_root or run_commands_skia) else name + + container_image( + name = image_name, + base = base_image, + + # We cannot use an entrypoint with the container_run_and_commit rule + # required when run_commands_root or run_commands_skia is specified, + # because the commands we want to execute do not require a specific + # entrypoint. + # We will set the entrypoint back after the container_run_and_commit + # rule is executed. + entrypoint = None if (run_commands_root or run_commands_skia) else [entrypoint], + tars = pkg_tars, + user = default_user, + tags = ["manual"], # Exclude it from wildcard queries, e.g. "bazel build //...". + env = env, + ) + + if run_commands_root: + rule_name = name + "_run_root" + container_run_and_commit( + name = rule_name, + commands = run_commands_root, + docker_run_flags = ["--user", "root"], + image = image_name + ".tar", + tags = [ + "manual", # Exclude it from wildcard queries, e.g. "bazel build //...". + # container_run_and_commit requires the docker daemon to be + # running. This is not possible inside RBE. + "no-remote", + ], + ) + image_name = ":" + rule_name + "_commit.tar" + + if run_commands_skia: + rule_name = name + "_run_skia" + container_run_and_commit( + name = rule_name, + commands = run_commands_skia, + docker_run_flags = ["--user", "skia"], + # If run_commands_root was specified then the image_name already contains + # ".tar" suffix. Make sure we do not add a double ".tar" suffix here. + image = image_name if image_name.endswith(".tar") else image_name + ".tar", + tags = [ + "manual", # Exclude it from wildcard queries, e.g. "bazel build //...". + # container_run_and_commit requires the docker daemon to be + # running. This is not possible inside RBE. + "no-remote", + ], + ) + image_name = ":" + rule_name + "_commit.tar" + + if run_commands_root or run_commands_skia: + # If run_commands_root was specified then it's container_run_and_commit + # sets root as the default user and overrides the entrypoint. + # If run_commands_skia was specified then it overrides the entrypoint. + # + # Now execute container_image using the previous image as base to set + # back skia as the default user and to set back the original entrypoint. + rule_name = name + container_image( + name = rule_name, + base = image_name, + entrypoint = [entrypoint], + user = default_user, + tags = ["manual"], # Exclude it from wildcard queries, e.g. "bazel build //...". + env = env, + ) + image_name = ":" + rule_name + + container_push( + name = "push_" + name, + format = "Docker", + image = image_name, + registry = "gcr.io", + repository = repository, + stamp = "@io_bazel_rules_docker//stamp:always", + tag = "{STABLE_DOCKER_TAG}", + tags = [ + "manual", # Exclude it from wildcard queries, e.g. "bazel build //...". + # container_push requires the docker daemon to be + # running. This is not possible inside RBE. + "no-remote", + ], + ) diff --git a/bench/BlurRectBench.cpp b/bench/BlurRectBench.cpp index 317ea3bcad4b..afd70d58ca1e 100644 --- a/bench/BlurRectBench.cpp +++ b/bench/BlurRectBench.cpp @@ -90,12 +90,12 @@ class BlurRectDirectBench: public BlurRectBench { } protected: void makeBlurryRect(const SkRect& r) override { - SkMask mask; + SkMaskBuilder mask; if (!SkBlurMask::BlurRect(SkBlurMask::ConvertRadiusToSigma(this->radius()), &mask, r, kNormal_SkBlurStyle)) { return; } - SkMask::FreeImage(mask.fImage); + SkMaskBuilder::FreeImage(mask.image()); } private: using INHERITED = BlurRectBench; @@ -107,22 +107,22 @@ class BlurRectSeparableBench: public BlurRectBench { BlurRectSeparableBench(SkScalar rad) : INHERITED(rad) { } ~BlurRectSeparableBench() override { - SkMask::FreeImage(fSrcMask.fImage); + SkMaskBuilder::FreeImage(fSrcMask.image()); } protected: void preBenchSetup(const SkRect& r) override { - SkMask::FreeImage(fSrcMask.fImage); + SkMaskBuilder::FreeImage(fSrcMask.image()); - r.roundOut(&fSrcMask.fBounds); - fSrcMask.fFormat = SkMask::kA8_Format; - fSrcMask.fRowBytes = fSrcMask.fBounds.width(); - fSrcMask.fImage = SkMask::AllocImage(fSrcMask.computeTotalImageSize()); + r.roundOut(&fSrcMask.bounds()); + fSrcMask.format() = SkMask::kA8_Format; + fSrcMask.rowBytes() = fSrcMask.fBounds.width(); + fSrcMask.image() = SkMaskBuilder::AllocImage(fSrcMask.computeTotalImageSize()); - memset(fSrcMask.fImage, 0xff, fSrcMask.computeTotalImageSize()); + memset(fSrcMask.image(), 0xff, fSrcMask.computeTotalImageSize()); } - SkMask fSrcMask; + SkMaskBuilder fSrcMask; private: using INHERITED = BlurRectBench; }; @@ -144,12 +144,12 @@ class BlurRectBoxFilterBench: public BlurRectSeparableBench { protected: void makeBlurryRect(const SkRect&) override { - SkMask mask; + SkMaskBuilder mask; if (!SkBlurMask::BoxBlur(&mask, fSrcMask, SkBlurMask::ConvertRadiusToSigma(this->radius()), kNormal_SkBlurStyle)) { return; } - SkMask::FreeImage(mask.fImage); + SkMaskBuilder::FreeImage(mask.image()); } private: using INHERITED = BlurRectSeparableBench; @@ -172,12 +172,12 @@ class BlurRectGaussianBench: public BlurRectSeparableBench { protected: void makeBlurryRect(const SkRect&) override { - SkMask mask; + SkMaskBuilder mask; if (!SkBlurMask::BlurGroundTruth(SkBlurMask::ConvertRadiusToSigma(this->radius()), &mask, fSrcMask, kNormal_SkBlurStyle)) { return; } - SkMask::FreeImage(mask.fImage); + SkMaskBuilder::FreeImage(mask.image()); } private: using INHERITED = BlurRectSeparableBench; diff --git a/bench/CoverageBench.cpp b/bench/CoverageBench.cpp index 034b11edb74f..45ad86c0ea22 100644 --- a/bench/CoverageBench.cpp +++ b/bench/CoverageBench.cpp @@ -13,7 +13,6 @@ #include "include/core/SkPath.h" #include "src/core/SkAutoPixmapStorage.h" #include "src/core/SkDraw.h" -#include "src/core/SkMatrixProvider.h" #include "src/core/SkRasterClip.h" class DrawPathBench : public Benchmark { @@ -22,12 +21,10 @@ class DrawPathBench : public Benchmark { SkPath fPath; SkRasterClip fRC; SkAutoPixmapStorage fPixmap; - SkMatrixProvider fIdentityMatrixProvider; SkDraw fDraw; bool fDrawCoverage; public: - DrawPathBench(bool drawCoverage) - : fIdentityMatrixProvider(SkMatrix::I()), fDrawCoverage(drawCoverage) { + DrawPathBench(bool drawCoverage) : fDrawCoverage(drawCoverage) { fPaint.setAntiAlias(true); fName.printf("draw_coverage_%s", drawCoverage ? "true" : "false"); @@ -44,9 +41,9 @@ class DrawPathBench : public Benchmark { fRC.setRect(fPath.getBounds().round()); - fDraw.fDst = fPixmap; - fDraw.fMatrixProvider = &fIdentityMatrixProvider; - fDraw.fRC = &fRC; + fDraw.fDst = fPixmap; + fDraw.fCTM = &SkMatrix::I(); + fDraw.fRC = &fRC; } protected: diff --git a/bench/DecodeBench.cpp b/bench/DecodeBench.cpp index 442f2ce49358..2f113e34f815 100644 --- a/bench/DecodeBench.cpp +++ b/bench/DecodeBench.cpp @@ -7,6 +7,7 @@ #include "bench/Benchmark.h" #include "include/core/SkBitmap.h" +#include "include/core/SkPicture.h" #include "include/core/SkPictureRecorder.h" #include "modules/skottie/include/Skottie.h" #include "tools/Resources.h" diff --git a/bench/GlyphQuadFillBench.cpp b/bench/GlyphQuadFillBench.cpp index 26e98bf9859c..643bc0febff8 100644 --- a/bench/GlyphQuadFillBench.cpp +++ b/bench/GlyphQuadFillBench.cpp @@ -17,6 +17,7 @@ #include "src/core/SkStrikeCache.h" #include "src/gpu/ganesh/GrRecordingContextPriv.h" #include "src/gpu/ganesh/SkGr.h" +#include "src/text/GlyphRun.h" #include "src/text/gpu/StrikeCache.h" #include "src/text/gpu/TextBlob.h" #include "src/utils/SkTestCanvas.h" diff --git a/bench/GrMipmapBench.cpp b/bench/GrMipmapBench.cpp index 419a2f36a642..1996268ecf3b 100644 --- a/bench/GrMipmapBench.cpp +++ b/bench/GrMipmapBench.cpp @@ -45,10 +45,10 @@ class GrMipMapBench: public Benchmark { fSurface = SkSurfaces::RenderTarget(context, skgpu::Budgeted::kNo, info, - 0, + /* sampleCount= */ 0, kBottomLeft_GrSurfaceOrigin, - nullptr, - true); + /* surfaceProps= */ nullptr, + /* shouldCreateWithMips= */ true); } // Clear surface once: diff --git a/bench/ImageFilterCollapse.cpp b/bench/ImageFilterCollapse.cpp index ff0d8639f764..8b9537203787 100644 --- a/bench/ImageFilterCollapse.cpp +++ b/bench/ImageFilterCollapse.cpp @@ -8,6 +8,7 @@ #include "bench/Benchmark.h" #include "include/core/SkBitmap.h" #include "include/core/SkCanvas.h" +#include "include/core/SkColorFilter.h" #include "include/core/SkImageFilter.h" #include "include/core/SkSurface.h" #include "include/effects/SkGradientShader.h" diff --git a/bench/PictureOverheadBench.cpp b/bench/PictureOverheadBench.cpp index daacf5e65f3d..b4dbb1f346cd 100644 --- a/bench/PictureOverheadBench.cpp +++ b/bench/PictureOverheadBench.cpp @@ -7,6 +7,7 @@ #include "bench/Benchmark.h" #include "include/core/SkCanvas.h" +#include "include/core/SkPicture.h" #include "include/core/SkPictureRecorder.h" #include "include/core/SkRRect.h" diff --git a/bench/PicturePlaybackBench.cpp b/bench/PicturePlaybackBench.cpp index f697017eed3f..0527d5adc239 100644 --- a/bench/PicturePlaybackBench.cpp +++ b/bench/PicturePlaybackBench.cpp @@ -7,6 +7,7 @@ #include #include "bench/Benchmark.h" +#include "include/core/SkBBHFactory.h" #include "include/core/SkCanvas.h" #include "include/core/SkColor.h" #include "include/core/SkPaint.h" diff --git a/bench/ShaderMaskFilterBench.cpp b/bench/ShaderMaskFilterBench.cpp index 208c2412953a..9f3f81ad02b8 100644 --- a/bench/ShaderMaskFilterBench.cpp +++ b/bench/ShaderMaskFilterBench.cpp @@ -6,11 +6,13 @@ */ #include "bench/Benchmark.h" +#include "include/core/SkBBHFactory.h" #include "include/core/SkCanvas.h" #include "include/core/SkMaskFilter.h" #include "include/core/SkPaint.h" #include "include/core/SkPictureRecorder.h" #include "include/core/SkSurface.h" +#include "include/core/SkTileMode.h" #include "include/effects/SkShaderMaskFilter.h" #include "src/shaders/SkPictureShader.h" diff --git a/bench/SkSLBench.cpp b/bench/SkSLBench.cpp index 285925f026a3..67b7a99171fd 100644 --- a/bench/SkSLBench.cpp +++ b/bench/SkSLBench.cpp @@ -18,7 +18,6 @@ #include "src/sksl/SkSLParser.h" #include "src/sksl/codegen/SkSLRasterPipelineBuilder.h" #include "src/sksl/codegen/SkSLRasterPipelineCodeGenerator.h" -#include "src/sksl/codegen/SkSLVMCodeGenerator.h" #include "src/sksl/ir/SkSLFunctionDeclaration.h" #include "src/sksl/ir/SkSLProgram.h" @@ -61,14 +60,7 @@ enum class Output { kGLSL, kMetal, kSPIRV, -#if defined(SK_ENABLE_SKSL_IN_RASTER_PIPELINE) kSkRP, -#endif -#if defined(SK_ENABLE_SKVM) - kSkVM, // raw SkVM bytecode - kSkVMOpt, // optimized SkVM bytecode - kSkVMJIT, // optimized native assembly code -#endif }; class SkSLCompileBench : public Benchmark { @@ -79,14 +71,7 @@ class SkSLCompileBench : public Benchmark { case Output::kGLSL: return "glsl_"; case Output::kMetal: return "metal_"; case Output::kSPIRV: return "spirv_"; -#if defined(SK_ENABLE_SKSL_IN_RASTER_PIPELINE) case Output::kSkRP: return "skrp_"; -#endif -#if defined(SK_ENABLE_SKVM) - case Output::kSkVM: return "skvm_"; - case Output::kSkVMOpt: return "skvm_opt_"; - case Output::kSkVMJIT: return "skvm_jit_"; -#endif } SkUNREACHABLE; } @@ -153,34 +138,11 @@ class SkSLCompileBench : public Benchmark { case Output::kGLSL: SkAssertResult(fCompiler.toGLSL(*program, &result)); break; case Output::kMetal: SkAssertResult(fCompiler.toMetal(*program, &result)); break; case Output::kSPIRV: SkAssertResult(fCompiler.toSPIRV(*program, &result)); break; -#if defined(SK_ENABLE_SKSL_IN_RASTER_PIPELINE) case Output::kSkRP: SkAssertResult(CompileToSkRP(*program)); break; -#endif -#if defined(SK_ENABLE_SKVM) - case Output::kSkVM: - case Output::kSkVMOpt: - case Output::kSkVMJIT: SkAssertResult(CompileToSkVM(*program, fOutput)); break; -#endif } } } -#if defined(SK_ENABLE_SKVM) - static bool CompileToSkVM(const SkSL::Program& program, Output mode) { - const bool optimize = (mode >= Output::kSkVMOpt); - const bool allowJIT = (mode >= Output::kSkVMJIT); - skvm::Builder builder{skvm::Features{}}; - if (!SkSL::testingOnly_ProgramToSkVMShader(program, &builder, /*debugTrace=*/nullptr)) { - return false; - } - if (optimize) { - builder.done("SkSLBench", allowJIT); - } - return true; - } -#endif - -#ifdef SK_ENABLE_SKSL_IN_RASTER_PIPELINE static bool CompileToSkRP(const SkSL::Program& program) { const SkSL::FunctionDeclaration* main = program.getFunction("main"); if (!main) { @@ -210,7 +172,6 @@ class SkSLCompileBench : public Benchmark { /*uniforms=*/SkSpan{uniformBuffer, rasterProg->numUniforms()}); return true; } -#endif // SK_ENABLE_SKSL_IN_RASTER_PIPELINE private: std::string fName; @@ -225,22 +186,6 @@ class SkSLCompileBench : public Benchmark { /////////////////////////////////////////////////////////////////////////////// -#if defined(SK_ENABLE_SKSL_IN_RASTER_PIPELINE) - #define COMPILER_BENCH_SKRP(name, text) \ - DEF_BENCH(return new SkSLCompileBench(#name, name##_SRC, /*optimize=*/true, Output::kSkRP);) -#else - #define COMPILER_BENCH_SKRP(name, text) /* SkRP is disabled; no benchmarking */ -#endif - -#if defined(SK_ENABLE_SKVM) - #define COMPILER_BENCH_SKVM(name, text) \ - DEF_BENCH(return new SkSLCompileBench(#name, name##_SRC, /*optimize=*/true, Output::kSkVM);) \ - DEF_BENCH(return new SkSLCompileBench(#name, name##_SRC, /*optimize=*/true, Output::kSkVMOpt);) \ - DEF_BENCH(return new SkSLCompileBench(#name, name##_SRC, /*optimize=*/true, Output::kSkVMJIT);) -#else - #define COMPILER_BENCH_SKVM(name, text) /* SkVM is disabled; no benchmarking */ -#endif - #define COMPILER_BENCH(name, text) \ static constexpr char name ## _SRC[] = text; \ DEF_BENCH(return new SkSLCompileBench(#name, name##_SRC, /*optimize=*/false, Output::kNone);) \ @@ -248,9 +193,7 @@ class SkSLCompileBench : public Benchmark { DEF_BENCH(return new SkSLCompileBench(#name, name##_SRC, /*optimize=*/true, Output::kGLSL);) \ DEF_BENCH(return new SkSLCompileBench(#name, name##_SRC, /*optimize=*/true, Output::kMetal);) \ DEF_BENCH(return new SkSLCompileBench(#name, name##_SRC, /*optimize=*/true, Output::kSPIRV);) \ - COMPILER_BENCH_SKRP(name, text) \ - COMPILER_BENCH_SKVM(name, text) - + DEF_BENCH(return new SkSLCompileBench(#name, name##_SRC, /*optimize=*/true, Output::kSkRP);) // This fragment shader is from the third tile on the top row of GM_gradients_2pt_conical_outside. // To get an ES2 compatible shader, nonconstantArrayIndexSupport in GrShaderCaps is forced off. diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp index d793b15c47ee..a48ede692d5b 100644 --- a/bench/nanobench.cpp +++ b/bench/nanobench.cpp @@ -25,6 +25,7 @@ #include "include/codec/SkCodec.h" #include "include/codec/SkJpegDecoder.h" #include "include/codec/SkPngDecoder.h" +#include "include/core/SkBBHFactory.h" #include "include/core/SkCanvas.h" #include "include/core/SkData.h" #include "include/core/SkGraphics.h" @@ -906,6 +907,13 @@ class BenchmarkStream { while (fGMs) { std::unique_ptr gm = fGMs->get()(); + if (gm->isBazelOnly()) { + // We skip Bazel-only GMs because they might not be regular GMs. The Bazel build + // reuses the notion of GMs to replace the notion of DM sources of various kinds, + // such as codec sources and image generation sources. See comments in the + // skiagm::GM::isBazelOnly function declaration for context. + continue; + } fGMs = fGMs->next(); if (gm->runAsBench()) { fSourceType = "gm"; @@ -1333,7 +1341,7 @@ int main(int argc, char** argv) { cd_Documents(); #endif SetupCrashHandler(); - SkAutoGraphics ag; + SkGraphics::Init(); // Our benchmarks only currently decode .png or .jpg files SkCodecs::Register(SkPngDecoder::Decoder()); diff --git a/bench/nanobench.h b/bench/nanobench.h index d1f94bcce203..090de66c5346 100644 --- a/bench/nanobench.h +++ b/bench/nanobench.h @@ -13,7 +13,9 @@ #include "include/core/SkSurface.h" #include "include/core/SkTypes.h" #include "tools/gpu/GrContextFactory.h" +#if defined(SK_GRAPHITE) #include "tools/graphite/ContextFactory.h" +#endif class SkBitmap; class SkCanvas; diff --git a/client_utils/android/BitmapRegionDecoder.cpp b/client_utils/android/BitmapRegionDecoder.cpp index e19850805104..ee244a17c913 100644 --- a/client_utils/android/BitmapRegionDecoder.cpp +++ b/client_utils/android/BitmapRegionDecoder.cpp @@ -79,10 +79,6 @@ bool BitmapRegionDecoder::decodeRegion(SkBitmap* bitmap, BRDAllocator* allocator } SkISize scaledSize = fCodec->getSampledSubsetDimensions(sampleSize, subset); - if (fCodec->getInfo().colorType() == kGray_8_SkColorType) { - dstColorType = kGray_8_SkColorType; - } - // Create the image info for the decode SkAlphaType dstAlphaType = fCodec->computeOutputAlphaType(requireUnpremul); SkImageInfo decodeInfo = diff --git a/client_utils/android/FrontBufferedStream.cpp b/client_utils/android/FrontBufferedStream.cpp index d3d9d3d31d98..2351c3ab3216 100644 --- a/client_utils/android/FrontBufferedStream.cpp +++ b/client_utils/android/FrontBufferedStream.cpp @@ -83,8 +83,7 @@ std::unique_ptr FrontBufferedStream::Make(std::unique_ptrgetTag().c_str()); return nullptr; } - if (gpuConfig->getTestThreading()) { - SkASSERT(!gpuConfig->getTestPersistentCache()); - return new GPUThreadTestingSink(gpuConfig, grCtxOptions); - } else if (gpuConfig->getTestPersistentCache()) { + if (gpuConfig->getTestPersistentCache()) { return new GPUPersistentCacheTestingSink(gpuConfig, grCtxOptions); } else if (gpuConfig->getTestPrecompile()) { return new GPUPrecompileTestingSink(gpuConfig, grCtxOptions); @@ -1232,10 +1227,7 @@ struct Task { hashAndEncode = std::make_unique(bitmap); hashAndEncode->feedHash(&hash); } - SkMD5::Digest digest = hash.finish(); - for (int i = 0; i < 16; i++) { - md5.appendf("%02x", digest.data[i]); - } + md5 = hash.finish().toLowercaseHexString(); } if (!FLAGS_readPath.isEmpty() && @@ -1607,7 +1599,6 @@ int main(int argc, char** argv) { gSkForceRasterPipelineBlitter = FLAGS_forceRasterPipelineHP || FLAGS_forceRasterPipeline; gForceHighPrecisionRasterPipeline = FLAGS_forceRasterPipelineHP; - gSkBlobAsSlugTesting = FLAGS_blobAsSlugTesting; gCreateProtectedContext = FLAGS_createProtected; // The bots like having a verbose.log to upload, so always touch the file even if --verbose. @@ -1624,7 +1615,7 @@ int main(int argc, char** argv) { dump_json(); // It's handy for the bots to assume this is ~never missing. - SkAutoGraphics ag; + SkGraphics::Init(); #if defined(SK_ENABLE_SVG) SkGraphics::SetOpenTypeSVGDecoderFactory(SkSVGOpenTypeSVGDecoder::Make); #endif diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp index cb0aff716e86..a94d776e9e17 100644 --- a/dm/DMSrcSink.cpp +++ b/dm/DMSrcSink.cpp @@ -87,6 +87,7 @@ #if defined(SK_GRAPHITE) #include "include/gpu/graphite/Context.h" +#include "include/gpu/graphite/ContextOptions.h" #include "include/gpu/graphite/Recorder.h" #include "include/gpu/graphite/Recording.h" #include "include/gpu/graphite/Surface.h" @@ -120,6 +121,11 @@ GMSrc::GMSrc(skiagm::GMFactory factory) : fFactory(factory) {} Result GMSrc::draw(SkCanvas* canvas) const { std::unique_ptr gm(fFactory()); + if (gm->isBazelOnly()) { + // We skip Bazel-only GMs because they might overlap with existing DM functionality. See + // comments in the skiagm::GM::isBazelOnly function declaration for context. + return Result(Result::Status::Skip, SkString("Bazel-only GM")); + } SkString msg; skiagm::DrawResult gpuSetupResult = gm->gpuSetup(canvas, &msg); @@ -157,6 +163,13 @@ void GMSrc::modifyGrContextOptions(GrContextOptions* options) const { gm->modifyGrContextOptions(options); } +#if defined(SK_GRAPHITE) +void GMSrc::modifyGraphiteContextOptions(skgpu::graphite::ContextOptions* options) const { + std::unique_ptr gm(fFactory()); + gm->modifyGraphiteContextOptions(options); +} +#endif + std::unique_ptr GMSrc::getVerifiers() const { std::unique_ptr gm(fFactory()); return gm->getVerifiers(); @@ -1648,41 +1661,6 @@ Result GPURemoteSlugSink::draw( } /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ -GPUThreadTestingSink::GPUThreadTestingSink(const SkCommandLineConfigGpu* config, - const GrContextOptions& grCtxOptions) - : INHERITED(config, grCtxOptions) - , fExecutor(SkExecutor::MakeFIFOThreadPool(FLAGS_gpuThreads)) { - SkASSERT(fExecutor); -} - -Result GPUThreadTestingSink::draw(const Src& src, SkBitmap* dst, SkWStream* wStream, - SkString* log) const { - // Draw twice, once with worker threads, and once without. Verify that we get the same result. - // Also, force us to only use the software path renderer, so we really stress-test the threaded - // version of that code. - GrContextOptions contextOptions = this->baseContextOptions(); - contextOptions.fGpuPathRenderers = GpuPathRenderers::kNone; - contextOptions.fExecutor = fExecutor.get(); - - Result result = this->onDraw(src, dst, wStream, log, contextOptions); - if (!result.isOk() || !dst) { - return result; - } - - SkBitmap reference; - SkString refLog; - SkDynamicMemoryWStream refStream; - contextOptions.fExecutor = nullptr; - Result refResult = this->onDraw(src, &reference, &refStream, &refLog, contextOptions); - if (!refResult.isOk()) { - return refResult; - } - - return compare_bitmaps(reference, *dst); -} - -/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ - GPUPersistentCacheTestingSink::GPUPersistentCacheTestingSink(const SkCommandLineConfigGpu* config, const GrContextOptions& grCtxOptions) : INHERITED(config, grCtxOptions) @@ -2112,9 +2090,13 @@ Result GraphiteSink::draw(const Src& src, SkBitmap* dst, SkWStream* dstStream, SkString* log) const { + skgpu::graphite::ContextOptions options; + + src.modifyGraphiteContextOptions(&options); + SkImageInfo ii = SkImageInfo::Make(src.size(), this->colorInfo()); - skiatest::graphite::ContextFactory factory; + skiatest::graphite::ContextFactory factory(options); auto [_, context] = factory.getContextInfo(fContextType); if (!context) { return Result::Fatal("Could not create a context."); diff --git a/dm/DMSrcSink.h b/dm/DMSrcSink.h index ec53672fafe7..85ab7c711d99 100644 --- a/dm/DMSrcSink.h +++ b/dm/DMSrcSink.h @@ -22,11 +22,13 @@ //#define TEST_VIA_SVG -namespace skiagm { -namespace verifiers { +namespace skiagm::verifiers { class VerifierList; -} // namespace verifiers -} // namespace skiagm +} + +namespace skgpu::graphite { +struct Options; +} namespace DM { @@ -92,14 +94,15 @@ struct SinkFlags { struct Src { virtual ~Src() {} - virtual Result SK_WARN_UNUSED_RESULT draw(SkCanvas* canvas) const = 0; + [[nodiscard]] virtual Result draw(SkCanvas* canvas) const = 0; virtual SkISize size() const = 0; virtual Name name() const = 0; - virtual void modifyGrContextOptions(GrContextOptions* options) const {} + virtual void modifyGrContextOptions(GrContextOptions*) const {} + virtual void modifyGraphiteContextOptions(skgpu::graphite::ContextOptions*) const {} virtual bool veto(SinkFlags) const { return false; } virtual int pageCount() const { return 1; } - virtual Result SK_WARN_UNUSED_RESULT draw([[maybe_unused]] int page, SkCanvas* canvas) const { + [[nodiscard]] virtual Result draw([[maybe_unused]] int page, SkCanvas* canvas) const { return this->draw(canvas); } virtual SkISize size([[maybe_unused]] int page) const { return this->size(); } @@ -115,8 +118,7 @@ struct Src { struct Sink { virtual ~Sink() {} // You may write to either the bitmap or stream. If you write to log, we'll print that out. - virtual Result SK_WARN_UNUSED_RESULT draw(const Src&, SkBitmap*, SkWStream*, SkString* log) - const = 0; + [[nodiscard]] virtual Result draw(const Src&, SkBitmap*, SkWStream*, SkString* log) const = 0; // Override the color space of this Sink, after creation virtual void setColorSpace(sk_sp) {} @@ -143,6 +145,9 @@ class GMSrc : public Src { SkISize size() const override; Name name() const override; void modifyGrContextOptions(GrContextOptions* options) const override; +#if defined(SK_GRAPHITE) + void modifyGraphiteContextOptions(skgpu::graphite::ContextOptions*) const override; +#endif std::unique_ptr getVerifiers() const override; @@ -433,23 +438,6 @@ class GPURemoteSlugSink : public GPUSink { Result draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; }; -class GPUThreadTestingSink : public GPUSink { -public: - GPUThreadTestingSink(const SkCommandLineConfigGpu*, const GrContextOptions&); - - Result draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override; - - const char* fileExtension() const override { - // Suppress writing out results from this config - we just want to do our matching test - return nullptr; - } - -private: - std::unique_ptr fExecutor; - - using INHERITED = GPUSink; -}; - class GPUPersistentCacheTestingSink : public GPUSink { public: GPUPersistentCacheTestingSink(const SkCommandLineConfigGpu*, const GrContextOptions&); diff --git a/docs/examples/Bitmap_extractAlpha.cpp b/docs/examples/Bitmap_extractAlpha.cpp index cfa14f510875..7fa2bbf1e42b 100644 --- a/docs/examples/Bitmap_extractAlpha.cpp +++ b/docs/examples/Bitmap_extractAlpha.cpp @@ -14,7 +14,6 @@ void draw(SkCanvas* canvas) { paint.setStyle(SkPaint::kStroke_Style); paint.setStrokeWidth(20); offscreen.drawCircle(50, 50, 39, paint); - offscreen.flush(); bitmap.extractAlpha(&alpha); paint.setColor(SK_ColorRED); canvas->drawImage(bitmap.asImage(), 0, 0, SkSamplingOptions(), &paint); diff --git a/docs/examples/Bitmap_extractAlpha_2.cpp b/docs/examples/Bitmap_extractAlpha_2.cpp index 06aa4081a467..b7e0fc4be3da 100644 --- a/docs/examples/Bitmap_extractAlpha_2.cpp +++ b/docs/examples/Bitmap_extractAlpha_2.cpp @@ -18,7 +18,6 @@ void draw(SkCanvas* canvas) { paint.setStyle(SkPaint::kStroke_Style); paint.setStrokeWidth(20); offscreen.drawCircle(50, 50, 39, paint); - offscreen.flush(); paint.setMaskFilter(SkMaskFilter::MakeBlur(kNormal_SkBlurStyle, radiusToSigma(25))); SkIPoint offset; bitmap.extractAlpha(&alpha, &paint, &offset); diff --git a/docs/examples/Bitmap_extractAlpha_3.cpp b/docs/examples/Bitmap_extractAlpha_3.cpp index 461abc8c550c..329305e6a1d9 100644 --- a/docs/examples/Bitmap_extractAlpha_3.cpp +++ b/docs/examples/Bitmap_extractAlpha_3.cpp @@ -14,7 +14,6 @@ void draw(SkCanvas* canvas) { paint.setStyle(SkPaint::kStroke_Style); paint.setStrokeWidth(20); offscreen.drawCircle(50, 50, 39, paint); - offscreen.flush(); paint.setMaskFilter(SkMaskFilter::MakeBlur(kOuter_SkBlurStyle, 3)); SkIPoint offset; bitmap.extractAlpha(&alpha, &paint, nullptr, &offset); diff --git a/docs/examples/Canvas_MakeRasterDirect.cpp b/docs/examples/Canvas_MakeRasterDirect.cpp index c72b61c50cd2..8db85570004c 100644 --- a/docs/examples/Canvas_MakeRasterDirect.cpp +++ b/docs/examples/Canvas_MakeRasterDirect.cpp @@ -3,26 +3,24 @@ #include "tools/fiddle/examples.h" // HASH=525285073aae7e53eb8f454a398f880c REG_FIDDLE(Canvas_MakeRasterDirect, 256, 256, true, 0) { -void draw(SkCanvas* ) { +void draw(SkCanvas*) { SkImageInfo info = SkImageInfo::MakeN32Premul(3, 3); // device aligned, 32 bpp, Premultiplied const size_t minRowBytes = info.minRowBytes(); // bytes used by one bitmap row const size_t size = info.computeMinByteSize(); // bytes used by all rows - AutoTMalloc storage(size); // allocate storage for pixels - SkPMColor* pixels = storage.get(); // get pointer to allocated storage + SkPMColor* pixels = new SkPMColor[size]; // allocate storage for pixels // create a SkCanvas backed by a raster device, and delete it when the // function goes out of scope. std::unique_ptr canvas = SkCanvas::MakeRasterDirect(info, pixels, minRowBytes); canvas->clear(SK_ColorWHITE); // white is Unpremultiplied, in ARGB order - canvas->flush(); // ensure that pixels are cleared SkPMColor pmWhite = pixels[0]; // the Premultiplied format may vary SkPaint paint; // by default, draws black canvas->drawPoint(1, 1, paint); // draw in the center - canvas->flush(); // ensure that point was drawn for (int y = 0; y < info.height(); ++y) { for (int x = 0; x < info.width(); ++x) { SkDebugf("%c", *pixels++ == pmWhite ? '-' : 'x'); } SkDebugf("\n"); } + delete[] pixels; } } // END FIDDLE diff --git a/docs/examples/Canvas_MakeRasterDirectN32.cpp b/docs/examples/Canvas_MakeRasterDirectN32.cpp index 702323652418..3f534e057ac0 100644 --- a/docs/examples/Canvas_MakeRasterDirectN32.cpp +++ b/docs/examples/Canvas_MakeRasterDirectN32.cpp @@ -19,7 +19,6 @@ void draw(SkCanvas* ) { SkPMColor pmWhite = pixels[0][0]; // the Premultiplied format may vary SkPaint paint; // by default, draws black canvas->drawPoint(1, 1, paint); // draw in the center - canvas->flush(); // ensure that pixels is ready to be read for (int y = 0; y < height; ++y) { for (int x = 0; x < width; ++x) { SkDebugf("%c", pixels[y][x] == pmWhite ? '-' : 'x'); diff --git a/docs/examples/ImageInfo_computeByteSize.cpp b/docs/examples/ImageInfo_computeByteSize.cpp deleted file mode 100644 index 1144891bec0c..000000000000 --- a/docs/examples/ImageInfo_computeByteSize.cpp +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2019 Google LLC. -// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. -#include "tools/fiddle/examples.h" -// HASH=9def507d2295f7051effd0c83bb04436 -REG_FIDDLE(ImageInfo_computeByteSize, 256, 130, false, 0) { -void draw(SkCanvas* canvas) { - SkImageInfo info = SkImageInfo::MakeN32Premul(2, 2); - const size_t size = info.computeByteSize(100000); - AutoTMalloc storage(size); - SkPMColor* pixels = storage.get(); - SkBitmap bitmap; - bitmap.setInfo(info); - bitmap.setPixels(pixels); - bitmap.eraseColor(SK_ColorRED); - canvas->scale(50, 50); - canvas->rotate(8); - canvas->drawImage(bitmap.asImage(), 2, 0); -} -} // END FIDDLE diff --git a/docs/examples/ImageInfo_computeMinByteSize.cpp b/docs/examples/ImageInfo_computeMinByteSize.cpp deleted file mode 100644 index 8f927b454b90..000000000000 --- a/docs/examples/ImageInfo_computeMinByteSize.cpp +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2019 Google LLC. -// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. -#include "tools/fiddle/examples.h" -// HASH=fc18640fdde437cb35338aed7c68d399 -REG_FIDDLE(ImageInfo_computeMinByteSize, 256, 130, false, 0) { -void draw(SkCanvas* canvas) { - SkImageInfo info = SkImageInfo::MakeN32Premul(2, 2); - const size_t size = info.computeMinByteSize(); - AutoTMalloc storage(size); - SkPMColor* pixels = storage.get(); - SkBitmap bitmap; - bitmap.setInfo(info); - bitmap.setPixels(pixels); - bitmap.eraseColor(SK_ColorRED); - canvas->scale(50, 50); - canvas->rotate(8); - canvas->drawImage(bitmap.asImage(), 2, 0); -} -} // END FIDDLE diff --git a/docs/examples/Octopus_Generator.cpp b/docs/examples/Octopus_Generator.cpp index 7091925a3b32..0be7981d0e69 100644 --- a/docs/examples/Octopus_Generator.cpp +++ b/docs/examples/Octopus_Generator.cpp @@ -2,9 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. #include "tools/fiddle/examples.h" +REG_FIDDLE(Octopus_Generator, 256, 256, false, 0) { #include -REG_FIDDLE(Octopus_Generator, 256, 256, false, 0) { void paintOctopus(int x, int y, int size_base, SkColor color, SkCanvas* canvas) { SkPaint paint; paint.setAntiAlias(true); diff --git a/docs/examples/Octopus_Generator_Animated.cpp b/docs/examples/Octopus_Generator_Animated.cpp index 8db2dcce7206..ec8d48b7dee0 100644 --- a/docs/examples/Octopus_Generator_Animated.cpp +++ b/docs/examples/Octopus_Generator_Animated.cpp @@ -2,9 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. #include "tools/fiddle/examples.h" +REG_FIDDLE_ANIMATED(Octopus_Generator_Animated, 256, 256, false, 0, 4) { #include -REG_FIDDLE_ANIMATED(Octopus_Generator_Animated, 256, 256, false, 0, 4) { void paintOctopus(float x, float y, int size_base, SkColor color, SkCanvas* canvas) { SkPaint paint; paint.setAntiAlias(true); diff --git a/docs/examples/RRect_height.cpp b/docs/examples/RRect_height.cpp index 960faac4a051..11d24df8f4a2 100644 --- a/docs/examples/RRect_height.cpp +++ b/docs/examples/RRect_height.cpp @@ -1,6 +1,7 @@ // Copyright 2019 Google LLC. // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. #include "tools/fiddle/examples.h" +#include // HASH=5a3eb1755164a7becec33cec6e6eca31 REG_FIDDLE(RRect_height, 256, 256, true, 0) { void draw(SkCanvas* canvas) { diff --git a/docs/examples/RRect_width.cpp b/docs/examples/RRect_width.cpp index bbbb54a0f40b..90594c8b8578 100644 --- a/docs/examples/RRect_width.cpp +++ b/docs/examples/RRect_width.cpp @@ -1,6 +1,7 @@ // Copyright 2019 Google LLC. // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. #include "tools/fiddle/examples.h" +#include // HASH=c675a480b41dee157f84fa2550a2a53c REG_FIDDLE(RRect_width, 256, 256, true, 0) { void draw(SkCanvas* canvas) { diff --git a/docs/examples/Surface_MakeRaster.cpp b/docs/examples/Surface_MakeRaster.cpp index 490ae213404b..780510ebf467 100644 --- a/docs/examples/Surface_MakeRaster.cpp +++ b/docs/examples/Surface_MakeRaster.cpp @@ -15,7 +15,6 @@ void draw(SkCanvas* ) { SkPMColor pmWhite = colorPtr[0]; SkPaint paint; canvas->drawPoint(1, 1, paint); - canvas->flush(); // ensure that point was drawn for (int y = 0; y < info.height(); ++y) { for (int x = 0; x < info.width(); ++x) { SkDebugf("%c", colorPtr[x] == pmWhite ? '-' : 'x'); diff --git a/docs/examples/Surface_MakeRasterDirect.cpp b/docs/examples/Surface_MakeRasterDirect.cpp index 92d176cd0953..4365586eaaa7 100644 --- a/docs/examples/Surface_MakeRasterDirect.cpp +++ b/docs/examples/Surface_MakeRasterDirect.cpp @@ -3,23 +3,22 @@ #include "tools/fiddle/examples.h" // HASH=3f5aeb870104187643197354a7f1d27a REG_FIDDLE(Surface_MakeRasterDirect, 256, 256, true, 0) { -void draw(SkCanvas* ) { +void draw(SkCanvas*) { SkImageInfo info = SkImageInfo::MakeN32Premul(3, 3); const size_t size = info.computeMinByteSize(); - AutoTMalloc storage(size); - SkPMColor* pixels = storage.get(); + SkPMColor* pixels = new SkPMColor[size]; sk_sp surface(SkSurfaces::WrapPixels(info, pixels, info.minRowBytes())); SkCanvas* canvas = surface->getCanvas(); canvas->clear(SK_ColorWHITE); SkPMColor pmWhite = pixels[0]; SkPaint paint; canvas->drawPoint(1, 1, paint); - canvas->flush(); // ensure that point was drawn for (int y = 0; y < info.height(); ++y) { for (int x = 0; x < info.width(); ++x) { SkDebugf("%c", *pixels++ == pmWhite ? '-' : 'x'); } SkDebugf("\n"); } + delete[] pixels; } } // END FIDDLE diff --git a/docs/examples/Surface_MakeRasterDirectReleaseProc.cpp b/docs/examples/Surface_MakeRasterDirectReleaseProc.cpp index 902da0238d01..d90051454735 100644 --- a/docs/examples/Surface_MakeRasterDirectReleaseProc.cpp +++ b/docs/examples/Surface_MakeRasterDirectReleaseProc.cpp @@ -22,7 +22,6 @@ REG_FIDDLE(Surface_WrapPixels_WithReleaseProc, 256, 256, true, 0) { SkPMColor pmWhite = colorPtr[0]; SkPaint paint; canvas->drawPoint(1, 1, paint); - canvas->flush(); // ensure that point was drawn for (int y = 0; y < info.height(); ++y) { for (int x = 0; x < info.width(); ++x) { SkDebugf("%c", *colorPtr++ == pmWhite ? '-' : 'x'); diff --git a/docs/examples/Surface_MakeRasterN32Premul.cpp b/docs/examples/Surface_MakeRasterN32Premul.cpp index 92f950cbe6fe..79849f83aae6 100644 --- a/docs/examples/Surface_MakeRasterN32Premul.cpp +++ b/docs/examples/Surface_MakeRasterN32Premul.cpp @@ -13,7 +13,6 @@ void draw(SkCanvas* ) { SkPMColor pmWhite = colorPtr[0]; SkPaint paint; canvas->drawPoint(1, 1, paint); - canvas->flush(); // ensure that point was drawn for (int y = 0; y < surface->height(); ++y) { for (int x = 0; x < surface->width(); ++x) { SkDebugf("%c", colorPtr[x] == pmWhite ? '-' : 'x'); diff --git a/docs/examples/Surface_MakeRaster_2.cpp b/docs/examples/Surface_MakeRaster_2.cpp index 50080b3baf6a..1f027871d84b 100644 --- a/docs/examples/Surface_MakeRaster_2.cpp +++ b/docs/examples/Surface_MakeRaster_2.cpp @@ -14,7 +14,6 @@ void draw(SkCanvas* ) { SkPMColor pmWhite = colorPtr[0]; SkPaint paint; canvas->drawPoint(1, 1, paint); - canvas->flush(); // ensure that point was drawn for (int y = 0; y < info.height(); ++y) { for (int x = 0; x < info.width(); ++x) { SkDebugf("%c", colorPtr[x] == pmWhite ? '-' : 'x'); diff --git a/docs/examples/Surface_characterize.cpp b/docs/examples/Surface_characterize.cpp deleted file mode 100644 index 5ec8e5dfaf9f..000000000000 --- a/docs/examples/Surface_characterize.cpp +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2019 Google LLC. -// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. -#include "tools/fiddle/examples.h" -// HASH=6de6f3ef699a72ff26da1b26b23a3316 -REG_FIDDLE(Surface_characterize, 256, 64, false, 0) { -void draw(SkCanvas* canvas) { - SkFont font(nullptr, 32); - SkPaint paint; - auto context = canvas->recordingContext(); - if (!context) { - canvas->drawString("GPU only!", 20, 40, font, paint); - return; - } - sk_sp gpuSurface = SkSurfaces::RenderTarget( - context, skgpu::Budgeted::kYes, SkImageInfo::MakeN32Premul(64, 64)); - GrSurfaceCharacterization characterization; - if (!gpuSurface->characterize(&characterization)) { - canvas->drawString("characterization unsupported", 20, 40, font, paint); - return; - } - // start of threadable work - GrDeferredDisplayListRecorder recorder(characterization); - SkCanvas* subCanvas = recorder.getCanvas(); - subCanvas->clear(SK_ColorGREEN); - sk_sp displayList = recorder.detach(); - // end of threadable work - skgpu::ganesh::DrawDDL(gpuSurface, displayList); - sk_sp img = gpuSurface->makeImageSnapshot(); - canvas->drawImage(std::move(img), 0, 0); -} -} // END FIDDLE diff --git a/docs/examples/no_gpu_blur.cpp b/docs/examples/no_gpu_blur.cpp index 21aa6bceefc1..99dec9b6b7d6 100644 --- a/docs/examples/no_gpu_blur.cpp +++ b/docs/examples/no_gpu_blur.cpp @@ -13,7 +13,6 @@ void draw(SkCanvas* canvas) { paint.setStyle(SkPaint::kStroke_Style); paint.setStrokeWidth(20); offscreen.drawCircle(50, 50, 39, paint); - offscreen.flush(); paint.setMaskFilter(SkMaskFilter::MakeBlur(kOuter_SkBlurStyle, 3)); SkIPoint offset; bitmap.extractAlpha(&alpha, &paint, nullptr, &offset); diff --git a/docs/examples/strokerect_gm.cpp b/docs/examples/strokerect_gm.cpp index 7b5e5fc7018e..4de715f9c0de 100644 --- a/docs/examples/strokerect_gm.cpp +++ b/docs/examples/strokerect_gm.cpp @@ -1,6 +1,7 @@ // Copyright 2020 Google LLC. // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. #include "tools/fiddle/examples.h" +#include REG_FIDDLE(strokerect_gm, 1400, 740, false, 0) { void draw(SkCanvas* canvas) { @@ -56,9 +57,10 @@ void draw(SkCanvas* canvas) { paint.setStrokeWidth(3); paint.setStrokeJoin(SkPaint::kMiter_Join); int n = fillPath.countPoints(); - AutoTArray points(n); - fillPath.getPoints(points.get(), n); - canvas->drawPoints(SkCanvas::kPoints_PointMode, n, points.get(), paint); + SkPoint* points = new SkPoint[n]; + fillPath.getPoints(points, n); + canvas->drawPoints(SkCanvas::kPoints_PointMode, n, points, paint); + delete[] points; } } } diff --git a/example/BUILD.bazel b/example/BUILD.bazel index b1d2d5db2906..f22b2c35a922 100644 --- a/example/BUILD.bazel +++ b/example/BUILD.bazel @@ -16,7 +16,7 @@ cc_binary_with_flags( set_flags = { # Use the GL backend with the normal GL standard (as opposed to WebGL or GLES) "gpu_backend": [ - "gl_backend", + "gl_ganesh", ], "with_gl_standard": [ "gl_standard", @@ -31,7 +31,7 @@ cc_binary_with_flags( "//:skia_public", ] + select({ "@platforms//os:macos": ["//tools/sk_app:sk_app_objc"], - "@platforms//os:linux": ["//tools/sk_app:sk_app"], + "@platforms//os:linux": ["//tools/sk_app"], "//conditions:default": [], }), ) @@ -46,7 +46,7 @@ cc_binary_with_flags( # These flags are defined in //bazel/common_config_settings/BUILD.bazel set_flags = { "gpu_backend": [ - "vulkan_backend", + "vulkan_ganesh", ], # Load fonts from the standard system directory (e.g. "/usr/share/fonts/") # as defined in //src/ports/SkFontMgr_custom_directory_factory.cpp @@ -70,7 +70,7 @@ cc_binary_with_flags( # These flags are defined in //bazel/common_config_settings/BUILD.bazel set_flags = { "gpu_backend": [ - "dawn_backend", + "dawn_ganesh", ], # Load fonts from the standard system directory (e.g. "/usr/share/fonts/") # as defined in //src/ports/SkFontMgr_custom_directory_factory.cpp @@ -94,7 +94,7 @@ cc_binary_with_flags( # These flags are defined in //bazel/common_config_settings/BUILD.bazel set_flags = { "gpu_backend": [ - "metal_backend", + "metal_ganesh", ], # Load fonts from the standard system directory (e.g. "/usr/share/fonts/") # as defined in //src/ports/SkFontMgr_custom_directory_factory.cpp @@ -119,7 +119,7 @@ cc_binary_with_flags( # These flags are defined in //bazel/common_config_settings/BUILD.bazel set_flags = { "gpu_backend": [ - "vulkan_backend", + "vulkan_ganesh", ], }, deps = [ diff --git a/example/HelloWorld.cpp b/example/HelloWorld.cpp index 66244b5af95f..0dcc488cdaaa 100644 --- a/example/HelloWorld.cpp +++ b/example/HelloWorld.cpp @@ -20,11 +20,12 @@ #include "include/core/SkSurface.h" #include "include/core/SkTileMode.h" #include "include/effects/SkGradientShader.h" -#include "tools/sk_app/DisplayParams.h" +#include "tools/window/DisplayParams.h" #include using namespace sk_app; +using skwindow::DisplayParams; Application* Application::Create(int argc, char** argv, void* platformData) { return new HelloWorld(argc, argv, platformData); diff --git a/experimental/sktext/BUILD.gn b/experimental/sktext/BUILD.gn index e61f43e0a997..d353b15c7328 100644 --- a/experimental/sktext/BUILD.gn +++ b/experimental/sktext/BUILD.gn @@ -10,8 +10,8 @@ declare_args() { text_bench_enabled = false } -if (skia_use_icu && skia_enable_sktext && skia_enable_skshaper && - skia_use_harfbuzz) { +if ((skia_use_icu || skia_use_libgrapheme) && skia_enable_sktext && + skia_enable_skshaper && skia_use_harfbuzz) { config("public_config") { include_dirs = [ "include" ] } diff --git a/experimental/sktext/editor/App.cpp b/experimental/sktext/editor/App.cpp index 83cf52922256..a937a452b2d8 100644 --- a/experimental/sktext/editor/App.cpp +++ b/experimental/sktext/editor/App.cpp @@ -16,6 +16,7 @@ #include "third_party/icu/SkLoadICU.h" +#include #include #include diff --git a/experimental/sktext/include/Types.h b/experimental/sktext/include/Types.h index 0b706c11c47e..777e266c1f54 100644 --- a/experimental/sktext/include/Types.h +++ b/experimental/sktext/include/Types.h @@ -7,8 +7,8 @@ #include "include/core/SkFont.h" #include "include/core/SkSize.h" #include "include/core/SkSpan.h" -#include "include/private/SkBitmaskEnum.h" #include "include/private/base/SkTo.h" +#include "src/base/SkBitmaskEnum.h" namespace skia { namespace text { diff --git a/experimental/wasm-hello-world/BUILD.bazel b/experimental/wasm-hello-world/BUILD.bazel index 7d6e0b4f84e7..b8a56e7339a5 100644 --- a/experimental/wasm-hello-world/BUILD.bazel +++ b/experimental/wasm-hello-world/BUILD.bazel @@ -28,7 +28,7 @@ cc_binary_with_flags( linkopts = LINKOPTS, set_flags = { "gpu_backend": [ - "gl_backend", + "gl_ganesh", ], "with_gl_standard": [ "webgl_standard", diff --git a/fuzz/FuzzCanvas.cpp b/fuzz/FuzzCanvas.cpp index 7a3618743616..284333d9c36c 100644 --- a/fuzz/FuzzCanvas.cpp +++ b/fuzz/FuzzCanvas.cpp @@ -1006,7 +1006,11 @@ static void fuzz_canvas(Fuzz* fuzz, SkCanvas* canvas, int depth = 9) { fuzz->nextRange(&drawCommand, 0, 62); switch (drawCommand) { case 0: - canvas->flush(); +#if defined(SK_GANESH) + if (auto dContext = GrAsDirectContext(canvas->recordingContext())) { + dContext->flushAndSubmit(); + } +#endif break; case 1: canvas->save(); diff --git a/fuzz/FuzzMain.cpp b/fuzz/FuzzMain.cpp index 88f936d53224..4894a99a8b92 100644 --- a/fuzz/FuzzMain.cpp +++ b/fuzz/FuzzMain.cpp @@ -291,6 +291,9 @@ static std::map cf_api_map = { {"api_path_measure", "PathMeasure"}, {"api_pathop", "Pathop"}, {"api_polyutils", "PolyUtils"}, +#if defined(SK_GRAPHITE) && defined(SK_ENABLE_PRECOMPILE) + {"api_precompile", "Precompile"}, +#endif {"api_raster_n32_canvas", "RasterN32Canvas"}, {"api_skparagraph", "SkParagraph"}, {"api_svg_canvas", "SVGCanvas"}, @@ -839,4 +842,3 @@ static void fuzz_skdescriptor_deserialize(sk_sp bytes) { FuzzSkDescriptorDeserialize(bytes); SkDebugf("[terminated] Did not crash while deserializing an SkDescriptor.\n"); } - diff --git a/fuzz/FuzzPrecompile.cpp b/fuzz/FuzzPrecompile.cpp new file mode 100644 index 000000000000..de8dfd7f7a42 --- /dev/null +++ b/fuzz/FuzzPrecompile.cpp @@ -0,0 +1,426 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "fuzz/Fuzz.h" + +#include "include/core/SkCanvas.h" +#include "include/core/SkColorFilter.h" +#include "include/core/SkColorSpace.h" +#include "include/core/SkFont.h" +#include "include/core/SkImageInfo.h" +#include "include/core/SkPaint.h" +#include "include/core/SkPathBuilder.h" +#include "include/core/SkRefCnt.h" +#include "include/effects/SkColorMatrix.h" +#include "include/gpu/graphite/Context.h" +#include "include/gpu/graphite/Surface.h" +#include "modules/skcms/skcms.h" +#include "src/core/SkBlenderBase.h" +#include "src/gpu/graphite/ContextPriv.h" +#include "src/gpu/graphite/ContextUtils.h" +#include "src/gpu/graphite/FactoryFunctions.h" +#include "src/gpu/graphite/KeyContext.h" +#include "src/gpu/graphite/PaintOptionsPriv.h" +#include "src/gpu/graphite/PaintParams.h" +#include "src/gpu/graphite/PaintParamsKey.h" +#include "src/gpu/graphite/PipelineData.h" +#include "src/gpu/graphite/Precompile.h" +#include "src/gpu/graphite/PublicPrecompile.h" +#include "src/gpu/graphite/RecorderPriv.h" +#include "src/gpu/graphite/RuntimeEffectDictionary.h" +#include "tools/ToolUtils.h" +#include "tools/gpu/GrContextFactory.h" +#include "tools/graphite/ContextFactory.h" + +using namespace skgpu::graphite; + +namespace { + +SkBlendMode random_blend_mode(Fuzz* fuzz) { + uint32_t temp; + fuzz->next(&temp); + return (SkBlendMode) (temp % kSkBlendModeCount); +} + +SkColor random_opaque_skcolor(Fuzz* fuzz) { + SkColor color; + fuzz->next(&color); + return 0xff000000 | color; +} + +SkColor4f random_color4f(Fuzz* fuzz) { + bool makeOpaque; + fuzz->next(&makeOpaque); + + SkColor4f color; + fuzz->nextRange(&color.fR, 0, 1); + fuzz->nextRange(&color.fG, 0, 1); + fuzz->nextRange(&color.fB, 0, 1); + if (makeOpaque) { + color.fA = 1.0; + } else { + fuzz->nextRange(&color.fA, 0, 1); + } + + return color; +} + +SkPath make_path() { + SkPathBuilder path; + path.moveTo(0, 0); + path.lineTo(8, 2); + path.lineTo(16, 0); + path.lineTo(14, 8); + path.lineTo(16, 16); + path.lineTo(8, 14); + path.lineTo(0, 16); + path.lineTo(2, 8); + path.close(); + return path.detach(); +} + +#ifdef SK_DEBUG +void dump(ShaderCodeDictionary* dict, UniquePaintParamsID id) { + dict->lookup(id).dump(dict); +} +#endif + +//-------------------------------------------------------------------------------------------------- +// color spaces + +const skcms_TransferFunction& random_transfer_function(Fuzz* fuzz) { + static constexpr skcms_TransferFunction gTransferFunctions[] = { + SkNamedTransferFn::kSRGB, + SkNamedTransferFn::k2Dot2, + SkNamedTransferFn::kLinear, + SkNamedTransferFn::kRec2020, + SkNamedTransferFn::kPQ, + SkNamedTransferFn::kHLG, + }; + + uint32_t xferFunction; + fuzz->next(&xferFunction); + xferFunction %= std::size(gTransferFunctions); + return gTransferFunctions[xferFunction]; +} + +const skcms_Matrix3x3& random_gamut(Fuzz* fuzz) { + static constexpr skcms_Matrix3x3 gGamuts[] = { + SkNamedGamut::kSRGB, + SkNamedGamut::kAdobeRGB, + SkNamedGamut::kDisplayP3, + SkNamedGamut::kRec2020, + SkNamedGamut::kXYZ, + }; + + uint32_t gamut; + fuzz->next(&gamut); + gamut %= std::size(gGamuts); + return gGamuts[gamut]; +} + +enum class ColorSpaceType { + kNone, + kSRGB, + kSRGBLinear, + kRGB, + + kLast = kRGB +}; + +static constexpr int kColorSpaceTypeCount = static_cast(ColorSpaceType::kLast) + 1; + +sk_sp create_colorspace(Fuzz* fuzz, ColorSpaceType csType) { + switch (csType) { + case ColorSpaceType::kNone: + return nullptr; + case ColorSpaceType::kSRGB: + return SkColorSpace::MakeSRGB(); + case ColorSpaceType::kSRGBLinear: + return SkColorSpace::MakeSRGBLinear(); + case ColorSpaceType::kRGB: + return SkColorSpace::MakeRGB(random_transfer_function(fuzz), random_gamut(fuzz)); + } + + SkUNREACHABLE; +} + +sk_sp create_random_colorspace(Fuzz* fuzz) { + uint32_t temp; + fuzz->next(&temp); + ColorSpaceType csType = (ColorSpaceType) (temp % kColorSpaceTypeCount); + + return create_colorspace(fuzz, csType); +} + +//-------------------------------------------------------------------------------------------------- +// color filters + +enum class ColorFilterType { + kNone, + kBlend, + kMatrix, + kHSLAMatrix, + // TODO: add more color filters + + kLast = kHSLAMatrix +}; + +static constexpr int kColorFilterTypeCount = static_cast(ColorFilterType::kLast) + 1; + +std::pair, sk_sp> create_blend_colorfilter( + Fuzz* fuzz) { + + sk_sp cf; + + // SkColorFilters::Blend is clever and can weed out noop color filters. Loop until we get + // a valid color filter. + while (!cf && !fuzz->exhausted()) { + cf = SkColorFilters::Blend(random_color4f(fuzz), + create_random_colorspace(fuzz), + random_blend_mode(fuzz)); + } + + sk_sp o = cf ? PrecompileColorFilters::Blend() : nullptr; + + return { cf, o }; +} + +std::pair, sk_sp> create_matrix_colorfilter() { + sk_sp cf = SkColorFilters::Matrix( + SkColorMatrix::RGBtoYUV(SkYUVColorSpace::kJPEG_Full_SkYUVColorSpace)); + sk_sp o = PrecompileColorFilters::Matrix(); + + return { cf, o }; +} + +std::pair, sk_sp> create_hsla_matrix_colorfilter() { + sk_sp cf = SkColorFilters::HSLAMatrix( + SkColorMatrix::RGBtoYUV(SkYUVColorSpace::kJPEG_Full_SkYUVColorSpace)); + sk_sp o = PrecompileColorFilters::HSLAMatrix(); + + return { cf, o }; +} + +std::pair, sk_sp> create_colorfilter( + Fuzz* fuzz, + ColorFilterType type, + int depth) { + if (depth <= 0) { + return {}; + } + + switch (type) { + case ColorFilterType::kNone: + return { nullptr, nullptr }; + case ColorFilterType::kBlend: + return create_blend_colorfilter(fuzz); + case ColorFilterType::kMatrix: + return create_matrix_colorfilter(); + case ColorFilterType::kHSLAMatrix: + return create_hsla_matrix_colorfilter(); + } + + SkUNREACHABLE; +} + +std::pair, sk_sp> create_random_colorfilter( + Fuzz* fuzz, + int depth) { + + uint32_t temp; + fuzz->next(&temp); + ColorFilterType cf = (ColorFilterType) (temp % kColorFilterTypeCount); + + return create_colorfilter(fuzz, cf, depth); +} + +//-------------------------------------------------------------------------------------------------- +std::pair create_random_paint(Fuzz* fuzz, int depth) { + if (depth <= 0) { + return {}; + } + + SkPaint paint; + paint.setColor(random_opaque_skcolor(fuzz)); + + PaintOptions paintOptions; + + { + auto [cf, o] = create_random_colorfilter(fuzz, depth - 1); + SkASSERT_RELEASE(!cf == !o); + + if (cf) { + paint.setColorFilter(std::move(cf)); + paintOptions.setColorFilters({o}); + } + } + + return { paint, paintOptions }; +} + +//-------------------------------------------------------------------------------------------------- +void check_draw(Context* context, + Recorder* recorder, + const SkPaint& paint, + DrawTypeFlags dt, + const SkPath& path) { + int before = context->priv().globalCache()->numGraphicsPipelines(); + + { + // TODO: vary the colorType of the target surface too + SkImageInfo ii = SkImageInfo::Make(16, 16, + kRGBA_8888_SkColorType, + kPremul_SkAlphaType); + + sk_sp surf = SkSurfaces::RenderTarget(recorder, ii); + SkCanvas* canvas = surf->getCanvas(); + + switch (dt) { + case DrawTypeFlags::kShape: + canvas->drawRect(SkRect::MakeWH(16, 16), paint); + canvas->drawPath(path, paint); + break; + default: + SkASSERT_RELEASE(false); + break; + } + + std::unique_ptr recording = recorder->snap(); + context->insertRecording({ recording.get() }); + context->submit(SyncToCpu::kYes); + } + + int after = context->priv().globalCache()->numGraphicsPipelines(); + + // Actually using the SkPaint with the specified type of draw shouldn't have caused + // any additional compilation + SkASSERT_RELEASE(before == after); +} + +void fuzz_graphite(Fuzz* fuzz, Context* context, int depth = 9) { + auto recorder = context->makeRecorder(); + ShaderCodeDictionary* dict = context->priv().shaderCodeDictionary(); + + SkColorInfo ci = SkColorInfo(kRGBA_8888_SkColorType, kPremul_SkAlphaType, + SkColorSpace::MakeSRGB()); + + std::unique_ptr rtDict = std::make_unique(); + KeyContext precompileKeyContext(recorder->priv().caps(), + dict, + rtDict.get(), + ci, + /* dstTexture= */ nullptr, + /* dstOffset= */ {0, 0}); + + sk_sp fakeDstTexture = TextureProxy::Make(recorder->priv().caps(), + SkISize::Make(1, 1), + kRGBA_8888_SkColorType, + skgpu::Mipmapped::kNo, + skgpu::Protected::kNo, + skgpu::Renderable::kYes, + skgpu::Budgeted::kNo); + constexpr SkIPoint fakeDstOffset = SkIPoint::Make(0, 0); + + DrawTypeFlags kDrawType = DrawTypeFlags::kShape; + SkPath path = make_path(); + + Layout layout = context->backend() == skgpu::BackendApi::kMetal ? Layout::kMetal + : Layout::kStd140; + + PaintParamsKeyBuilder builder(dict); + PipelineDataGatherer gatherer(layout); + + + auto [paint, paintOptions] = create_random_paint(fuzz, depth); + + + bool hasCoverage; + fuzz->next(&hasCoverage); + + DstReadRequirement dstReadReq = DstReadRequirement::kNone; + const SkBlenderBase* blender = as_BB(paint.getBlender()); + if (blender) { + dstReadReq = GetDstReadRequirement(recorder->priv().caps(), + blender->asBlendMode(), + hasCoverage); + } + bool needsDstSample = dstReadReq == DstReadRequirement::kTextureCopy || + dstReadReq == DstReadRequirement::kTextureSample; + sk_sp curDst = needsDstSample ? fakeDstTexture : nullptr; + + auto [paintID, uData, tData] = ExtractPaintData( + recorder.get(), &gatherer, &builder, layout, {}, + PaintParams(paint, + /* primitiveBlender= */ nullptr, + dstReadReq, + /* skipColorXform= */ false), + curDst, fakeDstOffset, ci); + + std::vector precompileIDs; + paintOptions.priv().buildCombinations(precompileKeyContext, + /* addPrimitiveBlender= */ false, + hasCoverage, + [&](UniquePaintParamsID id) { + precompileIDs.push_back(id); + }); + + // The specific key generated by ExtractPaintData should be one of the + // combinations generated by the combination system. + auto result = std::find(precompileIDs.begin(), precompileIDs.end(), paintID); + +#ifdef SK_DEBUG + if (result == precompileIDs.end()) { + SkDebugf("From paint: "); + dump(dict, paintID); + + SkDebugf("From combination builder:"); + for (auto iter : precompileIDs) { + dump(dict, iter); + } + } +#endif + + SkASSERT_RELEASE(result != precompileIDs.end()); + + { + context->priv().globalCache()->resetGraphicsPipelines(); + + int before = context->priv().globalCache()->numGraphicsPipelines(); + Precompile(context, paintOptions, kDrawType); + int after = context->priv().globalCache()->numGraphicsPipelines(); + + SkASSERT_RELEASE(before == 0); + SkASSERT_RELEASE(after > before); + + check_draw(context, recorder.get(), paint, kDrawType, path); + } +} + +} // anonymous namespace + +DEF_FUZZ(Precompile, fuzz) { + skiatest::graphite::ContextFactory factory; + + sk_gpu_test::GrContextFactory::ContextType contextType; +#if defined(SK_METAL) + contextType = sk_gpu_test::GrContextFactory::kMetal_ContextType; +#elif defined(SK_VULKAN) + contextType = sk_gpu_test::GrContextFactory::kVulkan_ContextType; +#elif defined(SK_DAWN) + contextType = sk_gpu_test::GrContextFactory::kDawn_ContextType; +#else + contextType = sk_gpu_test::GrContextFactory::kMock_ContextType; +#endif + + auto [_, context] = factory.getContextInfo(contextType); + if (!context) { + return; + } + + fuzz_graphite(fuzz, context); +} diff --git a/fuzz/oss_fuzz/FuzzPrecompile.cpp b/fuzz/oss_fuzz/FuzzPrecompile.cpp new file mode 100644 index 000000000000..7e1a8a28ff1d --- /dev/null +++ b/fuzz/oss_fuzz/FuzzPrecompile.cpp @@ -0,0 +1,32 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "fuzz/Fuzz.h" +#include "src/core/SkFontMgrPriv.h" +#include "tools/fonts/TestFontMgr.h" + +void fuzz_Precompile(Fuzz* f); + +extern "C" { + + // Set default LSAN options. + const char *__lsan_default_options() { + // Don't print the list of LSAN suppressions on every execution. + return "print_suppressions=0"; + } + + int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { + if (size > 4000) { + return 0; + } + gSkFontMgr_DefaultFactory = &ToolUtils::MakePortableFontMgr; + auto fuzz = Fuzz(SkData::MakeWithoutCopy(data, size)); + fuzz_Precompile(&fuzz); + return 0; + } + +} // extern "C" diff --git a/fuzz/oss_fuzz/FuzzSkMeshSpecification.cpp b/fuzz/oss_fuzz/FuzzSkMeshSpecification.cpp index 81dcaad6a962..034e370e5c5a 100644 --- a/fuzz/oss_fuzz/FuzzSkMeshSpecification.cpp +++ b/fuzz/oss_fuzz/FuzzSkMeshSpecification.cpp @@ -16,8 +16,10 @@ template T extract(SkSpan& data) { T result = 0; size_t bytesToCopy = std::min(sizeof(T), data.size()); - memcpy(&result, &data.front(), bytesToCopy); - data = data.subspan(bytesToCopy); + if (bytesToCopy > 0) { + memcpy(&result, &data.front(), bytesToCopy); + data = data.subspan(bytesToCopy); + } return result; } @@ -153,6 +155,10 @@ static void FuzzSkMeshSpecification(SkSpan data) { while (!data.empty()) { uint8_t control = extract(data) % 4; + // A control code with no payload can be ignored. + if (data.empty()) { + break; + } switch (control) { case 0: { // Add an attribute. diff --git a/gm/BUILD.bazel b/gm/BUILD.bazel index fffa85c8dce5..55a85ab5c437 100644 --- a/gm/BUILD.bazel +++ b/gm/BUILD.bazel @@ -1,4 +1,6 @@ load("//bazel:skia_rules.bzl", "exports_files_legacy", "skia_cc_library") +load("//bazel:cc_test_with_flags.bzl", "cc_test_with_flags") +load(":android_gm_test.bzl", "android_gm_test") licenses(["notice"]) @@ -22,10 +24,651 @@ skia_cc_library( "verifiers/gmverifier.h", ], hdrs = ["gm.h"], - visibility = ["//tools/viewer:__pkg__"], + visibility = [ + "//gm:__subpackages__", + "//tools/viewer:__pkg__", + ], deps = [ "//:skia_internal", "//tools:registry", "//tools:tool_utils", ], ) + +skia_cc_library( + name = "tests_base", + testonly = True, + srcs = [ + "//src/utils:json_hdrs", + "//src/utils:json_srcs", + ], + deps = [ + ":gm", + "//gm/surface_manager", + "//gm/vias", + "//tools:hash_and_encode", + "//tools/timer", # Required by animatedimageblurs.cpp. + ], +) + +CPU_GMS = [ + # This is an incomplete list of GMs that only require a CPU. + # TODO(lovisolo): Complete this list. + "3d.cpp", + "aaa.cpp", + "aaclip.cpp", + "aarectmodes.cpp", + "aaxfermodes.cpp", + "addarc.cpp", + "all_bitmap_configs.cpp", + "alphagradients.cpp", + "alpha_image.cpp", + "analytic_gradients.cpp", + "androidblendmodes.cpp", + "animated_gif.cpp", + "animatedimageblurs.cpp", + "animated_image_orientation.cpp", + # "annotated_text.cpp", # ./include/core/SkRefCnt.h:41: fatal error: "assert(this->getRefCnt() == 1)" + "arcofzorro.cpp", + "arcto.cpp", + "arithmode.cpp", + + # TODO(lovisolo): Are these CPU-only, GPU-only or something else? Try them and add them to the + # corresponding list. + # "b_119394958.cpp", + # "backdrop.cpp", + # "backdrop_imagefilter_croprect.cpp", + # "badpaint.cpp", + # "batchedconvexpaths.cpp", + # "bc1_transparency.cpp", + # "beziereffects.cpp", + # "beziers.cpp", + # "bicubic.cpp", + # "bigblurs.cpp", + # "bigmatrix.cpp", + # "bigrect.cpp", + # "bigrrectaaeffect.cpp", + # "bigtext.cpp", + # "bigtileimagefilter.cpp", + # "bitmapcopy.cpp", + # "bitmapfilters.cpp", + # "bitmapimage.cpp", + # "bitmappremul.cpp", + # "bitmaprect.cpp", + # "bitmaprecttest.cpp", + # "bitmapshader.cpp", + # "bitmaptiled.cpp", + # "bleed.cpp", + # "blend.cpp", + # "blurcircles2.cpp", + # "blurcircles.cpp", + # "blurignorexform.cpp", + # "blurimagevmask.cpp", + # "blurpositioning.cpp", + # "blurquickreject.cpp", + # "blurrect.cpp", + # "blurredclippedcircle.cpp", + # "blurroundrect.cpp", + # "blurs.cpp", + # "blurtextsmallradii.cpp", + # "bmpfilterqualityrepeat.cpp", + # "bug12866.cpp", + # "bug5252.cpp", + # "bug530095.cpp", + # "bug615686.cpp", + # "bug6643.cpp", + # "bug6783.cpp", + # "bug9331.cpp", + # "circle_sizes.cpp", + # "circulararcs.cpp", + # "circularclips.cpp", + # "clear_swizzle.cpp", + # "clipdrawdraw.cpp", + # "clip_error.cpp", + # "clippedbitmapshaders.cpp", + # "clipshader.cpp", + # "clip_sierpinski_region.cpp", + # "clip_strokerect.cpp", + # "clockwise.cpp", + # "collapsepaths.cpp", + # "color4f.cpp", + # "coloremoji_blendmodes.cpp", + # "coloremoji.cpp", + # "colorfilteralpha8.cpp", + # "colorfilterimagefilter.cpp", + # "colorfilters.cpp", + # "colormatrix.cpp", + # "colorspace.cpp", + # "colorwheel.cpp", + # "colrv1.cpp", + # "complexclip2.cpp", + # "complexclip3.cpp", + # "complexclip4.cpp", + # "complexclip_blur_tiled.cpp", + # "complexclip.cpp", + # "composecolorfilter.cpp", + # "composeshader.cpp", + # "compositor_quads.cpp", + # "compressed_textures.cpp", + # "concavepaths.cpp", + # "conicpaths.cpp", + # "constcolorprocessor.cpp", + # "convex_all_line_paths.cpp", + # "convexpaths.cpp", + # "convexpolyclip.cpp", + # "convexpolyeffect.cpp", + # "coordclampshader.cpp", + # "copy_to_4444.cpp", + # "crbug_1041204.cpp", + # "crbug_1073670.cpp", + # "crbug_1086705.cpp", + # "crbug_1113794.cpp", + # "crbug_1139750.cpp", + # "crbug_1156804.cpp", + # "crbug_1162942.cpp", + # "crbug_1167277.cpp", + # "crbug_1174186.cpp", + # "crbug_1174354.cpp", + # "crbug_1177833.cpp", + # "crbug_1257515.cpp", + # "crbug_1313579.cpp", + # "crbug_224618.cpp", + # "crbug_691386.cpp", + # "crbug_788500.cpp", + # "crbug_847759.cpp", + # "crbug_884166.cpp", + # "crbug_887103.cpp", + # "crbug_892988.cpp", + # "crbug_899512.cpp", + # "crbug_905548.cpp", + # "crbug_908646.cpp", + # "crbug_913349.cpp", + # "crbug_918512.cpp", + # "crbug_938592.cpp", + # "crbug_946965.cpp", + # "crbug_947055.cpp", + # "crbug_996140.cpp", + # "crop_imagefilter.cpp", + # "croppedrects.cpp", + # "crosscontextimage.cpp", + # "cubicpaths.cpp", + # "daa.cpp", + # "dashcircle.cpp", + # "dashcubics.cpp", + # "dashing.cpp", + # "degeneratesegments.cpp", + # "destcolor.cpp", + # "dftext_blob_persp.cpp", + # "dftext.cpp", + # "discard.cpp", + # "displacement.cpp", + # "distantclip.cpp", + # "drawable.cpp", + # "drawatlascolor.cpp", + # "drawatlas.cpp", + # "drawbitmaprect.cpp", + # "draw_bitmap_rect_skbug4374.cpp", + # "drawglyphs.cpp", + # "drawimageset.cpp", + # "drawlines_with_local_matrix.cpp", + # "drawminibitmaprect.cpp", + # "drawquadset.cpp", + # "drawregion.cpp", + # "drawregionmodes.cpp", + # "dropshadowimagefilter.cpp", + # "drrect.cpp", + # "drrect_small_inner.cpp", + # "dstreadshuffle.cpp", + # "ducky_yuv_blend.cpp", + # "emboss.cpp", + # "emptypath.cpp", + # "encode_alpha_jpeg.cpp", + # "encode_color_types.cpp", + # "encode.cpp", + # "encode_platform.cpp", + # "encode_srgb.cpp", + # "exoticformats.cpp", + # "fadefilter.cpp", + # "fatpathfill.cpp", + # "fiddle.cpp", + # "fillrect_gradient.cpp", + # "filltypes.cpp", + # "filltypespersp.cpp", + # "filterbug.cpp", + # "filterfastbounds.cpp", + # "filterindiabox.cpp", + # "flippity.cpp", + # "fontations.cpp", + # "fontcache.cpp", + # "fontmgr.cpp", + # "fontregen.cpp", + # "fontscaler.cpp", + # "fontscalerdistortable.cpp", + # "fpcoordinateoverride.cpp", + # "fp_sample_chaining.cpp", + # "fwidth_squircle.cpp", + # "gammatext.cpp", + # "getpostextpath.cpp", + # "giantbitmap.cpp", + # "glyph_pos.cpp", + # "gpu_blur_utils.cpp", + # "gradient_dirty_laundry.cpp", + # "gradient_matrix.cpp", + # "gradients_2pt_conical.cpp", + # "gradients.cpp", + # "gradients_degenerate.cpp", + # "gradients_no_texture.cpp", + # "gradtext.cpp", + # "graphite_replay.cpp", + # "graphitestart.cpp", + # "grayscalejpg.cpp", + # "hairlines.cpp", + # "hairmodes.cpp", + # "hardstop_gradients.cpp", + # "hardstop_gradients_many.cpp", + # "highcontrastfilter.cpp", + # "hittestpath.cpp", + # "hsl.cpp", + # "hugepath.cpp", + # "imageblur2.cpp", + # "imageblurclampmode.cpp", + # "imageblur.cpp", + # "imageblurrepeatmode.cpp", + # "imageblurtiled.cpp", + # "image.cpp", + # "imagefiltersbase.cpp", + # "imagefiltersclipped.cpp", + # "imagefilters.cpp", + # "imagefilterscropexpand.cpp", + # "imagefilterscropped.cpp", + # "imagefiltersgraph.cpp", + # "imagefiltersscaled.cpp", + # "imagefiltersstroked.cpp", + # "imagefilterstransformed.cpp", + # "imagefiltersunpremul.cpp", + # "imagefromyuvtextures.cpp", + # "imagemagnifier.cpp", + # "imagemakewithfilter.cpp", + # "imagemasksubset.cpp", + # "image_pict.cpp", + # "imageresizetiled.cpp", + # "image_shader.cpp", + # "imagesource2.cpp", + # "imagesource.cpp", + # "internal_links.cpp", + # "inverseclip.cpp", + # "inversepaths.cpp", + # "jpg_color_cube.cpp", + # "kawase_blur_rt.cpp", + # "labyrinth.cpp", + # "largeclippedpath.cpp", + # "largeglyphblur.cpp", + # "lattice.cpp", + # "lazytiling.cpp", + # "lcdblendmodes.cpp", + # "lcdoverlap.cpp", + # "lcdtext.cpp", + # "lighting.cpp", + # "linepaths.cpp", + # "localmatriximagefilter.cpp", + # "localmatriximageshader.cpp", + # "localmatrixshader.cpp", + # "lumafilter.cpp", + # "mac_aa_explorer.cpp", + # "makecolorspace.cpp", + # "make_raster_image.cpp", + # "mandoline.cpp", + # "manypathatlases.cpp", + # "manypaths.cpp", + # "matrixconvolution.cpp", + # "matriximagefilter.cpp", + # "mesh.cpp", + # "mipmap.cpp", + # "mirrortile.cpp", + # "mixedtextblobs.cpp", + # "mixercolorfilter.cpp", + # "modecolorfilters.cpp", + # "morphology.cpp", + # "nearesthalfpixelimage.cpp", + # "nested.cpp", + # "ninepatchstretch.cpp", + # "nonclosedpaths.cpp", + # "offsetimagefilter.cpp", + # "orientation.cpp", + # "ovals.cpp", + # "overdrawcanvas.cpp", + # "overdrawcolorfilter.cpp", + # "overstroke.cpp", + # "p3.cpp", + # "palette.cpp", + # "patch.cpp", + # "patharcto.cpp", + # "pathcontourstart.cpp", + # "patheffects.cpp", + # "pathfill.cpp", + # "pathinterior.cpp", + # "pathmaskcache.cpp", + # "pathmeasure.cpp", + # "pathopsinverse.cpp", + # "pathreverse.cpp", + # "path_stroke_with_zero_length.cpp", + # "pdf_never_embed.cpp", + # "perlinnoise.cpp", + # "perspimages.cpp", + # "perspshaders.cpp", + # "persptext.cpp", + # "picture.cpp", + # "pictureimagefilter.cpp", + # "pictureimagegenerator.cpp", + # "pictureshadercache.cpp", + # "pictureshader.cpp", + # "pictureshadertile.cpp", + # "plus.cpp", + # "points.cpp", + # "poly2poly.cpp", + # "polygonoffset.cpp", + # "polygons.cpp", + # "postercircle.cpp", + # "preservefillrule.cpp", + # "quadpaths.cpp", + # "radial_gradient_precision.cpp", + # "rasterhandleallocator.cpp", + # "readpixels.cpp", + # "recordopts.cpp", + # "rectangletexture.cpp", + # "repeated_bitmap.cpp", + # "resizeimagefilter.cpp", + # "rippleshadergm.cpp", + # "roundrects.cpp", + # "rrectclipdrawpaint.cpp", + # "rrect.cpp", + # "rrects.cpp", + # "rsxtext.cpp", + # "runtimecolorfilter.cpp", + # "runtimefunctions.cpp", + # "runtimeimagefilter.cpp", + # "runtimeintrinsics.cpp", + # "runtimeshader.cpp", + # "samplerstress.cpp", + # "savelayer.cpp", + # "scaledemoji.cpp", + # "scaledemoji_rendering.cpp", + # "scaledrects.cpp", + # "scaledstrokes.cpp", + # "shadermaskfilter.cpp", + # "shaderpath.cpp", + # "shadertext3.cpp", + # "shadowutils.cpp", + # "shallowgradient.cpp", + # "shapes.cpp", + # "sharedcorners.cpp", + # "showmiplevels.cpp", + # "simpleaaclip.cpp", + # "simplerect.cpp", + # "skbug_12212.cpp", + # "skbug1719.cpp", + # "skbug_257.cpp", + # "skbug_4868.cpp", + # "skbug_5321.cpp", + # "skbug_8664.cpp", + # "skbug_8955.cpp", + # "skbug_9319.cpp", + # "skbug_9819.cpp", + # "slug.cpp", + # "smallarc.cpp", + # "smallpaths.cpp", + # "spritebitmap.cpp", + # "srcmode.cpp", + # "srgb.cpp", + # "stlouisarch.cpp", + # "stringart.cpp", + # "strokedlines.cpp", + # "strokefill.cpp", + # "strokerect_anisotropic.cpp", + # "strokerect.cpp", + # "strokerects.cpp", + # "stroke_rect_shader.cpp", + # "strokes.cpp", + # "stroketext.cpp", + # "subsetshader.cpp", + # "surface.cpp", + # "swizzle.cpp", + # "tablecolorfilter.cpp", + # "tallstretchedbitmaps.cpp", + # "testgradient.cpp", + # "texelsubset.cpp", + # "textblobblockreordering.cpp", + # "textblobcolortrans.cpp", + # "textblob.cpp", + # "textblobgeometrychange.cpp", + # "textblobmixedsizes.cpp", + # "textblobrandomfont.cpp", + # "textblobshader.cpp", + # "textblobtransforms.cpp", + # "textblobuseaftergpufree.cpp", + # "texteffects.cpp", + # "text_scale_skew.cpp", + # "thinconcavepaths.cpp", + # "thinrects.cpp", + # "thinstrokedrects.cpp", + # "tiledscaledbitmap.cpp", + # "tileimagefilter.cpp", + # "tilemodes_alpha.cpp", + # "tilemodes.cpp", + # "tilemodes_scaled.cpp", + # "tinybitmap.cpp", + # "transparency.cpp", + # "trickycubicstrokes.cpp", + # "typeface.cpp", + # "unpremul.cpp", + # "userfont.cpp", + # "variedtext.cpp", + # "verifiers", + # "vertices.cpp", + # "verylargebitmap.cpp", + # "video_decoder.cpp", + # "wacky_yuv_formats.cpp", + # "widebuttcaps.cpp", + # "windowrectangles.cpp", + # "xfermodeimagefilter.cpp", + # "xfermodes2.cpp", + # "xfermodes3.cpp", + # "xfermodes.cpp", + # "ycbcrimage.cpp", + # "yuv420_odd_dim.cpp", + # "yuvtorgbsubset.cpp", +] + +GPU_GMS = [ + # TODO(lovisolo): Incomplete list. Some commented out files in CPU_GMS probably belong here. + # "aarecteffect.cpp", # ./include/core/SkRefCnt.h:41: fatal error: "assert(this->getRefCnt() == 1)" + "anisotropic.cpp", + # "asyncrescaleandread.cpp", # ./include/core/SkRefCnt.h:41: fatal error: "assert(this->getRefCnt() == 1)" + # "attributes.cpp", # ./include/core/SkRefCnt.h:41: fatal error: "assert(this->getRefCnt() == 1)" + # "beziereffects.cpp", # ./include/core/SkRefCnt.h:41: fatal error: "assert(this->getRefCnt() == 1)" + # "clockwise.cpp", # ./include/core/SkRefCnt.h:41: fatal error: "assert(this->getRefCnt() == 1)" +] + +# Sample invocation: +# +# $ bazel run --config=linux_rbe //gm:cpu_8888_test +# +# Then inspect the PNG and JSON files produced by the GMs: +# +# $ unzip -l bazel-testlogs/gm/cpu_8888_test/test.outputs/outputs.zip +cc_test_with_flags( + name = "cpu_8888_test", + srcs = ["BazelGMRunner.cpp"] + CPU_GMS, + args = [ + "--surfaceConfig", + "8888", + ], + data = ["//resources"], + set_flags = { + "enable_sksl": ["True"], + "include_decoder": [ + "gif_decode_codec", + "webp_decode_codec", + ], + }, + deps = [":tests_base"], +) + +# Currently fails the "arithmode_blender" GM with "Deserialized and reference bitmap pixels do not +# match". Other GMs fail as well, and some others pass. +# +# TODO(lovisolo): Define flag --skip and skip the "arithmode_blender" GM. +# TODO(lovisolo): Consider adding a gm_test macro that keeps the "--via" command-line argument and +# the "via" flag in sync. +cc_test_with_flags( + name = "cpu_8888_via_picture_serialization_test", + srcs = ["BazelGMRunner.cpp"] + CPU_GMS, + args = [ + "--surfaceConfig", + "8888", + "--via", + "picture_serialization", + ], + data = ["//resources"], + set_flags = { + "enable_sksl": ["True"], + "include_decoder": [ + "gif_decode_codec", + "webp_decode_codec", + ], + "include_encoder": [ + "png_encode_codec", # Required by the "picture_serialization" via. + ], + "via": ["picture_serialization"], + }, + deps = [":tests_base"], +) + +cc_test_with_flags( + name = "cpu_8888_via_picture_test", + srcs = ["BazelGMRunner.cpp"] + CPU_GMS, + args = [ + "--surfaceConfig", + "8888", + "--via", + "picture", + ], + data = ["//resources"], + set_flags = { + "enable_sksl": ["True"], + "include_decoder": [ + "gif_decode_codec", + "webp_decode_codec", + ], + "include_encoder": [ + "png_encode_codec", # Required by the "picture" via. + ], + "via": ["picture"], + }, + deps = [":tests_base"], +) + +cc_test_with_flags( + name = "gpu_gles_test", + srcs = ["BazelGMRunner.cpp"] + GPU_GMS, + args = [ + "--surfaceConfig", + "gles", + ], + data = ["//resources"], + set_flags = { + "enable_sksl": ["True"], + "include_decoder": [ + "gif_decode_codec", + "webp_decode_codec", + ], + }, + deps = [":tests_base"], +) + +[ + # Sample invocation (assuming there's a Pixel 5 or similar device available via adb): + # + # $ bazel test --config=linux_rbe //gm:cpu_8888_android_test --config=pixel_5 + # + # Then inspect the PNG and JSON files produced by the GMs: + # + # $ unzip -l bazel-testlogs/gm/cpu_8888_android_test/test.outputs/outputs.zip + android_gm_test( + name = "cpu_%s_android_test" % config, + srcs = CPU_GMS, + config = config, + flags = { + "enable_sksl": ["True"], + "include_decoder": [ + "gif_decode_codec", + "webp_decode_codec", + ], + }, + requires_resources_dir = True, + deps = [":tests_base"], + ) + for config in [ + "8888", + "565", + ] +] + +android_gm_test( + name = "gpu_gles_android_test", + srcs = GPU_GMS, + config = "gles", + flags = { + "include_decoder": [ + "png_decode_codec", + "webp_decode_codec", + ], + }, + requires_condition = "//src/gpu:gl_ganesh", + requires_resources_dir = True, + deps = [":tests_base"], +) + +# Currently fails the "anisomips" GM with "Deserialized and reference bitmap pixels do not match". +# Other GMs do pass. +# TODO(lovisolo): Define flag --skip and skip the "anisomips" GM. +android_gm_test( + name = "gpu_gles_via_picture_serialization_android_test", + srcs = GPU_GMS, + config = "gles", + flags = { + "include_decoder": [ + "png_decode_codec", + "webp_decode_codec", + ], + "include_encoder": [ + "png_encode_codec", # Required by the "picture_serialization" via. + ], + }, + requires_condition = "//src/gpu:gl_ganesh", + requires_resources_dir = True, + via = "picture_serialization", + deps = [":tests_base"], +) + +# Currently fails the "anisomips" GM with "Deserialized and reference bitmap pixels do not match". +# Other GMs do pass. +# TODO(lovisolo): Define flag --skip and skip the "anisomips" GM. +android_gm_test( + name = "gpu_gles_via_picture_android_test", + srcs = GPU_GMS, + config = "gles", + flags = { + "include_decoder": [ + "png_decode_codec", + "webp_decode_codec", + ], + "include_encoder": [ + "png_encode_codec", # Required by the "picture" via. + ], + }, + requires_condition = "//src/gpu:gl_ganesh", + requires_resources_dir = True, + via = "picture", + deps = [":tests_base"], +) diff --git a/gm/BazelGMRunner.cpp b/gm/BazelGMRunner.cpp new file mode 100644 index 000000000000..ee8668eeefe6 --- /dev/null +++ b/gm/BazelGMRunner.cpp @@ -0,0 +1,276 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + * + * This program runs all GMs registered via macros such as DEF_GM, and for each GM, it saves the + * resulting SkBitmap as a .png file to disk, along with a .json file with the hash of the pixels. + */ + +#include "gm/gm.h" +#include "gm/surface_manager/SurfaceManager.h" +#include "gm/vias/Draw.h" +#include "include/core/SkBitmap.h" +#include "include/core/SkCanvas.h" +#include "include/core/SkColorSpace.h" +#include "include/core/SkColorType.h" +#include "include/core/SkImageInfo.h" +#include "include/core/SkStream.h" +#include "include/core/SkSurface.h" +#include "include/encode/SkPngEncoder.h" +#include "include/private/base/SkAssert.h" +#include "include/private/base/SkDebug.h" +#include "src/core/SkMD5.h" +#include "src/utils/SkJSONWriter.h" +#include "src/utils/SkOSPath.h" +#include "tools/HashAndEncode.h" + +#include +#include +#include +#include +#include + +struct tm; + +// TODO(lovisolo): Add flag --skip. +// TODO(lovisolo): Add flag --omitDigestIfHashInFile (provides the known hashes file). + +// When running under Bazel and overriding the output directory, you might encounter errors such +// as "No such file or directory" and "Read-only file system". The former can happen when running +// on RBE because the passed in output dir might not exist on the remote worker, whereas the latter +// can happen when running locally in sandboxed mode, which is the default strategy when running +// outside of RBE. One possible workaround is to run the test as a local subprocess, which can be +// done by passing flag --strategy=TestRunner=local to Bazel. +// +// Reference: https://bazel.build/docs/user-manual#execution-strategy. +static DEFINE_string(outputDir, + "", + "Directory where to write any output .png and .json files. " + "Optional when running under Bazel " + "(e.g. \"bazel test //path/to:test\") as it defaults to " + "$TEST_UNDECLARED_OUTPUTS_DIR."); + +// We named this flag --surfaceConfig rather than --config to avoid confusion with the --config +// Bazel flag. +static DEFINE_string(surfaceConfig, + "", + "Name of the Surface configuration to use (e.g. \"8888\"). This determines " + "how we construct the SkSurface from which we get the SkCanvas that GMs will " + "draw on. See file //gm/surface_manager/SurfaceManager.h for details."); + +static DEFINE_string(via, + "direct", // Equivalent to running DM without a via. + "Name of the \"via\" to use (e.g. \"picture_serialization\"). Optional."); + +// Takes a SkBitmap and writes the resulting PNG and MD5 hash into the given files. Returns an +// empty string on success, or an error message in the case of failures. +static std::string write_png_and_json_files(std::string name, + std::string config, + SkBitmap& bitmap, + const char* pngPath, + const char* jsonPath) { + HashAndEncode hashAndEncode(bitmap); + + // Compute MD5 hash. + SkMD5 hash; + hashAndEncode.feedHash(&hash); + SkMD5::Digest digest = hash.finish(); + SkString md5 = digest.toLowercaseHexString(); + + // Write PNG file. + SkFILEWStream pngFile(pngPath); + bool result = hashAndEncode.encodePNG(&pngFile, + md5.c_str(), + /* key= */ CommandLineFlags::StringArray(), + /* properties= */ CommandLineFlags::StringArray()); + if (!result) { + return "Error encoding or writing PNG to " + std::string(pngPath); + } + + // Write JSON file with MD5 hash. + SkFILEWStream jsonFile(jsonPath); + SkJSONWriter jsonWriter(&jsonFile, SkJSONWriter::Mode::kPretty); + jsonWriter.beginObject(); // Root object. + jsonWriter.appendString("name", name); + jsonWriter.appendString("md5", md5); + jsonWriter.appendString("config", config); + jsonWriter.endObject(); + + return ""; +} + +static std::string now() { + std::time_t t = std::time(nullptr); + std::tm* now = std::gmtime(&t); + + std::ostringstream oss; + oss << std::put_time(now, "%Y-%m-%d %H:%M:%S UTC"); + return oss.str(); +} + +static std::string draw_result_to_string(skiagm::DrawResult result) { + switch (result) { + case skiagm::DrawResult::kOk: + return "Ok"; + case skiagm::DrawResult::kFail: + return "Fail"; + case skiagm::DrawResult::kSkip: + return "Skip"; + default: + return "Unknown"; + } +} + +static int gNumSuccessfulGMs = 0; +static int gNumFailedGMs = 0; +static int gNumSkippedGMs = 0; + +// Runs a GM under the given surface config, and saves its output PNG file (and accompanying JSON +// file with metadata) to the given output directory. +void run_gm(std::unique_ptr gm, std::string config, std::string outputDir) { + SkDebugf("[%s] GM: %s\n", now().c_str(), gm->getName()); + + // Create surface and canvas. + std::unique_ptr surface_manager = + SurfaceManager::FromConfig(config, gm->getISize().width(), gm->getISize().height()); + if (surface_manager == nullptr) { + SK_ABORT("unknown --surfaceConfig flag value: %s", config.c_str()); + } + + // Set up GPU. + SkDebugf("[%s] Setting up GPU...\n", now().c_str()); + SkString msg; + skiagm::DrawResult result = gm->gpuSetup(surface_manager->getSurface()->getCanvas(), &msg); + + // Draw GM into canvas if GPU setup was successful. + SkBitmap bitmap; + if (result == skiagm::DrawResult::kOk) { + GMOutput output; + std::string viaName = FLAGS_via.size() == 0 ? "" : (FLAGS_via[0]); + SkDebugf("[%s] Drawing GM via \"%s\"...\n", now().c_str(), viaName.c_str()); + output = draw(gm.get(), surface_manager->getSurface().get(), viaName); + result = output.result; + msg = SkString(output.msg.c_str()); + bitmap = output.bitmap; + } + + // Keep track of results. We will exit with a non-zero exit code in the case of failures. + switch (result) { + case skiagm::DrawResult::kOk: + // We don't increment numSuccessfulGMs just yet. We still need to successfully save + // its output bitmap to disk. + SkDebugf("[%s] Flushing surface...\n", now().c_str()); + surface_manager->flush(); + break; + case skiagm::DrawResult::kFail: + gNumFailedGMs++; + break; + case skiagm::DrawResult::kSkip: + gNumSkippedGMs++; + break; + default: + SK_ABORT("Unknown skiagm::DrawResult: %s", draw_result_to_string(result).c_str()); + } + + // Report GM result and optional message. + SkDebugf("[%s] Result: %s\n", now().c_str(), draw_result_to_string(result).c_str()); + if (!msg.isEmpty()) { + SkDebugf("[%s] Message: \"%s\"\n", now().c_str(), msg.c_str()); + } + + // Save PNG and JSON file with MD5 hash to disk if the GM was successful. + if (result == skiagm::DrawResult::kOk) { + std::string name = std::string(gm->getName()); + SkString pngPath = SkOSPath::Join(outputDir.c_str(), (name + ".png").c_str()); + SkString jsonPath = SkOSPath::Join(outputDir.c_str(), (name + ".json").c_str()); + + std::string pngAndJSONResult = write_png_and_json_files( + gm->getName(), config, bitmap, pngPath.c_str(), jsonPath.c_str()); + if (pngAndJSONResult != "") { + SkDebugf("[%s] %s\n", now().c_str(), pngAndJSONResult.c_str()); + gNumFailedGMs++; + } else { + gNumSuccessfulGMs++; + SkDebugf("[%s] PNG file written to: %s\n", now().c_str(), pngPath.c_str()); + SkDebugf("[%s] JSON file written to: %s\n", now().c_str(), jsonPath.c_str()); + } + } +} + +int main(int argc, char** argv) { +#ifdef SK_BUILD_FOR_ANDROID + extern bool gSkDebugToStdOut; // If true, sends SkDebugf to stdout as well. + gSkDebugToStdOut = true; +#endif + + // Print command-line for debugging purposes. + if (argc < 2) { + SkDebugf("GM runner invoked with no arguments.\n"); + } else { + std::ostringstream oss; + oss << "GM runner invoked with arguments:"; + for (int i = 1; i < argc; i++) { + oss << " " << argv[i]; + } + SkDebugf("%s\n", oss.str().c_str()); + } + + // When running under Bazel (e.g. "bazel test //path/to:test"), we'll store output files in + // $TEST_UNDECLARED_OUTPUTS_DIR unless overridden via the --outputDir flag. + // + // See https://bazel.build/reference/test-encyclopedia#initial-conditions. + std::string testUndeclaredOutputsDir; + if (char* envVar = std::getenv("TEST_UNDECLARED_OUTPUTS_DIR")) { + testUndeclaredOutputsDir = envVar; + } + bool isBazelTest = !testUndeclaredOutputsDir.empty(); + + // Parse and validate flags. + CommandLineFlags::Parse(argc, argv); + if (!isBazelTest && FLAGS_outputDir.isEmpty()) { + SkDebugf("Flag --outputDir cannot be empty.\n"); + return 1; + } + if (FLAGS_outputDir.size() > 1) { + SkDebugf("Flag --outputDir takes one single value, got %d.\n", FLAGS_outputDir.size()); + return 1; + } + if (FLAGS_surfaceConfig.isEmpty()) { + SkDebugf("Flag --surfaceConfig cannot be empty.\n"); + return 1; + } + if (FLAGS_surfaceConfig.size() > 1) { + SkDebugf("Flag --surfaceConfig takes one single value, got %d.\n", + FLAGS_surfaceConfig.size()); + return 1; + } + if (FLAGS_via.size() > 1) { + SkDebugf("Flag --via takes at most one value, got %d.\n", FLAGS_via.size()); + return 1; + } + + std::string outputDir = + FLAGS_outputDir.isEmpty() ? testUndeclaredOutputsDir : FLAGS_outputDir[0]; + std::string config(FLAGS_surfaceConfig[0]); + + // Execute all GM registerer functions, then run all registered GMs. + for (const skiagm::GMRegistererFn& f : skiagm::GMRegistererFnRegistry::Range()) { + std::string errorMsg = f(); + if (errorMsg != "") { + SK_ABORT("error while gathering GMs: %s", errorMsg.c_str()); + } + } + for (const skiagm::GMFactory& f : skiagm::GMRegistry::Range()) { + run_gm(f(), config, outputDir); + } + + // TODO(lovisolo): If running under Bazel, print command to display output files. + + SkDebugf(gNumFailedGMs > 0 ? "FAIL\n" : "PASS\n"); + SkDebugf("%d successful GMs (images written to %s).\n", gNumSuccessfulGMs, outputDir.c_str()); + SkDebugf("%d failed GMs.\n", gNumFailedGMs); + SkDebugf("%d skipped GMs.\n", gNumSkippedGMs); + return gNumFailedGMs > 0 ? 1 : 0; +} diff --git a/gm/BazelNoopRunner.cpp b/gm/BazelNoopRunner.cpp new file mode 100644 index 000000000000..bfc39eeef008 --- /dev/null +++ b/gm/BazelNoopRunner.cpp @@ -0,0 +1,11 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + * + * This is meant to be an executable that simply returns 0, indicating the test passed. + * This is how we can have CPU tests be no-ops when running "GPU tests", and vice-versa. + */ + +int main() { return 0; } diff --git a/gm/android_gm_test.bzl b/gm/android_gm_test.bzl new file mode 100644 index 000000000000..07815bae382c --- /dev/null +++ b/gm/android_gm_test.bzl @@ -0,0 +1,50 @@ +"""This module defines the android_gm_test macro.""" + +load("//bazel:android_test.bzl", "android_test") + +# This list should be kept in sync with the union of all configs supported by all surface factories +# in //gm/surface_factory. +_KNOWN_CONFIGS = [ + "8888", + "565", + "gles", +] + +def android_gm_test(config, via = None, extra_args = [], flags = {}, **kwargs): + """Defines an Android GM test. + + This macro is just a wrapper around the android_test macro with the necessary defaults for + Android GM tests. See the android_test macro documentation for details. + + Args: + config: The config under which the GMs should run. + via: The via under which the GMs should run. If set, the "flags" argument will be updated + to set the //gm/vias:via flag accordingly. If unset, no via will be used. + extra_args: See the android_test macro documentation. + flags: See the android_test macro documentation. + **kwargs: Any arguments to pass to the underlying android_test macro instance. + """ + if config not in _KNOWN_CONFIGS: + fail("Unknown config: " + config) + + # Set the //gm/vias:via flag to match the "via" argument. This ensures that the build includes + # the sources for the requested via. If the "via" argument has an unknown value, Bazel will + # produce an error when the underlying cc_binary_with_flags target attempts to set the + # //gm/vias:via flag. + if via: + flags.update([("via", [via])]) + + android_test( + test_runner_if_required_condition_is_satisfied = "//gm:BazelGMRunner.cpp", + test_runner_if_required_condition_is_not_satisfied = "//gm:BazelNoopRunner.cpp", + extra_args = extra_args + [ + "--outputDir", + # This environment variable is set by the adb_test_runner.go program. + "$ADB_TEST_OUTPUT_DIR", + "--surfaceConfig", + config, + ] + (["--via", via] if via else []), + flags = flags, + save_output_files = True, # Save any produced PNG and JSON files as undeclared outputs. + **kwargs + ) diff --git a/gm/animated_gif.cpp b/gm/animated_gif.cpp index 398ef211efe4..b3eb299cbfff 100644 --- a/gm/animated_gif.cpp +++ b/gm/animated_gif.cpp @@ -174,8 +174,7 @@ class AnimatedGifGM : public skiagm::GM { return true; } }; -DEF_GM(return new AnimatedGifGM); - +DEF_GM(return new AnimatedGifGM;) static std::unique_ptr load_codec(const char filename[]) { return SkCodec::MakeFromData(SkData::MakeFromFileName(filename)); @@ -228,7 +227,7 @@ class AnimCodecPlayerGM : public skiagm::GM { return true; } }; -DEF_GM(return new AnimCodecPlayerGM); +DEF_GM(return new AnimCodecPlayerGM;) class AnimCodecPlayerExifGM : public skiagm::GM { const char* fPath; diff --git a/gm/anisotropic.cpp b/gm/anisotropic.cpp index e0f60cc34fb2..01e3cc658a3f 100644 --- a/gm/anisotropic.cpp +++ b/gm/anisotropic.cpp @@ -194,7 +194,7 @@ class AnisoMipsGM : public GM { surface = SkSurfaces::RenderTarget(rc, skgpu::Budgeted::kYes, ii, - 1, + /* sampleCount= */ 1, kTopLeft_GrSurfaceOrigin, /*surfaceProps=*/nullptr, /*shouldCreateWithMips=*/true); diff --git a/gm/arithmode.cpp b/gm/arithmode.cpp index 08bdc8d3040a..8424b16985c0 100644 --- a/gm/arithmode.cpp +++ b/gm/arithmode.cpp @@ -26,6 +26,7 @@ #include "include/core/SkTypes.h" #include "include/effects/SkGradientShader.h" #include "include/effects/SkImageFilters.h" +#include "include/effects/SkRuntimeEffect.h" #include "tools/ToolUtils.h" #include diff --git a/gm/asyncrescaleandread.cpp b/gm/asyncrescaleandread.cpp index 7a2d141c4f1d..5414fcc9c3b5 100644 --- a/gm/asyncrescaleandread.cpp +++ b/gm/asyncrescaleandread.cpp @@ -23,6 +23,12 @@ #include "tools/ToolUtils.h" #include "tools/gpu/YUVUtils.h" +#if defined(SK_GRAPHITE) +#include "include/gpu/graphite/Context.h" +#include "include/gpu/graphite/Image.h" +#include "src/gpu/graphite/RecorderPriv.h" +#endif + namespace { struct AsyncContext { bool fCalled = false; @@ -37,27 +43,54 @@ static void async_callback(void* c, std::unique_ptr(c); context->fResult = std::move(result); context->fCalled = true; -}; +} // Draws the image to a surface, does a asyncRescaleAndReadPixels of the image, and then sticks // the result in a raster image. template static sk_sp do_read_and_scale(Src* src, GrDirectContext* direct, + skgpu::graphite::Recorder* recorder, const SkIRect& srcRect, const SkImageInfo& ii, SkImage::RescaleGamma rescaleGamma, SkImage::RescaleMode rescaleMode) { auto* asyncContext = new AsyncContext(); - src->asyncRescaleAndReadPixels(ii, srcRect, rescaleGamma, rescaleMode, async_callback, - asyncContext); - if (direct) { - direct->submit(); - } - while (!asyncContext->fCalled) { - // Only GPU should actually be asynchronous. - SkASSERT(direct); - direct->checkAsyncWorkCompletion(); + if (recorder) { +#if defined(SK_GRAPHITE) + skgpu::graphite::Context* graphiteContext = recorder->priv().context(); + if (!graphiteContext) { + return nullptr; + } + // We need to flush the existing drawing commands before we try to read + std::unique_ptr recording = recorder->snap(); + if (!recording) { + return nullptr; + } + skgpu::graphite::InsertRecordingInfo recordingInfo; + recordingInfo.fRecording = recording.get(); + if (!graphiteContext->insertRecording(recordingInfo)) { + return nullptr; + } + + graphiteContext->asyncRescaleAndReadPixels(src, ii, srcRect, rescaleGamma, rescaleMode, + async_callback, asyncContext); + graphiteContext->submit(); + while (!asyncContext->fCalled) { + graphiteContext->checkAsyncWorkCompletion(); + } +#endif + } else { + src->asyncRescaleAndReadPixels(ii, srcRect, rescaleGamma, rescaleMode, async_callback, + asyncContext); + if (direct) { + direct->submit(); + } + while (!asyncContext->fCalled) { + // Only GPU should actually be asynchronous. + SkASSERT(direct); + direct->checkAsyncWorkCompletion(); + } } if (!asyncContext->fResult) { return nullptr; @@ -70,7 +103,9 @@ static sk_sp do_read_and_scale(Src* src, template static sk_sp do_read_and_scale_yuv(Src* src, GrDirectContext* direct, + skgpu::graphite::Recorder* recorder, SkYUVColorSpace yuvCS, + bool readAlpha, const SkIRect& srcRect, SkISize size, SkImage::RescaleGamma rescaleGamma, @@ -79,54 +114,117 @@ static sk_sp do_read_and_scale_yuv(Src* src, SkASSERT(!(size.width() & 0b1) && !(size.height() & 0b1)); SkISize uvSize = {size.width()/2, size.height()/2}; - SkImageInfo yII = SkImageInfo::Make(size, kGray_8_SkColorType, kPremul_SkAlphaType); + SkImageInfo yaII = SkImageInfo::Make(size , kGray_8_SkColorType, kPremul_SkAlphaType); SkImageInfo uvII = SkImageInfo::Make(uvSize, kGray_8_SkColorType, kPremul_SkAlphaType); AsyncContext asyncContext; - src->asyncRescaleAndReadPixelsYUV420(yuvCS, SkColorSpace::MakeSRGB(), srcRect, size, - rescaleGamma, rescaleMode, async_callback, &asyncContext); - if (direct) { - direct->submit(); - } - while (!asyncContext.fCalled) { - // Only GPU should actually be asynchronous. - SkASSERT(direct); - direct->checkAsyncWorkCompletion(); + if (recorder) { +#if defined(SK_GRAPHITE) + skgpu::graphite::Context* graphiteContext = recorder->priv().context(); + if (!graphiteContext) { + return nullptr; + } + // We need to flush the existing drawing commands before we try to read + std::unique_ptr recording = recorder->snap(); + if (!recording) { + return nullptr; + } + skgpu::graphite::InsertRecordingInfo recordingInfo; + recordingInfo.fRecording = recording.get(); + if (!graphiteContext->insertRecording(recordingInfo)) { + return nullptr; + } + + if (readAlpha) { + graphiteContext->asyncRescaleAndReadPixelsYUVA420(src, yuvCS, SkColorSpace::MakeSRGB(), + srcRect, size, rescaleGamma, + rescaleMode, async_callback, + &asyncContext); + } else { + graphiteContext->asyncRescaleAndReadPixelsYUV420(src, yuvCS, SkColorSpace::MakeSRGB(), + srcRect, size, rescaleGamma, + rescaleMode, async_callback, + &asyncContext); + } + graphiteContext->submit(); + while (!asyncContext.fCalled) { + graphiteContext->checkAsyncWorkCompletion(); + } +#endif + } else { + if (readAlpha) { + src->asyncRescaleAndReadPixelsYUVA420(yuvCS, SkColorSpace::MakeSRGB(), + srcRect, size, rescaleGamma, rescaleMode, + async_callback, &asyncContext); + } else { + src->asyncRescaleAndReadPixelsYUV420(yuvCS, SkColorSpace::MakeSRGB(), + srcRect, size, rescaleGamma, rescaleMode, + async_callback, &asyncContext); + } + if (direct) { + direct->submit(); + } + while (!asyncContext.fCalled) { + // Only GPU should actually be asynchronous. + SkASSERT(direct); + direct->checkAsyncWorkCompletion(); + } } if (!asyncContext.fResult) { return nullptr; } + auto planeConfig = readAlpha ? SkYUVAInfo::PlaneConfig::kY_U_V_A + : SkYUVAInfo::PlaneConfig::kY_U_V; SkYUVAInfo yuvaInfo(size, - SkYUVAInfo::PlaneConfig::kY_U_V, + planeConfig, SkYUVAInfo::Subsampling::k420, yuvCS); - SkPixmap yuvPMs[] = { - {yII, asyncContext.fResult->data(0), asyncContext.fResult->rowBytes(0)}, + SkPixmap yuvPMs[4] = { + {yaII, asyncContext.fResult->data(0), asyncContext.fResult->rowBytes(0)}, {uvII, asyncContext.fResult->data(1), asyncContext.fResult->rowBytes(1)}, - {uvII, asyncContext.fResult->data(2), asyncContext.fResult->rowBytes(2)} + {uvII, asyncContext.fResult->data(2), asyncContext.fResult->rowBytes(2)}, + {}, }; + if (readAlpha) { + yuvPMs[3] = {yaII, asyncContext.fResult->data(3), asyncContext.fResult->rowBytes(3)}; + } auto pixmaps = SkYUVAPixmaps::FromExternalPixmaps(yuvaInfo, yuvPMs); SkASSERT(pixmaps.isValid()); auto lazyYUVImage = sk_gpu_test::LazyYUVImage::Make(pixmaps); SkASSERT(lazyYUVImage); - return lazyYUVImage->refImage(direct, sk_gpu_test::LazyYUVImage::Type::kFromTextures); +#if defined(SK_GRAPHITE) + if (recorder) { + return lazyYUVImage->refImage(recorder, sk_gpu_test::LazyYUVImage::Type::kFromTextures); + } else +#endif + { + return lazyYUVImage->refImage(direct, sk_gpu_test::LazyYUVImage::Type::kFromTextures); + } } +enum class ReadSource { + kImage, + kSurface, +}; + +enum class Type { + kRGBA, + kYUV, + kYUVA +}; + // Draws a grid of rescales. The columns are none, low, and high filter quality. The rows are // rescale in src gamma and rescale in linear gamma. template static skiagm::DrawResult do_rescale_grid(SkCanvas* canvas, Src* src, GrDirectContext* direct, + skgpu::graphite::Recorder* recorder, const SkIRect& srcRect, SkISize newSize, - bool doYUV420, + Type type, SkString* errorMsg, int pad = 0) { - if (doYUV420 && !direct) { - errorMsg->printf("YUV420 only supported on direct GPU for now."); - return skiagm::DrawResult::kSkip; - } if (canvas->imageInfo().colorType() == kUnknown_SkColorType) { *errorMsg = "Not supported on recording/vector backends."; return skiagm::DrawResult::kSkip; @@ -143,21 +241,27 @@ static skiagm::DrawResult do_rescale_grid(SkCanvas* canvas, SkImage::RescaleMode::kRepeatedCubic}) { SkScopeExit cleanup; sk_sp result; - if (doYUV420) { - result = do_read_and_scale_yuv(src, direct, yuvColorSpace, srcRect, newSize, gamma, - mode, &cleanup); - if (!result) { - errorMsg->printf("YUV420 async call failed. Allowed for now."); - return skiagm::DrawResult::kSkip; - } - int nextCS = static_cast(yuvColorSpace + 1) % (kLastEnum_SkYUVColorSpace + 1); - yuvColorSpace = static_cast(nextCS); - } else { - result = do_read_and_scale(src, direct, srcRect, ii, gamma, mode); - if (!result) { - errorMsg->printf("async read call failed."); - return skiagm::DrawResult::kFail; - } + switch (type) { + case Type::kRGBA: + result = do_read_and_scale(src, direct, recorder, srcRect, ii, gamma, mode); + if (!result) { + errorMsg->printf("async read call failed."); + return skiagm::DrawResult::kFail; + } + break; + case Type::kYUV: + case Type::kYUVA: + result = do_read_and_scale_yuv(src, direct, recorder, yuvColorSpace, + /*readAlpha=*/type == Type::kYUVA, srcRect, + newSize, gamma, mode, &cleanup); + if (!result) { + errorMsg->printf("YUV[A]420 async call failed. Allowed for now."); + return skiagm::DrawResult::kSkip; + } + int nextCS = + static_cast(yuvColorSpace + 1) % (kLastEnum_SkYUVColorSpace + 1); + yuvColorSpace = static_cast(nextCS); + break; } canvas->drawImage(result, 0, 0); canvas->translate(newSize.width() + pad, 0); @@ -173,8 +277,8 @@ static skiagm::DrawResult do_rescale_image_grid(SkCanvas* canvas, const char* imageFile, const SkIRect& srcRect, SkISize newSize, - bool doSurface, - bool doYUV420, + ReadSource source, + Type type, SkString* errorMsg) { auto image = GetResourceAsImage(imageFile); if (!image) { @@ -191,90 +295,127 @@ static skiagm::DrawResult do_rescale_image_grid(SkCanvas* canvas, *errorMsg = "Not supported in DDL mode"; return skiagm::DrawResult::kSkip; } - - if (doSurface) { - // Turn the image into a surface in order to call the read and rescale API - auto surfInfo = image->imageInfo().makeDimensions(image->dimensions()); - auto surface = canvas->makeSurface(surfInfo); - if (!surface && surfInfo.colorType() == kBGRA_8888_SkColorType) { - surfInfo = surfInfo.makeColorType(kRGBA_8888_SkColorType); - surface = canvas->makeSurface(surfInfo); - } - if (!surface) { - *errorMsg = "Could not create surface for image."; - // When testing abandoned GrContext we expect surface creation to fail. - if (canvas->recordingContext() && canvas->recordingContext()->abandoned()) { - return skiagm::DrawResult::kSkip; + auto recorder = canvas->recorder(); + + switch (source) { + case ReadSource::kImage: +#if defined(SK_GRAPHITE) + if (recorder) { + image = SkImages::TextureFromImage(recorder, image); + if (!image) { + *errorMsg = "Could not create image."; + return skiagm::DrawResult::kFail; + } + } else +#endif + if (dContext) { + image = SkImages::TextureFromImage(dContext, image); + if (!image) { + *errorMsg = "Could not create image."; + // When testing abandoned GrContext we expect surface creation to fail. + if (canvas->recordingContext() && canvas->recordingContext()->abandoned()) { + return skiagm::DrawResult::kSkip; + } + return skiagm::DrawResult::kFail; + } } - return skiagm::DrawResult::kFail; - } - SkPaint paint; - paint.setBlendMode(SkBlendMode::kSrc); - surface->getCanvas()->drawImage(image, 0, 0, SkSamplingOptions(), &paint); - return do_rescale_grid(canvas, surface.get(), dContext, srcRect, newSize, - doYUV420, errorMsg); - } else if (dContext) { - image = SkImages::TextureFromImage(dContext, image); - if (!image) { - *errorMsg = "Could not create image."; - // When testing abandoned GrContext we expect surface creation to fail. - if (canvas->recordingContext() && canvas->recordingContext()->abandoned()) { - return skiagm::DrawResult::kSkip; + return do_rescale_grid(canvas, image.get(), dContext, recorder, srcRect, newSize, type, + errorMsg); + case ReadSource::kSurface: + // Turn the image into a surface in order to call the read and rescale API + auto surfInfo = image->imageInfo().makeDimensions(image->dimensions()); + auto surface = canvas->makeSurface(surfInfo); + if (!surface && surfInfo.colorType() == kBGRA_8888_SkColorType) { + surfInfo = surfInfo.makeColorType(kRGBA_8888_SkColorType); + surface = canvas->makeSurface(surfInfo); } - return skiagm::DrawResult::kFail; - } + if (!surface) { + *errorMsg = "Could not create surface for image."; + // When testing abandoned GrContext we expect surface creation to fail. + if (canvas->recordingContext() && canvas->recordingContext()->abandoned()) { + return skiagm::DrawResult::kSkip; + } + return skiagm::DrawResult::kFail; + } + SkPaint paint; + paint.setBlendMode(SkBlendMode::kSrc); + surface->getCanvas()->drawImage(image, 0, 0, SkSamplingOptions(), &paint); + return do_rescale_grid(canvas, surface.get(), dContext, recorder, srcRect, newSize, + type, errorMsg); } - return do_rescale_grid(canvas, image.get(), dContext, srcRect, newSize, doYUV420, - errorMsg); + SkUNREACHABLE; } -#define DEF_RESCALE_AND_READ_SURF_GM(IMAGE_FILE, TAG, SRC_RECT, W, H) \ +#define DEF_RESCALE_AND_READ_GM(IMAGE_FILE, TAG, SRC_RECT, W, H, SOURCE, TYPE) \ DEF_SIMPLE_GM_CAN_FAIL(async_rescale_and_read_##TAG, canvas, errorMsg, 3 * W, 2 * H) { \ ToolUtils::draw_checkerboard(canvas, SK_ColorDKGRAY, SK_ColorLTGRAY, 25); \ - return do_rescale_image_grid(canvas, #IMAGE_FILE, SRC_RECT, {W, H}, true, false, \ - errorMsg); \ - } - -#define DEF_RESCALE_AND_READ_YUV_SURF_GM(IMAGE_FILE, TAG, SRC_RECT, W, H) \ - DEF_SIMPLE_GM_CAN_FAIL(async_rescale_and_read_yuv420_##TAG, canvas, errorMsg, 3 * W, 2 * H) { \ - ToolUtils::draw_checkerboard(canvas, SK_ColorDKGRAY, SK_ColorLTGRAY, 25); \ - return do_rescale_image_grid(canvas, #IMAGE_FILE, SRC_RECT, {W, H}, true, true, errorMsg); \ + return do_rescale_image_grid( \ + canvas, #IMAGE_FILE, SRC_RECT, {W, H}, SOURCE, TYPE, errorMsg); \ } -#define DEF_RESCALE_AND_READ_IMG_GM(IMAGE_FILE, TAG, SRC_RECT, W, H) \ - DEF_SIMPLE_GM_CAN_FAIL(async_rescale_and_read_##TAG, canvas, errorMsg, 3 * W, 2 * H) { \ - ToolUtils::draw_checkerboard(canvas, SK_ColorDKGRAY, SK_ColorLTGRAY, 25); \ - return do_rescale_image_grid(canvas, #IMAGE_FILE, SRC_RECT, {W, H}, false, false, \ - errorMsg); \ - } - -#define DEF_RESCALE_AND_READ_YUV_IMG_GM(IMAGE_FILE, TAG, SRC_RECT, W, H) \ - DEF_SIMPLE_GM_CAN_FAIL(async_rescale_and_read_yuv420_##TAG, canvas, errorMsg, 3 * W, 2 * H) { \ - ToolUtils::draw_checkerboard(canvas, SK_ColorDKGRAY, SK_ColorLTGRAY, 25); \ - return do_rescale_image_grid(canvas, #IMAGE_FILE, SRC_RECT, {W, H}, true, true, errorMsg); \ - } - -DEF_RESCALE_AND_READ_YUV_SURF_GM( - images/yellow_rose.webp, rose, SkIRect::MakeXYWH(50, 5, 200, 150), 410, 376) - -DEF_RESCALE_AND_READ_YUV_IMG_GM( - images/yellow_rose.webp, rose_down, SkIRect::MakeXYWH(50, 5, 200, 150), 106, 60) - -DEF_RESCALE_AND_READ_SURF_GM( - images/yellow_rose.webp, rose, SkIRect::MakeXYWH(100, 20, 100, 100), 410, 410) - -DEF_RESCALE_AND_READ_SURF_GM(images/dog.jpg, dog_down, SkIRect::MakeXYWH(0, 10, 180, 150), 45, 45) -DEF_RESCALE_AND_READ_IMG_GM(images/dog.jpg, dog_up, SkIRect::MakeWH(180, 180), 800, 400) - -DEF_RESCALE_AND_READ_IMG_GM( - images/text.png, text_down, SkIRect::MakeWH(637, 105), (int)(0.7 * 637), (int)(0.7 * 105)) -DEF_RESCALE_AND_READ_SURF_GM( - images/text.png, text_up, SkIRect::MakeWH(637, 105), (int)(1.2 * 637), (int)(1.2 * 105)) -DEF_RESCALE_AND_READ_IMG_GM(images/text.png, - text_up_large, - SkIRect::MakeXYWH(300, 0, 300, 105), - (int)(2.4 * 300), - (int)(2.4 * 105)) +DEF_RESCALE_AND_READ_GM(images/yellow_rose.webp, + yuv420_rose, + SkIRect::MakeXYWH(50, 5, 200, 150), + 410, + 376, + ReadSource::kSurface, + Type::kYUVA) + +DEF_RESCALE_AND_READ_GM(images/yellow_rose.webp, + yuv420_rose_down, + SkIRect::MakeXYWH(50, 5, 200, 150), + 106, + 60, + ReadSource::kImage, + Type::kYUV) + +DEF_RESCALE_AND_READ_GM(images/yellow_rose.webp, + rose, + SkIRect::MakeXYWH(100, 20, 100, 100), + 410, + 410, + ReadSource::kSurface, + Type::kRGBA) + +DEF_RESCALE_AND_READ_GM(images/dog.jpg, + dog_down, + SkIRect::MakeXYWH(0, 10, 180, 150), + 45, + 45, + ReadSource::kSurface, + Type::kRGBA) + +DEF_RESCALE_AND_READ_GM(images/dog.jpg, + dog_up, + SkIRect::MakeWH(180, 180), + 800, + 400, + ReadSource::kImage, + Type::kRGBA) + +DEF_RESCALE_AND_READ_GM(images/text.png, + text_down, + SkIRect::MakeWH(637, 105), + (int)(0.7 * 637), + (int)(0.7 * 105), + ReadSource::kImage, + Type::kRGBA) + +DEF_RESCALE_AND_READ_GM(images/text.png, + text_up, + SkIRect::MakeWH(637, 105), + (int)(1.2 * 637), + (int)(1.2 * 105), + ReadSource::kSurface, + Type::kRGBA) + +DEF_RESCALE_AND_READ_GM(images/text.png, + text_up_large, + SkIRect::MakeXYWH(300, 0, 300, 105), + (int)(2.4 * 300), + (int)(2.4 * 105), + ReadSource::kImage, + Type::kRGBA) // Exercises non-scaling YUV420. Reads from the original canvas's surface in order to // exercise case where source surface is not a texture (in glbert config). @@ -298,10 +439,12 @@ DEF_SIMPLE_GM_CAN_FAIL(async_yuv_no_scale, canvas, errorMsg, 400, 300) { SkPaint paint; canvas->drawImage(image.get(), 0, 0); + skgpu::graphite::Recorder* recorder = canvas->recorder(); SkScopeExit scopeExit; - auto yuvImage = do_read_and_scale_yuv( - surface, dContext, kRec601_SkYUVColorSpace, SkIRect::MakeWH(400, 300), - {400, 300}, SkImage::RescaleGamma::kSrc, SkImage::RescaleMode::kNearest, &scopeExit); + auto yuvImage = do_read_and_scale_yuv(surface, dContext, recorder, kRec601_SkYUVColorSpace, + /*readAlpha=*/false, SkIRect::MakeWH(400, 300), + {400, 300}, SkImage::RescaleGamma::kSrc, + SkImage::RescaleMode::kNearest, &scopeExit); canvas->clear(SK_ColorWHITE); canvas->drawImage(yuvImage.get(), 0, 0); @@ -320,6 +463,7 @@ DEF_SIMPLE_GM_CAN_FAIL(async_rescale_and_read_no_bleed, canvas, errorMsg, 60, 60 *errorMsg = "Not supported in DDL mode"; return skiagm::DrawResult::kSkip; } + auto recorder = canvas->recorder(); static constexpr int kBorder = 5; static constexpr int kInner = 5; @@ -345,16 +489,16 @@ DEF_SIMPLE_GM_CAN_FAIL(async_rescale_and_read_no_bleed, canvas, errorMsg, 60, 60 canvas->translate(kPad, kPad); skiagm::DrawResult result; SkISize downSize = {static_cast(kInner/2), static_cast(kInner / 2)}; - result = do_rescale_grid(canvas, surface.get(), dContext, srcRect, downSize, false, errorMsg, - kPad); + result = do_rescale_grid(canvas, surface.get(), dContext, recorder, srcRect, downSize, + Type::kRGBA, errorMsg, kPad); if (result != skiagm::DrawResult::kOk) { return result; } canvas->translate(0, 4 * downSize.height()); SkISize upSize = {static_cast(kInner * 3.5), static_cast(kInner * 4.6)}; - result = do_rescale_grid(canvas, surface.get(), dContext, srcRect, upSize, false, errorMsg, - kPad); + result = do_rescale_grid(canvas, surface.get(), dContext, recorder, srcRect, upSize, + Type::kRGBA, errorMsg, kPad); if (result != skiagm::DrawResult::kOk) { return result; } diff --git a/gm/bleed.cpp b/gm/bleed.cpp index 2dd4475ba885..3fa32138d6a7 100644 --- a/gm/bleed.cpp +++ b/gm/bleed.cpp @@ -31,6 +31,10 @@ #include "src/core/SkBlurMask.h" #include "tools/ToolUtils.h" +#if defined(SK_GRAPHITE) +#include "include/gpu/graphite/ContextOptions.h" +#endif + /** Creates an image with two one-pixel wide borders around a checkerboard. The checkerboard is 2x2 checks where each check has as many pixels as is necessary to fill the interior. It returns the image and a src rect that bounds the checkerboard portion. */ @@ -102,8 +106,7 @@ std::tuple, SkRect> make_ringed_image(SkCanvas* canvas, int width scanline[x] = kOuterRingColor; } bitmap.setImmutable(); - return { ToolUtils::MakeTextureImage(canvas, bitmap.asImage()), - SkRect::Make({2, 2, width - 2, height - 2})}; + return { bitmap.asImage(), SkRect::Make({2, 2, width - 2, height - 2})}; } /** @@ -113,11 +116,9 @@ std::tuple, SkRect> make_ringed_image(SkCanvas* canvas, int width */ class SrcRectConstraintGM : public skiagm::GM { public: - SrcRectConstraintGM(const char* shortName, SkCanvas::SrcRectConstraint constraint, - bool batch, bool manual) + SrcRectConstraintGM(const char* shortName, SkCanvas::SrcRectConstraint constraint, bool manual) : fShortName(shortName) , fConstraint(constraint) - , fBatch(batch) , fManual(manual) { // Make sure GPU SkSurfaces can be created for this GM. SkASSERT(this->onISize().width() <= kMaxTextureSize && @@ -130,28 +131,11 @@ class SrcRectConstraintGM : public skiagm::GM { void drawImage(SkCanvas* canvas, sk_sp image, SkRect srcRect, SkRect dstRect, const SkSamplingOptions& sampling, SkPaint* paint) { - if (fBatch) { - if (!image) { - return; - } - - SkCanvas::ImageSetEntry imageSetEntry[1]; - imageSetEntry[0].fImage = image; - imageSetEntry[0].fSrcRect = srcRect; - imageSetEntry[0].fDstRect = dstRect; - imageSetEntry[0].fAAFlags = paint->isAntiAlias() ? SkCanvas::kAll_QuadAAFlags - : SkCanvas::kNone_QuadAAFlags; - canvas->experimental_DrawEdgeAAImageSet(imageSetEntry, std::size(imageSetEntry), - /*dstClips=*/nullptr, - /*preViewMatrices=*/nullptr, - sampling, paint, fConstraint); + if (fManual) { + SkTiledImageUtils::DrawImageRect(canvas, image.get(), srcRect, dstRect, + sampling, paint, fConstraint); } else { - if (fManual) { - SkTiledImageUtils::DrawImageRect(canvas, image.get(), srcRect, dstRect, - sampling, paint, fConstraint); - } else { - canvas->drawImageRect(image.get(), srcRect, dstRect, sampling, paint, fConstraint); - } + canvas->drawImageRect(image.get(), srcRect, dstRect, sampling, paint, fConstraint); } } @@ -312,6 +296,12 @@ class SrcRectConstraintGM : public skiagm::GM { options->fMaxTextureSizeOverride = kMaxTextureSize; } +#if defined(SK_GRAPHITE) + void modifyGraphiteContextOptions(skgpu::graphite::ContextOptions* options) const override { + options->fMaxTextureSizeOverride = kMaxTextureSize; + } +#endif + private: inline static constexpr int kBlockSize = 70; inline static constexpr int kBlockSpacing = 12; @@ -337,36 +327,29 @@ class SrcRectConstraintGM : public skiagm::GM { SkRect fBigSrcRect; SkRect fSmallSrcRect; SkCanvas::SrcRectConstraint fConstraint; - bool fBatch = false; bool fManual; using INHERITED = GM; }; DEF_GM(return new SrcRectConstraintGM("strict_constraint_no_red_allowed", SkCanvas::kStrict_SrcRectConstraint, - /* batch= */ false, /* manual= */ false);); DEF_GM(return new SrcRectConstraintGM("strict_constraint_no_red_allowed_manual", SkCanvas::kStrict_SrcRectConstraint, - /* batch= */ false, /* manual= */ true);); DEF_GM(return new SrcRectConstraintGM("strict_constraint_batch_no_red_allowed", SkCanvas::kStrict_SrcRectConstraint, - /* batch= */ true, /* manual= */ false);); DEF_GM(return new SrcRectConstraintGM("strict_constraint_batch_no_red_allowed_manual", SkCanvas::kStrict_SrcRectConstraint, - /* batch= */ true, /* manual= */ true);); DEF_GM(return new SrcRectConstraintGM("fast_constraint_red_is_allowed", SkCanvas::kFast_SrcRectConstraint, - /* batch= */ false, /* manual= */ false);); DEF_GM(return new SrcRectConstraintGM("fast_constraint_red_is_allowed_manual", SkCanvas::kFast_SrcRectConstraint, - /* batch= */ false, /* manual= */ true);); /////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/gm/blurrect.cpp b/gm/blurrect.cpp index 5a29f778f01e..089f3fb6b82a 100644 --- a/gm/blurrect.cpp +++ b/gm/blurrect.cpp @@ -212,13 +212,13 @@ DEF_SIMPLE_GM(blurrect_gallery, canvas, 1200, 1024) { for (size_t k = 0 ; k < std::size(styles) ; k++) { SkBlurStyle style = styles[k]; - SkMask mask; + SkMaskBuilder mask; if (!SkBlurMask::BlurRect(SkBlurMask::ConvertRadiusToSigma(radius), &mask, r, style)) { continue; } - SkAutoMaskFreeImage amfi(mask.fImage); + SkAutoMaskFreeImage amfi(mask.image()); SkBitmap bm; bm.installMaskPixels(mask); diff --git a/gm/circulararcs.cpp b/gm/circulararcs.cpp index 62d3318226da..3be666339230 100644 --- a/gm/circulararcs.cpp +++ b/gm/circulararcs.cpp @@ -36,12 +36,12 @@ constexpr SkScalar kDiameter = 40.f; constexpr SkRect kRect = {0.f, 0.f, kDiameter, kDiameter}; constexpr int kW = 1000; constexpr int kH = 1000; -constexpr SkScalar kPad = 20.f; void draw_arcs(SkCanvas* canvas, std::function configureStyle) { // Draws grid of arcs with different start/sweep angles in red and their complement arcs in // blue. auto drawGrid = [canvas, &configureStyle] (SkScalar x, SkScalar y, bool useCenter, bool aa) { + constexpr SkScalar kPad = 20.f; SkPaint p0; p0.setColor(SK_ColorRED); p0.setAntiAlias(aa); @@ -198,6 +198,7 @@ DEF_SIMPLE_GM(circular_arcs_weird, canvas, 1000, 400) { constexpr SkScalar kDashIntervals[] = {kS / 15, 2 * kS / 15}; paints.back().setPathEffect(SkDashPathEffect::Make(kDashIntervals, 2, 0.f)); + constexpr SkScalar kPad = 20.f; canvas->translate(kPad, kPad); // This loop should draw nothing. for (auto arc : noDrawArcs) { diff --git a/gm/clockwise.cpp b/gm/clockwise.cpp index 9c029a883d79..e58137351fe4 100644 --- a/gm/clockwise.cpp +++ b/gm/clockwise.cpp @@ -281,7 +281,7 @@ DrawResult ClockwiseGM::onDraw(GrRecordingContext* rContext, SkCanvas* canvas, S {100, 200}, SkSurfaceProps(), /*label=*/{}, - 1, + /* sampleCnt= */ 1, GrMipmapped::kNo, GrProtected::kNo, kTopLeft_GrSurfaceOrigin, @@ -311,12 +311,7 @@ DrawResult ClockwiseGM::onDraw(GrRecordingContext* rContext, SkCanvas* canvas, S SkBackingFit::kExact, {100, 200}, SkSurfaceProps(), - /*label=*/{}, - 1, - GrMipmapped::kNo, - GrProtected::kNo, - kBottomLeft_GrSurfaceOrigin, - skgpu::Budgeted::kYes)) { + /*label=*/{})) { topLeftSDC->clear(SK_PMColor4fTRANSPARENT); topLeftSDC->addDrawOp(ClockwiseTestOp::Make(rContext, false, 0)); topLeftSDC->addDrawOp(ClockwiseTestOp::Make(rContext, true, 100)); diff --git a/gm/colorspace.cpp b/gm/colorspace.cpp index 942e28a20c6f..cf4ad2c8f35b 100644 --- a/gm/colorspace.cpp +++ b/gm/colorspace.cpp @@ -89,7 +89,7 @@ static void draw_colorspace_gm(Strategy strategy, SkCanvas* canvas) { switch (strategy) { case SkImage_makeColorSpace: { - canvas->drawImage(img->makeColorSpace(midCS), 0,0); + canvas->drawImage(img->makeColorSpace(nullptr, midCS), 0,0); } break; case SkCanvas_makeSurface: { diff --git a/gm/crop_imagefilter.cpp b/gm/crop_imagefilter.cpp index eb8c126b9443..ea261e5854da 100644 --- a/gm/crop_imagefilter.cpp +++ b/gm/crop_imagefilter.cpp @@ -87,6 +87,8 @@ void get_example_rects(CropRelation outputRelation, CropRelation inputRelation, break; } + SkAssertResult(cropRect->intersect(kExampleBounds)); + // Determine content bounds for example based on computed crop rect and input relation if (hintContent) { switch(inputRelation) { @@ -109,6 +111,8 @@ void get_example_rects(CropRelation outputRelation, CropRelation inputRelation, SkASSERT(!contentBounds->intersects(*cropRect)); break; } + + SkAssertResult(contentBounds->intersect(kExampleBounds)); } else { *contentBounds = kExampleBounds; } @@ -121,7 +125,7 @@ sk_sp make_image(SkCanvas* canvas, const SkRect* contentBounds) { const float h = kExampleBounds.height(); const auto srcII = SkImageInfo::Make(SkISize::Make(SkScalarCeilToInt(w), SkScalarCeilToInt(h)), - kRGBA_8888_SkColorType, kPremul_SkAlphaType); + kN32_SkColorType, kPremul_SkAlphaType); auto surf = SkSurfaces::Raster(srcII); surf->getCanvas()->drawColor(SK_ColorDKGRAY); @@ -152,56 +156,83 @@ sk_sp make_image(SkCanvas* canvas, const SkRect* contentBounds) { // Fill everything outside of the content bounds with red since it shouldn't be sampled from. if (contentBounds) { - surf->getCanvas()->clipRect(*contentBounds, SkClipOp::kDifference); + SkRect buffer = contentBounds->makeOutset(1.f, 1.f); + surf->getCanvas()->clipRect(buffer, SkClipOp::kDifference); surf->getCanvas()->clear(SK_ColorRED); } return surf->makeImageSnapshot(); } -void draw_example( +// Subset 'image' to contentBounds, apply 'contentTile' mode to fill 'cropRect'-sized image. +sk_sp make_cropped_image(sk_sp image, + const SkRect& contentBounds, + SkTileMode contentTile, + const SkRect& cropRect) { + auto surface = SkSurfaces::Raster( + image->imageInfo().makeWH(SkScalarCeilToInt(cropRect.width()), + SkScalarCeilToInt(cropRect.height()))); + auto content = image->makeSubset(nullptr, + contentTile == SkTileMode::kDecal ? contentBounds.roundOut() + : contentBounds.roundIn()); + if (!content || !surface) { + return nullptr; + } + SkPaint tiledContent; + tiledContent.setShader(content->makeShader(contentTile, contentTile, + SkFilterMode::kNearest, + SkMatrix::Translate(contentBounds.left(), + contentBounds.top()))); + surface->getCanvas()->translate(-cropRect.left(), -cropRect.top()); + surface->getCanvas()->drawPaint(tiledContent); + return surface->makeImageSnapshot(); +} + +void draw_example_tile( SkCanvas* canvas, - SkTileMode inputMode, // the tile mode of the input to the crop filter - SkTileMode outputMode, // the tile mode that the crop filter outputs - CropRelation outputRelation, // how crop rect relates to output bounds - CropRelation inputRelation, // how crop rect relates to content bounds - bool hintContent) { // whether or not contentBounds is hinted to saveLayer() - SkASSERT(inputMode == SkTileMode::kDecal && outputMode == SkTileMode::kDecal); + SkTileMode inputMode, // the tile mode applied to content bounds + CropRelation inputRelation, // how crop rect relates to content bounds + bool hintContent, // whether or not contentBounds is hinted to saveLayer() + SkTileMode outputMode, // the tile mode applied to the crop rect output + CropRelation outputRelation) {// how crop rect relates to output bounds (clip pre-saveLayer) // Determine crop rect for example based on output relation SkRect outputBounds, cropRect, contentBounds; get_example_rects(outputRelation, inputRelation, hintContent, &outputBounds, &cropRect, &contentBounds); + SkASSERT(kExampleBounds.contains(outputBounds) && + kExampleBounds.contains(cropRect) && + kExampleBounds.contains(contentBounds)); auto image = make_image(canvas, hintContent ? &contentBounds : nullptr); canvas->save(); - canvas->clipRect(kExampleBounds); - // Visualize the image tiled on the content bounds, semi-transparent + // Visualize the image tiled on the content bounds (blue border) and then tiled on the crop + // rect (green) border, semi-transparent { - SkRect clippedContentBounds; - if (clippedContentBounds.intersect(contentBounds, kExampleBounds)) { - auto contentImage = ToolUtils::MakeTextureImage( - canvas, image->makeSubset(nullptr, clippedContentBounds.roundOut())); - if (contentImage) { - SkPaint tiledPaint; - tiledPaint.setShader(contentImage->makeShader( - inputMode, inputMode, SkSamplingOptions(SkFilterMode::kLinear))); - tiledPaint.setAlphaf(0.15f); - - canvas->save(); - canvas->translate(clippedContentBounds.fLeft, clippedContentBounds.fTop); - canvas->drawPaint(tiledPaint); - canvas->restore(); - } + auto cropImage = ToolUtils::MakeTextureImage( + canvas, make_cropped_image(image, contentBounds, inputMode, cropRect)); + if (cropImage) { + SkPaint tiledPaint; + tiledPaint.setShader(cropImage->makeShader(outputMode, outputMode, + SkFilterMode::kNearest, + SkMatrix::Translate(cropRect.left(), + cropRect.top()))); + tiledPaint.setAlphaf(0.25f); + + canvas->save(); + canvas->clipRect(kExampleBounds); + canvas->drawPaint(tiledPaint); + canvas->restore(); } } // Build filter, clip, save layer, draw, restore - the interesting part is in the tile modes // and how the various bounds intersect each other. { - sk_sp filter = SkImageFilters::Blur(4.f, 4.f, nullptr); - filter = SkMakeCropImageFilter(cropRect, std::move(filter)); + sk_sp filter = SkMakeCropImageFilter(contentBounds, inputMode, nullptr); + filter = SkImageFilters::Blur(4.f, 4.f, std::move(filter)); + filter = SkMakeCropImageFilter(cropRect, outputMode, std::move(filter)); SkPaint layerPaint; layerPaint.setImageFilter(std::move(filter)); @@ -211,8 +242,8 @@ void draw_example( auto tmp = ToolUtils::MakeTextureImage(canvas, image); canvas->drawImageRect(tmp, contentBounds, contentBounds, - SkSamplingOptions(SkFilterMode::kLinear), nullptr, - SkCanvas::kFast_SrcRectConstraint); + SkSamplingOptions(SkFilterMode::kNearest), nullptr, + SkCanvas::kStrict_SrcRectConstraint); canvas->restore(); canvas->restore(); } @@ -237,59 +268,13 @@ void draw_example( canvas->restore(); } - -// Draws 2x2 examples for a given input/output tile mode that show 4 relationships between the -// output bounds and the crop rect (intersect, output contains crop, crop contains output, and -// no intersection). -static constexpr SkRect kPaddedTileBounds = {kExampleBounds.fLeft, - kExampleBounds.fTop, - 2.f * (kExampleBounds.fRight + 1.f), - 2.f * (kExampleBounds.fBottom + 1.f)}; -void draw_example_tile( - SkCanvas* canvas, - SkTileMode inputMode, - SkTileMode outputMode, - CropRelation inputRelation, - bool hintContent) { - auto drawQuadrant = [&](int tx, int ty, CropRelation outputRelation) { - canvas->save(); - canvas->translate(tx * (kExampleBounds.fRight + 1.f), ty * (kExampleBounds.fBottom + 1.f)); - draw_example(canvas, inputMode, outputMode, outputRelation, inputRelation, hintContent); - canvas->restore(); - }; - - // The 4 examples, here Rect refers to the output bounds - drawQuadrant(0, 0, CropRelation::kCropOverlapsRect); // top left - drawQuadrant(1, 0, CropRelation::kRectContainsCrop); // top right - drawQuadrant(0, 1, CropRelation::kCropRectDisjoint); // bot left - drawQuadrant(1, 1, CropRelation::kCropContainsRect); // bot right - - // Draw dotted lines in the 1px gap between examples - SkPaint dottedLine; - dottedLine.setColor(SK_ColorGRAY); - dottedLine.setStyle(SkPaint::kStroke_Style); - dottedLine.setStrokeCap(SkPaint::kSquare_Cap); - static const float kDots[2] = {0.f, 5.f}; - dottedLine.setPathEffect(SkDashPathEffect::Make(kDots, 2, 0.f)); - - canvas->drawLine({kPaddedTileBounds.fLeft + 0.5f, kPaddedTileBounds.centerY() - 0.5f}, - {kPaddedTileBounds.fRight - 0.5f, kPaddedTileBounds.centerY() - 0.5f}, - dottedLine); - canvas->drawLine({kPaddedTileBounds.centerX() - 0.5f, kPaddedTileBounds.fTop + 0.5f}, - {kPaddedTileBounds.centerX() - 0.5f, kPaddedTileBounds.fBottom - 0.5f}, - dottedLine); -} - // Draw 5 example tiles in a column for 5 relationships between content bounds and crop rect: // no content hint, intersect, content contains crop, crop contains content, and no intersection -static constexpr SkRect kPaddedColumnBounds = {kPaddedTileBounds.fLeft, - kPaddedTileBounds.fTop, - kPaddedTileBounds.fRight, - 5.f * kPaddedTileBounds.fBottom - 1.f}; void draw_example_column( SkCanvas* canvas, SkTileMode inputMode, - SkTileMode outputMode) { + SkTileMode outputMode, + CropRelation outputRelation) { const std::pair inputRelations[5] = { { CropRelation::kCropOverlapsRect, false }, { CropRelation::kCropOverlapsRect, true }, @@ -300,25 +285,31 @@ void draw_example_column( canvas->save(); for (auto [inputRelation, hintContent] : inputRelations) { - draw_example_tile(canvas, inputMode, outputMode, inputRelation, hintContent); - canvas->translate(0.f, kPaddedTileBounds.fBottom); + draw_example_tile(canvas, inputMode, inputRelation, hintContent, + outputMode, outputRelation); + canvas->translate(0.f, kExampleBounds.fBottom + 1.f); } canvas->restore(); } -// Draw 5x1 grid of examples covering supported input tile modes and crop rect relations +// Draw 5x4 grid of examples covering supported input tile modes and crop rect relations static constexpr int kNumRows = 5; -static constexpr int kNumCols = 1; -static constexpr float kGridWidth = kNumCols * kPaddedColumnBounds.fRight - 1.f; +static constexpr int kNumCols = 4; +static constexpr float kGridWidth = kNumCols * (kExampleBounds.fRight+1.f) - 1.f; +static constexpr float kGridHeight = kNumRows * (kExampleBounds.fBottom+1.f) - 1.f; void draw_example_grid( SkCanvas* canvas, + SkTileMode inputMode, SkTileMode outputMode) { canvas->save(); - for (auto inputMode : {SkTileMode::kDecal}) { - draw_example_column(canvas, inputMode, outputMode); - canvas->translate(kPaddedColumnBounds.fRight, 0.f); + for (auto outputRelation : { CropRelation::kCropOverlapsRect, + CropRelation::kCropContainsRect, + CropRelation::kRectContainsCrop, + CropRelation::kCropRectDisjoint }) { + draw_example_column(canvas, inputMode, outputMode, outputRelation); + canvas->translate(kExampleBounds.fRight + 1.f, 0.f); } canvas->restore(); @@ -331,12 +322,13 @@ void draw_example_grid( dashedLine.setPathEffect(SkDashPathEffect::Make(kDashes, 2, 0.f)); for (int y = 1; y < kNumRows; ++y) { - canvas->drawLine({0.5f, y * kPaddedTileBounds.fBottom - 0.5f}, - {kGridWidth - 0.5f, y * kPaddedTileBounds.fBottom - 0.5f}, dashedLine); + canvas->drawLine({0.5f, y * (kExampleBounds.fBottom+1.f) - 0.5f}, + {kGridWidth - 0.5f, y * (kExampleBounds.fBottom+1.f) - 0.5f}, + dashedLine); } for (int x = 1; x < kNumCols; ++x) { - canvas->drawLine({x * kPaddedTileBounds.fRight - 0.5f, 0.5f}, - {x * kPaddedTileBounds.fRight - 0.5f, kPaddedColumnBounds.fBottom - 0.5f}, + canvas->drawLine({x * (kExampleBounds.fRight+1.f) - 0.5f, 0.5f}, + {x * (kExampleBounds.fRight+1.f) - 0.5f, kGridHeight - 0.5f}, dashedLine); } } @@ -347,32 +339,62 @@ namespace skiagm { class CropImageFilterGM : public GM { public: - CropImageFilterGM(SkTileMode outputMode) : fOutputMode(outputMode) {} + CropImageFilterGM(SkTileMode inputMode, SkTileMode outputMode) + : fInputMode(inputMode) + , fOutputMode(outputMode) {} protected: SkISize onISize() override { - return {SkScalarRoundToInt(kGridWidth), SkScalarRoundToInt(kPaddedColumnBounds.fBottom)}; + return {SkScalarRoundToInt(4.f * (kExampleBounds.fRight + 1.f) - 1.f), + SkScalarRoundToInt(5.f * (kExampleBounds.fBottom + 1.f) - 1.f)}; } SkString onShortName() override { SkString name("crop_imagefilter_"); + switch(fInputMode) { + case SkTileMode::kDecal: name.append("decal"); break; + case SkTileMode::kClamp: name.append("clamp"); break; + case SkTileMode::kRepeat: name.append("repeat"); break; + case SkTileMode::kMirror: name.append("mirror"); break; + } + name.append("-in_"); + switch (fOutputMode) { case SkTileMode::kDecal: name.append("decal"); break; case SkTileMode::kClamp: name.append("clamp"); break; case SkTileMode::kRepeat: name.append("repeat"); break; case SkTileMode::kMirror: name.append("mirror"); break; } + name.append("-out"); return name; } void onDraw(SkCanvas* canvas) override { - draw_example_grid(canvas, fOutputMode); + draw_example_grid(canvas, fInputMode, fOutputMode); } private: + SkTileMode fInputMode; SkTileMode fOutputMode; }; -DEF_GM( return new CropImageFilterGM(SkTileMode::kDecal); ) -// TODO(michaelludwig) - will add GM defs for other output tile modes once supported +DEF_GM( return new CropImageFilterGM(SkTileMode::kDecal, SkTileMode::kDecal); ) +DEF_GM( return new CropImageFilterGM(SkTileMode::kDecal, SkTileMode::kClamp); ) +DEF_GM( return new CropImageFilterGM(SkTileMode::kDecal, SkTileMode::kRepeat); ) +DEF_GM( return new CropImageFilterGM(SkTileMode::kDecal, SkTileMode::kMirror); ) + +DEF_GM( return new CropImageFilterGM(SkTileMode::kClamp, SkTileMode::kDecal); ) +DEF_GM( return new CropImageFilterGM(SkTileMode::kClamp, SkTileMode::kClamp); ) +DEF_GM( return new CropImageFilterGM(SkTileMode::kClamp, SkTileMode::kRepeat); ) +DEF_GM( return new CropImageFilterGM(SkTileMode::kClamp, SkTileMode::kMirror); ) + +DEF_GM( return new CropImageFilterGM(SkTileMode::kRepeat, SkTileMode::kDecal); ) +DEF_GM( return new CropImageFilterGM(SkTileMode::kRepeat, SkTileMode::kClamp); ) +DEF_GM( return new CropImageFilterGM(SkTileMode::kRepeat, SkTileMode::kRepeat); ) +DEF_GM( return new CropImageFilterGM(SkTileMode::kRepeat, SkTileMode::kMirror); ) + +DEF_GM( return new CropImageFilterGM(SkTileMode::kMirror, SkTileMode::kDecal); ) +DEF_GM( return new CropImageFilterGM(SkTileMode::kMirror, SkTileMode::kClamp); ) +DEF_GM( return new CropImageFilterGM(SkTileMode::kMirror, SkTileMode::kRepeat); ) +DEF_GM( return new CropImageFilterGM(SkTileMode::kMirror, SkTileMode::kMirror); ) } // namespace skiagm diff --git a/gm/fontregen.cpp b/gm/fontregen.cpp index 29da2748791c..29137632d106 100644 --- a/gm/fontregen.cpp +++ b/gm/fontregen.cpp @@ -36,6 +36,10 @@ #include "src/gpu/ganesh/GrDirectContextPriv.h" #include "tools/ToolUtils.h" +#if defined(SK_GRAPHITE) +#include "include/gpu/graphite/ContextOptions.h" +#endif + using namespace skia_private; using MaskFormat = skgpu::MaskFormat; @@ -56,6 +60,13 @@ class FontRegenGM : public skiagm::GM { options->fAllowMultipleGlyphCacheTextures = GrContextOptions::Enable::kNo; } +#if defined(SK_GRAPHITE) + void modifyGraphiteContextOptions(skgpu::graphite::ContextOptions* options) const override { + options->fGlyphCacheTextureMaximumBytes = 0; + options->fAllowMultipleGlyphCacheTextures = false; + } +#endif + SkString onShortName() override { return SkString("fontregen"); } SkISize onISize() override { return {kSize, kSize}; } diff --git a/gm/gm.cpp b/gm/gm.cpp index 40fd946a2cf8..3d3b9f8797d5 100644 --- a/gm/gm.cpp +++ b/gm/gm.cpp @@ -167,7 +167,6 @@ void GM::setBGColor(SkColor color) { bool GM::animate(double nanos) { return this->onAnimate(nanos); } bool GM::runAsBench() const { return false; } -void GM::modifyGrContextOptions(GrContextOptions* options) {} std::unique_ptr GM::getVerifiers() const { // No verifiers by default. @@ -265,3 +264,16 @@ void MarkGMBad(SkCanvas* canvas, SkScalar x, SkScalar y) { -5,+5, paint); }); } + +namespace skiagm { +void Register(skiagm::GM* gm) { + // The skiagm::GMRegistry class is a subclass of sk_tools::Registry. Instances of + // sk_tools::Registry form a linked list (there is one such list for each subclass), where each + // instance holds a value and a pointer to the next sk_tools::Registry instance. The head of + // this linked list is stored in a global variable. The sk_tools::Registry constructor + // automatically pushes a new instance to the head of said linked list. Therefore, in order to + // register a value in the GM registry, it suffices to just instantiate skiagm::GMRegistry with + // the value we wish to register. + new skiagm::GMRegistry([=]() { return std::unique_ptr(gm); }); +} +} // namespace skiagm diff --git a/gm/gm.h b/gm/gm.h index 6731d87dca4b..349fe090b1a5 100644 --- a/gm/gm.h +++ b/gm/gm.h @@ -16,6 +16,7 @@ #include "include/private/base/SkMacros.h" #include "tools/Registry.h" +#include #include class GrRecordingContext; @@ -23,7 +24,13 @@ class SkCanvas; class SkMetaData; struct GrContextOptions; -namespace skiagm { namespace verifiers { class VerifierList; } } +namespace skiagm::verifiers { +class VerifierList; +} + +namespace skgpu::graphite { +struct ContextOptions; +} #define DEF_GM(CODE) \ static skiagm::GMRegistry SK_MACRO_APPEND_COUNTER(REG_)( \ @@ -56,6 +63,10 @@ namespace skiagm { namespace verifiers { class VerifierList; } } DEF_GM(return new skiagm::SimpleGM(BGCOLOR, NAME_STR, {W,H}, SK_MACRO_CONCAT(NAME,_GM));) \ skiagm::DrawResult SK_MACRO_CONCAT(NAME,_GM)(SkCanvas* CANVAS, SkString* ERR_MSG) +// Declares a function that dynamically registers GMs (e.g. based on some command-line flag). See +// the GMRegistererFnRegistry definition below for additional context. +#define DEF_GM_REGISTERER_FN(FN) \ + static skiagm::GMRegistererFnRegistry SK_MACRO_APPEND_COUNTER(REG_)(FN) #if defined(SK_GANESH) // A Simple GpuGM makes direct GPU calls. Its onDraw hook that includes GPU objects as params, and @@ -161,10 +172,34 @@ namespace skiagm { bool getControls(SkMetaData* controls) { return this->onGetControls(controls); } void setControls(const SkMetaData& controls) { this->onSetControls(controls); } - virtual void modifyGrContextOptions(GrContextOptions*); + virtual void modifyGrContextOptions(GrContextOptions*) {} + virtual void modifyGraphiteContextOptions(skgpu::graphite::ContextOptions*) const {} virtual std::unique_ptr getVerifiers() const; + // Convenience method to skip Bazel-only GMs from DM. + // + // As of Q3 2023, lovisolo@ is experimenting with reimplementing some DM behaviors as + // smaller, independent Bazel targets. For example, file //gm/BazelGMRunner.cpp provides a + // main function that can run GMs. With this file, one can define multiple small Bazel + // tests to run groups of related GMs with Bazel. However, GMs are only one kind of + // "source" supported by DM (see class GMSrc). DM supports other kinds of sources as well, + // such as codecs (CodecSrc class) and image generators (ImageGenSrc class). One possible + // strategy to support these sources in our Bazel build is to turn them into GMs. For + // example, instead of using the CodecSrc class from Bazel, we could have a GM subclass + // that takes an image as an input, decodes it using a codec, and draws in on a canvas. + // Given that this overlaps with existing DM functionality, we would mark such GMs as + // Bazel-only. + // + // Another possibility is to slowly replace all existing DM source types with just GMs. + // This would lead to a simpler DM architecture where there is only one source type and + // multiple sinks, as opposed to the current design with multiple sources and sinks. + // Furthermore, it would simplify the migration to Bazel because it would allow us to + // leverage existing work to run GMs with Bazel. + // + // TODO(lovisolo): Delete once it's no longer needed. + virtual bool isBazelOnly() const { return false; } + protected: // onGpuSetup is called once before any other processing with a direct context. virtual DrawResult onGpuSetup(SkCanvas*, SkString*) { return DrawResult::kOk; } @@ -189,9 +224,23 @@ namespace skiagm { DrawResult fGpuSetupResult = DrawResult::kOk; }; - using GMFactory = std::unique_ptr (*)(); + using GMFactory = std::function()>; using GMRegistry = sk_tools::Registry; + // Adds a GM to the GMRegistry. + void Register(skiagm::GM* gm); + + // Registry of functions that dynamically register GMs. Useful for GMs that are unknown at + // compile time, such as those that are created from images in a directory. + // + // A GMRegistererFn may call skiagm::Register() zero or more times to register GMs as needed. + // It should return the empty string on success, or a human-friendly message in the case of + // errors. + // + // Only used by //gm/BazelGMRunner.cpp for now. + using GMRegistererFn = std::function; + using GMRegistererFnRegistry = sk_tools::Registry; + #if defined(SK_GANESH) // A GpuGM replaces the onDraw method with one that also accepts GPU objects alongside the // SkCanvas. Its onDraw is only invoked on GPU configs; on non-GPU configs it will automatically diff --git a/gm/gpu_blur_utils.cpp b/gm/gpu_blur_utils.cpp index 56eeb9310af9..b191e34606eb 100644 --- a/gm/gpu_blur_utils.cpp +++ b/gm/gpu_blur_utils.cpp @@ -12,7 +12,7 @@ #include "include/gpu/GrRecordingContext.h" #include "include/gpu/ganesh/SkSurfaceGanesh.h" #include "src/core/SkCanvasPriv.h" -#include "src/core/SkGpuBlurUtils.h" +#include "src/gpu/ganesh/GrBlurUtils.h" #include "src/gpu/ganesh/GrCanvas.h" #include "src/gpu/ganesh/GrRecordingContextPriv.h" #include "src/gpu/ganesh/GrStyle.h" @@ -32,7 +32,7 @@ static GrSurfaceProxyView blur(GrRecordingContext* ctx, float sigmaX, float sigmaY, SkTileMode mode) { - auto resultSDC = SkGpuBlurUtils::GaussianBlur(ctx, + auto resultSDC = GrBlurUtils::GaussianBlur(ctx, src, GrColorType::kRGBA_8888, kPremul_SkAlphaType, @@ -78,7 +78,7 @@ static GrSurfaceProxyView slow_blur(GrRecordingContext* rContext, return sfc->readSurfaceView(); }; - SkIPoint outset = {SkGpuBlurUtils::SigmaRadius(sigmaX), SkGpuBlurUtils::SigmaRadius(sigmaY)}; + SkIPoint outset = {GrBlurUtils::SigmaRadius(sigmaX), GrBlurUtils::SigmaRadius(sigmaY)}; SkISize size = {dstB.width() + 2*outset.x(), dstB.height() + 2*outset.y()}; src = tileInto(std::move(src), srcB, size, outset - dstB.topLeft(), mode); if (!src) { @@ -88,23 +88,23 @@ static GrSurfaceProxyView slow_blur(GrRecordingContext* rContext, while (sigmaX || sigmaY) { float stepX = sigmaX; - if (stepX > SkGpuBlurUtils::kMaxSigma) { - stepX = SkGpuBlurUtils::kMaxSigma; + if (stepX > GrBlurUtils::kMaxSigma) { + stepX = GrBlurUtils::kMaxSigma; // A blur of sigma1 followed by a blur of sigma2 is equiv. to a single blur of // sqrt(sigma1^2 + sigma2^2). - sigmaX = sqrt(sigmaX*sigmaX - SkGpuBlurUtils::kMaxSigma*SkGpuBlurUtils::kMaxSigma); + sigmaX = sqrt(sigmaX*sigmaX - GrBlurUtils::kMaxSigma*GrBlurUtils::kMaxSigma); } else { sigmaX = 0.f; } float stepY = sigmaY; - if (stepY > SkGpuBlurUtils::kMaxSigma) { - stepY = SkGpuBlurUtils::kMaxSigma; - sigmaY = sqrt(sigmaY*sigmaY- SkGpuBlurUtils::kMaxSigma*SkGpuBlurUtils::kMaxSigma); + if (stepY > GrBlurUtils::kMaxSigma) { + stepY = GrBlurUtils::kMaxSigma; + sigmaY = sqrt(sigmaY*sigmaY- GrBlurUtils::kMaxSigma*GrBlurUtils::kMaxSigma); } else { sigmaY = 0.f; } auto bounds = SkIRect::MakeSize(src.dimensions()); - auto sdc = SkGpuBlurUtils::GaussianBlur(rContext, + auto sdc = GrBlurUtils::GaussianBlur(rContext, std::move(src), GrColorType::kRGBA_8888, kPremul_SkAlphaType, diff --git a/gm/imagefiltersbase.cpp b/gm/imagefiltersbase.cpp index dd60eb6255f8..695e6cf35a13 100644 --- a/gm/imagefiltersbase.cpp +++ b/gm/imagefiltersbase.cpp @@ -45,7 +45,7 @@ class FailImageFilter : public SkImageFilter_Base { protected: FailImageFilter() : INHERITED(nullptr, 0, nullptr) {} - sk_sp onFilterImage(const Context&, SkIPoint* offset) const override { + sk_sp onFilterImage(const skif::Context&, SkIPoint* offset) const override { return nullptr; } @@ -68,7 +68,7 @@ class IdentityImageFilter : public SkImageFilter_Base { SK_FLATTENABLE_HOOKS(IdentityImageFilter) protected: - sk_sp onFilterImage(const Context& ctx, SkIPoint* offset) const override { + sk_sp onFilterImage(const skif::Context& ctx, SkIPoint* offset) const override { offset->set(0, 0); return sk_ref_sp(ctx.sourceImage()); } diff --git a/gm/imagefiltersclipped.cpp b/gm/imagefiltersclipped.cpp index 8ef27a39b241..43d78743ffc4 100644 --- a/gm/imagefiltersclipped.cpp +++ b/gm/imagefiltersclipped.cpp @@ -103,6 +103,7 @@ class ImageFiltersClippedGM : public GM { resizeMatrix.setScale(RESIZE_FACTOR_X, RESIZE_FACTOR_Y); SkPoint3 pointLocation = SkPoint3::Make(32, 32, SkIntToScalar(10)); + SkRect r = SkRect::MakeWH(SkIntToScalar(64), SkIntToScalar(64)); sk_sp filters[] = { SkImageFilters::Blur(SkIntToScalar(12), SkIntToScalar(12), nullptr), SkImageFilters::DropShadow(SkIntToScalar(10), SkIntToScalar(10), @@ -113,12 +114,11 @@ class ImageFiltersClippedGM : public GM { SkImageFilters::Erode(2, 2, checkerboard), SkImageFilters::Offset(SkIntToScalar(-16), SkIntToScalar(32), nullptr), SkImageFilters::MatrixTransform(resizeMatrix, SkSamplingOptions(), nullptr), + // Crop output of lighting to the checkerboard SkImageFilters::PointLitDiffuse(pointLocation, SK_ColorWHITE, SK_Scalar1, - SkIntToScalar(2), checkerboard), - + SkIntToScalar(2), checkerboard, r), }; - SkRect r = SkRect::MakeWH(SkIntToScalar(64), SkIntToScalar(64)); SkScalar margin = SkIntToScalar(16); SkRect bounds = r; bounds.outset(margin, margin); diff --git a/gm/makecolorspace.cpp b/gm/makecolorspace.cpp index 915174c884ff..9784ee83511a 100644 --- a/gm/makecolorspace.cpp +++ b/gm/makecolorspace.cpp @@ -51,7 +51,7 @@ sk_sp make_color_space(sk_sp orig, #endif { auto direct = GrAsDirectContext(canvas->recordingContext()); - xform = orig->makeColorSpace(colorSpace, direct); + xform = orig->makeColorSpace(direct, colorSpace); } if (!xform) { @@ -205,7 +205,7 @@ DEF_SIMPLE_GM_CAN_FAIL(reinterpretcolorspace, canvas, errorMsg, 128 * 3, 128 * 3 // Lazy images canvas->drawImage(image, 0.0f, 0.0f); canvas->drawImage(image->reinterpretColorSpace(spin), 128.0f, 0.0f); - canvas->drawImage(image->makeColorSpace(spin)->reinterpretColorSpace(srgb), 256.0f, 0.0f); + canvas->drawImage(image->makeColorSpace(nullptr, spin)->reinterpretColorSpace(srgb), 256.0f, 0.0f); canvas->translate(0.0f, 128.0f); @@ -213,7 +213,7 @@ DEF_SIMPLE_GM_CAN_FAIL(reinterpretcolorspace, canvas, errorMsg, 128 * 3, 128 * 3 image = image->makeRasterImage(); canvas->drawImage(image, 0.0f, 0.0f); canvas->drawImage(image->reinterpretColorSpace(spin), 128.0f, 0.0f); - canvas->drawImage(image->makeColorSpace(spin)->reinterpretColorSpace(srgb), 256.0f, 0.0f); + canvas->drawImage(image->makeColorSpace(nullptr, spin)->reinterpretColorSpace(srgb), 256.0f, 0.0f); canvas->translate(0.0f, 128.0f); diff --git a/gm/manypathatlases.cpp b/gm/manypathatlases.cpp index 238f42ba116e..da2ac65e9c94 100644 --- a/gm/manypathatlases.cpp +++ b/gm/manypathatlases.cpp @@ -15,6 +15,10 @@ #include "src/gpu/ganesh/GrRecordingContextPriv.h" #include "tools/ToolUtils.h" +#if defined(SK_GRAPHITE) +#include "include/gpu/graphite/ContextOptions.h" +#endif + namespace skiagm { /** @@ -33,6 +37,12 @@ class ManyPathAtlasesGM : public GM { ctxOptions->fMaxTextureAtlasSize = fMaxAtlasSize; } +#if defined(SK_GRAPHITE) + void modifyGraphiteContextOptions(skgpu::graphite::ContextOptions* options) const override { + options->fMaxTextureAtlasSize = fMaxAtlasSize; + } +#endif + void onDraw(SkCanvas* canvas) override { canvas->clear(SkColors::kYellow); diff --git a/gm/matrixconvolution.cpp b/gm/matrixconvolution.cpp index 6a833e8debeb..d1ba3b1dc028 100644 --- a/gm/matrixconvolution.cpp +++ b/gm/matrixconvolution.cpp @@ -22,6 +22,7 @@ #include "include/core/SkTypeface.h" #include "include/effects/SkGradientShader.h" #include "include/effects/SkImageFilters.h" +#include "src/effects/imagefilters/SkCropImageFilter.h" #include "src/gpu/ganesh/effects/GrMatrixConvolutionEffect.h" #include "tools/ToolUtils.h" @@ -69,21 +70,28 @@ class MatrixConvolutionGM : public GM { return SkISize::Make(500, 300); } - sk_sp makeFilter(const SkIPoint &kernelOffset, SkTileMode tileMode, - bool convolveAlpha, const SkIRect *cropRect = nullptr) { + sk_sp makeFilter(const SkIPoint &kernelOffset, + SkTileMode tileMode, + bool convolveAlpha) { + // Must provide a cropping geometry in order for 'tileMode' to be well defined. + SkIRect tileBoundary = fImage->bounds(); switch (fKernelFixture) { case kBasic_KernelFixture: { // All 1s except center value, which is -7 (sum of 1). std::vector kernel(9, SkIntToScalar(1)); kernel[4] = SkIntToScalar(-7); - return SkImageFilters::MatrixConvolution({3,3}, kernel.data(), /* gain */ 0.3f, /* bias */ SkIntToScalar(100), kernelOffset, tileMode, convolveAlpha, nullptr, cropRect); + return SkImageFilters::MatrixConvolution( + {3,3}, kernel.data(), /* gain */ 0.3f, /* bias */ SkIntToScalar(100), + kernelOffset, tileMode, convolveAlpha, nullptr, tileBoundary); } case kLarge_KernelFixture: { static_assert(49 > GrMatrixConvolutionEffect::kMaxUniformSize); // All 1s except center value, which is -47 (sum of 1). std::vector kernel(49, SkIntToScalar(1)); kernel[24] = SkIntToScalar(-47); - return SkImageFilters::MatrixConvolution({7,7}, kernel.data(), /* gain */ 0.3f, /* bias */ SkIntToScalar(100), kernelOffset, tileMode, convolveAlpha, nullptr, cropRect); + return SkImageFilters::MatrixConvolution( + {7,7}, kernel.data(), /* gain */ 0.3f, /* bias */ SkIntToScalar(100), + kernelOffset, tileMode, convolveAlpha, nullptr, tileBoundary); } default: return nullptr; @@ -94,17 +102,14 @@ class MatrixConvolutionGM : public GM { SkTileMode tileMode, bool convolveAlpha, const SkIRect* cropRect = nullptr) { SkPaint paint; - paint.setImageFilter(this->makeFilter(kernelOffset, tileMode, convolveAlpha, cropRect)); + auto filter = this->makeFilter(kernelOffset, tileMode, convolveAlpha); + if (cropRect) { + filter = SkMakeCropImageFilter(SkRect::Make(*cropRect), std::move(filter)); + } + paint.setImageFilter(std::move(filter)); canvas->save(); canvas->translate(SkIntToScalar(x), SkIntToScalar(y)); - const SkRect layerBounds = SkRect::Make(fImage->bounds()); - canvas->clipRect(layerBounds); - // This GM is, in part, intended to display the wrapping behavior of the - // matrix image filter. The only (rational) way to achieve that for repeat mode - // is to create a tight layer. - canvas->saveLayer(layerBounds, &paint); - canvas->drawImage(fImage, 0, 0); - canvas->restore(); + canvas->drawImage(fImage, 0, 0, {}, &paint); canvas->restore(); } @@ -115,11 +120,10 @@ class MatrixConvolutionGM : public GM { void onDraw(SkCanvas* canvas) override { canvas->clear(SK_ColorBLACK); SkIPoint kernelOffset = SkIPoint::Make(1, 0); - SkIRect rect = fImage->bounds(); for (int x = 10; x < 310; x += 100) { - this->draw(canvas, x, 10, kernelOffset, SkTileMode::kClamp, true, &rect); - this->draw(canvas, x, 110, kernelOffset, SkTileMode::kDecal, true, &rect); - this->draw(canvas, x, 210, kernelOffset, SkTileMode::kRepeat, true, &rect); + this->draw(canvas, x, 10, kernelOffset, SkTileMode::kClamp, true); + this->draw(canvas, x, 110, kernelOffset, SkTileMode::kDecal, true); + this->draw(canvas, x, 210, kernelOffset, SkTileMode::kRepeat, true); kernelOffset.fY++; } kernelOffset.fY = 1; @@ -128,9 +132,9 @@ class MatrixConvolutionGM : public GM { this->draw(canvas, 310, 110, kernelOffset, SkTileMode::kDecal, true, &smallRect); this->draw(canvas, 310, 210, kernelOffset, SkTileMode::kRepeat, true, &smallRect); - this->draw(canvas, 410, 10, kernelOffset, SkTileMode::kClamp, false, &rect); - this->draw(canvas, 410, 110, kernelOffset, SkTileMode::kDecal, false, &rect); - this->draw(canvas, 410, 210, kernelOffset, SkTileMode::kRepeat, false, &rect); + this->draw(canvas, 410, 10, kernelOffset, SkTileMode::kClamp, false); + this->draw(canvas, 410, 110, kernelOffset, SkTileMode::kDecal, false); + this->draw(canvas, 410, 210, kernelOffset, SkTileMode::kRepeat, false); } private: diff --git a/gm/mesh.cpp b/gm/mesh.cpp index af88ffd8e05e..e5adc6cd7f91 100644 --- a/gm/mesh.cpp +++ b/gm/mesh.cpp @@ -16,6 +16,7 @@ #include "include/core/SkSurface.h" #include "include/effects/SkGradientShader.h" #include "include/gpu/GrDirectContext.h" +#include "include/gpu/ganesh/SkMeshGanesh.h" #include "src/base/SkRandom.h" #include "src/core/SkCanvasPriv.h" #include "src/core/SkMeshPriv.h" @@ -121,9 +122,9 @@ class MeshGM : public skiagm::GM { return DrawResult::kOk; } - fColorVB = SkMesh::CopyVertexBuffer(dc, fColorVB); - fColorIndexedVB = SkMesh::CopyVertexBuffer(dc, fColorIndexedVB); - fIB[1] = SkMesh::CopyIndexBuffer (dc, fIB[0]); + fColorVB = SkMeshes::CopyVertexBuffer(dc, fColorVB); + fColorIndexedVB = SkMeshes::CopyVertexBuffer(dc, fColorIndexedVB); + fIB[1] = SkMeshes::CopyIndexBuffer (dc, fIB[0]); if (!fColorVB || !fColorIndexedVB || !fIB[1]) { return DrawResult::kFail; } @@ -174,26 +175,26 @@ class MeshGM : public skiagm::GM { auto ib = (i%4 == 0) ? fIB[0] : fIB[1]; if (colors) { result = SkMesh::MakeIndexed(fSpecWithColor, - SkMesh::Mode::kTriangles, - fColorIndexedVB, - /*vertexCount=*/6, - kColorIndexedOffset, - std::move(ib), - /*indexCount=*/6, - kIndexOffset, - /*uniforms=*/nullptr, - kRect); + SkMesh::Mode::kTriangles, + fColorIndexedVB, + /*vertexCount=*/6, + kColorIndexedOffset, + std::move(ib), + /*indexCount=*/6, + kIndexOffset, + /*uniforms=*/nullptr, + kRect); } else { result = SkMesh::MakeIndexed(fSpecWithNoColor, - SkMesh::Mode::kTriangles, - fNoColorIndexedVB, - /*vertexCount=*/6, - /*vertexOffset=*/0, - std::move(ib), - /*indexCount=*/6, - kIndexOffset, - /*uniforms=*/nullptr, - kRect); + SkMesh::Mode::kTriangles, + fNoColorIndexedVB, + /*vertexCount=*/6, + /*vertexOffset=*/0, + std::move(ib), + /*indexCount=*/6, + kIndexOffset, + /*uniforms=*/nullptr, + kRect); } } if (!result.mesh.isValid()) { @@ -220,9 +221,7 @@ class MeshGM : public skiagm::GM { private: void ensureBuffers() { if (!fColorVB) { - fColorVB = SkMesh::MakeVertexBuffer(/*GrDirectContext*=*/nullptr, - kColorQuad, - sizeof(kColorQuad)); + fColorVB = SkMeshes::MakeVertexBuffer(kColorQuad, sizeof(kColorQuad)); } if (!fNoColorVB) { @@ -231,9 +230,7 @@ class MeshGM : public skiagm::GM { std::memcpy(SkTAddOffset(data->writable_data(), kNoColorOffset), kNoColorQuad, sizeof(kNoColorQuad)); - fNoColorVB = SkMesh::MakeVertexBuffer(/*GrDirectContext*=*/nullptr, - data->data(), - data->size()); + fNoColorVB = SkMeshes::MakeVertexBuffer(data->data(), data->size()); } if (!fColorIndexedVB) { @@ -242,15 +239,12 @@ class MeshGM : public skiagm::GM { std::memcpy(SkTAddOffset(data->writable_data(), kColorIndexedOffset), kColorIndexedQuad, sizeof(kColorIndexedQuad)); - fColorIndexedVB = SkMesh::MakeVertexBuffer(/*GrDirectContext*=*/nullptr, - data->data(), - data->size()); + fColorIndexedVB = SkMeshes::MakeVertexBuffer(data->data(), data->size()); } if (!fNoColorIndexedVB) { - fNoColorIndexedVB = SkMesh::MakeVertexBuffer(/*GrDirectContext*=*/nullptr, - kNoColorIndexedQuad, - sizeof(kNoColorIndexedQuad)); + fNoColorIndexedVB = + SkMeshes::MakeVertexBuffer(kNoColorIndexedQuad, sizeof(kNoColorIndexedQuad)); } if (!fIB[0]) { @@ -259,9 +253,7 @@ class MeshGM : public skiagm::GM { std::memcpy(SkTAddOffset(data->writable_data(), kIndexOffset), kIndices, sizeof(kIndices)); - fIB[0] = SkMesh::MakeIndexBuffer(/*GrDirectContext*=*/nullptr, - data->data(), - data->size()); + fIB[0] = SkMeshes::MakeIndexBuffer(data->data(), data->size()); } if (!fIB[1]) { @@ -408,7 +400,7 @@ class MeshColorSpaceGM : public skiagm::GM { SkColor colors[] = {SK_ColorWHITE, SK_ColorTRANSPARENT}; fShader = SkGradientShader::MakeLinear(pts, colors, nullptr, 2, SkTileMode::kMirror); - fVB = SkMesh::MakeVertexBuffer(nullptr, kQuad, sizeof(kQuad)); + fVB = SkMeshes::MakeVertexBuffer(kQuad, sizeof(kQuad)); } SkString onShortName() override { return SkString("custommesh_cs"); } @@ -486,6 +478,25 @@ class MeshColorSpaceGM : public skiagm::GM { sk_sp fShader; }; +// helpers for cases when ctx could be nullptr +static sk_sp make_vertex_buffer(GrDirectContext* ctx, + const void* data, + size_t size) { + if (ctx) { + return SkMeshes::MakeVertexBuffer(ctx, data, size); + } + return SkMeshes::MakeVertexBuffer(data, size); +} + +static sk_sp make_index_buffer(GrDirectContext* ctx, + const void* data, + size_t size) { + if (ctx) { + return SkMeshes::MakeIndexBuffer(ctx, data, size); + } + return SkMeshes::MakeIndexBuffer(data, size); +} + DEF_GM(return new MeshColorSpaceGM;) class MeshUniformsGM : public skiagm::GM { @@ -547,7 +558,7 @@ class MeshUniformsGM : public skiagm::GM { 2, SkTileMode::kMirror); - fVB = SkMesh::MakeVertexBuffer(nullptr, kQuad, sizeof(kQuad)); + fVB = SkMeshes::MakeVertexBuffer(kQuad, sizeof(kQuad)); } SkString onShortName() override { return SkString("custommesh_uniforms"); } @@ -733,8 +744,8 @@ class MeshUpdateGM : public skiagm::GM { // > kVBRects. static constexpr int kUpdatesRects = 3; - auto vb = - SkMesh::MakeVertexBuffer(ctx, /*data=*/nullptr, kVBRects*6*sizeof(Vertex)); + auto vb = make_vertex_buffer(ctx, /*data=*/nullptr, kVBRects * 6 * sizeof(Vertex)); + SkASSERT(vb); SkRect bounds; for (int i = 0; i < kUpdatesRects; ++i) { @@ -790,8 +801,8 @@ class MeshUpdateGM : public skiagm::GM { static constexpr int kNumIBUpdates = 3; // Make the vertex buffer large enough to hold all the rects and populate. - vb = SkMesh::MakeVertexBuffer( - ctx, /*data=*/nullptr, kNumIBUpdates*4*sizeof(Vertex)); + vb = make_vertex_buffer(ctx, /*data=*/nullptr, kNumIBUpdates * 4 * sizeof(Vertex)); + SkASSERT(vb); for (int i = 0; i < kNumIBUpdates; ++i) { SkPoint p[4]; auto rect = r.makeOffset(100*i, 0); @@ -810,9 +821,9 @@ class MeshUpdateGM : public skiagm::GM { vb->update(ctx, vertices, i*4*sizeof(Vertex), 4*sizeof(Vertex))); } - auto ib = - SkMesh::MakeIndexBuffer(ctx, /*data=*/nullptr, kIBRects*6*sizeof(uint16_t)); - + auto ib = make_index_buffer( + ctx, /*data=*/nullptr, kIBRects * 6 * sizeof(uint16_t)); + SkASSERT(ib); for (int i = 0; i < kNumIBUpdates; ++i) { uint16_t indices[6] = {SkToU16(0 + 4*i), SkToU16(3 + 4*i), @@ -945,7 +956,8 @@ class MeshZeroInitGM : public skiagm::GM { const auto& spec = fSpec[i]; size_t posOffset = spec->findAttribute("pos")->offset; - auto vb = SkMesh::MakeVertexBuffer(ctx, nullptr, spec->stride()*std::size(kTri)); + auto vb = make_vertex_buffer(ctx, nullptr, spec->stride() * std::size(kTri)); + SkASSERT(vb); for (size_t j = 0; j < std::size(kTri); ++j) { SkAssertResult(vb->update(ctx, &kTri[j], @@ -958,7 +970,9 @@ class MeshZeroInitGM : public skiagm::GM { // The second time we upload 1,2 to beginning of the buffer to form 1,2,0. size_t indexUploadOffset = i == 0 ? 4 : 0; size_t indexMeshOffset = i == 0 ? 2 : 0; - auto ib = SkMesh::MakeIndexBuffer(ctx, nullptr, sizeof(uint16_t)*4); + + auto ib = make_index_buffer(ctx, nullptr, sizeof(uint16_t) * 4); + SkASSERT(ib); SkAssertResult(ib->update(ctx, kTiIndices, indexUploadOffset, sizeof(kTiIndices))); SkRect bounds; @@ -1054,8 +1068,8 @@ class PictureMesh : public skiagm::GM { } fSpec = std::move(spec); - fVB = SkMesh::MakeVertexBuffer(nullptr, kQuad, sizeof(kQuad)); - fIB = SkMesh::MakeIndexBuffer(nullptr, kIndices, sizeof(kIndices)); + fVB = SkMeshes::MakeVertexBuffer(kQuad, sizeof(kQuad)); + fIB = SkMeshes::MakeIndexBuffer(kIndices, sizeof(kIndices)); SkRandom random; SkColor4f colors[6]; @@ -1088,8 +1102,8 @@ class PictureMesh : public skiagm::GM { for (bool picture : {false, true}) { canvas->save(); for (bool gpu : {false, true}) { - auto vb = gpu ? SkMesh::CopyVertexBuffer(dc, fVB) : fVB; - auto ib = gpu ? SkMesh::CopyIndexBuffer (dc, fIB) : fIB; + auto vb = gpu ? SkMeshes::CopyVertexBuffer(dc, fVB) : fVB; + auto ib = gpu ? SkMeshes::CopyIndexBuffer (dc, fIB) : fIB; float offset[2] = {8, 8}; for (size_t i = 0; i < 4; ++i) { diff --git a/gm/pathmeasure.cpp b/gm/pathmeasure.cpp index cb21325ff8b9..9ecf1b9171c2 100644 --- a/gm/pathmeasure.cpp +++ b/gm/pathmeasure.cpp @@ -16,7 +16,7 @@ // //include/private/base/SkTDArray.h:382:26: // runtime error: signed integer overflow: 2147483644 + 4 cannot be represented in type 'int' -static SK_UNUSED void path_measure_explosion(SkCanvas* canvas) { +[[maybe_unused]] static void path_measure_explosion(SkCanvas* canvas) { SkPaint p; p.setAntiAlias(false); float intervals[] = { 0, 10e9f }; diff --git a/gm/perlinnoise.cpp b/gm/perlinnoise.cpp index 18879db08fa8..438d85ee61cc 100644 --- a/gm/perlinnoise.cpp +++ b/gm/perlinnoise.cpp @@ -8,6 +8,7 @@ #include "gm/gm.h" #include "include/core/SkCanvas.h" #include "include/core/SkColor.h" +#include "include/core/SkColorFilter.h" #include "include/core/SkMatrix.h" #include "include/core/SkPaint.h" #include "include/core/SkRect.h" @@ -16,6 +17,8 @@ #include "include/core/SkShader.h" #include "include/core/SkSize.h" #include "include/core/SkString.h" +#include "include/effects/SkColorMatrix.h" +#include "include/effects/SkImageFilters.h" #include "include/effects/SkPerlinNoiseShader.h" #include @@ -126,7 +129,7 @@ class PerlinNoiseGM : public skiagm::GM { using INHERITED = GM; }; -class PerlinNoiseGM2 : public skiagm::GM { +class PerlinNoiseLocalMatrixGM : public skiagm::GM { SkISize fSize = {80, 80}; SkString onShortName() override { return SkString("perlinnoise_localmatrix"); } @@ -186,7 +189,7 @@ class PerlinNoiseGM2 : public skiagm::GM { }; // Demonstrate skbug.com/14166 (Perlin noise shader doesn't rotate correctly) -class PerlinNoiseGM3 : public skiagm::GM { +class PerlinNoiseRotatedGM : public skiagm::GM { static constexpr SkISize kCellSize = { 100, 100 }; static constexpr SkISize kRectSize = { 60, 60 }; static constexpr int kPad = 10; @@ -242,8 +245,39 @@ class PerlinNoiseGM3 : public skiagm::GM { } }; +// Demonstrate skbug.com/14411 (Intel GPUs show artifacts when applying perlin noise to layers) +class PerlinNoiseLayeredGM : public skiagm::GM { + SkString onShortName() override { return SkString("perlinnoise_layered"); } + + SkISize onISize() override { return {500, 500}; } + + void onDraw(SkCanvas* canvas) override { + const sk_sp perlin = SkImageFilters::ColorFilter( + SkColorFilters::Matrix(SkColorMatrix()), + SkImageFilters::Shader(SkShaders::MakeFractalNoise(0.3f, 0.3f, 1, 4))); + + const SkPaint paint; + canvas->saveLayer(nullptr, &paint); + { + SkPaint p; + p.setImageFilter(perlin); + canvas->drawPaint(p); + } + canvas->restore(); + + canvas->saveLayer(nullptr, nullptr); + { + SkPaint p; + p.setImageFilter(perlin); + canvas->drawPaint(p); + } + canvas->restore(); + } +}; + } // anonymous namespace -DEF_GM( return new PerlinNoiseGM; ) -DEF_GM( return new PerlinNoiseGM2; ) -DEF_GM( return new PerlinNoiseGM3; ) +DEF_GM(return new PerlinNoiseGM;) +DEF_GM(return new PerlinNoiseLocalMatrixGM;) +DEF_GM(return new PerlinNoiseRotatedGM;) +DEF_GM(return new PerlinNoiseLayeredGM;) diff --git a/gm/picture.cpp b/gm/picture.cpp index 907b23441fe5..18c4d38acd99 100644 --- a/gm/picture.cpp +++ b/gm/picture.cpp @@ -6,6 +6,7 @@ */ #include "gm/gm.h" +#include "include/core/SkBBHFactory.h" #include "include/core/SkBlendMode.h" #include "include/core/SkCanvas.h" #include "include/core/SkMatrix.h" diff --git a/gm/rectangletexture.cpp b/gm/rectangletexture.cpp index 67ff84ce2170..2b5aa815ee81 100644 --- a/gm/rectangletexture.cpp +++ b/gm/rectangletexture.cpp @@ -30,6 +30,7 @@ #include "include/gpu/GrDirectContext.h" #include "include/gpu/GrTypes.h" #include "include/gpu/ganesh/SkImageGanesh.h" +#include "include/gpu/ganesh/gl/GrGLBackendSurface.h" #include "src/core/SkAutoPixmapStorage.h" #include "src/gpu/ganesh/GrDirectContextPriv.h" #include "src/gpu/ganesh/GrGpu.h" @@ -95,7 +96,7 @@ class RectangleTexture : public GM { sk_sp createRectangleTextureImg(GrDirectContext* dContext, GrSurfaceOrigin origin, const SkBitmap content) { SkASSERT(content.colorType() == kRGBA_8888_SkColorType); - auto format = GrBackendFormat::MakeGL(GR_GL_RGBA8, GR_GL_TEXTURE_RECTANGLE); + auto format = GrBackendFormats::MakeGL(GR_GL_RGBA8, GR_GL_TEXTURE_RECTANGLE); auto bet = dContext->createBackendTexture(content.width(), content.height(), format, diff --git a/gm/rippleshadergm.cpp b/gm/rippleshadergm.cpp new file mode 100644 index 000000000000..ef1c5fad7fff --- /dev/null +++ b/gm/rippleshadergm.cpp @@ -0,0 +1,129 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "gm/gm.h" +#include "include/core/SkBitmap.h" +#include "include/core/SkCanvas.h" +#include "include/core/SkData.h" +#include "include/core/SkPaint.h" +#include "include/core/SkRRect.h" +#include "include/core/SkSize.h" +#include "include/core/SkString.h" +#include "include/core/SkSurface.h" +#include "include/effects/SkGradientShader.h" +#include "include/effects/SkImageFilters.h" +#include "include/effects/SkRuntimeEffect.h" +#include "include/gpu/GrRecordingContext.h" +#include "src/base/SkRandom.h" +#include "src/core/SkColorSpacePriv.h" +#include "src/core/SkRuntimeEffectPriv.h" +#include "tools/Resources.h" + +#include + +class RippleShaderGM : public skiagm::GM { +public: + static constexpr SkISize kSize = {512, 512}; + + void onOnceBeforeDraw() override { + // Load the mandrill into a shader. + sk_sp img = GetResourceAsImage("images/mandrill_512.png"); + if (!img) { + SkDebugf("Unable to load mandrill_512 from resources directory"); + return; + } + fMandrill = img->makeShader(SkSamplingOptions()); + + // Load RippleShader.rts into a SkRuntimeEffect. + sk_sp shaderData = GetResourceAsData("sksl/realistic/RippleShader.rts"); + if (!shaderData) { + SkDebugf("Unable to load ripple shader from resources directory"); + return; + } + auto [effect, error] = SkRuntimeEffect::MakeForShader( + SkString(static_cast(shaderData->data()), shaderData->size())); + if (!effect) { + SkDebugf("Ripple shader failed to compile\n\n%s\n", error.c_str()); + } + fEffect = std::move(effect); + } + + SkString onShortName() override { return SkString("rippleshader"); } + SkISize onISize() override { return kSize; } + bool onAnimate(double nanos) override { + fMillis = nanos / (1000. * 1000.); + return true; + } + + void onDraw(SkCanvas* canvas) override { + SkPaint base; + base.setShader(fMandrill); + canvas->drawRect(SkRect::MakeWH(kSize.width(), kSize.height()), base); + + // Uniform setting logic was imperfectly adapted from: + // frameworks/base/graphics/java/android/graphics/drawable/RippleShader.java + // frameworks/base/graphics/java/android/graphics/drawable/RippleAnimationSession.java + + SkRuntimeShaderBuilder builder(fEffect); + constexpr float ANIM_DURATION = 1500.0f; + constexpr float NOISE_ANIMATION_DURATION = 7000.0f; + constexpr float MAX_NOISE_PHASE = NOISE_ANIMATION_DURATION / 214.0f; + constexpr float PI_ROTATE_RIGHT = SK_ScalarPI * 0.0078125f; + constexpr float PI_ROTATE_LEFT = SK_ScalarPI * -0.0078125f; + + builder.uniform("in_origin") = SkV2{kSize.width() / 2, kSize.height() / 2}; + builder.uniform("in_touch") = SkV2{kSize.width() / 2, kSize.height() / 2}; + // Note that `in_progress` should actually be interpolated via FAST_OUT_SLOW_IN. + builder.uniform("in_progress") = this->sawtoothLerp(0.0f, 1.0f, ANIM_DURATION); + builder.uniform("in_maxRadius") = 400.0f; + builder.uniform("in_resolutionScale") = SkV2{1.0f / kSize.width(), 1.0f / kSize.height()}; + builder.uniform("in_noiseScale") = SkV2{2.1f / kSize.width(), 2.1f / kSize.height()}; + builder.uniform("in_hasMask") = 1.0f; + + float phase = this->sawtoothLerp(0, MAX_NOISE_PHASE, NOISE_ANIMATION_DURATION); + builder.uniform("in_noisePhase") = phase; + builder.uniform("in_turbulencePhase") = phase * 1000.0f; + + const float scale = 1.5f; + builder.uniform("in_tCircle1") = SkV2{scale * .5f + (phase * 0.01f * cosf(scale * .55f)), + scale * .5f + (phase * 0.01f * sinf(scale * .55f))}; + builder.uniform("in_tCircle2") = SkV2{scale * .2f + (phase * -.0066f * cosf(scale * .45f)), + scale * .2f + (phase * -.0066f * sinf(scale * .45f))}; + builder.uniform("in_tCircle3") = SkV2{scale + (phase * -.0066f * cosf(scale * .35f)), + scale + (phase * -.0066f * sinf(scale * .35f))}; + + float rotation1 = phase * PI_ROTATE_RIGHT + 1.7f * SK_ScalarPI; + builder.uniform("in_tRotation1") = SkV2{cosf(rotation1), sinf(rotation1)}; + + float rotation2 = phase * PI_ROTATE_LEFT + 2.0f * SK_ScalarPI; + builder.uniform("in_tRotation2") = SkV2{cosf(rotation2), sinf(rotation2)}; + + float rotation3 = phase * PI_ROTATE_RIGHT + 2.75f * SK_ScalarPI; + builder.uniform("in_tRotation3") = SkV2{cosf(rotation3), sinf(rotation3)}; + + builder.uniform("in_color") = SkV4{0.0f, 0.6f, 0.0f, 1.0f}; // green + builder.uniform("in_sparkleColor") = SkV4{1.0f, 1.0f, 1.0f, 1.0f}; // white + builder.child("in_shader") = fMandrill; + + SkPaint sparkle; + sparkle.setShader(builder.makeShader()); + canvas->drawRect(SkRect::MakeWH(kSize.width(), kSize.height()), sparkle); + } + + float sawtoothLerp(float a, float b, float windowMs) { + float t = std::fmod(fMillis, windowMs) / windowMs; + return a * (1. - t) + b * t; + } + +protected: + sk_sp fEffect; + sk_sp fMandrill; + float fMillis = 500.0f; // this allows a non-animated single-frame capture to show the effect + +}; + +DEF_GM(return new RippleShaderGM;) diff --git a/gm/runtimeshader.cpp b/gm/runtimeshader.cpp index 6274576d594c..ff0c0135e1e1 100644 --- a/gm/runtimeshader.cpp +++ b/gm/runtimeshader.cpp @@ -1091,7 +1091,7 @@ DEF_SIMPLE_GM(null_child_rt, canvas, 150, 150) { #endif { auto direct = GrAsDirectContext(canvas->recordingContext()); - image = image->makeColorSpace(SkColorSpace::MakeSRGB(), direct); + image = image->makeColorSpace(direct, SkColorSpace::MakeSRGB()); } canvas->drawImage(image, 0, 0); @@ -1101,8 +1101,8 @@ DEF_SIMPLE_GM(null_child_rt, canvas, 150, 150) { DEF_SIMPLE_GM_CAN_FAIL(deferred_shader_rt, canvas, errorMsg, 150, 50) { // Skip this GM on recording devices. It actually works okay on serialize-8888, but pic-8888 - // does not. Ultimately, behavior on CPU is potentially strange (especially with SkVM), because - // SkVM will build the shader more than once per draw. + // does not. Ultimately, behavior on CPU is potentially strange (especially with SkRP), because + // SkRP will build the shader more than once per draw. if (canvas->imageInfo().colorType() == kUnknown_SkColorType) { return skiagm::DrawResult::kSkip; } diff --git a/gm/savelayer.cpp b/gm/savelayer.cpp index a5e518ecf771..d187536aaa5d 100644 --- a/gm/savelayer.cpp +++ b/gm/savelayer.cpp @@ -20,6 +20,7 @@ #include "include/core/SkPicture.h" #include "include/core/SkPictureRecorder.h" #include "include/core/SkPoint.h" +#include "include/core/SkRSXform.h" #include "include/core/SkRect.h" #include "include/core/SkRefCnt.h" #include "include/core/SkScalar.h" @@ -31,6 +32,7 @@ #include "include/core/SkTileMode.h" #include "include/core/SkTypeface.h" #include "include/core/SkTypes.h" +#include "include/core/SkVertices.h" #include "include/effects/SkGradientShader.h" #include "include/effects/SkImageFilters.h" #include "include/effects/SkShaderMaskFilter.h" @@ -171,3 +173,89 @@ DEF_SIMPLE_GM(savelayer_f16, canvas, 900, 300) { canvas->restore(); } } + +static void draw_atlas(SkCanvas* canvas, SkImage* image) { + SkRSXform xforms[] = {{1, 0, 0, 0}, {1, 0, 50, 50}}; + SkRect tex[] = {{0, 0, 100, 100}, {0, 0, 100, 100}}; + SkColor colors[] = {0xffffffff, 0xffffffff}; + SkPaint paint; + + canvas->drawAtlas(image, + xforms, + tex, + colors, + 2, + SkBlendMode::kSrcIn, + SkFilterMode::kNearest, + nullptr, + &paint); +} + +static void draw_vertices(SkCanvas* canvas, SkImage* image) { + SkPoint pts[] = {{0, 0}, {0, 100}, {100, 100}, {100, 0}, {100, 100}, {0, 100}}; + sk_sp verts = + SkVertices::MakeCopy(SkVertices::kTriangles_VertexMode, 6, pts, nullptr, nullptr); + + SkPaint paint; + paint.setShader(image->makeShader(SkFilterMode::kNearest)); + + canvas->drawVertices(verts, SkBlendMode::kSrc, paint); +} + +static void draw_points(SkCanvas* canvas, SkImage* image) { + SkPoint pts[] = {{50, 50}, {75, 75}}; + SkPaint paint; + paint.setShader(image->makeShader(SkFilterMode::kNearest)); + paint.setStrokeWidth(100); + paint.setStrokeCap(SkPaint::kSquare_Cap); + + canvas->drawPoints(SkCanvas::kPoints_PointMode, 2, pts, paint); +} + +static void draw_image_set(SkCanvas* canvas, SkImage* image) { + SkRect r = SkRect::MakeWH(100, 100); + SkCanvas::ImageSetEntry entries[] = { + SkCanvas::ImageSetEntry(sk_ref_sp(image), r, r, 1.0f, SkCanvas::kNone_QuadAAFlags), + SkCanvas::ImageSetEntry( + sk_ref_sp(image), r, r.makeOffset(50, 50), 1.0f, SkCanvas::kNone_QuadAAFlags), + }; + + SkPaint paint; + canvas->experimental_DrawEdgeAAImageSet( + entries, 2, nullptr, nullptr, SkFilterMode::kNearest, &paint); +} + +/* + Picture optimization looks for single drawing operations inside a saveLayer with alpha. It tries + to push the alpha into the drawing operation itself. That's only valid if the draw logically + touches each pixel once. A handful of draws do not behave like that. They instead act like + repeated, independent draws. This GM tests this with several operations. + */ +DEF_SIMPLE_GM(skbug_14554, canvas, 310, 630) { + sk_sp image = GetResourceAsImage("images/mandrill_128.png"); + SkPictureRecorder rec; + + using DrawProc = void(*)(SkCanvas*, SkImage*); + + for (DrawProc proc : {draw_atlas, draw_vertices, draw_points, draw_image_set}) { + canvas->save(); + for (bool injectExtraOp : {false, true}) { + auto c = rec.beginRecording(SkRect::MakeWH(150, 150)); + c->saveLayerAlphaf(nullptr, 0.6f); + proc(c, image.get()); + // For the second draw of each test-case, we inject an extra (useless) operation, which + // inhibits the optimization and produces the correct result. + if (injectExtraOp) { + c->translate(1, 0); + } + c->restore(); + + auto pic = rec.finishRecordingAsPicture(); + + canvas->drawPicture(pic); + canvas->translate(160, 0); + } + canvas->restore(); + canvas->translate(0, 160); + } +} diff --git a/gm/simpleaaclip.cpp b/gm/simpleaaclip.cpp index c14908361345..718f8f490e12 100644 --- a/gm/simpleaaclip.cpp +++ b/gm/simpleaaclip.cpp @@ -28,12 +28,12 @@ namespace skiagm { static void paint_rgn(SkCanvas* canvas, const SkAAClip& clip, const SkPaint& paint) { - SkMask mask; + SkMaskBuilder mask; SkBitmap bm; clip.copyToMask(&mask); - SkAutoMaskFreeImage amfi(mask.fImage); + SkAutoMaskFreeImage amfi(mask.image()); bm.installMaskPixels(mask); diff --git a/gm/slug.cpp b/gm/slug.cpp index c88c0be42df4..dd5d547fd6e1 100644 --- a/gm/slug.cpp +++ b/gm/slug.cpp @@ -25,7 +25,11 @@ #include "include/private/chromium/Slug.h" #include "tools/ToolUtils.h" -#if defined(SK_GANESH) +#if defined(SK_GRAPHITE) +#include "include/gpu/graphite/ContextOptions.h" +#endif + +#if defined(SK_GANESH) || defined(SK_GRAPHITE) #include "include/gpu/GrContextOptions.h" class SlugGM : public skiagm::GM { @@ -37,6 +41,12 @@ class SlugGM : public skiagm::GM { ctxOptions->fSupportBilerpFromGlyphAtlas = true; } +#if defined(SK_GRAPHITE) + void modifyGraphiteContextOptions(skgpu::graphite::ContextOptions* options) const override { + options->fSupportBilerpFromGlyphAtlas = true; + } +#endif + void onOnceBeforeDraw() override { fTypeface = ToolUtils::create_portable_typeface("serif", SkFontStyle()); SkFont font(fTypeface); diff --git a/gm/strokerects.cpp b/gm/strokerects.cpp index 8f23aab83ee9..47983330c120 100644 --- a/gm/strokerects.cpp +++ b/gm/strokerects.cpp @@ -25,12 +25,16 @@ constexpr SkScalar SH = SkIntToScalar(H); class StrokeRectsGM : public GM { public: - StrokeRectsGM() {} + StrokeRectsGM(bool rotated) : fRotated(rotated) {} protected: SkString onShortName() override { - return SkString("strokerects"); + if (fRotated) { + return SkString("strokerects_rotated"); + } else { + return SkString("strokerects"); + } } SkISize onISize() override { @@ -50,6 +54,10 @@ class StrokeRectsGM : public GM { } void onDraw(SkCanvas* canvas) override { + if (fRotated) { + canvas->rotate(45.f, SW, SH); + } + SkPaint paint; paint.setStyle(SkPaint::kStroke_Style); @@ -76,11 +84,12 @@ class StrokeRectsGM : public GM { } private: - using INHERITED = GM; + bool fRotated; }; ////////////////////////////////////////////////////////////////////////////// -DEF_GM( return new StrokeRectsGM; ) +DEF_GM( return new StrokeRectsGM(false); ) +DEF_GM( return new StrokeRectsGM(true); ) } // namespace skiagm diff --git a/gm/surface_manager/BUILD.bazel b/gm/surface_manager/BUILD.bazel new file mode 100644 index 000000000000..b80c2c720c3f --- /dev/null +++ b/gm/surface_manager/BUILD.bazel @@ -0,0 +1,21 @@ +load("//bazel:skia_rules.bzl", "exports_files_legacy", "skia_cc_library") + +licenses(["notice"]) + +exports_files_legacy() + +skia_cc_library( + name = "surface_manager", + testonly = True, + srcs = select({ + "//src/gpu:gl_ganesh": ["GaneshGLSurfaceManager.cpp"], + "//src/gpu:vulkan_ganesh": ["GaneshVulkanSurfaceManager.cpp"], + "//conditions:default": ["RasterSurfaceManager.cpp"], + }), + hdrs = ["SurfaceManager.h"], + visibility = ["//gm:__pkg__"], + deps = ["//:skia_internal"] + select({ + "//src/gpu:has_ganesh_backend": ["//tools/gpu:utils"], + "//conditions:default": [], + }), +) diff --git a/gm/surface_manager/GaneshGLSurfaceManager.cpp b/gm/surface_manager/GaneshGLSurfaceManager.cpp new file mode 100644 index 000000000000..d62386fd4cc6 --- /dev/null +++ b/gm/surface_manager/GaneshGLSurfaceManager.cpp @@ -0,0 +1,62 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "gm/surface_manager/SurfaceManager.h" +#include "include/core/SkColorSpace.h" +#include "include/core/SkColorType.h" +#include "include/core/SkSurface.h" +#include "include/gpu/GrContextOptions.h" +#include "include/gpu/ganesh/SkSurfaceGanesh.h" +#include "include/private/base/SkAssert.h" +#include "tools/gpu/GrContextFactory.h" + +#include + +class GaneshGLSurfaceManager : public SurfaceManager { +public: + GaneshGLSurfaceManager(std::unique_ptr contextFactory, + GrDirectContext* context, + sk_sp surface) + : fContextFactory(std::move(contextFactory)), fContext(context), fSurface(surface) {} + + sk_sp getSurface() override { return fSurface; } + + void flush() override { fContext->flushAndSubmit(fSurface, /* syncCpu= */ true); } + +private: + // The GL context is destroyed when the context factory is destroyed. We prevent early + // destruction of the context by grabbing a reference to the context factory. See the + // GrContextFactory class documentation for details. + std::unique_ptr fContextFactory; + GrDirectContext* fContext; + sk_sp fSurface; +}; + +std::unique_ptr SurfaceManager::FromConfig(std::string config, + int width, + int height) { + if (config == "gles") { + GrContextOptions grCtxOptions; + auto testFactory = std::make_unique(grCtxOptions); + sk_gpu_test::ContextInfo contextInfo = testFactory.get()->getContextInfo( + sk_gpu_test::GrContextFactory::kGLES_ContextType, + sk_gpu_test::GrContextFactory::ContextOverrides::kNone); + GrDirectContext* context = contextInfo.directContext(); + SkASSERT_RELEASE(context); + + SkColorInfo colorInfo( + kRGBA_8888_SkColorType, kPremul_SkAlphaType, SkColorSpace::MakeSRGB()); + SkImageInfo info = SkImageInfo::Make({width, height}, colorInfo); + SkSurfaceProps props(/* flags= */ 0, kRGB_H_SkPixelGeometry); + sk_sp surface = SkSurfaces::RenderTarget( + context, skgpu::Budgeted::kNo, info, /* sampleCount= */ 1, &props); + SkASSERT_RELEASE(surface); + + return std::make_unique(std::move(testFactory), context, surface); + } + return nullptr; +} diff --git a/gm/surface_manager/GaneshVulkanSurfaceManager.cpp b/gm/surface_manager/GaneshVulkanSurfaceManager.cpp new file mode 100644 index 000000000000..280c2857c329 --- /dev/null +++ b/gm/surface_manager/GaneshVulkanSurfaceManager.cpp @@ -0,0 +1,16 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "gm/surface_manager/SurfaceManager.h" + +#include + +std::unique_ptr SurfaceManager::FromConfig(std::string config, + int width, + int height) { + return nullptr; // TODO(lovisolo): Implement. +} diff --git a/gm/surface_manager/RasterSurfaceManager.cpp b/gm/surface_manager/RasterSurfaceManager.cpp new file mode 100644 index 000000000000..72a432a31854 --- /dev/null +++ b/gm/surface_manager/RasterSurfaceManager.cpp @@ -0,0 +1,50 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "gm/surface_manager/SurfaceManager.h" +#include "include/core/SkColorSpace.h" +#include "include/core/SkColorType.h" +#include "include/core/SkImageInfo.h" +#include "include/core/SkSurface.h" +#include "include/private/base/SkAssert.h" + +#include + +class RasterSurfaceManager : public SurfaceManager { +public: + RasterSurfaceManager(sk_sp surface) : fSurface(surface) {} + + sk_sp getSurface() override { return fSurface; } + + void flush() override {} // Nothing to do. + +private: + sk_sp fSurface; +}; + +std::unique_ptr SurfaceManager::FromConfig(std::string config, + int width, + int height) { + // These configs are based on the RasterSink configs here: + // https://skia.googlesource.com/skia/+/faaa8393a68b518ec1f204a60c7c3393e1da2fa2/dm/DM.cpp#1046. + if (config == "8888") { + sk_sp surface = SkSurfaces::Raster(SkImageInfo::Make( + width, height, kN32_SkColorType, kPremul_SkAlphaType, SkColorSpace::MakeSRGB())); + SkASSERT_RELEASE(surface); + return std::make_unique(surface); + } + if (config == "565") { + sk_sp surface = SkSurfaces::Raster(SkImageInfo::Make(width, + height, + kRGB_565_SkColorType, + kPremul_SkAlphaType, + SkColorSpace::MakeSRGB())); + SkASSERT_RELEASE(surface); + return std::make_unique(surface); + } + return nullptr; +} diff --git a/gm/surface_manager/SurfaceManager.h b/gm/surface_manager/SurfaceManager.h new file mode 100644 index 000000000000..ea1df42ead6f --- /dev/null +++ b/gm/surface_manager/SurfaceManager.h @@ -0,0 +1,34 @@ +/* + * Copyright 2023 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef SurfaceManager_DEFINED +#define SurfaceManager_DEFINED + +#include "include/core/SkSurface.h" + +#include + +// Abstract class to create and manage surfaces. +class SurfaceManager { +public: + // Constructs a SurfaceManager for the given config name (e.g. "8888", "565", "gles"). It + // returns nullptr if the config is unknown, and it aborts execution if the config is known but + // we weren't able to construct the surface for any reason. + static std::unique_ptr FromConfig(std::string config, int width, int height); + + // Returns the surface created from the given config. All calls return the same surface. + virtual sk_sp getSurface() = 0; + + // Flushes the surface. This method should be called after the GM is done drawing. This ensures + // that all commands are flushed to the GPU in the case of Ganesh-backed surfaces. Failing to + // do so may lead to blank pixmaps. + virtual void flush() = 0; + + virtual ~SurfaceManager() = default; +}; + +#endif // SurfaceManager_DEFINED diff --git a/gm/verylargebitmap.cpp b/gm/verylargebitmap.cpp index dcfd705657c5..041df778d1a7 100644 --- a/gm/verylargebitmap.cpp +++ b/gm/verylargebitmap.cpp @@ -58,7 +58,7 @@ typedef sk_sp (*ImageMakerProc)(int width, int height, SkColor colors[2 static void show_image(SkCanvas* canvas, int width, int height, SkColor colors[2], ImageMakerProc proc, bool manuallyTile) { - sk_sp image = ToolUtils::MakeTextureImage(canvas, proc(width, height, colors)); + sk_sp image = proc(width, height, colors); if (!image) { return; } diff --git a/gm/vias/BUILD.bazel b/gm/vias/BUILD.bazel new file mode 100644 index 000000000000..b295acef0d46 --- /dev/null +++ b/gm/vias/BUILD.bazel @@ -0,0 +1,42 @@ +load("//bazel:skia_rules.bzl", "exports_files_legacy", "skia_cc_library") +load("//bazel:flags.bzl", "selects", "string_flag_with_values") + +licenses(["notice"]) + +exports_files_legacy() + +skia_cc_library( + name = "vias", + testonly = True, + srcs = select({ + # More complex vias should be defined in their own separate files. + ":needs_simple_vias": ["SimpleVias.cpp"], + }), + hdrs = ["Draw.h"], + visibility = ["//gm:__pkg__"], + deps = [ + "//:skia_internal", + "//gm", + ], +) + +string_flag_with_values( + name = "via", + default = "direct", + values = [ + # The android_gm_test macro assumes that the below values and the --via flag values + # accepted by BazelGMRunner.cpp are the same, so they should be kept in sync. + "direct", + "picture", + "picture_serialization", + ], +) + +selects.config_setting_group( + name = "needs_simple_vias", + match_any = [ + ":direct", + ":picture", + ":picture_serialization", + ], +) diff --git a/gm/vias/Draw.h b/gm/vias/Draw.h new file mode 100644 index 000000000000..e5042a246f9a --- /dev/null +++ b/gm/vias/Draw.h @@ -0,0 +1,36 @@ +/* + * Copyright 2023 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef Draw_DEFINED +#define Draw_DEFINED + +#include "gm/gm.h" +#include "include/core/SkBitmap.h" +#include "include/core/SkSurface.h" + +#include + +// Holds the result of the draw() function. +struct GMOutput { + skiagm::GM::DrawResult result; + std::string msg; + SkBitmap bitmap; + + GMOutput(skiagm::GM::DrawResult result = skiagm::DrawResult::kFail, + std::string msg = "", + SkBitmap bitmap = SkBitmap()) + : result(result), msg(msg), bitmap(bitmap) {} +}; + +// Draws a GM on a surface. +// +// To make the Bazel build more modular, multiple implementations of this function exist. Each +// implementation lives in a separate .cpp files that is conditionally included based on the +// //gm/vias:via Bazel config flag. +GMOutput draw(skiagm::GM* gm, SkSurface* surface, std::string via); + +#endif // Draw_DEFINED diff --git a/gm/vias/SimpleVias.cpp b/gm/vias/SimpleVias.cpp new file mode 100644 index 000000000000..1dc471e303d6 --- /dev/null +++ b/gm/vias/SimpleVias.cpp @@ -0,0 +1,175 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "gm/gm.h" +#include "gm/vias/Draw.h" +#include "include/core/SkBitmap.h" +#include "include/core/SkCanvas.h" +#include "include/core/SkPicture.h" +#include "include/core/SkPictureRecorder.h" +#include "include/core/SkStream.h" +#include "include/core/SkString.h" +#include "include/core/SkSurface.h" +#include "include/encode/SkPngEncoder.h" +#include "include/utils/SkBase64.h" + +#include +#include + +// Implements the "direct" via. It draws the GM directly on the surface under test without any +// additional behaviors. Equivalent to running a GM with DM without using any vias. +static GMOutput draw_direct(skiagm::GM* gm, SkSurface* surface) { + // Run the GM. + SkString msg; + skiagm::GM::DrawResult result = gm->draw(surface->getCanvas(), &msg); + if (result != skiagm::DrawResult::kOk) { + return {result, msg.c_str()}; + } + + // Extract a bitmap from the surface. + SkBitmap bitmap; + bitmap.allocPixelsFlags(surface->getCanvas()->imageInfo(), SkBitmap::kZeroPixels_AllocFlag); + if (!surface->readPixels(bitmap, 0, 0)) { + return {skiagm::DrawResult::kFail, "Could not read pixels from surface"}; + } + return {result, msg.c_str(), bitmap}; +} + +// Encodes a bitmap as a base-64 image/png URI. In the presence of errors, the returned string will +// contain a human-friendly error message. Otherwise the string will start with "data:image/png". +// +// Based on +// https://skia.googlesource.com/skia/+/650c980daa72d887602e701db8f84072e26d4d48/tests/TestUtils.cpp#127. +static std::string bitmap_to_base64_data_uri(const SkBitmap& bitmap) { + SkPixmap pm; + if (!bitmap.peekPixels(&pm)) { + return "peekPixels failed"; + } + + // We're going to embed this PNG in a data URI, so make it as small as possible. + SkPngEncoder::Options options; + options.fFilterFlags = SkPngEncoder::FilterFlag::kAll; + options.fZLibLevel = 9; + + SkDynamicMemoryWStream wStream; + if (!SkPngEncoder::Encode(&wStream, pm, options)) { + return "SkPngEncoder::Encode failed"; + } + + sk_sp pngData = wStream.detachAsData(); + size_t len = SkBase64::Encode(pngData->data(), pngData->size(), nullptr); + + // The PNG can be almost arbitrarily large. We don't want to fill our logs with enormous URLs + // and should only output them on failure. + static const size_t kMaxBase64Length = 1024 * 1024; + if (len > kMaxBase64Length) { + return SkStringPrintf("Encoded image too large (%lu bytes)", len).c_str(); + } + + std::string out; + out.resize(len); + SkBase64::Encode(pngData->data(), pngData->size(), out.data()); + return "data:image/png;base64," + out; +} + +// Implements the "picture" and "picture_serialization" vias. The "serialize" argument determines +// which of the two vias is used. +// +// The "picture" via is based on DM's ViaPicture class here: +// https://skia.googlesource.com/skia/+/dcc56df202cca129edda3f6f8bae04ec306b264e/dm/DMSrcSink.cpp#2310. +// +// The "picture_serialization" via is based on DM's ViaSerialization class here: +// https://skia.googlesource.com/skia/+/dcc56df202cca129edda3f6f8bae04ec306b264e/dm/DMSrcSink.cpp#2281. +static GMOutput draw_via_picture(skiagm::GM* gm, SkSurface* surface, bool serialize) { + // Draw GM on a recording canvas. + SkPictureRecorder recorder; + SkCanvas* recordingCanvas = + recorder.beginRecording(gm->getISize().width(), gm->getISize().height()); + SkString msg; + skiagm::DrawResult result = gm->draw(recordingCanvas, &msg); + if (result != skiagm::DrawResult::kOk) { + return {result, msg.c_str()}; + } + + // Finish recording, and optionally serialize and then deserialize the resulting picture. Note + // that the pic->serialize() call uses the default behavior from SkSerialProcs, which implies a + // dependency on libpng. + sk_sp pic = recorder.finishRecordingAsPicture(); + if (serialize) { + pic = SkPicture::MakeFromData(pic->serialize().get()); + } + + // Draw the recorded picture on the surface under test and extract it as a bitmap. + surface->getCanvas()->drawPicture(pic); + SkBitmap recordedBitmap; + recordedBitmap.allocPixelsFlags(surface->getCanvas()->imageInfo(), + SkBitmap::kZeroPixels_AllocFlag); + if (!surface->readPixels(recordedBitmap, 0, 0)) { + return {skiagm::DrawResult::kFail, "Could not read recorded picture pixels from surface"}; + } + + // Draw GM on the surface under test and extract the reference bitmap. + result = gm->draw(surface->getCanvas(), &msg); + if (result != skiagm::DrawResult::kOk) { + return {result, msg.c_str()}; + } + SkBitmap referenceBitmap; + referenceBitmap.allocPixelsFlags(surface->getCanvas()->imageInfo(), + SkBitmap::kZeroPixels_AllocFlag); + if (!surface->readPixels(referenceBitmap, 0, 0)) { + return {skiagm::DrawResult::kFail, "Could not read reference picture pixels from surface"}; + } + + // The recorded and reference bitmaps should be identical. + if (recordedBitmap.computeByteSize() != referenceBitmap.computeByteSize()) { + return {skiagm::DrawResult::kFail, + SkStringPrintf("Recorded and reference bitmap dimensions do not match: " + "expected byte size %lu, width %d and height %d; " + "got %lu, %d and %d", + referenceBitmap.computeByteSize(), + referenceBitmap.bounds().width(), + referenceBitmap.bounds().height(), + recordedBitmap.computeByteSize(), + recordedBitmap.bounds().width(), + recordedBitmap.bounds().height()) + .c_str()}; + } + if (0 != memcmp(recordedBitmap.getPixels(), + referenceBitmap.getPixels(), + referenceBitmap.computeByteSize())) { + return {skiagm::DrawResult::kFail, + SkStringPrintf("Recorded and reference bitmap pixels do not match.\n" + "Recorded image:\n%s\nReference image:\n%s", + bitmap_to_base64_data_uri(recordedBitmap).c_str(), + bitmap_to_base64_data_uri(referenceBitmap).c_str()) + .c_str()}; + } + + return {result, msg.c_str(), referenceBitmap}; +} + +// This draw() implementation supports the "direct", "picture" and "picture_serialization" vias. +// +// The "direct" via draws the GM directly on the surface under test with no additional behaviors. +// It is equivalent to running a GM with DM without using a via. +// +// The "picture" via tests that if we record a GM using an SkPictureRecorder, the bitmap produced +// by drawing the recorded picture on the surface under test is the same as the bitmap obtained by +// drawing the GM directly on the surface under test. +// +// The "picture_serialization" via is identical to the "picture" via, except that the recorded +// picture is serialized and then deserialized before being drawn on the surface under test. +GMOutput draw(skiagm::GM* gm, SkSurface* surface, std::string via) { + if (via == "direct") { + return draw_direct(gm, surface); + } else if (via == "picture") { + return draw_via_picture(gm, surface, /* serialize= */ false); + } else if (via == "picture_serialization") { + return draw_via_picture(gm, surface, /* serialize= */ true); + } + SK_ABORT("unknown --via flag value: %s", via.c_str()); +} diff --git a/gm/wacky_yuv_formats.cpp b/gm/wacky_yuv_formats.cpp index 9892068614c6..a322b9a5dd18 100644 --- a/gm/wacky_yuv_formats.cpp +++ b/gm/wacky_yuv_formats.cpp @@ -1130,12 +1130,13 @@ class YUVMakeColorSpaceGM : public GM { for (int opaque : { 0, 1 }) { int y = kPad; - auto raster = fOriginalBMs[opaque].asImage()->makeColorSpace(fTargetColorSpace); + auto raster = fOriginalBMs[opaque].asImage()->makeColorSpace( + nullptr, fTargetColorSpace); canvas->drawImage(raster, x, y); y += kTileWidthHeight + kPad; if (fImages[opaque][tagged]) { - auto yuv = fImages[opaque][tagged]->makeColorSpace(fTargetColorSpace, dContext); + auto yuv = fImages[opaque][tagged]->makeColorSpace(dContext, fTargetColorSpace); SkASSERT(yuv); SkASSERT(SkColorSpace::Equals(yuv->colorSpace(), fTargetColorSpace.get())); canvas->drawImage(yuv, x, y); diff --git a/gn/codec.gni b/gn/codec.gni index 68a195fd4964..1c793d268ed0 100644 --- a/gn/codec.gni +++ b/gn/codec.gni @@ -28,7 +28,6 @@ skia_codec_core = [ "$_src/codec/SkSampler.h", "$_src/codec/SkSwizzler.cpp", "$_src/codec/SkSwizzler.h", - "$_src/codec/SkXmp.cpp", ] # List generated by Bazel rules: @@ -49,7 +48,12 @@ skia_codec_decode_bmp = [ "$_src/codec/SkWbmpCodec.h", ] -# Generated by Bazel rule //src/codec:jpeg_xmp +# Generated by Bazel rule //src/codec:xmp_srcs +skia_codec_xmp = [ "$_src/codec/SkXmp.cpp" ] + +# List generated by Bazel rules: +# //src/codec:jpeg_xmp_hdrs +# //src/codec:jpeg_xmp_srcs skia_codec_jpeg_xmp = [ "$_src/codec/SkJpegXmp.cpp", "$_src/codec/SkJpegXmp.h", diff --git a/gn/compile_sksl_tests.py b/gn/compile_sksl_tests.py index 8d296dd79c98..dd95b696ea2b 100755 --- a/gn/compile_sksl_tests.py +++ b/gn/compile_sksl_tests.py @@ -41,6 +41,8 @@ def executeWorklist(input, worklist): os.remove(worklist.name) def extensionForSpirvAsm(ext): + if (ext == '.compute'): + return '.comp' return ext if (ext == '.frag' or ext == '.vert') else '.frag' if settings != "--settings" and settings != "--nosettings": diff --git a/gn/core.gni b/gn/core.gni index 2f47784c2676..111fbd3093a2 100644 --- a/gn/core.gni +++ b/gn/core.gni @@ -49,8 +49,6 @@ skia_core_public = [ "$_include/core/SkCubicMap.h", "$_include/core/SkData.h", "$_include/core/SkDataTable.h", - "$_include/core/SkDeferredDisplayList.h", - "$_include/core/SkDeferredDisplayListRecorder.h", "$_include/core/SkDocument.h", "$_include/core/SkDrawable.h", "$_include/core/SkEncodedImageFormat.h", @@ -88,7 +86,6 @@ skia_core_public = [ "$_include/core/SkPixmap.h", "$_include/core/SkPoint.h", "$_include/core/SkPoint3.h", - "$_include/core/SkPromiseImageTexture.h", "$_include/core/SkRRect.h", "$_include/core/SkRSXform.h", "$_include/core/SkRasterHandleAllocator.h", @@ -105,7 +102,6 @@ skia_core_public = [ "$_include/core/SkString.h", "$_include/core/SkStrokeRec.h", "$_include/core/SkSurface.h", - "$_include/core/SkSurfaceCharacterization.h", "$_include/core/SkSurfaceProps.h", "$_include/core/SkSwizzle.h", "$_include/core/SkTextBlob.h", @@ -136,8 +132,6 @@ skia_core_public = [ # //src/core:core_skslc_srcs # //src/core:core_srcs # //src/core:legacy_draw_looper -# //src/core:sksl_hdrs -# //src/core:sksl_srcs # //src/image:core_hdrs # //src/image:core_srcs # //src/lazy:lazy_hdrs @@ -145,8 +139,6 @@ skia_core_public = [ # //src/opts:private_hdrs # //src/shaders:shader_hdrs # //src/shaders:shader_srcs -# //src/shaders:sksl_hdrs -# //src/shaders:sksl_srcs # //src/text:text_hdrs # //src/text:text_srcs skia_core_sources = [ @@ -257,7 +249,6 @@ skia_core_sources = [ "$_include/private/base/SkMutex.h", "$_include/private/base/SkNoncopyable.h", "$_include/private/base/SkOnce.h", - "$_include/private/base/SkPathEnums.h", "$_include/private/base/SkPoint_impl.h", "$_include/private/base/SkSafe32.h", "$_include/private/base/SkSemaphore.h", @@ -281,6 +272,7 @@ skia_core_sources = [ "$_src/base/SkAutoMalloc.h", "$_src/base/SkBezierCurves.cpp", "$_src/base/SkBezierCurves.h", + "$_src/base/SkBitmaskEnum.h", "$_src/base/SkBlockAllocator.cpp", "$_src/base/SkBlockAllocator.h", "$_src/base/SkBuffer.cpp", @@ -290,6 +282,7 @@ skia_core_sources = [ "$_src/base/SkCubics.h", "$_src/base/SkDeque.cpp", "$_src/base/SkEndian.h", + "$_src/base/SkEnumBitMask.h", "$_src/base/SkFloatingPoint.cpp", "$_src/base/SkHalf.cpp", "$_src/base/SkHalf.h", @@ -351,12 +344,18 @@ skia_core_sources = [ "$_src/core/SkBitmapProcState.cpp", "$_src/core/SkBitmapProcState.h", "$_src/core/SkBitmapProcState_matrixProcs.cpp", + "$_src/core/SkBitmapProcState_opts.cpp", + "$_src/core/SkBitmapProcState_opts_hsw.cpp", + "$_src/core/SkBitmapProcState_opts_ssse3.cpp", "$_src/core/SkBlendMode.cpp", "$_src/core/SkBlendModeBlender.cpp", "$_src/core/SkBlendModeBlender.h", "$_src/core/SkBlendModePriv.h", "$_src/core/SkBlenderBase.h", "$_src/core/SkBlitBWMaskTemplate.h", + "$_src/core/SkBlitMask.h", + "$_src/core/SkBlitMask_opts.cpp", + "$_src/core/SkBlitMask_opts_ssse3.cpp", "$_src/core/SkBlitRow.h", "$_src/core/SkBlitRow_D32.cpp", "$_src/core/SkBlitter.cpp", @@ -432,12 +431,9 @@ skia_core_sources = [ "$_src/core/SkEdgeClipper.cpp", "$_src/core/SkEdgeClipper.h", "$_src/core/SkEffectPriv.h", - "$_src/core/SkEnumBitMask.h", "$_src/core/SkEnumerate.h", "$_src/core/SkExecutor.cpp", "$_src/core/SkFDot6.h", - "$_src/core/SkFilterColorProgram.cpp", - "$_src/core/SkFilterColorProgram.h", "$_src/core/SkFlattenable.cpp", "$_src/core/SkFont.cpp", "$_src/core/SkFontDescriptor.cpp", @@ -460,8 +456,6 @@ skia_core_sources = [ "$_src/core/SkGlyph.h", "$_src/core/SkGlyphRunPainter.cpp", "$_src/core/SkGlyphRunPainter.h", - "$_src/core/SkGpuBlurUtils.cpp", - "$_src/core/SkGpuBlurUtils.h", "$_src/core/SkGraphics.cpp", "$_src/core/SkIDChangeListener.cpp", "$_src/core/SkIPoint16.h", @@ -500,10 +494,7 @@ skia_core_sources = [ "$_src/core/SkMatrixInvert.cpp", "$_src/core/SkMatrixInvert.h", "$_src/core/SkMatrixPriv.h", - "$_src/core/SkMatrixProvider.h", "$_src/core/SkMatrixUtils.h", - "$_src/core/SkMesh.cpp", - "$_src/core/SkMeshPriv.h", "$_src/core/SkMessageBus.h", "$_src/core/SkMipmap.cpp", "$_src/core/SkMipmap.h", @@ -525,6 +516,7 @@ skia_core_sources = [ "$_src/core/SkPathBuilder.cpp", "$_src/core/SkPathEffect.cpp", "$_src/core/SkPathEffectBase.h", + "$_src/core/SkPathEnums.h", "$_src/core/SkPathMakers.h", "$_src/core/SkPathMeasure.cpp", "$_src/core/SkPathMeasurePriv.h", @@ -578,12 +570,6 @@ skia_core_sources = [ "$_src/core/SkRegion_path.cpp", "$_src/core/SkResourceCache.cpp", "$_src/core/SkResourceCache.h", - "$_src/core/SkRuntimeBlender.cpp", - "$_src/core/SkRuntimeBlender.h", - "$_src/core/SkRuntimeEffect.cpp", - "$_src/core/SkRuntimeEffectPriv.h", - "$_src/core/SkSLTypeShared.cpp", - "$_src/core/SkSLTypeShared.h", "$_src/core/SkSafeRange.h", "$_src/core/SkSamplingPriv.h", "$_src/core/SkScalar.cpp", @@ -643,11 +629,6 @@ skia_core_sources = [ "$_src/core/SkTypeface_remote.cpp", "$_src/core/SkTypeface_remote.h", "$_src/core/SkUnPreMultiply.cpp", - "$_src/core/SkVM.cpp", - "$_src/core/SkVM.h", - "$_src/core/SkVMBlitter.cpp", - "$_src/core/SkVMBlitter.h", - "$_src/core/SkVM_fwd.h", "$_src/core/SkValidationUtils.h", "$_src/core/SkVertState.cpp", "$_src/core/SkVertState.h", @@ -694,10 +675,11 @@ skia_core_sources = [ "$_src/opts/SkBitmapProcState_opts.h", "$_src/opts/SkBlitMask_opts.h", "$_src/opts/SkBlitRow_opts.h", + "$_src/opts/SkOpts_RestoreTarget.h", + "$_src/opts/SkOpts_SetTarget.h", "$_src/opts/SkRasterPipeline_opts.h", "$_src/opts/SkSwizzler_opts.h", "$_src/opts/SkUtils_opts.h", - "$_src/opts/SkVM_opts.h", "$_src/shaders/SkBitmapProcShader.cpp", "$_src/shaders/SkBitmapProcShader.h", "$_src/shaders/SkBlendShader.cpp", @@ -710,15 +692,12 @@ skia_core_sources = [ "$_src/shaders/SkCoordClampShader.h", "$_src/shaders/SkEmptyShader.cpp", "$_src/shaders/SkEmptyShader.h", - "$_src/shaders/SkGainmapShader.cpp", "$_src/shaders/SkImageShader.cpp", "$_src/shaders/SkImageShader.h", "$_src/shaders/SkLocalMatrixShader.cpp", "$_src/shaders/SkLocalMatrixShader.h", "$_src/shaders/SkPerlinNoiseShaderImpl.cpp", "$_src/shaders/SkPerlinNoiseShaderImpl.h", - "$_src/shaders/SkRuntimeShader.cpp", - "$_src/shaders/SkRuntimeShader.h", "$_src/shaders/SkShader.cpp", "$_src/shaders/SkShaderBase.cpp", "$_src/shaders/SkShaderBase.h", @@ -730,6 +709,26 @@ skia_core_sources = [ "$_src/text/GlyphRun.h", "$_src/text/StrikeForGPU.cpp", "$_src/text/StrikeForGPU.h", + "$_src/text/TextBlobMailbox.h", +] + +# List generated by Bazel rules: +# //src/core:sksl_hdrs +# //src/core:sksl_srcs +# //src/shaders:sksl_hdrs +# //src/shaders:sksl_srcs +skia_needs_sksl_sources = [ + "$_src/core/SkMesh.cpp", + "$_src/core/SkMeshPriv.h", + "$_src/core/SkRuntimeBlender.cpp", + "$_src/core/SkRuntimeBlender.h", + "$_src/core/SkRuntimeEffect.cpp", + "$_src/core/SkRuntimeEffectPriv.h", + "$_src/core/SkSLTypeShared.cpp", + "$_src/core/SkSLTypeShared.h", + "$_src/shaders/SkGainmapShader.cpp", + "$_src/shaders/SkRuntimeShader.cpp", + "$_src/shaders/SkRuntimeShader.h", ] # Generated by Bazel rule //include/pathops:public_hdrs @@ -888,11 +887,14 @@ skia_no_encode_webp_srcs = [ "$_src/encode/SkWebpEncoder_none.cpp" ] skia_discardable_memory_chromium = [ "$_include/private/chromium/SkDiscardableMemory.h" ] +# Generated by Bazel rule //src/text:no_slug_srcs +skia_no_slug_srcs = [ + "$_src/text/EmptyMailboxImpl.cpp", + "$_src/text/EmptySlugImpl.cpp", +] + skia_core_sources += skia_pathops_sources skia_core_sources += skia_skpicture_sources skia_core_public += skia_pathops_public skia_core_public += skia_skpicture_public - -# TODO(kjlubick) Move this into Chromium's BUILD.gn file. -skia_core_public += skia_discardable_memory_chromium diff --git a/gn/effects_imagefilters.gni b/gn/effects_imagefilters.gni index c2e1c9959fdc..8e58d91debb9 100644 --- a/gn/effects_imagefilters.gni +++ b/gn/effects_imagefilters.gni @@ -32,5 +32,4 @@ skia_effects_imagefilter_sources = [ "$_src/effects/imagefilters/SkPictureImageFilter.cpp", "$_src/effects/imagefilters/SkRuntimeImageFilter.cpp", "$_src/effects/imagefilters/SkShaderImageFilter.cpp", - "$_src/effects/imagefilters/SkTileImageFilter.cpp", ] diff --git a/gn/gm.gni b/gn/gm.gni index e88cbecd8361..d1ec78e4fb5b 100644 --- a/gn/gm.gni +++ b/gn/gm.gni @@ -316,6 +316,7 @@ gm_sources = [ "$_gm/recordopts.cpp", "$_gm/repeated_bitmap.cpp", "$_gm/resizeimagefilter.cpp", + "$_gm/rippleshadergm.cpp", "$_gm/roundrects.cpp", "$_gm/rrect.cpp", "$_gm/rrectclipdrawpaint.cpp", diff --git a/gn/gn_to_bp.py b/gn/gn_to_bp.py index d2c5085a5fa0..eaf582268a68 100755 --- a/gn/gn_to_bp.py +++ b/gn/gn_to_bp.py @@ -783,8 +783,7 @@ def bpfmt(indent, lst, sort=True): 'x86_srcs': bpfmt(16, strip_headers(defs['ssse3'] + defs['avx' ] + - defs['hsw' ] + - defs['skx' ])), + defs['hsw' ])), 'gm_includes' : bpfmt(8, gm_includes), 'gm_srcs' : bpfmt(8, gm_srcs), diff --git a/gn/gpu.gni b/gn/gpu.gni index 306ea536d520..b6eb1418f2ec 100644 --- a/gn/gpu.gni +++ b/gn/gpu.gni @@ -6,6 +6,7 @@ # //include/gpu/d3d/BUILD.bazel # //include/gpu/dawn/BUILD.bazel # //include/gpu/ganesh/BUILD.bazel +# //include/gpu/ganesh/gl/BUILD.bazel # //include/gpu/gl/BUILD.bazel # //include/gpu/gl/egl/BUILD.bazel # //include/gpu/gl/glx/BUILD.bazel @@ -76,12 +77,14 @@ skia_gpu_public = [ "$_include/gpu/ShaderErrorHandler.h", "$_include/gpu/ganesh/GrExternalTextureGenerator.h", "$_include/gpu/ganesh/SkImageGanesh.h", + "$_include/gpu/ganesh/SkMeshGanesh.h", "$_include/gpu/ganesh/SkSurfaceGanesh.h", "$_include/gpu/mock/GrMockTypes.h", ] # List generated by Bazel rules: # //include/private/gpu/ganesh:private_hdrs +# //include/private/gpu/ganesh:gl_private_hdrs # //src/gpu/ganesh/effects:effects_hdrs # //src/gpu/ganesh/effects:effects_srcs # //src/gpu/ganesh/geometry:geometry_hdrs @@ -124,7 +127,6 @@ skia_ganesh_private = [ "$_src/gpu/ganesh/GrAHardwareBufferImageGenerator.cpp", "$_src/gpu/ganesh/GrAHardwareBufferImageGenerator.h", "$_src/gpu/ganesh/GrAHardwareBufferUtils.cpp", - "$_src/gpu/ganesh/GrAHardwareBufferUtils_impl.h", "$_src/gpu/ganesh/GrAppliedClip.h", "$_src/gpu/ganesh/GrAttachment.cpp", "$_src/gpu/ganesh/GrAttachment.h", @@ -133,6 +135,7 @@ skia_ganesh_private = [ "$_src/gpu/ganesh/GrAutoLocaleSetter.h", "$_src/gpu/ganesh/GrBackendSemaphore.cpp", "$_src/gpu/ganesh/GrBackendSurface.cpp", + "$_src/gpu/ganesh/GrBackendSurfacePriv.h", "$_src/gpu/ganesh/GrBackendTextureImageGenerator.cpp", "$_src/gpu/ganesh/GrBackendTextureImageGenerator.h", "$_src/gpu/ganesh/GrBackendUtils.cpp", @@ -223,6 +226,8 @@ skia_ganesh_private = [ "$_src/gpu/ganesh/GrManagedResource.h", "$_src/gpu/ganesh/GrMemoryPool.cpp", "$_src/gpu/ganesh/GrMemoryPool.h", + "$_src/gpu/ganesh/GrMeshBuffers.cpp", + "$_src/gpu/ganesh/GrMeshBuffers.h", "$_src/gpu/ganesh/GrMeshDrawTarget.cpp", "$_src/gpu/ganesh/GrMeshDrawTarget.h", "$_src/gpu/ganesh/GrNativeRect.h", @@ -461,6 +466,8 @@ skia_ganesh_private = [ "$_src/gpu/ganesh/image/SkImage_LazyTexture.h", "$_src/gpu/ganesh/image/SkImage_RasterPinnable.cpp", "$_src/gpu/ganesh/image/SkImage_RasterPinnable.h", + "$_src/gpu/ganesh/image/SkSpecialImage_Ganesh.cpp", + "$_src/gpu/ganesh/image/SkSpecialImage_Ganesh.h", "$_src/gpu/ganesh/mock/GrMockAttachment.h", "$_src/gpu/ganesh/mock/GrMockBuffer.h", "$_src/gpu/ganesh/mock/GrMockCaps.cpp", @@ -571,7 +578,7 @@ skia_ganesh_private = [ "$_src/image/SkImage_AndroidFactories.cpp", ] -# Generated by Bazel rule //include/private/chromium:gpu_private_hdrs +# Generated by Bazel rule //include/private/chromium:ganesh_private_hdrs skia_gpu_chromium_public = [ "$_include/private/chromium/GrDeferredDisplayList.h", "$_include/private/chromium/GrDeferredDisplayListRecorder.h", @@ -580,8 +587,11 @@ skia_gpu_chromium_public = [ "$_include/private/chromium/SkImageChromium.h", ] -# Generated by Bazel rule //include/gpu/gl:public_hdrs +# List generated by Bazel rules: +# //include/gpu/gl:public_hdrs +# //include/gpu/ganesh/gl:public_hdrs skia_gpu_gl_public = [ + "$_include/gpu/ganesh/gl/GrGLBackendSurface.h", "$_include/gpu/gl/GrGLAssembleHelpers.h", "$_include/gpu/gl/GrGLAssembleInterface.h", "$_include/gpu/gl/GrGLConfig.h", @@ -597,6 +607,7 @@ skia_gpu_gl_public = [ # //src/gpu/ganesh/gl/builders:builder_hdrs # //src/gpu/ganesh/gl/builders:builder_srcs skia_gpu_gl_private = [ + "$_src/gpu/ganesh/gl/AHardwareBufferGL.cpp", "$_src/gpu/ganesh/gl/GrGLAssembleGLESInterfaceAutogen.cpp", "$_src/gpu/ganesh/gl/GrGLAssembleGLInterfaceAutogen.cpp", "$_src/gpu/ganesh/gl/GrGLAssembleHelpers.cpp", @@ -604,6 +615,8 @@ skia_gpu_gl_private = [ "$_src/gpu/ganesh/gl/GrGLAssembleWebGLInterfaceAutogen.cpp", "$_src/gpu/ganesh/gl/GrGLAttachment.cpp", "$_src/gpu/ganesh/gl/GrGLAttachment.h", + "$_src/gpu/ganesh/gl/GrGLBackendSurface.cpp", + "$_src/gpu/ganesh/gl/GrGLBackendSurfacePriv.h", "$_src/gpu/ganesh/gl/GrGLBuffer.cpp", "$_src/gpu/ganesh/gl/GrGLBuffer.h", "$_src/gpu/ganesh/gl/GrGLCaps.cpp", @@ -745,21 +758,17 @@ skia_gpu_vk_public = [ "$_include/gpu/vk/GrVkTypes.h", ] -# Generated by Bazel rule //include/private/chromium:vk_chromium_hdrs +# Generated by Bazel rule //include/private/chromium:vk_ganesh_hdrs skia_gpu_vk_chromium_public = [ "$_include/private/chromium/GrVkSecondaryCBDrawContext.h" ] # List generated by Bazel rules: -# //include/gpu/vk:public_hdrs # //include/private/gpu/ganesh:vk_private_hdrs # //src/gpu/ganesh/vk:vk_hdrs # //src/gpu/ganesh/vk:vk_srcs skia_gpu_vk_private = [ - "$_include/gpu/vk/GrVkBackendContext.h", - "$_include/gpu/vk/GrVkExtensions.h", - "$_include/gpu/vk/GrVkMemoryAllocator.h", - "$_include/gpu/vk/GrVkTypes.h", "$_include/private/gpu/ganesh/GrVkTypesPriv.h", + "$_src/gpu/ganesh/vk/AHardwareBufferVk.cpp", "$_src/gpu/ganesh/vk/GrVkBuffer.cpp", "$_src/gpu/ganesh/vk/GrVkBuffer.h", "$_src/gpu/ganesh/vk/GrVkCaps.cpp", @@ -1041,7 +1050,6 @@ skia_shared_gpu_sources = [ "$_src/gpu/DitherUtils.cpp", "$_src/gpu/DitherUtils.h", "$_src/gpu/GpuTypesPriv.h", - "$_src/gpu/GrAHardwareBufferUtils.h", "$_src/gpu/KeyBuilder.h", "$_src/gpu/MutableTextureStateRef.h", "$_src/gpu/PipelineUtils.cpp", diff --git a/gn/graphite.gni b/gn/graphite.gni index 45932e892672..b9cba91567e2 100644 --- a/gn/graphite.gni +++ b/gn/graphite.gni @@ -22,6 +22,8 @@ skia_graphite_public = [ ] skia_graphite_sources = [ + "$_src/AtlasProvider.cpp", + "$_src/AtlasProvider.h", "$_src/AttachmentTypes.h", "$_src/Attribute.h", "$_src/BackendSemaphore.cpp", @@ -97,6 +99,8 @@ skia_graphite_sources = [ "$_src/PaintParams.h", "$_src/PaintParamsKey.cpp", "$_src/PaintParamsKey.h", + "$_src/PathAtlas.cpp", + "$_src/PathAtlas.h", "$_src/PipelineData.cpp", "$_src/PipelineData.h", "$_src/PipelineDataCache.h", @@ -162,6 +166,7 @@ skia_graphite_sources = [ "$_src/compute/ComputeStep.h", "$_src/compute/DispatchGroup.cpp", "$_src/compute/DispatchGroup.h", + "$_src/geom/AtlasShape.h", "$_src/geom/BoundsManager.h", "$_src/geom/EdgeAAQuad.h", "$_src/geom/Geometry.h", @@ -175,12 +180,15 @@ skia_graphite_sources = [ "$_src/geom/Transform_graphite.h", "$_src/render/AnalyticRRectRenderStep.cpp", "$_src/render/AnalyticRRectRenderStep.h", + "$_src/render/AtlasShapeRenderStep.cpp", + "$_src/render/AtlasShapeRenderStep.h", "$_src/render/BitmapTextRenderStep.cpp", "$_src/render/BitmapTextRenderStep.h", "$_src/render/CommonDepthStencilSettings.h", "$_src/render/CoverBoundsRenderStep.cpp", "$_src/render/CoverBoundsRenderStep.h", "$_src/render/DynamicInstancesPatchAllocator.h", + "$_src/render/GraphiteVertexFiller.cpp", "$_src/render/MiddleOutFanRenderStep.cpp", "$_src/render/MiddleOutFanRenderStep.h", "$_src/render/SDFTextRenderStep.cpp", @@ -193,8 +201,8 @@ skia_graphite_sources = [ "$_src/render/TessellateWedgesRenderStep.h", "$_src/render/VerticesRenderStep.cpp", "$_src/render/VerticesRenderStep.h", - "$_src/text/AtlasManager.cpp", - "$_src/text/AtlasManager.h", + "$_src/text/TextAtlasManager.cpp", + "$_src/text/TextAtlasManager.h", ] skia_graphite_dawn_public = [ diff --git a/gn/opts.gni b/gn/opts.gni index 56d1bc0496d8..f2e49fb6f39e 100644 --- a/gn/opts.gni +++ b/gn/opts.gni @@ -9,4 +9,3 @@ _src = get_path_info("../src", "abspath") ssse3 = [ "$_src/opts/SkOpts_ssse3.cpp" ] avx = [ "$_src/opts/SkOpts_avx.cpp" ] hsw = [ "$_src/opts/SkOpts_hsw.cpp" ] -skx = [ "$_src/opts/SkOpts_skx.cpp" ] diff --git a/gn/shared_sources.gni b/gn/shared_sources.gni index 146a537ff820..25a50dd7cbd7 100644 --- a/gn/shared_sources.gni +++ b/gn/shared_sources.gni @@ -21,5 +21,4 @@ skia_opts = { ssse3_sources = ssse3 avx_sources = avx hsw_sources = hsw - skx_sources = skx } diff --git a/gn/skia.gni b/gn/skia.gni index aece5c4a52b8..1b0aa4176461 100644 --- a/gn/skia.gni +++ b/gn/skia.gni @@ -12,6 +12,7 @@ declare_args() { skia_android_serial = "" skia_compile_modules = false skia_compile_sksl_tests = false + skia_dwritecore_sdk = "" skia_enable_api_available_macro = true skia_enable_android_utils = is_skia_dev_build skia_enable_discrete_gpu = true @@ -25,7 +26,6 @@ declare_args() { (is_wasm && skia_canvaskit_enable_skottie) skia_enable_precompile = true skia_enable_sksl = true - skia_enable_skvm = false skia_enable_svg = !is_component_build skia_enable_tools = is_skia_dev_build skia_enable_gpu_debug_layers = is_skia_dev_build && is_debug @@ -55,6 +55,7 @@ declare_args() { skia_use_gl = !is_fuchsia skia_use_icu = !is_fuchsia skia_use_libavif = false + skia_use_libgrapheme = false skia_use_libheif = is_skia_dev_build skia_use_jpeg_gainmaps = is_skia_dev_build skia_use_libjpeg_turbo_decode = true @@ -82,6 +83,10 @@ declare_args() { skia_use_x11 = is_linux skia_use_xps = true + # Use the safe mode for libcxx + # See: https://libcxx.llvm.org/UsingLibcxx.html#enabling-the-safe-libc-mode + skia_use_safe_libcxx = false + # deprecated, we will eventually use just skia_enable_ganesh skia_enable_gpu = true skia_enable_graphite = false @@ -100,8 +105,6 @@ declare_args() { } declare_args() { - skia_enable_sksl_in_raster_pipeline = !skia_enable_skvm - skia_enable_skvm_jit_when_possible = is_skia_dev_build && skia_enable_skvm skia_enable_sksl_tracing = is_skia_dev_build && !skia_enable_optimize_size } @@ -129,7 +132,8 @@ declare_args() { } declare_args() { - skia_enable_skunicode = skia_use_icu || skia_use_client_icu + skia_enable_skunicode = + skia_use_icu || skia_use_client_icu || skia_use_libgrapheme } if (skia_use_angle && skia_gl_standard != "gles") { @@ -164,6 +168,9 @@ declare_args() { # icu_bidi sources skia_icu_bidi_third_party_dir = "//third_party/icu_bidi" + + # libgrapheme sources + skia_libgrapheme_third_party_dir = "//third_party/libgrapheme" } declare_args() { diff --git a/gn/sksl.gni b/gn/sksl.gni index 6bbf2631893a..853641c4da7d 100644 --- a/gn/sksl.gni +++ b/gn/sksl.gni @@ -11,7 +11,6 @@ # //src/sksl/BUILD.bazel # //src/sksl/analysis/BUILD.bazel # //src/sksl/codegen/BUILD.bazel -# //src/sksl/dsl/BUILD.bazel # //src/sksl/ir/BUILD.bazel # //src/sksl/tracing/BUILD.bazel # //src/sksl/transform/BUILD.bazel @@ -25,13 +24,10 @@ _include = get_path_info("../include", "abspath") # List generated by Bazel rules: # //include/private:sksl_private_hdrs # //include/sksl:public_hdrs -# //src/sksl:core_hdrs -# //src/sksl:core_srcs # //src/sksl/analysis:analysis_hdrs # //src/sksl/analysis:analysis_srcs # //src/sksl/codegen:core_srcs # //src/sksl/codegen:private_hdrs -# //src/sksl/dsl:srcs # //src/sksl/ir:ir_hdrs # //src/sksl/ir:ir_srcs # //src/sksl/tracing:private_hdrs @@ -39,6 +35,8 @@ _include = get_path_info("../include", "abspath") # //src/sksl/tracing:srcs # //src/sksl/transform:transform_hdrs # //src/sksl/transform:transform_srcs +# //src/sksl:core_hdrs +# //src/sksl:core_srcs skia_sksl_sources = [ "$_include/private/SkSLDefines.h", "$_include/private/SkSLSampleUsage.h", @@ -68,7 +66,6 @@ skia_sksl_sources = [ "$_src/sksl/SkSLMangler.h", "$_src/sksl/SkSLMemoryLayout.h", "$_src/sksl/SkSLMemoryPool.h", - "$_src/sksl/SkSLModifiersPool.h", "$_src/sksl/SkSLModuleLoader.cpp", "$_src/sksl/SkSLModuleLoader.h", "$_src/sksl/SkSLOperator.cpp", @@ -113,15 +110,6 @@ skia_sksl_sources = [ "$_src/sksl/codegen/SkSLRasterPipelineBuilder.h", "$_src/sksl/codegen/SkSLRasterPipelineCodeGenerator.cpp", "$_src/sksl/codegen/SkSLRasterPipelineCodeGenerator.h", - "$_src/sksl/codegen/SkSLVMCodeGenerator.cpp", - "$_src/sksl/codegen/SkSLVMCodeGenerator.h", - "$_src/sksl/dsl/DSLExpression.cpp", - "$_src/sksl/dsl/DSLExpression.h", - "$_src/sksl/dsl/DSLModifiers.h", - "$_src/sksl/dsl/DSLStatement.cpp", - "$_src/sksl/dsl/DSLStatement.h", - "$_src/sksl/dsl/DSLType.cpp", - "$_src/sksl/dsl/DSLType.h", "$_src/sksl/ir/SkSLBinaryExpression.cpp", "$_src/sksl/ir/SkSLBinaryExpression.h", "$_src/sksl/ir/SkSLBlock.cpp", @@ -154,6 +142,7 @@ skia_sksl_sources = [ "$_src/sksl/ir/SkSLDiscardStatement.h", "$_src/sksl/ir/SkSLDoStatement.cpp", "$_src/sksl/ir/SkSLDoStatement.h", + "$_src/sksl/ir/SkSLEmptyExpression.h", "$_src/sksl/ir/SkSLExpression.cpp", "$_src/sksl/ir/SkSLExpression.h", "$_src/sksl/ir/SkSLExpressionStatement.cpp", @@ -186,7 +175,8 @@ skia_sksl_sources = [ "$_src/sksl/ir/SkSLLiteral.cpp", "$_src/sksl/ir/SkSLLiteral.h", "$_src/sksl/ir/SkSLMethodReference.h", - "$_src/sksl/ir/SkSLModifiers.cpp", + "$_src/sksl/ir/SkSLModifierFlags.cpp", + "$_src/sksl/ir/SkSLModifierFlags.h", "$_src/sksl/ir/SkSLModifiers.h", "$_src/sksl/ir/SkSLModifiersDeclaration.cpp", "$_src/sksl/ir/SkSLModifiersDeclaration.h", @@ -302,7 +292,6 @@ skslc_deps = [ "$_src/core/SkStream.cpp", "$_src/core/SkString.cpp", "$_src/core/SkStringUtils.cpp", - "$_src/core/SkVM.cpp", "$_src/gpu/ganesh/GrMemoryPool.cpp", "$_src/ports/SkMemory_malloc.cpp", "$_src/ports/SkOSFile_stdio.cpp", diff --git a/gn/sksl_tests.gni b/gn/sksl_tests.gni index a033fdc8b5be..ae2b84890d2c 100644 --- a/gn/sksl_tests.gni +++ b/gn/sksl_tests.gni @@ -80,6 +80,7 @@ sksl_error_tests = [ "errors/DuplicateRTAdjust.sksl", "errors/DuplicateSkClockwise.sksl", "errors/DuplicateSymbol.rts", + "errors/DuplicateWorkgroupSize.compute", "errors/EmptyArray.rts", "errors/EmptyBuffer.sksl", "errors/EmptyStruct.rts", @@ -110,15 +111,19 @@ sksl_error_tests = [ "errors/InvalidAssignmentPipelineInputs.sksl", "errors/InvalidAtomicDeclarations.compute", "errors/InvalidAtomicOperations.compute", - "errors/InvalidBackendBindingFlagsGL.sksl", "errors/InvalidBackendBindingFlagsMetal.sksl", "errors/InvalidBackendBindingFlagsSPIRV.sksl", "errors/InvalidBackendBindingFlagsWGSL.sksl", "errors/InvalidExtensionDirective.sksl", - "errors/InvalidOutParams.rts", + "errors/InvalidInOutType.compute", + "errors/InvalidLocalSizeQualifier.compute", + "errors/InvalidMainParameters.compute", + "errors/InvalidMainReturn.compute", + "errors/InvalidOutParams.sksl", "errors/InvalidToken.rts", "errors/InvalidUnary.rts", "errors/InvalidUniformTypes.sksl", + "errors/InvalidUnsizedArray.compute", "errors/InvalidVersionDirective.sksl", "errors/InvalidWorkgroupCompute.compute", "errors/InvalidWorkgroupRTS.rts", @@ -135,6 +140,8 @@ sksl_error_tests = [ "errors/MatrixToVectorCastTooSmall.rts", "errors/MismatchedNumbers.rts", "errors/MismatchedNumbersES3.sksl", + "errors/MisplacedLocalSizeQualifier.sksl", + "errors/MissingWorkgroupSize.compute", "errors/ModifiersInStruct.rts", "errors/ModifiersRepeated.sksl", "errors/MultipleBackendFlags.sksl", @@ -326,24 +333,6 @@ sksl_glsl_tests = [ # Generated by Bazel rule //resources/sksl:sksl_metal_tests sksl_metal_tests = [ - "compute/ArrayAdd.compute", - "compute/AtomicDeclarations.compute", - "compute/AtomicOperations.compute", - "compute/AtomicOperationsOverArrayAndStruct.compute", - "compute/Barrier.compute", - "compute/BuiltinStageInputs.compute", - "compute/Desaturate.compute", - "compute/DesaturateFunction.compute", - "compute/DesaturateReadWrite.compute", - "compute/MatrixMultiply.compute", - "compute/Raytrace.compute", - "compute/Uniforms.compute", - "compute/Workgroup.compute", - "errors/ArrayUnspecifiedDimensions.sksl", - "errors/InvalidInOutType.compute", - "errors/InvalidMainParameters.compute", - "errors/InvalidMainReturn.compute", - "errors/InvalidUnsizedArray.compute", "metal/CastHalf4ToMat2x2.sksl", "metal/CastMat2x2ToMat3x3.sksl", "metal/CastMat2x3ToMat4x4.sksl", @@ -394,147 +383,8 @@ sksl_spirv_tests = [ # Generated by Bazel rule //resources/sksl:sksl_wgsl_tests sksl_wgsl_tests = [ - "inliner/DoWhileTestCannotBeInlined.sksl", - "intrinsics/AbsFloat.sksl", - "intrinsics/AbsInt.sksl", - "intrinsics/Acos.sksl", - "intrinsics/Asin.sksl", - "intrinsics/Atan.sksl", - "intrinsics/Ceil.sksl", - "intrinsics/ClampFloat.sksl", - "intrinsics/ClampInt.sksl", - "intrinsics/ClampUInt.sksl", - "intrinsics/Cos.sksl", - "intrinsics/Degrees.sksl", - "intrinsics/Dot.sksl", - "intrinsics/Equal.sksl", - "intrinsics/Exp.sksl", - "intrinsics/Exp2.sksl", - "intrinsics/FaceForward.sksl", - "intrinsics/Floor.sksl", - "intrinsics/Fract.sksl", - "intrinsics/GreaterThan.sksl", - "intrinsics/GreaterThanEqual.sksl", - "intrinsics/Inversesqrt.sksl", - "intrinsics/LessThan.sksl", - "intrinsics/LessThanEqual.sksl", - "intrinsics/Log.sksl", - "intrinsics/Log2.sksl", - "intrinsics/MaxFloat.sksl", - "intrinsics/MaxInt.sksl", - "intrinsics/MaxUint.sksl", - "intrinsics/MinFloat.sksl", - "intrinsics/MinInt.sksl", - "intrinsics/MinUint.sksl", - "intrinsics/MixBool.sksl", - "intrinsics/MixFloatES2.sksl", - "intrinsics/MixFloatES3.sksl", - "intrinsics/Mod.sksl", - "intrinsics/Normalize.sksl", - "intrinsics/Not.sksl", - "intrinsics/NotEqual.sksl", - "intrinsics/Pow.sksl", - "intrinsics/Radians.sksl", - "intrinsics/SignFloat.sksl", - "intrinsics/SignInt.sksl", - "intrinsics/Sin.sksl", - "intrinsics/Smoothstep.sksl", - "intrinsics/Sqrt.sksl", - "intrinsics/Step.sksl", - "intrinsics/Tan.sksl", - "runtime/GLSLTypeNames.rts", - "runtime/GlobalVariables.rts", - "runtime/LargeProgram_BlocklessLoops.rts", - "runtime/LargeProgram_FlatLoop.rts", - "runtime/LargeProgram_Functions.rts", - "runtime/LargeProgram_NestedLoops.rts", - "runtime/LargeProgram_SplitLoops.rts", - "runtime/LargeProgram_ZeroIterFor.rts", - "runtime/LoopFloat.rts", - "runtime/LoopInt.rts", - "runtime/QualifierOrder.rts", - "runtime/RecursiveComparison_Arrays.rts", - "runtime/RecursiveComparison_Structs.rts", - "runtime/RecursiveComparison_Types.rts", - "runtime/RecursiveComparison_Vectors.rts", - "shared/ArrayComparison.sksl", - "shared/ArrayConstructors.sksl", - "shared/ArrayFollowedByScalar.sksl", - "shared/ArrayIndexTypes.sksl", - "shared/ArrayTypes.sksl", - "shared/Assignment.sksl", - "shared/CommaMixedTypes.sksl", - "shared/CommaSideEffects.sksl", - "shared/ConstArray.sksl", - "shared/ConstGlobal.sksl", - "shared/ConstantIf.sksl", - "shared/Control.sksl", - "shared/DeadDoWhileLoop.sksl", - "shared/DeadReturn.sksl", - "shared/DeadReturnES3.sksl", - "shared/Discard.sksl", - "shared/DoWhileControlFlow.sksl", - "shared/EmptyBlocksES2.sksl", - "shared/EmptyBlocksES3.sksl", - "shared/ForLoopMultipleInit.sksl", - "shared/FunctionAnonymousParameters.sksl", - "shared/HelloWorld.sksl", - "shared/InoutParameters.sksl", - "shared/InoutParamsAreDistinct.sksl", - "shared/InstanceID.vert", - "shared/IntegerDivisionES3.sksl", - "shared/LogicalAndShortCircuit.sksl", - "shared/LogicalOrShortCircuit.sksl", - "shared/Matrices.sksl", - "shared/MatrixConstructorsES2.sksl", - "shared/MatrixConstructorsES3.sksl", - "shared/MatrixEquality.sksl", - "shared/MatrixIndexLookup.sksl", - "shared/MatrixIndexStore.sksl", - "shared/OutParams.sksl", - "shared/OutParamsAreDistinct.sksl", - "shared/OutParamsAreDistinctFromGlobal.sksl", - "shared/OutParamsDoubleSwizzle.sksl", - "shared/OutParamsFunctionCallInArgument.sksl", - "shared/PostfixExpressions.sksl", - "shared/PrefixExpressionsES2.sksl", - "shared/PrefixExpressionsES3.sksl", - "shared/ReturnsValueOnEveryPathES2.sksl", - "shared/StructArrayFollowedByScalar.sksl", - "shared/StructComparison.sksl", - "shared/StructIndexLookup.sksl", - "shared/StructIndexStore.sksl", - "shared/Structs.sksl", - "shared/StructsInFunctions.sksl", - "shared/Switch.sksl", - "shared/SwitchDefaultOnly.sksl", - "shared/SwitchWithEarlyReturn.sksl", - "shared/SwitchWithFallthrough.sksl", - "shared/SwitchWithFallthroughAndVarDecls.sksl", - "shared/SwitchWithLoops.sksl", - "shared/SwitchWithLoopsES3.sksl", - "shared/SwizzleAsLValue.sksl", - "shared/SwizzleBoolConstants.sksl", - "shared/SwizzleByConstantIndex.sksl", - "shared/SwizzleByIndex.sksl", - "shared/SwizzleConstants.sksl", - "shared/SwizzleIndexLookup.sksl", - "shared/SwizzleIndexStore.sksl", - "shared/SwizzleLTRB.sksl", - "shared/SwizzleOpt.sksl", - "shared/SwizzleScalar.sksl", - "shared/SwizzleScalarBool.sksl", - "shared/SwizzleScalarInt.sksl", - "shared/TernaryComplexNesting.sksl", - "shared/TernaryExpression.sksl", - "shared/TernaryNesting.sksl", - "shared/TernaryTrueFalseOptimization.sksl", - "shared/UnaryPositiveNegative.sksl", - "shared/UniformMatrixResize.sksl", - "shared/UnusedVariables.sksl", - "shared/VectorConstructors.sksl", - "shared/VertexID.vert", - "shared/WhileLoopControlFlow.sksl", + "spirv/CombinedSamplerTypeDawnCompatMode.sksl", + "spirv/FunctionParametersOfTextureAndSamplerTypeDawnCompatMode.sksl", "wgsl/BuiltinFragmentStageIO.sksl", "wgsl/BuiltinVertexStageIO.vert", "wgsl/CastMat2x2ToMat3x3.sksl", @@ -548,12 +398,15 @@ sksl_wgsl_tests = [ "wgsl/GlobalUniforms.sksl", "wgsl/IfStatement.sksl", "wgsl/IndexExpression.sksl", + "wgsl/InterfaceBlockUniforms.sksl", "wgsl/MainDoesNotHaveFragCoordParameter.sksl", "wgsl/MainHasFragCoordParameter.sksl", "wgsl/MainHasVoidReturn.sksl", "wgsl/MatrixConstructorDiagonal.sksl", "wgsl/OutParams.sksl", + "wgsl/Sample.sksl", "wgsl/TernaryThenShortCircuit.sksl", + "wgsl/UniformMatrices.sksl", "wgsl/UserDefinedPipelineIO.sksl", "wgsl/VertexPositionOutputIsAlwaysDeclared.vert", ] @@ -711,6 +564,7 @@ sksl_shared_tests = [ "shared/InoutParameters.sksl", "shared/InoutParamsAreDistinct.sksl", "shared/InstanceID.vert", + "shared/InstanceIDInFunction.vert", "shared/IntegerDivisionES3.sksl", "shared/InterfaceBlockBuffer.sksl", "shared/InterfaceBlockMultipleAnonymous.sksl", @@ -754,6 +608,7 @@ sksl_shared_tests = [ "shared/Ossfuzz41000.sksl", "shared/Ossfuzz50636.sksl", "shared/Ossfuzz58483.sksl", + "shared/Ossfuzz60077.sksl", "shared/OutParams.sksl", "shared/OutParamsAreDistinct.sksl", "shared/OutParamsAreDistinctFromGlobal.sksl", @@ -795,6 +650,7 @@ sksl_shared_tests = [ "shared/StructsInFunctions.sksl", "shared/SwitchWithEarlyReturn.sksl", "shared/SwizzleAsLValue.sksl", + "shared/SwizzleAsLValueES3.sksl", "shared/SwizzleBoolConstants.sksl", "shared/SwizzleByConstantIndex.sksl", "shared/SwizzleByIndex.sksl", @@ -825,9 +681,27 @@ sksl_shared_tests = [ "shared/VectorScalarMath.sksl", "shared/VectorToMatrixCast.sksl", "shared/VertexID.vert", + "shared/VertexIDInFunction.vert", "shared/WhileLoopControlFlow.sksl", ] +# Generated by Bazel rule //resources/sksl:sksl_compute_tests +sksl_compute_tests = [ + "compute/ArrayAdd.compute", + "compute/AtomicDeclarations.compute", + "compute/AtomicOperations.compute", + "compute/AtomicOperationsOverArrayAndStruct.compute", + "compute/Barrier.compute", + "compute/BuiltinStageInputs.compute", + "compute/Desaturate.compute", + "compute/DesaturateFunction.compute", + "compute/DesaturateReadWrite.compute", + "compute/MatrixMultiply.compute", + "compute/Raytrace.compute", + "compute/Uniforms.compute", + "compute/Workgroup.compute", +] + # Generated by Bazel rule //resources/sksl:sksl_folding_tests sksl_folding_tests = [ "folding/ArrayFolding.sksl", @@ -859,6 +733,7 @@ sksl_folding_tests = [ # Generated by Bazel rule //resources/sksl:sksl_inliner_tests sksl_inliner_tests = [ + "inliner/CommaExpressionsAllowInlining.sksl", "inliner/DoWhileBodyMustBeInlinedIntoAScope.sksl", "inliner/DoWhileTestCannotBeInlined.sksl", "inliner/ForBodyMustBeInlinedIntoAScope.sksl", @@ -887,6 +762,7 @@ sksl_inliner_tests = [ "inliner/ModifiedArrayParametersCannotBeInlined.sksl", "inliner/ModifiedStructParametersCannotBeInlined.sksl", "inliner/NoInline.sksl", + "inliner/OpaqueCallsCannotBeInlined.sksl", "inliner/Ossfuzz37994.sksl", "inliner/ShortCircuitEvaluationsCannotInlineRightHandSide.sksl", "inliner/StaticSwitch.sksl", @@ -971,6 +847,7 @@ sksl_rte_tests = [ "realistic/BlueNeurons.rts", "realistic/HSLColorFilter.rtcf", "realistic/HighContrastFilter.rtcf", + "realistic/RippleShader.rts", "runtime/AllowNarrowingConversions.rts", "runtime/ArrayIndexing.rts", "runtime/ArrayNarrowingConversions.rts", @@ -1068,14 +945,14 @@ sksl_glsl_tests_sources = sksl_glsl_settings_tests_sources = sksl_blend_tests + sksl_settings_tests sksl_metal_tests_sources = - sksl_metal_tests + sksl_blend_tests + sksl_shared_tests + sksl_blend_tests + sksl_compute_tests + sksl_metal_tests + sksl_shared_tests sksl_hlsl_tests_sources = sksl_blend_tests + sksl_shared_tests -sksl_wgsl_tests_sources = sksl_blend_tests + sksl_wgsl_tests +sksl_wgsl_tests_sources = sksl_blend_tests + sksl_shared_tests + sksl_wgsl_tests sksl_spirv_tests_sources = - sksl_blend_tests + sksl_shared_tests + sksl_spirv_tests + sksl_blend_tests + sksl_compute_tests + sksl_shared_tests + sksl_spirv_tests sksl_skrp_tests_sources = sksl_folding_tests + sksl_rte_tests + sksl_shared_tests diff --git a/gn/tests.gni b/gn/tests.gni index 79ffef7342c1..873223e58456 100644 --- a/gn/tests.gni +++ b/gn/tests.gni @@ -266,6 +266,7 @@ tests_sources = [ "$_tests/SkSLSPIRVTestbed.cpp", "$_tests/SkSLTest.cpp", "$_tests/SkSLTypeTest.cpp", + "$_tests/SkSLWGSLTestbed.cpp", "$_tests/SkSharedMutexTest.cpp", "$_tests/SkSpanTest.cpp", "$_tests/SkStrikeCacheTest.cpp", @@ -273,7 +274,6 @@ tests_sources = [ "$_tests/SkStringViewTest.cpp", "$_tests/SkTBlockListTest.cpp", "$_tests/SkUTFTest.cpp", - "$_tests/SkVMTest.cpp", "$_tests/SkVxTest.cpp", "$_tests/SkXmpTest.cpp", "$_tests/Skbug12214.cpp", @@ -304,6 +304,7 @@ tests_sources = [ "$_tests/TextBlobCacheTest.cpp", "$_tests/TextBlobTest.cpp", "$_tests/TextureProxyTest.cpp", + "$_tests/TextureSizeTest.cpp", "$_tests/TextureStripAtlasManagerTest.cpp", "$_tests/Time.cpp", "$_tests/TopoSortTest.cpp", diff --git a/gn/utils.gni b/gn/utils.gni index 6b7ed7e12c17..d86380e4d2fe 100644 --- a/gn/utils.gni +++ b/gn/utils.gni @@ -98,7 +98,6 @@ skia_utils_private = [ "$_src/utils/SkShadowTessellator.cpp", "$_src/utils/SkShadowTessellator.h", "$_src/utils/SkShadowUtils.cpp", - "$_src/utils/SkTestCanvas.h", "$_src/utils/SkTextUtils.cpp", "$_src/utils/mac/SkCGBase.h", "$_src/utils/mac/SkCGGeometry.h", @@ -129,3 +128,11 @@ if (!is_winrt) { "$_src/utils/win/SkWGL_win.cpp", ] } + +# List generated by Bazel rules: +# //src/utils:gpu_hdrs +# //src/utils:gpu_srcs +skia_utils_gpu = [ + "$_src/utils/SkTestCanvas.cpp", + "$_src/utils/SkTestCanvas.h", +] diff --git a/include/BUILD.bazel b/include/BUILD.bazel index b556e65f48c0..587f7b48eac8 100644 --- a/include/BUILD.bazel +++ b/include/BUILD.bazel @@ -20,7 +20,7 @@ skia_filegroup( "//src/sksl:needs_sksl": ["//include/sksl:public_hdrs"], "//conditions:default": [], }) + select({ - "//src/gpu:has_gpu_backend": ["//include/gpu:public_hdrs"], + "//src/gpu:has_ganesh_backend": ["//include/gpu:public_hdrs"], "//conditions:default": [], }) + select({ "//src/svg:enable_svg_canvas_true": ["//include/svg:public_hdrs"], @@ -35,7 +35,7 @@ skia_filegroup( skia_filegroup( name = "private_hdrs", srcs = ["//include/private:private_hdrs"] + select({ - "//src/gpu:has_gpu_backend": ["//include/android:private_hdrs"], + "//src/gpu:has_ganesh_backend": ["//include/android:private_hdrs"], "//conditions:default": [], }), visibility = [ @@ -82,8 +82,9 @@ generate_cpp_files_for_headers( "include/core/SkShader.h", "include/core/SkSize.h", "include/core/SkTypes.h", - "include/effects/SkPerlinNoiseShader.h", "include/effects/SkGradientShader.h", + "include/effects/SkImageFilters.h", + "include/effects/SkPerlinNoiseShader.h", "include/encode/SkEncoder.h", "include/encode/SkJpegEncoder.h", "include/encode/SkPngEncoder.h", @@ -93,10 +94,12 @@ generate_cpp_files_for_headers( "include/gpu/MutableTextureState.h", "include/gpu/ganesh/GrExternalTextureGenerator.h", "include/gpu/ganesh/SkImageGanesh.h", + "include/gpu/ganesh/SkMeshGanesh.h", "include/gpu/ganesh/SkSurfaceGanesh.h", "include/private/SkIDChangeListener.h", "include/private/SkWeakRefCnt.h", "include/private/gpu/ganesh/GrTextureGenerator.h", + "include/private/gpu/ganesh/GrTypesPriv.h", "include/private/chromium/SkImageChromium.h", ], ) diff --git a/include/android/BUILD.bazel b/include/android/BUILD.bazel index 3eadbe267e66..45d87a688541 100644 --- a/include/android/BUILD.bazel +++ b/include/android/BUILD.bazel @@ -16,6 +16,7 @@ skia_filegroup( skia_filegroup( name = "private_hdrs", srcs = [ + "GrAHardwareBufferUtils.h", "SkCanvasAndroid.h", "SkImageAndroid.h", "SkSurfaceAndroid.h", diff --git a/src/gpu/ganesh/GrAHardwareBufferUtils_impl.h b/include/android/GrAHardwareBufferUtils.h similarity index 56% rename from src/gpu/ganesh/GrAHardwareBufferUtils_impl.h rename to include/android/GrAHardwareBufferUtils.h index 7f2a6527e7f4..474e9f4a66e4 100644 --- a/src/gpu/ganesh/GrAHardwareBufferUtils_impl.h +++ b/include/android/GrAHardwareBufferUtils.h @@ -24,8 +24,15 @@ namespace GrAHardwareBufferUtils { SkColorType GetSkColorTypeFromBufferFormat(uint32_t bufferFormat); -GrBackendFormat GetBackendFormat(GrDirectContext* context, AHardwareBuffer* hardwareBuffer, +#if !defined(SK_DISABLE_LEGACY_ANDROID_HW_UTILS) +GrBackendFormat GetBackendFormat(GrDirectContext* dContext, AHardwareBuffer* hardwareBuffer, uint32_t bufferFormat, bool requireKnownFormat); +#endif + +GrBackendFormat GetGLBackendFormat(GrDirectContext* dContext, uint32_t bufferFormat, + bool requireKnownFormat); +GrBackendFormat GetVulkanBackendFormat(GrDirectContext* dContext, AHardwareBuffer* hardwareBuffer, + uint32_t bufferFormat, bool requireKnownFormat); typedef void* TexImageCtx; typedef void (*DeleteImageProc)(TexImageCtx); @@ -53,7 +60,8 @@ typedef void (*UpdateImageProc)(TexImageCtx, GrDirectContext*); * attachment * @return valid GrBackendTexture object on success */ -GrBackendTexture MakeBackendTexture(GrDirectContext* context, AHardwareBuffer* hardwareBuffer, +#if !defined(SK_DISABLE_LEGACY_ANDROID_HW_UTILS) +GrBackendTexture MakeBackendTexture(GrDirectContext* dContext, AHardwareBuffer* hardwareBuffer, int width, int height, DeleteImageProc* deleteProc, UpdateImageProc* updateProc, @@ -62,9 +70,30 @@ GrBackendTexture MakeBackendTexture(GrDirectContext* context, AHardwareBuffer* h const GrBackendFormat& backendFormat, bool isRenderable, bool fromAndroidWindow = false); +#endif + +GrBackendTexture MakeGLBackendTexture(GrDirectContext* dContext, + AHardwareBuffer* hardwareBuffer, + int width, int height, + DeleteImageProc* deleteProc, + UpdateImageProc* updateProc, + TexImageCtx* imageCtx, + bool isProtectedContent, + const GrBackendFormat& backendFormat, + bool isRenderable); -} // GrAHardwareBufferUtils +GrBackendTexture MakeVulkanBackendTexture(GrDirectContext* dContext, + AHardwareBuffer* hardwareBuffer, + int width, int height, + DeleteImageProc* deleteProc, + UpdateImageProc* updateProc, + TexImageCtx* imageCtx, + bool isProtectedContent, + const GrBackendFormat& backendFormat, + bool isRenderable, + bool fromAndroidWindow = false); +} // namespace GrAHardwareBufferUtils #endif #endif diff --git a/include/android/SkHeifDecoder.h b/include/android/SkHeifDecoder.h index 283679304230..f1a06b0868cd 100644 --- a/include/android/SkHeifDecoder.h +++ b/include/android/SkHeifDecoder.h @@ -15,15 +15,20 @@ class SkStream; #include +// This codec depends on heif libraries that are only part of the Android framework. +// It will not work on other platforms currently. +// +// For historical reasons, this codec also decodes AVIF images. +// There is a newer, dedicated SkAvifDecoder which could be used instead. namespace SkHeifDecoder { -/** Returns true if this data claims to be a HEIF image. */ +/** Returns true if this data claims to be a HEIF (or AVIF) image. */ SK_API bool IsHeif(const void*, size_t); /** - * Attempts to decode the given bytes as a HEIF. + * Attempts to decode the given bytes as a HEIF (or AVIF). * - * If the bytes are not a HEIF, returns nullptr. + * If the bytes are not a HEIF (or AVIF), returns nullptr. * * DecodeContext is treated as a SkCodec::SelectionPolicy* */ @@ -34,6 +39,8 @@ SK_API std::unique_ptr Decode(sk_sp, SkCodec::Result*, SkCodecs::DecodeContext = nullptr); +// Do not register this codec using "avif" as the key (even though it can handle that type). +// Doing so would cause internal codec sniffing to choose the wrong sampler. inline SkCodecs::Decoder Decoder() { return { "heif", IsHeif, Decode }; } diff --git a/include/c/gr_context.h b/include/c/gr_context.h index cc3042ae502b..c33f19e4579f 100644 --- a/include/c/gr_context.h +++ b/include/c/gr_context.h @@ -22,6 +22,7 @@ SK_C_API gr_backend_t gr_recording_context_get_backend(gr_recording_context_t* c SK_C_API bool gr_recording_context_is_abandoned(gr_recording_context_t* context); SK_C_API int gr_recording_context_max_texture_size(gr_recording_context_t* context); SK_C_API int gr_recording_context_max_render_target_size(gr_recording_context_t* context); +SK_C_API gr_direct_context_t* gr_recording_context_get_direct_context(gr_recording_context_t* context); // GrDirectContext diff --git a/include/c/sk_canvas.h b/include/c/sk_canvas.h index 684da11e3dfc..67fc7201a904 100644 --- a/include/c/sk_canvas.h +++ b/include/c/sk_canvas.h @@ -58,7 +58,6 @@ SK_C_API void sk_canvas_draw_image(sk_canvas_t* ccanvas, const sk_image_t* cimag SK_C_API void sk_canvas_draw_image_rect(sk_canvas_t* ccanvas, const sk_image_t* cimage, const sk_rect_t* csrcR, const sk_rect_t* cdstR, const sk_sampling_options_t* sampling, const sk_paint_t* cpaint); SK_C_API void sk_canvas_draw_picture(sk_canvas_t* ccanvas, const sk_picture_t* cpicture, const sk_matrix_t* cmatrix, const sk_paint_t* cpaint); SK_C_API void sk_canvas_draw_drawable(sk_canvas_t* ccanvas, sk_drawable_t* cdrawable, const sk_matrix_t* cmatrix); -SK_C_API void sk_canvas_flush(sk_canvas_t* ccanvas); SK_C_API sk_canvas_t* sk_canvas_new_from_bitmap(const sk_bitmap_t* bitmap); SK_C_API sk_canvas_t* sk_canvas_new_from_raster(const sk_imageinfo_t* cinfo, void* pixels, size_t rowBytes, const sk_surfaceprops_t* props); SK_C_API void sk_canvas_draw_annotation(sk_canvas_t* t, const sk_rect_t* rect, const char* key, sk_data_t* value); @@ -83,6 +82,8 @@ SK_C_API void sk_nway_canvas_remove_canvas(sk_nway_canvas_t* t, sk_canvas_t* can SK_C_API void sk_nway_canvas_remove_all(sk_nway_canvas_t* t); SK_C_API sk_overdraw_canvas_t* sk_overdraw_canvas_new(sk_canvas_t* canvas); SK_C_API void sk_overdraw_canvas_destroy(sk_overdraw_canvas_t* canvas); +SK_C_API gr_recording_context_t* sk_get_recording_context(sk_canvas_t* canvas); +SK_C_API sk_surface_t* sk_get_surface(sk_canvas_t* canvas); SK_C_PLUS_PLUS_END_GUARD diff --git a/include/c/sk_surface.h b/include/c/sk_surface.h index 7579b12142ac..cfe72e8cf497 100644 --- a/include/c/sk_surface.h +++ b/include/c/sk_surface.h @@ -35,8 +35,6 @@ SK_C_API void sk_surface_draw(sk_surface_t* surface, sk_canvas_t* canvas, float SK_C_API bool sk_surface_peek_pixels(sk_surface_t* surface, sk_pixmap_t* pixmap); SK_C_API bool sk_surface_read_pixels(sk_surface_t* surface, sk_imageinfo_t* dstInfo, void* dstPixels, size_t dstRowBytes, int srcX, int srcY); SK_C_API const sk_surfaceprops_t* sk_surface_get_props(sk_surface_t* surface); -SK_C_API void sk_surface_flush(sk_surface_t* surface); -SK_C_API void sk_surface_flush_and_submit(sk_surface_t* surface, bool syncCpu); SK_C_API gr_recording_context_t* sk_surface_get_recording_context(sk_surface_t* surface); // surface props diff --git a/include/codec/SkAvifDecoder.h b/include/codec/SkAvifDecoder.h index 4bd7bb7a81ce..a6d5c61aba16 100644 --- a/include/codec/SkAvifDecoder.h +++ b/include/codec/SkAvifDecoder.h @@ -9,6 +9,7 @@ #include "include/codec/SkCodec.h" #include "include/core/SkRefCnt.h" +#include "include/private/base/SkAPI.h" class SkData; class SkStream; diff --git a/include/codec/SkBmpDecoder.h b/include/codec/SkBmpDecoder.h index 2463ddb9efab..752555242e0f 100644 --- a/include/codec/SkBmpDecoder.h +++ b/include/codec/SkBmpDecoder.h @@ -9,6 +9,7 @@ #include "include/codec/SkCodec.h" #include "include/core/SkRefCnt.h" +#include "include/private/base/SkAPI.h" class SkData; class SkStream; diff --git a/include/codec/SkCodec.h b/include/codec/SkCodec.h index f5c54ad1e186..ed758d81aea9 100644 --- a/include/codec/SkCodec.h +++ b/include/codec/SkCodec.h @@ -821,7 +821,7 @@ class SK_API SkCodec : SkNoncopyable { * This is called by getPixels(), getYUV8Planes(), startIncrementalDecode() and * startScanlineDecode(). Subclasses may call if they need to rewind at another time. */ - bool SK_WARN_UNUSED_RESULT rewindIfNeeded(); + [[nodiscard]] bool rewindIfNeeded(); /** * Called by rewindIfNeeded, if the stream needed to be rewound. @@ -1021,7 +1021,7 @@ using MakeFromStreamCallback = std::unique_ptr (*)(std::unique_ptrtryAllocPixels(info, info.minRowBytes()); } @@ -553,7 +553,7 @@ class SK_API SkBitmap { @param isOpaque true if pixels do not have transparency @return true if pixel storage is allocated */ - bool SK_WARN_UNUSED_RESULT tryAllocN32Pixels(int width, int height, bool isOpaque = false); + [[nodiscard]] bool tryAllocN32Pixels(int width, int height, bool isOpaque = false); /** Sets SkImageInfo to width, height, and the native color type; and allocates pixel memory. If isOpaque is true, sets SkImageInfo to kOpaque_SkAlphaType; @@ -637,7 +637,7 @@ class SK_API SkBitmap { /** Deprecated. */ - bool installMaskPixels(const SkMask& mask); + bool installMaskPixels(SkMaskBuilder& mask); /** Replaces SkPixelRef with pixels, preserving SkImageInfo and rowBytes(). Sets SkPixelRef origin to (0, 0). @@ -661,7 +661,7 @@ class SK_API SkBitmap { @return true if the allocation succeeds */ - bool SK_WARN_UNUSED_RESULT tryAllocPixels() { + [[nodiscard]] bool tryAllocPixels() { return this->tryAllocPixels((Allocator*)nullptr); } @@ -685,7 +685,7 @@ class SK_API SkBitmap { @param allocator instance of SkBitmap::Allocator instantiation @return true if custom allocator reports success */ - bool SK_WARN_UNUSED_RESULT tryAllocPixels(Allocator* allocator); + [[nodiscard]] bool tryAllocPixels(Allocator* allocator); /** Allocates pixel memory with allocator, and replaces existing SkPixelRef. The allocation size is determined by SkImageInfo width, height, and SkColorType. diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h index 46a1765d7261..60a8e495b444 100644 --- a/include/core/SkCanvas.h +++ b/include/core/SkCanvas.h @@ -281,15 +281,6 @@ class SK_API SkCanvas { */ SkSurfaceProps getTopProps() const; - /** Triggers the immediate execution of all pending draw operations. - If SkCanvas is associated with GPU surface, resolves all pending GPU operations. - If SkCanvas is associated with raster surface, has no effect; raster draw - operations are never deferred. - - DEPRECATED: Replace usage with GrDirectContext::flush() - */ - void flush(); - /** Gets the size of the base or root layer in global canvas coordinates. The origin of the base layer is always (0,0). The area available for drawing may be smaller (due to clipping or saveLayer). @@ -314,19 +305,20 @@ class SK_API SkCanvas { */ sk_sp makeSurface(const SkImageInfo& info, const SkSurfaceProps* props = nullptr); - /** Returns GPU context of the GPU surface associated with SkCanvas. + /** Returns Ganesh context of the GPU surface associated with SkCanvas. @return GPU context, if available; nullptr otherwise example: https://fiddle.skia.org/c/@Canvas_recordingContext */ - virtual GrRecordingContext* recordingContext(); + virtual GrRecordingContext* recordingContext() const; + /** Returns Recorder for the GPU surface associated with SkCanvas. @return Recorder, if available; nullptr otherwise */ - virtual skgpu::graphite::Recorder* recorder(); + virtual skgpu::graphite::Recorder* recorder() const; /** Sometimes a canvas is owned by a surface. If it is, getSurface() will return a bare * pointer to that surface, else this will return nullptr. @@ -1982,11 +1974,11 @@ class SK_API SkCanvas { */ void drawVertices(const sk_sp& vertices, SkBlendMode mode, const SkPaint& paint); -#if defined(SK_ENABLE_SKSL) /** Experimental, under active development, and subject to change without notice. - Draws a mesh using a user-defined specification (see SkMeshSpecification). + Draws a mesh using a user-defined specification (see SkMeshSpecification). Requires + a GPU backend or SkSL to be compiled in. SkBlender is ignored if SkMesh's specification does not output fragment shader color. Otherwise, it combines @@ -2003,7 +1995,6 @@ class SK_API SkCanvas { @param paint specifies the SkShader, used as SkVertices texture, may be nullptr */ void drawMesh(const SkMesh& mesh, sk_sp blender, const SkPaint& paint); -#endif /** Draws a Coons patch: the interpolation of four cubics with shared corners, associating a color, and optionally a texture SkPoint, with each corner. @@ -2192,7 +2183,6 @@ class SK_API SkCanvas { virtual bool onAccessTopLayerPixels(SkPixmap* pixmap); virtual SkImageInfo onImageInfo() const; virtual bool onGetProps(SkSurfaceProps* props, bool top) const; - virtual void onFlush(); // Subclass save/restore notifiers. // Overriders should call the corresponding INHERITED method up the inheritance chain. @@ -2258,9 +2248,7 @@ class SK_API SkCanvas { virtual void onDrawVerticesObject(const SkVertices* vertices, SkBlendMode mode, const SkPaint& paint); -#ifdef SK_ENABLE_SKSL virtual void onDrawMesh(const SkMesh&, sk_sp, const SkPaint&); -#endif virtual void onDrawAnnotation(const SkRect& rect, const char key[], SkData* value); virtual void onDrawShadowRec(const SkPath&, const SkDrawShadowRec&); @@ -2305,8 +2293,8 @@ class SK_API SkCanvas { // notify our surface (if we have one) that we are about to draw, so it // can perform copy-on-write or invalidate any cached images // returns false if the copy failed - bool SK_WARN_UNUSED_RESULT predrawNotify(bool willOverwritesEntireSurface = false); - bool SK_WARN_UNUSED_RESULT predrawNotify(const SkRect*, const SkPaint*, ShaderOverrideOpacity); + [[nodiscard]] bool predrawNotify(bool willOverwritesEntireSurface = false); + [[nodiscard]] bool predrawNotify(const SkRect*, const SkPaint*, ShaderOverrideOpacity); enum class CheckForOverwrite : bool { kNo = false, @@ -2441,6 +2429,7 @@ class SK_API SkCanvas { SkCanvas& operator=(const SkCanvas&) = delete; friend class sktext::gpu::Slug; + friend class SkPicturePlayback; /** * Convert a SkTextBlob to a sktext::gpu::Slug using the current canvas state. */ @@ -2554,8 +2543,6 @@ class SK_API SkCanvas { void validateClip() const; std::unique_ptr fScratchGlyphRunBuilder; - - using INHERITED = SkRefCnt; }; /** \class SkAutoCanvasRestore diff --git a/include/core/SkCapabilities.h b/include/core/SkCapabilities.h index 214b5138f0b7..8ccb3fdf3877 100644 --- a/include/core/SkCapabilities.h +++ b/include/core/SkCapabilities.h @@ -9,6 +9,7 @@ #define SkCapabilities_DEFINED #include "include/core/SkRefCnt.h" +#include "include/core/SkTypes.h" #ifdef SK_ENABLE_SKSL #include "include/sksl/SkSLVersion.h" diff --git a/include/core/SkColor.h b/include/core/SkColor.h index 3b46be030f22..33352c7a838c 100644 --- a/include/core/SkColor.h +++ b/include/core/SkColor.h @@ -79,7 +79,7 @@ static constexpr inline SkColor SkColorSetARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU @param a alpha: transparent at zero, fully opaque at 255 @return color with transparency */ -static constexpr inline SkColor SK_WARN_UNUSED_RESULT SkColorSetA(SkColor c, U8CPU a) { +[[nodiscard]] static constexpr inline SkColor SkColorSetA(SkColor c, U8CPU a) { return (c & 0x00FFFFFF) | (a << 24); } diff --git a/include/core/SkContourMeasure.h b/include/core/SkContourMeasure.h index a79af320bdac..7398fab44197 100644 --- a/include/core/SkContourMeasure.h +++ b/include/core/SkContourMeasure.h @@ -23,8 +23,7 @@ class SK_API SkContourMeasure : public SkRefCnt { /** Pins distance to 0 <= distance <= length(), and then computes the corresponding * position and tangent. */ - bool SK_WARN_UNUSED_RESULT getPosTan(SkScalar distance, SkPoint* position, - SkVector* tangent) const; + [[nodiscard]] bool getPosTan(SkScalar distance, SkPoint* position, SkVector* tangent) const; enum MatrixFlags { kGetPosition_MatrixFlag = 0x01, @@ -37,8 +36,8 @@ class SK_API SkContourMeasure : public SkRefCnt { Returns false if there is no path, or a zero-length path was specified, in which case matrix is unchanged. */ - bool SK_WARN_UNUSED_RESULT getMatrix(SkScalar distance, SkMatrix* matrix, - MatrixFlags flags = kGetPosAndTan_MatrixFlag) const; + [[nodiscard]] bool getMatrix(SkScalar distance, SkMatrix* matrix, + MatrixFlags flags = kGetPosAndTan_MatrixFlag) const; /** Given a start and stop distance, return in dst the intervening segment(s). If the segment is zero-length, return false, else return true. @@ -46,8 +45,8 @@ class SK_API SkContourMeasure : public SkRefCnt { then return false (and leave dst untouched). Begin the segment with a moveTo if startWithMoveTo is true */ - bool SK_WARN_UNUSED_RESULT getSegment(SkScalar startD, SkScalar stopD, SkPath* dst, - bool startWithMoveTo) const; + [[nodiscard]] bool getSegment(SkScalar startD, SkScalar stopD, SkPath* dst, + bool startWithMoveTo) const; /** Return true if the contour is closed() */ diff --git a/include/core/SkDeferredDisplayList.h b/include/core/SkDeferredDisplayList.h deleted file mode 100644 index 37a14863be45..000000000000 --- a/include/core/SkDeferredDisplayList.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright 2017 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -// TODO(kjlubick, robertphillips) migrate Chromium to use the new location and name -#include "include/private/chromium/GrDeferredDisplayList.h" // IWYU pragma: export - -class GrDeferredDisplayListRecorder; -class GrSurfaceCharacterization; -using SkDeferredDisplayList = GrDeferredDisplayList; -using SkDeferredDisplayListRecorder = GrDeferredDisplayListRecorder; -using SkSurfaceCharacterization = GrSurfaceCharacterization; diff --git a/include/core/SkDeferredDisplayListRecorder.h b/include/core/SkDeferredDisplayListRecorder.h deleted file mode 100644 index cee8a02fa538..000000000000 --- a/include/core/SkDeferredDisplayListRecorder.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright 2017 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -// TODO(kjlubick, robertphillips) migrate Chromium to use the new location -#include "include/private/chromium/GrDeferredDisplayListRecorder.h" // IWYU pragma: export - -class GrDeferredDisplayList; -class GrSurfaceCharacterization; -using SkDeferredDisplayList = GrDeferredDisplayList; -using SkDeferredDisplayListRecorder = GrDeferredDisplayListRecorder; -using SkSurfaceCharacterization = GrSurfaceCharacterization; diff --git a/include/core/SkGraphics.h b/include/core/SkGraphics.h index aaba3fd0bf21..b79ee91ac0c6 100644 --- a/include/core/SkGraphics.h +++ b/include/core/SkGraphics.h @@ -149,18 +149,6 @@ class SK_API SkGraphics { std::unique_ptr (*)(const uint8_t* svg, size_t length); static OpenTypeSVGDecoderFactory SetOpenTypeSVGDecoderFactory(OpenTypeSVGDecoderFactory); static OpenTypeSVGDecoderFactory GetOpenTypeSVGDecoderFactory(); - - /** - * Call early in main() to allow Skia to use a JIT to accelerate CPU-bound operations. - */ - static void AllowJIT(); -}; - -class SkAutoGraphics { -public: - SkAutoGraphics() { - SkGraphics::Init(); - } }; #endif diff --git a/include/core/SkImage.h b/include/core/SkImage.h index 1e6cc4d99a26..bd73ab8483bc 100644 --- a/include/core/SkImage.h +++ b/include/core/SkImage.h @@ -44,19 +44,6 @@ struct SkSamplingOptions; namespace skgpu::graphite { class Recorder; } -#if !defined(SK_DISABLE_LEGACY_GRAPHITE_IMAGE_FACTORIES) && defined(SK_GRAPHITE) -#include "include/gpu/graphite/GraphiteTypes.h" - -namespace skgpu { enum class Mipmapped : bool; } -namespace skgpu::graphite { -class BackendTexture; -class Recorder; -class TextureInfo; -enum class Volatile : bool; -class YUVABackendTextures; -} -#endif - namespace SkImages { /** Caller data passed to RasterReleaseProc; may be nullptr. */ @@ -642,6 +629,20 @@ class SK_API SkImage : public SkRefCnt { ReadPixelsCallback callback, ReadPixelsContext context) const; + /** + * Identical to asyncRescaleAndReadPixelsYUV420 but a fourth plane is returned in the + * AsyncReadResult passed to 'callback'. The fourth plane contains the alpha chanel at the + * same full resolution as the Y plane. + */ + void asyncRescaleAndReadPixelsYUVA420(SkYUVColorSpace yuvColorSpace, + sk_sp dstColorSpace, + const SkIRect& srcRect, + const SkISize& dstSize, + RescaleGamma rescaleGamma, + RescaleMode rescaleMode, + ReadPixelsCallback callback, + ReadPixelsContext context) const; + /** Copies SkImage to dst, scaling pixels to fit dst.width() and dst.height(), and converting pixels to match dst.colorType() and dst.alphaType(). Returns true if pixels are copied. Returns false if dst.addr() is nullptr, or dst.rowBytes() is @@ -696,12 +697,6 @@ class SK_API SkImage : public SkRefCnt { */ virtual sk_sp makeSubset(GrDirectContext* direct, const SkIRect& subset) const = 0; -#if !defined(SK_DISABLE_LEGACY_IMAGE_SUBSET_METHODS) - sk_sp makeSubset(const SkIRect& subset, GrDirectContext* direct = nullptr) const { - return this->makeSubset(direct, subset); - } -#endif - struct RequiredProperties { bool fMipmapped; }; @@ -797,12 +792,12 @@ class SK_API SkImage : public SkRefCnt { @param offset storage for returned SkImage translation @return filtered SkImage, or nullptr */ - virtual sk_sp makeWithFilter(GrRecordingContext* context, - const SkImageFilter* filter, - const SkIRect& subset, - const SkIRect& clipBounds, - SkIRect* outSubset, - SkIPoint* offset) const = 0; + sk_sp makeWithFilter(GrRecordingContext* context, + const SkImageFilter* filter, + const SkIRect& subset, + const SkIRect& clipBounds, + SkIRect* outSubset, + SkIPoint* offset) const; /** Deprecated. */ @@ -852,11 +847,6 @@ class SK_API SkImage : public SkRefCnt { virtual sk_sp makeColorSpace(GrDirectContext* direct, sk_sp target) const = 0; -#if !defined(SK_DISABLE_LEGACY_IMAGE_COLORSPACE_METHODS) - sk_sp makeColorSpace(sk_sp target, - GrDirectContext* direct = nullptr) const; -#endif - /** Creates SkImage in target SkColorSpace. Returns nullptr if SkImage could not be created. @@ -893,12 +883,6 @@ class SK_API SkImage : public SkRefCnt { SkColorType targetColorType, sk_sp targetCS) const = 0; -#if !defined(SK_DISABLE_LEGACY_IMAGE_COLORSPACE_METHODS) - sk_sp makeColorTypeAndColorSpace(SkColorType targetColorType, - sk_sp targetColorSpace, - GrDirectContext* direct = nullptr) const; -#endif - /** Experimental. Creates SkImage in target SkColorType and SkColorSpace. Returns nullptr if SkImage could not be created. @@ -938,56 +922,6 @@ class SK_API SkImage : public SkRefCnt { sk_sp withMipmaps(sk_sp) const; using INHERITED = SkRefCnt; - -public: -#if !defined(SK_DISABLE_LEGACY_IMAGE_RELEASE_PROCS) - using ReleaseContext = SkImages::ReleaseContext; - using TextureReleaseProc = void (*)(ReleaseContext); -#endif -#if !defined(SK_DISABLE_LEGACY_GRAPHITE_IMAGE_METHODS) && defined(SK_GRAPHITE) - struct RequiredImageProperties { - skgpu::Mipmapped fMipmapped; - }; - - sk_sp makeTextureImage(skgpu::graphite::Recorder*, RequiredImageProperties) const; -#endif -#if !defined(SK_DISABLE_LEGACY_GRAPHITE_IMAGE_FACTORIES) && defined(SK_GRAPHITE) - // Passed to both fulfill and imageRelease - using GraphitePromiseImageContext = void*; - // Returned from fulfill and passed into textureRelease - using GraphitePromiseTextureReleaseContext = void*; - - using GraphitePromiseImageFulfillProc = - std::tuple - (*)(GraphitePromiseImageContext); - using GraphitePromiseImageReleaseProc = void (*)(GraphitePromiseImageContext); - using GraphitePromiseTextureReleaseProc = void (*)(GraphitePromiseTextureReleaseContext); - - static sk_sp MakeGraphitePromiseTexture(skgpu::graphite::Recorder*, - SkISize, - const skgpu::graphite::TextureInfo&, - const SkColorInfo&, - skgpu::graphite::Volatile, - GraphitePromiseImageFulfillProc, - GraphitePromiseImageReleaseProc, - GraphitePromiseTextureReleaseProc, - GraphitePromiseImageContext); - - static sk_sp MakeGraphiteFromBackendTexture(skgpu::graphite::Recorder*, - const skgpu::graphite::BackendTexture&, - SkColorType, - SkAlphaType, - sk_sp, - TextureReleaseProc = nullptr, - ReleaseContext = nullptr); - - static sk_sp MakeGraphiteFromYUVABackendTextures( - skgpu::graphite::Recorder*, - const skgpu::graphite::YUVABackendTextures&, - sk_sp, - TextureReleaseProc = nullptr, - ReleaseContext = nullptr); -#endif }; #endif diff --git a/include/core/SkImageInfo.h b/include/core/SkImageInfo.h index b5661719006e..b8ee488c7160 100644 --- a/include/core/SkImageInfo.h +++ b/include/core/SkImageInfo.h @@ -550,8 +550,6 @@ struct SK_API SkImageInfo { @param rowBytes size of pixel row or larger @return memory required by pixel buffer - - example: https://fiddle.skia.org/c/@ImageInfo_computeByteSize */ size_t computeByteSize(size_t rowBytes) const; diff --git a/include/core/SkM44.h b/include/core/SkM44.h index 11a06a15b1a6..8414fd5854c4 100644 --- a/include/core/SkM44.h +++ b/include/core/SkM44.h @@ -376,9 +376,9 @@ class SK_API SkM44 { /** If this is invertible, return that in inverse and return true. If it is * not invertible, return false and leave the inverse parameter unchanged. */ - bool SK_WARN_UNUSED_RESULT invert(SkM44* inverse) const; + [[nodiscard]] bool invert(SkM44* inverse) const; - SkM44 SK_WARN_UNUSED_RESULT transpose() const; + [[nodiscard]] SkM44 transpose() const; void dump() const; diff --git a/include/core/SkMatrix.h b/include/core/SkMatrix.h index cf84d26228b6..96a12f111eb5 100644 --- a/include/core/SkMatrix.h +++ b/include/core/SkMatrix.h @@ -71,7 +71,7 @@ class SK_API SkMatrix { @param sy vertical scale factor @return SkMatrix with scale */ - static SkMatrix SK_WARN_UNUSED_RESULT Scale(SkScalar sx, SkScalar sy) { + [[nodiscard]] static SkMatrix Scale(SkScalar sx, SkScalar sy) { SkMatrix m; m.setScale(sx, sy); return m; @@ -87,30 +87,30 @@ class SK_API SkMatrix { @param dy vertical translation @return SkMatrix with translation */ - static SkMatrix SK_WARN_UNUSED_RESULT Translate(SkScalar dx, SkScalar dy) { + [[nodiscard]] static SkMatrix Translate(SkScalar dx, SkScalar dy) { SkMatrix m; m.setTranslate(dx, dy); return m; } - static SkMatrix SK_WARN_UNUSED_RESULT Translate(SkVector t) { return Translate(t.x(), t.y()); } - static SkMatrix SK_WARN_UNUSED_RESULT Translate(SkIVector t) { return Translate(t.x(), t.y()); } + [[nodiscard]] static SkMatrix Translate(SkVector t) { return Translate(t.x(), t.y()); } + [[nodiscard]] static SkMatrix Translate(SkIVector t) { return Translate(t.x(), t.y()); } /** Sets SkMatrix to rotate by |deg| about a pivot point at (0, 0). @param deg rotation angle in degrees (positive rotates clockwise) @return SkMatrix with rotation */ - static SkMatrix SK_WARN_UNUSED_RESULT RotateDeg(SkScalar deg) { + [[nodiscard]] static SkMatrix RotateDeg(SkScalar deg) { SkMatrix m; m.setRotate(deg); return m; } - static SkMatrix SK_WARN_UNUSED_RESULT RotateDeg(SkScalar deg, SkPoint pt) { + [[nodiscard]] static SkMatrix RotateDeg(SkScalar deg, SkPoint pt) { SkMatrix m; m.setRotate(deg, pt.x(), pt.y()); return m; } - static SkMatrix SK_WARN_UNUSED_RESULT RotateRad(SkScalar rad) { + [[nodiscard]] static SkMatrix RotateRad(SkScalar rad) { return RotateDeg(SkRadiansToDegrees(rad)); } @@ -120,7 +120,7 @@ class SK_API SkMatrix { @param ky vertical skew factor @return SkMatrix with skew */ - static SkMatrix SK_WARN_UNUSED_RESULT Skew(SkScalar kx, SkScalar ky) { + [[nodiscard]] static SkMatrix Skew(SkScalar kx, SkScalar ky) { SkMatrix m; m.setSkew(kx, ky); return m; @@ -153,8 +153,8 @@ class SK_API SkMatrix { @param mode How to handle the mapping @return SkMatrix mapping src to dst */ - static SkMatrix SK_WARN_UNUSED_RESULT RectToRect(const SkRect& src, const SkRect& dst, - ScaleToFit mode = kFill_ScaleToFit) { + [[nodiscard]] static SkMatrix RectToRect(const SkRect& src, const SkRect& dst, + ScaleToFit mode = kFill_ScaleToFit) { return MakeRectToRect(src, dst, mode); } @@ -175,9 +175,9 @@ class SK_API SkMatrix { @param pers2 perspective scale factor @return SkMatrix constructed from parameters */ - static SkMatrix SK_WARN_UNUSED_RESULT MakeAll(SkScalar scaleX, SkScalar skewX, SkScalar transX, - SkScalar skewY, SkScalar scaleY, SkScalar transY, - SkScalar pers0, SkScalar pers1, SkScalar pers2) { + [[nodiscard]] static SkMatrix MakeAll(SkScalar scaleX, SkScalar skewX, SkScalar transX, + SkScalar skewY, SkScalar scaleY, SkScalar transY, + SkScalar pers0, SkScalar pers1, SkScalar pers2) { SkMatrix m; m.setAll(scaleX, skewX, transX, skewY, scaleY, transY, pers0, pers1, pers2); return m; @@ -1202,7 +1202,7 @@ class SK_API SkMatrix { @param inverse storage for inverted SkMatrix; may be nullptr @return true if SkMatrix can be inverted */ - bool SK_WARN_UNUSED_RESULT invert(SkMatrix* inverse) const { + [[nodiscard]] bool invert(SkMatrix* inverse) const { // Allow the trivial case to be inlined. if (this->isIdentity()) { if (inverse) { @@ -1237,7 +1237,7 @@ class SK_API SkMatrix { @param affine storage for 3 by 2 affine matrix; may be nullptr @return true if SkMatrix does not contain perspective */ - bool SK_WARN_UNUSED_RESULT asAffine(SkScalar affine[6]) const; + [[nodiscard]] bool asAffine(SkScalar affine[6]) const; /** Sets SkMatrix to affine values, passed in column major order. Given affine, column, then row, as: @@ -1705,7 +1705,7 @@ class SK_API SkMatrix { @param scaleFactors storage for minimum and maximum scale factors @return true if scale factors were computed correctly */ - bool SK_WARN_UNUSED_RESULT getMinMaxScales(SkScalar scaleFactors[2]) const; + [[nodiscard]] bool getMinMaxScales(SkScalar scaleFactors[2]) const; /** Decomposes SkMatrix into scale components and whatever remains. Returns false if SkMatrix could not be decomposed. @@ -1944,7 +1944,7 @@ class SK_API SkMatrix { return GetMapPtsProc(this->getType()); } - bool SK_WARN_UNUSED_RESULT invertNonIdentity(SkMatrix* inverse) const; + [[nodiscard]] bool invertNonIdentity(SkMatrix* inverse) const; static bool Poly2Proc(const SkPoint[], SkMatrix*); static bool Poly3Proc(const SkPoint[], SkMatrix*); diff --git a/include/core/SkMesh.h b/include/core/SkMesh.h index 360a039e7f53..7fd124dcf975 100644 --- a/include/core/SkMesh.h +++ b/include/core/SkMesh.h @@ -8,23 +8,24 @@ #ifndef SkMesh_DEFINED #define SkMesh_DEFINED -#include "include/core/SkTypes.h" - -#ifdef SK_ENABLE_SKSL -#include "include/core/SkAlphaType.h" +#include "include/core/SkData.h" #include "include/core/SkRect.h" #include "include/core/SkRefCnt.h" #include "include/core/SkSpan.h" #include "include/core/SkString.h" #include "include/effects/SkRuntimeEffect.h" +#include "include/private/base/SkAPI.h" +#include +#include #include +#include #include #include class GrDirectContext; class SkColorSpace; -class SkData; +enum SkAlphaType : int; namespace SkSL { struct Program; } @@ -292,48 +293,6 @@ class SkMesh { SkMesh& operator=(const SkMesh&); SkMesh& operator=(SkMesh&&); - /** - * Makes an index buffer to be used with SkMeshes. The buffer may be CPU- or GPU-backed - * depending on whether GrDirectContext* is nullptr. - * - * @param GrDirectContext* If nullptr a CPU-backed object is returned. Otherwise, the data is - * uploaded to the GPU and a GPU-backed buffer is returned. It may - * only be used to draw into SkSurfaces that are backed by the passed - * GrDirectContext. - * @param data The data used to populate the buffer, or nullptr to create a zero- - * initialized buffer. - * @param size Both the size of the data in 'data' and the size of the resulting - * buffer. - */ - static sk_sp MakeIndexBuffer(GrDirectContext*, const void* data, size_t size); - - /** - * Makes a copy of an index buffer. The implementation currently only supports a CPU-backed - * source buffer. - */ - static sk_sp CopyIndexBuffer(GrDirectContext*, sk_sp); - - /** - * Makes a vertex buffer to be used with SkMeshes. The buffer may be CPU- or GPU-backed - * depending on whether GrDirectContext* is nullptr. - * - * @param GrDirectContext* If nullptr a CPU-backed object is returned. Otherwise, the data is - * uploaded to the GPU and a GPU-backed buffer is returned. It may - * only be used to draw into SkSurfaces that are backed by the passed - * GrDirectContext. - * @param data The data used to populate the buffer, or nullptr to create a zero- - * initialized buffer. - * @param size Both the size of the data in 'data' and the size of the resulting - * buffer. - */ - static sk_sp MakeVertexBuffer(GrDirectContext*, const void*, size_t size); - - /** - * Makes a copy of a vertex buffer. The implementation currently only supports a CPU-backed - * source buffer. - */ - static sk_sp CopyVertexBuffer(GrDirectContext*, sk_sp); - enum class Mode { kTriangles, kTriangleStrip }; struct Result; @@ -394,8 +353,6 @@ class SkMesh { bool isValid() const; private: - friend struct SkMeshPriv; - std::tuple validate() const; sk_sp fSpec; @@ -418,6 +375,36 @@ class SkMesh { struct SkMesh::Result { SkMesh mesh; SkString error; }; -#endif // SK_ENABLE_SKSL +namespace SkMeshes { +/** + * Makes a CPU-backed index buffer to be used with SkMeshes. + * + * @param data The data used to populate the buffer, or nullptr to create a zero- + * initialized buffer. + * @param size Both the size of the data in 'data' and the size of the resulting + * buffer. + */ +SK_API sk_sp MakeIndexBuffer(const void* data, size_t size); + +/** + * Makes a copy of an index buffer. The copy will be CPU-backed. + */ +SK_API sk_sp CopyIndexBuffer(sk_sp); + +/** + * Makes a CPU-backed vertex buffer to be used with SkMeshes. + * + * @param data The data used to populate the buffer, or nullptr to create a zero- + * initialized buffer. + * @param size Both the size of the data in 'data' and the size of the resulting + * buffer. + */ +SK_API sk_sp MakeVertexBuffer(const void*, size_t size); + +/** + * Makes a copy of a vertex buffer. The copy will be CPU-backed. + */ +SK_API sk_sp CopyVertexBuffer(sk_sp); +} // namespace SkMeshes #endif diff --git a/include/core/SkMilestone.h b/include/core/SkMilestone.h index 8ac26dc393ec..449e7e1d39d4 100644 --- a/include/core/SkMilestone.h +++ b/include/core/SkMilestone.h @@ -5,5 +5,5 @@ * found in the LICENSE file. */ #ifndef SK_MILESTONE -#define SK_MILESTONE 116 +#define SK_MILESTONE 117 #endif diff --git a/include/core/SkPath.h b/include/core/SkPath.h index 0b69dd2b6fd9..f1debed563fc 100644 --- a/include/core/SkPath.h +++ b/include/core/SkPath.h @@ -1248,8 +1248,16 @@ class SK_API SkPath { the last contour or start a new contour. */ enum AddPathMode { - kAppend_AddPathMode, //!< appended to destination unaltered - kExtend_AddPathMode, //!< add line if prior contour is not closed + /** Contours are appended to the destination path as new contours. + */ + kAppend_AddPathMode, + /** Extends the last contour of the destination path with the first countour + of the source path, connecting them with a line. If the last contour is + closed, a new empty contour starting at its start point is extended instead. + If the destination path is empty, the result is the source path. + The last path of the result is closed only if the last path of the source is. + */ + kExtend_AddPathMode, }; /** Appends src to SkPath, offset by (dx, dy). diff --git a/include/core/SkPathMeasure.h b/include/core/SkPathMeasure.h index 89eac0d592ae..752552beb65c 100644 --- a/include/core/SkPathMeasure.h +++ b/include/core/SkPathMeasure.h @@ -42,8 +42,7 @@ class SK_API SkPathMeasure { Returns false if there is no path, or a zero-length path was specified, in which case position and tangent are unchanged. */ - bool SK_WARN_UNUSED_RESULT getPosTan(SkScalar distance, SkPoint* position, - SkVector* tangent); + [[nodiscard]] bool getPosTan(SkScalar distance, SkPoint* position, SkVector* tangent); enum MatrixFlags { kGetPosition_MatrixFlag = 0x01, @@ -56,8 +55,8 @@ class SK_API SkPathMeasure { Returns false if there is no path, or a zero-length path was specified, in which case matrix is unchanged. */ - bool SK_WARN_UNUSED_RESULT getMatrix(SkScalar distance, SkMatrix* matrix, - MatrixFlags flags = kGetPosAndTan_MatrixFlag); + [[nodiscard]] bool getMatrix(SkScalar distance, SkMatrix* matrix, + MatrixFlags flags = kGetPosAndTan_MatrixFlag); /** Given a start and stop distance, return in dst the intervening segment(s). If the segment is zero-length, return false, else return true. diff --git a/include/core/SkPicture.h b/include/core/SkPicture.h index bb384dfab1b8..343d63d1feca 100644 --- a/include/core/SkPicture.h +++ b/include/core/SkPicture.h @@ -10,19 +10,24 @@ #include "include/core/SkRect.h" #include "include/core/SkRefCnt.h" -#include "include/core/SkSamplingOptions.h" -#include "include/core/SkShader.h" -#include "include/core/SkTileMode.h" +#include "include/core/SkShader.h" // IWYU pragma: keep #include "include/core/SkTypes.h" +#include +#include +#include + class SkCanvas; class SkData; -struct SkDeserialProcs; -class SkImage; class SkMatrix; -struct SkSerialProcs; class SkStream; class SkWStream; +enum class SkFilterMode; +struct SkDeserialProcs; +struct SkSerialProcs; + +// TODO(kjlubick) Remove this after cleaning up clients +#include "include/core/SkTileMode.h" // IWYU pragma: keep /** \class SkPicture SkPicture records drawing commands made to SkCanvas. The command stream may be diff --git a/include/core/SkPictureRecorder.h b/include/core/SkPictureRecorder.h index 58c985a24942..573a643f7347 100644 --- a/include/core/SkPictureRecorder.h +++ b/include/core/SkPictureRecorder.h @@ -8,9 +8,10 @@ #ifndef SkPictureRecorder_DEFINED #define SkPictureRecorder_DEFINED -#include "include/core/SkBBHFactory.h" -#include "include/core/SkPicture.h" +#include "include/core/SkRect.h" #include "include/core/SkRefCnt.h" +#include "include/core/SkScalar.h" +#include "include/private/base/SkAPI.h" #include @@ -20,9 +21,11 @@ namespace android { }; #endif +class SkBBHFactory; +class SkBBoxHierarchy; class SkCanvas; class SkDrawable; -class SkPictureRecord; +class SkPicture; class SkRecord; class SkRecorder; @@ -31,9 +34,6 @@ class SK_API SkPictureRecorder { SkPictureRecorder(); ~SkPictureRecorder(); - enum FinishFlags { - }; - /** Returns the canvas that records the drawing commands. @param bounds the cull rect used when recording this picture. Any drawing the falls outside of this rect is undefined, and may be drawn or it may not. diff --git a/include/core/SkPixmap.h b/include/core/SkPixmap.h index ad4c7dd6d846..e3379cbcf9be 100644 --- a/include/core/SkPixmap.h +++ b/include/core/SkPixmap.h @@ -17,7 +17,6 @@ #include "include/core/SkSize.h" #include "include/private/base/SkAPI.h" #include "include/private/base/SkAssert.h" -#include "include/private/base/SkAttributes.h" #include #include @@ -115,7 +114,7 @@ class SK_API SkPixmap { /** Deprecated. */ - bool SK_WARN_UNUSED_RESULT reset(const SkMask& mask); + [[nodiscard]] bool reset(const SkMask& mask); /** Sets subset width, height, pixel address to intersection of SkPixmap with area, if intersection is not empty; and return true. Otherwise, leave subset unchanged @@ -127,7 +126,7 @@ class SK_API SkPixmap { @param area bounds to intersect with SkPixmap @return true if intersection of SkPixmap and area is not empty */ - bool SK_WARN_UNUSED_RESULT extractSubset(SkPixmap* subset, const SkIRect& area) const; + [[nodiscard]] bool extractSubset(SkPixmap* subset, const SkIRect& area) const; /** Returns width, height, SkAlphaType, SkColorType, and SkColorSpace. diff --git a/include/core/SkPromiseImageTexture.h b/include/core/SkPromiseImageTexture.h deleted file mode 100644 index c93f80636c0f..000000000000 --- a/include/core/SkPromiseImageTexture.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2017 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#ifndef SkPromiseImageTexture_DEFINED -#define SkPromiseImageTexture_DEFINED - -#include "include/core/SkTypes.h" - -// TODO(kjlubick) remove this shim header after clients are migrated -#if defined(SK_GANESH) -#include "include/private/chromium/GrPromiseImageTexture.h" - -typedef GrPromiseImageTexture SkPromiseImageTexture; -#endif - -#endif // SkPromiseImageTexture_DEFINED diff --git a/include/core/SkRRect.h b/include/core/SkRRect.h index 73bc4a95b99e..b6dc32c5b73d 100644 --- a/include/core/SkRRect.h +++ b/include/core/SkRRect.h @@ -394,7 +394,7 @@ class SK_API SkRRect { @param dy offset added to rect().fTop and rect().fBottom @return SkRRect bounds offset by (dx, dy), with unchanged corner radii */ - SkRRect SK_WARN_UNUSED_RESULT makeOffset(SkScalar dx, SkScalar dy) const { + [[nodiscard]] SkRRect makeOffset(SkScalar dx, SkScalar dy) const { return SkRRect(fRect.makeOffset(dx, dy), fRadii, fType); } diff --git a/include/core/SkRect.h b/include/core/SkRect.h index ad8bf3de30aa..42d44d3a21f0 100644 --- a/include/core/SkRect.h +++ b/include/core/SkRect.h @@ -9,15 +9,16 @@ #define SkRect_DEFINED #include "include/core/SkPoint.h" -#include "include/core/SkScalar.h" #include "include/core/SkSize.h" #include "include/core/SkTypes.h" +#include "include/private/base/SkFloatingPoint.h" #include "include/private/base/SkSafe32.h" #include "include/private/base/SkTFitsIn.h" -#include #include +#include #include +#include struct SkRect; @@ -41,7 +42,7 @@ struct SK_API SkIRect { @return bounds (0, 0, 0, 0) */ - static constexpr SkIRect SK_WARN_UNUSED_RESULT MakeEmpty() { + [[nodiscard]] static constexpr SkIRect MakeEmpty() { return SkIRect{0, 0, 0, 0}; } @@ -52,7 +53,7 @@ struct SK_API SkIRect { @param h height of constructed SkIRect @return bounds (0, 0, w, h) */ - static constexpr SkIRect SK_WARN_UNUSED_RESULT MakeWH(int32_t w, int32_t h) { + [[nodiscard]] static constexpr SkIRect MakeWH(int32_t w, int32_t h) { return SkIRect{0, 0, w, h}; } @@ -62,7 +63,7 @@ struct SK_API SkIRect { @param size values for SkIRect width and height @return bounds (0, 0, size.width(), size.height()) */ - static constexpr SkIRect SK_WARN_UNUSED_RESULT MakeSize(const SkISize& size) { + [[nodiscard]] static constexpr SkIRect MakeSize(const SkISize& size) { return SkIRect{0, 0, size.fWidth, size.fHeight}; } @@ -74,7 +75,7 @@ struct SK_API SkIRect { @param size values for SkIRect width and height @return bounds at pt with width and height of size */ - static constexpr SkIRect SK_WARN_UNUSED_RESULT MakePtSize(SkIPoint pt, SkISize size) { + [[nodiscard]] static constexpr SkIRect MakePtSize(SkIPoint pt, SkISize size) { return MakeXYWH(pt.x(), pt.y(), size.width(), size.height()); } @@ -87,8 +88,7 @@ struct SK_API SkIRect { @param b integer stored in fBottom @return bounds (l, t, r, b) */ - static constexpr SkIRect SK_WARN_UNUSED_RESULT MakeLTRB(int32_t l, int32_t t, - int32_t r, int32_t b) { + [[nodiscard]] static constexpr SkIRect MakeLTRB(int32_t l, int32_t t, int32_t r, int32_t b) { return SkIRect{l, t, r, b}; } @@ -101,8 +101,7 @@ struct SK_API SkIRect { @param h added to y and stored in fBottom @return bounds at (x, y) with width w and height h */ - static constexpr SkIRect SK_WARN_UNUSED_RESULT MakeXYWH(int32_t x, int32_t y, - int32_t w, int32_t h) { + [[nodiscard]] static constexpr SkIRect MakeXYWH(int32_t x, int32_t y, int32_t w, int32_t h) { return { x, y, Sk32_sat_add(x, w), Sk32_sat_add(y, h) }; } @@ -524,7 +523,7 @@ struct SK_API SkIRect { @param b SkIRect to intersect @return true if a and b have area in common */ - bool SK_WARN_UNUSED_RESULT intersect(const SkIRect& a, const SkIRect& b); + [[nodiscard]] bool intersect(const SkIRect& a, const SkIRect& b); /** Returns true if a intersects b. Returns false if either a or b is empty, or do not intersect. @@ -574,17 +573,17 @@ struct SK_API SkIRect { }; /** \struct SkRect - SkRect holds four SkScalar coordinates describing the upper and + SkRect holds four float coordinates describing the upper and lower bounds of a rectangle. SkRect may be created from outer bounds or from position, width, and height. SkRect describes an area; if its right is less than or equal to its left, or if its bottom is less than or equal to its top, it is considered empty. */ struct SK_API SkRect { - SkScalar fLeft = 0; //!< smaller x-axis bounds - SkScalar fTop = 0; //!< smaller y-axis bounds - SkScalar fRight = 0; //!< larger x-axis bounds - SkScalar fBottom = 0; //!< larger y-axis bounds + float fLeft = 0; //!< smaller x-axis bounds + float fTop = 0; //!< smaller y-axis bounds + float fRight = 0; //!< larger x-axis bounds + float fBottom = 0; //!< larger y-axis bounds /** Returns constructed SkRect set to (0, 0, 0, 0). Many other rectangles are empty; if left is equal to or greater than right, @@ -593,21 +592,21 @@ struct SK_API SkRect { @return bounds (0, 0, 0, 0) */ - static constexpr SkRect SK_WARN_UNUSED_RESULT MakeEmpty() { + [[nodiscard]] static constexpr SkRect MakeEmpty() { return SkRect{0, 0, 0, 0}; } - /** Returns constructed SkRect set to SkScalar values (0, 0, w, h). Does not + /** Returns constructed SkRect set to float values (0, 0, w, h). Does not validate input; w or h may be negative. Passing integer values may generate a compiler warning since SkRect cannot represent 32-bit integers exactly. Use SkIRect for an exact integer rectangle. - @param w SkScalar width of constructed SkRect - @param h SkScalar height of constructed SkRect + @param w float width of constructed SkRect + @param h float height of constructed SkRect @return bounds (0, 0, w, h) */ - static constexpr SkRect SK_WARN_UNUSED_RESULT MakeWH(SkScalar w, SkScalar h) { + [[nodiscard]] static constexpr SkRect MakeWH(float w, float h) { return SkRect{0, 0, w, h}; } @@ -621,31 +620,30 @@ struct SK_API SkRect { @param h integer height of constructed SkRect @return bounds (0, 0, w, h) */ - static SkRect SK_WARN_UNUSED_RESULT MakeIWH(int w, int h) { - return {0, 0, SkIntToScalar(w), SkIntToScalar(h)}; + [[nodiscard]] static SkRect MakeIWH(int w, int h) { + return {0, 0, static_cast(w), static_cast(h)}; } /** Returns constructed SkRect set to (0, 0, size.width(), size.height()). Does not validate input; size.width() or size.height() may be negative. - @param size SkScalar values for SkRect width and height + @param size float values for SkRect width and height @return bounds (0, 0, size.width(), size.height()) */ - static constexpr SkRect SK_WARN_UNUSED_RESULT MakeSize(const SkSize& size) { + [[nodiscard]] static constexpr SkRect MakeSize(const SkSize& size) { return SkRect{0, 0, size.fWidth, size.fHeight}; } /** Returns constructed SkRect set to (l, t, r, b). Does not sort input; SkRect may result in fLeft greater than fRight, or fTop greater than fBottom. - @param l SkScalar stored in fLeft - @param t SkScalar stored in fTop - @param r SkScalar stored in fRight - @param b SkScalar stored in fBottom + @param l float stored in fLeft + @param t float stored in fTop + @param r float stored in fRight + @param b float stored in fBottom @return bounds (l, t, r, b) */ - static constexpr SkRect SK_WARN_UNUSED_RESULT MakeLTRB(SkScalar l, SkScalar t, SkScalar r, - SkScalar b) { + [[nodiscard]] static constexpr SkRect MakeLTRB(float l, float t, float r, float b) { return SkRect {l, t, r, b}; } @@ -658,8 +656,7 @@ struct SK_API SkRect { @param h added to y and stored in fBottom @return bounds at (x, y) with width w and height h */ - static constexpr SkRect SK_WARN_UNUSED_RESULT MakeXYWH(SkScalar x, SkScalar y, SkScalar w, - SkScalar h) { + [[nodiscard]] static constexpr SkRect MakeXYWH(float x, float y, float w, float h) { return SkRect {x, y, x + w, y + h}; } @@ -673,17 +670,17 @@ struct SK_API SkRect { return MakeIWH(size.width(), size.height()); } - /** Returns constructed SkIRect set to irect, promoting integers to scalar. + /** Returns constructed SkIRect set to irect, promoting integers to float. Does not validate input; fLeft may be greater than fRight, fTop may be greater than fBottom. @param irect integer unsorted bounds - @return irect members converted to SkScalar + @return irect members converted to float */ - static SkRect SK_WARN_UNUSED_RESULT Make(const SkIRect& irect) { + [[nodiscard]] static SkRect Make(const SkIRect& irect) { return { - SkIntToScalar(irect.fLeft), SkIntToScalar(irect.fTop), - SkIntToScalar(irect.fRight), SkIntToScalar(irect.fBottom) + static_cast(irect.fLeft), static_cast(irect.fTop), + static_cast(irect.fRight), static_cast(irect.fBottom) }; } @@ -707,8 +704,7 @@ struct SK_API SkRect { */ bool isSorted() const { return fLeft <= fRight && fTop <= fBottom; } - /** Returns true if all values in the rectangle are finite: SK_ScalarMin or larger, - and SK_ScalarMax or smaller. + /** Returns true if all values in the rectangle are finite. @return true if no member is infinite or NaN */ @@ -720,11 +716,11 @@ struct SK_API SkRect { accum *= fBottom; // accum is either NaN or it is finite (zero). - SkASSERT(0 == accum || SkScalarIsNaN(accum)); + SkASSERT(0 == accum || std::isnan(accum)); // value==value will be true iff value is not NaN // TODO: is it faster to say !accum or accum==accum? - return !SkScalarIsNaN(accum); + return !std::isnan(accum); } /** Returns left edge of SkRect, if sorted. Call isSorted() to see if SkRect is valid. @@ -732,65 +728,64 @@ struct SK_API SkRect { @return fLeft */ - constexpr SkScalar x() const { return fLeft; } + constexpr float x() const { return fLeft; } /** Returns top edge of SkRect, if sorted. Call isEmpty() to see if SkRect may be invalid, and sort() to reverse fTop and fBottom if needed. @return fTop */ - constexpr SkScalar y() const { return fTop; } + constexpr float y() const { return fTop; } /** Returns left edge of SkRect, if sorted. Call isSorted() to see if SkRect is valid. Call sort() to reverse fLeft and fRight if needed. @return fLeft */ - constexpr SkScalar left() const { return fLeft; } + constexpr float left() const { return fLeft; } /** Returns top edge of SkRect, if sorted. Call isEmpty() to see if SkRect may be invalid, and sort() to reverse fTop and fBottom if needed. @return fTop */ - constexpr SkScalar top() const { return fTop; } + constexpr float top() const { return fTop; } /** Returns right edge of SkRect, if sorted. Call isSorted() to see if SkRect is valid. Call sort() to reverse fLeft and fRight if needed. @return fRight */ - constexpr SkScalar right() const { return fRight; } + constexpr float right() const { return fRight; } /** Returns bottom edge of SkRect, if sorted. Call isEmpty() to see if SkRect may be invalid, and sort() to reverse fTop and fBottom if needed. @return fBottom */ - constexpr SkScalar bottom() const { return fBottom; } + constexpr float bottom() const { return fBottom; } /** Returns span on the x-axis. This does not check if SkRect is sorted, or if result fits in 32-bit float; result may be negative or infinity. @return fRight minus fLeft */ - constexpr SkScalar width() const { return fRight - fLeft; } + constexpr float width() const { return fRight - fLeft; } /** Returns span on the y-axis. This does not check if SkRect is sorted, or if result fits in 32-bit float; result may be negative or infinity. @return fBottom minus fTop */ - constexpr SkScalar height() const { return fBottom - fTop; } + constexpr float height() const { return fBottom - fTop; } /** Returns average of left edge and right edge. Result does not change if SkRect is sorted. Result may overflow to infinity if SkRect is far from the origin. @return midpoint on x-axis */ - constexpr SkScalar centerX() const { - // don't use SkScalarHalf(fLeft + fBottom) as that might overflow before the 0.5 - return SkScalarHalf(fLeft) + SkScalarHalf(fRight); + constexpr float centerX() const { + return sk_float_midpoint(fLeft, fRight); } /** Returns average of top edge and bottom edge. Result does not change if SkRect @@ -798,9 +793,8 @@ struct SK_API SkRect { @return midpoint on y-axis */ - constexpr SkScalar centerY() const { - // don't use SkScalarHalf(fTop + fBottom) as that might overflow before the 0.5 - return SkScalarHalf(fTop) + SkScalarHalf(fBottom); + constexpr float centerY() const { + return sk_float_midpoint(fTop, fBottom); } /** Returns the point this->centerX(), this->centerY(). @@ -819,7 +813,10 @@ struct SK_API SkRect { @return true if members are equal */ friend bool operator==(const SkRect& a, const SkRect& b) { - return SkScalarsEqual((const SkScalar*)&a, (const SkScalar*)&b, 4); + return a.fLeft == b.fLeft && + a.fTop == b.fTop && + a.fRight == b.fRight && + a.fBottom == b.fBottom; } /** Returns true if any in a: fLeft, fTop, fRight, and fBottom; does not @@ -833,7 +830,7 @@ struct SK_API SkRect { @return true if members are not equal */ friend bool operator!=(const SkRect& a, const SkRect& b) { - return !SkScalarsEqual((const SkScalar*)&a, (const SkScalar*)&b, 4); + return !(a == b); } /** Returns four points in quad that enclose SkRect ordered as: top-left, top-right, @@ -855,16 +852,16 @@ struct SK_API SkRect { */ void setEmpty() { *this = MakeEmpty(); } - /** Sets SkRect to src, promoting src members from integer to scalar. + /** Sets SkRect to src, promoting src members from integer to float. Very large values in src may lose precision. @param src integer SkRect */ void set(const SkIRect& src) { - fLeft = SkIntToScalar(src.fLeft); - fTop = SkIntToScalar(src.fTop); - fRight = SkIntToScalar(src.fRight); - fBottom = SkIntToScalar(src.fBottom); + fLeft = src.fLeft; + fTop = src.fTop; + fRight = src.fRight; + fBottom = src.fBottom; } /** Sets SkRect to (left, top, right, bottom). @@ -876,7 +873,7 @@ struct SK_API SkRect { @param right stored in fRight @param bottom stored in fBottom */ - void setLTRB(SkScalar left, SkScalar top, SkScalar right, SkScalar bottom) { + void setLTRB(float left, float top, float right, float bottom) { fLeft = left; fTop = top; fRight = right; @@ -942,7 +939,7 @@ struct SK_API SkRect { @param width added to x and stored in fRight @param height added to y and stored in fBottom */ - void setXYWH(SkScalar x, SkScalar y, SkScalar width, SkScalar height) { + void setXYWH(float x, float y, float width, float height) { fLeft = x; fTop = y; fRight = x + width; @@ -955,14 +952,14 @@ struct SK_API SkRect { @param width stored in fRight @param height stored in fBottom */ - void setWH(SkScalar width, SkScalar height) { + void setWH(float width, float height) { fLeft = 0; fTop = 0; fRight = width; fBottom = height; } void setIWH(int32_t width, int32_t height) { - this->setWH(SkIntToScalar(width), SkIntToScalar(height)); + this->setWH(width, height); } /** Returns SkRect offset by (dx, dy). @@ -976,7 +973,7 @@ struct SK_API SkRect { @param dy added to fTop and fBottom @return SkRect offset on axes, with original width and height */ - constexpr SkRect makeOffset(SkScalar dx, SkScalar dy) const { + constexpr SkRect makeOffset(float dx, float dy) const { return MakeLTRB(fLeft + dx, fTop + dy, fRight + dx, fBottom + dy); } @@ -998,7 +995,7 @@ struct SK_API SkRect { @param dy added to fTop and subtracted from fBottom @return SkRect inset symmetrically left and right, top and bottom */ - SkRect makeInset(SkScalar dx, SkScalar dy) const { + SkRect makeInset(float dx, float dy) const { return MakeLTRB(fLeft + dx, fTop + dy, fRight - dx, fBottom - dy); } @@ -1013,7 +1010,7 @@ struct SK_API SkRect { @param dy subtracted to fTop and added from fBottom @return SkRect outset symmetrically left and right, top and bottom */ - SkRect makeOutset(SkScalar dx, SkScalar dy) const { + SkRect makeOutset(float dx, float dy) const { return MakeLTRB(fLeft - dx, fTop - dy, fRight + dx, fBottom + dy); } @@ -1027,7 +1024,7 @@ struct SK_API SkRect { @param dx offset added to fLeft and fRight @param dy offset added to fTop and fBottom */ - void offset(SkScalar dx, SkScalar dy) { + void offset(float dx, float dy) { fLeft += dx; fTop += dy; fRight += dx; @@ -1054,7 +1051,7 @@ struct SK_API SkRect { @param newX stored in fLeft, preserving width() @param newY stored in fTop, preserving height() */ - void offsetTo(SkScalar newX, SkScalar newY) { + void offsetTo(float newX, float newY) { fRight += newX - fLeft; fBottom += newY - fTop; fLeft = newX; @@ -1071,7 +1068,7 @@ struct SK_API SkRect { @param dx added to fLeft and subtracted from fRight @param dy added to fTop and subtracted from fBottom */ - void inset(SkScalar dx, SkScalar dy) { + void inset(float dx, float dy) { fLeft += dx; fTop += dy; fRight -= dx; @@ -1088,7 +1085,7 @@ struct SK_API SkRect { @param dx subtracted to fLeft and added from fRight @param dy subtracted to fTop and added from fBottom */ - void outset(SkScalar dx, SkScalar dy) { this->inset(-dx, -dy); } + void outset(float dx, float dy) { this->inset(-dx, -dy); } /** Returns true if SkRect intersects r, and sets SkRect to intersection. Returns false if SkRect does not intersect r, and leaves SkRect unchanged. @@ -1111,16 +1108,16 @@ struct SK_API SkRect { @param b SkRect to intersect @return true if a and b have area in common */ - bool SK_WARN_UNUSED_RESULT intersect(const SkRect& a, const SkRect& b); + [[nodiscard]] bool intersect(const SkRect& a, const SkRect& b); private: - static bool Intersects(SkScalar al, SkScalar at, SkScalar ar, SkScalar ab, - SkScalar bl, SkScalar bt, SkScalar br, SkScalar bb) { - SkScalar L = std::max(al, bl); - SkScalar R = std::min(ar, br); - SkScalar T = std::max(at, bt); - SkScalar B = std::min(ab, bb); + static bool Intersects(float al, float at, float ar, float ab, + float bl, float bt, float br, float bb) { + float L = std::max(al, bl); + float R = std::min(ar, br); + float T = std::max(at, bt); + float B = std::min(ab, bb); return L < R && T < B; } @@ -1199,7 +1196,7 @@ struct SK_API SkRect { @param y test SkPoint y-coordinate @return true if (x, y) is inside SkRect */ - bool contains(SkScalar x, SkScalar y) const { + bool contains(float x, float y) const { return x >= fLeft && x < fRight && y >= fTop && y < fBottom; } @@ -1229,63 +1226,63 @@ struct SK_API SkRect { bool contains(const SkIRect& r) const { // todo: can we eliminate the this->isEmpty check? return !r.isEmpty() && !this->isEmpty() && - fLeft <= SkIntToScalar(r.fLeft) && fTop <= SkIntToScalar(r.fTop) && - fRight >= SkIntToScalar(r.fRight) && fBottom >= SkIntToScalar(r.fBottom); + fLeft <= r.fLeft && fTop <= r.fTop && + fRight >= r.fRight && fBottom >= r.fBottom; } /** Sets SkIRect by adding 0.5 and discarding the fractional portion of SkRect - members, using (SkScalarRoundToInt(fLeft), SkScalarRoundToInt(fTop), - SkScalarRoundToInt(fRight), SkScalarRoundToInt(fBottom)). + members, using (sk_float_round2int(fLeft), sk_float_round2int(fTop), + sk_float_round2int(fRight), sk_float_round2int(fBottom)). @param dst storage for SkIRect */ void round(SkIRect* dst) const { SkASSERT(dst); - dst->setLTRB(SkScalarRoundToInt(fLeft), SkScalarRoundToInt(fTop), - SkScalarRoundToInt(fRight), SkScalarRoundToInt(fBottom)); + dst->setLTRB(sk_float_round2int(fLeft), sk_float_round2int(fTop), + sk_float_round2int(fRight), sk_float_round2int(fBottom)); } /** Sets SkIRect by discarding the fractional portion of fLeft and fTop; and rounding up fRight and fBottom, using - (SkScalarFloorToInt(fLeft), SkScalarFloorToInt(fTop), - SkScalarCeilToInt(fRight), SkScalarCeilToInt(fBottom)). + (sk_float_floor2int(fLeft), sk_float_floor2int(fTop), + sk_float_ceil2int(fRight), sk_float_ceil2int(fBottom)). @param dst storage for SkIRect */ void roundOut(SkIRect* dst) const { SkASSERT(dst); - dst->setLTRB(SkScalarFloorToInt(fLeft), SkScalarFloorToInt(fTop), - SkScalarCeilToInt(fRight), SkScalarCeilToInt(fBottom)); + dst->setLTRB(sk_float_floor2int(fLeft), sk_float_floor2int(fTop), + sk_float_ceil2int(fRight), sk_float_ceil2int(fBottom)); } /** Sets SkRect by discarding the fractional portion of fLeft and fTop; and rounding up fRight and fBottom, using - (SkScalarFloorToInt(fLeft), SkScalarFloorToInt(fTop), - SkScalarCeilToInt(fRight), SkScalarCeilToInt(fBottom)). + (sk_float_floor(fLeft), sk_float_floor(fTop), + sk_float_ceil(fRight), sk_float_ceil(fBottom)). @param dst storage for SkRect */ void roundOut(SkRect* dst) const { - dst->setLTRB(SkScalarFloorToScalar(fLeft), SkScalarFloorToScalar(fTop), - SkScalarCeilToScalar(fRight), SkScalarCeilToScalar(fBottom)); + dst->setLTRB(sk_float_floor(fLeft), sk_float_floor(fTop), + sk_float_ceil(fRight), sk_float_ceil(fBottom)); } /** Sets SkRect by rounding up fLeft and fTop; and discarding the fractional portion of fRight and fBottom, using - (SkScalarCeilToInt(fLeft), SkScalarCeilToInt(fTop), - SkScalarFloorToInt(fRight), SkScalarFloorToInt(fBottom)). + (sk_float_ceil2int(fLeft), sk_float_ceil2int(fTop), + sk_float_floor2int(fRight), sk_float_floor2int(fBottom)). @param dst storage for SkIRect */ void roundIn(SkIRect* dst) const { SkASSERT(dst); - dst->setLTRB(SkScalarCeilToInt(fLeft), SkScalarCeilToInt(fTop), - SkScalarFloorToInt(fRight), SkScalarFloorToInt(fBottom)); + dst->setLTRB(sk_float_ceil2int(fLeft), sk_float_ceil2int(fTop), + sk_float_floor2int(fRight), sk_float_floor2int(fBottom)); } /** Returns SkIRect by adding 0.5 and discarding the fractional portion of SkRect - members, using (SkScalarRoundToInt(fLeft), SkScalarRoundToInt(fTop), - SkScalarRoundToInt(fRight), SkScalarRoundToInt(fBottom)). + members, using (sk_float_round2int(fLeft), sk_float_round2int(fTop), + sk_float_round2int(fRight), sk_float_round2int(fBottom)). @return rounded SkIRect */ @@ -1297,8 +1294,8 @@ struct SK_API SkRect { /** Sets SkIRect by discarding the fractional portion of fLeft and fTop; and rounding up fRight and fBottom, using - (SkScalarFloorToInt(fLeft), SkScalarFloorToInt(fTop), - SkScalarCeilToInt(fRight), SkScalarCeilToInt(fBottom)). + (sk_float_floor2int(fLeft), sk_float_floor2int(fTop), + sk_float_ceil2int(fRight), sk_float_ceil2int(fBottom)). @return rounded SkIRect */ @@ -1309,8 +1306,8 @@ struct SK_API SkRect { } /** Sets SkIRect by rounding up fLeft and fTop; and discarding the fractional portion of fRight and fBottom, using - (SkScalarCeilToInt(fLeft), SkScalarCeilToInt(fTop), - SkScalarFloorToInt(fRight), SkScalarFloorToInt(fBottom)). + (sk_float_ceil2int(fLeft), sk_float_ceil2int(fTop), + sk_float_floor2int(fRight), sk_float_floor2int(fBottom)). @return rounded SkIRect */ @@ -1346,12 +1343,12 @@ struct SK_API SkRect { std::max(fLeft, fRight), std::max(fTop, fBottom)); } - /** Returns pointer to first scalar in SkRect, to treat it as an array with four + /** Returns pointer to first float in SkRect, to treat it as an array with four entries. @return pointer to fLeft */ - const SkScalar* asScalars() const { return &fLeft; } + const float* asScalars() const { return &fLeft; } /** Writes text representation of SkRect to standard output. Set asHex to true to generate exact binary representations of floating point numbers. @@ -1381,8 +1378,8 @@ struct SK_API SkRect { inline bool SkIRect::contains(const SkRect& r) const { return !r.isEmpty() && !this->isEmpty() && // check for empties - (SkScalar)fLeft <= r.fLeft && (SkScalar)fTop <= r.fTop && - (SkScalar)fRight >= r.fRight && (SkScalar)fBottom >= r.fBottom; + fLeft <= r.fLeft && fTop <= r.fTop && + fRight >= r.fRight && fBottom >= r.fBottom; } #endif diff --git a/include/core/SkRefCnt.h b/include/core/SkRefCnt.h index 51965a313810..5d295197b602 100644 --- a/include/core/SkRefCnt.h +++ b/include/core/SkRefCnt.h @@ -325,7 +325,7 @@ template class SK_TRIVIAL_ABI sk_sp { * The caller must assume ownership of the object, and manage its reference count directly. * No call to unref() will be made. */ - T* SK_WARN_UNUSED_RESULT release() { + [[nodiscard]] T* release() { T* ptr = fPtr; fPtr = nullptr; return ptr; diff --git a/include/core/SkStream.h b/include/core/SkStream.h index c582c80a0528..189360c92945 100644 --- a/include/core/SkStream.h +++ b/include/core/SkStream.h @@ -86,22 +86,22 @@ class SK_API SkStream { */ virtual bool isAtEnd() const = 0; - bool SK_WARN_UNUSED_RESULT readS8(int8_t*); - bool SK_WARN_UNUSED_RESULT readS16(int16_t*); - bool SK_WARN_UNUSED_RESULT readS32(int32_t*); + [[nodiscard]] bool readS8(int8_t*); + [[nodiscard]] bool readS16(int16_t*); + [[nodiscard]] bool readS32(int32_t*); - bool SK_WARN_UNUSED_RESULT readU8(uint8_t* i) { return this->readS8((int8_t*)i); } - bool SK_WARN_UNUSED_RESULT readU16(uint16_t* i) { return this->readS16((int16_t*)i); } - bool SK_WARN_UNUSED_RESULT readU32(uint32_t* i) { return this->readS32((int32_t*)i); } + [[nodiscard]] bool readU8(uint8_t* i) { return this->readS8((int8_t*)i); } + [[nodiscard]] bool readU16(uint16_t* i) { return this->readS16((int16_t*)i); } + [[nodiscard]] bool readU32(uint32_t* i) { return this->readS32((int32_t*)i); } - bool SK_WARN_UNUSED_RESULT readBool(bool* b) { + [[nodiscard]] bool readBool(bool* b) { uint8_t i; if (!this->readU8(&i)) { return false; } *b = (i != 0); return true; } - bool SK_WARN_UNUSED_RESULT readScalar(SkScalar*); - bool SK_WARN_UNUSED_RESULT readPackedUInt(size_t*); + [[nodiscard]] bool readScalar(SkScalar*); + [[nodiscard]] bool readPackedUInt(size_t*); //SkStreamRewindable /** Rewinds to the beginning of the stream. Returns true if the stream is known diff --git a/include/core/SkSurface.h b/include/core/SkSurface.h index 3c810fae6140..5822a4fe5f4b 100644 --- a/include/core/SkSurface.h +++ b/include/core/SkSurface.h @@ -39,12 +39,6 @@ namespace skgpu::graphite { class Recorder; } -#if !defined(SK_DISABLE_LEGACY_SKSURFACE_FLUSH) -enum class GrSemaphoresSubmitted : bool; -struct GrFlushInfo; -namespace skgpu { class MutableTextureState; } -#endif - namespace SkSurfaces { enum class BackendSurfaceAccess { @@ -555,6 +549,20 @@ class SK_API SkSurface : public SkRefCnt { ReadPixelsCallback callback, ReadPixelsContext context); + /** + * Identical to asyncRescaleAndReadPixelsYUV420 but a fourth plane is returned in the + * AsyncReadResult passed to 'callback'. The fourth plane contains the alpha chanel at the + * same full resolution as the Y plane. + */ + void asyncRescaleAndReadPixelsYUVA420(SkYUVColorSpace yuvColorSpace, + sk_sp dstColorSpace, + const SkIRect& srcRect, + const SkISize& dstSize, + RescaleGamma rescaleGamma, + RescaleMode rescaleMode, + ReadPixelsCallback callback, + ReadPixelsContext context); + /** Copies SkRect of pixels from the src SkPixmap to the SkSurface. Source SkRect corners are (0, 0) and (src.width(), src.height()). @@ -643,25 +651,6 @@ class SK_API SkSurface : public SkRefCnt { uint32_t fGenerationID; using INHERITED = SkRefCnt; - -public: -#if !defined(SK_DISABLE_LEGACY_SKSURFACE_FLUSH) && defined(SK_GANESH) - using BackendSurfaceAccess = SkSurfaces::BackendSurfaceAccess; - GrSemaphoresSubmitted flush(BackendSurfaceAccess access, const GrFlushInfo& info); - GrSemaphoresSubmitted flush(const GrFlushInfo& info, - const skgpu::MutableTextureState* newState = nullptr); - void resolveMSAA(); -#endif - -#if !defined(SK_DISABLE_LEGACY_SKSURFACE_FLUSH) - void flushAndSubmit(bool syncCpu = false); - void flush(); -#endif - -#if !defined(SK_DISABLE_LEGACY_SKSURFACE_AS_IMAGE) && defined(SK_GRAPHITE) - sk_sp asImage(); -#endif - }; #endif diff --git a/include/core/SkSurfaceCharacterization.h b/include/core/SkSurfaceCharacterization.h deleted file mode 100644 index 35b284d3021b..000000000000 --- a/include/core/SkSurfaceCharacterization.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright 2017 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -// TODO(kjlubick, robertphillips) migrate Chromium to use the new location and name -#include "include/private/chromium/GrSurfaceCharacterization.h" // IWYU pragma: export - -class GrDeferredDisplayList; -class GrDeferredDisplayListRecorder; -using SkDeferredDisplayList = GrDeferredDisplayList; -using SkDeferredDisplayListRecorder = GrDeferredDisplayListRecorder; -using SkSurfaceCharacterization = GrSurfaceCharacterization; diff --git a/include/core/SkTiledImageUtils.h b/include/core/SkTiledImageUtils.h index ee35159d3076..24af0a4116a0 100644 --- a/include/core/SkTiledImageUtils.h +++ b/include/core/SkTiledImageUtils.h @@ -15,8 +15,18 @@ #include "include/core/SkSamplingOptions.h" #include "include/core/SkScalar.h" #include "include/private/base/SkAPI.h" + +#include + class SkPaint; +/** \namespace SkTiledImageUtils + SkTiledImageUtils' DrawImage/DrawImageRect methods are intended to be direct replacements + for their SkCanvas equivalents. The SkTiledImageUtils calls will break SkBitmap-backed + SkImages into smaller tiles and draw them if the original image is too large to be + uploaded to the GPU. If the original image doesn't need tiling or is already gpu-backed + the DrawImage/DrawImageRect calls will fall through to the matching SkCanvas call. +*/ namespace SkTiledImageUtils { SK_API void DrawImageRect(SkCanvas* canvas, @@ -92,6 +102,20 @@ inline void DrawImage(SkCanvas* canvas, DrawImage(canvas, image.get(), x, y, sampling, paint, constraint); } +static constexpr int kNumImageKeyValues = 5; + +/** Retrieves a set of values that can be used as part of a cache key for the provided image. + + Unfortunately, SkImage::uniqueID isn't sufficient as an SkImage cache key. In particular, + SkBitmap-backed SkImages can share a single SkBitmap and refer to different subsets of it. + In this situation the optimal key is based on the SkBitmap's generation ID and the subset + rectangle. + + @param image The image for which key values are desired + @param keyValues The resulting key values +*/ +SK_API void GetImageKeyValues(const SkImage* image, uint32_t keyValues[kNumImageKeyValues]); + } // namespace SkTiledImageUtils #endif // SkTiledImageUtils_DEFINED diff --git a/include/effects/SkImageFilters.h b/include/effects/SkImageFilters.h index f09c1606758e..a677ac62f859 100644 --- a/include/effects/SkImageFilters.h +++ b/include/effects/SkImageFilters.h @@ -8,22 +8,33 @@ #ifndef SkImageFilters_DEFINED #define SkImageFilters_DEFINED -#include "include/core/SkBlendMode.h" #include "include/core/SkColor.h" #include "include/core/SkImage.h" #include "include/core/SkImageFilter.h" #include "include/core/SkPicture.h" #include "include/core/SkRect.h" +#include "include/core/SkRefCnt.h" +#include "include/core/SkScalar.h" +#include "include/core/SkShader.h" #include "include/core/SkTileMode.h" #include "include/core/SkTypes.h" -#include "include/effects/SkRuntimeEffect.h" + +// TODO(kjlubick) remove after cl/548357677 lands +#include "include/core/SkData.h" // IWYU pragma: keep #include +#include +#include class SkBlender; class SkColorFilter; -class SkPaint; -class SkRegion; +class SkMatrix; +class SkRuntimeShaderBuilder; +enum class SkBlendMode; +struct SkIPoint; +struct SkISize; +struct SkPoint3; +struct SkSamplingOptions; namespace skif { static constexpr SkRect kNoCropRect = {SK_ScalarNegativeInfinity, SK_ScalarNegativeInfinity, @@ -311,7 +322,6 @@ class SK_API SkImageFilters { return Picture(std::move(pic), target); } -#ifdef SK_ENABLE_SKSL /** * Create a filter that fills the output with the per-pixel evaluation of the SkShader produced * by the SkRuntimeShaderBuilder. The shader is defined in the image filter's local coordinate @@ -320,6 +330,8 @@ class SK_API SkImageFilters { * This variant assumes that the runtime shader samples 'childShaderName' with the same input * coordinate passed to to shader. * + * This requires a GPU backend or SkSL to be compiled in. + * * @param builder The builder used to produce the runtime shader, that will in turn * fill the result image * @param childShaderName The name of the child shader defined in the builder that will be @@ -343,6 +355,8 @@ class SK_API SkImageFilters { * * This allows Skia to provide sampleable values for the image filter without worrying about * boundary conditions. + * + * This requires a GPU backend or SkSL to be compiled in. */ static sk_sp RuntimeShader(const SkRuntimeShaderBuilder& builder, SkScalar sampleRadius, @@ -354,6 +368,8 @@ class SK_API SkImageFilters { * by the SkRuntimeShaderBuilder. The shader is defined in the image filter's local coordinate * system, so it will automatically be affected by SkCanvas' transform. * + * This requires a GPU backend or SkSL to be compiled in. + * * @param builder The builder used to produce the runtime shader, that will in turn * fill the result image * @param childShaderNames The names of the child shaders defined in the builder that will be @@ -378,13 +394,14 @@ class SK_API SkImageFilters { * inform Skia that the runtime shader guarantees that all dynamic children (defined in * childShaderNames) will be evaluated with coordinates at most 'maxSampleRadius' away from the * coordinate provided to the runtime shader itself. + * + * This requires a GPU backend or SkSL to be compiled in. */ static sk_sp RuntimeShader(const SkRuntimeShaderBuilder& builder, SkScalar maxSampleRadius, std::string_view childShaderNames[], const sk_sp inputs[], int inputCount); -#endif // SK_ENABLE_SKSL enum class Dither : bool { kNo = false, diff --git a/include/effects/SkRuntimeEffect.h b/include/effects/SkRuntimeEffect.h index 291a70fc36a5..8f47b5306428 100644 --- a/include/effects/SkRuntimeEffect.h +++ b/include/effects/SkRuntimeEffect.h @@ -23,6 +23,8 @@ #include "include/private/base/SkTemplates.h" #include "include/private/base/SkTo.h" #include "include/private/base/SkTypeTraits.h" +#include "include/sksl/SkSLDebugTrace.h" +#include "include/sksl/SkSLVersion.h" #include #include @@ -34,16 +36,7 @@ #include #include -#ifdef SK_ENABLE_SKSL - -#include "include/sksl/SkSLDebugTrace.h" -#include "include/sksl/SkSLVersion.h" - -class GrRecordingContext; -class SkFilterColorProgram; -class SkImage; struct SkIPoint; -struct SkImageInfo; namespace SkSL { class DebugTracePriv; @@ -217,25 +210,18 @@ class SK_API SkRuntimeEffect : public SkRefCnt { size_t childCount, const SkMatrix* localMatrix = nullptr) const; sk_sp makeShader(sk_sp uniforms, - SkSpan children, + SkSpan children, const SkMatrix* localMatrix = nullptr) const; - sk_sp makeImage(GrRecordingContext*, - sk_sp uniforms, - SkSpan children, - const SkMatrix* localMatrix, - SkImageInfo resultInfo, - bool mipmapped) const; - sk_sp makeColorFilter(sk_sp uniforms) const; sk_sp makeColorFilter(sk_sp uniforms, sk_sp children[], size_t childCount) const; sk_sp makeColorFilter(sk_sp uniforms, - SkSpan children) const; + SkSpan children) const; sk_sp makeBlender(sk_sp uniforms, - SkSpan children = {}) const; + SkSpan children = {}) const; /** * Creates a new Runtime Effect patterned after an already-existing one. The new shader behaves @@ -281,14 +267,15 @@ class SK_API SkRuntimeEffect : public SkRefCnt { private: enum Flags { - kUsesSampleCoords_Flag = 0x01, - kAllowColorFilter_Flag = 0x02, - kAllowShader_Flag = 0x04, - kAllowBlender_Flag = 0x08, - kSamplesOutsideMain_Flag = 0x10, - kUsesColorTransform_Flag = 0x20, - kAlwaysOpaque_Flag = 0x40, - kAlphaUnchanged_Flag = 0x80, + kUsesSampleCoords_Flag = 0x001, + kAllowColorFilter_Flag = 0x002, + kAllowShader_Flag = 0x004, + kAllowBlender_Flag = 0x008, + kSamplesOutsideMain_Flag = 0x010, + kUsesColorTransform_Flag = 0x020, + kAlwaysOpaque_Flag = 0x040, + kAlphaUnchanged_Flag = 0x080, + kDisableOptimization_Flag = 0x100, }; SkRuntimeEffect(std::unique_ptr baseProgram, @@ -316,7 +303,6 @@ class SK_API SkRuntimeEffect : public SkRefCnt { bool alwaysOpaque() const { return (fFlags & kAlwaysOpaque_Flag); } bool isAlphaUnchanged() const { return (fFlags & kAlphaUnchanged_Flag); } - const SkFilterColorProgram* getFilterColorProgram() const; const SkSL::RP::Program* getRPProgram(SkSL::DebugTracePriv* debugTrace) const; #if defined(SK_GANESH) @@ -328,7 +314,6 @@ class SK_API SkRuntimeEffect : public SkRefCnt { friend class SkRuntimeBlender; // friend class SkRuntimeColorFilter; // - friend class SkFilterColorProgram; friend class SkRuntimeEffectPriv; uint32_t fHash; @@ -341,8 +326,6 @@ class SK_API SkRuntimeEffect : public SkRefCnt { std::vector fChildren; std::vector fSampleUsages; - std::unique_ptr fFilterColorProgram; - uint32_t fFlags; // Flags }; @@ -434,8 +417,8 @@ class SkRuntimeEffectBuilder { // Get access to the collated uniforms and children (in the order expected by APIs like // makeShader on the effect): - sk_sp uniforms() { return fUniforms; } - SkSpan children() { return fChildren; } + sk_sp uniforms() const { return fUniforms; } + SkSpan children() const { return fChildren; } protected: SkRuntimeEffectBuilder() = delete; @@ -495,17 +478,11 @@ class SK_API SkRuntimeShaderBuilder : public SkRuntimeEffectBuilder { SkRuntimeShaderBuilder(const SkRuntimeShaderBuilder&) = default; ~SkRuntimeShaderBuilder(); - sk_sp makeShader(const SkMatrix* localMatrix = nullptr); - sk_sp makeImage(GrRecordingContext*, - const SkMatrix* localMatrix, - SkImageInfo resultInfo, - bool mipmapped); + sk_sp makeShader(const SkMatrix* localMatrix = nullptr) const; private: - using INHERITED = SkRuntimeEffectBuilder; - explicit SkRuntimeShaderBuilder(sk_sp effect, sk_sp uniforms) - : INHERITED(std::move(effect), std::move(uniforms)) {} + : SkRuntimeEffectBuilder(std::move(effect), std::move(uniforms)) {} friend class SkRuntimeImageFilter; }; @@ -521,10 +498,7 @@ class SK_API SkRuntimeColorFilterBuilder : public SkRuntimeEffectBuilder { SkRuntimeColorFilterBuilder(const SkRuntimeColorFilterBuilder&) = delete; SkRuntimeColorFilterBuilder& operator=(const SkRuntimeColorFilterBuilder&) = delete; - sk_sp makeColorFilter(); - -private: - using INHERITED = SkRuntimeEffectBuilder; + sk_sp makeColorFilter() const; }; /** @@ -538,12 +512,7 @@ class SK_API SkRuntimeBlendBuilder : public SkRuntimeEffectBuilder { SkRuntimeBlendBuilder(const SkRuntimeBlendBuilder&) = delete; SkRuntimeBlendBuilder& operator=(const SkRuntimeBlendBuilder&) = delete; - sk_sp makeBlender(); - -private: - using INHERITED = SkRuntimeEffectBuilder; + sk_sp makeBlender() const; }; -#endif // SK_ENABLE_SKSL - #endif // SkRuntimeEffect_DEFINED diff --git a/include/gpu/BUILD.bazel b/include/gpu/BUILD.bazel index 4d3883fede18..f664b6a9945b 100644 --- a/include/gpu/BUILD.bazel +++ b/include/gpu/BUILD.bazel @@ -37,9 +37,9 @@ skia_filegroup( "//include/gpu/ganesh:public_hdrs", ] + select_multi( { - "//src/gpu:dawn_backend": ["//include/gpu/dawn:public_hdrs"], - "//src/gpu:vulkan_backend": ["//include/gpu/vk:public_hdrs"], - "//src/gpu:metal_backend": ["//include/gpu/mtl:public_hdrs"], + "//src/gpu:dawn_ganesh": ["//include/gpu/dawn:public_hdrs"], + "//src/gpu:vulkan_ganesh": ["//include/gpu/vk:public_hdrs"], + "//src/gpu:metal_ganesh": ["//include/gpu/mtl:public_hdrs"], # TODO(kjlubick) d3d backend }, ), diff --git a/include/gpu/GrBackendSurface.h b/include/gpu/GrBackendSurface.h index ffe3494d5a60..f120625f6367 100644 --- a/include/gpu/GrBackendSurface.h +++ b/include/gpu/GrBackendSurface.h @@ -15,13 +15,13 @@ #include "include/private/base/SkAPI.h" #include "include/private/gpu/ganesh/GrTypesPriv.h" -#ifdef SK_GL -#include "include/gpu/gl/GrGLTypes.h" -#include "include/private/gpu/ganesh/GrGLTypesPriv.h" -#endif - #include "include/gpu/mock/GrMockTypes.h" +#if !defined(SK_DISABLE_LEGACY_GL_BACKEND_SURFACE) && defined(SK_GL) +#include "include/gpu/gl/GrGLTypes.h" // IWYU pragma: keep +#include "include/private/gpu/ganesh/GrGLTypesPriv.h" // IWYU pragma: keep +#endif + #ifdef SK_VULKAN #include "include/gpu/vk/GrVkTypes.h" #include "include/private/gpu/ganesh/GrVkTypesPriv.h" @@ -32,11 +32,10 @@ #include "include/gpu/dawn/GrDawnTypes.h" #endif -#include -#include -#include - enum class SkTextureCompressionType; +class GrBackendFormatData; +class GrBackendTextureData; +class GrBackendRenderTargetData; namespace skgpu { class MutableTextureState; @@ -60,18 +59,18 @@ class GrD3DResourceState; class SkString; #endif +#include +#include +#include +#include + class SK_API GrBackendFormat { public: // Creates an invalid backend format. - GrBackendFormat() {} + GrBackendFormat(); GrBackendFormat(const GrBackendFormat&); GrBackendFormat& operator=(const GrBackendFormat&); - -#ifdef SK_GL - static GrBackendFormat MakeGL(GrGLenum format, GrGLenum target) { - return GrBackendFormat(format, target); - } -#endif + ~GrBackendFormat(); #ifdef SK_VULKAN static GrBackendFormat MakeVk(VkFormat format, bool willUseDRMFormatModifiers = false) { @@ -118,16 +117,6 @@ class SK_API GrBackendFormat { GrColorFormatDesc desc() const; -#ifdef SK_GL - /** - * If the backend API is GL this gets the format as a GrGLFormat. Otherwise, returns - * GrGLFormat::kUnknown. - */ - GrGLFormat asGLFormat() const; - - GrGLenum asGLFormatEnum() const; -#endif - #ifdef SK_VULKAN /** * If the backend API is Vulkan this gets the format as a VkFormat and returns true. Otherwise, @@ -184,9 +173,10 @@ class SK_API GrBackendFormat { #endif private: -#ifdef SK_GL - GrBackendFormat(GrGLenum format, GrGLenum target); -#endif + friend class GrBackendSurfacePriv; + // Used by internal factories. Should not be used externally. Use factories like + // GrBackendFormats::MakeGL instead. + GrBackendFormat(GrTextureType, GrBackendApi, std::unique_ptr); #ifdef SK_VULKAN GrBackendFormat(const VkFormat vkFormat, const GrVkYcbcrConversionInfo&, @@ -212,12 +202,10 @@ class SK_API GrBackendFormat { #endif GrBackendApi fBackend = GrBackendApi::kMock; - bool fValid = false; + bool fValid = false; + std::unique_ptr fFormatData; union { -#ifdef SK_GL - GrGLenum fGLFormat; // the sized, internal format of the GL resource -#endif #ifdef SK_VULKAN struct { VkFormat fFormat; @@ -242,6 +230,13 @@ class SK_API GrBackendFormat { } fMock; }; GrTextureType fTextureType = GrTextureType::kNone; + +#if !defined(SK_DISABLE_LEGACY_GL_BACKEND_SURFACE) && defined(SK_GL) +public: +static GrBackendFormat MakeGL(GrGLenum format, GrGLenum target); +GrGLFormat asGLFormat() const; +GrGLenum asGLFormatEnum() const; +#endif }; class SK_API GrBackendTexture { @@ -249,15 +244,6 @@ class SK_API GrBackendTexture { // Creates an invalid backend texture. GrBackendTexture(); -#ifdef SK_GL - // The GrGLTextureInfo must have a valid fFormat. - GrBackendTexture(int width, - int height, - GrMipmapped, - const GrGLTextureInfo& glInfo, - std::string_view label = {}); -#endif - #ifdef SK_VULKAN GrBackendTexture(int width, int height, @@ -310,16 +296,6 @@ class SK_API GrBackendTexture { GrBackendApi backend() const {return fBackend; } GrTextureType textureType() const { return fTextureType; } -#ifdef SK_GL - // If the backend API is GL, copies a snapshot of the GrGLTextureInfo struct into the passed in - // pointer and returns true. Otherwise returns false if the backend API is not GL. - bool getGLTextureInfo(GrGLTextureInfo*) const; - - // Call this to indicate that the texture parameters have been modified in the GL context - // externally to GrContext. - void glTextureParametersModified(); -#endif - #ifdef SK_DAWN // If the backend API is Dawn, copies a snapshot of the GrDawnTextureInfo struct into the passed // in pointer and returns true. Otherwise returns false if the backend API is not Dawn. @@ -378,24 +354,23 @@ class SK_API GrBackendTexture { bool isSameTexture(const GrBackendTexture&); #if GR_TEST_UTILS - static bool TestingOnly_Equals(const GrBackendTexture& , const GrBackendTexture&); + static bool TestingOnly_Equals(const GrBackendTexture&, const GrBackendTexture&); #endif private: - friend class GrVkGpu; // for getMutableState - sk_sp getMutableState() const; - -#ifdef SK_GL - friend class GrGLTexture; - friend class GrGLGpu; // for getGLTextureParams + friend class GrBackendSurfacePriv; + // Used by internal factories. Should not be used externally. Use factories like + // GrBackendTextures::MakeGL instead. GrBackendTexture(int width, int height, - GrMipmapped, - const GrGLTextureInfo, - sk_sp, - std::string_view label = {}); - sk_sp getGLTextureParams() const; -#endif + std::string_view label, + skgpu::Mipmapped mipped, + GrBackendApi backend, + GrTextureType texture, + std::unique_ptr data); + + friend class GrVkGpu; // for getMutableState + sk_sp getMutableState() const; #ifdef SK_VULKAN friend class GrVkTexture; @@ -427,11 +402,9 @@ class SK_API GrBackendTexture { GrMipmapped fMipmapped; GrBackendApi fBackend; GrTextureType fTextureType; + std::unique_ptr fTextureData; union { -#ifdef SK_GL - GrGLBackendTextureInfo fGLInfo; -#endif #ifdef SK_VULKAN GrVkBackendSurfaceInfo fVkInfo; #endif @@ -448,6 +421,17 @@ class SK_API GrBackendTexture { #endif sk_sp fMutableState; + +#if !defined(SK_DISABLE_LEGACY_GL_BACKEND_SURFACE) && defined(SK_GL) +public: + GrBackendTexture(int width, + int height, + GrMipmapped, + const GrGLTextureInfo& glInfo, + std::string_view label = {}); + bool getGLTextureInfo(GrGLTextureInfo*) const; + void glTextureParametersModified(); +#endif }; class SK_API GrBackendRenderTarget { @@ -455,16 +439,6 @@ class SK_API GrBackendRenderTarget { // Creates an invalid backend texture. GrBackendRenderTarget(); -#ifdef SK_GL - // The GrGLTextureInfo must have a valid fFormat. If wrapping in an SkSurface we require the - // stencil bits to be either 0, 8 or 16. - GrBackendRenderTarget(int width, - int height, - int sampleCnt, - int stencilBits, - const GrGLFramebufferInfo& glInfo); -#endif - #ifdef SK_DAWN // If wrapping in an SkSurface we require the stencil bits to be either 0, 8 or 16. GrBackendRenderTarget(int width, @@ -517,12 +491,6 @@ class SK_API GrBackendRenderTarget { GrBackendApi backend() const {return fBackend; } bool isFramebufferOnly() const { return fFramebufferOnly; } -#ifdef SK_GL - // If the backend API is GL, copies a snapshot of the GrGLFramebufferInfo struct into the passed - // in pointer and returns true. Otherwise returns false if the backend API is not GL. - bool getGLFramebufferInfo(GrGLFramebufferInfo*) const; -#endif - #ifdef SK_DAWN // If the backend API is Dawn, copies a snapshot of the GrDawnRenderTargetInfo struct into the // passed-in pointer and returns true. Otherwise returns false if the backend API is not Dawn. @@ -576,12 +544,22 @@ class SK_API GrBackendRenderTarget { // Returns true if the backend texture has been initialized. bool isValid() const { return fIsValid; } - #if GR_TEST_UTILS static bool TestingOnly_Equals(const GrBackendRenderTarget&, const GrBackendRenderTarget&); #endif private: + friend class GrBackendSurfacePriv; + // Used by internal factories. Should not be used externally. Use factories like + // GrBackendRenderTargets::MakeGL instead. + GrBackendRenderTarget(int width, + int height, + int sampleCnt, + int stencilBits, + GrBackendApi backend, + bool framebufferOnly, + std::unique_ptr data); + friend class GrVkGpu; // for getMutableState sk_sp getMutableState() const; @@ -615,11 +593,9 @@ class SK_API GrBackendRenderTarget { int fStencilBits; GrBackendApi fBackend; + std::unique_ptr fRTData; union { -#ifdef SK_GL - GrGLFramebufferInfo fGLInfo; -#endif #ifdef SK_VULKAN GrVkBackendSurfaceInfo fVkInfo; #endif @@ -635,6 +611,16 @@ class SK_API GrBackendRenderTarget { GrDawnRenderTargetInfo fDawnInfo; #endif sk_sp fMutableState; + +#if !defined(SK_DISABLE_LEGACY_GL_BACKEND_SURFACE) && defined(SK_GL) +public: + GrBackendRenderTarget(int width, + int height, + int sampleCnt, + int stencilBits, + const GrGLFramebufferInfo& glInfo); + bool getGLFramebufferInfo(GrGLFramebufferInfo*) const; +#endif }; #endif diff --git a/include/gpu/GrDirectContext.h b/include/gpu/GrDirectContext.h index 65287f93a05d..ee086063ca28 100644 --- a/include/gpu/GrDirectContext.h +++ b/include/gpu/GrDirectContext.h @@ -462,12 +462,14 @@ class SK_API GrDirectContext : public GrRecordingContext { * @param access type of access the call will do on the backend object after flush * @param info flush options */ - GrSemaphoresSubmitted flush(sk_sp surface, + GrSemaphoresSubmitted flush(SkSurface* surface, SkSurfaces::BackendSurfaceAccess access, const GrFlushInfo& info); - GrSemaphoresSubmitted flush(SkSurface* surface, +#if !defined(SK_DISABLE_LEGACY_GRDIRECTCONTEXT_FLUSH) + GrSemaphoresSubmitted flush(sk_sp surface, SkSurfaces::BackendSurfaceAccess access, const GrFlushInfo& info); +#endif /** * Same as above except: @@ -488,12 +490,15 @@ class SK_API GrDirectContext : public GrRecordingContext { * @param info flush options * @param newState optional state change request after flush */ - GrSemaphoresSubmitted flush(sk_sp surface, + GrSemaphoresSubmitted flush(SkSurface* surface, const GrFlushInfo& info, const skgpu::MutableTextureState* newState = nullptr); - GrSemaphoresSubmitted flush(SkSurface* surface, +#if !defined(SK_DISABLE_LEGACY_GRDIRECTCONTEXT_FLUSH) + // TODO(kjlubick) Remove this variant to be consistent with flushAndSubmit + GrSemaphoresSubmitted flush(sk_sp surface, const GrFlushInfo& info, const skgpu::MutableTextureState* newState = nullptr); +#endif /** Call to ensure all reads/writes of the surface have been issued to the underlying 3D API. * Skia will correctly order its own draws and pixel operations. This must to be used to ensure @@ -503,14 +508,22 @@ class SK_API GrDirectContext : public GrRecordingContext { * * Has no effect on a CPU-backed surface. */ + void flushAndSubmit(SkSurface* surface, bool syncCpu = false); +#if !defined(SK_DISABLE_LEGACY_GRDIRECTCONTEXT_FLUSH) + // TODO(kjlubick) remove this as it is error prone https://crbug.com/1475906 void flushAndSubmit(sk_sp surface, bool syncCpu = false); +#endif /** * Flushes the given surface with the default GrFlushInfo. * * Has no effect on a CPU-backed surface. */ + void flush(SkSurface* surface); +#if !defined(SK_DISABLE_LEGACY_GRDIRECTCONTEXT_FLUSH) + // TODO(kjlubick) Remove this variant to be consistent with flushAndSubmit void flush(sk_sp surface); +#endif /** * Submit outstanding work to the gpu from all previously un-submitted flushes. The return @@ -892,7 +905,7 @@ class SK_API GrDirectContext : public GrRecordingContext { GrGpuFinishedProc finishedProc = nullptr, GrGpuFinishedContext finishedContext = nullptr); - void deleteBackendTexture(GrBackendTexture); + void deleteBackendTexture(const GrBackendTexture&); // This interface allows clients to pre-compile shaders and populate the runtime program cache. // The key and data blobs should be the ones passed to the PersistentCache, in SkSL format. diff --git a/include/gpu/d3d/GrD3DTypes.h b/include/gpu/d3d/GrD3DTypes.h index b595422e8692..99cdb09213be 100644 --- a/include/gpu/d3d/GrD3DTypes.h +++ b/include/gpu/d3d/GrD3DTypes.h @@ -134,7 +134,7 @@ template class gr_cp { * The caller must assume ownership of the object, and manage its reference count directly. * No call to Release() will be made. */ - T* SK_WARN_UNUSED_RESULT release() { + [[nodiscard]] T* release() { T* obj = fObject; fObject = nullptr; return obj; diff --git a/include/gpu/ganesh/BUILD.bazel b/include/gpu/ganesh/BUILD.bazel index 60ffc30340c7..ba8a5a7774ff 100644 --- a/include/gpu/ganesh/BUILD.bazel +++ b/include/gpu/ganesh/BUILD.bazel @@ -1,4 +1,4 @@ -load("//bazel:macros.bzl", "exports_files_legacy", "skia_filegroup") +load("//bazel:macros.bzl", "exports_files_legacy", "select_multi", "skia_filegroup") licenses(["notice"]) @@ -9,7 +9,12 @@ skia_filegroup( srcs = [ "GrExternalTextureGenerator.h", "SkImageGanesh.h", + "SkMeshGanesh.h", "SkSurfaceGanesh.h", - ], + ] + select_multi( + { + "//src/gpu:gl_ganesh": ["//include/gpu/ganesh/gl:public_hdrs"], + }, + ), visibility = ["//include/gpu:__pkg__"], ) diff --git a/include/gpu/ganesh/SkImageGanesh.h b/include/gpu/ganesh/SkImageGanesh.h index 2770b12c0d69..646feef0b2fb 100644 --- a/include/gpu/ganesh/SkImageGanesh.h +++ b/include/gpu/ganesh/SkImageGanesh.h @@ -14,9 +14,6 @@ #include "include/gpu/GrTypes.h" #include "include/private/base/SkAPI.h" -// TODO(kjlubick) remove after chromium is migrated to include this directly -#include "include/private/chromium/SkImageChromium.h" // IWYU pragma: keep - #include #include diff --git a/include/gpu/ganesh/SkMeshGanesh.h b/include/gpu/ganesh/SkMeshGanesh.h new file mode 100644 index 000000000000..d05db8331ce6 --- /dev/null +++ b/include/gpu/ganesh/SkMeshGanesh.h @@ -0,0 +1,57 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef SkMeshGanesh_DEFINED +#define SkMeshGanesh_DEFINED + +#include "include/core/SkMesh.h" +#include "include/core/SkRefCnt.h" +#include "include/private/base/SkAPI.h" + +#include + +class GrDirectContext; + +namespace SkMeshes { +/** + * Makes a GPU-backed index buffer to be used with SkMeshes. + * + * @param GrDirectContext* If non-null, the data will be uploaded to the corresponding GPU and the + * returned buffer will only be compatible with surfaces using the same + * context. If null, the data will be uploaded to a CPU buffer. + * @param data The data used to populate the buffer, or nullptr to create a zero- + * initialized buffer. + * @param size Both the size of the data in 'data' and the size of the resulting + * buffer. + */ +SK_API sk_sp MakeIndexBuffer(GrDirectContext*, const void* data, size_t size); + +/** + * Makes a copy of an index buffer. The copy will be GPU backed if the context is non-null. + */ +SK_API sk_sp CopyIndexBuffer(GrDirectContext*, sk_sp); + +/** + * Makes a GPU-backed vertex buffer to be used with SkMeshes. + * + * @param GrDirectContext* If non-null, the data will be uploaded to the corresponding GPU and the + * returned buffer will only be compatible with surfaces using the same + * context. If null, the data will be uploaded to a CPU buffer. + * @param data The data used to populate the buffer, or nullptr to create a zero- + * initialized buffer. + * @param size Both the size of the data in 'data' and the size of the resulting + * buffer. + */ +SK_API sk_sp MakeVertexBuffer(GrDirectContext*, const void*, size_t size); + +/** + * Makes a copy of a vertex buffer. The copy will be GPU backed if the context is non-null. + */ +SK_API sk_sp CopyVertexBuffer(GrDirectContext*, sk_sp); +} // namespace SkMeshes + +#endif diff --git a/include/gpu/ganesh/gl/BUILD.bazel b/include/gpu/ganesh/gl/BUILD.bazel new file mode 100644 index 000000000000..df54415f70b0 --- /dev/null +++ b/include/gpu/ganesh/gl/BUILD.bazel @@ -0,0 +1,13 @@ +load("//bazel:macros.bzl", "exports_files_legacy", "skia_filegroup") + +licenses(["notice"]) + +exports_files_legacy() + +skia_filegroup( + name = "public_hdrs", + srcs = [ + "GrGLBackendSurface.h", + ], + visibility = ["//include/gpu/ganesh:__pkg__"], +) diff --git a/include/gpu/ganesh/gl/GrGLBackendSurface.h b/include/gpu/ganesh/gl/GrGLBackendSurface.h new file mode 100644 index 000000000000..2ed424d2ab6d --- /dev/null +++ b/include/gpu/ganesh/gl/GrGLBackendSurface.h @@ -0,0 +1,58 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef GrGLBackendSurface_DEFINED +#define GrGLBackendSurface_DEFINED + +#include "include/gpu/gl/GrGLTypes.h" +#include "include/private/base/SkAPI.h" + +#include + +class GrBackendFormat; +class GrBackendTexture; +class GrBackendRenderTarget; + +namespace skgpu { enum class Mipmapped : bool; } + +namespace GrBackendFormats { +SK_API GrBackendFormat MakeGL(GrGLenum format, GrGLenum target); + +SK_API GrGLFormat AsGLFormat(const GrBackendFormat&); +SK_API GrGLenum AsGLFormatEnum(const GrBackendFormat&); +} // namespace GrBackendFormats + +namespace GrBackendTextures { +// The GrGLTextureInfo must have a valid fFormat. +SK_API GrBackendTexture MakeGL(int width, + int height, + skgpu::Mipmapped, + const GrGLTextureInfo& glInfo, + std::string_view label = {}); + +// If the backend API is GL, copies a snapshot of the GrGLTextureInfo struct into the passed in +// pointer and returns true. Otherwise returns false if the backend API is not GL. +SK_API bool GetGLTextureInfo(const GrBackendTexture&, GrGLTextureInfo*); + +// Call this to indicate that the texture parameters have been modified in the GL context +// externally to GrContext. +SK_API void GLTextureParametersModified(GrBackendTexture*); +} // namespace GrBackendTextures + +namespace GrBackendRenderTargets { +// The GrGLTextureInfo must have a valid fFormat. If wrapping in an SkSurface we require the +// stencil bits to be either 0, 8 or 16. +SK_API GrBackendRenderTarget MakeGL(int width, + int height, + int sampleCnt, + int stencilBits, + const GrGLFramebufferInfo& glInfo); + +SK_API bool GetGLFramebufferInfo(const GrBackendRenderTarget&, GrGLFramebufferInfo*); +} // namespace GrBackendRenderTargets + +#endif diff --git a/include/gpu/graphite/BackendTexture.h b/include/gpu/graphite/BackendTexture.h index 64317bede05d..9f80a8c40f9c 100644 --- a/include/gpu/graphite/BackendTexture.h +++ b/include/gpu/graphite/BackendTexture.h @@ -111,7 +111,8 @@ class SK_API BackendTexture { #endif private: - sk_sp mutableState() const; + friend class VulkanResourceProvider; // for getMutableState + sk_sp getMutableState() const; SkISize fDimensions; TextureInfo fInfo; diff --git a/include/gpu/graphite/Context.h b/include/gpu/graphite/Context.h index 0fb6eee41868..ed5b39edd10c 100644 --- a/include/gpu/graphite/Context.h +++ b/include/gpu/graphite/Context.h @@ -19,6 +19,7 @@ #include #include +class SkColorSpace; class SkRuntimeEffect; namespace skgpu::graphite { @@ -53,17 +54,61 @@ class SK_API Context final { bool insertRecording(const InsertRecordingInfo&); bool submit(SyncToCpu = SyncToCpu::kNo); - void asyncReadPixels(const SkImage* image, - const SkColorInfo& dstColorInfo, - const SkIRect& srcRect, - SkImage::ReadPixelsCallback callback, - SkImage::ReadPixelsContext context); - - void asyncReadPixels(const SkSurface* surface, - const SkColorInfo& dstColorInfo, - const SkIRect& srcRect, - SkImage::ReadPixelsCallback callback, - SkImage::ReadPixelsContext context); + void asyncRescaleAndReadPixels(const SkImage* image, + const SkImageInfo& dstImageInfo, + const SkIRect& srcRect, + SkImage::RescaleGamma rescaleGamma, + SkImage::RescaleMode rescaleMode, + SkImage::ReadPixelsCallback callback, + SkImage::ReadPixelsContext context); + + void asyncRescaleAndReadPixels(const SkSurface* surface, + const SkImageInfo& dstImageInfo, + const SkIRect& srcRect, + SkImage::RescaleGamma rescaleGamma, + SkImage::RescaleMode rescaleMode, + SkImage::ReadPixelsCallback callback, + SkImage::ReadPixelsContext context); + + void asyncRescaleAndReadPixelsYUV420(const SkImage*, + SkYUVColorSpace yuvColorSpace, + sk_sp dstColorSpace, + const SkIRect& srcRect, + const SkISize& dstSize, + SkImage::RescaleGamma rescaleGamma, + SkImage::RescaleMode rescaleMode, + SkImage::ReadPixelsCallback callback, + SkImage::ReadPixelsContext context); + + void asyncRescaleAndReadPixelsYUV420(const SkSurface*, + SkYUVColorSpace yuvColorSpace, + sk_sp dstColorSpace, + const SkIRect& srcRect, + const SkISize& dstSize, + SkImage::RescaleGamma rescaleGamma, + SkImage::RescaleMode rescaleMode, + SkImage::ReadPixelsCallback callback, + SkImage::ReadPixelsContext context); + + void asyncRescaleAndReadPixelsYUVA420(const SkImage*, + SkYUVColorSpace yuvColorSpace, + sk_sp dstColorSpace, + const SkIRect& srcRect, + const SkISize& dstSize, + SkImage::RescaleGamma rescaleGamma, + SkImage::RescaleMode rescaleMode, + SkImage::ReadPixelsCallback callback, + SkImage::ReadPixelsContext context); + + void asyncRescaleAndReadPixelsYUVA420(const SkSurface*, + SkYUVColorSpace yuvColorSpace, + sk_sp dstColorSpace, + const SkIRect& srcRect, + const SkISize& dstSize, + SkImage::RescaleGamma rescaleGamma, + SkImage::RescaleMode rescaleMode, + SkImage::ReadPixelsCallback callback, + SkImage::ReadPixelsContext context); /** * Checks whether any asynchronous work is complete and if so calls related callbacks. @@ -117,6 +162,17 @@ class SK_API Context final { // require Context::Make() to return a nullptr. bool finishInitialization(); + void asyncRescaleAndReadPixelsYUV420Impl(const SkImage*, + SkYUVColorSpace yuvColorSpace, + bool readAlpha, + sk_sp dstColorSpace, + const SkIRect& srcRect, + const SkISize& dstSize, + SkImage::RescaleGamma rescaleGamma, + SkImage::RescaleMode rescaleMode, + SkImage::ReadPixelsCallback callback, + SkImage::ReadPixelsContext context); + void asyncReadPixels(const TextureProxy* textureProxy, const SkImageInfo& srcImageInfo, const SkColorInfo& dstColorInfo, @@ -124,6 +180,14 @@ class SK_API Context final { SkImage::ReadPixelsCallback callback, SkImage::ReadPixelsContext context); + void asyncReadPixelsYUV420(Recorder*, + const SkImage*, + SkYUVColorSpace yuvColorSpace, + bool readAlpha, + const SkIRect& srcRect, + SkImage::ReadPixelsCallback callback, + SkImage::ReadPixelsContext context); + // Inserts a texture to buffer transfer task, used by asyncReadPixels methods struct PixelTransferResult { using ConversionFn = void(void* dst, const void* mappedBuffer); diff --git a/include/gpu/graphite/ContextOptions.h b/include/gpu/graphite/ContextOptions.h index b9ac1b09d161..b9fbfe8fc806 100644 --- a/include/gpu/graphite/ContextOptions.h +++ b/include/gpu/graphite/ContextOptions.h @@ -9,6 +9,7 @@ #define skgpu_graphite_ContextOptions_DEFINED #include "include/private/base/SkAPI.h" +#include "include/private/base/SkMath.h" namespace skgpu { class ShaderErrorHandler; } @@ -30,6 +31,14 @@ struct SK_API ContextOptions { */ skgpu::ShaderErrorHandler* fShaderErrorHandler = nullptr; + /** + * Specifies the number of samples Graphite should use when performing internal draws with MSAA + * (hardware capabilities permitting). + * + * If <= 1, Graphite will disable internal code paths that use multisampling. + */ + int fInternalMultisampleCount = 4; + /** * Will the client make sure to only ever be executing one thread that uses the Context and all * derived classes (e.g. Recorders, Recordings, etc.) at a time. If so we can possibly make some @@ -71,6 +80,8 @@ struct SK_API ContextOptions { * Private options that are only meant for testing within Skia's tools. */ + int fMaxTextureSizeOverride = SK_MaxS32; + /** * Maximum width and height of internal texture atlases. */ diff --git a/include/gpu/graphite/GraphiteTypes.h b/include/gpu/graphite/GraphiteTypes.h index 231f2a5e1454..ea8910e049f2 100644 --- a/include/gpu/graphite/GraphiteTypes.h +++ b/include/gpu/graphite/GraphiteTypes.h @@ -16,8 +16,13 @@ class SkSurface; +namespace skgpu { +class MutableTextureState; +} + namespace skgpu::graphite { +class BackendSemaphore; class Recording; class Task; @@ -38,12 +43,30 @@ using GpuFinishedProc = void (*)(GpuFinishedContext finishedContext, CallbackRes * TextureInfo must match the info provided to the Recorder when making the deferred canvas. * * fTargetTranslation is an additional translation applied to draws targeting fTargetSurface. + * + * The client may pass in two arrays of initialized BackendSemaphores to be included in the + * command stream. At some time before issuing commands in the Recording, the fWaitSemaphores will + * be waited on by the gpu. Similarly, at some time after issuing the Recording's commands, the + * fSignalSemaphores will be signaled by the gpu. Depending on the platform, the timing of the wait + * and signal operations will either be immediately before or after the given Recording's command + * stream, respectively, or before and after the entire CommandBuffer's command stream. The + * semaphores are not sent to the GPU until the next Context::submit call is made. + * + * The client will own and be responsible for deleting the underlying semaphore objects after the + * submission completes, however the BackendSemaphore objects themselves can be deleted as soon + * as this function returns. */ struct InsertRecordingInfo { Recording* fRecording = nullptr; SkSurface* fTargetSurface = nullptr; SkIVector fTargetTranslation = {0, 0}; + MutableTextureState* fTargetTextureState = nullptr; + + size_t fNumWaitSemaphores = 0; + BackendSemaphore* fWaitSemaphores = nullptr; + size_t fNumSignalSemaphores = 0; + BackendSemaphore* fSignalSemaphores = nullptr; GpuFinishedContext fFinishedContext = nullptr; GpuFinishedProc fFinishedProc = nullptr; diff --git a/include/gpu/graphite/Recorder.h b/include/gpu/graphite/Recorder.h index 6e911a4e72c7..b5d0be754d55 100644 --- a/include/gpu/graphite/Recorder.h +++ b/include/gpu/graphite/Recorder.h @@ -33,7 +33,7 @@ class TextBlobRedrawCoordinator; namespace skgpu::graphite { -class AtlasManager; +class AtlasProvider; class BackendTexture; class Caps; class Context; @@ -185,7 +185,7 @@ class SK_API Recorder final { std::vector fTrackedDevices; uint32_t fRecorderID; // Needed for MessageBox handling for text - std::unique_ptr fAtlasManager; + std::unique_ptr fAtlasProvider; std::unique_ptr fTokenTracker; std::unique_ptr fStrikeCache; std::unique_ptr fTextBlobCache; diff --git a/include/gpu/graphite/Recording.h b/include/gpu/graphite/Recording.h index 5aa48ec2a304..6dabc5138f34 100644 --- a/include/gpu/graphite/Recording.h +++ b/include/gpu/graphite/Recording.h @@ -36,10 +36,6 @@ class SK_API Recording final { RecordingPriv priv(); -#if GRAPHITE_TEST_UTILS - bool isTargetProxyInstantiated() const; -#endif - private: friend class Recorder; // for ctor and LazyProxyData friend class RecordingPriv; diff --git a/include/gpu/graphite/TextureInfo.h b/include/gpu/graphite/TextureInfo.h index f8be8143a290..91d9d9c7dd33 100644 --- a/include/gpu/graphite/TextureInfo.h +++ b/include/gpu/graphite/TextureInfo.h @@ -23,6 +23,8 @@ #include "include/private/gpu/graphite/VulkanGraphiteTypesPriv.h" #endif +struct SkISize; + namespace skgpu::graphite { class SK_API TextureInfo { @@ -100,9 +102,14 @@ class SK_API TextureInfo { } #endif + bool isCompatible(const TextureInfo& that) const; SkString toString() const; private: + friend size_t ComputeSize(SkISize dimensions, const TextureInfo&); // for bytesPerPixel + + size_t bytesPerPixel() const; + #ifdef SK_DAWN friend class DawnCaps; friend class DawnCommandBuffer; diff --git a/include/ports/BUILD.bazel b/include/ports/BUILD.bazel index ef6a83dbb1f9..acb5981203e2 100644 --- a/include/ports/BUILD.bazel +++ b/include/ports/BUILD.bazel @@ -4,19 +4,49 @@ licenses(["notice"]) exports_files_legacy() +skia_filegroup( + name = "android_fontmgr_hdrs", + srcs = ["SkFontMgr_android.h"], +) + +skia_filegroup( + name = "directory_fontmgr_hdrs", + srcs = ["SkFontMgr_directory.h"], +) + +skia_filegroup( + name = "embedded_fontmgr_hdrs", + srcs = ["SkFontMgr_data.h"], +) + +skia_filegroup( + name = "empty_fontmgr_hdrs", + srcs = ["SkFontMgr_empty.h"], +) + +skia_filegroup( + name = "fontconfig_fontmgr_hdrs", + srcs = ["SkFontMgr_fontconfig.h"], +) + +skia_filegroup( + name = "fci_fontmgr_hdrs", + srcs = [ + "SkFontConfigInterface.h", + "SkFontMgr_FontConfigInterface.h", + ], +) + skia_filegroup( name = "fontmgr", srcs = select_multi( { - "//bazel/common_config_settings:uses_android_fontmgr": ["SkFontMgr_android.h"], - "//bazel/common_config_settings:uses_custom_directory_fontmgr": ["SkFontMgr_directory.h"], - "//bazel/common_config_settings:uses_custom_embedded_fontmgr": ["SkFontMgr_data.h"], - "//bazel/common_config_settings:uses_custom_empty_fontmgr": ["SkFontMgr_empty.h"], - "//bazel/common_config_settings:uses_fontconfig_fontmgr": ["SkFontMgr_fontconfig.h"], - "//bazel/common_config_settings:uses_fci_fontmgr": [ - "SkFontConfigInterface.h", - "SkFontMgr_FontConfigInterface.h", - ], + "//bazel/common_config_settings:uses_android_fontmgr": [":android_fontmgr_hdrs"], + "//bazel/common_config_settings:uses_custom_directory_fontmgr": [":directory_fontmgr_hdrs"], + "//bazel/common_config_settings:uses_custom_embedded_fontmgr": [":embedded_fontmgr_hdrs"], + "//bazel/common_config_settings:uses_custom_empty_fontmgr": [":empty_fontmgr_hdrs"], + "//bazel/common_config_settings:uses_fontconfig_fontmgr": [":fontconfig_fontmgr_hdrs"], + "//bazel/common_config_settings:uses_fci_fontmgr": [":fci_fontmgr_hdrs"], # TODO(kjlubick, bungeman) fuchsia_fontmgr, fontmgr_mac_ct, fontmgr_win }, ), diff --git a/include/ports/SkCFObject.h b/include/ports/SkCFObject.h index 20e86671b790..4e56d06d06c6 100644 --- a/include/ports/SkCFObject.h +++ b/include/ports/SkCFObject.h @@ -130,7 +130,7 @@ template class sk_cfp { * The caller must assume ownership of the object, and manage its reference count directly. * No call to CFRelease() will be made. */ - T SK_WARN_UNUSED_RESULT release() { + [[nodiscard]] T release() { T obj = fObject; fObject = nil; return obj; diff --git a/include/private/BUILD.bazel b/include/private/BUILD.bazel index 6bff98062930..86aae30ed9cd 100644 --- a/include/private/BUILD.bazel +++ b/include/private/BUILD.bazel @@ -2,10 +2,7 @@ load("//bazel:skia_rules.bzl", "exports_files_legacy", "skia_filegroup") licenses(["notice"]) -exports_files_legacy( - label_list = ["SkBitmaskEnum.h"], - visibility = ["//tools/skui:__pkg__"], -) +exports_files_legacy() # In own skia_filegroup for mapping to the //gn/sksl.gni file. skia_filegroup( @@ -19,7 +16,6 @@ skia_filegroup( skia_filegroup( name = "private_hdrs", srcs = [ - "SkBitmaskEnum.h", "SkColorData.h", "SkEncodedInfo.h", "SkGainmapInfo.h", @@ -34,7 +30,7 @@ skia_filegroup( "//include/private/base:private_hdrs", "//include/private/chromium:private_hdrs", ] + select({ - "//src/gpu:has_gpu_backend": [ + "//src/gpu:has_ganesh_backend": [ "//include/private/gpu:private_hdrs", ], "//conditions:default": [], diff --git a/include/private/SkSLDefines.h b/include/private/SkSLDefines.h index 058b231b138a..61f9eddf281c 100644 --- a/include/private/SkSLDefines.h +++ b/include/private/SkSLDefines.h @@ -44,9 +44,7 @@ static constexpr int kDefaultInlineThreshold = 50; // amounts of time or space. static constexpr int kVariableSlotLimit = 100000; -// The SwizzleComponent namespace is used both by the SkSL::Swizzle expression, and the DSL swizzle. -// This namespace is injected into SkSL::dsl so that `using namespace SkSL::dsl` enables DSL code -// like `Swizzle(var, X, Y, ONE)` to compile without any extra qualifications. +// The SwizzleComponent namespace is used by the SkSL::Swizzle expression. namespace SwizzleComponent { enum Type : int8_t { diff --git a/include/private/SkWeakRefCnt.h b/include/private/SkWeakRefCnt.h index 058a18652ba5..4f949a484347 100644 --- a/include/private/SkWeakRefCnt.h +++ b/include/private/SkWeakRefCnt.h @@ -100,7 +100,7 @@ class SK_API SkWeakRefCnt : public SkRefCnt { returns false, no strong reference could be created and the owner's reference is in the same state as before the call. */ - bool SK_WARN_UNUSED_RESULT try_ref() const { + [[nodiscard]] bool try_ref() const { if (atomic_conditional_acquire_strong_ref() != 0) { // Acquire barrier (L/SL), if not provided above. // Prevents subsequent code from happening before the increment. diff --git a/include/private/base/BUILD.bazel b/include/private/base/BUILD.bazel index 673d1f3d7f0e..84b26afc1904 100644 --- a/include/private/base/BUILD.bazel +++ b/include/private/base/BUILD.bazel @@ -30,7 +30,6 @@ IWYU_HDRS = [ "SkMutex.h", "SkNoncopyable.h", "SkOnce.h", - "SkPathEnums.h", "SkPoint_impl.h", "SkSafe32.h", "SkSpan_impl.h", diff --git a/include/private/base/SkAssert.h b/include/private/base/SkAssert.h index 97d43d4f64ff..10396e52dd45 100644 --- a/include/private/base/SkAssert.h +++ b/include/private/base/SkAssert.h @@ -9,8 +9,25 @@ #define SkAssert_DEFINED #include "include/private/base/SkAPI.h" +#include "include/private/base/SkAttributes.h" #include "include/private/base/SkDebug.h" // IWYU pragma: keep +#include +#include + +#if defined(__clang__) && defined(__has_attribute) + #if __has_attribute(likely) + #define SK_LIKELY [[likely]] + #define SK_UNLIKELY [[unlikely]] + #else + #define SK_LIKELY + #define SK_UNLIKELY + #endif +#else + #define SK_LIKELY + #define SK_UNLIKELY +#endif + /** Called internally if we hit an unrecoverable error. The platform implementation must not return, but should either throw an exception or otherwise exit. @@ -43,7 +60,7 @@ } while (false) #endif -// SkASSERT, SkASSERTF and SkASSERT_RELEASE can be used as stand alone assertion expressions, e.g. +// SkASSERT, SkASSERTF and SkASSERT_RELEASE can be used as standalone assertion expressions, e.g. // uint32_t foo(int x) { // SkASSERT(x > 4); // return x - 4; @@ -53,8 +70,15 @@ // return SkASSERT(x > 4), // x - 4; // } +#if defined(__clang__) +#define SkASSERT_RELEASE(cond) \ + static_cast( __builtin_expect(static_cast(cond), 1) \ + ? static_cast(0) \ + : []{ SK_ABORT("check(%s)", #cond); }() ) +#else #define SkASSERT_RELEASE(cond) \ - static_cast( (cond) ? (void)0 : []{ SK_ABORT("assert(%s)", #cond); }() ) + static_cast( (cond) ? static_cast(0) : []{ SK_ABORT("check(%s)", #cond); }() ) +#endif #if defined(SK_DEBUG) #define SkASSERT(cond) SkASSERT_RELEASE(cond) @@ -72,7 +96,7 @@ #define SkDEBUGFAILF(fmt, ...) // unlike SkASSERT, this macro executes its condition in the non-debug build. - // The if is present so that this can be used with functions marked SK_WARN_UNUSED_RESULT. + // The if is present so that this can be used with functions marked [[nodiscard]]. #define SkAssertResult(cond) if (cond) {} do {} while(false) #endif @@ -89,4 +113,67 @@ # endif #endif -#endif +[[noreturn]] SK_API inline void sk_print_index_out_of_bounds(size_t i, size_t size) { + SK_ABORT("Index (%zu) out of bounds for size %zu.\n", i, size); +} + +template SK_API inline T sk_collection_check_bounds(T i, T size) { + if (0 <= i && i < size) SK_LIKELY { + return i; + } + + SK_UNLIKELY { + #if defined(SK_DEBUG) + sk_print_index_out_of_bounds(static_cast(i), static_cast(size)); + #else + SkUNREACHABLE; + #endif + } +} + +[[noreturn]] SK_API inline void sk_print_length_too_big(size_t i, size_t size) { + SK_ABORT("Length (%zu) is too big for size %zu.\n", i, size); +} + +template SK_API inline T sk_collection_check_length(T i, T size) { + if (0 <= i && i <= size) SK_LIKELY { + return i; + } + + SK_UNLIKELY { + #if defined(SK_DEBUG) + sk_print_length_too_big(static_cast(i), static_cast(size)); + #else + SkUNREACHABLE; + #endif + } +} + +SK_API inline void sk_collection_not_empty(bool empty) { + if (empty) SK_UNLIKELY { + #if defined(SK_DEBUG) + SK_ABORT("Collection is empty.\n"); + #else + SkUNREACHABLE; + #endif + } +} + +[[noreturn]] SK_API inline void sk_print_size_too_big(size_t size, size_t maxSize) { + SK_ABORT("Size (%zu) can't be represented in bytes. Max size is %zu.\n", size, maxSize); +} + +template +SK_ALWAYS_INLINE size_t check_size_bytes_too_big(size_t size) { + const size_t kMaxSize = std::numeric_limits::max() / sizeof(T); + if (size > kMaxSize) { + #if defined(SK_DEBUG) + sk_print_size_too_big(size, kMaxSize); + #else + SkUNREACHABLE; + #endif + } + return size; +} + +#endif // SkAssert_DEFINED diff --git a/include/private/base/SkAttributes.h b/include/private/base/SkAttributes.h index 34fdf0e09c92..f8df5905cde1 100644 --- a/include/private/base/SkAttributes.h +++ b/include/private/base/SkAttributes.h @@ -17,18 +17,6 @@ # define SK_ATTRIBUTE(attr) #endif -#if !defined(SK_UNUSED) -# if !defined(__clang__) && defined(_MSC_VER) -# define SK_UNUSED __pragma(warning(suppress:4189)) -# else -# define SK_UNUSED SK_ATTRIBUTE(unused) -# endif -#endif - -#if !defined(SK_WARN_UNUSED_RESULT) - #define SK_WARN_UNUSED_RESULT SK_ATTRIBUTE(warn_unused_result) -#endif - /** * If your judgment is better than the compiler's (i.e. you've profiled it), * you can use SK_ALWAYS_INLINE to force inlining. E.g. diff --git a/include/private/base/SkFeatures.h b/include/private/base/SkFeatures.h index 1c8aa4c0afca..862ce4042da5 100644 --- a/include/private/base/SkFeatures.h +++ b/include/private/base/SkFeatures.h @@ -36,9 +36,6 @@ #if !defined(SK_RESTRICT) #define SK_RESTRICT __restrict #endif - #if !defined(SK_WARN_UNUSED_RESULT) - #define SK_WARN_UNUSED_RESULT - #endif #endif #if !defined(SK_RESTRICT) diff --git a/include/private/base/SkFloatingPoint.h b/include/private/base/SkFloatingPoint.h index 0f29ba7405be..425fbc8f39a2 100644 --- a/include/private/base/SkFloatingPoint.h +++ b/include/private/base/SkFloatingPoint.h @@ -12,52 +12,42 @@ #include "include/private/base/SkFloatBits.h" #include "include/private/base/SkMath.h" -#include #include #include #include - -constexpr float SK_FloatSqrt2 = 1.41421356f; -constexpr float SK_FloatPI = 3.14159265f; -constexpr double SK_DoublePI = 3.14159265358979323846264338327950288; - -// C++98 cmath std::pow seems to be the earliest portable way to get float pow. -// However, on Linux including cmath undefines isfinite. -// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14608 -static inline float sk_float_pow(float base, float exp) { - return powf(base, exp); -} - -#define sk_float_sqrt(x) sqrtf(x) -#define sk_float_sin(x) sinf(x) -#define sk_float_cos(x) cosf(x) -#define sk_float_tan(x) tanf(x) -#define sk_float_floor(x) floorf(x) -#define sk_float_ceil(x) ceilf(x) -#define sk_float_trunc(x) truncf(x) -#ifdef SK_BUILD_FOR_MAC -# define sk_float_acos(x) static_cast(acos(x)) -# define sk_float_asin(x) static_cast(asin(x)) -#else -# define sk_float_acos(x) acosf(x) -# define sk_float_asin(x) asinf(x) -#endif -#define sk_float_atan2(y,x) atan2f(y,x) -#define sk_float_abs(x) fabsf(x) -#define sk_float_copysign(x, y) copysignf(x, y) -#define sk_float_mod(x,y) fmodf(x,y) -#define sk_float_exp(x) expf(x) -#define sk_float_log(x) logf(x) - -constexpr int sk_float_sgn(float x) { +#include + +inline constexpr float SK_FloatSqrt2 = 1.41421356f; +inline constexpr float SK_FloatPI = 3.14159265f; +inline constexpr double SK_DoublePI = 3.14159265358979323846264338327950288; + +static inline float sk_float_sqrt(float x) { return std::sqrt(x); } +static inline float sk_float_sin(float x) { return std::sin(x); } +static inline float sk_float_cos(float x) { return std::cos(x); } +static inline float sk_float_tan(float x) { return std::tan(x); } +static inline float sk_float_floor(float x) { return std::floor(x); } +static inline float sk_float_ceil(float x) { return std::ceil(x); } +static inline float sk_float_trunc(float x) { return std::trunc(x); } +static inline float sk_float_acos(float x) { return std::acos(x); } +static inline float sk_float_asin(float x) { return std::asin(x); } +static inline float sk_float_atan2(float y, float x) { return std::atan2(y,x); } +static inline float sk_float_abs(float x) { return std::fabs(x); } +static inline float sk_float_copysign(float x, float y) { return std::copysign(x, y); } +static inline float sk_float_mod(float x, float y) { return std::fmod(x,y); } +static inline float sk_float_pow(float x, float y) { return std::pow(x, y); } +static inline float sk_float_exp(float x) { return std::exp(x); } +static inline float sk_float_log(float x) { return std::log(x); } +static inline float sk_float_log2(float x) { return std::log2(x); } + +static constexpr int sk_float_sgn(float x) { return (0.0f < x) - (x < 0.0f); } -constexpr float sk_float_degrees_to_radians(float degrees) { +static constexpr float sk_float_degrees_to_radians(float degrees) { return degrees * (SK_FloatPI / 180); } -constexpr float sk_float_radians_to_degrees(float radians) { +static constexpr float sk_float_radians_to_degrees(float radians) { return radians * (180 / SK_FloatPI); } @@ -66,16 +56,6 @@ constexpr float sk_float_radians_to_degrees(float radians) { // as floatf(x + .5f), they would be 1 higher than expected. #define sk_float_round(x) (float)sk_double_round((double)(x)) -// can't find log2f on android, but maybe that just a tool bug? -#ifdef SK_BUILD_FOR_ANDROID - static inline float sk_float_log2(float x) { - const double inv_ln_2 = 1.44269504088896; - return (float)(log(x) * inv_ln_2); - } -#else - #define sk_float_log2(x) log2f(x) -#endif - static inline bool sk_float_isfinite(float x) { return SkFloatBits_IsFinite(SkFloat2Bits(x)); } @@ -97,22 +77,20 @@ static inline bool sk_float_isinf(float x) { return SkFloatBits_IsInf(SkFloat2Bits(x)); } -static inline bool sk_float_isnan(float x) { - return !(x == x); -} - -#define sk_double_isnan(a) sk_float_isnan(a) +static constexpr bool sk_float_isnan(float x) { return x != x; } +static constexpr bool sk_double_isnan(double x) { return x != x; } -#define SK_MaxS32FitsInFloat 2147483520 -#define SK_MinS32FitsInFloat -SK_MaxS32FitsInFloat +inline constexpr int SK_MaxS32FitsInFloat = 2147483520; +inline constexpr int SK_MinS32FitsInFloat = -SK_MaxS32FitsInFloat; -#define SK_MaxS64FitsInFloat (SK_MaxS64 >> (63-24) << (63-24)) // 0x7fffff8000000000 -#define SK_MinS64FitsInFloat -SK_MaxS64FitsInFloat +// 0x7fffff8000000000 +inline constexpr int64_t SK_MaxS64FitsInFloat = SK_MaxS64 >> (63-24) << (63-24); +inline constexpr int64_t SK_MinS64FitsInFloat = -SK_MaxS64FitsInFloat; /** * Return the closest int for the given float. Returns SK_MaxS32FitsInFloat for NaN. */ -static inline int sk_float_saturate2int(float x) { +static constexpr int sk_float_saturate2int(float x) { x = x < SK_MaxS32FitsInFloat ? x : SK_MaxS32FitsInFloat; x = x > SK_MinS32FitsInFloat ? x : SK_MinS32FitsInFloat; return (int)x; @@ -121,7 +99,7 @@ static inline int sk_float_saturate2int(float x) { /** * Return the closest int for the given double. Returns SK_MaxS32 for NaN. */ -static inline int sk_double_saturate2int(double x) { +static constexpr int sk_double_saturate2int(double x) { x = x < SK_MaxS32 ? x : SK_MaxS32; x = x > SK_MinS32 ? x : SK_MinS32; return (int)x; @@ -130,7 +108,7 @@ static inline int sk_double_saturate2int(double x) { /** * Return the closest int64_t for the given float. Returns SK_MaxS64FitsInFloat for NaN. */ -static inline int64_t sk_float_saturate2int64(float x) { +static constexpr int64_t sk_float_saturate2int64(float x) { x = x < SK_MaxS64FitsInFloat ? x : SK_MaxS64FitsInFloat; x = x > SK_MinS64FitsInFloat ? x : SK_MinS64FitsInFloat; return (int64_t)x; @@ -155,72 +133,47 @@ static inline int64_t sk_float_saturate2int64(float x) { // Clang thinks this is undefined, but it's actually implementation defined to return either // the largest float or infinity (one of the two bracketing representable floats). Good enough! SK_NO_SANITIZE("float-cast-overflow") -static inline float sk_double_to_float(double x) { +static constexpr float sk_double_to_float(double x) { return static_cast(x); } -#define SK_FloatNaN std::numeric_limits::quiet_NaN() -#define SK_FloatInfinity (+std::numeric_limits::infinity()) -#define SK_FloatNegativeInfinity (-std::numeric_limits::infinity()) +inline constexpr float SK_FloatNaN = std::numeric_limits::quiet_NaN(); +inline constexpr float SK_FloatInfinity = std::numeric_limits::infinity(); +inline constexpr float SK_FloatNegativeInfinity = -SK_FloatInfinity; -#define SK_DoubleNaN std::numeric_limits::quiet_NaN() +inline constexpr double SK_DoubleNaN = std::numeric_limits::quiet_NaN(); -// Returns false if any of the floats are outside of [0...1] -// Returns true if count is 0 +// Calculate the midpoint between a and b. Similar to std::midpoint in c++20. +static constexpr float sk_float_midpoint(float a, float b) { + // Use double math to avoid underflow and overflow. + return static_cast(0.5 * (static_cast(a) + b)); +} + +// Returns false if any of the floats are outside the range [0...1]. +// Returns true if count is 0. bool sk_floats_are_unit(const float array[], size_t count); static inline float sk_float_rsqrt_portable(float x) { return 1.0f / sk_float_sqrt(x); } static inline float sk_float_rsqrt (float x) { return 1.0f / sk_float_sqrt(x); } -// Returns the log2 of the provided value, were that value to be rounded up to the next power of 2. -// Returns 0 if value <= 0: -// Never returns a negative number, even if value is NaN. -// -// sk_float_nextlog2((-inf..1]) -> 0 -// sk_float_nextlog2((1..2]) -> 1 -// sk_float_nextlog2((2..4]) -> 2 -// sk_float_nextlog2((4..8]) -> 3 -// ... -static inline int sk_float_nextlog2(float x) { - uint32_t bits = (uint32_t)SkFloat2Bits(x); - bits += (1u << 23) - 1u; // Increment the exponent for non-powers-of-2. - int exp = ((int32_t)bits >> 23) - 127; - return exp & ~(exp >> 31); // Return 0 for negative or denormalized floats, and exponents < 0. -} - -// This is the number of significant digits we can print in a string such that when we read that -// string back we get the floating point number we expect. The minimum value C requires is 6, but -// most compilers support 9 -#ifdef FLT_DECIMAL_DIG -#define SK_FLT_DECIMAL_DIG FLT_DECIMAL_DIG -#else -#define SK_FLT_DECIMAL_DIG 9 -#endif +// The number of significant digits to print. +inline constexpr int SK_FLT_DECIMAL_DIG = std::numeric_limits::max_digits10; -// IEEE defines how float divide behaves for non-finite values and zero-denoms, but C does not +// IEEE defines how float divide behaves for non-finite values and zero-denoms, but C does not, // so we have a helper that suppresses the possible undefined-behavior warnings. - SK_NO_SANITIZE("float-divide-by-zero") -static inline float sk_ieee_float_divide(float numer, float denom) { +static constexpr float sk_ieee_float_divide(float numer, float denom) { return numer / denom; } SK_NO_SANITIZE("float-divide-by-zero") -static inline double sk_ieee_double_divide(double numer, double denom) { +static constexpr double sk_ieee_double_divide(double numer, double denom) { return numer / denom; } -// While we clean up divide by zero, we'll replace places that do divide by zero with this TODO. -static inline float sk_ieee_float_divide_TODO_IS_DIVIDE_BY_ZERO_SAFE_HERE(float n, float d) { - return sk_ieee_float_divide(n,d); -} - -static inline float sk_fmaf(float f, float m, float a) { -#if defined(FP_FAST_FMA) - return std::fmaf(f,m,a); -#else - return f*m+a; -#endif +// Return a*b + c. +static inline float sk_fmaf(float a, float b, float c) { + return std::fma(a, b, c); } // Returns true iff the provided number is within a small epsilon of 0. diff --git a/include/private/base/SkSpan_impl.h b/include/private/base/SkSpan_impl.h index 4618e4f88b49..09b2a754e9f2 100644 --- a/include/private/base/SkSpan_impl.h +++ b/include/private/base/SkSpan_impl.h @@ -9,6 +9,7 @@ #define SkSpan_DEFINED #include "include/private/base/SkAssert.h" +#include "include/private/base/SkDebug.h" #include "include/private/base/SkTo.h" #include @@ -82,11 +83,10 @@ class SkSpan { constexpr SkSpan& operator=(const SkSpan& that) = default; constexpr T& operator [] (size_t i) const { - SkASSERT(i < this->size()); - return fPtr[i]; + return fPtr[sk_collection_check_bounds(i, this->size())]; } - constexpr T& front() const { return fPtr[0]; } - constexpr T& back() const { return fPtr[fSize - 1]; } + constexpr T& front() const { sk_collection_not_empty(this->empty()); return fPtr[0]; } + constexpr T& back() const { sk_collection_not_empty(this->empty()); return fPtr[fSize - 1]; } constexpr T* begin() const { return fPtr; } constexpr T* end() const { return fPtr + fSize; } constexpr auto rbegin() const { return std::make_reverse_iterator(this->end()); } @@ -96,24 +96,30 @@ class SkSpan { constexpr bool empty() const { return fSize == 0; } constexpr size_t size_bytes() const { return fSize * sizeof(T); } constexpr SkSpan first(size_t prefixLen) const { - SkASSERT(prefixLen <= this->size()); - return SkSpan{fPtr, prefixLen}; + return SkSpan{fPtr, sk_collection_check_length(prefixLen, fSize)}; } constexpr SkSpan last(size_t postfixLen) const { - SkASSERT(postfixLen <= this->size()); - return SkSpan{fPtr + (this->size() - postfixLen), postfixLen}; + return SkSpan{fPtr + (this->size() - postfixLen), + sk_collection_check_length(postfixLen, fSize)}; } constexpr SkSpan subspan(size_t offset) const { return this->subspan(offset, this->size() - offset); } constexpr SkSpan subspan(size_t offset, size_t count) const { - SkASSERT(offset <= this->size()); - SkASSERT(count <= this->size() - offset); - return SkSpan{fPtr + offset, count}; + const size_t safeOffset = sk_collection_check_length(offset, fSize); + + // Should read offset + count > size(), but that could overflow. We know that safeOffset + // is <= size, therefore the subtraction will not overflow. + if (count > this->size() - safeOffset) SK_UNLIKELY { + // The count is too large. + SkUNREACHABLE; + } + return SkSpan{fPtr + safeOffset, count}; } private: - static const constexpr size_t kMaxSize = std::numeric_limits::max() / sizeof(T); + static constexpr size_t kMaxSize = std::numeric_limits::max() / sizeof(T); + T* fPtr; size_t fSize; }; diff --git a/include/private/base/SkTArray.h b/include/private/base/SkTArray.h index a15151d787f7..083a4eb73943 100644 --- a/include/private/base/SkTArray.h +++ b/include/private/base/SkTArray.h @@ -12,6 +12,7 @@ #include "include/private/base/SkAssert.h" #include "include/private/base/SkAttributes.h" #include "include/private/base/SkContainers.h" +#include "include/private/base/SkDebug.h" #include "include/private/base/SkMalloc.h" #include "include/private/base/SkMath.h" #include "include/private/base/SkSpan_impl.h" @@ -277,7 +278,7 @@ template > class TA * Removes the last element. Not safe to call when size() == 0. */ void pop_back() { - SkASSERT(fSize > 0); + sk_collection_not_empty(this->empty()); --fSize; fData[fSize].~T(); } @@ -386,15 +387,11 @@ template > class TA * Get the i^th element. */ T& operator[] (int i) { - SkASSERT(i < this->size()); - SkASSERT(i >= 0); - return fData[i]; + return fData[sk_collection_check_bounds(i, this->size())]; } const T& operator[] (int i) const { - SkASSERT(i < this->size()); - SkASSERT(i >= 0); - return fData[i]; + return fData[sk_collection_check_bounds(i, this->size())]; } T& at(int i) { return (*this)[i]; } @@ -403,30 +400,38 @@ template > class TA /** * equivalent to operator[](0) */ - T& front() { SkASSERT(fSize > 0); return fData[0];} + T& front() { + sk_collection_not_empty(this->empty()); + return fData[0]; + } - const T& front() const { SkASSERT(fSize > 0); return fData[0];} + const T& front() const { + sk_collection_not_empty(this->empty()); + return fData[0]; + } /** * equivalent to operator[](size() - 1) */ - T& back() { SkASSERT(fSize); return fData[fSize - 1];} + T& back() { + sk_collection_not_empty(this->empty()); + return fData[fSize - 1]; + } - const T& back() const { SkASSERT(fSize > 0); return fData[fSize - 1];} + const T& back() const { + sk_collection_not_empty(this->empty()); + return fData[fSize - 1]; + } /** * equivalent to operator[](size()-1-i) */ T& fromBack(int i) { - SkASSERT(i >= 0); - SkASSERT(i < this->size()); - return fData[fSize - i - 1]; + return (*this)[fSize - i - 1]; } const T& fromBack(int i) const { - SkASSERT(i >= 0); - SkASSERT(i < this->size()); - return fData[fSize - i - 1]; + return (*this)[fSize - i - 1]; } bool operator==(const TArray& right) const { diff --git a/include/private/base/SkTDArray.h b/include/private/base/SkTDArray.h index b08d285378b1..fef454bdc442 100644 --- a/include/private/base/SkTDArray.h +++ b/include/private/base/SkTDArray.h @@ -10,6 +10,7 @@ #include "include/private/base/SkAPI.h" #include "include/private/base/SkAssert.h" +#include "include/private/base/SkDebug.h" #include "include/private/base/SkTo.h" #include @@ -152,20 +153,18 @@ template class SkTDArray { const T* end() const { return this->data() + this->size(); } T& operator[](int index) { - SkASSERT(index < this->size()); - return this->data()[index]; + return this->data()[sk_collection_check_bounds(index, this->size())]; } const T& operator[](int index) const { - SkASSERT(index < this->size()); - return this->data()[index]; + return this->data()[sk_collection_check_bounds(index, this->size())]; } const T& back() const { - SkASSERT(this->size() > 0); + sk_collection_not_empty(this->empty()); return this->data()[this->size() - 1]; } T& back() { - SkASSERT(this->size() > 0); + sk_collection_not_empty(this->empty()); return this->data()[this->size() - 1]; } diff --git a/include/private/base/SkTemplates.h b/include/private/base/SkTemplates.h index cbcf36c5943b..3c9ca5512537 100644 --- a/include/private/base/SkTemplates.h +++ b/include/private/base/SkTemplates.h @@ -13,6 +13,7 @@ #include "include/private/base/SkDebug.h" #include "include/private/base/SkMalloc.h" #include "include/private/base/SkTLogic.h" +#include "include/private/base/SkTo.h" #include #include @@ -98,49 +99,69 @@ namespace skia_private { template class AutoTArray { public: AutoTArray() {} - /** Allocate count number of T elements - */ - explicit AutoTArray(int count) { - SkASSERT(count >= 0); - if (count) { - fArray.reset(new T[count]); - } - SkDEBUGCODE(fCount = count;) + // Allocate size number of T elements + explicit AutoTArray(size_t size) { + fSize = check_size_bytes_too_big(size); + fData.reset(size > 0 ? new T[size] : nullptr); } - AutoTArray(AutoTArray&& other) : fArray(std::move(other.fArray)) { - SkDEBUGCODE(fCount = other.fCount; other.fCount = 0;) + // TODO: remove when all uses are gone. + explicit AutoTArray(int size) : AutoTArray(SkToSizeT(size)) {} + + AutoTArray(AutoTArray&& other) : fData(std::move(other.fData)) { + fSize = std::exchange(other.fSize, 0); } AutoTArray& operator=(AutoTArray&& other) { if (this != &other) { - fArray = std::move(other.fArray); - SkDEBUGCODE(fCount = other.fCount; other.fCount = 0;) + fData = std::move(other.fData); + fSize = std::exchange(other.fSize, 0); } return *this; } - /** Reallocates given a new count. Reallocation occurs even if new count equals old count. - */ - void reset(int count = 0) { *this = AutoTArray(count); } + // Reallocates given a new count. Reallocation occurs even if new count equals old count. + void reset(size_t count = 0) { + *this = AutoTArray(count); + } - /** Return the array of T elements. Will be NULL if count == 0 - */ - T* get() const { return fArray.get(); } + T* get() const { return fData.get(); } - /** Return the nth element in the array - */ - T& operator[](int index) const { - SkASSERT((unsigned)index < (unsigned)fCount); - return fArray[index]; + T& operator[](size_t index) const { + return fData[sk_collection_check_bounds(index, fSize)]; } - /** Aliases matching other types, like std::vector. */ - const T* data() const { return fArray.get(); } - T* data() { return fArray.get(); } + const T* data() const { return fData.get(); } + T* data() { return fData.get(); } + + size_t size() const { return fSize; } + bool empty() const { return fSize == 0; } + size_t size_bytes() const { return sizeof(T) * fSize; } + + T* begin() { + return fData; + } + const T* begin() const { + return fData; + } + + // It's safe to use fItemArray + fSize because if fItemArray is nullptr then adding 0 is + // valid and returns nullptr. See [expr.add] in the C++ standard. + T* end() { + if (fData == nullptr) { + SkASSERT(fSize == 0); + } + return fData + fSize; + } + const T* end() const { + if (fData == nullptr) { + SkASSERT(fSize == 0); + } + return fData + fSize; + } private: - std::unique_ptr fArray; - SkDEBUGCODE(int fCount = 0;) + std::unique_ptr fData; + size_t fSize = 0; }; /** Wraps AutoTArray, with room for kCountRequested elements preallocated. @@ -223,8 +244,7 @@ template class AutoSTArray { /** Return the nth element in the array */ T& operator[](int index) const { - SkASSERT(index < fCount); - return fArray[index]; + return fArray[sk_collection_check_bounds(index, fCount)]; } /** Aliases matching other types, like std::vector. */ diff --git a/include/private/chromium/BUILD.bazel b/include/private/chromium/BUILD.bazel index e1282ef1a471..41a6a19fac3c 100644 --- a/include/private/chromium/BUILD.bazel +++ b/include/private/chromium/BUILD.bazel @@ -14,7 +14,7 @@ skia_filegroup( # This group is mapped to //gn/gpu.gni:skia_gpu_chromium_public. skia_filegroup( - name = "gpu_private_hdrs", + name = "ganesh_private_hdrs", srcs = [ "GrDeferredDisplayList.h", "GrDeferredDisplayListRecorder.h", @@ -26,7 +26,7 @@ skia_filegroup( # This group is mapped to //gn/gpu.gni:skia_gpu_vk_chromium. skia_filegroup( - name = "vk_chromium_hdrs", + name = "vk_ganesh_hdrs", srcs = [ "GrVkSecondaryCBDrawContext.h", ], @@ -47,10 +47,10 @@ skia_filegroup( ":discardable_memory_hdrs", ":shared_private_hdrs", ] + select({ - "//src/gpu:has_gpu_backend": [":gpu_private_hdrs"], + "//src/gpu:has_ganesh_backend": [":ganesh_private_hdrs"], "//conditions:default": [], }) + select({ - "//src/gpu:vulkan_backend": [":vk_chromium_hdrs"], + "//src/gpu:vulkan_ganesh": [":vk_ganesh_hdrs"], "//conditions:default": [], }), visibility = ["//include/private:__pkg__"], diff --git a/include/private/chromium/GrSurfaceCharacterization.h b/include/private/chromium/GrSurfaceCharacterization.h index 4633f37d99f6..49c6d7b1232b 100644 --- a/include/private/chromium/GrSurfaceCharacterization.h +++ b/include/private/chromium/GrSurfaceCharacterization.h @@ -144,7 +144,7 @@ class SK_API GrSurfaceCharacterization { : fContextInfo(std::move(contextInfo)) , fCacheMaxResourceBytes(cacheMaxResourceBytes) , fImageInfo(ii) - , fBackendFormat(backendFormat) + , fBackendFormat(std::move(backendFormat)) , fOrigin(origin) , fSampleCnt(sampleCnt) , fIsTextureable(isTextureable) @@ -182,7 +182,7 @@ class SK_API GrSurfaceCharacterization { fCacheMaxResourceBytes = cacheMaxResourceBytes; fImageInfo = ii; - fBackendFormat = backendFormat; + fBackendFormat = std::move(backendFormat); fOrigin = origin; fSampleCnt = sampleCnt; fIsTextureable = isTextureable; diff --git a/include/private/chromium/SkDiscardableMemory.h b/include/private/chromium/SkDiscardableMemory.h index ade4d71aa749..3aa987036050 100644 --- a/include/private/chromium/SkDiscardableMemory.h +++ b/include/private/chromium/SkDiscardableMemory.h @@ -47,7 +47,7 @@ class SK_SPI SkDiscardableMemory { * * Nested calls to lock are not allowed. */ - virtual bool SK_WARN_UNUSED_RESULT lock() = 0; + [[nodiscard]] virtual bool lock() = 0; /** * Returns the current pointer for the discardable memory. This call is ONLY diff --git a/include/private/gpu/BUILD.bazel b/include/private/gpu/BUILD.bazel index bbdafe89e4cb..4c68533a3013 100644 --- a/include/private/gpu/BUILD.bazel +++ b/include/private/gpu/BUILD.bazel @@ -10,7 +10,7 @@ skia_filegroup( "//include/private/gpu/ganesh:private_hdrs", ] + select_multi( { - "//src/gpu:vulkan_backend": ["//include/private/gpu/vk:private_hdrs"], + "//src/gpu:vulkan_ganesh": ["//include/private/gpu/vk:private_hdrs"], }, ), # TODO(kjlubick) add select for graphite visibility = ["//include/private:__pkg__"], diff --git a/include/private/gpu/ganesh/BUILD.bazel b/include/private/gpu/ganesh/BUILD.bazel index adbc0c58f90d..8bbb7c2c63fd 100644 --- a/include/private/gpu/ganesh/BUILD.bazel +++ b/include/private/gpu/ganesh/BUILD.bazel @@ -10,6 +10,11 @@ skia_filegroup( srcs = ["GrDawnTypesPriv.h"], ) +skia_filegroup( + name = "gl_private_hdrs", + srcs = ["GrGLTypesPriv.h"], +) + # In own group for mapping to //gpu.gni:skia_gpu_vk_private. skia_filegroup( name = "vk_private_hdrs", @@ -39,10 +44,10 @@ skia_filegroup( "GrTypesPriv.h", ] + select_multi( { - "//src/gpu:dawn_backend": [":dawn_private_hdrs"], - "//src/gpu:gl_backend": ["GrGLTypesPriv.h"], - "//src/gpu:vulkan_backend": [":vk_private_hdrs"], - "//src/gpu:metal_backend": [":mtl_private_hdrs"], + "//src/gpu:dawn_ganesh": [":dawn_private_hdrs"], + "//src/gpu:gl_ganesh": [":gl_private_hdrs"], + "//src/gpu:vulkan_ganesh": [":vk_private_hdrs"], + "//src/gpu:metal_ganesh": [":mtl_private_hdrs"], # TODO(kjlubick) Direct3D Backend }, ), diff --git a/include/private/gpu/ganesh/GrGLTypesPriv.h b/include/private/gpu/ganesh/GrGLTypesPriv.h index e0f14cd74b0c..ed8c5c4c2e50 100644 --- a/include/private/gpu/ganesh/GrGLTypesPriv.h +++ b/include/private/gpu/ganesh/GrGLTypesPriv.h @@ -11,6 +11,8 @@ #ifndef GrGLTypesPriv_DEFINED #define GrGLTypesPriv_DEFINED +// TODO(b/293490566) Move this to src/ after GrSurfaceInfo.h has been decoupled from GL + static constexpr int kGrGLColorFormatCount = static_cast(GrGLFormat::kLastColorFormat) + 1; class GrGLTextureParameters : public SkNVRefCnt { @@ -76,22 +78,21 @@ class GrGLTextureParameters : public SkNVRefCnt { class GrGLBackendTextureInfo { public: - GrGLBackendTextureInfo(const GrGLTextureInfo& info, GrGLTextureParameters* params) + GrGLBackendTextureInfo(const GrGLTextureInfo& info, sk_sp params) : fInfo(info), fParams(params) {} GrGLBackendTextureInfo(const GrGLBackendTextureInfo&) = delete; GrGLBackendTextureInfo& operator=(const GrGLBackendTextureInfo&) = delete; const GrGLTextureInfo& info() const { return fInfo; } - GrGLTextureParameters* parameters() const { return fParams; } - sk_sp refParameters() const { return sk_ref_sp(fParams); } + GrGLTextureParameters* parameters() const { return fParams.get(); } + sk_sp refParameters() const { return fParams; } - void cleanup(); void assign(const GrGLBackendTextureInfo&, bool thisIsValid); bool isProtected() const { return fInfo.isProtected(); } private: GrGLTextureInfo fInfo; - GrGLTextureParameters* fParams; + sk_sp fParams; // not const because we might call invalidate() on it. }; struct GrGLTextureSpec { diff --git a/include/private/gpu/ganesh/GrTypesPriv.h b/include/private/gpu/ganesh/GrTypesPriv.h index 122867badb4e..de65342bfb17 100644 --- a/include/private/gpu/ganesh/GrTypesPriv.h +++ b/include/private/gpu/ganesh/GrTypesPriv.h @@ -9,18 +9,22 @@ #define GrTypesPriv_DEFINED #include "include/core/SkColor.h" -#include "include/core/SkImageInfo.h" +#include "include/core/SkColorType.h" +#include "include/core/SkData.h" #include "include/core/SkPath.h" +#include "include/core/SkPathTypes.h" #include "include/core/SkRefCnt.h" #include "include/core/SkTextureCompressionType.h" #include "include/gpu/GrTypes.h" +#include "include/private/base/SkAssert.h" #include "include/private/base/SkMacros.h" #include "include/private/base/SkTypeTraits.h" +#include +#include #include +#include -class GrBackendFormat; -class GrCaps; class GrSurfaceProxy; /** @@ -269,9 +273,9 @@ enum GrShaderType { kVertex_GrShaderType, kFragment_GrShaderType, - kLastkFragment_GrShaderType = kFragment_GrShaderType + kLast_GrShaderType = kFragment_GrShaderType }; -static const int kGrShaderTypeCount = kLastkFragment_GrShaderType + 1; +static const int kGrShaderTypeCount = kLast_GrShaderType + 1; enum GrShaderFlags { kNone_GrShaderFlags = 0, diff --git a/include/private/gpu/graphite/DawnTypesPriv.h b/include/private/gpu/graphite/DawnTypesPriv.h index d7cb6413e0ef..838e43ca3ce5 100644 --- a/include/private/gpu/graphite/DawnTypesPriv.h +++ b/include/private/gpu/graphite/DawnTypesPriv.h @@ -26,6 +26,12 @@ struct DawnTextureSpec { fFormat == that.fFormat; } + bool isCompatible(const DawnTextureSpec& that) const { + // The usages may match or the usage passed in may be a superset of the usage stored within. + return fFormat == that.fFormat && + (fUsage & that.fUsage) == fUsage; + } + SkString toString() const { return SkStringPrintf("format=0x%08X,usage=0x%08X", static_cast(fFormat), diff --git a/include/private/gpu/graphite/MtlGraphiteTypesPriv.h b/include/private/gpu/graphite/MtlGraphiteTypesPriv.h index 27877f821e0d..faea8a21b450 100644 --- a/include/private/gpu/graphite/MtlGraphiteTypesPriv.h +++ b/include/private/gpu/graphite/MtlGraphiteTypesPriv.h @@ -64,6 +64,14 @@ struct MtlTextureSpec { fFramebufferOnly == that.fFramebufferOnly; } + bool isCompatible(const MtlTextureSpec& that) const { + // The usages may match or the usage passed in may be a superset of the usage stored within. + return fFormat == that.fFormat && + fStorageMode == that.fStorageMode && + fFramebufferOnly == that.fFramebufferOnly && + (fUsage & that.fUsage) == fUsage; + } + SkString toString() const { return SkStringPrintf("format=%u,usage=0x%04X,storageMode=%d,framebufferOnly=%d", fFormat, diff --git a/include/private/gpu/graphite/VulkanGraphiteTypesPriv.h b/include/private/gpu/graphite/VulkanGraphiteTypesPriv.h index 5618a4df306c..7af601b29d79 100644 --- a/include/private/gpu/graphite/VulkanGraphiteTypesPriv.h +++ b/include/private/gpu/graphite/VulkanGraphiteTypesPriv.h @@ -38,6 +38,16 @@ struct VulkanTextureSpec { fAspectMask == that.fAspectMask; } + bool isCompatible(const VulkanTextureSpec& that) const { + // The usages may match or the usage passed in may be a superset of the usage stored within. + return fFlags == that.fFlags && + fFormat == that.fFormat && + fImageTiling == that.fImageTiling && + fSharingMode == that.fSharingMode && + fAspectMask == that.fAspectMask && + (fImageUsageFlags & that.fImageUsageFlags) == fImageUsageFlags; + } + SkString toString() const { return SkStringPrintf( "flags=0x%08X,format=%d,imageTiling=%d,imageUsageFlags=0x%08X,sharingMode=%d," diff --git a/include/utils/SkBase64.h b/include/utils/SkBase64.h index e01028543a42..6f30636ef071 100644 --- a/include/utils/SkBase64.h +++ b/include/utils/SkBase64.h @@ -46,8 +46,8 @@ struct SkBase64 { @param dstLength assigned the length dst is required to be. Must not be nullptr. */ - static Error SK_WARN_UNUSED_RESULT Decode(const void* src, size_t srcLength, - void* dst, size_t* dstLength); + [[nodiscard]] static Error Decode(const void* src, size_t srcLength, + void* dst, size_t* dstLength); }; #endif // SkBase64_DEFINED diff --git a/include/utils/SkNWayCanvas.h b/include/utils/SkNWayCanvas.h index 87c6916b39f0..146349b670be 100644 --- a/include/utils/SkNWayCanvas.h +++ b/include/utils/SkNWayCanvas.h @@ -45,11 +45,7 @@ struct SkPoint; struct SkRSXform; struct SkRect; -#if defined(SK_GANESH) -namespace sktext::gpu { -class Slug; -} -#endif +namespace sktext::gpu { class Slug; } class SK_API SkNWayCanvas : public SkCanvasVirtualEnforcer { public: @@ -77,9 +73,7 @@ class SK_API SkNWayCanvas : public SkCanvasVirtualEnforcer { void onDrawGlyphRunList(const sktext::GlyphRunList&, const SkPaint&) override; void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, const SkPaint& paint) override; -#if defined(SK_GANESH) void onDrawSlug(const sktext::gpu::Slug* slug) override; -#endif void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], const SkPoint texCoords[4], SkBlendMode, const SkPaint& paint) override; @@ -120,11 +114,7 @@ class SK_API SkNWayCanvas : public SkCanvasVirtualEnforcer { SkBlendMode) override; void onDrawEdgeAAImageSet2(const ImageSetEntry[], int count, const SkPoint[], const SkMatrix[], const SkSamplingOptions&,const SkPaint*, SrcRectConstraint) override; - - void onFlush() override; - class Iter; - private: using INHERITED = SkCanvasVirtualEnforcer; }; diff --git a/include/utils/SkPaintFilterCanvas.h b/include/utils/SkPaintFilterCanvas.h index 9a836bc7c255..ce86d2ea3a6a 100644 --- a/include/utils/SkPaintFilterCanvas.h +++ b/include/utils/SkPaintFilterCanvas.h @@ -65,8 +65,7 @@ class SK_API SkPaintFilterCanvas : public SkCanvasVirtualEnforcer // Forwarded to the wrapped canvas. SkISize getBaseLayerSize() const override { return proxy()->getBaseLayerSize(); } - GrRecordingContext* recordingContext() override { return proxy()->recordingContext(); } - + GrRecordingContext* recordingContext() const override { return proxy()->recordingContext(); } protected: /** * Called with the paint that will be used to draw the specified type. diff --git a/infra/bots/BUILD.bazel b/infra/bots/BUILD.bazel index d2166b3c3451..d4b77ad4429f 100644 --- a/infra/bots/BUILD.bazel +++ b/infra/bots/BUILD.bazel @@ -24,7 +24,6 @@ genrule( "//infra/bots/task_drivers/codesize", "//infra/bots/task_drivers/compile_wasm_gm_tests", "//infra/bots/task_drivers/cpu_tests", - "//infra/bots/task_drivers/fm_driver", "//infra/bots/task_drivers/g3_canary", "//infra/bots/task_drivers/perf_puppeteer_canvas", "//infra/bots/task_drivers/perf_puppeteer_render_skps", diff --git a/infra/bots/assets/dwritecore/VERSION b/infra/bots/assets/dwritecore/VERSION new file mode 100644 index 000000000000..56a6051ca2b0 --- /dev/null +++ b/infra/bots/assets/dwritecore/VERSION @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/infra/bots/assets/dwritecore/create.py b/infra/bots/assets/dwritecore/create.py new file mode 100644 index 000000000000..561ef7cd392c --- /dev/null +++ b/infra/bots/assets/dwritecore/create.py @@ -0,0 +1,64 @@ +#!/usr/bin/env python +# +# Copyright 2023 Google Inc. +# +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + + +""" +Create the DWriteCore asset. DWriteCore is now part of the WindowsAppSDK +which is distrubuted as a nuget package. To update, go to +https://www.nuget.org/packages/Microsoft.WindowsAppSDK and pick a version. +The URL below should match that of the "Download package" link. + +The asset this creates contains just the DWriteCore headers and dll. In +particular the lib is not bundled as Skia does not link directly against +DWriteCore. +""" + + +import argparse +import subprocess + + +VERSION = "1.4.230518007-experimental1" +SHORT_VERSION = "1.4-experimental1" +SHA256 = "09a0c154df0bf923923b43e62605c91d81099d18d53b0825d0b42f561993e27a" +URL = "https://www.nuget.org/api/v2/package/Microsoft.WindowsAppSDK/%s" + + +def create_asset(target_dir): + """Create the asset.""" + subprocess.check_call(["mkdir", "%s/tmp" % target_dir]) + + subprocess.check_call(["curl", "-L", URL % VERSION, "-o", "%s/tmp/windowsappsdk.zip" % target_dir]) + output = subprocess.check_output(["sha256sum", "%s/tmp/windowsappsdk.zip" % target_dir], encoding="utf-8") + actual_hash = output.split(" ")[0] + if actual_hash != SHA256: + raise Exception("SHA256 does not match (%s != %s)" % (actual_hash, SHA256)) + + subprocess.check_call(["unzip", "%s/tmp/windowsappsdk.zip" % target_dir, "-d", "%s/tmp/sdk" % target_dir]) + subprocess.check_call(["unzip", "%s/tmp/sdk/tools/MSIX/win10-x64/Microsoft.WindowsAppRuntime.%s.msix" % (target_dir, SHORT_VERSION), "-d", "%s/tmp/runtime" % target_dir]) + + subprocess.check_call(["mkdir", "%s/include" % target_dir]) + subprocess.check_call(["mkdir", "%s/bin" % target_dir]) + subprocess.check_call(["cp", "%s/tmp/sdk/include/dwrite.h" % target_dir, "%s/include" % target_dir]) + subprocess.check_call(["cp", "%s/tmp/sdk/include/dwrite_1.h" % target_dir, "%s/include" % target_dir]) + subprocess.check_call(["cp", "%s/tmp/sdk/include/dwrite_2.h" % target_dir, "%s/include" % target_dir]) + subprocess.check_call(["cp", "%s/tmp/sdk/include/dwrite_3.h" % target_dir, "%s/include" % target_dir]) + subprocess.check_call(["cp", "%s/tmp/sdk/include/dwrite_core.h" % target_dir, "%s/include" % target_dir]) + subprocess.check_call(["cp", "%s/tmp/runtime/DWriteCore.dll" % target_dir, "%s/bin" % target_dir]) + + subprocess.check_call(["rm", "-rf", "%s/tmp" % target_dir]) + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument('--target_dir', '-t', required=True) + args = parser.parse_args() + create_asset(args.target_dir) + + +if __name__ == '__main__': + main() diff --git a/infra/bots/assets/skp/VERSION b/infra/bots/assets/skp/VERSION index 66e214a2e83a..9ec873d37d50 100644 --- a/infra/bots/assets/skp/VERSION +++ b/infra/bots/assets/skp/VERSION @@ -1 +1 @@ -432 \ No newline at end of file +438 \ No newline at end of file diff --git a/infra/bots/assets/skparagraph/README.md b/infra/bots/assets/skparagraph/README.md new file mode 100644 index 000000000000..c4064eaf6604 --- /dev/null +++ b/infra/bots/assets/skparagraph/README.md @@ -0,0 +1,2 @@ +This asset has several fonts needed to properly exercise SkParagraph code. +These are also available in https://github.com/Rusino/textlayout diff --git a/infra/bots/assets/skparagraph/VERSION b/infra/bots/assets/skparagraph/VERSION index 56a6051ca2b0..b8626c4cff28 100644 --- a/infra/bots/assets/skparagraph/VERSION +++ b/infra/bots/assets/skparagraph/VERSION @@ -1 +1 @@ -1 \ No newline at end of file +4 diff --git a/infra/bots/assets/skparagraph/create.py b/infra/bots/assets/skparagraph/create.py new file mode 100644 index 000000000000..4f5455b24ec2 --- /dev/null +++ b/infra/bots/assets/skparagraph/create.py @@ -0,0 +1,72 @@ +#!/usr/bin/env python3 +# +# Copyright 2023 Google LLC +# +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + + +""" +The fonts collected by this script are used by SkParagraphTests.cpp which uses measurements +that are very particular to the specific font being used. Thus, we try to get the fonts from +a repeatable, documented source. +""" + + +import argparse +import os +import subprocess +import tempfile +import shutil + +# NotoNaskhArabic-Regular.ttf from https://fonts.google.com/noto/specimen/Noto+Naskh+Arabic +# The fonts.google.com website seems to download the various .ttf files and then zip them client +# side. By using DevTools to watch what happens when the Download Family button is pressed, and +# then using sha256sum to verify the file in the .zip (with the nice name) matches the +# indecipherable url, one can find the following link. I mirrored this to +# https://storage.googleapis.com/skia-cdn/google-web-fonts/NotoNaskhArabic-Regular.ttf +# in case the gstatic links "expire" at some point. +# We cannot easily look at the .woff2 links from +# https://fonts.googleapis.com/css2?family=Noto%20Naskh%20Arabic +# as those seem to each have a subset of the unicode range and that makes our tests awkward. +ARABIC_URL = 'https://fonts.gstatic.com/s/notonaskharabic/v33/RrQ5bpV-9Dd1b1OAGA6M9PkyDuVBePeKNaxcsss0Y7bwvc5krK0z9_Mnuw.ttf' +ARABIC_SHA256 = 'b957e8c71a24e50c1aad4df775c46282bbe5e62e2b2b2ca72b153d75b6a15edd' + +def create_asset(target_dir): + """Copy the fonts from two different git repos into one folder.""" + os.makedirs(target_dir, exist_ok=True) + with tempfile.TemporaryDirectory() as tmp: + os.chdir(tmp) + subprocess.call(['git', 'clone', 'https://github.com/Rusino/textlayout']) + subprocess.call(['git', 'clone', 'https://skia.googlesource.com/skia/']) + + os.chdir(os.path.join(tmp, "textlayout")) + subprocess.call(['git', 'checkout', '9c1868e84da1db358807ebff5cf52327e53560a0']) + shutil.copytree("fonts", target_dir, dirs_exist_ok=True) + + os.chdir(os.path.join(tmp, "skia")) + subprocess.call(['git', 'checkout', '2f82ef6e77774dc4e8e382b2fb6159c58c0f8725']) + shutil.copytree(os.path.join("resources", "fonts"), target_dir, dirs_exist_ok=True) + # Cleanup files that are not fonts needed for tests + shutil.rmtree(os.path.join(target_dir, "abc")) + shutil.rmtree(os.path.join(target_dir, "svg")) + os.remove(os.path.join(target_dir, "fonts.xml")) + + target_file = os.path.join(target_dir, 'NotoNaskhArabic-Regular.ttf') + subprocess.call(['wget', '--quiet', '--output-document', target_file, ARABIC_URL]) + output = subprocess.check_output(['sha256sum', target_file], encoding='utf-8') + actual_hash = output.split(' ')[0] + if actual_hash != ARABIC_SHA256: + raise Exception('SHA256 does not match (%s != %s)' % (actual_hash, ARABIC_SHA256)) + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument('--target_dir', '-t', required=True) + args = parser.parse_args() + create_asset(args.target_dir) + + +if __name__ == '__main__': + main() + diff --git a/infra/bots/gen_tasks_logic/dm_flags.go b/infra/bots/gen_tasks_logic/dm_flags.go index 64293e4edc5d..639c942c4cfd 100644 --- a/infra/bots/gen_tasks_logic/dm_flags.go +++ b/infra/bots/gen_tasks_logic/dm_flags.go @@ -263,52 +263,15 @@ func (b *taskBuilder) dmFlags(internalHardwareLabel string) { // We want to test both the OpenGL config and the GLES config on Linux Intel: // GL is used by Chrome, GLES is used by ChromeOS. - // Also do the Ganesh threading verification test (render with and without - // worker threads, using only the SW path renderer, and compare the results). if b.matchGpu("Intel") && b.isLinux() { - configs = append(configs, "gles", "glesdft", "gltestthreading") - // skbug.com/6333, skbug.com/6419, skbug.com/6702 - skip("gltestthreading", "gm", ALL, "lcdblendmodes") - skip("gltestthreading", "gm", ALL, "lcdoverlap") - skip("gltestthreading", "gm", ALL, "textbloblooper") - // All of these GMs are flaky, too: - skip("gltestthreading", "gm", ALL, "dftext_blob_persp") - skip("gltestthreading", "gm", ALL, "dftext") - skip("gltestthreading", "gm", ALL, "gpu_blur_utils") - skip("gltestthreading", "gm", ALL, "gpu_blur_utils_ref") - skip("gltestthreading", "gm", ALL, "gpu_blur_utils_subset_rect") - skip("gltestthreading", "gm", ALL, "gpu_blur_utils_subset_rect_ref") - // skbug.com/7523 - Flaky on various GPUs - skip("gltestthreading", "gm", ALL, "orientation") - // These GMs only differ in the low bits - skip("gltestthreading", "gm", ALL, "stroketext") - skip("gltestthreading", "gm", ALL, "draw_image_set") - - // Fail on Iris Xe (skbug:13921) - skip("gltestthreading", "gm", ALL, "circular_arcs_stroke_and_fill_round") - skip("gltestthreading", "gm", ALL, "degeneratesegments") - skip("gltestthreading", "gm", ALL, "imagemakewithfilter") - skip("gltestthreading", "gm", ALL, "imagemakewithfilter_crop_ref") - skip("gltestthreading", "gm", ALL, "ovals") - skip("gltestthreading", "gm", ALL, "persp_images") - skip("gltestthreading", "gm", ALL, "rtif_distort") - skip("gltestthreading", "gm", ALL, "teenystrokes") - skip("gltestthreading", "gm", ALL, "texel_subset_linear_mipmap_linear_down") - skip("gltestthreading", "gm", ALL, "texel_subset_linear_mipmap_nearest_down") - skip("gltestthreading", "gm", ALL, "yuv420_odd_dim_repeat") - - skip("gltestthreading", "svg", ALL, "filters-conv-01-f.svg") - skip("gltestthreading", "svg", ALL, "filters-displace-01-f.svg") - skip("gltestthreading", "svg", ALL, "filters-offset-01-b.svg") - skip("gltestthreading", "svg", ALL, "gallardo.svg") - skip("gltestthreading", "svg", ALL, "masking-filter-01-f.svg") - + configs = append(configs, "gles", "glesdft") } // Dawn bot *only* runs the dawn config if b.extraConfig("Dawn") && !b.extraConfig("Graphite") { - // tint:1045: Tint doesn't implement MatrixInverse yet. - skip(ALL, "gm", ALL, "runtime_intrinsics_matrix") + // The SPIR-V reader emits bad code for a `matrixCompMult` that overflows. (tint:1989) + skip(ALL, "test", ALL, "SkSLIntrinsicMatrixCompMultES2_GPU") + configs = []string{"dawn"} } @@ -326,12 +289,19 @@ func (b *taskBuilder) dmFlags(internalHardwareLabel string) { // Could not readback from surface. skip(ALL, "gm", ALL, "hugebitmapshader") - skip(ALL, "gm", ALL, "path_huge_aa") - skip(ALL, "gm", ALL, "verylargebitmap") - skip(ALL, "gm", ALL, "verylarge_picture_image") + skip(ALL, "gm", ALL, "async_rescale_and_read_no_bleed") + skip(ALL, "gm", ALL, "async_rescale_and_read_text_up") + skip(ALL, "gm", ALL, "async_rescale_and_read_dog_down") + skip(ALL, "gm", ALL, "async_rescale_and_read_dog_up") + skip(ALL, "gm", ALL, "async_rescale_and_read_rose") if b.extraConfig("Metal") { configs = []string{"grmtl"} + if b.gpu("IntelIrisPlus") { + // We get some 27/255 RGB diffs on the 45 degree + // rotation case on this device (skbug.com/14408) + skip(ALL, "test", ALL, "BigImageTest_Graphite") + } } if b.extraConfig("Dawn") { configs = []string{"grdawn"} @@ -347,14 +317,44 @@ func (b *taskBuilder) dmFlags(internalHardwareLabel string) { skip(ALL, "test", ALL, "GraphitePurgeNotUsedSinceResourcesTest") skip(ALL, "test", ALL, "MakeColorSpace_Test") skip(ALL, "test", ALL, "PaintParamsKeyTest") - if b.matchOs("Win") { - // Async read call failed - skip(ALL, "gm", ALL, "async_rescale_and_read_no_bleed") - skip(ALL, "gm", ALL, "async_rescale_and_read_text_up") - skip(ALL, "gm", ALL, "async_rescale_and_read_dog_down") - skip(ALL, "gm", ALL, "async_rescale_and_read_rose") + + if b.matchOs("Win10") { + // The Dawn Win10 job OOMs (skbug.com/14410) + skip(ALL, "test", ALL, "BigImageTest_Graphite") } } + if b.extraConfig("Vulkan") { + configs = []string{"grvk"} + // Couldn't readback + skip(ALL, "gm", ALL, "aaxfermodes") + // Could not instantiate texture proxy for UploadTask! + skip(ALL, "test", ALL, "BigImageTest_Graphite") + // Test failures + skip(ALL, "test", ALL, "DeviceTestVertexTransparency") + skip(ALL, "test", ALL, "GraphitePromiseImageMultipleImgUses") + skip(ALL, "test", ALL, "GraphitePromiseImageRecorderLoss") + skip(ALL, "test", ALL, "GraphitePurgeNotUsedSinceResourcesTest") + skip(ALL, "test", ALL, "GraphiteTextureProxyTest") + skip(ALL, "test", ALL, "GraphiteYUVAPromiseImageMultipleImgUses") + skip(ALL, "test", ALL, "GraphiteYUVAPromiseImageRecorderLoss") + skip(ALL, "test", ALL, "ImageProviderTest_Graphite_Testing") + skip(ALL, "test", ALL, "ImageProviderTest_Graphite_Default") + skip(ALL, "test", ALL, "MakeColorSpace_Test") + skip(ALL, "test", ALL, "ImageProviderTest") + skip(ALL, "test", ALL, "ImageShaderTest") + skip(ALL, "test", ALL, "MutableImagesTest") + skip(ALL, "test", ALL, "MultisampleRetainTest") + skip(ALL, "test", ALL, "NonVolatileGraphitePromiseImageTest") + skip(ALL, "test", ALL, "NonVolatileGraphiteYUVAPromiseImageTest") + skip(ALL, "test", ALL, "PaintParamsKeyTest") + skip(ALL, "test", ALL, "RecordingOrderTest_Graphite") + skip(ALL, "test", ALL, "RecordingSurfacesTestClear") + skip(ALL, "test", ALL, "ShaderTestNestedBlendsGraphite") + skip(ALL, "test", ALL, "SkRuntimeEffectSimple_Graphite") + skip(ALL, "test", ALL, "SkSLMatrixScalarNoOpFolding_GPU") + skip(ALL, "test", ALL, "VolatileGraphiteYUVAPromiseImageTest") + skip(ALL, "test", ALL, "VolatileGraphitePromiseImageTest") + } } // ANGLE bot *only* runs the angle configs @@ -437,7 +437,7 @@ func (b *taskBuilder) dmFlags(internalHardwareLabel string) { if b.gpu() && b.extraConfig("Vulkan") && (b.gpu("RadeonR9M470X", "RadeonHD7770")) { skip(ALL, "tests", ALL, "VkDrawableImportTest") } - if b.extraConfig("Vulkan") { + if b.extraConfig("Vulkan") && !b.extraConfig("Graphite") { configs = []string{"vk"} // MSAA doesn't work well on Intel GPUs chromium:527565, chromium:983926, skia:9023 if !b.matchGpu("Intel") { @@ -474,7 +474,7 @@ func (b *taskBuilder) dmFlags(internalHardwareLabel string) { // Test 1010102 on our Linux/NVIDIA bots and the persistent cache config // on the GL bots. if b.gpu("QuadroP400") && !b.extraConfig("PreAbandonGpuContext") && !b.extraConfig("TSAN") && b.isLinux() && - !b.extraConfig("FailFlushTimeCallbacks") { + !b.extraConfig("FailFlushTimeCallbacks") && !b.extraConfig("Graphite") { if b.extraConfig("Vulkan") { configs = append(configs, "vk1010102") // Decoding transparent images to 1010102 just looks bad @@ -909,6 +909,7 @@ func (b *taskBuilder) dmFlags(internalHardwareLabel string) { "imagemakewithfilter_crop", "imagemakewithfilter_crop_ref", "imagemakewithfilter_ref", + "imagefilterstransformed", } // skia:5589 @@ -978,6 +979,17 @@ func (b *taskBuilder) dmFlags(internalHardwareLabel string) { skip("serialize-8888", "gm", ALL, "encode-platform") } + // skia:14411 -- images are visibly identical, not interested in diagnosing non-determinism here + skip("pic-8888", "gm", ALL, "perlinnoise_layered") + skip("serialize-8888", "gm", ALL, "perlinnoise_layered") + if b.gpu("IntelIrisXe") && !b.extraConfig("Vulkan") { + skip(ALL, "gm", ALL, "perlinnoise_layered") // skia:14411 + } + + if b.gpu("IntelIrisXe") && b.matchOs("Win") && b.extraConfig("Vulkan") { + skip(ALL, "tests", ALL, "VkYCbcrSampler_DrawImageWithYcbcrSampler") // skia:14628 + } + // skia:4769 skip("pic-8888", "gm", ALL, "drawfilter") @@ -1087,11 +1099,11 @@ func (b *taskBuilder) dmFlags(internalHardwareLabel string) { skip(ALL, "tests", ALL, "SkSLStructFieldFolding_GPU") // skia:13393 } - if b.matchGpu("Adreno[56]") && b.extraConfig("Vulkan") { // disable broken tests on Adreno 5/6xx Vulkan - skip(ALL, "tests", ALL, "SkSLInoutParameters_GPU") // skia:12869 - skip(ALL, "tests", ALL, "SkSLOutParams_GPU") // skia:11919 - skip(ALL, "tests", ALL, "SkSLOutParamsDoubleSwizzle_GPU") // skia:11919 - skip(ALL, "tests", ALL, "SkSLOutParamsNoInline_GPU") // skia:11919 + if b.matchGpu("Adreno[56]") && b.extraConfig("Vulkan") { // disable broken tests on Adreno 5/6xx Vulkan + skip(ALL, "tests", ALL, "SkSLInoutParameters_GPU") // skia:12869 + skip(ALL, "tests", ALL, "SkSLOutParams_GPU") // skia:11919 + skip(ALL, "tests", ALL, "SkSLOutParamsDoubleSwizzle_GPU") // skia:11919 + skip(ALL, "tests", ALL, "SkSLOutParamsNoInline_GPU") // skia:11919 skip(ALL, "tests", ALL, "SkSLOutParamsFunctionCallInArgument") } @@ -1156,6 +1168,7 @@ func (b *taskBuilder) dmFlags(internalHardwareLabel string) { if b.extraConfig("ANGLE") && b.matchOs("Win") && b.matchGpu("IntelIris(540|655|Xe)") { skip(ALL, "tests", ALL, "SkSLSwitchDefaultOnly_GPU") // skia:12465 + skip(ALL, "tests", ALL, "ImageFilterCropRect_Gpu") // b/294080402 } if b.extraConfig("Dawn") { @@ -1212,6 +1225,10 @@ func (b *taskBuilder) dmFlags(internalHardwareLabel string) { skip(ALL, "tests", ALL, "SkSLSwizzleIndexStore_GPU") // skia:14177 } + if b.matchOs("Win") && (b.matchGpu("Intel") || b.extraConfig("ANGLE")) { + skip(ALL, "tests", ALL, "SkSLSwizzleAsLValueES3_GPU") // https://anglebug.com/8260 + } + if b.gpu("RTX3060") && b.extraConfig("Vulkan") && b.matchOs("Win") { skip(ALL, "gm", ALL, "blurcircles2") // skia:13342 skip(ALL, "tests", ALL, "SkSLIntrinsicMixFloatES3_GPU") @@ -1251,7 +1268,7 @@ func (b *taskBuilder) dmFlags(internalHardwareLabel string) { skip(ALL, "tests", ALL, "SkSLSwizzleIndexStore_GPU") } - if (b.gpu("RadeonR9M470X") && b.extraConfig("ANGLE")) { + if b.gpu("RadeonR9M470X") && b.extraConfig("ANGLE") { // skbug:14293 - ANGLE D3D9 ES2 has flaky texture sampling that leads to fuzzy diff errors skip(ALL, "tests", ALL, "FilterResult") // skbug:13815 - Flaky failures on ANGLE D3D9 ES2 @@ -1274,6 +1291,17 @@ func (b *taskBuilder) dmFlags(internalHardwareLabel string) { } match := []string{} + + if b.extraConfig("Graphite") { + // Graphite doesn't do auto-image-tiling so these GMs should remain disabled + match = append(match, "~^verylarge_picture_image$") + match = append(match, "~^verylargebitmap$") + match = append(match, "~^path_huge_aa$") + match = append(match, "~^fast_constraint_red_is_allowed$") + match = append(match, "~^strict_constraint_batch_no_red_allowed$") + match = append(match, "~^strict_constraint_no_red_allowed$") + } + if b.extraConfig("Valgrind") { // skia:3021 match = append(match, "~Threaded") } @@ -1479,7 +1507,13 @@ func (b *taskBuilder) dmFlags(internalHardwareLabel string) { args = append(args, "--forceAnalyticAA") } - if !b.extraConfig("NativeFonts") { + if b.extraConfig("NativeFonts") { + args = append(args, "--nativeFonts") + if !b.matchOs("Android") { + args = append(args, "--paragraph_fonts", "extra_fonts") + args = append(args, "--norun_paragraph_tests_needing_system_fonts") + } + } else { args = append(args, "--nonativeFonts") } diff --git a/infra/bots/gen_tasks_logic/gen_tasks_logic.go b/infra/bots/gen_tasks_logic/gen_tasks_logic.go index c599b4268dc0..e72e9cd035b6 100644 --- a/infra/bots/gen_tasks_logic/gen_tasks_logic.go +++ b/infra/bots/gen_tasks_logic/gen_tasks_logic.go @@ -423,6 +423,7 @@ func GenTasks(cfg *Config) { "skia/third_party", "skia/tools", // needed for tests + "skia/gm", // Needed to run GMs with Bazel. "skia/gn", // some Python scripts still live here "skia/resources", "skia/package.json", @@ -702,7 +703,7 @@ var codesizeTaskNameRegexp = regexp.MustCompile("^CodeSize-[a-zA-Z0-9_]+-") // deriveCompileTaskName returns the name of a compile task based on the given // job name. func (b *jobBuilder) deriveCompileTaskName() string { - if b.role("Test", "Perf", "FM") { + if b.role("Test", "Perf") { task_os := b.parts["os"] ec := []string{} if val := b.parts["extra_config"]; val != "" { @@ -710,7 +711,7 @@ func (b *jobBuilder) deriveCompileTaskName() string { ignore := []string{ "Skpbench", "AbandonGpuContext", "PreAbandonGpuContext", "Valgrind", "FailFlushTimeCallbacks", "ReleaseAndAbandonGpuContext", "FSAA", "FAAA", "FDAA", - "NativeFonts", "GDI", "NoGPUThreads", "DDL1", "DDL3", "T8888", + "NativeFonts", "GDI", "NoGPUThreads", "DDL1", "DDL3", "DDLTotal", "DDLRecord", "9x9", "BonusConfigs", "ColorSpaces", "GL", "SkottieTracing", "SkottieWASM", "GpuTess", "DMSAAStats", "Mskp", "Docker", "PDF", "Puppeteer", "SkottieFrames", "RenderSKP", "CanvasPerf", "AllPathsVolatile", @@ -851,6 +852,9 @@ func (b *taskBuilder) defaultSwarmDimensions() { if !ok { log.Fatalf("Entry %q not found in OS mapping.", os) } + if os == "Debian11" && b.extraConfig("Docker") { + d["os"] = DEFAULT_OS_LINUX_GCE + } if os == "Win10" && b.parts["model"] == "Golo" { // ChOps-owned machines have Windows 10 21h1. d["os"] = "Windows-10-19043" @@ -924,10 +928,11 @@ func (b *taskBuilder) defaultSwarmDimensions() { "MacMini7.1": "x86-64-i5-4278U", "NUC5i7RYH": "x86-64-i7-5557U", "NUC9i7QN": "x86-64-i7-9750H", + "NUC11TZi5": "x86-64-avx2", }, "AVX512": { - "GCE": "x86-64-Skylake_GCE", - "Golo": "Intel64_Family_6_Model_85_Stepping_7__GenuineIntel", + "GCE": "x86-64-Skylake_GCE", + "Golo": "Intel64_Family_6_Model_85_Stepping_7__GenuineIntel", }, "Rome": { "GCE": "x86-64-AMD_Rome_GCE", @@ -956,17 +961,17 @@ func (b *taskBuilder) defaultSwarmDimensions() { gpu, ok := map[string]string{ // At some point this might use the device ID, but for now it's like Chromebooks. "GTX660": "10de:11c0-26.21.14.4120", - "GTX960": "10de:1401-31.0.15.1694", + "GTX960": "10de:1401-31.0.15.3667", "IntelHD4400": "8086:0a16-20.19.15.4963", "IntelIris540": "8086:1926-31.0.101.2115", "IntelIris6100": "8086:162b-20.19.15.4963", "IntelIris655": "8086:3ea5-26.20.100.7463", - "IntelIrisXe": "8086:9a49-31.0.101.3959", + "IntelIrisXe": "8086:9a49-31.0.101.4338", "RadeonHD7770": "1002:683d-26.20.13031.18002", "RadeonR9M470X": "1002:6646-26.20.13031.18002", "QuadroP400": "10de:1cb3-30.0.15.1179", "RadeonVega6": "1002:1636-31.0.14057.5006", - "RTX3060": "10de:2489-31.0.15.1694", + "RTX3060": "10de:2489-31.0.15.3667", }[b.parts["cpu_or_gpu_value"]] if !ok { log.Fatalf("Entry %q not found in Win GPU mapping.", b.parts["cpu_or_gpu_value"]) @@ -1321,6 +1326,9 @@ func (b *jobBuilder) compile() string { if b.compiler("Clang") { b.asset("clang_win") } + if b.extraConfig("DWriteCore") { + b.asset("dwritecore") + } } else if b.matchOs("Mac") { b.cipd(CIPD_PKGS_XCODE...) b.Spec.Caches = append(b.Spec.Caches, &specs.Cache{ @@ -1638,6 +1646,10 @@ func (b *taskBuilder) commonTestPerfAssets() { } } } + + if b.matchOs("Win") && b.extraConfig("DWriteCore") { + b.asset("dwritecore") + } } // directUpload adds prerequisites for uploading to GCS. @@ -1716,6 +1728,9 @@ func (b *jobBuilder) dm() { if b.matchOs("Android") && b.extraConfig("ASAN") { b.asset("android_ndk_linux") } + if b.extraConfig("NativeFonts") && !b.matchOs("Android") { + b.needsFontsForParagraphTests() + } b.commonTestPerfAssets() if b.matchExtraConfig("Lottie") { b.asset("lottie-samples") @@ -1756,55 +1771,6 @@ func (b *jobBuilder) dm() { } } -func (b *jobBuilder) fm() { - goos := "linux" - if strings.Contains(b.parts["os"], "Win") { - goos = "windows" - } - if strings.Contains(b.parts["os"], "Mac") { - goos = "darwin" - } - - b.addTask(b.Name, func(b *taskBuilder) { - b.asset("skimage", "skp", "svg") - b.cas(CAS_TEST) - b.dep(b.buildTaskDrivers(goos, "amd64"), b.compile()) - b.cmd("./fm_driver${EXECUTABLE_SUFFIX}", - "--local=false", - "--resources=skia/resources", - "--imgs=skimage", - "--skps=skp", - "--svgs=svg", - "--project_id", "skia-swarming-bots", - "--task_id", specs.PLACEHOLDER_TASK_ID, - "--bot", b.Name, - "--gold="+strconv.FormatBool(!b.matchExtraConfig("SAN")), - "--gold_hashes_url", b.cfg.GoldHashesURL, - "build/fm${EXECUTABLE_SUFFIX}") - b.serviceAccount(b.cfg.ServiceAccountUploadGM) - b.swarmDimensions() - b.attempts(1) - - if b.isLinux() && b.matchExtraConfig("SAN") { - b.asset("clang_linux") - // Sanitizers may want to run llvm-symbolizer for readable stack traces. - b.addToPATH("clang_linux/bin") - - // Point sanitizer builds at our prebuilt libc++ for this sanitizer. - if b.extraConfig("MSAN") { - // We'd see false positives in std::basic_string if this weren't set. - b.envPrefixes("LD_LIBRARY_PATH", "clang_linux/msan") - } else if b.extraConfig("TSAN") { - // Occasional false positives may crop up in the standard library without this. - b.envPrefixes("LD_LIBRARY_PATH", "clang_linux/tsan") - } else { - // The machines we run on may not have libstdc++ installed. - b.envPrefixes("LD_LIBRARY_PATH", "clang_linux/lib/x86_64-unknown-linux-gnu") - } - } - }) -} - // canary generates a task that uses TaskDrivers to trigger canary manual rolls on autorollers. // Canary-G3 does not use this path because it is very different from other autorollers. func (b *jobBuilder) canary(rollerName, canaryCQKeyword, targetProjectBaseURL string) { diff --git a/infra/bots/gen_tasks_logic/job_builder.go b/infra/bots/gen_tasks_logic/job_builder.go index a0423b805e5e..96395a797ef9 100644 --- a/infra/bots/gen_tasks_logic/job_builder.go +++ b/infra/bots/gen_tasks_logic/job_builder.go @@ -180,10 +180,6 @@ func (b *jobBuilder) genTasksForJob() { b.dm() return } - if b.role("FM") { - b.fm() - return - } // Canary bots. if b.role("Canary") { diff --git a/infra/bots/gen_tasks_logic/task_builder.go b/infra/bots/gen_tasks_logic/task_builder.go index da1a08753490..b2625c817f01 100644 --- a/infra/bots/gen_tasks_logic/task_builder.go +++ b/infra/bots/gen_tasks_logic/task_builder.go @@ -302,6 +302,14 @@ func (b *taskBuilder) usesGSUtil() { b.addToPATH("gsutil/gsutil") } +// needsFontsForParagraphTests downloads the skparagraph CIPD package to +// a subdirectory of the Skia checkout: resources/extra_fonts +func (b *taskBuilder) needsFontsForParagraphTests() { + pkg := b.MustGetCipdPackageFromAsset("skparagraph") + pkg.Path = "skia/resources/extra_fonts" + b.cipd(pkg) +} + // recipeProp adds the given recipe property key/value pair. Panics if // getRecipeProps() was already called. func (b *taskBuilder) recipeProp(key, value string) { diff --git a/infra/bots/jobs.json b/infra/bots/jobs.json index 565aaa73148e..e86d3b105996 100644 --- a/infra/bots/jobs.json +++ b/infra/bots/jobs.json @@ -7,7 +7,10 @@ "name": "BazelBuild-base-enforce_iwyu-linux_x64", "cq_config": {} }, - {"name": "BazelBuild-modules_canvaskit-ck_full_webgl2_debug-linux_x64"}, + { + "name": "BazelBuild-modules_canvaskit-ck_full_webgl2_debug-linux_x64", + "cq_config": {} + }, {"name": "BazelBuild-example_hello_world_gl-release-linux_x64"}, { "name": "BazelBuild-example_hello_world_vulkan-release-linux_x64", @@ -65,19 +68,19 @@ {"name": "BazelTest-toolchain_layering_check-experimental_bazel_test_client-release-linux_x64"}, {"name": "BazelTest-precompiled-android_codec_test-pixel_5-linux_arm64"}, {"name": "BazelTest-precompiled-android_cpu_only_test-pixel_5-linux_arm64"}, - {"name": "Build-Debian10-GCC-x86-Debug-Docker"}, - {"name": "Build-Debian10-GCC-x86-Release-Docker"}, - {"name": "Build-Debian10-GCC-x86_64-Debug-Docker"}, + {"name": "Build-Debian11-GCC-x86-Debug-Docker"}, + {"name": "Build-Debian11-GCC-x86-Release-Docker"}, + {"name": "Build-Debian11-GCC-x86_64-Debug-Docker"}, { - "name": "Build-Debian10-GCC-x86_64-Debug-NoGPU_Docker", + "name": "Build-Debian11-GCC-x86_64-Debug-NoGPU_Docker", "cq_config": {} }, { - "name": "Build-Debian10-GCC-x86_64-Release-Docker", + "name": "Build-Debian11-GCC-x86_64-Release-Docker", "cq_config": {} }, - {"name": "Build-Debian10-GCC-x86_64-Release-NoGPU_Docker"}, - {"name": "Build-Debian10-GCC-x86_64-Release-Shared_Docker"}, + {"name": "Build-Debian11-GCC-x86_64-Release-NoGPU_Docker"}, + {"name": "Build-Debian11-GCC-x86_64-Release-Shared_Docker"}, { "name": "Build-Debian10-Clang-arm-Debug-Android", "cq_config": {} @@ -104,6 +107,7 @@ "cq_config": { "location_regexes": [ "(tests|src/gpu)/graphite/.*", + "src/sksl/generated/.*", "bazel/external/dawn/*", "DEPS" ] @@ -222,11 +226,12 @@ {"name": "Build-Debian11-Clang-x86_64-Release-TSAN_Vulkan"}, {"name": "Build-Debian11-Clang-x86_64-Release-Vulkan"}, {"name": "Build-Mac-Clang-arm64-Debug"}, - {"name": "Build-Mac-Clang-arm64-Debug-ANGLE"}, {"name": "Build-Mac-Clang-arm64-Debug-Android"}, + {"name": "Build-Mac-Clang-arm64-Debug-ANGLE"}, + {"name": "Build-Mac-Clang-arm64-Debug-Graphite_Metal_Vello"}, + {"name": "Build-Mac-Clang-arm64-Debug-iOS"}, {"name": "Build-Mac-Clang-arm64-Debug-Metal"}, {"name": "Build-Mac-Clang-arm64-Debug-Slug"}, - {"name": "Build-Mac-Clang-arm64-Debug-iOS"}, {"name": "Build-Mac-Clang-arm64-Debug-iOS_Metal"}, {"name": "Build-Mac-Xcode11.4.1-arm64-Debug-iOS_Metal"}, {"name": "Build-Mac-Xcode11.4.1-arm64-Debug-iOS"}, @@ -246,7 +251,8 @@ "name": "Build-Mac-Clang-x86_64-Debug-Graphite_Dawn", "cq_config": { "location_regexes": [ - "(tests|src/gpu)/graphite/.*" + "(tests|src/gpu)/graphite/.*", + "src/sksl/generated/.*" ] } }, @@ -254,7 +260,8 @@ "name": "Build-Mac-Clang-x86_64-Debug-Graphite_Metal", "cq_config": { "location_regexes": [ - "(tests|src/gpu)/graphite/.*" + "(tests|src/gpu)/graphite/.*", + "src/sksl/generated/.*" ] } }, @@ -269,7 +276,8 @@ "name": "Build-Mac-Clang-x86_64-Release-Graphite_Metal", "cq_config": { "location_regexes": [ - "(tests|src/gpu)/graphite/.*" + "(tests|src/gpu)/graphite/.*", + "src/sksl/generated/.*" ] } }, @@ -297,7 +305,8 @@ "name": "Build-Mac-Clang-arm64-Debug-ASAN_Graphite_Metal", "cq_config": { "location_regexes": [ - "(tests|src/gpu)/graphite/.*" + "(tests|src/gpu)/graphite/.*", + "src/sksl/generated/.*" ] } }, @@ -305,7 +314,8 @@ "name": "Build-Mac-Clang-arm64-Debug-iOS_Graphite_Metal", "cq_config": { "location_regexes": [ - "(tests|src/gpu)/graphite/.*" + "(tests|src/gpu)/graphite/.*", + "src/sksl/generated/.*" ] } }, @@ -316,7 +326,8 @@ "name": "Build-Mac-Clang-arm64-Release-Graphite_Metal", "cq_config": { "location_regexes": [ - "(tests|src/gpu)/graphite/.*" + "(tests|src/gpu)/graphite/.*", + "src/sksl/generated/.*" ] } }, @@ -324,7 +335,8 @@ "name": "Build-Mac-Clang-arm64-Release-iOS_Graphite_Metal", "cq_config": { "location_regexes": [ - "(tests|src/gpu)/graphite/.*" + "(tests|src/gpu)/graphite/.*", + "src/sksl/generated/.*" ] } }, @@ -338,6 +350,7 @@ {"name": "Build-Win-Clang-x86_64-Debug"}, {"name": "Build-Win-Clang-x86_64-Debug-ANGLE"}, {"name": "Build-Win-Clang-x86_64-Debug-Direct3D"}, + {"name": "Build-Win-Clang-x86_64-Debug-DWriteCore"}, {"name": "Build-Win-Clang-x86_64-Debug-ASAN"}, {"name": "Build-Win-Clang-x86_64-Debug-Dawn"}, {"name": "Build-Win-Clang-x86_64-Debug-Graphite_Dawn"}, @@ -380,7 +393,8 @@ "name": "Build-Win-MSVC-x86_64-Debug-Graphite_Vulkan", "cq_config": { "location_regexes": [ - "(tests|src/gpu)/graphite/.*" + "(tests|src/gpu)/graphite/.*", + "src/sksl/generated/.*" ] } }, @@ -418,7 +432,6 @@ {"name": "Canary-Flutter"}, {"name": "Canary-G3"}, {"name": "CodeSize-dm-Debian10-Clang-x86_64-OptimizeForSize"}, - {"name": "CodeSize-fm-Debian10-Clang-x86_64-OptimizeForSize"}, { "name": "CodeSize-skottie_tool-Debian10-Clang-x86_64-OptimizeForSize", "cq_config": {} @@ -429,16 +442,6 @@ "name": "CodeSize-skottie_tool_gpu-Debian10-Clang-arm-OptimizeForSize-Android", "cq_config": {} }, - {"name": "FM-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All"}, - {"name": "FM-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-ASAN"}, - {"name": "FM-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-MSAN"}, - {"name": "FM-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-TSAN"}, - {"name": "FM-Mac-Clang-VMware7.1-CPU-AVX-x86_64-Debug-All"}, - {"name": "FM-Mac-Clang-VMware7.1-CPU-AVX-x86_64-Debug-All-ASAN"}, - {"name": "FM-Mac-Clang-VMware7.1-CPU-AVX-x86_64-Release-All-TSAN"}, - {"name": "FM-Win-Clang-GCE-CPU-AVX2-x86_64-Debug-All"}, - {"name": "FM-Win-Clang-GCE-CPU-AVX2-x86_64-Debug-All-ASAN"}, - {"name": "FM-Win-MSVC-GCE-CPU-AVX2-x86_64-Debug-All"}, {"name": "Housekeeper-Nightly-RecreateSKPs_DryRun"}, { "name": "Housekeeper-OnDemand-Presubmit", @@ -513,15 +516,9 @@ {"name": "Perf-ChromeOS-Clang-Sparky360-GPU-IntelUHDGraphics605-x86_64-Release-All"}, {"name": "Perf-ChromeOS-Clang-Spin513-GPU-Adreno618-arm-Release-All"}, {"name": "Perf-ChromeOS-Clang-Spin514-GPU-RadeonVega3-x86_64-Release-All"}, - {"name": "Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All"}, - {"name": "Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-BonusConfigs"}, - {"name": "Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-ColorSpaces"}, - {"name": "Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-Fast"}, - {"name": "Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-SK_FORCE_RASTER_PIPELINE_BLITTER"}, - {"name": "Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-Wuffs"}, - {"name": "Perf-Debian10-Clang-GCE-CPU-AVX512-x86_64-OptimizeForSize-All"}, - {"name": "Perf-Debian10-Clang-GCE-CPU-AVX512-x86_64-Release-All"}, - {"name": "Perf-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Release-All-SwiftShader"}, + {"name": "Perf-Debian11-Clang-NUC11TZi5-CPU-AVX2-x86_64-Release-All"}, + {"name": "Perf-Debian11-Clang-NUC11TZi5-CPU-AVX2-x86_64-Release-All-BonusConfigs"}, + {"name": "Perf-Debian11-Clang-NUC11TZi5-CPU-AVX2-x86_64-Release-All-ColorSpaces"}, {"name": "Perf-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All"}, {"name": "Perf-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All-ASAN_Vulkan"}, {"name": "Perf-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All-SkottieTracing"}, @@ -552,7 +549,8 @@ "name": "Perf-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-Graphite_Metal", "cq_config": { "location_regexes": [ - "(tests|src/gpu)/graphite/.*" + "(tests|src/gpu)/graphite/.*", + "src/sksl/generated/.*" ] } }, @@ -562,7 +560,8 @@ "name": "Perf-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite_Metal", "cq_config": { "location_regexes": [ - "(tests|src/gpu)/graphite/.*" + "(tests|src/gpu)/graphite/.*", + "src/sksl/generated/.*" ] } }, @@ -604,7 +603,6 @@ {"name": "Perf-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All"}, {"name": "Perf-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All-Vulkan"}, {"name": "Perf-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All"}, - {"name": "Perf-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-ANGLE"}, {"name": "Perf-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-Vulkan"}, {"name": "Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All"}, {"name": "Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All-ANGLE"}, @@ -725,6 +723,7 @@ {"name": "Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-BonusConfigs"}, {"name": "Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-ColorSpaces"}, {"name": "Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-Fast"}, + {"name": "Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-MSAN"}, {"name": "Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-SKNX_NO_SIMD"}, {"name": "Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-SK_CPU_LIMIT_SSE2"}, {"name": "Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-SK_CPU_LIMIT_SSE41"}, @@ -826,6 +825,7 @@ "cq_config": { "location_regexes": [ "(tests|src/gpu)/graphite/.*", + "src/sksl/generated/.*", "dm/.+" ] } @@ -844,6 +844,7 @@ "cq_config": { "location_regexes": [ "(tests|src/gpu)/graphite/.*", + "src/sksl/generated/.*", "dm/.+" ] } @@ -855,6 +856,7 @@ "cq_config": { "location_regexes": [ "(tests|src/gpu)/graphite/.*", + "src/sksl/generated/.*", "dm/.+" ] } @@ -865,6 +867,7 @@ "cq_config": { "location_regexes": [ "(tests|src/gpu)/graphite/.*", + "src/sksl/generated/.*", "dm/.+" ] } @@ -878,6 +881,7 @@ "cq_config": { "location_regexes": [ "(tests|src/gpu)/graphite/.*", + "src/sksl/generated/.*", "dm/.+" ] } @@ -895,6 +899,7 @@ {"name": "Test-Mac13-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Metal"}, {"name": "Test-Mac13-Clang-MacMini9.1-CPU-AppleM1-arm64-Debug-All-NativeFonts"}, {"name": "Test-Mac13-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-NativeFonts"}, + {"name": "Test-Mac13-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Graphite_Metal_Vello"}, {"name": "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-DDL1"}, {"name": "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-DDL1_Vulkan"}, { @@ -902,6 +907,7 @@ "cq_config": {} }, {"name": "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Dawn"}, + {"name": "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Graphite_Vulkan"}, {"name": "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-PreAbandonGpuContext"}, { "name": "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Vulkan", @@ -912,6 +918,7 @@ "cq_config": {} }, {"name": "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-DDL3_TSAN"}, + {"name": "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Graphite_Vulkan"}, {"name": "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-PreAbandonGpuContext"}, {"name": "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Valgrind_AbandonGpuContext_SK_CPU_LIMIT_SSE41"}, {"name": "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Valgrind_PreAbandonGpuContext_SK_CPU_LIMIT_SSE41"}, @@ -940,6 +947,7 @@ {"name": "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-ReleaseAndAbandonGpuContext"}, {"name": "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Vulkan"}, {"name": "Test-Win10-Clang-NUC5i7RYH-CPU-AVX2-x86_64-Debug-All-NativeFonts"}, + {"name": "Test-Win10-Clang-NUC5i7RYH-CPU-AVX2-x86_64-Debug-All-NativeFonts_DWriteCore"}, {"name": "Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All"}, {"name": "Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE"}, {"name": "Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-All"}, @@ -964,10 +972,8 @@ {"name": "Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All"}, {"name": "Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All-Vulkan"}, {"name": "Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All"}, - {"name": "Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All-ANGLE"}, {"name": "Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All-Vulkan"}, {"name": "Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All"}, - {"name": "Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-ANGLE"}, {"name": "Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-Vulkan"}, {"name": "Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All"}, {"name": "Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE"}, @@ -1009,10 +1015,13 @@ "cq_config": { "location_regexes": [ "(tests|src/gpu)/graphite/.*", + "src/sksl/generated/.*", "dm/.+" ] } }, + {"name": "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Graphite_Vulkan"}, + {"name": "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Graphite_Vulkan"}, {"name": "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Vulkan"}, {"name": "Test-Win2019-Clang-GCE-CPU-AVX2-x86-Debug-All"}, {"name": "Test-Win2019-Clang-GCE-CPU-AVX2-x86-Release-All"}, diff --git a/infra/bots/recipe_modules/build/default.py b/infra/bots/recipe_modules/build/default.py index be24a1dbf7ee..3e5950a8a28d 100644 --- a/infra/bots/recipe_modules/build/default.py +++ b/infra/bots/recipe_modules/build/default.py @@ -78,6 +78,7 @@ def compile_fn(api, checkout_root, out_dir): clang_linux = str(api.vars.workdir.join('clang_linux')) win_toolchain = str(api.vars.workdir.join('win_toolchain')) + dwritecore = str(api.vars.workdir.join('dwritecore')) cc, cxx, ccache = None, None, None extra_cflags = [] @@ -313,6 +314,7 @@ def compile_fn(api, checkout_root, out_dir): 'target_os': 'ios' if 'iOS' in extra_tokens else '', 'win_sdk': win_toolchain + '/win_sdk' if 'Win' in os else '', 'win_vc': win_toolchain + '/VC' if 'Win' in os else '', + 'skia_dwritecore_sdk': dwritecore if 'DWriteCore' in extra_tokens else '', }.items(): if v: args[k] = '"%s"' % v diff --git a/infra/bots/recipe_modules/build/docker.py b/infra/bots/recipe_modules/build/docker.py index cb6137e9d58f..51e9d78b73f7 100644 --- a/infra/bots/recipe_modules/build/docker.py +++ b/infra/bots/recipe_modules/build/docker.py @@ -6,12 +6,12 @@ from . import util IMAGES = { - 'gcc-debian10': ( - 'gcr.io/skia-public/gcc-debian10@sha256:' - 'cd1dd99a3c423332a00998a20c4363aa1d5998b41f21e6e86ca016b412082777'), - 'gcc-debian10-x86': ( - 'gcr.io/skia-public/gcc-debian10-x86@sha256:' - 'e30b4616f842fa2fd89329abf3d8e81cf6c25e147640289f37692f18862515c8'), + 'gcc-debian11': ( + 'gcr.io/skia-public/gcc-debian11@sha256:' + '7d722ac227234b36b77d24ab470fd4e3e8deec812eb1b1145ad7c3751d32fb83'), + 'gcc-debian11-x86': ( + 'gcr.io/skia-public/gcc-debian11-x86@sha256:' + 'eb30682887c4c74c95f769aacab8a1a170eb561536ded87f0914f88b7243ba23'), } @@ -43,7 +43,7 @@ def compile_fn(api, checkout_root, out_dir): extra_tokens.remove('Shared') image_name = None - if os == 'Debian10' and compiler == 'GCC' and not extra_tokens: + if os == 'Debian11' and compiler == 'GCC' and not extra_tokens: args['cc'] = 'gcc' args['cxx'] = 'g++' # Newer GCC includes tons and tons of debugging symbols. This seems to @@ -51,9 +51,9 @@ def compile_fn(api, checkout_root, out_dir): # bugs in Swarming or recipe code). Use g1 to reduce it a bit. args['extra_cflags'].append('-g1') if target_arch == 'x86_64': - image_name = 'gcc-debian10' + image_name = 'gcc-debian11' elif target_arch == 'x86': - image_name = 'gcc-debian10-x86' + image_name = 'gcc-debian11-x86' if not image_name: raise Exception('Not implemented: ' + api.vars.builder_name) diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-arm-Release-Chromebook_GLES.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-arm-Release-Chromebook_GLES.json index 6315bf65d131..513e67f4a413 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-arm-Release-Chromebook_GLES.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-arm-Release-Chromebook_GLES.json @@ -65,7 +65,7 @@ { "cmd": [ "python", - "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", + "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', '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-arm-Release-Chromebook_GLES/Release", "[START_DIR]/[SWARM_OUT_DIR]/out/Release" ], @@ -80,7 +80,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-ASAN_Graphite_Vulkan.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-ASAN_Graphite_Vulkan.json index 160ef2abad24..70a3d02e6dde 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-ASAN_Graphite_Vulkan.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-ASAN_Graphite_Vulkan.json @@ -100,7 +100,7 @@ { "cmd": [ "python", - "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", + "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', '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-ASAN_Graphite_Vulkan/Debug", "[START_DIR]/[SWARM_OUT_DIR]/out/Debug" ], @@ -115,7 +115,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-AVIF.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-AVIF.json index 2aaa4252492e..b65808913b2f 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-AVIF.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-AVIF.json @@ -100,7 +100,7 @@ { "cmd": [ "python", - "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", + "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', '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-AVIF/Debug", "[START_DIR]/[SWARM_OUT_DIR]/out/Debug" ], @@ -115,7 +115,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-Chromebook_GLES.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-Chromebook_GLES.json index 307b2e4cd416..db3ad8c972ee 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-Chromebook_GLES.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-Chromebook_GLES.json @@ -62,7 +62,7 @@ { "cmd": [ "python", - "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", + "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', '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-Chromebook_GLES/Debug", "[START_DIR]/[SWARM_OUT_DIR]/out/Debug" ], @@ -77,7 +77,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-Coverage.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-Coverage.json index af6cbaf2f681..7b9873dd07eb 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-Coverage.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-Coverage.json @@ -100,7 +100,7 @@ { "cmd": [ "python", - "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", + "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', '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-Coverage/Debug", "[START_DIR]/[SWARM_OUT_DIR]/out/Debug" ], @@ -115,7 +115,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-MSAN.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-MSAN.json index 20d6e6b4e042..bc6f60937fde 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-MSAN.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-MSAN.json @@ -100,7 +100,7 @@ { "cmd": [ "python", - "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", + "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', '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-MSAN/Debug", "[START_DIR]/[SWARM_OUT_DIR]/out/Debug" ], @@ -115,7 +115,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-SK_CPU_LIMIT_SSE41.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-SK_CPU_LIMIT_SSE41.json index c8346c46cc34..814a7def29a4 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-SK_CPU_LIMIT_SSE41.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-SK_CPU_LIMIT_SSE41.json @@ -100,7 +100,7 @@ { "cmd": [ "python", - "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", + "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', '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-SK_CPU_LIMIT_SSE41/Debug", "[START_DIR]/[SWARM_OUT_DIR]/out/Debug" ], @@ -115,7 +115,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-SafeStack.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-SafeStack.json index 06734b029ea3..4d172a1c5708 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-SafeStack.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-SafeStack.json @@ -100,7 +100,7 @@ { "cmd": [ "python", - "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", + "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', '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-SafeStack/Debug", "[START_DIR]/[SWARM_OUT_DIR]/out/Debug" ], @@ -115,7 +115,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-SwiftShader_Graphite.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-SwiftShader_Graphite.json index 7479dd4ae35f..35bec30dfdb2 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-SwiftShader_Graphite.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-SwiftShader_Graphite.json @@ -151,7 +151,7 @@ { "cmd": [ "python", - "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", + "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', '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_Graphite/Debug", "[START_DIR]/[SWARM_OUT_DIR]/out/Debug" ], @@ -166,7 +166,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", @@ -188,7 +188,7 @@ { "cmd": [ "python", - "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", + "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', '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_Graphite/Debug/swiftshader_out", "[START_DIR]/[SWARM_OUT_DIR]/swiftshader_out" ], @@ -203,7 +203,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-SwiftShader_MSAN.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-SwiftShader_MSAN.json index 7ca541c3f826..f1e23014554a 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-SwiftShader_MSAN.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-SwiftShader_MSAN.json @@ -154,7 +154,7 @@ { "cmd": [ "python", - "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", + "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', '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_MSAN/Debug", "[START_DIR]/[SWARM_OUT_DIR]/out/Debug" ], @@ -169,7 +169,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", @@ -191,7 +191,7 @@ { "cmd": [ "python", - "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", + "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', '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_MSAN/Debug/swiftshader_out", "[START_DIR]/[SWARM_OUT_DIR]/swiftshader_out" ], @@ -206,7 +206,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-TSAN.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-TSAN.json index b6345265cbfc..78c9a63e9cee 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-TSAN.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-TSAN.json @@ -100,7 +100,7 @@ { "cmd": [ "python", - "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", + "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', '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-TSAN/Debug", "[START_DIR]/[SWARM_OUT_DIR]/out/Debug" ], @@ -115,7 +115,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-Tidy.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-Tidy.json index dc9fe4ef0152..dfa3598a5b74 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-Tidy.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-Tidy.json @@ -60,7 +60,7 @@ { "cmd": [ "python", - "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", + "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', '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-Tidy/Debug", "[START_DIR]/[SWARM_OUT_DIR]/out/Debug" ], @@ -75,7 +75,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", 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 index 51c5b6dbf664..94accbd9485e 100644 --- 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 @@ -100,7 +100,7 @@ { "cmd": [ "python", - "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", + "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', '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" ], @@ -115,7 +115,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-Wuffs.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-Wuffs.json index e479455b6198..bec2a907c1c0 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-Wuffs.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Debug-Wuffs.json @@ -100,7 +100,7 @@ { "cmd": [ "python", - "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", + "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', '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-Wuffs/Debug", "[START_DIR]/[SWARM_OUT_DIR]/out/Debug" ], @@ -115,7 +115,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-OptimizeForSize.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-OptimizeForSize.json index 02cece933989..7b9a5957d732 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-OptimizeForSize.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-OptimizeForSize.json @@ -100,7 +100,7 @@ { "cmd": [ "python", - "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", + "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', '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-OptimizeForSize/OptimizeForSize", "[START_DIR]/[SWARM_OUT_DIR]/out/OptimizeForSize" ], @@ -115,7 +115,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Release-ANGLE.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Release-ANGLE.json index 33a331171ad2..6befe87cca99 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Release-ANGLE.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Release-ANGLE.json @@ -100,7 +100,7 @@ { "cmd": [ "python", - "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", + "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', '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-Release-ANGLE/Release", "[START_DIR]/[SWARM_OUT_DIR]/out/Release" ], @@ -115,7 +115,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Release-ASAN.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Release-ASAN.json index b99c0451cf13..fc379e74505c 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Release-ASAN.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Release-ASAN.json @@ -100,7 +100,7 @@ { "cmd": [ "python", - "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", + "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', '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-Release-ASAN/Release", "[START_DIR]/[SWARM_OUT_DIR]/out/Release" ], @@ -115,7 +115,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Release-AVIF.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Release-AVIF.json index d4b6eea73f64..011ee76f3406 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Release-AVIF.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Release-AVIF.json @@ -100,7 +100,7 @@ { "cmd": [ "python", - "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", + "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', '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-Release-AVIF/Release", "[START_DIR]/[SWARM_OUT_DIR]/out/Release" ], @@ -115,7 +115,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Release-CMake.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Release-CMake.json index 54a8bfb39e76..f4507e2abff4 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Release-CMake.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Release-CMake.json @@ -36,7 +36,7 @@ { "cmd": [ "python", - "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", + "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', '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-Release-CMake/Release", "[START_DIR]/[SWARM_OUT_DIR]/out/Release" ], @@ -51,7 +51,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Release-Fast.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Release-Fast.json index 6edb33919a46..19f30e192b5b 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Release-Fast.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Release-Fast.json @@ -100,7 +100,7 @@ { "cmd": [ "python", - "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", + "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', '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-Release-Fast/Release", "[START_DIR]/[SWARM_OUT_DIR]/out/Release" ], @@ -115,7 +115,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Release-NoDEPS.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Release-NoDEPS.json index f8cc3cee9175..6376101410fd 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Release-NoDEPS.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Release-NoDEPS.json @@ -100,7 +100,7 @@ { "cmd": [ "python", - "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", + "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', '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-Release-NoDEPS/Release", "[START_DIR]/[SWARM_OUT_DIR]/out/Release" ], @@ -115,7 +115,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Release-Static.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Release-Static.json index 3ec5c0d55410..26d405cf059a 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Release-Static.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Release-Static.json @@ -100,7 +100,7 @@ { "cmd": [ "python", - "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", + "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', '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-Release-Static/Release", "[START_DIR]/[SWARM_OUT_DIR]/out/Release" ], @@ -115,7 +115,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Release-SwiftShader.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Release-SwiftShader.json index cc91049159cb..a031d882e803 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Release-SwiftShader.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Release-SwiftShader.json @@ -151,7 +151,7 @@ { "cmd": [ "python", - "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", + "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', '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-Release-SwiftShader/Release", "[START_DIR]/[SWARM_OUT_DIR]/out/Release" ], @@ -166,7 +166,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", @@ -188,7 +188,7 @@ { "cmd": [ "python", - "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", + "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', '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-Release-SwiftShader/Release/swiftshader_out", "[START_DIR]/[SWARM_OUT_DIR]/swiftshader_out" ], @@ -203,7 +203,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Release-Vulkan.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Release-Vulkan.json index 360911cd433a..5369a21e1d23 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Release-Vulkan.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-Clang-x86_64-Release-Vulkan.json @@ -100,7 +100,7 @@ { "cmd": [ "python", - "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", + "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', '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-Release-Vulkan/Release", "[START_DIR]/[SWARM_OUT_DIR]/out/Release" ], @@ -115,7 +115,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-GCC-x86-Debug-Docker.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian11-GCC-x86-Debug-Docker.json similarity index 73% rename from infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-GCC-x86-Debug-Docker.json rename to infra/bots/recipe_modules/build/examples/full.expected/Build-Debian11-GCC-x86-Debug-Docker.json index 2dda6d4c38be..e96338492ca9 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-GCC-x86-Debug-Docker.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian11-GCC-x86-Debug-Docker.json @@ -26,7 +26,7 @@ "ensure-directory", "--mode", "0777", - "[START_DIR]/cache/work/skia/out/Build-Debian10-GCC-x86-Debug-Docker/Debug" + "[START_DIR]/cache/work/skia/out/Build-Debian11-GCC-x86-Debug-Docker/Debug" ], "infra_step": true, "name": "Docker setup.mkdirs out_dir", @@ -38,10 +38,10 @@ "cmd": [ "chmod", "777", - "[START_DIR]/cache/work/skia/out/Build-Debian10-GCC-x86-Debug-Docker/Debug" + "[START_DIR]/cache/work/skia/out/Build-Debian11-GCC-x86-Debug-Docker/Debug" ], "infra_step": true, - "name": "Docker setup.chmod 777 [START_DIR]/cache/work/skia/out/Build-Debian10-GCC-x86-Debug-Docker/Debug", + "name": "Docker setup.chmod 777 [START_DIR]/cache/work/skia/out/Build-Debian11-GCC-x86-Debug-Docker/Debug", "~followup_annotations": [ "@@@STEP_NEST_LEVEL@1@@@" ] @@ -81,10 +81,10 @@ "--mount", "type=bind,source=[START_DIR]/cache/work,target=/SRC", "--mount", - "type=bind,source=[START_DIR]/cache/work/skia/out/Build-Debian10-GCC-x86-Debug-Docker/Debug,target=/OUT", - "gcr.io/skia-public/gcc-debian10-x86@sha256:e30b4616f842fa2fd89329abf3d8e81cf6c25e147640289f37692f18862515c8", + "type=bind,source=[START_DIR]/cache/work/skia/out/Build-Debian11-GCC-x86-Debug-Docker/Debug,target=/OUT", + "gcr.io/skia-public/gcc-debian11-x86@sha256:eb30682887c4c74c95f769aacab8a1a170eb561536ded87f0914f88b7243ba23", "/SRC/../RECIPE_MODULE[skia::build]/resources/docker-compile.sh", - "cc=\"gcc\" cxx=\"g++\" extra_cflags=[\"-O1\",\"-g1\",\"-DREBUILD_IF_CHANGED_docker_image=gcr.io/skia-public/gcc-debian10-x86@sha256:e30b4616f842fa2fd89329abf3d8e81cf6c25e147640289f37692f18862515c8\"] extra_ldflags=[] target_cpu=\"x86\" werror=true" + "cc=\"gcc\" cxx=\"g++\" extra_cflags=[\"-O1\",\"-g1\",\"-DREBUILD_IF_CHANGED_docker_image=gcr.io/skia-public/gcc-debian11-x86@sha256:eb30682887c4c74c95f769aacab8a1a170eb561536ded87f0914f88b7243ba23\"] extra_ldflags=[] target_cpu=\"x86\" werror=true" ], "env": { "CHROME_HEADLESS": "1", @@ -96,8 +96,8 @@ { "cmd": [ "python", - "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-GCC-x86-Debug-Docker/Debug", + "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', '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-Debian11-GCC-x86-Debug-Docker/Debug", "[START_DIR]/[SWARM_OUT_DIR]/out/Debug" ], "infra_step": true, @@ -111,7 +111,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-GCC-x86_64-Debug-Docker.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian11-GCC-x86_64-Debug-Docker.json similarity index 73% rename from infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-GCC-x86_64-Debug-Docker.json rename to infra/bots/recipe_modules/build/examples/full.expected/Build-Debian11-GCC-x86_64-Debug-Docker.json index b43b7281405a..a13882de8983 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-GCC-x86_64-Debug-Docker.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian11-GCC-x86_64-Debug-Docker.json @@ -26,7 +26,7 @@ "ensure-directory", "--mode", "0777", - "[START_DIR]/cache/work/skia/out/Build-Debian10-GCC-x86_64-Debug-Docker/Debug" + "[START_DIR]/cache/work/skia/out/Build-Debian11-GCC-x86_64-Debug-Docker/Debug" ], "infra_step": true, "name": "Docker setup.mkdirs out_dir", @@ -38,10 +38,10 @@ "cmd": [ "chmod", "777", - "[START_DIR]/cache/work/skia/out/Build-Debian10-GCC-x86_64-Debug-Docker/Debug" + "[START_DIR]/cache/work/skia/out/Build-Debian11-GCC-x86_64-Debug-Docker/Debug" ], "infra_step": true, - "name": "Docker setup.chmod 777 [START_DIR]/cache/work/skia/out/Build-Debian10-GCC-x86_64-Debug-Docker/Debug", + "name": "Docker setup.chmod 777 [START_DIR]/cache/work/skia/out/Build-Debian11-GCC-x86_64-Debug-Docker/Debug", "~followup_annotations": [ "@@@STEP_NEST_LEVEL@1@@@" ] @@ -81,10 +81,10 @@ "--mount", "type=bind,source=[START_DIR]/cache/work,target=/SRC", "--mount", - "type=bind,source=[START_DIR]/cache/work/skia/out/Build-Debian10-GCC-x86_64-Debug-Docker/Debug,target=/OUT", - "gcr.io/skia-public/gcc-debian10@sha256:cd1dd99a3c423332a00998a20c4363aa1d5998b41f21e6e86ca016b412082777", + "type=bind,source=[START_DIR]/cache/work/skia/out/Build-Debian11-GCC-x86_64-Debug-Docker/Debug,target=/OUT", + "gcr.io/skia-public/gcc-debian11@sha256:7d722ac227234b36b77d24ab470fd4e3e8deec812eb1b1145ad7c3751d32fb83", "/SRC/../RECIPE_MODULE[skia::build]/resources/docker-compile.sh", - "cc=\"gcc\" cxx=\"g++\" extra_cflags=[\"-O1\",\"-g1\",\"-DREBUILD_IF_CHANGED_docker_image=gcr.io/skia-public/gcc-debian10@sha256:cd1dd99a3c423332a00998a20c4363aa1d5998b41f21e6e86ca016b412082777\"] extra_ldflags=[] target_cpu=\"x86_64\" werror=true" + "cc=\"gcc\" cxx=\"g++\" extra_cflags=[\"-O1\",\"-g1\",\"-DREBUILD_IF_CHANGED_docker_image=gcr.io/skia-public/gcc-debian11@sha256:7d722ac227234b36b77d24ab470fd4e3e8deec812eb1b1145ad7c3751d32fb83\"] extra_ldflags=[] target_cpu=\"x86_64\" werror=true" ], "env": { "CHROME_HEADLESS": "1", @@ -96,8 +96,8 @@ { "cmd": [ "python", - "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-GCC-x86_64-Debug-Docker/Debug", + "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', '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-Debian11-GCC-x86_64-Debug-Docker/Debug", "[START_DIR]/[SWARM_OUT_DIR]/out/Debug" ], "infra_step": true, @@ -111,7 +111,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-GCC-x86_64-Release-NoGPU_Docker.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian11-GCC-x86_64-Release-NoGPU_Docker.json similarity index 74% rename from infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-GCC-x86_64-Release-NoGPU_Docker.json rename to infra/bots/recipe_modules/build/examples/full.expected/Build-Debian11-GCC-x86_64-Release-NoGPU_Docker.json index 763f5a84d3d6..3da86d037ff9 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-GCC-x86_64-Release-NoGPU_Docker.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian11-GCC-x86_64-Release-NoGPU_Docker.json @@ -26,7 +26,7 @@ "ensure-directory", "--mode", "0777", - "[START_DIR]/cache/work/skia/out/Build-Debian10-GCC-x86_64-Release-NoGPU_Docker/Release" + "[START_DIR]/cache/work/skia/out/Build-Debian11-GCC-x86_64-Release-NoGPU_Docker/Release" ], "infra_step": true, "name": "Docker setup.mkdirs out_dir", @@ -38,10 +38,10 @@ "cmd": [ "chmod", "777", - "[START_DIR]/cache/work/skia/out/Build-Debian10-GCC-x86_64-Release-NoGPU_Docker/Release" + "[START_DIR]/cache/work/skia/out/Build-Debian11-GCC-x86_64-Release-NoGPU_Docker/Release" ], "infra_step": true, - "name": "Docker setup.chmod 777 [START_DIR]/cache/work/skia/out/Build-Debian10-GCC-x86_64-Release-NoGPU_Docker/Release", + "name": "Docker setup.chmod 777 [START_DIR]/cache/work/skia/out/Build-Debian11-GCC-x86_64-Release-NoGPU_Docker/Release", "~followup_annotations": [ "@@@STEP_NEST_LEVEL@1@@@" ] @@ -81,10 +81,10 @@ "--mount", "type=bind,source=[START_DIR]/cache/work,target=/SRC", "--mount", - "type=bind,source=[START_DIR]/cache/work/skia/out/Build-Debian10-GCC-x86_64-Release-NoGPU_Docker/Release,target=/OUT", - "gcr.io/skia-public/gcc-debian10@sha256:cd1dd99a3c423332a00998a20c4363aa1d5998b41f21e6e86ca016b412082777", + "type=bind,source=[START_DIR]/cache/work/skia/out/Build-Debian11-GCC-x86_64-Release-NoGPU_Docker/Release,target=/OUT", + "gcr.io/skia-public/gcc-debian11@sha256:7d722ac227234b36b77d24ab470fd4e3e8deec812eb1b1145ad7c3751d32fb83", "/SRC/../RECIPE_MODULE[skia::build]/resources/docker-compile.sh", - "cc=\"gcc\" cxx=\"g++\" extra_cflags=[\"-g1\",\"-DREBUILD_IF_CHANGED_docker_image=gcr.io/skia-public/gcc-debian10@sha256:cd1dd99a3c423332a00998a20c4363aa1d5998b41f21e6e86ca016b412082777\"] extra_ldflags=[] is_debug=false skia_enable_ganesh=false target_cpu=\"x86_64\" werror=true" + "cc=\"gcc\" cxx=\"g++\" extra_cflags=[\"-g1\",\"-DREBUILD_IF_CHANGED_docker_image=gcr.io/skia-public/gcc-debian11@sha256:7d722ac227234b36b77d24ab470fd4e3e8deec812eb1b1145ad7c3751d32fb83\"] extra_ldflags=[] is_debug=false skia_enable_ganesh=false target_cpu=\"x86_64\" werror=true" ], "env": { "CHROME_HEADLESS": "1", @@ -96,8 +96,8 @@ { "cmd": [ "python", - "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-GCC-x86_64-Release-NoGPU_Docker/Release", + "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', '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-Debian11-GCC-x86_64-Release-NoGPU_Docker/Release", "[START_DIR]/[SWARM_OUT_DIR]/out/Release" ], "infra_step": true, @@ -111,7 +111,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-GCC-x86_64-Release-Shared_Docker.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian11-GCC-x86_64-Release-Shared_Docker.json similarity index 74% rename from infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-GCC-x86_64-Release-Shared_Docker.json rename to infra/bots/recipe_modules/build/examples/full.expected/Build-Debian11-GCC-x86_64-Release-Shared_Docker.json index 59a33961e757..9dcf9f06ee41 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian10-GCC-x86_64-Release-Shared_Docker.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Debian11-GCC-x86_64-Release-Shared_Docker.json @@ -26,7 +26,7 @@ "ensure-directory", "--mode", "0777", - "[START_DIR]/cache/work/skia/out/Build-Debian10-GCC-x86_64-Release-Shared_Docker/Release" + "[START_DIR]/cache/work/skia/out/Build-Debian11-GCC-x86_64-Release-Shared_Docker/Release" ], "infra_step": true, "name": "Docker setup.mkdirs out_dir", @@ -38,10 +38,10 @@ "cmd": [ "chmod", "777", - "[START_DIR]/cache/work/skia/out/Build-Debian10-GCC-x86_64-Release-Shared_Docker/Release" + "[START_DIR]/cache/work/skia/out/Build-Debian11-GCC-x86_64-Release-Shared_Docker/Release" ], "infra_step": true, - "name": "Docker setup.chmod 777 [START_DIR]/cache/work/skia/out/Build-Debian10-GCC-x86_64-Release-Shared_Docker/Release", + "name": "Docker setup.chmod 777 [START_DIR]/cache/work/skia/out/Build-Debian11-GCC-x86_64-Release-Shared_Docker/Release", "~followup_annotations": [ "@@@STEP_NEST_LEVEL@1@@@" ] @@ -81,10 +81,10 @@ "--mount", "type=bind,source=[START_DIR]/cache/work,target=/SRC", "--mount", - "type=bind,source=[START_DIR]/cache/work/skia/out/Build-Debian10-GCC-x86_64-Release-Shared_Docker/Release,target=/OUT", - "gcr.io/skia-public/gcc-debian10@sha256:cd1dd99a3c423332a00998a20c4363aa1d5998b41f21e6e86ca016b412082777", + "type=bind,source=[START_DIR]/cache/work/skia/out/Build-Debian11-GCC-x86_64-Release-Shared_Docker/Release,target=/OUT", + "gcr.io/skia-public/gcc-debian11@sha256:7d722ac227234b36b77d24ab470fd4e3e8deec812eb1b1145ad7c3751d32fb83", "/SRC/../RECIPE_MODULE[skia::build]/resources/docker-compile.sh", - "cc=\"gcc\" cxx=\"g++\" extra_cflags=[\"-g1\",\"-DREBUILD_IF_CHANGED_docker_image=gcr.io/skia-public/gcc-debian10@sha256:cd1dd99a3c423332a00998a20c4363aa1d5998b41f21e6e86ca016b412082777\"] extra_ldflags=[] is_component_build=true is_debug=false target_cpu=\"x86_64\" werror=true" + "cc=\"gcc\" cxx=\"g++\" extra_cflags=[\"-g1\",\"-DREBUILD_IF_CHANGED_docker_image=gcr.io/skia-public/gcc-debian11@sha256:7d722ac227234b36b77d24ab470fd4e3e8deec812eb1b1145ad7c3751d32fb83\"] extra_ldflags=[] is_component_build=true is_debug=false target_cpu=\"x86_64\" werror=true" ], "env": { "CHROME_HEADLESS": "1", @@ -96,8 +96,8 @@ { "cmd": [ "python", - "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-GCC-x86_64-Release-Shared_Docker/Release", + "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', '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-Debian11-GCC-x86_64-Release-Shared_Docker/Release", "[START_DIR]/[SWARM_OUT_DIR]/out/Release" ], "infra_step": true, @@ -111,7 +111,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Debug-Graphite_Dawn.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Debug-Graphite_Dawn.json index 0bce58ef8c27..9985bdec02c9 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Debug-Graphite_Dawn.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Debug-Graphite_Dawn.json @@ -125,7 +125,7 @@ { "cmd": [ "python", - "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", + "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', '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-Mac-Clang-arm64-Debug-Graphite_Dawn/Debug", "[START_DIR]/[SWARM_OUT_DIR]/out/Debug" ], @@ -140,7 +140,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Debug-Graphite_Dawn_NoGpu.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Debug-Graphite_Dawn_NoGpu.json index 61e20476c633..6c4cb754ff87 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Debug-Graphite_Dawn_NoGpu.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Debug-Graphite_Dawn_NoGpu.json @@ -125,7 +125,7 @@ { "cmd": [ "python", - "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", + "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', '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-Mac-Clang-arm64-Debug-Graphite_Dawn_NoGpu/Debug", "[START_DIR]/[SWARM_OUT_DIR]/out/Debug" ], @@ -140,7 +140,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Debug-Graphite_Dawn_NoPrecompile.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Debug-Graphite_Dawn_NoPrecompile.json index 494ddacb06ce..46a2b744c27c 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Debug-Graphite_Dawn_NoPrecompile.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Debug-Graphite_Dawn_NoPrecompile.json @@ -125,7 +125,7 @@ { "cmd": [ "python", - "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", + "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', '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-Mac-Clang-arm64-Debug-Graphite_Dawn_NoPrecompile/Debug", "[START_DIR]/[SWARM_OUT_DIR]/out/Debug" ], @@ -140,7 +140,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Debug-Graphite_Metal.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Debug-Graphite_Metal.json index 7c5c24cc7e01..37095b4e2051 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Debug-Graphite_Metal.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Debug-Graphite_Metal.json @@ -121,7 +121,7 @@ { "cmd": [ "python", - "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", + "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', '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-Mac-Clang-arm64-Debug-Graphite_Metal/Debug", "[START_DIR]/[SWARM_OUT_DIR]/out/Debug" ], @@ -136,7 +136,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Debug-Graphite_Metal_NoGpu.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Debug-Graphite_Metal_NoGpu.json index 4b2cad8db009..8ba45fbad057 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Debug-Graphite_Metal_NoGpu.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Debug-Graphite_Metal_NoGpu.json @@ -121,7 +121,7 @@ { "cmd": [ "python", - "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", + "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', '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-Mac-Clang-arm64-Debug-Graphite_Metal_NoGpu/Debug", "[START_DIR]/[SWARM_OUT_DIR]/out/Debug" ], @@ -136,7 +136,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Debug-Graphite_Metal_NoPrecompile.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Debug-Graphite_Metal_NoPrecompile.json index d26065f465cd..2d7e71321002 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Debug-Graphite_Metal_NoPrecompile.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Debug-Graphite_Metal_NoPrecompile.json @@ -121,7 +121,7 @@ { "cmd": [ "python", - "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", + "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', '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-Mac-Clang-arm64-Debug-Graphite_Metal_NoPrecompile/Debug", "[START_DIR]/[SWARM_OUT_DIR]/out/Debug" ], @@ -136,7 +136,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Debug-iOS.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Debug-iOS.json index 4f0b1171c380..c46f68c382e8 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Debug-iOS.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Debug-iOS.json @@ -121,7 +121,7 @@ { "cmd": [ "python", - "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", + "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', '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-Mac-Clang-arm64-Debug-iOS/Debug", "[START_DIR]/[SWARM_OUT_DIR]/out/Debug" ], @@ -136,7 +136,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Release-Graphite_Dawn.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Release-Graphite_Dawn.json index 53e269285996..3950f97069ae 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Release-Graphite_Dawn.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Release-Graphite_Dawn.json @@ -125,7 +125,7 @@ { "cmd": [ "python", - "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", + "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', '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-Mac-Clang-arm64-Release-Graphite_Dawn/Release", "[START_DIR]/[SWARM_OUT_DIR]/out/Release" ], @@ -140,7 +140,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Release-Graphite_Metal.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Release-Graphite_Metal.json index 5185b043d1e0..8a894d0d7e32 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Release-Graphite_Metal.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-arm64-Release-Graphite_Metal.json @@ -121,7 +121,7 @@ { "cmd": [ "python", - "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", + "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', '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-Mac-Clang-arm64-Release-Graphite_Metal/Release", "[START_DIR]/[SWARM_OUT_DIR]/out/Release" ], @@ -136,7 +136,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-x86_64-Debug-ASAN.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-x86_64-Debug-ASAN.json index 08c297bdaf62..908c01eb6fc5 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-x86_64-Debug-ASAN.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-x86_64-Debug-ASAN.json @@ -121,7 +121,7 @@ { "cmd": [ "python", - "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", + "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', '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-Mac-Clang-x86_64-Debug-ASAN/Debug", "[START_DIR]/[SWARM_OUT_DIR]/out/Debug" ], @@ -136,7 +136,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-x86_64-Debug-Metal.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-x86_64-Debug-Metal.json index 19d23f41f0f8..910be78d66bd 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-x86_64-Debug-Metal.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-x86_64-Debug-Metal.json @@ -121,7 +121,7 @@ { "cmd": [ "python", - "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", + "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', '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-Mac-Clang-x86_64-Debug-Metal/Debug", "[START_DIR]/[SWARM_OUT_DIR]/out/Debug" ], @@ -136,7 +136,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-x86_64-Release-Graphite_Metal_Vello.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-x86_64-Release-Graphite_Metal_Vello.json index 3e330b578d80..78ebc9d1d7a3 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-x86_64-Release-Graphite_Metal_Vello.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Clang-x86_64-Release-Graphite_Metal_Vello.json @@ -121,7 +121,7 @@ { "cmd": [ "python", - "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", + "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', '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-Mac-Clang-x86_64-Release-Graphite_Metal_Vello/Release", "[START_DIR]/[SWARM_OUT_DIR]/out/Release" ], @@ -136,7 +136,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Xcode11.4.1-arm64-Debug-iOS.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Xcode11.4.1-arm64-Debug-iOS.json index 4703f565df8d..c0bb091e0611 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Xcode11.4.1-arm64-Debug-iOS.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Mac-Xcode11.4.1-arm64-Debug-iOS.json @@ -121,7 +121,7 @@ { "cmd": [ "python", - "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", + "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', '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-Mac-Xcode11.4.1-arm64-Debug-iOS/Debug", "[START_DIR]/[SWARM_OUT_DIR]/out/Debug" ], @@ -136,7 +136,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86-Debug-Exceptions.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86-Debug-Exceptions.json index a23658b5de09..e7812e431309 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86-Debug-Exceptions.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86-Debug-Exceptions.json @@ -60,7 +60,7 @@ { "cmd": [ "python", - "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", + "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', '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-Win-Clang-x86-Debug-Exceptions\\Debug", "[START_DIR]\\[SWARM_OUT_DIR]\\out\\Debug" ], @@ -75,7 +75,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Debug-ANGLE.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Debug-ANGLE.json index 6c1e16624114..870d92187872 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Debug-ANGLE.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Debug-ANGLE.json @@ -60,7 +60,7 @@ { "cmd": [ "python", - "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", + "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', '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-Win-Clang-x86_64-Debug-ANGLE\\Debug_x64", "[START_DIR]\\[SWARM_OUT_DIR]\\out\\Debug_x64" ], @@ -75,7 +75,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Release-Dawn.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Release-Dawn.json index 16ff4ba7cde2..dffce51ee1d3 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Release-Dawn.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Release-Dawn.json @@ -62,7 +62,7 @@ { "cmd": [ "python", - "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", + "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', '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-Win-Clang-x86_64-Release-Dawn\\Release_x64", "[START_DIR]\\[SWARM_OUT_DIR]\\out\\Release_x64" ], @@ -77,7 +77,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Release-Direct3D.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Release-Direct3D.json index 71e8c58de71d..afbf7549d4ce 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Release-Direct3D.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Release-Direct3D.json @@ -60,7 +60,7 @@ { "cmd": [ "python", - "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", + "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', '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-Win-Clang-x86_64-Release-Direct3D\\Release_x64", "[START_DIR]\\[SWARM_OUT_DIR]\\out\\Release_x64" ], @@ -75,7 +75,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Release-Graphite_Vulkan.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Release-Graphite_Vulkan.json index 5e6e31308da5..73564a3a728d 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Release-Graphite_Vulkan.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Release-Graphite_Vulkan.json @@ -60,7 +60,7 @@ { "cmd": [ "python", - "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", + "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', '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-Win-Clang-x86_64-Release-Graphite_Vulkan\\Release_x64", "[START_DIR]\\[SWARM_OUT_DIR]\\out\\Release_x64" ], @@ -75,7 +75,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Release-Shared.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Release-Shared.json index f05ed974d0ea..c319cdd3b095 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Release-Shared.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Release-Shared.json @@ -60,7 +60,7 @@ { "cmd": [ "python", - "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", + "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', '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-Win-Clang-x86_64-Release-Shared\\Release_x64", "[START_DIR]\\[SWARM_OUT_DIR]\\out\\Release_x64" ], @@ -75,7 +75,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Release-Vulkan.json b/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Release-Vulkan.json index caea5a44b4ce..f45611bd412d 100644 --- a/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Release-Vulkan.json +++ b/infra/bots/recipe_modules/build/examples/full.expected/Build-Win-Clang-x86_64-Release-Vulkan.json @@ -60,7 +60,7 @@ { "cmd": [ "python", - "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", + "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', '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-Win-Clang-x86_64-Release-Vulkan\\Release_x64", "[START_DIR]\\[SWARM_OUT_DIR]\\out\\Release_x64" ], @@ -75,7 +75,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipe_modules/build/examples/full.py b/infra/bots/recipe_modules/build/examples/full.py index f0e650323b4f..ff31b30d0cbe 100644 --- a/infra/bots/recipe_modules/build/examples/full.py +++ b/infra/bots/recipe_modules/build/examples/full.py @@ -27,10 +27,6 @@ def RunSteps(api): TEST_BUILDERS = [ - 'Build-Debian10-GCC-x86-Debug-Docker', - 'Build-Debian10-GCC-x86_64-Debug-Docker', - 'Build-Debian10-GCC-x86_64-Release-NoGPU_Docker', - 'Build-Debian10-GCC-x86_64-Release-Shared_Docker', 'Build-Debian10-Clang-arm-Release-Android_API26', 'Build-Debian10-Clang-arm-Release-Android_ASAN', 'Build-Debian10-Clang-arm-OptimizeForSize-Android_NoPatch', @@ -69,6 +65,10 @@ def RunSteps(api): 'Build-Debian10-EMCC-wasm-Debug-PathKit', 'Build-Debian10-EMCC-wasm-Release-CanvasKit_CPU', 'Build-Debian10-EMCC-wasm-Release-PathKit', + 'Build-Debian11-GCC-x86-Debug-Docker', + 'Build-Debian11-GCC-x86_64-Debug-Docker', + 'Build-Debian11-GCC-x86_64-Release-NoGPU_Docker', + 'Build-Debian11-GCC-x86_64-Release-Shared_Docker', 'Build-Mac-Clang-arm64-Debug-Android_Vulkan', 'Build-Mac-Clang-arm64-Debug-iOS', 'Build-Mac-Clang-arm64-Debug-Graphite_Dawn', diff --git a/infra/bots/recipe_modules/build/util.py b/infra/bots/recipe_modules/build/util.py index 2678b71bd165..ad58da56ac5a 100644 --- a/infra/bots/recipe_modules/build/util.py +++ b/infra/bots/recipe_modules/build/util.py @@ -11,8 +11,6 @@ 'dm', 'dm.exe', 'dm.app', - 'fm', - 'fm.exe', 'nanobench.app', 'get_images_from_skps', 'get_images_from_skps.exe', diff --git a/infra/bots/recipe_modules/builder_name_schema/builder_name_schema.json b/infra/bots/recipe_modules/builder_name_schema/builder_name_schema.json index 2a8ec43d0157..415ab955d29e 100644 --- a/infra/bots/recipe_modules/builder_name_schema/builder_name_schema.json +++ b/infra/bots/recipe_modules/builder_name_schema/builder_name_schema.json @@ -106,21 +106,6 @@ "extra_config" ] }, - "FM": { - "keys": [ - "os", - "compiler", - "model", - "cpu_or_gpu", - "cpu_or_gpu_value", - "arch", - "configuration", - "test_filter" - ], - "optional_keys": [ - "extra_config" - ] - }, "Upload": { "recurse_roles": [ "Build", diff --git a/infra/bots/recipe_modules/builder_name_schema/builder_name_schema.py b/infra/bots/recipe_modules/builder_name_schema/builder_name_schema.py index 4411601f4458..cbb7d8246151 100644 --- a/infra/bots/recipe_modules/builder_name_schema/builder_name_schema.py +++ b/infra/bots/recipe_modules/builder_name_schema/builder_name_schema.py @@ -30,7 +30,6 @@ BUILDER_ROLE_INFRA = 'Infra' BUILDER_ROLE_PERF = 'Perf' BUILDER_ROLE_TEST = 'Test' -BUILDER_ROLE_FM = 'FM' BUILDER_ROLE_UPLOAD = 'Upload' BUILDER_ROLES = (BUILDER_ROLE_BAZELBUILD, BUILDER_ROLE_BAZELTEST, @@ -42,7 +41,6 @@ BUILDER_ROLE_INFRA, BUILDER_ROLE_PERF, BUILDER_ROLE_TEST, - BUILDER_ROLE_FM, BUILDER_ROLE_UPLOAD) diff --git a/infra/bots/recipe_modules/flavor/default.py b/infra/bots/recipe_modules/flavor/default.py index 263a993fc3f7..df621d186f45 100644 --- a/infra/bots/recipe_modules/flavor/default.py +++ b/infra/bots/recipe_modules/flavor/default.py @@ -203,6 +203,9 @@ def step(self, name, cmd, **unused_kwargs): env['LLVM_PROFILE_FILE'] = self.m.path.join(self.m.vars.swarming_out_dir, profname) + if 'DWriteCore' in extra_tokens: + path.append(workdir.join('dwritecore', 'bin')) + if path: env['PATH'] = self.m.path.pathsep.join( ['%(PATH)s'] + ['%s' % p for p in path]) diff --git a/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Win10-Clang-NUC5i7RYH-CPU-AVX2-x86_64-Debug-All-NativeFonts_DWriteCore.json b/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Win10-Clang-NUC5i7RYH-CPU-AVX2-x86_64-Debug-All-NativeFonts_DWriteCore.json new file mode 100644 index 000000000000..cdf1b81bd38d --- /dev/null +++ b/infra/bots/recipe_modules/flavor/examples/full.expected/Test-Win10-Clang-NUC5i7RYH-CPU-AVX2-x86_64-Debug-All-NativeFonts_DWriteCore.json @@ -0,0 +1,215 @@ +[ + { + "cmd": [ + "vpython3", + "-u", + "RECIPE_MODULE[recipe_engine::file]\\resources\\fileutil.py", + "--json-output", + "/path/to/tmp/json", + "copy", + "file.txt", + "/path/to/tmp/" + ], + "infra_step": true, + "name": "read file.txt", + "~followup_annotations": [ + "@@@STEP_LOG_END@file.txt@@@" + ] + }, + { + "cmd": [ + "vpython3", + "-u", + "RECIPE_MODULE[recipe_engine::file]\\resources\\fileutil.py", + "--json-output", + "/path/to/tmp/json", + "remove", + "file.txt" + ], + "infra_step": true, + "name": "remove file.txt" + }, + { + "cmd": [ + "vpython3", + "-u", + "RECIPE_MODULE[recipe_engine::file]\\resources\\fileutil.py", + "--json-output", + "/path/to/tmp/json", + "rmtree", + "results_dir" + ], + "infra_step": true, + "name": "rmtree results_dir" + }, + { + "cmd": [ + "vpython3", + "-u", + "RECIPE_MODULE[recipe_engine::file]\\resources\\fileutil.py", + "--json-output", + "/path/to/tmp/json", + "ensure-directory", + "--mode", + "0777", + "results_dir" + ], + "infra_step": true, + "name": "makedirs results_dir" + }, + { + "cmd": [ + "vpython3", + "-u", + "RECIPE_MODULE[recipe_engine::file]\\resources\\fileutil.py", + "--json-output", + "/path/to/tmp/json", + "rmtree", + "device_results_dir" + ], + "infra_step": true, + "name": "rmtree device_results_dir" + }, + { + "cmd": [ + "vpython3", + "-u", + "RECIPE_MODULE[recipe_engine::file]\\resources\\fileutil.py", + "--json-output", + "/path/to/tmp/json", + "ensure-directory", + "--mode", + "0777", + "device_results_dir" + ], + "infra_step": true, + "name": "makedirs device_results_dir" + }, + { + "cmd": [ + "vpython3", + "-u", + "RECIPE_MODULE[recipe_engine::file]\\resources\\fileutil.py", + "--json-output", + "/path/to/tmp/json", + "copy", + "[START_DIR]\\skia\\infra\\bots\\assets\\skp\\VERSION", + "/path/to/tmp/" + ], + "infra_step": true, + "name": "Get skp VERSION", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@VERSION@42@@@", + "@@@STEP_LOG_END@VERSION@@@" + ] + }, + { + "cmd": [ + "vpython3", + "-u", + "RECIPE_MODULE[recipe_engine::file]\\resources\\fileutil.py", + "--json-output", + "/path/to/tmp/json", + "copy", + "42", + "[START_DIR]\\tmp\\SKP_VERSION" + ], + "infra_step": true, + "name": "write SKP_VERSION", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@SKP_VERSION@42@@@", + "@@@STEP_LOG_END@SKP_VERSION@@@" + ] + }, + { + "cmd": [ + "vpython3", + "-u", + "RECIPE_MODULE[recipe_engine::file]\\resources\\fileutil.py", + "--json-output", + "/path/to/tmp/json", + "copy", + "[START_DIR]\\skia\\infra\\bots\\assets\\skimage\\VERSION", + "/path/to/tmp/" + ], + "infra_step": true, + "name": "Get skimage VERSION", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@VERSION@42@@@", + "@@@STEP_LOG_END@VERSION@@@" + ] + }, + { + "cmd": [ + "vpython3", + "-u", + "RECIPE_MODULE[recipe_engine::file]\\resources\\fileutil.py", + "--json-output", + "/path/to/tmp/json", + "copy", + "42", + "[START_DIR]\\tmp\\SK_IMAGE_VERSION" + ], + "infra_step": true, + "name": "write SK_IMAGE_VERSION", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@SK_IMAGE_VERSION@42@@@", + "@@@STEP_LOG_END@SK_IMAGE_VERSION@@@" + ] + }, + { + "cmd": [ + "vpython3", + "-u", + "RECIPE_MODULE[recipe_engine::file]\\resources\\fileutil.py", + "--json-output", + "/path/to/tmp/json", + "copy", + "[START_DIR]\\skia\\infra\\bots\\assets\\svg\\VERSION", + "/path/to/tmp/" + ], + "infra_step": true, + "name": "Get svg VERSION", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@VERSION@42@@@", + "@@@STEP_LOG_END@VERSION@@@" + ] + }, + { + "cmd": [ + "vpython3", + "-u", + "RECIPE_MODULE[recipe_engine::file]\\resources\\fileutil.py", + "--json-output", + "/path/to/tmp/json", + "copy", + "42", + "[START_DIR]\\tmp\\SVG_VERSION" + ], + "infra_step": true, + "name": "write SVG_VERSION", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@SVG_VERSION@42@@@", + "@@@STEP_LOG_END@SVG_VERSION@@@" + ] + }, + { + "cmd": [ + "powershell", + "-ExecutionPolicy", + "Unrestricted", + "-File", + "RECIPE_MODULE[skia::flavor]\\resources\\win_run_and_check_log.ps1", + "[START_DIR]\\build\\dm", + "--some-flag" + ], + "env": { + "CHROME_HEADLESS": "1", + "PATH": ";RECIPE_REPO[depot_tools];[START_DIR]\\dwritecore\\bin" + }, + "name": "dm" + }, + { + "name": "$result" + } +] \ No newline at end of file diff --git a/infra/bots/recipe_modules/flavor/examples/full.py b/infra/bots/recipe_modules/flavor/examples/full.py index 8b0ff375cadb..d4aaa05692a6 100644 --- a/infra/bots/recipe_modules/flavor/examples/full.py +++ b/infra/bots/recipe_modules/flavor/examples/full.py @@ -107,6 +107,7 @@ def RunSteps(api): '-Valgrind_AbandonGpuContext_SK_CPU_LIMIT_SSE41'), 'Test-Debian10-Clang-NUC7i5BNK-GPU-IntelIris640-x86_64-Debug-All-ASAN_Vulkan', 'Test-Debian11-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All', + 'Test-Win10-Clang-NUC5i7RYH-CPU-AVX2-x86_64-Debug-All-NativeFonts_DWriteCore', ] # Default properties used for TEST_BUILDERS. diff --git a/infra/bots/recipe_modules/flavor/resources/symbolize_stack_trace.py b/infra/bots/recipe_modules/flavor/resources/symbolize_stack_trace.py index 3919fcfcec72..20eae0657b76 100644 --- a/infra/bots/recipe_modules/flavor/resources/symbolize_stack_trace.py +++ b/infra/bots/recipe_modules/flavor/resources/symbolize_stack_trace.py @@ -17,7 +17,7 @@ def main(basedir, cmd): proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, - encoding='utf-8') + encoding='ISO-8859-1') for line in iter(proc.stdout.readline, ''): sys.stdout.write(line) logs.append(line) diff --git a/infra/bots/recipes/compile.expected/Build-Win-Clang-x86-Debug.json b/infra/bots/recipes/compile.expected/Build-Win-Clang-x86-Debug.json index 8f670cdd22d3..5c0de3490b8b 100644 --- a/infra/bots/recipes/compile.expected/Build-Win-Clang-x86-Debug.json +++ b/infra/bots/recipes/compile.expected/Build-Win-Clang-x86-Debug.json @@ -60,7 +60,7 @@ { "cmd": [ "python", - "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", + "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', '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-Win-Clang-x86-Debug\\Debug", "[START_DIR]\\[SWARM_OUT_DIR]" ], @@ -75,7 +75,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipes/sync_and_compile.expected/Build-Debian10-Clang-arm-Release-NoPatch (tryjob).json b/infra/bots/recipes/sync_and_compile.expected/Build-Debian10-Clang-arm-Release-NoPatch (tryjob).json index 76f96a134a75..c5319831bc46 100644 --- a/infra/bots/recipes/sync_and_compile.expected/Build-Debian10-Clang-arm-Release-NoPatch (tryjob).json +++ b/infra/bots/recipes/sync_and_compile.expected/Build-Debian10-Clang-arm-Release-NoPatch (tryjob).json @@ -271,7 +271,7 @@ { "cmd": [ "python", - "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", + "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', '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-arm-Release-NoPatch/Release", "[START_DIR]/[SWARM_OUT_DIR]" ], @@ -286,7 +286,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipes/sync_and_compile.expected/Build-Debian10-Clang-arm-Release-NoPatch.json b/infra/bots/recipes/sync_and_compile.expected/Build-Debian10-Clang-arm-Release-NoPatch.json index 48b95c8de7cf..d355106b582f 100644 --- a/infra/bots/recipes/sync_and_compile.expected/Build-Debian10-Clang-arm-Release-NoPatch.json +++ b/infra/bots/recipes/sync_and_compile.expected/Build-Debian10-Clang-arm-Release-NoPatch.json @@ -379,7 +379,7 @@ { "cmd": [ "python", - "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", + "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', '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-arm-Release-NoPatch/Release", "[START_DIR]/[SWARM_OUT_DIR]" ], @@ -394,7 +394,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/recipes/sync_and_compile.expected/Build-Win10-Clang-x86_64-Release-NoDEPS.json b/infra/bots/recipes/sync_and_compile.expected/Build-Win10-Clang-x86_64-Release-NoDEPS.json index 36b334a217a4..c5fde8be7342 100644 --- a/infra/bots/recipes/sync_and_compile.expected/Build-Win10-Clang-x86_64-Release-NoDEPS.json +++ b/infra/bots/recipes/sync_and_compile.expected/Build-Win10-Clang-x86_64-Release-NoDEPS.json @@ -163,7 +163,7 @@ { "cmd": [ "python", - "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", + "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', '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]\\skia\\out\\Build-Win10-Clang-x86_64-Release-NoDEPS\\Release_x64", "[START_DIR]\\[SWARM_OUT_DIR]" ], @@ -178,7 +178,7 @@ "@@@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@build_products = ['dm', 'dm.exe', 'dm.app', '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)@@@", diff --git a/infra/bots/task_drivers/fm_driver/BUILD.bazel b/infra/bots/task_drivers/fm_driver/BUILD.bazel deleted file mode 100644 index 5616380d4fce..000000000000 --- a/infra/bots/task_drivers/fm_driver/BUILD.bazel +++ /dev/null @@ -1,24 +0,0 @@ -load("//bazel:skia_rules.bzl", "exports_files_legacy") -load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") - -licenses(["notice"]) - -exports_files_legacy() - -go_library( - name = "fm_driver_lib", - srcs = ["fm_driver.go"], - importpath = "go.skia.org/skia/infra/bots/task_drivers/fm_driver", - visibility = ["//visibility:private"], - deps = [ - "@org_skia_go_infra//go/exec", - "@org_skia_go_infra//go/util", - "@org_skia_go_infra//task_driver/go/td", - ], -) - -go_binary( - name = "fm_driver", - embed = [":fm_driver_lib"], - visibility = ["//visibility:public"], -) diff --git a/infra/bots/task_drivers/fm_driver/fm_driver.go b/infra/bots/task_drivers/fm_driver/fm_driver.go deleted file mode 100644 index 74ab85aed694..000000000000 --- a/infra/bots/task_drivers/fm_driver/fm_driver.go +++ /dev/null @@ -1,501 +0,0 @@ -// Copyright 2020 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package main - -import ( - "bufio" - "bytes" - "context" - "flag" - "fmt" - "math/rand" - "net/http" - "os" - "path/filepath" - "runtime" - "sort" - "strings" - "sync" - "sync/atomic" - - "go.skia.org/infra/go/exec" - "go.skia.org/infra/go/util" - "go.skia.org/infra/task_driver/go/td" -) - -func main() { - var ( - projectId = flag.String("project_id", "", "ID of the Google Cloud project.") - taskId = flag.String("task_id", "", "ID of this task.") - bot = flag.String("bot", "", "Name of the task.") - output = flag.String("o", "", "Dump JSON step data to the given file, or stdout if -.") - local = flag.Bool("local", true, "Running locally (else on the bots)?") - - resources = flag.String("resources", "resources", "Passed to fm -i.") - imgs = flag.String("imgs", "", "Shorthand `directory` contents as 'imgs'.") - skps = flag.String("skps", "", "Shorthand `directory` contents as 'skps'.") - svgs = flag.String("svgs", "", "Shorthand `directory` contents as 'svgs'.") - script = flag.String("script", "", "File (or - for stdin) with one job per line.") - gold = flag.Bool("gold", false, "Fetch known hashes, upload to Gold, etc.?") - goldHashesURL = flag.String("gold_hashes_url", "", "URL from which to download pre-existing hashes") - ) - flag.Parse() - - ctx := context.Background() - startStep := func(ctx context.Context, _ *td.StepProperties) context.Context { return ctx } - endStep := func(_ context.Context) {} - failStep := func(_ context.Context, err error) error { - fmt.Fprintln(os.Stderr, err) - return err - } - fatal := func(ctx context.Context, err error) { - failStep(ctx, err) - os.Exit(1) - } - httpClient := func(_ context.Context) *http.Client { return http.DefaultClient } - - if !*local { - ctx = td.StartRun(projectId, taskId, bot, output, local) - defer td.EndRun(ctx) - startStep = td.StartStep - endStep = td.EndStep - failStep = td.FailStep - fatal = td.Fatal - httpClient = func(ctx context.Context) *http.Client { return td.HttpClient(ctx, nil) } - } - - if flag.NArg() < 1 { - fatal(ctx, fmt.Errorf("Please pass an fm binary.")) - } - fm := flag.Arg(0) - - // Run `fm ` to find the names of all linked GMs or tests. - query := func(flag string) []string { - stdout := &bytes.Buffer{} - cmd := &exec.Command{Name: fm, Stdout: stdout} - cmd.Args = append(cmd.Args, "-i", *resources) - cmd.Args = append(cmd.Args, flag) - if err := exec.Run(ctx, cmd); err != nil { - fatal(ctx, err) - } - - lines := []string{} - scanner := bufio.NewScanner(stdout) - for scanner.Scan() { - lines = append(lines, scanner.Text()) - } - if err := scanner.Err(); err != nil { - fatal(ctx, err) - } - return lines - } - - // Lowercase with leading '.' stripped. - normalizedExt := func(s string) string { - return strings.ToLower(filepath.Ext(s)[1:]) - } - - // Walk directory for files with given set of extensions. - walk := func(dir string, exts map[string]bool) (files []string) { - if dir != "" { - err := filepath.Walk(dir, func(path string, info os.FileInfo, err error) error { - if err != nil { - return err - } - if !info.IsDir() && exts[normalizedExt(info.Name())] { - files = append(files, path) - } - return nil - }) - - if err != nil { - fatal(ctx, err) - } - } - return - } - - rawExts := map[string]bool{ - "arw": true, - "cr2": true, - "dng": true, - "nef": true, - "nrw": true, - "orf": true, - "pef": true, - "raf": true, - "rw2": true, - "srw": true, - } - imgExts := map[string]bool{ - "astc": true, - "bmp": true, - "gif": true, - "ico": true, - "jpeg": true, - "jpg": true, - "ktx": true, - "png": true, - "wbmp": true, - "webp": true, - } - for k, v := range rawExts { - imgExts[k] = v - } - - // We can use "gm" or "gms" as shorthand to refer to all GMs, and similar for the rest. - shorthands := map[string][]string{ - "gm": query("--listGMs"), - "test": query("--listTests"), - "img": walk(*imgs, imgExts), - "skp": walk(*skps, map[string]bool{"skp": true}), - "svg": walk(*svgs, map[string]bool{"svg": true}), - } - for k, v := range shorthands { - shorthands[k+"s"] = v - } - - // Query Gold for all known hashes when running as a bot. - known := map[string]bool{ - "0832f708a97acc6da385446384647a8f": true, // MD5 of passing unit test. - } - if *gold { - func() { - resp, err := httpClient(ctx).Get(*goldHashesURL) - if err != nil { - fatal(ctx, err) - } - defer resp.Body.Close() - - scanner := bufio.NewScanner(resp.Body) - for scanner.Scan() { - known[scanner.Text()] = true - } - if err := scanner.Err(); err != nil { - fatal(ctx, err) - } - - fmt.Fprintf(os.Stdout, "Gold knew %v unique hashes.\n", len(known)) - }() - } - - // We'll pass `flag: value` as `--flag value` to FM. - // Such a short type name makes it easy to write out literals. - type F = map[string]string - - flatten := func(flags F) (flat []string) { - // It's not strictly important that we sort, but it makes reading bot logs easier. - keys := []string{} - for k := range flags { - keys = append(keys, k) - } - sort.Strings(keys) - - for _, k := range keys { - v := flags[k] - - if v == "true" { - flat = append(flat, "--"+k) - } else if v == "false" { - flat = append(flat, "--no"+k) - } else if len(k) == 1 { - flat = append(flat, "-"+k, v) - } else { - flat = append(flat, "--"+k, v) - } - } - return - } - - var worker func(context.Context, []string, F) int - worker = func(ctx context.Context, sources []string, flags F) (failures int) { - stdout := &bytes.Buffer{} - stderr := &bytes.Buffer{} - cmd := &exec.Command{Name: fm, Stdout: stdout, Stderr: stderr} - cmd.Args = append(cmd.Args, "-i", *resources) - cmd.Args = append(cmd.Args, flatten(flags)...) - cmd.Args = append(cmd.Args, "-s") - cmd.Args = append(cmd.Args, sources...) - - // Run our FM command. - err := exec.Run(ctx, cmd) - - // We'll rerun any source individually that didn't produce a known hash, i.e. - // sources that crash, produce unknown hashes, or that an crash prevented from running. - unknownHash := "" - { - // Start assuming we'll need to rerun everything. - reruns := map[string]bool{} - for _, name := range sources { - reruns[name] = true - } - - // Scan stdout for lines like " skipped" or " ??ms" - // and exempt those sources from reruns if they were skipped or their hash is known. - scanner := bufio.NewScanner(stdout) - for scanner.Scan() { - if parts := strings.Fields(scanner.Text()); len(parts) >= 2 { - name, outcome := parts[0], parts[1] - if *gold && outcome != "skipped" && !known[outcome] { - unknownHash = outcome - } else { - delete(reruns, name) - } - } - } - if err := scanner.Err(); err != nil { - fatal(ctx, err) - } - - // Only rerun sources from a batch (or we'd rerun failures over and over and over). - if len(sources) > 1 { - for name := range reruns { - failures += worker(ctx, []string{name}, flags) - } - return - } - } - - // If an individual run failed, nothing more to do but fail. - if err != nil { - failures += 1 - - lines := []string{} - scanner := bufio.NewScanner(stderr) - for scanner.Scan() { - lines = append(lines, scanner.Text()) - } - if err := scanner.Err(); err != nil { - fatal(ctx, err) - } - - failStep(ctx, fmt.Errorf("%v #failed:\n\t%v\n", - exec.DebugString(cmd), - strings.Join(lines, "\n\t"))) - - return - } - - // If an individual run succeeded but produced an unknown hash, TODO upload .png to Gold. - // For now just print out the command and the hash it produced. - if unknownHash != "" { - fmt.Fprintf(os.Stdout, "%v #%v\n", - exec.DebugString(cmd), - unknownHash) - } - return - } - - type Work struct { - Ctx context.Context - WG *sync.WaitGroup - Failures *int32 - Sources []string // Passed to FM -s: names of gms/tests, paths to images, .skps, etc. - Flags F // Other flags to pass to FM: --ct 565, --msaa 16, etc. - } - queue := make(chan Work, 1<<20) // Arbitrarily huge buffer to avoid ever blocking. - - for i := 0; i < runtime.NumCPU(); i++ { - go func() { - for w := range queue { - func() { - defer w.WG.Done() - // For organizational purposes, create a step representing this batch, - // with the batch call to FM and any individual reruns all nested inside. - ctx := startStep(w.Ctx, td.Props(strings.Join(w.Sources, " "))) - defer endStep(ctx) - if failures := worker(ctx, w.Sources, w.Flags); failures > 0 { - atomic.AddInt32(w.Failures, int32(failures)) - if !*local { // Uninteresting to see on local runs. - failStep(ctx, fmt.Errorf("%v reruns failed\n", failures)) - } - } - }() - } - }() - } - - // Get some work going, first breaking it into batches to increase our parallelism. - pendingKickoffs := &sync.WaitGroup{} - var totalFailures int32 = 0 - - kickoff := func(sources []string, flags F) { - if len(sources) == 0 { - return // A blank or commented job line from -script or the command line. - } - pendingKickoffs.Add(1) - - // Shuffle the sources randomly as a cheap way to approximate evenly expensive batches. - // (Intentionally not rand.Seed()'d to stay deterministically reproducible.) - sources = append([]string{}, sources...) // We'll be needing our own copy... - rand.Shuffle(len(sources), func(i, j int) { - sources[i], sources[j] = sources[j], sources[i] - }) - - // For organizational purposes, create a step representing this call to kickoff(), - // with each batch of sources nested inside. - ctx := startStep(ctx, - td.Props(fmt.Sprintf("%s, %s…", strings.Join(flatten(flags), " "), sources[0]))) - pendingBatches := &sync.WaitGroup{} - failures := new(int32) - - // Arbitrary, nice to scale ~= cores. - approxNumBatches := runtime.NumCPU() - - // Round up batch size to avoid empty batches, making approxNumBatches approximate. - batchSize := (len(sources) + approxNumBatches - 1) / approxNumBatches - - util.ChunkIter(len(sources), batchSize, func(start, end int) error { - pendingBatches.Add(1) - queue <- Work{ctx, pendingBatches, failures, sources[start:end], flags} - return nil - }) - - // When the batches for this kickoff() are all done, this kickoff() is done. - go func() { - pendingBatches.Wait() - if *failures > 0 { - atomic.AddInt32(&totalFailures, *failures) - if !*local { // Uninteresting to see on local runs. - failStep(ctx, fmt.Errorf("%v total reruns failed\n", *failures)) - } - } - endStep(ctx) - pendingKickoffs.Done() - }() - } - - // Parse a job like "gms b=cpu ct=8888" into sources and flags for kickoff(). - parse := func(job []string) (sources []string, flags F) { - flags = make(F) - for _, token := range job { - // Everything after # is a comment. - if strings.HasPrefix(token, "#") { - break - } - - // Expand "gm" or "gms" to all known GMs, or same for tests, images, skps, svgs. - if vals, ok := shorthands[token]; ok { - sources = append(sources, vals...) - continue - } - - // Is this a flag to pass through to FM? - if parts := strings.Split(token, "="); len(parts) == 2 { - flags[parts[0]] = parts[1] - continue - } - - // Anything else must be the name of a source for FM to run. - sources = append(sources, token) - } - return - } - - // Parse one job from the command line, handy for ad hoc local runs. - kickoff(parse(flag.Args()[1:])) - - // Any number of jobs can come from -script. - if *script != "" { - file := os.Stdin - if *script != "-" { - file, err := os.Open(*script) - if err != nil { - fatal(ctx, err) - } - defer file.Close() - } - scanner := bufio.NewScanner(file) - for scanner.Scan() { - kickoff(parse(strings.Fields(scanner.Text()))) - } - if err := scanner.Err(); err != nil { - fatal(ctx, err) - } - } - - // If we're a bot (or acting as if we are one), kick off its work. - if *bot != "" { - parts := strings.Split(*bot, "-") - OS, model, CPU_or_GPU := parts[1], parts[3], parts[4] - - // Bots use portable fonts except where we explicitly opt-in to native fonts. - defaultFlags := F{"nativeFonts": "false"} - - run := func(sources []string, extraFlags F) { - // Default then extra to allow overriding the defaults. - flags := F{} - for k, v := range defaultFlags { - flags[k] = v - } - for k, v := range extraFlags { - flags[k] = v - } - kickoff(sources, flags) - } - - gms := shorthands["gms"] - imgs := shorthands["imgs"] - svgs := shorthands["svgs"] - skps := shorthands["skps"] - tests := shorthands["tests"] - - filter := func(in []string, keep func(string) bool) (out []string) { - for _, s := range in { - if keep(s) { - out = append(out, s) - } - } - return - } - - if strings.Contains(OS, "Win") { - // We can't decode these formats on Windows. - imgs = filter(imgs, func(s string) bool { return !rawExts[normalizedExt(s)] }) - } - - if strings.Contains(*bot, "TSAN") { - // Run each test a few times in parallel to uncover races. - defaultFlags["race"] = "4" - } - - if CPU_or_GPU == "CPU" { - defaultFlags["b"] = "cpu" - - // FM's default ct/gamut/tf flags are equivalent to --config srgb in DM. - run(gms, F{}) - run(gms, F{"nativeFonts": "true"}) - run(imgs, F{}) - run(svgs, F{}) - run(skps, F{"clipW": "1000", "clipH": "1000"}) - run(tests, F{"race": "0"}) // Several unit tests are not reentrant. - - if model == "GCE" { - run(gms, F{"ct": "r8", "legacy": "true"}) // --config r8 - run(gms, F{"ct": "565", "legacy": "true"}) // --config 565 - run(gms, F{"ct": "8888", "legacy": "true"}) // --config 8888 - run(gms, F{"ct": "f16"}) // --config esrgb - run(gms, F{"ct": "f16", "tf": "linear"}) // --config f16 - run(gms, F{"ct": "8888", "gamut": "p3"}) // --config p3 - run(gms, F{"ct": "8888", "gamut": "narrow", "tf": "2.2"}) // --config narrow - run(gms, F{"ct": "f16", "gamut": "rec2020", "tf": "rec2020"}) // --config erec2020 - - run(imgs, F{ - "decodeToDst": "true", - "ct": "f16", - "gamut": "rec2020", - "tf": "rec2020"}) - } - - // TODO: pic-8888 equivalent? - // TODO: serialize-8888 equivalent? - } - } - - pendingKickoffs.Wait() - if totalFailures > 0 { - fatal(ctx, fmt.Errorf("%v runs of %v failed after retries.\n", totalFailures, fm)) - } -} diff --git a/infra/bots/tasks.json b/infra/bots/tasks.json index c9fc470fc70f..695737fc37d7 100755 --- a/infra/bots/tasks.json +++ b/infra/bots/tasks.json @@ -540,41 +540,6 @@ "Build-Debian10-EMCC-wasm-Release-WasmGMTests" ] }, - "Build-Debian10-GCC-x86-Debug-Docker": { - "tasks": [ - "Build-Debian10-GCC-x86-Debug-Docker" - ] - }, - "Build-Debian10-GCC-x86-Release-Docker": { - "tasks": [ - "Build-Debian10-GCC-x86-Release-Docker" - ] - }, - "Build-Debian10-GCC-x86_64-Debug-Docker": { - "tasks": [ - "Build-Debian10-GCC-x86_64-Debug-Docker" - ] - }, - "Build-Debian10-GCC-x86_64-Debug-NoGPU_Docker": { - "tasks": [ - "Build-Debian10-GCC-x86_64-Debug-NoGPU_Docker" - ] - }, - "Build-Debian10-GCC-x86_64-Release-Docker": { - "tasks": [ - "Build-Debian10-GCC-x86_64-Release-Docker" - ] - }, - "Build-Debian10-GCC-x86_64-Release-NoGPU_Docker": { - "tasks": [ - "Build-Debian10-GCC-x86_64-Release-NoGPU_Docker" - ] - }, - "Build-Debian10-GCC-x86_64-Release-Shared_Docker": { - "tasks": [ - "Build-Debian10-GCC-x86_64-Release-Shared_Docker" - ] - }, "Build-Debian11-Clang-x86_64-Debug": { "tasks": [ "Build-Debian11-Clang-x86_64-Debug" @@ -650,6 +615,41 @@ "Build-Debian11-Clang-x86_64-Release-Vulkan" ] }, + "Build-Debian11-GCC-x86-Debug-Docker": { + "tasks": [ + "Build-Debian11-GCC-x86-Debug-Docker" + ] + }, + "Build-Debian11-GCC-x86-Release-Docker": { + "tasks": [ + "Build-Debian11-GCC-x86-Release-Docker" + ] + }, + "Build-Debian11-GCC-x86_64-Debug-Docker": { + "tasks": [ + "Build-Debian11-GCC-x86_64-Debug-Docker" + ] + }, + "Build-Debian11-GCC-x86_64-Debug-NoGPU_Docker": { + "tasks": [ + "Build-Debian11-GCC-x86_64-Debug-NoGPU_Docker" + ] + }, + "Build-Debian11-GCC-x86_64-Release-Docker": { + "tasks": [ + "Build-Debian11-GCC-x86_64-Release-Docker" + ] + }, + "Build-Debian11-GCC-x86_64-Release-NoGPU_Docker": { + "tasks": [ + "Build-Debian11-GCC-x86_64-Release-NoGPU_Docker" + ] + }, + "Build-Debian11-GCC-x86_64-Release-Shared_Docker": { + "tasks": [ + "Build-Debian11-GCC-x86_64-Release-Shared_Docker" + ] + }, "Build-Mac-Clang-arm64-Debug": { "tasks": [ "Build-Mac-Clang-arm64-Debug" @@ -710,6 +710,11 @@ "Build-Mac-Clang-arm64-Debug-Graphite_Metal_NoPrecompile" ] }, + "Build-Mac-Clang-arm64-Debug-Graphite_Metal_Vello": { + "tasks": [ + "Build-Mac-Clang-arm64-Debug-Graphite_Metal_Vello" + ] + }, "Build-Mac-Clang-arm64-Debug-Metal": { "tasks": [ "Build-Mac-Clang-arm64-Debug-Metal" @@ -930,6 +935,11 @@ "Build-Win-Clang-x86_64-Debug-ASAN" ] }, + "Build-Win-Clang-x86_64-Debug-DWriteCore": { + "tasks": [ + "Build-Win-Clang-x86_64-Debug-DWriteCore" + ] + }, "Build-Win-Clang-x86_64-Debug-Dawn": { "tasks": [ "Build-Win-Clang-x86_64-Debug-Dawn" @@ -1169,11 +1179,6 @@ "CodeSize-dm-Debian10-Clang-x86_64-OptimizeForSize" ] }, - "CodeSize-fm-Debian10-Clang-x86_64-OptimizeForSize": { - "tasks": [ - "CodeSize-fm-Debian10-Clang-x86_64-OptimizeForSize" - ] - }, "CodeSize-skottie_tool-Debian10-Clang-x86_64-OptimizeForSize": { "tasks": [ "CodeSize-skottie_tool-Debian10-Clang-x86_64-OptimizeForSize" @@ -1194,56 +1199,6 @@ "CodeSize-skottie_tool_gpu-Debian10-Clang-x86_64-OptimizeForSize" ] }, - "FM-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All": { - "tasks": [ - "FM-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All" - ] - }, - "FM-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-ASAN": { - "tasks": [ - "FM-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-ASAN" - ] - }, - "FM-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-MSAN": { - "tasks": [ - "FM-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-MSAN" - ] - }, - "FM-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-TSAN": { - "tasks": [ - "FM-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-TSAN" - ] - }, - "FM-Mac-Clang-VMware7.1-CPU-AVX-x86_64-Debug-All": { - "tasks": [ - "FM-Mac-Clang-VMware7.1-CPU-AVX-x86_64-Debug-All" - ] - }, - "FM-Mac-Clang-VMware7.1-CPU-AVX-x86_64-Debug-All-ASAN": { - "tasks": [ - "FM-Mac-Clang-VMware7.1-CPU-AVX-x86_64-Debug-All-ASAN" - ] - }, - "FM-Mac-Clang-VMware7.1-CPU-AVX-x86_64-Release-All-TSAN": { - "tasks": [ - "FM-Mac-Clang-VMware7.1-CPU-AVX-x86_64-Release-All-TSAN" - ] - }, - "FM-Win-Clang-GCE-CPU-AVX2-x86_64-Debug-All": { - "tasks": [ - "FM-Win-Clang-GCE-CPU-AVX2-x86_64-Debug-All" - ] - }, - "FM-Win-Clang-GCE-CPU-AVX2-x86_64-Debug-All-ASAN": { - "tasks": [ - "FM-Win-Clang-GCE-CPU-AVX2-x86_64-Debug-All-ASAN" - ] - }, - "FM-Win-MSVC-GCE-CPU-AVX2-x86_64-Debug-All": { - "tasks": [ - "FM-Win-MSVC-GCE-CPU-AVX2-x86_64-Debug-All" - ] - }, "Housekeeper-Nightly-RecreateSKPs_DryRun": { "tasks": [ "Housekeeper-Nightly-RecreateSKPs_DryRun" @@ -1562,51 +1517,6 @@ "Upload-Perf-ChromeOS-Clang-Spin514-GPU-RadeonVega3-x86_64-Release-All" ] }, - "Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All": { - "tasks": [ - "Upload-Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All" - ] - }, - "Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-BonusConfigs": { - "tasks": [ - "Upload-Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-BonusConfigs" - ] - }, - "Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-ColorSpaces": { - "tasks": [ - "Upload-Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-ColorSpaces" - ] - }, - "Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-Fast": { - "tasks": [ - "Upload-Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-Fast" - ] - }, - "Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-SK_FORCE_RASTER_PIPELINE_BLITTER": { - "tasks": [ - "Upload-Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-SK_FORCE_RASTER_PIPELINE_BLITTER" - ] - }, - "Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-Wuffs": { - "tasks": [ - "Upload-Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-Wuffs" - ] - }, - "Perf-Debian10-Clang-GCE-CPU-AVX512-x86_64-OptimizeForSize-All": { - "tasks": [ - "Upload-Perf-Debian10-Clang-GCE-CPU-AVX512-x86_64-OptimizeForSize-All" - ] - }, - "Perf-Debian10-Clang-GCE-CPU-AVX512-x86_64-Release-All": { - "tasks": [ - "Upload-Perf-Debian10-Clang-GCE-CPU-AVX512-x86_64-Release-All" - ] - }, - "Perf-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Release-All-SwiftShader": { - "tasks": [ - "Upload-Perf-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Release-All-SwiftShader" - ] - }, "Perf-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All": { "tasks": [ "Upload-Perf-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All" @@ -1637,6 +1547,21 @@ "Upload-Perf-Debian10-Clang-ShuttleA-GPU-IntelHD2000-x86_64-Release-All" ] }, + "Perf-Debian11-Clang-NUC11TZi5-CPU-AVX2-x86_64-Release-All": { + "tasks": [ + "Upload-Perf-Debian11-Clang-NUC11TZi5-CPU-AVX2-x86_64-Release-All" + ] + }, + "Perf-Debian11-Clang-NUC11TZi5-CPU-AVX2-x86_64-Release-All-BonusConfigs": { + "tasks": [ + "Upload-Perf-Debian11-Clang-NUC11TZi5-CPU-AVX2-x86_64-Release-All-BonusConfigs" + ] + }, + "Perf-Debian11-Clang-NUC11TZi5-CPU-AVX2-x86_64-Release-All-ColorSpaces": { + "tasks": [ + "Upload-Perf-Debian11-Clang-NUC11TZi5-CPU-AVX2-x86_64-Release-All-ColorSpaces" + ] + }, "Perf-Debian11-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All": { "tasks": [ "Upload-Perf-Debian11-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All" @@ -1898,11 +1823,6 @@ "Upload-Perf-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All" ] }, - "Perf-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-ANGLE": { - "tasks": [ - "Upload-Perf-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-ANGLE" - ] - }, "Perf-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-Vulkan": { "tasks": [ "Upload-Perf-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-Vulkan" @@ -2523,6 +2443,11 @@ "Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-Fast" ] }, + "Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-MSAN": { + "tasks": [ + "Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-MSAN" + ] + }, "Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-SKNX_NO_SIMD": { "tasks": [ "Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-SKNX_NO_SIMD" @@ -3033,6 +2958,11 @@ "Test-Mac13-Clang-MacMini9.1-CPU-AppleM1-arm64-Debug-All-NativeFonts" ] }, + "Test-Mac13-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Graphite_Metal_Vello": { + "tasks": [ + "Test-Mac13-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Graphite_Metal_Vello" + ] + }, "Test-Mac13-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Metal": { "tasks": [ "Test-Mac13-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Metal" @@ -3063,6 +2993,11 @@ "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Dawn" ] }, + "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Graphite_Vulkan": { + "tasks": [ + "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Graphite_Vulkan" + ] + }, "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-PreAbandonGpuContext": { "tasks": [ "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-PreAbandonGpuContext" @@ -3083,6 +3018,11 @@ "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-DDL3_TSAN" ] }, + "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Graphite_Vulkan": { + "tasks": [ + "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Graphite_Vulkan" + ] + }, "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-PreAbandonGpuContext": { "tasks": [ "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-PreAbandonGpuContext" @@ -3211,11 +3151,6 @@ "Upload-Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All" ] }, - "Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All-ANGLE": { - "tasks": [ - "Upload-Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All-ANGLE" - ] - }, "Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All-Vulkan": { "tasks": [ "Upload-Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All-Vulkan" @@ -3226,11 +3161,6 @@ "Upload-Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All" ] }, - "Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-ANGLE": { - "tasks": [ - "Upload-Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-ANGLE" - ] - }, "Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-Vulkan": { "tasks": [ "Upload-Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-Vulkan" @@ -3241,6 +3171,11 @@ "Upload-Test-Win10-Clang-NUC5i7RYH-CPU-AVX2-x86_64-Debug-All-NativeFonts" ] }, + "Test-Win10-Clang-NUC5i7RYH-CPU-AVX2-x86_64-Debug-All-NativeFonts_DWriteCore": { + "tasks": [ + "Upload-Test-Win10-Clang-NUC5i7RYH-CPU-AVX2-x86_64-Debug-All-NativeFonts_DWriteCore" + ] + }, "Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All": { "tasks": [ "Upload-Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All" @@ -3501,6 +3436,11 @@ "Upload-Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Graphite_Dawn" ] }, + "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Graphite_Vulkan": { + "tasks": [ + "Upload-Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Graphite_Vulkan" + ] + }, "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Vulkan": { "tasks": [ "Upload-Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Vulkan" @@ -3521,6 +3461,11 @@ "Upload-Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Graphite_Dawn" ] }, + "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Graphite_Vulkan": { + "tasks": [ + "Upload-Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Graphite_Vulkan" + ] + }, "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Vulkan": { "tasks": [ "Upload-Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Vulkan" @@ -13107,16 +13052,12 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Debian10-GCC-x86-Debug-Docker": { + "Build-Debian11-Clang-x86_64-Debug": { "caches": [ { "name": "ccache", "path": "cache/ccache" }, - { - "name": "docker", - "path": "cache/docker" - }, { "name": "vpython", "path": "cache/vpython" @@ -13153,6 +13094,11 @@ "name": "skia/bots/ccache_linux", "path": "ccache_linux", "version": "version:1" + }, + { + "name": "skia/bots/clang_linux", + "path": "clang_linux", + "version": "version:30" } ], "command": [ @@ -13161,28 +13107,23 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian10-GCC-x86-Debug-Docker\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian11-Clang-x86_64-Debug\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "gpu:none", - "machine_type:n1-standard-16", - "os:Debian-10.3", - "pool:Skia", - "docker_installed:true" + "cpu:x86-64", + "gpu:10de:2489", + "os:Debian-11.5", + "pool:Skia" ], "environment": { "RECIPES_USE_PY3": "true", "VPYTHON_LOG_TRACE": "1" }, "env_prefixes": { - "CLOUDSDK_PYTHON": [ - "cipd_bin_packages/cpython3/bin/python3" - ], "PATH": [ "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", @@ -13208,16 +13149,12 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Debian10-GCC-x86-Release-Docker": { + "Build-Debian11-Clang-x86_64-Debug-ASAN": { "caches": [ { "name": "ccache", "path": "cache/ccache" }, - { - "name": "docker", - "path": "cache/docker" - }, { "name": "vpython", "path": "cache/vpython" @@ -13254,6 +13191,11 @@ "name": "skia/bots/ccache_linux", "path": "ccache_linux", "version": "version:1" + }, + { + "name": "skia/bots/clang_linux", + "path": "clang_linux", + "version": "version:30" } ], "command": [ @@ -13262,28 +13204,23 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian10-GCC-x86-Release-Docker\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian11-Clang-x86_64-Debug-ASAN\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "gpu:none", - "machine_type:n1-standard-16", - "os:Debian-10.3", - "pool:Skia", - "docker_installed:true" + "cpu:x86-64", + "gpu:10de:2489", + "os:Debian-11.5", + "pool:Skia" ], "environment": { "RECIPES_USE_PY3": "true", "VPYTHON_LOG_TRACE": "1" }, "env_prefixes": { - "CLOUDSDK_PYTHON": [ - "cipd_bin_packages/cpython3/bin/python3" - ], "PATH": [ "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", @@ -13309,16 +13246,12 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Debian10-GCC-x86_64-Debug-Docker": { + "Build-Debian11-Clang-x86_64-Debug-ASAN_Vulkan": { "caches": [ { "name": "ccache", "path": "cache/ccache" }, - { - "name": "docker", - "path": "cache/docker" - }, { "name": "vpython", "path": "cache/vpython" @@ -13355,6 +13288,11 @@ "name": "skia/bots/ccache_linux", "path": "ccache_linux", "version": "version:1" + }, + { + "name": "skia/bots/clang_linux", + "path": "clang_linux", + "version": "version:30" } ], "command": [ @@ -13363,28 +13301,23 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian10-GCC-x86_64-Debug-Docker\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian11-Clang-x86_64-Debug-ASAN_Vulkan\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "gpu:none", - "machine_type:n1-standard-16", - "os:Debian-10.3", - "pool:Skia", - "docker_installed:true" + "cpu:x86-64", + "gpu:10de:2489", + "os:Debian-11.5", + "pool:Skia" ], "environment": { "RECIPES_USE_PY3": "true", "VPYTHON_LOG_TRACE": "1" }, "env_prefixes": { - "CLOUDSDK_PYTHON": [ - "cipd_bin_packages/cpython3/bin/python3" - ], "PATH": [ "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", @@ -13410,15 +13343,19 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Debian10-GCC-x86_64-Debug-NoGPU_Docker": { + "Build-Debian11-Clang-x86_64-Debug-Graphite_Dawn": { "caches": [ { "name": "ccache", "path": "cache/ccache" }, { - "name": "docker", - "path": "cache/docker" + "name": "git", + "path": "cache/git" + }, + { + "name": "git_cache", + "path": "cache/git_cache" }, { "name": "vpython", @@ -13432,11 +13369,26 @@ "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, + { + "name": "infra/3pp/tools/git/linux-amd64", + "path": "cipd_bin_packages", + "version": "version:2@2.38.1.chromium.9" + }, + { + "name": "infra/tools/git/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, { "name": "infra/tools/luci-auth/${platform}", "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, + { + "name": "infra/tools/luci/git-credential-luci/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, { "name": "infra/tools/luci/kitchen/${platform}", "path": ".", @@ -13456,6 +13408,11 @@ "name": "skia/bots/ccache_linux", "path": "ccache_linux", "version": "version:1" + }, + { + "name": "skia/bots/clang_linux", + "path": "clang_linux", + "version": "version:30" } ], "command": [ @@ -13464,28 +13421,23 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian10-GCC-x86_64-Debug-NoGPU_Docker\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian11-Clang-x86_64-Debug-Graphite_Dawn\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "gpu:none", - "machine_type:n1-standard-16", - "os:Debian-10.3", - "pool:Skia", - "docker_installed:true" + "cpu:x86-64", + "gpu:10de:2489", + "os:Debian-11.5", + "pool:Skia" ], "environment": { "RECIPES_USE_PY3": "true", "VPYTHON_LOG_TRACE": "1" }, "env_prefixes": { - "CLOUDSDK_PYTHON": [ - "cipd_bin_packages/cpython3/bin/python3" - ], "PATH": [ "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", @@ -13511,16 +13463,12 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Debian10-GCC-x86_64-Release-Docker": { + "Build-Debian11-Clang-x86_64-Debug-Graphite_Vulkan": { "caches": [ { "name": "ccache", "path": "cache/ccache" }, - { - "name": "docker", - "path": "cache/docker" - }, { "name": "vpython", "path": "cache/vpython" @@ -13557,208 +13505,11 @@ "name": "skia/bots/ccache_linux", "path": "ccache_linux", "version": "version:1" - } - ], - "command": [ - "cipd_bin_packages/vpython3${EXECUTABLE_SUFFIX}", - "-u", - "skia/infra/bots/run_recipe.py", - "${ISOLATED_OUTDIR}", - "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian10-GCC-x86_64-Release-Docker\",\"swarm_out_dir\":\"build\"}", - "skia" - ], - "dependencies": [ - "Housekeeper-PerCommit-BundleRecipes" - ], - "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "gpu:none", - "machine_type:n1-standard-16", - "os:Debian-10.3", - "pool:Skia", - "docker_installed:true" - ], - "environment": { - "RECIPES_USE_PY3": "true", - "VPYTHON_LOG_TRACE": "1" - }, - "env_prefixes": { - "CLOUDSDK_PYTHON": [ - "cipd_bin_packages/cpython3/bin/python3" - ], - "PATH": [ - "cipd_bin_packages/cpython3", - "cipd_bin_packages/cpython3/bin", - "cipd_bin_packages", - "cipd_bin_packages/bin" - ], - "VPYTHON_DEFAULT_SPEC": [ - "skia/.vpython" - ], - "VPYTHON_VIRTUALENV_ROOT": [ - "cache/vpython" - ] - }, - "execution_timeout_ns": 3600000000000, - "extra_tags": { - "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" - }, - "idempotent": true, - "io_timeout_ns": 3600000000000, - "max_attempts": 2, - "outputs": [ - "build" - ], - "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" - }, - "Build-Debian10-GCC-x86_64-Release-NoGPU_Docker": { - "caches": [ - { - "name": "ccache", - "path": "cache/ccache" - }, - { - "name": "docker", - "path": "cache/docker" }, { - "name": "vpython", - "path": "cache/vpython" - } - ], - "casSpec": "compile", - "cipd_packages": [ - { - "name": "infra/3pp/tools/cpython3/linux-amd64", - "path": "cipd_bin_packages/cpython3", - "version": "version:2@3.8.10.chromium.19" - }, - { - "name": "infra/tools/luci-auth/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/kitchen/${platform}", - "path": ".", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/vpython-native/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/vpython/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "skia/bots/ccache_linux", - "path": "ccache_linux", - "version": "version:1" - } - ], - "command": [ - "cipd_bin_packages/vpython3${EXECUTABLE_SUFFIX}", - "-u", - "skia/infra/bots/run_recipe.py", - "${ISOLATED_OUTDIR}", - "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian10-GCC-x86_64-Release-NoGPU_Docker\",\"swarm_out_dir\":\"build\"}", - "skia" - ], - "dependencies": [ - "Housekeeper-PerCommit-BundleRecipes" - ], - "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "gpu:none", - "machine_type:n1-standard-16", - "os:Debian-10.3", - "pool:Skia", - "docker_installed:true" - ], - "environment": { - "RECIPES_USE_PY3": "true", - "VPYTHON_LOG_TRACE": "1" - }, - "env_prefixes": { - "CLOUDSDK_PYTHON": [ - "cipd_bin_packages/cpython3/bin/python3" - ], - "PATH": [ - "cipd_bin_packages/cpython3", - "cipd_bin_packages/cpython3/bin", - "cipd_bin_packages", - "cipd_bin_packages/bin" - ], - "VPYTHON_DEFAULT_SPEC": [ - "skia/.vpython" - ], - "VPYTHON_VIRTUALENV_ROOT": [ - "cache/vpython" - ] - }, - "execution_timeout_ns": 3600000000000, - "extra_tags": { - "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" - }, - "idempotent": true, - "io_timeout_ns": 3600000000000, - "max_attempts": 2, - "outputs": [ - "build" - ], - "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" - }, - "Build-Debian10-GCC-x86_64-Release-Shared_Docker": { - "caches": [ - { - "name": "ccache", - "path": "cache/ccache" - }, - { - "name": "docker", - "path": "cache/docker" - }, - { - "name": "vpython", - "path": "cache/vpython" - } - ], - "casSpec": "compile", - "cipd_packages": [ - { - "name": "infra/3pp/tools/cpython3/linux-amd64", - "path": "cipd_bin_packages/cpython3", - "version": "version:2@3.8.10.chromium.19" - }, - { - "name": "infra/tools/luci-auth/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/kitchen/${platform}", - "path": ".", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/vpython-native/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/vpython/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "skia/bots/ccache_linux", - "path": "ccache_linux", - "version": "version:1" + "name": "skia/bots/clang_linux", + "path": "clang_linux", + "version": "version:30" } ], "command": [ @@ -13767,28 +13518,23 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian10-GCC-x86_64-Release-Shared_Docker\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian11-Clang-x86_64-Debug-Graphite_Vulkan\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "gpu:none", - "machine_type:n1-standard-16", - "os:Debian-10.3", - "pool:Skia", - "docker_installed:true" + "cpu:x86-64", + "gpu:10de:2489", + "os:Debian-11.5", + "pool:Skia" ], "environment": { "RECIPES_USE_PY3": "true", "VPYTHON_LOG_TRACE": "1" }, "env_prefixes": { - "CLOUDSDK_PYTHON": [ - "cipd_bin_packages/cpython3/bin/python3" - ], "PATH": [ "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", @@ -13814,7 +13560,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Debian11-Clang-x86_64-Debug": { + "Build-Debian11-Clang-x86_64-Debug-TSAN": { "caches": [ { "name": "ccache", @@ -13869,7 +13615,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian11-Clang-x86_64-Debug\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian11-Clang-x86_64-Debug-TSAN\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -13911,7 +13657,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Debian11-Clang-x86_64-Debug-ASAN": { + "Build-Debian11-Clang-x86_64-Debug-Vulkan": { "caches": [ { "name": "ccache", @@ -13966,7 +13712,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian11-Clang-x86_64-Debug-ASAN\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian11-Clang-x86_64-Debug-Vulkan\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -14008,7 +13754,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Debian11-Clang-x86_64-Debug-ASAN_Vulkan": { + "Build-Debian11-Clang-x86_64-OptimizeForSize": { "caches": [ { "name": "ccache", @@ -14063,7 +13809,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian11-Clang-x86_64-Debug-ASAN_Vulkan\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian11-Clang-x86_64-OptimizeForSize\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -14105,20 +13851,12 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Debian11-Clang-x86_64-Debug-Graphite_Dawn": { + "Build-Debian11-Clang-x86_64-Release": { "caches": [ { "name": "ccache", "path": "cache/ccache" }, - { - "name": "git", - "path": "cache/git" - }, - { - "name": "git_cache", - "path": "cache/git_cache" - }, { "name": "vpython", "path": "cache/vpython" @@ -14131,26 +13869,11 @@ "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, - { - "name": "infra/3pp/tools/git/linux-amd64", - "path": "cipd_bin_packages", - "version": "version:2@2.38.1.chromium.9" - }, - { - "name": "infra/tools/git/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, { "name": "infra/tools/luci-auth/${platform}", "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, - { - "name": "infra/tools/luci/git-credential-luci/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, { "name": "infra/tools/luci/kitchen/${platform}", "path": ".", @@ -14183,7 +13906,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian11-Clang-x86_64-Debug-Graphite_Dawn\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian11-Clang-x86_64-Release\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -14225,7 +13948,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Debian11-Clang-x86_64-Debug-Graphite_Vulkan": { + "Build-Debian11-Clang-x86_64-Release-ASAN": { "caches": [ { "name": "ccache", @@ -14280,7 +14003,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian11-Clang-x86_64-Debug-Graphite_Vulkan\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian11-Clang-x86_64-Release-ASAN\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -14322,108 +14045,19 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Debian11-Clang-x86_64-Debug-TSAN": { + "Build-Debian11-Clang-x86_64-Release-Graphite_Dawn": { "caches": [ { "name": "ccache", "path": "cache/ccache" }, { - "name": "vpython", - "path": "cache/vpython" - } - ], - "casSpec": "compile", - "cipd_packages": [ - { - "name": "infra/3pp/tools/cpython3/linux-amd64", - "path": "cipd_bin_packages/cpython3", - "version": "version:2@3.8.10.chromium.19" - }, - { - "name": "infra/tools/luci-auth/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/kitchen/${platform}", - "path": ".", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/vpython-native/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/vpython/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "skia/bots/ccache_linux", - "path": "ccache_linux", - "version": "version:1" + "name": "git", + "path": "cache/git" }, { - "name": "skia/bots/clang_linux", - "path": "clang_linux", - "version": "version:30" - } - ], - "command": [ - "cipd_bin_packages/vpython3${EXECUTABLE_SUFFIX}", - "-u", - "skia/infra/bots/run_recipe.py", - "${ISOLATED_OUTDIR}", - "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian11-Clang-x86_64-Debug-TSAN\",\"swarm_out_dir\":\"build\"}", - "skia" - ], - "dependencies": [ - "Housekeeper-PerCommit-BundleRecipes" - ], - "dimensions": [ - "cpu:x86-64", - "gpu:10de:2489", - "os:Debian-11.5", - "pool:Skia" - ], - "environment": { - "RECIPES_USE_PY3": "true", - "VPYTHON_LOG_TRACE": "1" - }, - "env_prefixes": { - "PATH": [ - "cipd_bin_packages/cpython3", - "cipd_bin_packages/cpython3/bin", - "cipd_bin_packages", - "cipd_bin_packages/bin" - ], - "VPYTHON_DEFAULT_SPEC": [ - "skia/.vpython" - ], - "VPYTHON_VIRTUALENV_ROOT": [ - "cache/vpython" - ] - }, - "execution_timeout_ns": 3600000000000, - "extra_tags": { - "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" - }, - "idempotent": true, - "io_timeout_ns": 3600000000000, - "max_attempts": 2, - "outputs": [ - "build" - ], - "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" - }, - "Build-Debian11-Clang-x86_64-Debug-Vulkan": { - "caches": [ - { - "name": "ccache", - "path": "cache/ccache" + "name": "git_cache", + "path": "cache/git_cache" }, { "name": "vpython", @@ -14438,104 +14072,22 @@ "version": "version:2@3.8.10.chromium.19" }, { - "name": "infra/tools/luci-auth/${platform}", + "name": "infra/3pp/tools/git/linux-amd64", "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/kitchen/${platform}", - "path": ".", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + "version": "version:2@2.38.1.chromium.9" }, { - "name": "infra/tools/luci/vpython-native/${platform}", + "name": "infra/tools/git/${platform}", "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, { - "name": "infra/tools/luci/vpython/${platform}", + "name": "infra/tools/luci-auth/${platform}", "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, { - "name": "skia/bots/ccache_linux", - "path": "ccache_linux", - "version": "version:1" - }, - { - "name": "skia/bots/clang_linux", - "path": "clang_linux", - "version": "version:30" - } - ], - "command": [ - "cipd_bin_packages/vpython3${EXECUTABLE_SUFFIX}", - "-u", - "skia/infra/bots/run_recipe.py", - "${ISOLATED_OUTDIR}", - "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian11-Clang-x86_64-Debug-Vulkan\",\"swarm_out_dir\":\"build\"}", - "skia" - ], - "dependencies": [ - "Housekeeper-PerCommit-BundleRecipes" - ], - "dimensions": [ - "cpu:x86-64", - "gpu:10de:2489", - "os:Debian-11.5", - "pool:Skia" - ], - "environment": { - "RECIPES_USE_PY3": "true", - "VPYTHON_LOG_TRACE": "1" - }, - "env_prefixes": { - "PATH": [ - "cipd_bin_packages/cpython3", - "cipd_bin_packages/cpython3/bin", - "cipd_bin_packages", - "cipd_bin_packages/bin" - ], - "VPYTHON_DEFAULT_SPEC": [ - "skia/.vpython" - ], - "VPYTHON_VIRTUALENV_ROOT": [ - "cache/vpython" - ] - }, - "execution_timeout_ns": 3600000000000, - "extra_tags": { - "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" - }, - "idempotent": true, - "io_timeout_ns": 3600000000000, - "max_attempts": 2, - "outputs": [ - "build" - ], - "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" - }, - "Build-Debian11-Clang-x86_64-OptimizeForSize": { - "caches": [ - { - "name": "ccache", - "path": "cache/ccache" - }, - { - "name": "vpython", - "path": "cache/vpython" - } - ], - "casSpec": "compile", - "cipd_packages": [ - { - "name": "infra/3pp/tools/cpython3/linux-amd64", - "path": "cipd_bin_packages/cpython3", - "version": "version:2@3.8.10.chromium.19" - }, - { - "name": "infra/tools/luci-auth/${platform}", + "name": "infra/tools/luci/git-credential-luci/${platform}", "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, @@ -14571,7 +14123,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian11-Clang-x86_64-OptimizeForSize\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian11-Clang-x86_64-Release-Graphite_Dawn\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -14613,7 +14165,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Debian11-Clang-x86_64-Release": { + "Build-Debian11-Clang-x86_64-Release-Graphite_Vulkan": { "caches": [ { "name": "ccache", @@ -14668,7 +14220,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian11-Clang-x86_64-Release\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian11-Clang-x86_64-Release-Graphite_Vulkan\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -14710,7 +14262,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Debian11-Clang-x86_64-Release-ASAN": { + "Build-Debian11-Clang-x86_64-Release-TSAN": { "caches": [ { "name": "ccache", @@ -14765,7 +14317,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian11-Clang-x86_64-Release-ASAN\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian11-Clang-x86_64-Release-TSAN\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -14807,20 +14359,12 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Debian11-Clang-x86_64-Release-Graphite_Dawn": { + "Build-Debian11-Clang-x86_64-Release-TSAN_Vulkan": { "caches": [ { "name": "ccache", "path": "cache/ccache" }, - { - "name": "git", - "path": "cache/git" - }, - { - "name": "git_cache", - "path": "cache/git_cache" - }, { "name": "vpython", "path": "cache/vpython" @@ -14833,26 +14377,11 @@ "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, - { - "name": "infra/3pp/tools/git/linux-amd64", - "path": "cipd_bin_packages", - "version": "version:2@2.38.1.chromium.9" - }, - { - "name": "infra/tools/git/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, { "name": "infra/tools/luci-auth/${platform}", "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, - { - "name": "infra/tools/luci/git-credential-luci/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, { "name": "infra/tools/luci/kitchen/${platform}", "path": ".", @@ -14885,7 +14414,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian11-Clang-x86_64-Release-Graphite_Dawn\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian11-Clang-x86_64-Release-TSAN_Vulkan\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -14927,7 +14456,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Debian11-Clang-x86_64-Release-Graphite_Vulkan": { + "Build-Debian11-Clang-x86_64-Release-Vulkan": { "caches": [ { "name": "ccache", @@ -14982,7 +14511,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian11-Clang-x86_64-Release-Graphite_Vulkan\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian11-Clang-x86_64-Release-Vulkan\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -15024,12 +14553,16 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Debian11-Clang-x86_64-Release-TSAN": { + "Build-Debian11-GCC-x86-Debug-Docker": { "caches": [ { "name": "ccache", "path": "cache/ccache" }, + { + "name": "docker", + "path": "cache/docker" + }, { "name": "vpython", "path": "cache/vpython" @@ -15066,11 +14599,6 @@ "name": "skia/bots/ccache_linux", "path": "ccache_linux", "version": "version:1" - }, - { - "name": "skia/bots/clang_linux", - "path": "clang_linux", - "version": "version:30" } ], "command": [ @@ -15079,23 +14607,28 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian11-Clang-x86_64-Release-TSAN\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian11-GCC-x86-Debug-Docker\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "cpu:x86-64", - "gpu:10de:2489", - "os:Debian-11.5", - "pool:Skia" + "cpu:x86-64-Haswell_GCE", + "gpu:none", + "machine_type:n1-standard-16", + "os:Debian-10.3", + "pool:Skia", + "docker_installed:true" ], "environment": { "RECIPES_USE_PY3": "true", "VPYTHON_LOG_TRACE": "1" }, "env_prefixes": { + "CLOUDSDK_PYTHON": [ + "cipd_bin_packages/cpython3/bin/python3" + ], "PATH": [ "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", @@ -15121,12 +14654,16 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Debian11-Clang-x86_64-Release-TSAN_Vulkan": { + "Build-Debian11-GCC-x86-Release-Docker": { "caches": [ { "name": "ccache", "path": "cache/ccache" }, + { + "name": "docker", + "path": "cache/docker" + }, { "name": "vpython", "path": "cache/vpython" @@ -15163,11 +14700,6 @@ "name": "skia/bots/ccache_linux", "path": "ccache_linux", "version": "version:1" - }, - { - "name": "skia/bots/clang_linux", - "path": "clang_linux", - "version": "version:30" } ], "command": [ @@ -15176,23 +14708,28 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian11-Clang-x86_64-Release-TSAN_Vulkan\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian11-GCC-x86-Release-Docker\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "cpu:x86-64", - "gpu:10de:2489", - "os:Debian-11.5", - "pool:Skia" + "cpu:x86-64-Haswell_GCE", + "gpu:none", + "machine_type:n1-standard-16", + "os:Debian-10.3", + "pool:Skia", + "docker_installed:true" ], "environment": { "RECIPES_USE_PY3": "true", "VPYTHON_LOG_TRACE": "1" }, "env_prefixes": { + "CLOUDSDK_PYTHON": [ + "cipd_bin_packages/cpython3/bin/python3" + ], "PATH": [ "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", @@ -15218,12 +14755,16 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Debian11-Clang-x86_64-Release-Vulkan": { + "Build-Debian11-GCC-x86_64-Debug-Docker": { "caches": [ { "name": "ccache", "path": "cache/ccache" }, + { + "name": "docker", + "path": "cache/docker" + }, { "name": "vpython", "path": "cache/vpython" @@ -15260,11 +14801,6 @@ "name": "skia/bots/ccache_linux", "path": "ccache_linux", "version": "version:1" - }, - { - "name": "skia/bots/clang_linux", - "path": "clang_linux", - "version": "version:30" } ], "command": [ @@ -15273,23 +14809,28 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian11-Clang-x86_64-Release-Vulkan\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian11-GCC-x86_64-Debug-Docker\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "cpu:x86-64", - "gpu:10de:2489", - "os:Debian-11.5", - "pool:Skia" + "cpu:x86-64-Haswell_GCE", + "gpu:none", + "machine_type:n1-standard-16", + "os:Debian-10.3", + "pool:Skia", + "docker_installed:true" ], "environment": { "RECIPES_USE_PY3": "true", "VPYTHON_LOG_TRACE": "1" }, "env_prefixes": { + "CLOUDSDK_PYTHON": [ + "cipd_bin_packages/cpython3/bin/python3" + ], "PATH": [ "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", @@ -15315,25 +14856,25 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Mac-Clang-arm64-Debug": { + "Build-Debian11-GCC-x86_64-Debug-NoGPU_Docker": { "caches": [ { "name": "ccache", "path": "cache/ccache" }, { - "name": "vpython", - "path": "cache/vpython" + "name": "docker", + "path": "cache/docker" }, { - "name": "xcode", - "path": "cache/Xcode.app" + "name": "vpython", + "path": "cache/vpython" } ], "casSpec": "compile", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/mac-amd64", + "name": "infra/3pp/tools/cpython3/linux-amd64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, @@ -15358,13 +14899,8 @@ "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, { - "name": "infra/tools/mac_toolchain/${platform}", - "path": "mac_toolchain", - "version": "git_revision:796d2b92cff93fc2059623ce0a66284373ceea0a" - }, - { - "name": "skia/bots/ccache_mac", - "path": "ccache_mac", + "name": "skia/bots/ccache_linux", + "path": "ccache_linux", "version": "version:1" } ], @@ -15374,23 +14910,28 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Debug\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian11-GCC-x86_64-Debug-NoGPU_Docker\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "cores:12", - "cpu:x86-64", - "os:Mac-10.15.7", - "pool:Skia" + "cpu:x86-64-Haswell_GCE", + "gpu:none", + "machine_type:n1-standard-16", + "os:Debian-10.3", + "pool:Skia", + "docker_installed:true" ], "environment": { "RECIPES_USE_PY3": "true", "VPYTHON_LOG_TRACE": "1" }, "env_prefixes": { + "CLOUDSDK_PYTHON": [ + "cipd_bin_packages/cpython3/bin/python3" + ], "PATH": [ "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", @@ -15416,25 +14957,25 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Mac-Clang-arm64-Debug-ANGLE": { + "Build-Debian11-GCC-x86_64-Release-Docker": { "caches": [ { "name": "ccache", "path": "cache/ccache" }, { - "name": "vpython", - "path": "cache/vpython" + "name": "docker", + "path": "cache/docker" }, { - "name": "xcode", - "path": "cache/Xcode.app" + "name": "vpython", + "path": "cache/vpython" } ], "casSpec": "compile", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/mac-amd64", + "name": "infra/3pp/tools/cpython3/linux-amd64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, @@ -15459,13 +15000,8 @@ "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, { - "name": "infra/tools/mac_toolchain/${platform}", - "path": "mac_toolchain", - "version": "git_revision:796d2b92cff93fc2059623ce0a66284373ceea0a" - }, - { - "name": "skia/bots/ccache_mac", - "path": "ccache_mac", + "name": "skia/bots/ccache_linux", + "path": "ccache_linux", "version": "version:1" } ], @@ -15475,23 +15011,28 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Debug-ANGLE\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian11-GCC-x86_64-Release-Docker\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "cores:12", - "cpu:x86-64", - "os:Mac-10.15.7", - "pool:Skia" + "cpu:x86-64-Haswell_GCE", + "gpu:none", + "machine_type:n1-standard-16", + "os:Debian-10.3", + "pool:Skia", + "docker_installed:true" ], "environment": { "RECIPES_USE_PY3": "true", "VPYTHON_LOG_TRACE": "1" }, "env_prefixes": { + "CLOUDSDK_PYTHON": [ + "cipd_bin_packages/cpython3/bin/python3" + ], "PATH": [ "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", @@ -15517,25 +15058,25 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Mac-Clang-arm64-Debug-ASAN": { + "Build-Debian11-GCC-x86_64-Release-NoGPU_Docker": { "caches": [ { "name": "ccache", "path": "cache/ccache" }, { - "name": "vpython", - "path": "cache/vpython" + "name": "docker", + "path": "cache/docker" }, { - "name": "xcode", - "path": "cache/Xcode.app" + "name": "vpython", + "path": "cache/vpython" } ], "casSpec": "compile", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/mac-amd64", + "name": "infra/3pp/tools/cpython3/linux-amd64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, @@ -15560,13 +15101,8 @@ "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, { - "name": "infra/tools/mac_toolchain/${platform}", - "path": "mac_toolchain", - "version": "git_revision:796d2b92cff93fc2059623ce0a66284373ceea0a" - }, - { - "name": "skia/bots/ccache_mac", - "path": "ccache_mac", + "name": "skia/bots/ccache_linux", + "path": "ccache_linux", "version": "version:1" } ], @@ -15576,23 +15112,28 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Debug-ASAN\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian11-GCC-x86_64-Release-NoGPU_Docker\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "cores:12", - "cpu:x86-64", - "os:Mac-10.15.7", - "pool:Skia" + "cpu:x86-64-Haswell_GCE", + "gpu:none", + "machine_type:n1-standard-16", + "os:Debian-10.3", + "pool:Skia", + "docker_installed:true" ], "environment": { "RECIPES_USE_PY3": "true", "VPYTHON_LOG_TRACE": "1" }, "env_prefixes": { + "CLOUDSDK_PYTHON": [ + "cipd_bin_packages/cpython3/bin/python3" + ], "PATH": [ "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", @@ -15618,56 +15159,33 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Mac-Clang-arm64-Debug-ASAN_Graphite_Dawn": { + "Build-Debian11-GCC-x86_64-Release-Shared_Docker": { "caches": [ { "name": "ccache", "path": "cache/ccache" }, { - "name": "git", - "path": "cache/git" - }, - { - "name": "git_cache", - "path": "cache/git_cache" + "name": "docker", + "path": "cache/docker" }, { "name": "vpython", "path": "cache/vpython" - }, - { - "name": "xcode", - "path": "cache/Xcode.app" } ], "casSpec": "compile", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/mac-amd64", + "name": "infra/3pp/tools/cpython3/linux-amd64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, - { - "name": "infra/3pp/tools/git/mac-amd64", - "path": "cipd_bin_packages", - "version": "version:2@2.38.1.chromium.9" - }, - { - "name": "infra/tools/git/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, { "name": "infra/tools/luci-auth/${platform}", "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, - { - "name": "infra/tools/luci/git-credential-luci/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, { "name": "infra/tools/luci/kitchen/${platform}", "path": ".", @@ -15684,13 +15202,8 @@ "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, { - "name": "infra/tools/mac_toolchain/${platform}", - "path": "mac_toolchain", - "version": "git_revision:796d2b92cff93fc2059623ce0a66284373ceea0a" - }, - { - "name": "skia/bots/ccache_mac", - "path": "ccache_mac", + "name": "skia/bots/ccache_linux", + "path": "ccache_linux", "version": "version:1" } ], @@ -15700,23 +15213,28 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Debug-ASAN_Graphite_Dawn\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Debian11-GCC-x86_64-Release-Shared_Docker\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "cores:12", - "cpu:x86-64", - "os:Mac-10.15.7", - "pool:Skia" + "cpu:x86-64-Haswell_GCE", + "gpu:none", + "machine_type:n1-standard-16", + "os:Debian-10.3", + "pool:Skia", + "docker_installed:true" ], "environment": { "RECIPES_USE_PY3": "true", "VPYTHON_LOG_TRACE": "1" }, "env_prefixes": { + "CLOUDSDK_PYTHON": [ + "cipd_bin_packages/cpython3/bin/python3" + ], "PATH": [ "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", @@ -15742,7 +15260,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Mac-Clang-arm64-Debug-ASAN_Graphite_Metal": { + "Build-Mac-Clang-arm64-Debug": { "caches": [ { "name": "ccache", @@ -15801,7 +15319,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Debug-ASAN_Graphite_Metal\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Debug\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -15843,11 +15361,19 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Mac-Clang-arm64-Debug-Android": { + "Build-Mac-Clang-arm64-Debug-ANGLE": { "caches": [ + { + "name": "ccache", + "path": "cache/ccache" + }, { "name": "vpython", "path": "cache/vpython" + }, + { + "name": "xcode", + "path": "cache/Xcode.app" } ], "casSpec": "compile", @@ -15878,9 +15404,14 @@ "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, { - "name": "skia/bots/android_ndk_darwin", - "path": "android_ndk_darwin", - "version": "version:10" + "name": "infra/tools/mac_toolchain/${platform}", + "path": "mac_toolchain", + "version": "git_revision:796d2b92cff93fc2059623ce0a66284373ceea0a" + }, + { + "name": "skia/bots/ccache_mac", + "path": "ccache_mac", + "version": "version:1" } ], "command": [ @@ -15889,7 +15420,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Debug-Android\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Debug-ANGLE\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -15931,20 +15462,12 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Mac-Clang-arm64-Debug-Graphite_Dawn": { + "Build-Mac-Clang-arm64-Debug-ASAN": { "caches": [ { "name": "ccache", "path": "cache/ccache" }, - { - "name": "git", - "path": "cache/git" - }, - { - "name": "git_cache", - "path": "cache/git_cache" - }, { "name": "vpython", "path": "cache/vpython" @@ -15961,26 +15484,11 @@ "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, - { - "name": "infra/3pp/tools/git/mac-amd64", - "path": "cipd_bin_packages", - "version": "version:2@2.38.1.chromium.9" - }, - { - "name": "infra/tools/git/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, { "name": "infra/tools/luci-auth/${platform}", "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, - { - "name": "infra/tools/luci/git-credential-luci/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, { "name": "infra/tools/luci/kitchen/${platform}", "path": ".", @@ -16013,7 +15521,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Debug-Graphite_Dawn\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Debug-ASAN\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -16055,7 +15563,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Mac-Clang-arm64-Debug-Graphite_Dawn_NoGpu": { + "Build-Mac-Clang-arm64-Debug-ASAN_Graphite_Dawn": { "caches": [ { "name": "ccache", @@ -16137,7 +15645,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Debug-Graphite_Dawn_NoGpu\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Debug-ASAN_Graphite_Dawn\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -16179,20 +15687,12 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Mac-Clang-arm64-Debug-Graphite_Dawn_NoPrecompile": { + "Build-Mac-Clang-arm64-Debug-ASAN_Graphite_Metal": { "caches": [ { "name": "ccache", "path": "cache/ccache" }, - { - "name": "git", - "path": "cache/git" - }, - { - "name": "git_cache", - "path": "cache/git_cache" - }, { "name": "vpython", "path": "cache/vpython" @@ -16209,26 +15709,11 @@ "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, - { - "name": "infra/3pp/tools/git/mac-amd64", - "path": "cipd_bin_packages", - "version": "version:2@2.38.1.chromium.9" - }, - { - "name": "infra/tools/git/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, { "name": "infra/tools/luci-auth/${platform}", "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, - { - "name": "infra/tools/luci/git-credential-luci/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, { "name": "infra/tools/luci/kitchen/${platform}", "path": ".", @@ -16261,7 +15746,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Debug-Graphite_Dawn_NoPrecompile\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Debug-ASAN_Graphite_Metal\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -16303,19 +15788,11 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Mac-Clang-arm64-Debug-Graphite_Metal": { + "Build-Mac-Clang-arm64-Debug-Android": { "caches": [ - { - "name": "ccache", - "path": "cache/ccache" - }, { "name": "vpython", "path": "cache/vpython" - }, - { - "name": "xcode", - "path": "cache/Xcode.app" } ], "casSpec": "compile", @@ -16346,14 +15823,9 @@ "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, { - "name": "infra/tools/mac_toolchain/${platform}", - "path": "mac_toolchain", - "version": "git_revision:796d2b92cff93fc2059623ce0a66284373ceea0a" - }, - { - "name": "skia/bots/ccache_mac", - "path": "ccache_mac", - "version": "version:1" + "name": "skia/bots/android_ndk_darwin", + "path": "android_ndk_darwin", + "version": "version:10" } ], "command": [ @@ -16362,7 +15834,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Debug-Graphite_Metal\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Debug-Android\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -16404,12 +15876,20 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Mac-Clang-arm64-Debug-Graphite_Metal_NoGpu": { + "Build-Mac-Clang-arm64-Debug-Graphite_Dawn": { "caches": [ { "name": "ccache", "path": "cache/ccache" }, + { + "name": "git", + "path": "cache/git" + }, + { + "name": "git_cache", + "path": "cache/git_cache" + }, { "name": "vpython", "path": "cache/vpython" @@ -16426,11 +15906,26 @@ "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, + { + "name": "infra/3pp/tools/git/mac-amd64", + "path": "cipd_bin_packages", + "version": "version:2@2.38.1.chromium.9" + }, + { + "name": "infra/tools/git/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, { "name": "infra/tools/luci-auth/${platform}", "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, + { + "name": "infra/tools/luci/git-credential-luci/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, { "name": "infra/tools/luci/kitchen/${platform}", "path": ".", @@ -16463,7 +15958,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Debug-Graphite_Metal_NoGpu\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Debug-Graphite_Dawn\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -16505,12 +16000,20 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Mac-Clang-arm64-Debug-Graphite_Metal_NoPrecompile": { + "Build-Mac-Clang-arm64-Debug-Graphite_Dawn_NoGpu": { "caches": [ { "name": "ccache", "path": "cache/ccache" }, + { + "name": "git", + "path": "cache/git" + }, + { + "name": "git_cache", + "path": "cache/git_cache" + }, { "name": "vpython", "path": "cache/vpython" @@ -16527,11 +16030,26 @@ "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, + { + "name": "infra/3pp/tools/git/mac-amd64", + "path": "cipd_bin_packages", + "version": "version:2@2.38.1.chromium.9" + }, + { + "name": "infra/tools/git/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, { "name": "infra/tools/luci-auth/${platform}", "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, + { + "name": "infra/tools/luci/git-credential-luci/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, { "name": "infra/tools/luci/kitchen/${platform}", "path": ".", @@ -16564,7 +16082,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Debug-Graphite_Metal_NoPrecompile\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Debug-Graphite_Dawn_NoGpu\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -16606,12 +16124,20 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Mac-Clang-arm64-Debug-Metal": { + "Build-Mac-Clang-arm64-Debug-Graphite_Dawn_NoPrecompile": { "caches": [ { "name": "ccache", "path": "cache/ccache" }, + { + "name": "git", + "path": "cache/git" + }, + { + "name": "git_cache", + "path": "cache/git_cache" + }, { "name": "vpython", "path": "cache/vpython" @@ -16628,11 +16154,26 @@ "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, + { + "name": "infra/3pp/tools/git/mac-amd64", + "path": "cipd_bin_packages", + "version": "version:2@2.38.1.chromium.9" + }, + { + "name": "infra/tools/git/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, { "name": "infra/tools/luci-auth/${platform}", "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, + { + "name": "infra/tools/luci/git-credential-luci/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, { "name": "infra/tools/luci/kitchen/${platform}", "path": ".", @@ -16665,7 +16206,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Debug-Metal\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Debug-Graphite_Dawn_NoPrecompile\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -16707,7 +16248,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Mac-Clang-arm64-Debug-Slug": { + "Build-Mac-Clang-arm64-Debug-Graphite_Metal": { "caches": [ { "name": "ccache", @@ -16766,7 +16307,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Debug-Slug\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Debug-Graphite_Metal\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -16808,7 +16349,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Mac-Clang-arm64-Debug-iOS": { + "Build-Mac-Clang-arm64-Debug-Graphite_Metal_NoGpu": { "caches": [ { "name": "ccache", @@ -16859,11 +16400,6 @@ "name": "skia/bots/ccache_mac", "path": "ccache_mac", "version": "version:1" - }, - { - "name": "skia/bots/provisioning_profile_ios", - "path": "provisioning_profile_ios", - "version": "version:10" } ], "command": [ @@ -16872,7 +16408,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Debug-iOS\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Debug-Graphite_Metal_NoGpu\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -16914,7 +16450,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Mac-Clang-arm64-Debug-iOS_Graphite_Metal": { + "Build-Mac-Clang-arm64-Debug-Graphite_Metal_NoPrecompile": { "caches": [ { "name": "ccache", @@ -16965,11 +16501,6 @@ "name": "skia/bots/ccache_mac", "path": "ccache_mac", "version": "version:1" - }, - { - "name": "skia/bots/provisioning_profile_ios", - "path": "provisioning_profile_ios", - "version": "version:10" } ], "command": [ @@ -16978,7 +16509,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Debug-iOS_Graphite_Metal\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Debug-Graphite_Metal_NoPrecompile\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -17020,33 +16551,60 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Mac-Clang-arm64-Debug-iOS_Metal": { + "Build-Mac-Clang-arm64-Debug-Graphite_Metal_Vello": { "caches": [ { "name": "ccache", "path": "cache/ccache" }, + { + "name": "git", + "path": "cache/git" + }, + { + "name": "git_cache", + "path": "cache/git_cache" + }, { "name": "vpython", "path": "cache/vpython" }, + { + "name": "work", + "path": "cache/work" + }, { "name": "xcode", "path": "cache/Xcode.app" } ], - "casSpec": "compile", + "casSpec": "run-recipe", "cipd_packages": [ { "name": "infra/3pp/tools/cpython3/mac-amd64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, + { + "name": "infra/3pp/tools/git/mac-amd64", + "path": "cipd_bin_packages", + "version": "version:2@2.38.1.chromium.9" + }, + { + "name": "infra/tools/git/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, { "name": "infra/tools/luci-auth/${platform}", "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, + { + "name": "infra/tools/luci/git-credential-luci/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, { "name": "infra/tools/luci/kitchen/${platform}", "path": ".", @@ -17067,15 +16625,15 @@ "path": "mac_toolchain", "version": "git_revision:796d2b92cff93fc2059623ce0a66284373ceea0a" }, + { + "name": "skia/bots/bazelisk_mac_amd64", + "path": "bazelisk_mac_amd64", + "version": "version:0" + }, { "name": "skia/bots/ccache_mac", "path": "ccache_mac", "version": "version:1" - }, - { - "name": "skia/bots/provisioning_profile_ios", - "path": "provisioning_profile_ios", - "version": "version:10" } ], "command": [ @@ -17083,8 +16641,8 @@ "-u", "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", - "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Debug-iOS_Metal\",\"swarm_out_dir\":\"build\"}", + "sync_and_compile", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Build-Mac-Clang-arm64-Debug-Graphite_Metal_Vello\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"build\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ @@ -17105,7 +16663,8 @@ "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", "cipd_bin_packages", - "cipd_bin_packages/bin" + "cipd_bin_packages/bin", + "bazelisk_mac_amd64" ], "VPYTHON_DEFAULT_SPEC": [ "skia/.vpython" @@ -17118,15 +16677,14 @@ "extra_tags": { "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" }, - "idempotent": true, "io_timeout_ns": 3600000000000, - "max_attempts": 2, + "max_attempts": 1, "outputs": [ "build" ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Mac-Clang-arm64-Release": { + "Build-Mac-Clang-arm64-Debug-Metal": { "caches": [ { "name": "ccache", @@ -17185,7 +16743,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Release\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Debug-Metal\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -17227,7 +16785,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Mac-Clang-arm64-Release-ANGLE": { + "Build-Mac-Clang-arm64-Debug-Slug": { "caches": [ { "name": "ccache", @@ -17286,7 +16844,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Release-ANGLE\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Debug-Slug\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -17328,20 +16886,12 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Mac-Clang-arm64-Release-Graphite_Dawn": { + "Build-Mac-Clang-arm64-Debug-iOS": { "caches": [ { "name": "ccache", "path": "cache/ccache" }, - { - "name": "git", - "path": "cache/git" - }, - { - "name": "git_cache", - "path": "cache/git_cache" - }, { "name": "vpython", "path": "cache/vpython" @@ -17358,26 +16908,11 @@ "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, - { - "name": "infra/3pp/tools/git/mac-amd64", - "path": "cipd_bin_packages", - "version": "version:2@2.38.1.chromium.9" - }, - { - "name": "infra/tools/git/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, { "name": "infra/tools/luci-auth/${platform}", "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, - { - "name": "infra/tools/luci/git-credential-luci/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, { "name": "infra/tools/luci/kitchen/${platform}", "path": ".", @@ -17402,6 +16937,11 @@ "name": "skia/bots/ccache_mac", "path": "ccache_mac", "version": "version:1" + }, + { + "name": "skia/bots/provisioning_profile_ios", + "path": "provisioning_profile_ios", + "version": "version:10" } ], "command": [ @@ -17410,7 +16950,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Release-Graphite_Dawn\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Debug-iOS\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -17452,7 +16992,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Mac-Clang-arm64-Release-Graphite_Metal": { + "Build-Mac-Clang-arm64-Debug-iOS_Graphite_Metal": { "caches": [ { "name": "ccache", @@ -17503,6 +17043,11 @@ "name": "skia/bots/ccache_mac", "path": "ccache_mac", "version": "version:1" + }, + { + "name": "skia/bots/provisioning_profile_ios", + "path": "provisioning_profile_ios", + "version": "version:10" } ], "command": [ @@ -17511,7 +17056,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Release-Graphite_Metal\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Debug-iOS_Graphite_Metal\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -17553,7 +17098,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Mac-Clang-arm64-Release-Metal": { + "Build-Mac-Clang-arm64-Debug-iOS_Metal": { "caches": [ { "name": "ccache", @@ -17604,6 +17149,11 @@ "name": "skia/bots/ccache_mac", "path": "ccache_mac", "version": "version:1" + }, + { + "name": "skia/bots/provisioning_profile_ios", + "path": "provisioning_profile_ios", + "version": "version:10" } ], "command": [ @@ -17612,7 +17162,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Release-Metal\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Debug-iOS_Metal\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -17654,7 +17204,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Mac-Clang-arm64-Release-iOS": { + "Build-Mac-Clang-arm64-Release": { "caches": [ { "name": "ccache", @@ -17705,11 +17255,6 @@ "name": "skia/bots/ccache_mac", "path": "ccache_mac", "version": "version:1" - }, - { - "name": "skia/bots/provisioning_profile_ios", - "path": "provisioning_profile_ios", - "version": "version:10" } ], "command": [ @@ -17718,7 +17263,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Release-iOS\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Release\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -17760,7 +17305,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Mac-Clang-arm64-Release-iOS_Graphite_Metal": { + "Build-Mac-Clang-arm64-Release-ANGLE": { "caches": [ { "name": "ccache", @@ -17811,11 +17356,130 @@ "name": "skia/bots/ccache_mac", "path": "ccache_mac", "version": "version:1" + } + ], + "command": [ + "cipd_bin_packages/vpython3${EXECUTABLE_SUFFIX}", + "-u", + "skia/infra/bots/run_recipe.py", + "${ISOLATED_OUTDIR}", + "compile", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Release-ANGLE\",\"swarm_out_dir\":\"build\"}", + "skia" + ], + "dependencies": [ + "Housekeeper-PerCommit-BundleRecipes" + ], + "dimensions": [ + "cores:12", + "cpu:x86-64", + "os:Mac-10.15.7", + "pool:Skia" + ], + "environment": { + "RECIPES_USE_PY3": "true", + "VPYTHON_LOG_TRACE": "1" + }, + "env_prefixes": { + "PATH": [ + "cipd_bin_packages/cpython3", + "cipd_bin_packages/cpython3/bin", + "cipd_bin_packages", + "cipd_bin_packages/bin" + ], + "VPYTHON_DEFAULT_SPEC": [ + "skia/.vpython" + ], + "VPYTHON_VIRTUALENV_ROOT": [ + "cache/vpython" + ] + }, + "execution_timeout_ns": 3600000000000, + "extra_tags": { + "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" + }, + "idempotent": true, + "io_timeout_ns": 3600000000000, + "max_attempts": 2, + "outputs": [ + "build" + ], + "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" + }, + "Build-Mac-Clang-arm64-Release-Graphite_Dawn": { + "caches": [ + { + "name": "ccache", + "path": "cache/ccache" }, { - "name": "skia/bots/provisioning_profile_ios", - "path": "provisioning_profile_ios", - "version": "version:10" + "name": "git", + "path": "cache/git" + }, + { + "name": "git_cache", + "path": "cache/git_cache" + }, + { + "name": "vpython", + "path": "cache/vpython" + }, + { + "name": "xcode", + "path": "cache/Xcode.app" + } + ], + "casSpec": "compile", + "cipd_packages": [ + { + "name": "infra/3pp/tools/cpython3/mac-amd64", + "path": "cipd_bin_packages/cpython3", + "version": "version:2@3.8.10.chromium.19" + }, + { + "name": "infra/3pp/tools/git/mac-amd64", + "path": "cipd_bin_packages", + "version": "version:2@2.38.1.chromium.9" + }, + { + "name": "infra/tools/git/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci-auth/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/git-credential-luci/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/kitchen/${platform}", + "path": ".", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/vpython-native/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/vpython/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/mac_toolchain/${platform}", + "path": "mac_toolchain", + "version": "git_revision:796d2b92cff93fc2059623ce0a66284373ceea0a" + }, + { + "name": "skia/bots/ccache_mac", + "path": "ccache_mac", + "version": "version:1" } ], "command": [ @@ -17824,7 +17488,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Release-iOS_Graphite_Metal\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Release-Graphite_Dawn\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -17866,7 +17530,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Mac-Clang-arm64-Release-iOS_Metal": { + "Build-Mac-Clang-arm64-Release-Graphite_Metal": { "caches": [ { "name": "ccache", @@ -17917,11 +17581,107 @@ "name": "skia/bots/ccache_mac", "path": "ccache_mac", "version": "version:1" + } + ], + "command": [ + "cipd_bin_packages/vpython3${EXECUTABLE_SUFFIX}", + "-u", + "skia/infra/bots/run_recipe.py", + "${ISOLATED_OUTDIR}", + "compile", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Release-Graphite_Metal\",\"swarm_out_dir\":\"build\"}", + "skia" + ], + "dependencies": [ + "Housekeeper-PerCommit-BundleRecipes" + ], + "dimensions": [ + "cores:12", + "cpu:x86-64", + "os:Mac-10.15.7", + "pool:Skia" + ], + "environment": { + "RECIPES_USE_PY3": "true", + "VPYTHON_LOG_TRACE": "1" + }, + "env_prefixes": { + "PATH": [ + "cipd_bin_packages/cpython3", + "cipd_bin_packages/cpython3/bin", + "cipd_bin_packages", + "cipd_bin_packages/bin" + ], + "VPYTHON_DEFAULT_SPEC": [ + "skia/.vpython" + ], + "VPYTHON_VIRTUALENV_ROOT": [ + "cache/vpython" + ] + }, + "execution_timeout_ns": 3600000000000, + "extra_tags": { + "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" + }, + "idempotent": true, + "io_timeout_ns": 3600000000000, + "max_attempts": 2, + "outputs": [ + "build" + ], + "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" + }, + "Build-Mac-Clang-arm64-Release-Metal": { + "caches": [ + { + "name": "ccache", + "path": "cache/ccache" }, { - "name": "skia/bots/provisioning_profile_ios", - "path": "provisioning_profile_ios", - "version": "version:10" + "name": "vpython", + "path": "cache/vpython" + }, + { + "name": "xcode", + "path": "cache/Xcode.app" + } + ], + "casSpec": "compile", + "cipd_packages": [ + { + "name": "infra/3pp/tools/cpython3/mac-amd64", + "path": "cipd_bin_packages/cpython3", + "version": "version:2@3.8.10.chromium.19" + }, + { + "name": "infra/tools/luci-auth/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/kitchen/${platform}", + "path": ".", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/vpython-native/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/vpython/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/mac_toolchain/${platform}", + "path": "mac_toolchain", + "version": "git_revision:796d2b92cff93fc2059623ce0a66284373ceea0a" + }, + { + "name": "skia/bots/ccache_mac", + "path": "ccache_mac", + "version": "version:1" } ], "command": [ @@ -17930,7 +17690,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Release-iOS_Metal\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Release-Metal\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -17972,7 +17732,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Mac-Clang-x64-Release-iOS": { + "Build-Mac-Clang-arm64-Release-iOS": { "caches": [ { "name": "ccache", @@ -18036,7 +17796,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-x64-Release-iOS\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Release-iOS\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -18078,7 +17838,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Mac-Clang-x86_64-Debug": { + "Build-Mac-Clang-arm64-Release-iOS_Graphite_Metal": { "caches": [ { "name": "ccache", @@ -18129,6 +17889,11 @@ "name": "skia/bots/ccache_mac", "path": "ccache_mac", "version": "version:1" + }, + { + "name": "skia/bots/provisioning_profile_ios", + "path": "provisioning_profile_ios", + "version": "version:10" } ], "command": [ @@ -18137,7 +17902,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-x86_64-Debug\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Release-iOS_Graphite_Metal\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -18179,7 +17944,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Mac-Clang-x86_64-Debug-ANGLE": { + "Build-Mac-Clang-arm64-Release-iOS_Metal": { "caches": [ { "name": "ccache", @@ -18230,6 +17995,11 @@ "name": "skia/bots/ccache_mac", "path": "ccache_mac", "version": "version:1" + }, + { + "name": "skia/bots/provisioning_profile_ios", + "path": "provisioning_profile_ios", + "version": "version:10" } ], "command": [ @@ -18238,7 +18008,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-x86_64-Debug-ANGLE\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-arm64-Release-iOS_Metal\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -18280,7 +18050,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Mac-Clang-x86_64-Debug-ASAN": { + "Build-Mac-Clang-x64-Release-iOS": { "caches": [ { "name": "ccache", @@ -18331,6 +18101,11 @@ "name": "skia/bots/ccache_mac", "path": "ccache_mac", "version": "version:1" + }, + { + "name": "skia/bots/provisioning_profile_ios", + "path": "provisioning_profile_ios", + "version": "version:10" } ], "command": [ @@ -18339,7 +18114,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-x86_64-Debug-ASAN\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-x64-Release-iOS\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -18381,7 +18156,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Mac-Clang-x86_64-Debug-ASAN_Metal": { + "Build-Mac-Clang-x86_64-Debug": { "caches": [ { "name": "ccache", @@ -18440,7 +18215,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-x86_64-Debug-ASAN_Metal\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-x86_64-Debug\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -18482,19 +18257,112 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Mac-Clang-x86_64-Debug-Graphite_Dawn": { + "Build-Mac-Clang-x86_64-Debug-ANGLE": { "caches": [ { "name": "ccache", "path": "cache/ccache" }, { - "name": "git", - "path": "cache/git" + "name": "vpython", + "path": "cache/vpython" }, { - "name": "git_cache", - "path": "cache/git_cache" + "name": "xcode", + "path": "cache/Xcode.app" + } + ], + "casSpec": "compile", + "cipd_packages": [ + { + "name": "infra/3pp/tools/cpython3/mac-amd64", + "path": "cipd_bin_packages/cpython3", + "version": "version:2@3.8.10.chromium.19" + }, + { + "name": "infra/tools/luci-auth/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/kitchen/${platform}", + "path": ".", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/vpython-native/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/vpython/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/mac_toolchain/${platform}", + "path": "mac_toolchain", + "version": "git_revision:796d2b92cff93fc2059623ce0a66284373ceea0a" + }, + { + "name": "skia/bots/ccache_mac", + "path": "ccache_mac", + "version": "version:1" + } + ], + "command": [ + "cipd_bin_packages/vpython3${EXECUTABLE_SUFFIX}", + "-u", + "skia/infra/bots/run_recipe.py", + "${ISOLATED_OUTDIR}", + "compile", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-x86_64-Debug-ANGLE\",\"swarm_out_dir\":\"build\"}", + "skia" + ], + "dependencies": [ + "Housekeeper-PerCommit-BundleRecipes" + ], + "dimensions": [ + "cores:12", + "cpu:x86-64", + "os:Mac-10.15.7", + "pool:Skia" + ], + "environment": { + "RECIPES_USE_PY3": "true", + "VPYTHON_LOG_TRACE": "1" + }, + "env_prefixes": { + "PATH": [ + "cipd_bin_packages/cpython3", + "cipd_bin_packages/cpython3/bin", + "cipd_bin_packages", + "cipd_bin_packages/bin" + ], + "VPYTHON_DEFAULT_SPEC": [ + "skia/.vpython" + ], + "VPYTHON_VIRTUALENV_ROOT": [ + "cache/vpython" + ] + }, + "execution_timeout_ns": 3600000000000, + "extra_tags": { + "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" + }, + "idempotent": true, + "io_timeout_ns": 3600000000000, + "max_attempts": 2, + "outputs": [ + "build" + ], + "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" + }, + "Build-Mac-Clang-x86_64-Debug-ASAN": { + "caches": [ + { + "name": "ccache", + "path": "cache/ccache" }, { "name": "vpython", @@ -18513,22 +18381,108 @@ "version": "version:2@3.8.10.chromium.19" }, { - "name": "infra/3pp/tools/git/mac-amd64", + "name": "infra/tools/luci-auth/${platform}", "path": "cipd_bin_packages", - "version": "version:2@2.38.1.chromium.9" + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, { - "name": "infra/tools/git/${platform}", + "name": "infra/tools/luci/kitchen/${platform}", + "path": ".", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/vpython-native/${platform}", "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, { - "name": "infra/tools/luci-auth/${platform}", + "name": "infra/tools/luci/vpython/${platform}", "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, { - "name": "infra/tools/luci/git-credential-luci/${platform}", + "name": "infra/tools/mac_toolchain/${platform}", + "path": "mac_toolchain", + "version": "git_revision:796d2b92cff93fc2059623ce0a66284373ceea0a" + }, + { + "name": "skia/bots/ccache_mac", + "path": "ccache_mac", + "version": "version:1" + } + ], + "command": [ + "cipd_bin_packages/vpython3${EXECUTABLE_SUFFIX}", + "-u", + "skia/infra/bots/run_recipe.py", + "${ISOLATED_OUTDIR}", + "compile", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-x86_64-Debug-ASAN\",\"swarm_out_dir\":\"build\"}", + "skia" + ], + "dependencies": [ + "Housekeeper-PerCommit-BundleRecipes" + ], + "dimensions": [ + "cores:12", + "cpu:x86-64", + "os:Mac-10.15.7", + "pool:Skia" + ], + "environment": { + "RECIPES_USE_PY3": "true", + "VPYTHON_LOG_TRACE": "1" + }, + "env_prefixes": { + "PATH": [ + "cipd_bin_packages/cpython3", + "cipd_bin_packages/cpython3/bin", + "cipd_bin_packages", + "cipd_bin_packages/bin" + ], + "VPYTHON_DEFAULT_SPEC": [ + "skia/.vpython" + ], + "VPYTHON_VIRTUALENV_ROOT": [ + "cache/vpython" + ] + }, + "execution_timeout_ns": 3600000000000, + "extra_tags": { + "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" + }, + "idempotent": true, + "io_timeout_ns": 3600000000000, + "max_attempts": 2, + "outputs": [ + "build" + ], + "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" + }, + "Build-Mac-Clang-x86_64-Debug-ASAN_Metal": { + "caches": [ + { + "name": "ccache", + "path": "cache/ccache" + }, + { + "name": "vpython", + "path": "cache/vpython" + }, + { + "name": "xcode", + "path": "cache/Xcode.app" + } + ], + "casSpec": "compile", + "cipd_packages": [ + { + "name": "infra/3pp/tools/cpython3/mac-amd64", + "path": "cipd_bin_packages/cpython3", + "version": "version:2@3.8.10.chromium.19" + }, + { + "name": "infra/tools/luci-auth/${platform}", "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, @@ -18564,7 +18518,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-x86_64-Debug-Graphite_Dawn\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-x86_64-Debug-ASAN_Metal\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -18606,12 +18560,20 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Mac-Clang-x86_64-Debug-Graphite_Metal": { + "Build-Mac-Clang-x86_64-Debug-Graphite_Dawn": { "caches": [ { "name": "ccache", "path": "cache/ccache" }, + { + "name": "git", + "path": "cache/git" + }, + { + "name": "git_cache", + "path": "cache/git_cache" + }, { "name": "vpython", "path": "cache/vpython" @@ -18628,11 +18590,26 @@ "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, + { + "name": "infra/3pp/tools/git/mac-amd64", + "path": "cipd_bin_packages", + "version": "version:2@2.38.1.chromium.9" + }, + { + "name": "infra/tools/git/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, { "name": "infra/tools/luci-auth/${platform}", "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, + { + "name": "infra/tools/luci/git-credential-luci/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, { "name": "infra/tools/luci/kitchen/${platform}", "path": ".", @@ -18665,7 +18642,108 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-x86_64-Debug-Graphite_Metal\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-x86_64-Debug-Graphite_Dawn\",\"swarm_out_dir\":\"build\"}", + "skia" + ], + "dependencies": [ + "Housekeeper-PerCommit-BundleRecipes" + ], + "dimensions": [ + "cores:12", + "cpu:x86-64", + "os:Mac-10.15.7", + "pool:Skia" + ], + "environment": { + "RECIPES_USE_PY3": "true", + "VPYTHON_LOG_TRACE": "1" + }, + "env_prefixes": { + "PATH": [ + "cipd_bin_packages/cpython3", + "cipd_bin_packages/cpython3/bin", + "cipd_bin_packages", + "cipd_bin_packages/bin" + ], + "VPYTHON_DEFAULT_SPEC": [ + "skia/.vpython" + ], + "VPYTHON_VIRTUALENV_ROOT": [ + "cache/vpython" + ] + }, + "execution_timeout_ns": 3600000000000, + "extra_tags": { + "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" + }, + "idempotent": true, + "io_timeout_ns": 3600000000000, + "max_attempts": 2, + "outputs": [ + "build" + ], + "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" + }, + "Build-Mac-Clang-x86_64-Debug-Graphite_Metal": { + "caches": [ + { + "name": "ccache", + "path": "cache/ccache" + }, + { + "name": "vpython", + "path": "cache/vpython" + }, + { + "name": "xcode", + "path": "cache/Xcode.app" + } + ], + "casSpec": "compile", + "cipd_packages": [ + { + "name": "infra/3pp/tools/cpython3/mac-amd64", + "path": "cipd_bin_packages/cpython3", + "version": "version:2@3.8.10.chromium.19" + }, + { + "name": "infra/tools/luci-auth/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/kitchen/${platform}", + "path": ".", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/vpython-native/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/vpython/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/mac_toolchain/${platform}", + "path": "mac_toolchain", + "version": "git_revision:796d2b92cff93fc2059623ce0a66284373ceea0a" + }, + { + "name": "skia/bots/ccache_mac", + "path": "ccache_mac", + "version": "version:1" + } + ], + "command": [ + "cipd_bin_packages/vpython3${EXECUTABLE_SUFFIX}", + "-u", + "skia/infra/bots/run_recipe.py", + "${ISOLATED_OUTDIR}", + "compile", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Mac-Clang-x86_64-Debug-Graphite_Metal\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -21084,16 +21162,8 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Win-Clang-x86_64-Debug-Dawn": { + "Build-Win-Clang-x86_64-Debug-DWriteCore": { "caches": [ - { - "name": "git", - "path": "cache/git" - }, - { - "name": "git_cache", - "path": "cache/git_cache" - }, { "name": "vpython", "path": "cache/vpython" @@ -21106,26 +21176,11 @@ "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, - { - "name": "infra/3pp/tools/git/windows-amd64", - "path": "cipd_bin_packages", - "version": "version:2@2.38.1.chromium.9" - }, - { - "name": "infra/tools/git/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, { "name": "infra/tools/luci-auth/${platform}", "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, - { - "name": "infra/tools/luci/git-credential-luci/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, { "name": "infra/tools/luci/kitchen/${platform}", "path": ".", @@ -21145,96 +21200,11 @@ "name": "skia/bots/clang_win", "path": "clang_win", "version": "version:17" - } - ], - "command": [ - "cipd_bin_packages/vpython3${EXECUTABLE_SUFFIX}", - "-u", - "skia/infra/bots/run_recipe.py", - "${ISOLATED_OUTDIR}", - "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-Clang-x86_64-Debug-Dawn\",\"swarm_out_dir\":\"build\"}", - "skia" - ], - "dependencies": [ - "Housekeeper-PerCommit-BundleRecipes", - "Housekeeper-PerCommit-IsolateWinToolchain" - ], - "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "gpu:none", - "machine_type:n1-highcpu-64", - "os:Windows-Server-17763", - "pool:Skia" - ], - "environment": { - "RECIPES_USE_PY3": "true", - "VPYTHON_LOG_TRACE": "1" - }, - "env_prefixes": { - "PATH": [ - "cipd_bin_packages/cpython3", - "cipd_bin_packages/cpython3/bin", - "cipd_bin_packages", - "cipd_bin_packages/bin" - ], - "VPYTHON_DEFAULT_SPEC": [ - "skia/.vpython" - ], - "VPYTHON_VIRTUALENV_ROOT": [ - "cache/vpython" - ] - }, - "execution_timeout_ns": 3600000000000, - "extra_tags": { - "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" - }, - "idempotent": true, - "io_timeout_ns": 3600000000000, - "max_attempts": 2, - "outputs": [ - "build" - ], - "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" - }, - "Build-Win-Clang-x86_64-Debug-Direct3D": { - "caches": [ - { - "name": "vpython", - "path": "cache/vpython" - } - ], - "casSpec": "compile", - "cipd_packages": [ - { - "name": "infra/3pp/tools/cpython3/windows-amd64", - "path": "cipd_bin_packages/cpython3", - "version": "version:2@3.8.10.chromium.19" }, { - "name": "infra/tools/luci-auth/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/kitchen/${platform}", - "path": ".", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/vpython-native/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/vpython/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "skia/bots/clang_win", - "path": "clang_win", - "version": "version:17" + "name": "skia/bots/dwritecore", + "path": "dwritecore", + "version": "version:1" } ], "command": [ @@ -21243,7 +21213,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-Clang-x86_64-Debug-Direct3D\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-Clang-x86_64-Debug-DWriteCore\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -21287,7 +21257,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Win-Clang-x86_64-Debug-Graphite_Dawn": { + "Build-Win-Clang-x86_64-Debug-Dawn": { "caches": [ { "name": "git", @@ -21356,7 +21326,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-Clang-x86_64-Debug-Graphite_Dawn\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-Clang-x86_64-Debug-Dawn\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -21400,7 +21370,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Win-Clang-x86_64-Debug-Graphite_Vulkan": { + "Build-Win-Clang-x86_64-Debug-Direct3D": { "caches": [ { "name": "vpython", @@ -21446,7 +21416,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-Clang-x86_64-Debug-Graphite_Vulkan\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-Clang-x86_64-Debug-Direct3D\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -21490,8 +21460,16 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Win-Clang-x86_64-Debug-Vulkan": { + "Build-Win-Clang-x86_64-Debug-Graphite_Dawn": { "caches": [ + { + "name": "git", + "path": "cache/git" + }, + { + "name": "git_cache", + "path": "cache/git_cache" + }, { "name": "vpython", "path": "cache/vpython" @@ -21504,11 +21482,26 @@ "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, + { + "name": "infra/3pp/tools/git/windows-amd64", + "path": "cipd_bin_packages", + "version": "version:2@2.38.1.chromium.9" + }, + { + "name": "infra/tools/git/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, { "name": "infra/tools/luci-auth/${platform}", "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, + { + "name": "infra/tools/luci/git-credential-luci/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, { "name": "infra/tools/luci/kitchen/${platform}", "path": ".", @@ -21536,7 +21529,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-Clang-x86_64-Debug-Vulkan\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-Clang-x86_64-Debug-Graphite_Dawn\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -21580,7 +21573,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Win-Clang-x86_64-Debug-Wuffs": { + "Build-Win-Clang-x86_64-Debug-Graphite_Vulkan": { "caches": [ { "name": "vpython", @@ -21626,7 +21619,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-Clang-x86_64-Debug-Wuffs\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-Clang-x86_64-Debug-Graphite_Vulkan\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -21670,7 +21663,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Win-Clang-x86_64-Release": { + "Build-Win-Clang-x86_64-Debug-Vulkan": { "caches": [ { "name": "vpython", @@ -21716,7 +21709,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-Clang-x86_64-Release\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-Clang-x86_64-Debug-Vulkan\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -21760,7 +21753,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Win-Clang-x86_64-Release-ANGLE": { + "Build-Win-Clang-x86_64-Debug-Wuffs": { "caches": [ { "name": "vpython", @@ -21806,7 +21799,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-Clang-x86_64-Release-ANGLE\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-Clang-x86_64-Debug-Wuffs\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -21850,16 +21843,8 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Win-Clang-x86_64-Release-Dawn": { + "Build-Win-Clang-x86_64-Release": { "caches": [ - { - "name": "git", - "path": "cache/git" - }, - { - "name": "git_cache", - "path": "cache/git_cache" - }, { "name": "vpython", "path": "cache/vpython" @@ -21872,26 +21857,11 @@ "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, - { - "name": "infra/3pp/tools/git/windows-amd64", - "path": "cipd_bin_packages", - "version": "version:2@2.38.1.chromium.9" - }, - { - "name": "infra/tools/git/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, { "name": "infra/tools/luci-auth/${platform}", "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, - { - "name": "infra/tools/luci/git-credential-luci/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, { "name": "infra/tools/luci/kitchen/${platform}", "path": ".", @@ -21919,7 +21889,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-Clang-x86_64-Release-Dawn\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-Clang-x86_64-Release\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -21963,7 +21933,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Win-Clang-x86_64-Release-Direct3D": { + "Build-Win-Clang-x86_64-Release-ANGLE": { "caches": [ { "name": "vpython", @@ -22009,7 +21979,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-Clang-x86_64-Release-Direct3D\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-Clang-x86_64-Release-ANGLE\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -22053,7 +22023,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Win-Clang-x86_64-Release-Graphite_Dawn": { + "Build-Win-Clang-x86_64-Release-Dawn": { "caches": [ { "name": "git", @@ -22122,7 +22092,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-Clang-x86_64-Release-Graphite_Dawn\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-Clang-x86_64-Release-Dawn\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -22166,7 +22136,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Win-Clang-x86_64-Release-Graphite_Vulkan": { + "Build-Win-Clang-x86_64-Release-Direct3D": { "caches": [ { "name": "vpython", @@ -22212,7 +22182,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-Clang-x86_64-Release-Graphite_Vulkan\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-Clang-x86_64-Release-Direct3D\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -22256,8 +22226,16 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Win-Clang-x86_64-Release-Shared": { + "Build-Win-Clang-x86_64-Release-Graphite_Dawn": { "caches": [ + { + "name": "git", + "path": "cache/git" + }, + { + "name": "git_cache", + "path": "cache/git_cache" + }, { "name": "vpython", "path": "cache/vpython" @@ -22271,97 +22249,22 @@ "version": "version:2@3.8.10.chromium.19" }, { - "name": "infra/tools/luci-auth/${platform}", + "name": "infra/3pp/tools/git/windows-amd64", "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/kitchen/${platform}", - "path": ".", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + "version": "version:2@2.38.1.chromium.9" }, { - "name": "infra/tools/luci/vpython-native/${platform}", + "name": "infra/tools/git/${platform}", "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, { - "name": "infra/tools/luci/vpython/${platform}", + "name": "infra/tools/luci-auth/${platform}", "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, { - "name": "skia/bots/clang_win", - "path": "clang_win", - "version": "version:17" - } - ], - "command": [ - "cipd_bin_packages/vpython3${EXECUTABLE_SUFFIX}", - "-u", - "skia/infra/bots/run_recipe.py", - "${ISOLATED_OUTDIR}", - "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-Clang-x86_64-Release-Shared\",\"swarm_out_dir\":\"build\"}", - "skia" - ], - "dependencies": [ - "Housekeeper-PerCommit-BundleRecipes", - "Housekeeper-PerCommit-IsolateWinToolchain" - ], - "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "gpu:none", - "machine_type:n1-highcpu-64", - "os:Windows-Server-17763", - "pool:Skia" - ], - "environment": { - "RECIPES_USE_PY3": "true", - "VPYTHON_LOG_TRACE": "1" - }, - "env_prefixes": { - "PATH": [ - "cipd_bin_packages/cpython3", - "cipd_bin_packages/cpython3/bin", - "cipd_bin_packages", - "cipd_bin_packages/bin" - ], - "VPYTHON_DEFAULT_SPEC": [ - "skia/.vpython" - ], - "VPYTHON_VIRTUALENV_ROOT": [ - "cache/vpython" - ] - }, - "execution_timeout_ns": 3600000000000, - "extra_tags": { - "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" - }, - "idempotent": true, - "io_timeout_ns": 3600000000000, - "max_attempts": 2, - "outputs": [ - "build" - ], - "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" - }, - "Build-Win-Clang-x86_64-Release-Vulkan": { - "caches": [ - { - "name": "vpython", - "path": "cache/vpython" - } - ], - "casSpec": "compile", - "cipd_packages": [ - { - "name": "infra/3pp/tools/cpython3/windows-amd64", - "path": "cipd_bin_packages/cpython3", - "version": "version:2@3.8.10.chromium.19" - }, - { - "name": "infra/tools/luci-auth/${platform}", + "name": "infra/tools/luci/git-credential-luci/${platform}", "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, @@ -22392,7 +22295,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-Clang-x86_64-Release-Vulkan\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-Clang-x86_64-Release-Graphite_Dawn\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -22436,7 +22339,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Win-MSVC-arm64-Debug": { + "Build-Win-Clang-x86_64-Release-Graphite_Vulkan": { "caches": [ { "name": "vpython", @@ -22469,91 +22372,11 @@ "name": "infra/tools/luci/vpython/${platform}", "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - } - ], - "command": [ - "cipd_bin_packages/vpython3${EXECUTABLE_SUFFIX}", - "-u", - "skia/infra/bots/run_recipe.py", - "${ISOLATED_OUTDIR}", - "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-MSVC-arm64-Debug\",\"swarm_out_dir\":\"build\"}", - "skia" - ], - "dependencies": [ - "Housekeeper-PerCommit-BundleRecipes", - "Housekeeper-PerCommit-IsolateWinToolchain" - ], - "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "gpu:none", - "machine_type:n1-highcpu-64", - "os:Windows-Server-17763", - "pool:Skia" - ], - "environment": { - "RECIPES_USE_PY3": "true", - "VPYTHON_LOG_TRACE": "1" - }, - "env_prefixes": { - "PATH": [ - "cipd_bin_packages/cpython3", - "cipd_bin_packages/cpython3/bin", - "cipd_bin_packages", - "cipd_bin_packages/bin" - ], - "VPYTHON_DEFAULT_SPEC": [ - "skia/.vpython" - ], - "VPYTHON_VIRTUALENV_ROOT": [ - "cache/vpython" - ] - }, - "execution_timeout_ns": 3600000000000, - "extra_tags": { - "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" - }, - "idempotent": true, - "io_timeout_ns": 3600000000000, - "max_attempts": 2, - "outputs": [ - "build" - ], - "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" - }, - "Build-Win-MSVC-arm64-Debug-ANGLE": { - "caches": [ - { - "name": "vpython", - "path": "cache/vpython" - } - ], - "casSpec": "compile", - "cipd_packages": [ - { - "name": "infra/3pp/tools/cpython3/windows-amd64", - "path": "cipd_bin_packages/cpython3", - "version": "version:2@3.8.10.chromium.19" - }, - { - "name": "infra/tools/luci-auth/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/kitchen/${platform}", - "path": ".", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/vpython-native/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, { - "name": "infra/tools/luci/vpython/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + "name": "skia/bots/clang_win", + "path": "clang_win", + "version": "version:17" } ], "command": [ @@ -22562,7 +22385,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-MSVC-arm64-Debug-ANGLE\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-Clang-x86_64-Release-Graphite_Vulkan\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -22606,7 +22429,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Win-MSVC-arm64-Release": { + "Build-Win-Clang-x86_64-Release-Shared": { "caches": [ { "name": "vpython", @@ -22639,6 +22462,11 @@ "name": "infra/tools/luci/vpython/${platform}", "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "skia/bots/clang_win", + "path": "clang_win", + "version": "version:17" } ], "command": [ @@ -22647,7 +22475,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-MSVC-arm64-Release\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-Clang-x86_64-Release-Shared\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -22691,7 +22519,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Win-MSVC-arm64-Release-ANGLE": { + "Build-Win-Clang-x86_64-Release-Vulkan": { "caches": [ { "name": "vpython", @@ -22724,6 +22552,11 @@ "name": "infra/tools/luci/vpython/${platform}", "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "skia/bots/clang_win", + "path": "clang_win", + "version": "version:17" } ], "command": [ @@ -22732,7 +22565,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-MSVC-arm64-Release-ANGLE\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-Clang-x86_64-Release-Vulkan\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -22776,7 +22609,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Win-MSVC-x86-Debug": { + "Build-Win-MSVC-arm64-Debug": { "caches": [ { "name": "vpython", @@ -22817,7 +22650,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-MSVC-x86-Debug\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-MSVC-arm64-Debug\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -22861,7 +22694,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Win-MSVC-x86-Release": { + "Build-Win-MSVC-arm64-Debug-ANGLE": { "caches": [ { "name": "vpython", @@ -22902,7 +22735,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-MSVC-x86-Release\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-MSVC-arm64-Debug-ANGLE\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -22946,7 +22779,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Win-MSVC-x86_64-Debug": { + "Build-Win-MSVC-arm64-Release": { "caches": [ { "name": "vpython", @@ -22987,7 +22820,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-MSVC-x86_64-Debug\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-MSVC-arm64-Release\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -23031,7 +22864,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Win-MSVC-x86_64-Debug-Direct3D": { + "Build-Win-MSVC-arm64-Release-ANGLE": { "caches": [ { "name": "vpython", @@ -23072,7 +22905,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-MSVC-x86_64-Debug-Direct3D\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-MSVC-arm64-Release-ANGLE\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -23116,16 +22949,8 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Win-MSVC-x86_64-Debug-Graphite_Dawn": { + "Build-Win-MSVC-x86-Debug": { "caches": [ - { - "name": "git", - "path": "cache/git" - }, - { - "name": "git_cache", - "path": "cache/git_cache" - }, { "name": "vpython", "path": "cache/vpython" @@ -23138,26 +22963,11 @@ "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, - { - "name": "infra/3pp/tools/git/windows-amd64", - "path": "cipd_bin_packages", - "version": "version:2@2.38.1.chromium.9" - }, - { - "name": "infra/tools/git/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, { "name": "infra/tools/luci-auth/${platform}", "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, - { - "name": "infra/tools/luci/git-credential-luci/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, { "name": "infra/tools/luci/kitchen/${platform}", "path": ".", @@ -23180,7 +22990,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-MSVC-x86_64-Debug-Graphite_Dawn\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-MSVC-x86-Debug\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -23224,7 +23034,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Win-MSVC-x86_64-Debug-Graphite_Vulkan": { + "Build-Win-MSVC-x86-Release": { "caches": [ { "name": "vpython", @@ -23265,7 +23075,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-MSVC-x86_64-Debug-Graphite_Vulkan\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-MSVC-x86-Release\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -23309,7 +23119,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Win-MSVC-x86_64-Debug-Vulkan": { + "Build-Win-MSVC-x86_64-Debug": { "caches": [ { "name": "vpython", @@ -23350,7 +23160,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-MSVC-x86_64-Debug-Vulkan\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-MSVC-x86_64-Debug\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -23394,7 +23204,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Win-MSVC-x86_64-Debug-Wuffs": { + "Build-Win-MSVC-x86_64-Debug-Direct3D": { "caches": [ { "name": "vpython", @@ -23435,7 +23245,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-MSVC-x86_64-Debug-Wuffs\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-MSVC-x86_64-Debug-Direct3D\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -23479,7 +23289,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Win-MSVC-x86_64-OptimizeForSize-Graphite_Dawn": { + "Build-Win-MSVC-x86_64-Debug-Graphite_Dawn": { "caches": [ { "name": "git", @@ -23543,7 +23353,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-MSVC-x86_64-OptimizeForSize-Graphite_Dawn\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-MSVC-x86_64-Debug-Graphite_Dawn\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -23587,7 +23397,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Win-MSVC-x86_64-OptimizeForSize-Graphite_Vulkan": { + "Build-Win-MSVC-x86_64-Debug-Graphite_Vulkan": { "caches": [ { "name": "vpython", @@ -23628,7 +23438,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-MSVC-x86_64-OptimizeForSize-Graphite_Vulkan\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-MSVC-x86_64-Debug-Graphite_Vulkan\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -23672,7 +23482,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Win-MSVC-x86_64-Release": { + "Build-Win-MSVC-x86_64-Debug-Vulkan": { "caches": [ { "name": "vpython", @@ -23713,7 +23523,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-MSVC-x86_64-Release\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-MSVC-x86_64-Debug-Vulkan\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -23757,7 +23567,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Win-MSVC-x86_64-Release-Direct3D": { + "Build-Win-MSVC-x86_64-Debug-Wuffs": { "caches": [ { "name": "vpython", @@ -23798,7 +23608,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-MSVC-x86_64-Release-Direct3D\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-MSVC-x86_64-Debug-Wuffs\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -23842,7 +23652,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Win-MSVC-x86_64-Release-Graphite_Dawn": { + "Build-Win-MSVC-x86_64-OptimizeForSize-Graphite_Dawn": { "caches": [ { "name": "git", @@ -23906,7 +23716,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-MSVC-x86_64-Release-Graphite_Dawn\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-MSVC-x86_64-OptimizeForSize-Graphite_Dawn\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -23950,7 +23760,7 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Win-MSVC-x86_64-Release-Graphite_Vulkan": { + "Build-Win-MSVC-x86_64-OptimizeForSize-Graphite_Vulkan": { "caches": [ { "name": "vpython", @@ -23991,7 +23801,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "compile", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-MSVC-x86_64-Release-Graphite_Vulkan\",\"swarm_out_dir\":\"build\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-MSVC-x86_64-OptimizeForSize-Graphite_Vulkan\",\"swarm_out_dir\":\"build\"}", "skia" ], "dependencies": [ @@ -24035,7 +23845,370 @@ ], "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" }, - "Build-Win-MSVC-x86_64-Release-Shared": { + "Build-Win-MSVC-x86_64-Release": { + "caches": [ + { + "name": "vpython", + "path": "cache/vpython" + } + ], + "casSpec": "compile", + "cipd_packages": [ + { + "name": "infra/3pp/tools/cpython3/windows-amd64", + "path": "cipd_bin_packages/cpython3", + "version": "version:2@3.8.10.chromium.19" + }, + { + "name": "infra/tools/luci-auth/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/kitchen/${platform}", + "path": ".", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/vpython-native/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/vpython/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + } + ], + "command": [ + "cipd_bin_packages/vpython3${EXECUTABLE_SUFFIX}", + "-u", + "skia/infra/bots/run_recipe.py", + "${ISOLATED_OUTDIR}", + "compile", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-MSVC-x86_64-Release\",\"swarm_out_dir\":\"build\"}", + "skia" + ], + "dependencies": [ + "Housekeeper-PerCommit-BundleRecipes", + "Housekeeper-PerCommit-IsolateWinToolchain" + ], + "dimensions": [ + "cpu:x86-64-Haswell_GCE", + "gpu:none", + "machine_type:n1-highcpu-64", + "os:Windows-Server-17763", + "pool:Skia" + ], + "environment": { + "RECIPES_USE_PY3": "true", + "VPYTHON_LOG_TRACE": "1" + }, + "env_prefixes": { + "PATH": [ + "cipd_bin_packages/cpython3", + "cipd_bin_packages/cpython3/bin", + "cipd_bin_packages", + "cipd_bin_packages/bin" + ], + "VPYTHON_DEFAULT_SPEC": [ + "skia/.vpython" + ], + "VPYTHON_VIRTUALENV_ROOT": [ + "cache/vpython" + ] + }, + "execution_timeout_ns": 3600000000000, + "extra_tags": { + "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" + }, + "idempotent": true, + "io_timeout_ns": 3600000000000, + "max_attempts": 2, + "outputs": [ + "build" + ], + "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" + }, + "Build-Win-MSVC-x86_64-Release-Direct3D": { + "caches": [ + { + "name": "vpython", + "path": "cache/vpython" + } + ], + "casSpec": "compile", + "cipd_packages": [ + { + "name": "infra/3pp/tools/cpython3/windows-amd64", + "path": "cipd_bin_packages/cpython3", + "version": "version:2@3.8.10.chromium.19" + }, + { + "name": "infra/tools/luci-auth/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/kitchen/${platform}", + "path": ".", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/vpython-native/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/vpython/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + } + ], + "command": [ + "cipd_bin_packages/vpython3${EXECUTABLE_SUFFIX}", + "-u", + "skia/infra/bots/run_recipe.py", + "${ISOLATED_OUTDIR}", + "compile", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-MSVC-x86_64-Release-Direct3D\",\"swarm_out_dir\":\"build\"}", + "skia" + ], + "dependencies": [ + "Housekeeper-PerCommit-BundleRecipes", + "Housekeeper-PerCommit-IsolateWinToolchain" + ], + "dimensions": [ + "cpu:x86-64-Haswell_GCE", + "gpu:none", + "machine_type:n1-highcpu-64", + "os:Windows-Server-17763", + "pool:Skia" + ], + "environment": { + "RECIPES_USE_PY3": "true", + "VPYTHON_LOG_TRACE": "1" + }, + "env_prefixes": { + "PATH": [ + "cipd_bin_packages/cpython3", + "cipd_bin_packages/cpython3/bin", + "cipd_bin_packages", + "cipd_bin_packages/bin" + ], + "VPYTHON_DEFAULT_SPEC": [ + "skia/.vpython" + ], + "VPYTHON_VIRTUALENV_ROOT": [ + "cache/vpython" + ] + }, + "execution_timeout_ns": 3600000000000, + "extra_tags": { + "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" + }, + "idempotent": true, + "io_timeout_ns": 3600000000000, + "max_attempts": 2, + "outputs": [ + "build" + ], + "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" + }, + "Build-Win-MSVC-x86_64-Release-Graphite_Dawn": { + "caches": [ + { + "name": "git", + "path": "cache/git" + }, + { + "name": "git_cache", + "path": "cache/git_cache" + }, + { + "name": "vpython", + "path": "cache/vpython" + } + ], + "casSpec": "compile", + "cipd_packages": [ + { + "name": "infra/3pp/tools/cpython3/windows-amd64", + "path": "cipd_bin_packages/cpython3", + "version": "version:2@3.8.10.chromium.19" + }, + { + "name": "infra/3pp/tools/git/windows-amd64", + "path": "cipd_bin_packages", + "version": "version:2@2.38.1.chromium.9" + }, + { + "name": "infra/tools/git/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci-auth/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/git-credential-luci/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/kitchen/${platform}", + "path": ".", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/vpython-native/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/vpython/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + } + ], + "command": [ + "cipd_bin_packages/vpython3${EXECUTABLE_SUFFIX}", + "-u", + "skia/infra/bots/run_recipe.py", + "${ISOLATED_OUTDIR}", + "compile", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-MSVC-x86_64-Release-Graphite_Dawn\",\"swarm_out_dir\":\"build\"}", + "skia" + ], + "dependencies": [ + "Housekeeper-PerCommit-BundleRecipes", + "Housekeeper-PerCommit-IsolateWinToolchain" + ], + "dimensions": [ + "cpu:x86-64-Haswell_GCE", + "gpu:none", + "machine_type:n1-highcpu-64", + "os:Windows-Server-17763", + "pool:Skia" + ], + "environment": { + "RECIPES_USE_PY3": "true", + "VPYTHON_LOG_TRACE": "1" + }, + "env_prefixes": { + "PATH": [ + "cipd_bin_packages/cpython3", + "cipd_bin_packages/cpython3/bin", + "cipd_bin_packages", + "cipd_bin_packages/bin" + ], + "VPYTHON_DEFAULT_SPEC": [ + "skia/.vpython" + ], + "VPYTHON_VIRTUALENV_ROOT": [ + "cache/vpython" + ] + }, + "execution_timeout_ns": 3600000000000, + "extra_tags": { + "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" + }, + "idempotent": true, + "io_timeout_ns": 3600000000000, + "max_attempts": 2, + "outputs": [ + "build" + ], + "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" + }, + "Build-Win-MSVC-x86_64-Release-Graphite_Vulkan": { + "caches": [ + { + "name": "vpython", + "path": "cache/vpython" + } + ], + "casSpec": "compile", + "cipd_packages": [ + { + "name": "infra/3pp/tools/cpython3/windows-amd64", + "path": "cipd_bin_packages/cpython3", + "version": "version:2@3.8.10.chromium.19" + }, + { + "name": "infra/tools/luci-auth/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/kitchen/${platform}", + "path": ".", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/vpython-native/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/vpython/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + } + ], + "command": [ + "cipd_bin_packages/vpython3${EXECUTABLE_SUFFIX}", + "-u", + "skia/infra/bots/run_recipe.py", + "${ISOLATED_OUTDIR}", + "compile", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildername\":\"Build-Win-MSVC-x86_64-Release-Graphite_Vulkan\",\"swarm_out_dir\":\"build\"}", + "skia" + ], + "dependencies": [ + "Housekeeper-PerCommit-BundleRecipes", + "Housekeeper-PerCommit-IsolateWinToolchain" + ], + "dimensions": [ + "cpu:x86-64-Haswell_GCE", + "gpu:none", + "machine_type:n1-highcpu-64", + "os:Windows-Server-17763", + "pool:Skia" + ], + "environment": { + "RECIPES_USE_PY3": "true", + "VPYTHON_LOG_TRACE": "1" + }, + "env_prefixes": { + "PATH": [ + "cipd_bin_packages/cpython3", + "cipd_bin_packages/cpython3/bin", + "cipd_bin_packages", + "cipd_bin_packages/bin" + ], + "VPYTHON_DEFAULT_SPEC": [ + "skia/.vpython" + ], + "VPYTHON_VIRTUALENV_ROOT": [ + "cache/vpython" + ] + }, + "execution_timeout_ns": 3600000000000, + "extra_tags": { + "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" + }, + "idempotent": true, + "io_timeout_ns": 3600000000000, + "max_attempts": 2, + "outputs": [ + "build" + ], + "service_account": "skia-external-compile-tasks@skia-swarming-bots.iam.gserviceaccount.com" + }, + "Build-Win-MSVC-x86_64-Release-Shared": { "caches": [ { "name": "vpython", @@ -25425,7 +25598,7 @@ "max_attempts": 1, "service_account": "skia-external-codesize@skia-swarming-bots.iam.gserviceaccount.com" }, - "CodeSize-fm-Debian10-Clang-x86_64-OptimizeForSize": { + "CodeSize-skottie_tool-Debian10-Clang-x86_64-OptimizeForSize": { "caches": [ { "name": "work", @@ -25458,13 +25631,13 @@ "--task_id", "<(TASK_ID)", "--task_name", - "CodeSize-fm-Debian10-Clang-x86_64-OptimizeForSize", + "CodeSize-skottie_tool-Debian10-Clang-x86_64-OptimizeForSize", "--compile_task_name", "Build-Debian10-Clang-x86_64-OptimizeForSize", "--compile_task_name_no_patch", "Build-Debian10-Clang-x86_64-OptimizeForSize-NoPatch", "--binary_name", - "fm", + "skottie_tool", "--bloaty_cipd_version", "version:1", "--bloaty_binary", @@ -25499,7 +25672,7 @@ "max_attempts": 1, "service_account": "skia-external-codesize@skia-swarming-bots.iam.gserviceaccount.com" }, - "CodeSize-skottie_tool-Debian10-Clang-x86_64-OptimizeForSize": { + "CodeSize-skottie_tool_cpu-Debian10-Clang-x86_64-OptimizeForSize": { "caches": [ { "name": "work", @@ -25532,13 +25705,13 @@ "--task_id", "<(TASK_ID)", "--task_name", - "CodeSize-skottie_tool-Debian10-Clang-x86_64-OptimizeForSize", + "CodeSize-skottie_tool_cpu-Debian10-Clang-x86_64-OptimizeForSize", "--compile_task_name", "Build-Debian10-Clang-x86_64-OptimizeForSize", "--compile_task_name_no_patch", "Build-Debian10-Clang-x86_64-OptimizeForSize-NoPatch", "--binary_name", - "skottie_tool", + "skottie_tool_cpu", "--bloaty_cipd_version", "version:1", "--bloaty_binary", @@ -25573,7 +25746,81 @@ "max_attempts": 1, "service_account": "skia-external-codesize@skia-swarming-bots.iam.gserviceaccount.com" }, - "CodeSize-skottie_tool_cpu-Debian10-Clang-x86_64-OptimizeForSize": { + "CodeSize-skottie_tool_gpu-Debian10-Clang-arm-OptimizeForSize-Android": { + "caches": [ + { + "name": "work", + "path": "cache/work" + } + ], + "casSpec": "empty", + "cipd_packages": [ + { + "name": "infra/tools/luci-auth/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "skia/bots/android_ndk_linux", + "path": "android_ndk_linux", + "version": "version:16" + }, + { + "name": "skia/bots/bloaty", + "path": "bloaty", + "version": "version:1" + } + ], + "command": [ + "./codesize", + "--local=false", + "--project_id", + "skia-swarming-bots", + "--task_id", + "<(TASK_ID)", + "--task_name", + "CodeSize-skottie_tool_gpu-Debian10-Clang-arm-OptimizeForSize-Android", + "--compile_task_name", + "Build-Debian10-Clang-arm-OptimizeForSize-Android", + "--compile_task_name_no_patch", + "Build-Debian10-Clang-arm-OptimizeForSize-Android_NoPatch", + "--binary_name", + "skottie_tool_gpu", + "--bloaty_cipd_version", + "version:1", + "--bloaty_binary", + "bloaty/bloaty", + "--repo", + "<(REPO)", + "--revision", + "<(REVISION)", + "--patch_issue", + "<(ISSUE)", + "--patch_set", + "<(PATCHSET)", + "--patch_server", + "<(CODEREVIEW_SERVER)", + "--strip_binary", + "android_ndk_linux/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip" + ], + "dependencies": [ + "Build-Debian10-Clang-arm-OptimizeForSize-Android", + "Build-Debian10-Clang-arm-OptimizeForSize-Android_NoPatch", + "Housekeeper-PerCommit-BuildTaskDrivers_linux_amd64" + ], + "dimensions": [ + "cpu:x86-64-Haswell_GCE", + "gpu:none", + "machine_type:n1-highmem-2", + "os:Debian-10.3", + "pool:Skia" + ], + "execution_timeout_ns": 1200000000000, + "io_timeout_ns": 1200000000000, + "max_attempts": 1, + "service_account": "skia-external-codesize@skia-swarming-bots.iam.gserviceaccount.com" + }, + "CodeSize-skottie_tool_gpu-Debian10-Clang-x86_64-OptimizeForSize": { "caches": [ { "name": "work", @@ -25606,13 +25853,13 @@ "--task_id", "<(TASK_ID)", "--task_name", - "CodeSize-skottie_tool_cpu-Debian10-Clang-x86_64-OptimizeForSize", + "CodeSize-skottie_tool_gpu-Debian10-Clang-x86_64-OptimizeForSize", "--compile_task_name", "Build-Debian10-Clang-x86_64-OptimizeForSize", "--compile_task_name_no_patch", "Build-Debian10-Clang-x86_64-OptimizeForSize-NoPatch", "--binary_name", - "skottie_tool_cpu", + "skottie_tool_gpu", "--bloaty_cipd_version", "version:1", "--bloaty_binary", @@ -25647,700 +25894,6 @@ "max_attempts": 1, "service_account": "skia-external-codesize@skia-swarming-bots.iam.gserviceaccount.com" }, - "CodeSize-skottie_tool_gpu-Debian10-Clang-arm-OptimizeForSize-Android": { - "caches": [ - { - "name": "work", - "path": "cache/work" - } - ], - "casSpec": "empty", - "cipd_packages": [ - { - "name": "infra/tools/luci-auth/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "skia/bots/android_ndk_linux", - "path": "android_ndk_linux", - "version": "version:16" - }, - { - "name": "skia/bots/bloaty", - "path": "bloaty", - "version": "version:1" - } - ], - "command": [ - "./codesize", - "--local=false", - "--project_id", - "skia-swarming-bots", - "--task_id", - "<(TASK_ID)", - "--task_name", - "CodeSize-skottie_tool_gpu-Debian10-Clang-arm-OptimizeForSize-Android", - "--compile_task_name", - "Build-Debian10-Clang-arm-OptimizeForSize-Android", - "--compile_task_name_no_patch", - "Build-Debian10-Clang-arm-OptimizeForSize-Android_NoPatch", - "--binary_name", - "skottie_tool_gpu", - "--bloaty_cipd_version", - "version:1", - "--bloaty_binary", - "bloaty/bloaty", - "--repo", - "<(REPO)", - "--revision", - "<(REVISION)", - "--patch_issue", - "<(ISSUE)", - "--patch_set", - "<(PATCHSET)", - "--patch_server", - "<(CODEREVIEW_SERVER)", - "--strip_binary", - "android_ndk_linux/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip" - ], - "dependencies": [ - "Build-Debian10-Clang-arm-OptimizeForSize-Android", - "Build-Debian10-Clang-arm-OptimizeForSize-Android_NoPatch", - "Housekeeper-PerCommit-BuildTaskDrivers_linux_amd64" - ], - "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "gpu:none", - "machine_type:n1-highmem-2", - "os:Debian-10.3", - "pool:Skia" - ], - "execution_timeout_ns": 1200000000000, - "io_timeout_ns": 1200000000000, - "max_attempts": 1, - "service_account": "skia-external-codesize@skia-swarming-bots.iam.gserviceaccount.com" - }, - "CodeSize-skottie_tool_gpu-Debian10-Clang-x86_64-OptimizeForSize": { - "caches": [ - { - "name": "work", - "path": "cache/work" - } - ], - "casSpec": "empty", - "cipd_packages": [ - { - "name": "infra/tools/luci-auth/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "skia/bots/binutils_linux_x64", - "path": "binutils_linux_x64", - "version": "version:1" - }, - { - "name": "skia/bots/bloaty", - "path": "bloaty", - "version": "version:1" - } - ], - "command": [ - "./codesize", - "--local=false", - "--project_id", - "skia-swarming-bots", - "--task_id", - "<(TASK_ID)", - "--task_name", - "CodeSize-skottie_tool_gpu-Debian10-Clang-x86_64-OptimizeForSize", - "--compile_task_name", - "Build-Debian10-Clang-x86_64-OptimizeForSize", - "--compile_task_name_no_patch", - "Build-Debian10-Clang-x86_64-OptimizeForSize-NoPatch", - "--binary_name", - "skottie_tool_gpu", - "--bloaty_cipd_version", - "version:1", - "--bloaty_binary", - "bloaty/bloaty", - "--repo", - "<(REPO)", - "--revision", - "<(REVISION)", - "--patch_issue", - "<(ISSUE)", - "--patch_set", - "<(PATCHSET)", - "--patch_server", - "<(CODEREVIEW_SERVER)", - "--strip_binary", - "binutils_linux_x64/strip" - ], - "dependencies": [ - "Build-Debian10-Clang-x86_64-OptimizeForSize", - "Build-Debian10-Clang-x86_64-OptimizeForSize-NoPatch", - "Housekeeper-PerCommit-BuildTaskDrivers_linux_amd64" - ], - "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "gpu:none", - "machine_type:n1-highmem-2", - "os:Debian-10.3", - "pool:Skia" - ], - "execution_timeout_ns": 1200000000000, - "io_timeout_ns": 1200000000000, - "max_attempts": 1, - "service_account": "skia-external-codesize@skia-swarming-bots.iam.gserviceaccount.com" - }, - "FM-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All": { - "casSpec": "test", - "cipd_packages": [ - { - "name": "skia/bots/skimage", - "path": "skimage", - "version": "version:47" - }, - { - "name": "skia/bots/skp", - "path": "skp", - "version": "version:432" - }, - { - "name": "skia/bots/svg", - "path": "svg", - "version": "version:14" - } - ], - "command": [ - "./fm_driver${EXECUTABLE_SUFFIX}", - "--local=false", - "--resources=skia/resources", - "--imgs=skimage", - "--skps=skp", - "--svgs=svg", - "--project_id", - "skia-swarming-bots", - "--task_id", - "<(TASK_ID)", - "--bot", - "FM-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All", - "--gold=true", - "--gold_hashes_url", - "https://gold.skia.org/json/v1/hashes", - "build/fm${EXECUTABLE_SUFFIX}" - ], - "dependencies": [ - "Build-Debian10-Clang-x86_64-Debug", - "Housekeeper-PerCommit-BuildTaskDrivers_linux_amd64" - ], - "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "gpu:none", - "machine_type:n1-highcpu-64", - "os:Debian-10.3", - "pool:Skia" - ], - "max_attempts": 1, - "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" - }, - "FM-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-ASAN": { - "casSpec": "test", - "cipd_packages": [ - { - "name": "skia/bots/clang_linux", - "path": "clang_linux", - "version": "version:30" - }, - { - "name": "skia/bots/skimage", - "path": "skimage", - "version": "version:47" - }, - { - "name": "skia/bots/skp", - "path": "skp", - "version": "version:432" - }, - { - "name": "skia/bots/svg", - "path": "svg", - "version": "version:14" - } - ], - "command": [ - "./fm_driver${EXECUTABLE_SUFFIX}", - "--local=false", - "--resources=skia/resources", - "--imgs=skimage", - "--skps=skp", - "--svgs=svg", - "--project_id", - "skia-swarming-bots", - "--task_id", - "<(TASK_ID)", - "--bot", - "FM-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-ASAN", - "--gold=false", - "--gold_hashes_url", - "https://gold.skia.org/json/v1/hashes", - "build/fm${EXECUTABLE_SUFFIX}" - ], - "dependencies": [ - "Build-Debian10-Clang-x86_64-Debug-ASAN", - "Housekeeper-PerCommit-BuildTaskDrivers_linux_amd64" - ], - "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "gpu:none", - "machine_type:n1-highcpu-64", - "os:Debian-10.3", - "pool:Skia" - ], - "env_prefixes": { - "LD_LIBRARY_PATH": [ - "clang_linux/lib/x86_64-unknown-linux-gnu" - ], - "PATH": [ - "clang_linux/bin" - ] - }, - "max_attempts": 1, - "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" - }, - "FM-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-MSAN": { - "casSpec": "test", - "cipd_packages": [ - { - "name": "skia/bots/clang_linux", - "path": "clang_linux", - "version": "version:30" - }, - { - "name": "skia/bots/skimage", - "path": "skimage", - "version": "version:47" - }, - { - "name": "skia/bots/skp", - "path": "skp", - "version": "version:432" - }, - { - "name": "skia/bots/svg", - "path": "svg", - "version": "version:14" - } - ], - "command": [ - "./fm_driver${EXECUTABLE_SUFFIX}", - "--local=false", - "--resources=skia/resources", - "--imgs=skimage", - "--skps=skp", - "--svgs=svg", - "--project_id", - "skia-swarming-bots", - "--task_id", - "<(TASK_ID)", - "--bot", - "FM-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-MSAN", - "--gold=false", - "--gold_hashes_url", - "https://gold.skia.org/json/v1/hashes", - "build/fm${EXECUTABLE_SUFFIX}" - ], - "dependencies": [ - "Build-Debian10-Clang-x86_64-Release-MSAN", - "Housekeeper-PerCommit-BuildTaskDrivers_linux_amd64" - ], - "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "gpu:none", - "machine_type:n1-highcpu-64", - "os:Debian-10.3", - "pool:Skia" - ], - "env_prefixes": { - "LD_LIBRARY_PATH": [ - "clang_linux/msan" - ], - "PATH": [ - "clang_linux/bin" - ] - }, - "max_attempts": 1, - "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" - }, - "FM-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-TSAN": { - "casSpec": "test", - "cipd_packages": [ - { - "name": "skia/bots/clang_linux", - "path": "clang_linux", - "version": "version:30" - }, - { - "name": "skia/bots/skimage", - "path": "skimage", - "version": "version:47" - }, - { - "name": "skia/bots/skp", - "path": "skp", - "version": "version:432" - }, - { - "name": "skia/bots/svg", - "path": "svg", - "version": "version:14" - } - ], - "command": [ - "./fm_driver${EXECUTABLE_SUFFIX}", - "--local=false", - "--resources=skia/resources", - "--imgs=skimage", - "--skps=skp", - "--svgs=svg", - "--project_id", - "skia-swarming-bots", - "--task_id", - "<(TASK_ID)", - "--bot", - "FM-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-TSAN", - "--gold=false", - "--gold_hashes_url", - "https://gold.skia.org/json/v1/hashes", - "build/fm${EXECUTABLE_SUFFIX}" - ], - "dependencies": [ - "Build-Debian10-Clang-x86_64-Release-TSAN", - "Housekeeper-PerCommit-BuildTaskDrivers_linux_amd64" - ], - "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "gpu:none", - "machine_type:n1-highcpu-64", - "os:Debian-10.3", - "pool:Skia" - ], - "env_prefixes": { - "LD_LIBRARY_PATH": [ - "clang_linux/tsan" - ], - "PATH": [ - "clang_linux/bin" - ] - }, - "max_attempts": 1, - "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" - }, - "FM-Mac-Clang-VMware7.1-CPU-AVX-x86_64-Debug-All": { - "casSpec": "test", - "cipd_packages": [ - { - "name": "skia/bots/skimage", - "path": "skimage", - "version": "version:47" - }, - { - "name": "skia/bots/skp", - "path": "skp", - "version": "version:432" - }, - { - "name": "skia/bots/svg", - "path": "svg", - "version": "version:14" - } - ], - "command": [ - "./fm_driver${EXECUTABLE_SUFFIX}", - "--local=false", - "--resources=skia/resources", - "--imgs=skimage", - "--skps=skp", - "--svgs=svg", - "--project_id", - "skia-swarming-bots", - "--task_id", - "<(TASK_ID)", - "--bot", - "FM-Mac-Clang-VMware7.1-CPU-AVX-x86_64-Debug-All", - "--gold=true", - "--gold_hashes_url", - "https://gold.skia.org/json/v1/hashes", - "build/fm${EXECUTABLE_SUFFIX}" - ], - "dependencies": [ - "Build-Mac-Clang-x86_64-Debug", - "Housekeeper-PerCommit-BuildTaskDrivers_darwin_amd64" - ], - "dimensions": [ - "cores:12", - "cpu:x86-64", - "os:Mac-10.15.7", - "pool:Skia" - ], - "max_attempts": 1, - "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" - }, - "FM-Mac-Clang-VMware7.1-CPU-AVX-x86_64-Debug-All-ASAN": { - "casSpec": "test", - "cipd_packages": [ - { - "name": "skia/bots/skimage", - "path": "skimage", - "version": "version:47" - }, - { - "name": "skia/bots/skp", - "path": "skp", - "version": "version:432" - }, - { - "name": "skia/bots/svg", - "path": "svg", - "version": "version:14" - } - ], - "command": [ - "./fm_driver${EXECUTABLE_SUFFIX}", - "--local=false", - "--resources=skia/resources", - "--imgs=skimage", - "--skps=skp", - "--svgs=svg", - "--project_id", - "skia-swarming-bots", - "--task_id", - "<(TASK_ID)", - "--bot", - "FM-Mac-Clang-VMware7.1-CPU-AVX-x86_64-Debug-All-ASAN", - "--gold=false", - "--gold_hashes_url", - "https://gold.skia.org/json/v1/hashes", - "build/fm${EXECUTABLE_SUFFIX}" - ], - "dependencies": [ - "Build-Mac-Clang-x86_64-Debug-ASAN", - "Housekeeper-PerCommit-BuildTaskDrivers_darwin_amd64" - ], - "dimensions": [ - "cores:12", - "cpu:x86-64", - "os:Mac-10.15.7", - "pool:Skia" - ], - "max_attempts": 1, - "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" - }, - "FM-Mac-Clang-VMware7.1-CPU-AVX-x86_64-Release-All-TSAN": { - "casSpec": "test", - "cipd_packages": [ - { - "name": "skia/bots/skimage", - "path": "skimage", - "version": "version:47" - }, - { - "name": "skia/bots/skp", - "path": "skp", - "version": "version:432" - }, - { - "name": "skia/bots/svg", - "path": "svg", - "version": "version:14" - } - ], - "command": [ - "./fm_driver${EXECUTABLE_SUFFIX}", - "--local=false", - "--resources=skia/resources", - "--imgs=skimage", - "--skps=skp", - "--svgs=svg", - "--project_id", - "skia-swarming-bots", - "--task_id", - "<(TASK_ID)", - "--bot", - "FM-Mac-Clang-VMware7.1-CPU-AVX-x86_64-Release-All-TSAN", - "--gold=false", - "--gold_hashes_url", - "https://gold.skia.org/json/v1/hashes", - "build/fm${EXECUTABLE_SUFFIX}" - ], - "dependencies": [ - "Build-Mac-Clang-x86_64-Release-TSAN", - "Housekeeper-PerCommit-BuildTaskDrivers_darwin_amd64" - ], - "dimensions": [ - "cores:12", - "cpu:x86-64", - "os:Mac-10.15.7", - "pool:Skia" - ], - "max_attempts": 1, - "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" - }, - "FM-Win-Clang-GCE-CPU-AVX2-x86_64-Debug-All": { - "casSpec": "test", - "cipd_packages": [ - { - "name": "skia/bots/skimage", - "path": "skimage", - "version": "version:47" - }, - { - "name": "skia/bots/skp", - "path": "skp", - "version": "version:432" - }, - { - "name": "skia/bots/svg", - "path": "svg", - "version": "version:14" - } - ], - "command": [ - "./fm_driver${EXECUTABLE_SUFFIX}", - "--local=false", - "--resources=skia/resources", - "--imgs=skimage", - "--skps=skp", - "--svgs=svg", - "--project_id", - "skia-swarming-bots", - "--task_id", - "<(TASK_ID)", - "--bot", - "FM-Win-Clang-GCE-CPU-AVX2-x86_64-Debug-All", - "--gold=true", - "--gold_hashes_url", - "https://gold.skia.org/json/v1/hashes", - "build/fm${EXECUTABLE_SUFFIX}" - ], - "dependencies": [ - "Build-Win-Clang-x86_64-Debug", - "Housekeeper-PerCommit-BuildTaskDrivers_windows_amd64" - ], - "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "gpu:none", - "machine_type:n1-highcpu-64", - "os:Windows-Server-17763", - "pool:Skia" - ], - "max_attempts": 1, - "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" - }, - "FM-Win-Clang-GCE-CPU-AVX2-x86_64-Debug-All-ASAN": { - "casSpec": "test", - "cipd_packages": [ - { - "name": "skia/bots/skimage", - "path": "skimage", - "version": "version:47" - }, - { - "name": "skia/bots/skp", - "path": "skp", - "version": "version:432" - }, - { - "name": "skia/bots/svg", - "path": "svg", - "version": "version:14" - } - ], - "command": [ - "./fm_driver${EXECUTABLE_SUFFIX}", - "--local=false", - "--resources=skia/resources", - "--imgs=skimage", - "--skps=skp", - "--svgs=svg", - "--project_id", - "skia-swarming-bots", - "--task_id", - "<(TASK_ID)", - "--bot", - "FM-Win-Clang-GCE-CPU-AVX2-x86_64-Debug-All-ASAN", - "--gold=false", - "--gold_hashes_url", - "https://gold.skia.org/json/v1/hashes", - "build/fm${EXECUTABLE_SUFFIX}" - ], - "dependencies": [ - "Build-Win-Clang-x86_64-Debug-ASAN", - "Housekeeper-PerCommit-BuildTaskDrivers_windows_amd64" - ], - "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "gpu:none", - "machine_type:n1-highcpu-64", - "os:Windows-Server-17763", - "pool:Skia" - ], - "max_attempts": 1, - "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" - }, - "FM-Win-MSVC-GCE-CPU-AVX2-x86_64-Debug-All": { - "casSpec": "test", - "cipd_packages": [ - { - "name": "skia/bots/skimage", - "path": "skimage", - "version": "version:47" - }, - { - "name": "skia/bots/skp", - "path": "skp", - "version": "version:432" - }, - { - "name": "skia/bots/svg", - "path": "svg", - "version": "version:14" - } - ], - "command": [ - "./fm_driver${EXECUTABLE_SUFFIX}", - "--local=false", - "--resources=skia/resources", - "--imgs=skimage", - "--skps=skp", - "--svgs=svg", - "--project_id", - "skia-swarming-bots", - "--task_id", - "<(TASK_ID)", - "--bot", - "FM-Win-MSVC-GCE-CPU-AVX2-x86_64-Debug-All", - "--gold=true", - "--gold_hashes_url", - "https://gold.skia.org/json/v1/hashes", - "build/fm${EXECUTABLE_SUFFIX}" - ], - "dependencies": [ - "Build-Win-MSVC-x86_64-Debug", - "Housekeeper-PerCommit-BuildTaskDrivers_windows_amd64" - ], - "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "gpu:none", - "machine_type:n1-highcpu-64", - "os:Windows-Server-17763", - "pool:Skia" - ], - "max_attempts": 1, - "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" - }, "Housekeeper-Nightly-RecreateSKPs_DryRun": { "caches": [ { @@ -27300,7 +26853,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" } ], "command": [ @@ -28223,263 +27776,7 @@ "perf" ] }, - "Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Skpbench": { - "caches": [ - { - "name": "vpython", - "path": "cache/vpython" - } - ], - "casSpec": "skpbench", - "cipd_packages": [ - { - "name": "infra/3pp/tools/cpython3/linux-arm64", - "path": "cipd_bin_packages/cpython3", - "version": "version:2@3.8.10.chromium.19" - }, - { - "name": "infra/tools/luci-auth/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/kitchen/${platform}", - "path": ".", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/vpython-native/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/vpython/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - } - ], - "command": [ - "cipd_bin_packages/vpython3${EXECUTABLE_SUFFIX}", - "-u", - "skia/infra/bots/run_recipe.py", - "${ISOLATED_OUTDIR}", - "skpbench", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Skpbench\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", - "skia" - ], - "dependencies": [ - "Build-Debian10-Clang-arm64-Release-Android", - "Housekeeper-PerCommit-BundleRecipes", - "Housekeeper-PerCommit-IsolateMSKP", - "Housekeeper-PerCommit-IsolateSKP" - ], - "dimensions": [ - "device_os:QP1A.190711.020", - "device_type:exynos990", - "os:Android", - "pool:Skia" - ], - "environment": { - "RECIPES_USE_PY3": "true", - "VPYTHON_LOG_TRACE": "1" - }, - "env_prefixes": { - "PATH": [ - "cipd_bin_packages/cpython3", - "cipd_bin_packages/cpython3/bin", - "cipd_bin_packages", - "cipd_bin_packages/bin" - ], - "VPYTHON_DEFAULT_SPEC": [ - "skia/.vpython" - ], - "VPYTHON_VIRTUALENV_ROOT": [ - "cache/vpython" - ] - }, - "execution_timeout_ns": 14400000000000, - "expiration_ns": 72000000000000, - "extra_tags": { - "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" - }, - "io_timeout_ns": 14400000000000, - "max_attempts": 2, - "outputs": [ - "perf" - ] - }, - "Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Vulkan": { - "caches": [ - { - "name": "vpython", - "path": "cache/vpython" - } - ], - "casSpec": "perf", - "cipd_packages": [ - { - "name": "infra/3pp/tools/cpython3/linux-arm64", - "path": "cipd_bin_packages/cpython3", - "version": "version:2@3.8.10.chromium.19" - }, - { - "name": "infra/tools/luci-auth/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/kitchen/${platform}", - "path": ".", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/vpython-native/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/vpython/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - } - ], - "command": [ - "cipd_bin_packages/vpython3${EXECUTABLE_SUFFIX}", - "-u", - "skia/infra/bots/run_recipe.py", - "${ISOLATED_OUTDIR}", - "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Vulkan\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"vkdmsaa\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"MaliG77\\\",\\\"extra_config\\\",\\\"Android_Vulkan\\\",\\\"model\\\",\\\"GalaxyS20\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", - "skia" - ], - "dependencies": [ - "Build-Debian10-Clang-arm64-Release-Android_Vulkan", - "Housekeeper-PerCommit-BundleRecipes", - "Housekeeper-PerCommit-IsolateSKP", - "Housekeeper-PerCommit-IsolateSVG", - "Housekeeper-PerCommit-IsolateSkImage" - ], - "dimensions": [ - "device_os:QP1A.190711.020", - "device_type:exynos990", - "os:Android", - "pool:Skia" - ], - "environment": { - "RECIPES_USE_PY3": "true", - "VPYTHON_LOG_TRACE": "1" - }, - "env_prefixes": { - "PATH": [ - "cipd_bin_packages/cpython3", - "cipd_bin_packages/cpython3/bin", - "cipd_bin_packages", - "cipd_bin_packages/bin" - ], - "VPYTHON_DEFAULT_SPEC": [ - "skia/.vpython" - ], - "VPYTHON_VIRTUALENV_ROOT": [ - "cache/vpython" - ] - }, - "execution_timeout_ns": 14400000000000, - "expiration_ns": 72000000000000, - "extra_tags": { - "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" - }, - "io_timeout_ns": 14400000000000, - "max_attempts": 2, - "outputs": [ - "perf" - ] - }, - "Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Vulkan_AllPathsVolatile_Skpbench": { - "caches": [ - { - "name": "vpython", - "path": "cache/vpython" - } - ], - "casSpec": "skpbench", - "cipd_packages": [ - { - "name": "infra/3pp/tools/cpython3/linux-arm64", - "path": "cipd_bin_packages/cpython3", - "version": "version:2@3.8.10.chromium.19" - }, - { - "name": "infra/tools/luci-auth/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/kitchen/${platform}", - "path": ".", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/vpython-native/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/vpython/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - } - ], - "command": [ - "cipd_bin_packages/vpython3${EXECUTABLE_SUFFIX}", - "-u", - "skia/infra/bots/run_recipe.py", - "${ISOLATED_OUTDIR}", - "skpbench", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Vulkan_AllPathsVolatile_Skpbench\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", - "skia" - ], - "dependencies": [ - "Build-Debian10-Clang-arm64-Release-Android_Vulkan", - "Housekeeper-PerCommit-BundleRecipes", - "Housekeeper-PerCommit-IsolateMSKP", - "Housekeeper-PerCommit-IsolateSKP" - ], - "dimensions": [ - "device_os:QP1A.190711.020", - "device_type:exynos990", - "os:Android", - "pool:Skia" - ], - "environment": { - "RECIPES_USE_PY3": "true", - "VPYTHON_LOG_TRACE": "1" - }, - "env_prefixes": { - "PATH": [ - "cipd_bin_packages/cpython3", - "cipd_bin_packages/cpython3/bin", - "cipd_bin_packages", - "cipd_bin_packages/bin" - ], - "VPYTHON_DEFAULT_SPEC": [ - "skia/.vpython" - ], - "VPYTHON_VIRTUALENV_ROOT": [ - "cache/vpython" - ] - }, - "execution_timeout_ns": 14400000000000, - "expiration_ns": 72000000000000, - "extra_tags": { - "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" - }, - "io_timeout_ns": 14400000000000, - "max_attempts": 2, - "outputs": [ - "perf" - ] - }, - "Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Vulkan_Skpbench": { + "Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Skpbench": { "caches": [ { "name": "vpython", @@ -28520,11 +27817,11 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "skpbench", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Vulkan_Skpbench\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Skpbench\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ - "Build-Debian10-Clang-arm64-Release-Android_Vulkan", + "Build-Debian10-Clang-arm64-Release-Android", "Housekeeper-PerCommit-BundleRecipes", "Housekeeper-PerCommit-IsolateMSKP", "Housekeeper-PerCommit-IsolateSKP" @@ -28564,93 +27861,7 @@ "perf" ] }, - "Perf-Android-Clang-GalaxyS7_G930FD-GPU-MaliT880-arm64-Release-All-Android": { - "caches": [ - { - "name": "vpython", - "path": "cache/vpython" - } - ], - "casSpec": "perf", - "cipd_packages": [ - { - "name": "infra/3pp/tools/cpython3/linux-arm64", - "path": "cipd_bin_packages/cpython3", - "version": "version:2@3.8.10.chromium.19" - }, - { - "name": "infra/tools/luci-auth/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/kitchen/${platform}", - "path": ".", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/vpython-native/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/vpython/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - } - ], - "command": [ - "cipd_bin_packages/vpython3${EXECUTABLE_SUFFIX}", - "-u", - "skia/infra/bots/run_recipe.py", - "${ISOLATED_OUTDIR}", - "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-GalaxyS7_G930FD-GPU-MaliT880-arm64-Release-All-Android\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"srgb-gles\\\",\\\"narrow-gles\\\",\\\"glesfakev2\\\",\\\"glesmsaa4\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"MaliT880\\\",\\\"extra_config\\\",\\\"Android\\\",\\\"model\\\",\\\"GalaxyS7_G930FD\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", - "skia" - ], - "dependencies": [ - "Build-Debian10-Clang-arm64-Release-Android", - "Housekeeper-PerCommit-BundleRecipes", - "Housekeeper-PerCommit-IsolateSKP", - "Housekeeper-PerCommit-IsolateSVG", - "Housekeeper-PerCommit-IsolateSkImage" - ], - "dimensions": [ - "device_os:R16NW_G930FXXS2ERH6", - "device_type:herolte", - "os:Android", - "pool:Skia" - ], - "environment": { - "RECIPES_USE_PY3": "true", - "VPYTHON_LOG_TRACE": "1" - }, - "env_prefixes": { - "PATH": [ - "cipd_bin_packages/cpython3", - "cipd_bin_packages/cpython3/bin", - "cipd_bin_packages", - "cipd_bin_packages/bin" - ], - "VPYTHON_DEFAULT_SPEC": [ - "skia/.vpython" - ], - "VPYTHON_VIRTUALENV_ROOT": [ - "cache/vpython" - ] - }, - "execution_timeout_ns": 14400000000000, - "expiration_ns": 72000000000000, - "extra_tags": { - "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" - }, - "io_timeout_ns": 14400000000000, - "max_attempts": 2, - "outputs": [ - "perf" - ] - }, - "Perf-Android-Clang-GalaxyS7_G930FD-GPU-MaliT880-arm64-Release-All-Android_Vulkan": { + "Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Vulkan": { "caches": [ { "name": "vpython", @@ -28691,7 +27902,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-GalaxyS7_G930FD-GPU-MaliT880-arm64-Release-All-Android_Vulkan\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"MaliT880\\\",\\\"extra_config\\\",\\\"Android_Vulkan\\\",\\\"model\\\",\\\"GalaxyS7_G930FD\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Vulkan\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"vkdmsaa\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"MaliG77\\\",\\\"extra_config\\\",\\\"Android_Vulkan\\\",\\\"model\\\",\\\"GalaxyS20\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ @@ -28702,8 +27913,8 @@ "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "device_os:R16NW_G930FXXS2ERH6", - "device_type:herolte", + "device_os:QP1A.190711.020", + "device_type:exynos990", "os:Android", "pool:Skia" ], @@ -28736,14 +27947,14 @@ "perf" ] }, - "Perf-Android-Clang-GalaxyS9-GPU-MaliG72-arm64-Release-All-Android": { + "Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Vulkan_AllPathsVolatile_Skpbench": { "caches": [ { "name": "vpython", "path": "cache/vpython" } ], - "casSpec": "perf", + "casSpec": "skpbench", "cipd_packages": [ { "name": "infra/3pp/tools/cpython3/linux-arm64", @@ -28776,20 +27987,19 @@ "-u", "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", - "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-GalaxyS9-GPU-MaliG72-arm64-Release-All-Android\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"srgb-gles\\\",\\\"narrow-gles\\\",\\\"glesfakev2\\\",\\\"glesmsaa4\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"MaliG72\\\",\\\"extra_config\\\",\\\"Android\\\",\\\"model\\\",\\\"GalaxyS9\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "skpbench", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Vulkan_AllPathsVolatile_Skpbench\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ - "Build-Debian10-Clang-arm64-Release-Android", + "Build-Debian10-Clang-arm64-Release-Android_Vulkan", "Housekeeper-PerCommit-BundleRecipes", - "Housekeeper-PerCommit-IsolateSKP", - "Housekeeper-PerCommit-IsolateSVG", - "Housekeeper-PerCommit-IsolateSkImage" + "Housekeeper-PerCommit-IsolateMSKP", + "Housekeeper-PerCommit-IsolateSKP" ], "dimensions": [ "device_os:QP1A.190711.020", - "device_type:starlte", + "device_type:exynos990", "os:Android", "pool:Skia" ], @@ -28822,14 +28032,14 @@ "perf" ] }, - "Perf-Android-Clang-GalaxyS9-GPU-MaliG72-arm64-Release-All-Android_Vulkan": { + "Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Vulkan_Skpbench": { "caches": [ { "name": "vpython", "path": "cache/vpython" } ], - "casSpec": "perf", + "casSpec": "skpbench", "cipd_packages": [ { "name": "infra/3pp/tools/cpython3/linux-arm64", @@ -28862,20 +28072,19 @@ "-u", "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", - "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-GalaxyS9-GPU-MaliG72-arm64-Release-All-Android_Vulkan\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"MaliG72\\\",\\\"extra_config\\\",\\\"Android_Vulkan\\\",\\\"model\\\",\\\"GalaxyS9\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "skpbench", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Vulkan_Skpbench\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Build-Debian10-Clang-arm64-Release-Android_Vulkan", "Housekeeper-PerCommit-BundleRecipes", - "Housekeeper-PerCommit-IsolateSKP", - "Housekeeper-PerCommit-IsolateSVG", - "Housekeeper-PerCommit-IsolateSkImage" + "Housekeeper-PerCommit-IsolateMSKP", + "Housekeeper-PerCommit-IsolateSKP" ], "dimensions": [ "device_os:QP1A.190711.020", - "device_type:starlte", + "device_type:exynos990", "os:Android", "pool:Skia" ], @@ -28908,7 +28117,7 @@ "perf" ] }, - "Perf-Android-Clang-JioNext-CPU-SnapdragonQM215-arm-Release-All-Android": { + "Perf-Android-Clang-GalaxyS7_G930FD-GPU-MaliT880-arm64-Release-All-Android": { "caches": [ { "name": "vpython", @@ -28941,11 +28150,6 @@ "name": "infra/tools/luci/vpython/${platform}", "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "skia/bots/text_blob_traces", - "path": "text_blob_traces", - "version": "version:0" } ], "command": [ @@ -28954,19 +28158,19 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-JioNext-CPU-SnapdragonQM215-arm-Release-All-Android\",\"do_upload\":\"true\",\"images\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"nonrendering\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"SnapdragonQM215\\\",\\\"extra_config\\\",\\\"Android\\\",\\\"model\\\",\\\"JioNext\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\",\"textTraces\":\"true\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-GalaxyS7_G930FD-GPU-MaliT880-arm64-Release-All-Android\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"srgb-gles\\\",\\\"narrow-gles\\\",\\\"glesfakev2\\\",\\\"glesmsaa4\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"MaliT880\\\",\\\"extra_config\\\",\\\"Android\\\",\\\"model\\\",\\\"GalaxyS7_G930FD\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ - "Build-Debian10-Clang-arm-Release-Android", + "Build-Debian10-Clang-arm64-Release-Android", "Housekeeper-PerCommit-BundleRecipes", "Housekeeper-PerCommit-IsolateSKP", "Housekeeper-PerCommit-IsolateSVG", "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "device_os:RKQ1.210602.002", - "device_type:msm8937", + "device_os:R16NW_G930FXXS2ERH6", + "device_type:herolte", "os:Android", "pool:Skia" ], @@ -28999,7 +28203,7 @@ "perf" ] }, - "Perf-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-All-Android": { + "Perf-Android-Clang-GalaxyS7_G930FD-GPU-MaliT880-arm64-Release-All-Android_Vulkan": { "caches": [ { "name": "vpython", @@ -29040,19 +28244,19 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-All-Android\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"srgb-gles\\\",\\\"narrow-gles\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"Tegra3\\\",\\\"extra_config\\\",\\\"Android\\\",\\\"model\\\",\\\"Nexus7\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-GalaxyS7_G930FD-GPU-MaliT880-arm64-Release-All-Android_Vulkan\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"MaliT880\\\",\\\"extra_config\\\",\\\"Android_Vulkan\\\",\\\"model\\\",\\\"GalaxyS7_G930FD\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ - "Build-Debian10-Clang-arm-Release-Android", + "Build-Debian10-Clang-arm64-Release-Android_Vulkan", "Housekeeper-PerCommit-BundleRecipes", "Housekeeper-PerCommit-IsolateSKP", "Housekeeper-PerCommit-IsolateSVG", "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "device_os:LMY47V_1836172", - "device_type:grouper", + "device_os:R16NW_G930FXXS2ERH6", + "device_type:herolte", "os:Android", "pool:Skia" ], @@ -29085,7 +28289,7 @@ "perf" ] }, - "Perf-Android-Clang-P30-GPU-MaliG76-arm64-Release-All-Android": { + "Perf-Android-Clang-GalaxyS9-GPU-MaliG72-arm64-Release-All-Android": { "caches": [ { "name": "vpython", @@ -29126,7 +28330,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-P30-GPU-MaliG76-arm64-Release-All-Android\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"srgb-gles\\\",\\\"narrow-gles\\\",\\\"glesfakev2\\\",\\\"glesmsaa4\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"MaliG76\\\",\\\"extra_config\\\",\\\"Android\\\",\\\"model\\\",\\\"P30\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-GalaxyS9-GPU-MaliG72-arm64-Release-All-Android\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"srgb-gles\\\",\\\"narrow-gles\\\",\\\"glesfakev2\\\",\\\"glesmsaa4\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"MaliG72\\\",\\\"extra_config\\\",\\\"Android\\\",\\\"model\\\",\\\"GalaxyS9\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ @@ -29137,8 +28341,8 @@ "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "device_os:HUAWEIELE-L29", - "device_type:HWELE", + "device_os:QP1A.190711.020", + "device_type:starlte", "os:Android", "pool:Skia" ], @@ -29171,7 +28375,7 @@ "perf" ] }, - "Perf-Android-Clang-P30-GPU-MaliG76-arm64-Release-All-Android_Vulkan": { + "Perf-Android-Clang-GalaxyS9-GPU-MaliG72-arm64-Release-All-Android_Vulkan": { "caches": [ { "name": "vpython", @@ -29212,7 +28416,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-P30-GPU-MaliG76-arm64-Release-All-Android_Vulkan\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"MaliG76\\\",\\\"extra_config\\\",\\\"Android_Vulkan\\\",\\\"model\\\",\\\"P30\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-GalaxyS9-GPU-MaliG72-arm64-Release-All-Android_Vulkan\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"MaliG72\\\",\\\"extra_config\\\",\\\"Android_Vulkan\\\",\\\"model\\\",\\\"GalaxyS9\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ @@ -29223,8 +28427,8 @@ "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "device_os:HUAWEIELE-L29", - "device_type:HWELE", + "device_os:QP1A.190711.020", + "device_type:starlte", "os:Android", "pool:Skia" ], @@ -29257,7 +28461,7 @@ "perf" ] }, - "Perf-Android-Clang-Pixel2XL-GPU-Adreno540-arm64-Release-All-Android": { + "Perf-Android-Clang-JioNext-CPU-SnapdragonQM215-arm-Release-All-Android": { "caches": [ { "name": "vpython", @@ -29290,6 +28494,11 @@ "name": "infra/tools/luci/vpython/${platform}", "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "skia/bots/text_blob_traces", + "path": "text_blob_traces", + "version": "version:0" } ], "command": [ @@ -29298,19 +28507,19 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel2XL-GPU-Adreno540-arm64-Release-All-Android\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"srgb-gles\\\",\\\"narrow-gles\\\",\\\"glesfakev2\\\",\\\"glesmsaa4\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"Adreno540\\\",\\\"extra_config\\\",\\\"Android\\\",\\\"model\\\",\\\"Pixel2XL\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-JioNext-CPU-SnapdragonQM215-arm-Release-All-Android\",\"do_upload\":\"true\",\"images\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"nonrendering\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"SnapdragonQM215\\\",\\\"extra_config\\\",\\\"Android\\\",\\\"model\\\",\\\"JioNext\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\",\"textTraces\":\"true\"}", "skia" ], "dependencies": [ - "Build-Debian10-Clang-arm64-Release-Android", + "Build-Debian10-Clang-arm-Release-Android", "Housekeeper-PerCommit-BundleRecipes", "Housekeeper-PerCommit-IsolateSKP", "Housekeeper-PerCommit-IsolateSVG", "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "device_os:PPR1.180610.009", - "device_type:taimen", + "device_os:RKQ1.210602.002", + "device_type:msm8937", "os:Android", "pool:Skia" ], @@ -29343,7 +28552,7 @@ "perf" ] }, - "Perf-Android-Clang-Pixel2XL-GPU-Adreno540-arm64-Release-All-Android_Vulkan": { + "Perf-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-All-Android": { "caches": [ { "name": "vpython", @@ -29384,19 +28593,19 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel2XL-GPU-Adreno540-arm64-Release-All-Android_Vulkan\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"Adreno540\\\",\\\"extra_config\\\",\\\"Android_Vulkan\\\",\\\"model\\\",\\\"Pixel2XL\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-All-Android\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"srgb-gles\\\",\\\"narrow-gles\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"Tegra3\\\",\\\"extra_config\\\",\\\"Android\\\",\\\"model\\\",\\\"Nexus7\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ - "Build-Debian10-Clang-arm64-Release-Android_Vulkan", + "Build-Debian10-Clang-arm-Release-Android", "Housekeeper-PerCommit-BundleRecipes", "Housekeeper-PerCommit-IsolateSKP", "Housekeeper-PerCommit-IsolateSVG", "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "device_os:PPR1.180610.009", - "device_type:taimen", + "device_os:LMY47V_1836172", + "device_type:grouper", "os:Android", "pool:Skia" ], @@ -29429,7 +28638,7 @@ "perf" ] }, - "Perf-Android-Clang-Pixel3-GPU-Adreno630-arm64-Release-All-Android": { + "Perf-Android-Clang-P30-GPU-MaliG76-arm64-Release-All-Android": { "caches": [ { "name": "vpython", @@ -29470,7 +28679,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel3-GPU-Adreno630-arm64-Release-All-Android\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"srgb-gles\\\",\\\"narrow-gles\\\",\\\"glesfakev2\\\",\\\"glesmsaa4\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"Adreno630\\\",\\\"extra_config\\\",\\\"Android\\\",\\\"model\\\",\\\"Pixel3\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-P30-GPU-MaliG76-arm64-Release-All-Android\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"srgb-gles\\\",\\\"narrow-gles\\\",\\\"glesfakev2\\\",\\\"glesmsaa4\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"MaliG76\\\",\\\"extra_config\\\",\\\"Android\\\",\\\"model\\\",\\\"P30\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ @@ -29481,8 +28690,8 @@ "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "device_os:PQ1A.190105.004", - "device_type:blueline", + "device_os:HUAWEIELE-L29", + "device_type:HWELE", "os:Android", "pool:Skia" ], @@ -29515,7 +28724,7 @@ "perf" ] }, - "Perf-Android-Clang-Pixel3-GPU-Adreno630-arm64-Release-All-Android_Vulkan": { + "Perf-Android-Clang-P30-GPU-MaliG76-arm64-Release-All-Android_Vulkan": { "caches": [ { "name": "vpython", @@ -29556,7 +28765,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel3-GPU-Adreno630-arm64-Release-All-Android_Vulkan\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~^path_text_clipped_uncached$\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"Adreno630\\\",\\\"extra_config\\\",\\\"Android_Vulkan\\\",\\\"model\\\",\\\"Pixel3\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-P30-GPU-MaliG76-arm64-Release-All-Android_Vulkan\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"MaliG76\\\",\\\"extra_config\\\",\\\"Android_Vulkan\\\",\\\"model\\\",\\\"P30\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ @@ -29567,8 +28776,8 @@ "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "device_os:PQ1A.190105.004", - "device_type:blueline", + "device_os:HUAWEIELE-L29", + "device_type:HWELE", "os:Android", "pool:Skia" ], @@ -29601,7 +28810,7 @@ "perf" ] }, - "Perf-Android-Clang-Pixel3a-GPU-Adreno615-arm64-Release-All-Android": { + "Perf-Android-Clang-Pixel2XL-GPU-Adreno540-arm64-Release-All-Android": { "caches": [ { "name": "vpython", @@ -29642,7 +28851,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel3a-GPU-Adreno615-arm64-Release-All-Android\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"srgb-gles\\\",\\\"narrow-gles\\\",\\\"glesfakev2\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~^path_text$\\\",\\\"~^path_text_clipped_uncached$\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"Adreno615\\\",\\\"extra_config\\\",\\\"Android\\\",\\\"model\\\",\\\"Pixel3a\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel2XL-GPU-Adreno540-arm64-Release-All-Android\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"srgb-gles\\\",\\\"narrow-gles\\\",\\\"glesfakev2\\\",\\\"glesmsaa4\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"Adreno540\\\",\\\"extra_config\\\",\\\"Android\\\",\\\"model\\\",\\\"Pixel2XL\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ @@ -29653,8 +28862,8 @@ "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "device_os:QP1A.190711.020", - "device_type:sargo", + "device_os:PPR1.180610.009", + "device_type:taimen", "os:Android", "pool:Skia" ], @@ -29687,7 +28896,7 @@ "perf" ] }, - "Perf-Android-Clang-Pixel3a-GPU-Adreno615-arm64-Release-All-Android_Vulkan": { + "Perf-Android-Clang-Pixel2XL-GPU-Adreno540-arm64-Release-All-Android_Vulkan": { "caches": [ { "name": "vpython", @@ -29728,7 +28937,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel3a-GPU-Adreno615-arm64-Release-All-Android_Vulkan\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~^path_text$\\\",\\\"~^path_text_clipped_uncached$\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"Adreno615\\\",\\\"extra_config\\\",\\\"Android_Vulkan\\\",\\\"model\\\",\\\"Pixel3a\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel2XL-GPU-Adreno540-arm64-Release-All-Android_Vulkan\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"Adreno540\\\",\\\"extra_config\\\",\\\"Android_Vulkan\\\",\\\"model\\\",\\\"Pixel2XL\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ @@ -29739,8 +28948,8 @@ "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "device_os:QP1A.190711.020", - "device_type:sargo", + "device_os:PPR1.180610.009", + "device_type:taimen", "os:Android", "pool:Skia" ], @@ -29773,7 +28982,7 @@ "perf" ] }, - "Perf-Android-Clang-Pixel4-CPU-Snapdragon855-arm64-Release-All-Android_Wuffs": { + "Perf-Android-Clang-Pixel3-GPU-Adreno630-arm64-Release-All-Android": { "caches": [ { "name": "vpython", @@ -29806,11 +29015,6 @@ "name": "infra/tools/luci/vpython/${platform}", "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "skia/bots/text_blob_traces", - "path": "text_blob_traces", - "version": "version:0" } ], "command": [ @@ -29819,19 +29023,19 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel4-CPU-Snapdragon855-arm64-Release-All-Android_Wuffs\",\"do_upload\":\"true\",\"images\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"nonrendering\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"Snapdragon855\\\",\\\"extra_config\\\",\\\"Android_Wuffs\\\",\\\"model\\\",\\\"Pixel4\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\",\"textTraces\":\"true\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel3-GPU-Adreno630-arm64-Release-All-Android\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"srgb-gles\\\",\\\"narrow-gles\\\",\\\"glesfakev2\\\",\\\"glesmsaa4\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"Adreno630\\\",\\\"extra_config\\\",\\\"Android\\\",\\\"model\\\",\\\"Pixel3\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ - "Build-Debian10-Clang-arm64-Release-Android_Wuffs", + "Build-Debian10-Clang-arm64-Release-Android", "Housekeeper-PerCommit-BundleRecipes", "Housekeeper-PerCommit-IsolateSKP", "Housekeeper-PerCommit-IsolateSVG", "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "device_os:RPB2.200611.009", - "device_type:flame", + "device_os:PQ1A.190105.004", + "device_type:blueline", "os:Android", "pool:Skia" ], @@ -29864,7 +29068,7 @@ "perf" ] }, - "Perf-Android-Clang-Pixel4-GPU-Adreno640-arm64-Release-All-Android": { + "Perf-Android-Clang-Pixel3-GPU-Adreno630-arm64-Release-All-Android_Vulkan": { "caches": [ { "name": "vpython", @@ -29905,19 +29109,19 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel4-GPU-Adreno640-arm64-Release-All-Android\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"srgb-gles\\\",\\\"narrow-gles\\\",\\\"glesfakev2\\\",\\\"glesmsaa4\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"Adreno640\\\",\\\"extra_config\\\",\\\"Android\\\",\\\"model\\\",\\\"Pixel4\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel3-GPU-Adreno630-arm64-Release-All-Android_Vulkan\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~^path_text_clipped_uncached$\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"Adreno630\\\",\\\"extra_config\\\",\\\"Android_Vulkan\\\",\\\"model\\\",\\\"Pixel3\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ - "Build-Debian10-Clang-arm64-Release-Android", + "Build-Debian10-Clang-arm64-Release-Android_Vulkan", "Housekeeper-PerCommit-BundleRecipes", "Housekeeper-PerCommit-IsolateSKP", "Housekeeper-PerCommit-IsolateSVG", "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "device_os:RPB2.200611.009", - "device_type:flame", + "device_os:PQ1A.190105.004", + "device_type:blueline", "os:Android", "pool:Skia" ], @@ -29950,7 +29154,7 @@ "perf" ] }, - "Perf-Android-Clang-Pixel4-GPU-Adreno640-arm64-Release-All-Android_Vulkan": { + "Perf-Android-Clang-Pixel3a-GPU-Adreno615-arm64-Release-All-Android": { "caches": [ { "name": "vpython", @@ -29991,19 +29195,19 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel4-GPU-Adreno640-arm64-Release-All-Android_Vulkan\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"Adreno640\\\",\\\"extra_config\\\",\\\"Android_Vulkan\\\",\\\"model\\\",\\\"Pixel4\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel3a-GPU-Adreno615-arm64-Release-All-Android\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"srgb-gles\\\",\\\"narrow-gles\\\",\\\"glesfakev2\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~^path_text$\\\",\\\"~^path_text_clipped_uncached$\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"Adreno615\\\",\\\"extra_config\\\",\\\"Android\\\",\\\"model\\\",\\\"Pixel3a\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ - "Build-Debian10-Clang-arm64-Release-Android_Vulkan", + "Build-Debian10-Clang-arm64-Release-Android", "Housekeeper-PerCommit-BundleRecipes", "Housekeeper-PerCommit-IsolateSKP", "Housekeeper-PerCommit-IsolateSVG", "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "device_os:RPB2.200611.009", - "device_type:flame", + "device_os:QP1A.190711.020", + "device_type:sargo", "os:Android", "pool:Skia" ], @@ -30036,7 +29240,7 @@ "perf" ] }, - "Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android": { + "Perf-Android-Clang-Pixel3a-GPU-Adreno615-arm64-Release-All-Android_Vulkan": { "caches": [ { "name": "vpython", @@ -30077,19 +29281,19 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"srgb-gles\\\",\\\"narrow-gles\\\",\\\"glesfakev2\\\",\\\"glesmsaa4\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"Adreno640\\\",\\\"extra_config\\\",\\\"Android\\\",\\\"model\\\",\\\"Pixel4XL\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel3a-GPU-Adreno615-arm64-Release-All-Android_Vulkan\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~^path_text$\\\",\\\"~^path_text_clipped_uncached$\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"Adreno615\\\",\\\"extra_config\\\",\\\"Android_Vulkan\\\",\\\"model\\\",\\\"Pixel3a\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ - "Build-Debian10-Clang-arm64-Release-Android", + "Build-Debian10-Clang-arm64-Release-Android_Vulkan", "Housekeeper-PerCommit-BundleRecipes", "Housekeeper-PerCommit-IsolateSKP", "Housekeeper-PerCommit-IsolateSVG", "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "device_os:QD1A.190821.011.C4", - "device_type:coral", + "device_os:QP1A.190711.020", + "device_type:sargo", "os:Android", "pool:Skia" ], @@ -30122,14 +29326,14 @@ "perf" ] }, - "Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_AllPathsVolatile_Skpbench": { + "Perf-Android-Clang-Pixel4-CPU-Snapdragon855-arm64-Release-All-Android_Wuffs": { "caches": [ { "name": "vpython", "path": "cache/vpython" } ], - "casSpec": "skpbench", + "casSpec": "perf", "cipd_packages": [ { "name": "infra/3pp/tools/cpython3/linux-arm64", @@ -30155,6 +29359,11 @@ "name": "infra/tools/luci/vpython/${platform}", "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "skia/bots/text_blob_traces", + "path": "text_blob_traces", + "version": "version:0" } ], "command": [ @@ -30162,19 +29371,20 @@ "-u", "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", - "skpbench", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_AllPathsVolatile_Skpbench\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "perf", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel4-CPU-Snapdragon855-arm64-Release-All-Android_Wuffs\",\"do_upload\":\"true\",\"images\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"nonrendering\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"Snapdragon855\\\",\\\"extra_config\\\",\\\"Android_Wuffs\\\",\\\"model\\\",\\\"Pixel4\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\",\"textTraces\":\"true\"}", "skia" ], "dependencies": [ - "Build-Debian10-Clang-arm64-Release-Android", + "Build-Debian10-Clang-arm64-Release-Android_Wuffs", "Housekeeper-PerCommit-BundleRecipes", - "Housekeeper-PerCommit-IsolateMSKP", - "Housekeeper-PerCommit-IsolateSKP" + "Housekeeper-PerCommit-IsolateSKP", + "Housekeeper-PerCommit-IsolateSVG", + "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "device_os:QD1A.190821.011.C4", - "device_type:coral", + "device_os:RPB2.200611.009", + "device_type:flame", "os:Android", "pool:Skia" ], @@ -30207,14 +29417,14 @@ "perf" ] }, - "Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Skpbench": { + "Perf-Android-Clang-Pixel4-GPU-Adreno640-arm64-Release-All-Android": { "caches": [ { "name": "vpython", "path": "cache/vpython" } ], - "casSpec": "skpbench", + "casSpec": "perf", "cipd_packages": [ { "name": "infra/3pp/tools/cpython3/linux-arm64", @@ -30247,19 +29457,20 @@ "-u", "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", - "skpbench", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Skpbench\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "perf", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel4-GPU-Adreno640-arm64-Release-All-Android\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"srgb-gles\\\",\\\"narrow-gles\\\",\\\"glesfakev2\\\",\\\"glesmsaa4\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"Adreno640\\\",\\\"extra_config\\\",\\\"Android\\\",\\\"model\\\",\\\"Pixel4\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Build-Debian10-Clang-arm64-Release-Android", "Housekeeper-PerCommit-BundleRecipes", - "Housekeeper-PerCommit-IsolateMSKP", - "Housekeeper-PerCommit-IsolateSKP" + "Housekeeper-PerCommit-IsolateSKP", + "Housekeeper-PerCommit-IsolateSVG", + "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "device_os:QD1A.190821.011.C4", - "device_type:coral", + "device_os:RPB2.200611.009", + "device_type:flame", "os:Android", "pool:Skia" ], @@ -30292,7 +29503,7 @@ "perf" ] }, - "Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Vulkan": { + "Perf-Android-Clang-Pixel4-GPU-Adreno640-arm64-Release-All-Android_Vulkan": { "caches": [ { "name": "vpython", @@ -30333,7 +29544,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Vulkan\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"Adreno640\\\",\\\"extra_config\\\",\\\"Android_Vulkan\\\",\\\"model\\\",\\\"Pixel4XL\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel4-GPU-Adreno640-arm64-Release-All-Android_Vulkan\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"Adreno640\\\",\\\"extra_config\\\",\\\"Android_Vulkan\\\",\\\"model\\\",\\\"Pixel4\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ @@ -30344,8 +29555,8 @@ "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "device_os:QD1A.190821.011.C4", - "device_type:coral", + "device_os:RPB2.200611.009", + "device_type:flame", "os:Android", "pool:Skia" ], @@ -30378,14 +29589,14 @@ "perf" ] }, - "Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Vulkan_AllPathsVolatile_Skpbench": { + "Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android": { "caches": [ { "name": "vpython", "path": "cache/vpython" } ], - "casSpec": "skpbench", + "casSpec": "perf", "cipd_packages": [ { "name": "infra/3pp/tools/cpython3/linux-arm64", @@ -30418,15 +29629,16 @@ "-u", "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", - "skpbench", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Vulkan_AllPathsVolatile_Skpbench\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "perf", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"srgb-gles\\\",\\\"narrow-gles\\\",\\\"glesfakev2\\\",\\\"glesmsaa4\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"Adreno640\\\",\\\"extra_config\\\",\\\"Android\\\",\\\"model\\\",\\\"Pixel4XL\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ - "Build-Debian10-Clang-arm64-Release-Android_Vulkan", + "Build-Debian10-Clang-arm64-Release-Android", "Housekeeper-PerCommit-BundleRecipes", - "Housekeeper-PerCommit-IsolateMSKP", - "Housekeeper-PerCommit-IsolateSKP" + "Housekeeper-PerCommit-IsolateSKP", + "Housekeeper-PerCommit-IsolateSVG", + "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ "device_os:QD1A.190821.011.C4", @@ -30463,7 +29675,7 @@ "perf" ] }, - "Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Vulkan_Skpbench": { + "Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_AllPathsVolatile_Skpbench": { "caches": [ { "name": "vpython", @@ -30504,11 +29716,11 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "skpbench", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Vulkan_Skpbench\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_AllPathsVolatile_Skpbench\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ - "Build-Debian10-Clang-arm64-Release-Android_Vulkan", + "Build-Debian10-Clang-arm64-Release-Android", "Housekeeper-PerCommit-BundleRecipes", "Housekeeper-PerCommit-IsolateMSKP", "Housekeeper-PerCommit-IsolateSKP" @@ -30548,14 +29760,14 @@ "perf" ] }, - "Perf-Android-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android": { + "Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Skpbench": { "caches": [ { "name": "vpython", "path": "cache/vpython" } ], - "casSpec": "perf", + "casSpec": "skpbench", "cipd_packages": [ { "name": "infra/3pp/tools/cpython3/linux-arm64", @@ -30588,20 +29800,19 @@ "-u", "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", - "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"srgb-gles\\\",\\\"narrow-gles\\\",\\\"glesfakev2\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"Adreno620\\\",\\\"extra_config\\\",\\\"Android\\\",\\\"model\\\",\\\"Pixel5\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "skpbench", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Skpbench\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Build-Debian10-Clang-arm64-Release-Android", "Housekeeper-PerCommit-BundleRecipes", - "Housekeeper-PerCommit-IsolateSKP", - "Housekeeper-PerCommit-IsolateSVG", - "Housekeeper-PerCommit-IsolateSkImage" + "Housekeeper-PerCommit-IsolateMSKP", + "Housekeeper-PerCommit-IsolateSKP" ], "dimensions": [ - "device_os:RD1A.200810.022.A4", - "device_type:redfin", + "device_os:QD1A.190821.011.C4", + "device_type:coral", "os:Android", "pool:Skia" ], @@ -30634,7 +29845,7 @@ "perf" ] }, - "Perf-Android-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android_Vulkan": { + "Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Vulkan": { "caches": [ { "name": "vpython", @@ -30675,7 +29886,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android_Vulkan\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"Adreno620\\\",\\\"extra_config\\\",\\\"Android_Vulkan\\\",\\\"model\\\",\\\"Pixel5\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Vulkan\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"Adreno640\\\",\\\"extra_config\\\",\\\"Android_Vulkan\\\",\\\"model\\\",\\\"Pixel4XL\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ @@ -30686,8 +29897,8 @@ "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "device_os:RD1A.200810.022.A4", - "device_type:redfin", + "device_os:QD1A.190821.011.C4", + "device_type:coral", "os:Android", "pool:Skia" ], @@ -30720,14 +29931,14 @@ "perf" ] }, - "Perf-Android-Clang-Pixel6-GPU-MaliG78-arm64-Release-All-Android_Vulkan": { + "Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Vulkan_AllPathsVolatile_Skpbench": { "caches": [ { "name": "vpython", "path": "cache/vpython" } ], - "casSpec": "perf", + "casSpec": "skpbench", "cipd_packages": [ { "name": "infra/3pp/tools/cpython3/linux-arm64", @@ -30760,20 +29971,19 @@ "-u", "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", - "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel6-GPU-MaliG78-arm64-Release-All-Android_Vulkan\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"MaliG78\\\",\\\"extra_config\\\",\\\"Android_Vulkan\\\",\\\"model\\\",\\\"Pixel6\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "skpbench", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Vulkan_AllPathsVolatile_Skpbench\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Build-Debian10-Clang-arm64-Release-Android_Vulkan", "Housekeeper-PerCommit-BundleRecipes", - "Housekeeper-PerCommit-IsolateSKP", - "Housekeeper-PerCommit-IsolateSVG", - "Housekeeper-PerCommit-IsolateSkImage" + "Housekeeper-PerCommit-IsolateMSKP", + "Housekeeper-PerCommit-IsolateSKP" ], "dimensions": [ - "device_os:SD1A.210817.037", - "device_type:oriole", + "device_os:QD1A.190821.011.C4", + "device_type:coral", "os:Android", "pool:Skia" ], @@ -30806,14 +30016,14 @@ "perf" ] }, - "Perf-Android-Clang-Pixel7-GPU-MaliG710-arm64-Release-All-Android_Vulkan": { + "Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Vulkan_Skpbench": { "caches": [ { "name": "vpython", "path": "cache/vpython" } ], - "casSpec": "perf", + "casSpec": "skpbench", "cipd_packages": [ { "name": "infra/3pp/tools/cpython3/linux-arm64", @@ -30846,20 +30056,19 @@ "-u", "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", - "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel7-GPU-MaliG710-arm64-Release-All-Android_Vulkan\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"MaliG710\\\",\\\"extra_config\\\",\\\"Android_Vulkan\\\",\\\"model\\\",\\\"Pixel7\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "skpbench", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Vulkan_Skpbench\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Build-Debian10-Clang-arm64-Release-Android_Vulkan", "Housekeeper-PerCommit-BundleRecipes", - "Housekeeper-PerCommit-IsolateSKP", - "Housekeeper-PerCommit-IsolateSVG", - "Housekeeper-PerCommit-IsolateSkImage" + "Housekeeper-PerCommit-IsolateMSKP", + "Housekeeper-PerCommit-IsolateSKP" ], "dimensions": [ - "device_os:TD1A.221105.002", - "device_type:cheetah", + "device_os:QD1A.190821.011.C4", + "device_type:coral", "os:Android", "pool:Skia" ], @@ -30892,7 +30101,7 @@ "perf" ] }, - "Perf-Android-Clang-Wembley-GPU-PowerVRGE8320-arm-Release-All-Android": { + "Perf-Android-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android": { "caches": [ { "name": "vpython", @@ -30933,19 +30142,19 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Wembley-GPU-PowerVRGE8320-arm-Release-All-Android\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"srgb-gles\\\",\\\"narrow-gles\\\",\\\"glesfakev2\\\",\\\"glesmsaa4\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~^create_backend_texture\\\",\\\"~^draw_coverage\\\",\\\"~^compositing_images\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"PowerVRGE8320\\\",\\\"extra_config\\\",\\\"Android\\\",\\\"model\\\",\\\"Wembley\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"srgb-gles\\\",\\\"narrow-gles\\\",\\\"glesfakev2\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"Adreno620\\\",\\\"extra_config\\\",\\\"Android\\\",\\\"model\\\",\\\"Pixel5\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ - "Build-Debian10-Clang-arm-Release-Android", + "Build-Debian10-Clang-arm64-Release-Android", "Housekeeper-PerCommit-BundleRecipes", "Housekeeper-PerCommit-IsolateSKP", "Housekeeper-PerCommit-IsolateSVG", "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "device_os:SP2A.220505.008", - "device_type:wembley", + "device_os:RD1A.200810.022.A4", + "device_type:redfin", "os:Android", "pool:Skia" ], @@ -30978,7 +30187,7 @@ "perf" ] }, - "Perf-Android12-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android": { + "Perf-Android-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android_Vulkan": { "caches": [ { "name": "vpython", @@ -31019,18 +30228,18 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android12-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"srgb-gles\\\",\\\"narrow-gles\\\",\\\"glesfakev2\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"Adreno620\\\",\\\"extra_config\\\",\\\"Android\\\",\\\"model\\\",\\\"Pixel5\\\",\\\"os\\\",\\\"Android12\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android_Vulkan\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"Adreno620\\\",\\\"extra_config\\\",\\\"Android_Vulkan\\\",\\\"model\\\",\\\"Pixel5\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ - "Build-Debian10-Clang-arm64-Release-Android", + "Build-Debian10-Clang-arm64-Release-Android_Vulkan", "Housekeeper-PerCommit-BundleRecipes", "Housekeeper-PerCommit-IsolateSKP", "Housekeeper-PerCommit-IsolateSVG", "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "device_os:SP2A.220305.012", + "device_os:RD1A.200810.022.A4", "device_type:redfin", "os:Android", "pool:Skia" @@ -31064,7 +30273,7 @@ "perf" ] }, - "Perf-Android12-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android_Vulkan": { + "Perf-Android-Clang-Pixel6-GPU-MaliG78-arm64-Release-All-Android_Vulkan": { "caches": [ { "name": "vpython", @@ -31105,7 +30314,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android12-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android_Vulkan\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"Adreno620\\\",\\\"extra_config\\\",\\\"Android_Vulkan\\\",\\\"model\\\",\\\"Pixel5\\\",\\\"os\\\",\\\"Android12\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel6-GPU-MaliG78-arm64-Release-All-Android_Vulkan\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"MaliG78\\\",\\\"extra_config\\\",\\\"Android_Vulkan\\\",\\\"model\\\",\\\"Pixel6\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ @@ -31116,8 +30325,8 @@ "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "device_os:SP2A.220305.012", - "device_type:redfin", + "device_os:SD1A.210817.037", + "device_type:oriole", "os:Android", "pool:Skia" ], @@ -31150,7 +30359,7 @@ "perf" ] }, - "Perf-ChromeOS-Clang-Kevin-GPU-MaliT860-arm-Release-All": { + "Perf-Android-Clang-Pixel7-GPU-MaliG710-arm64-Release-All-Android_Vulkan": { "caches": [ { "name": "vpython", @@ -31191,21 +30400,21 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-ChromeOS-Clang-Kevin-GPU-MaliT860-arm-Release-All\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"--internalSamples\\\",\\\"8\\\",\\\"--match\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"MaliT860\\\",\\\"model\\\",\\\"Kevin\\\",\\\"os\\\",\\\"ChromeOS\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel7-GPU-MaliG710-arm64-Release-All-Android_Vulkan\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"MaliG710\\\",\\\"extra_config\\\",\\\"Android_Vulkan\\\",\\\"model\\\",\\\"Pixel7\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ - "Build-Debian10-Clang-arm-Release-Chromebook_GLES", + "Build-Debian10-Clang-arm64-Release-Android_Vulkan", "Housekeeper-PerCommit-BundleRecipes", "Housekeeper-PerCommit-IsolateSKP", "Housekeeper-PerCommit-IsolateSVG", "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "gpu:MaliT860", - "os:ChromeOS", - "pool:Skia", - "release_version:14092.77.0" + "device_os:TD1A.221105.002", + "device_type:cheetah", + "os:Android", + "pool:Skia" ], "environment": { "RECIPES_USE_PY3": "true", @@ -31236,7 +30445,7 @@ "perf" ] }, - "Perf-ChromeOS-Clang-Sparky360-GPU-IntelUHDGraphics605-x86_64-Release-All": { + "Perf-Android-Clang-Wembley-GPU-PowerVRGE8320-arm-Release-All-Android": { "caches": [ { "name": "vpython", @@ -31277,21 +30486,21 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-ChromeOS-Clang-Sparky360-GPU-IntelUHDGraphics605-x86_64-Release-All\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"--internalSamples\\\",\\\"8\\\",\\\"--match\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelUHDGraphics605\\\",\\\"model\\\",\\\"Sparky360\\\",\\\"os\\\",\\\"ChromeOS\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Wembley-GPU-PowerVRGE8320-arm-Release-All-Android\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"srgb-gles\\\",\\\"narrow-gles\\\",\\\"glesfakev2\\\",\\\"glesmsaa4\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~^create_backend_texture\\\",\\\"~^draw_coverage\\\",\\\"~^compositing_images\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"PowerVRGE8320\\\",\\\"extra_config\\\",\\\"Android\\\",\\\"model\\\",\\\"Wembley\\\",\\\"os\\\",\\\"Android\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ - "Build-Debian10-Clang-x86_64-Release-Chromebook_GLES", + "Build-Debian10-Clang-arm-Release-Android", "Housekeeper-PerCommit-BundleRecipes", "Housekeeper-PerCommit-IsolateSKP", "Housekeeper-PerCommit-IsolateSVG", "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "gpu:IntelUHDGraphics605", - "os:ChromeOS", - "pool:Skia", - "release_version:15236.2.0" + "device_os:SP2A.220505.008", + "device_type:wembley", + "os:Android", + "pool:Skia" ], "environment": { "RECIPES_USE_PY3": "true", @@ -31322,7 +30531,7 @@ "perf" ] }, - "Perf-ChromeOS-Clang-Spin513-GPU-Adreno618-arm-Release-All": { + "Perf-Android12-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android": { "caches": [ { "name": "vpython", @@ -31363,21 +30572,21 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-ChromeOS-Clang-Spin513-GPU-Adreno618-arm-Release-All\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"--internalSamples\\\",\\\"8\\\",\\\"--match\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"Adreno618\\\",\\\"model\\\",\\\"Spin513\\\",\\\"os\\\",\\\"ChromeOS\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android12-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"srgb-gles\\\",\\\"narrow-gles\\\",\\\"glesfakev2\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"Adreno620\\\",\\\"extra_config\\\",\\\"Android\\\",\\\"model\\\",\\\"Pixel5\\\",\\\"os\\\",\\\"Android12\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ - "Build-Debian10-Clang-arm-Release-Chromebook_GLES", + "Build-Debian10-Clang-arm64-Release-Android", "Housekeeper-PerCommit-BundleRecipes", "Housekeeper-PerCommit-IsolateSKP", "Housekeeper-PerCommit-IsolateSVG", "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "gpu:Adreno618", - "os:ChromeOS", - "pool:Skia", - "release_version:14150.39.0" + "device_os:SP2A.220305.012", + "device_type:redfin", + "os:Android", + "pool:Skia" ], "environment": { "RECIPES_USE_PY3": "true", @@ -31408,7 +30617,7 @@ "perf" ] }, - "Perf-ChromeOS-Clang-Spin514-GPU-RadeonVega3-x86_64-Release-All": { + "Perf-Android12-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android_Vulkan": { "caches": [ { "name": "vpython", @@ -31449,21 +30658,21 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-ChromeOS-Clang-Spin514-GPU-RadeonVega3-x86_64-Release-All\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"--internalSamples\\\",\\\"8\\\",\\\"--match\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonVega3\\\",\\\"model\\\",\\\"Spin514\\\",\\\"os\\\",\\\"ChromeOS\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android12-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android_Vulkan\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--internalSamples\\\",\\\"4\\\",\\\"--match\\\",\\\"~blurroundrect\\\",\\\"~patch_grid\\\",\\\"~desk_carsvg\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"Adreno620\\\",\\\"extra_config\\\",\\\"Android_Vulkan\\\",\\\"model\\\",\\\"Pixel5\\\",\\\"os\\\",\\\"Android12\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ - "Build-Debian10-Clang-x86_64-Release-Chromebook_GLES", + "Build-Debian10-Clang-arm64-Release-Android_Vulkan", "Housekeeper-PerCommit-BundleRecipes", "Housekeeper-PerCommit-IsolateSKP", "Housekeeper-PerCommit-IsolateSVG", "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "gpu:RadeonVega3", - "os:ChromeOS", - "pool:Skia", - "release_version:14233.0.0" + "device_os:SP2A.220305.012", + "device_type:redfin", + "os:Android", + "pool:Skia" ], "environment": { "RECIPES_USE_PY3": "true", @@ -31494,7 +30703,7 @@ "perf" ] }, - "Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All": { + "Perf-ChromeOS-Clang-Kevin-GPU-MaliT860-arm-Release-All": { "caches": [ { "name": "vpython", @@ -31504,7 +30713,7 @@ "casSpec": "perf", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/linux-amd64", + "name": "infra/3pp/tools/cpython3/linux-arm64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, @@ -31527,21 +30736,6 @@ "name": "infra/tools/luci/vpython/${platform}", "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "skia/bots/skimage", - "path": "skimage", - "version": "version:47" - }, - { - "name": "skia/bots/skp", - "path": "skp", - "version": "version:432" - }, - { - "name": "skia/bots/svg", - "path": "svg", - "version": "version:14" } ], "command": [ @@ -31550,18 +30744,21 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All\",\"do_upload\":\"true\",\"images\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"nonrendering\\\",\\\"--internalSamples\\\",\\\"8\\\",\\\"--match\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"model\\\",\\\"GCE\\\",\\\"os\\\",\\\"Debian10\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-ChromeOS-Clang-Kevin-GPU-MaliT860-arm-Release-All\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"--internalSamples\\\",\\\"8\\\",\\\"--match\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"MaliT860\\\",\\\"model\\\",\\\"Kevin\\\",\\\"os\\\",\\\"ChromeOS\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ - "Build-Debian10-Clang-x86_64-Release", - "Housekeeper-PerCommit-BundleRecipes" + "Build-Debian10-Clang-arm-Release-Chromebook_GLES", + "Housekeeper-PerCommit-BundleRecipes", + "Housekeeper-PerCommit-IsolateSKP", + "Housekeeper-PerCommit-IsolateSVG", + "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "machine_type:n1-standard-16", - "os:Debian-10.3", - "pool:Skia" + "gpu:MaliT860", + "os:ChromeOS", + "pool:Skia", + "release_version:14092.77.0" ], "environment": { "RECIPES_USE_PY3": "true", @@ -31592,7 +30789,7 @@ "perf" ] }, - "Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-BonusConfigs": { + "Perf-ChromeOS-Clang-Sparky360-GPU-IntelUHDGraphics605-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -31602,7 +30799,7 @@ "casSpec": "perf", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/linux-amd64", + "name": "infra/3pp/tools/cpython3/linux-arm64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, @@ -31625,21 +30822,6 @@ "name": "infra/tools/luci/vpython/${platform}", "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "skia/bots/skimage", - "path": "skimage", - "version": "version:47" - }, - { - "name": "skia/bots/skp", - "path": "skp", - "version": "version:432" - }, - { - "name": "skia/bots/svg", - "path": "svg", - "version": "version:14" } ], "command": [ @@ -31648,18 +30830,21 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-BonusConfigs\",\"do_upload\":\"true\",\"images\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"f16\\\",\\\"srgb-rgba\\\",\\\"srgb-f16\\\",\\\"narrow-rgba\\\",\\\"narrow-f16\\\",\\\"--internalSamples\\\",\\\"8\\\",\\\"--match\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"extra_config\\\",\\\"BonusConfigs\\\",\\\"model\\\",\\\"GCE\\\",\\\"os\\\",\\\"Debian10\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-ChromeOS-Clang-Sparky360-GPU-IntelUHDGraphics605-x86_64-Release-All\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"--internalSamples\\\",\\\"8\\\",\\\"--match\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelUHDGraphics605\\\",\\\"model\\\",\\\"Sparky360\\\",\\\"os\\\",\\\"ChromeOS\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ - "Build-Debian10-Clang-x86_64-Release", - "Housekeeper-PerCommit-BundleRecipes" + "Build-Debian10-Clang-x86_64-Release-Chromebook_GLES", + "Housekeeper-PerCommit-BundleRecipes", + "Housekeeper-PerCommit-IsolateSKP", + "Housekeeper-PerCommit-IsolateSVG", + "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "machine_type:n1-standard-16", - "os:Debian-10.3", - "pool:Skia" + "gpu:IntelUHDGraphics605", + "os:ChromeOS", + "pool:Skia", + "release_version:15236.2.0" ], "environment": { "RECIPES_USE_PY3": "true", @@ -31690,7 +30875,7 @@ "perf" ] }, - "Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-ColorSpaces": { + "Perf-ChromeOS-Clang-Spin513-GPU-Adreno618-arm-Release-All": { "caches": [ { "name": "vpython", @@ -31700,7 +30885,7 @@ "casSpec": "perf", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/linux-amd64", + "name": "infra/3pp/tools/cpython3/linux-arm64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, @@ -31723,21 +30908,6 @@ "name": "infra/tools/luci/vpython/${platform}", "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "skia/bots/skimage", - "path": "skimage", - "version": "version:47" - }, - { - "name": "skia/bots/skp", - "path": "skp", - "version": "version:432" - }, - { - "name": "skia/bots/svg", - "path": "svg", - "version": "version:14" } ], "command": [ @@ -31746,18 +30916,21 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-ColorSpaces\",\"do_upload\":\"true\",\"images\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"nonrendering\\\",\\\"--internalSamples\\\",\\\"8\\\",\\\"--match\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"extra_config\\\",\\\"ColorSpaces\\\",\\\"model\\\",\\\"GCE\\\",\\\"os\\\",\\\"Debian10\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-ChromeOS-Clang-Spin513-GPU-Adreno618-arm-Release-All\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"--internalSamples\\\",\\\"8\\\",\\\"--match\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"Adreno618\\\",\\\"model\\\",\\\"Spin513\\\",\\\"os\\\",\\\"ChromeOS\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ - "Build-Debian10-Clang-x86_64-Release", - "Housekeeper-PerCommit-BundleRecipes" + "Build-Debian10-Clang-arm-Release-Chromebook_GLES", + "Housekeeper-PerCommit-BundleRecipes", + "Housekeeper-PerCommit-IsolateSKP", + "Housekeeper-PerCommit-IsolateSVG", + "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "machine_type:n1-standard-16", - "os:Debian-10.3", - "pool:Skia" + "gpu:Adreno618", + "os:ChromeOS", + "pool:Skia", + "release_version:14150.39.0" ], "environment": { "RECIPES_USE_PY3": "true", @@ -31788,7 +30961,7 @@ "perf" ] }, - "Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-Fast": { + "Perf-ChromeOS-Clang-Spin514-GPU-RadeonVega3-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -31798,7 +30971,7 @@ "casSpec": "perf", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/linux-amd64", + "name": "infra/3pp/tools/cpython3/linux-arm64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, @@ -31821,21 +30994,6 @@ "name": "infra/tools/luci/vpython/${platform}", "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "skia/bots/skimage", - "path": "skimage", - "version": "version:47" - }, - { - "name": "skia/bots/skp", - "path": "skp", - "version": "version:432" - }, - { - "name": "skia/bots/svg", - "path": "svg", - "version": "version:14" } ], "command": [ @@ -31844,18 +31002,21 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-Fast\",\"do_upload\":\"true\",\"images\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"nonrendering\\\",\\\"--internalSamples\\\",\\\"8\\\",\\\"--match\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"extra_config\\\",\\\"Fast\\\",\\\"model\\\",\\\"GCE\\\",\\\"os\\\",\\\"Debian10\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-ChromeOS-Clang-Spin514-GPU-RadeonVega3-x86_64-Release-All\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"--internalSamples\\\",\\\"8\\\",\\\"--match\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonVega3\\\",\\\"model\\\",\\\"Spin514\\\",\\\"os\\\",\\\"ChromeOS\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ - "Build-Debian10-Clang-x86_64-Release-Fast", - "Housekeeper-PerCommit-BundleRecipes" + "Build-Debian10-Clang-x86_64-Release-Chromebook_GLES", + "Housekeeper-PerCommit-BundleRecipes", + "Housekeeper-PerCommit-IsolateSKP", + "Housekeeper-PerCommit-IsolateSVG", + "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "machine_type:n1-standard-16", - "os:Debian-10.3", - "pool:Skia" + "gpu:RadeonVega3", + "os:ChromeOS", + "pool:Skia", + "release_version:14233.0.0" ], "environment": { "RECIPES_USE_PY3": "true", @@ -31886,7 +31047,7 @@ "perf" ] }, - "Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-SK_FORCE_RASTER_PIPELINE_BLITTER": { + "Perf-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -31920,6 +31081,11 @@ "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, + { + "name": "skia/bots/mesa_intel_driver_linux", + "path": "mesa_intel_driver_linux", + "version": "version:15" + }, { "name": "skia/bots/skimage", "path": "skimage", @@ -31928,7 +31094,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -31942,17 +31108,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-SK_FORCE_RASTER_PIPELINE_BLITTER\",\"do_upload\":\"true\",\"images\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"nonrendering\\\",\\\"--internalSamples\\\",\\\"8\\\",\\\"--match\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"extra_config\\\",\\\"SK_FORCE_RASTER_PIPELINE_BLITTER\\\",\\\"model\\\",\\\"GCE\\\",\\\"os\\\",\\\"Debian10\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"srgb-gl\\\",\\\"narrow-gl\\\",\\\"gles\\\",\\\"srgb-gles\\\",\\\"--internalSamples\\\",\\\"8\\\",\\\"--dontReduceOpsTaskSplitting\\\",\\\"true\\\",\\\"--match\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--verbose\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD405\\\",\\\"model\\\",\\\"NUC5PPYH\\\",\\\"os\\\",\\\"Debian10\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ - "Build-Debian10-Clang-x86_64-Release-SK_FORCE_RASTER_PIPELINE_BLITTER", + "Build-Debian10-Clang-x86_64-Release", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "machine_type:n1-standard-16", - "os:Debian-10.3", + "gpu:8086:22b1", + "os:Debian-10.10", "pool:Skia" ], "environment": { @@ -31984,7 +31149,7 @@ "perf" ] }, - "Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-Wuffs": { + "Perf-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All-ASAN_Vulkan": { "caches": [ { "name": "vpython", @@ -32019,102 +31184,19 @@ "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, { - "name": "skia/bots/skimage", - "path": "skimage", - "version": "version:47" - }, - { - "name": "skia/bots/skp", - "path": "skp", - "version": "version:432" - }, - { - "name": "skia/bots/svg", - "path": "svg", - "version": "version:14" - } - ], - "command": [ - "cipd_bin_packages/vpython3${EXECUTABLE_SUFFIX}", - "-u", - "skia/infra/bots/run_recipe.py", - "${ISOLATED_OUTDIR}", - "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-Wuffs\",\"do_upload\":\"true\",\"images\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"nonrendering\\\",\\\"--internalSamples\\\",\\\"8\\\",\\\"--match\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"extra_config\\\",\\\"Wuffs\\\",\\\"model\\\",\\\"GCE\\\",\\\"os\\\",\\\"Debian10\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", - "skia" - ], - "dependencies": [ - "Build-Debian10-Clang-x86_64-Release-Wuffs", - "Housekeeper-PerCommit-BundleRecipes" - ], - "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "machine_type:n1-standard-16", - "os:Debian-10.3", - "pool:Skia" - ], - "environment": { - "RECIPES_USE_PY3": "true", - "VPYTHON_LOG_TRACE": "1" - }, - "env_prefixes": { - "PATH": [ - "cipd_bin_packages/cpython3", - "cipd_bin_packages/cpython3/bin", - "cipd_bin_packages", - "cipd_bin_packages/bin" - ], - "VPYTHON_DEFAULT_SPEC": [ - "skia/.vpython" - ], - "VPYTHON_VIRTUALENV_ROOT": [ - "cache/vpython" - ] - }, - "execution_timeout_ns": 14400000000000, - "expiration_ns": 72000000000000, - "extra_tags": { - "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" - }, - "io_timeout_ns": 14400000000000, - "max_attempts": 2, - "outputs": [ - "perf" - ] - }, - "Perf-Debian10-Clang-GCE-CPU-AVX512-x86_64-OptimizeForSize-All": { - "caches": [ - { - "name": "vpython", - "path": "cache/vpython" - } - ], - "casSpec": "perf", - "cipd_packages": [ - { - "name": "infra/3pp/tools/cpython3/linux-amd64", - "path": "cipd_bin_packages/cpython3", - "version": "version:2@3.8.10.chromium.19" - }, - { - "name": "infra/tools/luci-auth/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/kitchen/${platform}", - "path": ".", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + "name": "skia/bots/clang_linux", + "path": "clang_linux", + "version": "version:30" }, { - "name": "infra/tools/luci/vpython-native/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + "name": "skia/bots/linux_vulkan_sdk", + "path": "linux_vulkan_sdk", + "version": "version:6" }, { - "name": "infra/tools/luci/vpython/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + "name": "skia/bots/mesa_intel_driver_linux", + "path": "mesa_intel_driver_linux", + "version": "version:15" }, { "name": "skia/bots/skimage", @@ -32124,7 +31206,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -32138,16 +31220,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-GCE-CPU-AVX512-x86_64-OptimizeForSize-All\",\"do_upload\":\"true\",\"images\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"nonrendering\\\",\\\"--internalSamples\\\",\\\"8\\\",\\\"--match\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"OptimizeForSize\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX512\\\",\\\"model\\\",\\\"GCE\\\",\\\"os\\\",\\\"Debian10\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All-ASAN_Vulkan\",\"do_upload\":\"false\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"--internalSamples\\\",\\\"8\\\",\\\"--loops\\\",\\\"1\\\",\\\"--samples\\\",\\\"1\\\",\\\"--keepAlive\\\",\\\"true\\\",\\\"--dontReduceOpsTaskSplitting\\\",\\\"true\\\",\\\"--match\\\",\\\"~desk_carsvg.skp_1\\\",\\\"~desk_googlehome.skp\\\",\\\"~desk_tiger8svg.skp_1\\\",\\\"~desk_wowwiki.skp\\\",\\\"~desk_ynevsvg.skp_1.1\\\",\\\"~desk_nostroke_tiger8svg.skp\\\",\\\"~keymobi_booking_com.skp_1\\\",\\\"~keymobi_cnn_article.skp_1\\\",\\\"~keymobi_forecast_io.skp_1\\\",\\\"~keymobi_sfgate.skp_1\\\",\\\"~keymobi_techcrunch_com.skp_1.1\\\",\\\"~keymobi_techcrunch.skp_1.1\\\",\\\"~svgparse_Seal_of_California.svg_1.1\\\",\\\"~svgparse_NewYork-StateSeal.svg_1.1\\\",\\\"~svgparse_Vermont_state_seal.svg_1\\\",\\\"~tabl_gamedeksiam.skp_1.1\\\",\\\"~tabl_pravda.skp_1\\\",\\\"~top25desk_ebay_com.skp_1.1\\\",\\\"~top25desk_ebay.skp_1.1\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ - "Build-Debian10-Clang-x86_64-OptimizeForSize", + "Build-Debian10-Clang-x86_64-Release-ASAN_Vulkan", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "cpu:x86-64-Skylake_GCE", - "os:Debian-10.3", + "gpu:8086:22b1", + "os:Debian-10.10", "pool:Skia" ], "environment": { @@ -32174,12 +31256,12 @@ "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" }, "io_timeout_ns": 14400000000000, - "max_attempts": 2, + "max_attempts": 1, "outputs": [ "perf" ] }, - "Perf-Debian10-Clang-GCE-CPU-AVX512-x86_64-Release-All": { + "Perf-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All-SkottieTracing": { "caches": [ { "name": "vpython", @@ -32213,6 +31295,11 @@ "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, + { + "name": "skia/bots/mesa_intel_driver_linux", + "path": "mesa_intel_driver_linux", + "version": "version:15" + }, { "name": "skia/bots/skimage", "path": "skimage", @@ -32221,12 +31308,17 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", "path": "svg", "version": "version:14" + }, + { + "name": "skia/internal/lotties_with_assets", + "path": "lotties_with_assets", + "version": "version:4" } ], "command": [ @@ -32234,8 +31326,8 @@ "-u", "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", - "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-GCE-CPU-AVX512-x86_64-Release-All\",\"do_upload\":\"true\",\"images\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"nonrendering\\\",\\\"--internalSamples\\\",\\\"8\\\",\\\"--match\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX512\\\",\\\"model\\\",\\\"GCE\\\",\\\"os\\\",\\\"Debian10\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "perf_skottietrace", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All-SkottieTracing\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ @@ -32243,8 +31335,8 @@ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "cpu:x86-64-Skylake_GCE", - "os:Debian-10.3", + "gpu:8086:22b1", + "os:Debian-10.10", "pool:Skia" ], "environment": { @@ -32276,7 +31368,7 @@ "perf" ] }, - "Perf-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Release-All-SwiftShader": { + "Perf-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All-Vulkan": { "caches": [ { "name": "vpython", @@ -32310,6 +31402,16 @@ "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, + { + "name": "skia/bots/linux_vulkan_sdk", + "path": "linux_vulkan_sdk", + "version": "version:6" + }, + { + "name": "skia/bots/mesa_intel_driver_linux", + "path": "mesa_intel_driver_linux", + "version": "version:15" + }, { "name": "skia/bots/skimage", "path": "skimage", @@ -32318,7 +31420,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -32332,17 +31434,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Release-All-SwiftShader\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkdmsaa\\\",\\\"--internalSamples\\\",\\\"8\\\",\\\"--match\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"SwiftShader\\\",\\\"extra_config\\\",\\\"SwiftShader\\\",\\\"model\\\",\\\"GCE\\\",\\\"os\\\",\\\"Debian10\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All-Vulkan\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"--internalSamples\\\",\\\"8\\\",\\\"--dontReduceOpsTaskSplitting\\\",\\\"true\\\",\\\"--match\\\",\\\"~desk_carsvg.skp_1\\\",\\\"~desk_googlehome.skp\\\",\\\"~desk_tiger8svg.skp_1\\\",\\\"~desk_wowwiki.skp\\\",\\\"~desk_ynevsvg.skp_1.1\\\",\\\"~desk_nostroke_tiger8svg.skp\\\",\\\"~keymobi_booking_com.skp_1\\\",\\\"~keymobi_cnn_article.skp_1\\\",\\\"~keymobi_forecast_io.skp_1\\\",\\\"~keymobi_sfgate.skp_1\\\",\\\"~keymobi_techcrunch_com.skp_1.1\\\",\\\"~keymobi_techcrunch.skp_1.1\\\",\\\"~svgparse_Seal_of_California.svg_1.1\\\",\\\"~svgparse_NewYork-StateSeal.svg_1.1\\\",\\\"~svgparse_Vermont_state_seal.svg_1\\\",\\\"~tabl_gamedeksiam.skp_1.1\\\",\\\"~tabl_pravda.skp_1\\\",\\\"~top25desk_ebay_com.skp_1.1\\\",\\\"~top25desk_ebay.skp_1.1\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD405\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"NUC5PPYH\\\",\\\"os\\\",\\\"Debian10\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ - "Build-Debian10-Clang-x86_64-Release-SwiftShader", + "Build-Debian10-Clang-x86_64-Release-Vulkan", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "machine_type:n1-standard-16", - "os:Debian-10.3", + "gpu:8086:22b1", + "os:Debian-10.10", "pool:Skia" ], "environment": { @@ -32374,7 +31475,7 @@ "perf" ] }, - "Perf-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All": { + "Perf-Debian10-Clang-NUCDE3815TYKHE-GPU-IntelBayTrail-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -32421,7 +31522,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -32435,7 +31536,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"srgb-gl\\\",\\\"narrow-gl\\\",\\\"gles\\\",\\\"srgb-gles\\\",\\\"--internalSamples\\\",\\\"8\\\",\\\"--dontReduceOpsTaskSplitting\\\",\\\"true\\\",\\\"--match\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--verbose\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD405\\\",\\\"model\\\",\\\"NUC5PPYH\\\",\\\"os\\\",\\\"Debian10\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-NUCDE3815TYKHE-GPU-IntelBayTrail-x86_64-Release-All\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"srgb-gl\\\",\\\"narrow-gl\\\",\\\"gles\\\",\\\"srgb-gles\\\",\\\"--internalSamples\\\",\\\"8\\\",\\\"--match\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--verbose\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelBayTrail\\\",\\\"model\\\",\\\"NUCDE3815TYKHE\\\",\\\"os\\\",\\\"Debian10\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ @@ -32443,7 +31544,7 @@ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:8086:22b1", + "gpu:8086:0f31", "os:Debian-10.10", "pool:Skia" ], @@ -32476,7 +31577,7 @@ "perf" ] }, - "Perf-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All-ASAN_Vulkan": { + "Perf-Debian10-Clang-ShuttleA-GPU-IntelHD2000-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -32510,16 +31611,6 @@ "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, - { - "name": "skia/bots/clang_linux", - "path": "clang_linux", - "version": "version:30" - }, - { - "name": "skia/bots/linux_vulkan_sdk", - "path": "linux_vulkan_sdk", - "version": "version:6" - }, { "name": "skia/bots/mesa_intel_driver_linux", "path": "mesa_intel_driver_linux", @@ -32533,7 +31624,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -32547,114 +31638,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All-ASAN_Vulkan\",\"do_upload\":\"false\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"--internalSamples\\\",\\\"8\\\",\\\"--loops\\\",\\\"1\\\",\\\"--samples\\\",\\\"1\\\",\\\"--keepAlive\\\",\\\"true\\\",\\\"--dontReduceOpsTaskSplitting\\\",\\\"true\\\",\\\"--match\\\",\\\"~desk_carsvg.skp_1\\\",\\\"~desk_googlehome.skp\\\",\\\"~desk_tiger8svg.skp_1\\\",\\\"~desk_wowwiki.skp\\\",\\\"~desk_ynevsvg.skp_1.1\\\",\\\"~desk_nostroke_tiger8svg.skp\\\",\\\"~keymobi_booking_com.skp_1\\\",\\\"~keymobi_cnn_article.skp_1\\\",\\\"~keymobi_forecast_io.skp_1\\\",\\\"~keymobi_sfgate.skp_1\\\",\\\"~keymobi_techcrunch_com.skp_1.1\\\",\\\"~keymobi_techcrunch.skp_1.1\\\",\\\"~svgparse_Seal_of_California.svg_1.1\\\",\\\"~svgparse_NewYork-StateSeal.svg_1.1\\\",\\\"~svgparse_Vermont_state_seal.svg_1\\\",\\\"~tabl_gamedeksiam.skp_1.1\\\",\\\"~tabl_pravda.skp_1\\\",\\\"~top25desk_ebay_com.skp_1.1\\\",\\\"~top25desk_ebay.skp_1.1\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", - "skia" - ], - "dependencies": [ - "Build-Debian10-Clang-x86_64-Release-ASAN_Vulkan", - "Housekeeper-PerCommit-BundleRecipes" - ], - "dimensions": [ - "gpu:8086:22b1", - "os:Debian-10.10", - "pool:Skia" - ], - "environment": { - "RECIPES_USE_PY3": "true", - "VPYTHON_LOG_TRACE": "1" - }, - "env_prefixes": { - "PATH": [ - "cipd_bin_packages/cpython3", - "cipd_bin_packages/cpython3/bin", - "cipd_bin_packages", - "cipd_bin_packages/bin" - ], - "VPYTHON_DEFAULT_SPEC": [ - "skia/.vpython" - ], - "VPYTHON_VIRTUALENV_ROOT": [ - "cache/vpython" - ] - }, - "execution_timeout_ns": 14400000000000, - "expiration_ns": 72000000000000, - "extra_tags": { - "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" - }, - "io_timeout_ns": 14400000000000, - "max_attempts": 1, - "outputs": [ - "perf" - ] - }, - "Perf-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All-SkottieTracing": { - "caches": [ - { - "name": "vpython", - "path": "cache/vpython" - } - ], - "casSpec": "perf", - "cipd_packages": [ - { - "name": "infra/3pp/tools/cpython3/linux-amd64", - "path": "cipd_bin_packages/cpython3", - "version": "version:2@3.8.10.chromium.19" - }, - { - "name": "infra/tools/luci-auth/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/kitchen/${platform}", - "path": ".", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/vpython-native/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/vpython/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "skia/bots/mesa_intel_driver_linux", - "path": "mesa_intel_driver_linux", - "version": "version:15" - }, - { - "name": "skia/bots/skimage", - "path": "skimage", - "version": "version:47" - }, - { - "name": "skia/bots/skp", - "path": "skp", - "version": "version:432" - }, - { - "name": "skia/bots/svg", - "path": "svg", - "version": "version:14" - }, - { - "name": "skia/internal/lotties_with_assets", - "path": "lotties_with_assets", - "version": "version:4" - } - ], - "command": [ - "cipd_bin_packages/vpython3${EXECUTABLE_SUFFIX}", - "-u", - "skia/infra/bots/run_recipe.py", - "${ISOLATED_OUTDIR}", - "perf_skottietrace", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All-SkottieTracing\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-ShuttleA-GPU-IntelHD2000-x86_64-Release-All\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"srgb-gl\\\",\\\"narrow-gl\\\",\\\"gles\\\",\\\"srgb-gles\\\",\\\"--internalSamples\\\",\\\"8\\\",\\\"--match\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--verbose\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD2000\\\",\\\"model\\\",\\\"ShuttleA\\\",\\\"os\\\",\\\"Debian10\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ @@ -32662,7 +31646,7 @@ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:8086:22b1", + "gpu:8086:0102", "os:Debian-10.10", "pool:Skia" ], @@ -32695,7 +31679,7 @@ "perf" ] }, - "Perf-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All-Vulkan": { + "Perf-Debian11-Clang-NUC11TZi5-CPU-AVX2-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -32729,16 +31713,6 @@ "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, - { - "name": "skia/bots/linux_vulkan_sdk", - "path": "linux_vulkan_sdk", - "version": "version:6" - }, - { - "name": "skia/bots/mesa_intel_driver_linux", - "path": "mesa_intel_driver_linux", - "version": "version:15" - }, { "name": "skia/bots/skimage", "path": "skimage", @@ -32747,7 +31721,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -32761,16 +31735,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All-Vulkan\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"--internalSamples\\\",\\\"8\\\",\\\"--dontReduceOpsTaskSplitting\\\",\\\"true\\\",\\\"--match\\\",\\\"~desk_carsvg.skp_1\\\",\\\"~desk_googlehome.skp\\\",\\\"~desk_tiger8svg.skp_1\\\",\\\"~desk_wowwiki.skp\\\",\\\"~desk_ynevsvg.skp_1.1\\\",\\\"~desk_nostroke_tiger8svg.skp\\\",\\\"~keymobi_booking_com.skp_1\\\",\\\"~keymobi_cnn_article.skp_1\\\",\\\"~keymobi_forecast_io.skp_1\\\",\\\"~keymobi_sfgate.skp_1\\\",\\\"~keymobi_techcrunch_com.skp_1.1\\\",\\\"~keymobi_techcrunch.skp_1.1\\\",\\\"~svgparse_Seal_of_California.svg_1.1\\\",\\\"~svgparse_NewYork-StateSeal.svg_1.1\\\",\\\"~svgparse_Vermont_state_seal.svg_1\\\",\\\"~tabl_gamedeksiam.skp_1.1\\\",\\\"~tabl_pravda.skp_1\\\",\\\"~top25desk_ebay_com.skp_1.1\\\",\\\"~top25desk_ebay.skp_1.1\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD405\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"NUC5PPYH\\\",\\\"os\\\",\\\"Debian10\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian11-Clang-NUC11TZi5-CPU-AVX2-x86_64-Release-All\",\"do_upload\":\"true\",\"images\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"nonrendering\\\",\\\"--internalSamples\\\",\\\"8\\\",\\\"--match\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"model\\\",\\\"NUC11TZi5\\\",\\\"os\\\",\\\"Debian11\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ - "Build-Debian10-Clang-x86_64-Release-Vulkan", + "Build-Debian11-Clang-x86_64-Release", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:8086:22b1", - "os:Debian-10.10", + "cpu:x86-64-avx2", + "os:Debian-11.5", "pool:Skia" ], "environment": { @@ -32802,7 +31776,7 @@ "perf" ] }, - "Perf-Debian10-Clang-NUCDE3815TYKHE-GPU-IntelBayTrail-x86_64-Release-All": { + "Perf-Debian11-Clang-NUC11TZi5-CPU-AVX2-x86_64-Release-All-BonusConfigs": { "caches": [ { "name": "vpython", @@ -32836,11 +31810,6 @@ "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, - { - "name": "skia/bots/mesa_intel_driver_linux", - "path": "mesa_intel_driver_linux", - "version": "version:15" - }, { "name": "skia/bots/skimage", "path": "skimage", @@ -32849,7 +31818,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -32863,16 +31832,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-NUCDE3815TYKHE-GPU-IntelBayTrail-x86_64-Release-All\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"srgb-gl\\\",\\\"narrow-gl\\\",\\\"gles\\\",\\\"srgb-gles\\\",\\\"--internalSamples\\\",\\\"8\\\",\\\"--match\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--verbose\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelBayTrail\\\",\\\"model\\\",\\\"NUCDE3815TYKHE\\\",\\\"os\\\",\\\"Debian10\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian11-Clang-NUC11TZi5-CPU-AVX2-x86_64-Release-All-BonusConfigs\",\"do_upload\":\"true\",\"images\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"f16\\\",\\\"srgb-rgba\\\",\\\"srgb-f16\\\",\\\"narrow-rgba\\\",\\\"narrow-f16\\\",\\\"--internalSamples\\\",\\\"8\\\",\\\"--match\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"extra_config\\\",\\\"BonusConfigs\\\",\\\"model\\\",\\\"NUC11TZi5\\\",\\\"os\\\",\\\"Debian11\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ - "Build-Debian10-Clang-x86_64-Release", + "Build-Debian11-Clang-x86_64-Release", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:8086:0f31", - "os:Debian-10.10", + "cpu:x86-64-avx2", + "os:Debian-11.5", "pool:Skia" ], "environment": { @@ -32904,7 +31873,7 @@ "perf" ] }, - "Perf-Debian10-Clang-ShuttleA-GPU-IntelHD2000-x86_64-Release-All": { + "Perf-Debian11-Clang-NUC11TZi5-CPU-AVX2-x86_64-Release-All-ColorSpaces": { "caches": [ { "name": "vpython", @@ -32938,11 +31907,6 @@ "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, - { - "name": "skia/bots/mesa_intel_driver_linux", - "path": "mesa_intel_driver_linux", - "version": "version:15" - }, { "name": "skia/bots/skimage", "path": "skimage", @@ -32951,7 +31915,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -32965,16 +31929,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-ShuttleA-GPU-IntelHD2000-x86_64-Release-All\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"srgb-gl\\\",\\\"narrow-gl\\\",\\\"gles\\\",\\\"srgb-gles\\\",\\\"--internalSamples\\\",\\\"8\\\",\\\"--match\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--verbose\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD2000\\\",\\\"model\\\",\\\"ShuttleA\\\",\\\"os\\\",\\\"Debian10\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian11-Clang-NUC11TZi5-CPU-AVX2-x86_64-Release-All-ColorSpaces\",\"do_upload\":\"true\",\"images\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"nonrendering\\\",\\\"--internalSamples\\\",\\\"8\\\",\\\"--match\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"extra_config\\\",\\\"ColorSpaces\\\",\\\"model\\\",\\\"NUC11TZi5\\\",\\\"os\\\",\\\"Debian11\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ - "Build-Debian10-Clang-x86_64-Release", + "Build-Debian11-Clang-x86_64-Release", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:8086:0102", - "os:Debian-10.10", + "cpu:x86-64-avx2", + "os:Debian-11.5", "pool:Skia" ], "environment": { @@ -33053,7 +32017,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -33160,7 +32124,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -33257,7 +32221,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -33354,7 +32318,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -33456,7 +32420,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -33558,7 +32522,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -33655,7 +32619,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -33757,7 +32721,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -33859,7 +32823,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -33961,7 +32925,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -34032,7 +32996,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" } ], "command": [ @@ -34101,7 +33065,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" } ], "command": [ @@ -34279,7 +33243,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -34375,7 +33339,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -34472,7 +33436,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -34569,7 +33533,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -34666,7 +33630,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -34764,7 +33728,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -34861,7 +33825,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -34958,7 +33922,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -35055,7 +34019,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -35152,7 +34116,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -35249,7 +34213,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" } ], "command": [ @@ -35341,7 +34305,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -35438,7 +34402,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" } ], "command": [ @@ -35530,7 +34494,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" } ], "command": [ @@ -35622,7 +34586,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -35719,7 +34683,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -35816,7 +34780,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -35924,7 +34888,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -35995,7 +34959,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" } ], "command": [ @@ -36064,7 +35028,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" } ], "command": [ @@ -36133,7 +35097,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" } ], "command": [ @@ -36204,7 +35168,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" } ], "command": [ @@ -36453,7 +35417,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -36560,7 +35524,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -36656,7 +35620,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -36753,7 +35717,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -36850,7 +35814,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" } ], "command": [ @@ -36942,7 +35906,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -37039,7 +36003,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" } ], "command": [ @@ -37131,7 +36095,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -37228,7 +36192,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -37325,7 +36289,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" } ], "command": [ @@ -37417,7 +36381,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -37514,99 +36478,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" - } - ], - "command": [ - "cipd_bin_packages/vpython3${EXECUTABLE_SUFFIX}", - "-u", - "skia/infra/bots/run_recipe.py", - "${ISOLATED_OUTDIR}", - "skpbench", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Vulkan_AllPathsVolatile_Skpbench\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", - "skia" - ], - "dependencies": [ - "Build-Win-Clang-x86_64-Release-Vulkan", - "Housekeeper-PerCommit-BundleRecipes" - ], - "dimensions": [ - "gpu:10de:1cb3-30.0.15.1179", - "os:Windows-10-19043", - "pool:Skia" - ], - "environment": { - "RECIPES_USE_PY3": "true", - "VPYTHON_LOG_TRACE": "1" - }, - "env_prefixes": { - "PATH": [ - "cipd_bin_packages/cpython3", - "cipd_bin_packages/cpython3/bin", - "cipd_bin_packages", - "cipd_bin_packages/bin" - ], - "VPYTHON_DEFAULT_SPEC": [ - "skia/.vpython" - ], - "VPYTHON_VIRTUALENV_ROOT": [ - "cache/vpython" - ] - }, - "execution_timeout_ns": 14400000000000, - "expiration_ns": 72000000000000, - "extra_tags": { - "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" - }, - "io_timeout_ns": 14400000000000, - "max_attempts": 2, - "outputs": [ - "perf" - ] - }, - "Perf-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Vulkan_Skpbench": { - "caches": [ - { - "name": "vpython", - "path": "cache/vpython" - } - ], - "casSpec": "skpbench", - "cipd_packages": [ - { - "name": "infra/3pp/tools/cpython3/windows-amd64", - "path": "cipd_bin_packages/cpython3", - "version": "version:2@3.8.10.chromium.19" - }, - { - "name": "infra/tools/luci-auth/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/kitchen/${platform}", - "path": ".", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/vpython-native/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/vpython/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "skia/bots/mskp", - "path": "mskp", - "version": "version:5" - }, - { - "name": "skia/bots/skp", - "path": "skp", - "version": "version:432" + "version": "version:438" } ], "command": [ @@ -37615,7 +36487,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "skpbench", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Vulkan_Skpbench\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Vulkan_AllPathsVolatile_Skpbench\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ @@ -37656,7 +36528,7 @@ "perf" ] }, - "Perf-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Vulkan_Skpbench_DDLTotal_9x9": { + "Perf-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Vulkan_Skpbench": { "caches": [ { "name": "vpython", @@ -37698,7 +36570,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" } ], "command": [ @@ -37707,7 +36579,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "skpbench", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Vulkan_Skpbench_DDLTotal_9x9\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Vulkan_Skpbench\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ @@ -37748,14 +36620,14 @@ "perf" ] }, - "Perf-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All": { + "Perf-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Vulkan_Skpbench_DDLTotal_9x9": { "caches": [ { "name": "vpython", "path": "cache/vpython" } ], - "casSpec": "perf", + "casSpec": "skpbench", "cipd_packages": [ { "name": "infra/3pp/tools/cpython3/windows-amd64", @@ -37783,19 +36655,14 @@ "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, { - "name": "skia/bots/skimage", - "path": "skimage", - "version": "version:47" + "name": "skia/bots/mskp", + "path": "mskp", + "version": "version:5" }, { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" - }, - { - "name": "skia/bots/svg", - "path": "svg", - "version": "version:14" + "version": "version:438" } ], "command": [ @@ -37803,17 +36670,17 @@ "-u", "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", - "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"srgb-gl\\\",\\\"narrow-gl\\\",\\\"--internalSamples\\\",\\\"8\\\",\\\"--match\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIrisXe\\\",\\\"model\\\",\\\"NUC11TZi5\\\",\\\"os\\\",\\\"Win10\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "skpbench", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Vulkan_Skpbench_DDLTotal_9x9\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ - "Build-Win-Clang-x86_64-Release", + "Build-Win-Clang-x86_64-Release-Vulkan", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:8086:9a49-31.0.101.3959", - "os:Windows-10-19045", + "gpu:10de:1cb3-30.0.15.1179", + "os:Windows-10-19043", "pool:Skia" ], "environment": { @@ -37845,7 +36712,7 @@ "perf" ] }, - "Perf-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-ANGLE": { + "Perf-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -37887,7 +36754,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -37901,15 +36768,15 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "perf", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-ANGLE\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--allowMSAAOnNewIntel\\\",\\\"true\\\",\\\"--config\\\",\\\"angle_d3d11_es2\\\",\\\"angle_d3d11_es3\\\",\\\"angle_d3d11_es2_msaa8\\\",\\\"angle_d3d11_es3_msaa8\\\",\\\"--internalSamples\\\",\\\"8\\\",\\\"--match\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIrisXe\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"NUC11TZi5\\\",\\\"os\\\",\\\"Win10\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All\",\"do_upload\":\"true\",\"nanobench_flags\":\"[\\\"nanobench\\\",\\\"--pre_log\\\",\\\"--gpuStatsDump\\\",\\\"true\\\",\\\"--scales\\\",\\\"1.0\\\",\\\"1.1\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"srgb-gl\\\",\\\"narrow-gl\\\",\\\"--internalSamples\\\",\\\"8\\\",\\\"--match\\\",\\\"~inc0.gif\\\",\\\"~inc1.gif\\\",\\\"~incInterlaced.gif\\\",\\\"~inc0.jpg\\\",\\\"~incGray.jpg\\\",\\\"~inc0.wbmp\\\",\\\"~inc1.wbmp\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"~inc0.ico\\\",\\\"~inc1.ico\\\",\\\"~inc0.png\\\",\\\"~inc1.png\\\",\\\"~inc2.png\\\",\\\"~inc12.png\\\",\\\"~inc13.png\\\",\\\"~inc14.png\\\",\\\"~inc0.webp\\\",\\\"~inc1.webp\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIrisXe\\\",\\\"model\\\",\\\"NUC11TZi5\\\",\\\"os\\\",\\\"Win10\\\"]\",\"nanobench_properties\":\"{\\\"gitHash\\\":\\\"<(REVISION)\\\",\\\"issue\\\":\\\"<(ISSUE)\\\",\\\"patch_storage\\\":\\\"<(PATCH_STORAGE)\\\",\\\"patchset\\\":\\\"<(PATCHSET)\\\",\\\"swarming_bot_id\\\":\\\"${SWARMING_BOT_ID}\\\",\\\"swarming_task_id\\\":\\\"${SWARMING_TASK_ID}\\\"}\",\"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\":\"perf\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ - "Build-Win-Clang-x86_64-Release-ANGLE", + "Build-Win-Clang-x86_64-Release", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:8086:9a49-31.0.101.3959", + "gpu:8086:9a49-31.0.101.4338", "os:Windows-10-19045", "pool:Skia" ], @@ -37984,7 +36851,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -38006,7 +36873,7 @@ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:8086:9a49-31.0.101.3959", + "gpu:8086:9a49-31.0.101.4338", "os:Windows-10-19045", "pool:Skia" ], @@ -38081,7 +36948,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -38178,7 +37045,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -38275,7 +37142,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -38372,7 +37239,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -38469,7 +37336,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -38566,7 +37433,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -38663,7 +37530,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -38760,7 +37627,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -38857,7 +37724,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -38879,7 +37746,7 @@ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:2489-31.0.15.1694", + "gpu:10de:2489-31.0.15.3667", "os:Windows-10-19045", "pool:Skia" ], @@ -38954,7 +37821,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -38976,7 +37843,7 @@ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:2489-31.0.15.1694", + "gpu:10de:2489-31.0.15.3667", "os:Windows-10-19045", "pool:Skia" ], @@ -39051,7 +37918,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -39148,7 +38015,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -39245,7 +38112,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -39342,7 +38209,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -39439,7 +38306,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -39536,7 +38403,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -39633,7 +38500,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -39730,7 +38597,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -39827,7 +38694,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -39924,7 +38791,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -39946,7 +38813,7 @@ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:1401-31.0.15.1694", + "gpu:10de:1401-31.0.15.3667", "os:Windows-10-19045", "pool:Skia" ], @@ -40021,7 +38888,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -40043,7 +38910,7 @@ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:1401-31.0.15.1694", + "gpu:10de:1401-31.0.15.3667", "os:Windows-10-19045", "pool:Skia" ], @@ -40118,7 +38985,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -40140,7 +39007,7 @@ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:1401-31.0.15.1694", + "gpu:10de:1401-31.0.15.3667", "os:Windows-10-19045", "pool:Skia" ], @@ -40215,7 +39082,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -40312,7 +39179,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -40409,7 +39276,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -41696,7 +40563,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_NativeFonts\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"MaliG77\\\",\\\"extra_config\\\",\\\"Android_NativeFonts\\\",\\\"model\\\",\\\"GalaxyS20\\\",\\\"os\\\",\\\"Android\\\",\\\"style\\\",\\\"default\\\",\\\"--createProtected\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"ProcessorCloneTest\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GrStyledShape\\\",\\\"_\\\",\\\"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\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_NativeFonts\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_NativeFonts\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"MaliG77\\\",\\\"extra_config\\\",\\\"Android_NativeFonts\\\",\\\"model\\\",\\\"GalaxyS20\\\",\\\"os\\\",\\\"Android\\\",\\\"style\\\",\\\"default\\\",\\\"--createProtected\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"ProcessorCloneTest\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GrStyledShape\\\",\\\"_\\\",\\\"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\\\",\\\"--nativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_NativeFonts\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ @@ -48009,7 +46876,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -48114,7 +46981,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -48219,7 +47086,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -48322,7 +47189,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -48427,7 +47294,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -48441,7 +47308,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-BonusConfigs\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"extra_config\\\",\\\"BonusConfigs\\\",\\\"model\\\",\\\"GCE\\\",\\\"os\\\",\\\"Debian10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"r8\\\",\\\"565\\\",\\\"pic-8888\\\",\\\"serialize-8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"--skip\\\",\\\"r8\\\",\\\"image\\\",\\\"_\\\",\\\"_\\\",\\\"r8\\\",\\\"colorImage\\\",\\\"_\\\",\\\"_\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"strict_constraint_batch_no_red_allowed\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"strict_constraint_no_red_allowed\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fast_constraint_red_is_allowed\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"c_gms\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"colortype\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"colortype_xfermodes\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"drawfilter\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_bounds_0.75_0\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_bounds_1_-0.25\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_bounds\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_match\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_iter\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemasksubset\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"wacky_yuv_formats_domain\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter_crop\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter_crop_ref\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter_ref\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"bitmapfilters\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"bitmapshaders\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"convex_poly_clip\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"extractalpha\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"filterbitmap_checkerboard_32_32_g8\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"filterbitmap_image_mandrill_64\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"shadows\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"simpleaaclip_aaclip\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"composeshader_bitmap\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"scaled_tilemodes_npot\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"scaled_tilemodes\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"typefacerendering_pfaMac\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"parsedpaths\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"ImageGeneratorExternal_rect\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"ImageGeneratorExternal_shader\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"shadow_utils\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"graphitestart\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"persp_images\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"all_bitmap_configs\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"makecolorspace\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"readpixels\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"draw_image_set_rect_to_rect\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"draw_image_set_alpha_only\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"compositor_quads_shader\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"wacky_yuv_formats_qtr\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"runtime_effect_image\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"ctmpatheffect\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image_out_of_gamut\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"analytic_antialias_convex\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"drawfilter\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-picture\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-picture\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-raster\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-raster\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-ctable\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-ctable\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"complexclip4_bw\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"complexclip4_bw\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"complexclip4_aa\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"complexclip4_aa\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"p3\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"p3\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up_large\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up_large\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_down\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_down\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_up\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_up\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_down\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_down\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_rose\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_rose\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_no_bleed\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_no_bleed\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_alpha_type\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_alpha_type\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-BonusConfigs\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-BonusConfigs\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"extra_config\\\",\\\"BonusConfigs\\\",\\\"model\\\",\\\"GCE\\\",\\\"os\\\",\\\"Debian10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"r8\\\",\\\"565\\\",\\\"pic-8888\\\",\\\"serialize-8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"--skip\\\",\\\"r8\\\",\\\"image\\\",\\\"_\\\",\\\"_\\\",\\\"r8\\\",\\\"colorImage\\\",\\\"_\\\",\\\"_\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"strict_constraint_batch_no_red_allowed\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"strict_constraint_no_red_allowed\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fast_constraint_red_is_allowed\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"c_gms\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"colortype\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"colortype_xfermodes\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"drawfilter\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_bounds_0.75_0\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_bounds_1_-0.25\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_bounds\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_match\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_iter\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemasksubset\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"wacky_yuv_formats_domain\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter_crop\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter_crop_ref\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter_ref\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagefilterstransformed\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"bitmapfilters\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"bitmapshaders\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"convex_poly_clip\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"extractalpha\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"filterbitmap_checkerboard_32_32_g8\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"filterbitmap_image_mandrill_64\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"shadows\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"simpleaaclip_aaclip\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"composeshader_bitmap\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"scaled_tilemodes_npot\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"scaled_tilemodes\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"typefacerendering_pfaMac\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"parsedpaths\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"ImageGeneratorExternal_rect\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"ImageGeneratorExternal_shader\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"shadow_utils\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"graphitestart\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"persp_images\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"all_bitmap_configs\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"makecolorspace\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"readpixels\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"draw_image_set_rect_to_rect\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"draw_image_set_alpha_only\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"compositor_quads_shader\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"wacky_yuv_formats_qtr\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"runtime_effect_image\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"ctmpatheffect\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image_out_of_gamut\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"analytic_antialias_convex\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"perlinnoise_layered\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"perlinnoise_layered\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"drawfilter\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-picture\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-picture\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-raster\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-raster\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-ctable\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-ctable\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"complexclip4_bw\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"complexclip4_bw\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"complexclip4_aa\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"complexclip4_aa\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"p3\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"p3\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up_large\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up_large\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_down\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_down\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_up\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_up\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_down\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_down\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_rose\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_rose\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_no_bleed\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_no_bleed\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_alpha_type\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_alpha_type\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-BonusConfigs\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ @@ -48532,7 +47399,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -48546,7 +47413,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-BonusConfigs_ASAN\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"extra_config\\\",\\\"BonusConfigs_ASAN\\\",\\\"model\\\",\\\"GCE\\\",\\\"os\\\",\\\"Debian10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"r8\\\",\\\"565\\\",\\\"pic-8888\\\",\\\"serialize-8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"--skip\\\",\\\"r8\\\",\\\"image\\\",\\\"_\\\",\\\"_\\\",\\\"r8\\\",\\\"colorImage\\\",\\\"_\\\",\\\"_\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"strict_constraint_batch_no_red_allowed\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"strict_constraint_no_red_allowed\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fast_constraint_red_is_allowed\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"c_gms\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"colortype\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"colortype_xfermodes\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"drawfilter\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_bounds_0.75_0\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_bounds_1_-0.25\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_bounds\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_match\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_iter\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemasksubset\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"wacky_yuv_formats_domain\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter_crop\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter_crop_ref\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter_ref\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"bitmapfilters\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"bitmapshaders\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"convex_poly_clip\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"extractalpha\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"filterbitmap_checkerboard_32_32_g8\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"filterbitmap_image_mandrill_64\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"shadows\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"simpleaaclip_aaclip\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"composeshader_bitmap\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"scaled_tilemodes_npot\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"scaled_tilemodes\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"typefacerendering_pfaMac\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"parsedpaths\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"ImageGeneratorExternal_rect\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"ImageGeneratorExternal_shader\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"shadow_utils\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"graphitestart\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"persp_images\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"all_bitmap_configs\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"makecolorspace\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"readpixels\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"draw_image_set_rect_to_rect\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"draw_image_set_alpha_only\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"compositor_quads_shader\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"wacky_yuv_formats_qtr\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"runtime_effect_image\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"ctmpatheffect\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image_out_of_gamut\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"analytic_antialias_convex\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"drawfilter\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-picture\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-picture\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-raster\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-raster\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-ctable\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-ctable\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"complexclip4_bw\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"complexclip4_bw\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"complexclip4_aa\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"complexclip4_aa\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"p3\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"p3\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up_large\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up_large\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_down\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_down\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_up\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_up\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_down\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_down\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_rose\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_rose\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_no_bleed\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_no_bleed\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_alpha_type\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_alpha_type\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-BonusConfigs_ASAN\\\",\\\"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-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-BonusConfigs_ASAN\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"extra_config\\\",\\\"BonusConfigs_ASAN\\\",\\\"model\\\",\\\"GCE\\\",\\\"os\\\",\\\"Debian10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"r8\\\",\\\"565\\\",\\\"pic-8888\\\",\\\"serialize-8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"--skip\\\",\\\"r8\\\",\\\"image\\\",\\\"_\\\",\\\"_\\\",\\\"r8\\\",\\\"colorImage\\\",\\\"_\\\",\\\"_\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"strict_constraint_batch_no_red_allowed\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"strict_constraint_no_red_allowed\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fast_constraint_red_is_allowed\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"c_gms\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"colortype\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"colortype_xfermodes\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"drawfilter\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_bounds_0.75_0\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_bounds_1_-0.25\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_bounds\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_match\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_iter\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemasksubset\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"wacky_yuv_formats_domain\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter_crop\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter_crop_ref\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter_ref\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagefilterstransformed\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"bitmapfilters\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"bitmapshaders\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"convex_poly_clip\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"extractalpha\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"filterbitmap_checkerboard_32_32_g8\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"filterbitmap_image_mandrill_64\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"shadows\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"simpleaaclip_aaclip\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"composeshader_bitmap\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"scaled_tilemodes_npot\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"scaled_tilemodes\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"typefacerendering_pfaMac\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"parsedpaths\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"ImageGeneratorExternal_rect\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"ImageGeneratorExternal_shader\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"shadow_utils\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"graphitestart\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"persp_images\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"all_bitmap_configs\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"makecolorspace\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"readpixels\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"draw_image_set_rect_to_rect\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"draw_image_set_alpha_only\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"compositor_quads_shader\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"wacky_yuv_formats_qtr\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"runtime_effect_image\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"ctmpatheffect\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image_out_of_gamut\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"analytic_antialias_convex\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"perlinnoise_layered\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"perlinnoise_layered\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"drawfilter\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-picture\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-picture\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-raster\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-raster\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-ctable\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-ctable\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"complexclip4_bw\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"complexclip4_bw\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"complexclip4_aa\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"complexclip4_aa\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"p3\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"p3\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up_large\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up_large\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_down\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_down\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_up\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_up\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_down\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_down\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_rose\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_rose\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_no_bleed\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_no_bleed\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_alpha_type\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_alpha_type\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-BonusConfigs_ASAN\\\",\\\"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": [ @@ -48635,7 +47502,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -48738,7 +47605,12 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" + }, + { + "name": "skia/bots/skparagraph", + "path": "skia/resources/extra_fonts", + "version": "version:4" }, { "name": "skia/bots/svg", @@ -48752,7 +47624,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-NativeFonts\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"extra_config\\\",\\\"NativeFonts\\\",\\\"model\\\",\\\"GCE\\\",\\\"os\\\",\\\"Debian10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-NativeFonts\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-NativeFonts\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"extra_config\\\",\\\"NativeFonts\\\",\\\"model\\\",\\\"GCE\\\",\\\"os\\\",\\\"Debian10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"--nativeFonts\\\",\\\"--paragraph_fonts\\\",\\\"extra_fonts\\\",\\\"--norun_paragraph_tests_needing_system_fonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-NativeFonts\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ @@ -48938,7 +47810,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -49043,7 +47915,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -49148,7 +48020,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -49253,7 +48125,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -49358,7 +48230,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -49463,7 +48335,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -49477,7 +48349,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-BonusConfigs\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"extra_config\\\",\\\"BonusConfigs\\\",\\\"model\\\",\\\"GCE\\\",\\\"os\\\",\\\"Debian10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"r8\\\",\\\"565\\\",\\\"pic-8888\\\",\\\"serialize-8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"--skip\\\",\\\"r8\\\",\\\"image\\\",\\\"_\\\",\\\"_\\\",\\\"r8\\\",\\\"colorImage\\\",\\\"_\\\",\\\"_\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"strict_constraint_batch_no_red_allowed\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"strict_constraint_no_red_allowed\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fast_constraint_red_is_allowed\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"c_gms\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"colortype\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"colortype_xfermodes\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"drawfilter\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_bounds_0.75_0\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_bounds_1_-0.25\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_bounds\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_match\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_iter\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemasksubset\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"wacky_yuv_formats_domain\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter_crop\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter_crop_ref\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter_ref\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"bitmapfilters\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"bitmapshaders\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"convex_poly_clip\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"extractalpha\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"filterbitmap_checkerboard_32_32_g8\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"filterbitmap_image_mandrill_64\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"shadows\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"simpleaaclip_aaclip\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"composeshader_bitmap\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"scaled_tilemodes_npot\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"scaled_tilemodes\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"typefacerendering_pfaMac\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"parsedpaths\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"ImageGeneratorExternal_rect\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"ImageGeneratorExternal_shader\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"shadow_utils\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"graphitestart\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"persp_images\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"all_bitmap_configs\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"makecolorspace\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"readpixels\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"draw_image_set_rect_to_rect\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"draw_image_set_alpha_only\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"compositor_quads_shader\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"wacky_yuv_formats_qtr\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"runtime_effect_image\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"ctmpatheffect\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image_out_of_gamut\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"analytic_antialias_convex\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"drawfilter\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-picture\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-picture\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-raster\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-raster\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-ctable\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-ctable\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"complexclip4_bw\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"complexclip4_bw\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"complexclip4_aa\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"complexclip4_aa\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"p3\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"p3\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up_large\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up_large\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_down\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_down\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_up\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_up\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_down\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_down\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_rose\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_rose\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_no_bleed\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_no_bleed\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_alpha_type\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_alpha_type\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-BonusConfigs\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-BonusConfigs\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"extra_config\\\",\\\"BonusConfigs\\\",\\\"model\\\",\\\"GCE\\\",\\\"os\\\",\\\"Debian10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"r8\\\",\\\"565\\\",\\\"pic-8888\\\",\\\"serialize-8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"--skip\\\",\\\"r8\\\",\\\"image\\\",\\\"_\\\",\\\"_\\\",\\\"r8\\\",\\\"colorImage\\\",\\\"_\\\",\\\"_\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"strict_constraint_batch_no_red_allowed\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"strict_constraint_no_red_allowed\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fast_constraint_red_is_allowed\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"c_gms\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"colortype\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"colortype_xfermodes\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"drawfilter\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_bounds_0.75_0\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_bounds_1_-0.25\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_bounds\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_match\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_iter\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemasksubset\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"wacky_yuv_formats_domain\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter_crop\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter_crop_ref\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter_ref\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagefilterstransformed\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"bitmapfilters\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"bitmapshaders\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"convex_poly_clip\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"extractalpha\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"filterbitmap_checkerboard_32_32_g8\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"filterbitmap_image_mandrill_64\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"shadows\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"simpleaaclip_aaclip\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"composeshader_bitmap\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"scaled_tilemodes_npot\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"scaled_tilemodes\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"typefacerendering_pfaMac\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"parsedpaths\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"ImageGeneratorExternal_rect\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"ImageGeneratorExternal_shader\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"shadow_utils\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"graphitestart\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"persp_images\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"all_bitmap_configs\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"makecolorspace\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"readpixels\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"draw_image_set_rect_to_rect\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"draw_image_set_alpha_only\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"compositor_quads_shader\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"wacky_yuv_formats_qtr\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"runtime_effect_image\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"ctmpatheffect\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image_out_of_gamut\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"analytic_antialias_convex\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"perlinnoise_layered\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"perlinnoise_layered\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"drawfilter\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-picture\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-picture\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-raster\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-raster\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-ctable\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-ctable\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"complexclip4_bw\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"complexclip4_bw\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"complexclip4_aa\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"complexclip4_aa\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"p3\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"p3\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up_large\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up_large\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_down\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_down\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_up\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_up\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_down\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_down\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_rose\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_rose\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_no_bleed\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_no_bleed\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_alpha_type\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_alpha_type\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-BonusConfigs\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ @@ -49568,7 +48440,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -49673,7 +48545,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -49731,6 +48603,109 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, + "Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-MSAN": { + "caches": [ + { + "name": "vpython", + "path": "cache/vpython" + } + ], + "casSpec": "test", + "cipd_packages": [ + { + "name": "infra/3pp/tools/cpython3/linux-amd64", + "path": "cipd_bin_packages/cpython3", + "version": "version:2@3.8.10.chromium.19" + }, + { + "name": "infra/tools/luci-auth/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/kitchen/${platform}", + "path": ".", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/vpython-native/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/vpython/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "skia/bots/clang_linux", + "path": "clang_linux", + "version": "version:30" + }, + { + "name": "skia/bots/skimage", + "path": "skimage", + "version": "version:47" + }, + { + "name": "skia/bots/skp", + "path": "skp", + "version": "version:438" + }, + { + "name": "skia/bots/svg", + "path": "svg", + "version": "version:14" + } + ], + "command": [ + "cipd_bin_packages/vpython3${EXECUTABLE_SUFFIX}", + "-u", + "skia/infra/bots/run_recipe.py", + "${ISOLATED_OUTDIR}", + "test", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-MSAN\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"extra_config\\\",\\\"MSAN\\\",\\\"model\\\",\\\"GCE\\\",\\\"os\\\",\\\"Debian10\\\",\\\"style\\\",\\\"default\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"--skip\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"--match\\\",\\\"~Once\\\",\\\"~Shared\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-MSAN\\\",\\\"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": [ + "Build-Debian10-Clang-x86_64-Release-MSAN", + "Housekeeper-PerCommit-BundleRecipes" + ], + "dimensions": [ + "cpu:x86-64-Haswell_GCE", + "machine_type:n1-standard-16", + "os:Debian-10.3", + "pool:Skia" + ], + "environment": { + "RECIPES_USE_PY3": "true", + "VPYTHON_LOG_TRACE": "1" + }, + "env_prefixes": { + "PATH": [ + "cipd_bin_packages/cpython3", + "cipd_bin_packages/cpython3/bin", + "cipd_bin_packages", + "cipd_bin_packages/bin" + ], + "VPYTHON_DEFAULT_SPEC": [ + "skia/.vpython" + ], + "VPYTHON_VIRTUALENV_ROOT": [ + "cache/vpython" + ] + }, + "execution_timeout_ns": 32400000000000, + "expiration_ns": 72000000000000, + "extra_tags": { + "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" + }, + "io_timeout_ns": 32400000000000, + "max_attempts": 1, + "outputs": [ + "test" + ] + }, "Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-SKNX_NO_SIMD": { "caches": [ { @@ -49778,7 +48753,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -49883,7 +48858,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -49988,7 +48963,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -50093,7 +49068,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -50198,7 +49173,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -50302,7 +49277,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -50406,7 +49381,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -50510,7 +49485,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -50614,7 +49589,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -50719,7 +49694,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -50829,7 +49804,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -50843,7 +49818,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD405\\\",\\\"model\\\",\\\"NUC5PPYH\\\",\\\"os\\\",\\\"Debian10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--dontReduceOpsTaskSplitting\\\",\\\"true\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"gles\\\",\\\"glesdft\\\",\\\"gltestthreading\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"lcdblendmodes\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"lcdoverlap\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"textbloblooper\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext_blob_persp\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_subset_rect\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_subset_rect_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"orientation\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"stroketext\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"draw_image_set\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"circular_arcs_stroke_and_fill_round\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"degeneratesegments\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter_crop_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"ovals\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"persp_images\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"rtif_distort\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"teenystrokes\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"texel_subset_linear_mipmap_linear_down\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"texel_subset_linear_mipmap_nearest_down\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"yuv420_odd_dim_repeat\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-conv-01-f.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-displace-01-f.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-offset-01-b.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"gallardo.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"masking-filter-01-f.svg\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Debug-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD405\\\",\\\"model\\\",\\\"NUC5PPYH\\\",\\\"os\\\",\\\"Debian10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--dontReduceOpsTaskSplitting\\\",\\\"true\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"gles\\\",\\\"glesdft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Debug-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ @@ -50938,7 +49913,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -50952,7 +49927,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Debug-All-DDL3_ASAN\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD405\\\",\\\"extra_config\\\",\\\"DDL3_ASAN\\\",\\\"model\\\",\\\"NUC5PPYH\\\",\\\"os\\\",\\\"Debian10\\\",\\\"style\\\",\\\"DDL\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--dontReduceOpsTaskSplitting\\\",\\\"true\\\",\\\"--skpViewportSize\\\",\\\"2048\\\",\\\"--gpuThreads\\\",\\\"0\\\",\\\"--config\\\",\\\"glddl\\\",\\\"--src\\\",\\\"gm\\\",\\\"skp\\\",\\\"--skip\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"lcdblendmodes\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"lcdoverlap\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"textbloblooper\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext_blob_persp\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_subset_rect\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_subset_rect_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"orientation\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"stroketext\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"draw_image_set\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"circular_arcs_stroke_and_fill_round\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"degeneratesegments\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter_crop_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"ovals\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"persp_images\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"rtif_distort\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"teenystrokes\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"texel_subset_linear_mipmap_linear_down\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"texel_subset_linear_mipmap_nearest_down\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"yuv420_odd_dim_repeat\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-conv-01-f.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-displace-01-f.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-offset-01-b.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"gallardo.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"masking-filter-01-f.svg\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Debug-All-DDL3_ASAN\\\",\\\"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-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Debug-All-DDL3_ASAN\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD405\\\",\\\"extra_config\\\",\\\"DDL3_ASAN\\\",\\\"model\\\",\\\"NUC5PPYH\\\",\\\"os\\\",\\\"Debian10\\\",\\\"style\\\",\\\"DDL\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--dontReduceOpsTaskSplitting\\\",\\\"true\\\",\\\"--skpViewportSize\\\",\\\"2048\\\",\\\"--gpuThreads\\\",\\\"0\\\",\\\"--config\\\",\\\"glddl\\\",\\\"--src\\\",\\\"gm\\\",\\\"skp\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Debug-All-DDL3_ASAN\\\",\\\"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": [ @@ -51045,7 +50020,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -51159,7 +50134,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -51173,7 +50148,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Debug-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD405\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"NUC5PPYH\\\",\\\"os\\\",\\\"Debian10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--dontReduceOpsTaskSplitting\\\",\\\"true\\\",\\\"--config\\\",\\\"vk\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"lcdblendmodes\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"lcdoverlap\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"textbloblooper\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext_blob_persp\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_subset_rect\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_subset_rect_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"orientation\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"stroketext\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"draw_image_set\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"circular_arcs_stroke_and_fill_round\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"degeneratesegments\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter_crop_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"ovals\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"persp_images\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"rtif_distort\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"teenystrokes\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"texel_subset_linear_mipmap_linear_down\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"texel_subset_linear_mipmap_nearest_down\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"yuv420_odd_dim_repeat\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-conv-01-f.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-displace-01-f.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-offset-01-b.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"gallardo.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"masking-filter-01-f.svg\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLSwitchDefaultOnly_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"vk\\\",\\\"gm\\\",\\\"_\\\",\\\"skbug_257\\\",\\\"vk\\\",\\\"gm\\\",\\\"_\\\",\\\"filltypespersp\\\",\\\"--match\\\",\\\"~^ClearOp$\\\",\\\"~^CopySurface$\\\",\\\"~^ImageNewShader_GPU$\\\",\\\"~^InitialTextureClear$\\\",\\\"~^PinnedImageTest$\\\",\\\"~^ReadPixels_Gpu$\\\",\\\"~^ReadPixels_Texture$\\\",\\\"~^SRGBReadWritePixels$\\\",\\\"~^VkUploadPixelsTests$\\\",\\\"~^WritePixelsNonTexture_Gpu$\\\",\\\"~^WritePixelsNonTextureMSAA_Gpu$\\\",\\\"~^WritePixels_Gpu$\\\",\\\"~^WritePixelsMSAA_Gpu$\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Debug-All-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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Debug-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD405\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"NUC5PPYH\\\",\\\"os\\\",\\\"Debian10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--dontReduceOpsTaskSplitting\\\",\\\"true\\\",\\\"--config\\\",\\\"vk\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLSwitchDefaultOnly_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"vk\\\",\\\"gm\\\",\\\"_\\\",\\\"skbug_257\\\",\\\"vk\\\",\\\"gm\\\",\\\"_\\\",\\\"filltypespersp\\\",\\\"--match\\\",\\\"~^ClearOp$\\\",\\\"~^CopySurface$\\\",\\\"~^ImageNewShader_GPU$\\\",\\\"~^InitialTextureClear$\\\",\\\"~^PinnedImageTest$\\\",\\\"~^ReadPixels_Gpu$\\\",\\\"~^ReadPixels_Texture$\\\",\\\"~^SRGBReadWritePixels$\\\",\\\"~^VkUploadPixelsTests$\\\",\\\"~^WritePixelsNonTexture_Gpu$\\\",\\\"~^WritePixelsNonTextureMSAA_Gpu$\\\",\\\"~^WritePixels_Gpu$\\\",\\\"~^WritePixelsMSAA_Gpu$\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Debug-All-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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ @@ -51268,7 +50243,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -51282,7 +50257,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD405\\\",\\\"model\\\",\\\"NUC5PPYH\\\",\\\"os\\\",\\\"Debian10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--dontReduceOpsTaskSplitting\\\",\\\"true\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"gles\\\",\\\"glesdft\\\",\\\"gltestthreading\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"lcdblendmodes\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"lcdoverlap\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"textbloblooper\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext_blob_persp\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_subset_rect\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_subset_rect_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"orientation\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"stroketext\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"draw_image_set\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"circular_arcs_stroke_and_fill_round\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"degeneratesegments\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter_crop_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"ovals\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"persp_images\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"rtif_distort\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"teenystrokes\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"texel_subset_linear_mipmap_linear_down\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"texel_subset_linear_mipmap_nearest_down\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"yuv420_odd_dim_repeat\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-conv-01-f.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-displace-01-f.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-offset-01-b.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"gallardo.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"masking-filter-01-f.svg\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD405\\\",\\\"model\\\",\\\"NUC5PPYH\\\",\\\"os\\\",\\\"Debian10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--dontReduceOpsTaskSplitting\\\",\\\"true\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"gles\\\",\\\"glesdft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ @@ -51377,7 +50352,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -51491,7 +50466,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -51505,7 +50480,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD405\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"NUC5PPYH\\\",\\\"os\\\",\\\"Debian10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--dontReduceOpsTaskSplitting\\\",\\\"true\\\",\\\"--config\\\",\\\"vk\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"lcdblendmodes\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"lcdoverlap\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"textbloblooper\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext_blob_persp\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_subset_rect\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_subset_rect_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"orientation\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"stroketext\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"draw_image_set\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"circular_arcs_stroke_and_fill_round\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"degeneratesegments\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter_crop_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"ovals\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"persp_images\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"rtif_distort\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"teenystrokes\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"texel_subset_linear_mipmap_linear_down\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"texel_subset_linear_mipmap_nearest_down\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"yuv420_odd_dim_repeat\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-conv-01-f.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-displace-01-f.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-offset-01-b.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"gallardo.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"masking-filter-01-f.svg\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLSwitchDefaultOnly_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"vk\\\",\\\"gm\\\",\\\"_\\\",\\\"skbug_257\\\",\\\"vk\\\",\\\"gm\\\",\\\"_\\\",\\\"filltypespersp\\\",\\\"--match\\\",\\\"~^ClearOp$\\\",\\\"~^CopySurface$\\\",\\\"~^ImageNewShader_GPU$\\\",\\\"~^InitialTextureClear$\\\",\\\"~^PinnedImageTest$\\\",\\\"~^ReadPixels_Gpu$\\\",\\\"~^ReadPixels_Texture$\\\",\\\"~^SRGBReadWritePixels$\\\",\\\"~^VkUploadPixelsTests$\\\",\\\"~^WritePixelsNonTexture_Gpu$\\\",\\\"~^WritePixelsNonTextureMSAA_Gpu$\\\",\\\"~^WritePixels_Gpu$\\\",\\\"~^WritePixelsMSAA_Gpu$\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All-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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD405\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"NUC5PPYH\\\",\\\"os\\\",\\\"Debian10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--dontReduceOpsTaskSplitting\\\",\\\"true\\\",\\\"--config\\\",\\\"vk\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLSwitchDefaultOnly_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"vk\\\",\\\"gm\\\",\\\"_\\\",\\\"skbug_257\\\",\\\"vk\\\",\\\"gm\\\",\\\"_\\\",\\\"filltypespersp\\\",\\\"--match\\\",\\\"~^ClearOp$\\\",\\\"~^CopySurface$\\\",\\\"~^ImageNewShader_GPU$\\\",\\\"~^InitialTextureClear$\\\",\\\"~^PinnedImageTest$\\\",\\\"~^ReadPixels_Gpu$\\\",\\\"~^ReadPixels_Texture$\\\",\\\"~^SRGBReadWritePixels$\\\",\\\"~^VkUploadPixelsTests$\\\",\\\"~^WritePixelsNonTexture_Gpu$\\\",\\\"~^WritePixelsNonTextureMSAA_Gpu$\\\",\\\"~^WritePixels_Gpu$\\\",\\\"~^WritePixelsMSAA_Gpu$\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All-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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ @@ -51600,7 +50575,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -51614,7 +50589,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Debian10-Clang-NUCDE3815TYKHE-GPU-IntelBayTrail-x86_64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelBayTrail\\\",\\\"model\\\",\\\"NUCDE3815TYKHE\\\",\\\"os\\\",\\\"Debian10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"gles\\\",\\\"glesdft\\\",\\\"gltestthreading\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"lcdblendmodes\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"lcdoverlap\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"textbloblooper\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext_blob_persp\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_subset_rect\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_subset_rect_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"orientation\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"stroketext\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"draw_image_set\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"circular_arcs_stroke_and_fill_round\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"degeneratesegments\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter_crop_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"ovals\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"persp_images\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"rtif_distort\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"teenystrokes\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"texel_subset_linear_mipmap_linear_down\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"texel_subset_linear_mipmap_nearest_down\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"yuv420_odd_dim_repeat\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-conv-01-f.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-displace-01-f.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-offset-01-b.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"gallardo.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"masking-filter-01-f.svg\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian10-Clang-NUCDE3815TYKHE-GPU-IntelBayTrail-x86_64-Debug-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Debian10-Clang-NUCDE3815TYKHE-GPU-IntelBayTrail-x86_64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelBayTrail\\\",\\\"model\\\",\\\"NUCDE3815TYKHE\\\",\\\"os\\\",\\\"Debian10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"gles\\\",\\\"glesdft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian10-Clang-NUCDE3815TYKHE-GPU-IntelBayTrail-x86_64-Debug-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ @@ -51709,7 +50684,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -51723,7 +50698,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Debian10-Clang-NUCDE3815TYKHE-GPU-IntelBayTrail-x86_64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelBayTrail\\\",\\\"model\\\",\\\"NUCDE3815TYKHE\\\",\\\"os\\\",\\\"Debian10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"gles\\\",\\\"glesdft\\\",\\\"gltestthreading\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"lcdblendmodes\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"lcdoverlap\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"textbloblooper\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext_blob_persp\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_subset_rect\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_subset_rect_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"orientation\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"stroketext\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"draw_image_set\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"circular_arcs_stroke_and_fill_round\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"degeneratesegments\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter_crop_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"ovals\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"persp_images\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"rtif_distort\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"teenystrokes\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"texel_subset_linear_mipmap_linear_down\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"texel_subset_linear_mipmap_nearest_down\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"yuv420_odd_dim_repeat\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-conv-01-f.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-displace-01-f.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-offset-01-b.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"gallardo.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"masking-filter-01-f.svg\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian10-Clang-NUCDE3815TYKHE-GPU-IntelBayTrail-x86_64-Release-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Debian10-Clang-NUCDE3815TYKHE-GPU-IntelBayTrail-x86_64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelBayTrail\\\",\\\"model\\\",\\\"NUCDE3815TYKHE\\\",\\\"os\\\",\\\"Debian10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"gles\\\",\\\"glesdft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian10-Clang-NUCDE3815TYKHE-GPU-IntelBayTrail-x86_64-Release-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ @@ -51818,7 +50793,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -51832,7 +50807,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Debian10-Clang-ShuttleA-GPU-IntelHD2000-x86_64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD2000\\\",\\\"model\\\",\\\"ShuttleA\\\",\\\"os\\\",\\\"Debian10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"gles\\\",\\\"glesdft\\\",\\\"gltestthreading\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"lcdblendmodes\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"lcdoverlap\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"textbloblooper\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext_blob_persp\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_subset_rect\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_subset_rect_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"orientation\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"stroketext\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"draw_image_set\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"circular_arcs_stroke_and_fill_round\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"degeneratesegments\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter_crop_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"ovals\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"persp_images\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"rtif_distort\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"teenystrokes\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"texel_subset_linear_mipmap_linear_down\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"texel_subset_linear_mipmap_nearest_down\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"yuv420_odd_dim_repeat\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-conv-01-f.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-displace-01-f.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-offset-01-b.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"gallardo.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"masking-filter-01-f.svg\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian10-Clang-ShuttleA-GPU-IntelHD2000-x86_64-Debug-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Debian10-Clang-ShuttleA-GPU-IntelHD2000-x86_64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD2000\\\",\\\"model\\\",\\\"ShuttleA\\\",\\\"os\\\",\\\"Debian10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"gles\\\",\\\"glesdft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian10-Clang-ShuttleA-GPU-IntelHD2000-x86_64-Debug-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ @@ -51927,7 +50902,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -51941,7 +50916,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Debian10-Clang-ShuttleA-GPU-IntelHD2000-x86_64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD2000\\\",\\\"model\\\",\\\"ShuttleA\\\",\\\"os\\\",\\\"Debian10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"gles\\\",\\\"glesdft\\\",\\\"gltestthreading\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"lcdblendmodes\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"lcdoverlap\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"textbloblooper\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext_blob_persp\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_subset_rect\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_subset_rect_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"orientation\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"stroketext\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"draw_image_set\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"circular_arcs_stroke_and_fill_round\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"degeneratesegments\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter_crop_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"ovals\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"persp_images\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"rtif_distort\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"teenystrokes\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"texel_subset_linear_mipmap_linear_down\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"texel_subset_linear_mipmap_nearest_down\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"yuv420_odd_dim_repeat\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-conv-01-f.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-displace-01-f.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-offset-01-b.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"gallardo.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"masking-filter-01-f.svg\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian10-Clang-ShuttleA-GPU-IntelHD2000-x86_64-Release-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Debian10-Clang-ShuttleA-GPU-IntelHD2000-x86_64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD2000\\\",\\\"model\\\",\\\"ShuttleA\\\",\\\"os\\\",\\\"Debian10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"gles\\\",\\\"glesdft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian10-Clang-ShuttleA-GPU-IntelHD2000-x86_64-Release-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ @@ -52412,7 +51387,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -52426,7 +51401,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Debian11-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIrisXe\\\",\\\"model\\\",\\\"NUC11TZi5\\\",\\\"os\\\",\\\"Debian11\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"gles\\\",\\\"glesdft\\\",\\\"gltestthreading\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"lcdblendmodes\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"lcdoverlap\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"textbloblooper\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext_blob_persp\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_subset_rect\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_subset_rect_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"orientation\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"stroketext\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"draw_image_set\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"circular_arcs_stroke_and_fill_round\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"degeneratesegments\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter_crop_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"ovals\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"persp_images\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"rtif_distort\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"teenystrokes\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"texel_subset_linear_mipmap_linear_down\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"texel_subset_linear_mipmap_nearest_down\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"yuv420_odd_dim_repeat\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-conv-01-f.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-displace-01-f.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-offset-01-b.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"gallardo.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"masking-filter-01-f.svg\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~ReimportImageTextureWithMipLevels\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian11-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Debian11-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIrisXe\\\",\\\"model\\\",\\\"NUC11TZi5\\\",\\\"os\\\",\\\"Debian11\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"gles\\\",\\\"glesdft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"perlinnoise_layered\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~ReimportImageTextureWithMipLevels\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian11-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ @@ -52526,7 +51501,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -52540,7 +51515,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Debian11-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All-ASAN_Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIrisXe\\\",\\\"extra_config\\\",\\\"ASAN_Vulkan\\\",\\\"model\\\",\\\"NUC11TZi5\\\",\\\"os\\\",\\\"Debian11\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"lcdblendmodes\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"lcdoverlap\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"textbloblooper\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext_blob_persp\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_subset_rect\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_subset_rect_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"orientation\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"stroketext\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"draw_image_set\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"circular_arcs_stroke_and_fill_round\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"degeneratesegments\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter_crop_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"ovals\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"persp_images\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"rtif_distort\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"teenystrokes\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"texel_subset_linear_mipmap_linear_down\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"texel_subset_linear_mipmap_nearest_down\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"yuv420_odd_dim_repeat\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-conv-01-f.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-displace-01-f.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-offset-01-b.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"gallardo.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"masking-filter-01-f.svg\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLSwitchDefaultOnly_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~ReimportImageTextureWithMipLevels\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian11-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All-ASAN_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-Debian11-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All-ASAN_Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIrisXe\\\",\\\"extra_config\\\",\\\"ASAN_Vulkan\\\",\\\"model\\\",\\\"NUC11TZi5\\\",\\\"os\\\",\\\"Debian11\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--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\\\",\\\"_\\\",\\\"SkSLSwitchDefaultOnly_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~ReimportImageTextureWithMipLevels\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian11-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All-ASAN_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": [ @@ -52638,7 +51613,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -52652,7 +51627,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Debian11-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All-DDL3_ASAN_Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIrisXe\\\",\\\"extra_config\\\",\\\"DDL3_ASAN_Vulkan\\\",\\\"model\\\",\\\"NUC11TZi5\\\",\\\"os\\\",\\\"Debian11\\\",\\\"style\\\",\\\"DDL\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--skpViewportSize\\\",\\\"2048\\\",\\\"--gpuThreads\\\",\\\"0\\\",\\\"--config\\\",\\\"vkddl\\\",\\\"--src\\\",\\\"gm\\\",\\\"skp\\\",\\\"--skip\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"lcdblendmodes\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"lcdoverlap\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"textbloblooper\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext_blob_persp\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_subset_rect\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_subset_rect_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"orientation\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"stroketext\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"draw_image_set\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"circular_arcs_stroke_and_fill_round\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"degeneratesegments\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter_crop_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"ovals\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"persp_images\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"rtif_distort\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"teenystrokes\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"texel_subset_linear_mipmap_linear_down\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"texel_subset_linear_mipmap_nearest_down\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"yuv420_odd_dim_repeat\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-conv-01-f.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-displace-01-f.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-offset-01-b.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"gallardo.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"masking-filter-01-f.svg\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLSwitchDefaultOnly_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~ReimportImageTextureWithMipLevels\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian11-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All-DDL3_ASAN_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-Debian11-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All-DDL3_ASAN_Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIrisXe\\\",\\\"extra_config\\\",\\\"DDL3_ASAN_Vulkan\\\",\\\"model\\\",\\\"NUC11TZi5\\\",\\\"os\\\",\\\"Debian11\\\",\\\"style\\\",\\\"DDL\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--skpViewportSize\\\",\\\"2048\\\",\\\"--gpuThreads\\\",\\\"0\\\",\\\"--config\\\",\\\"vkddl\\\",\\\"--src\\\",\\\"gm\\\",\\\"skp\\\",\\\"--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\\\",\\\"_\\\",\\\"SkSLSwitchDefaultOnly_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~ReimportImageTextureWithMipLevels\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian11-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All-DDL3_ASAN_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": [ @@ -52750,7 +51725,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -52764,7 +51739,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Debian11-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIrisXe\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"NUC11TZi5\\\",\\\"os\\\",\\\"Debian11\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"lcdblendmodes\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"lcdoverlap\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"textbloblooper\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext_blob_persp\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_subset_rect\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_subset_rect_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"orientation\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"stroketext\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"draw_image_set\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"circular_arcs_stroke_and_fill_round\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"degeneratesegments\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter_crop_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"ovals\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"persp_images\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"rtif_distort\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"teenystrokes\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"texel_subset_linear_mipmap_linear_down\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"texel_subset_linear_mipmap_nearest_down\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"yuv420_odd_dim_repeat\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-conv-01-f.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-displace-01-f.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-offset-01-b.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"gallardo.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"masking-filter-01-f.svg\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLSwitchDefaultOnly_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~ReimportImageTextureWithMipLevels\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian11-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All-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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Debian11-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIrisXe\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"NUC11TZi5\\\",\\\"os\\\",\\\"Debian11\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--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\\\",\\\"_\\\",\\\"SkSLSwitchDefaultOnly_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~ReimportImageTextureWithMipLevels\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian11-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All-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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ @@ -52864,7 +51839,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -52878,7 +51853,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Debian11-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-DDL3_TSAN_Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIrisXe\\\",\\\"extra_config\\\",\\\"DDL3_TSAN_Vulkan\\\",\\\"model\\\",\\\"NUC11TZi5\\\",\\\"os\\\",\\\"Debian11\\\",\\\"style\\\",\\\"DDL\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--skpViewportSize\\\",\\\"2048\\\",\\\"--gpuThreads\\\",\\\"0\\\",\\\"--config\\\",\\\"vkddl\\\",\\\"--src\\\",\\\"gm\\\",\\\"skp\\\",\\\"--skip\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"lcdblendmodes\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"lcdoverlap\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"textbloblooper\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext_blob_persp\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_subset_rect\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_subset_rect_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"orientation\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"stroketext\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"draw_image_set\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"circular_arcs_stroke_and_fill_round\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"degeneratesegments\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter_crop_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"ovals\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"persp_images\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"rtif_distort\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"teenystrokes\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"texel_subset_linear_mipmap_linear_down\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"texel_subset_linear_mipmap_nearest_down\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"yuv420_odd_dim_repeat\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-conv-01-f.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-displace-01-f.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-offset-01-b.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"gallardo.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"masking-filter-01-f.svg\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLSwitchDefaultOnly_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~ReimportImageTextureWithMipLevels\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian11-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-DDL3_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-Debian11-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-DDL3_TSAN_Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIrisXe\\\",\\\"extra_config\\\",\\\"DDL3_TSAN_Vulkan\\\",\\\"model\\\",\\\"NUC11TZi5\\\",\\\"os\\\",\\\"Debian11\\\",\\\"style\\\",\\\"DDL\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--skpViewportSize\\\",\\\"2048\\\",\\\"--gpuThreads\\\",\\\"0\\\",\\\"--config\\\",\\\"vkddl\\\",\\\"--src\\\",\\\"gm\\\",\\\"skp\\\",\\\"--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\\\",\\\"_\\\",\\\"SkSLSwitchDefaultOnly_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~ReimportImageTextureWithMipLevels\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian11-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-DDL3_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": [ @@ -52976,7 +51951,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -52990,7 +51965,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Debian11-Clang-NUC11TZi5-GPU-IntelIrisXe-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\\\",\\\"IntelIrisXe\\\",\\\"extra_config\\\",\\\"TSAN_Vulkan\\\",\\\"model\\\",\\\"NUC11TZi5\\\",\\\"os\\\",\\\"Debian11\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"--skip\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"lcdblendmodes\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"lcdoverlap\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"textbloblooper\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext_blob_persp\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_subset_rect\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"gpu_blur_utils_subset_rect_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"orientation\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"stroketext\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"draw_image_set\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"circular_arcs_stroke_and_fill_round\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"degeneratesegments\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter_crop_ref\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"ovals\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"persp_images\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"rtif_distort\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"teenystrokes\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"texel_subset_linear_mipmap_linear_down\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"texel_subset_linear_mipmap_nearest_down\\\",\\\"gltestthreading\\\",\\\"gm\\\",\\\"_\\\",\\\"yuv420_odd_dim_repeat\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-conv-01-f.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-displace-01-f.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"filters-offset-01-b.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"gallardo.svg\\\",\\\"gltestthreading\\\",\\\"svg\\\",\\\"_\\\",\\\"masking-filter-01-f.svg\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLSwitchDefaultOnly_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~ReimportImageTextureWithMipLevels\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian11-Clang-NUC11TZi5-GPU-IntelIrisXe-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-Debian11-Clang-NUC11TZi5-GPU-IntelIrisXe-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\\\",\\\"IntelIrisXe\\\",\\\"extra_config\\\",\\\"TSAN_Vulkan\\\",\\\"model\\\",\\\"NUC11TZi5\\\",\\\"os\\\",\\\"Debian11\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"--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\\\",\\\"_\\\",\\\"SkSLSwitchDefaultOnly_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~ReimportImageTextureWithMipLevels\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Debian11-Clang-NUC11TZi5-GPU-IntelIrisXe-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": [ @@ -53078,7 +52053,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -53182,7 +52157,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -53284,7 +52259,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -53393,7 +52368,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -53497,7 +52472,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -53599,7 +52574,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -53701,7 +52676,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -53803,7 +52778,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -53907,7 +52882,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -54011,7 +52986,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -54118,7 +53093,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -54227,7 +53202,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -54331,7 +53306,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -54435,7 +53410,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -54539,7 +53514,12 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" + }, + { + "name": "skia/bots/skparagraph", + "path": "skia/resources/extra_fonts", + "version": "version:4" }, { "name": "skia/bots/svg", @@ -54553,7 +53533,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac10.13-Clang-MacBook10.1-GPU-IntelHD615-x86_64-Release-All-NativeFonts\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD615\\\",\\\"extra_config\\\",\\\"NativeFonts\\\",\\\"model\\\",\\\"MacBook10.1\\\",\\\"os\\\",\\\"Mac10.13\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~^SRGBReadWritePixels$\\\",\\\"~^GrMeshTest$\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.13-Clang-MacBook10.1-GPU-IntelHD615-x86_64-Release-All-NativeFonts\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac10.13-Clang-MacBook10.1-GPU-IntelHD615-x86_64-Release-All-NativeFonts\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD615\\\",\\\"extra_config\\\",\\\"NativeFonts\\\",\\\"model\\\",\\\"MacBook10.1\\\",\\\"os\\\",\\\"Mac10.13\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~^SRGBReadWritePixels$\\\",\\\"~^GrMeshTest$\\\",\\\"--nativeFonts\\\",\\\"--paragraph_fonts\\\",\\\"extra_fonts\\\",\\\"--norun_paragraph_tests_needing_system_fonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.13-Clang-MacBook10.1-GPU-IntelHD615-x86_64-Release-All-NativeFonts\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ @@ -54643,7 +53623,12 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" + }, + { + "name": "skia/bots/skparagraph", + "path": "skia/resources/extra_fonts", + "version": "version:4" }, { "name": "skia/bots/svg", @@ -54657,7 +53642,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac10.13-Clang-MacBookPro11.5-CPU-AVX2-x86_64-Debug-All-NativeFonts\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"extra_config\\\",\\\"NativeFonts\\\",\\\"model\\\",\\\"MacBookPro11.5\\\",\\\"os\\\",\\\"Mac10.13\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.13-Clang-MacBookPro11.5-CPU-AVX2-x86_64-Debug-All-NativeFonts\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac10.13-Clang-MacBookPro11.5-CPU-AVX2-x86_64-Debug-All-NativeFonts\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"extra_config\\\",\\\"NativeFonts\\\",\\\"model\\\",\\\"MacBookPro11.5\\\",\\\"os\\\",\\\"Mac10.13\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"--nativeFonts\\\",\\\"--paragraph_fonts\\\",\\\"extra_fonts\\\",\\\"--norun_paragraph_tests_needing_system_fonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.13-Clang-MacBookPro11.5-CPU-AVX2-x86_64-Debug-All-NativeFonts\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ @@ -54747,7 +53732,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -54851,7 +53836,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -54950,7 +53935,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -55052,7 +54037,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -55151,7 +54136,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -55253,7 +54238,12 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" + }, + { + "name": "skia/bots/skparagraph", + "path": "skia/resources/extra_fonts", + "version": "version:4" }, { "name": "skia/bots/svg", @@ -55267,7 +54257,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac10.13-Clang-MacMini7.1-CPU-AVX2-x86_64-Debug-All-NativeFonts\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"extra_config\\\",\\\"NativeFonts\\\",\\\"model\\\",\\\"MacMini7.1\\\",\\\"os\\\",\\\"Mac10.13\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.13-Clang-MacMini7.1-CPU-AVX2-x86_64-Debug-All-NativeFonts\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac10.13-Clang-MacMini7.1-CPU-AVX2-x86_64-Debug-All-NativeFonts\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"extra_config\\\",\\\"NativeFonts\\\",\\\"model\\\",\\\"MacMini7.1\\\",\\\"os\\\",\\\"Mac10.13\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"--nativeFonts\\\",\\\"--paragraph_fonts\\\",\\\"extra_fonts\\\",\\\"--norun_paragraph_tests_needing_system_fonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.13-Clang-MacMini7.1-CPU-AVX2-x86_64-Debug-All-NativeFonts\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ @@ -55357,7 +54347,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -55462,7 +54452,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -55567,7 +54557,12 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" + }, + { + "name": "skia/bots/skparagraph", + "path": "skia/resources/extra_fonts", + "version": "version:4" }, { "name": "skia/bots/svg", @@ -55581,7 +54576,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac10.13-Clang-VMware7.1-CPU-AVX-x86_64-Debug-All-NativeFonts\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX\\\",\\\"extra_config\\\",\\\"NativeFonts\\\",\\\"model\\\",\\\"VMware7.1\\\",\\\"os\\\",\\\"Mac10.13\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.13-Clang-VMware7.1-CPU-AVX-x86_64-Debug-All-NativeFonts\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac10.13-Clang-VMware7.1-CPU-AVX-x86_64-Debug-All-NativeFonts\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX\\\",\\\"extra_config\\\",\\\"NativeFonts\\\",\\\"model\\\",\\\"VMware7.1\\\",\\\"os\\\",\\\"Mac10.13\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"--nativeFonts\\\",\\\"--paragraph_fonts\\\",\\\"extra_fonts\\\",\\\"--norun_paragraph_tests_needing_system_fonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.13-Clang-VMware7.1-CPU-AVX-x86_64-Debug-All-NativeFonts\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ @@ -55671,7 +54666,12 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" + }, + { + "name": "skia/bots/skparagraph", + "path": "skia/resources/extra_fonts", + "version": "version:4" }, { "name": "skia/bots/svg", @@ -55685,7 +54685,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac10.14-Clang-MacMini7.1-CPU-AVX2-x86_64-Debug-All-NativeFonts\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"extra_config\\\",\\\"NativeFonts\\\",\\\"model\\\",\\\"MacMini7.1\\\",\\\"os\\\",\\\"Mac10.14\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.14-Clang-MacMini7.1-CPU-AVX2-x86_64-Debug-All-NativeFonts\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac10.14-Clang-MacMini7.1-CPU-AVX2-x86_64-Debug-All-NativeFonts\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"extra_config\\\",\\\"NativeFonts\\\",\\\"model\\\",\\\"MacMini7.1\\\",\\\"os\\\",\\\"Mac10.14\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"--nativeFonts\\\",\\\"--paragraph_fonts\\\",\\\"extra_fonts\\\",\\\"--norun_paragraph_tests_needing_system_fonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.14-Clang-MacMini7.1-CPU-AVX2-x86_64-Debug-All-NativeFonts\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ @@ -55775,7 +54775,12 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" + }, + { + "name": "skia/bots/skparagraph", + "path": "skia/resources/extra_fonts", + "version": "version:4" }, { "name": "skia/bots/svg", @@ -55789,7 +54794,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac10.14-Clang-VMware7.1-CPU-AVX-x86_64-Debug-All-NativeFonts\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX\\\",\\\"extra_config\\\",\\\"NativeFonts\\\",\\\"model\\\",\\\"VMware7.1\\\",\\\"os\\\",\\\"Mac10.14\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.14-Clang-VMware7.1-CPU-AVX-x86_64-Debug-All-NativeFonts\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac10.14-Clang-VMware7.1-CPU-AVX-x86_64-Debug-All-NativeFonts\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX\\\",\\\"extra_config\\\",\\\"NativeFonts\\\",\\\"model\\\",\\\"VMware7.1\\\",\\\"os\\\",\\\"Mac10.14\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"--nativeFonts\\\",\\\"--paragraph_fonts\\\",\\\"extra_fonts\\\",\\\"--norun_paragraph_tests_needing_system_fonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.14-Clang-VMware7.1-CPU-AVX-x86_64-Debug-All-NativeFonts\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ @@ -55879,7 +54884,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -55978,7 +54983,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -56080,7 +55085,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -56184,7 +55189,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -56288,7 +55293,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -56345,111 +55350,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Mac10.15.1-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Debug-All-NativeFonts": { - "caches": [ - { - "name": "vpython", - "path": "cache/vpython" - } - ], - "casSpec": "test", - "cipd_packages": [ - { - "name": "infra/3pp/tools/cpython3/mac-amd64", - "path": "cipd_bin_packages/cpython3", - "version": "version:2@3.8.10.chromium.19" - }, - { - "name": "infra/tools/luci-auth/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/kitchen/${platform}", - "path": ".", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/vpython-native/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/vpython/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "skia/bots/gsutil", - "path": "gsutil", - "version": "version:0" - }, - { - "name": "skia/bots/skimage", - "path": "skimage", - "version": "version:47" - }, - { - "name": "skia/bots/skp", - "path": "skp", - "version": "version:432" - }, - { - "name": "skia/bots/svg", - "path": "svg", - "version": "version:14" - } - ], - "command": [ - "cipd_bin_packages/vpython3${EXECUTABLE_SUFFIX}", - "-u", - "skia/infra/bots/run_recipe.py", - "${ISOLATED_OUTDIR}", - "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac10.15.1-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Debug-All-NativeFonts\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD6000\\\",\\\"extra_config\\\",\\\"NativeFonts\\\",\\\"model\\\",\\\"MacBookAir7.2\\\",\\\"os\\\",\\\"Mac10.15.1\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLoopFloat_GPU\\\",\\\"--match\\\",\\\"~^ProcessorCloneTest$\\\",\\\"~^GrMeshTest$\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.15.1-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Debug-All-NativeFonts\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Mac-Clang-x86_64-Debug", - "Housekeeper-PerCommit-BundleRecipes" - ], - "dimensions": [ - "gpu:8086:1626", - "os:Mac-10.15.1", - "pool:Skia" - ], - "environment": { - "RECIPES_USE_PY3": "true", - "VPYTHON_LOG_TRACE": "1" - }, - "env_prefixes": { - "PATH": [ - "gsutil/gsutil", - "cipd_bin_packages/cpython3", - "cipd_bin_packages/cpython3/bin", - "cipd_bin_packages", - "cipd_bin_packages/bin" - ], - "VPYTHON_DEFAULT_SPEC": [ - "skia/.vpython" - ], - "VPYTHON_VIRTUALENV_ROOT": [ - "cache/vpython" - ] - }, - "execution_timeout_ns": 14400000000000, - "expiration_ns": 72000000000000, - "extra_tags": { - "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" - }, - "io_timeout_ns": 14400000000000, - "max_attempts": 2, - "outputs": [ - "test" - ], - "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" - }, - "Test-Mac10.15.1-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Release-All": { + "Test-Mac10.15.1-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Debug-All-NativeFonts": { "caches": [ { "name": "vpython", @@ -56496,7 +55397,12 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" + }, + { + "name": "skia/bots/skparagraph", + "path": "skia/resources/extra_fonts", + "version": "version:4" }, { "name": "skia/bots/svg", @@ -56510,11 +55416,11 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac10.15.1-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD6000\\\",\\\"model\\\",\\\"MacBookAir7.2\\\",\\\"os\\\",\\\"Mac10.15.1\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLoopFloat_GPU\\\",\\\"--match\\\",\\\"~^ProcessorCloneTest$\\\",\\\"~^GrMeshTest$\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.15.1-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Release-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac10.15.1-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Debug-All-NativeFonts\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD6000\\\",\\\"extra_config\\\",\\\"NativeFonts\\\",\\\"model\\\",\\\"MacBookAir7.2\\\",\\\"os\\\",\\\"Mac10.15.1\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLoopFloat_GPU\\\",\\\"--match\\\",\\\"~^ProcessorCloneTest$\\\",\\\"~^GrMeshTest$\\\",\\\"--nativeFonts\\\",\\\"--paragraph_fonts\\\",\\\"extra_fonts\\\",\\\"--norun_paragraph_tests_needing_system_fonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.15.1-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Debug-All-NativeFonts\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Mac-Clang-x86_64-Release", + "Build-Mac-Clang-x86_64-Debug", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ @@ -56553,7 +55459,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Mac10.15.1-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Release-All-DDL1_Metal": { + "Test-Mac10.15.1-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -56600,7 +55506,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -56614,11 +55520,11 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac10.15.1-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Release-All-DDL1_Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD6000\\\",\\\"extra_config\\\",\\\"DDL1_Metal\\\",\\\"model\\\",\\\"MacBookAir7.2\\\",\\\"os\\\",\\\"Mac10.15.1\\\",\\\"style\\\",\\\"DDL\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--skpViewportSize\\\",\\\"2048\\\",\\\"--config\\\",\\\"mtl\\\",\\\"--src\\\",\\\"gm\\\",\\\"skp\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLIntrinsicNot_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicMixFloatES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLoopFloat_GPU\\\",\\\"--match\\\",\\\"~^ProcessorCloneTest$\\\",\\\"~^GrMeshTest$\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.15.1-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Release-All-DDL1_Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac10.15.1-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD6000\\\",\\\"model\\\",\\\"MacBookAir7.2\\\",\\\"os\\\",\\\"Mac10.15.1\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLoopFloat_GPU\\\",\\\"--match\\\",\\\"~^ProcessorCloneTest$\\\",\\\"~^GrMeshTest$\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.15.1-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Release-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Mac-Clang-x86_64-Release-Metal", + "Build-Mac-Clang-x86_64-Release", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ @@ -56657,7 +55563,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Mac10.15.1-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Release-All-DDL3_Metal": { + "Test-Mac10.15.1-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Release-All-DDL1_Metal": { "caches": [ { "name": "vpython", @@ -56704,7 +55610,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -56718,7 +55624,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac10.15.1-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Release-All-DDL3_Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD6000\\\",\\\"extra_config\\\",\\\"DDL3_Metal\\\",\\\"model\\\",\\\"MacBookAir7.2\\\",\\\"os\\\",\\\"Mac10.15.1\\\",\\\"style\\\",\\\"DDL\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--skpViewportSize\\\",\\\"2048\\\",\\\"--gpuThreads\\\",\\\"0\\\",\\\"--config\\\",\\\"mtlddl\\\",\\\"--src\\\",\\\"gm\\\",\\\"skp\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLIntrinsicNot_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicMixFloatES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLoopFloat_GPU\\\",\\\"--match\\\",\\\"~^ProcessorCloneTest$\\\",\\\"~^GrMeshTest$\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.15.1-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Release-All-DDL3_Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac10.15.1-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Release-All-DDL1_Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD6000\\\",\\\"extra_config\\\",\\\"DDL1_Metal\\\",\\\"model\\\",\\\"MacBookAir7.2\\\",\\\"os\\\",\\\"Mac10.15.1\\\",\\\"style\\\",\\\"DDL\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--skpViewportSize\\\",\\\"2048\\\",\\\"--config\\\",\\\"mtl\\\",\\\"--src\\\",\\\"gm\\\",\\\"skp\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLIntrinsicNot_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicMixFloatES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLoopFloat_GPU\\\",\\\"--match\\\",\\\"~^ProcessorCloneTest$\\\",\\\"~^GrMeshTest$\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.15.1-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Release-All-DDL1_Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ @@ -56761,7 +55667,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Mac10.15.1-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Release-All-Metal": { + "Test-Mac10.15.1-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Release-All-DDL3_Metal": { "caches": [ { "name": "vpython", @@ -56808,7 +55714,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -56822,7 +55728,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac10.15.1-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Release-All-Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD6000\\\",\\\"extra_config\\\",\\\"Metal\\\",\\\"model\\\",\\\"MacBookAir7.2\\\",\\\"os\\\",\\\"Mac10.15.1\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtl\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLIntrinsicNot_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicMixFloatES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLoopFloat_GPU\\\",\\\"--match\\\",\\\"~^ProcessorCloneTest$\\\",\\\"~^GrMeshTest$\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.15.1-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Release-All-Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac10.15.1-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Release-All-DDL3_Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD6000\\\",\\\"extra_config\\\",\\\"DDL3_Metal\\\",\\\"model\\\",\\\"MacBookAir7.2\\\",\\\"os\\\",\\\"Mac10.15.1\\\",\\\"style\\\",\\\"DDL\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--skpViewportSize\\\",\\\"2048\\\",\\\"--gpuThreads\\\",\\\"0\\\",\\\"--config\\\",\\\"mtlddl\\\",\\\"--src\\\",\\\"gm\\\",\\\"skp\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLIntrinsicNot_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicMixFloatES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLoopFloat_GPU\\\",\\\"--match\\\",\\\"~^ProcessorCloneTest$\\\",\\\"~^GrMeshTest$\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.15.1-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Release-All-DDL3_Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ @@ -56865,208 +55771,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Mac10.15.1-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Release-All-TSAN_Metal": { - "caches": [ - { - "name": "vpython", - "path": "cache/vpython" - } - ], - "casSpec": "test", - "cipd_packages": [ - { - "name": "infra/3pp/tools/cpython3/mac-amd64", - "path": "cipd_bin_packages/cpython3", - "version": "version:2@3.8.10.chromium.19" - }, - { - "name": "infra/tools/luci-auth/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/kitchen/${platform}", - "path": ".", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/vpython-native/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/vpython/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "skia/bots/skimage", - "path": "skimage", - "version": "version:47" - }, - { - "name": "skia/bots/skp", - "path": "skp", - "version": "version:432" - }, - { - "name": "skia/bots/svg", - "path": "svg", - "version": "version:14" - } - ], - "command": [ - "cipd_bin_packages/vpython3${EXECUTABLE_SUFFIX}", - "-u", - "skia/infra/bots/run_recipe.py", - "${ISOLATED_OUTDIR}", - "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac10.15.1-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Release-All-TSAN_Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD6000\\\",\\\"extra_config\\\",\\\"TSAN_Metal\\\",\\\"model\\\",\\\"MacBookAir7.2\\\",\\\"os\\\",\\\"Mac10.15.1\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtl\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLIntrinsicNot_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicMixFloatES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLoopFloat_GPU\\\",\\\"--match\\\",\\\"~^ProcessorCloneTest$\\\",\\\"~^GrMeshTest$\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.15.1-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Release-All-TSAN_Metal\\\",\\\"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": [ - "Build-Mac-Clang-x86_64-Release-TSAN_Metal", - "Housekeeper-PerCommit-BundleRecipes" - ], - "dimensions": [ - "gpu:8086:1626", - "os:Mac-10.15.1", - "pool:Skia" - ], - "environment": { - "RECIPES_USE_PY3": "true", - "VPYTHON_LOG_TRACE": "1" - }, - "env_prefixes": { - "PATH": [ - "cipd_bin_packages/cpython3", - "cipd_bin_packages/cpython3/bin", - "cipd_bin_packages", - "cipd_bin_packages/bin" - ], - "VPYTHON_DEFAULT_SPEC": [ - "skia/.vpython" - ], - "VPYTHON_VIRTUALENV_ROOT": [ - "cache/vpython" - ] - }, - "execution_timeout_ns": 14400000000000, - "expiration_ns": 72000000000000, - "extra_tags": { - "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" - }, - "io_timeout_ns": 14400000000000, - "max_attempts": 1, - "outputs": [ - "test" - ] - }, - "Test-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-Graphite_Metal": { - "caches": [ - { - "name": "vpython", - "path": "cache/vpython" - } - ], - "casSpec": "test", - "cipd_packages": [ - { - "name": "infra/3pp/tools/cpython3/mac-amd64", - "path": "cipd_bin_packages/cpython3", - "version": "version:2@3.8.10.chromium.19" - }, - { - "name": "infra/tools/luci-auth/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/kitchen/${platform}", - "path": ".", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/vpython-native/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/vpython/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "skia/bots/gsutil", - "path": "gsutil", - "version": "version:0" - }, - { - "name": "skia/bots/skimage", - "path": "skimage", - "version": "version:47" - }, - { - "name": "skia/bots/skp", - "path": "skp", - "version": "version:432" - }, - { - "name": "skia/bots/svg", - "path": "svg", - "version": "version:14" - } - ], - "command": [ - "cipd_bin_packages/vpython3${EXECUTABLE_SUFFIX}", - "-u", - "skia/infra/bots/run_recipe.py", - "${ISOLATED_OUTDIR}", - "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-Graphite_Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonHD8870M\\\",\\\"extra_config\\\",\\\"Graphite_Metal\\\",\\\"model\\\",\\\"MacBookPro11.5\\\",\\\"os\\\",\\\"Mac10.15.7\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"grmtl\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"image_subset\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"hugebitmapshader\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"path_huge_aa\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"verylargebitmap\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"verylarge_picture_image\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--match\\\",\\\"~async_rescale_and_read\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-Graphite_Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Mac-Clang-x86_64-Debug-Graphite_Metal", - "Housekeeper-PerCommit-BundleRecipes" - ], - "dimensions": [ - "gpu:1002:6821-4.0.20-3.2.8", - "os:Mac-10.15.7", - "pool:Skia" - ], - "environment": { - "RECIPES_USE_PY3": "true", - "VPYTHON_LOG_TRACE": "1" - }, - "env_prefixes": { - "PATH": [ - "gsutil/gsutil", - "cipd_bin_packages/cpython3", - "cipd_bin_packages/cpython3/bin", - "cipd_bin_packages", - "cipd_bin_packages/bin" - ], - "VPYTHON_DEFAULT_SPEC": [ - "skia/.vpython" - ], - "VPYTHON_VIRTUALENV_ROOT": [ - "cache/vpython" - ] - }, - "execution_timeout_ns": 14400000000000, - "expiration_ns": 72000000000000, - "extra_tags": { - "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" - }, - "io_timeout_ns": 14400000000000, - "max_attempts": 2, - "outputs": [ - "test" - ], - "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" - }, - "Test-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-Metal": { + "Test-Mac10.15.1-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Release-All-Metal": { "caches": [ { "name": "vpython", @@ -57113,7 +55818,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -57127,16 +55832,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonHD8870M\\\",\\\"extra_config\\\",\\\"Metal\\\",\\\"model\\\",\\\"MacBookPro11.5\\\",\\\"os\\\",\\\"Mac10.15.7\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtl\\\",\\\"mtlmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--match\\\",\\\"~WritePixelsNonTextureMSAA_Gpu\\\",\\\"~SurfacePartialDraw_Gpu\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac10.15.1-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Release-All-Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD6000\\\",\\\"extra_config\\\",\\\"Metal\\\",\\\"model\\\",\\\"MacBookAir7.2\\\",\\\"os\\\",\\\"Mac10.15.1\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtl\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLIntrinsicNot_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicMixFloatES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLoopFloat_GPU\\\",\\\"--match\\\",\\\"~^ProcessorCloneTest$\\\",\\\"~^GrMeshTest$\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.15.1-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Release-All-Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Mac-Clang-x86_64-Debug-Metal", + "Build-Mac-Clang-x86_64-Release-Metal", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:1002:6821-4.0.20-3.2.8", - "os:Mac-10.15.7", + "gpu:8086:1626", + "os:Mac-10.15.1", "pool:Skia" ], "environment": { @@ -57170,7 +55875,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-Metal_ColorSpaces": { + "Test-Mac10.15.1-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Release-All-TSAN_Metal": { "caches": [ { "name": "vpython", @@ -57204,11 +55909,6 @@ "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, - { - "name": "skia/bots/gsutil", - "path": "gsutil", - "version": "version:0" - }, { "name": "skia/bots/skimage", "path": "skimage", @@ -57217,7 +55917,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -57231,16 +55931,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-Metal_ColorSpaces\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonHD8870M\\\",\\\"extra_config\\\",\\\"Metal_ColorSpaces\\\",\\\"model\\\",\\\"MacBookPro11.5\\\",\\\"os\\\",\\\"Mac10.15.7\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtlf16\\\",\\\"mtl\\\",\\\"linear-mtlf16\\\",\\\"linear-mtl\\\",\\\"narrow-mtlf16\\\",\\\"narrow-mtl\\\",\\\"p3-mtlf16\\\",\\\"p3-mtl\\\",\\\"rec2020-mtlf16\\\",\\\"rec2020-mtl\\\",\\\"srgb2-mtlf16\\\",\\\"srgb2-mtl\\\",\\\"narrow-mtlf16norm\\\",\\\"linear-mtlsrgba\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--match\\\",\\\"async_rescale_and_read_dog_up\\\",\\\"bug6783\\\",\\\"colorspace\\\",\\\"colorspace2\\\",\\\"composeCF\\\",\\\"crbug_224618\\\",\\\"drawlines_with_local_matrix\\\",\\\"gradients_interesting\\\",\\\"manypathatlases_2048\\\",\\\"paint_alpha_normals_rt\\\",\\\"runtimefunctions\\\",\\\"savelayer_f16\\\",\\\"spiral_rt\\\",\\\"srgb_colorfilter\\\",\\\"strokedlines\\\",\\\"sweep_tiling\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-Metal_ColorSpaces\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac10.15.1-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Release-All-TSAN_Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD6000\\\",\\\"extra_config\\\",\\\"TSAN_Metal\\\",\\\"model\\\",\\\"MacBookAir7.2\\\",\\\"os\\\",\\\"Mac10.15.1\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtl\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLIntrinsicNot_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicMixFloatES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLoopFloat_GPU\\\",\\\"--match\\\",\\\"~^ProcessorCloneTest$\\\",\\\"~^GrMeshTest$\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.15.1-Clang-MacBookAir7.2-GPU-IntelHD6000-x86_64-Release-All-TSAN_Metal\\\",\\\"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": [ - "Build-Mac-Clang-x86_64-Debug-Metal", + "Build-Mac-Clang-x86_64-Release-TSAN_Metal", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:1002:6821-4.0.20-3.2.8", - "os:Mac-10.15.7", + "gpu:8086:1626", + "os:Mac-10.15.1", "pool:Skia" ], "environment": { @@ -57249,7 +55949,6 @@ }, "env_prefixes": { "PATH": [ - "gsutil/gsutil", "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", "cipd_bin_packages", @@ -57268,13 +55967,12 @@ "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" }, "io_timeout_ns": 14400000000000, - "max_attempts": 2, + "max_attempts": 1, "outputs": [ "test" - ], - "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" + ] }, - "Test-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-Metal": { + "Test-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-Graphite_Metal": { "caches": [ { "name": "vpython", @@ -57321,7 +56019,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -57335,11 +56033,11 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonHD8870M\\\",\\\"extra_config\\\",\\\"Metal\\\",\\\"model\\\",\\\"MacBookPro11.5\\\",\\\"os\\\",\\\"Mac10.15.7\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtl\\\",\\\"mtlmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--match\\\",\\\"~WritePixelsNonTextureMSAA_Gpu\\\",\\\"~SurfacePartialDraw_Gpu\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-Graphite_Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonHD8870M\\\",\\\"extra_config\\\",\\\"Graphite_Metal\\\",\\\"model\\\",\\\"MacBookPro11.5\\\",\\\"os\\\",\\\"Mac10.15.7\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"grmtl\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"image_subset\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"hugebitmapshader\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_no_bleed\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_down\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_up\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_rose\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--match\\\",\\\"~^verylarge_picture_image$\\\",\\\"~^verylargebitmap$\\\",\\\"~^path_huge_aa$\\\",\\\"~^fast_constraint_red_is_allowed$\\\",\\\"~^strict_constraint_batch_no_red_allowed$\\\",\\\"~^strict_constraint_no_red_allowed$\\\",\\\"~async_rescale_and_read\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-Graphite_Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Mac-Clang-x86_64-Release-Metal", + "Build-Mac-Clang-x86_64-Debug-Graphite_Metal", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ @@ -57378,7 +56076,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-Metal_ColorSpaces": { + "Test-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-Metal": { "caches": [ { "name": "vpython", @@ -57425,7 +56123,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -57439,11 +56137,11 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-Metal_ColorSpaces\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonHD8870M\\\",\\\"extra_config\\\",\\\"Metal_ColorSpaces\\\",\\\"model\\\",\\\"MacBookPro11.5\\\",\\\"os\\\",\\\"Mac10.15.7\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtlf16\\\",\\\"mtl\\\",\\\"linear-mtlf16\\\",\\\"linear-mtl\\\",\\\"narrow-mtlf16\\\",\\\"narrow-mtl\\\",\\\"p3-mtlf16\\\",\\\"p3-mtl\\\",\\\"rec2020-mtlf16\\\",\\\"rec2020-mtl\\\",\\\"srgb2-mtlf16\\\",\\\"srgb2-mtl\\\",\\\"narrow-mtlf16norm\\\",\\\"linear-mtlsrgba\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--match\\\",\\\"async_rescale_and_read_dog_up\\\",\\\"bug6783\\\",\\\"colorspace\\\",\\\"colorspace2\\\",\\\"composeCF\\\",\\\"crbug_224618\\\",\\\"drawlines_with_local_matrix\\\",\\\"gradients_interesting\\\",\\\"manypathatlases_2048\\\",\\\"paint_alpha_normals_rt\\\",\\\"runtimefunctions\\\",\\\"savelayer_f16\\\",\\\"spiral_rt\\\",\\\"srgb_colorfilter\\\",\\\"strokedlines\\\",\\\"sweep_tiling\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-Metal_ColorSpaces\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonHD8870M\\\",\\\"extra_config\\\",\\\"Metal\\\",\\\"model\\\",\\\"MacBookPro11.5\\\",\\\"os\\\",\\\"Mac10.15.7\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtl\\\",\\\"mtlmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--match\\\",\\\"~WritePixelsNonTextureMSAA_Gpu\\\",\\\"~SurfacePartialDraw_Gpu\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Mac-Clang-x86_64-Release-Metal", + "Build-Mac-Clang-x86_64-Debug-Metal", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ @@ -57482,7 +56180,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Mac10.15.7-Clang-MacMini7.1-CPU-AVX2-x86_64-Debug-All-NativeFonts": { + "Test-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-Metal_ColorSpaces": { "caches": [ { "name": "vpython", @@ -57529,7 +56227,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -57543,15 +56241,15 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac10.15.7-Clang-MacMini7.1-CPU-AVX2-x86_64-Debug-All-NativeFonts\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"extra_config\\\",\\\"NativeFonts\\\",\\\"model\\\",\\\"MacMini7.1\\\",\\\"os\\\",\\\"Mac10.15.7\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.15.7-Clang-MacMini7.1-CPU-AVX2-x86_64-Debug-All-NativeFonts\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-Metal_ColorSpaces\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonHD8870M\\\",\\\"extra_config\\\",\\\"Metal_ColorSpaces\\\",\\\"model\\\",\\\"MacBookPro11.5\\\",\\\"os\\\",\\\"Mac10.15.7\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtlf16\\\",\\\"mtl\\\",\\\"linear-mtlf16\\\",\\\"linear-mtl\\\",\\\"narrow-mtlf16\\\",\\\"narrow-mtl\\\",\\\"p3-mtlf16\\\",\\\"p3-mtl\\\",\\\"rec2020-mtlf16\\\",\\\"rec2020-mtl\\\",\\\"srgb2-mtlf16\\\",\\\"srgb2-mtl\\\",\\\"narrow-mtlf16norm\\\",\\\"linear-mtlsrgba\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--match\\\",\\\"async_rescale_and_read_dog_up\\\",\\\"bug6783\\\",\\\"colorspace\\\",\\\"colorspace2\\\",\\\"composeCF\\\",\\\"crbug_224618\\\",\\\"drawlines_with_local_matrix\\\",\\\"gradients_interesting\\\",\\\"manypathatlases_2048\\\",\\\"paint_alpha_normals_rt\\\",\\\"runtimefunctions\\\",\\\"savelayer_f16\\\",\\\"spiral_rt\\\",\\\"srgb_colorfilter\\\",\\\"strokedlines\\\",\\\"sweep_tiling\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-Metal_ColorSpaces\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Mac-Clang-x86_64-Debug", + "Build-Mac-Clang-x86_64-Debug-Metal", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "cpu:x86-64-i5-4278U", + "gpu:1002:6821-4.0.20-3.2.8", "os:Mac-10.15.7", "pool:Skia" ], @@ -57586,7 +56284,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Mac10.15.7-Clang-MacMini7.1-GPU-IntelIris5100-x86_64-Debug-All-NativeFonts_i5": { + "Test-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-Metal": { "caches": [ { "name": "vpython", @@ -57633,7 +56331,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -57647,16 +56345,15 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac10.15.7-Clang-MacMini7.1-GPU-IntelIris5100-x86_64-Debug-All-NativeFonts_i5\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris5100\\\",\\\"extra_config\\\",\\\"NativeFonts_i5\\\",\\\"model\\\",\\\"MacMini7.1\\\",\\\"os\\\",\\\"Mac10.15.7\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLoopFloat_GPU\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.15.7-Clang-MacMini7.1-GPU-IntelIris5100-x86_64-Debug-All-NativeFonts_i5\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonHD8870M\\\",\\\"extra_config\\\",\\\"Metal\\\",\\\"model\\\",\\\"MacBookPro11.5\\\",\\\"os\\\",\\\"Mac10.15.7\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtl\\\",\\\"mtlmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--match\\\",\\\"~WritePixelsNonTextureMSAA_Gpu\\\",\\\"~SurfacePartialDraw_Gpu\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Mac-Clang-x86_64-Debug", + "Build-Mac-Clang-x86_64-Release-Metal", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "cpu:x86-64-i5-4278U", - "gpu:8086:0a2e", + "gpu:1002:6821-4.0.20-3.2.8", "os:Mac-10.15.7", "pool:Skia" ], @@ -57691,7 +56388,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Mac10.15.7-Clang-VMware7.1-CPU-AVX-x86_64-Debug-All-NativeFonts": { + "Test-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-Metal_ColorSpaces": { "caches": [ { "name": "vpython", @@ -57738,7 +56435,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -57752,15 +56449,15 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac10.15.7-Clang-VMware7.1-CPU-AVX-x86_64-Debug-All-NativeFonts\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX\\\",\\\"extra_config\\\",\\\"NativeFonts\\\",\\\"model\\\",\\\"VMware7.1\\\",\\\"os\\\",\\\"Mac10.15.7\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.15.7-Clang-VMware7.1-CPU-AVX-x86_64-Debug-All-NativeFonts\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-Metal_ColorSpaces\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonHD8870M\\\",\\\"extra_config\\\",\\\"Metal_ColorSpaces\\\",\\\"model\\\",\\\"MacBookPro11.5\\\",\\\"os\\\",\\\"Mac10.15.7\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtlf16\\\",\\\"mtl\\\",\\\"linear-mtlf16\\\",\\\"linear-mtl\\\",\\\"narrow-mtlf16\\\",\\\"narrow-mtl\\\",\\\"p3-mtlf16\\\",\\\"p3-mtl\\\",\\\"rec2020-mtlf16\\\",\\\"rec2020-mtl\\\",\\\"srgb2-mtlf16\\\",\\\"srgb2-mtl\\\",\\\"narrow-mtlf16norm\\\",\\\"linear-mtlsrgba\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--match\\\",\\\"async_rescale_and_read_dog_up\\\",\\\"bug6783\\\",\\\"colorspace\\\",\\\"colorspace2\\\",\\\"composeCF\\\",\\\"crbug_224618\\\",\\\"drawlines_with_local_matrix\\\",\\\"gradients_interesting\\\",\\\"manypathatlases_2048\\\",\\\"paint_alpha_normals_rt\\\",\\\"runtimefunctions\\\",\\\"savelayer_f16\\\",\\\"spiral_rt\\\",\\\"srgb_colorfilter\\\",\\\"strokedlines\\\",\\\"sweep_tiling\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-Metal_ColorSpaces\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Mac-Clang-x86_64-Debug", + "Build-Mac-Clang-x86_64-Release-Metal", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "cpu:x86-64", + "gpu:1002:6821-4.0.20-3.2.8", "os:Mac-10.15.7", "pool:Skia" ], @@ -57795,7 +56492,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Mac11-Clang-MacMini9.1-CPU-AppleM1-arm64-Debug-All": { + "Test-Mac10.15.7-Clang-MacMini7.1-CPU-AVX2-x86_64-Debug-All-NativeFonts": { "caches": [ { "name": "vpython", @@ -57842,7 +56539,12 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" + }, + { + "name": "skia/bots/skparagraph", + "path": "skia/resources/extra_fonts", + "version": "version:4" }, { "name": "skia/bots/svg", @@ -57856,16 +56558,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac11-Clang-MacMini9.1-CPU-AppleM1-arm64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac11\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac11-Clang-MacMini9.1-CPU-AppleM1-arm64-Debug-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac10.15.7-Clang-MacMini7.1-CPU-AVX2-x86_64-Debug-All-NativeFonts\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"extra_config\\\",\\\"NativeFonts\\\",\\\"model\\\",\\\"MacMini7.1\\\",\\\"os\\\",\\\"Mac10.15.7\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"--nativeFonts\\\",\\\"--paragraph_fonts\\\",\\\"extra_fonts\\\",\\\"--norun_paragraph_tests_needing_system_fonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.15.7-Clang-MacMini7.1-CPU-AVX2-x86_64-Debug-All-NativeFonts\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Mac-Clang-arm64-Debug", + "Build-Mac-Clang-x86_64-Debug", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "cpu:arm64-64-Apple_M1", - "os:Mac-11.4", + "cpu:x86-64-i5-4278U", + "os:Mac-10.15.7", "pool:Skia" ], "environment": { @@ -57899,7 +56601,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Mac11-Clang-MacMini9.1-CPU-AppleM1-arm64-Debug-All-NativeFonts": { + "Test-Mac10.15.7-Clang-MacMini7.1-GPU-IntelIris5100-x86_64-Debug-All-NativeFonts_i5": { "caches": [ { "name": "vpython", @@ -57946,7 +56648,12 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" + }, + { + "name": "skia/bots/skparagraph", + "path": "skia/resources/extra_fonts", + "version": "version:4" }, { "name": "skia/bots/svg", @@ -57960,16 +56667,17 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac11-Clang-MacMini9.1-CPU-AppleM1-arm64-Debug-All-NativeFonts\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"extra_config\\\",\\\"NativeFonts\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac11\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac11-Clang-MacMini9.1-CPU-AppleM1-arm64-Debug-All-NativeFonts\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac10.15.7-Clang-MacMini7.1-GPU-IntelIris5100-x86_64-Debug-All-NativeFonts_i5\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris5100\\\",\\\"extra_config\\\",\\\"NativeFonts_i5\\\",\\\"model\\\",\\\"MacMini7.1\\\",\\\"os\\\",\\\"Mac10.15.7\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLoopFloat_GPU\\\",\\\"--nativeFonts\\\",\\\"--paragraph_fonts\\\",\\\"extra_fonts\\\",\\\"--norun_paragraph_tests_needing_system_fonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.15.7-Clang-MacMini7.1-GPU-IntelIris5100-x86_64-Debug-All-NativeFonts_i5\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Mac-Clang-arm64-Debug", + "Build-Mac-Clang-x86_64-Debug", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "cpu:arm64-64-Apple_M1", - "os:Mac-11.4", + "cpu:x86-64-i5-4278U", + "gpu:8086:0a2e", + "os:Mac-10.15.7", "pool:Skia" ], "environment": { @@ -58003,7 +56711,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All": { + "Test-Mac10.15.7-Clang-VMware7.1-CPU-AVX-x86_64-Debug-All-NativeFonts": { "caches": [ { "name": "vpython", @@ -58050,7 +56758,12 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" + }, + { + "name": "skia/bots/skparagraph", + "path": "skia/resources/extra_fonts", + "version": "version:4" }, { "name": "skia/bots/svg", @@ -58064,16 +56777,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac11\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"gldmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"TransferPixelsFromTextureTest\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac10.15.7-Clang-VMware7.1-CPU-AVX-x86_64-Debug-All-NativeFonts\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX\\\",\\\"extra_config\\\",\\\"NativeFonts\\\",\\\"model\\\",\\\"VMware7.1\\\",\\\"os\\\",\\\"Mac10.15.7\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"--nativeFonts\\\",\\\"--paragraph_fonts\\\",\\\"extra_fonts\\\",\\\"--norun_paragraph_tests_needing_system_fonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac10.15.7-Clang-VMware7.1-CPU-AVX-x86_64-Debug-All-NativeFonts\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Mac-Clang-arm64-Debug", + "Build-Mac-Clang-x86_64-Debug", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "cpu:arm64-64-Apple_M1", - "os:Mac-11.4", + "cpu:x86-64", + "os:Mac-10.15.7", "pool:Skia" ], "environment": { @@ -58107,201 +56820,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ASAN_Graphite_Metal": { - "caches": [ - { - "name": "vpython", - "path": "cache/vpython" - } - ], - "casSpec": "test", - "cipd_packages": [ - { - "name": "infra/3pp/tools/cpython3/mac-amd64", - "path": "cipd_bin_packages/cpython3", - "version": "version:2@3.8.10.chromium.19" - }, - { - "name": "infra/tools/luci-auth/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/kitchen/${platform}", - "path": ".", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/vpython-native/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/vpython/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "skia/bots/skimage", - "path": "skimage", - "version": "version:47" - }, - { - "name": "skia/bots/skp", - "path": "skp", - "version": "version:432" - }, - { - "name": "skia/bots/svg", - "path": "svg", - "version": "version:14" - } - ], - "command": [ - "cipd_bin_packages/vpython3${EXECUTABLE_SUFFIX}", - "-u", - "skia/infra/bots/run_recipe.py", - "${ISOLATED_OUTDIR}", - "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ASAN_Graphite_Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"extra_config\\\",\\\"ASAN_Graphite_Metal\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac11\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"grmtl\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"image_subset\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"hugebitmapshader\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"path_huge_aa\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"verylargebitmap\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"verylarge_picture_image\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkPDF_JpegIdentification\\\",\\\"--match\\\",\\\"~async_rescale_and_read\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ASAN_Graphite_Metal\\\",\\\"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": [ - "Build-Mac-Clang-arm64-Debug-ASAN_Graphite_Metal", - "Housekeeper-PerCommit-BundleRecipes" - ], - "dimensions": [ - "cpu:arm64-64-Apple_M1", - "os:Mac-11.4", - "pool:Skia" - ], - "environment": { - "RECIPES_USE_PY3": "true", - "VPYTHON_LOG_TRACE": "1" - }, - "env_prefixes": { - "PATH": [ - "cipd_bin_packages/cpython3", - "cipd_bin_packages/cpython3/bin", - "cipd_bin_packages", - "cipd_bin_packages/bin" - ], - "VPYTHON_DEFAULT_SPEC": [ - "skia/.vpython" - ], - "VPYTHON_VIRTUALENV_ROOT": [ - "cache/vpython" - ] - }, - "execution_timeout_ns": 14400000000000, - "expiration_ns": 72000000000000, - "extra_tags": { - "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" - }, - "io_timeout_ns": 14400000000000, - "max_attempts": 1, - "outputs": [ - "test" - ] - }, - "Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ASAN_Graphite_Metal_ColorSpaces": { - "caches": [ - { - "name": "vpython", - "path": "cache/vpython" - } - ], - "casSpec": "test", - "cipd_packages": [ - { - "name": "infra/3pp/tools/cpython3/mac-amd64", - "path": "cipd_bin_packages/cpython3", - "version": "version:2@3.8.10.chromium.19" - }, - { - "name": "infra/tools/luci-auth/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/kitchen/${platform}", - "path": ".", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/vpython-native/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/vpython/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "skia/bots/skimage", - "path": "skimage", - "version": "version:47" - }, - { - "name": "skia/bots/skp", - "path": "skp", - "version": "version:432" - }, - { - "name": "skia/bots/svg", - "path": "svg", - "version": "version:14" - } - ], - "command": [ - "cipd_bin_packages/vpython3${EXECUTABLE_SUFFIX}", - "-u", - "skia/infra/bots/run_recipe.py", - "${ISOLATED_OUTDIR}", - "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ASAN_Graphite_Metal_ColorSpaces\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"extra_config\\\",\\\"ASAN_Graphite_Metal_ColorSpaces\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac11\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"grmtlf16\\\",\\\"grmtl\\\",\\\"linear-grmtlf16\\\",\\\"linear-grmtl\\\",\\\"narrow-grmtlf16\\\",\\\"narrow-grmtl\\\",\\\"p3-grmtlf16\\\",\\\"p3-grmtl\\\",\\\"rec2020-grmtlf16\\\",\\\"rec2020-grmtl\\\",\\\"srgb2-grmtlf16\\\",\\\"srgb2-grmtl\\\",\\\"narrow-grmtlf16norm\\\",\\\"linear-grmtlsrgba\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--match\\\",\\\"async_rescale_and_read_dog_up\\\",\\\"bug6783\\\",\\\"colorspace\\\",\\\"colorspace2\\\",\\\"composeCF\\\",\\\"crbug_224618\\\",\\\"drawlines_with_local_matrix\\\",\\\"gradients_interesting\\\",\\\"manypathatlases_2048\\\",\\\"paint_alpha_normals_rt\\\",\\\"runtimefunctions\\\",\\\"savelayer_f16\\\",\\\"spiral_rt\\\",\\\"srgb_colorfilter\\\",\\\"strokedlines\\\",\\\"sweep_tiling\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ASAN_Graphite_Metal_ColorSpaces\\\",\\\"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": [ - "Build-Mac-Clang-arm64-Debug-ASAN_Graphite_Metal", - "Housekeeper-PerCommit-BundleRecipes" - ], - "dimensions": [ - "cpu:arm64-64-Apple_M1", - "os:Mac-11.4", - "pool:Skia" - ], - "environment": { - "RECIPES_USE_PY3": "true", - "VPYTHON_LOG_TRACE": "1" - }, - "env_prefixes": { - "PATH": [ - "cipd_bin_packages/cpython3", - "cipd_bin_packages/cpython3/bin", - "cipd_bin_packages", - "cipd_bin_packages/bin" - ], - "VPYTHON_DEFAULT_SPEC": [ - "skia/.vpython" - ], - "VPYTHON_VIRTUALENV_ROOT": [ - "cache/vpython" - ] - }, - "execution_timeout_ns": 14400000000000, - "expiration_ns": 72000000000000, - "extra_tags": { - "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" - }, - "io_timeout_ns": 14400000000000, - "max_attempts": 1, - "outputs": [ - "test" - ] - }, - "Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Graphite_Dawn": { + "Test-Mac11-Clang-MacMini9.1-CPU-AppleM1-arm64-Debug-All": { "caches": [ { "name": "vpython", @@ -58348,7 +56867,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -58362,11 +56881,11 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Graphite_Dawn\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"extra_config\\\",\\\"Graphite_Dawn\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac11\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"grdawn\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"image_subset\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"hugebitmapshader\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"path_huge_aa\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"verylargebitmap\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"verylarge_picture_image\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"tall_stretched_bitmaps\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"runtime_intrinsics_matrix\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BackendTextureTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GraphitePurgeNotUsedSinceResourcesTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"MakeColorSpace_Test\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"PaintParamsKeyTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"TransferPixelsFromTextureTest\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthrough_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthroughAndVarDecls_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithLoops_GPU\\\",\\\"--match\\\",\\\"~async_rescale_and_read\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Graphite_Dawn\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac11-Clang-MacMini9.1-CPU-AppleM1-arm64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac11\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac11-Clang-MacMini9.1-CPU-AppleM1-arm64-Debug-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Mac-Clang-arm64-Debug-Graphite_Dawn", + "Build-Mac-Clang-arm64-Debug", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ @@ -58405,7 +56924,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Metal": { + "Test-Mac11-Clang-MacMini9.1-CPU-AppleM1-arm64-Debug-All-NativeFonts": { "caches": [ { "name": "vpython", @@ -58452,7 +56971,12 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" + }, + { + "name": "skia/bots/skparagraph", + "path": "skia/resources/extra_fonts", + "version": "version:4" }, { "name": "skia/bots/svg", @@ -58466,11 +56990,11 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"extra_config\\\",\\\"Metal\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac11\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtl\\\",\\\"mtlmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac11-Clang-MacMini9.1-CPU-AppleM1-arm64-Debug-All-NativeFonts\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"extra_config\\\",\\\"NativeFonts\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac11\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"--nativeFonts\\\",\\\"--paragraph_fonts\\\",\\\"extra_fonts\\\",\\\"--norun_paragraph_tests_needing_system_fonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac11-Clang-MacMini9.1-CPU-AppleM1-arm64-Debug-All-NativeFonts\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Mac-Clang-arm64-Debug-Metal", + "Build-Mac-Clang-arm64-Debug", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ @@ -58509,7 +57033,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite_Dawn": { + "Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All": { "caches": [ { "name": "vpython", @@ -58556,7 +57080,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -58570,11 +57094,11 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite_Dawn\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"extra_config\\\",\\\"Graphite_Dawn\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac11\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"grdawn\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"image_subset\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"hugebitmapshader\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"path_huge_aa\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"verylargebitmap\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"verylarge_picture_image\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"tall_stretched_bitmaps\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"runtime_intrinsics_matrix\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BackendTextureTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GraphitePurgeNotUsedSinceResourcesTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"MakeColorSpace_Test\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"PaintParamsKeyTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"TransferPixelsFromTextureTest\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthrough_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthroughAndVarDecls_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithLoops_GPU\\\",\\\"--match\\\",\\\"~async_rescale_and_read\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite_Dawn\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac11\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"gldmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"TransferPixelsFromTextureTest\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Mac-Clang-arm64-Release-Graphite_Dawn", + "Build-Mac-Clang-arm64-Debug", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ @@ -58613,7 +57137,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite_Metal": { + "Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ASAN_Graphite_Metal": { "caches": [ { "name": "vpython", @@ -58647,11 +57171,6 @@ "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, - { - "name": "skia/bots/gsutil", - "path": "gsutil", - "version": "version:0" - }, { "name": "skia/bots/skimage", "path": "skimage", @@ -58660,7 +57179,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -58674,11 +57193,11 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite_Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"extra_config\\\",\\\"Graphite_Metal\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac11\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"grmtl\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"image_subset\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"hugebitmapshader\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"path_huge_aa\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"verylargebitmap\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"verylarge_picture_image\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"--match\\\",\\\"~async_rescale_and_read\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite_Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ASAN_Graphite_Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"extra_config\\\",\\\"ASAN_Graphite_Metal\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac11\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"grmtl\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"image_subset\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"hugebitmapshader\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_no_bleed\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_down\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_up\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_rose\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkPDF_JpegIdentification\\\",\\\"--match\\\",\\\"~^verylarge_picture_image$\\\",\\\"~^verylargebitmap$\\\",\\\"~^path_huge_aa$\\\",\\\"~^fast_constraint_red_is_allowed$\\\",\\\"~^strict_constraint_batch_no_red_allowed$\\\",\\\"~^strict_constraint_no_red_allowed$\\\",\\\"~async_rescale_and_read\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ASAN_Graphite_Metal\\\",\\\"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": [ - "Build-Mac-Clang-arm64-Release-Graphite_Metal", + "Build-Mac-Clang-arm64-Debug-ASAN_Graphite_Metal", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ @@ -58692,7 +57211,6 @@ }, "env_prefixes": { "PATH": [ - "gsutil/gsutil", "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", "cipd_bin_packages", @@ -58711,13 +57229,12 @@ "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" }, "io_timeout_ns": 14400000000000, - "max_attempts": 2, + "max_attempts": 1, "outputs": [ "test" - ], - "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" + ] }, - "Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite_Metal_ColorSpaces": { + "Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ASAN_Graphite_Metal_ColorSpaces": { "caches": [ { "name": "vpython", @@ -58751,11 +57268,6 @@ "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, - { - "name": "skia/bots/gsutil", - "path": "gsutil", - "version": "version:0" - }, { "name": "skia/bots/skimage", "path": "skimage", @@ -58764,7 +57276,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -58778,11 +57290,11 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite_Metal_ColorSpaces\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"extra_config\\\",\\\"Graphite_Metal_ColorSpaces\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac11\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"grmtlf16\\\",\\\"grmtl\\\",\\\"linear-grmtlf16\\\",\\\"linear-grmtl\\\",\\\"narrow-grmtlf16\\\",\\\"narrow-grmtl\\\",\\\"p3-grmtlf16\\\",\\\"p3-grmtl\\\",\\\"rec2020-grmtlf16\\\",\\\"rec2020-grmtl\\\",\\\"srgb2-grmtlf16\\\",\\\"srgb2-grmtl\\\",\\\"narrow-grmtlf16norm\\\",\\\"linear-grmtlsrgba\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--match\\\",\\\"async_rescale_and_read_dog_up\\\",\\\"bug6783\\\",\\\"colorspace\\\",\\\"colorspace2\\\",\\\"composeCF\\\",\\\"crbug_224618\\\",\\\"drawlines_with_local_matrix\\\",\\\"gradients_interesting\\\",\\\"manypathatlases_2048\\\",\\\"paint_alpha_normals_rt\\\",\\\"runtimefunctions\\\",\\\"savelayer_f16\\\",\\\"spiral_rt\\\",\\\"srgb_colorfilter\\\",\\\"strokedlines\\\",\\\"sweep_tiling\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite_Metal_ColorSpaces\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ASAN_Graphite_Metal_ColorSpaces\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"extra_config\\\",\\\"ASAN_Graphite_Metal_ColorSpaces\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac11\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"grmtlf16\\\",\\\"grmtl\\\",\\\"linear-grmtlf16\\\",\\\"linear-grmtl\\\",\\\"narrow-grmtlf16\\\",\\\"narrow-grmtl\\\",\\\"p3-grmtlf16\\\",\\\"p3-grmtl\\\",\\\"rec2020-grmtlf16\\\",\\\"rec2020-grmtl\\\",\\\"srgb2-grmtlf16\\\",\\\"srgb2-grmtl\\\",\\\"narrow-grmtlf16norm\\\",\\\"linear-grmtlsrgba\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--match\\\",\\\"async_rescale_and_read_dog_up\\\",\\\"bug6783\\\",\\\"colorspace\\\",\\\"colorspace2\\\",\\\"composeCF\\\",\\\"crbug_224618\\\",\\\"drawlines_with_local_matrix\\\",\\\"gradients_interesting\\\",\\\"manypathatlases_2048\\\",\\\"paint_alpha_normals_rt\\\",\\\"runtimefunctions\\\",\\\"savelayer_f16\\\",\\\"spiral_rt\\\",\\\"srgb_colorfilter\\\",\\\"strokedlines\\\",\\\"sweep_tiling\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ASAN_Graphite_Metal_ColorSpaces\\\",\\\"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": [ - "Build-Mac-Clang-arm64-Release-Graphite_Metal", + "Build-Mac-Clang-arm64-Debug-ASAN_Graphite_Metal", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ @@ -58796,7 +57308,6 @@ }, "env_prefixes": { "PATH": [ - "gsutil/gsutil", "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", "cipd_bin_packages", @@ -58815,13 +57326,12 @@ "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" }, "io_timeout_ns": 14400000000000, - "max_attempts": 2, + "max_attempts": 1, "outputs": [ "test" - ], - "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" + ] }, - "Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Metal": { + "Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Graphite_Dawn": { "caches": [ { "name": "vpython", @@ -58868,7 +57378,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -58882,11 +57392,11 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"extra_config\\\",\\\"Metal\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac11\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtl\\\",\\\"mtlmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Graphite_Dawn\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"extra_config\\\",\\\"Graphite_Dawn\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac11\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"grdawn\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"image_subset\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"hugebitmapshader\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_no_bleed\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_down\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_up\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_rose\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"tall_stretched_bitmaps\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"runtime_intrinsics_matrix\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BackendTextureTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GraphitePurgeNotUsedSinceResourcesTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"MakeColorSpace_Test\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"PaintParamsKeyTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"TransferPixelsFromTextureTest\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthrough_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthroughAndVarDecls_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithLoops_GPU\\\",\\\"--match\\\",\\\"~^verylarge_picture_image$\\\",\\\"~^verylargebitmap$\\\",\\\"~^path_huge_aa$\\\",\\\"~^fast_constraint_red_is_allowed$\\\",\\\"~^strict_constraint_batch_no_red_allowed$\\\",\\\"~^strict_constraint_no_red_allowed$\\\",\\\"~async_rescale_and_read\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Graphite_Dawn\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Mac-Clang-arm64-Release-Metal", + "Build-Mac-Clang-arm64-Debug-Graphite_Dawn", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ @@ -58925,7 +57435,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Debug-All": { + "Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Metal": { "caches": [ { "name": "vpython", @@ -58972,7 +57482,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -58986,16 +57496,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIrisPlus\\\",\\\"model\\\",\\\"MacBookPro16.2\\\",\\\"os\\\",\\\"Mac12\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~^GrMeshTest$\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Debug-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"extra_config\\\",\\\"Metal\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac11\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtl\\\",\\\"mtlmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Mac-Clang-x86_64-Debug", + "Build-Mac-Clang-arm64-Debug-Metal", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:8086:8a53", - "os:Mac-12", + "cpu:arm64-64-Apple_M1", + "os:Mac-11.4", "pool:Skia" ], "environment": { @@ -59029,7 +57539,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Debug-All-ANGLE": { + "Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite_Dawn": { "caches": [ { "name": "vpython", @@ -59076,7 +57586,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -59090,16 +57600,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Debug-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIrisPlus\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"MacBookPro16.2\\\",\\\"os\\\",\\\"Mac12\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_mtl_es2\\\",\\\"angle_mtl_es3\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkSLIntrinsicMixFloatES3_GPU\\\",\\\"angle_mtl_es3\\\",\\\"gm\\\",\\\"_\\\",\\\"runtime_intrinsics_common_es3\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"~^GrMeshTest$\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Debug-All-ANGLE\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite_Dawn\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"extra_config\\\",\\\"Graphite_Dawn\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac11\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"grdawn\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"image_subset\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"hugebitmapshader\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_no_bleed\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_down\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_up\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_rose\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"tall_stretched_bitmaps\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"runtime_intrinsics_matrix\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BackendTextureTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GraphitePurgeNotUsedSinceResourcesTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"MakeColorSpace_Test\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"PaintParamsKeyTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"TransferPixelsFromTextureTest\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthrough_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthroughAndVarDecls_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithLoops_GPU\\\",\\\"--match\\\",\\\"~^verylarge_picture_image$\\\",\\\"~^verylargebitmap$\\\",\\\"~^path_huge_aa$\\\",\\\"~^fast_constraint_red_is_allowed$\\\",\\\"~^strict_constraint_batch_no_red_allowed$\\\",\\\"~^strict_constraint_no_red_allowed$\\\",\\\"~async_rescale_and_read\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite_Dawn\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Mac-Clang-x86_64-Debug-ANGLE", + "Build-Mac-Clang-arm64-Release-Graphite_Dawn", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:8086:8a53", - "os:Mac-12", + "cpu:arm64-64-Apple_M1", + "os:Mac-11.4", "pool:Skia" ], "environment": { @@ -59133,7 +57643,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Debug-All-Graphite_Metal": { + "Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite_Metal": { "caches": [ { "name": "vpython", @@ -59180,7 +57690,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -59194,16 +57704,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Debug-All-Graphite_Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIrisPlus\\\",\\\"extra_config\\\",\\\"Graphite_Metal\\\",\\\"model\\\",\\\"MacBookPro16.2\\\",\\\"os\\\",\\\"Mac12\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"grmtl\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"image_subset\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"hugebitmapshader\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"path_huge_aa\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"verylargebitmap\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"verylarge_picture_image\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLIntrinsicNot_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicMixFloatES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~^GrMeshTest$\\\",\\\"~async_rescale_and_read\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Debug-All-Graphite_Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite_Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"extra_config\\\",\\\"Graphite_Metal\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac11\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"grmtl\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"image_subset\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"hugebitmapshader\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_no_bleed\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_down\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_up\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_rose\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"--match\\\",\\\"~^verylarge_picture_image$\\\",\\\"~^verylargebitmap$\\\",\\\"~^path_huge_aa$\\\",\\\"~^fast_constraint_red_is_allowed$\\\",\\\"~^strict_constraint_batch_no_red_allowed$\\\",\\\"~^strict_constraint_no_red_allowed$\\\",\\\"~async_rescale_and_read\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite_Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Mac-Clang-x86_64-Debug-Graphite_Metal", + "Build-Mac-Clang-arm64-Release-Graphite_Metal", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:8086:8a53", - "os:Mac-12", + "cpu:arm64-64-Apple_M1", + "os:Mac-11.4", "pool:Skia" ], "environment": { @@ -59237,7 +57747,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Debug-All-Metal": { + "Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite_Metal_ColorSpaces": { "caches": [ { "name": "vpython", @@ -59284,7 +57794,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -59298,16 +57808,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Debug-All-Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIrisPlus\\\",\\\"extra_config\\\",\\\"Metal\\\",\\\"model\\\",\\\"MacBookPro16.2\\\",\\\"os\\\",\\\"Mac12\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtl\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLIntrinsicNot_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicMixFloatES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~^GrMeshTest$\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Debug-All-Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite_Metal_ColorSpaces\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"extra_config\\\",\\\"Graphite_Metal_ColorSpaces\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac11\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"grmtlf16\\\",\\\"grmtl\\\",\\\"linear-grmtlf16\\\",\\\"linear-grmtl\\\",\\\"narrow-grmtlf16\\\",\\\"narrow-grmtl\\\",\\\"p3-grmtlf16\\\",\\\"p3-grmtl\\\",\\\"rec2020-grmtlf16\\\",\\\"rec2020-grmtl\\\",\\\"srgb2-grmtlf16\\\",\\\"srgb2-grmtl\\\",\\\"narrow-grmtlf16norm\\\",\\\"linear-grmtlsrgba\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--match\\\",\\\"async_rescale_and_read_dog_up\\\",\\\"bug6783\\\",\\\"colorspace\\\",\\\"colorspace2\\\",\\\"composeCF\\\",\\\"crbug_224618\\\",\\\"drawlines_with_local_matrix\\\",\\\"gradients_interesting\\\",\\\"manypathatlases_2048\\\",\\\"paint_alpha_normals_rt\\\",\\\"runtimefunctions\\\",\\\"savelayer_f16\\\",\\\"spiral_rt\\\",\\\"srgb_colorfilter\\\",\\\"strokedlines\\\",\\\"sweep_tiling\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite_Metal_ColorSpaces\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Mac-Clang-x86_64-Debug-Metal", + "Build-Mac-Clang-arm64-Release-Graphite_Metal", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:8086:8a53", - "os:Mac-12", + "cpu:arm64-64-Apple_M1", + "os:Mac-11.4", "pool:Skia" ], "environment": { @@ -59341,7 +57851,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Release-All": { + "Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Metal": { "caches": [ { "name": "vpython", @@ -59388,7 +57898,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -59402,16 +57912,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIrisPlus\\\",\\\"model\\\",\\\"MacBookPro16.2\\\",\\\"os\\\",\\\"Mac12\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~^GrMeshTest$\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Release-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"extra_config\\\",\\\"Metal\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac11\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtl\\\",\\\"mtlmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Mac-Clang-x86_64-Release", + "Build-Mac-Clang-arm64-Release-Metal", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:8086:8a53", - "os:Mac-12", + "cpu:arm64-64-Apple_M1", + "os:Mac-11.4", "pool:Skia" ], "environment": { @@ -59445,7 +57955,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Release-All-Metal": { + "Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Debug-All": { "caches": [ { "name": "vpython", @@ -59492,7 +58002,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -59506,11 +58016,11 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Release-All-Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIrisPlus\\\",\\\"extra_config\\\",\\\"Metal\\\",\\\"model\\\",\\\"MacBookPro16.2\\\",\\\"os\\\",\\\"Mac12\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtl\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLIntrinsicNot_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicMixFloatES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~^GrMeshTest$\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Release-All-Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIrisPlus\\\",\\\"model\\\",\\\"MacBookPro16.2\\\",\\\"os\\\",\\\"Mac12\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~^GrMeshTest$\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Debug-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Mac-Clang-x86_64-Release-Metal", + "Build-Mac-Clang-x86_64-Debug", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ @@ -59549,104 +58059,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Mac12-Clang-MacMini9.1-CPU-AppleM1-arm64-Debug-All-NativeFonts_ASAN": { - "caches": [ - { - "name": "vpython", - "path": "cache/vpython" - } - ], - "casSpec": "test", - "cipd_packages": [ - { - "name": "infra/3pp/tools/cpython3/mac-amd64", - "path": "cipd_bin_packages/cpython3", - "version": "version:2@3.8.10.chromium.19" - }, - { - "name": "infra/tools/luci-auth/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/kitchen/${platform}", - "path": ".", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/vpython-native/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/vpython/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "skia/bots/skimage", - "path": "skimage", - "version": "version:47" - }, - { - "name": "skia/bots/skp", - "path": "skp", - "version": "version:432" - }, - { - "name": "skia/bots/svg", - "path": "svg", - "version": "version:14" - } - ], - "command": [ - "cipd_bin_packages/vpython3${EXECUTABLE_SUFFIX}", - "-u", - "skia/infra/bots/run_recipe.py", - "${ISOLATED_OUTDIR}", - "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac12-Clang-MacMini9.1-CPU-AppleM1-arm64-Debug-All-NativeFonts_ASAN\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"extra_config\\\",\\\"NativeFonts_ASAN\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac12\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkPDF_JpegIdentification\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac12-Clang-MacMini9.1-CPU-AppleM1-arm64-Debug-All-NativeFonts_ASAN\\\",\\\"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": [ - "Build-Mac-Clang-arm64-Debug-ASAN", - "Housekeeper-PerCommit-BundleRecipes" - ], - "dimensions": [ - "cpu:arm64-64-Apple_M1", - "os:Mac-12", - "pool:Skia" - ], - "environment": { - "RECIPES_USE_PY3": "true", - "VPYTHON_LOG_TRACE": "1" - }, - "env_prefixes": { - "PATH": [ - "cipd_bin_packages/cpython3", - "cipd_bin_packages/cpython3/bin", - "cipd_bin_packages", - "cipd_bin_packages/bin" - ], - "VPYTHON_DEFAULT_SPEC": [ - "skia/.vpython" - ], - "VPYTHON_VIRTUALENV_ROOT": [ - "cache/vpython" - ] - }, - "execution_timeout_ns": 14400000000000, - "expiration_ns": 72000000000000, - "extra_tags": { - "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" - }, - "io_timeout_ns": 14400000000000, - "max_attempts": 1, - "outputs": [ - "test" - ] - }, - "Test-Mac12-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ANGLE": { + "Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Debug-All-ANGLE": { "caches": [ { "name": "vpython", @@ -59693,7 +58106,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -59707,15 +58120,15 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac12-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac12\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_mtl_es2\\\",\\\"angle_mtl_es3\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkSLIntrinsicMixFloatES3_GPU\\\",\\\"angle_mtl_es3\\\",\\\"gm\\\",\\\"_\\\",\\\"runtime_intrinsics_common_es3\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"TransferPixelsToTextureTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"TransferPixelsFromTextureTest\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac12-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ANGLE\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Debug-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIrisPlus\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"MacBookPro16.2\\\",\\\"os\\\",\\\"Mac12\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_mtl_es2\\\",\\\"angle_mtl_es3\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkSLIntrinsicMixFloatES3_GPU\\\",\\\"angle_mtl_es3\\\",\\\"gm\\\",\\\"_\\\",\\\"runtime_intrinsics_common_es3\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"~^GrMeshTest$\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Debug-All-ANGLE\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Mac-Clang-arm64-Debug-ANGLE", + "Build-Mac-Clang-x86_64-Debug-ANGLE", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "cpu:arm64-64-Apple_M1", + "gpu:8086:8a53", "os:Mac-12", "pool:Skia" ], @@ -59750,7 +58163,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Mac12-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Metal": { + "Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Debug-All-Graphite_Metal": { "caches": [ { "name": "vpython", @@ -59797,7 +58210,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -59811,15 +58224,15 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac12-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"extra_config\\\",\\\"Metal\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac12\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtl\\\",\\\"mtlmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac12-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Debug-All-Graphite_Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIrisPlus\\\",\\\"extra_config\\\",\\\"Graphite_Metal\\\",\\\"model\\\",\\\"MacBookPro16.2\\\",\\\"os\\\",\\\"Mac12\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"grmtl\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"image_subset\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"hugebitmapshader\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_no_bleed\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_down\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_up\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_rose\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Graphite\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLIntrinsicNot_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicMixFloatES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~^verylarge_picture_image$\\\",\\\"~^verylargebitmap$\\\",\\\"~^path_huge_aa$\\\",\\\"~^fast_constraint_red_is_allowed$\\\",\\\"~^strict_constraint_batch_no_red_allowed$\\\",\\\"~^strict_constraint_no_red_allowed$\\\",\\\"~^GrMeshTest$\\\",\\\"~async_rescale_and_read\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Debug-All-Graphite_Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Mac-Clang-arm64-Debug-Metal", + "Build-Mac-Clang-x86_64-Debug-Graphite_Metal", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "cpu:arm64-64-Apple_M1", + "gpu:8086:8a53", "os:Mac-12", "pool:Skia" ], @@ -59854,7 +58267,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Mac12-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-NativeFonts": { + "Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Debug-All-Metal": { "caches": [ { "name": "vpython", @@ -59901,7 +58314,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -59915,15 +58328,15 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac12-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-NativeFonts\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"extra_config\\\",\\\"NativeFonts\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac12\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"TransferPixelsFromTextureTest\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac12-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-NativeFonts\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Debug-All-Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIrisPlus\\\",\\\"extra_config\\\",\\\"Metal\\\",\\\"model\\\",\\\"MacBookPro16.2\\\",\\\"os\\\",\\\"Mac12\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtl\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLIntrinsicNot_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicMixFloatES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~^GrMeshTest$\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Debug-All-Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Mac-Clang-arm64-Debug", + "Build-Mac-Clang-x86_64-Debug-Metal", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "cpu:arm64-64-Apple_M1", + "gpu:8086:8a53", "os:Mac-12", "pool:Skia" ], @@ -59958,7 +58371,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Mac12-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Slug": { + "Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -60005,7 +58418,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -60019,15 +58432,15 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac12-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Slug\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"extra_config\\\",\\\"Slug\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac12\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"glslug\\\",\\\"glserializeslug\\\",\\\"glremoteslug\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"glremoteslug\\\",\\\"gm\\\",\\\"_\\\",\\\"rtif_distort\\\",\\\"glremoteslug\\\",\\\"gm\\\",\\\"_\\\",\\\"textfilter_image\\\",\\\"glremoteslug\\\",\\\"gm\\\",\\\"_\\\",\\\"textfilter_color\\\",\\\"glremoteslug\\\",\\\"gm\\\",\\\"_\\\",\\\"savelayerpreservelcdtext\\\",\\\"glremoteslug\\\",\\\"gm\\\",\\\"_\\\",\\\"typefacerendering_pfa\\\",\\\"glremoteslug\\\",\\\"gm\\\",\\\"_\\\",\\\"typefacerendering_pfb\\\",\\\"glremoteslug\\\",\\\"gm\\\",\\\"_\\\",\\\"typefacerendering\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"TransferPixelsFromTextureTest\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac12-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Slug\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIrisPlus\\\",\\\"model\\\",\\\"MacBookPro16.2\\\",\\\"os\\\",\\\"Mac12\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~^GrMeshTest$\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Release-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Mac-Clang-arm64-Debug-Slug", + "Build-Mac-Clang-x86_64-Release", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "cpu:arm64-64-Apple_M1", + "gpu:8086:8a53", "os:Mac-12", "pool:Skia" ], @@ -60062,7 +58475,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Mac12-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-ANGLE": { + "Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Release-All-Metal": { "caches": [ { "name": "vpython", @@ -60109,7 +58522,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -60123,15 +58536,15 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac12-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac12\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_mtl_es2\\\",\\\"angle_mtl_es3\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkSLIntrinsicMixFloatES3_GPU\\\",\\\"angle_mtl_es3\\\",\\\"gm\\\",\\\"_\\\",\\\"runtime_intrinsics_common_es3\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"TransferPixelsToTextureTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"TransferPixelsFromTextureTest\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac12-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-ANGLE\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Release-All-Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIrisPlus\\\",\\\"extra_config\\\",\\\"Metal\\\",\\\"model\\\",\\\"MacBookPro16.2\\\",\\\"os\\\",\\\"Mac12\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtl\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLIntrinsicNot_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicMixFloatES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~^GrMeshTest$\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Release-All-Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Mac-Clang-arm64-Release-ANGLE", + "Build-Mac-Clang-x86_64-Release-Metal", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "cpu:arm64-64-Apple_M1", + "gpu:8086:8a53", "os:Mac-12", "pool:Skia" ], @@ -60166,7 +58579,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Mac12-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Metal": { + "Test-Mac12-Clang-MacMini9.1-CPU-AppleM1-arm64-Debug-All-NativeFonts_ASAN": { "caches": [ { "name": "vpython", @@ -60200,11 +58613,6 @@ "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, - { - "name": "skia/bots/gsutil", - "path": "gsutil", - "version": "version:0" - }, { "name": "skia/bots/skimage", "path": "skimage", @@ -60213,7 +58621,12 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" + }, + { + "name": "skia/bots/skparagraph", + "path": "skia/resources/extra_fonts", + "version": "version:4" }, { "name": "skia/bots/svg", @@ -60227,11 +58640,11 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac12-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"extra_config\\\",\\\"Metal\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac12\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtl\\\",\\\"mtlmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac12-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac12-Clang-MacMini9.1-CPU-AppleM1-arm64-Debug-All-NativeFonts_ASAN\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"extra_config\\\",\\\"NativeFonts_ASAN\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac12\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkPDF_JpegIdentification\\\",\\\"--nativeFonts\\\",\\\"--paragraph_fonts\\\",\\\"extra_fonts\\\",\\\"--norun_paragraph_tests_needing_system_fonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac12-Clang-MacMini9.1-CPU-AppleM1-arm64-Debug-All-NativeFonts_ASAN\\\",\\\"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": [ - "Build-Mac-Clang-arm64-Release-Metal", + "Build-Mac-Clang-arm64-Debug-ASAN", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ @@ -60245,7 +58658,6 @@ }, "env_prefixes": { "PATH": [ - "gsutil/gsutil", "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", "cipd_bin_packages", @@ -60264,13 +58676,12 @@ "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" }, "io_timeout_ns": 14400000000000, - "max_attempts": 2, + "max_attempts": 1, "outputs": [ "test" - ], - "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" + ] }, - "Test-Mac13-Clang-MacMini9.1-CPU-AppleM1-arm64-Debug-All-NativeFonts": { + "Test-Mac12-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ANGLE": { "caches": [ { "name": "vpython", @@ -60317,7 +58728,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -60331,16 +58742,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac13-Clang-MacMini9.1-CPU-AppleM1-arm64-Debug-All-NativeFonts\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"extra_config\\\",\\\"NativeFonts\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac13\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac13-Clang-MacMini9.1-CPU-AppleM1-arm64-Debug-All-NativeFonts\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac12-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac12\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_mtl_es2\\\",\\\"angle_mtl_es3\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkSLIntrinsicMixFloatES3_GPU\\\",\\\"angle_mtl_es3\\\",\\\"gm\\\",\\\"_\\\",\\\"runtime_intrinsics_common_es3\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"TransferPixelsToTextureTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"TransferPixelsFromTextureTest\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac12-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ANGLE\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Mac-Clang-arm64-Debug", + "Build-Mac-Clang-arm64-Debug-ANGLE", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ "cpu:arm64-64-Apple_M1", - "os:Mac-13", + "os:Mac-12", "pool:Skia" ], "environment": { @@ -60374,7 +58785,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Mac13-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Metal": { + "Test-Mac12-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Metal": { "caches": [ { "name": "vpython", @@ -60421,7 +58832,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -60435,7 +58846,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac13-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"extra_config\\\",\\\"Metal\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac13\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtl\\\",\\\"mtlmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac13-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac12-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"extra_config\\\",\\\"Metal\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac12\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtl\\\",\\\"mtlmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac12-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ @@ -60444,7 +58855,7 @@ ], "dimensions": [ "cpu:arm64-64-Apple_M1", - "os:Mac-13", + "os:Mac-12", "pool:Skia" ], "environment": { @@ -60478,7 +58889,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Mac13-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-NativeFonts": { + "Test-Mac12-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-NativeFonts": { "caches": [ { "name": "vpython", @@ -60525,7 +58936,12 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" + }, + { + "name": "skia/bots/skparagraph", + "path": "skia/resources/extra_fonts", + "version": "version:4" }, { "name": "skia/bots/svg", @@ -60539,7 +58955,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac13-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-NativeFonts\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"extra_config\\\",\\\"NativeFonts\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac13\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"TransferPixelsFromTextureTest\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac13-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-NativeFonts\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac12-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-NativeFonts\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"extra_config\\\",\\\"NativeFonts\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac12\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"TransferPixelsFromTextureTest\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"--nativeFonts\\\",\\\"--paragraph_fonts\\\",\\\"extra_fonts\\\",\\\"--norun_paragraph_tests_needing_system_fonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac12-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-NativeFonts\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ @@ -60548,7 +58964,7 @@ ], "dimensions": [ "cpu:arm64-64-Apple_M1", - "os:Mac-13", + "os:Mac-12", "pool:Skia" ], "environment": { @@ -60582,7 +58998,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-DDL1": { + "Test-Mac12-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Slug": { "caches": [ { "name": "vpython", @@ -60592,7 +59008,7 @@ "casSpec": "test", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/linux-amd64", + "name": "infra/3pp/tools/cpython3/mac-amd64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, @@ -60629,7 +59045,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -60643,16 +59059,16 @@ "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-Debug-All-DDL1\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"DDL1\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Ubuntu18\\\",\\\"style\\\",\\\"DDL\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--skpViewportSize\\\",\\\"2048\\\",\\\"--config\\\",\\\"gl\\\",\\\"--src\\\",\\\"gm\\\",\\\"skp\\\",\\\"--skip\\\",\\\"gl1010102\\\",\\\"image\\\",\\\"_\\\",\\\"_\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"atlastext\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_b\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_f\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_n_f\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"atlastext\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_b\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_f\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_n_f\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"atlastext\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_b\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_f\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_n_f\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"tessellation\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"tessellation\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"tessellation\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-DDL1\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac12-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Slug\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"extra_config\\\",\\\"Slug\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac12\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"glslug\\\",\\\"glserializeslug\\\",\\\"glremoteslug\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"glremoteslug\\\",\\\"gm\\\",\\\"_\\\",\\\"rtif_distort\\\",\\\"glremoteslug\\\",\\\"gm\\\",\\\"_\\\",\\\"textfilter_image\\\",\\\"glremoteslug\\\",\\\"gm\\\",\\\"_\\\",\\\"textfilter_color\\\",\\\"glremoteslug\\\",\\\"gm\\\",\\\"_\\\",\\\"savelayerpreservelcdtext\\\",\\\"glremoteslug\\\",\\\"gm\\\",\\\"_\\\",\\\"typefacerendering_pfa\\\",\\\"glremoteslug\\\",\\\"gm\\\",\\\"_\\\",\\\"typefacerendering_pfb\\\",\\\"glremoteslug\\\",\\\"gm\\\",\\\"_\\\",\\\"typefacerendering\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"TransferPixelsFromTextureTest\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac12-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Slug\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Debian10-Clang-x86_64-Debug", + "Build-Mac-Clang-arm64-Debug-Slug", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:1cb3-510.60.02", - "os:Ubuntu-18.04", + "cpu:arm64-64-Apple_M1", + "os:Mac-12", "pool:Skia" ], "environment": { @@ -60686,7 +59102,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-DDL1_Vulkan": { + "Test-Mac12-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-ANGLE": { "caches": [ { "name": "vpython", @@ -60696,7 +59112,7 @@ "casSpec": "test", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/linux-amd64", + "name": "infra/3pp/tools/cpython3/mac-amd64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, @@ -60725,11 +59141,6 @@ "path": "gsutil", "version": "version:0" }, - { - "name": "skia/bots/linux_vulkan_sdk", - "path": "linux_vulkan_sdk", - "version": "version:6" - }, { "name": "skia/bots/skimage", "path": "skimage", @@ -60738,7 +59149,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -60752,16 +59163,16 @@ "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-Debug-All-DDL1_Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"DDL1_Vulkan\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Ubuntu18\\\",\\\"style\\\",\\\"DDL\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--skpViewportSize\\\",\\\"2048\\\",\\\"--config\\\",\\\"vk\\\",\\\"--src\\\",\\\"gm\\\",\\\"skp\\\",\\\"--skip\\\",\\\"vk1010102\\\",\\\"image\\\",\\\"_\\\",\\\"_\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-DDL1_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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac12-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac12\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_mtl_es2\\\",\\\"angle_mtl_es3\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkSLIntrinsicMixFloatES3_GPU\\\",\\\"angle_mtl_es3\\\",\\\"gm\\\",\\\"_\\\",\\\"runtime_intrinsics_common_es3\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"TransferPixelsToTextureTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"TransferPixelsFromTextureTest\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac12-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-ANGLE\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Debian10-Clang-x86_64-Debug-Vulkan", + "Build-Mac-Clang-arm64-Release-ANGLE", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:1cb3-510.60.02", - "os:Ubuntu-18.04", + "cpu:arm64-64-Apple_M1", + "os:Mac-12", "pool:Skia" ], "environment": { @@ -60795,7 +59206,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-DDL3_Vulkan": { + "Test-Mac12-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Metal": { "caches": [ { "name": "vpython", @@ -60805,7 +59216,7 @@ "casSpec": "test", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/linux-amd64", + "name": "infra/3pp/tools/cpython3/mac-amd64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, @@ -60834,11 +59245,6 @@ "path": "gsutil", "version": "version:0" }, - { - "name": "skia/bots/linux_vulkan_sdk", - "path": "linux_vulkan_sdk", - "version": "version:6" - }, { "name": "skia/bots/skimage", "path": "skimage", @@ -60847,7 +59253,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -60861,16 +59267,16 @@ "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-Debug-All-DDL3_Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"DDL3_Vulkan\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Ubuntu18\\\",\\\"style\\\",\\\"DDL\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--skpViewportSize\\\",\\\"2048\\\",\\\"--gpuThreads\\\",\\\"0\\\",\\\"--config\\\",\\\"vkddl\\\",\\\"--src\\\",\\\"gm\\\",\\\"skp\\\",\\\"--skip\\\",\\\"vk1010102\\\",\\\"image\\\",\\\"_\\\",\\\"_\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-DDL3_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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac12-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"extra_config\\\",\\\"Metal\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac12\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtl\\\",\\\"mtlmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac12-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Debian10-Clang-x86_64-Debug-Vulkan", + "Build-Mac-Clang-arm64-Release-Metal", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:1cb3-510.60.02", - "os:Ubuntu-18.04", + "cpu:arm64-64-Apple_M1", + "os:Mac-12", "pool:Skia" ], "environment": { @@ -60904,7 +59310,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Dawn": { + "Test-Mac13-Clang-MacMini9.1-CPU-AppleM1-arm64-Debug-All-NativeFonts": { "caches": [ { "name": "vpython", @@ -60914,7 +59320,7 @@ "casSpec": "test", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/linux-amd64", + "name": "infra/3pp/tools/cpython3/mac-amd64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, @@ -60951,7 +59357,12 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" + }, + { + "name": "skia/bots/skparagraph", + "path": "skia/resources/extra_fonts", + "version": "version:4" }, { "name": "skia/bots/svg", @@ -60965,16 +59376,16 @@ "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-Debug-All-Dawn\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"Dawn\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Ubuntu18\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"dawn\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"runtime_intrinsics_matrix\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthrough_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthroughAndVarDecls_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithLoops_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Dawn\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac13-Clang-MacMini9.1-CPU-AppleM1-arm64-Debug-All-NativeFonts\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"extra_config\\\",\\\"NativeFonts\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac13\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"--nativeFonts\\\",\\\"--paragraph_fonts\\\",\\\"extra_fonts\\\",\\\"--norun_paragraph_tests_needing_system_fonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac13-Clang-MacMini9.1-CPU-AppleM1-arm64-Debug-All-NativeFonts\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Debian10-Clang-x86_64-Debug-Dawn", + "Build-Mac-Clang-arm64-Debug", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:1cb3-510.60.02", - "os:Ubuntu-18.04", + "cpu:arm64-64-Apple_M1", + "os:Mac-13", "pool:Skia" ], "environment": { @@ -61008,7 +59419,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-PreAbandonGpuContext": { + "Test-Mac13-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Graphite_Metal_Vello": { "caches": [ { "name": "vpython", @@ -61018,7 +59429,7 @@ "casSpec": "test", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/linux-amd64", + "name": "infra/3pp/tools/cpython3/mac-amd64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, @@ -61042,6 +59453,11 @@ "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, + { + "name": "skia/bots/gsutil", + "path": "gsutil", + "version": "version:0" + }, { "name": "skia/bots/skimage", "path": "skimage", @@ -61050,7 +59466,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -61064,16 +59480,16 @@ "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-Debug-All-PreAbandonGpuContext\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"PreAbandonGpuContext\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Ubuntu18\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"gldmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\",\\\"--preAbandonGpuContext\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-PreAbandonGpuContext\\\",\\\"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-Mac13-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Graphite_Metal_Vello\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"extra_config\\\",\\\"Graphite_Metal_Vello\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac13\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"grmtl\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"image_subset\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"hugebitmapshader\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_no_bleed\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_down\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_up\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_rose\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"--match\\\",\\\"~^verylarge_picture_image$\\\",\\\"~^verylargebitmap$\\\",\\\"~^path_huge_aa$\\\",\\\"~^fast_constraint_red_is_allowed$\\\",\\\"~^strict_constraint_batch_no_red_allowed$\\\",\\\"~^strict_constraint_no_red_allowed$\\\",\\\"~async_rescale_and_read\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac13-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Graphite_Metal_Vello\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Debian10-Clang-x86_64-Debug", + "Build-Mac-Clang-arm64-Debug-Graphite_Metal_Vello", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:1cb3-510.60.02", - "os:Ubuntu-18.04", + "cpu:arm64-64-Apple_M1", + "os:Mac-13", "pool:Skia" ], "environment": { @@ -61082,6 +59498,7 @@ }, "env_prefixes": { "PATH": [ + "gsutil/gsutil", "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", "cipd_bin_packages", @@ -61103,9 +59520,10 @@ "max_attempts": 2, "outputs": [ "test" - ] + ], + "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Vulkan": { + "Test-Mac13-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Metal": { "caches": [ { "name": "vpython", @@ -61115,7 +59533,7 @@ "casSpec": "test", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/linux-amd64", + "name": "infra/3pp/tools/cpython3/mac-amd64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, @@ -61145,9 +59563,108 @@ "version": "version:0" }, { - "name": "skia/bots/linux_vulkan_sdk", - "path": "linux_vulkan_sdk", - "version": "version:6" + "name": "skia/bots/skimage", + "path": "skimage", + "version": "version:47" + }, + { + "name": "skia/bots/skp", + "path": "skp", + "version": "version:438" + }, + { + "name": "skia/bots/svg", + "path": "svg", + "version": "version:14" + } + ], + "command": [ + "cipd_bin_packages/vpython3${EXECUTABLE_SUFFIX}", + "-u", + "skia/infra/bots/run_recipe.py", + "${ISOLATED_OUTDIR}", + "test", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Mac13-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"extra_config\\\",\\\"Metal\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac13\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtl\\\",\\\"mtlmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac13-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ + "Build-Mac-Clang-arm64-Debug-Metal", + "Housekeeper-PerCommit-BundleRecipes" + ], + "dimensions": [ + "cpu:arm64-64-Apple_M1", + "os:Mac-13", + "pool:Skia" + ], + "environment": { + "RECIPES_USE_PY3": "true", + "VPYTHON_LOG_TRACE": "1" + }, + "env_prefixes": { + "PATH": [ + "gsutil/gsutil", + "cipd_bin_packages/cpython3", + "cipd_bin_packages/cpython3/bin", + "cipd_bin_packages", + "cipd_bin_packages/bin" + ], + "VPYTHON_DEFAULT_SPEC": [ + "skia/.vpython" + ], + "VPYTHON_VIRTUALENV_ROOT": [ + "cache/vpython" + ] + }, + "execution_timeout_ns": 14400000000000, + "expiration_ns": 72000000000000, + "extra_tags": { + "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" + }, + "io_timeout_ns": 14400000000000, + "max_attempts": 2, + "outputs": [ + "test" + ], + "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" + }, + "Test-Mac13-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-NativeFonts": { + "caches": [ + { + "name": "vpython", + "path": "cache/vpython" + } + ], + "casSpec": "test", + "cipd_packages": [ + { + "name": "infra/3pp/tools/cpython3/mac-amd64", + "path": "cipd_bin_packages/cpython3", + "version": "version:2@3.8.10.chromium.19" + }, + { + "name": "infra/tools/luci-auth/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/kitchen/${platform}", + "path": ".", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/vpython-native/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/vpython/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "skia/bots/gsutil", + "path": "gsutil", + "version": "version:0" }, { "name": "skia/bots/skimage", @@ -61157,7 +59674,12 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" + }, + { + "name": "skia/bots/skparagraph", + "path": "skia/resources/extra_fonts", + "version": "version:4" }, { "name": "skia/bots/svg", @@ -61171,16 +59693,16 @@ "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-Debug-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Ubuntu18\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"vkdmsaa\\\",\\\"vk1010102\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"vk1010102\\\",\\\"image\\\",\\\"_\\\",\\\"_\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Mac13-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-NativeFonts\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleM1\\\",\\\"extra_config\\\",\\\"NativeFonts\\\",\\\"model\\\",\\\"MacMini9.1\\\",\\\"os\\\",\\\"Mac13\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"TransferPixelsFromTextureTest\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"--nativeFonts\\\",\\\"--paragraph_fonts\\\",\\\"extra_fonts\\\",\\\"--norun_paragraph_tests_needing_system_fonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Mac13-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-NativeFonts\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Debian10-Clang-x86_64-Debug-Vulkan", + "Build-Mac-Clang-arm64-Debug", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:1cb3-510.60.02", - "os:Ubuntu-18.04", + "cpu:arm64-64-Apple_M1", + "os:Mac-13", "pool:Skia" ], "environment": { @@ -61214,7 +59736,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All": { + "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-DDL1": { "caches": [ { "name": "vpython", @@ -61261,7 +59783,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -61275,11 +59797,11 @@ "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\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Ubuntu18\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"gldmsaa\\\",\\\"gl1010102\\\",\\\"gltestpersistentcache\\\",\\\"gltestglslcache\\\",\\\"gltestprecompile\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"gl1010102\\\",\\\"image\\\",\\\"_\\\",\\\"_\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"atlastext\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_b\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_f\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_n_f\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"atlastext\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_b\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_f\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_n_f\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"atlastext\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_b\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_f\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_n_f\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"tessellation\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"tessellation\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"tessellation\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Debug-All-DDL1\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"DDL1\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Ubuntu18\\\",\\\"style\\\",\\\"DDL\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--skpViewportSize\\\",\\\"2048\\\",\\\"--config\\\",\\\"gl\\\",\\\"--src\\\",\\\"gm\\\",\\\"skp\\\",\\\"--skip\\\",\\\"gl1010102\\\",\\\"image\\\",\\\"_\\\",\\\"_\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"atlastext\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_b\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_f\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_n_f\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"atlastext\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_b\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_f\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_n_f\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"atlastext\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_b\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_f\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_n_f\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"tessellation\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"tessellation\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"tessellation\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-DDL1\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Debian10-Clang-x86_64-Release", + "Build-Debian10-Clang-x86_64-Debug", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ @@ -61318,7 +59840,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-DDL3_TSAN": { + "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-DDL1_Vulkan": { "caches": [ { "name": "vpython", @@ -61353,9 +59875,14 @@ "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, { - "name": "skia/bots/clang_linux", - "path": "clang_linux", - "version": "version:30" + "name": "skia/bots/gsutil", + "path": "gsutil", + "version": "version:0" + }, + { + "name": "skia/bots/linux_vulkan_sdk", + "path": "linux_vulkan_sdk", + "version": "version:6" }, { "name": "skia/bots/skimage", @@ -61365,7 +59892,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -61379,11 +59906,11 @@ "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-DDL3_TSAN\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"DDL3_TSAN\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Ubuntu18\\\",\\\"style\\\",\\\"DDL\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--skpViewportSize\\\",\\\"2048\\\",\\\"--gpuThreads\\\",\\\"0\\\",\\\"--config\\\",\\\"glddl\\\",\\\"--src\\\",\\\"gm\\\",\\\"skp\\\",\\\"--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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-DDL3_TSAN\\\",\\\"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-Debug-All-DDL1_Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"DDL1_Vulkan\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Ubuntu18\\\",\\\"style\\\",\\\"DDL\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--skpViewportSize\\\",\\\"2048\\\",\\\"--config\\\",\\\"vk\\\",\\\"--src\\\",\\\"gm\\\",\\\"skp\\\",\\\"--skip\\\",\\\"vk1010102\\\",\\\"image\\\",\\\"_\\\",\\\"_\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-DDL1_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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Debian10-Clang-x86_64-Release-TSAN", + "Build-Debian10-Clang-x86_64-Debug-Vulkan", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ @@ -61397,6 +59924,7 @@ }, "env_prefixes": { "PATH": [ + "gsutil/gsutil", "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", "cipd_bin_packages", @@ -61415,12 +59943,13 @@ "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" }, "io_timeout_ns": 14400000000000, - "max_attempts": 1, + "max_attempts": 2, "outputs": [ "test" - ] + ], + "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-PreAbandonGpuContext": { + "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-DDL3_Vulkan": { "caches": [ { "name": "vpython", @@ -61454,6 +59983,16 @@ "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, + { + "name": "skia/bots/gsutil", + "path": "gsutil", + "version": "version:0" + }, + { + "name": "skia/bots/linux_vulkan_sdk", + "path": "linux_vulkan_sdk", + "version": "version:6" + }, { "name": "skia/bots/skimage", "path": "skimage", @@ -61462,7 +60001,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -61476,11 +60015,11 @@ "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-PreAbandonGpuContext\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"PreAbandonGpuContext\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Ubuntu18\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"gldmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\",\\\"--preAbandonGpuContext\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-PreAbandonGpuContext\\\",\\\"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-Debug-All-DDL3_Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"DDL3_Vulkan\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Ubuntu18\\\",\\\"style\\\",\\\"DDL\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--skpViewportSize\\\",\\\"2048\\\",\\\"--gpuThreads\\\",\\\"0\\\",\\\"--config\\\",\\\"vkddl\\\",\\\"--src\\\",\\\"gm\\\",\\\"skp\\\",\\\"--skip\\\",\\\"vk1010102\\\",\\\"image\\\",\\\"_\\\",\\\"_\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-DDL3_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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Debian10-Clang-x86_64-Release", + "Build-Debian10-Clang-x86_64-Debug-Vulkan", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ @@ -61494,6 +60033,7 @@ }, "env_prefixes": { "PATH": [ + "gsutil/gsutil", "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", "cipd_bin_packages", @@ -61515,9 +60055,10 @@ "max_attempts": 2, "outputs": [ "test" - ] + ], + "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Valgrind_AbandonGpuContext_SK_CPU_LIMIT_SSE41": { + "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Dawn": { "caches": [ { "name": "vpython", @@ -61551,6 +60092,11 @@ "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, + { + "name": "skia/bots/gsutil", + "path": "gsutil", + "version": "version:0" + }, { "name": "skia/bots/skimage", "path": "skimage", @@ -61559,17 +60105,12 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", "path": "svg", "version": "version:14" - }, - { - "name": "skia/bots/valgrind", - "path": "valgrind", - "version": "version:9" } ], "command": [ @@ -61578,18 +60119,17 @@ "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-Valgrind_AbandonGpuContext_SK_CPU_LIMIT_SSE41\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"Valgrind_AbandonGpuContext_SK_CPU_LIMIT_SSE41\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Ubuntu18\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"gldmsaa\\\",\\\"gl1010102\\\",\\\"gltestpersistentcache\\\",\\\"gltestglslcache\\\",\\\"gltestprecompile\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"gl1010102\\\",\\\"image\\\",\\\"_\\\",\\\"_\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"atlastext\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_b\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_f\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_n_f\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"atlastext\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_b\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_f\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_n_f\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"atlastext\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_b\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_f\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_n_f\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"tessellation\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"tessellation\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"tessellation\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"_\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"InitialTextureClear\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"--match\\\",\\\"~Threaded\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\",\\\"--abandonGpuContext\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Valgrind_AbandonGpuContext_SK_CPU_LIMIT_SSE41\\\",\\\"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-Debug-All-Dawn\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"Dawn\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Ubuntu18\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"dawn\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkSLIntrinsicMatrixCompMultES2_GPU\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthrough_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthroughAndVarDecls_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithLoops_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Dawn\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Debian10-Clang-x86_64-Release-SK_CPU_LIMIT_SSE41", + "Build-Debian10-Clang-x86_64-Debug-Dawn", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ "gpu:10de:1cb3-510.60.02", "os:Ubuntu-18.04", - "pool:Skia", - "valgrind:1" + "pool:Skia" ], "environment": { "RECIPES_USE_PY3": "true", @@ -61597,6 +60137,7 @@ }, "env_prefixes": { "PATH": [ + "gsutil/gsutil", "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", "cipd_bin_packages", @@ -61609,18 +60150,19 @@ "cache/vpython" ] }, - "execution_timeout_ns": 32400000000000, - "expiration_ns": 172800000000000, + "execution_timeout_ns": 14400000000000, + "expiration_ns": 72000000000000, "extra_tags": { "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" }, - "io_timeout_ns": 32400000000000, - "max_attempts": 1, + "io_timeout_ns": 14400000000000, + "max_attempts": 2, "outputs": [ "test" - ] + ], + "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Valgrind_PreAbandonGpuContext_SK_CPU_LIMIT_SSE41": { + "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Graphite_Vulkan": { "caches": [ { "name": "vpython", @@ -61654,6 +60196,16 @@ "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, + { + "name": "skia/bots/gsutil", + "path": "gsutil", + "version": "version:0" + }, + { + "name": "skia/bots/linux_vulkan_sdk", + "path": "linux_vulkan_sdk", + "version": "version:6" + }, { "name": "skia/bots/skimage", "path": "skimage", @@ -61662,17 +60214,12 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", "path": "svg", "version": "version:14" - }, - { - "name": "skia/bots/valgrind", - "path": "valgrind", - "version": "version:9" } ], "command": [ @@ -61681,18 +60228,17 @@ "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-Valgrind_PreAbandonGpuContext_SK_CPU_LIMIT_SSE41\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"Valgrind_PreAbandonGpuContext_SK_CPU_LIMIT_SSE41\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Ubuntu18\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"gldmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"_\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"InitialTextureClear\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"--match\\\",\\\"~Threaded\\\",\\\"~multipicturedraw_\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\",\\\"--preAbandonGpuContext\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Valgrind_PreAbandonGpuContext_SK_CPU_LIMIT_SSE41\\\",\\\"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-Debug-All-Graphite_Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"Graphite_Vulkan\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Ubuntu18\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"grvk\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"image_subset\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"hugebitmapshader\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_no_bleed\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_down\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_up\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_rose\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"aaxfermodes\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Graphite\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"DeviceTestVertexTransparency\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GraphitePromiseImageMultipleImgUses\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GraphitePromiseImageRecorderLoss\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GraphitePurgeNotUsedSinceResourcesTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GraphiteTextureProxyTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GraphiteYUVAPromiseImageMultipleImgUses\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GraphiteYUVAPromiseImageRecorderLoss\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"ImageProviderTest_Graphite_Testing\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"ImageProviderTest_Graphite_Default\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"MakeColorSpace_Test\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"ImageProviderTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"ImageShaderTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"MutableImagesTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"MultisampleRetainTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"NonVolatileGraphitePromiseImageTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"NonVolatileGraphiteYUVAPromiseImageTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"PaintParamsKeyTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"RecordingOrderTest_Graphite\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"RecordingSurfacesTestClear\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"ShaderTestNestedBlendsGraphite\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkRuntimeEffectSimple_Graphite\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"VolatileGraphiteYUVAPromiseImageTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"VolatileGraphitePromiseImageTest\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"--match\\\",\\\"~^verylarge_picture_image$\\\",\\\"~^verylargebitmap$\\\",\\\"~^path_huge_aa$\\\",\\\"~^fast_constraint_red_is_allowed$\\\",\\\"~^strict_constraint_batch_no_red_allowed$\\\",\\\"~^strict_constraint_no_red_allowed$\\\",\\\"~async_rescale_and_read\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Graphite_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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Debian10-Clang-x86_64-Release-SK_CPU_LIMIT_SSE41", + "Build-Debian10-Clang-x86_64-Debug-Graphite_Vulkan", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ "gpu:10de:1cb3-510.60.02", "os:Ubuntu-18.04", - "pool:Skia", - "valgrind:1" + "pool:Skia" ], "environment": { "RECIPES_USE_PY3": "true", @@ -61700,6 +60246,7 @@ }, "env_prefixes": { "PATH": [ + "gsutil/gsutil", "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", "cipd_bin_packages", @@ -61712,18 +60259,19 @@ "cache/vpython" ] }, - "execution_timeout_ns": 32400000000000, - "expiration_ns": 172800000000000, + "execution_timeout_ns": 14400000000000, + "expiration_ns": 72000000000000, "extra_tags": { "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" }, - "io_timeout_ns": 32400000000000, - "max_attempts": 1, + "io_timeout_ns": 14400000000000, + "max_attempts": 2, "outputs": [ "test" - ] + ], + "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Valgrind_SK_CPU_LIMIT_SSE41": { + "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-PreAbandonGpuContext": { "caches": [ { "name": "vpython", @@ -61765,17 +60313,12 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", "path": "svg", "version": "version:14" - }, - { - "name": "skia/bots/valgrind", - "path": "valgrind", - "version": "version:9" } ], "command": [ @@ -61784,18 +60327,17 @@ "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-Valgrind_SK_CPU_LIMIT_SSE41\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"Valgrind_SK_CPU_LIMIT_SSE41\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Ubuntu18\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"gldmsaa\\\",\\\"gl1010102\\\",\\\"gltestpersistentcache\\\",\\\"gltestglslcache\\\",\\\"gltestprecompile\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"gl1010102\\\",\\\"image\\\",\\\"_\\\",\\\"_\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"atlastext\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_b\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_f\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_n_f\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"atlastext\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_b\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_f\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_n_f\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"atlastext\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_b\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_f\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_n_f\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"tessellation\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"tessellation\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"tessellation\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"_\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"InitialTextureClear\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"--match\\\",\\\"~Threaded\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Valgrind_SK_CPU_LIMIT_SSE41\\\",\\\"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-Debug-All-PreAbandonGpuContext\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"PreAbandonGpuContext\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Ubuntu18\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"gldmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\",\\\"--preAbandonGpuContext\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-PreAbandonGpuContext\\\",\\\"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": [ - "Build-Debian10-Clang-x86_64-Release-SK_CPU_LIMIT_SSE41", + "Build-Debian10-Clang-x86_64-Debug", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ "gpu:10de:1cb3-510.60.02", "os:Ubuntu-18.04", - "pool:Skia", - "valgrind:1" + "pool:Skia" ], "environment": { "RECIPES_USE_PY3": "true", @@ -61815,18 +60357,18 @@ "cache/vpython" ] }, - "execution_timeout_ns": 32400000000000, - "expiration_ns": 172800000000000, + "execution_timeout_ns": 14400000000000, + "expiration_ns": 72000000000000, "extra_tags": { "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" }, - "io_timeout_ns": 32400000000000, - "max_attempts": 1, + "io_timeout_ns": 14400000000000, + "max_attempts": 2, "outputs": [ "test" ] }, - "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Vulkan": { + "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Vulkan": { "caches": [ { "name": "vpython", @@ -61878,7 +60420,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -61892,11 +60434,11 @@ "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-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Ubuntu18\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"vkdmsaa\\\",\\\"vk1010102\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"vk1010102\\\",\\\"image\\\",\\\"_\\\",\\\"_\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Debug-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Ubuntu18\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"vkdmsaa\\\",\\\"vk1010102\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"vk1010102\\\",\\\"image\\\",\\\"_\\\",\\\"_\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Debian10-Clang-x86_64-Release-Vulkan", + "Build-Debian10-Clang-x86_64-Debug-Vulkan", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ @@ -61935,96 +60477,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Ubuntu18-EMCC-Golo-GPU-QuadroP400-wasm-Release-All-WasmGMTests_WebGL2": { - "casSpec": "wasm-gm", - "cipd_packages": [ - { - "name": "infra/tools/luci-auth/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "skia/bots/node", - "path": "node", - "version": "version:3" - }, - { - "name": "skia/tools/goldctl/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:9f6c2de25cce548433f4d0301bbde675a65a2f95" - } - ], - "command": [ - "./run_wasm_gm_tests", - "--project_id", - "skia-swarming-bots", - "--task_id", - "<(TASK_ID)", - "--task_name", - "Test-Ubuntu18-EMCC-Golo-GPU-QuadroP400-wasm-Release-All-WasmGMTests_WebGL2", - "--test_harness_path", - "./tools/run-wasm-gm-tests", - "--built_path", - "./wasm_out", - "--node_bin_path", - "./node/node/bin", - "--resource_path", - "./resources", - "--work_path", - "./wasm_gm/work", - "--gold_ctl_path", - "./cipd_bin_packages/goldctl", - "--gold_hashes_url", - "https://gold.skia.org/json/v1/hashes", - "--git_commit", - "<(REVISION)", - "--changelist_id", - "<(ISSUE)", - "--patchset_order", - "<(PATCHSET)", - "--tryjob_id", - "<(BUILDBUCKET_BUILD_ID)", - "--webgl_version", - "2", - "--gold_key", - "alpha_type:Premul", - "--gold_key", - "arch:wasm", - "--gold_key", - "browser:Chrome", - "--gold_key", - "color_depth:8888", - "--gold_key", - "config:gles", - "--gold_key", - "configuration:Release", - "--gold_key", - "cpu_or_gpu_value:QuadroP400", - "--gold_key", - "model:Golo", - "--gold_key", - "os:Ubuntu18" - ], - "dependencies": [ - "Build-Debian10-EMCC-wasm-Release-WasmGMTests", - "Housekeeper-PerCommit-BuildTaskDrivers_linux_amd64" - ], - "dimensions": [ - "gpu:10de:1cb3-510.60.02", - "os:Ubuntu-18.04", - "pool:Skia" - ], - "env_prefixes": { - "PATH": [ - "node/node/bin" - ] - }, - "execution_timeout_ns": 3600000000000, - "io_timeout_ns": 3600000000000, - "max_attempts": 1, - "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" - }, - "Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All": { + "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -62034,7 +60487,7 @@ "casSpec": "test", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/windows-amd64", + "name": "infra/3pp/tools/cpython3/linux-amd64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, @@ -62058,6 +60511,11 @@ "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, + { + "name": "skia/bots/gsutil", + "path": "gsutil", + "version": "version:0" + }, { "name": "skia/bots/skimage", "path": "skimage", @@ -62066,7 +60524,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -62080,16 +60538,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonR9M470X\\\",\\\"model\\\",\\\"AlphaR2\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicAll_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All\\\",\\\"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\":\"true\",\"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\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Ubuntu18\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"gldmsaa\\\",\\\"gl1010102\\\",\\\"gltestpersistentcache\\\",\\\"gltestglslcache\\\",\\\"gltestprecompile\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"gl1010102\\\",\\\"image\\\",\\\"_\\\",\\\"_\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"atlastext\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_b\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_f\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_n_f\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"atlastext\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_b\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_f\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_n_f\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"atlastext\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_b\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_f\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_n_f\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"tessellation\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"tessellation\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"tessellation\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Win-Clang-x86_64-Debug", + "Build-Debian10-Clang-x86_64-Release", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:1002:6646-26.20.13031.18002", - "os:Windows-10-19045", + "gpu:10de:1cb3-510.60.02", + "os:Ubuntu-18.04", "pool:Skia" ], "environment": { @@ -62098,6 +60556,7 @@ }, "env_prefixes": { "PATH": [ + "gsutil/gsutil", "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", "cipd_bin_packages", @@ -62119,9 +60578,10 @@ "max_attempts": 2, "outputs": [ "test" - ] + ], + "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE": { + "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-DDL3_TSAN": { "caches": [ { "name": "vpython", @@ -62131,7 +60591,7 @@ "casSpec": "test", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/windows-amd64", + "name": "infra/3pp/tools/cpython3/linux-amd64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, @@ -62155,6 +60615,11 @@ "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, + { + "name": "skia/bots/clang_linux", + "path": "clang_linux", + "version": "version:30" + }, { "name": "skia/bots/skimage", "path": "skimage", @@ -62163,7 +60628,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -62177,16 +60642,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonR9M470X\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"AlphaR2\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_d3d11_es2\\\",\\\"angle_d3d11_es3\\\",\\\"angle_d3d11_es2_msaa4\\\",\\\"angle_d3d11_es2_dmsaa\\\",\\\"angle_d3d11_es3_msaa4\\\",\\\"angle_d3d11_es3_dmsaa\\\",\\\"angle_d3d9_es2\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicAll_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"FilterResult\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkRuntimeEffectSimple_GPU\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE\\\",\\\"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\":\"true\",\"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-DDL3_TSAN\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"DDL3_TSAN\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Ubuntu18\\\",\\\"style\\\",\\\"DDL\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--skpViewportSize\\\",\\\"2048\\\",\\\"--gpuThreads\\\",\\\"0\\\",\\\"--config\\\",\\\"glddl\\\",\\\"--src\\\",\\\"gm\\\",\\\"skp\\\",\\\"--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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-DDL3_TSAN\\\",\\\"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": [ - "Build-Win-Clang-x86_64-Debug-ANGLE", + "Build-Debian10-Clang-x86_64-Release-TSAN", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:1002:6646-26.20.13031.18002", - "os:Windows-10-19045", + "gpu:10de:1cb3-510.60.02", + "os:Ubuntu-18.04", "pool:Skia" ], "environment": { @@ -62213,12 +60678,12 @@ "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" }, "io_timeout_ns": 14400000000000, - "max_attempts": 2, + "max_attempts": 1, "outputs": [ "test" ] }, - "Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-Vulkan": { + "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Graphite_Vulkan": { "caches": [ { "name": "vpython", @@ -62228,7 +60693,7 @@ "casSpec": "test", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/windows-amd64", + "name": "infra/3pp/tools/cpython3/linux-amd64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, @@ -62252,6 +60717,16 @@ "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, + { + "name": "skia/bots/gsutil", + "path": "gsutil", + "version": "version:0" + }, + { + "name": "skia/bots/linux_vulkan_sdk", + "path": "linux_vulkan_sdk", + "version": "version:6" + }, { "name": "skia/bots/skimage", "path": "skimage", @@ -62260,7 +60735,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -62274,16 +60749,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonR9M470X\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"AlphaR2\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"VkDrawableImportTest\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-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\":\"true\",\"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-Graphite_Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"Graphite_Vulkan\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Ubuntu18\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"grvk\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"image_subset\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"hugebitmapshader\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_no_bleed\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_down\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_up\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_rose\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"aaxfermodes\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Graphite\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"DeviceTestVertexTransparency\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GraphitePromiseImageMultipleImgUses\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GraphitePromiseImageRecorderLoss\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GraphitePurgeNotUsedSinceResourcesTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GraphiteTextureProxyTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GraphiteYUVAPromiseImageMultipleImgUses\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GraphiteYUVAPromiseImageRecorderLoss\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"ImageProviderTest_Graphite_Testing\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"ImageProviderTest_Graphite_Default\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"MakeColorSpace_Test\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"ImageProviderTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"ImageShaderTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"MutableImagesTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"MultisampleRetainTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"NonVolatileGraphitePromiseImageTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"NonVolatileGraphiteYUVAPromiseImageTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"PaintParamsKeyTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"RecordingOrderTest_Graphite\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"RecordingSurfacesTestClear\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"ShaderTestNestedBlendsGraphite\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkRuntimeEffectSimple_Graphite\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"VolatileGraphiteYUVAPromiseImageTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"VolatileGraphitePromiseImageTest\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"--match\\\",\\\"~^verylarge_picture_image$\\\",\\\"~^verylargebitmap$\\\",\\\"~^path_huge_aa$\\\",\\\"~^fast_constraint_red_is_allowed$\\\",\\\"~^strict_constraint_batch_no_red_allowed$\\\",\\\"~^strict_constraint_no_red_allowed$\\\",\\\"~async_rescale_and_read\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Graphite_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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Win-Clang-x86_64-Debug-Vulkan", + "Build-Debian10-Clang-x86_64-Release-Graphite_Vulkan", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:1002:6646-26.20.13031.18002", - "os:Windows-10-19045", + "gpu:10de:1cb3-510.60.02", + "os:Ubuntu-18.04", "pool:Skia" ], "environment": { @@ -62292,6 +60767,7 @@ }, "env_prefixes": { "PATH": [ + "gsutil/gsutil", "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", "cipd_bin_packages", @@ -62313,9 +60789,10 @@ "max_attempts": 2, "outputs": [ "test" - ] + ], + "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-All": { + "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-PreAbandonGpuContext": { "caches": [ { "name": "vpython", @@ -62325,7 +60802,7 @@ "casSpec": "test", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/windows-amd64", + "name": "infra/3pp/tools/cpython3/linux-amd64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, @@ -62357,7 +60834,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -62371,16 +60848,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonR9M470X\\\",\\\"model\\\",\\\"AlphaR2\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicAll_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-All\\\",\\\"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\":\"true\",\"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-PreAbandonGpuContext\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"PreAbandonGpuContext\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Ubuntu18\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"gldmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\",\\\"--preAbandonGpuContext\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-PreAbandonGpuContext\\\",\\\"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": [ - "Build-Win-Clang-x86_64-Release", + "Build-Debian10-Clang-x86_64-Release", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:1002:6646-26.20.13031.18002", - "os:Windows-10-19045", + "gpu:10de:1cb3-510.60.02", + "os:Ubuntu-18.04", "pool:Skia" ], "environment": { @@ -62412,7 +60889,7 @@ "test" ] }, - "Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-All-ANGLE": { + "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Valgrind_AbandonGpuContext_SK_CPU_LIMIT_SSE41": { "caches": [ { "name": "vpython", @@ -62422,7 +60899,7 @@ "casSpec": "test", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/windows-amd64", + "name": "infra/3pp/tools/cpython3/linux-amd64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, @@ -62454,12 +60931,17 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", "path": "svg", "version": "version:14" + }, + { + "name": "skia/bots/valgrind", + "path": "valgrind", + "version": "version:9" } ], "command": [ @@ -62468,17 +60950,18 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonR9M470X\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"AlphaR2\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_d3d11_es2\\\",\\\"angle_d3d11_es3\\\",\\\"angle_d3d11_es2_msaa4\\\",\\\"angle_d3d11_es2_dmsaa\\\",\\\"angle_d3d11_es3_msaa4\\\",\\\"angle_d3d11_es3_dmsaa\\\",\\\"angle_d3d9_es2\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicAll_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"FilterResult\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkRuntimeEffectSimple_GPU\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-All-ANGLE\\\",\\\"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\":\"true\",\"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-Valgrind_AbandonGpuContext_SK_CPU_LIMIT_SSE41\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"Valgrind_AbandonGpuContext_SK_CPU_LIMIT_SSE41\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Ubuntu18\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"gldmsaa\\\",\\\"gl1010102\\\",\\\"gltestpersistentcache\\\",\\\"gltestglslcache\\\",\\\"gltestprecompile\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"gl1010102\\\",\\\"image\\\",\\\"_\\\",\\\"_\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"atlastext\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_b\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_f\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_n_f\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"atlastext\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_b\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_f\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_n_f\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"atlastext\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_b\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_f\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_n_f\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"tessellation\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"tessellation\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"tessellation\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"_\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"InitialTextureClear\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"--match\\\",\\\"~Threaded\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\",\\\"--abandonGpuContext\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Valgrind_AbandonGpuContext_SK_CPU_LIMIT_SSE41\\\",\\\"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": [ - "Build-Win-Clang-x86_64-Release-ANGLE", + "Build-Debian10-Clang-x86_64-Release-SK_CPU_LIMIT_SSE41", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:1002:6646-26.20.13031.18002", - "os:Windows-10-19045", - "pool:Skia" + "gpu:10de:1cb3-510.60.02", + "os:Ubuntu-18.04", + "pool:Skia", + "valgrind:1" ], "environment": { "RECIPES_USE_PY3": "true", @@ -62498,18 +60981,18 @@ "cache/vpython" ] }, - "execution_timeout_ns": 14400000000000, - "expiration_ns": 72000000000000, + "execution_timeout_ns": 32400000000000, + "expiration_ns": 172800000000000, "extra_tags": { "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" }, - "io_timeout_ns": 14400000000000, - "max_attempts": 2, + "io_timeout_ns": 32400000000000, + "max_attempts": 1, "outputs": [ "test" ] }, - "Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-All-Vulkan": { + "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Valgrind_PreAbandonGpuContext_SK_CPU_LIMIT_SSE41": { "caches": [ { "name": "vpython", @@ -62519,7 +61002,7 @@ "casSpec": "test", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/windows-amd64", + "name": "infra/3pp/tools/cpython3/linux-amd64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, @@ -62551,12 +61034,17 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", "path": "svg", "version": "version:14" + }, + { + "name": "skia/bots/valgrind", + "path": "valgrind", + "version": "version:9" } ], "command": [ @@ -62565,17 +61053,18 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonR9M470X\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"AlphaR2\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"VkDrawableImportTest\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-All-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\":\"true\",\"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-Valgrind_PreAbandonGpuContext_SK_CPU_LIMIT_SSE41\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"Valgrind_PreAbandonGpuContext_SK_CPU_LIMIT_SSE41\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Ubuntu18\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"gldmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"_\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"InitialTextureClear\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"--match\\\",\\\"~Threaded\\\",\\\"~multipicturedraw_\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\",\\\"--preAbandonGpuContext\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Valgrind_PreAbandonGpuContext_SK_CPU_LIMIT_SSE41\\\",\\\"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": [ - "Build-Win-Clang-x86_64-Release-Vulkan", + "Build-Debian10-Clang-x86_64-Release-SK_CPU_LIMIT_SSE41", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:1002:6646-26.20.13031.18002", - "os:Windows-10-19045", - "pool:Skia" + "gpu:10de:1cb3-510.60.02", + "os:Ubuntu-18.04", + "pool:Skia", + "valgrind:1" ], "environment": { "RECIPES_USE_PY3": "true", @@ -62595,18 +61084,18 @@ "cache/vpython" ] }, - "execution_timeout_ns": 14400000000000, - "expiration_ns": 72000000000000, + "execution_timeout_ns": 32400000000000, + "expiration_ns": 172800000000000, "extra_tags": { "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" }, - "io_timeout_ns": 14400000000000, - "max_attempts": 2, + "io_timeout_ns": 32400000000000, + "max_attempts": 1, "outputs": [ "test" ] }, - "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All": { + "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Valgrind_SK_CPU_LIMIT_SSE41": { "caches": [ { "name": "vpython", @@ -62616,7 +61105,7 @@ "casSpec": "test", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/windows-amd64", + "name": "infra/3pp/tools/cpython3/linux-amd64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, @@ -62648,12 +61137,17 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", "path": "svg", "version": "version:14" + }, + { + "name": "skia/bots/valgrind", + "path": "valgrind", + "version": "version:9" } ], "command": [ @@ -62662,17 +61156,18 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"gldmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All\\\",\\\"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\":\"true\",\"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-Valgrind_SK_CPU_LIMIT_SSE41\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"Valgrind_SK_CPU_LIMIT_SSE41\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Ubuntu18\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"gldmsaa\\\",\\\"gl1010102\\\",\\\"gltestpersistentcache\\\",\\\"gltestglslcache\\\",\\\"gltestprecompile\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"gl1010102\\\",\\\"image\\\",\\\"_\\\",\\\"_\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"atlastext\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_b\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_f\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_n_f\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"atlastext\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_b\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_f\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_n_f\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"atlastext\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_b\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_f\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_n_f\\\",\\\"gltestpersistentcache\\\",\\\"gm\\\",\\\"_\\\",\\\"tessellation\\\",\\\"gltestglslcache\\\",\\\"gm\\\",\\\"_\\\",\\\"tessellation\\\",\\\"gltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"tessellation\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"_\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"InitialTextureClear\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"--match\\\",\\\"~Threaded\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Valgrind_SK_CPU_LIMIT_SSE41\\\",\\\"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": [ - "Build-Win-Clang-x86_64-Debug", + "Build-Debian10-Clang-x86_64-Release-SK_CPU_LIMIT_SSE41", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:1cb3-30.0.15.1179", - "os:Windows-10-19043", - "pool:Skia" + "gpu:10de:1cb3-510.60.02", + "os:Ubuntu-18.04", + "pool:Skia", + "valgrind:1" ], "environment": { "RECIPES_USE_PY3": "true", @@ -62692,18 +61187,18 @@ "cache/vpython" ] }, - "execution_timeout_ns": 14400000000000, - "expiration_ns": 72000000000000, + "execution_timeout_ns": 32400000000000, + "expiration_ns": 172800000000000, "extra_tags": { "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" }, - "io_timeout_ns": 14400000000000, - "max_attempts": 2, + "io_timeout_ns": 32400000000000, + "max_attempts": 1, "outputs": [ "test" ] }, - "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE": { + "Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Vulkan": { "caches": [ { "name": "vpython", @@ -62713,7 +61208,7 @@ "casSpec": "test", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/windows-amd64", + "name": "infra/3pp/tools/cpython3/linux-amd64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, @@ -62737,6 +61232,16 @@ "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, + { + "name": "skia/bots/gsutil", + "path": "gsutil", + "version": "version:0" + }, + { + "name": "skia/bots/linux_vulkan_sdk", + "path": "linux_vulkan_sdk", + "version": "version:6" + }, { "name": "skia/bots/skimage", "path": "skimage", @@ -62745,7 +61250,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -62759,16 +61264,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_d3d11_es2\\\",\\\"angle_d3d11_es3\\\",\\\"angle_d3d11_es2_msaa4\\\",\\\"angle_d3d11_es2_dmsaa\\\",\\\"angle_d3d11_es3_msaa4\\\",\\\"angle_d3d11_es3_dmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE\\\",\\\"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\":\"true\",\"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-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Ubuntu18\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"vkdmsaa\\\",\\\"vk1010102\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"vk1010102\\\",\\\"image\\\",\\\"_\\\",\\\"_\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Ubuntu18-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Win-Clang-x86_64-Debug-ANGLE", + "Build-Debian10-Clang-x86_64-Release-Vulkan", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:1cb3-30.0.15.1179", - "os:Windows-10-19043", + "gpu:10de:1cb3-510.60.02", + "os:Ubuntu-18.04", "pool:Skia" ], "environment": { @@ -62777,6 +61282,7 @@ }, "env_prefixes": { "PATH": [ + "gsutil/gsutil", "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", "cipd_bin_packages", @@ -62798,9 +61304,99 @@ "max_attempts": 2, "outputs": [ "test" - ] + ], + "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-BonusConfigs": { + "Test-Ubuntu18-EMCC-Golo-GPU-QuadroP400-wasm-Release-All-WasmGMTests_WebGL2": { + "casSpec": "wasm-gm", + "cipd_packages": [ + { + "name": "infra/tools/luci-auth/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "skia/bots/node", + "path": "node", + "version": "version:3" + }, + { + "name": "skia/tools/goldctl/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:9f6c2de25cce548433f4d0301bbde675a65a2f95" + } + ], + "command": [ + "./run_wasm_gm_tests", + "--project_id", + "skia-swarming-bots", + "--task_id", + "<(TASK_ID)", + "--task_name", + "Test-Ubuntu18-EMCC-Golo-GPU-QuadroP400-wasm-Release-All-WasmGMTests_WebGL2", + "--test_harness_path", + "./tools/run-wasm-gm-tests", + "--built_path", + "./wasm_out", + "--node_bin_path", + "./node/node/bin", + "--resource_path", + "./resources", + "--work_path", + "./wasm_gm/work", + "--gold_ctl_path", + "./cipd_bin_packages/goldctl", + "--gold_hashes_url", + "https://gold.skia.org/json/v1/hashes", + "--git_commit", + "<(REVISION)", + "--changelist_id", + "<(ISSUE)", + "--patchset_order", + "<(PATCHSET)", + "--tryjob_id", + "<(BUILDBUCKET_BUILD_ID)", + "--webgl_version", + "2", + "--gold_key", + "alpha_type:Premul", + "--gold_key", + "arch:wasm", + "--gold_key", + "browser:Chrome", + "--gold_key", + "color_depth:8888", + "--gold_key", + "config:gles", + "--gold_key", + "configuration:Release", + "--gold_key", + "cpu_or_gpu_value:QuadroP400", + "--gold_key", + "model:Golo", + "--gold_key", + "os:Ubuntu18" + ], + "dependencies": [ + "Build-Debian10-EMCC-wasm-Release-WasmGMTests", + "Housekeeper-PerCommit-BuildTaskDrivers_linux_amd64" + ], + "dimensions": [ + "gpu:10de:1cb3-510.60.02", + "os:Ubuntu-18.04", + "pool:Skia" + ], + "env_prefixes": { + "PATH": [ + "node/node/bin" + ] + }, + "execution_timeout_ns": 3600000000000, + "io_timeout_ns": 3600000000000, + "max_attempts": 1, + "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" + }, + "Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All": { "caches": [ { "name": "vpython", @@ -62842,7 +61438,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -62856,7 +61452,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-BonusConfigs\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"BonusConfigs\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"glbetex\\\",\\\"glbert\\\",\\\"glreducedshaders\\\",\\\"glr8\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-BonusConfigs\\\",\\\"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\":\"true\",\"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-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonR9M470X\\\",\\\"model\\\",\\\"AlphaR2\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicAll_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All\\\",\\\"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\":\"true\",\"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": [ @@ -62864,8 +61460,8 @@ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:1cb3-30.0.15.1179", - "os:Windows-10-19043", + "gpu:1002:6646-26.20.13031.18002", + "os:Windows-10-19045", "pool:Skia" ], "environment": { @@ -62897,7 +61493,7 @@ "test" ] }, - "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Dawn": { + "Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE": { "caches": [ { "name": "vpython", @@ -62939,7 +61535,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -62953,16 +61549,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Dawn\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"Dawn\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"dawn\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"runtime_intrinsics_matrix\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthrough_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthroughAndVarDecls_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithLoops_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Dawn\\\",\\\"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\":\"true\",\"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-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonR9M470X\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"AlphaR2\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_d3d11_es2\\\",\\\"angle_d3d11_es3\\\",\\\"angle_d3d11_es2_msaa4\\\",\\\"angle_d3d11_es2_dmsaa\\\",\\\"angle_d3d11_es3_msaa4\\\",\\\"angle_d3d11_es3_dmsaa\\\",\\\"angle_d3d9_es2\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleAsLValueES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicAll_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"FilterResult\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkRuntimeEffectSimple_GPU\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Debug-Dawn", + "Build-Win-Clang-x86_64-Debug-ANGLE", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:1cb3-30.0.15.1179", - "os:Windows-10-19043", + "gpu:1002:6646-26.20.13031.18002", + "os:Windows-10-19045", "pool:Skia" ], "environment": { @@ -62994,7 +61590,7 @@ "test" ] }, - "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-GpuTess": { + "Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-Vulkan": { "caches": [ { "name": "vpython", @@ -63036,7 +61632,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -63050,16 +61646,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-GpuTess\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"GpuTess\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--pr\\\",\\\"atlas\\\",\\\"tess\\\",\\\"--config\\\",\\\"glmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-GpuTess\\\",\\\"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\":\"true\",\"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-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonR9M470X\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"AlphaR2\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"VkDrawableImportTest\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Debug", + "Build-Win-Clang-x86_64-Debug-Vulkan", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:1cb3-30.0.15.1179", - "os:Windows-10-19043", + "gpu:1002:6646-26.20.13031.18002", + "os:Windows-10-19045", "pool:Skia" ], "environment": { @@ -63091,7 +61687,7 @@ "test" ] }, - "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ReleaseAndAbandonGpuContext": { + "Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -63133,7 +61729,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -63147,16 +61743,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ReleaseAndAbandonGpuContext\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"ReleaseAndAbandonGpuContext\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"gldmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\",\\\"--releaseAndAbandonGpuContext\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ReleaseAndAbandonGpuContext\\\",\\\"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-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonR9M470X\\\",\\\"model\\\",\\\"AlphaR2\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicAll_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-All\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Debug", + "Build-Win-Clang-x86_64-Release", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:1cb3-30.0.15.1179", - "os:Windows-10-19043", + "gpu:1002:6646-26.20.13031.18002", + "os:Windows-10-19045", "pool:Skia" ], "environment": { @@ -63188,7 +61784,7 @@ "test" ] }, - "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Vulkan": { + "Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-All-ANGLE": { "caches": [ { "name": "vpython", @@ -63230,7 +61826,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -63244,16 +61840,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"vkdmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"vkmsaa4\\\",\\\"gm\\\",\\\"_\\\",\\\"shadow_utils\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-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\":\"true\",\"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-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonR9M470X\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"AlphaR2\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_d3d11_es2\\\",\\\"angle_d3d11_es3\\\",\\\"angle_d3d11_es2_msaa4\\\",\\\"angle_d3d11_es2_dmsaa\\\",\\\"angle_d3d11_es3_msaa4\\\",\\\"angle_d3d11_es3_dmsaa\\\",\\\"angle_d3d9_es2\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleAsLValueES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicAll_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"FilterResult\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkRuntimeEffectSimple_GPU\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-All-ANGLE\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Debug-Vulkan", + "Build-Win-Clang-x86_64-Release-ANGLE", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:1cb3-30.0.15.1179", - "os:Windows-10-19043", + "gpu:1002:6646-26.20.13031.18002", + "os:Windows-10-19045", "pool:Skia" ], "environment": { @@ -63285,7 +61881,7 @@ "test" ] }, - "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All": { + "Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-All-Vulkan": { "caches": [ { "name": "vpython", @@ -63327,7 +61923,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -63341,16 +61937,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"gldmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All\\\",\\\"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\":\"true\",\"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-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonR9M470X\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"AlphaR2\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"VkDrawableImportTest\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-All-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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Release", + "Build-Win-Clang-x86_64-Release-Vulkan", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:1cb3-30.0.15.1179", - "os:Windows-10-19043", + "gpu:1002:6646-26.20.13031.18002", + "os:Windows-10-19045", "pool:Skia" ], "environment": { @@ -63382,7 +61978,7 @@ "test" ] }, - "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-ANGLE": { + "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All": { "caches": [ { "name": "vpython", @@ -63424,7 +62020,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -63438,11 +62034,11 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_d3d11_es2\\\",\\\"angle_d3d11_es3\\\",\\\"angle_d3d11_es2_msaa4\\\",\\\"angle_d3d11_es2_dmsaa\\\",\\\"angle_d3d11_es3_msaa4\\\",\\\"angle_d3d11_es3_dmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-ANGLE\\\",\\\"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\":\"true\",\"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-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"gldmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Release-ANGLE", + "Build-Win-Clang-x86_64-Debug", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ @@ -63479,7 +62075,7 @@ "test" ] }, - "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-BonusConfigs": { + "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE": { "caches": [ { "name": "vpython", @@ -63521,7 +62117,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -63535,11 +62131,11 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-BonusConfigs\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"BonusConfigs\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"glbetex\\\",\\\"glbert\\\",\\\"glreducedshaders\\\",\\\"glr8\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-BonusConfigs\\\",\\\"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\":\"true\",\"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-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_d3d11_es2\\\",\\\"angle_d3d11_es3\\\",\\\"angle_d3d11_es2_msaa4\\\",\\\"angle_d3d11_es2_dmsaa\\\",\\\"angle_d3d11_es3_msaa4\\\",\\\"angle_d3d11_es3_dmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleAsLValueES3_GPU\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Release", + "Build-Win-Clang-x86_64-Debug-ANGLE", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ @@ -63576,7 +62172,7 @@ "test" ] }, - "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-ReleaseAndAbandonGpuContext": { + "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-BonusConfigs": { "caches": [ { "name": "vpython", @@ -63618,7 +62214,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -63632,11 +62228,11 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-ReleaseAndAbandonGpuContext\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"ReleaseAndAbandonGpuContext\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"gldmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\",\\\"--releaseAndAbandonGpuContext\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-ReleaseAndAbandonGpuContext\\\",\\\"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-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-BonusConfigs\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"BonusConfigs\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"glbetex\\\",\\\"glbert\\\",\\\"glreducedshaders\\\",\\\"glr8\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-BonusConfigs\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Release", + "Build-Win-Clang-x86_64-Debug", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ @@ -63673,7 +62269,7 @@ "test" ] }, - "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Vulkan": { + "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Dawn": { "caches": [ { "name": "vpython", @@ -63715,7 +62311,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -63729,11 +62325,11 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"vkdmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"vkmsaa4\\\",\\\"gm\\\",\\\"_\\\",\\\"shadow_utils\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-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\":\"true\",\"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-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Dawn\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"Dawn\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"dawn\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkSLIntrinsicMatrixCompMultES2_GPU\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthrough_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthroughAndVarDecls_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithLoops_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Dawn\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Release-Vulkan", + "Build-Win-Clang-x86_64-Debug-Dawn", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ @@ -63770,7 +62366,7 @@ "test" ] }, - "Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All": { + "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-GpuTess": { "caches": [ { "name": "vpython", @@ -63812,7 +62408,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -63826,7 +62422,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIrisXe\\\",\\\"model\\\",\\\"NUC11TZi5\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~ReimportImageTextureWithMipLevels\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All\\\",\\\"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\":\"true\",\"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-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-GpuTess\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"GpuTess\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--pr\\\",\\\"atlas\\\",\\\"tess\\\",\\\"--config\\\",\\\"glmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-GpuTess\\\",\\\"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\":\"true\",\"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": [ @@ -63834,8 +62430,8 @@ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:8086:9a49-31.0.101.3959", - "os:Windows-10-19045", + "gpu:10de:1cb3-30.0.15.1179", + "os:Windows-10-19043", "pool:Skia" ], "environment": { @@ -63867,7 +62463,7 @@ "test" ] }, - "Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All-ANGLE": { + "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ReleaseAndAbandonGpuContext": { "caches": [ { "name": "vpython", @@ -63909,7 +62505,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -63923,16 +62519,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIrisXe\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"NUC11TZi5\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--allowMSAAOnNewIntel\\\",\\\"true\\\",\\\"--config\\\",\\\"angle_d3d11_es2\\\",\\\"angle_d3d11_es3\\\",\\\"angle_d3d11_es2_msaa4\\\",\\\"angle_d3d11_es2_dmsaa\\\",\\\"angle_d3d11_es3_msaa4\\\",\\\"angle_d3d11_es3_dmsaa\\\",\\\"angle_d3d9_es2\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkSLIntrinsicFloor_GPU\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"FilterResult\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchDefaultOnly_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~ReimportImageTextureWithMipLevels\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All-ANGLE\\\",\\\"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\":\"true\",\"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-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ReleaseAndAbandonGpuContext\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"ReleaseAndAbandonGpuContext\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"gldmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\",\\\"--releaseAndAbandonGpuContext\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ReleaseAndAbandonGpuContext\\\",\\\"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": [ - "Build-Win-Clang-x86_64-Debug-ANGLE", + "Build-Win-Clang-x86_64-Debug", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:8086:9a49-31.0.101.3959", - "os:Windows-10-19045", + "gpu:10de:1cb3-30.0.15.1179", + "os:Windows-10-19043", "pool:Skia" ], "environment": { @@ -63964,7 +62560,7 @@ "test" ] }, - "Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All-Vulkan": { + "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Vulkan": { "caches": [ { "name": "vpython", @@ -64006,7 +62602,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -64020,7 +62616,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIrisXe\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"NUC11TZi5\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~ReimportImageTextureWithMipLevels\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All-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\":\"true\",\"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-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"vkdmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"vkmsaa4\\\",\\\"gm\\\",\\\"_\\\",\\\"shadow_utils\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-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\":\"true\",\"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": [ @@ -64028,8 +62624,8 @@ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:8086:9a49-31.0.101.3959", - "os:Windows-10-19045", + "gpu:10de:1cb3-30.0.15.1179", + "os:Windows-10-19043", "pool:Skia" ], "environment": { @@ -64061,7 +62657,7 @@ "test" ] }, - "Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All": { + "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -64103,7 +62699,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -64117,7 +62713,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIrisXe\\\",\\\"model\\\",\\\"NUC11TZi5\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~ReimportImageTextureWithMipLevels\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All\\\",\\\"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\":\"true\",\"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-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"gldmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All\\\",\\\"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\":\"true\",\"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": [ @@ -64125,8 +62721,8 @@ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:8086:9a49-31.0.101.3959", - "os:Windows-10-19045", + "gpu:10de:1cb3-30.0.15.1179", + "os:Windows-10-19043", "pool:Skia" ], "environment": { @@ -64158,7 +62754,7 @@ "test" ] }, - "Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-ANGLE": { + "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-ANGLE": { "caches": [ { "name": "vpython", @@ -64200,7 +62796,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -64214,7 +62810,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIrisXe\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"NUC11TZi5\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--allowMSAAOnNewIntel\\\",\\\"true\\\",\\\"--config\\\",\\\"angle_d3d11_es2\\\",\\\"angle_d3d11_es3\\\",\\\"angle_d3d11_es2_msaa4\\\",\\\"angle_d3d11_es2_dmsaa\\\",\\\"angle_d3d11_es3_msaa4\\\",\\\"angle_d3d11_es3_dmsaa\\\",\\\"angle_d3d9_es2\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkSLIntrinsicFloor_GPU\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"FilterResult\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchDefaultOnly_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~ReimportImageTextureWithMipLevels\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-ANGLE\\\",\\\"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\":\"true\",\"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-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_d3d11_es2\\\",\\\"angle_d3d11_es3\\\",\\\"angle_d3d11_es2_msaa4\\\",\\\"angle_d3d11_es2_dmsaa\\\",\\\"angle_d3d11_es3_msaa4\\\",\\\"angle_d3d11_es3_dmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleAsLValueES3_GPU\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-ANGLE\\\",\\\"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\":\"true\",\"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": [ @@ -64222,8 +62818,8 @@ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:8086:9a49-31.0.101.3959", - "os:Windows-10-19045", + "gpu:10de:1cb3-30.0.15.1179", + "os:Windows-10-19043", "pool:Skia" ], "environment": { @@ -64255,7 +62851,7 @@ "test" ] }, - "Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-Vulkan": { + "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-BonusConfigs": { "caches": [ { "name": "vpython", @@ -64297,7 +62893,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -64311,16 +62907,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIrisXe\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"NUC11TZi5\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~ReimportImageTextureWithMipLevels\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-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\":\"true\",\"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-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-BonusConfigs\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"BonusConfigs\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"glbetex\\\",\\\"glbert\\\",\\\"glreducedshaders\\\",\\\"glr8\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-BonusConfigs\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Release-Vulkan", + "Build-Win-Clang-x86_64-Release", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:8086:9a49-31.0.101.3959", - "os:Windows-10-19045", + "gpu:10de:1cb3-30.0.15.1179", + "os:Windows-10-19043", "pool:Skia" ], "environment": { @@ -64352,7 +62948,7 @@ "test" ] }, - "Test-Win10-Clang-NUC5i7RYH-CPU-AVX2-x86_64-Debug-All-NativeFonts": { + "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-ReleaseAndAbandonGpuContext": { "caches": [ { "name": "vpython", @@ -64394,7 +62990,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -64408,16 +63004,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC5i7RYH-CPU-AVX2-x86_64-Debug-All-NativeFonts\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"extra_config\\\",\\\"NativeFonts\\\",\\\"model\\\",\\\"NUC5i7RYH\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"composeshader_bitmap\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC5i7RYH-CPU-AVX2-x86_64-Debug-All-NativeFonts\\\",\\\"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\":\"true\",\"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-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-ReleaseAndAbandonGpuContext\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"ReleaseAndAbandonGpuContext\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"gldmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\",\\\"--releaseAndAbandonGpuContext\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-ReleaseAndAbandonGpuContext\\\",\\\"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": [ - "Build-Win-Clang-x86_64-Debug", + "Build-Win-Clang-x86_64-Release", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "cpu:x86-64-i7-5557U", - "os:Windows-10-19045", + "gpu:10de:1cb3-30.0.15.1179", + "os:Windows-10-19043", "pool:Skia" ], "environment": { @@ -64449,7 +63045,7 @@ "test" ] }, - "Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All": { + "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Vulkan": { "caches": [ { "name": "vpython", @@ -64491,7 +63087,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -64505,7 +63101,104 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris6100\\\",\\\"model\\\",\\\"NUC5i7RYH\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixFoldingES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixEquality_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLTemporaryIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All\\\",\\\"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\":\"true\",\"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-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"vkdmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"vkmsaa4\\\",\\\"gm\\\",\\\"_\\\",\\\"shadow_utils\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-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\":\"true\",\"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": [ + "Build-Win-Clang-x86_64-Release-Vulkan", + "Housekeeper-PerCommit-BundleRecipes" + ], + "dimensions": [ + "gpu:10de:1cb3-30.0.15.1179", + "os:Windows-10-19043", + "pool:Skia" + ], + "environment": { + "RECIPES_USE_PY3": "true", + "VPYTHON_LOG_TRACE": "1" + }, + "env_prefixes": { + "PATH": [ + "cipd_bin_packages/cpython3", + "cipd_bin_packages/cpython3/bin", + "cipd_bin_packages", + "cipd_bin_packages/bin" + ], + "VPYTHON_DEFAULT_SPEC": [ + "skia/.vpython" + ], + "VPYTHON_VIRTUALENV_ROOT": [ + "cache/vpython" + ] + }, + "execution_timeout_ns": 14400000000000, + "expiration_ns": 72000000000000, + "extra_tags": { + "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" + }, + "io_timeout_ns": 14400000000000, + "max_attempts": 2, + "outputs": [ + "test" + ] + }, + "Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All": { + "caches": [ + { + "name": "vpython", + "path": "cache/vpython" + } + ], + "casSpec": "test", + "cipd_packages": [ + { + "name": "infra/3pp/tools/cpython3/windows-amd64", + "path": "cipd_bin_packages/cpython3", + "version": "version:2@3.8.10.chromium.19" + }, + { + "name": "infra/tools/luci-auth/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/kitchen/${platform}", + "path": ".", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/vpython-native/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/vpython/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "skia/bots/skimage", + "path": "skimage", + "version": "version:47" + }, + { + "name": "skia/bots/skp", + "path": "skp", + "version": "version:438" + }, + { + "name": "skia/bots/svg", + "path": "svg", + "version": "version:14" + } + ], + "command": [ + "cipd_bin_packages/vpython3${EXECUTABLE_SUFFIX}", + "-u", + "skia/infra/bots/run_recipe.py", + "${ISOLATED_OUTDIR}", + "test", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIrisXe\\\",\\\"model\\\",\\\"NUC11TZi5\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"perlinnoise_layered\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleAsLValueES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~ReimportImageTextureWithMipLevels\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All\\\",\\\"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\":\"true\",\"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": [ @@ -64513,7 +63206,7 @@ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:8086:162b-20.19.15.4963", + "gpu:8086:9a49-31.0.101.4338", "os:Windows-10-19045", "pool:Skia" ], @@ -64546,7 +63239,7 @@ "test" ] }, - "Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE": { + "Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All-Vulkan": { "caches": [ { "name": "vpython", @@ -64588,7 +63281,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -64602,15 +63295,15 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris6100\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"NUC5i7RYH\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_d3d11_es2\\\",\\\"angle_d3d11_es3\\\",\\\"angle_d3d9_es2\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"ProcessorCloneTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkSLIntrinsicFloor_GPU\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"FilterResult\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLVectorToMatrixCast_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLTrivialArgumentsInlineDirectly_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLVectorScalarMath_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixFoldingES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixEquality_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLTemporaryIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"angle_d3d9_es2\\\",\\\"gm\\\",\\\"_\\\",\\\"lighting\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE\\\",\\\"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\":\"true\",\"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-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIrisXe\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"NUC11TZi5\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"VkYCbcrSampler_DrawImageWithYcbcrSampler\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLSwizzleAsLValueES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~ReimportImageTextureWithMipLevels\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All-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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Debug-ANGLE", + "Build-Win-Clang-x86_64-Debug-Vulkan", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:8086:162b-20.19.15.4963", + "gpu:8086:9a49-31.0.101.4338", "os:Windows-10-19045", "pool:Skia" ], @@ -64643,7 +63336,7 @@ "test" ] }, - "Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-All": { + "Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -64685,7 +63378,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -64699,7 +63392,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris6100\\\",\\\"model\\\",\\\"NUC5i7RYH\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixFoldingES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixEquality_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLTemporaryIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-All\\\",\\\"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\":\"true\",\"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-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIrisXe\\\",\\\"model\\\",\\\"NUC11TZi5\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"perlinnoise_layered\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleAsLValueES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~ReimportImageTextureWithMipLevels\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All\\\",\\\"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\":\"true\",\"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": [ @@ -64707,7 +63400,7 @@ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:8086:162b-20.19.15.4963", + "gpu:8086:9a49-31.0.101.4338", "os:Windows-10-19045", "pool:Skia" ], @@ -64740,7 +63433,7 @@ "test" ] }, - "Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-All-ANGLE": { + "Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-Vulkan": { "caches": [ { "name": "vpython", @@ -64782,7 +63475,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -64796,15 +63489,15 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris6100\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"NUC5i7RYH\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_d3d11_es2\\\",\\\"angle_d3d11_es3\\\",\\\"angle_d3d9_es2\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"ProcessorCloneTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkSLIntrinsicFloor_GPU\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"FilterResult\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLVectorToMatrixCast_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLTrivialArgumentsInlineDirectly_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLVectorScalarMath_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixFoldingES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixEquality_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLTemporaryIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"angle_d3d9_es2\\\",\\\"gm\\\",\\\"_\\\",\\\"lighting\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"~^ProcessorOptimizationValidationTest$\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-All-ANGLE\\\",\\\"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\":\"true\",\"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-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIrisXe\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"NUC11TZi5\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"VkYCbcrSampler_DrawImageWithYcbcrSampler\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLSwizzleAsLValueES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~ReimportImageTextureWithMipLevels\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Release-ANGLE", + "Build-Win-Clang-x86_64-Release-Vulkan", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:8086:162b-20.19.15.4963", + "gpu:8086:9a49-31.0.101.4338", "os:Windows-10-19045", "pool:Skia" ], @@ -64837,7 +63530,7 @@ "test" ] }, - "Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All": { + "Test-Win10-Clang-NUC5i7RYH-CPU-AVX2-x86_64-Debug-All-NativeFonts": { "caches": [ { "name": "vpython", @@ -64879,7 +63572,12 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" + }, + { + "name": "skia/bots/skparagraph", + "path": "skia/resources/extra_fonts", + "version": "version:4" }, { "name": "skia/bots/svg", @@ -64893,7 +63591,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris540\\\",\\\"model\\\",\\\"NUC6i5SYK\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All\\\",\\\"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\":\"true\",\"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-Win10-Clang-NUC5i7RYH-CPU-AVX2-x86_64-Debug-All-NativeFonts\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"extra_config\\\",\\\"NativeFonts\\\",\\\"model\\\",\\\"NUC5i7RYH\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"composeshader_bitmap\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"--nativeFonts\\\",\\\"--paragraph_fonts\\\",\\\"extra_fonts\\\",\\\"--norun_paragraph_tests_needing_system_fonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC5i7RYH-CPU-AVX2-x86_64-Debug-All-NativeFonts\\\",\\\"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\":\"true\",\"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": [ @@ -64901,7 +63599,7 @@ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:8086:1926-31.0.101.2115", + "cpu:x86-64-i7-5557U", "os:Windows-10-19045", "pool:Skia" ], @@ -64934,7 +63632,7 @@ "test" ] }, - "Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE": { + "Test-Win10-Clang-NUC5i7RYH-CPU-AVX2-x86_64-Debug-All-NativeFonts_DWriteCore": { "caches": [ { "name": "vpython", @@ -64968,6 +63666,11 @@ "path": "cipd_bin_packages", "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, + { + "name": "skia/bots/dwritecore", + "path": "dwritecore", + "version": "version:1" + }, { "name": "skia/bots/skimage", "path": "skimage", @@ -64976,7 +63679,12 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" + }, + { + "name": "skia/bots/skparagraph", + "path": "skia/resources/extra_fonts", + "version": "version:4" }, { "name": "skia/bots/svg", @@ -64990,15 +63698,15 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris540\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"NUC6i5SYK\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_d3d11_es2\\\",\\\"angle_d3d11_es3\\\",\\\"angle_d3d9_es2\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkSLIntrinsicFloor_GPU\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"FilterResult\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchDefaultOnly_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE\\\",\\\"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\":\"true\",\"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-Win10-Clang-NUC5i7RYH-CPU-AVX2-x86_64-Debug-All-NativeFonts_DWriteCore\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"extra_config\\\",\\\"NativeFonts_DWriteCore\\\",\\\"model\\\",\\\"NUC5i7RYH\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"composeshader_bitmap\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"--nativeFonts\\\",\\\"--paragraph_fonts\\\",\\\"extra_fonts\\\",\\\"--norun_paragraph_tests_needing_system_fonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC5i7RYH-CPU-AVX2-x86_64-Debug-All-NativeFonts_DWriteCore\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Debug-ANGLE", + "Build-Win-Clang-x86_64-Debug-DWriteCore", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:8086:1926-31.0.101.2115", + "cpu:x86-64-i7-5557U", "os:Windows-10-19045", "pool:Skia" ], @@ -65031,7 +63739,7 @@ "test" ] }, - "Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-Vulkan": { + "Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All": { "caches": [ { "name": "vpython", @@ -65073,7 +63781,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -65087,15 +63795,15 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris540\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"NUC6i5SYK\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-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\":\"true\",\"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-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris6100\\\",\\\"model\\\",\\\"NUC5i7RYH\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixFoldingES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixEquality_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLTemporaryIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleAsLValueES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Debug-Vulkan", + "Build-Win-Clang-x86_64-Debug", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:8086:1926-31.0.101.2115", + "gpu:8086:162b-20.19.15.4963", "os:Windows-10-19045", "pool:Skia" ], @@ -65128,7 +63836,7 @@ "test" ] }, - "Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All": { + "Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE": { "caches": [ { "name": "vpython", @@ -65170,7 +63878,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -65184,15 +63892,15 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris540\\\",\\\"model\\\",\\\"NUC6i5SYK\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All\\\",\\\"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\":\"true\",\"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-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris6100\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"NUC5i7RYH\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_d3d11_es2\\\",\\\"angle_d3d11_es3\\\",\\\"angle_d3d9_es2\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"ProcessorCloneTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkSLIntrinsicFloor_GPU\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"FilterResult\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLVectorToMatrixCast_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLTrivialArgumentsInlineDirectly_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLVectorScalarMath_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixFoldingES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixEquality_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLTemporaryIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleAsLValueES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"angle_d3d9_es2\\\",\\\"gm\\\",\\\"_\\\",\\\"lighting\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Release", + "Build-Win-Clang-x86_64-Debug-ANGLE", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:8086:1926-31.0.101.2115", + "gpu:8086:162b-20.19.15.4963", "os:Windows-10-19045", "pool:Skia" ], @@ -65225,7 +63933,7 @@ "test" ] }, - "Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-ANGLE": { + "Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -65267,7 +63975,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -65281,15 +63989,15 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris540\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"NUC6i5SYK\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_d3d11_es2\\\",\\\"angle_d3d11_es3\\\",\\\"angle_d3d9_es2\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkSLIntrinsicFloor_GPU\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"FilterResult\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchDefaultOnly_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-ANGLE\\\",\\\"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\":\"true\",\"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-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris6100\\\",\\\"model\\\",\\\"NUC5i7RYH\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixFoldingES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixEquality_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLTemporaryIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleAsLValueES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-All\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Release-ANGLE", + "Build-Win-Clang-x86_64-Release", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:8086:1926-31.0.101.2115", + "gpu:8086:162b-20.19.15.4963", "os:Windows-10-19045", "pool:Skia" ], @@ -65322,7 +64030,7 @@ "test" ] }, - "Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-NativeFonts": { + "Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-All-ANGLE": { "caches": [ { "name": "vpython", @@ -65364,7 +64072,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -65378,15 +64086,15 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-NativeFonts\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris540\\\",\\\"extra_config\\\",\\\"NativeFonts\\\",\\\"model\\\",\\\"NUC6i5SYK\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-NativeFonts\\\",\\\"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\":\"true\",\"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-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris6100\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"NUC5i7RYH\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_d3d11_es2\\\",\\\"angle_d3d11_es3\\\",\\\"angle_d3d9_es2\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"ProcessorCloneTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkSLIntrinsicFloor_GPU\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"FilterResult\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLVectorToMatrixCast_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLTrivialArgumentsInlineDirectly_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLVectorScalarMath_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixFoldingES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixEquality_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLTemporaryIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleAsLValueES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"angle_d3d9_es2\\\",\\\"gm\\\",\\\"_\\\",\\\"lighting\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"~^ProcessorOptimizationValidationTest$\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-All-ANGLE\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Release", + "Build-Win-Clang-x86_64-Release-ANGLE", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:8086:1926-31.0.101.2115", + "gpu:8086:162b-20.19.15.4963", "os:Windows-10-19045", "pool:Skia" ], @@ -65419,7 +64127,7 @@ "test" ] }, - "Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-Vulkan": { + "Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All": { "caches": [ { "name": "vpython", @@ -65461,7 +64169,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -65475,11 +64183,11 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris540\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"NUC6i5SYK\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-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\":\"true\",\"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-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris540\\\",\\\"model\\\",\\\"NUC6i5SYK\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleAsLValueES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Release-Vulkan", + "Build-Win-Clang-x86_64-Debug", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ @@ -65516,7 +64224,7 @@ "test" ] }, - "Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All": { + "Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE": { "caches": [ { "name": "vpython", @@ -65558,7 +64266,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -65572,15 +64280,15 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris655\\\",\\\"model\\\",\\\"NUC8i5BEK\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All\\\",\\\"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\":\"true\",\"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-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris540\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"NUC6i5SYK\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_d3d11_es2\\\",\\\"angle_d3d11_es3\\\",\\\"angle_d3d9_es2\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkSLIntrinsicFloor_GPU\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"FilterResult\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchDefaultOnly_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"ImageFilterCropRect_Gpu\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleAsLValueES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Debug", + "Build-Win-Clang-x86_64-Debug-ANGLE", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:8086:3ea5-26.20.100.7463", + "gpu:8086:1926-31.0.101.2115", "os:Windows-10-19045", "pool:Skia" ], @@ -65613,7 +64321,7 @@ "test" ] }, - "Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE": { + "Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-Vulkan": { "caches": [ { "name": "vpython", @@ -65655,7 +64363,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -65669,15 +64377,15 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris655\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"NUC8i5BEK\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_d3d11_es2\\\",\\\"angle_d3d11_es3\\\",\\\"angle_d3d9_es2\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkSLIntrinsicFloor_GPU\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"FilterResult\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchDefaultOnly_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE\\\",\\\"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\":\"true\",\"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-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris540\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"NUC6i5SYK\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLSwizzleAsLValueES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Debug-ANGLE", + "Build-Win-Clang-x86_64-Debug-Vulkan", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:8086:3ea5-26.20.100.7463", + "gpu:8086:1926-31.0.101.2115", "os:Windows-10-19045", "pool:Skia" ], @@ -65710,7 +64418,7 @@ "test" ] }, - "Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-Direct3D": { + "Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -65752,7 +64460,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -65766,15 +64474,15 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-Direct3D\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris655\\\",\\\"extra_config\\\",\\\"Direct3D\\\",\\\"model\\\",\\\"NUC8i5BEK\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"d3d\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-Direct3D\\\",\\\"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\":\"true\",\"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-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris540\\\",\\\"model\\\",\\\"NUC6i5SYK\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleAsLValueES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Debug-Direct3D", + "Build-Win-Clang-x86_64-Release", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:8086:3ea5-26.20.100.7463", + "gpu:8086:1926-31.0.101.2115", "os:Windows-10-19045", "pool:Skia" ], @@ -65807,7 +64515,7 @@ "test" ] }, - "Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-Vulkan": { + "Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-ANGLE": { "caches": [ { "name": "vpython", @@ -65849,7 +64557,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -65863,15 +64571,15 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris655\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"NUC8i5BEK\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-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\":\"true\",\"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-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris540\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"NUC6i5SYK\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_d3d11_es2\\\",\\\"angle_d3d11_es3\\\",\\\"angle_d3d9_es2\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkSLIntrinsicFloor_GPU\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"FilterResult\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchDefaultOnly_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"ImageFilterCropRect_Gpu\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleAsLValueES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-ANGLE\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Debug-Vulkan", + "Build-Win-Clang-x86_64-Release-ANGLE", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:8086:3ea5-26.20.100.7463", + "gpu:8086:1926-31.0.101.2115", "os:Windows-10-19045", "pool:Skia" ], @@ -65904,7 +64612,7 @@ "test" ] }, - "Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All": { + "Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-NativeFonts": { "caches": [ { "name": "vpython", @@ -65946,7 +64654,12 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" + }, + { + "name": "skia/bots/skparagraph", + "path": "skia/resources/extra_fonts", + "version": "version:4" }, { "name": "skia/bots/svg", @@ -65960,7 +64673,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris655\\\",\\\"model\\\",\\\"NUC8i5BEK\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All\\\",\\\"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\":\"true\",\"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-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-NativeFonts\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris540\\\",\\\"extra_config\\\",\\\"NativeFonts\\\",\\\"model\\\",\\\"NUC6i5SYK\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleAsLValueES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nativeFonts\\\",\\\"--paragraph_fonts\\\",\\\"extra_fonts\\\",\\\"--norun_paragraph_tests_needing_system_fonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-NativeFonts\\\",\\\"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\":\"true\",\"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": [ @@ -65968,7 +64681,7 @@ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:8086:3ea5-26.20.100.7463", + "gpu:8086:1926-31.0.101.2115", "os:Windows-10-19045", "pool:Skia" ], @@ -66001,7 +64714,7 @@ "test" ] }, - "Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-ANGLE": { + "Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-Vulkan": { "caches": [ { "name": "vpython", @@ -66043,7 +64756,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -66057,15 +64770,15 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris655\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"NUC8i5BEK\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_d3d11_es2\\\",\\\"angle_d3d11_es3\\\",\\\"angle_d3d9_es2\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkSLIntrinsicFloor_GPU\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"FilterResult\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchDefaultOnly_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-ANGLE\\\",\\\"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\":\"true\",\"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-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris540\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"NUC6i5SYK\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLSwizzleAsLValueES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Release-ANGLE", + "Build-Win-Clang-x86_64-Release-Vulkan", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:8086:3ea5-26.20.100.7463", + "gpu:8086:1926-31.0.101.2115", "os:Windows-10-19045", "pool:Skia" ], @@ -66098,7 +64811,7 @@ "test" ] }, - "Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-Direct3D": { + "Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All": { "caches": [ { "name": "vpython", @@ -66140,7 +64853,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -66154,11 +64867,11 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-Direct3D\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris655\\\",\\\"extra_config\\\",\\\"Direct3D\\\",\\\"model\\\",\\\"NUC8i5BEK\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"d3d\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-Direct3D\\\",\\\"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\":\"true\",\"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-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris655\\\",\\\"model\\\",\\\"NUC8i5BEK\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleAsLValueES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Release-Direct3D", + "Build-Win-Clang-x86_64-Debug", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ @@ -66195,7 +64908,7 @@ "test" ] }, - "Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-Vulkan": { + "Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE": { "caches": [ { "name": "vpython", @@ -66237,7 +64950,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -66251,11 +64964,11 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris655\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"NUC8i5BEK\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-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\":\"true\",\"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-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris655\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"NUC8i5BEK\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_d3d11_es2\\\",\\\"angle_d3d11_es3\\\",\\\"angle_d3d9_es2\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkSLIntrinsicFloor_GPU\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"FilterResult\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchDefaultOnly_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"ImageFilterCropRect_Gpu\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleAsLValueES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Release-Vulkan", + "Build-Win-Clang-x86_64-Debug-ANGLE", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ @@ -66292,7 +65005,7 @@ "test" ] }, - "Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Debug-All": { + "Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-Direct3D": { "caches": [ { "name": "vpython", @@ -66334,7 +65047,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -66348,15 +65061,15 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RTX3060\\\",\\\"model\\\",\\\"NUC9i7QN\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Debug-All\\\",\\\"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\":\"true\",\"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-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-Direct3D\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris655\\\",\\\"extra_config\\\",\\\"Direct3D\\\",\\\"model\\\",\\\"NUC8i5BEK\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"d3d\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleAsLValueES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-Direct3D\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Debug", + "Build-Win-Clang-x86_64-Debug-Direct3D", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:2489-31.0.15.1694", + "gpu:8086:3ea5-26.20.100.7463", "os:Windows-10-19045", "pool:Skia" ], @@ -66389,7 +65102,7 @@ "test" ] }, - "Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Debug-All-Vulkan": { + "Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-Vulkan": { "caches": [ { "name": "vpython", @@ -66431,7 +65144,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -66445,7 +65158,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Debug-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RTX3060\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"NUC9i7QN\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"blurcircles2\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicMixFloatES3_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Debug-All-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\":\"true\",\"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-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris655\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"NUC8i5BEK\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleAsLValueES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-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\":\"true\",\"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": [ @@ -66453,7 +65166,7 @@ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:2489-31.0.15.1694", + "gpu:8086:3ea5-26.20.100.7463", "os:Windows-10-19045", "pool:Skia" ], @@ -66486,7 +65199,7 @@ "test" ] }, - "Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All": { + "Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -66528,7 +65241,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -66542,7 +65255,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RTX3060\\\",\\\"model\\\",\\\"NUC9i7QN\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All\\\",\\\"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\":\"true\",\"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-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris655\\\",\\\"model\\\",\\\"NUC8i5BEK\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleAsLValueES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All\\\",\\\"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\":\"true\",\"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": [ @@ -66550,7 +65263,7 @@ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:2489-31.0.15.1694", + "gpu:8086:3ea5-26.20.100.7463", "os:Windows-10-19045", "pool:Skia" ], @@ -66583,7 +65296,7 @@ "test" ] }, - "Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All-Vulkan": { + "Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-ANGLE": { "caches": [ { "name": "vpython", @@ -66625,7 +65338,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -66639,15 +65352,15 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RTX3060\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"NUC9i7QN\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"blurcircles2\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicMixFloatES3_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All-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\":\"true\",\"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-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris655\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"NUC8i5BEK\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_d3d11_es2\\\",\\\"angle_d3d11_es3\\\",\\\"angle_d3d9_es2\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkSLIntrinsicFloor_GPU\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"FilterResult\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchDefaultOnly_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"ImageFilterCropRect_Gpu\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleAsLValueES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-ANGLE\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Release-Vulkan", + "Build-Win-Clang-x86_64-Release-ANGLE", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:2489-31.0.15.1694", + "gpu:8086:3ea5-26.20.100.7463", "os:Windows-10-19045", "pool:Skia" ], @@ -66680,7 +65393,7 @@ "test" ] }, - "Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All": { + "Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-Direct3D": { "caches": [ { "name": "vpython", @@ -66722,7 +65435,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -66736,15 +65449,15 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD4400\\\",\\\"model\\\",\\\"NUCD34010WYKH\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixFoldingES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixEquality_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLTemporaryIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All\\\",\\\"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\":\"true\",\"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-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-Direct3D\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris655\\\",\\\"extra_config\\\",\\\"Direct3D\\\",\\\"model\\\",\\\"NUC8i5BEK\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"d3d\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleAsLValueES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-Direct3D\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Debug", + "Build-Win-Clang-x86_64-Release-Direct3D", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:8086:0a16-20.19.15.4963", + "gpu:8086:3ea5-26.20.100.7463", "os:Windows-10-19045", "pool:Skia" ], @@ -66777,7 +65490,7 @@ "test" ] }, - "Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE": { + "Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-Vulkan": { "caches": [ { "name": "vpython", @@ -66819,7 +65532,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -66833,15 +65546,15 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD4400\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"NUCD34010WYKH\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_d3d11_es2\\\",\\\"angle_d3d11_es3\\\",\\\"angle_d3d9_es2\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkSLIntrinsicFloor_GPU\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"FilterResult\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLVectorToMatrixCast_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLTrivialArgumentsInlineDirectly_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLVectorScalarMath_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixFoldingES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixEquality_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLTemporaryIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"angle_d3d9_es2\\\",\\\"gm\\\",\\\"_\\\",\\\"lighting\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE\\\",\\\"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\":\"true\",\"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-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelIris655\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"NUC8i5BEK\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleAsLValueES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Debug-ANGLE", + "Build-Win-Clang-x86_64-Release-Vulkan", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:8086:0a16-20.19.15.4963", + "gpu:8086:3ea5-26.20.100.7463", "os:Windows-10-19045", "pool:Skia" ], @@ -66874,7 +65587,7 @@ "test" ] }, - "Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All": { + "Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Debug-All": { "caches": [ { "name": "vpython", @@ -66916,7 +65629,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -66930,15 +65643,15 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD4400\\\",\\\"model\\\",\\\"NUCD34010WYKH\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixFoldingES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixEquality_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLTemporaryIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All\\\",\\\"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\":\"true\",\"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-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RTX3060\\\",\\\"model\\\",\\\"NUC9i7QN\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Debug-All\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Release", + "Build-Win-Clang-x86_64-Debug", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:8086:0a16-20.19.15.4963", + "gpu:10de:2489-31.0.15.3667", "os:Windows-10-19045", "pool:Skia" ], @@ -66971,7 +65684,7 @@ "test" ] }, - "Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All-ANGLE": { + "Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Debug-All-Vulkan": { "caches": [ { "name": "vpython", @@ -67013,7 +65726,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -67027,15 +65740,15 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD4400\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"NUCD34010WYKH\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_d3d11_es2\\\",\\\"angle_d3d11_es3\\\",\\\"angle_d3d9_es2\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkSLIntrinsicFloor_GPU\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"FilterResult\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLVectorToMatrixCast_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLTrivialArgumentsInlineDirectly_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLVectorScalarMath_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixFoldingES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixEquality_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLTemporaryIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"angle_d3d9_es2\\\",\\\"gm\\\",\\\"_\\\",\\\"lighting\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All-ANGLE\\\",\\\"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\":\"true\",\"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-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Debug-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RTX3060\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"NUC9i7QN\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"blurcircles2\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicMixFloatES3_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Debug-All-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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Release-ANGLE", + "Build-Win-Clang-x86_64-Debug-Vulkan", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:8086:0a16-20.19.15.4963", + "gpu:10de:2489-31.0.15.3667", "os:Windows-10-19045", "pool:Skia" ], @@ -67068,7 +65781,7 @@ "test" ] }, - "Test-Win10-Clang-RUBYR5-GPU-RadeonVega6-x86_64-Debug-All-Vulkan": { + "Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -67110,7 +65823,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -67124,15 +65837,15 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-RUBYR5-GPU-RadeonVega6-x86_64-Debug-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonVega6\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"RUBYR5\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"ycbcrimage\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"VkYCbcrSampler_DrawImageWithYcbcrSampler\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-RUBYR5-GPU-RadeonVega6-x86_64-Debug-All-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\":\"true\",\"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-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RTX3060\\\",\\\"model\\\",\\\"NUC9i7QN\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Debug-Vulkan", + "Build-Win-Clang-x86_64-Release", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:1002:1636-31.0.14057.5006", + "gpu:10de:2489-31.0.15.3667", "os:Windows-10-19045", "pool:Skia" ], @@ -67165,7 +65878,7 @@ "test" ] }, - "Test-Win10-Clang-RUBYR5-GPU-RadeonVega6-x86_64-Release-All-Vulkan": { + "Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All-Vulkan": { "caches": [ { "name": "vpython", @@ -67207,7 +65920,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -67221,7 +65934,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-RUBYR5-GPU-RadeonVega6-x86_64-Release-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonVega6\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"RUBYR5\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"ycbcrimage\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"VkYCbcrSampler_DrawImageWithYcbcrSampler\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-RUBYR5-GPU-RadeonVega6-x86_64-Release-All-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\":\"true\",\"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-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RTX3060\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"NUC9i7QN\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"blurcircles2\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicMixFloatES3_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All-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\":\"true\",\"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": [ @@ -67229,7 +65942,7 @@ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:1002:1636-31.0.14057.5006", + "gpu:10de:2489-31.0.15.3667", "os:Windows-10-19045", "pool:Skia" ], @@ -67262,7 +65975,7 @@ "test" ] }, - "Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Debug-All": { + "Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All": { "caches": [ { "name": "vpython", @@ -67304,7 +66017,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -67318,7 +66031,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"GTX660\\\",\\\"model\\\",\\\"ShuttleA\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Debug-All\\\",\\\"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\":\"true\",\"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-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD4400\\\",\\\"model\\\",\\\"NUCD34010WYKH\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixFoldingES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixEquality_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLTemporaryIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleAsLValueES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All\\\",\\\"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\":\"true\",\"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": [ @@ -67326,7 +66039,7 @@ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:11c0-26.21.14.4120", + "gpu:8086:0a16-20.19.15.4963", "os:Windows-10-19045", "pool:Skia" ], @@ -67359,7 +66072,7 @@ "test" ] }, - "Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Debug-All-ANGLE": { + "Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE": { "caches": [ { "name": "vpython", @@ -67401,7 +66114,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -67415,7 +66128,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Debug-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"GTX660\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"ShuttleA\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_d3d11_es2\\\",\\\"angle_d3d11_es3\\\",\\\"angle_d3d11_es2_msaa4\\\",\\\"angle_d3d11_es2_dmsaa\\\",\\\"angle_d3d11_es3_msaa4\\\",\\\"angle_d3d11_es3_dmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Debug-All-ANGLE\\\",\\\"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\":\"true\",\"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-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD4400\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"NUCD34010WYKH\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_d3d11_es2\\\",\\\"angle_d3d11_es3\\\",\\\"angle_d3d9_es2\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkSLIntrinsicFloor_GPU\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"FilterResult\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLVectorToMatrixCast_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLTrivialArgumentsInlineDirectly_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLVectorScalarMath_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixFoldingES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixEquality_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLTemporaryIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleAsLValueES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"angle_d3d9_es2\\\",\\\"gm\\\",\\\"_\\\",\\\"lighting\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE\\\",\\\"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\":\"true\",\"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": [ @@ -67423,7 +66136,7 @@ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:11c0-26.21.14.4120", + "gpu:8086:0a16-20.19.15.4963", "os:Windows-10-19045", "pool:Skia" ], @@ -67456,7 +66169,7 @@ "test" ] }, - "Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Debug-All-Vulkan": { + "Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -67498,7 +66211,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -67512,15 +66225,15 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Debug-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"GTX660\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"ShuttleA\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"--match\\\",\\\"~FloatingPointTextureTest$\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Debug-All-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\":\"true\",\"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-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD4400\\\",\\\"model\\\",\\\"NUCD34010WYKH\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixFoldingES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixEquality_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLTemporaryIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleAsLValueES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Debug-Vulkan", + "Build-Win-Clang-x86_64-Release", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:11c0-26.21.14.4120", + "gpu:8086:0a16-20.19.15.4963", "os:Windows-10-19045", "pool:Skia" ], @@ -67553,7 +66266,7 @@ "test" ] }, - "Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All": { + "Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All-ANGLE": { "caches": [ { "name": "vpython", @@ -67595,7 +66308,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -67609,15 +66322,15 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"GTX660\\\",\\\"model\\\",\\\"ShuttleA\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All\\\",\\\"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\":\"true\",\"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-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"IntelHD4400\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"NUCD34010WYKH\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_d3d11_es2\\\",\\\"angle_d3d11_es3\\\",\\\"angle_d3d9_es2\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkSLIntrinsicFloor_GPU\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"FilterResult\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLVectorToMatrixCast_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLTrivialArgumentsInlineDirectly_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLVectorScalarMath_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixFoldingES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixEquality_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLTemporaryIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLReturnsValueOnEveryPathES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLOutParamsAreDistinctFromGlobal_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleAsLValueES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"angle_d3d9_es2\\\",\\\"gm\\\",\\\"_\\\",\\\"lighting\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All-ANGLE\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Release", + "Build-Win-Clang-x86_64-Release-ANGLE", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:11c0-26.21.14.4120", + "gpu:8086:0a16-20.19.15.4963", "os:Windows-10-19045", "pool:Skia" ], @@ -67650,7 +66363,7 @@ "test" ] }, - "Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All-ANGLE": { + "Test-Win10-Clang-RUBYR5-GPU-RadeonVega6-x86_64-Debug-All-Vulkan": { "caches": [ { "name": "vpython", @@ -67692,7 +66405,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -67706,15 +66419,15 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"GTX660\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"ShuttleA\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_d3d11_es2\\\",\\\"angle_d3d11_es3\\\",\\\"angle_d3d11_es2_msaa4\\\",\\\"angle_d3d11_es2_dmsaa\\\",\\\"angle_d3d11_es3_msaa4\\\",\\\"angle_d3d11_es3_dmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All-ANGLE\\\",\\\"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\":\"true\",\"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-Win10-Clang-RUBYR5-GPU-RadeonVega6-x86_64-Debug-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonVega6\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"RUBYR5\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"ycbcrimage\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"VkYCbcrSampler_DrawImageWithYcbcrSampler\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-RUBYR5-GPU-RadeonVega6-x86_64-Debug-All-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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Release-ANGLE", + "Build-Win-Clang-x86_64-Debug-Vulkan", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:11c0-26.21.14.4120", + "gpu:1002:1636-31.0.14057.5006", "os:Windows-10-19045", "pool:Skia" ], @@ -67747,7 +66460,7 @@ "test" ] }, - "Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All-Vulkan": { + "Test-Win10-Clang-RUBYR5-GPU-RadeonVega6-x86_64-Release-All-Vulkan": { "caches": [ { "name": "vpython", @@ -67789,7 +66502,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -67803,7 +66516,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"GTX660\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"ShuttleA\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"--match\\\",\\\"~FloatingPointTextureTest$\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All-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\":\"true\",\"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-Win10-Clang-RUBYR5-GPU-RadeonVega6-x86_64-Release-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonVega6\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"RUBYR5\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"ycbcrimage\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"VkYCbcrSampler_DrawImageWithYcbcrSampler\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdy_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicDFdx_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicFwidth_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-RUBYR5-GPU-RadeonVega6-x86_64-Release-All-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\":\"true\",\"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": [ @@ -67811,7 +66524,7 @@ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:11c0-26.21.14.4120", + "gpu:1002:1636-31.0.14057.5006", "os:Windows-10-19045", "pool:Skia" ], @@ -67844,7 +66557,7 @@ "test" ] }, - "Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All": { + "Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Debug-All": { "caches": [ { "name": "vpython", @@ -67886,7 +66599,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -67900,7 +66613,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonHD7770\\\",\\\"model\\\",\\\"ShuttleA\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicAll_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All\\\",\\\"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\":\"true\",\"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-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"GTX660\\\",\\\"model\\\",\\\"ShuttleA\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Debug-All\\\",\\\"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\":\"true\",\"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": [ @@ -67908,7 +66621,7 @@ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:1002:683d-26.20.13031.18002", + "gpu:10de:11c0-26.21.14.4120", "os:Windows-10-19045", "pool:Skia" ], @@ -67941,7 +66654,7 @@ "test" ] }, - "Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All-ANGLE": { + "Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Debug-All-ANGLE": { "caches": [ { "name": "vpython", @@ -67983,7 +66696,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -67997,7 +66710,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonHD7770\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"ShuttleA\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_d3d11_es2\\\",\\\"angle_d3d11_es3\\\",\\\"angle_d3d11_es2_msaa4\\\",\\\"angle_d3d11_es2_dmsaa\\\",\\\"angle_d3d11_es3_msaa4\\\",\\\"angle_d3d11_es3_dmsaa\\\",\\\"angle_d3d9_es2\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicAll_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All-ANGLE\\\",\\\"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\":\"true\",\"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-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Debug-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"GTX660\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"ShuttleA\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_d3d11_es2\\\",\\\"angle_d3d11_es3\\\",\\\"angle_d3d11_es2_msaa4\\\",\\\"angle_d3d11_es2_dmsaa\\\",\\\"angle_d3d11_es3_msaa4\\\",\\\"angle_d3d11_es3_dmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleAsLValueES3_GPU\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Debug-All-ANGLE\\\",\\\"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\":\"true\",\"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": [ @@ -68005,104 +66718,7 @@ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:1002:683d-26.20.13031.18002", - "os:Windows-10-19045", - "pool:Skia" - ], - "environment": { - "RECIPES_USE_PY3": "true", - "VPYTHON_LOG_TRACE": "1" - }, - "env_prefixes": { - "PATH": [ - "cipd_bin_packages/cpython3", - "cipd_bin_packages/cpython3/bin", - "cipd_bin_packages", - "cipd_bin_packages/bin" - ], - "VPYTHON_DEFAULT_SPEC": [ - "skia/.vpython" - ], - "VPYTHON_VIRTUALENV_ROOT": [ - "cache/vpython" - ] - }, - "execution_timeout_ns": 14400000000000, - "expiration_ns": 72000000000000, - "extra_tags": { - "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" - }, - "io_timeout_ns": 14400000000000, - "max_attempts": 2, - "outputs": [ - "test" - ] - }, - "Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All-Direct3D": { - "caches": [ - { - "name": "vpython", - "path": "cache/vpython" - } - ], - "casSpec": "test", - "cipd_packages": [ - { - "name": "infra/3pp/tools/cpython3/windows-amd64", - "path": "cipd_bin_packages/cpython3", - "version": "version:2@3.8.10.chromium.19" - }, - { - "name": "infra/tools/luci-auth/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/kitchen/${platform}", - "path": ".", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/vpython-native/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/vpython/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "skia/bots/skimage", - "path": "skimage", - "version": "version:47" - }, - { - "name": "skia/bots/skp", - "path": "skp", - "version": "version:432" - }, - { - "name": "skia/bots/svg", - "path": "svg", - "version": "version:14" - } - ], - "command": [ - "cipd_bin_packages/vpython3${EXECUTABLE_SUFFIX}", - "-u", - "skia/infra/bots/run_recipe.py", - "${ISOLATED_OUTDIR}", - "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All-Direct3D\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonHD7770\\\",\\\"extra_config\\\",\\\"Direct3D\\\",\\\"model\\\",\\\"ShuttleA\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"d3d\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicAll_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All-Direct3D\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Debug-Direct3D", - "Housekeeper-PerCommit-BundleRecipes" - ], - "dimensions": [ - "gpu:1002:683d-26.20.13031.18002", + "gpu:10de:11c0-26.21.14.4120", "os:Windows-10-19045", "pool:Skia" ], @@ -68135,7 +66751,7 @@ "test" ] }, - "Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All-Vulkan": { + "Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Debug-All-Vulkan": { "caches": [ { "name": "vpython", @@ -68177,7 +66793,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -68191,7 +66807,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonHD7770\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"ShuttleA\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"VkDrawableImportTest\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All-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\":\"true\",\"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-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Debug-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"GTX660\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"ShuttleA\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"--match\\\",\\\"~FloatingPointTextureTest$\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Debug-All-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\":\"true\",\"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": [ @@ -68199,7 +66815,7 @@ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:1002:683d-26.20.13031.18002", + "gpu:10de:11c0-26.21.14.4120", "os:Windows-10-19045", "pool:Skia" ], @@ -68232,7 +66848,7 @@ "test" ] }, - "Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All": { + "Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -68274,7 +66890,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -68288,7 +66904,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonHD7770\\\",\\\"model\\\",\\\"ShuttleA\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicAll_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All\\\",\\\"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\":\"true\",\"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-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"GTX660\\\",\\\"model\\\",\\\"ShuttleA\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All\\\",\\\"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\":\"true\",\"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": [ @@ -68296,7 +66912,7 @@ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:1002:683d-26.20.13031.18002", + "gpu:10de:11c0-26.21.14.4120", "os:Windows-10-19045", "pool:Skia" ], @@ -68329,7 +66945,7 @@ "test" ] }, - "Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-ANGLE": { + "Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All-ANGLE": { "caches": [ { "name": "vpython", @@ -68371,7 +66987,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -68385,7 +67001,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonHD7770\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"ShuttleA\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_d3d11_es2\\\",\\\"angle_d3d11_es3\\\",\\\"angle_d3d11_es2_msaa4\\\",\\\"angle_d3d11_es2_dmsaa\\\",\\\"angle_d3d11_es3_msaa4\\\",\\\"angle_d3d11_es3_dmsaa\\\",\\\"angle_d3d9_es2\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicAll_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-ANGLE\\\",\\\"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\":\"true\",\"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-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"GTX660\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"ShuttleA\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_d3d11_es2\\\",\\\"angle_d3d11_es3\\\",\\\"angle_d3d11_es2_msaa4\\\",\\\"angle_d3d11_es2_dmsaa\\\",\\\"angle_d3d11_es3_msaa4\\\",\\\"angle_d3d11_es3_dmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleAsLValueES3_GPU\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All-ANGLE\\\",\\\"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\":\"true\",\"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": [ @@ -68393,7 +67009,7 @@ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:1002:683d-26.20.13031.18002", + "gpu:10de:11c0-26.21.14.4120", "os:Windows-10-19045", "pool:Skia" ], @@ -68426,7 +67042,7 @@ "test" ] }, - "Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-Direct3D": { + "Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All-Vulkan": { "caches": [ { "name": "vpython", @@ -68468,7 +67084,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -68482,15 +67098,15 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-Direct3D\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonHD7770\\\",\\\"extra_config\\\",\\\"Direct3D\\\",\\\"model\\\",\\\"ShuttleA\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"d3d\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicAll_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-Direct3D\\\",\\\"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\":\"true\",\"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-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"GTX660\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"ShuttleA\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"--match\\\",\\\"~FloatingPointTextureTest$\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All-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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Release-Direct3D", + "Build-Win-Clang-x86_64-Release-Vulkan", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:1002:683d-26.20.13031.18002", + "gpu:10de:11c0-26.21.14.4120", "os:Windows-10-19045", "pool:Skia" ], @@ -68523,7 +67139,7 @@ "test" ] }, - "Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-Vulkan": { + "Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All": { "caches": [ { "name": "vpython", @@ -68565,7 +67181,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -68579,11 +67195,11 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonHD7770\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"ShuttleA\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"VkDrawableImportTest\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-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\":\"true\",\"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-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonHD7770\\\",\\\"model\\\",\\\"ShuttleA\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicAll_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Release-Vulkan", + "Build-Win-Clang-x86_64-Debug", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ @@ -68620,7 +67236,7 @@ "test" ] }, - "Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All": { + "Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All-ANGLE": { "caches": [ { "name": "vpython", @@ -68662,7 +67278,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -68676,15 +67292,15 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"GTX960\\\",\\\"model\\\",\\\"ShuttleC\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All\\\",\\\"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\":\"true\",\"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-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonHD7770\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"ShuttleA\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_d3d11_es2\\\",\\\"angle_d3d11_es3\\\",\\\"angle_d3d11_es2_msaa4\\\",\\\"angle_d3d11_es2_dmsaa\\\",\\\"angle_d3d11_es3_msaa4\\\",\\\"angle_d3d11_es3_dmsaa\\\",\\\"angle_d3d9_es2\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleAsLValueES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicAll_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All-ANGLE\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Debug", + "Build-Win-Clang-x86_64-Debug-ANGLE", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:1401-31.0.15.1694", + "gpu:1002:683d-26.20.13031.18002", "os:Windows-10-19045", "pool:Skia" ], @@ -68717,7 +67333,7 @@ "test" ] }, - "Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE": { + "Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All-Direct3D": { "caches": [ { "name": "vpython", @@ -68759,7 +67375,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -68773,15 +67389,15 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"GTX960\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"ShuttleC\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_d3d11_es2\\\",\\\"angle_d3d11_es3\\\",\\\"angle_d3d11_es2_msaa4\\\",\\\"angle_d3d11_es2_dmsaa\\\",\\\"angle_d3d11_es3_msaa4\\\",\\\"angle_d3d11_es3_dmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE\\\",\\\"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\":\"true\",\"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-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All-Direct3D\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonHD7770\\\",\\\"extra_config\\\",\\\"Direct3D\\\",\\\"model\\\",\\\"ShuttleA\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"d3d\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicAll_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All-Direct3D\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Debug-ANGLE", + "Build-Win-Clang-x86_64-Debug-Direct3D", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:1401-31.0.15.1694", + "gpu:1002:683d-26.20.13031.18002", "os:Windows-10-19045", "pool:Skia" ], @@ -68814,7 +67430,7 @@ "test" ] }, - "Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-Vulkan": { + "Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All-Vulkan": { "caches": [ { "name": "vpython", @@ -68856,7 +67472,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -68870,7 +67486,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"GTX960\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"ShuttleC\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-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\":\"true\",\"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-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonHD7770\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"ShuttleA\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"VkDrawableImportTest\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All-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\":\"true\",\"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": [ @@ -68878,7 +67494,7 @@ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:1401-31.0.15.1694", + "gpu:1002:683d-26.20.13031.18002", "os:Windows-10-19045", "pool:Skia" ], @@ -68911,7 +67527,7 @@ "test" ] }, - "Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All": { + "Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -68953,7 +67569,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -68967,7 +67583,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"GTX960\\\",\\\"model\\\",\\\"ShuttleC\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All\\\",\\\"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\":\"true\",\"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-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonHD7770\\\",\\\"model\\\",\\\"ShuttleA\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicAll_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All\\\",\\\"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\":\"true\",\"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": [ @@ -68975,7 +67591,7 @@ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:1401-31.0.15.1694", + "gpu:1002:683d-26.20.13031.18002", "os:Windows-10-19045", "pool:Skia" ], @@ -69008,7 +67624,7 @@ "test" ] }, - "Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All-ANGLE": { + "Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-ANGLE": { "caches": [ { "name": "vpython", @@ -69050,7 +67666,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -69064,7 +67680,7 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"GTX960\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"ShuttleC\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_d3d11_es2\\\",\\\"angle_d3d11_es3\\\",\\\"angle_d3d11_es2_msaa4\\\",\\\"angle_d3d11_es2_dmsaa\\\",\\\"angle_d3d11_es3_msaa4\\\",\\\"angle_d3d11_es3_dmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All-ANGLE\\\",\\\"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\":\"true\",\"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-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonHD7770\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"ShuttleA\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_d3d11_es2\\\",\\\"angle_d3d11_es3\\\",\\\"angle_d3d11_es2_msaa4\\\",\\\"angle_d3d11_es2_dmsaa\\\",\\\"angle_d3d11_es3_msaa4\\\",\\\"angle_d3d11_es3_dmsaa\\\",\\\"angle_d3d9_es2\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleAsLValueES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicAll_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-ANGLE\\\",\\\"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\":\"true\",\"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": [ @@ -69072,7 +67688,7 @@ "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:1401-31.0.15.1694", + "gpu:1002:683d-26.20.13031.18002", "os:Windows-10-19045", "pool:Skia" ], @@ -69105,7 +67721,7 @@ "test" ] }, - "Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All-Vulkan": { + "Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-Direct3D": { "caches": [ { "name": "vpython", @@ -69147,7 +67763,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -69161,15 +67777,15 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"GTX960\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"ShuttleC\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All-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\":\"true\",\"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-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-Direct3D\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonHD7770\\\",\\\"extra_config\\\",\\\"Direct3D\\\",\\\"model\\\",\\\"ShuttleA\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"d3d\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLIntrinsicAll_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructIndexStore_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexLookup_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleIndexStore_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-Direct3D\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Release-Vulkan", + "Build-Win-Clang-x86_64-Release-Direct3D", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:1401-31.0.15.1694", + "gpu:1002:683d-26.20.13031.18002", "os:Windows-10-19045", "pool:Skia" ], @@ -69202,7 +67818,7 @@ "test" ] }, - "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All": { + "Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-Vulkan": { "caches": [ { "name": "vpython", @@ -69244,7 +67860,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -69258,16 +67874,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"MSVC\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"gldmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All\\\",\\\"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\":\"true\",\"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-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"RadeonHD7770\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"ShuttleA\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"VkDrawableImportTest\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-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\":\"true\",\"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": [ - "Build-Win-MSVC-x86_64-Debug", + "Build-Win-Clang-x86_64-Release-Vulkan", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:1cb3-30.0.15.1179", - "os:Windows-10-19043", + "gpu:1002:683d-26.20.13031.18002", + "os:Windows-10-19045", "pool:Skia" ], "environment": { @@ -69299,7 +67915,7 @@ "test" ] }, - "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Direct3D": { + "Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All": { "caches": [ { "name": "vpython", @@ -69341,7 +67957,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -69355,16 +67971,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Direct3D\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"MSVC\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"Direct3D\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"d3d\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Direct3D\\\",\\\"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\":\"true\",\"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-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"GTX960\\\",\\\"model\\\",\\\"ShuttleC\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-MSVC-x86_64-Debug-Direct3D", + "Build-Win-Clang-x86_64-Debug", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:1cb3-30.0.15.1179", - "os:Windows-10-19043", + "gpu:10de:1401-31.0.15.3667", + "os:Windows-10-19045", "pool:Skia" ], "environment": { @@ -69396,7 +68012,7 @@ "test" ] }, - "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Graphite_Dawn": { + "Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE": { "caches": [ { "name": "vpython", @@ -69438,7 +68054,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -69452,16 +68068,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Graphite_Dawn\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"MSVC\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"Graphite_Dawn\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"grdawn\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"image_subset\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"hugebitmapshader\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"path_huge_aa\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"verylargebitmap\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"verylarge_picture_image\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"tall_stretched_bitmaps\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"runtime_intrinsics_matrix\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BackendTextureTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GraphitePurgeNotUsedSinceResourcesTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"MakeColorSpace_Test\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"PaintParamsKeyTest\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_no_bleed\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_down\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_rose\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthrough_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthroughAndVarDecls_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithLoops_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--match\\\",\\\"~async_rescale_and_read\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Graphite_Dawn\\\",\\\"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\":\"true\",\"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-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"GTX960\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"ShuttleC\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_d3d11_es2\\\",\\\"angle_d3d11_es3\\\",\\\"angle_d3d11_es2_msaa4\\\",\\\"angle_d3d11_es2_dmsaa\\\",\\\"angle_d3d11_es3_msaa4\\\",\\\"angle_d3d11_es3_dmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleAsLValueES3_GPU\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-MSVC-x86_64-Debug-Graphite_Dawn", + "Build-Win-Clang-x86_64-Debug-ANGLE", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:1cb3-30.0.15.1179", - "os:Windows-10-19043", + "gpu:10de:1401-31.0.15.3667", + "os:Windows-10-19045", "pool:Skia" ], "environment": { @@ -69493,7 +68109,7 @@ "test" ] }, - "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Vulkan": { + "Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-Vulkan": { "caches": [ { "name": "vpython", @@ -69535,7 +68151,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -69549,16 +68165,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"MSVC\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"vkdmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"vkmsaa4\\\",\\\"gm\\\",\\\"_\\\",\\\"shadow_utils\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-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\":\"true\",\"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-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"GTX960\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"ShuttleC\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-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\":\"true\",\"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": [ - "Build-Win-MSVC-x86_64-Debug-Vulkan", + "Build-Win-Clang-x86_64-Debug-Vulkan", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:1cb3-30.0.15.1179", - "os:Windows-10-19043", + "gpu:10de:1401-31.0.15.3667", + "os:Windows-10-19045", "pool:Skia" ], "environment": { @@ -69590,7 +68206,7 @@ "test" ] }, - "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All": { + "Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -69632,7 +68248,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -69646,16 +68262,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"MSVC\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"gldmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All\\\",\\\"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\":\"true\",\"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-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"GTX960\\\",\\\"model\\\",\\\"ShuttleC\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-MSVC-x86_64-Release", + "Build-Win-Clang-x86_64-Release", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:1cb3-30.0.15.1179", - "os:Windows-10-19043", + "gpu:10de:1401-31.0.15.3667", + "os:Windows-10-19045", "pool:Skia" ], "environment": { @@ -69687,7 +68303,7 @@ "test" ] }, - "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Direct3D": { + "Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All-ANGLE": { "caches": [ { "name": "vpython", @@ -69729,7 +68345,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -69743,16 +68359,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Direct3D\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"MSVC\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"Direct3D\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"d3d\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Direct3D\\\",\\\"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\":\"true\",\"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-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All-ANGLE\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"GTX960\\\",\\\"extra_config\\\",\\\"ANGLE\\\",\\\"model\\\",\\\"ShuttleC\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"angle_d3d11_es2\\\",\\\"angle_d3d11_es3\\\",\\\"angle_d3d11_es2_msaa4\\\",\\\"angle_d3d11_es2_dmsaa\\\",\\\"angle_d3d11_es3_msaa4\\\",\\\"angle_d3d11_es3_dmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwizzleAsLValueES3_GPU\\\",\\\"--match\\\",\\\"~BlurMaskBiggerThanDest\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All-ANGLE\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-MSVC-x86_64-Release-Direct3D", + "Build-Win-Clang-x86_64-Release-ANGLE", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:1cb3-30.0.15.1179", - "os:Windows-10-19043", + "gpu:10de:1401-31.0.15.3667", + "os:Windows-10-19045", "pool:Skia" ], "environment": { @@ -69784,7 +68400,7 @@ "test" ] }, - "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Graphite_Dawn": { + "Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All-Vulkan": { "caches": [ { "name": "vpython", @@ -69826,7 +68442,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -69840,16 +68456,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Graphite_Dawn\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"MSVC\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"Graphite_Dawn\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"grdawn\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"image_subset\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"hugebitmapshader\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"path_huge_aa\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"verylargebitmap\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"verylarge_picture_image\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"tall_stretched_bitmaps\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"runtime_intrinsics_matrix\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BackendTextureTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GraphitePurgeNotUsedSinceResourcesTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"MakeColorSpace_Test\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"PaintParamsKeyTest\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_no_bleed\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_down\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_rose\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthrough_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthroughAndVarDecls_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithLoops_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--match\\\",\\\"~async_rescale_and_read\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Graphite_Dawn\\\",\\\"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\":\"true\",\"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-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"GTX960\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"ShuttleC\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All-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\":\"true\",\"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": [ - "Build-Win-MSVC-x86_64-Release-Graphite_Dawn", + "Build-Win-Clang-x86_64-Release-Vulkan", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "gpu:10de:1cb3-30.0.15.1179", - "os:Windows-10-19043", + "gpu:10de:1401-31.0.15.3667", + "os:Windows-10-19045", "pool:Skia" ], "environment": { @@ -69881,7 +68497,7 @@ "test" ] }, - "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Vulkan": { + "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All": { "caches": [ { "name": "vpython", @@ -69923,7 +68539,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -69937,11 +68553,11 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"MSVC\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"vkdmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"vkmsaa4\\\",\\\"gm\\\",\\\"_\\\",\\\"shadow_utils\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-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\":\"true\",\"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-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"MSVC\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"gldmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-MSVC-x86_64-Release-Vulkan", + "Build-Win-MSVC-x86_64-Debug", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ @@ -69978,7 +68594,7 @@ "test" ] }, - "Test-Win2019-Clang-GCE-CPU-AVX2-x86-Debug-All": { + "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Direct3D": { "caches": [ { "name": "vpython", @@ -70020,7 +68636,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -70034,17 +68650,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win2019-Clang-GCE-CPU-AVX2-x86-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"model\\\",\\\"GCE\\\",\\\"os\\\",\\\"Win2019\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--threads\\\",\\\"4\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win2019-Clang-GCE-CPU-AVX2-x86-Debug-All\\\",\\\"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\":\"true\",\"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-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Direct3D\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"MSVC\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"Direct3D\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"d3d\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Direct3D\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-Clang-x86-Debug", + "Build-Win-MSVC-x86_64-Debug-Direct3D", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "machine_type:n1-standard-16", - "os:Windows-Server-17763", + "gpu:10de:1cb3-30.0.15.1179", + "os:Windows-10-19043", "pool:Skia" ], "environment": { @@ -70065,18 +68680,18 @@ "cache/vpython" ] }, - "execution_timeout_ns": 21600000000000, + "execution_timeout_ns": 14400000000000, "expiration_ns": 72000000000000, "extra_tags": { "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" }, - "io_timeout_ns": 21600000000000, + "io_timeout_ns": 14400000000000, "max_attempts": 2, "outputs": [ "test" ] }, - "Test-Win2019-Clang-GCE-CPU-AVX2-x86-Release-All": { + "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Graphite_Dawn": { "caches": [ { "name": "vpython", @@ -70118,7 +68733,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -70132,17 +68747,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win2019-Clang-GCE-CPU-AVX2-x86-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"model\\\",\\\"GCE\\\",\\\"os\\\",\\\"Win2019\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--threads\\\",\\\"4\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win2019-Clang-GCE-CPU-AVX2-x86-Release-All\\\",\\\"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\":\"true\",\"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-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Graphite_Dawn\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"MSVC\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"Graphite_Dawn\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"grdawn\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"image_subset\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"hugebitmapshader\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_no_bleed\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_down\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_up\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_rose\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"tall_stretched_bitmaps\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"runtime_intrinsics_matrix\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BackendTextureTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GraphitePurgeNotUsedSinceResourcesTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"MakeColorSpace_Test\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"PaintParamsKeyTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Graphite\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthrough_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthroughAndVarDecls_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithLoops_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--match\\\",\\\"~^verylarge_picture_image$\\\",\\\"~^verylargebitmap$\\\",\\\"~^path_huge_aa$\\\",\\\"~^fast_constraint_red_is_allowed$\\\",\\\"~^strict_constraint_batch_no_red_allowed$\\\",\\\"~^strict_constraint_no_red_allowed$\\\",\\\"~async_rescale_and_read\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Graphite_Dawn\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-Clang-x86-Release", + "Build-Win-MSVC-x86_64-Debug-Graphite_Dawn", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "machine_type:n1-standard-16", - "os:Windows-Server-17763", + "gpu:10de:1cb3-30.0.15.1179", + "os:Windows-10-19043", "pool:Skia" ], "environment": { @@ -70174,7 +68788,7 @@ "test" ] }, - "Test-Win2019-Clang-GCE-CPU-AVX2-x86_64-Debug-All-ASAN": { + "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Graphite_Vulkan": { "caches": [ { "name": "vpython", @@ -70216,7 +68830,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -70230,17 +68844,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win2019-Clang-GCE-CPU-AVX2-x86_64-Debug-All-ASAN\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"extra_config\\\",\\\"ASAN\\\",\\\"model\\\",\\\"GCE\\\",\\\"os\\\",\\\"Win2019\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"composeshader_bitmap\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win2019-Clang-GCE-CPU-AVX2-x86_64-Debug-All-ASAN\\\",\\\"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-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Graphite_Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"MSVC\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"Graphite_Vulkan\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"grvk\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"image_subset\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"hugebitmapshader\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_no_bleed\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_down\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_up\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_rose\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"aaxfermodes\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Graphite\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"DeviceTestVertexTransparency\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GraphitePromiseImageMultipleImgUses\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GraphitePromiseImageRecorderLoss\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GraphitePurgeNotUsedSinceResourcesTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GraphiteTextureProxyTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GraphiteYUVAPromiseImageMultipleImgUses\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GraphiteYUVAPromiseImageRecorderLoss\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"ImageProviderTest_Graphite_Testing\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"ImageProviderTest_Graphite_Default\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"MakeColorSpace_Test\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"ImageProviderTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"ImageShaderTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"MutableImagesTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"MultisampleRetainTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"NonVolatileGraphitePromiseImageTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"NonVolatileGraphiteYUVAPromiseImageTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"PaintParamsKeyTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"RecordingOrderTest_Graphite\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"RecordingSurfacesTestClear\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"ShaderTestNestedBlendsGraphite\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkRuntimeEffectSimple_Graphite\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"VolatileGraphiteYUVAPromiseImageTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"VolatileGraphitePromiseImageTest\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"--match\\\",\\\"~^verylarge_picture_image$\\\",\\\"~^verylargebitmap$\\\",\\\"~^path_huge_aa$\\\",\\\"~^fast_constraint_red_is_allowed$\\\",\\\"~^strict_constraint_batch_no_red_allowed$\\\",\\\"~^strict_constraint_no_red_allowed$\\\",\\\"~async_rescale_and_read\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Graphite_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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Debug-ASAN", + "Build-Win-MSVC-x86_64-Debug-Graphite_Vulkan", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "machine_type:n1-standard-16", - "os:Windows-Server-17763", + "gpu:10de:1cb3-30.0.15.1179", + "os:Windows-10-19043", "pool:Skia" ], "environment": { @@ -70267,12 +68880,12 @@ "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" }, "io_timeout_ns": 14400000000000, - "max_attempts": 1, + "max_attempts": 2, "outputs": [ "test" ] }, - "Test-Win2019-Clang-GCE-CPU-AVX2-x86_64-Debug-All-ASAN_BonusConfigs": { + "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Vulkan": { "caches": [ { "name": "vpython", @@ -70314,7 +68927,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -70328,17 +68941,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win2019-Clang-GCE-CPU-AVX2-x86_64-Debug-All-ASAN_BonusConfigs\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"extra_config\\\",\\\"ASAN_BonusConfigs\\\",\\\"model\\\",\\\"GCE\\\",\\\"os\\\",\\\"Win2019\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"r8\\\",\\\"565\\\",\\\"pic-8888\\\",\\\"serialize-8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"--skip\\\",\\\"r8\\\",\\\"image\\\",\\\"_\\\",\\\"_\\\",\\\"r8\\\",\\\"colorImage\\\",\\\"_\\\",\\\"_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"composeshader_bitmap\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"strict_constraint_batch_no_red_allowed\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"strict_constraint_no_red_allowed\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fast_constraint_red_is_allowed\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"c_gms\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"colortype\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"colortype_xfermodes\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"drawfilter\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_bounds_0.75_0\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_bounds_1_-0.25\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_bounds\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_match\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_iter\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemasksubset\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"wacky_yuv_formats_domain\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter_crop\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter_crop_ref\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter_ref\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"bitmapfilters\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"bitmapshaders\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"convex_poly_clip\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"extractalpha\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"filterbitmap_checkerboard_32_32_g8\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"filterbitmap_image_mandrill_64\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"shadows\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"simpleaaclip_aaclip\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"composeshader_bitmap\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"scaled_tilemodes_npot\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"scaled_tilemodes\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"typefacerendering_pfaMac\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"parsedpaths\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"ImageGeneratorExternal_rect\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"ImageGeneratorExternal_shader\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"shadow_utils\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"graphitestart\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"persp_images\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"all_bitmap_configs\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"makecolorspace\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"readpixels\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"draw_image_set_rect_to_rect\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"draw_image_set_alpha_only\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"compositor_quads_shader\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"wacky_yuv_formats_qtr\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"runtime_effect_image\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"ctmpatheffect\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image_out_of_gamut\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"analytic_antialias_convex\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"verylargebitmap\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"verylarge_picture_image\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"drawfilter\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-picture\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-picture\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-raster\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-raster\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-ctable\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-ctable\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"complexclip4_bw\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"complexclip4_bw\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"complexclip4_aa\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"complexclip4_aa\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"p3\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"p3\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up_large\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up_large\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_down\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_down\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_up\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_up\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_down\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_down\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_rose\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_rose\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_no_bleed\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_no_bleed\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_alpha_type\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_alpha_type\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win2019-Clang-GCE-CPU-AVX2-x86_64-Debug-All-ASAN_BonusConfigs\\\",\\\"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-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"MSVC\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"vkdmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"vkmsaa4\\\",\\\"gm\\\",\\\"_\\\",\\\"shadow_utils\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Debug-ASAN", + "Build-Win-MSVC-x86_64-Debug-Vulkan", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "machine_type:n1-standard-16", - "os:Windows-Server-17763", + "gpu:10de:1cb3-30.0.15.1179", + "os:Windows-10-19043", "pool:Skia" ], "environment": { @@ -70365,12 +68977,12 @@ "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" }, "io_timeout_ns": 14400000000000, - "max_attempts": 1, + "max_attempts": 2, "outputs": [ "test" ] }, - "Test-Win2019-Clang-GCE-CPU-AVX2-x86_64-Release-All": { + "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -70412,7 +69024,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -70426,17 +69038,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win2019-Clang-GCE-CPU-AVX2-x86_64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"model\\\",\\\"GCE\\\",\\\"os\\\",\\\"Win2019\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"composeshader_bitmap\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win2019-Clang-GCE-CPU-AVX2-x86_64-Release-All\\\",\\\"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\":\"true\",\"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-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"MSVC\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gl\\\",\\\"gldft\\\",\\\"glmsaa4\\\",\\\"gldmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-Clang-x86_64-Release", + "Build-Win-MSVC-x86_64-Release", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "machine_type:n1-standard-16", - "os:Windows-Server-17763", + "gpu:10de:1cb3-30.0.15.1179", + "os:Windows-10-19043", "pool:Skia" ], "environment": { @@ -70468,7 +69079,7 @@ "test" ] }, - "Test-Win2019-MSVC-GCE-CPU-AVX2-x86-Debug-All": { + "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Direct3D": { "caches": [ { "name": "vpython", @@ -70510,7 +69121,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -70524,17 +69135,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win2019-MSVC-GCE-CPU-AVX2-x86-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86\\\",\\\"compiler\\\",\\\"MSVC\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"model\\\",\\\"GCE\\\",\\\"os\\\",\\\"Win2019\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--threads\\\",\\\"4\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win2019-MSVC-GCE-CPU-AVX2-x86-Debug-All\\\",\\\"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\":\"true\",\"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-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Direct3D\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"MSVC\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"Direct3D\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"d3d\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Direct3D\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-MSVC-x86-Debug", + "Build-Win-MSVC-x86_64-Release-Direct3D", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "machine_type:n1-standard-16", - "os:Windows-Server-17763", + "gpu:10de:1cb3-30.0.15.1179", + "os:Windows-10-19043", "pool:Skia" ], "environment": { @@ -70555,18 +69165,18 @@ "cache/vpython" ] }, - "execution_timeout_ns": 21600000000000, + "execution_timeout_ns": 14400000000000, "expiration_ns": 72000000000000, "extra_tags": { "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" }, - "io_timeout_ns": 21600000000000, + "io_timeout_ns": 14400000000000, "max_attempts": 2, "outputs": [ "test" ] }, - "Test-Win2019-MSVC-GCE-CPU-AVX2-x86-Release-All": { + "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Graphite_Dawn": { "caches": [ { "name": "vpython", @@ -70608,7 +69218,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -70622,17 +69232,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win2019-MSVC-GCE-CPU-AVX2-x86-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86\\\",\\\"compiler\\\",\\\"MSVC\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"model\\\",\\\"GCE\\\",\\\"os\\\",\\\"Win2019\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--threads\\\",\\\"4\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win2019-MSVC-GCE-CPU-AVX2-x86-Release-All\\\",\\\"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\":\"true\",\"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-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Graphite_Dawn\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"MSVC\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"Graphite_Dawn\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"grdawn\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"image_subset\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"hugebitmapshader\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_no_bleed\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_down\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_up\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_rose\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"tall_stretched_bitmaps\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"runtime_intrinsics_matrix\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BackendTextureTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GraphitePurgeNotUsedSinceResourcesTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"MakeColorSpace_Test\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"PaintParamsKeyTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Graphite\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthrough_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthroughAndVarDecls_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithLoops_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES2_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixConstructorsES3_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLPreserveSideEffects_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLStructFieldNoFolding_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"--match\\\",\\\"~^verylarge_picture_image$\\\",\\\"~^verylargebitmap$\\\",\\\"~^path_huge_aa$\\\",\\\"~^fast_constraint_red_is_allowed$\\\",\\\"~^strict_constraint_batch_no_red_allowed$\\\",\\\"~^strict_constraint_no_red_allowed$\\\",\\\"~async_rescale_and_read\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Graphite_Dawn\\\",\\\"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\":\"true\",\"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": [ - "Build-Win-MSVC-x86-Release", + "Build-Win-MSVC-x86_64-Release-Graphite_Dawn", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "machine_type:n1-standard-16", - "os:Windows-Server-17763", + "gpu:10de:1cb3-30.0.15.1179", + "os:Windows-10-19043", "pool:Skia" ], "environment": { @@ -70664,7 +69273,7 @@ "test" ] }, - "Test-Win2019-MSVC-GCE-CPU-AVX2-x86_64-Debug-All": { + "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Graphite_Vulkan": { "caches": [ { "name": "vpython", @@ -70706,7 +69315,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -70720,17 +69329,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win2019-MSVC-GCE-CPU-AVX2-x86_64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"MSVC\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"model\\\",\\\"GCE\\\",\\\"os\\\",\\\"Win2019\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"composeshader_bitmap\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win2019-MSVC-GCE-CPU-AVX2-x86_64-Debug-All\\\",\\\"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\":\"true\",\"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-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Graphite_Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"MSVC\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"Graphite_Vulkan\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"grvk\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"--skip\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"image_subset\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"hugebitmapshader\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_no_bleed\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_down\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_up\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_rose\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"aaxfermodes\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Graphite\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"DeviceTestVertexTransparency\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GraphitePromiseImageMultipleImgUses\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GraphitePromiseImageRecorderLoss\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GraphitePurgeNotUsedSinceResourcesTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GraphiteTextureProxyTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GraphiteYUVAPromiseImageMultipleImgUses\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GraphiteYUVAPromiseImageRecorderLoss\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"ImageProviderTest_Graphite_Testing\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"ImageProviderTest_Graphite_Default\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"MakeColorSpace_Test\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"ImageProviderTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"ImageShaderTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"MutableImagesTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"MultisampleRetainTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"NonVolatileGraphitePromiseImageTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"NonVolatileGraphiteYUVAPromiseImageTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"PaintParamsKeyTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"RecordingOrderTest_Graphite\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"RecordingSurfacesTestClear\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"ShaderTestNestedBlendsGraphite\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkRuntimeEffectSimple_Graphite\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"SkSLMatrixScalarNoOpFolding_GPU\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"VolatileGraphiteYUVAPromiseImageTest\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"VolatileGraphitePromiseImageTest\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"--match\\\",\\\"~^verylarge_picture_image$\\\",\\\"~^verylargebitmap$\\\",\\\"~^path_huge_aa$\\\",\\\"~^fast_constraint_red_is_allowed$\\\",\\\"~^strict_constraint_batch_no_red_allowed$\\\",\\\"~^strict_constraint_no_red_allowed$\\\",\\\"~async_rescale_and_read\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Graphite_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\":\"true\",\"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": [ - "Build-Win-MSVC-x86_64-Debug", + "Build-Win-MSVC-x86_64-Release-Graphite_Vulkan", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "machine_type:n1-standard-16", - "os:Windows-Server-17763", + "gpu:10de:1cb3-30.0.15.1179", + "os:Windows-10-19043", "pool:Skia" ], "environment": { @@ -70762,7 +69370,7 @@ "test" ] }, - "Test-Win2019-MSVC-GCE-CPU-AVX2-x86_64-Release-All": { + "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Vulkan": { "caches": [ { "name": "vpython", @@ -70804,7 +69412,7 @@ { "name": "skia/bots/skp", "path": "skp", - "version": "version:432" + "version": "version:438" }, { "name": "skia/bots/svg", @@ -70818,17 +69426,16 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win2019-MSVC-GCE-CPU-AVX2-x86_64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"MSVC\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"model\\\",\\\"GCE\\\",\\\"os\\\",\\\"Win2019\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"composeshader_bitmap\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win2019-MSVC-GCE-CPU-AVX2-x86_64-Release-All\\\",\\\"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\":\"true\",\"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-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Vulkan\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"MSVC\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"QuadroP400\\\",\\\"extra_config\\\",\\\"Vulkan\\\",\\\"model\\\",\\\"Golo\\\",\\\"os\\\",\\\"Win10\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"vk\\\",\\\"vkmsaa4\\\",\\\"vkdmsaa\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLCommaSideEffects\\\",\\\"vkmsaa4\\\",\\\"gm\\\",\\\"_\\\",\\\"shadow_utils\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-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\":\"true\",\"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": [ - "Build-Win-MSVC-x86_64-Release", + "Build-Win-MSVC-x86_64-Release-Vulkan", "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "machine_type:n1-standard-16", - "os:Windows-Server-17763", + "gpu:10de:1cb3-30.0.15.1179", + "os:Windows-10-19043", "pool:Skia" ], "environment": { @@ -70860,7 +69467,7 @@ "test" ] }, - "Test-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Debug-All": { + "Test-Win2019-Clang-GCE-CPU-AVX2-x86-Debug-All": { "caches": [ { "name": "vpython", @@ -70870,7 +69477,7 @@ "casSpec": "test", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/linux-arm64", + "name": "infra/3pp/tools/cpython3/windows-amd64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, @@ -70895,14 +69502,19 @@ "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, { - "name": "skia/bots/gsutil", - "path": "gsutil", - "version": "version:0" + "name": "skia/bots/skimage", + "path": "skimage", + "version": "version:47" }, { - "name": "skia/bots/ios-dev-image-13.6", - "path": "ios-dev-image-13.6", - "version": "version:0" + "name": "skia/bots/skp", + "path": "skp", + "version": "version:438" + }, + { + "name": "skia/bots/svg", + "path": "svg", + "version": "version:14" } ], "command": [ @@ -70911,19 +69523,17 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"PowerVRGT7800\\\",\\\"model\\\",\\\"iPadPro\\\",\\\"os\\\",\\\"iOS\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"glesdft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"gles\\\",\\\"skp\\\",\\\"_\\\",\\\"_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GrStyledShape\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthrough_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Debug-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Win2019-Clang-GCE-CPU-AVX2-x86-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"model\\\",\\\"GCE\\\",\\\"os\\\",\\\"Win2019\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--threads\\\",\\\"4\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win2019-Clang-GCE-CPU-AVX2-x86-Debug-All\\\",\\\"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\":\"true\",\"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": [ - "Build-Mac-Clang-arm64-Debug-iOS", - "Housekeeper-PerCommit-BundleRecipes", - "Housekeeper-PerCommit-IsolateSKP", - "Housekeeper-PerCommit-IsolateSVG", - "Housekeeper-PerCommit-IsolateSkImage" + "Build-Win-Clang-x86-Debug", + "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "device_type:iPad6,3", - "os:iOS-13.6", + "cpu:x86-64-Haswell_GCE", + "machine_type:n1-standard-16", + "os:Windows-Server-17763", "pool:Skia" ], "environment": { @@ -70932,7 +69542,6 @@ }, "env_prefixes": { "PATH": [ - "gsutil/gsutil", "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", "cipd_bin_packages", @@ -70945,19 +69554,18 @@ "cache/vpython" ] }, - "execution_timeout_ns": 14400000000000, + "execution_timeout_ns": 21600000000000, "expiration_ns": 72000000000000, "extra_tags": { "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" }, - "io_timeout_ns": 14400000000000, + "io_timeout_ns": 21600000000000, "max_attempts": 2, "outputs": [ "test" - ], - "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" + ] }, - "Test-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Debug-All-Metal": { + "Test-Win2019-Clang-GCE-CPU-AVX2-x86-Release-All": { "caches": [ { "name": "vpython", @@ -70967,7 +69575,7 @@ "casSpec": "test", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/linux-arm64", + "name": "infra/3pp/tools/cpython3/windows-amd64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, @@ -70992,14 +69600,19 @@ "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, { - "name": "skia/bots/gsutil", - "path": "gsutil", - "version": "version:0" + "name": "skia/bots/skimage", + "path": "skimage", + "version": "version:47" }, { - "name": "skia/bots/ios-dev-image-13.6", - "path": "ios-dev-image-13.6", - "version": "version:0" + "name": "skia/bots/skp", + "path": "skp", + "version": "version:438" + }, + { + "name": "skia/bots/svg", + "path": "svg", + "version": "version:14" } ], "command": [ @@ -71008,19 +69621,17 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Debug-All-Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"PowerVRGT7800\\\",\\\"extra_config\\\",\\\"Metal\\\",\\\"model\\\",\\\"iPadPro\\\",\\\"os\\\",\\\"iOS\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtl\\\",\\\"mtlmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GrStyledShape\\\",\\\"_\\\",\\\"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\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Debug-All-Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Win2019-Clang-GCE-CPU-AVX2-x86-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"model\\\",\\\"GCE\\\",\\\"os\\\",\\\"Win2019\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--threads\\\",\\\"4\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win2019-Clang-GCE-CPU-AVX2-x86-Release-All\\\",\\\"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\":\"true\",\"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": [ - "Build-Mac-Clang-arm64-Debug-iOS_Metal", - "Housekeeper-PerCommit-BundleRecipes", - "Housekeeper-PerCommit-IsolateSKP", - "Housekeeper-PerCommit-IsolateSVG", - "Housekeeper-PerCommit-IsolateSkImage" + "Build-Win-Clang-x86-Release", + "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "device_type:iPad6,3", - "os:iOS-13.6", + "cpu:x86-64-Haswell_GCE", + "machine_type:n1-standard-16", + "os:Windows-Server-17763", "pool:Skia" ], "environment": { @@ -71029,7 +69640,6 @@ }, "env_prefixes": { "PATH": [ - "gsutil/gsutil", "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", "cipd_bin_packages", @@ -71051,10 +69661,9 @@ "max_attempts": 2, "outputs": [ "test" - ], - "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" + ] }, - "Test-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Release-All": { + "Test-Win2019-Clang-GCE-CPU-AVX2-x86_64-Debug-All-ASAN": { "caches": [ { "name": "vpython", @@ -71064,7 +69673,7 @@ "casSpec": "test", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/linux-arm64", + "name": "infra/3pp/tools/cpython3/windows-amd64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, @@ -71089,14 +69698,19 @@ "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, { - "name": "skia/bots/gsutil", - "path": "gsutil", - "version": "version:0" + "name": "skia/bots/skimage", + "path": "skimage", + "version": "version:47" }, { - "name": "skia/bots/ios-dev-image-13.6", - "path": "ios-dev-image-13.6", - "version": "version:0" + "name": "skia/bots/skp", + "path": "skp", + "version": "version:438" + }, + { + "name": "skia/bots/svg", + "path": "svg", + "version": "version:14" } ], "command": [ @@ -71105,19 +69719,17 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"PowerVRGT7800\\\",\\\"model\\\",\\\"iPadPro\\\",\\\"os\\\",\\\"iOS\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"glesdft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"gles\\\",\\\"skp\\\",\\\"_\\\",\\\"_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GrStyledShape\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthrough_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Release-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Win2019-Clang-GCE-CPU-AVX2-x86_64-Debug-All-ASAN\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"extra_config\\\",\\\"ASAN\\\",\\\"model\\\",\\\"GCE\\\",\\\"os\\\",\\\"Win2019\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"composeshader_bitmap\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win2019-Clang-GCE-CPU-AVX2-x86_64-Debug-All-ASAN\\\",\\\"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": [ - "Build-Mac-Clang-arm64-Release-iOS", - "Housekeeper-PerCommit-BundleRecipes", - "Housekeeper-PerCommit-IsolateSKP", - "Housekeeper-PerCommit-IsolateSVG", - "Housekeeper-PerCommit-IsolateSkImage" + "Build-Win-Clang-x86_64-Debug-ASAN", + "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "device_type:iPad6,3", - "os:iOS-13.6", + "cpu:x86-64-Haswell_GCE", + "machine_type:n1-standard-16", + "os:Windows-Server-17763", "pool:Skia" ], "environment": { @@ -71126,7 +69738,6 @@ }, "env_prefixes": { "PATH": [ - "gsutil/gsutil", "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", "cipd_bin_packages", @@ -71145,13 +69756,12 @@ "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" }, "io_timeout_ns": 14400000000000, - "max_attempts": 2, + "max_attempts": 1, "outputs": [ "test" - ], - "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" + ] }, - "Test-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Release-All-Metal": { + "Test-Win2019-Clang-GCE-CPU-AVX2-x86_64-Debug-All-ASAN_BonusConfigs": { "caches": [ { "name": "vpython", @@ -71161,7 +69771,7 @@ "casSpec": "test", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/linux-arm64", + "name": "infra/3pp/tools/cpython3/windows-amd64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, @@ -71186,14 +69796,19 @@ "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, { - "name": "skia/bots/gsutil", - "path": "gsutil", - "version": "version:0" + "name": "skia/bots/skimage", + "path": "skimage", + "version": "version:47" }, { - "name": "skia/bots/ios-dev-image-13.6", - "path": "ios-dev-image-13.6", - "version": "version:0" + "name": "skia/bots/skp", + "path": "skp", + "version": "version:438" + }, + { + "name": "skia/bots/svg", + "path": "svg", + "version": "version:14" } ], "command": [ @@ -71202,19 +69817,17 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Release-All-Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"PowerVRGT7800\\\",\\\"extra_config\\\",\\\"Metal\\\",\\\"model\\\",\\\"iPadPro\\\",\\\"os\\\",\\\"iOS\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtl\\\",\\\"mtlmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GrStyledShape\\\",\\\"_\\\",\\\"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\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Release-All-Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Win2019-Clang-GCE-CPU-AVX2-x86_64-Debug-All-ASAN_BonusConfigs\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"extra_config\\\",\\\"ASAN_BonusConfigs\\\",\\\"model\\\",\\\"GCE\\\",\\\"os\\\",\\\"Win2019\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"r8\\\",\\\"565\\\",\\\"pic-8888\\\",\\\"serialize-8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"--skip\\\",\\\"r8\\\",\\\"image\\\",\\\"_\\\",\\\"_\\\",\\\"r8\\\",\\\"colorImage\\\",\\\"_\\\",\\\"_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"composeshader_bitmap\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"strict_constraint_batch_no_red_allowed\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"strict_constraint_no_red_allowed\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fast_constraint_red_is_allowed\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"c_gms\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"colortype\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"colortype_xfermodes\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"drawfilter\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_bounds_0.75_0\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_bounds_1_-0.25\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_bounds\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_match\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_iter\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemasksubset\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"wacky_yuv_formats_domain\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter_crop\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter_crop_ref\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagemakewithfilter_ref\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"imagefilterstransformed\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"bitmapfilters\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"bitmapshaders\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"convex_poly_clip\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"extractalpha\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"filterbitmap_checkerboard_32_32_g8\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"filterbitmap_image_mandrill_64\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"shadows\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"simpleaaclip_aaclip\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"composeshader_bitmap\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"scaled_tilemodes_npot\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"scaled_tilemodes\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"typefacerendering_pfaMac\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"parsedpaths\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"ImageGeneratorExternal_rect\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"ImageGeneratorExternal_shader\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"shadow_utils\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"graphitestart\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"persp_images\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"all_bitmap_configs\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"makecolorspace\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"readpixels\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"draw_image_set_rect_to_rect\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"draw_image_set_alpha_only\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"compositor_quads_shader\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"wacky_yuv_formats_qtr\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"runtime_effect_image\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"ctmpatheffect\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image_out_of_gamut\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"analytic_antialias_convex\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"verylargebitmap\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"verylarge_picture_image\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"perlinnoise_layered\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"perlinnoise_layered\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"drawfilter\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-picture\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-picture\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-raster\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-raster\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-ctable\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"image-cacherator-from-ctable\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"complexclip4_bw\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"complexclip4_bw\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"complexclip4_aa\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"complexclip4_aa\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"p3\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"p3\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up_large\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up_large\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_up\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_down\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_text_down\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_up\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_up\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_down\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_dog_down\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_rose\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_rose\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_no_bleed\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_no_bleed\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_alpha_type\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"async_rescale_and_read_alpha_type\\\",\\\"pic-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"serialize-8888\\\",\\\"gm\\\",\\\"_\\\",\\\"blurrect_compare\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win2019-Clang-GCE-CPU-AVX2-x86_64-Debug-All-ASAN_BonusConfigs\\\",\\\"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": [ - "Build-Mac-Clang-arm64-Release-iOS_Metal", - "Housekeeper-PerCommit-BundleRecipes", - "Housekeeper-PerCommit-IsolateSKP", - "Housekeeper-PerCommit-IsolateSVG", - "Housekeeper-PerCommit-IsolateSkImage" + "Build-Win-Clang-x86_64-Debug-ASAN", + "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "device_type:iPad6,3", - "os:iOS-13.6", + "cpu:x86-64-Haswell_GCE", + "machine_type:n1-standard-16", + "os:Windows-Server-17763", "pool:Skia" ], "environment": { @@ -71223,7 +69836,6 @@ }, "env_prefixes": { "PATH": [ - "gsutil/gsutil", "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", "cipd_bin_packages", @@ -71242,13 +69854,12 @@ "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" }, "io_timeout_ns": 14400000000000, - "max_attempts": 2, + "max_attempts": 1, "outputs": [ "test" - ], - "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" + ] }, - "Test-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Debug-All": { + "Test-Win2019-Clang-GCE-CPU-AVX2-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -71258,7 +69869,7 @@ "casSpec": "test", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/linux-arm64", + "name": "infra/3pp/tools/cpython3/windows-amd64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, @@ -71283,14 +69894,19 @@ "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, { - "name": "skia/bots/gsutil", - "path": "gsutil", - "version": "version:0" + "name": "skia/bots/skimage", + "path": "skimage", + "version": "version:47" }, { - "name": "skia/bots/ios-dev-image-13.3", - "path": "ios-dev-image-13.3", - "version": "version:0" + "name": "skia/bots/skp", + "path": "skp", + "version": "version:438" + }, + { + "name": "skia/bots/svg", + "path": "svg", + "version": "version:14" } ], "command": [ @@ -71299,19 +69915,17 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"PowerVRGT7600\\\",\\\"model\\\",\\\"iPhone7\\\",\\\"os\\\",\\\"iOS\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"glesdft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"gles\\\",\\\"skp\\\",\\\"_\\\",\\\"_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GrStyledShape\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthrough_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Debug-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Win2019-Clang-GCE-CPU-AVX2-x86_64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"model\\\",\\\"GCE\\\",\\\"os\\\",\\\"Win2019\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"composeshader_bitmap\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win2019-Clang-GCE-CPU-AVX2-x86_64-Release-All\\\",\\\"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\":\"true\",\"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": [ - "Build-Mac-Clang-arm64-Debug-iOS", - "Housekeeper-PerCommit-BundleRecipes", - "Housekeeper-PerCommit-IsolateSKP", - "Housekeeper-PerCommit-IsolateSVG", - "Housekeeper-PerCommit-IsolateSkImage" + "Build-Win-Clang-x86_64-Release", + "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "device_type:iPhone9,1", - "os:iOS-13.3.1", + "cpu:x86-64-Haswell_GCE", + "machine_type:n1-standard-16", + "os:Windows-Server-17763", "pool:Skia" ], "environment": { @@ -71320,7 +69934,6 @@ }, "env_prefixes": { "PATH": [ - "gsutil/gsutil", "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", "cipd_bin_packages", @@ -71342,10 +69955,9 @@ "max_attempts": 2, "outputs": [ "test" - ], - "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" + ] }, - "Test-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Debug-All-Metal": { + "Test-Win2019-MSVC-GCE-CPU-AVX2-x86-Debug-All": { "caches": [ { "name": "vpython", @@ -71355,7 +69967,7 @@ "casSpec": "test", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/linux-arm64", + "name": "infra/3pp/tools/cpython3/windows-amd64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, @@ -71380,14 +69992,19 @@ "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, { - "name": "skia/bots/gsutil", - "path": "gsutil", - "version": "version:0" + "name": "skia/bots/skimage", + "path": "skimage", + "version": "version:47" }, { - "name": "skia/bots/ios-dev-image-13.3", - "path": "ios-dev-image-13.3", - "version": "version:0" + "name": "skia/bots/skp", + "path": "skp", + "version": "version:438" + }, + { + "name": "skia/bots/svg", + "path": "svg", + "version": "version:14" } ], "command": [ @@ -71396,19 +70013,17 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Debug-All-Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"PowerVRGT7600\\\",\\\"extra_config\\\",\\\"Metal\\\",\\\"model\\\",\\\"iPhone7\\\",\\\"os\\\",\\\"iOS\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtl\\\",\\\"mtlmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GrStyledShape\\\",\\\"_\\\",\\\"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\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Debug-All-Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Win2019-MSVC-GCE-CPU-AVX2-x86-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86\\\",\\\"compiler\\\",\\\"MSVC\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"model\\\",\\\"GCE\\\",\\\"os\\\",\\\"Win2019\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--threads\\\",\\\"4\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win2019-MSVC-GCE-CPU-AVX2-x86-Debug-All\\\",\\\"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\":\"true\",\"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": [ - "Build-Mac-Clang-arm64-Debug-iOS_Metal", - "Housekeeper-PerCommit-BundleRecipes", - "Housekeeper-PerCommit-IsolateSKP", - "Housekeeper-PerCommit-IsolateSVG", - "Housekeeper-PerCommit-IsolateSkImage" + "Build-Win-MSVC-x86-Debug", + "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "device_type:iPhone9,1", - "os:iOS-13.3.1", + "cpu:x86-64-Haswell_GCE", + "machine_type:n1-standard-16", + "os:Windows-Server-17763", "pool:Skia" ], "environment": { @@ -71417,7 +70032,6 @@ }, "env_prefixes": { "PATH": [ - "gsutil/gsutil", "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", "cipd_bin_packages", @@ -71430,19 +70044,18 @@ "cache/vpython" ] }, - "execution_timeout_ns": 14400000000000, + "execution_timeout_ns": 21600000000000, "expiration_ns": 72000000000000, "extra_tags": { "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" }, - "io_timeout_ns": 14400000000000, + "io_timeout_ns": 21600000000000, "max_attempts": 2, "outputs": [ "test" - ], - "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" + ] }, - "Test-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Release-All": { + "Test-Win2019-MSVC-GCE-CPU-AVX2-x86-Release-All": { "caches": [ { "name": "vpython", @@ -71452,7 +70065,7 @@ "casSpec": "test", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/linux-arm64", + "name": "infra/3pp/tools/cpython3/windows-amd64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, @@ -71477,14 +70090,19 @@ "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, { - "name": "skia/bots/gsutil", - "path": "gsutil", - "version": "version:0" + "name": "skia/bots/skimage", + "path": "skimage", + "version": "version:47" }, { - "name": "skia/bots/ios-dev-image-13.3", - "path": "ios-dev-image-13.3", - "version": "version:0" + "name": "skia/bots/skp", + "path": "skp", + "version": "version:438" + }, + { + "name": "skia/bots/svg", + "path": "svg", + "version": "version:14" } ], "command": [ @@ -71493,19 +70111,17 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"PowerVRGT7600\\\",\\\"model\\\",\\\"iPhone7\\\",\\\"os\\\",\\\"iOS\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"glesdft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"gles\\\",\\\"skp\\\",\\\"_\\\",\\\"_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GrStyledShape\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthrough_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Release-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Win2019-MSVC-GCE-CPU-AVX2-x86-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86\\\",\\\"compiler\\\",\\\"MSVC\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"model\\\",\\\"GCE\\\",\\\"os\\\",\\\"Win2019\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--threads\\\",\\\"4\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win2019-MSVC-GCE-CPU-AVX2-x86-Release-All\\\",\\\"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\":\"true\",\"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": [ - "Build-Mac-Clang-arm64-Release-iOS", - "Housekeeper-PerCommit-BundleRecipes", - "Housekeeper-PerCommit-IsolateSKP", - "Housekeeper-PerCommit-IsolateSVG", - "Housekeeper-PerCommit-IsolateSkImage" + "Build-Win-MSVC-x86-Release", + "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "device_type:iPhone9,1", - "os:iOS-13.3.1", + "cpu:x86-64-Haswell_GCE", + "machine_type:n1-standard-16", + "os:Windows-Server-17763", "pool:Skia" ], "environment": { @@ -71514,7 +70130,6 @@ }, "env_prefixes": { "PATH": [ - "gsutil/gsutil", "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", "cipd_bin_packages", @@ -71536,10 +70151,9 @@ "max_attempts": 2, "outputs": [ "test" - ], - "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" + ] }, - "Test-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Release-All-Metal": { + "Test-Win2019-MSVC-GCE-CPU-AVX2-x86_64-Debug-All": { "caches": [ { "name": "vpython", @@ -71549,7 +70163,7 @@ "casSpec": "test", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/linux-arm64", + "name": "infra/3pp/tools/cpython3/windows-amd64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, @@ -71574,14 +70188,19 @@ "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, { - "name": "skia/bots/gsutil", - "path": "gsutil", - "version": "version:0" + "name": "skia/bots/skimage", + "path": "skimage", + "version": "version:47" }, { - "name": "skia/bots/ios-dev-image-13.3", - "path": "ios-dev-image-13.3", - "version": "version:0" + "name": "skia/bots/skp", + "path": "skp", + "version": "version:438" + }, + { + "name": "skia/bots/svg", + "path": "svg", + "version": "version:14" } ], "command": [ @@ -71590,19 +70209,17 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Release-All-Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"PowerVRGT7600\\\",\\\"extra_config\\\",\\\"Metal\\\",\\\"model\\\",\\\"iPhone7\\\",\\\"os\\\",\\\"iOS\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtl\\\",\\\"mtlmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GrStyledShape\\\",\\\"_\\\",\\\"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\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Release-All-Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Win2019-MSVC-GCE-CPU-AVX2-x86_64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"MSVC\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"model\\\",\\\"GCE\\\",\\\"os\\\",\\\"Win2019\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"composeshader_bitmap\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win2019-MSVC-GCE-CPU-AVX2-x86_64-Debug-All\\\",\\\"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\":\"true\",\"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": [ - "Build-Mac-Clang-arm64-Release-iOS_Metal", - "Housekeeper-PerCommit-BundleRecipes", - "Housekeeper-PerCommit-IsolateSKP", - "Housekeeper-PerCommit-IsolateSVG", - "Housekeeper-PerCommit-IsolateSkImage" + "Build-Win-MSVC-x86_64-Debug", + "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "device_type:iPhone9,1", - "os:iOS-13.3.1", + "cpu:x86-64-Haswell_GCE", + "machine_type:n1-standard-16", + "os:Windows-Server-17763", "pool:Skia" ], "environment": { @@ -71611,7 +70228,6 @@ }, "env_prefixes": { "PATH": [ - "gsutil/gsutil", "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", "cipd_bin_packages", @@ -71633,10 +70249,9 @@ "max_attempts": 2, "outputs": [ "test" - ], - "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" + ] }, - "Test-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Debug-All": { + "Test-Win2019-MSVC-GCE-CPU-AVX2-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -71646,7 +70261,7 @@ "casSpec": "test", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/linux-arm64", + "name": "infra/3pp/tools/cpython3/windows-amd64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, @@ -71671,14 +70286,19 @@ "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, { - "name": "skia/bots/gsutil", - "path": "gsutil", - "version": "version:0" + "name": "skia/bots/skimage", + "path": "skimage", + "version": "version:47" }, { - "name": "skia/bots/ios-dev-image-13.3", - "path": "ios-dev-image-13.3", - "version": "version:0" + "name": "skia/bots/skp", + "path": "skp", + "version": "version:438" + }, + { + "name": "skia/bots/svg", + "path": "svg", + "version": "version:14" } ], "command": [ @@ -71687,19 +70307,17 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleA11\\\",\\\"model\\\",\\\"iPhone8\\\",\\\"os\\\",\\\"iOS\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"glesdft\\\",\\\"glesmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"gles\\\",\\\"skp\\\",\\\"_\\\",\\\"_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GrStyledShape\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthrough_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Debug-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-Win2019-MSVC-GCE-CPU-AVX2-x86_64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"x86_64\\\",\\\"compiler\\\",\\\"MSVC\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"CPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AVX2\\\",\\\"model\\\",\\\"GCE\\\",\\\"os\\\",\\\"Win2019\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nogpu\\\",\\\"--config\\\",\\\"8888\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"--skip\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"pal8os2v2-16.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"gm\\\",\\\"_\\\",\\\"composeshader_bitmap\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"testimgari.jpg\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle8-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rle4-height-negative.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-Win2019-MSVC-GCE-CPU-AVX2-x86_64-Release-All\\\",\\\"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\":\"true\",\"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": [ - "Build-Mac-Clang-arm64-Debug-iOS", - "Housekeeper-PerCommit-BundleRecipes", - "Housekeeper-PerCommit-IsolateSKP", - "Housekeeper-PerCommit-IsolateSVG", - "Housekeeper-PerCommit-IsolateSkImage" + "Build-Win-MSVC-x86_64-Release", + "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ - "device_type:iPhone10,1", - "os:iOS-13.3.1", + "cpu:x86-64-Haswell_GCE", + "machine_type:n1-standard-16", + "os:Windows-Server-17763", "pool:Skia" ], "environment": { @@ -71708,7 +70326,6 @@ }, "env_prefixes": { "PATH": [ - "gsutil/gsutil", "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", "cipd_bin_packages", @@ -71730,10 +70347,9 @@ "max_attempts": 2, "outputs": [ "test" - ], - "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" + ] }, - "Test-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Debug-All-Metal": { + "Test-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Debug-All": { "caches": [ { "name": "vpython", @@ -71773,8 +70389,8 @@ "version": "version:0" }, { - "name": "skia/bots/ios-dev-image-13.3", - "path": "ios-dev-image-13.3", + "name": "skia/bots/ios-dev-image-13.6", + "path": "ios-dev-image-13.6", "version": "version:0" } ], @@ -71784,19 +70400,19 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Debug-All-Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleA11\\\",\\\"extra_config\\\",\\\"Metal\\\",\\\"model\\\",\\\"iPhone8\\\",\\\"os\\\",\\\"iOS\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtl\\\",\\\"mtlmsaa4\\\",\\\"mtltestprecompile\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"atlastext\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"circular_arcs_hairline\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"dashcircle\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"encode-platform\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_bounds\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_bounds_1_-0.25\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_b\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_f\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_n_f\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"persp_images\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"ovals\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"roundrects\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"shadow_utils_occl\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"strokedlines\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"strokerect\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"strokes3\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"texel_subset_linear_mipmap_nearest_down\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"texel_subset_linear_mipmap_linear_down\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"textblobmixedsizes_df\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"yuv420_odd_dim_repeat\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"A_large_blank_world_map_with_oceans_marked_in_blue.svg\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"Chalkboard.svg\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"Ghostscript_Tiger.svg\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"Seal_of_American_Samoa.svg\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"Seal_of_Illinois.svg\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"cartman.svg\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"desk_motionmark_paths.svg\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"rg1024_green_grapes.svg\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"shapes-intro-02-f.svg\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"tiger-8.svg\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GrStyledShape\\\",\\\"_\\\",\\\"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\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Debug-All-Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"PowerVRGT7800\\\",\\\"model\\\",\\\"iPadPro\\\",\\\"os\\\",\\\"iOS\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"glesdft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"gles\\\",\\\"skp\\\",\\\"_\\\",\\\"_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GrStyledShape\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthrough_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Debug-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Mac-Clang-arm64-Debug-iOS_Metal", + "Build-Mac-Clang-arm64-Debug-iOS", "Housekeeper-PerCommit-BundleRecipes", "Housekeeper-PerCommit-IsolateSKP", "Housekeeper-PerCommit-IsolateSVG", "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "device_type:iPhone10,1", - "os:iOS-13.3.1", + "device_type:iPad6,3", + "os:iOS-13.6", "pool:Skia" ], "environment": { @@ -71830,7 +70446,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Release-All": { + "Test-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Debug-All-Metal": { "caches": [ { "name": "vpython", @@ -71870,8 +70486,8 @@ "version": "version:0" }, { - "name": "skia/bots/ios-dev-image-13.3", - "path": "ios-dev-image-13.3", + "name": "skia/bots/ios-dev-image-13.6", + "path": "ios-dev-image-13.6", "version": "version:0" } ], @@ -71881,19 +70497,19 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleA11\\\",\\\"model\\\",\\\"iPhone8\\\",\\\"os\\\",\\\"iOS\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"glesdft\\\",\\\"glesmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"gles\\\",\\\"skp\\\",\\\"_\\\",\\\"_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GrStyledShape\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthrough_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Release-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Debug-All-Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"PowerVRGT7800\\\",\\\"extra_config\\\",\\\"Metal\\\",\\\"model\\\",\\\"iPadPro\\\",\\\"os\\\",\\\"iOS\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtl\\\",\\\"mtlmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GrStyledShape\\\",\\\"_\\\",\\\"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\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Debug-All-Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Mac-Clang-arm64-Release-iOS", + "Build-Mac-Clang-arm64-Debug-iOS_Metal", "Housekeeper-PerCommit-BundleRecipes", "Housekeeper-PerCommit-IsolateSKP", "Housekeeper-PerCommit-IsolateSVG", "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "device_type:iPhone10,1", - "os:iOS-13.3.1", + "device_type:iPad6,3", + "os:iOS-13.6", "pool:Skia" ], "environment": { @@ -71927,7 +70543,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Release-All-Metal": { + "Test-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Release-All": { "caches": [ { "name": "vpython", @@ -71967,8 +70583,8 @@ "version": "version:0" }, { - "name": "skia/bots/ios-dev-image-13.3", - "path": "ios-dev-image-13.3", + "name": "skia/bots/ios-dev-image-13.6", + "path": "ios-dev-image-13.6", "version": "version:0" } ], @@ -71978,19 +70594,19 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Release-All-Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleA11\\\",\\\"extra_config\\\",\\\"Metal\\\",\\\"model\\\",\\\"iPhone8\\\",\\\"os\\\",\\\"iOS\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtl\\\",\\\"mtlmsaa4\\\",\\\"mtltestprecompile\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"atlastext\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"circular_arcs_hairline\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"dashcircle\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"encode-platform\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_bounds\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_bounds_1_-0.25\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_b\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_f\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_n_f\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"persp_images\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"ovals\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"roundrects\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"shadow_utils_occl\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"strokedlines\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"strokerect\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"strokes3\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"texel_subset_linear_mipmap_nearest_down\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"texel_subset_linear_mipmap_linear_down\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"textblobmixedsizes_df\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"yuv420_odd_dim_repeat\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"A_large_blank_world_map_with_oceans_marked_in_blue.svg\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"Chalkboard.svg\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"Ghostscript_Tiger.svg\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"Seal_of_American_Samoa.svg\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"Seal_of_Illinois.svg\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"cartman.svg\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"desk_motionmark_paths.svg\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"rg1024_green_grapes.svg\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"shapes-intro-02-f.svg\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"tiger-8.svg\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GrStyledShape\\\",\\\"_\\\",\\\"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\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Release-All-Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"PowerVRGT7800\\\",\\\"model\\\",\\\"iPadPro\\\",\\\"os\\\",\\\"iOS\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"glesdft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"gles\\\",\\\"skp\\\",\\\"_\\\",\\\"_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GrStyledShape\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthrough_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Release-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Mac-Clang-arm64-Release-iOS_Metal", + "Build-Mac-Clang-arm64-Release-iOS", "Housekeeper-PerCommit-BundleRecipes", "Housekeeper-PerCommit-IsolateSKP", "Housekeeper-PerCommit-IsolateSVG", "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "device_type:iPhone10,1", - "os:iOS-13.3.1", + "device_type:iPad6,3", + "os:iOS-13.6", "pool:Skia" ], "environment": { @@ -72024,7 +70640,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-iOS-Xcode11.4.1-iPhone11-GPU-AppleA13-arm64-Debug-All": { + "Test-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Release-All-Metal": { "caches": [ { "name": "vpython", @@ -72075,18 +70691,18 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-iOS-Xcode11.4.1-iPhone11-GPU-AppleA13-arm64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Xcode11.4.1\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleA13\\\",\\\"model\\\",\\\"iPhone11\\\",\\\"os\\\",\\\"iOS\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"glesdft\\\",\\\"glesmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"gles\\\",\\\"skp\\\",\\\"_\\\",\\\"_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GrStyledShape\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthrough_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-iOS-Xcode11.4.1-iPhone11-GPU-AppleA13-arm64-Debug-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Release-All-Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"PowerVRGT7800\\\",\\\"extra_config\\\",\\\"Metal\\\",\\\"model\\\",\\\"iPadPro\\\",\\\"os\\\",\\\"iOS\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtl\\\",\\\"mtlmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GrStyledShape\\\",\\\"_\\\",\\\"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\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Release-All-Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Mac-Xcode11.4.1-arm64-Debug-iOS", + "Build-Mac-Clang-arm64-Release-iOS_Metal", "Housekeeper-PerCommit-BundleRecipes", "Housekeeper-PerCommit-IsolateSKP", "Housekeeper-PerCommit-IsolateSVG", "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "device_type:iPhone12,1", + "device_type:iPad6,3", "os:iOS-13.6", "pool:Skia" ], @@ -72121,7 +70737,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-iOS-Xcode11.4.1-iPhone11-GPU-AppleA13-arm64-Debug-All-Metal": { + "Test-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Debug-All": { "caches": [ { "name": "vpython", @@ -72161,8 +70777,8 @@ "version": "version:0" }, { - "name": "skia/bots/ios-dev-image-13.6", - "path": "ios-dev-image-13.6", + "name": "skia/bots/ios-dev-image-13.3", + "path": "ios-dev-image-13.3", "version": "version:0" } ], @@ -72172,19 +70788,19 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-iOS-Xcode11.4.1-iPhone11-GPU-AppleA13-arm64-Debug-All-Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Xcode11.4.1\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleA13\\\",\\\"extra_config\\\",\\\"Metal\\\",\\\"model\\\",\\\"iPhone11\\\",\\\"os\\\",\\\"iOS\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtl\\\",\\\"mtlmsaa4\\\",\\\"mtlreducedshaders\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GrStyledShape\\\",\\\"_\\\",\\\"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\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-iOS-Xcode11.4.1-iPhone11-GPU-AppleA13-arm64-Debug-All-Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"PowerVRGT7600\\\",\\\"model\\\",\\\"iPhone7\\\",\\\"os\\\",\\\"iOS\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"glesdft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"gles\\\",\\\"skp\\\",\\\"_\\\",\\\"_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GrStyledShape\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthrough_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Debug-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Mac-Xcode11.4.1-arm64-Debug-iOS_Metal", + "Build-Mac-Clang-arm64-Debug-iOS", "Housekeeper-PerCommit-BundleRecipes", "Housekeeper-PerCommit-IsolateSKP", "Housekeeper-PerCommit-IsolateSVG", "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "device_type:iPhone12,1", - "os:iOS-13.6", + "device_type:iPhone9,1", + "os:iOS-13.3.1", "pool:Skia" ], "environment": { @@ -72218,7 +70834,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-iOS-Xcode11.4.1-iPhone11-GPU-AppleA13-arm64-Release-All": { + "Test-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Debug-All-Metal": { "caches": [ { "name": "vpython", @@ -72258,8 +70874,8 @@ "version": "version:0" }, { - "name": "skia/bots/ios-dev-image-13.6", - "path": "ios-dev-image-13.6", + "name": "skia/bots/ios-dev-image-13.3", + "path": "ios-dev-image-13.3", "version": "version:0" } ], @@ -72269,19 +70885,19 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-iOS-Xcode11.4.1-iPhone11-GPU-AppleA13-arm64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Xcode11.4.1\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleA13\\\",\\\"model\\\",\\\"iPhone11\\\",\\\"os\\\",\\\"iOS\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"glesdft\\\",\\\"glesmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"gles\\\",\\\"skp\\\",\\\"_\\\",\\\"_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GrStyledShape\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthrough_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-iOS-Xcode11.4.1-iPhone11-GPU-AppleA13-arm64-Release-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Debug-All-Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"PowerVRGT7600\\\",\\\"extra_config\\\",\\\"Metal\\\",\\\"model\\\",\\\"iPhone7\\\",\\\"os\\\",\\\"iOS\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtl\\\",\\\"mtlmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GrStyledShape\\\",\\\"_\\\",\\\"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\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Debug-All-Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Mac-Xcode11.4.1-arm64-Release-iOS", + "Build-Mac-Clang-arm64-Debug-iOS_Metal", "Housekeeper-PerCommit-BundleRecipes", "Housekeeper-PerCommit-IsolateSKP", "Housekeeper-PerCommit-IsolateSVG", "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "device_type:iPhone12,1", - "os:iOS-13.6", + "device_type:iPhone9,1", + "os:iOS-13.3.1", "pool:Skia" ], "environment": { @@ -72315,7 +70931,7 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Test-iOS-Xcode11.4.1-iPhone11-GPU-AppleA13-arm64-Release-All-Metal": { + "Test-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Release-All": { "caches": [ { "name": "vpython", @@ -72355,8 +70971,8 @@ "version": "version:0" }, { - "name": "skia/bots/ios-dev-image-13.6", - "path": "ios-dev-image-13.6", + "name": "skia/bots/ios-dev-image-13.3", + "path": "ios-dev-image-13.3", "version": "version:0" } ], @@ -72366,19 +70982,19 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "test", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-iOS-Xcode11.4.1-iPhone11-GPU-AppleA13-arm64-Release-All-Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Xcode11.4.1\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleA13\\\",\\\"extra_config\\\",\\\"Metal\\\",\\\"model\\\",\\\"iPhone11\\\",\\\"os\\\",\\\"iOS\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtl\\\",\\\"mtlmsaa4\\\",\\\"mtlreducedshaders\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GrStyledShape\\\",\\\"_\\\",\\\"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\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-iOS-Xcode11.4.1-iPhone11-GPU-AppleA13-arm64-Release-All-Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"PowerVRGT7600\\\",\\\"model\\\",\\\"iPhone7\\\",\\\"os\\\",\\\"iOS\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"glesdft\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"gles\\\",\\\"skp\\\",\\\"_\\\",\\\"_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GrStyledShape\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthrough_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Release-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "Build-Mac-Xcode11.4.1-arm64-Release-iOS_Metal", + "Build-Mac-Clang-arm64-Release-iOS", "Housekeeper-PerCommit-BundleRecipes", "Housekeeper-PerCommit-IsolateSKP", "Housekeeper-PerCommit-IsolateSVG", "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "device_type:iPhone12,1", - "os:iOS-13.6", + "device_type:iPhone9,1", + "os:iOS-13.3.1", "pool:Skia" ], "environment": { @@ -72412,17 +71028,17 @@ ], "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-BuildStats-Debian10-EMCC-asmjs-Release-PathKit": { + "Test-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Release-All-Metal": { "caches": [ { "name": "vpython", "path": "cache/vpython" } ], - "casSpec": "run-recipe", + "casSpec": "test", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/linux-amd64", + "name": "infra/3pp/tools/cpython3/linux-arm64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, @@ -72450,6 +71066,11 @@ "name": "skia/bots/gsutil", "path": "gsutil", "version": "version:0" + }, + { + "name": "skia/bots/ios-dev-image-13.3", + "path": "ios-dev-image-13.3", + "version": "version:0" } ], "command": [ @@ -72457,19 +71078,20 @@ "-u", "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", - "upload_buildstats_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"BuildStats-Debian10-EMCC-asmjs-Release-PathKit\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "test", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Release-All-Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"PowerVRGT7600\\\",\\\"extra_config\\\",\\\"Metal\\\",\\\"model\\\",\\\"iPhone7\\\",\\\"os\\\",\\\"iOS\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtl\\\",\\\"mtlmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GrStyledShape\\\",\\\"_\\\",\\\"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\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Release-All-Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "BuildStats-Debian10-EMCC-asmjs-Release-PathKit", - "Housekeeper-PerCommit-BundleRecipes" + "Build-Mac-Clang-arm64-Release-iOS_Metal", + "Housekeeper-PerCommit-BundleRecipes", + "Housekeeper-PerCommit-IsolateSKP", + "Housekeeper-PerCommit-IsolateSVG", + "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "gpu:none", - "machine_type:n1-highmem-2", - "os:Debian-10.3", + "device_type:iPhone9,1", + "os:iOS-13.3.1", "pool:Skia" ], "environment": { @@ -72478,11 +71100,11 @@ }, "env_prefixes": { "PATH": [ + "gsutil/gsutil", "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", "cipd_bin_packages", - "cipd_bin_packages/bin", - "gsutil/gsutil" + "cipd_bin_packages/bin" ], "VPYTHON_DEFAULT_SPEC": [ "skia/.vpython" @@ -72491,25 +71113,29 @@ "cache/vpython" ] }, - "execution_timeout_ns": 3600000000000, + "execution_timeout_ns": 14400000000000, + "expiration_ns": 72000000000000, "extra_tags": { "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" }, - "io_timeout_ns": 3600000000000, + "io_timeout_ns": 14400000000000, "max_attempts": 2, - "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" + "outputs": [ + "test" + ], + "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-BuildStats-Debian10-EMCC-wasm-Release-CanvasKit": { + "Test-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Debug-All": { "caches": [ { "name": "vpython", "path": "cache/vpython" } ], - "casSpec": "run-recipe", + "casSpec": "test", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/linux-amd64", + "name": "infra/3pp/tools/cpython3/linux-arm64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, @@ -72537,6 +71163,11 @@ "name": "skia/bots/gsutil", "path": "gsutil", "version": "version:0" + }, + { + "name": "skia/bots/ios-dev-image-13.3", + "path": "ios-dev-image-13.3", + "version": "version:0" } ], "command": [ @@ -72544,19 +71175,20 @@ "-u", "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", - "upload_buildstats_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"BuildStats-Debian10-EMCC-wasm-Release-CanvasKit\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "test", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleA11\\\",\\\"model\\\",\\\"iPhone8\\\",\\\"os\\\",\\\"iOS\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"glesdft\\\",\\\"glesmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"gles\\\",\\\"skp\\\",\\\"_\\\",\\\"_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GrStyledShape\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthrough_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Debug-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "BuildStats-Debian10-EMCC-wasm-Release-CanvasKit", - "Housekeeper-PerCommit-BundleRecipes" + "Build-Mac-Clang-arm64-Debug-iOS", + "Housekeeper-PerCommit-BundleRecipes", + "Housekeeper-PerCommit-IsolateSKP", + "Housekeeper-PerCommit-IsolateSVG", + "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "gpu:none", - "machine_type:n1-highmem-2", - "os:Debian-10.3", + "device_type:iPhone10,1", + "os:iOS-13.3.1", "pool:Skia" ], "environment": { @@ -72565,11 +71197,11 @@ }, "env_prefixes": { "PATH": [ + "gsutil/gsutil", "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", "cipd_bin_packages", - "cipd_bin_packages/bin", - "gsutil/gsutil" + "cipd_bin_packages/bin" ], "VPYTHON_DEFAULT_SPEC": [ "skia/.vpython" @@ -72578,25 +71210,29 @@ "cache/vpython" ] }, - "execution_timeout_ns": 3600000000000, + "execution_timeout_ns": 14400000000000, + "expiration_ns": 72000000000000, "extra_tags": { "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" }, - "io_timeout_ns": 3600000000000, + "io_timeout_ns": 14400000000000, "max_attempts": 2, - "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" + "outputs": [ + "test" + ], + "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-BuildStats-Debian10-EMCC-wasm-Release-CanvasKit_CPU": { + "Test-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Debug-All-Metal": { "caches": [ { "name": "vpython", "path": "cache/vpython" } ], - "casSpec": "run-recipe", + "casSpec": "test", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/linux-amd64", + "name": "infra/3pp/tools/cpython3/linux-arm64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, @@ -72624,6 +71260,11 @@ "name": "skia/bots/gsutil", "path": "gsutil", "version": "version:0" + }, + { + "name": "skia/bots/ios-dev-image-13.3", + "path": "ios-dev-image-13.3", + "version": "version:0" } ], "command": [ @@ -72631,19 +71272,20 @@ "-u", "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", - "upload_buildstats_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"BuildStats-Debian10-EMCC-wasm-Release-CanvasKit_CPU\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "test", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Debug-All-Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleA11\\\",\\\"extra_config\\\",\\\"Metal\\\",\\\"model\\\",\\\"iPhone8\\\",\\\"os\\\",\\\"iOS\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtl\\\",\\\"mtlmsaa4\\\",\\\"mtltestprecompile\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"atlastext\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"circular_arcs_hairline\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"dashcircle\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"encode-platform\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_bounds\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_bounds_1_-0.25\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_b\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_f\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_n_f\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"persp_images\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"ovals\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"roundrects\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"shadow_utils_occl\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"strokedlines\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"strokerect\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"strokes3\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"texel_subset_linear_mipmap_nearest_down\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"texel_subset_linear_mipmap_linear_down\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"textblobmixedsizes_df\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"yuv420_odd_dim_repeat\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"A_large_blank_world_map_with_oceans_marked_in_blue.svg\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"Chalkboard.svg\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"Ghostscript_Tiger.svg\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"Seal_of_American_Samoa.svg\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"Seal_of_Illinois.svg\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"cartman.svg\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"desk_motionmark_paths.svg\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"rg1024_green_grapes.svg\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"shapes-intro-02-f.svg\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"tiger-8.svg\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GrStyledShape\\\",\\\"_\\\",\\\"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\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Debug-All-Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "BuildStats-Debian10-EMCC-wasm-Release-CanvasKit_CPU", - "Housekeeper-PerCommit-BundleRecipes" + "Build-Mac-Clang-arm64-Debug-iOS_Metal", + "Housekeeper-PerCommit-BundleRecipes", + "Housekeeper-PerCommit-IsolateSKP", + "Housekeeper-PerCommit-IsolateSVG", + "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "gpu:none", - "machine_type:n1-highmem-2", - "os:Debian-10.3", + "device_type:iPhone10,1", + "os:iOS-13.3.1", "pool:Skia" ], "environment": { @@ -72652,11 +71294,11 @@ }, "env_prefixes": { "PATH": [ + "gsutil/gsutil", "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", "cipd_bin_packages", - "cipd_bin_packages/bin", - "gsutil/gsutil" + "cipd_bin_packages/bin" ], "VPYTHON_DEFAULT_SPEC": [ "skia/.vpython" @@ -72665,25 +71307,29 @@ "cache/vpython" ] }, - "execution_timeout_ns": 3600000000000, + "execution_timeout_ns": 14400000000000, + "expiration_ns": 72000000000000, "extra_tags": { "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" }, - "io_timeout_ns": 3600000000000, + "io_timeout_ns": 14400000000000, "max_attempts": 2, - "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" + "outputs": [ + "test" + ], + "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-BuildStats-Debian10-EMCC-wasm-Release-PathKit": { + "Test-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Release-All": { "caches": [ { "name": "vpython", "path": "cache/vpython" } ], - "casSpec": "run-recipe", + "casSpec": "test", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/linux-amd64", + "name": "infra/3pp/tools/cpython3/linux-arm64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, @@ -72711,6 +71357,11 @@ "name": "skia/bots/gsutil", "path": "gsutil", "version": "version:0" + }, + { + "name": "skia/bots/ios-dev-image-13.3", + "path": "ios-dev-image-13.3", + "version": "version:0" } ], "command": [ @@ -72718,19 +71369,20 @@ "-u", "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", - "upload_buildstats_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"BuildStats-Debian10-EMCC-wasm-Release-PathKit\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "test", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleA11\\\",\\\"model\\\",\\\"iPhone8\\\",\\\"os\\\",\\\"iOS\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"glesdft\\\",\\\"glesmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"gles\\\",\\\"skp\\\",\\\"_\\\",\\\"_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GrStyledShape\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthrough_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Release-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ - "BuildStats-Debian10-EMCC-wasm-Release-PathKit", - "Housekeeper-PerCommit-BundleRecipes" + "Build-Mac-Clang-arm64-Release-iOS", + "Housekeeper-PerCommit-BundleRecipes", + "Housekeeper-PerCommit-IsolateSKP", + "Housekeeper-PerCommit-IsolateSVG", + "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "gpu:none", - "machine_type:n1-highmem-2", - "os:Debian-10.3", + "device_type:iPhone10,1", + "os:iOS-13.3.1", "pool:Skia" ], "environment": { @@ -72739,11 +71391,11 @@ }, "env_prefixes": { "PATH": [ + "gsutil/gsutil", "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", "cipd_bin_packages", - "cipd_bin_packages/bin", - "gsutil/gsutil" + "cipd_bin_packages/bin" ], "VPYTHON_DEFAULT_SPEC": [ "skia/.vpython" @@ -72752,25 +71404,29 @@ "cache/vpython" ] }, - "execution_timeout_ns": 3600000000000, + "execution_timeout_ns": 14400000000000, + "expiration_ns": 72000000000000, "extra_tags": { "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" }, - "io_timeout_ns": 3600000000000, + "io_timeout_ns": 14400000000000, "max_attempts": 2, - "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" + "outputs": [ + "test" + ], + "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-OptimizeForSize-All-Android_SkottieTracing": { + "Test-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Release-All-Metal": { "caches": [ { "name": "vpython", "path": "cache/vpython" } ], - "casSpec": "run-recipe", + "casSpec": "test", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/linux-amd64", + "name": "infra/3pp/tools/cpython3/linux-arm64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, @@ -72798,92 +71454,10 @@ "name": "skia/bots/gsutil", "path": "gsutil", "version": "version:0" - } - ], - "command": [ - "cipd_bin_packages/vpython3${EXECUTABLE_SUFFIX}", - "-u", - "skia/infra/bots/run_recipe.py", - "${ISOLATED_OUTDIR}", - "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-OptimizeForSize-All-Android_SkottieTracing\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", - "skia" - ], - "dependencies": [ - "Housekeeper-PerCommit-BundleRecipes", - "Perf-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-OptimizeForSize-All-Android_SkottieTracing" - ], - "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "gpu:none", - "machine_type:n1-highmem-2", - "os:Debian-10.3", - "pool:Skia" - ], - "environment": { - "RECIPES_USE_PY3": "true", - "VPYTHON_LOG_TRACE": "1" - }, - "env_prefixes": { - "PATH": [ - "cipd_bin_packages/cpython3", - "cipd_bin_packages/cpython3/bin", - "cipd_bin_packages", - "cipd_bin_packages/bin", - "gsutil/gsutil" - ], - "VPYTHON_DEFAULT_SPEC": [ - "skia/.vpython" - ], - "VPYTHON_VIRTUALENV_ROOT": [ - "cache/vpython" - ] - }, - "execution_timeout_ns": 3600000000000, - "extra_tags": { - "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" - }, - "io_timeout_ns": 3600000000000, - "max_attempts": 2, - "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" - }, - "Upload-Perf-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-All-Android": { - "caches": [ - { - "name": "vpython", - "path": "cache/vpython" - } - ], - "casSpec": "run-recipe", - "cipd_packages": [ - { - "name": "infra/3pp/tools/cpython3/linux-amd64", - "path": "cipd_bin_packages/cpython3", - "version": "version:2@3.8.10.chromium.19" - }, - { - "name": "infra/tools/luci-auth/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/kitchen/${platform}", - "path": ".", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/vpython-native/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" - }, - { - "name": "infra/tools/luci/vpython/${platform}", - "path": "cipd_bin_packages", - "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" }, { - "name": "skia/bots/gsutil", - "path": "gsutil", + "name": "skia/bots/ios-dev-image-13.3", + "path": "ios-dev-image-13.3", "version": "version:0" } ], @@ -72892,19 +71466,20 @@ "-u", "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", - "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-All-Android\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "test", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Release-All-Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Clang\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleA11\\\",\\\"extra_config\\\",\\\"Metal\\\",\\\"model\\\",\\\"iPhone8\\\",\\\"os\\\",\\\"iOS\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtl\\\",\\\"mtlmsaa4\\\",\\\"mtltestprecompile\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"atlastext\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"circular_arcs_hairline\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"dashcircle\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"dftext\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"encode-platform\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_bounds\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"fontmgr_bounds_1_-0.25\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_b\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_h_f\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"glyph_pos_n_f\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"persp_images\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"ovals\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"roundrects\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"shadow_utils_occl\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"strokedlines\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"strokerect\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"strokes3\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"texel_subset_linear_mipmap_nearest_down\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"texel_subset_linear_mipmap_linear_down\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"textblobmixedsizes_df\\\",\\\"mtltestprecompile\\\",\\\"gm\\\",\\\"_\\\",\\\"yuv420_odd_dim_repeat\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"A_large_blank_world_map_with_oceans_marked_in_blue.svg\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"Chalkboard.svg\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"Ghostscript_Tiger.svg\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"Seal_of_American_Samoa.svg\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"Seal_of_Illinois.svg\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"cartman.svg\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"desk_motionmark_paths.svg\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"rg1024_green_grapes.svg\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"shapes-intro-02-f.svg\\\",\\\"mtltestprecompile\\\",\\\"svg\\\",\\\"_\\\",\\\"tiger-8.svg\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GrStyledShape\\\",\\\"_\\\",\\\"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\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Release-All-Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ + "Build-Mac-Clang-arm64-Release-iOS_Metal", "Housekeeper-PerCommit-BundleRecipes", - "Perf-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-All-Android" + "Housekeeper-PerCommit-IsolateSKP", + "Housekeeper-PerCommit-IsolateSVG", + "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "gpu:none", - "machine_type:n1-highmem-2", - "os:Debian-10.3", + "device_type:iPhone10,1", + "os:iOS-13.3.1", "pool:Skia" ], "environment": { @@ -72913,11 +71488,11 @@ }, "env_prefixes": { "PATH": [ + "gsutil/gsutil", "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", "cipd_bin_packages", - "cipd_bin_packages/bin", - "gsutil/gsutil" + "cipd_bin_packages/bin" ], "VPYTHON_DEFAULT_SPEC": [ "skia/.vpython" @@ -72926,25 +71501,29 @@ "cache/vpython" ] }, - "execution_timeout_ns": 3600000000000, + "execution_timeout_ns": 14400000000000, + "expiration_ns": 72000000000000, "extra_tags": { "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" }, - "io_timeout_ns": 3600000000000, + "io_timeout_ns": 14400000000000, "max_attempts": 2, - "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" + "outputs": [ + "test" + ], + "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-All-Android_SkottieTracing": { + "Test-iOS-Xcode11.4.1-iPhone11-GPU-AppleA13-arm64-Debug-All": { "caches": [ { "name": "vpython", "path": "cache/vpython" } ], - "casSpec": "run-recipe", + "casSpec": "test", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/linux-amd64", + "name": "infra/3pp/tools/cpython3/linux-arm64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, @@ -72972,6 +71551,11 @@ "name": "skia/bots/gsutil", "path": "gsutil", "version": "version:0" + }, + { + "name": "skia/bots/ios-dev-image-13.6", + "path": "ios-dev-image-13.6", + "version": "version:0" } ], "command": [ @@ -72979,19 +71563,20 @@ "-u", "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", - "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-All-Android_SkottieTracing\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "test", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-iOS-Xcode11.4.1-iPhone11-GPU-AppleA13-arm64-Debug-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Xcode11.4.1\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleA13\\\",\\\"model\\\",\\\"iPhone11\\\",\\\"os\\\",\\\"iOS\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"glesdft\\\",\\\"glesmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"gles\\\",\\\"skp\\\",\\\"_\\\",\\\"_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GrStyledShape\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthrough_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-iOS-Xcode11.4.1-iPhone11-GPU-AppleA13-arm64-Debug-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ + "Build-Mac-Xcode11.4.1-arm64-Debug-iOS", "Housekeeper-PerCommit-BundleRecipes", - "Perf-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-All-Android_SkottieTracing" + "Housekeeper-PerCommit-IsolateSKP", + "Housekeeper-PerCommit-IsolateSVG", + "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "gpu:none", - "machine_type:n1-highmem-2", - "os:Debian-10.3", + "device_type:iPhone12,1", + "os:iOS-13.6", "pool:Skia" ], "environment": { @@ -73000,11 +71585,11 @@ }, "env_prefixes": { "PATH": [ + "gsutil/gsutil", "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", "cipd_bin_packages", - "cipd_bin_packages/bin", - "gsutil/gsutil" + "cipd_bin_packages/bin" ], "VPYTHON_DEFAULT_SPEC": [ "skia/.vpython" @@ -73013,25 +71598,29 @@ "cache/vpython" ] }, - "execution_timeout_ns": 3600000000000, + "execution_timeout_ns": 14400000000000, + "expiration_ns": 72000000000000, "extra_tags": { "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" }, - "io_timeout_ns": 3600000000000, + "io_timeout_ns": 14400000000000, "max_attempts": 2, - "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" + "outputs": [ + "test" + ], + "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android": { + "Test-iOS-Xcode11.4.1-iPhone11-GPU-AppleA13-arm64-Debug-All-Metal": { "caches": [ { "name": "vpython", "path": "cache/vpython" } ], - "casSpec": "run-recipe", + "casSpec": "test", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/linux-amd64", + "name": "infra/3pp/tools/cpython3/linux-arm64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, @@ -73059,6 +71648,11 @@ "name": "skia/bots/gsutil", "path": "gsutil", "version": "version:0" + }, + { + "name": "skia/bots/ios-dev-image-13.6", + "path": "ios-dev-image-13.6", + "version": "version:0" } ], "command": [ @@ -73066,19 +71660,20 @@ "-u", "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", - "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "test", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-iOS-Xcode11.4.1-iPhone11-GPU-AppleA13-arm64-Debug-All-Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Xcode11.4.1\\\",\\\"configuration\\\",\\\"Debug\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleA13\\\",\\\"extra_config\\\",\\\"Metal\\\",\\\"model\\\",\\\"iPhone11\\\",\\\"os\\\",\\\"iOS\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtl\\\",\\\"mtlmsaa4\\\",\\\"mtlreducedshaders\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GrStyledShape\\\",\\\"_\\\",\\\"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\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-iOS-Xcode11.4.1-iPhone11-GPU-AppleA13-arm64-Debug-All-Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ + "Build-Mac-Xcode11.4.1-arm64-Debug-iOS_Metal", "Housekeeper-PerCommit-BundleRecipes", - "Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android" + "Housekeeper-PerCommit-IsolateSKP", + "Housekeeper-PerCommit-IsolateSVG", + "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "gpu:none", - "machine_type:n1-highmem-2", - "os:Debian-10.3", + "device_type:iPhone12,1", + "os:iOS-13.6", "pool:Skia" ], "environment": { @@ -73087,11 +71682,11 @@ }, "env_prefixes": { "PATH": [ + "gsutil/gsutil", "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", "cipd_bin_packages", - "cipd_bin_packages/bin", - "gsutil/gsutil" + "cipd_bin_packages/bin" ], "VPYTHON_DEFAULT_SPEC": [ "skia/.vpython" @@ -73100,25 +71695,29 @@ "cache/vpython" ] }, - "execution_timeout_ns": 3600000000000, + "execution_timeout_ns": 14400000000000, + "expiration_ns": 72000000000000, "extra_tags": { "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" }, - "io_timeout_ns": 3600000000000, + "io_timeout_ns": 14400000000000, "max_attempts": 2, - "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" + "outputs": [ + "test" + ], + "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_AllPathsVolatile_Skpbench": { + "Test-iOS-Xcode11.4.1-iPhone11-GPU-AppleA13-arm64-Release-All": { "caches": [ { "name": "vpython", "path": "cache/vpython" } ], - "casSpec": "run-recipe", + "casSpec": "test", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/linux-amd64", + "name": "infra/3pp/tools/cpython3/linux-arm64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, @@ -73146,6 +71745,11 @@ "name": "skia/bots/gsutil", "path": "gsutil", "version": "version:0" + }, + { + "name": "skia/bots/ios-dev-image-13.6", + "path": "ios-dev-image-13.6", + "version": "version:0" } ], "command": [ @@ -73153,19 +71757,20 @@ "-u", "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", - "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_AllPathsVolatile_Skpbench\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "test", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-iOS-Xcode11.4.1-iPhone11-GPU-AppleA13-arm64-Release-All\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Xcode11.4.1\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleA13\\\",\\\"model\\\",\\\"iPhone11\\\",\\\"os\\\",\\\"iOS\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"gles\\\",\\\"glesdft\\\",\\\"glesmsaa4\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"gles\\\",\\\"skp\\\",\\\"_\\\",\\\"_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GrStyledShape\\\",\\\"_\\\",\\\"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\\\",\\\"_\\\",\\\"SkSLLogicalAndShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLLogicalOrShortCircuit_GPU\\\",\\\"_\\\",\\\"tests\\\",\\\"_\\\",\\\"SkSLSwitchWithFallthrough_GPU\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-iOS-Xcode11.4.1-iPhone11-GPU-AppleA13-arm64-Release-All\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ + "Build-Mac-Xcode11.4.1-arm64-Release-iOS", "Housekeeper-PerCommit-BundleRecipes", - "Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_AllPathsVolatile_Skpbench" + "Housekeeper-PerCommit-IsolateSKP", + "Housekeeper-PerCommit-IsolateSVG", + "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "gpu:none", - "machine_type:n1-highmem-2", - "os:Debian-10.3", + "device_type:iPhone12,1", + "os:iOS-13.6", "pool:Skia" ], "environment": { @@ -73174,11 +71779,11 @@ }, "env_prefixes": { "PATH": [ + "gsutil/gsutil", "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", "cipd_bin_packages", - "cipd_bin_packages/bin", - "gsutil/gsutil" + "cipd_bin_packages/bin" ], "VPYTHON_DEFAULT_SPEC": [ "skia/.vpython" @@ -73187,25 +71792,29 @@ "cache/vpython" ] }, - "execution_timeout_ns": 3600000000000, + "execution_timeout_ns": 14400000000000, + "expiration_ns": 72000000000000, "extra_tags": { "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" }, - "io_timeout_ns": 3600000000000, + "io_timeout_ns": 14400000000000, "max_attempts": 2, - "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" + "outputs": [ + "test" + ], + "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Skpbench": { + "Test-iOS-Xcode11.4.1-iPhone11-GPU-AppleA13-arm64-Release-All-Metal": { "caches": [ { "name": "vpython", "path": "cache/vpython" } ], - "casSpec": "run-recipe", + "casSpec": "test", "cipd_packages": [ { - "name": "infra/3pp/tools/cpython3/linux-amd64", + "name": "infra/3pp/tools/cpython3/linux-arm64", "path": "cipd_bin_packages/cpython3", "version": "version:2@3.8.10.chromium.19" }, @@ -73233,6 +71842,11 @@ "name": "skia/bots/gsutil", "path": "gsutil", "version": "version:0" + }, + { + "name": "skia/bots/ios-dev-image-13.6", + "path": "ios-dev-image-13.6", + "version": "version:0" } ], "command": [ @@ -73240,19 +71854,20 @@ "-u", "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", - "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Skpbench\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "test", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-iOS-Xcode11.4.1-iPhone11-GPU-AppleA13-arm64-Release-All-Metal\",\"dm_flags\":\"[\\\"dm\\\",\\\"--nameByHash\\\",\\\"--key\\\",\\\"arch\\\",\\\"arm64\\\",\\\"compiler\\\",\\\"Xcode11.4.1\\\",\\\"configuration\\\",\\\"Release\\\",\\\"cpu_or_gpu\\\",\\\"GPU\\\",\\\"cpu_or_gpu_value\\\",\\\"AppleA13\\\",\\\"extra_config\\\",\\\"Metal\\\",\\\"model\\\",\\\"iPhone11\\\",\\\"os\\\",\\\"iOS\\\",\\\"style\\\",\\\"default\\\",\\\"--randomProcessorTest\\\",\\\"--nocpu\\\",\\\"--config\\\",\\\"mtl\\\",\\\"mtlmsaa4\\\",\\\"mtlreducedshaders\\\",\\\"--src\\\",\\\"tests\\\",\\\"gm\\\",\\\"image\\\",\\\"colorImage\\\",\\\"svg\\\",\\\"--skip\\\",\\\"_\\\",\\\"svg\\\",\\\"_\\\",\\\"svgparse_\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgba32abf.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24prof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"rgb24lprof.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"8bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"4bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"32bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"24bpp-pixeldata-cropped.bmp\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"frame_larger_than_image.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc2.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc3.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc4.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc5.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc6.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc7.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc8.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc9.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc10.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc11.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc12.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc13.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc14.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.png\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"incInterlaced.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc1.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"inc0.gif\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"butterfly.gif\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"BigImageTest_Ganesh\\\",\\\"_\\\",\\\"image\\\",\\\"gen_platf\\\",\\\"error\\\",\\\"_\\\",\\\"test\\\",\\\"_\\\",\\\"GrStyledShape\\\",\\\"_\\\",\\\"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\\\",\\\"--nonativeFonts\\\",\\\"--verbose\\\"]\",\"dm_properties\":\"{\\\"buildbucket_build_id\\\":\\\"<(BUILDBUCKET_BUILD_ID)\\\",\\\"builder\\\":\\\"Test-iOS-Xcode11.4.1-iPhone11-GPU-AppleA13-arm64-Release-All-Metal\\\",\\\"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\":\"true\",\"gold_hashes_url\":\"https://gold.skia.org/json/v1/hashes\",\"gs_bucket\":\"skia-infra-gm\",\"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": [ + "Build-Mac-Xcode11.4.1-arm64-Release-iOS_Metal", "Housekeeper-PerCommit-BundleRecipes", - "Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Skpbench" + "Housekeeper-PerCommit-IsolateSKP", + "Housekeeper-PerCommit-IsolateSVG", + "Housekeeper-PerCommit-IsolateSkImage" ], "dimensions": [ - "cpu:x86-64-Haswell_GCE", - "gpu:none", - "machine_type:n1-highmem-2", - "os:Debian-10.3", + "device_type:iPhone12,1", + "os:iOS-13.6", "pool:Skia" ], "environment": { @@ -73261,11 +71876,11 @@ }, "env_prefixes": { "PATH": [ + "gsutil/gsutil", "cipd_bin_packages/cpython3", "cipd_bin_packages/cpython3/bin", "cipd_bin_packages", - "cipd_bin_packages/bin", - "gsutil/gsutil" + "cipd_bin_packages/bin" ], "VPYTHON_DEFAULT_SPEC": [ "skia/.vpython" @@ -73274,15 +71889,19 @@ "cache/vpython" ] }, - "execution_timeout_ns": 3600000000000, + "execution_timeout_ns": 14400000000000, + "expiration_ns": 72000000000000, "extra_tags": { "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" }, - "io_timeout_ns": 3600000000000, + "io_timeout_ns": 14400000000000, "max_attempts": 2, - "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" + "outputs": [ + "test" + ], + "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Vulkan": { + "Upload-BuildStats-Debian10-EMCC-asmjs-Release-PathKit": { "caches": [ { "name": "vpython", @@ -73327,13 +71946,13 @@ "-u", "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", - "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "upload_buildstats_results", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"BuildStats-Debian10-EMCC-asmjs-Release-PathKit\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ - "Housekeeper-PerCommit-BundleRecipes", - "Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Vulkan" + "BuildStats-Debian10-EMCC-asmjs-Release-PathKit", + "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -73369,7 +71988,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Vulkan_AllPathsVolatile_Skpbench": { + "Upload-BuildStats-Debian10-EMCC-wasm-Release-CanvasKit": { "caches": [ { "name": "vpython", @@ -73414,13 +72033,13 @@ "-u", "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", - "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Vulkan_AllPathsVolatile_Skpbench\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "upload_buildstats_results", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"BuildStats-Debian10-EMCC-wasm-Release-CanvasKit\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ - "Housekeeper-PerCommit-BundleRecipes", - "Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Vulkan_AllPathsVolatile_Skpbench" + "BuildStats-Debian10-EMCC-wasm-Release-CanvasKit", + "Housekeeper-PerCommit-BundleRecipes" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -73456,7 +72075,181 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Vulkan_Skpbench": { + "Upload-BuildStats-Debian10-EMCC-wasm-Release-CanvasKit_CPU": { + "caches": [ + { + "name": "vpython", + "path": "cache/vpython" + } + ], + "casSpec": "run-recipe", + "cipd_packages": [ + { + "name": "infra/3pp/tools/cpython3/linux-amd64", + "path": "cipd_bin_packages/cpython3", + "version": "version:2@3.8.10.chromium.19" + }, + { + "name": "infra/tools/luci-auth/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/kitchen/${platform}", + "path": ".", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/vpython-native/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/vpython/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "skia/bots/gsutil", + "path": "gsutil", + "version": "version:0" + } + ], + "command": [ + "cipd_bin_packages/vpython3${EXECUTABLE_SUFFIX}", + "-u", + "skia/infra/bots/run_recipe.py", + "${ISOLATED_OUTDIR}", + "upload_buildstats_results", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"BuildStats-Debian10-EMCC-wasm-Release-CanvasKit_CPU\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "skia" + ], + "dependencies": [ + "BuildStats-Debian10-EMCC-wasm-Release-CanvasKit_CPU", + "Housekeeper-PerCommit-BundleRecipes" + ], + "dimensions": [ + "cpu:x86-64-Haswell_GCE", + "gpu:none", + "machine_type:n1-highmem-2", + "os:Debian-10.3", + "pool:Skia" + ], + "environment": { + "RECIPES_USE_PY3": "true", + "VPYTHON_LOG_TRACE": "1" + }, + "env_prefixes": { + "PATH": [ + "cipd_bin_packages/cpython3", + "cipd_bin_packages/cpython3/bin", + "cipd_bin_packages", + "cipd_bin_packages/bin", + "gsutil/gsutil" + ], + "VPYTHON_DEFAULT_SPEC": [ + "skia/.vpython" + ], + "VPYTHON_VIRTUALENV_ROOT": [ + "cache/vpython" + ] + }, + "execution_timeout_ns": 3600000000000, + "extra_tags": { + "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" + }, + "io_timeout_ns": 3600000000000, + "max_attempts": 2, + "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" + }, + "Upload-BuildStats-Debian10-EMCC-wasm-Release-PathKit": { + "caches": [ + { + "name": "vpython", + "path": "cache/vpython" + } + ], + "casSpec": "run-recipe", + "cipd_packages": [ + { + "name": "infra/3pp/tools/cpython3/linux-amd64", + "path": "cipd_bin_packages/cpython3", + "version": "version:2@3.8.10.chromium.19" + }, + { + "name": "infra/tools/luci-auth/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/kitchen/${platform}", + "path": ".", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/vpython-native/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/vpython/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "skia/bots/gsutil", + "path": "gsutil", + "version": "version:0" + } + ], + "command": [ + "cipd_bin_packages/vpython3${EXECUTABLE_SUFFIX}", + "-u", + "skia/infra/bots/run_recipe.py", + "${ISOLATED_OUTDIR}", + "upload_buildstats_results", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"BuildStats-Debian10-EMCC-wasm-Release-PathKit\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "skia" + ], + "dependencies": [ + "BuildStats-Debian10-EMCC-wasm-Release-PathKit", + "Housekeeper-PerCommit-BundleRecipes" + ], + "dimensions": [ + "cpu:x86-64-Haswell_GCE", + "gpu:none", + "machine_type:n1-highmem-2", + "os:Debian-10.3", + "pool:Skia" + ], + "environment": { + "RECIPES_USE_PY3": "true", + "VPYTHON_LOG_TRACE": "1" + }, + "env_prefixes": { + "PATH": [ + "cipd_bin_packages/cpython3", + "cipd_bin_packages/cpython3/bin", + "cipd_bin_packages", + "cipd_bin_packages/bin", + "gsutil/gsutil" + ], + "VPYTHON_DEFAULT_SPEC": [ + "skia/.vpython" + ], + "VPYTHON_VIRTUALENV_ROOT": [ + "cache/vpython" + ] + }, + "execution_timeout_ns": 3600000000000, + "extra_tags": { + "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" + }, + "io_timeout_ns": 3600000000000, + "max_attempts": 2, + "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" + }, + "Upload-Perf-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-OptimizeForSize-All-Android_SkottieTracing": { "caches": [ { "name": "vpython", @@ -73502,12 +72295,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Vulkan_Skpbench\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-OptimizeForSize-All-Android_SkottieTracing\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Vulkan_Skpbench" + "Perf-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-OptimizeForSize-All-Android_SkottieTracing" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -73543,7 +72336,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Android-Clang-GalaxyS7_G930FD-GPU-MaliT880-arm64-Release-All-Android": { + "Upload-Perf-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-All-Android": { "caches": [ { "name": "vpython", @@ -73589,12 +72382,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-GalaxyS7_G930FD-GPU-MaliT880-arm64-Release-All-Android\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-All-Android\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Android-Clang-GalaxyS7_G930FD-GPU-MaliT880-arm64-Release-All-Android" + "Perf-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-All-Android" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -73630,7 +72423,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Android-Clang-GalaxyS7_G930FD-GPU-MaliT880-arm64-Release-All-Android_Vulkan": { + "Upload-Perf-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-All-Android_SkottieTracing": { "caches": [ { "name": "vpython", @@ -73676,12 +72469,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-GalaxyS7_G930FD-GPU-MaliT880-arm64-Release-All-Android_Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-All-Android_SkottieTracing\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Android-Clang-GalaxyS7_G930FD-GPU-MaliT880-arm64-Release-All-Android_Vulkan" + "Perf-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-All-Android_SkottieTracing" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -73717,7 +72510,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Android-Clang-GalaxyS9-GPU-MaliG72-arm64-Release-All-Android": { + "Upload-Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android": { "caches": [ { "name": "vpython", @@ -73763,12 +72556,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-GalaxyS9-GPU-MaliG72-arm64-Release-All-Android\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Android-Clang-GalaxyS9-GPU-MaliG72-arm64-Release-All-Android" + "Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -73804,7 +72597,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Android-Clang-GalaxyS9-GPU-MaliG72-arm64-Release-All-Android_Vulkan": { + "Upload-Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_AllPathsVolatile_Skpbench": { "caches": [ { "name": "vpython", @@ -73850,12 +72643,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-GalaxyS9-GPU-MaliG72-arm64-Release-All-Android_Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_AllPathsVolatile_Skpbench\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Android-Clang-GalaxyS9-GPU-MaliG72-arm64-Release-All-Android_Vulkan" + "Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_AllPathsVolatile_Skpbench" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -73891,7 +72684,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Android-Clang-JioNext-CPU-SnapdragonQM215-arm-Release-All-Android": { + "Upload-Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Skpbench": { "caches": [ { "name": "vpython", @@ -73937,12 +72730,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-JioNext-CPU-SnapdragonQM215-arm-Release-All-Android\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Skpbench\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Android-Clang-JioNext-CPU-SnapdragonQM215-arm-Release-All-Android" + "Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Skpbench" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -73978,7 +72771,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-All-Android": { + "Upload-Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Vulkan": { "caches": [ { "name": "vpython", @@ -74024,12 +72817,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-All-Android\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-All-Android" + "Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -74065,7 +72858,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Android-Clang-P30-GPU-MaliG76-arm64-Release-All-Android": { + "Upload-Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Vulkan_AllPathsVolatile_Skpbench": { "caches": [ { "name": "vpython", @@ -74111,12 +72904,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-P30-GPU-MaliG76-arm64-Release-All-Android\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Vulkan_AllPathsVolatile_Skpbench\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Android-Clang-P30-GPU-MaliG76-arm64-Release-All-Android" + "Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Vulkan_AllPathsVolatile_Skpbench" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -74152,7 +72945,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Android-Clang-P30-GPU-MaliG76-arm64-Release-All-Android_Vulkan": { + "Upload-Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Vulkan_Skpbench": { "caches": [ { "name": "vpython", @@ -74198,12 +72991,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-P30-GPU-MaliG76-arm64-Release-All-Android_Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Vulkan_Skpbench\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Android-Clang-P30-GPU-MaliG76-arm64-Release-All-Android_Vulkan" + "Perf-Android-Clang-GalaxyS20-GPU-MaliG77-arm64-Release-All-Android_Vulkan_Skpbench" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -74239,7 +73032,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Android-Clang-Pixel2XL-GPU-Adreno540-arm64-Release-All-Android": { + "Upload-Perf-Android-Clang-GalaxyS7_G930FD-GPU-MaliT880-arm64-Release-All-Android": { "caches": [ { "name": "vpython", @@ -74285,12 +73078,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel2XL-GPU-Adreno540-arm64-Release-All-Android\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-GalaxyS7_G930FD-GPU-MaliT880-arm64-Release-All-Android\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Android-Clang-Pixel2XL-GPU-Adreno540-arm64-Release-All-Android" + "Perf-Android-Clang-GalaxyS7_G930FD-GPU-MaliT880-arm64-Release-All-Android" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -74326,7 +73119,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Android-Clang-Pixel2XL-GPU-Adreno540-arm64-Release-All-Android_Vulkan": { + "Upload-Perf-Android-Clang-GalaxyS7_G930FD-GPU-MaliT880-arm64-Release-All-Android_Vulkan": { "caches": [ { "name": "vpython", @@ -74372,12 +73165,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel2XL-GPU-Adreno540-arm64-Release-All-Android_Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-GalaxyS7_G930FD-GPU-MaliT880-arm64-Release-All-Android_Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Android-Clang-Pixel2XL-GPU-Adreno540-arm64-Release-All-Android_Vulkan" + "Perf-Android-Clang-GalaxyS7_G930FD-GPU-MaliT880-arm64-Release-All-Android_Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -74413,7 +73206,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Android-Clang-Pixel3-GPU-Adreno630-arm64-Release-All-Android": { + "Upload-Perf-Android-Clang-GalaxyS9-GPU-MaliG72-arm64-Release-All-Android": { "caches": [ { "name": "vpython", @@ -74459,12 +73252,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel3-GPU-Adreno630-arm64-Release-All-Android\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-GalaxyS9-GPU-MaliG72-arm64-Release-All-Android\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Android-Clang-Pixel3-GPU-Adreno630-arm64-Release-All-Android" + "Perf-Android-Clang-GalaxyS9-GPU-MaliG72-arm64-Release-All-Android" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -74500,7 +73293,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Android-Clang-Pixel3-GPU-Adreno630-arm64-Release-All-Android_Vulkan": { + "Upload-Perf-Android-Clang-GalaxyS9-GPU-MaliG72-arm64-Release-All-Android_Vulkan": { "caches": [ { "name": "vpython", @@ -74546,12 +73339,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel3-GPU-Adreno630-arm64-Release-All-Android_Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-GalaxyS9-GPU-MaliG72-arm64-Release-All-Android_Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Android-Clang-Pixel3-GPU-Adreno630-arm64-Release-All-Android_Vulkan" + "Perf-Android-Clang-GalaxyS9-GPU-MaliG72-arm64-Release-All-Android_Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -74587,7 +73380,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Android-Clang-Pixel3a-GPU-Adreno615-arm64-Release-All-Android": { + "Upload-Perf-Android-Clang-JioNext-CPU-SnapdragonQM215-arm-Release-All-Android": { "caches": [ { "name": "vpython", @@ -74633,12 +73426,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel3a-GPU-Adreno615-arm64-Release-All-Android\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-JioNext-CPU-SnapdragonQM215-arm-Release-All-Android\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Android-Clang-Pixel3a-GPU-Adreno615-arm64-Release-All-Android" + "Perf-Android-Clang-JioNext-CPU-SnapdragonQM215-arm-Release-All-Android" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -74674,7 +73467,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Android-Clang-Pixel3a-GPU-Adreno615-arm64-Release-All-Android_Vulkan": { + "Upload-Perf-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-All-Android": { "caches": [ { "name": "vpython", @@ -74720,12 +73513,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel3a-GPU-Adreno615-arm64-Release-All-Android_Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-All-Android\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Android-Clang-Pixel3a-GPU-Adreno615-arm64-Release-All-Android_Vulkan" + "Perf-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-All-Android" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -74761,7 +73554,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Android-Clang-Pixel4-CPU-Snapdragon855-arm64-Release-All-Android_Wuffs": { + "Upload-Perf-Android-Clang-P30-GPU-MaliG76-arm64-Release-All-Android": { "caches": [ { "name": "vpython", @@ -74807,12 +73600,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel4-CPU-Snapdragon855-arm64-Release-All-Android_Wuffs\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-P30-GPU-MaliG76-arm64-Release-All-Android\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Android-Clang-Pixel4-CPU-Snapdragon855-arm64-Release-All-Android_Wuffs" + "Perf-Android-Clang-P30-GPU-MaliG76-arm64-Release-All-Android" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -74848,7 +73641,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Android-Clang-Pixel4-GPU-Adreno640-arm64-Release-All-Android": { + "Upload-Perf-Android-Clang-P30-GPU-MaliG76-arm64-Release-All-Android_Vulkan": { "caches": [ { "name": "vpython", @@ -74894,12 +73687,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel4-GPU-Adreno640-arm64-Release-All-Android\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-P30-GPU-MaliG76-arm64-Release-All-Android_Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Android-Clang-Pixel4-GPU-Adreno640-arm64-Release-All-Android" + "Perf-Android-Clang-P30-GPU-MaliG76-arm64-Release-All-Android_Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -74935,7 +73728,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Android-Clang-Pixel4-GPU-Adreno640-arm64-Release-All-Android_Vulkan": { + "Upload-Perf-Android-Clang-Pixel2XL-GPU-Adreno540-arm64-Release-All-Android": { "caches": [ { "name": "vpython", @@ -74981,12 +73774,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel4-GPU-Adreno640-arm64-Release-All-Android_Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel2XL-GPU-Adreno540-arm64-Release-All-Android\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Android-Clang-Pixel4-GPU-Adreno640-arm64-Release-All-Android_Vulkan" + "Perf-Android-Clang-Pixel2XL-GPU-Adreno540-arm64-Release-All-Android" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -75022,7 +73815,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android": { + "Upload-Perf-Android-Clang-Pixel2XL-GPU-Adreno540-arm64-Release-All-Android_Vulkan": { "caches": [ { "name": "vpython", @@ -75068,12 +73861,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel2XL-GPU-Adreno540-arm64-Release-All-Android_Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android" + "Perf-Android-Clang-Pixel2XL-GPU-Adreno540-arm64-Release-All-Android_Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -75109,7 +73902,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_AllPathsVolatile_Skpbench": { + "Upload-Perf-Android-Clang-Pixel3-GPU-Adreno630-arm64-Release-All-Android": { "caches": [ { "name": "vpython", @@ -75155,12 +73948,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_AllPathsVolatile_Skpbench\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel3-GPU-Adreno630-arm64-Release-All-Android\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_AllPathsVolatile_Skpbench" + "Perf-Android-Clang-Pixel3-GPU-Adreno630-arm64-Release-All-Android" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -75196,7 +73989,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Skpbench": { + "Upload-Perf-Android-Clang-Pixel3-GPU-Adreno630-arm64-Release-All-Android_Vulkan": { "caches": [ { "name": "vpython", @@ -75242,12 +74035,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Skpbench\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel3-GPU-Adreno630-arm64-Release-All-Android_Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Skpbench" + "Perf-Android-Clang-Pixel3-GPU-Adreno630-arm64-Release-All-Android_Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -75283,7 +74076,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Vulkan": { + "Upload-Perf-Android-Clang-Pixel3a-GPU-Adreno615-arm64-Release-All-Android": { "caches": [ { "name": "vpython", @@ -75329,12 +74122,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel3a-GPU-Adreno615-arm64-Release-All-Android\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Vulkan" + "Perf-Android-Clang-Pixel3a-GPU-Adreno615-arm64-Release-All-Android" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -75370,7 +74163,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Vulkan_AllPathsVolatile_Skpbench": { + "Upload-Perf-Android-Clang-Pixel3a-GPU-Adreno615-arm64-Release-All-Android_Vulkan": { "caches": [ { "name": "vpython", @@ -75416,12 +74209,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Vulkan_AllPathsVolatile_Skpbench\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel3a-GPU-Adreno615-arm64-Release-All-Android_Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Vulkan_AllPathsVolatile_Skpbench" + "Perf-Android-Clang-Pixel3a-GPU-Adreno615-arm64-Release-All-Android_Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -75457,7 +74250,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Vulkan_Skpbench": { + "Upload-Perf-Android-Clang-Pixel4-CPU-Snapdragon855-arm64-Release-All-Android_Wuffs": { "caches": [ { "name": "vpython", @@ -75503,12 +74296,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Vulkan_Skpbench\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel4-CPU-Snapdragon855-arm64-Release-All-Android_Wuffs\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Vulkan_Skpbench" + "Perf-Android-Clang-Pixel4-CPU-Snapdragon855-arm64-Release-All-Android_Wuffs" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -75544,7 +74337,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Android-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android": { + "Upload-Perf-Android-Clang-Pixel4-GPU-Adreno640-arm64-Release-All-Android": { "caches": [ { "name": "vpython", @@ -75590,12 +74383,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel4-GPU-Adreno640-arm64-Release-All-Android\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Android-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android" + "Perf-Android-Clang-Pixel4-GPU-Adreno640-arm64-Release-All-Android" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -75631,7 +74424,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Android-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android_Vulkan": { + "Upload-Perf-Android-Clang-Pixel4-GPU-Adreno640-arm64-Release-All-Android_Vulkan": { "caches": [ { "name": "vpython", @@ -75677,12 +74470,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android_Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel4-GPU-Adreno640-arm64-Release-All-Android_Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Android-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android_Vulkan" + "Perf-Android-Clang-Pixel4-GPU-Adreno640-arm64-Release-All-Android_Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -75718,7 +74511,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Android-Clang-Pixel6-GPU-MaliG78-arm64-Release-All-Android_Vulkan": { + "Upload-Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android": { "caches": [ { "name": "vpython", @@ -75764,12 +74557,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel6-GPU-MaliG78-arm64-Release-All-Android_Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Android-Clang-Pixel6-GPU-MaliG78-arm64-Release-All-Android_Vulkan" + "Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -75805,7 +74598,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Android-Clang-Pixel7-GPU-MaliG710-arm64-Release-All-Android_Vulkan": { + "Upload-Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_AllPathsVolatile_Skpbench": { "caches": [ { "name": "vpython", @@ -75851,12 +74644,186 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel7-GPU-MaliG710-arm64-Release-All-Android_Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_AllPathsVolatile_Skpbench\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Android-Clang-Pixel7-GPU-MaliG710-arm64-Release-All-Android_Vulkan" + "Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_AllPathsVolatile_Skpbench" + ], + "dimensions": [ + "cpu:x86-64-Haswell_GCE", + "gpu:none", + "machine_type:n1-highmem-2", + "os:Debian-10.3", + "pool:Skia" + ], + "environment": { + "RECIPES_USE_PY3": "true", + "VPYTHON_LOG_TRACE": "1" + }, + "env_prefixes": { + "PATH": [ + "cipd_bin_packages/cpython3", + "cipd_bin_packages/cpython3/bin", + "cipd_bin_packages", + "cipd_bin_packages/bin", + "gsutil/gsutil" + ], + "VPYTHON_DEFAULT_SPEC": [ + "skia/.vpython" + ], + "VPYTHON_VIRTUALENV_ROOT": [ + "cache/vpython" + ] + }, + "execution_timeout_ns": 3600000000000, + "extra_tags": { + "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" + }, + "io_timeout_ns": 3600000000000, + "max_attempts": 2, + "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" + }, + "Upload-Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Skpbench": { + "caches": [ + { + "name": "vpython", + "path": "cache/vpython" + } + ], + "casSpec": "run-recipe", + "cipd_packages": [ + { + "name": "infra/3pp/tools/cpython3/linux-amd64", + "path": "cipd_bin_packages/cpython3", + "version": "version:2@3.8.10.chromium.19" + }, + { + "name": "infra/tools/luci-auth/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/kitchen/${platform}", + "path": ".", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/vpython-native/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/vpython/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "skia/bots/gsutil", + "path": "gsutil", + "version": "version:0" + } + ], + "command": [ + "cipd_bin_packages/vpython3${EXECUTABLE_SUFFIX}", + "-u", + "skia/infra/bots/run_recipe.py", + "${ISOLATED_OUTDIR}", + "upload_nano_results", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Skpbench\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "skia" + ], + "dependencies": [ + "Housekeeper-PerCommit-BundleRecipes", + "Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Skpbench" + ], + "dimensions": [ + "cpu:x86-64-Haswell_GCE", + "gpu:none", + "machine_type:n1-highmem-2", + "os:Debian-10.3", + "pool:Skia" + ], + "environment": { + "RECIPES_USE_PY3": "true", + "VPYTHON_LOG_TRACE": "1" + }, + "env_prefixes": { + "PATH": [ + "cipd_bin_packages/cpython3", + "cipd_bin_packages/cpython3/bin", + "cipd_bin_packages", + "cipd_bin_packages/bin", + "gsutil/gsutil" + ], + "VPYTHON_DEFAULT_SPEC": [ + "skia/.vpython" + ], + "VPYTHON_VIRTUALENV_ROOT": [ + "cache/vpython" + ] + }, + "execution_timeout_ns": 3600000000000, + "extra_tags": { + "log_location": "logdog://logs.chromium.org/skia/${SWARMING_TASK_ID}/+/annotations" + }, + "io_timeout_ns": 3600000000000, + "max_attempts": 2, + "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" + }, + "Upload-Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Vulkan": { + "caches": [ + { + "name": "vpython", + "path": "cache/vpython" + } + ], + "casSpec": "run-recipe", + "cipd_packages": [ + { + "name": "infra/3pp/tools/cpython3/linux-amd64", + "path": "cipd_bin_packages/cpython3", + "version": "version:2@3.8.10.chromium.19" + }, + { + "name": "infra/tools/luci-auth/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/kitchen/${platform}", + "path": ".", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/vpython-native/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "infra/tools/luci/vpython/${platform}", + "path": "cipd_bin_packages", + "version": "git_revision:4f585e471d9b3ba86b2ac0ec0cdefaa8fdb67024" + }, + { + "name": "skia/bots/gsutil", + "path": "gsutil", + "version": "version:0" + } + ], + "command": [ + "cipd_bin_packages/vpython3${EXECUTABLE_SUFFIX}", + "-u", + "skia/infra/bots/run_recipe.py", + "${ISOLATED_OUTDIR}", + "upload_nano_results", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "skia" + ], + "dependencies": [ + "Housekeeper-PerCommit-BundleRecipes", + "Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -75892,7 +74859,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Android-Clang-Wembley-GPU-PowerVRGE8320-arm-Release-All-Android": { + "Upload-Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Vulkan_AllPathsVolatile_Skpbench": { "caches": [ { "name": "vpython", @@ -75938,12 +74905,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Wembley-GPU-PowerVRGE8320-arm-Release-All-Android\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Vulkan_AllPathsVolatile_Skpbench\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Android-Clang-Wembley-GPU-PowerVRGE8320-arm-Release-All-Android" + "Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Vulkan_AllPathsVolatile_Skpbench" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -75979,7 +74946,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Android12-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android": { + "Upload-Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Vulkan_Skpbench": { "caches": [ { "name": "vpython", @@ -76025,12 +74992,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android12-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Vulkan_Skpbench\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Android12-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android" + "Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Vulkan_Skpbench" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -76066,7 +75033,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Android12-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android_Vulkan": { + "Upload-Perf-Android-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android": { "caches": [ { "name": "vpython", @@ -76112,12 +75079,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android12-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android_Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Android12-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android_Vulkan" + "Perf-Android-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -76153,7 +75120,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-ChromeOS-Clang-Kevin-GPU-MaliT860-arm-Release-All": { + "Upload-Perf-Android-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android_Vulkan": { "caches": [ { "name": "vpython", @@ -76199,12 +75166,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-ChromeOS-Clang-Kevin-GPU-MaliT860-arm-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android_Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-ChromeOS-Clang-Kevin-GPU-MaliT860-arm-Release-All" + "Perf-Android-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android_Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -76240,7 +75207,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-ChromeOS-Clang-Sparky360-GPU-IntelUHDGraphics605-x86_64-Release-All": { + "Upload-Perf-Android-Clang-Pixel6-GPU-MaliG78-arm64-Release-All-Android_Vulkan": { "caches": [ { "name": "vpython", @@ -76286,12 +75253,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-ChromeOS-Clang-Sparky360-GPU-IntelUHDGraphics605-x86_64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel6-GPU-MaliG78-arm64-Release-All-Android_Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-ChromeOS-Clang-Sparky360-GPU-IntelUHDGraphics605-x86_64-Release-All" + "Perf-Android-Clang-Pixel6-GPU-MaliG78-arm64-Release-All-Android_Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -76327,7 +75294,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-ChromeOS-Clang-Spin513-GPU-Adreno618-arm-Release-All": { + "Upload-Perf-Android-Clang-Pixel7-GPU-MaliG710-arm64-Release-All-Android_Vulkan": { "caches": [ { "name": "vpython", @@ -76373,12 +75340,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-ChromeOS-Clang-Spin513-GPU-Adreno618-arm-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Pixel7-GPU-MaliG710-arm64-Release-All-Android_Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-ChromeOS-Clang-Spin513-GPU-Adreno618-arm-Release-All" + "Perf-Android-Clang-Pixel7-GPU-MaliG710-arm64-Release-All-Android_Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -76414,7 +75381,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-ChromeOS-Clang-Spin514-GPU-RadeonVega3-x86_64-Release-All": { + "Upload-Perf-Android-Clang-Wembley-GPU-PowerVRGE8320-arm-Release-All-Android": { "caches": [ { "name": "vpython", @@ -76460,12 +75427,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-ChromeOS-Clang-Spin514-GPU-RadeonVega3-x86_64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android-Clang-Wembley-GPU-PowerVRGE8320-arm-Release-All-Android\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-ChromeOS-Clang-Spin514-GPU-RadeonVega3-x86_64-Release-All" + "Perf-Android-Clang-Wembley-GPU-PowerVRGE8320-arm-Release-All-Android" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -76501,7 +75468,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All": { + "Upload-Perf-Android12-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android": { "caches": [ { "name": "vpython", @@ -76547,12 +75514,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android12-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All" + "Perf-Android12-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -76588,7 +75555,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-BonusConfigs": { + "Upload-Perf-Android12-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android_Vulkan": { "caches": [ { "name": "vpython", @@ -76634,12 +75601,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-BonusConfigs\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Android12-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android_Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-BonusConfigs" + "Perf-Android12-Clang-Pixel5-GPU-Adreno620-arm64-Release-All-Android_Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -76675,7 +75642,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-ColorSpaces": { + "Upload-Perf-ChromeOS-Clang-Kevin-GPU-MaliT860-arm-Release-All": { "caches": [ { "name": "vpython", @@ -76721,12 +75688,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-ColorSpaces\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-ChromeOS-Clang-Kevin-GPU-MaliT860-arm-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-ColorSpaces" + "Perf-ChromeOS-Clang-Kevin-GPU-MaliT860-arm-Release-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -76762,7 +75729,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-Fast": { + "Upload-Perf-ChromeOS-Clang-Sparky360-GPU-IntelUHDGraphics605-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -76808,12 +75775,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-Fast\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-ChromeOS-Clang-Sparky360-GPU-IntelUHDGraphics605-x86_64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-Fast" + "Perf-ChromeOS-Clang-Sparky360-GPU-IntelUHDGraphics605-x86_64-Release-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -76849,7 +75816,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-SK_FORCE_RASTER_PIPELINE_BLITTER": { + "Upload-Perf-ChromeOS-Clang-Spin513-GPU-Adreno618-arm-Release-All": { "caches": [ { "name": "vpython", @@ -76895,12 +75862,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-SK_FORCE_RASTER_PIPELINE_BLITTER\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-ChromeOS-Clang-Spin513-GPU-Adreno618-arm-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-SK_FORCE_RASTER_PIPELINE_BLITTER" + "Perf-ChromeOS-Clang-Spin513-GPU-Adreno618-arm-Release-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -76936,7 +75903,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-Wuffs": { + "Upload-Perf-ChromeOS-Clang-Spin514-GPU-RadeonVega3-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -76982,12 +75949,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-Wuffs\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-ChromeOS-Clang-Spin514-GPU-RadeonVega3-x86_64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Debian10-Clang-GCE-CPU-AVX2-x86_64-Release-All-Wuffs" + "Perf-ChromeOS-Clang-Spin514-GPU-RadeonVega3-x86_64-Release-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -77023,7 +75990,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Debian10-Clang-GCE-CPU-AVX512-x86_64-OptimizeForSize-All": { + "Upload-Perf-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -77069,12 +76036,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-GCE-CPU-AVX512-x86_64-OptimizeForSize-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Debian10-Clang-GCE-CPU-AVX512-x86_64-OptimizeForSize-All" + "Perf-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -77110,7 +76077,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Debian10-Clang-GCE-CPU-AVX512-x86_64-Release-All": { + "Upload-Perf-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All-SkottieTracing": { "caches": [ { "name": "vpython", @@ -77156,12 +76123,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-GCE-CPU-AVX512-x86_64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All-SkottieTracing\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Debian10-Clang-GCE-CPU-AVX512-x86_64-Release-All" + "Perf-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All-SkottieTracing" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -77197,7 +76164,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Release-All-SwiftShader": { + "Upload-Perf-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All-Vulkan": { "caches": [ { "name": "vpython", @@ -77243,12 +76210,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Release-All-SwiftShader\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Debian10-Clang-GCE-GPU-SwiftShader-x86_64-Release-All-SwiftShader" + "Perf-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All-Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -77284,7 +76251,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All": { + "Upload-Perf-Debian10-Clang-NUCDE3815TYKHE-GPU-IntelBayTrail-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -77330,12 +76297,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-NUCDE3815TYKHE-GPU-IntelBayTrail-x86_64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All" + "Perf-Debian10-Clang-NUCDE3815TYKHE-GPU-IntelBayTrail-x86_64-Release-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -77371,7 +76338,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All-SkottieTracing": { + "Upload-Perf-Debian10-Clang-ShuttleA-GPU-IntelHD2000-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -77417,12 +76384,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All-SkottieTracing\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-ShuttleA-GPU-IntelHD2000-x86_64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All-SkottieTracing" + "Perf-Debian10-Clang-ShuttleA-GPU-IntelHD2000-x86_64-Release-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -77458,7 +76425,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All-Vulkan": { + "Upload-Perf-Debian11-Clang-NUC11TZi5-CPU-AVX2-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -77504,12 +76471,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian11-Clang-NUC11TZi5-CPU-AVX2-x86_64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Debian10-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Release-All-Vulkan" + "Perf-Debian11-Clang-NUC11TZi5-CPU-AVX2-x86_64-Release-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -77545,7 +76512,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Debian10-Clang-NUCDE3815TYKHE-GPU-IntelBayTrail-x86_64-Release-All": { + "Upload-Perf-Debian11-Clang-NUC11TZi5-CPU-AVX2-x86_64-Release-All-BonusConfigs": { "caches": [ { "name": "vpython", @@ -77591,12 +76558,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-NUCDE3815TYKHE-GPU-IntelBayTrail-x86_64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian11-Clang-NUC11TZi5-CPU-AVX2-x86_64-Release-All-BonusConfigs\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Debian10-Clang-NUCDE3815TYKHE-GPU-IntelBayTrail-x86_64-Release-All" + "Perf-Debian11-Clang-NUC11TZi5-CPU-AVX2-x86_64-Release-All-BonusConfigs" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -77632,7 +76599,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Debian10-Clang-ShuttleA-GPU-IntelHD2000-x86_64-Release-All": { + "Upload-Perf-Debian11-Clang-NUC11TZi5-CPU-AVX2-x86_64-Release-All-ColorSpaces": { "caches": [ { "name": "vpython", @@ -77678,12 +76645,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian10-Clang-ShuttleA-GPU-IntelHD2000-x86_64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Debian11-Clang-NUC11TZi5-CPU-AVX2-x86_64-Release-All-ColorSpaces\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Debian10-Clang-ShuttleA-GPU-IntelHD2000-x86_64-Release-All" + "Perf-Debian11-Clang-NUC11TZi5-CPU-AVX2-x86_64-Release-All-ColorSpaces" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -82069,7 +81036,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-ANGLE": { + "Upload-Perf-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-Vulkan": { "caches": [ { "name": "vpython", @@ -82115,12 +81082,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-ANGLE\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-ANGLE" + "Perf-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -82156,7 +81123,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-Vulkan": { + "Upload-Perf-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -82202,12 +81169,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-Vulkan" + "Perf-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -82243,7 +81210,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-All": { + "Upload-Perf-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-All-ANGLE": { "caches": [ { "name": "vpython", @@ -82289,12 +81256,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-All-ANGLE\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-All" + "Perf-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-All-ANGLE" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -82330,7 +81297,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-All-ANGLE": { + "Upload-Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -82376,12 +81343,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-All-ANGLE\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-All-ANGLE" + "Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -82417,7 +81384,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All": { + "Upload-Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-ANGLE": { "caches": [ { "name": "vpython", @@ -82463,12 +81430,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-ANGLE\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All" + "Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-ANGLE" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -82504,7 +81471,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-ANGLE": { + "Upload-Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-Vulkan": { "caches": [ { "name": "vpython", @@ -82550,12 +81517,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-ANGLE\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-ANGLE" + "Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -82591,7 +81558,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-Vulkan": { + "Upload-Perf-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -82637,12 +81604,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-Vulkan" + "Perf-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -82678,7 +81645,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All": { + "Upload-Perf-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-ANGLE": { "caches": [ { "name": "vpython", @@ -82724,12 +81691,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-ANGLE\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All" + "Perf-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-ANGLE" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -82765,7 +81732,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-ANGLE": { + "Upload-Perf-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-Vulkan": { "caches": [ { "name": "vpython", @@ -82811,12 +81778,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-ANGLE\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-ANGLE" + "Perf-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -82852,7 +81819,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-Vulkan": { + "Upload-Perf-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -82898,12 +81865,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-Vulkan" + "Perf-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -82939,7 +81906,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All": { + "Upload-Perf-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All-Vulkan": { "caches": [ { "name": "vpython", @@ -82985,12 +81952,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All" + "Perf-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All-Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -83026,7 +81993,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All-Vulkan": { + "Upload-Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -83072,12 +82039,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All-Vulkan" + "Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -83113,7 +82080,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All": { + "Upload-Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All-ANGLE": { "caches": [ { "name": "vpython", @@ -83159,12 +82126,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All-ANGLE\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All" + "Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All-ANGLE" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -83200,7 +82167,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All-ANGLE": { + "Upload-Perf-Win10-Clang-RUBYR5-GPU-RadeonVega6-x86_64-Release-All-Vulkan": { "caches": [ { "name": "vpython", @@ -83246,12 +82213,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All-ANGLE\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-RUBYR5-GPU-RadeonVega6-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All-ANGLE" + "Perf-Win10-Clang-RUBYR5-GPU-RadeonVega6-x86_64-Release-All-Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -83287,7 +82254,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Win10-Clang-RUBYR5-GPU-RadeonVega6-x86_64-Release-All-Vulkan": { + "Upload-Perf-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -83333,12 +82300,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-RUBYR5-GPU-RadeonVega6-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Win10-Clang-RUBYR5-GPU-RadeonVega6-x86_64-Release-All-Vulkan" + "Perf-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -83374,7 +82341,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All": { + "Upload-Perf-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All-ANGLE": { "caches": [ { "name": "vpython", @@ -83420,12 +82387,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All-ANGLE\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All" + "Perf-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All-ANGLE" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -83461,7 +82428,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All-ANGLE": { + "Upload-Perf-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All-Vulkan": { "caches": [ { "name": "vpython", @@ -83507,12 +82474,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All-ANGLE\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All-ANGLE" + "Perf-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All-Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -83548,7 +82515,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All-Vulkan": { + "Upload-Perf-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -83594,12 +82561,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All-Vulkan" + "Perf-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -83635,7 +82602,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All": { + "Upload-Perf-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-ANGLE": { "caches": [ { "name": "vpython", @@ -83681,12 +82648,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-ANGLE\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All" + "Perf-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-ANGLE" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -83722,7 +82689,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-ANGLE": { + "Upload-Perf-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-Vulkan": { "caches": [ { "name": "vpython", @@ -83768,12 +82735,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-ANGLE\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-ANGLE" + "Perf-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -83809,7 +82776,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-Vulkan": { + "Upload-Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -83855,12 +82822,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-Vulkan" + "Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -83896,7 +82863,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All": { + "Upload-Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All-ANGLE": { "caches": [ { "name": "vpython", @@ -83942,12 +82909,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All-ANGLE\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All" + "Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All-ANGLE" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -83983,7 +82950,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All-ANGLE": { + "Upload-Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All-Vulkan": { "caches": [ { "name": "vpython", @@ -84029,12 +82996,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All-ANGLE\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All-ANGLE" + "Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All-Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -84070,7 +83037,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All-Vulkan": { + "Upload-Perf-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -84116,12 +83083,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All-Vulkan" + "Perf-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -84157,7 +83124,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All": { + "Upload-Perf-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Vulkan": { "caches": [ { "name": "vpython", @@ -84203,12 +83170,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All" + "Perf-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -84244,7 +83211,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Vulkan": { + "Upload-Perf-Win2019-Clang-GCE-CPU-AVX2-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -84290,12 +83257,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win2019-Clang-GCE-CPU-AVX2-x86_64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Vulkan" + "Perf-Win2019-Clang-GCE-CPU-AVX2-x86_64-Release-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -84331,7 +83298,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-Win2019-Clang-GCE-CPU-AVX2-x86_64-Release-All": { + "Upload-Perf-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Release-All": { "caches": [ { "name": "vpython", @@ -84377,12 +83344,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-Win2019-Clang-GCE-CPU-AVX2-x86_64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-Win2019-Clang-GCE-CPU-AVX2-x86_64-Release-All" + "Perf-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Release-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -84418,7 +83385,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Release-All": { + "Upload-Perf-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Release-All-Metal": { "caches": [ { "name": "vpython", @@ -84464,12 +83431,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Release-All-Metal\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Release-All" + "Perf-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Release-All-Metal" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -84505,7 +83472,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Release-All-Metal": { + "Upload-Perf-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Release-All": { "caches": [ { "name": "vpython", @@ -84551,12 +83518,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Release-All-Metal\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-iOS-Clang-iPadPro-GPU-PowerVRGT7800-arm64-Release-All-Metal" + "Perf-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Release-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -84592,7 +83559,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Release-All": { + "Upload-Perf-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Release-All-Metal": { "caches": [ { "name": "vpython", @@ -84638,12 +83605,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Release-All-Metal\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Release-All" + "Perf-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Release-All-Metal" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -84679,7 +83646,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Release-All-Metal": { + "Upload-Perf-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Release-All": { "caches": [ { "name": "vpython", @@ -84725,12 +83692,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Release-All-Metal\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-iOS-Clang-iPhone7-GPU-PowerVRGT7600-arm64-Release-All-Metal" + "Perf-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Release-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -84766,7 +83733,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Release-All": { + "Upload-Perf-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Release-All-Metal": { "caches": [ { "name": "vpython", @@ -84812,12 +83779,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Release-All-Metal\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Release-All" + "Perf-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Release-All-Metal" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -84853,7 +83820,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Release-All-Metal": { + "Upload-Perf-iOS-Xcode11.4.1-iPhone11-GPU-AppleA13-arm64-Release-All": { "caches": [ { "name": "vpython", @@ -84899,12 +83866,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Release-All-Metal\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-iOS-Xcode11.4.1-iPhone11-GPU-AppleA13-arm64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-iOS-Clang-iPhone8-GPU-AppleA11-arm64-Release-All-Metal" + "Perf-iOS-Xcode11.4.1-iPhone11-GPU-AppleA13-arm64-Release-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -84940,7 +83907,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-iOS-Xcode11.4.1-iPhone11-GPU-AppleA13-arm64-Release-All": { + "Upload-Perf-iOS-Xcode11.4.1-iPhone11-GPU-AppleA13-arm64-Release-All-Metal": { "caches": [ { "name": "vpython", @@ -84986,12 +83953,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-iOS-Xcode11.4.1-iPhone11-GPU-AppleA13-arm64-Release-All\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-iOS-Xcode11.4.1-iPhone11-GPU-AppleA13-arm64-Release-All-Metal\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-iOS-Xcode11.4.1-iPhone11-GPU-AppleA13-arm64-Release-All" + "Perf-iOS-Xcode11.4.1-iPhone11-GPU-AppleA13-arm64-Release-All-Metal" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -85027,7 +83994,7 @@ "max_attempts": 2, "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Perf-iOS-Xcode11.4.1-iPhone11-GPU-AppleA13-arm64-Release-All-Metal": { + "Upload-Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All": { "caches": [ { "name": "vpython", @@ -85072,13 +84039,13 @@ "-u", "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", - "upload_nano_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Perf-iOS-Xcode11.4.1-iPhone11-GPU-AppleA13-arm64-Release-All-Metal\",\"gs_bucket\":\"skia-perf\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "upload_dm_results", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Perf-iOS-Xcode11.4.1-iPhone11-GPU-AppleA13-arm64-Release-All-Metal" + "Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -85112,9 +84079,9 @@ }, "io_timeout_ns": 3600000000000, "max_attempts": 2, - "service_account": "skia-external-nano-uploader@skia-swarming-bots.iam.gserviceaccount.com" + "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All": { + "Upload-Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE": { "caches": [ { "name": "vpython", @@ -85160,12 +84127,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All" + "Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -85201,7 +84168,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE": { + "Upload-Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-Vulkan": { "caches": [ { "name": "vpython", @@ -85247,12 +84214,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE" + "Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -85288,7 +84255,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-Vulkan": { + "Upload-Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -85334,12 +84301,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-Vulkan" + "Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -85375,7 +84342,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-All": { + "Upload-Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-All-ANGLE": { "caches": [ { "name": "vpython", @@ -85421,12 +84388,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-All-ANGLE\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-All" + "Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-All-ANGLE" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -85462,7 +84429,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-All-ANGLE": { + "Upload-Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-All-Vulkan": { "caches": [ { "name": "vpython", @@ -85508,12 +84475,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-All-ANGLE\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-All-ANGLE" + "Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-All-Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -85549,7 +84516,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-All-Vulkan": { + "Upload-Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All": { "caches": [ { "name": "vpython", @@ -85595,12 +84562,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-All-Vulkan" + "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -85636,7 +84603,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All": { + "Upload-Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE": { "caches": [ { "name": "vpython", @@ -85682,12 +84649,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All" + "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -85723,7 +84690,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE": { + "Upload-Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-BonusConfigs": { "caches": [ { "name": "vpython", @@ -85769,12 +84736,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-BonusConfigs\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE" + "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-BonusConfigs" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -85810,7 +84777,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-BonusConfigs": { + "Upload-Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Dawn": { "caches": [ { "name": "vpython", @@ -85856,12 +84823,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-BonusConfigs\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Dawn\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-BonusConfigs" + "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Dawn" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -85897,7 +84864,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Dawn": { + "Upload-Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-GpuTess": { "caches": [ { "name": "vpython", @@ -85943,12 +84910,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Dawn\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-GpuTess\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Dawn" + "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-GpuTess" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -85984,7 +84951,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-GpuTess": { + "Upload-Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Vulkan": { "caches": [ { "name": "vpython", @@ -86030,12 +84997,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-GpuTess\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-GpuTess" + "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -86071,7 +85038,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Vulkan": { + "Upload-Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -86117,12 +85084,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-Vulkan" + "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -86158,7 +85125,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All": { + "Upload-Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-ANGLE": { "caches": [ { "name": "vpython", @@ -86204,12 +85171,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-ANGLE\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All" + "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-ANGLE" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -86245,7 +85212,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-ANGLE": { + "Upload-Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-BonusConfigs": { "caches": [ { "name": "vpython", @@ -86291,12 +85258,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-ANGLE\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-BonusConfigs\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-ANGLE" + "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-BonusConfigs" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -86332,7 +85299,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-BonusConfigs": { + "Upload-Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Vulkan": { "caches": [ { "name": "vpython", @@ -86378,12 +85345,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-BonusConfigs\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-BonusConfigs" + "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -86419,7 +85386,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Vulkan": { + "Upload-Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All": { "caches": [ { "name": "vpython", @@ -86465,12 +85432,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-Vulkan" + "Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -86506,7 +85473,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All": { + "Upload-Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All-Vulkan": { "caches": [ { "name": "vpython", @@ -86552,12 +85519,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All" + "Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All-Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -86593,7 +85560,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All-ANGLE": { + "Upload-Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -86639,12 +85606,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All-ANGLE\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All-ANGLE" + "Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -86680,7 +85647,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All-Vulkan": { + "Upload-Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-Vulkan": { "caches": [ { "name": "vpython", @@ -86726,12 +85693,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Debug-All-Vulkan" + "Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -86767,7 +85734,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All": { + "Upload-Test-Win10-Clang-NUC5i7RYH-CPU-AVX2-x86_64-Debug-All-NativeFonts": { "caches": [ { "name": "vpython", @@ -86813,12 +85780,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC5i7RYH-CPU-AVX2-x86_64-Debug-All-NativeFonts\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All" + "Test-Win10-Clang-NUC5i7RYH-CPU-AVX2-x86_64-Debug-All-NativeFonts" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -86854,7 +85821,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-ANGLE": { + "Upload-Test-Win10-Clang-NUC5i7RYH-CPU-AVX2-x86_64-Debug-All-NativeFonts_DWriteCore": { "caches": [ { "name": "vpython", @@ -86900,12 +85867,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-ANGLE\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC5i7RYH-CPU-AVX2-x86_64-Debug-All-NativeFonts_DWriteCore\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-ANGLE" + "Test-Win10-Clang-NUC5i7RYH-CPU-AVX2-x86_64-Debug-All-NativeFonts_DWriteCore" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -86941,7 +85908,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-Vulkan": { + "Upload-Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All": { "caches": [ { "name": "vpython", @@ -86987,12 +85954,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-NUC11TZi5-GPU-IntelIrisXe-x86_64-Release-All-Vulkan" + "Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -87028,7 +85995,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-NUC5i7RYH-CPU-AVX2-x86_64-Debug-All-NativeFonts": { + "Upload-Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE": { "caches": [ { "name": "vpython", @@ -87074,12 +86041,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC5i7RYH-CPU-AVX2-x86_64-Debug-All-NativeFonts\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-NUC5i7RYH-CPU-AVX2-x86_64-Debug-All-NativeFonts" + "Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -87115,7 +86082,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All": { + "Upload-Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -87161,12 +86128,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All" + "Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -87202,7 +86169,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE": { + "Upload-Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-All-ANGLE": { "caches": [ { "name": "vpython", @@ -87248,12 +86215,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-All-ANGLE\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE" + "Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-All-ANGLE" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -87289,7 +86256,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-All": { + "Upload-Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All": { "caches": [ { "name": "vpython", @@ -87335,12 +86302,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-All" + "Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -87376,7 +86343,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-All-ANGLE": { + "Upload-Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE": { "caches": [ { "name": "vpython", @@ -87422,12 +86389,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-All-ANGLE\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-All-ANGLE" + "Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -87463,7 +86430,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All": { + "Upload-Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-Vulkan": { "caches": [ { "name": "vpython", @@ -87509,12 +86476,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All" + "Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -87550,7 +86517,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE": { + "Upload-Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -87596,12 +86563,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE" + "Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -87637,7 +86604,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-Vulkan": { + "Upload-Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-ANGLE": { "caches": [ { "name": "vpython", @@ -87683,12 +86650,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-ANGLE\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-Vulkan" + "Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-ANGLE" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -87724,7 +86691,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All": { + "Upload-Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-NativeFonts": { "caches": [ { "name": "vpython", @@ -87770,12 +86737,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-NativeFonts\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All" + "Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-NativeFonts" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -87811,7 +86778,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-ANGLE": { + "Upload-Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-Vulkan": { "caches": [ { "name": "vpython", @@ -87857,12 +86824,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-ANGLE\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-ANGLE" + "Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -87898,7 +86865,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-NativeFonts": { + "Upload-Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All": { "caches": [ { "name": "vpython", @@ -87944,12 +86911,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-NativeFonts\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-NativeFonts" + "Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -87985,7 +86952,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-Vulkan": { + "Upload-Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE": { "caches": [ { "name": "vpython", @@ -88031,12 +86998,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-Vulkan" + "Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -88072,7 +87039,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All": { + "Upload-Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-Direct3D": { "caches": [ { "name": "vpython", @@ -88118,12 +87085,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-Direct3D\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All" + "Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-Direct3D" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -88159,7 +87126,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE": { + "Upload-Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-Vulkan": { "caches": [ { "name": "vpython", @@ -88205,12 +87172,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE" + "Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -88246,7 +87213,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-Direct3D": { + "Upload-Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -88292,12 +87259,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-Direct3D\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-Direct3D" + "Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -88333,7 +87300,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-Vulkan": { + "Upload-Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-ANGLE": { "caches": [ { "name": "vpython", @@ -88379,12 +87346,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-ANGLE\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-Vulkan" + "Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-ANGLE" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -88420,7 +87387,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All": { + "Upload-Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-Direct3D": { "caches": [ { "name": "vpython", @@ -88466,12 +87433,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-Direct3D\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All" + "Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-Direct3D" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -88507,7 +87474,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-ANGLE": { + "Upload-Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-Vulkan": { "caches": [ { "name": "vpython", @@ -88553,12 +87520,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-ANGLE\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-ANGLE" + "Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -88594,7 +87561,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-Direct3D": { + "Upload-Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Debug-All": { "caches": [ { "name": "vpython", @@ -88640,12 +87607,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-Direct3D\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Debug-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-Direct3D" + "Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Debug-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -88681,7 +87648,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-Vulkan": { + "Upload-Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Debug-All-Vulkan": { "caches": [ { "name": "vpython", @@ -88727,12 +87694,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Debug-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Release-All-Vulkan" + "Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Debug-All-Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -88768,7 +87735,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Debug-All": { + "Upload-Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -88814,12 +87781,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Debug-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Debug-All" + "Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -88855,7 +87822,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Debug-All-Vulkan": { + "Upload-Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All-Vulkan": { "caches": [ { "name": "vpython", @@ -88901,12 +87868,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Debug-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Debug-All-Vulkan" + "Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All-Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -88942,7 +87909,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All": { + "Upload-Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All": { "caches": [ { "name": "vpython", @@ -88988,12 +87955,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All" + "Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -89029,7 +87996,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All-Vulkan": { + "Upload-Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE": { "caches": [ { "name": "vpython", @@ -89075,12 +88042,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-NUC9i7QN-GPU-RTX3060-x86_64-Release-All-Vulkan" + "Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -89116,7 +88083,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All": { + "Upload-Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -89162,12 +88129,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All" + "Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -89203,7 +88170,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE": { + "Upload-Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All-ANGLE": { "caches": [ { "name": "vpython", @@ -89249,12 +88216,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All-ANGLE\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE" + "Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All-ANGLE" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -89290,7 +88257,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All": { + "Upload-Test-Win10-Clang-RUBYR5-GPU-RadeonVega6-x86_64-Debug-All-Vulkan": { "caches": [ { "name": "vpython", @@ -89336,12 +88303,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-RUBYR5-GPU-RadeonVega6-x86_64-Debug-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All" + "Test-Win10-Clang-RUBYR5-GPU-RadeonVega6-x86_64-Debug-All-Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -89377,7 +88344,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All-ANGLE": { + "Upload-Test-Win10-Clang-RUBYR5-GPU-RadeonVega6-x86_64-Release-All-Vulkan": { "caches": [ { "name": "vpython", @@ -89423,12 +88390,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All-ANGLE\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-RUBYR5-GPU-RadeonVega6-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All-ANGLE" + "Test-Win10-Clang-RUBYR5-GPU-RadeonVega6-x86_64-Release-All-Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -89464,7 +88431,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-RUBYR5-GPU-RadeonVega6-x86_64-Debug-All-Vulkan": { + "Upload-Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Debug-All": { "caches": [ { "name": "vpython", @@ -89510,12 +88477,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-RUBYR5-GPU-RadeonVega6-x86_64-Debug-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Debug-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-RUBYR5-GPU-RadeonVega6-x86_64-Debug-All-Vulkan" + "Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Debug-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -89551,7 +88518,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-RUBYR5-GPU-RadeonVega6-x86_64-Release-All-Vulkan": { + "Upload-Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Debug-All-ANGLE": { "caches": [ { "name": "vpython", @@ -89597,12 +88564,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-RUBYR5-GPU-RadeonVega6-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Debug-All-ANGLE\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-RUBYR5-GPU-RadeonVega6-x86_64-Release-All-Vulkan" + "Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Debug-All-ANGLE" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -89638,7 +88605,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Debug-All": { + "Upload-Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Debug-All-Vulkan": { "caches": [ { "name": "vpython", @@ -89684,12 +88651,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Debug-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Debug-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Debug-All" + "Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Debug-All-Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -89725,7 +88692,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Debug-All-ANGLE": { + "Upload-Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -89771,12 +88738,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Debug-All-ANGLE\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Debug-All-ANGLE" + "Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -89812,7 +88779,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Debug-All-Vulkan": { + "Upload-Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All-ANGLE": { "caches": [ { "name": "vpython", @@ -89858,12 +88825,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Debug-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All-ANGLE\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Debug-All-Vulkan" + "Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All-ANGLE" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -89899,7 +88866,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All": { + "Upload-Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All-Vulkan": { "caches": [ { "name": "vpython", @@ -89945,12 +88912,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All" + "Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All-Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -89986,7 +88953,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All-ANGLE": { + "Upload-Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All": { "caches": [ { "name": "vpython", @@ -90032,12 +88999,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All-ANGLE\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All-ANGLE" + "Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -90073,7 +89040,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All-Vulkan": { + "Upload-Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All-ANGLE": { "caches": [ { "name": "vpython", @@ -90119,12 +89086,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All-ANGLE\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Release-All-Vulkan" + "Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All-ANGLE" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -90160,7 +89127,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All": { + "Upload-Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All-Direct3D": { "caches": [ { "name": "vpython", @@ -90206,12 +89173,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All-Direct3D\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All" + "Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All-Direct3D" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -90247,7 +89214,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All-ANGLE": { + "Upload-Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All-Vulkan": { "caches": [ { "name": "vpython", @@ -90293,12 +89260,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All-ANGLE\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All-ANGLE" + "Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All-Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -90334,7 +89301,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All-Direct3D": { + "Upload-Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -90380,12 +89347,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All-Direct3D\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All-Direct3D" + "Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -90421,7 +89388,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All-Vulkan": { + "Upload-Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-ANGLE": { "caches": [ { "name": "vpython", @@ -90467,12 +89434,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-ANGLE\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Debug-All-Vulkan" + "Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-ANGLE" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -90508,7 +89475,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All": { + "Upload-Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-Direct3D": { "caches": [ { "name": "vpython", @@ -90554,12 +89521,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-Direct3D\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All" + "Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-Direct3D" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -90595,7 +89562,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-ANGLE": { + "Upload-Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-Vulkan": { "caches": [ { "name": "vpython", @@ -90641,12 +89608,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-ANGLE\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-ANGLE" + "Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -90682,7 +89649,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-Direct3D": { + "Upload-Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All": { "caches": [ { "name": "vpython", @@ -90728,12 +89695,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-Direct3D\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-Direct3D" + "Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -90769,7 +89736,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-Vulkan": { + "Upload-Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE": { "caches": [ { "name": "vpython", @@ -90815,12 +89782,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-ShuttleA-GPU-RadeonHD7770-x86_64-Release-All-Vulkan" + "Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -90856,7 +89823,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All": { + "Upload-Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-Vulkan": { "caches": [ { "name": "vpython", @@ -90902,12 +89869,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All" + "Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -90943,7 +89910,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE": { + "Upload-Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -90989,12 +89956,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE" + "Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -91030,7 +89997,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-Vulkan": { + "Upload-Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All-ANGLE": { "caches": [ { "name": "vpython", @@ -91076,12 +90043,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All-ANGLE\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-Vulkan" + "Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All-ANGLE" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -91117,7 +90084,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All": { + "Upload-Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All-Vulkan": { "caches": [ { "name": "vpython", @@ -91163,12 +90130,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All" + "Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All-Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -91204,7 +90171,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All-ANGLE": { + "Upload-Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All": { "caches": [ { "name": "vpython", @@ -91250,12 +90217,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All-ANGLE\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All-ANGLE" + "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -91291,7 +90258,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All-Vulkan": { + "Upload-Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Direct3D": { "caches": [ { "name": "vpython", @@ -91337,12 +90304,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Direct3D\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Release-All-Vulkan" + "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Direct3D" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -91378,7 +90345,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All": { + "Upload-Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Graphite_Dawn": { "caches": [ { "name": "vpython", @@ -91424,12 +90391,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Graphite_Dawn\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All" + "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Graphite_Dawn" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -91465,7 +90432,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Direct3D": { + "Upload-Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Graphite_Vulkan": { "caches": [ { "name": "vpython", @@ -91511,12 +90478,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Direct3D\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Graphite_Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Direct3D" + "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Graphite_Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -91552,7 +90519,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Graphite_Dawn": { + "Upload-Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Vulkan": { "caches": [ { "name": "vpython", @@ -91598,12 +90565,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Graphite_Dawn\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Graphite_Dawn" + "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -91639,7 +90606,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Vulkan": { + "Upload-Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All": { "caches": [ { "name": "vpython", @@ -91685,12 +90652,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-Vulkan" + "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -91726,7 +90693,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All": { + "Upload-Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Direct3D": { "caches": [ { "name": "vpython", @@ -91772,12 +90739,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Direct3D\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All" + "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Direct3D" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -91813,7 +90780,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Direct3D": { + "Upload-Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Graphite_Dawn": { "caches": [ { "name": "vpython", @@ -91859,12 +90826,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Direct3D\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Graphite_Dawn\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Direct3D" + "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Graphite_Dawn" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -91900,7 +90867,7 @@ "max_attempts": 2, "service_account": "skia-external-gm-uploader@skia-swarming-bots.iam.gserviceaccount.com" }, - "Upload-Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Graphite_Dawn": { + "Upload-Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Graphite_Vulkan": { "caches": [ { "name": "vpython", @@ -91946,12 +90913,12 @@ "skia/infra/bots/run_recipe.py", "${ISOLATED_OUTDIR}", "upload_dm_results", - "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Graphite_Dawn\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", + "{\"$kitchen\":{\"devshell\":true,\"git_auth\":true},\"buildbucket_build_id\":\"<(BUILDBUCKET_BUILD_ID)\",\"buildername\":\"Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Graphite_Vulkan\",\"gs_bucket\":\"skia-infra-gm\",\"patch_issue\":\"<(ISSUE_INT)\",\"patch_ref\":\"<(PATCH_REF)\",\"patch_repo\":\"<(PATCH_REPO)\",\"patch_set\":\"<(PATCHSET_INT)\",\"patch_storage\":\"<(PATCH_STORAGE)\",\"repository\":\"<(REPO)\",\"revision\":\"<(REVISION)\",\"swarm_out_dir\":\"output_ignored\",\"task_id\":\"<(TASK_ID)\"}", "skia" ], "dependencies": [ "Housekeeper-PerCommit-BundleRecipes", - "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Graphite_Dawn" + "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Graphite_Vulkan" ], "dimensions": [ "cpu:x86-64-Haswell_GCE", @@ -92696,6 +91663,7 @@ "skia/tests", "skia/third_party", "skia/tools", + "skia/gm", "skia/gn", "skia/resources", "skia/package.json", @@ -92974,6 +91942,7 @@ "BazelBuild-base-enforce_iwyu-linux_x64": {}, "BazelBuild-base-release-linux_x64": {}, "BazelBuild-example_hello_world_vulkan-release-linux_x64": {}, + "BazelBuild-modules_canvaskit-ck_full_webgl2_debug-linux_x64": {}, "BazelBuild-skia_public-enforce_iwyu-linux_x64": {}, "BazelBuild-skia_public-release-linux_x64": {}, "BazelBuild-skottie_tool_gpu-enforce_iwyu-linux_x64": {}, @@ -93000,6 +91969,7 @@ "Build-Debian10-Clang-arm64-Debug-Android_Graphite_Dawn": { "location_regexes": [ "(tests|src/gpu)/graphite/.*", + "src/sksl/generated/.*", "bazel/external/dawn/*", "DEPS" ] @@ -93015,44 +91985,51 @@ }, "Build-Debian10-EMCC-wasm-Release-CanvasKit": {}, "Build-Debian10-EMCC-wasm-Release-CanvasKit_CPU": {}, - "Build-Debian10-GCC-x86_64-Debug-NoGPU_Docker": {}, - "Build-Debian10-GCC-x86_64-Release-Docker": {}, + "Build-Debian11-GCC-x86_64-Debug-NoGPU_Docker": {}, + "Build-Debian11-GCC-x86_64-Release-Docker": {}, "Build-Mac-Clang-arm64-Debug-ASAN_Graphite_Metal": { "location_regexes": [ - "(tests|src/gpu)/graphite/.*" + "(tests|src/gpu)/graphite/.*", + "src/sksl/generated/.*" ] }, "Build-Mac-Clang-arm64-Debug-Graphite_Metal": {}, "Build-Mac-Clang-arm64-Debug-Graphite_Metal_NoGpu": {}, "Build-Mac-Clang-arm64-Debug-iOS_Graphite_Metal": { "location_regexes": [ - "(tests|src/gpu)/graphite/.*" + "(tests|src/gpu)/graphite/.*", + "src/sksl/generated/.*" ] }, "Build-Mac-Clang-arm64-Release-Graphite_Metal": { "location_regexes": [ - "(tests|src/gpu)/graphite/.*" + "(tests|src/gpu)/graphite/.*", + "src/sksl/generated/.*" ] }, "Build-Mac-Clang-arm64-Release-iOS_Graphite_Metal": { "location_regexes": [ - "(tests|src/gpu)/graphite/.*" + "(tests|src/gpu)/graphite/.*", + "src/sksl/generated/.*" ] }, "Build-Mac-Clang-x86_64-Debug-Graphite_Dawn": { "location_regexes": [ - "(tests|src/gpu)/graphite/.*" + "(tests|src/gpu)/graphite/.*", + "src/sksl/generated/.*" ] }, "Build-Mac-Clang-x86_64-Debug-Graphite_Metal": { "location_regexes": [ - "(tests|src/gpu)/graphite/.*" + "(tests|src/gpu)/graphite/.*", + "src/sksl/generated/.*" ] }, "Build-Mac-Clang-x86_64-Release": {}, "Build-Mac-Clang-x86_64-Release-Graphite_Metal": { "location_regexes": [ - "(tests|src/gpu)/graphite/.*" + "(tests|src/gpu)/graphite/.*", + "src/sksl/generated/.*" ] }, "Build-Win-Clang-x86-Debug": {}, @@ -93063,7 +92040,8 @@ "Build-Win-MSVC-x86_64-Debug-Graphite_Dawn": {}, "Build-Win-MSVC-x86_64-Debug-Graphite_Vulkan": { "location_regexes": [ - "(tests|src/gpu)/graphite/.*" + "(tests|src/gpu)/graphite/.*", + "src/sksl/generated/.*" ] }, "Build-Win-MSVC-x86_64-Release-Vulkan": {}, @@ -93081,12 +92059,14 @@ "Housekeeper-PerCommit-RunGnToBp": {}, "Perf-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-Graphite_Metal": { "location_regexes": [ - "(tests|src/gpu)/graphite/.*" + "(tests|src/gpu)/graphite/.*", + "src/sksl/generated/.*" ] }, "Perf-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite_Metal": { "location_regexes": [ - "(tests|src/gpu)/graphite/.*" + "(tests|src/gpu)/graphite/.*", + "src/sksl/generated/.*" ] }, "Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All": {}, @@ -93108,30 +92088,35 @@ "Test-Mac10.15.7-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-Graphite_Metal": { "location_regexes": [ "(tests|src/gpu)/graphite/.*", + "src/sksl/generated/.*", "dm/.+" ] }, "Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-ASAN_Graphite_Metal": { "location_regexes": [ "(tests|src/gpu)/graphite/.*", + "src/sksl/generated/.*", "dm/.+" ] }, "Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Debug-All-Graphite_Dawn": { "location_regexes": [ "(tests|src/gpu)/graphite/.*", + "src/sksl/generated/.*", "dm/.+" ] }, "Test-Mac11-Clang-MacMini9.1-GPU-AppleM1-arm64-Release-All-Graphite_Metal": { "location_regexes": [ "(tests|src/gpu)/graphite/.*", + "src/sksl/generated/.*", "dm/.+" ] }, "Test-Mac12-Clang-MacBookPro16.2-GPU-IntelIrisPlus-x86_64-Debug-All-Graphite_Metal": { "location_regexes": [ "(tests|src/gpu)/graphite/.*", + "src/sksl/generated/.*", "dm/.+" ] }, @@ -93143,6 +92128,7 @@ "Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Release-All-Graphite_Dawn": { "location_regexes": [ "(tests|src/gpu)/graphite/.*", + "src/sksl/generated/.*", "dm/.+" ] }, diff --git a/infra/debugger-app/BUILD.bazel b/infra/debugger-app/BUILD.bazel new file mode 100644 index 000000000000..db8048856c7f --- /dev/null +++ b/infra/debugger-app/BUILD.bazel @@ -0,0 +1,23 @@ +load("//bazel:skia_app_container.bzl", "skia_app_container") + +# Modify the debugger-app container by injecting the artifacts from this +# repository on which it depends. +skia_app_container( + name = "debugger_container", + base_image = "@debugger-app-base//image", + dirs = { + "/usr/local/share/debugger-app/": [ + [ + # This brings in all the build files. + "//modules/canvaskit:canvaskit", + "0644", + ], + [ + "//modules/canvaskit:version.js", + "0644", + ], + ], + }, + entrypoint = "/usr/local/bin/debugger-app", + repository = "skia-public/debugger-app-final", +) diff --git a/infra/debugger-app/Makefile b/infra/debugger-app/Makefile new file mode 100644 index 000000000000..d220733ecdfb --- /dev/null +++ b/infra/debugger-app/Makefile @@ -0,0 +1,12 @@ +BAZEL?=bazelisk + +.PHONY: build +build: + $(BAZEL) run //infra/debugger-app:debugger_container \ + --config=debugger_app_container + +# Review section in README.md before running this target +.PHONY: push_debugger_I_am_really_sure +push_debugger_I_am_really_sure: + $(BAZEL) run //infra/debugger-app:push_debugger_container \ + --config=debugger_app_container \ No newline at end of file diff --git a/infra/debugger-app/README.md b/infra/debugger-app/README.md new file mode 100644 index 000000000000..ff75839719f3 --- /dev/null +++ b/infra/debugger-app/README.md @@ -0,0 +1,24 @@ +This directory contains the build rules to create the final Docker image for +the Skia debugger hosted at debugger.skia.org. + +This build rule inserts the necessary Skia artifact (CanvasKit) into an +intermediate Docker image created in the Skia infrastructure repository at +https://skia.googlesource.com/buildbot/+/refs/heads/main/debugger-app/BUILD.bazel. +This final docker image is then uploaded to GCR and deployed to skia.org. + +To manually build a local Docker image: + + make build + +This can then be run locally by: + + docker run -p 8080:8000 -it + +or debugged by: + + docker run -it --entrypoint /bin/sh + +This docker image is automatically built and pushed to GCR by Louhi. If there +is a need to manually push it this can be done as so: + + make push_debugger_I_am_really_sure \ No newline at end of file diff --git a/infra/gcc/Debian10-x86/Dockerfile b/infra/gcc/Debian11-x86/Dockerfile similarity index 93% rename from infra/gcc/Debian10-x86/Dockerfile rename to infra/gcc/Debian11-x86/Dockerfile index e49c4b5f0df7..f475fed82017 100644 --- a/infra/gcc/Debian10-x86/Dockerfile +++ b/infra/gcc/Debian11-x86/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:10-slim +FROM debian:11-slim RUN dpkg --add-architecture i386 && \ apt-get update && apt-get upgrade -y && apt-get install -y \ diff --git a/infra/gcc/Debian10/Dockerfile b/infra/gcc/Debian11/Dockerfile similarity index 75% rename from infra/gcc/Debian10/Dockerfile rename to infra/gcc/Debian11/Dockerfile index babb22064749..46a50855059e 100644 --- a/infra/gcc/Debian10/Dockerfile +++ b/infra/gcc/Debian11/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:10-slim +FROM debian:11-slim RUN apt-get update && apt-get upgrade -y && apt-get install -y \ build-essential \ @@ -7,4 +7,4 @@ RUN apt-get update && apt-get upgrade -y && apt-get install -y \ libglu-dev \ python3 \ && rm -rf /var/lib/apt/lists/* -RUN ln -s /usr/bin/python3 /usr/bin/python \ No newline at end of file +RUN ln -s /usr/bin/python3 /usr/bin/python diff --git a/infra/gcc/Makefile b/infra/gcc/Makefile index f3aa23296821..5e2d9ae29cff 100644 --- a/infra/gcc/Makefile +++ b/infra/gcc/Makefile @@ -1,10 +1,9 @@ +publish_Debian11: + docker build -t gcc-debian11 ./Debian11/ + docker tag gcc-debian11 gcr.io/skia-public/gcc-debian11 + docker push gcr.io/skia-public/gcc-debian11 -publish_Debian10: - docker build -t gcc-debian10 ./Debian10/ - docker tag gcc-debian10 gcr.io/skia-public/gcc-debian10 - docker push gcr.io/skia-public/gcc-debian10 - -publish_Debian10-x86: - docker build -t gcc-debian10-x86 ./Debian10-x86/ - docker tag gcc-debian10-x86 gcr.io/skia-public/gcc-debian10-x86 - docker push gcr.io/skia-public/gcc-debian10-x86 +publish_Debian11-x86: + docker build -t gcc-debian11-x86 ./Debian11-x86/ + docker tag gcc-debian11-x86 gcr.io/skia-public/gcc-debian11-x86 + docker push gcr.io/skia-public/gcc-debian11-x86 diff --git a/modules/canvaskit/BUILD.bazel b/modules/canvaskit/BUILD.bazel index 066a5990abbd..b9ddc2f976b0 100644 --- a/modules/canvaskit/BUILD.bazel +++ b/modules/canvaskit/BUILD.bazel @@ -76,7 +76,7 @@ CK_DEFINES = [ ":enable_runtime_effect_true": ["CK_INCLUDE_RUNTIME_EFFECT=1"], ":enable_runtime_effect_false": [], }) + select({ - "//src/gpu:gl_backend": ["CK_ENABLE_WEBGL"], + "//src/gpu:gl_ganesh": ["CK_ENABLE_WEBGL"], "//conditions:default": [], }) @@ -104,7 +104,7 @@ CK_LINKOPTS = BASE_LINKOPTS + [ "--pre-js", "modules/canvaskit/pathops.js", ] + select({ - "//src/gpu:gl_backend": [ + "//src/gpu:gl_ganesh": [ "--pre-js", "modules/canvaskit/cpu.js", "--pre-js", @@ -170,6 +170,12 @@ CK_LINKOPTS = BASE_LINKOPTS + [ "modules/canvaskit/rt_shader.js", ], ":enable_runtime_effect_false": [], +}) + select({ + "//bazel/common_config_settings:build_for_debugger_true": [ + "--pre-js", + "modules/canvaskit/debugger.js", + ], + "//bazel/common_config_settings:build_for_debugger_false": [], }) + select({ ":include_matrix_js_true": [ "--pre-js", @@ -226,7 +232,10 @@ JS_INTERFACE_FILES = [ "htmlcanvas/preamble.js", "htmlcanvas/radialgradient.js", "htmlcanvas/util.js", -] +] + select({ + "//bazel/common_config_settings:build_for_debugger_true": ["debugger.js"], + "//bazel/common_config_settings:build_for_debugger_false": [], +}) CK_SRCS = [ "canvaskit_bindings.cpp", @@ -243,6 +252,9 @@ CK_SRCS = [ }) + select({ ":enable_skottie_true": ["skottie_bindings.cpp"], ":enable_skottie_false": [], +}) + select({ + "//bazel/common_config_settings:build_for_debugger_true": ["debugger_bindings.cpp"], + "//bazel/common_config_settings:build_for_debugger_false": [], }) CK_COPTS = [ @@ -273,6 +285,11 @@ cc_binary( "//modules/skottie:utils", ], ":enable_skottie_false": [], + }) + select({ + "//bazel/common_config_settings:build_for_debugger_true": [ + "//tools/debugger", + ], + "//bazel/common_config_settings:build_for_debugger_false": [], }), ) @@ -281,6 +298,7 @@ wasm_cc_binary( # Whatever is before the dot will be the name of the output js and wasm, aka "the stem". # https://github.com/emscripten-core/emsdk/blob/82ad00499a42abde16b363239d2bc83bf5d863ab/bazel/emscripten_toolchain/wasm_cc_binary.bzl#L91 cc_target = ":canvaskit.build", + visibility = ["//infra/debugger-app:__pkg__"], ) bool_flag( @@ -347,3 +365,14 @@ karma_test( "//modules/canvaskit/tests/assets:test_assets", ], ) + +genrule( + name = "make version file", + srcs = ["make_version.sh"], + outs = ["version.js"], + cmd = "$< $@", + # This script uses the Git executable, which is not on the remote builders. + # Forcing the execution to be local ensures it will be in the path. + local = True, + visibility = ["//infra:__subpackages__"], +) diff --git a/modules/canvaskit/CHANGELOG.md b/modules/canvaskit/CHANGELOG.md index 95caebb06247..1e1debb56cac 100644 --- a/modules/canvaskit/CHANGELOG.md +++ b/modules/canvaskit/CHANGELOG.md @@ -6,12 +6,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added +- `ImageFilter.getOutputBounds` returns the adjusted bounds of a rect after + applying the `ImageFilter`. +- `Picture.cullRect` which gives approximate bounds of the draw commands in the + picture. +- `Picture.approximateBytesUsed` which returns an approximation of the bytes + used to store this picture. This size does not include large objects like + images. + - `FontMgr.matchFamilyStyle` finds the closest matching typeface to the specified familyName and style. +- `Paint.setBlender` Sets the current blender. +- `Blender.Mode` Create a blender that implements the specified BlendMode. +- `RuntimeEffect.MakeForBlender` Compiles a RuntimeEffect from the given blender code. + ### Fixed - `EmbindObject` has been updated to allow TypeScript to differentiate between opaque types such as Shader, ColorFilter, et cetera. ### Changed - `MakeSWCanvasSurface` now allows passing an `OffscreenCanvas` element. +- `Picture.beginRecording` takes an optional `computeBounds` boolean argument + which, when true, will cause the resulting recorded picture to compute a + more accurate `cullRect` when it is created. ## [0.38.2] - 2023-06-09 diff --git a/modules/canvaskit/canvaskit_bindings.cpp b/modules/canvaskit/canvaskit_bindings.cpp index fb7c3a09ecf2..b49ae0e6f1af 100644 --- a/modules/canvaskit/canvaskit_bindings.cpp +++ b/modules/canvaskit/canvaskit_bindings.cpp @@ -8,7 +8,9 @@ #include "include/android/SkAnimatedImage.h" #include "include/codec/SkAndroidCodec.h" #include "include/codec/SkEncodedImageFormat.h" +#include "include/core/SkBBHFactory.h" #include "include/core/SkBlendMode.h" +#include "include/core/SkBlender.h" #include "include/core/SkBlurTypes.h" #include "include/core/SkCanvas.h" #include "include/core/SkColor.h" @@ -85,6 +87,7 @@ #ifdef CK_ENABLE_WEBGL #include "include/gpu/GrBackendSurface.h" #include "include/gpu/GrTypes.h" +#include "include/gpu/ganesh/gl/GrGLBackendSurface.h" #include "include/gpu/gl/GrGLInterface.h" #include "include/gpu/gl/GrGLTypes.h" #include "src/gpu/RefCntedCallback.h" @@ -214,7 +217,7 @@ sk_sp MakeOnScreenGLSurface(sk_sp dContext, int widt const auto colorSettings = ColorSettings(colorSpace); info.fFormat = colorSettings.pixFormat; - GrBackendRenderTarget target(width, height, sampleCnt, stencil, info); + auto target = GrBackendRenderTargets::MakeGL(width, height, sampleCnt, stencil, info); sk_sp surface(SkSurfaces::WrapBackendRenderTarget(dContext.get(), target, kBottomLeft_GrSurfaceOrigin, @@ -905,7 +908,10 @@ class WebGLTextureImageGenerator : public GrExternalTextureGenerator { glInfo.fFormat = GR_GL_RGBA8; glInfo.fTarget = GR_GL_TEXTURE_2D; - GrBackendTexture backendTexture(fInfo.width(), fInfo.height(), mipmapped, glInfo); + auto backendTexture = GrBackendTextures::MakeGL(fInfo.width(), + fInfo.height(), + mipmapped, + glInfo); // In order to bind the image source to the texture, makeTexture has changed which // texture is "in focus" for the WebGL context. @@ -1084,6 +1090,10 @@ EMSCRIPTEN_BINDINGS(Skia) { return SkScalarFloorToInt(self.getBounds().width()); })); + class_("Blender") + .smart_ptr>("sk_sp") + .class_function("Mode", &SkBlender::Mode); + class_("Canvas") .constructor<>() .constructor() @@ -1497,6 +1507,15 @@ EMSCRIPTEN_BINDINGS(Skia) { self.getFamilyName(index, &s); return emscripten::val(s.c_str()); })) + .function("matchFamilyStyle", optional_override([](SkFontMgr& self, std::string name, emscripten::val jsFontStyle)->sk_sp { + auto weight = SkFontStyle::Weight(jsFontStyle["weight"].isUndefined() ? SkFontStyle::kNormal_Weight : jsFontStyle["weight"].as()); + auto width = SkFontStyle::Width(jsFontStyle["width"].isUndefined() ? SkFontStyle::kNormal_Width : jsFontStyle["width"].as()); + auto slant = SkFontStyle::Slant(jsFontStyle["slant"].isUndefined() ? SkFontStyle::kUpright_Slant : static_cast(jsFontStyle["slant"].as())); + + SkFontStyle style(weight, width, slant); + + return self.matchFamilyStyle(name.c_str(), style); + }), allow_raw_pointers()) #ifdef SK_DEBUG .function("dumpFamilies", optional_override([](SkFontMgr& self) { int numFam = self.countFamilies(); @@ -1587,6 +1606,12 @@ EMSCRIPTEN_BINDINGS(Skia) { class_("ImageFilter") .smart_ptr>("sk_sp") + .function("_getOutputBounds", optional_override([](const SkImageFilter& self, WASMPointerF32 bPtr, WASMPointerF32 mPtr, WASMPointerU32 oPtr)->void { + SkRect* rect = reinterpret_cast(bPtr); + OptionalMatrix ctm(mPtr); + SkIRect* output = reinterpret_cast(oPtr); + output[0] = self.filterBounds(ctm.mapRect(*rect).roundOut(), ctm, SkImageFilter::kForward_MapDirection); + })) .class_function("MakeBlend", optional_override([](SkBlendMode mode, sk_sp background, sk_sp foreground)->sk_sp { return SkImageFilters::Blend(mode, background, foreground); @@ -1698,6 +1723,7 @@ EMSCRIPTEN_BINDINGS(Skia) { .function("setAntiAlias", &SkPaint::setAntiAlias) .function("setAlphaf", &SkPaint::setAlphaf) .function("setBlendMode", &SkPaint::setBlendMode) + .function("setBlender", &SkPaint::setBlender) .function("_setColor", optional_override([](SkPaint& self, WASMPointerF32 cPtr, sk_sp colorSpace) { self.setColor(ptrToSkColor4f(cPtr), colorSpace.get()); @@ -1880,12 +1906,14 @@ EMSCRIPTEN_BINDINGS(Skia) { #endif ; + static SkRTreeFactory bbhFactory; class_("PictureRecorder") .constructor<>() .function("_beginRecording", optional_override([](SkPictureRecorder& self, - WASMPointerF32 fPtr) -> SkCanvas* { + WASMPointerF32 fPtr, + bool computeBounds) -> SkCanvas* { SkRect* bounds = reinterpret_cast(fPtr); - return self.beginRecording(*bounds, nullptr); + return self.beginRecording(*bounds, computeBounds ? &bbhFactory : nullptr); }), allow_raw_pointers()) .function("finishRecordingAsPicture", optional_override([](SkPictureRecorder& self) -> sk_sp { @@ -1901,6 +1929,12 @@ EMSCRIPTEN_BINDINGS(Skia) { SkRect* tileRect = reinterpret_cast(rPtr); return self.makeShader(tmx, tmy, mode, &localMatrix, tileRect); }), allow_raw_pointers()) + .function("_cullRect", optional_override([](SkPicture& self, + WASMPointerF32 fPtr)->void { + SkRect* output = reinterpret_cast(fPtr); + output[0] = self.cullRect(); + })) + .function("approximateBytesUsed", &SkPicture::approximateBytesUsed) #ifdef CK_SERIALIZE_SKP // The serialized format of an SkPicture (informally called an "skp"), is not something // that clients should ever rely on. The format may change at anytime and no promises @@ -2082,6 +2116,17 @@ EMSCRIPTEN_BINDINGS(Skia) { } return effect; })) + .class_function("_MakeForBlender", optional_override([](std::string sksl, + emscripten::val errHandler + )->sk_sp { + SkString s(sksl.c_str(), sksl.length()); + auto [effect, errorText] = SkRuntimeEffect::MakeForBlender(s); + if (!effect) { + errHandler.call("onError", val(errorText.c_str())); + return nullptr; + } + return effect; + })) #ifdef SKSL_ENABLE_TRACING .class_function("MakeTraced", optional_override([]( sk_sp shader, @@ -2135,6 +2180,21 @@ EMSCRIPTEN_BINDINGS(Skia) { delete[] children; return s; })) + .function("_makeBlender", optional_override([](SkRuntimeEffect& self, + WASMPointerF32 fPtr, + size_t fLen, + bool shouldOwnUniforms)->sk_sp { + void* uniformData = reinterpret_cast(fPtr); + castUniforms(uniformData, fLen, self); + sk_sp uniforms; + if (shouldOwnUniforms) { + uniforms = SkData::MakeFromMalloc(uniformData, fLen); + } else { + uniforms = SkData::MakeWithoutCopy(uniformData, fLen); + } + + return self.makeBlender(uniforms, {}); + })) .function("getUniformCount", optional_override([](SkRuntimeEffect& self)->int { return self.uniforms().size(); })) @@ -2187,7 +2247,7 @@ EMSCRIPTEN_BINDINGS(Skia) { auto releaseCtx = new TextureReleaseContext{webglHandle, texHandle}; GrGLTextureInfo gti = {GR_GL_TEXTURE_2D, texHandle, GR_GL_RGBA8}; // TODO(kjlubick) look at ii for this - GrBackendTexture gbt(ii.width, ii.height, skgpu::Mipmapped::kNo, gti); + auto gbt = GrBackendTextures::MakeGL(ii.width, ii.height, skgpu::Mipmapped::kNo, gti); auto dContext = GrAsDirectContext(self.getCanvas()->recordingContext()); return SkImages::BorrowTextureFrom(dContext, diff --git a/modules/canvaskit/compile.sh b/modules/canvaskit/compile.sh index f9d8ecb6781b..443a7f8c4592 100755 --- a/modules/canvaskit/compile.sh +++ b/modules/canvaskit/compile.sh @@ -152,7 +152,7 @@ if [[ $@ == *enable_debugger* ]]; then DEBUGGER_ENABLED="true" fi -GN_SHAPER="skia_use_icu=true skia_use_client_icu=false skia_use_system_icu=false skia_use_harfbuzz=true skia_use_system_harfbuzz=false" +GN_SHAPER="skia_use_icu=true skia_use_client_icu=false skia_use_libgrapheme=false skia_use_system_icu=false skia_use_harfbuzz=true skia_use_system_harfbuzz=false" if [[ $@ == *primitive_shaper* ]] || [[ $@ == *no_font* ]]; then echo "Using the primitive shaper instead of the harfbuzz/icu one" GN_SHAPER="skia_use_icu=false skia_use_harfbuzz=false" @@ -241,6 +241,7 @@ echo "Compiling" skia_use_wuffs=true \ skia_use_zlib=true \ skia_enable_ganesh=${ENABLE_GANESH} \ + skia_enable_sksl=${ENABLE_RT_SHADER} \ skia_build_for_debugger=${DEBUGGER_ENABLED} \ skia_enable_sksl_tracing=${ENABLE_SKSL_TRACE} \ \ diff --git a/modules/canvaskit/compile_gm.sh b/modules/canvaskit/compile_gm.sh index 68b482d3946b..e8ccb4c53c32 100755 --- a/modules/canvaskit/compile_gm.sh +++ b/modules/canvaskit/compile_gm.sh @@ -57,7 +57,7 @@ GM_LIB="$BUILD_DIR/libgm_wasm.a" GN_FONT="skia_enable_fontmgr_custom_directory=false " BUILTIN_FONT="$BASE_DIR/fonts/NotoMono-Regular.ttf.cpp" # Generate the font's binary file (which is covered by .gitignore) -python tools/embed_resources.py \ +python3 tools/embed_resources.py \ --name SK_EMBEDDED_FONTS \ --input $BASE_DIR/fonts/NotoMono-Regular.ttf \ --output $BASE_DIR/fonts/NotoMono-Regular.ttf.cpp \ @@ -175,8 +175,7 @@ GLOBIGNORE+="tests/CodecTest.cpp:"\ "tests/FontationsTest.cpp:"\ "tests/FCITest.cpp:"\ "tests/JpegGainmapTest.cpp:"\ -"tests/TypefaceMacTest.cpp:"\ -"tests/SkVMTest.cpp:" +"tests/TypefaceMacTest.cpp:" # These tests do complex things with TestContexts, which is not easily supported for the WASM # test harness. Thus we omit them. @@ -192,7 +191,9 @@ GLOBIGNORE+="tests/GrThreadSafeCacheTest.cpp" # These are not tests GLOBIGNORE+="tests/BazelNoopRunner.cpp:"\ -"tests/BazelTestRunner.cpp" +"tests/BazelTestRunner.cpp:"\ +"gm/BazelGMRunner.cpp:"\ +"gm/BazelNoopRunner.cpp" # Emscripten prefers that the .a files go last in order, otherwise, it # may drop symbols that it incorrectly thinks aren't used. One day, diff --git a/modules/canvaskit/debugger_bindings.cpp b/modules/canvaskit/debugger_bindings.cpp index a8b74f00f74b..85ec96651b42 100644 --- a/modules/canvaskit/debugger_bindings.cpp +++ b/modules/canvaskit/debugger_bindings.cpp @@ -97,7 +97,11 @@ class SkpDebugPlayer { } else { SkDebugf("Try reading as single-frame skp\n"); // TODO(nifong): Rely on SkPicture's return errors once it provides some. - frames.push_back(loadSingleFrame(&stream)); + std::unique_ptr canvas = loadSingleFrame(&stream); + if (!canvas) { + return "Error loading single frame"; + } + frames.push_back(std::move(canvas)); } return ""; } @@ -132,7 +136,9 @@ class SkpDebugPlayer { auto* canvas = surface->getCanvas(); canvas->clear(SK_ColorTRANSPARENT); frames[fp]->draw(surface->getCanvas()); - surface->getCanvas()->flush(); +#ifdef CK_ENABLE_WEBGL + skgpu::ganesh::Flush(surface); +#endif } // Gets the bounds for the given frame @@ -165,31 +171,31 @@ class SkpDebugPlayer { // However, there's not a simple way to make the debugcanvases pull settings from a central // location so we set it on all of them at once. void setOverdrawVis(bool on) { - for (int i=0; i < frames.size(); i++) { + for (size_t i=0; i < frames.size(); i++) { frames[i]->setOverdrawViz(on); } fLayerManager->setOverdrawViz(on); } void setGpuOpBounds(bool on) { - for (int i=0; i < frames.size(); i++) { + for (size_t i=0; i < frames.size(); i++) { frames[i]->setDrawGpuOpBounds(on); } fLayerManager->setDrawGpuOpBounds(on); } void setClipVizColor(JSColor color) { - for (int i=0; i < frames.size(); i++) { + for (size_t i=0; i < frames.size(); i++) { frames[i]->setClipVizColor(SkColor(color)); } fLayerManager->setClipVizColor(SkColor(color)); } void setAndroidClipViz(bool on) { - for (int i=0; i < frames.size(); i++) { + for (size_t i=0; i < frames.size(); i++) { frames[i]->setAndroidClipViz(on); } // doesn't matter in layers } void setOriginVisible(bool on) { - for (int i=0; i < frames.size(); i++) { + for (size_t i=0; i < frames.size(); i++) { frames[i]->setOriginVisible(on); } } diff --git a/modules/canvaskit/externs.js b/modules/canvaskit/externs.js index ab6c4b63a1eb..57b96f370058 100644 --- a/modules/canvaskit/externs.js +++ b/modules/canvaskit/externs.js @@ -110,6 +110,10 @@ var CanvasKit = { _size: function() {}, }, + Blender: { + Mode: function() {}, + }, + GrDirectContext: { // public API (from webgl.js) prototype: { @@ -211,6 +215,7 @@ var CanvasKit = { RuntimeEffect: { // public API (from JS bindings) Make: function() {}, + MakeForBlender: function() {}, getUniform: function() {}, getUniformCount: function() {}, getUniformFloatCount: function() {}, @@ -218,11 +223,14 @@ var CanvasKit = { prototype: { makeShader: function() {}, makeShaderWithChildren: function() {}, + makeBlender: function() {}, }, // private API (from C++ bindings) _Make: function() {}, + _MakeForBlender: function() {}, _makeShader: function() {}, _makeShaderWithChildren: function() {}, + _makeBlender: function() {}, }, ParagraphStyle: function() {}, @@ -420,6 +428,7 @@ var CanvasKit = { FromData: function() {}, countFamilies: function() {}, getFamilyName: function() {}, + matchFamilyStyle: function() {}, // private API _makeTypefaceFromData: function() {}, @@ -476,7 +485,12 @@ var CanvasKit = { MakeMatrixTransform: function() {}, MakeOffset: function() {}, + prototype: { + getOutputBounds: function() {}, + }, + // private API + _getOutputBounds: function() {}, _MakeDropShadow: function() {}, _MakeDropShadowOnly: function() {}, _MakeImageCubic: function() {}, @@ -533,6 +547,7 @@ var CanvasKit = { getStrokeWidth: function() {}, setAntiAlias: function() {}, setBlendMode: function() {}, + setBlender: function() {}, setColorInt: function() {}, setDither: function() {}, setImageFilter: function() {}, @@ -676,10 +691,13 @@ var CanvasKit = { Picture: { serialize: function() {}, + approximateByteSize: function() {}, prototype: { makeShader: function() {}, + cullRect: function () {}, }, _makeShader: function() {}, + _cullRect: function () {}, }, PictureRecorder: { diff --git a/modules/canvaskit/gm_bindings.cpp b/modules/canvaskit/gm_bindings.cpp index 0b0b405278df..4e425ff7c732 100644 --- a/modules/canvaskit/gm_bindings.cpp +++ b/modules/canvaskit/gm_bindings.cpp @@ -43,7 +43,7 @@ using namespace emscripten; static JSArray ListGMs() { SkDebugf("Listing GMs\n"); JSArray gms = emscripten::val::array(); - for (skiagm::GMFactory fact : skiagm::GMRegistry::Range()) { + for (const skiagm::GMFactory& fact : skiagm::GMRegistry::Range()) { std::unique_ptr gm(fact()); SkDebugf("gm %s\n", gm->getName()); gms.call("push", std::string(gm->getName())); @@ -52,7 +52,7 @@ static JSArray ListGMs() { } static std::unique_ptr getGMWithName(std::string name) { - for (skiagm::GMFactory fact : skiagm::GMRegistry::Range()) { + for (const skiagm::GMFactory& fact : skiagm::GMRegistry::Range()) { std::unique_ptr gm(fact()); if (gm->getName() == name) { return gm; diff --git a/modules/canvaskit/interface.js b/modules/canvaskit/interface.js index b3d0a38dea1a..2bb888d36123 100644 --- a/modules/canvaskit/interface.js +++ b/modules/canvaskit/interface.js @@ -873,6 +873,18 @@ CanvasKit.onRuntimeInitialized = function() { return ta.slice(); }; + CanvasKit.ImageFilter.prototype.getOutputBounds = function (drawBounds, ctm, optionalOutputArray) { + var bPtr = copyRectToWasm(drawBounds, _scratchFourFloatsAPtr); + var mPtr = copy3x3MatrixToWasm(ctm); + this._getOutputBounds(bPtr, mPtr, _scratchIRectPtr); + var ta = _scratchIRect['toTypedArray'](); + if (optionalOutputArray) { + optionalOutputArray.set(ta); + return optionalOutputArray; + } + return ta.slice(); + }; + CanvasKit.ImageFilter.MakeDropShadow = function(dx, dy, sx, sy, color, input) { var cPtr = copyColorToWasm(color, _scratchColorPtr); return CanvasKit.ImageFilter._MakeDropShadow(dx, dy, sx, sy, cPtr, input); @@ -961,9 +973,26 @@ CanvasKit.onRuntimeInitialized = function() { return this._makeShader(tmx, tmy, mode, mPtr, rPtr); }; - CanvasKit.PictureRecorder.prototype.beginRecording = function(bounds) { + // Clients can pass in a Float32Array with length 4 to this and the results + // will be copied into that array. Otherwise, a new TypedArray will be allocated + // and returned. + CanvasKit.Picture.prototype.cullRect = function (optionalOutputArray) { + this._cullRect(_scratchFourFloatsAPtr); + var ta = _scratchFourFloatsA['toTypedArray'](); + if (optionalOutputArray) { + optionalOutputArray.set(ta); + return optionalOutputArray; + } + return ta.slice(); + }; + + // `bounds` is a required argument and is the initial cullRect for the picture. + // `computeBounds` is an optional boolean argument (default false) which, if + // true, will cause the recorded picture to compute a more accurate cullRect + // when it is created. + CanvasKit.PictureRecorder.prototype.beginRecording = function (bounds, computeBounds) { var bPtr = copyRectToWasm(bounds); - return this._beginRecording(bPtr); + return this._beginRecording(bPtr, !!computeBounds); }; CanvasKit.Surface.prototype.getCanvas = function() { diff --git a/modules/canvaskit/make_version.sh b/modules/canvaskit/make_version.sh new file mode 100755 index 000000000000..e2ee879fb7a0 --- /dev/null +++ b/modules/canvaskit/make_version.sh @@ -0,0 +1,29 @@ +#!/bin/bash -e + +# Copyright 2023 Google LLC +# +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# Write the SKIA_VERSION to a JavaScript file. + +if [ "$1" == "" ] +then + echo "Must supply output version.js file path." >&2 + exit 1 +fi + +GIT="git" +if test -f "/cipd/bin/git"; then + # The `cd` Docker image includes git at this location. If present use it. + # This image us used when building this target via Louhi. + GIT="/cipd/bin/git" +fi + +SCRIPT_DIR=$(dirname $(realpath $0)) +VERSION_JS_PATH=$1 +GIT_REVISION=$($GIT -C ${SCRIPT_DIR} rev-parse HEAD) +OUTPUT_DIR=$(dirname ${VERSION_JS_PATH}) + +mkdir -p $(dirname ${VERSION_JS_PATH}) +echo "const SKIA_VERSION = '${GIT_REVISION}';" > ${VERSION_JS_PATH} diff --git a/modules/canvaskit/memory.js b/modules/canvaskit/memory.js index df0ba6bd50b9..36ed8902b398 100644 --- a/modules/canvaskit/memory.js +++ b/modules/canvaskit/memory.js @@ -393,4 +393,4 @@ function copyIRectFromWasm(rectMalloc, outputArray) { // passed into ptr, callers do NOT need to free the returned pointer. function copyRRectToWasm(twelveFloats, ptr) { return copy1dArray(twelveFloats, 'HEAPF32', ptr || _scratchRRectPtr); -} \ No newline at end of file +} diff --git a/modules/canvaskit/npm_build/types/canvaskit-wasm-tests.ts b/modules/canvaskit/npm_build/types/canvaskit-wasm-tests.ts index c4478bc65d47..d16083979ff7 100644 --- a/modules/canvaskit/npm_build/types/canvaskit-wasm-tests.ts +++ b/modules/canvaskit/npm_build/types/canvaskit-wasm-tests.ts @@ -700,6 +700,8 @@ function pictureTests(CK: CanvasKit) { const canvas = recorder.beginRecording(CK.LTRBRect(0, 0, 100, 100)); // $ExpectType Canvas const pic = recorder.finishRecordingAsPicture(); // $ExpectType SkPicture const bytes = pic.serialize(); // $ExpectType Uint8Array | null + const cullRect = pic.cullRect(); // $ExpectType Float32Array + const approxBytesUsed = pic.approximateBytesUsed(); // $ExpectType number const pic2 = CK.MakePicture(bytes!); const shader1 = pic2!.makeShader(CK.TileMode.Clamp, CK.TileMode.Decal, CK.FilterMode.Nearest); const shader2 = pic2!.makeShader(CK.TileMode.Clamp, CK.TileMode.Decal, CK.FilterMode.Nearest, diff --git a/modules/canvaskit/npm_build/types/index.d.ts b/modules/canvaskit/npm_build/types/index.d.ts index 29c8a7248bb7..600e1d6c4cd1 100644 --- a/modules/canvaskit/npm_build/types/index.d.ts +++ b/modules/canvaskit/npm_build/types/index.d.ts @@ -460,6 +460,7 @@ export interface CanvasKit { // Factories, i.e. things made with CanvasKit.Foo.MakeTurboEncabulator() readonly ParagraphBuilder: ParagraphBuilderFactory; + readonly Blender: BlenderFactory; readonly ColorFilter: ColorFilterFactory; readonly FontCollection: FontCollectionFactory; readonly FontMgr: FontMgrFactory; @@ -1141,6 +1142,7 @@ export interface ParagraphStyle { textDirection?: TextDirection; textHeightBehavior?: TextHeightBehavior; textStyle?: TextStyle; + applyRoundingHack?: boolean; } export interface PositionWithAffinity { @@ -1201,6 +1203,11 @@ export interface AnimatedImage extends EmbindObject<"AnimatedImage"> { width(): number; } +/** + * See SkBlender.h for more on this class. The objects are opaque. + */ +export type Blender = EmbindObject<"Blender">; + /** * See SkCanvas.h for more information on this class. */ @@ -1919,6 +1926,11 @@ export interface FontMgr extends EmbindObject<"FontMgr"> { * @param index */ getFamilyName(index: number): string; + + /** + * Find the closest matching typeface to the specified familyName and style. + */ + matchFamilyStyle(name: string, style: FontStyle): Typeface; } /** @@ -2010,7 +2022,21 @@ export interface Image extends EmbindObject<"Image"> { /** * See ImageFilter.h for more on this class. The objects are opaque. */ -export type ImageFilter = EmbindObject<"ImageFilter">; +export interface ImageFilter extends EmbindObject<"ImageFilter"> { + /** + * Returns an IRect that is the updated bounds of inputRect after this + * filter has been applied. + * + * @param drawBounds - The local (pre-transformed) bounding box of the + * geometry being drawn _before_ the filter is applied. + * @param ctm - If provided, the current transform at the time the filter + * would be used. + * @param outputRect - If provided, the result will be output to this array + * rather than allocating a new one. + * @returns an IRect describing the updated bounds. + */ + getOutputBounds(drawBounds: Rect, ctm?: InputMatrix, outputRect?: IRect): IRect; +} export interface ImageInfo { alphaType: AlphaType; @@ -2103,6 +2129,18 @@ export interface Paint extends EmbindObject<"Paint"> { */ setBlendMode(mode: BlendMode): void; + /** + * Sets the current blender, increasing its refcnt, and if a blender is already + * present, decreasing that object's refcnt. + * + * * A nullptr blender signifies the default SrcOver behavior. + * + * * For convenience, you can call setBlendMode() if the blend effect can be expressed + * as one of those values. + * @param blender + */ + setBlender(blender: Blender): void; + /** * Sets alpha and RGB used when stroking and filling. The color is four floating * point values, unpremultiplied. The color values are interpreted as being in @@ -2685,6 +2723,18 @@ export interface SkPicture extends EmbindObject<"SkPicture"> { makeShader(tmx: TileMode, tmy: TileMode, mode: FilterMode, localMatrix?: InputMatrix, tileRect?: InputRect): Shader; + /** + * Return the bounding area for the Picture. + * @param outputArray - if provided, the bounding box will be copied into this array instead of + * allocating a new one. + */ + cullRect(outputArray?: Rect): Rect; + + /** + * Returns the approximate byte size. Does not include large objects. + */ + approximateBytesUsed() : number; + /** * Returns the serialized format of this SkPicture. The format may change at anytime and * no promises are made for backwards or forward compatibility. @@ -2697,8 +2747,11 @@ export interface PictureRecorder extends EmbindObject<"PictureRecorder"> { * Returns a canvas on which to draw. When done drawing, call finishRecordingAsPicture() * * @param bounds - a rect to cull the results. + * @param computeBounds - Optional boolean (default false) which tells the + * recorder to compute a more accurate bounds for the + * cullRect of the picture. */ - beginRecording(bounds: InputRect): Canvas; + beginRecording(bounds: InputRect, computeBounds?: boolean): Canvas; /** * Returns the captured draw commands as a picture and invalidates the canvas returned earlier. @@ -2710,6 +2763,12 @@ export interface PictureRecorder extends EmbindObject<"PictureRecorder"> { * See SkRuntimeEffect.h for more details. */ export interface RuntimeEffect extends EmbindObject<"RuntimeEffect"> { + /** + * Returns a shader executed using the given uniform data. + * @param uniforms + */ + makeBlender(uniforms: Float32Array | number[] | MallocObj): Blender; + /** * Returns a shader executed using the given uniform data. * @param uniforms @@ -3047,7 +3106,7 @@ export interface TonalColorsOutput { spot: Color; } -export interface TypefaceFontProvider extends EmbindObject<"TypefaceFontProvider"> { +export interface TypefaceFontProvider extends FontMgr { /** * Registers a given typeface with the given family name (ignoring whatever name the * typface has for itself). @@ -3323,6 +3382,17 @@ export interface Matrix4x4Helpers { transpose(matrix: Matrix4x4 | number[]): number[]; } + /** + * For more information, see SkBlender.h. + */ +export interface BlenderFactory { + /** + * Create a blender that implements the specified BlendMode. + * @param mode + */ + Mode(mode: BlendMode): Blender; +} + export interface ParagraphBuilderFactory { /** * Creates a ParagraphBuilder using the fonts available from the given font manager. @@ -3777,6 +3847,14 @@ export interface RuntimeEffectFactory { */ Make(sksl: string, callback?: (err: string) => void): RuntimeEffect | null; + /** + * Compiles a RuntimeEffect from the given blender code. + * @param sksl - Source code for a blender written in SkSL + * @param callback - will be called with any compilation error. If not provided, errors will + * be printed to console.log(). + */ + MakeForBlender(sksl: string, callback?: (err: string) => void): RuntimeEffect | null; + /** * Adds debug tracing to an existing RuntimeEffect. * @param shader - An already-assembled shader, created with RuntimeEffect.makeShader. diff --git a/modules/canvaskit/paragraph.js b/modules/canvaskit/paragraph.js index 15800d737840..96c4a7dfa6b3 100644 --- a/modules/canvaskit/paragraph.js +++ b/modules/canvaskit/paragraph.js @@ -74,6 +74,7 @@ s['textDirection'] = s['textDirection'] || CanvasKit.TextDirection.LTR; s['textHeightBehavior'] = s['textHeightBehavior'] || CanvasKit.TextHeightBehavior.All; s['textStyle'] = CanvasKit.TextStyle(s['textStyle']); + s['applyRoundingHack'] = s['applyRoundingHack'] !== false; return s; }; diff --git a/modules/canvaskit/paragraph_bindings.cpp b/modules/canvaskit/paragraph_bindings.cpp index 51f676145bbe..fdba992bec30 100644 --- a/modules/canvaskit/paragraph_bindings.cpp +++ b/modules/canvaskit/paragraph_bindings.cpp @@ -246,6 +246,7 @@ struct SimpleParagraphStyle { para::TextHeightBehavior textHeightBehavior; SimpleTextStyle textStyle; SimpleStrutStyle strutStyle; + bool applyRoundingHack; }; para::ParagraphStyle toParagraphStyle(const SimpleParagraphStyle& s) { @@ -271,6 +272,7 @@ para::ParagraphStyle toParagraphStyle(const SimpleParagraphStyle& s) { if (s.maxLines != 0) { ps.setMaxLines(s.maxLines); } + ps.setApplyRoundingHack(s.applyRoundingHack); ps.setTextHeightBehavior(s.textHeightBehavior); ps.setReplaceTabCharacters(s.replaceTabCharacters); return ps; @@ -711,7 +713,8 @@ EMSCRIPTEN_BINDINGS(Paragraph) { .field("textDirection", &SimpleParagraphStyle::textDirection) .field("textHeightBehavior", &SimpleParagraphStyle::textHeightBehavior) .field("textStyle", &SimpleParagraphStyle::textStyle) - .field("strutStyle", &SimpleParagraphStyle::strutStyle); + .field("strutStyle", &SimpleParagraphStyle::strutStyle) + .field("applyRoundingHack", &SimpleParagraphStyle::applyRoundingHack); value_object("StrutStyle") .field("_fontFamiliesPtr", &SimpleStrutStyle::fontFamiliesPtr) diff --git a/modules/canvaskit/rt_shader.js b/modules/canvaskit/rt_shader.js index a78789ddb450..8e99f1146fe8 100644 --- a/modules/canvaskit/rt_shader.js +++ b/modules/canvaskit/rt_shader.js @@ -15,6 +15,20 @@ CanvasKit._extraInitializations.push(function() { return CanvasKit.RuntimeEffect._Make(sksl, callbackObj); }; + // sksl is the blender code. + // errorCallback is a function that will be called with an error string if the + // effect cannot be made. If not provided, the error will be logged. + CanvasKit.RuntimeEffect.MakeForBlender = function(sksl, errorCallback) { + // The easiest way to pass a function into C++ code is to wrap it in an object and + // treat it as an emscripten::val on the other side. + var callbackObj = { + 'onError': errorCallback || function(err) { + console.log('RuntimeEffect error', err); + }, + }; + return CanvasKit.RuntimeEffect._MakeForBlender(sksl, callbackObj); + }; + CanvasKit.RuntimeEffect.prototype.makeShader = function(floats, localMatrix) { // If the uniforms were set in a MallocObj, we don't want the shader to take ownership of // them (and free the memory when the shader is freed). @@ -45,4 +59,12 @@ CanvasKit._extraInitializations.push(function() { return this._makeShaderWithChildren(fptr, floats.length * 4, shouldOwnUniforms, childrenPointers, barePointers.length, localMatrixPtr); } + + CanvasKit.RuntimeEffect.prototype.makeBlender = function(floats) { + // If the uniforms were set in a MallocObj, we don't want the shader to take ownership of + // them (and free the memory when the blender is freed). + var shouldOwnUniforms = !floats['_ck']; + var fptr = copy1dArray(floats, 'HEAPF32'); + return this._makeBlender(fptr, floats.length * 4, shouldOwnUniforms); + } }); diff --git a/modules/canvaskit/tests/core_test.js b/modules/canvaskit/tests/core_test.js index b60d15208249..02a5da2e8a4a 100644 --- a/modules/canvaskit/tests/core_test.js +++ b/modules/canvaskit/tests/core_test.js @@ -17,7 +17,7 @@ describe('Core canvas behavior', () => { gm('picture_test', (canvas) => { const spr = new CanvasKit.PictureRecorder(); const bounds = CanvasKit.LTRBRect(0, 0, 400, 120); - const rcanvas = spr.beginRecording(bounds); + const rcanvas = spr.beginRecording(bounds, true); const paint = new CanvasKit.Paint(); paint.setStrokeWidth(2.0); paint.setAntiAlias(true); @@ -29,6 +29,13 @@ describe('Core canvas behavior', () => { const font = new CanvasKit.Font(null, 20); rcanvas.drawText('this picture has a round rect', 5, 100, paint, font); const pic = spr.finishRecordingAsPicture(); + const cullRect = pic.cullRect(); + const approxBytesUsed = pic.approximateBytesUsed(); + expect(approxBytesUsed).toBeGreaterThan(0); + expect(cullRect[0]).toBeCloseTo(0); + expect(cullRect[1]).toBeCloseTo(31); + expect(cullRect[2]).toBeCloseTo(357.84); + expect(cullRect[3]).toBeCloseTo(109.42); spr.delete(); paint.delete(); @@ -728,6 +735,15 @@ describe('Core canvas behavior', () => { paint.delete(); }); + it('can compute ImageFilter filterBounds', () => { + const blurIF = CanvasKit.ImageFilter.MakeBlur(5, 10, CanvasKit.TileMode.Clamp, null); + const updatedBounds = blurIF.getOutputBounds(CanvasKit.LTRBRect(50, 50, 100, 100)); + expect(updatedBounds[0]).toEqual(35); + expect(updatedBounds[1]).toEqual(20); + expect(updatedBounds[2]).toEqual(115); + expect(updatedBounds[3]).toEqual(130); + }); + gm('blur_filters', (canvas) => { const pathUL = starPath(CanvasKit, 100, 100, 80); const pathBR = starPath(CanvasKit, 400, 300, 80); diff --git a/modules/canvaskit/tests/font_test.js b/modules/canvaskit/tests/font_test.js index 59c4c4e8dfac..03b2afe63d3e 100644 --- a/modules/canvaskit/tests/font_test.js +++ b/modules/canvaskit/tests/font_test.js @@ -200,6 +200,15 @@ describe('Font Behavior', () => { if (fontMgr.dumpFamilies) { fontMgr.dumpFamilies(); } + + const font1 = fontMgr.matchFamilyStyle(fontMgr.getFamilyName(0), {}); + expect(font1).toBeTruthy(); + + const font2 = fontMgr.matchFamilyStyle(fontMgr.getFamilyName(1), { width: 5, weight: 400 }); + expect(font2).toBeTruthy(); + + font1.delete(); + font2.delete(); fontMgr.delete(); }); diff --git a/modules/canvaskit/tests/paragraph_test.js b/modules/canvaskit/tests/paragraph_test.js index 73cfe460f6f7..c21e7c00e0fc 100644 --- a/modules/canvaskit/tests/paragraph_test.js +++ b/modules/canvaskit/tests/paragraph_test.js @@ -707,6 +707,35 @@ describe('Paragraph Behavior', function() { fontMgr.delete(); }); + it('paragraph_rounding_hack', () => { + const paraStyleDefault = new CanvasKit.ParagraphStyle({ + textStyle: { + fontFamilies: ['Noto Serif'], + fontSize: 20, + fontStyle: { + weight: CanvasKit.FontWeight.Light, + } + }, + textDirection: CanvasKit.TextDirection.RTL, + disableHinting: true, + }); + expect(paraStyleDefault.applyRoundingHack).toEqual(true); + + const paraStyleOverride = new CanvasKit.ParagraphStyle({ + textStyle: { + fontFamilies: ['Noto Serif'], + fontSize: 20, + fontStyle: { + weight: CanvasKit.FontWeight.Light, + } + }, + textDirection: CanvasKit.TextDirection.RTL, + disableHinting: true, + applyRoundingHack: false, + }); + expect(paraStyleOverride.applyRoundingHack).toEqual(false); + }); + gm('paragraph_font_provider', (canvas) => { const paint = new CanvasKit.Paint(); diff --git a/modules/canvaskit/tests/rtshader_test.js b/modules/canvaskit/tests/rtshader_test.js index 716ce5828ad8..0e6782bab12a 100644 --- a/modules/canvaskit/tests/rtshader_test.js +++ b/modules/canvaskit/tests/rtshader_test.js @@ -243,4 +243,74 @@ half4 main(float2 xy) { it('apply a local matrix to the children-based shader', (done) => { testChildrenShader('rtshader_children_rotated', done, CanvasKit.Matrix.rotated(Math.PI/12)); }); + + it('can generate runtime blender', (done) => { + const loadBrick = fetch( + '/assets/brickwork-texture.jpg') + .then((response) => response.arrayBuffer()); + const loadMandrill = fetch( + '/assets/mandrill_512.png') + .then((response) => response.arrayBuffer()); + Promise.all([loadBrick, loadMandrill]).then((values) => { + catchException(done, () => { + const screenSkSL = ` + vec4 main(vec4 src, vec4 dst) { + return src + dst - src * dst; + } + `; + + const [brickData, mandrillData] = values; + const brickImg = CanvasKit.MakeImageFromEncoded(brickData); + expect(brickImg) + .withContext('brick image could not be loaded') + .toBeTruthy(); + const mandrillImg = CanvasKit.MakeImageFromEncoded(mandrillData); + expect(mandrillImg) + .withContext('mandrill image could not be loaded') + .toBeTruthy(); + + const brickShader = brickImg.makeShaderCubic( + CanvasKit.TileMode.Decal, CanvasKit.TileMode.Decal, + 1/3 /*B*/, 1/3 /*C*/, + CanvasKit.Matrix.scaled(CANVAS_WIDTH/brickImg.width(), + CANVAS_HEIGHT/brickImg.height())); + const mandrillShader = mandrillImg.makeShaderCubic( + CanvasKit.TileMode.Decal, CanvasKit.TileMode.Decal, + 1/3 /*B*/, 1/3 /*C*/, + CanvasKit.Matrix.scaled(CANVAS_WIDTH/mandrillImg.width(), + CANVAS_HEIGHT/mandrillImg.height())); + + const surface = CanvasKit.MakeCanvasSurface('test'); + expect(surface) + .withContext('Could not make surface') + .toBeTruthy(); + const canvas = surface.getCanvas(); + const paint = new CanvasKit.Paint(); + + const screenEffect = CanvasKit.RuntimeEffect.MakeForBlender(screenSkSL); + expect(screenEffect) + .withContext('could not compile program') + .toBeTruthy(); + expect(screenEffect.getUniformCount() ).toEqual(0); + expect(screenEffect.getUniformFloatCount()).toEqual(0); + const screenBlender = screenEffect.makeBlender([]); + + paint.setShader(brickShader); + canvas.drawRect(CanvasKit.LTRBRect(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT), paint); + paint.setShader(mandrillShader); + paint.setBlender(screenBlender); + canvas.drawRect(CanvasKit.LTRBRect(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT), paint); + + brickImg.delete(); + mandrillImg.delete(); + brickShader.delete(); + mandrillShader.delete(); + paint.delete(); + screenBlender.delete(); + screenEffect.delete(); + + reportSurface(surface, 'rtblender', done); + })(); + }); + }); }); diff --git a/modules/jetski/src/Surface.cpp b/modules/jetski/src/Surface.cpp index 66d9aabc4c68..d69260475b55 100644 --- a/modules/jetski/src/Surface.cpp +++ b/modules/jetski/src/Surface.cpp @@ -10,6 +10,7 @@ #include #include "include/gpu/ganesh/SkSurfaceGanesh.h" +#include "include/core/SkPicture.h" #include "tools/window/DisplayParams.h" #include "tools/window/android/WindowContextFactory_android.h" diff --git a/modules/jetski/src/SurfaceThread.cpp b/modules/jetski/src/SurfaceThread.cpp index 2e252dd4c103..a5b76fda238e 100644 --- a/modules/jetski/src/SurfaceThread.cpp +++ b/modules/jetski/src/SurfaceThread.cpp @@ -11,6 +11,7 @@ #include "tools/window/android/WindowContextFactory_android.h" #include "include/core/SkCanvas.h" +#include "include/core/SkPicture.h" #include "include/core/SkTypes.h" SurfaceThread::SurfaceThread() { diff --git a/modules/skcms/README.chromium b/modules/skcms/README.chromium index 046f6b1d195c..15543c64fd57 100644 --- a/modules/skcms/README.chromium +++ b/modules/skcms/README.chromium @@ -2,4 +2,5 @@ Name: skcms URL: https://skia.org/ Version: unknown Security Critical: yes +Shipped: yes License: BSD diff --git a/modules/skcms/skcms.cc b/modules/skcms/skcms.cc index 3940c0ab9aa3..2d7f506f27b8 100644 --- a/modules/skcms/skcms.cc +++ b/modules/skcms/skcms.cc @@ -81,6 +81,9 @@ static float logf_(float x) { } static float exp2f_(float x) { + if (x > 128.0f) { + return INFINITY_; + } float fract = x - floorf_(x); float fbits = (1.0f * (1<<23)) * (x + 121.274057500f @@ -2158,7 +2161,7 @@ static bool fit_nonlinear(const skcms_Curve* curve, int L, int N, skcms_Transfer tf->e = tf->c*tf->d + tf->f - powf_(tf->a*tf->d + tf->b, tf->g); - return true; + return isfinitef_(tf->e); }; if (!fixup_tf()) { diff --git a/modules/skcms/version.sha1 b/modules/skcms/version.sha1 index 00c68a88f48e..5cc1bfbae1f0 100755 --- a/modules/skcms/version.sha1 +++ b/modules/skcms/version.sha1 @@ -1 +1 @@ -6140cf9c51a5b636b25af28571e3086595ed47c8 +1323db7bd0b43b2b4d90aebc0cd4ba6409f689de diff --git a/modules/skottie/BUILD.bazel b/modules/skottie/BUILD.bazel index 272675218848..e89fff607a0e 100644 --- a/modules/skottie/BUILD.bazel +++ b/modules/skottie/BUILD.bazel @@ -69,7 +69,7 @@ cc_binary_with_flags( set_flags = { "enable_gpu_test_utils": ["True"], "fontmgr_factory": ["custom_directory_fontmgr_factory"], - "gpu_backend": ["gl_backend"], + "gpu_backend": ["gl_ganesh"], "include_decoder": [ "jpeg_decode_codec", "png_decode_codec", diff --git a/modules/skottie/include/Skottie.h b/modules/skottie/include/Skottie.h index a63c55853f9b..75189039f591 100644 --- a/modules/skottie/include/Skottie.h +++ b/modules/skottie/include/Skottie.h @@ -15,6 +15,7 @@ #include "include/core/SkTypes.h" #include "modules/skottie/include/ExternalLayer.h" #include "modules/skottie/include/SkottieProperty.h" +#include "modules/skottie/include/SlotManager.h" #include "modules/skresources/include/SkResources.h" #include @@ -162,6 +163,11 @@ class SK_API Animation : public SkNVRefCnt { sk_sp make(const char* data, size_t length); sk_sp makeFromFile(const char path[]); + /** + * Get handle for SlotManager after animation is built. + */ + const sk_sp& getSlotManager() const {return fSlotManager;} + private: const uint32_t fFlags; @@ -172,6 +178,7 @@ class SK_API Animation : public SkNVRefCnt { sk_sp fMarkerObserver; sk_sp fPrecompInterceptor; sk_sp fExpressionManager; + sk_sp fSlotManager; Stats fStats; }; diff --git a/modules/skottie/include/SlotManager.h b/modules/skottie/include/SlotManager.h index 9430b3226e69..95bb5d36a9f3 100644 --- a/modules/skottie/include/SlotManager.h +++ b/modules/skottie/include/SlotManager.h @@ -11,8 +11,11 @@ #include "include/core/SkColor.h" #include "include/core/SkString.h" #include "include/private/base/SkTArray.h" +#include "modules/skottie/src/SkottieValue.h" #include "src/core/SkTHash.h" +#include + namespace skjson { class ObjectValue; } @@ -26,10 +29,13 @@ class Node; } namespace skottie { +struct TextPropertyValue; + namespace internal { class AnimationBuilder; class SceneGraphRevalidator; class AnimatablePropertyContainer; +class TextAdapter; } // namespace internal using namespace skia_private; @@ -42,34 +48,37 @@ class SK_API SlotManager final : public SkRefCnt { SlotManager(sk_sp); ~SlotManager() override; - void setColorSlot(SlotID, SkColor); - void setImageSlot(SlotID, sk_sp); - void setScalarSlot(SlotID, SkScalar); - //TODO: surface Text value options + bool setColorSlot(SlotID, SkColor); + bool setImageSlot(SlotID, sk_sp); + bool setScalarSlot(SlotID, float); + bool setVec2Slot(SlotID, SkV2); + bool setTextSlot(SlotID, TextPropertyValue&); - SkColor getColorSlot(SlotID) const; + std::optional getColorSlot(SlotID) const; sk_sp getImageSlot(SlotID) const; - SkScalar getScalarSlot(SlotID) const; + std::optional getScalarSlot(SlotID) const; + std::optional getVec2Slot(SlotID) const; + std::optional getTextSlot(SlotID) const; struct SlotInfo { - SlotID slotID; - int type; + TArray fColorSlotIDs; + TArray fScalarSlotIDs; + TArray fVec2SlotIDs; + TArray fImageSlotIDs; + TArray fTextSlotIDs; }; // Helper function to get all slot IDs and their value types - const TArray& getSlotInfo() const { return fSlotInfos; } + SlotInfo getSlotInfo() const; private: // pass value to the SlotManager for manipulation and node for invalidation - void trackColorValue(SlotID, SkColor*, sk_sp); - sk_sp trackImageValue(SlotID, sk_sp, - sk_sp); - void trackScalarValue(SlotID, SkScalar*, sk_sp); - void trackScalarValue(SlotID, SkScalar*, sk_sp); - - TArray fSlotInfos; - + void trackColorValue(SlotID, ColorValue*, sk_sp); + sk_sp trackImageValue(SlotID, sk_sp); + void trackScalarValue(SlotID, ScalarValue*, sk_sp); + void trackVec2Value(SlotID, Vec2Value*, sk_sp); + void trackTextValue(SlotID, sk_sp); // ValuePair tracks a pointer to a value to change, and a means to invalidate the render tree. // For the latter, we can take either a node in the scene graph that directly the scene graph, @@ -80,29 +89,23 @@ class SK_API SlotManager final : public SkRefCnt { struct ValuePair { T value; - sk_sp node; sk_sp adapter; - - ValuePair(T _value, sk_sp _node, - sk_sp _adapter) { - value = std::move(_value); - node = std::move(_node); - adapter = _adapter; - SkASSERT(!node != !adapter); - } }; class ImageAssetProxy; template - using SlotMap = THashMap>>; + using SlotMap = THashMap>; - SlotMap fColorMap; - SlotMap fScalarMap; - SlotMap> fImageMap; + SlotMap> fColorMap; + SlotMap> fScalarMap; + SlotMap> fVec2Map; + SlotMap> fImageMap; + SlotMap> fTextMap; const sk_sp fRevalidator; friend class skottie::internal::AnimationBuilder; + friend class skottie::internal::AnimatablePropertyContainer; }; } // namespace skottie diff --git a/modules/skottie/src/Skottie.cpp b/modules/skottie/src/Skottie.cpp index 33ef85a7bd97..801a8575576f 100644 --- a/modules/skottie/src/Skottie.cpp +++ b/modules/skottie/src/Skottie.cpp @@ -92,7 +92,6 @@ class OpacityAdapter final : public DiscardableAdapterBasenode()->setOpacity(fOpacity * 0.01f); } @@ -112,7 +111,7 @@ sk_sp AnimationBuilder::attachOpacity(const skjson::ObjectValu if (adapter->isStatic()) { adapter->seek(0); } - auto dispatched = this->dispatchOpacityProperty(adapter->node(), jobject["o"], adapter); + auto dispatched = this->dispatchOpacityProperty(adapter->node()); if (adapter->isStatic()) { if (!dispatched && adapter->node()->getOpacity() >= 1) { // No obeservable effects - we can discard. @@ -167,7 +166,7 @@ AnimationBuilder::AnimationInfo AnimationBuilder::parse(const skjson::ObjectValu fRevalidator->setRoot(root); fRevalidator->revalidate(); - return { std::move(root), std::move(animators) }; + return { std::move(root), std::move(animators), std::move(fSlotManager)}; } void AnimationBuilder::parseAssets(const skjson::ArrayValue* jassets) { @@ -211,17 +210,8 @@ void AnimationBuilder::dispatchMarkers(const skjson::ArrayValue* jmarkers) const } } -bool AnimationBuilder::dispatchColorProperty(const sk_sp& c, - const skjson::ObjectValue* jcolor) const { +bool AnimationBuilder::dispatchColorProperty(const sk_sp& c) const { bool dispatched = false; - - if (jcolor) { - if (const skjson::StringValue* slotID = (*jcolor)["sid"]) { - fSlotManager->trackColorValue(SkString(slotID->begin()), &(c->fColor), c); - dispatched = true; - } - } - if (fPropertyObserver) { const char * node_name = fPropertyObserverContext; fPropertyObserver->onColorProperty(node_name, @@ -234,19 +224,9 @@ bool AnimationBuilder::dispatchColorProperty(const sk_sp& c, return dispatched; } -bool AnimationBuilder::dispatchOpacityProperty(const sk_sp& o, - const skjson::ObjectValue* jopacity, - const sk_sp adapter) const { +bool AnimationBuilder::dispatchOpacityProperty(const sk_sp& o) const { bool dispatched = false; - if (jopacity) { - if (const skjson::StringValue* slotID = (*jopacity)["sid"]) { - fSlotManager->trackScalarValue(SkString(slotID->begin()), &(adapter->fOpacity), - adapter); - dispatched = true; - } - } - if (fPropertyObserver) { fPropertyObserver->onOpacityProperty(fPropertyObserverContext, [&]() { @@ -262,14 +242,15 @@ bool AnimationBuilder::dispatchTextProperty(const sk_sp& t, const skjson::ObjectValue* jtext) const { bool dispatched = false; - if (fPropertyObserver) { - const char * node_name = fPropertyObserverContext; - if (jtext) { - if (const skjson::StringValue* slotID = (*jtext)["sid"]) { - node_name = slotID->begin(); - } + if (jtext) { + if (const skjson::StringValue* slotID = (*jtext)["sid"]) { + fSlotManager->trackTextValue(SkString(slotID->begin()), t); + dispatched = true; } - fPropertyObserver->onTextProperty(node_name, + } + + if (fPropertyObserver) { + fPropertyObserver->onTextProperty(fPropertyObserverContext, [&]() { dispatched = true; return std::make_unique(t, fRevalidator); @@ -423,6 +404,8 @@ sk_sp Animation::Builder::make(const char* data, size_t data_len) { &fStats, size, duration, fps, fFlags); auto ainfo = builder.parse(json); + fSlotManager = ainfo.fSlotManager; + const auto t2 = std::chrono::steady_clock::now(); fStats.fSceneParseTimeMS = std::chrono::duration{t2-t1}.count(); fStats.fTotalLoadTimeMS = std::chrono::duration{t2-t0}.count(); diff --git a/modules/skottie/src/SkottieJson.cpp b/modules/skottie/src/SkottieJson.cpp index e5ab8cf12ddf..7cee8c5ec4db 100644 --- a/modules/skottie/src/SkottieJson.cpp +++ b/modules/skottie/src/SkottieJson.cpp @@ -128,4 +128,13 @@ bool Parse(const Value& v, VectorValue* vec) { return true; } +const skjson::StringValue* ParseSlotID(const skjson::ObjectValue* jobj) { + if (jobj) { + if (const skjson::StringValue* sid = (*jobj)["sid"]) { + return sid; + } + } + return nullptr; +} + } // namespace skottie diff --git a/modules/skottie/src/SkottieJson.h b/modules/skottie/src/SkottieJson.h index 0844137cd195..3d75ad4d916c 100644 --- a/modules/skottie/src/SkottieJson.h +++ b/modules/skottie/src/SkottieJson.h @@ -29,6 +29,8 @@ T ParseDefault(const skjson::Value& v, const T& defaultValue) { return res; } +const skjson::StringValue* ParseSlotID(const skjson::ObjectValue* jobj); + } // namespace skottie #endif // SkottieJson_DEFINED diff --git a/modules/skottie/src/SkottiePriv.h b/modules/skottie/src/SkottiePriv.h index 33f953c77cf8..e6be395d190f 100644 --- a/modules/skottie/src/SkottiePriv.h +++ b/modules/skottie/src/SkottiePriv.h @@ -72,6 +72,7 @@ class AnimationBuilder final : public SkNoncopyable { struct AnimationInfo { sk_sp fSceneRoot; AnimatorScope fAnimators; + sk_sp fSlotManager; }; AnimationInfo parse(const skjson::ObjectValue&); @@ -183,11 +184,8 @@ class AnimationBuilder final : public SkNoncopyable { const PropertyObserver::NodeType fNodeType; }; - bool dispatchColorProperty(const sk_sp&, - const skjson::ObjectValue* jcolor = nullptr) const; - bool dispatchOpacityProperty(const sk_sp&, - const skjson::ObjectValue* jopacity, - const sk_sp) const; + bool dispatchColorProperty(const sk_sp&) const; + bool dispatchOpacityProperty(const sk_sp&) const; bool dispatchTextProperty(const sk_sp&, const skjson::ObjectValue* jtext) const; bool dispatchTransformProperty(const sk_sp&) const; @@ -202,6 +200,7 @@ class AnimationBuilder final : public SkNoncopyable { friend class CompositionBuilder; friend class CustomFont; friend class LayerBuilder; + friend class AnimatablePropertyContainer; struct AttachLayerContext; struct AttachShapeContext; diff --git a/modules/skottie/src/SkottieTool.cpp b/modules/skottie/src/SkottieTool.cpp index c7a7c6c93e67..957ef05283b7 100644 --- a/modules/skottie/src/SkottieTool.cpp +++ b/modules/skottie/src/SkottieTool.cpp @@ -7,6 +7,7 @@ #include "include/core/SkCanvas.h" #include "include/core/SkGraphics.h" +#include "include/core/SkPicture.h" #include "include/core/SkPictureRecorder.h" #include "include/core/SkStream.h" #include "include/core/SkSurface.h" @@ -424,7 +425,7 @@ extern bool gSkUseThreadLocalStrikeCaches_IAcknowledgeThisIsIncrediblyExperiment int main(int argc, char** argv) { gSkUseThreadLocalStrikeCaches_IAcknowledgeThisIsIncrediblyExperimental = true; CommandLineFlags::Parse(argc, argv); - SkAutoGraphics ag; + SkGraphics::Init(); if (FLAGS_input.isEmpty() || FLAGS_writePath.isEmpty()) { SkDebugf("Missing required 'input' and 'writePath' args.\n"); diff --git a/modules/skottie/src/SkottieValue.h b/modules/skottie/src/SkottieValue.h index 0d389f01f822..5b3d5e99a8f6 100644 --- a/modules/skottie/src/SkottieValue.h +++ b/modules/skottie/src/SkottieValue.h @@ -22,18 +22,28 @@ namespace skottie { using ScalarValue = SkScalar; using Vec2Value = SkV2; -class VectorValue final : public std::vector { +class VectorValue : public std::vector { public: VectorValue() = default; VectorValue(std::initializer_list l) : INHERITED(l) {} operator SkV3() const; +private: + using INHERITED = std::vector; +}; + +class ColorValue final : public VectorValue { +public: + ColorValue() = default; + + ColorValue(std::initializer_list l) : INHERITED(l) {} + operator SkColor() const; operator SkColor4f() const; private: - using INHERITED = std::vector; + using INHERITED = VectorValue; }; class ShapeValue final : public std::vector { diff --git a/modules/skottie/src/SlotManager.cpp b/modules/skottie/src/SlotManager.cpp index e2b7f92384ec..e95a77f8e93f 100644 --- a/modules/skottie/src/SlotManager.cpp +++ b/modules/skottie/src/SlotManager.cpp @@ -8,6 +8,7 @@ #include "include/core/SkImage.h" #include "modules/skottie/include/SlotManager.h" #include "modules/skottie/src/SkottiePriv.h" +#include "modules/skottie/src/text/TextAdapter.h" #include "modules/skresources/include/SkResources.h" class skottie::SlotManager::ImageAssetProxy final : public skresources::ImageAsset { @@ -42,79 +43,144 @@ fRevalidator(revalidator) {} skottie::SlotManager::~SlotManager() = default; -void skottie::SlotManager::setColorSlot(SlotID slotID, SkColor c) { +bool skottie::SlotManager::setColorSlot(SlotID slotID, SkColor c) { + auto c4f = SkColor4f::FromColor(c); + ColorValue v{c4f.fR, c4f.fG, c4f.fB, c4f.fA}; const auto valueGroup = fColorMap.find(slotID); if (valueGroup) { for (auto& cPair : *valueGroup) { - *(cPair.value) = c; - cPair.node->invalidate(); + *(cPair.value) = v; + cPair.adapter->onSync(); } fRevalidator->revalidate(); + return true; } + return false; } -void skottie::SlotManager::setImageSlot(SlotID slotID, sk_sp i) { - const auto valueGroup = fImageMap.find(slotID); - if (valueGroup) { - for (auto& iPair : *valueGroup) { - iPair.value->setImageAsset(i); - iPair.node->invalidate(); +bool skottie::SlotManager::setImageSlot(SlotID slotID, sk_sp i) { + const auto imageGroup = fImageMap.find(slotID); + if (imageGroup) { + for (auto& imageAsset : *imageGroup) { + imageAsset->setImageAsset(i); } fRevalidator->revalidate(); + return true; } + return false; } -void skottie::SlotManager::setScalarSlot(SlotID slotID, SkScalar s) { +bool skottie::SlotManager::setScalarSlot(SlotID slotID, float s) { const auto valueGroup = fScalarMap.find(slotID); if (valueGroup) { for (auto& sPair : *valueGroup) { *(sPair.value) = s; - if (sPair.node) { - sPair.node->invalidate(); - } else if (sPair.adapter) { - sPair.adapter->onSync(); - } + sPair.adapter->onSync(); + } + fRevalidator->revalidate(); + return true; + } + return false; +} + +bool skottie::SlotManager::setVec2Slot(SlotID slotID, SkV2 v) { + const auto valueGroup = fVec2Map.find(slotID); + if (valueGroup) { + for (auto& vPair : *valueGroup) { + *(vPair.value) = v; + vPair.adapter->onSync(); } fRevalidator->revalidate(); + return true; } + return false; } -SkColor skottie::SlotManager::getColorSlot (SlotID slotID) const { +bool skottie::SlotManager::setTextSlot(SlotID slotID, TextPropertyValue& t) { + const auto adapterGroup = fTextMap.find(slotID); + if (adapterGroup) { + for (auto& textAdapter : *adapterGroup) { + textAdapter->setText(t); + } + fRevalidator->revalidate(); + return true; + } + return false; +} + +std::optional skottie::SlotManager::getColorSlot(SlotID slotID) const { const auto valueGroup = fColorMap.find(slotID); - return valueGroup && !valueGroup->empty() ? *(valueGroup->at(0).value) : SK_ColorBLACK; + return valueGroup && !valueGroup->empty() ? std::optional(*(valueGroup->at(0).value)) + : std::nullopt; } -sk_sp skottie::SlotManager::getImageSlot (SlotID slotID) const { - const auto valueGroup = fImageMap.find(slotID); - return valueGroup && !valueGroup->empty() ? valueGroup->at(0).value->getImageAsset() : nullptr; +sk_sp skottie::SlotManager::getImageSlot(SlotID slotID) const { + const auto imageGroup = fImageMap.find(slotID); + return imageGroup && !imageGroup->empty() ? imageGroup->at(0)->getImageAsset() : nullptr; } -SkScalar skottie::SlotManager::getScalarSlot (SlotID slotID) const { +std::optional skottie::SlotManager::getScalarSlot(SlotID slotID) const { const auto valueGroup = fScalarMap.find(slotID); - return valueGroup && !valueGroup->empty() ? *(valueGroup->at(0).value) : -1; + return valueGroup && !valueGroup->empty() ? std::optional(*(valueGroup->at(0).value)) + : std::nullopt; +} +std::optional skottie::SlotManager::getVec2Slot(SlotID slotID) const { + const auto valueGroup = fVec2Map.find(slotID); + return valueGroup && !valueGroup->empty() ? std::optional(*(valueGroup->at(0).value)) + : std::nullopt; } -void skottie::SlotManager::trackColorValue(SlotID slotID, SkColor* colorValue, - sk_sp node) { - fColorMap[slotID].push_back({colorValue, std::move(node), nullptr}); +std::optional skottie::SlotManager::getTextSlot(SlotID slotID) const { + const auto adapterGroup = fTextMap.find(slotID); + return adapterGroup && !adapterGroup->empty() ? + std::optional(adapterGroup->at(0)->getText()) : + std::nullopt; +} + +void skottie::SlotManager::trackColorValue(SlotID slotID, ColorValue* colorValue, + sk_sp adapter) { + fColorMap[slotID].push_back({colorValue, std::move(adapter)}); } sk_sp skottie::SlotManager::trackImageValue(SlotID slotID, sk_sp - imageAsset, - sk_sp node) { + imageAsset) { auto proxy = sk_make_sp(std::move(imageAsset)); - fImageMap[slotID].push_back({proxy, std::move(node), nullptr}); - return std::move(proxy); + fImageMap[slotID].push_back(proxy); + return proxy; } -void skottie::SlotManager::trackScalarValue(SlotID slotID, SkScalar* scalarValue, - sk_sp node) { - fScalarMap[slotID].push_back({scalarValue, std::move(node), nullptr}); +void skottie::SlotManager::trackScalarValue(SlotID slotID, ScalarValue* scalarValue, + sk_sp adapter) { + fScalarMap[slotID].push_back({scalarValue, adapter}); } -void skottie::SlotManager::trackScalarValue(SlotID slotID, SkScalar* scalarValue, - sk_sp adapter) { - fScalarMap[slotID].push_back({scalarValue, nullptr, adapter}); +void skottie::SlotManager::trackVec2Value(SlotID slotID, Vec2Value* vec2Value, + sk_sp adapter) { + fVec2Map[slotID].push_back({vec2Value, adapter}); +} + +void skottie::SlotManager::trackTextValue(SlotID slotID, sk_sp adapter) { + fTextMap[slotID].push_back(std::move(adapter)); +} + +skottie::SlotManager::SlotInfo skottie::SlotManager::getSlotInfo() const { + SlotInfo sInfo; + for (const auto& c : fColorMap) { + sInfo.fColorSlotIDs.push_back(c.first); + } + for (const auto& s : fScalarMap) { + sInfo.fScalarSlotIDs.push_back(s.first); + } + for (const auto& v : fVec2Map) { + sInfo.fVec2SlotIDs.push_back(v.first); + } + for (const auto& i : fImageMap) { + sInfo.fImageSlotIDs.push_back(i.first); + } + for (const auto& t : fTextMap) { + sInfo.fTextSlotIDs.push_back(t.first); + } + return sInfo; } diff --git a/modules/skottie/src/animator/Animator.h b/modules/skottie/src/animator/Animator.h index a979cdc60051..4c6993efb18a 100644 --- a/modules/skottie/src/animator/Animator.h +++ b/modules/skottie/src/animator/Animator.h @@ -17,6 +17,7 @@ struct SkV2; namespace skjson { class ObjectValue; +class StringValue; } // namespace skjson @@ -63,7 +64,7 @@ class AnimatablePropertyContainer : public Animator { const skjson::ObjectValue* jobject, SkV2* v, float* orientation); - bool isStatic() const { return fAnimators.empty(); } + bool isStatic() const { return fAnimators.empty() && !fHasSlotID; } protected: friend class skottie::SlotManager; @@ -80,6 +81,7 @@ class AnimatablePropertyContainer : public Animator { std::vector> fAnimators; bool fHasSynced = false; + bool fHasSlotID = false; }; } // namespace internal diff --git a/modules/skottie/src/animator/ScalarKeyframeAnimator.cpp b/modules/skottie/src/animator/ScalarKeyframeAnimator.cpp index a93b29704ff6..a299bf182755 100644 --- a/modules/skottie/src/animator/ScalarKeyframeAnimator.cpp +++ b/modules/skottie/src/animator/ScalarKeyframeAnimator.cpp @@ -6,6 +6,7 @@ */ #include "modules/skottie/src/SkottieJson.h" +#include "modules/skottie/src/SkottiePriv.h" #include "modules/skottie/src/SkottieValue.h" #include "modules/skottie/src/animator/Animator.h" #include "modules/skottie/src/animator/KeyframeAnimator.h" @@ -108,6 +109,10 @@ template <> bool AnimatablePropertyContainer::bind(const AnimationBuilder& abuilder, const skjson::ObjectValue* jprop, ScalarValue* v) { + if (const auto* sid = ParseSlotID(jprop)) { + fHasSlotID = true; + abuilder.fSlotManager->trackScalarValue(SkString(sid->begin()), v, sk_ref_sp(this)); + } ScalarAnimatorBuilder builder(v); return this->bindImpl(abuilder, jprop, builder); diff --git a/modules/skottie/src/animator/Vec2KeyframeAnimator.cpp b/modules/skottie/src/animator/Vec2KeyframeAnimator.cpp index 4d4a73a585c1..e5ae5944e814 100644 --- a/modules/skottie/src/animator/Vec2KeyframeAnimator.cpp +++ b/modules/skottie/src/animator/Vec2KeyframeAnimator.cpp @@ -8,6 +8,7 @@ #include "include/core/SkContourMeasure.h" #include "include/core/SkPathBuilder.h" #include "modules/skottie/src/SkottieJson.h" +#include "modules/skottie/src/SkottiePriv.h" #include "modules/skottie/src/SkottieValue.h" #include "modules/skottie/src/animator/Animator.h" #include "modules/skottie/src/animator/KeyframeAnimator.h" @@ -248,6 +249,11 @@ bool AnimatablePropertyContainer::bindAutoOrientable(const AnimationBuilder& abu return false; } + if (const auto* sid = ParseSlotID(jprop)) { + fHasSlotID = true; + abuilder.fSlotManager->trackVec2Value(SkString(sid->begin()), v, sk_ref_sp(this)); + } + if (!ParseDefault((*jprop)["s"], false)) { // Regular (static or keyframed) 2D value. Vec2AnimatorBuilder builder(v, orientation); diff --git a/modules/skottie/src/animator/VectorKeyframeAnimator.cpp b/modules/skottie/src/animator/VectorKeyframeAnimator.cpp index 25d4ed277e7d..b42a82a925e3 100644 --- a/modules/skottie/src/animator/VectorKeyframeAnimator.cpp +++ b/modules/skottie/src/animator/VectorKeyframeAnimator.cpp @@ -10,6 +10,7 @@ #include "include/core/SkTypes.h" #include "include/private/base/SkTPin.h" #include "modules/skottie/src/SkottieJson.h" +#include "modules/skottie/src/SkottiePriv.h" #include "modules/skottie/src/SkottieValue.h" #include "modules/skottie/src/animator/Animator.h" #include "src/base/SkSafeMath.h" @@ -44,11 +45,11 @@ VectorValue::operator SkV3() const { }; } -VectorValue::operator SkColor() const { +ColorValue::operator SkColor() const { return static_cast(*this).toSkColor(); } -VectorValue::operator SkColor4f() const { +ColorValue::operator SkColor4f() const { // best effort to turn a vector into a color const auto r = this->size() > 0 ? SkTPin((*this)[0], 0.0f, 1.0f) : 0, g = this->size() > 1 ? SkTPin((*this)[1], 0.0f, 1.0f) : 0, @@ -300,5 +301,16 @@ bool AnimatablePropertyContainer::bind(const AnimationBuilder& abui return boundX || boundY || boundZ; } +template <> +bool AnimatablePropertyContainer::bind(const AnimationBuilder& abuilder, + const skjson::ObjectValue* jprop, + ColorValue* v) { + if (const auto* sid = ParseSlotID(jprop)) { + fHasSlotID = true; + abuilder.fSlotManager->trackColorValue(SkString(sid->begin()), v, sk_ref_sp(this)); + } + return this->bind(abuilder, jprop, static_cast(v)); +} + } // namespace internal } // namespace skottie diff --git a/modules/skottie/src/effects/BulgeEffect.cpp b/modules/skottie/src/effects/BulgeEffect.cpp index 8bac602f6233..bb0cb89fe7a0 100644 --- a/modules/skottie/src/effects/BulgeEffect.cpp +++ b/modules/skottie/src/effects/BulgeEffect.cpp @@ -8,7 +8,9 @@ #include "modules/skottie/src/effects/Effects.h" #include "include/core/SkCanvas.h" +#include "include/core/SkPicture.h" #include "include/core/SkPictureRecorder.h" +#include "include/core/SkTileMode.h" #include "include/effects/SkRuntimeEffect.h" #include "modules/skottie/src/Adapter.h" #include "modules/skottie/src/SkottieValue.h" diff --git a/modules/skottie/src/effects/CCTonerEffect.cpp b/modules/skottie/src/effects/CCTonerEffect.cpp index a1c251bbaf7e..a0945be9f015 100644 --- a/modules/skottie/src/effects/CCTonerEffect.cpp +++ b/modules/skottie/src/effects/CCTonerEffect.cpp @@ -98,7 +98,7 @@ class CCTonerAdapter final : public DiscardableAdapterBase> fColorNodes; ScalarValue fTone = 0; - VectorValue fHighlights, + ColorValue fHighlights, fBrights, fMidtones, fDarktones, diff --git a/modules/skottie/src/effects/DropShadowEffect.cpp b/modules/skottie/src/effects/DropShadowEffect.cpp index 6b9e43ea3bf0..f25476316dbe 100644 --- a/modules/skottie/src/effects/DropShadowEffect.cpp +++ b/modules/skottie/src/effects/DropShadowEffect.cpp @@ -72,7 +72,7 @@ class DropShadowAdapter final : public AnimatablePropertyContainer { const sk_sp fDropShadow; const sk_sp fImageFilterEffect; - VectorValue fColor = { 0, 0, 0, 1 }; + ColorValue fColor = { 0, 0, 0, 1 }; ScalarValue fOpacity = 255, fDirection = 0, fDistance = 0, diff --git a/modules/skottie/src/effects/FillEffect.cpp b/modules/skottie/src/effects/FillEffect.cpp index 1735b3b36a5c..63de32fb8bfd 100644 --- a/modules/skottie/src/effects/FillEffect.cpp +++ b/modules/skottie/src/effects/FillEffect.cpp @@ -50,7 +50,6 @@ class FillAdapter final : public AnimatablePropertyContainer { EffectBinder(jprops, abuilder, this) .bind( kColor_Index, fColor ) .bind(kOpacity_Index, fOpacity); - // TODO: find where sid is placed for Fill Effect placed in Essential Properties abuilder.dispatchColorProperty(fColorNode); } @@ -64,7 +63,7 @@ class FillAdapter final : public AnimatablePropertyContainer { const sk_sp fColorNode; const sk_sp fFilterNode; - VectorValue fColor; + ColorValue fColor; ScalarValue fOpacity = 1; }; diff --git a/modules/skottie/src/effects/GlowStyles.cpp b/modules/skottie/src/effects/GlowStyles.cpp index c7416c562195..81cd89306b14 100644 --- a/modules/skottie/src/effects/GlowStyles.cpp +++ b/modules/skottie/src/effects/GlowStyles.cpp @@ -130,7 +130,7 @@ class GlowAdapter final : public DiscardableAdapterBase fFilterNode; - VectorValue fMapBlackTo, + ColorValue fMapBlackTo, fMapWhiteTo; ScalarValue fAmount = 0; }; diff --git a/modules/skottie/src/effects/TritoneEffect.cpp b/modules/skottie/src/effects/TritoneEffect.cpp index 9125b3f01b27..de05ed873db1 100644 --- a/modules/skottie/src/effects/TritoneEffect.cpp +++ b/modules/skottie/src/effects/TritoneEffect.cpp @@ -65,7 +65,7 @@ class TritoneAdapter final : public AnimatablePropertyContainer { fHiColorNode; const sk_sp fCF; - VectorValue fLoColor, + ColorValue fLoColor, fMiColor, fHiColor; ScalarValue fWeight = 0; diff --git a/modules/skottie/src/layers/FootageLayer.cpp b/modules/skottie/src/layers/FootageLayer.cpp index 29918f12e27a..bb75bf23bf09 100644 --- a/modules/skottie/src/layers/FootageLayer.cpp +++ b/modules/skottie/src/layers/FootageLayer.cpp @@ -111,20 +111,16 @@ AnimationBuilder::loadFootageAsset(const skjson::ObjectValue& defaultJImage) con return cached_info; } - // If a slotID is present, we lose asset_id info during the load call. If this is an issue, we - // will extend the base ResourceProvider and provide a new loadImageAsset call that passes all - // four arguments (path, name, id, slotID) - auto asset = fResourceProvider->loadImageAsset(path->begin(), - name->begin(), - slotID - ? slotID->begin() - : id->begin()); + auto asset = fResourceProvider->loadImageAsset(path->begin(), name->begin(), id->begin()); if (!asset) { this->log(Logger::Level::kError, nullptr, "Could not load image asset: %s/%s (id: '%s').", path->begin(), name->begin(), id->begin()); return nullptr; } + if (slotID) { + asset = fSlotManager->trackImageValue(SkString(slotID->begin()), std::move(asset)); + } const auto size = SkISize::Make(ParseDefault((*jimage)["w"], 0), ParseDefault((*jimage)["h"], 0)); return fImageAssetCache.set(res_id, { std::move(asset), size }); @@ -177,7 +173,7 @@ sk_sp AnimationBuilder::attachFootageAsset(const skjson::Objec if (!image_transform) { // No resize needed. - return std::move(image_node); + return image_node; } return sksg::TransformEffect::Make(std::move(image_node), std::move(image_transform)); diff --git a/modules/skottie/src/layers/PrecompLayer.cpp b/modules/skottie/src/layers/PrecompLayer.cpp index 3ceb3c4c1b5a..c8c08779d314 100644 --- a/modules/skottie/src/layers/PrecompLayer.cpp +++ b/modules/skottie/src/layers/PrecompLayer.cpp @@ -158,7 +158,7 @@ sk_sp AnimationBuilder::attachExternalPrecompLayer( fCurrentAnimatorScope->push_back(sk_make_sp(sg_adapter, fFrameRate)); - return std::move(sg_adapter); + return sg_adapter; } sk_sp AnimationBuilder::attachPrecompLayer(const skjson::ObjectValue& jlayer, diff --git a/modules/skottie/src/layers/SolidLayer.cpp b/modules/skottie/src/layers/SolidLayer.cpp index dd38fdbf0058..c93101609fda 100644 --- a/modules/skottie/src/layers/SolidLayer.cpp +++ b/modules/skottie/src/layers/SolidLayer.cpp @@ -35,7 +35,6 @@ sk_sp AnimationBuilder::attachSolidLayer(const skjson::ObjectV auto solid_paint = sksg::Color::Make(color); solid_paint->setAntiAlias(true); - // TODO: find where the slot id gets placed when marking Solid Layer color as essential this->dispatchColorProperty(solid_paint); return sksg::Draw::Make(sksg::Rect::Make(SkRect::MakeSize(layer_info->fSize)), diff --git a/modules/skottie/src/layers/shapelayer/FillStroke.cpp b/modules/skottie/src/layers/shapelayer/FillStroke.cpp index 317dfd077717..e6bc25dfc6d1 100644 --- a/modules/skottie/src/layers/shapelayer/FillStroke.cpp +++ b/modules/skottie/src/layers/shapelayer/FillStroke.cpp @@ -81,7 +81,7 @@ class FillStrokeAdapter final : public DiscardableAdapterBase ShapeBuilder::AttachColorFill(const skjson::ObjectValue& const AnimationBuilder* abuilder) { auto color_node = sksg::Color::Make(SK_ColorBLACK); auto color_paint = AttachFill(jpaint, abuilder, color_node); - abuilder->dispatchColorProperty(color_node, jpaint["c"]); + abuilder->dispatchColorProperty(color_node); return color_paint; } @@ -161,7 +161,7 @@ sk_sp ShapeBuilder::AttachColorStroke(const skjson::ObjectValue const AnimationBuilder* abuilder) { auto color_node = sksg::Color::Make(SK_ColorBLACK); auto color_paint = AttachStroke(jpaint, abuilder, color_node); - abuilder->dispatchColorProperty(color_node, jpaint["c"]); + abuilder->dispatchColorProperty(color_node); return color_paint; } diff --git a/modules/skottie/src/text/TextAnimator.h b/modules/skottie/src/text/TextAnimator.h index b0fd6420b561..122f5e7861a4 100644 --- a/modules/skottie/src/text/TextAnimator.h +++ b/modules/skottie/src/text/TextAnimator.h @@ -32,8 +32,8 @@ class TextAnimator final : public SkNVRefCnt { // Direct mapping of AE properties. struct AnimatedProps { VectorValue position, - scale = { 100, 100, 100 }, - fill_color, + scale = { 100, 100, 100 }; + ColorValue fill_color, stroke_color; // unlike pos/scale which are animated vectors, rotation is separated in each dimension. SkV3 rotation = { 0, 0, 0 }; diff --git a/modules/skottie/src/text/TextValue.cpp b/modules/skottie/src/text/TextValue.cpp index e159f19ee251..b7bb059ea22a 100644 --- a/modules/skottie/src/text/TextValue.cpp +++ b/modules/skottie/src/text/TextValue.cpp @@ -161,8 +161,8 @@ bool Parse(const skjson::Value& jv, const internal::AnimationBuilder& abuilder, return false; } - VectorValue color_vec; - if (!skottie::Parse(*jcolor, &color_vec)) { + ColorValue color_vec; + if (!skottie::Parse(*jcolor, static_cast(&color_vec))) { return false; } diff --git a/modules/skottie/utils/SkottieUtils.cpp b/modules/skottie/utils/SkottieUtils.cpp index d451559bc710..49ef2339ece6 100644 --- a/modules/skottie/utils/SkottieUtils.cpp +++ b/modules/skottie/utils/SkottieUtils.cpp @@ -255,242 +255,4 @@ sk_sp ExternalAnimationPrecompInterceptor::onLoadPrecomp : nullptr; } -class ImageAssetProxy final : public skresources::ImageAsset { -public: - ImageAssetProxy() {} - - // always returns true in case Image asset is swapped during playback - bool isMultiFrame() override { return true; } - - FrameData getFrameData(float t) override { - if (fImageAsset) { - return fImageAsset->getFrameData(t); - } - return {nullptr , SkSamplingOptions(SkFilterMode::kLinear, SkMipmapMode::kNearest), - SkMatrix::I(), SizeFit::kCenter}; - } - - void setImageAsset (sk_sp asset) { - fImageAsset = std::move(asset); - } -private: - sk_sp fImageAsset; -}; - -/** - * An implementation of ResourceProvider designed for Lottie template asset substitution (images, - * audio, etc) - */ -class SlotManager::SlottableResourceProvider final : public skresources::ResourceProviderProxyBase { -public: - SlottableResourceProvider(std::vector slotInfos, - sk_sp proxy) - : skresources::ResourceProviderProxyBase(std::move(proxy)) { - for (const auto &s : slotInfos) { - if (s.type == SlotType::kImage) { - fImageAssetMap[s.slotID] = sk_make_sp(); - } - } - } - - // This implementation depends on slot ID being passed through id instead of asset ID when slots - // are present - sk_sp loadImageAsset(const char resource_path[], - const char name[], - const char slot_name[]) const override { - const auto it = fImageAssetMap.find(slot_name); - auto imageAssetProxy = it == fImageAssetMap.end() ? nullptr : it->second; - if (fProxy) { - imageAssetProxy->setImageAsset(fProxy->loadImageAsset(resource_path, name, slot_name)); - } - return std::move(imageAssetProxy); - } - -private: - std::unordered_map> fImageAssetMap; - friend class SlotManager; -}; - -/** - * An implementation of PropertyObserver designed for Lottie template property substitution (color, - * text, etc) - * - * PropertyObserver looks for slottable nodes then manipulates their PropertyValue on the fly - * - */ -class SlotManager::SlottablePropertyObserver final : public skottie::PropertyObserver { -public: - SlottablePropertyObserver(std::vector slotInfos, - sk_sp proxy) - : fProxy(proxy) { - for (const auto &s : slotInfos) { - switch (s.type) { - case SlotType::kColor: - fColorMap[s.slotID] = std::vector>(); - break; - case SlotType::kOpacity: - fOpacityMap[s.slotID] = - std::vector>(); - break; - case SlotType::kText: - fTextMap[s.slotID] = std::vector>(); - break; - default: - SkDebugf("Unsupported slot type: %s: %d\n", s.slotID.c_str(), s.type); - break; - } - } - } - - void onColorProperty(const char node_name[], - const LazyHandle& c) override { - if (node_name) { - const auto it = fColorMap.find(node_name); - if (it != fColorMap.end()) { - fColorMap[node_name].push_back(c()); - } - } - if (fProxy) { - fProxy->onColorProperty(node_name, c); - } - } - - void onOpacityProperty(const char node_name[], - const LazyHandle& o) override { - if (node_name) { - const auto it = fOpacityMap.find(node_name); - if (it != fOpacityMap.end()) { - fOpacityMap[node_name].push_back(o()); - } - } - if (fProxy) { - fProxy->onOpacityProperty(node_name, o); - } - } - - void onTextProperty(const char node_name[], - const LazyHandle& t) override { - const auto it = fTextMap.find(node_name); - if (it != fTextMap.end()) { - fTextMap[node_name].push_back(t()); - } - if (fProxy) { - fProxy->onTextProperty(node_name, t); - } - } - - void onTransformProperty(const char node_name[], - const LazyHandle& t) override { - if (fProxy) { - fProxy->onTransformProperty(node_name, t); - } - } - - void onEnterNode(const char node_name[], NodeType node_type) override { - if (fProxy) { - fProxy->onEnterNode(node_name, node_type); - } - } - - void onLeavingNode(const char node_name[], NodeType node_type) override { - if (fProxy) { - fProxy->onLeavingNode(node_name, node_type); - } - } -private: - using SlotID = std::string; - - std::unordered_map>> - fColorMap; - std::unordered_map>> - fOpacityMap; - std::unordered_map>> - fTextMap; - - sk_sp fProxy; - - friend class SlotManager; -}; - -SlotManager::SlotManager(const SkString path, sk_sp rpProxy, - sk_sp poProxy) { - parseSlotIDsFromFileName(path); - fResourceProvider = sk_make_sp(fSlotInfos, rpProxy); - fPropertyObserver = sk_make_sp(fSlotInfos, poProxy); -} - -// TODO: replace with parse from SkData (grab SkData from filename instead) -void SlotManager::parseSlotIDsFromFileName(SkString path) { - if (const auto data = SkData::MakeFromFileName(path.c_str())) { - const skjson::DOM dom(static_cast(data->data()), data->size()); - if (dom.root().is()) { - const auto& json = dom.root().as(); - if (const skjson::ObjectValue* jslots = json["slots"]) { - for (const auto& member : *jslots) { - auto slotID = member.fKey.begin(); - const skjson::ObjectValue* jslot = member.fValue; - int type = skottie::ParseDefault((*jslot)["t"], -1); - fSlotInfos.push_back({slotID, type}); - } - } - } - } -} - -void SlotManager::setColorSlot(std::string slotID, SkColor color) { - const auto it = fPropertyObserver->fColorMap.find(slotID); - if (it != fPropertyObserver->fColorMap.end()) { - for (auto& handle : fPropertyObserver->fColorMap[slotID]) { - handle->set(color); - } - } -} - -void SlotManager::setOpacitySlot(std::string slotID, SkScalar opacity) { - const auto it = fPropertyObserver->fOpacityMap.find(slotID); - if (it != fPropertyObserver->fOpacityMap.end()) { - for (auto& handle : fPropertyObserver->fOpacityMap[slotID]) { - handle->set(opacity); - } - } -} - -void SlotManager::setTextStringSlot(std::string slotID, SkString text) { - const auto it = fPropertyObserver->fTextMap.find(slotID); - if (it != fPropertyObserver->fTextMap.end()) { - for (auto& handle : fPropertyObserver->fTextMap[slotID]) { - auto tVal = handle->get(); - tVal.fText = text; - handle->set(tVal); - } - } -} - -void SlotManager::setImageSlot(std::string slotID, sk_sp img) { - const auto it = fResourceProvider->fImageAssetMap.find(slotID); - if (it != fResourceProvider->fImageAssetMap.end()) { - fResourceProvider->fImageAssetMap[slotID]->setImageAsset(std::move(img)); - } -} - -// forwards onLoad to proxy resource provider -void SlotManager::setImageSlot(std::string slotID, const char path[], const char name[], - const char id[]) { - const auto it = fResourceProvider->fImageAssetMap.find(slotID); - if (it != fResourceProvider->fImageAssetMap.end()) { - fResourceProvider->fImageAssetMap[slotID]->setImageAsset( - fResourceProvider->fProxy - ? fResourceProvider->fProxy->loadImageAsset(path, name, id) - : nullptr); - } -} - -sk_sp SlotManager::getResourceProvider() const { - return fResourceProvider; -} - -sk_sp SlotManager::getPropertyObserver() const { - return fPropertyObserver; -} - } // namespace skottie_utils diff --git a/modules/skottie/utils/SkottieUtils.h b/modules/skottie/utils/SkottieUtils.h index 2bcf03b07754..e6b4edc6531e 100644 --- a/modules/skottie/utils/SkottieUtils.h +++ b/modules/skottie/utils/SkottieUtils.h @@ -126,52 +126,6 @@ class ExternalAnimationPrecompInterceptor final : public skottie::PrecompInterce const SkString fPrefix; }; -enum SlotType { - // properties - kColor = 1, - kOpacity = 4, - // assets - kImage = 50, - // text - kText = 99, -}; - -/** - * Helper class to wrap a Skottie focused implementation of ResourceProvider and PropertyObserver - * to help manage 'slots' (properties and assets intended by the author to be swapped). - */ -class SlotManager final : public SkRefCnt { - -public: - SlotManager(const SkString, sk_sp = nullptr, - sk_sp = nullptr); - - void setColorSlot(std::string, SkColor); - void setOpacitySlot(std::string, SkScalar); - void setTextStringSlot(std::string, SkString); - void setImageSlot(std::string, sk_sp); - void setImageSlot(std::string, const char[], const char[], const char[]); - - struct SlotInfo { - std::string slotID; - int type; - }; - - const std::vector& getSlotInfo() const { return fSlotInfos; } - sk_sp getResourceProvider() const; - sk_sp getPropertyObserver() const; - -private: - class SlottableResourceProvider; - class SlottablePropertyObserver; - - std::vector fSlotInfos; - sk_sp fResourceProvider; - sk_sp fPropertyObserver; - - void parseSlotIDsFromFileName(SkString path); -}; - } // namespace skottie_utils #endif // SkottieUtils_DEFINED diff --git a/modules/skparagraph/BUILD.gn b/modules/skparagraph/BUILD.gn index 22579e854518..e7ec2abf564d 100644 --- a/modules/skparagraph/BUILD.gn +++ b/modules/skparagraph/BUILD.gn @@ -51,7 +51,7 @@ if (skia_enable_skparagraph && skia_enable_skshaper && skia_enable_skunicode && } skia_source_set("gm") { - if (paragraph_gms_enabled && skia_use_icu) { + if (paragraph_gms_enabled && (skia_use_icu || skia_use_libgrapheme)) { testonly = true sources = [ "gm/simple_gm.cpp" ] deps = [ @@ -66,7 +66,7 @@ if (skia_enable_skparagraph && skia_enable_skshaper && skia_enable_skunicode && } skia_source_set("tests") { - if (paragraph_tests_enabled && skia_use_icu) { + if (paragraph_tests_enabled && (skia_use_icu || skia_use_libgrapheme)) { testonly = true sources = skparagraph_tests deps = [ @@ -82,7 +82,7 @@ if (skia_enable_skparagraph && skia_enable_skshaper && skia_enable_skunicode && } skia_source_set("bench") { - if (paragraph_bench_enabled && skia_use_icu) { + if (paragraph_bench_enabled && (skia_use_icu || skia_use_libgrapheme)) { testonly = true sources = [ "bench/ParagraphBench.cpp" ] deps = [ @@ -96,7 +96,7 @@ if (skia_enable_skparagraph && skia_enable_skshaper && skia_enable_skunicode && } skia_source_set("slides") { - if (skia_use_icu) { + if (skia_use_icu || skia_use_libgrapheme) { testonly = true sources = [ "slides/ParagraphSlide.cpp" ] deps = [ diff --git a/modules/skparagraph/include/Paragraph.h b/modules/skparagraph/include/Paragraph.h index 3595d2ecec13..62d5ab6aacf3 100644 --- a/modules/skparagraph/include/Paragraph.h +++ b/modules/skparagraph/include/Paragraph.h @@ -2,6 +2,7 @@ #ifndef Paragraph_DEFINED #define Paragraph_DEFINED +#include "include/core/SkPath.h" #include "modules/skparagraph/include/FontCollection.h" #include "modules/skparagraph/include/Metrics.h" #include "modules/skparagraph/include/ParagraphStyle.h" @@ -97,6 +98,50 @@ class Paragraph { using Visitor = std::function; virtual void visit(const Visitor&) = 0; + struct ExtendedVisitorInfo { + const SkFont& font; + SkPoint origin; + SkSize advance; + int count; + const uint16_t* glyphs; // count values + SkPoint* positions; // count values + const SkRect* bounds; // count values + const uint32_t* utf8Starts; // count+1 values + unsigned flags; + }; + using ExtendedVisitor = std::function; + virtual void extendedVisit(const ExtendedVisitor&) = 0; + + /* Returns path for a given line + * + * @param lineNumber a line number + * @param dest a resulting path + * @return a number glyphs that could not be converted to path + */ + virtual int getPath(int lineNumber, SkPath* dest) = 0; + + /* Returns path for a text blob + * + * @param textBlob a text blob + * @return a path + */ + static SkPath GetPath(SkTextBlob* textBlob); + + /* Checks if a given text blob contains + * glyph with emoji + * + * @param textBlob a text blob + * @return true if there is such a glyph + */ + virtual bool containsEmoji(SkTextBlob* textBlob) = 0; + + /* Checks if a given text blob contains colored font or bitmap + * + * @param textBlob a text blob + * @return true if there is such a glyph + */ + virtual bool containsColorFontOrBitmap(SkTextBlob* textBlob) = 0; + // Editing API virtual int getLineNumberAt(TextIndex codeUnitIndex) const = 0; diff --git a/modules/skparagraph/include/ParagraphStyle.h b/modules/skparagraph/include/ParagraphStyle.h index 5139571ddb0b..98ec228ffb71 100644 --- a/modules/skparagraph/include/ParagraphStyle.h +++ b/modules/skparagraph/include/ParagraphStyle.h @@ -124,6 +124,9 @@ struct ParagraphStyle { bool getReplaceTabCharacters() const { return fReplaceTabCharacters; } void setReplaceTabCharacters(bool value) { fReplaceTabCharacters = value; } + bool getApplyRoundingHack() const { return fApplyRoundingHack; } + void setApplyRoundingHack(bool value) { fApplyRoundingHack = value; } + private: StrutStyle fStrutStyle; TextStyle fDefaultTextStyle; @@ -136,6 +139,7 @@ struct ParagraphStyle { TextHeightBehavior fTextHeightBehavior; bool fHintingIsOn; bool fReplaceTabCharacters; + bool fApplyRoundingHack = true; }; } // namespace textlayout } // namespace skia diff --git a/modules/skparagraph/slides/ParagraphSlide.cpp b/modules/skparagraph/slides/ParagraphSlide.cpp index f9b0a97be6ae..4ea6cbdd3a8e 100644 --- a/modules/skparagraph/slides/ParagraphSlide.cpp +++ b/modules/skparagraph/slides/ParagraphSlide.cpp @@ -1372,7 +1372,7 @@ class Zalgo { private: std::u16string COMBINING_DOWN = u"\u0316\u0317\u0318\u0319\u031c\u031d\u031e\u031f\u0320\u0324\u0325\u0326\u0329\u032a\u032b\u032c\u032d\u032e\u032f\u0330\u0331\u0332\u0333\u0339\u033a\u033b\u033c\u0345\u0347\u0348\u0349\u034d\u034e\u0353\u0354\u0355\u0356\u0359\u035a\u0323"; std::u16string COMBINING_UP = u"\u030d\u030e\u0304\u0305\u033f\u0311\u0306\u0310\u0352\u0357\u0351\u0307\u0308\u030a\u0342\u0343\u0344\u034a\u034b\u034c\u0303\u0302\u030c\u0350\u0300\u0301\u030b\u030f\u0312\u0313\u0314\u033d\u0309\u0363\u0364\u0365\u0366\u0367\u0368\u0369\u036a\u036b\u036c\u036d\u036e\u035b\u0346\u031a"; - std::u16string COMBINING_MIDDLE = u"\u0315\u031b\u0340\u0341\u0358\u0321\u0322\u0327\u0328\u0334\u0335\u0336\u034f\u035c\u035d\u035e\u035f\u0360\u0362\u0338\u0337\u0361\u0363"; + std::u16string COMBINING_MIDDLE = u"\u0315\u031b\u0340\u0341\u0358\u0321\u0322\u0327\u0328\u0334\u0335\u0336\u034f\u035c\u035d\u035e\u035f\u0360\u0362\u0338\u0337\u0361\u0489"; std::u16string randomMarks(std::u16string& combiningMarks) { std::u16string result; @@ -1508,7 +1508,7 @@ class ParagraphSlide19 : public ParagraphSlide_Base { auto fontCollection = sk_make_sp(GetResourcePath("fonts").c_str(), false, true); - std::u16string text = u"\u0068\u0301\u0350\u0312\u0357\u030C\u0369\u0305\u036C\u0304\u0310\u033F\u0366\u0350\u0343\u0364\u0369\u0311\u0309\u030E\u0365\u031B\u0340\u0337\u0335\u035E\u0334\u0328\u0360\u0360\u0315\u035F\u0340\u0340\u0362\u0360\u0322\u031B\u031B\u0337\u0340\u031E\u031F\u032A\u0331\u0345\u032F\u0332\u032E\u0333\u0353\u0320\u0345\u031C\u031F\u033C\u0325\u0355\u032C\u0325\u033Aa\u0307\u0312\u034B\u0308\u0312\u0346\u0313\u0346\u0304\u0307\u0344\u0305\u0342\u0368\u0346\u036A\u035B\u030F\u0365\u0307\u0340\u0328\u0322\u0361\u0363\u034F\u0328\u0334\u035F\u0335\u0362\u0363\u0360\u0358\u035E\u0360\u035D\u0341\u0337\u0337\u032E\u0326\u032D\u0359\u0318\u033C\u032F\u0333\u035A\u034D\u0319\u031C\u0353\u033C\u0345\u0359\u0331\u033B\u0331\u033C"; + std::u16string text = u"\u0068\u0301\u0350\u0312\u0357\u030C\u0369\u0305\u036C\u0304\u0310\u033F\u0366\u0350\u0343\u0364\u0369\u0311\u0309\u030E\u0365\u031B\u0340\u0337\u0335\u035E\u0334\u0328\u0360\u0360\u0315\u035F\u0340\u0340\u0362\u0360\u0322\u031B\u031B\u0337\u0340\u031E\u031F\u032A\u0331\u0345\u032F\u0332\u032E\u0333\u0353\u0320\u0345\u031C\u031F\u033C\u0325\u0355\u032C\u0325\u033Aa\u0307\u0312\u034B\u0308\u0312\u0346\u0313\u0346\u0304\u0307\u0344\u0305\u0342\u0368\u0346\u036A\u035B\u030F\u0365\u0307\u0340\u0328\u0322\u0361\u0489\u034F\u0328\u0334\u035F\u0335\u0362\u0489\u0360\u0358\u035E\u0360\u035D\u0341\u0337\u0337\u032E\u0326\u032D\u0359\u0318\u033C\u032F\u0333\u035A\u034D\u0319\u031C\u0353\u033C\u0345\u0359\u0331\u033B\u0331\u033C"; ParagraphStyle paragraph_style; ParagraphBuilderImpl builder(paragraph_style, fontCollection); TextStyle text_style; @@ -4046,9 +4046,187 @@ class ParagraphSlideMixedTextDirection : public ParagraphSlide_Base { } }; -class ParagraphSlideEllipsisCases : public ParagraphSlide_Base { +class ParagraphSlideGetPath : public ParagraphSlide_Base { public: - ParagraphSlideEllipsisCases() { fName = "ParagraphSlideEllipsisCases"; } + ParagraphSlideGetPath() { fName = "ParagraphSlideGetPath"; } + void draw(SkCanvas* canvas) override { + canvas->drawColor(SK_ColorWHITE); + auto fontCollection = getFontCollection(); + fontCollection->setDefaultFontManager(SkFontMgr::RefDefault()); + fontCollection->enableFontFallback(); + TextStyle text_style; + text_style.setFontFamilies({SkString("Roboto")}); + text_style.setFontSize(50); + text_style.setColor(SK_ColorBLACK); + ParagraphStyle paragraph_style; + paragraph_style.setTextStyle(text_style); + paragraph_style.setTextAlign(TextAlign::kStart); + + ParagraphBuilderImpl builder(paragraph_style, fontCollection); + builder.pushStyle(text_style); + builder.addText("Multi lined sticky notes drawn as paths"); + auto paragraph = builder.Build(); + paragraph->layout(this->size().width()); + + auto impl = static_cast(paragraph.get()); + SkPath fullPath; + SkScalar height = 0; + for (auto& line : impl->lines()) { + line.ensureTextBlobCachePopulated(); + for (auto& rec : line.fTextBlobCache) { + auto paths = Paragraph::GetPath(rec.fBlob.get()); + paths.offset(0, height); + fullPath.addPath(paths); + height += line.height(); + } + } + SkRect rect = SkRect::MakeXYWH(100, 100 + paragraph->getHeight(), this->size().width(), paragraph->getHeight()); + SkPaint paint; + paint.setShader(setgrad(rect, SK_ColorBLUE, SK_ColorLTGRAY)); + canvas->drawPath(fullPath, paint); + } +}; + +class ParagraphSlideExperiment : public ParagraphSlide_Base { +public: + ParagraphSlideExperiment() { fName = "ParagraphSlideExperiment"; } + void draw(SkCanvas* canvas) override { + canvas->drawColor(SK_ColorWHITE); + auto fontCollection = getFontCollection(); + fontCollection->setDefaultFontManager(SkFontMgr::RefDefault()); + fontCollection->disableFontFallback(); + TextStyle text_style; + text_style.setFontFamilies({SkString("Roboto")}); + text_style.setFontSize(50); + text_style.setColor(SK_ColorBLACK); + ParagraphStyle paragraph_style; + paragraph_style.setTextStyle(text_style); + paragraph_style.setTextAlign(TextAlign::kStart); + + { + ParagraphBuilderImpl builder(paragraph_style, fontCollection); + builder.pushStyle(text_style); + builder.addText("Sticky notes\non multple lines\nwith bounds around glyphs"); + auto paragraph = builder.Build(); + paragraph->layout(this->size().width()); + paragraph->paint(canvas, 0, 0); + paragraph->extendedVisit([&](int, const skia::textlayout::Paragraph::ExtendedVisitorInfo* info) { + if (!info) { + return; + } + SkPaint paint; + paint.setStyle(SkPaint::kStroke_Style); + paint.setAntiAlias(true); + paint.setStrokeWidth(1); + for (auto i = 0; i < info->count; ++i) { + paint.setColor(SK_ColorDKGRAY); + SkRect rect(info->bounds[i]); + rect.offset(info->positions[i]); + rect.offset(info->origin); + canvas->drawRect(rect, paint); + } + }); + canvas->translate(0, paragraph->getHeight() + 20); + } + + { + ParagraphBuilderImpl builder(paragraph_style, fontCollection); + builder.pushStyle(text_style); + builder.addText("Sticky notes with glyphs changing position"); + auto paragraph = builder.Build(); + paragraph->layout(this->size().width()); + paragraph->paint(canvas, 0, 0); + paragraph->extendedVisit([&](int, const skia::textlayout::Paragraph::ExtendedVisitorInfo* info) { + if (!info) { + return; + } + SkScalar offset = 0; + for (auto i = 0; i < info->count; ++i) { + info->positions[i].fY += offset; + if (i % 3 == 0) { + offset = 20; + } else if (i % 3 == 1) { + offset = -20; + } else { + offset = 0; + } + } + }); + paragraph->paint(canvas, 0, 0); + canvas->translate(0, paragraph->getHeight() + 40); + } + + { + ParagraphBuilderImpl builder(paragraph_style, fontCollection); + builder.pushStyle(text_style); + builder.addText("Multi 😀 lined sticky notes drawn as paths"); + auto paragraph = builder.Build(); + paragraph->layout(300); + SkPaint paint; + std::vector metrics; + paragraph->getLineMetrics(metrics); + SkScalar height = 0; + for (size_t lineNum = 0; lineNum < paragraph->lineNumber(); ++lineNum) { + SkPath paths; + paragraph->getPath(lineNum, &paths); + auto& line = metrics[lineNum]; + SkRect rect = SkRect::MakeXYWH(line.fLeft, height, line.fWidth, line.fHeight); + height += line.fHeight; + paint.setShader(setgrad(rect, SK_ColorBLUE, SK_ColorLTGRAY)); + canvas->drawPath(paths, paint); + } + } + } +}; + +class ParagraphSlideGlyphs : public ParagraphSlide_Base { +public: + ParagraphSlideGlyphs() { fName = "ParagraphSlideGlyphs"; } + void draw(SkCanvas* canvas) override { + + canvas->drawColor(SK_ColorWHITE); + const char* text1 = "World domination is such an ugly phrase - I prefer to call it world optimisation"; + const char* text2 = + "左線読設重説切abc後碁給能上目秘使約。満毎冠行 来昼本可 def 必図将発確年。今属場育" + "図情闘陰野高備込制詩西校客。審対江置講今固残必託地集済決維駆年策。立得庭" + "際輝求佐抗蒼提夜合逃表。注統天言件自謙雅載報紙喪。作画稿愛器灯女書利変探" + "訃第金線朝開化建。子戦年帝励害表月幕株漠新期刊人秘。図的海力生禁挙保天戦" + "聞条年所在口。"; + const char* text3 = "من أسر وإعلان الخاصّة وهولندا،, عل def قائمة الضغوط بالمabcطالبة تلك. الصفحة " + "بمباركة التقليدية قام عن. تصفح"; + auto fontCollection = sk_make_sp(); + fontCollection->setDefaultFontManager(SkFontMgr::RefDefault()); + fontCollection->enableFontFallback(); + + ParagraphStyle paragraph_style; + paragraph_style.setTextAlign(TextAlign::kJustify); + + auto draw = [&](const char* text, TextDirection textDirection) { + paragraph_style.setTextDirection(textDirection); + ParagraphBuilderImpl builder(paragraph_style, fontCollection); + TextStyle text_style; + text_style.setFontFamilies({SkString("Katibeh"), SkString("Roboto"), SkString("Source Han Serif CN")}); + text_style.setFontSize(40); + text_style.setColor(SK_ColorBLACK); + builder.pushStyle(text_style); + builder.addText(text); + + auto paragraph = builder.Build(); + paragraph->layout(this->size().width()); // 497 + paragraph->paint(canvas, 0, 0); + canvas->translate(0, paragraph->getHeight() + 20); + }; + + draw(text1, TextDirection::kLtr); + draw(text2, TextDirection::kLtr); + draw(text3, TextDirection::kLtr); + } +}; + + +class ParagraphSlideEllipsisInRTL : public ParagraphSlide_Base { +public: + ParagraphSlideEllipsisInRTL() { fName = "ParagraphSlideEllipsisInRTL"; } void draw(SkCanvas* canvas) override { canvas->drawColor(SK_ColorWHITE); auto fontCollection = getFontCollection(); @@ -4083,38 +4261,26 @@ class ParagraphSlideLast : public ParagraphSlide_Base { public: ParagraphSlideLast() { fName = "ParagraphSlideLast"; } void draw(SkCanvas* canvas) override { - canvas->drawColor(SK_ColorWHITE); - auto fontCollection = sk_make_sp(GetResourcePath("fonts").c_str(), false); - fontCollection->disableFontFallback(); - - fontCollection->addFontFromFile("abc/abc.ttf", "abc"); - fontCollection->addFontFromFile("abc/abc+grave.ttf", "abc+grave"); - fontCollection->addFontFromFile("abc/abc+agrave.ttf", "abc+agrave"); - + auto fontCollection = getFontCollection(); + fontCollection->setDefaultFontManager(SkFontMgr::RefDefault()); + fontCollection->enableFontFallback(); TextStyle text_style; - text_style.setFontSize(40); + text_style.setFontFamilies({SkString("Roboto")}); + text_style.setFontSize(20); text_style.setColor(SK_ColorBLACK); - text_style.setFontFamilies({SkString("abc")}); ParagraphStyle paragraph_style; paragraph_style.setTextStyle(text_style); + paragraph_style.setTextAlign(TextAlign::kJustify); ParagraphBuilderImpl builder(paragraph_style, fontCollection); builder.pushStyle(text_style); - builder.addText("a\u0300bcàbc"); + builder.addText(u"\u3000\u3000哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈"); auto paragraph = builder.Build(); paragraph->layout(this->size().width()); paragraph->paint(canvas, 0, 0); - if (this->isVerbose()) { - SkDebugf("Unresolved glyphs: %d\n", paragraph->unresolvedGlyphs()); - SkDebugf("Unresolved codepoints:"); - auto codepoints = paragraph->unresolvedCodepoints(); - for (auto cp : codepoints) { - SkDebugf("%ul ", cp); - } - SkDebugf("\n"); - } } }; + } // namespace ////////////////////////////////////////////////////////////////////////////// @@ -4189,5 +4355,8 @@ DEF_SLIDE(return new ParagraphSlide_MultiStyle_Arabic1();) DEF_SLIDE(return new ParagraphSlide_MultiStyle_Zalgo();) DEF_SLIDE(return new ParagraphSlide_MultiStyle_Arabic2();) DEF_SLIDE(return new ParagraphSlideMixedTextDirection();) -DEF_SLIDE(return new ParagraphSlideEllipsisCases();) +DEF_SLIDE(return new ParagraphSlideGetPath();) +DEF_SLIDE(return new ParagraphSlideExperiment();) +DEF_SLIDE(return new ParagraphSlideGlyphs();) +DEF_SLIDE(return new ParagraphSlideEllipsisInRTL();) DEF_SLIDE(return new ParagraphSlideLast();) diff --git a/modules/skparagraph/src/ParagraphBuilderImpl.cpp b/modules/skparagraph/src/ParagraphBuilderImpl.cpp index dc861428efc3..734a51abdd47 100644 --- a/modules/skparagraph/src/ParagraphBuilderImpl.cpp +++ b/modules/skparagraph/src/ParagraphBuilderImpl.cpp @@ -123,7 +123,7 @@ void ParagraphBuilderImpl::addPlaceholder(const PlaceholderStyle& placeholderSty #if defined(SK_UNICODE_CLIENT_IMPLEMENTATION) // The very last placeholder is added automatically // and only AFTER finalize() is called - SkASSERT(!fTextIsFinalized && !lastOne); + SkASSERT(!fTextIsFinalized || lastOne); #endif if (!fUtf8.isEmpty() && !lastOne) { // We keep the very last text style diff --git a/modules/skparagraph/src/ParagraphImpl.cpp b/modules/skparagraph/src/ParagraphImpl.cpp index 7b53c21cdf83..369b7d98a731 100644 --- a/modules/skparagraph/src/ParagraphImpl.cpp +++ b/modules/skparagraph/src/ParagraphImpl.cpp @@ -1,8 +1,8 @@ // Copyright 2019 Google LLC. - #include "include/core/SkCanvas.h" #include "include/core/SkFontMetrics.h" #include "include/core/SkMatrix.h" +#include "include/core/SkPath.h" #include "include/core/SkPictureRecorder.h" #include "include/core/SkSpan.h" #include "include/core/SkTypeface.h" @@ -20,8 +20,11 @@ #include "modules/skparagraph/src/TextLine.h" #include "modules/skparagraph/src/TextWrapper.h" #include "src/base/SkUTF.h" -#include +#include "src/core/SkTextBlobPriv.h" + #include +#include +#include #include using namespace skia_private; @@ -286,7 +289,7 @@ bool ParagraphImpl::computeCodeUnitProperties() { TextIndex firstWhitespace = EMPTY_INDEX; for (int i = 0; i < fCodeUnitProperties.size(); ++i) { auto flags = fCodeUnitProperties[i]; - if (SkUnicode::isPartOfWhiteSpaceBreak(flags)) { + if (SkUnicode::hasPartOfWhiteSpaceBreakFlag(flags)) { if (fTrailingSpaces == fText.size()) { fTrailingSpaces = i; } @@ -296,7 +299,7 @@ bool ParagraphImpl::computeCodeUnitProperties() { } else { fTrailingSpaces = fText.size(); } - if (SkUnicode::isHardLineBreak(flags)) { + if (SkUnicode::hasHardLineBreakFlag(flags)) { fHasLineBreaks = true; } } @@ -343,7 +346,8 @@ Cluster::Cluster(ParagraphImpl* owner, , fEnd(end) , fWidth(width) , fHeight(height) - , fHalfLetterSpacing(0.0) { + , fHalfLetterSpacing(0.0) + , fIsIdeographic(false) { size_t whiteSpacesBreakLen = 0; size_t intraWordBreakLen = 0; @@ -361,6 +365,9 @@ Cluster::Cluster(ParagraphImpl* owner, if (fOwner->codeUnitHasProperty(i, SkUnicode::CodeUnitFlags::kPartOfIntraWordBreak)) { ++intraWordBreakLen; } + if (fOwner->codeUnitHasProperty(i, SkUnicode::CodeUnitFlags::kIdeographic)) { + fIsIdeographic = true; + } } } @@ -1144,6 +1151,9 @@ void ParagraphImpl::visit(const Visitor& visitor) { for (auto& line : fLines) { line.ensureTextBlobCachePopulated(); for (auto& rec : line.fTextBlobCache) { + if (rec.fBlob == nullptr) { + continue; + } SkTextBlob::Iter iter(*rec.fBlob); SkTextBlob::Iter::ExperimentalRun run; @@ -1267,5 +1277,178 @@ std::vector ParagraphImpl::getFonts() const { return results; } +void ParagraphImpl::extendedVisit(const ExtendedVisitor& visitor) { + int lineNumber = 0; + for (auto& line : fLines) { + line.iterateThroughVisualRuns( + false, + [&](const Run* run, + SkScalar runOffsetInLine, + TextRange textRange, + SkScalar* runWidthInLine) { + *runWidthInLine = line.iterateThroughSingleRunByStyles( + TextLine::TextAdjustment::GlyphCluster, + run, + runOffsetInLine, + textRange, + StyleType::kNone, + [&](TextRange textRange, + const TextStyle& style, + const TextLine::ClipContext& context) { + SkScalar correctedBaseline = SkScalarFloorToScalar( + line.baseline() + style.getBaselineShift() + 0.5); + SkPoint offset = + SkPoint::Make(line.offset().fX + context.fTextShift, + line.offset().fY + correctedBaseline); + SkRect rect = context.clip.makeOffset(line.offset()); + AutoSTArray<16, SkRect> glyphBounds; + glyphBounds.reset(SkToInt(run->size())); + run->font().getBounds(run->glyphs().data(), + SkToInt(run->size()), + glyphBounds.data(), + nullptr); + STArray<128, uint32_t> clusterStorage; + const uint32_t* clusterPtr = run->clusterIndexes().data(); + if (run->fClusterStart > 0) { + clusterStorage.reset(context.size); + for (size_t i = 0; i < context.size; ++i) { + clusterStorage[i] = + run->fClusterStart + run->fClusterIndexes[i]; + } + clusterPtr = &clusterStorage[0]; + } + const Paragraph::ExtendedVisitorInfo info = { + run->font(), + offset, + SkSize::Make(rect.width(), rect.height()), + SkToS16(context.size), + &run->glyphs()[context.pos], + &run->fPositions[context.pos], + &glyphBounds[context.pos], + clusterPtr, + 0, // flags + }; + visitor(lineNumber, &info); + }); + return true; + }); + visitor(lineNumber, nullptr); // signal end of line + lineNumber += 1; + } +} + +int ParagraphImpl::getPath(int lineNumber, SkPath* dest) { + int notConverted = 0; + auto& line = fLines[lineNumber]; + line.iterateThroughVisualRuns( + false, + [&](const Run* run, + SkScalar runOffsetInLine, + TextRange textRange, + SkScalar* runWidthInLine) { + *runWidthInLine = line.iterateThroughSingleRunByStyles( + TextLine::TextAdjustment::GlyphCluster, + run, + runOffsetInLine, + textRange, + StyleType::kNone, + [&](TextRange textRange, + const TextStyle& style, + const TextLine::ClipContext& context) { + const SkFont& font = run->font(); + SkScalar correctedBaseline = SkScalarFloorToScalar( + line.baseline() + style.getBaselineShift() + 0.5); + SkPoint offset = + SkPoint::Make(line.offset().fX + context.fTextShift, + line.offset().fY + correctedBaseline); + SkRect rect = context.clip.makeOffset(offset); + struct Rec { + SkPath* fPath; + SkPoint fOffset; + const SkPoint* fPos; + int fNotConverted; + } rec = + {dest, SkPoint::Make(rect.left(), rect.top()), + &run->positions()[context.pos], 0}; + font.getPaths(&run->glyphs()[context.pos], context.size, + [](const SkPath* path, const SkMatrix& mx, void* ctx) { + Rec* rec = reinterpret_cast(ctx); + if (path) { + SkMatrix total = mx; + total.postTranslate(rec->fPos->fX + rec->fOffset.fX, + rec->fPos->fY + rec->fOffset.fY); + rec->fPath->addPath(*path, total); + } else { + rec->fNotConverted++; + } + rec->fPos += 1; // move to the next glyph's position + }, &rec); + notConverted += rec.fNotConverted; + }); + return true; + }); + + return notConverted; +} + +SkPath Paragraph::GetPath(SkTextBlob* textBlob) { + SkPath path; + SkTextBlobRunIterator iter(textBlob); + while (!iter.done()) { + SkFont font = iter.font(); + struct Rec { SkPath* fDst; SkPoint fOffset; const SkPoint* fPos; } rec = + {&path, {textBlob->bounds().left(), textBlob->bounds().top()}, + iter.points()}; + font.getPaths(iter.glyphs(), iter.glyphCount(), + [](const SkPath* src, const SkMatrix& mx, void* ctx) { + Rec* rec = (Rec*)ctx; + if (src) { + SkMatrix tmp(mx); + tmp.postTranslate(rec->fPos->fX - rec->fOffset.fX, + rec->fPos->fY - rec->fOffset.fY); + rec->fDst->addPath(*src, tmp); + } + rec->fPos += 1; + }, + &rec); + iter.next(); + } + return path; +} + +bool ParagraphImpl::containsEmoji(SkTextBlob* textBlob) { + bool result = false; + SkTextBlobRunIterator iter(textBlob); + while (!iter.done() && !result) { + // Walk through all the text by codepoints + this->getUnicode()->forEachCodepoint(iter.text(), iter.textSize(), + [&](SkUnichar unichar, int32_t start, int32_t end, int32_t count) { + if (this->getUnicode()->isEmoji(unichar)) { + result = true; + } + }); + iter.next(); + } + return result; +} + +bool ParagraphImpl::containsColorFontOrBitmap(SkTextBlob* textBlob) { + SkTextBlobRunIterator iter(textBlob); + bool flag = false; + while (!iter.done() && !flag) { + iter.font().getPaths( + (const SkGlyphID*) iter.glyphs(), + iter.glyphCount(), + [](const SkPath* path, const SkMatrix& mx, void* ctx) { + if (path == nullptr) { + bool* flag1 = (bool*)ctx; + *flag1 = true; + } + }, &flag); + iter.next(); + } + return flag; +} + } // namespace textlayout } // namespace skia diff --git a/modules/skparagraph/src/ParagraphImpl.h b/modules/skparagraph/src/ParagraphImpl.h index ce1d8fc46cae..e088aa25efee 100644 --- a/modules/skparagraph/src/ParagraphImpl.h +++ b/modules/skparagraph/src/ParagraphImpl.h @@ -12,7 +12,6 @@ #include "include/core/SkSpan.h" #include "include/core/SkString.h" #include "include/core/SkTypes.h" -#include "include/private/SkBitmaskEnum.h" #include "include/private/base/SkOnce.h" #include "include/private/base/SkTArray.h" #include "include/private/base/SkTemplates.h" @@ -26,6 +25,7 @@ #include "modules/skparagraph/src/Run.h" #include "modules/skparagraph/src/TextLine.h" #include "modules/skunicode/include/SkUnicode.h" +#include "src/base/SkBitmaskEnum.h" #include "src/core/SkTHash.h" #include @@ -118,7 +118,7 @@ class ParagraphImpl final : public Paragraph { PositionWithAffinity getGlyphPositionAtCoordinate(SkScalar dx, SkScalar dy) override; SkRange getWordBoundary(unsigned offset) override; - bool getApplyRoundingHack() const { return fApplyRoundingHack; } + bool getApplyRoundingHack() const { return fParagraphStyle.getApplyRoundingHack(); } size_t lineNumber() override { return fLines.size(); } @@ -210,6 +210,10 @@ class ParagraphImpl final : public Paragraph { void updateBackgroundPaint(size_t from, size_t to, SkPaint paint) override; void visit(const Visitor&) override; + void extendedVisit(const ExtendedVisitor&) override; + int getPath(int lineNumber, SkPath* dest) override; + bool containsColorFontOrBitmap(SkTextBlob* textBlob) override; + bool containsEmoji(SkTextBlob* textBlob) override; int getLineNumberAt(TextIndex codeUnitIndex) const override; bool getLineMetricsAt(int lineNumber, LineMetrics* lineMetrics) const override; @@ -292,7 +296,6 @@ class ParagraphImpl final : public Paragraph { bool fHasLineBreaks; bool fHasWhitespacesInside; TextIndex fTrailingSpaces; - bool fApplyRoundingHack = std::getenv("SKPARAGRAPH_REMOVE_ROUNDING_HACK") == nullptr; }; } // namespace textlayout } // namespace skia diff --git a/modules/skparagraph/src/Run.h b/modules/skparagraph/src/Run.h index 4332d6e39050..dda0bb4214e5 100644 --- a/modules/skparagraph/src/Run.h +++ b/modules/skparagraph/src/Run.h @@ -307,6 +307,7 @@ class Cluster { bool isWhitespaceBreak() const { return fIsWhiteSpaceBreak; } bool isIntraWordBreak() const { return fIsIntraWordBreak; } bool isHardBreak() const { return fIsHardBreak; } + bool isIdeographic() const { return fIsIdeographic; } bool isSoftBreak() const; bool isGraphemeBreak() const; @@ -359,6 +360,7 @@ class Cluster { bool fIsWhiteSpaceBreak; bool fIsIntraWordBreak; bool fIsHardBreak; + bool fIsIdeographic; }; class InternalLineMetrics { diff --git a/modules/skparagraph/src/TextLine.cpp b/modules/skparagraph/src/TextLine.cpp index f04270d6c197..b91a34efb4d1 100644 --- a/modules/skparagraph/src/TextLine.cpp +++ b/modules/skparagraph/src/TextLine.cpp @@ -445,37 +445,59 @@ void TextLine::paintDecorations(ParagraphPainter* painter, SkScalar x, SkScalar } void TextLine::justify(SkScalar maxWidth) { - // Count words and the extra spaces to spread across the line - // TODO: do it at the line breaking?.. - size_t whitespacePatches = 0; + int whitespacePatches = 0; SkScalar textLen = 0; + SkScalar whitespaceLen = 0; bool whitespacePatch = false; + // Take leading whitespaces width but do not increment a whitespace patch number + bool leadingWhitespaces = false; this->iterateThroughClustersInGlyphsOrder(false, false, - [&whitespacePatches, &textLen, &whitespacePatch](const Cluster* cluster, bool ghost) { + [&](const Cluster* cluster, ClusterIndex index, bool ghost) { if (cluster->isWhitespaceBreak()) { - if (!whitespacePatch) { - whitespacePatch = true; + if (index == 0) { + leadingWhitespaces = true; + } else if (!whitespacePatch && !leadingWhitespaces) { + // We only count patches BETWEEN words, not before ++whitespacePatches; } + whitespacePatch = !leadingWhitespaces; + whitespaceLen += cluster->width(); + } else if (cluster->isIdeographic()) { + // Whitespace break before and after + if (!whitespacePatch && index != 0) { + // We only count patches BETWEEN words, not before + ++whitespacePatches; // before + } + whitespacePatch = true; + leadingWhitespaces = false; + ++whitespacePatches; // after } else { whitespacePatch = false; + leadingWhitespaces = false; } textLen += cluster->width(); return true; }); + if (whitespacePatch) { + // We only count patches BETWEEN words, not after + --whitespacePatches; + } if (whitespacePatches == 0) { return; } - SkScalar step = (maxWidth - textLen) / whitespacePatches; - SkScalar shift = 0; + SkScalar step = (maxWidth - textLen + whitespaceLen) / whitespacePatches; + SkScalar shift = 0.0f; + SkScalar prevShift = 0.0f; // Deal with the ghost spaces auto ghostShift = maxWidth - this->fAdvance.fX; // Spread the extra whitespaces whitespacePatch = false; - this->iterateThroughClustersInGlyphsOrder(false, true, [&](const Cluster* cluster, bool ghost) { + // Do not break on leading whitespaces + leadingWhitespaces = false; + this->iterateThroughClustersInGlyphsOrder(false, true, [&](const Cluster* cluster, ClusterIndex index, bool ghost) { if (ghost) { if (cluster->run().leftToRight()) { @@ -484,20 +506,42 @@ void TextLine::justify(SkScalar maxWidth) { return true; } - auto prevShift = shift; if (cluster->isWhitespaceBreak()) { - if (!whitespacePatch) { + if (index == 0) { + leadingWhitespaces = true; + } else if (!whitespacePatch && !leadingWhitespaces) { shift += step; whitespacePatch = true; --whitespacePatches; } + shift -= cluster->width(); + } else if (cluster->isIdeographic()) { + if (!whitespacePatch && index != 0) { + shift += step; + --whitespacePatches; + } + whitespacePatch = false; + leadingWhitespaces = false; } else { whitespacePatch = false; + leadingWhitespaces = false; + } + this->shiftCluster(cluster, shift, prevShift); + prevShift = shift; + // We skip ideographic whitespaces + if (!cluster->isWhitespaceBreak() && cluster->isIdeographic()) { + shift += step; + whitespacePatch = true; + --whitespacePatches; } - shiftCluster(cluster, shift, prevShift); return true; }); + if (whitespacePatch && whitespacePatches < 0) { + whitespacePatches++; + shift -= step; + } + SkAssertResult(nearlyEqual(shift, maxWidth - textLen)); SkASSERT(whitespacePatches == 0); @@ -841,6 +885,7 @@ void TextLine::iterateThroughClustersInGlyphsOrder(bool reversed, // Walk through the clusters in the logical order (or reverse) SkSpan runs(fRunsInVisualOrder.data(), fRunsInVisualOrder.size()); bool ignore = false; + ClusterIndex index = 0; directional_for_each(runs, !reversed, [&](decltype(runs[0]) r) { if (ignore) return; auto run = this->fOwner->run(r); @@ -856,7 +901,8 @@ void TextLine::iterateThroughClustersInGlyphsOrder(bool reversed, if (!includeGhosts && ghost) { return; } - if (!visitor(&cluster, ghost)) { + if (!visitor(&cluster, index++, ghost)) { + ignore = true; return; } @@ -1024,8 +1070,7 @@ void TextLine::iterateThroughVisualRuns(bool includingGhostSpaces, const RunVisi if (!includingGhostSpaces && compareRound(totalWidth, this->width(), fOwner->getApplyRoundingHack()) != 0) { // This is a very important assert! // It asserts that 2 different ways of calculation come with the same results - SkDebugf("ASSERT: %f != %f\n", totalWidth, this->width()); - SkASSERT(false); + SkDEBUGFAILF("ASSERT: %f != %f\n", totalWidth, this->width()); } } @@ -1035,6 +1080,7 @@ SkVector TextLine::offset() const { LineMetrics TextLine::getMetrics() const { LineMetrics result; + SkASSERT(fOwner); // Fill out the metrics fOwner->ensureUTF16Mapping(); diff --git a/modules/skparagraph/src/TextLine.h b/modules/skparagraph/src/TextLine.h index 514366668f64..ca8993e4830d 100644 --- a/modules/skparagraph/src/TextLine.h +++ b/modules/skparagraph/src/TextLine.h @@ -5,13 +5,13 @@ #include "include/core/SkPoint.h" #include "include/core/SkRect.h" #include "include/core/SkScalar.h" -#include "include/private/SkBitmaskEnum.h" // IWYU pragma: keep #include "include/private/base/SkTArray.h" #include "modules/skparagraph/include/DartTypes.h" #include "modules/skparagraph/include/Metrics.h" #include "modules/skparagraph/include/ParagraphPainter.h" #include "modules/skparagraph/include/TextStyle.h" #include "modules/skparagraph/src/Run.h" +#include "src/base/SkBitmaskEnum.h" #include #include @@ -97,7 +97,7 @@ class TextLine { StyleType styleType, const RunStyleVisitor& visitor) const; - using ClustersVisitor = std::function; + using ClustersVisitor = std::function; void iterateThroughClustersInGlyphsOrder(bool reverse, bool includeGhosts, const ClustersVisitor& visitor) const; diff --git a/modules/skparagraph/tests/SkParagraphTest.cpp b/modules/skparagraph/tests/SkParagraphTest.cpp index 4768f4cf5a18..10c010e74486 100644 --- a/modules/skparagraph/tests/SkParagraphTest.cpp +++ b/modules/skparagraph/tests/SkParagraphTest.cpp @@ -38,6 +38,7 @@ #include "src/utils/SkOSPath.h" #include "tests/Test.h" #include "tools/Resources.h" +#include "tools/flags/CommandLineFlags.h" #include #include @@ -52,6 +53,12 @@ using namespace skia_private; struct GrContextOptions; +static DEFINE_string(paragraph_fonts, "", + "subdirectory of //resources for fonts to use for these tests"); +static DEFINE_bool(run_paragraph_tests_needing_system_fonts, true, + "Some tests are finicky and need certain system fonts. " + "Set this to false to skip those."); + #define VeryLongCanvasWidth 1000000 #define TestCanvasWidth 1000 #define TestCanvasHeight 600 @@ -94,28 +101,36 @@ class ResourceFontCollection : public FontCollection { ResourceFontCollection(bool testOnly = false) : fFontsFound(false) , fResolvedFonts(0) - , fResourceDir(GetResourcePath("fonts").c_str()) , fFontProvider(sk_make_sp()) { + if (FLAGS_paragraph_fonts.size() == 0) { + return; + } + SkString fontResources = GetResourcePath(FLAGS_paragraph_fonts[0]); + const char* fontDir = fontResources.c_str(); std::vector fonts; - SkOSFile::Iter iter(fResourceDir.c_str()); + SkOSFile::Iter iter(fontDir); SkString path; while (iter.next(&path)) { + // Look for a sentinel font, without which several tests will fail/crash. if (path.endsWith("Roboto-Italic.ttf")) { fFontsFound = true; } fonts.emplace_back(path); } + SkASSERTF(fFontsFound, "--paragraph_fonts was set but didn't have the fonts we need"); - if (!fFontsFound) { - // SkDebugf("Fonts not found, skipping all the tests\n"); - return; - } - // Only register fonts if we have to for (auto& font : fonts) { SkString file_path; - file_path.printf("%s/%s", fResourceDir.c_str(), font.c_str()); - fFontProvider->registerTypeface(SkTypeface::MakeFromFile(file_path.c_str())); + file_path.printf("%s/%s", fontDir, font.c_str()); + auto stream = SkStream::MakeFromFile(file_path.c_str()); + SkASSERTF(stream, "%s not readable", file_path.c_str()); + auto face = SkTypeface::MakeFromStream(std::move(stream), {}); + // Without --nativeFonts, DM will use the portable test font manager which does + // not know how to read in fonts from bytes. + SkASSERTF(face, "%s was not turned into a Typeface. Did you set --nativeFonts?", + file_path.c_str()); + fFontProvider->registerTypeface(face); } if (testOnly) { @@ -134,7 +149,6 @@ class ResourceFontCollection : public FontCollection { private: bool fFontsFound; size_t fResolvedFonts; - std::string fResourceDir; sk_sp fFontProvider; }; @@ -201,9 +215,26 @@ class TestCanvas { }; } // namespace +// Skip tests which do not find the fonts, unless the user set --paragraph_fonts in which case +// we should make a loud error. +#define SKIP_IF_FONTS_NOT_FOUND(r, fontCollection) \ + if (!fontCollection->fontsFound()) { \ + if (FLAGS_paragraph_fonts.size() != 0) { \ + ERRORF(r, "SkParagraphTests Fonts not found!"); \ + } \ + return; \ + } + +#define NEED_SYSTEM_FONTS(fontCollection) \ + if (!FLAGS_run_paragraph_tests_needing_system_fonts) { \ + return; \ + } \ + fontCollection->setDefaultFontManager(SkFontMgr::RefDefault());\ + fontCollection->enableFontFallback(); + UNIX_ONLY_TEST(SkParagraph_SimpleParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) const char* text = "Hello World Text Dialog"; const size_t len = strlen(text); @@ -240,15 +271,14 @@ UNIX_ONLY_TEST(SkParagraph_SimpleParagraph, reporter) { } UNIX_ONLY_TEST(SkParagraph_Rounding_Off_LineBreaks, reporter) { - // To be removed after migration. - if (std::getenv("SKPARAGRAPH_REMOVE_ROUNDING_HACK") == nullptr) return; sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) const char* text = "AAAAAAAAAA"; const size_t len = strlen(text); ParagraphStyle paragraph_style; paragraph_style.turnHintingOff(); + paragraph_style.setApplyRoundingHack(false); TextStyle text_style; text_style.setFontFamilies({SkString("Ahem")}); text_style.setColor(SK_ColorBLACK); @@ -280,7 +310,7 @@ UNIX_ONLY_TEST(SkParagraph_Rounding_Off_LineBreaks, reporter) { UNIX_ONLY_TEST(SkParagraph_InlinePlaceholderParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); TestCanvas canvas("SkParagraph_InlinePlaceholderParagraph.png"); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) const char* text = "012 34"; const size_t len = strlen(text); @@ -379,7 +409,7 @@ UNIX_ONLY_TEST(SkParagraph_InlinePlaceholderParagraph, reporter) { UNIX_ONLY_TEST(SkParagraph_InlinePlaceholderBaselineParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); TestCanvas canvas("SkParagraph_InlinePlaceholderBaselineParagraph.png"); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) const char* text = "012 34"; const size_t len = strlen(text); @@ -435,7 +465,7 @@ UNIX_ONLY_TEST(SkParagraph_InlinePlaceholderBaselineParagraph, reporter) { UNIX_ONLY_TEST(SkParagraph_InlinePlaceholderAboveBaselineParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); TestCanvas canvas("SkParagraph_InlinePlaceholderAboveBaselineParagraph.png"); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) const char* text = "012 34"; const size_t len = strlen(text); @@ -491,7 +521,7 @@ UNIX_ONLY_TEST(SkParagraph_InlinePlaceholderAboveBaselineParagraph, reporter) { UNIX_ONLY_TEST(SkParagraph_InlinePlaceholderBelowBaselineParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); TestCanvas canvas("SkParagraph_InlinePlaceholderBelowBaselineParagraph.png"); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) const char* text = "012 34"; const size_t len = strlen(text); @@ -547,7 +577,7 @@ UNIX_ONLY_TEST(SkParagraph_InlinePlaceholderBelowBaselineParagraph, reporter) { UNIX_ONLY_TEST(SkParagraph_InlinePlaceholderBottomParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); TestCanvas canvas("SkParagraph_InlinePlaceholderBottomParagraph.png"); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) const char* text = "012 34"; const size_t len = strlen(text); @@ -601,7 +631,7 @@ UNIX_ONLY_TEST(SkParagraph_InlinePlaceholderBottomParagraph, reporter) { UNIX_ONLY_TEST(SkParagraph_InlinePlaceholderTopParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); TestCanvas canvas("SkParagraph_InlinePlaceholderTopParagraph.png"); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) const char* text = "012 34"; const size_t len = strlen(text); @@ -655,7 +685,7 @@ UNIX_ONLY_TEST(SkParagraph_InlinePlaceholderTopParagraph, reporter) { UNIX_ONLY_TEST(SkParagraph_InlinePlaceholderMiddleParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); TestCanvas canvas("SkParagraph_InlinePlaceholderMiddleParagraph.png"); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) const char* text = "012 34"; const size_t len = strlen(text); @@ -709,7 +739,7 @@ UNIX_ONLY_TEST(SkParagraph_InlinePlaceholderMiddleParagraph, reporter) { UNIX_ONLY_TEST(SkParagraph_InlinePlaceholderIdeographicBaselineParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); TestCanvas canvas("SkParagraph_InlinePlaceholderIdeographicBaselineParagraph.png"); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) const char* text = "給能上目秘使"; const size_t len = strlen(text); @@ -762,7 +792,7 @@ UNIX_ONLY_TEST(SkParagraph_InlinePlaceholderIdeographicBaselineParagraph, report UNIX_ONLY_TEST(SkParagraph_InlinePlaceholderBreakParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); TestCanvas canvas("SkParagraph_InlinePlaceholderBreakParagraph.png"); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) const char* text = "012 34"; const size_t len = strlen(text); @@ -897,7 +927,7 @@ UNIX_ONLY_TEST(SkParagraph_InlinePlaceholderBreakParagraph, reporter) { UNIX_ONLY_TEST(SkParagraph_InlinePlaceholderGetRectsParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); TestCanvas canvas("SkParagraph_InlinePlaceholderGetRectsParagraph.png"); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) const char* text = "012 34"; const size_t len = strlen(text); @@ -1024,7 +1054,7 @@ UNIX_ONLY_TEST(SkParagraph_InlinePlaceholderGetRectsParagraph, reporter) { UNIX_ONLY_TEST(SkParagraph_SimpleRedParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) const char* text = "I am RED"; const size_t len = strlen(text); @@ -1064,7 +1094,7 @@ UNIX_ONLY_TEST(SkParagraph_SimpleRedParagraph, reporter) { UNIX_ONLY_TEST(SkParagraph_RainbowParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); TestCanvas canvas("SkParagraph_RainbowParagraph.png"); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) const char* text1 = "Red Roboto"; // [0:10) const char* text2 = "big Greeen Default"; // [10:28) const char* text3 = "Defcolor Homemade Apple"; // [28:51) @@ -1186,7 +1216,7 @@ UNIX_ONLY_TEST(SkParagraph_RainbowParagraph, reporter) { UNIX_ONLY_TEST(SkParagraph_DefaultStyleParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_DefaultStyleParagraph.png"); const char* text = "No TextStyle! Uh Oh!"; const size_t len = strlen(text); @@ -1226,7 +1256,7 @@ UNIX_ONLY_TEST(SkParagraph_DefaultStyleParagraph, reporter) { UNIX_ONLY_TEST(SkParagraph_BoldParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_BoldParagraph.png"); const char* text = "This is Red max bold text!"; const size_t len = strlen(text); @@ -1272,7 +1302,7 @@ UNIX_ONLY_TEST(SkParagraph_BoldParagraph, reporter) { UNIX_ONLY_TEST(SkParagraph_HeightOverrideParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_HeightOverrideParagraph.png"); const char* text = "01234満毎冠行来昼本可\nabcd\n満毎冠行来昼本可"; const size_t len = strlen(text); @@ -1327,10 +1357,7 @@ UNIX_ONLY_TEST(SkParagraph_HeightOverrideParagraph, reporter) { UNIX_ONLY_TEST(SkParagraph_BasicHalfLeading, reporter) { sk_sp fontCollection = sk_make_sp(); - - if (!fontCollection->fontsFound()) { - return; - } + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) const char* text = "01234満毎冠行来昼本可\nabcd\n満毎冠行来昼本可"; const size_t len = strlen(text); @@ -1388,10 +1415,7 @@ UNIX_ONLY_TEST(SkParagraph_BasicHalfLeading, reporter) { UNIX_ONLY_TEST(SkParagraph_NearZeroHeightMixedDistribution, reporter) { sk_sp fontCollection = sk_make_sp(); - - if (!fontCollection->fontsFound()) { - return; - } + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) const char* text = "Cookies need love"; const size_t len = strlen(text); @@ -1481,10 +1505,7 @@ UNIX_ONLY_TEST(SkParagraph_NearZeroHeightMixedDistribution, reporter) { UNIX_ONLY_TEST(SkParagraph_StrutHalfLeading, reporter) { sk_sp fontCollection = sk_make_sp(); - - if (!fontCollection->fontsFound()) { - return; - } + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) const char* text = "01234満毎冠行来昼本可\nabcd\n満毎冠行来昼本可"; const size_t len = strlen(text); @@ -1548,10 +1569,7 @@ UNIX_ONLY_TEST(SkParagraph_StrutHalfLeading, reporter) { UNIX_ONLY_TEST(SkParagraph_TrimLeadingDistribution, reporter) { sk_sp fontCollection = sk_make_sp(); - - if (!fontCollection->fontsFound()) { - return; - } + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) const char* text = "01234満毎冠行来昼本可\nabcd\n満毎冠行来昼本可"; const size_t len = strlen(text); @@ -1614,7 +1632,7 @@ UNIX_ONLY_TEST(SkParagraph_TrimLeadingDistribution, reporter) { UNIX_ONLY_TEST(SkParagraph_LeftAlignParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_LeftAlignParagraph.png"); const char* text = "This is a very long sentence to test if the text will properly wrap " @@ -1698,7 +1716,7 @@ UNIX_ONLY_TEST(SkParagraph_LeftAlignParagraph, reporter) { UNIX_ONLY_TEST(SkParagraph_RightAlignParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_RightAlignParagraph.png"); const char* text = "This is a very long sentence to test if the text will properly wrap " @@ -1785,7 +1803,7 @@ UNIX_ONLY_TEST(SkParagraph_RightAlignParagraph, reporter) { UNIX_ONLY_TEST(SkParagraph_CenterAlignParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_CenterAlignParagraph.png"); const char* text = "This is a very long sentence to test if the text will properly wrap " @@ -1872,7 +1890,7 @@ UNIX_ONLY_TEST(SkParagraph_CenterAlignParagraph, reporter) { UNIX_ONLY_TEST(SkParagraph_JustifyAlignParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_JustifyAlignParagraph.png"); const char* text = "This is a very long sentence to test if the text will properly wrap " @@ -1960,7 +1978,7 @@ UNIX_ONLY_TEST(SkParagraph_JustifyAlignParagraph, reporter) { // Checked: DIFF (ghost spaces as a separate box in TxtLib) UNIX_ONLY_TEST(SkParagraph_JustifyRTL, reporter) { sk_sp fontCollection = sk_make_sp(true); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_JustifyRTL.png"); const char* text = "אאא בּבּבּבּ אאאא בּבּ אאא בּבּבּ אאאאא בּבּבּבּ אאאא בּבּבּבּבּ " @@ -2024,7 +2042,7 @@ UNIX_ONLY_TEST(SkParagraph_JustifyRTL, reporter) { UNIX_ONLY_TEST(SkParagraph_JustifyRTLNewLine, reporter) { sk_sp fontCollection = sk_make_sp(true); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_JustifyRTLNewLine.png"); const char* text = "אאא בּבּבּבּ אאאא\nבּבּ אאא בּבּבּ אאאאא בּבּבּבּ אאאא בּבּבּבּבּ " @@ -2099,7 +2117,7 @@ UNIX_ONLY_TEST(SkParagraph_JustifyRTLNewLine, reporter) { UNIX_ONLY_TEST(SkParagraph_LeadingSpaceRTL, reporter) { sk_sp fontCollection = sk_make_sp(true); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_LeadingSpaceRTL.png"); const char* text = " leading space"; @@ -2142,7 +2160,7 @@ UNIX_ONLY_TEST(SkParagraph_LeadingSpaceRTL, reporter) { UNIX_ONLY_TEST(SkParagraph_DecorationsParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_DecorationsParagraph.png"); const char* text1 = "This text should be"; const char* text2 = " decorated even when"; @@ -2263,7 +2281,7 @@ UNIX_ONLY_TEST(SkParagraph_DecorationsParagraph, reporter) { UNIX_ONLY_TEST(SkParagraph_ItalicsParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_ItalicsParagraph.png"); const char* text1 = "No italic "; const char* text2 = "Yes Italic "; @@ -2327,10 +2345,10 @@ UNIX_ONLY_TEST(SkParagraph_ItalicsParagraph, reporter) { UNIX_ONLY_TEST(SkParagraph_ChineseParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_ChineseParagraph.png"); const char* text = - "左線読設重説切後碁給能上目秘使約。満毎冠行来昼本可必図将発確年。今属場育" + " 左線読設重説切後碁給能上目秘使約。満毎冠行来昼本可必図将発確年。今属場育" "図情闘陰野高備込制詩西校客。審対江置講今固残必託地集済決維駆年策。立得庭" "際輝求佐抗蒼提夜合逃表。注統天言件自謙雅載報紙喪。作画稿愛器灯女書利変探" "訃第金線朝開化建。子戦年帝励害表月幕株漠新期刊人秘。図的海力生禁挙保天戦" @@ -2376,7 +2394,7 @@ UNIX_ONLY_TEST(SkParagraph_ChineseParagraph, reporter) { // Checked: disabled for TxtLib UNIX_ONLY_TEST(SkParagraph_ArabicParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_ArabicParagraph.png"); const char* text = "من أسر وإعلان الخاصّة وهولندا،, عل قائمة الضغوط بالمطالبة تلك. الصفحة " @@ -2422,7 +2440,7 @@ UNIX_ONLY_TEST(SkParagraph_ArabicParagraph, reporter) { UNIX_ONLY_TEST(SkParagraph_ArabicRectsParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_ArabicRectsParagraph.png"); const char* text = "بمباركة التقليدية قام عن. تصفح يد "; const size_t len = strlen(text); @@ -2460,8 +2478,8 @@ UNIX_ONLY_TEST(SkParagraph_ArabicRectsParagraph, reporter) { REPORTER_ASSERT(reporter, boxes.size() == 1ull); - REPORTER_ASSERT(reporter, SkScalarNearlyEqual(boxes[0].rect.left(), 538.548f, EPSILON100)); // DIFF: 510.09375 - REPORTER_ASSERT(reporter, SkScalarNearlyEqual(boxes[0].rect.top(), -0.268f, EPSILON100)); + REPORTER_ASSERT(reporter, SkScalarNearlyEqual(boxes[0].rect.left(), 538.120f, EPSILON100)); // DIFF: 510.09375 + REPORTER_ASSERT(reporter, SkScalarNearlyEqual(boxes[0].rect.top(), -0.280f, EPSILON100)); REPORTER_ASSERT(reporter, SkScalarNearlyEqual(boxes[0].rect.right(), 900, EPSILON100)); REPORTER_ASSERT(reporter, SkScalarNearlyEqual(boxes[0].rect.bottom(), 44, EPSILON100)); } @@ -2473,7 +2491,7 @@ UNIX_ONLY_TEST(SkParagraph_ArabicRectsParagraph, reporter) { UNIX_ONLY_TEST(SkParagraph_ArabicRectsLTRLeftAlignParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_ArabicRectsLTRLeftAlignParagraph.png"); const char* text = "Helloبمباركة التقليدية قام عن. تصفح يد "; const size_t len = strlen(text); @@ -2511,17 +2529,17 @@ UNIX_ONLY_TEST(SkParagraph_ArabicRectsLTRLeftAlignParagraph, reporter) { canvas.drawRects(SK_ColorRED, boxes); REPORTER_ASSERT(reporter, boxes.size() == 2ull); - REPORTER_ASSERT(reporter, SkScalarNearlyEqual(boxes[0].rect.left(), 83.92f, EPSILON100)); // DIFF: 89.40625 + REPORTER_ASSERT(reporter, SkScalarNearlyEqual(boxes[0].rect.left(), 65.65f, EPSILON100)); // DIFF: 89.40625 REPORTER_ASSERT(reporter, SkScalarNearlyEqual(boxes[0].rect.top(), -0.27f, EPSILON100)); - REPORTER_ASSERT(reporter, SkScalarNearlyEqual(boxes[0].rect.right(), 105.16f, EPSILON100)); // DIFF: 121.87891 - REPORTER_ASSERT(reporter, SkScalarNearlyEqual(boxes[0].rect.bottom(), 44, EPSILON100)); + REPORTER_ASSERT(reporter, SkScalarNearlyEqual(boxes[0].rect.right(), 86.89f, EPSILON100)); // DIFF: 121.87891 + REPORTER_ASSERT(reporter, SkScalarNearlyEqual(boxes[0].rect.bottom(), 44.0f, EPSILON100)); } // Checked DIFF+ UNIX_ONLY_TEST(SkParagraph_ArabicRectsLTRRightAlignParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_ArabicRectsLTRRightAlignParagraph.png"); const char* text = "Helloبمباركة التقليدية قام عن. تصفح يد "; const size_t len = strlen(text); @@ -2559,15 +2577,15 @@ UNIX_ONLY_TEST(SkParagraph_ArabicRectsLTRRightAlignParagraph, reporter) { canvas.drawRects(SK_ColorRED, boxes); REPORTER_ASSERT(reporter, boxes.size() == 2ull); // DIFF - REPORTER_ASSERT(reporter, SkScalarNearlyEqual(boxes[0].rect.left(), 561.5f, EPSILON100)); // DIFF + REPORTER_ASSERT(reporter, SkScalarNearlyEqual(boxes[0].rect.left(), 561.1f, EPSILON100)); // DIFF REPORTER_ASSERT(reporter, SkScalarNearlyEqual(boxes[0].rect.top(), -0.27f, EPSILON100)); - REPORTER_ASSERT(reporter, SkScalarNearlyEqual(boxes[0].rect.right(), 582.74f, EPSILON100)); // DIFF + REPORTER_ASSERT(reporter, SkScalarNearlyEqual(boxes[0].rect.right(), 582.34f, EPSILON100)); // DIFF REPORTER_ASSERT(reporter, SkScalarNearlyEqual(boxes[0].rect.bottom(), 44, EPSILON100)); } UNIX_ONLY_TEST(SkParagraph_GetGlyphPositionAtCoordinateParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_GetGlyphPositionAtCoordinateParagraph.png"); const char* text = "12345 67890 12345 67890 12345 67890 12345 67890 12345 67890 12345 " @@ -2631,7 +2649,7 @@ UNIX_ONLY_TEST(SkParagraph_GetGlyphPositionAtCoordinateParagraph, reporter) { UNIX_ONLY_TEST(SkParagraph_GetRectsForRangeParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_GetRectsForRangeParagraph.png"); const char* text = "12345, \"67890\" 12345 67890 12345 67890 12345 67890 12345 67890 12345 " @@ -2727,7 +2745,7 @@ UNIX_ONLY_TEST(SkParagraph_GetRectsForRangeParagraph, reporter) { UNIX_ONLY_TEST(SkParagraph_GetRectsForRangeTight, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_GetRectsForRangeTight.png"); const char* text = "( ´・‿・`)( ´・‿・`)( ´・‿・`)( ´・‿・`)( ´・‿・`)( ´・‿・`)( ´・‿・`)(" @@ -2799,7 +2817,7 @@ UNIX_ONLY_TEST(SkParagraph_GetRectsForRangeTight, reporter) { // Checked: DIFF+ UNIX_ONLY_TEST(SkParagraph_GetRectsForRangeIncludeLineSpacingMiddle, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_GetRectsForRangeIncludeLineSpacingMiddle.png"); const char* text = "( ´・‿・`)( ´・‿・`)( ´・‿・`)( ´・‿・`)( ´・‿・`)( ´・‿・`)( ´・‿・`)(" @@ -2921,7 +2939,7 @@ UNIX_ONLY_TEST(SkParagraph_GetRectsForRangeIncludeLineSpacingMiddle, reporter) { // Checked: NO DIFF+ UNIX_ONLY_TEST(SkParagraph_GetRectsForRangeIncludeLineSpacingTop, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_GetRectsForRangeIncludeLineSpacingTop.png"); const char* text = "( ´・‿・`)( ´・‿・`)( ´・‿・`)( ´・‿・`)( ´・‿・`)( ´・‿・`)( ´・‿・`)(" @@ -3043,7 +3061,7 @@ UNIX_ONLY_TEST(SkParagraph_GetRectsForRangeIncludeLineSpacingTop, reporter) { // Checked: NO DIFF+ UNIX_ONLY_TEST(SkParagraph_GetRectsForRangeIncludeLineSpacingBottom, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_GetRectsForRangeIncludeLineSpacingBottom.png"); const char* text = "( ´・‿・`)( ´・‿・`)( ´・‿・`)( ´・‿・`)( ´・‿・`)( ´・‿・`)( ´・‿・`)(" @@ -3166,7 +3184,7 @@ UNIX_ONLY_TEST(SkParagraph_GetRectsForRangeIncludeLineSpacingBottom, reporter) { // Any text range gets a smallest glyph rectangle DEF_TEST_DISABLED(SkParagraph_GetRectsForRangeIncludeCombiningCharacter, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_GetRectsForRangeIncludeCombiningCharacter.png"); const char* text = "ดีสวัสดีชาวโลกที่น่ารัก"; const size_t len = strlen(text); @@ -3229,7 +3247,7 @@ DEF_TEST_DISABLED(SkParagraph_GetRectsForRangeIncludeCombiningCharacter, reporte // Checked: NO DIFF UNIX_ONLY_TEST(SkParagraph_GetRectsForRangeCenterParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_GetRectsForRangeCenterParagraph.png"); // Minikin uses a hard coded list of unicode characters that he treats as invisible - as spaces. // It's absolutely wrong - invisibility is a glyph attribute, not character/grapheme. @@ -3327,7 +3345,7 @@ UNIX_ONLY_TEST(SkParagraph_GetRectsForRangeCenterParagraph, reporter) { // Checked DIFF+ UNIX_ONLY_TEST(SkParagraph_GetRectsForRangeCenterParagraphNewlineCentered, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_GetRectsForRangeCenterParagraphNewlineCentered.png"); const char* text = "01234\n"; const size_t len = strlen(text); @@ -3389,7 +3407,7 @@ UNIX_ONLY_TEST(SkParagraph_GetRectsForRangeCenterParagraphNewlineCentered, repor // Checked NO DIFF UNIX_ONLY_TEST(SkParagraph_GetRectsForRangeCenterMultiLineParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_GetRectsForRangeCenterMultiLineParagraph.png"); const char* text = "01234   \n0123  "; // includes ideographic space and english space. const size_t len = strlen(text); @@ -3491,7 +3509,7 @@ UNIX_ONLY_TEST(SkParagraph_GetRectsForRangeCenterMultiLineParagraph, reporter) { // Checked: DIFF (line height rounding error) UNIX_ONLY_TEST(SkParagraph_GetRectsForRangeStrut, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_GetRectsForRangeStrut.png"); const char* text = "Chinese 字典"; const size_t len = strlen(text); @@ -3538,7 +3556,7 @@ UNIX_ONLY_TEST(SkParagraph_GetRectsForRangeStrut, reporter) { // Checked: NO DIFF UNIX_ONLY_TEST(SkParagraph_GetRectsForRangeStrutFallback, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_GetRectsForRangeStrutFallback.png"); const char* text = "Chinese 字典"; const size_t len = strlen(text); @@ -3578,7 +3596,7 @@ UNIX_ONLY_TEST(SkParagraph_GetRectsForRangeStrutFallback, reporter) { // Checked: DIFF (small in numbers) UNIX_ONLY_TEST(SkParagraph_GetWordBoundaryParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_GetWordBoundaryParagraph.png"); const char* text = "12345 67890 12345 67890 12345 67890 12345 " "67890 12345 67890 12345 67890 12345"; @@ -3654,7 +3672,7 @@ UNIX_ONLY_TEST(SkParagraph_GetWordBoundaryParagraph, reporter) { // Checked: DIFF (unclear) UNIX_ONLY_TEST(SkParagraph_SpacingParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_SpacingParagraph.png"); ParagraphStyle paragraph_style; paragraph_style.setMaxLines(10); @@ -3737,7 +3755,7 @@ UNIX_ONLY_TEST(SkParagraph_SpacingParagraph, reporter) { // Checked: NO DIFF UNIX_ONLY_TEST(SkParagraph_LongWordParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_LongWordParagraph.png"); const char* text = "A " @@ -3780,7 +3798,7 @@ UNIX_ONLY_TEST(SkParagraph_LongWordParagraph, reporter) { // Checked: DIFF? UNIX_ONLY_TEST(SkParagraph_KernScaleParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_KernScaleParagraph.png"); const char* text1 = "AVAVAWAH A0 V0 VA To The Lo"; @@ -3826,7 +3844,7 @@ UNIX_ONLY_TEST(SkParagraph_KernScaleParagraph, reporter) { // Checked: DIFF+ UNIX_ONLY_TEST(SkParagraph_NewlineParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_NewlineParagraph.png"); const char* text = "line1\nline2 test1 test2 test3 test4 test5 test6 test7\nline3\n\nline4 " @@ -3867,7 +3885,7 @@ UNIX_ONLY_TEST(SkParagraph_NewlineParagraph, reporter) { // TODO: Fix underline UNIX_ONLY_TEST(SkParagraph_EmojiParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_EmojiParagraph.png"); const char* text = "😀😃😄😁😆😅😂🤣☺😇🙂😍😡😟😢😻👽💩👍👎🙏👌👋👄👁👦👼👨‍🚀👨‍🚒🙋‍♂️👳👨‍👨‍👧‍👧\ @@ -3911,7 +3929,7 @@ UNIX_ONLY_TEST(SkParagraph_EmojiParagraph, reporter) { // Checked: DIFF+ UNIX_ONLY_TEST(SkParagraph_EmojiMultiLineRectsParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_EmojiMultiLineRectsParagraph.png"); const char* text = "👩‍👩‍👦👩‍👩‍👧‍👧🇺🇸👩‍👩‍👦👩‍👩‍👧‍👧i🇺🇸👩‍👩‍👦👩‍👩‍👧‍👧🇺🇸👩‍👩‍👦👩‍👩‍👧‍👧🇺🇸" @@ -3972,7 +3990,7 @@ UNIX_ONLY_TEST(SkParagraph_EmojiMultiLineRectsParagraph, reporter) { // Checked: DIFF (line breaking) UNIX_ONLY_TEST(SkParagraph_RepeatLayoutParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_RepeatLayoutParagraph.png"); const char* text = "Sentence to layout at diff widths to get diff line counts. short words " @@ -4012,7 +4030,7 @@ UNIX_ONLY_TEST(SkParagraph_RepeatLayoutParagraph, reporter) { // Checked: NO DIFF UNIX_ONLY_TEST(SkParagraph_Ellipsize, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_Ellipsize.png"); const char* text = "This is a very long sentence to test if the text will properly wrap " @@ -4052,7 +4070,7 @@ UNIX_ONLY_TEST(SkParagraph_Ellipsize, reporter) { // Checked: NO DIFF UNIX_ONLY_TEST(SkParagraph_UnderlineShiftParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_UnderlineShiftParagraph.png"); const char* text1 = "fluttser "; const char* text2 = "mdje"; @@ -4121,7 +4139,7 @@ UNIX_ONLY_TEST(SkParagraph_UnderlineShiftParagraph, reporter) { // Checked: NO DIFF UNIX_ONLY_TEST(SkParagraph_SimpleShadow, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_SimpleShadow.png"); const char* text = "Hello World Text Dialog"; const size_t len = strlen(text); @@ -4159,7 +4177,7 @@ UNIX_ONLY_TEST(SkParagraph_SimpleShadow, reporter) { // Checked: NO DIFF UNIX_ONLY_TEST(SkParagraph_ComplexShadow, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_ComplexShadow.png"); const char* text = "Text Chunk "; const size_t len = strlen(text); @@ -4229,7 +4247,7 @@ UNIX_ONLY_TEST(SkParagraph_ComplexShadow, reporter) { // Checked: NO DIFF UNIX_ONLY_TEST(SkParagraph_BaselineParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_BaselineParagraph.png"); const char* text = "左線読設Byg後碁給能上目秘使約。満毎冠行来昼本可必図将発確年。今属場育" @@ -4276,7 +4294,7 @@ UNIX_ONLY_TEST(SkParagraph_BaselineParagraph, reporter) { // Checked: NO DIFF (number of runs only) UNIX_ONLY_TEST(SkParagraph_FontFallbackParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_FontFallbackParagraph.png"); const char* text1 = "Roboto 字典 "; // Roboto + unresolved @@ -4366,7 +4384,7 @@ UNIX_ONLY_TEST(SkParagraph_FontFallbackParagraph, reporter) { // Checked: NO DIFF UNIX_ONLY_TEST(SkParagraph_StrutParagraph1, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_StrutParagraph1.png"); // The chinese extra height should be absorbed by the strut. const char* text = "01234満毎冠p来É本可\nabcd\n満毎É行p昼本可"; @@ -4471,7 +4489,7 @@ UNIX_ONLY_TEST(SkParagraph_StrutParagraph1, reporter) { // Checked: NO DIFF UNIX_ONLY_TEST(SkParagraph_StrutParagraph2, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_StrutParagraph2.png"); // The chinese extra height should be absorbed by the strut. const char* text = "01234ABCDEFGH\nabcd\nABCDEFGH"; @@ -4578,7 +4596,7 @@ UNIX_ONLY_TEST(SkParagraph_StrutParagraph2, reporter) { // Checked: NO DIFF UNIX_ONLY_TEST(SkParagraph_StrutParagraph3, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_StrutParagraph3.png"); // The chinese extra height should be absorbed by the strut. @@ -4686,7 +4704,7 @@ UNIX_ONLY_TEST(SkParagraph_StrutParagraph3, reporter) { // Checked: NO DIFF UNIX_ONLY_TEST(SkParagraph_StrutForceParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_StrutForceParagraph.png"); const char* text = "01234満毎冠行来昼本可\nabcd\n満毎冠行来昼本可"; const size_t len = strlen(text); @@ -4785,7 +4803,7 @@ UNIX_ONLY_TEST(SkParagraph_StrutForceParagraph, reporter) { // Checked: NO DIFF UNIX_ONLY_TEST(SkParagraph_StrutDefaultParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_StrutDefaultParagraph.png"); const char* text = "01234満毎冠行来昼本可\nabcd\n満毎冠行来昼本可"; @@ -4848,7 +4866,8 @@ UNIX_ONLY_TEST(SkParagraph_StrutDefaultParagraph, reporter) { UNIX_ONLY_TEST(SkParagraph_FontFeaturesParagraph, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) + TestCanvas canvas("SkParagraph_FontFeaturesParagraph.png"); const char* text = "12ab\n"; @@ -4899,7 +4918,7 @@ UNIX_ONLY_TEST(SkParagraph_FontFeaturesParagraph, reporter) { // Not in Minikin UNIX_ONLY_TEST(SkParagraph_WhitespacesInMultipleFonts, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) const char* text = "English English 字典 字典 😀😃😄 😀😃😄"; const size_t len = strlen(text); @@ -4931,7 +4950,7 @@ UNIX_ONLY_TEST(SkParagraph_WhitespacesInMultipleFonts, reporter) { // Disable until I sort out fonts DEF_TEST_DISABLED(SkParagraph_JSON1, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) const char* text = "👨‍👩‍👧‍👦"; const size_t len = strlen(text); @@ -4970,7 +4989,7 @@ DEF_TEST_DISABLED(SkParagraph_JSON1, reporter) { // Disable until I sort out fonts DEF_TEST_DISABLED(SkParagraph_JSON2, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) const char* text = "p〠q"; const size_t len = strlen(text); @@ -5015,7 +5034,7 @@ UNIX_ONLY_TEST(SkParagraph_CacheText, reporter) { ParagraphCache cache; cache.turnOn(true); sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) ParagraphStyle paragraph_style; paragraph_style.turnHintingOff(); @@ -5050,7 +5069,7 @@ UNIX_ONLY_TEST(SkParagraph_CacheFonts, reporter) { ParagraphCache cache; cache.turnOn(true); sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) ParagraphStyle paragraph_style; paragraph_style.turnHintingOff(); @@ -5090,7 +5109,7 @@ UNIX_ONLY_TEST(SkParagraph_CacheFontRanges, reporter) { ParagraphCache cache; cache.turnOn(true); sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) ParagraphStyle paragraph_style; paragraph_style.turnHintingOff(); @@ -5135,7 +5154,7 @@ UNIX_ONLY_TEST(SkParagraph_CacheStyles, reporter) { ParagraphCache cache; cache.turnOn(true); sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) ParagraphStyle paragraph_style; paragraph_style.turnHintingOff(); @@ -5173,7 +5192,7 @@ UNIX_ONLY_TEST(SkParagraph_CacheStyles, reporter) { UNIX_ONLY_TEST(SkParagraph_ParagraphWithLineBreak, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) fontCollection->setDefaultFontManager(SkFontMgr::RefDefault()); fontCollection->enableFontFallback(); @@ -5202,7 +5221,7 @@ UNIX_ONLY_TEST(SkParagraph_ParagraphWithLineBreak, reporter) { // This test does not produce an image UNIX_ONLY_TEST(SkParagraph_NullInMiddleOfText, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) fontCollection->setDefaultFontManager(SkFontMgr::RefDefault()); const SkString text("null terminator ->\u0000<- on purpose did you see it?"); @@ -5223,7 +5242,7 @@ UNIX_ONLY_TEST(SkParagraph_NullInMiddleOfText, reporter) { // This test does not produce an image UNIX_ONLY_TEST(SkParagraph_PlaceholderOnly, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) ParagraphStyle paragraph_style; TextStyle text_style; @@ -5242,7 +5261,7 @@ UNIX_ONLY_TEST(SkParagraph_PlaceholderOnly, reporter) { UNIX_ONLY_TEST(SkParagraph_Fallbacks, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) fontCollection->setDefaultFontManager(SkFontMgr::RefDefault(), "Arial"); fontCollection->enableFontFallback(); TestCanvas canvas("SkParagraph_Fallbacks.png"); @@ -5286,7 +5305,7 @@ UNIX_ONLY_TEST(SkParagraph_Fallbacks, reporter) { UNIX_ONLY_TEST(SkParagraph_Bidi1, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) fontCollection->setDefaultFontManager(SkFontMgr::RefDefault()); fontCollection->enableFontFallback(); TestCanvas canvas("SkParagraph_Bidi1.png"); @@ -5338,7 +5357,7 @@ UNIX_ONLY_TEST(SkParagraph_Bidi1, reporter) { UNIX_ONLY_TEST(SkParagraph_Bidi2, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) fontCollection->setDefaultFontManager(SkFontMgr::RefDefault()); fontCollection->enableFontFallback(); TestCanvas canvas("SkParagraph_Bidi2.png"); @@ -5380,7 +5399,7 @@ UNIX_ONLY_TEST(SkParagraph_Bidi2, reporter) { // This test does not produce an image UNIX_ONLY_TEST(SkParagraph_NewlineOnly, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) fontCollection->setDefaultFontManager(SkFontMgr::RefDefault()); TextStyle text_style; @@ -5403,15 +5422,18 @@ UNIX_ONLY_TEST(SkParagraph_FontResolutions, reporter) { sk_sp fontCollection = sk_make_sp(GetResourcePath("fonts").c_str(), false); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) if (!fontCollection->addFontFromFile("abc/abc.ttf", "abc")) { + ERRORF(reporter, "abc/abc.ttf not found"); return; } if (!fontCollection->addFontFromFile("abc/abc+grave.ttf", "abc+grave")) { + ERRORF(reporter, "abc/abc+grave.ttf not found"); return; } if (!fontCollection->addFontFromFile("abc/abc+agrave.ttf", "abc+agrave")) { + ERRORF(reporter, "abc/abc+agrave.ttf not found"); return; } @@ -5459,7 +5481,7 @@ UNIX_ONLY_TEST(SkParagraph_FontStyle, reporter) { TestCanvas canvas("SkParagraph_FontStyle.png"); sk_sp fontCollection = sk_make_sp(GetResourcePath("fonts").c_str(), false, true); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TextStyle text_style; text_style.setFontFamilies({SkString("Roboto")}); @@ -5498,7 +5520,7 @@ UNIX_ONLY_TEST(SkParagraph_Shaping, reporter) { sk_sp fontCollection = sk_make_sp(GetResourcePath("fonts").c_str(), true); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TextStyle text_style; text_style.setFontFamilies({SkString("Roboto")}); @@ -5521,7 +5543,7 @@ UNIX_ONLY_TEST(SkParagraph_Shaping, reporter) { UNIX_ONLY_TEST(SkParagraph_Ellipsis, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) fontCollection->setDefaultFontManager(SkFontMgr::RefDefault()); TestCanvas canvas("SkParagraph_Ellipsis.png"); @@ -5582,7 +5604,7 @@ UNIX_ONLY_TEST(SkParagraph_Ellipsis, reporter) { UNIX_ONLY_TEST(SkParagraph_MemoryLeak, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) fontCollection->setDefaultFontManager(SkFontMgr::RefDefault()); std::string text; @@ -5613,7 +5635,7 @@ UNIX_ONLY_TEST(SkParagraph_MemoryLeak, reporter) { UNIX_ONLY_TEST(SkParagraph_FormattingInfinity, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) fontCollection->setDefaultFontManager(SkFontMgr::RefDefault()); TestCanvas canvas("SkParagraph_FormattingInfinity.png"); @@ -5668,7 +5690,7 @@ UNIX_ONLY_TEST(SkParagraph_Infinity, reporter) { UNIX_ONLY_TEST(SkParagraph_LineMetrics, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_LineMetrics.png"); @@ -5749,7 +5771,7 @@ DEF_TEST_DISABLED(SkParagraph_PlaceholderHeightInf, reporter) { TestCanvas canvas("SkParagraph_PlaceholderHeightInf.png"); sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TextStyle text_style; text_style.setFontFamilies({SkString("Ahem")}); @@ -5781,7 +5803,7 @@ DEF_TEST_DISABLED(SkParagraph_PlaceholderHeightInf, reporter) { UNIX_ONLY_TEST(SkParagraph_LineMetricsTextAlign, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_LineMetricsTextAlign.png"); @@ -5825,7 +5847,7 @@ UNIX_ONLY_TEST(SkParagraph_LineMetricsTextAlign, reporter) { UNIX_ONLY_TEST(SkParagraph_FontResolutionInRTL, reporter) { sk_sp fontCollection = sk_make_sp(true); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_FontResolutionInRTL.png"); const char* text = " אאא בּבּבּבּ אאאא בּבּ אאא בּבּבּ אאאאא בּבּבּבּ אאאא בּבּבּבּבּ "; const size_t len = strlen(text); @@ -5855,7 +5877,7 @@ UNIX_ONLY_TEST(SkParagraph_FontResolutionInRTL, reporter) { UNIX_ONLY_TEST(SkParagraph_FontResolutionInLTR, reporter) { sk_sp fontCollection = sk_make_sp(true); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_FontResolutionInLTR.png"); auto text = u"abc \u01A2 \u01A2 def"; @@ -5887,7 +5909,7 @@ UNIX_ONLY_TEST(SkParagraph_FontResolutionInLTR, reporter) { UNIX_ONLY_TEST(SkParagraph_Intrinsic, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) SkString text(std::string(3000, 'a')); ParagraphStyle paragraph_style; @@ -5913,7 +5935,7 @@ UNIX_ONLY_TEST(SkParagraph_NoCache1, reporter) { cache.turnOn(true); sk_sp fontCollection = sk_make_sp(true); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) // Long arabic text with english spaces const char* text = "من أسر وإعلان الخاصّة وهولندا،, عل قائمة الضغوط بالمطالبة تلك. الصفحة " @@ -5973,7 +5995,7 @@ UNIX_ONLY_TEST(SkParagraph_NoCache1, reporter) { UNIX_ONLY_TEST(SkParagraph_HeightCalculations, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_HeightCalculations.png"); @@ -6006,7 +6028,7 @@ UNIX_ONLY_TEST(SkParagraph_HeightCalculations, reporter) { UNIX_ONLY_TEST(SkParagraph_RTL_With_Styles, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_RTL_With_Styles.png"); @@ -6046,7 +6068,7 @@ UNIX_ONLY_TEST(SkParagraph_RTL_With_Styles, reporter) { UNIX_ONLY_TEST(SkParagraph_PositionInsideEmoji, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_PositionInsideEmoji.png"); @@ -6100,7 +6122,7 @@ UNIX_ONLY_TEST(SkParagraph_PositionInsideEmoji, reporter) { UNIX_ONLY_TEST(SkParagraph_SingleLineHeight1, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_SingleLineHeight1.png"); @@ -6129,7 +6151,7 @@ UNIX_ONLY_TEST(SkParagraph_SingleLineHeight1, reporter) { UNIX_ONLY_TEST(SkParagraph_SingleLineHeight2, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_SingleLineHeight2.png"); @@ -6158,7 +6180,7 @@ UNIX_ONLY_TEST(SkParagraph_SingleLineHeight2, reporter) { UNIX_ONLY_TEST(SkParagraph_PlaceholderWidth, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_PlaceholderWidth.png"); @@ -6202,7 +6224,7 @@ UNIX_ONLY_TEST(SkParagraph_PlaceholderWidth, reporter) { UNIX_ONLY_TEST(SkParagraph_GlyphPositionsInEmptyLines, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_GlyphPositionsInEmptyLines.png"); ParagraphStyle paragraph_style; @@ -6234,7 +6256,7 @@ UNIX_ONLY_TEST(SkParagraph_GlyphPositionsInEmptyLines, reporter) { UNIX_ONLY_TEST(SkParagraph_RTLGlyphPositions, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_RTLGlyphPositions.png"); ParagraphStyle paragraph_style; @@ -6274,7 +6296,7 @@ UNIX_ONLY_TEST(SkParagraph_RTLGlyphPositions, reporter) { UNIX_ONLY_TEST(SkParagraph_RTLGlyphPositionsInEmptyLines, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_RTLGlyphPositionsInEmptyLines.png"); @@ -6305,7 +6327,7 @@ UNIX_ONLY_TEST(SkParagraph_RTLGlyphPositionsInEmptyLines, reporter) { UNIX_ONLY_TEST(SkParagraph_LTRGlyphPositionsForTrailingSpaces, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_LTRGlyphPositionsForTrailingSpaces.png"); @@ -6346,7 +6368,7 @@ UNIX_ONLY_TEST(SkParagraph_LTRGlyphPositionsForTrailingSpaces, reporter) { UNIX_ONLY_TEST(SkParagraph_RTLGlyphPositionsForTrailingSpaces, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_RTLGlyphPositionsForTrailingSpaces.png"); @@ -6403,7 +6425,7 @@ UNIX_ONLY_TEST(SkParagraph_RTLGlyphPositionsForTrailingSpaces, reporter) { UNIX_ONLY_TEST(SkParagraph_LTRLineMetricsDoesNotIncludeNewLine, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_LTRLineMetricsDoesNotIncludeNewLine.png"); @@ -6445,7 +6467,7 @@ UNIX_ONLY_TEST(SkParagraph_LTRLineMetricsDoesNotIncludeNewLine, reporter) { UNIX_ONLY_TEST(SkParagraph_RTLLineMetricsDoesNotIncludeNewLine, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_RTLLineMetricsDoesNotIncludeNewLine.png"); canvas.get()->translate(100, 100); @@ -6519,7 +6541,7 @@ UNIX_ONLY_TEST(SkParagraph_RTLLineMetricsDoesNotIncludeNewLine, reporter) { UNIX_ONLY_TEST(SkParagraph_PlaceholderPosition, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_PlaceholderPosition.png"); canvas.get()->translate(100, 100); @@ -6551,7 +6573,7 @@ UNIX_ONLY_TEST(SkParagraph_PlaceholderPosition, reporter) { UNIX_ONLY_TEST(SkParagraph_LineEnd, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_LineEnd.png"); canvas.get()->translate(100, 100); @@ -6589,7 +6611,7 @@ UNIX_ONLY_TEST(SkParagraph_LineEnd, reporter) { UNIX_ONLY_TEST(SkParagraph_Utf16Indexes, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_Utf16Indexes.png"); canvas.get()->translate(100, 100); @@ -6617,7 +6639,7 @@ UNIX_ONLY_TEST(SkParagraph_Utf16Indexes, reporter) { UNIX_ONLY_TEST(SkParagraph_RTLFollowedByLTR, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_RTLFollowedByLTR.png"); canvas.get()->translate(100, 100); @@ -6674,7 +6696,7 @@ UNIX_ONLY_TEST(SkParagraph_RTLFollowedByLTR, reporter) { UNIX_ONLY_TEST(SkParagraph_StrutTopLine, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_StrutTopLine.png"); @@ -6722,7 +6744,7 @@ UNIX_ONLY_TEST(SkParagraph_StrutTopLine, reporter) { UNIX_ONLY_TEST(SkParagraph_DifferentFontsTopLine, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_DifferentFontsTopLine.png"); @@ -6768,7 +6790,7 @@ UNIX_ONLY_TEST(SkParagraph_DifferentFontsTopLine, reporter) { UNIX_ONLY_TEST(SkParagraph_SimpleParagraphReset, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) const char* text = "Hello World Text Dialog"; const size_t len = strlen(text); @@ -6811,7 +6833,7 @@ UNIX_ONLY_TEST(SkParagraph_SimpleParagraphReset, reporter) { UNIX_ONLY_TEST(SkParagraph_EllipsisGetRectForRange, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_EllipsisGetRectForRange.png"); const char* text = "This is a very long sentence to test if the text will properly wrap " @@ -6856,7 +6878,7 @@ UNIX_ONLY_TEST(SkParagraph_EllipsisGetRectForRange, reporter) { // This test does not produce an image UNIX_ONLY_TEST(SkParagraph_StrutAndTextBehavior, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) const char* text = ""; const size_t len = strlen(text); @@ -6895,9 +6917,8 @@ UNIX_ONLY_TEST(SkParagraph_StrutAndTextBehavior, reporter) { UNIX_ONLY_TEST(SkParagraph_NonMonotonicGlyphsLTR, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; - fontCollection->setDefaultFontManager(SkFontMgr::RefDefault()); - fontCollection->enableFontFallback(); + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) + NEED_SYSTEM_FONTS(fontCollection) TestCanvas canvas("SkParagraph_NonMonotonicGlyphsLTR.png"); std::u16string text = @@ -6948,9 +6969,8 @@ UNIX_ONLY_TEST(SkParagraph_NonMonotonicGlyphsLTR, reporter) { UNIX_ONLY_TEST(SkParagraph_NonMonotonicGlyphsRTL, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; - fontCollection->setDefaultFontManager(SkFontMgr::RefDefault()); - fontCollection->enableFontFallback(); + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) + NEED_SYSTEM_FONTS(fontCollection) TestCanvas canvas("SkParagraph_NonMonotonicGlyphsRTL.png"); const char* text = "ٱلْرَّحْمَـانُ"; @@ -6988,10 +7008,8 @@ UNIX_ONLY_TEST(SkParagraph_NonMonotonicGlyphsRTL, reporter) { void performGetRectsForRangeConcurrently(skiatest::Reporter* reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) { - INFOF(reporter, "No fonts found\n"); - return; - } + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) + auto const text = std::u16string(42000, 'x'); ParagraphStyle paragraphStyle; TextStyle textStyle; @@ -7036,7 +7054,7 @@ UNIX_ONLY_TEST(SkParagraph_GetRectsForRangeConcurrently, reporter) { UNIX_ONLY_TEST(SkParagraph_TabSubstitution, reporter) { sk_sp fontCollection = sk_make_sp(true); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_TabSubstitution.png"); @@ -7070,9 +7088,9 @@ UNIX_ONLY_TEST(SkParagraph_TabSubstitution, reporter) { REPORTER_ASSERT(reporter, 2 == fontCollection->getParagraphCache()->count()); } -DEF_TEST(SkParagraph_lineMetricsWithEllipsis, reporter) { +UNIX_ONLY_TEST(SkParagraph_lineMetricsWithEllipsis, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) fontCollection->setDefaultFontManager(SkFontMgr::RefDefault()); fontCollection->enableFontFallback(); @@ -7092,9 +7110,9 @@ DEF_TEST(SkParagraph_lineMetricsWithEllipsis, reporter) { REPORTER_ASSERT(reporter, lm.size() == 1); } -DEF_TEST(SkParagraph_lineMetricsAfterUpdate, reporter) { +UNIX_ONLY_TEST(SkParagraph_lineMetricsAfterUpdate, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) fontCollection->setDefaultFontManager(SkFontMgr::RefDefault()); fontCollection->enableFontFallback(); @@ -7121,7 +7139,7 @@ DEF_TEST(SkParagraph_lineMetricsAfterUpdate, reporter) { // Google logo is shown in one style (the first one) UNIX_ONLY_TEST(SkParagraph_MultiStyle_Logo, reporter) { sk_sp fontCollection = sk_make_sp(true); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_MultiStyle_Logo.png"); @@ -7238,7 +7256,7 @@ UNIX_ONLY_TEST(SkParagraph_MultiStyle_Logo, reporter) { // Ligature FFI should allow painting and querying by codepoints UNIX_ONLY_TEST(SkParagraph_MultiStyle_FFI, reporter) { sk_sp fontCollection = sk_make_sp(true); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_MultiStyle_FFI.png"); @@ -7300,7 +7318,7 @@ UNIX_ONLY_TEST(SkParagraph_MultiStyle_FFI, reporter) { // Multiple code points/single glyph emoji family should be treated as a single glyph UNIX_ONLY_TEST(SkParagraph_MultiStyle_EmojiFamily, reporter) { sk_sp fontCollection = sk_make_sp(true); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_MultiStyle_EmojiFamily.png"); @@ -7354,7 +7372,7 @@ UNIX_ONLY_TEST(SkParagraph_MultiStyle_EmojiFamily, reporter) { // Arabic Ligature case should be painted into multi styles but queried as a single glyph UNIX_ONLY_TEST(SkParagraph_MultiStyle_Arabic, reporter) { sk_sp fontCollection = sk_make_sp(true); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_MultiStyle_Arabic.png"); @@ -7406,9 +7424,8 @@ UNIX_ONLY_TEST(SkParagraph_MultiStyle_Arabic, reporter) { // Zalgo text should be painted into multi styles but queried as a single glyph UNIX_ONLY_TEST(SkParagraph_MultiStyle_Zalgo, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; - fontCollection->setDefaultFontManager(SkFontMgr::RefDefault()); - fontCollection->enableFontFallback(); + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) + NEED_SYSTEM_FONTS(fontCollection) TestCanvas canvas("SkParagraph_MultiStyle_Zalgo.png"); @@ -7470,7 +7487,7 @@ UNIX_ONLY_TEST(SkParagraph_MultiStyle_Zalgo, reporter) { // RTL Ellipsis UNIX_ONLY_TEST(SkParagraph_RtlEllipsis1, reporter) { sk_sp fontCollection = sk_make_sp(true); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_RtlEllipsis1.png"); @@ -7507,7 +7524,7 @@ UNIX_ONLY_TEST(SkParagraph_RtlEllipsis1, reporter) { UNIX_ONLY_TEST(SkParagraph_RtlEllipsis2, reporter) { sk_sp fontCollection = sk_make_sp(true); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_RtlEllipsis2.png"); @@ -7544,7 +7561,7 @@ UNIX_ONLY_TEST(SkParagraph_RtlEllipsis2, reporter) { UNIX_ONLY_TEST(SkParagraph_TextEditingFunctionality, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) TestCanvas canvas("SkParagraph_TextEditingFunctionality.png"); const char* text = "This is a very long sentence to test if the text will properly wrap " @@ -7634,7 +7651,7 @@ UNIX_ONLY_TEST(SkParagraph_TextEditingFunctionality, reporter) { UNIX_ONLY_TEST(SkParagraph_SingleDummyPlaceholder, reporter) { sk_sp fontCollection = sk_make_sp(); - if (!fontCollection->fontsFound()) return; + SKIP_IF_FONTS_NOT_FOUND(reporter, fontCollection) const char* text = "Single dummy placeholder"; const size_t len = strlen(text); @@ -7666,3 +7683,31 @@ UNIX_ONLY_TEST(SkParagraph_SingleDummyPlaceholder, reporter) { }); } } + +UNIX_ONLY_TEST(SkParagraph_EndWithLineSeparator, reporter) { + sk_sp fontCollection = sk_make_sp(); + fontCollection->setDefaultFontManager(SkFontMgr::RefDefault()); + fontCollection->enableFontFallback(); + + const char* text = "A text ending with line separator.\u2028"; + const size_t len = strlen(text); + + ParagraphStyle paragraph_style; + + ParagraphBuilderImpl builder(paragraph_style, fontCollection); + builder.addText(text, len); + + auto paragraph = builder.Build(); + paragraph->layout(SK_ScalarMax); + + int visitedCount = 0; + paragraph->visit([&visitedCount, reporter](int lineNumber, const Paragraph::VisitorInfo* info) { + visitedCount++; + if (lineNumber == 1) { + // Visitor for second line created from line separator should only be called for 'end of line'. + // 'end of line' is denoted by 'info' being nullptr. + REPORTER_ASSERT(reporter, info == nullptr); + } + }); + REPORTER_ASSERT(reporter, visitedCount == 3); +} diff --git a/modules/skplaintexteditor/BUILD.gn b/modules/skplaintexteditor/BUILD.gn index 80204c9d75da..11323f682431 100644 --- a/modules/skplaintexteditor/BUILD.gn +++ b/modules/skplaintexteditor/BUILD.gn @@ -5,7 +5,7 @@ import("../../gn/skia.gni") import("../../modules/skshaper/skshaper.gni") -if (skia_use_icu && skia_enable_skshaper) { +if ((skia_use_icu || skia_use_libgrapheme) && skia_enable_skshaper) { skia_source_set("editor_lib") { include_dirs = [ "../.." ] public = [ diff --git a/modules/skplaintexteditor/app/editor_application.cpp b/modules/skplaintexteditor/app/editor_application.cpp index 8e317850931e..745d7ad5b8b2 100644 --- a/modules/skplaintexteditor/app/editor_application.cpp +++ b/modules/skplaintexteditor/app/editor_application.cpp @@ -16,6 +16,7 @@ #include "third_party/icu/SkLoadICU.h" +#include #include #include @@ -169,7 +170,7 @@ struct EditorLayer : public sk_app::Window::Layer { void inval() { if (fParent) { fParent->inval(); } } - bool onMouseWheel(float delta, skui::ModifierKey) override { + bool onMouseWheel(float delta, int, int, skui::ModifierKey) override { this->scroll(-(int)(delta * fEditor.font().getSpacing())); return true; } diff --git a/modules/skplaintexteditor/src/editor.cpp b/modules/skplaintexteditor/src/editor.cpp index 7a62da1a8096..7250a6d5c5f5 100644 --- a/modules/skplaintexteditor/src/editor.cpp +++ b/modules/skplaintexteditor/src/editor.cpp @@ -11,6 +11,7 @@ #include "modules/skplaintexteditor/src/shape.h" #include +#include using namespace SkPlainTextEditor; diff --git a/modules/skplaintexteditor/src/shape.cpp b/modules/skplaintexteditor/src/shape.cpp index 9c7ce714c62c..b4d7e3884ee4 100644 --- a/modules/skplaintexteditor/src/shape.cpp +++ b/modules/skplaintexteditor/src/shape.cpp @@ -17,8 +17,9 @@ #include "src/base/SkUTF.h" #include "src/core/SkTextBlobPriv.h" -#include -#include +#include +#include +#include using namespace SkPlainTextEditor; diff --git a/modules/skshaper/src/SkShaper_harfbuzz.cpp b/modules/skshaper/src/SkShaper_harfbuzz.cpp index 6bb38bd23457..b0191726981e 100644 --- a/modules/skshaper/src/SkShaper_harfbuzz.cpp +++ b/modules/skshaper/src/SkShaper_harfbuzz.cpp @@ -19,7 +19,6 @@ #include "include/core/SkStream.h" #include "include/core/SkTypeface.h" #include "include/core/SkTypes.h" -#include "include/private/SkBitmaskEnum.h" #include "include/private/base/SkMalloc.h" #include "include/private/base/SkMutex.h" #include "include/private/base/SkTArray.h" @@ -28,6 +27,7 @@ #include "include/private/base/SkTypeTraits.h" #include "modules/skshaper/include/SkShaper.h" #include "modules/skunicode/include/SkUnicode.h" +#include "src/base/SkBitmaskEnum.h" #include "src/base/SkTDPQueue.h" #include "src/base/SkUTF.h" #include "src/core/SkLRUCache.h" diff --git a/modules/skunicode/BUILD.gn b/modules/skunicode/BUILD.gn index 30f6afb36ea5..9611044497f9 100644 --- a/modules/skunicode/BUILD.gn +++ b/modules/skunicode/BUILD.gn @@ -11,7 +11,7 @@ declare_args() { skunicode_tests_enabled = true } -if (skia_use_icu || skia_use_client_icu) { +if (skia_use_icu || skia_use_client_icu || skia_use_libgrapheme) { config("public_config") { include_dirs = [ "include" ] defines = [ "SK_UNICODE_AVAILABLE" ] @@ -19,6 +19,8 @@ if (skia_use_icu || skia_use_client_icu) { defines += [ "SK_UNICODE_ICU_IMPLEMENTATION" ] } else if (skia_use_client_icu) { defines += [ "SK_UNICODE_CLIENT_IMPLEMENTATION" ] + } else if (skia_use_libgrapheme) { + defines += [ "SK_UNICODE_LIBGRAPHEME_IMPLEMENTATION" ] } if (is_component_build) { defines += [ "SKUNICODE_DLL" ] @@ -52,12 +54,19 @@ if (skia_use_icu || skia_use_client_icu) { sources += skia_unicode_client_icu_sources defines += [ "SK_UNICODE_CLIENT_IMPLEMENTATION" ] deps += [ skia_icu_bidi_third_party_dir ] + } else if (skia_use_libgrapheme) { + sources += skia_unicode_libgrapheme_sources + defines += [ "SK_UNICODE_LIBGRAPHEME_IMPLEMENTATION" ] + deps += [ + skia_icu_bidi_third_party_dir, + skia_libgrapheme_third_party_dir, + ] } } if (defined(is_skia_standalone) && skia_enable_tools) { skia_source_set("tests") { - if (skunicode_tests_enabled && skia_use_icu) { + if (skunicode_tests_enabled && (skia_use_icu || skia_use_libgrapheme)) { testonly = true deps = [ ":skunicode", diff --git a/modules/skunicode/include/SkUnicode.h b/modules/skunicode/include/SkUnicode.h index 7b7ac120d8f5..8ee30bd96635 100644 --- a/modules/skunicode/include/SkUnicode.h +++ b/modules/skunicode/include/SkUnicode.h @@ -9,7 +9,6 @@ #include "include/core/SkSpan.h" #include "include/core/SkString.h" #include "include/core/SkTypes.h" -#include "include/private/SkBitmaskEnum.h" // IWYU pragma: keep #include "include/private/base/SkTArray.h" #include "include/private/base/SkTo.h" #include "src/base/SkUTF.h" @@ -40,6 +39,10 @@ #endif #endif +namespace sknonstd { +template struct is_bitmask_enum; +} + class SKUNICODE_API SkBidiIterator { public: typedef int32_t Position; @@ -86,6 +89,9 @@ class SKUNICODE_API SkUnicode { kControl = 0x20, kTabulation = 0x40, kGlyphClusterStart = 0x80, + kIdeographic = 0x100, + kEmoji = 0x200, + kWordBreak = 0x400, }; enum class TextDirection { kLTR, @@ -121,6 +127,14 @@ class SKUNICODE_API SkUnicode { virtual SkString toUpper(const SkString&) = 0; + virtual bool isControl(SkUnichar utf8) = 0; + virtual bool isWhitespace(SkUnichar utf8) = 0; + virtual bool isSpace(SkUnichar utf8) = 0; + virtual bool isTabulation(SkUnichar utf8) = 0; + virtual bool isHardBreak(SkUnichar utf8) = 0; + virtual bool isEmoji(SkUnichar utf8) = 0; + virtual bool isIdeographic(SkUnichar utf8) = 0; + // Methods used in SkShaper and SkText virtual std::unique_ptr makeBidiIterator (const uint16_t text[], int count, SkBidiIterator::Direction) = 0; @@ -131,12 +145,13 @@ class SKUNICODE_API SkUnicode { virtual std::unique_ptr makeBreakIterator(BreakType type) = 0; // Methods used in SkParagraph - static bool isTabulation(SkUnicode::CodeUnitFlags flags); - static bool isHardLineBreak(SkUnicode::CodeUnitFlags flags); - static bool isSoftLineBreak(SkUnicode::CodeUnitFlags flags); - static bool isGraphemeStart(SkUnicode::CodeUnitFlags flags); - static bool isControl(SkUnicode::CodeUnitFlags flags); - static bool isPartOfWhiteSpaceBreak(SkUnicode::CodeUnitFlags flags); + static bool hasTabulationFlag(SkUnicode::CodeUnitFlags flags); + static bool hasHardLineBreakFlag(SkUnicode::CodeUnitFlags flags); + static bool hasSoftLineBreakFlag(SkUnicode::CodeUnitFlags flags); + static bool hasGraphemeStartFlag(SkUnicode::CodeUnitFlags flags); + static bool hasControlFlag(SkUnicode::CodeUnitFlags flags); + static bool hasPartOfWhiteSpaceBreakFlag(SkUnicode::CodeUnitFlags flags); + static bool extractBidi(const char utf8[], int utf8Units, TextDirection dir, @@ -280,9 +295,12 @@ class SKUNICODE_API SkUnicode { std::vector words, std::vector graphemeBreaks, std::vector lineBreaks); + + static std::unique_ptr MakeLibgraphemeBasedUnicode(); }; namespace sknonstd { - template <> struct is_bitmask_enum : std::true_type {}; +template <> struct is_bitmask_enum : std::true_type {}; } // namespace sknonstd + #endif // SkUnicode_DEFINED diff --git a/modules/skunicode/skunicode.gni b/modules/skunicode/skunicode.gni index 6803a76e94d2..43fa910f8b5a 100644 --- a/modules/skunicode/skunicode.gni +++ b/modules/skunicode/skunicode.gni @@ -14,7 +14,11 @@ _modules = get_path_info("../../modules", "abspath") skia_unicode_public = [ "$_modules/skunicode/include/SkUnicode.h" ] # Generated by Bazel rule //modules/skunicode/src:srcs -skia_unicode_sources = [ "$_modules/skunicode/src/SkUnicode.cpp" ] +skia_unicode_sources = [ + "$_modules/skunicode/src/SkUnicode.cpp", + "$_modules/skunicode/src/SkUnicode_hardcoded.cpp", + "$_modules/skunicode/src/SkUnicode_hardcoded.h", +] # Generated by Bazel rule //modules/skunicode/src:icu_srcs skia_unicode_icu_sources = [ @@ -40,5 +44,12 @@ skia_unicode_builtin_icu_sources = skia_unicode_runtime_icu_sources = [ "$_modules/skunicode/src/SkUnicode_icu_runtime.cpp" ] +# Generated by Bazel rule //modules/skunicode/src:libgrapheme_srcs +skia_unicode_libgrapheme_sources = [ + "$_modules/skunicode/src/SkUnicode_icu_bidi.cpp", + "$_modules/skunicode/src/SkUnicode_icu_bidi.h", + "$_modules/skunicode/src/SkUnicode_libgrapheme.cpp", +] + # Generated by Bazel rule //modules/skunicode/tests:tests skia_unicode_tests = [ "$_modules/skunicode/tests/SkUnicodeTest.cpp" ] diff --git a/modules/skunicode/src/BUILD.bazel b/modules/skunicode/src/BUILD.bazel index d70fd22942d8..b03b48602fb1 100644 --- a/modules/skunicode/src/BUILD.bazel +++ b/modules/skunicode/src/BUILD.bazel @@ -21,6 +21,8 @@ skia_filegroup( name = "srcs", srcs = [ "SkUnicode.cpp", + "SkUnicode_hardcoded.cpp", + "SkUnicode_hardcoded.h", ], visibility = ["//modules/skunicode:__pkg__"], ) @@ -30,6 +32,16 @@ ICU_BIDI_SRCS = [ "SkUnicode_icu_bidi.h", ] +skia_filegroup( + name = "icu_bidi_srcs", + srcs = [ + # Leave this group empty for transition. + # "SkUnicode_icu_bidi.cpp", + # "SkUnicode_icu_bidi.h", + ], + visibility = ["//modules/skunicode:__pkg__"], +) + skia_filegroup( name = "icu_srcs", srcs = [ @@ -49,3 +61,11 @@ skia_filegroup( ] + ICU_BIDI_SRCS, visibility = ["//modules/skunicode:__pkg__"], ) + +skia_filegroup( + name = "libgrapheme_srcs", + srcs = [ + "SkUnicode_libgrapheme.cpp", + ] + ICU_BIDI_SRCS, + visibility = ["//modules/skunicode:__pkg__"], +) diff --git a/modules/skunicode/src/SkUnicode.cpp b/modules/skunicode/src/SkUnicode.cpp index fc8d73dec43f..84f8280674a9 100644 --- a/modules/skunicode/src/SkUnicode.cpp +++ b/modules/skunicode/src/SkUnicode.cpp @@ -4,12 +4,10 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ - -#include "modules/skunicode/include/SkUnicode.h" - -#include "include/private/SkBitmaskEnum.h" #include "include/private/base/SkDebug.h" #include "include/private/base/SkTemplates.h" +#include "modules/skunicode/include/SkUnicode.h" +#include "src/base/SkBitmaskEnum.h" using namespace skia_private; @@ -19,6 +17,12 @@ std::unique_ptr SkUnicode::Make() { if (unicode) { return unicode; } +#endif +#ifdef SK_UNICODE_LIBGRAPHEME_IMPLEMENTATION + std::unique_ptr unicode = SkUnicode::MakeLibgraphemeBasedUnicode(); + if (unicode) { + return unicode; + } #endif return nullptr; } @@ -75,26 +79,26 @@ std::u16string SkUnicode::convertUtf8ToUtf16(const SkString& utf8) { return convertUtf8ToUtf16(utf8.c_str(), utf8.size()); } -bool SkUnicode::isTabulation(SkUnicode::CodeUnitFlags flags) { +bool SkUnicode::hasTabulationFlag(SkUnicode::CodeUnitFlags flags) { return (flags & SkUnicode::kTabulation) == SkUnicode::kTabulation; } -bool SkUnicode::isHardLineBreak(SkUnicode::CodeUnitFlags flags) { +bool SkUnicode::hasHardLineBreakFlag(SkUnicode::CodeUnitFlags flags) { return (flags & SkUnicode::kHardLineBreakBefore) == SkUnicode::kHardLineBreakBefore; } -bool SkUnicode::isSoftLineBreak(SkUnicode::CodeUnitFlags flags) { +bool SkUnicode::hasSoftLineBreakFlag(SkUnicode::CodeUnitFlags flags) { return (flags & SkUnicode::kSoftLineBreakBefore) == SkUnicode::kSoftLineBreakBefore; } -bool SkUnicode::isGraphemeStart(SkUnicode::CodeUnitFlags flags) { +bool SkUnicode::hasGraphemeStartFlag(SkUnicode::CodeUnitFlags flags) { return (flags & SkUnicode::kGraphemeStart) == SkUnicode::kGraphemeStart; } -bool SkUnicode::isControl(SkUnicode::CodeUnitFlags flags) { +bool SkUnicode::hasControlFlag(SkUnicode::CodeUnitFlags flags) { return (flags & SkUnicode::kControl) == SkUnicode::kControl; } -bool SkUnicode::isPartOfWhiteSpaceBreak(SkUnicode::CodeUnitFlags flags) { +bool SkUnicode::hasPartOfWhiteSpaceBreakFlag(SkUnicode::CodeUnitFlags flags) { return (flags & SkUnicode::kPartOfWhiteSpaceBreak) == SkUnicode::kPartOfWhiteSpaceBreak; } diff --git a/modules/skunicode/src/SkUnicode_client.cpp b/modules/skunicode/src/SkUnicode_client.cpp index 6b6ad6bf4d80..f968e35e38f3 100644 --- a/modules/skunicode/src/SkUnicode_client.cpp +++ b/modules/skunicode/src/SkUnicode_client.cpp @@ -7,12 +7,13 @@ #include "include/core/SkSpan.h" #include "include/core/SkString.h" #include "include/core/SkTypes.h" -#include "include/private/SkBitmaskEnum.h" #include "include/private/base/SkTArray.h" #include "include/private/base/SkTo.h" #include "modules/skunicode/include/SkUnicode.h" #include "modules/skunicode/src/SkUnicode_client.h" +#include "modules/skunicode/src/SkUnicode_hardcoded.h" #include "modules/skunicode/src/SkUnicode_icu_bidi.h" +#include "src/base/SkBitmaskEnum.h" #include "src/base/SkUTF.h" #include @@ -68,7 +69,7 @@ void SkUnicode_IcuBidi::bidi_reorderVisual(const SkUnicode::BidiLevel runLevels[ } #endif -class SkUnicode_client : public SkUnicode { +class SkUnicode_client : public SkUnicodeHardCodedCharProperties { public: struct Data { SkSpan fText8; @@ -131,81 +132,6 @@ class SkUnicode_client : public SkUnicode { return SkUnicode::extractBidi(utf8, utf8Units, dir, results); } - // TODO: Take if from the Client or hard code here? - static bool isControl(SkUnichar utf8) { - return (utf8 < ' ') || (utf8 >= 0x7f && utf8 <= 0x9f) || - (utf8 >= 0x200D && utf8 <= 0x200F) || - (utf8 >= 0x202A && utf8 <= 0x202E); - } - - static bool isWhitespace(SkUnichar unichar) { - static constexpr std::array whitespaces { - 0x0009, // character tabulation - 0x000A, // line feed - 0x000B, // line tabulation - 0x000C, // form feed - 0x000D, // carriage return - 0x0020, // space - //0x0085, // next line - //0x00A0, // no-break space - 0x1680, // ogham space mark - 0x2000, // en quad - 0x2001, // em quad - 0x2002, // en space - 0x2003, // em space - 0x2004, // three-per-em space - 0x2005, // four-per-em space - 0x2006, // six-per-em space - //0x2007, // figure space - 0x2008, // punctuation space - 0x2009, // thin space - 0x200A, // hair space - 0x2028, // line separator - 0x2029, // paragraph separator - //0x202F, // narrow no-break space - 0x205F, // medium mathematical space - 0x3000};// ideographic space - return std::find(whitespaces.begin(), whitespaces.end(), unichar) != whitespaces.end(); - } - - static bool isSpace(SkUnichar unichar) { - static constexpr std::array spaces { - 0x0009, // character tabulation - 0x000A, // line feed - 0x000B, // line tabulation - 0x000C, // form feed - 0x000D, // carriage return - 0x0020, // space - 0x0085, // next line - 0x00A0, // no-break space - 0x1680, // ogham space mark - 0x2000, // en quad - 0x2001, // em quad - 0x2002, // en space - 0x2003, // em space - 0x2004, // three-per-em space - 0x2005, // four-per-em space - 0x2006, // six-per-em space - 0x2007, // figure space - 0x2008, // punctuation space - 0x2009, // thin space - 0x200A, // hair space - 0x2028, // line separator - 0x2029, // paragraph separator - 0x202F, // narrow no-break space - 0x205F, // medium mathematical space - 0x3000}; // ideographic space - return std::find(spaces.begin(), spaces.end(), unichar) != spaces.end(); - } - - static bool isTabulation(SkUnichar utf8) { - return utf8 == '\t'; - } - - static bool isHardBreak(SkUnichar utf8) { - return utf8 == '\n'; - } - bool computeCodeUnitFlags(char utf8[], int utf8Units, bool replaceTabs, @@ -228,7 +154,7 @@ class SkUnicode_client : public SkUnicode { SkUnichar unichar = SkUTF::NextUTF8(¤t, end); if (unichar < 0) unichar = 0xFFFD; auto after = current - utf8; - if (replaceTabs && SkUnicode_client::isTabulation(unichar)) { + if (replaceTabs && this->isTabulation(unichar)) { results->at(before) |= SkUnicode::kTabulation; if (replaceTabs) { unichar = ' '; @@ -236,13 +162,13 @@ class SkUnicode_client : public SkUnicode { } } for (auto i = before; i < after; ++i) { - if (SkUnicode_client::isSpace(unichar)) { + if (this->isSpace(unichar)) { results->at(i) |= SkUnicode::kPartOfIntraWordBreak; } - if (SkUnicode_client::isWhitespace(unichar)) { + if (this->isWhitespace(unichar)) { results->at(i) |= SkUnicode::kPartOfWhiteSpaceBreak; } - if (SkUnicode_client::isControl(unichar)) { + if (this->isControl(unichar)) { results->at(i) |= SkUnicode::kControl; } } diff --git a/modules/skunicode/src/SkUnicode_hardcoded.cpp b/modules/skunicode/src/SkUnicode_hardcoded.cpp new file mode 100644 index 000000000000..7b03afb6cc4c --- /dev/null +++ b/modules/skunicode/src/SkUnicode_hardcoded.cpp @@ -0,0 +1,110 @@ + /* +* Copyright 2023 Google Inc. +* +* Use of this source code is governed by a BSD-style license that can be +* found in the LICENSE file. +*/ +#include "modules/skunicode/src/SkUnicode_hardcoded.h" +#include +#include +#include + +bool SkUnicodeHardCodedCharProperties::isControl(SkUnichar utf8) { + return (utf8 < ' ') || (utf8 >= 0x7f && utf8 <= 0x9f) || + (utf8 >= 0x200D && utf8 <= 0x200F) || + (utf8 >= 0x202A && utf8 <= 0x202E); +} + +bool SkUnicodeHardCodedCharProperties::isWhitespace(SkUnichar unichar) { + static constexpr std::array whitespaces { + 0x0009, // character tabulation + 0x000A, // line feed + 0x000B, // line tabulation + 0x000C, // form feed + 0x000D, // carriage return + 0x0020, // space + //0x0085, // next line + //0x00A0, // no-break space + 0x1680, // ogham space mark + 0x2000, // en quad + 0x2001, // em quad + 0x2002, // en space + 0x2003, // em space + 0x2004, // three-per-em space + 0x2005, // four-per-em space + 0x2006, // six-per-em space + //0x2007, // figure space + 0x2008, // punctuation space + 0x2009, // thin space + 0x200A, // hair space + 0x2028, // line separator + 0x2029, // paragraph separator + //0x202F, // narrow no-break space + 0x205F, // medium mathematical space + 0x3000};// ideographic space + return std::find(whitespaces.begin(), whitespaces.end(), unichar) != whitespaces.end(); +} + +bool SkUnicodeHardCodedCharProperties::isSpace(SkUnichar unichar) { + static constexpr std::array spaces { + 0x0009, // character tabulation + 0x000A, // line feed + 0x000B, // line tabulation + 0x000C, // form feed + 0x000D, // carriage return + 0x0020, // space + 0x0085, // next line + 0x00A0, // no-break space + 0x1680, // ogham space mark + 0x2000, // en quad + 0x2001, // em quad + 0x2002, // en space + 0x2003, // em space + 0x2004, // three-per-em space + 0x2005, // four-per-em space + 0x2006, // six-per-em space + 0x2007, // figure space + 0x2008, // punctuation space + 0x2009, // thin space + 0x200A, // hair space + 0x2028, // line separator + 0x2029, // paragraph separator + 0x202F, // narrow no-break space + 0x205F, // medium mathematical space + 0x3000}; // ideographic space + return std::find(spaces.begin(), spaces.end(), unichar) != spaces.end(); +} + +bool SkUnicodeHardCodedCharProperties::isTabulation(SkUnichar utf8) { + return utf8 == '\t'; +} + +bool SkUnicodeHardCodedCharProperties::isHardBreak(SkUnichar utf8) { + return utf8 == '\n'; +} + +bool SkUnicodeHardCodedCharProperties::isEmoji(SkUnichar unichar) { + SkDEBUGFAIL("Not implemented"); + return false; +} + +bool SkUnicodeHardCodedCharProperties::isIdeographic(SkUnichar unichar) { + static constexpr std::array, 8> ranges {{ + {4352, 4607}, // Hangul Jamo + {11904, 42191}, // CJK_Radicals + {43072, 43135}, // Phags_Pa + {44032, 55215}, // Hangul_Syllables + {63744, 64255}, // CJK_Compatibility_Ideographs + {65072, 65103}, // CJK_Compatibility_Forms + {65381, 65500}, // Katakana_Hangul_Halfwidth + {131072, 196607}// Supplementary_Ideographic_Plane + }}; + for (auto range : ranges) { + if (range.first <= unichar && range.second > unichar) { + return true; + } + } + return false; +} + + diff --git a/modules/skunicode/src/SkUnicode_hardcoded.h b/modules/skunicode/src/SkUnicode_hardcoded.h new file mode 100644 index 000000000000..3a15c7cc8685 --- /dev/null +++ b/modules/skunicode/src/SkUnicode_hardcoded.h @@ -0,0 +1,25 @@ +/* + * Copyright 2023 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ +#ifndef SkUnicode_hardcoded_DEFINED +#define SkUnicode_hardcoded_DEFINED + +#include "include/core/SkTypes.h" +#include "modules/skunicode/include/SkUnicode.h" +#include "src/base/SkUTF.h" + +class SkUnicodeHardCodedCharProperties : public SkUnicode { +public: + bool isControl(SkUnichar utf8) override; + bool isWhitespace(SkUnichar utf8) override; + bool isSpace(SkUnichar utf8) override; + bool isTabulation(SkUnichar utf8) override; + bool isHardBreak(SkUnichar utf8) override; + bool isEmoji(SkUnichar utf8) override; + bool isIdeographic(SkUnichar utf8) override; +}; + +#endif // SkUnicode_hardcoded_DEFINED diff --git a/modules/skunicode/src/SkUnicode_icu.cpp b/modules/skunicode/src/SkUnicode_icu.cpp index 64fb6a3369c4..7ec448835796 100644 --- a/modules/skunicode/src/SkUnicode_icu.cpp +++ b/modules/skunicode/src/SkUnicode_icu.cpp @@ -7,7 +7,6 @@ #include "include/core/SkString.h" #include "include/core/SkTypes.h" -#include "include/private/SkBitmaskEnum.h" #include "include/private/base/SkDebug.h" #include "include/private/base/SkMutex.h" #include "include/private/base/SkOnce.h" @@ -17,6 +16,7 @@ #include "modules/skunicode/include/SkUnicode.h" #include "modules/skunicode/src/SkUnicode_icu.h" #include "modules/skunicode/src/SkUnicode_icu_bidi.h" +#include "src/base/SkBitmaskEnum.h" #include "src/base/SkUTF.h" #include "src/core/SkTHash.h" #include @@ -281,7 +281,7 @@ class SkUnicode_icu : public SkUnicode { const char* ch = utf8; while (ch < end) { auto unichar = utf8_next(&ch, end); - if (isHardLineBreak(unichar)) { + if (SkUnicode_icu::isHardLineBreak(unichar)) { setBreak(ch - utf8, UBRK_LINE_HARD); } } @@ -289,23 +289,36 @@ class SkUnicode_icu : public SkUnicode { return true; } - static bool isControl(SkUnichar utf8) { + bool isControl(SkUnichar utf8) override { return sk_u_iscntrl(utf8); } - static bool isWhitespace(SkUnichar utf8) { + bool isWhitespace(SkUnichar utf8) override { return sk_u_isWhitespace(utf8); } - static bool isSpace(SkUnichar utf8) { + bool isSpace(SkUnichar utf8) override { return sk_u_isspace(utf8); } - static bool isTabulation(SkUnichar utf8) { + bool isHardBreak(SkUnichar utf8) override { + return SkUnicode_icu::isHardLineBreak(utf8); + } + + bool isEmoji(SkUnichar unichar) override { + return sk_u_hasBinaryProperty(unichar, UCHAR_EMOJI) || + sk_u_hasBinaryProperty(unichar, UCHAR_EMOJI_COMPONENT); + } + + bool isIdeographic(SkUnichar unichar) override { + return sk_u_hasBinaryProperty(unichar, UCHAR_IDEOGRAPHIC); + } + + bool isTabulation(SkUnichar utf8) override { return utf8 == '\t'; } - static bool isHardBreak(SkUnichar utf8) { + static bool isHardLineBreak(SkUnichar utf8) { auto property = sk_u_getIntPropertyValue(utf8, UCHAR_LINE_BREAK); return property == U_LB_LINE_FEED || property == U_LB_MANDATORY_BREAK; } @@ -336,11 +349,6 @@ class SkUnicode_icu : public SkUnicode { return makeBreakIterator(sk_uloc_getDefault(), breakType); } - static bool isHardLineBreak(SkUnichar utf8) { - auto property = sk_u_getIntPropertyValue(utf8, UCHAR_LINE_BREAK); - return property == U_LB_LINE_FEED || property == U_LB_MANDATORY_BREAK; - } - SkString toUpper(const SkString& str) override { // Convert to UTF16 since that's what ICU wants. auto str16 = SkUnicode::convertUtf8ToUtf16(str.c_str(), str.size()); @@ -401,7 +409,7 @@ class SkUnicode_icu : public SkUnicode { SkUnichar unichar = SkUTF::NextUTF8(¤t, end); if (unichar < 0) unichar = 0xFFFD; auto after = current - utf8; - if (replaceTabs && SkUnicode_icu::isTabulation(unichar)) { + if (replaceTabs && this->isTabulation(unichar)) { results->at(before) |= SkUnicode::kTabulation; if (replaceTabs) { unichar = ' '; @@ -409,15 +417,18 @@ class SkUnicode_icu : public SkUnicode { } } for (auto i = before; i < after; ++i) { - if (SkUnicode_icu::isSpace(unichar)) { + if (this->isSpace(unichar)) { results->at(i) |= SkUnicode::kPartOfIntraWordBreak; } - if (SkUnicode_icu::isWhitespace(unichar)) { + if (this->isWhitespace(unichar)) { results->at(i) |= SkUnicode::kPartOfWhiteSpaceBreak; } - if (SkUnicode_icu::isControl(unichar)) { + if (this->isControl(unichar)) { results->at(i) |= SkUnicode::kControl; } + if (this->isIdeographic(unichar)) { + results->at(i) |= SkUnicode::kIdeographic; + } } } @@ -431,22 +442,22 @@ class SkUnicode_icu : public SkUnicode { // Get white spaces this->forEachCodepoint((char16_t*)&utf16[0], utf16Units, - [results, replaceTabs, &utf16](SkUnichar unichar, int32_t start, int32_t end) { + [this, results, replaceTabs, &utf16](SkUnichar unichar, int32_t start, int32_t end) { for (auto i = start; i < end; ++i) { - if (replaceTabs && SkUnicode_icu::isTabulation(unichar)) { + if (replaceTabs && this->isTabulation(unichar)) { results->at(i) |= SkUnicode::kTabulation; if (replaceTabs) { unichar = ' '; utf16[start] = ' '; } } - if (SkUnicode_icu::isSpace(unichar)) { + if (this->isSpace(unichar)) { results->at(i) |= SkUnicode::kPartOfIntraWordBreak; } - if (SkUnicode_icu::isWhitespace(unichar)) { + if (this->isWhitespace(unichar)) { results->at(i) |= SkUnicode::kPartOfWhiteSpaceBreak; } - if (SkUnicode_icu::isControl(unichar)) { + if (this->isControl(unichar)) { results->at(i) |= SkUnicode::kControl; } } diff --git a/modules/skunicode/src/SkUnicode_icu.h b/modules/skunicode/src/SkUnicode_icu.h index 170a54f3417c..aa340cdc8c95 100644 --- a/modules/skunicode/src/SkUnicode_icu.h +++ b/modules/skunicode/src/SkUnicode_icu.h @@ -20,6 +20,7 @@ #define SKICU_EMIT_FUNCS \ SKICU_FUNC(u_errorName) \ + SKICU_FUNC(u_hasBinaryProperty) \ SKICU_FUNC(u_getIntPropertyValue) \ SKICU_FUNC(u_iscntrl) \ SKICU_FUNC(u_isspace) \ diff --git a/modules/skunicode/src/SkUnicode_libgrapheme.cpp b/modules/skunicode/src/SkUnicode_libgrapheme.cpp new file mode 100644 index 000000000000..027b9cbef61a --- /dev/null +++ b/modules/skunicode/src/SkUnicode_libgrapheme.cpp @@ -0,0 +1,268 @@ + /* +* Copyright 2022 Google Inc. +* +* Use of this source code is governed by a BSD-style license that can be +* found in the LICENSE file. +*/ + +#include "include/core/SkSpan.h" +#include "include/core/SkString.h" +#include "include/core/SkTypes.h" +#include "include/private/base/SkTArray.h" +#include "modules/skunicode/include/SkUnicode.h" +#include "modules/skunicode/src/SkUnicode_hardcoded.h" +#include "modules/skunicode/src/SkUnicode_icu_bidi.h" +#include "src/base/SkBitmaskEnum.h" +extern "C" { +#include +} +#include +#include +#include +#include + +#undef LEN +#define LEN(x) (sizeof(x) / sizeof(*(x))) + +using namespace skia_private; + +#ifndef SK_UNICODE_ICU_IMPLEMENTATION + +/* We "borrow" bidi implementatoin from ICU for now */ + +const char* SkUnicode_IcuBidi::errorName(UErrorCode status) { + return u_errorName_skia(status); +} +void SkUnicode_IcuBidi::bidi_close(UBiDi* bidi) { + ubidi_close_skia(bidi); +} +UBiDiDirection SkUnicode_IcuBidi::bidi_getDirection(const UBiDi* bidi) { + return ubidi_getDirection_skia(bidi); +} +SkBidiIterator::Position SkUnicode_IcuBidi::bidi_getLength(const UBiDi* bidi) { + return ubidi_getLength_skia(bidi); +} +SkBidiIterator::Level SkUnicode_IcuBidi::bidi_getLevelAt(const UBiDi* bidi, int pos) { + return ubidi_getLevelAt_skia(bidi, pos); +} +UBiDi* SkUnicode_IcuBidi::bidi_openSized(int32_t maxLength, int32_t maxRunCount, UErrorCode* pErrorCode) { + return ubidi_openSized_skia(maxLength, maxRunCount, pErrorCode); +} +void SkUnicode_IcuBidi::bidi_setPara(UBiDi* bidi, + const UChar* text, + int32_t length, + UBiDiLevel paraLevel, + UBiDiLevel* embeddingLevels, + UErrorCode* status) { + return ubidi_setPara_skia(bidi, text, length, paraLevel, embeddingLevels, status); +} +void SkUnicode_IcuBidi::bidi_reorderVisual(const SkUnicode::BidiLevel runLevels[], + int levelsCount, + int32_t logicalFromVisual[]) { + ubidi_reorderVisual_skia(runLevels, levelsCount, logicalFromVisual); +} +#endif + +class SkUnicode_libgrapheme : public SkUnicodeHardCodedCharProperties { +public: + SkUnicode_libgrapheme() { } + + ~SkUnicode_libgrapheme() override = default; + + std::unique_ptr copy() override { + return std::make_unique(); + } + + // For SkShaper + std::unique_ptr makeBidiIterator(const uint16_t text[], int count, + SkBidiIterator::Direction dir) override; + std::unique_ptr makeBidiIterator(const char text[], + int count, + SkBidiIterator::Direction dir) override; + std::unique_ptr makeBreakIterator(const char locale[], + BreakType breakType) override; + std::unique_ptr makeBreakIterator(BreakType breakType) override; + bool getBidiRegions(const char utf8[], + int utf8Units, + TextDirection dir, + std::vector* results) override { + return SkUnicode::extractBidi(utf8, utf8Units, dir, results); + } + + bool computeCodeUnitFlags(char utf8[], + int utf8Units, + bool replaceTabs, + skia_private::TArray* results) override { + results->clear(); + results->push_back_n(utf8Units + 1, CodeUnitFlags::kNoCodeUnitFlag); + + size_t lineBreak = 0; + (*results)[lineBreak] |= CodeUnitFlags::kSoftLineBreakBefore; + while (lineBreak < utf8Units) { + lineBreak += grapheme_next_line_break_utf8(utf8 + lineBreak, utf8Units - lineBreak); + // Check if the previous code unit is a hard break. + auto codePoint = utf8[lineBreak - 1]; + (*results)[lineBreak] |= this->isHardBreak(codePoint) + ? CodeUnitFlags::kHardLineBreakBefore + : CodeUnitFlags::kSoftLineBreakBefore; + } + (*results)[utf8Units] |= CodeUnitFlags::kSoftLineBreakBefore; + + size_t graphemeBreak = 0; + (*results)[graphemeBreak] |= CodeUnitFlags::kGraphemeStart; + while (graphemeBreak < utf8Units) { + graphemeBreak += grapheme_next_character_break_utf8(utf8 + graphemeBreak, utf8Units - graphemeBreak); + (*results)[graphemeBreak] |= CodeUnitFlags::kGraphemeStart; + } + + const char* current = utf8; + const char* end = utf8 + utf8Units; + while (current < end) { + auto before = current - utf8; + SkUnichar unichar = SkUTF::NextUTF8(¤t, end); + if (unichar < 0) unichar = 0xFFFD; + auto after = current - utf8; + if (replaceTabs && this->isTabulation(unichar)) { + results->at(before) |= SkUnicode::kTabulation; + if (replaceTabs) { + unichar = ' '; + utf8[before] = ' '; + } + } + for (auto i = before; i < after; ++i) { + if (this->isSpace(unichar)) { + results->at(i) |= SkUnicode::kPartOfIntraWordBreak; + } + if (this->isWhitespace(unichar)) { + results->at(i) |= SkUnicode::kPartOfWhiteSpaceBreak; + } + if (this->isControl(unichar)) { + results->at(i) |= SkUnicode::kControl; + } + } + } + return true; + } + + bool computeCodeUnitFlags(char16_t utf16[], int utf16Units, bool replaceTabs, + skia_private::TArray* results) override { + SkASSERT(false); + return false; + } + + bool getUtf8To16Mapping(const char utf8[], int utf8Units, std::unordered_map* results) { + int utf16Units = 0; + const char* ptr8 = utf8; + const char* end8 = utf8 + utf8Units; + while (ptr8 < end8) { + results->emplace(ptr8 - utf8, utf16Units); + SkUnichar uni = SkUTF::NextUTF8(&ptr8, end8); + if (uni < 0) { + return false; + } + + uint16_t utf16[2]; + size_t count = SkUTF::ToUTF16(uni, utf16); + if (count == 0) { + return false; + } + utf16Units += count; + } + results->emplace(utf8Units, utf16Units); + return true; + } + + bool getWords(const char utf8[], int utf8Units, const char* locale, std::vector* results) override { + std::unordered_map mapping; + if (!getUtf8To16Mapping(utf8, utf8Units, &mapping)) { + return false; + } + size_t wordBreak = 0; + while (wordBreak < utf8Units) { + wordBreak += grapheme_next_word_break_utf8(utf8 + wordBreak, utf8Units - wordBreak); + if (mapping.find(wordBreak) == mapping.end()) { + return false; + } + results->emplace_back(mapping[wordBreak]); + } + return true; + } + + SkString toUpper(const SkString& str) override { + + SkString res(" ", str.size()); + grapheme_to_uppercase_utf8(str.data(), str.size(), res.data(), res.size()); + return res; + } + + void reorderVisual(const BidiLevel runLevels[], + int levelsCount, + int32_t logicalFromVisual[]) override { + SkUnicode_IcuBidi::bidi_reorderVisual(runLevels, levelsCount, logicalFromVisual); + } +private: + friend class SkBreakIterator_libgrapheme; +}; + +class SkBreakIterator_libgrapheme: public SkBreakIterator { + SkUnicode_libgrapheme* fUnicode; + std::vector fLineBreaks; + Position fLastResult; + Position fStart; + Position fEnd; +public: + explicit SkBreakIterator_libgrapheme(SkUnicode_libgrapheme* unicode) : fUnicode(unicode) { } + Position first() override + { return fLineBreaks[fStart + (fLastResult = 0)].pos; } + Position current() override + { return fLineBreaks[fStart + fLastResult].pos; } + Position next() override + { return fLineBreaks[fStart + fLastResult + 1].pos; } + Status status() override { + return fLineBreaks[fStart + fLastResult].breakType == + SkUnicode::LineBreakType::kHardLineBreak + ? SkUnicode::CodeUnitFlags::kHardLineBreakBefore + : SkUnicode::CodeUnitFlags::kSoftLineBreakBefore; + } + bool isDone() override { return fStart + fLastResult == fEnd; } + bool setText(const char utftext8[], int utf8Units) override { + fLineBreaks.clear(); + size_t lineBreak = 0; + for (size_t pos = 0; pos < utf8Units; pos += lineBreak) { + lineBreak = grapheme_next_line_break_utf8(utftext8 + pos, utf8Units - pos); + auto codePoint = utftext8[lineBreak]; + fLineBreaks.emplace_back(lineBreak, + fUnicode->isHardBreak(codePoint) + ? SkUnicode::LineBreakType::kHardLineBreak + : SkUnicode::LineBreakType::kSoftLineBreak); + } + fStart = 0; + fEnd = utf8Units; + fLastResult = 0; + return true; + } + bool setText(const char16_t utftext16[], int utf16Units) override { + SkASSERT(false); + return false; + } +}; + +std::unique_ptr SkUnicode_libgrapheme::makeBidiIterator(const uint16_t text[], int count, + SkBidiIterator::Direction dir) { + return SkUnicode::makeBidiIterator(text, count, dir); +} +std::unique_ptr SkUnicode_libgrapheme::makeBidiIterator(const char text[], + int count, + SkBidiIterator::Direction dir) { + return SkUnicode::makeBidiIterator(text, count, dir); +} +std::unique_ptr SkUnicode_libgrapheme::makeBreakIterator(const char locale[], + BreakType breakType) { + return std::make_unique(this); +} +std::unique_ptr SkUnicode_libgrapheme::makeBreakIterator(BreakType breakType) { + return std::make_unique(this); +} +std::unique_ptr SkUnicode::MakeLibgraphemeBasedUnicode() { + return std::make_unique(); +} diff --git a/modules/skunicode/tests/SkUnicodeTest.cpp b/modules/skunicode/tests/SkUnicodeTest.cpp index 1a4287b8f84a..fd12a2ecb92d 100644 --- a/modules/skunicode/tests/SkUnicodeTest.cpp +++ b/modules/skunicode/tests/SkUnicodeTest.cpp @@ -11,6 +11,7 @@ #include "include/core/SkString.h" #include "include/core/SkTypeface.h" #include "modules/skunicode/include/SkUnicode.h" +#include "src/base/SkBitmaskEnum.h" #include "tests/Test.h" #include @@ -27,7 +28,7 @@ UNIX_ONLY_TEST(SkUnicode_Client, reporter) { client->computeCodeUnitFlags(utf8.data(), utf8.size(), false, &results); for (auto flag : results) { - REPORTER_ASSERT(reporter, !SkUnicode::isPartOfWhiteSpaceBreak(flag)); + REPORTER_ASSERT(reporter, !SkUnicode::hasPartOfWhiteSpaceBreakFlag(flag)); } } #endif @@ -39,7 +40,7 @@ UNIX_ONLY_TEST(SkUnicode_Native, reporter) { skia_private::TArray results; icu->computeCodeUnitFlags(utf8.data(), utf8.size(), false, &results); for (auto flag : results) { - REPORTER_ASSERT(reporter, !SkUnicode::isPartOfWhiteSpaceBreak(flag)); + REPORTER_ASSERT(reporter, !SkUnicode::hasPartOfWhiteSpaceBreakFlag(flag)); } } #endif @@ -199,3 +200,27 @@ UNIX_ONLY_TEST(SkUnicode_ReorderVisual, reporter) { reorder({1}, {0}); reorder({0, 1, 0, 1}, {0, 1, 2, 3}); } + +UNIX_ONLY_TEST(SkUnicode_Emoji, reporter) { + std::u32string emojis(U"😄😁😆😅😂🤣"); + std::u32string not_emojis(U"満毎行昼本可"); + auto icu = SkUnicode::Make(); + for (auto e : emojis) { + REPORTER_ASSERT(reporter, icu->isEmoji(e)); + } + for (auto n: not_emojis) { + REPORTER_ASSERT(reporter, !icu->isEmoji(n)); + } +} + +UNIX_ONLY_TEST(SkUnicode_Ideographic, reporter) { + std::u32string ideographic(U"満毎行昼本可"); + std::u32string not_ideographic(U"😄😁😆😅😂🤣"); + auto icu = SkUnicode::Make(); + for (auto i : ideographic) { + REPORTER_ASSERT(reporter, icu->isIdeographic(i)); + } + for (auto n: not_ideographic) { + REPORTER_ASSERT(reporter, !icu->isIdeographic(n)); + } +} diff --git a/modules/svg/src/SkSVGFeBlend.cpp b/modules/svg/src/SkSVGFeBlend.cpp index 9bf1e30eab54..eef899c68ad9 100644 --- a/modules/svg/src/SkSVGFeBlend.cpp +++ b/modules/svg/src/SkSVGFeBlend.cpp @@ -5,6 +5,7 @@ * found in the LICENSE file. */ +#include "include/core/SkBlendMode.h" #include "include/effects/SkImageFilters.h" #include "modules/svg/include/SkSVGAttributeParser.h" #include "modules/svg/include/SkSVGFeBlend.h" diff --git a/modules/svg/src/SkSVGFilterContext.cpp b/modules/svg/src/SkSVGFilterContext.cpp index fc339737a2ae..61b97091d29d 100644 --- a/modules/svg/src/SkSVGFilterContext.cpp +++ b/modules/svg/src/SkSVGFilterContext.cpp @@ -4,12 +4,13 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ +#include "modules/svg/include/SkSVGFilterContext.h" +#include "include/core/SkBlendMode.h" #include "include/core/SkColorFilter.h" #include "include/core/SkColorSpace.h" #include "include/effects/SkColorMatrix.h" #include "include/effects/SkImageFilters.h" -#include "modules/svg/include/SkSVGFilterContext.h" #include "modules/svg/include/SkSVGNode.h" #include "modules/svg/include/SkSVGRenderContext.h" #include "modules/svg/include/SkSVGTypes.h" diff --git a/modules/svg/src/SkSVGPattern.cpp b/modules/svg/src/SkSVGPattern.cpp index 3a885c210765..d2fc26853d52 100644 --- a/modules/svg/src/SkSVGPattern.cpp +++ b/modules/svg/src/SkSVGPattern.cpp @@ -7,8 +7,10 @@ #include "modules/svg/include/SkSVGPattern.h" +#include "include/core/SkPicture.h" #include "include/core/SkPictureRecorder.h" #include "include/core/SkShader.h" +#include "include/core/SkTileMode.h" #include "modules/svg/include/SkSVGRenderContext.h" #include "modules/svg/include/SkSVGValue.h" diff --git a/platform_tools/android/apps/skottie/skottielib/src/main/cpp/native-lib.cpp b/platform_tools/android/apps/skottie/skottielib/src/main/cpp/native-lib.cpp index df1267573c69..41960e9460fa 100644 --- a/platform_tools/android/apps/skottie/skottielib/src/main/cpp/native-lib.cpp +++ b/platform_tools/android/apps/skottie/skottielib/src/main/cpp/native-lib.cpp @@ -23,6 +23,7 @@ #include "include/gpu/GrContextOptions.h" #include "include/gpu/GrDirectContext.h" #include "include/gpu/ganesh/SkSurfaceGanesh.h" +#include "include/gpu/ganesh/gl/GrGLBackendSurface.h" #include "include/gpu/gl/GrGLInterface.h" #include "include/gpu/gl/GrGLTypes.h" @@ -234,7 +235,7 @@ Java_org_skia_skottie_SkottieAnimation_nDrawFrame(JNIEnv *env, jclass clazz, colorType = kN32_SkColorType; } fboInfo.fProtected = skgpu::Protected::kNo; - GrBackendRenderTarget backendRT(width, height, 0, STENCIL_BUFFER_SIZE, fboInfo); + auto backendRT = GrBackendRenderTargets::MakeGL(width, height, 0, STENCIL_BUFFER_SIZE, fboInfo); SkSurfaceProps props(0, kUnknown_SkPixelGeometry); @@ -247,8 +248,7 @@ Java_org_skia_skottie_SkottieAnimation_nDrawFrame(JNIEnv *env, jclass clazz, SkAutoCanvasRestore acr(canvas, true); SkRect bounds = SkRect::MakeWH(width, height); skottieAnimation->mAnimation->render(canvas, &bounds); - - canvas->flush(); + dContext->flushAndSubmit(); return true; } diff --git a/public.bzl b/public.bzl index ddf87fc2c1c2..bec7fc830f42 100644 --- a/public.bzl +++ b/public.bzl @@ -82,7 +82,6 @@ SKIA_PUBLIC_HDRS = [ "include/core/SkPixmap.h", "include/core/SkPoint.h", "include/core/SkPoint3.h", - "include/core/SkPromiseImageTexture.h", # TODO(kjlubick) remove this shim "include/core/SkRRect.h", "include/core/SkRSXform.h", "include/core/SkRasterHandleAllocator.h", @@ -148,7 +147,9 @@ SKIA_PUBLIC_HDRS = [ "include/gpu/dawn/GrDawnTypes.h", "include/gpu/ganesh/GrExternalTextureGenerator.h", "include/gpu/ganesh/SkImageGanesh.h", + "include/gpu/ganesh/SkMeshGanesh.h", "include/gpu/ganesh/SkSurfaceGanesh.h", + "include/gpu/ganesh/gl/GrGLBackendSurface.h", "include/gpu/ganesh/mtl/SkSurfaceMetal.h", "include/gpu/gl/egl/GrGLMakeEGLInterface.h", "include/gpu/gl/glx/GrGLMakeGLXInterface.h", @@ -233,7 +234,6 @@ BASE_SRCS_ALL = [ "include/android/SkImageAndroid.h", "include/android/SkCanvasAndroid.h", "include/core/SkOpenTypeSVGDecoder.h", - "include/private/SkBitmaskEnum.h", "include/private/SkColorData.h", "include/private/SkEncodedInfo.h", "include/private/SkGainmapInfo.h", @@ -267,7 +267,6 @@ BASE_SRCS_ALL = [ "include/private/base/SkMutex.h", "include/private/base/SkNoncopyable.h", "include/private/base/SkOnce.h", - "include/private/base/SkPathEnums.h", "include/private/base/SkPoint_impl.h", "include/private/base/SkSafe32.h", "include/private/base/SkSemaphore.h", @@ -307,6 +306,7 @@ BASE_SRCS_ALL = [ "src/base/SkAutoMalloc.h", "src/base/SkBezierCurves.cpp", "src/base/SkBezierCurves.h", + "src/base/SkBitmaskEnum.h", "src/base/SkBlockAllocator.cpp", "src/base/SkBlockAllocator.h", "src/base/SkBuffer.cpp", @@ -316,6 +316,7 @@ BASE_SRCS_ALL = [ "src/base/SkCubics.h", "src/base/SkDeque.cpp", "src/base/SkEndian.h", + "src/base/SkEnumBitMask.h", "src/base/SkFloatingPoint.cpp", "src/base/SkHalf.cpp", "src/base/SkHalf.h", @@ -381,12 +382,17 @@ BASE_SRCS_ALL = [ "src/core/SkBitmapDevice.cpp", "src/core/SkBitmapDevice.h", "src/core/SkBitmapProcState.h", # needed for src/opts/SkBitmapProcState_opts.h + "src/core/SkBitmapProcState_opts.cpp", + "src/core/SkBitmapProcState_opts_hsw.cpp", + "src/core/SkBitmapProcState_opts_ssse3.cpp", "src/core/SkBlendMode.cpp", "src/core/SkBlendModeBlender.cpp", "src/core/SkBlendModeBlender.h", "src/core/SkBlendModePriv.h", "src/core/SkBlenderBase.h", "src/core/SkBlitBWMaskTemplate.h", + "src/core/SkBlitMask_opts.cpp", + "src/core/SkBlitMask_opts_ssse3.cpp", "src/core/SkBlitRow.h", "src/core/SkBlitRow_D32.cpp", "src/core/SkBlitter.cpp", @@ -462,12 +468,9 @@ BASE_SRCS_ALL = [ "src/core/SkEdgeClipper.cpp", "src/core/SkEdgeClipper.h", "src/core/SkEffectPriv.h", - "src/core/SkEnumBitMask.h", "src/core/SkEnumerate.h", "src/core/SkExecutor.cpp", "src/core/SkFDot6.h", - "src/core/SkFilterColorProgram.cpp", - "src/core/SkFilterColorProgram.h", "src/core/SkFlattenable.cpp", "src/core/SkFont.cpp", "src/core/SkFontDescriptor.cpp", @@ -490,8 +493,6 @@ BASE_SRCS_ALL = [ "src/core/SkGlyph.h", "src/core/SkGlyphRunPainter.cpp", "src/core/SkGlyphRunPainter.h", - "src/core/SkGpuBlurUtils.cpp", - "src/core/SkGpuBlurUtils.h", "src/core/SkGraphics.cpp", "src/core/SkIDChangeListener.cpp", "src/core/SkIPoint16.h", @@ -530,7 +531,6 @@ BASE_SRCS_ALL = [ "src/core/SkMatrixInvert.cpp", "src/core/SkMatrixInvert.h", "src/core/SkMatrixPriv.h", - "src/core/SkMatrixProvider.h", "src/core/SkMatrixUtils.h", "src/core/SkMesh.cpp", "src/core/SkMeshPriv.h", @@ -556,6 +556,7 @@ BASE_SRCS_ALL = [ "src/core/SkPathBuilder.cpp", "src/core/SkPathEffect.cpp", "src/core/SkPathEffectBase.h", + "src/core/SkPathEnums.h", "src/core/SkPathMakers.h", "src/core/SkPathMeasure.cpp", "src/core/SkPathMeasurePriv.h", @@ -688,11 +689,6 @@ BASE_SRCS_ALL = [ "src/core/SkTypeface_remote.cpp", "src/core/SkTypeface_remote.h", "src/core/SkUnPreMultiply.cpp", - "src/core/SkVM.cpp", - "src/core/SkVM.h", - "src/core/SkVMBlitter.cpp", - "src/core/SkVMBlitter.h", - "src/core/SkVM_fwd.h", "src/core/SkValidationUtils.h", "src/core/SkVertState.cpp", "src/core/SkVertState.h", @@ -769,7 +765,6 @@ BASE_SRCS_ALL = [ "src/effects/imagefilters/SkPictureImageFilter.cpp", "src/effects/imagefilters/SkRuntimeImageFilter.cpp", "src/effects/imagefilters/SkShaderImageFilter.cpp", - "src/effects/imagefilters/SkTileImageFilter.cpp", "src/fonts/SkFontMgr_indirect.cpp", "src/fonts/SkRemotableFontMgr.cpp", "src/gpu/AsyncReadTypes.h", @@ -783,7 +778,6 @@ BASE_SRCS_ALL = [ "src/gpu/DitherUtils.cpp", "src/gpu/DitherUtils.h", "src/gpu/GpuTypesPriv.h", - "src/gpu/GrAHardwareBufferUtils.h", "src/gpu/KeyBuilder.h", "src/gpu/MutableTextureStateRef.h", "src/gpu/PipelineUtils.cpp", @@ -809,10 +803,6 @@ BASE_SRCS_ALL = [ "src/gpu/ganesh/Device.cpp", "src/gpu/ganesh/Device_drawTexture.cpp", "src/gpu/ganesh/Device.h", - "src/gpu/ganesh/GrAHardwareBufferImageGenerator.cpp", - "src/gpu/ganesh/GrAHardwareBufferImageGenerator.h", - "src/gpu/ganesh/GrAHardwareBufferUtils.cpp", - "src/gpu/ganesh/GrAHardwareBufferUtils_impl.h", "src/gpu/ganesh/GrAppliedClip.h", "src/gpu/ganesh/GrAttachment.cpp", "src/gpu/ganesh/GrAttachment.h", @@ -821,6 +811,7 @@ BASE_SRCS_ALL = [ "src/gpu/ganesh/GrAutoLocaleSetter.h", "src/gpu/ganesh/GrBackendSemaphore.cpp", "src/gpu/ganesh/GrBackendSurface.cpp", + "src/gpu/ganesh/GrBackendSurfacePriv.h", "src/gpu/ganesh/GrBackendTextureImageGenerator.cpp", "src/gpu/ganesh/GrBackendTextureImageGenerator.h", "src/gpu/ganesh/GrBackendUtils.cpp", @@ -911,6 +902,8 @@ BASE_SRCS_ALL = [ "src/gpu/ganesh/GrManagedResource.h", "src/gpu/ganesh/GrMemoryPool.cpp", "src/gpu/ganesh/GrMemoryPool.h", + "src/gpu/ganesh/GrMeshBuffers.cpp", + "src/gpu/ganesh/GrMeshBuffers.h", "src/gpu/ganesh/GrMeshDrawTarget.cpp", "src/gpu/ganesh/GrMeshDrawTarget.h", "src/gpu/ganesh/GrNativeRect.h", @@ -1150,6 +1143,8 @@ BASE_SRCS_ALL = [ "src/gpu/ganesh/image/SkImage_LazyTexture.h", "src/gpu/ganesh/image/SkImage_RasterPinnable.cpp", "src/gpu/ganesh/image/SkImage_RasterPinnable.h", + "src/gpu/ganesh/image/SkSpecialImage_Ganesh.cpp", + "src/gpu/ganesh/image/SkSpecialImage_Ganesh.h", "src/gpu/ganesh/mock/GrMockAttachment.h", "src/gpu/ganesh/mock/GrMockBuffer.h", "src/gpu/ganesh/mock/GrMockCaps.cpp", @@ -1296,10 +1291,11 @@ BASE_SRCS_ALL = [ "src/opts/SkBitmapProcState_opts.h", "src/opts/SkBlitMask_opts.h", "src/opts/SkBlitRow_opts.h", + "src/opts/SkOpts_RestoreTarget.h", + "src/opts/SkOpts_SetTarget.h", "src/opts/SkRasterPipeline_opts.h", "src/opts/SkSwizzler_opts.h", "src/opts/SkUtils_opts.h", - "src/opts/SkVM_opts.h", "src/pathops/SkAddIntersections.cpp", "src/pathops/SkAddIntersections.h", "src/pathops/SkDConicLineIntersection.cpp", @@ -1498,7 +1494,6 @@ BASE_SRCS_ALL = [ "src/sksl/SkSLMangler.h", "src/sksl/SkSLMemoryLayout.h", "src/sksl/SkSLMemoryPool.h", - "src/sksl/SkSLModifiersPool.h", "src/sksl/SkSLModuleLoader.cpp", "src/sksl/SkSLModuleLoader.h", "src/sksl/SkSLOperator.cpp", @@ -1554,17 +1549,8 @@ BASE_SRCS_ALL = [ "src/sksl/codegen/SkSLSPIRVtoHLSL.h", "src/sksl/codegen/SkSLRasterPipelineBuilder.cpp", "src/sksl/codegen/SkSLRasterPipelineBuilder.h", - "src/sksl/codegen/SkSLVMCodeGenerator.cpp", - "src/sksl/codegen/SkSLVMCodeGenerator.h", "src/sksl/codegen/SkSLWGSLCodeGenerator.cpp", "src/sksl/codegen/SkSLWGSLCodeGenerator.h", - "src/sksl/dsl/DSLExpression.cpp", - "src/sksl/dsl/DSLExpression.h", - "src/sksl/dsl/DSLModifiers.h", - "src/sksl/dsl/DSLStatement.cpp", - "src/sksl/dsl/DSLStatement.h", - "src/sksl/dsl/DSLType.cpp", - "src/sksl/dsl/DSLType.h", "src/sksl/ir/SkSLBinaryExpression.cpp", "src/sksl/ir/SkSLBinaryExpression.h", "src/sksl/ir/SkSLBlock.cpp", @@ -1597,6 +1583,7 @@ BASE_SRCS_ALL = [ "src/sksl/ir/SkSLDiscardStatement.h", "src/sksl/ir/SkSLDoStatement.cpp", "src/sksl/ir/SkSLDoStatement.h", + "src/sksl/ir/SkSLEmptyExpression.h", "src/sksl/ir/SkSLExpression.cpp", "src/sksl/ir/SkSLExpression.h", "src/sksl/ir/SkSLExpressionStatement.cpp", @@ -1629,7 +1616,8 @@ BASE_SRCS_ALL = [ "src/sksl/ir/SkSLLiteral.cpp", "src/sksl/ir/SkSLLiteral.h", "src/sksl/ir/SkSLMethodReference.h", - "src/sksl/ir/SkSLModifiers.cpp", + "src/sksl/ir/SkSLModifierFlags.cpp", + "src/sksl/ir/SkSLModifierFlags.h", "src/sksl/ir/SkSLModifiers.h", "src/sksl/ir/SkSLModifiersDeclaration.cpp", "src/sksl/ir/SkSLModifiersDeclaration.h", @@ -1719,6 +1707,7 @@ BASE_SRCS_ALL = [ "src/text/gpu/VertexFiller.h", "src/text/StrikeForGPU.cpp", "src/text/StrikeForGPU.h", + "src/text/TextBlobMailbox.h", "src/utils/SkAnimCodecPlayer.cpp", "src/utils/SkBase64.cpp", "src/utils/SkBitSet.h", @@ -1764,7 +1753,6 @@ BASE_SRCS_ALL = [ "src/utils/SkShadowTessellator.cpp", "src/utils/SkShadowTessellator.h", "src/utils/SkShadowUtils.cpp", - "src/utils/SkTestCanvas.h", "src/utils/SkTextUtils.cpp", "src/xps/SkXPSDevice.cpp", "src/xps/SkXPSDevice.h", @@ -1892,10 +1880,6 @@ TEXTUAL_HDRS = [ ] base_gl_srcs = [ - "src/gpu/ganesh/gl/builders/GrGLProgramBuilder.cpp", - "src/gpu/ganesh/gl/builders/GrGLProgramBuilder.h", - "src/gpu/ganesh/gl/builders/GrGLShaderStringBuilder.cpp", - "src/gpu/ganesh/gl/builders/GrGLShaderStringBuilder.h", "src/gpu/ganesh/gl/GrGLAssembleGLESInterfaceAutogen.cpp", "src/gpu/ganesh/gl/GrGLAssembleGLInterfaceAutogen.cpp", "src/gpu/ganesh/gl/GrGLAssembleHelpers.cpp", @@ -1903,6 +1887,8 @@ base_gl_srcs = [ "src/gpu/ganesh/gl/GrGLAssembleWebGLInterfaceAutogen.cpp", "src/gpu/ganesh/gl/GrGLAttachment.cpp", "src/gpu/ganesh/gl/GrGLAttachment.h", + "src/gpu/ganesh/gl/GrGLBackendSurface.cpp", + "src/gpu/ganesh/gl/GrGLBackendSurfacePriv.h", "src/gpu/ganesh/gl/GrGLBuffer.cpp", "src/gpu/ganesh/gl/GrGLBuffer.h", "src/gpu/ganesh/gl/GrGLCaps.cpp", @@ -1920,9 +1906,9 @@ base_gl_srcs = [ "src/gpu/ganesh/gl/GrGLOpsRenderPass.cpp", "src/gpu/ganesh/gl/GrGLOpsRenderPass.h", "src/gpu/ganesh/gl/GrGLProgram.cpp", + "src/gpu/ganesh/gl/GrGLProgram.h", "src/gpu/ganesh/gl/GrGLProgramDataManager.cpp", "src/gpu/ganesh/gl/GrGLProgramDataManager.h", - "src/gpu/ganesh/gl/GrGLProgram.h", "src/gpu/ganesh/gl/GrGLRenderTarget.cpp", "src/gpu/ganesh/gl/GrGLRenderTarget.h", "src/gpu/ganesh/gl/GrGLSemaphore.cpp", @@ -1939,6 +1925,10 @@ base_gl_srcs = [ "src/gpu/ganesh/gl/GrGLVaryingHandler.h", "src/gpu/ganesh/gl/GrGLVertexArray.cpp", "src/gpu/ganesh/gl/GrGLVertexArray.h", + "src/gpu/ganesh/gl/builders/GrGLProgramBuilder.cpp", + "src/gpu/ganesh/gl/builders/GrGLProgramBuilder.h", + "src/gpu/ganesh/gl/builders/GrGLShaderStringBuilder.cpp", + "src/gpu/ganesh/gl/builders/GrGLShaderStringBuilder.h", ] GL_SRCS_UNIX = base_gl_srcs + [ diff --git a/relnotes/grdirectctx.md b/relnotes/grdirectctx.md new file mode 100644 index 000000000000..5458aeb37559 --- /dev/null +++ b/relnotes/grdirectctx.md @@ -0,0 +1,2 @@ +`GrDirectContext::flush` variants now expect a SkSurface pointer only, not +an sk_sp. \ No newline at end of file diff --git a/resources/BUILD.bazel b/resources/BUILD.bazel index ecb8d9223bfe..f3f42f85861b 100644 --- a/resources/BUILD.bazel +++ b/resources/BUILD.bazel @@ -11,7 +11,10 @@ load("//bazel:skia_rules.bzl", "skia_filegroup") # [2] https://bazel.build/reference/be/general#genrule.cmd exports_files( ["README"], - visibility = ["//tests:__pkg__"], + visibility = [ + "//gm:__pkg__", + "//tests:__pkg__", + ], ) skia_filegroup( @@ -505,5 +508,8 @@ skia_filegroup( "text/vai.txt", "//resources/sksl", ], - visibility = ["//tests:__pkg__"], + visibility = [ + "//gm:__pkg__", + "//tests:__pkg__", + ], ) diff --git a/resources/skottie/skottie-slots.json b/resources/skottie/skottie-slots.json index 62c88b55ff64..0c9d9acc81f7 100644 --- a/resources/skottie/skottie-slots.json +++ b/resources/skottie/skottie-slots.json @@ -1 +1 @@ -{"v":"5.10.1","fr":60,"ip":0,"op":2100,"w":1024,"h":768,"nm":"essential_properties_comp","ddd":0,"assets":[{"id":"image_0","w":1024,"h":1024,"u":"images/","p":"mandrill_64.png","e":0,"sid":"ImageSource"},{"id":"comp_0","nm":"comp","fr":60,"layers":[{"ddd":0,"ind":1,"ty":0,"nm":"shapes_comp","refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[512,384,0],"ix":2,"l":2},"a":{"a":0,"k":[256,192,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"w":512,"h":384,"ip":0,"op":2100,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":0,"nm":"text_comp","refId":"comp_2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[512,384,0],"ix":2,"l":2},"a":{"a":0,"k":[512,384,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"w":1024,"h":768,"ip":0,"op":2100,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":1,"nm":"Turquoise Solid 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"sid":"Solid_Rotation","a":0,"k":0,"ix":10},"p":{"a":0,"k":[512,384,0],"ix":2,"l":2},"a":{"a":0,"k":[256,192,0],"ix":1,"l":2},"s":{"sid":"Scale1","a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"sw":512,"sh":384,"sc":"#00ffbe","ip":0,"op":2100,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":0,"nm":"image_comp","refId":"comp_3","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[512,377,0],"ix":2,"l":2},"a":{"a":0,"k":[512,512,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"w":1024,"h":1024,"ip":0,"op":2100,"st":0,"bm":0}]},{"id":"comp_1","nm":"shapes_comp","fr":60,"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"sid":"Opacity","a":0,"k":0,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[160,192,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"sr","sy":1,"d":1,"pt":{"a":0,"k":5,"ix":3},"p":{"a":0,"k":[0,0],"ix":4},"r":{"a":0,"k":0,"ix":5},"ir":{"a":0,"k":30,"ix":6},"is":{"a":0,"k":0,"ix":8},"or":{"a":0,"k":80,"ix":7},"os":{"a":0,"k":0,"ix":9},"ix":1,"nm":"Polystar Path 1","mn":"ADBE Vector Shape - Star","hd":false},{"ty":"st","c":{"sid":"StrokeGroup","a":0,"k":[0.1254902035,0.446274518967,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":9,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[97,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 2","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[100,100],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"st","c":{"sid":"StrokeGroup","a":0,"k":[0.945159313725,0.27433944403,0.945159313725,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":10,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"sid":"FillsGroup","a":0,"k":[1,0.694117665291,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-68,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":3,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":2100,"st":0,"ct":1,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Shape Layer 2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[426,192,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"d":1,"ty":"el","s":{"a":0,"k":[100,100],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"sid":"StrokeGroup","a":0,"k":[0.065882354975,0.496470600367,0.21725487709,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":10,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"sid":"FillsGroup","a":0,"k":[0.429208942488,0.010746350943,0.682414215686,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":2100,"st":0,"ct":1,"bm":0}]},{"id":"comp_2","nm":"text_comp","fr":60,"layers":[{"ddd":0,"ind":1,"ty":5,"nm":"text slots","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[512.409,250,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"t":{"d":{"k":[{"s":{"s":39,"f":"ArialMT","t":"text slots","ca":0,"j":2,"tr":0,"lh":334,"ls":0,"fc":[0.822,0.685,0.294]},"t":0}],"sid":"TextSource"},"p":{},"m":{"g":1,"a":{"a":0,"k":[0,0],"ix":2}},"a":[]},"ip":0,"op":2100,"st":0,"ct":1,"bm":0}]},{"id":"comp_3","nm":"image_comp","fr":60,"layers":[{"ddd":0,"ind":1,"ty":1,"nm":"Black Solid 1","sr":1,"ks":{"o":{"a":0,"k":70,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[512,512,0],"ix":2,"l":2},"a":{"a":0,"k":[512,512,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"sw":1024,"sh":1024,"sc":"#000000","ip":0,"op":2100,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":2,"nm":"img1.png","cl":"png","refId":"image_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[512,512,0],"ix":2,"l":2},"a":{"a":0,"k":[512,512,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"ip":0,"op":2100,"st":0,"bm":0}]}],"fonts":{"list":[{"origin":0,"fPath":"","fClass":"","fFamily":"Arial","fWeight":"","fStyle":"Regular","fName":"ArialMT","ascent":71.5988159179688}]},"layers":[{"ddd":0,"ind":1,"ty":0,"nm":"comp","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[512,384,0],"ix":2,"l":2},"a":{"a":0,"k":[512,384,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"w":1024,"h":768,"ip":0,"op":2100,"st":0,"bm":0}],"markers":[],"slots":{"Solid_Rotation":{"p":{"a":0,"k":0,"ix":1},"t":4},"Scale1":{"p":{"a":0,"k":[100,100,100],"ix":2},"t":3},"FillsGroup":{"p":{"a":0,"k":[0.429208942488,0.010746350943,0.682414215686,1],"ix":1},"t":1},"StrokeGroup":{"p":{"a":0,"k":[0.065882354975,0.496470600367,0.21725487709,1],"ix":1},"t":1},"TextSource":{"p":{"k":[{"s":{"s":39,"f":"ArialMT","t":"text slots","ca":0,"j":2,"tr":0,"lh":334,"ls":0,"fc":[0.822,0.685,0.294]},"t":0}]},"t":99},"Opacity":{"p":{"a":0,"k":100,"ix":7},"t":4},"ImageSource":{"t":50,"p":{"id":"image_0","w":1024,"h":1024,"u":"images/","p":"triangle.png","e":0}}},"props":{}} \ No newline at end of file +{"v":"5.12.2","fr":60,"ip":0,"op":2100,"w":1024,"h":768,"nm":"essential_properties_comp","ddd":0,"assets":[{"id":"image_0","w":1024,"h":1024,"u":"images/","p":"triangle.png","e":0,"sid":"ImageSource"},{"id":"comp_0","nm":"comp","fr":60,"layers":[{"ddd":0,"ind":1,"ty":0,"nm":"shapes_comp","refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[512,384,0],"ix":2,"l":2},"a":{"a":0,"k":[256,192,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"w":512,"h":384,"ip":0,"op":2100,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":0,"nm":"text_comp","refId":"comp_2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[512,384,0],"ix":2,"l":2},"a":{"a":0,"k":[512,384,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"w":1024,"h":768,"ip":0,"op":2100,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":1,"nm":"Turquoise Solid 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"sid":"Solid_Rotation","a":0,"k":0,"ix":10},"p":{"a":0,"k":[512,384,0],"ix":2,"l":2},"a":{"a":0,"k":[256,192,0],"ix":1,"l":2},"s":{"sid":"Scale1","a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"ef":[{"ty":5,"nm":"Gradient Ramp","np":10,"mn":"ADBE Ramp","ix":1,"en":1,"ef":[{"ty":3,"nm":"Start of Ramp","mn":"ADBE Ramp-0001","ix":1,"v":{"a":0,"k":[256,0],"ix":1}},{"ty":2,"nm":"Start Color","mn":"ADBE Ramp-0002","ix":2,"v":{"sid":"GradientStart","a":0,"k":[0.078658692539,0.146002575755,0.556924045086,1],"ix":2}},{"ty":3,"nm":"End of Ramp","mn":"ADBE Ramp-0003","ix":3,"v":{"a":0,"k":[256,384],"ix":3}},{"ty":2,"nm":"End Color","mn":"ADBE Ramp-0004","ix":4,"v":{"sid":"GradientEnd","a":0,"k":[1,1,1,1],"ix":4}},{"ty":7,"nm":"Ramp Shape","mn":"ADBE Ramp-0005","ix":5,"v":{"a":0,"k":1,"ix":5}},{"ty":0,"nm":"Ramp Scatter","mn":"ADBE Ramp-0006","ix":6,"v":{"a":0,"k":0,"ix":6}},{"ty":0,"nm":"Blend With Original","mn":"ADBE Ramp-0007","ix":7,"v":{"a":0,"k":0,"ix":7}},{"ty":6,"nm":"","mn":"ADBE Ramp-0008","ix":8,"v":0}]}],"sw":512,"sh":384,"sc":"#00ffbe","ip":0,"op":2100,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":0,"nm":"image_comp","refId":"comp_3","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[512,377,0],"ix":2,"l":2},"a":{"a":0,"k":[512,512,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"w":1024,"h":1024,"ip":0,"op":2100,"st":0,"bm":0}]},{"id":"comp_1","nm":"shapes_comp","fr":60,"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"sid":"Opacity","a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[160,192,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"sr","sy":1,"d":1,"pt":{"a":0,"k":5,"ix":3},"p":{"a":0,"k":[0,0],"ix":4},"r":{"a":0,"k":0,"ix":5},"ir":{"a":0,"k":30,"ix":6},"is":{"a":0,"k":0,"ix":8},"or":{"a":0,"k":80,"ix":7},"os":{"a":0,"k":0,"ix":9},"ix":1,"nm":"Polystar Path 1","mn":"ADBE Vector Shape - Star","hd":false},{"ty":"st","c":{"sid":"StrokeGroup","a":0,"k":[0.1254902035,0.446274518967,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":9,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[97,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":0,"s":[100,100]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":615,"s":[130,130]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":1210,"s":[102,102]},{"i":{"x":[0.833,0.833],"y":[0.833,0.833]},"o":{"x":[0.167,0.167],"y":[0.167,0.167]},"t":1760,"s":[142,142]},{"t":2099,"s":[100,100]}],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 2","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[100,100],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"st","c":{"sid":"StrokeGroup","a":0,"k":[0.945159313725,0.27433944403,0.945159313725,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":10,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"sid":"FillsGroup","a":0,"k":[1,0.694117665291,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-68,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[0]},{"t":2099,"s":[1800]}],"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":3,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":2100,"st":0,"ct":1,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Shape Layer 2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[426,192,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"d":1,"ty":"el","s":{"a":0,"k":[100,100],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"sid":"StrokeGroup","a":0,"k":[0.065882354975,0.496470600367,0.21725487709,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":10,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"sid":"FillsGroup","a":0,"k":[0.429208942488,0.010746350943,0.682414215686,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false}],"ip":0,"op":2100,"st":0,"ct":1,"bm":0}]},{"id":"comp_2","nm":"text_comp","fr":60,"layers":[{"ddd":0,"ind":1,"ty":5,"nm":"text slots","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[512.409,250,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"t":{"d":{"k":[{"s":{"s":39,"f":"ArialMT","t":"text slots","ca":0,"j":2,"tr":0,"lh":334,"ls":0,"fc":[0.822,0.685,0.294]},"t":0}],"sid":"TextSource"},"p":{},"m":{"g":1,"a":{"a":0,"k":[0,0],"ix":2}},"a":[]},"ip":0,"op":2100,"st":0,"ct":1,"bm":0}]},{"id":"comp_3","nm":"image_comp","fr":60,"layers":[{"ddd":0,"ind":1,"ty":1,"nm":"Black Solid 1","sr":1,"ks":{"o":{"a":0,"k":70,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[512,512,0],"ix":2,"l":2},"a":{"a":0,"k":[512,512,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"sw":1024,"sh":1024,"sc":"#000000","ip":0,"op":2100,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":2,"nm":"img1.png","cl":"png","refId":"image_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[512,512,0],"ix":2,"l":2},"a":{"a":0,"k":[512,512,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"ip":0,"op":2100,"st":0,"bm":0}]}],"fonts":{"list":[{"origin":0,"fPath":"","fClass":"","fFamily":"Arial","fWeight":"","fStyle":"Regular","fName":"ArialMT","ascent":71.5988159179688}]},"layers":[{"ddd":0,"ind":1,"ty":0,"nm":"comp","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[512,384,0],"ix":2,"l":2},"a":{"a":0,"k":[512,384,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"w":1024,"h":768,"ip":0,"op":2100,"st":0,"bm":0}],"markers":[],"slots":{"Solid_Rotation":{"p":{"a":0,"k":0,"ix":1},"t":4},"Scale1":{"p":{"a":0,"k":[100,100,100],"ix":2},"t":3},"FillsGroup":{"p":{"a":0,"k":[0.429208942488,0.010746350943,0.682414215686,1],"ix":1},"t":1},"StrokeGroup":{"p":{"a":0,"k":[0.065882354975,0.496470600367,0.21725487709,1],"ix":1},"t":1},"TextSource":{"p":{"k":[{"s":{"s":39,"f":"ArialMT","t":"text slots","ca":0,"j":2,"tr":0,"lh":334,"ls":0,"fc":[0.822,0.685,0.294]},"t":0}]},"t":99},"Opacity":{"p":{"a":0,"k":100,"ix":7},"t":4},"GradientStart":{"p":{"a":0,"k":[0.078658692539,0.146002575755,0.556924045086,1],"ix":9},"t":99},"GradientEnd":{"p":{"a":0,"k":[1,1,1,1],"ix":10},"t":99},"ImageSource":{"t":50,"p":{"id":"image_0","w":1024,"h":1024,"u":"images/","p":"triangle.png","e":0}}},"props":{}} \ No newline at end of file diff --git a/resources/sksl/BUILD.bazel b/resources/sksl/BUILD.bazel index 6c3ab99a33c1..a62d516f5cd7 100644 --- a/resources/sksl/BUILD.bazel +++ b/resources/sksl/BUILD.bazel @@ -5,6 +5,7 @@ skia_filegroup( name = "sksl", srcs = [ ":sksl_blend_tests", + ":sksl_compute_tests", ":sksl_error_tests", ":sksl_folding_tests", ":sksl_glsl_tests", @@ -62,6 +63,7 @@ skia_filegroup( name = "sksl_metal_tests_sources", srcs = [ ":sksl_blend_tests", + ":sksl_compute_tests", ":sksl_metal_tests", ":sksl_shared_tests", ], @@ -96,6 +98,7 @@ skia_filegroup( name = "sksl_spirv_tests_sources", srcs = [ ":sksl_blend_tests", + ":sksl_compute_tests", ":sksl_shared_tests", ":sksl_spirv_tests", ], @@ -115,13 +118,11 @@ skia_filegroup( # Tests in sksl_wgsl_tests_sources will be compiled with --settings on, and are expected to generate # a .wgsl output file. -# TODO(skia:13092): WGSL support is WIP and the test sources added here are copies of a subset of -# shared test sources to track development progress. Eventually we want this to at a minimum equal -# sksl_shared_tests. skia_filegroup( name = "sksl_wgsl_tests_sources", srcs = [ ":sksl_blend_tests", + ":sksl_shared_tests", ":sksl_wgsl_tests", ], visibility = ["//tools/skslc:__pkg__"], @@ -162,6 +163,25 @@ skia_filegroup( ], ) +skia_filegroup( + name = "sksl_compute_tests", + srcs = [ + "compute/ArrayAdd.compute", + "compute/AtomicDeclarations.compute", + "compute/AtomicOperations.compute", + "compute/AtomicOperationsOverArrayAndStruct.compute", + "compute/Barrier.compute", + "compute/BuiltinStageInputs.compute", + "compute/Desaturate.compute", + "compute/DesaturateFunction.compute", + "compute/DesaturateReadWrite.compute", + "compute/MatrixMultiply.compute", + "compute/Raytrace.compute", + "compute/Uniforms.compute", + "compute/Workgroup.compute", + ], +) + skia_filegroup( name = "sksl_error_tests", srcs = [ @@ -238,6 +258,7 @@ skia_filegroup( "errors/DuplicateRTAdjust.sksl", "errors/DuplicateSkClockwise.sksl", "errors/DuplicateSymbol.rts", + "errors/DuplicateWorkgroupSize.compute", "errors/EmptyArray.rts", "errors/EmptyBuffer.sksl", "errors/EmptyStruct.rts", @@ -268,15 +289,19 @@ skia_filegroup( "errors/InvalidAssignmentPipelineInputs.sksl", "errors/InvalidAtomicDeclarations.compute", "errors/InvalidAtomicOperations.compute", - "errors/InvalidBackendBindingFlagsGL.sksl", "errors/InvalidBackendBindingFlagsMetal.sksl", "errors/InvalidBackendBindingFlagsSPIRV.sksl", "errors/InvalidBackendBindingFlagsWGSL.sksl", "errors/InvalidExtensionDirective.sksl", - "errors/InvalidOutParams.rts", + "errors/InvalidInOutType.compute", + "errors/InvalidLocalSizeQualifier.compute", + "errors/InvalidMainParameters.compute", + "errors/InvalidMainReturn.compute", + "errors/InvalidOutParams.sksl", "errors/InvalidToken.rts", "errors/InvalidUnary.rts", "errors/InvalidUniformTypes.sksl", + "errors/InvalidUnsizedArray.compute", "errors/InvalidVersionDirective.sksl", "errors/InvalidWorkgroupCompute.compute", "errors/InvalidWorkgroupRTS.rts", @@ -293,6 +318,8 @@ skia_filegroup( "errors/MatrixToVectorCastTooSmall.rts", "errors/MismatchedNumbers.rts", "errors/MismatchedNumbersES3.sksl", + "errors/MisplacedLocalSizeQualifier.sksl", + "errors/MissingWorkgroupSize.compute", "errors/ModifiersInStruct.rts", "errors/ModifiersRepeated.sksl", "errors/MultipleBackendFlags.sksl", @@ -519,6 +546,7 @@ skia_filegroup( skia_filegroup( name = "sksl_inliner_tests", srcs = [ + "inliner/CommaExpressionsAllowInlining.sksl", "inliner/DoWhileBodyMustBeInlinedIntoAScope.sksl", "inliner/DoWhileTestCannotBeInlined.sksl", "inliner/ForBodyMustBeInlinedIntoAScope.sksl", @@ -547,6 +575,7 @@ skia_filegroup( "inliner/ModifiedArrayParametersCannotBeInlined.sksl", "inliner/ModifiedStructParametersCannotBeInlined.sksl", "inliner/NoInline.sksl", + "inliner/OpaqueCallsCannotBeInlined.sksl", "inliner/Ossfuzz37994.sksl", "inliner/ShortCircuitEvaluationsCannotInlineRightHandSide.sksl", "inliner/StaticSwitch.sksl", @@ -566,24 +595,6 @@ skia_filegroup( skia_filegroup( name = "sksl_metal_tests", srcs = [ - "compute/ArrayAdd.compute", - "compute/AtomicDeclarations.compute", - "compute/AtomicOperations.compute", - "compute/AtomicOperationsOverArrayAndStruct.compute", - "compute/Barrier.compute", - "compute/BuiltinStageInputs.compute", - "compute/Desaturate.compute", - "compute/DesaturateFunction.compute", - "compute/DesaturateReadWrite.compute", - "compute/MatrixMultiply.compute", - "compute/Raytrace.compute", - "compute/Uniforms.compute", - "compute/Workgroup.compute", - "errors/ArrayUnspecifiedDimensions.sksl", - "errors/InvalidInOutType.compute", - "errors/InvalidMainParameters.compute", - "errors/InvalidMainReturn.compute", - "errors/InvalidUnsizedArray.compute", "metal/CastHalf4ToMat2x2.sksl", "metal/CastMat2x2ToMat3x3.sksl", "metal/CastMat2x3ToMat4x4.sksl", @@ -662,6 +673,7 @@ skia_filegroup( "realistic/BlueNeurons.rts", "realistic/HSLColorFilter.rtcf", "realistic/HighContrastFilter.rtcf", + "realistic/RippleShader.rts", "runtime/AllowNarrowingConversions.rts", "runtime/ArrayIndexing.rts", "runtime/ArrayNarrowingConversions.rts", @@ -887,6 +899,7 @@ skia_filegroup( "shared/InoutParameters.sksl", "shared/InoutParamsAreDistinct.sksl", "shared/InstanceID.vert", + "shared/InstanceIDInFunction.vert", "shared/IntegerDivisionES3.sksl", "shared/InterfaceBlockBuffer.sksl", "shared/InterfaceBlockMultipleAnonymous.sksl", @@ -930,6 +943,7 @@ skia_filegroup( "shared/Ossfuzz41000.sksl", "shared/Ossfuzz50636.sksl", "shared/Ossfuzz58483.sksl", + "shared/Ossfuzz60077.sksl", "shared/OutParams.sksl", "shared/OutParamsAreDistinct.sksl", "shared/OutParamsAreDistinctFromGlobal.sksl", @@ -971,6 +985,7 @@ skia_filegroup( "shared/StructsInFunctions.sksl", "shared/SwitchWithEarlyReturn.sksl", "shared/SwizzleAsLValue.sksl", + "shared/SwizzleAsLValueES3.sksl", "shared/SwizzleBoolConstants.sksl", "shared/SwizzleByConstantIndex.sksl", "shared/SwizzleByIndex.sksl", @@ -1001,6 +1016,7 @@ skia_filegroup( "shared/VectorScalarMath.sksl", "shared/VectorToMatrixCast.sksl", "shared/VertexID.vert", + "shared/VertexIDInFunction.vert", "shared/WhileLoopControlFlow.sksl", ], ) @@ -1042,6 +1058,8 @@ skia_filegroup( skia_filegroup( name = "sksl_wgsl_tests", srcs = [ + "spirv/CombinedSamplerTypeDawnCompatMode.sksl", + "spirv/FunctionParametersOfTextureAndSamplerTypeDawnCompatMode.sksl", "wgsl/BuiltinFragmentStageIO.sksl", "wgsl/BuiltinVertexStageIO.vert", "wgsl/CastMat2x2ToMat3x3.sksl", @@ -1055,156 +1073,16 @@ skia_filegroup( "wgsl/GlobalUniforms.sksl", "wgsl/IfStatement.sksl", "wgsl/IndexExpression.sksl", + "wgsl/InterfaceBlockUniforms.sksl", "wgsl/MainDoesNotHaveFragCoordParameter.sksl", "wgsl/MainHasFragCoordParameter.sksl", "wgsl/MainHasVoidReturn.sksl", "wgsl/MatrixConstructorDiagonal.sksl", "wgsl/OutParams.sksl", + "wgsl/Sample.sksl", "wgsl/TernaryThenShortCircuit.sksl", + "wgsl/UniformMatrices.sksl", "wgsl/UserDefinedPipelineIO.sksl", "wgsl/VertexPositionOutputIsAlwaysDeclared.vert", - - # Shared tests that are supported so far: - "runtime/LoopFloat.rts", - "runtime/LoopInt.rts", - "runtime/GlobalVariables.rts", - "runtime/GLSLTypeNames.rts", - "runtime/LargeProgram_BlocklessLoops.rts", - "runtime/LargeProgram_FlatLoop.rts", - "runtime/LargeProgram_Functions.rts", - "runtime/LargeProgram_NestedLoops.rts", - "runtime/LargeProgram_SplitLoops.rts", - "runtime/LargeProgram_ZeroIterFor.rts", - "runtime/RecursiveComparison_Arrays.rts", - "runtime/RecursiveComparison_Structs.rts", - "runtime/RecursiveComparison_Types.rts", - "runtime/RecursiveComparison_Vectors.rts", - "runtime/QualifierOrder.rts", - "inliner/DoWhileTestCannotBeInlined.sksl", - "intrinsics/AbsFloat.sksl", - "intrinsics/AbsInt.sksl", - "intrinsics/Acos.sksl", - "intrinsics/Asin.sksl", - "intrinsics/Atan.sksl", - "intrinsics/Ceil.sksl", - "intrinsics/ClampFloat.sksl", - "intrinsics/ClampInt.sksl", - "intrinsics/ClampUInt.sksl", - "intrinsics/Cos.sksl", - "intrinsics/Degrees.sksl", - "intrinsics/Dot.sksl", - "intrinsics/Equal.sksl", - "intrinsics/Exp.sksl", - "intrinsics/Exp2.sksl", - "intrinsics/FaceForward.sksl", - "intrinsics/Floor.sksl", - "intrinsics/Fract.sksl", - "intrinsics/GreaterThan.sksl", - "intrinsics/GreaterThanEqual.sksl", - "intrinsics/Inversesqrt.sksl", - "intrinsics/LessThan.sksl", - "intrinsics/LessThanEqual.sksl", - "intrinsics/Log.sksl", - "intrinsics/Log2.sksl", - "intrinsics/MaxFloat.sksl", - "intrinsics/MaxInt.sksl", - "intrinsics/MaxUint.sksl", - "intrinsics/MinFloat.sksl", - "intrinsics/MinInt.sksl", - "intrinsics/MinUint.sksl", - "intrinsics/MixBool.sksl", - "intrinsics/MixFloatES2.sksl", - "intrinsics/MixFloatES3.sksl", - "intrinsics/Mod.sksl", - "intrinsics/Normalize.sksl", - "intrinsics/Not.sksl", - "intrinsics/NotEqual.sksl", - "intrinsics/Pow.sksl", - "intrinsics/Radians.sksl", - "intrinsics/SignFloat.sksl", - "intrinsics/SignInt.sksl", - "intrinsics/Sin.sksl", - "intrinsics/Smoothstep.sksl", - "intrinsics/Sqrt.sksl", - "intrinsics/Step.sksl", - "intrinsics/Tan.sksl", - "shared/ArrayComparison.sksl", - "shared/ArrayConstructors.sksl", - "shared/ArrayFollowedByScalar.sksl", - "shared/ArrayIndexTypes.sksl", - "shared/ArrayTypes.sksl", - "shared/Assignment.sksl", - "shared/CommaMixedTypes.sksl", - "shared/CommaSideEffects.sksl", - "shared/ConstArray.sksl", - "shared/ConstGlobal.sksl", - "shared/ConstantIf.sksl", - "shared/Control.sksl", - "shared/DeadDoWhileLoop.sksl", - "shared/DeadReturn.sksl", - "shared/DeadReturnES3.sksl", - "shared/Discard.sksl", - "shared/DoWhileControlFlow.sksl", - "shared/EmptyBlocksES2.sksl", - "shared/EmptyBlocksES3.sksl", - "shared/ForLoopMultipleInit.sksl", - "shared/FunctionAnonymousParameters.sksl", - "shared/HelloWorld.sksl", - "shared/InoutParameters.sksl", - "shared/InoutParamsAreDistinct.sksl", - "shared/InstanceID.vert", - "shared/IntegerDivisionES3.sksl", - "shared/LogicalAndShortCircuit.sksl", - "shared/LogicalOrShortCircuit.sksl", - "shared/Matrices.sksl", - "shared/MatrixConstructorsES2.sksl", - "shared/MatrixConstructorsES3.sksl", - "shared/MatrixEquality.sksl", - "shared/MatrixIndexLookup.sksl", - "shared/MatrixIndexStore.sksl", - "shared/OutParams.sksl", - "shared/OutParamsAreDistinct.sksl", - "shared/OutParamsAreDistinctFromGlobal.sksl", - "shared/OutParamsDoubleSwizzle.sksl", - "shared/OutParamsFunctionCallInArgument.sksl", - "shared/PostfixExpressions.sksl", - "shared/PrefixExpressionsES2.sksl", - "shared/PrefixExpressionsES3.sksl", - "shared/ReturnsValueOnEveryPathES2.sksl", - "shared/Switch.sksl", - "shared/SwitchDefaultOnly.sksl", - "shared/SwitchWithEarlyReturn.sksl", - "shared/SwitchWithFallthrough.sksl", - "shared/SwitchWithFallthroughAndVarDecls.sksl", - "shared/SwitchWithLoops.sksl", - "shared/SwitchWithLoopsES3.sksl", - "shared/StructArrayFollowedByScalar.sksl", - "shared/StructComparison.sksl", - "shared/StructIndexLookup.sksl", - "shared/StructIndexStore.sksl", - "shared/Structs.sksl", - "shared/StructsInFunctions.sksl", - "shared/SwizzleAsLValue.sksl", - "shared/SwizzleBoolConstants.sksl", - "shared/SwizzleByConstantIndex.sksl", - "shared/SwizzleByIndex.sksl", - "shared/SwizzleConstants.sksl", - "shared/SwizzleIndexLookup.sksl", - "shared/SwizzleIndexStore.sksl", - "shared/SwizzleLTRB.sksl", - "shared/SwizzleOpt.sksl", - "shared/SwizzleScalar.sksl", - "shared/SwizzleScalarBool.sksl", - "shared/SwizzleScalarInt.sksl", - "shared/TernaryComplexNesting.sksl", - "shared/TernaryExpression.sksl", - "shared/TernaryNesting.sksl", - "shared/TernaryTrueFalseOptimization.sksl", - "shared/UnaryPositiveNegative.sksl", - "shared/UnusedVariables.sksl", - "shared/UniformMatrixResize.sksl", - "shared/VectorConstructors.sksl", - "shared/VertexID.vert", - "shared/WhileLoopControlFlow.sksl", ], ) diff --git a/resources/sksl/compute/ArrayAdd.compute b/resources/sksl/compute/ArrayAdd.compute index a26c2327cc38..5239fdfd931d 100644 --- a/resources/sksl/compute/ArrayAdd.compute +++ b/resources/sksl/compute/ArrayAdd.compute @@ -1,3 +1,5 @@ +layout(local_size_x = 256) in; + layout(set=0, binding=0) readonly buffer inputBlock { uint offset; diff --git a/resources/sksl/compute/AtomicDeclarations.compute b/resources/sksl/compute/AtomicDeclarations.compute index 27389fff36cd..1a355280597c 100644 --- a/resources/sksl/compute/AtomicDeclarations.compute +++ b/resources/sksl/compute/AtomicDeclarations.compute @@ -1,3 +1,5 @@ +layout(local_size_x = 64) in; + struct S { atomicUint structMemberAtomic; // valid atomicUint structMemberAtomicArray[2]; // valid diff --git a/resources/sksl/compute/AtomicOperations.compute b/resources/sksl/compute/AtomicOperations.compute index 9a71baba7379..e44d6ba0a256 100644 --- a/resources/sksl/compute/AtomicOperations.compute +++ b/resources/sksl/compute/AtomicOperations.compute @@ -1,3 +1,5 @@ +layout(local_size_x = 64) in; + layout(metal, binding = 0) buffer ssbo { atomicUint globalCounter; }; diff --git a/resources/sksl/compute/AtomicOperationsOverArrayAndStruct.compute b/resources/sksl/compute/AtomicOperationsOverArrayAndStruct.compute index 8e12690eb9e6..450f76f69f4f 100644 --- a/resources/sksl/compute/AtomicOperationsOverArrayAndStruct.compute +++ b/resources/sksl/compute/AtomicOperationsOverArrayAndStruct.compute @@ -1,4 +1,5 @@ -const uint WORKGROUP_SIZE = 1024; +layout(local_size_x = 256) in; +const uint WORKGROUP_SIZE = 256; struct GlobalCounts { atomicUint firstHalfCount; diff --git a/resources/sksl/compute/Barrier.compute b/resources/sksl/compute/Barrier.compute index 25367204287b..1a104e96204f 100644 --- a/resources/sksl/compute/Barrier.compute +++ b/resources/sksl/compute/Barrier.compute @@ -1,3 +1,5 @@ +layout(local_size_x = 64) in; + void main() { workgroupBarrier(); storageBarrier(); diff --git a/resources/sksl/compute/BuiltinStageInputs.compute b/resources/sksl/compute/BuiltinStageInputs.compute index 18ba4d222e7b..a7248d841db1 100644 --- a/resources/sksl/compute/BuiltinStageInputs.compute +++ b/resources/sksl/compute/BuiltinStageInputs.compute @@ -1,3 +1,5 @@ +layout(local_size_x = 64) in; + layout(metal, binding = 0) buffer outputs { uint outputBuffer[]; }; diff --git a/resources/sksl/compute/Desaturate.compute b/resources/sksl/compute/Desaturate.compute index 1599303acd07..fa6e5d6d8c0a 100644 --- a/resources/sksl/compute/Desaturate.compute +++ b/resources/sksl/compute/Desaturate.compute @@ -1,3 +1,5 @@ +layout(local_size_x = 16, local_size_y = 16) in; + layout(binding=0) readonly texture2D src; layout(binding=1) writeonly texture2D dest; diff --git a/resources/sksl/compute/DesaturateFunction.compute b/resources/sksl/compute/DesaturateFunction.compute index ed01d864091d..f45b37578171 100644 --- a/resources/sksl/compute/DesaturateFunction.compute +++ b/resources/sksl/compute/DesaturateFunction.compute @@ -1,3 +1,5 @@ +layout(local_size_x = 16, local_size_y = 16) in; + layout(binding=0) readonly texture2D src; layout(binding=1) writeonly texture2D dest; diff --git a/resources/sksl/compute/DesaturateReadWrite.compute b/resources/sksl/compute/DesaturateReadWrite.compute index 10250c319e67..99af4a3401c3 100644 --- a/resources/sksl/compute/DesaturateReadWrite.compute +++ b/resources/sksl/compute/DesaturateReadWrite.compute @@ -1,3 +1,5 @@ +layout(local_size_x = 16, local_size_y = 16) in; + layout(binding=0) texture2D tex; half4 desaturate(half4 color) { diff --git a/resources/sksl/compute/MatrixMultiply.compute b/resources/sksl/compute/MatrixMultiply.compute index 20f4db4627d8..8ce5dee7ec6a 100644 --- a/resources/sksl/compute/MatrixMultiply.compute +++ b/resources/sksl/compute/MatrixMultiply.compute @@ -1,3 +1,5 @@ +layout(local_size_x = 16, local_size_y = 16) in; + layout(set=0, binding=0) buffer sizeBuffer { int2[] sizes; // in1, in2, out }; diff --git a/resources/sksl/compute/Raytrace.compute b/resources/sksl/compute/Raytrace.compute index 7e1ff4e5a374..1dd2cd70bd0b 100644 --- a/resources/sksl/compute/Raytrace.compute +++ b/resources/sksl/compute/Raytrace.compute @@ -1,3 +1,5 @@ +layout(local_size_x = 16, local_size_y = 16) in; + layout(binding=0) writeonly texture2D dest; void main () { diff --git a/resources/sksl/compute/Uniforms.compute b/resources/sksl/compute/Uniforms.compute index 8412b177102e..d72763714e35 100644 --- a/resources/sksl/compute/Uniforms.compute +++ b/resources/sksl/compute/Uniforms.compute @@ -1,3 +1,5 @@ +layout(local_size_x = 64) in; + layout(set=0, binding=0) uniform constants { int x; }; diff --git a/resources/sksl/compute/Workgroup.compute b/resources/sksl/compute/Workgroup.compute index 14ed1c45b568..b4a42c940d26 100644 --- a/resources/sksl/compute/Workgroup.compute +++ b/resources/sksl/compute/Workgroup.compute @@ -1,6 +1,7 @@ // Implementation of the parallel prefix sum algorithm -const int SIZE = 512; +layout(local_size_x = 256) in; +const int SIZE = 256; layout(set=0, binding=0) readonly buffer inputs { float[] in_data; diff --git a/resources/sksl/errors/DuplicateWorkgroupSize.compute b/resources/sksl/errors/DuplicateWorkgroupSize.compute new file mode 100644 index 000000000000..8ed85a83175f --- /dev/null +++ b/resources/sksl/errors/DuplicateWorkgroupSize.compute @@ -0,0 +1,16 @@ +layout(local_size_x = 16) in; +layout(local_size_x = 64) in; +layout(local_size_y = 16) in; +layout(local_size_y = 64) in; +layout(local_size_z = 1) in; +layout(local_size_z = 1) in; +layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) in; + +/*%%* +'local_size_x' was specified more than once +'local_size_y' was specified more than once +'local_size_z' was specified more than once +'local_size_x' was specified more than once +'local_size_y' was specified more than once +'local_size_z' was specified more than once +*%%*/ diff --git a/resources/sksl/errors/InvalidBackendBindingFlagsGL.sksl b/resources/sksl/errors/InvalidBackendBindingFlagsGL.sksl deleted file mode 100644 index e6ecf6186029..000000000000 --- a/resources/sksl/errors/InvalidBackendBindingFlagsGL.sksl +++ /dev/null @@ -1,17 +0,0 @@ -// Valid declarations: -layout(gl, binding=0) uniform ubo1 { float a; }; // valid -layout(gl, binding=0) buffer ssbo { float b; }; // valid -layout(gl, binding=0) uniform texture2D texture1; // valid -layout(gl, binding=0) uniform sampler2D sampler1; // valid - -// Invalid declarations: -layout(gl, texture=0) uniform texture2D texture2; // invalid -layout(gl, texture=0, sampler=0) uniform sampler2D sampler2; // invalid -layout(gl, set=0, binding=0) uniform ubo2 { float c; }; // invalid - -/*%%* -layout qualifier 'texture' is not permitted here -layout qualifier 'texture' is not permitted here -layout qualifier 'sampler' is not permitted here -layout qualifier 'set' is not permitted here -*%%*/ diff --git a/resources/sksl/errors/InvalidLocalSizeQualifier.compute b/resources/sksl/errors/InvalidLocalSizeQualifier.compute new file mode 100644 index 000000000000..3d00b8e54b7b --- /dev/null +++ b/resources/sksl/errors/InvalidLocalSizeQualifier.compute @@ -0,0 +1,38 @@ +layout(local_size_x = 16, local_size_y = 16, local_size_z = 1); +layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) out; +layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) inout; +layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) const; +layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) uniform; +layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) buffer; +layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) workgroup; +layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) highp; +layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) mediump; +layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) lowp; +layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) flat; +layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) noperspective; +layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) readonly; +layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) writeonly; + +layout(local_size_x = 16) out; +layout(local_size_y = 16) out; +layout(local_size_z = 16) out; + +/*%%* +local size layout qualifiers must be defined using an 'in' declaration +local size layout qualifiers must be defined using an 'in' declaration +local size layout qualifiers must be defined using an 'in' declaration +local size layout qualifiers must be defined using an 'in' declaration +local size layout qualifiers must be defined using an 'in' declaration +local size layout qualifiers must be defined using an 'in' declaration +local size layout qualifiers must be defined using an 'in' declaration +local size layout qualifiers must be defined using an 'in' declaration +local size layout qualifiers must be defined using an 'in' declaration +local size layout qualifiers must be defined using an 'in' declaration +local size layout qualifiers must be defined using an 'in' declaration +local size layout qualifiers must be defined using an 'in' declaration +local size layout qualifiers must be defined using an 'in' declaration +local size layout qualifiers must be defined using an 'in' declaration +local size layout qualifiers must be defined using an 'in' declaration +local size layout qualifiers must be defined using an 'in' declaration +local size layout qualifiers must be defined using an 'in' declaration +*%%*/ diff --git a/resources/sksl/errors/InvalidOutParams.rts b/resources/sksl/errors/InvalidOutParams.rts deleted file mode 100644 index 9df805e20e9b..000000000000 --- a/resources/sksl/errors/InvalidOutParams.rts +++ /dev/null @@ -1,12 +0,0 @@ -void inc1(out float x) { x++; } -void inc4(out float4 x) { x += half4(1); } - -void test_a() { inc1(0); } -void test_b() { inc4(float4(0)); } -void test_c() { inc1(sqrt(1)); } - -/*%%* -cannot assign to this expression -cannot assign to this expression -cannot assign to this expression -*%%*/ diff --git a/resources/sksl/errors/InvalidOutParams.sksl b/resources/sksl/errors/InvalidOutParams.sksl new file mode 100644 index 000000000000..6f3b217b81d5 --- /dev/null +++ b/resources/sksl/errors/InvalidOutParams.sksl @@ -0,0 +1,19 @@ +void inc1(out float x) { x++; } +void inc4(out float4 x) { x += half4(1); } + +void test_a() { inc1(0); } +void test_b() { inc4(float4(0)); } +void test_c() { inc1(sqrt(1)); } + +// $pure isn't allowed outside of module code, but the test still does its job; it just reports an +// additional error as well ('$pure' is not permitted here). +$pure void pure_function_with_out_param (out float x) { x = 1; } +$pure void pure_function_with_inout_param(inout float x) { x += 1; } + +/*%%* +cannot assign to this expression +cannot assign to this expression +cannot assign to this expression +pure functions cannot have out parameters +pure functions cannot have out parameters +*%%*/ diff --git a/resources/sksl/errors/LayoutInFunctions.sksl b/resources/sksl/errors/LayoutInFunctions.sksl index f4a581e00068..fdac31abd065 100644 --- a/resources/sksl/errors/LayoutInFunctions.sksl +++ b/resources/sksl/errors/LayoutInFunctions.sksl @@ -12,7 +12,7 @@ layout ( input_attachment_index = 1, spirv, metal, - gl) + wgsl) void on_return() {} void on_param( @@ -30,7 +30,7 @@ layout ( input_attachment_index = 1, spirv, metal, - gl) float x) {} + wgsl) float x) {} /*%%* only one backend qualifier can be used @@ -47,7 +47,7 @@ layout qualifier 'builtin' is not permitted here layout qualifier 'input_attachment_index' is not permitted here layout qualifier 'spirv' is not permitted here layout qualifier 'metal' is not permitted here -layout qualifier 'gl' is not permitted here +layout qualifier 'wgsl' is not permitted here only one backend qualifier can be used layout qualifier 'origin_upper_left' is not permitted here layout qualifier 'push_constant' is not permitted here @@ -62,5 +62,5 @@ layout qualifier 'builtin' is not permitted here layout qualifier 'input_attachment_index' is not permitted here layout qualifier 'spirv' is not permitted here layout qualifier 'metal' is not permitted here -layout qualifier 'gl' is not permitted here +layout qualifier 'wgsl' is not permitted here *%%*/ diff --git a/resources/sksl/errors/LayoutRepeatedQualifiers.sksl b/resources/sksl/errors/LayoutRepeatedQualifiers.sksl index 1a4a2d51da9b..0921d27b2a3f 100644 --- a/resources/sksl/errors/LayoutRepeatedQualifiers.sksl +++ b/resources/sksl/errors/LayoutRepeatedQualifiers.sksl @@ -12,7 +12,7 @@ layout ( input_attachment_index = 1, spirv, metal, - gl, + wgsl, origin_upper_left, push_constant, @@ -27,7 +27,7 @@ layout ( input_attachment_index = 2, spirv, metal, - gl + wgsl ) float x; /*%%* @@ -44,7 +44,7 @@ layout qualifier 'builtin' appears more than once layout qualifier 'input_attachment_index' appears more than once layout qualifier 'spirv' appears more than once layout qualifier 'metal' appears more than once -layout qualifier 'gl' appears more than once +layout qualifier 'wgsl' appears more than once 'layout(color)' is only permitted in runtime effects 'layout(color)' is only permitted on 'uniform' variables 'layout(color)' is not permitted on variables of type 'float' diff --git a/resources/sksl/errors/MisplacedLocalSizeQualifier.sksl b/resources/sksl/errors/MisplacedLocalSizeQualifier.sksl new file mode 100644 index 000000000000..808871d5927b --- /dev/null +++ b/resources/sksl/errors/MisplacedLocalSizeQualifier.sksl @@ -0,0 +1,11 @@ +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +layout(local_size_x = 1) in; +layout(local_size_y = 1) in; +layout(local_size_z = 1) in; + +/*%%* +local size layout qualifiers are only allowed in a compute program +local size layout qualifiers are only allowed in a compute program +local size layout qualifiers are only allowed in a compute program +local size layout qualifiers are only allowed in a compute program +*%%*/ diff --git a/resources/sksl/errors/MissingWorkgroupSize.compute b/resources/sksl/errors/MissingWorkgroupSize.compute new file mode 100644 index 000000000000..d4157bfd971e --- /dev/null +++ b/resources/sksl/errors/MissingWorkgroupSize.compute @@ -0,0 +1,3 @@ +/*%%* +compute programs must specify a workgroup size +*%%*/ diff --git a/resources/sksl/errors/MultipleBackendFlags.sksl b/resources/sksl/errors/MultipleBackendFlags.sksl index 7f842ad56d73..c834cfc2ac3f 100644 --- a/resources/sksl/errors/MultipleBackendFlags.sksl +++ b/resources/sksl/errors/MultipleBackendFlags.sksl @@ -1,4 +1,4 @@ -layout(metal, spirv, wgsl, gl, binding = 0) uniform ubo { float f; }; // multiple backends +layout(metal, spirv, wgsl, binding = 0) uniform ubo { float f; }; // multiple backends layout(texture=0, sampler=0) uniform sampler2D s; // invalid (requires backend) /*%%* diff --git a/resources/sksl/errors/TernaryMismatch.rts b/resources/sksl/errors/TernaryMismatch.rts index ccc5a38deed9..22e10b08cea2 100644 --- a/resources/sksl/errors/TernaryMismatch.rts +++ b/resources/sksl/errors/TernaryMismatch.rts @@ -1,7 +1,10 @@ +void void_function() {} void bool_or_float() { float x = 5 > 2 ? true : 1.0; } void float3_or_float() { float x = 5 > 2 ? float3(1) : 1.0; } +void void_or_void() { 5 > 2 ? void_function() : void_function(); } /*%%* ternary operator result mismatch: 'bool', 'float' ternary operator result mismatch: 'float3', 'float' +ternary expression of type 'void' is not allowed *%%*/ diff --git a/resources/sksl/inliner/CommaExpressionsAllowInlining.sksl b/resources/sksl/inliner/CommaExpressionsAllowInlining.sksl new file mode 100644 index 000000000000..7c66bdb00480 --- /dev/null +++ b/resources/sksl/inliner/CommaExpressionsAllowInlining.sksl @@ -0,0 +1,18 @@ +uniform half4 colorGreen; + +void d(inout int) {} + +void c(out int i) { + // This expression is void-typed, because comma expressions take their type from the RHS. + 12345, d(i); +} + +void a(int i) { + c(i); +} + +half4 main(float2) { + int i; + a(i); + return colorGreen; +} diff --git a/resources/sksl/inliner/OpaqueCallsCannotBeInlined.sksl b/resources/sksl/inliner/OpaqueCallsCannotBeInlined.sksl new file mode 100644 index 000000000000..0b7f8dae02a3 --- /dev/null +++ b/resources/sksl/inliner/OpaqueCallsCannotBeInlined.sksl @@ -0,0 +1,19 @@ +layout(binding=0) uniform sampler uSampler; +layout(binding=1) uniform texture2D uTexture; + +half4 simpleSample(float2 p, sampler2D s) { + // This call is allowed to inline because no scratch variables are needed; each argument is + // only used once. + return sample(s, p); +} + +half4 squaredSample(float2 p, sampler2D s) { + // This call is not allowed to inline because `s` is used twice, so it would require a scratch + // argument, but we cannot create opaque variables. (skia:13824) + return sample(s, p) * sample(s, p); +} + +half4 main(float2 p) { + return simpleSample(p, makeSampler2D(uTexture, uSampler)) * + squaredSample(p, makeSampler2D(uTexture, uSampler)); +} diff --git a/resources/sksl/intrinsics/FaceForward.sksl b/resources/sksl/intrinsics/FaceForward.sksl index 5b5e69a2a769..912995525ea9 100644 --- a/resources/sksl/intrinsics/FaceForward.sksl +++ b/resources/sksl/intrinsics/FaceForward.sksl @@ -2,13 +2,22 @@ uniform half4 N, I, NRef; uniform half4 colorGreen, colorRed; half4 main(float2 xy) { + // These cannot be evaluated at compile-time since the intermediate values would overflow. + float huge = faceforward( 1, 1e30, 1e30); + float2 huge2 = faceforward(float2(1), float2(1e30), float2(1e30)); + float3 huge3 = faceforward(float3(1), float3(1e30), float3(1e30)); + float4 huge4 = faceforward(float4(1), float4(1e30), float4(1e30)); + + // We don't care about the results; they're used here to prevent them from being optimized away. + half4 expectedPos = half4(huge.xxxx + huge2.xxxx); + half4 expectedNeg = half4(huge3.xxxx + huge4.xxxx); const half4 constN = half4(1, 2, 3, 4); const half4 constI = half4(1, 1, -100, 1); const half4 constNRef = half4(1); - half4 expectedPos = half4(1, 2, 3, 4); - half4 expectedNeg = -half4(1, 2, 3, 4); + expectedPos = half4(1, 2, 3, 4); + expectedNeg = -half4(1, 2, 3, 4); return (faceforward(N.x, I.x, NRef.x ) == expectedNeg.x && faceforward(N.xy, I.xy, NRef.xy ) == expectedNeg.xy && diff --git a/resources/sksl/intrinsics/Inverse.sksl b/resources/sksl/intrinsics/Inverse.sksl index 87958085962f..cbc4e7c2201f 100644 --- a/resources/sksl/intrinsics/Inverse.sksl +++ b/resources/sksl/intrinsics/Inverse.sksl @@ -1,14 +1,20 @@ uniform half4 colorGreen, colorRed; half4 main(float2 xy) { - const half2x2 matrix2x2 = half2x2(1, 2, 3, 4); - half2x2 inv2x2 = half2x2(-2, 1, 1.5, -0.5); - half3x3 inv3x3 = half3x3(-24, 18, 5, 20, -15, -4, -5, 4, 1); - half4x4 inv4x4 = half4x4(-2, -0.5, 1, 0.5, 1, 0.5, 0, -0.5, -8, -1, 2, 2, 3, 0.5, -1, -0.5); + const float2x2 matrix2x2 = float2x2(1, 2, 3, 4); + float2x2 inv2x2 = float2x2(-2, 1, 1.5, -0.5); + float3x3 inv3x3 = float3x3(-24, 18, 5, 20, -15, -4, -5, 4, 1); + float4x4 inv4x4 = float4x4(-2, -0.5, 1, 0.5, 1, 0.5, 0, -0.5, -8, -1, 2, 2, 3, 0.5, -1, -0.5); + float Zero = colorGreen.b; + // This test would require some slack to pass on real GPUs, since `inverse` on GPU hardware + // introduces a bit of floating-point error. return (inverse(matrix2x2) == inv2x2 && - inverse(half3x3(1, 2, 3, 0, 1, 4, 5, 6, 0)) == inv3x3 && - inverse(half4x4(1, 0, 0, 1, 0, 2, 1, 2, 2, 1, 0, 1, 2, 0, 1, 4)) == inv4x4 && - inverse(half3x3(1, 2, 3, 4, 5, 6, 7, 8, 9)) != inv3x3) + inverse(float3x3(1, 2, 3, 0, 1, 4, 5, 6, 0)) == inv3x3 && + inverse(float4x4(1, 0, 0, 1, 0, 2, 1, 2, 2, 1, 0, 1, 2, 0, 1, 4)) == inv4x4 && + inverse(float3x3(1, 2, 3, 4, 5, 6, 7, 8, 9)) != inv3x3 && + inverse(matrix2x2 + Zero) == inv2x2 && + inverse(float3x3(1, 2, 3, 0, 1, 4, 5, 6, 0) + Zero) == inv3x3 && + inverse(float4x4(1, 0, 0, 1, 0, 2, 1, 2, 2, 1, 0, 1, 2, 0, 1, 4) + Zero) == inv4x4) ? colorGreen : colorRed; } diff --git a/resources/sksl/intrinsics/MatrixCompMultES2.sksl b/resources/sksl/intrinsics/MatrixCompMultES2.sksl index adae9e9fe3f1..df703a99f22e 100644 --- a/resources/sksl/intrinsics/MatrixCompMultES2.sksl +++ b/resources/sksl/intrinsics/MatrixCompMultES2.sksl @@ -3,7 +3,17 @@ uniform float2x2 testMatrix2x2; uniform half3x3 testMatrix3x3; half4 main(float2 coords) { - half2x2 h22 = matrixCompMult(half2x2(5, 5, 5, 5), half2x2(0, 1, 2, 3)); + // This multiplication does not overflow and can be evaluated at compile time. + const half2x2 smallM22 = half2x2(1000, 1000, 1000, 1000); + half2x2 h22 = matrixCompMult(smallM22, smallM22); + + // This multiplication would overflow the maximum float value, so we don't evaluate it at + // compile time. We don't care what the result is, since ES2 doesn't guarantee infinities, but + // we should be able to compile it safely. + const half2x2 hugeM22 = half2x2(1e30, 1e30, 1e30, 1e30); + h22 = matrixCompMult(hugeM22, hugeM22); + + h22 = matrixCompMult(half2x2(5, 5, 5, 5), half2x2(0, 1, 2, 3)); const half4x4 h44 = matrixCompMult(half4x4(0.5), half4x4(1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12, diff --git a/resources/sksl/intrinsics/Reflect.sksl b/resources/sksl/intrinsics/Reflect.sksl index bf318396e291..8fa850c30273 100644 --- a/resources/sksl/intrinsics/Reflect.sksl +++ b/resources/sksl/intrinsics/Reflect.sksl @@ -3,12 +3,12 @@ uniform half4 colorGreen, colorRed; half4 main(float2 xy) { // Ensure that constant-evaluation is safe even when the expression cannot be optimized. - float overflow = reflect(2245222*222*2, -2e34); + half expectedX = reflect(2245222*222*2, -2e34); const half4 constI = half4(1, -2, 3, -4); const half4 constN = half4(-5, 6, -7, 8); - half expectedX = half (-49); + expectedX = half (-49); half2 expectedXY = half2(-169, 202); half3 expectedXYZ = half3(-379, 454, -529); half4 expectedXYZW = half4(-699, 838, -977, 1116); diff --git a/resources/sksl/intrinsics/Refract.sksl b/resources/sksl/intrinsics/Refract.sksl index 5c48ee59fac7..901502427529 100644 --- a/resources/sksl/intrinsics/Refract.sksl +++ b/resources/sksl/intrinsics/Refract.sksl @@ -3,9 +3,8 @@ uniform half4 d, e; half4 main(float2) { // Ensure that constant-evaluation is safe in the presence of very large values. - float overflow = refract(6e26, 2, 2); + half4 result = refract(6e26, 2, 2).xxxx; - half4 result; result.x = refract(a, b, c); result = refract(d, e, c); diff --git a/resources/sksl/intrinsics/Step.sksl b/resources/sksl/intrinsics/Step.sksl index 0ec2e40897ae..7a55ed632c63 100644 --- a/resources/sksl/intrinsics/Step.sksl +++ b/resources/sksl/intrinsics/Step.sksl @@ -4,8 +4,10 @@ uniform half4 colorGreen, colorRed; half4 main(float2 coords) { const half4 constVal = half4(-1.25, 0, 0.75, 2.25); const half4 constGreen = half4(0, 1, 0, 1); + const half4 constRed = half4(1, 0, 0, 1); half4 expectedA = half4(0, 0, 1, 1); half4 expectedB = half4(1, 1, 0, 0); + half4 expectedC = half4(0, 1, 1, 1); return (step(0.5, testInputs.x) == expectedA.x && step(0.5, testInputs.xy) == expectedA.xy && @@ -22,5 +24,14 @@ half4 main(float2 coords) { step(constVal.x, constGreen.x) == expectedB.x && step(constVal.xy, constGreen.xy) == expectedB.xy && step(constVal.xyz, constGreen.xyz) == expectedB.xyz && - step(constVal.xyzw, constGreen.xyzw) == expectedB.xyzw) ? colorGreen : colorRed; + step(constVal.xyzw, constGreen.xyzw) == expectedB.xyzw && + step(colorRed.x, colorGreen.x) == expectedC.x && + step(colorRed.xy, colorGreen.xy) == expectedC.xy && + step(colorRed.xyz, colorGreen.xyz) == expectedC.xyz && + step(colorRed.xyzw, colorGreen.xyzw) == expectedC.xyzw && + step(constRed.x, constGreen.x) == expectedC.x && + step(constRed.xy, constGreen.xy) == expectedC.xy && + step(constRed.xyz, constGreen.xyz) == expectedC.xyz && + step(constRed.xyzw, constGreen.xyzw) == expectedC.xyzw) + ? colorGreen : colorRed; } diff --git a/resources/sksl/realistic/RippleShader.rts b/resources/sksl/realistic/RippleShader.rts new file mode 100644 index 000000000000..8ce2b2d88d32 --- /dev/null +++ b/resources/sksl/realistic/RippleShader.rts @@ -0,0 +1,100 @@ +// Source: Android Open Source Project +// https://cs.android.com/android/_/android/platform/frameworks/base/+/main:graphics/java/android/graphics/drawable/RippleShader.java + +uniform vec2 in_origin; +uniform vec2 in_touch; +uniform float in_progress; +uniform float in_maxRadius; +uniform vec2 in_resolutionScale; +uniform vec2 in_noiseScale; +uniform float in_hasMask; +uniform float in_noisePhase; +uniform float in_turbulencePhase; +uniform vec2 in_tCircle1; +uniform vec2 in_tCircle2; +uniform vec2 in_tCircle3; +uniform vec2 in_tRotation1; +uniform vec2 in_tRotation2; +uniform vec2 in_tRotation3; +layout(color) uniform vec4 in_color; +layout(color) uniform vec4 in_sparkleColor; +uniform shader in_shader; + +float triangleNoise(vec2 n) { + n = fract(n * vec2(5.3987, 5.4421)); + n += dot(n.yx, n.xy + vec2(21.5351, 14.3137)); + float xy = n.x * n.y; + return fract(xy * 95.4307) + fract(xy * 75.04961) - 1.0; +} +const float PI = 3.1415926535897932384626; +float threshold(float v, float l, float h) { + return step(l, v) * (1.0 - step(h, v)); +} +float sparkles(vec2 uv, float t) { + float n = triangleNoise(uv); + float s = 0.0; + for (float i = 0; i < 4; i += 1) { + float l = i * 0.1; + float h = l + 0.05; + float o = sin(PI * (t + 0.35 * i)); + s += threshold(n + o, l, h); + } + return saturate(s) * in_sparkleColor.a; +} +float softCircle(vec2 uv, vec2 xy, float radius, float blur) { + float blurHalf = blur * 0.5; + float d = distance(uv, xy); + return 1. - smoothstep(1. - blurHalf, 1. + blurHalf, d / radius); +} +float softRing(vec2 uv, vec2 xy, float radius, float progress, float blur) { + float thickness = 0.05 * radius; + float currentRadius = radius * progress; + float circle_outer = softCircle(uv, xy, currentRadius + thickness, blur); + float circle_inner = softCircle(uv, xy, max(currentRadius - thickness, 0.), + blur); + return saturate(circle_outer - circle_inner); +} +float subProgress(float start, float end, float progress) { + float sub = clamp(progress, start, end); + return (sub - start) / (end - start); +} +mat2 rotate2d(vec2 rad){ + return mat2(rad.x, -rad.y, rad.y, rad.x); +} +float circle_grid(vec2 resolution, vec2 coord, float time, vec2 center, + vec2 rotation, float cell_diameter) { + coord = rotate2d(rotation) * (center - coord) + center; + coord = mod(coord, cell_diameter) / resolution; + float normal_radius = cell_diameter / resolution.y * 0.5; + float radius = 0.65 * normal_radius; + return softCircle(coord, vec2(normal_radius), radius, radius * 50.0); +} +float turbulence(vec2 uv, float t) { + const vec2 scale = vec2(0.8); + uv = uv * scale; + float g1 = circle_grid(scale, uv, t, in_tCircle1, in_tRotation1, 0.17); + float g2 = circle_grid(scale, uv, t, in_tCircle2, in_tRotation2, 0.2); + float g3 = circle_grid(scale, uv, t, in_tCircle3, in_tRotation3, 0.275); + float v = (g1 * g1 + g2 - g3) * 0.5; + return saturate(0.45 + 0.8 * v); +} + +vec4 main(vec2 p) { + float fadeIn = subProgress(0., 0.13, in_progress); + float scaleIn = subProgress(0., 1.0, in_progress); + float fadeOutNoise = subProgress(0.4, 0.5, in_progress); + float fadeOutRipple = subProgress(0.4, 1., in_progress); + vec2 center = mix(in_touch, in_origin, saturate(in_progress * 2.0)); + float ring = softRing(p, center, in_maxRadius, scaleIn, 1.); + float alpha = min(fadeIn, 1. - fadeOutNoise); + vec2 uv = p * in_resolutionScale; + vec2 densityUv = uv - mod(uv, in_noiseScale); + float turbulence = turbulence(uv, in_turbulencePhase); + float sparkleAlpha = sparkles(densityUv, in_noisePhase) * ring * alpha * turbulence; + float fade = min(fadeIn, 1. - fadeOutRipple); + float waveAlpha = softCircle(p, center, in_maxRadius * scaleIn, 1.) * fade * in_color.a; + vec4 waveColor = vec4(in_color.rgb * waveAlpha, waveAlpha); + vec4 sparkleColor = vec4(in_sparkleColor.rgb * in_sparkleColor.a, in_sparkleColor.a); + float mask = in_hasMask == 1. ? in_shader.eval(p).a > 0. ? 1. : 0. : 1.; + return mix(waveColor, sparkleColor, sparkleAlpha) * mask; +} diff --git a/resources/sksl/runtime_errors/IllegalShaderUse.rts b/resources/sksl/runtime_errors/IllegalShaderUse.rts index d867adba97a3..41c598df3673 100644 --- a/resources/sksl/runtime_errors/IllegalShaderUse.rts +++ b/resources/sksl/runtime_errors/IllegalShaderUse.rts @@ -53,7 +53,7 @@ parameters of type 'shader' not allowed unknown identifier 's' functions may not return opaque type 'shader' cannot construct 'shader' -ternary expression of opaque type 'shader' not allowed +ternary expression of opaque type 'shader' is not allowed expected '(' to begin method call function 'dangling_eval' can exit without returning a value *%%*/ diff --git a/resources/sksl/shared/InstanceIDInFunction.vert b/resources/sksl/shared/InstanceIDInFunction.vert new file mode 100644 index 000000000000..8190749aa74b --- /dev/null +++ b/resources/sksl/shared/InstanceIDInFunction.vert @@ -0,0 +1,9 @@ +layout(location=1) out int id; + +noinline int fn() { + return sk_InstanceID; +} + +void main() { + id = fn(); +} diff --git a/resources/sksl/shared/MatrixScalarMath.sksl b/resources/sksl/shared/MatrixScalarMath.sksl index a1bda1ac0136..bbb588507b57 100644 --- a/resources/sksl/shared/MatrixScalarMath.sksl +++ b/resources/sksl/shared/MatrixScalarMath.sksl @@ -12,10 +12,10 @@ bool test(int op, float m11, float m12, float m21, float m22, float2x2 expected) float2x2 m2 = float2x2(m11 * one, m12 * one, m21 * one, m22 * one); switch (op) { - case plus: m2 += 1; break; - case minus: m2 -= 1; break; - case star: m2 *= 2; break; - case slash: m2 /= 2; break; + case plus: m2 = 1 + m2; break; + case minus: m2 -= 1; break; + case star: m2 *= 2; break; + case slash: m2 = m2 / 2; break; } return m2[0][0] == expected[0][0] && diff --git a/resources/sksl/shared/Ossfuzz60077.sksl b/resources/sksl/shared/Ossfuzz60077.sksl new file mode 100644 index 000000000000..a4c6acfa5617 --- /dev/null +++ b/resources/sksl/shared/Ossfuzz60077.sksl @@ -0,0 +1,7 @@ +/*#pragma settings NoOptimize*/ + +void d(int) { int b=4; } +void c(int i) { d(i); } +void b(int i) { c(i); } +void a(int i) { b(i); b(i); } +half4 main(float2) { int i; a(i); return half4(0); } diff --git a/resources/sksl/shared/Overflow.sksl b/resources/sksl/shared/Overflow.sksl index e02ba1f3682b..f545353a19f5 100644 --- a/resources/sksl/shared/Overflow.sksl +++ b/resources/sksl/shared/Overflow.sksl @@ -1,10 +1,11 @@ uniform half4 colorGreen; half4 main(float2 coords) { - half huge = 899999999.9 * 999999999.9 * 999999999.9 * 999999999.9 * - 999999999.9 * 999999999.9 * 999999999.9 * 999999999.9 * - 999999999.9 * 999999999.9 * 999999999.9 * 999999999.9 * - 999999999.9 * 999999999.9; + const half h = 999999999.9; + half hugeH = h * h * h * h * h * h * h * h * h * h * h * h * h * h * h; + + const float f = 999999999.9; + float hugeF = f * f * f * f * f * f * f * f * f * f * f * f * f * f * f; int hugeI = 16384 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 @@ -37,8 +38,31 @@ half4 main(float2 coords) { u4 * u4 * u4 * u4 * u4 * u4 * u4 * u4 * u4 * u4 * u4 * u4 * u4 * u4 * u4 * u4 * u4 * u4 * u4 * u4 * u4 * u4 * u4 * u4 * u4 * u4 * u4 * u4 * u4 * u4; - return colorGreen * saturate(huge) * saturate(half(hugeI)) * saturate(half(hugeU)) * - saturate(half(hugeS)) * saturate(half(hugeUS)) * - saturate(half(hugeNI)) * saturate(half(hugeNS)) * - saturate(half4(hugeIvec)) * saturate(half4(hugeUvec)); + float4x4 hugeMxM = float4x4(1e20, 1e20, 1e20, 1e20, + 1e20, 1e20, 1e20, 1e20, + 1e20, 1e20, 1e20, 1e20, + 1e20, 1e20, 1e20, 1e20) * + float4x4(1e20, 1e20, 1e20, 1e20, + 1e20, 1e20, 1e20, 1e20, + 1e20, 1e20, 1e20, 1e20, + 1e20, 1e20, 1e20, 1e20); + + float4 hugeMxV = float4x4(1e20, 1e20, 1e20, 1e20, + 1e20, 1e20, 1e20, 1e20, + 1e20, 1e20, 1e20, 1e20, + 1e20, 1e20, 1e20, 1e20) * + float4(1e20, 1e20, 1e20, 1e20); + + float4 hugeVxM = float4(1e20, 1e20, 1e20, 1e20) * + float4x4(1e20, 1e20, 1e20, 1e20, + 1e20, 1e20, 1e20, 1e20, + 1e20, 1e20, 1e20, 1e20, + 1e20, 1e20, 1e20, 1e20); + + return colorGreen * saturate(hugeH) * saturate(half(hugeF)) * saturate(half(hugeI)) * + saturate(half(hugeU)) * saturate(half(hugeS)) * saturate(half(hugeUS)) * + saturate(half(hugeNI)) * saturate(half(hugeNS)) * + saturate(half4(hugeIvec)) * saturate(half4(hugeUvec)) * + saturate(half4(hugeMxM[0])) * saturate(half4(hugeMxV)) * + saturate(half4(hugeVxM)); } diff --git a/resources/sksl/shared/StorageBuffer.sksl b/resources/sksl/shared/StorageBuffer.sksl index 90bc0bfa4ee4..c0d47e97d80f 100644 --- a/resources/sksl/shared/StorageBuffer.sksl +++ b/resources/sksl/shared/StorageBuffer.sksl @@ -14,7 +14,9 @@ layout(set=0, binding=1) buffer outputBuffer SomeData[] outputData; }; +layout(location=2) in flat int bufferIndex; + half4 main(float2 coords) { outputData[offset] = inputData[offset]; - return half4(inputData[offset].a * inputData[offset].b.x); + return half4(inputData[bufferIndex].a * inputData[bufferIndex].b.x); } diff --git a/resources/sksl/shared/SwizzleAsLValue.sksl b/resources/sksl/shared/SwizzleAsLValue.sksl index 007c93e3783c..b9e1ac4d94cc 100644 --- a/resources/sksl/shared/SwizzleAsLValue.sksl +++ b/resources/sksl/shared/SwizzleAsLValue.sksl @@ -1,13 +1,25 @@ uniform half4 colorGreen, colorRed; half4 main(float2) { - float4 color; - color = float4(colorGreen) * 0.5; // 0, 0.5, 0, 0.5 - color.a = 2.0; // 0, 0.5, 0, 2 - color.g /= 0.25; // 0, 2, 0, 2 - color.gba *= float3(0.5); // 0, 1, 0, 1 - color.bgar += float4(0.25, 0.0, 0.0, 0.75); // 0.75, 1, 0.25, 1 - color.r += color.a <= 1.0 ? color.b : 0.0; // 1, 1, 0.25, 1 - - return (color == float4(1, 1, 0.25, 1)) ? colorGreen : colorRed; + float4 scalar; + float4 array[1]; + + // Test swizzled-lvalue assignment on a scalar. + scalar = float4(colorGreen) * 0.5; // 0, 0.5, 0, 0.5 + scalar.a = 2.0; // 0, 0.5, 0, 2 + scalar.g /= 0.25; // 0, 2, 0, 2 + scalar.gba *= float3x3(0.5); // 0, 1, 0, 1 + scalar.bgar += float4(0.25, 0.0, 0.0, 0.75); // 0.75, 1, 0.25, 1 + scalar.r += scalar.a <= 1.0 ? scalar.b : 0.0; // 1, 1, 0.25, 1 + + // Test swizzled-lvalue assignment on an array element. + array[0] = float4(colorGreen) * 0.5; // 0, 0.5, 0, 0.5 + array[0].a = 2.0; // 0, 0.5, 0, 2 + array[0].g /= 0.25; // 0, 2, 0, 2 + array[0].gba *= float3x3(0.5); // 0, 1, 0, 1 + array[0].bgar += float4(0.25, 0.0, 0.0, 0.75); // 0.75, 1, 0.25, 1 + array[0].r += array[0].a <= 1.0 ? array[0].b : 0.0; // 1, 1, 0.25, 1 + + return (scalar == float4(1, 1, 0.25, 1) && array[0] == float4(1, 1, 0.25, 1)) ? colorGreen + : colorRed; } diff --git a/resources/sksl/shared/SwizzleAsLValueES3.sksl b/resources/sksl/shared/SwizzleAsLValueES3.sksl new file mode 100644 index 000000000000..f96285d9a0fd --- /dev/null +++ b/resources/sksl/shared/SwizzleAsLValueES3.sksl @@ -0,0 +1,22 @@ +uniform half4 colorGreen, colorRed; +int gAccessCount = 0; + +noinline int Z() { + ++gAccessCount; + return 0; +} + +half4 main(float2) { + float4 array[1]; + + // Test swizzled-lvalue assignment on an array element with a side-effecting index expression. + array[Z()] = float4(colorGreen) * 0.5; // 0, 0.5, 0, 0.5 + array[Z()].a = 2.0; // 0, 0.5, 0, 2 + array[Z()].g /= 0.25; // 0, 2, 0, 2 + array[Z()].gba *= float3x3(0.5); // 0, 1, 0, 1 + array[Z()].bgar += float4(0.25, 0.0, 0.0, 0.75); // 0.75, 1, 0.25, 1 + array[Z()].r += array[Z()].a <= 1.0 ? array[Z()].b : float(Z()); // 1, 1, 0.25, 1 + + return (gAccessCount == 8 && array[0] == float4(1, 1, 0.25, 1)) ? colorGreen + : colorRed; +} diff --git a/resources/sksl/shared/VertexIDInFunction.vert b/resources/sksl/shared/VertexIDInFunction.vert new file mode 100644 index 000000000000..0f7b461ad5a9 --- /dev/null +++ b/resources/sksl/shared/VertexIDInFunction.vert @@ -0,0 +1,9 @@ +layout(location=1) out int id; + +noinline int fn() { + return sk_VertexID; +} + +void main() { + id = fn(); +} diff --git a/resources/sksl/wgsl/InterfaceBlockUniforms.sksl b/resources/sksl/wgsl/InterfaceBlockUniforms.sksl new file mode 100644 index 000000000000..f61f89d14da7 --- /dev/null +++ b/resources/sksl/wgsl/InterfaceBlockUniforms.sksl @@ -0,0 +1,8 @@ +layout(set=12, binding=34) uniform UniformBuffer { + layout(offset=0) half2x2 m1; + layout(offset=32) half2x2 m2; +}; + +void main() { + sk_FragColor = half4(m1[0][0], m1[1][1], m2[0][0], m2[1][1]); +} diff --git a/resources/sksl/wgsl/Sample.sksl b/resources/sksl/wgsl/Sample.sksl new file mode 100644 index 000000000000..3d0e99a248b2 --- /dev/null +++ b/resources/sksl/wgsl/Sample.sksl @@ -0,0 +1,9 @@ +layout(wgsl, set=1, texture=2, sampler=3) uniform sampler2D tex; + +void main() +{ + half4 a = sample(tex, half2(1)); + half4 b = sample(tex, half3(1)); + half4 c = sample(tex, half3(1), -0.75); + sk_FragColor = a * b * c; +} diff --git a/resources/sksl/wgsl/UniformMatrices.sksl b/resources/sksl/wgsl/UniformMatrices.sksl new file mode 100644 index 000000000000..e66f7642f6b3 --- /dev/null +++ b/resources/sksl/wgsl/UniformMatrices.sksl @@ -0,0 +1,29 @@ +// Our buffers are in std140 layout, so the generated code will need to compensate. + +layout(set=0, binding=1) uniform UniformBuffer { + float2x2 u22; + float2x3 u23; + float2x4 u24; + float3x2 u32; + float3x3 u33; + float3x4 u34; + float4x2 u42; + float4x3 u43; + float4x4 u44; +}; + +layout(set=0, binding=2) buffer StorageBuffer { + float2x2 s22; + float2x3 s23; + float2x4 s24; + float3x2 s32; + float3x3 s33; + float3x4 s34; + float4x2 s42; + float4x3 s43; + float4x4 s44; +}; + +half4 main() { + return half4(0); +} diff --git a/src/BUILD.bazel b/src/BUILD.bazel index d227e88c1cfe..3a7eea3cc623 100644 --- a/src/BUILD.bazel +++ b/src/BUILD.bazel @@ -13,10 +13,10 @@ licenses(["notice"]) exports_files_legacy() selects.config_setting_group( - name = "android_with_gpu_backend", + name = "android_with_ganesh_backend", match_all = [ "@platforms//os:android", - "//src/gpu:has_gpu_backend", + "//src/gpu:has_ganesh_backend", ], ) @@ -38,11 +38,13 @@ skia_filegroup( "//src/utils:srcs", "//src/xml:srcs", ] + select({ - "//src/gpu:has_gpu_backend": [ + "//src/gpu:has_ganesh_backend": [ "//src/gpu:srcs", "//src/text/gpu:srcs", ], - "//conditions:default": [], + "//conditions:default": [ + "//src/text:no_slug_srcs", + ], }) + select({ "//src/sksl:needs_sksl": ["//src/sksl:srcs"], "//conditions:default": [], @@ -63,7 +65,7 @@ skia_filegroup( ], "//conditions:default": [], }) + select({ - ":android_with_gpu_backend": ["//src/image:android_srcs"], + ":android_with_ganesh_backend": ["//src/image:android_srcs"], "//conditions:default": [], }), visibility = ["//:__pkg__"], @@ -72,7 +74,7 @@ skia_filegroup( skia_filegroup( name = "objc_srcs", srcs = select({ - "//src/gpu:has_gpu_backend": ["//src/gpu:objc_srcs"], + "//src/gpu:has_ganesh_backend": ["//src/gpu:objc_srcs"], "//conditions:default": [], }), visibility = ["//:__pkg__"], @@ -97,7 +99,7 @@ skia_filegroup( "//src/utils:private_hdrs", "//src/xml:private_hdrs", ] + select({ - "//src/gpu:has_gpu_backend": [ + "//src/gpu:has_ganesh_backend": [ "//src/gpu:private_hdrs", "//src/text/gpu:private_hdrs", ], @@ -134,7 +136,7 @@ skia_cc_deps( "//src/ports:deps", "//src/xml:deps", ] + select({ - "//src/gpu:has_gpu_backend": ["//src/gpu:deps"], + "//src/gpu:has_ganesh_backend": ["//src/gpu:deps"], "//conditions:default": [], }) + select({ "//src/sksl:needs_sksl": ["//src/sksl:deps"], @@ -167,7 +169,10 @@ generate_cpp_files_for_headers( "src/encode/SkICCPriv.h", "src/encode/SkImageEncoderFns.h", "src/encode/SkImageEncoderPriv.h", + "src/gpu/ganesh/GrBackendSurfacePriv.h", + "src/gpu/ganesh/gl/GrGLBackendSurfacePriv.h", "src/image/SkImageGeneratorPriv.h", + "src/text/TextBlobMailbox.h", ], ) diff --git a/src/base/BUILD.bazel b/src/base/BUILD.bazel index ce1277414ebd..7fe354e02e2b 100644 --- a/src/base/BUILD.bazel +++ b/src/base/BUILD.bazel @@ -7,13 +7,18 @@ load( licenses(["notice"]) -exports_files_legacy() +exports_files_legacy( + label_list = ["SkBitmaskEnum.h"], + visibility = ["//tools/skui:__pkg__"], +) # Headers with no corresponding .cpp files IWYU_HDRS = [ "SkASAN.h", "SkArenaAllocList.h", + "SkBitmaskEnum.h", "SkEndian.h", + "SkEnumBitMask.h", "SkLeanWindows.h", "SkMSAN.h", "SkNoDestructor.h", diff --git a/src/base/SkBezierCurves.cpp b/src/base/SkBezierCurves.cpp index 0fb4aef91872..c6239a50b8d9 100644 --- a/src/base/SkBezierCurves.cpp +++ b/src/base/SkBezierCurves.cpp @@ -10,6 +10,7 @@ #include "include/private/base/SkAssert.h" #include "include/private/base/SkFloatingPoint.h" #include "include/private/base/SkPoint_impl.h" +#include "src/base/SkCubics.h" #include "src/base/SkQuads.h" #include @@ -119,6 +120,10 @@ struct Point { double x, y; }; +Point operator- (Point a) { + return {-a.x, -a.y}; +} + Point operator+ (Point a, Point b) { return {a.x + b.x, a.y + b.y}; } @@ -130,8 +135,56 @@ Point operator- (Point a, Point b) { Point operator* (double s, Point a) { return {s * a.x, s * a.y}; } + +// Pin to 0 or 1 if within half a float ulp of 0 or 1. +double pinTRange(double t) { + // The ULPs around 0 are tiny compared to the ULPs around 1. Shift to 1 to use the same + // size ULPs. + if (sk_double_to_float(t + 1.0) == 1.0f) { + return 0.0; + } else if (sk_double_to_float(t) == 1.0f) { + return 1.0; + } + return t; +} } // namespace +SkSpan +SkBezierCubic::IntersectWithHorizontalLine( + SkSpan controlPoints, float yIntercept, float* intersectionStorage) { + SkASSERT(controlPoints.size() >= 4); + const Point P0 = controlPoints[0], + P1 = controlPoints[1], + P2 = controlPoints[2], + P3 = controlPoints[3]; + + const Point A = -P0 + 3*P1 - 3*P2 + P3, + B = 3*P0 - 6*P1 + 3*P2, + C = -3*P0 + 3*P1, + D = P0; + + return Intersect(A.x, B.x, C.x, D.x, A.y, B.y, C.y, D.y, yIntercept, intersectionStorage); +} + +SkSpan +SkBezierCubic::Intersect(double AX, double BX, double CX, double DX, + double AY, double BY, double CY, double DY, + float toIntersect, float intersectionsStorage[3]) { + double roots[3]; + SkSpan ts = SkSpan(roots, + SkCubics::RootsReal(AY, BY, CY, DY - toIntersect, roots)); + + int intersectionCount = 0; + for (double t : ts) { + const double pinnedT = pinTRange(t); + if (0 <= pinnedT && pinnedT <= 1) { + intersectionsStorage[intersectionCount++] = SkCubics::EvalAt(AX, BX, CX, DX, pinnedT); + } + } + + return {intersectionsStorage, intersectionCount}; +} + SkSpan SkBezierQuad::IntersectWithHorizontalLine(SkSpan controlPoints, float yIntercept, float intersectionStorage[2]) { @@ -157,19 +210,6 @@ SkSpan SkBezierQuad::Intersect( auto [discriminant, r0, r1] = SkQuads::Roots(AY, BY, CY - yIntercept); int intersectionCount = 0; - - // Pin to 0 or 1 if within half a float ulp of 0 or 1. - auto pinTRange = [] (double t) { - // The ULPs around 0 are tiny compared to the ULPs around 1. Shift to 1 to use the same - // size ULPs. - if (sk_double_to_float(t + 1.0) == 1.0f) { - return 0.0; - } else if (sk_double_to_float(t) == 1.0f) { - return 1.0; - } - return t; - }; - // Round the roots to the nearest float to generate the values t. Valid t's are on the // domain [0, 1]. const double t0 = pinTRange(r0); @@ -184,3 +224,4 @@ SkSpan SkBezierQuad::Intersect( return SkSpan{intersectionStorage, intersectionCount}; } + diff --git a/src/base/SkBezierCurves.h b/src/base/SkBezierCurves.h index ad0c990d50c8..581c03277caf 100644 --- a/src/base/SkBezierCurves.h +++ b/src/base/SkBezierCurves.h @@ -62,6 +62,15 @@ class SkBezierCubic { * the x or y values. */ static std::array ConvertToPolynomial(const double curve[8], bool yValues); + + static SkSpan IntersectWithHorizontalLine( + SkSpan controlPoints, float yIntercept, + float intersectionStorage[3]); + + static SkSpan Intersect( + double AX, double BX, double CX, double DX, + double AY, double BY, double CY, double DY, + float toIntersect, float intersectionsStorage[3]); }; class SkBezierQuad { diff --git a/include/private/SkBitmaskEnum.h b/src/base/SkBitmaskEnum.h similarity index 100% rename from include/private/SkBitmaskEnum.h rename to src/base/SkBitmaskEnum.h diff --git a/src/base/SkCubics.h b/src/base/SkCubics.h index 7e3cbbb56741..acc4be615600 100644 --- a/src/base/SkCubics.h +++ b/src/base/SkCubics.h @@ -7,6 +7,8 @@ #ifndef SkCubics_DEFINED #define SkCubics_DEFINED +#include + /** * Utilities for dealing with cubic formulas with one variable: * f(t) = A*t^3 + B*t^2 + C*t + d @@ -47,10 +49,7 @@ class SkCubics { * provided variable. */ static double EvalAt(double A, double B, double C, double D, double t) { - return A * t * t * t + - B * t * t + - C * t + - D; + return std::fma(t, std::fma(t, std::fma(t, A, B), C), D); } static double EvalAt(double coefficients[4], double t) { diff --git a/src/base/SkEndian.h b/src/base/SkEndian.h index 732c248802f1..d015f8bff2bf 100644 --- a/src/base/SkEndian.h +++ b/src/base/SkEndian.h @@ -115,13 +115,15 @@ static inline void SkEndianSwap64s(uint64_t array[], int count) { } } +// Static casts are used here for otherwise no-op macros to make sure they return the same type as +// SkEndianSwap* functions. #ifdef SK_CPU_LENDIAN #define SkEndian_SwapBE16(n) SkEndianSwap16(n) #define SkEndian_SwapBE32(n) SkEndianSwap32(n) #define SkEndian_SwapBE64(n) SkEndianSwap64(n) - #define SkEndian_SwapLE16(n) (n) - #define SkEndian_SwapLE32(n) (n) - #define SkEndian_SwapLE64(n) (n) + #define SkEndian_SwapLE16(n) static_cast(n) + #define SkEndian_SwapLE32(n) static_cast(n) + #define SkEndian_SwapLE64(n) static_cast(n) #define SkTEndian_SwapBE16(n) SkTEndianSwap16::value #define SkTEndian_SwapBE32(n) SkTEndianSwap32::value @@ -130,9 +132,9 @@ static inline void SkEndianSwap64s(uint64_t array[], int count) { #define SkTEndian_SwapLE32(n) (n) #define SkTEndian_SwapLE64(n) (n) #else // SK_CPU_BENDIAN - #define SkEndian_SwapBE16(n) (n) - #define SkEndian_SwapBE32(n) (n) - #define SkEndian_SwapBE64(n) (n) + #define SkEndian_SwapBE16(n) static_cast(n) + #define SkEndian_SwapBE32(n) static_cast(n) + #define SkEndian_SwapBE64(n) static_cast(n) #define SkEndian_SwapLE16(n) SkEndianSwap16(n) #define SkEndian_SwapLE32(n) SkEndianSwap32(n) #define SkEndian_SwapLE64(n) SkEndianSwap64(n) diff --git a/src/core/SkEnumBitMask.h b/src/base/SkEnumBitMask.h similarity index 65% rename from src/core/SkEnumBitMask.h rename to src/base/SkEnumBitMask.h index 3e42ece8eff3..2436c8aa6565 100644 --- a/src/core/SkEnumBitMask.h +++ b/src/base/SkEnumBitMask.h @@ -8,7 +8,7 @@ #ifndef SkEnumBitMask_DEFINED #define SkEnumBitMask_DEFINED -#include "include/core/SkTypes.h" +#include "include/private/base/SkAttributes.h" /** * Wraps an enum that is used for flags, and enables masking with type safety. Example: @@ -35,10 +35,11 @@ class SkEnumBitMask { public: SK_ALWAYS_INLINE constexpr SkEnumBitMask(E e) : SkEnumBitMask((int)e) {} - SK_ALWAYS_INLINE constexpr operator bool() const { return fValue; } + SK_ALWAYS_INLINE constexpr explicit operator bool() const { return fValue; } + SK_ALWAYS_INLINE constexpr int value() const { return fValue; } - SK_ALWAYS_INLINE bool operator==(SkEnumBitMask m) const { return fValue == m.fValue; } - SK_ALWAYS_INLINE bool operator!=(SkEnumBitMask m) const { return fValue != m.fValue; } + SK_ALWAYS_INLINE constexpr bool operator==(SkEnumBitMask m) const { return fValue == m.fValue; } + SK_ALWAYS_INLINE constexpr bool operator!=(SkEnumBitMask m) const { return fValue != m.fValue; } SK_ALWAYS_INLINE constexpr SkEnumBitMask operator|(SkEnumBitMask m) const { return SkEnumBitMask(fValue | m.fValue); @@ -64,24 +65,24 @@ class SkEnumBitMask { /** * Defines functions that make it possible to use bitwise operators on an enum. */ -#define SK_MAKE_BITMASK_OPS(E) \ +#define SK_MAKE_BITMASK_OPS(E) \ [[maybe_unused]] constexpr SkEnumBitMask operator|(E a, E b) { \ - return SkEnumBitMask(a) | b; \ - } \ + return SkEnumBitMask(a) | b; \ + } \ [[maybe_unused]] constexpr SkEnumBitMask operator&(E a, E b) { \ - return SkEnumBitMask(a) & b; \ - } \ + return SkEnumBitMask(a) & b; \ + } \ [[maybe_unused]] constexpr SkEnumBitMask operator^(E a, E b) { \ - return SkEnumBitMask(a) ^ b; \ - } \ - [[maybe_unused]] constexpr SkEnumBitMask operator~(E e) { \ - return ~SkEnumBitMask(e); \ - } \ + return SkEnumBitMask(a) ^ b; \ + } \ + [[maybe_unused]] constexpr SkEnumBitMask operator~(E e) { \ + return ~SkEnumBitMask(e); \ + } -#define SK_DECL_BITMASK_OPS_FRIENDS(E) \ +#define SK_DECL_BITMASK_OPS_FRIENDS(E) \ friend constexpr SkEnumBitMask operator|(E, E); \ friend constexpr SkEnumBitMask operator&(E, E); \ friend constexpr SkEnumBitMask operator^(E, E); \ - friend constexpr SkEnumBitMask operator~(E); \ + friend constexpr SkEnumBitMask operator~(E); -#endif // SkEnumBitMask_DEFINED +#endif // SkEnumBitMask_DEFINED diff --git a/src/c/gr_context.cpp b/src/c/gr_context.cpp index ca73f19f42a4..8fdd1954a553 100644 --- a/src/c/gr_context.cpp +++ b/src/c/gr_context.cpp @@ -40,6 +40,9 @@ int gr_recording_context_max_render_target_size(gr_recording_context_t* context) return SK_ONLY_GPU(AsGrRecordingContext(context)->maxRenderTargetSize(), 0); } +gr_direct_context_t* gr_recording_context_get_direct_context(gr_recording_context_t* context) { + return SK_ONLY_GPU(ToGrDirectContext(GrAsDirectContext(AsGrRecordingContext(context)))); +} // GrDirectContext diff --git a/src/c/sk_canvas.cpp b/src/c/sk_canvas.cpp index 921834d335dd..71b11a26698d 100644 --- a/src/c/sk_canvas.cpp +++ b/src/c/sk_canvas.cpp @@ -205,10 +205,6 @@ void sk_canvas_draw_drawable(sk_canvas_t* ccanvas, sk_drawable_t* cdrawable, con AsCanvas(ccanvas)->drawDrawable(AsDrawable(cdrawable), cmatrix ? &m : nullptr); } -void sk_canvas_flush(sk_canvas_t* ccanvas) { - AsCanvas(ccanvas)->flush(); -} - sk_canvas_t* sk_canvas_new_from_bitmap(const sk_bitmap_t* bitmap) { return ToCanvas(new SkCanvas(*AsBitmap(bitmap))); } @@ -304,3 +300,11 @@ sk_overdraw_canvas_t* sk_overdraw_canvas_new(sk_canvas_t* canvas) { void sk_overdraw_canvas_destroy(sk_overdraw_canvas_t* canvas) { delete AsOverdrawCanvas(canvas); } + +gr_recording_context_t* sk_get_recording_context(sk_canvas_t* canvas) { + return ToGrRecordingContext(AsCanvas(canvas)->recordingContext()); +} + +sk_surface_t* sk_get_surface(sk_canvas_t* canvas) { + return ToSurface(AsCanvas(canvas)->getSurface()); +} diff --git a/src/c/sk_picture.cpp b/src/c/sk_picture.cpp index e10d147320c9..f9f02794266e 100644 --- a/src/c/sk_picture.cpp +++ b/src/c/sk_picture.cpp @@ -7,6 +7,7 @@ * found in the LICENSE file. */ +#include "include/core/SkBBHFactory.h" #include "include/core/SkDrawable.h" #include "include/core/SkPicture.h" #include "include/core/SkPictureRecorder.h" diff --git a/src/c/sk_surface.cpp b/src/c/sk_surface.cpp index e5f3dc36737a..2485f725278b 100644 --- a/src/c/sk_surface.cpp +++ b/src/c/sk_surface.cpp @@ -97,14 +97,6 @@ const sk_surfaceprops_t* sk_surface_get_props(sk_surface_t* surface) { return ToSurfaceProps(&AsSurface(surface)->props()); } -void sk_surface_flush(sk_surface_t* surface) { - AsSurface(surface)->flush(); -} - -void sk_surface_flush_and_submit(sk_surface_t* surface, bool syncCpu) { - AsSurface(surface)->flushAndSubmit(syncCpu); -} - gr_recording_context_t* sk_surface_get_recording_context(sk_surface_t* surface) { return ToGrRecordingContext(AsSurface(surface)->recordingContext()); } diff --git a/src/codec/BUILD.bazel b/src/codec/BUILD.bazel index 60b6c8b6ad10..2c384f1de7af 100644 --- a/src/codec/BUILD.bazel +++ b/src/codec/BUILD.bazel @@ -30,7 +30,6 @@ CORE_FILES = [ "SkSampler.h", "SkSwizzler.cpp", "SkSwizzler.h", - "SkXmp.cpp", ] split_srcs_and_hdrs( @@ -102,8 +101,15 @@ split_srcs_and_hdrs( ) filegroup( - name = "jpeg_xmp", + name = "xmp_srcs", srcs = [ + "SkXmp.cpp", + ], +) + +split_srcs_and_hdrs( + name = "jpeg_xmp", + files = [ "SkJpegXmp.cpp", "SkJpegXmp.h", ], @@ -208,6 +214,7 @@ skia_filegroup( ":core_srcs", ":decode_android_srcs", ":decode_bmp_srcs", + ":xmp_srcs", # TODO: Make this optional ] + select_multi( { ":avif_decode_codec": [":decode_avif_srcs"], diff --git a/src/codec/SkAndroidCodec.cpp b/src/codec/SkAndroidCodec.cpp index da122e17d881..09deb54bc899 100644 --- a/src/codec/SkAndroidCodec.cpp +++ b/src/codec/SkAndroidCodec.cpp @@ -18,14 +18,10 @@ #include "include/private/SkGainmapInfo.h" #include "include/private/base/SkFloatingPoint.h" #include "modules/skcms/skcms.h" +#include "src/codec/SkAndroidCodecAdapter.h" #include "src/codec/SkCodecPriv.h" #include "src/codec/SkSampledCodec.h" -#if defined(SK_CODEC_DECODES_WEBP) || defined(SK_CODEC_DECODES_RAW) || \ - defined(SK_HAS_WUFFS_LIBRARY) || defined(SK_CODEC_DECODES_AVIF) -#include "src/codec/SkAndroidCodecAdapter.h" -#endif - #include #include #include @@ -221,40 +217,37 @@ std::unique_ptr SkAndroidCodec::MakeFromCodec(std::unique_ptrgetEncodedFormat()) { + const SkEncodedImageFormat format = codec->getEncodedFormat(); + if (format == SkEncodedImageFormat::kAVIF) { + if (SkCodecs::HasDecoder("avif")) { + // If a dedicated AVIF decoder has been registered, SkAvifCodec can + // handle scaling internally. + return std::make_unique(codec.release()); + } + // This will fallback to SkHeifCodec, which needs sampling. + return std::make_unique(codec.release()); + } + + switch (format) { case SkEncodedImageFormat::kPNG: case SkEncodedImageFormat::kICO: case SkEncodedImageFormat::kJPEG: -#ifndef SK_HAS_WUFFS_LIBRARY - case SkEncodedImageFormat::kGIF: -#endif case SkEncodedImageFormat::kBMP: case SkEncodedImageFormat::kWBMP: case SkEncodedImageFormat::kHEIF: -#ifndef SK_CODEC_DECODES_AVIF - case SkEncodedImageFormat::kAVIF: -#endif return std::make_unique(codec.release()); -#ifdef SK_HAS_WUFFS_LIBRARY case SkEncodedImageFormat::kGIF: -#endif -#ifdef SK_CODEC_DECODES_WEBP case SkEncodedImageFormat::kWEBP: -#endif -#ifdef SK_CODEC_DECODES_RAW case SkEncodedImageFormat::kDNG: -#endif -#ifdef SK_CODEC_DECODES_AVIF - case SkEncodedImageFormat::kAVIF: -#endif -#if defined(SK_CODEC_DECODES_WEBP) || defined(SK_CODEC_DECODES_RAW) || \ - defined(SK_HAS_WUFFS_LIBRARY) || defined(SK_CODEC_DECODES_AVIF) return std::make_unique(codec.release()); -#endif - - default: + case SkEncodedImageFormat::kAVIF: // Handled above + case SkEncodedImageFormat::kPKM: + case SkEncodedImageFormat::kKTX: + case SkEncodedImageFormat::kASTC: + case SkEncodedImageFormat::kJPEGXL: return nullptr; } + SkUNREACHABLE; } std::unique_ptr SkAndroidCodec::MakeFromData(sk_sp data, diff --git a/src/codec/SkAvifCodec.cpp b/src/codec/SkAvifCodec.cpp index c9ba56d9d167..cd55c4b85a5f 100644 --- a/src/codec/SkAvifCodec.cpp +++ b/src/codec/SkAvifCodec.cpp @@ -7,6 +7,7 @@ #include "src/codec/SkAvifCodec.h" +#include "include/codec/SkAvifDecoder.h" #include "include/codec/SkCodec.h" #include "include/codec/SkCodecAnimation.h" #include "include/core/SkColorType.h" diff --git a/src/codec/SkBmpCodec.cpp b/src/codec/SkBmpCodec.cpp index 4f23b31b049f..d7c1093bea8d 100644 --- a/src/codec/SkBmpCodec.cpp +++ b/src/codec/SkBmpCodec.cpp @@ -7,6 +7,7 @@ #include "src/codec/SkBmpCodec.h" +#include "include/codec/SkBmpDecoder.h" #include "include/core/SkData.h" #include "include/core/SkImageInfo.h" #include "include/core/SkRefCnt.h" diff --git a/src/codec/SkCodec.cpp b/src/codec/SkCodec.cpp index aa2d5fbb984d..425dd316c2c4 100644 --- a/src/codec/SkCodec.cpp +++ b/src/codec/SkCodec.cpp @@ -24,6 +24,7 @@ #include "src/codec/SkFrameHolder.h" #include "src/codec/SkSampler.h" +#include #include #if !defined(SK_DISABLE_LEGACY_INIT_DECODERS) @@ -125,6 +126,15 @@ void Register(Decoder d) { decoders->push_back(d); } +bool HasDecoder(std::string_view id) { + for (const SkCodecs::Decoder& decoder : get_decoders()) { + if (decoder.id == id) { + return true; + } + } + return false; +} + } // namespace SkCodecs std::unique_ptr SkCodec::MakeFromStream( diff --git a/src/codec/SkCodecPriv.h b/src/codec/SkCodecPriv.h index 9cccdb693aa9..4d5e35379d9d 100644 --- a/src/codec/SkCodecPriv.h +++ b/src/codec/SkCodecPriv.h @@ -15,6 +15,8 @@ #include "include/private/SkEncodedInfo.h" #include "src/codec/SkColorPalette.h" +#include + #ifdef SK_PRINT_CODEC_MESSAGES #define SkCodecPrintf SkDebugf #else @@ -253,4 +255,8 @@ static inline PackColorProc choose_pack_color_proc(bool isPremul, SkColorType co } } +namespace SkCodecs { +bool HasDecoder(std::string_view id); +} + #endif // SkCodecPriv_DEFINED diff --git a/src/codec/SkIcoCodec.cpp b/src/codec/SkIcoCodec.cpp index 6ba8c0c38417..ef5f9baea717 100644 --- a/src/codec/SkIcoCodec.cpp +++ b/src/codec/SkIcoCodec.cpp @@ -7,6 +7,7 @@ #include "src/codec/SkIcoCodec.h" +#include "include/codec/SkIcoDecoder.h" #include "include/core/SkData.h" #include "include/core/SkImageInfo.h" #include "include/core/SkRefCnt.h" diff --git a/src/codec/SkJpegCodec.cpp b/src/codec/SkJpegCodec.cpp index 830ab1ce1942..7cb9096c4bb3 100644 --- a/src/codec/SkJpegCodec.cpp +++ b/src/codec/SkJpegCodec.cpp @@ -8,6 +8,7 @@ #include "src/codec/SkJpegCodec.h" #include "include/codec/SkCodec.h" +#include "include/codec/SkJpegDecoder.h" #include "include/core/SkAlphaType.h" #include "include/core/SkColorType.h" #include "include/core/SkData.h" diff --git a/src/codec/SkJpegCodec.h b/src/codec/SkJpegCodec.h index 2349079056d2..d1325b573653 100644 --- a/src/codec/SkJpegCodec.h +++ b/src/codec/SkJpegCodec.h @@ -128,7 +128,7 @@ class SkJpegCodec : public SkCodec { void initializeSwizzler(const SkImageInfo& dstInfo, const Options& options, bool needsCMYKToRGB); - bool SK_WARN_UNUSED_RESULT allocateStorage(const SkImageInfo& dstInfo); + [[nodiscard]] bool allocateStorage(const SkImageInfo& dstInfo); int readRows(const SkImageInfo& dstInfo, void* dst, size_t rowBytes, int count, const Options&); /* diff --git a/src/codec/SkJpegSourceMgr.cpp b/src/codec/SkJpegSourceMgr.cpp index 648895157feb..bc139b49d6ef 100644 --- a/src/codec/SkJpegSourceMgr.cpp +++ b/src/codec/SkJpegSourceMgr.cpp @@ -7,12 +7,10 @@ #include "src/codec/SkJpegSourceMgr.h" -#include "include/core/SkTypes.h" - -#ifdef SK_CODEC_DECODES_JPEG #include "include/core/SkData.h" #include "include/core/SkRefCnt.h" #include "include/core/SkStream.h" +#include "include/core/SkTypes.h" #include "src/codec/SkCodecPriv.h" #ifdef SK_CODEC_DECODES_JPEG_GAINMAPS @@ -439,15 +437,3 @@ std::unique_ptr SkJpegSourceMgr::Make(SkStream* stream, size_t SkJpegSourceMgr::SkJpegSourceMgr(SkStream* stream) : fStream(stream) {} SkJpegSourceMgr::~SkJpegSourceMgr() = default; - -#else // SK_CODEC_DECODES_JPEG - -std::unique_ptr SkJpegSourceMgr::Make(SkStream* stream, size_t bufferSize) { - return nullptr; -} - -SkJpegSourceMgr::SkJpegSourceMgr(SkStream* stream): fStream(nullptr) {} - -SkJpegSourceMgr::~SkJpegSourceMgr() = default; - -#endif diff --git a/src/codec/SkJpegxlCodec.cpp b/src/codec/SkJpegxlCodec.cpp index a40ecb2036f3..a29ccc0df466 100644 --- a/src/codec/SkJpegxlCodec.cpp +++ b/src/codec/SkJpegxlCodec.cpp @@ -8,6 +8,7 @@ #include "src/codec/SkJpegxlCodec.h" #include "include/codec/SkCodec.h" +#include "include/codec/SkJpegxlDecoder.h" #include "include/core/SkColorType.h" #include "include/core/SkData.h" #include "include/core/SkImageInfo.h" @@ -465,7 +466,7 @@ const SkFrameHolder* SkJpegxlCodec::getFrameHolder() const { // TODO(eustas): implement // SkSampler* SkJpegxlCodec::getSampler(bool /*createIfNecessary*/) { return nullptr; } -namespace SkJpegDecoder { +namespace SkJpegxlDecoder { bool IsJpegxl(const void* data, size_t len) { return SkJpegxlCodec::IsJpegxl(data, len); } diff --git a/src/codec/SkPngCodec.cpp b/src/codec/SkPngCodec.cpp index e17d9322a8dc..1953be4ec0ce 100644 --- a/src/codec/SkPngCodec.cpp +++ b/src/codec/SkPngCodec.cpp @@ -8,6 +8,7 @@ #include "src/codec/SkPngCodec.h" #include "include/codec/SkPngChunkReader.h" +#include "include/codec/SkPngDecoder.h" #include "include/core/SkAlphaType.h" #include "include/core/SkColor.h" #include "include/core/SkColorType.h" diff --git a/src/codec/SkRawCodec.cpp b/src/codec/SkRawCodec.cpp index 3dcd6298a286..b97efd667eed 100644 --- a/src/codec/SkRawCodec.cpp +++ b/src/codec/SkRawCodec.cpp @@ -8,6 +8,7 @@ #include "src/codec/SkRawCodec.h" #include "include/codec/SkCodec.h" +#include "include/codec/SkRawDecoder.h" #include "include/core/SkColorSpace.h" #include "include/core/SkData.h" #include "include/core/SkImageInfo.h" diff --git a/src/codec/SkWbmpCodec.cpp b/src/codec/SkWbmpCodec.cpp index f8ac294b9641..0a6714b4585b 100644 --- a/src/codec/SkWbmpCodec.cpp +++ b/src/codec/SkWbmpCodec.cpp @@ -8,6 +8,7 @@ #include "src/codec/SkWbmpCodec.h" #include "include/codec/SkCodec.h" +#include "include/codec/SkWbmpDecoder.h" #include "include/codec/SkEncodedImageFormat.h" #include "include/core/SkColorType.h" #include "include/core/SkData.h" diff --git a/src/codec/SkWebpCodec.cpp b/src/codec/SkWebpCodec.cpp index d071cbf7882c..c6e419c1de25 100644 --- a/src/codec/SkWebpCodec.cpp +++ b/src/codec/SkWebpCodec.cpp @@ -9,6 +9,7 @@ #include "include/codec/SkCodec.h" #include "include/codec/SkCodecAnimation.h" +#include "include/codec/SkWebpDecoder.h" #include "include/core/SkAlphaType.h" #include "include/core/SkBitmap.h" #include "include/core/SkColorType.h" diff --git a/src/codec/SkWuffsCodec.cpp b/src/codec/SkWuffsCodec.cpp index be126417417e..cc1225950eff 100644 --- a/src/codec/SkWuffsCodec.cpp +++ b/src/codec/SkWuffsCodec.cpp @@ -8,6 +8,7 @@ #include "include/codec/SkCodec.h" #include "include/codec/SkCodecAnimation.h" #include "include/codec/SkEncodedImageFormat.h" +#include "include/codec/SkGifDecoder.h" #include "include/core/SkAlphaType.h" #include "include/core/SkBitmap.h" #include "include/core/SkBlendMode.h" @@ -32,7 +33,6 @@ #include "src/codec/SkSampler.h" #include "src/codec/SkScalingCodec.h" #include "src/core/SkDraw.h" -#include "src/core/SkMatrixProvider.h" #include "src/core/SkRasterClip.h" #include "src/core/SkStreamPriv.h" @@ -119,6 +119,45 @@ static SkCodecAnimation::DisposalMethod wuffs_disposal_to_skia_disposal( } } +static bool wuffs_status_means_incomplete_input(const char* status) { + if (status == wuffs_base__suspension__short_read) { + return true; + } +#if WUFFS_VERSION_BUILD_METADATA_COMMIT_COUNT >= 3390 + // Commit count 3390 is Wuffs v0.3.1, which added "truncated input" errors + // to fix https://github.com/google/wuffs/issues/96 +#if 0 + if ((status == wuffs_lzw__error__truncated_input) || + (status == wuffs_gif__error__truncated_input)) { + return true; + } +#else + // TODO: remove this workaround (and re-enable the "#if 0" code above) + // after https://skia-review.googlesource.com/c/skia/+/723597 "Roll + // third_party/wuffs to version 0.3.3" lands. The Mac and Linux commit + // queue is happy with 723597 but the Windows build-bots are not. They fail + // because, for some unknown reason only on Windows, upgrading + // third_party/wuffs picks up the wuffs_gif__error__truncated_input + // *declaration* (and the higher WUFFS_VERSION_BUILD_METADATA_COMMIT_COUNT + // value when "wuffs-v0.3.c" is included above 'as a .h file') but not its + // *definition* (when "wuffs-v0.3.c" is separately built 'as a .c file'). + // + // The Windows build-bots fail at link time with "lld-link: error: undefined + // symbol: char const *const wuffs_lzw__error__truncated_input", even though + // they're perfectly happy with wuffs_base__suspension__short_read used + // earlier in this function, a "const char[]" declared and defined in + // exactly the same way as wuffs_lzw__error__truncated_input. Maybe it's a + // clean versus incremental build issue, but that's just a guess. + if (status && (status[0] == '#') && + (!strcmp(status, "#lzw: truncated input") || + !strcmp(status, "#gif: truncated input"))) { + return true; + } +#endif +#endif + return false; +} + static SkAlphaType to_alpha_type(bool opaque) { return opaque ? kOpaque_SkAlphaType : kPremul_SkAlphaType; } @@ -143,7 +182,7 @@ static SkCodec::Result reset_and_decode_image_config(wuffs_gif__decoder* d status = decoder->decode_image_config(imgcfg, b); if (status.repr == nullptr) { break; - } else if (status.repr != wuffs_base__suspension__short_read) { + } else if (!wuffs_status_means_incomplete_input(status.repr)) { SkCodecPrintf("decode_image_config: %s", status.message()); return SkCodec::kErrorInInput; } else if (!fill_buffer(b, s)) { @@ -438,7 +477,7 @@ SkCodec::Result SkWuffsCodec::onStartIncrementalDecode(const SkImageInfo& d } const char* status = this->decodeFrameConfig(); - if (status == wuffs_base__suspension__short_read) { + if (wuffs_status_means_incomplete_input(status)) { return SkCodec::kIncompleteInput; } else if (status != nullptr) { SkCodecPrintf("decodeFrameConfig: %s", status); @@ -602,7 +641,7 @@ SkCodec::Result SkWuffsCodec::onIncrementalDecode(int* rowsDecoded) { SkCodec::Result SkWuffsCodec::onIncrementalDecodeOnePass() { const char* status = this->decodeFrame(); if (status != nullptr) { - if (status == wuffs_base__suspension__short_read) { + if (wuffs_status_means_incomplete_input(status)) { return SkCodec::kIncompleteInput; } else { SkCodecPrintf("decodeFrame: %s", status); @@ -627,7 +666,7 @@ SkCodec::Result SkWuffsCodec::onIncrementalDecodeTwoPass() { alphaType = to_alpha_type(f->reportedAlpha() == SkEncodedInfo::kOpaque_Alpha); } if (status != nullptr) { - if (status == wuffs_base__suspension__short_read) { + if (wuffs_status_means_incomplete_input(status)) { result = SkCodec::kIncompleteInput; } else { SkCodecPrintf("decodeFrame: %s", status); @@ -706,8 +745,7 @@ SkCodec::Result SkWuffsCodec::onIncrementalDecodeTwoPass() { draw.fDst.reset(dstInfo(), fIncrDecDst, fIncrDecRowBytes); SkMatrix matrix = SkMatrix::RectToRect(SkRect::Make(this->dimensions()), SkRect::Make(this->dstInfo().dimensions())); - SkMatrixProvider matrixProvider(matrix); - draw.fMatrixProvider = &matrixProvider; + draw.fCTM = &matrix; SkRasterClip rc(SkIRect::MakeSize(this->dstInfo().dimensions())); draw.fRC = &rc; diff --git a/src/core/BUILD.bazel b/src/core/BUILD.bazel index c2408918d65c..a1f6466fbcec 100644 --- a/src/core/BUILD.bazel +++ b/src/core/BUILD.bazel @@ -18,8 +18,6 @@ CORE_SKSLC_FILES = [ "SkString.cpp", "SkStringUtils.cpp", "SkStringUtils.h", - "SkVM.cpp", - "SkVM.h", ] split_srcs_and_hdrs( @@ -52,12 +50,18 @@ CORE_FILES = [ "SkBitmapProcState.cpp", "SkBitmapProcState.h", "SkBitmapProcState_matrixProcs.cpp", + "SkBitmapProcState_opts.cpp", + "SkBitmapProcState_opts_hsw.cpp", + "SkBitmapProcState_opts_ssse3.cpp", "SkBlendMode.cpp", "SkBlendModeBlender.cpp", "SkBlendModeBlender.h", "SkBlendModePriv.h", "SkBlenderBase.h", "SkBlitBWMaskTemplate.h", # TODO(kjlubick) should this be a textual header? + "SkBlitMask.h", + "SkBlitMask_opts.cpp", + "SkBlitMask_opts_ssse3.cpp", "SkBlitRow.h", "SkBlitRow_D32.cpp", "SkBlitter.cpp", @@ -127,7 +131,6 @@ CORE_FILES = [ "SkEdgeClipper.cpp", "SkEdgeClipper.h", "SkEffectPriv.h", - "SkEnumBitMask.h", "SkEnumerate.h", "SkExecutor.cpp", "SkFDot6.h", @@ -153,8 +156,6 @@ CORE_FILES = [ "SkGlyph.h", "SkGlyphRunPainter.cpp", "SkGlyphRunPainter.h", - "SkGpuBlurUtils.cpp", - "SkGpuBlurUtils.h", "SkGraphics.cpp", "SkIDChangeListener.cpp", "SkIPoint16.h", @@ -191,10 +192,7 @@ CORE_FILES = [ "SkMaskGamma.h", "SkMatrix.cpp", "SkMatrixPriv.h", - "SkMatrixProvider.h", "SkMatrixUtils.h", - "SkMesh.cpp", - "SkMeshPriv.h", "SkMessageBus.h", "SkMipmap.cpp", "SkMipmap.h", @@ -216,6 +214,7 @@ CORE_FILES = [ "SkPathBuilder.cpp", "SkPathEffect.cpp", "SkPathEffectBase.h", + "SkPathEnums.h", "SkPathMakers.h", "SkPathMeasure.cpp", "SkPathMeasurePriv.h", @@ -269,7 +268,6 @@ CORE_FILES = [ "SkRegion_path.cpp", "SkResourceCache.cpp", "SkResourceCache.h", - "SkRuntimeEffectPriv.h", "SkSafeRange.h", "SkSamplingPriv.h", "SkScalar.cpp", @@ -325,9 +323,6 @@ CORE_FILES = [ "SkTypeface_remote.cpp", "SkTypeface_remote.h", "SkUnPreMultiply.cpp", - "SkVMBlitter.cpp", - "SkVMBlitter.h", - "SkVM_fwd.h", "SkValidationUtils.h", "SkVertState.cpp", "SkVertState.h", @@ -353,13 +348,14 @@ split_srcs_and_hdrs( files = CORE_FILES, ) -# These files are only needed if SkSL is enabled (GPU backend or SkVM). +# These files are only needed if SkSL is enabled (GPU backend or SkRP). SKSL_FILES = [ - "SkFilterColorProgram.cpp", - "SkFilterColorProgram.h", - "SkRuntimeEffect.cpp", + "SkMesh.cpp", + "SkMeshPriv.h", "SkRuntimeBlender.cpp", "SkRuntimeBlender.h", + "SkRuntimeEffect.cpp", + "SkRuntimeEffectPriv.h", "SkSLTypeShared.cpp", "SkSLTypeShared.h", ] diff --git a/src/core/SkAAClip.cpp b/src/core/SkAAClip.cpp index 12a38f3a69d1..797268c331eb 100644 --- a/src/core/SkAAClip.cpp +++ b/src/core/SkAAClip.cpp @@ -848,7 +848,7 @@ bool SkAAClip::Builder::blitPath(SkAAClip* target, const SkPath& path, bool doAA /////////////////////////////////////////////////////////////////////////////// -void SkAAClip::copyToMask(SkMask* mask) const { +void SkAAClip::copyToMask(SkMaskBuilder* mask) const { auto expandRowToMask = [](uint8_t* dst, const uint8_t* row, int width) { while (width > 0) { int n = row[0]; @@ -861,21 +861,21 @@ void SkAAClip::copyToMask(SkMask* mask) const { SkASSERT(0 == width); }; - mask->fFormat = SkMask::kA8_Format; + mask->format() = SkMask::kA8_Format; if (this->isEmpty()) { - mask->fBounds.setEmpty(); - mask->fImage = nullptr; - mask->fRowBytes = 0; + mask->bounds().setEmpty(); + mask->image() = nullptr; + mask->rowBytes() = 0; return; } - mask->fBounds = fBounds; - mask->fRowBytes = fBounds.width(); + mask->bounds() = fBounds; + mask->rowBytes() = fBounds.width(); size_t size = mask->computeImageSize(); - mask->fImage = SkMask::AllocImage(size); + mask->image() = SkMaskBuilder::AllocImage(size); Iter iter = RunHead::Iterate(*this); - uint8_t* dst = mask->fImage; + uint8_t* dst = mask->image(); const int width = fBounds.width(); int y = fBounds.fTop; @@ -1917,14 +1917,14 @@ void SkAAClipBlitter::blitMask(const SkMask& origMask, const SkIRect& clip) { const SkMask* mask = &origMask; // if we're BW, we need to upscale to A8 (ugh) - SkMask grayMask; + SkMaskBuilder grayMask; if (SkMask::kBW_Format == origMask.fFormat) { - grayMask.fFormat = SkMask::kA8_Format; - grayMask.fBounds = origMask.fBounds; - grayMask.fRowBytes = origMask.fBounds.width(); + grayMask.format() = SkMask::kA8_Format; + grayMask.bounds() = origMask.fBounds; + grayMask.rowBytes() = origMask.fBounds.width(); size_t size = grayMask.computeImageSize(); - grayMask.fImage = (uint8_t*)fGrayMaskScratch.reset(size, - SkAutoMalloc::kReuse_OnShrink); + grayMask.image() = reinterpret_cast( + fGrayMaskScratch.reset(size, SkAutoMalloc::kReuse_OnShrink)); upscaleBW2A8(&grayMask, origMask); mask = &grayMask; @@ -1940,12 +1940,12 @@ void SkAAClipBlitter::blitMask(const SkMask& origMask, const SkIRect& clip) { const int width = clip.width(); MergeAAProc mergeProc = find_merge_aa_proc(mask->fFormat); - SkMask rowMask; - rowMask.fFormat = SkMask::k3D_Format == mask->fFormat ? SkMask::kA8_Format : mask->fFormat; - rowMask.fBounds.fLeft = clip.fLeft; - rowMask.fBounds.fRight = clip.fRight; - rowMask.fRowBytes = mask->fRowBytes; // doesn't matter, since our height==1 - rowMask.fImage = (uint8_t*)fScanlineScratch; + SkMaskBuilder rowMask; + rowMask.format() = SkMask::k3D_Format == mask->fFormat ? SkMask::kA8_Format : mask->fFormat; + rowMask.bounds().fLeft = clip.fLeft; + rowMask.bounds().fRight = clip.fRight; + rowMask.rowBytes() = mask->fRowBytes; // doesn't matter, since our height==1 + rowMask.image() = (uint8_t*)fScanlineScratch; int y = clip.fTop; const int stopY = y + clip.height(); @@ -1959,9 +1959,9 @@ void SkAAClipBlitter::blitMask(const SkMask& origMask, const SkIRect& clip) { int initialCount; row = fAAClip->findX(row, clip.fLeft, &initialCount); do { - mergeProc(src, width, row, initialCount, rowMask.fImage); - rowMask.fBounds.fTop = y; - rowMask.fBounds.fBottom = y + 1; + mergeProc(src, width, row, initialCount, rowMask.image()); + rowMask.bounds().fTop = y; + rowMask.bounds().fBottom = y + 1; fBlitter->blitMask(rowMask, rowMask.fBounds); src = (const void*)((const char*)src + srcRB); } while (++y < localStopY); diff --git a/src/core/SkAAClip.h b/src/core/SkAAClip.h index 5469a09e0ac4..2683d7bf0e2c 100644 --- a/src/core/SkAAClip.h +++ b/src/core/SkAAClip.h @@ -19,6 +19,7 @@ class SkPath; class SkRegion; enum class SkClipOp; struct SkMask; +struct SkMaskBuilder; class SkAAClip { public: @@ -50,7 +51,7 @@ class SkAAClip { * Allocates a mask the size of the aaclip, and expands its data into * the mask, using kA8_Format. Used for tests and visualization purposes. */ - void copyToMask(SkMask*) const; + void copyToMask(SkMaskBuilder*) const; bool quickContains(const SkIRect& r) const { return this->quickContains(r.fLeft, r.fTop, r.fRight, r.fBottom); diff --git a/src/core/SkAdvancedTypefaceMetrics.h b/src/core/SkAdvancedTypefaceMetrics.h index 80491e38ff13..65e17bb1a728 100644 --- a/src/core/SkAdvancedTypefaceMetrics.h +++ b/src/core/SkAdvancedTypefaceMetrics.h @@ -10,7 +10,7 @@ #include "include/core/SkRect.h" #include "include/core/SkString.h" -#include "include/private/SkBitmaskEnum.h" // IWYU pragma: keep +#include "src/base/SkBitmaskEnum.h" // IWYU pragma: keep #include #include diff --git a/src/core/SkAutoBlitterChoose.h b/src/core/SkAutoBlitterChoose.h index 34f4272e35ff..ba1e5af53927 100644 --- a/src/core/SkAutoBlitterChoose.h +++ b/src/core/SkAutoBlitterChoose.h @@ -12,7 +12,6 @@ #include "src/base/SkArenaAlloc.h" #include "src/core/SkBlitter.h" #include "src/core/SkDrawBase.h" -#include "src/core/SkMatrixProvider.h" #include "src/core/SkRasterClip.h" #include "src/core/SkSurfacePriv.h" @@ -23,22 +22,21 @@ class SkPixmap; class SkAutoBlitterChoose : SkNoncopyable { public: SkAutoBlitterChoose() {} - SkAutoBlitterChoose(const SkDrawBase& draw, const SkMatrixProvider* matrixProvider, - const SkPaint& paint, bool drawCoverage = false) { - this->choose(draw, matrixProvider, paint, drawCoverage); + SkAutoBlitterChoose(const SkDrawBase& draw, + const SkMatrix* ctm, + const SkPaint& paint, + bool drawCoverage = false) { + this->choose(draw, ctm, paint, drawCoverage); } SkBlitter* operator->() { return fBlitter; } SkBlitter* get() const { return fBlitter; } - SkBlitter* choose(const SkDrawBase& draw, const SkMatrixProvider* matrixProvider, + SkBlitter* choose(const SkDrawBase& draw, const SkMatrix* ctm, const SkPaint& paint, bool drawCoverage = false) { SkASSERT(!fBlitter); - if (!matrixProvider) { - matrixProvider = draw.fMatrixProvider; - } fBlitter = draw.fBlitterChooser(draw.fDst, - matrixProvider->localToDevice(), + ctm ? *ctm : *draw.fCTM, paint, &fAlloc, drawCoverage, diff --git a/src/core/SkAutoPixmapStorage.h b/src/core/SkAutoPixmapStorage.h index 345d657a4f9d..6d7f5145d297 100644 --- a/src/core/SkAutoPixmapStorage.h +++ b/src/core/SkAutoPixmapStorage.h @@ -10,7 +10,6 @@ #include "include/core/SkPixmap.h" #include "include/core/SkRefCnt.h" -#include "include/private/base/SkAttributes.h" #include "include/private/base/SkMalloc.h" #include @@ -60,13 +59,13 @@ class SkAutoPixmapStorage : public SkPixmap { * been allocated, the result is NULL. The caller is responsible for calling sk_free to free * the returned memory. */ - void* SK_WARN_UNUSED_RESULT detachPixels(); + [[nodiscard]] void* detachPixels(); /** * Returns an SkData object wrapping the allocated pixels memory, and resets the pixmap. * If the storage hasn't been allocated, the result is NULL. */ - sk_sp SK_WARN_UNUSED_RESULT detachPixelsAsData(); + [[nodiscard]] sk_sp detachPixelsAsData(); // We wrap these so we can clear our internal storage @@ -79,7 +78,7 @@ class SkAutoPixmapStorage : public SkPixmap { this->INHERITED::reset(info, addr, rb); } - bool SK_WARN_UNUSED_RESULT reset(const SkMask& mask) { + [[nodiscard]] bool reset(const SkMask& mask) { this->freeStorage(); return this->INHERITED::reset(mask); } diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp index 15487bcc6247..f43b91bfe298 100644 --- a/src/core/SkBitmap.cpp +++ b/src/core/SkBitmap.cpp @@ -334,14 +334,14 @@ bool SkBitmap::installPixels(const SkPixmap& pixmap) { nullptr, nullptr); } -bool SkBitmap::installMaskPixels(const SkMask& mask) { +bool SkBitmap::installMaskPixels(SkMaskBuilder& mask) { if (SkMask::kA8_Format != mask.fFormat) { this->reset(); return false; } return this->installPixels(SkImageInfo::MakeA8(mask.fBounds.width(), mask.fBounds.height()), - mask.fImage, mask.fRowBytes); + mask.image(), mask.fRowBytes); } /////////////////////////////////////////////////////////////////////////////// @@ -530,14 +530,14 @@ bool SkBitmap::extractAlpha(SkBitmap* dst, const SkPaint* paint, SkBitmap tmpBitmap; SkMatrix identity; - SkMask srcM, dstM; + SkMaskBuilder srcM, dstM; if (this->width() == 0 || this->height() == 0) { return false; } - srcM.fBounds.setWH(this->width(), this->height()); - srcM.fRowBytes = SkAlign4(this->width()); - srcM.fFormat = SkMask::kA8_Format; + srcM.bounds().setWH(this->width(), this->height()); + srcM.rowBytes() = SkAlign4(this->width()); + srcM.format() = SkMask::kA8_Format; SkMaskFilter* filter = paint ? paint->getMaskFilter() : nullptr; @@ -547,7 +547,7 @@ bool SkBitmap::extractAlpha(SkBitmap* dst, const SkPaint* paint, if (!as_MFB(filter)->filterMask(&dstM, srcM, identity, nullptr)) { goto NO_FILTER_CASE; } - dstM.fRowBytes = SkAlign4(dstM.fBounds.width()); + dstM.rowBytes() = SkAlign4(dstM.fBounds.width()); } else { NO_FILTER_CASE: tmpBitmap.setInfo(SkImageInfo::MakeA8(this->width(), this->height()), srcM.fRowBytes); @@ -564,14 +564,14 @@ bool SkBitmap::extractAlpha(SkBitmap* dst, const SkPaint* paint, tmpBitmap.swap(*dst); return true; } - srcM.fImage = SkMask::AllocImage(srcM.computeImageSize()); - SkAutoMaskFreeImage srcCleanup(srcM.fImage); + srcM.image() = SkMaskBuilder::AllocImage(srcM.computeImageSize()); + SkAutoMaskFreeImage srcCleanup(srcM.image()); - GetBitmapAlpha(*this, srcM.fImage, srcM.fRowBytes); + GetBitmapAlpha(*this, srcM.image(), srcM.fRowBytes); if (!as_MFB(filter)->filterMask(&dstM, srcM, identity, nullptr)) { goto NO_FILTER_CASE; } - SkAutoMaskFreeImage dstCleanup(dstM.fImage); + SkAutoMaskFreeImage dstCleanup(dstM.image()); tmpBitmap.setInfo(SkImageInfo::MakeA8(dstM.fBounds.width(), dstM.fBounds.height()), dstM.fRowBytes); diff --git a/src/core/SkBitmapDevice.cpp b/src/core/SkBitmapDevice.cpp index d919c7a6e927..7fe6458e3d66 100644 --- a/src/core/SkBitmapDevice.cpp +++ b/src/core/SkBitmapDevice.cpp @@ -34,7 +34,6 @@ #include "src/core/SkImageFilterCache.h" #include "src/core/SkImagePriv.h" #include "src/core/SkMatrixPriv.h" -#include "src/core/SkMatrixProvider.h" #include "src/core/SkRasterClip.h" #include "src/core/SkSpecialImage.h" #include "src/image/SkImage_Base.h" @@ -72,10 +71,10 @@ class SkDrawTiler { // Used for tiling and non-tiling SkDraw fDraw; - // fCurr... are only used if fNeedTiling - SkTLazy fTileMatrixProvider; - SkRasterClip fTileRC; - SkIPoint fOrigin; + // fTileMatrix... are only used if fNeedTiling + SkTLazy fTileMatrix; + SkRasterClip fTileRC; + SkIPoint fOrigin; bool fDone, fNeedsTiling; @@ -124,14 +123,14 @@ class SkDrawTiler { } if (fNeedsTiling) { - // fDraw.fDst and fMatrixProvider are reset each time in setupTileDraw() + // fDraw.fDst and fCTM are reset each time in setupTileDraw() fDraw.fRC = &fTileRC; // we'll step/increase it before using it fOrigin.set(fSrcBounds.fLeft - kMaxDim, fSrcBounds.fTop); } else { // don't reference fSrcBounds, as it may not have been set fDraw.fDst = fRootPixmap; - fDraw.fMatrixProvider = dev; + fDraw.fCTM = &dev->localToDevice(); fDraw.fRC = &dev->fRCStack.rc(); fOrigin.set(0, 0); } @@ -183,12 +182,11 @@ class SkDrawTiler { SkASSERT_RELEASE(success); // now don't use bounds, since fDst has the clipped dimensions. - fDraw.fMatrixProvider = fTileMatrixProvider.init(fDevice->asMatrixProvider(), - SkIntToScalar(-fOrigin.x()), - SkIntToScalar(-fOrigin.y())); + fTileMatrix.init(fDevice->localToDevice()); + fTileMatrix->postTranslate(-fOrigin.x(), -fOrigin.y()); + fDraw.fCTM = fTileMatrix.get(); fDevice->fRCStack.rc().translate(-fOrigin.x(), -fOrigin.y(), &fTileRC); - fTileRC.op(SkIRect::MakeWH(fDraw.fDst.width(), fDraw.fDst.height()), - SkClipOp::kIntersect); + fTileRC.op(SkIRect::MakeSize(fDraw.fDst.dimensions()), SkClipOp::kIntersect); } }; @@ -211,7 +209,7 @@ class SkBitmapDevice::BDDraw : public SkDraw { // NoDrawDevice uses us (why?) so we have to catch this case w/ no pixels fDst.reset(dev->imageInfo(), nullptr, 0); } - fMatrixProvider = dev; + fCTM = &dev->localToDevice(); fRC = &dev->fRCStack.rc(); } }; @@ -554,11 +552,9 @@ void SkBitmapDevice::drawVertices(const SkVertices* vertices, BDDraw(this).drawVertices(vertices, std::move(blender), paint, skipColorXform); } -#ifdef SK_ENABLE_SKSL void SkBitmapDevice::drawMesh(const SkMesh&, sk_sp, const SkPaint&) { - // TODO: Implement + // TODO(brianosman): Implement, maybe with a subclass of BitmapDevice that has SkSL support. } -#endif void SkBitmapDevice::drawAtlas(const SkRSXform xform[], const SkRect tex[], @@ -590,34 +586,35 @@ void SkBitmapDevice::drawSpecial(SkSpecialImage* src, const SkPaint& paint) { SkASSERT(!paint.getImageFilter()); SkASSERT(!paint.getMaskFilter()); - SkASSERT(!src->isTextureBacked()); + SkASSERT(!src->isGaneshBacked()); + SkASSERT(!src->isGraphiteBacked()); SkBitmap resultBM; if (src->getROPixels(&resultBM)) { SkDraw draw; - SkMatrixProvider matrixProvider(localToDevice); if (!this->accessPixels(&draw.fDst)) { return; // no pixels to draw to so skip it } - draw.fMatrixProvider = &matrixProvider; + draw.fCTM = &localToDevice; draw.fRC = &fRCStack.rc(); draw.drawBitmap(resultBM, SkMatrix::I(), nullptr, sampling, paint); } } sk_sp SkBitmapDevice::makeSpecial(const SkBitmap& bitmap) { - return SkSpecialImage::MakeFromRaster(bitmap.bounds(), bitmap, this->surfaceProps()); + return SkSpecialImages::MakeFromRaster(bitmap.bounds(), bitmap, this->surfaceProps()); } sk_sp SkBitmapDevice::makeSpecial(const SkImage* image) { - return SkSpecialImage::MakeFromImage(nullptr, SkIRect::MakeWH(image->width(), image->height()), - image->makeNonTextureImage(), this->surfaceProps()); + return SkSpecialImages::MakeFromRaster(SkIRect::MakeWH(image->width(), image->height()), + image->makeNonTextureImage(), + this->surfaceProps()); } sk_sp SkBitmapDevice::snapSpecial(const SkIRect& bounds, bool forceCopy) { if (forceCopy) { - return SkSpecialImage::CopyFromRaster(bounds, fBitmap, this->surfaceProps()); + return SkSpecialImages::CopyFromRaster(bounds, fBitmap, this->surfaceProps()); } else { - return SkSpecialImage::MakeFromRaster(bounds, fBitmap, this->surfaceProps()); + return SkSpecialImages::MakeFromRaster(bounds, fBitmap, this->surfaceProps()); } } diff --git a/src/core/SkBitmapDevice.h b/src/core/SkBitmapDevice.h index 3b7e90352737..be7d0f5085ef 100644 --- a/src/core/SkBitmapDevice.h +++ b/src/core/SkBitmapDevice.h @@ -99,9 +99,8 @@ class SkBitmapDevice : public SkBaseDevice { SkCanvas::SrcRectConstraint) override; void drawVertices(const SkVertices*, sk_sp, const SkPaint&, bool) override; -#ifdef SK_ENABLE_SKSL + // Implemented in src/sksl/SkBitmapDevice_mesh.cpp void drawMesh(const SkMesh&, sk_sp, const SkPaint&) override; -#endif void drawAtlas(const SkRSXform[], const SkRect[], const SkColor[], int count, sk_sp, const SkPaint&) override; diff --git a/src/core/SkBitmapProcState.cpp b/src/core/SkBitmapProcState.cpp index fd03b4417b2b..00a31ff5d352 100644 --- a/src/core/SkBitmapProcState.cpp +++ b/src/core/SkBitmapProcState.cpp @@ -255,7 +255,7 @@ bool SkBitmapProcState::chooseProcs() { fMatrixProc = this->chooseMatrixProc(translate_only); SkASSERT(fMatrixProc); - fSampleProc32 = fBilerp ? SkOpts::S32_alpha_D32_filter_DX : S32_alpha_D32_nofilter_DX ; + fSampleProc32 = fBilerp ? SkOpts::S32_alpha_D32_filter_DX : S32_alpha_D32_nofilter_DX; SkASSERT(fSampleProc32); // our special-case shaderprocs diff --git a/src/core/SkBitmapProcState.h b/src/core/SkBitmapProcState.h index fcfff5b110aa..2d5970ea3aad 100644 --- a/src/core/SkBitmapProcState.h +++ b/src/core/SkBitmapProcState.h @@ -212,4 +212,12 @@ namespace sktests { uint32_t pack_mirror(SkFixed f, unsigned max, size_t width); } +namespace SkOpts { + // SkBitmapProcState optimized Shader, Sample, or Matrix procs. + extern void (*S32_alpha_D32_filter_DX)(const SkBitmapProcState&, + const uint32_t* xy, int count, SkPMColor*); + + void Init_BitmapProcState(); +} // namespace SkOpts + #endif diff --git a/src/core/SkBitmapProcState_opts.cpp b/src/core/SkBitmapProcState_opts.cpp new file mode 100644 index 000000000000..ffa7f86ccbd9 --- /dev/null +++ b/src/core/SkBitmapProcState_opts.cpp @@ -0,0 +1,44 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "include/private/base/SkFeatures.h" +#include "src/core/SkBitmapProcState.h" +#include "src/core/SkCpu.h" +#include "src/core/SkOpts.h" + +#define SK_OPTS_TARGET SK_OPTS_TARGET_DEFAULT +#include "src/opts/SkOpts_SetTarget.h" + +#include "src/opts/SkBitmapProcState_opts.h" // IWYU pragma: keep + +#include "src/opts/SkOpts_RestoreTarget.h" + +namespace SkOpts { + DEFINE_DEFAULT(S32_alpha_D32_filter_DX); + + void Init_BitmapProcState_ssse3(); + void Init_BitmapProcState_hsw(); + + static bool init() { + #if defined(SK_ENABLE_OPTIMIZE_SIZE) + // All Init_foo functions are omitted when optimizing for size + #elif defined(SK_CPU_X86) + #if SK_CPU_SSE_LEVEL < SK_CPU_SSE_LEVEL_SSSE3 + if (SkCpu::Supports(SkCpu::SSSE3)) { Init_BitmapProcState_ssse3(); } + #endif + + #if SK_CPU_SSE_LEVEL < SK_CPU_SSE_LEVEL_AVX2 + if (SkCpu::Supports(SkCpu::HSW)) { Init_BitmapProcState_hsw(); } + #endif + #endif + return true; + } + + void Init_BitmapProcState() { + [[maybe_unused]] static bool gInitialized = init(); + } +} // namespace SkOpts diff --git a/src/core/SkBitmapProcState_opts_hsw.cpp b/src/core/SkBitmapProcState_opts_hsw.cpp new file mode 100644 index 000000000000..684f4c58e6be --- /dev/null +++ b/src/core/SkBitmapProcState_opts_hsw.cpp @@ -0,0 +1,32 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "include/private/base/SkFeatures.h" +#include "src/core/SkOpts.h" + +#if defined(SK_CPU_X86) && !defined(SK_ENABLE_OPTIMIZE_SIZE) + +// The order of these includes is important: +// 1) Select the target CPU architecture by defining SK_OPTS_TARGET and including SkOpts_SetTarget +// 2) Include the code to compile, typically in a _opts.h file. +// 3) Include SkOpts_RestoreTarget to switch back to the default CPU architecture + +#define SK_OPTS_TARGET SK_OPTS_TARGET_HSW +#include "src/opts/SkOpts_SetTarget.h" + +#include "src/core/SkBitmapProcState.h" +#include "src/opts/SkBitmapProcState_opts.h" + +#include "src/opts/SkOpts_RestoreTarget.h" + +namespace SkOpts { + void Init_BitmapProcState_hsw() { + S32_alpha_D32_filter_DX = hsw::S32_alpha_D32_filter_DX; + } +} // namespace SkOpts + +#endif // SK_CPU_X86 && !SK_ENABLE_OPTIMIZE_SIZE diff --git a/src/core/SkBitmapProcState_opts_ssse3.cpp b/src/core/SkBitmapProcState_opts_ssse3.cpp new file mode 100644 index 000000000000..8aa6108fa526 --- /dev/null +++ b/src/core/SkBitmapProcState_opts_ssse3.cpp @@ -0,0 +1,32 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "include/private/base/SkFeatures.h" +#include "src/core/SkOpts.h" + +#if defined(SK_CPU_X86) && !defined(SK_ENABLE_OPTIMIZE_SIZE) + +// The order of these includes is important: +// 1) Select the target CPU architecture by defining SK_OPTS_TARGET and including SkOpts_SetTarget +// 2) Include the code to compile, typically in a _opts.h file. +// 3) Include SkOpts_RestoreTarget to switch back to the default CPU architecture + +#define SK_OPTS_TARGET SK_OPTS_TARGET_SSSE3 +#include "src/opts/SkOpts_SetTarget.h" + +#include "src/core/SkBitmapProcState.h" +#include "src/opts/SkBitmapProcState_opts.h" + +#include "src/opts/SkOpts_RestoreTarget.h" + +namespace SkOpts { + void Init_BitmapProcState_ssse3() { + S32_alpha_D32_filter_DX = ssse3::S32_alpha_D32_filter_DX; + } +} // namespace SkOpts + +#endif // SK_CPU_X86 && !SK_ENABLE_OPTIMIZE_SIZE diff --git a/src/core/SkBlendModeBlender.cpp b/src/core/SkBlendModeBlender.cpp index cd290b42e524..b522fccf99fe 100644 --- a/src/core/SkBlendModeBlender.cpp +++ b/src/core/SkBlendModeBlender.cpp @@ -17,11 +17,6 @@ #include "src/core/SkReadBuffer.h" #include "src/core/SkWriteBuffer.h" -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/KeyHelpers.h" -#include "src/gpu/graphite/PaintParamsKey.h" -#endif - sk_sp SkBlender::Mode(SkBlendMode mode) { #define RETURN_SINGLETON_BLENDER(m) \ case m: { \ @@ -67,25 +62,6 @@ sk_sp SkBlender::Mode(SkBlendMode mode) { #undef RETURN_SINGLETON_BLENDER } -#if defined(SK_GRAPHITE) -#include "src/gpu/Blend.h" - -void SkBlendModeBlender::addToKey(const skgpu::graphite::KeyContext& keyContext, - skgpu::graphite::PaintParamsKeyBuilder* builder, - skgpu::graphite::PipelineDataGatherer* gatherer) const { - using namespace skgpu::graphite; - - SkSpan coeffs = skgpu::GetPorterDuffBlendConstants(fMode); - if (!coeffs.empty()) { - CoeffBlenderBlock::BeginBlock(keyContext, builder, gatherer, coeffs); - builder->endBlock(); - } else { - BlendModeBlenderBlock::BeginBlock(keyContext, builder, gatherer, fMode); - builder->endBlock(); - } -} -#endif - sk_sp SkBlendModeBlender::CreateProc(SkReadBuffer& buffer) { SkBlendMode mode = buffer.read32LE(SkBlendMode::kLastMode); return SkBlender::Mode(mode); @@ -99,11 +75,3 @@ bool SkBlendModeBlender::onAppendStages(const SkStageRec& rec) const { SkBlendMode_AppendStages(fMode, rec.fPipeline); return true; } - -#if defined(SK_ENABLE_SKVM) -skvm::Color SkBlendModeBlender::onProgram(skvm::Builder* p, skvm::Color src, skvm::Color dst, - const SkColorInfo& colorInfo, skvm::Uniforms* uniforms, - SkArenaAlloc* alloc) const { - return p->blend(fMode, src, dst); -} -#endif diff --git a/src/core/SkBlendModeBlender.h b/src/core/SkBlendModeBlender.h index 0c4c07d7041e..515d9a6aad5c 100644 --- a/src/core/SkBlendModeBlender.h +++ b/src/core/SkBlendModeBlender.h @@ -32,22 +32,10 @@ class SkBlendModeBlender : public SkBlenderBase { std::optional asBlendMode() const final { return fMode; } -#if defined(SK_GRAPHITE) - void addToKey(const skgpu::graphite::KeyContext&, - skgpu::graphite::PaintParamsKeyBuilder*, - skgpu::graphite::PipelineDataGatherer*) const override; -#endif - void flatten(SkWriteBuffer& buffer) const override; bool onAppendStages(const SkStageRec& rec) const override; -#if defined(SK_ENABLE_SKVM) - skvm::Color onProgram(skvm::Builder* p, skvm::Color src, skvm::Color dst, - const SkColorInfo& colorInfo, skvm::Uniforms* uniforms, - SkArenaAlloc* alloc) const override; -#endif - SkBlendMode fMode; }; diff --git a/src/core/SkBlenderBase.h b/src/core/SkBlenderBase.h index 05844c9af0de..aafde4ea41ab 100644 --- a/src/core/SkBlenderBase.h +++ b/src/core/SkBlenderBase.h @@ -10,7 +10,6 @@ #include "include/core/SkBlender.h" #include "src/base/SkArenaAlloc.h" -#include "src/core/SkVM.h" #include #include @@ -45,31 +44,14 @@ class SkBlenderBase : public SkBlender { */ virtual std::optional asBlendMode() const { return {}; } - SK_WARN_UNUSED_RESULT bool appendStages(const SkStageRec& rec) const { + [[nodiscard]] bool appendStages(const SkStageRec& rec) const { return this->onAppendStages(rec); } - SK_WARN_UNUSED_RESULT - virtual bool onAppendStages(const SkStageRec& rec) const = 0; - -#if defined(SK_ENABLE_SKVM) - /** Creates the blend program in SkVM. */ - SK_WARN_UNUSED_RESULT - skvm::Color program(skvm::Builder* p, skvm::Color src, skvm::Color dst, - const SkColorInfo& colorInfo, skvm::Uniforms* uniforms, - SkArenaAlloc* alloc) const { - return this->onProgram(p, src, dst, colorInfo, uniforms, alloc); - } -#endif + [[nodiscard]] virtual bool onAppendStages(const SkStageRec& rec) const = 0; virtual SkRuntimeEffect* asRuntimeEffect() const { return nullptr; } -#if defined(SK_GRAPHITE) - virtual void addToKey(const skgpu::graphite::KeyContext&, - skgpu::graphite::PaintParamsKeyBuilder*, - skgpu::graphite::PipelineDataGatherer*) const = 0; -#endif - static SkFlattenable::Type GetFlattenableType() { return kSkBlender_Type; } SkFlattenable::Type getFlattenableType() const override { return GetFlattenableType(); } @@ -80,13 +62,6 @@ class SkBlenderBase : public SkBlender { }; virtual BlenderType type() const = 0; - -private: -#if defined(SK_ENABLE_SKVM) - virtual skvm::Color onProgram(skvm::Builder* p, skvm::Color src, skvm::Color dst, - const SkColorInfo& colorInfo, skvm::Uniforms* uniforms, - SkArenaAlloc* alloc) const = 0; -#endif }; inline SkBlenderBase* as_BB(SkBlender* blend) { diff --git a/src/core/SkBlitMask.h b/src/core/SkBlitMask.h new file mode 100644 index 000000000000..9bfcc4f34263 --- /dev/null +++ b/src/core/SkBlitMask.h @@ -0,0 +1,22 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef SkBlitMask_DEFINED +#define SkBlitMask_DEFINED + +#include "include/core/SkColor.h" + +namespace SkOpts { + // Optimized mask-blit routine + extern void (*blit_mask_d32_a8)(SkPMColor* dst, size_t dstRB, + const SkAlpha* mask, size_t maskRB, + SkColor color, int w, int h); + + void Init_BlitMask(); +} // namespace SkOpts + +#endif // SkBlitMask_DEFINED diff --git a/src/core/SkBlitMask_opts.cpp b/src/core/SkBlitMask_opts.cpp new file mode 100644 index 000000000000..2a9d75d8a0df --- /dev/null +++ b/src/core/SkBlitMask_opts.cpp @@ -0,0 +1,39 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "include/private/base/SkFeatures.h" +#include "src/core/SkBlitMask.h" +#include "src/core/SkCpu.h" +#include "src/core/SkOpts.h" + +#define SK_OPTS_TARGET SK_OPTS_TARGET_DEFAULT +#include "src/opts/SkOpts_SetTarget.h" + +#include "src/opts/SkBlitMask_opts.h" // IWYU pragma: keep + +#include "src/opts/SkOpts_RestoreTarget.h" + +namespace SkOpts { + DEFINE_DEFAULT(blit_mask_d32_a8); + + void Init_BlitMask_ssse3(); + + static bool init() { + #if defined(SK_ENABLE_OPTIMIZE_SIZE) + // All Init_foo functions are omitted when optimizing for size + #elif defined(SK_CPU_X86) + #if SK_CPU_SSE_LEVEL < SK_CPU_SSE_LEVEL_SSSE3 + if (SkCpu::Supports(SkCpu::SSSE3)) { Init_BlitMask_ssse3(); } + #endif + #endif + return true; + } + + void Init_BlitMask() { + [[maybe_unused]] static bool gInitialized = init(); + } +} // namespace SkOpts diff --git a/src/core/SkBlitMask_opts_ssse3.cpp b/src/core/SkBlitMask_opts_ssse3.cpp new file mode 100644 index 000000000000..a133252e2602 --- /dev/null +++ b/src/core/SkBlitMask_opts_ssse3.cpp @@ -0,0 +1,32 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "include/private/base/SkFeatures.h" +#include "src/core/SkBlitMask.h" +#include "src/core/SkOpts.h" + +#if defined(SK_CPU_X86) && !defined(SK_ENABLE_OPTIMIZE_SIZE) + +// The order of these includes is important: +// 1) Select the target CPU architecture by defining SK_OPTS_TARGET and including SkOpts_SetTarget +// 2) Include the code to compile, typically in a _opts.h file. +// 3) Include SkOpts_RestoreTarget to switch back to the default CPU architecture + +#define SK_OPTS_TARGET SK_OPTS_TARGET_SSSE3 +#include "src/opts/SkOpts_SetTarget.h" + +#include "src/opts/SkBlitMask_opts.h" + +#include "src/opts/SkOpts_RestoreTarget.h" + +namespace SkOpts { + void Init_BlitMask_ssse3() { + blit_mask_d32_a8 = ssse3::blit_mask_d32_a8; + } +} // namespace SkOpts + +#endif // SK_CPU_X86 && !SK_ENABLE_OPTIMIZE_SIZE diff --git a/src/core/SkBlitRow.h b/src/core/SkBlitRow.h index cc4ba864071e..6fbd44f924b2 100644 --- a/src/core/SkBlitRow.h +++ b/src/core/SkBlitRow.h @@ -29,10 +29,9 @@ class SkBlitRow { static Proc32 Factory32(unsigned flags32); /** Blend a single color onto a row of S32 pixels, writing the result - into a row of D32 pixels. src and dst may be the same memory, but - if they are not, they may not overlap. + back to the same memory. */ - static void Color32(SkPMColor dst[], const SkPMColor src[], int count, SkPMColor color); + static void Color32(SkPMColor dst[], int count, SkPMColor color); }; #endif diff --git a/src/core/SkBlitRow_D32.cpp b/src/core/SkBlitRow_D32.cpp index baa2638dc82a..131018d93842 100644 --- a/src/core/SkBlitRow_D32.cpp +++ b/src/core/SkBlitRow_D32.cpp @@ -312,10 +312,10 @@ SkBlitRow::Proc32 SkBlitRow::Factory32(unsigned flags) { : kProcs[flags]; } -void SkBlitRow::Color32(SkPMColor dst[], const SkPMColor src[], int count, SkPMColor color) { +void SkBlitRow::Color32(SkPMColor dst[], int count, SkPMColor color) { switch (SkGetPackedA32(color)) { - case 0: memmove(dst, src, count * sizeof(SkPMColor)); return; - case 255: SkOpts::memset32(dst, color, count); return; + case 0: /* Nothing to do */ return; + case 255: SkOpts::memset32(dst, color, count); return; } - return SkOpts::blit_row_color32(dst, src, count, color); + return SkOpts::blit_row_color32(dst, count, color); } diff --git a/src/core/SkBlitter.cpp b/src/core/SkBlitter.cpp index 41c22b61c9db..4a8474568ae5 100644 --- a/src/core/SkBlitter.cpp +++ b/src/core/SkBlitter.cpp @@ -32,7 +32,6 @@ #include "src/core/SkOpts.h" #include "src/core/SkPaintPriv.h" #include "src/core/SkRegionPriv.h" -#include "src/core/SkVMBlitter.h" #include "src/shaders/SkShaderBase.h" #include @@ -735,28 +734,15 @@ SkBlitter* SkBlitter::Choose(const SkPixmap& device, paint.writable()->setDither(false); } - // Same basic idea used a few times: try SkRP, then try SkVM, then give up with a null-blitter. - auto create_SkRP_or_SkVMBlitter = [&]() -> SkBlitter* { - - // We need to make sure that in case RP blitter cannot be created we use VM and - // when VM blitter cannot be created we use RP - if (auto blitter = SkCreateRasterPipelineBlitter(device, - *paint, - ctm, - alloc, - clipShader, - props)) { - return blitter; - } - if (auto blitter = SkVMBlitter::Make(device, *paint, ctm, alloc, clipShader)) { - return blitter; - } - return alloc->make(); + auto CreateSkRPBlitter = [&]() -> SkBlitter* { + auto blitter = SkCreateRasterPipelineBlitter(device, *paint, ctm, alloc, clipShader, props); + return blitter ? blitter + : alloc->make(); }; // We'll end here for many interesting cases: color spaces, color filters, most color types. if (clipShader || !UseLegacyBlitter(device, *paint, ctm)) { - return create_SkRP_or_SkVMBlitter(); + return CreateSkRPBlitter(); } // Everything but legacy kN32_SkColorType should already be handled. @@ -768,13 +754,17 @@ SkBlitter* SkBlitter::Choose(const SkPixmap& device, // Legacy blitters keep their shader state on a shader context. SkShaderBase::Context* shaderContext = nullptr; if (paint->getShader()) { - shaderContext = as_SB(paint->getShader())->makeContext( - {paint->getColor4f(), ctm, nullptr, device.colorType(), device.colorSpace(), props}, - alloc); + shaderContext = as_SB(paint->getShader()) + ->makeContext({paint->getAlpha(), + SkShaders::MatrixRec(ctm), + device.colorType(), + device.colorSpace(), + props}, + alloc); // Creating the context isn't always possible... try fallbacks before giving up. if (!shaderContext) { - return create_SkRP_or_SkVMBlitter(); + return CreateSkRPBlitter(); } } diff --git a/src/core/SkBlitter_ARGB32.cpp b/src/core/SkBlitter_ARGB32.cpp index 052fe2d026f9..3b3790b49219 100644 --- a/src/core/SkBlitter_ARGB32.cpp +++ b/src/core/SkBlitter_ARGB32.cpp @@ -19,6 +19,7 @@ #include "include/private/base/SkTo.h" #include "src/base/SkUtils.h" #include "src/base/SkVx.h" +#include "src/core/SkBlitMask.h" #include "src/core/SkBlitRow.h" #include "src/core/SkCoreBlitters.h" #include "src/core/SkMask.h" @@ -707,7 +708,7 @@ void SkARGB32_Blitter::blitH(int x, int y, int width) { SkASSERT(x >= 0 && y >= 0 && x + width <= fDevice.width()); uint32_t* device = fDevice.writable_addr32(x, y); - SkBlitRow::Color32(device, device, width, fPMColor); + SkBlitRow::Color32(device, width, fPMColor); } void SkARGB32_Blitter::blitAntiH(int x, int y, const SkAlpha antialias[], @@ -732,7 +733,7 @@ void SkARGB32_Blitter::blitAntiH(int x, int y, const SkAlpha antialias[], SkOpts::memset32(device, color, count); } else { uint32_t sc = SkAlphaMulQ(color, SkAlpha255To256(aa)); - SkBlitRow::Color32(device, device, count, sc); + SkBlitRow::Color32(device, count, sc); } } runs += count; @@ -896,7 +897,7 @@ void SkARGB32_Blitter::blitRect(int x, int y, int width, int height) { SkOpts::rect_memset32(device, color, width, rowBytes, height); } else { while (height --> 0) { - SkBlitRow::Color32(device, device, width, color); + SkBlitRow::Color32(device, width, color); device = (uint32_t*)((char*)device + rowBytes); } } diff --git a/src/core/SkBlitter_Sprite.cpp b/src/core/SkBlitter_Sprite.cpp index 65a3b1678e7d..b2900f69e80f 100644 --- a/src/core/SkBlitter_Sprite.cpp +++ b/src/core/SkBlitter_Sprite.cpp @@ -25,7 +25,6 @@ #include "src/core/SkRasterPipelineOpContexts.h" #include "src/core/SkRasterPipelineOpList.h" #include "src/core/SkSpriteBlitter.h" -#include "src/core/SkVMBlitter.h" #include #include @@ -238,5 +237,5 @@ SkBlitter* SkBlitter::ChooseSprite(const SkPixmap& dst, const SkPaint& paint, return blitter; } - return SkVMBlitter::Make(dst, paint, source,left,top, alloc, std::move(clipShader)); + return nullptr; } diff --git a/src/core/SkBlurMask.cpp b/src/core/SkBlurMask.cpp index 8e8b9504dceb..73c95b859063 100644 --- a/src/core/SkBlurMask.cpp +++ b/src/core/SkBlurMask.cpp @@ -21,6 +21,7 @@ #include #include +#include class SkRRect; @@ -109,10 +110,10 @@ static void clamp_outer_with_orig(uint8_t dst[], int dstRowBytes, // a bug in gcc98 void SkMask_FreeImage(uint8_t* image); void SkMask_FreeImage(uint8_t* image) { - SkMask::FreeImage(image); + SkMaskBuilder::FreeImage(image); } -bool SkBlurMask::BoxBlur(SkMask* dst, const SkMask& src, SkScalar sigma, SkBlurStyle style, +bool SkBlurMask::BoxBlur(SkMaskBuilder* dst, const SkMask& src, SkScalar sigma, SkBlurStyle style, SkIPoint* margin) { if (src.fFormat != SkMask::kBW_Format && src.fFormat != SkMask::kA8_Format && @@ -127,10 +128,10 @@ bool SkBlurMask::BoxBlur(SkMask* dst, const SkMask& src, SkScalar sigma, SkBlurS // If there is no effective blur most styles will just produce the original mask. // However, kOuter_SkBlurStyle will produce an empty mask. if (style == kOuter_SkBlurStyle) { - dst->fImage = nullptr; - dst->fBounds = SkIRect::MakeEmpty(); - dst->fRowBytes = dst->fBounds.width(); - dst->fFormat = SkMask::kA8_Format; + dst->image() = nullptr; + dst->bounds() = SkIRect::MakeEmpty(); + dst->rowBytes() = dst->fBounds.width(); + dst->format() = SkMask::kA8_Format; if (margin != nullptr) { // This filter will disregard the src.fImage completely. // The margin is actually {-(src.fBounds.width() / 2), -(src.fBounds.height() / 2)} @@ -153,8 +154,8 @@ bool SkBlurMask::BoxBlur(SkMask* dst, const SkMask& src, SkScalar sigma, SkBlurS if (src.fImage == nullptr) { if (style == kInner_SkBlurStyle) { - dst->fBounds = src.fBounds; // restore trimmed bounds - dst->fRowBytes = dst->fBounds.width(); + dst->bounds() = src.fBounds; // restore trimmed bounds + dst->rowBytes() = dst->fBounds.width(); } return true; } @@ -163,7 +164,7 @@ bool SkBlurMask::BoxBlur(SkMask* dst, const SkMask& src, SkScalar sigma, SkBlurS case kNormal_SkBlurStyle: break; case kSolid_SkBlurStyle: { - auto dstStart = &dst->fImage[border.x() + border.y() * dst->fRowBytes]; + auto dstStart = &dst->image()[border.x() + border.y() * dst->fRowBytes]; switch (src.fFormat) { case SkMask::kBW_Format: clamp_solid_with_orig( @@ -178,14 +179,14 @@ bool SkBlurMask::BoxBlur(SkMask* dst, const SkMask& src, SkScalar sigma, SkBlurS src.fBounds.width(), src.fBounds.height()); break; case SkMask::kARGB32_Format: { - uint32_t* srcARGB = reinterpret_cast(src.fImage); + const uint32_t* srcARGB = reinterpret_cast(src.fImage); clamp_solid_with_orig( dstStart, dst->fRowBytes, SkMask::AlphaIter(srcARGB), src.fRowBytes, src.fBounds.width(), src.fBounds.height()); } break; case SkMask::kLCD16_Format: { - uint16_t* srcLCD = reinterpret_cast(src.fImage); + const uint16_t* srcLCD = reinterpret_cast(src.fImage); clamp_solid_with_orig( dstStart, dst->fRowBytes, SkMask::AlphaIter(srcLCD), src.fRowBytes, @@ -196,7 +197,7 @@ bool SkBlurMask::BoxBlur(SkMask* dst, const SkMask& src, SkScalar sigma, SkBlurS } } break; case kOuter_SkBlurStyle: { - auto dstStart = &dst->fImage[border.x() + border.y() * dst->fRowBytes]; + auto dstStart = &dst->image()[border.x() + border.y() * dst->fRowBytes]; switch (src.fFormat) { case SkMask::kBW_Format: clamp_outer_with_orig( @@ -211,14 +212,14 @@ bool SkBlurMask::BoxBlur(SkMask* dst, const SkMask& src, SkScalar sigma, SkBlurS src.fBounds.width(), src.fBounds.height()); break; case SkMask::kARGB32_Format: { - uint32_t* srcARGB = reinterpret_cast(src.fImage); + const uint32_t* srcARGB = reinterpret_cast(src.fImage); clamp_outer_with_orig( dstStart, dst->fRowBytes, SkMask::AlphaIter(srcARGB), src.fRowBytes, src.fBounds.width(), src.fBounds.height()); } break; case SkMask::kLCD16_Format: { - uint16_t* srcLCD = reinterpret_cast(src.fImage); + const uint16_t* srcLCD = reinterpret_cast(src.fImage); clamp_outer_with_orig( dstStart, dst->fRowBytes, SkMask::AlphaIter(srcLCD), src.fRowBytes, @@ -230,43 +231,44 @@ bool SkBlurMask::BoxBlur(SkMask* dst, const SkMask& src, SkScalar sigma, SkBlurS } break; case kInner_SkBlurStyle: { // now we allocate the "real" dst, mirror the size of src - SkMask blur = *dst; - SkAutoMaskFreeImage autoFreeBlurMask(blur.fImage); - dst->fBounds = src.fBounds; - dst->fRowBytes = dst->fBounds.width(); + SkMaskBuilder blur = std::move(*dst); + SkAutoMaskFreeImage autoFreeBlurMask(blur.image()); + + *dst = SkMaskBuilder(nullptr, src.fBounds, src.fBounds.width(), blur.format()); size_t dstSize = dst->computeImageSize(); if (0 == dstSize) { return false; // too big to allocate, abort } - dst->fImage = SkMask::AllocImage(dstSize); - auto blurStart = &blur.fImage[border.x() + border.y() * blur.fRowBytes]; + dst->image() = SkMaskBuilder::AllocImage(dstSize); + + auto blurStart = &blur.image()[border.x() + border.y() * blur.fRowBytes]; switch (src.fFormat) { case SkMask::kBW_Format: merge_src_with_blur( - dst->fImage, dst->fRowBytes, + dst->image(), dst->fRowBytes, SkMask::AlphaIter(src.fImage, 0), src.fRowBytes, blurStart, blur.fRowBytes, src.fBounds.width(), src.fBounds.height()); break; case SkMask::kA8_Format: merge_src_with_blur( - dst->fImage, dst->fRowBytes, + dst->image(), dst->fRowBytes, SkMask::AlphaIter(src.fImage), src.fRowBytes, blurStart, blur.fRowBytes, src.fBounds.width(), src.fBounds.height()); break; case SkMask::kARGB32_Format: { - uint32_t* srcARGB = reinterpret_cast(src.fImage); + const uint32_t* srcARGB = reinterpret_cast(src.fImage); merge_src_with_blur( - dst->fImage, dst->fRowBytes, + dst->image(), dst->fRowBytes, SkMask::AlphaIter(srcARGB), src.fRowBytes, blurStart, blur.fRowBytes, src.fBounds.width(), src.fBounds.height()); } break; case SkMask::kLCD16_Format: { - uint16_t* srcLCD = reinterpret_cast(src.fImage); + const uint16_t* srcLCD = reinterpret_cast(src.fImage); merge_src_with_blur( - dst->fImage, dst->fRowBytes, + dst->image(), dst->fRowBytes, SkMask::AlphaIter(srcLCD), src.fRowBytes, blurStart, blur.fRowBytes, src.fBounds.width(), src.fBounds.height()); @@ -402,9 +404,9 @@ void SkBlurMask::ComputeBlurredScanline(uint8_t *pixels, const uint8_t *profile, } } -bool SkBlurMask::BlurRect(SkScalar sigma, SkMask *dst, +bool SkBlurMask::BlurRect(SkScalar sigma, SkMaskBuilder *dst, const SkRect &src, SkBlurStyle style, - SkIPoint *margin, SkMask::CreateMode createMode) { + SkIPoint *margin, SkMaskBuilder::CreateMode createMode) { int profileSize = SkScalarCeilToInt(6*sigma); if (profileSize <= 0) { return false; // no blur to compute @@ -415,22 +417,22 @@ bool SkBlurMask::BlurRect(SkScalar sigma, SkMask *dst, margin->set( pad, pad ); } - dst->fBounds.setLTRB(SkScalarRoundToInt(src.fLeft - pad), + dst->bounds().setLTRB(SkScalarRoundToInt(src.fLeft - pad), SkScalarRoundToInt(src.fTop - pad), SkScalarRoundToInt(src.fRight + pad), SkScalarRoundToInt(src.fBottom + pad)); - dst->fRowBytes = dst->fBounds.width(); - dst->fFormat = SkMask::kA8_Format; - dst->fImage = nullptr; + dst->rowBytes() = dst->fBounds.width(); + dst->format() = SkMask::kA8_Format; + dst->image() = nullptr; int sw = SkScalarFloorToInt(src.width()); int sh = SkScalarFloorToInt(src.height()); - if (createMode == SkMask::kJustComputeBounds_CreateMode) { + if (createMode == SkMaskBuilder::kJustComputeBounds_CreateMode) { if (style == kInner_SkBlurStyle) { - dst->fBounds = src.round(); // restore trimmed bounds - dst->fRowBytes = sw; + dst->bounds() = src.round(); // restore trimmed bounds + dst->rowBytes() = sw; } return true; } @@ -444,9 +446,8 @@ bool SkBlurMask::BlurRect(SkScalar sigma, SkMask *dst, return false; // too big to allocate, abort } - uint8_t* dp = SkMask::AllocImage(dstSize); - - dst->fImage = dp; + uint8_t* dp = SkMaskBuilder::AllocImage(dstSize); + dst->image() = dp; int dstHeight = dst->fBounds.height(); int dstWidth = dst->fBounds.width(); @@ -472,16 +473,16 @@ bool SkBlurMask::BlurRect(SkScalar sigma, SkMask *dst, if (0 == srcSize) { return false; // too big to allocate, abort } - dst->fImage = SkMask::AllocImage(srcSize); + dst->image() = SkMaskBuilder::AllocImage(srcSize); for (int y = 0 ; y < sh ; y++) { uint8_t *blur_scanline = dp + (y+pad)*dstWidth + pad; - uint8_t *inner_scanline = dst->fImage + y*sw; + uint8_t *inner_scanline = dst->image() + y*sw; memcpy(inner_scanline, blur_scanline, sw); } - SkMask::FreeImage(dp); + SkMaskBuilder::FreeImage(dp); - dst->fBounds = src.round(); // restore trimmed bounds - dst->fRowBytes = sw; + dst->bounds() = src.round(); // restore trimmed bounds + dst->rowBytes() = sw; } else if (style == kOuter_SkBlurStyle) { for (int y = pad ; y < dstHeight-pad ; y++) { @@ -500,9 +501,9 @@ bool SkBlurMask::BlurRect(SkScalar sigma, SkMask *dst, return true; } -bool SkBlurMask::BlurRRect(SkScalar sigma, SkMask *dst, +bool SkBlurMask::BlurRRect(SkScalar sigma, SkMaskBuilder *dst, const SkRRect &src, SkBlurStyle style, - SkIPoint *margin, SkMask::CreateMode createMode) { + SkIPoint *margin, SkMaskBuilder::CreateMode createMode) { // Temporary for now -- always fail, should cause caller to fall back // to old path. Plumbing just to land API and parallelize effort. @@ -513,7 +514,7 @@ bool SkBlurMask::BlurRRect(SkScalar sigma, SkMask *dst, // gaussian kernel. It's "ground truth" in a sense; too slow to be used, but very // useful for correctness comparisons. -bool SkBlurMask::BlurGroundTruth(SkScalar sigma, SkMask* dst, const SkMask& src, +bool SkBlurMask::BlurGroundTruth(SkScalar sigma, SkMaskBuilder* dst, const SkMask& src, SkBlurStyle style, SkIPoint* margin) { if (src.fFormat != SkMask::kA8_Format) { @@ -547,12 +548,12 @@ bool SkBlurMask::BlurGroundTruth(SkScalar sigma, SkMask* dst, const SkMask& src, margin->set( pad, pad ); } - dst->fBounds = src.fBounds; - dst->fBounds.outset(pad, pad); + dst->bounds() = src.fBounds; + dst->bounds().outset(pad, pad); - dst->fRowBytes = dst->fBounds.width(); - dst->fFormat = SkMask::kA8_Format; - dst->fImage = nullptr; + dst->rowBytes() = dst->fBounds.width(); + dst->format() = SkMask::kA8_Format; + dst->image() = nullptr; if (src.fImage) { @@ -566,7 +567,7 @@ bool SkBlurMask::BlurGroundTruth(SkScalar sigma, SkMask* dst, const SkMask& src, int dstWidth = dst->fBounds.width(); const uint8_t* srcPixels = src.fImage; - uint8_t* dstPixels = SkMask::AllocImage(dstSize); + uint8_t* dstPixels = SkMaskBuilder::AllocImage(dstSize); SkAutoMaskFreeImage autoFreeDstPixels(dstPixels); // do the actual blur. First, make a padded copy of the source. @@ -627,7 +628,7 @@ bool SkBlurMask::BlurGroundTruth(SkScalar sigma, SkMask* dst, const SkMask& src, } } - dst->fImage = dstPixels; + dst->image() = dstPixels; switch (style) { case kNormal_SkBlurStyle: break; @@ -649,20 +650,20 @@ bool SkBlurMask::BlurGroundTruth(SkScalar sigma, SkMask* dst, const SkMask& src, if (0 == srcSize) { return false; // too big to allocate, abort } - dst->fImage = SkMask::AllocImage(srcSize); - merge_src_with_blur(dst->fImage, src.fRowBytes, + dst->image() = SkMaskBuilder::AllocImage(srcSize); + merge_src_with_blur(dst->image(), src.fRowBytes, SkMask::AlphaIter(srcPixels), src.fRowBytes, dstPixels + pad*dst->fRowBytes + pad, dst->fRowBytes, srcWidth, srcHeight); - SkMask::FreeImage(dstPixels); + SkMaskBuilder::FreeImage(dstPixels); } break; } autoFreeDstPixels.release(); } if (style == kInner_SkBlurStyle) { - dst->fBounds = src.fBounds; // restore trimmed bounds - dst->fRowBytes = src.fRowBytes; + dst->bounds() = src.fBounds; // restore trimmed bounds + dst->rowBytes() = src.fRowBytes; } return true; diff --git a/src/core/SkBlurMask.h b/src/core/SkBlurMask.h index 8cd7379a1f12..107d32d27d68 100644 --- a/src/core/SkBlurMask.h +++ b/src/core/SkBlurMask.h @@ -21,14 +21,14 @@ struct SkRect; class SkBlurMask { public: - static bool SK_WARN_UNUSED_RESULT BlurRect(SkScalar sigma, SkMask *dst, const SkRect &src, - SkBlurStyle, SkIPoint *margin = nullptr, - SkMask::CreateMode createMode = - SkMask::kComputeBoundsAndRenderImage_CreateMode); - static bool SK_WARN_UNUSED_RESULT BlurRRect(SkScalar sigma, SkMask *dst, const SkRRect &src, - SkBlurStyle, SkIPoint *margin = nullptr, - SkMask::CreateMode createMode = - SkMask::kComputeBoundsAndRenderImage_CreateMode); + [[nodiscard]] static bool BlurRect(SkScalar sigma, SkMaskBuilder *dst, const SkRect &src, + SkBlurStyle, SkIPoint *margin = nullptr, + SkMaskBuilder::CreateMode createMode = + SkMaskBuilder::kComputeBoundsAndRenderImage_CreateMode); + [[nodiscard]] static bool BlurRRect(SkScalar sigma, SkMaskBuilder *dst, const SkRRect &src, + SkBlurStyle, SkIPoint *margin = nullptr, + SkMaskBuilder::CreateMode createMode = + SkMaskBuilder::kComputeBoundsAndRenderImage_CreateMode); // forceQuality will prevent BoxBlur from falling back to the low quality approach when sigma // is very small -- this can be used predict the margin bump ahead of time without completely @@ -41,15 +41,15 @@ class SkBlurMask { // * failure - if src.fImage is not null, failure is signal with dst->fImage being // null. - static bool SK_WARN_UNUSED_RESULT BoxBlur(SkMask* dst, const SkMask& src, - SkScalar sigma, SkBlurStyle style, - SkIPoint* margin = nullptr); + [[nodiscard]] static bool BoxBlur(SkMaskBuilder* dst, const SkMask& src, + SkScalar sigma, SkBlurStyle style, + SkIPoint* margin = nullptr); // the "ground truth" blur does a gaussian convolution; it's slow // but useful for comparison purposes. - static bool SK_WARN_UNUSED_RESULT BlurGroundTruth(SkScalar sigma, SkMask* dst, - const SkMask& src, - SkBlurStyle, SkIPoint* margin = nullptr); + [[nodiscard]] static bool BlurGroundTruth(SkScalar sigma, SkMaskBuilder* dst, + const SkMask& src, + SkBlurStyle, SkIPoint* margin = nullptr); // If radius > 0, return the corresponding sigma, else return 0 static SkScalar SK_SPI ConvertRadiusToSigma(SkScalar radius); @@ -85,9 +85,6 @@ class SkBlurMask { static void ComputeBlurredScanline(uint8_t* pixels, const uint8_t* profile, unsigned int width, SkScalar sigma); - - - }; #endif diff --git a/src/core/SkBlurMaskFilterImpl.cpp b/src/core/SkBlurMaskFilterImpl.cpp index 1a0e13bee026..41328361a020 100644 --- a/src/core/SkBlurMaskFilterImpl.cpp +++ b/src/core/SkBlurMaskFilterImpl.cpp @@ -25,6 +25,7 @@ #include "include/private/base/SkAlign.h" #include "include/private/base/SkAssert.h" #include "include/private/base/SkTemplates.h" +#include "src/base/SkTLazy.h" #include "src/core/SkBlitter_A8.h" #include "src/core/SkBlurMask.h" #include "src/core/SkCachedData.h" @@ -32,7 +33,6 @@ #include "src/core/SkMask.h" #include "src/core/SkMaskCache.h" #include "src/core/SkMaskFilterBase.h" -#include "src/core/SkMatrixProvider.h" #include "src/core/SkRasterClip.h" #include "src/core/SkReadBuffer.h" #include "src/core/SkResourceCache.h" @@ -72,44 +72,46 @@ SkScalar SkBlurMaskFilterImpl::computeXformedSigma(const SkMatrix& ctm) const { return std::min(xformedSigma, kMaxBlurSigma); } -bool SkBlurMaskFilterImpl::filterMask(SkMask* dst, const SkMask& src, +bool SkBlurMaskFilterImpl::filterMask(SkMaskBuilder* dst, const SkMask& src, const SkMatrix& matrix, SkIPoint* margin) const { SkScalar sigma = this->computeXformedSigma(matrix); return SkBlurMask::BoxBlur(dst, src, sigma, fBlurStyle, margin); } -bool SkBlurMaskFilterImpl::filterRectMask(SkMask* dst, const SkRect& r, +bool SkBlurMaskFilterImpl::filterRectMask(SkMaskBuilder* dst, const SkRect& r, const SkMatrix& matrix, - SkIPoint* margin, SkMask::CreateMode createMode) const { + SkIPoint* margin, + SkMaskBuilder::CreateMode createMode) const { SkScalar sigma = computeXformedSigma(matrix); return SkBlurMask::BlurRect(sigma, dst, r, fBlurStyle, margin, createMode); } -bool SkBlurMaskFilterImpl::filterRRectMask(SkMask* dst, const SkRRect& r, - const SkMatrix& matrix, - SkIPoint* margin, SkMask::CreateMode createMode) const { +bool SkBlurMaskFilterImpl::filterRRectMask(SkMaskBuilder* dst, const SkRRect& r, + const SkMatrix& matrix, + SkIPoint* margin, + SkMaskBuilder::CreateMode createMode) const { SkScalar sigma = computeXformedSigma(matrix); return SkBlurMask::BlurRRect(sigma, dst, r, fBlurStyle, margin, createMode); } -static bool prepare_to_draw_into_mask(const SkRect& bounds, SkMask* mask) { +static bool prepare_to_draw_into_mask(const SkRect& bounds, SkMaskBuilder* mask) { SkASSERT(mask != nullptr); - mask->fBounds = bounds.roundOut(); - mask->fRowBytes = SkAlign4(mask->fBounds.width()); - mask->fFormat = SkMask::kA8_Format; + mask->bounds() = bounds.roundOut(); + mask->rowBytes() = SkAlign4(mask->fBounds.width()); + mask->format() = SkMask::kA8_Format; const size_t size = mask->computeImageSize(); - mask->fImage = SkMask::AllocImage(size, SkMask::kZeroInit_Alloc); + mask->image() = SkMaskBuilder::AllocImage(size, SkMaskBuilder::kZeroInit_Alloc); if (nullptr == mask->fImage) { return false; } return true; } -template bool draw_into_mask(SkMask* mask, const SkRect& bounds, Proc proc) { +template bool draw_into_mask(SkMaskBuilder* mask, const SkRect& bounds, Proc proc) { if (!prepare_to_draw_into_mask(bounds, mask)) { return false; } @@ -125,13 +127,11 @@ template bool draw_into_mask(SkMask* mask, const SkRect& bounds, SkMatrix ctm = SkMatrix::Translate(-SkIntToScalar(dx), -SkIntToScalar(dy)); - SkMatrixProvider matrixProvider(ctm); - SkDrawBase draw; draw.fBlitterChooser = SkA8Blitter_Choose; - draw.fMatrixProvider = &matrixProvider; - draw.fDst = pm; - draw.fRC = &rclip; + draw.fCTM = &ctm; + draw.fDst = pm; + draw.fRC = &rclip; SkPaint paint; paint.setAntiAlias(true); @@ -140,7 +140,7 @@ template bool draw_into_mask(SkMask* mask, const SkRect& bounds, return true; } -static bool draw_rects_into_mask(const SkRect rects[], int count, SkMask* mask) { +static bool draw_rects_into_mask(const SkRect rects[], int count, SkMaskBuilder* mask) { return draw_into_mask(mask, rects[0], [&](SkDrawBase& draw, const SkPaint& paint) { if (1 == count) { draw.drawRect(rects[0], paint); @@ -155,7 +155,7 @@ static bool draw_rects_into_mask(const SkRect rects[], int count, SkMask* mask) }); } -static bool draw_rrect_into_mask(const SkRRect rrect, SkMask* mask) { +static bool draw_rrect_into_mask(const SkRRect rrect, SkMaskBuilder* mask) { return draw_into_mask(mask, rrect.rect(), [&](SkDrawBase& draw, const SkPaint& paint) { draw.drawRRect(rrect, paint); }); @@ -166,23 +166,23 @@ static bool rect_exceeds(const SkRect& r, SkScalar v) { r.width() > v || r.height() > v; } -static SkCachedData* copy_mask_to_cacheddata(SkMask* mask) { +static SkCachedData* copy_mask_to_cacheddata(SkMaskBuilder* mask) { const size_t size = mask->computeTotalImageSize(); SkCachedData* data = SkResourceCache::NewCachedData(size); if (data) { memcpy(data->writable_data(), mask->fImage, size); - SkMask::FreeImage(mask->fImage); - mask->fImage = (uint8_t*)data->data(); + SkMaskBuilder::FreeImage(mask->image()); + mask->image() = (uint8_t*)data->data(); } return data; } -static SkCachedData* find_cached_rrect(SkMask* mask, SkScalar sigma, SkBlurStyle style, +static SkCachedData* find_cached_rrect(SkTLazy* mask, SkScalar sigma, SkBlurStyle style, const SkRRect& rrect) { return SkMaskCache::FindAndRef(sigma, style, rrect, mask); } -static SkCachedData* add_cached_rrect(SkMask* mask, SkScalar sigma, SkBlurStyle style, +static SkCachedData* add_cached_rrect(SkMaskBuilder* mask, SkScalar sigma, SkBlurStyle style, const SkRRect& rrect) { SkCachedData* cache = copy_mask_to_cacheddata(mask); if (cache) { @@ -191,12 +191,12 @@ static SkCachedData* add_cached_rrect(SkMask* mask, SkScalar sigma, SkBlurStyle return cache; } -static SkCachedData* find_cached_rects(SkMask* mask, SkScalar sigma, SkBlurStyle style, +static SkCachedData* find_cached_rects(SkTLazy* mask, SkScalar sigma, SkBlurStyle style, const SkRect rects[], int count) { return SkMaskCache::FindAndRef(sigma, style, rects, count, mask); } -static SkCachedData* add_cached_rects(SkMask* mask, SkScalar sigma, SkBlurStyle style, +static SkCachedData* add_cached_rects(SkMaskBuilder* mask, SkScalar sigma, SkBlurStyle style, const SkRect rects[], int count) { SkCachedData* cache = copy_mask_to_cacheddata(mask); if (cache) { @@ -210,7 +210,7 @@ static const bool c_analyticBlurRRect{true}; SkMaskFilterBase::FilterReturn SkBlurMaskFilterImpl::filterRRectToNine(const SkRRect& rrect, const SkMatrix& matrix, const SkIRect& clipBounds, - NinePatch* patch) const { + SkTLazy* patch) const { SkASSERT(patch != nullptr); switch (rrect.getType()) { case SkRRect::kEmpty_Type: @@ -246,17 +246,14 @@ SkBlurMaskFilterImpl::filterRRectToNine(const SkRRect& rrect, const SkMatrix& ma } SkIPoint margin; - SkMask srcM, dstM; - srcM.fBounds = rrect.rect().roundOut(); - srcM.fFormat = SkMask::kA8_Format; - srcM.fRowBytes = 0; + SkMaskBuilder srcM(nullptr, rrect.rect().roundOut(), 0, SkMask::kA8_Format), dstM; bool filterResult = false; if (c_analyticBlurRRect) { // special case for fast round rect blur // don't actually do the blur the first time, just compute the correct size filterResult = this->filterRRectMask(&dstM, rrect, matrix, &margin, - SkMask::kJustComputeBounds_CreateMode); + SkMaskBuilder::kJustComputeBounds_CreateMode); } if (!filterResult) { @@ -308,35 +305,38 @@ SkBlurMaskFilterImpl::filterRRectToNine(const SkRRect& rrect, const SkMatrix& ma smallRR.setRectRadii(smallR, radii); const SkScalar sigma = this->computeXformedSigma(matrix); - SkCachedData* cache = find_cached_rrect(&patch->fMask, sigma, fBlurStyle, smallRR); + SkTLazy cachedMask; + SkCachedData* cache = find_cached_rrect(&cachedMask, sigma, fBlurStyle, smallRR); if (!cache) { + SkMaskBuilder filterM; bool analyticBlurWorked = false; if (c_analyticBlurRRect) { analyticBlurWorked = - this->filterRRectMask(&patch->fMask, smallRR, matrix, &margin, - SkMask::kComputeBoundsAndRenderImage_CreateMode); + this->filterRRectMask(&filterM, smallRR, matrix, &margin, + SkMaskBuilder::kComputeBoundsAndRenderImage_CreateMode); } if (!analyticBlurWorked) { if (!draw_rrect_into_mask(smallRR, &srcM)) { return kFalse_FilterReturn; } + SkAutoMaskFreeImage amf(srcM.image()); - SkAutoMaskFreeImage amf(srcM.fImage); - - if (!this->filterMask(&patch->fMask, srcM, matrix, &margin)) { + if (!this->filterMask(&filterM, srcM, matrix, &margin)) { return kFalse_FilterReturn; } } - cache = add_cached_rrect(&patch->fMask, sigma, fBlurStyle, smallRR); + cache = add_cached_rrect(&filterM, sigma, fBlurStyle, smallRR); + cachedMask.init(filterM); } - patch->fMask.fBounds.offsetTo(0, 0); - patch->fOuterRect = dstM.fBounds; - patch->fCenter.fX = SkScalarCeilToInt(leftUnstretched) + 1; - patch->fCenter.fY = SkScalarCeilToInt(topUnstretched) + 1; - SkASSERT(nullptr == patch->fCache); - patch->fCache = cache; // transfer ownership to patch + SkIRect bounds = cachedMask->fBounds; + bounds.offsetTo(0, 0); + patch->init(SkMask{cachedMask->fImage, bounds, cachedMask->fRowBytes, cachedMask->fFormat}, + dstM.fBounds, + SkIPoint{SkScalarCeilToInt(leftUnstretched) + 1, + SkScalarCeilToInt(topUnstretched) + 1}, + cache); // transfer ownership to patch return kTrue_FilterReturn; } @@ -347,7 +347,7 @@ SkMaskFilterBase::FilterReturn SkBlurMaskFilterImpl::filterRectsToNine(const SkRect rects[], int count, const SkMatrix& matrix, const SkIRect& clipBounds, - NinePatch* patch) const { + SkTLazy* patch) const { if (count < 1 || count > 2) { return kUnimplemented_FilterReturn; } @@ -365,17 +365,14 @@ SkBlurMaskFilterImpl::filterRectsToNine(const SkRect rects[], int count, } SkIPoint margin; - SkMask srcM, dstM; - srcM.fBounds = rects[0].roundOut(); - srcM.fFormat = SkMask::kA8_Format; - srcM.fRowBytes = 0; + SkMaskBuilder srcM(nullptr, rects[0].roundOut(), 0, SkMask::kA8_Format), dstM; bool filterResult = false; if (count == 1 && c_analyticBlurNinepatch) { // special case for fast rect blur // don't actually do the blur the first time, just compute the correct size filterResult = this->filterRectMask(&dstM, rects[0], matrix, &margin, - SkMask::kJustComputeBounds_CreateMode); + SkMaskBuilder::kJustComputeBounds_CreateMode); } else { filterResult = this->filterMask(&dstM, srcM, matrix, &margin); } @@ -442,31 +439,33 @@ SkBlurMaskFilterImpl::filterRectsToNine(const SkRect rects[], int count, } const SkScalar sigma = this->computeXformedSigma(matrix); - SkCachedData* cache = find_cached_rects(&patch->fMask, sigma, fBlurStyle, smallR, count); + SkTLazy cachedMask; + SkCachedData* cache = find_cached_rects(&cachedMask, sigma, fBlurStyle, smallR, count); if (!cache) { + SkMaskBuilder filterM; if (count > 1 || !c_analyticBlurNinepatch) { if (!draw_rects_into_mask(smallR, count, &srcM)) { return kFalse_FilterReturn; } - SkAutoMaskFreeImage amf(srcM.fImage); + SkAutoMaskFreeImage amf(srcM.image()); - if (!this->filterMask(&patch->fMask, srcM, matrix, &margin)) { + if (!this->filterMask(&filterM, srcM, matrix, &margin)) { return kFalse_FilterReturn; } } else { - if (!this->filterRectMask(&patch->fMask, smallR[0], matrix, &margin, - SkMask::kComputeBoundsAndRenderImage_CreateMode)) { + if (!this->filterRectMask(&filterM, smallR[0], matrix, &margin, + SkMaskBuilder::kComputeBoundsAndRenderImage_CreateMode)) { return kFalse_FilterReturn; } } - cache = add_cached_rects(&patch->fMask, sigma, fBlurStyle, smallR, count); + cache = add_cached_rects(&filterM, sigma, fBlurStyle, smallR, count); + cachedMask.init(filterM); } - patch->fMask.fBounds.offsetTo(0, 0); - patch->fOuterRect = dstM.fBounds; - patch->fCenter = center; - SkASSERT(nullptr == patch->fCache); - patch->fCache = cache; // transfer ownership to patch + SkIRect bounds = cachedMask->fBounds; + bounds.offsetTo(0, 0); + patch->init(SkMask{cachedMask->fImage, bounds, cachedMask->fRowBytes, cachedMask->fFormat}, + dstM.fBounds, center, cache); // transfer ownership to patch return kTrue_FilterReturn; } diff --git a/src/core/SkBlurMaskFilterImpl.h b/src/core/SkBlurMaskFilterImpl.h index 35b7de8ebf3a..c680bf437b55 100644 --- a/src/core/SkBlurMaskFilterImpl.h +++ b/src/core/SkBlurMaskFilterImpl.h @@ -20,6 +20,7 @@ enum SkBlurStyle : int; struct SkIPoint; struct SkIRect; struct SkRect; +template class SkTLazy; class SkBlurMaskFilterImpl : public SkMaskFilterBase { public: @@ -27,7 +28,7 @@ class SkBlurMaskFilterImpl : public SkMaskFilterBase { // From SkMaskFilterBase.h SkMask::Format getFormat() const override; - bool filterMask(SkMask* dst, const SkMask& src, const SkMatrix&, + bool filterMask(SkMaskBuilder* dst, const SkMask& src, const SkMatrix&, SkIPoint* margin) const override; SkMaskFilterBase::Type type() const override { return SkMaskFilterBase::Type::kBlur; } @@ -43,16 +44,16 @@ class SkBlurMaskFilterImpl : public SkMaskFilterBase { private: FilterReturn filterRectsToNine(const SkRect[], int count, const SkMatrix&, const SkIRect& clipBounds, - NinePatch*) const override; + SkTLazy*) const override; FilterReturn filterRRectToNine(const SkRRect&, const SkMatrix&, const SkIRect& clipBounds, - NinePatch*) const override; + SkTLazy*) const override; - bool filterRectMask(SkMask* dstM, const SkRect& r, const SkMatrix& matrix, - SkIPoint* margin, SkMask::CreateMode createMode) const; - bool filterRRectMask(SkMask* dstM, const SkRRect& r, const SkMatrix& matrix, - SkIPoint* margin, SkMask::CreateMode createMode) const; + bool filterRectMask(SkMaskBuilder* dstM, const SkRect& r, const SkMatrix& matrix, + SkIPoint* margin, SkMaskBuilder::CreateMode createMode) const; + bool filterRRectMask(SkMaskBuilder* dstM, const SkRRect& r, const SkMatrix& matrix, + SkIPoint* margin, SkMaskBuilder::CreateMode createMode) const; SK_FLATTENABLE_HOOKS(SkBlurMaskFilterImpl) diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp index 5307d1cbac31..74c2f94fb8f3 100644 --- a/src/core/SkCanvas.cpp +++ b/src/core/SkCanvas.cpp @@ -14,11 +14,9 @@ #include "include/core/SkColorFilter.h" #include "include/core/SkColorSpace.h" #include "include/core/SkColorType.h" -#include "include/core/SkData.h" #include "include/core/SkImage.h" #include "include/core/SkImageFilter.h" #include "include/core/SkMaskFilter.h" -#include "include/core/SkMesh.h" #include "include/core/SkPath.h" #include "include/core/SkPathEffect.h" #include "include/core/SkPicture.h" @@ -39,7 +37,6 @@ #include "include/private/base/SkTPin.h" #include "include/private/base/SkTemplates.h" #include "include/private/base/SkTo.h" -#include "include/private/chromium/SkChromeRemoteGlyphCache.h" #include "include/private/chromium/Slug.h" #include "include/utils/SkNoDrawCanvas.h" #include "src/base/SkMSAN.h" @@ -53,7 +50,6 @@ #include "src/core/SkPaintPriv.h" #include "src/core/SkSpecialImage.h" #include "src/core/SkSurfacePriv.h" -#include "src/core/SkTextBlobPriv.h" #include "src/core/SkTraceEvent.h" #include "src/core/SkVerticesPriv.h" #include "src/effects/colorfilters/SkColorFilterBase.h" @@ -63,24 +59,11 @@ #include #include -#include #include #include #include #include #include -#include - -#if defined(SK_GANESH) -#include "include/gpu/GrDirectContext.h" -#include "include/gpu/GrRecordingContext.h" -#include "src/gpu/ganesh/Device.h" -#include "src/utils/SkTestCanvas.h" -#endif - -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/Device.h" -#endif #define RETURN_ON_NULL(ptr) do { if (nullptr == (ptr)) return; } while (0) #define RETURN_ON_FALSE(pred) do { if (!(pred)) return; } while (0) @@ -257,109 +240,6 @@ class SkCanvas::AutoUpdateQRBounds { }; ///////////////////////////////////////////////////////////////////////////// -// Attempts to convert an image filter to its equivalent color filter, which if possible, modifies -// the paint to compose the image filter's color filter into the paint's color filter slot. -// Returns true if the paint has been modified. -// Requires the paint to have an image filter and the copy-on-write be initialized. -static bool image_to_color_filter(SkPaint* paint) { - SkASSERT(SkToBool(paint) && paint->getImageFilter()); - - SkColorFilter* imgCFPtr; - if (!paint->getImageFilter()->asAColorFilter(&imgCFPtr)) { - return false; - } - sk_sp imgCF(imgCFPtr); - - SkColorFilter* paintCF = paint->getColorFilter(); - if (paintCF) { - // The paint has both a colorfilter(paintCF) and an imagefilter-that-is-a-colorfilter(imgCF) - // and we need to combine them into a single colorfilter. - imgCF = imgCF->makeComposed(sk_ref_sp(paintCF)); - } - - paint->setColorFilter(std::move(imgCF)); - paint->setImageFilter(nullptr); - return true; -} - -/** - * We implement ImageFilters for a given draw by creating a layer, then applying the - * imagefilter to the pixels of that layer (its backing surface/image), and then - * we call restore() to xfer that layer to the main canvas. - * - * 1. SaveLayer (with a paint containing the current imagefilter and xfermode) - * 2. Generate the src pixels: - * Remove the imagefilter and the xfermode from the paint that we (AutoDrawLooper) - * return (fPaint). We then draw the primitive (using srcover) into a cleared - * buffer/surface. - * 3. Restore the layer created in #1 - * The imagefilter is passed the buffer/surface from the layer (now filled with the - * src pixels of the primitive). It returns a new "filtered" buffer, which we - * draw onto the previous layer using the xfermode from the original paint. - */ -class AutoLayerForImageFilter { -public: - // "rawBounds" is the original bounds of the primitive about to be drawn, unmodified by the - // paint. It's used to determine the size of the offscreen layer for filters. - // If null, the clip will be used instead. - // - // Draw functions should use layer->paint() instead of the passed-in paint. - AutoLayerForImageFilter(SkCanvas* canvas, - const SkPaint& paint, - const SkRect* rawBounds = nullptr) - : fPaint(paint) - , fCanvas(canvas) - , fTempLayerForImageFilter(false) { - SkDEBUGCODE(fSaveCount = canvas->getSaveCount();) - - if (fPaint.getImageFilter() && !image_to_color_filter(&fPaint)) { - // The draw paint has an image filter that couldn't be simplified to an equivalent - // color filter, so we have to inject an automatic saveLayer(). - SkPaint restorePaint; - restorePaint.setImageFilter(fPaint.refImageFilter()); - restorePaint.setBlender(fPaint.refBlender()); - - // Remove the restorePaint fields from our "working" paint - fPaint.setImageFilter(nullptr); - fPaint.setBlendMode(SkBlendMode::kSrcOver); - - SkRect storage; - if (rawBounds && fPaint.canComputeFastBounds()) { - // Make rawBounds include all paint outsets except for those due to image filters. - // At this point, fPaint's image filter has been moved to 'restorePaint'. - SkASSERT(!fPaint.getImageFilter()); - rawBounds = &fPaint.computeFastBounds(*rawBounds, &storage); - } - - canvas->fSaveCount += 1; - (void)canvas->internalSaveLayer(SkCanvas::SaveLayerRec(rawBounds, &restorePaint), - SkCanvas::kFullLayer_SaveLayerStrategy); - fTempLayerForImageFilter = true; - } - } - - AutoLayerForImageFilter(const AutoLayerForImageFilter&) = delete; - AutoLayerForImageFilter& operator=(const AutoLayerForImageFilter&) = delete; - AutoLayerForImageFilter(AutoLayerForImageFilter&&) = default; - AutoLayerForImageFilter& operator=(AutoLayerForImageFilter&&) = default; - - ~AutoLayerForImageFilter() { - if (fTempLayerForImageFilter) { - fCanvas->fSaveCount -= 1; - fCanvas->internalRestore(); - } - SkASSERT(fCanvas->getSaveCount() == fSaveCount); - } - - const SkPaint& paint() const { return fPaint; } - -private: - SkPaint fPaint; - SkCanvas* fCanvas; - bool fTempLayerForImageFilter; - - SkDEBUGCODE(int fSaveCount;) -}; std::optional SkCanvas::aboutToDraw( SkCanvas* canvas, @@ -459,22 +339,6 @@ SkCanvas::~SkCanvas() { this->internalRestore(); // restore the last, since we're going away } -/////////////////////////////////////////////////////////////////////////////// - -void SkCanvas::flush() { - this->onFlush(); -} - -void SkCanvas::onFlush() { -#if defined(SK_GANESH) - auto dContext = GrAsDirectContext(this->recordingContext()); - - if (dContext) { - dContext->flushAndSubmit(); - } -#endif -} - SkSurface* SkCanvas::getSurface() const { return fSurfaceBase; } @@ -671,23 +535,21 @@ static skif::ParameterSpace compute_decomposition_center( // Null filters are permitted and act as the identity. The returned mapping will be compatible with // the image filter. // -// Returns an empty rect if the layer wouldn't draw anything after filtering. -static std::pair> get_layer_mapping_and_bounds( +// An empty optional is returned if the layer mapping and bounds couldn't be determined, in which +// case the layer should be skipped. An instantiated optional can have an empty layer bounds rect +// if the image filter doesn't require an input image to produce a valid output. +static std::optional>> +get_layer_mapping_and_bounds( const SkImageFilter* filter, const SkMatrix& localToDst, const skif::DeviceSpace& targetOutput, const skif::ParameterSpace* contentBounds = nullptr, bool mustCoverDst = true, SkScalar scaleFactor = 1.0f) { - auto failedMapping = []() { - return std::make_pair>( - {}, skif::LayerSpace::Empty()); - }; - SkMatrix dstToLocal; if (!localToDst.isFinite() || !localToDst.invert(&dstToLocal)) { - return failedMapping(); + return {}; } skif::ParameterSpace center = @@ -702,13 +564,13 @@ static std::pair> get_layer_mapping_and // transforms with perspective and skew from triggering excessive buffer allocations. skif::Mapping mapping; if (!mapping.decomposeCTM(localToDst, filter, center)) { - return failedMapping(); + return {}; } // Push scale factor into layer matrix and device matrix (net no change, but the layer will have // its resolution adjusted in comparison to the final device). if (scaleFactor != 1.0f && !mapping.adjustLayerSpace(SkMatrix::Scale(scaleFactor, scaleFactor))) { - return failedMapping(); + return {}; } // Perspective and skew could exceed this since mapping.deviceToLayer(targetOutput) is @@ -740,7 +602,7 @@ static std::pair> get_layer_mapping_and // extent (i.e., they implement the CSS filter-effects 'filter region' feature). skif::LayerSpace knownBounds = mapping.paramToLayer(*contentBounds).roundOut(); if (!layerBounds.intersect(knownBounds)) { - return failedMapping(); + return {}; } } } @@ -753,13 +615,13 @@ static std::pair> get_layer_mapping_and SkRect::Make(SkIRect(newLayerBounds)), SkMatrix::kFill_ScaleToFit); if (!mapping.adjustLayerSpace(adjust)) { - return failedMapping(); + return {}; } else { layerBounds = newLayerBounds; } } - return {mapping, layerBounds}; + return std::make_pair(mapping, layerBounds); } // Ideally image filters operate in the dst color type, but if there is insufficient alpha bits @@ -836,32 +698,35 @@ void SkCanvas::internalDrawDeviceWithFilter(SkBaseDevice* src, } else { // Compute the image filter mapping by decomposing the local->device matrix of dst and // re-determining the required input. - std::tie(mapping, requiredInput) = get_layer_mapping_and_bounds( + auto mappingAndBounds = get_layer_mapping_and_bounds( filter, dst->localToDevice(), skif::DeviceSpace(dst->devClipBounds()), nullptr, true, SkTPin(scaleFactor, 0.f, 1.f)); - if (requiredInput.isEmpty()) { + if (!mappingAndBounds) { return; } - // The above mapping transforms from local to dst's device space, where the layer space - // represents the intermediate buffer. Now we need to determine the transform from src to - // intermediate to prepare the input to the filter. - if (!localToSrc.invert(&srcToIntermediate)) { - return; - } - srcToIntermediate.postConcat(mapping.layerMatrix()); - if (can_layer_be_drawn_as_sprite(srcToIntermediate, srcDims)) { - // src differs from intermediate by just an integer translation, so it can be applied - // automatically when taking a subset of src if we update the mapping. - skif::LayerSpace srcOrigin({(int) srcToIntermediate.getTranslateX(), - (int) srcToIntermediate.getTranslateY()}); - mapping.applyOrigin(srcOrigin); - requiredInput.offset(-srcOrigin); - } else { - // The contents of 'src' will be drawn to an intermediate buffer using srcToIntermediate - // and that buffer will be the input to the image filter. - needsIntermediateImage = true; - } + std::tie(mapping, requiredInput) = *mappingAndBounds; + if (!requiredInput.isEmpty()) { + // The above mapping transforms from local to dst's device space, where the layer space + // represents the intermediate buffer. Now we need to determine the transform from src + // to intermediate to prepare the input to the filter. + if (!localToSrc.invert(&srcToIntermediate)) { + return; + } + srcToIntermediate.postConcat(mapping.layerMatrix()); + if (can_layer_be_drawn_as_sprite(srcToIntermediate, srcDims)) { + // src differs from intermediate by just an integer translation, so it can be + // applied automatically when taking a subset of src if we update the mapping. + skif::LayerSpace srcOrigin({(int) srcToIntermediate.getTranslateX(), + (int) srcToIntermediate.getTranslateY()}); + mapping.applyOrigin(srcOrigin); + requiredInput.offset(-srcOrigin); + } else { + // The contents of 'src' will be drawn to an intermediate buffer using + // srcToIntermediate and that buffer will be the input to the image filter. + needsIntermediateImage = true; + } + } // Else no input is needed which can happen from a backdrop filter that doesn't use src } sk_sp filterInput; @@ -943,21 +808,22 @@ void SkCanvas::internalDrawDeviceWithFilter(SkBaseDevice* src, } } - if (filterInput) { + if (filterInput || requiredInput.isEmpty()) { const bool useNN = can_layer_be_drawn_as_sprite(mapping.layerToDevice(), - filterInput->subset().size()); + dst->devClipBounds().size()); SkSamplingOptions sampling{useNN ? SkFilterMode::kNearest : SkFilterMode::kLinear}; if (filter) { dst->drawFilteredImage(mapping, filterInput.get(), filterColorType, filter, sampling, paint); } else { + SkASSERT(filterInput); // A null filter input only makes sense if there was a filter dst->drawSpecial(filterInput.get(), mapping.layerToDevice(), sampling, paint); } } } -// This is similar to image_to_color_filter used by AutoLayerForImageFilter, but with key changes: -// - image_to_color_filter requires the entire image filter DAG to be represented as a color filter +// This is similar to SkCanvasPriv::ImageToColorFilter, but with key changes: +// - ImageToColorFilter requires the entire image filter DAG to be represented as a color filter // that does not affect transparent black (SkImageFilter::asAColorFilter) // - when that is met, the image filter's CF is composed around any CF that was on the draw's paint // since for a draw, the color filtering happens before any image filtering @@ -1052,7 +918,7 @@ void SkCanvas::internalSaveLayer(const SaveLayerRec& rec, SaveLayerStrategy stra SkBaseDevice* priorDevice = this->topDevice(); skif::Mapping newLayerMapping; skif::LayerSpace layerBounds; - std::tie(newLayerMapping, layerBounds) = get_layer_mapping_and_bounds( + auto mappingAndBounds = get_layer_mapping_and_bounds( filter, priorDevice->localToDevice(), skif::DeviceSpace(priorDevice->devClipBounds()), skif::ParameterSpace::Optional(rec.fBounds), @@ -1066,6 +932,13 @@ void SkCanvas::internalSaveLayer(const SaveLayerRec& rec, SaveLayerStrategy stra this->topDevice()->clipRect(SkRect::MakeEmpty(), SkClipOp::kIntersect, /* aa */ false); }; + if (!mappingAndBounds) { + abortLayer(); + return; + } + + std::tie(newLayerMapping, layerBounds) = *mappingAndBounds; + if (layerBounds.isEmpty()) { // The image filter graph does not require any input, so we don't need to actually render // a new layer for the source image. This could be because the image filter itself will not @@ -1716,27 +1589,14 @@ SkM44 SkCanvas::getLocalToDevice() const { return fMCRec->fMatrix; } -GrRecordingContext* SkCanvas::recordingContext() { -#if defined(SK_GANESH) - if (auto gpuDevice = this->topDevice()->asGaneshDevice()) { - return gpuDevice->recordingContext(); - } -#endif - - return nullptr; +GrRecordingContext* SkCanvas::recordingContext() const { + return this->topDevice()->recordingContext(); } -skgpu::graphite::Recorder* SkCanvas::recorder() { -#if defined(SK_GRAPHITE) - if (auto graphiteDevice = this->topDevice()->asGraphiteDevice()) { - return graphiteDevice->recorder(); - } -#endif - - return nullptr; +skgpu::graphite::Recorder* SkCanvas::recorder() const { + return this->topDevice()->recorder(); } - void SkCanvas::drawDRRect(const SkRRect& outer, const SkRRect& inner, const SkPaint& paint) { TRACE_EVENT0("skia", TRACE_FUNC); @@ -1831,16 +1691,13 @@ void SkCanvas::drawVertices(const SkVertices* vertices, SkBlendMode mode, const this->onDrawVerticesObject(vertices, mode, paint); } -#ifdef SK_ENABLE_SKSL void SkCanvas::drawMesh(const SkMesh& mesh, sk_sp blender, const SkPaint& paint) { TRACE_EVENT0("skia", TRACE_FUNC); - RETURN_ON_FALSE(mesh.isValid()); if (!blender) { blender = SkBlender::Mode(SkBlendMode::kModulate); } this->onDrawMesh(mesh, std::move(blender), paint); } -#endif void SkCanvas::drawPath(const SkPath& path, const SkPaint& paint) { TRACE_EVENT0("skia", TRACE_FUNC); @@ -2218,14 +2075,14 @@ void SkCanvas::onDrawImage2(const SkImage* image, SkScalar x, SkScalar y, const SkSamplingOptions& sampling, const SkPaint* paint) { SkPaint realPaint = clean_paint_for_drawImage(paint); - SkRect bounds = SkRect::MakeXYWH(x, y, image->width(), image->height()); - if (this->internalQuickReject(bounds, realPaint)) { + SkRect dst = SkRect::MakeXYWH(x, y, image->width(), image->height()); + if (this->internalQuickReject(dst, realPaint)) { return; } if (realPaint.getImageFilter() && this->canDrawBitmapAsSprite(x, y, image->width(), image->height(), sampling, realPaint) && - !image_to_color_filter(&realPaint)) { + !SkCanvasPriv::ImageToColorFilter(&realPaint)) { // Evaluate the image filter directly on the input image and then draw the result, instead // of first drawing the image to a temporary layer and filtering. SkBaseDevice* device = this->topDevice(); @@ -2261,9 +2118,14 @@ void SkCanvas::onDrawImage2(const SkImage* image, SkScalar x, SkScalar y, } // else fall through to regular drawing path } - auto layer = this->aboutToDraw(this, realPaint, &bounds); + if (this->topDevice()->drawAsTiledImageRect(this, image, nullptr, dst, sampling, + realPaint, kFast_SrcRectConstraint)) { + return; + } + + auto layer = this->aboutToDraw(this, realPaint, &dst); if (layer) { - this->topDevice()->drawImageRect(image, nullptr, bounds, sampling, + this->topDevice()->drawImageRect(image, nullptr, dst, sampling, layer->paint(), kFast_SrcRectConstraint); } } @@ -2292,11 +2154,17 @@ void SkCanvas::onDrawImageRect2(const SkImage* image, const SkRect& src, const S return; } + if (this->topDevice()->drawAsTiledImageRect(this, image, &src, dst, realSampling, + realPaint, constraint)) { + return; + } + auto layer = this->aboutToDraw(this, realPaint, &dst, CheckForOverwrite::kYes, image->isOpaque() ? kOpaque_ShaderOverrideOpacity : kNotOpaque_ShaderOverrideOpacity); if (layer) { - this->topDevice()->drawImageRect(image, &src, dst, realSampling, layer->paint(), constraint); + this->topDevice()->drawImageRect(image, &src, dst, realSampling, layer->paint(), + constraint); } } @@ -2467,10 +2335,6 @@ void SkCanvas::drawGlyphs(int count, const SkGlyphID glyphs[], const SkRSXform x this->onDrawGlyphRunList(glyphRunList, paint); } -#if defined(SK_GANESH) && GR_TEST_UTILS -bool gSkBlobAsSlugTesting = false; -#endif - void SkCanvas::drawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, const SkPaint& paint) { TRACE_EVENT0("skia", TRACE_FUNC); @@ -2490,22 +2354,7 @@ void SkCanvas::drawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, totalGlyphCount += r.fGlyphCount; } -#if defined(SK_GANESH) && GR_TEST_UTILS - // Draw using text blob normally or if the blob has RSX form because slugs can't convert that - // form. - if (!gSkBlobAsSlugTesting || - this->topDevice()->asGaneshDevice() == nullptr || - SkTextBlobPriv::HasRSXForm(*blob)) -#endif - { - this->onDrawTextBlob(blob, x, y, paint); - } -#if defined(SK_GANESH) && GR_TEST_UTILS - else { - auto slug = Slug::ConvertBlob(this, *blob, {x, y}, paint); - slug->draw(this); - } -#endif + this->onDrawTextBlob(blob, x, y, paint); } void SkCanvas::onDrawVerticesObject(const SkVertices* vertices, SkBlendMode bmode, @@ -2523,20 +2372,13 @@ void SkCanvas::onDrawVerticesObject(const SkVertices* vertices, SkBlendMode bmod } } -#ifdef SK_ENABLE_SKSL void SkCanvas::onDrawMesh(const SkMesh& mesh, sk_sp blender, const SkPaint& paint) { SkPaint simplePaint = clean_paint_for_drawVertices(paint); - - if (this->internalQuickReject(mesh.bounds(), simplePaint)) { - return; - } - auto layer = this->aboutToDraw(this, simplePaint, nullptr); if (layer) { this->topDevice()->drawMesh(mesh, std::move(blender), paint); } } -#endif void SkCanvas::drawPatch(const SkPoint cubics[12], const SkColor colors[4], const SkPoint texCoords[4], SkBlendMode bmode, @@ -2898,162 +2740,3 @@ SkRasterHandleAllocator::MakeCanvas(std::unique_ptr all return hndl ? std::unique_ptr(new SkCanvas(bm, std::move(alloc), hndl, props)) : nullptr; } - -//////////////////////////////////////////////////////////////////////////////////////////////////// -#if defined(SK_GANESH) && GR_TEST_UTILS -SkTestCanvas::SkTestCanvas(SkCanvas* canvas) - : SkCanvas(sk_ref_sp(canvas->baseDevice())) {} - -void SkTestCanvas::onDrawGlyphRunList( - const sktext::GlyphRunList& glyphRunList, const SkPaint& paint) { - SkRect bounds = glyphRunList.sourceBoundsWithOrigin(); - if (this->internalQuickReject(bounds, paint)) { - return; - } - auto layer = this->aboutToDraw(this, paint, &bounds); - if (layer) { - if (glyphRunList.hasRSXForm()) { - this->SkCanvas::onDrawGlyphRunList(glyphRunList, layer->paint()); - } else { - auto slug = this->onConvertGlyphRunListToSlug(glyphRunList, layer->paint()); - this->drawSlug(slug.get()); - } - } -} - -SkTestCanvas::SkTestCanvas(SkCanvas* canvas) - : SkCanvas(sk_ref_sp(canvas->baseDevice())) {} - -void SkTestCanvas::onDrawGlyphRunList( - const sktext::GlyphRunList& glyphRunList, const SkPaint& paint) { - SkRect bounds = glyphRunList.sourceBoundsWithOrigin(); - if (this->internalQuickReject(bounds, paint)) { - return; - } - auto layer = this->aboutToDraw(this, paint, &bounds); - if (layer) { - if (glyphRunList.hasRSXForm()) { - this->SkCanvas::onDrawGlyphRunList(glyphRunList, layer->paint()); - } else { - sk_sp bytes; - { - auto slug = this->onConvertGlyphRunListToSlug(glyphRunList, layer->paint()); - if (slug != nullptr) { - bytes = slug->serialize(); - } - } - { - if (bytes != nullptr) { - auto slug = Slug::Deserialize(bytes->data(), bytes->size()); - this->drawSlug(slug.get()); - } - } - } - } -} - -// A do nothing handle manager for the remote strike server. -class ServerHandleManager : public SkStrikeServer::DiscardableHandleManager { -public: - SkDiscardableHandleId createHandle() override { - return 0; - } - - bool lockHandle(SkDiscardableHandleId id) override { - return true; - } - - bool isHandleDeleted(SkDiscardableHandleId id) override { - return false; - } -}; - -// Lock the strikes into the cache for the length of the test. This handler is tied to the lifetime -// of the canvas used to render the entire test. -class ClientHandleManager : public SkStrikeClient::DiscardableHandleManager { -public: - bool deleteHandle(SkDiscardableHandleId id) override { - return fIsLocked; - } - - void assertHandleValid(SkDiscardableHandleId id) override { - DiscardableHandleManager::assertHandleValid(id); - } - - void notifyCacheMiss(SkStrikeClient::CacheMissType type, int fontSize) override { - - } - - void notifyReadFailure(const ReadFailureData& data) override { - DiscardableHandleManager::notifyReadFailure(data); - } - - void unlock() { - fIsLocked = true; - } - -private: - bool fIsLocked{false}; -}; - -SkTestCanvas::SkTestCanvas(SkCanvas* canvas) - : SkCanvas(sk_ref_sp(canvas->baseDevice())) - , fServerHandleManager(new ServerHandleManager{}) - , fClientHandleManager(new ClientHandleManager{}) - , fStrikeServer(fServerHandleManager.get()) - , fStrikeClient(fClientHandleManager) {} - -// Allow the strikes to be freed from the strike cache after the test has been drawn. -SkTestCanvas::~SkTestCanvas() { - static_cast(fClientHandleManager.get())->unlock(); -} - -void SkTestCanvas::onDrawGlyphRunList( - const sktext::GlyphRunList& glyphRunList, const SkPaint& paint) { - SkRect bounds = glyphRunList.sourceBoundsWithOrigin(); - if (this->internalQuickReject(bounds, paint)) { - return; - } - auto layer = this->aboutToDraw(this, paint, &bounds); - if (layer) { - if (glyphRunList.hasRSXForm()) { - this->SkCanvas::onDrawGlyphRunList(glyphRunList, layer->paint()); - } else { - sk_sp slugBytes; - std::vector glyphBytes; - { - auto analysisCanvas = fStrikeServer.makeAnalysisCanvas( - this->topDevice()->width(), - this->topDevice()->height(), - this->fProps, - this->topDevice()->imageInfo().refColorSpace(), - // TODO: Where should we get this value from? - /*DFTSupport=*/ true); - - // TODO: Move the analysis canvas processing up to the via to handle a whole - // document at a time. This is not the correct way to handle the CTM; it doesn't - // work for layers. - analysisCanvas->setMatrix(this->getLocalToDevice()); - auto slug = analysisCanvas->onConvertGlyphRunListToSlug(glyphRunList, - layer->paint()); - if (slug != nullptr) { - slugBytes = slug->serialize(); - } - fStrikeServer.writeStrikeData(&glyphBytes); - } - { - if (!glyphBytes.empty()) { - fStrikeClient.readStrikeData(glyphBytes.data(), glyphBytes.size()); - } - if (slugBytes != nullptr) { - auto slug = Slug::Deserialize( - slugBytes->data(), slugBytes->size(), &fStrikeClient); - this->drawSlug(slug.get()); - } - } - } - } -} -#endif - -//////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/core/SkCanvasPriv.cpp b/src/core/SkCanvasPriv.cpp index a6d8409899bc..dedab800c8fe 100644 --- a/src/core/SkCanvasPriv.cpp +++ b/src/core/SkCanvasPriv.cpp @@ -7,20 +7,24 @@ #include "src/core/SkCanvasPriv.h" +#include "include/core/SkBlendMode.h" #include "include/core/SkColor.h" +#include "include/core/SkColorFilter.h" +#include "include/core/SkImageFilter.h" #include "include/core/SkMatrix.h" #include "include/core/SkRect.h" +#include "include/core/SkRefCnt.h" #include "include/private/base/SkAlign.h" #include "include/private/base/SkAssert.h" +#include "include/private/base/SkTo.h" #include "src/base/SkAutoMalloc.h" #include "src/core/SkReadBuffer.h" #include "src/core/SkWriteBuffer.h" #include "src/core/SkWriter32.h" +#include #include -class SkPaint; - SkAutoCanvasMatrixPaint::SkAutoCanvasMatrixPaint(SkCanvas* canvas, const SkMatrix* matrix, const SkPaint* paint, const SkRect& bounds) : fCanvas(canvas) @@ -108,6 +112,31 @@ void SkCanvasPriv::GetDstClipAndMatrixCounts(const SkCanvas::ImageSetEntry set[] *totalMatrixCount = maxMatrixIndex + 1; } +// Attempts to convert an image filter to its equivalent color filter, which if possible, modifies +// the paint to compose the image filter's color filter into the paint's color filter slot. +// Returns true if the paint has been modified. +// Requires the paint to have an image filter and the copy-on-write be initialized. +bool SkCanvasPriv::ImageToColorFilter(SkPaint* paint) { + SkASSERT(SkToBool(paint) && paint->getImageFilter()); + + SkColorFilter* imgCFPtr; + if (!paint->getImageFilter()->asAColorFilter(&imgCFPtr)) { + return false; + } + sk_sp imgCF(imgCFPtr); + + SkColorFilter* paintCF = paint->getColorFilter(); + if (paintCF) { + // The paint has both a colorfilter(paintCF) and an imagefilter-that-is-a-colorfilter(imgCF) + // and we need to combine them into a single colorfilter. + imgCF = imgCF->makeComposed(sk_ref_sp(paintCF)); + } + + paint->setColorFilter(std::move(imgCF)); + paint->setImageFilter(nullptr); + return true; +} + #if GRAPHITE_TEST_UTILS #include "src/gpu/graphite/Device.h" @@ -119,3 +148,46 @@ skgpu::graphite::TextureProxy* SkCanvasPriv::TopDeviceGraphiteTargetProxy(SkCanv } #endif // GRAPHITE_TEST_UTILS + + +AutoLayerForImageFilter::AutoLayerForImageFilter(SkCanvas* canvas, + const SkPaint& paint, + const SkRect* rawBounds) + : fPaint(paint) + , fCanvas(canvas) + , fTempLayerForImageFilter(false) { + SkDEBUGCODE(fSaveCount = canvas->getSaveCount();) + + if (fPaint.getImageFilter() && !SkCanvasPriv::ImageToColorFilter(&fPaint)) { + // The draw paint has an image filter that couldn't be simplified to an equivalent + // color filter, so we have to inject an automatic saveLayer(). + SkPaint restorePaint; + restorePaint.setImageFilter(fPaint.refImageFilter()); + restorePaint.setBlender(fPaint.refBlender()); + + // Remove the restorePaint fields from our "working" paint + fPaint.setImageFilter(nullptr); + fPaint.setBlendMode(SkBlendMode::kSrcOver); + + SkRect storage; + if (rawBounds && fPaint.canComputeFastBounds()) { + // Make rawBounds include all paint outsets except for those due to image filters. + // At this point, fPaint's image filter has been moved to 'restorePaint'. + SkASSERT(!fPaint.getImageFilter()); + rawBounds = &fPaint.computeFastBounds(*rawBounds, &storage); + } + + canvas->fSaveCount += 1; + (void)canvas->internalSaveLayer(SkCanvas::SaveLayerRec(rawBounds, &restorePaint), + SkCanvas::kFullLayer_SaveLayerStrategy); + fTempLayerForImageFilter = true; + } +} + +AutoLayerForImageFilter::~AutoLayerForImageFilter() { + if (fTempLayerForImageFilter) { + fCanvas->fSaveCount -= 1; + fCanvas->internalRestore(); + } + SkASSERT(fCanvas->getSaveCount() == fSaveCount); +} diff --git a/src/core/SkCanvasPriv.h b/src/core/SkCanvasPriv.h index d6cc50f3390c..7aa25241a497 100644 --- a/src/core/SkCanvasPriv.h +++ b/src/core/SkCanvasPriv.h @@ -9,7 +9,9 @@ #define SkCanvasPriv_DEFINED #include "include/core/SkCanvas.h" +#include "include/core/SkPaint.h" #include "include/core/SkScalar.h" +#include "include/private/base/SkDebug.h" #include "include/private/base/SkNoncopyable.h" #include @@ -17,10 +19,9 @@ class SkBaseDevice; class SkImageFilter; class SkMatrix; -class SkPaint; class SkReadBuffer; -class SkWriteBuffer; struct SkRect; +class SkWriteBuffer; #if GRAPHITE_TEST_UTILS namespace skgpu::graphite { @@ -90,6 +91,13 @@ class SkCanvasPriv { static void SetBackdropScaleFactor(SkCanvas::SaveLayerRec* rec, SkScalar scale) { rec->fExperimentalBackdropScale = scale; } + + // Attempts to convert an image filter to its equivalent color filter, which if possible, + // modifies the paint to compose the image filter's color filter into the paint's color filter + // slot. + // Returns true if the paint has been modified. + // Requires the paint to have an image filter and the copy-on-write be initialized. + static bool ImageToColorFilter(SkPaint*); }; /** @@ -101,4 +109,47 @@ class SkCanvasPriv { */ constexpr int kMaxPictureOpsToUnrollInsteadOfRef = 1; +/** + * We implement ImageFilters for a given draw by creating a layer, then applying the + * imagefilter to the pixels of that layer (its backing surface/image), and then + * we call restore() to xfer that layer to the main canvas. + * + * 1. SaveLayer (with a paint containing the current imagefilter and xfermode) + * 2. Generate the src pixels: + * Remove the imagefilter and the xfermode from the paint that we (AutoDrawLooper) + * return (fPaint). We then draw the primitive (using srcover) into a cleared + * buffer/surface. + * 3. Restore the layer created in #1 + * The imagefilter is passed the buffer/surface from the layer (now filled with the + * src pixels of the primitive). It returns a new "filtered" buffer, which we + * draw onto the previous layer using the xfermode from the original paint. + */ +class AutoLayerForImageFilter { +public: + // "rawBounds" is the original bounds of the primitive about to be drawn, unmodified by the + // paint. It's used to determine the size of the offscreen layer for filters. + // If null, the clip will be used instead. + // + // Draw functions should use layer->paint() instead of the passed-in paint. + AutoLayerForImageFilter(SkCanvas* canvas, + const SkPaint& paint, + const SkRect* rawBounds = nullptr); + + AutoLayerForImageFilter(const AutoLayerForImageFilter&) = delete; + AutoLayerForImageFilter& operator=(const AutoLayerForImageFilter&) = delete; + AutoLayerForImageFilter(AutoLayerForImageFilter&&) = default; + AutoLayerForImageFilter& operator=(AutoLayerForImageFilter&&) = default; + + ~AutoLayerForImageFilter(); + + const SkPaint& paint() const { return fPaint; } + +private: + SkPaint fPaint; + SkCanvas* fCanvas; + bool fTempLayerForImageFilter; + + SkDEBUGCODE(int fSaveCount;) +}; + #endif diff --git a/src/core/SkChromeRemoteGlyphCache.cpp b/src/core/SkChromeRemoteGlyphCache.cpp index 165cbd4178b6..ff32bc4874a6 100644 --- a/src/core/SkChromeRemoteGlyphCache.cpp +++ b/src/core/SkChromeRemoteGlyphCache.cpp @@ -57,113 +57,7 @@ using namespace sktext; using namespace sktext::gpu; using namespace skglyph; -// TODO: remove when new serialization code is done. -//#define SK_SUPPORT_LEGACY_STRIKE_SERIALIZATION - namespace { -#if defined(SK_SUPPORT_LEGACY_STRIKE_SERIALIZATION) -// -- Serializer ----------------------------------------------------------------------------------- -size_t pad(size_t size, size_t alignment) { return (size + (alignment - 1)) & ~(alignment - 1); } - -// Alignment between x86 and x64 differs for some types, in particular -// int64_t and doubles have 4 and 8-byte alignment, respectively. -// Be consistent even when writing and reading across different architectures. -template -size_t serialization_alignment() { - return sizeof(T) == 8 ? 8 : alignof(T); -} - -class Serializer { -public: - explicit Serializer(std::vector* buffer) : fBuffer{buffer} {} - - template - T* emplace(Args&&... args) { - auto result = this->allocate(sizeof(T), serialization_alignment()); - return new (result) T{std::forward(args)...}; - } - - template - void write(const T& data) { - T* result = (T*)this->allocate(sizeof(T), serialization_alignment()); - memcpy(result, &data, sizeof(T)); - } - - void writeDescriptor(const SkDescriptor& desc) { - write(desc.getLength()); - auto result = this->allocate(desc.getLength(), alignof(SkDescriptor)); - memcpy(result, &desc, desc.getLength()); - } - - void* allocate(size_t size, size_t alignment) { - size_t aligned = pad(fBuffer->size(), alignment); - fBuffer->resize(aligned + size); - return &(*fBuffer)[aligned]; - } - -private: - std::vector* fBuffer; -}; - -// -- Deserializer ------------------------------------------------------------------------------- -// Note that the Deserializer is reading untrusted data, we need to guard against invalid data. -class Deserializer { -public: - Deserializer(const volatile char* memory, size_t memorySize) - : fMemory(memory), fMemorySize(memorySize) {} - - template - bool read(T* val) { - auto* result = this->ensureAtLeast(sizeof(T), serialization_alignment()); - if (!result) return false; - - memcpy(val, const_cast(result), sizeof(T)); - return true; - } - - bool readDescriptor(SkAutoDescriptor* ad) { - uint32_t descLength = 0u; - if (!this->read(&descLength)) return false; - - auto* underlyingBuffer = this->ensureAtLeast(descLength, alignof(SkDescriptor)); - if (!underlyingBuffer) return false; - SkReadBuffer buffer((void*)underlyingBuffer, descLength); - auto autoDescriptor = SkAutoDescriptor::MakeFromBuffer(buffer); - if (!autoDescriptor.has_value()) { return false; } - - *ad = std::move(*autoDescriptor); - return true; - } - - const volatile void* read(size_t size, size_t alignment) { - return this->ensureAtLeast(size, alignment); - } - - size_t bytesRead() const { return fBytesRead; } - -private: - const volatile char* ensureAtLeast(size_t size, size_t alignment) { - size_t padded = pad(fBytesRead, alignment); - - // Not enough data. - if (padded > fMemorySize) return nullptr; - if (size > fMemorySize - padded) return nullptr; - - auto* result = fMemory + padded; - fBytesRead = padded + size; - return result; - } - - // Note that we read each piece of memory only once to guard against TOCTOU violations. - const volatile char* fMemory; - size_t fMemorySize; - size_t fBytesRead = 0u; -}; - -// Paths use a SkWriter32 which requires 4 byte alignment. -static const size_t kPathAlignment = 4u; -static const size_t kDrawableAlignment = 8u; -#endif // -- StrikeSpec ----------------------------------------------------------------------------------- struct StrikeSpec { @@ -202,11 +96,7 @@ class RemoteStrike final : public sktext::StrikeForGPU { return glyph->drawable() != nullptr; } - #if defined(SK_SUPPORT_LEGACY_STRIKE_SERIALIZATION) - void writePendingGlyphs(Serializer* serializer); - #else void writePendingGlyphs(SkWriteBuffer& buffer); - #endif SkDiscardableHandleId discardableHandleId() const { return fDiscardableHandleId; } @@ -229,11 +119,6 @@ class RemoteStrike final : public sktext::StrikeForGPU { void resetScalerContext(); private: - #if defined(SK_SUPPORT_LEGACY_STRIKE_SERIALIZATION) - void writeGlyphPath(const SkGlyph& glyph, Serializer* serializer) const; - void writeGlyphDrawable(const SkGlyph& glyph, Serializer* serializer) const; - #endif - void ensureScalerContext(); const SkAutoDescriptor fDescriptor; @@ -277,71 +162,6 @@ RemoteStrike::RemoteStrike( SkASSERT(fContext != nullptr); } -#if defined(SK_SUPPORT_LEGACY_STRIKE_SERIALIZATION) -// No need to write fScalerContextBits because any needed image is already generated. -void write_glyph(const SkGlyph& glyph, Serializer* serializer) { - serializer->write(glyph.getPackedID()); - serializer->write(glyph.advanceX()); - serializer->write(glyph.advanceY()); - serializer->write(glyph.width()); - serializer->write(glyph.height()); - serializer->write(glyph.top()); - serializer->write(glyph.left()); - serializer->write(glyph.maskFormat()); -} - -void RemoteStrike::writePendingGlyphs(Serializer* serializer) { - SkASSERT(this->hasPendingGlyphs()); - - // Write the desc. - serializer->emplace(fContext->getTypeface()->uniqueID(), fDiscardableHandleId); - serializer->writeDescriptor(*fDescriptor.getDesc()); - - serializer->emplace(fHaveSentFontMetrics); - if (!fHaveSentFontMetrics) { - // Write FontMetrics if not sent before. - SkFontMetrics fontMetrics; - fContext->getFontMetrics(&fontMetrics); - serializer->write(fontMetrics); - fHaveSentFontMetrics = true; - } - - // Write mask glyphs - serializer->emplace(fMasksToSend.size()); - for (SkGlyph& glyph : fMasksToSend) { - SkASSERT(SkMask::IsValidFormat(glyph.maskFormat())); - - write_glyph(glyph, serializer); - auto imageSize = glyph.imageSize(); - if (imageSize > 0 && SkGlyphDigest::FitsInAtlas(glyph)) { - glyph.setImage(serializer->allocate(imageSize, glyph.formatAlignment())); - fContext->getImage(glyph); - } - } - fMasksToSend.clear(); - - // Write glyphs paths. - serializer->emplace(fPathsToSend.size()); - for (SkGlyph& glyph : fPathsToSend) { - SkASSERT(SkMask::IsValidFormat(glyph.maskFormat())); - - write_glyph(glyph, serializer); - this->writeGlyphPath(glyph, serializer); - } - fPathsToSend.clear(); - - // Write glyphs drawables. - serializer->emplace(fDrawablesToSend.size()); - for (SkGlyph& glyph : fDrawablesToSend) { - SkASSERT(SkMask::IsValidFormat(glyph.maskFormat())); - - write_glyph(glyph, serializer); - writeGlyphDrawable(glyph, serializer); - } - fDrawablesToSend.clear(); - fAlloc.reset(); -} -#else void RemoteStrike::writePendingGlyphs(SkWriteBuffer& buffer) { SkASSERT(this->hasPendingGlyphs()); @@ -382,7 +202,6 @@ void RemoteStrike::writePendingGlyphs(SkWriteBuffer& buffer) { fDrawablesToSend.clear(); fAlloc.reset(); } -#endif void RemoteStrike::ensureScalerContext() { if (fContext == nullptr) { @@ -399,47 +218,6 @@ void RemoteStrike::setStrikeSpec(const SkStrikeSpec& strikeSpec) { fStrikeSpec = &strikeSpec; } -#if defined(SK_SUPPORT_LEGACY_STRIKE_SERIALIZATION) -void RemoteStrike::writeGlyphPath(const SkGlyph& glyph, Serializer* serializer) const { - if (glyph.isEmpty()) { - serializer->write(0u); - return; - } - - const SkPath* path = glyph.path(); - - if (path == nullptr) { - serializer->write(0u); - return; - } - - size_t pathSize = path->writeToMemory(nullptr); - serializer->write(pathSize); - path->writeToMemory(serializer->allocate(pathSize, kPathAlignment)); - - serializer->write(glyph.pathIsHairline()); -} - -void RemoteStrike::writeGlyphDrawable(const SkGlyph& glyph, Serializer* serializer) const { - if (glyph.isEmpty()) { - serializer->write(0u); - return; - } - - SkDrawable* drawable = glyph.drawable(); - - if (drawable == nullptr) { - serializer->write(0u); - return; - } - - sk_sp picture = drawable->makePictureSnapshot(); - sk_sp data = picture->serialize(); - serializer->write(data->size()); - memcpy(serializer->allocate(data->size(), kDrawableAlignment), data->data(), data->size()); -} -#endif - SkGlyphDigest RemoteStrike::digestFor(ActionType actionType, SkPackedGlyphID packedGlyphID) { SkGlyphDigest* digestPtr = fSentGlyphs.find(packedGlyphID); if (digestPtr != nullptr && digestPtr->actionFor(actionType) != GlyphAction::kUnset) { @@ -536,65 +314,6 @@ size_t SkStrikeServerImpl::remoteStrikeMapSizeForTesting() const { return fDescToRemoteStrike.size(); } -#if defined(SK_SUPPORT_LEGACY_STRIKE_SERIALIZATION) -void SkStrikeServerImpl::writeStrikeData(std::vector* memory) { - #if defined(SK_TRACE_GLYPH_RUN_PROCESS) - SkString msg; - msg.appendf("\nBegin send strike differences\n"); - #endif - - size_t strikesToSend = 0; - fRemoteStrikesToSend.foreach ([&](RemoteStrike* strike) { - if (strike->hasPendingGlyphs()) { - strikesToSend++; - } else { - strike->resetScalerContext(); - } - }); - - if (strikesToSend == 0 && fTypefacesToSend.empty()) { - fRemoteStrikesToSend.reset(); - return; - } - - Serializer serializer(memory); - serializer.emplace(fTypefacesToSend.size()); - for (const auto& typefaceProto: fTypefacesToSend) { - // Temporary: use inside knowledge of SkBinaryWriteBuffer to set the size and alignment. - // This should agree with the alignment used in readStrikeData. - alignas(uint32_t) std::uint8_t bufferBytes[24]; - SkBinaryWriteBuffer buffer{bufferBytes, std::size(bufferBytes)}; - typefaceProto.flatten(buffer); - serializer.write(buffer.bytesWritten()); - void* dest = serializer.allocate(buffer.bytesWritten(), alignof(uint32_t)); - buffer.writeToMemory(dest); - } - fTypefacesToSend.clear(); - - serializer.emplace(SkTo(strikesToSend)); - fRemoteStrikesToSend.foreach ( - [&](RemoteStrike* strike) { - if (strike->hasPendingGlyphs()) { - strike->writePendingGlyphs(&serializer); - strike->resetScalerContext(); - } - #ifdef SK_DEBUG - auto it = fDescToRemoteStrike.find(&strike->getDescriptor()); - SkASSERT(it != fDescToRemoteStrike.end()); - SkASSERT(it->second.get() == strike); - #endif - #if defined(SK_TRACE_GLYPH_RUN_PROCESS) - msg.append(strike->getDescriptor().dumpRec()); - #endif - } - ); - fRemoteStrikesToSend.reset(); - #if defined(SK_TRACE_GLYPH_RUN_PROCESS) - msg.appendf("End send strike differences"); - SkDebugf("%s\n", msg.c_str()); - #endif -} -#else void SkStrikeServerImpl::writeStrikeData(std::vector* memory) { SkBinaryWriteBuffer buffer{nullptr, 0}; @@ -639,7 +358,6 @@ void SkStrikeServerImpl::writeStrikeData(std::vector* memory) { auto data = buffer.snapshotAsData(); memory->assign(data->bytes(), data->bytes() + data->size()); } -#endif // defined(SK_SUPPORT_LEGACY_STRIKE_SERIALIZATION) sk_sp SkStrikeServerImpl::findOrCreateScopedStrike( const SkStrikeSpec& strikeSpec) { @@ -877,10 +595,6 @@ class SkStrikeClientImpl { void onDraw(SkCanvas* canvas) override { canvas->drawPicture(fSelf); } }; - #if defined(SK_SUPPORT_LEGACY_STRIKE_SERIALIZATION) - static bool ReadGlyph(SkTLazy& glyph, Deserializer* deserializer); - #endif - sk_sp addTypeface(const SkTypefaceProxyPrototype& typefaceProto); THashMap> fServerTypefaceIdToTypeface; @@ -898,28 +612,6 @@ SkStrikeClientImpl::SkStrikeClientImpl( fStrikeCache{strikeCache ? strikeCache : SkStrikeCache::GlobalStrikeCache()}, fIsLogging{isLogging} {} -#if defined(SK_SUPPORT_LEGACY_STRIKE_SERIALIZATION) -// No need to write fScalerContextBits because any needed image is already generated. -bool SkStrikeClientImpl::ReadGlyph(SkTLazy& glyph, Deserializer* deserializer) { - SkPackedGlyphID glyphID; - if (!deserializer->read(&glyphID)) return false; - glyph.init(glyphID); - if (!deserializer->read(&glyph->fAdvanceX)) return false; - if (!deserializer->read(&glyph->fAdvanceY)) return false; - if (!deserializer->read(&glyph->fWidth)) return false; - if (!deserializer->read(&glyph->fHeight)) return false; - if (!deserializer->read(&glyph->fTop)) return false; - if (!deserializer->read(&glyph->fLeft)) return false; - uint8_t maskFormat; - if (!deserializer->read(&maskFormat)) return false; - if (!SkMask::IsValidFormat(maskFormat)) return false; - glyph->fMaskFormat = static_cast(maskFormat); - SkDEBUGCODE(glyph->fAdvancesBoundsFormatAndInitialPathDone = true;) - - return true; -} -#endif - // Change the path count to track the line number of the failing read. // TODO: change __LINE__ back to glyphPathsCount when bug chromium:1287356 is closed. #define READ_FAILURE \ @@ -932,164 +624,6 @@ bool SkStrikeClientImpl::ReadGlyph(SkTLazy& glyph, Deserializer* deseri return false; \ } -#if defined(SK_SUPPORT_LEGACY_STRIKE_SERIALIZATION) -bool SkStrikeClientImpl::readStrikeData(const volatile void* memory, size_t memorySize) { - SkASSERT(memorySize != 0u); - Deserializer deserializer(static_cast(memory), memorySize); - - uint64_t typefaceSize = 0; - uint64_t strikeCount = 0; - uint64_t glyphImagesCount = 0; - uint64_t glyphPathsCount = 0; - uint64_t glyphDrawablesCount = 0; - - if (!deserializer.read(&typefaceSize)) READ_FAILURE - for (size_t i = 0; i < typefaceSize; ++i) { - uint32_t typefaceSizeBytes; - // Read the size of the buffer generated at flatten time. - if (!deserializer.read(&typefaceSizeBytes)) READ_FAILURE - // Temporary: use inside knowledge of SkReadBuffer to set the alignment. - // This should agree with the alignment used in writeStrikeData. - auto* bytes = deserializer.read(typefaceSizeBytes, alignof(uint32_t)); - if (bytes == nullptr) READ_FAILURE - SkReadBuffer buffer(const_cast(bytes), typefaceSizeBytes); - auto typefaceProto = SkTypefaceProxyPrototype::MakeFromBuffer(buffer); - if (!typefaceProto) READ_FAILURE - - this->addTypeface(typefaceProto.value()); - } - - #if defined(SK_TRACE_GLYPH_RUN_PROCESS) - SkString msg; - msg.appendf("\nBegin receive strike differences\n"); - #endif - - if (!deserializer.read(&strikeCount)) READ_FAILURE - - for (size_t i = 0; i < strikeCount; ++i) { - StrikeSpec spec; - if (!deserializer.read(&spec)) READ_FAILURE - - SkAutoDescriptor ad; - if (!deserializer.readDescriptor(&ad)) READ_FAILURE - #if defined(SK_TRACE_GLYPH_RUN_PROCESS) - msg.appendf(" Received descriptor:\n%s", ad.getDesc()->dumpRec().c_str()); - #endif - - bool fontMetricsInitialized; - if (!deserializer.read(&fontMetricsInitialized)) READ_FAILURE - - SkFontMetrics fontMetrics{}; - if (!fontMetricsInitialized) { - if (!deserializer.read(&fontMetrics)) READ_FAILURE - } - - // Preflight the TypefaceID before doing the Descriptor translation. - auto* tfPtr = fServerTypefaceIdToTypeface.find(spec.fTypefaceID); - // Received a TypefaceID for a typeface we don't know about. - if (!tfPtr) READ_FAILURE - - // Replace the ContextRec in the desc from the server to create the client - // side descriptor. - if (!this->translateTypefaceID(&ad)) READ_FAILURE - SkDescriptor* clientDesc = ad.getDesc(); - - #if defined(SK_TRACE_GLYPH_RUN_PROCESS) - msg.appendf(" Mapped descriptor:\n%s", clientDesc->dumpRec().c_str()); - #endif - auto strike = fStrikeCache->findStrike(*clientDesc); - - // Make sure strike is pinned - if (strike) { - strike->verifyPinnedStrike(); - } - - // Metrics are only sent the first time. If the metrics are not initialized, there must - // be an existing strike. - if (fontMetricsInitialized && strike == nullptr) READ_FAILURE - if (strike == nullptr) { - // Note that we don't need to deserialize the effects since we won't be generating any - // glyphs here anyway, and the desc is still correct since it includes the serialized - // effects. - SkStrikeSpec strikeSpec{*clientDesc, *tfPtr}; - strike = fStrikeCache->createStrike( - strikeSpec, &fontMetrics, - std::make_unique( - spec.fDiscardableHandleId, fDiscardableHandleManager)); - } - - if (!deserializer.read(&glyphImagesCount)) READ_FAILURE - for (size_t j = 0; j < glyphImagesCount; j++) { - SkTLazy glyph; - if (!ReadGlyph(glyph, &deserializer)) READ_FAILURE - - if (!glyph->isEmpty() && SkGlyphDigest::FitsInAtlas(*glyph)) { - const volatile void* image = - deserializer.read(glyph->imageSize(), glyph->formatAlignment()); - if (!image) READ_FAILURE - glyph->fImage = (void*)image; - } - - strike->mergeGlyphAndImage(glyph->getPackedID(), *glyph); - } - - if (!deserializer.read(&glyphPathsCount)) READ_FAILURE - for (size_t j = 0; j < glyphPathsCount; j++) { - SkTLazy glyph; - if (!ReadGlyph(glyph, &deserializer)) READ_FAILURE - - SkGlyph* allocatedGlyph = strike->mergeGlyphAndImage(glyph->getPackedID(), *glyph); - - SkPath* pathPtr = nullptr; - SkPath path; - uint64_t pathSize = 0u; - bool hairline = false; - if (!deserializer.read(&pathSize)) READ_FAILURE - - if (pathSize > 0) { - auto* pathData = deserializer.read(pathSize, kPathAlignment); - if (!pathData) READ_FAILURE - if (!path.readFromMemory(const_cast(pathData), pathSize)) READ_FAILURE - pathPtr = &path; - if (!deserializer.read(&hairline)) READ_FAILURE - } - - strike->mergePath(allocatedGlyph, pathPtr, hairline); - } - - if (!deserializer.read(&glyphDrawablesCount)) READ_FAILURE - for (size_t j = 0; j < glyphDrawablesCount; j++) { - SkTLazy glyph; - if (!ReadGlyph(glyph, &deserializer)) READ_FAILURE - - SkGlyph* allocatedGlyph = strike->mergeGlyphAndImage(glyph->getPackedID(), *glyph); - - sk_sp drawable; - uint64_t drawableSize = 0u; - if (!deserializer.read(&drawableSize)) READ_FAILURE - - if (drawableSize > 0) { - auto* drawableData = deserializer.read(drawableSize, kDrawableAlignment); - if (!drawableData) READ_FAILURE - sk_sp picture(SkPicture::MakeFromData( - const_cast(drawableData), drawableSize)); - if (!picture) READ_FAILURE - - drawable = sk_make_sp(std::move(picture)); - } - - strike->mergeDrawable(allocatedGlyph, std::move(drawable)); - } - } - -#if defined(SK_TRACE_GLYPH_RUN_PROCESS) - msg.appendf("End receive strike differences"); - SkDebugf("%s\n", msg.c_str()); -#endif - - return true; -} -#else bool SkStrikeClientImpl::readStrikeData(const volatile void* memory, size_t memorySize) { SkASSERT(memorySize != 0); SkASSERT(memory != nullptr); @@ -1201,7 +735,6 @@ bool SkStrikeClientImpl::readStrikeData(const volatile void* memory, size_t memo return true; } -#endif // defined(SK_SUPPORT_LEGACY_STRIKE_SERIALIZATION) bool SkStrikeClientImpl::translateTypefaceID(SkAutoDescriptor* toChange) const { SkDescriptor& descriptor = *toChange->getDesc(); @@ -1212,6 +745,7 @@ bool SkStrikeClientImpl::translateTypefaceID(SkAutoDescriptor* toChange) const { // findEntry returns a const void*, remove the const in order to update in place. void* ptr = const_cast(descriptor.findEntry(kRec_SkDescriptorTag, &size)); SkScalerContextRec rec; + if (!ptr || size != sizeof(rec)) { return false; } std::memcpy((void*)&rec, ptr, size); // Get the local typeface from remote typefaceID. auto* tfPtr = fServerTypefaceIdToTypeface.find(rec.fTypefaceID); @@ -1244,7 +778,7 @@ sk_sp SkStrikeClientImpl::addTypeface(const SkTypefaceProxyPrototype auto newTypeface = sk_make_sp( typefaceProto, fDiscardableHandleManager, fIsLogging); fServerTypefaceIdToTypeface.set(typefaceProto.serverTypefaceID(), newTypeface); - return std::move(newTypeface); + return newTypeface; } // SkStrikeClient ---------------------------------------------------------------------------------- diff --git a/src/core/SkColorSpacePriv.h b/src/core/SkColorSpacePriv.h index cfcb91fc7c38..36787fcbcf50 100644 --- a/src/core/SkColorSpacePriv.h +++ b/src/core/SkColorSpacePriv.h @@ -11,13 +11,6 @@ #include "include/private/base/SkTemplates.h" #include "modules/skcms/skcms.h" -namespace skvm { -class Builder; -struct Color; -struct F32; -struct Uniforms; -} - // A gamut narrower than sRGB, useful for testing. static constexpr skcms_Matrix3x3 gNarrow_toXYZD50 = {{ { 0.190974f, 0.404865f, 0.368380f }, @@ -71,13 +64,6 @@ static inline bool is_almost_linear(const skcms_TransferFunction& coeffs) { return linearExp || linearFn; } -skvm::F32 sk_program_transfer_fn( - skvm::F32 v, skcms_TFType, - skvm::F32 G, skvm::F32 A, skvm::F32 B, skvm::F32 C, skvm::F32 D, skvm::F32 E, skvm::F32 F); - -skvm::Color sk_program_transfer_fn(skvm::Builder*, skvm::Uniforms*, - const skcms_TransferFunction&, skvm::Color); - // Return raw pointers to commonly used SkColorSpaces. // No need to ref/unref these, but if you do, do it in pairs. SkColorSpace* sk_srgb_singleton(); diff --git a/src/core/SkColorSpaceXformSteps.cpp b/src/core/SkColorSpaceXformSteps.cpp index 1206b9015acd..9e53040124ac 100644 --- a/src/core/SkColorSpaceXformSteps.cpp +++ b/src/core/SkColorSpaceXformSteps.cpp @@ -13,7 +13,6 @@ #include "modules/skcms/skcms.h" #include "src/core/SkColorSpacePriv.h" #include "src/core/SkRasterPipeline.h" -#include "src/core/SkVM.h" // See skia.org/user/color (== site/user/color.md). @@ -140,90 +139,3 @@ void SkColorSpaceXformSteps::apply(SkRasterPipeline* p) const { if (flags.encode) { p->append_transfer_function(dstTFInv); } if (flags.premul) { p->append(SkRasterPipelineOp::premul); } } - -#if defined(SK_ENABLE_SKVM) -skvm::F32 sk_program_transfer_fn( - skvm::F32 v, skcms_TFType tf_type, - skvm::F32 G, skvm::F32 A, skvm::F32 B, skvm::F32 C, skvm::F32 D, skvm::F32 E, skvm::F32 F) -{ - // Strip off the sign bit and save it for later. - skvm::I32 bits = pun_to_I32(v), - sign = bits & 0x80000000; - v = pun_to_F32(bits ^ sign); - - switch (tf_type) { - case skcms_TFType_Invalid: SkASSERT(false); break; - - case skcms_TFType_sRGBish: { - v = select(v <= D, C*v + F - , approx_powf(A*v + B, G) + E); - } break; - - case skcms_TFType_PQish: { - skvm::F32 vC = approx_powf(v, C); - v = approx_powf(max(B * vC + A, 0.0f) / (E * vC + D), F); - } break; - - case skcms_TFType_HLGish: { - skvm::F32 vA = v*A, - K = F + 1.0f; - v = K*select(vA <= 1.0f, approx_powf(vA, B) - , approx_exp((v-E) * C + D)); - } break; - - case skcms_TFType_HLGinvish: { - skvm::F32 K = F + 1.0f; - v /= K; - v = select(v <= 1.0f, A * approx_powf(v, B) - , C * approx_log(v-D) + E); - } break; - } - - // Re-apply the original sign bit on our way out the door. - return pun_to_F32(sign | pun_to_I32(v)); -} - -skvm::Color sk_program_transfer_fn(skvm::Builder* p, skvm::Uniforms* uniforms, - const skcms_TransferFunction& tf, skvm::Color c) { - skvm::F32 G = p->uniformF(uniforms->pushF(tf.g)), - A = p->uniformF(uniforms->pushF(tf.a)), - B = p->uniformF(uniforms->pushF(tf.b)), - C = p->uniformF(uniforms->pushF(tf.c)), - D = p->uniformF(uniforms->pushF(tf.d)), - E = p->uniformF(uniforms->pushF(tf.e)), - F = p->uniformF(uniforms->pushF(tf.f)); - skcms_TFType tf_type = skcms_TransferFunction_getType(&tf); - return { - sk_program_transfer_fn(c.r, tf_type, G,A,B,C,D,E,F), - sk_program_transfer_fn(c.g, tf_type, G,A,B,C,D,E,F), - sk_program_transfer_fn(c.b, tf_type, G,A,B,C,D,E,F), - c.a, - }; -} - -skvm::Color SkColorSpaceXformSteps::program(skvm::Builder* p, skvm::Uniforms* uniforms, - skvm::Color c) const { - if (flags.unpremul) { - c = unpremul(c); - } - if (flags.linearize) { - c = sk_program_transfer_fn(p, uniforms, srcTF, c); - } - if (flags.gamut_transform) { - auto m = [&](int index) { - return p->uniformF(uniforms->pushF(src_to_dst_matrix[index])); - }; - auto R = c.r * m(0) + c.g * m(3) + c.b * m(6), - G = c.r * m(1) + c.g * m(4) + c.b * m(7), - B = c.r * m(2) + c.g * m(5) + c.b * m(8); - c = {R, G, B, c.a}; - } - if (flags.encode) { - c = sk_program_transfer_fn(p, uniforms, dstTFInv, c); - } - if (flags.premul) { - c = premul(c); - } - return c; -} -#endif // defined(SK_ENABLE_SKVM) diff --git a/src/core/SkColorSpaceXformSteps.h b/src/core/SkColorSpaceXformSteps.h index d41de7920565..f59847f96a78 100644 --- a/src/core/SkColorSpaceXformSteps.h +++ b/src/core/SkColorSpaceXformSteps.h @@ -10,7 +10,6 @@ #include "include/core/SkAlphaType.h" #include "modules/skcms/skcms.h" -#include "src/core/SkVM.h" #include class SkColorSpace; @@ -45,9 +44,6 @@ struct SkColorSpaceXformSteps { void apply(float rgba[4]) const; void apply(SkRasterPipeline*) const; -#if defined(SK_ENABLE_SKVM) - skvm::Color program(skvm::Builder*, skvm::Uniforms*, skvm::Color) const; -#endif Flags flags; diff --git a/src/core/SkContourMeasure.cpp b/src/core/SkContourMeasure.cpp index 6064929398c9..c0456eb824e3 100644 --- a/src/core/SkContourMeasure.cpp +++ b/src/core/SkContourMeasure.cpp @@ -7,6 +7,7 @@ #include "include/core/SkContourMeasure.h" #include "include/core/SkPath.h" +#include "include/private/base/SkFloatingPoint.h" #include "src/base/SkTSearch.h" #include "src/core/SkGeometry.h" #include "src/core/SkPathMeasurePriv.h" @@ -177,7 +178,7 @@ class SkContourMeasureIter::Impl { Impl(const SkPath& path, bool forceClosed, SkScalar resScale) : fPath(path) , fIter(SkPathPriv::Iterate(fPath).begin()) - , fTolerance(CHEAP_DIST_LIMIT * SkScalarInvert(resScale)) + , fTolerance(CHEAP_DIST_LIMIT * sk_ieee_float_divide(1.0f, resScale)) , fForceClosed(forceClosed) {} bool hasNextSegments() const { return fIter != SkPathPriv::Iterate(fPath).end(); } diff --git a/src/core/SkConvertPixels.h b/src/core/SkConvertPixels.h index fd04535a5219..f962da6a365b 100644 --- a/src/core/SkConvertPixels.h +++ b/src/core/SkConvertPixels.h @@ -8,13 +8,11 @@ #ifndef SkConvertPixels_DEFINED #define SkConvertPixels_DEFINED -#include "include/private/base/SkAttributes.h" - #include struct SkImageInfo; -bool SK_WARN_UNUSED_RESULT SkConvertPixels( +[[nodiscard]] bool SkConvertPixels( const SkImageInfo& dstInfo, void* dstPixels, size_t dstRowBytes, const SkImageInfo& srcInfo, const void* srcPixels, size_t srcRowBytes); diff --git a/src/core/SkCubicClipper.h b/src/core/SkCubicClipper.h index 328d63b8b8b7..c53bbe752bee 100644 --- a/src/core/SkCubicClipper.h +++ b/src/core/SkCubicClipper.h @@ -27,9 +27,9 @@ class SkCubicClipper { void setClip(const SkIRect& clip); - bool SK_WARN_UNUSED_RESULT clipCubic(const SkPoint src[4], SkPoint dst[4]); + [[nodiscard]] bool clipCubic(const SkPoint src[4], SkPoint dst[4]); - static bool SK_WARN_UNUSED_RESULT ChopMonoAtY(const SkPoint pts[4], SkScalar y, SkScalar* t); + [[nodiscard]] static bool ChopMonoAtY(const SkPoint pts[4], SkScalar y, SkScalar* t); private: SkRect fClip; }; diff --git a/src/core/SkDevice.cpp b/src/core/SkDevice.cpp index 7880fb957cd8..5ebdffe2a7e6 100644 --- a/src/core/SkDevice.cpp +++ b/src/core/SkDevice.cpp @@ -36,8 +36,7 @@ #include "src/utils/SkPatchUtils.h" SkBaseDevice::SkBaseDevice(const SkImageInfo& info, const SkSurfaceProps& surfaceProps) - : SkMatrixProvider(/* localToDevice = */ SkMatrix::I()) - , fInfo(info) + : fInfo(info) , fSurfaceProps(surfaceProps) { fDeviceToGlobal.setIdentity(); fGlobalToDevice.setIdentity(); diff --git a/src/core/SkDevice.h b/src/core/SkDevice.h index 982f4bce6238..e5eda102bc83 100644 --- a/src/core/SkDevice.h +++ b/src/core/SkDevice.h @@ -18,7 +18,6 @@ #include "include/private/base/SkNoncopyable.h" #include "include/private/base/SkTArray.h" #include "src/core/SkMatrixPriv.h" -#include "src/core/SkMatrixProvider.h" #include "src/core/SkRasterClip.h" #include "src/core/SkScalerContext.h" #include "src/shaders/SkShaderBase.h" @@ -62,7 +61,7 @@ struct SkStrikeDeviceInfo { const sktext::gpu::SDFTControl* const fSDFTControl; }; -class SkBaseDevice : public SkRefCnt, public SkMatrixProvider { +class SkBaseDevice : public SkRefCnt { public: SkBaseDevice(const SkImageInfo&, const SkSurfaceProps&); @@ -142,6 +141,12 @@ class SkBaseDevice : public SkRefCnt, public SkMatrixProvider { */ bool peekPixels(SkPixmap*); + /** + * Returns the transformation that maps from the local space to the device's coordinate space. + */ + const SkM44& localToDevice44() const { return fLocalToDevice; } + const SkMatrix& localToDevice() const { return fLocalToDevice33; } + /** * Return the device's coordinate space transform: this maps from the device's coordinate space * into the global canvas' space (or root device space). This includes the translation @@ -174,8 +179,6 @@ class SkBaseDevice : public SkRefCnt, public SkMatrixProvider { virtual void* getRasterHandle() const { return nullptr; } - const SkMatrixProvider& asMatrixProvider() const { return *this; } - void save() { this->onSave(); } void restore(const SkM44& ctm) { this->onRestore(); @@ -222,6 +225,9 @@ class SkBaseDevice : public SkRefCnt, public SkMatrixProvider { virtual bool android_utils_clipWithStencil() { return false; } + virtual GrRecordingContext* recordingContext() const { return nullptr; } + virtual skgpu::graphite::Recorder* recorder() const { return nullptr; } + virtual skgpu::ganesh::Device* asGaneshDevice() { return nullptr; } virtual skgpu::graphite::Device* asGraphiteDevice() { return nullptr; } @@ -310,6 +316,14 @@ class SkBaseDevice : public SkRefCnt, public SkMatrixProvider { virtual void drawImageRect(const SkImage*, const SkRect* src, const SkRect& dst, const SkSamplingOptions&, const SkPaint&, SkCanvas::SrcRectConstraint) = 0; + virtual bool drawAsTiledImageRect(SkCanvas*, + const SkImage*, + const SkRect* src, + const SkRect& dst, + const SkSamplingOptions&, + const SkPaint&, + SkCanvas::SrcRectConstraint) { return false; } + virtual void drawImageLattice(const SkImage*, const SkCanvas::Lattice&, const SkRect& dst, SkFilterMode, const SkPaint&); @@ -321,9 +335,7 @@ class SkBaseDevice : public SkRefCnt, public SkMatrixProvider { sk_sp, const SkPaint&, bool skipColorXform = false) = 0; -#ifdef SK_ENABLE_SKSL virtual void drawMesh(const SkMesh& mesh, sk_sp, const SkPaint&) = 0; -#endif virtual void drawShadow(const SkPath&, const SkDrawShadowRec&); // default implementation calls drawVertices @@ -472,11 +484,11 @@ class SkBaseDevice : public SkRefCnt, public SkMatrixProvider { private: friend class SkAndroidFrameworkUtils; friend class SkCanvas; + friend class SkCanvasPriv; // for onGetClipType friend class SkDraw; friend class SkDrawBase; friend class SkSurface_Raster; friend class DeviceTestingAccess; - friend class skgpu::TiledTextureUtils; // for drawEdgeAAImage void simplifyGlyphRunRSXFormAndRedraw(SkCanvas*, const sktext::GlyphRunList&, @@ -512,25 +524,6 @@ class SkBaseDevice : public SkRefCnt, public SkMatrixProvider { virtual SkImageFilterCache* getImageFilterCache() { return nullptr; } - // Assumes the src and dst rects have already been optimized to fit the proxy. - // Only implemented by the gpu devices. - // This method is the lowest level draw used for tiled bitmap draws. It doesn't attempt to - // modify its parameters (e.g., adjust src & dst) but just draws the image however it can. It - // could, almost, be replaced with a drawEdgeAAImageSet call for the tiled bitmap draw use - // case but the extra tilemode requirement and the intermediate parameter processing (e.g., - // trying to alter the SrcRectConstraint) currently block that. - virtual void drawEdgeAAImage(const SkImage*, - const SkRect& src, - const SkRect& dst, - const SkPoint dstClip[4], - SkCanvas::QuadAAFlags, - const SkMatrix& localToDevice, - const SkSamplingOptions&, - const SkPaint&, - SkCanvas::SrcRectConstraint, - const SkMatrix& srcToDst, - SkTileMode) {} - friend class SkNoPixelsDevice; friend class SkBitmapDevice; void privateResize(int w, int h) { @@ -539,12 +532,16 @@ class SkBaseDevice : public SkRefCnt, public SkMatrixProvider { const SkImageInfo fInfo; const SkSurfaceProps fSurfaceProps; + SkM44 fLocalToDevice; // fDeviceToGlobal and fGlobalToDevice are inverses of each other; there are never that many // SkDevices, so pay the memory cost to avoid recalculating the inverse. SkM44 fDeviceToGlobal; SkM44 fGlobalToDevice; - // fLocalToDevice (inherited from SkMatrixProvider) is the device CTM, not the global CTM + // fLocalToDevice but as a 3x3. + SkMatrix fLocalToDevice33; + + // fLocalToDevice is the device CTM, not the global CTM. // It maps from local space to the device's coordinate space. // fDeviceToGlobal * fLocalToDevice will match the canvas' CTM. // @@ -602,14 +599,9 @@ class SkNoPixelsDevice : public SkBaseDevice { void drawPath(const SkPath&, const SkPaint&, bool) override {} void drawDevice(SkBaseDevice*, const SkSamplingOptions&, const SkPaint&) override {} void drawVertices(const SkVertices*, sk_sp, const SkPaint&, bool) override {} -#ifdef SK_ENABLE_SKSL void drawMesh(const SkMesh&, sk_sp, const SkPaint&) override {} -#endif -#if defined(SK_GANESH) void drawSlug(SkCanvas*, const sktext::gpu::Slug*, const SkPaint&) override {} -#endif - void onDrawGlyphRunList( SkCanvas*, const sktext::GlyphRunList&, const SkPaint&, const SkPaint&) override {} diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp index 07f773a095c1..e7a2584f3d87 100644 --- a/src/core/SkDraw.cpp +++ b/src/core/SkDraw.cpp @@ -27,7 +27,6 @@ #include "src/core/SkDraw.h" #include "src/core/SkImageInfoPriv.h" #include "src/core/SkImagePriv.h" -#include "src/core/SkMatrixProvider.h" #include "src/core/SkMatrixUtils.h" #include "src/core/SkRasterClip.h" #include "src/core/SkRectPriv.h" @@ -250,9 +249,8 @@ void SkDraw::drawPoints(SkCanvas::PointMode mode, size_t count, return; } - SkMatrix ctm = fMatrixProvider->localToDevice(); PtProcRec rec; - if (!device && rec.init(mode, paint, &ctm, fRC)) { + if (!device && rec.init(mode, paint, fCTM, fRC)) { SkAutoBlitterChoose blitter(*this, nullptr, paint); SkPoint devPts[MAX_DEV_PTS]; @@ -266,7 +264,7 @@ void SkDraw::drawPoints(SkCanvas::PointMode mode, size_t count, if (n > MAX_DEV_PTS) { n = MAX_DEV_PTS; } - ctm.mapPoints(devPts, pts, n); + fCTM->mapPoints(devPts, pts, n); if (!SkScalarsAreFinite(&devPts[0].fX, n * 2)) { return; } @@ -318,8 +316,7 @@ void SkDraw::drawBitmap(const SkBitmap& bitmap, const SkMatrix& prematrix, paint.writable()->setStyle(SkPaint::kFill_Style); } - SkPreConcatMatrixProvider matrixProvider(*fMatrixProvider, prematrix); - SkMatrix matrix = matrixProvider.localToDevice(); + SkMatrix matrix = *fCTM * prematrix; if (clipped_out(matrix, *fRC, bitmap.width(), bitmap.height())) { return; @@ -354,7 +351,7 @@ void SkDraw::drawBitmap(const SkBitmap& bitmap, const SkMatrix& prematrix, // now make a temp draw on the stack, and use it // SkDraw draw(*this); - draw.fMatrixProvider = &matrixProvider; + draw.fCTM = &matrix; // For a long time, the CPU backend treated A8 bitmaps as coverage, rather than alpha. This was // inconsistent with the GPU backend (skbug.com/9692). When this was fixed, it altered behavior @@ -410,8 +407,8 @@ void SkDraw::drawSprite(const SkBitmap& bitmap, int x, int y, const SkPaint& ori } } - SkMatrix matrix; - SkRect r; + SkMatrix matrix; + SkRect r; // get a scalar version of our rect r.set(bounds); @@ -420,8 +417,7 @@ void SkDraw::drawSprite(const SkBitmap& bitmap, int x, int y, const SkPaint& ori matrix.setTranslate(r.fLeft, r.fTop); SkPaint paintWithShader = make_paint_with_image(paint, bitmap, SkSamplingOptions(), &matrix); SkDraw draw(*this); - SkMatrixProvider matrixProvider(SkMatrix::I()); - draw.fMatrixProvider = &matrixProvider; + draw.fCTM = &SkMatrix::I(); // call ourself with a rect draw.drawRect(r, paintWithShader); } @@ -434,13 +430,12 @@ void SkDraw::drawDevMask(const SkMask& srcM, const SkPaint& paint) const { const SkMask* mask = &srcM; - SkMask dstM; + SkMaskBuilder dstM; if (paint.getMaskFilter() && - as_MFB(paint.getMaskFilter()) - ->filterMask(&dstM, srcM, fMatrixProvider->localToDevice(), nullptr)) { + as_MFB(paint.getMaskFilter())->filterMask(&dstM, srcM, *fCTM, nullptr)) { mask = &dstM; } - SkAutoMaskFreeImage ami(dstM.fImage); + SkAutoMaskFreeImage ami(dstM.image()); SkAutoBlitterChoose blitterChooser(*this, nullptr, paint); SkBlitter* blitter = blitterChooser.get(); @@ -467,31 +462,28 @@ void SkDraw::drawBitmapAsMask(const SkBitmap& bitmap, const SkSamplingOptions& s return; } - SkMatrix ctm = fMatrixProvider->localToDevice(); - if (SkTreatAsSprite(ctm, bitmap.dimensions(), sampling, paint.isAntiAlias())) + if (SkTreatAsSprite(*fCTM, bitmap.dimensions(), sampling, paint.isAntiAlias())) { - int ix = SkScalarRoundToInt(ctm.getTranslateX()); - int iy = SkScalarRoundToInt(ctm.getTranslateY()); + int ix = SkScalarRoundToInt(fCTM->getTranslateX()); + int iy = SkScalarRoundToInt(fCTM->getTranslateY()); SkPixmap pmap; if (!bitmap.peekPixels(&pmap)) { return; } - SkMask mask; - mask.fBounds.setXYWH(ix, iy, pmap.width(), pmap.height()); - mask.fFormat = SkMask::kA8_Format; - mask.fRowBytes = SkToU32(pmap.rowBytes()); - // fImage is typed as writable, but in this case it is used read-only - mask.fImage = (uint8_t*)pmap.addr8(0, 0); + SkMask mask(pmap.addr8(0, 0), + SkIRect::MakeXYWH(ix, iy, pmap.width(), pmap.height()), + SkToU32(pmap.rowBytes()), + SkMask::kA8_Format); this->drawDevMask(mask, paint); } else { // need to xform the bitmap first SkRect r; - SkMask mask; + SkMaskBuilder mask; r.setIWH(bitmap.width(), bitmap.height()); - ctm.mapRect(&r); - r.round(&mask.fBounds); + fCTM->mapRect(&r); + r.round(&mask.bounds()); // set the mask's bounds to the transformed bitmap-bounds, // clipped to the actual device and further limited by the clip bounds @@ -500,13 +492,13 @@ void SkDraw::drawBitmapAsMask(const SkBitmap& bitmap, const SkSamplingOptions& s SkIRect devBounds = fDst.bounds(); devBounds.intersect(fRC->getBounds().makeOutset(1, 1)); // need intersect(l, t, r, b) on irect - if (!mask.fBounds.intersect(devBounds)) { + if (!mask.bounds().intersect(devBounds)) { return; } } - mask.fFormat = SkMask::kA8_Format; - mask.fRowBytes = SkAlign4(mask.fBounds.width()); + mask.format() = SkMask::kA8_Format; + mask.rowBytes() = SkAlign4(mask.fBounds.width()); size_t size = mask.computeImageSize(); if (0 == size) { // the mask is too big to allocated, draw nothing @@ -515,20 +507,20 @@ void SkDraw::drawBitmapAsMask(const SkBitmap& bitmap, const SkSamplingOptions& s // allocate (and clear) our temp buffer to hold the transformed bitmap AutoTMalloc storage(size); - mask.fImage = storage.get(); - memset(mask.fImage, 0, size); + mask.image() = storage.get(); + memset(mask.image(), 0, size); // now draw our bitmap(src) into mask(dst), transformed by the matrix { SkBitmap device; device.installPixels(SkImageInfo::MakeA8(mask.fBounds.width(), mask.fBounds.height()), - mask.fImage, mask.fRowBytes); + mask.image(), mask.fRowBytes); SkCanvas c(device); // need the unclipped top/left for the translate c.translate(-SkIntToScalar(mask.fBounds.fLeft), -SkIntToScalar(mask.fBounds.fTop)); - c.concat(ctm); + c.concat(*fCTM); // We can't call drawBitmap, or we'll infinitely recurse. Instead // we manually build a shader and draw that into our new mask diff --git a/src/core/SkDrawBase.cpp b/src/core/SkDrawBase.cpp index 2aace4361b71..787de81cff35 100644 --- a/src/core/SkDrawBase.cpp +++ b/src/core/SkDrawBase.cpp @@ -31,7 +31,6 @@ #include "src/core/SkDrawProcs.h" #include "src/core/SkMask.h" #include "src/core/SkMaskFilterBase.h" -#include "src/core/SkMatrixProvider.h" #include "src/core/SkPathEffectBase.h" #include "src/core/SkPathPriv.h" #include "src/core/SkRasterClip.h" @@ -58,7 +57,7 @@ bool SkDrawBase::computeConservativeLocalClipBounds(SkRect* localBounds) const { } SkMatrix inverse; - if (!fMatrixProvider->localToDevice().invert(&inverse)) { + if (!fCTM->invert(&inverse)) { return false; } @@ -144,10 +143,12 @@ static SkPoint* rect_points(SkRect& r) { return reinterpret_cast(&r); } -static void draw_rect_as_path(const SkDrawBase& orig, const SkRect& prePaintRect, - const SkPaint& paint, const SkMatrixProvider* matrixProvider) { +static void draw_rect_as_path(const SkDrawBase& orig, + const SkRect& prePaintRect, + const SkPaint& paint, + const SkMatrix& ctm) { SkDrawBase draw(orig); - draw.fMatrixProvider = matrixProvider; + draw.fCTM = &ctm; SkPath tmp; tmp.addRect(prePaintRect); tmp.setFillType(SkPathFillType::kWinding); @@ -163,28 +164,26 @@ void SkDrawBase::drawRect(const SkRect& prePaintRect, const SkPaint& paint, return; } - const SkMatrixProvider* matrixProvider = fMatrixProvider; - SkTLazy preConcatMatrixProvider; + SkTCopyOnFirstWrite matrix(fCTM); if (paintMatrix) { SkASSERT(postPaintRect); - matrixProvider = preConcatMatrixProvider.init(*matrixProvider, *paintMatrix); + matrix.writable()->preConcat(*paintMatrix); } else { SkASSERT(!postPaintRect); } - SkMatrix ctm = fMatrixProvider->localToDevice(); SkPoint strokeSize; - RectType rtype = ComputeRectType(prePaintRect, paint, ctm, &strokeSize); + RectType rtype = ComputeRectType(prePaintRect, paint, *fCTM, &strokeSize); if (kPath_RectType == rtype) { - draw_rect_as_path(*this, prePaintRect, paint, matrixProvider); + draw_rect_as_path(*this, prePaintRect, paint, *matrix); return; } SkRect devRect; const SkRect& paintRect = paintMatrix ? *postPaintRect : prePaintRect; // skip the paintMatrix when transforming the rect by the CTM - ctm.mapPoints(rect_points(devRect), rect_points(paintRect), 2); + fCTM->mapPoints(rect_points(devRect), rect_points(paintRect), 2); devRect.sort(); // look for the quick exit, before we build a blitter @@ -197,7 +196,7 @@ void SkDrawBase::drawRect(const SkRect& prePaintRect, const SkPaint& paint, // For kStroke_RectType, strokeSize is already computed. const SkPoint& ssize = (kStroke_RectType == rtype) ? strokeSize - : compute_stroke_size(paint, ctm); + : compute_stroke_size(paint, *fCTM); bbox.outset(SkScalarHalf(ssize.x()), SkScalarHalf(ssize.y())); } } @@ -206,7 +205,7 @@ void SkDrawBase::drawRect(const SkRect& prePaintRect, const SkPaint& paint, } if (!SkRectPriv::FitsInFixed(bbox) && rtype != kHair_RectType) { - draw_rect_as_path(*this, prePaintRect, paint, matrixProvider); + draw_rect_as_path(*this, prePaintRect, paint, *matrix); return; } @@ -215,7 +214,7 @@ void SkDrawBase::drawRect(const SkRect& prePaintRect, const SkPaint& paint, return; } - SkAutoBlitterChoose blitterStorage(*this, matrixProvider, paint); + SkAutoBlitterChoose blitterStorage(*this, matrix, paint); const SkRasterClip& clip = *fRC; SkBlitter* blitter = blitterStorage.get(); @@ -290,13 +289,12 @@ void SkDrawBase::drawRRect(const SkRRect& rrect, const SkPaint& paint) const { return; } - SkMatrix ctm = fMatrixProvider->localToDevice(); { // TODO: Investigate optimizing these options. They are in the same // order as SkDrawBase::drawPath, which handles each case. It may be // that there is no way to optimize for these using the SkRRect path. SkScalar coverage; - if (SkDrawTreatAsHairline(paint, ctm, &coverage)) { + if (SkDrawTreatAsHairline(paint, *fCTM, &coverage)) { goto DRAW_PATH; } @@ -308,9 +306,9 @@ void SkDrawBase::drawRRect(const SkRRect& rrect, const SkPaint& paint) const { if (paint.getMaskFilter()) { // Transform the rrect into device space. SkRRect devRRect; - if (rrect.transform(ctm, &devRRect)) { + if (rrect.transform(*fCTM, &devRRect)) { SkAutoBlitterChoose blitter(*this, nullptr, paint); - if (as_MFB(paint.getMaskFilter())->filterRRect(devRRect, ctm, *fRC, blitter.get())) { + if (as_MFB(paint.getMaskFilter())->filterRRect(devRRect, *fCTM, *fRC, blitter.get())) { return; // filterRRect() called the blitter, so we're done } } @@ -339,8 +337,7 @@ void SkDrawBase::drawDevPath(const SkPath& devPath, const SkPaint& paint, bool d if (paint.getMaskFilter()) { SkStrokeRec::InitStyle style = doFill ? SkStrokeRec::kFill_InitStyle : SkStrokeRec::kHairline_InitStyle; - if (as_MFB(paint.getMaskFilter()) - ->filterPath(devPath, fMatrixProvider->localToDevice(), *fRC, blitter, style)) { + if (as_MFB(paint.getMaskFilter())->filterPath(devPath, *fCTM, *fRC, blitter, style)) { return; // filterPath() called the blitter, so we're done } } @@ -397,8 +394,7 @@ void SkDrawBase::drawPath(const SkPath& origSrcPath, const SkPaint& origPaint, bool doFill = true; SkPath tmpPathStorage; SkPath* tmpPath = &tmpPathStorage; - const SkMatrixProvider* matrixProvider = fMatrixProvider; - SkTLazy preConcatMatrixProvider; + SkTCopyOnFirstWrite matrix(fCTM); tmpPath->setIsVolatile(true); if (prePathMatrix) { @@ -412,7 +408,7 @@ void SkDrawBase::drawPath(const SkPath& origSrcPath, const SkPaint& origPaint, pathPtr->transform(*prePathMatrix, result); pathPtr = result; } else { - matrixProvider = preConcatMatrixProvider.init(*matrixProvider, *prePathMatrix); + matrix.writable()->preConcat(*prePathMatrix); } } @@ -420,15 +416,14 @@ void SkDrawBase::drawPath(const SkPath& origSrcPath, const SkPaint& origPaint, { SkScalar coverage; - if (SkDrawTreatAsHairline(origPaint, matrixProvider->localToDevice(), &coverage)) { + if (SkDrawTreatAsHairline(origPaint, *matrix, &coverage)) { const auto bm = origPaint.asBlendMode(); if (SK_Scalar1 == coverage) { paint.writable()->setStrokeWidth(0); } else if (bm && SkBlendMode_SupportsCoverageAsAlpha(bm.value())) { U8CPU newAlpha; #if 0 - newAlpha = SkToU8(SkScalarRoundToInt(coverage * - origPaint.getAlpha())); + newAlpha = SkToU8(SkScalarRoundToInt(coverage * origPaint.getAlpha())); #else // this is the old technique, which we preserve for now so // we don't change previous results (testing) @@ -449,8 +444,7 @@ void SkDrawBase::drawPath(const SkPath& origSrcPath, const SkPaint& origPaint, if (this->computeConservativeLocalClipBounds(&cullRect)) { cullRectPtr = &cullRect; } - doFill = skpathutils::FillPathWithPaint(*pathPtr, *paint, tmpPath, cullRectPtr, - fMatrixProvider->localToDevice()); + doFill = skpathutils::FillPathWithPaint(*pathPtr, *paint, tmpPath, cullRectPtr, *fCTM); pathPtr = tmpPath; } @@ -458,7 +452,7 @@ void SkDrawBase::drawPath(const SkPath& origSrcPath, const SkPaint& origPaint, SkPath* devPathPtr = pathIsMutable ? pathPtr : tmpPath; // transform the path into device space - pathPtr->transform(matrixProvider->localToDevice(), devPathPtr); + pathPtr->transform(*matrix, devPathPtr); #if defined(SK_BUILD_FOR_FUZZER) if (devPathPtr->countPoints() > 1000) { @@ -482,8 +476,8 @@ void SkDrawBase::drawBitmap(const SkBitmap&, const SkMatrix&, const SkRect*, #ifdef SK_DEBUG void SkDrawBase::validate() const { - SkASSERT(fMatrixProvider != nullptr); - SkASSERT(fRC != nullptr); + SkASSERT(fCTM != nullptr); + SkASSERT(fRC != nullptr); const SkIRect& cr = fRC->getBounds(); SkIRect br; @@ -506,10 +500,8 @@ bool SkDrawBase::ComputeMaskBounds(const SkRect& devPathBounds, const SkIRect& c if (filter) { SkASSERT(filterMatrix); - SkMask srcM, dstM; - - srcM.fBounds = *bounds; - srcM.fFormat = SkMask::kA8_Format; + SkMask srcM(nullptr, *bounds, 0, SkMask::kA8_Format); + SkMaskBuilder dstM; if (!as_MFB(filter)->filterMask(&dstM, srcM, *filterMatrix, &margin)) { return false; } @@ -547,9 +539,8 @@ static void draw_into_mask(const SkMask& mask, const SkPath& devPath, matrix.setTranslate(-SkIntToScalar(mask.fBounds.fLeft), -SkIntToScalar(mask.fBounds.fTop)); - SkMatrixProvider matrixProvider(matrix); - draw.fRC = &clip; - draw.fMatrixProvider = &matrixProvider; + draw.fRC = &clip; + draw.fCTM = &matrix; paint.setAntiAlias(true); switch (style) { case SkStrokeRec::kHairline_InitStyle: @@ -566,13 +557,13 @@ static void draw_into_mask(const SkMask& mask, const SkPath& devPath, bool SkDrawBase::DrawToMask(const SkPath& devPath, const SkIRect& clipBounds, const SkMaskFilter* filter, const SkMatrix* filterMatrix, - SkMask* mask, SkMask::CreateMode mode, + SkMaskBuilder* dst, SkMaskBuilder::CreateMode mode, SkStrokeRec::InitStyle style) { if (devPath.isEmpty()) { return false; } - if (SkMask::kJustRenderImage_CreateMode != mode) { + if (SkMaskBuilder::kJustRenderImage_CreateMode != mode) { // By using infinite bounds for inverse fills, ComputeMaskBounds is able to clip it to // 'clipBounds' outset by whatever extra margin the mask filter requires. static const SkRect kInverseBounds = { SK_ScalarNegativeInfinity, SK_ScalarNegativeInfinity, @@ -580,23 +571,23 @@ bool SkDrawBase::DrawToMask(const SkPath& devPath, const SkIRect& clipBounds, SkRect pathBounds = devPath.isInverseFillType() ? kInverseBounds : devPath.getBounds(); if (!ComputeMaskBounds(pathBounds, clipBounds, filter, - filterMatrix, &mask->fBounds)) + filterMatrix, &dst->bounds())) return false; } - if (SkMask::kComputeBoundsAndRenderImage_CreateMode == mode) { - mask->fFormat = SkMask::kA8_Format; - mask->fRowBytes = mask->fBounds.width(); - size_t size = mask->computeImageSize(); + if (SkMaskBuilder::kComputeBoundsAndRenderImage_CreateMode == mode) { + dst->format() = SkMask::kA8_Format; + dst->rowBytes() = dst->fBounds.width(); + size_t size = dst->computeImageSize(); if (0 == size) { // we're too big to allocate the mask, abort return false; } - mask->fImage = SkMask::AllocImage(size, SkMask::kZeroInit_Alloc); + dst->image() = SkMaskBuilder::AllocImage(size, SkMaskBuilder::kZeroInit_Alloc); } - if (SkMask::kJustComputeBounds_CreateMode != mode) { - draw_into_mask(*mask, devPath, style); + if (SkMaskBuilder::kJustComputeBounds_CreateMode != mode) { + draw_into_mask(*dst, devPath, style); } return true; @@ -623,7 +614,6 @@ void SkDrawBase::drawDevicePoints(SkCanvas::PointMode mode, size_t count, return; } - SkMatrix ctm = fMatrixProvider->localToDevice(); switch (mode) { case SkCanvas::kPoints_PointMode: { // temporarily mark the paint as filling. @@ -681,7 +671,7 @@ void SkDrawBase::drawDevicePoints(SkCanvas::PointMode mode, size_t count, SkRect cullRect = SkRect::Make(fRC->getBounds()); - if (as_PEB(paint.getPathEffect())->asPoints(&pointData, path, stroke, ctm, + if (as_PEB(paint.getPathEffect())->asPoints(&pointData, path, stroke, *fCTM, &cullRect)) { // 'asPoints' managed to find some fast path diff --git a/src/core/SkDrawBase.h b/src/core/SkDrawBase.h index 62d0e86628eb..5e9f5199da76 100644 --- a/src/core/SkDrawBase.h +++ b/src/core/SkDrawBase.h @@ -14,7 +14,6 @@ #include "include/core/SkRefCnt.h" #include "include/core/SkSamplingOptions.h" #include "include/core/SkStrokeRec.h" -#include "include/private/base/SkAttributes.h" #include "src/base/SkZip.h" #include "src/core/SkGlyphRunPainter.h" #include "src/core/SkMask.h" @@ -27,7 +26,6 @@ class SkBlitter; class SkGlyph; class SkMaskFilter; class SkMatrix; -class SkMatrixProvider; class SkPath; class SkRRect; class SkRasterClip; @@ -89,7 +87,7 @@ class SkDrawBase : public SkGlyphRunListPainterCPU::BitmapDevicePainter { */ static bool DrawToMask(const SkPath& devPath, const SkIRect& clipBounds, const SkMaskFilter*, const SkMatrix* filterMatrix, - SkMask* mask, SkMask::CreateMode mode, + SkMaskBuilder* dst, SkMaskBuilder::CreateMode mode, SkStrokeRec::InitStyle style); enum RectType { @@ -147,12 +145,12 @@ class SkDrawBase : public SkGlyphRunListPainterCPU::BitmapDevicePainter { * If the matrix cannot be inverted, or the current clip is empty, return * false and ignore bounds parameter. */ - bool SK_WARN_UNUSED_RESULT computeConservativeLocalClipBounds(SkRect* bounds) const; + [[nodiscard]] bool computeConservativeLocalClipBounds(SkRect* bounds) const; public: SkPixmap fDst; BlitterChooser* fBlitterChooser{nullptr}; // required - const SkMatrixProvider* fMatrixProvider{nullptr}; // required + const SkMatrix* fCTM{nullptr}; // required const SkRasterClip* fRC{nullptr}; // required const SkSurfaceProps* fProps{nullptr}; // optional diff --git a/src/core/SkDraw_atlas.cpp b/src/core/SkDraw_atlas.cpp index 0fd201b250b6..fe8ccdaf6760 100644 --- a/src/core/SkDraw_atlas.cpp +++ b/src/core/SkDraw_atlas.cpp @@ -6,7 +6,6 @@ */ #include "include/core/SkAlphaType.h" -#include "include/core/SkBlender.h" #include "include/core/SkColor.h" #include "include/core/SkMaskFilter.h" #include "include/core/SkMatrix.h" @@ -28,30 +27,22 @@ #include "src/core/SkCoreBlitters.h" #include "src/core/SkDraw.h" #include "src/core/SkEffectPriv.h" -#include "src/core/SkMatrixProvider.h" #include "src/core/SkRasterClip.h" #include "src/core/SkRasterPipeline.h" #include "src/core/SkRasterPipelineOpContexts.h" #include "src/core/SkRasterPipelineOpList.h" #include "src/core/SkScan.h" #include "src/core/SkSurfacePriv.h" -#include "src/core/SkVMBlitter.h" -#include "src/shaders/SkColorShader.h" #include "src/shaders/SkShaderBase.h" #include "src/shaders/SkTransformShader.h" #include #include -#include +class SkBlender; class SkBlitter; enum class SkBlendMode; -#if defined(SK_ENABLE_SKVM) -#include "src/core/SkVM.h" -class SkColorInfo; -#endif - static void fill_rect(const SkMatrix& ctm, const SkRasterClip& rc, const SkRect& r, SkBlitter* blitter, SkPath* scratchPath) { if (ctm.rectStaysRect()) { @@ -96,102 +87,61 @@ void SkDraw::drawAtlas(const SkRSXform xform[], p.setShader(nullptr); p.setMaskFilter(nullptr); - const SkMatrix& ctm = fMatrixProvider->localToDevice(); - // The RSXForms can't contain perspective - only the CTM cab. - const bool perspective = ctm.hasPerspective(); + // The RSXForms can't contain perspective - only the CTM can. + const bool perspective = fCTM->hasPerspective(); auto transformShader = alloc.make(*as_SB(atlasShader), perspective); - auto rpblit = [&]() { - SkRasterPipeline pipeline(&alloc); - SkSurfaceProps props = SkSurfacePropsCopyOrDefault(fProps); - SkStageRec rec = { - &pipeline, &alloc, fDst.colorType(), fDst.colorSpace(), p.getColor4f(), props}; - // We pass an identity matrix here rather than the CTM. The CTM gets folded into the - // per-triangle matrix. - if (!as_SB(transformShader)->appendRootStages(rec, SkMatrix::I())) { - return false; - } - - SkRasterPipeline_UniformColorCtx* uniformCtx = nullptr; - SkColorSpaceXformSteps steps( - sk_srgb_singleton(), kUnpremul_SkAlphaType, rec.fDstCS, kUnpremul_SkAlphaType); + SkRasterPipeline pipeline(&alloc); + SkSurfaceProps props = SkSurfacePropsCopyOrDefault(fProps); + SkStageRec rec = {&pipeline, &alloc, fDst.colorType(), fDst.colorSpace(), + p.getColor4f(), props}; + // We pass an identity matrix here rather than the CTM. The CTM gets folded into the + // per-triangle matrix. + if (!as_SB(transformShader)->appendRootStages(rec, SkMatrix::I())) { + return; + } - if (colors) { - // we will late-bind the values in ctx, once for each color in the loop - uniformCtx = alloc.make(); - rec.fPipeline->append(SkRasterPipelineOp::uniform_color_dst, uniformCtx); - if (std::optional bm = as_BB(blender)->asBlendMode(); bm.has_value()) { - SkBlendMode_AppendStages(*bm, rec.fPipeline); - } else { - return false; - } + SkRasterPipeline_UniformColorCtx* uniformCtx = nullptr; + SkColorSpaceXformSteps steps(sk_srgb_singleton(), kUnpremul_SkAlphaType, + rec.fDstCS, kUnpremul_SkAlphaType); + if (colors) { + // we will late-bind the values in ctx, once for each color in the loop + uniformCtx = alloc.make(); + rec.fPipeline->append(SkRasterPipelineOp::uniform_color_dst, uniformCtx); + std::optional bm = as_BB(blender)->asBlendMode(); + if (!bm.has_value()) { + return; } + SkBlendMode_AppendStages(*bm, rec.fPipeline); + } - bool isOpaque = !colors && transformShader->isOpaque(); - if (p.getAlphaf() != 1) { - rec.fPipeline->append(SkRasterPipelineOp::scale_1_float, - alloc.make(p.getAlphaf())); - isOpaque = false; - } + bool isOpaque = !colors && transformShader->isOpaque(); + if (p.getAlphaf() != 1) { + rec.fPipeline->append(SkRasterPipelineOp::scale_1_float, alloc.make(p.getAlphaf())); + isOpaque = false; + } - auto blitter = SkCreateRasterPipelineBlitter( - fDst, p, pipeline, isOpaque, &alloc, fRC->clipShader()); - if (!blitter) { - return false; - } - SkPath scratchPath; - - for (int i = 0; i < count; ++i) { - if (colors) { - SkColor4f c4 = SkColor4f::FromColor(colors[i]); - steps.apply(c4.vec()); - load_color(uniformCtx, c4.premul().vec()); - } - - SkMatrix mx; - mx.setRSXform(xform[i]); - mx.preTranslate(-textures[i].fLeft, -textures[i].fTop); - mx.postConcat(ctm); - if (transformShader->update(mx)) { - fill_rect(mx, *fRC, textures[i], blitter, &scratchPath); - } - } - return true; - }; + auto blitter = SkCreateRasterPipelineBlitter(fDst, p, pipeline, isOpaque, &alloc, + fRC->clipShader()); + if (!blitter) { + return; + } + SkPath scratchPath; - if (!rpblit()) { - SkUpdatableColorShader* colorShader = nullptr; - sk_sp shader; + for (int i = 0; i < count; ++i) { if (colors) { - colorShader = alloc.make(fDst.colorSpace()); - shader = SkShaders::Blend(std::move(blender), - sk_ref_sp(colorShader), - sk_ref_sp(transformShader)); - } else { - shader = sk_ref_sp(transformShader); + SkColor4f c4 = SkColor4f::FromColor(colors[i]); + steps.apply(c4.vec()); + load_color(uniformCtx, c4.premul().vec()); } - p.setShader(std::move(shader)); - // We use identity here and fold the CTM into the update matrix. - if (auto blitter = SkVMBlitter::Make(fDst, - p, - SkMatrix::I(), - &alloc, - fRC->clipShader())) { - SkPath scratchPath; - for (int i = 0; i < count; ++i) { - if (colorShader) { - colorShader->updateColor(colors[i]); - } - - SkMatrix mx; - mx.setRSXform(xform[i]); - mx.preTranslate(-textures[i].fLeft, -textures[i].fTop); - mx.postConcat(ctm); - if (transformShader->update(mx)) { - fill_rect(mx, *fRC, textures[i], blitter, &scratchPath); - } - } + + SkMatrix mx; + mx.setRSXform(xform[i]); + mx.preTranslate(-textures[i].fLeft, -textures[i].fTop); + mx.postConcat(*fCTM); + if (transformShader->update(mx)) { + fill_rect(mx, *fRC, textures[i], blitter, &scratchPath); } } } diff --git a/src/core/SkDraw_text.cpp b/src/core/SkDraw_text.cpp index 0263eed15ed3..563b9165c415 100644 --- a/src/core/SkDraw_text.cpp +++ b/src/core/SkDraw_text.cpp @@ -20,7 +20,6 @@ #include "src/core/SkGlyph.h" #include "src/core/SkGlyphRunPainter.h" #include "src/core/SkMask.h" -#include "src/core/SkMatrixProvider.h" #include "src/core/SkRasterClip.h" #include "src/core/SkSurfacePriv.h" @@ -54,7 +53,7 @@ void SkDraw::paintMasks(SkZip accepted, const SkPaint& // The size used for a typical blitter. SkSTArenaAlloc<3308> alloc; SkBlitter* blitter = SkBlitter::Choose(fDst, - fMatrixProvider->localToDevice(), + *fCTM, paint, &alloc, false, @@ -77,8 +76,9 @@ void SkDraw::paintMasks(SkZip accepted, const SkPaint& if (SkMask::kARGB32_Format == mask.fFormat) { SkBitmap bm; bm.installPixels(SkImageInfo::MakeN32Premul(mask.fBounds.size()), - mask.fImage, + const_cast(mask.fImage), mask.fRowBytes); + bm.setImmutable(); this->drawSprite(bm, mask.fBounds.x(), mask.fBounds.y(), paint); } else { const SkIRect& cr = clipper.rect(); @@ -111,8 +111,9 @@ void SkDraw::paintMasks(SkZip accepted, const SkPaint& if (SkMask::kARGB32_Format == mask.fFormat) { SkBitmap bm; bm.installPixels(SkImageInfo::MakeN32Premul(mask.fBounds.size()), - mask.fImage, + const_cast(mask.fImage), mask.fRowBytes); + bm.setImmutable(); this->drawSprite(bm, mask.fBounds.x(), mask.fBounds.y(), paint); } else { blitter->blitMask(mask, *bounds); @@ -133,8 +134,7 @@ void SkDraw::drawGlyphRunList(SkCanvas* canvas, return; } - glyphPainter->drawForBitmapDevice(canvas, this, glyphRunList, paint, - fMatrixProvider->localToDevice()); + glyphPainter->drawForBitmapDevice(canvas, this, glyphRunList, paint, *fCTM); } #if defined _WIN32 diff --git a/src/core/SkDraw_vertices.cpp b/src/core/SkDraw_vertices.cpp index 4e48f65f3401..7ea9aa5bf9a5 100644 --- a/src/core/SkDraw_vertices.cpp +++ b/src/core/SkDraw_vertices.cpp @@ -28,16 +28,13 @@ #include "include/private/base/SkFloatingPoint.h" #include "include/private/base/SkTo.h" #include "src/base/SkArenaAlloc.h" -#include "src/base/SkTLazy.h" #include "src/core/SkBlenderBase.h" #include "src/core/SkConvertPixels.h" #include "src/core/SkCoreBlitters.h" #include "src/core/SkDraw.h" -#include "src/core/SkMatrixProvider.h" #include "src/core/SkRasterClip.h" #include "src/core/SkScan.h" #include "src/core/SkSurfacePriv.h" -#include "src/core/SkVMBlitter.h" #include "src/core/SkVertState.h" #include "src/core/SkVerticesPriv.h" #include "src/shaders/SkShaderBase.h" @@ -51,13 +48,8 @@ class SkBlitter; -#if defined(SK_ENABLE_SKVM) -#include "src/core/SkVM.h" -#endif - -static bool SK_WARN_UNUSED_RESULT -texture_to_matrix(const VertState& state, const SkPoint verts[], const SkPoint texs[], - SkMatrix* matrix) { +[[nodiscard]] static bool texture_to_matrix(const VertState& state, const SkPoint verts[], + const SkPoint texs[], SkMatrix* matrix) { SkPoint src[3], dst[3]; src[0] = texs[state.f0]; @@ -239,9 +231,8 @@ void SkDraw::drawFixedVertices(const SkVertices* vertices, // There is a paintShader iff there is texCoords. SkASSERT((texCoords != nullptr) == (paintShader != nullptr)); - SkMatrix ctm = fMatrixProvider->localToDevice(); // Explicit texture coords can't contain perspective - only the CTM can. - const bool usePerspective = ctm.hasPerspective(); + const bool usePerspective = fCTM->hasPerspective(); SkTriColorShader* triColorShader = nullptr; SkPMColor4f* dstColors = nullptr; @@ -275,73 +266,41 @@ void SkDraw::drawFixedVertices(const SkVertices* vertices, // If there are separate texture coords then we need to insert a transform shader to update // a matrix derived from each triangle's coords. In that case we will fold the CTM into - // each update and use an identity matrix provider. + // each update and use an identity matrix. SkTransformShader* transformShader = nullptr; - const SkMatrixProvider* matrixProvider = fMatrixProvider; - SkTLazy identityProvider; + const SkMatrix* ctm = fCTM; if (texCoords && texCoords != positions) { paintShader = transformShader = outerAlloc->make(*as_SB(paintShader), usePerspective); - matrixProvider = identityProvider.init(SkMatrix::I()); + ctm = &SkMatrix::I(); } sk_sp blenderShader = applyShaderColorBlend(paintShader); SkPaint finalPaint{paint}; finalPaint.setShader(std::move(blenderShader)); - auto rpblit = [&]() { - VertState state(vertexCount, indices, indexCount); - VertState::Proc vertProc = state.chooseProc(info.mode()); - SkSurfaceProps props = SkSurfacePropsCopyOrDefault(fProps); - - auto blitter = SkCreateRasterPipelineBlitter(fDst, - finalPaint, - matrixProvider->localToDevice(), - outerAlloc, - fRC->clipShader(), - props); - if (!blitter) { - return false; - } - while (vertProc(&state)) { - if (triColorShader && !triColorShader->update(ctmInverse, positions, dstColors, - state.f0, state.f1, state.f2)) { - continue; - } - - SkMatrix localM; - if (!transformShader || (texture_to_matrix(state, positions, texCoords, &localM) && - transformShader->update(SkMatrix::Concat(ctm, localM)))) { - fill_triangle(state, blitter, *fRC, dev2, dev3); - } - } - return true; - }; - - if (!rpblit()) { - VertState state(vertexCount, indices, indexCount); - VertState::Proc vertProc = state.chooseProc(info.mode()); - - auto blitter = SkVMBlitter::Make(fDst, - finalPaint, - matrixProvider->localToDevice(), - outerAlloc, - this->fRC->clipShader()); - if (!blitter) { - return; + VertState state(vertexCount, indices, indexCount); + VertState::Proc vertProc = state.chooseProc(info.mode()); + SkSurfaceProps props = SkSurfacePropsCopyOrDefault(fProps); + + auto blitter = SkCreateRasterPipelineBlitter(fDst, + finalPaint, + *ctm, + outerAlloc, + fRC->clipShader(), + props); + if (!blitter) { + return; + } + while (vertProc(&state)) { + if (triColorShader && !triColorShader->update(ctmInverse, positions, dstColors, + state.f0, state.f1, state.f2)) { + continue; } - while (vertProc(&state)) { - SkMatrix localM; - if (transformShader && !(texture_to_matrix(state, positions, texCoords, &localM) && - transformShader->update(SkMatrix::Concat(ctm, localM)))) { - continue; - } - - if (triColorShader && !triColorShader->update(ctmInverse, positions, dstColors,state.f0, - state.f1, state.f2)) { - continue; - } + SkMatrix localM; + if (!transformShader || (texture_to_matrix(state, positions, texCoords, &localM) && + transformShader->update(SkMatrix::Concat(*fCTM, localM)))) { fill_triangle(state, blitter, *fRC, dev2, dev3); } } @@ -359,9 +318,8 @@ void SkDraw::drawVertices(const SkVertices* vertices, if (vertexCount < 3 || (indexCount > 0 && indexCount < 3) || fRC->isEmpty()) { return; } - SkMatrix ctm = fMatrixProvider->localToDevice(); SkMatrix ctmInv; - if (!ctm.invert(&ctmInv)) { + if (!fCTM->invert(&ctmInv)) { return; } @@ -373,16 +331,16 @@ void SkDraw::drawVertices(const SkVertices* vertices, SkPoint* dev2 = nullptr; SkPoint3* dev3 = nullptr; - if (ctm.hasPerspective()) { + if (fCTM->hasPerspective()) { dev3 = outerAlloc.makeArray(vertexCount); - ctm.mapHomogeneousPoints(dev3, info.positions(), vertexCount); + fCTM->mapHomogeneousPoints(dev3, info.positions(), vertexCount); // similar to the bounds check for 2d points (below) if (!SkScalarsAreFinite((const SkScalar*)dev3, vertexCount * 3)) { return; } } else { dev2 = outerAlloc.makeArray(vertexCount); - ctm.mapPoints(dev2, info.positions(), vertexCount); + fCTM->mapPoints(dev2, info.positions(), vertexCount); SkRect bounds; // this also sets bounds to empty if we see a non-finite value diff --git a/src/core/SkDrawable.cpp b/src/core/SkDrawable.cpp index 6bbf7d13eb38..b0763ca1a31e 100644 --- a/src/core/SkDrawable.cpp +++ b/src/core/SkDrawable.cpp @@ -9,6 +9,7 @@ #include "include/core/SkCanvas.h" #include "include/core/SkMatrix.h" #include "include/core/SkPaint.h" +#include "include/core/SkPicture.h" // IWYU pragma: keep #include "include/core/SkPictureRecorder.h" #include "include/core/SkRect.h" #include "include/core/SkRefCnt.h" @@ -18,8 +19,6 @@ #include #include -class SkPicture; - static int32_t next_generation_id() { static std::atomic nextID{1}; diff --git a/src/core/SkFilterColorProgram.cpp b/src/core/SkFilterColorProgram.cpp deleted file mode 100644 index c15444e24fcc..000000000000 --- a/src/core/SkFilterColorProgram.cpp +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#include "src/core/SkFilterColorProgram.h" - -#include "include/core/SkColorFilter.h" -#include "include/effects/SkRuntimeEffect.h" -#include "src/core/SkVM.h" -#include "src/sksl/SkSLAnalysis.h" -#include "src/sksl/analysis/SkSLProgramUsage.h" -#include "src/sksl/codegen/SkSLVMCodeGenerator.h" -#include "src/sksl/ir/SkSLProgram.h" - -using namespace skia_private; - -#if defined(SK_ENABLE_SKSL) && defined(SK_ENABLE_SKVM) - -std::unique_ptr SkFilterColorProgram::Make(const SkRuntimeEffect* effect) { - // Our per-effect program technique is only possible (and necessary) for color filters - if (!effect->allowColorFilter()) { - return nullptr; - } - - // TODO(skia:10479): Can we support this? When the color filter is invoked like this, there - // may not be a real working space? If there is, we'd need to add it as a parameter to eval, - // and then coordinate where the relevant uniforms go. For now, just fall back to the slow - // path if we see these intrinsics being called. - if (effect->usesColorTransform()) { - return nullptr; - } - - // We require that any children are color filters (not shaders or blenders). In theory, we could - // detect the coords being passed to shader children, and replicate those calls, but that's very - // complicated, and has diminishing returns. (eg, for table lookup color filters). - if (!std::all_of(effect->fChildren.begin(), - effect->fChildren.end(), - [](const SkRuntimeEffect::Child& c) { - return c.type == SkRuntimeEffect::ChildType::kColorFilter; - })) { - return nullptr; - } - - skvm::Builder p; - - // For SkSL uniforms, we reserve space and allocate skvm Uniform ids for each one. When we run - // the program, these ids will be loads from the *first* arg ptr, the uniform data of the - // specific color filter instance. - skvm::Uniforms skslUniforms{p.uniform(), 0}; - const size_t uniformCount = effect->uniformSize() / 4; - std::vector uniform; - uniform.reserve(uniformCount); - for (size_t i = 0; i < uniformCount; i++) { - uniform.push_back(p.uniform32(skslUniforms.push(/*placeholder*/ 0)).id); - } - - // We reserve a uniform color for each child invocation. While processing the SkSL, we record - // the index of the child, and the color being filtered (in a SampleCall struct). - // When we run this program later, we use the SampleCall to evaluate the correct child, and - // populate these uniform values. These Uniform ids are loads from the *second* arg ptr. - // If the color being passed is too complex for us to describe and re-create using SampleCall, - // we are unable to use this per-effect program, and callers will need to fall back to another - // (slower) implementation. - skvm::Uniforms childColorUniforms{p.uniform(), 0}; - skvm::Color inputColor = p.uniformColor(/*placeholder*/ SkColors::kWhite, &childColorUniforms); - std::vector sampleCalls; - - class Callbacks : public SkSL::SkVMCallbacks { - public: - Callbacks(skvm::Builder* builder, - const skvm::Uniforms* skslUniforms, - skvm::Uniforms* childColorUniforms, - skvm::Color inputColor, - std::vector* sampleCalls) - : fBuilder(builder) - , fSkslUniforms(skslUniforms) - , fChildColorUniforms(childColorUniforms) - , fInputColor(inputColor) - , fSampleCalls(sampleCalls) {} - - bool isSimpleUniform(skvm::Color c, int* baseOffset) { - skvm::Uniform ur, ug, ub, ua; - if (!fBuilder->allUniform(c.r.id, &ur, c.g.id, &ug, c.b.id, &ub, c.a.id, &ua)) { - return false; - } - skvm::Ptr uniPtr = fSkslUniforms->base; - if (ur.ptr != uniPtr || ug.ptr != uniPtr || ub.ptr != uniPtr || ua.ptr != uniPtr) { - return false; - } - *baseOffset = ur.offset; - return ug.offset == ur.offset + 4 && - ub.offset == ur.offset + 8 && - ua.offset == ur.offset + 12; - } - - static bool IDsEqual(skvm::Color x, skvm::Color y) { - return x.r.id == y.r.id && x.g.id == y.g.id && x.b.id == y.b.id && x.a.id == y.a.id; - } - - skvm::Color sampleColorFilter(int ix, skvm::Color c) override { - skvm::Color result = - fBuilder->uniformColor(/*placeholder*/ SkColors::kWhite, fChildColorUniforms); - SkFilterColorProgram::SampleCall call; - call.fChild = ix; - if (IDsEqual(c, fInputColor)) { - call.fKind = SkFilterColorProgram::SampleCall::Kind::kInputColor; - } else if (fBuilder->allImm(c.r.id, &call.fImm.fR, - c.g.id, &call.fImm.fG, - c.b.id, &call.fImm.fB, - c.a.id, &call.fImm.fA)) { - call.fKind = SkFilterColorProgram::SampleCall::Kind::kImmediate; - } else if (auto it = std::find_if(fChildColors.begin(), - fChildColors.end(), - [&](skvm::Color x) { return IDsEqual(x, c); }); - it != fChildColors.end()) { - call.fKind = SkFilterColorProgram::SampleCall::Kind::kPrevious; - call.fPrevious = SkTo(it - fChildColors.begin()); - } else if (isSimpleUniform(c, &call.fOffset)) { - call.fKind = SkFilterColorProgram::SampleCall::Kind::kUniform; - } else { - fAllSampleCallsSupported = false; - } - fSampleCalls->push_back(call); - fChildColors.push_back(result); - return result; - } - - // We did an early return from this function if we saw any child that wasn't a shader, so - // it should be impossible for either of these callbacks to occur: - skvm::Color sampleShader(int, skvm::Coord) override { - SkDEBUGFAIL("Unexpected child type"); - return {}; - } - skvm::Color sampleBlender(int, skvm::Color, skvm::Color) override { - SkDEBUGFAIL("Unexpected child type"); - return {}; - } - - // We did an early return from this function if we saw any call to these intrinsics, so it - // should be impossible for either of these callbacks to occur: - skvm::Color toLinearSrgb(skvm::Color color) override { - SkDEBUGFAIL("Unexpected color transform intrinsic"); - return {}; - } - skvm::Color fromLinearSrgb(skvm::Color color) override { - SkDEBUGFAIL("Unexpected color transform intrinsic"); - return {}; - } - - skvm::Builder* fBuilder; - const skvm::Uniforms* fSkslUniforms; - skvm::Uniforms* fChildColorUniforms; - skvm::Color fInputColor; - std::vector* fSampleCalls; - - std::vector fChildColors; - bool fAllSampleCallsSupported = true; - }; - Callbacks callbacks(&p, &skslUniforms, &childColorUniforms, inputColor, &sampleCalls); - - // Emit the skvm instructions for the SkSL - skvm::Coord zeroCoord = {p.splat(0.0f), p.splat(0.0f)}; - skvm::Color result = SkSL::ProgramToSkVM(*effect->fBaseProgram, - effect->fMain, - &p, - /*debugTrace=*/nullptr, - SkSpan(uniform), - /*device=*/zeroCoord, - /*local=*/zeroCoord, - inputColor, - inputColor, - &callbacks); - - // Then store the result to the *third* arg ptr - p.store({skvm::PixelFormat::FLOAT, 32, 32, 32, 32, 0, 32, 64, 96}, - p.varying(), result); - - if (!callbacks.fAllSampleCallsSupported) { - return nullptr; - } - - // We'll use this program to filter one color at a time, don't bother with jit - return std::unique_ptr( - new SkFilterColorProgram(p.done(/*debug_name=*/nullptr, /*allow_jit=*/false), - std::move(sampleCalls))); -} - -SkFilterColorProgram::SkFilterColorProgram(skvm::Program program, - std::vector sampleCalls) - : fProgram(std::move(program)) - , fSampleCalls(std::move(sampleCalls)) {} - -SkPMColor4f SkFilterColorProgram::eval( - const SkPMColor4f& inColor, - const void* uniformData, - std::function evalChild) const { - // Our program defines sampling any child as returning a uniform color. Assemble a buffer - // containing those colors. The first entry is always the input color. Subsequent entries - // are for each sample call, based on the information in fSampleCalls. For any null children, - // the sample result is just the passed-in color. - STArray<4, SkPMColor4f, true> childColors; - childColors.push_back(inColor); - for (const auto& s : fSampleCalls) { - SkPMColor4f passedColor = inColor; - switch (s.fKind) { - case SampleCall::Kind::kInputColor: break; - case SampleCall::Kind::kImmediate: passedColor = s.fImm; break; - case SampleCall::Kind::kPrevious: passedColor = childColors[s.fPrevious + 1]; break; - case SampleCall::Kind::kUniform: - passedColor = *SkTAddOffset(uniformData, s.fOffset); - break; - } - childColors.push_back(evalChild(s.fChild, passedColor)); - } - - SkPMColor4f result; - fProgram.eval(1, uniformData, childColors.begin(), result.vec()); - return result; -} - -#endif // defined(SK_ENABLE_SKSL) && defined(SK_ENABLE_SKVM) diff --git a/src/core/SkFilterColorProgram.h b/src/core/SkFilterColorProgram.h deleted file mode 100644 index 5871b1390d16..000000000000 --- a/src/core/SkFilterColorProgram.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#ifndef SkFilterColorProgram_DEFINED -#define SkFilterColorProgram_DEFINED - -#include "include/private/SkColorData.h" -#include "src/core/SkVM.h" - -#include -#include -#include - -class SkRuntimeEffect; - -#if defined(SK_ENABLE_SKSL) -#if defined(SK_ENABLE_SKVM) - -/** - * Runtime effects are often long lived & cached. Individual color filters or FPs created from them - * and are often short-lived. However, color filters and FPs may need to operate on a single color - * (on the CPU). This may be done at the paint level (eg, filter the paint color), or as part of - * FP tree analysis. - * - * SkFilterColorProgram is an skvm program representing a (color filter) SkRuntimeEffect. It can - * process a single color, without knowing the details of a particular instance (uniform values or - * children). - */ -class SkFilterColorProgram { -public: - static std::unique_ptr Make(const SkRuntimeEffect* effect); - - SkPMColor4f eval(const SkPMColor4f& inColor, - const void* uniformData, - std::function evalChild) const; - -private: - struct SampleCall { - enum class Kind { - kInputColor, // eg child.eval(inputColor) - kImmediate, // eg child.eval(half4(1)) - kPrevious, // eg child1.eval(child2.eval(...)) - kUniform, // eg uniform half4 color; ... child.eval(color) - }; - - int fChild; - Kind fKind; - union { - SkPMColor4f fImm; // for kImmediate - int fPrevious; // for kPrevious - int fOffset; // for kUniform - }; - }; - - SkFilterColorProgram(skvm::Program program, std::vector sampleCalls); - - skvm::Program fProgram; - std::vector fSampleCalls; -}; - -#else // !defined(SK_ENABLE_SKVM) - -// SkRP does not use SkFilterColorProgram; this stub implementation can be removed post-SkVM. -class SkFilterColorProgram { -public: - static std::unique_ptr Make(const SkRuntimeEffect*) { return nullptr; } -}; - -#endif // SK_ENABLE_SKVM -#endif // SK_ENABLE_SKSL -#endif // SkFilterColorProgram_DEFINED diff --git a/src/core/SkFont.cpp b/src/core/SkFont.cpp index 60d9a811c8ea..5d93e21ae257 100644 --- a/src/core/SkFont.cpp +++ b/src/core/SkFont.cpp @@ -468,7 +468,7 @@ void SkFontPriv::GlyphsToUnichars(const SkFont& font, const SkGlyphID glyphs[], auto typeface = font.getTypefaceOrDefault(); const unsigned numGlyphsInTypeface = typeface->countGlyphs(); - AutoTArray unichars(numGlyphsInTypeface); + AutoTArray unichars(static_cast(numGlyphsInTypeface)); typeface->getGlyphToUnicodeMap(unichars.get()); for (int i = 0; i < count; ++i) { diff --git a/src/core/SkFontDescriptor.cpp b/src/core/SkFontDescriptor.cpp index 7c82e19918c0..d9d3fc23f84d 100644 --- a/src/core/SkFontDescriptor.cpp +++ b/src/core/SkFontDescriptor.cpp @@ -35,7 +35,7 @@ enum { SkFontDescriptor::SkFontDescriptor() { } -static bool SK_WARN_UNUSED_RESULT read_string(SkStream* stream, SkString* string) { +[[nodiscard]] static bool read_string(SkStream* stream, SkString* string) { size_t length; if (!stream->readPackedUInt(&length)) { return false; } if (length > 0) { @@ -65,7 +65,7 @@ static bool write_scalar(SkWStream* stream, SkScalar n, uint32_t id) { stream->writeScalar(n); } -static size_t SK_WARN_UNUSED_RESULT read_id(SkStream* stream) { +[[nodiscard]] static size_t read_id(SkStream* stream) { size_t i; if (!stream->readPackedUInt(&i)) { return kInvalid; } return i; diff --git a/src/core/SkFontMgr.cpp b/src/core/SkFontMgr.cpp index 02154c9fd47e..7db5e18eb46d 100644 --- a/src/core/SkFontMgr.cpp +++ b/src/core/SkFontMgr.cpp @@ -8,7 +8,6 @@ #include "include/core/SkFontMgr.h" #include "include/core/SkStream.h" #include "include/core/SkTypes.h" -#include "include/private/base/SkOnce.h" #include "src/core/SkFontDescriptor.h" class SkFontStyle; @@ -149,23 +148,20 @@ sk_sp SkFontMgr::legacyMakeTypeface(const char familyName[], SkFontS } sk_sp SkFontMgr::RefEmpty() { - static SkEmptyFontMgr singleton; - return sk_ref_sp(&singleton); + static SkFontMgr* singleton = sk_make_sp().release(); + return sk_ref_sp(singleton); } // A global function pointer that's not declared, but can be overriden at startup by test tools. sk_sp (*gSkFontMgr_DefaultFactory)() = nullptr; sk_sp SkFontMgr::RefDefault() { - static SkOnce once; - static sk_sp singleton; - - once([]{ + static SkFontMgr* singleton = []() -> SkFontMgr* { sk_sp fm = gSkFontMgr_DefaultFactory ? gSkFontMgr_DefaultFactory() : SkFontMgr::Factory(); - singleton = fm ? std::move(fm) : RefEmpty(); - }); - return singleton; + return fm ? fm.release() : RefEmpty().release(); + }(); + return sk_ref_sp(singleton); } /** diff --git a/src/core/SkGeometry.h b/src/core/SkGeometry.h index 57e30f87bbc8..5a840356d60a 100644 --- a/src/core/SkGeometry.h +++ b/src/core/SkGeometry.h @@ -364,7 +364,7 @@ struct SkConic { * be used. */ void evalAt(SkScalar t, SkPoint* pos, SkVector* tangent = nullptr) const; - bool SK_WARN_UNUSED_RESULT chopAt(SkScalar t, SkConic dst[2]) const; + [[nodiscard]] bool chopAt(SkScalar t, SkConic dst[2]) const; void chopAt(SkScalar t1, SkScalar t2, SkConic* dst) const; void chop(SkConic dst[2]) const; @@ -384,7 +384,7 @@ struct SkConic { * Chop this conic into N quads, stored continguously in pts[], where * N = 1 << pow2. The amount of storage needed is (1 + 2 * N) */ - int SK_SPI SK_WARN_UNUSED_RESULT chopIntoQuadsPOW2(SkPoint pts[], int pow2) const; + [[nodiscard]] int SK_SPI chopIntoQuadsPOW2(SkPoint pts[], int pow2) const; float findMidTangent() const; bool findXExtrema(SkScalar* t) const; diff --git a/src/core/SkGlyph.cpp b/src/core/SkGlyph.cpp index 69bb277216d4..4e69ff804890 100644 --- a/src/core/SkGlyph.cpp +++ b/src/core/SkGlyph.cpp @@ -13,18 +13,15 @@ #include "include/core/SkPicture.h" #include "include/core/SkScalar.h" #include "include/core/SkSerialProcs.h" +#include "include/core/SkSpan.h" #include "include/private/base/SkFloatingPoint.h" -#include "include/private/base/SkSpan_impl.h" #include "include/private/base/SkTFitsIn.h" -#include "include/private/base/SkTemplates.h" #include "include/private/base/SkTo.h" #include "src/base/SkArenaAlloc.h" #include "src/base/SkBezierCurves.h" #include "src/core/SkReadBuffer.h" #include "src/core/SkScalerContext.h" #include "src/core/SkWriteBuffer.h" -#include "src/pathops/SkPathOpsCubic.h" -#include "src/pathops/SkPathOpsPoint.h" #include "src/text/StrikeForGPU.h" #include @@ -32,7 +29,6 @@ #include #include -using namespace skia_private; using namespace skglyph; using namespace sktext; @@ -115,7 +111,7 @@ std::optional SkGlyph::MakeFromBuffer(SkReadBuffer& buffer) { glyph.fTop = leftTop & 0xffffu; glyph.fMaskFormat = format; SkDEBUGCODE(glyph.fAdvancesBoundsFormatAndInitialPathDone = true;) - return std::move(glyph); + return glyph; } SkGlyph::SkGlyph(const SkGlyph&) = default; @@ -125,19 +121,15 @@ SkGlyph& SkGlyph::operator=(SkGlyph&&) = default; SkGlyph::~SkGlyph() = default; SkMask SkGlyph::mask() const { - SkMask mask; - mask.fImage = (uint8_t*)fImage; - mask.fBounds.setXYWH(fLeft, fTop, fWidth, fHeight); - mask.fRowBytes = this->rowBytes(); - mask.fFormat = fMaskFormat; - return mask; + SkIRect bounds = SkIRect::MakeXYWH(fLeft, fTop, fWidth, fHeight); + return SkMask(static_cast(fImage), bounds, this->rowBytes(), fMaskFormat); } SkMask SkGlyph::mask(SkPoint position) const { SkASSERT(SkScalarIsInt(position.x()) && SkScalarIsInt(position.y())); - SkMask answer = this->mask(); - answer.fBounds.offset(SkScalarFloorToInt(position.x()), SkScalarFloorToInt(position.y())); - return answer; + SkIRect bounds = SkIRect::MakeXYWH(fLeft, fTop, fWidth, fHeight); + bounds.offset(SkScalarFloorToInt(position.x()), SkScalarFloorToInt(position.y())); + return SkMask(static_cast(fImage), bounds, this->rowBytes(), fMaskFormat); } void SkGlyph::zeroMetrics() { @@ -474,12 +466,12 @@ static std::tuple calculate_path_gap( }; auto addCubic = [&](SkScalar offset) { - SkDCubic cubic; - cubic.set(pts); - double roots[3]; - int count = cubic.horizontalIntersect(offset, roots); - while (--count >= 0) { - expandGap(cubic.ptAtT(roots[count]).asSkPoint().fX); + float intersectionStorage[3]; + auto intersections = SkBezierCubic::IntersectWithHorizontalLine( + SkSpan{pts, 4}, offset, intersectionStorage); + + for(double intersection : intersections) { + expandGap(intersection); } }; diff --git a/src/core/SkGlyph.h b/src/core/SkGlyph.h index 64457bc1b884..9c47ec4eced6 100644 --- a/src/core/SkGlyph.h +++ b/src/core/SkGlyph.h @@ -517,6 +517,8 @@ class SkGlyph { } bool imageTooLarge() const { return fWidth >= kMaxGlyphWidth; } + uint16_t extraBits() const { return fScalerContextBits; } + // Make sure that the intercept information is on the glyph and return it, or return it if it // already exists. // * bounds - [0] - top of underline; [1] - bottom of underline. @@ -556,22 +558,7 @@ class SkGlyph { // There are two sides to an SkGlyph, the scaler side (things that create glyph data) have // access to all the fields. Scalers are assumed to maintain all the SkGlyph invariants. The // consumer side has a tighter interface. - friend class RandomScalerContext; friend class SkScalerContext; - friend class SkScalerContextProxy; - friend class SkScalerContext_Empty; - friend class SkScalerContext_FreeType; - friend class SkScalerContext_FreeType_Base; - friend class SkScalerContext_DW; - friend class SkScalerContext_GDI; - friend class SkScalerContext_Mac; - friend class SkStrikeClientImpl; - friend class SkTestScalerContext; - friend class SkTestSVGScalerContext; - friend class SkUserScalerContext; - friend class SkFontationsScalerContext; - friend class TestSVGTypeface; - friend class TestTypeface; friend class SkGlyphTestPeer; inline static constexpr uint16_t kMaxGlyphWidth = 1u << 13u; diff --git a/src/core/SkGlyphRunPainter.cpp b/src/core/SkGlyphRunPainter.cpp index 867307f2c9bd..3918c885c02d 100644 --- a/src/core/SkGlyphRunPainter.cpp +++ b/src/core/SkGlyphRunPainter.cpp @@ -352,8 +352,9 @@ void SkGlyphRunListPainterCPU::drawForBitmapDevice(SkCanvas* canvas, } SkBitmap bm; bm.installPixels(SkImageInfo::MakeN32Premul(mask.fBounds.size()), - mask.fImage, + const_cast(mask.fImage), mask.fRowBytes); + bm.setImmutable(); // Since the glyph in the cache is scaled by maxScale, its top left vector is too // long. Reduce it to find proper positions on the device. diff --git a/src/core/SkGpuBlurUtils.cpp b/src/core/SkGpuBlurUtils.cpp deleted file mode 100644 index 9f18c115f829..000000000000 --- a/src/core/SkGpuBlurUtils.cpp +++ /dev/null @@ -1,1039 +0,0 @@ -/* - * Copyright 2013 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#include "src/core/SkGpuBlurUtils.h" - -#include "include/core/SkBitmap.h" -#include "include/core/SkRect.h" -#include "src/base/SkMathPriv.h" - -#if defined(SK_GANESH) -#include "include/core/SkColorSpace.h" -#include "include/gpu/GrRecordingContext.h" -#include "src/gpu/ganesh/GrCaps.h" -#include "src/gpu/ganesh/GrRecordingContextPriv.h" -#include "src/gpu/ganesh/SkGr.h" -#include "src/gpu/ganesh/effects/GrGaussianConvolutionFragmentProcessor.h" -#include "src/gpu/ganesh/effects/GrMatrixConvolutionEffect.h" -#include "src/gpu/ganesh/effects/GrTextureEffect.h" - -#include "src/gpu/ganesh/SurfaceDrawContext.h" - -using Direction = GrGaussianConvolutionFragmentProcessor::Direction; - -static void fill_in_2D_gaussian_kernel( - float* kernel, int width, int height, SkScalar sigmaX, SkScalar sigmaY) { - const float twoSigmaSqrdX = 2.0f * SkScalarToFloat(SkScalarSquare(sigmaX)); - const float twoSigmaSqrdY = 2.0f * SkScalarToFloat(SkScalarSquare(sigmaY)); - - // SkGpuBlurUtils::GaussianBlur() should have detected the cases where a 2D blur - // degenerates to a 1D on X or Y, or to the identity. - SkASSERT(!SkGpuBlurUtils::IsEffectivelyZeroSigma(sigmaX) && - !SkGpuBlurUtils::IsEffectivelyZeroSigma(sigmaY)); - SkASSERT(!SkScalarNearlyZero(twoSigmaSqrdX) && !SkScalarNearlyZero(twoSigmaSqrdY)); - - const float sigmaXDenom = 1.0f / twoSigmaSqrdX; - const float sigmaYDenom = 1.0f / twoSigmaSqrdY; - const int xRadius = width / 2; - const int yRadius = height / 2; - - float sum = 0.0f; - for (int x = 0; x < width; x++) { - float xTerm = static_cast(x - xRadius); - xTerm = xTerm * xTerm * sigmaXDenom; - for (int y = 0; y < height; y++) { - float yTerm = static_cast(y - yRadius); - float xyTerm = sk_float_exp(-(xTerm + yTerm * yTerm * sigmaYDenom)); - // Note that the constant term (1/(sqrt(2*pi*sigma^2)) of the Gaussian - // is dropped here, since we renormalize the kernel below. - kernel[y * width + x] = xyTerm; - sum += xyTerm; - } - } - // Normalize the kernel - float scale = 1.0f / sum; - for (int i = 0; i < width * height; ++i) { - kernel[i] *= scale; - } -} - -/** - * Draws 'dstRect' into 'surfaceFillContext' evaluating a 1D Gaussian over 'srcView'. The src rect - * is 'dstRect' offset by 'dstToSrcOffset'. 'mode' and 'bounds' are applied to the src coords. - */ -static void convolve_gaussian_1d(skgpu::ganesh::SurfaceFillContext* sfc, - GrSurfaceProxyView srcView, - const SkIRect srcSubset, - SkIVector dstToSrcOffset, - const SkIRect& dstRect, - SkAlphaType srcAlphaType, - Direction direction, - int radius, - float sigma, - SkTileMode mode) { - SkASSERT(radius && !SkGpuBlurUtils::IsEffectivelyZeroSigma(sigma)); - auto wm = SkTileModeToWrapMode(mode); - auto srcRect = dstRect.makeOffset(dstToSrcOffset); - // NOTE: This could just be GrMatrixConvolutionEffect with one of the dimensions set to 1 - // and the appropriate kernel already computed, but there's value in keeping the shader simpler. - // TODO(michaelludwig): Is this true? If not, is the shader key simplicity worth it two have - // two convolution effects? - std::unique_ptr conv = - GrGaussianConvolutionFragmentProcessor::Make(std::move(srcView), - srcAlphaType, - direction, - radius, - sigma, - wm, - srcSubset, - &srcRect, - *sfc->caps()); - sfc->fillRectToRectWithFP(srcRect, dstRect, std::move(conv)); -} - -static std::unique_ptr convolve_gaussian_2d( - GrRecordingContext* rContext, - GrSurfaceProxyView srcView, - GrColorType srcColorType, - const SkIRect& srcBounds, - const SkIRect& dstBounds, - int radiusX, - int radiusY, - SkScalar sigmaX, - SkScalar sigmaY, - SkTileMode mode, - sk_sp finalCS, - SkBackingFit dstFit) { - SkASSERT(radiusX && radiusY); - SkASSERT(!SkGpuBlurUtils::IsEffectivelyZeroSigma(sigmaX) && - !SkGpuBlurUtils::IsEffectivelyZeroSigma(sigmaY)); - // Create the sdc with default SkSurfaceProps. Gaussian blurs will soon use a - // SurfaceFillContext, at which point the SkSurfaceProps won't exist anymore. - auto sdc = skgpu::ganesh::SurfaceDrawContext::Make( - rContext, - srcColorType, - std::move(finalCS), - dstFit, - dstBounds.size(), - SkSurfaceProps(), - /*label=*/"SurfaceDrawContext_ConvolveGaussian2d", - 1, - GrMipmapped::kNo, - srcView.proxy()->isProtected(), - srcView.origin()); - if (!sdc) { - return nullptr; - } - - SkISize size = SkISize::Make(SkGpuBlurUtils::KernelWidth(radiusX), - SkGpuBlurUtils::KernelWidth(radiusY)); - SkIPoint kernelOffset = SkIPoint::Make(radiusX, radiusY); - GrPaint paint; - auto wm = SkTileModeToWrapMode(mode); - - // GaussianBlur() should have downsampled the request until we can handle the 2D blur with - // just a uniform array. - SkASSERT(size.area() <= GrMatrixConvolutionEffect::kMaxUniformSize); - float kernel[GrMatrixConvolutionEffect::kMaxUniformSize]; - fill_in_2D_gaussian_kernel(kernel, size.width(), size.height(), sigmaX, sigmaY); - auto conv = GrMatrixConvolutionEffect::Make(rContext, - std::move(srcView), - srcBounds, - size, - kernel, - 1.0f, - 0.0f, - kernelOffset, - wm, - true, - *sdc->caps()); - - paint.setColorFragmentProcessor(std::move(conv)); - paint.setPorterDuffXPFactory(SkBlendMode::kSrc); - - // 'dstBounds' is actually in 'srcView' proxy space. It represents the blurred area from src - // space that we want to capture in the new RTC at {0, 0}. Hence, we use its size as the rect to - // draw and it directly as the local rect. - sdc->fillRectToRect(nullptr, - std::move(paint), - GrAA::kNo, - SkMatrix::I(), - SkRect::Make(dstBounds.size()), - SkRect::Make(dstBounds)); - - return sdc; -} - -static std::unique_ptr convolve_gaussian( - GrRecordingContext* rContext, - GrSurfaceProxyView srcView, - GrColorType srcColorType, - SkAlphaType srcAlphaType, - SkIRect srcBounds, - SkIRect dstBounds, - Direction direction, - int radius, - float sigma, - SkTileMode mode, - sk_sp finalCS, - SkBackingFit fit) { - using namespace SkGpuBlurUtils; - SkASSERT(radius > 0 && !SkGpuBlurUtils::IsEffectivelyZeroSigma(sigma)); - // Logically we're creating an infinite blur of 'srcBounds' of 'srcView' with 'mode' tiling - // and then capturing the 'dstBounds' portion in a new RTC where the top left of 'dstBounds' is - // at {0, 0} in the new RTC. - // - // Create the sdc with default SkSurfaceProps. Gaussian blurs will soon use a - // SurfaceFillContext, at which point the SkSurfaceProps won't exist anymore. - auto dstSDC = - skgpu::ganesh::SurfaceDrawContext::Make(rContext, - srcColorType, - std::move(finalCS), - fit, - dstBounds.size(), - SkSurfaceProps(), - /*label=*/"SurfaceDrawContext_ConvolveGaussian", - 1, - GrMipmapped::kNo, - srcView.proxy()->isProtected(), - srcView.origin()); - if (!dstSDC) { - return nullptr; - } - // This represents the translation from 'dstSurfaceDrawContext' coords to 'srcView' coords. - auto rtcToSrcOffset = dstBounds.topLeft(); - - auto srcBackingBounds = SkIRect::MakeSize(srcView.proxy()->backingStoreDimensions()); - // We've implemented splitting the dst bounds up into areas that do and do not need to - // use shader based tiling but only for some modes... - bool canSplit = mode == SkTileMode::kDecal || mode == SkTileMode::kClamp; - // ...but it's not worth doing the splitting if we'll get HW tiling instead of shader tiling. - bool canHWTile = - srcBounds.contains(srcBackingBounds) && - !rContext->priv().caps()->reducedShaderMode() && // this mode always uses shader tiling - !(mode == SkTileMode::kDecal && !rContext->priv().caps()->clampToBorderSupport()); - if (!canSplit || canHWTile) { - auto dstRect = SkIRect::MakeSize(dstBounds.size()); - convolve_gaussian_1d(dstSDC.get(), - std::move(srcView), - srcBounds, - rtcToSrcOffset, - dstRect, - srcAlphaType, - direction, - radius, - sigma, - mode); - return dstSDC; - } - - // 'left' and 'right' are the sub rects of 'srcBounds' where 'mode' must be enforced. - // 'mid' is the area where we can ignore the mode because the kernel does not reach to the - // edge of 'srcBounds'. - SkIRect mid, left, right; - // 'top' and 'bottom' are areas of 'dstBounds' that are entirely above/below 'srcBounds'. - // These are areas that we can simply clear in the dst in kDecal mode. If 'srcBounds' - // straddles the top edge of 'dstBounds' then 'top' will be inverted and we will skip - // processing for the rect. Similar for 'bottom'. The positional/directional labels above refer - // to the Direction::kX case and one should think of these as 'left' and 'right' for - // Direction::kY. - SkIRect top, bottom; - if (Direction::kX == direction) { - top = {dstBounds.left(), dstBounds.top(), dstBounds.right(), srcBounds.top()}; - bottom = {dstBounds.left(), srcBounds.bottom(), dstBounds.right(), dstBounds.bottom()}; - - // Inset for sub-rect of 'srcBounds' where the x-dir kernel doesn't reach the edges, clipped - // vertically to dstBounds. - int midA = std::max(srcBounds.top(), dstBounds.top()); - int midB = std::min(srcBounds.bottom(), dstBounds.bottom()); - mid = {srcBounds.left() + radius, midA, srcBounds.right() - radius, midB}; - if (mid.isEmpty()) { - // There is no middle where the bounds can be ignored. Make the left span the whole - // width of dst and we will not draw mid or right. - left = {dstBounds.left(), mid.top(), dstBounds.right(), mid.bottom()}; - } else { - left = {dstBounds.left(), mid.top(), mid.left(), mid.bottom()}; - right = {mid.right(), mid.top(), dstBounds.right(), mid.bottom()}; - } - } else { - // This is the same as the x direction code if you turn your head 90 degrees CCW. Swap x and - // y and swap top/bottom with left/right. - top = {dstBounds.left(), dstBounds.top(), srcBounds.left(), dstBounds.bottom()}; - bottom = {srcBounds.right(), dstBounds.top(), dstBounds.right(), dstBounds.bottom()}; - - int midA = std::max(srcBounds.left(), dstBounds.left()); - int midB = std::min(srcBounds.right(), dstBounds.right()); - mid = {midA, srcBounds.top() + radius, midB, srcBounds.bottom() - radius}; - - if (mid.isEmpty()) { - left = {mid.left(), dstBounds.top(), mid.right(), dstBounds.bottom()}; - } else { - left = {mid.left(), dstBounds.top(), mid.right(), mid.top()}; - right = {mid.left(), mid.bottom(), mid.right(), dstBounds.bottom()}; - } - } - - auto convolve = [&](SkIRect rect) { - // Transform rect into the render target's coord system. - rect.offset(-rtcToSrcOffset); - convolve_gaussian_1d(dstSDC.get(), - srcView, - srcBounds, - rtcToSrcOffset, - rect, - srcAlphaType, - direction, - radius, - sigma, - mode); - }; - auto clear = [&](SkIRect rect) { - // Transform rect into the render target's coord system. - rect.offset(-rtcToSrcOffset); - dstSDC->clearAtLeast(rect, SK_PMColor4fTRANSPARENT); - }; - - // Doing mid separately will cause two draws to occur (left and right batch together). At - // small sizes of mid it is worse to issue more draws than to just execute the slightly - // more complicated shader that implements the tile mode across mid. This threshold is - // very arbitrary right now. It is believed that a 21x44 mid on a Moto G4 is a significant - // regression compared to doing one draw but it has not been locally evaluated or tuned. - // The optimal cutoff is likely to vary by GPU. - if (!mid.isEmpty() && mid.width() * mid.height() < 256 * 256) { - left.join(mid); - left.join(right); - mid = SkIRect::MakeEmpty(); - right = SkIRect::MakeEmpty(); - // It's unknown whether for kDecal it'd be better to expand the draw rather than a draw and - // up to two clears. - if (mode == SkTileMode::kClamp) { - left.join(top); - left.join(bottom); - top = SkIRect::MakeEmpty(); - bottom = SkIRect::MakeEmpty(); - } - } - - if (!top.isEmpty()) { - if (mode == SkTileMode::kDecal) { - clear(top); - } else { - convolve(top); - } - } - - if (!bottom.isEmpty()) { - if (mode == SkTileMode::kDecal) { - clear(bottom); - } else { - convolve(bottom); - } - } - - if (mid.isEmpty()) { - convolve(left); - } else { - convolve(left); - convolve(right); - convolve(mid); - } - return dstSDC; -} - -// Expand the contents of 'src' to fit in 'dstSize'. At this point, we are expanding an intermediate -// image, so there's no need to account for a proxy offset from the original input. -static std::unique_ptr reexpand( - GrRecordingContext* rContext, - std::unique_ptr src, - const SkRect& srcBounds, - SkISize dstSize, - sk_sp colorSpace, - SkBackingFit fit) { - GrSurfaceProxyView srcView = src->readSurfaceView(); - if (!srcView.asTextureProxy()) { - return nullptr; - } - - GrColorType srcColorType = src->colorInfo().colorType(); - SkAlphaType srcAlphaType = src->colorInfo().alphaType(); - - src.reset(); // no longer needed - - // Create the sdc with default SkSurfaceProps. Gaussian blurs will soon use a - // SurfaceFillContext, at which point the SkSurfaceProps won't exist anymore. - auto dstSDC = skgpu::ganesh::SurfaceDrawContext::Make(rContext, - srcColorType, - std::move(colorSpace), - fit, - dstSize, - SkSurfaceProps(), - /*label=*/"SurfaceDrawContext_Reexpand", - 1, - GrMipmapped::kNo, - srcView.proxy()->isProtected(), - srcView.origin()); - if (!dstSDC) { - return nullptr; - } - - GrPaint paint; - auto fp = GrTextureEffect::MakeSubset(std::move(srcView), - srcAlphaType, - SkMatrix::I(), - GrSamplerState::Filter::kLinear, - srcBounds, - srcBounds, - *rContext->priv().caps()); - paint.setColorFragmentProcessor(std::move(fp)); - paint.setPorterDuffXPFactory(SkBlendMode::kSrc); - - dstSDC->fillRectToRect( - nullptr, std::move(paint), GrAA::kNo, SkMatrix::I(), SkRect::Make(dstSize), srcBounds); - - return dstSDC; -} - -static std::unique_ptr two_pass_gaussian( - GrRecordingContext* rContext, - GrSurfaceProxyView srcView, - GrColorType srcColorType, - SkAlphaType srcAlphaType, - sk_sp colorSpace, - SkIRect srcBounds, - SkIRect dstBounds, - float sigmaX, - float sigmaY, - int radiusX, - int radiusY, - SkTileMode mode, - SkBackingFit fit) { - SkASSERT(radiusX || radiusY); - std::unique_ptr dstSDC; - if (radiusX > 0) { - SkBackingFit xFit = radiusY > 0 ? SkBackingFit::kApprox : fit; - // Expand the dstBounds vertically to produce necessary content for the y-pass. Then we will - // clip these in a tile-mode dependent way to ensure the tile-mode gets implemented - // correctly. However, if we're not going to do a y-pass then we must use the original - // dstBounds without clipping to produce the correct output size. - SkIRect xPassDstBounds = dstBounds; - if (radiusY) { - xPassDstBounds.outset(0, radiusY); - if (mode == SkTileMode::kRepeat || mode == SkTileMode::kMirror) { - int srcH = srcBounds.height(); - int srcTop = srcBounds.top(); - if (mode == SkTileMode::kMirror) { - srcTop -= srcH; - srcH *= 2; - } - - float floatH = srcH; - // First row above the dst rect where we should restart the tile mode. - int n = sk_float_floor2int_no_saturate((xPassDstBounds.top() - srcTop) / floatH); - int topClip = srcTop + n * srcH; - - // First row above below the dst rect where we should restart the tile mode. - n = sk_float_ceil2int_no_saturate((xPassDstBounds.bottom() - srcBounds.bottom()) / - floatH); - int bottomClip = srcBounds.bottom() + n * srcH; - - xPassDstBounds.fTop = std::max(xPassDstBounds.top(), topClip); - xPassDstBounds.fBottom = std::min(xPassDstBounds.bottom(), bottomClip); - } else { - if (xPassDstBounds.fBottom <= srcBounds.top()) { - if (mode == SkTileMode::kDecal) { - return nullptr; - } - xPassDstBounds.fTop = srcBounds.top(); - xPassDstBounds.fBottom = xPassDstBounds.fTop + 1; - } else if (xPassDstBounds.fTop >= srcBounds.bottom()) { - if (mode == SkTileMode::kDecal) { - return nullptr; - } - xPassDstBounds.fBottom = srcBounds.bottom(); - xPassDstBounds.fTop = xPassDstBounds.fBottom - 1; - } else { - xPassDstBounds.fTop = std::max(xPassDstBounds.fTop, srcBounds.top()); - xPassDstBounds.fBottom = std::min(xPassDstBounds.fBottom, srcBounds.bottom()); - } - int leftSrcEdge = srcBounds.fLeft - radiusX; - int rightSrcEdge = srcBounds.fRight + radiusX; - if (mode == SkTileMode::kClamp) { - // In clamp the column just outside the src bounds has the same value as the - // column just inside, unlike decal. - leftSrcEdge += 1; - rightSrcEdge -= 1; - } - if (xPassDstBounds.fRight <= leftSrcEdge) { - if (mode == SkTileMode::kDecal) { - return nullptr; - } - xPassDstBounds.fLeft = xPassDstBounds.fRight - 1; - } else { - xPassDstBounds.fLeft = std::max(xPassDstBounds.fLeft, leftSrcEdge); - } - if (xPassDstBounds.fLeft >= rightSrcEdge) { - if (mode == SkTileMode::kDecal) { - return nullptr; - } - xPassDstBounds.fRight = xPassDstBounds.fLeft + 1; - } else { - xPassDstBounds.fRight = std::min(xPassDstBounds.fRight, rightSrcEdge); - } - } - } - dstSDC = convolve_gaussian(rContext, - std::move(srcView), - srcColorType, - srcAlphaType, - srcBounds, - xPassDstBounds, - Direction::kX, - radiusX, - sigmaX, - mode, - colorSpace, - xFit); - if (!dstSDC) { - return nullptr; - } - srcView = dstSDC->readSurfaceView(); - SkIVector newDstBoundsOffset = dstBounds.topLeft() - xPassDstBounds.topLeft(); - dstBounds = SkIRect::MakeSize(dstBounds.size()).makeOffset(newDstBoundsOffset); - srcBounds = SkIRect::MakeSize(xPassDstBounds.size()); - } - - if (!radiusY) { - return dstSDC; - } - - return convolve_gaussian(rContext, - std::move(srcView), - srcColorType, - srcAlphaType, - srcBounds, - dstBounds, - Direction::kY, - radiusY, - sigmaY, - mode, - colorSpace, - fit); -} - -namespace SkGpuBlurUtils { - -std::unique_ptr GaussianBlur(GrRecordingContext* rContext, - GrSurfaceProxyView srcView, - GrColorType srcColorType, - SkAlphaType srcAlphaType, - sk_sp colorSpace, - SkIRect dstBounds, - SkIRect srcBounds, - float sigmaX, - float sigmaY, - SkTileMode mode, - SkBackingFit fit) { - SkASSERT(rContext); - TRACE_EVENT2("skia.gpu", "GaussianBlur", "sigmaX", sigmaX, "sigmaY", sigmaY); - - if (!srcView.asTextureProxy()) { - return nullptr; - } - - int maxRenderTargetSize = rContext->priv().caps()->maxRenderTargetSize(); - if (dstBounds.width() > maxRenderTargetSize || dstBounds.height() > maxRenderTargetSize) { - return nullptr; - } - - int radiusX = SigmaRadius(sigmaX); - int radiusY = SigmaRadius(sigmaY); - // Attempt to reduce the srcBounds in order to detect that we can set the sigmas to zero or - // to reduce the amount of work to rescale the source if sigmas are large. TODO: Could consider - // how to minimize the required source bounds for repeat/mirror modes. - if (mode == SkTileMode::kClamp || mode == SkTileMode::kDecal) { - SkIRect reach = dstBounds.makeOutset(radiusX, radiusY); - SkIRect intersection; - if (!intersection.intersect(reach, srcBounds)) { - if (mode == SkTileMode::kDecal) { - return nullptr; - } else { - if (reach.fLeft >= srcBounds.fRight) { - srcBounds.fLeft = srcBounds.fRight - 1; - } else if (reach.fRight <= srcBounds.fLeft) { - srcBounds.fRight = srcBounds.fLeft + 1; - } - if (reach.fTop >= srcBounds.fBottom) { - srcBounds.fTop = srcBounds.fBottom - 1; - } else if (reach.fBottom <= srcBounds.fTop) { - srcBounds.fBottom = srcBounds.fTop + 1; - } - } - } else { - srcBounds = intersection; - } - } - - if (mode != SkTileMode::kDecal) { - // All non-decal tile modes are equivalent for one pixel width/height src and amount to a - // single color value repeated at each column/row. Applying the normalized kernel to that - // column/row yields that same color. So no blurring is necessary. - if (srcBounds.width() == 1) { - sigmaX = 0.f; - radiusX = 0; - } - if (srcBounds.height() == 1) { - sigmaY = 0.f; - radiusY = 0; - } - } - - // If we determined that there is no blurring necessary in either direction then just do a - // a draw that applies the tile mode. - if (!radiusX && !radiusY) { - // Create the sdc with default SkSurfaceProps. Gaussian blurs will soon use a - // SurfaceFillContext, at which point the SkSurfaceProps won't exist anymore. - auto result = - skgpu::ganesh::SurfaceDrawContext::Make(rContext, - srcColorType, - std::move(colorSpace), - fit, - dstBounds.size(), - SkSurfaceProps(), - /*label=*/"SurfaceDrawContext_GaussianBlur", - 1, - GrMipmapped::kNo, - srcView.proxy()->isProtected(), - srcView.origin()); - if (!result) { - return nullptr; - } - GrSamplerState sampler(SkTileModeToWrapMode(mode), GrSamplerState::Filter::kNearest); - auto fp = GrTextureEffect::MakeSubset(std::move(srcView), - srcAlphaType, - SkMatrix::I(), - sampler, - SkRect::Make(srcBounds), - SkRect::Make(dstBounds), - *rContext->priv().caps()); - result->fillRectToRectWithFP(dstBounds, SkIRect::MakeSize(dstBounds.size()), std::move(fp)); - return result; - } - - if (sigmaX <= kMaxSigma && sigmaY <= kMaxSigma) { - SkASSERT(radiusX <= GrGaussianConvolutionFragmentProcessor::kMaxKernelRadius); - SkASSERT(radiusY <= GrGaussianConvolutionFragmentProcessor::kMaxKernelRadius); - // For really small blurs (certainly no wider than 5x5 on desktop GPUs) it is faster to just - // launch a single non separable kernel vs two launches. - const int kernelSize = (2 * radiusX + 1) * (2 * radiusY + 1); - if (radiusX > 0 && radiusY > 0 && - kernelSize <= GrMatrixConvolutionEffect::kMaxUniformSize && - !rContext->priv().caps()->reducedShaderMode()) { - // Apply the proxy offset to src bounds and offset directly - return convolve_gaussian_2d(rContext, - std::move(srcView), - srcColorType, - srcBounds, - dstBounds, - radiusX, - radiusY, - sigmaX, - sigmaY, - mode, - std::move(colorSpace), - fit); - } - // This will automatically degenerate into a single pass of X or Y if only one of the - // radii are non-zero. - return two_pass_gaussian(rContext, - std::move(srcView), - srcColorType, - srcAlphaType, - std::move(colorSpace), - srcBounds, - dstBounds, - sigmaX, - sigmaY, - radiusX, - radiusY, - mode, - fit); - } - - GrColorInfo colorInfo(srcColorType, srcAlphaType, colorSpace); - auto srcCtx = rContext->priv().makeSC(srcView, colorInfo); - SkASSERT(srcCtx); - - float scaleX = sigmaX > kMaxSigma ? kMaxSigma / sigmaX : 1.f; - float scaleY = sigmaY > kMaxSigma ? kMaxSigma / sigmaY : 1.f; - // We round down here so that when we recalculate sigmas we know they will be below - // kMaxSigma (but clamp to 1 do we don't have an empty texture). - SkISize rescaledSize = {std::max(sk_float_floor2int(srcBounds.width() * scaleX), 1), - std::max(sk_float_floor2int(srcBounds.height() * scaleY), 1)}; - // Compute the sigmas using the actual scale factors used once we integerized the - // rescaledSize. - scaleX = static_cast(rescaledSize.width()) / srcBounds.width(); - scaleY = static_cast(rescaledSize.height()) / srcBounds.height(); - sigmaX *= scaleX; - sigmaY *= scaleY; - - // When we are in clamp mode any artifacts in the edge pixels due to downscaling may be - // exacerbated because of the tile mode. The particularly egregious case is when the original - // image has transparent black around the edges and the downscaling pulls in some non-zero - // values from the interior. Ultimately it'd be better for performance if the calling code could - // give us extra context around the blur to account for this. We don't currently have a good way - // to communicate this up stack. So we leave a 1 pixel border around the rescaled src bounds. - // We populate the top 1 pixel tall row of this border by rescaling the top row of the original - // source bounds into it. Because this is only rescaling in x (i.e. rescaling a 1 pixel high - // row into a shorter but still 1 pixel high row) we won't read any interior values. And similar - // for the other three borders. We'll adjust the source/dest bounds rescaled blur so that this - // border of extra pixels is used as the edge pixels for clamp mode but the dest bounds - // corresponds only to the pixels inside the border (the normally rescaled pixels inside this - // border). - // Moreover, if we clamped the rescaled size to 1 column or row then we still have a sigma - // that is greater than kMaxSigma. By using a pad and making the src 3 wide/tall instead of - // 1 we can recurse again and do another downscale. Since mirror and repeat modes are trivial - // for a single col/row we only add padding based on sigma exceeding kMaxSigma for decal. - int padX = mode == SkTileMode::kClamp || (mode == SkTileMode::kDecal && sigmaX > kMaxSigma) ? 1 - : 0; - int padY = mode == SkTileMode::kClamp || (mode == SkTileMode::kDecal && sigmaY > kMaxSigma) ? 1 - : 0; - // Create the sdc with default SkSurfaceProps. Gaussian blurs will soon use a - // SurfaceFillContext, at which point the SkSurfaceProps won't exist anymore. - auto rescaledSDC = skgpu::ganesh::SurfaceDrawContext::Make( - srcCtx->recordingContext(), - colorInfo.colorType(), - colorInfo.refColorSpace(), - SkBackingFit::kApprox, - {rescaledSize.width() + 2 * padX, rescaledSize.height() + 2 * padY}, - SkSurfaceProps(), - /*label=*/"RescaledSurfaceDrawContext", - 1, - GrMipmapped::kNo, - srcCtx->asSurfaceProxy()->isProtected(), - srcCtx->origin()); - if (!rescaledSDC) { - return nullptr; - } - if ((padX || padY) && mode == SkTileMode::kDecal) { - rescaledSDC->clear(SkPMColor4f{0, 0, 0, 0}); - } - if (!srcCtx->rescaleInto(rescaledSDC.get(), - SkIRect::MakeSize(rescaledSize).makeOffset(padX, padY), - srcBounds, - SkSurface::RescaleGamma::kSrc, - SkSurface::RescaleMode::kRepeatedLinear)) { - return nullptr; - } - if (mode == SkTileMode::kClamp) { - SkASSERT(padX == 1 && padY == 1); - // Rather than run a potentially multi-pass rescaler on single rows/columns we just do a - // single bilerp draw. If we find this quality unacceptable we should think more about how - // to rescale these with better quality but without 4 separate multi-pass downscales. - auto cheapDownscale = [&](SkIRect dstRect, SkIRect srcRect) { - rescaledSDC->drawTexture(nullptr, - srcCtx->readSurfaceView(), - srcAlphaType, - GrSamplerState::Filter::kLinear, - GrSamplerState::MipmapMode::kNone, - SkBlendMode::kSrc, - SK_PMColor4fWHITE, - SkRect::Make(srcRect), - SkRect::Make(dstRect), - GrQuadAAFlags::kNone, - SkCanvas::SrcRectConstraint::kFast_SrcRectConstraint, - SkMatrix::I(), - nullptr); - }; - auto [dw, dh] = rescaledSize; - // The are the src rows and columns from the source that we will scale into the dst padding. - float sLCol = srcBounds.left(); - float sTRow = srcBounds.top(); - float sRCol = srcBounds.right() - 1; - float sBRow = srcBounds.bottom() - 1; - - int sx = srcBounds.left(); - int sy = srcBounds.top(); - int sw = srcBounds.width(); - int sh = srcBounds.height(); - - // Downscale the edges from the original source. These draws should batch together (and with - // the above interior rescaling when it is a single pass). - cheapDownscale(SkIRect::MakeXYWH(0, 1, 1, dh), SkIRect::MakeXYWH(sLCol, sy, 1, sh)); - cheapDownscale(SkIRect::MakeXYWH(1, 0, dw, 1), SkIRect::MakeXYWH(sx, sTRow, sw, 1)); - cheapDownscale(SkIRect::MakeXYWH(dw + 1, 1, 1, dh), SkIRect::MakeXYWH(sRCol, sy, 1, sh)); - cheapDownscale(SkIRect::MakeXYWH(1, dh + 1, dw, 1), SkIRect::MakeXYWH(sx, sBRow, sw, 1)); - - // Copy the corners from the original source. These would batch with the edges except that - // at time of writing we recognize these can use kNearest and downgrade the filter. So they - // batch with each other but not the edge draws. - cheapDownscale(SkIRect::MakeXYWH(0, 0, 1, 1), SkIRect::MakeXYWH(sLCol, sTRow, 1, 1)); - cheapDownscale(SkIRect::MakeXYWH(dw + 1, 0, 1, 1), SkIRect::MakeXYWH(sRCol, sTRow, 1, 1)); - cheapDownscale(SkIRect::MakeXYWH(dw + 1, dh + 1, 1, 1), - SkIRect::MakeXYWH(sRCol, sBRow, 1, 1)); - cheapDownscale(SkIRect::MakeXYWH(0, dh + 1, 1, 1), SkIRect::MakeXYWH(sLCol, sBRow, 1, 1)); - } - srcView = rescaledSDC->readSurfaceView(); - // Drop the contexts so we don't hold the proxies longer than necessary. - rescaledSDC.reset(); - srcCtx.reset(); - - // Compute the dst bounds in the scaled down space. First move the origin to be at the top - // left since we trimmed off everything above and to the left of the original src bounds during - // the rescale. - SkRect scaledDstBounds = SkRect::Make(dstBounds.makeOffset(-srcBounds.topLeft())); - scaledDstBounds.fLeft *= scaleX; - scaledDstBounds.fTop *= scaleY; - scaledDstBounds.fRight *= scaleX; - scaledDstBounds.fBottom *= scaleY; - // Account for padding in our rescaled src, if any. - scaledDstBounds.offset(padX, padY); - // Turn the scaled down dst bounds into an integer pixel rect. - auto scaledDstBoundsI = scaledDstBounds.roundOut(); - - SkIRect scaledSrcBounds = SkIRect::MakeSize(srcView.dimensions()); - auto sdc = GaussianBlur(rContext, - std::move(srcView), - srcColorType, - srcAlphaType, - colorSpace, - scaledDstBoundsI, - scaledSrcBounds, - sigmaX, - sigmaY, - mode, - fit); - if (!sdc) { - return nullptr; - } - // We rounded out the integer scaled dst bounds. Select the fractional dst bounds from the - // integer dimension blurred result when we scale back up. - scaledDstBounds.offset(-scaledDstBoundsI.left(), -scaledDstBoundsI.top()); - return reexpand(rContext, - std::move(sdc), - scaledDstBounds, - dstBounds.size(), - std::move(colorSpace), - fit); -} - -bool ComputeBlurredRRectParams(const SkRRect& srcRRect, - const SkRRect& devRRect, - SkScalar sigma, - SkScalar xformedSigma, - SkRRect* rrectToDraw, - SkISize* widthHeight, - SkScalar rectXs[kBlurRRectMaxDivisions], - SkScalar rectYs[kBlurRRectMaxDivisions], - SkScalar texXs[kBlurRRectMaxDivisions], - SkScalar texYs[kBlurRRectMaxDivisions]) { - unsigned int devBlurRadius = 3 * SkScalarCeilToInt(xformedSigma - 1 / 6.0f); - SkScalar srcBlurRadius = 3.0f * sigma; - - const SkRect& devOrig = devRRect.getBounds(); - const SkVector& devRadiiUL = devRRect.radii(SkRRect::kUpperLeft_Corner); - const SkVector& devRadiiUR = devRRect.radii(SkRRect::kUpperRight_Corner); - const SkVector& devRadiiLR = devRRect.radii(SkRRect::kLowerRight_Corner); - const SkVector& devRadiiLL = devRRect.radii(SkRRect::kLowerLeft_Corner); - - const int devLeft = SkScalarCeilToInt(std::max(devRadiiUL.fX, devRadiiLL.fX)); - const int devTop = SkScalarCeilToInt(std::max(devRadiiUL.fY, devRadiiUR.fY)); - const int devRight = SkScalarCeilToInt(std::max(devRadiiUR.fX, devRadiiLR.fX)); - const int devBot = SkScalarCeilToInt(std::max(devRadiiLL.fY, devRadiiLR.fY)); - - // This is a conservative check for nine-patchability - if (devOrig.fLeft + devLeft + devBlurRadius >= devOrig.fRight - devRight - devBlurRadius || - devOrig.fTop + devTop + devBlurRadius >= devOrig.fBottom - devBot - devBlurRadius) { - return false; - } - - const SkVector& srcRadiiUL = srcRRect.radii(SkRRect::kUpperLeft_Corner); - const SkVector& srcRadiiUR = srcRRect.radii(SkRRect::kUpperRight_Corner); - const SkVector& srcRadiiLR = srcRRect.radii(SkRRect::kLowerRight_Corner); - const SkVector& srcRadiiLL = srcRRect.radii(SkRRect::kLowerLeft_Corner); - - const SkScalar srcLeft = std::max(srcRadiiUL.fX, srcRadiiLL.fX); - const SkScalar srcTop = std::max(srcRadiiUL.fY, srcRadiiUR.fY); - const SkScalar srcRight = std::max(srcRadiiUR.fX, srcRadiiLR.fX); - const SkScalar srcBot = std::max(srcRadiiLL.fY, srcRadiiLR.fY); - - int newRRWidth = 2 * devBlurRadius + devLeft + devRight + 1; - int newRRHeight = 2 * devBlurRadius + devTop + devBot + 1; - widthHeight->fWidth = newRRWidth + 2 * devBlurRadius; - widthHeight->fHeight = newRRHeight + 2 * devBlurRadius; - - const SkRect srcProxyRect = srcRRect.getBounds().makeOutset(srcBlurRadius, srcBlurRadius); - - rectXs[0] = srcProxyRect.fLeft; - rectXs[1] = srcProxyRect.fLeft + 2 * srcBlurRadius + srcLeft; - rectXs[2] = srcProxyRect.fRight - 2 * srcBlurRadius - srcRight; - rectXs[3] = srcProxyRect.fRight; - - rectYs[0] = srcProxyRect.fTop; - rectYs[1] = srcProxyRect.fTop + 2 * srcBlurRadius + srcTop; - rectYs[2] = srcProxyRect.fBottom - 2 * srcBlurRadius - srcBot; - rectYs[3] = srcProxyRect.fBottom; - - texXs[0] = 0.0f; - texXs[1] = 2.0f * devBlurRadius + devLeft; - texXs[2] = 2.0f * devBlurRadius + devLeft + 1; - texXs[3] = SkIntToScalar(widthHeight->fWidth); - - texYs[0] = 0.0f; - texYs[1] = 2.0f * devBlurRadius + devTop; - texYs[2] = 2.0f * devBlurRadius + devTop + 1; - texYs[3] = SkIntToScalar(widthHeight->fHeight); - - const SkRect newRect = SkRect::MakeXYWH(SkIntToScalar(devBlurRadius), - SkIntToScalar(devBlurRadius), - SkIntToScalar(newRRWidth), - SkIntToScalar(newRRHeight)); - SkVector newRadii[4]; - newRadii[0] = {SkScalarCeilToScalar(devRadiiUL.fX), SkScalarCeilToScalar(devRadiiUL.fY)}; - newRadii[1] = {SkScalarCeilToScalar(devRadiiUR.fX), SkScalarCeilToScalar(devRadiiUR.fY)}; - newRadii[2] = {SkScalarCeilToScalar(devRadiiLR.fX), SkScalarCeilToScalar(devRadiiLR.fY)}; - newRadii[3] = {SkScalarCeilToScalar(devRadiiLL.fX), SkScalarCeilToScalar(devRadiiLL.fY)}; - - rrectToDraw->setRectRadii(newRect, newRadii); - return true; -} - -// TODO: it seems like there should be some synergy with SkBlurMask::ComputeBlurProfile -// TODO: maybe cache this on the cpu side? -int CreateIntegralTable(float sixSigma, SkBitmap* table) { - // Check for NaN - if (sk_float_isnan(sixSigma)) { - return 0; - } - // Avoid overflow, covers both multiplying by 2 and finding next power of 2: - // 2*((2^31-1)/4 + 1) = 2*(2^29-1) + 2 = 2^30 and SkNextPow2(2^30) = 2^30 - if (sixSigma > SK_MaxS32/4 + 1) { - return 0; - } - // The texture we're producing represents the integral of a normal distribution over a - // six-sigma range centered at zero. We want enough resolution so that the linear - // interpolation done in texture lookup doesn't introduce noticeable artifacts. We - // conservatively choose to have 2 texels for each dst pixel. - int minWidth = 2*((int)sk_float_ceil(sixSigma)); - // Bin by powers of 2 with a minimum so we get good profile reuse. - int width = std::max(SkNextPow2(minWidth), 32); - - if (!table) { - return width; - } - - if (!table->tryAllocPixels(SkImageInfo::MakeA8(width, 1))) { - return 0; - } - *table->getAddr8(0, 0) = 255; - const float invWidth = 1.f / width; - for (int i = 1; i < width - 1; ++i) { - float x = (i + 0.5f) * invWidth; - x = (-6 * x + 3) * SK_ScalarRoot2Over2; - float integral = 0.5f * (std::erf(x) + 1.f); - *table->getAddr8(i, 0) = SkToU8(sk_float_round2int(255.f * integral)); - } - - *table->getAddr8(width - 1, 0) = 0; - table->setImmutable(); - return table->width(); -} - -void Compute1DGaussianKernel(float* kernel, float sigma, int radius) { - SkASSERT(radius == SigmaRadius(sigma)); - if (SkGpuBlurUtils::IsEffectivelyZeroSigma(sigma)) { - // Calling SigmaRadius() produces 1, just computing ceil(sigma)*3 produces 3 - SkASSERT(KernelWidth(radius) == 1); - std::fill_n(kernel, 1, 0.f); - kernel[0] = 1.f; - return; - } - - // If this fails, kEffectivelyZeroSigma isn't big enough to prevent precision issues - SkASSERT(!SkScalarNearlyZero(2.f * sigma * sigma)); - - const float sigmaDenom = 1.0f / (2.f * sigma * sigma); - int size = KernelWidth(radius); - float sum = 0.0f; - for (int i = 0; i < size; ++i) { - float term = static_cast(i - radius); - // Note that the constant term (1/(sqrt(2*pi*sigma^2)) of the Gaussian - // is dropped here, since we renormalize the kernel below. - kernel[i] = sk_float_exp(-term * term * sigmaDenom); - sum += kernel[i]; - } - // Normalize the kernel - float scale = 1.0f / sum; - for (int i = 0; i < size; ++i) { - kernel[i] *= scale; - } -} - -void Compute1DLinearGaussianKernel(float* kernel, float* offset, float sigma, int radius) { - // Given 2 adjacent gaussian points, they are blended as: Wi * Ci + Wj * Cj. - // The GPU will mix Ci and Cj as Ci * (1 - x) + Cj * x during sampling. - // Compute W', x such that W' * (Ci * (1 - x) + Cj * x) = Wi * Ci + Wj * Cj. - // Solving W' * x = Wj, W' * (1 - x) = Wi: - // W' = Wi + Wj - // x = Wj / (Wi + Wj) - auto get_new_weight = [](float* new_w, float* offset, float wi, float wj) { - *new_w = wi + wj; - *offset = wj / (wi + wj); - }; - - // Create a temporary standard kernel. - int size = KernelWidth(radius); - std::unique_ptr temp_kernel(new float[size]); - Compute1DGaussianKernel(temp_kernel.get(), sigma, radius); - - // Note that halfsize isn't just size / 2, but radius + 1. This is the size of the output array. - int halfsize = LinearKernelWidth(radius); - int halfradius = halfsize / 2; - int low_index = halfradius - 1; - - // Compute1DGaussianKernel produces a full 2N + 1 kernel. Since the kernel can be mirrored, - // compute only the upper half and mirror to the lower half. - - int index = radius; - if (radius & 1) { - // If N is odd, then use two samples. - // The centre texel gets sampled twice, so halve its influence for each sample. - // We essentially sample like this: - // Texel edges - // v v v v - // | | | | - // \-----^---/ Lower sample - // \---^-----/ Upper sample - get_new_weight(&kernel[halfradius], - &offset[halfradius], - temp_kernel[index] * 0.5f, - temp_kernel[index + 1]); - kernel[low_index] = kernel[halfradius]; - offset[low_index] = -offset[halfradius]; - index++; - low_index--; - } else { - // If N is even, then there are an even number of texels on either side of the centre texel. - // Sample the centre texel directly. - kernel[halfradius] = temp_kernel[index]; - offset[halfradius] = 0.0f; - } - index++; - - // Every other pair gets one sample. - for (int i = halfradius + 1; i < halfsize; index += 2, i++, low_index--) { - get_new_weight(&kernel[i], &offset[i], temp_kernel[index], temp_kernel[index + 1]); - offset[i] += static_cast(index - radius); - - // Mirror to lower half. - kernel[low_index] = kernel[i]; - offset[low_index] = -offset[i]; - } -} - -} // namespace SkGpuBlurUtils - -#endif // defined(SK_GANESH) diff --git a/src/core/SkGpuBlurUtils.h b/src/core/SkGpuBlurUtils.h deleted file mode 100644 index c16f20e29c1c..000000000000 --- a/src/core/SkGpuBlurUtils.h +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright 2013 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#ifndef SkGpuBlurUtils_DEFINED -#define SkGpuBlurUtils_DEFINED - -#include "include/core/SkTypes.h" - -#if defined(SK_GANESH) -#include "include/core/SkRefCnt.h" -#include "include/private/gpu/ganesh/GrTypesPriv.h" -#include "src/gpu/SkBackingFit.h" - -class GrRecordingContext; -namespace skgpu { -namespace ganesh { -class SurfaceDrawContext; -} -} // namespace skgpu -class GrSurfaceProxyView; -class GrTexture; - -class SkBitmap; -enum class SkTileMode; -struct SkRect; - -namespace SkGpuBlurUtils { - -/** Maximum sigma before the implementation downscales the input image. */ -static constexpr float kMaxSigma = 4.f; - -/** - * Applies a 2D Gaussian blur to a given texture. The blurred result is returned - * as a surfaceDrawContext in case the caller wishes to draw into the result. - * The GrSurfaceOrigin of the result will watch the GrSurfaceOrigin of srcView. The output - * color type, color space, and alpha type will be the same as the src. - * - * Note: one of sigmaX and sigmaY should be non-zero! - * @param context The GPU context - * @param srcView The source to be blurred. - * @param srcColorType The colorType of srcProxy - * @param srcAlphaType The alphaType of srcProxy - * @param srcColorSpace Color space of the source. - * @param dstBounds The destination bounds, relative to the source texture. - * @param srcBounds The source bounds, relative to the source texture's offset. No pixels - * will be sampled outside of this rectangle. - * @param sigmaX The blur's standard deviation in X. - * @param sigmaY The blur's standard deviation in Y. - * @param tileMode The mode to handle samples outside bounds. - * @param fit backing fit for the returned render target context - * @return The surfaceDrawContext containing the blurred result. - */ -std::unique_ptr GaussianBlur( - GrRecordingContext*, - GrSurfaceProxyView srcView, - GrColorType srcColorType, - SkAlphaType srcAlphaType, - sk_sp srcColorSpace, - SkIRect dstBounds, - SkIRect srcBounds, - float sigmaX, - float sigmaY, - SkTileMode mode, - SkBackingFit fit = SkBackingFit::kApprox); - -static const int kBlurRRectMaxDivisions = 6; - -// This method computes all the parameters for drawing a partially occluded nine-patched -// blurred rrect mask: -// rrectToDraw - the integerized rrect to draw in the mask -// widthHeight - how large to make the mask (rrectToDraw will be centered in this coord sys) -// rectXs, rectYs - the x & y coordinates of the covering geometry lattice -// texXs, texYs - the texture coordinate at each point in rectXs & rectYs -// It returns true if 'devRRect' is nine-patchable -bool ComputeBlurredRRectParams(const SkRRect& srcRRect, - const SkRRect& devRRect, - SkScalar sigma, - SkScalar xformedSigma, - SkRRect* rrectToDraw, - SkISize* widthHeight, - SkScalar rectXs[kBlurRRectMaxDivisions], - SkScalar rectYs[kBlurRRectMaxDivisions], - SkScalar texXs[kBlurRRectMaxDivisions], - SkScalar texYs[kBlurRRectMaxDivisions]); - -int CreateIntegralTable(float sixSigma, SkBitmap* table); - -void Compute1DGaussianKernel(float* kernel, float sigma, int radius); - -void Compute1DLinearGaussianKernel(float* kernel, float* offset, float sigma, int radius); - -// Any sigmas smaller than this are effectively an identity blur so can skip convolution at a higher -// level. The value was chosen because it corresponds roughly to a radius of 1/10px, and is slightly -// greater than sqrt(1/2*sigma^2) for SK_ScalarNearlyZero. -inline bool IsEffectivelyZeroSigma(float sigma) { return sigma <= 0.03f; } - -inline int SigmaRadius(float sigma) { - return IsEffectivelyZeroSigma(sigma) ? 0 : static_cast(ceilf(sigma * 3.0f)); -} - -inline int KernelWidth(int radius) { return 2 * radius + 1; } - -inline int LinearKernelWidth(int radius) { return radius + 1; } - -} // namespace SkGpuBlurUtils - -#endif // defined(SK_GANESH) - -#endif diff --git a/src/core/SkGraphics.cpp b/src/core/SkGraphics.cpp index ff703f04f0a6..2decae76f66d 100644 --- a/src/core/SkGraphics.cpp +++ b/src/core/SkGraphics.cpp @@ -18,6 +18,8 @@ #include "include/core/SkTime.h" #include "include/private/base/SkMath.h" #include "src/base/SkTSearch.h" +#include "src/core/SkBitmapProcState.h" +#include "src/core/SkBlitMask.h" #include "src/core/SkBlitter.h" #include "src/core/SkCpu.h" #include "src/core/SkGeometry.h" @@ -34,6 +36,8 @@ void SkGraphics::Init() { // SkGraphics::Init() must be thread-safe and idempotent. SkCpu::CacheRuntimeFeatures(); SkOpts::Init(); + SkOpts::Init_BitmapProcState(); + SkOpts::Init_BlitMask(); } /////////////////////////////////////////////////////////////////////////////// @@ -96,9 +100,3 @@ SkGraphics::SetOpenTypeSVGDecoderFactory(OpenTypeSVGDecoderFactory svgDecoderFac SkGraphics::OpenTypeSVGDecoderFactory SkGraphics::GetOpenTypeSVGDecoderFactory() { return gSVGDecoderFactory; } - -extern bool gSkVMAllowJIT; - -void SkGraphics::AllowJIT() { - gSkVMAllowJIT = true; -} diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp index d474632f1821..a7dc4e2828f6 100644 --- a/src/core/SkImageFilter.cpp +++ b/src/core/SkImageFilter.cpp @@ -20,16 +20,7 @@ #include "src/core/SkSpecialSurface.h" #include "src/core/SkValidationUtils.h" #include "src/core/SkWriteBuffer.h" -#if defined(SK_GANESH) -#include "include/gpu/GrRecordingContext.h" -#include "src/gpu/SkBackingFit.h" -#include "src/gpu/ganesh/GrColorSpaceXform.h" -#include "src/gpu/ganesh/GrDirectContextPriv.h" -#include "src/gpu/ganesh/GrRecordingContextPriv.h" -#include "src/gpu/ganesh/GrTextureProxy.h" -#include "src/gpu/ganesh/SkGr.h" -#include "src/gpu/ganesh/SurfaceFillContext.h" -#endif + #include /////////////////////////////////////////////////////////////////////////////////////////////////// @@ -106,6 +97,9 @@ bool SkImageFilter::canComputeFastBounds() const { bool SkImageFilter_Base::affectsTransparentBlack() const { if (this->onAffectsTransparentBlack()) { return true; + } else if (this->ignoreInputsAffectsTransparentBlack()) { + // TODO(skbug.com/14611): Automatically infer this from output bounds being finite + return false; } for (int i = 0; i < this->countInputs(); i++) { const SkImageFilter* input = this->getInput(i); @@ -166,6 +160,16 @@ SkImageFilter_Base::~SkImageFilter_Base() { SkImageFilterCache::Get()->purgeByImageFilter(this); } +std::pair, std::optional> +SkImageFilter_Base::Unflatten(SkReadBuffer& buffer) { + Common common; + if (!common.unflatten(buffer, 1)) { + return {nullptr, std::nullopt}; + } else { + return {common.getInput(0), common.optionalCropRect()}; + } +} + bool SkImageFilter_Base::Common::unflatten(SkReadBuffer& buffer, int expectedCount) { const int count = buffer.readInt(); if (!buffer.validate(count >= 0)) { @@ -217,17 +221,6 @@ void SkImageFilter_Base::flatten(SkWriteBuffer& buffer) const { } skif::FilterResult SkImageFilter_Base::filterImage(const skif::Context& context) const { - // TODO (michaelludwig) - Old filters have an implicit assumption that the source image - // (originally passed separately) has an origin of (0, 0). SkComposeImageFilter makes an effort - // to ensure that remains the case. Once everyone uses the new type systems for bounds, non - // (0, 0) source origins will be easy to support. - SkASSERT((!context.source().image() && context.source().layerBounds().isEmpty()) || - (context.source().image() && - context.source().layerBounds().left() == 0 && - context.source().layerBounds().top() == 0 && - context.source().layerBounds().right() == context.source().image()->width() && - context.source().layerBounds().bottom() == context.source().image()->height())); - // TODO: Once all image filters operate on FilterResult, we should allow null source images. // Some filters that use a source input will produce non-transparent black values even if the // input is fully transparent (null). For now, at least allow filters that do not use the source @@ -252,7 +245,7 @@ skif::FilterResult SkImageFilter_Base::filterImage(const skif::Context& context) result = this->onFilterImage(context); if (context.gpuBacked()) { - SkASSERT(!result.image() || result.image()->isTextureBacked()); + SkASSERT(!result.image() || result.image()->isGaneshBacked()); } if (context.cache()) { @@ -374,7 +367,8 @@ void SkImageFilter_Base::CropRect::applyTo(const SkIRect& imageBounds, const SkM } } -bool SkImageFilter_Base::applyCropRect(const Context& ctx, const SkIRect& srcBounds, +bool SkImageFilter_Base::applyCropRect(const skif::Context& ctx, + const SkIRect& srcBounds, SkIRect* dstBounds) const { SkIRect tmpDst = this->onFilterNodeBounds(srcBounds, ctx.ctm(), kForward_MapDirection, nullptr); fCropRect.applyTo(tmpDst, ctx.ctm(), this->onAffectsTransparentBlack(), dstBounds); @@ -388,8 +382,12 @@ bool SkImageFilter_Base::applyCropRect(const Context& ctx, const SkIRect& srcBou // Return a larger (newWidth x newHeight) copy of 'src' with black padding // around it. -static sk_sp pad_image(SkSpecialImage* src, const SkImageFilter_Base::Context& ctx, - int newWidth, int newHeight, int offX, int offY) { +static sk_sp pad_image(SkSpecialImage* src, + const skif::Context& ctx, + int newWidth, + int newHeight, + int offX, + int offY) { // We would like to operate in the source's color space (so that we return an "identical" // image, other than the padding. To achieve that, we'd create a new context using // src->getColorSpace() to replace ctx.colorSpace(). @@ -420,7 +418,7 @@ static sk_sp pad_image(SkSpecialImage* src, const SkImageFilter_ return surf->makeImageSnapshot(); } -sk_sp SkImageFilter_Base::applyCropRectAndPad(const Context& ctx, +sk_sp SkImageFilter_Base::applyCropRectAndPad(const skif::Context& ctx, SkSpecialImage* src, SkIPoint* srcOffset, SkIRect* bounds) const { @@ -555,12 +553,12 @@ sk_sp SkImageFilter_Base::filterInput(int index, } skif::FilterResult result = as_IFB(input)->filterImage(inputCtx); - SkASSERT(!result.image() || ctx.gpuBacked() == result.image()->isTextureBacked()); + SkASSERT(!result.image() || ctx.gpuBacked() == result.image()->isGaneshBacked()); return result.imageAndOffset(inputCtx, offset); } -SkImageFilter_Base::Context SkImageFilter_Base::mapContext(const Context& ctx) const { +skif::Context SkImageFilter_Base::mapContext(const skif::Context& ctx) const { // We don't recurse through the child input filters because that happens automatically // as part of the filterImage() evaluation. In this case, we want the bounds for the // edge from this node to its children, without the effects of the child filters. @@ -573,71 +571,7 @@ SkImageFilter_Base::Context SkImageFilter_Base::mapContext(const Context& ctx) c return ctx.withNewDesiredOutput(skif::LayerSpace(requiredInput)); } -#if defined(SK_GANESH) -sk_sp SkImageFilter_Base::DrawWithFP(GrRecordingContext* rContext, - std::unique_ptr fp, - const SkIRect& bounds, - SkColorType colorType, - const SkColorSpace* colorSpace, - const SkSurfaceProps& surfaceProps, - GrSurfaceOrigin surfaceOrigin, - GrProtected isProtected) { - GrImageInfo info(SkColorTypeToGrColorType(colorType), - kPremul_SkAlphaType, - sk_ref_sp(colorSpace), - bounds.size()); - - auto sfc = rContext->priv().makeSFC(info, - "ImageFilterBase_DrawWithFP", - SkBackingFit::kApprox, - 1, - GrMipmapped::kNo, - isProtected, - surfaceOrigin); - if (!sfc) { - return nullptr; - } - - SkIRect dstIRect = SkIRect::MakeWH(bounds.width(), bounds.height()); - SkRect srcRect = SkRect::Make(bounds); - sfc->fillRectToRectWithFP(srcRect, dstIRect, std::move(fp)); - - return SkSpecialImage::MakeDeferredFromGpu(rContext, - dstIRect, - kNeedNewImageUniqueID_SpecialImage, - sfc->readSurfaceView(), - sfc->colorInfo(), - surfaceProps); -} - -sk_sp SkImageFilter_Base::ImageToColorSpace(const skif::Context& ctx, - SkSpecialImage* src) { - // There are several conditions that determine if we actually need to convert the source to the - // destination's color space. Rather than duplicate that logic here, just try to make an xform - // object. If that produces something, then both are tagged, and the source is in a different - // gamut than the dest. There is some overhead to making the xform, but those are cached, and - // if we get one back, that means we're about to use it during the conversion anyway. - auto colorSpaceXform = GrColorSpaceXform::Make(src->getColorSpace(), src->alphaType(), - ctx.colorSpace(), kPremul_SkAlphaType); - - if (!colorSpaceXform) { - // No xform needed, just return the original image - return sk_ref_sp(src); - } - - sk_sp surf = ctx.makeSurface(src->dimensions()); - if (!surf) { - return sk_ref_sp(src); - } - SkCanvas* canvas = surf->getCanvas(); - SkASSERT(canvas); - SkPaint p; - p.setBlendMode(SkBlendMode::kSrc); - src->draw(canvas, 0, 0, SkSamplingOptions(), &p); - return surf->makeImageSnapshot(); -} -#endif // In repeat mode, when we are going to sample off one edge of the srcBounds we require the // opposite side be preserved. diff --git a/src/core/SkImageFilterTypes.cpp b/src/core/SkImageFilterTypes.cpp index 9443c3eceb0f..a406ccd5b57d 100644 --- a/src/core/SkImageFilterTypes.cpp +++ b/src/core/SkImageFilterTypes.cpp @@ -7,10 +7,17 @@ #include "src/core/SkImageFilterTypes.h" +#include "include/core/SkAlphaType.h" +#include "include/core/SkBlendMode.h" +#include "include/core/SkCanvas.h" +#include "include/core/SkColor.h" +#include "include/core/SkColorType.h" #include "include/core/SkImage.h" -#include "include/core/SkPicture.h" +#include "include/core/SkImageInfo.h" +#include "include/core/SkPaint.h" +#include "include/core/SkPicture.h" // IWYU pragma: keep #include "include/core/SkShader.h" -#include "include/core/SkTileMode.h" +#include "include/private/base/SkFloatingPoint.h" #include "src/core/SkImageFilter_Base.h" #include "src/core/SkMatrixPriv.h" #include "src/core/SkRectPriv.h" @@ -22,6 +29,8 @@ #include "src/core/SkRuntimeEffectPriv.h" #endif +#include + namespace skif { namespace { @@ -59,14 +68,23 @@ bool is_nearly_integer_translation(const LayerSpace& m, // Assumes 'image' is decal-tiled, so everything outside the image bounds but inside dstBounds is // transparent black, in which case the returned special image may be smaller than dstBounds. +// +// If 'clampSrcIfDisjoint' is true and the image bounds do not overlap with dstBounds, the closest +// edge/corner pixels of the image will be extracted, assuming it will be tiled with kClamp. std::pair, LayerSpace> extract_subset( const SkSpecialImage* image, LayerSpace origin, - const LayerSpace& dstBounds) { + const LayerSpace& dstBounds, + bool clampSrcIfDisjoint=false) { LayerSpace imageBounds(SkIRect::MakeXYWH(origin.x(), origin.y(), image->width(), image->height())); if (!imageBounds.intersect(dstBounds)) { - return {nullptr, {}}; + if (clampSrcIfDisjoint) { + auto edge = SkRectPriv::ClosestDisjointEdge(SkIRect(imageBounds), SkIRect(dstBounds)); + imageBounds = LayerSpace(edge); + } else { + return {nullptr, {}}; + } } // Offset the image subset directly to avoid issues negating (origin). With the prior @@ -104,6 +122,70 @@ void decompose_transform(const SkMatrix& transform, SkPoint representativePoint, } } +std::optional> periodic_axis_transform( + SkTileMode tileMode, + const LayerSpace& crop, + const LayerSpace& output) { + if (tileMode == SkTileMode::kClamp || tileMode == SkTileMode::kDecal) { + // Not periodic + return {}; + } + + // Lift crop dimensions into 64 bit so that we can combine with 'output' without worrying about + // overflowing 32 bits. + double cropL = (double) crop.left(); + double cropT = (double) crop.top(); + double cropWidth = crop.right() - cropL; + double cropHeight = crop.bottom() - cropT; + + // Calculate normalized periodic coordinates of 'output' relative to the 'crop' being tiled. + int periodL = sk_double_floor2int((output.left() - cropL) / cropWidth); + int periodT = sk_double_floor2int((output.top() - cropT) / cropHeight); + int periodR = sk_double_ceil2int((output.right() - cropL) / cropWidth); + int periodB = sk_double_ceil2int((output.bottom() - cropT) / cropHeight); + + if (periodR - periodL <= 1 && periodB - periodT <= 1) { + // The tiling pattern won't be visible, so we can draw the image without tiling and an + // adjusted transform. We calculate the final translation in double to be exact and then + // verify that it can round-trip as a float. + float sx = 1.f; + float sy = 1.f; + double tx = -cropL; + double ty = -cropT; + + if (tileMode == SkTileMode::kMirror) { + // Flip image when in odd periods on each axis. + if (periodL % 2 != 0) { + sx = -1.f; + tx = cropWidth - tx; + } + if (periodT % 2 != 0) { + sy = -1.f; + ty = cropHeight - ty; + } + } + // Now translate by periods and make relative to crop's top left again. Given 32-bit inputs, + // the period * dimension shouldn't overflow 64-bits. + tx += periodL * cropWidth + cropL; + ty += periodT * cropHeight + cropT; + + // Representing the periodic tiling as a float SkMatrix would lose the pixel precision + // required to represent it, so don't apply this optimization. + if (sk_double_saturate2int(tx) != (float) tx || + sk_double_saturate2int(ty) != (float) ty) { + return {}; + } + + SkMatrix periodicTransform; + periodicTransform.setScaleTranslate(sx, sy, (float) tx, (float) ty); + return LayerSpace(periodicTransform); + } else { + // Both low and high edges of the crop would be visible in 'output', or a mirrored + // boundary is visible in 'output'. Just keep the periodic tiling. + return {}; + } +} + #ifdef SK_ENABLE_SKSL // Returns true if decal tiling an image with 'imageBounds' subject to 'transform', limited to @@ -207,10 +289,6 @@ sk_sp apply_decal( #endif -bool fills_layer_bounds(const SkColorFilter* colorFilter) { - return colorFilter && as_CFB(colorFilter)->affectsTransparentBlack(); -} - // AutoSurface manages an SkSpecialSurface and canvas state to draw to a layer-space bounding box, // and then snap it into a FilterResult. It provides operators to be used directly as a canvas, // assuming surface creation succeeded. Usage: @@ -272,8 +350,30 @@ class AutoSurface { /////////////////////////////////////////////////////////////////////////////////////////////////// +Context Context::MakeRaster(const ContextInfo& info) { + // TODO (skbug:14286): Remove this forcing to 8888. Many legacy image filters only support + // N32 on CPU, but once they are implemented in terms of draws and SkSL they will support + // all color types, like the GPU backends. + ContextInfo n32 = info; + n32.fColorType = kN32_SkColorType; + auto makeSurfaceCallback = [](const SkImageInfo& imageInfo, + const SkSurfaceProps* props) { + return SkSpecialSurfaces::MakeRaster(imageInfo, *props); + }; + auto makeImageCallback = [](const SkIRect& subset, + sk_sp image, + const SkSurfaceProps& props) { + return SkSpecialImages::MakeFromRaster(subset, image, props); + }; + auto makeCachedBitmapCallback = [](const SkBitmap& data) { + return SkImages::RasterFromBitmap(data); + }; + return Context(n32, nullptr, makeSurfaceCallback, makeImageCallback, makeCachedBitmapCallback); +} + sk_sp Context::makeSurface(const SkISize& size, const SkSurfaceProps* props) const { + SkASSERT(fMakeSurfaceDelegate); if (!props) { props = &fInfo.fSurfaceProps; } @@ -282,24 +382,17 @@ sk_sp Context::makeSurface(const SkISize& size, fInfo.fColorType, kPremul_SkAlphaType, sk_ref_sp(fInfo.fColorSpace)); + return fMakeSurfaceDelegate(imageInfo, props); +} -#if defined(SK_GANESH) - if (fGaneshContext) { - // FIXME: Context should also store a surface origin that matches the source origin - return SkSpecialSurface::MakeRenderTarget(fGaneshContext, - imageInfo, - *props, - fGaneshOrigin); - } else -#endif -#if defined(SK_GRAPHITE) - if (fGraphiteRecorder) { - return SkSpecialSurface::MakeGraphite(fGraphiteRecorder, imageInfo, *props); - } else -#endif - { - return SkSpecialSurface::MakeRaster(imageInfo, *props); - } +sk_sp Context::makeImage(const SkIRect& subset, sk_sp image) const { + SkASSERT(fMakeImageDelegate); + return fMakeImageDelegate(subset, image, fInfo.fSurfaceProps); +} + +sk_sp Context::getCachedBitmap(const SkBitmap& data) const { + SkASSERT(fMakeCachedBitmapDelegate); + return fMakeCachedBitmapDelegate(data); } /////////////////////////////////////////////////////////////////////////////////////////////////// @@ -545,11 +638,33 @@ sk_sp FilterResult::imageAndOffset(const Context& ctx, SkIPoint* return image; } + +bool FilterResult::modifiesPixelsBeyondImage(const LayerSpace& dstBounds) const { + // If there is no transparency-affecting color filter and it's just decal tiling, it doesn't + // matter how the image geometry overlaps with the dst bounds. + if (!(fColorFilter && as_CFB(fColorFilter)->affectsTransparentBlack()) && + fTileMode == SkTileMode::kDecal) { + return false; + } + + // If the base image completely covers the render bounds then the effects of tiling won't be + // visible and it doesn't matter if any color filter affects transparent black. + if (SkRectPriv::QuadContainsRect(SkMatrix(fTransform), + SkIRect::MakeSize(fImage->dimensions()), + SkIRect(dstBounds))) { + return false; + } + + // Otherwise tiling or transparency-affecting color filters will modify the pixels beyond + // the image bounds that are still within render bounds. + return true; +} + bool FilterResult::isCropped(const LayerSpace& xtraTransform, const LayerSpace& dstBounds) const { // Tiling and color-filtering can completely fill 'fLayerBounds' in which case its edge is // a transition from possibly non-transparent to definitely transparent color. - bool fillsLayerBounds = fills_layer_bounds(fColorFilter.get()); + bool fillsLayerBounds = this->modifiesPixelsBeyondImage(dstBounds); if (!fillsLayerBounds) { // When that's not the case, 'fLayerBounds' may still be important if it crops the // edges of the original transformed image itself. @@ -574,39 +689,122 @@ bool FilterResult::isCropped(const LayerSpace& xtraTransform, } } +void FilterResult::updateTileMode(const Context& ctx, SkTileMode tileMode) { + if (fImage) { + fTileMode = tileMode; + if (tileMode != SkTileMode::kDecal) { + fLayerBounds = ctx.desiredOutput(); + } + } +} + FilterResult FilterResult::applyCrop(const Context& ctx, - const LayerSpace& crop) const { - LayerSpace tightBounds = crop; - // TODO(michaelludwig): Intersecting to the target output is only valid when the crop has - // decal tiling (the only current option). + const LayerSpace& crop, + SkTileMode tileMode) const { + static const LayerSpace kIdentity{SkMatrix::I()}; + + if (crop.isEmpty() || ctx.desiredOutput().isEmpty()) { + // An empty crop cannot be anything other than fully transparent + return {}; + } + + // First, determine how this image's layer bounds interact with the crop rect, which determines + // the portion of 'crop' that could have non-transparent content. + LayerSpace cropContent = crop; if (!fImage || - !tightBounds.intersect(ctx.desiredOutput()) || - !tightBounds.intersect(fLayerBounds)) { - // The desired output would be filled with transparent black. There should never be a - // color filter acting on an empty image that could change that assumption. - SkASSERT(fImage || !fColorFilter); + !cropContent.intersect(fLayerBounds)) { + // The pixels within 'crop' would be fully transparent, and tiling won't change that. + return {}; + } + + // Second, determine the subset of 'crop' that is relevant to ctx.desiredOutput(). + LayerSpace fittedCrop = crop; + if (tileMode == SkTileMode::kDecal || tileMode == SkTileMode::kClamp) { + // For both decal/clamp, we only care about the pixels within crop that are in the desired + // output, unless we are clamping and have to preserve edge pixels when there's no overlap. + if (!fittedCrop.intersect(ctx.desiredOutput())) { + if (tileMode == SkTileMode::kDecal) { + // The desired output would be filled with transparent black. + fittedCrop = LayerSpace::Empty(); + } else { + // We just need the closest row/column/corner of 'crop' to the desired output. + auto edge = SkRectPriv::ClosestDisjointEdge(SkIRect(crop), + SkIRect(ctx.desiredOutput())); + fittedCrop = LayerSpace(edge); + } + } + } + + // Third, check if there's overlap with the known non-transparent cropped content and what's + // used to tile the desired output. If not, the image is known to be empty. This modifies + // 'cropContent' and not 'fittedCrop' so that any transparent padding remains if we have to + // apply repeat/mirror tiling to the original geometry. + if (!cropContent.intersect(fittedCrop)) { return {}; } + // Fourth, a periodic tiling that covers the output with a single instance of the image can be + // simplified to just a transform. + auto periodicTransform = periodic_axis_transform(tileMode, fittedCrop, ctx.desiredOutput()); + if (periodicTransform) { + return this->applyTransform(ctx, *periodicTransform, FilterResult::kDefaultSampling); + } + + bool preserveTransparencyInCrop = false; + if (tileMode == SkTileMode::kDecal) { + // We can reduce the crop dimensions to what's non-transparent + fittedCrop = cropContent; + } else if (fittedCrop.contains(ctx.desiredOutput())) { + tileMode = SkTileMode::kDecal; + fittedCrop = ctx.desiredOutput(); + } else if (!cropContent.contains(fittedCrop)) { + // There is transparency in fittedCrop that must be resolved in order to maintain the new + // tiling geometry. + preserveTransparencyInCrop = true; + if (fTileMode == SkTileMode::kDecal && tileMode == SkTileMode::kClamp) { + // include 1px buffer for transparency from original kDecal tiling + cropContent.outset(skif::LayerSpace({1, 1})); + SkAssertResult(fittedCrop.intersect(cropContent)); + } + } // Otherwise cropContent == fittedCrop + + // Fifth, when the transform is an integer translation, any prior tiling and the new tiling + // can sometimes be addressed analytically without producing a new image. Moving the crop into + // the image dimensions allows future operations like applying a transform or color filter to + // be composed without rendering a new image since there will not be an intervening crop. + const bool doubleClamp = fTileMode == SkTileMode::kClamp && tileMode == SkTileMode::kClamp; LayerSpace origin; - if (!fills_layer_bounds(fColorFilter.get()) && - is_nearly_integer_translation(fTransform, &origin)) { - // We can lift the crop to earlier in the order of operations and apply it to the image - // subset directly. This does not rely on resolve() to call extract_subset() because it - // will still render a new image if there's a color filter. As such, we have to preserve - // the current color filter on the new FilterResult. - // NOTE: Even though applying a crop never renders a new image, moving the crop into the - // image dimensions allows future operations like applying a transform or color filter to - // be composed without rendering a new image since there is no longer an intervening crop. - FilterResult restrictedOutput = extract_subset(fImage.get(), origin, tightBounds); + if (!preserveTransparencyInCrop && + is_nearly_integer_translation(fTransform, &origin) && + (doubleClamp || !this->modifiesPixelsBeyondImage(fittedCrop))) { + // Since the transform is axis-aligned, the tile mode can be applied to the original + // image pre-transformation and still be consistent with the 'crop' geometry. When the + // original tile mode is decal, extract_subset is always valid. When the original mode is + // mirror/repeat, !modifiesPixelsBeyondImage() ensures that 'fittedCrop' is contained within + // the base image bounds, so extract_subset is valid. When the original mode is clamp + // and the new mode is not clamp, that is also the case. When both modes are clamp, we have + // to consider how 'fittedCrop' intersects (or doesn't) with the base image bounds. + FilterResult restrictedOutput = + extract_subset(fImage.get(), origin, fittedCrop, doubleClamp); + // This does not rely on resolve() to call extract_subset() because it will still render a + // new image if there's a color filter. As such, we have to preserve the current color + // filter on the new FilterResult. restrictedOutput.fColorFilter = fColorFilter; + restrictedOutput.updateTileMode(ctx, tileMode); return restrictedOutput; - } else { - // Otherwise cropping is the final operation to the FilterResult's image and can always be - // applied by adjusting the layer bounds. + } else if (tileMode == SkTileMode::kDecal) { + // A decal crop can always be applied as the final operation by adjusting layer bounds, and + // does not modify any prior tile mode. + SkASSERT(!preserveTransparencyInCrop); FilterResult restrictedOutput = *this; - restrictedOutput.fLayerBounds = tightBounds; + restrictedOutput.fLayerBounds = fittedCrop; return restrictedOutput; + } else { + // There is a non-trivial transform to the image data that must be applied before the + // non-decal tilemode is meant to be applied to the axis-aligned 'crop'. + FilterResult tiled = this->resolve(ctx, fittedCrop, true); + tiled.updateTileMode(ctx, tileMode); + return tiled; } } @@ -617,6 +815,10 @@ FilterResult FilterResult::applyColorFilter(const Context& ctx, // A null filter is the identity, so it should have been caught during image filter DAG creation SkASSERT(colorFilter); + if (ctx.desiredOutput().isEmpty()) { + return {}; + } + // Color filters are applied after the transform and image sampling, but before the fLayerBounds // crop. We can compose 'colorFilter' with any previously applied color filter regardless // of the transform/sample state, so long as it respects the effect of the current crop. @@ -625,26 +827,34 @@ FilterResult FilterResult::applyColorFilter(const Context& ctx, if (!fImage || !newLayerBounds.intersect(ctx.desiredOutput())) { // The current image's intersection with the desired output is fully transparent, but // the new color filter converts that into a non-transparent color. The desired output - // is filled with this color. - // TODO: When kClamp is supported, we can allocate a smaller surface - sk_sp surface = ctx.makeSurface(SkISize(ctx.desiredOutput().size())); - if (!surface) { - return {}; + // is filled with this color, but use a 1x1 surface and clamp tiling. + AutoSurface surface{ctx, + LayerSpace{SkIRect::MakeXYWH(ctx.desiredOutput().left(), + ctx.desiredOutput().top(), + 1, 1)}, + /*renderInParameterSpace=*/false}; + if (surface) { + SkPaint paint; + paint.setColor4f(SkColors::kTransparent, /*colorSpace=*/nullptr); + paint.setColorFilter(std::move(colorFilter)); + surface->drawPaint(paint); } - - SkPaint paint; - paint.setColor4f(SkColors::kTransparent, /*colorSpace=*/nullptr); - paint.setColorFilter(std::move(colorFilter)); - surface->getCanvas()->drawPaint(paint); - return {surface->makeImageSnapshot(), ctx.desiredOutput().topLeft()}; + FilterResult solidColor = surface.snap(); + solidColor.updateTileMode(ctx, SkTileMode::kClamp); + return solidColor; } if (this->isCropped(kIdentity, ctx.desiredOutput())) { // Since 'colorFilter' modifies transparent black, the new result's layer bounds must // be the desired output. But if the current image is cropped we need to resolve the // image to avoid losing the effect of the current 'fLayerBounds'. - FilterResult filtered = this->resolve(ctx, ctx.desiredOutput()); - return filtered.applyColorFilter(ctx, std::move(colorFilter)); + newLayerBounds.outset(LayerSpace({1, 1})); + SkAssertResult(newLayerBounds.intersect(ctx.desiredOutput())); + FilterResult filtered = this->resolve(ctx, newLayerBounds, + /*preserveTransparency=*/true); + filtered.fColorFilter = std::move(colorFilter); + filtered.updateTileMode(ctx, SkTileMode::kClamp); + return filtered; } // otherwise we can fill out to the desired output without worrying about losing the crop. @@ -725,7 +935,7 @@ static bool compatible_sampling(const SkSamplingOptions& currentSampling, FilterResult FilterResult::applyTransform(const Context& ctx, const LayerSpace &transform, const SkSamplingOptions &sampling) const { - if (!fImage) { + if (!fImage || ctx.desiredOutput().isEmpty()) { // Transformed transparent black remains transparent black. SkASSERT(!fColorFilter); return {}; @@ -785,17 +995,19 @@ FilterResult FilterResult::applyTransform(const Context& ctx, std::pair, LayerSpace> FilterResult::resolve( const Context& ctx, - LayerSpace dstBounds) const { + LayerSpace dstBounds, + bool preserveTransparency) const { // The layer bounds is the final clip, so it can always be used to restrict 'dstBounds'. Even // if there's a non-decal tile mode or transparent-black affecting color filter, those floods // are restricted to fLayerBounds. - if (!fImage || !dstBounds.intersect(fLayerBounds)) { + if (!fImage || (!preserveTransparency && !dstBounds.intersect(fLayerBounds))) { return {nullptr, {}}; } // If we have any extra effect to apply, there's no point in trying to extract a subset. - // TODO: Also factor in a non-decal tile mode - const bool subsetCompatible = !fColorFilter; + const bool subsetCompatible = !fColorFilter && + fTileMode == SkTileMode::kDecal && + !preserveTransparency; // TODO(michaelludwig): If we get to the point where all filter results track bounds in // floating point, then we can extend this case to any S+T transform. @@ -808,12 +1020,12 @@ std::pair, LayerSpace> FilterResult::resolve( SkSurfaceProps props = {}; AutoSurface surface{ctx, dstBounds, /*renderInParameterSpace=*/false, &props}; if (surface) { - this->draw(surface.canvas()); + this->draw(surface.canvas(), dstBounds); } return surface.snap(); } -void FilterResult::draw(SkCanvas* canvas) const { +void FilterResult::draw(SkCanvas* canvas, const LayerSpace& dstBounds) const { if (!fImage) { return; } @@ -827,7 +1039,6 @@ void FilterResult::draw(SkCanvas* canvas) const { paint.setBlendMode(SkBlendMode::kSrcOver); paint.setColorFilter(fColorFilter); - // If we are an integer translate, the default bilinear sampling *should* be equivalent to // nearest-neighbor. Going through the direct image-drawing path tends to detect this // and reduce sampling automatically. When we have to use an image shader, this isn't @@ -838,16 +1049,21 @@ void FilterResult::draw(SkCanvas* canvas) const { sampling = {}; } - if (fills_layer_bounds(fColorFilter.get())) { + if (this->modifiesPixelsBeyondImage(dstBounds)) { #ifdef SK_ENABLE_SKSL - // apply_decal consumes the transform, so we don't modify the canvas - paint.setShader(apply_decal(fTransform, fImage, fLayerBounds, sampling)); -#else - // Decal tiling might be distorted if transform has a high scale factor, but this is a rare - // scenario that requires rendering an intermediate image to fix without SkSL, so accept the - // potential distortion. - paint.setShader(fImage->asShader(SkTileMode::kDecal, sampling, SkMatrix(fTransform))); + if (fTileMode == SkTileMode::kDecal) { + // apply_decal consumes the transform, so we don't modify the canvas + paint.setShader(apply_decal(fTransform, fImage, fLayerBounds, sampling)); + } else #endif + { + // For clamp/repeat/mirror, tiling at the layer resolution vs. resolving the image to + // the layer resolution and then tiling produces much more compatible results than + // decal would, so just always use a simple shader. If we don't have SkSL to let us use + // apply_decal, this might introduce some distortion if there was a deferred transform + // with a high scale factor, but this is a rare scenario. + paint.setShader(fImage->asShader(fTileMode, sampling, SkMatrix(fTransform))); + } // Fill the canvas with the shader, relying on it to do the transform canvas->drawPaint(paint); } else { @@ -870,16 +1086,17 @@ sk_sp FilterResult::asShader(const Context& ctx, // FilterResult's layer bounds instead of the context's desired output, assuming that the layer // bounds reflect the bounds of the coords a parent shader will pass to eval(). const bool currentXformIsInteger = is_nearly_integer_translation(fTransform); - const bool nextXformIsInteger = - !(flags & ShaderFlags::kNonLinearSampling) && - (!(flags & ShaderFlags::kSampleInParameterSpace) || - is_nearly_integer_translation(LayerSpace(ctx.mapping().layerMatrix()))); + const bool nextXformIsInteger = !(flags & ShaderFlags::kNonTrivialSampling); SkSamplingOptions sampling = xtraSampling; const bool needsResolve = - flags & ShaderFlags::kForceResolveInputs || + // Deferred calculations on the input would be repeated with each sample + (flags & ShaderFlags::kSampledRepeatedly && + (fColorFilter || !SkColorSpace::Equals(fImage->getColorSpace(), ctx.colorSpace()))) || + // The deferred sampling options can't be merged with the one requested !compatible_sampling(fSamplingOptions, currentXformIsInteger, &sampling, nextXformIsInteger) || + // The deferred edge of the layer bounds is visible to sampling this->isCropped(LayerSpace(SkMatrix::I()), sampleBounds); // Downgrade to nearest-neighbor if the sequence of sampling doesn't do anything @@ -890,7 +1107,8 @@ sk_sp FilterResult::asShader(const Context& ctx, sk_sp shader; if (needsResolve) { - // The resolve takes care of fTransform (sans origin), fColorFilter, and fLayerBounds + // The resolve takes care of fTransform (sans origin), fTileMode, fColorFilter, and + // fLayerBounds auto [pixels, origin] = this->resolve(ctx, fLayerBounds); if (pixels) { shader = pixels->asShader(SkTileMode::kDecal, sampling, @@ -900,25 +1118,17 @@ sk_sp FilterResult::asShader(const Context& ctx, // Since we didn't need to resolve, we know the content being sampled isn't cropped by // fLayerBounds. fTransform and fColorFilter are handled in the shader directly. #ifdef SK_ENABLE_SKSL - shader = apply_decal(fTransform, fImage, sampleBounds, sampling); -#else - shader = fImage->asShader(SkTileMode::kDecal, sampling, SkMatrix(fTransform)); + if (fTileMode == SkTileMode::kDecal) { + shader = apply_decal(fTransform, fImage, sampleBounds, sampling); + } else #endif - if (shader && fColorFilter) { - shader = shader->makeWithColorFilter(fColorFilter); + { + shader = fImage->asShader(fTileMode, sampling, SkMatrix(fTransform)); } - } - if (shader && (flags & ShaderFlags::kSampleInParameterSpace)) { - // The FilterResult is meant to be sampled in layer space, but the shader this is feeding - // into is being sampled in parameter space. Add the inverse of the layerMatrix() (i.e. - // layer to parameter space) as a local matrix to convert from the parameter-space coords - // of the outer shader to the layer-space coords of the FilterResult). - SkMatrix layerToParam; - if (!ctx.mapping().layerMatrix().invert(&layerToParam)) { - return nullptr; + if (shader && fColorFilter) { + shader = shader->makeWithColorFilter(fColorFilter); } - shader = shader->makeWithLocalMatrix(layerToParam); } return shader; @@ -982,8 +1192,7 @@ FilterResult FilterResult::MakeFromImage(const Context& ctx, SkIRect srcSubset = RoundOut(srcRect); if (SkRect::Make(srcSubset) == srcRect) { // Construct an SkSpecialImage from the subset directly instead of drawing. - auto specialImage = SkSpecialImage::MakeFromImage( - ctx.getContext(), srcSubset, std::move(image), ctx.surfaceProps()); + sk_sp specialImage = ctx.makeImage(srcSubset, std::move(image)); // Treat the srcRect's top left as "layer" space since we are folding the src->dst transform // and the param->layer transform into a single transform step. @@ -1017,58 +1226,62 @@ FilterResult::Builder::Builder(const Context& context) : fContext(context) {} FilterResult::Builder::~Builder() = default; SkSpan> FilterResult::Builder::createInputShaders( - SkEnumBitMask flags, - const LayerSpace& outputBounds) { + const LayerSpace& outputBounds, + bool evaluateInParameterSpace) { + SkEnumBitMask xtraFlags = ShaderFlags::kNone; + SkMatrix layerToParam; + if (evaluateInParameterSpace) { + // The FilterResult is meant to be sampled in layer space, but the shader this is feeding + // into is being sampled in parameter space. Add the inverse of the layerMatrix() (i.e. + // layer to parameter space) as a local matrix to convert from the parameter-space coords + // of the outer shader to the layer-space coords of the FilterResult). + SkAssertResult(fContext.mapping().layerMatrix().invert(&layerToParam)); + // Automatically add nonTrivial sampling if the layer-to-parameter space mapping isn't + // also pixel aligned. + if (!is_nearly_integer_translation(LayerSpace(layerToParam))) { + xtraFlags |= ShaderFlags::kNonTrivialSampling; + } + } + fInputShaders.reserve(fInputs.size()); for (const SampledFilterResult& input : fInputs) { // Assume the input shader will be evaluated once per pixel in the output unless otherwise // specified when the FilterResult was added to the builder. auto sampleBounds = input.fSampleBounds ? *input.fSampleBounds : outputBounds; - fInputShaders.push_back(input.fImage.asShader( - fContext, input.fSampling, flags | input.fFlags, sampleBounds)); + auto shader = input.fImage.asShader(fContext, + input.fSampling, + input.fFlags | xtraFlags, + sampleBounds); + if (evaluateInParameterSpace && shader) { + shader = shader->makeWithLocalMatrix(layerToParam); + } + fInputShaders.push_back(std::move(shader)); } return SkSpan>(fInputShaders); } LayerSpace FilterResult::Builder::outputBounds( - SkEnumBitMask flags, std::optional> explicitOutput) const { - // Explicit bounds should only be provided if-and-only-if kExplicitOutputBounds flag is set. - SkASSERT(explicitOutput.has_value() == (flags & ShaderFlags::kExplicitOutputBounds)); - - LayerSpace output = LayerSpace::Empty(); - if (flags & ShaderFlags::kExplicitOutputBounds) { - output = *explicitOutput; - } else if (flags & ShaderFlags::kOutputFillsInputUnion) { - // The union of all inputs' layer bounds - if (fInputs.size() > 0) { - output = fInputs[0].fImage.layerBounds(); - for (int i = 1; i < fInputs.size(); ++i) { - output.join(fInputs[i].fImage.layerBounds()); - } + // Pessimistically assume output fills the full desired bounds + LayerSpace output = fContext.desiredOutput(); + if (explicitOutput.has_value()) { + // Intersect with the provided explicit bounds + if (!output.intersect(*explicitOutput)) { + return LayerSpace::Empty(); } - } else { - // Pessimistically assume output fills the full desired bounds - output = fContext.desiredOutput(); - } - - // Intersect against desired output now since a Builder never has to produce an image larger - // than its context's desired output. - if (!output.intersect(fContext.desiredOutput())) { - return LayerSpace::Empty(); } return output; } FilterResult FilterResult::Builder::drawShader(sk_sp shader, - SkEnumBitMask flags, - const LayerSpace& outputBounds) const { + const LayerSpace& outputBounds, + bool evaluateInParameterSpace) const { SkASSERT(!outputBounds.isEmpty()); // Should have been rejected before we created shaders if (!shader) { return {}; } - AutoSurface surface{fContext, outputBounds, flags & ShaderFlags::kSampleInParameterSpace}; + AutoSurface surface{fContext, outputBounds, evaluateInParameterSpace}; if (surface) { SkPaint paint; paint.setShader(std::move(shader)); @@ -1087,8 +1300,11 @@ FilterResult FilterResult::Builder::merge() { return fInputs[0].fImage; } - const LayerSpace outputBounds = - this->outputBounds(ShaderFlags::kOutputFillsInputUnion, std::nullopt); + const auto mergedBounds = LayerSpace::Union( + (int) fInputs.size(), + [this](int i) { return fInputs[i].fImage.layerBounds(); }); + const auto outputBounds = this->outputBounds(mergedBounds); + AutoSurface surface{fContext, outputBounds, /*renderInParameterSpace=*/false}; if (surface) { for (const SampledFilterResult& input : fInputs) { @@ -1096,7 +1312,7 @@ FilterResult FilterResult::Builder::merge() { input.fSampling == kDefaultSampling && input.fFlags == ShaderFlags::kNone); surface->save(); - input.fImage.draw(surface.canvas()); + input.fImage.draw(surface.canvas(), outputBounds); surface->restore(); } } diff --git a/src/core/SkImageFilterTypes.h b/src/core/SkImageFilterTypes.h index 5ced5ad3040e..6899835768bf 100644 --- a/src/core/SkImageFilterTypes.h +++ b/src/core/SkImageFilterTypes.h @@ -13,24 +13,38 @@ #include "include/core/SkMatrix.h" #include "include/core/SkPoint.h" #include "include/core/SkRect.h" +#include "include/core/SkRefCnt.h" #include "include/core/SkSamplingOptions.h" +#include "include/core/SkScalar.h" +#include "include/core/SkSize.h" +#include "include/core/SkSpan.h" +#include "include/core/SkSurfaceProps.h" +#include "include/core/SkTileMode.h" #include "include/core/SkTypes.h" #include "include/private/base/SkTArray.h" -#include "src/core/SkEnumBitMask.h" +#include "include/private/base/SkTPin.h" +#include "include/private/base/SkTo.h" +#include "src/base/SkEnumBitMask.h" #include "src/core/SkSpecialImage.h" +#include +#include #include +#include +class FilterResultImageResolver; // for testing class GrRecordingContext; -enum GrSurfaceOrigin : int; +class SkBitmap; +class SkCanvas; class SkImage; class SkImageFilter; class SkImageFilterCache; class SkPicture; +class SkShader; class SkSpecialSurface; -class SkSurfaceProps; - -class FilterResultImageResolver; // for testing +enum GrSurfaceOrigin : int; +enum SkColorType : int; +struct SkImageInfo; namespace skgpu::graphite { class Recorder; } @@ -65,6 +79,8 @@ struct Vector { Vector() = default; Vector(SkScalar x, SkScalar y) : fX(x), fY(y) {} explicit Vector(const SkVector& v) : fX(v.fX), fY(v.fY) {} + + bool isFinite() const { return SkScalarsAreFinite(fX, fY); } }; /////////////////////////////////////////////////////////////////////////////////////////////////// @@ -369,6 +385,21 @@ class LayerSpace { static LayerSpace Empty() { return LayerSpace(SkIRect::MakeEmpty()); } + // Utility function to iterate a collection of items that can map to LayerSpace bounds + // and returns the union of those bounding boxes. 'boundsFn' will be invoked with i = 0 to + // boundsCount-1. + template + static LayerSpace Union(int boundsCount, BoundsFn boundsFn) { + if (boundsCount <= 0) { + return LayerSpace::Empty(); + } + LayerSpace output = boundsFn(0); + for (int i = 1; i < boundsCount; ++i) { + output.join(boundsFn(i)); + } + return output; + } + // Parrot the SkIRect API while preserving coord space bool isEmpty() const { return fData.isEmpty64(); } bool contains(const LayerSpace& r) const { return fData.contains(r.fData); } @@ -530,9 +561,9 @@ class Mapping { // Sets this Mapping to the default decomposition of the canvas's total transform, given the // requirements of the 'filter'. Returns false if the decomposition failed or would produce an // invalid device matrix. Assumes 'ctm' is invertible. - bool SK_WARN_UNUSED_RESULT decomposeCTM(const SkMatrix& ctm, - const SkImageFilter* filter, - const skif::ParameterSpace& representativePt); + [[nodiscard]] bool decomposeCTM(const SkMatrix& ctm, + const SkImageFilter* filter, + const skif::ParameterSpace& representativePt); // Update the mapping's parameter-to-layer matrix to be pre-concatenated with the specified // local space transformation. This changes the definition of parameter space, any @@ -657,6 +688,7 @@ class FilterResult { FilterResult(sk_sp image, const LayerSpace& origin) : fImage(std::move(image)) , fSamplingOptions(kDefaultSampling) + , fTileMode(SkTileMode::kDecal) , fTransform(SkMatrix::Translate(origin.x(), origin.y())) , fColorFilter(nullptr) , fLayerBounds( @@ -702,7 +734,7 @@ class FilterResult { // Get the layer-space bounds of the result. This will incorporate any layer-space transform. LayerSpace layerBounds() const { return fLayerBounds; } - + SkTileMode tileMode() const { return fTileMode; } SkSamplingOptions sampling() const { return fSamplingOptions; } const SkColorFilter* colorFilter() const { return fColorFilter.get(); } @@ -711,12 +743,9 @@ class FilterResult { // desired output. When possible, the returned FilterResult will reuse the underlying image and // adjust its metadata. This will depend on the current transform and tile mode as well as how // the crop rect intersects this result's layer bounds. - // TODO (michaelludwig): All FilterResults are decal mode and there are no current usages that - // require force-padding a decal FilterResult so these arguments aren't implemented yet. FilterResult applyCrop(const Context& ctx, - const LayerSpace& crop) const; - // SkTileMode newTileMode=SkTileMode::kDecal, - // bool forcePad=false) const; + const LayerSpace& crop, + SkTileMode tileMode=SkTileMode::kDecal) const; // Produce a new FilterResult that is the transformation of this FilterResult. When this // result's sampling and transform are compatible with the new transformation, the returned @@ -745,14 +774,16 @@ class FilterResult { enum class ShaderFlags : int { kNone = 0, - kSampleInParameterSpace = 1 << 0, - kForceResolveInputs = 1 << 1, - kNonLinearSampling = 1 << 2, - kOutputFillsInputUnion = 1 << 3, - kExplicitOutputBounds = 1 << 4 - // TODO: Add options for input intersection, first input only, if needed. If it turns out - // union is only used for merge() and all other cases are fills-desired-output vs. explicit - // then maybe that flag goes away and eval() relies on optional.has_value(). + // A hint that the input FilterResult will be sampled repeatedly per pixel. If there's + // colorspace conversions or deferred color filtering, it's worth resolving to a temporary + // image so that those calculations are performed once per pixel instead of N times. + kSampledRepeatedly = 1 << 0, + // Specifies that the shader performs non-trivial operations on its coordinates to determine + // how to sample any input FilterResults, so their sampling options should not be converted + // to nearest-neighbor even if they appeared pixel-aligned with the output surface. + kNonTrivialSampling = 1 << 1, + // TODO: Add option to convey that the output can carry input tiling forward to make a + // smaller backing surface somehow. May not be a flag and just args passed to eval(). }; SK_DECL_BITMASK_OPS_FRIENDS(ShaderFlags) @@ -761,9 +792,16 @@ class FilterResult { // Renders this FilterResult into a new, but visually equivalent, image that fills 'dstBounds', // has default sampling, no color filter, and a transform that translates by only 'dstBounds's - // top-left corner. 'dstBounds' is always intersected with 'fLayerBounds'. + // top-left corner. 'dstBounds' is intersected with 'fLayerBounds' unless 'preserveTransparency' + // is true. std::pair, LayerSpace> - resolve(const Context& ctx, LayerSpace dstBounds) const; + resolve(const Context& ctx, LayerSpace dstBounds, + bool preserveTransparency=false) const; + + // Returns true if tiling and color filtering affect pixels outside of the image's bounds that + // are within the layer bounds (limited to 'dstBounds'). This does not consider the layer bounds + // which are considered separately in isCropped(). + bool modifiesPixelsBeyondImage(const LayerSpace& dstBounds) const; // Returns true if the effects of the fLayerBounds crop are visible when this image is drawn // with 'xtraTransform' restricted to 'dstBounds'. @@ -772,7 +810,7 @@ class FilterResult { // Draw directly to the canvas, which draws the same image as produced by resolve() but can be // useful if multiple operations need to be performed on the canvas. - void draw(SkCanvas* canvas) const; + void draw(SkCanvas* canvas, const LayerSpace& dstBounds) const; // Returns the FilterResult as a shader, ideally without resolving to an axis-aligned image. // 'xtraSampling' is the sampling that any parent shader applies to the FilterResult. @@ -782,12 +820,16 @@ class FilterResult { SkEnumBitMask flags, const LayerSpace& sampleBounds) const; + // Safely updates fTileMode, doing nothing if the FilterResult is empty. Updates the layer + // bounds to the context's desired output if the tilemode is not decal. + void updateTileMode(const Context& ctx, SkTileMode tileMode); + // The effective image of a FilterResult is 'fImage' sampled by 'fSamplingOptions' and // respecting 'fTileMode' (on the SkSpecialImage's subset), transformed by 'fTransform', // filtered by 'fColorFilter', and then clipped to 'fLayerBounds'. sk_sp fImage; SkSamplingOptions fSamplingOptions; - // SkTileMode fTileMode = SkTileMode::kDecal; + SkTileMode fTileMode; // Typically this will be an integer translation that encodes the origin of the top left corner, // but can become more complex when combined with applyTransform(). LayerSpace fTransform; @@ -836,8 +878,6 @@ class FilterResult::Builder { // Combine all added inputs by transforming them into equivalent SkShaders and invoking the // shader factory that binds them together into a single shader that fills the output surface. - // 'flags' and 'xtraSampling' control how the input FilterResults are converted to shaders, as - // well as defining the final output bounds. // // 'ShaderFn' should be an invokable type with the signature // (SkSpan>)->sk_sp @@ -845,22 +885,27 @@ class FilterResult::Builder { // input FilterResult was fully transparent, its corresponding shader will be null. 'ShaderFn' // should return a null shader its output would be fully transparent. // - // By default, the returned FilterResult will fill the Context's desired image. The 'flags' can - // optionally restrict this to other common bounds (e.g. union of inputs), or specify that - // explicit bounds are provided. If ShaderFlags::kExplicitOutputBounds is present, then the - // bounds must be set in 'explicitOutput'. In all cases, the layer bounds of the FilterResult - // are restricted by the builder's context's desired output. + // By default, the returned FilterResult will fill the Context's desired image. If + // 'explicitOutput' has a value, it is intersected with the Context's desired output bounds to + // produce a possibly restricted output surface that the evaluated shader is rendered into. + // + // The shader created by `ShaderFn` will by default be invoked with coordinates in the layer + // space of the Context. If `evaluateInParameterSpace` is true, the drawing matrix will be + // adjusted so that the shader processes coordinates mapped back into parameter space (the + // underlying output is still in layer space). In this case, it's assumed that the shaders for + // the added FilterResult inputs will be evaluated with coordinates also in parameter space, + // so they will be adjusted to map back to layer space before sampling their underlying images. template FilterResult eval(ShaderFn shaderFn, - SkEnumBitMask flags, - std::optional> explicitOutput = {}) { - auto outputBounds = this->outputBounds(flags, explicitOutput); + std::optional> explicitOutput = {}, + bool evaluateInParameterSpace=false) { + auto outputBounds = this->outputBounds(explicitOutput); if (outputBounds.isEmpty()) { return {}; } - auto inputShaders = this->createInputShaders(flags, outputBounds); - return this->drawShader(shaderFn(inputShaders), flags, outputBounds); + auto inputShaders = this->createInputShaders(outputBounds, evaluateInParameterSpace); + return this->drawShader(shaderFn(inputShaders), outputBounds, evaluateInParameterSpace); } private: @@ -871,15 +916,14 @@ class FilterResult::Builder { SkSamplingOptions fSampling; }; - SkSpan> createInputShaders(SkEnumBitMask flags, - const LayerSpace& outputBounds); + SkSpan> createInputShaders(const LayerSpace& outputBounds, + bool evaluateInParameterSpace); - LayerSpace outputBounds(SkEnumBitMask flags, - std::optional> explicitOutput) const; + LayerSpace outputBounds(std::optional> explicitOutput) const; FilterResult drawShader(sk_sp shader, - SkEnumBitMask flags, - const LayerSpace& outputBounds) const; + const LayerSpace& outputBounds, + bool evaluateInParameterSpace) const; const Context& fContext; // Must outlive the builder skia_private::STArray<1, SampledFilterResult> fInputs; @@ -912,30 +956,7 @@ struct ContextInfo { class Context { static constexpr GrSurfaceOrigin kUnusedOrigin = (GrSurfaceOrigin) 0; public: - static Context MakeRaster(const ContextInfo& info) { - // TODO (skbug:14286): Remove this forcing to 8888. Many legacy image filters only support - // N32 on CPU, but once they are implemented in terms of draws and SkSL they will support - // all color types, like the GPU backends. - ContextInfo n32 = info; - n32.fColorType = kN32_SkColorType; - return Context(n32, nullptr, kUnusedOrigin, nullptr); - } - -#if defined(SK_GANESH) - static Context MakeGanesh(GrRecordingContext* context, - GrSurfaceOrigin origin, - const ContextInfo& info) { - return Context(info, context, origin, nullptr); - } -#endif - -#if defined(SK_GRAPHITE) - static Context MakeGraphite(skgpu::graphite::Recorder* recorder, const ContextInfo& info) { - return Context(info, nullptr, kUnusedOrigin, recorder); - } -#endif - - Context() = default; // unitialized to support assignment in branches for MakeX() above + static Context MakeRaster(const ContextInfo& info); // The mapping that defines the transformation from local parameter space of the filters to the // layer space where the image filters are evaluated, as well as the remaining transformation @@ -961,9 +982,7 @@ class Context { // The output device's color type, which can be used for intermediate images to be // compatible with the eventual target of the filtered result. SkColorType colorType() const { return fInfo.fColorType; } -#if defined(SK_GANESH) - GrColorType grColorType() const { return SkColorTypeToGrColorType(fInfo.fColorType); } -#endif + // The output device's color space, so intermediate images can match, and so filtering can // be performed in the destination color space. SkColorSpace* colorSpace() const { return fInfo.fColorSpace; } @@ -991,68 +1010,80 @@ class Context { sk_sp makeSurface(const SkISize& size, const SkSurfaceProps* props = nullptr) const; + sk_sp makeImage(const SkIRect& subset, sk_sp image) const; + + sk_sp getCachedBitmap(const SkBitmap& data) const; + // Create a new context that matches this context, but with an overridden layer space. Context withNewMapping(const Mapping& mapping) const { ContextInfo info = fInfo; info.fMapping = mapping; - return Context(info, fGaneshContext, fGaneshOrigin, fGraphiteRecorder); + return Context(info, *this); } // Create a new context that matches this context, but with an overridden desired output rect. Context withNewDesiredOutput(const LayerSpace& desiredOutput) const { ContextInfo info = fInfo; info.fDesiredOutput = desiredOutput; - return Context(info, fGaneshContext, fGaneshOrigin, fGraphiteRecorder); + return Context(info, *this); } // Create a new context that matches this context, but with an overridden color space. Context withNewColorSpace(SkColorSpace* cs) const { ContextInfo info = fInfo; info.fColorSpace = cs; - return Context(info, fGaneshContext, fGaneshOrigin, fGraphiteRecorder); + return Context(info, *this); } // Create a new context that matches this context, but with an overridden source. - // TODO: Have this take just a FilterResult when no origin manipulation is required. - Context withNewSource(sk_sp source, LayerSpace origin) const { - // TODO: Some legacy image filter implementations assume that the source FilterResult's - // origin/transform is at (0,0). To accommodate that, we push the typical origin transform - // into the param-to-layer matrix and adjust the desired output. + Context withNewSource(const FilterResult& source) const { ContextInfo info = fInfo; - info.fMapping.applyOrigin(origin); - info.fDesiredOutput.offset(-origin); - info.fSource = FilterResult(std::move(source)); - return Context(info, fGaneshContext, fGaneshOrigin, fGraphiteRecorder); + info.fSource = source; + return Context(info, *this); } private: + using MakeSurfaceDelegate = std::function(const SkImageInfo& info, + const SkSurfaceProps* props)>; + + // For input images to be processed by image filters + using MakeImageDelegate = std::function( + const SkIRect& subset, sk_sp image, const SkSurfaceProps& props)>; + // For internal data to be accessed by filter implementations + using MakeCachedBitmapDelegate = std::function(const SkBitmap& data)>; + Context(const ContextInfo& info, GrRecordingContext* ganeshContext, - GrSurfaceOrigin ganeshOrigin, - skgpu::graphite::Recorder* graphiteRecorder) + MakeSurfaceDelegate msd, + MakeImageDelegate mid, + MakeCachedBitmapDelegate mbd) : fInfo(info) , fGaneshContext(ganeshContext) - , fGaneshOrigin(ganeshOrigin) - , fGraphiteRecorder(graphiteRecorder) { -#if defined(SK_GANESH) - SkASSERT(!fInfo.fSource.image() || - SkToBool(ganeshContext) == fInfo.fSource.image()->isTextureBacked()); -#else - SkASSERT(!SkToBool(ganeshContext)); -#endif - -#if defined(SK_GRAPHITE) - SkASSERT(!fInfo.fSource.image() || - SkToBool(graphiteRecorder) == fInfo.fSource.image()->isGraphiteBacked()); -#else - SkASSERT(!SkToBool(graphiteRecorder)); -#endif + , fMakeSurfaceDelegate(msd) + , fMakeImageDelegate(mid) + , fMakeCachedBitmapDelegate(mbd) { + SkASSERT(fMakeSurfaceDelegate); + SkASSERT(fMakeImageDelegate); + SkASSERT(fMakeCachedBitmapDelegate); } + Context(const ContextInfo& info, const Context& ctx) + : Context(info, + ctx.fGaneshContext, + ctx.fMakeSurfaceDelegate, + ctx.fMakeImageDelegate, + ctx.fMakeCachedBitmapDelegate) {} ContextInfo fInfo; - // Both will be null for CPU image filtering, or one will be non-null to select the GPU backend. + // This will be null for CPU image filtering. GrRecordingContext* fGaneshContext; - GrSurfaceOrigin fGaneshOrigin; - skgpu::graphite::Recorder* fGraphiteRecorder; + MakeSurfaceDelegate fMakeSurfaceDelegate; + MakeImageDelegate fMakeImageDelegate; + MakeCachedBitmapDelegate fMakeCachedBitmapDelegate; + + friend Context MakeGaneshContext(GrRecordingContext* context, + GrSurfaceOrigin origin, + const ContextInfo& info); + friend Context MakeGraphiteContext(skgpu::graphite::Recorder* recorder, + const ContextInfo& info); }; } // end namespace skif diff --git a/src/core/SkImageFilter_Base.h b/src/core/SkImageFilter_Base.h index e004fd5c6231..3aff21e65de1 100644 --- a/src/core/SkImageFilter_Base.h +++ b/src/core/SkImageFilter_Base.h @@ -18,16 +18,10 @@ #include -class GrFragmentProcessor; -class GrRecordingContext; - // True base class that all SkImageFilter implementations need to extend from. This provides the // actual API surface that Skia will use to compute the filtered images. class SkImageFilter_Base : public SkImageFilter { public: - // DEPRECATED - Use skif::Context directly. - using Context = skif::Context; - /** * Request a new filtered image to be created from the src image. The returned skif::Image * provides both the pixel data and the origin point that it should be drawn at, relative to @@ -130,6 +124,12 @@ class SkImageFilter_Base : public SkImageFilter { return kSkImageFilter_Type; } + // TODO: CreateProcs for now-removed image filter subclasses need to hook into + // SK_IMAGEFILTER_UNFLATTEN_COMMON, so this temporarily exposes it for the case where there's a + // single input filter, and can be removed when the legacy CreateProcs are deleted. + static std::pair, std::optional> + Unflatten(SkReadBuffer& buffer); + protected: // DEPRECATED: Will be removed once cropping is handled by a standalone image filter class CropRect { @@ -180,6 +180,14 @@ class SkImageFilter_Base : public SkImageFilter { */ bool unflatten(SkReadBuffer&, int expectedInputs); + std::optional optionalCropRect() const { + if (fCropRect.flags()) { + return fCropRect.rect(); + } else { + return {}; + } + } + const SkRect* cropRect() const { return fCropRect.flags() != 0x0 ? &fCropRect.rect() : nullptr; } @@ -202,7 +210,7 @@ class SkImageFilter_Base : public SkImageFilter { void flatten(SkWriteBuffer&) const override; // DEPRECATED - Use the private context-only variant - virtual sk_sp onFilterImage(const Context&, SkIPoint* offset) const { + virtual sk_sp onFilterImage(const skif::Context&, SkIPoint* offset) const { return nullptr; } @@ -215,7 +223,7 @@ class SkImageFilter_Base : public SkImageFilter { MapDirection, const SkIRect* inputRect) const; // DEPRECRATED - Call the Context-only getChildOutput() - sk_sp filterInput(int index, const Context& ctx, SkIPoint* offset) const; + sk_sp filterInput(int index, const skif::Context& ctx, SkIPoint* offset) const; // Helper function to calculate the required input/output of a specific child filter, // automatically handling if the child filter is null. @@ -271,7 +279,7 @@ class SkImageFilter_Base : public SkImageFilter { * necessary to provide a similar convenience function to compute the output bounds given the * images returned by filterInput(). */ - bool applyCropRect(const Context&, const SkIRect& srcBounds, SkIRect* dstBounds) const; + bool applyCropRect(const skif::Context&, const SkIRect& srcBounds, SkIRect* dstBounds) const; /** A variant of the above call which takes the original source bitmap and * source offset. If the resulting crop rect is not entirely contained by @@ -284,8 +292,10 @@ class SkImageFilter_Base : public SkImageFilter { * * DEPRECATED - Remove once cropping is handled by a separate filter. */ - sk_sp applyCropRectAndPad(const Context&, SkSpecialImage* src, - SkIPoint* srcOffset, SkIRect* bounds) const; + sk_sp applyCropRectAndPad(const skif::Context&, + SkSpecialImage* src, + SkIPoint* srcOffset, + SkIRect* bounds) const; /** * Creates a modified Context for use when recursing up the image filter DAG. @@ -296,25 +306,7 @@ class SkImageFilter_Base : public SkImageFilter { // TODO (michaelludwig) - I don't think this is necessary to keep as protected. Other than the // real use case in recursing through the DAG for filterInput(), it feels wrong for blur and // other filters to need to call it. - Context mapContext(const Context& ctx) const; - -#if defined(SK_GANESH) - static sk_sp DrawWithFP(GrRecordingContext* context, - std::unique_ptr fp, - const SkIRect& bounds, - SkColorType colorType, - const SkColorSpace* colorSpace, - const SkSurfaceProps&, - GrSurfaceOrigin surfaceOrigin, - GrProtected isProtected = GrProtected::kNo); - - /** - * Returns a version of the passed-in image (possibly the original), that is in the Context's - * colorspace and color type. This allows filters that do many - * texture samples to guarantee that any color space conversion has happened before running. - */ - static sk_sp ImageToColorSpace(const skif::Context& ctx, SkSpecialImage* src); -#endif + skif::Context mapContext(const skif::Context& ctx) const; // If 'srcBounds' will sample outside the border of 'originalSrcBounds' (i.e., the sample // will wrap around to the other side) we must preserve the far side of the src along that @@ -361,6 +353,12 @@ class SkImageFilter_Base : public SkImageFilter { */ virtual bool onAffectsTransparentBlack() const { return false; } + /** + * Return true if `affectsTransparentBlack()` should only be based on + * `onAffectsTransparentBlack()` and ignore the transparency behavior of child input filters. + */ + virtual bool ignoreInputsAffectsTransparentBlack() const { return false; } + /** * This is the virtual which should be overridden by the derived class to perform image * filtering. Subclasses are responsible for recursing to their input filters, although the @@ -463,7 +461,6 @@ void SkRegisterColorFilterImageFilterFlattenable(); void SkRegisterComposeImageFilterFlattenable(); void SkRegisterCropImageFilterFlattenable(); void SkRegisterDisplacementMapImageFilterFlattenable(); -void SkRegisterDropShadowImageFilterFlattenable(); void SkRegisterImageImageFilterFlattenable(); void SkRegisterLightingImageFilterFlattenables(); void SkRegisterMagnifierImageFilterFlattenable(); @@ -476,6 +473,9 @@ void SkRegisterPictureImageFilterFlattenable(); void SkRegisterRuntimeImageFilterFlattenable(); #endif void SkRegisterShaderImageFilterFlattenable(); -void SkRegisterTileImageFilterFlattenable(); + +// TODO(michaelludwig): These filters no longer have dedicated implementations, so their +// SkFlattenable create procs only need to remain to support old SkPictures. +void SkRegisterLegacyDropShadowImageFilterFlattenable(); #endif // SkImageFilter_Base_DEFINED diff --git a/src/core/SkImageGenerator.cpp b/src/core/SkImageGenerator.cpp index eec374732e60..666d91828d19 100644 --- a/src/core/SkImageGenerator.cpp +++ b/src/core/SkImageGenerator.cpp @@ -18,10 +18,6 @@ #include #include -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/Image_Graphite.h" -#endif - SkImageGenerator::SkImageGenerator(const SkImageInfo& info, uint32_t uniqueID) : fInfo(info) , fUniqueID(kNeedNewImageUniqueID == uniqueID ? SkNextID::ImageID() : uniqueID) diff --git a/src/core/SkMD5.cpp b/src/core/SkMD5.cpp index 43dc0db2617c..956be5499222 100644 --- a/src/core/SkMD5.cpp +++ b/src/core/SkMD5.cpp @@ -13,6 +13,7 @@ //SK_CPU_LENDIAN allows 32 bit <=> 8 bit conversions without copies (if alligned). //SK_CPU_FAST_UNALIGNED_ACCESS allows 32 bit <=> 8 bit conversions without copies if SK_CPU_LENDIAN. +#include "src/base/SkUtils.h" #include "src/core/SkMD5.h" #include "include/private/base/SkFeatures.h" @@ -97,6 +98,24 @@ SkMD5::Digest SkMD5::finish() { return digest; } +static SkString to_hex_string(const uint8_t* data, const char* hexDigits) { + SkString hexString(2 * sizeof(SkMD5::Digest::data)); + for (size_t i = 0; i < sizeof(SkMD5::Digest::data); ++i) { + uint8_t byte = data[i]; + hexString[2 * i + 0] = hexDigits[byte >> 4]; + hexString[2 * i + 1] = hexDigits[byte & 0xF]; + } + return hexString; +} + +SkString SkMD5::Digest::toHexString() const { + return to_hex_string(data, SkHexadecimalDigits::gUpper); +} + +SkString SkMD5::Digest::toLowercaseHexString() const { + return to_hex_string(data, SkHexadecimalDigits::gLower); +} + struct F { uint32_t operator()(uint32_t x, uint32_t y, uint32_t z) { //return (x & y) | ((~x) & z); return ((y ^ z) & x) ^ z; //equivelent but faster diff --git a/src/core/SkMD5.h b/src/core/SkMD5.h index 10cacf188bdc..9c3660a293d5 100644 --- a/src/core/SkMD5.h +++ b/src/core/SkMD5.h @@ -9,6 +9,7 @@ #define SkMD5_DEFINED #include "include/core/SkStream.h" +#include "include/core/SkString.h" #include "include/private/base/SkTo.h" #include @@ -26,11 +27,16 @@ class SkMD5 : public SkWStream { size_t bytesWritten() const final { return SkToSizeT(this->byteCount); } struct Digest { - uint8_t data[16]; - bool operator ==(Digest const& other) const { + SkString toHexString() const; + SkString toLowercaseHexString() const; + bool operator==(Digest const& other) const { return 0 == memcmp(data, other.data, sizeof(data)); } - bool operator !=(Digest const& other) const { return !(*this == other); } + bool operator!=(Digest const& other) const { + return !(*this == other); + } + + uint8_t data[16]; }; /** Computes and returns the digest. */ diff --git a/src/core/SkMask.cpp b/src/core/SkMask.cpp index d072b2297f7f..a11bedc1d983 100644 --- a/src/core/SkMask.cpp +++ b/src/core/SkMask.cpp @@ -39,7 +39,7 @@ size_t SkMask::computeTotalImageSize() const { /** We explicitly use this allocator for SkBimap pixels, so that we can freely assign memory allocated by one class to the other. */ -uint8_t* SkMask::AllocImage(size_t size, AllocType at) { +uint8_t* SkMaskBuilder::AllocImage(size_t size, AllocType at) { size_t aligned_size = SkSafeMath::Align4(size); unsigned flags = SK_MALLOC_THROW; if (at == kZeroInit_Alloc) { @@ -51,16 +51,16 @@ uint8_t* SkMask::AllocImage(size_t size, AllocType at) { /** We explicitly use this allocator for SkBimap pixels, so that we can freely assign memory allocated by one class to the other. */ -void SkMask::FreeImage(void* image) { +void SkMaskBuilder::FreeImage(void* image) { sk_free(image); } -SkMask SkMask::PrepareDestination(int radiusX, int radiusY, const SkMask& src) { +SkMaskBuilder SkMaskBuilder::PrepareDestination(int radiusX, int radiusY, const SkMask& src) { SkSafeMath safe; - SkMask dst; - dst.fImage = nullptr; - dst.fFormat = SkMask::kA8_Format; + SkMaskBuilder dst; + dst.image() = nullptr; + dst.format() = SkMask::kA8_Format; // dstW = srcW + 2 * radiusX; size_t dstW = safe.add(src.fBounds.width(), safe.add(radiusX, radiusX)); @@ -71,18 +71,18 @@ SkMask SkMask::PrepareDestination(int radiusX, int radiusY, const SkMask& src) { // We can only deal with masks that fit in INT_MAX and sides that fit in int. if (!SkTFitsIn(dstW) || !SkTFitsIn(dstH) || toAlloc > INT_MAX || !safe) { - dst.fBounds.setEmpty(); - dst.fRowBytes = 0; + dst.bounds().setEmpty(); + dst.rowBytes() = 0; return dst; } - dst.fBounds.setWH(SkTo(dstW), SkTo(dstH)); - dst.fBounds.offset(src.fBounds.x(), src.fBounds.y()); - dst.fBounds.offset(-radiusX, -radiusY); - dst.fRowBytes = SkTo(dstW); + dst.bounds().setWH(SkTo(dstW), SkTo(dstH)); + dst.bounds().offset(src.fBounds.x(), src.fBounds.y()); + dst.bounds().offset(-radiusX, -radiusY); + dst.rowBytes() = SkTo(dstW); if (src.fImage != nullptr) { - dst.fImage = SkMask::AllocImage(toAlloc); + dst.image() = SkMaskBuilder::AllocImage(toAlloc); } return dst; @@ -106,7 +106,7 @@ static int maskFormatToShift(SkMask::Format format) { return gMaskFormatToShift[format]; } -void* SkMask::getAddr(int x, int y) const { +const void* SkMask::getAddr(int x, int y) const { SkASSERT(kBW_Format != fFormat); SkASSERT(fBounds.contains(x, y)); SkASSERT(fImage); diff --git a/src/core/SkMask.h b/src/core/SkMask.h index 619dfcf76dba..bebd46193730 100644 --- a/src/core/SkMask.h +++ b/src/core/SkMask.h @@ -20,8 +20,6 @@ the 3-channel 3D format. These are passed to SkMaskFilter objects. */ struct SkMask { - SkMask() : fImage(nullptr) {} - enum Format : uint8_t { kBW_Format, //!< 1bit per pixel mask (e.g. monochrome) kA8_Format, //!< 8bits per pixel mask (e.g. antialiasing) @@ -35,10 +33,12 @@ struct SkMask { kCountMaskFormats = kSDF_Format + 1 }; - uint8_t* fImage; - SkIRect fBounds; - uint32_t fRowBytes; - Format fFormat; + SkMask(const uint8_t* img, const SkIRect& bounds, uint32_t rowBytes, Format format) + : fImage(img), fBounds(bounds), fRowBytes(rowBytes), fFormat(format) {} + uint8_t const * const fImage; + const SkIRect fBounds; + const uint32_t fRowBytes; + const Format fFormat; static bool IsValidFormat(uint8_t format) { return format < kCountMaskFormats; } @@ -62,7 +62,7 @@ struct SkMask { Asserts that the mask is kBW_Format, and that x,y are in range. x,y are in the same coordiate space as fBounds. */ - uint8_t* getAddr1(int x, int y) const { + const uint8_t* getAddr1(int x, int y) const { SkASSERT(kBW_Format == fFormat); SkASSERT(fBounds.contains(x, y)); SkASSERT(fImage != nullptr); @@ -73,7 +73,7 @@ struct SkMask { Asserts that the mask is kA8_Format, and that x,y are in range. x,y are in the same coordiate space as fBounds. */ - uint8_t* getAddr8(int x, int y) const { + const uint8_t* getAddr8(int x, int y) const { SkASSERT(kA8_Format == fFormat || kSDF_Format == fFormat); SkASSERT(fBounds.contains(x, y)); SkASSERT(fImage != nullptr); @@ -85,7 +85,7 @@ struct SkMask { * this asserts that the mask's format is kLCD16_Format, and that (x,y) * are contained in the mask's fBounds. */ - uint16_t* getAddrLCD16(int x, int y) const { + const uint16_t* getAddrLCD16(int x, int y) const { SkASSERT(kLCD16_Format == fFormat); SkASSERT(fBounds.contains(x, y)); SkASSERT(fImage != nullptr); @@ -98,7 +98,7 @@ struct SkMask { * this asserts that the mask's format is 32bits, and that (x,y) * are contained in the mask's fBounds. */ - uint32_t* getAddr32(int x, int y) const { + const uint32_t* getAddr32(int x, int y) const { SkASSERT(kARGB32_Format == fFormat); SkASSERT(fBounds.contains(x, y)); SkASSERT(fImage != nullptr); @@ -118,20 +118,7 @@ struct SkMask { * This should not be called with kBW_Format, as it will give unspecified * results (and assert in the debug build). */ - void* getAddr(int x, int y) const; - - enum AllocType { - kUninit_Alloc, - kZeroInit_Alloc, - }; - static uint8_t* AllocImage(size_t bytes, AllocType = kUninit_Alloc); - static void FreeImage(void* image); - - enum CreateMode { - kJustComputeBounds_CreateMode, //!< compute bounds and return - kJustRenderImage_CreateMode, //!< render into preallocate mask - kComputeBoundsAndRenderImage_CreateMode //!< compute bounds, alloc image and render into it - }; + const void* getAddr(int x, int y) const; /** Iterates over the coverage values along a scanline in a given SkMask::Format. Provides * constructor, copy constructor for creating @@ -141,11 +128,6 @@ struct SkMask { * operator< to compare two iterators */ template struct AlphaIter; - - /** - * Returns initial destination mask data padded by radiusX and radiusY - */ - static SkMask PrepareDestination(int radiusX, int radiusY, const SkMask& src); }; template <> struct SkMask::AlphaIter { @@ -231,13 +213,103 @@ template <> struct SkMask::AlphaIter { /////////////////////////////////////////////////////////////////////////////// +struct SkMaskBuilder : public SkMask { + SkMaskBuilder() : SkMask(nullptr, {0}, 0, SkMask::Format::kBW_Format) {} + SkMaskBuilder(const SkMaskBuilder&) = delete; + SkMaskBuilder(SkMaskBuilder&&) = default; + SkMaskBuilder& operator=(const SkMaskBuilder&) = delete; + SkMaskBuilder& operator=(SkMaskBuilder&& that) { + this->image() = that.image(); + this->bounds() = that.bounds(); + this->rowBytes() = that.rowBytes(); + this->format() = that.format(); + that.image() = nullptr; + return *this; + } + + SkMaskBuilder(uint8_t* img, const SkIRect& bounds, uint32_t rowBytes, Format format) + : SkMask(img, bounds, rowBytes, format) {} + + uint8_t*& image() { return *const_cast(&fImage); } + SkIRect& bounds() { return *const_cast(&fBounds); } + uint32_t& rowBytes() { return *const_cast(&fRowBytes); } + Format& format() { return *const_cast(&fFormat); } + + /** Returns the address of the byte that holds the specified bit. + Asserts that the mask is kBW_Format, and that x,y are in range. + x,y are in the same coordiate space as fBounds. + */ + uint8_t* getAddr1(int x, int y) { + return const_cast(this->SkMask::getAddr1(x, y)); + } + + /** Returns the address of the specified byte. + Asserts that the mask is kA8_Format, and that x,y are in range. + x,y are in the same coordiate space as fBounds. + */ + uint8_t* getAddr8(int x, int y) { + return const_cast(this->SkMask::getAddr8(x, y)); + } + + /** + * Return the address of the specified 16bit mask. In the debug build, + * this asserts that the mask's format is kLCD16_Format, and that (x,y) + * are contained in the mask's fBounds. + */ + uint16_t* getAddrLCD16(int x, int y) { + return const_cast(this->SkMask::getAddrLCD16(x, y)); + } + + /** + * Return the address of the specified 32bit mask. In the debug build, + * this asserts that the mask's format is 32bits, and that (x,y) + * are contained in the mask's fBounds. + */ + uint32_t* getAddr32(int x, int y) { + return const_cast(this->SkMask::getAddr32(x, y)); + } + + /** + * Returns the address of the specified pixel, computing the pixel-size + * at runtime based on the mask format. This will be slightly slower than + * using one of the routines where the format is implied by the name + * e.g. getAddr8 or getAddr32. + * + * x,y must be contained by the mask's bounds (this is asserted in the + * debug build, but not checked in the release build.) + * + * This should not be called with kBW_Format, as it will give unspecified + * results (and assert in the debug build). + */ + void* getAddr(int x, int y) { + return const_cast(this->SkMask::getAddr(x, y)); + } + + enum AllocType { + kUninit_Alloc, + kZeroInit_Alloc, + }; + static uint8_t* AllocImage(size_t bytes, AllocType = kUninit_Alloc); + static void FreeImage(void* image); + + enum CreateMode { + kJustComputeBounds_CreateMode, //!< compute bounds and return + kJustRenderImage_CreateMode, //!< render into preallocate mask + kComputeBoundsAndRenderImage_CreateMode //!< compute bounds, alloc image and render into it + }; + + /** + * Returns initial destination mask data padded by radiusX and radiusY + */ + static SkMaskBuilder PrepareDestination(int radiusX, int radiusY, const SkMask& src); +}; + /** * \using SkAutoMaskImage * * Stack class used to manage the fImage buffer in a SkMask. * When this object loses scope, the buffer is freed with SkMask::FreeImage(). */ -using SkAutoMaskFreeImage = - std::unique_ptr>; +using SkAutoMaskFreeImage = std::unique_ptr>; #endif diff --git a/src/core/SkMaskBlurFilter.cpp b/src/core/SkMaskBlurFilter.cpp index f159dbc57119..5af114c7e2a8 100644 --- a/src/core/SkMaskBlurFilter.cpp +++ b/src/core/SkMaskBlurFilter.cpp @@ -867,7 +867,7 @@ static void direct_blur_y(ToA8 toA8, const int strideOf8, } } -static SkIPoint small_blur(double sigmaX, double sigmaY, const SkMask& src, SkMask* dst) { +static SkIPoint small_blur(double sigmaX, double sigmaY, const SkMask& src, SkMaskBuilder* dst) { SkASSERT(sigmaX == sigmaY); // TODO SkASSERT(0.01 <= sigmaX && sigmaX < 2); SkASSERT(0.01 <= sigmaY && sigmaY < 2); @@ -893,12 +893,12 @@ static SkIPoint small_blur(double sigmaX, double sigmaY, const SkMask& src, SkMa prepareGauss(filterX, gaussFactorsX); prepareGauss(filterY, gaussFactorsY); - *dst = SkMask::PrepareDestination(radiusX, radiusY, src); + *dst = SkMaskBuilder::PrepareDestination(radiusX, radiusY, src); if (src.fImage == nullptr) { return {SkTo(radiusX), SkTo(radiusY)}; } if (dst->fImage == nullptr) { - dst->fBounds.setEmpty(); + dst->bounds().setEmpty(); return {0, 0}; } @@ -919,24 +919,24 @@ static SkIPoint small_blur(double sigmaX, double sigmaY, const SkMask& src, SkMa direct_blur_y(bw_to_a8, 1, radiusY, gaussFactorsY, src.fImage, srcRB, srcW, srcH, - dst->fImage + radiusX, dstRB); + dst->image() + radiusX, dstRB); break; case SkMask::kA8_Format: direct_blur_y(nullptr, 8, radiusY, gaussFactorsY, src.fImage, srcRB, srcW, srcH, - dst->fImage + radiusX, dstRB); + dst->image() + radiusX, dstRB); break; case SkMask::kARGB32_Format: direct_blur_y(argb32_to_a8, 32, radiusY, gaussFactorsY, src.fImage, srcRB, srcW, srcH, - dst->fImage + radiusX, dstRB); + dst->image() + radiusX, dstRB); break; case SkMask::kLCD16_Format: direct_blur_y(lcd_to_a8, 16, radiusY, gaussFactorsY, src.fImage, srcRB, srcW, srcH, - dst->fImage + radiusX, dstRB); + dst->image() + radiusX, dstRB); break; default: SK_ABORT("Unhandled format."); @@ -945,14 +945,14 @@ static SkIPoint small_blur(double sigmaX, double sigmaY, const SkMask& src, SkMa // Blur horizontally in place. direct_blur_x(radiusX, gaussFactorsX, dst->fImage + radiusX, dstRB, srcW, - dst->fImage, dstRB, dstW, dstH); + dst->image(), dstRB, dstW, dstH); return {radiusX, radiusY}; } // TODO: assuming sigmaW = sigmaH. Allow different sigmas. Right now the // API forces the sigmas to be the same. -SkIPoint SkMaskBlurFilter::blur(const SkMask& src, SkMask* dst) const { +SkIPoint SkMaskBlurFilter::blur(const SkMask& src, SkMaskBuilder* dst) const { if (fSigmaW < 2.0 && fSigmaH < 2.0) { return small_blur(fSigmaW, fSigmaH, src, dst); @@ -968,12 +968,12 @@ SkIPoint SkMaskBlurFilter::blur(const SkMask& src, SkMask* dst) const { borderH = planH.border(); SkASSERT(borderH >= 0 && borderW >= 0); - *dst = SkMask::PrepareDestination(borderW, borderH, src); + *dst = SkMaskBuilder::PrepareDestination(borderW, borderH, src); if (src.fImage == nullptr) { return {SkTo(borderW), SkTo(borderH)}; } if (dst->fImage == nullptr) { - dst->fBounds.setEmpty(); + dst->bounds().setEmpty(); return {0, 0}; } @@ -1044,7 +1044,7 @@ SkIPoint SkMaskBlurFilter::blur(const SkMask& src, SkMask* dst) const { const PlanGauss::Scan& scanH = planH.makeBlurScan(tmpW, buffer); for (int y = 0; y < tmpH; y++) { auto tmpStart = &tmp[y * tmpW]; - auto dstStart = &dst->fImage[y]; + auto dstStart = &dst->image()[y]; scanH.blur(tmpStart, tmpStart + tmpW, dstStart, dst->fRowBytes, dstStart + dst->fRowBytes * dstH); diff --git a/src/core/SkMaskBlurFilter.h b/src/core/SkMaskBlurFilter.h index fe10cf4abbfb..03e9d416906c 100644 --- a/src/core/SkMaskBlurFilter.h +++ b/src/core/SkMaskBlurFilter.h @@ -27,7 +27,7 @@ class SkMaskBlurFilter { bool hasNoBlur() const; // Given a src SkMask, generate dst SkMask returning the border width and height. - SkIPoint blur(const SkMask& src, SkMask* dst) const; + SkIPoint blur(const SkMask& src, SkMaskBuilder* dst) const; private: const double fSigmaW; diff --git a/src/core/SkMaskCache.cpp b/src/core/SkMaskCache.cpp index f08f4d7ee02e..b0e73a108429 100644 --- a/src/core/SkMaskCache.cpp +++ b/src/core/SkMaskCache.cpp @@ -36,10 +36,8 @@ struct RRectBlurKey : public SkResourceCache::Key { struct RRectBlurRec : public SkResourceCache::Rec { RRectBlurRec(RRectBlurKey key, const SkMask& mask, SkCachedData* data) - : fKey(key) + : fKey(key), fValue({{nullptr, mask.fBounds, mask.fRowBytes, mask.fFormat}, data}) { - fValue.fMask = mask; - fValue.fData = data; fValue.fData->attachToCacheAndRef(); } ~RRectBlurRec() override { @@ -58,7 +56,7 @@ struct RRectBlurRec : public SkResourceCache::Rec { static bool Visitor(const SkResourceCache::Rec& baseRec, void* contextData) { const RRectBlurRec& rec = static_cast(baseRec); - MaskValue* result = (MaskValue*)contextData; + SkTLazy* result = (SkTLazy*)contextData; SkCachedData* tmpData = rec.fValue.fData; tmpData->ref(); @@ -66,23 +64,24 @@ struct RRectBlurRec : public SkResourceCache::Rec { tmpData->unref(); return false; } - *result = rec.fValue; + result->init(rec.fValue); return true; } }; } // namespace SkCachedData* SkMaskCache::FindAndRef(SkScalar sigma, SkBlurStyle style, - const SkRRect& rrect, SkMask* mask, SkResourceCache* localCache) { - MaskValue result; + const SkRRect& rrect, SkTLazy* mask, + SkResourceCache* localCache) { + SkTLazy result; RRectBlurKey key(sigma, rrect, style); if (!CHECK_LOCAL(localCache, find, Find, key, RRectBlurRec::Visitor, &result)) { return nullptr; } - *mask = result.fMask; - mask->fImage = (uint8_t*)(result.fData->data()); - return result.fData; + mask->init(static_cast(result->fData->data()), + result->fMask.fBounds, result->fMask.fRowBytes, result->fMask.fFormat); + return result->fData; } void SkMaskCache::Add(SkScalar sigma, SkBlurStyle style, @@ -127,10 +126,8 @@ struct RectsBlurKey : public SkResourceCache::Key { struct RectsBlurRec : public SkResourceCache::Rec { RectsBlurRec(RectsBlurKey key, const SkMask& mask, SkCachedData* data) - : fKey(key) + : fKey(key), fValue({{nullptr, mask.fBounds, mask.fRowBytes, mask.fFormat}, data}) { - fValue.fMask = mask; - fValue.fData = data; fValue.fData->attachToCacheAndRef(); } ~RectsBlurRec() override { @@ -149,7 +146,7 @@ struct RectsBlurRec : public SkResourceCache::Rec { static bool Visitor(const SkResourceCache::Rec& baseRec, void* contextData) { const RectsBlurRec& rec = static_cast(baseRec); - MaskValue* result = static_cast(contextData); + SkTLazy* result = static_cast*>(contextData); SkCachedData* tmpData = rec.fValue.fData; tmpData->ref(); @@ -157,24 +154,24 @@ struct RectsBlurRec : public SkResourceCache::Rec { tmpData->unref(); return false; } - *result = rec.fValue; + result->init(rec.fValue); return true; } }; } // namespace SkCachedData* SkMaskCache::FindAndRef(SkScalar sigma, SkBlurStyle style, - const SkRect rects[], int count, SkMask* mask, + const SkRect rects[], int count, SkTLazy* mask, SkResourceCache* localCache) { - MaskValue result; + SkTLazy result; RectsBlurKey key(sigma, style, rects, count); if (!CHECK_LOCAL(localCache, find, Find, key, RectsBlurRec::Visitor, &result)) { return nullptr; } - *mask = result.fMask; - mask->fImage = (uint8_t*)(result.fData->data()); - return result.fData; + mask->init(static_cast(result->fData->data()), + result->fMask.fBounds, result->fMask.fRowBytes, result->fMask.fFormat); + return result->fData; } void SkMaskCache::Add(SkScalar sigma, SkBlurStyle style, diff --git a/src/core/SkMaskCache.h b/src/core/SkMaskCache.h index d22a5d1be078..075aeb535378 100644 --- a/src/core/SkMaskCache.h +++ b/src/core/SkMaskCache.h @@ -11,6 +11,7 @@ #include "include/core/SkBlurTypes.h" #include "include/core/SkRRect.h" #include "include/core/SkRect.h" +#include "src/base/SkTLazy.h" #include "src/core/SkCachedData.h" #include "src/core/SkMask.h" #include "src/core/SkResourceCache.h" @@ -24,10 +25,10 @@ class SkMaskCache { * On failure, return nullptr. */ static SkCachedData* FindAndRef(SkScalar sigma, SkBlurStyle style, - const SkRRect& rrect, SkMask* mask, + const SkRRect& rrect, SkTLazy* mask, SkResourceCache* localCache = nullptr); static SkCachedData* FindAndRef(SkScalar sigma, SkBlurStyle style, - const SkRect rects[], int count, SkMask* mask, + const SkRect rects[], int count, SkTLazy* mask, SkResourceCache* localCache = nullptr); /** diff --git a/src/core/SkMaskFilter.cpp b/src/core/SkMaskFilter.cpp index 8a494608900c..9501be217a1c 100644 --- a/src/core/SkMaskFilter.cpp +++ b/src/core/SkMaskFilter.cpp @@ -17,6 +17,7 @@ #include "include/core/SkTypes.h" #include "include/private/base/SkTemplates.h" #include "src/base/SkAutoMalloc.h" +#include "src/base/SkTLazy.h" #include "src/core/SkBlitter.h" #include "src/core/SkCachedData.h" #include "src/core/SkDraw.h" @@ -28,10 +29,6 @@ #include #include -#if defined(SK_GANESH) || defined(SK_GRAPHITE) -#include "src/text/gpu/SDFMaskFilter.h" -#endif - class SkRRect; struct SkDeserialProcs; @@ -40,7 +37,8 @@ SkMaskFilterBase::NinePatch::~NinePatch() { SkASSERT((const void*)fMask.fImage == fCache->data()); fCache->unref(); } else { - SkMask::FreeImage(fMask.fImage); + // fMask is about to be destroyed and "owns" its fImage. + SkMaskBuilder::FreeImage(const_cast(fMask.fImage)); } } @@ -48,14 +46,16 @@ bool SkMaskFilterBase::asABlur(BlurRec*) const { return false; } -static void extractMaskSubset(const SkMask& src, SkMask* dst) { - SkASSERT(src.fBounds.contains(dst->fBounds)); +static SkMask extractMaskSubset(const SkMask& src, SkIRect bounds, int32_t newX, int32_t newY) { + SkASSERT(src.fBounds.contains(bounds)); - const int dx = dst->fBounds.left() - src.fBounds.left(); - const int dy = dst->fBounds.top() - src.fBounds.top(); - dst->fImage = src.fImage + dy * src.fRowBytes + dx; - dst->fRowBytes = src.fRowBytes; - dst->fFormat = src.fFormat; + const int dx = bounds.left() - src.fBounds.left(); + const int dy = bounds.top() - src.fBounds.top(); + bounds.offsetTo(newX, newY); + return SkMask(src.fImage + dy * src.fRowBytes + dx, + bounds, + src.fRowBytes, + src.fFormat); } static void blitClippedMask(SkBlitter* blitter, const SkMask& mask, @@ -78,46 +78,42 @@ static void draw_nine_clipped(const SkMask& mask, const SkIRect& outerR, const SkIRect& clipR, SkBlitter* blitter) { int cx = center.x(); int cy = center.y(); - SkMask m; + SkIRect bounds; // top-left - m.fBounds = mask.fBounds; - m.fBounds.fRight = cx; - m.fBounds.fBottom = cy; - if (m.fBounds.width() > 0 && m.fBounds.height() > 0) { - extractMaskSubset(mask, &m); - m.fBounds.offsetTo(outerR.left(), outerR.top()); + bounds = mask.fBounds; + bounds.fRight = cx; + bounds.fBottom = cy; + if (bounds.width() > 0 && bounds.height() > 0) { + SkMask m = extractMaskSubset(mask, bounds, outerR.left(), outerR.top()); blitClippedMask(blitter, m, m.fBounds, clipR); } // top-right - m.fBounds = mask.fBounds; - m.fBounds.fLeft = cx + 1; - m.fBounds.fBottom = cy; - if (m.fBounds.width() > 0 && m.fBounds.height() > 0) { - extractMaskSubset(mask, &m); - m.fBounds.offsetTo(outerR.right() - m.fBounds.width(), outerR.top()); + bounds = mask.fBounds; + bounds.fLeft = cx + 1; + bounds.fBottom = cy; + if (bounds.width() > 0 && bounds.height() > 0) { + SkMask m = extractMaskSubset(mask, bounds, outerR.right() - bounds.width(), outerR.top()); blitClippedMask(blitter, m, m.fBounds, clipR); } // bottom-left - m.fBounds = mask.fBounds; - m.fBounds.fRight = cx; - m.fBounds.fTop = cy + 1; - if (m.fBounds.width() > 0 && m.fBounds.height() > 0) { - extractMaskSubset(mask, &m); - m.fBounds.offsetTo(outerR.left(), outerR.bottom() - m.fBounds.height()); + bounds = mask.fBounds; + bounds.fRight = cx; + bounds.fTop = cy + 1; + if (bounds.width() > 0 && bounds.height() > 0) { + SkMask m = extractMaskSubset(mask, bounds, outerR.left(), outerR.bottom() - bounds.height()); blitClippedMask(blitter, m, m.fBounds, clipR); } // bottom-right - m.fBounds = mask.fBounds; - m.fBounds.fLeft = cx + 1; - m.fBounds.fTop = cy + 1; - if (m.fBounds.width() > 0 && m.fBounds.height() > 0) { - extractMaskSubset(mask, &m); - m.fBounds.offsetTo(outerR.right() - m.fBounds.width(), - outerR.bottom() - m.fBounds.height()); + bounds = mask.fBounds; + bounds.fLeft = cx + 1; + bounds.fTop = cy + 1; + if (bounds.width() > 0 && bounds.height() > 0) { + SkMask m = extractMaskSubset(mask, bounds, outerR.right() - bounds.width(), + outerR.bottom() - bounds.height()); blitClippedMask(blitter, m, m.fBounds, clipR); } @@ -166,23 +162,21 @@ static void draw_nine_clipped(const SkMask& mask, const SkIRect& outerR, // left r.setLTRB(outerR.left(), innerR.top(), innerR.left(), innerR.bottom()); if (r.intersect(clipR)) { - SkMask leftMask; - leftMask.fImage = mask.getAddr8(mask.fBounds.left() + r.left() - outerR.left(), - mask.fBounds.top() + cy); - leftMask.fBounds = r; - leftMask.fRowBytes = 0; // so we repeat the scanline for our height - leftMask.fFormat = SkMask::kA8_Format; + SkMask leftMask(mask.getAddr8(mask.fBounds.left() + r.left() - outerR.left(), + mask.fBounds.top() + cy), + r, + 0, // so we repeat the scanline for our height + SkMask::kA8_Format); blitter->blitMask(leftMask, r); } // right r.setLTRB(innerR.right(), innerR.top(), outerR.right(), innerR.bottom()); if (r.intersect(clipR)) { - SkMask rightMask; - rightMask.fImage = mask.getAddr8(mask.fBounds.right() - outerR.right() + r.left(), - mask.fBounds.top() + cy); - rightMask.fBounds = r; - rightMask.fRowBytes = 0; // so we repeat the scanline for our height - rightMask.fFormat = SkMask::kA8_Format; + SkMask rightMask(mask.getAddr8(mask.fBounds.right() - outerR.right() + r.left(), + mask.fBounds.top() + cy), + r, + 0, // so we repeat the scanline for our height + SkMask::kA8_Format); blitter->blitMask(rightMask, r); } } @@ -216,15 +210,14 @@ bool SkMaskFilterBase::filterRRect(const SkRRect& devRRect, const SkMatrix& matr // Attempt to speed up drawing by creating a nine patch. If a nine patch // cannot be used, return false to allow our caller to recover and perform // the drawing another way. - NinePatch patch; - patch.fMask.fImage = nullptr; + SkTLazy patch; if (kTrue_FilterReturn != this->filterRRectToNine(devRRect, matrix, clip.getBounds(), &patch)) { - SkASSERT(nullptr == patch.fMask.fImage); + SkASSERT(!patch.isValid()); return false; } - draw_nine(patch.fMask, patch.fOuterRect, patch.fCenter, true, clip, blitter); + draw_nine(patch->fMask, patch->fOuterRect, patch->fCenter, true, clip, blitter); return true; } @@ -237,26 +230,26 @@ bool SkMaskFilterBase::filterPath(const SkPath& devPath, const SkMatrix& matrix, rectCount = countNestedRects(devPath, rects); } if (rectCount > 0) { - NinePatch patch; + SkTLazy patch; switch (this->filterRectsToNine(rects, rectCount, matrix, clip.getBounds(), &patch)) { case kFalse_FilterReturn: - SkASSERT(nullptr == patch.fMask.fImage); + SkASSERT(!patch.isValid()); return false; case kTrue_FilterReturn: - draw_nine(patch.fMask, patch.fOuterRect, patch.fCenter, 1 == rectCount, clip, + draw_nine(patch->fMask, patch->fOuterRect, patch->fCenter, 1 == rectCount, clip, blitter); return true; case kUnimplemented_FilterReturn: - SkASSERT(nullptr == patch.fMask.fImage); + SkASSERT(!patch.isValid()); // fall out break; } } - SkMask srcM, dstM; + SkMaskBuilder srcM, dstM; #if defined(SK_BUILD_FOR_FUZZER) if (devPath.countVerbs() > 1000 || devPath.countPoints() > 1000) { @@ -264,16 +257,16 @@ bool SkMaskFilterBase::filterPath(const SkPath& devPath, const SkMatrix& matrix, } #endif if (!SkDraw::DrawToMask(devPath, clip.getBounds(), this, &matrix, &srcM, - SkMask::kComputeBoundsAndRenderImage_CreateMode, + SkMaskBuilder::kComputeBoundsAndRenderImage_CreateMode, style)) { return false; } - SkAutoMaskFreeImage autoSrc(srcM.fImage); + SkAutoMaskFreeImage autoSrc(srcM.image()); if (!this->filterMask(&dstM, srcM, matrix, nullptr)) { return false; } - SkAutoMaskFreeImage autoDst(dstM.fImage); + SkAutoMaskFreeImage autoDst(dstM.image()); // if we get here, we need to (possibly) resolve the clip and blitter SkAAClipBlitterWrapper wrapper(clip, blitter); @@ -294,22 +287,19 @@ bool SkMaskFilterBase::filterPath(const SkPath& devPath, const SkMatrix& matrix, SkMaskFilterBase::FilterReturn SkMaskFilterBase::filterRRectToNine(const SkRRect&, const SkMatrix&, - const SkIRect& clipBounds, NinePatch*) const { + const SkIRect& clipBounds, SkTLazy*) const { return kUnimplemented_FilterReturn; } SkMaskFilterBase::FilterReturn SkMaskFilterBase::filterRectsToNine(const SkRect[], int count, const SkMatrix&, - const SkIRect& clipBounds, NinePatch*) const { + const SkIRect& clipBounds, SkTLazy*) const { return kUnimplemented_FilterReturn; } void SkMaskFilterBase::computeFastBounds(const SkRect& src, SkRect* dst) const { - SkMask srcM, dstM; - - srcM.fBounds = src.roundOut(); - srcM.fRowBytes = 0; - srcM.fFormat = SkMask::kA8_Format; + SkMask srcM(nullptr, src.roundOut(), 0, SkMask::kA8_Format); + SkMaskBuilder dstM; SkIPoint margin; // ignored if (this->filterMask(&dstM, srcM, SkMatrix::I(), &margin)) { @@ -327,9 +317,6 @@ SkRect SkMaskFilter::approximateFilteredBounds(const SkRect& src) const { void SkMaskFilter::RegisterFlattenables() { sk_register_blur_maskfilter_createproc(); -#if (defined(SK_GANESH) || defined(SK_GRAPHITE)) && !defined(SK_DISABLE_SDF_TEXT) - sktext::gpu::register_sdf_maskfilter_createproc(); -#endif } sk_sp SkMaskFilter::Deserialize(const void* data, size_t size, diff --git a/src/core/SkMaskFilterBase.h b/src/core/SkMaskFilterBase.h index dc48d53ed5e0..e54bf8fbcec3 100644 --- a/src/core/SkMaskFilterBase.h +++ b/src/core/SkMaskFilterBase.h @@ -14,6 +14,7 @@ #include "include/core/SkPaint.h" #include "include/core/SkStrokeRec.h" #include "include/private/base/SkNoncopyable.h" +#include "src/base/SkTLazy.h" #include "src/core/SkMask.h" class GrClip; @@ -61,7 +62,7 @@ class SkMaskFilterBase : public SkMaskFilter { applying the filter. If returning false, ignore this parameter. @return true if the dst mask was correctly created. */ - virtual bool filterMask(SkMask* dst, const SkMask& src, const SkMatrix&, + virtual bool filterMask(SkMaskBuilder* dst, const SkMask& src, const SkMatrix&, SkIPoint* margin) const = 0; enum class Type { @@ -117,13 +118,14 @@ class SkMaskFilterBase : public SkMaskFilter { class NinePatch : ::SkNoncopyable { public: - NinePatch() : fCache(nullptr) { } + NinePatch(const SkMask& mask, SkIRect outerRect, SkIPoint center, SkCachedData* cache) + : fMask(mask), fOuterRect(outerRect), fCenter(center), fCache(cache) {} ~NinePatch(); SkMask fMask; // fBounds must have [0,0] in its top-left SkIRect fOuterRect; // width/height must be >= fMask.fBounds' SkIPoint fCenter; // identifies center row/col for stretching - SkCachedData* fCache; + SkCachedData* fCache = nullptr; }; /** @@ -144,13 +146,13 @@ class SkMaskFilterBase : public SkMaskFilter { virtual FilterReturn filterRectsToNine(const SkRect[], int count, const SkMatrix&, const SkIRect& clipBounds, - NinePatch*) const; + SkTLazy*) const; /** * Similar to filterRectsToNine, except it performs the work on a round rect. */ virtual FilterReturn filterRRectToNine(const SkRRect&, const SkMatrix&, const SkIRect& clipBounds, - NinePatch*) const; + SkTLazy*) const; private: friend class SkDraw; diff --git a/src/core/SkMatrix.cpp b/src/core/SkMatrix.cpp index 87b0ac0c2441..9688fcc0e22a 100644 --- a/src/core/SkMatrix.cpp +++ b/src/core/SkMatrix.cpp @@ -820,13 +820,13 @@ bool SkMatrix::invertNonIdentity(SkMatrix* inv) const { bool invertible = true; if (inv) { if (mask & kScale_Mask) { - SkScalar invX = fMat[kMScaleX]; - SkScalar invY = fMat[kMScaleY]; - if (0 == invX || 0 == invY) { + SkScalar invX = sk_ieee_float_divide(1.f, fMat[kMScaleX]); + SkScalar invY = sk_ieee_float_divide(1.f, fMat[kMScaleY]); + // Denormalized (non-zero) scale factors will overflow when inverted, in which case + // the inverse matrix would not be finite, so return false. + if (!SkScalarsAreFinite(invX, invY)) { return false; } - invX = SkScalarInvert(invX); - invY = SkScalarInvert(invY); // Must be careful when writing to inv, since it may be the // same memory as this. diff --git a/src/core/SkMatrixPriv.h b/src/core/SkMatrixPriv.h index d8b828ac82d9..7dd41bf0c569 100644 --- a/src/core/SkMatrixPriv.h +++ b/src/core/SkMatrixPriv.h @@ -51,8 +51,7 @@ class SkMatrixPriv { * Attempt to map the rect through the inverse of the matrix. If it is not invertible, * then this returns false and dst is unchanged. */ - static bool SK_WARN_UNUSED_RESULT InverseMapRect(const SkMatrix& mx, - SkRect* dst, const SkRect& src) { + [[nodiscard]] static bool InverseMapRect(const SkMatrix& mx, SkRect* dst, const SkRect& src) { if (mx.isScaleTranslate()) { // A scale-translate matrix with a 0 scale factor is not invertible. if (mx.getScaleX() == 0.f || mx.getScaleY() == 0.f) { diff --git a/src/core/SkMatrixProvider.h b/src/core/SkMatrixProvider.h deleted file mode 100644 index 3dfa5676bafb..000000000000 --- a/src/core/SkMatrixProvider.h +++ /dev/null @@ -1,68 +0,0 @@ -/* -* Copyright 2020 Google LLC -* -* Use of this source code is governed by a BSD-style license that can be -* found in the LICENSE file. -*/ - -#ifndef SkMatrixProvider_DEFINED -#define SkMatrixProvider_DEFINED - -#include "include/core/SkM44.h" -#include "include/core/SkMatrix.h" - -/** - * All matrix providers report a flag: "localToDeviceHitsPixelCenters". This is confusing. - * It doesn't say anything about the actual matrix in the provider. Instead, it means: "is it safe - * to tweak sampling based on the contents of the matrix". In other words, does the device end of - * the local-to-device matrix actually map to pixels, AND are the local coordinates being fed to - * the shader produced by the inverse of that matrix? For a normal device, this is trivially true. - * The matrix may be updated via transforms, but when we draw (and the local coordinates come from - * rasterization of primitives against that device), we can know that the device coordinates will - * land on pixel centers. - * - * In a few places, the matrix provider is lying about how sampling "works". When we invoke a child - * from runtime effects, we give that child a matrix provider with an identity matrix. However -- - * the coordinates being passed to that child are not the result of device -> local transformed - * coordinates. Runtime effects can generate coordinates arbitrarily - even though the provider has - * an identity matrix, we can't assume it's safe to (for example) convert linear -> nearest. - * Clip shaders are similar - they overwrite the local-to-device matrix (to match what it was when - * the clip shader was inserted). The CTM continues to change before drawing, though. In that case, - * the two matrices are not inverses, so the local coordinates may not land on texel centers in - * the clip shader. - * - * In cases where we need to inhibit filtering optimizations, use SkOverrideDeviceMatrixProvider. - */ -class SkMatrixProvider { -public: - SkMatrixProvider(const SkMatrix& localToDevice) - : fLocalToDevice(localToDevice), fLocalToDevice33(localToDevice) {} - - SkMatrixProvider(const SkM44& localToDevice) - : fLocalToDevice(localToDevice), fLocalToDevice33(localToDevice.asM33()) {} - - // These should return the "same" matrix, as either a 3x3 or 4x4. Most sites in Skia still - // call localToDevice, and operate on SkMatrix. - const SkMatrix& localToDevice() const { return fLocalToDevice33; } - const SkM44& localToDevice44() const { return fLocalToDevice; } - -private: - friend class SkBaseDevice; - - SkM44 fLocalToDevice; - SkMatrix fLocalToDevice33; // Cached SkMatrix version of above, for legacy usage -}; - -class SkPostTranslateMatrixProvider : public SkMatrixProvider { -public: - SkPostTranslateMatrixProvider(const SkMatrixProvider& parent, SkScalar dx, SkScalar dy) - : SkMatrixProvider(SkM44::Translate(dx, dy) * parent.localToDevice44()) {} -}; - -class SkPreConcatMatrixProvider : public SkMatrixProvider { -public: - SkPreConcatMatrixProvider(const SkMatrixProvider& parent, const SkMatrix& preMatrix) - : SkMatrixProvider(parent.localToDevice44() * SkM44(preMatrix)) {} -}; - -#endif diff --git a/src/core/SkMesh.cpp b/src/core/SkMesh.cpp index d64e5debc9d6..5097f40cfd24 100644 --- a/src/core/SkMesh.cpp +++ b/src/core/SkMesh.cpp @@ -7,10 +7,15 @@ #include "include/core/SkMesh.h" -#ifdef SK_ENABLE_SKSL +#include "include/core/SkAlphaType.h" #include "include/core/SkColorSpace.h" #include "include/core/SkData.h" +#include "include/private/SkSLSampleUsage.h" +#include "include/private/base/SkAlign.h" +#include "include/private/base/SkAssert.h" #include "include/private/base/SkMath.h" +#include "include/private/base/SkTArray.h" +#include "include/private/base/SkTo.h" #include "src/base/SkSafeMath.h" #include "src/core/SkChecksum.h" #include "src/core/SkMeshPriv.h" @@ -18,31 +23,30 @@ #include "src/sksl/SkSLAnalysis.h" #include "src/sksl/SkSLBuiltinTypes.h" #include "src/sksl/SkSLCompiler.h" +#include "src/sksl/SkSLContext.h" #include "src/sksl/SkSLProgramKind.h" #include "src/sksl/SkSLProgramSettings.h" #include "src/sksl/SkSLUtil.h" #include "src/sksl/analysis/SkSLProgramVisitor.h" +#include "src/sksl/ir/SkSLExpression.h" #include "src/sksl/ir/SkSLFieldAccess.h" #include "src/sksl/ir/SkSLFunctionDeclaration.h" #include "src/sksl/ir/SkSLFunctionDefinition.h" +#include "src/sksl/ir/SkSLModifierFlags.h" #include "src/sksl/ir/SkSLProgram.h" #include "src/sksl/ir/SkSLProgramElement.h" #include "src/sksl/ir/SkSLReturnStatement.h" +#include "src/sksl/ir/SkSLStatement.h" #include "src/sksl/ir/SkSLStructDefinition.h" #include "src/sksl/ir/SkSLType.h" #include "src/sksl/ir/SkSLVarDeclarations.h" #include "src/sksl/ir/SkSLVariable.h" #include "src/sksl/ir/SkSLVariableReference.h" -#if defined(SK_GANESH) -#include "src/gpu/ganesh/GrGpu.h" -#include "src/gpu/ganesh/GrStagingBufferManager.h" -#endif // defined(SK_GANESH) - +#include #include #include #include -#include #include using namespace skia_private; @@ -84,7 +88,7 @@ gather_uniforms_and_check_for_main(const SkSL::Program& program, const SkSL::GlobalVarDeclaration& global = elem->as(); const SkSL::VarDeclaration& varDecl = global.declaration()->as(); const SkSL::Variable& var = *varDecl.var(); - if (var.modifiers().fFlags & SkSL::Modifiers::kUniform_Flag) { + if (var.modifierFlags().isUniform()) { auto iter = find_uniform(*uniforms, var.name()); const auto& context = *program.fContext; if (iter == uniforms->end()) { @@ -653,52 +657,6 @@ SkMesh::SkMesh(SkMesh&&) = default; SkMesh& SkMesh::operator=(const SkMesh&) = default; SkMesh& SkMesh::operator=(SkMesh&&) = default; -sk_sp SkMesh::MakeIndexBuffer(GrDirectContext* dc, const void* data, size_t size) { - if (!dc) { - return SkMeshPriv::CpuIndexBuffer::Make(data, size); - } -#if defined(SK_GANESH) - return SkMeshPriv::GpuIndexBuffer::Make(dc, data, size); -#else - return nullptr; -#endif -} - -sk_sp SkMesh::CopyIndexBuffer(GrDirectContext* dc, sk_sp src) { - if (!src) { - return nullptr; - } - auto* ib = static_cast(src.get()); - const void* data = ib->peek(); - if (!data) { - return nullptr; - } - return MakeIndexBuffer(dc, data, ib->size()); -} - -sk_sp SkMesh::MakeVertexBuffer(GrDirectContext* dc, const void* data, size_t size) { - if (!dc) { - return SkMeshPriv::CpuVertexBuffer::Make(data, size); - } -#if defined(SK_GANESH) - return SkMeshPriv::GpuVertexBuffer::Make(dc, data, size); -#else - return nullptr; -#endif -} - -sk_sp SkMesh::CopyVertexBuffer(GrDirectContext* dc, sk_sp src) { - if (!src) { - return nullptr; - } - auto* vb = static_cast(src.get()); - const void* data = vb->peek(); - if (!data) { - return nullptr; - } - return MakeVertexBuffer(dc, data, vb->size()); -} - SkMesh::Result SkMesh::Make(sk_sp spec, Mode mode, sk_sp vb, @@ -870,58 +828,36 @@ bool SkMesh::VertexBuffer::update(GrDirectContext* dc, return check_update(data, offset, size, this->size()) && this->onUpdate(dc, data, offset, size); } -#if defined(SK_GANESH) -bool SkMeshPriv::UpdateGpuBuffer(GrDirectContext* dc, - sk_sp buffer, - const void* data, - size_t offset, - size_t size) { - if (!dc || dc != buffer->getContext()) { - return false; - } - SkASSERT(!dc->abandoned()); // If dc is abandoned then buffer->getContext() should be null. - - if (!dc->priv().caps()->transferFromBufferToBufferSupport()) { - auto ownedData = SkData::MakeWithCopy(data, size); - dc->priv().drawingManager()->newBufferUpdateTask(std::move(ownedData), - std::move(buffer), - offset); - return true; - } - - sk_sp tempBuffer; - size_t tempOffset = 0; - if (auto* sbm = dc->priv().getGpu()->stagingBufferManager()) { - auto alignment = dc->priv().caps()->transferFromBufferToBufferAlignment(); - auto [sliceBuffer, sliceOffset, ptr] = sbm->allocateStagingBufferSlice(size, alignment); - if (sliceBuffer) { - std::memcpy(ptr, data, size); - tempBuffer.reset(SkRef(sliceBuffer)); - tempOffset = sliceOffset; - } - } +namespace SkMeshes { +sk_sp MakeIndexBuffer(const void* data, size_t size) { + return SkMeshPriv::CpuIndexBuffer::Make(data, size); +} - if (!tempBuffer) { - tempBuffer = dc->priv().resourceProvider()->createBuffer(size, - GrGpuBufferType::kXferCpuToGpu, - kDynamic_GrAccessPattern, - GrResourceProvider::ZeroInit::kNo); - if (!tempBuffer) { - return false; - } - if (!tempBuffer->updateData(data, 0, size, /*preserve=*/false)) { - return false; - } +sk_sp CopyIndexBuffer(sk_sp src) { + if (!src) { + return nullptr; } + auto* ib = static_cast(src.get()); + const void* data = ib->peek(); + if (!data) { + return nullptr; + } + return MakeIndexBuffer(data, ib->size()); +} - dc->priv().drawingManager()->newBufferTransferTask(std::move(tempBuffer), - tempOffset, - std::move(buffer), - offset, - size); - - return true; +sk_sp MakeVertexBuffer(const void* data, size_t size) { + return SkMeshPriv::CpuVertexBuffer::Make(data, size); } -#endif // defined(SK_GANESH) -#endif // SK_ENABLE_SKSL +sk_sp CopyVertexBuffer(sk_sp src) { + if (!src) { + return nullptr; + } + auto* vb = static_cast(src.get()); + const void* data = vb->peek(); + if (!data) { + return nullptr; + } + return MakeVertexBuffer(data, vb->size()); +} +} // namespace SkMeshes diff --git a/src/core/SkMeshPriv.h b/src/core/SkMeshPriv.h index a4f50e9bc443..67f892e9d71b 100644 --- a/src/core/SkMeshPriv.h +++ b/src/core/SkMeshPriv.h @@ -8,22 +8,10 @@ #ifndef SkMeshPriv_DEFINED #define SkMeshPriv_DEFINED -#include "include/core/SkMesh.h" - -#ifdef SK_ENABLE_SKSL #include "include/core/SkData.h" +#include "include/core/SkMesh.h" #include "src/core/SkSLTypeShared.h" -#if defined(SK_GANESH) -#include "include/gpu/GrDirectContext.h" -#include "include/private/gpu/ganesh/GrTypesPriv.h" -#include "src/gpu/ganesh/GrDirectContextPriv.h" -#include "src/gpu/ganesh/GrDrawingManager.h" -#include "src/gpu/ganesh/GrGpuBuffer.h" -#include "src/gpu/ganesh/GrResourceCache.h" -#include "src/gpu/ganesh/GrResourceProvider.h" -#endif - struct SkMeshSpecificationPriv { using Varying = SkMeshSpecification::Varying; using Attribute = SkMeshSpecification::Attribute; @@ -63,19 +51,6 @@ struct SkMeshSpecificationPriv { SkUNREACHABLE; } -#if defined(SK_GANESH) - static GrVertexAttribType AttrTypeAsVertexAttribType(Attribute::Type type) { - switch (type) { - case Attribute::Type::kFloat: return kFloat_GrVertexAttribType; - case Attribute::Type::kFloat2: return kFloat2_GrVertexAttribType; - case Attribute::Type::kFloat3: return kFloat3_GrVertexAttribType; - case Attribute::Type::kFloat4: return kFloat4_GrVertexAttribType; - case Attribute::Type::kUByte4_unorm: return kUByte4_norm_GrVertexAttribType; - } - SkUNREACHABLE; - } -#endif - static SkSLType AttrTypeAsSLType(Attribute::Type type) { switch (type) { case Attribute::Type::kFloat: return SkSLType::kFloat; @@ -103,81 +78,46 @@ struct SkMeshSpecificationPriv { } }; -struct SkMeshPriv { - class Buffer { - public: - virtual ~Buffer() = 0; - - Buffer() = default; - Buffer(const Buffer&) = delete; - - Buffer& operator=(const Buffer&) = delete; - - virtual const void* peek() const { return nullptr; } - -#if defined(SK_GANESH) - virtual sk_sp asGpuBuffer() const { return nullptr; } -#endif - }; - - class IB : public Buffer, public SkMesh::IndexBuffer {}; - class VB : public Buffer, public SkMesh::VertexBuffer {}; - - template class CpuBuffer final : public Base { - public: - ~CpuBuffer() override = default; - - static sk_sp Make(const void* data, size_t size); - - const void* peek() const override { return fData->data(); } - - size_t size() const override { return fData->size(); } +namespace SkMeshPriv { +class Buffer { +public: + virtual ~Buffer() = 0; - private: - CpuBuffer(sk_sp data) : fData(std::move(data)) {} + Buffer() = default; + Buffer(const Buffer&) = delete; - bool onUpdate(GrDirectContext*, const void* data, size_t offset, size_t size) override; + Buffer& operator=(const Buffer&) = delete; - sk_sp fData; - }; + virtual const void* peek() const { return nullptr; } - using CpuIndexBuffer = CpuBuffer; - using CpuVertexBuffer = CpuBuffer; - -#if defined(SK_GANESH) - template class GpuBuffer final : public Base { - public: - GpuBuffer() = default; + virtual bool isGaneshBacked() const { return false; } +}; - ~GpuBuffer() override; +class IB : public Buffer, public SkMesh::IndexBuffer {}; +class VB : public Buffer, public SkMesh::VertexBuffer {}; - static sk_sp Make(GrDirectContext*, const void* data, size_t size); +template class CpuBuffer final : public Base { +public: + ~CpuBuffer() override = default; - sk_sp asGpuBuffer() const override { return fBuffer; } + static sk_sp Make(const void* data, size_t size); - size_t size() const override { return fBuffer->size(); } + const void* peek() const override { return fData->data(); } - private: - bool onUpdate(GrDirectContext*, const void* data, size_t offset, size_t size) override; + size_t size() const override { return fData->size(); } - sk_sp fBuffer; - GrDirectContext::DirectContextID fContextID; - }; +private: + CpuBuffer(sk_sp data) : fData(std::move(data)) {} - using GpuIndexBuffer = GpuBuffer; - using GpuVertexBuffer = GpuBuffer; -#endif // defined(SK_GANESH) + bool onUpdate(GrDirectContext*, const void* data, size_t offset, size_t size) override; -private: -#if defined(SK_GANESH) - static bool UpdateGpuBuffer(GrDirectContext*, - sk_sp, - const void*, - size_t offset, - size_t size); -#endif + sk_sp fData; }; +using CpuIndexBuffer = CpuBuffer; +using CpuVertexBuffer = CpuBuffer; +} // namespace SkMeshPriv + inline SkMeshPriv::Buffer::~Buffer() = default; template sk_sp SkMeshPriv::CpuBuffer::Make(const void* data, @@ -203,48 +143,4 @@ template bool SkMeshPriv::CpuBuffer::onUpdate(GrDirectCont return true; } -#if defined(SK_GANESH) - -template SkMeshPriv::GpuBuffer::~GpuBuffer() { - GrResourceCache::ReturnResourceFromThread(std::move(fBuffer), fContextID); -} - -template -sk_sp SkMeshPriv::GpuBuffer::Make(GrDirectContext* dc, - const void* data, - size_t size) { - SkASSERT(dc); - - sk_sp buffer = dc->priv().resourceProvider()->createBuffer( - size, - Type, - kStatic_GrAccessPattern, - data ? GrResourceProvider::ZeroInit::kNo : GrResourceProvider::ZeroInit::kYes); - if (!buffer) { - return nullptr; - } - - if (data && !buffer->updateData(data, 0, size, /*preserve=*/false)) { - return nullptr; - } - - auto result = new GpuBuffer; - result->fBuffer = std::move(buffer); - result->fContextID = dc->directContextID(); - return sk_sp(result); -} - - -template -bool SkMeshPriv::GpuBuffer::onUpdate(GrDirectContext* dc, - const void* data, - size_t offset, - size_t size) { - return UpdateGpuBuffer(dc, fBuffer, data, offset, size); -} - -#endif // defined(SK_GANESH) - -#endif // SK_ENABLE_SKSL - #endif diff --git a/src/core/SkOpts.cpp b/src/core/SkOpts.cpp index f998f33be270..08b4de7f4d8c 100644 --- a/src/core/SkOpts.cpp +++ b/src/core/SkOpts.cpp @@ -10,46 +10,21 @@ #include "src/core/SkCpu.h" #include "src/core/SkOpts.h" -#if defined(SK_ARM_HAS_NEON) - #define SK_OPTS_NS neon -#elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SKX - #define SK_OPTS_NS skx -#elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_AVX2 - #define SK_OPTS_NS avx2 -#elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_AVX - #define SK_OPTS_NS avx -#elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE42 - #define SK_OPTS_NS sse42 -#elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE41 - #define SK_OPTS_NS sse41 -#elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSSE3 - #define SK_OPTS_NS ssse3 -#elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE3 - #define SK_OPTS_NS sse3 -#elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 - #define SK_OPTS_NS sse2 -#elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE1 - #define SK_OPTS_NS sse -#else - #define SK_OPTS_NS portable -#endif - -#include "src/opts/SkBitmapProcState_opts.h" -#include "src/opts/SkBlitMask_opts.h" +#define SK_OPTS_TARGET SK_OPTS_TARGET_DEFAULT +#include "src/opts/SkOpts_SetTarget.h" + #include "src/opts/SkBlitRow_opts.h" #include "src/opts/SkRasterPipeline_opts.h" #include "src/opts/SkSwizzler_opts.h" #include "src/opts/SkUtils_opts.h" -#include "src/opts/SkVM_opts.h" + +#include "src/opts/SkOpts_RestoreTarget.h" namespace SkOpts { // Define default function pointer values here... // If our global compile options are set high enough, these defaults might even be // CPU-specialized, e.g. a typical x86-64 machine might start with SSE2 defaults. // They'll still get a chance to be replaced with even better ones, e.g. using SSE4.1. -#define DEFINE_DEFAULT(name) decltype(name) name = SK_OPTS_NS::name - DEFINE_DEFAULT(blit_mask_d32_a8); - DEFINE_DEFAULT(blit_row_color32); DEFINE_DEFAULT(blit_row_s32a_opaque); @@ -72,11 +47,6 @@ namespace SkOpts { DEFINE_DEFAULT(rect_memset32); DEFINE_DEFAULT(rect_memset64); - DEFINE_DEFAULT(S32_alpha_D32_filter_DX); - -#if defined(SK_ENABLE_SKVM) - DEFINE_DEFAULT(interpret_skvm); -#endif #undef DEFINE_DEFAULT size_t raster_pipeline_lowp_stride = SK_OPTS_NS::raster_pipeline_lowp_stride(); @@ -100,7 +70,6 @@ namespace SkOpts { void Init_ssse3(); void Init_avx(); void Init_hsw(); - void Init_skx(); void Init_erms(); static void init() { @@ -112,12 +81,11 @@ namespace SkOpts { #endif #if SK_CPU_SSE_LEVEL < SK_CPU_SSE_LEVEL_AVX - if (SkCpu::Supports(SkCpu::AVX)) { Init_avx(); } - if (SkCpu::Supports(SkCpu::HSW)) { Init_hsw(); } + if (SkCpu::Supports(SkCpu::AVX)) { Init_avx(); } #endif - #if SK_CPU_SSE_LEVEL < SK_CPU_SSE_LEVEL_SKX - if (SkCpu::Supports(SkCpu::SKX)) { Init_skx(); } + #if SK_CPU_SSE_LEVEL < SK_CPU_SSE_LEVEL_AVX2 + if (SkCpu::Supports(SkCpu::HSW)) { Init_hsw(); } #endif if (SkCpu::Supports(SkCpu::ERMS)) { Init_erms(); } diff --git a/src/core/SkOpts.h b/src/core/SkOpts.h index d937e56a487d..a22781a6f690 100644 --- a/src/core/SkOpts.h +++ b/src/core/SkOpts.h @@ -56,15 +56,16 @@ * be called as CPU instruction sets are typically super sets of older instruction sets */ -struct SkBitmapProcState; struct SkRasterPipelineStage; -namespace skvm { -struct InterpreterInstruction; -} namespace SkSL { class TraceHook; } +#define SK_OPTS_TARGET_DEFAULT 0x00 +#define SK_OPTS_TARGET_SSSE3 0x01 +#define SK_OPTS_TARGET_AVX 0x02 +#define SK_OPTS_TARGET_HSW 0x04 + namespace SkOpts { // Call to replace pointers to portable functions with pointers to CPU-specific functions. // Thread-safe and idempotent. @@ -72,8 +73,7 @@ namespace SkOpts { void Init(); // Declare function pointers here... - extern void (*blit_mask_d32_a8)(SkPMColor*, size_t, const SkAlpha*, size_t, SkColor, int, int); - extern void (*blit_row_color32)(SkPMColor*, const SkPMColor*, int, SkPMColor); + extern void (*blit_row_color32)(SkPMColor*, int, SkPMColor); extern void (*blit_row_s32a_opaque)(SkPMColor*, const SkPMColor*, int, U8CPU); // Swizzle input into some sort of 8888 pixel, {premul,unpremul} x {rgba,bgra}. @@ -99,10 +99,6 @@ namespace SkOpts { extern void (*rect_memset32)(uint32_t[], uint32_t, int, size_t, int); extern void (*rect_memset64)(uint64_t[], uint64_t, int, size_t, int); - // SkBitmapProcState optimized Shader, Sample, or Matrix procs. - extern void (*S32_alpha_D32_filter_DX)(const SkBitmapProcState&, - const uint32_t* xy, int count, SkPMColor*); - // We can't necessarily express the type of SkRasterPipeline stage functions here, // so we just use this void(*)(void) as a stand-in. using StageFn = void(*)(void); @@ -114,13 +110,6 @@ namespace SkOpts { extern size_t raster_pipeline_lowp_stride; extern size_t raster_pipeline_highp_stride; - -#if defined(SK_ENABLE_SKVM) - extern void (*interpret_skvm)(const skvm::InterpreterInstruction insts[], int ninsts, - int nregs, int loop, const int strides[], - SkSL::TraceHook* traceHooks[], int nTraceHooks, - int nargs, int n, void* args[]); -#endif } // namespace SkOpts #endif // SkOpts_DEFINED diff --git a/src/core/SkOverdrawCanvas.cpp b/src/core/SkOverdrawCanvas.cpp index 621ff4b87b16..4cfa5ea2f335 100644 --- a/src/core/SkOverdrawCanvas.cpp +++ b/src/core/SkOverdrawCanvas.cpp @@ -63,8 +63,8 @@ class TextDevice : public SkNoPixelsDevice, public SkGlyphRunListPainterCPU::Bit } } - void drawBitmap(const SkBitmap&, const SkMatrix&, const SkRect* dstOrNull, - const SkSamplingOptions&, const SkPaint&) const override {} + void drawBitmap(const SkBitmap&, const SkMatrix&, const SkRect* dstOrNull, + const SkSamplingOptions&, const SkPaint&) const override {} void onDrawGlyphRunList(SkCanvas* canvas, const sktext::GlyphRunList& glyphRunList, diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp index 19d0a74504bf..15f4bbf3e94b 100644 --- a/src/core/SkPath.cpp +++ b/src/core/SkPath.cpp @@ -15,7 +15,6 @@ #include "include/private/base/SkFloatBits.h" #include "include/private/base/SkFloatingPoint.h" #include "include/private/base/SkMalloc.h" -#include "include/private/base/SkPathEnums.h" #include "include/private/base/SkTArray.h" #include "include/private/base/SkTDArray.h" #include "include/private/base/SkTo.h" @@ -25,6 +24,7 @@ #include "src/core/SkEdgeClipper.h" #include "src/core/SkGeometry.h" #include "src/core/SkMatrixPriv.h" +#include "src/core/SkPathEnums.h" #include "src/core/SkPathMakers.h" #include "src/core/SkPathPriv.h" #include "src/core/SkPointPriv.h" @@ -1442,18 +1442,17 @@ SkPath& SkPath::addPath(const SkPath& srcPath, const SkMatrix& matrix, AddPathMo } if (kAppend_AddPathMode == mode && !matrix.hasPerspective()) { - fLastMoveToIndex = this->countPoints() + src->fLastMoveToIndex; - + if (src->fLastMoveToIndex >= 0) { + fLastMoveToIndex = src->fLastMoveToIndex + this->countPoints(); + } else { + fLastMoveToIndex = src->fLastMoveToIndex - this->countPoints(); + } SkPathRef::Editor ed(&fPathRef); auto [newPts, newWeights] = ed.growForVerbsInPath(*src->fPathRef); matrix.mapPoints(newPts, src->fPathRef->points(), src->countPoints()); if (int numWeights = src->fPathRef->countWeights()) { memcpy(newWeights, src->fPathRef->conicWeights(), numWeights * sizeof(newWeights[0])); } - // fiddle with fLastMoveToIndex, as we do in SkPath::close() - if ((SkPathVerb)fPathRef->verbsEnd()[-1] == SkPathVerb::kClose) { - fLastMoveToIndex ^= ~fLastMoveToIndex >> (8 * sizeof(fLastMoveToIndex) - 1); - } return this->dirtyAfterEdit(); } @@ -1468,8 +1467,7 @@ SkPath& SkPath::addPath(const SkPath& srcPath, const SkMatrix& matrix, AddPathMo injectMoveToIfNeeded(); // In case last contour is closed SkPoint lastPt; // don't add lineTo if it is degenerate - if (fLastMoveToIndex < 0 || !this->getLastPt(&lastPt) || - lastPt != mappedPts[0]) { + if (!this->getLastPt(&lastPt) || lastPt != mappedPts[0]) { this->lineTo(mappedPts[0]); } } else { diff --git a/src/core/SkPathBuilder.cpp b/src/core/SkPathBuilder.cpp index 76d97d3c2ec6..43f771095d56 100644 --- a/src/core/SkPathBuilder.cpp +++ b/src/core/SkPathBuilder.cpp @@ -10,10 +10,10 @@ #include "include/core/SkMatrix.h" #include "include/core/SkRRect.h" #include "include/private/SkPathRef.h" -#include "include/private/base/SkPathEnums.h" #include "include/private/base/SkSafe32.h" #include "src/base/SkVx.h" #include "src/core/SkGeometry.h" +#include "src/core/SkPathEnums.h" #include "src/core/SkPathPriv.h" #include diff --git a/include/private/base/SkPathEnums.h b/src/core/SkPathEnums.h similarity index 100% rename from include/private/base/SkPathEnums.h rename to src/core/SkPathEnums.h diff --git a/src/core/SkPathPriv.h b/src/core/SkPathPriv.h index 19977bc94a00..42b1bf39f131 100644 --- a/src/core/SkPathPriv.h +++ b/src/core/SkPathPriv.h @@ -19,7 +19,7 @@ #include "include/private/SkIDChangeListener.h" #include "include/private/SkPathRef.h" #include "include/private/base/SkDebug.h" -#include "include/private/base/SkPathEnums.h" +#include "src/core/SkPathEnums.h" #include #include diff --git a/src/core/SkPath_serial.cpp b/src/core/SkPath_serial.cpp index ef0995c5d530..89a9088a9d8c 100644 --- a/src/core/SkPath_serial.cpp +++ b/src/core/SkPath_serial.cpp @@ -8,12 +8,12 @@ #include "include/core/SkData.h" #include "include/private/SkPathRef.h" #include "include/private/base/SkMath.h" -#include "include/private/base/SkPathEnums.h" #include "include/private/base/SkTPin.h" #include "include/private/base/SkTo.h" #include "src/base/SkAutoMalloc.h" #include "src/base/SkBuffer.h" #include "src/base/SkSafeMath.h" +#include "src/core/SkPathEnums.h" #include "src/core/SkPathPriv.h" #include "src/core/SkRRectPriv.h" diff --git a/src/core/SkPicture.cpp b/src/core/SkPicture.cpp index 609943748df4..5d53829fc8f5 100644 --- a/src/core/SkPicture.cpp +++ b/src/core/SkPicture.cpp @@ -7,9 +7,11 @@ #include "include/core/SkPicture.h" -#include "include/core/SkImageGenerator.h" +#include "include/core/SkData.h" #include "include/core/SkPictureRecorder.h" #include "include/core/SkSerialProcs.h" +#include "include/core/SkStream.h" +#include "include/private/base/SkTFitsIn.h" #include "include/private/base/SkTo.h" #include "src/base/SkMathPriv.h" #include "src/core/SkCanvasPriv.h" @@ -17,14 +19,14 @@ #include "src/core/SkPicturePlayback.h" #include "src/core/SkPicturePriv.h" #include "src/core/SkPictureRecord.h" +#include "src/core/SkReadBuffer.h" #include "src/core/SkResourceCache.h" #include "src/core/SkStreamPriv.h" +#include "src/core/SkWriteBuffer.h" #include - -#if defined(SK_GANESH) -#include "include/private/chromium/Slug.h" -#endif +#include +#include // When we read/write the SkPictInfo via a stream, we have a sentinel byte right after the info. // Note: in the read/write buffer versions, we have a slightly different convention: diff --git a/src/core/SkPictureData.cpp b/src/core/SkPictureData.cpp index 6445a4867f43..1b0f58321118 100644 --- a/src/core/SkPictureData.cpp +++ b/src/core/SkPictureData.cpp @@ -9,6 +9,7 @@ #include "include/core/SkFlattenable.h" #include "include/core/SkSerialProcs.h" +#include "include/core/SkStream.h" #include "include/core/SkString.h" #include "include/core/SkTypeface.h" #include "include/private/base/SkDebug.h" @@ -52,9 +53,7 @@ SkPictureData::SkPictureData(const SkPictureRecord& record, , fTextBlobs(record.getTextBlobs()) , fVertices(record.getVertices()) , fImages(record.getImages()) -#if defined(SK_GANESH) , fSlugs(record.getSlugs()) -#endif , fInfo(info) { fOpData = record.opData(); @@ -74,8 +73,6 @@ SkPictureData::SkPictureData(const SkPictureRecord& record, /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// -#include "include/core/SkStream.h" - static size_t compute_chunk_size(SkFlattenable::Factory* array, int count) { size_t size = 4; // for 'count' @@ -181,14 +178,12 @@ void SkPictureData::flattenToBuffer(SkWriteBuffer& buffer, bool textBlobsOnly) c } } -#if defined(SK_GANESH) if (!textBlobsOnly) { write_tag_size(buffer, SK_PICT_SLUG_BUFFER_TAG, fSlugs.size()); for (const auto& slug : fSlugs) { slug->doFlatten(buffer); } } -#endif if (!textBlobsOnly) { if (!fVertices.empty()) { @@ -481,9 +476,7 @@ void SkPictureData::parseBufferTag(SkReadBuffer& buffer, uint32_t tag, uint32_t new_array_from_buffer(buffer, size, fTextBlobs, SkTextBlobPriv::MakeFromBuffer); break; case SK_PICT_SLUG_BUFFER_TAG: -#if defined(SK_GANESH) new_array_from_buffer(buffer, size, fSlugs, sktext::gpu::Slug::MakeFromBuffer); -#endif break; case SK_PICT_VERTICES_BUFFER_TAG: new_array_from_buffer(buffer, size, fVertices, SkVerticesPriv::Decode); diff --git a/src/core/SkPictureData.h b/src/core/SkPictureData.h index 4a384d0832f3..05b4486dedba 100644 --- a/src/core/SkPictureData.h +++ b/src/core/SkPictureData.h @@ -21,13 +21,10 @@ #include "include/core/SkTypes.h" #include "include/core/SkVertices.h" #include "include/private/base/SkTArray.h" +#include "include/private/chromium/Slug.h" #include "src/core/SkPictureFlat.h" #include "src/core/SkReadBuffer.h" -#if defined(SK_GANESH) -#include "include/private/chromium/Slug.h" -#endif - #include #include @@ -145,11 +142,9 @@ class SkPictureData { return read_index_base_1_or_null(reader, fTextBlobs); } -#if defined(SK_GANESH) const sktext::gpu::Slug* getSlug(SkReadBuffer* reader) const { return read_index_base_1_or_null(reader, fSlugs); } -#endif const SkVertices* getVertices(SkReadBuffer* reader) const { return read_index_base_1_or_null(reader, fVertices); @@ -177,10 +172,7 @@ class SkPictureData { skia_private::TArray> fTextBlobs; skia_private::TArray> fVertices; skia_private::TArray> fImages; -#if defined(SK_GANESH) skia_private::TArray> fSlugs; -#endif - SkTypefacePlayback fTFPlayback; std::unique_ptr fFactoryPlayback; diff --git a/src/core/SkPictureFlat.cpp b/src/core/SkPictureFlat.cpp index 993dfb6e2ec8..f30a355310ea 100644 --- a/src/core/SkPictureFlat.cpp +++ b/src/core/SkPictureFlat.cpp @@ -5,13 +5,10 @@ * found in the LICENSE file. */ -#include "include/core/SkColorFilter.h" -#include "include/core/SkMaskFilter.h" -#include "include/core/SkShader.h" -#include "include/core/SkTypeface.h" -#include "src/core/SkChecksum.h" #include "src/core/SkPictureFlat.h" +#include "include/core/SkTypeface.h" + #include /////////////////////////////////////////////////////////////////////////////// diff --git a/src/core/SkPictureFlat.h b/src/core/SkPictureFlat.h index bf9d32e38072..99f1ce2ec762 100644 --- a/src/core/SkPictureFlat.h +++ b/src/core/SkPictureFlat.h @@ -7,14 +7,20 @@ #ifndef SkPictureFlat_DEFINED #define SkPictureFlat_DEFINED -#include "include/core/SkCanvas.h" -#include "include/core/SkPaint.h" -#include "include/core/SkPicture.h" -#include "src/core/SkChecksum.h" -#include "src/core/SkPtrRecorder.h" +#include "include/core/SkFlattenable.h" +#include "include/core/SkRefCnt.h" +#include "include/core/SkRegion.h" +#include "include/core/SkTypeface.h" +#include "include/private/base/SkAssert.h" +#include "include/private/base/SkTo.h" +#include "src/core/SkPicturePriv.h" #include "src/core/SkReadBuffer.h" -#include "src/core/SkTDynamicHash.h" -#include "src/core/SkWriteBuffer.h" + +#include +#include +#include + +enum class SkClipOp; /* * Note: While adding new DrawTypes, it is necessary to add to the end of this list @@ -95,7 +101,7 @@ enum DrawType { DRAW_REGION, DRAW_VERTICES_OBJECT, - FLUSH, + FLUSH, // no-op DRAW_EDGEAA_IMAGE_SET, diff --git a/src/core/SkPicturePlayback.cpp b/src/core/SkPicturePlayback.cpp index 6c4fe97948a6..4d8e0d32397e 100644 --- a/src/core/SkPicturePlayback.cpp +++ b/src/core/SkPicturePlayback.cpp @@ -38,15 +38,13 @@ #include "src/core/SkVerticesPriv.h" #include "src/utils/SkPatchUtils.h" -#if defined(SK_GANESH) -#include "include/private/chromium/Slug.h" -#endif - class SkDrawable; class SkPath; class SkTextBlob; class SkVertices; +namespace sktext { namespace gpu { class Slug; } } + using namespace skia_private; static const SkRect* get_rect_ptr(SkReadBuffer* reader, SkRect* storage) { @@ -140,7 +138,6 @@ void SkPicturePlayback::handleOp(SkReadBuffer* reader, reader->skip(size - 4); } break; case FLUSH: - canvas->flush(); break; case CLIP_PATH: { const SkPath& path = fPictureData->getPath(reader); @@ -633,12 +630,10 @@ void SkPicturePlayback::handleOp(SkReadBuffer* reader, canvas->drawTextBlob(blob, x, y, paint); } break; case DRAW_SLUG: { -#if defined(SK_GANESH) const sktext::gpu::Slug* slug = fPictureData->getSlug(reader); BREAK_ON_READ_ERROR(reader); - slug->draw(canvas); -#endif + canvas->drawSlug(slug); } break; case DRAW_VERTICES_OBJECT: { const SkPaint& paint = fPictureData->requiredPaint(reader); diff --git a/src/core/SkPicturePriv.h b/src/core/SkPicturePriv.h index 8e86c7c4984a..646a351460a8 100644 --- a/src/core/SkPicturePriv.h +++ b/src/core/SkPicturePriv.h @@ -110,6 +110,9 @@ class SkPicturePriv { // V97: SkImageFilters::RuntimeShader takes a sample radius // V98: Merged SkImageFilters::Blend and ::Arithmetic implementations // V99: Remove legacy Magnifier filter + // V100: SkImageFilters::DropShadow does not have a dedicated implementation + // V101: Crop image filter supports all SkTileModes instead of just kDecal + // V102: Convolution image filter uses ::Crop to apply tile mode enum Version { kPictureShaderFilterParam_Version = 82, @@ -130,6 +133,9 @@ class SkPicturePriv { kRuntimeImageFilterSampleRadius = 97, kCombineBlendArithmeticFilters = 98, kRemoveLegacyMagnifierFilter = 99, + kDropShadowImageFilterComposition = 100, + kCropImageFilterSupportsTiling = 101, + kConvolutionImageFilterTilingUpdate = 102, // Only SKPs within the min/current picture version range (inclusive) can be read. // @@ -154,7 +160,7 @@ class SkPicturePriv { // // Contact the Infra Gardener if the above steps do not work for you. kMin_Version = kPictureShaderFilterParam_Version, - kCurrent_Version = kRemoveLegacyMagnifierFilter + kCurrent_Version = kConvolutionImageFilterTilingUpdate }; }; diff --git a/src/core/SkPictureRecord.cpp b/src/core/SkPictureRecord.cpp index 6a4ee9c4675a..d9d8391a67a5 100644 --- a/src/core/SkPictureRecord.cpp +++ b/src/core/SkPictureRecord.cpp @@ -7,22 +7,32 @@ #include "src/core/SkPictureRecord.h" +#include "include/core/SkBlendMode.h" +#include "include/core/SkImageFilter.h" +#include "include/core/SkMatrix.h" +#include "include/core/SkPoint3.h" #include "include/core/SkRRect.h" #include "include/core/SkRSXform.h" +#include "include/core/SkRect.h" +#include "include/core/SkRegion.h" +#include "include/core/SkShader.h" #include "include/core/SkSurface.h" #include "include/core/SkTextBlob.h" +#include "include/private/base/SkPoint_impl.h" #include "include/private/base/SkTo.h" -#include "src/base/SkTSearch.h" +#include "include/private/chromium/Slug.h" #include "src/core/SkCanvasPriv.h" #include "src/core/SkDrawShadowInfo.h" #include "src/core/SkMatrixPriv.h" #include "src/core/SkSamplingPriv.h" -#include "src/image/SkImage_Base.h" #include "src/utils/SkPatchUtils.h" -#if defined(SK_GANESH) -#include "include/private/chromium/Slug.h" -#endif +#include + +class SkSurfaceProps; +enum class SkClipOp; +struct SkISize; +struct SkImageInfo; using namespace skia_private; @@ -37,7 +47,7 @@ enum { static int const kUInt32Size = 4; SkPictureRecord::SkPictureRecord(const SkIRect& dimensions, uint32_t flags) - : INHERITED(dimensions) + : SkCanvasVirtualEnforcer(dimensions) , fRecordFlags(flags) , fInitialSaveCount(kNoInitialSave) { } @@ -45,21 +55,13 @@ SkPictureRecord::SkPictureRecord(const SkIRect& dimensions, uint32_t flags) SkPictureRecord::SkPictureRecord(const SkISize& dimensions, uint32_t flags) : SkPictureRecord(SkIRect::MakeSize(dimensions), flags) {} -/////////////////////////////////////////////////////////////////////////////// - -void SkPictureRecord::onFlush() { - size_t size = sizeof(kUInt32Size); - size_t initialOffset = this->addDraw(FLUSH, &size); - this->validate(initialOffset, size); -} - void SkPictureRecord::willSave() { // record the offset to us, making it non-positive to distinguish a save // from a clip entry. fRestoreOffsetStack.push_back(-(int32_t)fWriter.bytesWritten()); this->recordSave(); - this->INHERITED::willSave(); + this->SkCanvasVirtualEnforcer::willSave(); } void SkPictureRecord::recordSave() { @@ -76,7 +78,7 @@ SkCanvas::SaveLayerStrategy SkPictureRecord::getSaveLayerStrategy(const SaveLaye fRestoreOffsetStack.push_back(-(int32_t)fWriter.bytesWritten()); this->recordSaveLayer(rec); - (void)this->INHERITED::getSaveLayerStrategy(rec); + (void)this->SkCanvasVirtualEnforcer::getSaveLayerStrategy(rec); /* No need for a (potentially very big) layer which we don't actually need at this time (and may not be able to afford since during record our clip starts out the size of the picture, which is often much larger @@ -185,7 +187,7 @@ void SkPictureRecord::willRestore() { fRestoreOffsetStack.pop_back(); - this->INHERITED::willRestore(); + this->SkCanvasVirtualEnforcer::willRestore(); } void SkPictureRecord::recordRestore(bool fillInSkips) { @@ -227,7 +229,7 @@ void SkPictureRecord::didConcat44(const SkM44& m) { fWriter.write(SkMatrixPriv::M44ColMajor(m), 16 * sizeof(SkScalar)); this->validate(initialOffset, size); - this->INHERITED::didConcat44(m); + this->SkCanvasVirtualEnforcer::didConcat44(m); } void SkPictureRecord::didSetM44(const SkM44& m) { @@ -237,7 +239,7 @@ void SkPictureRecord::didSetM44(const SkM44& m) { size_t initialOffset = this->addDraw(SET_M44, &size); fWriter.write(SkMatrixPriv::M44ColMajor(m), 16 * sizeof(SkScalar)); this->validate(initialOffset, size); - this->INHERITED::didSetM44(m); + this->SkCanvasVirtualEnforcer::didSetM44(m); } void SkPictureRecord::didScale(SkScalar x, SkScalar y) { @@ -308,7 +310,7 @@ size_t SkPictureRecord::recordRestoreOffsetPlaceholder() { void SkPictureRecord::onClipRect(const SkRect& rect, SkClipOp op, ClipEdgeStyle edgeStyle) { this->recordClipRect(rect, op, kSoft_ClipEdgeStyle == edgeStyle); - this->INHERITED::onClipRect(rect, op, edgeStyle); + this->SkCanvasVirtualEnforcer::onClipRect(rect, op, edgeStyle); } size_t SkPictureRecord::recordClipRect(const SkRect& rect, SkClipOp op, bool doAA) { @@ -330,7 +332,7 @@ size_t SkPictureRecord::recordClipRect(const SkRect& rect, SkClipOp op, bool doA void SkPictureRecord::onClipRRect(const SkRRect& rrect, SkClipOp op, ClipEdgeStyle edgeStyle) { this->recordClipRRect(rrect, op, kSoft_ClipEdgeStyle == edgeStyle); - this->INHERITED::onClipRRect(rrect, op, edgeStyle); + this->SkCanvasVirtualEnforcer::onClipRRect(rrect, op, edgeStyle); } size_t SkPictureRecord::recordClipRRect(const SkRRect& rrect, SkClipOp op, bool doAA) { @@ -352,7 +354,7 @@ size_t SkPictureRecord::recordClipRRect(const SkRRect& rrect, SkClipOp op, bool void SkPictureRecord::onClipPath(const SkPath& path, SkClipOp op, ClipEdgeStyle edgeStyle) { int pathID = this->addPathToHeap(path); this->recordClipPath(pathID, op, kSoft_ClipEdgeStyle == edgeStyle); - this->INHERITED::onClipPath(path, op, edgeStyle); + this->SkCanvasVirtualEnforcer::onClipPath(path, op, edgeStyle); } size_t SkPictureRecord::recordClipPath(int pathID, SkClipOp op, bool doAA) { @@ -384,12 +386,12 @@ void SkPictureRecord::onClipShader(sk_sp cs, SkClipOp op) { this->addInt((int)op); this->validate(initialOffset, size); - this->INHERITED::onClipShader(std::move(cs), op); + this->SkCanvasVirtualEnforcer::onClipShader(std::move(cs), op); } void SkPictureRecord::onClipRegion(const SkRegion& region, SkClipOp op) { this->recordClipRegion(region, op); - this->INHERITED::onClipRegion(region, op); + this->SkCanvasVirtualEnforcer::onClipRegion(region, op); } size_t SkPictureRecord::recordClipRegion(const SkRegion& region, SkClipOp op) { @@ -419,7 +421,7 @@ void SkPictureRecord::onResetClip() { size_t size = sizeof(kUInt32Size); size_t initialOffset = this->addDraw(RESET_CLIP, &size); this->validate(initialOffset, size); - this->INHERITED::onResetClip(); + this->SkCanvasVirtualEnforcer::onResetClip(); } void SkPictureRecord::onDrawPaint(const SkPaint& paint) { @@ -583,7 +585,6 @@ void SkPictureRecord::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScala this->validate(initialOffset, size); } -#if defined(SK_GANESH) void SkPictureRecord::onDrawSlug(const sktext::gpu::Slug* slug) { // op + slug id size_t size = 2 * kUInt32Size; @@ -592,7 +593,6 @@ void SkPictureRecord::onDrawSlug(const sktext::gpu::Slug* slug) { this->addSlug(slug); this->validate(initialOffset, size); } -#endif void SkPictureRecord::onDrawPicture(const SkPicture* picture, const SkMatrix* matrix, const SkPaint* paint) { @@ -938,16 +938,12 @@ void SkPictureRecord::addTextBlob(const SkTextBlob* blob) { this->addInt(find_or_append(fTextBlobs, blob) + 1); } -#if defined(SK_GANESH) void SkPictureRecord::addSlug(const sktext::gpu::Slug* slug) { // follow the convention of recording a 1-based index this->addInt(find_or_append(fSlugs, slug) + 1); } -#endif void SkPictureRecord::addVertices(const SkVertices* vertices) { // follow the convention of recording a 1-based index this->addInt(find_or_append(fVertices, vertices) + 1); } - -/////////////////////////////////////////////////////////////////////////////// diff --git a/src/core/SkPictureRecord.h b/src/core/SkPictureRecord.h index e972c160c83d..eb4fc61ae03e 100644 --- a/src/core/SkPictureRecord.h +++ b/src/core/SkPictureRecord.h @@ -10,17 +10,50 @@ #include "include/core/SkCanvas.h" #include "include/core/SkCanvasVirtualEnforcer.h" -#include "include/core/SkFlattenable.h" +#include "include/core/SkColor.h" +#include "include/core/SkData.h" +#include "include/core/SkDrawable.h" +#include "include/core/SkImage.h" +#include "include/core/SkM44.h" +#include "include/core/SkPaint.h" +#include "include/core/SkPath.h" #include "include/core/SkPicture.h" +#include "include/core/SkRefCnt.h" +#include "include/core/SkSamplingOptions.h" +#include "include/core/SkScalar.h" #include "include/core/SkTextBlob.h" #include "include/core/SkVertices.h" +#include "include/private/base/SkAssert.h" #include "include/private/base/SkTArray.h" #include "include/private/base/SkTDArray.h" #include "include/private/base/SkTo.h" -#include "src/core/SkPictureData.h" +#include "include/private/chromium/Slug.h" +#include "src/core/SkPictureFlat.h" #include "src/core/SkTHash.h" #include "src/core/SkWriter32.h" +#include +#include + +class SkBitmap; +class SkMatrix; +class SkPixmap; +class SkRRect; +class SkRegion; +class SkShader; +class SkSurface; +class SkSurfaceProps; +enum class SkBlendMode; +enum class SkClipOp; +struct SkDrawShadowRec; +struct SkIRect; +struct SkISize; +struct SkImageInfo; +struct SkPoint; +struct SkRSXform; +struct SkRect; + + // These macros help with packing and unpacking a single byte value and // a 3 byte value into/out of a uint32_t #define MASK_24 0x00FFFFFF @@ -48,11 +81,9 @@ class SkPictureRecord : public SkCanvasVirtualEnforcer { return fTextBlobs; } -#if defined(SK_GANESH) const skia_private::TArray>& getSlugs() const { return fSlugs; } -#endif const skia_private::TArray>& getVertices() const { return fVertices; @@ -164,8 +195,6 @@ class SkPictureRecord : public SkCanvasVirtualEnforcer { sk_sp onNewSurface(const SkImageInfo&, const SkSurfaceProps&) override; bool onPeekPixels(SkPixmap*) override { return false; } - void onFlush() override; - void willSave() override; SaveLayerStrategy getSaveLayerStrategy(const SaveLayerRec&) override; bool onDoSaveBehind(const SkRect*) override; @@ -180,9 +209,7 @@ class SkPictureRecord : public SkCanvasVirtualEnforcer { void onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, const SkPaint& paint) override; -#if defined(SK_GANESH) void onDrawSlug(const sktext::gpu::Slug* slug) override; -#endif void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], const SkPoint texCoords[4], SkBlendMode, const SkPaint& paint) override; @@ -256,16 +283,12 @@ class SkPictureRecord : public SkCanvasVirtualEnforcer { skia_private::TArray> fDrawables; skia_private::TArray> fTextBlobs; skia_private::TArray> fVertices; -#if defined(SK_GANESH) skia_private::TArray> fSlugs; -#endif uint32_t fRecordFlags; int fInitialSaveCount; friend class SkPictureData; // for SkPictureData's SkPictureRecord-based constructor - - using INHERITED = SkCanvasVirtualEnforcer; }; #endif diff --git a/src/core/SkPictureRecorder.cpp b/src/core/SkPictureRecorder.cpp index b3c07e8a4eeb..78f44f49a37e 100644 --- a/src/core/SkPictureRecorder.cpp +++ b/src/core/SkPictureRecorder.cpp @@ -5,12 +5,13 @@ * found in the LICENSE file. */ -#include +#include "include/core/SkPictureRecorder.h" -#include "include/core/SkData.h" +#include "include/core/SkBBHFactory.h" #include "include/core/SkDrawable.h" -#include "include/core/SkPictureRecorder.h" +#include "include/core/SkPicture.h" #include "include/core/SkTypes.h" +#include "include/private/base/SkTemplates.h" #include "src/core/SkBigPicture.h" #include "src/core/SkRecord.h" #include "src/core/SkRecordDraw.h" @@ -18,6 +19,10 @@ #include "src/core/SkRecordedDrawable.h" #include "src/core/SkRecorder.h" +#include +#include +#include + using namespace skia_private; SkPictureRecorder::SkPictureRecorder() { diff --git a/src/core/SkRasterPipelineBlitter.cpp b/src/core/SkRasterPipelineBlitter.cpp index cb8d32b2d235..13d2f7a7aefe 100644 --- a/src/core/SkRasterPipelineBlitter.cpp +++ b/src/core/SkRasterPipelineBlitter.cpp @@ -19,7 +19,6 @@ #include "src/core/SkColorSpaceXformSteps.h" #include "src/core/SkEffectPriv.h" #include "src/core/SkMask.h" -#include "src/core/SkMatrixProvider.h" #include "src/core/SkOpts.h" #include "src/core/SkRasterPipeline.h" #include "src/effects/colorfilters/SkColorFilterBase.h" @@ -448,38 +447,22 @@ void SkRasterPipelineBlitter::blitAntiH(int x, int y, const SkAlpha aa[], const void SkRasterPipelineBlitter::blitAntiH2(int x, int y, U8CPU a0, U8CPU a1) { SkIRect clip = {x,y, x+2,y+1}; uint8_t coverage[] = { (uint8_t)a0, (uint8_t)a1 }; - - SkMask mask; - mask.fImage = coverage; - mask.fBounds = clip; - mask.fRowBytes = 2; - mask.fFormat = SkMask::kA8_Format; - + SkMask mask(coverage, clip, 2, SkMask::kA8_Format); this->blitMask(mask, clip); } void SkRasterPipelineBlitter::blitAntiV2(int x, int y, U8CPU a0, U8CPU a1) { SkIRect clip = {x,y, x+1,y+2}; uint8_t coverage[] = { (uint8_t)a0, (uint8_t)a1 }; - - SkMask mask; - mask.fImage = coverage; - mask.fBounds = clip; - mask.fRowBytes = 1; - mask.fFormat = SkMask::kA8_Format; - + SkMask mask(coverage, clip, 1, SkMask::kA8_Format); this->blitMask(mask, clip); } void SkRasterPipelineBlitter::blitV(int x, int y, int height, SkAlpha alpha) { SkIRect clip = {x,y, x+1,y+height}; - - SkMask mask; - mask.fImage = α - mask.fBounds = clip; - mask.fRowBytes = 0; // so we reuse the 1 "row" for all of height - mask.fFormat = SkMask::kA8_Format; - + SkMask mask(&alpha, clip, + 0, // so we reuse the 1 "row" for all of height + SkMask::kA8_Format); this->blitMask(mask, clip); } diff --git a/src/core/SkRasterPipelineOpList.h b/src/core/SkRasterPipelineOpList.h index f64415006028..cea462b4a1fc 100644 --- a/src/core/SkRasterPipelineOpList.h +++ b/src/core/SkRasterPipelineOpList.h @@ -53,9 +53,6 @@ M(swizzle) // `SK_RASTER_PIPELINE_OPS_SKSL` defines ops used by SkSL. -// This set can be empty if software SkSL (SK_ENABLE_SKSL_IN_RASTER_PIPELINE) is not enabled. -#ifdef SK_ENABLE_SKSL_IN_RASTER_PIPELINE - #define SK_RASTER_PIPELINE_OPS_SKSL(M) \ M(init_lane_masks) M(store_device_xy01) M(exchange_src) \ M(load_condition_mask) M(store_condition_mask) \ @@ -98,6 +95,8 @@ M(copy_to_indirect_masked) M(swizzle_copy_to_indirect_masked) \ M(copy_slot_unmasked) M(copy_2_slots_unmasked) \ M(copy_3_slots_unmasked) M(copy_4_slots_unmasked) \ + M(copy_immutable_unmasked) M(copy_2_immutables_unmasked) \ + M(copy_3_immutables_unmasked) M(copy_4_immutables_unmasked) \ M(swizzle_copy_slot_masked) M(swizzle_copy_2_slots_masked) \ M(swizzle_copy_3_slots_masked) M(swizzle_copy_4_slots_masked) \ M(swizzle_1) M(swizzle_2) M(swizzle_3) M(swizzle_4) M(shuffle) \ @@ -149,10 +148,6 @@ M(cmpne_n_ints) M(cmpne_int) M(cmpne_2_ints) M(cmpne_3_ints) M(cmpne_4_ints) \ M(trace_line) M(trace_var) M(trace_enter) M(trace_exit) M(trace_scope) -#else -#define SK_RASTER_PIPELINE_OPS_SKSL(M) -#endif - // `SK_RASTER_PIPELINE_OPS_HIGHP_ONLY` defines ops that are only available in highp; this subset // includes all of SkSL. #define SK_RASTER_PIPELINE_OPS_HIGHP_ONLY(M) \ diff --git a/src/core/SkReadBuffer.cpp b/src/core/SkReadBuffer.cpp index 3ad096c07eba..48c293d4ee64 100644 --- a/src/core/SkReadBuffer.cpp +++ b/src/core/SkReadBuffer.cpp @@ -383,6 +383,9 @@ static sk_sp add_mipmaps(sk_sp img, sk_sp data, return img; } sk_sp raster = img->makeRasterImage(); + if (!raster) { + return img; + } sk_sp rasterWithMips = builder.attachTo(raster); SkASSERT(rasterWithMips); // attachTo should never return null return rasterWithMips; diff --git a/src/core/SkRecord.cpp b/src/core/SkRecord.cpp index 6f93944b36c7..f733c46b5e18 100644 --- a/src/core/SkRecord.cpp +++ b/src/core/SkRecord.cpp @@ -5,8 +5,8 @@ * found in the LICENSE file. */ -#include "include/core/SkImage.h" #include "src/core/SkRecord.h" + #include SkRecord::~SkRecord() { diff --git a/src/core/SkRecord.h b/src/core/SkRecord.h index d8c5efe54e69..e2b99b075931 100644 --- a/src/core/SkRecord.h +++ b/src/core/SkRecord.h @@ -8,11 +8,15 @@ #ifndef SkRecord_DEFINED #define SkRecord_DEFINED -#include "include/private/base/SkTLogic.h" +#include "include/core/SkRefCnt.h" +#include "include/private/base/SkAssert.h" #include "include/private/base/SkTemplates.h" #include "src/base/SkArenaAlloc.h" #include "src/core/SkRecords.h" +#include +#include + // SkRecord represents a sequence of SkCanvas calls, saved for future use. // These future uses may include: replay, optimization, serialization, or combinations of those. // diff --git a/src/core/SkRecordDraw.cpp b/src/core/SkRecordDraw.cpp index c2b5076b7ce2..ca971fb5927e 100644 --- a/src/core/SkRecordDraw.cpp +++ b/src/core/SkRecordDraw.cpp @@ -5,15 +5,44 @@ * found in the LICENSE file. */ +#include "src/core/SkRecordDraw.h" + #include "include/core/SkBBHFactory.h" +#include "include/core/SkBlendMode.h" +#include "include/core/SkBlender.h" #include "include/core/SkImage.h" +#include "include/core/SkMatrix.h" +#include "include/core/SkPaint.h" +#include "include/core/SkRRect.h" +#include "include/core/SkRect.h" +#include "include/core/SkRefCnt.h" +#include "include/core/SkRegion.h" +#include "include/core/SkScalar.h" +#include "include/core/SkShader.h" +#include "include/core/SkString.h" +#include "include/core/SkTextBlob.h" +#include "include/core/SkVertices.h" +#include "include/private/base/SkAssert.h" +#include "include/private/base/SkPoint_impl.h" #include "include/private/base/SkTDArray.h" +#include "include/private/base/SkTemplates.h" +#include "include/private/chromium/Slug.h" #include "src/core/SkCanvasPriv.h" +#include "src/core/SkDrawShadowInfo.h" #include "src/core/SkImageFilter_Base.h" -#include "src/core/SkRecordDraw.h" +#include "src/core/SkRecord.h" +#include "src/core/SkRecords.h" #include "src/effects/colorfilters/SkColorFilterBase.h" #include "src/utils/SkPatchUtils.h" +#if defined(SK_ENABLE_SKSL) +#include "include/core/SkMesh.h" +#endif + +#include +#include +#include + void SkRecordDraw(const SkRecord& record, SkCanvas* canvas, SkPicture const* const drawablePicts[], @@ -65,7 +94,6 @@ namespace SkRecords { template <> void Draw::draw(const NoOp&) {} #define DRAW(T, call) template <> void Draw::draw(const T& r) { fCanvas->call; } -DRAW(Flush, flush()) DRAW(Restore, restore()) DRAW(Save, save()) DRAW(SaveLayer, saveLayer(SkCanvasPriv::ScaledBackdropLayer(r.bounds, @@ -126,12 +154,7 @@ DRAW(DrawRRect, drawRRect(r.rrect, r.paint)) DRAW(DrawRect, drawRect(r.rect, r.paint)) DRAW(DrawRegion, drawRegion(r.region, r.paint)) DRAW(DrawTextBlob, drawTextBlob(r.blob.get(), r.x, r.y, r.paint)) -#if defined(SK_GANESH) DRAW(DrawSlug, drawSlug(r.slug.get())) -#else -// Turn draw into a nop. -template <> void Draw::draw(const DrawSlug&) {} -#endif DRAW(DrawAtlas, drawAtlas(r.atlas.get(), r.xforms, r.texs, r.colors, r.count, r.mode, r.sampling, r.cull, r.paint)) DRAW(DrawVertices, drawVertices(r.vertices, r.bmode, r.paint)) @@ -385,8 +408,6 @@ class FillBounds : SkNoncopyable { } } - Bounds bounds(const Flush&) const { return fCullRect; } - Bounds bounds(const DrawPaint&) const { return fCullRect; } Bounds bounds(const DrawBehind&) const { return fCullRect; } Bounds bounds(const NoOp&) const { return Bounds::MakeEmpty(); } // NoOps don't draw. @@ -474,16 +495,10 @@ class FillBounds : SkNoncopyable { return this->adjustAndMap(dst, &op.paint); } -#if defined(SK_GANESH) Bounds bounds(const DrawSlug& op) const { SkRect dst = op.slug->sourceBoundsWithOrigin(); return this->adjustAndMap(dst, &op.slug->initialPaint()); } -#else - Bounds bounds(const DrawSlug& op) const { - return SkRect::MakeEmpty(); - } -#endif Bounds bounds(const DrawDrawable& op) const { return this->adjustAndMap(op.worstCaseBounds, nullptr); diff --git a/src/core/SkRecordDraw.h b/src/core/SkRecordDraw.h index 7a37700a2e16..e300efd15a20 100644 --- a/src/core/SkRecordDraw.h +++ b/src/core/SkRecordDraw.h @@ -10,12 +10,13 @@ #include "include/core/SkBBHFactory.h" #include "include/core/SkCanvas.h" -#include "include/core/SkMatrix.h" -#include "src/core/SkBigPicture.h" -#include "src/core/SkRecord.h" +#include "include/core/SkM44.h" +#include "include/core/SkPicture.h" +#include "include/private/base/SkNoncopyable.h" class SkDrawable; -class SkLayerInfo; +class SkRecord; +struct SkRect; // Calculate conservative identity space bounds for each op in the record. void SkRecordFillBounds(const SkRect& cullRect, const SkRecord&, diff --git a/src/core/SkRecordOpts.cpp b/src/core/SkRecordOpts.cpp index 88e849306454..630ef7e76c35 100644 --- a/src/core/SkRecordOpts.cpp +++ b/src/core/SkRecordOpts.cpp @@ -7,11 +7,19 @@ #include "src/core/SkRecordOpts.h" -#include "include/private/base/SkTDArray.h" -#include "src/core/SkCanvasPriv.h" +#include "include/core/SkBlendMode.h" +#include "include/core/SkCanvas.h" +#include "include/core/SkColor.h" +#include "include/core/SkPaint.h" +#include "include/core/SkRefCnt.h" +#include "include/private/base/SkMath.h" +#include "src/core/SkRecord.h" #include "src/core/SkRecordPattern.h" #include "src/core/SkRecords.h" +#include +#include + using namespace SkRecords; // Most of the optimizations in this file are pattern-based. These are all defined as structs with: @@ -36,43 +44,6 @@ static bool apply(Pass* pass, SkRecord* record) { /////////////////////////////////////////////////////////////////////////////////////////////////// -static void multiple_set_matrices(SkRecord* record) { - struct { - typedef Pattern, - Greedy>, - Is > - Match; - - bool onMatch(SkRecord* record, Match* pattern, int begin, int end) { - record->replace(begin); // first SetMatrix - return true; - } - } pass; - while (apply(&pass, record)); -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// - -#if 0 // experimental, but needs knowledge of previous matrix to operate correctly -static void apply_matrix_to_draw_params(SkRecord* record) { - struct { - typedef Pattern, - Greedy>, - Is > - Pattern; - - bool onMatch(SkRecord* record, Pattern* pattern, int begin, int end) { - record->replace(begin); // first SetMatrix - return true; - } - } pass; - // No need to loop, as we never "open up" opportunities for more of this type of optimization. - apply(&pass, record); -} -#endif - -/////////////////////////////////////////////////////////////////////////////////////////////////// - // Turns the logical NoOp Save and Restore in Save-Draw*-Restore patterns into actual NoOps. struct SaveOnlyDrawsRestoreNooper { typedef Pattern, @@ -182,7 +153,10 @@ static bool effectively_srcover(const SkPaint* paint) { // For some SaveLayer-[drawing command]-Restore patterns, merge the SaveLayer's alpha into the // draw, and no-op the SaveLayer and Restore. struct SaveLayerDrawRestoreNooper { - typedef Pattern, IsDraw, Is> Match; + // Note that we use IsSingleDraw here, to avoid matching drawAtlas, drawVertices, etc... + // Those operations (can) draw multiple, overlapping primitives that blend with each other. + // Applying this operation to them changes their behavior. (skbug.com/14554) + typedef Pattern, IsSingleDraw, Is> Match; bool onMatch(SkRecord* record, Match* match, int begin, int end) { if (match->first()->backdrop) { @@ -300,15 +274,3 @@ void SkRecordOptimize(SkRecord* record) { record->defrag(); } - -void SkRecordOptimize2(SkRecord* record) { - multiple_set_matrices(record); - SkRecordNoopSaveRestores(record); - // See why we turn this off in SkRecordOptimize above. -#ifndef SK_BUILD_FOR_ANDROID_FRAMEWORK - SkRecordNoopSaveLayerDrawRestores(record); -#endif - SkRecordMergeSvgOpacityAndFilterLayers(record); - - record->defrag(); -} diff --git a/src/core/SkRecordOpts.h b/src/core/SkRecordOpts.h index a1e3c245a0fa..19ec35e1b1c8 100644 --- a/src/core/SkRecordOpts.h +++ b/src/core/SkRecordOpts.h @@ -8,7 +8,7 @@ #ifndef SkRecordOpts_DEFINED #define SkRecordOpts_DEFINED -#include "src/core/SkRecord.h" +class SkRecord; // Run all optimizations in recommended order. void SkRecordOptimize(SkRecord*); @@ -26,7 +26,4 @@ void SkRecordNoopSaveLayerDrawRestores(SkRecord*); // the alpha of the first SaveLayer to the second SaveLayer. void SkRecordMergeSvgOpacityAndFilterLayers(SkRecord*); -// Experimental optimizers -void SkRecordOptimize2(SkRecord*); - #endif//SkRecordOpts_DEFINED diff --git a/src/core/SkRecordPattern.h b/src/core/SkRecordPattern.h index 4244fbb3e64b..ef1791b2679f 100644 --- a/src/core/SkRecordPattern.h +++ b/src/core/SkRecordPattern.h @@ -45,8 +45,7 @@ class IsDraw { public: IsDraw() : fPaint(nullptr) {} - typedef SkPaint type; - type* get() { return fPaint; } + SkPaint* get() { return fPaint; } template std::enable_if_t<(T::kTags & kDrawWithPaint_Tag) == kDrawWithPaint_Tag, bool> @@ -72,7 +71,47 @@ class IsDraw { template static T* AsPtr(SkRecords::Optional& x) { return x; } template static T* AsPtr(T& x) { return &x; } - type* fPaint; + SkPaint* fPaint; +}; + +// Matches any command that draws *once* (logically), and stores its paint. +class IsSingleDraw { +public: + IsSingleDraw() : fPaint(nullptr) {} + + SkPaint* get() { return fPaint; } + + template + std::enable_if_t<(T::kTags & kDrawWithPaint_Tag) == kDrawWithPaint_Tag && + !(T::kTags & kMultiDraw_Tag), + bool> + operator()(T* draw) { + fPaint = AsPtr(draw->paint); + return true; + } + + template + std::enable_if_t<(T::kTags & kDrawWithPaint_Tag) == kDraw_Tag && + !(T::kTags & kMultiDraw_Tag), + bool> + operator()(T* draw) { + fPaint = nullptr; + return true; + } + + template + std::enable_if_t + operator()(T* draw) { + fPaint = nullptr; + return false; + } + +private: + // Abstracts away whether the paint is always part of the command or optional. + template static T* AsPtr(SkRecords::Optional& x) { return x; } + template static T* AsPtr(T& x) { return &x; } + + SkPaint* fPaint; }; // Matches if Matcher doesn't. Stores nothing. diff --git a/src/core/SkRecordedDrawable.cpp b/src/core/SkRecordedDrawable.cpp index a910eb59b219..1c309b2095bc 100644 --- a/src/core/SkRecordedDrawable.cpp +++ b/src/core/SkRecordedDrawable.cpp @@ -5,18 +5,20 @@ * found in the LICENSE file. */ -#include "include/core/SkMatrix.h" +#include "src/core/SkRecordedDrawable.h" + +#include "include/core/SkPicture.h" #include "include/core/SkPictureRecorder.h" +#include "include/core/SkSize.h" #include "src/core/SkBigPicture.h" #include "src/core/SkPictureData.h" #include "src/core/SkPicturePlayback.h" #include "src/core/SkPictureRecord.h" +#include "src/core/SkReadBuffer.h" #include "src/core/SkRecordDraw.h" -#include "src/core/SkRecordedDrawable.h" +#include "src/core/SkWriteBuffer.h" -#if defined(SK_GANESH) -#include "include/private/chromium/Slug.h" -#endif +class SkCanvas; size_t SkRecordedDrawable::onApproximateBytesUsed() { size_t drawablesSize = 0; diff --git a/src/core/SkRecordedDrawable.h b/src/core/SkRecordedDrawable.h index bfad4e04ac13..efe6123e9043 100644 --- a/src/core/SkRecordedDrawable.h +++ b/src/core/SkRecordedDrawable.h @@ -7,10 +7,23 @@ #ifndef SkRecordedDrawable_DEFINED #define SkRecordedDrawable_DEFINED +#include "include/core/SkBBHFactory.h" #include "include/core/SkDrawable.h" +#include "include/core/SkFlattenable.h" +#include "include/core/SkRect.h" +#include "include/core/SkRefCnt.h" #include "src/core/SkRecord.h" #include "src/core/SkRecorder.h" +#include +#include +#include + +class SkCanvas; +class SkPicture; +class SkReadBuffer; +class SkWriteBuffer; + class SkRecordedDrawable : public SkDrawable { public: SkRecordedDrawable(sk_sp record, sk_sp bbh, diff --git a/src/core/SkRecorder.cpp b/src/core/SkRecorder.cpp index 08ef61cad504..c2559f04babf 100644 --- a/src/core/SkRecorder.cpp +++ b/src/core/SkRecorder.cpp @@ -27,6 +27,7 @@ #include "include/private/base/SkFloatingPoint.h" #include "include/private/base/SkTemplates.h" #include "include/private/base/SkTo.h" +#include "include/private/chromium/Slug.h" #include "src/core/SkBigPicture.h" #include "src/core/SkCanvasPriv.h" #include "src/core/SkRecord.h" @@ -34,10 +35,6 @@ #include "src/text/GlyphRun.h" #include "src/utils/SkPatchUtils.h" -#if defined(SK_GANESH) -#include "include/private/chromium/Slug.h" -#endif - #include #include #include @@ -253,11 +250,9 @@ void SkRecorder::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, this->append(paint, sk_ref_sp(blob), x, y); } -#if defined(SK_GANESH) void SkRecorder::onDrawSlug(const sktext::gpu::Slug* slug) { this->append(sk_ref_sp(slug)); } -#endif void SkRecorder::onDrawGlyphRunList( const sktext::GlyphRunList& glyphRunList, const SkPaint& paint) { @@ -343,10 +338,6 @@ void SkRecorder::onDrawEdgeAAImageSet2(const ImageSetEntry set[], int count, this->copy(preViewMatrices, totalMatrixCount), sampling, constraint); } -void SkRecorder::onFlush() { - this->append(); -} - void SkRecorder::willSave() { this->append(); } diff --git a/src/core/SkRecorder.h b/src/core/SkRecorder.h index 5ebab84f2830..48d6e6228346 100644 --- a/src/core/SkRecorder.h +++ b/src/core/SkRecorder.h @@ -89,8 +89,6 @@ class SkRecorder final : public SkCanvasVirtualEnforcer { // Make SkRecorder forget entirely about its SkRecord*; all calls to SkRecorder will fail. void forgetRecord(); - void onFlush() override; - void willSave() override; SaveLayerStrategy getSaveLayerStrategy(const SaveLayerRec&) override; bool onDoSaveBehind(const SkRect*) override; @@ -108,9 +106,7 @@ class SkRecorder final : public SkCanvasVirtualEnforcer { SkScalar x, SkScalar y, const SkPaint& paint) override; -#if defined(SK_GANESH) void onDrawSlug(const sktext::gpu::Slug* slug) override; -#endif void onDrawGlyphRunList( const sktext::GlyphRunList& glyphRunList, const SkPaint& paint) override; void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], diff --git a/src/core/SkRecords.cpp b/src/core/SkRecords.cpp index 29eb939ef68b..0c65be4b7f31 100644 --- a/src/core/SkRecords.cpp +++ b/src/core/SkRecords.cpp @@ -5,17 +5,12 @@ * found in the LICENSE file. */ -#include "src/core/SkPathPriv.h" #include "src/core/SkRecords.h" namespace SkRecords { PreCachedPath::PreCachedPath(const SkPath& path) : SkPath(path) { this->updateBoundsCache(); (void)this->getGenerationID(); -#if 0 // Disabled to see if we ever really race on this. It costs time, chromium:496982. - SkPathPriv::FirstDirection junk; - (void)SkPathPriv::CheapComputeFirstDirection(*this, &junk); -#endif } TypedMatrix::TypedMatrix(const SkMatrix& matrix) : SkMatrix(matrix) { diff --git a/src/core/SkRecords.h b/src/core/SkRecords.h index 4234077ea81e..e8a58396f788 100644 --- a/src/core/SkRecords.h +++ b/src/core/SkRecords.h @@ -8,29 +8,42 @@ #ifndef SkRecords_DEFINED #define SkRecords_DEFINED +#include "include/core/SkBlender.h" #include "include/core/SkCanvas.h" +#include "include/core/SkColor.h" #include "include/core/SkData.h" -#include "include/core/SkDrawable.h" #include "include/core/SkImage.h" #include "include/core/SkImageFilter.h" #include "include/core/SkM44.h" #include "include/core/SkMatrix.h" -#include "include/core/SkMesh.h" +#include "include/core/SkPaint.h" #include "include/core/SkPath.h" #include "include/core/SkPicture.h" #include "include/core/SkRRect.h" -#include "include/core/SkRSXform.h" #include "include/core/SkRect.h" +#include "include/core/SkRefCnt.h" #include "include/core/SkRegion.h" +#include "include/core/SkSamplingOptions.h" +#include "include/core/SkScalar.h" +#include "include/core/SkShader.h" #include "include/core/SkString.h" #include "include/core/SkTextBlob.h" #include "include/core/SkVertices.h" +#include "include/private/base/SkTemplates.h" +#include "include/private/chromium/Slug.h" #include "src/core/SkDrawShadowInfo.h" -#if defined(SK_GANESH) -#include "include/private/chromium/Slug.h" +#if defined(SK_ENABLE_SKSL) +#include "include/core/SkMesh.h" #endif +#include + +enum class SkBlendMode; +enum class SkClipOp; +struct SkPoint; +struct SkRSXform; + namespace SkRecords { // A list of all the types of canvas calls we can record. @@ -45,7 +58,6 @@ namespace SkRecords { // you keep them semantically grouped, especially the Draws. It's also nice to leave NoOp at 0. #define SK_RECORD_TYPES(M) \ M(NoOp) \ - M(Flush) \ M(Restore) \ M(Save) \ M(SaveLayer) \ @@ -151,6 +163,8 @@ enum Tags { kHasImage_Tag = 2, // Contains an SkImage or SkBitmap. kHasText_Tag = 4, // Contains text. kHasPaint_Tag = 8, // May have an SkPaint field, at least optionally. + kMultiDraw_Tag = 16, // Drawing operations that render multiple independent primitives. + // These draws are capable of blending with themselves. kDrawWithPaint_Tag = kDraw_Tag | kHasPaint_Tag, }; @@ -164,7 +178,6 @@ struct T { \ }; RECORD(NoOp, 0) -RECORD(Flush, 0) RECORD(Restore, 0, TypedMatrix matrix) RECORD(Save, 0) @@ -281,7 +294,7 @@ RECORD(DrawPicture, kDraw_Tag|kHasPaint_Tag, Optional paint; sk_sp picture; TypedMatrix matrix) -RECORD(DrawPoints, kDraw_Tag|kHasPaint_Tag, +RECORD(DrawPoints, kDraw_Tag|kHasPaint_Tag|kMultiDraw_Tag, SkPaint paint; SkCanvas::PointMode mode; unsigned count; @@ -300,19 +313,15 @@ RECORD(DrawTextBlob, kDraw_Tag|kHasText_Tag|kHasPaint_Tag, sk_sp blob; SkScalar x; SkScalar y) -#if defined(SK_GANESH) RECORD(DrawSlug, kDraw_Tag|kHasText_Tag, sk_sp slug) -#else -RECORD(DrawSlug, 0) -#endif RECORD(DrawPatch, kDraw_Tag|kHasPaint_Tag, SkPaint paint; PODArray cubics; PODArray colors; PODArray texCoords; SkBlendMode bmode) -RECORD(DrawAtlas, kDraw_Tag|kHasImage_Tag|kHasPaint_Tag, +RECORD(DrawAtlas, kDraw_Tag|kHasImage_Tag|kHasPaint_Tag|kMultiDraw_Tag, Optional paint; sk_sp atlas; PODArray xforms; @@ -322,12 +331,12 @@ RECORD(DrawAtlas, kDraw_Tag|kHasImage_Tag|kHasPaint_Tag, SkBlendMode mode; SkSamplingOptions sampling; Optional cull) -RECORD(DrawVertices, kDraw_Tag|kHasPaint_Tag, +RECORD(DrawVertices, kDraw_Tag|kHasPaint_Tag|kMultiDraw_Tag, SkPaint paint; sk_sp vertices; SkBlendMode bmode) #ifdef SK_ENABLE_SKSL -RECORD(DrawMesh, kDraw_Tag|kHasPaint_Tag, +RECORD(DrawMesh, kDraw_Tag|kHasPaint_Tag|kMultiDraw_Tag, SkPaint paint; SkMesh mesh; sk_sp blender) @@ -347,7 +356,7 @@ RECORD(DrawEdgeAAQuad, kDraw_Tag, SkCanvas::QuadAAFlags aa; SkColor4f color; SkBlendMode mode) -RECORD(DrawEdgeAAImageSet, kDraw_Tag|kHasImage_Tag|kHasPaint_Tag, +RECORD(DrawEdgeAAImageSet, kDraw_Tag|kHasImage_Tag|kHasPaint_Tag|kMultiDraw_Tag, Optional paint; skia_private::AutoTArray set; int count; diff --git a/src/core/SkRect.cpp b/src/core/SkRect.cpp index 254aab27ce65..1a20093604f1 100644 --- a/src/core/SkRect.cpp +++ b/src/core/SkRect.cpp @@ -9,6 +9,7 @@ #include "include/core/SkM44.h" #include "include/private/base/SkDebug.h" +#include "include/private/base/SkTPin.h" #include "src/core/SkRectPriv.h" class SkMatrix; @@ -98,15 +99,15 @@ bool SkRect::setBoundsCheck(const SkPoint pts[], int count) { void SkRect::setBoundsNoCheck(const SkPoint pts[], int count) { if (!this->setBoundsCheck(pts, count)) { - this->setLTRB(SK_ScalarNaN, SK_ScalarNaN, SK_ScalarNaN, SK_ScalarNaN); + this->setLTRB(SK_FloatNaN, SK_FloatNaN, SK_FloatNaN, SK_FloatNaN); } } #define CHECK_INTERSECT(al, at, ar, ab, bl, bt, br, bb) \ - SkScalar L = std::max(al, bl); \ - SkScalar R = std::min(ar, br); \ - SkScalar T = std::max(at, bt); \ - SkScalar B = std::min(ab, bb); \ + float L = std::max(al, bl); \ + float R = std::min(ar, br); \ + float T = std::max(at, bt); \ + float B = std::min(ab, bb); \ do { if (!(L < R && T < B)) return false; } while (0) // do the !(opposite) check so we return false if either arg is NaN @@ -142,7 +143,7 @@ void SkRect::join(const SkRect& r) { #include "include/core/SkString.h" #include "src/core/SkStringUtils.h" -static const char* set_scalar(SkString* storage, SkScalar value, SkScalarAsStringType asType) { +static const char* set_scalar(SkString* storage, float value, SkScalarAsStringType asType) { storage->reset(); SkAppendScalar(storage, value, asType); return storage->c_str(); @@ -307,3 +308,38 @@ bool SkRectPriv::QuadContainsRect(const SkM44& m, const SkRect& a, const SkRect& // 'b' is contained in the mapped rectangle if all distances are >= 0 return all((d0 >= 0.f) & (d1 >= 0.f) & (d2 >= 0.f) & (d3 >= 0.f)); } + +SkIRect SkRectPriv::ClosestDisjointEdge(const SkIRect& src, const SkIRect& dst) { + if (src.isEmpty() || dst.isEmpty()) { + return SkIRect::MakeEmpty(); + } + + int l = src.fLeft; + int r = src.fRight; + if (r <= dst.fLeft) { + // Select right column of pixels in crop + l = r - 1; + } else if (l >= dst.fRight) { + // Left column of 'crop' + r = l + 1; + } else { + // Regular intersection along X axis. + l = SkTPin(l, dst.fLeft, dst.fRight); + r = SkTPin(r, dst.fLeft, dst.fRight); + } + + int t = src.fTop; + int b = src.fBottom; + if (b <= dst.fTop) { + // Select bottom row of pixels in crop + t = b - 1; + } else if (t >= dst.fBottom) { + // Top row of 'crop' + b = t + 1; + } else { + t = SkTPin(t, dst.fTop, dst.fBottom); + b = SkTPin(b, dst.fTop, dst.fBottom); + } + + return SkIRect::MakeLTRB(l,t,r,b); +} diff --git a/src/core/SkRectPriv.h b/src/core/SkRectPriv.h index d4ac12461f6f..4415d2e5dfac 100644 --- a/src/core/SkRectPriv.h +++ b/src/core/SkRectPriv.h @@ -63,12 +63,12 @@ class SkRectPriv { } // Returns r.width()/2 but divides first to avoid width() overflowing. - static SkScalar HalfWidth(const SkRect& r) { - return SkScalarHalf(r.fRight) - SkScalarHalf(r.fLeft); + static constexpr float HalfWidth(const SkRect& r) { + return sk_float_midpoint(-r.fLeft, r.fRight); } // Returns r.height()/2 but divides first to avoid height() overflowing. - static SkScalar HalfHeight(const SkRect& r) { - return SkScalarHalf(r.fBottom) - SkScalarHalf(r.fTop); + static constexpr float HalfHeight(const SkRect& r) { + return sk_float_midpoint(-r.fTop, r.fBottom); } // Evaluate A-B. If the difference shape cannot be represented as a rectangle then false is @@ -93,6 +93,15 @@ class SkRectPriv { // Returns true if the quadrilateral formed by transforming the four corners of 'a' contains 'b' static bool QuadContainsRect(const SkMatrix& m, const SkIRect& a, const SkIRect& b); static bool QuadContainsRect(const SkM44& m, const SkRect& a, const SkRect& b); + + // Assuming 'src' does not intersect 'dst', returns the edge or corner of 'src' that is closest + // to 'dst', e.g. the pixels that would be sampled from 'src' when clamp-tiled into 'dst'. + // + // The returned rectangle will not be empty if 'src' is not empty and 'dst' is not empty. + // At least one of its width or height will be equal to 1 (possibly both if a corner is closest) + // + // Returns src.intersect(dst) if they do actually intersect. + static SkIRect ClosestDisjointEdge(const SkIRect& src, const SkIRect& dst); }; diff --git a/src/core/SkRuntimeBlender.cpp b/src/core/SkRuntimeBlender.cpp index c4c08509db5e..5f21841a46fb 100644 --- a/src/core/SkRuntimeBlender.cpp +++ b/src/core/SkRuntimeBlender.cpp @@ -20,12 +20,6 @@ #include "src/shaders/SkShaderBase.h" #include "src/sksl/codegen/SkSLRasterPipelineBuilder.h" -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/KeyContext.h" -#include "src/gpu/graphite/KeyHelpers.h" -#include "src/gpu/graphite/PaintParamsKey.h" -#endif - #include using namespace skia_private; @@ -68,7 +62,6 @@ sk_sp SkRuntimeBlender::CreateProc(SkReadBuffer& buffer) { } bool SkRuntimeBlender::onAppendStages(const SkStageRec& rec) const { -#ifdef SK_ENABLE_SKSL_IN_RASTER_PIPELINE if (!SkRuntimeEffectPriv::CanDraw(SkCapabilities::RasterBackend().get(), fEffect.get())) { // SkRP has support for many parts of #version 300 already, but for now, we restrict its // usage in runtime effects to just #version 100. @@ -87,7 +80,6 @@ bool SkRuntimeBlender::onAppendStages(const SkStageRec& rec) const { bool success = program->appendStages(rec.fPipeline, rec.fAlloc, &callbacks, uniforms); return success; } -#endif return false; } @@ -97,53 +89,3 @@ void SkRuntimeBlender::flatten(SkWriteBuffer& buffer) const { SkRuntimeEffectPriv::WriteChildEffects(buffer, fChildren); } -#ifdef SK_ENABLE_SKVM -skvm::Color SkRuntimeBlender::onProgram(skvm::Builder* p, skvm::Color src, skvm::Color dst, - const SkColorInfo& colorInfo, skvm::Uniforms* uniforms, - SkArenaAlloc* alloc) const { - if (!SkRuntimeEffectPriv::CanDraw(SkCapabilities::RasterBackend().get(), fEffect.get())) { - return {}; - } - - sk_sp inputs = SkRuntimeEffectPriv::TransformUniforms(fEffect->uniforms(), - fUniforms, - colorInfo.colorSpace()); - SkASSERT(inputs); - - SkShaders::MatrixRec mRec(SkMatrix::I()); - mRec.markTotalMatrixInvalid(); - RuntimeEffectVMCallbacks callbacks(p, uniforms, alloc, fChildren, mRec, src, colorInfo); - std::vector uniform = SkRuntimeEffectPriv::MakeSkVMUniforms(p, - uniforms, - fEffect->uniformSize(), - *inputs); - - // Emit the blend function as an SkVM program. - skvm::Coord zeroCoord = {p->splat(0.0f), p->splat(0.0f)}; - return SkSL::ProgramToSkVM(*fEffect->fBaseProgram, fEffect->fMain, p,/*debugTrace=*/nullptr, - SkSpan(uniform), /*device=*/zeroCoord, /*local=*/zeroCoord, - src, dst, &callbacks); -} -#endif - -#if defined(SK_GRAPHITE) -void SkRuntimeBlender::addToKey(const skgpu::graphite::KeyContext& keyContext, - skgpu::graphite::PaintParamsKeyBuilder* builder, - skgpu::graphite::PipelineDataGatherer* gatherer) const { - using namespace skgpu::graphite; - - sk_sp uniforms = SkRuntimeEffectPriv::TransformUniforms( - fEffect->uniforms(), - fUniforms, - keyContext.dstColorInfo().colorSpace()); - SkASSERT(uniforms); - - RuntimeEffectBlock::BeginBlock(keyContext, builder, gatherer, - { fEffect, std::move(uniforms) }); - - SkRuntimeEffectPriv::AddChildrenToKey(fChildren, fEffect->children(), keyContext, builder, - gatherer); - - builder->endBlock(); -} -#endif diff --git a/src/core/SkRuntimeBlender.h b/src/core/SkRuntimeBlender.h index b060437099a1..88345351c48a 100644 --- a/src/core/SkRuntimeBlender.h +++ b/src/core/SkRuntimeBlender.h @@ -25,7 +25,7 @@ class SkRuntimeBlender : public SkBlenderBase { public: SkRuntimeBlender(sk_sp effect, sk_sp uniforms, - SkSpan children) + SkSpan children) : fEffect(std::move(effect)) , fUniforms(std::move(uniforms)) , fChildren(children.begin(), children.end()) {} @@ -36,25 +36,14 @@ class SkRuntimeBlender : public SkBlenderBase { bool onAppendStages(const SkStageRec& rec) const override; -#ifdef SK_ENABLE_SKVM - skvm::Color onProgram(skvm::Builder* p, skvm::Color src, skvm::Color dst, - const SkColorInfo& colorInfo, skvm::Uniforms* uniforms, - SkArenaAlloc* alloc) const override; -#endif - -#if defined(SK_GRAPHITE) - void addToKey(const skgpu::graphite::KeyContext& keyContext, - skgpu::graphite::PaintParamsKeyBuilder* builder, - skgpu::graphite::PipelineDataGatherer* gatherer) const override; -#endif - void flatten(SkWriteBuffer& buffer) const override; SK_FLATTENABLE_HOOKS(SkRuntimeBlender) sk_sp effect() const { return fEffect; } sk_sp uniforms() const { return fUniforms; } - std::vector children() const { return fChildren; } + SkSpan children() const { return fChildren; } + private: sk_sp fEffect; sk_sp fUniforms; diff --git a/src/core/SkRuntimeEffect.cpp b/src/core/SkRuntimeEffect.cpp index 34cd5452b4a7..2af405a8d84f 100644 --- a/src/core/SkRuntimeEffect.cpp +++ b/src/core/SkRuntimeEffect.cpp @@ -8,29 +8,24 @@ #include "include/effects/SkRuntimeEffect.h" #include "include/core/SkAlphaType.h" -#include "include/core/SkBlendMode.h" #include "include/core/SkBlender.h" -#include "include/core/SkCanvas.h" #include "include/core/SkCapabilities.h" #include "include/core/SkColorFilter.h" #include "include/core/SkData.h" -#include "include/core/SkImage.h" -#include "include/core/SkImageInfo.h" -#include "include/core/SkPaint.h" -#include "include/core/SkSurface.h" +#include "include/private/SkSLDefines.h" #include "include/private/base/SkAlign.h" #include "include/private/base/SkDebug.h" #include "include/private/base/SkMutex.h" #include "include/private/base/SkOnce.h" #include "include/private/base/SkTArray.h" #include "src/base/SkArenaAlloc.h" +#include "src/base/SkEnumBitMask.h" #include "src/base/SkNoDestructor.h" #include "src/core/SkBlenderBase.h" #include "src/core/SkChecksum.h" #include "src/core/SkColorSpacePriv.h" #include "src/core/SkColorSpaceXformSteps.h" #include "src/core/SkEffectPriv.h" -#include "src/core/SkFilterColorProgram.h" #include "src/core/SkLRUCache.h" #include "src/core/SkRasterPipeline.h" #include "src/core/SkRasterPipelineOpList.h" @@ -53,9 +48,10 @@ #include "src/sksl/SkSLUtil.h" #include "src/sksl/analysis/SkSLProgramUsage.h" #include "src/sksl/codegen/SkSLRasterPipelineBuilder.h" +#include "src/sksl/codegen/SkSLRasterPipelineCodeGenerator.h" #include "src/sksl/ir/SkSLFunctionDeclaration.h" #include "src/sksl/ir/SkSLLayout.h" -#include "src/sksl/ir/SkSLModifiers.h" +#include "src/sksl/ir/SkSLModifierFlags.h" #include "src/sksl/ir/SkSLProgram.h" #include "src/sksl/ir/SkSLProgramElement.h" #include "src/sksl/ir/SkSLStatement.h" @@ -66,32 +62,12 @@ #include +using namespace skia_private; + class SkColorSpace; struct SkIPoint; -#if defined(SK_GANESH) -#include "include/gpu/GpuTypes.h" -#include "include/gpu/GrRecordingContext.h" -#include "include/gpu/GrTypes.h" -#include "include/gpu/ganesh/SkSurfaceGanesh.h" -#include "src/gpu/ganesh/GrCaps.h" -#include "src/gpu/ganesh/GrRecordingContextPriv.h" -#endif - -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/KeyContext.h" -#include "src/gpu/graphite/KeyHelpers.h" -#include "src/gpu/graphite/PaintParamsKey.h" -#endif - -// Set `skia_enable_sksl_in_raster_pipeline = true` in your GN args to use Raster Pipeline SkSL. -#ifdef SK_ENABLE_SKSL_IN_RASTER_PIPELINE -#include "src/sksl/codegen/SkSLRasterPipelineCodeGenerator.h" - constexpr bool kRPEnableLiveTrace = false; -#endif - -using namespace skia_private; #if defined(SK_BUILD_FOR_DEBUGGER) #define SK_LENIENT_SKSL_DESERIALIZATION 1 @@ -99,8 +75,6 @@ using namespace skia_private; #define SK_LENIENT_SKSL_DESERIALIZATION 0 #endif -#ifdef SK_ENABLE_SKSL - using ChildType = SkRuntimeEffect::ChildType; static bool init_uniform_type(const SkSL::Context& ctx, @@ -134,7 +108,7 @@ SkRuntimeEffect::Uniform SkRuntimeEffectPriv::VarAsUniform(const SkSL::Variable& const SkSL::Context& context, size_t* offset) { using Uniform = SkRuntimeEffect::Uniform; - SkASSERT(var.modifiers().fFlags & SkSL::Modifiers::kUniform_Flag); + SkASSERT(var.modifierFlags().isUniform()); Uniform uni; uni.name = var.name(); uni.flags = 0; @@ -152,7 +126,7 @@ SkRuntimeEffect::Uniform SkRuntimeEffectPriv::VarAsUniform(const SkSL::Variable& } SkAssertResult(init_uniform_type(context, type, &uni)); - if (var.modifiers().fLayout.fFlags & SkSL::Layout::Flag::kColor_Flag) { + if (var.layout().fFlags & SkSL::LayoutFlag::kColor) { uni.flags |= Uniform::kColor_Flag; } @@ -225,7 +199,16 @@ const SkSL::RP::Program* SkRuntimeEffect::getRPProgram(SkSL::DebugTracePriv* deb // By using an SkOnce, we avoid thread hazards and behave in a conceptually const way, but we // can avoid the cost of invoking the RP code generator until it's actually needed. fCompileRPProgramOnce([&] { -#ifdef SK_ENABLE_SKSL_IN_RASTER_PIPELINE + // We generally do not run the inliner when an SkRuntimeEffect program is initially created, + // because the final compile to native shader code will do this. However, in SkRP, there's + // no additional compilation occurring, so we need to manually inline here if we want the + // performance boost of inlining. + if (!(fFlags & kDisableOptimization_Flag)) { + SkSL::Compiler compiler(SkSL::ShaderCapsFactory::Standalone()); + fBaseProgram->fConfig->fSettings.fInlineThreshold = SkSL::kDefaultInlineThreshold; + compiler.runInliner(*fBaseProgram); + } + SkSL::DebugTracePriv tempDebugTrace; if (debugTrace) { const_cast(this)->fRPProgram = MakeRasterPipelineProgram( @@ -243,13 +226,12 @@ const SkSL::RP::Program* SkRuntimeEffect::getRPProgram(SkSL::DebugTracePriv* deb if (fRPProgram) { SkDebugf("-----\n\n"); SkDebugfStream stream; - fRPProgram->dump(&stream); + fRPProgram->dump(&stream, /*writeInstructionCount=*/true); SkDebugf("\n-----\n\n"); } else { SkDebugf("----- RP unsupported -----\n\n"); } } -#endif }); return fRPProgram.get(); @@ -279,7 +261,6 @@ SkSpan SkRuntimeEffectPriv::UniformsAsSpan( originalData->size() / sizeof(float)}; } -#ifdef SK_ENABLE_SKSL_IN_RASTER_PIPELINE bool RuntimeEffectRPCallbacks::appendShader(int index) { if (SkShader* shader = fChildren[index].shader()) { if (fSampleUsages[index].isPassThrough()) { @@ -347,7 +328,6 @@ void RuntimeEffectRPCallbacks::applyColorSpaceXform(const SkColorSpaceXformSteps // Restore the execution mask, and move the color back into program data. fStage.fPipeline->append(SkRasterPipelineOp::exchange_src, color); } -#endif // SK_ENABLE_SKSL_IN_RASTER_PIPELINE bool SkRuntimeEffectPriv::CanDraw(const SkCapabilities* caps, const SkSL::Program* program) { SkASSERT(caps && program); @@ -388,7 +368,7 @@ static ChildType child_type(const SkSL::Type& type) { } static bool verify_child_effects(const std::vector& reflected, - SkSpan effectPtrs) { + SkSpan effectPtrs) { // Verify that the number of passed-in child-effect pointers matches the SkSL code. if (reflected.size() != effectPtrs.size()) { return false; @@ -445,35 +425,13 @@ bool SkRuntimeEffectPriv::ReadChildEffects(SkReadBuffer& buffer, } void SkRuntimeEffectPriv::WriteChildEffects( - SkWriteBuffer& buffer, const std::vector& children) { + SkWriteBuffer& buffer, SkSpan children) { buffer.write32(children.size()); for (const auto& child : children) { buffer.writeFlattenable(child.flattenable()); } } - -#ifdef SK_ENABLE_SKVM -std::vector SkRuntimeEffectPriv::MakeSkVMUniforms(skvm::Builder* p, - skvm::Uniforms* uniforms, - size_t inputSize, - const SkData& inputs) { - SkASSERTF(!(inputSize & 3), "inputSize was %zu, expected a multiple of 4", inputSize); - - const int32_t* data = reinterpret_cast(inputs.data()); - const size_t uniformCount = inputSize / sizeof(int32_t); - std::vector uniform; - uniform.reserve(uniformCount); - for (size_t index = 0; index < uniformCount; ++index) { - int32_t bits; - memcpy(&bits, data + index, sizeof(int32_t)); - uniform.push_back(p->uniform32(uniforms->push(bits)).id); - } - - return uniform; -} -#endif - SkSL::ProgramSettings SkRuntimeEffect::MakeSettings(const Options& options) { SkSL::ProgramSettings settings; settings.fInlineThreshold = 0; @@ -540,18 +498,20 @@ SkRuntimeEffect::Result SkRuntimeEffect::MakeInternal(std::unique_ptrgetFunction("main"); if (!main) { RETURN_FAILURE("missing 'main' function"); } - const auto& mainParams = main->parameters(); - auto iter = std::find_if(mainParams.begin(), mainParams.end(), [](const SkSL::Variable* p) { - return p->modifiers().fLayout.fBuiltin == SK_MAIN_COORDS_BUILTIN; - }); + const SkSL::Variable* coordsParam = main->getMainCoordsParameter(); + const SkSL::ProgramUsage::VariableCounts sampleCoordsUsage = - iter != mainParams.end() ? program->usage()->get(**iter) - : SkSL::ProgramUsage::VariableCounts{}; + coordsParam ? program->usage()->get(*coordsParam) + : SkSL::ProgramUsage::VariableCounts{}; if (sampleCoordsUsage.fRead || sampleCoordsUsage.fWrite) { flags |= kUsesSampleCoords_Flag; @@ -623,7 +583,7 @@ SkRuntimeEffect::Result SkRuntimeEffect::MakeInternal(std::unique_ptr baseProgram, sizeof(options.allowPrivateAccess), fHash); fHash = SkChecksum::Hash32(&options.maxVersionAllowed, sizeof(options.maxVersionAllowed), fHash); - - fFilterColorProgram = SkFilterColorProgram::Make(this); } SkRuntimeEffect::~SkRuntimeEffect() = default; @@ -828,115 +786,13 @@ const SkRuntimeEffect::Child* SkRuntimeEffect::findChild(std::string_view name) return iter == fChildren.end() ? nullptr : &(*iter); } -const SkFilterColorProgram* SkRuntimeEffect::getFilterColorProgram() const { - return fFilterColorProgram.get(); -} - /////////////////////////////////////////////////////////////////////////////////////////////////// -#if defined(SK_GRAPHITE) -void SkRuntimeEffectPriv::AddChildrenToKey(SkSpan children, - SkSpan childInfo, - const skgpu::graphite::KeyContext& keyContext, - skgpu::graphite::PaintParamsKeyBuilder* builder, - skgpu::graphite::PipelineDataGatherer* gatherer) { - using namespace skgpu::graphite; - - SkASSERT(children.size() == childInfo.size()); - - for (size_t index = 0; index < children.size(); ++index) { - const SkRuntimeEffect::ChildPtr& child = children[index]; - std::optional type = child.type(); - if (type == ChildType::kShader) { - as_SB(child.shader())->addToKey(keyContext, builder, gatherer); - } else if (type == ChildType::kColorFilter) { - as_CFB(child.colorFilter())->addToKey(keyContext, builder, gatherer); - } else if (type == ChildType::kBlender) { - as_BB(child.blender())->addToKey(keyContext, builder, gatherer); - } else { - // We don't have a child effect. Substitute in a no-op effect. - switch (childInfo[index].type) { - case ChildType::kShader: - case ChildType::kColorFilter: - // A "passthrough" shader returns the input color as-is. - PriorOutputBlock::BeginBlock(keyContext, builder, gatherer); - builder->endBlock(); - break; - - case ChildType::kBlender: - // A "passthrough" blender performs `blend_src_over(src, dest)`. - BlendModeBlenderBlock::BeginBlock( - keyContext, builder, gatherer, SkBlendMode::kSrcOver); - builder->endBlock(); - break; - } - } - } -} -#endif - -#if defined(SK_ENABLE_SKVM) - -skvm::Color RuntimeEffectVMCallbacks::sampleShader(int ix, skvm::Coord coord) { - // We haven't tracked device coords and the runtime effect could have arbitrarily - // manipulated the passed coords. We should be in a state where any pending matrix was - // already applied before the runtime effect's code could have manipulated the coords - // and the total matrix from child shader to device space is flagged as unknown. - SkASSERT(!fMRec.hasPendingMatrix()); - SkASSERT(!fMRec.totalMatrixIsValid()); - if (SkShader* shader = fChildren[ix].shader()) { - return as_SB(shader)->program(fBuilder, - coord, - coord, - fInColor, - fMRec, - fColorInfo, - fUniforms, - fAlloc); - } - return fInColor; -} - -skvm::Color RuntimeEffectVMCallbacks::sampleColorFilter(int ix, skvm::Color color) { - if (SkColorFilter* colorFilter = fChildren[ix].colorFilter()) { - return as_CFB(colorFilter)->program(fBuilder, color, fColorInfo, fUniforms, fAlloc); - } - return color; -} - -skvm::Color RuntimeEffectVMCallbacks::sampleBlender(int ix, skvm::Color src, skvm::Color dst) { - if (SkBlender* blender = fChildren[ix].blender()) { - return as_BB(blender)->program(fBuilder, src, dst, fColorInfo, fUniforms, fAlloc); - } - return blend(SkBlendMode::kSrcOver, src, dst); -} - -skvm::Color RuntimeEffectVMCallbacks::toLinearSrgb(skvm::Color color) { - if (!fColorInfo.colorSpace()) { - // These intrinsics do nothing when color management is disabled - return color; - } - return SkColorSpaceXformSteps{fColorInfo.colorSpace(), kUnpremul_SkAlphaType, - sk_srgb_linear_singleton(), kUnpremul_SkAlphaType} - .program(fBuilder, fUniforms, color); -} - -skvm::Color RuntimeEffectVMCallbacks::fromLinearSrgb(skvm::Color color) { - if (!fColorInfo.colorSpace()) { - // These intrinsics do nothing when color management is disabled - return color; - } - return SkColorSpaceXformSteps{sk_srgb_linear_singleton(), kUnpremul_SkAlphaType, - fColorInfo.colorSpace(), kUnpremul_SkAlphaType} - .program(fBuilder, fUniforms, color); -} - -#endif // defined(SK_ENABLE_SKVM) - -sk_sp SkRuntimeEffectPriv::MakeDeferredShader(const SkRuntimeEffect* effect, - UniformsCallback uniformsCallback, - SkSpan children, - const SkMatrix* localMatrix) { +sk_sp SkRuntimeEffectPriv::MakeDeferredShader( + const SkRuntimeEffect* effect, + UniformsCallback uniformsCallback, + SkSpan children, + const SkMatrix* localMatrix) { if (!effect->allowShader()) { return nullptr; } @@ -965,7 +821,7 @@ sk_sp SkRuntimeEffect::makeShader(sk_sp uniforms, } sk_sp SkRuntimeEffect::makeShader(sk_sp uniforms, - SkSpan children, + SkSpan children, const SkMatrix* localMatrix) const { if (!this->allowShader()) { return nullptr; @@ -986,48 +842,6 @@ sk_sp SkRuntimeEffect::makeShader(sk_sp uniforms, children); } -sk_sp SkRuntimeEffect::makeImage(GrRecordingContext* rContext, - sk_sp uniforms, - SkSpan children, - const SkMatrix* localMatrix, - SkImageInfo resultInfo, - bool mipmapped) const { - if (resultInfo.alphaType() == kUnpremul_SkAlphaType || - resultInfo.alphaType() == kUnknown_SkAlphaType) { - return nullptr; - } - sk_sp surface; - if (rContext) { -#if defined(SK_GANESH) - if (!rContext->priv().caps()->mipmapSupport()) { - mipmapped = false; - } - surface = SkSurfaces::RenderTarget(rContext, - skgpu::Budgeted::kYes, - resultInfo, - 1, - kTopLeft_GrSurfaceOrigin, - nullptr, - mipmapped); -#endif - } else { - surface = SkSurfaces::Raster(resultInfo); - } - if (!surface) { - return nullptr; - } - SkCanvas* canvas = surface->getCanvas(); - auto shader = this->makeShader(std::move(uniforms), children, localMatrix); - if (!shader) { - return nullptr; - } - SkPaint paint; - paint.setShader(std::move(shader)); - paint.setBlendMode(SkBlendMode::kSrc); - canvas->drawPaint(paint); - return surface->makeImageSnapshot(); -} - sk_sp SkRuntimeEffect::makeColorFilter(sk_sp uniforms, sk_sp childColorFilters[], size_t childCount) const { @@ -1039,7 +853,7 @@ sk_sp SkRuntimeEffect::makeColorFilter(sk_sp unifor } sk_sp SkRuntimeEffect::makeColorFilter(sk_sp uniforms, - SkSpan children) const { + SkSpan children) const { if (!this->allowColorFilter()) { return nullptr; } @@ -1060,7 +874,7 @@ sk_sp SkRuntimeEffect::makeColorFilter(sk_sp unifor } sk_sp SkRuntimeEffect::makeBlender(sk_sp uniforms, - SkSpan children) const { + SkSpan children) const { if (!this->allowBlender()) { return nullptr; } @@ -1137,42 +951,28 @@ void SkRuntimeEffect::RegisterFlattenables() { } SkRuntimeShaderBuilder::SkRuntimeShaderBuilder(sk_sp effect) - : INHERITED(std::move(effect)) {} + : SkRuntimeEffectBuilder(std::move(effect)) {} SkRuntimeShaderBuilder::~SkRuntimeShaderBuilder() = default; -sk_sp SkRuntimeShaderBuilder::makeImage(GrRecordingContext* recordingContext, - const SkMatrix* localMatrix, - SkImageInfo resultInfo, - bool mipmapped) { - return this->effect()->makeImage(recordingContext, - this->uniforms(), - this->children(), - localMatrix, - resultInfo, - mipmapped); -} - -sk_sp SkRuntimeShaderBuilder::makeShader(const SkMatrix* localMatrix) { +sk_sp SkRuntimeShaderBuilder::makeShader(const SkMatrix* localMatrix) const { return this->effect()->makeShader(this->uniforms(), this->children(), localMatrix); } SkRuntimeBlendBuilder::SkRuntimeBlendBuilder(sk_sp effect) - : INHERITED(std::move(effect)) {} + : SkRuntimeEffectBuilder(std::move(effect)) {} SkRuntimeBlendBuilder::~SkRuntimeBlendBuilder() = default; -sk_sp SkRuntimeBlendBuilder::makeBlender() { +sk_sp SkRuntimeBlendBuilder::makeBlender() const { return this->effect()->makeBlender(this->uniforms(), this->children()); } SkRuntimeColorFilterBuilder::SkRuntimeColorFilterBuilder(sk_sp effect) - : INHERITED(std::move(effect)) {} + : SkRuntimeEffectBuilder(std::move(effect)) {} SkRuntimeColorFilterBuilder::~SkRuntimeColorFilterBuilder() = default; -sk_sp SkRuntimeColorFilterBuilder::makeColorFilter() { +sk_sp SkRuntimeColorFilterBuilder::makeColorFilter() const { return this->effect()->makeColorFilter(this->uniforms(), this->children()); } - -#endif // SK_ENABLE_SKSL diff --git a/src/core/SkRuntimeEffectPriv.h b/src/core/SkRuntimeEffectPriv.h index 16c968c8c92f..763adb72a778 100644 --- a/src/core/SkRuntimeEffectPriv.h +++ b/src/core/SkRuntimeEffectPriv.h @@ -15,25 +15,15 @@ #include "include/private/base/SkAssert.h" #include "include/private/base/SkSpan_impl.h" #include "include/private/base/SkTArray.h" +#include "src/sksl/codegen/SkSLRasterPipelineBuilder.h" #include #include #include #include -#include -#ifdef SK_ENABLE_SKSL #include "include/sksl/SkSLVersion.h" -#ifdef SK_ENABLE_SKSL_IN_RASTER_PIPELINE -#include "src/sksl/codegen/SkSLRasterPipelineBuilder.h" -#endif - -#ifdef SK_ENABLE_SKVM -#include "include/core/SkImageInfo.h" -#include "src/sksl/codegen/SkSLVMCodeGenerator.h" -#endif - class SkArenaAlloc; class SkCapabilities; class SkColorSpace; @@ -55,14 +45,6 @@ class Variable; struct Program; } -#if defined(SK_GRAPHITE) -namespace skgpu::graphite { -class KeyContext; -class PaintParamsKeyBuilder; -class PipelineDataGatherer; -} // namespace skgpu::graphite -#endif - class SkRuntimeEffectPriv { public: struct UniformsCallbackContext { @@ -78,7 +60,7 @@ class SkRuntimeEffectPriv { using UniformsCallback = std::function(const UniformsCallbackContext&)>; static sk_sp MakeDeferredShader(const SkRuntimeEffect* effect, UniformsCallback uniformsCallback, - SkSpan children, + SkSpan children, const SkMatrix* localMatrix = nullptr); // Helper function when creating an effect for a GrSkSLFP that verifies an effect will @@ -88,11 +70,7 @@ class SkRuntimeEffectPriv { if (!effect->allowColorFilter() || !effect->children().empty()) { return false; } -#if defined(SK_ENABLE_SKVM) - return effect->getFilterColorProgram(); -#else return true; -#endif } static uint32_t Hash(const SkRuntimeEffect& effect) { @@ -138,23 +116,8 @@ class SkRuntimeEffectPriv { static bool ReadChildEffects(SkReadBuffer& buffer, const SkRuntimeEffect* effect, skia_private::TArray* children); - static void WriteChildEffects(SkWriteBuffer &buffer, - const std::vector &children); - -#ifdef SK_ENABLE_SKVM - static std::vector MakeSkVMUniforms(skvm::Builder*, - skvm::Uniforms*, - size_t inputSize, - const SkData& inputs); -#endif - -#if defined(SK_GRAPHITE) -static void AddChildrenToKey(SkSpan children, - SkSpan childInfo, - const skgpu::graphite::KeyContext& keyContext, - skgpu::graphite::PaintParamsKeyBuilder* builder, - skgpu::graphite::PipelineDataGatherer* gatherer); -#endif + static void WriteChildEffects(SkWriteBuffer& buffer, + SkSpan children); }; // These internal APIs for creating runtime effects vary from the public API in two ways: @@ -197,7 +160,6 @@ inline SkRuntimeEffect* SkMakeRuntimeEffect( return result.effect.release(); } -#ifdef SK_ENABLE_SKSL_IN_RASTER_PIPELINE class RuntimeEffectRPCallbacks : public SkSL::RP::Callbacks { public: RuntimeEffectRPCallbacks(const SkStageRec& s, @@ -224,46 +186,5 @@ class RuntimeEffectRPCallbacks : public SkSL::RP::Callbacks { SkSpan fChildren; SkSpan fSampleUsages; }; -#endif // SK_ENABLE_SKSL_IN_RASTER_PIPELINE - -#if defined(SK_ENABLE_SKVM) -class RuntimeEffectVMCallbacks : public SkSL::SkVMCallbacks { -public: - RuntimeEffectVMCallbacks(skvm::Builder* builder, - skvm::Uniforms* uniforms, - SkArenaAlloc* alloc, - const std::vector& children, - const SkShaders::MatrixRec& mRec, - skvm::Color inColor, - const SkColorInfo& colorInfo) - : fBuilder(builder) - , fUniforms(uniforms) - , fAlloc(alloc) - , fChildren(children) - , fMRec(mRec) - , fInColor(inColor) - , fColorInfo(colorInfo) {} - - skvm::Color sampleShader(int ix, skvm::Coord coord) override; - - skvm::Color sampleColorFilter(int ix, skvm::Color color) override; - - skvm::Color sampleBlender(int ix, skvm::Color src, skvm::Color dst) override; - - skvm::Color toLinearSrgb(skvm::Color color) override; - - skvm::Color fromLinearSrgb(skvm::Color color) override; - - skvm::Builder* fBuilder; - skvm::Uniforms* fUniforms; - SkArenaAlloc* fAlloc; - const std::vector& fChildren; - const SkShaders::MatrixRec& fMRec; - const skvm::Color fInColor; - const SkColorInfo& fColorInfo; -}; -#endif // defined(SK_ENABLE_SKVM) - -#endif // SK_ENABLE_SKSL #endif // SkRuntimeEffectPriv_DEFINED diff --git a/src/core/SkScalerContext.cpp b/src/core/SkScalerContext.cpp index 8c8ec0509c51..b8197f8495d5 100644 --- a/src/core/SkScalerContext.cpp +++ b/src/core/SkScalerContext.cpp @@ -23,7 +23,6 @@ #include "src/core/SkFontPriv.h" #include "src/core/SkGlyph.h" #include "src/core/SkMaskGamma.h" -#include "src/core/SkMatrixProvider.h" #include "src/core/SkPaintPriv.h" #include "src/core/SkPathPriv.h" #include "src/core/SkRasterClip.h" @@ -232,26 +231,43 @@ SkGlyph SkScalerContext::internalMakeGlyph(SkPackedGlyphID packedID, SkMask::For glyph.fWidth = 0; glyph.fHeight = 0; }; + SkGlyph glyph{packedID}; - glyph.fMaskFormat = format; - // Must call to allow the subclass to determine the glyph representation to use. - this->generateMetrics(&glyph, alloc); - SkDEBUGCODE(glyph.fAdvancesBoundsFormatAndInitialPathDone = true;) - if (fGenerateImageFromPath) { + glyph.fMaskFormat = format; // subclass may return a different value + const auto mx = this->generateMetrics(glyph, alloc); + SkASSERT(!mx.neverRequestPath || !mx.computeFromPath); + + glyph.fAdvanceX = mx.advance.fX; + glyph.fAdvanceY = mx.advance.fY; + glyph.fMaskFormat = mx.maskFormat; + glyph.fScalerContextBits = mx.extraBits; + + if (mx.computeFromPath || (fGenerateImageFromPath && !mx.neverRequestPath)) { + SkDEBUGCODE(glyph.fAdvancesBoundsFormatAndInitialPathDone = true;) this->internalGetPath(glyph, alloc); const SkPath* devPath = glyph.path(); if (devPath) { - // generateMetrics may have modified the glyph fMaskFormat. - glyph.fMaskFormat = format; const bool doVert = SkToBool(fRec.fFlags & SkScalerContext::kLCD_Vertical_Flag); const bool a8LCD = SkToBool(fRec.fFlags & SkScalerContext::kGenA8FromLCD_Flag); const bool hairline = glyph.pathIsHairline(); if (!GenerateMetricsFromPath(&glyph, *devPath, format, doVert, a8LCD, hairline)) { zeroBounds(glyph); - return glyph; } } + } else { + if (!SkRectPriv::Is16Bit(mx.bounds)) { + zeroBounds(glyph); + } else { + glyph.fLeft = SkTo( mx.bounds.fLeft); + glyph.fTop = SkTo( mx.bounds.fTop); + glyph.fWidth = SkTo(mx.bounds.width()); + glyph.fHeight = SkTo(mx.bounds.height()); + } + if (mx.neverRequestPath) { + glyph.setPath(alloc, nullptr, false); + } } + SkDEBUGCODE(glyph.fAdvancesBoundsFormatAndInitialPathDone = true;) // if either dimension is empty, zap the image bounds of the glyph if (0 == glyph.fWidth || 0 == glyph.fHeight) { @@ -260,13 +276,13 @@ SkGlyph SkScalerContext::internalMakeGlyph(SkPackedGlyphID packedID, SkMask::For } if (fMaskFilter) { - SkMask src = glyph.mask(), - dst; - SkMatrix matrix; + // only want the bounds from the filter + SkMask src(nullptr, glyph.iRect(), glyph.rowBytes(), glyph.maskFormat()); + SkMaskBuilder dst; + SkMatrix matrix; fRec.getMatrixFrom2x2(&matrix); - src.fImage = nullptr; // only want the bounds from the filter if (as_MFB(fMaskFilter)->filterMask(&dst, src, matrix, nullptr)) { if (dst.fBounds.isEmpty() || !SkRectPriv::Is16Bit(dst.fBounds)) { zeroBounds(glyph); @@ -295,7 +311,7 @@ static void applyLUTToA8Mask(const SkMask& mask, const uint8_t* lut) { } } -static void pack4xHToMask(const SkPixmap& src, const SkMask& dst, +static void pack4xHToMask(const SkPixmap& src, SkMaskBuilder& dst, const SkMaskGamma::PreBlend& maskPreBlend, const bool doBGR, const bool doVert) { #define SAMPLES_PER_PIXEL 4 @@ -317,7 +333,7 @@ static void pack4xHToMask(const SkPixmap& src, const SkMask& dst, const int sample_width = src.width(); const int height = src.height(); - uint8_t* dstImage = dst.fImage; + uint8_t* dstImage = dst.image(); size_t dstRB = dst.fRowBytes; // An N tap FIR is defined by // out[n] = coeff[0]*x[n] + coeff[1]*x[n-1] + ... + coeff[N]*x[n-N] @@ -429,14 +445,14 @@ static uint8_t pack_8_to_1(const uint8_t alpha[8]) { return SkToU8(bits); } -static void packA8ToA1(const SkMask& mask, const uint8_t* src, size_t srcRB) { - const int height = mask.fBounds.height(); - const int width = mask.fBounds.width(); +static void packA8ToA1(SkMaskBuilder& dstMask, const uint8_t* src, size_t srcRB) { + const int height = dstMask.fBounds.height(); + const int width = dstMask.fBounds.width(); const int octs = width >> 3; const int leftOverBits = width & 7; - uint8_t* dst = mask.fImage; - const int dstPad = mask.fRowBytes - SkAlign8(width)/8; + uint8_t* dst = dstMask.image(); + const int dstPad = dstMask.fRowBytes - SkAlign8(width)/8; SkASSERT(dstPad >= 0); SkASSERT(width >= 0); @@ -462,43 +478,43 @@ static void packA8ToA1(const SkMask& mask, const uint8_t* src, size_t srcRB) { } void SkScalerContext::GenerateImageFromPath( - const SkMask& mask, const SkPath& path, const SkMaskGamma::PreBlend& maskPreBlend, + SkMaskBuilder& dstMask, const SkPath& path, const SkMaskGamma::PreBlend& maskPreBlend, const bool doBGR, const bool verticalLCD, const bool a8FromLCD, const bool hairline) { - SkASSERT(mask.fFormat == SkMask::kBW_Format || - mask.fFormat == SkMask::kA8_Format || - mask.fFormat == SkMask::kLCD16_Format); + SkASSERT(dstMask.fFormat == SkMask::kBW_Format || + dstMask.fFormat == SkMask::kA8_Format || + dstMask.fFormat == SkMask::kLCD16_Format); SkPaint paint; SkPath strokePath; const SkPath* pathToUse = &path; - int srcW = mask.fBounds.width(); - int srcH = mask.fBounds.height(); + int srcW = dstMask.fBounds.width(); + int srcH = dstMask.fBounds.height(); int dstW = srcW; int dstH = srcH; SkMatrix matrix; - matrix.setTranslate(-SkIntToScalar(mask.fBounds.fLeft), - -SkIntToScalar(mask.fBounds.fTop)); + matrix.setTranslate(-SkIntToScalar(dstMask.fBounds.fLeft), + -SkIntToScalar(dstMask.fBounds.fTop)); paint.setStroke(hairline); - paint.setAntiAlias(SkMask::kBW_Format != mask.fFormat); + paint.setAntiAlias(SkMask::kBW_Format != dstMask.fFormat); - const bool fromLCD = (mask.fFormat == SkMask::kLCD16_Format) || - (mask.fFormat == SkMask::kA8_Format && a8FromLCD); - const bool intermediateDst = fromLCD || mask.fFormat == SkMask::kBW_Format; + const bool fromLCD = (dstMask.fFormat == SkMask::kLCD16_Format) || + (dstMask.fFormat == SkMask::kA8_Format && a8FromLCD); + const bool intermediateDst = fromLCD || dstMask.fFormat == SkMask::kBW_Format; if (fromLCD) { if (verticalLCD) { dstW = 4*dstH - 8; dstH = srcW; - matrix.setAll(0, 4, -SkIntToScalar(mask.fBounds.fTop + 1) * 4, - 1, 0, -SkIntToScalar(mask.fBounds.fLeft), + matrix.setAll(0, 4, -SkIntToScalar(dstMask.fBounds.fTop + 1) * 4, + 1, 0, -SkIntToScalar(dstMask.fBounds.fLeft), 0, 0, 1); } else { dstW = 4*dstW - 8; - matrix.setAll(4, 0, -SkIntToScalar(mask.fBounds.fLeft + 1) * 4, - 0, 1, -SkIntToScalar(mask.fBounds.fTop), + matrix.setAll(4, 0, -SkIntToScalar(dstMask.fBounds.fLeft + 1) * 4, + 0, 1, -SkIntToScalar(dstMask.fBounds.fTop), 0, 0, 1); } @@ -523,35 +539,34 @@ void SkScalerContext::GenerateImageFromPath( if (intermediateDst) { if (!dst.tryAlloc(info)) { // can't allocate offscreen, so empty the mask and return - sk_bzero(mask.fImage, mask.computeImageSize()); + sk_bzero(dstMask.image(), dstMask.computeImageSize()); return; } } else { - dst.reset(info, mask.fImage, mask.fRowBytes); + dst.reset(info, dstMask.image(), dstMask.fRowBytes); } sk_bzero(dst.writable_addr(), dst.computeByteSize()); SkDrawBase draw; - SkMatrixProvider matrixProvider(matrix); draw.fBlitterChooser = SkA8Blitter_Choose; draw.fDst = dst; draw.fRC = &clip; - draw.fMatrixProvider = &matrixProvider; + draw.fCTM = &matrix; draw.drawPath(*pathToUse, paint); - switch (mask.fFormat) { + switch (dstMask.fFormat) { case SkMask::kBW_Format: - packA8ToA1(mask, dst.addr8(0, 0), dst.rowBytes()); + packA8ToA1(dstMask, dst.addr8(0, 0), dst.rowBytes()); break; case SkMask::kA8_Format: if (fromLCD) { - pack4xHToMask(dst, mask, maskPreBlend, doBGR, verticalLCD); + pack4xHToMask(dst, dstMask, maskPreBlend, doBGR, verticalLCD); } else if (maskPreBlend.isApplicable()) { - applyLUTToA8Mask(mask, maskPreBlend.fG); + applyLUTToA8Mask(dstMask, maskPreBlend.fG); } break; case SkMask::kLCD16_Format: - pack4xHToMask(dst, mask, maskPreBlend, doBGR, verticalLCD); + pack4xHToMask(dst, dstMask, maskPreBlend, doBGR, verticalLCD); break; default: break; @@ -586,15 +601,17 @@ void SkScalerContext::getImage(const SkGlyph& origGlyph) { } if (!fGenerateImageFromPath) { - generateImage(*unfilteredGlyph); + generateImage(*unfilteredGlyph, unfilteredGlyph->fImage); } else { SkASSERT(origGlyph.setPathHasBeenCalled()); const SkPath* devPath = origGlyph.path(); if (!devPath) { - generateImage(*unfilteredGlyph); + generateImage(*unfilteredGlyph, unfilteredGlyph->fImage); } else { - SkMask mask = unfilteredGlyph->mask(); + SkMaskBuilder mask(static_cast(unfilteredGlyph->fImage), + unfilteredGlyph->iRect(), unfilteredGlyph->rowBytes(), + unfilteredGlyph->maskFormat()); SkASSERT(SkMask::kARGB32_Format != origGlyph.fMaskFormat); SkASSERT(SkMask::kARGB32_Format != mask.fFormat); const bool doBGR = SkToBool(fRec.fFlags & SkScalerContext::kLCD_BGROrder_Flag); @@ -609,68 +626,74 @@ void SkScalerContext::getImage(const SkGlyph& origGlyph) { // k3D_Format should not be mask filtered. SkASSERT(SkMask::k3D_Format != unfilteredGlyph->fMaskFormat); - SkMask filteredMask; - SkMask srcMask; + SkMaskBuilder srcMask; + SkAutoMaskFreeImage srcMaskOwnedImage(nullptr); SkMatrix m; fRec.getMatrixFrom2x2(&m); - if (as_MFB(fMaskFilter)->filterMask(&filteredMask, unfilteredGlyph->mask(), m, nullptr)) { - // Filter succeeded; filteredMask.fImage was allocated. - srcMask = filteredMask; + if (as_MFB(fMaskFilter)->filterMask(&srcMask, unfilteredGlyph->mask(), m, nullptr)) { + // Filter succeeded; srcMask.fImage was allocated. + srcMaskOwnedImage.reset(srcMask.image()); } else if (unfilteredGlyph->fImage == tmpGlyphImageStorage.get()) { // Filter did nothing; unfiltered mask is independent of origGlyph.fImage. - srcMask = unfilteredGlyph->mask(); + srcMask = SkMaskBuilder(static_cast(unfilteredGlyph->fImage), + unfilteredGlyph->iRect(), unfilteredGlyph->rowBytes(), + unfilteredGlyph->maskFormat()); } else if (origGlyph.iRect() == unfilteredGlyph->iRect()) { // Filter did nothing; the unfiltered mask is in origGlyph.fImage and matches. return; } else { // Filter did nothing; the unfiltered mask is in origGlyph.fImage and conflicts. - srcMask = unfilteredGlyph->mask(); + srcMask = SkMaskBuilder(static_cast(unfilteredGlyph->fImage), + unfilteredGlyph->iRect(), unfilteredGlyph->rowBytes(), + unfilteredGlyph->maskFormat()); size_t imageSize = unfilteredGlyph->imageSize(); tmpGlyphImageStorage.reset(imageSize); - srcMask.fImage = static_cast(tmpGlyphImageStorage.get()); - memcpy(srcMask.fImage, unfilteredGlyph->fImage, imageSize); + srcMask.image() = static_cast(tmpGlyphImageStorage.get()); + memcpy(srcMask.image(), unfilteredGlyph->fImage, imageSize); } SkASSERT_RELEASE(srcMask.fFormat == origGlyph.fMaskFormat); - SkMask dstMask = origGlyph.mask(); + SkMaskBuilder dstMask = SkMaskBuilder(static_cast(origGlyph.fImage), + origGlyph.iRect(), origGlyph.rowBytes(), + origGlyph.maskFormat()); SkIRect origBounds = dstMask.fBounds; // Find the intersection of src and dst while updating the fImages. if (srcMask.fBounds.fTop < dstMask.fBounds.fTop) { int32_t topDiff = dstMask.fBounds.fTop - srcMask.fBounds.fTop; - srcMask.fImage += srcMask.fRowBytes * topDiff; - srcMask.fBounds.fTop = dstMask.fBounds.fTop; + srcMask.image() += srcMask.fRowBytes * topDiff; + srcMask.bounds().fTop = dstMask.fBounds.fTop; } if (dstMask.fBounds.fTop < srcMask.fBounds.fTop) { int32_t topDiff = srcMask.fBounds.fTop - dstMask.fBounds.fTop; - dstMask.fImage += dstMask.fRowBytes * topDiff; - dstMask.fBounds.fTop = srcMask.fBounds.fTop; + dstMask.image() += dstMask.fRowBytes * topDiff; + dstMask.bounds().fTop = srcMask.fBounds.fTop; } if (srcMask.fBounds.fLeft < dstMask.fBounds.fLeft) { int32_t leftDiff = dstMask.fBounds.fLeft - srcMask.fBounds.fLeft; - srcMask.fImage += leftDiff; - srcMask.fBounds.fLeft = dstMask.fBounds.fLeft; + srcMask.image() += leftDiff; + srcMask.bounds().fLeft = dstMask.fBounds.fLeft; } if (dstMask.fBounds.fLeft < srcMask.fBounds.fLeft) { int32_t leftDiff = srcMask.fBounds.fLeft - dstMask.fBounds.fLeft; - dstMask.fImage += leftDiff; - dstMask.fBounds.fLeft = srcMask.fBounds.fLeft; + dstMask.image() += leftDiff; + dstMask.bounds().fLeft = srcMask.fBounds.fLeft; } if (srcMask.fBounds.fBottom < dstMask.fBounds.fBottom) { - dstMask.fBounds.fBottom = srcMask.fBounds.fBottom; + dstMask.bounds().fBottom = srcMask.fBounds.fBottom; } if (dstMask.fBounds.fBottom < srcMask.fBounds.fBottom) { - srcMask.fBounds.fBottom = dstMask.fBounds.fBottom; + srcMask.bounds().fBottom = dstMask.fBounds.fBottom; } if (srcMask.fBounds.fRight < dstMask.fBounds.fRight) { - dstMask.fBounds.fRight = srcMask.fBounds.fRight; + dstMask.bounds().fRight = srcMask.fBounds.fRight; } if (dstMask.fBounds.fRight < srcMask.fBounds.fRight) { - srcMask.fBounds.fRight = dstMask.fBounds.fRight; + srcMask.bounds().fRight = dstMask.fBounds.fRight; } SkASSERT(srcMask.fBounds == dstMask.fBounds); @@ -680,9 +703,9 @@ void SkScalerContext::getImage(const SkGlyph& origGlyph) { int srcRB = srcMask.fRowBytes; const uint8_t* src = srcMask.fImage; - uint8_t* dst = dstMask.fImage; + uint8_t* dst = dstMask.image(); - if (SkMask::k3D_Format == filteredMask.fFormat) { + if (SkMask::k3D_Format == srcMask.fFormat) { // we have to copy 3 times as much height *= 3; } @@ -697,7 +720,6 @@ void SkScalerContext::getImage(const SkGlyph& origGlyph) { src += srcRB; dst += dstRB; } - SkMask::FreeImage(filteredMask.fImage); } } @@ -1256,15 +1278,10 @@ std::unique_ptr SkScalerContext::MakeEmpty( : SkScalerContext(std::move(typeface), effects, desc) {} protected: - bool generateAdvance(SkGlyph* glyph) override { - glyph->zeroMetrics(); - return true; - } - void generateMetrics(SkGlyph* glyph, SkArenaAlloc*) override { - glyph->fMaskFormat = fRec.fMaskFormat; - glyph->zeroMetrics(); + GlyphMetrics generateMetrics(const SkGlyph& glyph, SkArenaAlloc*) override { + return {glyph.maskFormat()}; } - void generateImage(const SkGlyph& glyph) override {} + void generateImage(const SkGlyph&, void*) override {} bool generatePath(const SkGlyph& glyph, SkPath* path) override { path->reset(); return false; diff --git a/src/core/SkScalerContext.h b/src/core/SkScalerContext.h index 6be5908b01e8..890e7d5f3ce2 100644 --- a/src/core/SkScalerContext.h +++ b/src/core/SkScalerContext.h @@ -363,16 +363,26 @@ class SkScalerContext { protected: SkScalerContextRec fRec; - /** Generates the contents of glyph.fAdvanceX and glyph.fAdvanceY if it can do so quickly. - * Returns true if it could, false otherwise. - */ - virtual bool generateAdvance(SkGlyph* glyph) = 0; + struct GlyphMetrics { + SkVector advance; + SkIRect bounds; + SkMask::Format maskFormat; + uint16_t extraBits; + bool neverRequestPath; + bool computeFromPath; + + GlyphMetrics(SkMask::Format format) + : advance{0, 0} + , bounds{0, 0, 0, 0} + , maskFormat(format) + , extraBits(0) + , neverRequestPath(false) + , computeFromPath(false) + {} + }; + + virtual GlyphMetrics generateMetrics(const SkGlyph&, SkArenaAlloc*) = 0; - /** Generates the contents of glyph.fWidth, fHeight, fTop, fLeft, - * as well as fAdvanceX and fAdvanceY if not already set. - * The fMaskFormat will already be set to a requested format but may be changed. - */ - virtual void generateMetrics(SkGlyph* glyph, SkArenaAlloc*) = 0; static bool GenerateMetricsFromPath( SkGlyph* glyph, const SkPath& path, SkMask::Format format, bool verticalLCD, bool a8FromLCD, bool hairline); @@ -385,9 +395,9 @@ class SkScalerContext { * Because glyph.imageSize() will determine the size of fImage, * generateMetrics will be called before generateImage. */ - virtual void generateImage(const SkGlyph& glyph) = 0; + virtual void generateImage(const SkGlyph& glyph, void* imageBuffer) = 0; static void GenerateImageFromPath( - const SkMask& mask, const SkPath& path, const SkMaskGamma::PreBlend& maskPreBlend, + SkMaskBuilder& dst, const SkPath& path, const SkMaskGamma::PreBlend& maskPreBlend, bool doBGR, bool verticalLCD, bool a8FromLCD, bool hairline); /** Sets the passed path to the glyph outline. @@ -395,7 +405,7 @@ class SkScalerContext { * Does not apply subpixel positioning to the path. * @return false if this glyph does not have any path. */ - virtual bool SK_WARN_UNUSED_RESULT generatePath(const SkGlyph&, SkPath*) = 0; + [[nodiscard]] virtual bool generatePath(const SkGlyph&, SkPath*) = 0; /** Returns the drawable for the glyph (if any). * diff --git a/src/core/SkScan_AAAPath.cpp b/src/core/SkScan_AAAPath.cpp index 2c1edec3a760..802e442c8a01 100644 --- a/src/core/SkScan_AAAPath.cpp +++ b/src/core/SkScan_AAAPath.cpp @@ -187,7 +187,7 @@ class MaskAdditiveBlitter : public AdditiveBlitter { uint8_t* getRow(int y) { if (y != fY) { fY = y; - fRow = fMask.fImage + (y - fMask.fBounds.fTop) * fMask.fRowBytes - fMask.fBounds.fLeft; + fRow = fMask.image() + (y - fMask.fBounds.fTop) * fMask.fRowBytes - fMask.fBounds.fLeft; } return fRow; } @@ -198,7 +198,7 @@ class MaskAdditiveBlitter : public AdditiveBlitter { static const int kMAX_STORAGE = 1024; SkBlitter* fRealBlitter; - SkMask fMask; + SkMaskBuilder fMask; SkIRect fClipRect; // we add 2 because we can write 1 extra byte at either end due to precision error uint32_t fStorage[(kMAX_STORAGE >> 2) + 2]; @@ -210,20 +210,15 @@ class MaskAdditiveBlitter : public AdditiveBlitter { MaskAdditiveBlitter::MaskAdditiveBlitter(SkBlitter* realBlitter, const SkIRect& ir, const SkIRect& clipBounds, - bool isInverse) { + bool isInverse) + : fRealBlitter(realBlitter) + , fMask((uint8_t*)fStorage + 1, ir, ir.width(), SkMask::kA8_Format) + , fRow(nullptr) + , fY(ir.fTop - 1) + { SkASSERT(CanHandleRect(ir)); SkASSERT(!isInverse); - fRealBlitter = realBlitter; - - fMask.fImage = (uint8_t*)fStorage + 1; // There's 1 extra byte at either end of fStorage - fMask.fBounds = ir; - fMask.fRowBytes = ir.width(); - fMask.fFormat = SkMask::kA8_Format; - - fY = ir.fTop - 1; - fRow = nullptr; - fClipRect = ir; if (!fClipRect.intersect(clipBounds)) { SkASSERT(0); diff --git a/src/core/SkScan_SAAPath.cpp b/src/core/SkScan_SAAPath.cpp index de98eb8cc848..df68d34d3bce 100644 --- a/src/core/SkScan_SAAPath.cpp +++ b/src/core/SkScan_SAAPath.cpp @@ -434,25 +434,21 @@ class MaskSuperBlitter : public BaseSuperBlitter { #endif }; - SkMask fMask; - SkIRect fClipRect; + SkMaskBuilder fMask; + SkIRect fClipRect; // we add 1 because add_aa_span can write (unchanged) 1 extra byte at the end, rather than // perform a test to see if stopAlpha != 0 - uint32_t fStorage[(kMAX_STORAGE >> 2) + 1]; + uint32_t fStorage[(kMAX_STORAGE >> 2) + 1]; }; MaskSuperBlitter::MaskSuperBlitter(SkBlitter* realBlitter, const SkIRect& ir, const SkIRect& clipBounds, bool isInverse) : BaseSuperBlitter(realBlitter, ir, clipBounds, isInverse) + , fMask((uint8_t*)fStorage, ir, ir.width(), SkMask::kA8_Format) { SkASSERT(CanHandleRect(ir)); SkASSERT(!isInverse); - fMask.fImage = (uint8_t*)fStorage; - fMask.fBounds = ir; - fMask.fRowBytes = ir.width(); - fMask.fFormat = SkMask::kA8_Format; - fClipRect = ir; if (!fClipRect.intersect(clipBounds)) { SkASSERT(0); @@ -561,7 +557,7 @@ void MaskSuperBlitter::blitH(int x, int y, int width) { x = 0; } - uint8_t* row = fMask.fImage + iy * fMask.fRowBytes + (x >> SHIFT); + uint8_t* row = fMask.image() + iy * fMask.fRowBytes + (x >> SHIFT); int start = x; int stop = x + width; diff --git a/src/core/SkSpecialImage.cpp b/src/core/SkSpecialImage.cpp index 138e569c0547..c60fa7927fc8 100644 --- a/src/core/SkSpecialImage.cpp +++ b/src/core/SkSpecialImage.cpp @@ -9,28 +9,15 @@ #include "include/core/SkBitmap.h" #include "include/core/SkCanvas.h" -#include "include/core/SkColorSpace.h" +#include "include/core/SkColorType.h" #include "include/core/SkImage.h" #include "include/core/SkMatrix.h" -#include "include/core/SkSurface.h" +#include "include/core/SkShader.h" #include "include/core/SkTileMode.h" -#include "src/core/SkSpecialSurface.h" -#include "src/core/SkSurfacePriv.h" +#include "include/private/base/SkAssert.h" +#include "src/core/SkNextID.h" #include "src/image/SkImage_Base.h" -#if defined(SK_GANESH) -#include "include/gpu/GrDirectContext.h" -#include "include/gpu/GrRecordingContext.h" -#include "src/gpu/SkBackingFit.h" -#include "src/gpu/ganesh/GrImageInfo.h" -#include "src/gpu/ganesh/GrProxyProvider.h" -#include "src/gpu/ganesh/GrRecordingContextPriv.h" -#include "src/gpu/ganesh/GrTextureProxy.h" -#include "src/gpu/ganesh/image/GrImageUtils.h" -#include "src/gpu/ganesh/image/SkImage_Ganesh.h" -#include "src/shaders/SkImageShader.h" -#endif - // Currently, the raster imagefilters can only handle certain imageinfos. Call this to know if // a given info is supported. static bool valid_for_imagefilters(const SkImageInfo& info) { @@ -72,69 +59,6 @@ sk_sp SkSpecialImage::asShader(const SkSamplingOptions& sampling, return this->asShader(SkTileMode::kClamp, sampling, lm); } -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/TextureProxyView.h" - -bool SkSpecialImage::isGraphiteBacked() const { - return SkToBool(this->textureProxyView()); -} - -skgpu::graphite::TextureProxyView SkSpecialImage::textureProxyView() const { - return this->onTextureProxyView(); -} - -skgpu::graphite::TextureProxyView SkSpecialImage::onTextureProxyView() const { - // To get here we would need to be trying to retrieve a Graphite-backed resource from - // either a raster or Ganesh-backed special image. That should never happen. - // TODO: re-enable this assert. Right now, since image filters can fallback to raster - // in Graphite, we can get here. - //SkASSERT(false); - return {}; -} -#endif - -#ifdef SK_DEBUG -bool SkSpecialImage::RectFits(const SkIRect& rect, int width, int height) { - if (0 == width && 0 == height) { - SkASSERT(0 == rect.fLeft && 0 == rect.fRight && 0 == rect.fTop && 0 == rect.fBottom); - return true; - } - - return rect.fLeft >= 0 && rect.fLeft < width && rect.fLeft < rect.fRight && - rect.fRight >= 0 && rect.fRight <= width && - rect.fTop >= 0 && rect.fTop < height && rect.fTop < rect.fBottom && - rect.fBottom >= 0 && rect.fBottom <= height; -} -#endif - -sk_sp SkSpecialImage::MakeFromImage(GrRecordingContext* rContext, - const SkIRect& subset, - sk_sp image, - const SkSurfaceProps& props) { - SkASSERT(RectFits(subset, image->width(), image->height())); - -#if defined(SK_GANESH) - if (rContext) { - auto [view, ct] = skgpu::ganesh::AsView(rContext, image, GrMipmapped::kNo); - return MakeDeferredFromGpu(rContext, - subset, - image->uniqueID(), - std::move(view), - { ct, image->alphaType(), image->refColorSpace() }, - props); - } -#endif - - // raster to gpu is supported here, but gpu to raster is not - SkBitmap bm; - if (as_IB(image)->getROPixels(nullptr, &bm)) { - return MakeFromRaster(subset, bm, props); - } - return nullptr; -} - -/////////////////////////////////////////////////////////////////////////////// - class SkSpecialImage_Raster final : public SkSpecialImage { public: SkSpecialImage_Raster(const SkIRect& subset, const SkBitmap& bm, const SkSurfaceProps& props) @@ -159,20 +83,9 @@ class SkSpecialImage_Raster final : public SkSpecialImage { return fBitmap.extractSubset(bm, this->subset()); } -#if defined(SK_GANESH) - GrSurfaceProxyView onView(GrRecordingContext* context) const override { - if (context) { - return std::get<0>(GrMakeCachedBitmapProxyView( - context, fBitmap, /*label=*/"SpecialImageRaster_OnView", GrMipmapped::kNo)); - } - - return {}; - } -#endif - sk_sp onMakeSubset(const SkIRect& subset) const override { // No need to extract subset, onGetROPixels handles that when needed - return SkSpecialImage::MakeFromRaster(subset, fBitmap, this->props()); + return SkSpecialImages::MakeFromRaster(subset, fBitmap, this->props()); } sk_sp onAsImage(const SkIRect* subset) const override { @@ -205,10 +118,12 @@ class SkSpecialImage_Raster final : public SkSpecialImage { SkBitmap fBitmap; }; -sk_sp SkSpecialImage::MakeFromRaster(const SkIRect& subset, - const SkBitmap& bm, - const SkSurfaceProps& props) { - SkASSERT(RectFits(subset, bm.width(), bm.height())); +namespace SkSpecialImages { + +sk_sp MakeFromRaster(const SkIRect& subset, + const SkBitmap& bm, + const SkSurfaceProps& props) { + SkASSERT(bm.bounds().contains(subset)); if (!bm.pixelRef()) { return nullptr; @@ -228,10 +143,10 @@ sk_sp SkSpecialImage::MakeFromRaster(const SkIRect& subset, return sk_make_sp(subset, *srcBM, props); } -sk_sp SkSpecialImage::CopyFromRaster(const SkIRect& subset, - const SkBitmap& bm, - const SkSurfaceProps& props) { - SkASSERT(RectFits(subset, bm.width(), bm.height())); +sk_sp CopyFromRaster(const SkIRect& subset, + const SkBitmap& bm, + const SkSurfaceProps& props) { + SkASSERT(bm.bounds().contains(subset)); if (!bm.pixelRef()) { return nullptr; @@ -257,141 +172,25 @@ sk_sp SkSpecialImage::CopyFromRaster(const SkIRect& subset, SkIRect::MakeWH(subset.width(), subset.height()), tmp, props); } -#if defined(SK_GANESH) -/////////////////////////////////////////////////////////////////////////////// -static sk_sp wrap_proxy_in_image(GrRecordingContext* context, - GrSurfaceProxyView view, - const SkColorInfo& colorInfo) { - return sk_make_sp( - sk_ref_sp(context), kNeedNewImageUniqueID, std::move(view), colorInfo); -} - -class SkSpecialImage_Gpu final : public SkSpecialImage { -public: - SkSpecialImage_Gpu(GrRecordingContext* context, - const SkIRect& subset, - uint32_t uniqueID, - GrSurfaceProxyView view, - const SkColorInfo& colorInfo, - const SkSurfaceProps& props) - : SkSpecialImage(subset, uniqueID, colorInfo, props) - , fContext(context) - , fView(std::move(view)) { - } - - size_t getSize() const override { - return fView.proxy()->gpuMemorySize(); - } - - void onDraw(SkCanvas* canvas, SkScalar x, SkScalar y, const SkSamplingOptions& sampling, - const SkPaint* paint) const override { - SkRect dst = SkRect::MakeXYWH(x, y, - this->subset().width(), this->subset().height()); - - // TODO: In this instance we know we're going to draw a sub-portion of the backing - // texture into the canvas so it is okay to wrap it in an SkImage. This poses - // some problems for full deferral however in that when the deferred SkImage_Ganesh - // instantiates itself it is going to have to either be okay with having a larger - // than expected backing texture (unlikely) or the 'fit' of the SurfaceProxy needs - // to be tightened (if it is deferred). - sk_sp img = sk_sp(new SkImage_Ganesh( - sk_ref_sp(canvas->recordingContext()), this->uniqueID(), fView, this->colorInfo())); - - canvas->drawImageRect(img, SkRect::Make(this->subset()), dst, - sampling, paint, SkCanvas::kStrict_SrcRectConstraint); - } - - GrRecordingContext* onGetContext() const override { return fContext; } - - GrSurfaceProxyView onView(GrRecordingContext* context) const override { return fView; } - - bool onGetROPixels(SkBitmap* dst) const override { - // This should never be called: All GPU image filters are implemented entirely on the GPU, - // so we never perform read-back. - SkASSERT(false); - return false; - } - - sk_sp onMakeSubset(const SkIRect& subset) const override { - return SkSpecialImage::MakeDeferredFromGpu(fContext, - subset, - this->uniqueID(), - fView, - this->colorInfo(), - this->props()); - } - - sk_sp onAsImage(const SkIRect* subset) const override { - GrSurfaceProxy* proxy = fView.proxy(); - if (subset) { - if (proxy->isFunctionallyExact() && *subset == SkIRect::MakeSize(proxy->dimensions())) { - proxy->priv().exactify(false); - // The existing GrTexture is already tight so reuse it in the SkImage - return wrap_proxy_in_image(fContext, fView, this->colorInfo()); - } - - auto subsetView = GrSurfaceProxyView::Copy(fContext, - fView, - GrMipmapped::kNo, - *subset, - SkBackingFit::kExact, - skgpu::Budgeted::kYes, - /*label=*/"SkSpecialImage_AsImage"); - if (!subsetView) { - return nullptr; - } - SkASSERT(subsetView.asTextureProxy()); - SkASSERT(subsetView.proxy()->priv().isExact()); - - // MDB: this is acceptable (wrapping subsetProxy in an SkImage) bc Copy will - // return a kExact-backed proxy - return wrap_proxy_in_image(fContext, std::move(subsetView), this->colorInfo()); - } - - proxy->priv().exactify(true); - - return wrap_proxy_in_image(fContext, fView, this->colorInfo()); - } - - sk_sp onAsShader(SkTileMode tileMode, - const SkSamplingOptions& sampling, - const SkMatrix& lm) const override { - // The special image's logical (0,0) is at its subset's topLeft() so we need to account for - // that in the local matrix used when sampling. - SkMatrix subsetOrigin = SkMatrix::Translate(-this->subset().topLeft()); - subsetOrigin.postConcat(lm); - // However, we don't need to modify the subset itself since that is defined with respect to - // the base image, and the local matrix is applied before any tiling/clamping. - const SkRect subset = SkRect::Make(this->subset()); - - // asImage() w/o a subset makes no copy; create the SkImageShader directly to remember the - // subset used to access the image. - return SkImageShader::MakeSubset( - this->asImage(), subset, tileMode, tileMode, sampling, &subsetOrigin); - } - -private: - GrRecordingContext* fContext; - GrSurfaceProxyView fView; -}; - -sk_sp SkSpecialImage::MakeDeferredFromGpu(GrRecordingContext* context, - const SkIRect& subset, - uint32_t uniqueID, - GrSurfaceProxyView view, - const GrColorInfo& colorInfo, - const SkSurfaceProps& props) { - if (!context || context->abandoned() || !view.asTextureProxy()) { +sk_sp MakeFromRaster(const SkIRect& subset, + sk_sp image, + const SkSurfaceProps& props) { + if (!image || subset.isEmpty()) { return nullptr; } - SkColorType ct = GrColorTypeToSkColorType(colorInfo.colorType()); + SkASSERT(image->bounds().contains(subset)); + // This assert currently fails when using Graphite because Graphite makes raster images. + // TODO(michaelludwig) re-enable this assert after SkImage::makeWithFilter is implemented. + //SkASSERT(!image->isTextureBacked()); + SkASSERT(!as_IB(image)->isGaneshBacked()); - SkASSERT(RectFits(subset, view.proxy()->width(), view.proxy()->height())); - return sk_make_sp(context, subset, uniqueID, std::move(view), - SkColorInfo(ct, - colorInfo.alphaType(), - colorInfo.refColorSpace()), - props); + // This will not work if the image is uploaded to a GPU render target. + SkBitmap bm; + if (as_IB(image)->getROPixels(nullptr, &bm)) { + return MakeFromRaster(subset, bm, props); + } + return nullptr; } -#endif + +} // namespace SkSpecialImages diff --git a/src/core/SkSpecialImage.h b/src/core/SkSpecialImage.h index 8879c67462b5..2a6910c2fd98 100644 --- a/src/core/SkSpecialImage.h +++ b/src/core/SkSpecialImage.h @@ -9,36 +9,28 @@ #define SkSpecialImage_DEFINED #include "include/core/SkImageInfo.h" +#include "include/core/SkRect.h" #include "include/core/SkRefCnt.h" #include "include/core/SkSamplingOptions.h" +#include "include/core/SkScalar.h" +#include "include/core/SkSize.h" #include "include/core/SkSurfaceProps.h" -#include "src/core/SkNextID.h" -#if defined(SK_GANESH) -#include "include/private/gpu/ganesh/GrTypesPriv.h" -#include "src/gpu/ganesh/GrSurfaceProxyView.h" -#endif +#include +#include -class GrColorInfo; class GrRecordingContext; -class GrTextureProxy; class SkBitmap; class SkCanvas; +class SkColorSpace; class SkImage; -struct SkImageInfo; class SkMatrix; class SkPaint; -class SkPixmap; class SkShader; -class SkSpecialSurface; -class SkSurface; +enum SkAlphaType : int; +enum SkColorType : int; enum class SkTileMode; -namespace skgpu::graphite { -class Recorder; -class TextureProxyView; -} - enum { kNeedNewImageUniqueID_SpecialImage = 0 }; @@ -88,34 +80,6 @@ class SkSpecialImage : public SkRefCnt { this->draw(canvas, x, y, SkSamplingOptions(), nullptr); } - static sk_sp MakeFromImage(GrRecordingContext*, - const SkIRect& subset, - sk_sp, - const SkSurfaceProps&); - static sk_sp MakeFromRaster(const SkIRect& subset, - const SkBitmap&, - const SkSurfaceProps&); - static sk_sp CopyFromRaster(const SkIRect& subset, - const SkBitmap&, - const SkSurfaceProps&); -#if defined(SK_GANESH) - static sk_sp MakeDeferredFromGpu(GrRecordingContext*, - const SkIRect& subset, - uint32_t uniqueID, - GrSurfaceProxyView, - const GrColorInfo&, - const SkSurfaceProps&); -#endif - -#if defined(SK_GRAPHITE) - static sk_sp MakeGraphite(skgpu::graphite::Recorder*, - const SkIRect& subset, - uint32_t uniqueID, - skgpu::graphite::TextureProxyView, - const SkColorInfo&, - const SkSurfaceProps&); -#endif - /** * Extract a subset of this special image and return it as a special image. * It may or may not point to the same backing memory. The input 'subset' is relative to the @@ -151,28 +115,13 @@ class SkSpecialImage : public SkRefCnt { /** * If the SpecialImage is backed by a gpu texture, return true. */ - bool isTextureBacked() const { return SkToBool(this->onGetContext()); } + virtual bool isGaneshBacked() const { return false; } + virtual bool isGraphiteBacked() const { return false; } /** * Return the GrRecordingContext if the SkSpecialImage is GrTexture-backed */ - GrRecordingContext* getContext() const { return this->onGetContext(); } - -#if defined(SK_GANESH) - /** - * Regardless of how the underlying backing data is stored, returns the contents as a - * GrSurfaceProxyView. The returned view's proxy represents the entire backing image, so texture - * coordinates must be mapped from the content rect (e.g. relative to 'subset()') to the proxy's - * space (offset by subset().topLeft()). - */ - GrSurfaceProxyView view(GrRecordingContext* context) const { return this->onView(context); } -#endif - -#if defined(SK_GRAPHITE) - bool isGraphiteBacked() const; - - skgpu::graphite::TextureProxyView textureProxyView() const; -#endif + virtual GrRecordingContext* getContext() const { return nullptr; } /** * Regardless of the underlying backing store, return the contents as an SkBitmap. @@ -196,16 +145,6 @@ class SkSpecialImage : public SkRefCnt { virtual bool onGetROPixels(SkBitmap*) const = 0; - virtual GrRecordingContext* onGetContext() const { return nullptr; } - -#if defined(SK_GANESH) - virtual GrSurfaceProxyView onView(GrRecordingContext*) const = 0; -#endif - -#if defined(SK_GRAPHITE) - virtual skgpu::graphite::TextureProxyView onTextureProxyView() const; -#endif - // This subset is relative to the backing store's coordinate frame, it has already been mapped // from the content rect by the non-virtual makeSubset(). virtual sk_sp onMakeSubset(const SkIRect& subset) const = 0; @@ -218,10 +157,6 @@ class SkSpecialImage : public SkRefCnt { const SkSamplingOptions&, const SkMatrix&) const = 0; -#ifdef SK_DEBUG - static bool RectFits(const SkIRect& rect, int width, int height); -#endif - private: const SkIRect fSubset; const uint32_t fUniqueID; @@ -229,4 +164,12 @@ class SkSpecialImage : public SkRefCnt { const SkSurfaceProps fProps; }; +namespace SkSpecialImages { + +sk_sp MakeFromRaster(const SkIRect& subset, sk_sp, const SkSurfaceProps&); +sk_sp MakeFromRaster(const SkIRect& subset, const SkBitmap&, const SkSurfaceProps&); +sk_sp CopyFromRaster(const SkIRect& subset, const SkBitmap&, const SkSurfaceProps&); + +} // namespace SkSpecialImages + #endif // SkSpecialImage_DEFINED diff --git a/src/core/SkSpecialSurface.cpp b/src/core/SkSpecialSurface.cpp index b90935b5aab8..980265196ece 100644 --- a/src/core/SkSpecialSurface.cpp +++ b/src/core/SkSpecialSurface.cpp @@ -7,17 +7,21 @@ #include "src/core/SkSpecialSurface.h" -#include - +#include "include/core/SkBitmap.h" #include "include/core/SkCanvas.h" -#include "include/core/SkColorSpace.h" +#include "include/core/SkImageInfo.h" #include "include/core/SkMallocPixelRef.h" +#include "include/core/SkPixelRef.h" +#include "include/private/base/SkAssert.h" #include "src/core/SkBitmapDevice.h" #include "src/core/SkCanvasPriv.h" #include "src/core/SkDevice.h" #include "src/core/SkSpecialImage.h" #include "src/core/SkSurfacePriv.h" +#include +#include + SkSpecialSurface::SkSpecialSurface(sk_sp device, const SkIRect& subset) : fSubset(subset) { SkASSERT(fSubset.width() > 0); @@ -46,8 +50,9 @@ sk_sp SkSpecialSurface::makeImageSnapshot() { } /////////////////////////////////////////////////////////////////////////////// -sk_sp SkSpecialSurface::MakeRaster(const SkImageInfo& info, - const SkSurfaceProps& props) { +namespace SkSpecialSurfaces { +sk_sp MakeRaster(const SkImageInfo& info, + const SkSurfaceProps& props) { if (!SkSurfaceValidateRasterInfo(info)) { return nullptr; } @@ -71,68 +76,4 @@ sk_sp SkSpecialSurface::MakeRaster(const SkImageInfo& info, return sk_make_sp(std::move(device), subset); } - -/////////////////////////////////////////////////////////////////////////////// -#if defined(SK_GANESH) -#include "include/gpu/GrRecordingContext.h" -#include "src/gpu/SkBackingFit.h" -#include "src/gpu/ganesh/GrColorInfo.h" -#include "src/gpu/ganesh/GrRecordingContextPriv.h" - -sk_sp SkSpecialSurface::MakeRenderTarget(GrRecordingContext* rContext, - const SkImageInfo& ii, - const SkSurfaceProps& props, - GrSurfaceOrigin surfaceOrigin) { - if (!rContext) { - return nullptr; - } - - auto device = rContext->priv().createDevice(skgpu::Budgeted::kYes, - ii, - SkBackingFit::kApprox, - 1, - GrMipmapped::kNo, - GrProtected::kNo, - surfaceOrigin, - {props.flags(), kUnknown_SkPixelGeometry}, - skgpu::ganesh::Device::InitContents::kUninit); - if (!device) { - return nullptr; - } - - const SkIRect subset = SkIRect::MakeSize(ii.dimensions()); - - return sk_make_sp(std::move(device), subset); -} - -#endif // defined(SK_GANESH) - -/////////////////////////////////////////////////////////////////////////////// -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/Device.h" - -sk_sp SkSpecialSurface::MakeGraphite(skgpu::graphite::Recorder* recorder, - const SkImageInfo& ii, - const SkSurfaceProps& props) { - using namespace skgpu::graphite; - - if (!recorder) { - return nullptr; - } - - sk_sp device = Device::Make(recorder, - ii, - skgpu::Budgeted::kYes, - skgpu::Mipmapped::kNo, - {props.flags(), kUnknown_SkPixelGeometry}, - /* addInitialClear= */ false); - if (!device) { - return nullptr; - } - - const SkIRect subset = SkIRect::MakeSize(ii.dimensions()); - - return sk_make_sp(std::move(device), subset); -} - -#endif // SK_GRAPHITE +} // namespace SkSpecialSurfaces diff --git a/src/core/SkSpecialSurface.h b/src/core/SkSpecialSurface.h index 4c3300894091..8443b028b0c6 100644 --- a/src/core/SkSpecialSurface.h +++ b/src/core/SkSpecialSurface.h @@ -9,26 +9,15 @@ #define SkSpecialSurface_DEFINED #include "include/core/SkCanvas.h" -#include "include/core/SkImageInfo.h" +#include "include/core/SkRect.h" #include "include/core/SkRefCnt.h" #include "include/core/SkSurfaceProps.h" -#if defined(SK_GANESH) -#include "include/private/gpu/ganesh/GrTypesPriv.h" -#endif - -#if defined(SK_GRAPHITE) -namespace skgpu::graphite { - class Recorder; -} -#endif +#include -class GrBackendFormat; -class GrRecordingContext; class SkBaseDevice; -class SkBitmap; -class SkCanvas; class SkSpecialImage; +struct SkImageInfo; /** * SkSpecialSurface is a restricted form of SkSurface solely for internal use. It differs @@ -66,36 +55,21 @@ class SkSpecialSurface : public SkRefCnt { */ sk_sp makeImageSnapshot(); -#if defined(SK_GANESH) - /** - * Allocate a new GPU-backed SkSpecialSurface. If the requested surface cannot - * be created, nullptr will be returned. - */ - static sk_sp MakeRenderTarget(GrRecordingContext*, - const SkImageInfo&, - const SkSurfaceProps&, - GrSurfaceOrigin); -#endif - -#if defined(SK_GRAPHITE) - static sk_sp MakeGraphite(skgpu::graphite::Recorder*, - const SkImageInfo&, - const SkSurfaceProps&); -#endif - - /** - * Return a new CPU-backed surface, with the memory for the pixels automatically - * allocated. - * - * If the requested surface cannot be created, or the request is not a - * supported configuration, nullptr will be returned. - */ - static sk_sp MakeRaster(const SkImageInfo&, - const SkSurfaceProps&); - private: std::unique_ptr fCanvas; const SkIRect fSubset; }; +namespace SkSpecialSurfaces { +/** + * Return a new CPU-backed surface, with the memory for the pixels automatically + * allocated. + * + * If the requested surface cannot be created, or the request is not a + * supported configuration, nullptr will be returned. + */ +sk_sp MakeRaster(const SkImageInfo&, + const SkSurfaceProps&); +} + #endif diff --git a/src/core/SkStream.cpp b/src/core/SkStream.cpp index e43cb7716c14..4b84352e1071 100644 --- a/src/core/SkStream.cpp +++ b/src/core/SkStream.cpp @@ -934,7 +934,7 @@ std::unique_ptr SkStream::MakeFromFile(const char path[]) { if (!stream->isValid()) { return nullptr; } - return std::move(stream); + return stream; } // Declared in SkStreamPriv.h: diff --git a/src/core/SkTHash.h b/src/core/SkTHash.h index 19acde70a342..d1555c1b931c 100644 --- a/src/core/SkTHash.h +++ b/src/core/SkTHash.h @@ -9,10 +9,10 @@ #define SkTHash_DEFINED #include "include/core/SkTypes.h" -#include "include/private/base/SkTemplates.h" #include "src/core/SkChecksum.h" #include +#include #include #include @@ -40,7 +40,7 @@ class THashTable { if (this != &that) { fCount = that.fCount; fCapacity = that.fCapacity; - fSlots.reset(that.fCapacity); + fSlots.reset(new Slot[that.fCapacity]); for (int i = 0; i < fCapacity; i++) { fSlots[i] = that.fSlots[i]; } @@ -147,8 +147,8 @@ class THashTable { fCount = 0; fCapacity = capacity; - AutoTArray oldSlots = std::move(fSlots); - fSlots = AutoTArray(capacity); + std::unique_ptr oldSlots = std::move(fSlots); + fSlots.reset(new Slot[capacity]); for (int i = 0; i < oldCapacity; i++) { Slot& s = oldSlots[i]; @@ -413,7 +413,7 @@ class THashTable { int fCount = 0, fCapacity = 0; - AutoTArray fSlots; + std::unique_ptr fSlots; }; // Maps K->V. A more user-friendly wrapper around THashTable, suitable for most use cases. diff --git a/src/core/SkTextBlob.cpp b/src/core/SkTextBlob.cpp index 9840fcfb15dc..6f8ea204c4dd 100644 --- a/src/core/SkTextBlob.cpp +++ b/src/core/SkTextBlob.cpp @@ -19,15 +19,12 @@ #include "src/core/SkTextBlobPriv.h" #include "src/core/SkWriteBuffer.h" #include "src/text/GlyphRun.h" +#include "src/text/TextBlobMailbox.h" #include #include #include -#if defined(SK_GANESH) || defined(SK_GRAPHITE) -#include "src/text/gpu/TextBlobRedrawCoordinator.h" -#endif - using namespace skia_private; namespace { @@ -151,11 +148,9 @@ SkTextBlob::SkTextBlob(const SkRect& bounds) , fCacheID(SK_InvalidUniqueID) {} SkTextBlob::~SkTextBlob() { -#if defined(SK_GANESH) || defined(SK_GRAPHITE) if (SK_InvalidUniqueID != fCacheID.load()) { - sktext::gpu::TextBlobRedrawCoordinator::PostPurgeBlobMessage(fUniqueID, fCacheID); + sktext::PostPurgeBlobMessage(fUniqueID, fCacheID); } -#endif const auto* run = RunRecord::First(this); do { diff --git a/src/core/SkTextBlobPriv.h b/src/core/SkTextBlobPriv.h index 6a4c1531cf7d..ec6415141da6 100644 --- a/src/core/SkTextBlobPriv.h +++ b/src/core/SkTextBlobPriv.h @@ -182,7 +182,7 @@ class SkTextBlob::RunRecord { * ..... * } */ -class SkTextBlobRunIterator { +class SK_SPI SkTextBlobRunIterator { public: SkTextBlobRunIterator(const SkTextBlob* blob); @@ -249,13 +249,4 @@ class SkTextBlobRunIterator { SkDEBUGCODE(uint8_t* fStorageTop;) }; -inline bool SkTextBlobPriv::HasRSXForm(const SkTextBlob& blob) { - for (SkTextBlobRunIterator i{&blob}; !i.done(); i.next()) { - if (i.positioning() == SkTextBlobRunIterator::kRSXform_Positioning) { - return true; - } - } - return false; -} - #endif // SkTextBlobPriv_DEFINED diff --git a/src/core/SkTypeface_remote.cpp b/src/core/SkTypeface_remote.cpp index f43f7157fcdf..45aa85dba906 100644 --- a/src/core/SkTypeface_remote.cpp +++ b/src/core/SkTypeface_remote.cpp @@ -23,24 +23,21 @@ SkScalerContextProxy::SkScalerContextProxy(sk_sp tf, : SkScalerContext{std::move(tf), effects, desc} , fDiscardableManager{std::move(manager)} {} -bool SkScalerContextProxy::generateAdvance(SkGlyph* glyph) { - return false; -} - -void SkScalerContextProxy::generateMetrics(SkGlyph* glyph, SkArenaAlloc*) { +SkScalerContext::GlyphMetrics SkScalerContextProxy::generateMetrics(const SkGlyph& glyph, + SkArenaAlloc*) { TRACE_EVENT1("skia", "generateMetrics", "rec", TRACE_STR_COPY(this->getRec().dump().c_str())); if (this->getProxyTypeface()->isLogging()) { SkDebugf("GlyphCacheMiss generateMetrics looking for glyph: %x\n generateMetrics: %s\n", - glyph->getPackedID().value(), this->getRec().dump().c_str()); + glyph.getPackedID().value(), this->getRec().dump().c_str()); } - glyph->fMaskFormat = fRec.fMaskFormat; - glyph->zeroMetrics(); fDiscardableManager->notifyCacheMiss( - SkStrikeClient::CacheMissType::kGlyphMetrics, fRec.fTextSize); + SkStrikeClient::CacheMissType::kGlyphMetrics, fRec.fTextSize); + + return {glyph.maskFormat()}; } -void SkScalerContextProxy::generateImage(const SkGlyph& glyph) { +void SkScalerContextProxy::generateImage(const SkGlyph& glyph, void*) { TRACE_EVENT1("skia", "generateImage", "rec", TRACE_STR_COPY(this->getRec().dump().c_str())); if (this->getProxyTypeface()->isLogging()) { SkDebugf("GlyphCacheMiss generateImage: %s\n", this->getRec().dump().c_str()); diff --git a/src/core/SkTypeface_remote.h b/src/core/SkTypeface_remote.h index 0f03d38b9098..1a7356268aea 100644 --- a/src/core/SkTypeface_remote.h +++ b/src/core/SkTypeface_remote.h @@ -30,10 +30,9 @@ class SkScalerContextProxy : public SkScalerContext { sk_sp manager); protected: - bool generateAdvance(SkGlyph* glyph) override; - void generateMetrics(SkGlyph* glyph, SkArenaAlloc*) override; - void generateImage(const SkGlyph& glyph) override; - bool generatePath(const SkGlyph& glyphID, SkPath* path) override; + GlyphMetrics generateMetrics(const SkGlyph&, SkArenaAlloc*) override; + void generateImage(const SkGlyph&, void*) override; + bool generatePath(const SkGlyph& glyph, SkPath* path) override; sk_sp generateDrawable(const SkGlyph&) override; void generateFontMetrics(SkFontMetrics* metrics) override; SkTypefaceProxy* getProxyTypeface() const; diff --git a/src/core/SkVM.cpp b/src/core/SkVM.cpp deleted file mode 100644 index d1d385ef17ac..000000000000 --- a/src/core/SkVM.cpp +++ /dev/null @@ -1,4047 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#include "include/core/SkStream.h" -#include "include/core/SkString.h" -#include "include/private/base/SkTFitsIn.h" -#include "include/private/base/SkThreadID.h" -#include "src/base/SkHalf.h" -#include "src/core/SkChecksum.h" -#include "src/core/SkColorSpacePriv.h" -#include "src/core/SkColorSpaceXformSteps.h" -#include "src/core/SkCpu.h" -#include "src/core/SkEnumerate.h" -#include "src/core/SkOpts.h" -#include "src/core/SkStreamPriv.h" -#include "src/core/SkVM.h" -#include -#include -#include - -#if !defined(SK_BUILD_FOR_WIN) -#include -#endif - -using namespace skia_private; - -bool gSkVMAllowJIT{false}; - -#if defined(SK_ENABLE_SKVM) - -#if defined(SKVM_JIT) - #if defined(SK_BUILD_FOR_WIN) - #include "src/base/SkLeanWindows.h" - #include - - static void* alloc_jit_buffer(size_t* len) { - return VirtualAlloc(NULL, *len, MEM_RESERVE|MEM_COMMIT, PAGE_READWRITE); - } - static void remap_as_executable(void* ptr, size_t len) { - DWORD old; - VirtualProtect(ptr, len, PAGE_EXECUTE_READ, &old); - SkASSERT(old == PAGE_READWRITE); - } - static void unmap_jit_buffer(void* ptr, size_t len) { - VirtualFree(ptr, 0, MEM_RELEASE); - } - static void close_dylib(void* dylib) { - SkASSERT(false); // TODO? For now just assert we never make one. - } - #else - #include - #include - - static void* alloc_jit_buffer(size_t* len) { - // While mprotect and VirtualAlloc both work at page granularity, - // mprotect doesn't round up for you, and instead requires *len is at page granularity. - const size_t page = sysconf(_SC_PAGESIZE); - *len = ((*len + page - 1) / page) * page; - return mmap(nullptr,*len, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, -1,0); - } - static void remap_as_executable(void* ptr, size_t len) { - mprotect(ptr, len, PROT_READ|PROT_EXEC); - __builtin___clear_cache((char*)ptr, - (char*)ptr + len); - } - static void unmap_jit_buffer(void* ptr, size_t len) { - munmap(ptr, len); - } - static void close_dylib(void* dylib) { - dlclose(dylib); - } - #endif -#endif - -// JIT code isn't MSAN-instrumented, so we won't see when it uses -// uninitialized memory, and we'll not see the writes it makes as properly -// initializing memory. Instead force the interpreter, which should let -// MSAN see everything our programs do properly. -// -// Similarly, we can't get ASAN's checks unless we let it instrument our interpreter. -#if defined(__has_feature) - #if __has_feature(memory_sanitizer) || __has_feature(address_sanitizer) - #define SKVM_JIT_BUT_IGNORE_IT - #endif -#endif - -#if defined(SKSL_STANDALONE) - // skslc needs to link against this module (for the VM code generator). This module pulls in - // color-space code, but attempting to add those transitive dependencies to skslc gets out of - // hand. So we terminate the chain here with stub functions. Note that skslc's usage of SkVM - // never cares about color management. - skvm::F32 sk_program_transfer_fn( - skvm::F32 v, skcms_TFType tf_type, - skvm::F32 G, skvm::F32 A, skvm::F32 B, skvm::F32 C, skvm::F32 D, skvm::F32 E, skvm::F32 F) { - return v; - } - - const skcms_TransferFunction* skcms_sRGB_TransferFunction() { return nullptr; } - const skcms_TransferFunction* skcms_sRGB_Inverse_TransferFunction() { return nullptr; } -#endif - -namespace skvm { - - static Features detect_features() { - static const bool fma = - #if defined(SK_CPU_X86) - SkCpu::Supports(SkCpu::HSW); - #elif defined(SK_CPU_ARM64) - true; - #else - false; - #endif - - static const bool fp16 = false; // TODO - - return { fma, fp16 }; - } - - Builder::Builder(bool createDuplicates) - : fFeatures(detect_features()), fCreateDuplicates(createDuplicates) {} - Builder::Builder(Features features, bool createDuplicates) - : fFeatures(features ), fCreateDuplicates(createDuplicates) {} - - struct Program::Impl { - std::vector instructions; - int regs = 0; - int loop = 0; - std::vector strides; - std::vector traceHooks; - - std::atomic jit_entry{nullptr}; // TODO: minimal std::memory_orders - size_t jit_size = 0; - void* dylib = nullptr; - }; - - // Debugging tools, mostly for printing various data structures out to a stream. - - namespace { - struct V { Val id; }; - struct R { Reg id; }; - struct Shift { int bits; }; - struct Splat { int bits; }; - struct Hex { int bits; }; - struct TraceHookID { int bits; }; - // For op `trace_line` - struct Line { int bits; }; - // For op `trace_var` - struct VarSlot { int bits; }; - // For op `trace_enter`/`trace_exit` - struct FnIdx { int bits; }; - - static void write(SkWStream* o, const char* s) { - o->writeText(s); - } - - static const char* name(Op op) { - switch (op) { - #define M(x) case Op::x: return #x; - SKVM_OPS(M) - #undef M - } - return "unknown op"; - } - - static void write(SkWStream* o, Op op) { - o->writeText(name(op)); - } - static void write(SkWStream* o, Ptr p) { - write(o, "ptr"); - o->writeDecAsText(p.ix); - } - static void write(SkWStream* o, V v) { - write(o, "v"); - o->writeDecAsText(v.id); - } - static void write(SkWStream* o, R r) { - write(o, "r"); - o->writeDecAsText(r.id); - } - static void write(SkWStream* o, Shift s) { - o->writeDecAsText(s.bits); - } - static void write(SkWStream* o, Splat s) { - float f; - memcpy(&f, &s.bits, 4); - o->writeHexAsText(s.bits); - write(o, " ("); - o->writeScalarAsText(f); - write(o, ")"); - } - static void write(SkWStream* o, Hex h) { - o->writeHexAsText(h.bits); - } - static void write(SkWStream* o, TraceHookID h) { - o->writeDecAsText(h.bits); - } - static void write(SkWStream* o, Line d) { - write(o, "L"); - o->writeDecAsText(d.bits); - } - static void write(SkWStream* o, VarSlot s) { - write(o, "$"); - o->writeDecAsText(s.bits); - } - static void write(SkWStream* o, FnIdx s) { - write(o, "F"); - o->writeDecAsText(s.bits); - } - template - static void write(SkWStream* o, T first, Ts... rest) { - write(o, first); - write(o, " "); - write(o, rest...); - } - } // namespace - - static void write_one_instruction(Val id, const OptimizedInstruction& inst, SkWStream* o) { - Op op = inst.op; - Val x = inst.x, - y = inst.y, - z = inst.z, - w = inst.w; - int immA = inst.immA, - immB = inst.immB, - immC = inst.immC; - switch (op) { - case Op::assert_true: write(o, op, V{x}, V{y}); break; - - case Op::trace_line: write(o, op, TraceHookID{immA}, V{x}, V{y}, Line{immB}); break; - case Op::trace_var: write(o, op, TraceHookID{immA}, V{x}, V{y}, - VarSlot{immB}, "=", V{z}); break; - case Op::trace_enter: write(o, op, TraceHookID{immA}, V{x}, V{y}, FnIdx{immB}); break; - case Op::trace_exit: write(o, op, TraceHookID{immA}, V{x}, V{y}, FnIdx{immB}); break; - case Op::trace_scope: write(o, op, TraceHookID{immA}, V{x}, V{y}, Shift{immB}); break; - - case Op::store8: write(o, op, Ptr{immA}, V{x} ); break; - case Op::store16: write(o, op, Ptr{immA}, V{x} ); break; - case Op::store32: write(o, op, Ptr{immA}, V{x} ); break; - case Op::store64: write(o, op, Ptr{immA}, V{x},V{y} ); break; - case Op::store128: write(o, op, Ptr{immA}, V{x},V{y},V{z},V{w}); break; - - case Op::index: write(o, V{id}, "=", op); break; - - case Op::load8: write(o, V{id}, "=", op, Ptr{immA}); break; - case Op::load16: write(o, V{id}, "=", op, Ptr{immA}); break; - case Op::load32: write(o, V{id}, "=", op, Ptr{immA}); break; - case Op::load64: write(o, V{id}, "=", op, Ptr{immA}, Hex{immB}); break; - case Op::load128: write(o, V{id}, "=", op, Ptr{immA}, Hex{immB}); break; - - case Op::gather8: write(o, V{id}, "=", op, Ptr{immA}, Hex{immB}, V{x}); break; - case Op::gather16: write(o, V{id}, "=", op, Ptr{immA}, Hex{immB}, V{x}); break; - case Op::gather32: write(o, V{id}, "=", op, Ptr{immA}, Hex{immB}, V{x}); break; - - case Op::uniform32: write(o, V{id}, "=", op, Ptr{immA}, Hex{immB}); break; - case Op::array32: write(o, V{id}, "=", op, Ptr{immA}, Hex{immB}, Hex{immC}); break; - - case Op::splat: write(o, V{id}, "=", op, Splat{immA}); break; - - case Op:: add_f32: write(o, V{id}, "=", op, V{x}, V{y} ); break; - case Op:: sub_f32: write(o, V{id}, "=", op, V{x}, V{y} ); break; - case Op:: mul_f32: write(o, V{id}, "=", op, V{x}, V{y} ); break; - case Op:: div_f32: write(o, V{id}, "=", op, V{x}, V{y} ); break; - case Op:: min_f32: write(o, V{id}, "=", op, V{x}, V{y} ); break; - case Op:: max_f32: write(o, V{id}, "=", op, V{x}, V{y} ); break; - case Op:: fma_f32: write(o, V{id}, "=", op, V{x}, V{y}, V{z}); break; - case Op:: fms_f32: write(o, V{id}, "=", op, V{x}, V{y}, V{z}); break; - case Op::fnma_f32: write(o, V{id}, "=", op, V{x}, V{y}, V{z}); break; - - - case Op::sqrt_f32: write(o, V{id}, "=", op, V{x}); break; - - case Op:: eq_f32: write(o, V{id}, "=", op, V{x}, V{y}); break; - case Op::neq_f32: write(o, V{id}, "=", op, V{x}, V{y}); break; - case Op:: gt_f32: write(o, V{id}, "=", op, V{x}, V{y}); break; - case Op::gte_f32: write(o, V{id}, "=", op, V{x}, V{y}); break; - - - case Op::add_i32: write(o, V{id}, "=", op, V{x}, V{y}); break; - case Op::sub_i32: write(o, V{id}, "=", op, V{x}, V{y}); break; - case Op::mul_i32: write(o, V{id}, "=", op, V{x}, V{y}); break; - - case Op::shl_i32: write(o, V{id}, "=", op, V{x}, Shift{immA}); break; - case Op::shr_i32: write(o, V{id}, "=", op, V{x}, Shift{immA}); break; - case Op::sra_i32: write(o, V{id}, "=", op, V{x}, Shift{immA}); break; - - case Op::eq_i32: write(o, V{id}, "=", op, V{x}, V{y}); break; - case Op::gt_i32: write(o, V{id}, "=", op, V{x}, V{y}); break; - - - case Op::bit_and : write(o, V{id}, "=", op, V{x}, V{y}); break; - case Op::bit_or : write(o, V{id}, "=", op, V{x}, V{y}); break; - case Op::bit_xor : write(o, V{id}, "=", op, V{x}, V{y}); break; - case Op::bit_clear: write(o, V{id}, "=", op, V{x}, V{y}); break; - - case Op::select: write(o, V{id}, "=", op, V{x}, V{y}, V{z}); break; - - case Op::ceil: write(o, V{id}, "=", op, V{x}); break; - case Op::floor: write(o, V{id}, "=", op, V{x}); break; - case Op::to_f32: write(o, V{id}, "=", op, V{x}); break; - case Op::to_fp16: write(o, V{id}, "=", op, V{x}); break; - case Op::from_fp16: write(o, V{id}, "=", op, V{x}); break; - case Op::trunc: write(o, V{id}, "=", op, V{x}); break; - case Op::round: write(o, V{id}, "=", op, V{x}); break; - - case Op::duplicate: write(o, V{id}, "=", op, Hex{immA}); break; - } - - write(o, "\n"); - } - - void Builder::dump(SkWStream* o) const { - SkDebugfStream debug; - if (!o) { o = &debug; } - - std::vector optimized = this->optimize(); - o->writeDecAsText(optimized.size()); - o->writeText(" values (originally "); - o->writeDecAsText(fProgram.size()); - o->writeText("):\n"); - for (Val id = 0; id < (Val)optimized.size(); id++) { - const OptimizedInstruction& inst = optimized[id]; - write(o, inst.can_hoist ? "↑ " : " "); - write_one_instruction(id, inst, o); - } - } - - void Program::dump(SkWStream* o) const { - SkDebugfStream debug; - if (!o) { o = &debug; } - - o->writeDecAsText(fImpl->regs); - o->writeText(" registers, "); - o->writeDecAsText(fImpl->instructions.size()); - o->writeText(" instructions:\n"); - for (Val i = 0; i < (Val)fImpl->instructions.size(); i++) { - if (i == fImpl->loop) { write(o, "loop:\n"); } - o->writeDecAsText(i); - o->writeText("\t"); - if (i >= fImpl->loop) { write(o, " "); } - const InterpreterInstruction& inst = fImpl->instructions[i]; - Op op = inst.op; - Reg d = inst.d, - x = inst.x, - y = inst.y, - z = inst.z, - w = inst.w; - int immA = inst.immA, - immB = inst.immB, - immC = inst.immC; - switch (op) { - case Op::assert_true: write(o, op, R{x}, R{y}); break; - - case Op::trace_line: write(o, op, TraceHookID{immA}, - R{x}, R{y}, Line{immB}); break; - case Op::trace_var: write(o, op, TraceHookID{immA}, R{x}, R{y}, - VarSlot{immB}, "=", R{z}); break; - case Op::trace_enter: write(o, op, TraceHookID{immA}, - R{x}, R{y}, FnIdx{immB}); break; - case Op::trace_exit: write(o, op, TraceHookID{immA}, - R{x}, R{y}, FnIdx{immB}); break; - case Op::trace_scope: write(o, op, TraceHookID{immA}, - R{x}, R{y}, Shift{immB}); break; - - case Op::store8: write(o, op, Ptr{immA}, R{x} ); break; - case Op::store16: write(o, op, Ptr{immA}, R{x} ); break; - case Op::store32: write(o, op, Ptr{immA}, R{x} ); break; - case Op::store64: write(o, op, Ptr{immA}, R{x}, R{y} ); break; - case Op::store128: write(o, op, Ptr{immA}, R{x}, R{y}, R{z}, R{w}); break; - - case Op::index: write(o, R{d}, "=", op); break; - - case Op::load8: write(o, R{d}, "=", op, Ptr{immA}); break; - case Op::load16: write(o, R{d}, "=", op, Ptr{immA}); break; - case Op::load32: write(o, R{d}, "=", op, Ptr{immA}); break; - case Op::load64: write(o, R{d}, "=", op, Ptr{immA}, Hex{immB}); break; - case Op::load128: write(o, R{d}, "=", op, Ptr{immA}, Hex{immB}); break; - - case Op::gather8: write(o, R{d}, "=", op, Ptr{immA}, Hex{immB}, R{x}); break; - case Op::gather16: write(o, R{d}, "=", op, Ptr{immA}, Hex{immB}, R{x}); break; - case Op::gather32: write(o, R{d}, "=", op, Ptr{immA}, Hex{immB}, R{x}); break; - - case Op::uniform32: write(o, R{d}, "=", op, Ptr{immA}, Hex{immB}); break; - case Op::array32: write(o, R{d}, "=", op, Ptr{immA}, Hex{immB}, Hex{immC}); break; - - case Op::splat: write(o, R{d}, "=", op, Splat{immA}); break; - - case Op::add_f32: write(o, R{d}, "=", op, R{x}, R{y} ); break; - case Op::sub_f32: write(o, R{d}, "=", op, R{x}, R{y} ); break; - case Op::mul_f32: write(o, R{d}, "=", op, R{x}, R{y} ); break; - case Op::div_f32: write(o, R{d}, "=", op, R{x}, R{y} ); break; - case Op::min_f32: write(o, R{d}, "=", op, R{x}, R{y} ); break; - case Op::max_f32: write(o, R{d}, "=", op, R{x}, R{y} ); break; - case Op::fma_f32: write(o, R{d}, "=", op, R{x}, R{y}, R{z}); break; - case Op::fms_f32: write(o, R{d}, "=", op, R{x}, R{y}, R{z}); break; - case Op::fnma_f32: write(o, R{d}, "=", op, R{x}, R{y}, R{z}); break; - - case Op::sqrt_f32: write(o, R{d}, "=", op, R{x}); break; - - case Op:: eq_f32: write(o, R{d}, "=", op, R{x}, R{y}); break; - case Op::neq_f32: write(o, R{d}, "=", op, R{x}, R{y}); break; - case Op:: gt_f32: write(o, R{d}, "=", op, R{x}, R{y}); break; - case Op::gte_f32: write(o, R{d}, "=", op, R{x}, R{y}); break; - - - case Op::add_i32: write(o, R{d}, "=", op, R{x}, R{y}); break; - case Op::sub_i32: write(o, R{d}, "=", op, R{x}, R{y}); break; - case Op::mul_i32: write(o, R{d}, "=", op, R{x}, R{y}); break; - - case Op::shl_i32: write(o, R{d}, "=", op, R{x}, Shift{immA}); break; - case Op::shr_i32: write(o, R{d}, "=", op, R{x}, Shift{immA}); break; - case Op::sra_i32: write(o, R{d}, "=", op, R{x}, Shift{immA}); break; - - case Op::eq_i32: write(o, R{d}, "=", op, R{x}, R{y}); break; - case Op::gt_i32: write(o, R{d}, "=", op, R{x}, R{y}); break; - - case Op::bit_and : write(o, R{d}, "=", op, R{x}, R{y}); break; - case Op::bit_or : write(o, R{d}, "=", op, R{x}, R{y}); break; - case Op::bit_xor : write(o, R{d}, "=", op, R{x}, R{y}); break; - case Op::bit_clear: write(o, R{d}, "=", op, R{x}, R{y}); break; - - case Op::select: write(o, R{d}, "=", op, R{x}, R{y}, R{z}); break; - - case Op::ceil: write(o, R{d}, "=", op, R{x}); break; - case Op::floor: write(o, R{d}, "=", op, R{x}); break; - case Op::to_f32: write(o, R{d}, "=", op, R{x}); break; - case Op::to_fp16: write(o, R{d}, "=", op, R{x}); break; - case Op::from_fp16: write(o, R{d}, "=", op, R{x}); break; - case Op::trunc: write(o, R{d}, "=", op, R{x}); break; - case Op::round: write(o, R{d}, "=", op, R{x}); break; - - case Op::duplicate: write(o, R{d}, "=", op, Hex{immA}); break; - } - write(o, "\n"); - } - } - std::vector eliminate_dead_code(std::vector program) { - // Determine which Instructions are live by working back from side effects. - std::vector live(program.size(), false); - for (Val id = program.size(); id--;) { - if (live[id] || has_side_effect(program[id].op)) { - live[id] = true; - const Instruction& inst = program[id]; - for (Val arg : {inst.x, inst.y, inst.z, inst.w}) { - if (arg != NA) { live[arg] = true; } - } - } - } - - // Rewrite the program with only live Instructions: - // - remap IDs in live Instructions to what they'll be once dead Instructions are removed; - // - then actually remove the dead Instructions. - std::vector new_id(program.size(), NA); - for (Val id = 0, next = 0; id < (Val)program.size(); id++) { - if (live[id]) { - Instruction& inst = program[id]; - for (Val* arg : {&inst.x, &inst.y, &inst.z, &inst.w}) { - if (*arg != NA) { - *arg = new_id[*arg]; - SkASSERT(*arg != NA); - } - } - new_id[id] = next++; - } - } - - // Eliminate any non-live ops. - auto it = std::remove_if(program.begin(), program.end(), [&](const Instruction& inst) { - Val id = (Val)(&inst - program.data()); - return !live[id]; - }); - program.erase(it, program.end()); - - return program; - } - - std::vector finalize(const std::vector program) { - std::vector optimized(program.size()); - for (Val id = 0; id < (Val)program.size(); id++) { - Instruction inst = program[id]; - optimized[id] = {inst.op, inst.x,inst.y,inst.z,inst.w, - inst.immA,inst.immB,inst.immC, - /*death=*/id, /*can_hoist=*/true}; - } - - // Each Instruction's inputs need to live at least until that Instruction issues. - for (Val id = 0; id < (Val)optimized.size(); id++) { - OptimizedInstruction& inst = optimized[id]; - for (Val arg : {inst.x, inst.y, inst.z, inst.w}) { - // (We're walking in order, so this is the same as max()ing with the existing Val.) - if (arg != NA) { optimized[arg].death = id; } - } - } - - // Mark which values don't depend on the loop and can be hoisted. - for (OptimizedInstruction& inst : optimized) { - // Varying loads (and gathers) and stores cannot be hoisted out of the loop. - if (is_always_varying(inst.op) || is_trace(inst.op)) { - inst.can_hoist = false; - } - - // If any of an instruction's inputs can't be hoisted, it can't be hoisted itself. - if (inst.can_hoist) { - for (Val arg : {inst.x, inst.y, inst.z, inst.w}) { - if (arg != NA) { inst.can_hoist &= optimized[arg].can_hoist; } - } - } - } - - // Extend the lifetime of any hoisted value that's used in the loop to infinity. - for (OptimizedInstruction& inst : optimized) { - if (!inst.can_hoist /*i.e. we're in the loop, so the arguments are used-in-loop*/) { - for (Val arg : {inst.x, inst.y, inst.z, inst.w}) { - if (arg != NA && optimized[arg].can_hoist) { - optimized[arg].death = (Val)program.size(); - } - } - } - } - - return optimized; - } - - std::vector Builder::optimize() const { - std::vector program = this->program(); - program = eliminate_dead_code(std::move(program)); - return finalize (std::move(program)); - } - - Program Builder::done(const char* debug_name, bool allow_jit) const { - char buf[64] = "skvm-jit-"; - if (!debug_name) { - *SkStrAppendU32(buf+9, this->hash()) = '\0'; - debug_name = buf; - } - - auto optimized = this->optimize(); - return {optimized, - fStrides, - fTraceHooks, debug_name, allow_jit}; - } - - uint64_t Builder::hash() const { - return SkChecksum::Hash64(fProgram.data(), fProgram.size() * sizeof(Instruction)); - } - - bool operator!=(Ptr a, Ptr b) { return a.ix != b.ix; } - - bool operator==(const Instruction& a, const Instruction& b) { - return a.op == b.op - && a.x == b.x - && a.y == b.y - && a.z == b.z - && a.w == b.w - && a.immA == b.immA - && a.immB == b.immB - && a.immC == b.immC; - } - - uint32_t InstructionHash::operator()(const Instruction& inst, uint32_t seed) const { - return SkChecksum::Hash32(&inst, sizeof(inst), seed); - } - - - // Most instructions produce a value and return it by ID, - // the value-producing instruction's own index in the program vector. - Val Builder::push(Instruction inst) { - // Basic common subexpression elimination: - // if we've already seen this exact Instruction, use it instead of creating a new one. - // - // But we never dedup loads or stores: an intervening store could change that memory. - // Uniforms and gathers touch only uniform memory, so they're fine to dedup, - // and index is varying but doesn't touch memory, so it's fine to dedup too. - if (!touches_varying_memory(inst.op) && !is_trace(inst.op)) { - if (Val* id = fIndex.find(inst)) { - if (fCreateDuplicates) { - inst.op = Op::duplicate; - inst.immA = *id; - fProgram.push_back(inst); - } - return *id; - } - } - - Val id = static_cast(fProgram.size()); - fProgram.push_back(inst); - fIndex.set(inst, id); - return id; - } - - Ptr Builder::arg(int stride) { - int ix = (int)fStrides.size(); - fStrides.push_back(stride); - return {ix}; - } - - void Builder::assert_true(I32 cond, I32 debug) { - #ifdef SK_DEBUG - int imm; - if (this->allImm(cond.id,&imm)) { SkASSERT(imm); return; } - (void)push(Op::assert_true, cond.id, debug.id); - #endif - } - - int Builder::attachTraceHook(SkSL::TraceHook* hook) { - int traceHookID = (int)fTraceHooks.size(); - fTraceHooks.push_back(hook); - return traceHookID; - } - - bool Builder::mergeMasks(I32& mask, I32& traceMask) { - if (this->isImm(mask.id, 0)) { return false; } - if (this->isImm(traceMask.id, 0)) { return false; } - if (this->isImm(mask.id, ~0)) { mask = traceMask; } - if (this->isImm(traceMask.id,~0)) { traceMask = mask; } - return true; - } - - void Builder::trace_line(int traceHookID, I32 mask, I32 traceMask, int line) { - SkASSERT(traceHookID >= 0); - SkASSERT(traceHookID < (int)fTraceHooks.size()); - if (!this->mergeMasks(mask, traceMask)) { return; } - (void)push(Op::trace_line, mask.id,traceMask.id,NA,NA, traceHookID, line); - } - void Builder::trace_var(int traceHookID, I32 mask, I32 traceMask, int slot, I32 val) { - SkASSERT(traceHookID >= 0); - SkASSERT(traceHookID < (int)fTraceHooks.size()); - if (!this->mergeMasks(mask, traceMask)) { return; } - (void)push(Op::trace_var, mask.id,traceMask.id,val.id,NA, traceHookID, slot); - } - void Builder::trace_enter(int traceHookID, I32 mask, I32 traceMask, int fnIdx) { - SkASSERT(traceHookID >= 0); - SkASSERT(traceHookID < (int)fTraceHooks.size()); - if (!this->mergeMasks(mask, traceMask)) { return; } - (void)push(Op::trace_enter, mask.id,traceMask.id,NA,NA, traceHookID, fnIdx); - } - void Builder::trace_exit(int traceHookID, I32 mask, I32 traceMask, int fnIdx) { - SkASSERT(traceHookID >= 0); - SkASSERT(traceHookID < (int)fTraceHooks.size()); - if (!this->mergeMasks(mask, traceMask)) { return; } - (void)push(Op::trace_exit, mask.id,traceMask.id,NA,NA, traceHookID, fnIdx); - } - void Builder::trace_scope(int traceHookID, I32 mask, I32 traceMask, int delta) { - SkASSERT(traceHookID >= 0); - SkASSERT(traceHookID < (int)fTraceHooks.size()); - if (!this->mergeMasks(mask, traceMask)) { return; } - (void)push(Op::trace_scope, mask.id,traceMask.id,NA,NA, traceHookID, delta); - } - - void Builder::store8 (Ptr ptr, I32 val) { (void)push(Op::store8 , val.id,NA,NA,NA, ptr.ix); } - void Builder::store16(Ptr ptr, I32 val) { (void)push(Op::store16, val.id,NA,NA,NA, ptr.ix); } - void Builder::store32(Ptr ptr, I32 val) { (void)push(Op::store32, val.id,NA,NA,NA, ptr.ix); } - void Builder::store64(Ptr ptr, I32 lo, I32 hi) { - (void)push(Op::store64, lo.id,hi.id,NA,NA, ptr.ix); - } - void Builder::store128(Ptr ptr, I32 x, I32 y, I32 z, I32 w) { - (void)push(Op::store128, x.id,y.id,z.id,w.id, ptr.ix); - } - - I32 Builder::index() { return {this, push(Op::index)}; } - - I32 Builder::load8 (Ptr ptr) { return {this, push(Op::load8 , NA,NA,NA,NA, ptr.ix) }; } - I32 Builder::load16(Ptr ptr) { return {this, push(Op::load16, NA,NA,NA,NA, ptr.ix) }; } - I32 Builder::load32(Ptr ptr) { return {this, push(Op::load32, NA,NA,NA,NA, ptr.ix) }; } - I32 Builder::load64(Ptr ptr, int lane) { - return {this, push(Op::load64 , NA,NA,NA,NA, ptr.ix,lane) }; - } - I32 Builder::load128(Ptr ptr, int lane) { - return {this, push(Op::load128, NA,NA,NA,NA, ptr.ix,lane) }; - } - - I32 Builder::gather8 (UPtr ptr, int offset, I32 index) { - return {this, push(Op::gather8 , index.id,NA,NA,NA, ptr.ix,offset)}; - } - I32 Builder::gather16(UPtr ptr, int offset, I32 index) { - return {this, push(Op::gather16, index.id,NA,NA,NA, ptr.ix,offset)}; - } - I32 Builder::gather32(UPtr ptr, int offset, I32 index) { - return {this, push(Op::gather32, index.id,NA,NA,NA, ptr.ix,offset)}; - } - - I32 Builder::uniform32(UPtr ptr, int offset) { - return {this, push(Op::uniform32, NA,NA,NA,NA, ptr.ix, offset)}; - } - - // Note: this converts the array index into a byte offset for the op. - I32 Builder::array32 (UPtr ptr, int offset, int index) { - return {this, push(Op::array32, NA,NA,NA,NA, ptr.ix, offset, index * sizeof(int))}; - } - - I32 Builder::splat(int n) { return {this, push(Op::splat, NA,NA,NA,NA, n) }; } - - template - void Builder::canonicalizeIdOrder(F32_or_I32& x, F32_or_I32& y) { - bool immX = fProgram[x.id].op == Op::splat; - bool immY = fProgram[y.id].op == Op::splat; - if (immX != immY) { - if (immX) { - // Prefer (val, imm) over (imm, val). - std::swap(x, y); - } - return; - } - if (x.id > y.id) { - // Prefer (lower-ID, higher-ID) over (higher-ID, lower-ID). - std::swap(x, y); - } - } - - // Be careful peepholing float math! Transformations you might expect to - // be legal can fail in the face of NaN/Inf, e.g. 0*x is not always 0. - // Float peepholes must pass this equivalence test for all ~4B floats: - // - // bool equiv(float x, float y) { return (x == y) || (isnanf(x) && isnanf(y)); } - // - // unsigned bits = 0; - // do { - // float f; - // memcpy(&f, &bits, 4); - // if (!equiv(f, ...)) { - // abort(); - // } - // } while (++bits != 0); - - F32 Builder::add(F32 x, F32 y) { - if (float X,Y; this->allImm(x.id,&X, y.id,&Y)) { return splat(X+Y); } - this->canonicalizeIdOrder(x, y); - if (this->isImm(y.id, 0.0f)) { return x; } // x+0 == x - - if (fFeatures.fma) { - if (fProgram[x.id].op == Op::mul_f32) { - return {this, this->push(Op::fma_f32, fProgram[x.id].x, fProgram[x.id].y, y.id)}; - } - if (fProgram[y.id].op == Op::mul_f32) { - return {this, this->push(Op::fma_f32, fProgram[y.id].x, fProgram[y.id].y, x.id)}; - } - } - return {this, this->push(Op::add_f32, x.id, y.id)}; - } - - F32 Builder::sub(F32 x, F32 y) { - if (float X,Y; this->allImm(x.id,&X, y.id,&Y)) { return splat(X-Y); } - if (this->isImm(y.id, 0.0f)) { return x; } // x-0 == x - if (fFeatures.fma) { - if (fProgram[x.id].op == Op::mul_f32) { - return {this, this->push(Op::fms_f32, fProgram[x.id].x, fProgram[x.id].y, y.id)}; - } - if (fProgram[y.id].op == Op::mul_f32) { - return {this, this->push(Op::fnma_f32, fProgram[y.id].x, fProgram[y.id].y, x.id)}; - } - } - return {this, this->push(Op::sub_f32, x.id, y.id)}; - } - - F32 Builder::mul(F32 x, F32 y) { - if (float X,Y; this->allImm(x.id,&X, y.id,&Y)) { return splat(X*Y); } - this->canonicalizeIdOrder(x, y); - if (this->isImm(y.id, 1.0f)) { return x; } // x*1 == x - return {this, this->push(Op::mul_f32, x.id, y.id)}; - } - - F32 Builder::fast_mul(F32 x, F32 y) { - if (this->isImm(x.id, 0.0f) || this->isImm(y.id, 0.0f)) { return splat(0.0f); } - return mul(x,y); - } - - F32 Builder::div(F32 x, F32 y) { - if (float X,Y; this->allImm(x.id,&X, y.id,&Y)) { return splat(sk_ieee_float_divide(X,Y)); } - if (this->isImm(y.id, 1.0f)) { return x; } // x/1 == x - return {this, this->push(Op::div_f32, x.id, y.id)}; - } - - F32 Builder::sqrt(F32 x) { - if (float X; this->allImm(x.id,&X)) { return splat(std::sqrt(X)); } - return {this, this->push(Op::sqrt_f32, x.id)}; - } - - // See http://www.machinedlearnings.com/2011/06/fast-approximate-logarithm-exponential.html. - F32 Builder::approx_log2(F32 x) { - // e - 127 is a fair approximation of log2(x) in its own right... - F32 e = mul(to_F32(pun_to_I32(x)), splat(1.0f / (1<<23))); - - // ... but using the mantissa to refine its error is _much_ better. - F32 m = pun_to_F32(bit_or(bit_and(pun_to_I32(x), 0x007fffff), - 0x3f000000)); - F32 approx = sub(e, 124.225514990f); - approx = sub(approx, mul(1.498030302f, m)); - approx = sub(approx, div(1.725879990f, add(0.3520887068f, m))); - - return approx; - } - - F32 Builder::approx_pow2(F32 x) { - constexpr float kInfinityBits = 0x7f800000; - - F32 f = fract(x); - F32 approx = add(x, 121.274057500f); - approx = sub(approx, mul( 1.490129070f, f)); - approx = add(approx, div(27.728023300f, sub(4.84252568f, f))); - approx = mul(1.0f * (1<<23), approx); - approx = clamp(approx, 0, kInfinityBits); // guard against underflow/overflow - - return pun_to_F32(round(approx)); - } - - F32 Builder::approx_powf(F32 x, F32 y) { - // TODO: assert this instead? Sometimes x is very slightly negative. See skia:10210. - x = max(0.0f, x); - - if (this->isImm(x.id, 1.0f)) { return x; } // 1^y is one - if (this->isImm(x.id, 2.0f)) { return this->approx_pow2(y); } // 2^y is pow2(y) - if (this->isImm(y.id, 0.5f)) { return this->sqrt(x); } // x^0.5 is sqrt(x) - if (this->isImm(y.id, 1.0f)) { return x; } // x^1 is x - if (this->isImm(y.id, 2.0f)) { return x * x; } // x^2 is x*x - - auto is_x = bit_or(eq(x, 0.0f), - eq(x, 1.0f)); - return select(is_x, x, approx_pow2(mul(approx_log2(x), y))); - } - - // Bhaskara I's sine approximation - // 16x(pi - x) / (5*pi^2 - 4x(pi - x) - // ... divide by 4 - // 4x(pi - x) / 5*pi^2/4 - x(pi - x) - // - // This is a good approximation only for 0 <= x <= pi, so we use symmetries to get - // radians into that range first. - // - F32 Builder::approx_sin(F32 radians) { - constexpr float Pi = SK_ScalarPI; - // x = radians mod 2pi - F32 x = fract(radians * (0.5f/Pi)) * (2*Pi); - I32 neg = x > Pi; // are we pi < x < 2pi --> need to negate result - x = select(neg, x - Pi, x); - - F32 pair = x * (Pi - x); - x = 4.0f * pair / ((5*Pi*Pi/4) - pair); - x = select(neg, -x, x); - return x; - } - - /* "GENERATING ACCURATE VALUES FOR THE TANGENT FUNCTION" - https://mae.ufl.edu/~uhk/ACCURATE-TANGENT.pdf - - approx = x + (1/3)x^3 + (2/15)x^5 + (17/315)x^7 + (62/2835)x^9 - - Some simplifications: - 1. tan(x) is periodic, -PI/2 < x < PI/2 - 2. tan(x) is odd, so tan(-x) = -tan(x) - 3. Our polynomial approximation is best near zero, so we use the following identity - tan(x) + tan(y) - tan(x + y) = ----------------- - 1 - tan(x)*tan(y) - tan(PI/4) = 1 - - So for x > PI/8, we do the following refactor: - x' = x - PI/4 - - 1 + tan(x') - tan(x) = ------------ - 1 - tan(x') - */ - F32 Builder::approx_tan(F32 x) { - constexpr float Pi = SK_ScalarPI; - // periodic between -pi/2 ... pi/2 - // shift to 0...Pi, scale 1/Pi to get into 0...1, then fract, scale-up, shift-back - x = fract((1/Pi)*x + 0.5f) * Pi - (Pi/2); - - I32 neg = (x < 0.0f); - x = select(neg, -x, x); - - // minimize total error by shifting if x > pi/8 - I32 use_quotient = (x > (Pi/8)); - x = select(use_quotient, x - (Pi/4), x); - - // 9th order poly = 4th order(x^2) * x - x = poly(x*x, 62/2835.0f, 17/315.0f, 2/15.0f, 1/3.0f, 1.0f) * x; - x = select(use_quotient, (1+x)/(1-x), x); - x = select(neg, -x, x); - return x; - } - - // http://mathforum.org/library/drmath/view/54137.html - // referencing Handbook of Mathematical Functions, - // by Milton Abramowitz and Irene Stegun - F32 Builder::approx_asin(F32 x) { - I32 neg = (x < 0.0f); - x = select(neg, -x, x); - x = SK_ScalarPI/2 - sqrt(1-x) * poly(x, -0.0187293f, 0.0742610f, -0.2121144f, 1.5707288f); - x = select(neg, -x, x); - return x; - } - - /* Use 4th order polynomial approximation from https://arachnoid.com/polysolve/ - * with 129 values of x,atan(x) for x:[0...1] - * This only works for 0 <= x <= 1 - */ - static F32 approx_atan_unit(F32 x) { - // for now we might be given NaN... let that through - x->assert_true((x != x) | ((x >= 0) & (x <= 1))); - return poly(x, 0.14130025741326729f, - -0.34312835980675116f, - -0.016172900528248768f, - 1.0037696976200385f, - -0.00014758242182738969f); - } - - /* Use identity atan(x) = pi/2 - atan(1/x) for x > 1 - */ - F32 Builder::approx_atan(F32 x) { - I32 neg = (x < 0.0f); - x = select(neg, -x, x); - I32 flip = (x > 1.0f); - x = select(flip, 1/x, x); - x = approx_atan_unit(x); - x = select(flip, SK_ScalarPI/2 - x, x); - x = select(neg, -x, x); - return x; - } - - /* Use identity atan(x) = pi/2 - atan(1/x) for x > 1 - * By swapping y,x to ensure the ratio is <= 1, we can safely call atan_unit() - * which avoids a 2nd divide instruction if we had instead called atan(). - */ - F32 Builder::approx_atan2(F32 y0, F32 x0) { - - I32 flip = (abs(y0) > abs(x0)); - F32 y = select(flip, x0, y0); - F32 x = select(flip, y0, x0); - F32 arg = y/x; - - I32 neg = (arg < 0.0f); - arg = select(neg, -arg, arg); - - F32 r = approx_atan_unit(arg); - r = select(flip, SK_ScalarPI/2 - r, r); - r = select(neg, -r, r); - - // handle quadrant distinctions - r = select((y0 >= 0) & (x0 < 0), r + SK_ScalarPI, r); - r = select((y0 < 0) & (x0 <= 0), r - SK_ScalarPI, r); - // Note: we don't try to handle 0,0 or infinities - return r; - } - - F32 Builder::min(F32 x, F32 y) { - if (float X,Y; this->allImm(x.id,&X, y.id,&Y)) { return splat(std::min(X,Y)); } - return {this, this->push(Op::min_f32, x.id, y.id)}; - } - F32 Builder::max(F32 x, F32 y) { - if (float X,Y; this->allImm(x.id,&X, y.id,&Y)) { return splat(std::max(X,Y)); } - return {this, this->push(Op::max_f32, x.id, y.id)}; - } - - SK_NO_SANITIZE("signed-integer-overflow") - I32 Builder::add(I32 x, I32 y) { - if (int X,Y; this->allImm(x.id,&X, y.id,&Y)) { return splat(X+Y); } - this->canonicalizeIdOrder(x, y); - if (this->isImm(y.id, 0)) { return x; } // x+0 == x - return {this, this->push(Op::add_i32, x.id, y.id)}; - } - SK_NO_SANITIZE("signed-integer-overflow") - I32 Builder::sub(I32 x, I32 y) { - if (int X,Y; this->allImm(x.id,&X, y.id,&Y)) { return splat(X-Y); } - if (this->isImm(y.id, 0)) { return x; } - return {this, this->push(Op::sub_i32, x.id, y.id)}; - } - SK_NO_SANITIZE("signed-integer-overflow") - I32 Builder::mul(I32 x, I32 y) { - if (int X,Y; this->allImm(x.id,&X, y.id,&Y)) { return splat(X*Y); } - this->canonicalizeIdOrder(x, y); - if (this->isImm(y.id, 0)) { return splat(0); } // x*0 == 0 - if (this->isImm(y.id, 1)) { return x; } // x*1 == x - return {this, this->push(Op::mul_i32, x.id, y.id)}; - } - - SK_NO_SANITIZE("shift") - I32 Builder::shl(I32 x, int bits) { - if (bits == 0) { return x; } - if (int X; this->allImm(x.id,&X)) { return splat(X << bits); } - return {this, this->push(Op::shl_i32, x.id,NA,NA,NA, bits)}; - } - I32 Builder::shr(I32 x, int bits) { - if (bits == 0) { return x; } - if (int X; this->allImm(x.id,&X)) { return splat(unsigned(X) >> bits); } - return {this, this->push(Op::shr_i32, x.id,NA,NA,NA, bits)}; - } - I32 Builder::sra(I32 x, int bits) { - if (bits == 0) { return x; } - if (int X; this->allImm(x.id,&X)) { return splat(X >> bits); } - return {this, this->push(Op::sra_i32, x.id,NA,NA,NA, bits)}; - } - - I32 Builder:: eq(F32 x, F32 y) { - if (float X,Y; this->allImm(x.id,&X, y.id,&Y)) { return splat(X==Y ? ~0 : 0); } - this->canonicalizeIdOrder(x, y); - return {this, this->push(Op::eq_f32, x.id, y.id)}; - } - I32 Builder::neq(F32 x, F32 y) { - if (float X,Y; this->allImm(x.id,&X, y.id,&Y)) { return splat(X!=Y ? ~0 : 0); } - this->canonicalizeIdOrder(x, y); - return {this, this->push(Op::neq_f32, x.id, y.id)}; - } - I32 Builder::lt(F32 x, F32 y) { - if (float X,Y; this->allImm(x.id,&X, y.id,&Y)) { return splat(Y> X ? ~0 : 0); } - return {this, this->push(Op::gt_f32, y.id, x.id)}; - } - I32 Builder::lte(F32 x, F32 y) { - if (float X,Y; this->allImm(x.id,&X, y.id,&Y)) { return splat(Y>=X ? ~0 : 0); } - return {this, this->push(Op::gte_f32, y.id, x.id)}; - } - I32 Builder::gt(F32 x, F32 y) { - if (float X,Y; this->allImm(x.id,&X, y.id,&Y)) { return splat(X> Y ? ~0 : 0); } - return {this, this->push(Op::gt_f32, x.id, y.id)}; - } - I32 Builder::gte(F32 x, F32 y) { - if (float X,Y; this->allImm(x.id,&X, y.id,&Y)) { return splat(X>=Y ? ~0 : 0); } - return {this, this->push(Op::gte_f32, x.id, y.id)}; - } - - I32 Builder:: eq(I32 x, I32 y) { - if (x.id == y.id) { return splat(~0); } - if (int X,Y; this->allImm(x.id,&X, y.id,&Y)) { return splat(X==Y ? ~0 : 0); } - this->canonicalizeIdOrder(x, y); - return {this, this->push(Op:: eq_i32, x.id, y.id)}; - } - I32 Builder::neq(I32 x, I32 y) { - if (int X,Y; this->allImm(x.id,&X, y.id,&Y)) { return splat(X!=Y ? ~0 : 0); } - return ~(x == y); - } - I32 Builder:: gt(I32 x, I32 y) { - if (int X,Y; this->allImm(x.id,&X, y.id,&Y)) { return splat(X> Y ? ~0 : 0); } - return {this, this->push(Op:: gt_i32, x.id, y.id)}; - } - I32 Builder::gte(I32 x, I32 y) { - if (x.id == y.id) { return splat(~0); } - if (int X,Y; this->allImm(x.id,&X, y.id,&Y)) { return splat(X>=Y ? ~0 : 0); } - return ~(x < y); - } - I32 Builder:: lt(I32 x, I32 y) { return y>x; } - I32 Builder::lte(I32 x, I32 y) { return y>=x; } - - Val Builder::holdsBitNot(Val id) { - // We represent `~x` as `x ^ ~0`. - if (fProgram[id].op == Op::bit_xor && this->isImm(fProgram[id].y, ~0)) { - return fProgram[id].x; - } - return NA; - } - - I32 Builder::bit_and(I32 x, I32 y) { - if (x.id == y.id) { return x; } - if (int X,Y; this->allImm(x.id,&X, y.id,&Y)) { return splat(X&Y); } - this->canonicalizeIdOrder(x, y); - if (this->isImm(y.id, 0)) { return splat(0); } // (x & false) == false - if (this->isImm(y.id,~0)) { return x; } // (x & true) == x - if (Val notX = this->holdsBitNot(x.id); notX != NA) { // (~x & y) == bit_clear(y, ~x) - return bit_clear(y, {this, notX}); - } - if (Val notY = this->holdsBitNot(y.id); notY != NA) { // (x & ~y) == bit_clear(x, ~y) - return bit_clear(x, {this, notY}); - } - return {this, this->push(Op::bit_and, x.id, y.id)}; - } - I32 Builder::bit_or(I32 x, I32 y) { - if (x.id == y.id) { return x; } - if (int X,Y; this->allImm(x.id,&X, y.id,&Y)) { return splat(X|Y); } - this->canonicalizeIdOrder(x, y); - if (this->isImm(y.id, 0)) { return x; } // (x | false) == x - if (this->isImm(y.id,~0)) { return splat(~0); } // (x | true) == true - return {this, this->push(Op::bit_or, x.id, y.id)}; - } - I32 Builder::bit_xor(I32 x, I32 y) { - if (x.id == y.id) { return splat(0); } - if (int X,Y; this->allImm(x.id,&X, y.id,&Y)) { return splat(X^Y); } - this->canonicalizeIdOrder(x, y); - if (this->isImm(y.id, 0)) { return x; } // (x ^ false) == x - return {this, this->push(Op::bit_xor, x.id, y.id)}; - } - - I32 Builder::bit_clear(I32 x, I32 y) { - if (x.id == y.id) { return splat(0); } - if (int X,Y; this->allImm(x.id,&X, y.id,&Y)) { return splat(X&~Y); } - if (this->isImm(y.id, 0)) { return x; } // (x & ~false) == x - if (this->isImm(y.id,~0)) { return splat(0); } // (x & ~true) == false - if (this->isImm(x.id, 0)) { return splat(0); } // (false & ~y) == false - return {this, this->push(Op::bit_clear, x.id, y.id)}; - } - - I32 Builder::select(I32 x, I32 y, I32 z) { - if (y.id == z.id) { return y; } - if (int X,Y,Z; this->allImm(x.id,&X, y.id,&Y, z.id,&Z)) { return splat(X?Y:Z); } - if (this->isImm(x.id,~0)) { return y; } // (true ? y : z) == y - if (this->isImm(x.id, 0)) { return z; } // (false ? y : z) == z - if (this->isImm(y.id, 0)) { return bit_clear(z,x); } // (x ? 0 : z) == ~x&z - if (this->isImm(z.id, 0)) { return bit_and (y,x); } // (x ? y : 0) == x&y - if (Val notX = this->holdsBitNot(x.id); notX != NA) { // (!x ? y : z) == (x ? z : y) - x.id = notX; - std::swap(y, z); - } - return {this, this->push(Op::select, x.id, y.id, z.id)}; - } - - I32 Builder::extract(I32 x, int bits, I32 z) { - if (unsigned Z; this->allImm(z.id,&Z) && (~0u>>bits) == Z) { return shr(x, bits); } - return bit_and(z, shr(x, bits)); - } - - I32 Builder::pack(I32 x, I32 y, int bits) { - return bit_or(x, shl(y, bits)); - } - - F32 Builder::ceil(F32 x) { - if (float X; this->allImm(x.id,&X)) { return splat(ceilf(X)); } - return {this, this->push(Op::ceil, x.id)}; - } - F32 Builder::floor(F32 x) { - if (float X; this->allImm(x.id,&X)) { return splat(floorf(X)); } - return {this, this->push(Op::floor, x.id)}; - } - F32 Builder::to_F32(I32 x) { - if (int X; this->allImm(x.id,&X)) { return splat((float)X); } - return {this, this->push(Op::to_f32, x.id)}; - } - I32 Builder::trunc(F32 x) { - if (float X; this->allImm(x.id,&X)) { return splat((int)X); } - return {this, this->push(Op::trunc, x.id)}; - } - I32 Builder::round(F32 x) { - if (float X; this->allImm(x.id,&X)) { return splat((int)lrintf(X)); } - return {this, this->push(Op::round, x.id)}; - } - - I32 Builder::to_fp16(F32 x) { - if (float X; this->allImm(x.id,&X)) { return splat((int)SkFloatToHalf(X)); } - return {this, this->push(Op::to_fp16, x.id)}; - } - F32 Builder::from_fp16(I32 x) { - if (int X; this->allImm(x.id,&X)) { return splat(SkHalfToFloat(X)); } - return {this, this->push(Op::from_fp16, x.id)}; - } - - F32 Builder::from_unorm(int bits, I32 x) { - F32 limit = splat(1 / ((1< F32 { - const skcms_TransferFunction* tf = skcms_sRGB_TransferFunction(); - F32 v = from_unorm(bits, channel); - return sk_program_transfer_fn(v, skcms_TFType_sRGBish, - v->splat(tf->g), - v->splat(tf->a), - v->splat(tf->b), - v->splat(tf->c), - v->splat(tf->d), - v->splat(tf->e), - v->splat(tf->f)); - }; - auto from_xr = [](int bits, I32 channel) -> F32 { - static constexpr float min = -0.752941f; - static constexpr float max = 1.25098f; - static constexpr float range = max - min; - F32 v = from_unorm(bits, channel); - return v * range + min; - }; - - auto unpack_rgb = [=](int bits, int shift) -> F32 { - I32 channel = extract(x, shift, (1< F32 { - I32 channel = extract(x, shift, (1<splat(0.0f), - f.g_bits ? unpack_rgb (f.g_bits, f.g_shift) : x->splat(0.0f), - f.b_bits ? unpack_rgb (f.b_bits, f.b_shift) : x->splat(0.0f), - f.a_bits ? unpack_alpha(f.a_bits, f.a_shift) : x->splat(1.0f), - }; - } - - static void split_disjoint_8byte_format(PixelFormat f, PixelFormat* lo, PixelFormat* hi) { - SkASSERT(byte_size(f) == 8); - // We assume some of the channels are in the low 32 bits, some in the high 32 bits. - // The assert on byte_size(lo) will trigger if this assumption is violated. - *lo = f; - if (f.r_shift >= 32) { lo->r_bits = 0; lo->r_shift = 32; } - if (f.g_shift >= 32) { lo->g_bits = 0; lo->g_shift = 32; } - if (f.b_shift >= 32) { lo->b_bits = 0; lo->b_shift = 32; } - if (f.a_shift >= 32) { lo->a_bits = 0; lo->a_shift = 32; } - SkASSERT(byte_size(*lo) == 4); - - *hi = f; - if (f.r_shift < 32) { hi->r_bits = 0; hi->r_shift = 32; } else { hi->r_shift -= 32; } - if (f.g_shift < 32) { hi->g_bits = 0; hi->g_shift = 32; } else { hi->g_shift -= 32; } - if (f.b_shift < 32) { hi->b_bits = 0; hi->b_shift = 32; } else { hi->b_shift -= 32; } - if (f.a_shift < 32) { hi->a_bits = 0; hi->a_shift = 32; } else { hi->a_shift -= 32; } - SkASSERT(byte_size(*hi) == 4); - } - - // The only 16-byte format we support today is RGBA F32, - // though, TODO, we could generalize that to any swizzle, and to allow UNORM too. - static void assert_16byte_is_rgba_f32(PixelFormat f) { - #if defined(SK_DEBUG) - SkASSERT(byte_size(f) == 16); - PixelFormat rgba_f32 = SkColorType_to_PixelFormat(kRGBA_F32_SkColorType); - - SkASSERT(f.encoding == rgba_f32.encoding); - - SkASSERT(f.r_bits == rgba_f32.r_bits); - SkASSERT(f.g_bits == rgba_f32.g_bits); - SkASSERT(f.b_bits == rgba_f32.b_bits); - SkASSERT(f.a_bits == rgba_f32.a_bits); - - SkASSERT(f.r_shift == rgba_f32.r_shift); - SkASSERT(f.g_shift == rgba_f32.g_shift); - SkASSERT(f.b_shift == rgba_f32.b_shift); - SkASSERT(f.a_shift == rgba_f32.a_shift); - #endif - } - - Color Builder::load(PixelFormat f, Ptr ptr) { - switch (byte_size(f)) { - case 1: return unpack(f, load8 (ptr)); - case 2: return unpack(f, load16(ptr)); - case 4: return unpack(f, load32(ptr)); - case 8: { - PixelFormat lo,hi; - split_disjoint_8byte_format(f, &lo,&hi); - Color l = unpack(lo, load64(ptr, 0)), - h = unpack(hi, load64(ptr, 1)); - return { - lo.r_bits ? l.r : h.r, - lo.g_bits ? l.g : h.g, - lo.b_bits ? l.b : h.b, - lo.a_bits ? l.a : h.a, - }; - } - case 16: { - assert_16byte_is_rgba_f32(f); - return { - pun_to_F32(load128(ptr, 0)), - pun_to_F32(load128(ptr, 1)), - pun_to_F32(load128(ptr, 2)), - pun_to_F32(load128(ptr, 3)), - }; - } - default: SkUNREACHABLE; - } - } - - Color Builder::gather(PixelFormat f, UPtr ptr, int offset, I32 index) { - switch (byte_size(f)) { - case 1: return unpack(f, gather8 (ptr, offset, index)); - case 2: return unpack(f, gather16(ptr, offset, index)); - case 4: return unpack(f, gather32(ptr, offset, index)); - case 8: { - PixelFormat lo,hi; - split_disjoint_8byte_format(f, &lo,&hi); - Color l = unpack(lo, gather32(ptr, offset, (index<<1)+0)), - h = unpack(hi, gather32(ptr, offset, (index<<1)+1)); - return { - lo.r_bits ? l.r : h.r, - lo.g_bits ? l.g : h.g, - lo.b_bits ? l.b : h.b, - lo.a_bits ? l.a : h.a, - }; - } - case 16: { - assert_16byte_is_rgba_f32(f); - return { - gatherF(ptr, offset, (index<<2)+0), - gatherF(ptr, offset, (index<<2)+1), - gatherF(ptr, offset, (index<<2)+2), - gatherF(ptr, offset, (index<<2)+3), - }; - } - default: SkUNREACHABLE; - } - } - - static I32 pack32(PixelFormat f, Color c) { - SkASSERT(byte_size(f) <= 4); - - auto to_srgb = [](int bits, F32 v) { - const skcms_TransferFunction* tf = skcms_sRGB_Inverse_TransferFunction(); - return to_unorm(bits, sk_program_transfer_fn(v, skcms_TFType_sRGBish, - v->splat(tf->g), - v->splat(tf->a), - v->splat(tf->b), - v->splat(tf->c), - v->splat(tf->d), - v->splat(tf->e), - v->splat(tf->f))); - }; - auto to_xr = [](int bits, F32 v) { - static constexpr float min = -0.752941f; - static constexpr float max = 1.25098f; - static constexpr float range = max - min; - return to_unorm(bits, (v - min) * (1.0f / range)); - }; - - I32 packed = c->splat(0); - auto pack_rgb = [&](F32 channel, int bits, int shift) { - I32 encoded; - switch (f.encoding) { - case PixelFormat::UNORM: encoded = to_unorm(bits, channel); break; - case PixelFormat:: SRGB: encoded = to_srgb (bits, channel); break; - case PixelFormat::FLOAT: encoded = to_fp16 ( channel); break; - case PixelFormat:: XRNG: encoded = to_xr (bits, channel); break; - } - packed = pack(packed, encoded, shift); - }; - auto pack_alpha = [&](F32 channel, int bits, int shift) { - I32 encoded; - switch (f.encoding) { - case PixelFormat::UNORM: - case PixelFormat:: SRGB: encoded = to_unorm(bits, channel); break; - case PixelFormat::FLOAT: encoded = to_fp16 ( channel); break; - case PixelFormat:: XRNG: encoded = to_xr (bits, channel); break; - } - packed = pack(packed, encoded, shift); - }; - if (f.r_bits) { pack_rgb (c.r, f.r_bits, f.r_shift); } - if (f.g_bits) { pack_rgb (c.g, f.g_bits, f.g_shift); } - if (f.b_bits) { pack_rgb (c.b, f.b_bits, f.b_shift); } - if (f.a_bits) { pack_alpha(c.a, f.a_bits, f.a_shift); } - return packed; - } - - void Builder::store(PixelFormat f, Ptr ptr, Color c) { - // Detect a grayscale PixelFormat: r,g,b bit counts and shifts all equal. - if (f.r_bits == f.g_bits && f.g_bits == f.b_bits && - f.r_shift == f.g_shift && f.g_shift == f.b_shift) { - - // TODO: pull these coefficients from an SkColorSpace? This is sRGB luma/luminance. - c.r = c.r * 0.2126f - + c.g * 0.7152f - + c.b * 0.0722f; - f.g_bits = f.b_bits = 0; - } - - switch (byte_size(f)) { - case 1: store8 (ptr, pack32(f,c)); break; - case 2: store16(ptr, pack32(f,c)); break; - case 4: store32(ptr, pack32(f,c)); break; - case 8: { - PixelFormat lo,hi; - split_disjoint_8byte_format(f, &lo,&hi); - store64(ptr, pack32(lo,c) - , pack32(hi,c)); - break; - } - case 16: { - assert_16byte_is_rgba_f32(f); - store128(ptr, pun_to_I32(c.r), pun_to_I32(c.g), pun_to_I32(c.b), pun_to_I32(c.a)); - break; - } - default: SkUNREACHABLE; - } - } - - void Builder::unpremul(F32* r, F32* g, F32* b, F32 a) { - skvm::F32 invA = 1.0f / a, - inf = pun_to_F32(splat(0x7f800000)); - // If a is 0, so are *r,*g,*b, so set invA to 0 to avoid 0*inf=NaN (instead 0*0 = 0). - invA = select(invA < inf, invA - , 0.0f); - *r *= invA; - *g *= invA; - *b *= invA; - } - - void Builder::premul(F32* r, F32* g, F32* b, F32 a) { - *r *= a; - *g *= a; - *b *= a; - } - - Color Builder::uniformColor(SkColor4f color, Uniforms* uniforms) { - auto [r,g,b,a] = color; - return { - uniformF(uniforms->pushF(r)), - uniformF(uniforms->pushF(g)), - uniformF(uniforms->pushF(b)), - uniformF(uniforms->pushF(a)), - }; - } - - F32 Builder::lerp(F32 lo, F32 hi, F32 t) { - if (this->isImm(t.id, 0.0f)) { return lo; } - if (this->isImm(t.id, 1.0f)) { return hi; } - return mad(sub(hi, lo), t, lo); - } - - Color Builder::lerp(Color lo, Color hi, F32 t) { - return { - lerp(lo.r, hi.r, t), - lerp(lo.g, hi.g, t), - lerp(lo.b, hi.b, t), - lerp(lo.a, hi.a, t), - }; - } - - HSLA Builder::to_hsla(Color c) { - F32 mx = max(max(c.r,c.g),c.b), - mn = min(min(c.r,c.g),c.b), - d = mx - mn, - invd = 1.0f / d, - g_lt_b = select(c.g < c.b, splat(6.0f) - , splat(0.0f)); - - F32 h = (1/6.0f) * select(mx == mn, 0.0f, - select(mx == c.r, invd * (c.g - c.b) + g_lt_b, - select(mx == c.g, invd * (c.b - c.r) + 2.0f - , invd * (c.r - c.g) + 4.0f))); - - F32 sum = mx + mn, - l = sum * 0.5f, - s = select(mx == mn, 0.0f - , d / select(l > 0.5f, 2.0f - sum - , sum)); - return {h, s, l, c.a}; - } - - Color Builder::to_rgba(HSLA c) { - // See GrRGBToHSLFilterEffect.fp - - auto [h,s,l,a] = c; - F32 x = s * (1.0f - abs(l + l - 1.0f)); - - auto hue_to_rgb = [&,l=l](auto hue) { - auto q = abs(6.0f * fract(hue) - 3.0f) - 1.0f; - return x * (clamp01(q) - 0.5f) + l; - }; - - return { - hue_to_rgb(h + 0/3.0f), - hue_to_rgb(h + 2/3.0f), - hue_to_rgb(h + 1/3.0f), - c.a, - }; - } - - // We're basing our implementation of non-separable blend modes on - // https://www.w3.org/TR/compositing-1/#blendingnonseparable. - // and - // https://www.khronos.org/registry/OpenGL/specs/es/3.2/es_spec_3.2.pdf - // They're equivalent, but ES' math has been better simplified. - // - // Anything extra we add beyond that is to make the math work with premul inputs. - - static skvm::F32 saturation(skvm::F32 r, skvm::F32 g, skvm::F32 b) { - return max(r, max(g, b)) - - min(r, min(g, b)); - } - - static skvm::F32 luminance(skvm::F32 r, skvm::F32 g, skvm::F32 b) { - return r*0.30f + g*0.59f + b*0.11f; - } - - static void set_sat(skvm::F32* r, skvm::F32* g, skvm::F32* b, skvm::F32 s) { - F32 mn = min(*r, min(*g, *b)), - mx = max(*r, max(*g, *b)), - sat = mx - mn; - - // Map min channel to 0, max channel to s, and scale the middle proportionally. - auto scale = [&](skvm::F32 c) { - auto scaled = ((c - mn) * s) / sat; - return select(is_finite(scaled), scaled, 0.0f); - }; - *r = scale(*r); - *g = scale(*g); - *b = scale(*b); - } - - static void set_lum(skvm::F32* r, skvm::F32* g, skvm::F32* b, skvm::F32 lu) { - auto diff = lu - luminance(*r, *g, *b); - *r += diff; - *g += diff; - *b += diff; - } - - static void clip_color(skvm::F32* r, skvm::F32* g, skvm::F32* b, skvm::F32 a) { - F32 mn = min(*r, min(*g, *b)), - mx = max(*r, max(*g, *b)), - lu = luminance(*r, *g, *b); - - auto clip = [&](auto c) { - c = select(mn < 0 & lu != mn, lu + ((c-lu)*( lu)) / (lu-mn), c); - c = select(mx > a & lu != mx, lu + ((c-lu)*(a-lu)) / (mx-lu), c); - return clamp01(c); // May be a little negative, or worse, NaN. - }; - *r = clip(*r); - *g = clip(*g); - *b = clip(*b); - } - - Color Builder::blend(SkBlendMode mode, Color src, Color dst) { - auto mma = [](skvm::F32 x, skvm::F32 y, skvm::F32 z, skvm::F32 w) { - return x*y + z*w; - }; - - auto two = [](skvm::F32 x) { return x+x; }; - - auto apply_rgba = [&](auto fn) { - return Color { - fn(src.r, dst.r), - fn(src.g, dst.g), - fn(src.b, dst.b), - fn(src.a, dst.a), - }; - }; - - auto apply_rgb_srcover_a = [&](auto fn) { - return Color { - fn(src.r, dst.r), - fn(src.g, dst.g), - fn(src.b, dst.b), - mad(dst.a, 1-src.a, src.a), // srcover for alpha - }; - }; - - auto non_sep = [&](auto R, auto G, auto B) { - return Color{ - R + mma(src.r, 1-dst.a, dst.r, 1-src.a), - G + mma(src.g, 1-dst.a, dst.g, 1-src.a), - B + mma(src.b, 1-dst.a, dst.b, 1-src.a), - mad(dst.a, 1-src.a, src.a), // srcover for alpha - }; - }; - - switch (mode) { - default: - SkASSERT(false); - [[fallthrough]]; /*but also, for safety, fallthrough*/ - - case SkBlendMode::kClear: return { splat(0.0f), splat(0.0f), splat(0.0f), splat(0.0f) }; - - case SkBlendMode::kSrc: return src; - case SkBlendMode::kDst: return dst; - - case SkBlendMode::kDstOver: std::swap(src, dst); [[fallthrough]]; - case SkBlendMode::kSrcOver: - return apply_rgba([&](auto s, auto d) { - return mad(d,1-src.a, s); - }); - - case SkBlendMode::kDstIn: std::swap(src, dst); [[fallthrough]]; - case SkBlendMode::kSrcIn: - return apply_rgba([&](auto s, auto d) { - return s * dst.a; - }); - - case SkBlendMode::kDstOut: std::swap(src, dst); [[fallthrough]]; - - case SkBlendMode::kSrcOut: - return apply_rgba([&](auto s, auto d) { - return s * (1-dst.a); - }); - - case SkBlendMode::kDstATop: std::swap(src, dst); [[fallthrough]]; - case SkBlendMode::kSrcATop: - return apply_rgba([&](auto s, auto d) { - return mma(s, dst.a, d, 1-src.a); - }); - - case SkBlendMode::kXor: - return apply_rgba([&](auto s, auto d) { - return mma(s, 1-dst.a, d, 1-src.a); - }); - - case SkBlendMode::kPlus: - return apply_rgba([&](auto s, auto d) { - return min(s+d, 1.0f); - }); - - case SkBlendMode::kModulate: - return apply_rgba([&](auto s, auto d) { - return s * d; - }); - - case SkBlendMode::kScreen: - // (s+d)-(s*d) gave us trouble with our "r,g,b <= after blending" asserts. - // It's kind of plausible that s + (d - sd) keeps more precision? - return apply_rgba([&](auto s, auto d) { - return s + (d - s*d); - }); - - case SkBlendMode::kDarken: - return apply_rgb_srcover_a([&](auto s, auto d) { - return s + (d - max(s * dst.a, - d * src.a)); - }); - - case SkBlendMode::kLighten: - return apply_rgb_srcover_a([&](auto s, auto d) { - return s + (d - min(s * dst.a, - d * src.a)); - }); - - case SkBlendMode::kDifference: - return apply_rgb_srcover_a([&](auto s, auto d) { - return s + (d - two(min(s * dst.a, - d * src.a))); - }); - - case SkBlendMode::kExclusion: - return apply_rgb_srcover_a([&](auto s, auto d) { - return s + (d - two(s * d)); - }); - - case SkBlendMode::kColorBurn: - return apply_rgb_srcover_a([&](auto s, auto d) { - auto mn = min(dst.a, - src.a * (dst.a - d) / s), - burn = src.a * (dst.a - mn) + mma(s, 1-dst.a, d, 1-src.a); - return select(d == dst.a , s * (1-dst.a) + d, - select(is_finite(burn), burn - , d * (1-src.a) + s)); - }); - - case SkBlendMode::kColorDodge: - return apply_rgb_srcover_a([&](auto s, auto d) { - auto dodge = src.a * min(dst.a, - d * src.a / (src.a - s)) - + mma(s, 1-dst.a, d, 1-src.a); - return select(d == 0.0f , s * (1-dst.a) + d, - select(is_finite(dodge), dodge - , d * (1-src.a) + s)); - }); - - case SkBlendMode::kHardLight: - return apply_rgb_srcover_a([&](auto s, auto d) { - return mma(s, 1-dst.a, d, 1-src.a) + - select(two(s) <= src.a, - two(s * d), - src.a * dst.a - two((dst.a - d) * (src.a - s))); - }); - - case SkBlendMode::kOverlay: - return apply_rgb_srcover_a([&](auto s, auto d) { - return mma(s, 1-dst.a, d, 1-src.a) + - select(two(d) <= dst.a, - two(s * d), - src.a * dst.a - two((dst.a - d) * (src.a - s))); - }); - - case SkBlendMode::kMultiply: - return apply_rgba([&](auto s, auto d) { - return mma(s, 1-dst.a, d, 1-src.a) + s * d; - }); - - case SkBlendMode::kSoftLight: - return apply_rgb_srcover_a([&](auto s, auto d) { - auto m = select(dst.a > 0.0f, d / dst.a - , 0.0f), - s2 = two(s), - m4 = 4*m; - - // The logic forks three ways: - // 1. dark src? - // 2. light src, dark dst? - // 3. light src, light dst? - - // Used in case 1 - auto darkSrc = d * ((s2-src.a) * (1-m) + src.a), - // Used in case 2 - darkDst = (m4 * m4 + m4) * (m-1) + 7*m, - // Used in case 3. - liteDst = sqrt(m) - m, - // Used in 2 or 3? - liteSrc = dst.a * (s2 - src.a) * select(4*d <= dst.a, darkDst - , liteDst) - + d * src.a; - return s * (1-dst.a) + d * (1-src.a) + select(s2 <= src.a, darkSrc - , liteSrc); - }); - - case SkBlendMode::kHue: { - skvm::F32 R = src.r * src.a, - G = src.g * src.a, - B = src.b * src.a; - - set_sat (&R, &G, &B, src.a * saturation(dst.r, dst.g, dst.b)); - set_lum (&R, &G, &B, src.a * luminance (dst.r, dst.g, dst.b)); - clip_color(&R, &G, &B, src.a * dst.a); - - return non_sep(R, G, B); - } - - case SkBlendMode::kSaturation: { - skvm::F32 R = dst.r * src.a, - G = dst.g * src.a, - B = dst.b * src.a; - - set_sat (&R, &G, &B, dst.a * saturation(src.r, src.g, src.b)); - set_lum (&R, &G, &B, src.a * luminance (dst.r, dst.g, dst.b)); - clip_color(&R, &G, &B, src.a * dst.a); - - return non_sep(R, G, B); - } - - case SkBlendMode::kColor: { - skvm::F32 R = src.r * dst.a, - G = src.g * dst.a, - B = src.b * dst.a; - - set_lum (&R, &G, &B, src.a * luminance(dst.r, dst.g, dst.b)); - clip_color(&R, &G, &B, src.a * dst.a); - - return non_sep(R, G, B); - } - - case SkBlendMode::kLuminosity: { - skvm::F32 R = dst.r * src.a, - G = dst.g * src.a, - B = dst.b * src.a; - - set_lum (&R, &G, &B, dst.a * luminance(src.r, src.g, src.b)); - clip_color(&R, &G, &B, dst.a * src.a); - - return non_sep(R, G, B); - } - } - } - - // ~~~~ Program::eval() and co. ~~~~ // - - // Handy references for x86-64 instruction encoding: - // https://wiki.osdev.org/X86-64_Instruction_Encoding - // https://www-user.tu-chemnitz.de/~heha/viewchm.php/hs/x86.chm/x64.htm - // https://www-user.tu-chemnitz.de/~heha/viewchm.php/hs/x86.chm/x86.htm - // http://ref.x86asm.net/coder64.html - - // Used for ModRM / immediate instruction encoding. - static uint8_t _233(int a, int b, int c) { - return (a & 3) << 6 - | (b & 7) << 3 - | (c & 7) << 0; - } - - // ModRM byte encodes the arguments of an opcode. - enum class Mod { Indirect, OneByteImm, FourByteImm, Direct }; - static uint8_t mod_rm(Mod mod, int reg, int rm) { - return _233((int)mod, reg, rm); - } - - static Mod mod(int imm) { - if (imm == 0) { return Mod::Indirect; } - if (SkTFitsIn(imm)) { return Mod::OneByteImm; } - return Mod::FourByteImm; - } - - static int imm_bytes(Mod mod) { - switch (mod) { - case Mod::Indirect: return 0; - case Mod::OneByteImm: return 1; - case Mod::FourByteImm: return 4; - case Mod::Direct: SkUNREACHABLE; - } - SkUNREACHABLE; - } - - // SIB byte encodes a memory address, base + (index * scale). - static uint8_t sib(Assembler::Scale scale, int index, int base) { - return _233((int)scale, index, base); - } - - // The REX prefix is used to extend most old 32-bit instructions to 64-bit. - static uint8_t rex(bool W, // If set, operation is 64-bit, otherwise default, usually 32-bit. - bool R, // Extra top bit to select ModRM reg, registers 8-15. - bool X, // Extra top bit for SIB index register. - bool B) { // Extra top bit for SIB base or ModRM rm register. - return 0b01000000 // Fixed 0100 for top four bits. - | (W << 3) - | (R << 2) - | (X << 1) - | (B << 0); - } - - - // The VEX prefix extends SSE operations to AVX. Used generally, even with XMM. - struct VEX { - int len; - uint8_t bytes[3]; - }; - - static VEX vex(bool WE, // Like REX W for int operations, or opcode extension for float? - bool R, // Same as REX R. Pass high bit of dst register, dst>>3. - bool X, // Same as REX X. - bool B, // Same as REX B. Pass y>>3 for 3-arg ops, x>>3 for 2-arg. - int map, // SSE opcode map selector: 0x0f, 0x380f, 0x3a0f. - int vvvv, // 4-bit second operand register. Pass our x for 3-arg ops. - bool L, // Set for 256-bit ymm operations, off for 128-bit xmm. - int pp) { // SSE mandatory prefix: 0x66, 0xf3, 0xf2, else none. - - // Pack x86 opcode map selector to 5-bit VEX encoding. - map = [map]{ - switch (map) { - case 0x0f: return 0b00001; - case 0x380f: return 0b00010; - case 0x3a0f: return 0b00011; - // Several more cases only used by XOP / TBM. - } - SkUNREACHABLE; - }(); - - // Pack mandatory SSE opcode prefix byte to 2-bit VEX encoding. - pp = [pp]{ - switch (pp) { - case 0x66: return 0b01; - case 0xf3: return 0b10; - case 0xf2: return 0b11; - } - return 0b00; - }(); - - VEX vex = {0, {0,0,0}}; - if (X == 0 && B == 0 && WE == 0 && map == 0b00001) { - // With these conditions met, we can optionally compress VEX to 2-byte. - vex.len = 2; - vex.bytes[0] = 0xc5; - vex.bytes[1] = (pp & 3) << 0 - | (L & 1) << 2 - | (~vvvv & 15) << 3 - | (~(int)R & 1) << 7; - } else { - // We could use this 3-byte VEX prefix all the time if we like. - vex.len = 3; - vex.bytes[0] = 0xc4; - vex.bytes[1] = (map & 31) << 0 - | (~(int)B & 1) << 5 - | (~(int)X & 1) << 6 - | (~(int)R & 1) << 7; - vex.bytes[2] = (pp & 3) << 0 - | (L & 1) << 2 - | (~vvvv & 15) << 3 - | (WE & 1) << 7; - } - return vex; - } - - Assembler::Assembler(void* buf) : fCode((uint8_t*)buf), fSize(0) {} - - size_t Assembler::size() const { return fSize; } - - void Assembler::bytes(const void* p, int n) { - if (fCode) { - memcpy(fCode+fSize, p, n); - } - fSize += n; - } - - void Assembler::byte(uint8_t b) { this->bytes(&b, 1); } - void Assembler::word(uint32_t w) { this->bytes(&w, 4); } - - void Assembler::align(int mod) { - while (this->size() % mod) { - this->byte(0x00); - } - } - - void Assembler::int3() { - this->byte(0xcc); - } - - void Assembler::vzeroupper() { - this->byte(0xc5); - this->byte(0xf8); - this->byte(0x77); - } - void Assembler::ret() { this->byte(0xc3); } - - void Assembler::op(int opcode, Operand dst, GP64 x) { - if (dst.kind == Operand::REG) { - this->byte(rex(W1,x>>3,0,dst.reg>>3)); - this->bytes(&opcode, SkTFitsIn(opcode) ? 1 : 2); - this->byte(mod_rm(Mod::Direct, x, dst.reg&7)); - } else { - SkASSERT(dst.kind == Operand::MEM); - const Mem& m = dst.mem; - const bool need_SIB = (m.base&7) == rsp - || m.index != rsp; - - this->byte(rex(W1,x>>3,m.index>>3,m.base>>3)); - this->bytes(&opcode, SkTFitsIn(opcode) ? 1 : 2); - this->byte(mod_rm(mod(m.disp), x&7, (need_SIB ? rsp : m.base)&7)); - if (need_SIB) { - this->byte(sib(m.scale, m.index&7, m.base&7)); - } - this->bytes(&m.disp, imm_bytes(mod(m.disp))); - } - } - - void Assembler::op(int opcode, int opcode_ext, Operand dst, int imm) { - opcode |= 0b1000'0000; // top bit set for instructions with any immediate - - int imm_bytes = 4; - if (SkTFitsIn(imm)) { - imm_bytes = 1; - opcode |= 0b0000'0010; // second bit set for 8-bit immediate, else 32-bit. - } - - this->op(opcode, dst, (GP64)opcode_ext); - this->bytes(&imm, imm_bytes); - } - - void Assembler::add(Operand dst, int imm) { this->op(0x01,0b000, dst,imm); } - void Assembler::sub(Operand dst, int imm) { this->op(0x01,0b101, dst,imm); } - void Assembler::cmp(Operand dst, int imm) { this->op(0x01,0b111, dst,imm); } - - // These don't work quite like the other instructions with immediates: - // these immediates are always fixed size at 4 bytes or 1 byte. - void Assembler::mov(Operand dst, int imm) { - this->op(0xC7,dst,(GP64)0b000); - this->word(imm); - } - void Assembler::movb(Operand dst, int imm) { - this->op(0xC6,dst,(GP64)0b000); - this->byte(imm); - } - - void Assembler::add (Operand dst, GP64 x) { this->op(0x01, dst,x); } - void Assembler::sub (Operand dst, GP64 x) { this->op(0x29, dst,x); } - void Assembler::cmp (Operand dst, GP64 x) { this->op(0x39, dst,x); } - void Assembler::mov (Operand dst, GP64 x) { this->op(0x89, dst,x); } - void Assembler::movb(Operand dst, GP64 x) { this->op(0x88, dst,x); } - - void Assembler::add (GP64 dst, Operand x) { this->op(0x03, x,dst); } - void Assembler::sub (GP64 dst, Operand x) { this->op(0x2B, x,dst); } - void Assembler::cmp (GP64 dst, Operand x) { this->op(0x3B, x,dst); } - void Assembler::mov (GP64 dst, Operand x) { this->op(0x8B, x,dst); } - void Assembler::movb(GP64 dst, Operand x) { this->op(0x8A, x,dst); } - - void Assembler::movzbq(GP64 dst, Operand x) { this->op(0xB60F, x,dst); } - void Assembler::movzwq(GP64 dst, Operand x) { this->op(0xB70F, x,dst); } - - void Assembler::vpaddd (Ymm dst, Ymm x, Operand y) { this->op(0x66, 0x0f,0xfe, dst,x,y); } - void Assembler::vpsubd (Ymm dst, Ymm x, Operand y) { this->op(0x66, 0x0f,0xfa, dst,x,y); } - void Assembler::vpmulld(Ymm dst, Ymm x, Operand y) { this->op(0x66,0x380f,0x40, dst,x,y); } - - void Assembler::vpaddw (Ymm dst, Ymm x, Operand y) { this->op(0x66, 0x0f,0xfd, dst,x,y); } - void Assembler::vpsubw (Ymm dst, Ymm x, Operand y) { this->op(0x66, 0x0f,0xf9, dst,x,y); } - void Assembler::vpmullw (Ymm dst, Ymm x, Operand y) { this->op(0x66, 0x0f,0xd5, dst,x,y); } - void Assembler::vpavgw (Ymm dst, Ymm x, Operand y) { this->op(0x66, 0x0f,0xe3, dst,x,y); } - void Assembler::vpmulhrsw(Ymm dst, Ymm x, Operand y) { this->op(0x66,0x380f,0x0b, dst,x,y); } - void Assembler::vpminsw (Ymm dst, Ymm x, Operand y) { this->op(0x66, 0x0f,0xea, dst,x,y); } - void Assembler::vpmaxsw (Ymm dst, Ymm x, Operand y) { this->op(0x66, 0x0f,0xee, dst,x,y); } - void Assembler::vpminuw (Ymm dst, Ymm x, Operand y) { this->op(0x66,0x380f,0x3a, dst,x,y); } - void Assembler::vpmaxuw (Ymm dst, Ymm x, Operand y) { this->op(0x66,0x380f,0x3e, dst,x,y); } - - void Assembler::vpabsw(Ymm dst, Operand x) { this->op(0x66,0x380f,0x1d, dst,x); } - - - void Assembler::vpand (Ymm dst, Ymm x, Operand y) { this->op(0x66,0x0f,0xdb, dst,x,y); } - void Assembler::vpor (Ymm dst, Ymm x, Operand y) { this->op(0x66,0x0f,0xeb, dst,x,y); } - void Assembler::vpxor (Ymm dst, Ymm x, Operand y) { this->op(0x66,0x0f,0xef, dst,x,y); } - void Assembler::vpandn(Ymm dst, Ymm x, Operand y) { this->op(0x66,0x0f,0xdf, dst,x,y); } - - void Assembler::vaddps(Ymm dst, Ymm x, Operand y) { this->op(0,0x0f,0x58, dst,x,y); } - void Assembler::vsubps(Ymm dst, Ymm x, Operand y) { this->op(0,0x0f,0x5c, dst,x,y); } - void Assembler::vmulps(Ymm dst, Ymm x, Operand y) { this->op(0,0x0f,0x59, dst,x,y); } - void Assembler::vdivps(Ymm dst, Ymm x, Operand y) { this->op(0,0x0f,0x5e, dst,x,y); } - void Assembler::vminps(Ymm dst, Ymm x, Operand y) { this->op(0,0x0f,0x5d, dst,x,y); } - void Assembler::vmaxps(Ymm dst, Ymm x, Operand y) { this->op(0,0x0f,0x5f, dst,x,y); } - - void Assembler::vfmadd132ps(Ymm dst, Ymm x, Operand y) { this->op(0x66,0x380f,0x98, dst,x,y); } - void Assembler::vfmadd213ps(Ymm dst, Ymm x, Operand y) { this->op(0x66,0x380f,0xa8, dst,x,y); } - void Assembler::vfmadd231ps(Ymm dst, Ymm x, Operand y) { this->op(0x66,0x380f,0xb8, dst,x,y); } - - void Assembler::vfmsub132ps(Ymm dst, Ymm x, Operand y) { this->op(0x66,0x380f,0x9a, dst,x,y); } - void Assembler::vfmsub213ps(Ymm dst, Ymm x, Operand y) { this->op(0x66,0x380f,0xaa, dst,x,y); } - void Assembler::vfmsub231ps(Ymm dst, Ymm x, Operand y) { this->op(0x66,0x380f,0xba, dst,x,y); } - - void Assembler::vfnmadd132ps(Ymm dst, Ymm x, Operand y) { this->op(0x66,0x380f,0x9c, dst,x,y); } - void Assembler::vfnmadd213ps(Ymm dst, Ymm x, Operand y) { this->op(0x66,0x380f,0xac, dst,x,y); } - void Assembler::vfnmadd231ps(Ymm dst, Ymm x, Operand y) { this->op(0x66,0x380f,0xbc, dst,x,y); } - - void Assembler::vpackusdw(Ymm dst, Ymm x, Operand y) { this->op(0x66,0x380f,0x2b, dst,x,y); } - void Assembler::vpackuswb(Ymm dst, Ymm x, Operand y) { this->op(0x66, 0x0f,0x67, dst,x,y); } - - void Assembler::vpunpckldq(Ymm dst, Ymm x, Operand y) { this->op(0x66,0x0f,0x62, dst,x,y); } - void Assembler::vpunpckhdq(Ymm dst, Ymm x, Operand y) { this->op(0x66,0x0f,0x6a, dst,x,y); } - - void Assembler::vpcmpeqd(Ymm dst, Ymm x, Operand y) { this->op(0x66,0x0f,0x76, dst,x,y); } - void Assembler::vpcmpeqw(Ymm dst, Ymm x, Operand y) { this->op(0x66,0x0f,0x75, dst,x,y); } - void Assembler::vpcmpgtd(Ymm dst, Ymm x, Operand y) { this->op(0x66,0x0f,0x66, dst,x,y); } - void Assembler::vpcmpgtw(Ymm dst, Ymm x, Operand y) { this->op(0x66,0x0f,0x65, dst,x,y); } - - - void Assembler::imm_byte_after_operand(const Operand& operand, int imm) { - // When we've embedded a label displacement in the middle of an instruction, - // we need to tweak it a little so that the resolved displacement starts - // from the end of the instruction and not the end of the displacement. - if (operand.kind == Operand::LABEL && fCode) { - int disp; - memcpy(&disp, fCode+fSize-4, 4); - disp--; - memcpy(fCode+fSize-4, &disp, 4); - } - this->byte(imm); - } - - void Assembler::vcmpps(Ymm dst, Ymm x, Operand y, int imm) { - this->op(0,0x0f,0xc2, dst,x,y); - this->imm_byte_after_operand(y, imm); - } - - void Assembler::vpblendvb(Ymm dst, Ymm x, Operand y, Ymm z) { - this->op(0x66,0x3a0f,0x4c, dst,x,y); - this->imm_byte_after_operand(y, z << 4); - } - - // Shift instructions encode their opcode extension as "dst", dst as x, and x as y. - void Assembler::vpslld(Ymm dst, Ymm x, int imm) { - this->op(0x66,0x0f,0x72,(Ymm)6, dst,x); - this->byte(imm); - } - void Assembler::vpsrld(Ymm dst, Ymm x, int imm) { - this->op(0x66,0x0f,0x72,(Ymm)2, dst,x); - this->byte(imm); - } - void Assembler::vpsrad(Ymm dst, Ymm x, int imm) { - this->op(0x66,0x0f,0x72,(Ymm)4, dst,x); - this->byte(imm); - } - void Assembler::vpsllw(Ymm dst, Ymm x, int imm) { - this->op(0x66,0x0f,0x71,(Ymm)6, dst,x); - this->byte(imm); - } - void Assembler::vpsrlw(Ymm dst, Ymm x, int imm) { - this->op(0x66,0x0f,0x71,(Ymm)2, dst,x); - this->byte(imm); - } - void Assembler::vpsraw(Ymm dst, Ymm x, int imm) { - this->op(0x66,0x0f,0x71,(Ymm)4, dst,x); - this->byte(imm); - } - - void Assembler::vpermq(Ymm dst, Operand x, int imm) { - // A bit unusual among the instructions we use, this is 64-bit operation, so we set W. - this->op(0x66,0x3a0f,0x00, dst,x,W1); - this->imm_byte_after_operand(x, imm); - } - - void Assembler::vperm2f128(Ymm dst, Ymm x, Operand y, int imm) { - this->op(0x66,0x3a0f,0x06, dst,x,y); - this->imm_byte_after_operand(y, imm); - } - - void Assembler::vpermps(Ymm dst, Ymm ix, Operand src) { - this->op(0x66,0x380f,0x16, dst,ix,src); - } - - void Assembler::vroundps(Ymm dst, Operand x, Rounding imm) { - this->op(0x66,0x3a0f,0x08, dst,x); - this->imm_byte_after_operand(x, imm); - } - - void Assembler::vmovdqa(Ymm dst, Operand src) { this->op(0x66,0x0f,0x6f, dst,src); } - void Assembler::vmovups(Ymm dst, Operand src) { this->op( 0,0x0f,0x10, dst,src); } - void Assembler::vmovups(Xmm dst, Operand src) { this->op( 0,0x0f,0x10, dst,src); } - void Assembler::vmovups(Operand dst, Ymm src) { this->op( 0,0x0f,0x11, src,dst); } - void Assembler::vmovups(Operand dst, Xmm src) { this->op( 0,0x0f,0x11, src,dst); } - - void Assembler::vcvtdq2ps (Ymm dst, Operand x) { this->op( 0,0x0f,0x5b, dst,x); } - void Assembler::vcvttps2dq(Ymm dst, Operand x) { this->op(0xf3,0x0f,0x5b, dst,x); } - void Assembler::vcvtps2dq (Ymm dst, Operand x) { this->op(0x66,0x0f,0x5b, dst,x); } - void Assembler::vsqrtps (Ymm dst, Operand x) { this->op( 0,0x0f,0x51, dst,x); } - - void Assembler::vcvtps2ph(Operand dst, Ymm x, Rounding imm) { - this->op(0x66,0x3a0f,0x1d, x,dst); - this->imm_byte_after_operand(dst, imm); - } - void Assembler::vcvtph2ps(Ymm dst, Operand x) { - this->op(0x66,0x380f,0x13, dst,x); - } - - int Assembler::disp19(Label* l) { - SkASSERT(l->kind == Label::NotYetSet || - l->kind == Label::ARMDisp19); - int here = (int)this->size(); - l->kind = Label::ARMDisp19; - l->references.push_back(here); - // ARM 19-bit instruction count, from the beginning of this instruction. - return (l->offset - here) / 4; - } - - int Assembler::disp32(Label* l) { - SkASSERT(l->kind == Label::NotYetSet || - l->kind == Label::X86Disp32); - int here = (int)this->size(); - l->kind = Label::X86Disp32; - l->references.push_back(here); - // x86 32-bit byte count, from the end of this instruction. - return l->offset - (here + 4); - } - - void Assembler::op(int prefix, int map, int opcode, int dst, int x, Operand y, W w, L l) { - switch (y.kind) { - case Operand::REG: { - VEX v = vex(w, dst>>3, 0, y.reg>>3, - map, x, l, prefix); - this->bytes(v.bytes, v.len); - this->byte(opcode); - this->byte(mod_rm(Mod::Direct, dst&7, y.reg&7)); - } return; - - case Operand::MEM: { - // Passing rsp as the rm argument to mod_rm() signals an SIB byte follows; - // without an SIB byte, that's where the base register would usually go. - // This means we have to use an SIB byte if we want to use rsp as a base register. - const Mem& m = y.mem; - const bool need_SIB = m.base == rsp - || m.index != rsp; - - VEX v = vex(w, dst>>3, m.index>>3, m.base>>3, - map, x, l, prefix); - this->bytes(v.bytes, v.len); - this->byte(opcode); - this->byte(mod_rm(mod(m.disp), dst&7, (need_SIB ? rsp : m.base)&7)); - if (need_SIB) { - this->byte(sib(m.scale, m.index&7, m.base&7)); - } - this->bytes(&m.disp, imm_bytes(mod(m.disp))); - } return; - - case Operand::LABEL: { - // IP-relative addressing uses Mod::Indirect with the R/M encoded as-if rbp or r13. - const int rip = rbp; - - VEX v = vex(w, dst>>3, 0, rip>>3, - map, x, l, prefix); - this->bytes(v.bytes, v.len); - this->byte(opcode); - this->byte(mod_rm(Mod::Indirect, dst&7, rip&7)); - this->word(this->disp32(y.label)); - } return; - } - } - - void Assembler::vpshufb(Ymm dst, Ymm x, Operand y) { this->op(0x66,0x380f,0x00, dst,x,y); } - - void Assembler::vptest(Ymm x, Operand y) { this->op(0x66, 0x380f, 0x17, x,y); } - - void Assembler::vbroadcastss(Ymm dst, Operand y) { this->op(0x66,0x380f,0x18, dst,y); } - - void Assembler::jump(uint8_t condition, Label* l) { - // These conditional jumps can be either 2 bytes (short) or 6 bytes (near): - // 7? one-byte-disp - // 0F 8? four-byte-disp - // We always use the near displacement to make updating labels simpler (no resizing). - this->byte(0x0f); - this->byte(condition); - this->word(this->disp32(l)); - } - void Assembler::je (Label* l) { this->jump(0x84, l); } - void Assembler::jne(Label* l) { this->jump(0x85, l); } - void Assembler::jl (Label* l) { this->jump(0x8c, l); } - void Assembler::jc (Label* l) { this->jump(0x82, l); } - - void Assembler::jmp(Label* l) { - // Like above in jump(), we could use 8-bit displacement here, but always use 32-bit. - this->byte(0xe9); - this->word(this->disp32(l)); - } - - void Assembler::vpmovzxwd(Ymm dst, Operand src) { this->op(0x66,0x380f,0x33, dst,src); } - void Assembler::vpmovzxbd(Ymm dst, Operand src) { this->op(0x66,0x380f,0x31, dst,src); } - - void Assembler::vmovq(Operand dst, Xmm src) { this->op(0x66,0x0f,0xd6, src,dst); } - - void Assembler::vmovd(Operand dst, Xmm src) { this->op(0x66,0x0f,0x7e, src,dst); } - void Assembler::vmovd(Xmm dst, Operand src) { this->op(0x66,0x0f,0x6e, dst,src); } - - void Assembler::vpinsrd(Xmm dst, Xmm src, Operand y, int imm) { - this->op(0x66,0x3a0f,0x22, dst,src,y); - this->imm_byte_after_operand(y, imm); - } - void Assembler::vpinsrw(Xmm dst, Xmm src, Operand y, int imm) { - this->op(0x66,0x0f,0xc4, dst,src,y); - this->imm_byte_after_operand(y, imm); - } - void Assembler::vpinsrb(Xmm dst, Xmm src, Operand y, int imm) { - this->op(0x66,0x3a0f,0x20, dst,src,y); - this->imm_byte_after_operand(y, imm); - } - - void Assembler::vextracti128(Operand dst, Ymm src, int imm) { - this->op(0x66,0x3a0f,0x39, src,dst); - SkASSERT(dst.kind != Operand::LABEL); - this->byte(imm); - } - void Assembler::vpextrd(Operand dst, Xmm src, int imm) { - this->op(0x66,0x3a0f,0x16, src,dst); - SkASSERT(dst.kind != Operand::LABEL); - this->byte(imm); - } - void Assembler::vpextrw(Operand dst, Xmm src, int imm) { - this->op(0x66,0x3a0f,0x15, src,dst); - SkASSERT(dst.kind != Operand::LABEL); - this->byte(imm); - } - void Assembler::vpextrb(Operand dst, Xmm src, int imm) { - this->op(0x66,0x3a0f,0x14, src,dst); - SkASSERT(dst.kind != Operand::LABEL); - this->byte(imm); - } - - void Assembler::vgatherdps(Ymm dst, Scale scale, Ymm ix, GP64 base, Ymm mask) { - // Unlike most instructions, no aliasing is permitted here. - SkASSERT(dst != ix); - SkASSERT(dst != mask); - SkASSERT(mask != ix); - - int prefix = 0x66, - map = 0x380f, - opcode = 0x92; - VEX v = vex(0, dst>>3, ix>>3, base>>3, - map, mask, /*ymm?*/1, prefix); - this->bytes(v.bytes, v.len); - this->byte(opcode); - this->byte(mod_rm(Mod::Indirect, dst&7, rsp/*use SIB*/)); - this->byte(sib(scale, ix&7, base&7)); - } - - // https://static.docs.arm.com/ddi0596/a/DDI_0596_ARM_a64_instruction_set_architecture.pdf - - static int mask(unsigned long long bits) { return (1<<(int)bits)-1; } - - void Assembler::op(uint32_t hi, V m, uint32_t lo, V n, V d) { - this->word( (hi & mask(11)) << 21 - | (m & mask(5)) << 16 - | (lo & mask(6)) << 10 - | (n & mask(5)) << 5 - | (d & mask(5)) << 0); - } - void Assembler::op(uint32_t op22, V n, V d, int imm) { - this->word( (op22 & mask(22)) << 10 - | imm // size and location depends on the instruction - | (n & mask(5)) << 5 - | (d & mask(5)) << 0); - } - - void Assembler::and16b(V d, V n, V m) { this->op(0b0'1'0'01110'00'1, m, 0b00011'1, n, d); } - void Assembler::orr16b(V d, V n, V m) { this->op(0b0'1'0'01110'10'1, m, 0b00011'1, n, d); } - void Assembler::eor16b(V d, V n, V m) { this->op(0b0'1'1'01110'00'1, m, 0b00011'1, n, d); } - void Assembler::bic16b(V d, V n, V m) { this->op(0b0'1'0'01110'01'1, m, 0b00011'1, n, d); } - void Assembler::bsl16b(V d, V n, V m) { this->op(0b0'1'1'01110'01'1, m, 0b00011'1, n, d); } - void Assembler::not16b(V d, V n) { this->op(0b0'1'1'01110'00'10000'00101'10, n, d); } - - void Assembler::add4s(V d, V n, V m) { this->op(0b0'1'0'01110'10'1, m, 0b10000'1, n, d); } - void Assembler::sub4s(V d, V n, V m) { this->op(0b0'1'1'01110'10'1, m, 0b10000'1, n, d); } - void Assembler::mul4s(V d, V n, V m) { this->op(0b0'1'0'01110'10'1, m, 0b10011'1, n, d); } - - void Assembler::cmeq4s(V d, V n, V m) { this->op(0b0'1'1'01110'10'1, m, 0b10001'1, n, d); } - void Assembler::cmgt4s(V d, V n, V m) { this->op(0b0'1'0'01110'10'1, m, 0b0011'0'1, n, d); } - - void Assembler::sub8h(V d, V n, V m) { this->op(0b0'1'1'01110'01'1, m, 0b10000'1, n, d); } - void Assembler::mul8h(V d, V n, V m) { this->op(0b0'1'0'01110'01'1, m, 0b10011'1, n, d); } - - void Assembler::fadd4s(V d, V n, V m) { this->op(0b0'1'0'01110'0'0'1, m, 0b11010'1, n, d); } - void Assembler::fsub4s(V d, V n, V m) { this->op(0b0'1'0'01110'1'0'1, m, 0b11010'1, n, d); } - void Assembler::fmul4s(V d, V n, V m) { this->op(0b0'1'1'01110'0'0'1, m, 0b11011'1, n, d); } - void Assembler::fdiv4s(V d, V n, V m) { this->op(0b0'1'1'01110'0'0'1, m, 0b11111'1, n, d); } - void Assembler::fmin4s(V d, V n, V m) { this->op(0b0'1'0'01110'1'0'1, m, 0b11110'1, n, d); } - void Assembler::fmax4s(V d, V n, V m) { this->op(0b0'1'0'01110'0'0'1, m, 0b11110'1, n, d); } - - void Assembler::fneg4s (V d, V n) { this->op(0b0'1'1'01110'1'0'10000'01111'10, n,d); } - void Assembler::fsqrt4s(V d, V n) { this->op(0b0'1'1'01110'1'0'10000'11111'10, n,d); } - - void Assembler::fcmeq4s(V d, V n, V m) { this->op(0b0'1'0'01110'0'0'1, m, 0b1110'0'1, n, d); } - void Assembler::fcmgt4s(V d, V n, V m) { this->op(0b0'1'1'01110'1'0'1, m, 0b1110'0'1, n, d); } - void Assembler::fcmge4s(V d, V n, V m) { this->op(0b0'1'1'01110'0'0'1, m, 0b1110'0'1, n, d); } - - void Assembler::fmla4s(V d, V n, V m) { this->op(0b0'1'0'01110'0'0'1, m, 0b11001'1, n, d); } - void Assembler::fmls4s(V d, V n, V m) { this->op(0b0'1'0'01110'1'0'1, m, 0b11001'1, n, d); } - - void Assembler::tbl(V d, V n, V m) { this->op(0b0'1'001110'00'0, m, 0b0'00'0'00, n, d); } - - void Assembler::uzp14s(V d, V n, V m) { this->op(0b0'1'001110'10'0, m, 0b0'0'01'10, n, d); } - void Assembler::uzp24s(V d, V n, V m) { this->op(0b0'1'001110'10'0, m, 0b0'1'01'10, n, d); } - void Assembler::zip14s(V d, V n, V m) { this->op(0b0'1'001110'10'0, m, 0b0'0'11'10, n, d); } - void Assembler::zip24s(V d, V n, V m) { this->op(0b0'1'001110'10'0, m, 0b0'1'11'10, n, d); } - - void Assembler::sli4s(V d, V n, int imm5) { - this->op(0b0'1'1'011110'0100'000'01010'1, n, d, ( imm5 & mask(5))<<16); - } - void Assembler::shl4s(V d, V n, int imm5) { - this->op(0b0'1'0'011110'0100'000'01010'1, n, d, ( imm5 & mask(5))<<16); - } - void Assembler::sshr4s(V d, V n, int imm5) { - this->op(0b0'1'0'011110'0100'000'00'0'0'0'1, n, d, (-imm5 & mask(5))<<16); - } - void Assembler::ushr4s(V d, V n, int imm5) { - this->op(0b0'1'1'011110'0100'000'00'0'0'0'1, n, d, (-imm5 & mask(5))<<16); - } - void Assembler::ushr8h(V d, V n, int imm4) { - this->op(0b0'1'1'011110'0010'000'00'0'0'0'1, n, d, (-imm4 & mask(4))<<16); - } - - void Assembler::scvtf4s (V d, V n) { this->op(0b0'1'0'01110'0'0'10000'11101'10, n,d); } - void Assembler::fcvtzs4s(V d, V n) { this->op(0b0'1'0'01110'1'0'10000'1101'1'10, n,d); } - void Assembler::fcvtns4s(V d, V n) { this->op(0b0'1'0'01110'0'0'10000'1101'0'10, n,d); } - void Assembler::frintp4s(V d, V n) { this->op(0b0'1'0'01110'1'0'10000'1100'0'10, n,d); } - void Assembler::frintm4s(V d, V n) { this->op(0b0'1'0'01110'0'0'10000'1100'1'10, n,d); } - - void Assembler::fcvtn(V d, V n) { this->op(0b0'0'0'01110'0'0'10000'10110'10, n,d); } - void Assembler::fcvtl(V d, V n) { this->op(0b0'0'0'01110'0'0'10000'10111'10, n,d); } - - void Assembler::xtns2h(V d, V n) { this->op(0b0'0'0'01110'01'10000'10010'10, n,d); } - void Assembler::xtnh2b(V d, V n) { this->op(0b0'0'0'01110'00'10000'10010'10, n,d); } - - void Assembler::uxtlb2h(V d, V n) { this->op(0b0'0'1'011110'0001'000'10100'1, n,d); } - void Assembler::uxtlh2s(V d, V n) { this->op(0b0'0'1'011110'0010'000'10100'1, n,d); } - - void Assembler::uminv4s(V d, V n) { this->op(0b0'1'1'01110'10'11000'1'1010'10, n,d); } - - void Assembler::brk(int imm16) { - this->op(0b11010100'001'00000000000, (imm16 & mask(16)) << 5); - } - - void Assembler::ret(X n) { this->op(0b1101011'0'0'10'11111'0000'0'0, n, (X)0); } - - void Assembler::add(X d, X n, int imm12) { - this->op(0b1'0'0'10001'00'000000000000, n,d, (imm12 & mask(12)) << 10); - } - void Assembler::sub(X d, X n, int imm12) { - this->op(0b1'1'0'10001'00'000000000000, n,d, (imm12 & mask(12)) << 10); - } - void Assembler::subs(X d, X n, int imm12) { - this->op(0b1'1'1'10001'00'000000000000, n,d, (imm12 & mask(12)) << 10); - } - - void Assembler::add(X d, X n, X m, Shift shift, int imm6) { - SkASSERT(shift != ROR); - - int imm = (imm6 & mask(6)) << 0 - | (m & mask(5)) << 6 - | (0 & mask(1)) << 11 - | (shift & mask(2)) << 12; - this->op(0b1'0'0'01011'00'0'00000'000000, n,d, imm << 10); - } - - void Assembler::b(Condition cond, Label* l) { - const int imm19 = this->disp19(l); - this->op(0b0101010'0'00000000000000, (X)0, (V)cond, (imm19 & mask(19)) << 5); - } - void Assembler::cbz(X t, Label* l) { - const int imm19 = this->disp19(l); - this->op(0b1'011010'0'00000000000000, (X)0, t, (imm19 & mask(19)) << 5); - } - void Assembler::cbnz(X t, Label* l) { - const int imm19 = this->disp19(l); - this->op(0b1'011010'1'00000000000000, (X)0, t, (imm19 & mask(19)) << 5); - } - - void Assembler::ldrd(X dst, X src, int imm12) { - this->op(0b11'111'0'01'01'000000000000, src, dst, (imm12 & mask(12)) << 10); - } - void Assembler::ldrs(X dst, X src, int imm12) { - this->op(0b10'111'0'01'01'000000000000, src, dst, (imm12 & mask(12)) << 10); - } - void Assembler::ldrh(X dst, X src, int imm12) { - this->op(0b01'111'0'01'01'000000000000, src, dst, (imm12 & mask(12)) << 10); - } - void Assembler::ldrb(X dst, X src, int imm12) { - this->op(0b00'111'0'01'01'000000000000, src, dst, (imm12 & mask(12)) << 10); - } - - void Assembler::ldrq(V dst, X src, int imm12) { - this->op(0b00'111'1'01'11'000000000000, src, dst, (imm12 & mask(12)) << 10); - } - void Assembler::ldrd(V dst, X src, int imm12) { - this->op(0b11'111'1'01'01'000000000000, src, dst, (imm12 & mask(12)) << 10); - } - void Assembler::ldrs(V dst, X src, int imm12) { - this->op(0b10'111'1'01'01'000000000000, src, dst, (imm12 & mask(12)) << 10); - } - void Assembler::ldrh(V dst, X src, int imm12) { - this->op(0b01'111'1'01'01'000000000000, src, dst, (imm12 & mask(12)) << 10); - } - void Assembler::ldrb(V dst, X src, int imm12) { - this->op(0b00'111'1'01'01'000000000000, src, dst, (imm12 & mask(12)) << 10); - } - - void Assembler::strs(X src, X dst, int imm12) { - this->op(0b10'111'0'01'00'000000000000, dst, src, (imm12 & mask(12)) << 10); - } - - void Assembler::strq(V src, X dst, int imm12) { - this->op(0b00'111'1'01'10'000000000000, dst, src, (imm12 & mask(12)) << 10); - } - void Assembler::strd(V src, X dst, int imm12) { - this->op(0b11'111'1'01'00'000000000000, dst, src, (imm12 & mask(12)) << 10); - } - void Assembler::strs(V src, X dst, int imm12) { - this->op(0b10'111'1'01'00'000000000000, dst, src, (imm12 & mask(12)) << 10); - } - void Assembler::strh(V src, X dst, int imm12) { - this->op(0b01'111'1'01'00'000000000000, dst, src, (imm12 & mask(12)) << 10); - } - void Assembler::strb(V src, X dst, int imm12) { - this->op(0b00'111'1'01'00'000000000000, dst, src, (imm12 & mask(12)) << 10); - } - - void Assembler::movs(X dst, V src, int lane) { - int imm5 = (lane << 3) | 0b100; - this->op(0b0'0'0'01110000'00000'0'01'1'1'1, src, dst, (imm5 & mask(5)) << 16); - } - void Assembler::inss(V dst, X src, int lane) { - int imm5 = (lane << 3) | 0b100; - this->op(0b0'1'0'01110000'00000'0'0011'1, src, dst, (imm5 & mask(5)) << 16); - } - - - void Assembler::ldrq(V dst, Label* l) { - const int imm19 = this->disp19(l); - this->op(0b10'011'1'00'00000000000000, (V)0, dst, (imm19 & mask(19)) << 5); - } - - void Assembler::dup4s(V dst, X src) { - this->op(0b0'1'0'01110000'00100'0'0001'1, src, dst); - } - - void Assembler::ld1r4s(V dst, X src) { - this->op(0b0'1'0011010'1'0'00000'110'0'10, src, dst); - } - void Assembler::ld1r8h(V dst, X src) { - this->op(0b0'1'0011010'1'0'00000'110'0'01, src, dst); - } - void Assembler::ld1r16b(V dst, X src) { - this->op(0b0'1'0011010'1'0'00000'110'0'00, src, dst); - } - - void Assembler::ld24s(V dst, X src) { this->op(0b0'1'0011000'1'000000'1000'10, src, dst); } - void Assembler::ld44s(V dst, X src) { this->op(0b0'1'0011000'1'000000'0000'10, src, dst); } - void Assembler::st24s(V src, X dst) { this->op(0b0'1'0011000'0'000000'1000'10, dst, src); } - void Assembler::st44s(V src, X dst) { this->op(0b0'1'0011000'0'000000'0000'10, dst, src); } - - void Assembler::ld24s(V dst, X src, int lane) { - int Q = (lane & 2)>>1, - S = (lane & 1); - /* Q S */ - this->op(0b0'0'0011010'1'1'00000'100'0'00, src, dst, (Q<<30)|(S<<12)); - } - void Assembler::ld44s(V dst, X src, int lane) { - int Q = (lane & 2)>>1, - S = (lane & 1); - this->op(0b0'0'0011010'1'1'00000'101'0'00, src, dst, (Q<<30)|(S<<12)); - } - - void Assembler::label(Label* l) { - if (fCode) { - // The instructions all currently point to l->offset. - // We'll want to add a delta to point them to here. - int here = (int)this->size(); - int delta = here - l->offset; - l->offset = here; - - if (l->kind == Label::ARMDisp19) { - for (int ref : l->references) { - // ref points to a 32-bit instruction with 19-bit displacement in instructions. - uint32_t inst; - memcpy(&inst, fCode + ref, 4); - - // [ 8 bits to preserve] [ 19 bit signed displacement ] [ 5 bits to preserve ] - int disp = (int)(inst << 8) >> 13; - - disp += delta/4; // delta is in bytes, we want instructions. - - // Put it all back together, preserving the high 8 bits and low 5. - inst = ((disp << 5) & (mask(19) << 5)) - | ((inst ) & ~(mask(19) << 5)); - memcpy(fCode + ref, &inst, 4); - } - } - - if (l->kind == Label::X86Disp32) { - for (int ref : l->references) { - // ref points to a 32-bit displacement in bytes. - int disp; - memcpy(&disp, fCode + ref, 4); - - disp += delta; - - memcpy(fCode + ref, &disp, 4); - } - } - } - } - - void Program::eval(int n, void* args[]) const { - #define SKVM_JIT_STATS 0 - #if SKVM_JIT_STATS - static std::atomic calls{0}, jits{0}, - pixels{0}, fast{0}; - pixels += n; - if (0 == calls++) { - atexit([]{ - int64_t num = jits .load(), - den = calls.load(); - SkDebugf("%.3g%% of %lld eval() calls went through JIT.\n", (100.0 * num)/den, den); - num = fast .load(); - den = pixels.load(); - SkDebugf("%.3g%% of %lld pixels went through JIT.\n", (100.0 * num)/den, den); - }); - } - #endif - - #if !defined(SKVM_JIT_BUT_IGNORE_IT) - const void* jit_entry = fImpl->jit_entry.load(); - // jit_entry may be null if we can't JIT - // - // Ordinarily we'd never find ourselves with non-null jit_entry and !gSkVMAllowJIT, but it - // can happen during interactive programs like Viewer that toggle gSkVMAllowJIT on and off, - // due to timing or program caching. - if (jit_entry != nullptr && gSkVMAllowJIT) { - #if SKVM_JIT_STATS - jits++; - fast += n; - #endif - void** a = args; - switch (fImpl->strides.size()) { - case 0: return ((void(*)(int ))jit_entry)(n ); - case 1: return ((void(*)(int,void* ))jit_entry)(n,a[0] ); - case 2: return ((void(*)(int,void*,void* ))jit_entry)(n,a[0],a[1] ); - case 3: return ((void(*)(int,void*,void*,void* ))jit_entry)(n,a[0],a[1],a[2]); - case 4: return ((void(*)(int,void*,void*,void*,void*))jit_entry) - (n,a[0],a[1],a[2],a[3]); - case 5: return ((void(*)(int,void*,void*,void*,void*,void*))jit_entry) - (n,a[0],a[1],a[2],a[3],a[4]); - case 6: return ((void(*)(int,void*,void*,void*,void*,void*,void*))jit_entry) - (n,a[0],a[1],a[2],a[3],a[4],a[5]); - case 7: return ((void(*)(int,void*,void*,void*,void*,void*,void*,void*))jit_entry) - (n,a[0],a[1],a[2],a[3],a[4],a[5],a[6]); - default: break; //SkASSERT(fImpl->strides.size() <= 7); - } - } - #endif - - // So we'll sometimes use the interpreter here even if later calls will use the JIT. - SkOpts::interpret_skvm(fImpl->instructions.data(), (int)fImpl->instructions.size(), - this->nregs(), this->loop(), fImpl->strides.data(), - fImpl->traceHooks.data(), fImpl->traceHooks.size(), - this->nargs(), n, args); - } - - bool Program::hasTraceHooks() const { - // Identifies a program which has been instrumented for debugging. - return !fImpl->traceHooks.empty(); - } - - bool Program::hasJIT() const { - return fImpl->jit_entry.load() != nullptr; - } - - void Program::dropJIT() { - #if defined(SKVM_JIT) - if (fImpl->dylib) { - close_dylib(fImpl->dylib); - } else if (auto jit_entry = fImpl->jit_entry.load()) { - unmap_jit_buffer(jit_entry, fImpl->jit_size); - } - #else - SkASSERT(!this->hasJIT()); - #endif - - fImpl->jit_entry.store(nullptr); - fImpl->jit_size = 0; - fImpl->dylib = nullptr; - } - - Program::Program() : fImpl(std::make_unique()) {} - - Program::~Program() { - // Moved-from Programs may have fImpl == nullptr. - if (fImpl) { - this->dropJIT(); - } - } - - Program::Program(Program&& other) : fImpl(std::move(other.fImpl)) {} - - Program& Program::operator=(Program&& other) { - fImpl = std::move(other.fImpl); - return *this; - } - - Program::Program(const std::vector& instructions, - const std::vector& strides, - const std::vector& traceHooks, - const char* debug_name, bool allow_jit) : Program() { - fImpl->strides = strides; - fImpl->traceHooks = traceHooks; - if (gSkVMAllowJIT && allow_jit) { - #if defined(SKVM_JIT) - this->setupJIT(instructions, debug_name); - #endif - } - - this->setupInterpreter(instructions); - } - - std::vector Program::instructions() const { return fImpl->instructions; } - int Program::nargs() const { return (int)fImpl->strides.size(); } - int Program::nregs() const { return fImpl->regs; } - int Program::loop () const { return fImpl->loop; } - bool Program::empty() const { return fImpl->instructions.empty(); } - - // Translate OptimizedInstructions to InterpreterInstructions. - void Program::setupInterpreter(const std::vector& instructions) { - // Register each instruction is assigned to. - std::vector reg(instructions.size()); - - // This next bit is a bit more complicated than strictly necessary; - // we could just assign every instruction to its own register. - // - // But recycling registers is fairly cheap, and good practice for the - // JITs where minimizing register pressure really is important. - // - // We have effectively infinite registers, so we hoist any value we can. - // (The JIT may choose a more complex policy to reduce register pressure.) - - fImpl->regs = 0; - std::vector avail; - - // Assign this value to a register, recycling them where we can. - auto assign_register = [&](Val id) { - const OptimizedInstruction& inst = instructions[id]; - - // If this is a real input and it's lifetime ends at this instruction, - // we can recycle the register it's occupying. - auto maybe_recycle_register = [&](Val input) { - if (input != NA && instructions[input].death == id) { - avail.push_back(reg[input]); - } - }; - - // Take care to not recycle the same register twice. - const Val x = inst.x, y = inst.y, z = inst.z, w = inst.w; - if (true ) { maybe_recycle_register(x); } - if (y != x ) { maybe_recycle_register(y); } - if (z != x && z != y ) { maybe_recycle_register(z); } - if (w != x && w != y && w != z) { maybe_recycle_register(w); } - - // Instructions that die at themselves (stores) don't need a register. - if (inst.death != id) { - // Allocate a register if we have to, preferring to reuse anything available. - if (avail.empty()) { - reg[id] = fImpl->regs++; - } else { - reg[id] = avail.back(); - avail.pop_back(); - } - } - }; - - // Assign a register to each hoisted instruction, then each non-hoisted loop instruction. - for (Val id = 0; id < (Val)instructions.size(); id++) { - if ( instructions[id].can_hoist) { assign_register(id); } - } - for (Val id = 0; id < (Val)instructions.size(); id++) { - if (!instructions[id].can_hoist) { assign_register(id); } - } - - // Translate OptimizedInstructions to InterpreterIstructions by mapping values to - // registers. This will be two passes, first hoisted instructions, then inside the loop. - - // The loop begins at the fImpl->loop'th Instruction. - fImpl->loop = 0; - fImpl->instructions.reserve(instructions.size()); - - // Add a mapping for the N/A sentinel Val to any arbitrary register - // so lookups don't have to know which arguments are used by which Ops. - auto lookup_register = [&](Val id) { - return id == NA ? (Reg)0 - : reg[id]; - }; - - auto push_instruction = [&](Val id, const OptimizedInstruction& inst) { - InterpreterInstruction pinst{ - inst.op, - lookup_register(id), - lookup_register(inst.x), - lookup_register(inst.y), - lookup_register(inst.z), - lookup_register(inst.w), - inst.immA, - inst.immB, - inst.immC, - }; - fImpl->instructions.push_back(pinst); - }; - - for (Val id = 0; id < (Val)instructions.size(); id++) { - const OptimizedInstruction& inst = instructions[id]; - if (inst.can_hoist) { - push_instruction(id, inst); - fImpl->loop++; - } - } - for (Val id = 0; id < (Val)instructions.size(); id++) { - const OptimizedInstruction& inst = instructions[id]; - if (!inst.can_hoist) { - push_instruction(id, inst); - } - } - } - -#if defined(SKVM_JIT) - - namespace SkVMJitTypes { - #if defined(__x86_64__) || defined(_M_X64) - using Reg = Assembler::Ymm; - #elif defined(__aarch64__) - using Reg = Assembler::V; - #endif - } // namespace SkVMJitTypes - - bool Program::jit(const std::vector& instructions, - int* stack_hint, - uint32_t* registers_used, - Assembler* a) const { - using A = Assembler; - using SkVMJitTypes::Reg; - - THashMap constants; // Constants (mostly splats) share the same pool. - A::Label iota; // Varies per lane, for Op::index. - A::Label load64_index; // Used to load low or high half of 64-bit lanes. - - // The `regs` array tracks everything we know about each register's state: - // - NA: empty - // - RES: reserved by ABI - // - TMP: holding a temporary - // - id: holding Val id - constexpr Val RES = NA-1, - TMP = RES-1; - - // Map val -> stack slot. - std::vector stack_slot(instructions.size(), NA); - int next_stack_slot = 0; - - const int nstack_slots = *stack_hint >= 0 ? *stack_hint - : stack_slot.size(); - #if defined(__x86_64__) || defined(_M_X64) - if (!SkCpu::Supports(SkCpu::HSW)) { - return false; - } - const int K = 8; - #if defined(_M_X64) // Important to check this first; clang-cl defines both. - const A::GP64 N = A::rcx, - GP0 = A::rax, - GP1 = A::r11, - arg[] = { A::rdx, A::r8, A::r9, A::r10, A::rdi, A::rsi }; - - // xmm6-15 need are callee-saved. - std::array regs = { - NA, NA, NA, NA, NA, NA,RES,RES, - RES,RES,RES,RES, RES,RES,RES,RES, - }; - const uint32_t incoming_registers_used = *registers_used; - - auto enter = [&]{ - // rcx,rdx,r8,r9 are all already holding their correct values. - // Load caller-saved r10 from rsp+40 if there's a fourth arg. - if (fImpl->strides.size() >= 4) { - a->mov(A::r10, A::Mem{A::rsp, 40}); - } - // Load callee-saved rdi from rsp+48 if there's a fifth arg, - // first saving it to ABI reserved shadow area rsp+8. - if (fImpl->strides.size() >= 5) { - a->mov(A::Mem{A::rsp, 8}, A::rdi); - a->mov(A::rdi, A::Mem{A::rsp, 48}); - } - // Load callee-saved rsi from rsp+56 if there's a sixth arg, - // first saving it to ABI reserved shadow area rsp+16. - if (fImpl->strides.size() >= 6) { - a->mov(A::Mem{A::rsp, 16}, A::rsi); - a->mov(A::rsi, A::Mem{A::rsp, 56}); - } - - // Allocate stack for our values and callee-saved xmm6-15. - int stack_needed = nstack_slots*K*4; - for (int r = 6; r < 16; r++) { - if (incoming_registers_used & (1<sub(A::rsp, stack_needed); } - - int next_saved_xmm = nstack_slots*K*4; - for (int r = 6; r < 16; r++) { - if (incoming_registers_used & (1<vmovups(A::Mem{A::rsp, next_saved_xmm}, (A::Xmm)r); - next_saved_xmm += 16; - regs[r] = NA; - } - } - }; - auto exit = [&]{ - // The second pass of jit() shouldn't use any register it didn't in the first pass. - SkASSERT((*registers_used & incoming_registers_used) == *registers_used); - - // Restore callee-saved xmm6-15 and the stack pointer. - int stack_used = nstack_slots*K*4; - for (int r = 6; r < 16; r++) { - if (incoming_registers_used & (1<vmovups((A::Xmm)r, A::Mem{A::rsp, stack_used}); - stack_used += 16; - } - } - if (stack_used) { a->add(A::rsp, stack_used); } - - // Restore callee-saved rdi/rsi if we used them. - if (fImpl->strides.size() >= 5) { - a->mov(A::rdi, A::Mem{A::rsp, 8}); - } - if (fImpl->strides.size() >= 6) { - a->mov(A::rsi, A::Mem{A::rsp, 16}); - } - - a->vzeroupper(); - a->ret(); - }; - #elif defined(__x86_64__) - const A::GP64 N = A::rdi, - GP0 = A::rax, - GP1 = A::r11, - arg[] = { A::rsi, A::rdx, A::rcx, A::r8, A::r9, A::r10 }; - - // All 16 ymm registers are available to use. - std::array regs = { - NA,NA,NA,NA, NA,NA,NA,NA, - NA,NA,NA,NA, NA,NA,NA,NA, - }; - - auto enter = [&]{ - // Load caller-saved r10 from rsp+8 if there's a sixth arg. - if (fImpl->strides.size() >= 6) { - a->mov(A::r10, A::Mem{A::rsp, 8}); - } - if (nstack_slots) { a->sub(A::rsp, nstack_slots*K*4); } - }; - auto exit = [&]{ - if (nstack_slots) { a->add(A::rsp, nstack_slots*K*4); } - a->vzeroupper(); - a->ret(); - }; - #endif - - auto load_from_memory = [&](Reg r, Val v) { - if (instructions[v].op == Op::splat) { - if (instructions[v].immA == 0) { - a->vpxor(r,r,r); - } else { - a->vmovups(r, constants.find(instructions[v].immA)); - } - } else { - SkASSERT(stack_slot[v] != NA); - a->vmovups(r, A::Mem{A::rsp, stack_slot[v]*K*4}); - } - }; - auto store_to_stack = [&](Reg r, Val v) { - SkASSERT(next_stack_slot < nstack_slots); - stack_slot[v] = next_stack_slot++; - a->vmovups(A::Mem{A::rsp, stack_slot[v]*K*4}, r); - }; - #elif defined(__aarch64__) - const int K = 4; - const A::X N = A::x0, - GP0 = A::x8, - GP1 = A::x9, - arg[] = { A::x1, A::x2, A::x3, A::x4, A::x5, A::x6, A::x7 }; - - // We can use v0-v7 and v16-v31 freely; we'd need to preserve v8-v15 in enter/exit. - std::array regs = { - NA, NA, NA, NA, NA, NA, NA, NA, - RES,RES,RES,RES, RES,RES,RES,RES, - NA, NA, NA, NA, NA, NA, NA, NA, - NA, NA, NA, NA, NA, NA, NA, NA, - }; - - auto enter = [&]{ if (nstack_slots) { a->sub(A::sp, A::sp, nstack_slots*K*4); } }; - auto exit = [&]{ if (nstack_slots) { a->add(A::sp, A::sp, nstack_slots*K*4); } - a->ret(A::x30); }; - - auto load_from_memory = [&](Reg r, Val v) { - if (instructions[v].op == Op::splat) { - if (instructions[v].immA == 0) { - a->eor16b(r,r,r); - } else { - a->ldrq(r, constants.find(instructions[v].immA)); - } - } else { - SkASSERT(stack_slot[v] != NA); - a->ldrq(r, A::sp, stack_slot[v]); - } - }; - auto store_to_stack = [&](Reg r, Val v) { - SkASSERT(next_stack_slot < nstack_slots); - stack_slot[v] = next_stack_slot++; - a->strq(r, A::sp, stack_slot[v]); - }; - #endif - - *registers_used = 0; // We'll update this as we go. - - if (std::size(arg) < fImpl->strides.size()) { - return false; - } - - auto emit = [&](Val id, bool scalar) { - const int active_lanes = scalar ? 1 : K; - const OptimizedInstruction& inst = instructions[id]; - const Op op = inst.op; - const Val x = inst.x, - y = inst.y, - z = inst.z, - w = inst.w; - const int immA = inst.immA, - immB = inst.immB, - immC = inst.immC; - - // alloc_tmp() returns the first of N adjacent temporary registers, - // each freed manually with free_tmp() or noted as our result with mark_tmp_as_dst(). - auto alloc_tmp = [&](int N=1) -> Reg { - auto needs_spill = [&](Val v) -> bool { - SkASSERT(v >= 0); // {NA,TMP,RES} need to be handled before calling this. - return stack_slot[v] == NA // We haven't spilled it already? - && instructions[v].op != Op::splat; // No need to spill constants. - }; - - // We want to find a block of N adjacent registers requiring the fewest spills. - int best_block = -1, - min_spills = 0x7fff'ffff; - for (int block = 0; block+N <= (int)regs.size(); block++) { - int spills = 0; - for (int r = block; r < block+N; r++) { - Val v = regs[r]; - // Registers holding NA (nothing) are ideal, nothing to spill. - if (v == NA) { - continue; - } - // We can't spill anything REServed or that we'll need this instruction. - if (v == RES || - v == TMP || v == id || v == x || v == y || v == z || v == w) { - spills = 0x7fff'ffff; - block = r; // (optimization) continue outer loop at next register. - break; - } - // Usually here we've got a value v that we'd have to spill to the stack - // before reusing its register, but sometimes even now we get a freebie. - spills += needs_spill(v) ? 1 : 0; - } - - // TODO: non-arbitrary tie-breaking? - if (min_spills > spills) { - min_spills = spills; - best_block = block; - } - if (min_spills == 0) { - break; // (optimization) stop early if we find an unbeatable block. - } - } - - // TODO: our search's success isn't obviously guaranteed... it depends on N - // and the number and relative position in regs of any unspillable values. - // I think we should be able to get away with N≤2 on x86-64 and N≤4 on arm64; - // we'll need to revisit this logic should this assert fire. - SkASSERT(min_spills <= N); - - // Spill what needs spilling, and mark the block all as TMP. - for (int r = best_block; r < best_block+N; r++) { - Val& v = regs[r]; - *registers_used |= (1<= 0); - if (v >= 0 && needs_spill(v)) { - store_to_stack((Reg)r, v); - SkASSERT(!needs_spill(v)); - min_spills--; - } - - v = TMP; - } - SkASSERT(min_spills == 0); - return (Reg)best_block; - }; - - auto free_tmp = [&](Reg r) { - SkASSERT(regs[r] == TMP); - regs[r] = NA; - }; - - // Which register holds dst,x,y,z,w for this instruction? NA if none does yet. - int rd = NA, - rx = NA, - ry = NA, - rz = NA, - rw = NA; - - auto update_regs = [&](Reg r, Val v) { - if (v == id) { rd = r; } - if (v == x) { rx = r; } - if (v == y) { ry = r; } - if (v == z) { rz = r; } - if (v == w) { rw = r; } - return r; - }; - - auto find_existing_reg = [&](Val v) -> int { - // Quick-check our working registers. - if (v == id && rd != NA) { return rd; } - if (v == x && rx != NA) { return rx; } - if (v == y && ry != NA) { return ry; } - if (v == z && rz != NA) { return rz; } - if (v == w && rw != NA) { return rw; } - - // Search inter-instruction register map. - for (auto [r,val] : SkMakeEnumerate(regs)) { - if (val == v) { - return update_regs((Reg)r, v); - } - } - return NA; - }; - - // Return a register for Val, holding that value if it already exists. - // During this instruction all calls to r(v) will return the same register. - auto r = [&](Val v) -> Reg { - SkASSERT(v >= 0); - - if (int found = find_existing_reg(v); found != NA) { - return (Reg)found; - } - - Reg r = alloc_tmp(); - SkASSERT(regs[r] == TMP); - - SkASSERT(v <= id); - if (v < id) { - // If v < id, we're loading one of this instruction's inputs. - // If v == id we're just allocating its destination register. - load_from_memory(r, v); - } - regs[r] = v; - return update_regs(r, v); - }; - - auto dies_here = [&](Val v) -> bool { - SkASSERT(v >= 0); - return instructions[v].death == id; - }; - - // Alias dst() to r(v) if dies_here(v). - auto try_alias = [&](Val v) -> bool { - SkASSERT(v == x || v == y || v == z || v == w); - if (dies_here(v)) { - rd = r(v); // Vals v and id share a register for this instruction. - regs[rd] = id; // Next instruction, Val id will be in the register, not Val v. - return true; - } - return false; - }; - - // Generally r(id), - // but with a hint, try to alias dst() to r(v) if dies_here(v). - auto dst = [&](Val hint1 = NA, Val hint2 = NA) -> Reg { - if (hint1 != NA && try_alias(hint1)) { return r(id); } - if (hint2 != NA && try_alias(hint2)) { return r(id); } - return r(id); - }; - - #if defined(__aarch64__) // Nothing sneaky, just unused on x86-64. - auto mark_tmp_as_dst = [&](Reg tmp) { - SkASSERT(regs[tmp] == TMP); - rd = tmp; - regs[rd] = id; - SkASSERT(dst() == tmp); - }; - #endif - - #if defined(__x86_64__) || defined(_M_X64) - // On x86 we can work with many values directly from the stack or program constant pool. - auto any = [&](Val v) -> A::Operand { - SkASSERT(v >= 0); - SkASSERT(v < id); - - if (int found = find_existing_reg(v); found != NA) { - return (Reg)found; - } - if (instructions[v].op == Op::splat) { - return constants.find(instructions[v].immA); - } - return A::Mem{A::rsp, stack_slot[v]*K*4}; - }; - - // This is never really worth asking except when any() might be used; - // if we need this value in ARM, might as well just call r(v) to get it into a register. - auto in_reg = [&](Val v) -> bool { - return find_existing_reg(v) != NA; - }; - #endif - - switch (op) { - // Make sure splat constants can be found by load_from_memory() or any(). - case Op::splat: - (void)constants[immA]; - break; - - #if defined(__x86_64__) || defined(_M_X64) - case Op::assert_true: { - a->vptest (r(x), &constants[0xffffffff]); - A::Label all_true; - a->jc(&all_true); - a->int3(); - a->label(&all_true); - } break; - - case Op::trace_line: - case Op::trace_var: - case Op::trace_enter: - case Op::trace_exit: - case Op::trace_scope: - /* Force this program to run in the interpreter. */ - return false; - - case Op::store8: - if (scalar) { - a->vpextrb(A::Mem{arg[immA]}, (A::Xmm)r(x), 0); - } else { - a->vpackusdw(dst(x), r(x), r(x)); - a->vpermq (dst(), dst(), 0xd8); - a->vpackuswb(dst(), dst(), dst()); - a->vmovq (A::Mem{arg[immA]}, (A::Xmm)dst()); - } break; - - case Op::store16: - if (scalar) { - a->vpextrw(A::Mem{arg[immA]}, (A::Xmm)r(x), 0); - } else { - a->vpackusdw(dst(x), r(x), r(x)); - a->vpermq (dst(), dst(), 0xd8); - a->vmovups (A::Mem{arg[immA]}, (A::Xmm)dst()); - } break; - - case Op::store32: if (scalar) { a->vmovd (A::Mem{arg[immA]}, (A::Xmm)r(x)); } - else { a->vmovups(A::Mem{arg[immA]}, r(x)); } - break; - - case Op::store64: if (scalar) { - a->vmovd(A::Mem{arg[immA],0}, (A::Xmm)r(x)); - a->vmovd(A::Mem{arg[immA],4}, (A::Xmm)r(y)); - } else { - // r(x) = {a,b,c,d|e,f,g,h} - // r(y) = {i,j,k,l|m,n,o,p} - // We want to write a,i,b,j,c,k,d,l,e,m... - A::Ymm L = alloc_tmp(), - H = alloc_tmp(); - a->vpunpckldq(L, r(x), any(y)); // L = {a,i,b,j|e,m,f,n} - a->vpunpckhdq(H, r(x), any(y)); // H = {c,k,d,l|g,o,h,p} - a->vperm2f128(dst(), L,H, 0x20); // = {a,i,b,j|c,k,d,l} - a->vmovups(A::Mem{arg[immA], 0}, dst()); - a->vperm2f128(dst(), L,H, 0x31); // = {e,m,f,n|g,o,h,p} - a->vmovups(A::Mem{arg[immA],32}, dst()); - free_tmp(L); - free_tmp(H); - } break; - - case Op::store128: { - // TODO: >32-bit stores - a->vmovd (A::Mem{arg[immA], 0*16 + 0}, (A::Xmm)r(x) ); - a->vmovd (A::Mem{arg[immA], 0*16 + 4}, (A::Xmm)r(y) ); - a->vmovd (A::Mem{arg[immA], 0*16 + 8}, (A::Xmm)r(z) ); - a->vmovd (A::Mem{arg[immA], 0*16 + 12}, (A::Xmm)r(w) ); - if (scalar) { break; } - - a->vpextrd(A::Mem{arg[immA], 1*16 + 0}, (A::Xmm)r(x), 1); - a->vpextrd(A::Mem{arg[immA], 1*16 + 4}, (A::Xmm)r(y), 1); - a->vpextrd(A::Mem{arg[immA], 1*16 + 8}, (A::Xmm)r(z), 1); - a->vpextrd(A::Mem{arg[immA], 1*16 + 12}, (A::Xmm)r(w), 1); - - a->vpextrd(A::Mem{arg[immA], 2*16 + 0}, (A::Xmm)r(x), 2); - a->vpextrd(A::Mem{arg[immA], 2*16 + 4}, (A::Xmm)r(y), 2); - a->vpextrd(A::Mem{arg[immA], 2*16 + 8}, (A::Xmm)r(z), 2); - a->vpextrd(A::Mem{arg[immA], 2*16 + 12}, (A::Xmm)r(w), 2); - - a->vpextrd(A::Mem{arg[immA], 3*16 + 0}, (A::Xmm)r(x), 3); - a->vpextrd(A::Mem{arg[immA], 3*16 + 4}, (A::Xmm)r(y), 3); - a->vpextrd(A::Mem{arg[immA], 3*16 + 8}, (A::Xmm)r(z), 3); - a->vpextrd(A::Mem{arg[immA], 3*16 + 12}, (A::Xmm)r(w), 3); - // Now we need to store the upper 128 bits of x,y,z,w. - // Storing in this order rather than interlacing minimizes temporaries. - a->vextracti128(dst(), r(x), 1); - a->vmovd (A::Mem{arg[immA], 4*16 + 0}, (A::Xmm)dst() ); - a->vpextrd(A::Mem{arg[immA], 5*16 + 0}, (A::Xmm)dst(), 1); - a->vpextrd(A::Mem{arg[immA], 6*16 + 0}, (A::Xmm)dst(), 2); - a->vpextrd(A::Mem{arg[immA], 7*16 + 0}, (A::Xmm)dst(), 3); - - a->vextracti128(dst(), r(y), 1); - a->vmovd (A::Mem{arg[immA], 4*16 + 4}, (A::Xmm)dst() ); - a->vpextrd(A::Mem{arg[immA], 5*16 + 4}, (A::Xmm)dst(), 1); - a->vpextrd(A::Mem{arg[immA], 6*16 + 4}, (A::Xmm)dst(), 2); - a->vpextrd(A::Mem{arg[immA], 7*16 + 4}, (A::Xmm)dst(), 3); - - a->vextracti128(dst(), r(z), 1); - a->vmovd (A::Mem{arg[immA], 4*16 + 8}, (A::Xmm)dst() ); - a->vpextrd(A::Mem{arg[immA], 5*16 + 8}, (A::Xmm)dst(), 1); - a->vpextrd(A::Mem{arg[immA], 6*16 + 8}, (A::Xmm)dst(), 2); - a->vpextrd(A::Mem{arg[immA], 7*16 + 8}, (A::Xmm)dst(), 3); - - a->vextracti128(dst(), r(w), 1); - a->vmovd (A::Mem{arg[immA], 4*16 + 12}, (A::Xmm)dst() ); - a->vpextrd(A::Mem{arg[immA], 5*16 + 12}, (A::Xmm)dst(), 1); - a->vpextrd(A::Mem{arg[immA], 6*16 + 12}, (A::Xmm)dst(), 2); - a->vpextrd(A::Mem{arg[immA], 7*16 + 12}, (A::Xmm)dst(), 3); - } break; - - case Op::load8: if (scalar) { - a->vpxor (dst(), dst(), dst()); - a->vpinsrb((A::Xmm)dst(), (A::Xmm)dst(), A::Mem{arg[immA]}, 0); - } else { - a->vpmovzxbd(dst(), A::Mem{arg[immA]}); - } break; - - case Op::load16: if (scalar) { - a->vpxor (dst(), dst(), dst()); - a->vpinsrw((A::Xmm)dst(), (A::Xmm)dst(), A::Mem{arg[immA]}, 0); - } else { - a->vpmovzxwd(dst(), A::Mem{arg[immA]}); - } break; - - case Op::load32: if (scalar) { a->vmovd ((A::Xmm)dst(), A::Mem{arg[immA]}); } - else { a->vmovups( dst(), A::Mem{arg[immA]}); } - break; - - case Op::load64: if (scalar) { - a->vmovd((A::Xmm)dst(), A::Mem{arg[immA], 4*immB}); - } else { - A::Ymm tmp = alloc_tmp(); - a->vmovups(tmp, &load64_index); - a->vpermps(dst(), tmp, A::Mem{arg[immA], 0}); - a->vpermps( tmp, tmp, A::Mem{arg[immA], 32}); - // Low 128 bits holds immB=0 lanes, high 128 bits holds immB=1. - a->vperm2f128(dst(), dst(),tmp, immB ? 0x31 : 0x20); - free_tmp(tmp); - } break; - - case Op::load128: if (scalar) { - a->vmovd((A::Xmm)dst(), A::Mem{arg[immA], 4*immB}); - } else { - // Load 4 low values into xmm tmp, - A::Ymm tmp = alloc_tmp(); - A::Xmm t = (A::Xmm)tmp; - a->vmovd (t, A::Mem{arg[immA], 0*16 + 4*immB} ); - a->vpinsrd(t,t, A::Mem{arg[immA], 1*16 + 4*immB}, 1); - a->vpinsrd(t,t, A::Mem{arg[immA], 2*16 + 4*immB}, 2); - a->vpinsrd(t,t, A::Mem{arg[immA], 3*16 + 4*immB}, 3); - - // Load 4 high values into xmm dst(), - A::Xmm d = (A::Xmm)dst(); - a->vmovd (d, A::Mem{arg[immA], 4*16 + 4*immB} ); - a->vpinsrd(d,d, A::Mem{arg[immA], 5*16 + 4*immB}, 1); - a->vpinsrd(d,d, A::Mem{arg[immA], 6*16 + 4*immB}, 2); - a->vpinsrd(d,d, A::Mem{arg[immA], 7*16 + 4*immB}, 3); - - // Merge the two, ymm dst() = {xmm tmp|xmm dst()} - a->vperm2f128(dst(), tmp,dst(), 0x20); - free_tmp(tmp); - } break; - - case Op::gather8: { - // As usual, the gather base pointer is immB bytes off of uniform immA. - a->mov(GP0, A::Mem{arg[immA], immB}); - - A::Ymm tmp = alloc_tmp(); - a->vmovups(tmp, any(x)); - - for (int i = 0; i < active_lanes; i++) { - if (i == 4) { - // vpextrd can only pluck indices out from an Xmm register, - // so we manually swap over to the top when we're halfway through. - a->vextracti128((A::Xmm)tmp, tmp, 1); - } - a->vpextrd(GP1, (A::Xmm)tmp, i%4); - a->vpinsrb((A::Xmm)dst(), (A::Xmm)dst(), A::Mem{GP0,0,GP1,A::ONE}, i); - } - a->vpmovzxbd(dst(), dst()); - free_tmp(tmp); - } break; - - case Op::gather16: { - // Just as gather8 except vpinsrb->vpinsrw, ONE->TWO, and vpmovzxbd->vpmovzxwd. - a->mov(GP0, A::Mem{arg[immA], immB}); - - A::Ymm tmp = alloc_tmp(); - a->vmovups(tmp, any(x)); - - for (int i = 0; i < active_lanes; i++) { - if (i == 4) { - a->vextracti128((A::Xmm)tmp, tmp, 1); - } - a->vpextrd(GP1, (A::Xmm)tmp, i%4); - a->vpinsrw((A::Xmm)dst(), (A::Xmm)dst(), A::Mem{GP0,0,GP1,A::TWO}, i); - } - a->vpmovzxwd(dst(), dst()); - free_tmp(tmp); - } break; - - case Op::gather32: - if (scalar) { - // Our gather base pointer is immB bytes off of uniform immA. - a->mov(GP0, A::Mem{arg[immA], immB}); - - // Grab our index from lane 0 of the index argument. - a->vmovd(GP1, (A::Xmm)r(x)); - - // dst = *(base + 4*index) - a->vmovd((A::Xmm)dst(x), A::Mem{GP0, 0, GP1, A::FOUR}); - } else { - a->mov(GP0, A::Mem{arg[immA], immB}); - - A::Ymm mask = alloc_tmp(); - a->vpcmpeqd(mask, mask, mask); // (All lanes enabled.) - - a->vgatherdps(dst(), A::FOUR, r(x), GP0, mask); - free_tmp(mask); - } - break; - - case Op::uniform32: a->vbroadcastss(dst(), A::Mem{arg[immA], immB}); - break; - - case Op::array32: a->mov(GP0, A::Mem{arg[immA], immB}); - a->vbroadcastss(dst(), A::Mem{GP0, immC}); - break; - - case Op::index: a->vmovd((A::Xmm)dst(), N); - a->vbroadcastss(dst(), dst()); - a->vpsubd(dst(), dst(), &iota); - break; - - // We can swap the arguments of symmetric instructions to make better use of any(). - case Op::add_f32: - if (in_reg(x)) { a->vaddps(dst(x), r(x), any(y)); } - else { a->vaddps(dst(y), r(y), any(x)); } - break; - - case Op::mul_f32: - if (in_reg(x)) { a->vmulps(dst(x), r(x), any(y)); } - else { a->vmulps(dst(y), r(y), any(x)); } - break; - - case Op::sub_f32: a->vsubps(dst(x), r(x), any(y)); break; - case Op::div_f32: a->vdivps(dst(x), r(x), any(y)); break; - case Op::min_f32: a->vminps(dst(y), r(y), any(x)); break; // Order matters, - case Op::max_f32: a->vmaxps(dst(y), r(y), any(x)); break; // see test SkVM_min_max. - - case Op::fma_f32: - if (try_alias(x)) { a->vfmadd132ps(dst(x), r(z), any(y)); } else - if (try_alias(y)) { a->vfmadd213ps(dst(y), r(x), any(z)); } else - if (try_alias(z)) { a->vfmadd231ps(dst(z), r(x), any(y)); } else - { a->vmovups (dst(), any(x)); - a->vfmadd132ps(dst(), r(z), any(y)); } - break; - - case Op::fms_f32: - if (try_alias(x)) { a->vfmsub132ps(dst(x), r(z), any(y)); } else - if (try_alias(y)) { a->vfmsub213ps(dst(y), r(x), any(z)); } else - if (try_alias(z)) { a->vfmsub231ps(dst(z), r(x), any(y)); } else - { a->vmovups (dst(), any(x)); - a->vfmsub132ps(dst(), r(z), any(y)); } - break; - - case Op::fnma_f32: - if (try_alias(x)) { a->vfnmadd132ps(dst(x), r(z), any(y)); } else - if (try_alias(y)) { a->vfnmadd213ps(dst(y), r(x), any(z)); } else - if (try_alias(z)) { a->vfnmadd231ps(dst(z), r(x), any(y)); } else - { a->vmovups (dst(), any(x)); - a->vfnmadd132ps(dst(), r(z), any(y)); } - break; - - // In situations like this we want to try aliasing dst(x) when x is - // already in a register, but not if we'd have to load it from the stack - // just to alias it. That's done better directly into the new register. - case Op::sqrt_f32: - if (in_reg(x)) { a->vsqrtps(dst(x), r(x)); } - else { a->vsqrtps(dst(), any(x)); } - break; - - case Op::add_i32: - if (in_reg(x)) { a->vpaddd(dst(x), r(x), any(y)); } - else { a->vpaddd(dst(y), r(y), any(x)); } - break; - - case Op::mul_i32: - if (in_reg(x)) { a->vpmulld(dst(x), r(x), any(y)); } - else { a->vpmulld(dst(y), r(y), any(x)); } - break; - - case Op::sub_i32: a->vpsubd(dst(x), r(x), any(y)); break; - - case Op::bit_and: - if (in_reg(x)) { a->vpand(dst(x), r(x), any(y)); } - else { a->vpand(dst(y), r(y), any(x)); } - break; - case Op::bit_or: - if (in_reg(x)) { a->vpor(dst(x), r(x), any(y)); } - else { a->vpor(dst(y), r(y), any(x)); } - break; - case Op::bit_xor: - if (in_reg(x)) { a->vpxor(dst(x), r(x), any(y)); } - else { a->vpxor(dst(y), r(y), any(x)); } - break; - - case Op::bit_clear: a->vpandn(dst(y), r(y), any(x)); break; // Notice, y then x. - - case Op::select: - if (try_alias(z)) { a->vpblendvb(dst(z), r(z), any(y), r(x)); } - else { a->vpblendvb(dst(x), r(z), any(y), r(x)); } - break; - - case Op::shl_i32: a->vpslld(dst(x), r(x), immA); break; - case Op::shr_i32: a->vpsrld(dst(x), r(x), immA); break; - case Op::sra_i32: a->vpsrad(dst(x), r(x), immA); break; - - case Op::eq_i32: - if (in_reg(x)) { a->vpcmpeqd(dst(x), r(x), any(y)); } - else { a->vpcmpeqd(dst(y), r(y), any(x)); } - break; - - case Op::gt_i32: a->vpcmpgtd(dst(), r(x), any(y)); break; - - case Op::eq_f32: - if (in_reg(x)) { a->vcmpeqps(dst(x), r(x), any(y)); } - else { a->vcmpeqps(dst(y), r(y), any(x)); } - break; - case Op::neq_f32: - if (in_reg(x)) { a->vcmpneqps(dst(x), r(x), any(y)); } - else { a->vcmpneqps(dst(y), r(y), any(x)); } - break; - - case Op:: gt_f32: a->vcmpltps (dst(y), r(y), any(x)); break; - case Op::gte_f32: a->vcmpleps (dst(y), r(y), any(x)); break; - - case Op::ceil: - if (in_reg(x)) { a->vroundps(dst(x), r(x), Assembler::CEIL); } - else { a->vroundps(dst(), any(x), Assembler::CEIL); } - break; - - case Op::floor: - if (in_reg(x)) { a->vroundps(dst(x), r(x), Assembler::FLOOR); } - else { a->vroundps(dst(), any(x), Assembler::FLOOR); } - break; - - case Op::to_f32: - if (in_reg(x)) { a->vcvtdq2ps(dst(x), r(x)); } - else { a->vcvtdq2ps(dst(), any(x)); } - break; - - case Op::trunc: - if (in_reg(x)) { a->vcvttps2dq(dst(x), r(x)); } - else { a->vcvttps2dq(dst(), any(x)); } - break; - - case Op::round: - if (in_reg(x)) { a->vcvtps2dq(dst(x), r(x)); } - else { a->vcvtps2dq(dst(), any(x)); } - break; - - case Op::to_fp16: - a->vcvtps2ph(dst(x), r(x), A::CURRENT); // f32 ymm -> f16 xmm - a->vpmovzxwd(dst(), dst()); // f16 xmm -> f16 ymm - break; - - case Op::from_fp16: - a->vpackusdw(dst(x), r(x), r(x)); // f16 ymm -> f16 xmm - a->vpermq (dst(), dst(), 0xd8); // swap middle two 64-bit lanes - a->vcvtph2ps(dst(), dst()); // f16 xmm -> f32 ymm - break; - - case Op::duplicate: break; - - #elif defined(__aarch64__) - case Op::assert_true: { - a->uminv4s(dst(), r(x)); // uminv acts like an all() across the vector. - a->movs(GP0, dst(), 0); - A::Label all_true; - a->cbnz(GP0, &all_true); - a->brk(0); - a->label(&all_true); - } break; - - case Op::trace_line: - case Op::trace_var: - case Op::trace_enter: - case Op::trace_exit: - case Op::trace_scope: - /* Force this program to run in the interpreter. */ - return false; - - case Op::index: { - A::V tmp = alloc_tmp(); - a->ldrq (tmp, &iota); - a->dup4s(dst(), N); - a->sub4s(dst(), dst(), tmp); - free_tmp(tmp); - } break; - - case Op::store8: a->xtns2h(dst(x), r(x)); - a->xtnh2b(dst(), dst()); - if (scalar) { a->strb (dst(), arg[immA]); } - else { a->strs (dst(), arg[immA]); } - break; - - case Op::store16: a->xtns2h(dst(x), r(x)); - if (scalar) { a->strh (dst(), arg[immA]); } - else { a->strd (dst(), arg[immA]); } - break; - - case Op::store32: if (scalar) { a->strs(r(x), arg[immA]); } - else { a->strq(r(x), arg[immA]); } - break; - - case Op::store64: if (scalar) { - a->strs(r(x), arg[immA], 0); - a->strs(r(y), arg[immA], 1); - } else if (r(y) == r(x)+1) { - a->st24s(r(x), arg[immA]); - } else { - Reg tmp0 = alloc_tmp(2), - tmp1 = (Reg)(tmp0+1); - a->orr16b(tmp0, r(x), r(x)); - a->orr16b(tmp1, r(y), r(y)); - a-> st24s(tmp0, arg[immA]); - free_tmp(tmp0); - free_tmp(tmp1); - } break; - - case Op::store128: - if (scalar) { - a->strs(r(x), arg[immA], 0); - a->strs(r(y), arg[immA], 1); - a->strs(r(z), arg[immA], 2); - a->strs(r(w), arg[immA], 3); - } else if (r(y) == r(x)+1 && - r(z) == r(x)+2 && - r(w) == r(x)+3) { - a->st44s(r(x), arg[immA]); - } else { - Reg tmp0 = alloc_tmp(4), - tmp1 = (Reg)(tmp0+1), - tmp2 = (Reg)(tmp0+2), - tmp3 = (Reg)(tmp0+3); - a->orr16b(tmp0, r(x), r(x)); - a->orr16b(tmp1, r(y), r(y)); - a->orr16b(tmp2, r(z), r(z)); - a->orr16b(tmp3, r(w), r(w)); - a-> st44s(tmp0, arg[immA]); - free_tmp(tmp0); - free_tmp(tmp1); - free_tmp(tmp2); - free_tmp(tmp3); - } break; - - - case Op::load8: if (scalar) { a->ldrb(dst(), arg[immA]); } - else { a->ldrs(dst(), arg[immA]); } - a->uxtlb2h(dst(), dst()); - a->uxtlh2s(dst(), dst()); - break; - - case Op::load16: if (scalar) { a->ldrh(dst(), arg[immA]); } - else { a->ldrd(dst(), arg[immA]); } - a->uxtlh2s(dst(), dst()); - break; - - case Op::load32: if (scalar) { a->ldrs(dst(), arg[immA]); } - else { a->ldrq(dst(), arg[immA]); } - break; - - case Op::load64: if (scalar) { - a->ldrs(dst(), arg[immA], immB); - } else { - Reg tmp0 = alloc_tmp(2), - tmp1 = (Reg)(tmp0+1); - a->ld24s(tmp0, arg[immA]); - // TODO: return both - switch (immB) { - case 0: mark_tmp_as_dst(tmp0); free_tmp(tmp1); break; - case 1: mark_tmp_as_dst(tmp1); free_tmp(tmp0); break; - } - } break; - - case Op::load128: if (scalar) { - a->ldrs(dst(), arg[immA], immB); - } else { - Reg tmp0 = alloc_tmp(4), - tmp1 = (Reg)(tmp0+1), - tmp2 = (Reg)(tmp0+2), - tmp3 = (Reg)(tmp0+3); - a->ld44s(tmp0, arg[immA]); - // TODO: return all four - switch (immB) { - case 0: mark_tmp_as_dst(tmp0); break; - case 1: mark_tmp_as_dst(tmp1); break; - case 2: mark_tmp_as_dst(tmp2); break; - case 3: mark_tmp_as_dst(tmp3); break; - } - if (immB != 0) { free_tmp(tmp0); } - if (immB != 1) { free_tmp(tmp1); } - if (immB != 2) { free_tmp(tmp2); } - if (immB != 3) { free_tmp(tmp3); } - } break; - - case Op::uniform32: a->add(GP0, arg[immA], immB); - a->ld1r4s(dst(), GP0); - break; - - case Op::array32: a->add(GP0, arg[immA], immB); - a->ldrd(GP0, GP0); - a->add(GP0, GP0, immC); - a->ld1r4s(dst(), GP0); - break; - - case Op::gather8: { - // As usual, the gather base pointer is immB bytes off of uniform immA. - a->add (GP0, arg[immA], immB); // GP0 = &(gather base pointer) - a->ldrd(GP0, GP0); // GP0 = gather base pointer - - for (int i = 0; i < active_lanes; i++) { - a->movs(GP1, r(x), i); // Extract index lane i into GP1. - a->add (GP1, GP0, GP1); // Add the gather base pointer. - a->ldrb(GP1, GP1); // Load that byte. - a->inss(dst(x), GP1, i); // Insert it into dst() lane i. - } - } break; - - // See gather8 for general idea; comments here only where gather16 differs. - case Op::gather16: { - a->add (GP0, arg[immA], immB); - a->ldrd(GP0, GP0); - for (int i = 0; i < active_lanes; i++) { - a->movs(GP1, r(x), i); - a->add (GP1, GP0, GP1, A::LSL, 1); // Scale index 2x into a byte offset. - a->ldrh(GP1, GP1); // 2-byte load. - a->inss(dst(x), GP1, i); - } - } break; - - // See gather8 for general idea; comments here only where gather32 differs. - case Op::gather32: { - a->add (GP0, arg[immA], immB); - a->ldrd(GP0, GP0); - for (int i = 0; i < active_lanes; i++) { - a->movs(GP1, r(x), i); - a->add (GP1, GP0, GP1, A::LSL, 2); // Scale index 4x into a byte offset. - a->ldrs(GP1, GP1); // 4-byte load. - a->inss(dst(x), GP1, i); - } - } break; - - case Op::add_f32: a->fadd4s(dst(x,y), r(x), r(y)); break; - case Op::sub_f32: a->fsub4s(dst(x,y), r(x), r(y)); break; - case Op::mul_f32: a->fmul4s(dst(x,y), r(x), r(y)); break; - case Op::div_f32: a->fdiv4s(dst(x,y), r(x), r(y)); break; - - case Op::sqrt_f32: a->fsqrt4s(dst(x), r(x)); break; - - case Op::fma_f32: // fmla.4s is z += x*y - if (try_alias(z)) { a->fmla4s( r(z), r(x), r(y)); } - else { a->orr16b(dst(), r(z), r(z)); - a->fmla4s(dst(), r(x), r(y)); } - break; - - case Op::fnma_f32: // fmls.4s is z -= x*y - if (try_alias(z)) { a->fmls4s( r(z), r(x), r(y)); } - else { a->orr16b(dst(), r(z), r(z)); - a->fmls4s(dst(), r(x), r(y)); } - break; - - case Op::fms_f32: // calculate z - xy, then negate to xy - z - if (try_alias(z)) { a->fmls4s( r(z), r(x), r(y)); } - else { a->orr16b(dst(), r(z), r(z)); - a->fmls4s(dst(), r(x), r(y)); } - a->fneg4s(dst(), dst()); - break; - - case Op:: gt_f32: a->fcmgt4s (dst(x,y), r(x), r(y)); break; - case Op::gte_f32: a->fcmge4s (dst(x,y), r(x), r(y)); break; - case Op:: eq_f32: a->fcmeq4s (dst(x,y), r(x), r(y)); break; - case Op::neq_f32: a->fcmeq4s (dst(x,y), r(x), r(y)); - a->not16b (dst(), dst()); break; - - - case Op::add_i32: a->add4s(dst(x,y), r(x), r(y)); break; - case Op::sub_i32: a->sub4s(dst(x,y), r(x), r(y)); break; - case Op::mul_i32: a->mul4s(dst(x,y), r(x), r(y)); break; - - case Op::bit_and : a->and16b(dst(x,y), r(x), r(y)); break; - case Op::bit_or : a->orr16b(dst(x,y), r(x), r(y)); break; - case Op::bit_xor : a->eor16b(dst(x,y), r(x), r(y)); break; - case Op::bit_clear: a->bic16b(dst(x,y), r(x), r(y)); break; - - case Op::select: // bsl16b is x = x ? y : z - if (try_alias(x)) { a->bsl16b( r(x), r(y), r(z)); } - else { a->orr16b(dst(), r(x), r(x)); - a->bsl16b(dst(), r(y), r(z)); } - break; - - // fmin4s and fmax4s don't work the way we want with NaN, - // so we write them the long way: - case Op::min_f32: // min(x,y) = yfcmgt4s(dst(), r(x), r(y)); - a->bsl16b (dst(), r(y), r(x)); - break; - - case Op::max_f32: // max(x,y) = xfcmgt4s(dst(), r(y), r(x)); - a->bsl16b (dst(), r(y), r(x)); - break; - - case Op::shl_i32: a-> shl4s(dst(x), r(x), immA); break; - case Op::shr_i32: a->ushr4s(dst(x), r(x), immA); break; - case Op::sra_i32: a->sshr4s(dst(x), r(x), immA); break; - - case Op::eq_i32: a->cmeq4s(dst(x,y), r(x), r(y)); break; - case Op::gt_i32: a->cmgt4s(dst(x,y), r(x), r(y)); break; - - case Op::to_f32: a->scvtf4s (dst(x), r(x)); break; - case Op::trunc: a->fcvtzs4s(dst(x), r(x)); break; - case Op::round: a->fcvtns4s(dst(x), r(x)); break; - case Op::ceil: a->frintp4s(dst(x), r(x)); break; - case Op::floor: a->frintm4s(dst(x), r(x)); break; - - case Op::to_fp16: - a->fcvtn (dst(x), r(x)); // 4x f32 -> 4x f16 in bottom four lanes - a->uxtlh2s(dst(), dst()); // expand to 4x f16 in even 16-bit lanes - break; - - case Op::from_fp16: - a->xtns2h(dst(x), r(x)); // pack even 16-bit lanes into bottom four lanes - a->fcvtl (dst(), dst()); // 4x f16 -> 4x f32 - break; - - case Op::duplicate: break; - #endif - } - - // Proactively free the registers holding any value that dies here. - if (rd != NA && dies_here(regs[rd])) { regs[rd] = NA; } - if (rx != NA && regs[rx] != NA && dies_here(regs[rx])) { regs[rx] = NA; } - if (ry != NA && regs[ry] != NA && dies_here(regs[ry])) { regs[ry] = NA; } - if (rz != NA && regs[rz] != NA && dies_here(regs[rz])) { regs[rz] = NA; } - if (rw != NA && regs[rw] != NA && dies_here(regs[rw])) { regs[rw] = NA; } - return true; - }; - - #if defined(__x86_64__) || defined(_M_X64) - auto jump_if_less = [&](A::Label* l) { a->jl (l); }; - auto jump = [&](A::Label* l) { a->jmp(l); }; - - auto add = [&](A::GP64 gp, int imm) { a->add(gp, imm); }; - auto sub = [&](A::GP64 gp, int imm) { a->sub(gp, imm); }; - #elif defined(__aarch64__) - auto jump_if_less = [&](A::Label* l) { a->blt(l); }; - auto jump = [&](A::Label* l) { a->b (l); }; - - auto add = [&](A::X gp, int imm) { a->add(gp, gp, imm); }; - auto sub = [&](A::X gp, int imm) { a->sub(gp, gp, imm); }; - #endif - - A::Label body, - tail, - done; - - enter(); - for (Val id = 0; id < (Val)instructions.size(); id++) { - if (instructions[id].can_hoist && !emit(id, /*scalar=*/false)) { - return false; - } - } - - // This point marks a kind of canonical fixed point for register contents: if loop - // code is generated as if these registers are holding these values, the next time - // the loop comes around we'd better find those same registers holding those same values. - auto restore_incoming_regs = [&,incoming=regs,saved_stack_slot=stack_slot, - saved_next_stack_slot=next_stack_slot]{ - for (int r = 0; r < (int)regs.size(); r++) { - if (regs[r] != incoming[r]) { - regs[r] = incoming[r]; - if (regs[r] >= 0) { - load_from_memory((Reg)r, regs[r]); - } - } - } - *stack_hint = std::max(*stack_hint, next_stack_slot); - stack_slot = saved_stack_slot; - next_stack_slot = saved_next_stack_slot; - }; - - a->label(&body); - { - a->cmp(N, K); - jump_if_less(&tail); - for (Val id = 0; id < (Val)instructions.size(); id++) { - if (!instructions[id].can_hoist && !emit(id, /*scalar=*/false)) { - return false; - } - } - restore_incoming_regs(); - for (int i = 0; i < (int)fImpl->strides.size(); i++) { - if (fImpl->strides[i]) { - add(arg[i], K*fImpl->strides[i]); - } - } - sub(N, K); - jump(&body); - } - - a->label(&tail); - { - a->cmp(N, 1); - jump_if_less(&done); - for (Val id = 0; id < (Val)instructions.size(); id++) { - if (!instructions[id].can_hoist && !emit(id, /*scalar=*/true)) { - return false; - } - } - restore_incoming_regs(); - for (int i = 0; i < (int)fImpl->strides.size(); i++) { - if (fImpl->strides[i]) { - add(arg[i], 1*fImpl->strides[i]); - } - } - sub(N, 1); - jump(&tail); - } - - a->label(&done); - { - exit(); - } - - // On ARM64, we use immediate offsets to adjust the stack pointer, and those are limited to - // 12 bits. If our function is going to require more than 4k of stack, just fail. We could - // tweak the code that adjusts `sp`, but then we risk exceeding the (larger) immediate limit - // on our sp-relative load and store opcodes. - #if defined(__aarch64__) - const int stack_bytes = (*stack_hint) * K * 4; - if (stack_bytes > mask(12)) { - return false; - } - #endif - - // Except for explicit aligned load and store instructions, AVX allows - // memory operands to be unaligned. So even though we're creating 16 - // byte patterns on ARM or 32-byte patterns on x86, we only need to - // align to 4 bytes, the element size and alignment requirement. - - constants.foreach([&](int imm, A::Label* label) { - a->align(4); - a->label(label); - for (int i = 0; i < K; i++) { - a->word(imm); - } - }); - - if (!iota.references.empty()) { - a->align(4); - a->label(&iota); // 0,1,2,3,4,... - for (int i = 0; i < K; i++) { - a->word(i); - } - } - - if (!load64_index.references.empty()) { - a->align(4); - a->label(&load64_index); // {0,2,4,6|1,3,5,7} - a->word(0); a->word(2); a->word(4); a->word(6); - a->word(1); a->word(3); a->word(5); a->word(7); - } - - return true; - } - - void Program::setupJIT(const std::vector& instructions, - const char* debug_name) { - // Assemble with no buffer to determine a.size() (the number of bytes we'll assemble) - // and stack_hint/registers_used to feed forward into the next jit() call. - Assembler a{nullptr}; - int stack_hint = -1; - uint32_t registers_used = 0xffff'ffff; // Start conservatively with all. - if (!this->jit(instructions, &stack_hint, ®isters_used, &a)) { - return; - } - - fImpl->jit_size = a.size(); - void* jit_entry = alloc_jit_buffer(&fImpl->jit_size); - fImpl->jit_entry.store(jit_entry); - - // Assemble the program for real with stack_hint/registers_used as feedback from first call. - a = Assembler{jit_entry}; - SkAssertResult(this->jit(instructions, &stack_hint, ®isters_used, &a)); - SkASSERT(a.size() <= fImpl->jit_size); - - // Remap as executable, and flush caches on platforms that need that. - remap_as_executable(jit_entry, fImpl->jit_size); - } - - void Program::disassemble(SkWStream* o) const { - #if !defined(SK_BUILD_FOR_WIN) - SkDebugfStream debug; - if (!o) { o = &debug; } - - const void* jit_entry = fImpl->jit_entry.load(); - size_t jit_size = fImpl->jit_size; - - if (!jit_entry) { - o->writeText("Program not JIT'd. Did you pass --jit?\n"); - return; - } - - char path[] = "/tmp/skvm-jit.XXXXXX"; - int fd = mkstemp(path); - ::write(fd, jit_entry, jit_size); - close(fd); - - // Convert it in-place to a dynamic library with a single symbol "skvm_jit": - SkString cmd = SkStringPrintf( - "echo '.global _skvm_jit\n_skvm_jit: .incbin \"%s\"'" - " | clang -x assembler -shared - -o %s", - path, path); - #if defined(__aarch64__) - cmd.append(" -arch arm64"); - #endif - system(cmd.c_str()); - - // Now objdump to disassemble our function: - // TODO: We could trim this down to just our code using '--disassemble=`, - // but the symbol name varies with OS, and that option may be missing from objdump on some - // machines? There also apears to be quite a bit of junk after the end of the JIT'd code. - // Trimming that would let us pass '--visualize-jumps' and get the loop annotated. - // With the junk, we tend to end up with a bunch of stray jumps that pollute the ASCII art. - cmd = SkStringPrintf("objdump -D %s", path); - #if defined(SK_BUILD_FOR_UNIX) - cmd.append(" --section=.text"); - #endif - FILE* fp = popen(cmd.c_str(), "r"); - if (!fp) { - o->writeText("objdump failed\n"); - return; - } - - char line[1024]; - while (fgets(line, sizeof(line), fp)) { - o->writeText(line); - } - - pclose(fp); - #endif - } - -#endif - -} // namespace skvm - -#endif // defined(SK_ENABLE_SKVM) diff --git a/src/core/SkVM.h b/src/core/SkVM.h deleted file mode 100644 index 03099630e21c..000000000000 --- a/src/core/SkVM.h +++ /dev/null @@ -1,1359 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#ifndef SkVM_DEFINED -#define SkVM_DEFINED - -#include "include/core/SkBlendMode.h" -#include "include/core/SkColor.h" -#include "include/core/SkColorType.h" -#include "include/core/SkSpan.h" -#include "include/private/base/SkMacros.h" -#include "include/private/base/SkTArray.h" -#include "src/core/SkTHash.h" -#include "src/core/SkVM_fwd.h" -#include // std::vector - -class SkWStream; - -#if defined(SK_ENABLE_SKVM) - -#if defined(SKVM_JIT_WHEN_POSSIBLE) && !defined(SK_BUILD_FOR_IOS) - #if defined(__x86_64__) || defined(_M_X64) - #if defined(_WIN32) || defined(__linux) || defined(__APPLE__) - #define SKVM_JIT - #endif - #endif - #if defined(__aarch64__) - #if defined(__ANDROID__) || defined(__APPLE__) - #define SKVM_JIT - #endif - #endif -#endif - -#if 0 - #undef SKVM_JIT -#endif - -namespace SkSL { -class TraceHook; -} - -namespace skvm { - class Assembler { - public: - explicit Assembler(void* buf); - - size_t size() const; - - // Order matters... GP64, Xmm, Ymm values match 4-bit register encoding for each. - enum GP64 { - rax, rcx, rdx, rbx, rsp, rbp, rsi, rdi, - r8 , r9 , r10, r11, r12, r13, r14, r15, - }; - enum Xmm { - xmm0, xmm1, xmm2 , xmm3 , xmm4 , xmm5 , xmm6 , xmm7 , - xmm8, xmm9, xmm10, xmm11, xmm12, xmm13, xmm14, xmm15, - }; - enum Ymm { - ymm0, ymm1, ymm2 , ymm3 , ymm4 , ymm5 , ymm6 , ymm7 , - ymm8, ymm9, ymm10, ymm11, ymm12, ymm13, ymm14, ymm15, - }; - - // X and V values match 5-bit encoding for each (nothing tricky). - enum X { - x0 , x1 , x2 , x3 , x4 , x5 , x6 , x7 , - x8 , x9 , x10, x11, x12, x13, x14, x15, - x16, x17, x18, x19, x20, x21, x22, x23, - x24, x25, x26, x27, x28, x29, x30, xzr, sp=xzr, - }; - enum V { - v0 , v1 , v2 , v3 , v4 , v5 , v6 , v7 , - v8 , v9 , v10, v11, v12, v13, v14, v15, - v16, v17, v18, v19, v20, v21, v22, v23, - v24, v25, v26, v27, v28, v29, v30, v31, - }; - - void bytes(const void*, int); - void byte(uint8_t); - void word(uint32_t); - - struct Label { - int offset = 0; - enum { NotYetSet, ARMDisp19, X86Disp32 } kind = NotYetSet; - skia_private::STArray<2, int> references; - }; - - // x86-64 - - void align(int mod); - - void int3(); - void vzeroupper(); - void ret(); - - // Mem represents a value at base + disp + scale*index, - // or simply at base + disp if index=rsp. - enum Scale { ONE, TWO, FOUR, EIGHT }; - struct Mem { - GP64 base; - int disp = 0; - GP64 index = rsp; - Scale scale = ONE; - }; - - struct Operand { - union { - int reg; - Mem mem; - Label* label; - }; - enum { REG, MEM, LABEL } kind; - - Operand(GP64 r) : reg (r), kind(REG ) {} - Operand(Xmm r) : reg (r), kind(REG ) {} - Operand(Ymm r) : reg (r), kind(REG ) {} - Operand(Mem m) : mem (m), kind(MEM ) {} - Operand(Label* l) : label(l), kind(LABEL) {} - }; - - void vpand (Ymm dst, Ymm x, Operand y); - void vpandn(Ymm dst, Ymm x, Operand y); - void vpor (Ymm dst, Ymm x, Operand y); - void vpxor (Ymm dst, Ymm x, Operand y); - - void vpaddd (Ymm dst, Ymm x, Operand y); - void vpsubd (Ymm dst, Ymm x, Operand y); - void vpmulld(Ymm dst, Ymm x, Operand y); - - void vpaddw (Ymm dst, Ymm x, Operand y); - void vpsubw (Ymm dst, Ymm x, Operand y); - void vpmullw (Ymm dst, Ymm x, Operand y); - - void vpabsw (Ymm dst, Operand x); - void vpavgw (Ymm dst, Ymm x, Operand y); // dst = (x+y+1)>>1, unsigned. - void vpmulhrsw(Ymm dst, Ymm x, Operand y); // dst = (x*y + (1<<14)) >> 15, signed. - void vpminsw (Ymm dst, Ymm x, Operand y); - void vpminuw (Ymm dst, Ymm x, Operand y); - void vpmaxsw (Ymm dst, Ymm x, Operand y); - void vpmaxuw (Ymm dst, Ymm x, Operand y); - - void vaddps(Ymm dst, Ymm x, Operand y); - void vsubps(Ymm dst, Ymm x, Operand y); - void vmulps(Ymm dst, Ymm x, Operand y); - void vdivps(Ymm dst, Ymm x, Operand y); - void vminps(Ymm dst, Ymm x, Operand y); - void vmaxps(Ymm dst, Ymm x, Operand y); - - void vsqrtps(Ymm dst, Operand x); - - void vfmadd132ps(Ymm dst, Ymm x, Operand y); - void vfmadd213ps(Ymm dst, Ymm x, Operand y); - void vfmadd231ps(Ymm dst, Ymm x, Operand y); - - void vfmsub132ps(Ymm dst, Ymm x, Operand y); - void vfmsub213ps(Ymm dst, Ymm x, Operand y); - void vfmsub231ps(Ymm dst, Ymm x, Operand y); - - void vfnmadd132ps(Ymm dst, Ymm x, Operand y); - void vfnmadd213ps(Ymm dst, Ymm x, Operand y); - void vfnmadd231ps(Ymm dst, Ymm x, Operand y); - - void vpackusdw(Ymm dst, Ymm x, Operand y); - void vpackuswb(Ymm dst, Ymm x, Operand y); - - void vpunpckldq(Ymm dst, Ymm x, Operand y); - void vpunpckhdq(Ymm dst, Ymm x, Operand y); - - void vpcmpeqd(Ymm dst, Ymm x, Operand y); - void vpcmpgtd(Ymm dst, Ymm x, Operand y); - void vpcmpeqw(Ymm dst, Ymm x, Operand y); - void vpcmpgtw(Ymm dst, Ymm x, Operand y); - - void vcmpps (Ymm dst, Ymm x, Operand y, int imm); - void vcmpeqps (Ymm dst, Ymm x, Operand y) { this->vcmpps(dst,x,y,0); } - void vcmpltps (Ymm dst, Ymm x, Operand y) { this->vcmpps(dst,x,y,1); } - void vcmpleps (Ymm dst, Ymm x, Operand y) { this->vcmpps(dst,x,y,2); } - void vcmpneqps(Ymm dst, Ymm x, Operand y) { this->vcmpps(dst,x,y,4); } - - // Sadly, the x parameter cannot be a general Operand for these shifts. - void vpslld(Ymm dst, Ymm x, int imm); - void vpsrld(Ymm dst, Ymm x, int imm); - void vpsrad(Ymm dst, Ymm x, int imm); - - void vpsllw(Ymm dst, Ymm x, int imm); - void vpsrlw(Ymm dst, Ymm x, int imm); - void vpsraw(Ymm dst, Ymm x, int imm); - - void vpermq (Ymm dst, Operand x, int imm); - void vperm2f128(Ymm dst, Ymm x, Operand y, int imm); - void vpermps (Ymm dst, Ymm ix, Operand src); // dst[i] = src[ix[i]] - - enum Rounding { NEAREST, FLOOR, CEIL, TRUNC, CURRENT }; - void vroundps(Ymm dst, Operand x, Rounding); - - void vmovdqa(Ymm dst, Operand x); - void vmovups(Ymm dst, Operand x); - void vmovups(Xmm dst, Operand x); - void vmovups(Operand dst, Ymm x); - void vmovups(Operand dst, Xmm x); - - void vcvtdq2ps (Ymm dst, Operand x); - void vcvttps2dq(Ymm dst, Operand x); - void vcvtps2dq (Ymm dst, Operand x); - - void vcvtps2ph(Operand dst, Ymm x, Rounding); - void vcvtph2ps(Ymm dst, Operand x); - - void vpblendvb(Ymm dst, Ymm x, Operand y, Ymm z); - - void vpshufb(Ymm dst, Ymm x, Operand y); - - void vptest(Ymm x, Operand y); - - void vbroadcastss(Ymm dst, Operand y); - - void vpmovzxwd(Ymm dst, Operand src); // dst = src, 128-bit, uint16_t -> int - void vpmovzxbd(Ymm dst, Operand src); // dst = src, 64-bit, uint8_t -> int - - void vmovq(Operand dst, Xmm src); // dst = src, 64-bit - void vmovd(Operand dst, Xmm src); // dst = src, 32-bit - void vmovd(Xmm dst, Operand src); // dst = src, 32-bit - - void vpinsrd(Xmm dst, Xmm src, Operand y, int imm); // dst = src; dst[imm] = y, 32-bit - void vpinsrw(Xmm dst, Xmm src, Operand y, int imm); // dst = src; dst[imm] = y, 16-bit - void vpinsrb(Xmm dst, Xmm src, Operand y, int imm); // dst = src; dst[imm] = y, 8-bit - - void vextracti128(Operand dst, Ymm src, int imm); // dst = src[imm], 128-bit - void vpextrd (Operand dst, Xmm src, int imm); // dst = src[imm], 32-bit - void vpextrw (Operand dst, Xmm src, int imm); // dst = src[imm], 16-bit - void vpextrb (Operand dst, Xmm src, int imm); // dst = src[imm], 8-bit - - // if (mask & 0x8000'0000) { - // dst = base[scale*ix]; - // } - // mask = 0; - void vgatherdps(Ymm dst, Scale scale, Ymm ix, GP64 base, Ymm mask); - - - void label(Label*); - - void jmp(Label*); - void je (Label*); - void jne(Label*); - void jl (Label*); - void jc (Label*); - - void add (Operand dst, int imm); - void sub (Operand dst, int imm); - void cmp (Operand dst, int imm); - void mov (Operand dst, int imm); - void movb(Operand dst, int imm); - - void add (Operand dst, GP64 x); - void sub (Operand dst, GP64 x); - void cmp (Operand dst, GP64 x); - void mov (Operand dst, GP64 x); - void movb(Operand dst, GP64 x); - - void add (GP64 dst, Operand x); - void sub (GP64 dst, Operand x); - void cmp (GP64 dst, Operand x); - void mov (GP64 dst, Operand x); - void movb(GP64 dst, Operand x); - - // Disambiguators... choice is arbitrary (but generates different code!). - void add (GP64 dst, GP64 x) { this->add (Operand(dst), x); } - void sub (GP64 dst, GP64 x) { this->sub (Operand(dst), x); } - void cmp (GP64 dst, GP64 x) { this->cmp (Operand(dst), x); } - void mov (GP64 dst, GP64 x) { this->mov (Operand(dst), x); } - void movb(GP64 dst, GP64 x) { this->movb(Operand(dst), x); } - - void movzbq(GP64 dst, Operand x); // dst = x, uint8_t -> int - void movzwq(GP64 dst, Operand x); // dst = x, uint16_t -> int - - // aarch64 - - // d = op(n,m) - using DOpNM = void(V d, V n, V m); - DOpNM and16b, orr16b, eor16b, bic16b, bsl16b, - add4s, sub4s, mul4s, - cmeq4s, cmgt4s, - sub8h, mul8h, - fadd4s, fsub4s, fmul4s, fdiv4s, fmin4s, fmax4s, - fcmeq4s, fcmgt4s, fcmge4s, - tbl, - uzp14s, uzp24s, - zip14s, zip24s; - - // TODO: there are also float ==,<,<=,>,>= instructions with an immediate 0.0f, - // and the register comparison > and >= can also compare absolute values. Interesting. - - // d += n*m - void fmla4s(V d, V n, V m); - - // d -= n*m - void fmls4s(V d, V n, V m); - - // d = op(n,imm) - using DOpNImm = void(V d, V n, int imm); - DOpNImm sli4s, - shl4s, sshr4s, ushr4s, - ushr8h; - - // d = op(n) - using DOpN = void(V d, V n); - DOpN not16b, // d = ~n - fneg4s, // d = -n - fsqrt4s, // d = sqrtf(n) - scvtf4s, // int -> float - fcvtzs4s, // truncate float -> int - fcvtns4s, // round float -> int (nearest even) - frintp4s, // round float -> int as float, toward plus infinity (ceil) - frintm4s, // round float -> int as float, toward minus infinity (floor) - fcvtn, // f32 -> f16 in low half - fcvtl, // f16 in low half -> f32 - xtns2h, // u32 -> u16 - xtnh2b, // u16 -> u8 - uxtlb2h, // u8 -> u16 (TODO: this is a special case of ushll.8h) - uxtlh2s, // u16 -> u32 (TODO: this is a special case of ushll.4s) - uminv4s; // dst[0] = min(n[0],n[1],n[2],n[3]), n as unsigned - - void brk (int imm16); - void ret (X); - void add (X d, X n, int imm12); - void sub (X d, X n, int imm12); - void subs(X d, X n, int imm12); // subtract setting condition flags - - enum Shift { LSL,LSR,ASR,ROR }; - void add (X d, X n, X m, Shift=LSL, int imm6=0); // d=n+Shift(m,imm6), for Shift != ROR. - - // There's another encoding for unconditional branches that can jump further, - // but this one encoded as b.al is simple to implement and should be fine. - void b (Label* l) { this->b(Condition::al, l); } - void bne(Label* l) { this->b(Condition::ne, l); } - void blt(Label* l) { this->b(Condition::lt, l); } - - // "cmp ..." is just an assembler mnemonic for "subs xzr, ..."! - void cmp(X n, int imm12) { this->subs(xzr, n, imm12); } - - // Compare and branch if zero/non-zero, as if - // cmp(t,0) - // beq/bne(l) - // but without setting condition flags. - void cbz (X t, Label* l); - void cbnz(X t, Label* l); - - // TODO: there are ldur variants with unscaled imm, useful? - void ldrd(X dst, X src, int imm12=0); // 64-bit dst = *(src+imm12*8) - void ldrs(X dst, X src, int imm12=0); // 32-bit dst = *(src+imm12*4) - void ldrh(X dst, X src, int imm12=0); // 16-bit dst = *(src+imm12*2) - void ldrb(X dst, X src, int imm12=0); // 8-bit dst = *(src+imm12) - - void ldrq(V dst, Label*); // 128-bit PC-relative load - - void ldrq(V dst, X src, int imm12=0); // 128-bit dst = *(src+imm12*16) - void ldrd(V dst, X src, int imm12=0); // 64-bit dst = *(src+imm12*8) - void ldrs(V dst, X src, int imm12=0); // 32-bit dst = *(src+imm12*4) - void ldrh(V dst, X src, int imm12=0); // 16-bit dst = *(src+imm12*2) - void ldrb(V dst, X src, int imm12=0); // 8-bit dst = *(src+imm12) - - void strs(X src, X dst, int imm12=0); // 32-bit *(dst+imm12*4) = src - - void strq(V src, X dst, int imm12=0); // 128-bit *(dst+imm12*16) = src - void strd(V src, X dst, int imm12=0); // 64-bit *(dst+imm12*8) = src - void strs(V src, X dst, int imm12=0); // 32-bit *(dst+imm12*4) = src - void strh(V src, X dst, int imm12=0); // 16-bit *(dst+imm12*2) = src - void strb(V src, X dst, int imm12=0); // 8-bit *(dst+imm12) = src - - void movs(X dst, V src, int lane); // dst = 32-bit src[lane] - void inss(V dst, X src, int lane); // dst[lane] = 32-bit src - - void dup4s (V dst, X src); // Each 32-bit lane = src - - void ld1r4s (V dst, X src); // Each 32-bit lane = *src - void ld1r8h (V dst, X src); // Each 16-bit lane = *src - void ld1r16b(V dst, X src); // Each 8-bit lane = *src - - void ld24s(V dst, X src); // deinterleave(dst,dst+1) = 256-bit *src - void ld44s(V dst, X src); // deinterleave(dst,dst+1,dst+2,dst+3) = 512-bit *src - void st24s(V src, X dst); // 256-bit *dst = interleave_32bit_lanes(src,src+1) - void st44s(V src, X dst); // 512-bit *dst = interleave_32bit_lanes(src,src+1,src+2,src+3) - - void ld24s(V dst, X src, int lane); // Load 2 32-bit values into given lane of dst..dst+1 - void ld44s(V dst, X src, int lane); // Load 4 32-bit values into given lane of dst..dst+3 - - private: - uint8_t* fCode; - size_t fSize; - - // x86-64 - enum W { W0, W1 }; // Are the lanes 64-bit (W1) or default (W0)? Intel Vol 2A 2.3.5.5 - enum L { L128, L256 }; // Is this a 128- or 256-bit operation? Intel Vol 2A 2.3.6.2 - - // Helpers for vector instructions. - void op(int prefix, int map, int opcode, int dst, int x, Operand y, W,L); - void op(int p, int m, int o, Ymm d, Ymm x, Operand y, W w=W0) { op(p,m,o, d,x,y,w,L256); } - void op(int p, int m, int o, Ymm d, Operand y, W w=W0) { op(p,m,o, d,0,y,w,L256); } - void op(int p, int m, int o, Xmm d, Xmm x, Operand y, W w=W0) { op(p,m,o, d,x,y,w,L128); } - void op(int p, int m, int o, Xmm d, Operand y, W w=W0) { op(p,m,o, d,0,y,w,L128); } - - // Helpers for GP64 instructions. - void op(int opcode, Operand dst, GP64 x); - void op(int opcode, int opcode_ext, Operand dst, int imm); - - void jump(uint8_t condition, Label*); - int disp32(Label*); - void imm_byte_after_operand(const Operand&, int byte); - - // aarch64 - - // Opcode for 3-arguments ops is split between hi and lo: - // [11 bits hi] [5 bits m] [6 bits lo] [5 bits n] [5 bits d] - void op(uint32_t hi, V m, uint32_t lo, V n, V d); - - // 0,1,2-argument ops, with or without an immediate: - // [ 22 bits op ] [5 bits n] [5 bits d] - // Any immediate falls in the middle somewhere overlapping with either op, n, or both. - void op(uint32_t op22, V n, V d, int imm=0); - void op(uint32_t op22, X n, V d, int imm=0) { this->op(op22,(V)n, d,imm); } - void op(uint32_t op22, V n, X d, int imm=0) { this->op(op22, n,(V)d,imm); } - void op(uint32_t op22, X n, X d, int imm=0) { this->op(op22,(V)n,(V)d,imm); } - void op(uint32_t op22, int imm=0) { this->op(op22,(V)0,(V)0,imm); } - // (1-argument ops don't seem to have a consistent convention of passing as n or d.) - - - // Order matters... value is 4-bit encoding for condition code. - enum class Condition { eq,ne,cs,cc,mi,pl,vs,vc,hi,ls,ge,lt,gt,le,al }; - void b(Condition, Label*); - int disp19(Label*); - }; - - // Order matters a little: Ops <=store128 are treated as having side effects. - #define SKVM_OPS(M) \ - M(assert_true) \ - M(trace_line) M(trace_var) \ - M(trace_enter) M(trace_exit) M(trace_scope) \ - M(store8) M(store16) M(store32) M(store64) M(store128) \ - M(load8) M(load16) M(load32) M(load64) M(load128) \ - M(index) \ - M(gather8) M(gather16) M(gather32) \ - M(uniform32) \ - M(array32) \ - M(splat) \ - M(add_f32) M(add_i32) \ - M(sub_f32) M(sub_i32) \ - M(mul_f32) M(mul_i32) \ - M(div_f32) \ - M(min_f32) M(max_f32) \ - M(fma_f32) M(fms_f32) M(fnma_f32) \ - M(sqrt_f32) \ - M(shl_i32) M(shr_i32) M(sra_i32) \ - M(ceil) M(floor) M(trunc) M(round) M(to_fp16) M(from_fp16) \ - M(to_f32) \ - M(neq_f32) M(eq_f32) M(eq_i32) \ - M(gte_f32) M(gt_f32) M(gt_i32) \ - M(bit_and) M(bit_or) M(bit_xor) M(bit_clear) \ - M(select) \ - M(duplicate) - // End of SKVM_OPS - - enum class Op : int { - #define M(op) op, - SKVM_OPS(M) - #undef M - }; - - static inline bool has_side_effect(Op op) { - return op <= Op::store128; - } - static inline bool touches_varying_memory(Op op) { - return Op::store8 <= op && op <= Op::load128; - } - static inline bool is_always_varying(Op op) { - return Op::store8 <= op && op <= Op::index; - } - static inline bool is_trace(Op op) { - return Op::trace_line <= op && op <= Op::trace_scope; - } - - using Val = int; - // We reserve an impossible Val ID as a sentinel - // NA meaning none, n/a, null, nil, etc. - static const Val NA = -1; - - // Ptr and UPtr are an index into the registers args[]. The two styles of using args are - // varyings and uniforms. Varyings use Ptr, have a stride associated with them, and are - // evaluated everytime through the loop. Uniforms use UPtr, don't have a stride, and are - // usually hoisted above the loop. - struct Ptr { int ix; }; - struct UPtr : public Ptr {}; - - bool operator!=(Ptr a, Ptr b); - - struct I32 { - Builder* builder = nullptr; - Val id = NA; - explicit operator bool() const { return id != NA; } - Builder* operator->() const { return builder; } - }; - - struct F32 { - Builder* builder = nullptr; - Val id = NA; - explicit operator bool() const { return id != NA; } - Builder* operator->() const { return builder; } - }; - - struct Color { - F32 r,g,b,a; - explicit operator bool() const { return r && g && b && a; } - Builder* operator->() const { return a.operator->(); } - }; - - struct HSLA { - F32 h,s,l,a; - explicit operator bool() const { return h && s && l && a; } - Builder* operator->() const { return a.operator->(); } - }; - - struct Coord { - F32 x,y; - explicit operator bool() const { return x && y; } - Builder* operator->() const { return x.operator->(); } - }; - - struct Uniform { - UPtr ptr; - int offset; - }; - struct Uniforms { - UPtr base; - std::vector buf; - - Uniforms(UPtr ptr, int init) : base(ptr), buf(init) {} - - Uniform push(int val) { - buf.push_back(val); - return {base, (int)( sizeof(int)*(buf.size() - 1) )}; - } - - Uniform pushF(float val) { - int bits; - memcpy(&bits, &val, sizeof(int)); - return this->push(bits); - } - - Uniform pushPtr(const void* ptr) { - // Jam the pointer into 1 or 2 ints. - int ints[sizeof(ptr) / sizeof(int)]; - memcpy(ints, &ptr, sizeof(ptr)); - for (int bits : ints) { - buf.push_back(bits); - } - return {base, (int)( sizeof(int)*(buf.size() - std::size(ints)) )}; - } - - Uniform pushArray(int32_t a[]) { - return this->pushPtr(a); - } - - Uniform pushArrayF(float a[]) { - return this->pushPtr(a); - } - }; - - struct PixelFormat { - enum { UNORM, SRGB, FLOAT, XRNG } encoding; - int r_bits, g_bits, b_bits, a_bits, - r_shift, g_shift, b_shift, a_shift; - }; - PixelFormat SkColorType_to_PixelFormat(SkColorType); - - SK_BEGIN_REQUIRE_DENSE - struct Instruction { - Op op; // v* = op(x,y,z,w,immA,immB), where * == index of this Instruction. - Val x,y,z,w; // Enough arguments for Op::store128. - int immA,immB,immC; // Immediate bit pattern, shift count, pointer index, byte offset, etc. - }; - SK_END_REQUIRE_DENSE - - bool operator==(const Instruction&, const Instruction&); - struct InstructionHash { - uint32_t operator()(const Instruction&, uint32_t seed=0) const; - }; - - struct OptimizedInstruction { - Op op; - Val x,y,z,w; - int immA,immB,immC; - - Val death; - bool can_hoist; - }; - - struct Features { - bool fma = false; - bool fp16 = false; - }; - - class Builder { - public: - Builder(bool createDuplicates = false); - Builder(Features, bool createDuplicates = false); - - Program done(const char* debug_name = nullptr, - bool allow_jit=true) const; - - // Mostly for debugging, tests, etc. - std::vector program() const { return fProgram; } - std::vector optimize() const; - - // Returns a trace-hook ID which must be passed to the trace opcodes. - int attachTraceHook(SkSL::TraceHook*); - - // Convenience arg() wrappers for most common strides, sizeof(T) and 0. - template - Ptr varying() { return this->arg(sizeof(T)); } - Ptr varying(int stride) { SkASSERT(stride > 0); return this->arg(stride); } - UPtr uniform() { Ptr p = this->arg(0); return UPtr{{p.ix}}; } - - // TODO: allow uniform (i.e. Ptr) offsets to store* and load*? - // TODO: sign extension (signed types) for <32-bit loads? - // TODO: unsigned integer operations where relevant (just comparisons?)? - - // Assert cond is true, printing debug when not. - void assert_true(I32 cond, I32 debug); - void assert_true(I32 cond, F32 debug) { assert_true(cond, pun_to_I32(debug)); } - void assert_true(I32 cond) { assert_true(cond, cond); } - - // Insert debug traces into the instruction stream - bool mergeMasks(I32& mask, I32& traceMask); - void trace_line (int traceHookID, I32 mask, I32 traceMask, int line); - void trace_var (int traceHookID, I32 mask, I32 traceMask, int slot, I32 val); - void trace_enter(int traceHookID, I32 mask, I32 traceMask, int fnIdx); - void trace_exit (int traceHookID, I32 mask, I32 traceMask, int fnIdx); - void trace_scope(int traceHookID, I32 mask, I32 traceMask, int delta); - - // Store {8,16,32,64,128}-bit varying. - void store8 (Ptr ptr, I32 val); - void store16 (Ptr ptr, I32 val); - void store32 (Ptr ptr, I32 val); - void storeF (Ptr ptr, F32 val) { store32(ptr, pun_to_I32(val)); } - void store64 (Ptr ptr, I32 lo, I32 hi); // *ptr = lo|(hi<<32) - void store128(Ptr ptr, I32 x, I32 y, I32 z, I32 w); // *ptr = x|(y<<32)|(z<<64)|(w<<96) - - // Returns varying {n, n-1, n-2, ..., 1}, where n is the argument to Program::eval(). - I32 index(); - - // Load {8,16,32,64,128}-bit varying. - I32 load8 (Ptr ptr); - I32 load16 (Ptr ptr); - I32 load32 (Ptr ptr); - F32 loadF (Ptr ptr) { return pun_to_F32(load32(ptr)); } - I32 load64 (Ptr ptr, int lane); // Load 32-bit lane 0-1 of 64-bit value. - I32 load128(Ptr ptr, int lane); // Load 32-bit lane 0-3 of 128-bit value. - - // Load i32/f32 uniform with byte-count offset. - I32 uniform32(UPtr ptr, int offset); - F32 uniformF (UPtr ptr, int offset) { return pun_to_F32(uniform32(ptr,offset)); } - - // Load i32/f32 uniform with byte-count offset and an c-style array index. The address of - // the element is (*(ptr + byte-count offset))[index]. - I32 array32 (UPtr ptr, int offset, int index); - F32 arrayF (UPtr ptr, int offset, int index) { - return pun_to_F32(array32(ptr, offset, index)); - } - - // Push and load this color as a uniform. - Color uniformColor(SkColor4f, Uniforms*); - - // Gather u8,u16,i32 with varying element-count index from *(ptr + byte-count offset). - I32 gather8 (UPtr ptr, int offset, I32 index); - I32 gather16(UPtr ptr, int offset, I32 index); - I32 gather32(UPtr ptr, int offset, I32 index); - F32 gatherF (UPtr ptr, int offset, I32 index) { - return pun_to_F32(gather32(ptr, offset, index)); - } - - // Convenience methods for working with skvm::Uniform(s). - I32 uniform32(Uniform u) { return this->uniform32(u.ptr, u.offset); } - F32 uniformF (Uniform u) { return this->uniformF (u.ptr, u.offset); } - I32 gather8 (Uniform u, I32 index) { return this->gather8 (u.ptr, u.offset, index); } - I32 gather16 (Uniform u, I32 index) { return this->gather16 (u.ptr, u.offset, index); } - I32 gather32 (Uniform u, I32 index) { return this->gather32 (u.ptr, u.offset, index); } - F32 gatherF (Uniform u, I32 index) { return this->gatherF (u.ptr, u.offset, index); } - - // Convenience methods for working with array pointers in skvm::Uniforms. Index is an - // array index and not a byte offset. The array pointer is stored at u. - I32 array32 (Uniform a, int index) { return this->array32 (a.ptr, a.offset, index); } - F32 arrayF (Uniform a, int index) { return this->arrayF (a.ptr, a.offset, index); } - - // Load an immediate constant. - I32 splat(int n); - I32 splat(unsigned u) { return splat((int)u); } - F32 splat(float f) { - int bits; - memcpy(&bits, &f, 4); - return pun_to_F32(splat(bits)); - } - - // Some operations make sense with immediate arguments, - // so we provide overloads inline to make that seamless. - // - // We omit overloads that may indicate a bug or performance issue. - // In general it does not make sense to pass immediates to unary operations, - // and even sometimes not for binary operations, e.g. - // - // div(x, y) -- normal every day divide - // div(3.0f, y) -- yep, makes sense - // div(x, 3.0f) -- omitted as a reminder you probably want mul(x, 1/3.0f). - // - // You can of course always splat() to override these opinions. - - // float math, comparisons, etc. - F32 add(F32, F32); - F32 add(F32 x, float y) { return add(x, splat(y)); } - F32 add(float x, F32 y) { return add(splat(x), y); } - - F32 sub(F32, F32); - F32 sub(F32 x, float y) { return sub(x, splat(y)); } - F32 sub(float x, F32 y) { return sub(splat(x), y); } - - F32 mul(F32, F32); - F32 mul(F32 x, float y) { return mul(x, splat(y)); } - F32 mul(float x, F32 y) { return mul(splat(x), y); } - - // mul(), but allowing optimizations not strictly legal under IEEE-754 rules. - F32 fast_mul(F32, F32); - F32 fast_mul(F32 x, float y) { return fast_mul(x, splat(y)); } - F32 fast_mul(float x, F32 y) { return fast_mul(splat(x), y); } - - F32 div(F32, F32); - F32 div(float x, F32 y) { return div(splat(x), y); } - - F32 min(F32, F32); - F32 min(F32 x, float y) { return min(x, splat(y)); } - F32 min(float x, F32 y) { return min(splat(x), y); } - - F32 max(F32, F32); - F32 max(F32 x, float y) { return max(x, splat(y)); } - F32 max(float x, F32 y) { return max(splat(x), y); } - - // TODO: remove mad()? It's just sugar. - F32 mad(F32 x, F32 y, F32 z) { return add(mul(x,y), z); } - F32 mad(F32 x, F32 y, float z) { return mad( x , y , splat(z)); } - F32 mad(F32 x, float y, F32 z) { return mad( x , splat(y), z ); } - F32 mad(F32 x, float y, float z) { return mad( x , splat(y), splat(z)); } - F32 mad(float x, F32 y, F32 z) { return mad(splat(x), y , z ); } - F32 mad(float x, F32 y, float z) { return mad(splat(x), y , splat(z)); } - F32 mad(float x, float y, F32 z) { return mad(splat(x), splat(y), z ); } - - F32 sqrt(F32); - F32 approx_log2(F32); - F32 approx_pow2(F32); - F32 approx_log (F32 x) { return mul(0.69314718f, approx_log2(x)); } - F32 approx_exp (F32 x) { return approx_pow2(mul(x, 1.4426950408889634074f)); } - - F32 approx_powf(F32 base, F32 exp); - F32 approx_powf(F32 base, float exp) { return approx_powf(base, splat(exp)); } - F32 approx_powf(float base, F32 exp) { return approx_powf(splat(base), exp); } - - - F32 approx_sin(F32 radians); - F32 approx_cos(F32 radians) { return approx_sin(add(radians, SK_ScalarPI/2)); } - F32 approx_tan(F32 radians); - - F32 approx_asin(F32 x); - F32 approx_acos(F32 x) { return sub(SK_ScalarPI/2, approx_asin(x)); } - F32 approx_atan(F32 x); - F32 approx_atan2(F32 y, F32 x); - - F32 lerp(F32 lo, F32 hi, F32 t); - F32 lerp(F32 lo, F32 hi, float t) { return lerp( lo , hi , splat(t)); } - F32 lerp(F32 lo, float hi, float t) { return lerp( lo , splat(hi), splat(t)); } - F32 lerp(F32 lo, float hi, F32 t) { return lerp( lo , splat(hi), t ); } - F32 lerp(float lo, F32 hi, F32 t) { return lerp(splat(lo), hi , t ); } - F32 lerp(float lo, F32 hi, float t) { return lerp(splat(lo), hi , splat(t)); } - F32 lerp(float lo, float hi, F32 t) { return lerp(splat(lo), splat(hi), t ); } - - F32 clamp(F32 x, F32 lo, F32 hi) { return max(lo, min(x, hi)); } - F32 clamp(F32 x, F32 lo, float hi) { return clamp( x , lo , splat(hi)); } - F32 clamp(F32 x, float lo, float hi) { return clamp( x , splat(lo), splat(hi)); } - F32 clamp(F32 x, float lo, F32 hi) { return clamp( x , splat(lo), hi ); } - F32 clamp(float x, F32 lo, F32 hi) { return clamp(splat(x), lo , hi ); } - F32 clamp(float x, F32 lo, float hi) { return clamp(splat(x), lo , splat(hi)); } - F32 clamp(float x, float lo, F32 hi) { return clamp(splat(x), splat(lo), hi ); } - - F32 clamp01(F32 x) { return clamp(x, 0.0f, 1.0f); } - - F32 abs(F32 x) { return pun_to_F32(bit_and(pun_to_I32(x), 0x7fff'ffff)); } - F32 fract(F32 x) { return sub(x, floor(x)); } - F32 ceil(F32); - F32 floor(F32); - I32 is_NaN (F32 x) { return neq(x,x); } - I32 is_finite(F32 x) { return lt(bit_and(pun_to_I32(x), 0x7f80'0000), 0x7f80'0000); } - - I32 trunc(F32 x); - I32 round(F32 x); // Round to int using current rounding mode (as if lrintf()). - I32 pun_to_I32(F32 x) { return {x.builder, x.id}; } - - I32 to_fp16(F32 x); - F32 from_fp16(I32 x); - - I32 eq(F32, F32); - I32 eq(F32 x, float y) { return eq(x, splat(y)); } - I32 eq(float x, F32 y) { return eq(splat(x), y); } - - I32 neq(F32, F32); - I32 neq(F32 x, float y) { return neq(x, splat(y)); } - I32 neq(float x, F32 y) { return neq(splat(x), y); } - - I32 lt(F32, F32); - I32 lt(F32 x, float y) { return lt(x, splat(y)); } - I32 lt(float x, F32 y) { return lt(splat(x), y); } - - I32 lte(F32, F32); - I32 lte(F32 x, float y) { return lte(x, splat(y)); } - I32 lte(float x, F32 y) { return lte(splat(x), y); } - - I32 gt(F32, F32); - I32 gt(F32 x, float y) { return gt(x, splat(y)); } - I32 gt(float x, F32 y) { return gt(splat(x), y); } - - I32 gte(F32, F32); - I32 gte(F32 x, float y) { return gte(x, splat(y)); } - I32 gte(float x, F32 y) { return gte(splat(x), y); } - - // int math, comparisons, etc. - I32 add(I32, I32); - I32 add(I32 x, int y) { return add(x, splat(y)); } - I32 add(int x, I32 y) { return add(splat(x), y); } - - I32 sub(I32, I32); - I32 sub(I32 x, int y) { return sub(x, splat(y)); } - I32 sub(int x, I32 y) { return sub(splat(x), y); } - - I32 mul(I32, I32); - I32 mul(I32 x, int y) { return mul(x, splat(y)); } - I32 mul(int x, I32 y) { return mul(splat(x), y); } - - I32 shl(I32 x, int bits); - I32 shr(I32 x, int bits); - I32 sra(I32 x, int bits); - - I32 eq(I32, I32); - I32 eq(I32 x, int y) { return eq(x, splat(y)); } - I32 eq(int x, I32 y) { return eq(splat(x), y); } - - I32 neq(I32, I32); - I32 neq(I32 x, int y) { return neq(x, splat(y)); } - I32 neq(int x, I32 y) { return neq(splat(x), y); } - - I32 lt(I32, I32); - I32 lt(I32 x, int y) { return lt(x, splat(y)); } - I32 lt(int x, I32 y) { return lt(splat(x), y); } - - I32 lte(I32, I32); - I32 lte(I32 x, int y) { return lte(x, splat(y)); } - I32 lte(int x, I32 y) { return lte(splat(x), y); } - - I32 gt(I32, I32); - I32 gt(I32 x, int y) { return gt(x, splat(y)); } - I32 gt(int x, I32 y) { return gt(splat(x), y); } - - I32 gte(I32, I32); - I32 gte(I32 x, int y) { return gte(x, splat(y)); } - I32 gte(int x, I32 y) { return gte(splat(x), y); } - - F32 to_F32(I32 x); - F32 pun_to_F32(I32 x) { return {x.builder, x.id}; } - - // Bitwise operations. - I32 bit_and(I32, I32); - I32 bit_and(I32 x, int y) { return bit_and(x, splat(y)); } - I32 bit_and(int x, I32 y) { return bit_and(splat(x), y); } - - I32 bit_or(I32, I32); - I32 bit_or(I32 x, int y) { return bit_or(x, splat(y)); } - I32 bit_or(int x, I32 y) { return bit_or(splat(x), y); } - - I32 bit_xor(I32, I32); - I32 bit_xor(I32 x, int y) { return bit_xor(x, splat(y)); } - I32 bit_xor(int x, I32 y) { return bit_xor(splat(x), y); } - - I32 bit_clear(I32, I32); - I32 bit_clear(I32 x, int y) { return bit_clear(x, splat(y)); } - I32 bit_clear(int x, I32 y) { return bit_clear(splat(x), y); } - - I32 min(I32 x, I32 y) { return select(lte(x,y), x, y); } - I32 min(I32 x, int y) { return min(x, splat(y)); } - I32 min(int x, I32 y) { return min(splat(x), y); } - - I32 max(I32 x, I32 y) { return select(gte(x,y), x, y); } - I32 max(I32 x, int y) { return max(x, splat(y)); } - I32 max(int x, I32 y) { return max(splat(x), y); } - - I32 select(I32 cond, I32 t, I32 f); // cond ? t : f - I32 select(I32 cond, int t, I32 f) { return select(cond, splat(t), f ); } - I32 select(I32 cond, I32 t, int f) { return select(cond, t , splat(f)); } - I32 select(I32 cond, int t, int f) { return select(cond, splat(t), splat(f)); } - - F32 select(I32 cond, F32 t, F32 f) { - return pun_to_F32(select(cond, pun_to_I32(t) - , pun_to_I32(f))); - } - F32 select(I32 cond, float t, F32 f) { return select(cond, splat(t), f ); } - F32 select(I32 cond, F32 t, float f) { return select(cond, t , splat(f)); } - F32 select(I32 cond, float t, float f) { return select(cond, splat(t), splat(f)); } - - I32 extract(I32 x, int bits, I32 z); // (x>>bits) & z - I32 extract(I32 x, int bits, int z) { return extract(x, bits, splat(z)); } - I32 extract(int x, int bits, I32 z) { return extract(splat(x), bits, z); } - - I32 pack(I32 x, I32 y, int bits); // x | (y< x * (1/255.0f) - I32 to_unorm(int bits, F32); // E.g. to_unorm(8, x) -> round(x * 255) - - Color load(PixelFormat, Ptr ptr); - void store(PixelFormat, Ptr ptr, Color); - Color gather(PixelFormat, UPtr ptr, int offset, I32 index); - Color gather(PixelFormat f, Uniform u, I32 index) { - return gather(f, u.ptr, u.offset, index); - } - - void premul(F32* r, F32* g, F32* b, F32 a); - void unpremul(F32* r, F32* g, F32* b, F32 a); - - Color premul(Color c) { this->premul(&c.r, &c.g, &c.b, c.a); return c; } - Color unpremul(Color c) { this->unpremul(&c.r, &c.g, &c.b, c.a); return c; } - - Color lerp(Color lo, Color hi, F32 t); - Color blend(SkBlendMode, Color src, Color dst); - - Color clamp01(Color c) { - return { clamp01(c.r), clamp01(c.g), clamp01(c.b), clamp01(c.a) }; - } - - HSLA to_hsla(Color); - Color to_rgba(HSLA); - - void dump(SkWStream* = nullptr) const; - - uint64_t hash() const; - - Val push(Instruction); - - bool allImm() const { return true; } - - template - bool allImm(Val id, T* imm, Rest... rest) const { - if (fProgram[id].op == Op::splat) { - static_assert(sizeof(T) == 4); - memcpy(imm, &fProgram[id].immA, 4); - return this->allImm(rest...); - } - return false; - } - - bool allUniform() const { return true; } - - template - bool allUniform(Val id, Uniform* uni, Rest... rest) const { - if (fProgram[id].op == Op::uniform32) { - uni->ptr.ix = fProgram[id].immA; - uni->offset = fProgram[id].immB; - return this->allUniform(rest...); - } - return false; - } - - private: - // Declare an argument with given stride (use stride=0 for uniforms). - Ptr arg(int stride); - - Val push( - Op op, Val x=NA, Val y=NA, Val z=NA, Val w=NA, int immA=0, int immB=0, int immC=0) { - return this->push(Instruction{op, x,y,z,w, immA,immB,immC}); - } - - template - bool isImm(Val id, T want) const { - T imm = 0; - return this->allImm(id, &imm) && imm == want; - } - - // `canonicalizeIdOrder` and has two rules: - // - Immediate values go last; that is, `x + 1` is preferred over `1 + x`. - // - If both/neither of x and y are immediate, lower IDs go before higher IDs. - // Canonicalizing the IDs helps with opcode deduplication. Putting immediates in a - // consistent position makes it easier to detect no-op arithmetic like `x + 0`. - template - void canonicalizeIdOrder(F32_or_I32& x, F32_or_I32& y); - - // If the passed in ID is a bit-not, return the value being bit-notted. Otherwise, NA. - Val holdsBitNot(Val id); - - skia_private::THashMap fIndex; - std::vector fProgram; - std::vector fTraceHooks; - std::vector fStrides; - const Features fFeatures; - bool fCreateDuplicates; - }; - - // Optimization passes and data structures normally used by Builder::optimize(), - // extracted here so they can be unit tested. - std::vector eliminate_dead_code(std::vector); - std::vector finalize(std::vector); - - using Reg = int; - - // d = op(x,y,z,w, immA,immB) - struct InterpreterInstruction { - Op op; - Reg d,x,y,z,w; - int immA,immB,immC; - }; - - class Program { - public: - Program(const std::vector& instructions, - const std::vector& strides, - const std::vector& traceHooks, - const char* debug_name, bool allow_jit); - - Program(); - ~Program(); - - Program(Program&&); - Program& operator=(Program&&); - - Program(const Program&) = delete; - Program& operator=(const Program&) = delete; - - void eval(int n, void* args[]) const; - - template - void eval(int n, T*... arg) const { - SkASSERT(sizeof...(arg) == this->nargs()); - // This nullptr isn't important except that it makes args[] non-empty if you pass none. - void* args[] = { (void*)arg..., nullptr }; - this->eval(n, args); - } - - std::vector instructions() const; - int nargs() const; - int nregs() const; - int loop () const; - bool empty() const; - - bool hasJIT() const; // Has this Program been JITted? - bool hasTraceHooks() const; // Is this program instrumented for debugging? - - void dump(SkWStream* = nullptr) const; - void disassemble(SkWStream* = nullptr) const; - - private: - void setupInterpreter(const std::vector&); - void setupJIT (const std::vector&, const char* debug_name); - - bool jit(const std::vector&, - int* stack_hint, uint32_t* registers_used, - Assembler*) const; - - void dropJIT(); - - struct Impl; - std::unique_ptr fImpl; - }; - - // TODO: control flow - // TODO: 64-bit values? - -#define SI static inline - - SI I32 operator+(I32 x, I32 y) { return x->add(x,y); } - SI I32 operator+(I32 x, int y) { return x->add(x,y); } - SI I32 operator+(int x, I32 y) { return y->add(x,y); } - - SI I32 operator-(I32 x, I32 y) { return x->sub(x,y); } - SI I32 operator-(I32 x, int y) { return x->sub(x,y); } - SI I32 operator-(int x, I32 y) { return y->sub(x,y); } - - SI I32 operator*(I32 x, I32 y) { return x->mul(x,y); } - SI I32 operator*(I32 x, int y) { return x->mul(x,y); } - SI I32 operator*(int x, I32 y) { return y->mul(x,y); } - - SI I32 min(I32 x, I32 y) { return x->min(x,y); } - SI I32 min(I32 x, int y) { return x->min(x,y); } - SI I32 min(int x, I32 y) { return y->min(x,y); } - - SI I32 max(I32 x, I32 y) { return x->max(x,y); } - SI I32 max(I32 x, int y) { return x->max(x,y); } - SI I32 max(int x, I32 y) { return y->max(x,y); } - - SI I32 operator==(I32 x, I32 y) { return x->eq(x,y); } - SI I32 operator==(I32 x, int y) { return x->eq(x,y); } - SI I32 operator==(int x, I32 y) { return y->eq(x,y); } - - SI I32 operator!=(I32 x, I32 y) { return x->neq(x,y); } - SI I32 operator!=(I32 x, int y) { return x->neq(x,y); } - SI I32 operator!=(int x, I32 y) { return y->neq(x,y); } - - SI I32 operator< (I32 x, I32 y) { return x->lt(x,y); } - SI I32 operator< (I32 x, int y) { return x->lt(x,y); } - SI I32 operator< (int x, I32 y) { return y->lt(x,y); } - - SI I32 operator<=(I32 x, I32 y) { return x->lte(x,y); } - SI I32 operator<=(I32 x, int y) { return x->lte(x,y); } - SI I32 operator<=(int x, I32 y) { return y->lte(x,y); } - - SI I32 operator> (I32 x, I32 y) { return x->gt(x,y); } - SI I32 operator> (I32 x, int y) { return x->gt(x,y); } - SI I32 operator> (int x, I32 y) { return y->gt(x,y); } - - SI I32 operator>=(I32 x, I32 y) { return x->gte(x,y); } - SI I32 operator>=(I32 x, int y) { return x->gte(x,y); } - SI I32 operator>=(int x, I32 y) { return y->gte(x,y); } - - - SI F32 operator+(F32 x, F32 y) { return x->add(x,y); } - SI F32 operator+(F32 x, float y) { return x->add(x,y); } - SI F32 operator+(float x, F32 y) { return y->add(x,y); } - - SI F32 operator-(F32 x, F32 y) { return x->sub(x,y); } - SI F32 operator-(F32 x, float y) { return x->sub(x,y); } - SI F32 operator-(float x, F32 y) { return y->sub(x,y); } - - SI F32 operator*(F32 x, F32 y) { return x->mul(x,y); } - SI F32 operator*(F32 x, float y) { return x->mul(x,y); } - SI F32 operator*(float x, F32 y) { return y->mul(x,y); } - - SI F32 fast_mul(F32 x, F32 y) { return x->fast_mul(x,y); } - SI F32 fast_mul(F32 x, float y) { return x->fast_mul(x,y); } - SI F32 fast_mul(float x, F32 y) { return y->fast_mul(x,y); } - - SI F32 operator/(F32 x, F32 y) { return x->div(x,y); } - SI F32 operator/(float x, F32 y) { return y->div(x,y); } - - SI F32 min(F32 x, F32 y) { return x->min(x,y); } - SI F32 min(F32 x, float y) { return x->min(x,y); } - SI F32 min(float x, F32 y) { return y->min(x,y); } - - SI F32 max(F32 x, F32 y) { return x->max(x,y); } - SI F32 max(F32 x, float y) { return x->max(x,y); } - SI F32 max(float x, F32 y) { return y->max(x,y); } - - SI I32 operator==(F32 x, F32 y) { return x->eq(x,y); } - SI I32 operator==(F32 x, float y) { return x->eq(x,y); } - SI I32 operator==(float x, F32 y) { return y->eq(x,y); } - - SI I32 operator!=(F32 x, F32 y) { return x->neq(x,y); } - SI I32 operator!=(F32 x, float y) { return x->neq(x,y); } - SI I32 operator!=(float x, F32 y) { return y->neq(x,y); } - - SI I32 operator< (F32 x, F32 y) { return x->lt(x,y); } - SI I32 operator< (F32 x, float y) { return x->lt(x,y); } - SI I32 operator< (float x, F32 y) { return y->lt(x,y); } - - SI I32 operator<=(F32 x, F32 y) { return x->lte(x,y); } - SI I32 operator<=(F32 x, float y) { return x->lte(x,y); } - SI I32 operator<=(float x, F32 y) { return y->lte(x,y); } - - SI I32 operator> (F32 x, F32 y) { return x->gt(x,y); } - SI I32 operator> (F32 x, float y) { return x->gt(x,y); } - SI I32 operator> (float x, F32 y) { return y->gt(x,y); } - - SI I32 operator>=(F32 x, F32 y) { return x->gte(x,y); } - SI I32 operator>=(F32 x, float y) { return x->gte(x,y); } - SI I32 operator>=(float x, F32 y) { return y->gte(x,y); } - - SI I32& operator+=(I32& x, I32 y) { return (x = x + y); } - SI I32& operator+=(I32& x, int y) { return (x = x + y); } - - SI I32& operator-=(I32& x, I32 y) { return (x = x - y); } - SI I32& operator-=(I32& x, int y) { return (x = x - y); } - - SI I32& operator*=(I32& x, I32 y) { return (x = x * y); } - SI I32& operator*=(I32& x, int y) { return (x = x * y); } - - SI F32& operator+=(F32& x, F32 y) { return (x = x + y); } - SI F32& operator+=(F32& x, float y) { return (x = x + y); } - - SI F32& operator-=(F32& x, F32 y) { return (x = x - y); } - SI F32& operator-=(F32& x, float y) { return (x = x - y); } - - SI F32& operator*=(F32& x, F32 y) { return (x = x * y); } - SI F32& operator*=(F32& x, float y) { return (x = x * y); } - - SI F32& operator/=(F32& x, F32 y) { return (x = x / y); } - - SI void assert_true(I32 cond, I32 debug) { cond->assert_true(cond,debug); } - SI void assert_true(I32 cond, F32 debug) { cond->assert_true(cond,debug); } - SI void assert_true(I32 cond) { cond->assert_true(cond); } - - SI void store8 (Ptr ptr, I32 val) { val->store8 (ptr, val); } - SI void store16 (Ptr ptr, I32 val) { val->store16 (ptr, val); } - SI void store32 (Ptr ptr, I32 val) { val->store32 (ptr, val); } - SI void storeF (Ptr ptr, F32 val) { val->storeF (ptr, val); } - SI void store64 (Ptr ptr, I32 lo, I32 hi) { lo ->store64 (ptr, lo,hi); } - SI void store128(Ptr ptr, I32 x, I32 y, I32 z, I32 w) { x ->store128(ptr, x,y,z,w); } - - SI I32 gather8 (UPtr ptr, int off, I32 ix) { return ix->gather8 (ptr, off, ix); } - SI I32 gather16(UPtr ptr, int off, I32 ix) { return ix->gather16(ptr, off, ix); } - SI I32 gather32(UPtr ptr, int off, I32 ix) { return ix->gather32(ptr, off, ix); } - SI F32 gatherF (UPtr ptr, int off, I32 ix) { return ix->gatherF (ptr, off, ix); } - - SI I32 gather8 (Uniform u, I32 ix) { return ix->gather8 (u, ix); } - SI I32 gather16(Uniform u, I32 ix) { return ix->gather16(u, ix); } - SI I32 gather32(Uniform u, I32 ix) { return ix->gather32(u, ix); } - SI F32 gatherF (Uniform u, I32 ix) { return ix->gatherF (u, ix); } - - SI F32 sqrt(F32 x) { return x-> sqrt(x); } - SI F32 approx_log2(F32 x) { return x->approx_log2(x); } - SI F32 approx_pow2(F32 x) { return x->approx_pow2(x); } - SI F32 approx_log (F32 x) { return x->approx_log (x); } - SI F32 approx_exp (F32 x) { return x->approx_exp (x); } - - SI F32 approx_powf(F32 base, F32 exp) { return base->approx_powf(base, exp); } - SI F32 approx_powf(F32 base, float exp) { return base->approx_powf(base, exp); } - SI F32 approx_powf(float base, F32 exp) { return exp->approx_powf(base, exp); } - - SI F32 approx_sin(F32 radians) { return radians->approx_sin(radians); } - SI F32 approx_cos(F32 radians) { return radians->approx_cos(radians); } - SI F32 approx_tan(F32 radians) { return radians->approx_tan(radians); } - - SI F32 approx_asin(F32 x) { return x->approx_asin(x); } - SI F32 approx_acos(F32 x) { return x->approx_acos(x); } - SI F32 approx_atan(F32 x) { return x->approx_atan(x); } - SI F32 approx_atan2(F32 y, F32 x) { return x->approx_atan2(y, x); } - - SI F32 clamp01(F32 x) { return x-> clamp01(x); } - SI F32 abs(F32 x) { return x-> abs(x); } - SI F32 ceil(F32 x) { return x-> ceil(x); } - SI F32 fract(F32 x) { return x-> fract(x); } - SI F32 floor(F32 x) { return x-> floor(x); } - SI I32 is_NaN(F32 x) { return x-> is_NaN(x); } - SI I32 is_finite(F32 x) { return x->is_finite(x); } - - SI I32 trunc(F32 x) { return x-> trunc(x); } - SI I32 round(F32 x) { return x-> round(x); } - SI I32 pun_to_I32(F32 x) { return x-> pun_to_I32(x); } - SI F32 pun_to_F32(I32 x) { return x-> pun_to_F32(x); } - SI F32 to_F32(I32 x) { return x-> to_F32(x); } - SI I32 to_fp16(F32 x) { return x-> to_fp16(x); } - SI F32 from_fp16(I32 x) { return x-> from_fp16(x); } - - SI F32 lerp(F32 lo, F32 hi, F32 t) { return lo->lerp(lo,hi,t); } - SI F32 lerp(F32 lo, F32 hi, float t) { return lo->lerp(lo,hi,t); } - SI F32 lerp(F32 lo, float hi, F32 t) { return lo->lerp(lo,hi,t); } - SI F32 lerp(F32 lo, float hi, float t) { return lo->lerp(lo,hi,t); } - SI F32 lerp(float lo, F32 hi, F32 t) { return hi->lerp(lo,hi,t); } - SI F32 lerp(float lo, F32 hi, float t) { return hi->lerp(lo,hi,t); } - SI F32 lerp(float lo, float hi, F32 t) { return t->lerp(lo,hi,t); } - - SI F32 clamp(F32 x, F32 lo, F32 hi) { return x->clamp(x,lo,hi); } - SI F32 clamp(F32 x, F32 lo, float hi) { return x->clamp(x,lo,hi); } - SI F32 clamp(F32 x, float lo, F32 hi) { return x->clamp(x,lo,hi); } - SI F32 clamp(F32 x, float lo, float hi) { return x->clamp(x,lo,hi); } - SI F32 clamp(float x, F32 lo, F32 hi) { return lo->clamp(x,lo,hi); } - SI F32 clamp(float x, F32 lo, float hi) { return lo->clamp(x,lo,hi); } - SI F32 clamp(float x, float lo, F32 hi) { return hi->clamp(x,lo,hi); } - - SI I32 operator<<(I32 x, int bits) { return x->shl(x, bits); } - SI I32 shl(I32 x, int bits) { return x->shl(x, bits); } - SI I32 shr(I32 x, int bits) { return x->shr(x, bits); } - SI I32 sra(I32 x, int bits) { return x->sra(x, bits); } - - SI I32 operator&(I32 x, I32 y) { return x->bit_and(x,y); } - SI I32 operator&(I32 x, int y) { return x->bit_and(x,y); } - SI I32 operator&(int x, I32 y) { return y->bit_and(x,y); } - - SI I32 operator|(I32 x, I32 y) { return x->bit_or (x,y); } - SI I32 operator|(I32 x, int y) { return x->bit_or (x,y); } - SI I32 operator|(int x, I32 y) { return y->bit_or (x,y); } - - SI I32 operator^(I32 x, I32 y) { return x->bit_xor(x,y); } - SI I32 operator^(I32 x, int y) { return x->bit_xor(x,y); } - SI I32 operator^(int x, I32 y) { return y->bit_xor(x,y); } - - SI I32& operator&=(I32& x, I32 y) { return (x = x & y); } - SI I32& operator&=(I32& x, int y) { return (x = x & y); } - SI I32& operator|=(I32& x, I32 y) { return (x = x | y); } - SI I32& operator|=(I32& x, int y) { return (x = x | y); } - SI I32& operator^=(I32& x, I32 y) { return (x = x ^ y); } - SI I32& operator^=(I32& x, int y) { return (x = x ^ y); } - - SI I32 bit_clear(I32 x, I32 y) { return x->bit_clear(x,y); } - SI I32 bit_clear(I32 x, int y) { return x->bit_clear(x,y); } - SI I32 bit_clear(int x, I32 y) { return y->bit_clear(x,y); } - - SI I32 select(I32 c, I32 t, I32 f) { return c->select(c, t , f ); } - SI I32 select(I32 c, I32 t, int f) { return c->select(c, t , c->splat(f)); } - SI I32 select(I32 c, int t, I32 f) { return c->select(c, c->splat(t), f ); } - SI I32 select(I32 c, int t, int f) { return c->select(c, c->splat(t), c->splat(f)); } - - SI F32 select(I32 c, F32 t, F32 f) { return c->select(c, t , f ); } - SI F32 select(I32 c, F32 t, float f) { return c->select(c, t , c->splat(f)); } - SI F32 select(I32 c, float t, F32 f) { return c->select(c, c->splat(t), f ); } - SI F32 select(I32 c, float t, float f) { return c->select(c, c->splat(t), c->splat(f)); } - - SI I32 extract(I32 x, int bits, I32 z) { return x->extract(x,bits,z); } - SI I32 extract(I32 x, int bits, int z) { return x->extract(x,bits,z); } - SI I32 extract(int x, int bits, I32 z) { return z->extract(x,bits,z); } - - SI I32 pack(I32 x, I32 y, int bits) { return x->pack (x,y,bits); } - SI I32 pack(I32 x, int y, int bits) { return x->pack (x,y,bits); } - SI I32 pack(int x, I32 y, int bits) { return y->pack (x,y,bits); } - - SI I32 operator~(I32 x) { return ~0 ^ x; } - SI I32 operator-(I32 x) { return 0 - x; } - SI F32 operator-(F32 x) { return 0.0f - x; } - - SI F32 from_unorm(int bits, I32 x) { return x->from_unorm(bits,x); } - SI I32 to_unorm(int bits, F32 x) { return x-> to_unorm(bits,x); } - - SI void store(PixelFormat f, Ptr p, Color c) { return c->store(f,p,c); } - - SI Color gather(PixelFormat f, UPtr p, int off, I32 ix) { return ix->gather(f,p,off,ix); } - SI Color gather(PixelFormat f, Uniform u , I32 ix) { return ix->gather(f,u,ix); } - - SI void premul(F32* r, F32* g, F32* b, F32 a) { a-> premul(r,g,b,a); } - SI void unpremul(F32* r, F32* g, F32* b, F32 a) { a->unpremul(r,g,b,a); } - - SI Color premul(Color c) { return c-> premul(c); } - SI Color unpremul(Color c) { return c->unpremul(c); } - - SI Color lerp(Color lo, Color hi, F32 t) { return t->lerp(lo,hi,t); } - - SI Color blend(SkBlendMode m, Color s, Color d) { return s->blend(m,s,d); } - - SI Color clamp01(Color c) { return c->clamp01(c); } - - SI HSLA to_hsla(Color c) { return c->to_hsla(c); } - SI Color to_rgba(HSLA c) { return c->to_rgba(c); } - - // Evaluate polynomials: ax^n + bx^(n-1) + ... for n >= 1 - template - SI F32 poly(F32 x, F32_or_float a, float b, Rest... rest) { - if constexpr (sizeof...(rest) == 0) { - return x*a+b; - } else { - return poly(x, x*a+b, rest...); - } - } -#undef SI -} // namespace skvm - -#endif // defined(SK_ENABLE_SKVM) -#endif // SkVM_DEFINED diff --git a/src/core/SkVMBlitter.cpp b/src/core/SkVMBlitter.cpp deleted file mode 100644 index 4121fe8e64de..000000000000 --- a/src/core/SkVMBlitter.cpp +++ /dev/null @@ -1,813 +0,0 @@ -/* - * Copyright 2019 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#include "src/core/SkVMBlitter.h" - -#include "include/core/SkBlender.h" -#include "include/private/base/SkMacros.h" -#include "src/base/SkArenaAlloc.h" -#include "src/core/SkBlendModePriv.h" -#include "src/core/SkBlenderBase.h" -#include "src/core/SkChecksum.h" -#include "src/core/SkColorSpacePriv.h" -#include "src/core/SkColorSpaceXformSteps.h" -#include "src/core/SkCoreBlitters.h" -#include "src/core/SkImageInfoPriv.h" -#include "src/core/SkLRUCache.h" -#include "src/core/SkMask.h" -#include "src/core/SkMatrixProvider.h" -#include "src/core/SkPaintPriv.h" -#include "src/core/SkVM.h" -#include "src/effects/colorfilters/SkColorFilterBase.h" -#include "src/shaders/SkColorFilterShader.h" -#include "src/shaders/SkEmptyShader.h" - -#include - -#ifdef SK_ENABLE_SKVM - -namespace { - - // Uniforms set by the Blitter itself, - // rather than by the Shader, which follow this struct in the skvm::Uniforms buffer. - struct BlitterUniforms { - int right; // First device x + blit run length n, used to get device x coordinate. - int y; // Device y coordinate. - }; - static_assert(SkIsAlign4(sizeof(BlitterUniforms)), ""); - inline static constexpr int kBlitterUniformsCount = sizeof(BlitterUniforms) / 4; - - static skvm::Coord device_coord(skvm::Builder* p, skvm::Uniforms* uniforms) { - skvm::I32 dx = p->uniform32(uniforms->base, offsetof(BlitterUniforms, right)) - - p->index(), - dy = p->uniform32(uniforms->base, offsetof(BlitterUniforms, y)); - return { - to_F32(dx) + 0.5f, - to_F32(dy) + 0.5f, - }; - } - - struct NoopColorFilter final : public SkColorFilterBase { - skvm::Color onProgram(skvm::Builder*, skvm::Color c, - const SkColorInfo&, skvm::Uniforms*, SkArenaAlloc*) const override { - return c; - } - - SkColorFilterBase::Type type() const override { return SkColorFilterBase::Type::kNoop; } - - bool appendStages(const SkStageRec&, bool) const override { return true; } - - // Only created here, should never be flattened / unflattened. - Factory getFactory() const override { return nullptr; } - const char* getTypeName() const override { return "NoopColorFilter"; } - }; - - struct SpriteShader : public SkEmptyShader { - explicit SpriteShader(SkPixmap sprite) : fSprite(sprite) {} - - SkPixmap fSprite; - - // Only created here temporarily... never serialized. - Factory getFactory() const override { return nullptr; } - const char* getTypeName() const override { return "SpriteShader"; } - - bool isOpaque() const override { return fSprite.isOpaque(); } - - skvm::Color program(skvm::Builder* p, - skvm::Coord /*device*/, - skvm::Coord /*local*/, - skvm::Color /*paint*/, - const SkShaders::MatrixRec&, - const SkColorInfo& dst, - skvm::Uniforms* uniforms, - SkArenaAlloc*) const override { - const SkColorType ct = fSprite.colorType(); - - skvm::PixelFormat fmt = skvm::SkColorType_to_PixelFormat(ct); - - skvm::Color c = p->load(fmt, p->varying(SkColorTypeBytesPerPixel(ct))); - - return SkColorSpaceXformSteps{fSprite, dst}.program(p, uniforms, c); - } - }; - - struct DitherShader : public SkEmptyShader { - explicit DitherShader(sk_sp shader) : fShader(std::move(shader)) {} - - sk_sp fShader; - - // Only created here temporarily... never serialized. - Factory getFactory() const override { return nullptr; } - const char* getTypeName() const override { return "DitherShader"; } - - bool isOpaque() const override { return fShader->isOpaque(); } - - skvm::Color program(skvm::Builder* p, - skvm::Coord device, - skvm::Coord local, - skvm::Color paint, - const SkShaders::MatrixRec& mRec, - const SkColorInfo& dst, - skvm::Uniforms* uniforms, - SkArenaAlloc* alloc) const override { - // Run our wrapped shader. - skvm::Color c = as_SB(fShader)->program(p, - device, - local, - paint, - mRec, - dst, - uniforms, - alloc); - if (!c) { - return {}; - } - - float rate = 0.0f; - switch (dst.colorType()) { - case kARGB_4444_SkColorType: - rate = 1 / 15.0f; - break; - case kRGB_565_SkColorType: - rate = 1 / 63.0f; - break; - case kGray_8_SkColorType: - case kRGB_888x_SkColorType: - case kRGBA_8888_SkColorType: - case kBGRA_8888_SkColorType: - case kSRGBA_8888_SkColorType: - case kR8_unorm_SkColorType: - rate = 1 / 255.0f; - break; - case kRGB_101010x_SkColorType: - case kRGBA_1010102_SkColorType: - case kBGR_101010x_SkColorType: - case kBGRA_1010102_SkColorType: - rate = 1 / 1023.0f; - break; - - case kUnknown_SkColorType: - case kAlpha_8_SkColorType: - case kBGR_101010x_XR_SkColorType: - case kRGBA_F16_SkColorType: - case kRGBA_F16Norm_SkColorType: - case kRGBA_F32_SkColorType: - case kR8G8_unorm_SkColorType: - case kA16_float_SkColorType: - case kA16_unorm_SkColorType: - case kR16G16_float_SkColorType: - case kR16G16_unorm_SkColorType: - case kR16G16B16A16_unorm_SkColorType: - return c; - } - - // See SkRasterPipeline dither stage. - // This is 8x8 ordered dithering. From here we'll only need dx and dx^dy. - SkASSERT(local.x.id == device.x.id); - SkASSERT(local.y.id == device.y.id); - skvm::I32 X = trunc(device.x - 0.5f), - Y = X ^ trunc(device.y - 0.5f); - - // If X's low bits are abc and Y's def, M is fcebda, - // 6 bits producing all values [0,63] shuffled over an 8x8 grid. - skvm::I32 M = shl(Y & 1, 5) - | shl(X & 1, 4) - | shl(Y & 2, 2) - | shl(X & 2, 1) - | shr(Y & 4, 1) - | shr(X & 4, 2); - - // Scale to [0,1) by /64, then to (-0.5,0.5) using 63/128 (~0.492) as 0.5-ε, - // and finally scale all that by rate. We keep dither strength strictly - // within ±0.5 to not change exact values like 0 or 1. - - // rate could be a uniform, but since it's based on the destination SkColorType, - // we can bake it in without hurting the cache hit rate. - float scale = rate * ( 2/128.0f), - bias = rate * (-63/128.0f); - skvm::F32 dither = to_F32(M) * scale + bias; - c.r += dither; - c.g += dither; - c.b += dither; - - c.r = clamp(c.r, 0.0f, c.a); - c.g = clamp(c.g, 0.0f, c.a); - c.b = clamp(c.b, 0.0f, c.a); - return c; - } - }; -} // namespace - -bool SkVMBlitter::Key::operator==(const Key& that) const { - return this->shader == that.shader - && this->clip == that.clip - && this->blender == that.blender - && this->colorSpace == that.colorSpace - && this->colorType == that.colorType - && this->alphaType == that.alphaType - && this->coverage == that.coverage; -} - -SkVMBlitter::Key SkVMBlitter::Key::withCoverage(Coverage c) const { - Key k = *this; - k.coverage = SkToU8(c); - return k; -} - -SkVMBlitter::Params SkVMBlitter::Params::withCoverage(Coverage c) const { - Params p = *this; - p.coverage = c; - return p; -} - -SkVMBlitter::Params SkVMBlitter::EffectiveParams(const SkPixmap& device, - const SkPixmap* sprite, - SkPaint paint, - const SkMatrix& ctm, - sk_sp clip) { - // Sprites take priority over any shader. (There's rarely one set, and it's meaningless.) - if (sprite) { - paint.setShader(sk_make_sp(*sprite)); - } - - // Normal blitters will have already folded color filters into their shader, - // but we may still need to do that here for SpriteShaders. - if (paint.getColorFilter()) { - SkPaintPriv::RemoveColorFilter(&paint, device.colorSpace()); - } - SkASSERT(!paint.getColorFilter()); - - // If there's no explicit shader, SkColorShader is the shader, - // but if there is a shader, it's modulated by the paint alpha. - sk_sp shader = paint.refShader(); - if (!shader) { - shader = SkShaders::Color(paint.getColor4f(), nullptr); - if (!shader) { - // If the paint color is non-finite (possible after RemoveColorFilter), we might not - // have a shader. (oss-fuzz:49391) - shader = SkShaders::Color(SK_ColorTRANSPARENT); - } - } else if (paint.getAlphaf() < 1.0f) { - shader = sk_make_sp(std::move(shader), - paint.getAlphaf(), - sk_make_sp()); - paint.setAlphaf(1.0f); - } - - // Add dither to the end of the shader pipeline if requested and needed. - if (paint.isDither() && !as_SB(shader)->isConstant()) { - shader = sk_make_sp(std::move(shader)); - } - - // Add the blender. - sk_sp blender = paint.refBlender(); - if (!blender) { - blender = SkBlender::Mode(SkBlendMode::kSrcOver); - } - - // The most common blend mode is SrcOver, and it can be strength-reduced - // _greatly_ to Src mode when the shader is opaque. - // - // In general all the information we use to make decisions here need to - // be reflected in Params and Key to make program caching sound, and it - // might appear that shader->isOpaque() is a property of the shader's - // uniforms than its fundamental program structure and so unsafe to use. - // - // Opacity is such a powerful property that SkShaderBase::program() - // forces opacity for any shader subclass that claims isOpaque(), so - // the opaque bit is strongly guaranteed to be part of the program and - // not just a property of the uniforms. The shader program hash includes - // this information, making it safe to use anywhere in the blitter codegen. - if (as_BB(blender)->asBlendMode() == SkBlendMode::kSrcOver && shader->isOpaque()) { - blender = SkBlender::Mode(SkBlendMode::kSrc); - } - - SkColor4f paintColor = paint.getColor4f(); - SkColorSpaceXformSteps{sk_srgb_singleton(), kUnpremul_SkAlphaType, - device.colorSpace(), kUnpremul_SkAlphaType} - .apply(paintColor.vec()); - - return { - std::move(shader), - std::move(clip), - std::move(blender), - { device.colorType(), device.alphaType(), device.refColorSpace() }, - Coverage::Full, // Placeholder... withCoverage() will change as needed. - paintColor, - ctm, - }; -} - -skvm::Color SkVMBlitter::DstColor(skvm::Builder* p, const Params& params) { - skvm::PixelFormat dstFormat = skvm::SkColorType_to_PixelFormat(params.dst.colorType()); - skvm::Ptr dst_ptr = p->varying(SkColorTypeBytesPerPixel(params.dst.colorType())); - return p->load(dstFormat, dst_ptr); -} - -void SkVMBlitter::BuildProgram(skvm::Builder* p, const Params& params, - skvm::Uniforms* uniforms, SkArenaAlloc* alloc) { - // First two arguments are always uniforms and the destination buffer. - uniforms->base = p->uniform(); - skvm::Ptr dst_ptr = p->varying(SkColorTypeBytesPerPixel(params.dst.colorType())); - // A SpriteShader (in this file) may next use one argument as its varying source. - // Subsequent arguments depend on params.coverage: - // - Full: (no more arguments) - // - Mask3D: mul varying, add varying, 8-bit coverage varying - // - MaskA8: 8-bit coverage varying - // - MaskLCD16: 565 coverage varying - // - UniformF: float coverage uniform - - skvm::Coord device = device_coord(p, uniforms); - skvm::Color paint = p->uniformColor(params.paint, uniforms); - - // See note about arguments above: a SpriteShader will call p->arg() once during program(). - skvm::Color src = as_SB(params.shader)->rootProgram(p, - device, - paint, - params.ctm, - params.dst, - uniforms, - alloc); - SkASSERT(src); - if (params.coverage == Coverage::Mask3D) { - skvm::F32 M = from_unorm(8, p->load8(p->varying())), - A = from_unorm(8, p->load8(p->varying())); - - src.r = min(src.r * M + A, src.a); - src.g = min(src.g * M + A, src.a); - src.b = min(src.b * M + A, src.a); - } - - // GL clamps all its color channels to limits of the format just before the blend step (~here). - // TODO: Below, we also clamp after the blend step. If we can prove that none of the work here - // (especially blending, for built-in blend modes) will produce colors outside [0, 1] we may be - // able to skip the second clamp. For now, we clamp twice. - if (SkColorTypeIsNormalized(params.dst.colorType())) { - src = clamp01(src); - } - - // Load the destination color. - skvm::PixelFormat dstFormat = skvm::SkColorType_to_PixelFormat(params.dst.colorType()); - skvm::Color dst = p->load(dstFormat, dst_ptr); - if (params.dst.isOpaque()) { - // When a destination is known opaque, we may assume it both starts and stays fully - // opaque, ignoring any math that disagrees. This sometimes trims a little work. - dst.a = p->splat(1.0f); - } else if (params.dst.alphaType() == kUnpremul_SkAlphaType) { - // All our blending works in terms of premul. - dst = premul(dst); - } - - // Load coverage. - skvm::Color cov; - switch (params.coverage) { - case Coverage::Full: - cov.r = cov.g = cov.b = cov.a = p->splat(1.0f); - break; - - case Coverage::UniformF: - cov.r = cov.g = cov.b = cov.a = p->uniformF(p->uniform(), 0); - break; - - case Coverage::Mask3D: - case Coverage::MaskA8: - cov.r = cov.g = cov.b = cov.a = from_unorm(8, p->load8(p->varying())); - break; - - case Coverage::MaskLCD16: { - skvm::PixelFormat fmt = skvm::SkColorType_to_PixelFormat(kRGB_565_SkColorType); - cov = p->load(fmt, p->varying()); - cov.a = select(src.a < dst.a, min(cov.r, min(cov.g, cov.b)), - max(cov.r, max(cov.g, cov.b))); - } break; - - case Coverage::kCount: - SkUNREACHABLE; - } - if (params.clip) { - skvm::Color clip = as_SB(params.clip)->rootProgram(p, - device, - paint, - params.ctm, - params.dst, - uniforms, - alloc); - SkAssertResult(clip); - cov.r *= clip.a; // We use the alpha channel of clip for all four. - cov.g *= clip.a; - cov.b *= clip.a; - cov.a *= clip.a; - } - - const SkBlenderBase* blender = as_BB(params.blender); - const auto as_blendmode = blender->asBlendMode(); - - // The math for some blend modes lets us fold coverage into src before the blend, which is - // simpler than the canonical post-blend lerp(). - bool applyPostBlendCoverage = true; - if (as_blendmode && - SkBlendMode_ShouldPreScaleCoverage(as_blendmode.value(), - params.coverage == Coverage::MaskLCD16)) { - applyPostBlendCoverage = false; - src.r *= cov.r; - src.g *= cov.g; - src.b *= cov.b; - src.a *= cov.a; - } - - // Apply our blend function to the computed color. - src = blender->program(p, src, dst, params.dst, uniforms, alloc); - - if (applyPostBlendCoverage) { - src.r = lerp(dst.r, src.r, cov.r); - src.g = lerp(dst.g, src.g, cov.g); - src.b = lerp(dst.b, src.b, cov.b); - src.a = lerp(dst.a, src.a, cov.a); - } - - if (params.dst.isOpaque()) { - // (See the note above when loading the destination color.) - src.a = p->splat(1.0f); - } else if (params.dst.alphaType() == kUnpremul_SkAlphaType) { - src = unpremul(src); - } - - // Clamp to fit destination color format if needed. - if (SkColorTypeIsNormalized(params.dst.colorType())) { - src = clamp01(src); - } - - // Write it out! - store(dstFormat, dst_ptr, src); -} - -// If BuildProgram() can't build this program, CacheKey() sets *ok to false. -SkVMBlitter::Key SkVMBlitter::CacheKey( - const Params& params, skvm::Uniforms* uniforms, SkArenaAlloc* alloc, bool* ok) { - // Take care to match buildProgram()'s reuse of the paint color uniforms. - skvm::Uniform r = uniforms->pushF(params.paint.fR), - g = uniforms->pushF(params.paint.fG), - b = uniforms->pushF(params.paint.fB), - a = uniforms->pushF(params.paint.fA); - - auto hash_shader = [&](skvm::Builder& p, const sk_sp& shader, - skvm::Color* outColor) { - const SkShaderBase* sb = as_SB(shader); - - skvm::Coord device = device_coord(&p, uniforms); - skvm::Color paint = { - p.uniformF(r), - p.uniformF(g), - p.uniformF(b), - p.uniformF(a), - }; - - uint64_t hash = 0; - *outColor = sb->rootProgram(&p, - device, - paint, - params.ctm, - params.dst, - uniforms, - alloc); - if (*outColor) { - hash = p.hash(); - // p.hash() folds in all instructions to produce r,g,b,a but does not know - // precisely which value we'll treat as which channel. Imagine the shader - // called std::swap(*r,*b)... it draws differently, but p.hash() is unchanged. - // We'll fold the hash of their IDs in order to disambiguate. - const skvm::Val outputs[] = { - outColor->r.id, - outColor->g.id, - outColor->b.id, - outColor->a.id - }; - hash ^= SkChecksum::Hash32(outputs, sizeof(outputs)); - } else { - *ok = false; - } - return hash; - }; - - // Use this builder for shader, clip and blender, so that color objects that pass - // from one to the other all 'make sense' -- i.e. have the same builder and/or have - // meaningful values for the hash. - // - // Question: better if we just pass in mock uniform colors, so we don't need to - // explicitly use the output color from one stage as input to another? - // - skvm::Builder p; - - // Calculate a hash for the color shader. - SkASSERT(params.shader); - skvm::Color src; - uint64_t shaderHash = hash_shader(p, params.shader, &src); - - // Calculate a hash for the clip shader, if one exists. - uint64_t clipHash = 0; - if (params.clip) { - skvm::Color cov; - clipHash = hash_shader(p, params.clip, &cov); - if (clipHash == 0) { - clipHash = 1; - } - } - - // Calculate a hash for the blender. - uint64_t blendHash = 0; - if (auto bm = as_BB(params.blender)->asBlendMode()) { - blendHash = static_cast(bm.value()); - } else if (*ok) { - const SkBlenderBase* blender = as_BB(params.blender); - - skvm::Color dst = DstColor(&p, params); - skvm::Color outColor = blender->program(&p, src, dst, params.dst, uniforms, alloc); - if (outColor) { - blendHash = p.hash(); - // Like in `hash_shader` above, we must fold the color component IDs into our hash. - const skvm::Val outputs[] = { - outColor.r.id, - outColor.g.id, - outColor.b.id, - outColor.a.id - }; - blendHash ^= SkChecksum::Hash32(outputs, sizeof(outputs)); - } else { - *ok = false; - } - if (blendHash == 0) { - blendHash = 1; - } - } - - return { - shaderHash, - clipHash, - blendHash, - params.dst.colorSpace() ? params.dst.colorSpace()->hash() : 0, - SkToU8(params.dst.colorType()), - SkToU8(params.dst.alphaType()), - SkToU8(params.coverage), - }; -} - -SkVMBlitter::SkVMBlitter(const SkPixmap& device, - const SkPaint& paint, - const SkPixmap* sprite, - SkIPoint spriteOffset, - const SkMatrix& ctm, - sk_sp clip, - bool* ok) - : fDevice(device) - , fSprite(sprite ? *sprite : SkPixmap{}) - , fSpriteOffset(spriteOffset) - , fUniforms(skvm::UPtr{{0}}, kBlitterUniformsCount) - , fParams(EffectiveParams(device, sprite, paint, ctm, std::move(clip))) - , fKey(CacheKey(fParams, &fUniforms, &fAlloc, ok)) {} - -SkVMBlitter::~SkVMBlitter() { - if (fStoreToCache) { - if (SkLRUCache* cache = TryAcquireProgramCache()) { - auto cache_program = [&](SkTLazy& program, Coverage coverage) { - if (program.isValid() && !program->hasTraceHooks()) { - cache->insert_or_update(fKey.withCoverage(coverage), std::move(*program)); - } - }; - for (int c = 0; c < Coverage::kCount; c++) { - cache_program(fPrograms[c], static_cast(c)); - } - - ReleaseProgramCache(); - } - } -} - -SkLRUCache* SkVMBlitter::TryAcquireProgramCache() { -#if defined(SKVM_JIT) - thread_local static SkLRUCache cache{64}; - return &cache; -#else - // iOS now supports thread_local since iOS 9. - // On the other hand, we'll never be able to JIT there anyway. - // It's probably fine to not cache any interpreted programs, anywhere. - return nullptr; -#endif -} - -SkString SkVMBlitter::DebugName(const Key& key) { - return SkStringPrintf("Shader-%" PRIx64 "_Clip-%" PRIx64 "_Blender-%" PRIx64 - "_CS-%" PRIx64 "_CT-%d_AT-%d_Cov-%d", - key.shader, - key.clip, - key.blender, - key.colorSpace, - key.colorType, - key.alphaType, - key.coverage); -} - -void SkVMBlitter::ReleaseProgramCache() {} - -skvm::Program* SkVMBlitter::buildProgram(Coverage coverage) { - // eg, blitter re-use... - if (fProgramPtrs[coverage]) { - return fProgramPtrs[coverage]; - } - - // Next, cache lookup... - Key key = fKey.withCoverage(coverage); - { - skvm::Program* p = nullptr; - if (SkLRUCache* cache = TryAcquireProgramCache()) { - p = cache->find(key); - ReleaseProgramCache(); - } - if (p) { - SkASSERT(!p->empty()); - fProgramPtrs[coverage] = p; - return p; - } - } - - // Okay, let's build it... - fStoreToCache = true; - - // We don't really _need_ to rebuild fUniforms here. - // It's just more natural to have effects unconditionally emit them, - // and more natural to rebuild fUniforms than to emit them into a temporary buffer. - // fUniforms should reuse the exact same memory, so this is very cheap. - SkDEBUGCODE(size_t prev = fUniforms.buf.size();) - fUniforms.buf.resize(kBlitterUniformsCount); - skvm::Builder builder; - BuildProgram(&builder, fParams.withCoverage(coverage), &fUniforms, &fAlloc); - SkASSERTF(fUniforms.buf.size() == prev, - "%zu, prev was %zu", fUniforms.buf.size(), prev); - - skvm::Program program = builder.done(DebugName(key).c_str()); - if ((false)) { - static std::atomic missed{0}, - total{0}; - if (!program.hasJIT()) { - SkDebugf("\ncouldn't JIT %s\n", DebugName(key).c_str()); - builder.dump(); - program.dump(); - - missed++; - } - if (0 == total++) { - atexit([]{ SkDebugf("SkVMBlitter compiled %d programs, %d without JIT.\n", - total.load(), missed.load()); }); - } - } - fProgramPtrs[coverage] = fPrograms[coverage].set(std::move(program)); - return fProgramPtrs[coverage]; -} - -void SkVMBlitter::updateUniforms(int right, int y) { - BlitterUniforms uniforms{right, y}; - memcpy(fUniforms.buf.data(), &uniforms, sizeof(BlitterUniforms)); -} - -const void* SkVMBlitter::isSprite(int x, int y) const { - if (fSprite.colorType() != kUnknown_SkColorType) { - return fSprite.addr(x - fSpriteOffset.x(), - y - fSpriteOffset.y()); - } - return nullptr; -} - -void SkVMBlitter::blitH(int x, int y, int w) { - skvm::Program* blit_h = this->buildProgram(Coverage::Full); - this->updateUniforms(x+w, y); - if (const void* sprite = this->isSprite(x,y)) { - blit_h->eval(w, fUniforms.buf.data(), fDevice.addr(x,y), sprite); - } else { - blit_h->eval(w, fUniforms.buf.data(), fDevice.addr(x,y)); - } -} - -void SkVMBlitter::blitAntiH(int x, int y, const SkAlpha cov[], const int16_t runs[]) { - skvm::Program* blit_anti_h = this->buildProgram(Coverage::UniformF); - skvm::Program* blit_h = this->buildProgram(Coverage::Full); - - for (int16_t run = *runs; run > 0; run = *runs) { - const SkAlpha coverage = *cov; - if (coverage != 0x00) { - this->updateUniforms(x+run, y); - const void* sprite = this->isSprite(x,y); - if (coverage == 0xFF) { - if (sprite) { - blit_h->eval(run, fUniforms.buf.data(), fDevice.addr(x,y), sprite); - } else { - blit_h->eval(run, fUniforms.buf.data(), fDevice.addr(x,y)); - } - } else { - const float covF = *cov * (1/255.0f); - if (sprite) { - blit_anti_h->eval(run, fUniforms.buf.data(), fDevice.addr(x,y), sprite, &covF); - } else { - blit_anti_h->eval(run, fUniforms.buf.data(), fDevice.addr(x,y), &covF); - } - } - } - x += run; - runs += run; - cov += run; - } -} - -void SkVMBlitter::blitMask(const SkMask& mask, const SkIRect& clip) { - if (mask.fFormat == SkMask::kBW_Format) { - return SkBlitter::blitMask(mask, clip); - } - - const skvm::Program* program = nullptr; - switch (mask.fFormat) { - default: SkUNREACHABLE; // ARGB and SDF masks shouldn't make it here. - - case SkMask::k3D_Format: - program = this->buildProgram(Coverage::Mask3D); - break; - - case SkMask::kA8_Format: - program = this->buildProgram(Coverage::MaskA8); - break; - - case SkMask::kLCD16_Format: - program = this->buildProgram(Coverage::MaskLCD16); - break; - } - - SkASSERT(program); - if (program) { - for (int y = clip.top(); y < clip.bottom(); y++) { - int x = clip.left(), - w = clip.width(); - void* dptr = fDevice.writable_addr(x,y); - auto mptr = (const uint8_t*)mask.getAddr(x,y); - this->updateUniforms(x+w,y); - - if (mask.fFormat == SkMask::k3D_Format) { - size_t plane = mask.computeImageSize(); - if (const void* sprite = this->isSprite(x,y)) { - program->eval(w, fUniforms.buf.data(), dptr, sprite, mptr + 1*plane - , mptr + 2*plane - , mptr + 0*plane); - } else { - program->eval(w, fUniforms.buf.data(), dptr, mptr + 1*plane - , mptr + 2*plane - , mptr + 0*plane); - } - } else { - if (const void* sprite = this->isSprite(x,y)) { - program->eval(w, fUniforms.buf.data(), dptr, sprite, mptr); - } else { - program->eval(w, fUniforms.buf.data(), dptr, mptr); - } - } - } - } -} - -SkVMBlitter* SkVMBlitter::Make(const SkPixmap& device, - const SkPaint& paint, - const SkMatrix& ctm, - SkArenaAlloc* alloc, - sk_sp clip) { - bool ok = true; - SkVMBlitter* blitter = alloc->make(device, - paint, - /*sprite=*/nullptr, - SkIPoint{0,0}, - ctm, - std::move(clip), - &ok); - return ok ? blitter : nullptr; -} - -SkVMBlitter* SkVMBlitter::Make(const SkPixmap& device, - const SkPaint& paint, - const SkPixmap& sprite, - int left, int top, - SkArenaAlloc* alloc, - sk_sp clip) { - if (paint.getMaskFilter()) { - // TODO: SkVM support for mask filters? definitely possible! - return nullptr; - } - bool ok = true; - auto blitter = alloc->make(device, - paint, - &sprite, - SkIPoint{left,top}, - SkMatrix::I(), - std::move(clip), - &ok); - return ok ? blitter : nullptr; -} - -#endif // SK_ENABLE_SKVM diff --git a/src/core/SkVMBlitter.h b/src/core/SkVMBlitter.h deleted file mode 100644 index c1cf7ff0401b..000000000000 --- a/src/core/SkVMBlitter.h +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright 2021 Google LLC - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#ifndef SkVMBlitter_DEFINED -#define SkVMBlitter_DEFINED - -#include "include/core/SkBlender.h" -#include "include/core/SkMatrix.h" -#include "include/core/SkPixmap.h" -#include "src/base/SkArenaAlloc.h" -#include "src/base/SkTLazy.h" -#include "src/core/SkBlitter.h" -#include "src/core/SkLRUCache.h" -#include "src/core/SkVM.h" - -#ifdef SK_ENABLE_SKVM - -class SkVMBlitter final : public SkBlitter { -public: - static SkVMBlitter* Make(const SkPixmap& dst, - const SkPaint&, - const SkMatrix& ctm, - SkArenaAlloc*, - sk_sp clipShader); - - static SkVMBlitter* Make(const SkPixmap& dst, - const SkPaint&, - const SkPixmap& sprite, - int left, int top, - SkArenaAlloc*, - sk_sp clipShader); - - SkVMBlitter(const SkPixmap& device, - const SkPaint& paint, - const SkPixmap* sprite, - SkIPoint spriteOffset, - const SkMatrix& ctm, - sk_sp clip, - bool* ok); - - ~SkVMBlitter() override; - -private: - enum Coverage { Full, UniformF, MaskA8, MaskLCD16, Mask3D, kCount }; - struct Key { - uint64_t shader, - clip, - blender, - colorSpace; - uint8_t colorType, - alphaType, - coverage; - uint8_t padding8{0}; - uint32_t padding{0}; - // Params::{paint,quality,matrices} are only passed to {shader,clip}->program(), - // not used here by the blitter itself. No need to include them in the key; - // they'll be folded into the shader key if used. - - bool operator==(const Key& that) const; - Key withCoverage(Coverage c) const; - }; - - struct Params { - sk_sp shader; - sk_sp clip; - sk_sp blender; // never null - SkColorInfo dst; - Coverage coverage; - SkColor4f paint; - SkMatrix ctm; - - Params withCoverage(Coverage c) const; - }; - - static Params EffectiveParams(const SkPixmap& device, - const SkPixmap* sprite, - SkPaint paint, - const SkMatrix& ctm, - sk_sp clip); - static skvm::Color DstColor(skvm::Builder* p, const Params& params); - static void BuildProgram(skvm::Builder* p, const Params& params, - skvm::Uniforms* uniforms, SkArenaAlloc* alloc); - static Key CacheKey(const Params& params, - skvm::Uniforms* uniforms, SkArenaAlloc* alloc, bool* ok); - static SkLRUCache* TryAcquireProgramCache(); - static SkString DebugName(const Key& key); - static void ReleaseProgramCache(); - - skvm::Program* buildProgram(Coverage coverage); - void updateUniforms(int right, int y); - const void* isSprite(int x, int y) const; - - void blitH(int x, int y, int w) override; - void blitAntiH(int x, int y, const SkAlpha cov[], const int16_t runs[]) override; - -private: - void blitMask(const SkMask& mask, const SkIRect& clip) override; - - SkPixmap fDevice; - const SkPixmap fSprite; // See isSprite(). - const SkIPoint fSpriteOffset; - skvm::Uniforms fUniforms; // Most data is copied directly into fUniforms, - SkArenaAlloc fAlloc{2*sizeof(void*)}; // but a few effects need to ref large content. - const Params fParams; - const Key fKey; - bool fStoreToCache = false; - - skvm::Program* fProgramPtrs[Coverage::kCount] = {nullptr}; - SkTLazy fPrograms[Coverage::kCount]; - - friend class Viewer; -}; - -#else - -class SkVMBlitter final : public SkBlitter { -public: - static SkVMBlitter* Make(const SkPixmap&, - const SkPaint&, - const SkMatrix&, - SkArenaAlloc*, - sk_sp) { - return nullptr; - } - - static SkVMBlitter* Make(const SkPixmap&, - const SkPaint&, - const SkPixmap&, - int, - int, - SkArenaAlloc*, - sk_sp) { - return nullptr; - } - - void blitH(int, int, int) override {} - void blitAntiH(int, int, const SkAlpha[], const int16_t[]) override {} - - ~SkVMBlitter() override = default; -}; - -#endif // SK_ENABLE_SKVM -#endif // SkVMBlitter_DEFINED diff --git a/src/core/SkVM_fwd.h b/src/core/SkVM_fwd.h deleted file mode 100644 index 8d2a3d9d2a9b..000000000000 --- a/src/core/SkVM_fwd.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#ifndef SkVM_fwd_DEFINED -#define SkVM_fwd_DEFINED -#if defined(SK_ENABLE_SKVM) - -namespace skvm { - class Assembler; - class Builder; - class Program; - struct Ptr; - struct I32; - struct F32; - struct Color; - struct Coord; - struct Uniforms; -} // namespace skvm - -#endif // defined(SK_ENABLE_SKVM) -#endif // SkVM_fwd_DEFINED diff --git a/src/effects/SkEmbossMask.cpp b/src/effects/SkEmbossMask.cpp index c2f9a9d18b7f..1f48a8f06485 100644 --- a/src/effects/SkEmbossMask.cpp +++ b/src/effects/SkEmbossMask.cpp @@ -52,7 +52,7 @@ static inline unsigned div255(unsigned x) { #define kDelta 32 // small enough to show off angle differences -void SkEmbossMask::Emboss(SkMask* mask, const SkEmbossMaskFilter::Light& light) { +void SkEmbossMask::Emboss(SkMaskBuilder* mask, const SkEmbossMaskFilter::Light& light) { SkASSERT(mask->fFormat == SkMask::k3D_Format); int specular = light.fSpecular; @@ -64,7 +64,7 @@ void SkEmbossMask::Emboss(SkMask* mask, const SkEmbossMaskFilter::Light& light) int lz_dot8 = lz >> 8; size_t planeSize = mask->computeImageSize(); - uint8_t* alpha = mask->fImage; + uint8_t* alpha = mask->image(); uint8_t* multiply = (uint8_t*)alpha + planeSize; uint8_t* additive = multiply + planeSize; diff --git a/src/effects/SkEmbossMask.h b/src/effects/SkEmbossMask.h index 9731732e0cf5..5eada4a51f77 100644 --- a/src/effects/SkEmbossMask.h +++ b/src/effects/SkEmbossMask.h @@ -11,11 +11,11 @@ #include "src/effects/SkEmbossMaskFilter.h" -struct SkMask; +struct SkMaskBuilder; class SkEmbossMask { public: - static void Emboss(SkMask* mask, const SkEmbossMaskFilter::Light&); + static void Emboss(SkMaskBuilder* mask, const SkEmbossMaskFilter::Light&); }; #endif diff --git a/src/effects/SkEmbossMaskFilter.cpp b/src/effects/SkEmbossMaskFilter.cpp index a42cf083fa7b..febd7152b0dd 100644 --- a/src/effects/SkEmbossMaskFilter.cpp +++ b/src/effects/SkEmbossMaskFilter.cpp @@ -10,6 +10,7 @@ #include "include/core/SkBlurTypes.h" #include "include/core/SkMatrix.h" #include "include/core/SkPoint.h" +#include "include/core/SkPoint3.h" #include "include/core/SkTypes.h" #include "src/core/SkBlurMask.h" #include "src/core/SkReadBuffer.h" @@ -22,25 +23,19 @@ #include -static void normalize3(SkScalar dst[3], const SkScalar src[3]) { - SkScalar mag = SkScalarSquare(src[0]) + SkScalarSquare(src[1]) + SkScalarSquare(src[2]); - SkScalar scale = SkScalarInvert(SkScalarSqrt(mag)); - - for (int i = 0; i < 3; i++) { - dst[i] = src[i] * scale; - } -} - sk_sp SkEmbossMaskFilter::Make(SkScalar blurSigma, const Light& light) { if (!SkScalarIsFinite(blurSigma) || blurSigma <= 0) { return nullptr; } - Light newLight = light; - normalize3(newLight.fDirection, light.fDirection); - if (!SkScalarsAreFinite(newLight.fDirection, 3)) { + SkPoint3 lightDir{light.fDirection[0], light.fDirection[1], light.fDirection[2]}; + if (!lightDir.normalize()) { return nullptr; } + Light newLight = light; + newLight.fDirection[0] = lightDir.x(); + newLight.fDirection[1] = lightDir.y(); + newLight.fDirection[2] = lightDir.z(); return sk_sp(new SkEmbossMaskFilter(blurSigma, newLight)); } @@ -78,7 +73,7 @@ SkMask::Format SkEmbossMaskFilter::getFormat() const { return SkMask::k3D_Format; } -bool SkEmbossMaskFilter::filterMask(SkMask* dst, const SkMask& src, +bool SkEmbossMaskFilter::filterMask(SkMaskBuilder* dst, const SkMask& src, const SkMatrix& matrix, SkIPoint* margin) const { if (src.fFormat != SkMask::kA8_Format) { return false; @@ -90,7 +85,7 @@ bool SkEmbossMaskFilter::filterMask(SkMask* dst, const SkMask& src, return false; } - dst->fFormat = SkMask::k3D_Format; + dst->format() = SkMask::k3D_Format; if (margin) { margin->set(SkScalarCeilToInt(3*sigma), SkScalarCeilToInt(3*sigma)); } @@ -102,14 +97,14 @@ bool SkEmbossMaskFilter::filterMask(SkMask* dst, const SkMask& src, // create a larger buffer for the other two channels (should force fBlur to do this for us) { - uint8_t* alphaPlane = dst->fImage; + uint8_t* alphaPlane = dst->image(); size_t planeSize = dst->computeImageSize(); if (0 == planeSize) { return false; // too big to allocate, abort } - dst->fImage = SkMask::AllocImage(planeSize * 3); - memcpy(dst->fImage, alphaPlane, planeSize); - SkMask::FreeImage(alphaPlane); + dst->image() = SkMaskBuilder::AllocImage(planeSize * 3); + memcpy(dst->image(), alphaPlane, planeSize); + SkMaskBuilder::FreeImage(alphaPlane); } // run the light direction through the matrix... @@ -127,7 +122,7 @@ bool SkEmbossMaskFilter::filterMask(SkMask* dst, const SkMask& src, SkEmbossMask::Emboss(dst, light); // restore original alpha - memcpy(dst->fImage, src.fImage, src.computeImageSize()); + memcpy(dst->image(), src.fImage, src.computeImageSize()); return true; } diff --git a/src/effects/SkEmbossMaskFilter.h b/src/effects/SkEmbossMaskFilter.h index c20346c3c339..199d10abdf47 100644 --- a/src/effects/SkEmbossMaskFilter.h +++ b/src/effects/SkEmbossMaskFilter.h @@ -42,7 +42,7 @@ class SkEmbossMaskFilter : public SkMaskFilterBase { // This method is not exported to java. SkMask::Format getFormat() const override; // This method is not exported to java. - bool filterMask(SkMask* dst, const SkMask& src, const SkMatrix&, + bool filterMask(SkMaskBuilder* dst, const SkMask& src, const SkMatrix&, SkIPoint* margin) const override; SkMaskFilterBase::Type type() const override { return SkMaskFilterBase::Type::kEmboss; } diff --git a/src/effects/SkOpPathEffect.cpp b/src/effects/SkOpPathEffect.cpp index 1e13ef98dd6e..af8714a4dca7 100644 --- a/src/effects/SkOpPathEffect.cpp +++ b/src/effects/SkOpPathEffect.cpp @@ -18,10 +18,10 @@ #include "include/core/SkStrokeRec.h" #include "include/core/SkTypes.h" #include "include/pathops/SkPathOps.h" -#include "include/private/base/SkPathEnums.h" #include "include/private/base/SkTo.h" #include "src/base/SkNoDestructor.h" #include "src/core/SkPathEffectBase.h" +#include "src/core/SkPathEnums.h" #include "src/core/SkReadBuffer.h" #include "src/core/SkWriteBuffer.h" #include "src/effects/SkOpPE.h" diff --git a/src/effects/SkShaderMaskFilterImpl.cpp b/src/effects/SkShaderMaskFilterImpl.cpp index 0acf40a8812f..31abdb8dc386 100644 --- a/src/effects/SkShaderMaskFilterImpl.cpp +++ b/src/effects/SkShaderMaskFilterImpl.cpp @@ -46,8 +46,8 @@ static void rect_memcpy(void* dst, size_t dstRB, const void* src, size_t srcRB, } } -bool SkShaderMaskFilterImpl::filterMask(SkMask* dst, const SkMask& src, const SkMatrix& ctm, - SkIPoint* margin) const { +bool SkShaderMaskFilterImpl::filterMask(SkMaskBuilder* dst, const SkMask& src, const SkMatrix& ctm, + SkIPoint* margin) const { if (src.fFormat != SkMask::kA8_Format) { return false; } @@ -55,12 +55,12 @@ bool SkShaderMaskFilterImpl::filterMask(SkMask* dst, const SkMask& src, const Sk if (margin) { margin->set(0, 0); } - dst->fBounds = src.fBounds; - dst->fRowBytes = src.fBounds.width(); // need alignment? - dst->fFormat = SkMask::kA8_Format; + dst->bounds() = src.fBounds; + dst->rowBytes() = src.fBounds.width(); // need alignment? + dst->format() = SkMask::kA8_Format; if (src.fImage == nullptr) { - dst->fImage = nullptr; + dst->image() = nullptr; return true; } size_t size = dst->computeImageSize(); @@ -69,8 +69,8 @@ bool SkShaderMaskFilterImpl::filterMask(SkMask* dst, const SkMask& src, const Sk } // Allocate and initialize dst image with a copy of the src image - dst->fImage = SkMask::AllocImage(size); - rect_memcpy(dst->fImage, dst->fRowBytes, src.fImage, src.fRowBytes, + dst->image() = SkMaskBuilder::AllocImage(size); + rect_memcpy(dst->image(), dst->fRowBytes, src.fImage, src.fRowBytes, src.fBounds.width() * sizeof(uint8_t), src.fBounds.height()); // Now we have a dst-mask, just need to setup a canvas and draw into it diff --git a/src/effects/SkShaderMaskFilterImpl.h b/src/effects/SkShaderMaskFilterImpl.h index 8991d90b5725..a330be8f7930 100644 --- a/src/effects/SkShaderMaskFilterImpl.h +++ b/src/effects/SkShaderMaskFilterImpl.h @@ -29,7 +29,7 @@ class SkShaderMaskFilterImpl : public SkMaskFilterBase { SkMask::Format getFormat() const override { return SkMask::kA8_Format; } SkMaskFilterBase::Type type() const override { return SkMaskFilterBase::Type::kShader; } - bool filterMask(SkMask* dst, const SkMask& src, const SkMatrix&, + bool filterMask(SkMaskBuilder* dst, const SkMask& src, const SkMatrix&, SkIPoint* margin) const override; void computeFastBounds(const SkRect& src, SkRect* dst) const override { diff --git a/src/effects/SkTableMaskFilter.cpp b/src/effects/SkTableMaskFilter.cpp index 9a76ad7edb62..b7189ac205f4 100644 --- a/src/effects/SkTableMaskFilter.cpp +++ b/src/effects/SkTableMaskFilter.cpp @@ -34,7 +34,7 @@ class SkTableMaskFilterImpl : public SkMaskFilterBase { explicit SkTableMaskFilterImpl(const uint8_t table[256]); SkMask::Format getFormat() const override; - bool filterMask(SkMask*, const SkMask&, const SkMatrix&, SkIPoint*) const override; + bool filterMask(SkMaskBuilder*, const SkMask&, const SkMatrix&, SkIPoint*) const override; SkMaskFilterBase::Type type() const override { return SkMaskFilterBase::Type::kTable; } protected: @@ -64,22 +64,22 @@ SkTableMaskFilterImpl::SkTableMaskFilterImpl(const uint8_t table[256]) { SkTableMaskFilterImpl::~SkTableMaskFilterImpl() {} -bool SkTableMaskFilterImpl::filterMask(SkMask* dst, const SkMask& src, - const SkMatrix&, SkIPoint* margin) const { +bool SkTableMaskFilterImpl::filterMask(SkMaskBuilder* dst, const SkMask& src, + const SkMatrix&, SkIPoint* margin) const { if (src.fFormat != SkMask::kA8_Format) { return false; } - dst->fBounds = src.fBounds; - dst->fRowBytes = SkAlign4(dst->fBounds.width()); - dst->fFormat = SkMask::kA8_Format; - dst->fImage = nullptr; + dst->bounds() = src.fBounds; + dst->rowBytes() = SkAlign4(dst->fBounds.width()); + dst->format() = SkMask::kA8_Format; + dst->image() = nullptr; if (src.fImage) { - dst->fImage = SkMask::AllocImage(dst->computeImageSize()); + dst->image() = SkMaskBuilder::AllocImage(dst->computeImageSize()); const uint8_t* srcP = src.fImage; - uint8_t* dstP = dst->fImage; + uint8_t* dstP = dst->image(); const uint8_t* table = fTable; int dstWidth = dst->fBounds.width(); int extraZeros = dst->fRowBytes - dstWidth; diff --git a/src/effects/colorfilters/SkBlendModeColorFilter.cpp b/src/effects/colorfilters/SkBlendModeColorFilter.cpp index 8b7516f7e7d5..198264efc3ca 100644 --- a/src/effects/colorfilters/SkBlendModeColorFilter.cpp +++ b/src/effects/colorfilters/SkBlendModeColorFilter.cpp @@ -25,12 +25,6 @@ #include "src/core/SkWriteBuffer.h" #include "src/effects/colorfilters/SkColorFilterBase.h" -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/KeyContext.h" -#include "src/gpu/graphite/KeyHelpers.h" -#include "src/gpu/graphite/PaintParamsKey.h" -#endif - template static SkRGBA4f map_color(const SkColor4f& c, SkColorSpace* src, SkColorSpace* dst) { SkRGBA4f color = {c.fR, c.fG, c.fB, c.fA}; @@ -90,32 +84,6 @@ bool SkBlendModeColorFilter::appendStages(const SkStageRec& rec, bool shaderIsOp return true; } -#if defined(SK_ENABLE_SKVM) -skvm::Color SkBlendModeColorFilter::onProgram(skvm::Builder* p, - skvm::Color c, - const SkColorInfo& dstInfo, - skvm::Uniforms* uniforms, - SkArenaAlloc*) const { - SkPMColor4f color = map_color(fColor, sk_srgb_singleton(), dstInfo.colorSpace()); - // The blend program operates on this as if it were premul but the API takes an SkColor4f - skvm::Color dst = c, src = p->uniformColor({color.fR, color.fG, color.fB, color.fA}, uniforms); - return p->blend(fMode, src, dst); -} -#endif - -#if defined(SK_GRAPHITE) -void SkBlendModeColorFilter::addToKey(const skgpu::graphite::KeyContext& keyContext, - skgpu::graphite::PaintParamsKeyBuilder* builder, - skgpu::graphite::PipelineDataGatherer* gatherer) const { - using namespace skgpu::graphite; - - SkPMColor4f color = - map_color(fColor, sk_srgb_singleton(), keyContext.dstColorInfo().colorSpace()); - AddColorBlendBlock(keyContext, builder, gatherer, fMode, color); -} - -#endif - /////////////////////////////////////////////////////////////////////////////// sk_sp SkColorFilters::Blend(const SkColor4f& color, diff --git a/src/effects/colorfilters/SkBlendModeColorFilter.h b/src/effects/colorfilters/SkBlendModeColorFilter.h index cf8a9e45e020..763b3a05424a 100644 --- a/src/effects/colorfilters/SkBlendModeColorFilter.h +++ b/src/effects/colorfilters/SkBlendModeColorFilter.h @@ -16,12 +16,6 @@ class SkWriteBuffer; enum class SkBlendMode; struct SkStageRec; -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/KeyContext.h" -#include "src/gpu/graphite/KeyHelpers.h" -#include "src/gpu/graphite/PaintParamsKey.h" -#endif - class SkBlendModeColorFilter final : public SkColorFilterBase { public: SkBlendModeColorFilter(const SkColor4f& color, SkBlendMode mode); @@ -30,11 +24,6 @@ class SkBlendModeColorFilter final : public SkColorFilterBase { bool onIsAlphaUnchanged() const override; -#if defined(SK_GRAPHITE) - void addToKey(const skgpu::graphite::KeyContext&, - skgpu::graphite::PaintParamsKeyBuilder*, - skgpu::graphite::PipelineDataGatherer*) const override; -#endif SkColorFilterBase::Type type() const override { return SkColorFilterBase::Type::kBlendMode; } SkColor4f color() const { return fColor; } @@ -47,14 +36,6 @@ class SkBlendModeColorFilter final : public SkColorFilterBase { void flatten(SkWriteBuffer&) const override; bool onAsAColorMode(SkColor*, SkBlendMode*) const override; -#if defined(SK_ENABLE_SKVM) - skvm::Color onProgram(skvm::Builder*, - skvm::Color, - const SkColorInfo&, - skvm::Uniforms*, - SkArenaAlloc*) const override; -#endif - SkColor4f fColor; // always stored in sRGB SkBlendMode fMode; }; diff --git a/src/effects/colorfilters/SkColorFilterBase.cpp b/src/effects/colorfilters/SkColorFilterBase.cpp index 96a72f300354..ab31ef6d758b 100644 --- a/src/effects/colorfilters/SkColorFilterBase.cpp +++ b/src/effects/colorfilters/SkColorFilterBase.cpp @@ -9,27 +9,15 @@ #include "include/core/SkColor.h" #include "include/core/SkColorSpace.h" // IWYU pragma: keep #include "include/core/SkColorType.h" -#include "include/core/SkMatrix.h" #include "include/core/SkSurfaceProps.h" #include "include/private/SkColorData.h" #include "include/private/base/SkAssert.h" #include "src/base/SkArenaAlloc.h" #include "src/core/SkEffectPriv.h" -#include "src/core/SkMatrixProvider.h" #include "src/core/SkRasterPipeline.h" #include "src/core/SkRasterPipelineOpContexts.h" #include "src/core/SkRasterPipelineOpList.h" -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/KeyContext.h" -#include "src/gpu/graphite/KeyHelpers.h" -#include "src/gpu/graphite/PaintParamsKey.h" -#endif - -#if defined(SK_ENABLE_SKVM) -#include "src/core/SkVM.h" -#endif - #include enum class SkBlendMode; @@ -42,29 +30,12 @@ bool SkColorFilterBase::onAsAColorMatrix(float matrix[20]) const { return false; } -#if defined(SK_ENABLE_SKVM) -skvm::Color SkColorFilterBase::program(skvm::Builder* p, skvm::Color c, - const SkColorInfo& dst, - skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const { - skvm::F32 original = c.a; - if ((c = this->onProgram(p,c, dst, uniforms,alloc))) { - if (this->isAlphaUnchanged()) { - c.a = original; - } - return c; - } - //SkDebugf("cannot program %s\n", this->getTypeName()); - return {}; -} -#endif - SkPMColor4f SkColorFilterBase::onFilterColor4f(const SkPMColor4f& color, SkColorSpace* dstCS) const { constexpr size_t kEnoughForCommonFilters = 2048; // big enough for a tiny SkSL program SkSTArenaAlloc alloc; SkRasterPipeline pipeline(&alloc); pipeline.append_constant_color(&alloc, color.vec()); - SkMatrixProvider matrixProvider(SkMatrix::I()); SkSurfaceProps props{}; // default OK; colorFilters don't render text SkStageRec rec = {&pipeline, &alloc, kRGBA_F32_SkColorType, dstCS, color.unpremul(), props}; @@ -76,36 +47,6 @@ SkPMColor4f SkColorFilterBase::onFilterColor4f(const SkPMColor4f& color, return dst; } -#if defined(SK_ENABLE_SKVM) - // This filter doesn't support SkRasterPipeline... try skvm. - skvm::Builder b; - skvm::Uniforms uni(b.uniform(), 4); - SkColor4f uniColor = {color.fR, color.fG, color.fB, color.fA}; - SkColorInfo dstInfo = {kRGBA_F32_SkColorType, kPremul_SkAlphaType, sk_ref_sp(dstCS)}; - if (skvm::Color filtered = - as_CFB(this)->program(&b, b.uniformColor(uniColor, &uni), dstInfo, &uni, &alloc)) { - - b.store({skvm::PixelFormat::FLOAT, 32,32,32,32, 0,32,64,96}, - b.varying(), filtered); - - const bool allow_jit = false; // We're only filtering one color, no point JITing. - b.done("filterColor4f", allow_jit).eval(1, uni.buf.data(), &color); - return color; - } -#endif - SkDEBUGFAIL("onFilterColor4f unimplemented for this filter"); return SkPMColor4f{0,0,0,0}; } - -#if defined(SK_GRAPHITE) -void SkColorFilterBase::addToKey(const skgpu::graphite::KeyContext& keyContext, - skgpu::graphite::PaintParamsKeyBuilder* builder, - skgpu::graphite::PipelineDataGatherer* gatherer) const { - using namespace skgpu::graphite; - - // Return the input color as-is. - PriorOutputBlock::BeginBlock(keyContext, builder, gatherer); - builder->endBlock(); -} -#endif diff --git a/src/effects/colorfilters/SkColorFilterBase.h b/src/effects/colorfilters/SkColorFilterBase.h index 998654d29156..e94b7c001226 100644 --- a/src/effects/colorfilters/SkColorFilterBase.h +++ b/src/effects/colorfilters/SkColorFilterBase.h @@ -13,7 +13,6 @@ #include "include/core/SkFlattenable.h" #include "include/core/SkRefCnt.h" #include "include/private/SkColorData.h" -#include "include/private/base/SkAttributes.h" #include @@ -23,20 +22,6 @@ enum class SkBlendMode; struct SkDeserialProcs; struct SkStageRec; -#if defined(SK_GRAPHITE) -namespace skgpu::graphite { -class KeyContext; -class PaintParamsKeyBuilder; -class PipelineDataGatherer; -} -#endif - -#if defined(SK_ENABLE_SKVM) -#include "include/core/SkImageInfo.h" -#include "src/base/SkArenaAlloc.h" -#include "src/core/SkVM_fwd.h" -#endif - #define SK_ALL_COLOR_FILTERS(M) \ M(BlendMode) \ M(ColorSpaceXform) \ @@ -49,14 +34,7 @@ class PipelineDataGatherer; class SkColorFilterBase : public SkColorFilter { public: - SK_WARN_UNUSED_RESULT - virtual bool appendStages(const SkStageRec& rec, bool shaderIsOpaque) const = 0; - -#if defined(SK_ENABLE_SKVM) - SK_WARN_UNUSED_RESULT - skvm::Color program(skvm::Builder*, skvm::Color, - const SkColorInfo& dst, skvm::Uniforms*, SkArenaAlloc*) const; -#endif + [[nodiscard]] virtual bool appendStages(const SkStageRec& rec, bool shaderIsOpaque) const = 0; /** Returns the flags for this filter. Override in subclasses to return custom flags. */ @@ -96,20 +74,6 @@ class SkColorFilterBase : public SkColorFilter { virtual SkPMColor4f onFilterColor4f(const SkPMColor4f& color, SkColorSpace* dstCS) const; -#if defined(SK_GRAPHITE) - /** - Add implementation details, for the specified backend, of this SkColorFilter to the - provided key. - - @param keyContext backend context for key creation - @param builder builder for creating the key for this SkShader - @param gatherer if non-null, storage for this colorFilter's data - */ - virtual void addToKey(const skgpu::graphite::KeyContext& keyContext, - skgpu::graphite::PaintParamsKeyBuilder* builder, - skgpu::graphite::PipelineDataGatherer* gatherer) const; -#endif - protected: SkColorFilterBase() {} @@ -117,11 +81,6 @@ class SkColorFilterBase : public SkColorFilter { virtual bool onAsAColorMode(SkColor* color, SkBlendMode* bmode) const; private: -#if defined(SK_ENABLE_SKVM) - virtual skvm::Color onProgram(skvm::Builder*, skvm::Color, - const SkColorInfo& dst, skvm::Uniforms*, SkArenaAlloc*) const = 0; -#endif - friend class SkColorFilter; using INHERITED = SkFlattenable; diff --git a/src/effects/colorfilters/SkColorSpaceXformColorFilter.cpp b/src/effects/colorfilters/SkColorSpaceXformColorFilter.cpp index 8394f3fb4c6e..7a72b94befbc 100644 --- a/src/effects/colorfilters/SkColorSpaceXformColorFilter.cpp +++ b/src/effects/colorfilters/SkColorSpaceXformColorFilter.cpp @@ -24,12 +24,6 @@ #include #include -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/KeyContext.h" -#include "src/gpu/graphite/KeyHelpers.h" -#include "src/gpu/graphite/PaintParamsKey.h" -#endif - SkColorSpaceXformColorFilter::SkColorSpaceXformColorFilter(sk_sp src, sk_sp dst) : fSrc(std::move(src)) @@ -40,20 +34,6 @@ SkColorSpaceXformColorFilter::SkColorSpaceXformColorFilter(sk_sp s fDst.get(), kUnpremul_SkAlphaType) {} -#if defined(SK_GRAPHITE) -void SkColorSpaceXformColorFilter::addToKey(const skgpu::graphite::KeyContext& keyContext, - skgpu::graphite::PaintParamsKeyBuilder* builder, - skgpu::graphite::PipelineDataGatherer* gatherer) const { - using namespace skgpu::graphite; - - constexpr SkAlphaType alphaType = kPremul_SkAlphaType; - ColorSpaceTransformBlock::ColorSpaceTransformData data( - fSrc.get(), alphaType, fDst.get(), alphaType); - ColorSpaceTransformBlock::BeginBlock(keyContext, builder, gatherer, &data); - builder->endBlock(); -} -#endif - bool SkColorSpaceXformColorFilter::appendStages(const SkStageRec& rec, bool shaderIsOpaque) const { if (!shaderIsOpaque) { rec.fPipeline->append(SkRasterPipelineOp::unpremul); @@ -67,16 +47,6 @@ bool SkColorSpaceXformColorFilter::appendStages(const SkStageRec& rec, bool shad return true; } -#if defined(SK_ENABLE_SKVM) -skvm::Color SkColorSpaceXformColorFilter::onProgram(skvm::Builder* p, - skvm::Color c, - const SkColorInfo& dst, - skvm::Uniforms* uniforms, - SkArenaAlloc* alloc) const { - return premul(fSteps.program(p, uniforms, unpremul(c))); -} -#endif - void SkColorSpaceXformColorFilter::flatten(SkWriteBuffer& buffer) const { buffer.writeDataAsByteArray(fSrc->serialize().get()); buffer.writeDataAsByteArray(fDst->serialize().get()); diff --git a/src/effects/colorfilters/SkColorSpaceXformColorFilter.h b/src/effects/colorfilters/SkColorSpaceXformColorFilter.h index 726e839935c1..ee42bf07a5df 100644 --- a/src/effects/colorfilters/SkColorSpaceXformColorFilter.h +++ b/src/effects/colorfilters/SkColorSpaceXformColorFilter.h @@ -21,22 +21,8 @@ class SkColorSpaceXformColorFilter final : public SkColorFilterBase { public: SkColorSpaceXformColorFilter(sk_sp src, sk_sp dst); -#if defined(SK_GRAPHITE) - void addToKey(const skgpu::graphite::KeyContext& keyContext, - skgpu::graphite::PaintParamsKeyBuilder* builder, - skgpu::graphite::PipelineDataGatherer* gatherer) const override; -#endif - bool appendStages(const SkStageRec& rec, bool shaderIsOpaque) const override; -#if defined(SK_ENABLE_SKVM) - skvm::Color onProgram(skvm::Builder* p, - skvm::Color c, - const SkColorInfo& dst, - skvm::Uniforms* uniforms, - SkArenaAlloc* alloc) const override; -#endif - SkColorFilterBase::Type type() const override { return SkColorFilterBase::Type::kColorSpaceXform; } diff --git a/src/effects/colorfilters/SkComposeColorFilter.cpp b/src/effects/colorfilters/SkComposeColorFilter.cpp index 763a22e6655f..f89904f7c2c3 100644 --- a/src/effects/colorfilters/SkComposeColorFilter.cpp +++ b/src/effects/colorfilters/SkComposeColorFilter.cpp @@ -15,12 +15,6 @@ #include struct SkStageRec; -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/KeyContext.h" -#include "src/gpu/graphite/KeyHelpers.h" -#include "src/gpu/graphite/PaintParamsKey.h" -#endif - SkComposeColorFilter::SkComposeColorFilter(sk_sp outer, sk_sp inner) : fOuter(as_CFB_sp(std::move(outer))), fInner(as_CFB_sp(std::move(inner))) {} @@ -37,32 +31,6 @@ bool SkComposeColorFilter::appendStages(const SkStageRec& rec, bool shaderIsOpaq return fInner->appendStages(rec, shaderIsOpaque) && fOuter->appendStages(rec, innerIsOpaque); } -#if defined(SK_ENABLE_SKVM) -skvm::Color SkComposeColorFilter::onProgram(skvm::Builder* p, - skvm::Color c, - const SkColorInfo& dst, - skvm::Uniforms* uniforms, - SkArenaAlloc* alloc) const { - c = fInner->program(p, c, dst, uniforms, alloc); - return c ? fOuter->program(p, c, dst, uniforms, alloc) : skvm::Color{}; -} -#endif - -#if defined(SK_GRAPHITE) -void SkComposeColorFilter::addToKey(const skgpu::graphite::KeyContext& keyContext, - skgpu::graphite::PaintParamsKeyBuilder* builder, - skgpu::graphite::PipelineDataGatherer* gatherer) const { - using namespace skgpu::graphite; - - ComposeColorFilterBlock::BeginBlock(keyContext, builder, gatherer); - - as_CFB(fInner)->addToKey(keyContext, builder, gatherer); - as_CFB(fOuter)->addToKey(keyContext, builder, gatherer); - - builder->endBlock(); -} -#endif // SK_GRAPHITE - void SkComposeColorFilter::flatten(SkWriteBuffer& buffer) const { buffer.writeFlattenable(fOuter.get()); buffer.writeFlattenable(fInner.get()); diff --git a/src/effects/colorfilters/SkComposeColorFilter.h b/src/effects/colorfilters/SkComposeColorFilter.h index 40ba9a09ba21..2d9500e85972 100644 --- a/src/effects/colorfilters/SkComposeColorFilter.h +++ b/src/effects/colorfilters/SkComposeColorFilter.h @@ -24,20 +24,6 @@ class SkComposeColorFilter final : public SkColorFilterBase { SkColorFilterBase::Type type() const override { return SkColorFilterBase::Type::kCompose; } -#if defined(SK_ENABLE_SKVM) - skvm::Color onProgram(skvm::Builder* p, - skvm::Color c, - const SkColorInfo& dst, - skvm::Uniforms* uniforms, - SkArenaAlloc* alloc) const override; -#endif - -#if defined(SK_GRAPHITE) - void addToKey(const skgpu::graphite::KeyContext& keyContext, - skgpu::graphite::PaintParamsKeyBuilder* builder, - skgpu::graphite::PipelineDataGatherer* gatherer) const override; -#endif // SK_GRAPHITE - sk_sp outer() const { return fOuter; } sk_sp inner() const { return fInner; } diff --git a/src/effects/colorfilters/SkGaussianColorFilter.cpp b/src/effects/colorfilters/SkGaussianColorFilter.cpp index 618dec51305a..e77a6ca45830 100644 --- a/src/effects/colorfilters/SkGaussianColorFilter.cpp +++ b/src/effects/colorfilters/SkGaussianColorFilter.cpp @@ -17,22 +17,6 @@ #include "src/core/SkRasterPipelineOpList.h" #include "src/effects/colorfilters/SkColorFilterBase.h" -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/KeyContext.h" -#include "src/gpu/graphite/KeyHelpers.h" -#include "src/gpu/graphite/PaintParamsKey.h" - -namespace skgpu::graphite { -class PipelineDataGatherer; -} -#endif - -#if defined(SK_ENABLE_SKVM) -#include "src/core/SkVM.h" -class SkArenaAlloc; -class SkColorInfo; -#endif - SkGaussianColorFilter::SkGaussianColorFilter() : SkColorFilterBase() {} bool SkGaussianColorFilter::appendStages(const SkStageRec& rec, bool shaderIsOpaque) const { @@ -40,42 +24,10 @@ bool SkGaussianColorFilter::appendStages(const SkStageRec& rec, bool shaderIsOpa return true; } -#if defined(SK_ENABLE_SKVM) -skvm::Color SkGaussianColorFilter::onProgram(skvm::Builder* p, - skvm::Color c, - const SkColorInfo& dst, - skvm::Uniforms*, - SkArenaAlloc*) const { - // x = 1 - x; - // exp(-x * x * 4) - 0.018f; - // ... now approximate with quartic - // - skvm::F32 x = p->splat(-2.26661229133605957031f); - x = c.a * x + 2.89795351028442382812f; - x = c.a * x + 0.21345567703247070312f; - x = c.a * x + 0.15489584207534790039f; - x = c.a * x + 0.00030726194381713867f; - return {x, x, x, x}; -} -#endif - sk_sp SkGaussianColorFilter::CreateProc(SkReadBuffer&) { return SkColorFilterPriv::MakeGaussian(); } -#if defined(SK_GRAPHITE) - -void SkGaussianColorFilter::addToKey(const skgpu::graphite::KeyContext& keyContext, - skgpu::graphite::PaintParamsKeyBuilder* builder, - skgpu::graphite::PipelineDataGatherer* gatherer) const { - using namespace skgpu::graphite; - - GaussianColorFilterBlock::BeginBlock(keyContext, builder, gatherer); - builder->endBlock(); -} - -#endif - sk_sp SkColorFilterPriv::MakeGaussian() { return sk_sp(new SkGaussianColorFilter); } diff --git a/src/effects/colorfilters/SkGaussianColorFilter.h b/src/effects/colorfilters/SkGaussianColorFilter.h index b8e8542f06a7..fd86ddce737c 100644 --- a/src/effects/colorfilters/SkGaussianColorFilter.h +++ b/src/effects/colorfilters/SkGaussianColorFilter.h @@ -15,22 +15,6 @@ class SkReadBuffer; class SkWriteBuffer; struct SkStageRec; -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/KeyContext.h" -#include "src/gpu/graphite/KeyHelpers.h" -#include "src/gpu/graphite/PaintParamsKey.h" - -namespace skgpu::graphite { -class PipelineDataGatherer; -} -#endif - -#if defined(SK_ENABLE_SKVM) -#include "src/core/SkVM.h" -class SkArenaAlloc; -class SkColorInfo; -#endif - /** * Remaps the input color's alpha to a Gaussian ramp and then outputs premul white using the * remapped alpha. @@ -43,23 +27,9 @@ class SkGaussianColorFilter final : public SkColorFilterBase { SkColorFilterBase::Type type() const override { return SkColorFilterBase::Type::kGaussian; } -#if defined(SK_GRAPHITE) - void addToKey(const skgpu::graphite::KeyContext&, - skgpu::graphite::PaintParamsKeyBuilder*, - skgpu::graphite::PipelineDataGatherer*) const override; -#endif - protected: void flatten(SkWriteBuffer&) const override {} -#if defined(SK_ENABLE_SKVM) - skvm::Color onProgram(skvm::Builder* p, - skvm::Color c, - const SkColorInfo& dst, - skvm::Uniforms*, - SkArenaAlloc*) const override; -#endif - private: SK_FLATTENABLE_HOOKS(SkGaussianColorFilter) }; diff --git a/src/effects/colorfilters/SkMatrixColorFilter.cpp b/src/effects/colorfilters/SkMatrixColorFilter.cpp index b9b8207a6712..18a21875e892 100644 --- a/src/effects/colorfilters/SkMatrixColorFilter.cpp +++ b/src/effects/colorfilters/SkMatrixColorFilter.cpp @@ -23,11 +23,6 @@ #include #include -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/KeyHelpers.h" -#include "src/gpu/graphite/PaintParamsKey.h" -#endif // SK_GRAPHITE - static bool is_alpha_unchanged(const float matrix[20]) { const float* srcA = matrix + 15; @@ -92,67 +87,6 @@ bool SkMatrixColorFilter::appendStages(const SkStageRec& rec, bool shaderIsOpaqu return true; } -#if defined(SK_ENABLE_SKVM) -skvm::Color SkMatrixColorFilter::onProgram(skvm::Builder* p, - skvm::Color c, - const SkColorInfo& /*dst*/, - skvm::Uniforms* uniforms, - SkArenaAlloc*) const { - auto apply_matrix = [&](auto xyzw) { - auto dot = [&](int j) { - auto custom_mad = [&](float f, skvm::F32 m, skvm::F32 a) { - // skvm::Builder won't fold f*0 == 0, but we shouldn't encounter NaN here. - // While looking, also simplify f == ±1. Anything else becomes a uniform. - return f == 0.0f - ? a - : f == +1.0f ? a + m - : f == -1.0f ? a - m - : m * p->uniformF(uniforms->pushF(f)) + a; - }; - - // Similarly, let skvm::Builder fold away the additive bias when zero. - const float b = fMatrix[4 + j * 5]; - skvm::F32 bias = b == 0.0f ? p->splat(0.0f) : p->uniformF(uniforms->pushF(b)); - - auto [x, y, z, w] = xyzw; - return custom_mad(fMatrix[0 + j * 5], - x, - custom_mad(fMatrix[1 + j * 5], - y, - custom_mad(fMatrix[2 + j * 5], - z, - custom_mad(fMatrix[3 + j * 5], w, bias)))); - }; - return std::make_tuple(dot(0), dot(1), dot(2), dot(3)); - }; - - c = unpremul(c); - - if (fDomain == Domain::kHSLA) { - auto [h, s, l, a] = apply_matrix(p->to_hsla(c)); - c = p->to_rgba({h, s, l, a}); - } else { - auto [r, g, b, a] = apply_matrix(c); - c = {r, g, b, a}; - } - - return premul(clamp01(c)); -} -#endif - -#if defined(SK_GRAPHITE) -void SkMatrixColorFilter::addToKey(const skgpu::graphite::KeyContext& keyContext, - skgpu::graphite::PaintParamsKeyBuilder* builder, - skgpu::graphite::PipelineDataGatherer* gatherer) const { - using namespace skgpu::graphite; - - MatrixColorFilterBlock::MatrixColorFilterData matrixCFData(fMatrix, fDomain == Domain::kHSLA); - - MatrixColorFilterBlock::BeginBlock(keyContext, builder, gatherer, &matrixCFData); - builder->endBlock(); -} -#endif // SK_GRAPHITE - /////////////////////////////////////////////////////////////////////////////// static sk_sp MakeMatrix(const float array[20], SkMatrixColorFilter::Domain domain) { diff --git a/src/effects/colorfilters/SkMatrixColorFilter.h b/src/effects/colorfilters/SkMatrixColorFilter.h index 46912b20f60e..eb95b11de6fc 100644 --- a/src/effects/colorfilters/SkMatrixColorFilter.h +++ b/src/effects/colorfilters/SkMatrixColorFilter.h @@ -17,11 +17,6 @@ class SkReadBuffer; class SkWriteBuffer; struct SkStageRec; -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/KeyHelpers.h" -#include "src/gpu/graphite/PaintParamsKey.h" -#endif // SK_GRAPHITE - class SkMatrixColorFilter final : public SkColorFilterBase { public: enum class Domain : uint8_t { kRGBA, kHSLA }; @@ -34,12 +29,6 @@ class SkMatrixColorFilter final : public SkColorFilterBase { SkColorFilterBase::Type type() const override { return SkColorFilterBase::Type::kMatrix; } -#if defined(SK_GRAPHITE) - void addToKey(const skgpu::graphite::KeyContext&, - skgpu::graphite::PaintParamsKeyBuilder*, - skgpu::graphite::PipelineDataGatherer*) const override; -#endif - Domain domain() const { return fDomain; } const float* matrix() const { return fMatrix; } @@ -50,14 +39,6 @@ class SkMatrixColorFilter final : public SkColorFilterBase { void flatten(SkWriteBuffer&) const override; bool onAsAColorMatrix(float matrix[20]) const override; -#if defined(SK_ENABLE_SKVM) - skvm::Color onProgram(skvm::Builder*, - skvm::Color, - const SkColorInfo& dst, - skvm::Uniforms* uniforms, - SkArenaAlloc*) const override; -#endif - float fMatrix[20]; bool fAlphaIsUnchanged; Domain fDomain; diff --git a/src/effects/colorfilters/SkRuntimeColorFilter.cpp b/src/effects/colorfilters/SkRuntimeColorFilter.cpp index c5d9ae9ffc33..4f0cee05c72d 100644 --- a/src/effects/colorfilters/SkRuntimeColorFilter.cpp +++ b/src/effects/colorfilters/SkRuntimeColorFilter.cpp @@ -27,7 +27,6 @@ #include "src/core/SkReadBuffer.h" #include "src/core/SkRuntimeEffectPriv.h" #include "src/core/SkWriteBuffer.h" -#include "src/effects/colorfilters/SkColorFilterBase.h" #include "src/shaders/SkShaderBase.h" #include "src/sksl/codegen/SkSLRasterPipelineBuilder.h" @@ -38,46 +37,14 @@ #error This only be compiled if SKSL is enabled. See _none.cpp for the non-SKSL version. #endif -#if defined(SK_ENABLE_SKVM) -#include "src/core/SkFilterColorProgram.h" -#endif - -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/KeyContext.h" -#include "src/gpu/graphite/KeyHelpers.h" -#include "src/gpu/graphite/PaintParamsKey.h" -#endif - -class SkColorSpace; - SkRuntimeColorFilter::SkRuntimeColorFilter(sk_sp effect, sk_sp uniforms, - SkSpan children) + SkSpan children) : fEffect(std::move(effect)) , fUniforms(std::move(uniforms)) , fChildren(children.begin(), children.end()) {} -#if defined(SK_GRAPHITE) -void SkRuntimeColorFilter::addToKey(const skgpu::graphite::KeyContext& keyContext, - skgpu::graphite::PaintParamsKeyBuilder* builder, - skgpu::graphite::PipelineDataGatherer* gatherer) const { - using namespace skgpu::graphite; - - sk_sp uniforms = SkRuntimeEffectPriv::TransformUniforms( - fEffect->uniforms(), fUniforms, keyContext.dstColorInfo().colorSpace()); - SkASSERT(uniforms); - - RuntimeEffectBlock::BeginBlock(keyContext, builder, gatherer, {fEffect, std::move(uniforms)}); - - SkRuntimeEffectPriv::AddChildrenToKey( - fChildren, fEffect->children(), keyContext, builder, gatherer); - - builder->endBlock(); -} -#endif - bool SkRuntimeColorFilter::appendStages(const SkStageRec& rec, bool) const { -#ifdef SK_ENABLE_SKSL_IN_RASTER_PIPELINE if (!SkRuntimeEffectPriv::CanDraw(SkCapabilities::RasterBackend().get(), fEffect.get())) { // SkRP has support for many parts of #version 300 already, but for now, we restrict its // usage in runtime effects to just #version 100. @@ -96,80 +63,11 @@ bool SkRuntimeColorFilter::appendStages(const SkStageRec& rec, bool) const { bool success = program->appendStages(rec.fPipeline, rec.fAlloc, &callbacks, uniforms); return success; } -#endif return false; } -#if defined(SK_ENABLE_SKVM) -skvm::Color SkRuntimeColorFilter::onProgram(skvm::Builder* p, - skvm::Color c, - const SkColorInfo& colorInfo, - skvm::Uniforms* uniforms, - SkArenaAlloc* alloc) const { - SkASSERT(SkRuntimeEffectPriv::CanDraw(SkCapabilities::RasterBackend().get(), fEffect.get())); - - sk_sp inputs = SkRuntimeEffectPriv::TransformUniforms( - fEffect->uniforms(), fUniforms, colorInfo.colorSpace()); - SkASSERT(inputs); - - SkShaders::MatrixRec mRec(SkMatrix::I()); - mRec.markTotalMatrixInvalid(); - RuntimeEffectVMCallbacks callbacks(p, uniforms, alloc, fChildren, mRec, c, colorInfo); - std::vector uniform = - SkRuntimeEffectPriv::MakeSkVMUniforms(p, uniforms, fEffect->uniformSize(), *inputs); - - // There should be no way for the color filter to use device coords, but we need to supply - // something. (Uninitialized values can trigger asserts in skvm::Builder). - skvm::Coord zeroCoord = {p->splat(0.0f), p->splat(0.0f)}; - return SkSL::ProgramToSkVM(*fEffect->fBaseProgram, - fEffect->fMain, - p, - /*debugTrace=*/nullptr, - SkSpan(uniform), - /*device=*/zeroCoord, - /*local=*/zeroCoord, - c, - c, - &callbacks); -} -#endif - -SkPMColor4f SkRuntimeColorFilter::onFilterColor4f(const SkPMColor4f& color, - SkColorSpace* dstCS) const { -#if defined(SK_ENABLE_SKVM) - // Get the generic program for filtering a single color - if (const SkFilterColorProgram* program = fEffect->getFilterColorProgram()) { - // Get our specific uniform values - sk_sp inputs = - SkRuntimeEffectPriv::TransformUniforms(fEffect->uniforms(), fUniforms, dstCS); - SkASSERT(inputs); - - auto evalChild = [&](int index, SkPMColor4f inColor) { - const auto& child = fChildren[index]; - - // SkFilterColorProgram::Make has guaranteed that any children will be color filters. - SkASSERT(!child.shader()); - SkASSERT(!child.blender()); - if (SkColorFilter* colorFilter = child.colorFilter()) { - return as_CFB(colorFilter)->onFilterColor4f(inColor, dstCS); - } - return inColor; - }; - - return program->eval(color, inputs->data(), evalChild); - } -#endif - // We were unable to build a cached (per-effect) program. Use the base-class fallback, - // which builds a program for the specific filter instance. - return SkColorFilterBase::onFilterColor4f(color, dstCS); -} - bool SkRuntimeColorFilter::onIsAlphaUnchanged() const { -#ifdef SK_ENABLE_SKSL_IN_RASTER_PIPELINE return fEffect->isAlphaUnchanged(); -#else - return fEffect->getFilterColorProgram() && fEffect->isAlphaUnchanged(); -#endif } void SkRuntimeColorFilter::flatten(SkWriteBuffer& buffer) const { diff --git a/src/effects/colorfilters/SkRuntimeColorFilter.h b/src/effects/colorfilters/SkRuntimeColorFilter.h index 65e393b469c0..1115cbe899d8 100644 --- a/src/effects/colorfilters/SkRuntimeColorFilter.h +++ b/src/effects/colorfilters/SkRuntimeColorFilter.h @@ -13,13 +13,11 @@ #include "include/core/SkRefCnt.h" #include "include/core/SkSpan.h" #include "include/effects/SkRuntimeEffect.h" -#include "include/private/SkColorData.h" #include "include/private/base/SkDebug.h" #include "src/effects/colorfilters/SkColorFilterBase.h" #include -class SkColorSpace; class SkReadBuffer; class SkWriteBuffer; struct SkStageRec; @@ -28,26 +26,10 @@ class SkRuntimeColorFilter : public SkColorFilterBase { public: SkRuntimeColorFilter(sk_sp effect, sk_sp uniforms, - SkSpan children); - -#if defined(SK_GRAPHITE) - void addToKey(const skgpu::graphite::KeyContext& keyContext, - skgpu::graphite::PaintParamsKeyBuilder* builder, - skgpu::graphite::PipelineDataGatherer* gatherer) const override; -#endif + SkSpan children); bool appendStages(const SkStageRec& rec, bool) const override; -#if defined(SK_ENABLE_SKVM) - skvm::Color onProgram(skvm::Builder* p, - skvm::Color c, - const SkColorInfo& colorInfo, - skvm::Uniforms* uniforms, - SkArenaAlloc* alloc) const override; -#endif - - SkPMColor4f onFilterColor4f(const SkPMColor4f& color, SkColorSpace* dstCS) const override; - bool onIsAlphaUnchanged() const override; void flatten(SkWriteBuffer& buffer) const override; @@ -60,7 +42,7 @@ class SkRuntimeColorFilter : public SkColorFilterBase { sk_sp effect() const { return fEffect; } sk_sp uniforms() const { return fUniforms; } - std::vector children() const { return fChildren; } + SkSpan children() const { return fChildren; } private: sk_sp fEffect; diff --git a/src/effects/colorfilters/SkTableColorFilter.cpp b/src/effects/colorfilters/SkTableColorFilter.cpp index d43ae5be0714..dac07e4f410e 100644 --- a/src/effects/colorfilters/SkTableColorFilter.cpp +++ b/src/effects/colorfilters/SkTableColorFilter.cpp @@ -22,23 +22,6 @@ #include #include -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/Image_Graphite.h" -#include "src/gpu/graphite/KeyContext.h" -#include "src/gpu/graphite/KeyHelpers.h" -#include "src/gpu/graphite/Log.h" -#include "src/gpu/graphite/PaintParamsKey.h" -#include "src/gpu/graphite/RecorderPriv.h" - -namespace skgpu::graphite { -class PipelineDataGatherer; -} -#endif - -#if defined(SK_ENABLE_SKSL) && defined(SK_ENABLE_SKVM) -#include "src/core/SkVM.h" -#endif - bool SkTableColorFilter::appendStages(const SkStageRec& rec, bool shaderIsOpaque) const { SkRasterPipeline* p = rec.fPipeline; if (!shaderIsOpaque) { @@ -59,27 +42,6 @@ bool SkTableColorFilter::appendStages(const SkStageRec& rec, bool shaderIsOpaque return true; } -#if defined(SK_ENABLE_SKVM) -skvm::Color SkTableColorFilter::onProgram(skvm::Builder* p, - skvm::Color c, - const SkColorInfo& dst, - skvm::Uniforms* uniforms, - SkArenaAlloc*) const { - auto apply_table_to_component = [&](skvm::F32 c, const uint8_t* bytePtr) -> skvm::F32 { - skvm::I32 index = to_unorm(8, clamp01(c)); - skvm::Uniform table = uniforms->pushPtr(bytePtr); - return from_unorm(8, gather8(table, index)); - }; - - c = unpremul(c); - c.a = apply_table_to_component(c.a, fTable->alphaTable()); - c.r = apply_table_to_component(c.r, fTable->redTable()); - c.g = apply_table_to_component(c.g, fTable->greenTable()); - c.b = apply_table_to_component(c.b, fTable->blueTable()); - return premul(c); -} -#endif - void SkTableColorFilter::flatten(SkWriteBuffer& buffer) const { fTable->flatten(buffer); } @@ -88,32 +50,6 @@ sk_sp SkTableColorFilter::CreateProc(SkReadBuffer& buffer) { return SkColorFilters::Table(SkColorTable::Deserialize(buffer)); } -#if defined(SK_GRAPHITE) - -void SkTableColorFilter::addToKey(const skgpu::graphite::KeyContext& keyContext, - skgpu::graphite::PaintParamsKeyBuilder* builder, - skgpu::graphite::PipelineDataGatherer* gatherer) const { - using namespace skgpu::graphite; - - sk_sp proxy = RecorderPriv::CreateCachedProxy(keyContext.recorder(), - this->bitmap()); - if (!proxy) { - SKGPU_LOG_W("Couldn't create TableColorFilter's table"); - - // Return the input color as-is. - PriorOutputBlock::BeginBlock(keyContext, builder, gatherer); - builder->endBlock(); - return; - } - - TableColorFilterBlock::TableColorFilterData data(std::move(proxy)); - - TableColorFilterBlock::BeginBlock(keyContext, builder, gatherer, data); - builder->endBlock(); -} - -#endif - /////////////////////////////////////////////////////////////////////////////// sk_sp SkColorFilters::Table(const uint8_t table[256]) { diff --git a/src/effects/colorfilters/SkTableColorFilter.h b/src/effects/colorfilters/SkTableColorFilter.h index 9eafdd54140d..44c19aa05ad6 100644 --- a/src/effects/colorfilters/SkTableColorFilter.h +++ b/src/effects/colorfilters/SkTableColorFilter.h @@ -19,23 +19,6 @@ class SkReadBuffer; class SkWriteBuffer; struct SkStageRec; -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/Image_Graphite.h" -#include "src/gpu/graphite/KeyContext.h" -#include "src/gpu/graphite/KeyHelpers.h" -#include "src/gpu/graphite/Log.h" -#include "src/gpu/graphite/PaintParamsKey.h" -#include "src/gpu/graphite/RecorderPriv.h" - -namespace skgpu::graphite { -class PipelineDataGatherer; -} -#endif - -#if defined(SK_ENABLE_SKSL) && defined(SK_ENABLE_SKVM) -#include "src/core/SkVM.h" -#endif - class SkTableColorFilter final : public SkColorFilterBase { public: SkTableColorFilter(sk_sp table) : fTable(table) { @@ -44,22 +27,8 @@ class SkTableColorFilter final : public SkColorFilterBase { SkColorFilterBase::Type type() const override { return SkColorFilterBase::Type::kTable; } -#if defined(SK_GRAPHITE) - void addToKey(const skgpu::graphite::KeyContext&, - skgpu::graphite::PaintParamsKeyBuilder*, - skgpu::graphite::PipelineDataGatherer*) const override; -#endif - bool appendStages(const SkStageRec& rec, bool shaderIsOpaque) const override; -#if defined(SK_ENABLE_SKVM) - skvm::Color onProgram(skvm::Builder* p, - skvm::Color c, - const SkColorInfo& dst, - skvm::Uniforms* uniforms, - SkArenaAlloc*) const override; -#endif - void flatten(SkWriteBuffer& buffer) const override; const SkBitmap& bitmap() const { return fTable->bitmap(); } diff --git a/src/effects/colorfilters/SkWorkingFormatColorFilter.cpp b/src/effects/colorfilters/SkWorkingFormatColorFilter.cpp index 9bb398d7f50f..35337dbac91c 100644 --- a/src/effects/colorfilters/SkWorkingFormatColorFilter.cpp +++ b/src/effects/colorfilters/SkWorkingFormatColorFilter.cpp @@ -25,12 +25,6 @@ #include -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/KeyContext.h" -#include "src/gpu/graphite/KeyHelpers.h" -#include "src/gpu/graphite/PaintParamsKey.h" -#endif - SkWorkingFormatColorFilter::SkWorkingFormatColorFilter(sk_sp child, const skcms_TransferFunction* tf, const skcms_Matrix3x3* gamut, @@ -66,35 +60,6 @@ sk_sp SkWorkingFormatColorFilter::workingFormat(const sk_sp dstCS = keyContext.dstColorInfo().refColorSpace(); - if (!dstCS) { - dstCS = SkColorSpace::MakeSRGB(); - } - - SkAlphaType workingAT; - sk_sp workingCS = this->workingFormat(dstCS, &workingAT); - - ColorSpaceTransformBlock::ColorSpaceTransformData data1( - dstCS.get(), dstAT, workingCS.get(), workingAT); - ColorSpaceTransformBlock::BeginBlock(keyContext, builder, gatherer, &data1); - builder->endBlock(); - - as_CFB(fChild)->addToKey(keyContext, builder, gatherer); - - ColorSpaceTransformBlock::ColorSpaceTransformData data2( - workingCS.get(), workingAT, dstCS.get(), dstAT); - ColorSpaceTransformBlock::BeginBlock(keyContext, builder, gatherer, &data2); - builder->endBlock(); -} -#endif - bool SkWorkingFormatColorFilter::appendStages(const SkStageRec& rec, bool shaderIsOpaque) const { sk_sp dstCS = sk_ref_sp(rec.fDstCS); @@ -131,29 +96,6 @@ bool SkWorkingFormatColorFilter::appendStages(const SkStageRec& rec, bool shader return true; } -#if defined(SK_ENABLE_SKVM) -skvm::Color SkWorkingFormatColorFilter::onProgram(skvm::Builder* p, - skvm::Color c, - const SkColorInfo& rawDst, - skvm::Uniforms* uniforms, - SkArenaAlloc* alloc) const { - sk_sp dstCS = rawDst.refColorSpace(); - if (!dstCS) { - dstCS = SkColorSpace::MakeSRGB(); - } - - SkAlphaType workingAT; - sk_sp workingCS = this->workingFormat(dstCS, &workingAT); - - SkColorInfo dst = {rawDst.colorType(), kPremul_SkAlphaType, dstCS}, - working = {rawDst.colorType(), workingAT, workingCS}; - - c = SkColorSpaceXformSteps{dst, working}.program(p, uniforms, c); - c = as_CFB(fChild)->program(p, c, working, uniforms, alloc); - return c ? SkColorSpaceXformSteps{working, dst}.program(p, uniforms, c) : c; -} -#endif - SkPMColor4f SkWorkingFormatColorFilter::onFilterColor4f(const SkPMColor4f& origColor, SkColorSpace* rawDstCS) const { sk_sp dstCS = sk_ref_sp(rawDstCS); diff --git a/src/effects/colorfilters/SkWorkingFormatColorFilter.h b/src/effects/colorfilters/SkWorkingFormatColorFilter.h index 7274b53efd8e..d86e6cacacaa 100644 --- a/src/effects/colorfilters/SkWorkingFormatColorFilter.h +++ b/src/effects/colorfilters/SkWorkingFormatColorFilter.h @@ -33,22 +33,8 @@ class SkWorkingFormatColorFilter final : public SkColorFilterBase { return SkColorFilterBase::Type::kWorkingFormat; } -#if defined(SK_GRAPHITE) - void addToKey(const skgpu::graphite::KeyContext& keyContext, - skgpu::graphite::PaintParamsKeyBuilder* builder, - skgpu::graphite::PipelineDataGatherer* gatherer) const override; -#endif - bool appendStages(const SkStageRec& rec, bool shaderIsOpaque) const override; -#if defined(SK_ENABLE_SKVM) - skvm::Color onProgram(skvm::Builder* p, - skvm::Color c, - const SkColorInfo& rawDst, - skvm::Uniforms* uniforms, - SkArenaAlloc* alloc) const override; -#endif - SkPMColor4f onFilterColor4f(const SkPMColor4f& origColor, SkColorSpace* rawDstCS) const override; diff --git a/src/effects/imagefilters/BUILD.bazel b/src/effects/imagefilters/BUILD.bazel index aecc42574bd8..d2b9adaa6471 100644 --- a/src/effects/imagefilters/BUILD.bazel +++ b/src/effects/imagefilters/BUILD.bazel @@ -23,7 +23,6 @@ IMAGEFILTERS_FILES = [ "SkPictureImageFilter.cpp", "SkRuntimeImageFilter.cpp", "SkShaderImageFilter.cpp", - "SkTileImageFilter.cpp", ] split_srcs_and_hdrs( diff --git a/src/effects/imagefilters/SkBlendImageFilter.cpp b/src/effects/imagefilters/SkBlendImageFilter.cpp index 4583ad3ec1ec..0339ff979906 100644 --- a/src/effects/imagefilters/SkBlendImageFilter.cpp +++ b/src/effects/imagefilters/SkBlendImageFilter.cpp @@ -293,8 +293,6 @@ sk_sp SkBlendImageFilter::makeBlendShader(sk_sp bg, sk_sp> inputs) -> sk_sp { return this->makeBlendShader(inputs[kBackground], inputs[kForeground]); - }, ShaderFlags::kExplicitOutputBounds, requiredInput); + }, requiredInput); } skif::LayerSpace SkBlendImageFilter::onGetInputLayerBounds( diff --git a/src/effects/imagefilters/SkBlurImageFilter.cpp b/src/effects/imagefilters/SkBlurImageFilter.cpp index 3b6a918abc36..960652a5828d 100644 --- a/src/effects/imagefilters/SkBlurImageFilter.cpp +++ b/src/effects/imagefilters/SkBlurImageFilter.cpp @@ -23,6 +23,7 @@ #include "include/private/base/SkMalloc.h" #include "src/base/SkArenaAlloc.h" #include "src/base/SkVx.h" +#include "src/core/SkImageFilterTypes.h" #include "src/core/SkImageFilter_Base.h" #include "src/core/SkReadBuffer.h" #include "src/core/SkSpecialImage.h" @@ -37,9 +38,10 @@ #if defined(SK_GANESH) #include "include/private/gpu/ganesh/GrTypesPriv.h" -#include "src/core/SkGpuBlurUtils.h" +#include "src/gpu/ganesh/GrBlurUtils.h" #include "src/gpu/ganesh/GrSurfaceProxyView.h" #include "src/gpu/ganesh/SurfaceDrawContext.h" +#include "src/gpu/ganesh/image/SkSpecialImage_Ganesh.h" #endif // defined(SK_GANESH) #if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE1 @@ -65,7 +67,7 @@ class SkBlurImageFilter final : public SkImageFilter_Base { protected: void flatten(SkWriteBuffer&) const override; - sk_sp onFilterImage(const Context&, SkIPoint* offset) const override; + sk_sp onFilterImage(const skif::Context&, SkIPoint* offset) const override; SkIRect onFilterNodeBounds(const SkIRect& src, const SkMatrix& ctm, MapDirection, const SkIRect* inputRect) const override; @@ -74,10 +76,13 @@ class SkBlurImageFilter final : public SkImageFilter_Base { SK_FLATTENABLE_HOOKS(SkBlurImageFilter) #if defined(SK_GANESH) - sk_sp gpuFilter( - const Context& ctx, SkVector sigma, - const sk_sp &input, - SkIRect inputBounds, SkIRect dstBounds, SkIPoint inputOffset, SkIPoint* offset) const; + sk_sp gpuFilter(const skif::Context& ctx, + SkVector sigma, + const sk_sp& input, + SkIRect inputBounds, + SkIRect dstBounds, + SkIPoint inputOffset, + SkIPoint* offset) const; #endif SkSize fSigma; @@ -730,9 +735,10 @@ class TentPass final : public Pass { skvx::Vec<4, uint32_t>* fBuffer1Cursor; }; -sk_sp copy_image_with_bounds( - const SkImageFilter_Base::Context& ctx, const sk_sp &input, - SkIRect srcBounds, SkIRect dstBounds) { +sk_sp copy_image_with_bounds(const skif::Context& ctx, + const sk_sp& input, + SkIRect srcBounds, + SkIRect dstBounds) { SkBitmap inputBM; if (!input->getROPixels(&inputBM)) { return nullptr; @@ -790,16 +796,16 @@ sk_sp copy_image_with_bounds( sk_bzero(dst.getAddr32(0, y), dstWBytes); } - return SkSpecialImage::MakeFromRaster(SkIRect::MakeWH(dstBounds.width(), - dstBounds.height()), - dst, ctx.surfaceProps()); + return SkSpecialImages::MakeFromRaster( + SkIRect::MakeWH(dstBounds.width(), dstBounds.height()), dst, ctx.surfaceProps()); } // TODO: Implement CPU backend for different fTileMode. -sk_sp cpu_blur( - const SkImageFilter_Base::Context& ctx, - SkVector sigma, const sk_sp &input, - SkIRect srcBounds, SkIRect dstBounds) { +sk_sp cpu_blur(const skif::Context& ctx, + SkVector sigma, + const sk_sp& input, + SkIRect srcBounds, + SkIRect dstBounds) { // map_sigma limits sigma to 532 to match 1000px box filter limit of WebKit and Firefox. // Since this does not exceed the limits of the TentPass (2183), there won't be overflow when // computing a kernel over a pixel window filled with 255. @@ -920,13 +926,12 @@ sk_sp cpu_blur( } } - return SkSpecialImage::MakeFromRaster(SkIRect::MakeWH(dstBounds.width(), - dstBounds.height()), - dst, ctx.surfaceProps()); + return SkSpecialImages::MakeFromRaster( + SkIRect::MakeWH(dstBounds.width(), dstBounds.height()), dst, ctx.surfaceProps()); } } // namespace -sk_sp SkBlurImageFilter::onFilterImage(const Context& ctx, +sk_sp SkBlurImageFilter::onFilterImage(const skif::Context& ctx, SkIPoint* offset) const { SkIPoint inputOffset = SkIPoint::Make(0, 0); @@ -963,7 +968,7 @@ sk_sp SkBlurImageFilter::onFilterImage(const Context& ctx, if (ctx.gpuBacked()) { // Ensure the input is in the destination's gamut. This saves us from having to do the // xform during the filter itself. - input = ImageToColorSpace(ctx, input.get()); + input = SkSpecialImages::ImageToColorSpace(ctx, input.get()); result = this->gpuFilter(ctx, sigma, input, inputBounds, dstBounds, inputOffset, &resultOffset); } else @@ -980,11 +985,15 @@ sk_sp SkBlurImageFilter::onFilterImage(const Context& ctx, } #if defined(SK_GANESH) -sk_sp SkBlurImageFilter::gpuFilter( - const Context& ctx, SkVector sigma, const sk_sp &input, SkIRect inputBounds, - SkIRect dstBounds, SkIPoint inputOffset, SkIPoint* offset) const { - if (SkGpuBlurUtils::IsEffectivelyZeroSigma(sigma.x()) && - SkGpuBlurUtils::IsEffectivelyZeroSigma(sigma.y())) { +sk_sp SkBlurImageFilter::gpuFilter(const skif::Context& ctx, + SkVector sigma, + const sk_sp& input, + SkIRect inputBounds, + SkIRect dstBounds, + SkIPoint inputOffset, + SkIPoint* offset) const { + if (GrBlurUtils::IsEffectivelyZeroSigma(sigma.x()) && + GrBlurUtils::IsEffectivelyZeroSigma(sigma.y())) { offset->fX = inputBounds.x() + inputOffset.fX; offset->fY = inputBounds.y() + inputOffset.fY; return input->makeSubset(inputBounds); @@ -992,7 +1001,7 @@ sk_sp SkBlurImageFilter::gpuFilter( auto context = ctx.getContext(); - GrSurfaceProxyView inputView = input->view(context); + GrSurfaceProxyView inputView = SkSpecialImages::AsView(context, input); if (!inputView.proxy()) { return nullptr; } @@ -1000,7 +1009,7 @@ sk_sp SkBlurImageFilter::gpuFilter( dstBounds.offset(input->subset().topLeft()); inputBounds.offset(input->subset().topLeft()); - auto sdc = SkGpuBlurUtils::GaussianBlur( + auto sdc = GrBlurUtils::GaussianBlur( context, std::move(inputView), SkColorTypeToGrColorType(input->colorType()), @@ -1015,12 +1024,12 @@ sk_sp SkBlurImageFilter::gpuFilter( return nullptr; } - return SkSpecialImage::MakeDeferredFromGpu(context, - SkIRect::MakeSize(dstBounds.size()), - kNeedNewImageUniqueID_SpecialImage, - sdc->readSurfaceView(), - sdc->colorInfo(), - ctx.surfaceProps()); + return SkSpecialImages::MakeDeferredFromGpu(context, + SkIRect::MakeSize(dstBounds.size()), + kNeedNewImageUniqueID_SpecialImage, + sdc->readSurfaceView(), + sdc->colorInfo(), + ctx.surfaceProps()); } #endif diff --git a/src/effects/imagefilters/SkColorFilterImageFilter.cpp b/src/effects/imagefilters/SkColorFilterImageFilter.cpp index ba4d616b5efe..92b3304ce944 100644 --- a/src/effects/imagefilters/SkColorFilterImageFilter.cpp +++ b/src/effects/imagefilters/SkColorFilterImageFilter.cpp @@ -114,7 +114,7 @@ void SkColorFilterImageFilter::flatten(SkWriteBuffer& buffer) const { /////////////////////////////////////////////////////////////////////////////////////////////////// -skif::FilterResult SkColorFilterImageFilter::onFilterImage(const Context& ctx) const { +skif::FilterResult SkColorFilterImageFilter::onFilterImage(const skif::Context& ctx) const { return this->getChildOutput(0, ctx).applyColorFilter(ctx, fColorFilter); } diff --git a/src/effects/imagefilters/SkComposeImageFilter.cpp b/src/effects/imagefilters/SkComposeImageFilter.cpp index 3b28a11eda8b..0260126ebaba 100644 --- a/src/effects/imagefilters/SkComposeImageFilter.cpp +++ b/src/effects/imagefilters/SkComposeImageFilter.cpp @@ -5,49 +5,60 @@ * found in the LICENSE file. */ +#include "include/effects/SkImageFilters.h" + #include "include/core/SkFlattenable.h" #include "include/core/SkImageFilter.h" -#include "include/core/SkPoint.h" #include "include/core/SkRect.h" #include "include/core/SkRefCnt.h" #include "include/core/SkTypes.h" -#include "include/effects/SkImageFilters.h" #include "src/core/SkImageFilterTypes.h" #include "src/core/SkImageFilter_Base.h" -#include "src/core/SkSpecialImage.h" #include #include -class SkMatrix; class SkReadBuffer; namespace { class SkComposeImageFilter final : public SkImageFilter_Base { + static constexpr int kOuter = 0; + static constexpr int kInner = 1; + public: explicit SkComposeImageFilter(sk_sp inputs[2]) - : INHERITED(inputs, 2, nullptr, - // Compose only uses the source if the inner filter uses the source image. - // Any outer reference to source is rebound to the result of the inner. - inputs[1] ? as_IFB(inputs[1])->usesSource() : false) { - SkASSERT(inputs[0].get()); - SkASSERT(inputs[1].get()); + : SkImageFilter_Base(inputs, 2, nullptr, + // Compose only uses the source if the inner filter uses the source + // image. Any outer reference to source is rebound to the result of + // the inner. + inputs[kInner] ? as_IFB(inputs[kInner])->usesSource() : false) { + SkASSERT(inputs[kOuter].get()); + SkASSERT(inputs[kInner].get()); } SkRect computeFastBounds(const SkRect& src) const override; protected: - sk_sp onFilterImage(const Context&, SkIPoint* offset) const override; - SkIRect onFilterBounds(const SkIRect&, const SkMatrix& ctm, - MapDirection, const SkIRect* inputRect) const override; - MatrixCapability onGetCTMCapability() const override { return MatrixCapability::kComplex; } + // No flatten() needed since this does not add state beyond the input image filters handled + // by the parent implementation. private: friend void ::SkRegisterComposeImageFilterFlattenable(); SK_FLATTENABLE_HOOKS(SkComposeImageFilter) - using INHERITED = SkImageFilter_Base; + MatrixCapability onGetCTMCapability() const override { return MatrixCapability::kComplex; } + + skif::FilterResult onFilterImage(const skif::Context& context) const override; + + skif::LayerSpace onGetInputLayerBounds( + const skif::Mapping& mapping, + const skif::LayerSpace& desiredOutput, + const skif::LayerSpace& contentBounds) const override; + + skif::LayerSpace onGetOutputLayerBounds( + const skif::Mapping& mapping, + const skif::LayerSpace& contentBounds) const override; }; } // end namespace @@ -72,72 +83,59 @@ void SkRegisterComposeImageFilterFlattenable() { sk_sp SkComposeImageFilter::CreateProc(SkReadBuffer& buffer) { SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 2); - return SkImageFilters::Compose(common.getInput(0), common.getInput(1)); + return SkImageFilters::Compose(common.getInput(kOuter), common.getInput(kInner)); } /////////////////////////////////////////////////////////////////////////////////////////////////// -SkRect SkComposeImageFilter::computeFastBounds(const SkRect& src) const { - const SkImageFilter* outer = this->getInput(0); - const SkImageFilter* inner = this->getInput(1); - - return outer->computeFastBounds(inner->computeFastBounds(src)); -} - -sk_sp SkComposeImageFilter::onFilterImage(const Context& ctx, - SkIPoint* offset) const { - // The bounds passed to the inner filter must be filtered by the outer - // filter, so that the inner filter produces the pixels that the outer - // filter requires as input. This matters if the outer filter moves pixels. The content - // bounds of the outer filter is the expected output bounds of the inner filter. - SkIRect innerOutputBounds = this->getInput(1)->filterBounds(SkIRect(ctx.source().layerBounds()), - ctx.ctm(), kForward_MapDirection); - SkIRect innerClipBounds; - innerClipBounds = this->getInput(0)->filterBounds(ctx.clipBounds(), ctx.ctm(), - kReverse_MapDirection, &innerOutputBounds); - Context innerContext = ctx.withNewDesiredOutput(skif::LayerSpace(innerClipBounds)); - SkIPoint innerOffset = SkIPoint::Make(0, 0); - sk_sp inner(this->filterInput(1, innerContext, &innerOffset)); - if (!inner) { - return nullptr; - } +skif::FilterResult SkComposeImageFilter::onFilterImage(const skif::Context& ctx) const { + // Get the expected output of the inner filter, given the source image's layer bounds as content + skif::LayerSpace innerOutputBounds = + this->getChildOutputLayerBounds(kInner, ctx.mapping(), ctx.source().layerBounds()); + // Get the required input for the outer filter, that it needs to cover the desired output. + skif::LayerSpace outerRequiredInput = + this->getChildInputLayerBounds(kOuter, + ctx.mapping(), + ctx.desiredOutput(), + innerOutputBounds); + + // Evalute the inner filter and pass that to the outer filter. + skif::FilterResult innerResult = + this->getChildOutput(kInner, ctx.withNewDesiredOutput(outerRequiredInput)); // NOTE: This is the only spot in image filtering where the source image of the context // is not constant for the entire DAG evaluation. Given that the inner and outer DAG branches // were already created, there's no alternative way for the leaf nodes of the outer DAG to // get the results of the inner DAG. Overriding the source image of the context has the correct // effect, but means that the source image is not fixed for the entire filter process. - Context outerContext = ctx.withNewSource(inner, skif::LayerSpace(innerOffset)); + return this->getChildOutput(kOuter, ctx.withNewSource(innerResult)); +} - SkIPoint outerOffset = SkIPoint::Make(0, 0); - sk_sp outer(this->filterInput(0, outerContext, &outerOffset)); - if (!outer) { - return nullptr; - } +skif::LayerSpace SkComposeImageFilter::onGetInputLayerBounds( + const skif::Mapping& mapping, + const skif::LayerSpace& desiredOutput, + const skif::LayerSpace& contentBounds) const { + // The outer filter must produce 'desiredOutput'. Its required input bounds becomes the desired + // output of the inner filter. However, 'contentBounds' is the bounds visible to the input + // filter. The output bounds of the inner filter represents the content bounds of the outer. + skif::LayerSpace outerContentBounds = + this->getChildOutputLayerBounds(kInner, mapping, contentBounds); + skif::LayerSpace innerDesiredOutput = + this->getChildInputLayerBounds(kOuter, mapping, desiredOutput, outerContentBounds); + return this->getChildInputLayerBounds(kInner, mapping, innerDesiredOutput, contentBounds); +} - // TODO: Remove including innerOffset in this calculation once withNewSource() does not change - // the param-to-layer matrix. Once all filter implementations support non (0,0) source origins, - // Compose() will not change the param-to-layer mapping. Any impact from innerOffset will be - // automatically taken into account by the inner FilterResult's internal origin. - *offset = innerOffset + outerOffset; - return outer; +skif::LayerSpace SkComposeImageFilter::onGetOutputLayerBounds( + const skif::Mapping& mapping, + const skif::LayerSpace& contentBounds) const { + // The 'contentBounds' is processed by the inner filter, producing the content bounds for the + // outer filter of the composition, which then produces the final output bounds. + skif::LayerSpace innerBounds = + this->getChildOutputLayerBounds(kInner, mapping, contentBounds); + return this->getChildOutputLayerBounds(kOuter, mapping, innerBounds); } -SkIRect SkComposeImageFilter::onFilterBounds(const SkIRect& src, const SkMatrix& ctm, - MapDirection dir, const SkIRect* inputRect) const { - const SkImageFilter* outer = this->getInput(0); - const SkImageFilter* inner = this->getInput(1); - - if (dir == kReverse_MapDirection) { - // The output 'src' is processed by the outer filter, producing its required input bounds, - // which is then the output bounds required of the inner filter. We pass the inputRect to - // outer and not inner to match the default recursion logic of onGetInputLayerBounds - const SkIRect outerRect = outer->filterBounds(src, ctm, dir, inputRect); - return inner->filterBounds(outerRect, ctm, dir); - } else { - // The input 'src' is processed by the inner filter, producing the input bounds for the - // outer filter of the composition, which then produces the final forward output bounds - const SkIRect innerRect = inner->filterBounds(src, ctm, dir); - return outer->filterBounds(innerRect, ctm, dir); - } +SkRect SkComposeImageFilter::computeFastBounds(const SkRect& src) const { + return this->getInput(kOuter)->computeFastBounds( + this->getInput(kInner)->computeFastBounds(src)); } diff --git a/src/effects/imagefilters/SkCropImageFilter.cpp b/src/effects/imagefilters/SkCropImageFilter.cpp index 06fb1cd67a3f..dcdf5bb8336c 100644 --- a/src/effects/imagefilters/SkCropImageFilter.cpp +++ b/src/effects/imagefilters/SkCropImageFilter.cpp @@ -5,6 +5,7 @@ * found in the LICENSE file. */ +#include "include/effects/SkImageFilters.h" #include "src/effects/imagefilters/SkCropImageFilter.h" #include "include/core/SkFlattenable.h" @@ -12,19 +13,23 @@ #include "include/core/SkRect.h" #include "src/core/SkImageFilterTypes.h" #include "src/core/SkImageFilter_Base.h" +#include "src/core/SkPicturePriv.h" #include "src/core/SkReadBuffer.h" +#include "src/core/SkRectPriv.h" #include "src/core/SkValidationUtils.h" #include "src/core/SkWriteBuffer.h" +#include #include namespace { class SkCropImageFilter final : public SkImageFilter_Base { public: - SkCropImageFilter(const SkRect& cropRect, sk_sp input) + SkCropImageFilter(const SkRect& cropRect, SkTileMode tileMode, sk_sp input) : SkImageFilter_Base(&input, 1, /*cropRect=*/nullptr) - , fCropRect(cropRect) { + , fCropRect(cropRect) + , fTileMode(tileMode) { SkASSERT(cropRect.isFinite()); SkASSERT(cropRect.isSorted()); } @@ -37,6 +42,13 @@ class SkCropImageFilter final : public SkImageFilter_Base { private: friend void ::SkRegisterCropImageFilterFlattenable(); SK_FLATTENABLE_HOOKS(SkCropImageFilter) + static sk_sp LegacyTileCreateProc(SkReadBuffer&); + + bool onAffectsTransparentBlack() const override { return fTileMode != SkTileMode::kDecal; } + + // Disable recursing in affectsTransparentBlack() if we hit a Crop. + // TODO(skbug.com/14611): Automatically infer this from the output bounds being finite. + bool ignoreInputsAffectsTransparentBlack() const override { return true; } skif::FilterResult onFilterImage(const skif::Context& context) const override; @@ -55,30 +67,61 @@ class SkCropImageFilter final : public SkImageFilter_Base { // // The returned rect is intersected with 'outputBounds', which is either the desired or // actual bounds of the child filter. - skif::LayerSpace cropRect(const skif::Mapping& mapping, - const skif::LayerSpace& outputBounds) const { - auto crop = mapping.paramToLayer(fCropRect).roundOut(); - if (!crop.intersect(outputBounds)) { - return skif::LayerSpace::Empty(); - } else { - return crop; - } + skif::LayerSpace cropRect(const skif::Mapping& mapping) const { + skif::LayerSpace crop = mapping.paramToLayer(fCropRect); + // If 'crop' has fractional values, rounding out can mean that rendering of the input image + // or (particularly) the source content will produce fractional coverage values in the + // edge pixels. With decal tiling, this is the most accurate behavior and does not produce + // any surprises. However, with any other mode, the fractional coverage introduces + // transparency that can be greatly magnified (particularly from clamping). To avoid this + // we round in on those modes to ensure any transparency on the edges truly came from the + // content and not rasterization. + return fTileMode == SkTileMode::kDecal ? crop.roundOut() : crop.roundIn(); } + // Calculates the required input to fill the crop rect, given the desired output that it will + // be tiled across. + skif::LayerSpace requiredInput(const skif::Mapping& mapping, + const skif::LayerSpace& outputBounds) const; + skif::ParameterSpace fCropRect; + SkTileMode fTileMode; }; } // end namespace -sk_sp SkMakeCropImageFilter(const SkRect& rect, sk_sp input) { - if (!rect.isFinite()) { +sk_sp SkMakeCropImageFilter(const SkRect& rect, + SkTileMode tileMode, + sk_sp input) { + if (!SkIsValidRect(rect)) { return nullptr; } - return sk_sp(new SkCropImageFilter(rect, std::move(input))); + return sk_sp(new SkCropImageFilter(rect, tileMode, std::move(input))); +} + +sk_sp SkImageFilters::Tile(const SkRect& src, + const SkRect& dst, + sk_sp input) { + // The Tile filter is simply a crop to 'src' with a kRepeat tile mode wrapped in a crop to 'dst' + // with a kDecal tile mode. + sk_sp filter = SkMakeCropImageFilter(src, SkTileMode::kRepeat, std::move(input)); + filter = SkMakeCropImageFilter(dst, SkTileMode::kDecal, std::move(filter)); + return filter; } void SkRegisterCropImageFilterFlattenable() { SK_REGISTER_FLATTENABLE(SkCropImageFilter); + // TODO (michaelludwig) - Remove after grace period for SKPs to stop using old name + SkFlattenable::Register("SkTileImageFilter", SkCropImageFilter::LegacyTileCreateProc); + SkFlattenable::Register("SkTileImageFilterImpl", SkCropImageFilter::LegacyTileCreateProc); +} + +sk_sp SkCropImageFilter::LegacyTileCreateProc(SkReadBuffer& buffer) { + SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1); + SkRect src, dst; + buffer.readRect(&src); + buffer.readRect(&dst); + return SkImageFilters::Tile(src, dst, common.getInput(0)); } sk_sp SkCropImageFilter::CreateProc(SkReadBuffer& buffer) { @@ -87,26 +130,59 @@ sk_sp SkCropImageFilter::CreateProc(SkReadBuffer& buffer) { if (!buffer.isValid() || !buffer.validate(SkIsValidRect(cropRect))) { return nullptr; } - return SkMakeCropImageFilter(cropRect, common.getInput(0)); + + SkTileMode tileMode = SkTileMode::kDecal; + if (!buffer.isVersionLT(SkPicturePriv::kCropImageFilterSupportsTiling)) { + tileMode = buffer.read32LE(SkTileMode::kLastTileMode); + } + + return SkMakeCropImageFilter(cropRect, tileMode, common.getInput(0)); } void SkCropImageFilter::flatten(SkWriteBuffer& buffer) const { this->SkImageFilter_Base::flatten(buffer); buffer.writeRect(SkRect(fCropRect)); + buffer.writeInt(static_cast(fTileMode)); } /////////////////////////////////////////////////////////////////////////////////////////////////// +skif::LayerSpace SkCropImageFilter::requiredInput( + const skif::Mapping& mapping, + const skif::LayerSpace& outputBounds) const { + skif::LayerSpace crop = this->cropRect(mapping); + + if (fTileMode == SkTileMode::kRepeat || fTileMode == SkTileMode::kMirror) { + // For simplicity, try and fill the full crop rect for periodic tile modes. Hypothetically + // if the output would only show one period of the image, we could calculate the optimal + // subset similar to decal/clamp tiles, but that would require exposing more internals of + // FilterResult::applyCrop to the rest of the SkImageFilter system. + return crop; + } else { + // Both clamp and decal won't show content inside cropRect that's beyond 'outputBounds' + if (!crop.intersect(outputBounds)) { + if (fTileMode == SkTileMode::kClamp) { + // Except for clamping when there's no intersection; in that case the closest + // row/column/corner covers the entire output bounds. + crop = skif::LayerSpace( + SkRectPriv::ClosestDisjointEdge(SkIRect(crop), SkIRect(outputBounds))); + } else { + crop = skif::LayerSpace::Empty(); + } + } + return crop; + } +} + skif::FilterResult SkCropImageFilter::onFilterImage(const skif::Context& context) const { - skif::LayerSpace cropBounds = - this->cropRect(context.mapping(), context.desiredOutput()); + skif::LayerSpace cropInput = this->requiredInput(context.mapping(), + context.desiredOutput()); skif::FilterResult childOutput = - this->getChildOutput(0, context.withNewDesiredOutput(cropBounds)); + this->getChildOutput(0, context.withNewDesiredOutput(cropInput)); - // While the child filter may have exactly matched the requested 'cropBounds', it's not - // necessarily the case, so applyCrop() ensures this is true while avoiding rendering a new - // when possible. - return childOutput.applyCrop(context, cropBounds); + // The 'cropInput' is the optimal input to satisfy the original crop rect, but we have to pass + // the actual crop rect in order for the tile mode to be applied correctly to the FilterResult. + return childOutput.applyCrop(context, this->cropRect(context.mapping()), fTileMode); } // TODO(michaelludwig) - onGetInputLayerBounds() and onGetOutputLayerBounds() are tightly coupled @@ -122,7 +198,7 @@ skif::LayerSpace SkCropImageFilter::onGetInputLayerBounds( // Assuming unbounded desired output, this filter only needs to process an image that's at most // sized to our crop rect, but we can restrict the crop rect to just what's requested since // anything in the crop but outside 'desiredOutput' won't be visible. - skif::LayerSpace requiredInput = this->cropRect(mapping, desiredOutput); + skif::LayerSpace requiredInput = this->requiredInput(mapping, desiredOutput); // Our required input is the desired output for our child image filter. return this->getChildInputLayerBounds(0, mapping, requiredInput, contentBounds); @@ -131,12 +207,26 @@ skif::LayerSpace SkCropImageFilter::onGetInputLayerBounds( skif::LayerSpace SkCropImageFilter::onGetOutputLayerBounds( const skif::Mapping& mapping, const skif::LayerSpace& contentBounds) const { - // Assuming unbounded child content, our output is a decal-tiled image sized to our crop rect. + // Assuming unbounded child content, our output is an image tiled around the crop rect. // But the child output image is drawn into our output surface with its own decal tiling, which // may allow the output dimensions to be reduced. skif::LayerSpace childOutput = this->getChildOutputLayerBounds(0, mapping, contentBounds); - return this->cropRect(mapping, childOutput); + + skif::LayerSpace crop = this->cropRect(mapping); + if (!crop.intersect(childOutput)) { + // Regardless of tile mode, the content within the crop rect is fully transparent, so + // any tiling will maintain that transparency. + return skif::LayerSpace::Empty(); + } else { + // The crop rect contains non-transparent content from the child filter; if not a decal + // tile mode, the actual visual output is unbounded (even if the underlying data is smaller) + if (fTileMode == SkTileMode::kDecal) { + return crop; + } else { + return skif::LayerSpace(SkRectPriv::MakeILarge()); + } + } } SkRect SkCropImageFilter::computeFastBounds(const SkRect& bounds) const { @@ -150,14 +240,18 @@ SkRect SkCropImageFilter::computeFastBounds(const SkRect& bounds) const { // nodes that affect transparent black, then fastBounds() and onAffectsTransparentBlack() impls // can go away entirely. That's not feasible until everything else is migrated onto the new crop // rect filter and the new APIs. - if (this->getInput(0) && !this->getInput(0)->canComputeFastBounds()) { - // The input bounds to the crop are effectively infinite so the output fills the crop rect. - return SkRect(fCropRect); + SkRect inputBounds = bounds; + if (this->getInput(0)) { + if (this->getInput(0)->canComputeFastBounds()) { + inputBounds = this->getInput(0)->computeFastBounds(bounds); + } else { + // The input bounds to the crop are effectively infinite + inputBounds = SkRectPriv::MakeLargeS32(); + } } - SkRect inputBounds = this->getInput(0) ? this->getInput(0)->computeFastBounds(bounds) : bounds; if (!inputBounds.intersect(SkRect(fCropRect))) { return SkRect::MakeEmpty(); } - return inputBounds; + return fTileMode == SkTileMode::kDecal ? inputBounds : SkRectPriv::MakeLargeS32(); } diff --git a/src/effects/imagefilters/SkCropImageFilter.h b/src/effects/imagefilters/SkCropImageFilter.h index 8901a677b202..117d949b2913 100644 --- a/src/effects/imagefilters/SkCropImageFilter.h +++ b/src/effects/imagefilters/SkCropImageFilter.h @@ -8,13 +8,23 @@ #ifndef SkCropImageFilter_DEFINED #define SkCropImageFilter_DEFINED +#include "include/core/SkImageFilter.h" #include "include/core/SkRefCnt.h" +#include "include/core/SkTileMode.h" #include "include/core/SkTypes.h" -class SkImageFilter; +#include + struct SkRect; // TODO (michaelludwig): Move to SkImageFilters::Crop when ready to expose to the public -SK_API sk_sp SkMakeCropImageFilter(const SkRect& rect, sk_sp input); +SK_API sk_sp SkMakeCropImageFilter(const SkRect& rect, + SkTileMode tileMode, + sk_sp input); + +inline SK_API sk_sp SkMakeCropImageFilter(const SkRect& rect, + sk_sp input) { + return SkMakeCropImageFilter(rect, SkTileMode::kDecal, std::move(input)); +} #endif diff --git a/src/effects/imagefilters/SkDisplacementMapImageFilter.cpp b/src/effects/imagefilters/SkDisplacementMapImageFilter.cpp index 484e775bd876..5e1f185e315d 100644 --- a/src/effects/imagefilters/SkDisplacementMapImageFilter.cpp +++ b/src/effects/imagefilters/SkDisplacementMapImageFilter.cpp @@ -263,13 +263,13 @@ skif::FilterResult SkDisplacementMapImageFilter::onFilterImage(const skif::Conte builder.add(displacementOutput, /*sampleBounds=*/outputBounds); builder.add(colorOutput, /*sampleBounds=*/requiredColorInput, - ShaderFlags::kNonLinearSampling, + ShaderFlags::kNonTrivialSampling, kDisplacementSampling); return builder.eval( [&](SkSpan> inputs) { return make_displacement_shader(inputs[kDisplacement], inputs[kColor], scale, fXChannel, fYChannel); - }, ShaderFlags::kExplicitOutputBounds, outputBounds); + }, outputBounds); } skif::LayerSpace SkDisplacementMapImageFilter::onGetInputLayerBounds( diff --git a/src/effects/imagefilters/SkDropShadowImageFilter.cpp b/src/effects/imagefilters/SkDropShadowImageFilter.cpp index 3f9842017e8a..6d601bdee743 100644 --- a/src/effects/imagefilters/SkDropShadowImageFilter.cpp +++ b/src/effects/imagefilters/SkDropShadowImageFilter.cpp @@ -5,95 +5,71 @@ * found in the LICENSE file. */ +#include "include/effects/SkImageFilters.h" + #include "include/core/SkBlendMode.h" -#include "include/core/SkCanvas.h" #include "include/core/SkColor.h" #include "include/core/SkColorFilter.h" #include "include/core/SkFlattenable.h" #include "include/core/SkImageFilter.h" #include "include/core/SkMatrix.h" -#include "include/core/SkPaint.h" #include "include/core/SkPoint.h" -#include "include/core/SkRect.h" #include "include/core/SkRefCnt.h" #include "include/core/SkSamplingOptions.h" #include "include/core/SkScalar.h" +#include "include/core/SkSize.h" #include "include/core/SkTypes.h" -#include "include/effects/SkImageFilters.h" #include "include/private/base/SkTo.h" #include "src/core/SkImageFilter_Base.h" +#include "src/core/SkPicturePriv.h" #include "src/core/SkReadBuffer.h" -#include "src/core/SkSpecialImage.h" -#include "src/core/SkSpecialSurface.h" -#include "src/core/SkWriteBuffer.h" +#include "src/effects/imagefilters/SkCropImageFilter.h" +#include #include -namespace { +struct SkRect; -class SkDropShadowImageFilter final : public SkImageFilter_Base { -public: - SkDropShadowImageFilter(SkScalar dx, SkScalar dy, SkScalar sigmaX, SkScalar sigmaY, - SkColor color, bool shadowOnly, sk_sp input, - const SkRect* cropRect) - : INHERITED(&input, 1, cropRect) - , fDx(dx) - , fDy(dy) - , fSigmaX(sigmaX) - , fSigmaY(sigmaY) - , fColor(color) - , fShadowOnly(shadowOnly) {} +namespace { - static sk_sp Make(SkScalar dx, SkScalar dy, SkScalar sigmaX, SkScalar sigmaY, - SkColor color, bool shadowOnly, sk_sp input, - const SkRect* cropRect) { - return sk_sp(new SkDropShadowImageFilter( - dx, dy, sigmaX, sigmaY, color, shadowOnly, std::move(input), cropRect)); +static sk_sp make_drop_shadow_graph(SkVector offset, + SkSize sigma, + SkColor color, + bool shadowOnly, + sk_sp input, + const SkRect* crop) { + // A drop shadow blurs the input, filters it to be the solid color + blurred + // alpha, and then offsets it. If it's not shadow-only, the input is then + // src-over blended on top. Finally it's cropped to the optional 'crop'. + sk_sp filter = input; + filter = SkImageFilters::Blur(sigma.fWidth, sigma.fHeight, std::move(filter)); + filter = SkImageFilters::ColorFilter( + SkColorFilters::Blend(color, SkBlendMode::kSrcIn), + std::move(filter)); + // TODO: Offset should take SkSamplingOptions too, but kLinear filtering is needed to hide + // nearest-neighbor sampling artifacts from fractional offsets applied post-blur. + filter = SkImageFilters::MatrixTransform(SkMatrix::Translate(offset.fX, offset.fY), + SkFilterMode::kLinear, + std::move(filter)); + if (!shadowOnly) { + filter = SkImageFilters::Blend( + SkBlendMode::kSrcOver, std::move(filter), std::move(input)); } - - SkRect computeFastBounds(const SkRect&) const override; - -protected: - void flatten(SkWriteBuffer&) const override; - sk_sp onFilterImage(const Context&, SkIPoint* offset) const override; - SkIRect onFilterNodeBounds(const SkIRect& src, const SkMatrix& ctm, - MapDirection, const SkIRect* inputRect) const override; - -private: - friend void ::SkRegisterDropShadowImageFilterFlattenable(); - SK_FLATTENABLE_HOOKS(SkDropShadowImageFilter) - - SkScalar fDx, fDy, fSigmaX, fSigmaY; - SkColor fColor; - bool fShadowOnly; - - using INHERITED = SkImageFilter_Base; -}; - -} // end namespace - -sk_sp SkImageFilters::DropShadow( - SkScalar dx, SkScalar dy, SkScalar sigmaX, SkScalar sigmaY, SkColor color, - sk_sp input, const CropRect& cropRect) { - return SkDropShadowImageFilter::Make(dx, dy, sigmaX, sigmaY, color, /* shadowOnly */ false, - std::move(input), cropRect); + if (crop) { + filter = SkMakeCropImageFilter(*crop, std::move(filter)); + } + return filter; } -sk_sp SkImageFilters::DropShadowOnly( - SkScalar dx, SkScalar dy, SkScalar sigmaX, SkScalar sigmaY, SkColor color, - sk_sp input, const CropRect& cropRect) { - return SkDropShadowImageFilter::Make(dx, dy, sigmaX, sigmaY, color, /* shadowOnly */ true, - std::move(input), cropRect); -} +sk_sp legacy_drop_shadow_create_proc(SkReadBuffer& buffer) { + if (!buffer.isVersionLT(SkPicturePriv::Version::kDropShadowImageFilterComposition)) { + // SKPs created with this version or newer just serialize the image filter composition that + // is equivalent to a drop-shadow, instead of a single dedicated flattenable for the effect. + return nullptr; + } -void SkRegisterDropShadowImageFilterFlattenable() { - SK_REGISTER_FLATTENABLE(SkDropShadowImageFilter); - // TODO (michaelludwig) - Remove after grace period for SKPs to stop using old name - SkFlattenable::Register("SkDropShadowImageFilterImpl", SkDropShadowImageFilter::CreateProc); -} + auto [child, cropRect] = SkImageFilter_Base::Unflatten(buffer); -sk_sp SkDropShadowImageFilter::CreateProc(SkReadBuffer& buffer) { - SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1); SkScalar dx = buffer.readScalar(); SkScalar dy = buffer.readScalar(); SkScalar sigmaX = buffer.readScalar(); @@ -104,102 +80,28 @@ sk_sp SkDropShadowImageFilter::CreateProc(SkReadBuffer& buffer) { // where shadow-and-foreground was 0 and shadow-only was 1. Other than the number of bits, this // is equivalent to the bool that SkDropShadowImageFilter now uses. bool shadowOnly = SkToBool(buffer.read32LE(1)); - return SkDropShadowImageFilter::Make(dx, dy, sigmaX, sigmaY, color, shadowOnly, - common.getInput(0), common.cropRect()); -} - -void SkDropShadowImageFilter::flatten(SkWriteBuffer& buffer) const { - this->INHERITED::flatten(buffer); - buffer.writeScalar(fDx); - buffer.writeScalar(fDy); - buffer.writeScalar(fSigmaX); - buffer.writeScalar(fSigmaY); - buffer.writeColor(fColor); - // See CreateProc, but we save the bool as an int to match previous enum serialization. - buffer.writeInt(fShadowOnly); + return make_drop_shadow_graph({dx, dy}, {sigmaX, sigmaY}, color, shadowOnly, + std::move(child), cropRect ? &*cropRect : nullptr); } -/////////////////////////////////////////////////////////////////////////////////////////////////// +} // anonymous namespace -sk_sp SkDropShadowImageFilter::onFilterImage(const Context& ctx, - SkIPoint* offset) const { - SkIPoint inputOffset = SkIPoint::Make(0, 0); - sk_sp input(this->filterInput(0, ctx, &inputOffset)); - if (!input) { - return nullptr; - } - - const SkIRect inputBounds = SkIRect::MakeXYWH(inputOffset.x(), inputOffset.y(), - input->width(), input->height()); - SkIRect bounds; - if (!this->applyCropRect(ctx, inputBounds, &bounds)) { - return nullptr; - } - - sk_sp surf(ctx.makeSurface(bounds.size())); - if (!surf) { - return nullptr; - } - - SkCanvas* canvas = surf->getCanvas(); - SkASSERT(canvas); - - canvas->clear(0x0); - - SkVector sigma = SkVector::Make(fSigmaX, fSigmaY); - ctx.ctm().mapVectors(&sigma, 1); - sigma.fX = SkScalarAbs(sigma.fX); - sigma.fY = SkScalarAbs(sigma.fY); - - SkPaint paint; - paint.setAntiAlias(true); - paint.setImageFilter(SkImageFilters::Blur(sigma.fX, sigma.fY, nullptr)); - paint.setColorFilter(SkColorFilters::Blend(fColor, SkBlendMode::kSrcIn)); - - SkVector offsetVec = SkVector::Make(fDx, fDy); - ctx.ctm().mapVectors(&offsetVec, 1); - - canvas->translate(SkIntToScalar(inputOffset.fX) - SkIntToScalar(bounds.fLeft), - SkIntToScalar(inputOffset.fY) - SkIntToScalar(bounds.fTop)); - input->draw(canvas, offsetVec.fX, offsetVec.fY, SkSamplingOptions(), &paint); - - if (!fShadowOnly) { - input->draw(canvas, 0, 0); - } - offset->fX = bounds.fLeft; - offset->fY = bounds.fTop; - return surf->makeImageSnapshot(); +sk_sp SkImageFilters::DropShadow( + SkScalar dx, SkScalar dy, SkScalar sigmaX, SkScalar sigmaY, SkColor color, + sk_sp input, const CropRect& cropRect) { + return make_drop_shadow_graph({dx, dy}, {sigmaX, sigmaY}, color, /*shadowOnly=*/false, + std::move(input), cropRect); } -SkRect SkDropShadowImageFilter::computeFastBounds(const SkRect& src) const { - SkRect bounds = this->getInput(0) ? this->getInput(0)->computeFastBounds(src) : src; - SkRect shadowBounds = bounds; - shadowBounds.offset(fDx, fDy); - shadowBounds.outset(fSigmaX * 3, fSigmaY * 3); - if (!fShadowOnly) { - bounds.join(shadowBounds); - } else { - bounds = shadowBounds; - } - return bounds; +sk_sp SkImageFilters::DropShadowOnly( + SkScalar dx, SkScalar dy, SkScalar sigmaX, SkScalar sigmaY, SkColor color, + sk_sp input, const CropRect& cropRect) { + return make_drop_shadow_graph({dx, dy}, {sigmaX, sigmaY}, color, /*shadowOnly=*/true, + std::move(input), cropRect); } -SkIRect SkDropShadowImageFilter::onFilterNodeBounds( - const SkIRect& src, const SkMatrix& ctm, MapDirection dir, const SkIRect* inputRect) const { - SkVector offsetVec = SkVector::Make(fDx, fDy); - if (kReverse_MapDirection == dir) { - offsetVec.negate(); - } - ctm.mapVectors(&offsetVec, 1); - SkIRect dst = src.makeOffset(SkScalarCeilToInt(offsetVec.x()), - SkScalarCeilToInt(offsetVec.y())); - SkVector sigma = SkVector::Make(fSigmaX, fSigmaY); - ctm.mapVectors(&sigma, 1); - dst.outset( - SkScalarCeilToInt(SkScalarAbs(sigma.x() * 3)), - SkScalarCeilToInt(SkScalarAbs(sigma.y() * 3))); - if (!fShadowOnly) { - dst.join(src); - } - return dst; +// TODO (michaelludwig) - Remove after grace period for SKPs to stop using old create proc +void SkRegisterLegacyDropShadowImageFilterFlattenable() { + SkFlattenable::Register("SkDropShadowImageFilter", legacy_drop_shadow_create_proc); + SkFlattenable::Register("SkDropShadowImageFilterImpl", legacy_drop_shadow_create_proc); } diff --git a/src/effects/imagefilters/SkLightingImageFilter.cpp b/src/effects/imagefilters/SkLightingImageFilter.cpp index 990efdb2b779..aa16f2a4fb76 100644 --- a/src/effects/imagefilters/SkLightingImageFilter.cpp +++ b/src/effects/imagefilters/SkLightingImageFilter.cpp @@ -5,2186 +5,741 @@ * found in the LICENSE file. */ -#include "include/core/SkAlphaType.h" -#include "include/core/SkBitmap.h" +#include "include/effects/SkImageFilters.h" +#include "src/effects/imagefilters/SkCropImageFilter.h" + +#ifdef SK_ENABLE_SKSL + #include "include/core/SkColor.h" -#include "include/core/SkColorPriv.h" -#include "include/core/SkColorType.h" #include "include/core/SkFlattenable.h" #include "include/core/SkImageFilter.h" -#include "include/core/SkImageInfo.h" -#include "include/core/SkMatrix.h" +#include "include/core/SkM44.h" #include "include/core/SkPoint.h" #include "include/core/SkPoint3.h" #include "include/core/SkRect.h" #include "include/core/SkRefCnt.h" -#include "include/core/SkSamplingOptions.h" #include "include/core/SkScalar.h" -#include "include/core/SkString.h" +#include "include/core/SkShader.h" #include "include/core/SkTypes.h" -#include "include/effects/SkImageFilters.h" -#include "include/private/base/SkFloatingPoint.h" -#include "include/private/base/SkTPin.h" +#include "include/effects/SkRuntimeEffect.h" +#include "include/private/base/SkCPUTypes.h" +#include "include/private/base/SkSpan_impl.h" +#include "src/core/SkImageFilterTypes.h" #include "src/core/SkImageFilter_Base.h" #include "src/core/SkReadBuffer.h" -#include "src/core/SkSpecialImage.h" +#include "src/core/SkRectPriv.h" +#include "src/core/SkRuntimeEffectPriv.h" #include "src/core/SkWriteBuffer.h" -#include -#include -#include #include -#if defined(SK_GANESH) -#include "include/gpu/GpuTypes.h" -#include "include/gpu/GrRecordingContext.h" -#include "include/gpu/GrTypes.h" -#include "include/private/SkSLSampleUsage.h" -#include "include/private/gpu/ganesh/GrTypesPriv.h" -#include "src/core/SkSLTypeShared.h" -#include "src/gpu/KeyBuilder.h" -#include "src/gpu/SkBackingFit.h" -#include "src/gpu/ganesh/GrCaps.h" -#include "src/gpu/ganesh/GrFragmentProcessor.h" -#include "src/gpu/ganesh/GrImageInfo.h" -#include "src/gpu/ganesh/GrProcessorUnitTest.h" -#include "src/gpu/ganesh/GrRecordingContextPriv.h" -#include "src/gpu/ganesh/GrSamplerState.h" -#include "src/gpu/ganesh/GrShaderVar.h" -#include "src/gpu/ganesh/GrSurfaceProxy.h" -#include "src/gpu/ganesh/GrSurfaceProxyView.h" -#include "src/gpu/ganesh/SurfaceFillContext.h" -#include "src/gpu/ganesh/effects/GrTextureEffect.h" -#include "src/gpu/ganesh/glsl/GrGLSLFragmentShaderBuilder.h" -#include "src/gpu/ganesh/glsl/GrGLSLProgramDataManager.h" -#include "src/gpu/ganesh/glsl/GrGLSLUniformHandler.h" - -struct GrShaderCaps; - -// For brevity -typedef GrGLSLProgramDataManager::UniformHandle UniformHandle; -#endif - -#if GR_TEST_UTILS -#include "src/base/SkRandom.h" -#endif - -const SkScalar gOneThird = SkIntToScalar(1) / 3; -const SkScalar gTwoThirds = SkIntToScalar(2) / 3; -const SkScalar gOneHalf = 0.5f; -const SkScalar gOneQuarter = 0.25f; - -#if defined(SK_GANESH) -static void setUniformPoint3(const GrGLSLProgramDataManager& pdman, UniformHandle uni, - const SkPoint3& point) { - static_assert(sizeof(SkPoint3) == 3 * sizeof(float)); - pdman.set3fv(uni, 1, &point.fX); -} - -static void setUniformNormal3(const GrGLSLProgramDataManager& pdman, UniformHandle uni, - const SkPoint3& point) { - setUniformPoint3(pdman, uni, point); -} -#endif - -// Shift matrix components to the left, as we advance pixels to the right. -static inline void shiftMatrixLeft(int m[9]) { - m[0] = m[1]; - m[3] = m[4]; - m[6] = m[7]; - m[1] = m[2]; - m[4] = m[5]; - m[7] = m[8]; -} - -static inline void fast_normalize(SkPoint3* vector) { - // add a tiny bit so we don't have to worry about divide-by-zero - SkScalar magSq = vector->dot(*vector) + SK_ScalarNearlyZero; -#if defined(_MSC_VER) && _MSC_VER >= 1920 - // Visual Studio 2019 has some kind of code-generation bug in release builds involving the - // lighting math in this file. Using the portable rsqrt avoids the issue. This issue appears - // to be specific to the collection of (inline) functions in this file that call into this - // function, not with sk_float_rsqrt itself. - SkScalar scale = sk_float_rsqrt_portable(magSq); -#else - SkScalar scale = sk_float_rsqrt(magSq); -#endif - vector->fX *= scale; - vector->fY *= scale; - vector->fZ *= scale; -} - -static SkPoint3 read_point3(SkReadBuffer& buffer) { - SkPoint3 point; - point.fX = buffer.readScalar(); - point.fY = buffer.readScalar(); - point.fZ = buffer.readScalar(); - buffer.validate(SkScalarIsFinite(point.fX) && - SkScalarIsFinite(point.fY) && - SkScalarIsFinite(point.fZ)); - return point; -} - -static void write_point3(const SkPoint3& point, SkWriteBuffer& buffer) { - buffer.writeScalar(point.fX); - buffer.writeScalar(point.fY); - buffer.writeScalar(point.fZ); -} +struct SkISize; namespace { -class GpuLight; -class SkImageFilterLight : public SkRefCnt { -public: - enum LightType { - kDistant_LightType, - kPoint_LightType, - kSpot_LightType, - - kLast_LightType = kSpot_LightType - }; - virtual LightType type() const = 0; - const SkPoint3& color() const { return fColor; } - virtual std::unique_ptr createGpuLight() const = 0; - virtual bool isEqual(const SkImageFilterLight& other) const { - return fColor == other.fColor; - } - virtual SkImageFilterLight* transform(const SkMatrix& matrix) const = 0; - - // Defined below SkLight's subclasses. - void flattenLight(SkWriteBuffer& buffer) const; - static SkImageFilterLight* UnflattenLight(SkReadBuffer& buffer); - - virtual SkPoint3 surfaceToLight(int x, int y, int z, SkScalar surfaceScale) const = 0; - virtual SkPoint3 lightColor(const SkPoint3& surfaceToLight) const = 0; - -protected: - SkImageFilterLight(SkColor color) { - fColor = SkPoint3::Make(SkIntToScalar(SkColorGetR(color)), - SkIntToScalar(SkColorGetG(color)), - SkIntToScalar(SkColorGetB(color))); - } - SkImageFilterLight(const SkPoint3& color) : fColor(color) {} - - SkImageFilterLight(SkReadBuffer& buffer) { - fColor = read_point3(buffer); - } - - virtual void onFlattenLight(SkWriteBuffer& buffer) const = 0; - - -private: - using INHERITED = SkRefCnt; - SkPoint3 fColor; +// The 3D points/vectors used for lighting don't have a great analog for the rest of the image +// filtering system, and don't have any representation for ParameterSpace and LayerSpace. The +// SVG spec is also vague on how to handle managing them. Using the principle of least-surprise, +// the X and Y coordinates are treated as ParameterSpace and the Z will be +// scaled by the average of the X and Y scale factors when tranforming to layer space. For uniform +// scaling transforms, this has the desirable behavior of uniformly scaling the Z axis as well. +struct ZValue { + ZValue() : fZ(0.f) {} + ZValue(float z) : fZ(z) {} + operator float() const { return fZ; } + + float fZ; }; +} // anonymous namespace -class BaseLightingType { +namespace skif { +template<> +class LayerSpace { public: - BaseLightingType() {} - virtual ~BaseLightingType() {} + LayerSpace() = default; + explicit LayerSpace(ZValue z) : fData(z) {} - virtual SkPMColor light(const SkPoint3& normal, const SkPoint3& surfaceTolight, - const SkPoint3& lightColor) const= 0; -}; + float val() const { return fData.fZ; } -class DiffuseLightingType : public BaseLightingType { -public: - DiffuseLightingType(SkScalar kd) - : fKD(kd) {} - SkPMColor light(const SkPoint3& normal, const SkPoint3& surfaceTolight, - const SkPoint3& lightColor) const override { - SkScalar colorScale = fKD * normal.dot(surfaceTolight); - SkPoint3 color = lightColor.makeScale(colorScale); - return SkPackARGB32(255, - SkTPin(SkScalarRoundToInt(color.fX), 0, 255), - SkTPin(SkScalarRoundToInt(color.fY), 0, 255), - SkTPin(SkScalarRoundToInt(color.fZ), 0, 255)); + static LayerSpace Map(const Mapping& mapping, ParameterSpace z) { + // See comment on ZValue for rationale. + skif::LayerSpace z2d = mapping.paramToLayer( + skif::ParameterSpace({ZValue(z), ZValue(z)})); + return LayerSpace(SkScalarAve(z2d.x(), z2d.y())); } -private: - SkScalar fKD; -}; - -static SkScalar max_component(const SkPoint3& p) { - return p.x() > p.y() ? (p.x() > p.z() ? p.x() : p.z()) : (p.y() > p.z() ? p.y() : p.z()); -} -class SpecularLightingType : public BaseLightingType { -public: - SpecularLightingType(SkScalar ks, SkScalar shininess) - : fKS(ks), fShininess(shininess) {} - SkPMColor light(const SkPoint3& normal, const SkPoint3& surfaceTolight, - const SkPoint3& lightColor) const override { - SkPoint3 halfDir(surfaceTolight); - halfDir.fZ += SK_Scalar1; // eye position is always (0, 0, 1) - fast_normalize(&halfDir); - SkScalar colorScale = fKS * SkScalarPow(normal.dot(halfDir), fShininess); - SkPoint3 color = lightColor.makeScale(colorScale); - return SkPackARGB32(SkTPin(SkScalarRoundToInt(max_component(color)), 0, 255), - SkTPin(SkScalarRoundToInt(color.fX), 0, 255), - SkTPin(SkScalarRoundToInt(color.fY), 0, 255), - SkTPin(SkScalarRoundToInt(color.fZ), 0, 255)); - } private: - SkScalar fKS; - SkScalar fShininess; + ZValue fData; }; -} // anonymous namespace - -static inline SkScalar sobel(int a, int b, int c, int d, int e, int f, SkScalar scale) { - return (-a + b - 2 * c + 2 * d -e + f) * scale; -} - -static inline SkPoint3 pointToNormal(SkScalar x, SkScalar y, SkScalar surfaceScale) { - SkPoint3 vector = SkPoint3::Make(-x * surfaceScale, -y * surfaceScale, 1); - fast_normalize(&vector); - return vector; -} - -static inline SkPoint3 topLeftNormal(int m[9], SkScalar surfaceScale) { - return pointToNormal(sobel(0, 0, m[4], m[5], m[7], m[8], gTwoThirds), - sobel(0, 0, m[4], m[7], m[5], m[8], gTwoThirds), - surfaceScale); -} - -static inline SkPoint3 topNormal(int m[9], SkScalar surfaceScale) { - return pointToNormal(sobel( 0, 0, m[3], m[5], m[6], m[8], gOneThird), - sobel(m[3], m[6], m[4], m[7], m[5], m[8], gOneHalf), - surfaceScale); -} - -static inline SkPoint3 topRightNormal(int m[9], SkScalar surfaceScale) { - return pointToNormal(sobel( 0, 0, m[3], m[4], m[6], m[7], gTwoThirds), - sobel(m[3], m[6], m[4], m[7], 0, 0, gTwoThirds), - surfaceScale); -} - -static inline SkPoint3 leftNormal(int m[9], SkScalar surfaceScale) { - return pointToNormal(sobel(m[1], m[2], m[4], m[5], m[7], m[8], gOneHalf), - sobel( 0, 0, m[1], m[7], m[2], m[8], gOneThird), - surfaceScale); -} - - -static inline SkPoint3 interiorNormal(int m[9], SkScalar surfaceScale) { - return pointToNormal(sobel(m[0], m[2], m[3], m[5], m[6], m[8], gOneQuarter), - sobel(m[0], m[6], m[1], m[7], m[2], m[8], gOneQuarter), - surfaceScale); -} - -static inline SkPoint3 rightNormal(int m[9], SkScalar surfaceScale) { - return pointToNormal(sobel(m[0], m[1], m[3], m[4], m[6], m[7], gOneHalf), - sobel(m[0], m[6], m[1], m[7], 0, 0, gOneThird), - surfaceScale); -} - -static inline SkPoint3 bottomLeftNormal(int m[9], SkScalar surfaceScale) { - return pointToNormal(sobel(m[1], m[2], m[4], m[5], 0, 0, gTwoThirds), - sobel( 0, 0, m[1], m[4], m[2], m[5], gTwoThirds), - surfaceScale); -} - -static inline SkPoint3 bottomNormal(int m[9], SkScalar surfaceScale) { - return pointToNormal(sobel(m[0], m[2], m[3], m[5], 0, 0, gOneThird), - sobel(m[0], m[3], m[1], m[4], m[2], m[5], gOneHalf), - surfaceScale); -} - -static inline SkPoint3 bottomRightNormal(int m[9], SkScalar surfaceScale) { - return pointToNormal(sobel(m[0], m[1], m[3], m[4], 0, 0, gTwoThirds), - sobel(m[0], m[3], m[1], m[4], 0, 0, gTwoThirds), - surfaceScale); -} +} // namespace skif namespace { -class UncheckedPixelFetcher { -public: - static inline uint32_t Fetch(const SkBitmap& src, int x, int y, const SkIRect& bounds) { - return SkGetPackedA32(*src.getAddr32(x, y)); - } -}; - -// The DecalPixelFetcher is used when the destination crop rect exceeds the input bitmap bounds. -class DecalPixelFetcher { -public: - static inline uint32_t Fetch(const SkBitmap& src, int x, int y, const SkIRect& bounds) { - if (x < bounds.fLeft || x >= bounds.fRight || y < bounds.fTop || y >= bounds.fBottom) { - return 0; - } else { - return SkGetPackedA32(*src.getAddr32(x, y)); - } - } -}; -} // anonymous namespace - -template -static void lightBitmap(const BaseLightingType& lightingType, - const SkImageFilterLight* l, - const SkBitmap& src, - SkBitmap* dst, - SkScalar surfaceScale, - const SkIRect& bounds) { - SkASSERT(dst->width() == bounds.width() && dst->height() == bounds.height()); - int left = bounds.left(), right = bounds.right(); - int bottom = bounds.bottom(); - int y = bounds.top(); - SkIRect srcBounds = src.bounds(); - SkPMColor* dptr = dst->getAddr32(0, 0); - { - int x = left; - int m[9]; - m[4] = PixelFetcher::Fetch(src, x, y, srcBounds); - m[5] = PixelFetcher::Fetch(src, x + 1, y, srcBounds); - m[7] = PixelFetcher::Fetch(src, x, y + 1, srcBounds); - m[8] = PixelFetcher::Fetch(src, x + 1, y + 1, srcBounds); - SkPoint3 surfaceToLight = l->surfaceToLight(x, y, m[4], surfaceScale); - *dptr++ = lightingType.light(topLeftNormal(m, surfaceScale), surfaceToLight, - l->lightColor(surfaceToLight)); - for (++x; x < right - 1; ++x) - { - shiftMatrixLeft(m); - m[5] = PixelFetcher::Fetch(src, x + 1, y, srcBounds); - m[8] = PixelFetcher::Fetch(src, x + 1, y + 1, srcBounds); - surfaceToLight = l->surfaceToLight(x, y, m[4], surfaceScale); - *dptr++ = lightingType.light(topNormal(m, surfaceScale), surfaceToLight, - l->lightColor(surfaceToLight)); - } - shiftMatrixLeft(m); - surfaceToLight = l->surfaceToLight(x, y, m[4], surfaceScale); - *dptr++ = lightingType.light(topRightNormal(m, surfaceScale), surfaceToLight, - l->lightColor(surfaceToLight)); - } - for (++y; y < bottom - 1; ++y) { - int x = left; - int m[9]; - m[1] = PixelFetcher::Fetch(src, x, y - 1, srcBounds); - m[2] = PixelFetcher::Fetch(src, x + 1, y - 1, srcBounds); - m[4] = PixelFetcher::Fetch(src, x, y, srcBounds); - m[5] = PixelFetcher::Fetch(src, x + 1, y, srcBounds); - m[7] = PixelFetcher::Fetch(src, x, y + 1, srcBounds); - m[8] = PixelFetcher::Fetch(src, x + 1, y + 1, srcBounds); - SkPoint3 surfaceToLight = l->surfaceToLight(x, y, m[4], surfaceScale); - *dptr++ = lightingType.light(leftNormal(m, surfaceScale), surfaceToLight, - l->lightColor(surfaceToLight)); - for (++x; x < right - 1; ++x) { - shiftMatrixLeft(m); - m[2] = PixelFetcher::Fetch(src, x + 1, y - 1, srcBounds); - m[5] = PixelFetcher::Fetch(src, x + 1, y, srcBounds); - m[8] = PixelFetcher::Fetch(src, x + 1, y + 1, srcBounds); - surfaceToLight = l->surfaceToLight(x, y, m[4], surfaceScale); - *dptr++ = lightingType.light(interiorNormal(m, surfaceScale), surfaceToLight, - l->lightColor(surfaceToLight)); - } - shiftMatrixLeft(m); - surfaceToLight = l->surfaceToLight(x, y, m[4], surfaceScale); - *dptr++ = lightingType.light(rightNormal(m, surfaceScale), surfaceToLight, - l->lightColor(surfaceToLight)); - } - - { - int x = left; - int m[9]; - m[1] = PixelFetcher::Fetch(src, x, bottom - 2, srcBounds); - m[2] = PixelFetcher::Fetch(src, x + 1, bottom - 2, srcBounds); - m[4] = PixelFetcher::Fetch(src, x, bottom - 1, srcBounds); - m[5] = PixelFetcher::Fetch(src, x + 1, bottom - 1, srcBounds); - SkPoint3 surfaceToLight = l->surfaceToLight(x, y, m[4], surfaceScale); - *dptr++ = lightingType.light(bottomLeftNormal(m, surfaceScale), surfaceToLight, - l->lightColor(surfaceToLight)); - for (++x; x < right - 1; ++x) - { - shiftMatrixLeft(m); - m[2] = PixelFetcher::Fetch(src, x + 1, bottom - 2, srcBounds); - m[5] = PixelFetcher::Fetch(src, x + 1, bottom - 1, srcBounds); - surfaceToLight = l->surfaceToLight(x, y, m[4], surfaceScale); - *dptr++ = lightingType.light(bottomNormal(m, surfaceScale), surfaceToLight, - l->lightColor(surfaceToLight)); - } - shiftMatrixLeft(m); - surfaceToLight = l->surfaceToLight(x, y, m[4], surfaceScale); - *dptr++ = lightingType.light(bottomRightNormal(m, surfaceScale), surfaceToLight, - l->lightColor(surfaceToLight)); - } -} +struct Light { + enum class Type { + kDistant, + kPoint, + kSpot, + kLast = kSpot + }; -static void lightBitmap(const BaseLightingType& lightingType, - const SkImageFilterLight* light, - const SkBitmap& src, - SkBitmap* dst, - SkScalar surfaceScale, - const SkIRect& bounds) { - if (src.bounds().contains(bounds)) { - lightBitmap( - lightingType, light, src, dst, surfaceScale, bounds); - } else { - lightBitmap( - lightingType, light, src, dst, surfaceScale, bounds); + Type fType; + SkColor fLightColor; // All lights + + // Location and direction are decomposed into typed XY and Z for how they are transformed from + // parameter space to layer space. + skif::ParameterSpace fLocationXY; // Spotlight and point lights only + skif::ParameterSpace fLocationZ; // "" + + skif::ParameterSpace fDirectionXY; // Spotlight and distant lights only + skif::ParameterSpace fDirectionZ; // "" + + // Spotlight only (and unchanged by layer matrix) + float fFalloffExponent; + float fCosCutoffAngle; + + static Light Point(SkColor color, const SkPoint3& location) { + return {Type::kPoint, + color, + skif::ParameterSpace({location.fX, location.fY}), + skif::ParameterSpace(location.fZ), + /*directionXY=*/{}, + /*directionZ=*/{}, + /*falloffExponent=*/0.f, + /*cutoffAngle=*/0.f}; + } + + static Light Distant(SkColor color, const SkPoint3& direction) { + return {Type::kDistant, + color, + /*locationXY=*/{}, + /*locationZ=*/{}, + skif::ParameterSpace({direction.fX, direction.fY}), + skif::ParameterSpace(direction.fZ), + /*falloffExponent=*/0.f, + /*cutoffAngle=*/0.f}; + } + + static Light Spot(SkColor color, const SkPoint3& location, const SkPoint3& direction, + float falloffExponent, float cosCutoffAngle) { + return {Type::kSpot, + color, + skif::ParameterSpace({location.fX, location.fY}), + skif::ParameterSpace(location.fZ), + skif::ParameterSpace({direction.fX, direction.fY}), + skif::ParameterSpace(direction.fZ), + falloffExponent, + cosCutoffAngle}; } -} - -namespace { -enum BoundaryMode { - kTopLeft_BoundaryMode, - kTop_BoundaryMode, - kTopRight_BoundaryMode, - kLeft_BoundaryMode, - kInterior_BoundaryMode, - kRight_BoundaryMode, - kBottomLeft_BoundaryMode, - kBottom_BoundaryMode, - kBottomRight_BoundaryMode, - - kBoundaryModeCount, }; -class SkLightingImageFilterInternal : public SkImageFilter_Base { -protected: - SkLightingImageFilterInternal(sk_sp light, - SkScalar surfaceScale, - sk_sp input, - const SkRect* cropRect) - : INHERITED(&input, 1, cropRect) - , fLight(std::move(light)) - , fSurfaceScale(surfaceScale / 255) {} - - void flatten(SkWriteBuffer& buffer) const override { - this->INHERITED::flatten(buffer); - fLight->flattenLight(buffer); - buffer.writeScalar(fSurfaceScale * 255); - } - - bool onAffectsTransparentBlack() const override { return true; } +struct Material { + enum class Type { + kDiffuse, + kSpecular, + kLast = kSpecular + }; - const SkImageFilterLight* light() const { return fLight.get(); } - inline sk_sp refLight() const { return fLight; } - SkScalar surfaceScale() const { return fSurfaceScale; } - -#if defined(SK_GANESH) - sk_sp filterImageGPU(const Context& ctx, - SkSpecialImage* input, - const SkIRect& bounds, - const SkMatrix& matrix) const; - virtual std::unique_ptr makeFragmentProcessor(GrSurfaceProxyView, - const SkIPoint& viewOffset, - const SkMatrix&, - const SkIRect* srcBounds, - BoundaryMode boundaryMode, - const GrCaps&) const = 0; -#endif + Type fType; + // The base scale factor applied to alpha image to go from [0-1] to [0-depth] before computing + // surface normals. + skif::ParameterSpace fSurfaceDepth; -private: -#if defined(SK_GANESH) - void drawRect(skgpu::ganesh::SurfaceFillContext*, - GrSurfaceProxyView srcView, - const SkIPoint& viewOffset, - const SkMatrix& matrix, - const SkIRect& dstRect, - BoundaryMode boundaryMode, - const SkIRect* srcBounds, - const SkIRect& bounds) const; -#endif - - sk_sp fLight; - SkScalar fSurfaceScale; - - using INHERITED = SkImageFilter_Base; -}; -} // anonymous namespace - -#if defined(SK_GANESH) -void SkLightingImageFilterInternal::drawRect(skgpu::ganesh::SurfaceFillContext* sfc, - GrSurfaceProxyView srcView, - const SkIPoint& viewOffset, - const SkMatrix& matrix, - const SkIRect& dstRect, - BoundaryMode boundaryMode, - const SkIRect* srcBounds, - const SkIRect& bounds) const { - SkIRect srcRect = dstRect.makeOffset(bounds.topLeft()); - auto fp = this->makeFragmentProcessor(std::move(srcView), viewOffset, matrix, srcBounds, - boundaryMode, *sfc->caps()); - sfc->fillRectToRectWithFP(srcRect, dstRect, std::move(fp)); -} + // Non-geometric + float fK; // Reflectance coefficient + float fShininess; // Specular only -sk_sp SkLightingImageFilterInternal::filterImageGPU( - const Context& ctx, - SkSpecialImage* input, - const SkIRect& offsetBounds, - const SkMatrix& matrix) const { - SkASSERT(ctx.gpuBacked()); - - auto rContext = ctx.getContext(); - - GrSurfaceProxyView inputView = input->view(rContext); - SkASSERT(inputView.asTextureProxy()); - - GrImageInfo info(ctx.grColorType(), - kPremul_SkAlphaType, - ctx.refColorSpace(), - offsetBounds.size()); - auto sfc = rContext->priv().makeSFC(info, - "LightingImageFilterInternal_FilterImageGPU", - SkBackingFit::kApprox, - 1, - skgpu::Mipmapped::kNo, - inputView.proxy()->isProtected(), - kBottomLeft_GrSurfaceOrigin); - if (!sfc) { - return nullptr; + static Material Diffuse(float k, float surfaceDepth) { + return {Type::kDiffuse, skif::ParameterSpace(surfaceDepth), k, 0.f}; } - SkIRect dstRect = SkIRect::MakeWH(offsetBounds.width(), offsetBounds.height()); - - const SkIRect inputBounds = SkIRect::MakeWH(input->width(), input->height()); - SkIRect topLeft = SkIRect::MakeXYWH(0, 0, 1, 1); - SkIRect top = SkIRect::MakeXYWH(1, 0, dstRect.width() - 2, 1); - SkIRect topRight = SkIRect::MakeXYWH(dstRect.width() - 1, 0, 1, 1); - SkIRect left = SkIRect::MakeXYWH(0, 1, 1, dstRect.height() - 2); - SkIRect interior = dstRect.makeInset(1, 1); - SkIRect right = SkIRect::MakeXYWH(dstRect.width() - 1, 1, 1, dstRect.height() - 2); - SkIRect bottomLeft = SkIRect::MakeXYWH(0, dstRect.height() - 1, 1, 1); - SkIRect bottom = SkIRect::MakeXYWH(1, dstRect.height() - 1, dstRect.width() - 2, 1); - SkIRect bottomRight = SkIRect::MakeXYWH(dstRect.width() - 1, dstRect.height() - 1, 1, 1); - - const SkIRect* pSrcBounds = inputBounds.contains(offsetBounds) ? nullptr : &inputBounds; - const SkIPoint inputViewOffset = input->subset().topLeft(); - - this->drawRect(sfc.get(), inputView, inputViewOffset, matrix, topLeft, - kTopLeft_BoundaryMode, pSrcBounds, offsetBounds); - this->drawRect(sfc.get(), inputView, inputViewOffset, matrix, top, - kTop_BoundaryMode, pSrcBounds, offsetBounds); - this->drawRect(sfc.get(), inputView, inputViewOffset, matrix, topRight, - kTopRight_BoundaryMode, pSrcBounds, offsetBounds); - this->drawRect(sfc.get(), inputView, inputViewOffset, matrix, left, - kLeft_BoundaryMode, pSrcBounds, offsetBounds); - this->drawRect(sfc.get(), inputView, inputViewOffset, matrix, interior, - kInterior_BoundaryMode, pSrcBounds, offsetBounds); - this->drawRect(sfc.get(), inputView, inputViewOffset, matrix, right, - kRight_BoundaryMode, pSrcBounds, offsetBounds); - this->drawRect(sfc.get(), inputView, inputViewOffset, matrix, bottomLeft, - kBottomLeft_BoundaryMode, pSrcBounds, offsetBounds); - this->drawRect(sfc.get(), inputView, inputViewOffset, matrix, bottom, - kBottom_BoundaryMode, pSrcBounds, offsetBounds); - this->drawRect(sfc.get(), std::move(inputView), inputViewOffset, matrix, bottomRight, - kBottomRight_BoundaryMode, pSrcBounds, offsetBounds); - - return SkSpecialImage::MakeDeferredFromGpu( - rContext, - SkIRect::MakeWH(offsetBounds.width(), offsetBounds.height()), - kNeedNewImageUniqueID_SpecialImage, - sfc->readSurfaceView(), - sfc->colorInfo(), - ctx.surfaceProps()); -} -#endif - -namespace { -class SkDiffuseLightingImageFilter : public SkLightingImageFilterInternal { -public: - static sk_sp Make(sk_sp light, - SkScalar surfaceScale, - SkScalar kd, - sk_sp, - const SkRect*); - - SkScalar kd() const { return fKD; } - -protected: - SkDiffuseLightingImageFilter(sk_sp light, SkScalar surfaceScale, - SkScalar kd, - sk_sp input, const SkRect* cropRect); - void flatten(SkWriteBuffer& buffer) const override; - - sk_sp onFilterImage(const Context&, SkIPoint* offset) const override; - -#if defined(SK_GANESH) - std::unique_ptr makeFragmentProcessor(GrSurfaceProxyView, - const SkIPoint& viewOffset, - const SkMatrix&, - const SkIRect* bounds, - BoundaryMode, - const GrCaps&) const override; -#endif - -private: - SK_FLATTENABLE_HOOKS(SkDiffuseLightingImageFilter) - friend void ::SkRegisterLightingImageFilterFlattenables(); - SkScalar fKD; - - using INHERITED = SkLightingImageFilterInternal; + static Material Specular(float k, float shininess, float surfaceDepth) { + return {Type::kSpecular, skif::ParameterSpace(surfaceDepth), k, shininess}; + } }; -class SkSpecularLightingImageFilter : public SkLightingImageFilterInternal { +class SkLightingImageFilter final : public SkImageFilter_Base { public: - static sk_sp Make(sk_sp light, - SkScalar surfaceScale, - SkScalar ks, SkScalar shininess, - sk_sp, const SkRect*); + SkLightingImageFilter(const Light& light, const Material& material, sk_sp input) + : SkImageFilter_Base(&input, 1, nullptr) + , fLight(light) + , fMaterial(material) {} - SkScalar ks() const { return fKS; } - SkScalar shininess() const { return fShininess; } + SkRect computeFastBounds(const SkRect& src) const override; protected: - SkSpecularLightingImageFilter(sk_sp light, - SkScalar surfaceScale, SkScalar ks, - SkScalar shininess, - sk_sp input, const SkRect*); - void flatten(SkWriteBuffer& buffer) const override; - - sk_sp onFilterImage(const Context&, SkIPoint* offset) const override; - -#if defined(SK_GANESH) - std::unique_ptr makeFragmentProcessor(GrSurfaceProxyView, - const SkIPoint& viewOffset, - const SkMatrix&, - const SkIRect* bounds, - BoundaryMode, - const GrCaps&) const override; -#endif + void flatten(SkWriteBuffer&) const override; private: - SK_FLATTENABLE_HOOKS(SkSpecularLightingImageFilter) friend void ::SkRegisterLightingImageFilterFlattenables(); + SK_FLATTENABLE_HOOKS(SkLightingImageFilter) + static Light LegacyDeserializeLight(SkReadBuffer& buffer); + static sk_sp LegacyDiffuseCreateProc(SkReadBuffer& buffer); + static sk_sp LegacySpecularCreateProc(SkReadBuffer& buffer); - SkScalar fKS; - SkScalar fShininess; - - using INHERITED = SkLightingImageFilterInternal; -}; - -#if defined(SK_GANESH) - -class LightingEffect : public GrFragmentProcessor { -public: - const SkImageFilterLight* light() const { return fLight.get(); } - SkScalar surfaceScale() const { return fSurfaceScale; } - const SkMatrix& filterMatrix() const { return fFilterMatrix; } - BoundaryMode boundaryMode() const { return fBoundaryMode; } - -protected: - class ImplBase; - - LightingEffect(ClassID classID, - GrSurfaceProxyView, - const SkIPoint& viewOffset, - sk_sp light, - SkScalar surfaceScale, - const SkMatrix& matrix, - BoundaryMode boundaryMode, - const SkIRect* srcBounds, - const GrCaps& caps); - - explicit LightingEffect(const LightingEffect& that); - - bool onIsEqual(const GrFragmentProcessor&) const override; - -private: - void onAddToKey(const GrShaderCaps& caps, skgpu::KeyBuilder* b) const override { - b->add32(fBoundaryMode << 2 | fLight->type()); - } - - sk_sp fLight; - SkScalar fSurfaceScale; - SkMatrix fFilterMatrix; - BoundaryMode fBoundaryMode; - - using INHERITED = GrFragmentProcessor; -}; - -class DiffuseLightingEffect : public LightingEffect { -public: - static std::unique_ptr Make(GrSurfaceProxyView view, - const SkIPoint& viewOffset, - sk_sp light, - SkScalar surfaceScale, - const SkMatrix& matrix, - SkScalar kd, - BoundaryMode boundaryMode, - const SkIRect* srcBounds, - const GrCaps& caps) { - return std::unique_ptr(new DiffuseLightingEffect(std::move(view), - viewOffset, - std::move(light), - surfaceScale, - matrix, - kd, - boundaryMode, - srcBounds, - caps)); - } - - const char* name() const override { return "DiffuseLighting"; } - - std::unique_ptr clone() const override { - return std::unique_ptr(new DiffuseLightingEffect(*this)); - } - -private: - class Impl; - - std::unique_ptr onMakeProgramImpl() const override; - - bool onIsEqual(const GrFragmentProcessor&) const override; - - DiffuseLightingEffect(GrSurfaceProxyView view, - const SkIPoint& viewOffset, - sk_sp light, - SkScalar surfaceScale, - const SkMatrix& matrix, - SkScalar kd, - BoundaryMode boundaryMode, - const SkIRect* srcBounds, - const GrCaps& caps); - - explicit DiffuseLightingEffect(const DiffuseLightingEffect& that); - - GR_DECLARE_FRAGMENT_PROCESSOR_TEST - SkScalar fKD; + bool onAffectsTransparentBlack() const override { return true; } - using INHERITED = LightingEffect; -}; + skif::FilterResult onFilterImage(const skif::Context&) const override; -class SpecularLightingEffect : public LightingEffect { -public: - static std::unique_ptr Make(GrSurfaceProxyView view, - const SkIPoint& viewOffset, - sk_sp light, - SkScalar surfaceScale, - const SkMatrix& matrix, - SkScalar ks, - SkScalar shininess, - BoundaryMode boundaryMode, - const SkIRect* srcBounds, - const GrCaps& caps) { - return std::unique_ptr(new SpecularLightingEffect(std::move(view), - viewOffset, - std::move(light), - surfaceScale, - matrix, - ks, - shininess, - boundaryMode, - srcBounds, - caps)); - } + skif::LayerSpace onGetInputLayerBounds( + const skif::Mapping& mapping, + const skif::LayerSpace& desiredOutput, + const skif::LayerSpace& contentBounds) const override; - const char* name() const override { return "SpecularLighting"; } + skif::LayerSpace onGetOutputLayerBounds( + const skif::Mapping& mapping, + const skif::LayerSpace& contentBounds) const override; - std::unique_ptr clone() const override { - return std::unique_ptr(new SpecularLightingEffect(*this)); + skif::LayerSpace requiredInput(const skif::LayerSpace& desiredOutput) const { + // We request 1px of padding so that the visible normal map can do a regular Sobel kernel + // eval. The Sobel kernel is always applied in layer pixels + skif::LayerSpace requiredInput = desiredOutput; + requiredInput.outset(skif::LayerSpace({1, 1})); + return requiredInput; } - std::unique_ptr onMakeProgramImpl() const override; - -private: - class Impl; - - bool onIsEqual(const GrFragmentProcessor&) const override; - - SpecularLightingEffect(GrSurfaceProxyView, - const SkIPoint& viewOffset, - sk_sp light, - SkScalar surfaceScale, - const SkMatrix& matrix, - SkScalar ks, - SkScalar shininess, - BoundaryMode boundaryMode, - const SkIRect* srcBounds, - const GrCaps&); - - explicit SpecularLightingEffect(const SpecularLightingEffect&); - - GR_DECLARE_FRAGMENT_PROCESSOR_TEST - SkScalar fKS; - SkScalar fShininess; - - using INHERITED = LightingEffect; -}; - -/////////////////////////////////////////////////////////////////////////////// - -class GpuLight { -public: - virtual ~GpuLight() = default; - - /** - * This is called by GrGLLightingEffect::emitCode() before either of the two virtual functions - * below. It adds a half3 uniform visible in the FS that represents the constant light color. - */ - void emitLightColorUniform(const GrFragmentProcessor*, GrGLSLUniformHandler*); - - /** - * These two functions are called from GrGLLightingEffect's emitCode() function. - * emitSurfaceToLight places an expression in param out that is the vector from the surface to - * the light. The expression will be used in the FS. emitLightColor writes an expression into - * the FS that is the color of the light. Either function may add functions and/or uniforms to - * the FS. The default of emitLightColor appends the name of the constant light color uniform - * and so this function only needs to be overridden if the light color varies spatially. - */ - virtual void emitSurfaceToLight(const GrFragmentProcessor*, - GrGLSLUniformHandler*, - GrGLSLFPFragmentBuilder*, - const char* z) = 0; - virtual void emitLightColor(const GrFragmentProcessor*, - GrGLSLUniformHandler*, - GrGLSLFPFragmentBuilder*, - const char *surfaceToLight); - - // This is called from GrGLLightingEffect's setData(). Subclasses of GrGLLight must call - // INHERITED::setData(). - virtual void setData(const GrGLSLProgramDataManager&, const SkImageFilterLight* light) const; - -protected: - /** - * Gets the constant light color uniform. Subclasses can use this in their emitLightColor - * function. - */ - UniformHandle lightColorUni() const { return fColorUni; } - -private: - UniformHandle fColorUni; - - using INHERITED = SkRefCnt; -}; - -/////////////////////////////////////////////////////////////////////////////// - -class GpuDistantLight : public GpuLight { -public: - void setData(const GrGLSLProgramDataManager&, const SkImageFilterLight* light) const override; - void emitSurfaceToLight(const GrFragmentProcessor*, GrGLSLUniformHandler*, - GrGLSLFPFragmentBuilder*, const char* z) override; - -private: - using INHERITED = GpuLight; - UniformHandle fDirectionUni; -}; - -/////////////////////////////////////////////////////////////////////////////// - -class GpuPointLight : public GpuLight { -public: - void setData(const GrGLSLProgramDataManager&, const SkImageFilterLight* light) const override; - void emitSurfaceToLight(const GrFragmentProcessor*, GrGLSLUniformHandler*, - GrGLSLFPFragmentBuilder*, const char* z) override; - -private: - using INHERITED = GpuLight; - UniformHandle fLocationUni; -}; - -/////////////////////////////////////////////////////////////////////////////// - -class GpuSpotLight : public GpuLight { -public: - void setData(const GrGLSLProgramDataManager&, const SkImageFilterLight* light) const override; - void emitSurfaceToLight(const GrFragmentProcessor*, GrGLSLUniformHandler*, - GrGLSLFPFragmentBuilder*, const char* z) override; - void emitLightColor(const GrFragmentProcessor*, - GrGLSLUniformHandler*, - GrGLSLFPFragmentBuilder*, - const char *surfaceToLight) override; - -private: - using INHERITED = GpuLight; - - SkString fLightColorFunc; - UniformHandle fLocationUni; - UniformHandle fExponentUni; - UniformHandle fCosOuterConeAngleUni; - UniformHandle fCosInnerConeAngleUni; - UniformHandle fConeScaleUni; - UniformHandle fSUni; + Light fLight; + Material fMaterial; }; -#else - -class GpuLight {}; - -#endif - -/////////////////////////////////////////////////////////////////////////////// - -class SkDistantLight : public SkImageFilterLight { -public: - SkDistantLight(const SkPoint3& direction, SkColor color) - : INHERITED(color), fDirection(direction) { - } - - SkPoint3 surfaceToLight(int x, int y, int z, SkScalar surfaceScale) const override { - return fDirection; - } - SkPoint3 lightColor(const SkPoint3&) const override { return this->color(); } - LightType type() const override { return kDistant_LightType; } - const SkPoint3& direction() const { return fDirection; } - std::unique_ptr createGpuLight() const override { -#if defined(SK_GANESH) - return std::make_unique(); -#else - SkDEBUGFAIL("Should not call in GPU-less build"); +// Creates a shader that performs a Sobel filter on the alpha channel of the input image, using +// 'edgeBounds' to decide how to modify the kernel weights. +sk_sp make_normal_shader(sk_sp alphaMap, + const skif::LayerSpace& edgeBounds, + skif::LayerSpace surfaceDepth) { + static const SkRuntimeEffect* effect = SkMakeRuntimeEffect(SkRuntimeEffect::MakeForShader, + "uniform shader alphaMap;" + "uniform float4 edgeBounds;" + "uniform half surfaceDepth;" + + "half3 normal(half3 alphaC0, half3 alphaC1, half3 alphaC2) {" + // The right column (or bottom row) terms of the Sobel filter. The left/top is just + // the negative, and the middle row/column is all 0s so those instructions are skipped. + "const half3 kSobel = 0.25 * half3(1,2,1);" + "half3 alphaR0 = half3(alphaC0.x, alphaC1.x, alphaC2.x);" + "half3 alphaR2 = half3(alphaC0.z, alphaC1.z, alphaC2.z);" + "half nx = dot(kSobel, alphaC2) - dot(kSobel, alphaC0);" + "half ny = dot(kSobel, alphaR2) - dot(kSobel, alphaR0);" + "return normalize(half3(-surfaceDepth*half2(nx, ny), 1));" + "}" + + "half4 main(float2 coord) {" + "half3 alphaC0 = half3(" + "alphaMap.eval(clamp(coord + float2(-1,-1), edgeBounds.LT, edgeBounds.RB)).a," + "alphaMap.eval(clamp(coord + float2(-1, 0), edgeBounds.LT, edgeBounds.RB)).a," + "alphaMap.eval(clamp(coord + float2(-1, 1), edgeBounds.LT, edgeBounds.RB)).a);" + "half3 alphaC1 = half3(" + "alphaMap.eval(clamp(coord + float2( 0,-1), edgeBounds.LT, edgeBounds.RB)).a," + "alphaMap.eval(clamp(coord + float2( 0, 0), edgeBounds.LT, edgeBounds.RB)).a," + "alphaMap.eval(clamp(coord + float2( 0, 1), edgeBounds.LT, edgeBounds.RB)).a);" + "half3 alphaC2 = half3(" + "alphaMap.eval(clamp(coord + float2( 1,-1), edgeBounds.LT, edgeBounds.RB)).a," + "alphaMap.eval(clamp(coord + float2( 1, 0), edgeBounds.LT, edgeBounds.RB)).a," + "alphaMap.eval(clamp(coord + float2( 1, 1), edgeBounds.LT, edgeBounds.RB)).a);" + + "half mainAlpha = alphaC1.y;" // offset = (0,0) + "return half4(normal(alphaC0, alphaC1, alphaC2), mainAlpha);" + "}"); + + SkRuntimeShaderBuilder builder(sk_ref_sp(effect)); + builder.child("alphaMap") = std::move(alphaMap); + builder.uniform("edgeBounds") = SkRect::Make(SkIRect(edgeBounds)).makeInset(0.5f, 0.5f); + builder.uniform("surfaceDepth") = surfaceDepth.val(); + + return builder.makeShader(); +} + +sk_sp make_lighting_shader(sk_sp normalMap, + Light::Type lightType, + SkColor lightColor, + skif::LayerSpace locationXY, + skif::LayerSpace locationZ, + skif::LayerSpace directionXY, + skif::LayerSpace directionZ, + float falloffExponent, + float cosCutoffAngle, + Material::Type matType, + skif::LayerSpace surfaceDepth, + float k, + float shininess) { + static const SkRuntimeEffect* effect = SkMakeRuntimeEffect(SkRuntimeEffect::MakeForShader, + "const half kConeAAThreshold = 0.016;" + "const half kConeScale = 1.0 / kConeAAThreshold;" + + "uniform shader normalMap;" + + // Pack's surface depth, shininess, material type (0 == diffuse) and light type + // (< 0 = distant, 0 = point, > 0 = spot) + "uniform half4 materialAndLightType;" + + "uniform half4 lightPosAndSpotFalloff;" // (x,y,z) are lightPos, w is spot falloff exponent + "uniform half4 lightDirAndSpotCutoff;" // (x,y,z) are lightDir, w is spot cos(cutoffAngle) + "uniform half3 lightColor;" // Material's k has already been multipled in + + "half3 surface_to_light(half3 coord) {" + "if (materialAndLightType.w < 0) {" + "return lightDirAndSpotCutoff.xyz;" + "} else {" + // Spot and point have the same equation + "return normalize(lightPosAndSpotFalloff.xyz - coord);" + "}" + "}" + + "half spotlight_scale(half3 surfaceToLight) {" + "half cosCutoffAngle = lightDirAndSpotCutoff.w;" + "half cosAngle = -dot(surfaceToLight, lightDirAndSpotCutoff.xyz);" + "if (cosAngle < cosCutoffAngle) {" + "return 0.0;" + "}" + "half scale = pow(cosAngle, lightPosAndSpotFalloff.w);" + "if (cosAngle < cosCutoffAngle + kConeAAThreshold) {" + "return scale * (cosAngle - cosCutoffAngle) * kConeScale;" + "} else {" + "return scale;" + "}" + "}" + + "half4 compute_lighting(half3 normal, half3 surfaceToLight) {" + // Point and distant light color contributions are constant + "half3 color = lightColor;" + // Spot lights fade based on the angle away from its direction + "if (materialAndLightType.w > 0) {" + "color *= spotlight_scale(surfaceToLight);" + "}" + + // Diffuse and specular reflections scale the light's "color" differently + "if (materialAndLightType.z == 0) {" + "half coeff = dot(normal, surfaceToLight);" + "color = saturate(coeff * color);" + "return half4(color, 1.0);" + "} else {" + "half3 halfDir = normalize(surfaceToLight + half3(0, 0, 1));" + "half shininess = materialAndLightType.y;" + "half coeff = pow(dot(normal, halfDir), shininess);" + "color = saturate(coeff * color);" + "return half4(color, max(max(color.r, color.g), color.b));" + "}" + "}" + + "half4 main(float2 coord) {" + "half4 normalAndA = normalMap.eval(coord);" + "half depth = materialAndLightType.x;" + "half3 surfaceToLight = surface_to_light(half3(half2(coord), depth*normalAndA.a));" + "return compute_lighting(normalAndA.xyz, surfaceToLight);" + "}"); + + SkRuntimeShaderBuilder builder(sk_ref_sp(effect)); + builder.child("normalMap") = std::move(normalMap); + + builder.uniform("materialAndLightType") = + SkV4{surfaceDepth.val(), + shininess, + matType == Material::Type::kDiffuse ? 0.f : 1.f, + lightType == Light::Type::kPoint ? + 0.f : (lightType == Light::Type::kDistant ? -1.f : 1.f)}; + builder.uniform("lightPosAndSpotFalloff") = + SkV4{locationXY.x(), locationXY.y(), locationZ.val(), falloffExponent}; + + // Pre-normalize the light direction, but this can be (0,0,0) for point lights, which won't use + // the uniform anyways. Avoid a division by 0 to keep ASAN happy or in the event that a spot/dir + // light have bad user input. + SkV3 dir{directionXY.x(), directionXY.y(), directionZ.val()}; + float invDirLen = dir.length(); + invDirLen = invDirLen ? 1.0f / invDirLen : 0.f; + builder.uniform("lightDirAndSpotCutoff") = + SkV4{invDirLen*dir.x, invDirLen*dir.y, invDirLen*dir.z, cosCutoffAngle}; + + // Historically, the Skia lighting image filter did not apply any color space transformation to + // the light's color. The SVG spec for the lighting effects does not stipulate how to interpret + // the color for a light. Overall, it does not have a principled physically based approach, but + // the closest way to interpret it, is: + // - the material's K is a uniformly distributed reflectance coefficient + // - lighting *should* be calculated in a linear color space, which is the default for SVG + // filters. Chromium manages these color transformations using SkImageFilters::ColorFilter + // so it's not necessarily reflected in the Context's color space. + // - it's unspecified in the SVG spec if the light color should be transformed to linear or + // interpreted as linear already. Regardless, if there was any transformation that needed to + // occur, Blink took care of it in the past so adding color space management to the light + // color would be a breaking change. + // - so for now, leave the color un-modified and apply K up front since no color space + // transforms need to be performed on the original light color. + const float colorScale = k / 255.f; + builder.uniform("lightColor") = SkV3{SkColorGetR(lightColor) * colorScale, + SkColorGetG(lightColor) * colorScale, + SkColorGetB(lightColor) * colorScale}; + + return builder.makeShader(); +} + +sk_sp make_lighting(const Light& light, + const Material& material, + sk_sp input, + const SkImageFilters::CropRect& cropRect) { + // According to the spec, ks and kd can be any non-negative number: + // http://www.w3.org/TR/SVG/filters.html#feSpecularLightingElement + if (!SkScalarIsFinite(material.fK) || material.fK < 0.f || + !SkScalarIsFinite(material.fShininess) || + !SkScalarIsFinite(ZValue(material.fSurfaceDepth))) { return nullptr; -#endif - } - - bool isEqual(const SkImageFilterLight& other) const override { - if (other.type() != kDistant_LightType) { - return false; - } - - const SkDistantLight& o = static_cast(other); - return INHERITED::isEqual(other) && - fDirection == o.fDirection; - } - - SkDistantLight(SkReadBuffer& buffer) : INHERITED(buffer) { - fDirection = read_point3(buffer); } -protected: - SkDistantLight(const SkPoint3& direction, const SkPoint3& color) - : INHERITED(color), fDirection(direction) { - } - SkImageFilterLight* transform(const SkMatrix& matrix) const override { - return new SkDistantLight(direction(), color()); - } - void onFlattenLight(SkWriteBuffer& buffer) const override { - write_point3(fDirection, buffer); - } - -private: - SkPoint3 fDirection; - - using INHERITED = SkImageFilterLight; -}; - -/////////////////////////////////////////////////////////////////////////////// - -class SkPointLight : public SkImageFilterLight { -public: - SkPointLight(const SkPoint3& location, SkColor color) - : INHERITED(color), fLocation(location) {} - - SkPoint3 surfaceToLight(int x, int y, int z, SkScalar surfaceScale) const override { - SkPoint3 direction = SkPoint3::Make(fLocation.fX - SkIntToScalar(x), - fLocation.fY - SkIntToScalar(y), - fLocation.fZ - SkIntToScalar(z) * surfaceScale); - fast_normalize(&direction); - return direction; - } - SkPoint3 lightColor(const SkPoint3&) const override { return this->color(); } - LightType type() const override { return kPoint_LightType; } - const SkPoint3& location() const { return fLocation; } - std::unique_ptr createGpuLight() const override { -#if defined(SK_GANESH) - return std::make_unique(); -#else - SkDEBUGFAIL("Should not call in GPU-less build"); + // Ensure light values are finite, and the cosine should be between -1 and 1 + if (!SkPoint(light.fLocationXY).isFinite() || + !SkScalarIsFinite(ZValue(light.fLocationZ)) || + !skif::Vector(light.fDirectionXY).isFinite() || + !SkScalarIsFinite(ZValue(light.fDirectionZ)) || + !SkScalarIsFinite(light.fFalloffExponent) || + !SkScalarIsFinite(light.fCosCutoffAngle) || + light.fCosCutoffAngle < -1.f || light.fCosCutoffAngle > 1.f) { return nullptr; -#endif } - bool isEqual(const SkImageFilterLight& other) const override { - if (other.type() != kPoint_LightType) { - return false; - } - const SkPointLight& o = static_cast(other); - return INHERITED::isEqual(other) && - fLocation == o.fLocation; - } - SkImageFilterLight* transform(const SkMatrix& matrix) const override { - SkPoint location2 = SkPoint::Make(fLocation.fX, fLocation.fY); - matrix.mapPoints(&location2, 1); - // Use X scale and Y scale on Z and average the result - SkPoint locationZ = SkPoint::Make(fLocation.fZ, fLocation.fZ); - matrix.mapVectors(&locationZ, 1); - SkPoint3 location = SkPoint3::Make(location2.fX, - location2.fY, - SkScalarAve(locationZ.fX, locationZ.fY)); - return new SkPointLight(location, color()); + // If a crop rect is provided, it clamps both the input (to better match the SVG's normal + // boundary condition spec) and the output (because otherwise it has infinite bounds). + sk_sp filter = std::move(input); + if (cropRect) { + filter = SkMakeCropImageFilter(*cropRect, std::move(filter)); } - - SkPointLight(SkReadBuffer& buffer) : INHERITED(buffer) { - fLocation = read_point3(buffer); + filter = sk_sp( + new SkLightingImageFilter(light, material, std::move(filter))); + if (cropRect) { + filter = SkMakeCropImageFilter(*cropRect, std::move(filter)); } - -protected: - SkPointLight(const SkPoint3& location, const SkPoint3& color) - : INHERITED(color), fLocation(location) {} - void onFlattenLight(SkWriteBuffer& buffer) const override { - write_point3(fLocation, buffer); - } - -private: - SkPoint3 fLocation; - - using INHERITED = SkImageFilterLight; -}; - -/////////////////////////////////////////////////////////////////////////////// - -class SkSpotLight : public SkImageFilterLight { -public: - SkSpotLight(const SkPoint3& location, - const SkPoint3& target, - SkScalar specularExponent, - SkScalar cutoffAngle, - SkColor color) - : INHERITED(color), - fLocation(location), - fTarget(target), - fSpecularExponent(specularExponent) - { - fS = target - location; - fast_normalize(&fS); - fCosOuterConeAngle = SkScalarCos(SkDegreesToRadians(cutoffAngle)); - const SkScalar antiAliasThreshold = 0.016f; - fCosInnerConeAngle = fCosOuterConeAngle + antiAliasThreshold; - fConeScale = SkScalarInvert(antiAliasThreshold); - } - - SkImageFilterLight* transform(const SkMatrix& matrix) const override { - SkPoint location2 = SkPoint::Make(fLocation.fX, fLocation.fY); - matrix.mapPoints(&location2, 1); - // Use X scale and Y scale on Z and average the result - SkPoint locationZ = SkPoint::Make(fLocation.fZ, fLocation.fZ); - matrix.mapVectors(&locationZ, 1); - SkPoint3 location = SkPoint3::Make(location2.fX, location2.fY, - SkScalarAve(locationZ.fX, locationZ.fY)); - SkPoint target2 = SkPoint::Make(fTarget.fX, fTarget.fY); - matrix.mapPoints(&target2, 1); - SkPoint targetZ = SkPoint::Make(fTarget.fZ, fTarget.fZ); - matrix.mapVectors(&targetZ, 1); - SkPoint3 target = SkPoint3::Make(target2.fX, target2.fY, - SkScalarAve(targetZ.fX, targetZ.fY)); - SkPoint3 s = target - location; - fast_normalize(&s); - return new SkSpotLight(location, - target, - fSpecularExponent, - fCosOuterConeAngle, - fCosInnerConeAngle, - fConeScale, - s, - color()); - } - - SkPoint3 surfaceToLight(int x, int y, int z, SkScalar surfaceScale) const override { - SkPoint3 direction = SkPoint3::Make(fLocation.fX - SkIntToScalar(x), - fLocation.fY - SkIntToScalar(y), - fLocation.fZ - SkIntToScalar(z) * surfaceScale); - fast_normalize(&direction); - return direction; - } - SkPoint3 lightColor(const SkPoint3& surfaceToLight) const override { - SkScalar cosAngle = -surfaceToLight.dot(fS); - SkScalar scale = 0; - if (cosAngle >= fCosOuterConeAngle) { - scale = SkScalarPow(cosAngle, fSpecularExponent); - if (cosAngle < fCosInnerConeAngle) { - scale *= (cosAngle - fCosOuterConeAngle) * fConeScale; - } - } - return this->color().makeScale(scale); - } - std::unique_ptr createGpuLight() const override { -#if defined(SK_GANESH) - return std::make_unique(); -#else - SkDEBUGFAIL("Should not call in GPU-less build"); - return nullptr; -#endif - } - LightType type() const override { return kSpot_LightType; } - const SkPoint3& location() const { return fLocation; } - const SkPoint3& target() const { return fTarget; } - SkScalar specularExponent() const { return fSpecularExponent; } - SkScalar cosInnerConeAngle() const { return fCosInnerConeAngle; } - SkScalar cosOuterConeAngle() const { return fCosOuterConeAngle; } - SkScalar coneScale() const { return fConeScale; } - const SkPoint3& s() const { return fS; } - - SkSpotLight(SkReadBuffer& buffer) : INHERITED(buffer) { - fLocation = read_point3(buffer); - fTarget = read_point3(buffer); - fSpecularExponent = buffer.readScalar(); - fCosOuterConeAngle = buffer.readScalar(); - fCosInnerConeAngle = buffer.readScalar(); - fConeScale = buffer.readScalar(); - fS = read_point3(buffer); - buffer.validate(SkScalarIsFinite(fSpecularExponent) && - SkScalarIsFinite(fCosOuterConeAngle) && - SkScalarIsFinite(fCosInnerConeAngle) && - SkScalarIsFinite(fConeScale)); - } -protected: - SkSpotLight(const SkPoint3& location, - const SkPoint3& target, - SkScalar specularExponent, - SkScalar cosOuterConeAngle, - SkScalar cosInnerConeAngle, - SkScalar coneScale, - const SkPoint3& s, - const SkPoint3& color) - : INHERITED(color), - fLocation(location), - fTarget(target), - fSpecularExponent(specularExponent), - fCosOuterConeAngle(cosOuterConeAngle), - fCosInnerConeAngle(cosInnerConeAngle), - fConeScale(coneScale), - fS(s) - { - } - void onFlattenLight(SkWriteBuffer& buffer) const override { - write_point3(fLocation, buffer); - write_point3(fTarget, buffer); - buffer.writeScalar(fSpecularExponent); - buffer.writeScalar(fCosOuterConeAngle); - buffer.writeScalar(fCosInnerConeAngle); - buffer.writeScalar(fConeScale); - write_point3(fS, buffer); - } - - bool isEqual(const SkImageFilterLight& other) const override { - if (other.type() != kSpot_LightType) { - return false; - } - - const SkSpotLight& o = static_cast(other); - return INHERITED::isEqual(other) && - fLocation == o.fLocation && - fTarget == o.fTarget && - fSpecularExponent == o.fSpecularExponent && - fCosOuterConeAngle == o.fCosOuterConeAngle; - } - -private: - SkPoint3 fLocation; - SkPoint3 fTarget; - SkScalar fSpecularExponent; - SkScalar fCosOuterConeAngle; - SkScalar fCosInnerConeAngle; - SkScalar fConeScale; - SkPoint3 fS; - - using INHERITED = SkImageFilterLight; -}; -} // anonymous namespace - -/////////////////////////////////////////////////////////////////////////////// - -void SkImageFilterLight::flattenLight(SkWriteBuffer& buffer) const { - // Write type first, then baseclass, then subclass. - buffer.writeInt(this->type()); - write_point3(fColor, buffer); - this->onFlattenLight(buffer); + return filter; } -/*static*/ SkImageFilterLight* SkImageFilterLight::UnflattenLight(SkReadBuffer& buffer) { - SkImageFilterLight::LightType type = buffer.read32LE(SkImageFilterLight::kLast_LightType); - - switch (type) { - // Each of these constructors must first call SkLight's, so we'll read the baseclass - // then subclass, same order as flattenLight. - case SkImageFilterLight::kDistant_LightType: - return new SkDistantLight(buffer); - case SkImageFilterLight::kPoint_LightType: - return new SkPointLight(buffer); - case SkImageFilterLight::kSpot_LightType: - return new SkSpotLight(buffer); - default: - // Should never get here due to prior check of SkSafeRange - SkDEBUGFAIL("Unknown LightType."); - return nullptr; - } -} -/////////////////////////////////////////////////////////////////////////////// +} // anonymous namespace sk_sp SkImageFilters::DistantLitDiffuse( const SkPoint3& direction, SkColor lightColor, SkScalar surfaceScale, SkScalar kd, sk_sp input, const CropRect& cropRect) { - sk_sp light(new SkDistantLight(direction, lightColor)); - return SkDiffuseLightingImageFilter::Make(std::move(light), surfaceScale, kd, - std::move(input), cropRect); + return make_lighting(Light::Distant(lightColor, direction), + Material::Diffuse(kd, surfaceScale), + std::move(input), cropRect); } sk_sp SkImageFilters::PointLitDiffuse( const SkPoint3& location, SkColor lightColor, SkScalar surfaceScale, SkScalar kd, sk_sp input, const CropRect& cropRect) { - sk_sp light(new SkPointLight(location, lightColor)); - return SkDiffuseLightingImageFilter::Make(std::move(light), surfaceScale, kd, - std::move(input), cropRect); + return make_lighting(Light::Point(lightColor, location), + Material::Diffuse(kd, surfaceScale), + std::move(input), cropRect); } sk_sp SkImageFilters::SpotLitDiffuse( const SkPoint3& location, const SkPoint3& target, SkScalar falloffExponent, SkScalar cutoffAngle, SkColor lightColor, SkScalar surfaceScale, SkScalar kd, sk_sp input, const CropRect& cropRect) { - sk_sp light(new SkSpotLight(location, target, falloffExponent, - cutoffAngle, lightColor)); - return SkDiffuseLightingImageFilter::Make(std::move(light), surfaceScale, kd, - std::move(input), cropRect); + SkPoint3 dir = target - location; + float cosCutoffAngle = SkScalarCos(SkDegreesToRadians(cutoffAngle)); + return make_lighting(Light::Spot(lightColor, location, dir, falloffExponent, cosCutoffAngle), + Material::Diffuse(kd, surfaceScale), + std::move(input), cropRect); } sk_sp SkImageFilters::DistantLitSpecular( const SkPoint3& direction, SkColor lightColor, SkScalar surfaceScale, SkScalar ks, SkScalar shininess, sk_sp input, const CropRect& cropRect) { - sk_sp light(new SkDistantLight(direction, lightColor)); - return SkSpecularLightingImageFilter::Make(std::move(light), surfaceScale, ks, shininess, - std::move(input), cropRect); + return make_lighting(Light::Distant(lightColor, direction), + Material::Specular(ks, shininess, surfaceScale), + std::move(input), cropRect); } sk_sp SkImageFilters::PointLitSpecular( const SkPoint3& location, SkColor lightColor, SkScalar surfaceScale, SkScalar ks, SkScalar shininess, sk_sp input, const CropRect& cropRect) { - sk_sp light(new SkPointLight(location, lightColor)); - return SkSpecularLightingImageFilter::Make(std::move(light), surfaceScale, ks, shininess, - std::move(input), cropRect); + return make_lighting(Light::Point(lightColor, location), + Material::Specular(ks, shininess, surfaceScale), + std::move(input), cropRect); } sk_sp SkImageFilters::SpotLitSpecular( const SkPoint3& location, const SkPoint3& target, SkScalar falloffExponent, SkScalar cutoffAngle, SkColor lightColor, SkScalar surfaceScale, SkScalar ks, SkScalar shininess, sk_sp input, const CropRect& cropRect) { - sk_sp light(new SkSpotLight(location, target, falloffExponent, - cutoffAngle, lightColor)); - return SkSpecularLightingImageFilter::Make(std::move(light), surfaceScale, ks, shininess, - std::move(input), cropRect); + SkPoint3 dir = target - location; + float cosCutoffAngle = SkScalarCos(SkDegreesToRadians(cutoffAngle)); + return make_lighting(Light::Spot(lightColor, location, dir, falloffExponent, cosCutoffAngle), + Material::Specular(ks, shininess, surfaceScale), + std::move(input), cropRect); } void SkRegisterLightingImageFilterFlattenables() { - SK_REGISTER_FLATTENABLE(SkDiffuseLightingImageFilter); - SK_REGISTER_FLATTENABLE(SkSpecularLightingImageFilter); -} - -/////////////////////////////////////////////////////////////////////////////// - -sk_sp SkDiffuseLightingImageFilter::Make(sk_sp light, - SkScalar surfaceScale, - SkScalar kd, - sk_sp input, - const SkRect* cropRect) { - if (!light) { - return nullptr; - } - if (!SkScalarIsFinite(surfaceScale) || !SkScalarIsFinite(kd)) { - return nullptr; - } - // According to the spec, kd can be any non-negative number : - // http://www.w3.org/TR/SVG/filters.html#feDiffuseLightingElement - if (kd < 0) { - return nullptr; - } - return sk_sp(new SkDiffuseLightingImageFilter(std::move(light), surfaceScale, - kd, std::move(input), cropRect)); -} - -SkDiffuseLightingImageFilter::SkDiffuseLightingImageFilter(sk_sp light, - SkScalar surfaceScale, - SkScalar kd, - sk_sp input, - const SkRect* cropRect) - : INHERITED(std::move(light), surfaceScale, std::move(input), cropRect) - , fKD(kd) { -} - -sk_sp SkDiffuseLightingImageFilter::CreateProc(SkReadBuffer& buffer) { - SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1); - - sk_sp light(SkImageFilterLight::UnflattenLight(buffer)); - SkScalar surfaceScale = buffer.readScalar(); - SkScalar kd = buffer.readScalar(); - - return Make(std::move(light), surfaceScale, kd, common.getInput(0), common.cropRect()); -} - -void SkDiffuseLightingImageFilter::flatten(SkWriteBuffer& buffer) const { - this->INHERITED::flatten(buffer); - buffer.writeScalar(fKD); -} - -sk_sp SkDiffuseLightingImageFilter::onFilterImage(const Context& ctx, - SkIPoint* offset) const { - SkIPoint inputOffset = SkIPoint::Make(0, 0); - sk_sp input(this->filterInput(0, ctx, &inputOffset)); - if (!input) { - return nullptr; - } - - const SkIRect inputBounds = SkIRect::MakeXYWH(inputOffset.x(), inputOffset.y(), - input->width(), input->height()); - SkIRect bounds; - if (!this->applyCropRect(ctx, inputBounds, &bounds)) { - return nullptr; - } - - offset->fX = bounds.left(); - offset->fY = bounds.top(); - bounds.offset(-inputOffset); - -#if defined(SK_GANESH) - if (ctx.gpuBacked()) { - SkMatrix matrix(ctx.ctm()); - matrix.postTranslate(SkIntToScalar(-offset->fX), SkIntToScalar(-offset->fY)); - - return this->filterImageGPU(ctx, input.get(), bounds, matrix); - } -#endif - - if (bounds.width() < 2 || bounds.height() < 2) { - return nullptr; - } - - SkBitmap inputBM; - - if (!input->getROPixels(&inputBM)) { - return nullptr; - } - - if (inputBM.colorType() != kN32_SkColorType) { - return nullptr; - } - - if (!inputBM.getPixels()) { - return nullptr; - } - - const SkImageInfo info = SkImageInfo::MakeN32Premul(bounds.width(), bounds.height()); - - SkBitmap dst; - if (!dst.tryAllocPixels(info)) { - return nullptr; - } - - SkMatrix matrix(ctx.ctm()); - matrix.postTranslate(SkIntToScalar(-inputOffset.x()), SkIntToScalar(-inputOffset.y())); - - sk_sp transformedLight(light()->transform(matrix)); - - DiffuseLightingType lightingType(fKD); - lightBitmap(lightingType, - transformedLight.get(), - inputBM, - &dst, - surfaceScale(), - bounds); - - return SkSpecialImage::MakeFromRaster(SkIRect::MakeWH(bounds.width(), bounds.height()), - dst, ctx.surfaceProps()); -} - -#if defined(SK_GANESH) -std::unique_ptr SkDiffuseLightingImageFilter::makeFragmentProcessor( - GrSurfaceProxyView view, - const SkIPoint& viewOffset, - const SkMatrix& matrix, - const SkIRect* srcBounds, - BoundaryMode boundaryMode, - const GrCaps& caps) const { - SkScalar scale = this->surfaceScale() * 255; - return DiffuseLightingEffect::Make(std::move(view), - viewOffset, - this->refLight(), - scale, - matrix, - this->kd(), - boundaryMode, - srcBounds, - caps); + SK_REGISTER_FLATTENABLE(SkLightingImageFilter); + // TODO (michaelludwig): Remove after grace period for SKPs to stop using old name + SkFlattenable::Register("SkDiffuseLightingImageFilter", + SkLightingImageFilter::LegacyDiffuseCreateProc); + SkFlattenable::Register("SkSpecularLightingImageFilter", + SkLightingImageFilter::LegacySpecularCreateProc); } -#endif /////////////////////////////////////////////////////////////////////////////// -sk_sp SkSpecularLightingImageFilter::Make(sk_sp light, - SkScalar surfaceScale, - SkScalar ks, - SkScalar shininess, - sk_sp input, - const SkRect* cropRect) { - if (!light) { - return nullptr; - } - if (!SkScalarIsFinite(surfaceScale) || !SkScalarIsFinite(ks) || !SkScalarIsFinite(shininess)) { - return nullptr; - } - // According to the spec, ks can be any non-negative number : - // http://www.w3.org/TR/SVG/filters.html#feSpecularLightingElement - if (ks < 0) { - return nullptr; - } - return sk_sp(new SkSpecularLightingImageFilter(std::move(light), surfaceScale, - ks, shininess, - std::move(input), cropRect)); -} - -SkSpecularLightingImageFilter::SkSpecularLightingImageFilter(sk_sp light, - SkScalar surfaceScale, - SkScalar ks, - SkScalar shininess, - sk_sp input, - const SkRect* cropRect) - : INHERITED(std::move(light), surfaceScale, std::move(input), cropRect) - , fKS(ks) - , fShininess(shininess) { -} - -sk_sp SkSpecularLightingImageFilter::CreateProc(SkReadBuffer& buffer) { +sk_sp SkLightingImageFilter::CreateProc(SkReadBuffer& buffer) { SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1); - sk_sp light(SkImageFilterLight::UnflattenLight(buffer)); - SkScalar surfaceScale = buffer.readScalar(); - SkScalar ks = buffer.readScalar(); - SkScalar shine = buffer.readScalar(); - - return Make(std::move(light), surfaceScale, ks, shine, common.getInput(0), - common.cropRect()); -} - -void SkSpecularLightingImageFilter::flatten(SkWriteBuffer& buffer) const { - this->INHERITED::flatten(buffer); - buffer.writeScalar(fKS); - buffer.writeScalar(fShininess); -} - -sk_sp SkSpecularLightingImageFilter::onFilterImage(const Context& ctx, - SkIPoint* offset) const { - SkIPoint inputOffset = SkIPoint::Make(0, 0); - sk_sp input(this->filterInput(0, ctx, &inputOffset)); - if (!input) { - return nullptr; - } - const SkIRect inputBounds = SkIRect::MakeXYWH(inputOffset.x(), inputOffset.y(), - input->width(), input->height()); - SkIRect bounds; - if (!this->applyCropRect(ctx, inputBounds, &bounds)) { - return nullptr; - } + Light light; + light.fType = buffer.read32LE(Light::Type::kLast); + light.fLightColor = buffer.readColor(); - offset->fX = bounds.left(); - offset->fY = bounds.top(); - bounds.offset(-inputOffset); + SkPoint3 lightPos, lightDir; + buffer.readPoint3(&lightPos); + light.fLocationXY = skif::ParameterSpace({lightPos.fX, lightPos.fY}); + light.fLocationZ = skif::ParameterSpace(lightPos.fZ); -#if defined(SK_GANESH) - if (ctx.gpuBacked()) { - SkMatrix matrix(ctx.ctm()); - matrix.postTranslate(SkIntToScalar(-offset->fX), SkIntToScalar(-offset->fY)); + buffer.readPoint3(&lightDir); + light.fDirectionXY = skif::ParameterSpace({lightDir.fX, lightDir.fY}); + light.fDirectionZ = skif::ParameterSpace(lightDir.fZ); - return this->filterImageGPU(ctx, input.get(), bounds, matrix); - } -#endif - - if (bounds.width() < 2 || bounds.height() < 2) { - return nullptr; - } + light.fFalloffExponent = buffer.readScalar(); + light.fCosCutoffAngle = buffer.readScalar(); - SkBitmap inputBM; + Material material; + material.fType = buffer.read32LE(Material::Type::kLast); + material.fSurfaceDepth = skif::ParameterSpace(buffer.readScalar()); + material.fK = buffer.readScalar(); + material.fShininess = buffer.readScalar(); - if (!input->getROPixels(&inputBM)) { + if (!buffer.isValid()) { return nullptr; } - if (inputBM.colorType() != kN32_SkColorType) { - return nullptr; - } - - if (!inputBM.getPixels()) { - return nullptr; - } - - const SkImageInfo info = SkImageInfo::MakeN32Premul(bounds.width(), bounds.height()); - - SkBitmap dst; - if (!dst.tryAllocPixels(info)) { - return nullptr; - } - - SpecularLightingType lightingType(fKS, fShininess); - - SkMatrix matrix(ctx.ctm()); - matrix.postTranslate(SkIntToScalar(-inputOffset.x()), SkIntToScalar(-inputOffset.y())); - - sk_sp transformedLight(light()->transform(matrix)); - - lightBitmap(lightingType, - transformedLight.get(), - inputBM, - &dst, - surfaceScale(), - bounds); - - return SkSpecialImage::MakeFromRaster(SkIRect::MakeWH(bounds.width(), bounds.height()), dst, - ctx.surfaceProps()); -} - -#if defined(SK_GANESH) -std::unique_ptr SkSpecularLightingImageFilter::makeFragmentProcessor( - GrSurfaceProxyView view, - const SkIPoint& viewOffset, - const SkMatrix& matrix, - const SkIRect* srcBounds, - BoundaryMode boundaryMode, - const GrCaps& caps) const { - SkScalar scale = this->surfaceScale() * 255; - return SpecularLightingEffect::Make(std::move(view), - viewOffset, - this->refLight(), - scale, - matrix, - this->ks(), - this->shininess(), - boundaryMode, - srcBounds, - caps); + return make_lighting(light, material, common.getInput(0), common.cropRect()); } -#endif -/////////////////////////////////////////////////////////////////////////////// - -#if defined(SK_GANESH) - -static SkString emitNormalFunc(BoundaryMode mode, - const char* pointToNormalName, - const char* sobelFuncName) { - SkString result; - switch (mode) { - case kTopLeft_BoundaryMode: - result.printf("return %s(%s(0.0, 0.0, m[4], m[5], m[7], m[8], %g)," - " %s(0.0, 0.0, m[4], m[7], m[5], m[8], %g)," - " surfaceScale);", - pointToNormalName, sobelFuncName, gTwoThirds, - sobelFuncName, gTwoThirds); - break; - case kTop_BoundaryMode: - result.printf("return %s(%s(0.0, 0.0, m[3], m[5], m[6], m[8], %g)," - " %s(0.0, 0.0, m[4], m[7], m[5], m[8], %g)," - " surfaceScale);", - pointToNormalName, sobelFuncName, gOneThird, - sobelFuncName, gOneHalf); - break; - case kTopRight_BoundaryMode: - result.printf("return %s(%s( 0.0, 0.0, m[3], m[4], m[6], m[7], %g)," - " %s(m[3], m[6], m[4], m[7], 0.0, 0.0, %g)," - " surfaceScale);", - pointToNormalName, sobelFuncName, gTwoThirds, - sobelFuncName, gTwoThirds); - break; - case kLeft_BoundaryMode: - result.printf("return %s(%s(m[1], m[2], m[4], m[5], m[7], m[8], %g)," - " %s( 0.0, 0.0, m[1], m[7], m[2], m[8], %g)," - " surfaceScale);", - pointToNormalName, sobelFuncName, gOneHalf, - sobelFuncName, gOneThird); - break; - case kInterior_BoundaryMode: - result.printf("return %s(%s(m[0], m[2], m[3], m[5], m[6], m[8], %g)," - " %s(m[0], m[6], m[1], m[7], m[2], m[8], %g)," - " surfaceScale);", - pointToNormalName, sobelFuncName, gOneQuarter, - sobelFuncName, gOneQuarter); - break; - case kRight_BoundaryMode: - result.printf("return %s(%s(m[0], m[1], m[3], m[4], m[6], m[7], %g)," - " %s(m[0], m[6], m[1], m[7], 0.0, 0.0, %g)," - " surfaceScale);", - pointToNormalName, sobelFuncName, gOneHalf, - sobelFuncName, gOneThird); - break; - case kBottomLeft_BoundaryMode: - result.printf("return %s(%s(m[1], m[2], m[4], m[5], 0.0, 0.0, %g)," - " %s( 0.0, 0.0, m[1], m[4], m[2], m[5], %g)," - " surfaceScale);", - pointToNormalName, sobelFuncName, gTwoThirds, - sobelFuncName, gTwoThirds); - break; - case kBottom_BoundaryMode: - result.printf("return %s(%s(m[0], m[2], m[3], m[5], 0.0, 0.0, %g)," - " %s(m[0], m[3], m[1], m[4], m[2], m[5], %g)," - " surfaceScale);", - pointToNormalName, sobelFuncName, gOneThird, - sobelFuncName, gOneHalf); - break; - case kBottomRight_BoundaryMode: - result.printf("return %s(%s(m[0], m[1], m[3], m[4], 0.0, 0.0, %g)," - " %s(m[0], m[3], m[1], m[4], 0.0, 0.0, %g)," - " surfaceScale);", - pointToNormalName, sobelFuncName, gTwoThirds, - sobelFuncName, gTwoThirds); - break; - default: - SkASSERT(false); - break; +Light SkLightingImageFilter::LegacyDeserializeLight(SkReadBuffer& buffer) { + // Light::Type has the same order as the legacy SkImageFilterLight::LightType enum + Light::Type lightType = buffer.read32LE(Light::Type::kLast); + if (!buffer.isValid()) { + return {}; } - return result; -} - -namespace { -class LightingEffect::ImplBase : public ProgramImpl { -public: - void emitCode(EmitArgs&) override; - -protected: - /** - * Subclasses of LightingImpl must call INHERITED::onSetData(); - */ - void onSetData(const GrGLSLProgramDataManager&, const GrFragmentProcessor&) override; - - virtual void emitLightFunc(const GrFragmentProcessor*, - GrGLSLUniformHandler*, - GrGLSLFPFragmentBuilder*, - SkString* funcName) = 0; - -private: - UniformHandle fSurfaceScaleUni; - std::unique_ptr fLight; -}; - -/////////////////////////////////////////////////////////////////////////////// - -class DiffuseLightingEffect::Impl : public ImplBase { -public: - void emitLightFunc(const GrFragmentProcessor*, - GrGLSLUniformHandler*, - GrGLSLFPFragmentBuilder*, - SkString* funcName) override; - -private: - void onSetData(const GrGLSLProgramDataManager&, const GrFragmentProcessor&) override; - - using INHERITED = ImplBase; - - UniformHandle fKDUni; -}; - -/////////////////////////////////////////////////////////////////////////////// - -class SpecularLightingEffect::Impl : public ImplBase { -public: - void emitLightFunc(const GrFragmentProcessor*, - GrGLSLUniformHandler*, - GrGLSLFPFragmentBuilder*, - SkString* funcName) override; -private: - void onSetData(const GrGLSLProgramDataManager&, const GrFragmentProcessor&) override; - - using INHERITED = ImplBase; - - UniformHandle fKSUni; - UniformHandle fShininessUni; -}; -} // anonymous namespace - -/////////////////////////////////////////////////////////////////////////////// - -LightingEffect::LightingEffect(ClassID classID, - GrSurfaceProxyView view, - const SkIPoint& viewOffset, - sk_sp light, - SkScalar surfaceScale, - const SkMatrix& matrix, - BoundaryMode boundaryMode, - const SkIRect* srcBounds, - const GrCaps& caps) - // Perhaps this could advertise the opaque or coverage-as-alpha optimizations? - : INHERITED(classID, kNone_OptimizationFlags) - , fLight(std::move(light)) - , fSurfaceScale(surfaceScale) - , fFilterMatrix(matrix) - , fBoundaryMode(boundaryMode) { - static constexpr GrSamplerState kSampler(GrSamplerState::WrapMode::kClampToBorder, - GrSamplerState::Filter::kNearest); - std::unique_ptr child; - if (srcBounds) { - SkRect offsetSrcBounds = SkRect::Make(*srcBounds); - offsetSrcBounds.offset(viewOffset.fX, viewOffset.fY); - child = GrTextureEffect::MakeSubset(std::move(view), kPremul_SkAlphaType, - SkMatrix::Translate(viewOffset.fX, viewOffset.fY), - kSampler, offsetSrcBounds, caps); - } else { - child = GrTextureEffect::Make(std::move(view), kPremul_SkAlphaType, - SkMatrix::Translate(viewOffset.fX, viewOffset.fY), - kSampler, caps); - } - this->registerChild(std::move(child), SkSL::SampleUsage::Explicit()); - this->setUsesSampleCoordsDirectly(); -} - -LightingEffect::LightingEffect(const LightingEffect& that) - : INHERITED(that) - , fLight(that.fLight) - , fSurfaceScale(that.fSurfaceScale) - , fFilterMatrix(that.fFilterMatrix) - , fBoundaryMode(that.fBoundaryMode) {} - -bool LightingEffect::onIsEqual(const GrFragmentProcessor& sBase) const { - const LightingEffect& s = sBase.cast(); - return fLight->isEqual(*s.fLight) && - fSurfaceScale == s.fSurfaceScale && - fBoundaryMode == s.fBoundaryMode; -} - -/////////////////////////////////////////////////////////////////////////////// - -DiffuseLightingEffect::DiffuseLightingEffect(GrSurfaceProxyView view, - const SkIPoint& viewOffset, - sk_sp light, - SkScalar surfaceScale, - const SkMatrix& matrix, - SkScalar kd, - BoundaryMode boundaryMode, - const SkIRect* srcBounds, - const GrCaps& caps) - : INHERITED(kGrDiffuseLightingEffect_ClassID, - std::move(view), - viewOffset, - std::move(light), - surfaceScale, - matrix, - boundaryMode, - srcBounds, - caps) - , fKD(kd) {} - -DiffuseLightingEffect::DiffuseLightingEffect(const DiffuseLightingEffect& that) - : INHERITED(that), fKD(that.fKD) {} - -bool DiffuseLightingEffect::onIsEqual(const GrFragmentProcessor& sBase) const { - const DiffuseLightingEffect& s = sBase.cast(); - return INHERITED::onIsEqual(sBase) && fKD == s.fKD; -} - -std::unique_ptr DiffuseLightingEffect::onMakeProgramImpl() const { - return std::make_unique(); -} - -GR_DEFINE_FRAGMENT_PROCESSOR_TEST(DiffuseLightingEffect) - -#if GR_TEST_UTILS - -static SkPoint3 random_point3(SkRandom* random) { - return SkPoint3::Make(SkScalarToFloat(random->nextSScalar1()), - SkScalarToFloat(random->nextSScalar1()), - SkScalarToFloat(random->nextSScalar1())); -} - -static SkImageFilterLight* create_random_light(SkRandom* random) { - int type = random->nextULessThan(3); - switch (type) { - case 0: { - return new SkDistantLight(random_point3(random), random->nextU()); + // Legacy lights stored just the RGB, but as floats (notably *not* normalized to [0-1]) + SkColor lightColor = SkColorSetARGB(/*a (ignored)=*/255, + /*r=*/ (U8CPU) buffer.readScalar(), + /*g=*/ (U8CPU) buffer.readScalar(), + /*b=*/ (U8CPU) buffer.readScalar()); + // Legacy lights only serialized fields specific to that type + switch (lightType) { + case Light::Type::kDistant: { + SkPoint3 dir = {buffer.readScalar(), buffer.readScalar(), buffer.readScalar()}; + return Light::Distant(lightColor, dir); } - case 1: { - return new SkPointLight(random_point3(random), random->nextU()); + case Light::Type::kPoint: { + SkPoint3 loc = {buffer.readScalar(), buffer.readScalar(), buffer.readScalar()}; + return Light::Point(lightColor, loc); } - case 2: { - return new SkSpotLight(random_point3(random), random_point3(random), - random->nextUScalar1(), random->nextUScalar1(), random->nextU()); + case Light::Type::kSpot: { + SkPoint3 loc = {buffer.readScalar(), buffer.readScalar(), buffer.readScalar()}; + SkPoint3 target = {buffer.readScalar(), buffer.readScalar(), buffer.readScalar()}; + float falloffExponent = buffer.readScalar(); + float cosOuterConeAngle = buffer.readScalar(); + buffer.readScalar(); // skip cosInnerConeAngle, derived from outer cone angle + buffer.readScalar(); // skip coneScale, which is a constant + buffer.readScalar(); // skip S, which is normalize(target - loc) + buffer.readScalar(); // "" + buffer.readScalar(); // "" + return Light::Spot(lightColor, loc, target - loc, falloffExponent, cosOuterConeAngle); } - default: - SK_ABORT("Unexpected value."); - } -} - -std::unique_ptr DiffuseLightingEffect::TestCreate(GrProcessorTestData* d) { - auto [view, ct, at] = d->randomView(); - SkScalar surfaceScale = d->fRandom->nextSScalar1(); - SkScalar kd = d->fRandom->nextUScalar1(); - sk_sp light(create_random_light(d->fRandom)); - SkMatrix matrix; - for (int i = 0; i < 9; i++) { - matrix[i] = d->fRandom->nextUScalar1(); } - uint32_t boundsX = d->fRandom->nextRangeU(0, view.width()); - uint32_t boundsY = d->fRandom->nextRangeU(0, view.height()); - uint32_t boundsW = d->fRandom->nextRangeU(0, view.width()); - uint32_t boundsH = d->fRandom->nextRangeU(0, view.height()); - SkIRect srcBounds = SkIRect::MakeXYWH(boundsX, boundsY, boundsW, boundsH); - BoundaryMode mode = static_cast(d->fRandom->nextU() % kBoundaryModeCount); - - return DiffuseLightingEffect::Make(std::move(view), - SkIPoint(), - std::move(light), - surfaceScale, - matrix, - kd, - mode, - &srcBounds, - *d->caps()); + SkUNREACHABLE; // Validation by read32LE() should avoid this } -#endif - - -/////////////////////////////////////////////////////////////////////////////// - -void LightingEffect::ImplBase::emitCode(EmitArgs& args) { - const LightingEffect& le = args.fFp.cast(); - if (!fLight) { - fLight = le.light()->createGpuLight(); - } - GrGLSLUniformHandler* uniformHandler = args.fUniformHandler; - fSurfaceScaleUni = uniformHandler->addUniform(&le, - kFragment_GrShaderFlag, - SkSLType::kHalf, "SurfaceScale"); - fLight->emitLightColorUniform(&le, uniformHandler); - GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder; - SkString lightFunc; - this->emitLightFunc(&le, uniformHandler, fragBuilder, &lightFunc); - const GrShaderVar gSobelArgs[] = { - GrShaderVar("a", SkSLType::kHalf), - GrShaderVar("b", SkSLType::kHalf), - GrShaderVar("c", SkSLType::kHalf), - GrShaderVar("d", SkSLType::kHalf), - GrShaderVar("e", SkSLType::kHalf), - GrShaderVar("f", SkSLType::kHalf), - GrShaderVar("scale", SkSLType::kHalf), - }; +sk_sp SkLightingImageFilter::LegacyDiffuseCreateProc(SkReadBuffer& buffer) { + SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1); - SkString sobelFuncName = fragBuilder->getMangledFunctionName("sobel"); - fragBuilder->emitFunction(SkSLType::kHalf, - sobelFuncName.c_str(), - {gSobelArgs, std::size(gSobelArgs)}, - "return (-a + b - 2.0 * c + 2.0 * d -e + f) * scale;"); - const GrShaderVar gPointToNormalArgs[] = { - GrShaderVar("x", SkSLType::kHalf), - GrShaderVar("y", SkSLType::kHalf), - GrShaderVar("scale", SkSLType::kHalf), - }; - SkString pointToNormalName = fragBuilder->getMangledFunctionName("pointToNormal"); - fragBuilder->emitFunction(SkSLType::kHalf3, - pointToNormalName.c_str(), - {gPointToNormalArgs, std::size(gPointToNormalArgs)}, - "return normalize(half3(-x * scale, -y * scale, 1));"); - - const GrShaderVar gInteriorNormalArgs[] = { - GrShaderVar("m", SkSLType::kHalf, 9), - GrShaderVar("surfaceScale", SkSLType::kHalf), - }; - SkString normalBody = emitNormalFunc(le.boundaryMode(), - pointToNormalName.c_str(), - sobelFuncName.c_str()); - SkString normalName = fragBuilder->getMangledFunctionName("normal"); - fragBuilder->emitFunction(SkSLType::kHalf3, - normalName.c_str(), - {gInteriorNormalArgs, std::size(gInteriorNormalArgs)}, - normalBody.c_str()); - - fragBuilder->codeAppendf("float2 coord = %s;", args.fSampleCoord); - fragBuilder->codeAppend("half m[9];"); - - const char* surfScale = uniformHandler->getUniformCStr(fSurfaceScaleUni); - - int index = 0; - for (int dy = -1; dy <= 1; ++dy) { - for (int dx = -1; dx <= 1; ++dx) { - SkString texCoords; - texCoords.appendf("coord + half2(%d, %d)", dx, dy); - auto sample = this->invokeChild(0, args, texCoords.c_str()); - fragBuilder->codeAppendf("m[%d] = %s.a;", index, sample.c_str()); - index++; - } - } - fragBuilder->codeAppend("half3 surfaceToLight = "); - SkString arg; - arg.appendf("%s * m[4]", surfScale); - fLight->emitSurfaceToLight(&le, uniformHandler, fragBuilder, arg.c_str()); - fragBuilder->codeAppend(";"); - fragBuilder->codeAppendf("return %s(%s(m, %s), surfaceToLight, ", - lightFunc.c_str(), normalName.c_str(), surfScale); - fLight->emitLightColor(&le, uniformHandler, fragBuilder, "surfaceToLight"); - fragBuilder->codeAppend(");"); -} + Light light = LegacyDeserializeLight(buffer); -void LightingEffect::ImplBase::onSetData(const GrGLSLProgramDataManager& pdman, - const GrFragmentProcessor& proc) { - const LightingEffect& lighting = proc.cast(); - if (!fLight) { - fLight = lighting.light()->createGpuLight(); - } + // Legacy implementations used (scale/255) when filtering, but serialized (fScale*255) so the + // buffer held the original unmodified surface scale. + float surfaceScale = buffer.readScalar(); + float kd = buffer.readScalar(); + Material material = Material::Diffuse(kd, surfaceScale); - pdman.set1f(fSurfaceScaleUni, lighting.surfaceScale()); - sk_sp transformedLight( - lighting.light()->transform(lighting.filterMatrix())); - fLight->setData(pdman, transformedLight.get()); + return make_lighting(light, material, common.getInput(0), common.cropRect()); } -/////////////////////////////////////////////////////////////////////////////// +sk_sp SkLightingImageFilter::LegacySpecularCreateProc(SkReadBuffer& buffer) { + SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1); -/////////////////////////////////////////////////////////////////////////////// + Light light = LegacyDeserializeLight(buffer); -void DiffuseLightingEffect::Impl::emitLightFunc(const GrFragmentProcessor* owner, - GrGLSLUniformHandler* uniformHandler, - GrGLSLFPFragmentBuilder* fragBuilder, - SkString* funcName) { - const char* kd; - fKDUni = uniformHandler->addUniform(owner, kFragment_GrShaderFlag, SkSLType::kHalf, "KD", &kd); - - const GrShaderVar gLightArgs[] = { - GrShaderVar("normal", SkSLType::kHalf3), - GrShaderVar("surfaceToLight", SkSLType::kHalf3), - GrShaderVar("lightColor", SkSLType::kHalf3) - }; - SkString lightBody; - lightBody.appendf("half colorScale = %s * dot(normal, surfaceToLight);", kd); - lightBody.appendf("return half4(saturate(lightColor * colorScale), 1.0);"); - *funcName = fragBuilder->getMangledFunctionName("light"); - fragBuilder->emitFunction(SkSLType::kHalf4, - funcName->c_str(), - {gLightArgs, std::size(gLightArgs)}, - lightBody.c_str()); -} + // Legacy implementations used (scale/255) when filtering, but serialized (fScale*255) so the + // buffer held the original unmodified surface scale. + float surfaceScale = buffer.readScalar(); + float ks = buffer.readScalar(); + float shininess = buffer.readScalar(); + Material material = Material::Specular(ks, shininess, surfaceScale); -void DiffuseLightingEffect::Impl::onSetData(const GrGLSLProgramDataManager& pdman, - const GrFragmentProcessor& proc) { - INHERITED::onSetData(pdman, proc); - const DiffuseLightingEffect& diffuse = proc.cast(); - pdman.set1f(fKDUni, diffuse.fKD); + return make_lighting(light, material, common.getInput(0), common.cropRect()); } -/////////////////////////////////////////////////////////////////////////////// +void SkLightingImageFilter::flatten(SkWriteBuffer& buffer) const { + this->SkImageFilter_Base::flatten(buffer); -SpecularLightingEffect::SpecularLightingEffect(GrSurfaceProxyView view, - const SkIPoint& viewOffset, - sk_sp light, - SkScalar surfaceScale, - const SkMatrix& matrix, - SkScalar ks, - SkScalar shininess, - BoundaryMode boundaryMode, - const SkIRect* srcBounds, - const GrCaps& caps) - : INHERITED(kGrSpecularLightingEffect_ClassID, - std::move(view), - viewOffset, - std::move(light), - surfaceScale, - matrix, - boundaryMode, - srcBounds, - caps) - , fKS(ks) - , fShininess(shininess) {} - -SpecularLightingEffect::SpecularLightingEffect(const SpecularLightingEffect& that) - : INHERITED(that), fKS(that.fKS), fShininess(that.fShininess) {} - -bool SpecularLightingEffect::onIsEqual(const GrFragmentProcessor& sBase) const { - const SpecularLightingEffect& s = sBase.cast(); - return INHERITED::onIsEqual(sBase) && this->fKS == s.fKS && this->fShininess == s.fShininess; -} + // Light + buffer.writeInt((int) fLight.fType); + buffer.writeColor(fLight.fLightColor); -std::unique_ptr -SpecularLightingEffect::onMakeProgramImpl() const { return std::make_unique(); } - -GR_DEFINE_FRAGMENT_PROCESSOR_TEST(SpecularLightingEffect) - -#if GR_TEST_UTILS -std::unique_ptr SpecularLightingEffect::TestCreate(GrProcessorTestData* d) { - auto [view, ct, at] = d->randomView(); - SkScalar surfaceScale = d->fRandom->nextSScalar1(); - SkScalar ks = d->fRandom->nextUScalar1(); - SkScalar shininess = d->fRandom->nextUScalar1(); - sk_sp light(create_random_light(d->fRandom)); - SkMatrix matrix; - for (int i = 0; i < 9; i++) { - matrix[i] = d->fRandom->nextUScalar1(); - } - BoundaryMode mode = static_cast(d->fRandom->nextU() % kBoundaryModeCount); - - uint32_t boundsX = d->fRandom->nextRangeU(0, view.width()); - uint32_t boundsY = d->fRandom->nextRangeU(0, view.height()); - uint32_t boundsW = d->fRandom->nextRangeU(0, view.width()); - uint32_t boundsH = d->fRandom->nextRangeU(0, view.height()); - SkIRect srcBounds = SkIRect::MakeXYWH(boundsX, boundsY, boundsW, boundsH); - - return SpecularLightingEffect::Make(std::move(view), - SkIPoint(), - std::move(light), - surfaceScale, - matrix, - ks, - shininess, - mode, - &srcBounds, - *d->caps()); -} -#endif + buffer.writePoint(SkPoint(fLight.fLocationXY)); + buffer.writeScalar(ZValue(fLight.fLocationZ)); -/////////////////////////////////////////////////////////////////////////////// + skif::Vector dirXY{fLight.fDirectionXY}; + buffer.writePoint(SkPoint{dirXY.fX, dirXY.fY}); + buffer.writeScalar(ZValue(fLight.fDirectionZ)); -void SpecularLightingEffect::Impl::emitLightFunc(const GrFragmentProcessor* owner, - GrGLSLUniformHandler* uniformHandler, - GrGLSLFPFragmentBuilder* fragBuilder, - SkString* funcName) { - const char* ks; - const char* shininess; - - fKSUni = uniformHandler->addUniform(owner, kFragment_GrShaderFlag, SkSLType::kHalf, "KS", &ks); - fShininessUni = uniformHandler->addUniform(owner, - kFragment_GrShaderFlag, - SkSLType::kHalf, - "Shininess", - &shininess); - - const GrShaderVar gLightArgs[] = { - GrShaderVar("normal", SkSLType::kHalf3), - GrShaderVar("surfaceToLight", SkSLType::kHalf3), - GrShaderVar("lightColor", SkSLType::kHalf3) - }; - SkString lightBody; - lightBody.appendf("half3 halfDir = half3(normalize(surfaceToLight + half3(0, 0, 1)));"); - lightBody.appendf("half colorScale = half(%s * pow(dot(normal, halfDir), %s));", - ks, shininess); - lightBody.appendf("half3 color = saturate(lightColor * colorScale);"); - lightBody.appendf("return half4(color, max(max(color.r, color.g), color.b));"); - *funcName = fragBuilder->getMangledFunctionName("light"); - fragBuilder->emitFunction(SkSLType::kHalf4, - funcName->c_str(), - {gLightArgs, std::size(gLightArgs)}, - lightBody.c_str()); -} + buffer.writeScalar(fLight.fFalloffExponent); + buffer.writeScalar(fLight.fCosCutoffAngle); -void SpecularLightingEffect::Impl::onSetData(const GrGLSLProgramDataManager& pdman, - const GrFragmentProcessor& effect) { - INHERITED::onSetData(pdman, effect); - const SpecularLightingEffect& spec = effect.cast(); - pdman.set1f(fKSUni, spec.fKS); - pdman.set1f(fShininessUni, spec.fShininess); + // Material + buffer.writeInt((int) fMaterial.fType); + buffer.writeScalar(ZValue(fMaterial.fSurfaceDepth)); + buffer.writeScalar(fMaterial.fK); + buffer.writeScalar(fMaterial.fShininess); } /////////////////////////////////////////////////////////////////////////////// -void GpuLight::emitLightColorUniform(const GrFragmentProcessor* owner, - GrGLSLUniformHandler* uniformHandler) { - fColorUni = uniformHandler->addUniform(owner, kFragment_GrShaderFlag, SkSLType::kHalf3, - "LightColor"); -} -void GpuLight::emitLightColor(const GrFragmentProcessor* owner, - GrGLSLUniformHandler* uniformHandler, - GrGLSLFPFragmentBuilder* fragBuilder, - const char* surfaceToLight) { - fragBuilder->codeAppend(uniformHandler->getUniformCStr(this->lightColorUni())); -} +skif::FilterResult SkLightingImageFilter::onFilterImage(const skif::Context& ctx) const { + using ShaderFlags = skif::FilterResult::ShaderFlags; -void GpuLight::setData(const GrGLSLProgramDataManager& pdman, - const SkImageFilterLight* light) const { - setUniformPoint3(pdman, fColorUni, - light->color().makeScale(SkScalarInvert(SkIntToScalar(255)))); -} + auto mapZToLayer = [&ctx](skif::ParameterSpace z) { + return skif::LayerSpace::Map(ctx.mapping(), z); + }; -/////////////////////////////////////////////////////////////////////////////// + // Map lighting and material parameters into layer space + skif::LayerSpace surfaceDepth = mapZToLayer(fMaterial.fSurfaceDepth); + skif::LayerSpace lightLocationXY = ctx.mapping().paramToLayer(fLight.fLocationXY); + skif::LayerSpace lightLocationZ = mapZToLayer(fLight.fLocationZ); + skif::LayerSpace lightDirXY = ctx.mapping().paramToLayer(fLight.fDirectionXY); + skif::LayerSpace lightDirZ = mapZToLayer(fLight.fDirectionZ); + + // The normal map is determined by a 3x3 kernel, so we request a 1px outset of what should be + // filled by the lighting equation. Ideally this means there are no boundary conditions visible. + // If the required input is incomplete, the lighting filter handles the boundaries in two ways: + // - When the actual child output's edge matches the desired output's edge, it uses clamped + // tiling at the desired output. This approximates the modified Sobel kernel's specified in + // https://drafts.fxtf.org/filter-effects/#feDiffuseLightingElement. NOTE: It's identical to + // the interior kernel and near equal on the 4 edges (only weights are biased differently). + // The four corners' convolution sums with clamped tiling are not equal, but should not be + // objectionable since the normals produced are reasonable and still further processed by the + // lighting equation. The increased complexity is not worth it for just 4 pixels of output. + // - However, when the desired output is far larger than the produced image, we process the + // child output with the default decal tiling that the Skia image filter pipeline relies on. + // This creates a visual bevel at the image boundary but avoids producing streaked normals if + // the clamped tiling was used in all scenarios. + skif::LayerSpace requiredInput = this->requiredInput(ctx.desiredOutput()); + skif::FilterResult childOutput = + this->getChildOutput(0, ctx.withNewDesiredOutput(requiredInput)); + + skif::LayerSpace clampRect = requiredInput; // effectively no clamping of normals + if (!childOutput.layerBounds().contains(requiredInput)) { + // Adjust clampRect edges to desiredOutput if the actual child output matched the lighting + // output size (typical SVG case). Otherwise leave coordinates alone to use decal tiling + // automatically for the pixels outside the child image but inside the desired output. + auto edgeClamp = [](int actualEdgeValue, int requestedEdgeValue, int outputEdge) { + return actualEdgeValue == outputEdge ? outputEdge : requestedEdgeValue; + }; + auto inputRect = childOutput.layerBounds(); + auto clampTo = ctx.desiredOutput(); + clampRect = skif::LayerSpace({ + edgeClamp(inputRect.left(), requiredInput.left(), clampTo.left()), + edgeClamp(inputRect.top(), requiredInput.top(), clampTo.top()), + edgeClamp(inputRect.right(), requiredInput.right(), clampTo.right()), + edgeClamp(inputRect.bottom(), requiredInput.bottom(), clampTo.bottom())}); + } + + skif::FilterResult::Builder builder{ctx}; + builder.add(childOutput, /*sampleBounds=*/clampRect, ShaderFlags::kSampledRepeatedly); + return builder.eval([&](SkSpan> input) { + // TODO: Once shaders are deferred in FilterResult, it will likely make sense to have an + // internal normal map filter that uses this shader, and then have the lighting effects as + // a separate filter. It's common for multiple lights to use the same input (producing the + // same normal map) before being merged together. With a separate normal image filter, its + // output would be automatically cached, and the lighting equation shader would be deferred + // to the merge's draw operation, making for a maximum of 2 renderpasses instead of N+1. + sk_sp normals = make_normal_shader(std::move(input[0]), clampRect, surfaceDepth); + return make_lighting_shader(std::move(normals), + // Light in layer space + fLight.fType, + fLight.fLightColor, + lightLocationXY, + lightLocationZ, + lightDirXY, + lightDirZ, + fLight.fFalloffExponent, + fLight.fCosCutoffAngle, + // Material in layer space + fMaterial.fType, + surfaceDepth, + fMaterial.fK, + fMaterial.fShininess); + }); +} + +skif::LayerSpace SkLightingImageFilter::onGetInputLayerBounds( + const skif::Mapping& mapping, + const skif::LayerSpace& desiredOutput, + const skif::LayerSpace& contentBounds) const { + skif::LayerSpace requiredInput = this->requiredInput(desiredOutput); + return this->getChildInputLayerBounds(0, mapping, requiredInput, contentBounds); +} + +skif::LayerSpace SkLightingImageFilter::onGetOutputLayerBounds( + const skif::Mapping& mapping, + const skif::LayerSpace& contentBounds) const { + // The lighting equation is defined on the entire plane, even if the input image that defines + // the normal map is bounded. It just is evaluated at a constant normal vector, which can still + // produce non-constant color since the direction to the eye and light change per pixel. + return skif::LayerSpace(SkRectPriv::MakeILarge()); +} + +SkRect SkLightingImageFilter::computeFastBounds(const SkRect& src) const { + return SkRectPriv::MakeLargeS32(); +} + +#else // SK_ENABLE_SKSL + +// Without SkSL, just return the input image filter (possibly cropped) -void GpuDistantLight::setData(const GrGLSLProgramDataManager& pdman, - const SkImageFilterLight* light) const { - INHERITED::setData(pdman, light); - SkASSERT(light->type() == SkImageFilterLight::kDistant_LightType); - const SkDistantLight* distantLight = static_cast(light); - setUniformNormal3(pdman, fDirectionUni, distantLight->direction()); +sk_sp SkImageFilters::DistantLitDiffuse( + const SkPoint3& direction, SkColor lightColor, SkScalar surfaceScale, SkScalar kd, + sk_sp input, const CropRect& cropRect) { + return cropRect ? SkMakeCropImageFilter(*cropRect, std::move(input)) : input; } -void GpuDistantLight::emitSurfaceToLight(const GrFragmentProcessor* owner, - GrGLSLUniformHandler* uniformHandler, - GrGLSLFPFragmentBuilder* fragBuilder, - const char* z) { - const char* dir; - fDirectionUni = uniformHandler->addUniform(owner, kFragment_GrShaderFlag, SkSLType::kHalf3, - "LightDirection", &dir); - fragBuilder->codeAppend(dir); +sk_sp SkImageFilters::PointLitDiffuse( + const SkPoint3& location, SkColor lightColor, SkScalar surfaceScale, SkScalar kd, + sk_sp input, const CropRect& cropRect) { + return cropRect ? SkMakeCropImageFilter(*cropRect, std::move(input)) : input; } -/////////////////////////////////////////////////////////////////////////////// - -void GpuPointLight::setData(const GrGLSLProgramDataManager& pdman, - const SkImageFilterLight* light) const { - INHERITED::setData(pdman, light); - SkASSERT(light->type() == SkImageFilterLight::kPoint_LightType); - const SkPointLight* pointLight = static_cast(light); - setUniformPoint3(pdman, fLocationUni, pointLight->location()); +sk_sp SkImageFilters::SpotLitDiffuse( + const SkPoint3& location, const SkPoint3& target, SkScalar falloffExponent, + SkScalar cutoffAngle, SkColor lightColor, SkScalar surfaceScale, SkScalar kd, + sk_sp input, const CropRect& cropRect) { + return cropRect ? SkMakeCropImageFilter(*cropRect, std::move(input)) : input; } -void GpuPointLight::emitSurfaceToLight(const GrFragmentProcessor* owner, - GrGLSLUniformHandler* uniformHandler, - GrGLSLFPFragmentBuilder* fragBuilder, - const char* z) { - const char* loc; - fLocationUni = uniformHandler->addUniform(owner, kFragment_GrShaderFlag, SkSLType::kHalf3, - "LightLocation", &loc); - fragBuilder->codeAppendf("normalize(%s - half3(sk_FragCoord.xy, %s))", - loc, z); +sk_sp SkImageFilters::DistantLitSpecular( + const SkPoint3& direction, SkColor lightColor, SkScalar surfaceScale, SkScalar ks, + SkScalar shininess, sk_sp input, const CropRect& cropRect) { + return cropRect ? SkMakeCropImageFilter(*cropRect, std::move(input)) : input; } -/////////////////////////////////////////////////////////////////////////////// - -void GpuSpotLight::setData(const GrGLSLProgramDataManager& pdman, - const SkImageFilterLight* light) const { - INHERITED::setData(pdman, light); - SkASSERT(light->type() == SkImageFilterLight::kSpot_LightType); - const SkSpotLight* spotLight = static_cast(light); - setUniformPoint3(pdman, fLocationUni, spotLight->location()); - pdman.set1f(fExponentUni, spotLight->specularExponent()); - pdman.set1f(fCosInnerConeAngleUni, spotLight->cosInnerConeAngle()); - pdman.set1f(fCosOuterConeAngleUni, spotLight->cosOuterConeAngle()); - pdman.set1f(fConeScaleUni, spotLight->coneScale()); - setUniformNormal3(pdman, fSUni, spotLight->s()); +sk_sp SkImageFilters::PointLitSpecular( + const SkPoint3& location, SkColor lightColor, SkScalar surfaceScale, SkScalar ks, + SkScalar shininess, sk_sp input, const CropRect& cropRect) { + return cropRect ? SkMakeCropImageFilter(*cropRect, std::move(input)) : input; } -void GpuSpotLight::emitSurfaceToLight(const GrFragmentProcessor* owner, - GrGLSLUniformHandler* uniformHandler, - GrGLSLFPFragmentBuilder* fragBuilder, - const char* z) { - const char* location; - fLocationUni = uniformHandler->addUniform(owner, kFragment_GrShaderFlag, SkSLType::kHalf3, - "LightLocation", &location); - - fragBuilder->codeAppendf("normalize(%s - half3(sk_FragCoord.xy, %s))", - location, z); +sk_sp SkImageFilters::SpotLitSpecular( + const SkPoint3& location, const SkPoint3& target, SkScalar falloffExponent, + SkScalar cutoffAngle, SkColor lightColor, SkScalar surfaceScale, SkScalar ks, + SkScalar shininess, sk_sp input, const CropRect& cropRect) { + return cropRect ? SkMakeCropImageFilter(*cropRect, std::move(input)) : input; } -void GpuSpotLight::emitLightColor(const GrFragmentProcessor* owner, - GrGLSLUniformHandler* uniformHandler, - GrGLSLFPFragmentBuilder* fragBuilder, - const char* surfaceToLight) { - const char* color = uniformHandler->getUniformCStr(this->lightColorUni()); // created by parent class. - - const char* exponent; - const char* cosInner; - const char* cosOuter; - const char* coneScale; - const char* s; - fExponentUni = uniformHandler->addUniform(owner, kFragment_GrShaderFlag, SkSLType::kHalf, - "Exponent", &exponent); - fCosInnerConeAngleUni = uniformHandler->addUniform(owner, kFragment_GrShaderFlag, - SkSLType::kHalf, "CosInnerConeAngle", - &cosInner); - fCosOuterConeAngleUni = uniformHandler->addUniform(owner, kFragment_GrShaderFlag, - SkSLType::kHalf, "CosOuterConeAngle", - &cosOuter); - fConeScaleUni = uniformHandler->addUniform(owner, kFragment_GrShaderFlag, SkSLType::kHalf, - "ConeScale", &coneScale); - fSUni = uniformHandler->addUniform(owner, kFragment_GrShaderFlag, SkSLType::kHalf3, "S", &s); - - const GrShaderVar gLightColorArgs[] = { - GrShaderVar("surfaceToLight", SkSLType::kHalf3) - }; - SkString lightColorBody; - lightColorBody.appendf("half cosAngle = -dot(surfaceToLight, %s);", s); - lightColorBody.appendf("if (cosAngle < %s) {", cosOuter); - lightColorBody.appendf("return half3(0);"); - lightColorBody.appendf("}"); - lightColorBody.appendf("half scale = pow(cosAngle, %s);", exponent); - lightColorBody.appendf("if (cosAngle < %s) {", cosInner); - lightColorBody.appendf("return %s * scale * (cosAngle - %s) * %s;", - color, cosOuter, coneScale); - lightColorBody.appendf("}"); - lightColorBody.appendf("return %s * scale;", color); - fLightColorFunc = fragBuilder->getMangledFunctionName("lightColor"); - fragBuilder->emitFunction(SkSLType::kHalf3, - fLightColorFunc.c_str(), - {gLightColorArgs, std::size(gLightColorArgs)}, - lightColorBody.c_str()); - - fragBuilder->codeAppendf("%s(%s)", fLightColorFunc.c_str(), surfaceToLight); -} +void SkRegisterLightingImageFilterFlattenables() {} -#endif +#endif // SK_ENABLE_SKSL diff --git a/src/effects/imagefilters/SkMagnifierImageFilter.cpp b/src/effects/imagefilters/SkMagnifierImageFilter.cpp index 792d22764f97..2f0ae619115e 100644 --- a/src/effects/imagefilters/SkMagnifierImageFilter.cpp +++ b/src/effects/imagefilters/SkMagnifierImageFilter.cpp @@ -284,12 +284,12 @@ skif::FilterResult SkMagnifierImageFilter::onFilterImage(const skif::Context& co using ShaderFlags = skif::FilterResult::ShaderFlags; skif::FilterResult::Builder builder{context}; builder.add(this->getChildOutput(0, context.withNewDesiredOutput(visibleLensBounds.roundOut())), - {}, ShaderFlags::kNonLinearSampling, fSampling); + {}, ShaderFlags::kNonTrivialSampling, fSampling); return builder.eval([&](SkSpan> inputs) { // If the input resolved to a null shader, the magnified output will be transparent too return inputs[0] ? make_magnifier_shader(inputs[0], lensBounds, zoomXform, inset) : nullptr; - }, ShaderFlags::kExplicitOutputBounds, lensBounds.roundOut()); + }, lensBounds.roundOut()); #endif } diff --git a/src/effects/imagefilters/SkMatrixConvolutionImageFilter.cpp b/src/effects/imagefilters/SkMatrixConvolutionImageFilter.cpp index f6df364dd285..4e2151aa80ba 100644 --- a/src/effects/imagefilters/SkMatrixConvolutionImageFilter.cpp +++ b/src/effects/imagefilters/SkMatrixConvolutionImageFilter.cpp @@ -5,10 +5,15 @@ * found in the LICENSE file. */ +#include "include/effects/SkImageFilters.h" + +#if defined(SK_USE_LEGACY_CONVOLUTION_IMAGEFILTER) + #include "include/core/SkAlphaType.h" #include "include/core/SkBitmap.h" #include "include/core/SkColor.h" #include "include/core/SkColorPriv.h" +#include "include/core/SkColorSpace.h" #include "include/core/SkColorType.h" #include "include/core/SkFlattenable.h" #include "include/core/SkImageFilter.h" @@ -24,6 +29,7 @@ #include "include/private/base/SkMath.h" #include "include/private/base/SkTPin.h" #include "include/private/base/SkTemplates.h" +#include "src/core/SkImageFilterTypes.h" #include "src/core/SkImageFilter_Base.h" #include "src/core/SkReadBuffer.h" #include "src/core/SkSpecialImage.h" @@ -33,16 +39,25 @@ #include #include #include + class SkMatrix; +class SkSurfaceProps; #if defined(SK_GANESH) +#include "include/gpu/GpuTypes.h" #include "include/gpu/GrRecordingContext.h" +#include "include/gpu/GrTypes.h" +#include "include/private/gpu/ganesh/GrTypesPriv.h" +#include "src/gpu/SkBackingFit.h" #include "src/gpu/ganesh/GrFragmentProcessor.h" +#include "src/gpu/ganesh/GrImageInfo.h" #include "src/gpu/ganesh/GrRecordingContextPriv.h" #include "src/gpu/ganesh/GrSurfaceProxy.h" #include "src/gpu/ganesh/GrSurfaceProxyView.h" #include "src/gpu/ganesh/SkGr.h" +#include "src/gpu/ganesh/SurfaceFillContext.h" #include "src/gpu/ganesh/effects/GrMatrixConvolutionEffect.h" +#include "src/gpu/ganesh/image/SkSpecialImage_Ganesh.h" #endif using namespace skia_private; @@ -78,7 +93,7 @@ class SkMatrixConvolutionImageFilter final : public SkImageFilter_Base { void flatten(SkWriteBuffer&) const override; - sk_sp onFilterImage(const Context&, SkIPoint* offset) const override; + sk_sp onFilterImage(const skif::Context&, SkIPoint* offset) const override; SkIRect onFilterNodeBounds(const SkIRect&, const SkMatrix& ctm, MapDirection, const SkIRect* inputRect) const override; bool onAffectsTransparentBlack() const override; @@ -351,7 +366,45 @@ void SkMatrixConvolutionImageFilter::filterBorderPixels(const SkBitmap& src, } } -sk_sp SkMatrixConvolutionImageFilter::onFilterImage(const Context& ctx, +#if defined(SK_GANESH) +static sk_sp draw_with_fp(GrRecordingContext* rContext, + std::unique_ptr fp, + const SkIRect& bounds, + SkColorType colorType, + const SkColorSpace* colorSpace, + const SkSurfaceProps& surfaceProps, + GrSurfaceOrigin surfaceOrigin, + GrProtected isProtected) { + GrImageInfo info(SkColorTypeToGrColorType(colorType), + kPremul_SkAlphaType, + sk_ref_sp(colorSpace), + bounds.size()); + + auto sfc = rContext->priv().makeSFC(info, + "ImageFilterBase_DrawWithFP", + SkBackingFit::kApprox, + 1, + GrMipmapped::kNo, + isProtected, + surfaceOrigin); + if (!sfc) { + return nullptr; + } + + SkIRect dstIRect = SkIRect::MakeWH(bounds.width(), bounds.height()); + SkRect srcRect = SkRect::Make(bounds); + sfc->fillRectToRectWithFP(srcRect, dstIRect, std::move(fp)); + + return SkSpecialImages::MakeDeferredFromGpu(rContext, + dstIRect, + kNeedNewImageUniqueID_SpecialImage, + sfc->readSurfaceView(), + sfc->colorInfo(), + surfaceProps); +} +#endif + +sk_sp SkMatrixConvolutionImageFilter::onFilterImage(const skif::Context& ctx, SkIPoint* offset) const { SkIPoint inputOffset = SkIPoint::Make(0, 0); sk_sp input(this->filterInput(0, ctx, &inputOffset)); @@ -388,9 +441,9 @@ sk_sp SkMatrixConvolutionImageFilter::onFilterImage(const Contex // called pad_image to account for our dilation of bounds, so the result will already be // moved to the destination color space. If a filter DAG avoids that, then we use this // fall-back, which saves us from having to do the xform during the filter itself. - input = ImageToColorSpace(ctx, input.get()); + input = SkSpecialImages::ImageToColorSpace(ctx, input.get()); - GrSurfaceProxyView inputView = input->view(context); + GrSurfaceProxyView inputView = SkSpecialImages::AsView(context, input); SkASSERT(inputView.asTextureProxy()); const auto isProtected = inputView.proxy()->isProtected(); @@ -425,8 +478,8 @@ sk_sp SkMatrixConvolutionImageFilter::onFilterImage(const Contex // Must also map the dstBounds since it is used as the src rect in DrawWithFP when // evaluating the FP, and the dst rect just uses the size of dstBounds. dstBounds.offset(input->subset().x(), input->subset().y()); - return DrawWithFP(context, std::move(fp), dstBounds, ctx.colorType(), ctx.colorSpace(), - ctx.surfaceProps(), origin, isProtected); + return draw_with_fp(context, std::move(fp), dstBounds, ctx.colorType(), ctx.colorSpace(), + ctx.surfaceProps(), origin, isProtected); } #endif @@ -492,8 +545,8 @@ sk_sp SkMatrixConvolutionImageFilter::onFilterImage(const Contex this->filterBorderPixels(inputBM, &dst, dstContentOffset, right, srcBounds); this->filterBorderPixels(inputBM, &dst, dstContentOffset, bottom, srcBounds); - return SkSpecialImage::MakeFromRaster(SkIRect::MakeWH(dstBounds.width(), dstBounds.height()), - dst, ctx.surfaceProps()); + return SkSpecialImages::MakeFromRaster( + SkIRect::MakeWH(dstBounds.width(), dstBounds.height()), dst, ctx.surfaceProps()); } SkIRect SkMatrixConvolutionImageFilter::onFilterNodeBounds( @@ -526,3 +579,599 @@ bool SkMatrixConvolutionImageFilter::onAffectsTransparentBlack() const { // pixels it will affect in object-space. return SkTileMode::kRepeat != fTileMode && SkTileMode::kMirror != fTileMode; } + +#else + +#include "src/effects/imagefilters/SkCropImageFilter.h" + +#ifdef SK_ENABLE_SKSL + +#include "include/core/SkAlphaType.h" +#include "include/core/SkBitmap.h" +#include "include/core/SkColorType.h" +#include "include/core/SkFlattenable.h" +#include "include/core/SkImage.h" +#include "include/core/SkImageFilter.h" +#include "include/core/SkImageInfo.h" +#include "include/core/SkM44.h" +#include "include/core/SkPoint.h" +#include "include/core/SkRect.h" +#include "include/core/SkRefCnt.h" +#include "include/core/SkSamplingOptions.h" +#include "include/core/SkScalar.h" +#include "include/core/SkShader.h" +#include "include/core/SkSize.h" +#include "include/core/SkString.h" +#include "include/core/SkTileMode.h" +#include "include/core/SkTypes.h" +#include "include/effects/SkRuntimeEffect.h" +#include "include/private/base/SkMath.h" +#include "include/private/base/SkMutex.h" +#include "include/private/base/SkSpan_impl.h" +#include "include/private/base/SkTArray.h" +#include "include/private/base/SkTemplates.h" +#include "include/private/base/SkThreadAnnotations.h" +#include "src/base/SkMathPriv.h" +#include "src/core/SkImageFilterTypes.h" +#include "src/core/SkImageFilter_Base.h" +#include "src/core/SkLRUCache.h" +#include "src/core/SkPicturePriv.h" +#include "src/core/SkReadBuffer.h" +#include "src/core/SkRectPriv.h" +#include "src/core/SkRuntimeEffectPriv.h" +#include "src/core/SkWriteBuffer.h" + +#include +#include +#include + +using namespace skia_private; + +namespace { + +// The matrix convolution image filter applies the convolution naively, it does not use any DFT to +// convert the input images into the frequency domain. As such, kernels can quickly become too +// slow to run in a reasonable amount of time (and anyone using a kernel that large should not be +// relying on Skia to perform the calculations). 2048 is somewhat arbitrary since smaller square +// kernels are likely excessive (e.g. 256x256 is still 65k operations per pixel), but this should +// hopefully not cause existing clients/websites to fail when historically there was no upper limit. +static constexpr int kMaxKernelDimension = 2048; +// The uniform-based kernel shader can store 28 values in any order layout (28x1, 1x25, 5x5, and +// smaller orders like 3x3 or 5x4, etc.), but must be a multiple of 4 for better packing in std140. +static constexpr int kMaxUniformKernelSize = 28; + +// TODO: This replicates a lot of the logic in GrMatrixConvolutionEffect::KernelWrapper. Once +// fully landed, GrMatrixConvolutionEffect will only be used for 2D Gaussian blurs, in which case +// its support for texture-backed kernels can be removed. It may also be fully removed if the 2D +// logic can be folded into GrGaussianConvolutionFragmentProcessor. +SkBitmap create_kernel_bitmap(const SkISize& kernelSize, const float* kernel, + float* innerGain, float* innerBias); + +class SkMatrixConvolutionImageFilter final : public SkImageFilter_Base { +public: + SkMatrixConvolutionImageFilter(const SkISize& kernelSize, const SkScalar* kernel, + SkScalar gain, SkScalar bias, const SkIPoint& kernelOffset, + bool convolveAlpha, sk_sp input) + : SkImageFilter_Base(&input, 1, /*cropRect=*/nullptr) + , fKernel(kernel, kernelSize.width() * kernelSize.height()) + , fKernelSize(kernelSize) + , fKernelOffset({kernelOffset.fX, kernelOffset.fY}) + , fGain(gain) + , fBias(bias) + , fConvolveAlpha(convolveAlpha) { + // The public factory should have ensured these before creating this object. + SkASSERT(kernelSize.fWidth <= kMaxKernelDimension && + kernelSize.fHeight <= kMaxKernelDimension); + SkASSERT(kernelSize.fWidth >= 1 && kernelSize.fHeight >= 1); + SkASSERT(kernelOffset.fX >= 0 && kernelOffset.fX < kernelSize.fWidth); + SkASSERT(kernelOffset.fY >= 0 && kernelOffset.fY < kernelSize.fHeight); + + // Does nothing for small kernels, otherwise encodes kernel into an A8 image. + fKernelBitmap = create_kernel_bitmap(kernelSize, kernel, &fInnerGain, &fInnerBias); + } + + SkRect computeFastBounds(const SkRect& bounds) const override; + +protected: + void flatten(SkWriteBuffer&) const override; + +private: + friend void ::SkRegisterMatrixConvolutionImageFilterFlattenable(); + SK_FLATTENABLE_HOOKS(SkMatrixConvolutionImageFilter) + + bool onAffectsTransparentBlack() const override { + // affectsTransparentBlack() is conflated with "canComputeFastBounds" and MatrixConvolution + // is unique in that it might not produce unbounded output, but we can't calculate the + // fast bounds because the kernel is applied in device space and no transform is provided + // with that API. + // TODO(skbug.com/14617): Accept a matrix in computeFastBounds() so that we can handle the + // layer-space kernel case. + + // That issue aside, a matrix convolution can affect transparent black when it has a + // non-zero bias and convolves alpha (if it doesn't convolve the alpha channel then the bias + // applied to RGB doesn't matter for transparent black pixels). + // NOTE: The crop image filters that wrap the matrix convolution to apply tile modes will + // reset this property when possible. + return true; + } + + skif::FilterResult onFilterImage(const skif::Context& context) const override; + + skif::LayerSpace onGetInputLayerBounds( + const skif::Mapping& mapping, + const skif::LayerSpace& desiredOutput, + const skif::LayerSpace& contentBounds) const override; + + skif::LayerSpace onGetOutputLayerBounds( + const skif::Mapping& mapping, + const skif::LayerSpace& contentBounds) const override; + + // Helper functions to adjust 'bounds' by the kernel size and offset, either for what would be + // sampled when covering 'bounds', or what could produce values when applied to 'bounds'. + skif::LayerSpace boundsSampledByKernel(const skif::LayerSpace& bounds) const; + skif::LayerSpace boundsAffectedByKernel(const skif::LayerSpace& bounds) const; + + sk_sp createShader(const skif::Context& ctx, sk_sp input) const; + + // Original kernel data, preserved for serialization even if it was encoded into fKernelBitmap + TArray fKernel; + + // Unlike the majority of image filters, the kernel is applied as-is to the layer-space pixels. + // This means that the kernel size and offset are always in the layer coordinate system. + skif::LayerSpace fKernelSize; + skif::LayerSpace fKernelOffset; + + float fGain; + float fBias; // NOTE: This is assumed to be in [0-255] for historical reasons + bool fConvolveAlpha; + + // Derived from fKernel when larger than what we will upload as uniforms; fInnerBias and + // fInnerGain reconstruct the original coefficient from unorm8 data as (a+innerBias)*innerGain + // Since these are derived, they are not serialized. + SkBitmap fKernelBitmap; + float fInnerBias; + float fInnerGain; +}; + +// LayerSpace doesn't have a clean type to represent 4 separate edge deltas, but the result +// is a valid layer-space rectangle, so just go back to the underlying SkIRect temporarily. +skif::LayerSpace adjust(const skif::LayerSpace& rect, + int dl, int dt, int dr, int db) { + SkIRect adjusted = SkIRect(rect); + adjusted.adjust(dl, dt, dr, db); + return skif::LayerSpace(adjusted); +} + +SkBitmap create_kernel_bitmap(const SkISize& kernelSize, const float* kernel, + float* innerGain, float* innerBias) { + int length = kernelSize.fWidth * kernelSize.fHeight; + if (length <= kMaxUniformKernelSize) { + // No bitmap is needed to store the kernel on the GPU + *innerGain = 1.f; + *innerBias = 0.f; + return {}; + } + + // The convolution kernel is "big". The SVG spec has no upper limit on what's supported so + // store the kernel in a SkBitmap that will be uploaded to a data texture. We could + // implement a more straight forward evaluation loop for the CPU backend, but kernels of + // this size are already going to be very slow so we accept the extra indirection to + // keep the code paths consolidated. + // + // We store the data in A8 for universal support, but this requires normalizing the values + // and adding an extra inner bias operation to the shader. We could store values in A16 or + // A32 for improved accuracy but that would require querying GPU capabilities, which + // prevents creating the bitmap once during initialization. Even on the GPU, kernels larger + // than 5x5 quickly exceed realtime capabilities, so the loss of precision isn't a great + // concern either. + float min = kernel[0]; + float max = kernel[0]; + for (int i = 1; i < length; ++i) { + if (kernel[i] < min) { + min = kernel[i]; + } + if (kernel[i] > max) { + max = kernel[i]; + } + } + + *innerGain = max - min; + *innerBias = min; + // Treat a near-0 gain (i.e. box blur) as 1 and let innerBias move everything to final value. + if (SkScalarNearlyZero(*innerGain)) { + *innerGain = 1.f; + } + + SkBitmap kernelBM; + if (!kernelBM.tryAllocPixels(SkImageInfo::Make(kernelSize, + kAlpha_8_SkColorType, + kPremul_SkAlphaType))) { + // OOM so return an empty bitmap, which will be detected later on in onFilterImage(). + return {}; + } + + for (int y = 0; y < kernelSize.fHeight; ++y) { + for (int x = 0; x < kernelSize.fWidth; ++x) { + int i = y * kernelSize.fWidth + x; + *kernelBM.getAddr8(x, y) = SkScalarRoundToInt(255 * (kernel[i] - min) / *innerGain); + } + } + + kernelBM.setImmutable(); + return kernelBM; +} + +} // end namespace + +sk_sp SkImageFilters::MatrixConvolution(const SkISize& kernelSize, + const SkScalar kernel[], + SkScalar gain, + SkScalar bias, + const SkIPoint& kernelOffset, + SkTileMode tileMode, + bool convolveAlpha, + sk_sp input, + const CropRect& cropRect) { + if (kernelSize.width() < 1 || kernelSize.height() < 1) { + return nullptr; + } + if (kernelSize.width() > kMaxKernelDimension || kernelSize.height() > kMaxKernelDimension) { + return nullptr; + } + if (!kernel) { + return nullptr; + } + if ((kernelOffset.fX < 0) || (kernelOffset.fX >= kernelSize.fWidth) || + (kernelOffset.fY < 0) || (kernelOffset.fY >= kernelSize.fHeight)) { + return nullptr; + } + + // The 'tileMode' behavior is not well-defined if there is no crop, so we only apply it if + // there is a provided 'cropRect'. + sk_sp filter = std::move(input); + if (cropRect && tileMode != SkTileMode::kDecal) { + // Historically the input image was restricted to the cropRect when tiling was not kDecal + // so that the kernel evaluated the tiled edge conditions, while a kDecal crop only affected + // the output. + filter = SkMakeCropImageFilter(*cropRect, tileMode, std::move(filter)); + } + filter = sk_sp(new SkMatrixConvolutionImageFilter( + kernelSize, kernel, gain, bias, kernelOffset, convolveAlpha, std::move(filter))); + if (cropRect) { + // But regardless of the tileMode, the output is decal cropped. + filter = SkMakeCropImageFilter(*cropRect, SkTileMode::kDecal, std::move(filter)); + } + return filter; +} + +void SkRegisterMatrixConvolutionImageFilterFlattenable() { + SK_REGISTER_FLATTENABLE(SkMatrixConvolutionImageFilter); + // TODO (michaelludwig) - Remove after grace period for SKPs to stop using old name + SkFlattenable::Register("SkMatrixConvolutionImageFilterImpl", + SkMatrixConvolutionImageFilter::CreateProc); +} + +sk_sp SkMatrixConvolutionImageFilter::CreateProc(SkReadBuffer& buffer) { + SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1); + + SkISize kernelSize; + kernelSize.fWidth = buffer.readInt(); + kernelSize.fHeight = buffer.readInt(); + const int count = buffer.getArrayCount(); + + const int64_t kernelArea = sk_64_mul(kernelSize.width(), kernelSize.height()); + if (!buffer.validate(kernelArea == count)) { + return nullptr; + } + if (!buffer.validateCanReadN(count)) { + return nullptr; + } + AutoSTArray<16, SkScalar> kernel(count); + if (!buffer.readScalarArray(kernel.get(), count)) { + return nullptr; + } + SkScalar gain = buffer.readScalar(); + SkScalar bias = buffer.readScalar(); + SkIPoint kernelOffset; + kernelOffset.fX = buffer.readInt(); + kernelOffset.fY = buffer.readInt(); + + SkTileMode tileMode = SkTileMode::kDecal; + if (buffer.isVersionLT(SkPicturePriv::kConvolutionImageFilterTilingUpdate)) { + tileMode = buffer.read32LE(SkTileMode::kLastTileMode); + } // else SkCropImageFilter handles the tile mode (if any) + + bool convolveAlpha = buffer.readBool(); + + if (!buffer.isValid()) { + return nullptr; + } + // NOTE: For SKPs with version >= kConvolutionImageFilterTilingUpdate, tileMode will be kDecal + // and common.cropRect() will be null (so the factory also ignores tileMode). Any + // cropping/tiling will have been handled by the deserialized input/output Crop image filters. + return SkImageFilters::MatrixConvolution( + kernelSize, kernel.get(), gain, bias, kernelOffset, tileMode, + convolveAlpha, common.getInput(0), common.cropRect()); +} + +void SkMatrixConvolutionImageFilter::flatten(SkWriteBuffer& buffer) const { + this->SkImageFilter_Base::flatten(buffer); + buffer.writeInt(fKernelSize.width()); + buffer.writeInt(fKernelSize.height()); + buffer.writeScalarArray(fKernel.data(), fKernel.size()); + buffer.writeScalar(fGain); + buffer.writeScalar(fBias); + buffer.writeInt(fKernelOffset.x()); + buffer.writeInt(fKernelOffset.y()); + buffer.writeBool(fConvolveAlpha); +} + +/////////////////////////////////////////////////////////////////////////////////////////////////// + +skif::LayerSpace SkMatrixConvolutionImageFilter::boundsSampledByKernel( + const skif::LayerSpace& bounds) const { + return adjust(bounds, + -fKernelOffset.x(), + -fKernelOffset.y(), + fKernelSize.width() - fKernelOffset.x() - 1, + fKernelSize.height() - fKernelOffset.y() - 1); +} + +skif::LayerSpace SkMatrixConvolutionImageFilter::boundsAffectedByKernel( + const skif::LayerSpace& bounds) const { + return adjust(bounds, + fKernelOffset.x() - fKernelSize.width() + 1, + fKernelOffset.y() - fKernelSize.height() + 1, + fKernelOffset.x(), + fKernelOffset.y()); +} + +// There are two shader variants: a small kernel version that stores the matrix in uniforms +// and iterates in 1D (selected when texWidth==0 & texHeight==0); and a large kernel version +// that stores the matrix in a texture. The 2D texture kernel shader still uses constant-length +// for loops (up to the texWidth and texHeight passed in); the actual kernel size is uploaded +// as a uniform, allowing the shaders to be quantized. +static sk_sp get_runtime_effect(int texWidth, int texHeight) { + // While the loop structure and uniforms are different, pieces of the algorithm are common and + // defined statically for re-use in the two shaders: + static const char* kHeaderSkSL = + "uniform int2 size;" + "uniform int2 offset;" + "uniform half2 gainAndBias;" + "uniform int convolveAlpha;" // FIXME not a full int? + + "uniform shader child;" + + "half4 main(float2 coord) {" + "half4 sum = half4(0);" + "half origAlpha = 0;"; + + // Used in the inner loop to accumulate convolution sum + static const char* kAccumulateSkSL = + "half4 c = child.eval(coord + half2(kernelPos) - half2(offset));" + "if (convolveAlpha == 0) {" + // When not convolving alpha, remember the original alpha for actual sample + // coord, and perform accumulation on unpremul colors. + "if (kernelPos == offset) {" + "origAlpha = c.a;" + "}" + "c = unpremul(c);" + "}" + "sum += c*k;"; + + // Used after the loop to calculate final color + static const char* kFooterSkSL = + "half4 color = sum*gainAndBias.x + gainAndBias.y;" + "if (convolveAlpha == 0) {" + // Reset the alpha to the original and convert to premul RGB + "color = half4(color.rgb*origAlpha, origAlpha);" + "} else {" + // Ensure convolved alpha is within [0, 1] + "color.a = saturate(color.a);" + "}" + // Make RGB valid premul w/ respect to the alpha (either original or convolved) + "color.rgb = clamp(color.rgb, 0, color.a);" + "return color;" + "}"; + + // The uniform array storing the kernel is packed into half4's so that we don't waste space + // forcing array elements out to 16-byte alignment when using std140. + static_assert(kMaxUniformKernelSize % 4 == 0, "Must be a multiple of 4"); + static SkRuntimeEffect* uniformEffect = SkMakeRuntimeEffect(SkRuntimeEffect::MakeForShader, + SkStringPrintf("const int kMaxUniformKernelSize = %d / 4;" + "uniform half4 kernel[kMaxUniformKernelSize];" + "%s" // kHeaderSkSL + "int2 kernelPos = int2(0);" + "for (int i = 0; i < kMaxUniformKernelSize; ++i) {" + "if (kernelPos.y >= size.y) { break; }" + + "half4 k4 = kernel[i];" + "for (int j = 0; j < 4; ++j) {" + "if (kernelPos.y >= size.y) { break; }" + "half k = k4[j];" + "%s" // kAccumulateSkSL + + // The 1D index has to be "constant", so reconstruct 2D coords + // instead of a more conventional double for-loop and i=y*w+x + "kernelPos.x += 1;" + "if (kernelPos.x >= size.x) {" + "kernelPos.x = 0;" + "kernelPos.y += 1;" + "}" + "}" + "}" + "%s", // kFooterSkSL + kMaxUniformKernelSize, kHeaderSkSL, kAccumulateSkSL, kFooterSkSL).c_str()); + + // The texture-backed kernel creates shaders with quantized upper bounds on the kernel size and + // then stored in a thread-safe LRU cache. + static SkMutex cacheLock; + static SkLRUCache> + textureShaderCache SK_GUARDED_BY(cacheLock) {/*maxCount=*/5}; + static const auto makeTextureEffect = [](SkISize maxKernelSize) { + return SkMakeRuntimeEffect(SkRuntimeEffect::MakeForShader, + SkStringPrintf("const int kMaxKernelWidth = %d;" + "const int kMaxKernelHeight = %d;" + "uniform shader kernel;" + "uniform half2 innerGainAndBias;" + "%s" // kHeaderSkSL + "for (int y = 0; y < kMaxKernelHeight; ++y) {" + "if (y >= size.y) { break; }" + "for (int x = 0; x < kMaxKernelWidth; ++x) {" + "if (x >= size.x) { break; }" + + "int2 kernelPos = int2(x,y);" + "half k = kernel.eval(half2(kernelPos) + 0.5).a;" + "k = k * innerGainAndBias.x + innerGainAndBias.y;" + "%s" // kAccumulateSkSL + "}" + "}" + "%s", // kFooterSkSL + maxKernelSize.fWidth, maxKernelSize.fHeight, + kHeaderSkSL, kAccumulateSkSL, kFooterSkSL).c_str()); + }; + + + if (texWidth == 0 && texHeight == 0) { + return sk_ref_sp(uniformEffect); + } else { + static_assert((kMaxKernelDimension & (kMaxKernelDimension - 1)) == 0, + "kMaxKernelDimension must be power of two"); + SkASSERT(texWidth <= kMaxKernelDimension && texHeight <= kMaxKernelDimension); + const SkISize key = {SkNextPow2(texWidth), SkNextPow2(texHeight)}; + + SkAutoMutexExclusive acquire{cacheLock}; + sk_sp* effect = textureShaderCache.find(key); + if (!effect) { + // Adopt the raw pointer returned by makeTextureEffect so that it will be deleted if + // it's removed from the LRU cache. + sk_sp newEffect{makeTextureEffect(key)}; + effect = textureShaderCache.insert(key, std::move(newEffect)); + } + + return *effect; + } +} + +sk_sp SkMatrixConvolutionImageFilter::createShader(const skif::Context& ctx, + sk_sp input) const { + const int kernelLength = fKernelSize.width() * fKernelSize.height(); + const bool useTextureShader = kernelLength > kMaxUniformKernelSize; + if (useTextureShader && fKernelBitmap.empty()) { + return nullptr; // No actual kernel data to work with from a prior OOM + } + + auto effect = get_runtime_effect(useTextureShader ? fKernelSize.width() : 0, + useTextureShader ? fKernelSize.height() : 0); + SkRuntimeShaderBuilder builder(std::move(effect)); + builder.child("child") = std::move(input); + + if (useTextureShader) { + sk_sp cachedKernel = ctx.getCachedBitmap(fKernelBitmap); + if (!cachedKernel) { + return nullptr; + } + builder.child("kernel") = cachedKernel->makeRawShader(SkFilterMode::kNearest); + builder.uniform("innerGainAndBias") = SkV2{fInnerGain, fInnerBias}; + } else { + float paddedKernel[kMaxUniformKernelSize]; + memcpy(paddedKernel, fKernel.data(), kernelLength*sizeof(float)); + memset(paddedKernel+kernelLength, 0, (kMaxUniformKernelSize - kernelLength)*sizeof(float)); + + builder.uniform("kernel").set(paddedKernel, kMaxUniformKernelSize); + } + + builder.uniform("size") = SkISize(fKernelSize); + builder.uniform("offset") = skif::IVector(fKernelOffset); + // Scale the user-provided bias by 1/255 to match the [0,1] color channel range + builder.uniform("gainAndBias") = SkV2{fGain, fBias / 255.f}; + builder.uniform("convolveAlpha") = fConvolveAlpha ? 1 : 0; + + return builder.makeShader(); +} + +skif::FilterResult SkMatrixConvolutionImageFilter::onFilterImage( + const skif::Context& context) const { + using ShaderFlags = skif::FilterResult::ShaderFlags; + + skif::LayerSpace requiredInput = this->boundsSampledByKernel(context.desiredOutput()); + skif::FilterResult childOutput = + this->getChildOutput(0, context.withNewDesiredOutput(requiredInput)); + + skif::LayerSpace outputBounds; + if (fConvolveAlpha && fBias != 0.f) { + // The convolution will produce a non-trivial value for every pixel so fill desired output. + outputBounds = context.desiredOutput(); + } else { + // Calculate the possible extent of the convolution given what was actually produced by the + // child filter and then intersect that with the desired output. + outputBounds = this->boundsAffectedByKernel(childOutput.layerBounds()); + if (!outputBounds.intersect(context.desiredOutput())) { + return {}; + } + } + + skif::FilterResult::Builder builder{context}; + builder.add(childOutput, + this->boundsSampledByKernel(outputBounds), + ShaderFlags::kSampledRepeatedly); + return builder.eval([&](SkSpan> inputs) { + return this->createShader(context, inputs[0]); + }, outputBounds); +} + +skif::LayerSpace SkMatrixConvolutionImageFilter::onGetInputLayerBounds( + const skif::Mapping& mapping, + const skif::LayerSpace& desiredOutput, + const skif::LayerSpace& contentBounds) const { + // Adjust the desired output bounds by the kernel size to avoid evaluating edge conditions, and + // then recurse to the child filter. + skif::LayerSpace requiredInput = this->boundsSampledByKernel(desiredOutput); + return this->getChildInputLayerBounds(0, mapping, requiredInput, contentBounds); +} + +skif::LayerSpace SkMatrixConvolutionImageFilter::onGetOutputLayerBounds( + const skif::Mapping& mapping, + const skif::LayerSpace& contentBounds) const { + if (fConvolveAlpha && fBias != 0.f) { + // Applying the kernel as a convolution to fully transparent black will result in 0 for + // each channel, unless the bias itself shifts this "zero-point". However, when the alpha + // channel is not convolved, the original a=0 is preserved and producing a premul color + // discards the non-zero bias. Convolving the alpha channel and a non-zero bias can mean + // the transparent black pixels outside of any input image become non-transparent black. + return skif::LayerSpace(SkRectPriv::MakeILarge()); + } + + // Otherwise apply the kernel to the output bounds of the child filter. + skif::LayerSpace outputBounds = + this->getChildOutputLayerBounds(0, mapping, contentBounds); + return this->boundsAffectedByKernel(outputBounds); +} + +SkRect SkMatrixConvolutionImageFilter::computeFastBounds(const SkRect& bounds) const { + // See onAffectsTransparentBlack(), but without knowing the local-to-device transform, we don't + // know how many pixels will be sampled by the kernel. Return unbounded to match the + // expectations of an image filter that "affects" transparent black. + return SkRectPriv::MakeLargeS32(); +} + +#else + +// The matrix convolution effect requires SkSL, just return the input, possibly cropped +sk_sp SkImageFilters::MatrixConvolution(const SkISize& kernelSize, + const SkScalar kernel[], + SkScalar gain, + SkScalar bias, + const SkIPoint& kernelOffset, + SkTileMode tileMode, + bool convolveAlpha, + sk_sp input, + const CropRect& cropRect) { + return cropRect ? SkMakeCropImageFilter(*cropRect, std::move(input)) : input; +} + +void SkRegisterMatrixConvolutionImageFilterFlattenable() {} + +#endif + +#endif // SK_USE_LEGACY_CONVOLUTION_IMAGEFILTER diff --git a/src/effects/imagefilters/SkMergeImageFilter.cpp b/src/effects/imagefilters/SkMergeImageFilter.cpp index d1314862086f..206efe4577fd 100644 --- a/src/effects/imagefilters/SkMergeImageFilter.cpp +++ b/src/effects/imagefilters/SkMergeImageFilter.cpp @@ -94,12 +94,11 @@ skif::LayerSpace SkMergeImageFilter::onGetInputLayerBounds( return skif::LayerSpace::Empty(); } else { // Union of all child input bounds so that one source image can provide for all of them. - skif::LayerSpace merged = - this->getChildInputLayerBounds(0, mapping, desiredOutput, contentBounds); - for (int i = 1; i < inputCount; ++i) { - merged.join(this->getChildInputLayerBounds(i, mapping, desiredOutput, contentBounds)); - } - return merged; + return skif::LayerSpace::Union( + inputCount, + [&](int i) { + return this->getChildInputLayerBounds(i, mapping, desiredOutput, contentBounds); + }); } } @@ -111,12 +110,9 @@ skif::LayerSpace SkMergeImageFilter::onGetOutputLayerBounds( return skif::LayerSpace::Empty(); // Transparent black } else { // Merge is src-over of all child outputs, so covers their union but no more - skif::LayerSpace merged = - this->getChildOutputLayerBounds(0, mapping, contentBounds); - for (int i = 1; i < inputCount; ++i) { - merged.join(this->getChildOutputLayerBounds(i, mapping, contentBounds)); - } - return merged; + return skif::LayerSpace::Union( + inputCount, + [&](int i) { return this->getChildOutputLayerBounds(i, mapping, contentBounds); }); } } diff --git a/src/effects/imagefilters/SkMorphologyImageFilter.cpp b/src/effects/imagefilters/SkMorphologyImageFilter.cpp index c822cd487475..5cc9871aa909 100644 --- a/src/effects/imagefilters/SkMorphologyImageFilter.cpp +++ b/src/effects/imagefilters/SkMorphologyImageFilter.cpp @@ -228,7 +228,7 @@ skif::FilterResult morphology_pass(const skif::Context& ctx, const skif::FilterR } // else the last iteration should output what was originally requested skif::FilterResult::Builder builder{stepCtx}; - builder.add(childOutput, sampleBounds); + builder.add(childOutput, sampleBounds, ShaderFlags::kSampledRepeatedly); childOutput = builder.eval( [&](SkSpan> inputs) { if (appliedRadius == 0) { @@ -236,7 +236,7 @@ skif::FilterResult morphology_pass(const skif::Context& ctx, const skif::FilterR } else { return make_sparse_morphology(inputs[0], type, dir, stepRadius); } - }, ShaderFlags::kForceResolveInputs); + }); sampleBounds = stepCtx.desiredOutput(); appliedRadius += stepRadius; diff --git a/src/effects/imagefilters/SkRuntimeImageFilter.cpp b/src/effects/imagefilters/SkRuntimeImageFilter.cpp index 665ea9a5edac..9a4f21e09f8c 100644 --- a/src/effects/imagefilters/SkRuntimeImageFilter.cpp +++ b/src/effects/imagefilters/SkRuntimeImageFilter.cpp @@ -246,7 +246,9 @@ skif::FilterResult SkRuntimeImageFilter::onFilterImage(const skif::Context& ctx) // Record the input context's desired output as the sample bounds for the child shaders // since the runtime shader can go up to max sample radius away from its desired output // (which is the default sample bounds if we didn't override it here). - builder.add(this->getChildOutput(i, inputCtx), inputCtx.desiredOutput()); + builder.add(this->getChildOutput(i, inputCtx), + inputCtx.desiredOutput(), + ShaderFlags::kNonTrivialSampling); } return builder.eval([&](SkSpan> inputs) { // lock the mutation of the builder and creation of the shader so that the builder's state @@ -265,7 +267,7 @@ skif::FilterResult SkRuntimeImageFilter::onFilterImage(const skif::Context& ctx) fRuntimeEffectLock.release(); return shader; - }, ShaderFlags::kSampleInParameterSpace | ShaderFlags::kNonLinearSampling); + }, {}, /*evaluateInParameterSpace=*/true); } skif::LayerSpace SkRuntimeImageFilter::onGetInputLayerBounds( @@ -281,12 +283,11 @@ skif::LayerSpace SkRuntimeImageFilter::onGetInputLayerBounds( this->applyMaxSampleRadius(mapping, desiredOutput); // Union of all child input bounds so that one source image can provide for all of them. - skif::LayerSpace merged = - this->getChildInputLayerBounds(0, mapping, requiredInput, contentBounds); - for (int i = 1; i < inputCount; ++i) { - merged.join(this->getChildInputLayerBounds(i, mapping, requiredInput, contentBounds)); - } - return merged; + return skif::LayerSpace::Union( + inputCount, + [&](int i) { + return this->getChildInputLayerBounds(i, mapping, requiredInput, contentBounds); + }); } } diff --git a/src/effects/imagefilters/SkTileImageFilter.cpp b/src/effects/imagefilters/SkTileImageFilter.cpp deleted file mode 100644 index 02e90d157626..000000000000 --- a/src/effects/imagefilters/SkTileImageFilter.cpp +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Copyright 2013 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#include "include/core/SkBlendMode.h" -#include "include/core/SkCanvas.h" -#include "include/core/SkColor.h" -#include "include/core/SkFlattenable.h" -#include "include/core/SkImageFilter.h" -#include "include/core/SkMatrix.h" -#include "include/core/SkPaint.h" -#include "include/core/SkPoint.h" -#include "include/core/SkRect.h" -#include "include/core/SkRefCnt.h" -#include "include/core/SkSamplingOptions.h" -#include "include/core/SkScalar.h" -#include "include/core/SkTileMode.h" -#include "include/core/SkTypes.h" -#include "include/effects/SkImageFilters.h" -#include "src/core/SkImageFilterTypes.h" -#include "src/core/SkImageFilter_Base.h" -#include "src/core/SkReadBuffer.h" -#include "src/core/SkSpecialImage.h" -#include "src/core/SkSpecialSurface.h" -#include "src/core/SkValidationUtils.h" -#include "src/core/SkWriteBuffer.h" - -#include - -namespace { - -class SkTileImageFilter final : public SkImageFilter_Base { -public: - SkTileImageFilter(const SkRect& srcRect, const SkRect& dstRect, sk_sp input) - : INHERITED(&input, 1, nullptr) - , fSrcRect(srcRect) - , fDstRect(dstRect) {} - - SkIRect onFilterBounds(const SkIRect& src, const SkMatrix& ctm, - MapDirection, const SkIRect* inputRect) const override; - SkIRect onFilterNodeBounds(const SkIRect&, const SkMatrix& ctm, - MapDirection, const SkIRect* inputRect) const override; - SkRect computeFastBounds(const SkRect& src) const override; - -protected: - void flatten(SkWriteBuffer& buffer) const override; - - sk_sp onFilterImage(const Context&, SkIPoint* offset) const override; - -private: - friend void ::SkRegisterTileImageFilterFlattenable(); - SK_FLATTENABLE_HOOKS(SkTileImageFilter) - - SkRect fSrcRect; - SkRect fDstRect; - - using INHERITED = SkImageFilter_Base; -}; - -} // end namespace - - -sk_sp SkImageFilters::Tile(const SkRect& src, - const SkRect& dst, - sk_sp input) { - if (!SkIsValidRect(src) || !SkIsValidRect(dst)) { - return nullptr; - } - if (src.width() == dst.width() && src.height() == dst.height()) { - SkRect ir = dst; - if (!ir.intersect(src)) { - return input; - } - return SkImageFilters::Offset(dst.x() - src.x(), dst.y() - src.y(), - std::move(input), &ir); - } - return sk_sp(new SkTileImageFilter(src, dst, std::move(input))); -} - -void SkRegisterTileImageFilterFlattenable() { - SK_REGISTER_FLATTENABLE(SkTileImageFilter); - // TODO (michaelludwig) - Remove after grace period for SKPs to stop using old name - SkFlattenable::Register("SkTileImageFilterImpl", SkTileImageFilter::CreateProc); -} - -sk_sp SkTileImageFilter::CreateProc(SkReadBuffer& buffer) { - SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1); - SkRect src, dst; - buffer.readRect(&src); - buffer.readRect(&dst); - return SkImageFilters::Tile(src, dst, common.getInput(0)); -} - -void SkTileImageFilter::flatten(SkWriteBuffer& buffer) const { - this->INHERITED::flatten(buffer); - buffer.writeRect(fSrcRect); - buffer.writeRect(fDstRect); -} - -/////////////////////////////////////////////////////////////////////////////////////////////////// - -sk_sp SkTileImageFilter::onFilterImage(const Context& ctx, - SkIPoint* offset) const { - SkIPoint inputOffset = SkIPoint::Make(0, 0); - sk_sp input(this->filterInput(0, ctx, &inputOffset)); - if (!input) { - return nullptr; - } - - SkRect dstRect; - ctx.ctm().mapRect(&dstRect, fDstRect); - if (!dstRect.intersect(SkRect::Make(ctx.clipBounds()))) { - return nullptr; - } - - const SkIRect dstIRect = skif::RoundOut(dstRect); - if (!fSrcRect.width() || !fSrcRect.height() || !dstIRect.width() || !dstIRect.height()) { - return nullptr; - } - - SkRect srcRect; - ctx.ctm().mapRect(&srcRect, fSrcRect); - SkIRect srcIRect = skif::RoundOut(srcRect); - srcIRect.offset(-inputOffset); - const SkIRect inputBounds = SkIRect::MakeWH(input->width(), input->height()); - - if (!SkIRect::Intersects(srcIRect, inputBounds)) { - return nullptr; - } - - sk_sp subset; - if (inputBounds.contains(srcIRect)) { - subset = input->makeSubset(srcIRect); - } else { - // The input image doesn't fully cover srcIRect so using it directly would not tile - // appropriately. Instead draw to a srcIRect sized surface so that any padded transparency - // is present for the correct tiling. - sk_sp surf = ctx.makeSurface(srcIRect.size()); - if (!surf) { - return nullptr; - } - - SkCanvas* canvas = surf->getCanvas(); - SkASSERT(canvas); - canvas->clear(SK_ColorTRANSPARENT); // GPU surfaces are uninitialized - - SkPaint paint; - paint.setBlendMode(SkBlendMode::kSrc); - - input->draw(canvas, - SkIntToScalar(inputOffset.x()), SkIntToScalar(inputOffset.y()), - SkSamplingOptions(), &paint); - - subset = surf->makeImageSnapshot(); - } - if (!subset) { - return nullptr; - } - SkASSERT(subset->width() == srcIRect.width()); - SkASSERT(subset->height() == srcIRect.height()); - - sk_sp surf(ctx.makeSurface(dstIRect.size())); - if (!surf) { - return nullptr; - } - - SkCanvas* canvas = surf->getCanvas(); - SkASSERT(canvas); - - SkPaint paint; - paint.setBlendMode(SkBlendMode::kSrc); - paint.setShader(subset->asShader(SkTileMode::kRepeat, SkSamplingOptions(), SkMatrix::I())); - canvas->translate(-dstRect.fLeft, -dstRect.fTop); - canvas->drawRect(dstRect, paint); - offset->fX = dstIRect.fLeft; - offset->fY = dstIRect.fTop; - return surf->makeImageSnapshot(); -} - -SkIRect SkTileImageFilter::onFilterNodeBounds( - const SkIRect& src, const SkMatrix& ctm, MapDirection dir, const SkIRect* inputRect) const { - SkRect rect = kReverse_MapDirection == dir ? fSrcRect : fDstRect; - ctm.mapRect(&rect); - return rect.roundOut(); -} - -SkIRect SkTileImageFilter::onFilterBounds(const SkIRect& src, const SkMatrix&, - MapDirection, const SkIRect* inputRect) const { - // Don't recurse into inputs. - return src; -} - -SkRect SkTileImageFilter::computeFastBounds(const SkRect& src) const { - return fDstRect; -} diff --git a/src/encode/SkICC.cpp b/src/encode/SkICC.cpp index 7163563d61cd..e3e758c59b55 100644 --- a/src/encode/SkICC.cpp +++ b/src/encode/SkICC.cpp @@ -10,13 +10,13 @@ #include "include/core/SkColorSpace.h" #include "include/core/SkData.h" #include "include/core/SkStream.h" +#include "include/core/SkString.h" #include "include/core/SkTypes.h" #include "include/private/base/SkFixed.h" #include "include/private/base/SkFloatingPoint.h" #include "modules/skcms/skcms.h" #include "src/base/SkAutoMalloc.h" #include "src/base/SkEndian.h" -#include "src/base/SkUtils.h" #include "src/core/SkMD5.h" #include "src/encode/SkICCPriv.h" @@ -264,13 +264,7 @@ static std::string get_desc_string(const skcms_TransferFunction& fn, md5.write(&toXYZD50, sizeof(toXYZD50)); md5.write(&fn, sizeof(fn)); SkMD5::Digest digest = md5.finish(); - std::string md5_hexstring(2 * sizeof(SkMD5::Digest), ' '); - for (unsigned i = 0; i < sizeof(SkMD5::Digest); ++i) { - uint8_t byte = digest.data[i]; - md5_hexstring[2 * i + 0] = SkHexadecimalDigits::gUpper[byte >> 4]; - md5_hexstring[2 * i + 1] = SkHexadecimalDigits::gUpper[byte & 0xF]; - } - return "Google/Skia/" + md5_hexstring; + return std::string("Google/Skia/") + digest.toHexString().c_str(); } static sk_sp write_text_tag(const char* text) { diff --git a/src/gpu/AsyncReadTypes.h b/src/gpu/AsyncReadTypes.h index 8bf57327c04f..87536be47abf 100644 --- a/src/gpu/AsyncReadTypes.h +++ b/src/gpu/AsyncReadTypes.h @@ -216,7 +216,7 @@ class TAsyncReadResult : public SkImage::AsyncReadResult { sk_sp fMappedBuffer; size_t fRowBytes; }; - skia_private::STArray<3, Plane> fPlanes; + skia_private::STArray<4, Plane> fPlanes; IDType fIntendedRecipient; }; diff --git a/src/gpu/AtlasTypes.h b/src/gpu/AtlasTypes.h index aa78b6f4cccb..4b44de075587 100644 --- a/src/gpu/AtlasTypes.h +++ b/src/gpu/AtlasTypes.h @@ -22,7 +22,7 @@ class GrOpFlushState; class TestingUploadTarget; -namespace skgpu::graphite { class AtlasManager; } +namespace skgpu::graphite { class TextAtlasManager; } /** * This file includes internal types that are used by all of our gpu backends for atlases. @@ -33,25 +33,25 @@ namespace skgpu { struct IRect16 { int16_t fLeft, fTop, fRight, fBottom; - static IRect16 SK_WARN_UNUSED_RESULT MakeEmpty() { + [[nodiscard]] static IRect16 MakeEmpty() { IRect16 r; r.setEmpty(); return r; } - static IRect16 SK_WARN_UNUSED_RESULT MakeWH(int16_t w, int16_t h) { + [[nodiscard]] static IRect16 MakeWH(int16_t w, int16_t h) { IRect16 r; r.set(0, 0, w, h); return r; } - static IRect16 SK_WARN_UNUSED_RESULT MakeXYWH(int16_t x, int16_t y, int16_t w, int16_t h) { + [[nodiscard]] static IRect16 MakeXYWH(int16_t x, int16_t y, int16_t w, int16_t h) { IRect16 r; r.set(x, y, x + w, y + h); return r; } - static IRect16 SK_WARN_UNUSED_RESULT Make(const SkIRect& ir) { + [[nodiscard]] static IRect16 Make(const SkIRect& ir) { IRect16 r; r.set(ir); return r; @@ -211,7 +211,7 @@ class TokenTracker { // Only these classes get to increment the token counters friend class ::GrOpFlushState; friend class ::TestingUploadTarget; - friend class skgpu::graphite::AtlasManager; + friend class skgpu::graphite::TextAtlasManager; // Issues the next token for a draw. AtlasToken issueDrawToken() { return ++fCurrentDrawToken; } diff --git a/src/gpu/BUILD.bazel b/src/gpu/BUILD.bazel index e6a4ee0d920d..d5bb28ba29a1 100644 --- a/src/gpu/BUILD.bazel +++ b/src/gpu/BUILD.bazel @@ -43,7 +43,6 @@ split_srcs_and_hdrs( ) CORE_FILES = [ - "GrAHardwareBufferUtils.h", "ShaderErrorHandler.cpp", "SkRenderEngineAbortf.h", ] @@ -57,10 +56,13 @@ string_flag_with_values( name = "gpu_backend", multiple = True, values = [ - "gl_backend", - "vulkan_backend", - "dawn_backend", - "metal_backend", + "dawn_ganesh", + "gl_ganesh", + "metal_ganesh", + "vulkan_ganesh", + "dawn_graphite", + "metal_graphite", + "vulkan_graphite", ], ) @@ -74,12 +76,22 @@ string_flag_with_values( ) selects.config_setting_group( - name = "has_gpu_backend", + name = "has_ganesh_backend", match_any = [ - ":gl_backend", - ":dawn_backend", - ":vulkan_backend", - ":metal_backend", + ":dawn_ganesh", + ":gl_ganesh", + ":metal_ganesh", + ":vulkan_ganesh", + ], + visibility = ["//:__subpackages__"], +) + +selects.config_setting_group( + name = "has_graphite_backend", + match_any = [ + ":dawn_graphite", + ":metal_graphite", + ":vulkan_graphite", ], visibility = ["//:__subpackages__"], ) @@ -87,7 +99,7 @@ selects.config_setting_group( selects.config_setting_group( name = "vulkan_with_vma", match_all = [ - ":vulkan_backend", + ":vulkan_ganesh", ":use_vulkan_memory_allocator_true", ], visibility = ["//:__subpackages__"], @@ -104,6 +116,30 @@ bool_flag( default = False, ) +selects.config_setting_group( + name = "has_dawn", + match_any = [ + ":dawn_ganesh", + ":dawn_graphite", + ], +) + +selects.config_setting_group( + name = "has_metal", + match_any = [ + ":metal_ganesh", + ":metal_graphite", + ], +) + +selects.config_setting_group( + name = "has_vulkan", + match_any = [ + ":vulkan_ganesh", + ":vulkan_graphite", + ], +) + skia_filegroup( name = "srcs", srcs = [ @@ -113,8 +149,8 @@ skia_filegroup( "//src/gpu/tessellate:srcs", ] + select_multi( { - "//src/gpu:dawn_backend": ["//src/gpu/dawn:srcs"], - "//src/gpu:vulkan_backend": ["//src/gpu/vk:srcs"], + ":has_dawn": ["//src/gpu/dawn:srcs"], + ":has_vulkan": ["//src/gpu/vk:srcs"], }, ), visibility = ["//src:__pkg__"], @@ -138,9 +174,9 @@ skia_filegroup( "//src/gpu/tessellate:private_hdrs", ] + select_multi( { - "//src/gpu:dawn_backend": ["//src/gpu/dawn:private_hdrs"], - "//src/gpu:vulkan_backend": ["//src/gpu/vk:private_hdrs"], - "//src/gpu:metal_backend": ["//src/gpu/mtl:private_hdrs"], + ":has_dawn": ["//src/gpu/dawn:private_hdrs"], + ":has_vulkan": ["//src/gpu/vk:private_hdrs"], + ":has_metal": ["//src/gpu/mtl:private_hdrs"], }, ), visibility = ["//src:__pkg__"], @@ -153,7 +189,7 @@ skia_cc_deps( "//src/gpu/ganesh:deps", ] + select_multi( { - "//src/gpu:vulkan_backend": ["//src/gpu/vk:deps"], + ":has_vulkan": ["//src/gpu/vk:deps"], }, ), ) diff --git a/src/gpu/GrAHardwareBufferUtils.h b/src/gpu/GrAHardwareBufferUtils.h deleted file mode 100644 index 740a95258f0c..000000000000 --- a/src/gpu/GrAHardwareBufferUtils.h +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Copyright 2019 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -// TODO: Once we can get Android to use the ganesh version of the file we can remove this one. At -// that time we should also rename the ganesh file to drop the _impl. -#include "src/gpu/ganesh/GrAHardwareBufferUtils_impl.h" - diff --git a/src/gpu/TiledTextureUtils.cpp b/src/gpu/TiledTextureUtils.cpp index 7026b192cea6..47a0c518ee74 100644 --- a/src/gpu/TiledTextureUtils.cpp +++ b/src/gpu/TiledTextureUtils.cpp @@ -14,12 +14,26 @@ #include "include/core/SkSamplingOptions.h" #include "include/core/SkSize.h" #include "src/base/SkSafeMath.h" +#include "src/core/SkCanvasPriv.h" #include "src/core/SkDevice.h" #include "src/core/SkImagePriv.h" #include "src/core/SkSamplingPriv.h" +#include "src/image/SkImage_Base.h" + +#if defined(SK_GANESH) +#include "include/gpu/GrDirectContext.h" +#endif + +#if defined(SK_GRAPHITE) +#include "src/gpu/graphite/Caps.h" +#include "src/gpu/graphite/RecorderPriv.h" +#endif #if GR_TEST_UTILS -std::atomic gNumTilesDrawn{0}; +// GrContextOptions::fMaxTextureSizeOverride exists but doesn't allow for changing the +// maxTextureSize on the fly. +int gOverrideMaxTextureSize = 0; +std::atomic gNumTilesDrawn{0}; #endif ////////////////////////////////////////////////////////////////////////////// @@ -84,104 +98,16 @@ SkIRect determine_clipped_src_rect(SkIRect clippedSrcIRect, return clippedSrcIRect; } -// This method outsets 'iRect' by 'outset' all around and then clamps its extents to -// 'clamp'. 'offset' is adjusted to remain positioned over the top-left corner -// of 'iRect' for all possible outsets/clamps. -void clamped_outset_with_offset(SkIRect* iRect, int outset, SkPoint* offset, - const SkIRect& clamp) { - iRect->outset(outset, outset); - - int leftClampDelta = clamp.fLeft - iRect->fLeft; - if (leftClampDelta > 0) { - offset->fX -= outset - leftClampDelta; - iRect->fLeft = clamp.fLeft; - } else { - offset->fX -= outset; - } - - int topClampDelta = clamp.fTop - iRect->fTop; - if (topClampDelta > 0) { - offset->fY -= outset - topClampDelta; - iRect->fTop = clamp.fTop; - } else { - offset->fY -= outset; - } - - if (iRect->fRight > clamp.fRight) { - iRect->fRight = clamp.fRight; - } - if (iRect->fBottom > clamp.fBottom) { - iRect->fBottom = clamp.fBottom; - } -} - -} // anonymous namespace - -namespace skgpu { - -// tileSize and clippedSubset are valid if true is returned -bool TiledTextureUtils::ShouldTileImage(SkIRect conservativeClipBounds, - const SkISize& imageSize, - const SkMatrix& ctm, - const SkMatrix& srcToDst, - const SkRect* src, - int maxTileSize, - size_t cacheSize, - int* tileSize, - SkIRect* clippedSubset) { - // if it's larger than the max tile size, then we have no choice but tiling. - if (imageSize.width() > maxTileSize || imageSize.height() > maxTileSize) { - *clippedSubset = determine_clipped_src_rect(conservativeClipBounds, ctm, - srcToDst, imageSize, src); - *tileSize = determine_tile_size(*clippedSubset, maxTileSize); - return true; - } - - // If the image would only produce 4 tiles of the smaller size, don't bother tiling it. - const size_t area = imageSize.width() * imageSize.height(); - if (area < 4 * kBmpSmallTileSize * kBmpSmallTileSize) { - return false; - } - - // At this point we know we could do the draw by uploading the entire bitmap as a texture. - // However, if the texture would be large compared to the cache size and we don't require most - // of it for this draw then tile to reduce the amount of upload and cache spill. - if (!cacheSize) { - // We don't have access to the cacheSize so we will just upload the entire image - // to be on the safe side and not tile. - return false; - } - - // An assumption here is that sw bitmap size is a good proxy for its size as a texture - size_t bmpSize = area * sizeof(SkPMColor); // assume 32bit pixels - if (bmpSize < cacheSize / 2) { - return false; - } - - // Figure out how much of the src we will need based on the src rect and clipping. Reject if - // tiling memory savings would be < 50%. - *clippedSubset = determine_clipped_src_rect(conservativeClipBounds, ctm, - srcToDst, imageSize, src); - *tileSize = kBmpSmallTileSize; // already know whole bitmap fits in one max sized tile. - size_t usedTileBytes = get_tile_count(*clippedSubset, kBmpSmallTileSize) * - kBmpSmallTileSize * kBmpSmallTileSize * - sizeof(SkPMColor); // assume 32bit pixels; - - return usedTileBytes * 2 < bmpSize; -} - -void TiledTextureUtils::DrawTiledBitmap(SkBaseDevice* device, - const SkBitmap& bitmap, - int tileSize, - const SkMatrix& srcToDst, - const SkRect& srcRect, - const SkIRect& clippedSrcIRect, - const SkPaint& paint, - SkCanvas::QuadAAFlags origAAFlags, - const SkMatrix& localToDevice, - SkCanvas::SrcRectConstraint constraint, - SkSamplingOptions sampling, - SkTileMode tileMode) { +void draw_tiled_bitmap(SkCanvas* canvas, + const SkBitmap& bitmap, + int tileSize, + const SkMatrix& srcToDst, + const SkRect& srcRect, + const SkIRect& clippedSrcIRect, + const SkPaint* paint, + SkCanvas::QuadAAFlags origAAFlags, + SkCanvas::SrcRectConstraint constraint, + SkSamplingOptions sampling) { if (sampling.isAniso()) { sampling = SkSamplingPriv::AnisoFallback(/* imageIsMipped= */ false); } @@ -194,6 +120,8 @@ void TiledTextureUtils::DrawTiledBitmap(SkBaseDevice* device, gNumTilesDrawn.store(0, std::memory_order_relaxed); #endif + skia_private::TArray imgSet(nx * ny); + for (int x = 0; x <= nx; x++) { for (int y = 0; y <= ny; y++) { SkRect tileR; @@ -231,7 +159,8 @@ void TiledTextureUtils::DrawTiledBitmap(SkBaseDevice* device, srcRect.roundOut(&iClampRect); } int outset = sampling.useCubic ? kBicubicFilterTexelPad : 1; - clamped_outset_with_offset(&iTileR, outset, &offset, iClampRect); + skgpu::TiledTextureUtils::ClampedOutsetWithOffset(&iTileR, outset, &offset, + iClampRect); } // We must subset as a bitmap and then turn it into an SkImage if we want caching to @@ -256,25 +185,20 @@ void TiledTextureUtils::DrawTiledBitmap(SkBaseDevice* device, aaFlags |= SkCanvas::kTop_QuadAAFlag; } if (tileR.fBottom >= srcRect.fBottom && - (origAAFlags & SkCanvas::kBottom_QuadAAFlag)) { + (origAAFlags & SkCanvas::kBottom_QuadAAFlag)) { aaFlags |= SkCanvas::kBottom_QuadAAFlag; } - // now offset it to make it "local" to our tmp bitmap + // Offset the source rect to make it "local" to our tmp bitmap tileR.offset(-offset.fX, -offset.fY); - SkMatrix offsetSrcToDst = srcToDst; - offsetSrcToDst.preTranslate(offset.fX, offset.fY); - device->drawEdgeAAImage(image.get(), - tileR, - rectToDraw, - /* dstClip= */ nullptr, - static_cast(aaFlags), - localToDevice, - sampling, - paint, - constraint, - offsetSrcToDst, - tileMode); + + imgSet.push_back(SkCanvas::ImageSetEntry(std::move(image), + tileR, + rectToDraw, + /* matrixIndex= */ -1, + /* alpha= */ 1.0f, + aaFlags, + /* hasClip= */ false)); #if GR_TEST_UTILS (void)gNumTilesDrawn.fetch_add(+1, std::memory_order_relaxed); @@ -282,6 +206,110 @@ void TiledTextureUtils::DrawTiledBitmap(SkBaseDevice* device, } } } + + canvas->experimental_DrawEdgeAAImageSet(imgSet.data(), + imgSet.size(), + /* dstClips= */ nullptr, + /* preViewMatrices= */ nullptr, + sampling, + paint, + constraint); +} + +size_t get_cache_size(SkBaseDevice* device) { +#if defined(SK_GANESH) + if (auto dContext = GrAsDirectContext(device->recordingContext())) { + // NOTE: if the context is not a direct context, it doesn't have access to the resource + // cache, and theoretically, the resource cache's limits could be being changed on + // another thread, so even having access to just the limit wouldn't be a reliable + // test during recording here. + return dContext->getResourceCacheLimit(); + } +#endif + +#if defined(SK_GRAPHITE) + if (auto recorder = device->recorder()) { + // For Graphite this is a pretty loose heuristic. The Recorder-local cache size (relative + // to the large image's size) is used as a proxy for how conservative we should be when + // allocating tiles. Since the tiles will actually be owned by the client (via an + // ImageProvider) they won't actually add any memory pressure directly to Graphite. + return recorder->priv().getResourceCacheLimit(); + } +#endif + + return 0; +} + +int get_max_texture_size(SkCanvas* canvas) { +#if defined(SK_GANESH) + if (GrRecordingContext* rContext = canvas->recordingContext()) { + return rContext->maxTextureSize(); + } +#endif + +#if defined(SK_GRAPHITE) + if (auto recorder = canvas->recorder()) { + return recorder->priv().caps()->maxTextureSize(); + } +#endif + + static const int kFallbackMaxTextureSize = 1 << 22; + return kFallbackMaxTextureSize; // we should never get here +} + +} // anonymous namespace + +namespace skgpu { + +// tileSize and clippedSubset are valid if true is returned +bool TiledTextureUtils::ShouldTileImage(SkIRect conservativeClipBounds, + const SkISize& imageSize, + const SkMatrix& ctm, + const SkMatrix& srcToDst, + const SkRect* src, + int maxTileSize, + size_t cacheSize, + int* tileSize, + SkIRect* clippedSubset) { + // if it's larger than the max tile size, then we have no choice but tiling. + if (imageSize.width() > maxTileSize || imageSize.height() > maxTileSize) { + *clippedSubset = determine_clipped_src_rect(conservativeClipBounds, ctm, + srcToDst, imageSize, src); + *tileSize = determine_tile_size(*clippedSubset, maxTileSize); + return true; + } + + // If the image would only produce 4 tiles of the smaller size, don't bother tiling it. + const size_t area = imageSize.width() * imageSize.height(); + if (area < 4 * kBmpSmallTileSize * kBmpSmallTileSize) { + return false; + } + + // At this point we know we could do the draw by uploading the entire bitmap as a texture. + // However, if the texture would be large compared to the cache size and we don't require most + // of it for this draw then tile to reduce the amount of upload and cache spill. + if (!cacheSize) { + // We don't have access to the cacheSize so we will just upload the entire image + // to be on the safe side and not tile. + return false; + } + + // An assumption here is that sw bitmap size is a good proxy for its size as a texture + size_t bmpSize = area * sizeof(SkPMColor); // assume 32bit pixels + if (bmpSize < cacheSize / 2) { + return false; + } + + // Figure out how much of the src we will need based on the src rect and clipping. Reject if + // tiling memory savings would be < 50%. + *clippedSubset = determine_clipped_src_rect(conservativeClipBounds, ctm, + srcToDst, imageSize, src); + *tileSize = kBmpSmallTileSize; // already know whole bitmap fits in one max sized tile. + size_t usedTileBytes = get_tile_count(*clippedSubset, kBmpSmallTileSize) * + kBmpSmallTileSize * kBmpSmallTileSize * + sizeof(SkPMColor); // assume 32bit pixels; + + return usedTileBytes * 2 < bmpSize; } /** @@ -353,4 +381,126 @@ bool TiledTextureUtils::CanDisableMipmap(const SkMatrix& viewM, const SkMatrix& return matrix.getMinScale() >= SK_ScalarRoot2Over2; } + +// This method outsets 'iRect' by 'outset' all around and then clamps its extents to +// 'clamp'. 'offset' is adjusted to remain positioned over the top-left corner +// of 'iRect' for all possible outsets/clamps. +void TiledTextureUtils::ClampedOutsetWithOffset(SkIRect* iRect, int outset, SkPoint* offset, + const SkIRect& clamp) { + iRect->outset(outset, outset); + + int leftClampDelta = clamp.fLeft - iRect->fLeft; + if (leftClampDelta > 0) { + offset->fX -= outset - leftClampDelta; + iRect->fLeft = clamp.fLeft; + } else { + offset->fX -= outset; + } + + int topClampDelta = clamp.fTop - iRect->fTop; + if (topClampDelta > 0) { + offset->fY -= outset - topClampDelta; + iRect->fTop = clamp.fTop; + } else { + offset->fY -= outset; + } + + if (iRect->fRight > clamp.fRight) { + iRect->fRight = clamp.fRight; + } + if (iRect->fBottom > clamp.fBottom) { + iRect->fBottom = clamp.fBottom; + } +} + +bool TiledTextureUtils::DrawAsTiledImageRect(SkCanvas* canvas, + const SkImage* image, + const SkRect& srcRect, + const SkRect& dstRect, + SkCanvas::QuadAAFlags aaFlags, + const SkSamplingOptions& origSampling, + const SkPaint* paint, + SkCanvas::SrcRectConstraint constraint) { + if (canvas->isClipEmpty()) { + return true; + } + + if (!image->isTextureBacked()) { + SkRect src; + SkRect dst; + SkMatrix srcToDst; + ImageDrawMode mode = OptimizeSampleArea(SkISize::Make(image->width(), image->height()), + srcRect, dstRect, /* dstClip= */ nullptr, + &src, &dst, &srcToDst); + if (mode == ImageDrawMode::kSkip) { + return true; + } + + SkASSERT(mode != ImageDrawMode::kDecal); // only happens if there is a 'dstClip' + + if (src.contains(image->bounds())) { + constraint = SkCanvas::kFast_SrcRectConstraint; + } + + SkBaseDevice* device = SkCanvasPriv::TopDevice(canvas); + const SkMatrix& localToDevice = device->localToDevice(); + + SkSamplingOptions sampling = origSampling; + if (sampling.mipmap != SkMipmapMode::kNone && CanDisableMipmap(localToDevice, srcToDst)) { + sampling = SkSamplingOptions(sampling.filter); + } + + SkIRect clipRect = device->devClipBounds(); + + int tileFilterPad; + if (sampling.useCubic) { + tileFilterPad = kBicubicFilterTexelPad; + } else if (sampling.filter == SkFilterMode::kLinear || sampling.isAniso()) { + // Aniso will fallback to linear filtering in the tiling case. + tileFilterPad = 1; + } else { + tileFilterPad = 0; + } + + int maxTileSize = get_max_texture_size(canvas) - 2*tileFilterPad; +#if GR_TEST_UTILS + if (gOverrideMaxTextureSize) { + maxTileSize = gOverrideMaxTextureSize - 2 * tileFilterPad; + } +#endif + + size_t cacheSize = get_cache_size(device); + + int tileSize; + SkIRect clippedSubset; + if (ShouldTileImage(clipRect, + image->dimensions(), + localToDevice, + srcToDst, + &src, + maxTileSize, + cacheSize, + &tileSize, + &clippedSubset)) { + // Extract pixels on the CPU, since we have to split into separate textures before + // sending to the GPU if tiling. + if (SkBitmap bm; as_IB(image)->getROPixels(nullptr, &bm)) { + draw_tiled_bitmap(canvas, + bm, + tileSize, + srcToDst, + src, + clippedSubset, + paint, + aaFlags, + constraint, + sampling); + return true; + } + } + } + + return false; +} + } // namespace skgpu diff --git a/src/gpu/TiledTextureUtils.h b/src/gpu/TiledTextureUtils.h index 2112acc5c268..0adea3184bef 100644 --- a/src/gpu/TiledTextureUtils.h +++ b/src/gpu/TiledTextureUtils.h @@ -17,13 +17,12 @@ class SkBitmap; struct SkIRect; struct SkISize; class SkMatrix; -class SkMatrixProvider; class SkPaint; struct SkRect; struct SkSamplingOptions; namespace skgpu::ganesh { - class SurfaceDrawContext; + class Device; } namespace skgpu { @@ -40,19 +39,6 @@ class TiledTextureUtils { int* tileSize, SkIRect* clippedSubset); - static void DrawTiledBitmap(SkBaseDevice*, - const SkBitmap&, - int tileSize, - const SkMatrix& srcToDst, - const SkRect& srcRect, - const SkIRect& clippedSrcIRect, - const SkPaint& paint, - SkCanvas::QuadAAFlags origAAFlags, - const SkMatrix& localToDevice, - SkCanvas::SrcRectConstraint constraint, - SkSamplingOptions sampling, - SkTileMode tileMode); - enum class ImageDrawMode { // Src and dst have been restricted to the image content. May need to clamp, no need to // decal. @@ -73,6 +59,19 @@ class TiledTextureUtils { SkMatrix* outSrcToDst); static bool CanDisableMipmap(const SkMatrix& viewM, const SkMatrix& localM); + + static void ClampedOutsetWithOffset(SkIRect* iRect, int outset, SkPoint* offset, + const SkIRect& clamp); + + static bool DrawAsTiledImageRect(SkCanvas*, + const SkImage*, + const SkRect& srcRect, + const SkRect& dstRect, + SkCanvas::QuadAAFlags, + const SkSamplingOptions&, + const SkPaint*, + SkCanvas::SrcRectConstraint); + }; } // namespace skgpu diff --git a/src/gpu/ganesh/BUILD.bazel b/src/gpu/ganesh/BUILD.bazel index 88870c81d5a3..7d6147c0ac80 100644 --- a/src/gpu/ganesh/BUILD.bazel +++ b/src/gpu/ganesh/BUILD.bazel @@ -24,7 +24,6 @@ CORE_FILES = [ "GrAHardwareBufferImageGenerator.cpp", "GrAHardwareBufferImageGenerator.h", "GrAHardwareBufferUtils.cpp", - "GrAHardwareBufferUtils_impl.h", "GrAppliedClip.h", "GrAttachment.cpp", "GrAttachment.h", @@ -33,6 +32,7 @@ CORE_FILES = [ "GrAutoLocaleSetter.h", "GrBackendSemaphore.cpp", "GrBackendSurface.cpp", + "GrBackendSurfacePriv.h", "GrBackendTextureImageGenerator.cpp", "GrBackendTextureImageGenerator.h", "GrBackendUtils.cpp", @@ -121,6 +121,8 @@ CORE_FILES = [ "GrImageInfo.h", "GrManagedResource.cpp", "GrManagedResource.h", + "GrMeshBuffers.cpp", + "GrMeshBuffers.h", "GrMeshDrawTarget.cpp", "GrMeshDrawTarget.h", "GrNativeRect.h", @@ -284,9 +286,9 @@ skia_filegroup( "//src/gpu/ganesh/text:srcs", ] + select_multi( { - "//src/gpu:dawn_backend": ["//src/gpu/ganesh/dawn:srcs"], - "//src/gpu:gl_backend": ["//src/gpu/ganesh/gl:srcs"], - "//src/gpu:vulkan_backend": ["//src/gpu/ganesh/vk:srcs"], + "//src/gpu:dawn_ganesh": ["//src/gpu/ganesh/dawn:srcs"], + "//src/gpu:gl_ganesh": ["//src/gpu/ganesh/gl:srcs"], + "//src/gpu:vulkan_ganesh": ["//src/gpu/ganesh/vk:srcs"], "@platforms//os:android": ["//src/gpu/ganesh/surface:android_srcs"], # TODO(kjlubick) d3d backend }, @@ -298,7 +300,7 @@ skia_filegroup( name = "objc_srcs", srcs = select_multi( { - "//src/gpu:metal_backend": [ + "//src/gpu:metal_ganesh": [ "//src/gpu/ganesh/mtl:objc_srcs", "//src/gpu/ganesh/surface:mtl_objc_srcs", ], @@ -324,10 +326,10 @@ skia_filegroup( "//src/gpu/ganesh/text:private_hdrs", ] + select_multi( { - "//src/gpu:dawn_backend": ["//src/gpu/ganesh/dawn:private_hdrs"], - "//src/gpu:gl_backend": ["//src/gpu/ganesh/gl:private_hdrs"], - "//src/gpu:vulkan_backend": ["//src/gpu/ganesh/vk:private_hdrs"], - "//src/gpu:metal_backend": ["//src/gpu/ganesh/mtl:private_hdrs"], + "//src/gpu:dawn_ganesh": ["//src/gpu/ganesh/dawn:private_hdrs"], + "//src/gpu:gl_ganesh": ["//src/gpu/ganesh/gl:private_hdrs"], + "//src/gpu:vulkan_ganesh": ["//src/gpu/ganesh/vk:private_hdrs"], + "//src/gpu:metal_ganesh": ["//src/gpu/ganesh/mtl:private_hdrs"], # TODO(kjlubick) d3d backend }, ), @@ -339,8 +341,8 @@ skia_cc_deps( visibility = ["//src/gpu:__pkg__"], deps = select_multi( { - "//src/gpu:dawn_backend": ["//src/gpu/ganesh/dawn:deps"], - "//src/gpu:gl_backend": ["//src/gpu/ganesh/gl:deps"], + "//src/gpu:dawn_ganesh": ["//src/gpu/ganesh/dawn:deps"], + "//src/gpu:gl_ganesh": ["//src/gpu/ganesh/gl:deps"], # TODO(kjlubick) mtl and d3d backend }, ), diff --git a/src/gpu/ganesh/ClipStack.cpp b/src/gpu/ganesh/ClipStack.cpp index f85afa195040..5c9bc9266a21 100644 --- a/src/gpu/ganesh/ClipStack.cpp +++ b/src/gpu/ganesh/ClipStack.cpp @@ -10,7 +10,6 @@ #include "include/core/SkColorSpace.h" #include "include/core/SkMatrix.h" #include "src/base/SkVx.h" -#include "src/core/SkMatrixProvider.h" #include "src/core/SkPathPriv.h" #include "src/core/SkRRectPriv.h" #include "src/core/SkRectPriv.h" @@ -1145,14 +1144,13 @@ static constexpr int kMaxAnalyticFPs = 4; // across our set of GMs, SKPs, and SVGs used for testing. static constexpr int kNumStackMasks = 4; -ClipStack::ClipStack(const SkIRect& deviceBounds, const SkMatrixProvider* matrixProvider, - bool forceAA) +ClipStack::ClipStack(const SkIRect& deviceBounds, const SkMatrix* ctm, bool forceAA) : fElements(kElementStackIncrement) , fSaves(kSaveStackIncrement) , fMasks(kMaskStackIncrement) , fProxyProvider(nullptr) , fDeviceBounds(deviceBounds) - , fMatrixProvider(matrixProvider) + , fCTM(ctm) , fForceAA(forceAA) { // Start with a save record that is wide open fSaves.emplace_back(deviceBounds); @@ -1302,7 +1300,7 @@ GrClip::Effect ClipStack::apply(GrRecordingContext* rContext, static const GrColorInfo kCoverageColorInfo{GrColorType::kUnknown, kPremul_SkAlphaType, nullptr}; GrFPArgs args(rContext, &kCoverageColorInfo, sdc->surfaceProps()); - clipFP = GrFragmentProcessors::Make(cs.shader(), args, fMatrixProvider->localToDevice()); + clipFP = GrFragmentProcessors::Make(cs.shader(), args, *fCTM); if (clipFP) { // The initial input is the coverage from the geometry processor, so this ensures it // is multiplied properly with the alpha of the clip shader. diff --git a/src/gpu/ganesh/ClipStack.h b/src/gpu/ganesh/ClipStack.h index ffdaeb36cf4d..e7263fcd1474 100644 --- a/src/gpu/ganesh/ClipStack.h +++ b/src/gpu/ganesh/ClipStack.h @@ -27,7 +27,6 @@ class SurfaceDrawContext; } } // namespace skgpu class GrSWMaskHelper; -class SkMatrixProvider; namespace skgpu::ganesh { @@ -52,8 +51,8 @@ class ClipStack final : public GrClip { using sk_is_trivially_relocatable = std::true_type; }; - // The SkMatrixProvider must outlive the ClipStack. - ClipStack(const SkIRect& deviceBounds, const SkMatrixProvider* matrixProvider, bool forceAA); + // The ctm must outlive the ClipStack. + ClipStack(const SkIRect& deviceBounds, const SkMatrix* ctm, bool forceAA); ~ClipStack() override; @@ -324,7 +323,7 @@ class ClipStack final : public GrClip { mutable GrProxyProvider* fProxyProvider; const SkIRect fDeviceBounds; - const SkMatrixProvider* fMatrixProvider; + const SkMatrix* fCTM; // When there's MSAA, clip elements are applied using the stencil buffer. If a backend cannot // disable MSAA per draw, then all elements are effectively AA'ed. Tracking them as such makes diff --git a/src/gpu/ganesh/Device.cpp b/src/gpu/ganesh/Device.cpp index b82dc9aaf1cb..f44fa74e653d 100644 --- a/src/gpu/ganesh/Device.cpp +++ b/src/gpu/ganesh/Device.cpp @@ -56,7 +56,6 @@ #include "src/core/SkImageFilterTypes.h" #include "src/core/SkImageInfoPriv.h" #include "src/core/SkLatticeIter.h" -#include "src/core/SkMatrixProvider.h" #include "src/core/SkMeshPriv.h" #include "src/core/SkRasterClip.h" #include "src/core/SkSpecialImage.h" @@ -65,6 +64,7 @@ #include "src/core/SkVerticesPriv.h" #include "src/gpu/SkBackingFit.h" #include "src/gpu/Swizzle.h" +#include "src/gpu/TiledTextureUtils.h" #include "src/gpu/ganesh/ClipStack.h" #include "src/gpu/ganesh/GrAuditTrail.h" #include "src/gpu/ganesh/GrBlurUtils.h" @@ -95,6 +95,7 @@ #include "src/gpu/ganesh/geometry/GrShape.h" #include "src/gpu/ganesh/geometry/GrStyledShape.h" #include "src/gpu/ganesh/image/GrImageUtils.h" +#include "src/gpu/ganesh/image/SkSpecialImage_Ganesh.h" #include "src/text/GlyphRun.h" #include "src/text/gpu/SlugImpl.h" #include "src/text/gpu/SubRunContainer.h" @@ -278,7 +279,7 @@ Device::Device(std::unique_ptr sdc, DeviceFlags flags) sdc->surfaceProps().isUseDeviceIndependentFonts())) , fSurfaceDrawContext(std::move(sdc)) , fClip(SkIRect::MakeSize(fSurfaceDrawContext->dimensions()), - &this->asMatrixProvider(), + &this->localToDevice(), force_aa_clip(fSurfaceDrawContext.get())) { if (flags & DeviceFlags::kNeedClear) { this->clearAll(); @@ -512,18 +513,17 @@ void Device::drawPoints(SkCanvas::PointMode mode, SkDrawBase draw; // don't need to set fBlitterChoose, as it should never get used draw.fDst = SkPixmap(SkImageInfo::MakeUnknown(this->width(), this->height()), nullptr, 0); - draw.fMatrixProvider = this; + draw.fCTM = &this->localToDevice(); draw.fRC = &rc; draw.drawDevicePoints(mode, count, pts, paint, this); return; } - const SkMatrixProvider* matrixProvider = this; GrPaint grPaint; if (!SkPaintToGrPaint(this->recordingContext(), fSurfaceDrawContext->colorInfo(), paint, - matrixProvider->localToDevice(), + this->localToDevice(), fSurfaceDrawContext->surfaceProps(), &grPaint)) { return; @@ -534,7 +534,7 @@ void Device::drawPoints(SkCanvas::PointMode mode, nullptr); GrPrimitiveType primitiveType = point_mode_to_primitive_type(mode); - fSurfaceDrawContext->drawVertices(this->clip(), std::move(grPaint), *matrixProvider, + fSurfaceDrawContext->drawVertices(this->clip(), std::move(grPaint), this->localToDevice(), std::move(vertices), &primitiveType); } @@ -550,8 +550,8 @@ void Device::drawRect(const SkRect& rect, const SkPaint& paint) { if (paint.getMaskFilter() || paint.getPathEffect()) { GrStyledShape shape(rect, style); - GrBlurUtils::drawShapeWithMaskFilter(fContext.get(), fSurfaceDrawContext.get(), - this->clip(), paint, this->asMatrixProvider(), shape); + GrBlurUtils::DrawShapeWithMaskFilter(fContext.get(), fSurfaceDrawContext.get(), + this->clip(), paint, this->localToDevice(), shape); return; } @@ -623,8 +623,8 @@ void Device::drawRRect(const SkRRect& rrect, const SkPaint& paint) { // A path effect will presumably transform this rrect into something else. GrStyledShape shape(rrect, style); - GrBlurUtils::drawShapeWithMaskFilter(fContext.get(), fSurfaceDrawContext.get(), - this->clip(), paint, this->asMatrixProvider(), shape); + GrBlurUtils::DrawShapeWithMaskFilter(fContext.get(), fSurfaceDrawContext.get(), + this->clip(), paint, this->localToDevice(), shape); return; } @@ -692,8 +692,8 @@ void Device::drawDRRect(const SkRRect& outer, const SkRRect& inner, const SkPain // fixed by upgrading GrStyledShape to handle DRRects. GrStyledShape shape(path, paint); - GrBlurUtils::drawShapeWithMaskFilter(fContext.get(), fSurfaceDrawContext.get(), this->clip(), - paint, this->asMatrixProvider(), shape); + GrBlurUtils::DrawShapeWithMaskFilter(fContext.get(), fSurfaceDrawContext.get(), this->clip(), + paint, this->localToDevice(), shape); } ///////////////////////////////////////////////////////////////////////////// @@ -804,12 +804,12 @@ void Device::drawPath(const SkPath& origSrcPath, const SkPaint& paint, bool path // TODO: losing possible mutability of 'origSrcPath' here GrStyledShape shape(origSrcPath, paint); - GrBlurUtils::drawShapeWithMaskFilter(fContext.get(), fSurfaceDrawContext.get(), this->clip(), - paint, this->asMatrixProvider(), shape); + GrBlurUtils::DrawShapeWithMaskFilter(fContext.get(), fSurfaceDrawContext.get(), this->clip(), + paint, this->localToDevice(), shape); } skif::Context Device::createContext(const skif::ContextInfo& ctxInfo) const { - return skif::Context::MakeGanesh(fContext.get(), fSurfaceDrawContext->origin(), ctxInfo); + return skif::MakeGaneshContext(fContext.get(), fSurfaceDrawContext->origin(), ctxInfo); } sk_sp Device::makeSpecial(const SkBitmap& bitmap) { @@ -827,14 +827,14 @@ sk_sp Device::makeSpecial(const SkBitmap& bitmap) { // GrMakeCachedBitmapProxyView creates a tight copy of 'bitmap' so we don't have to subset // the special image - return SkSpecialImage::MakeDeferredFromGpu(fContext.get(), - rect, - bitmap.getGenerationID(), - std::move(view), - { SkColorTypeToGrColorType(bitmap.colorType()), + return SkSpecialImages::MakeDeferredFromGpu(fContext.get(), + rect, + bitmap.getGenerationID(), + std::move(view), + {SkColorTypeToGrColorType(bitmap.colorType()), kPremul_SkAlphaType, - bitmap.refColorSpace() }, - this->surfaceProps()); + bitmap.refColorSpace()}, + this->surfaceProps()); } sk_sp Device::makeSpecial(const SkImage* image) { @@ -845,13 +845,13 @@ sk_sp Device::makeSpecial(const SkImage* image) { auto [view, ct] = skgpu::ganesh::AsView(this->recordingContext(), image, GrMipmapped::kNo); SkASSERT(view); - return SkSpecialImage::MakeDeferredFromGpu(fContext.get(), - SkIRect::MakeWH(image->width(), image->height()), - image->uniqueID(), - std::move(view), - { ct, kPremul_SkAlphaType, - image->refColorSpace() }, - this->surfaceProps()); + return SkSpecialImages::MakeDeferredFromGpu( + fContext.get(), + SkIRect::MakeWH(image->width(), image->height()), + image->uniqueID(), + std::move(view), + {ct, kPremul_SkAlphaType, image->refColorSpace()}, + this->surfaceProps()); } else if (image->peekPixels(&pm)) { SkBitmap bm; @@ -897,12 +897,12 @@ sk_sp Device::snapSpecial(const SkIRect& subset, bool forceCopy) finalSubset = SkIRect::MakeSize(view.dimensions()); } - return SkSpecialImage::MakeDeferredFromGpu(fContext.get(), - finalSubset, - kNeedNewImageUniqueID_SpecialImage, - std::move(view), - GrColorInfo(this->imageInfo().colorInfo()), - this->surfaceProps()); + return SkSpecialImages::MakeDeferredFromGpu(fContext.get(), + finalSubset, + kNeedNewImageUniqueID_SpecialImage, + std::move(view), + GrColorInfo(this->imageInfo().colorInfo()), + this->surfaceProps()); } sk_sp Device::snapSpecialScaled(const SkIRect& subset, const SkISize& dstDims) { @@ -929,12 +929,12 @@ sk_sp Device::snapSpecialScaled(const SkIRect& subset, const SkI return nullptr; } - return SkSpecialImage::MakeDeferredFromGpu(fContext.get(), - SkIRect::MakeSize(dstDims), - kNeedNewImageUniqueID_SpecialImage, - scaledContext->readSurfaceView(), - GrColorInfo(this->imageInfo().colorInfo()), - this->surfaceProps()); + return SkSpecialImages::MakeDeferredFromGpu(fContext.get(), + SkIRect::MakeSize(dstDims), + kNeedNewImageUniqueID_SpecialImage, + scaledContext->readSurfaceView(), + GrColorInfo(this->imageInfo().colorInfo()), + this->surfaceProps()); } void Device::drawDevice(SkBaseDevice* device, @@ -953,16 +953,45 @@ void Device::drawImageRect(const SkImage* image, const SkPaint& paint, SkCanvas::SrcRectConstraint constraint) { ASSERT_SINGLE_OWNER + GrAA aa = fSurfaceDrawContext->chooseAA(paint); SkCanvas::QuadAAFlags aaFlags = (aa == GrAA::kYes) ? SkCanvas::kAll_QuadAAFlags : SkCanvas::kNone_QuadAAFlags; - this->drawImageQuad(image, - src ? *src - : SkRect::MakeIWH(image->width(), image->height()), - dst, /* dstClip= */ nullptr, aaFlags, - /* preViewMatrix= */ nullptr, sampling, paint, constraint); + + this->drawImageQuadDirect(image, + src ? *src + : SkRect::MakeIWH(image->width(), image->height()), + dst, + /* dstClip= */ nullptr, + aaFlags, + /* preViewMatrix= */ nullptr, + sampling, + paint, + constraint); } +bool Device::drawAsTiledImageRect(SkCanvas* canvas, + const SkImage* image, + const SkRect* src, + const SkRect& dst, + const SkSamplingOptions& sampling, + const SkPaint& paint, + SkCanvas::SrcRectConstraint constraint) { + ASSERT_SINGLE_OWNER + + GrAA aa = fSurfaceDrawContext->chooseAA(paint); + SkCanvas::QuadAAFlags aaFlags = (aa == GrAA::kYes) ? SkCanvas::kAll_QuadAAFlags + : SkCanvas::kNone_QuadAAFlags; + + return TiledTextureUtils::DrawAsTiledImageRect(canvas, + image, + src ? *src + : SkRect::MakeIWH(image->width(), + image->height()), + dst, aaFlags, sampling, &paint, constraint); +} + + void Device::drawViewLattice(GrSurfaceProxyView view, const GrColorInfo& info, std::unique_ptr iter, @@ -1050,7 +1079,7 @@ void Device::drawVertices(const SkVertices* vertices, } fSurfaceDrawContext->drawVertices(this->clip(), std::move(grPaint), - this->asMatrixProvider(), + this->localToDevice(), sk_ref_sp(const_cast(vertices)), nullptr, skipColorXform); @@ -1059,7 +1088,9 @@ void Device::drawVertices(const SkVertices* vertices, void Device::drawMesh(const SkMesh& mesh, sk_sp blender, const SkPaint& paint) { ASSERT_SINGLE_OWNER GR_CREATE_TRACE_MARKER_CONTEXT("skgpu::ganesh::Device", "drawMesh", fContext.get()); - SkASSERT(mesh.isValid()); + if (!mesh.isValid()) { + return; + } GrPaint grPaint; if (!init_vertices_paint(fContext.get(), @@ -1072,7 +1103,7 @@ void Device::drawMesh(const SkMesh& mesh, sk_sp blender, const SkPain &grPaint)) { return; } - fSurfaceDrawContext->drawMesh(this->clip(), std::move(grPaint), this->asMatrixProvider(), mesh); + fSurfaceDrawContext->drawMesh(this->clip(), std::move(grPaint), this->localToDevice(), mesh); } /////////////////////////////////////////////////////////////////////////////// @@ -1152,7 +1183,7 @@ void Device::onDrawGlyphRunList(SkCanvas* canvas, } else { fSurfaceDrawContext->drawGlyphRunList(canvas, this->clip(), - this->asMatrixProvider(), + this->localToDevice(), glyphRunList, this->strikeDeviceInfo(), drawingPaint); @@ -1290,6 +1321,7 @@ void Device::asyncRescaleAndReadPixels(const SkImageInfo& info, } void Device::asyncRescaleAndReadPixelsYUV420(SkYUVColorSpace yuvColorSpace, + bool readAlpha, sk_sp dstColorSpace, const SkIRect& srcRect, SkISize dstSize, @@ -1305,6 +1337,7 @@ void Device::asyncRescaleAndReadPixelsYUV420(SkYUVColorSpace yuvColorSpace, } sdc->asyncRescaleAndReadPixelsYUV420(dContext, yuvColorSpace, + readAlpha, std::move(dstColorSpace), srcRect, dstSize, @@ -1405,7 +1438,7 @@ sk_sp Device::convertGlyphRunListToSlug(const sktext::GlyphRunList& glyphRunList, const SkPaint& initialPaint, const SkPaint& drawingPaint) { - return sktext::gpu::SlugImpl::Make(this->asMatrixProvider(), + return sktext::gpu::SlugImpl::Make(this->localToDevice(), glyphRunList, initialPaint, drawingPaint, @@ -1418,14 +1451,13 @@ void Device::drawSlug(SkCanvas* canvas, const sktext::gpu::Slug* slug, SkASSERT(canvas); SkASSERT(slug); const sktext::gpu::SlugImpl* slugImpl = static_cast(slug); - auto matrixProvider = this->asMatrixProvider(); #if defined(SK_DEBUG) if (!fContext->priv().options().fSupportBilerpFromGlyphAtlas) { // We can draw a slug if the atlas has padding or if the creation matrix and the // drawing matrix are the same. If they are the same, then the Slug will use the direct // drawing code and not use bi-lerp. SkMatrix slugMatrix = slugImpl->initialPositionMatrix(); - SkMatrix positionMatrix = matrixProvider.localToDevice(); + SkMatrix positionMatrix = this->localToDevice(); positionMatrix.preTranslate(slugImpl->origin().x(), slugImpl->origin().y()); SkASSERT(slugMatrix == positionMatrix); } @@ -1433,9 +1465,10 @@ void Device::drawSlug(SkCanvas* canvas, const sktext::gpu::Slug* slug, auto atlasDelegate = [&](const sktext::gpu::AtlasSubRun* subRun, SkPoint drawOrigin, const SkPaint& paint, - sk_sp subRunStorage) { + sk_sp subRunStorage, + sktext::gpu::RendererData) { auto[drawingClip, op] = subRun->makeAtlasTextOp( - this->clip(), matrixProvider.localToDevice(), drawOrigin, paint, + this->clip(), this->localToDevice(), drawOrigin, paint, std::move(subRunStorage), fSurfaceDrawContext.get()); if (op != nullptr) { fSurfaceDrawContext->addDrawOp(drawingClip, std::move(op)); diff --git a/src/gpu/ganesh/Device.h b/src/gpu/ganesh/Device.h index feb0c906ff1b..af5eb2ac0b68 100644 --- a/src/gpu/ganesh/Device.h +++ b/src/gpu/ganesh/Device.h @@ -65,7 +65,10 @@ struct SkDrawShadowRec; struct SkISize; struct SkPoint; struct SkRSXform; -namespace skgpu { enum class Budgeted : bool; } +namespace skgpu { +enum class Budgeted : bool; +class TiledTextureUtils; +} namespace sktext { class GlyphRunList; namespace gpu { @@ -92,7 +95,7 @@ class Device final : public SkBaseDevice { GrSurfaceProxyView readSurfaceView(); GrRenderTargetProxy* targetProxy(); - GrRecordingContext* recordingContext() const { return fContext.get(); } + GrRecordingContext* recordingContext() const override { return fContext.get(); } bool wait(int numSemaphores, const GrBackendSemaphore* waitSemaphores, @@ -122,6 +125,7 @@ class Device final : public SkBaseDevice { ReadPixelsContext context); void asyncRescaleAndReadPixelsYUV420(SkYUVColorSpace yuvColorSpace, + bool readAlpha, sk_sp dstColorSpace, const SkIRect& srcRect, SkISize dstSize, @@ -193,6 +197,13 @@ class Device final : public SkBaseDevice { void drawImageRect(const SkImage*, const SkRect* src, const SkRect& dst, const SkSamplingOptions&, const SkPaint&, SkCanvas::SrcRectConstraint) override; + bool drawAsTiledImageRect(SkCanvas*, + const SkImage*, + const SkRect* src, + const SkRect& dst, + const SkSamplingOptions&, + const SkPaint&, + SkCanvas::SrcRectConstraint) override; void drawImageLattice(const SkImage*, const SkCanvas::Lattice&, const SkRect& dst, SkFilterMode, const SkPaint&) override; @@ -208,6 +219,25 @@ class Device final : public SkBaseDevice { const SkMatrix preViewMatrices[], const SkSamplingOptions&, const SkPaint&, SkCanvas::SrcRectConstraint) override; + // Assumes the src and dst rects have already been optimized to fit the proxy. + // Only implemented by the gpu devices. + // This method is the lowest level draw used for tiled bitmap draws. It doesn't attempt to + // modify its parameters (e.g., adjust src & dst) but just draws the image however it can. It + // could, almost, be replaced with a drawEdgeAAImageSet call for the tiled bitmap draw use + // case but the extra tilemode requirement and the intermediate parameter processing (e.g., + // trying to alter the SrcRectConstraint) currently block that. + void drawEdgeAAImage(const SkImage*, + const SkRect& src, + const SkRect& dst, + const SkPoint dstClip[4], + SkCanvas::QuadAAFlags, + const SkMatrix& localToDevice, + const SkSamplingOptions&, + const SkPaint&, + SkCanvas::SrcRectConstraint, + const SkMatrix& srcToDst, + SkTileMode); + sk_sp makeSpecial(const SkBitmap&) override; sk_sp makeSpecial(const SkImage*) override; sk_sp snapSpecial(const SkIRect& subset, bool forceCopy = false) override; @@ -305,27 +335,15 @@ class Device final : public SkBaseDevice { // If not null, dstClip must be contained inside dst and will also respect the edge AA flags. // If 'preViewMatrix' is not null, final CTM will be this->ctm() * preViewMatrix. - void drawImageQuad(const SkImage*, - const SkRect& src, - const SkRect& dst, - const SkPoint dstClip[4], - SkCanvas::QuadAAFlags, - const SkMatrix* preViewMatrix, - const SkSamplingOptions&, - const SkPaint&, - SkCanvas::SrcRectConstraint); - - void drawEdgeAAImage(const SkImage*, - const SkRect& src, - const SkRect& dst, - const SkPoint dstClip[4], - SkCanvas::QuadAAFlags, - const SkMatrix& localToDevice, - const SkSamplingOptions&, - const SkPaint&, - SkCanvas::SrcRectConstraint, - const SkMatrix& srcToDst, - SkTileMode tm) override; + void drawImageQuadDirect(const SkImage*, + const SkRect& src, + const SkRect& dst, + const SkPoint dstClip[4], + SkCanvas::QuadAAFlags, + const SkMatrix* preViewMatrix, + const SkSamplingOptions&, + const SkPaint&, + SkCanvas::SrcRectConstraint); // FIXME(michaelludwig) - Should be removed in favor of using drawImageQuad with edge flags to // for every element in the SkLatticeIter. @@ -337,6 +355,7 @@ class Device final : public SkBaseDevice { const SkPaint&); friend class ::SkSurface_Ganesh; // for access to surfaceProps + friend class skgpu::TiledTextureUtils; // for access to clip() }; GR_MAKE_BITFIELD_CLASS_OPS(Device::DeviceFlags) diff --git a/src/gpu/ganesh/Device_drawTexture.cpp b/src/gpu/ganesh/Device_drawTexture.cpp index bd6ce7a4452c..a1aed68d1dd9 100644 --- a/src/gpu/ganesh/Device_drawTexture.cpp +++ b/src/gpu/ganesh/Device_drawTexture.cpp @@ -30,14 +30,9 @@ #include "src/gpu/ganesh/geometry/GrStyledShape.h" #include "src/gpu/ganesh/image/GrImageUtils.h" #include "src/gpu/ganesh/image/SkImage_Ganesh.h" +#include "src/gpu/ganesh/image/SkSpecialImage_Ganesh.h" #include "src/image/SkImage_Base.h" -#if GR_TEST_UTILS -// GrContextOptions::fMaxTextureSizeOverride exists but doesn't allow for changing the -// maxTextureSize on the fly. -int gOverrideMaxTextureSize = 0; -#endif - using namespace skia_private; namespace { @@ -366,7 +361,7 @@ void Device::drawEdgeAAImage(const SkImage* image, shape = GrStyledShape(dst); } - GrBlurUtils::drawShapeWithMaskFilter( + GrBlurUtils::DrawShapeWithMaskFilter( rContext, sdc, clip, shape, std::move(grPaint), localToDevice, mf); } } @@ -376,7 +371,7 @@ void Device::drawSpecial(SkSpecialImage* special, const SkSamplingOptions& origSampling, const SkPaint& paint) { SkASSERT(!paint.getMaskFilter() && !paint.getImageFilter()); - SkASSERT(special->isTextureBacked()); + SkASSERT(special->isGaneshBacked()); SkRect src = SkRect::Make(special->subset()); SkRect dst = SkRect::MakeWH(special->width(), special->height()); @@ -387,7 +382,7 @@ void Device::drawSpecial(SkSpecialImage* special, SkCanvas::QuadAAFlags aaFlags = (aa == GrAA::kYes) ? SkCanvas::kAll_QuadAAFlags : SkCanvas::kNone_QuadAAFlags; - GrSurfaceProxyView view = special->view(this->recordingContext()); + GrSurfaceProxyView view = SkSpecialImages::AsView(this->recordingContext(), special); SkImage_Ganesh image(sk_ref_sp(special->getContext()), special->uniqueID(), std::move(view), @@ -407,15 +402,15 @@ void Device::drawSpecial(SkSpecialImage* special, SkTileMode::kClamp); } -void Device::drawImageQuad(const SkImage* image, - const SkRect& srcRect, - const SkRect& dstRect, - const SkPoint dstClip[4], - SkCanvas::QuadAAFlags aaFlags, - const SkMatrix* preViewMatrix, - const SkSamplingOptions& origSampling, - const SkPaint& paint, - SkCanvas::SrcRectConstraint constraint) { +void Device::drawImageQuadDirect(const SkImage* image, + const SkRect& srcRect, + const SkRect& dstRect, + const SkPoint dstClip[4], + SkCanvas::QuadAAFlags aaFlags, + const SkMatrix* preViewMatrix, + const SkSamplingOptions& origSampling, + const SkPaint& paint, + SkCanvas::SrcRectConstraint constraint) { SkRect src; SkRect dst; SkMatrix srcToDst; @@ -435,75 +430,16 @@ void Device::drawImageQuad(const SkImage* image, : SkTileMode::kClamp; // Get final CTM matrix - SkPreConcatMatrixProvider matrixProvider(this->asMatrixProvider(), - preViewMatrix ? *preViewMatrix : SkMatrix::I()); - const SkMatrix& ctm(matrixProvider.localToDevice()); + SkMatrix ctm = this->localToDevice(); + if (preViewMatrix) { + ctm.preConcat(*preViewMatrix); + } SkSamplingOptions sampling = origSampling; if (sampling.mipmap != SkMipmapMode::kNone && TiledTextureUtils::CanDisableMipmap(ctm, srcToDst)) { sampling = SkSamplingOptions(sampling.filter); } - const GrClip* clip = this->clip(); - - if (!image->isTextureBacked()) { - int tileFilterPad; - if (sampling.useCubic) { - tileFilterPad = kBicubicFilterTexelPad; - } else if (sampling.filter == SkFilterMode::kLinear || sampling.isAniso()) { - // Aniso will fallback to linear filtering in the tiling case. - tileFilterPad = 1; - } else { - tileFilterPad = 0; - } - - int maxTileSize = fContext->maxTextureSize() - 2*tileFilterPad; -#if GR_TEST_UTILS - if (gOverrideMaxTextureSize) { - maxTileSize = gOverrideMaxTextureSize - 2 * tileFilterPad; - } -#endif - size_t cacheSize = 0; - if (auto dContext = fContext->asDirectContext(); dContext) { - // NOTE: if the context is not a direct context, it doesn't have access to the resource - // cache, and theoretically, the resource cache's limits could be being changed on - // another thread, so even having access to just the limit wouldn't be a reliable - // test during recording here. - cacheSize = dContext->getResourceCacheLimit(); - } - int tileSize; - SkIRect clippedSubset; - if (skgpu::TiledTextureUtils::ShouldTileImage( - clip ? clip->getConservativeBounds() - : SkIRect::MakeSize(fSurfaceDrawContext->dimensions()), - image->dimensions(), - ctm, - srcToDst, - &src, - maxTileSize, - cacheSize, - &tileSize, - &clippedSubset)) { - // Extract pixels on the CPU, since we have to split into separate textures before - // sending to the GPU if tiling. - if (SkBitmap bm; as_IB(image)->getROPixels(nullptr, &bm)) { - // This is the funnel for all paths that draw tiled bitmaps/images. - skgpu::TiledTextureUtils::DrawTiledBitmap(this, - bm, - tileSize, - srcToDst, - src, - clippedSubset, - paint, - aaFlags, - ctm, - constraint, - sampling, - tileMode); - return; - } - } - } this->drawEdgeAAImage(image, src, @@ -515,7 +451,7 @@ void Device::drawImageQuad(const SkImage* image, paint, constraint, srcToDst, - SkTileMode::kClamp); + tileMode); } void Device::drawEdgeAAImageSet(const SkCanvas::ImageSetEntry set[], int count, @@ -536,7 +472,7 @@ void Device::drawEdgeAAImageSet(const SkCanvas::ImageSetEntry set[], int count, auto paintAlpha = paint.getAlphaf(); entryPaint.writable()->setAlphaf(paintAlpha * set[i].fAlpha); } - this->drawImageQuad( + this->drawImageQuadDirect( set[i].fImage.get(), set[i].fSrcRect, set[i].fDstRect, set[i].fHasClip ? dstClips + dstClipIndex : nullptr, static_cast(set[i].fAAFlags), @@ -616,7 +552,7 @@ void Device::drawEdgeAAImageSet(const SkCanvas::ImageSetEntry set[], int count, auto paintAlpha = paint.getAlphaf(); entryPaint.writable()->setAlphaf(paintAlpha * set[i].fAlpha); } - this->drawImageQuad( + this->drawImageQuadDirect( image, set[i].fSrcRect, set[i].fDstRect, clip, static_cast(set[i].fAAFlags), set[i].fMatrixIndex < 0 ? nullptr : preViewMatrices + set[i].fMatrixIndex, diff --git a/src/gpu/ganesh/GrAHardwareBufferImageGenerator.cpp b/src/gpu/ganesh/GrAHardwareBufferImageGenerator.cpp index 755ee6f6efc9..1ba8cd49afd1 100644 --- a/src/gpu/ganesh/GrAHardwareBufferImageGenerator.cpp +++ b/src/gpu/ganesh/GrAHardwareBufferImageGenerator.cpp @@ -8,21 +8,16 @@ #include "include/core/SkTypes.h" #if defined(SK_BUILD_FOR_ANDROID) && __ANDROID_API__ >= 26 -#define GL_GLEXT_PROTOTYPES -#define EGL_EGLEXT_PROTOTYPES - #include "src/gpu/ganesh/GrAHardwareBufferImageGenerator.h" -#include - +#include "include/android/GrAHardwareBufferUtils.h" #include "include/core/SkColorSpace.h" #include "include/gpu/GrBackendSurface.h" #include "include/gpu/GrDirectContext.h" #include "include/gpu/GrRecordingContext.h" #include "include/gpu/gl/GrGLTypes.h" #include "src/core/SkMessageBus.h" -#include "src/gpu/ganesh/GrAHardwareBufferUtils_impl.h" #include "src/gpu/ganesh/GrCaps.h" #include "src/gpu/ganesh/GrDirectContextPriv.h" #include "src/gpu/ganesh/GrProxyProvider.h" @@ -34,17 +29,7 @@ #include "src/gpu/ganesh/GrTextureProxy.h" #include "src/gpu/ganesh/SkGr.h" -#include -#include -#include -#include - -#ifdef SK_VULKAN -#include "src/gpu/ganesh/vk/GrVkGpu.h" -#endif - -#define PROT_CONTENT_EXT_STR "EGL_EXT_protected_content" -#define EGL_PROTECTED_CONTENT_EXT 0x32C0 +#include std::unique_ptr GrAHardwareBufferImageGenerator::Make( AHardwareBuffer* graphicBuffer, SkAlphaType alphaType, sk_sp colorSpace, diff --git a/src/gpu/ganesh/GrAHardwareBufferUtils.cpp b/src/gpu/ganesh/GrAHardwareBufferUtils.cpp index fc43f28abad7..c7dffb750a93 100644 --- a/src/gpu/ganesh/GrAHardwareBufferUtils.cpp +++ b/src/gpu/ganesh/GrAHardwareBufferUtils.cpp @@ -5,41 +5,18 @@ * found in the LICENSE file. */ -#include "include/core/SkTypes.h" +#include "include/android/GrAHardwareBufferUtils.h" #if defined(SK_BUILD_FOR_ANDROID) && __ANDROID_API__ >= 26 #define GL_GLEXT_PROTOTYPES #define EGL_EGLEXT_PROTOTYPES -#include "src/gpu/ganesh/GrAHardwareBufferUtils_impl.h" - #include -#ifdef SK_GL -#include -#include -#include -#include -#endif +#if !defined(SK_DISABLE_LEGACY_ANDROID_HW_UTILS) #include "include/gpu/GrDirectContext.h" -#include "src/gpu/ganesh/GrDirectContextPriv.h" - -#ifdef SK_GL -#include "include/gpu/gl/GrGLTypes.h" -#include "src/gpu/ganesh/gl/GrGLDefines.h" -#include "src/gpu/ganesh/gl/GrGLUtil.h" #endif -#ifdef SK_VULKAN -#include "src/gpu/ganesh/vk/GrVkCaps.h" -#include "src/gpu/ganesh/vk/GrVkGpu.h" -#endif - -#define PROT_CONTENT_EXT_STR "EGL_EXT_protected_content" -#define EGL_PROTECTED_CONTENT_EXT 0x32C0 - -#define VK_CALL(X) gpu->vkInterface()->fFunctions.f##X - namespace GrAHardwareBufferUtils { SkColorType GetSkColorTypeFromBufferFormat(uint32_t bufferFormat) { @@ -69,108 +46,20 @@ SkColorType GetSkColorTypeFromBufferFormat(uint32_t bufferFormat) { } } +#if !defined(SK_DISABLE_LEGACY_ANDROID_HW_UTILS) GrBackendFormat GetBackendFormat(GrDirectContext* dContext, AHardwareBuffer* hardwareBuffer, uint32_t bufferFormat, bool requireKnownFormat) { GrBackendApi backend = dContext->backend(); if (backend == GrBackendApi::kOpenGL) { #ifdef SK_GL - switch (bufferFormat) { - //TODO: find out if we can detect, which graphic buffers support GR_GL_TEXTURE_2D - case AHARDWAREBUFFER_FORMAT_R8G8B8A8_UNORM: - case AHARDWAREBUFFER_FORMAT_R8G8B8X8_UNORM: - return GrBackendFormat::MakeGL(GR_GL_RGBA8, GR_GL_TEXTURE_EXTERNAL); - case AHARDWAREBUFFER_FORMAT_R16G16B16A16_FLOAT: - return GrBackendFormat::MakeGL(GR_GL_RGBA16F, GR_GL_TEXTURE_EXTERNAL); - case AHARDWAREBUFFER_FORMAT_R5G6B5_UNORM: - return GrBackendFormat::MakeGL(GR_GL_RGB565, GR_GL_TEXTURE_EXTERNAL); - case AHARDWAREBUFFER_FORMAT_R10G10B10A2_UNORM: - return GrBackendFormat::MakeGL(GR_GL_RGB10_A2, GR_GL_TEXTURE_EXTERNAL); - case AHARDWAREBUFFER_FORMAT_R8G8B8_UNORM: - return GrBackendFormat::MakeGL(GR_GL_RGB8, GR_GL_TEXTURE_EXTERNAL); -#if __ANDROID_API__ >= 33 - case AHARDWAREBUFFER_FORMAT_R8_UNORM: - return GrBackendFormat::MakeGL(GR_GL_R8, GR_GL_TEXTURE_EXTERNAL); -#endif - default: - if (requireKnownFormat) { - return GrBackendFormat(); - } else { - return GrBackendFormat::MakeGL(GR_GL_RGBA8, GR_GL_TEXTURE_EXTERNAL); - } - } + return GetGLBackendFormat(dContext, bufferFormat, requireKnownFormat); #else // SK_GL return GrBackendFormat(); #endif // SK_GL } else if (backend == GrBackendApi::kVulkan) { #ifdef SK_VULKAN - switch (bufferFormat) { - case AHARDWAREBUFFER_FORMAT_R8G8B8A8_UNORM: - return GrBackendFormat::MakeVk(VK_FORMAT_R8G8B8A8_UNORM); - case AHARDWAREBUFFER_FORMAT_R16G16B16A16_FLOAT: - return GrBackendFormat::MakeVk(VK_FORMAT_R16G16B16A16_SFLOAT); - case AHARDWAREBUFFER_FORMAT_R5G6B5_UNORM: - return GrBackendFormat::MakeVk(VK_FORMAT_R5G6B5_UNORM_PACK16); - case AHARDWAREBUFFER_FORMAT_R10G10B10A2_UNORM: - return GrBackendFormat::MakeVk(VK_FORMAT_A2B10G10R10_UNORM_PACK32); - case AHARDWAREBUFFER_FORMAT_R8G8B8X8_UNORM: - return GrBackendFormat::MakeVk(VK_FORMAT_R8G8B8A8_UNORM); - case AHARDWAREBUFFER_FORMAT_R8G8B8_UNORM: - return GrBackendFormat::MakeVk(VK_FORMAT_R8G8B8_UNORM); -#if __ANDROID_API__ >= 33 - case AHARDWAREBUFFER_FORMAT_R8_UNORM: - return GrBackendFormat::MakeVk(VK_FORMAT_R8_UNORM); -#endif - default: { - if (requireKnownFormat) { - return GrBackendFormat(); - } else { - GrVkGpu* gpu = static_cast(dContext->priv().getGpu()); - SkASSERT(gpu); - VkDevice device = gpu->device(); - - if (!gpu->vkCaps().supportsAndroidHWBExternalMemory()) { - return GrBackendFormat(); - } - VkAndroidHardwareBufferFormatPropertiesANDROID hwbFormatProps; - hwbFormatProps.sType = - VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID; - hwbFormatProps.pNext = nullptr; - - VkAndroidHardwareBufferPropertiesANDROID hwbProps; - hwbProps.sType = VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID; - hwbProps.pNext = &hwbFormatProps; - - VkResult err = VK_CALL(GetAndroidHardwareBufferProperties(device, - hardwareBuffer, - &hwbProps)); - if (VK_SUCCESS != err) { - return GrBackendFormat(); - } - - if (hwbFormatProps.format != VK_FORMAT_UNDEFINED) { - return GrBackendFormat(); - } - - GrVkYcbcrConversionInfo ycbcrConversion; - ycbcrConversion.fYcbcrModel = hwbFormatProps.suggestedYcbcrModel; - ycbcrConversion.fYcbcrRange = hwbFormatProps.suggestedYcbcrRange; - ycbcrConversion.fXChromaOffset = hwbFormatProps.suggestedXChromaOffset; - ycbcrConversion.fYChromaOffset = hwbFormatProps.suggestedYChromaOffset; - ycbcrConversion.fForceExplicitReconstruction = VK_FALSE; - ycbcrConversion.fExternalFormat = hwbFormatProps.externalFormat; - ycbcrConversion.fFormatFeatures = hwbFormatProps.formatFeatures; - if (VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT & - hwbFormatProps.formatFeatures) { - ycbcrConversion.fChromaFilter = VK_FILTER_LINEAR; - } else { - ycbcrConversion.fChromaFilter = VK_FILTER_NEAREST; - } - - return GrBackendFormat::MakeVk(ycbcrConversion); - } - } - } + return GetVulkanBackendFormat(dContext, hardwareBuffer, bufferFormat, requireKnownFormat); #else // SK_VULKAN return GrBackendFormat(); #endif // SK_VULKAN @@ -178,415 +67,6 @@ GrBackendFormat GetBackendFormat(GrDirectContext* dContext, AHardwareBuffer* har return GrBackendFormat(); } -#ifdef SK_GL -class GLTextureHelper { -public: - GLTextureHelper(GrGLuint texID, EGLImageKHR image, EGLDisplay display, GrGLuint texTarget) - : fTexID(texID) - , fImage(image) - , fDisplay(display) - , fTexTarget(texTarget) { } - ~GLTextureHelper() { - glDeleteTextures(1, &fTexID); - // eglDestroyImageKHR will remove a ref from the AHardwareBuffer - eglDestroyImageKHR(fDisplay, fImage); - } - void rebind(GrDirectContext*); - -private: - GrGLuint fTexID; - EGLImageKHR fImage; - EGLDisplay fDisplay; - GrGLuint fTexTarget; -}; - -void GLTextureHelper::rebind(GrDirectContext* dContext) { - glBindTexture(fTexTarget, fTexID); - GLenum status = GL_NO_ERROR; - if ((status = glGetError()) != GL_NO_ERROR) { - SkDebugf("glBindTexture(%#x, %d) failed (%#x)", (int) fTexTarget, - (int) fTexID, (int) status); - return; - } - glEGLImageTargetTexture2DOES(fTexTarget, fImage); - if ((status = glGetError()) != GL_NO_ERROR) { - SkDebugf("glEGLImageTargetTexture2DOES failed (%#x)", (int) status); - return; - } - dContext->resetContext(kTextureBinding_GrGLBackendState); -} - -void delete_gl_texture(void* context) { - GLTextureHelper* cleanupHelper = static_cast(context); - delete cleanupHelper; -} - -void update_gl_texture(void* context, GrDirectContext* dContext) { - GLTextureHelper* cleanupHelper = static_cast(context); - cleanupHelper->rebind(dContext); -} - -static GrBackendTexture make_gl_backend_texture( - GrDirectContext* dContext, - AHardwareBuffer* hardwareBuffer, - int width, int height, - DeleteImageProc* deleteProc, - UpdateImageProc* updateProc, - TexImageCtx* imageCtx, - bool isProtectedContent, - const GrBackendFormat& backendFormat, - bool isRenderable) { - while (GL_NO_ERROR != glGetError()) {} //clear GL errors - - EGLClientBuffer clientBuffer = eglGetNativeClientBufferANDROID(hardwareBuffer); - EGLint attribs[] = { EGL_IMAGE_PRESERVED_KHR, EGL_TRUE, - isProtectedContent ? EGL_PROTECTED_CONTENT_EXT : EGL_NONE, - isProtectedContent ? EGL_TRUE : EGL_NONE, - EGL_NONE }; - EGLDisplay display = eglGetCurrentDisplay(); - // eglCreateImageKHR will add a ref to the AHardwareBuffer - EGLImageKHR image = eglCreateImageKHR(display, EGL_NO_CONTEXT, EGL_NATIVE_BUFFER_ANDROID, - clientBuffer, attribs); - if (EGL_NO_IMAGE_KHR == image) { - SkDebugf("Could not create EGL image, err = (%#x)", (int) eglGetError() ); - return GrBackendTexture(); - } - - GrGLuint texID; - glGenTextures(1, &texID); - if (!texID) { - eglDestroyImageKHR(display, image); - return GrBackendTexture(); - } - - GrGLuint target = isRenderable ? GR_GL_TEXTURE_2D : GR_GL_TEXTURE_EXTERNAL; - - glBindTexture(target, texID); - GLenum status = GL_NO_ERROR; - if ((status = glGetError()) != GL_NO_ERROR) { - SkDebugf("glBindTexture failed (%#x)", (int) status); - glDeleteTextures(1, &texID); - eglDestroyImageKHR(display, image); - return GrBackendTexture(); - } - glEGLImageTargetTexture2DOES(target, image); - if ((status = glGetError()) != GL_NO_ERROR) { - SkDebugf("glEGLImageTargetTexture2DOES failed (%#x)", (int) status); - glDeleteTextures(1, &texID); - eglDestroyImageKHR(display, image); - return GrBackendTexture(); - } - dContext->resetContext(kTextureBinding_GrGLBackendState); - - GrGLTextureInfo textureInfo; - textureInfo.fID = texID; - SkASSERT(backendFormat.isValid()); - textureInfo.fTarget = target; - textureInfo.fFormat = GrGLFormatToEnum(backendFormat.asGLFormat()); - - *deleteProc = delete_gl_texture; - *updateProc = update_gl_texture; - *imageCtx = new GLTextureHelper(texID, image, display, target); - - return GrBackendTexture(width, height, GrMipmapped::kNo, textureInfo); -} -#endif // SK_GL - -#ifdef SK_VULKAN -class VulkanCleanupHelper { -public: - VulkanCleanupHelper(GrVkGpu* gpu, VkImage image, VkDeviceMemory memory) - : fDevice(gpu->device()) - , fImage(image) - , fMemory(memory) - , fDestroyImage(gpu->vkInterface()->fFunctions.fDestroyImage) - , fFreeMemory(gpu->vkInterface()->fFunctions.fFreeMemory) {} - ~VulkanCleanupHelper() { - fDestroyImage(fDevice, fImage, nullptr); - fFreeMemory(fDevice, fMemory, nullptr); - } -private: - VkDevice fDevice; - VkImage fImage; - VkDeviceMemory fMemory; - PFN_vkDestroyImage fDestroyImage; - PFN_vkFreeMemory fFreeMemory; -}; - -void delete_vk_image(void* context) { - VulkanCleanupHelper* cleanupHelper = static_cast(context); - delete cleanupHelper; -} - -void update_vk_image(void* context, GrDirectContext* dContext) { - // no op -} - -static GrBackendTexture make_vk_backend_texture( - GrDirectContext* dContext, AHardwareBuffer* hardwareBuffer, - int width, int height, - DeleteImageProc* deleteProc, - UpdateImageProc* updateProc, - TexImageCtx* imageCtx, - bool isProtectedContent, - const GrBackendFormat& backendFormat, - bool isRenderable, - bool fromAndroidWindow) { - SkASSERT(dContext->backend() == GrBackendApi::kVulkan); - GrVkGpu* gpu = static_cast(dContext->priv().getGpu()); - - SkASSERT(!isProtectedContent || gpu->protectedContext()); - - VkPhysicalDevice physicalDevice = gpu->physicalDevice(); - VkDevice device = gpu->device(); - - SkASSERT(gpu); - - if (!gpu->vkCaps().supportsAndroidHWBExternalMemory()) { - return GrBackendTexture(); - } - - VkFormat format; - if (!backendFormat.asVkFormat(&format)) { - SkDebugf("asVkFormat failed (valid: %d, backend: %d)", - backendFormat.isValid(), - backendFormat.backend()); - return GrBackendTexture(); - } - - VkResult err; - - VkAndroidHardwareBufferFormatPropertiesANDROID hwbFormatProps; - hwbFormatProps.sType = VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID; - hwbFormatProps.pNext = nullptr; - - VkAndroidHardwareBufferPropertiesANDROID hwbProps; - hwbProps.sType = VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID; - hwbProps.pNext = &hwbFormatProps; - - err = VK_CALL(GetAndroidHardwareBufferProperties(device, hardwareBuffer, &hwbProps)); - if (VK_SUCCESS != err) { - return GrBackendTexture(); - } - - if (hwbFormatProps.format != format) { - SkDebugf("Queried format not consistent with expected format; got: %d, expected: %d", - hwbFormatProps.format, - format); - return GrBackendTexture(); - } - - VkExternalFormatANDROID externalFormat; - externalFormat.sType = VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID; - externalFormat.pNext = nullptr; - externalFormat.externalFormat = 0; // If this is zero it is as if we aren't using this struct. - - const GrVkYcbcrConversionInfo* ycbcrConversion = backendFormat.getVkYcbcrConversionInfo(); - if (!ycbcrConversion) { - return GrBackendTexture(); - } - - if (hwbFormatProps.format != VK_FORMAT_UNDEFINED) { - // TODO: We should not assume the transfer features here and instead should have a way for - // Ganesh's tracking of intenral images to report whether or not they support transfers. - SkASSERT(SkToBool(VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT & hwbFormatProps.formatFeatures) && - SkToBool(VK_FORMAT_FEATURE_TRANSFER_SRC_BIT & hwbFormatProps.formatFeatures) && - SkToBool(VK_FORMAT_FEATURE_TRANSFER_DST_BIT & hwbFormatProps.formatFeatures)); - SkASSERT(!ycbcrConversion->isValid()); - } else { - SkASSERT(ycbcrConversion->isValid()); - // We have an external only format - SkASSERT(SkToBool(VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT & hwbFormatProps.formatFeatures)); - SkASSERT(format == VK_FORMAT_UNDEFINED); - SkASSERT(hwbFormatProps.externalFormat == ycbcrConversion->fExternalFormat); - externalFormat.externalFormat = hwbFormatProps.externalFormat; - } - - const VkExternalMemoryImageCreateInfo externalMemoryImageInfo{ - VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO, // sType - &externalFormat, // pNext - VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID, // handleTypes - }; - VkImageUsageFlags usageFlags = VK_IMAGE_USAGE_SAMPLED_BIT; - if (format != VK_FORMAT_UNDEFINED) { - usageFlags = usageFlags | - VK_IMAGE_USAGE_TRANSFER_SRC_BIT | - VK_IMAGE_USAGE_TRANSFER_DST_BIT; - if (isRenderable) { - usageFlags = usageFlags | VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT; - } - } - - // TODO: Check the supported tilings vkGetPhysicalDeviceImageFormatProperties2 to see if we have - // to use linear. Add better linear support throughout Ganesh. - VkImageTiling tiling = VK_IMAGE_TILING_OPTIMAL; - - VkImageCreateFlags flags = isProtectedContent ? VK_IMAGE_CREATE_PROTECTED_BIT : 0; - - const VkImageCreateInfo imageCreateInfo = { - VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, // sType - &externalMemoryImageInfo, // pNext - flags, // VkImageCreateFlags - VK_IMAGE_TYPE_2D, // VkImageType - format, // VkFormat - { (uint32_t)width, (uint32_t)height, 1 }, // VkExtent3D - 1, // mipLevels - 1, // arrayLayers - VK_SAMPLE_COUNT_1_BIT, // samples - tiling, // VkImageTiling - usageFlags, // VkImageUsageFlags - VK_SHARING_MODE_EXCLUSIVE, // VkSharingMode - 0, // queueFamilyCount - nullptr, // pQueueFamilyIndices - VK_IMAGE_LAYOUT_UNDEFINED, // initialLayout - }; - - VkImage image; - err = VK_CALL(CreateImage(device, &imageCreateInfo, nullptr, &image)); - if (VK_SUCCESS != err) { - return GrBackendTexture(); - } - - VkPhysicalDeviceMemoryProperties2 phyDevMemProps; - phyDevMemProps.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2; - phyDevMemProps.pNext = nullptr; - - uint32_t typeIndex = 0; - bool foundHeap = false; - VK_CALL(GetPhysicalDeviceMemoryProperties2(physicalDevice, &phyDevMemProps)); - uint32_t memTypeCnt = phyDevMemProps.memoryProperties.memoryTypeCount; - for (uint32_t i = 0; i < memTypeCnt && !foundHeap; ++i) { - if (hwbProps.memoryTypeBits & (1 << i)) { - const VkPhysicalDeviceMemoryProperties& pdmp = phyDevMemProps.memoryProperties; - uint32_t supportedFlags = pdmp.memoryTypes[i].propertyFlags & - VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT; - if (supportedFlags == VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT) { - typeIndex = i; - foundHeap = true; - } - } - } - - // Fallback to use any available memory type for AHB - // - // For external memory import, compatible memory types are decided by the Vulkan driver since - // the memory has been allocated externally. There are usually special requirements against - // external memory. e.g. AHB allocated with CPU R/W often usage bits is only importable for - // non-device-local heap on some AMD systems. - if (!foundHeap && hwbProps.memoryTypeBits) { - typeIndex = ffs(hwbProps.memoryTypeBits) - 1; - foundHeap = true; - } - - if (!foundHeap) { - VK_CALL(DestroyImage(device, image, nullptr)); - return GrBackendTexture(); - } - - VkImportAndroidHardwareBufferInfoANDROID hwbImportInfo; - hwbImportInfo.sType = VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID; - hwbImportInfo.pNext = nullptr; - hwbImportInfo.buffer = hardwareBuffer; - - VkMemoryDedicatedAllocateInfo dedicatedAllocInfo; - dedicatedAllocInfo.sType = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO; - dedicatedAllocInfo.pNext = &hwbImportInfo; - dedicatedAllocInfo.image = image; - dedicatedAllocInfo.buffer = VK_NULL_HANDLE; - - VkMemoryAllocateInfo allocInfo = { - VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, // sType - &dedicatedAllocInfo, // pNext - hwbProps.allocationSize, // allocationSize - typeIndex, // memoryTypeIndex - }; - - VkDeviceMemory memory; - - err = VK_CALL(AllocateMemory(device, &allocInfo, nullptr, &memory)); - if (VK_SUCCESS != err) { - VK_CALL(DestroyImage(device, image, nullptr)); - return GrBackendTexture(); - } - - VkBindImageMemoryInfo bindImageInfo; - bindImageInfo.sType = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO; - bindImageInfo.pNext = nullptr; - bindImageInfo.image = image; - bindImageInfo.memory = memory; - bindImageInfo.memoryOffset = 0; - - err = VK_CALL(BindImageMemory2(device, 1, &bindImageInfo)); - if (VK_SUCCESS != err) { - VK_CALL(DestroyImage(device, image, nullptr)); - VK_CALL(FreeMemory(device, memory, nullptr)); - return GrBackendTexture(); - } - - skgpu::VulkanAlloc alloc; - alloc.fMemory = memory; - alloc.fOffset = 0; - alloc.fSize = hwbProps.allocationSize; - alloc.fFlags = 0; - - GrVkImageInfo imageInfo; - imageInfo.fImage = image; - imageInfo.fAlloc = alloc; - imageInfo.fImageTiling = tiling; - imageInfo.fImageLayout = VK_IMAGE_LAYOUT_UNDEFINED; - imageInfo.fFormat = format; - imageInfo.fLevelCount = 1; - // TODO: This should possibly be VK_QUEUE_FAMILY_FOREIGN_EXT but current Adreno devices do not - // support that extension. Or if we know the source of the AHardwareBuffer is not from a - // "foreign" device we can leave them as external. - imageInfo.fCurrentQueueFamily = VK_QUEUE_FAMILY_EXTERNAL; - imageInfo.fProtected = isProtectedContent ? GrProtected::kYes : GrProtected::kNo; - imageInfo.fYcbcrConversionInfo = *ycbcrConversion; - imageInfo.fSharingMode = imageCreateInfo.sharingMode; -#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK - imageInfo.fPartOfSwapchainOrAndroidWindow = fromAndroidWindow; -#endif - - *deleteProc = delete_vk_image; - *updateProc = update_vk_image; - *imageCtx = new VulkanCleanupHelper(gpu, image, memory); - - return GrBackendTexture(width, height, imageInfo); -} -#endif // SK_VULKAN - -#ifdef SK_GL -static bool can_import_protected_content_eglimpl() { - EGLDisplay dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY); - const char* exts = eglQueryString(dpy, EGL_EXTENSIONS); - size_t cropExtLen = strlen(PROT_CONTENT_EXT_STR); - size_t extsLen = strlen(exts); - bool equal = !strcmp(PROT_CONTENT_EXT_STR, exts); - bool atStart = !strncmp(PROT_CONTENT_EXT_STR " ", exts, cropExtLen+1); - bool atEnd = (cropExtLen+1) < extsLen - && !strcmp(" " PROT_CONTENT_EXT_STR, - exts + extsLen - (cropExtLen+1)); - bool inMiddle = strstr(exts, " " PROT_CONTENT_EXT_STR " "); - return equal || atStart || atEnd || inMiddle; -} -#endif // SK_GL - -static bool can_import_protected_content(GrDirectContext* dContext) { - if (GrBackendApi::kOpenGL == dContext->backend()) { -#ifdef SK_GL - // Only compute whether the extension is present once the first time this - // function is called. - static bool hasIt = can_import_protected_content_eglimpl(); - return hasIt; -#endif // SK_GL - } else if (GrBackendApi::kVulkan == dContext->backend()) { -#ifdef SK_VULKAN - return static_cast(dContext->priv().getGpu())->protectedContext(); -#endif // SK_VULKAN - } - return false; -} - GrBackendTexture MakeBackendTexture(GrDirectContext* dContext, AHardwareBuffer* hardwareBuffer, int width, int height, @@ -601,28 +81,28 @@ GrBackendTexture MakeBackendTexture(GrDirectContext* dContext, if (!dContext || dContext->abandoned()) { return GrBackendTexture(); } - bool createProtectedImage = isProtectedContent && can_import_protected_content(dContext); if (GrBackendApi::kOpenGL == dContext->backend()) { #ifdef SK_GL - return make_gl_backend_texture(dContext, hardwareBuffer, width, height, deleteProc, - updateProc, imageCtx, createProtectedImage, backendFormat, - isRenderable); + return MakeGLBackendTexture(dContext, hardwareBuffer, width, height, deleteProc, + updateProc, imageCtx, isProtectedContent, backendFormat, + isRenderable); #else return GrBackendTexture(); #endif // SK_GL } else { SkASSERT(GrBackendApi::kVulkan == dContext->backend()); #ifdef SK_VULKAN - return make_vk_backend_texture(dContext, hardwareBuffer, width, height, deleteProc, - updateProc, imageCtx, createProtectedImage, backendFormat, - isRenderable, fromAndroidWindow); + return MakeVulkanBackendTexture(dContext, hardwareBuffer, width, height, deleteProc, + updateProc, imageCtx, isProtectedContent, backendFormat, + isRenderable, fromAndroidWindow); #else return GrBackendTexture(); #endif // SK_VULKAN } } +#endif -} // GrAHardwareBufferUtils +} // namespace GrAHardwareBufferUtils #endif diff --git a/src/gpu/ganesh/GrAttachment.h b/src/gpu/ganesh/GrAttachment.h index 462cdc64ed07..f912d59e013d 100644 --- a/src/gpu/ganesh/GrAttachment.h +++ b/src/gpu/ganesh/GrAttachment.h @@ -11,6 +11,7 @@ #include "src/core/SkClipStack.h" #include "src/gpu/ganesh/GrSurface.h" +class GrCaps; class GrRenderTarget; /** diff --git a/src/gpu/ganesh/GrBackendSurface.cpp b/src/gpu/ganesh/GrBackendSurface.cpp index b35872c37321..e523c1f015ce 100644 --- a/src/gpu/ganesh/GrBackendSurface.cpp +++ b/src/gpu/ganesh/GrBackendSurface.cpp @@ -9,14 +9,9 @@ #include "include/core/SkTextureCompressionType.h" #include "include/private/base/SkAssert.h" -#include "include/private/base/SkTo.h" #include "include/private/gpu/ganesh/GrTypesPriv.h" #include "src/gpu/MutableTextureStateRef.h" - -#if defined(SK_GL) -#include "src/gpu/ganesh/gl/GrGLDefines.h" -#include "src/gpu/ganesh/gl/GrGLUtil.h" -#endif +#include "src/gpu/ganesh/GrBackendSurfacePriv.h" #ifdef SK_DAWN #include "include/gpu/dawn/GrDawnTypes.h" @@ -28,8 +23,6 @@ #include "include/gpu/vk/GrVkTypes.h" #include "src/gpu/ganesh/vk/GrVkUtil.h" #include "src/gpu/vk/VulkanUtilsPriv.h" - -#include #endif #ifdef SK_METAL @@ -44,8 +37,19 @@ #include #include +#include namespace skgpu { class MutableTextureState; } +GrBackendFormat::GrBackendFormat(){}; +GrBackendFormat::~GrBackendFormat() = default; + +GrBackendFormat::GrBackendFormat(GrTextureType texture, + GrBackendApi api, + std::unique_ptr data) + : fBackend(api) + , fValid(data != nullptr) + , fFormatData(std::move(data)) + , fTextureType(texture) {} GrBackendFormat::GrBackendFormat(const GrBackendFormat& that) : fBackend(that.fBackend) @@ -56,11 +60,10 @@ GrBackendFormat::GrBackendFormat(const GrBackendFormat& that) } switch (fBackend) { -#ifdef SK_GL case GrBackendApi::kOpenGL: - fGLFormat = that.fGLFormat; - break; -#endif + SkASSERT(that.fFormatData); + fFormatData.reset(that.fFormatData->copy()); + break; // fFormatData is sufficient #ifdef SK_VULKAN case GrBackendApi::kVulkan: fVk = that.fVk; @@ -97,44 +100,6 @@ GrBackendFormat& GrBackendFormat::operator=(const GrBackendFormat& that) { return *this; } -#ifdef SK_GL - -static GrTextureType gl_target_to_gr_target(GrGLenum target) { - switch (target) { - case GR_GL_TEXTURE_NONE: - return GrTextureType::kNone; - case GR_GL_TEXTURE_2D: - return GrTextureType::k2D; - case GR_GL_TEXTURE_RECTANGLE: - return GrTextureType::kRectangle; - case GR_GL_TEXTURE_EXTERNAL: - return GrTextureType::kExternal; - default: - SkUNREACHABLE; - } -} - -GrBackendFormat::GrBackendFormat(GrGLenum format, GrGLenum target) - : fBackend(GrBackendApi::kOpenGL) - , fValid(true) - , fGLFormat(format) - , fTextureType(gl_target_to_gr_target(target)) {} - -GrGLFormat GrBackendFormat::asGLFormat() const { - if (this->isValid() && GrBackendApi::kOpenGL == fBackend) { - return GrGLFormatFromGLEnum(fGLFormat); - } - return GrGLFormat::kUnknown; -} - -GrGLenum GrBackendFormat::asGLFormatEnum() const { - if (this->isValid() && GrBackendApi::kOpenGL == fBackend) { - return fGLFormat; - } - return 0; -} -#endif - #ifdef SK_VULKAN GrBackendFormat GrBackendFormat::MakeVk(const GrVkYcbcrConversionInfo& ycbcrInfo, bool willUseDRMFormatModifiers) { @@ -240,10 +205,8 @@ uint32_t GrBackendFormat::channelMask() const { return 0; } switch (fBackend) { -#ifdef SK_GL case GrBackendApi::kOpenGL: - return GrGLFormatChannels(GrGLFormatFromGLEnum(fGLFormat)); -#endif + return fFormatData->channelMask(); #ifdef SK_VULKAN case GrBackendApi::kVulkan: return skgpu::VkFormatChannels(fVk.fFormat); @@ -273,10 +236,8 @@ GrColorFormatDesc GrBackendFormat::desc() const { return GrColorFormatDesc::MakeInvalid(); } switch (fBackend) { -#ifdef SK_GL case GrBackendApi::kOpenGL: - return GrGLFormatDesc(GrGLFormatFromGLEnum(fGLFormat)); -#endif + return fFormatData->desc(); #ifdef SK_VULKAN case GrBackendApi::kVulkan: return GrVkFormatDesc(fVk.fFormat); @@ -378,10 +339,8 @@ bool GrBackendFormat::operator==(const GrBackendFormat& that) const { } switch (fBackend) { -#ifdef SK_GL case GrBackendApi::kOpenGL: - return fGLFormat == that.fGLFormat; -#endif + return fFormatData->equal(that.fFormatData.get()); #ifdef SK_VULKAN case GrBackendApi::kVulkan: return fVk.fFormat == that.fVk.fFormat && @@ -423,9 +382,7 @@ SkString GrBackendFormat::toStr() const { switch (fBackend) { case GrBackendApi::kOpenGL: -#ifdef SK_GL - str.append(GrGLFormatToStr(fGLFormat)); -#endif + str.append(fFormatData->toString()); break; case GrBackendApi::kVulkan: #ifdef SK_VULKAN @@ -461,6 +418,22 @@ SkString GrBackendFormat::toStr() const { /////////////////////////////////////////////////////////////////////////////////////////////////// GrBackendTexture::GrBackendTexture() : fIsValid(false) {} +GrBackendTexture::GrBackendTexture(int width, + int height, + std::string_view label, + skgpu::Mipmapped mipped, + GrBackendApi backend, + GrTextureType texture, + std::unique_ptr data) + : fIsValid(data != nullptr) + , fWidth(width) + , fHeight(height) + , fLabel(label) + , fMipmapped(mipped) + , fBackend(backend) + , fTextureType(texture) + , fTextureData(std::move(data)) {} + #ifdef SK_DAWN GrBackendTexture::GrBackendTexture(int width, int height, @@ -531,30 +504,6 @@ GrBackendTexture::GrBackendTexture(int width, , fMutableState(std::move(mutableState)) {} #endif -#ifdef SK_GL -GrBackendTexture::GrBackendTexture(int width, - int height, - GrMipmapped mipmapped, - const GrGLTextureInfo glInfo, - sk_sp params, - std::string_view label) - : fIsValid(true) - , fWidth(width) - , fHeight(height) - , fLabel(label) - , fMipmapped(mipmapped) - , fBackend(GrBackendApi::kOpenGL) - , fTextureType(gl_target_to_gr_target(glInfo.fTarget)) - , fGLInfo(glInfo, params.release()) {} - -sk_sp GrBackendTexture::getGLTextureParams() const { - if (fBackend != GrBackendApi::kOpenGL) { - return nullptr; - } - return fGLInfo.refParameters(); -} -#endif - #ifdef SK_METAL GrBackendTexture::GrBackendTexture(int width, int height, @@ -598,19 +547,6 @@ GrBackendTexture::GrBackendTexture(int width, , fD3DInfo(d3dInfo, state.release()) {} #endif -#ifdef SK_GL -GrBackendTexture::GrBackendTexture(int width, - int height, - GrMipmapped mipmapped, - const GrGLTextureInfo& glInfo, - std::string_view label) - : GrBackendTexture( - width, height, mipmapped, glInfo, sk_make_sp(), label) { - // Make no assumptions about client's texture's parameters. - this->glTextureParametersModified(); -} -#endif - GrBackendTexture::GrBackendTexture(int width, int height, GrMipmapped mipmapped, @@ -630,11 +566,6 @@ GrBackendTexture::~GrBackendTexture() { } void GrBackendTexture::cleanup() { -#ifdef SK_GL - if (this->isValid() && GrBackendApi::kOpenGL == fBackend) { - fGLInfo.cleanup(); - } -#endif #ifdef SK_VULKAN if (this->isValid() && GrBackendApi::kVulkan == fBackend) { fVkInfo.cleanup(); @@ -659,6 +590,7 @@ GrBackendTexture& GrBackendTexture::operator=(const GrBackendTexture& that) { } else if (fIsValid && this->fBackend != that.fBackend) { this->cleanup(); fIsValid = false; + fTextureData.reset(); } fWidth = that.fWidth; fHeight = that.fHeight; @@ -667,11 +599,9 @@ GrBackendTexture& GrBackendTexture::operator=(const GrBackendTexture& that) { fTextureType = that.fTextureType; switch (that.fBackend) { -#ifdef SK_GL case GrBackendApi::kOpenGL: - fGLInfo.assign(that.fGLInfo, this->isValid()); + fTextureData.reset(that.fTextureData->copy()); break; -#endif #ifdef SK_VULKAN case GrBackendApi::kVulkan: fVkInfo.assign(that.fVkInfo, this->isValid()); @@ -766,32 +696,6 @@ sk_sp GrBackendTexture::getGrD3DResourceState() const { } #endif -#ifdef SK_GL -bool GrBackendTexture::getGLTextureInfo(GrGLTextureInfo* outInfo) const { - if (this->isValid() && GrBackendApi::kOpenGL == fBackend) { - *outInfo = fGLInfo.info(); - return true; - } - else if (this->isValid() && GrBackendApi::kMock == fBackend) { - // Hack! This allows some blink unit tests to work when using the Mock GrContext. - // Specifically, tests that rely on CanvasResourceProviderTextureGpuMemoryBuffer. - // If that code ever goes away (or ideally becomes backend-agnostic), this can go away. - *outInfo = GrGLTextureInfo{ GR_GL_TEXTURE_2D, - static_cast(fMockInfo.id()), - GR_GL_RGBA8, - GrProtected(fMockInfo.isProtected()) }; - return true; - } - return false; -} - -void GrBackendTexture::glTextureParametersModified() { - if (this->isValid() && fBackend == GrBackendApi::kOpenGL) { - fGLInfo.parameters()->invalidate(); - } -} -#endif - bool GrBackendTexture::getMockTextureInfo(GrMockTextureInfo* outInfo) const { if (this->isValid() && GrBackendApi::kMock == fBackend) { *outInfo = fMockInfo; @@ -808,11 +712,9 @@ bool GrBackendTexture::isProtected() const { if (!this->isValid()) { return false; } -#ifdef SK_GL if (this->backend() == GrBackendApi::kOpenGL) { - return fGLInfo.isProtected(); + return fTextureData->isProtected(); } -#endif #ifdef SK_VULKAN if (this->backend() == GrBackendApi::kVulkan) { return fVkInfo.isProtected(); @@ -833,10 +735,8 @@ bool GrBackendTexture::isSameTexture(const GrBackendTexture& that) { return false; } switch (fBackend) { -#ifdef SK_GL case GrBackendApi::kOpenGL: - return fGLInfo.info().fID == that.fGLInfo.info().fID; -#endif + return fTextureData->isSameTexture(that.fTextureData.get()); #ifdef SK_VULKAN case GrBackendApi::kVulkan: return fVkInfo.snapImageInfo(fMutableState.get()).fImage == @@ -868,10 +768,8 @@ GrBackendFormat GrBackendTexture::getBackendFormat() const { return GrBackendFormat(); } switch (fBackend) { -#ifdef SK_GL case GrBackendApi::kOpenGL: - return GrBackendFormat::MakeGL(fGLInfo.info().fFormat, fGLInfo.info().fTarget); -#endif + return fTextureData->getBackendFormat(); #ifdef SK_VULKAN case GrBackendApi::kVulkan: { auto info = fVkInfo.snapImageInfo(fMutableState.get()); @@ -928,10 +826,8 @@ bool GrBackendTexture::TestingOnly_Equals(const GrBackendTexture& t0, const GrBa } switch (t0.fBackend) { -#ifdef SK_GL case GrBackendApi::kOpenGL: - return t0.fGLInfo.info() == t1.fGLInfo.info(); -#endif + return t0.fTextureData->equal(t1.fTextureData.get()); case GrBackendApi::kMock: return t0.fMockInfo == t1.fMockInfo; #ifdef SK_VULKAN @@ -960,6 +856,21 @@ bool GrBackendTexture::TestingOnly_Equals(const GrBackendTexture& t0, const GrBa GrBackendRenderTarget::GrBackendRenderTarget() : fIsValid(false) {} +GrBackendRenderTarget::GrBackendRenderTarget(int width, + int height, + int sampleCnt, + int stencilBits, + GrBackendApi backend, + bool framebufferOnly, + std::unique_ptr data) + : fIsValid(data && data->isValid()) + , fFramebufferOnly(framebufferOnly) + , fWidth(width) + , fHeight(height) + , fSampleCnt(sampleCnt) + , fStencilBits(stencilBits) + , fBackend(backend) + , fRTData(std::move(data)) {} #ifdef SK_DAWN GrBackendRenderTarget::GrBackendRenderTarget(int width, @@ -1056,21 +967,6 @@ GrBackendRenderTarget::GrBackendRenderTarget(int width, , fBackend(GrBackendApi::kDirect3D) , fD3DInfo(d3dInfo, state.release()) {} #endif -#ifdef SK_GL -GrBackendRenderTarget::GrBackendRenderTarget(int width, - int height, - int sampleCnt, - int stencilBits, - const GrGLFramebufferInfo& glInfo) - : fWidth(width) - , fHeight(height) - , fSampleCnt(std::max(1, sampleCnt)) - , fStencilBits(stencilBits) - , fBackend(GrBackendApi::kOpenGL) - , fGLInfo(glInfo) { - fIsValid = SkToBool(glInfo.fFormat); // the glInfo must have a valid format -} -#endif GrBackendRenderTarget::GrBackendRenderTarget(int width, int height, @@ -1122,11 +1018,13 @@ GrBackendRenderTarget& GrBackendRenderTarget::operator=(const GrBackendRenderTar fBackend = that.fBackend; switch (that.fBackend) { -#ifdef SK_GL case GrBackendApi::kOpenGL: - fGLInfo = that.fGLInfo; + if (that.fRTData) { + fRTData.reset(that.fRTData->copy()); + } else { + fRTData = nullptr; + } break; -#endif #ifdef SK_VULKAN case GrBackendApi::kVulkan: fVkInfo.assign(that.fVkInfo, this->isValid()); @@ -1221,25 +1119,13 @@ sk_sp GrBackendRenderTarget::getGrD3DResourceState() const { } #endif -#ifdef SK_GL -bool GrBackendRenderTarget::getGLFramebufferInfo(GrGLFramebufferInfo* outInfo) const { - if (this->isValid() && GrBackendApi::kOpenGL == fBackend) { - *outInfo = fGLInfo; - return true; - } - return false; -} -#endif - GrBackendFormat GrBackendRenderTarget::getBackendFormat() const { if (!this->isValid()) { return GrBackendFormat(); } switch (fBackend) { -#ifdef SK_GL case GrBackendApi::kOpenGL: - return GrBackendFormat::MakeGL(fGLInfo.fFormat, GR_GL_TEXTURE_NONE); -#endif + return fRTData->getBackendFormat(); #ifdef SK_VULKAN case GrBackendApi::kVulkan: { auto info = fVkInfo.snapImageInfo(fMutableState.get()); @@ -1293,11 +1179,9 @@ bool GrBackendRenderTarget::isProtected() const { if (!this->isValid()) { return false; } -#ifdef SK_GL if (this->backend() == GrBackendApi::kOpenGL) { - return fGLInfo.isProtected(); + return fRTData->isProtected(); } -#endif #ifdef SK_VULKAN if (this->backend() == GrBackendApi::kVulkan) { return fVkInfo.isProtected(); @@ -1326,10 +1210,8 @@ bool GrBackendRenderTarget::TestingOnly_Equals(const GrBackendRenderTarget& r0, } switch (r0.fBackend) { -#ifdef SK_GL case GrBackendApi::kOpenGL: - return r0.fGLInfo == r1.fGLInfo; -#endif + return r0.fRTData->equal(r1.fRTData.get()); case GrBackendApi::kMock: return r0.fMockInfo == r1.fMockInfo; #ifdef SK_VULKAN @@ -1356,3 +1238,7 @@ bool GrBackendRenderTarget::TestingOnly_Equals(const GrBackendRenderTarget& r0, return false; } #endif + +GrBackendFormatData::~GrBackendFormatData() {} +GrBackendTextureData::~GrBackendTextureData() {} +GrBackendRenderTargetData::~GrBackendRenderTargetData() {} diff --git a/src/gpu/ganesh/GrBackendSurfacePriv.h b/src/gpu/ganesh/GrBackendSurfacePriv.h new file mode 100644 index 000000000000..a9ff95625ca3 --- /dev/null +++ b/src/gpu/ganesh/GrBackendSurfacePriv.h @@ -0,0 +1,131 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef GrBackendSurfacePriv_DEFINED +#define GrBackendSurfacePriv_DEFINED + +#include "include/gpu/GrBackendSurface.h" +#include "include/private/base/SkAssert.h" +#include "include/private/gpu/ganesh/GrTypesPriv.h" + +#include +#include +#include +#include +#include +#include + +enum class GrBackendApi : unsigned int; +enum class SkTextureCompressionType; +namespace skgpu { enum class Mipmapped : bool; } + +class GrBackendFormatData { +public: + virtual ~GrBackendFormatData(); + virtual SkTextureCompressionType compressionType() const = 0; + virtual size_t bytesPerBlock() const = 0; + virtual int stencilBits() const = 0; + virtual bool equal(const GrBackendFormatData* that) const = 0; +#if defined(SK_DEBUG) + virtual GrBackendApi type() const = 0; +#endif +protected: + GrBackendFormatData() = default; + +private: + friend class GrBackendFormat; + virtual uint32_t channelMask() const = 0; + virtual GrColorFormatDesc desc() const = 0; + virtual std::string toString() const = 0; + virtual GrBackendFormatData* copy() const = 0; +}; + +class GrBackendTextureData { +public: + virtual ~GrBackendTextureData(); +#if defined(SK_DEBUG) + virtual GrBackendApi type() const = 0; +#endif +protected: + GrBackendTextureData() = default; + +private: + friend class GrBackendTexture; + virtual bool isProtected() const = 0; + virtual bool equal(const GrBackendTextureData* that) const = 0; + virtual bool isSameTexture(const GrBackendTextureData*) const = 0; + virtual GrBackendFormat getBackendFormat() const = 0; + virtual GrBackendTextureData* copy() const = 0; +}; + +class GrBackendRenderTargetData { +public: + virtual ~GrBackendRenderTargetData(); +#if defined(SK_DEBUG) + virtual GrBackendApi type() const = 0; +#endif +protected: + GrBackendRenderTargetData() = default; + +private: + friend class GrBackendRenderTarget; + virtual bool isValid() const = 0; + virtual GrBackendFormat getBackendFormat() const = 0; + virtual bool isProtected() const = 0; + virtual bool equal(const GrBackendRenderTargetData* that) const = 0; + virtual GrBackendRenderTargetData* copy() const = 0; +}; + +class GrBackendSurfacePriv final { +public: + static GrBackendFormat MakeGrBackendFormat(GrTextureType textureType, + GrBackendApi api, + std::unique_ptr data) { + return GrBackendFormat(textureType, api, std::move(data)); + } + + static const GrBackendFormatData* GetBackendData(const GrBackendFormat& format) { + return format.fFormatData.get(); + } + + static GrBackendTexture MakeGrBackendTexture(int width, + int height, + std::string_view label, + skgpu::Mipmapped mipped, + GrBackendApi backend, + GrTextureType texture, + std::unique_ptr data) { + return GrBackendTexture(width, height, label, mipped, backend, texture, std::move(data)); + } + + static GrBackendTextureData* GetBackendData(const GrBackendTexture& tex) { + return tex.fTextureData.get(); + } + + static GrBackendTextureData* GetBackendData(GrBackendTexture* tex) { + SkASSERT(tex); + return tex->fTextureData.get(); + } + + static GrBackendRenderTarget MakeGrBackendRenderTarget( + int width, + int height, + int sampleCnt, + int stencilBits, + GrBackendApi backend, + bool framebufferOnly, + std::unique_ptr data) { + return GrBackendRenderTarget( + width, height, sampleCnt, stencilBits, backend, framebufferOnly, std::move(data)); + } + + static const GrBackendRenderTargetData* GetBackendData(const GrBackendRenderTarget& rt) { + return rt.fRTData.get(); + } +}; + +#endif diff --git a/src/gpu/ganesh/GrBackendUtils.cpp b/src/gpu/ganesh/GrBackendUtils.cpp index 92d0cf841cd7..95e6022dce56 100644 --- a/src/gpu/ganesh/GrBackendUtils.cpp +++ b/src/gpu/ganesh/GrBackendUtils.cpp @@ -12,13 +12,9 @@ #include "include/gpu/GrTypes.h" #include "include/private/base/SkAssert.h" // IWYU pragma: keep #include "include/private/gpu/ganesh/GrTypesPriv.h" +#include "src/gpu/ganesh/GrBackendSurfacePriv.h" #include "src/gpu/ganesh/GrDataUtils.h" -#ifdef SK_GL -#include "include/gpu/gl/GrGLTypes.h" -#include "src/gpu/ganesh/gl/GrGLUtil.h" -#endif - #ifdef SK_VULKAN #include "include/private/gpu/vk/SkiaVulkan.h" #include "src/gpu/vk/VulkanUtilsPriv.h" @@ -42,22 +38,7 @@ namespace wgpu { enum class TextureFormat : uint32_t; } SkTextureCompressionType GrBackendFormatToCompressionType(const GrBackendFormat& format) { switch (format.backend()) { case GrBackendApi::kOpenGL: { -#ifdef SK_GL - GrGLFormat glFormat = format.asGLFormat(); - switch (glFormat) { - case GrGLFormat::kCOMPRESSED_ETC1_RGB8: - case GrGLFormat::kCOMPRESSED_RGB8_ETC2: - return SkTextureCompressionType::kETC2_RGB8_UNORM; - case GrGLFormat::kCOMPRESSED_RGB8_BC1: - return SkTextureCompressionType::kBC1_RGB8_UNORM; - case GrGLFormat::kCOMPRESSED_RGBA8_BC1: - return SkTextureCompressionType::kBC1_RGBA8_UNORM; - default: - return SkTextureCompressionType::kNone; - } -#else - break; -#endif + return GrBackendSurfacePriv::GetBackendData(format)->compressionType(); } case GrBackendApi::kVulkan: { #ifdef SK_VULKAN @@ -111,12 +92,7 @@ SkTextureCompressionType GrBackendFormatToCompressionType(const GrBackendFormat& size_t GrBackendFormatBytesPerBlock(const GrBackendFormat& format) { switch (format.backend()) { case GrBackendApi::kOpenGL: { -#ifdef SK_GL - GrGLFormat glFormat = format.asGLFormat(); - return GrGLFormatBytesPerBlock(glFormat); -#else - break; -#endif + return GrBackendSurfacePriv::GetBackendData(format)->bytesPerBlock(); } case GrBackendApi::kVulkan: { #ifdef SK_VULKAN @@ -176,12 +152,7 @@ size_t GrBackendFormatBytesPerPixel(const GrBackendFormat& format) { int GrBackendFormatStencilBits(const GrBackendFormat& format) { switch (format.backend()) { case GrBackendApi::kOpenGL: { -#ifdef SK_GL - GrGLFormat glFormat = format.asGLFormat(); - return GrGLFormatStencilBits(glFormat); -#else - break; -#endif + return GrBackendSurfacePriv::GetBackendData(format)->stencilBits(); } case GrBackendApi::kVulkan: { #ifdef SK_VULKAN diff --git a/src/gpu/ganesh/GrBlurUtils.cpp b/src/gpu/ganesh/GrBlurUtils.cpp index 1141b06be088..6f80ea08235b 100644 --- a/src/gpu/ganesh/GrBlurUtils.cpp +++ b/src/gpu/ganesh/GrBlurUtils.cpp @@ -11,6 +11,7 @@ #include "include/core/SkBitmap.h" #include "include/core/SkBlendMode.h" #include "include/core/SkBlurTypes.h" +#include "include/core/SkCanvas.h" #include "include/core/SkColorPriv.h" #include "include/core/SkColorSpace.h" #include "include/core/SkData.h" @@ -29,6 +30,7 @@ #include "include/core/SkSize.h" #include "include/core/SkString.h" #include "include/core/SkStrokeRec.h" +#include "include/core/SkSurface.h" #include "include/core/SkSurfaceProps.h" #include "include/core/SkTileMode.h" #include "include/effects/SkRuntimeEffect.h" @@ -43,22 +45,24 @@ #include "include/private/base/SkFloatingPoint.h" #include "include/private/base/SkMath.h" #include "include/private/base/SkTemplates.h" +#include "include/private/base/SkTo.h" #include "include/private/gpu/ganesh/GrTypesPriv.h" +#include "src/base/SkMathPriv.h" #include "src/base/SkTLazy.h" #include "src/core/SkBlurMaskFilterImpl.h" #include "src/core/SkDraw.h" -#include "src/core/SkGpuBlurUtils.h" #include "src/core/SkMask.h" #include "src/core/SkMaskFilterBase.h" -#include "src/core/SkMatrixProvider.h" #include "src/core/SkRRectPriv.h" #include "src/core/SkRuntimeEffectPriv.h" +#include "src/core/SkTraceEvent.h" #include "src/gpu/ResourceKey.h" #include "src/gpu/SkBackingFit.h" #include "src/gpu/Swizzle.h" #include "src/gpu/ganesh/GrCaps.h" #include "src/gpu/ganesh/GrClip.h" #include "src/gpu/ganesh/GrColorInfo.h" +#include "src/gpu/ganesh/GrColorSpaceXform.h" #include "src/gpu/ganesh/GrDirectContextPriv.h" #include "src/gpu/ganesh/GrFixedClip.h" #include "src/gpu/ganesh/GrFragmentProcessor.h" @@ -75,14 +79,19 @@ #include "src/gpu/ganesh/GrThreadSafeCache.h" #include "src/gpu/ganesh/GrUtil.h" #include "src/gpu/ganesh/SkGr.h" +#include "src/gpu/ganesh/SurfaceContext.h" #include "src/gpu/ganesh/SurfaceDrawContext.h" +#include "src/gpu/ganesh/SurfaceFillContext.h" #include "src/gpu/ganesh/effects/GrBlendFragmentProcessor.h" +#include "src/gpu/ganesh/effects/GrGaussianConvolutionFragmentProcessor.h" +#include "src/gpu/ganesh/effects/GrMatrixConvolutionEffect.h" #include "src/gpu/ganesh/effects/GrMatrixEffect.h" #include "src/gpu/ganesh/effects/GrSkSLFP.h" #include "src/gpu/ganesh/effects/GrTextureEffect.h" #include "src/gpu/ganesh/geometry/GrStyledShape.h" #include +#include #include #include #include @@ -92,6 +101,8 @@ #include #include +namespace GrBlurUtils { + static bool clip_bounds_quick_reject(const SkIRect& clipBounds, const SkIRect& rect) { return clipBounds.isEmpty() || rect.isEmpty() || !SkIRect::Intersects(clipBounds, rect); } @@ -125,7 +136,7 @@ static bool draw_mask(skgpu::ganesh::SurfaceDrawContext* sdc, } static void mask_release_proc(void* addr, void* /*context*/) { - SkMask::FreeImage(addr); + SkMaskBuilder::FreeImage(addr); } // This stores the mapping from an unclipped, integerized, device-space, shape bounds to @@ -191,12 +202,13 @@ static GrSurfaceProxyView sw_create_filtered_mask(GrRecordingContext* rContext, devPath.transform(viewMatrix); - SkMask srcM, dstM; + SkMaskBuilder srcM, dstM; if (!SkDraw::DrawToMask(devPath, clipBounds, filter, &viewMatrix, &srcM, - SkMask::kComputeBoundsAndRenderImage_CreateMode, fillOrHairline)) { + SkMaskBuilder::kComputeBoundsAndRenderImage_CreateMode, + fillOrHairline)) { return {}; } - SkAutoMaskFreeImage autoSrc(srcM.fImage); + SkAutoMaskFreeImage autoSrc(srcM.image()); SkASSERT(SkMask::kA8_Format == srcM.fFormat); @@ -204,7 +216,7 @@ static GrSurfaceProxyView sw_create_filtered_mask(GrRecordingContext* rContext, return {}; } // this will free-up dstM when we're done (allocated in filterMask()) - SkAutoMaskFreeImage autoDst(dstM.fImage); + SkAutoMaskFreeImage autoDst(dstM.image()); if (clip_bounds_quick_reject(clipBounds, dstM.fBounds)) { return {}; @@ -378,7 +390,7 @@ static bool can_filter_mask(const SkMaskFilterBase* maskFilter, } auto bmf = static_cast(maskFilter); SkScalar xformedSigma = bmf->computeXformedSigma(ctm); - if (SkGpuBlurUtils::IsEffectivelyZeroSigma(xformedSigma)) { + if (IsEffectivelyZeroSigma(xformedSigma)) { *maskRect = devSpaceShapeBounds; return maskRect->intersect(clipBounds); } @@ -660,7 +672,7 @@ static std::unique_ptr create_profile_effect(GrRecordingCon static std::unique_ptr make_circle_blur(GrRecordingContext* context, const SkRect& circle, float sigma) { - if (SkGpuBlurUtils::IsEffectivelyZeroSigma(sigma)) { + if (IsEffectivelyZeroSigma(sigma)) { return nullptr; } @@ -699,12 +711,53 @@ static std::unique_ptr make_circle_blur(GrRecordingContext* // Rect Blur /////////////////////////////////////////////////////////////////////////////// +// TODO: it seems like there should be some synergy with SkBlurMask::ComputeBlurProfile +// TODO: maybe cache this on the cpu side? +static int create_integral_table(float sixSigma, SkBitmap* table) { + // Check for NaN + if (sk_float_isnan(sixSigma)) { + return 0; + } + // Avoid overflow, covers both multiplying by 2 and finding next power of 2: + // 2*((2^31-1)/4 + 1) = 2*(2^29-1) + 2 = 2^30 and SkNextPow2(2^30) = 2^30 + if (sixSigma > SK_MaxS32/4 + 1) { + return 0; + } + // The texture we're producing represents the integral of a normal distribution over a + // six-sigma range centered at zero. We want enough resolution so that the linear + // interpolation done in texture lookup doesn't introduce noticeable artifacts. We + // conservatively choose to have 2 texels for each dst pixel. + int minWidth = 2*((int)sk_float_ceil(sixSigma)); + // Bin by powers of 2 with a minimum so we get good profile reuse. + int width = std::max(SkNextPow2(minWidth), 32); + + if (!table) { + return width; + } + + if (!table->tryAllocPixels(SkImageInfo::MakeA8(width, 1))) { + return 0; + } + *table->getAddr8(0, 0) = 255; + const float invWidth = 1.f / width; + for (int i = 1; i < width - 1; ++i) { + float x = (i + 0.5f) * invWidth; + x = (-6 * x + 3) * SK_ScalarRoot2Over2; + float integral = 0.5f * (std::erf(x) + 1.f); + *table->getAddr8(i, 0) = SkToU8(sk_float_round2int(255.f * integral)); + } + + *table->getAddr8(width - 1, 0) = 0; + table->setImmutable(); + return table->width(); +} + static std::unique_ptr make_rect_integral_fp(GrRecordingContext* rContext, float sixSigma) { - SkASSERT(!SkGpuBlurUtils::IsEffectivelyZeroSigma(sixSigma / 6.f)); + SkASSERT(!IsEffectivelyZeroSigma(sixSigma / 6.f)); auto threadSafeCache = rContext->priv().threadSafeCache(); - int width = SkGpuBlurUtils::CreateIntegralTable(sixSigma, nullptr); + int width = create_integral_table(sixSigma, nullptr); static const skgpu::UniqueKey::Domain kDomain = skgpu::UniqueKey::GenerateDomain(); skgpu::UniqueKey key; @@ -723,7 +776,7 @@ static std::unique_ptr make_rect_integral_fp(GrRecordingCon } SkBitmap bitmap; - if (!SkGpuBlurUtils::CreateIntegralTable(sixSigma, &bitmap)) { + if (!create_integral_table(sixSigma, &bitmap)) { return {}; } @@ -747,7 +800,7 @@ static std::unique_ptr make_rect_blur(GrRecordingContext* c SkASSERT(viewMatrix.preservesRightAngles()); SkASSERT(srcRect.isSorted()); - if (SkGpuBlurUtils::IsEffectivelyZeroSigma(transformedSigma)) { + if (IsEffectivelyZeroSigma(transformedSigma)) { // No need to blur the rect return nullptr; } @@ -880,7 +933,7 @@ static constexpr auto kBlurredRRectMaskOrigin = kTopLeft_GrSurfaceOrigin; static void make_blurred_rrect_key(skgpu::UniqueKey* key, const SkRRect& rrectToDraw, float xformedSigma) { - SkASSERT(!SkGpuBlurUtils::IsEffectivelyZeroSigma(xformedSigma)); + SkASSERT(!IsEffectivelyZeroSigma(xformedSigma)); static const skgpu::UniqueKey::Domain kDomain = skgpu::UniqueKey::GenerateDomain(); skgpu::UniqueKey::Builder builder(key, kDomain, 9, "RoundRect Blur Mask"); @@ -905,7 +958,7 @@ static bool fillin_view_on_gpu(GrDirectContext* dContext, const SkRRect& rrectToDraw, const SkISize& dimensions, float xformedSigma) { - SkASSERT(!SkGpuBlurUtils::IsEffectivelyZeroSigma(xformedSigma)); + SkASSERT(!IsEffectivelyZeroSigma(xformedSigma)); // We cache blur masks. Use default surface props here so we can use the same cached mask // regardless of the final dst surface. @@ -938,17 +991,17 @@ static bool fillin_view_on_gpu(GrDirectContext* dContext, GrSurfaceProxyView srcView = sdc->readSurfaceView(); SkASSERT(srcView.asTextureProxy()); - auto rtc2 = SkGpuBlurUtils::GaussianBlur(dContext, - std::move(srcView), - sdc->colorInfo().colorType(), - sdc->colorInfo().alphaType(), - nullptr, - SkIRect::MakeSize(dimensions), - SkIRect::MakeSize(dimensions), - xformedSigma, - xformedSigma, - SkTileMode::kClamp, - SkBackingFit::kExact); + auto rtc2 = GaussianBlur(dContext, + std::move(srcView), + sdc->colorInfo().colorType(), + sdc->colorInfo().alphaType(), + nullptr, + SkIRect::MakeSize(dimensions), + SkIRect::MakeSize(dimensions), + xformedSigma, + xformedSigma, + SkTileMode::kClamp, + SkBackingFit::kExact); if (!rtc2 || !rtc2->readSurfaceView()) { return false; } @@ -1009,14 +1062,44 @@ static uint8_t eval_H(int x, return accum + 0.5f; } +static void compute_1D_gaussian_kernel(float* kernel, float sigma, int radius) { + SkASSERT(radius == SigmaRadius(sigma)); + if (IsEffectivelyZeroSigma(sigma)) { + // Calling SigmaRadius() produces 1, just computing ceil(sigma)*3 produces 3 + SkASSERT(KernelWidth(radius) == 1); + std::fill_n(kernel, 1, 0.f); + kernel[0] = 1.f; + return; + } + + // If this fails, kEffectivelyZeroSigma isn't big enough to prevent precision issues + SkASSERT(!SkScalarNearlyZero(2.f * sigma * sigma)); + + const float sigmaDenom = 1.0f / (2.f * sigma * sigma); + int size = KernelWidth(radius); + float sum = 0.0f; + for (int i = 0; i < size; ++i) { + float term = static_cast(i - radius); + // Note that the constant term (1/(sqrt(2*pi*sigma^2)) of the Gaussian + // is dropped here, since we renormalize the kernel below. + kernel[i] = sk_float_exp(-term * term * sigmaDenom); + sum += kernel[i]; + } + // Normalize the kernel + float scale = 1.0f / sum; + for (int i = 0; i < size; ++i) { + kernel[i] *= scale; + } +} + // Create a cpu-side blurred-rrect mask that is close to the version the gpu would've produced. // The match needs to be close bc the cpu- and gpu-generated version must be interchangeable. static GrSurfaceProxyView create_mask_on_cpu(GrRecordingContext* rContext, const SkRRect& rrectToDraw, const SkISize& dimensions, float xformedSigma) { - SkASSERT(!SkGpuBlurUtils::IsEffectivelyZeroSigma(xformedSigma)); - int radius = SkGpuBlurUtils::SigmaRadius(xformedSigma); + SkASSERT(!IsEffectivelyZeroSigma(xformedSigma)); + int radius = SigmaRadius(xformedSigma); int kernelSize = 2 * radius + 1; SkASSERT(kernelSize % 2); @@ -1031,10 +1114,10 @@ static GrSurfaceProxyView create_mask_on_cpu(GrRecordingContext* rContext, std::unique_ptr kernel(new float[kernelSize]); - SkGpuBlurUtils::Compute1DGaussianKernel(kernel.get(), xformedSigma, radius); + compute_1D_gaussian_kernel(kernel.get(), xformedSigma, radius); SkBitmap integral; - if (!SkGpuBlurUtils::CreateIntegralTable(6 * xformedSigma, &integral)) { + if (!create_integral_table(6 * xformedSigma, &integral)) { return {}; } @@ -1094,7 +1177,7 @@ static std::unique_ptr find_or_create_rrect_blur_mask_fp( const SkRRect& rrectToDraw, const SkISize& dimensions, float xformedSigma) { - SkASSERT(!SkGpuBlurUtils::IsEffectivelyZeroSigma(xformedSigma)); + SkASSERT(!IsEffectivelyZeroSigma(xformedSigma)); skgpu::UniqueKey key; make_blurred_rrect_key(&key, rrectToDraw, xformedSigma); @@ -1182,7 +1265,7 @@ static std::unique_ptr make_rrect_blur(GrRecordingContext* return nullptr; } - if (SkGpuBlurUtils::IsEffectivelyZeroSigma(xformedSigma)) { + if (IsEffectivelyZeroSigma(xformedSigma)) { return nullptr; } @@ -1190,18 +1273,18 @@ static std::unique_ptr make_rrect_blur(GrRecordingContext* // small relative to both the size of the corner radius and the width (and height) of the rrect. SkRRect rrectToDraw; SkISize dimensions; - SkScalar ignored[SkGpuBlurUtils::kBlurRRectMaxDivisions]; - - bool ninePatchable = SkGpuBlurUtils::ComputeBlurredRRectParams(srcRRect, - devRRect, - sigma, - xformedSigma, - &rrectToDraw, - &dimensions, - ignored, - ignored, - ignored, - ignored); + SkScalar ignored[kBlurRRectMaxDivisions]; + + bool ninePatchable = ComputeBlurredRRectParams(srcRRect, + devRRect, + sigma, + xformedSigma, + &rrectToDraw, + &dimensions, + ignored, + ignored, + ignored, + ignored); if (!ninePatchable) { return nullptr; } @@ -1302,7 +1385,7 @@ static bool direct_filter_mask(GrRecordingContext* context, } SkScalar xformedSigma = bmf->computeXformedSigma(viewMatrix); - if (SkGpuBlurUtils::IsEffectivelyZeroSigma(xformedSigma)) { + if (IsEffectivelyZeroSigma(xformedSigma)) { sdc->drawShape(clip, std::move(paint), GrAA::kYes, viewMatrix, GrStyledShape(shape)); return true; } @@ -1518,16 +1601,16 @@ static GrSurfaceProxyView filter_mask(GrRecordingContext* context, // gaussianBlur. Otherwise, we need to save it for later compositing. bool isNormalBlur = (kNormal_SkBlurStyle == bmf->blurStyle()); auto srcBounds = SkIRect::MakeSize(srcView.proxy()->dimensions()); - auto surfaceDrawContext = SkGpuBlurUtils::GaussianBlur(context, - srcView, - srcColorType, - srcAlphaType, - nullptr, - clipRect, - srcBounds, - xformedSigma, - xformedSigma, - SkTileMode::kClamp); + auto surfaceDrawContext = GaussianBlur(context, + srcView, + srcColorType, + srcAlphaType, + nullptr, + clipRect, + srcBounds, + xformedSigma, + xformedSigma, + SkTileMode::kClamp); if (!surfaceDrawContext || !surfaceDrawContext->asTextureProxy()) { return {}; } @@ -1735,44 +1818,979 @@ static void draw_shape_with_mask_filter(GrRecordingContext* rContext, } } -void GrBlurUtils::drawShapeWithMaskFilter(GrRecordingContext* rContext, - skgpu::ganesh::SurfaceDrawContext* sdc, - const GrClip* clip, - const GrStyledShape& shape, - GrPaint&& paint, - const SkMatrix& viewMatrix, - const SkMaskFilter* mf) { +void Compute1DLinearGaussianKernel(float* kernel, float* offset, float sigma, int radius) { + // Given 2 adjacent gaussian points, they are blended as: Wi * Ci + Wj * Cj. + // The GPU will mix Ci and Cj as Ci * (1 - x) + Cj * x during sampling. + // Compute W', x such that W' * (Ci * (1 - x) + Cj * x) = Wi * Ci + Wj * Cj. + // Solving W' * x = Wj, W' * (1 - x) = Wi: + // W' = Wi + Wj + // x = Wj / (Wi + Wj) + auto get_new_weight = [](float* new_w, float* offset, float wi, float wj) { + *new_w = wi + wj; + *offset = wj / (wi + wj); + }; + + // Create a temporary standard kernel. + int size = KernelWidth(radius); + std::unique_ptr temp_kernel(new float[size]); + compute_1D_gaussian_kernel(temp_kernel.get(), sigma, radius); + + // Note that halfsize isn't just size / 2, but radius + 1. This is the size of the output array. + int halfsize = LinearKernelWidth(radius); + int halfradius = halfsize / 2; + int low_index = halfradius - 1; + + // Compute1DGaussianKernel produces a full 2N + 1 kernel. Since the kernel can be mirrored, + // compute only the upper half and mirror to the lower half. + + int index = radius; + if (radius & 1) { + // If N is odd, then use two samples. + // The centre texel gets sampled twice, so halve its influence for each sample. + // We essentially sample like this: + // Texel edges + // v v v v + // | | | | + // \-----^---/ Lower sample + // \---^-----/ Upper sample + get_new_weight(&kernel[halfradius], + &offset[halfradius], + temp_kernel[index] * 0.5f, + temp_kernel[index + 1]); + kernel[low_index] = kernel[halfradius]; + offset[low_index] = -offset[halfradius]; + index++; + low_index--; + } else { + // If N is even, then there are an even number of texels on either side of the centre texel. + // Sample the centre texel directly. + kernel[halfradius] = temp_kernel[index]; + offset[halfradius] = 0.0f; + } + index++; + + // Every other pair gets one sample. + for (int i = halfradius + 1; i < halfsize; index += 2, i++, low_index--) { + get_new_weight(&kernel[i], &offset[i], temp_kernel[index], temp_kernel[index + 1]); + offset[i] += static_cast(index - radius); + + // Mirror to lower half. + kernel[low_index] = kernel[i]; + offset[low_index] = -offset[i]; + } +} + +bool ComputeBlurredRRectParams(const SkRRect& srcRRect, + const SkRRect& devRRect, + SkScalar sigma, + SkScalar xformedSigma, + SkRRect* rrectToDraw, + SkISize* widthHeight, + SkScalar rectXs[kBlurRRectMaxDivisions], + SkScalar rectYs[kBlurRRectMaxDivisions], + SkScalar texXs[kBlurRRectMaxDivisions], + SkScalar texYs[kBlurRRectMaxDivisions]) { + unsigned int devBlurRadius = 3 * SkScalarCeilToInt(xformedSigma - 1 / 6.0f); + SkScalar srcBlurRadius = 3.0f * sigma; + + const SkRect& devOrig = devRRect.getBounds(); + const SkVector& devRadiiUL = devRRect.radii(SkRRect::kUpperLeft_Corner); + const SkVector& devRadiiUR = devRRect.radii(SkRRect::kUpperRight_Corner); + const SkVector& devRadiiLR = devRRect.radii(SkRRect::kLowerRight_Corner); + const SkVector& devRadiiLL = devRRect.radii(SkRRect::kLowerLeft_Corner); + + const int devLeft = SkScalarCeilToInt(std::max(devRadiiUL.fX, devRadiiLL.fX)); + const int devTop = SkScalarCeilToInt(std::max(devRadiiUL.fY, devRadiiUR.fY)); + const int devRight = SkScalarCeilToInt(std::max(devRadiiUR.fX, devRadiiLR.fX)); + const int devBot = SkScalarCeilToInt(std::max(devRadiiLL.fY, devRadiiLR.fY)); + + // This is a conservative check for nine-patchability + if (devOrig.fLeft + devLeft + devBlurRadius >= devOrig.fRight - devRight - devBlurRadius || + devOrig.fTop + devTop + devBlurRadius >= devOrig.fBottom - devBot - devBlurRadius) { + return false; + } + + const SkVector& srcRadiiUL = srcRRect.radii(SkRRect::kUpperLeft_Corner); + const SkVector& srcRadiiUR = srcRRect.radii(SkRRect::kUpperRight_Corner); + const SkVector& srcRadiiLR = srcRRect.radii(SkRRect::kLowerRight_Corner); + const SkVector& srcRadiiLL = srcRRect.radii(SkRRect::kLowerLeft_Corner); + + const SkScalar srcLeft = std::max(srcRadiiUL.fX, srcRadiiLL.fX); + const SkScalar srcTop = std::max(srcRadiiUL.fY, srcRadiiUR.fY); + const SkScalar srcRight = std::max(srcRadiiUR.fX, srcRadiiLR.fX); + const SkScalar srcBot = std::max(srcRadiiLL.fY, srcRadiiLR.fY); + + int newRRWidth = 2 * devBlurRadius + devLeft + devRight + 1; + int newRRHeight = 2 * devBlurRadius + devTop + devBot + 1; + widthHeight->fWidth = newRRWidth + 2 * devBlurRadius; + widthHeight->fHeight = newRRHeight + 2 * devBlurRadius; + + const SkRect srcProxyRect = srcRRect.getBounds().makeOutset(srcBlurRadius, srcBlurRadius); + + rectXs[0] = srcProxyRect.fLeft; + rectXs[1] = srcProxyRect.fLeft + 2 * srcBlurRadius + srcLeft; + rectXs[2] = srcProxyRect.fRight - 2 * srcBlurRadius - srcRight; + rectXs[3] = srcProxyRect.fRight; + + rectYs[0] = srcProxyRect.fTop; + rectYs[1] = srcProxyRect.fTop + 2 * srcBlurRadius + srcTop; + rectYs[2] = srcProxyRect.fBottom - 2 * srcBlurRadius - srcBot; + rectYs[3] = srcProxyRect.fBottom; + + texXs[0] = 0.0f; + texXs[1] = 2.0f * devBlurRadius + devLeft; + texXs[2] = 2.0f * devBlurRadius + devLeft + 1; + texXs[3] = SkIntToScalar(widthHeight->fWidth); + + texYs[0] = 0.0f; + texYs[1] = 2.0f * devBlurRadius + devTop; + texYs[2] = 2.0f * devBlurRadius + devTop + 1; + texYs[3] = SkIntToScalar(widthHeight->fHeight); + + const SkRect newRect = SkRect::MakeXYWH(SkIntToScalar(devBlurRadius), + SkIntToScalar(devBlurRadius), + SkIntToScalar(newRRWidth), + SkIntToScalar(newRRHeight)); + SkVector newRadii[4]; + newRadii[0] = {SkScalarCeilToScalar(devRadiiUL.fX), SkScalarCeilToScalar(devRadiiUL.fY)}; + newRadii[1] = {SkScalarCeilToScalar(devRadiiUR.fX), SkScalarCeilToScalar(devRadiiUR.fY)}; + newRadii[2] = {SkScalarCeilToScalar(devRadiiLR.fX), SkScalarCeilToScalar(devRadiiLR.fY)}; + newRadii[3] = {SkScalarCeilToScalar(devRadiiLL.fX), SkScalarCeilToScalar(devRadiiLL.fY)}; + + rrectToDraw->setRectRadii(newRect, newRadii); + return true; +} + +void DrawShapeWithMaskFilter(GrRecordingContext* rContext, + skgpu::ganesh::SurfaceDrawContext* sdc, + const GrClip* clip, + const GrStyledShape& shape, + GrPaint&& paint, + const SkMatrix& viewMatrix, + const SkMaskFilter* mf) { draw_shape_with_mask_filter(rContext, sdc, clip, std::move(paint), viewMatrix, as_MFB(mf), shape); } -void GrBlurUtils::drawShapeWithMaskFilter(GrRecordingContext* rContext, - skgpu::ganesh::SurfaceDrawContext* sdc, - const GrClip* clip, - const SkPaint& paint, - const SkMatrixProvider& matrixProvider, - const GrStyledShape& shape) { +void DrawShapeWithMaskFilter(GrRecordingContext* rContext, + skgpu::ganesh::SurfaceDrawContext* sdc, + const GrClip* clip, + const SkPaint& paint, + const SkMatrix& ctm, + const GrStyledShape& shape) { if (rContext->abandoned()) { return; } GrPaint grPaint; - if (!SkPaintToGrPaint(rContext, - sdc->colorInfo(), - paint, - matrixProvider.localToDevice(), - sdc->surfaceProps(), - &grPaint)) { + if (!SkPaintToGrPaint(rContext, sdc->colorInfo(), paint, ctm, sdc->surfaceProps(), &grPaint)) { return; } - const SkMatrix& viewMatrix(matrixProvider.localToDevice()); SkMaskFilterBase* mf = as_MFB(paint.getMaskFilter()); if (mf && !GrFragmentProcessors::IsSupported(mf)) { // The MaskFilter wasn't already handled in SkPaintToGrPaint - draw_shape_with_mask_filter(rContext, sdc, clip, std::move(grPaint), viewMatrix, mf, shape); + draw_shape_with_mask_filter(rContext, sdc, clip, std::move(grPaint), ctm, mf, shape); } else { - sdc->drawShape(clip, std::move(grPaint), sdc->chooseAA(paint), viewMatrix, - GrStyledShape(shape)); + sdc->drawShape(clip, std::move(grPaint), sdc->chooseAA(paint), ctm, GrStyledShape(shape)); } } + + +// =================== Gaussian Blur ========================================= + +using Direction = GrGaussianConvolutionFragmentProcessor::Direction; + +static void fill_in_2D_gaussian_kernel( + float* kernel, int width, int height, SkScalar sigmaX, SkScalar sigmaY) { + const float twoSigmaSqrdX = 2.0f * SkScalarToFloat(SkScalarSquare(sigmaX)); + const float twoSigmaSqrdY = 2.0f * SkScalarToFloat(SkScalarSquare(sigmaY)); + + // GaussianBlur() should have detected the cases where a 2D blur + // degenerates to a 1D on X or Y, or to the identity. + SkASSERT(!IsEffectivelyZeroSigma(sigmaX) && + !IsEffectivelyZeroSigma(sigmaY)); + SkASSERT(!SkScalarNearlyZero(twoSigmaSqrdX) && !SkScalarNearlyZero(twoSigmaSqrdY)); + + const float sigmaXDenom = 1.0f / twoSigmaSqrdX; + const float sigmaYDenom = 1.0f / twoSigmaSqrdY; + const int xRadius = width / 2; + const int yRadius = height / 2; + + float sum = 0.0f; + for (int x = 0; x < width; x++) { + float xTerm = static_cast(x - xRadius); + xTerm = xTerm * xTerm * sigmaXDenom; + for (int y = 0; y < height; y++) { + float yTerm = static_cast(y - yRadius); + float xyTerm = sk_float_exp(-(xTerm + yTerm * yTerm * sigmaYDenom)); + // Note that the constant term (1/(sqrt(2*pi*sigma^2)) of the Gaussian + // is dropped here, since we renormalize the kernel below. + kernel[y * width + x] = xyTerm; + sum += xyTerm; + } + } + // Normalize the kernel + float scale = 1.0f / sum; + for (int i = 0; i < width * height; ++i) { + kernel[i] *= scale; + } +} + +/** + * Draws 'dstRect' into 'surfaceFillContext' evaluating a 1D Gaussian over 'srcView'. The src rect + * is 'dstRect' offset by 'dstToSrcOffset'. 'mode' and 'bounds' are applied to the src coords. + */ +static void convolve_gaussian_1d(skgpu::ganesh::SurfaceFillContext* sfc, + GrSurfaceProxyView srcView, + const SkIRect srcSubset, + SkIVector dstToSrcOffset, + const SkIRect& dstRect, + SkAlphaType srcAlphaType, + Direction direction, + int radius, + float sigma, + SkTileMode mode) { + SkASSERT(radius && !IsEffectivelyZeroSigma(sigma)); + auto wm = SkTileModeToWrapMode(mode); + auto srcRect = dstRect.makeOffset(dstToSrcOffset); + // NOTE: This could just be GrMatrixConvolutionEffect with one of the dimensions set to 1 + // and the appropriate kernel already computed, but there's value in keeping the shader simpler. + // TODO(michaelludwig): Is this true? If not, is the shader key simplicity worth it two have + // two convolution effects? + std::unique_ptr conv = + GrGaussianConvolutionFragmentProcessor::Make(std::move(srcView), + srcAlphaType, + direction, + radius, + sigma, + wm, + srcSubset, + &srcRect, + *sfc->caps()); + sfc->fillRectToRectWithFP(srcRect, dstRect, std::move(conv)); +} + +static std::unique_ptr convolve_gaussian_2d( + GrRecordingContext* rContext, + GrSurfaceProxyView srcView, + GrColorType srcColorType, + const SkIRect& srcBounds, + const SkIRect& dstBounds, + int radiusX, + int radiusY, + SkScalar sigmaX, + SkScalar sigmaY, + SkTileMode mode, + sk_sp finalCS, + SkBackingFit dstFit) { + SkASSERT(radiusX && radiusY); + SkASSERT(!IsEffectivelyZeroSigma(sigmaX) && + !IsEffectivelyZeroSigma(sigmaY)); + // Create the sdc with default SkSurfaceProps. Gaussian blurs will soon use a + // SurfaceFillContext, at which point the SkSurfaceProps won't exist anymore. + auto sdc = skgpu::ganesh::SurfaceDrawContext::Make( + rContext, + srcColorType, + std::move(finalCS), + dstFit, + dstBounds.size(), + SkSurfaceProps(), + /*label=*/"SurfaceDrawContext_ConvolveGaussian2d", + /* sampleCnt= */ 1, + GrMipmapped::kNo, + srcView.proxy()->isProtected(), + srcView.origin()); + if (!sdc) { + return nullptr; + } + + SkISize size = SkISize::Make(KernelWidth(radiusX), + KernelWidth(radiusY)); + SkIPoint kernelOffset = SkIPoint::Make(radiusX, radiusY); + GrPaint paint; + auto wm = SkTileModeToWrapMode(mode); + + // GaussianBlur() should have downsampled the request until we can handle the 2D blur with + // just a uniform array. + SkASSERT(size.area() <= GrMatrixConvolutionEffect::kMaxUniformSize); + float kernel[GrMatrixConvolutionEffect::kMaxUniformSize]; + fill_in_2D_gaussian_kernel(kernel, size.width(), size.height(), sigmaX, sigmaY); + auto conv = GrMatrixConvolutionEffect::Make(rContext, + std::move(srcView), + srcBounds, + size, + kernel, + 1.0f, + 0.0f, + kernelOffset, + wm, + true, + *sdc->caps()); + + paint.setColorFragmentProcessor(std::move(conv)); + paint.setPorterDuffXPFactory(SkBlendMode::kSrc); + + // 'dstBounds' is actually in 'srcView' proxy space. It represents the blurred area from src + // space that we want to capture in the new RTC at {0, 0}. Hence, we use its size as the rect to + // draw and it directly as the local rect. + sdc->fillRectToRect(nullptr, + std::move(paint), + GrAA::kNo, + SkMatrix::I(), + SkRect::Make(dstBounds.size()), + SkRect::Make(dstBounds)); + + return sdc; +} + +static std::unique_ptr convolve_gaussian( + GrRecordingContext* rContext, + GrSurfaceProxyView srcView, + GrColorType srcColorType, + SkAlphaType srcAlphaType, + SkIRect srcBounds, + SkIRect dstBounds, + Direction direction, + int radius, + float sigma, + SkTileMode mode, + sk_sp finalCS, + SkBackingFit fit) { + SkASSERT(radius > 0 && !IsEffectivelyZeroSigma(sigma)); + // Logically we're creating an infinite blur of 'srcBounds' of 'srcView' with 'mode' tiling + // and then capturing the 'dstBounds' portion in a new RTC where the top left of 'dstBounds' is + // at {0, 0} in the new RTC. + // + // Create the sdc with default SkSurfaceProps. Gaussian blurs will soon use a + // SurfaceFillContext, at which point the SkSurfaceProps won't exist anymore. + auto dstSDC = + skgpu::ganesh::SurfaceDrawContext::Make(rContext, + srcColorType, + std::move(finalCS), + fit, + dstBounds.size(), + SkSurfaceProps(), + /*label=*/"SurfaceDrawContext_ConvolveGaussian", + /* sampleCnt= */ 1, + GrMipmapped::kNo, + srcView.proxy()->isProtected(), + srcView.origin()); + if (!dstSDC) { + return nullptr; + } + // This represents the translation from 'dstSurfaceDrawContext' coords to 'srcView' coords. + auto rtcToSrcOffset = dstBounds.topLeft(); + + auto srcBackingBounds = SkIRect::MakeSize(srcView.proxy()->backingStoreDimensions()); + // We've implemented splitting the dst bounds up into areas that do and do not need to + // use shader based tiling but only for some modes... + bool canSplit = mode == SkTileMode::kDecal || mode == SkTileMode::kClamp; + // ...but it's not worth doing the splitting if we'll get HW tiling instead of shader tiling. + bool canHWTile = + srcBounds.contains(srcBackingBounds) && + !rContext->priv().caps()->reducedShaderMode() && // this mode always uses shader tiling + !(mode == SkTileMode::kDecal && !rContext->priv().caps()->clampToBorderSupport()); + if (!canSplit || canHWTile) { + auto dstRect = SkIRect::MakeSize(dstBounds.size()); + convolve_gaussian_1d(dstSDC.get(), + std::move(srcView), + srcBounds, + rtcToSrcOffset, + dstRect, + srcAlphaType, + direction, + radius, + sigma, + mode); + return dstSDC; + } + + // 'left' and 'right' are the sub rects of 'srcBounds' where 'mode' must be enforced. + // 'mid' is the area where we can ignore the mode because the kernel does not reach to the + // edge of 'srcBounds'. + SkIRect mid, left, right; + // 'top' and 'bottom' are areas of 'dstBounds' that are entirely above/below 'srcBounds'. + // These are areas that we can simply clear in the dst in kDecal mode. If 'srcBounds' + // straddles the top edge of 'dstBounds' then 'top' will be inverted and we will skip + // processing for the rect. Similar for 'bottom'. The positional/directional labels above refer + // to the Direction::kX case and one should think of these as 'left' and 'right' for + // Direction::kY. + SkIRect top, bottom; + if (Direction::kX == direction) { + top = {dstBounds.left(), dstBounds.top(), dstBounds.right(), srcBounds.top()}; + bottom = {dstBounds.left(), srcBounds.bottom(), dstBounds.right(), dstBounds.bottom()}; + + // Inset for sub-rect of 'srcBounds' where the x-dir kernel doesn't reach the edges, clipped + // vertically to dstBounds. + int midA = std::max(srcBounds.top(), dstBounds.top()); + int midB = std::min(srcBounds.bottom(), dstBounds.bottom()); + mid = {srcBounds.left() + radius, midA, srcBounds.right() - radius, midB}; + if (mid.isEmpty()) { + // There is no middle where the bounds can be ignored. Make the left span the whole + // width of dst and we will not draw mid or right. + left = {dstBounds.left(), mid.top(), dstBounds.right(), mid.bottom()}; + } else { + left = {dstBounds.left(), mid.top(), mid.left(), mid.bottom()}; + right = {mid.right(), mid.top(), dstBounds.right(), mid.bottom()}; + } + } else { + // This is the same as the x direction code if you turn your head 90 degrees CCW. Swap x and + // y and swap top/bottom with left/right. + top = {dstBounds.left(), dstBounds.top(), srcBounds.left(), dstBounds.bottom()}; + bottom = {srcBounds.right(), dstBounds.top(), dstBounds.right(), dstBounds.bottom()}; + + int midA = std::max(srcBounds.left(), dstBounds.left()); + int midB = std::min(srcBounds.right(), dstBounds.right()); + mid = {midA, srcBounds.top() + radius, midB, srcBounds.bottom() - radius}; + + if (mid.isEmpty()) { + left = {mid.left(), dstBounds.top(), mid.right(), dstBounds.bottom()}; + } else { + left = {mid.left(), dstBounds.top(), mid.right(), mid.top()}; + right = {mid.left(), mid.bottom(), mid.right(), dstBounds.bottom()}; + } + } + + auto convolve = [&](SkIRect rect) { + // Transform rect into the render target's coord system. + rect.offset(-rtcToSrcOffset); + convolve_gaussian_1d(dstSDC.get(), + srcView, + srcBounds, + rtcToSrcOffset, + rect, + srcAlphaType, + direction, + radius, + sigma, + mode); + }; + auto clear = [&](SkIRect rect) { + // Transform rect into the render target's coord system. + rect.offset(-rtcToSrcOffset); + dstSDC->clearAtLeast(rect, SK_PMColor4fTRANSPARENT); + }; + + // Doing mid separately will cause two draws to occur (left and right batch together). At + // small sizes of mid it is worse to issue more draws than to just execute the slightly + // more complicated shader that implements the tile mode across mid. This threshold is + // very arbitrary right now. It is believed that a 21x44 mid on a Moto G4 is a significant + // regression compared to doing one draw but it has not been locally evaluated or tuned. + // The optimal cutoff is likely to vary by GPU. + if (!mid.isEmpty() && mid.width() * mid.height() < 256 * 256) { + left.join(mid); + left.join(right); + mid = SkIRect::MakeEmpty(); + right = SkIRect::MakeEmpty(); + // It's unknown whether for kDecal it'd be better to expand the draw rather than a draw and + // up to two clears. + if (mode == SkTileMode::kClamp) { + left.join(top); + left.join(bottom); + top = SkIRect::MakeEmpty(); + bottom = SkIRect::MakeEmpty(); + } + } + + if (!top.isEmpty()) { + if (mode == SkTileMode::kDecal) { + clear(top); + } else { + convolve(top); + } + } + + if (!bottom.isEmpty()) { + if (mode == SkTileMode::kDecal) { + clear(bottom); + } else { + convolve(bottom); + } + } + + if (mid.isEmpty()) { + convolve(left); + } else { + convolve(left); + convolve(right); + convolve(mid); + } + return dstSDC; +} + +// Expand the contents of 'src' to fit in 'dstSize'. At this point, we are expanding an intermediate +// image, so there's no need to account for a proxy offset from the original input. +static std::unique_ptr reexpand( + GrRecordingContext* rContext, + std::unique_ptr src, + const SkRect& srcBounds, + SkISize dstSize, + sk_sp colorSpace, + SkBackingFit fit) { + GrSurfaceProxyView srcView = src->readSurfaceView(); + if (!srcView.asTextureProxy()) { + return nullptr; + } + + GrColorType srcColorType = src->colorInfo().colorType(); + SkAlphaType srcAlphaType = src->colorInfo().alphaType(); + + src.reset(); // no longer needed + + // Create the sdc with default SkSurfaceProps. Gaussian blurs will soon use a + // SurfaceFillContext, at which point the SkSurfaceProps won't exist anymore. + auto dstSDC = skgpu::ganesh::SurfaceDrawContext::Make(rContext, + srcColorType, + std::move(colorSpace), + fit, + dstSize, + SkSurfaceProps(), + /*label=*/"SurfaceDrawContext_Reexpand", + /* sampleCnt= */ 1, + GrMipmapped::kNo, + srcView.proxy()->isProtected(), + srcView.origin()); + if (!dstSDC) { + return nullptr; + } + + GrPaint paint; + auto fp = GrTextureEffect::MakeSubset(std::move(srcView), + srcAlphaType, + SkMatrix::I(), + GrSamplerState::Filter::kLinear, + srcBounds, + srcBounds, + *rContext->priv().caps()); + paint.setColorFragmentProcessor(std::move(fp)); + paint.setPorterDuffXPFactory(SkBlendMode::kSrc); + + dstSDC->fillRectToRect( + nullptr, std::move(paint), GrAA::kNo, SkMatrix::I(), SkRect::Make(dstSize), srcBounds); + + return dstSDC; +} + +static std::unique_ptr two_pass_gaussian( + GrRecordingContext* rContext, + GrSurfaceProxyView srcView, + GrColorType srcColorType, + SkAlphaType srcAlphaType, + sk_sp colorSpace, + SkIRect srcBounds, + SkIRect dstBounds, + float sigmaX, + float sigmaY, + int radiusX, + int radiusY, + SkTileMode mode, + SkBackingFit fit) { + SkASSERT(radiusX || radiusY); + std::unique_ptr dstSDC; + if (radiusX > 0) { + SkBackingFit xFit = radiusY > 0 ? SkBackingFit::kApprox : fit; + // Expand the dstBounds vertically to produce necessary content for the y-pass. Then we will + // clip these in a tile-mode dependent way to ensure the tile-mode gets implemented + // correctly. However, if we're not going to do a y-pass then we must use the original + // dstBounds without clipping to produce the correct output size. + SkIRect xPassDstBounds = dstBounds; + if (radiusY) { + xPassDstBounds.outset(0, radiusY); + if (mode == SkTileMode::kRepeat || mode == SkTileMode::kMirror) { + int srcH = srcBounds.height(); + int srcTop = srcBounds.top(); + if (mode == SkTileMode::kMirror) { + srcTop -= srcH; + srcH *= 2; + } + + float floatH = srcH; + // First row above the dst rect where we should restart the tile mode. + int n = sk_float_floor2int_no_saturate((xPassDstBounds.top() - srcTop) / floatH); + int topClip = srcTop + n * srcH; + + // First row above below the dst rect where we should restart the tile mode. + n = sk_float_ceil2int_no_saturate((xPassDstBounds.bottom() - srcBounds.bottom()) / + floatH); + int bottomClip = srcBounds.bottom() + n * srcH; + + xPassDstBounds.fTop = std::max(xPassDstBounds.top(), topClip); + xPassDstBounds.fBottom = std::min(xPassDstBounds.bottom(), bottomClip); + } else { + if (xPassDstBounds.fBottom <= srcBounds.top()) { + if (mode == SkTileMode::kDecal) { + return nullptr; + } + xPassDstBounds.fTop = srcBounds.top(); + xPassDstBounds.fBottom = xPassDstBounds.fTop + 1; + } else if (xPassDstBounds.fTop >= srcBounds.bottom()) { + if (mode == SkTileMode::kDecal) { + return nullptr; + } + xPassDstBounds.fBottom = srcBounds.bottom(); + xPassDstBounds.fTop = xPassDstBounds.fBottom - 1; + } else { + xPassDstBounds.fTop = std::max(xPassDstBounds.fTop, srcBounds.top()); + xPassDstBounds.fBottom = std::min(xPassDstBounds.fBottom, srcBounds.bottom()); + } + int leftSrcEdge = srcBounds.fLeft - radiusX; + int rightSrcEdge = srcBounds.fRight + radiusX; + if (mode == SkTileMode::kClamp) { + // In clamp the column just outside the src bounds has the same value as the + // column just inside, unlike decal. + leftSrcEdge += 1; + rightSrcEdge -= 1; + } + if (xPassDstBounds.fRight <= leftSrcEdge) { + if (mode == SkTileMode::kDecal) { + return nullptr; + } + xPassDstBounds.fLeft = xPassDstBounds.fRight - 1; + } else { + xPassDstBounds.fLeft = std::max(xPassDstBounds.fLeft, leftSrcEdge); + } + if (xPassDstBounds.fLeft >= rightSrcEdge) { + if (mode == SkTileMode::kDecal) { + return nullptr; + } + xPassDstBounds.fRight = xPassDstBounds.fLeft + 1; + } else { + xPassDstBounds.fRight = std::min(xPassDstBounds.fRight, rightSrcEdge); + } + } + } + dstSDC = convolve_gaussian(rContext, + std::move(srcView), + srcColorType, + srcAlphaType, + srcBounds, + xPassDstBounds, + Direction::kX, + radiusX, + sigmaX, + mode, + colorSpace, + xFit); + if (!dstSDC) { + return nullptr; + } + srcView = dstSDC->readSurfaceView(); + SkIVector newDstBoundsOffset = dstBounds.topLeft() - xPassDstBounds.topLeft(); + dstBounds = SkIRect::MakeSize(dstBounds.size()).makeOffset(newDstBoundsOffset); + srcBounds = SkIRect::MakeSize(xPassDstBounds.size()); + } + + if (!radiusY) { + return dstSDC; + } + + return convolve_gaussian(rContext, + std::move(srcView), + srcColorType, + srcAlphaType, + srcBounds, + dstBounds, + Direction::kY, + radiusY, + sigmaY, + mode, + colorSpace, + fit); +} + +std::unique_ptr GaussianBlur(GrRecordingContext* rContext, + GrSurfaceProxyView srcView, + GrColorType srcColorType, + SkAlphaType srcAlphaType, + sk_sp colorSpace, + SkIRect dstBounds, + SkIRect srcBounds, + float sigmaX, + float sigmaY, + SkTileMode mode, + SkBackingFit fit) { + SkASSERT(rContext); + TRACE_EVENT2("skia.gpu", "GaussianBlur", "sigmaX", sigmaX, "sigmaY", sigmaY); + + if (!srcView.asTextureProxy()) { + return nullptr; + } + + int maxRenderTargetSize = rContext->priv().caps()->maxRenderTargetSize(); + if (dstBounds.width() > maxRenderTargetSize || dstBounds.height() > maxRenderTargetSize) { + return nullptr; + } + + int radiusX = SigmaRadius(sigmaX); + int radiusY = SigmaRadius(sigmaY); + // Attempt to reduce the srcBounds in order to detect that we can set the sigmas to zero or + // to reduce the amount of work to rescale the source if sigmas are large. TODO: Could consider + // how to minimize the required source bounds for repeat/mirror modes. + if (mode == SkTileMode::kClamp || mode == SkTileMode::kDecal) { + SkIRect reach = dstBounds.makeOutset(radiusX, radiusY); + SkIRect intersection; + if (!intersection.intersect(reach, srcBounds)) { + if (mode == SkTileMode::kDecal) { + return nullptr; + } else { + if (reach.fLeft >= srcBounds.fRight) { + srcBounds.fLeft = srcBounds.fRight - 1; + } else if (reach.fRight <= srcBounds.fLeft) { + srcBounds.fRight = srcBounds.fLeft + 1; + } + if (reach.fTop >= srcBounds.fBottom) { + srcBounds.fTop = srcBounds.fBottom - 1; + } else if (reach.fBottom <= srcBounds.fTop) { + srcBounds.fBottom = srcBounds.fTop + 1; + } + } + } else { + srcBounds = intersection; + } + } + + if (mode != SkTileMode::kDecal) { + // All non-decal tile modes are equivalent for one pixel width/height src and amount to a + // single color value repeated at each column/row. Applying the normalized kernel to that + // column/row yields that same color. So no blurring is necessary. + if (srcBounds.width() == 1) { + sigmaX = 0.f; + radiusX = 0; + } + if (srcBounds.height() == 1) { + sigmaY = 0.f; + radiusY = 0; + } + } + + // If we determined that there is no blurring necessary in either direction then just do a + // a draw that applies the tile mode. + if (!radiusX && !radiusY) { + // Create the sdc with default SkSurfaceProps. Gaussian blurs will soon use a + // SurfaceFillContext, at which point the SkSurfaceProps won't exist anymore. + auto result = + skgpu::ganesh::SurfaceDrawContext::Make(rContext, + srcColorType, + std::move(colorSpace), + fit, + dstBounds.size(), + SkSurfaceProps(), + /*label=*/"SurfaceDrawContext_GaussianBlur", + /* sampleCnt= */ 1, + GrMipmapped::kNo, + srcView.proxy()->isProtected(), + srcView.origin()); + if (!result) { + return nullptr; + } + GrSamplerState sampler(SkTileModeToWrapMode(mode), GrSamplerState::Filter::kNearest); + auto fp = GrTextureEffect::MakeSubset(std::move(srcView), + srcAlphaType, + SkMatrix::I(), + sampler, + SkRect::Make(srcBounds), + SkRect::Make(dstBounds), + *rContext->priv().caps()); + result->fillRectToRectWithFP(dstBounds, SkIRect::MakeSize(dstBounds.size()), std::move(fp)); + return result; + } + + if (sigmaX <= kMaxSigma && sigmaY <= kMaxSigma) { + SkASSERT(radiusX <= GrGaussianConvolutionFragmentProcessor::kMaxKernelRadius); + SkASSERT(radiusY <= GrGaussianConvolutionFragmentProcessor::kMaxKernelRadius); + // For really small blurs (certainly no wider than 5x5 on desktop GPUs) it is faster to just + // launch a single non separable kernel vs two launches. + const int kernelSize = (2 * radiusX + 1) * (2 * radiusY + 1); + if (radiusX > 0 && radiusY > 0 && + kernelSize <= GrMatrixConvolutionEffect::kMaxUniformSize && + !rContext->priv().caps()->reducedShaderMode()) { + // Apply the proxy offset to src bounds and offset directly + return convolve_gaussian_2d(rContext, + std::move(srcView), + srcColorType, + srcBounds, + dstBounds, + radiusX, + radiusY, + sigmaX, + sigmaY, + mode, + std::move(colorSpace), + fit); + } + // This will automatically degenerate into a single pass of X or Y if only one of the + // radii are non-zero. + return two_pass_gaussian(rContext, + std::move(srcView), + srcColorType, + srcAlphaType, + std::move(colorSpace), + srcBounds, + dstBounds, + sigmaX, + sigmaY, + radiusX, + radiusY, + mode, + fit); + } + + GrColorInfo colorInfo(srcColorType, srcAlphaType, colorSpace); + auto srcCtx = rContext->priv().makeSC(srcView, colorInfo); + SkASSERT(srcCtx); + + float scaleX = sigmaX > kMaxSigma ? kMaxSigma / sigmaX : 1.f; + float scaleY = sigmaY > kMaxSigma ? kMaxSigma / sigmaY : 1.f; + // We round down here so that when we recalculate sigmas we know they will be below + // kMaxSigma (but clamp to 1 do we don't have an empty texture). + SkISize rescaledSize = {std::max(sk_float_floor2int(srcBounds.width() * scaleX), 1), + std::max(sk_float_floor2int(srcBounds.height() * scaleY), 1)}; + // Compute the sigmas using the actual scale factors used once we integerized the + // rescaledSize. + scaleX = static_cast(rescaledSize.width()) / srcBounds.width(); + scaleY = static_cast(rescaledSize.height()) / srcBounds.height(); + sigmaX *= scaleX; + sigmaY *= scaleY; + + // When we are in clamp mode any artifacts in the edge pixels due to downscaling may be + // exacerbated because of the tile mode. The particularly egregious case is when the original + // image has transparent black around the edges and the downscaling pulls in some non-zero + // values from the interior. Ultimately it'd be better for performance if the calling code could + // give us extra context around the blur to account for this. We don't currently have a good way + // to communicate this up stack. So we leave a 1 pixel border around the rescaled src bounds. + // We populate the top 1 pixel tall row of this border by rescaling the top row of the original + // source bounds into it. Because this is only rescaling in x (i.e. rescaling a 1 pixel high + // row into a shorter but still 1 pixel high row) we won't read any interior values. And similar + // for the other three borders. We'll adjust the source/dest bounds rescaled blur so that this + // border of extra pixels is used as the edge pixels for clamp mode but the dest bounds + // corresponds only to the pixels inside the border (the normally rescaled pixels inside this + // border). + // Moreover, if we clamped the rescaled size to 1 column or row then we still have a sigma + // that is greater than kMaxSigma. By using a pad and making the src 3 wide/tall instead of + // 1 we can recurse again and do another downscale. Since mirror and repeat modes are trivial + // for a single col/row we only add padding based on sigma exceeding kMaxSigma for decal. + int padX = mode == SkTileMode::kClamp || (mode == SkTileMode::kDecal && sigmaX > kMaxSigma) ? 1 + : 0; + int padY = mode == SkTileMode::kClamp || (mode == SkTileMode::kDecal && sigmaY > kMaxSigma) ? 1 + : 0; + // Create the sdc with default SkSurfaceProps. Gaussian blurs will soon use a + // SurfaceFillContext, at which point the SkSurfaceProps won't exist anymore. + auto rescaledSDC = skgpu::ganesh::SurfaceDrawContext::Make( + srcCtx->recordingContext(), + colorInfo.colorType(), + colorInfo.refColorSpace(), + SkBackingFit::kApprox, + {rescaledSize.width() + 2 * padX, rescaledSize.height() + 2 * padY}, + SkSurfaceProps(), + /*label=*/"RescaledSurfaceDrawContext", + /* sampleCnt= */ 1, + GrMipmapped::kNo, + srcCtx->asSurfaceProxy()->isProtected(), + srcCtx->origin()); + if (!rescaledSDC) { + return nullptr; + } + if ((padX || padY) && mode == SkTileMode::kDecal) { + rescaledSDC->clear(SkPMColor4f{0, 0, 0, 0}); + } + if (!srcCtx->rescaleInto(rescaledSDC.get(), + SkIRect::MakeSize(rescaledSize).makeOffset(padX, padY), + srcBounds, + SkSurface::RescaleGamma::kSrc, + SkSurface::RescaleMode::kRepeatedLinear)) { + return nullptr; + } + if (mode == SkTileMode::kClamp) { + SkASSERT(padX == 1 && padY == 1); + // Rather than run a potentially multi-pass rescaler on single rows/columns we just do a + // single bilerp draw. If we find this quality unacceptable we should think more about how + // to rescale these with better quality but without 4 separate multi-pass downscales. + auto cheapDownscale = [&](SkIRect dstRect, SkIRect srcRect) { + rescaledSDC->drawTexture(nullptr, + srcCtx->readSurfaceView(), + srcAlphaType, + GrSamplerState::Filter::kLinear, + GrSamplerState::MipmapMode::kNone, + SkBlendMode::kSrc, + SK_PMColor4fWHITE, + SkRect::Make(srcRect), + SkRect::Make(dstRect), + GrQuadAAFlags::kNone, + SkCanvas::SrcRectConstraint::kFast_SrcRectConstraint, + SkMatrix::I(), + nullptr); + }; + auto [dw, dh] = rescaledSize; + // The are the src rows and columns from the source that we will scale into the dst padding. + float sLCol = srcBounds.left(); + float sTRow = srcBounds.top(); + float sRCol = srcBounds.right() - 1; + float sBRow = srcBounds.bottom() - 1; + + int sx = srcBounds.left(); + int sy = srcBounds.top(); + int sw = srcBounds.width(); + int sh = srcBounds.height(); + + // Downscale the edges from the original source. These draws should batch together (and with + // the above interior rescaling when it is a single pass). + cheapDownscale(SkIRect::MakeXYWH(0, 1, 1, dh), SkIRect::MakeXYWH(sLCol, sy, 1, sh)); + cheapDownscale(SkIRect::MakeXYWH(1, 0, dw, 1), SkIRect::MakeXYWH(sx, sTRow, sw, 1)); + cheapDownscale(SkIRect::MakeXYWH(dw + 1, 1, 1, dh), SkIRect::MakeXYWH(sRCol, sy, 1, sh)); + cheapDownscale(SkIRect::MakeXYWH(1, dh + 1, dw, 1), SkIRect::MakeXYWH(sx, sBRow, sw, 1)); + + // Copy the corners from the original source. These would batch with the edges except that + // at time of writing we recognize these can use kNearest and downgrade the filter. So they + // batch with each other but not the edge draws. + cheapDownscale(SkIRect::MakeXYWH(0, 0, 1, 1), SkIRect::MakeXYWH(sLCol, sTRow, 1, 1)); + cheapDownscale(SkIRect::MakeXYWH(dw + 1, 0, 1, 1), SkIRect::MakeXYWH(sRCol, sTRow, 1, 1)); + cheapDownscale(SkIRect::MakeXYWH(dw + 1, dh + 1, 1, 1), + SkIRect::MakeXYWH(sRCol, sBRow, 1, 1)); + cheapDownscale(SkIRect::MakeXYWH(0, dh + 1, 1, 1), SkIRect::MakeXYWH(sLCol, sBRow, 1, 1)); + } + srcView = rescaledSDC->readSurfaceView(); + // Drop the contexts so we don't hold the proxies longer than necessary. + rescaledSDC.reset(); + srcCtx.reset(); + + // Compute the dst bounds in the scaled down space. First move the origin to be at the top + // left since we trimmed off everything above and to the left of the original src bounds during + // the rescale. + SkRect scaledDstBounds = SkRect::Make(dstBounds.makeOffset(-srcBounds.topLeft())); + scaledDstBounds.fLeft *= scaleX; + scaledDstBounds.fTop *= scaleY; + scaledDstBounds.fRight *= scaleX; + scaledDstBounds.fBottom *= scaleY; + // Account for padding in our rescaled src, if any. + scaledDstBounds.offset(padX, padY); + // Turn the scaled down dst bounds into an integer pixel rect. + auto scaledDstBoundsI = scaledDstBounds.roundOut(); + + SkIRect scaledSrcBounds = SkIRect::MakeSize(srcView.dimensions()); + auto sdc = GaussianBlur(rContext, + std::move(srcView), + srcColorType, + srcAlphaType, + colorSpace, + scaledDstBoundsI, + scaledSrcBounds, + sigmaX, + sigmaY, + mode, + fit); + if (!sdc) { + return nullptr; + } + // We rounded out the integer scaled dst bounds. Select the fractional dst bounds from the + // integer dimension blurred result when we scale back up. + scaledDstBounds.offset(-scaledDstBoundsI.left(), -scaledDstBoundsI.top()); + return reexpand(rContext, + std::move(sdc), + scaledDstBounds, + dstBounds.size(), + std::move(colorSpace), + fit); +} + +} // namespace GrBlurUtils diff --git a/src/gpu/ganesh/GrBlurUtils.h b/src/gpu/ganesh/GrBlurUtils.h index 8ab214ffe2f9..08fd92929285 100644 --- a/src/gpu/ganesh/GrBlurUtils.h +++ b/src/gpu/ganesh/GrBlurUtils.h @@ -8,45 +8,131 @@ #ifndef GrBlurUtils_DEFINED #define GrBlurUtils_DEFINED +#include "include/core/SkRefCnt.h" +#include "include/core/SkScalar.h" +#include "src/gpu/SkBackingFit.h" + +#include +#include + class GrClip; class GrPaint; class GrRecordingContext; class GrStyledShape; -class SkMatrixProvider; +class GrSurfaceProxyView; +class SkColorSpace; class SkMaskFilter; class SkMatrix; class SkPaint; -namespace skgpu { -namespace ganesh { -class SurfaceDrawContext; -} -} // namespace skgpu +class SkRRect; +enum SkAlphaType : int; +enum class GrColorType; +enum class SkTileMode; +namespace skgpu { namespace ganesh { class SurfaceDrawContext; } } +struct SkIRect; +struct SkISize; /** * Blur utilities. */ namespace GrBlurUtils { +/** Maximum sigma before the implementation downscales the input image. */ +static constexpr float kMaxSigma = 4.f; +static constexpr int kBlurRRectMaxDivisions = 6; + +void Compute1DLinearGaussianKernel(float* kernel, float* offset, float sigma, int radius); + +/** + * This method computes all the parameters for drawing a partially occluded nine-patched + * blurred rrect mask: + * rrectToDraw - the integerized rrect to draw in the mask + * widthHeight - how large to make the mask (rrectToDraw will be centered in this coord system). + * rectXs, rectYs - the x & y coordinates of the covering geometry lattice + * texXs, texYs - the texture coordinate at each point in rectXs & rectYs + * It returns true if 'devRRect' is nine-patchable + */ +bool ComputeBlurredRRectParams(const SkRRect& srcRRect, + const SkRRect& devRRect, + SkScalar sigma, + SkScalar xformedSigma, + SkRRect* rrectToDraw, + SkISize* widthHeight, + SkScalar rectXs[kBlurRRectMaxDivisions], + SkScalar rectYs[kBlurRRectMaxDivisions], + SkScalar texXs[kBlurRRectMaxDivisions], + SkScalar texYs[kBlurRRectMaxDivisions]); + /** * Draw a shape handling the mask filter if present. */ -void drawShapeWithMaskFilter(GrRecordingContext*, +void DrawShapeWithMaskFilter(GrRecordingContext*, skgpu::ganesh::SurfaceDrawContext*, const GrClip*, const SkPaint&, - const SkMatrixProvider&, + const SkMatrix&, const GrStyledShape&); /** * Draw a shape handling the mask filter. The mask filter is not optional. * The GrPaint will be modified after return. */ -void drawShapeWithMaskFilter(GrRecordingContext*, +void DrawShapeWithMaskFilter(GrRecordingContext*, skgpu::ganesh::SurfaceDrawContext*, const GrClip*, const GrStyledShape&, GrPaint&&, const SkMatrix& viewMatrix, const SkMaskFilter*); + +/** + * Applies a 2D Gaussian blur to a given texture. The blurred result is returned + * as a surfaceDrawContext in case the caller wishes to draw into the result. + * The GrSurfaceOrigin of the result will watch the GrSurfaceOrigin of srcView. The output + * color type, color space, and alpha type will be the same as the src. + * + * Note: one of sigmaX and sigmaY should be non-zero! + * @param context The GPU context + * @param srcView The source to be blurred. + * @param srcColorType The colorType of srcProxy + * @param srcAlphaType The alphaType of srcProxy + * @param srcColorSpace Color space of the source. + * @param dstBounds The destination bounds, relative to the source texture. + * @param srcBounds The source bounds, relative to the source texture's offset. No pixels + * will be sampled outside of this rectangle. + * @param sigmaX The blur's standard deviation in X. + * @param sigmaY The blur's standard deviation in Y. + * @param tileMode The mode to handle samples outside bounds. + * @param fit backing fit for the returned render target context + * @return The surfaceDrawContext containing the blurred result. + */ +std::unique_ptr GaussianBlur( + GrRecordingContext*, + GrSurfaceProxyView srcView, + GrColorType srcColorType, + SkAlphaType srcAlphaType, + sk_sp srcColorSpace, + SkIRect dstBounds, + SkIRect srcBounds, + float sigmaX, + float sigmaY, + SkTileMode mode, + SkBackingFit fit = SkBackingFit::kApprox); + +/* + * Any sigmas smaller than this are effectively an identity blur so can skip convolution at a higher + * level. The value was chosen because it corresponds roughly to a radius of 1/10px, and is slightly + * greater than sqrt(1/2*sigma^2) for SK_ScalarNearlyZero. + */ +inline bool IsEffectivelyZeroSigma(float sigma) { return sigma <= 0.03f; } + +inline int KernelWidth(int radius) { return 2 * radius + 1; } + +inline int LinearKernelWidth(int radius) { return radius + 1; } + +inline int SigmaRadius(float sigma) { + return IsEffectivelyZeroSigma(sigma) ? 0 : static_cast(ceilf(sigma * 3.0f)); +} + } // namespace GrBlurUtils #endif diff --git a/src/gpu/ganesh/GrDirectContext.cpp b/src/gpu/ganesh/GrDirectContext.cpp index c34d1e745f2e..dc671d1c978a 100644 --- a/src/gpu/ganesh/GrDirectContext.cpp +++ b/src/gpu/ganesh/GrDirectContext.cpp @@ -496,11 +496,13 @@ void GrDirectContext::flushAndSubmit(sk_sp image) { this->submit(); } +#if !defined(SK_DISABLE_LEGACY_GRDIRECTCONTEXT_FLUSH) GrSemaphoresSubmitted GrDirectContext::flush(sk_sp surface, SkSurfaces::BackendSurfaceAccess access, const GrFlushInfo& info) { return this->flush(surface.get(), access, info); } +#endif GrSemaphoresSubmitted GrDirectContext::flush(SkSurface* surface, SkSurfaces::BackendSurfaceAccess access, @@ -512,6 +514,7 @@ GrSemaphoresSubmitted GrDirectContext::flush(SkSurface* surface, if (!sb->isGaneshBacked()) { return GrSemaphoresSubmitted::kNo; } + auto gs = static_cast(surface); SkASSERT(this->priv().matches(gs->getDevice()->recordingContext()->asDirectContext())); GrRenderTargetProxy* rtp = gs->getDevice()->targetProxy(); @@ -519,11 +522,13 @@ GrSemaphoresSubmitted GrDirectContext::flush(SkSurface* surface, return this->priv().flushSurface(rtp, access, info, nullptr); } +#if !defined(SK_DISABLE_LEGACY_GRDIRECTCONTEXT_FLUSH) GrSemaphoresSubmitted GrDirectContext::flush(sk_sp surface, const GrFlushInfo& info, const skgpu::MutableTextureState* newState) { return this->flush(surface.get(), info, newState); } +#endif GrSemaphoresSubmitted GrDirectContext::flush(SkSurface* surface, const GrFlushInfo& info, @@ -535,6 +540,7 @@ GrSemaphoresSubmitted GrDirectContext::flush(SkSurface* surface, if (!sb->isGaneshBacked()) { return GrSemaphoresSubmitted::kNo; } + auto gs = static_cast(surface); SkASSERT(this->priv().matches(gs->getDevice()->recordingContext()->asDirectContext())); GrRenderTargetProxy* rtp = gs->getDevice()->targetProxy(); @@ -543,14 +549,27 @@ GrSemaphoresSubmitted GrDirectContext::flush(SkSurface* surface, rtp, SkSurfaces::BackendSurfaceAccess::kNoAccess, info, newState); } +void GrDirectContext::flushAndSubmit(SkSurface* surface, bool syncCpu) { + this->flush(surface, SkSurfaces::BackendSurfaceAccess::kNoAccess, GrFlushInfo()); + this->submit(syncCpu); +} + +#if !defined(SK_DISABLE_LEGACY_GRDIRECTCONTEXT_FLUSH) void GrDirectContext::flushAndSubmit(sk_sp surface, bool syncCpu) { this->flush(surface.get(), SkSurfaces::BackendSurfaceAccess::kNoAccess, GrFlushInfo()); this->submit(syncCpu); } +#endif +void GrDirectContext::flush(SkSurface* surface) { + this->flush(surface, GrFlushInfo(), nullptr); +} + +#if !defined(SK_DISABLE_LEGACY_GRDIRECTCONTEXT_FLUSH) void GrDirectContext::flush(sk_sp surface) { - this->flush(surface.get(), GrFlushInfo(), nullptr); + this->flush(surface, GrFlushInfo(), nullptr); } +#endif //////////////////////////////////////////////////////////////////////////////// @@ -1129,7 +1148,7 @@ bool GrDirectContext::setBackendRenderTargetState(const GrBackendRenderTarget& b std::move(callback)); } -void GrDirectContext::deleteBackendTexture(GrBackendTexture backendTex) { +void GrDirectContext::deleteBackendTexture(const GrBackendTexture& backendTex) { TRACE_EVENT0("skia.gpu", TRACE_FUNC); // For the Vulkan backend we still must destroy the backend texture when the context is // abandoned. diff --git a/src/gpu/ganesh/GrDynamicAtlas.h b/src/gpu/ganesh/GrDynamicAtlas.h index 52cd2d9d7e70..9218e89b6ea0 100644 --- a/src/gpu/ganesh/GrDynamicAtlas.h +++ b/src/gpu/ganesh/GrDynamicAtlas.h @@ -73,8 +73,8 @@ class GrDynamicAtlas { // 'backingTexture', if provided, is a renderable texture with which to instantiate our proxy. // If null then we will create a texture using the resource provider. The purpose of this param // is to provide a guaranteed way to recycle textures from previous atlases. - bool SK_WARN_UNUSED_RESULT instantiate(GrOnFlushResourceProvider*, - sk_sp backingTexture = nullptr); + [[nodiscard]] bool instantiate(GrOnFlushResourceProvider*, + sk_sp backingTexture = nullptr); private: class Node; diff --git a/src/gpu/ganesh/GrFPArgs.h b/src/gpu/ganesh/GrFPArgs.h index d381babd02d0..c32cce1461d3 100644 --- a/src/gpu/ganesh/GrFPArgs.h +++ b/src/gpu/ganesh/GrFPArgs.h @@ -13,7 +13,6 @@ class GrColorInfo; class GrRecordingContext; -class SkMatrixProvider; class SkSurfaceProps; struct GrFPArgs { diff --git a/src/gpu/ganesh/GrFixedClip.h b/src/gpu/ganesh/GrFixedClip.h index 68341b7fb71e..89c2fa2bacb3 100644 --- a/src/gpu/ganesh/GrFixedClip.h +++ b/src/gpu/ganesh/GrFixedClip.h @@ -30,10 +30,10 @@ class GrFixedClip final : public GrHardClip { void disableScissor() { fScissorState.setDisabled(); } - bool SK_WARN_UNUSED_RESULT setScissor(const SkIRect& irect) { + [[nodiscard]] bool setScissor(const SkIRect& irect) { return fScissorState.set(irect); } - bool SK_WARN_UNUSED_RESULT intersect(const SkIRect& irect) { + [[nodiscard]] bool intersect(const SkIRect& irect) { return fScissorState.intersect(irect); } diff --git a/src/gpu/ganesh/GrFragmentProcessors.cpp b/src/gpu/ganesh/GrFragmentProcessors.cpp index caf1cbcc1a3d..565b4f930230 100644 --- a/src/gpu/ganesh/GrFragmentProcessors.cpp +++ b/src/gpu/ganesh/GrFragmentProcessors.cpp @@ -96,7 +96,6 @@ #include #include #include -#include class SkBitmap; enum class SkTileMode; @@ -221,13 +220,12 @@ static std::unique_ptr make_blender_fp( rtb->uniforms(), fpArgs.fDstColorInfo->colorSpace()); SkASSERT(uniforms); - auto children = rtb->children(); auto [success, fp] = make_effect_fp(rtb->effect(), "runtime_blender", std::move(uniforms), std::move(srcFP), std::move(dstFP), - SkSpan(children), + rtb->children(), fpArgs); return success ? std::move(fp) : nullptr; @@ -413,13 +411,12 @@ static GrFPResult make_colorfilter_fp(GrRecordingContext* context, SkASSERT(uniforms); GrFPArgs childArgs(context, &colorInfo, props); - auto children = filter->children(); return make_effect_fp(filter->effect(), "runtime_color_filter", std::move(uniforms), std::move(inputFP), /*destColorFP=*/nullptr, - SkSpan(children), + filter->children(), childArgs); } @@ -777,7 +774,6 @@ static std::unique_ptr make_shader_fp(const SkRuntimeShader args.fDstColorInfo->colorSpace()); SkASSERT(uniforms); - auto children = shader->children(); bool success; std::unique_ptr fp; std::tie(success, fp) = make_effect_fp(shader->effect(), @@ -785,7 +781,7 @@ static std::unique_ptr make_shader_fp(const SkRuntimeShader std::move(uniforms), /*inputFP=*/nullptr, /*destColorFP=*/nullptr, - SkSpan(children), + shader->children(), args); if (!success) { return nullptr; @@ -810,12 +806,6 @@ static std::unique_ptr make_shader_fp(const SkTriColorShade return nullptr; } -static std::unique_ptr make_shader_fp(const SkUpdatableColorShader* shader, - const GrFPArgs&, - const SkShaders::MatrixRec&) { - return nullptr; -} - ////////////////////////////////////////////////////////////////////////////////////////////// static std::unique_ptr make_gradient_fp(const SkConicalGradient* shader, diff --git a/src/gpu/ganesh/GrGpu.h b/src/gpu/ganesh/GrGpu.h index 1d60be443103..52435362fcee 100644 --- a/src/gpu/ganesh/GrGpu.h +++ b/src/gpu/ganesh/GrGpu.h @@ -407,12 +407,11 @@ class GrGpu : public SkRefCnt { virtual void submit(GrOpsRenderPass*) = 0; - virtual GrFence SK_WARN_UNUSED_RESULT insertFence() = 0; + [[nodiscard]] virtual GrFence insertFence() = 0; virtual bool waitFence(GrFence) = 0; virtual void deleteFence(GrFence) = 0; - virtual std::unique_ptr SK_WARN_UNUSED_RESULT makeSemaphore( - bool isOwned = true) = 0; + [[nodiscard]] virtual std::unique_ptr makeSemaphore(bool isOwned = true) = 0; virtual std::unique_ptr wrapBackendSemaphore(const GrBackendSemaphore&, GrSemaphoreWrapType, GrWrapOwnership) = 0; diff --git a/src/gpu/ganesh/GrGpuResource.cpp b/src/gpu/ganesh/GrGpuResource.cpp index ae93e0e287fb..20fed7c09ba0 100644 --- a/src/gpu/ganesh/GrGpuResource.cpp +++ b/src/gpu/ganesh/GrGpuResource.cpp @@ -86,6 +86,7 @@ void GrGpuResource::dumpMemoryStatisticsPriv(SkTraceMemoryDump* traceMemoryDump, traceMemoryDump->dumpNumericValue(resourceName.c_str(), "size", "bytes", size); traceMemoryDump->dumpStringValue(resourceName.c_str(), "type", type); + traceMemoryDump->dumpStringValue(resourceName.c_str(), "label", this->getLabel().c_str()); traceMemoryDump->dumpStringValue(resourceName.c_str(), "category", tag); if (this->isPurgeable()) { traceMemoryDump->dumpNumericValue(resourceName.c_str(), "purgeable_size", "bytes", size); diff --git a/src/gpu/ganesh/GrGpuResource.h b/src/gpu/ganesh/GrGpuResource.h index aca00a0811c8..ba332b7f681b 100644 --- a/src/gpu/ganesh/GrGpuResource.h +++ b/src/gpu/ganesh/GrGpuResource.h @@ -19,6 +19,10 @@ class GrGpu; class GrResourceCache; class SkTraceMemoryDump; +#if GR_TEST_UTILS +class GrSurface; +#endif + /** * Base class for GrGpuResource. Provides the hooks for resources to interact with the cache. * Separated out as a base class to isolate the ref-cnting behavior and provide friendship without @@ -222,6 +226,10 @@ class GrGpuResource : public GrIORef { static uint32_t CreateUniqueID(); +#if GR_TEST_UTILS + virtual const GrSurface* asSurface() const { return nullptr; } +#endif + protected: // This must be called by every non-wrapped GrGpuObject. It should be called once the object is // fully initialized (i.e. only from the constructors of the final class). diff --git a/src/gpu/ganesh/GrMeshBuffers.cpp b/src/gpu/ganesh/GrMeshBuffers.cpp new file mode 100644 index 000000000000..411fa9549de0 --- /dev/null +++ b/src/gpu/ganesh/GrMeshBuffers.cpp @@ -0,0 +1,149 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "src/gpu/ganesh/GrMeshBuffers.h" + +#include "include/core/SkData.h" +#include "include/core/SkMesh.h" +#include "include/gpu/GrDirectContext.h" +#include "include/gpu/ganesh/SkMeshGanesh.h" +#include "include/private/base/SkAssert.h" +#include "include/private/gpu/ganesh/GrTypesPriv.h" +#include "src/core/SkMeshPriv.h" +#include "src/gpu/ganesh/GrCaps.h" +#include "src/gpu/ganesh/GrDirectContextPriv.h" +#include "src/gpu/ganesh/GrDrawingManager.h" +#include "src/gpu/ganesh/GrGpu.h" +#include "src/gpu/ganesh/GrGpuBuffer.h" +#include "src/gpu/ganesh/GrResourceCache.h" +#include "src/gpu/ganesh/GrResourceProvider.h" +#include "src/gpu/ganesh/GrStagingBufferManager.h" + +#include +#include + +template GrMeshBuffer::~GrMeshBuffer() { + GrResourceCache::ReturnResourceFromThread(std::move(fBuffer), fContextID); +} + +template +sk_sp GrMeshBuffer::Make(GrDirectContext* dc, const void* data, size_t size) { + SkASSERT(dc); + + sk_sp buffer = dc->priv().resourceProvider()->createBuffer( + size, + Type, + kStatic_GrAccessPattern, + data ? GrResourceProvider::ZeroInit::kNo : GrResourceProvider::ZeroInit::kYes); + if (!buffer) { + return nullptr; + } + + if (data && !buffer->updateData(data, 0, size, /*preserve=*/false)) { + return nullptr; + } + + auto result = new GrMeshBuffer; + result->fBuffer = std::move(buffer); + result->fContextID = dc->directContextID(); + return sk_sp(result); +} + +template +bool GrMeshBuffer::onUpdate(GrDirectContext* dc, + const void* data, + size_t offset, + size_t size) { + if (!dc || dc != fBuffer->getContext()) { + return false; + } + SkASSERT(!dc->abandoned()); // If dc is abandoned then fBuffer->getContext() should be null. + + if (!dc->priv().caps()->transferFromBufferToBufferSupport()) { + auto ownedData = SkData::MakeWithCopy(data, size); + dc->priv().drawingManager()->newBufferUpdateTask( + std::move(ownedData), fBuffer, offset); + return true; + } + + sk_sp tempBuffer; + size_t tempOffset = 0; + if (auto* sbm = dc->priv().getGpu()->stagingBufferManager()) { + auto alignment = dc->priv().caps()->transferFromBufferToBufferAlignment(); + auto [sliceBuffer, sliceOffset, ptr] = sbm->allocateStagingBufferSlice(size, alignment); + if (sliceBuffer) { + std::memcpy(ptr, data, size); + tempBuffer.reset(SkRef(sliceBuffer)); + tempOffset = sliceOffset; + } + } + + if (!tempBuffer) { + tempBuffer = dc->priv().resourceProvider()->createBuffer(size, + GrGpuBufferType::kXferCpuToGpu, + kDynamic_GrAccessPattern, + GrResourceProvider::ZeroInit::kNo); + if (!tempBuffer) { + return false; + } + if (!tempBuffer->updateData(data, 0, size, /*preserve=*/false)) { + return false; + } + } + + dc->priv().drawingManager()->newBufferTransferTask( + std::move(tempBuffer), tempOffset, fBuffer, offset, size); + + return true; +} + +namespace SkMeshes { +sk_sp MakeIndexBuffer(GrDirectContext* dc, const void* data, size_t size) { + if (!dc) { + // Fallback to a CPU buffer. + return MakeIndexBuffer(data, size); + } + return SkMeshPriv::GaneshIndexBuffer::Make(dc, data, size); +} + +sk_sp CopyIndexBuffer(GrDirectContext* dc, sk_sp src) { + if (!src) { + return nullptr; + } + auto* ib = static_cast(src.get()); + const void* data = ib->peek(); + if (!data) { + return nullptr; + } + if (!dc) { + return MakeIndexBuffer(data, ib->size()); + } + return MakeIndexBuffer(dc, data, ib->size()); +} + +sk_sp MakeVertexBuffer(GrDirectContext* dc, const void* data, size_t size) { + if (!dc) { + return MakeVertexBuffer(data, size); + } + return SkMeshPriv::GaneshVertexBuffer::Make(dc, data, size); +} + +sk_sp CopyVertexBuffer(GrDirectContext* dc, sk_sp src) { + if (!src) { + return nullptr; + } + auto* vb = static_cast(src.get()); + const void* data = vb->peek(); + if (!data) { + return nullptr; + } + if (!dc) { + return MakeVertexBuffer(data, vb->size()); + } + return MakeVertexBuffer(dc, data, vb->size()); +} +} // namespace SkMeshes diff --git a/src/gpu/ganesh/GrMeshBuffers.h b/src/gpu/ganesh/GrMeshBuffers.h new file mode 100644 index 000000000000..56fee81afac0 --- /dev/null +++ b/src/gpu/ganesh/GrMeshBuffers.h @@ -0,0 +1,49 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef GrMeshBuffers_DEFINED +#define GrMeshBuffers_DEFINED + +#include "include/core/SkRefCnt.h" +#include "include/gpu/GrDirectContext.h" +#include "include/private/base/SkAssert.h" +#include "include/private/gpu/ganesh/GrTypesPriv.h" +#include "src/core/SkMeshPriv.h" +#include "src/gpu/ganesh/GrGpuBuffer.h" + +#include + +template class GrMeshBuffer final : public Base { +public: + GrMeshBuffer() = default; + + ~GrMeshBuffer() override; + + static sk_sp Make(GrDirectContext*, const void* data, size_t size); + + size_t size() const override { + SkASSERT(fBuffer); + return fBuffer->size(); + } + + bool isGaneshBacked() const override { return true; } + + sk_sp asGpuBuffer() const { return fBuffer; } + +private: + bool onUpdate(GrDirectContext*, const void* data, size_t offset, size_t size) override; + + sk_sp fBuffer; + GrDirectContext::DirectContextID fContextID; +}; + +namespace SkMeshPriv { +using GaneshIndexBuffer = GrMeshBuffer; +using GaneshVertexBuffer = GrMeshBuffer; +} // namespace SkMeshPriv + +#endif diff --git a/src/gpu/ganesh/GrOnFlushResourceProvider.h b/src/gpu/ganesh/GrOnFlushResourceProvider.h index 96bd27602d03..749625754b99 100644 --- a/src/gpu/ganesh/GrOnFlushResourceProvider.h +++ b/src/gpu/ganesh/GrOnFlushResourceProvider.h @@ -53,7 +53,7 @@ class GrOnFlushResourceProvider { public: explicit GrOnFlushResourceProvider(GrDrawingManager* drawingMgr) : fDrawingMgr(drawingMgr) {} - bool SK_WARN_UNUSED_RESULT instantiateProxy(GrSurfaceProxy*); + [[nodiscard]] bool instantiateProxy(GrSurfaceProxy*); const GrCaps* caps() const; diff --git a/src/gpu/ganesh/GrProcessorUnitTest.cpp b/src/gpu/ganesh/GrProcessorUnitTest.cpp index b985e75c66f5..c69d726b6d01 100644 --- a/src/gpu/ganesh/GrProcessorUnitTest.cpp +++ b/src/gpu/ganesh/GrProcessorUnitTest.cpp @@ -149,7 +149,7 @@ TArray* GrXPFactoryTestFactory::GetFactories() { * we verify the count is as expected. If a new factory is added, then these numbers must be * manually adjusted. */ -static constexpr int kFPFactoryCount = 14; +static constexpr int kFPFactoryCount = 12; static constexpr int kGPFactoryCount = 14; static constexpr int kXPFactoryCount = 4; diff --git a/src/gpu/ganesh/GrProcessorUnitTest.h b/src/gpu/ganesh/GrProcessorUnitTest.h index fa23508f9c14..d7d0698ffa3b 100644 --- a/src/gpu/ganesh/GrProcessorUnitTest.h +++ b/src/gpu/ganesh/GrProcessorUnitTest.h @@ -130,16 +130,16 @@ class GrXPFactoryTestFactory : private SkNoncopyable { /** GrProcessor subclasses should insert this macro in their declaration to be included in the * program generation unit test. */ -#define GR_DECLARE_GEOMETRY_PROCESSOR_TEST \ - static GrGeometryProcessorTestFactory* gTestFactory SK_UNUSED; \ +#define GR_DECLARE_GEOMETRY_PROCESSOR_TEST \ + [[maybe_unused]] static GrGeometryProcessorTestFactory* gTestFactory; \ static GrGeometryProcessor* TestCreate(GrProcessorTestData*); -#define GR_DECLARE_FRAGMENT_PROCESSOR_TEST \ - static GrFragmentProcessorTestFactory* gTestFactory SK_UNUSED; \ +#define GR_DECLARE_FRAGMENT_PROCESSOR_TEST \ + [[maybe_unused]] static GrFragmentProcessorTestFactory* gTestFactory; \ static std::unique_ptr TestCreate(GrProcessorTestData*); -#define GR_DECLARE_XP_FACTORY_TEST \ - static GrXPFactoryTestFactory* gTestFactory SK_UNUSED; \ +#define GR_DECLARE_XP_FACTORY_TEST \ + [[maybe_unused]] static GrXPFactoryTestFactory* gTestFactory; \ static const GrXPFactory* TestGet(GrProcessorTestData*); /** GrProcessor subclasses should insert this macro in their implementation file. They must then diff --git a/src/gpu/ganesh/GrRecordingContextPriv.h b/src/gpu/ganesh/GrRecordingContextPriv.h index db6733ca698b..bbc68ebdf874 100644 --- a/src/gpu/ganesh/GrRecordingContextPriv.h +++ b/src/gpu/ganesh/GrRecordingContextPriv.h @@ -193,10 +193,10 @@ class GrRecordingContextPriv : public GrImageContextPriv { */ std::unique_ptr makeSFCWithFallback( GrImageInfo, - SkBackingFit = SkBackingFit::kExact, - int sampleCount = 1, - skgpu::Mipmapped = skgpu::Mipmapped::kNo, - skgpu::Protected = skgpu::Protected::kNo, + SkBackingFit, + int sampleCount, + skgpu::Mipmapped, + skgpu::Protected, GrSurfaceOrigin = kTopLeft_GrSurfaceOrigin, skgpu::Budgeted = skgpu::Budgeted::kYes); diff --git a/src/gpu/ganesh/GrRefCnt.h b/src/gpu/ganesh/GrRefCnt.h index bf8b6ed32928..11289068dcdd 100644 --- a/src/gpu/ganesh/GrRefCnt.h +++ b/src/gpu/ganesh/GrRefCnt.h @@ -148,7 +148,7 @@ template class gr_sp { * The caller must assume ownership of the object, and manage its reference count directly. * No call to Unref() will be made. */ - T* SK_WARN_UNUSED_RESULT release() { + [[nodiscard]] T* release() { T* ptr = fPtr; fPtr = nullptr; return ptr; diff --git a/src/gpu/ganesh/GrResourceCache.cpp b/src/gpu/ganesh/GrResourceCache.cpp index 6bec32075fe5..184b963dad6d 100644 --- a/src/gpu/ganesh/GrResourceCache.cpp +++ b/src/gpu/ganesh/GrResourceCache.cpp @@ -933,4 +933,19 @@ void GrResourceCache::changeTimestamp(uint32_t newTimestamp) { fTimestamp = newTimestamp; } +void GrResourceCache::visitSurfaces( + const std::function& func) const { + + for (int i = 0; i < fNonpurgeableResources.size(); ++i) { + if (const GrSurface* surf = fNonpurgeableResources[i]->asSurface()) { + func(surf, /* purgeable= */ false); + } + } + for (int i = 0; i < fPurgeableQueue.count(); ++i) { + if (const GrSurface* surf = fPurgeableQueue.at(i)->asSurface()) { + func(surf, /* purgeable= */ true); + } + } +} + #endif // GR_TEST_UTILS diff --git a/src/gpu/ganesh/GrResourceCache.h b/src/gpu/ganesh/GrResourceCache.h index 46183e5e8873..710809dedce8 100644 --- a/src/gpu/ganesh/GrResourceCache.h +++ b/src/gpu/ganesh/GrResourceCache.h @@ -254,6 +254,8 @@ class GrResourceCache { int countUniqueKeysWithTag(const char* tag) const; void changeTimestamp(uint32_t newTimestamp); + + void visitSurfaces(const std::function&) const; #endif // Enumerates all cached resources and dumps their details to traceMemoryDump. diff --git a/src/gpu/ganesh/GrResourceProvider.cpp b/src/gpu/ganesh/GrResourceProvider.cpp index 1aaa68941fba..3ac250afd271 100644 --- a/src/gpu/ganesh/GrResourceProvider.cpp +++ b/src/gpu/ganesh/GrResourceProvider.cpp @@ -454,7 +454,7 @@ sk_sp GrResourceProvider::findOrMakeStaticBuffer(GrGpuBufferT const void* staticData, const skgpu::UniqueKey& key) { if (auto buffer = this->findByUniqueKey(key)) { - return std::move(buffer); + return buffer; } auto buffer = this->createBuffer(staticData, size, intendedType, kStatic_GrAccessPattern); @@ -468,7 +468,7 @@ sk_sp GrResourceProvider::findOrMakeStaticBuffer(GrGpuBufferT buffer->resourcePriv().setUniqueKey(key); - return std::move(buffer); + return buffer; } sk_sp GrResourceProvider::findOrMakeStaticBuffer( @@ -477,7 +477,7 @@ sk_sp GrResourceProvider::findOrMakeStaticBuffer( const skgpu::UniqueKey& uniqueKey, InitializeBufferFn initializeBufferFn) { if (auto buffer = this->findByUniqueKey(uniqueKey)) { - return std::move(buffer); + return buffer; } auto buffer = this->createBuffer(size, @@ -510,7 +510,7 @@ sk_sp GrResourceProvider::findOrMakeStaticBuffer( buffer->updateData(stagingBuffer, /*offset=*/0, size, /*preserve=*/false); } - return std::move(buffer); + return buffer; } sk_sp GrResourceProvider::createPatternedIndexBuffer( @@ -552,7 +552,7 @@ sk_sp GrResourceProvider::createPatternedIndexBuffer( SkASSERT(key->isValid()); this->assignUniqueKeyToResource(*key, buffer.get()); } - return std::move(buffer); + return buffer; } /////////////////////////////////////////////////////////////////////////////////////////////////// @@ -832,8 +832,7 @@ sk_sp GrResourceProvider::refScratchMSAAAttachment(SkISize dimensi return nullptr; } -std::unique_ptr SK_WARN_UNUSED_RESULT GrResourceProvider::makeSemaphore( - bool isOwned) { +[[nodiscard]] std::unique_ptr GrResourceProvider::makeSemaphore(bool isOwned) { return this->isAbandoned() ? nullptr : fGpu->makeSemaphore(isOwned); } diff --git a/src/gpu/ganesh/GrResourceProvider.h b/src/gpu/ganesh/GrResourceProvider.h index 8c6b5b73cd26..f0ed5840d9b7 100644 --- a/src/gpu/ganesh/GrResourceProvider.h +++ b/src/gpu/ganesh/GrResourceProvider.h @@ -350,7 +350,7 @@ class GrResourceProvider { */ void assignUniqueKeyToResource(const skgpu::UniqueKey&, GrGpuResource*); - std::unique_ptr SK_WARN_UNUSED_RESULT makeSemaphore(bool isOwned = true); + [[nodiscard]] std::unique_ptr makeSemaphore(bool isOwned = true); std::unique_ptr wrapBackendSemaphore(const GrBackendSemaphore&, GrSemaphoreWrapType, diff --git a/src/gpu/ganesh/GrSWMaskHelper.cpp b/src/gpu/ganesh/GrSWMaskHelper.cpp index a229e43e762f..8303a33073ce 100644 --- a/src/gpu/ganesh/GrSWMaskHelper.cpp +++ b/src/gpu/ganesh/GrSWMaskHelper.cpp @@ -34,8 +34,7 @@ static SkPaint get_paint(GrAA aa, uint8_t alpha) { void GrSWMaskHelper::drawRect(const SkRect& rect, const SkMatrix& matrix, GrAA aa, uint8_t alpha) { SkMatrix translatedMatrix = matrix; translatedMatrix.postTranslate(fTranslate.fX, fTranslate.fY); - SkMatrixProvider matrixProvider(translatedMatrix); - fDraw.fMatrixProvider = &matrixProvider; + fDraw.fCTM = &translatedMatrix; fDraw.drawRect(rect, get_paint(aa, alpha)); } @@ -44,8 +43,7 @@ void GrSWMaskHelper::drawRRect(const SkRRect& rrect, const SkMatrix& matrix, GrAA aa, uint8_t alpha) { SkMatrix translatedMatrix = matrix; translatedMatrix.postTranslate(fTranslate.fX, fTranslate.fY); - SkMatrixProvider matrixProvider(translatedMatrix); - fDraw.fMatrixProvider = &matrixProvider; + fDraw.fCTM = &translatedMatrix; fDraw.drawRRect(rrect, get_paint(aa, alpha)); } @@ -61,8 +59,7 @@ void GrSWMaskHelper::drawShape(const GrStyledShape& shape, const SkMatrix& matri SkMatrix translatedMatrix = matrix; translatedMatrix.postTranslate(fTranslate.fX, fTranslate.fY); - SkMatrixProvider matrixProvider(translatedMatrix); - fDraw.fMatrixProvider = &matrixProvider; + fDraw.fCTM = &translatedMatrix; SkPath path; shape.asPath(&path); @@ -80,8 +77,7 @@ void GrSWMaskHelper::drawShape(const GrShape& shape, const SkMatrix& matrix, SkMatrix translatedMatrix = matrix; translatedMatrix.postTranslate(fTranslate.fX, fTranslate.fY); - SkMatrixProvider matrixProvider(translatedMatrix); - fDraw.fMatrixProvider = &matrixProvider; + fDraw.fCTM = &translatedMatrix; if (shape.inverted()) { if (shape.isEmpty() || shape.isLine() || shape.isPoint()) { diff --git a/src/gpu/ganesh/GrScissorState.h b/src/gpu/ganesh/GrScissorState.h index cc1cea25781e..13f9e653670f 100644 --- a/src/gpu/ganesh/GrScissorState.h +++ b/src/gpu/ganesh/GrScissorState.h @@ -31,7 +31,7 @@ class GrScissorState { return this->intersect(rect); } - bool SK_WARN_UNUSED_RESULT intersect(const SkIRect& rect) { + [[nodiscard]] bool intersect(const SkIRect& rect) { if (!fRect.intersect(rect)) { fRect.setEmpty(); return false; diff --git a/src/gpu/ganesh/GrStyle.h b/src/gpu/ganesh/GrStyle.h index 5a779212ca0d..edf5c7cc1083 100644 --- a/src/gpu/ganesh/GrStyle.h +++ b/src/gpu/ganesh/GrStyle.h @@ -156,8 +156,8 @@ class GrStyle { * geometric approximations made by the path effect. It is typically computed from the view * matrix. */ - bool SK_WARN_UNUSED_RESULT applyPathEffectToPath(SkPath* dst, SkStrokeRec* remainingStoke, - const SkPath& src, SkScalar scale) const; + [[nodiscard]] bool applyPathEffectToPath(SkPath* dst, SkStrokeRec* remainingStoke, + const SkPath& src, SkScalar scale) const; /** * If this succeeds then the result path should be filled or hairlined as indicated by the @@ -166,8 +166,8 @@ class GrStyle { * been overwritten. Scale controls geometric approximations made by the path effect and * stroker. It is typically computed from the view matrix. */ - bool SK_WARN_UNUSED_RESULT applyToPath(SkPath* dst, SkStrokeRec::InitStyle* fillOrHairline, - const SkPath& src, SkScalar scale) const; + [[nodiscard]] bool applyToPath(SkPath* dst, SkStrokeRec::InitStyle* fillOrHairline, + const SkPath& src, SkScalar scale) const; /** Given bounds of a path compute the bounds of path with the style applied. */ void adjustBounds(SkRect* dst, const SkRect& src) const { diff --git a/src/gpu/ganesh/GrSurface.h b/src/gpu/ganesh/GrSurface.h index b1ff3bb6ea72..7684e328cf67 100644 --- a/src/gpu/ganesh/GrSurface.h +++ b/src/gpu/ganesh/GrSurface.h @@ -100,6 +100,10 @@ class GrSurface : public GrGpuResource { sk_sp fDirectContext; }; +#if GR_TEST_UTILS + const GrSurface* asSurface() const override { return this; } +#endif + protected: void setGLRTFBOIDIs0() { SkASSERT(!this->requiresManualMSAAResolve()); diff --git a/src/gpu/ganesh/GrTexture.h b/src/gpu/ganesh/GrTexture.h index 58b5ac507587..ec01ee9a1955 100644 --- a/src/gpu/ganesh/GrTexture.h +++ b/src/gpu/ganesh/GrTexture.h @@ -17,6 +17,8 @@ #include "include/private/gpu/ganesh/GrTypesPriv.h" #include "src/gpu/ganesh/GrSurface.h" +class GrCaps; + class GrTexture : virtual public GrSurface { public: GrTexture* asTexture() override { return this; } diff --git a/src/gpu/ganesh/SkGr.cpp b/src/gpu/ganesh/SkGr.cpp index e70695cb2100..feae227be181 100644 --- a/src/gpu/ganesh/SkGr.cpp +++ b/src/gpu/ganesh/SkGr.cpp @@ -100,7 +100,7 @@ sk_sp GrMakeUniqueKeyInvalidationListener(skgpu::UniqueKey* nullptr); SkASSERT(!key->getCustomData()); key->setCustomData(std::move(data)); - return std::move(listener); + return listener; } sk_sp GrCopyBaseMipMapToTextureProxy(GrRecordingContext* ctx, diff --git a/src/gpu/ganesh/SurfaceContext.cpp b/src/gpu/ganesh/SurfaceContext.cpp index 325bc3121416..aacf18926589 100644 --- a/src/gpu/ganesh/SurfaceContext.cpp +++ b/src/gpu/ganesh/SurfaceContext.cpp @@ -709,6 +709,7 @@ void SurfaceContext::asyncReadPixels(GrDirectContext* dContext, void SurfaceContext::asyncRescaleAndReadPixelsYUV420(GrDirectContext* dContext, SkYUVColorSpace yuvColorSpace, + bool readAlpha, sk_sp dstColorSpace, const SkIRect& srcRect, SkISize dstSize, @@ -783,14 +784,26 @@ void SurfaceContext::asyncRescaleAndReadPixelsYUV420(GrDirectContext* dContext, x = y = 0; } - auto yInfo = SkImageInfo::MakeA8(dstSize); - auto yFC = dContext->priv().makeSFCWithFallback(yInfo, SkBackingFit::kApprox); + auto yaInfo = SkImageInfo::MakeA8(dstSize); + auto yFC = dContext->priv().makeSFCWithFallback(yaInfo, SkBackingFit::kApprox, + /* sampleCount= */ 1, + skgpu::Mipmapped::kNo, skgpu::Protected::kNo); + std::unique_ptr aFC; + if (readAlpha) { + aFC = dContext->priv().makeSFCWithFallback(yaInfo, SkBackingFit::kApprox, + /* sampleCount= */ 1, + skgpu::Mipmapped::kNo, skgpu::Protected::kNo); + } - auto uvInfo = yInfo.makeWH(yInfo.width()/2, yInfo.height()/2); - auto uFC = dContext->priv().makeSFCWithFallback(uvInfo, SkBackingFit::kApprox); - auto vFC = dContext->priv().makeSFCWithFallback(uvInfo, SkBackingFit::kApprox); + auto uvInfo = yaInfo.makeWH(yaInfo.width()/2, yaInfo.height()/2); + auto uFC = dContext->priv().makeSFCWithFallback(uvInfo, SkBackingFit::kApprox, + /* sampleCount= */ 1, + skgpu::Mipmapped::kNo, skgpu::Protected::kNo); + auto vFC = dContext->priv().makeSFCWithFallback(uvInfo, SkBackingFit::kApprox, + /* sampleCount= */ 1, + skgpu::Mipmapped::kNo, skgpu::Protected::kNo); - if (!yFC || !uFC || !vFC) { + if (!yFC || !uFC || !vFC || (readAlpha && !aFC)) { callback(callbackContext, nullptr); return; } @@ -812,7 +825,7 @@ void SurfaceContext::asyncRescaleAndReadPixelsYUV420(GrDirectContext* dContext, } bool doSynchronousRead = !this->caps()->transferFromSurfaceToBufferSupport() || !offsetAlignment; - PixelTransferResult yTransfer, uTransfer, vTransfer; + PixelTransferResult yTransfer, aTransfer, uTransfer, vTransfer; // This matrix generates (r,g,b,a) = (0, 0, 0, y) float yM[20]; @@ -835,6 +848,24 @@ void SurfaceContext::asyncRescaleAndReadPixelsYUV420(GrDirectContext* dContext, } } + if (readAlpha) { + auto aFP = GrTextureEffect::Make(srcView, this->colorInfo().alphaType(), texMatrix); + SkASSERT(baseM[15] == 0 && + baseM[16] == 0 && + baseM[17] == 0 && + baseM[18] == 1 && + baseM[19] == 0); + aFC->fillWithFP(std::move(aFP)); + if (!doSynchronousRead) { + aTransfer = aFC->transferPixels(GrColorType::kAlpha_8, + SkIRect::MakeSize(aFC->dimensions())); + if (!aTransfer.fTransferBuffer) { + callback(callbackContext, nullptr); + return; + } + } + } + texMatrix.preScale(2.f, 2.f); // This matrix generates (r,g,b,a) = (0, 0, 0, u) float uM[20]; @@ -885,12 +916,17 @@ void SurfaceContext::asyncRescaleAndReadPixelsYUV420(GrDirectContext* dContext, } if (doSynchronousRead) { - GrPixmap yPmp = GrPixmap::Allocate(yInfo); + GrPixmap yPmp = GrPixmap::Allocate(yaInfo); GrPixmap uPmp = GrPixmap::Allocate(uvInfo); GrPixmap vPmp = GrPixmap::Allocate(uvInfo); + GrPixmap aPmp; + if (readAlpha) { + aPmp = GrPixmap::Allocate(yaInfo); + } if (!yFC->readPixels(dContext, yPmp, {0, 0}) || !uFC->readPixels(dContext, uPmp, {0, 0}) || - !vFC->readPixels(dContext, vPmp, {0, 0})) { + !vFC->readPixels(dContext, vPmp, {0, 0}) || + (readAlpha && !aFC->readPixels(dContext, aPmp, {0, 0}))) { callback(callbackContext, nullptr); return; } @@ -898,6 +934,9 @@ void SurfaceContext::asyncRescaleAndReadPixelsYUV420(GrDirectContext* dContext, result->addCpuPlane(yPmp.pixelStorage(), yPmp.rowBytes()); result->addCpuPlane(uPmp.pixelStorage(), uPmp.rowBytes()); result->addCpuPlane(vPmp.pixelStorage(), vPmp.rowBytes()); + if (readAlpha) { + result->addCpuPlane(aPmp.pixelStorage(), aPmp.rowBytes()); + } callback(callbackContext, std::move(result)); return; } @@ -911,6 +950,7 @@ void SurfaceContext::asyncRescaleAndReadPixelsYUV420(GrDirectContext* dContext, PixelTransferResult fYTransfer; PixelTransferResult fUTransfer; PixelTransferResult fVTransfer; + PixelTransferResult fATransfer; }; // Assumption is that the caller would like to flush. We could take a parameter or require an // explicit flush from the caller. We'd have to have a way to defer attaching the finish @@ -922,27 +962,34 @@ void SurfaceContext::asyncRescaleAndReadPixelsYUV420(GrDirectContext* dContext, this->caps()->transferBufferRowBytesAlignment(), std::move(yTransfer), std::move(uTransfer), - std::move(vTransfer)}; + std::move(vTransfer), + std::move(aTransfer)}; auto finishCallback = [](GrGpuFinishedContext c) { const auto* context = reinterpret_cast(c); auto manager = context->fMappedBufferManager; auto result = std::make_unique(manager->ownerID()); - size_t rowBytes = SkToSizeT(context->fSize.width()); - rowBytes = SkAlignTo(rowBytes, context->fBufferAlignment); - if (!result->addTransferResult(context->fYTransfer, context->fSize, rowBytes, manager)) { + size_t yaRowBytes = SkToSizeT(context->fSize.width()); + yaRowBytes = SkAlignTo(yaRowBytes, context->fBufferAlignment); + if (!result->addTransferResult(context->fYTransfer, context->fSize, yaRowBytes, manager)) { (*context->fClientCallback)(context->fClientContext, nullptr); delete context; return; } - rowBytes = SkToSizeT(context->fSize.width()) / 2; - rowBytes = SkAlignTo(rowBytes, context->fBufferAlignment); + size_t uvRowBytes = SkToSizeT(context->fSize.width()) / 2; + uvRowBytes = SkAlignTo(uvRowBytes, context->fBufferAlignment); SkISize uvSize = {context->fSize.width() / 2, context->fSize.height() / 2}; - if (!result->addTransferResult(context->fUTransfer, uvSize, rowBytes, manager)) { + if (!result->addTransferResult(context->fUTransfer, uvSize, uvRowBytes, manager)) { + (*context->fClientCallback)(context->fClientContext, nullptr); + delete context; + return; + } + if (!result->addTransferResult(context->fVTransfer, uvSize, uvRowBytes, manager)) { (*context->fClientCallback)(context->fClientContext, nullptr); delete context; return; } - if (!result->addTransferResult(context->fVTransfer, uvSize, rowBytes, manager)) { + if (context->fATransfer.fTransferBuffer && + !result->addTransferResult(context->fATransfer, context->fSize, yaRowBytes, manager)) { (*context->fClientCallback)(context->fClientContext, nullptr); delete context; return; @@ -1028,7 +1075,7 @@ std::unique_ptr SurfaceContext::rescale(const GrImageInfo& i RescaleMode rescaleMode) { auto sfc = fContext->priv().makeSFCWithFallback(info, SkBackingFit::kExact, - 1, + /* sampleCount= */ 1, GrMipmapped::kNo, this->asSurfaceProxy()->isProtected(), origin); @@ -1111,7 +1158,7 @@ bool SurfaceContext::rescaleInto(SurfaceFillContext* dst, srcRect.size()); auto linearRTC = fContext->priv().makeSFCWithFallback(std::move(ii), SkBackingFit::kApprox, - 1, + /* sampleCount= */ 1, GrMipmapped::kNo, GrProtected::kNo, dst->origin()); @@ -1157,7 +1204,11 @@ bool SurfaceContext::rescaleInto(SurfaceFillContext* dst, xform = GrColorSpaceXform::Make(input->colorInfo(), dst->colorInfo()); } else { GrImageInfo nextInfo(input->colorInfo(), nextDims); - tempB = fContext->priv().makeSFCWithFallback(nextInfo, SkBackingFit::kApprox); + + tempB = fContext->priv().makeSFCWithFallback(nextInfo, SkBackingFit::kApprox, + /* sampleCount= */ 1, + skgpu::Mipmapped::kNo, + skgpu::Protected::kNo); if (!tempB) { return false; } diff --git a/src/gpu/ganesh/SurfaceContext.h b/src/gpu/ganesh/SurfaceContext.h index c8e7f15c3380..250b2c5055f8 100644 --- a/src/gpu/ganesh/SurfaceContext.h +++ b/src/gpu/ganesh/SurfaceContext.h @@ -92,6 +92,7 @@ class SurfaceContext { // GPU implementation for SkImage:: and SkSurface::asyncRescaleAndReadPixelsYUV420. void asyncRescaleAndReadPixelsYUV420(GrDirectContext*, SkYUVColorSpace yuvColorSpace, + bool readAlpha, sk_sp dstColorSpace, const SkIRect& srcRect, SkISize dstSize, diff --git a/src/gpu/ganesh/SurfaceDrawContext.cpp b/src/gpu/ganesh/SurfaceDrawContext.cpp index d6971649d40d..b9daef71de57 100644 --- a/src/gpu/ganesh/SurfaceDrawContext.cpp +++ b/src/gpu/ganesh/SurfaceDrawContext.cpp @@ -25,7 +25,6 @@ #include "src/core/SkDrawShadowInfo.h" #include "src/core/SkLatticeIter.h" #include "src/core/SkMatrixPriv.h" -#include "src/core/SkMatrixProvider.h" #include "src/core/SkMeshPriv.h" #include "src/core/SkPointPriv.h" #include "src/core/SkRRectPriv.h" @@ -330,7 +329,7 @@ void SurfaceDrawContext::willReplaceOpsTask(OpsTask* prevTask, OpsTask* nextTask void SurfaceDrawContext::drawGlyphRunList(SkCanvas* canvas, const GrClip* clip, - const SkMatrixProvider& viewMatrix, + const SkMatrix& viewMatrix, const sktext::GlyphRunList& glyphRunList, SkStrikeDeviceInfo strikeDeviceInfo, const SkPaint& paint) { @@ -351,17 +350,17 @@ void SurfaceDrawContext::drawGlyphRunList(SkCanvas* canvas, auto atlasDelegate = [&](const sktext::gpu::AtlasSubRun* subRun, SkPoint drawOrigin, const SkPaint& paint, - sk_sp subRunStorage) { - auto[drawingClip, op] = subRun->makeAtlasTextOp( - clip, viewMatrix.localToDevice(), drawOrigin, paint, std::move(subRunStorage), - this); + sk_sp subRunStorage, + sktext::gpu::RendererData) { + auto [drawingClip, op] = subRun->makeAtlasTextOp( + clip, viewMatrix, drawOrigin, paint, std::move(subRunStorage), this); if (op != nullptr) { this->addDrawOp(drawingClip, std::move(op)); } }; - textBlobCache->drawGlyphRunList(canvas, viewMatrix.localToDevice(), glyphRunList, paint, - strikeDeviceInfo, atlasDelegate); + textBlobCache->drawGlyphRunList( + canvas, viewMatrix, glyphRunList, paint, strikeDeviceInfo, atlasDelegate); } void SurfaceDrawContext::drawPaint(const GrClip* clip, @@ -913,7 +912,7 @@ void SurfaceDrawContext::drawTextureSet(const GrClip* clip, void SurfaceDrawContext::drawVertices(const GrClip* clip, GrPaint&& paint, - const SkMatrixProvider& matrixProvider, + const SkMatrix& viewMatrix, sk_sp vertices, GrPrimitiveType* overridePrimType, bool skipColorXform) { @@ -931,7 +930,7 @@ void SurfaceDrawContext::drawVertices(const GrClip* clip, std::move(paint), std::move(vertices), overridePrimType, - matrixProvider, + viewMatrix, aaType, std::move(xform)); this->addDrawOp(clip, std::move(op)); @@ -939,7 +938,7 @@ void SurfaceDrawContext::drawVertices(const GrClip* clip, void SurfaceDrawContext::drawMesh(const GrClip* clip, GrPaint&& paint, - const SkMatrixProvider& matrixProvider, + const SkMatrix& viewMatrix, const SkMesh& mesh) { ASSERT_SINGLE_OWNER RETURN_IF_ABANDONED @@ -958,7 +957,7 @@ void SurfaceDrawContext::drawMesh(const GrClip* clip, GrOp::Owner op = DrawMeshOp::Make(fContext, std::move(paint), mesh, - matrixProvider, + viewMatrix, aaType, std::move(xform)); this->addDrawOp(clip, std::move(op)); diff --git a/src/gpu/ganesh/SurfaceDrawContext.h b/src/gpu/ganesh/SurfaceDrawContext.h index a3f2e8e0b250..19bc2d0f428b 100644 --- a/src/gpu/ganesh/SurfaceDrawContext.h +++ b/src/gpu/ganesh/SurfaceDrawContext.h @@ -41,7 +41,6 @@ struct SkDrawShadowRec; struct SkIPoint; struct SkIRect; class SkLatticeIter; -class SkMatrixProvider; class SkMatrix; class SkPaint; class SkPath; @@ -115,9 +114,9 @@ class SurfaceDrawContext final : public SurfaceFillContext { SkBackingFit, SkISize dimensions, const SkSurfaceProps&, - int sampleCnt = 1, - skgpu::Mipmapped = skgpu::Mipmapped::kNo, - skgpu::Protected = skgpu::Protected::kNo, + int sampleCnt, + skgpu::Mipmapped, + skgpu::Protected, GrSurfaceOrigin = kBottomLeft_GrSurfaceOrigin, skgpu::Budgeted = skgpu::Budgeted::kYes); @@ -373,7 +372,7 @@ class SurfaceDrawContext final : public SurfaceFillContext { */ void drawVertices(const GrClip*, GrPaint&& paint, - const SkMatrixProvider& matrixProvider, + const SkMatrix& viewMatrix, sk_sp vertices, GrPrimitiveType* overridePrimType = nullptr, bool skipColorXform = false); @@ -381,13 +380,13 @@ class SurfaceDrawContext final : public SurfaceFillContext { /** * Draws a custom mesh with a paint. * - * @param paint describes how to color pixels. - * @param matrixProvider provides the transformation matrix - * @param mesh the mesh to draw. + * @param paint describes how to color pixels. + * @param viewMatrix transformation matrix + * @param mesh the mesh to draw. */ void drawMesh(const GrClip*, GrPaint&& paint, - const SkMatrixProvider& matrixProvider, + const SkMatrix& viewMatrix, const SkMesh& mesh); /** @@ -484,12 +483,12 @@ class SurfaceDrawContext final : public SurfaceFillContext { /** * Draw the text specified by the GlyphRunList. * - * @param viewMatrix transformationMatrix + * @param viewMatrix transformation matrix * @param glyphRunList text, text positions, and paint. */ void drawGlyphRunList(SkCanvas*, const GrClip*, - const SkMatrixProvider& viewMatrix, + const SkMatrix& viewMatrix, const sktext::GlyphRunList& glyphRunList, SkStrikeDeviceInfo strikeDeviceInfo, const SkPaint& paint); @@ -680,9 +679,9 @@ class SurfaceDrawContext final : public SurfaceFillContext { // value is false then a texture copy could not be made. // // The op should have already had setClippedBounds called on it. - bool SK_WARN_UNUSED_RESULT setupDstProxyView(const SkRect& opBounds, - bool opRequiresMSAA, - GrDstProxyView* result); + [[nodiscard]] bool setupDstProxyView(const SkRect& opBounds, + bool opRequiresMSAA, + GrDstProxyView* result); OpsTask* replaceOpsTaskIfModifiesColor(); diff --git a/src/gpu/ganesh/d3d/GrD3DGpu.cpp b/src/gpu/ganesh/d3d/GrD3DGpu.cpp index d6cce9e3900b..234d9fd9a23b 100644 --- a/src/gpu/ganesh/d3d/GrD3DGpu.cpp +++ b/src/gpu/ganesh/d3d/GrD3DGpu.cpp @@ -1758,7 +1758,7 @@ bool GrD3DGpu::onSubmitToGpu(bool syncCpu) { } } -std::unique_ptr SK_WARN_UNUSED_RESULT GrD3DGpu::makeSemaphore(bool) { +[[nodiscard]] std::unique_ptr GrD3DGpu::makeSemaphore(bool) { return GrD3DSemaphore::Make(this); } std::unique_ptr GrD3DGpu::wrapBackendSemaphore(const GrBackendSemaphore& semaphore, @@ -1786,7 +1786,7 @@ void GrD3DGpu::waitSemaphore(GrSemaphore* semaphore) { fQueue->Wait(d3dSem->fence(), d3dSem->value()); } -GrFence SK_WARN_UNUSED_RESULT GrD3DGpu::insertFence() { +[[nodiscard]] GrFence GrD3DGpu::insertFence() { GR_D3D_CALL_ERRCHECK(fQueue->Signal(fFence.get(), ++fCurrentFenceValue)); return fCurrentFenceValue; } diff --git a/src/gpu/ganesh/d3d/GrD3DGpu.h b/src/gpu/ganesh/d3d/GrD3DGpu.h index c491c589df77..e9cfe95c6e8c 100644 --- a/src/gpu/ganesh/d3d/GrD3DGpu.h +++ b/src/gpu/ganesh/d3d/GrD3DGpu.h @@ -99,11 +99,11 @@ class GrD3DGpu : public GrGpu { int numBarriers, D3D12_RESOURCE_TRANSITION_BARRIER* barriers) const; - GrFence SK_WARN_UNUSED_RESULT insertFence() override; + [[nodiscard]] GrFence insertFence() override; bool waitFence(GrFence) override; void deleteFence(GrFence) override {} - std::unique_ptr SK_WARN_UNUSED_RESULT makeSemaphore(bool isOwned) override; + [[nodiscard]] std::unique_ptr makeSemaphore(bool isOwned) override; std::unique_ptr wrapBackendSemaphore(const GrBackendSemaphore&, GrSemaphoreWrapType, GrWrapOwnership) override; diff --git a/src/gpu/ganesh/dawn/GrDawnGpu.cpp b/src/gpu/ganesh/dawn/GrDawnGpu.cpp index b7fb69c70784..ede8144a9449 100644 --- a/src/gpu/ganesh/dawn/GrDawnGpu.cpp +++ b/src/gpu/ganesh/dawn/GrDawnGpu.cpp @@ -876,7 +876,7 @@ void GrDawnGpu::submit(GrOpsRenderPass* renderPass) { static_cast(renderPass)->submit(); } -GrFence SK_WARN_UNUSED_RESULT GrDawnGpu::insertFence() { +[[nodiscard]] GrFence GrDawnGpu::insertFence() { return reinterpret_cast(this->createFence()); } @@ -888,7 +888,7 @@ void GrDawnGpu::deleteFence(GrFence fence) { this->destroyFence(reinterpret_cast(fence)); } -std::unique_ptr SK_WARN_UNUSED_RESULT GrDawnGpu::makeSemaphore(bool isOwned) { +[[nodiscard]] std::unique_ptr GrDawnGpu::makeSemaphore(bool isOwned) { SkDEBUGFAIL("unimplemented"); return nullptr; } diff --git a/src/gpu/ganesh/dawn/GrDawnGpu.h b/src/gpu/ganesh/dawn/GrDawnGpu.h index 6ef7b564a86e..c9c03791502c 100644 --- a/src/gpu/ganesh/dawn/GrDawnGpu.h +++ b/src/gpu/ganesh/dawn/GrDawnGpu.h @@ -79,11 +79,11 @@ class GrDawnGpu : public GrGpu { void submit(GrOpsRenderPass*) override; - GrFence SK_WARN_UNUSED_RESULT insertFence() override; + [[nodiscard]] GrFence insertFence() override; bool waitFence(GrFence) override; void deleteFence(GrFence) override; - std::unique_ptr SK_WARN_UNUSED_RESULT makeSemaphore(bool isOwned = true) override; + [[nodiscard]] std::unique_ptr makeSemaphore(bool isOwned = true) override; std::unique_ptr wrapBackendSemaphore(const GrBackendSemaphore&, GrSemaphoreWrapType, GrWrapOwnership) override; diff --git a/src/gpu/ganesh/effects/GrConvexPolyEffect.cpp b/src/gpu/ganesh/effects/GrConvexPolyEffect.cpp index 5ca5d5a85d44..7836e24266c3 100644 --- a/src/gpu/ganesh/effects/GrConvexPolyEffect.cpp +++ b/src/gpu/ganesh/effects/GrConvexPolyEffect.cpp @@ -13,9 +13,9 @@ #include "include/private/SkColorData.h" #include "include/private/base/SkAssert.h" #include "include/private/base/SkFloatingPoint.h" -#include "include/private/base/SkPathEnums.h" #include "include/private/gpu/ganesh/GrTypesPriv.h" #include "src/base/SkRandom.h" +#include "src/core/SkPathEnums.h" #include "src/core/SkPathPriv.h" #include "src/core/SkSLTypeShared.h" #include "src/gpu/KeyBuilder.h" diff --git a/src/gpu/ganesh/effects/GrGaussianConvolutionFragmentProcessor.cpp b/src/gpu/ganesh/effects/GrGaussianConvolutionFragmentProcessor.cpp index 2a39970c48e0..43195ffaed43 100644 --- a/src/gpu/ganesh/effects/GrGaussianConvolutionFragmentProcessor.cpp +++ b/src/gpu/ganesh/effects/GrGaussianConvolutionFragmentProcessor.cpp @@ -14,9 +14,9 @@ #include "include/private/base/SkAssert.h" #include "include/private/gpu/ganesh/GrTypesPriv.h" #include "src/base/SkRandom.h" -#include "src/core/SkGpuBlurUtils.h" #include "src/core/SkSLTypeShared.h" #include "src/gpu/KeyBuilder.h" +#include "src/gpu/ganesh/GrBlurUtils.h" #include "src/gpu/ganesh/GrCaps.h" #include "src/gpu/ganesh/GrShaderCaps.h" #include "src/gpu/ganesh/GrShaderVar.h" @@ -70,8 +70,8 @@ void GrGaussianConvolutionFragmentProcessor::Impl::emitCode(EmitArgs& args) { // For variable-length loops, size the kernel uniform for the maximum width so we can reuse the // same code for any kernel width. bool variableLengthLoop = should_use_variable_length_loop(*args.fShaderCaps); - int width = SkGpuBlurUtils::LinearKernelWidth(ce.fRadius); - int arrayCount = variableLengthLoop ? SkGpuBlurUtils::LinearKernelWidth(kMaxKernelRadius) + int width = GrBlurUtils::LinearKernelWidth(ce.fRadius); + int arrayCount = variableLengthLoop ? GrBlurUtils::LinearKernelWidth(kMaxKernelRadius) : width; const char* offsetsAndKernel; @@ -125,7 +125,7 @@ void GrGaussianConvolutionFragmentProcessor::Impl::onSetData(const GrGLSLProgram increment[static_cast(conv.fDirection)] = 1; pdman.set2fv(fIncrementUni, 1, increment); - int kernelWidth = SkGpuBlurUtils::LinearKernelWidth(conv.fRadius); + int kernelWidth = GrBlurUtils::LinearKernelWidth(conv.fRadius); SkASSERT(kernelWidth <= kMaxKernelWidth); pdman.set2fv(fOffsetsAndKernelUni, kernelWidth, conv.fOffsetsAndKernel[0].ptr()); if (fKernelWidthUni.isValid()) { @@ -146,7 +146,7 @@ std::unique_ptr GrGaussianConvolutionFragmentProcessor::Mak const SkIRect* pixelDomain, const GrCaps& caps) { std::unique_ptr child; - bool is_zero_sigma = SkGpuBlurUtils::IsEffectivelyZeroSigma(gaussianSigma); + bool is_zero_sigma = GrBlurUtils::IsEffectivelyZeroSigma(gaussianSigma); // We should sample as nearest if there will be no shader to preserve existing behaviour, but // the linear blur requires a linear sample. GrSamplerState::Filter filter = is_zero_sigma ? @@ -207,7 +207,7 @@ GrGaussianConvolutionFragmentProcessor::GrGaussianConvolutionFragmentProcessor( // Assemble a gaussian kernel and offset list. float kernel[kMaxKernelWidth] = {}; float offsets[kMaxKernelWidth] = {}; - SkGpuBlurUtils::Compute1DLinearGaussianKernel(kernel, offsets, gaussianSigma, fRadius); + GrBlurUtils::Compute1DLinearGaussianKernel(kernel, offsets, gaussianSigma, fRadius); // Interleave the kernel and offset values into an array of SkV2s. for (int index = 0; index < kMaxKernelWidth; ++index) { @@ -239,7 +239,7 @@ bool GrGaussianConvolutionFragmentProcessor::onIsEqual(const GrFragmentProcessor const auto& that = sBase.cast(); return fRadius == that.fRadius && fDirection == that.fDirection && std::equal(fOffsetsAndKernel, - fOffsetsAndKernel + SkGpuBlurUtils::LinearKernelWidth(fRadius), + fOffsetsAndKernel + GrBlurUtils::LinearKernelWidth(fRadius), that.fOffsetsAndKernel); } diff --git a/src/gpu/ganesh/effects/GrSkSLFP.cpp b/src/gpu/ganesh/effects/GrSkSLFP.cpp index cc909d5046ee..0522d35c60e3 100644 --- a/src/gpu/ganesh/effects/GrSkSLFP.cpp +++ b/src/gpu/ganesh/effects/GrSkSLFP.cpp @@ -43,10 +43,6 @@ #include "src/sksl/ir/SkSLVarDeclarations.h" #include "src/sksl/ir/SkSLVariable.h" -#if defined(SK_ENABLE_SKVM) -#include "src/core/SkFilterColorProgram.h" -#endif - #include namespace SkSL { class Context; } @@ -458,7 +454,6 @@ SkPMColor4f GrSkSLFP::constantOutputForConstantInput(const SkPMColor4f& inputCol ? ConstantOutputForConstantInput(this->childProcessor(fInputChildIndex), inputColor) : inputColor; -#if defined(SK_ENABLE_SKSL_IN_RASTER_PIPELINE) class ConstantOutputForConstantInput_SkRPCallbacks : public SkSL::RP::Callbacks { public: bool appendShader(int index) override { @@ -496,19 +491,6 @@ SkPMColor4f GrSkSLFP::constantOutputForConstantInput(const SkPMColor4f& inputCol // We weren't able to run the Raster Pipeline program. return color; -#elif defined(SK_ENABLE_SKVM) - const SkFilterColorProgram* program = fEffect->getFilterColorProgram(); - SkASSERT(program); - - auto evalChild = [&](int index, SkPMColor4f color) { - SkDEBUGFAIL("constant-output-for-constant-input unsupported when child shaders present"); - return inputColor; - }; - - return program->eval(color, this->uniformData(), evalChild); -#else - return color; -#endif } /**************************************************************************************************/ diff --git a/src/gpu/ganesh/geometry/GrPathUtils.cpp b/src/gpu/ganesh/geometry/GrPathUtils.cpp index 3baafd90715e..45786ce11203 100644 --- a/src/gpu/ganesh/geometry/GrPathUtils.cpp +++ b/src/gpu/ganesh/geometry/GrPathUtils.cpp @@ -8,6 +8,7 @@ #include "src/gpu/ganesh/geometry/GrPathUtils.h" #include "include/gpu/GrTypes.h" +#include "include/private/base/SkFloatingPoint.h" #include "src/base/SkMathPriv.h" #include "src/base/SkUtils.h" #include "src/core/SkPointPriv.h" @@ -455,7 +456,7 @@ void convert_noninflect_cubic_to_quads_with_constraint(const SkPoint p[4], cAvg.fX = ab.fY * z1 - z0 * dc.fY; cAvg.fY = z0 * dc.fX - ab.fX * z1; SkScalar z = ab.fX * dc.fY - ab.fY * dc.fX; - z = SkScalarInvert(z); + z = sk_ieee_float_divide(1.0f, z); cAvg.fX *= z; cAvg.fY *= z; if (sublevel <= kMaxSubdivs) { diff --git a/src/gpu/ganesh/geometry/GrTriangulator.cpp b/src/gpu/ganesh/geometry/GrTriangulator.cpp index 60dbcd3b5848..441881554e0f 100644 --- a/src/gpu/ganesh/geometry/GrTriangulator.cpp +++ b/src/gpu/ganesh/geometry/GrTriangulator.cpp @@ -15,6 +15,7 @@ #include "src/core/SkPointPriv.h" #include +#include #if !defined(SK_ENABLE_OPTIMIZE_SIZE) @@ -293,10 +294,14 @@ void GrTriangulator::EdgeList::insert(Edge* edge, Edge* prev, Edge* next) { list_insert(edge, prev, next, &fHead, &fTail); } -void GrTriangulator::EdgeList::remove(Edge* edge) { +bool GrTriangulator::EdgeList::remove(Edge* edge) { TESS_LOG("removing edge %g -> %g\n", edge->fTop->fID, edge->fBottom->fID); - SkASSERT(this->contains(edge)); + // SkASSERT(this->contains(edge)); // Leave this here for future debugging. + if (!this->contains(edge)) { + return false; + } list_remove(edge, &fHead, &fTail); + return true; } void GrTriangulator::MonotonePoly::addEdge(Edge* edge) { @@ -639,11 +644,15 @@ Edge* GrTriangulator::makeEdge(Vertex* prev, Vertex* next, EdgeType type, return this->allocateEdge(top, bottom, winding, type); } -void EdgeList::insert(Edge* edge, Edge* prev) { +bool EdgeList::insert(Edge* edge, Edge* prev) { TESS_LOG("inserting edge %g -> %g\n", edge->fTop->fID, edge->fBottom->fID); - SkASSERT(!this->contains(edge)); + // SkASSERT(!this->contains(edge)); // Leave this here for debugging. + if (this->contains(edge)) { + return false; + } Edge* next = prev ? prev->fRight : fHead; this->insert(edge, prev, next); + return true; } void GrTriangulator::FindEnclosingEdges(const Vertex& v, @@ -723,20 +732,24 @@ void GrTriangulator::Edge::disconnect() { remove_edge_below(this); } -static void rewind(EdgeList* activeEdges, Vertex** current, Vertex* dst, const Comparator& c) { +static bool rewind(EdgeList* activeEdges, Vertex** current, Vertex* dst, const Comparator& c) { if (!current || *current == dst || c.sweep_lt((*current)->fPoint, dst->fPoint)) { - return; + return true; } Vertex* v = *current; TESS_LOG("rewinding active edges from vertex %g to vertex %g\n", v->fID, dst->fID); while (v != dst) { v = v->fPrev; for (Edge* e = v->fFirstEdgeBelow; e; e = e->fNextEdgeBelow) { - activeEdges->remove(e); + if (!activeEdges->remove(e)) { + return false; + } } Edge* leftEdge = v->fLeftEnclosingEdge; for (Edge* e = v->fFirstEdgeAbove; e; e = e->fNextEdgeAbove) { - activeEdges->insert(e, leftEdge); + if (!activeEdges->insert(e, leftEdge)) { + return false; + } leftEdge = e; Vertex* top = e->fTop; if (c.sweep_lt(top->fPoint, dst->fPoint) && @@ -747,12 +760,13 @@ static void rewind(EdgeList* activeEdges, Vertex** current, Vertex* dst, const C } } *current = v; + return true; } -static void rewind_if_necessary(Edge* edge, EdgeList* activeEdges, Vertex** current, +static bool rewind_if_necessary(Edge* edge, EdgeList* activeEdges, Vertex** current, const Comparator& c) { if (!activeEdges || !current) { - return; + return true; } Vertex* top = edge->fTop; Vertex* bottom = edge->fBottom; @@ -760,35 +774,52 @@ static void rewind_if_necessary(Edge* edge, EdgeList* activeEdges, Vertex** curr Vertex* leftTop = edge->fLeft->fTop; Vertex* leftBottom = edge->fLeft->fBottom; if (c.sweep_lt(leftTop->fPoint, top->fPoint) && !edge->fLeft->isLeftOf(*top)) { - rewind(activeEdges, current, leftTop, c); + if (!rewind(activeEdges, current, leftTop, c)) { + return false; + } } else if (c.sweep_lt(top->fPoint, leftTop->fPoint) && !edge->isRightOf(*leftTop)) { - rewind(activeEdges, current, top, c); + if (!rewind(activeEdges, current, top, c)) { + return false; + } } else if (c.sweep_lt(bottom->fPoint, leftBottom->fPoint) && !edge->fLeft->isLeftOf(*bottom)) { - rewind(activeEdges, current, leftTop, c); + if (!rewind(activeEdges, current, leftTop, c)) { + return false; + } } else if (c.sweep_lt(leftBottom->fPoint, bottom->fPoint) && !edge->isRightOf(*leftBottom)) { - rewind(activeEdges, current, top, c); + if (!rewind(activeEdges, current, top, c)) { + return false; + } } } if (edge->fRight) { Vertex* rightTop = edge->fRight->fTop; Vertex* rightBottom = edge->fRight->fBottom; if (c.sweep_lt(rightTop->fPoint, top->fPoint) && !edge->fRight->isRightOf(*top)) { - rewind(activeEdges, current, rightTop, c); + if (!rewind(activeEdges, current, rightTop, c)) { + return false; + } } else if (c.sweep_lt(top->fPoint, rightTop->fPoint) && !edge->isLeftOf(*rightTop)) { - rewind(activeEdges, current, top, c); + if (!rewind(activeEdges, current, top, c)) { + return false; + } } else if (c.sweep_lt(bottom->fPoint, rightBottom->fPoint) && !edge->fRight->isRightOf(*bottom)) { - rewind(activeEdges, current, rightTop, c); + if (!rewind(activeEdges, current, rightTop, c)) { + return false; + } } else if (c.sweep_lt(rightBottom->fPoint, bottom->fPoint) && !edge->isLeftOf(*rightBottom)) { - rewind(activeEdges, current, top, c); + if (!rewind(activeEdges, current, top, c)) { + return false; + } } } + return true; } -void GrTriangulator::setTop(Edge* edge, Vertex* v, EdgeList* activeEdges, Vertex** current, +bool GrTriangulator::setTop(Edge* edge, Vertex* v, EdgeList* activeEdges, Vertex** current, const Comparator& c) const { remove_edge_below(edge); if (fCollectBreadcrumbTriangles) { @@ -798,11 +829,13 @@ void GrTriangulator::setTop(Edge* edge, Vertex* v, EdgeList* activeEdges, Vertex edge->fTop = v; edge->recompute(); edge->insertBelow(v, c); - rewind_if_necessary(edge, activeEdges, current, c); - this->mergeCollinearEdges(edge, activeEdges, current, c); + if (!rewind_if_necessary(edge, activeEdges, current, c)) { + return false; + } + return this->mergeCollinearEdges(edge, activeEdges, current, c); } -void GrTriangulator::setBottom(Edge* edge, Vertex* v, EdgeList* activeEdges, Vertex** current, +bool GrTriangulator::setBottom(Edge* edge, Vertex* v, EdgeList* activeEdges, Vertex** current, const Comparator& c) const { remove_edge_above(edge); if (fCollectBreadcrumbTriangles) { @@ -812,50 +845,74 @@ void GrTriangulator::setBottom(Edge* edge, Vertex* v, EdgeList* activeEdges, Ver edge->fBottom = v; edge->recompute(); edge->insertAbove(v, c); - rewind_if_necessary(edge, activeEdges, current, c); - this->mergeCollinearEdges(edge, activeEdges, current, c); + if (!rewind_if_necessary(edge, activeEdges, current, c)) { + return false; + } + return this->mergeCollinearEdges(edge, activeEdges, current, c); } -void GrTriangulator::mergeEdgesAbove(Edge* edge, Edge* other, EdgeList* activeEdges, +bool GrTriangulator::mergeEdgesAbove(Edge* edge, Edge* other, EdgeList* activeEdges, Vertex** current, const Comparator& c) const { if (coincident(edge->fTop->fPoint, other->fTop->fPoint)) { TESS_LOG("merging coincident above edges (%g, %g) -> (%g, %g)\n", edge->fTop->fPoint.fX, edge->fTop->fPoint.fY, edge->fBottom->fPoint.fX, edge->fBottom->fPoint.fY); - rewind(activeEdges, current, edge->fTop, c); + if (!rewind(activeEdges, current, edge->fTop, c)) { + return false; + } other->fWinding += edge->fWinding; edge->disconnect(); edge->fTop = edge->fBottom = nullptr; } else if (c.sweep_lt(edge->fTop->fPoint, other->fTop->fPoint)) { - rewind(activeEdges, current, edge->fTop, c); + if (!rewind(activeEdges, current, edge->fTop, c)) { + return false; + } other->fWinding += edge->fWinding; - this->setBottom(edge, other->fTop, activeEdges, current, c); + if (!this->setBottom(edge, other->fTop, activeEdges, current, c)) { + return false; + } } else { - rewind(activeEdges, current, other->fTop, c); + if (!rewind(activeEdges, current, other->fTop, c)) { + return false; + } edge->fWinding += other->fWinding; - this->setBottom(other, edge->fTop, activeEdges, current, c); + if (!this->setBottom(other, edge->fTop, activeEdges, current, c)) { + return false; + } } + return true; } -void GrTriangulator::mergeEdgesBelow(Edge* edge, Edge* other, EdgeList* activeEdges, +bool GrTriangulator::mergeEdgesBelow(Edge* edge, Edge* other, EdgeList* activeEdges, Vertex** current, const Comparator& c) const { if (coincident(edge->fBottom->fPoint, other->fBottom->fPoint)) { TESS_LOG("merging coincident below edges (%g, %g) -> (%g, %g)\n", edge->fTop->fPoint.fX, edge->fTop->fPoint.fY, edge->fBottom->fPoint.fX, edge->fBottom->fPoint.fY); - rewind(activeEdges, current, edge->fTop, c); + if (!rewind(activeEdges, current, edge->fTop, c)) { + return false; + } other->fWinding += edge->fWinding; edge->disconnect(); edge->fTop = edge->fBottom = nullptr; } else if (c.sweep_lt(edge->fBottom->fPoint, other->fBottom->fPoint)) { - rewind(activeEdges, current, other->fTop, c); + if (!rewind(activeEdges, current, other->fTop, c)) { + return false; + } edge->fWinding += other->fWinding; - this->setTop(other, edge->fBottom, activeEdges, current, c); + if (!this->setTop(other, edge->fBottom, activeEdges, current, c)) { + return false; + } } else { - rewind(activeEdges, current, edge->fTop, c); + if (!rewind(activeEdges, current, edge->fTop, c)) { + return false; + } other->fWinding += edge->fWinding; - this->setTop(edge, other->fBottom, activeEdges, current, c); + if (!this->setTop(edge, other->fBottom, activeEdges, current, c)) { + return false; + } } + return true; } static bool top_collinear(Edge* left, Edge* right) { @@ -874,17 +931,25 @@ static bool bottom_collinear(Edge* left, Edge* right) { !left->isLeftOf(*right->fBottom) || !right->isRightOf(*left->fBottom); } -void GrTriangulator::mergeCollinearEdges(Edge* edge, EdgeList* activeEdges, Vertex** current, +bool GrTriangulator::mergeCollinearEdges(Edge* edge, EdgeList* activeEdges, Vertex** current, const Comparator& c) const { for (;;) { if (top_collinear(edge->fPrevEdgeAbove, edge)) { - this->mergeEdgesAbove(edge->fPrevEdgeAbove, edge, activeEdges, current, c); + if (!this->mergeEdgesAbove(edge->fPrevEdgeAbove, edge, activeEdges, current, c)) { + return false; + } } else if (top_collinear(edge, edge->fNextEdgeAbove)) { - this->mergeEdgesAbove(edge->fNextEdgeAbove, edge, activeEdges, current, c); + if (!this->mergeEdgesAbove(edge->fNextEdgeAbove, edge, activeEdges, current, c)) { + return false; + } } else if (bottom_collinear(edge->fPrevEdgeBelow, edge)) { - this->mergeEdgesBelow(edge->fPrevEdgeBelow, edge, activeEdges, current, c); + if (!this->mergeEdgesBelow(edge->fPrevEdgeBelow, edge, activeEdges, current, c)) { + return false; + } } else if (bottom_collinear(edge, edge->fNextEdgeBelow)) { - this->mergeEdgesBelow(edge->fNextEdgeBelow, edge, activeEdges, current, c); + if (!this->mergeEdgesBelow(edge->fNextEdgeBelow, edge, activeEdges, current, c)) { + return false; + } } else { break; } @@ -893,12 +958,13 @@ void GrTriangulator::mergeCollinearEdges(Edge* edge, EdgeList* activeEdges, Vert SkASSERT(!top_collinear(edge, edge->fNextEdgeAbove)); SkASSERT(!bottom_collinear(edge->fPrevEdgeBelow, edge)); SkASSERT(!bottom_collinear(edge, edge->fNextEdgeBelow)); + return true; } -bool GrTriangulator::splitEdge(Edge* edge, Vertex* v, EdgeList* activeEdges, Vertex** current, - const Comparator& c) { +GrTriangulator::BoolFail GrTriangulator::splitEdge( + Edge* edge, Vertex* v, EdgeList* activeEdges, Vertex** current, const Comparator& c) { if (!edge->fTop || !edge->fBottom || v == edge->fTop || v == edge->fBottom) { - return false; + return BoolFail::kFalse; } TESS_LOG("splitting edge (%g -> %g) at vertex %g (%g, %g)\n", edge->fTop->fID, edge->fBottom->fID, v->fID, v->fPoint.fX, v->fPoint.fY); @@ -914,35 +980,43 @@ bool GrTriangulator::splitEdge(Edge* edge, Vertex* v, EdgeList* activeEdges, Ver top = v; bottom = edge->fTop; winding *= -1; - this->setTop(edge, v, activeEdges, current, c); + if (!this->setTop(edge, v, activeEdges, current, c)) { + return BoolFail::kFail; + } } else if (c.sweep_lt(edge->fBottom->fPoint, v->fPoint)) { // Actually "p0 < p1 < v": update 'edge' to be p0->v and add p1->v. We flip the winding on // the new edge so that it winds as if it were v->p1. top = edge->fBottom; bottom = v; winding *= -1; - this->setBottom(edge, v, activeEdges, current, c); + if (!this->setBottom(edge, v, activeEdges, current, c)) { + return BoolFail::kFail; + } } else { // The ideal case, "p0 < v < p1": update 'edge' to be p0->v and add v->p1. Original winding // is valid for both edges. top = v; bottom = edge->fBottom; - this->setBottom(edge, v, activeEdges, current, c); + if (!this->setBottom(edge, v, activeEdges, current, c)) { + return BoolFail::kFail; + } } Edge* newEdge = this->allocateEdge(top, bottom, winding, edge->fType); newEdge->insertBelow(top, c); newEdge->insertAbove(bottom, c); - this->mergeCollinearEdges(newEdge, activeEdges, current, c); - return true; + if (!this->mergeCollinearEdges(newEdge, activeEdges, current, c)) { + return BoolFail::kFail; + } + return BoolFail::kTrue; } -bool GrTriangulator::intersectEdgePair(Edge* left, Edge* right, EdgeList* activeEdges, - Vertex** current, const Comparator& c) { +GrTriangulator::BoolFail GrTriangulator::intersectEdgePair( + Edge* left, Edge* right, EdgeList* activeEdges, Vertex** current, const Comparator& c) { if (!left->fTop || !left->fBottom || !right->fTop || !right->fBottom) { - return false; + return BoolFail::kFalse; } if (left->fTop == right->fTop || left->fBottom == right->fBottom) { - return false; + return BoolFail::kFalse; } // Check if the lines intersect as determined by isLeftOf and isRightOf, since that is the @@ -975,12 +1049,14 @@ bool GrTriangulator::intersectEdgePair(Edge* left, Edge* right, EdgeList* active } if (!split) { - return false; + return BoolFail::kFalse; } // Rewind to the top of the edge that is "moving" since this topology correction can change the // geometry of the split edge. - rewind(activeEdges, current, split->fTop, c); + if (!rewind(activeEdges, current, split->fTop, c)) { + return BoolFail::kFail; + } return this->splitEdge(split, splitAt, activeEdges, current, c); } @@ -1006,10 +1082,10 @@ void GrTriangulator::mergeVertices(Vertex* src, Vertex* dst, VertexList* mesh, src->fPartner->fPartner = dst; } while (Edge* edge = src->fFirstEdgeAbove) { - this->setBottom(edge, dst, nullptr, nullptr, c); + std::ignore = this->setBottom(edge, dst, nullptr, nullptr, c); } while (Edge* edge = src->fFirstEdgeBelow) { - this->setTop(edge, dst, nullptr, nullptr, c); + std::ignore = this->setTop(edge, dst, nullptr, nullptr, c); } mesh->remove(src); dst->fSynthetic = true; @@ -1085,11 +1161,12 @@ void GrTriangulator::computeBisector(Edge* edge1, Edge* edge2, Vertex* v) const } } -bool GrTriangulator::checkForIntersection(Edge* left, Edge* right, EdgeList* activeEdges, - Vertex** current, VertexList* mesh, - const Comparator& c) { +GrTriangulator::BoolFail GrTriangulator::checkForIntersection( + Edge* left, Edge* right, EdgeList* activeEdges, + Vertex** current, VertexList* mesh, + const Comparator& c) { if (!left || !right) { - return false; + return BoolFail::kFalse; } SkPoint p; uint8_t alpha; @@ -1125,11 +1202,17 @@ bool GrTriangulator::checkForIntersection(Edge* left, Edge* right, EdgeList* act this->computeBisector(left, right, v); } } - rewind(activeEdges, current, top ? top : v, c); - this->splitEdge(left, v, activeEdges, current, c); - this->splitEdge(right, v, activeEdges, current, c); + if (!rewind(activeEdges, current, top ? top : v, c)) { + return BoolFail::kFail; + } + if (this->splitEdge(left, v, activeEdges, current, c) == BoolFail::kFail) { + return BoolFail::kFail; + } + if (this->splitEdge(right, v, activeEdges, current, c) == BoolFail::kFail) { + return BoolFail::kFail; + } v->fAlpha = std::max(v->fAlpha, alpha); - return true; + return BoolFail::kTrue; } return this->intersectEdgePair(left, right, activeEdges, current, c); } @@ -1357,18 +1440,33 @@ GrTriangulator::SimplifyResult GrTriangulator::simplify(VertexList* mesh, v->fRightEnclosingEdge = rightEnclosingEdge; if (v->fFirstEdgeBelow) { for (Edge* edge = v->fFirstEdgeBelow; edge; edge = edge->fNextEdgeBelow) { - if (this->checkForIntersection( - leftEnclosingEdge, edge, &activeEdges, &v, mesh, c) || - this->checkForIntersection( - edge, rightEnclosingEdge, &activeEdges, &v, mesh, c)) { - result = SimplifyResult::kFoundSelfIntersection; - restartChecks = true; - break; + BoolFail l = this->checkForIntersection( + leftEnclosingEdge, edge, &activeEdges, &v, mesh, c); + if (l == BoolFail::kFail) { + return SimplifyResult::kFailed; + } else if (l == BoolFail::kFalse) { + BoolFail r = this->checkForIntersection( + edge, rightEnclosingEdge, &activeEdges, &v, mesh, c); + if (r == BoolFail::kFail) { + return SimplifyResult::kFailed; + } else if (r == BoolFail::kFalse) { + // Neither l and r are both false. + continue; + } } - } + + // Either l or r are true. + result = SimplifyResult::kFoundSelfIntersection; + restartChecks = true; + break; + } // for } else { - if (this->checkForIntersection(leftEnclosingEdge, rightEnclosingEdge, &activeEdges, - &v, mesh, c)) { + BoolFail bf = this->checkForIntersection( + leftEnclosingEdge, rightEnclosingEdge, &activeEdges, &v, mesh, c); + if (bf == BoolFail::kFail) { + return SimplifyResult::kFailed; + } + if (bf == BoolFail::kTrue) { result = SimplifyResult::kFoundSelfIntersection; restartChecks = true; } @@ -1379,7 +1477,9 @@ GrTriangulator::SimplifyResult GrTriangulator::simplify(VertexList* mesh, validate_edge_list(&activeEdges, c); #endif for (Edge* e = v->fFirstEdgeAbove; e; e = e->fNextEdgeAbove) { - activeEdges.remove(e); + if (!activeEdges.remove(e)) { + return SimplifyResult::kFailed; + } } Edge* leftEdge = leftEnclosingEdge; for (Edge* e = v->fFirstEdgeBelow; e; e = e->fNextEdgeBelow) { diff --git a/src/gpu/ganesh/geometry/GrTriangulator.h b/src/gpu/ganesh/geometry/GrTriangulator.h index 65755576a7d3..b23189943697 100644 --- a/src/gpu/ganesh/geometry/GrTriangulator.h +++ b/src/gpu/ganesh/geometry/GrTriangulator.h @@ -84,7 +84,13 @@ class GrTriangulator { kFoundSelfIntersection }; - SimplifyResult SK_WARN_UNUSED_RESULT simplify(VertexList* mesh, const Comparator&); + enum class BoolFail { + kFalse, + kTrue, + kFail + }; + + [[nodiscard]] SimplifyResult simplify(VertexList* mesh, const Comparator&); // 5) Tessellate the simplified mesh into monotone polygons: virtual std::tuple tessellate(const VertexList& vertices, const Comparator&); @@ -153,30 +159,30 @@ class GrTriangulator { MonotonePoly* allocateMonotonePoly(Edge* edge, Side side, int winding); Edge* allocateEdge(Vertex* top, Vertex* bottom, int winding, EdgeType type); Edge* makeEdge(Vertex* prev, Vertex* next, EdgeType type, const Comparator&); - void setTop(Edge* edge, Vertex* v, EdgeList* activeEdges, Vertex** current, - const Comparator&) const; - void setBottom(Edge* edge, Vertex* v, EdgeList* activeEdges, Vertex** current, - const Comparator&) const; - void mergeEdgesAbove(Edge* edge, Edge* other, EdgeList* activeEdges, Vertex** current, - const Comparator&) const; - void mergeEdgesBelow(Edge* edge, Edge* other, EdgeList* activeEdges, Vertex** current, - const Comparator&) const; + [[nodiscard]] bool setTop( + Edge* edge, Vertex* v, EdgeList* activeEdges, Vertex** current, const Comparator&) const; + [[nodiscard]] bool setBottom( + Edge* edge, Vertex* v, EdgeList* activeEdges, Vertex** current, const Comparator&) const; + [[nodiscard]] bool mergeEdgesAbove( + Edge* edge, Edge* other, EdgeList* activeEdges, Vertex** current, const Comparator&) const; + [[nodiscard]] bool mergeEdgesBelow( + Edge* edge, Edge* other, EdgeList* activeEdges, Vertex** current, const Comparator&) const; Edge* makeConnectingEdge(Vertex* prev, Vertex* next, EdgeType, const Comparator&, int windingScale = 1); void mergeVertices(Vertex* src, Vertex* dst, VertexList* mesh, const Comparator&) const; static void FindEnclosingEdges(const Vertex& v, const EdgeList& edges, Edge** left, Edge** right); - void mergeCollinearEdges(Edge* edge, EdgeList* activeEdges, Vertex** current, + bool mergeCollinearEdges(Edge* edge, EdgeList* activeEdges, Vertex** current, const Comparator&) const; - bool splitEdge(Edge* edge, Vertex* v, EdgeList* activeEdges, Vertex** current, - const Comparator&); - bool intersectEdgePair(Edge* left, Edge* right, EdgeList* activeEdges, Vertex** current, - const Comparator&); + BoolFail splitEdge(Edge* edge, Vertex* v, EdgeList* activeEdges, Vertex** current, + const Comparator&); + BoolFail intersectEdgePair(Edge* left, Edge* right, EdgeList* activeEdges, Vertex** current, + const Comparator&); Vertex* makeSortedVertex(const SkPoint&, uint8_t alpha, VertexList* mesh, Vertex* reference, const Comparator&) const; void computeBisector(Edge* edge1, Edge* edge2, Vertex*) const; - bool checkForIntersection(Edge* left, Edge* right, EdgeList* activeEdges, Vertex** current, - VertexList* mesh, const Comparator&); + BoolFail checkForIntersection(Edge* left, Edge* right, EdgeList* activeEdges, Vertex** current, + VertexList* mesh, const Comparator&); void sanitizeContours(VertexList* contours, int contourCnt) const; bool mergeCoincidentVertices(VertexList* mesh, const Comparator&) const; void buildEdges(VertexList* contours, int contourCnt, VertexList* mesh, @@ -452,9 +458,9 @@ struct GrTriangulator::EdgeList { Edge* fHead; Edge* fTail; void insert(Edge* edge, Edge* prev, Edge* next); - void insert(Edge* edge, Edge* prev); + bool insert(Edge* edge, Edge* prev); void append(Edge* e) { insert(e, fTail, nullptr); } - void remove(Edge* edge); + bool remove(Edge* edge); void removeAll() { while (fHead) { this->remove(fHead); diff --git a/src/gpu/ganesh/gl/AHardwareBufferGL.cpp b/src/gpu/ganesh/gl/AHardwareBufferGL.cpp new file mode 100644 index 000000000000..2489c3004891 --- /dev/null +++ b/src/gpu/ganesh/gl/AHardwareBufferGL.cpp @@ -0,0 +1,229 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "include/android/GrAHardwareBufferUtils.h" + +#if defined(SK_BUILD_FOR_ANDROID) && __ANDROID_API__ >= 26 +#define GL_GLEXT_PROTOTYPES +#define EGL_EGLEXT_PROTOTYPES + +#include "include/gpu/GrBackendSurface.h" +#include "include/gpu/GrDirectContext.h" +#include "include/gpu/ganesh/gl/GrGLBackendSurface.h" +#include "include/gpu/gl/GrGLTypes.h" +#include "src/gpu/ganesh/GrDirectContextPriv.h" +#include "src/gpu/ganesh/gl/GrGLDefines.h" +#include "src/gpu/ganesh/gl/GrGLUtil.h" + +#include +#include +#include +#include +#include + +#define PROT_CONTENT_EXT_STR "EGL_EXT_protected_content" +#define EGL_PROTECTED_CONTENT_EXT 0x32C0 + +namespace GrAHardwareBufferUtils { + +GrBackendFormat GetGLBackendFormat(GrDirectContext* dContext, + uint32_t bufferFormat, bool requireKnownFormat) { + GrBackendApi backend = dContext->backend(); + if (backend != GrBackendApi::kOpenGL) { + return GrBackendFormat(); + } + switch (bufferFormat) { + //TODO: find out if we can detect, which graphic buffers support GR_GL_TEXTURE_2D + case AHARDWAREBUFFER_FORMAT_R8G8B8A8_UNORM: + case AHARDWAREBUFFER_FORMAT_R8G8B8X8_UNORM: + return GrBackendFormats::MakeGL(GR_GL_RGBA8, GR_GL_TEXTURE_EXTERNAL); + case AHARDWAREBUFFER_FORMAT_R16G16B16A16_FLOAT: + return GrBackendFormats::MakeGL(GR_GL_RGBA16F, GR_GL_TEXTURE_EXTERNAL); + case AHARDWAREBUFFER_FORMAT_R5G6B5_UNORM: + return GrBackendFormats::MakeGL(GR_GL_RGB565, GR_GL_TEXTURE_EXTERNAL); + case AHARDWAREBUFFER_FORMAT_R10G10B10A2_UNORM: + return GrBackendFormats::MakeGL(GR_GL_RGB10_A2, GR_GL_TEXTURE_EXTERNAL); + case AHARDWAREBUFFER_FORMAT_R8G8B8_UNORM: + return GrBackendFormats::MakeGL(GR_GL_RGB8, GR_GL_TEXTURE_EXTERNAL); +#if __ANDROID_API__ >= 33 + case AHARDWAREBUFFER_FORMAT_R8_UNORM: + return GrBackendFormats::MakeGL(GR_GL_R8, GR_GL_TEXTURE_EXTERNAL); +#endif + default: + if (requireKnownFormat) { + return GrBackendFormat(); + } else { + return GrBackendFormats::MakeGL(GR_GL_RGBA8, GR_GL_TEXTURE_EXTERNAL); + } + } + SkUNREACHABLE; +} + +class GLTextureHelper { +public: + GLTextureHelper(GrGLuint texID, EGLImageKHR image, EGLDisplay display, GrGLuint texTarget) + : fTexID(texID) + , fImage(image) + , fDisplay(display) + , fTexTarget(texTarget) { } + ~GLTextureHelper() { + glDeleteTextures(1, &fTexID); + // eglDestroyImageKHR will remove a ref from the AHardwareBuffer + eglDestroyImageKHR(fDisplay, fImage); + } + void rebind(GrDirectContext*); + +private: + GrGLuint fTexID; + EGLImageKHR fImage; + EGLDisplay fDisplay; + GrGLuint fTexTarget; +}; + +void GLTextureHelper::rebind(GrDirectContext* dContext) { + glBindTexture(fTexTarget, fTexID); + GLenum status = GL_NO_ERROR; + if ((status = glGetError()) != GL_NO_ERROR) { + SkDebugf("glBindTexture(%#x, %d) failed (%#x)", (int) fTexTarget, + (int) fTexID, (int) status); + return; + } + glEGLImageTargetTexture2DOES(fTexTarget, fImage); + if ((status = glGetError()) != GL_NO_ERROR) { + SkDebugf("glEGLImageTargetTexture2DOES failed (%#x)", (int) status); + return; + } + dContext->resetContext(kTextureBinding_GrGLBackendState); +} + +void delete_gl_texture(void* context) { + GLTextureHelper* cleanupHelper = static_cast(context); + delete cleanupHelper; +} + +void update_gl_texture(void* context, GrDirectContext* dContext) { + GLTextureHelper* cleanupHelper = static_cast(context); + cleanupHelper->rebind(dContext); +} + +static GrBackendTexture make_gl_backend_texture( + GrDirectContext* dContext, + AHardwareBuffer* hardwareBuffer, + int width, int height, + DeleteImageProc* deleteProc, + UpdateImageProc* updateProc, + TexImageCtx* imageCtx, + bool isProtectedContent, + const GrBackendFormat& backendFormat, + bool isRenderable) { + while (GL_NO_ERROR != glGetError()) {} //clear GL errors + + EGLClientBuffer clientBuffer = eglGetNativeClientBufferANDROID(hardwareBuffer); + EGLint attribs[] = { EGL_IMAGE_PRESERVED_KHR, EGL_TRUE, + isProtectedContent ? EGL_PROTECTED_CONTENT_EXT : EGL_NONE, + isProtectedContent ? EGL_TRUE : EGL_NONE, + EGL_NONE }; + EGLDisplay display = eglGetCurrentDisplay(); + // eglCreateImageKHR will add a ref to the AHardwareBuffer + EGLImageKHR image = eglCreateImageKHR(display, EGL_NO_CONTEXT, EGL_NATIVE_BUFFER_ANDROID, + clientBuffer, attribs); + if (EGL_NO_IMAGE_KHR == image) { + SkDebugf("Could not create EGL image, err = (%#x)", (int) eglGetError() ); + return GrBackendTexture(); + } + + GrGLuint texID; + glGenTextures(1, &texID); + if (!texID) { + eglDestroyImageKHR(display, image); + return GrBackendTexture(); + } + + GrGLuint target = isRenderable ? GR_GL_TEXTURE_2D : GR_GL_TEXTURE_EXTERNAL; + + glBindTexture(target, texID); + GLenum status = GL_NO_ERROR; + if ((status = glGetError()) != GL_NO_ERROR) { + SkDebugf("glBindTexture failed (%#x)", (int) status); + glDeleteTextures(1, &texID); + eglDestroyImageKHR(display, image); + return GrBackendTexture(); + } + glEGLImageTargetTexture2DOES(target, image); + if ((status = glGetError()) != GL_NO_ERROR) { + SkDebugf("glEGLImageTargetTexture2DOES failed (%#x)", (int) status); + glDeleteTextures(1, &texID); + eglDestroyImageKHR(display, image); + return GrBackendTexture(); + } + dContext->resetContext(kTextureBinding_GrGLBackendState); + + GrGLTextureInfo textureInfo; + textureInfo.fID = texID; + SkASSERT(backendFormat.isValid()); + textureInfo.fTarget = target; + textureInfo.fFormat = GrBackendFormats::AsGLFormatEnum(backendFormat); + + *deleteProc = delete_gl_texture; + *updateProc = update_gl_texture; + *imageCtx = new GLTextureHelper(texID, image, display, target); + + return GrBackendTextures::MakeGL(width, height, GrMipmapped::kNo, textureInfo); +} + +static bool can_import_protected_content_eglimpl() { + EGLDisplay dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY); + const char* exts = eglQueryString(dpy, EGL_EXTENSIONS); + size_t cropExtLen = strlen(PROT_CONTENT_EXT_STR); + size_t extsLen = strlen(exts); + bool equal = !strcmp(PROT_CONTENT_EXT_STR, exts); + bool atStart = !strncmp(PROT_CONTENT_EXT_STR " ", exts, cropExtLen+1); + bool atEnd = (cropExtLen+1) < extsLen + && !strcmp(" " PROT_CONTENT_EXT_STR, + exts + extsLen - (cropExtLen+1)); + bool inMiddle = strstr(exts, " " PROT_CONTENT_EXT_STR " "); + return equal || atStart || atEnd || inMiddle; +} + +static bool can_import_protected_content(GrDirectContext* dContext) { + SkASSERT(GrBackendApi::kOpenGL == dContext->backend()); + // Only compute whether the extension is present once the first time this + // function is called. + static bool hasIt = can_import_protected_content_eglimpl(); + return hasIt; +} + +GrBackendTexture MakeGLBackendTexture(GrDirectContext* dContext, + AHardwareBuffer* hardwareBuffer, + int width, int height, + DeleteImageProc* deleteProc, + UpdateImageProc* updateProc, + TexImageCtx* imageCtx, + bool isProtectedContent, + const GrBackendFormat& backendFormat, + bool isRenderable) { + SkASSERT(dContext); + if (!dContext || dContext->abandoned()) { + return GrBackendTexture(); + } + + if (GrBackendApi::kOpenGL != dContext->backend()) { + return GrBackendTexture(); + } + + if (isProtectedContent && !can_import_protected_content(dContext)) { + return GrBackendTexture(); + } + + return make_gl_backend_texture(dContext, hardwareBuffer, width, height, deleteProc, + updateProc, imageCtx, isProtectedContent, backendFormat, + isRenderable); +} + +} // namespace GrAHardwareBufferUtils + +#endif diff --git a/src/gpu/ganesh/gl/BUILD.bazel b/src/gpu/ganesh/gl/BUILD.bazel index 5a66b48b3a63..511af1b54449 100644 --- a/src/gpu/ganesh/gl/BUILD.bazel +++ b/src/gpu/ganesh/gl/BUILD.bazel @@ -6,6 +6,7 @@ licenses(["notice"]) exports_files_legacy() CORE_FILES = [ + "AHardwareBufferGL.cpp", "GrGLAssembleGLESInterfaceAutogen.cpp", "GrGLAssembleGLInterfaceAutogen.cpp", "GrGLAssembleHelpers.cpp", @@ -21,6 +22,8 @@ CORE_FILES = [ "GrGLContext.h", "GrGLDefines.h", "GrGLExtensions.cpp", + "GrGLBackendSurface.cpp", + "GrGLBackendSurfacePriv.h", "GrGLGLSL.cpp", "GrGLGLSL.h", "GrGLGpu.cpp", diff --git a/src/gpu/ganesh/gl/GrGLAssembleGLESInterfaceAutogen.cpp b/src/gpu/ganesh/gl/GrGLAssembleGLESInterfaceAutogen.cpp index 821eded48f9a..ec8ca38dddd5 100644 --- a/src/gpu/ganesh/gl/GrGLAssembleGLESInterfaceAutogen.cpp +++ b/src/gpu/ganesh/gl/GrGLAssembleGLESInterfaceAutogen.cpp @@ -484,6 +484,6 @@ sk_sp GrGLMakeAssembledGLESInterface(void *ctx, GrGLGetProc interface->fStandard = kGLES_GrGLStandard; interface->fExtensions.swap(&extensions); - return std::move(interface); + return interface; } #endif diff --git a/src/gpu/ganesh/gl/GrGLAssembleGLInterfaceAutogen.cpp b/src/gpu/ganesh/gl/GrGLAssembleGLInterfaceAutogen.cpp index b375c31b48f5..a80519d34d2b 100644 --- a/src/gpu/ganesh/gl/GrGLAssembleGLInterfaceAutogen.cpp +++ b/src/gpu/ganesh/gl/GrGLAssembleGLInterfaceAutogen.cpp @@ -503,6 +503,6 @@ sk_sp GrGLMakeAssembledGLInterface(void *ctx, GrGLGetProc g interface->fStandard = kGL_GrGLStandard; interface->fExtensions.swap(&extensions); - return std::move(interface); + return interface; } #endif diff --git a/src/gpu/ganesh/gl/GrGLAssembleWebGLInterfaceAutogen.cpp b/src/gpu/ganesh/gl/GrGLAssembleWebGLInterfaceAutogen.cpp index 7fe3451eaa5c..982967eb6fad 100644 --- a/src/gpu/ganesh/gl/GrGLAssembleWebGLInterfaceAutogen.cpp +++ b/src/gpu/ganesh/gl/GrGLAssembleWebGLInterfaceAutogen.cpp @@ -262,6 +262,6 @@ sk_sp GrGLMakeAssembledWebGLInterface(void *ctx, GrGLGetPro interface->fStandard = kWebGL_GrGLStandard; interface->fExtensions.swap(&extensions); - return std::move(interface); + return interface; } #endif diff --git a/src/gpu/ganesh/gl/GrGLAttachment.cpp b/src/gpu/ganesh/gl/GrGLAttachment.cpp index 3feb76fb8c15..80d1d1b2f209 100644 --- a/src/gpu/ganesh/gl/GrGLAttachment.cpp +++ b/src/gpu/ganesh/gl/GrGLAttachment.cpp @@ -8,6 +8,7 @@ #include "src/gpu/ganesh/gl/GrGLAttachment.h" #include "include/core/SkTraceMemoryDump.h" +#include "include/gpu/ganesh/gl/GrGLBackendSurface.h" #include "src/gpu/ganesh/gl/GrGLGpu.h" #define GL_CALL(X) GR_GL_CALL(gpu->glInterface(), X) @@ -135,7 +136,7 @@ void GrGLAttachment::onAbandon() { } GrBackendFormat GrGLAttachment::backendFormat() const { - return GrBackendFormat::MakeGL(GrGLFormatToEnum(fFormat), GR_GL_TEXTURE_NONE); + return GrBackendFormats::MakeGL(GrGLFormatToEnum(fFormat), GR_GL_TEXTURE_NONE); } void GrGLAttachment::setMemoryBacking(SkTraceMemoryDump* traceMemoryDump, diff --git a/src/gpu/ganesh/gl/GrGLBackendSurface.cpp b/src/gpu/ganesh/gl/GrGLBackendSurface.cpp new file mode 100644 index 000000000000..59922d55906b --- /dev/null +++ b/src/gpu/ganesh/gl/GrGLBackendSurface.cpp @@ -0,0 +1,363 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ +#include "include/gpu/ganesh/gl/GrGLBackendSurface.h" + +#include "include/core/SkRefCnt.h" +#include "include/core/SkTextureCompressionType.h" +#include "include/gpu/GrBackendSurface.h" +#include "include/gpu/GrTypes.h" +#include "include/gpu/gl/GrGLTypes.h" +#include "include/private/base/SkAssert.h" +#include "include/private/base/SkTo.h" +#include "include/private/gpu/ganesh/GrGLTypesPriv.h" +#include "include/private/gpu/ganesh/GrTypesPriv.h" +#include "src/gpu/ganesh/GrBackendSurfacePriv.h" +#include "src/gpu/ganesh/gl/GrGLBackendSurfacePriv.h" +#include "src/gpu/ganesh/gl/GrGLDefines.h" +#include "src/gpu/ganesh/gl/GrGLUtil.h" + +#include +#include +#include +#include +#include +#include + +class GrGLBackendFormatData final : public GrBackendFormatData { +public: + GrGLBackendFormatData(GrGLenum format) : fGLFormat(format) {} + + GrGLenum asEnum() const { return fGLFormat; } + +private: + SkTextureCompressionType compressionType() const override { + switch (GrGLFormatFromGLEnum(fGLFormat)) { + case GrGLFormat::kCOMPRESSED_ETC1_RGB8: + case GrGLFormat::kCOMPRESSED_RGB8_ETC2: + return SkTextureCompressionType::kETC2_RGB8_UNORM; + case GrGLFormat::kCOMPRESSED_RGB8_BC1: + return SkTextureCompressionType::kBC1_RGB8_UNORM; + case GrGLFormat::kCOMPRESSED_RGBA8_BC1: + return SkTextureCompressionType::kBC1_RGBA8_UNORM; + default: + return SkTextureCompressionType::kNone; + } + } + + size_t bytesPerBlock() const override { + return GrGLFormatBytesPerBlock(GrGLFormatFromGLEnum(fGLFormat)); + } + + int stencilBits() const override { + return GrGLFormatStencilBits(GrGLFormatFromGLEnum(fGLFormat)); + } + + uint32_t channelMask() const override { + return GrGLFormatChannels(GrGLFormatFromGLEnum(fGLFormat)); + } + + GrColorFormatDesc desc() const override { + return GrGLFormatDesc(GrGLFormatFromGLEnum(fGLFormat)); + } + + bool equal(const GrBackendFormatData* that) const override { + SkASSERT(!that || that->type() == GrBackendApi::kOpenGL); + if (auto otherGL = static_cast(that)) { + return fGLFormat == otherGL->fGLFormat; + } + return false; + } + + std::string toString() const override { +#if defined(SK_DEBUG) || GR_TEST_UTILS + return GrGLFormatToStr(fGLFormat); +#else + return ""; +#endif + } + + GrBackendFormatData* copy() const override { return new GrGLBackendFormatData(fGLFormat); } + +#if defined(SK_DEBUG) + GrBackendApi type() const override { return GrBackendApi::kOpenGL; } +#endif + + GrGLenum fGLFormat; // the sized, internal format of the GL resource +}; + +static GrTextureType gl_target_to_gr_target(GrGLenum target) { + switch (target) { + case GR_GL_TEXTURE_NONE: + return GrTextureType::kNone; + case GR_GL_TEXTURE_2D: + return GrTextureType::k2D; + case GR_GL_TEXTURE_RECTANGLE: + return GrTextureType::kRectangle; + case GR_GL_TEXTURE_EXTERNAL: + return GrTextureType::kExternal; + default: + SkUNREACHABLE; + } +} + +static const GrGLBackendFormatData* get_and_cast_data(const GrBackendFormat& format) { + auto data = GrBackendSurfacePriv::GetBackendData(format); + SkASSERT(!data || data->type() == GrBackendApi::kOpenGL); + return static_cast(data); +} + +namespace GrBackendFormats { +GrBackendFormat MakeGL(GrGLenum format, GrGLenum target) { + auto newData = std::make_unique(format); + + return GrBackendSurfacePriv::MakeGrBackendFormat( + gl_target_to_gr_target(target), GrBackendApi::kOpenGL, std::move(newData)); +} + +GrGLFormat AsGLFormat(const GrBackendFormat& format) { + if (format.isValid() && format.backend() == GrBackendApi::kOpenGL) { + const GrGLBackendFormatData* data = get_and_cast_data(format); + SkASSERT(data); + return GrGLFormatFromGLEnum(data->asEnum()); + } + return GrGLFormat::kUnknown; +} + +GrGLenum AsGLFormatEnum(const GrBackendFormat& format) { + if (format.isValid() && format.backend() == GrBackendApi::kOpenGL) { + const GrGLBackendFormatData* data = get_and_cast_data(format); + SkASSERT(data); + return data->asEnum(); + } + return 0; +} +} // namespace GrBackendFormats + +GrGLBackendTextureData::GrGLBackendTextureData(const GrGLTextureInfo& info, + sk_sp params) + : fGLInfo(info, params) {} + +GrBackendTextureData* GrGLBackendTextureData::copy() const { + return new GrGLBackendTextureData(fGLInfo.info(), fGLInfo.refParameters()); +} + +bool GrGLBackendTextureData::isProtected() const { return fGLInfo.isProtected(); } + +bool GrGLBackendTextureData::equal(const GrBackendTextureData* that) const { + SkASSERT(!that || that->type() == GrBackendApi::kOpenGL); + if (auto otherGL = static_cast(that)) { + return fGLInfo.info() == otherGL->fGLInfo.info(); + } + return false; +} + +bool GrGLBackendTextureData::isSameTexture(const GrBackendTextureData* that) const { + SkASSERT(!that || that->type() == GrBackendApi::kOpenGL); + if (auto otherGL = static_cast(that)) { + return fGLInfo.info().fID == otherGL->fGLInfo.info().fID; + } + return false; +} + +GrBackendFormat GrGLBackendTextureData::getBackendFormat() const { + return GrBackendFormats::MakeGL(fGLInfo.info().fFormat, fGLInfo.info().fTarget); +} + +static GrGLBackendTextureData* get_and_cast_data(const GrBackendTexture& texture) { + auto data = GrBackendSurfacePriv::GetBackendData(texture); + SkASSERT(!data || data->type() == GrBackendApi::kOpenGL); + return static_cast(data); +} + +static GrGLBackendTextureData* get_and_cast_data(GrBackendTexture* texture) { + auto data = GrBackendSurfacePriv::GetBackendData(texture); + SkASSERT(!data || data->type() == GrBackendApi::kOpenGL); + return static_cast(data); +} + +namespace GrBackendTextures { +GrBackendTexture MakeGL(int width, + int height, + skgpu::Mipmapped mipped, + const GrGLTextureInfo& glInfo, + std::string_view label) { + auto newData = + std::make_unique(glInfo, sk_make_sp()); + auto tex = GrBackendSurfacePriv::MakeGrBackendTexture(width, + height, + label, + mipped, + GrBackendApi::kOpenGL, + gl_target_to_gr_target(glInfo.fTarget), + std::move(newData)); + // Make no assumptions about client's texture's parameters. + GLTextureParametersModified(&tex); + return tex; +} + +GrBackendTexture MakeGL(int width, + int height, + skgpu::Mipmapped mipped, + const GrGLTextureInfo& glInfo, + sk_sp params, + std::string_view label) { + auto newData = std::make_unique(glInfo, params); + return GrBackendSurfacePriv::MakeGrBackendTexture(width, + height, + label, + mipped, + GrBackendApi::kOpenGL, + gl_target_to_gr_target(glInfo.fTarget), + std::move(newData)); +} + +bool GetGLTextureInfo(const GrBackendTexture& tex, GrGLTextureInfo* outInfo) { + if (!tex.isValid() || tex.backend() != GrBackendApi::kOpenGL) { + return false; + } + const GrGLBackendTextureData* data = get_and_cast_data(tex); + SkASSERT(data); + *outInfo = data->info().info(); + return true; +} + +void GLTextureParametersModified(GrBackendTexture* tex) { + if (tex && tex->isValid() && tex->backend() == GrBackendApi::kOpenGL) { + GrGLBackendTextureData* data = get_and_cast_data(tex); + SkASSERT(data); + data->info().parameters()->invalidate(); + } +} +} // namespace GrBackendTextures + +class GrGLBackendRenderTargetData final : public GrBackendRenderTargetData { +public: + GrGLBackendRenderTargetData(GrGLFramebufferInfo info) : fGLInfo(info) {} + + GrGLFramebufferInfo info() const { return fGLInfo; } + +private: + bool isValid() const override { + // the glInfo must have a valid format + return SkToBool(fGLInfo.fFormat); + } + + GrBackendFormat getBackendFormat() const override { + return GrBackendFormats::MakeGL(fGLInfo.fFormat, GR_GL_TEXTURE_NONE); + } + + bool isProtected() const override { return fGLInfo.isProtected(); } + + bool equal(const GrBackendRenderTargetData* that) const override { + SkASSERT(!that || that->type() == GrBackendApi::kOpenGL); + if (auto otherGL = static_cast(that)) { + return fGLInfo == otherGL->fGLInfo; + } + return false; + } + + GrBackendRenderTargetData* copy() const override { + return new GrGLBackendRenderTargetData(fGLInfo); + } + +#if defined(SK_DEBUG) + GrBackendApi type() const override { return GrBackendApi::kOpenGL; } +#endif + + GrGLFramebufferInfo fGLInfo; +}; + +static const GrGLBackendRenderTargetData* get_and_cast_data(const GrBackendRenderTarget& rt) { + auto data = GrBackendSurfacePriv::GetBackendData(rt); + SkASSERT(!data || data->type() == GrBackendApi::kOpenGL); + return static_cast(data); +} + +namespace GrBackendRenderTargets { +// The GrGLTextureInfo must have a valid fFormat. If wrapping in an SkSurface we require the +// stencil bits to be either 0, 8 or 16. +SK_API GrBackendRenderTarget +MakeGL(int width, int height, int sampleCnt, int stencilBits, const GrGLFramebufferInfo& glInfo) { + auto newData = std::make_unique(glInfo); + return GrBackendSurfacePriv::MakeGrBackendRenderTarget(width, + height, + std::max(1, sampleCnt), + stencilBits, + GrBackendApi::kOpenGL, + /*framebufferOnly=*/false, + std::move(newData)); +} + +SK_API bool GetGLFramebufferInfo(const GrBackendRenderTarget& rt, GrGLFramebufferInfo* outInfo) { + if (!rt.isValid() || rt.backend() != GrBackendApi::kOpenGL) { + return false; + } + const GrGLBackendRenderTargetData* data = get_and_cast_data(rt); + SkASSERT(data); + *outInfo = data->info(); + return true; +} + +} // namespace GrBackendRenderTargets + +#if !defined(SK_DISABLE_LEGACY_GL_BACKEND_SURFACE) && defined(SK_GL) +GrBackendFormat GrBackendFormat::MakeGL(GrGLenum format, GrGLenum target) { + return GrBackendFormats::MakeGL(format, target); +} + +GrGLFormat GrBackendFormat::asGLFormat() const { + return GrBackendFormats::AsGLFormat(*this); +} + +GrGLenum GrBackendFormat::asGLFormatEnum() const { + return GrBackendFormats::AsGLFormatEnum(*this); +} + + +GrBackendTexture::GrBackendTexture(int width, + int height, + skgpu::Mipmapped mipped, + const GrGLTextureInfo& glInfo, + std::string_view label) : + GrBackendTexture(width, + height, + label, + mipped, + GrBackendApi::kOpenGL, + gl_target_to_gr_target(glInfo.fTarget), + std::make_unique(glInfo, + sk_make_sp())) +{ + // Make no assumptions about client's texture's parameters. + GrBackendTextures::GLTextureParametersModified(this); +} + +bool GrBackendTexture::getGLTextureInfo(GrGLTextureInfo* outInfo) const { + return GrBackendTextures::GetGLTextureInfo(*this, outInfo); +} + +void GrBackendTexture::glTextureParametersModified() { + GrBackendTextures::GLTextureParametersModified(this); +} + +GrBackendRenderTarget::GrBackendRenderTarget(int width, + int height, + int sampleCnt, + int stencilBits, + const GrGLFramebufferInfo& glInfo): + GrBackendRenderTarget(width, + height, + std::max(1, sampleCnt), + stencilBits, + GrBackendApi::kOpenGL, + /*framebufferOnly=*/false, + std::make_unique(glInfo)) {} + +bool GrBackendRenderTarget::getGLFramebufferInfo(GrGLFramebufferInfo* outInfo) const { + return GrBackendRenderTargets::GetGLFramebufferInfo(*this, outInfo); +} +#endif diff --git a/src/gpu/ganesh/gl/GrGLBackendSurfacePriv.h b/src/gpu/ganesh/gl/GrGLBackendSurfacePriv.h new file mode 100644 index 000000000000..8f0a4e79a4e2 --- /dev/null +++ b/src/gpu/ganesh/gl/GrGLBackendSurfacePriv.h @@ -0,0 +1,51 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef GrGLBackendSurfacePriv_DEFINED +#define GrGLBackendSurfacePriv_DEFINED + +#include "include/core/SkRefCnt.h" +#include "include/gpu/GrBackendSurface.h" +#include "include/gpu/GrTypes.h" +#include "include/private/gpu/ganesh/GrGLTypesPriv.h" +#include "src/gpu/ganesh/GrBackendSurfacePriv.h" + +#include + +struct GrGLTextureInfo; +namespace skgpu { enum class Mipmapped : bool; } + +namespace GrBackendTextures { +// The GrGLTextureInfo must have a valid fFormat. +GrBackendTexture MakeGL(int width, + int height, + skgpu::Mipmapped, + const GrGLTextureInfo& glInfo, + sk_sp params, + std::string_view label = {}); +} // namespace GrBackendTextures + +class GrGLBackendTextureData final : public GrBackendTextureData { +public: + GrGLBackendTextureData(const GrGLTextureInfo& info, sk_sp params); + + const GrGLBackendTextureInfo& info() const { return fGLInfo; } + +private: + GrBackendTextureData* copy() const override; + bool isProtected() const override; + bool equal(const GrBackendTextureData* that) const override; + bool isSameTexture(const GrBackendTextureData* that) const override; + GrBackendFormat getBackendFormat() const override; +#if defined(SK_DEBUG) + GrBackendApi type() const override { return GrBackendApi::kOpenGL; } +#endif + + GrGLBackendTextureInfo fGLInfo; +}; + +#endif diff --git a/src/gpu/ganesh/gl/GrGLBuffer.cpp b/src/gpu/ganesh/gl/GrGLBuffer.cpp index 2e47ab17a474..39080ea9b8dc 100644 --- a/src/gpu/ganesh/gl/GrGLBuffer.cpp +++ b/src/gpu/ganesh/gl/GrGLBuffer.cpp @@ -158,11 +158,11 @@ void GrGLBuffer::onAbandon() { INHERITED::onAbandon(); } -static inline GrGLenum SK_WARN_UNUSED_RESULT invalidate_buffer(GrGLGpu* gpu, - GrGLenum target, - GrGLenum usage, - GrGLuint bufferID, - size_t bufferSize) { +[[nodiscard]] static inline GrGLenum invalidate_buffer(GrGLGpu* gpu, + GrGLenum target, + GrGLenum usage, + GrGLuint bufferID, + size_t bufferSize) { switch (gpu->glCaps().invalidateBufferType()) { case GrGLCaps::InvalidateBufferType::kNone: return GR_GL_NO_ERROR; diff --git a/src/gpu/ganesh/gl/GrGLCaps.cpp b/src/gpu/ganesh/gl/GrGLCaps.cpp index 73557b476897..176b4a141278 100644 --- a/src/gpu/ganesh/gl/GrGLCaps.cpp +++ b/src/gpu/ganesh/gl/GrGLCaps.cpp @@ -12,6 +12,7 @@ #include "include/core/SkTextureCompressionType.h" #include "include/gpu/GrContextOptions.h" +#include "include/gpu/ganesh/gl/GrGLBackendSurface.h" #include "src/base/SkMathPriv.h" #include "src/base/SkTSearch.h" #include "src/core/SkCompressedDataUtils.h" @@ -3641,8 +3642,8 @@ bool GrGLCaps::onCanCopySurface(const GrSurfaceProxy* dst, const SkIRect& dstRec srcTexTypePtr = &srcTexType; } - auto dstFormat = dst->backendFormat().asGLFormat(); - auto srcFormat = src->backendFormat().asGLFormat(); + auto dstFormat = GrBackendFormats::AsGLFormat(dst->backendFormat()); + auto srcFormat = GrBackendFormats::AsGLFormat(src->backendFormat()); // Only copyAsBlit() and copyAsDraw() can handle scaling between src and dst. const bool scalingCopy = srcRect.size() != dstRect.size(); if (!scalingCopy && @@ -3688,7 +3689,7 @@ GrCaps::DstCopyRestrictions GrGLCaps::getDstCopyRestrictions(const GrRenderTarge blitFramebufferRestrictions.fRectsMustMatch = GrSurfaceProxy::RectsMustMatch::kYes; } - auto srcFormat = src->backendFormat().asGLFormat(); + auto srcFormat = GrBackendFormats::AsGLFormat(src->backendFormat()); // Check for format issues with glCopyTexSubImage2D if (srcFormat == GrGLFormat::kBGRA8) { // glCopyTexSubImage2D doesn't work with this config. If the bgra can be used with fbo blit @@ -4578,6 +4579,18 @@ void GrGLCaps::applyDriverCorrectnessWorkarounds(const GrGLContextInfo& ctxInfo, ctxInfo.driverVersion() >= GR_GL_DRIVER_VER(2, 1, 19900)) { fDisableScalingCopyAsDraws = true; } + // skbug.com/14194 + // Setting the max level is technically unnecessary, but on Intel drivers it makes it + // clear that a rendering feedback loop is not occurring, and avoids hitting a slow path. + // When running on ANGLE, however, this triggers the validator because we can only use + // levels between BASE_LEVEL and MAX_LEVEL for a framebuffer, and we're trying to use + // MAX_LEVEL+1. So instead we set up sync points between each mipmap level render. + if (ctxInfo.vendor() == GrGLVendor::kIntel && + ctxInfo.angleBackend() == GrGLANGLEBackend::kUnknown) { + fRegenerateMipmapType = RegenerateMipmapType::kBasePlusMaxLevel; + } else if (ctxInfo.angleVendor() == GrGLVendor::kIntel) { + fRegenerateMipmapType = RegenerateMipmapType::kBasePlusSync; + } } void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) { @@ -4700,7 +4713,7 @@ GrCaps::SupportedRead GrGLCaps::onSupportedReadPixelsColorType( // We first try to find a supported read pixels GrColorType that matches the requested // dstColorType. If that doesn't exists we will use any valid read pixels GrColorType. GrCaps::SupportedRead fallbackRead = {GrColorType::kUnknown, 0}; - const auto& formatInfo = this->getFormatInfo(srcBackendFormat.asGLFormat()); + const auto& formatInfo = this->getFormatInfo(GrBackendFormats::AsGLFormat(srcBackendFormat)); bool foundSrcCT = false; for (int i = 0; !foundSrcCT && i < formatInfo.fColorTypeInfoCount; ++i) { if (formatInfo.fColorTypeInfos[i].fColorType == srcColorType) { @@ -4738,7 +4751,7 @@ GrCaps::SupportedWrite GrGLCaps::supportedWritePixelsColorType(GrColorType surfa // We first try to find a supported write pixels GrColorType that matches the data's // srcColorType. If that doesn't exists we will use any supported GrColorType. GrColorType fallbackCT = GrColorType::kUnknown; - const auto& formatInfo = this->getFormatInfo(surfaceFormat.asGLFormat()); + const auto& formatInfo = this->getFormatInfo(GrBackendFormats::AsGLFormat(surfaceFormat)); bool foundSurfaceCT = false; size_t transferOffsetAlignment = 0; if (formatInfo.fFlags & FormatInfo::kTransfers_Flag) { @@ -4773,20 +4786,20 @@ bool GrGLCaps::programBinaryFormatIsValid(GrGLenum binaryFormat) const { bool GrGLCaps::onIsWindowRectanglesSupportedForRT(const GrBackendRenderTarget& backendRT) const { GrGLFramebufferInfo fbInfo; - SkAssertResult(backendRT.getGLFramebufferInfo(&fbInfo)); + SkAssertResult(GrBackendRenderTargets::GetGLFramebufferInfo(backendRT, &fbInfo)); // Window Rectangles are not supported for FBO 0; return fbInfo.fFBOID != 0; } bool GrGLCaps::isFormatSRGB(const GrBackendFormat& format) const { - return format.asGLFormat() == GrGLFormat::kSRGB8_ALPHA8; + return GrBackendFormats::AsGLFormat(format) == GrGLFormat::kSRGB8_ALPHA8; } bool GrGLCaps::isFormatTexturable(const GrBackendFormat& format, GrTextureType textureType) const { if (textureType == GrTextureType::kRectangle && !this->rectangleTextureSupport()) { return false; } - return this->isFormatTexturable(format.asGLFormat()); + return this->isFormatTexturable(GrBackendFormats::AsGLFormat(format)); } bool GrGLCaps::isFormatTexturable(GrGLFormat format) const { @@ -4802,7 +4815,7 @@ bool GrGLCaps::isFormatAsColorTypeRenderable(GrColorType ct, const GrBackendForm if (format.textureType() == GrTextureType::kExternal) { return false; } - auto f = format.asGLFormat(); + auto f = GrBackendFormats::AsGLFormat(format); const FormatInfo& info = this->getFormatInfo(f); if (!SkToBool(info.colorTypeFlags(ct) & ColorTypeInfo::kRenderable_Flag)) { return false; @@ -4818,7 +4831,7 @@ bool GrGLCaps::isFormatRenderable(const GrBackendFormat& format, int sampleCount if (format.textureType() == GrTextureType::kExternal) { return false; } - return this->isFormatRenderable(format.asGLFormat(), sampleCount); + return this->isFormatRenderable(GrBackendFormats::AsGLFormat(format), sampleCount); } int GrGLCaps::getRenderTargetSampleCount(int requestedCount, GrGLFormat format) const { @@ -4867,7 +4880,7 @@ bool GrGLCaps::isFormatCopyable(const GrBackendFormat& format) const { // requires the src to be an FBO attachment, blit requires both src and dst to be FBO // attachments, and draw requires the dst to be an FBO attachment. Thus to copy from and to // the same config, we need that config to be bindable to an FBO. - return this->canFormatBeFBOColorAttachment(format.asGLFormat()); + return this->canFormatBeFBOColorAttachment(GrBackendFormats::AsGLFormat(format)); } bool GrGLCaps::formatSupportsTexStorage(GrGLFormat format) const { @@ -4918,7 +4931,7 @@ void GrGLCaps::didQueryImplementationReadSupport(GrGLFormat format, bool GrGLCaps::onAreColorTypeAndFormatCompatible(GrColorType ct, const GrBackendFormat& format) const { - GrGLFormat glFormat = format.asGLFormat(); + GrGLFormat glFormat = GrBackendFormats::AsGLFormat(format); const auto& info = this->getFormatInfo(glFormat); for (int i = 0; i < info.fColorTypeInfoCount; ++i) { if (info.fColorTypeInfos[i].fColorType == ct) { @@ -4933,7 +4946,7 @@ GrBackendFormat GrGLCaps::onGetDefaultBackendFormat(GrColorType ct) const { if (format == GrGLFormat::kUnknown) { return {}; } - return GrBackendFormat::MakeGL(GrGLFormatToEnum(format), GR_GL_TEXTURE_2D); + return GrBackendFormats::MakeGL(GrGLFormatToEnum(format), GR_GL_TEXTURE_2D); } GrBackendFormat GrGLCaps::getBackendFormatFromCompressionType( @@ -4944,22 +4957,22 @@ GrBackendFormat GrGLCaps::getBackendFormatFromCompressionType( case SkTextureCompressionType::kETC2_RGB8_UNORM: // if ETC2 is available default to that format if (this->isFormatTexturable(GrGLFormat::kCOMPRESSED_RGB8_ETC2)) { - return GrBackendFormat::MakeGL(GR_GL_COMPRESSED_RGB8_ETC2, GR_GL_TEXTURE_2D); + return GrBackendFormats::MakeGL(GR_GL_COMPRESSED_RGB8_ETC2, GR_GL_TEXTURE_2D); } if (this->isFormatTexturable(GrGLFormat::kCOMPRESSED_ETC1_RGB8)) { - return GrBackendFormat::MakeGL(GR_GL_COMPRESSED_ETC1_RGB8, GR_GL_TEXTURE_2D); + return GrBackendFormats::MakeGL(GR_GL_COMPRESSED_ETC1_RGB8, GR_GL_TEXTURE_2D); } return {}; case SkTextureCompressionType::kBC1_RGB8_UNORM: if (this->isFormatTexturable(GrGLFormat::kCOMPRESSED_RGB8_BC1)) { - return GrBackendFormat::MakeGL(GR_GL_COMPRESSED_RGB_S3TC_DXT1_EXT, - GR_GL_TEXTURE_2D); + return GrBackendFormats::MakeGL(GR_GL_COMPRESSED_RGB_S3TC_DXT1_EXT, + GR_GL_TEXTURE_2D); } return {}; case SkTextureCompressionType::kBC1_RGBA8_UNORM: if (this->isFormatTexturable(GrGLFormat::kCOMPRESSED_RGBA8_BC1)) { - return GrBackendFormat::MakeGL(GR_GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, - GR_GL_TEXTURE_2D); + return GrBackendFormats::MakeGL(GR_GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, + GR_GL_TEXTURE_2D); } return {}; } @@ -4969,7 +4982,7 @@ GrBackendFormat GrGLCaps::getBackendFormatFromCompressionType( skgpu::Swizzle GrGLCaps::onGetReadSwizzle(const GrBackendFormat& format, GrColorType colorType) const { - GrGLFormat glFormat = format.asGLFormat(); + GrGLFormat glFormat = GrBackendFormats::AsGLFormat(format); const auto& info = this->getFormatInfo(glFormat); for (int i = 0; i < info.fColorTypeInfoCount; ++i) { const auto& ctInfo = info.fColorTypeInfos[i]; @@ -4984,7 +4997,7 @@ skgpu::Swizzle GrGLCaps::onGetReadSwizzle(const GrBackendFormat& format, skgpu::Swizzle GrGLCaps::getWriteSwizzle(const GrBackendFormat& format, GrColorType colorType) const { - const auto& info = this->getFormatInfo(format.asGLFormat()); + const auto& info = this->getFormatInfo(GrBackendFormats::AsGLFormat(format)); for (int i = 0; i < info.fColorTypeInfoCount; ++i) { const auto& ctInfo = info.fColorTypeInfos[i]; if (ctInfo.fColorType == colorType) { @@ -4992,7 +5005,8 @@ skgpu::Swizzle GrGLCaps::getWriteSwizzle(const GrBackendFormat& format, } } SkDEBUGFAILF("Illegal color type (%d) and format (%d) combination.", - (int)colorType, (int)format.asGLFormat()); + (int)colorType, + (int)GrBackendFormats::AsGLFormat(format)); return {}; } @@ -5008,7 +5022,7 @@ bool GrGLCaps::onSupportsDynamicMSAA(const GrRenderTargetProxy* rtProxy) const { } uint64_t GrGLCaps::computeFormatKey(const GrBackendFormat& format) const { - auto glFormat = format.asGLFormat(); + auto glFormat = GrBackendFormats::AsGLFormat(format); return (uint64_t)(glFormat); } @@ -5025,75 +5039,75 @@ GrProgramDesc GrGLCaps::makeDesc(GrRenderTarget* /* rt */, std::vector GrGLCaps::getTestingCombinations() const { std::vector combos = { { GrColorType::kAlpha_8, - GrBackendFormat::MakeGL(GR_GL_ALPHA8, GR_GL_TEXTURE_2D) }, + GrBackendFormats::MakeGL(GR_GL_ALPHA8, GR_GL_TEXTURE_2D) }, { GrColorType::kAlpha_8, - GrBackendFormat::MakeGL(GR_GL_R8, GR_GL_TEXTURE_2D) }, + GrBackendFormats::MakeGL(GR_GL_R8, GR_GL_TEXTURE_2D) }, { GrColorType::kBGR_565, - GrBackendFormat::MakeGL(GR_GL_RGB565, GR_GL_TEXTURE_2D) }, + GrBackendFormats::MakeGL(GR_GL_RGB565, GR_GL_TEXTURE_2D) }, { GrColorType::kABGR_4444, - GrBackendFormat::MakeGL(GR_GL_RGBA4, GR_GL_TEXTURE_2D) }, + GrBackendFormats::MakeGL(GR_GL_RGBA4, GR_GL_TEXTURE_2D) }, { GrColorType::kRGBA_8888, - GrBackendFormat::MakeGL(GR_GL_RGBA8, GR_GL_TEXTURE_2D) }, + GrBackendFormats::MakeGL(GR_GL_RGBA8, GR_GL_TEXTURE_2D) }, { GrColorType::kRGBA_8888_SRGB, - GrBackendFormat::MakeGL(GR_GL_SRGB8_ALPHA8, GR_GL_TEXTURE_2D) }, + GrBackendFormats::MakeGL(GR_GL_SRGB8_ALPHA8, GR_GL_TEXTURE_2D) }, { GrColorType::kRGB_888x, - GrBackendFormat::MakeGL(GR_GL_RGBA8, GR_GL_TEXTURE_2D) }, + GrBackendFormats::MakeGL(GR_GL_RGBA8, GR_GL_TEXTURE_2D) }, { GrColorType::kRGB_888x, - GrBackendFormat::MakeGL(GR_GL_RGB8, GR_GL_TEXTURE_2D) }, + GrBackendFormats::MakeGL(GR_GL_RGB8, GR_GL_TEXTURE_2D) }, { GrColorType::kRGB_888x, - GrBackendFormat::MakeGL(GR_GL_COMPRESSED_RGB8_ETC2, GR_GL_TEXTURE_2D) }, + GrBackendFormats::MakeGL(GR_GL_COMPRESSED_RGB8_ETC2, GR_GL_TEXTURE_2D) }, { GrColorType::kRGB_888x, - GrBackendFormat::MakeGL(GR_GL_COMPRESSED_ETC1_RGB8, GR_GL_TEXTURE_2D) }, + GrBackendFormats::MakeGL(GR_GL_COMPRESSED_ETC1_RGB8, GR_GL_TEXTURE_2D) }, { GrColorType::kRGB_888x, - GrBackendFormat::MakeGL(GR_GL_COMPRESSED_RGB_S3TC_DXT1_EXT, GR_GL_TEXTURE_2D) }, + GrBackendFormats::MakeGL(GR_GL_COMPRESSED_RGB_S3TC_DXT1_EXT, GR_GL_TEXTURE_2D) }, { GrColorType::kRGBA_8888, - GrBackendFormat::MakeGL(GR_GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, GR_GL_TEXTURE_2D) }, + GrBackendFormats::MakeGL(GR_GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, GR_GL_TEXTURE_2D) }, { GrColorType::kRG_88, - GrBackendFormat::MakeGL(GR_GL_RG8, GR_GL_TEXTURE_2D) }, + GrBackendFormats::MakeGL(GR_GL_RG8, GR_GL_TEXTURE_2D) }, { GrColorType::kRGBA_1010102, - GrBackendFormat::MakeGL(GR_GL_RGB10_A2, GR_GL_TEXTURE_2D) }, + GrBackendFormats::MakeGL(GR_GL_RGB10_A2, GR_GL_TEXTURE_2D) }, { GrColorType::kGray_8, - GrBackendFormat::MakeGL(GR_GL_LUMINANCE8, GR_GL_TEXTURE_2D) }, + GrBackendFormats::MakeGL(GR_GL_LUMINANCE8, GR_GL_TEXTURE_2D) }, { GrColorType::kGray_8, - GrBackendFormat::MakeGL(GR_GL_R8, GR_GL_TEXTURE_2D) }, + GrBackendFormats::MakeGL(GR_GL_R8, GR_GL_TEXTURE_2D) }, { GrColorType::kGrayAlpha_88, - GrBackendFormat::MakeGL(GR_GL_LUMINANCE8_ALPHA8, GR_GL_TEXTURE_2D) }, + GrBackendFormats::MakeGL(GR_GL_LUMINANCE8_ALPHA8, GR_GL_TEXTURE_2D) }, { GrColorType::kAlpha_F16, - GrBackendFormat::MakeGL(GR_GL_R16F, GR_GL_TEXTURE_2D) }, + GrBackendFormats::MakeGL(GR_GL_R16F, GR_GL_TEXTURE_2D) }, { GrColorType::kAlpha_F16, - GrBackendFormat::MakeGL(GR_GL_LUMINANCE16F, GR_GL_TEXTURE_2D) }, + GrBackendFormats::MakeGL(GR_GL_LUMINANCE16F, GR_GL_TEXTURE_2D) }, { GrColorType::kRGBA_F16, - GrBackendFormat::MakeGL(GR_GL_RGBA16F, GR_GL_TEXTURE_2D) }, + GrBackendFormats::MakeGL(GR_GL_RGBA16F, GR_GL_TEXTURE_2D) }, { GrColorType::kRGBA_F16_Clamped, - GrBackendFormat::MakeGL(GR_GL_RGBA16F, GR_GL_TEXTURE_2D) }, + GrBackendFormats::MakeGL(GR_GL_RGBA16F, GR_GL_TEXTURE_2D) }, { GrColorType::kAlpha_16, - GrBackendFormat::MakeGL(GR_GL_R16, GR_GL_TEXTURE_2D) }, + GrBackendFormats::MakeGL(GR_GL_R16, GR_GL_TEXTURE_2D) }, { GrColorType::kRG_1616, - GrBackendFormat::MakeGL(GR_GL_RG16, GR_GL_TEXTURE_2D) }, + GrBackendFormats::MakeGL(GR_GL_RG16, GR_GL_TEXTURE_2D) }, { GrColorType::kRGBA_16161616, - GrBackendFormat::MakeGL(GR_GL_RGBA16, GR_GL_TEXTURE_2D) }, + GrBackendFormats::MakeGL(GR_GL_RGBA16, GR_GL_TEXTURE_2D) }, { GrColorType::kRG_F16, - GrBackendFormat::MakeGL(GR_GL_RG16F, GR_GL_TEXTURE_2D) }, + GrBackendFormats::MakeGL(GR_GL_RG16F, GR_GL_TEXTURE_2D) }, }; if (GR_IS_GR_GL(fStandard)) { combos.push_back({ GrColorType::kBGRA_8888, - GrBackendFormat::MakeGL(GR_GL_RGBA8, GR_GL_TEXTURE_2D) }); + GrBackendFormats::MakeGL(GR_GL_RGBA8, GR_GL_TEXTURE_2D) }); combos.push_back({ GrColorType::kBGRA_1010102, - GrBackendFormat::MakeGL(GR_GL_RGB10_A2, GR_GL_TEXTURE_2D) }); + GrBackendFormats::MakeGL(GR_GL_RGB10_A2, GR_GL_TEXTURE_2D) }); } else { SkASSERT(GR_IS_GR_GL_ES(fStandard) || GR_IS_GR_WEBGL(fStandard)); combos.push_back({ GrColorType::kBGRA_8888, - GrBackendFormat::MakeGL(GR_GL_BGRA8, GR_GL_TEXTURE_2D) }); + GrBackendFormats::MakeGL(GR_GL_BGRA8, GR_GL_TEXTURE_2D) }); } if (this->rectangleTextureSupport()) { size_t count2D = combos.size(); for (size_t i = 0; i < count2D; ++i) { auto combo2D = combos[i]; - GrGLenum formatEnum = GrGLFormatToEnum(combo2D.fFormat.asGLFormat()); + GrGLenum formatEnum = GrBackendFormats::AsGLFormatEnum(combo2D.fFormat); combos.push_back({combo2D.fColorType, - GrBackendFormat::MakeGL(formatEnum, GR_GL_TEXTURE_RECTANGLE)}); + GrBackendFormats::MakeGL(formatEnum, GR_GL_TEXTURE_RECTANGLE)}); } } return combos; diff --git a/src/gpu/ganesh/gl/GrGLCaps.h b/src/gpu/ganesh/gl/GrGLCaps.h index b418881f93d2..d19206680b33 100644 --- a/src/gpu/ganesh/gl/GrGLCaps.h +++ b/src/gpu/ganesh/gl/GrGLCaps.h @@ -9,7 +9,7 @@ #ifndef GrGLCaps_DEFINED #define GrGLCaps_DEFINED -#include +#include "include/gpu/ganesh/gl/GrGLBackendSurface.h" #include "include/private/base/SkTArray.h" #include "include/private/gpu/ganesh/GrGLTypesPriv.h" #include "src/core/SkChecksum.h" @@ -19,6 +19,8 @@ #include "src/gpu/ganesh/gl/GrGLAttachment.h" #include "src/gpu/ganesh/gl/GrGLUtil.h" +#include + class GrGLContextInfo; class GrGLRenderTarget; enum class SkTextureCompressionType; @@ -112,6 +114,12 @@ class GrGLCaps : public GrCaps { // WEBGL_draw_instanced_base_vertex_base_instance }; + enum class RegenerateMipmapType { + kBaseLevel, + kBasePlusMaxLevel, + kBasePlusSync + }; + /** * Initializes the GrGLCaps to the set of features supported in the current * OpenGL context accessible via ctxInfo. @@ -133,12 +141,13 @@ class GrGLCaps : public GrCaps { int getRenderTargetSampleCount(int requestedCount, const GrBackendFormat& format) const override { - return this->getRenderTargetSampleCount(requestedCount, format.asGLFormat()); + return this->getRenderTargetSampleCount(requestedCount, + GrBackendFormats::AsGLFormat(format)); } int getRenderTargetSampleCount(int requestedCount, GrGLFormat) const; int maxRenderTargetSampleCount(const GrBackendFormat& format) const override { - return this->maxRenderTargetSampleCount(format.asGLFormat()); + return this->maxRenderTargetSampleCount(GrBackendFormats::AsGLFormat(format)); } int maxRenderTargetSampleCount(GrGLFormat) const; @@ -309,6 +318,9 @@ class GrGLCaps : public GrCaps { /// How are multi draws implemented (if at all)? MultiDrawType multiDrawType() const { return fMultiDrawType; } + /// How is restricting sampled miplevels in onRegenerateMipmapLevels implemented? + RegenerateMipmapType regenerateMipmapType() const { return fRegenerateMipmapType; } + /// The maximum number of fragment uniform vectors (GLES has min. 16). int maxFragmentUniformVectors() const { return fMaxFragmentUniformVectors; } @@ -573,6 +585,7 @@ class GrGLCaps : public GrCaps { TransferBufferType fTransferBufferType = TransferBufferType::kNone; FenceType fFenceType = FenceType::kNone; MultiDrawType fMultiDrawType = MultiDrawType::kNone; + RegenerateMipmapType fRegenerateMipmapType = RegenerateMipmapType::kBaseLevel; bool fPackFlipYSupport : 1; bool fTextureUsageSupport : 1; diff --git a/src/gpu/ganesh/gl/GrGLGpu.cpp b/src/gpu/ganesh/gl/GrGLGpu.cpp index 6a75223c630f..a891e0dfc5bc 100644 --- a/src/gpu/ganesh/gl/GrGLGpu.cpp +++ b/src/gpu/ganesh/gl/GrGLGpu.cpp @@ -25,6 +25,7 @@ #include "src/core/SkMipmap.h" #include "src/core/SkTraceEvent.h" #include "src/gpu/SkRenderEngineAbortf.h" +#include "src/gpu/ganesh/GrBackendSurfacePriv.h" #include "src/gpu/ganesh/GrBackendUtils.h" #include "src/gpu/ganesh/GrCpuBuffer.h" #include "src/gpu/ganesh/GrDataUtils.h" @@ -39,6 +40,7 @@ #include "src/gpu/ganesh/GrTexture.h" #include "src/gpu/ganesh/GrUtil.h" #include "src/gpu/ganesh/gl/GrGLAttachment.h" +#include "src/gpu/ganesh/gl/GrGLBackendSurfacePriv.h" #include "src/gpu/ganesh/gl/GrGLBuffer.h" #include "src/gpu/ganesh/gl/GrGLOpsRenderPass.h" #include "src/gpu/ganesh/gl/GrGLSemaphore.h" @@ -683,7 +685,7 @@ static bool check_backend_texture(const GrBackendTexture& backendTex, GrGLTexture::Desc* desc, bool skipRectTexSupportCheck = false) { GrGLTextureInfo info; - if (!backendTex.getGLTextureInfo(&info) || !info.fID || !info.fFormat) { + if (!GrBackendTextures::GetGLTextureInfo(backendTex, &info) || !info.fID || !info.fFormat) { return false; } @@ -714,6 +716,13 @@ static bool check_backend_texture(const GrBackendTexture& backendTex, return true; } +static sk_sp get_gl_texture_params(const GrBackendTexture& backendTex) { + GrBackendTextureData* btd = GrBackendSurfacePriv::GetBackendData(backendTex); + auto glTextureData = static_cast(btd); + SkASSERT(glTextureData); + return glTextureData->info().refParameters(); +} + sk_sp GrGLGpu::onWrapBackendTexture(const GrBackendTexture& backendTex, GrWrapOwnership ownership, GrWrapCacheable cacheable, @@ -732,8 +741,10 @@ sk_sp GrGLGpu::onWrapBackendTexture(const GrBackendTexture& backendTe GrMipmapStatus mipmapStatus = backendTex.hasMipmaps() ? GrMipmapStatus::kValid : GrMipmapStatus::kNotAllocated; - auto texture = GrGLTexture::MakeWrapped(this, mipmapStatus, desc, - backendTex.getGLTextureParams(), + auto texture = GrGLTexture::MakeWrapped(this, + mipmapStatus, + desc, + get_gl_texture_params(backendTex), cacheable, ioType, backendTex.getLabel()); @@ -741,14 +752,14 @@ sk_sp GrGLGpu::onWrapBackendTexture(const GrBackendTexture& backendTe // Pessimistically assume this external texture may have been bound to a FBO. texture->baseLevelWasBoundToFBO(); } - return std::move(texture); + return texture; } static bool check_compressed_backend_texture(const GrBackendTexture& backendTex, const GrGLCaps& caps, GrGLTexture::Desc* desc, bool skipRectTexSupportCheck = false) { GrGLTextureInfo info; - if (!backendTex.getGLTextureInfo(&info) || !info.fID || !info.fFormat) { + if (!GrBackendTextures::GetGLTextureInfo(backendTex, &info) || !info.fID || !info.fFormat) { return false; } @@ -789,10 +800,13 @@ sk_sp GrGLGpu::onWrapCompressedBackendTexture(const GrBackendTexture& GrMipmapStatus mipmapStatus = backendTex.hasMipmaps() ? GrMipmapStatus::kValid : GrMipmapStatus::kNotAllocated; - auto texture = GrGLTexture::MakeWrapped(this, mipmapStatus, desc, - backendTex.getGLTextureParams(), cacheable, - kRead_GrIOType, backendTex.getLabel()); - return std::move(texture); + return GrGLTexture::MakeWrapped(this, + mipmapStatus, + desc, + get_gl_texture_params(backendTex), + cacheable, + kRead_GrIOType, + backendTex.getLabel()); } sk_sp GrGLGpu::onWrapRenderableBackendTexture(const GrBackendTexture& backendTex, @@ -831,16 +845,22 @@ sk_sp GrGLGpu::onWrapRenderableBackendTexture(const GrBackendTexture& GrMipmapStatus mipmapStatus = backendTex.hasMipmaps() ? GrMipmapStatus::kDirty : GrMipmapStatus::kNotAllocated; - sk_sp texRT(GrGLTextureRenderTarget::MakeWrapped( - this, sampleCnt, desc, backendTex.getGLTextureParams(), rtIDs, cacheable, - mipmapStatus, backendTex.getLabel())); + sk_sp texRT( + GrGLTextureRenderTarget::MakeWrapped(this, + sampleCnt, + desc, + get_gl_texture_params(backendTex), + rtIDs, + cacheable, + mipmapStatus, + backendTex.getLabel())); texRT->baseLevelWasBoundToFBO(); - return std::move(texRT); + return texRT; } sk_sp GrGLGpu::onWrapBackendRenderTarget(const GrBackendRenderTarget& backendRT) { GrGLFramebufferInfo info; - if (!backendRT.getGLFramebufferInfo(&info)) { + if (!GrBackendRenderTargets::GetGLFramebufferInfo(backendRT, &info)) { return nullptr; } @@ -848,7 +868,7 @@ sk_sp GrGLGpu::onWrapBackendRenderTarget(const GrBackendRenderTa return nullptr; } - const auto format = backendRT.getBackendFormat().asGLFormat(); + const auto format = GrBackendFormats::AsGLFormat(backendRT.getBackendFormat()); if (!this->glCaps().isFormatRenderable(format, backendRT.sampleCnt())) { return nullptr; } @@ -1490,7 +1510,7 @@ sk_sp GrGLGpu::onCreateTexture(SkISize dimensions, texDesc.fTarget = GR_GL_TEXTURE_RECTANGLE; break; } - texDesc.fFormat = format.asGLFormat(); + texDesc.fFormat = GrBackendFormats::AsGLFormat(format); texDesc.fOwnership = GrBackendObjectOwnership::kOwned; SkASSERT(texDesc.fFormat != GrGLFormat::kUnknown); SkASSERT(!GrGLFormatIsCompressed(texDesc.fFormat)); @@ -1538,7 +1558,8 @@ sk_sp GrGLGpu::onCreateTexture(SkISize dimensions, nullptr)); } } - } else if (this->glCaps().canFormatBeFBOColorAttachment(format.asGLFormat()) && + } else if (this->glCaps().canFormatBeFBOColorAttachment( + GrBackendFormats::AsGLFormat(format)) && !this->glCaps().performColorClearsAsDraws()) { this->flushScissorTest(GrScissorTest::kDisabled); this->disableWindowRectangles(); @@ -1563,7 +1584,7 @@ sk_sp GrGLGpu::onCreateTexture(SkISize dimensions, levelClearMask); } } - return std::move(tex); + return tex; } sk_sp GrGLGpu::onCreateCompressedTexture(SkISize dimensions, @@ -1583,7 +1604,7 @@ sk_sp GrGLGpu::onCreateCompressedTexture(SkISize dimensions, desc.fSize = dimensions; desc.fTarget = GR_GL_TEXTURE_2D; desc.fOwnership = GrBackendObjectOwnership::kOwned; - desc.fFormat = format.asGLFormat(); + desc.fFormat = GrBackendFormats::AsGLFormat(format); desc.fIsProtected = isProtected; desc.fID = this->createCompressedTexture2D(desc.fSize, compression, desc.fFormat, mipmapped, desc.fIsProtected, &initialState); @@ -1611,7 +1632,7 @@ sk_sp GrGLGpu::onCreateCompressedTexture(SkISize dimensions, // The non-sampler params are still at their default values. tex->parameters()->set(&initialState, GrGLTextureParameters::NonsamplerState(), fResetTimestampForTextureParameters); - return std::move(tex); + return tex; } GrBackendTexture GrGLGpu::onCreateCompressedBackendTexture( @@ -1623,7 +1644,7 @@ GrBackendTexture GrGLGpu::onCreateCompressedBackendTexture( this->handleDirtyContext(); - GrGLFormat glFormat = format.asGLFormat(); + GrGLFormat glFormat = GrBackendFormats::AsGLFormat(format); if (glFormat == GrGLFormat::kUnknown) { return {}; } @@ -1650,8 +1671,8 @@ GrBackendTexture GrGLGpu::onCreateCompressedBackendTexture( parameters->set(&initialState, GrGLTextureParameters::NonsamplerState(), fResetTimestampForTextureParameters); - return GrBackendTexture(dimensions.width(), dimensions.height(), mipmapped, info, - std::move(parameters)); + return GrBackendTextures::MakeGL( + dimensions.width(), dimensions.height(), mipmapped, info, std::move(parameters)); } bool GrGLGpu::onUpdateCompressedBackendTexture(const GrBackendTexture& backendTexture, @@ -1659,10 +1680,10 @@ bool GrGLGpu::onUpdateCompressedBackendTexture(const GrBackendTexture& backendTe const void* data, size_t length) { GrGLTextureInfo info; - SkAssertResult(backendTexture.getGLTextureInfo(&info)); + SkAssertResult(GrBackendTextures::GetGLTextureInfo(backendTexture, &info)); GrBackendFormat format = backendTexture.getBackendFormat(); - GrGLFormat glFormat = format.asGLFormat(); + GrGLFormat glFormat = GrBackendFormats::AsGLFormat(format); if (glFormat == GrGLFormat::kUnknown) { return false; } @@ -1675,7 +1696,7 @@ bool GrGLGpu::onUpdateCompressedBackendTexture(const GrBackendTexture& backendTe // If we have mips make sure the base level is set to 0 and the max level set to numMipLevels-1 // so that the uploads go to the right levels. if (backendTexture.hasMipMaps() && this->glCaps().mipmapLevelControlSupport()) { - auto params = backendTexture.getGLTextureParams(); + auto params = get_gl_texture_params(backendTexture); GrGLTextureParameters::NonsamplerState nonsamplerState = params->nonsamplerState(); if (params->nonsamplerState().fBaseMipMapLevel != 0) { GL_CALL(TexParameteri(info.fTarget, GR_GL_TEXTURE_BASE_LEVEL, 0)); @@ -1907,7 +1928,7 @@ GrGLuint GrGLGpu::createTexture(SkISize dimensions, sk_sp GrGLGpu::makeStencilAttachment(const GrBackendFormat& colorFormat, SkISize dimensions, int numStencilSamples) { - int sIdx = this->getCompatibleStencilIndex(colorFormat.asGLFormat()); + int sIdx = this->getCompatibleStencilIndex(GrBackendFormats::AsGLFormat(colorFormat)); if (sIdx < 0) { return nullptr; } @@ -1917,14 +1938,15 @@ sk_sp GrGLGpu::makeStencilAttachment(const GrBackendFormat& colorF if (stencil) { fStats.incStencilAttachmentCreates(); } - return std::move(stencil); + return stencil; } sk_sp GrGLGpu::makeMSAAAttachment(SkISize dimensions, const GrBackendFormat& format, int numSamples, GrProtected isProtected, GrMemoryless isMemoryless) { SkASSERT(isMemoryless == GrMemoryless::kNo); - return GrGLAttachment::MakeMSAA(this, dimensions, numSamples, format.asGLFormat()); + return GrGLAttachment::MakeMSAA( + this, dimensions, numSamples, GrBackendFormats::AsGLFormat(format)); } //////////////////////////////////////////////////////////////////////////////// @@ -2288,18 +2310,15 @@ bool GrGLGpu::readOrTransferPixelsFrom(GrSurface* surface, int rowWidthInPixels) { SkASSERT(surface); - auto format = surface->backendFormat().asGLFormat(); + auto format = GrBackendFormats::AsGLFormat(surface->backendFormat()); GrGLRenderTarget* renderTarget = static_cast(surface->asRenderTarget()); if (!renderTarget && !this->glCaps().isFormatRenderable(format, 1)) { return false; } GrGLenum externalFormat = 0; GrGLenum externalType = 0; - this->glCaps().getReadPixelsFormat(surface->backendFormat().asGLFormat(), - surfaceColorType, - dstColorType, - &externalFormat, - &externalType); + this->glCaps().getReadPixelsFormat( + format, surfaceColorType, dstColorType, &externalFormat, &externalType); if (!externalFormat || !externalType) { return false; } @@ -3016,8 +3035,8 @@ static inline bool can_blit_framebuffer_for_copy_surface(const GrSurface* dst, SkASSERT((dstSampleCnt > 0) == SkToBool(dst->asRenderTarget())); SkASSERT((srcSampleCnt > 0) == SkToBool(src->asRenderTarget())); - GrGLFormat dstFormat = dst->backendFormat().asGLFormat(); - GrGLFormat srcFormat = src->backendFormat().asGLFormat(); + GrGLFormat dstFormat = GrBackendFormats::AsGLFormat(dst->backendFormat()); + GrGLFormat srcFormat = GrBackendFormats::AsGLFormat(src->backendFormat()); const GrGLTexture* dstTex = static_cast(dst->asTexture()); const GrGLTexture* srcTex = static_cast(src->asTexture()); @@ -3059,8 +3078,8 @@ static inline bool can_copy_texsubimage(const GrSurface* dst, const GrSurface* s bool dstHasMSAARenderBuffer = dstRT ? rt_has_msaa_render_buffer(dstRT, caps) : false; bool srcHasMSAARenderBuffer = srcRT ? rt_has_msaa_render_buffer(srcRT, caps) : false; - GrGLFormat dstFormat = dst->backendFormat().asGLFormat(); - GrGLFormat srcFormat = src->backendFormat().asGLFormat(); + GrGLFormat dstFormat = GrBackendFormats::AsGLFormat(dst->backendFormat()); + GrGLFormat srcFormat = GrBackendFormats::AsGLFormat(src->backendFormat()); GrTextureType dstTexType; GrTextureType* dstTexTypePtr = nullptr; @@ -3172,7 +3191,7 @@ bool GrGLGpu::onCopySurface(GrSurface* dst, const SkIRect& dstRect, // This implicitly handles this->glCaps().useDrawInsteadOfAllRenderTargetWrites(). bool preferCopy = SkToBool(dst->asRenderTarget()); bool scalingCopy = dstRect.size() != srcRect.size(); - auto dstFormat = dst->backendFormat().asGLFormat(); + auto dstFormat = GrBackendFormats::AsGLFormat(dst->backendFormat()); if (preferCopy && this->glCaps().canCopyAsDraw(dstFormat, SkToBool(src->asTexture()), scalingCopy)) { GrRenderTarget* dstRT = dst->asRenderTarget(); @@ -3658,6 +3677,8 @@ bool GrGLGpu::copySurfaceAsBlitFramebuffer(GrSurface* dst, GrSurface* src, const } bool GrGLGpu::onRegenerateMipMapLevels(GrTexture* texture) { + using RegenerateMipmapType = GrGLCaps::RegenerateMipmapType; + auto glTex = static_cast(texture); // Mipmaps are only supported on 2D textures: if (GR_GL_TEXTURE_2D != glTex->target()) { @@ -3732,6 +3753,7 @@ bool GrGLGpu::onRegenerateMipMapLevels(GrTexture* texture) { width = texture->width(); height = texture->height(); + std::unique_ptr semaphore; for (GrGLint level = 1; level < levelCount; ++level) { // Get and bind the program for this particular downsample (filter shape can vary): int progIdx = TextureSizeToMipmapProgramIdx(width, height); @@ -3745,6 +3767,12 @@ bool GrGLGpu::onRegenerateMipMapLevels(GrTexture* texture) { } this->flushProgram(fMipmapPrograms[progIdx].fProgram); + if (this->glCaps().regenerateMipmapType() == RegenerateMipmapType::kBasePlusSync && + level > 1) { + this->waitSemaphore(semaphore.get()); + semaphore.reset(); + } + // Texcoord uniform is expected to contain (1/w, (w-1)/w, 1/h, (h-1)/h) const float invWidth = 1.0f / width; const float invHeight = 1.0f / height; @@ -3752,14 +3780,16 @@ bool GrGLGpu::onRegenerateMipMapLevels(GrTexture* texture) { invWidth, (width - 1) * invWidth, invHeight, (height - 1) * invHeight)); GL_CALL(Uniform1i(fMipmapPrograms[progIdx].fTextureUniform, 0)); - // Set the base level and max level so that we only sample from the - // previous mip. Setting the max level is technically unnecessary, but - // we do it as a performance optimization. By making it clear that a - // rendering feedback loop is not occurring, we avoid hitting a slow - // path on some drivers. + // Set the base level so that we only sample from the previous mip. SkASSERT(this->glCaps().mipmapLevelControlSupport()); GL_CALL(TexParameteri(GR_GL_TEXTURE_2D, GR_GL_TEXTURE_BASE_LEVEL, level - 1)); - GL_CALL(TexParameteri(GR_GL_TEXTURE_2D, GR_GL_TEXTURE_MAX_LEVEL, level - 1)); + // Setting the max level is technically unnecessary and can affect + // validation for the framebuffer. However, by making it clear that a + // rendering feedback loop is not occurring, we avoid hitting a slow + // path on some drivers. + if (this->glCaps().regenerateMipmapType() == RegenerateMipmapType::kBasePlusMaxLevel) { + GL_CALL(TexParameteri(GR_GL_TEXTURE_2D, GR_GL_TEXTURE_MAX_LEVEL, level - 1)); + } GL_CALL(FramebufferTexture2D(GR_GL_FRAMEBUFFER, GR_GL_COLOR_ATTACHMENT0, GR_GL_TEXTURE_2D, glTex->textureID(), level)); @@ -3769,6 +3799,12 @@ bool GrGLGpu::onRegenerateMipMapLevels(GrTexture* texture) { this->flushViewport(SkIRect::MakeWH(width, height), height, kTopLeft_GrSurfaceOrigin); GL_CALL(DrawArrays(GR_GL_TRIANGLE_STRIP, 0, 4)); + + if (this->glCaps().regenerateMipmapType() == RegenerateMipmapType::kBasePlusSync && + level < levelCount-1) { + semaphore = this->makeSemaphore(true); + this->insertSemaphore(semaphore.get()); + } } // Unbind: @@ -3779,7 +3815,9 @@ bool GrGLGpu::onRegenerateMipMapLevels(GrTexture* texture) { GrGLTextureParameters::NonsamplerState nonsamplerState = glTex->parameters()->nonsamplerState(); // We drew the 2nd to last level into the last level. nonsamplerState.fBaseMipMapLevel = levelCount - 2; - nonsamplerState.fMaxMipmapLevel = levelCount - 2; + if (this->glCaps().regenerateMipmapType() == RegenerateMipmapType::kBasePlusMaxLevel) { + nonsamplerState.fMaxMipmapLevel = levelCount - 2; + } glTex->parameters()->set(nullptr, nonsamplerState, fResetTimestampForTextureParameters); return true; @@ -3819,7 +3857,7 @@ GrBackendTexture GrGLGpu::onCreateBackendTexture(SkISize dimensions, std::string_view label) { this->handleDirtyContext(); - GrGLFormat glFormat = format.asGLFormat(); + GrGLFormat glFormat = GrBackendFormats::AsGLFormat(format); if (glFormat == GrGLFormat::kUnknown) { return {}; } @@ -3868,8 +3906,8 @@ GrBackendTexture GrGLGpu::onCreateBackendTexture(SkISize dimensions, parameters->set(&initialState, GrGLTextureParameters::NonsamplerState(), fResetTimestampForTextureParameters); - return GrBackendTexture(dimensions.width(), dimensions.height(), mipmapped, info, - std::move(parameters), label); + return GrBackendTextures::MakeGL( + dimensions.width(), dimensions.height(), mipmapped, info, std::move(parameters), label); } bool GrGLGpu::onClearBackendTexture(const GrBackendTexture& backendTexture, @@ -3878,7 +3916,7 @@ bool GrGLGpu::onClearBackendTexture(const GrBackendTexture& backendTexture, this->handleDirtyContext(); GrGLTextureInfo info; - SkAssertResult(backendTexture.getGLTextureInfo(&info)); + SkAssertResult(GrBackendTextures::GetGLTextureInfo(backendTexture, &info)); int numMipLevels = 1; if (backendTexture.hasMipmaps()) { @@ -3893,7 +3931,7 @@ bool GrGLGpu::onClearBackendTexture(const GrBackendTexture& backendTexture, // If we have mips make sure the base level is set to 0 and the max level set to numMipLevels-1 // so that the uploads go to the right levels. if (numMipLevels && this->glCaps().mipmapLevelControlSupport()) { - auto params = backendTexture.getGLTextureParams(); + auto params = get_gl_texture_params(backendTexture); GrGLTextureParameters::NonsamplerState nonsamplerState = params->nonsamplerState(); if (params->nonsamplerState().fBaseMipMapLevel != 0) { GL_CALL(TexParameteri(info.fTarget, GR_GL_TEXTURE_BASE_LEVEL, 0)); @@ -3922,7 +3960,7 @@ void GrGLGpu::deleteBackendTexture(const GrBackendTexture& tex) { SkASSERT(GrBackendApi::kOpenGL == tex.backend()); GrGLTextureInfo info; - if (tex.getGLTextureInfo(&info)) { + if (GrBackendTextures::GetGLTextureInfo(tex, &info)) { GL_CALL(DeleteTextures(1, &info.fID)); } } @@ -3945,7 +3983,7 @@ bool GrGLGpu::isTestingOnlyBackendTexture(const GrBackendTexture& tex) const { SkASSERT(GrBackendApi::kOpenGL == tex.backend()); GrGLTextureInfo info; - if (!tex.getGLTextureInfo(&info)) { + if (!GrBackendTextures::GetGLTextureInfo(tex, &info)) { return false; } @@ -4107,8 +4145,8 @@ GrBackendRenderTarget GrGLGpu::createTestingOnlyBackendRenderTarget(SkISize dime auto stencilBits = SkToInt(GrGLFormatStencilBits(this->glCaps().stencilFormats()[sFormatIdx])); - GrBackendRenderTarget beRT = GrBackendRenderTarget(dimensions.width(), dimensions.height(), - sampleCnt, stencilBits, info); + GrBackendRenderTarget beRT = GrBackendRenderTargets::MakeGL( + dimensions.width(), dimensions.height(), sampleCnt, stencilBits, info); SkASSERT(this->caps()->areColorTypeAndFormatCompatible(colorType, beRT.getBackendFormat())); return beRT; } @@ -4116,7 +4154,7 @@ GrBackendRenderTarget GrGLGpu::createTestingOnlyBackendRenderTarget(SkISize dime void GrGLGpu::deleteTestingOnlyBackendRenderTarget(const GrBackendRenderTarget& backendRT) { SkASSERT(GrBackendApi::kOpenGL == backendRT.backend()); GrGLFramebufferInfo info; - if (backendRT.getGLFramebufferInfo(&info)) { + if (GrBackendRenderTargets::GetGLFramebufferInfo(backendRT, &info)) { if (info.fFBOID) { this->deleteFramebuffer(info.fFBOID); } @@ -4200,7 +4238,7 @@ void GrGLGpu::submit(GrOpsRenderPass* renderPass) { fCachedOpsRenderPass->reset(); } -GrFence SK_WARN_UNUSED_RESULT GrGLGpu::insertFence() { +[[nodiscard]] GrFence GrGLGpu::insertFence() { if (!this->caps()->fenceSyncSupport()) { return 0; } @@ -4256,7 +4294,7 @@ void GrGLGpu::deleteFence(GrFence fence) { } } -std::unique_ptr SK_WARN_UNUSED_RESULT GrGLGpu::makeSemaphore(bool isOwned) { +[[nodiscard]] std::unique_ptr GrGLGpu::makeSemaphore(bool isOwned) { SkASSERT(this->caps()->semaphoreSupport()); return GrGLSemaphore::Make(this, isOwned); } diff --git a/src/gpu/ganesh/gl/GrGLGpu.h b/src/gpu/ganesh/gl/GrGLGpu.h index 4c2738c8dde5..86639b583576 100644 --- a/src/gpu/ganesh/gl/GrGLGpu.h +++ b/src/gpu/ganesh/gl/GrGLGpu.h @@ -9,6 +9,7 @@ #define GrGLGpu_DEFINED #include "include/core/SkTypes.h" +#include "include/gpu/ganesh/gl/GrGLBackendSurface.h" #include "include/private/base/SkTArray.h" #include "src/core/SkChecksum.h" #include "src/core/SkLRUCache.h" @@ -188,11 +189,11 @@ class GrGLGpu final : public GrGpu { void submit(GrOpsRenderPass* renderPass) override; - GrFence SK_WARN_UNUSED_RESULT insertFence() override; + [[nodiscard]] GrFence insertFence() override; bool waitFence(GrFence) override; void deleteFence(GrFence) override; - std::unique_ptr SK_WARN_UNUSED_RESULT makeSemaphore(bool isOwned) override; + [[nodiscard]] std::unique_ptr makeSemaphore(bool isOwned) override; std::unique_ptr wrapBackendSemaphore(const GrBackendSemaphore&, GrSemaphoreWrapType, GrWrapOwnership) override; @@ -291,12 +292,12 @@ class GrGLGpu final : public GrGpu { int getCompatibleStencilIndex(GrGLFormat format); GrBackendFormat getPreferredStencilFormat(const GrBackendFormat& format) override { - int idx = this->getCompatibleStencilIndex(format.asGLFormat()); + int idx = this->getCompatibleStencilIndex(GrBackendFormats::AsGLFormat(format)); if (idx < 0) { return {}; } - return GrBackendFormat::MakeGL(GrGLFormatToEnum(this->glCaps().stencilFormats()[idx]), - GR_GL_TEXTURE_NONE); + return GrBackendFormats::MakeGL(GrGLFormatToEnum(this->glCaps().stencilFormats()[idx]), + GR_GL_TEXTURE_NONE); } void onFBOChanged(); diff --git a/src/gpu/ganesh/gl/GrGLRenderTarget.cpp b/src/gpu/ganesh/gl/GrGLRenderTarget.cpp index 58edc71d9e66..02f137c0fd81 100644 --- a/src/gpu/ganesh/gl/GrGLRenderTarget.cpp +++ b/src/gpu/ganesh/gl/GrGLRenderTarget.cpp @@ -9,6 +9,7 @@ #include "include/core/SkTraceMemoryDump.h" #include "include/gpu/GrDirectContext.h" +#include "include/gpu/ganesh/gl/GrGLBackendSurface.h" #include "src/gpu/ganesh/GrBackendUtils.h" #include "src/gpu/ganesh/GrDirectContextPriv.h" #include "src/gpu/ganesh/GrGpuResourcePriv.h" @@ -123,14 +124,14 @@ GrBackendRenderTarget GrGLRenderTarget::getBackendRenderTarget() const { numStencilBits = GrBackendFormatStencilBits(stencil->backendFormat()); } - return GrBackendRenderTarget( + return GrBackendRenderTargets::MakeGL( this->width(), this->height(), this->numSamples(), numStencilBits, fbi); } GrBackendFormat GrGLRenderTarget::backendFormat() const { // We should never have a GrGLRenderTarget (even a textureable one with a target that is not // texture 2D. - return GrBackendFormat::MakeGL(GrGLFormatToEnum(fRTFormat), GR_GL_TEXTURE_2D); + return GrBackendFormats::MakeGL(GrGLFormatToEnum(fRTFormat), GR_GL_TEXTURE_2D); } size_t GrGLRenderTarget::onGpuMemorySize() const { diff --git a/src/gpu/ganesh/gl/GrGLRenderTarget.h b/src/gpu/ganesh/gl/GrGLRenderTarget.h index ec0b097e11b9..9243c509d1fd 100644 --- a/src/gpu/ganesh/gl/GrGLRenderTarget.h +++ b/src/gpu/ganesh/gl/GrGLRenderTarget.h @@ -11,6 +11,7 @@ #include "include/core/SkScalar.h" #include "include/gpu/GrBackendSurface.h" +#include "include/gpu/gl/GrGLTypes.h" #include "src/gpu/ganesh/GrRenderTarget.h" #include "src/gpu/ganesh/gl/GrGLDefines.h" diff --git a/src/gpu/ganesh/gl/GrGLTexture.cpp b/src/gpu/ganesh/gl/GrGLTexture.cpp index 3aea87a9f9ee..9e2c14db18a4 100644 --- a/src/gpu/ganesh/gl/GrGLTexture.cpp +++ b/src/gpu/ganesh/gl/GrGLTexture.cpp @@ -9,10 +9,12 @@ #include "include/core/SkTraceMemoryDump.h" #include "include/gpu/ganesh/SkImageGanesh.h" +#include "include/gpu/ganesh/gl/GrGLBackendSurface.h" #include "src/core/SkTraceEvent.h" #include "src/gpu/ganesh/GrSemaphore.h" #include "src/gpu/ganesh/GrShaderCaps.h" #include "src/gpu/ganesh/GrTexture.h" +#include "src/gpu/ganesh/gl/GrGLBackendSurfacePriv.h" #include "src/gpu/ganesh/gl/GrGLGpu.h" #define GPUGL static_cast(this->getGpu()) @@ -136,12 +138,13 @@ GrBackendTexture GrGLTexture::getBackendTexture() const { info.fFormat = GrGLFormatToEnum(fFormat); info.fProtected = skgpu::Protected(this->isProtected()); - return GrBackendTexture(this->width(), this->height(), this->mipmapped(), info, fParameters); + return GrBackendTextures::MakeGL( + this->width(), this->height(), this->mipmapped(), info, fParameters); } GrBackendFormat GrGLTexture::backendFormat() const { - return GrBackendFormat::MakeGL(GrGLFormatToEnum(fFormat), - target_from_texture_type(this->textureType())); + return GrBackendFormats::MakeGL(GrGLFormatToEnum(fFormat), + target_from_texture_type(this->textureType())); } sk_sp GrGLTexture::MakeWrapped(GrGLGpu* gpu, diff --git a/src/gpu/ganesh/gl/GrGLTypesPriv.cpp b/src/gpu/ganesh/gl/GrGLTypesPriv.cpp index 3ca985cc83c7..1e229dd07afe 100644 --- a/src/gpu/ganesh/gl/GrGLTypesPriv.cpp +++ b/src/gpu/ganesh/gl/GrGLTypesPriv.cpp @@ -59,15 +59,9 @@ void GrGLTextureParameters::set(const SamplerOverriddenState* samplerState, void GrGLBackendTextureInfo::assign(const GrGLBackendTextureInfo& that, bool thisIsValid) { fInfo = that.fInfo; - SkSafeRef(that.fParams); - if (thisIsValid) { - SkSafeUnref(fParams); - } fParams = that.fParams; } -void GrGLBackendTextureInfo::cleanup() { SkSafeUnref(fParams); } - GrGLSurfaceInfo GrGLTextureSpecToSurfaceInfo(const GrGLTextureSpec& glSpec, uint32_t sampleCount, uint32_t levelCount, diff --git a/src/gpu/ganesh/glsl/GrGLSLShaderBuilder.cpp b/src/gpu/ganesh/glsl/GrGLSLShaderBuilder.cpp index 9745f8b0ffd2..ddf44489d2f1 100644 --- a/src/gpu/ganesh/glsl/GrGLSLShaderBuilder.cpp +++ b/src/gpu/ganesh/glsl/GrGLSLShaderBuilder.cpp @@ -87,7 +87,7 @@ void GrGLSLShaderBuilder::emitFunctionPrototype(SkSLType returnType, } void GrGLSLShaderBuilder::emitFunctionPrototype(const char* declaration) { - this->functions().appendf("%s;\n", declaration); + this->functions().appendf("%s\n", declaration); } static inline void append_texture_swizzle(SkString* out, skgpu::Swizzle swizzle) { diff --git a/src/gpu/ganesh/glsl/GrGLSLUniformHandler.h b/src/gpu/ganesh/glsl/GrGLSLUniformHandler.h index ea661b6101dc..c7350b5a7099 100644 --- a/src/gpu/ganesh/glsl/GrGLSLUniformHandler.h +++ b/src/gpu/ganesh/glsl/GrGLSLUniformHandler.h @@ -15,6 +15,7 @@ // variable names beginning with this prefix will not be mangled #define GR_NO_MANGLE_PREFIX "sk_" +class GrBackendFormat; class GrGLSLProgramBuilder; class GrGLSLShaderBuilder; class GrProcessor; diff --git a/src/gpu/ganesh/image/BUILD.bazel b/src/gpu/ganesh/image/BUILD.bazel index 9be7f262a4b1..2c445e1cfa51 100644 --- a/src/gpu/ganesh/image/BUILD.bazel +++ b/src/gpu/ganesh/image/BUILD.bazel @@ -19,6 +19,8 @@ IMAGE_FILES = [ "SkImage_LazyTexture.h", "SkImage_RasterPinnable.cpp", "SkImage_RasterPinnable.h", + "SkSpecialImage_Ganesh.cpp", + "SkSpecialImage_Ganesh.h", ] split_srcs_and_hdrs( diff --git a/src/gpu/ganesh/image/GrImageUtils.cpp b/src/gpu/ganesh/image/GrImageUtils.cpp index 211b861be1cb..b95ec2eb12ba 100644 --- a/src/gpu/ganesh/image/GrImageUtils.cpp +++ b/src/gpu/ganesh/image/GrImageUtils.cpp @@ -34,7 +34,10 @@ #include "include/private/gpu/ganesh/GrTextureGenerator.h" #include "include/private/gpu/ganesh/GrTypesPriv.h" #include "src/core/SkCachedData.h" +#include "src/core/SkImageFilterTypes.h" #include "src/core/SkSamplingPriv.h" +#include "src/core/SkSpecialImage.h" +#include "src/core/SkSpecialSurface.h" // IWYU pragma: keep #include "src/gpu/ResourceKey.h" #include "src/gpu/SkBackingFit.h" #include "src/gpu/Swizzle.h" @@ -48,25 +51,30 @@ #include "src/gpu/ganesh/GrSurfaceProxy.h" #include "src/gpu/ganesh/GrSurfaceProxyView.h" #include "src/gpu/ganesh/GrTextureProxy.h" +#include "src/gpu/ganesh/GrThreadSafeCache.h" #include "src/gpu/ganesh/GrYUVATextureProxies.h" #include "src/gpu/ganesh/SkGr.h" #include "src/gpu/ganesh/SurfaceFillContext.h" #include "src/gpu/ganesh/effects/GrBicubicEffect.h" #include "src/gpu/ganesh/effects/GrTextureEffect.h" #include "src/gpu/ganesh/effects/GrYUVtoRGBEffect.h" +#include "src/gpu/ganesh/image/SkImage_Ganesh.h" #include "src/gpu/ganesh/image/SkImage_GaneshBase.h" #include "src/gpu/ganesh/image/SkImage_RasterPinnable.h" +#include "src/gpu/ganesh/image/SkSpecialImage_Ganesh.h" #include "src/image/SkImage_Base.h" #include "src/image/SkImage_Lazy.h" #include "src/image/SkImage_Picture.h" #include "src/image/SkImage_Raster.h" +#include #include #include class SkMatrix; -enum SkColorType : int; +class SkSurfaceProps; enum class SkTileMode; +enum SkColorType : int; namespace skgpu::ganesh { @@ -717,3 +725,53 @@ SkYUVAPixmapInfo::SupportedDataTypes SupportedTextureFormats(const GrImageContex } } // namespace skgpu::ganesh + +namespace skif { +Context MakeGaneshContext(GrRecordingContext* context, + GrSurfaceOrigin origin, + const ContextInfo& info) { + SkASSERT(context); + SkASSERT(!info.fSource.image() || info.fSource.image()->isGaneshBacked()); + + auto makeSurfaceFunctor = [context, origin](const SkImageInfo& imageInfo, + const SkSurfaceProps* props) { + return SkSpecialSurfaces::MakeRenderTarget(context, + imageInfo, + *props, + origin); + }; + + auto makeImageFunctor = [context](const SkIRect& subset, + sk_sp image, + const SkSurfaceProps& props) { + return SkSpecialImages::MakeFromTextureImage(context, subset, image, props); + }; + + auto makeCachedBitmapFunctor = [context](const SkBitmap& data) -> sk_sp { + // This uses the thread safe cache (instead of GrMakeCachedBitmapProxyView) so that image + // filters can be evaluated on other threads with DDLs. + auto threadSafeCache = context->priv().threadSafeCache(); + + skgpu::UniqueKey key; + SkIRect subset = SkIRect::MakePtSize(data.pixelRefOrigin(), data.dimensions()); + GrMakeKeyFromImageID(&key, data.getGenerationID(), subset); + + auto view = threadSafeCache->find(key); + if (!view) { + view = std::get<0>(GrMakeUncachedBitmapProxyView(context, data)); + if (!view) { + return nullptr; + } + threadSafeCache->add(key, view); + } + + return sk_make_sp(sk_ref_sp(context), + data.getGenerationID(), + std::move(view), + data.info().colorInfo()); + }; + + return Context(info, context, makeSurfaceFunctor, makeImageFunctor, makeCachedBitmapFunctor); +} + +} // namespace skif diff --git a/src/gpu/ganesh/image/GrImageUtils.h b/src/gpu/ganesh/image/GrImageUtils.h index cb4fdf1fc536..86d4e5425fc9 100644 --- a/src/gpu/ganesh/image/GrImageUtils.h +++ b/src/gpu/ganesh/image/GrImageUtils.h @@ -130,4 +130,13 @@ GrSurfaceProxyView FindOrMakeCachedMipmappedView(GrRecordingContext*, SkYUVAPixmapInfo::SupportedDataTypes SupportedTextureFormats(const GrImageContext&); } // namespace skgpu::ganesh + +namespace skif { +class Context; +struct ContextInfo; +Context MakeGaneshContext(GrRecordingContext* context, + GrSurfaceOrigin origin, + const ContextInfo& info); +} // namespace skif + #endif diff --git a/src/gpu/ganesh/image/SkImage_Ganesh.cpp b/src/gpu/ganesh/image/SkImage_Ganesh.cpp index 746d396d0fb3..19bb2ffbf281 100644 --- a/src/gpu/ganesh/image/SkImage_Ganesh.cpp +++ b/src/gpu/ganesh/image/SkImage_Ganesh.cpp @@ -134,7 +134,7 @@ inline GrMipmapped SkImage_Ganesh::ProxyChooser::mipmapped() const { } #ifdef SK_DEBUG -inline GrBackendFormat SkImage_Ganesh::ProxyChooser::backendFormat() { +inline const GrBackendFormat& SkImage_Ganesh::ProxyChooser::backendFormat() { SkAutoSpinlock hold(fLock); if (fVolatileProxy) { SkASSERT(fVolatileProxy->backendFormat() == fStableProxy->backendFormat()); @@ -301,7 +301,10 @@ sk_sp SkImage_Ganesh::onMakeColorTypeAndColorSpace(SkColorType targetCT } auto sfc = dContext->priv().makeSFCWithFallback(GrImageInfo(info, this->dimensions()), - SkBackingFit::kExact); + SkBackingFit::kExact, + /* sampleCount= */ 1, + skgpu::Mipmapped::kNo, + skgpu::Protected::kNo); if (!sfc) { return nullptr; } @@ -353,6 +356,7 @@ void SkImage_Ganesh::onAsyncRescaleAndReadPixels(const SkImageInfo& info, } void SkImage_Ganesh::onAsyncRescaleAndReadPixelsYUV420(SkYUVColorSpace yuvColorSpace, + bool readAlpha, sk_sp dstColorSpace, SkIRect srcRect, SkISize dstSize, @@ -373,6 +377,7 @@ void SkImage_Ganesh::onAsyncRescaleAndReadPixelsYUV420(SkYUVColorSpace yuvColorS } ctx->asyncRescaleAndReadPixelsYUV420(dContext, yuvColorSpace, + readAlpha, std::move(dstColorSpace), srcRect, dstSize, @@ -408,6 +413,11 @@ std::tuple SkImage_Ganesh::asView( return {std::move(view), ct}; } +skif::Context SkImage_Ganesh::onCreateFilterContext(GrRecordingContext* rContext, + const skif::ContextInfo& ctxInfo) const { + return skif::MakeGaneshContext(rContext, fOrigin, ctxInfo); +} + std::unique_ptr SkImage_Ganesh::asFragmentProcessor( GrRecordingContext* rContext, SkSamplingOptions sampling, @@ -433,4 +443,3 @@ std::unique_ptr SkImage_Ganesh::asFragmentProcessor( GrSurfaceProxyView SkImage_Ganesh::makeView(GrRecordingContext* rContext) const { return {fChooser.chooseProxy(rContext), fOrigin, fSwizzle}; } - diff --git a/src/gpu/ganesh/image/SkImage_Ganesh.h b/src/gpu/ganesh/image/SkImage_Ganesh.h index 002febc45a5b..cd1905bca4a8 100644 --- a/src/gpu/ganesh/image/SkImage_Ganesh.h +++ b/src/gpu/ganesh/image/SkImage_Ganesh.h @@ -10,9 +10,9 @@ #include "include/core/SkRefCnt.h" #include "include/core/SkSamplingOptions.h" -#include "include/gpu/GrBackendSurface.h" #include "include/private/base/SkThreadAnnotations.h" #include "src/base/SkSpinlock.h" +#include "src/core/SkImageFilterTypes.h" #include "src/gpu/Swizzle.h" #include "src/gpu/ganesh/GrSurfaceProxyView.h" #include "src/gpu/ganesh/image/SkImage_GaneshBase.h" @@ -23,6 +23,8 @@ #include #include +class GrBackendFormat; +class GrBackendTexture; class GrDirectContext; class GrFragmentProcessor; class GrImageContext; @@ -86,6 +88,7 @@ class SkImage_Ganesh final : public SkImage_GaneshBase { ReadPixelsContext) const override; void onAsyncRescaleAndReadPixelsYUV420(SkYUVColorSpace, + bool readAlpha, sk_sp, SkIRect srcRect, SkISize dstSize, @@ -96,6 +99,9 @@ class SkImage_Ganesh final : public SkImage_GaneshBase { void generatingSurfaceIsDeleted() override; + skif::Context onCreateFilterContext(GrRecordingContext* rContext, + const skif::ContextInfo& ctxInfo) const override; + // From SkImage_GaneshBase.h GrSemaphoresSubmitted flush(GrDirectContext*, const GrFlushInfo&) const override; @@ -159,7 +165,7 @@ class SkImage_Ganesh final : public SkImage_GaneshBase { size_t gpuMemorySize() const SK_EXCLUDES(fLock); skgpu::Mipmapped mipmapped() const SK_EXCLUDES(fLock); #ifdef SK_DEBUG - GrBackendFormat backendFormat() SK_EXCLUDES(fLock); + const GrBackendFormat& backendFormat() SK_EXCLUDES(fLock); #endif private: diff --git a/src/gpu/ganesh/image/SkImage_GaneshBase.cpp b/src/gpu/ganesh/image/SkImage_GaneshBase.cpp index 07c0fbf2f03f..25b4cbff29dd 100644 --- a/src/gpu/ganesh/image/SkImage_GaneshBase.cpp +++ b/src/gpu/ganesh/image/SkImage_GaneshBase.cpp @@ -13,12 +13,9 @@ #include "include/core/SkColorType.h" #include "include/core/SkImage.h" #include "include/core/SkImageInfo.h" -#include "include/core/SkMatrix.h" #include "include/core/SkPixmap.h" -#include "include/core/SkPoint.h" #include "include/core/SkRect.h" #include "include/core/SkSize.h" -#include "include/core/SkSurfaceProps.h" #include "include/core/SkTypes.h" #include "include/gpu/GpuTypes.h" #include "include/gpu/GrBackendSurface.h" @@ -29,11 +26,7 @@ #include "include/private/gpu/ganesh/GrTypesPriv.h" #include "src/core/SkBitmapCache.h" #include "src/core/SkColorSpacePriv.h" -#include "src/core/SkImageFilterCache.h" -#include "src/core/SkImageFilterTypes.h" -#include "src/core/SkImageFilter_Base.h" #include "src/core/SkImageInfoPriv.h" -#include "src/core/SkSpecialImage.h" #include "src/gpu/RefCntedCallback.h" #include "src/gpu/SkBackingFit.h" #include "src/gpu/ganesh/GrCaps.h" @@ -58,7 +51,6 @@ #include class GrContextThreadSafeProxy; -class SkImageFilter; SkImage_GaneshBase::SkImage_GaneshBase(sk_sp context, SkImageInfo info, @@ -295,54 +287,10 @@ sk_sp SkImage_GaneshBase::makeColorTypeAndColorSpace(GrDirectContext* d return this->onMakeColorTypeAndColorSpace(targetColorType, std::move(targetCS), dContext); } -sk_sp SkImage_GaneshBase::makeWithFilter(GrRecordingContext* rContext, - const SkImageFilter* filter, - const SkIRect& subset, - const SkIRect& clipBounds, - SkIRect* outSubset, - SkIPoint* offset) const { - if (!filter || !outSubset || !offset || !this->bounds().contains(subset)) { - return nullptr; - } - auto myContext = this->context(); - if (!myContext || !myContext->priv().matches(rContext)) { - return nullptr; - } - auto srcSpecialImage = SkSpecialImage::MakeFromImage( - rContext, subset, sk_ref_sp(const_cast(this)), SkSurfaceProps()); - if (!srcSpecialImage) { - return nullptr; - } - - sk_sp cache( - SkImageFilterCache::Create(SkImageFilterCache::kDefaultTransientSize)); - - // The filters operate in the local space of the src image, where (0,0) corresponds to the - // subset's top left corner. But the clip bounds and any crop rects on the filters are in the - // original coordinate system, so configure the CTM to correct crop rects and explicitly adjust - // the clip bounds (since it is assumed to already be in image space). - // TODO: Once all image filters support it, we can just use the subset's top left corner as - // the source FilterResult's origin. - skif::ContextInfo ctxInfo = { - skif::Mapping(SkMatrix::Translate(-subset.x(), -subset.y())), - skif::LayerSpace(clipBounds.makeOffset(-subset.topLeft())), - skif::FilterResult(srcSpecialImage), - this->imageInfo().colorType(), - this->imageInfo().colorSpace(), - /*fSurfaceProps=*/{}, - cache.get()}; - - auto view = srcSpecialImage->view(rContext); - skif::Context context = skif::Context::MakeGanesh(rContext, view.origin(), ctxInfo); - - return this->filterSpecialImage( - context, as_IFB(filter), srcSpecialImage.get(), subset, clipBounds, outSubset, offset); -} - sk_sp SkImage_GaneshBase::MakePromiseImageLazyProxy( GrContextThreadSafeProxy* tsp, SkISize dimensions, - GrBackendFormat backendFormat, + const GrBackendFormat& backendFormat, skgpu::Mipmapped mipmapped, SkImages::PromiseImageTextureFulfillProc fulfillProc, sk_sp releaseHelper) { diff --git a/src/gpu/ganesh/image/SkImage_GaneshBase.h b/src/gpu/ganesh/image/SkImage_GaneshBase.h index a4a9f8500903..2fc8764454a1 100644 --- a/src/gpu/ganesh/image/SkImage_GaneshBase.h +++ b/src/gpu/ganesh/image/SkImage_GaneshBase.h @@ -31,7 +31,6 @@ class GrTextureProxy; class SkBitmap; class SkColorSpace; class SkImage; -class SkImageFilter; class SkMatrix; enum SkAlphaType : int; enum SkColorType : int; @@ -40,7 +39,6 @@ enum class GrImageTexGenPolicy : int; enum class GrSemaphoresSubmitted : bool; enum class SkTileMode; struct GrFlushInfo; -struct SkIPoint; struct SkIRect; struct SkISize; struct SkImageInfo; @@ -60,12 +58,6 @@ class SkImage_GaneshBase : public SkImage_Base { SkColorType targetColorType, sk_sp targetCS) const final; sk_sp makeSubset(GrDirectContext* direct, const SkIRect& subset) const final; - sk_sp makeWithFilter(GrRecordingContext* context, - const SkImageFilter* filter, - const SkIRect& subset, - const SkIRect& clipBounds, - SkIRect* outSubset, - SkIPoint* offset) const final; // From SkImage_Base.h GrImageContext* context() const final { return fContext.get(); } @@ -101,7 +93,7 @@ class SkImage_GaneshBase : public SkImage_Base { static sk_sp MakePromiseImageLazyProxy( GrContextThreadSafeProxy*, SkISize dimensions, - GrBackendFormat, + const GrBackendFormat&, skgpu::Mipmapped, SkImages::PromiseImageTextureFulfillProc, sk_sp releaseHelper); @@ -120,8 +112,6 @@ class SkImage_GaneshBase : public SkImage_Base { protected: SkImage_GaneshBase(sk_sp, SkImageInfo, uint32_t uniqueID); - sk_sp fContext; - sk_sp onMakeSubset(skgpu::graphite::Recorder*, const SkIRect& subset, RequiredProperties) const final; @@ -130,6 +120,8 @@ class SkImage_GaneshBase : public SkImage_Base { SkColorType, sk_sp, RequiredProperties) const final; + + sk_sp fContext; }; #endif diff --git a/src/gpu/ganesh/image/SkImage_GaneshYUVA.cpp b/src/gpu/ganesh/image/SkImage_GaneshYUVA.cpp index 41d425fc369a..caa07debc960 100644 --- a/src/gpu/ganesh/image/SkImage_GaneshYUVA.cpp +++ b/src/gpu/ganesh/image/SkImage_GaneshYUVA.cpp @@ -51,6 +51,7 @@ #include "src/gpu/ganesh/SurfaceFillContext.h" #include "src/gpu/ganesh/effects/GrBicubicEffect.h" #include "src/gpu/ganesh/effects/GrYUVtoRGBEffect.h" +#include "src/gpu/ganesh/image/GrImageUtils.h" #include "src/image/SkImage_Base.h" #include @@ -196,7 +197,7 @@ std::tuple SkImage_GaneshYUVA::asView( /*sample count*/ 1, mipmapped, GrProtected::kNo, - kTopLeft_GrSurfaceOrigin, + fYUVAProxies.textureOrigin(), skgpu::Budgeted::kYes); if (!sfc) { return {}; @@ -216,6 +217,11 @@ std::tuple SkImage_GaneshYUVA::asView( return {sfc->readSurfaceView(), sfc->colorInfo().colorType()}; } +skif::Context SkImage_GaneshYUVA::onCreateFilterContext(GrRecordingContext* rContext, + const skif::ContextInfo& ctxInfo) const { + return skif::MakeGaneshContext(rContext, fYUVAProxies.textureOrigin(), ctxInfo); +} + std::unique_ptr SkImage_GaneshYUVA::asFragmentProcessor( GrRecordingContext* context, SkSamplingOptions sampling, @@ -312,7 +318,7 @@ sk_sp TextureFromYUVAPixmaps(GrRecordingContext* context, bool limitToMaxTextureSize, sk_sp imageColorSpace) { if (!context) { - return nullptr; // until we impl this for raster backend + return nullptr; } if (!pixmaps.isValid()) { diff --git a/src/gpu/ganesh/image/SkImage_GaneshYUVA.h b/src/gpu/ganesh/image/SkImage_GaneshYUVA.h index 5bbf5b32eee9..637e99ab7ea9 100644 --- a/src/gpu/ganesh/image/SkImage_GaneshYUVA.h +++ b/src/gpu/ganesh/image/SkImage_GaneshYUVA.h @@ -12,6 +12,7 @@ #include "include/core/SkImage.h" #include "include/core/SkRefCnt.h" #include "include/core/SkSamplingOptions.h" +#include "src/core/SkImageFilterTypes.h" #include "src/gpu/ganesh/GrYUVATextureProxies.h" #include "src/gpu/ganesh/image/SkImage_GaneshBase.h" #include "src/image/SkImage_Base.h" @@ -64,6 +65,9 @@ class SkImage_GaneshYUVA final : public SkImage_GaneshBase { sk_sp onReinterpretColorSpace(sk_sp) const final; + skif::Context onCreateFilterContext(GrRecordingContext* rContext, + const skif::ContextInfo& ctxInfo) const override; + // From SkImage_GaneshBase.h GrSemaphoresSubmitted flush(GrDirectContext*, const GrFlushInfo&) const override; @@ -80,7 +84,6 @@ class SkImage_GaneshYUVA final : public SkImage_GaneshBase { bool setupMipmapsForPlanes(GrRecordingContext*) const; - private: enum class ColorSpaceMode { kConvert, diff --git a/src/gpu/ganesh/image/SkSpecialImage_Ganesh.cpp b/src/gpu/ganesh/image/SkSpecialImage_Ganesh.cpp new file mode 100644 index 000000000000..9f18bf4069cf --- /dev/null +++ b/src/gpu/ganesh/image/SkSpecialImage_Ganesh.cpp @@ -0,0 +1,286 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "src/gpu/ganesh/image/SkSpecialImage_Ganesh.h" + +#include "include/core/SkAlphaType.h" +#include "include/core/SkBitmap.h" +#include "include/core/SkBlendMode.h" +#include "include/core/SkCanvas.h" +#include "include/core/SkColorSpace.h" // IWYU pragma: keep +#include "include/core/SkImage.h" +#include "include/core/SkImageInfo.h" +#include "include/core/SkMatrix.h" +#include "include/core/SkPaint.h" +#include "include/core/SkRect.h" +#include "include/core/SkSamplingOptions.h" +#include "include/core/SkScalar.h" +#include "include/core/SkSurfaceProps.h" +#include "include/gpu/GpuTypes.h" +#include "include/gpu/GrRecordingContext.h" +#include "include/gpu/GrTypes.h" +#include "include/private/base/SkAssert.h" +#include "include/private/base/SkPoint_impl.h" +#include "include/private/gpu/ganesh/GrImageContext.h" +#include "include/private/gpu/ganesh/GrTypesPriv.h" +#include "src/core/SkImageFilterTypes.h" +#include "src/core/SkSpecialImage.h" +#include "src/core/SkSpecialSurface.h" +#include "src/gpu/SkBackingFit.h" +#include "src/gpu/ganesh/GrRecordingContextPriv.h" +#include "src/gpu/ganesh/Device.h" +#include "src/gpu/ganesh/GrColorSpaceXform.h" +#include "src/gpu/ganesh/GrSurfaceProxy.h" +#include "src/gpu/ganesh/GrSurfaceProxyPriv.h" +#include "src/gpu/ganesh/GrSurfaceProxyView.h" +#include "src/gpu/ganesh/SkGr.h" +#include "src/gpu/ganesh/image/GrImageUtils.h" +#include "src/gpu/ganesh/image/SkImage_Ganesh.h" +#include "src/image/SkImage_Base.h" +#include "src/shaders/SkImageShader.h" + +#include +#include +#include + +class SkShader; +enum SkColorType : int; +enum class SkTileMode; + +static sk_sp wrap_proxy_in_image(GrRecordingContext* context, + GrSurfaceProxyView view, + const SkColorInfo& colorInfo) { + return sk_make_sp( + sk_ref_sp(context), kNeedNewImageUniqueID, std::move(view), colorInfo); +} + +class SkSpecialImage_Gpu final : public SkSpecialImage { +public: + SkSpecialImage_Gpu(GrRecordingContext* context, + const SkIRect& subset, + uint32_t uniqueID, + GrSurfaceProxyView view, + const SkColorInfo& colorInfo, + const SkSurfaceProps& props) + : SkSpecialImage(subset, uniqueID, colorInfo, props) + , fContext(context) + , fView(std::move(view)) {} + + size_t getSize() const override { return fView.proxy()->gpuMemorySize(); } + + bool isGaneshBacked() const override { return true; } + + void onDraw(SkCanvas* canvas, + SkScalar x, + SkScalar y, + const SkSamplingOptions& sampling, + const SkPaint* paint) const override { + SkRect dst = SkRect::MakeXYWH(x, y, this->subset().width(), this->subset().height()); + + // TODO: In this instance we know we're going to draw a sub-portion of the backing + // texture into the canvas so it is okay to wrap it in an SkImage. This poses + // some problems for full deferral however in that when the deferred SkImage_Ganesh + // instantiates itself it is going to have to either be okay with having a larger + // than expected backing texture (unlikely) or the 'fit' of the SurfaceProxy needs + // to be tightened (if it is deferred). + sk_sp img = sk_sp(new SkImage_Ganesh( + sk_ref_sp(canvas->recordingContext()), this->uniqueID(), fView, this->colorInfo())); + + canvas->drawImageRect(img, + SkRect::Make(this->subset()), + dst, + sampling, + paint, + SkCanvas::kStrict_SrcRectConstraint); + } + + GrRecordingContext* getContext() const override { return fContext; } + + GrSurfaceProxyView view(GrRecordingContext*) const { return fView; } + + bool onGetROPixels(SkBitmap* dst) const override { + // This should never be called: All GPU image filters are implemented entirely on the GPU, + // so we never perform read-back. + SkASSERT(false); + return false; + } + + sk_sp onMakeSubset(const SkIRect& subset) const override { + return SkSpecialImages::MakeDeferredFromGpu( + fContext, subset, this->uniqueID(), fView, this->colorInfo(), this->props()); + } + + sk_sp onAsImage(const SkIRect* subset) const override { + GrSurfaceProxy* proxy = fView.proxy(); + if (subset) { + if (proxy->isFunctionallyExact() && *subset == SkIRect::MakeSize(proxy->dimensions())) { + proxy->priv().exactify(false); + // The existing GrTexture is already tight so reuse it in the SkImage + return wrap_proxy_in_image(fContext, fView, this->colorInfo()); + } + + auto subsetView = GrSurfaceProxyView::Copy(fContext, + fView, + GrMipmapped::kNo, + *subset, + SkBackingFit::kExact, + skgpu::Budgeted::kYes, + /*label=*/"SkSpecialImage_AsImage"); + if (!subsetView) { + return nullptr; + } + SkASSERT(subsetView.asTextureProxy()); + SkASSERT(subsetView.proxy()->priv().isExact()); + + // MDB: this is acceptable (wrapping subsetProxy in an SkImage) bc Copy will + // return a kExact-backed proxy + return wrap_proxy_in_image(fContext, std::move(subsetView), this->colorInfo()); + } + + proxy->priv().exactify(true); + + return wrap_proxy_in_image(fContext, fView, this->colorInfo()); + } + + sk_sp onAsShader(SkTileMode tileMode, + const SkSamplingOptions& sampling, + const SkMatrix& lm) const override { + // The special image's logical (0,0) is at its subset's topLeft() so we need to account for + // that in the local matrix used when sampling. + SkMatrix subsetOrigin = SkMatrix::Translate(-this->subset().topLeft()); + subsetOrigin.postConcat(lm); + // However, we don't need to modify the subset itself since that is defined with respect to + // the base image, and the local matrix is applied before any tiling/clamping. + const SkRect subset = SkRect::Make(this->subset()); + + // asImage() w/o a subset makes no copy; create the SkImageShader directly to remember the + // subset used to access the image. + return SkImageShader::MakeSubset( + this->asImage(), subset, tileMode, tileMode, sampling, &subsetOrigin); + } + +private: + GrRecordingContext* fContext; + GrSurfaceProxyView fView; +}; + +namespace SkSpecialImages { + +sk_sp MakeFromTextureImage(GrRecordingContext* rContext, + const SkIRect& subset, + sk_sp image, + const SkSurfaceProps& props) { + if (!rContext || !image || subset.isEmpty()) { + return nullptr; + } + + SkASSERT(image->bounds().contains(subset)); + + // This will work even if the image is a raster-backed image. + auto [view, ct] = skgpu::ganesh::AsView(rContext, image, GrMipmapped::kNo); + return MakeDeferredFromGpu(rContext, + subset, + image->uniqueID(), + std::move(view), + {ct, image->alphaType(), image->refColorSpace()}, + props); +} + +sk_sp MakeDeferredFromGpu(GrRecordingContext* context, + const SkIRect& subset, + uint32_t uniqueID, + GrSurfaceProxyView view, + const GrColorInfo& colorInfo, + const SkSurfaceProps& props) { + if (!context || context->abandoned() || !view.asTextureProxy()) { + return nullptr; + } + + SkASSERT(view.proxy()->backingStoreBoundsIRect().contains(subset)); + + SkColorType ct = GrColorTypeToSkColorType(colorInfo.colorType()); + return sk_make_sp( + context, + subset, + uniqueID, + std::move(view), + SkColorInfo(ct, colorInfo.alphaType(), colorInfo.refColorSpace()), + props); +} + +GrSurfaceProxyView AsView(GrRecordingContext* context, const SkSpecialImage* img) { + if (!context || !img) { + return {}; + } + if (img->isGaneshBacked()) { + auto grImg = static_cast(img); + return grImg->view(context); + } + SkASSERT(!img->isGraphiteBacked()); + SkBitmap bm; + SkAssertResult(img->getROPixels(&bm)); // this should always succeed for raster images + return std::get<0>(GrMakeCachedBitmapProxyView( + context, bm, /*label=*/"SpecialImageRaster_AsView", GrMipmapped::kNo)); +} + +sk_sp ImageToColorSpace(const skif::Context& ctx, + SkSpecialImage* src) { + // There are several conditions that determine if we actually need to convert the source to the + // destination's color space. Rather than duplicate that logic here, just try to make an xform + // object. If that produces something, then both are tagged, and the source is in a different + // gamut than the dest. There is some overhead to making the xform, but those are cached, and + // if we get one back, that means we're about to use it during the conversion anyway. + auto colorSpaceXform = GrColorSpaceXform::Make(src->getColorSpace(), src->alphaType(), + ctx.colorSpace(), kPremul_SkAlphaType); + + if (!colorSpaceXform) { + // No xform needed, just return the original image + return sk_ref_sp(src); + } + + sk_sp surf = ctx.makeSurface(src->dimensions()); + if (!surf) { + return sk_ref_sp(src); + } + + SkCanvas* canvas = surf->getCanvas(); + SkASSERT(canvas); + SkPaint p; + p.setBlendMode(SkBlendMode::kSrc); + src->draw(canvas, 0, 0, SkSamplingOptions(), &p); + return surf->makeImageSnapshot(); +} + +} // namespace SkSpecialImages + +namespace SkSpecialSurfaces { +sk_sp MakeRenderTarget(GrRecordingContext* rContext, + const SkImageInfo& ii, + const SkSurfaceProps& props, + GrSurfaceOrigin surfaceOrigin) { + if (!rContext) { + return nullptr; + } + + auto device = rContext->priv().createDevice(skgpu::Budgeted::kYes, + ii, + SkBackingFit::kApprox, + 1, + GrMipmapped::kNo, + GrProtected::kNo, + surfaceOrigin, + {props.flags(), kUnknown_SkPixelGeometry}, + skgpu::ganesh::Device::InitContents::kUninit); + if (!device) { + return nullptr; + } + + const SkIRect subset = SkIRect::MakeSize(ii.dimensions()); + + return sk_make_sp(std::move(device), subset); +} +} // namespace SkSpecialSurfaces diff --git a/src/gpu/ganesh/image/SkSpecialImage_Ganesh.h b/src/gpu/ganesh/image/SkSpecialImage_Ganesh.h new file mode 100644 index 000000000000..3eb81f15fede --- /dev/null +++ b/src/gpu/ganesh/image/SkSpecialImage_Ganesh.h @@ -0,0 +1,68 @@ +/* + * Copyright 2019 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef SkSpecialImageGanesh_DEFINED +#define SkSpecialImageGanesh_DEFINED + +#include "include/core/SkRefCnt.h" +#include "src/gpu/ganesh/GrColorInfo.h" +#include "src/gpu/ganesh/GrSurfaceProxyView.h" + +#include + +class GrRecordingContext; +class SkImage; +class SkSpecialImage; +class SkSpecialSurface; +class SkSurfaceProps; +struct SkIRect; +enum GrSurfaceOrigin : int; +struct SkImageInfo; + +namespace skif { class Context; } + +namespace SkSpecialImages { + +sk_sp MakeFromTextureImage(GrRecordingContext* rContext, + const SkIRect& subset, + sk_sp image, + const SkSurfaceProps& props); + +sk_sp MakeDeferredFromGpu(GrRecordingContext*, + const SkIRect& subset, + uint32_t uniqueID, + GrSurfaceProxyView, + const GrColorInfo&, + const SkSurfaceProps&); + +/** + * Regardless of how the underlying backing data is stored, returns the contents as a + * GrSurfaceProxyView. The returned view's proxy represents the entire backing image, so texture + * coordinates must be mapped from the content rect (e.g. relative to 'subset()') to the proxy's + * space (offset by subset().topLeft()). + */ +GrSurfaceProxyView AsView(GrRecordingContext*, const SkSpecialImage*); +inline GrSurfaceProxyView AsView(GrRecordingContext* rContext, sk_sp img) { + return AsView(rContext, img.get()); +} +/** + * Returns a version of the passed-in image (possibly the original), that is in the Context's + * colorspace and color type. This allows filters that do many + * texture samples to guarantee that any color space conversion has happened before running. + */ +sk_sp ImageToColorSpace(const skif::Context&, SkSpecialImage*); + +} // namespace SkSpecialImages + +namespace SkSpecialSurfaces { +sk_sp MakeRenderTarget(GrRecordingContext*, + const SkImageInfo&, + const SkSurfaceProps&, + GrSurfaceOrigin); +} + +#endif diff --git a/src/gpu/ganesh/mock/GrMockGpu.h b/src/gpu/ganesh/mock/GrMockGpu.h index 6eda3dc52e2f..df69eaac748c 100644 --- a/src/gpu/ganesh/mock/GrMockGpu.h +++ b/src/gpu/ganesh/mock/GrMockGpu.h @@ -28,11 +28,11 @@ class GrMockGpu : public GrGpu { GrThreadSafePipelineBuilder* pipelineBuilder() override; sk_sp refPipelineBuilder() override; - GrFence SK_WARN_UNUSED_RESULT insertFence() override { return 0; } + [[nodiscard]] GrFence insertFence() override { return 0; } bool waitFence(GrFence) override { return true; } void deleteFence(GrFence) override {} - std::unique_ptr SK_WARN_UNUSED_RESULT makeSemaphore(bool isOwned) override { + [[nodiscard]] std::unique_ptr makeSemaphore(bool isOwned) override { return nullptr; } std::unique_ptr wrapBackendSemaphore(const GrBackendSemaphore& /* semaphore */, diff --git a/src/gpu/ganesh/mtl/GrMtlCaps.mm b/src/gpu/ganesh/mtl/GrMtlCaps.mm index 18ba1c236d49..91f220499d7e 100644 --- a/src/gpu/ganesh/mtl/GrMtlCaps.mm +++ b/src/gpu/ganesh/mtl/GrMtlCaps.mm @@ -450,7 +450,7 @@ static bool format_is_srgb(MTLPixelFormat format) { bool GrMtlCaps::isFormatTexturable(MTLPixelFormat format) const { const FormatInfo& formatInfo = this->getFormatInfo(format); - return SkToBool(FormatInfo::kTexturable_Flag && formatInfo.fFlags); + return SkToBool(FormatInfo::kTexturable_Flag & formatInfo.fFlags); } bool GrMtlCaps::isFormatAsColorTypeRenderable(GrColorType ct, const GrBackendFormat& format, diff --git a/src/gpu/ganesh/mtl/GrMtlGpu.h b/src/gpu/ganesh/mtl/GrMtlGpu.h index 375a0aa72f05..3d434005246a 100644 --- a/src/gpu/ganesh/mtl/GrMtlGpu.h +++ b/src/gpu/ganesh/mtl/GrMtlGpu.h @@ -96,11 +96,11 @@ class GrMtlGpu : public GrGpu { void submit(GrOpsRenderPass* renderPass) override; - GrFence SK_WARN_UNUSED_RESULT insertFence() override; + [[nodiscard]] GrFence insertFence() override; bool waitFence(GrFence) override; void deleteFence(GrFence) override; - std::unique_ptr SK_WARN_UNUSED_RESULT makeSemaphore(bool isOwned) override; + [[nodiscard]] std::unique_ptr makeSemaphore(bool isOwned) override; std::unique_ptr wrapBackendSemaphore(const GrBackendSemaphore&, GrSemaphoreWrapType, GrWrapOwnership) override; diff --git a/src/gpu/ganesh/mtl/GrMtlGpu.mm b/src/gpu/ganesh/mtl/GrMtlGpu.mm index f07624f694d1..a0715c9f5cb5 100644 --- a/src/gpu/ganesh/mtl/GrMtlGpu.mm +++ b/src/gpu/ganesh/mtl/GrMtlGpu.mm @@ -1582,7 +1582,7 @@ void copy_src_data(char* dst, return true; } -GrFence SK_WARN_UNUSED_RESULT GrMtlGpu::insertFence() { +[[nodiscard]] GrFence GrMtlGpu::insertFence() { GrMtlCommandBuffer* cmdBuffer = this->commandBuffer(); // We create a semaphore and signal it within the current // command buffer's completion handler. @@ -1610,7 +1610,7 @@ void copy_src_data(char* dst, CFRelease(cfFence); } -std::unique_ptr SK_WARN_UNUSED_RESULT GrMtlGpu::makeSemaphore(bool /*isOwned*/) { +[[nodiscard]] std::unique_ptr GrMtlGpu::makeSemaphore(bool /*isOwned*/) { SkASSERT(this->caps()->semaphoreSupport()); return GrMtlSemaphore::Make(this); } diff --git a/src/gpu/ganesh/ops/AtlasRenderTask.h b/src/gpu/ganesh/ops/AtlasRenderTask.h index 8a21ca19dea4..476f06bfa188 100644 --- a/src/gpu/ganesh/ops/AtlasRenderTask.h +++ b/src/gpu/ganesh/ops/AtlasRenderTask.h @@ -42,8 +42,8 @@ class AtlasRenderTask final : public OpsTask { // Must be called at flush time. The texture proxy is instantiated with 'backingTexture', if // provided. See GrDynamicAtlas. - bool SK_WARN_UNUSED_RESULT instantiate(GrOnFlushResourceProvider* onFlushRP, - sk_sp backingTexture = nullptr) { + [[nodiscard]] bool instantiate(GrOnFlushResourceProvider* onFlushRP, + sk_sp backingTexture = nullptr) { SkASSERT(this->isClosed()); return fDynamicAtlas->instantiate(onFlushRP, std::move(backingTexture)); } diff --git a/src/gpu/ganesh/ops/AtlasTextOp.cpp b/src/gpu/ganesh/ops/AtlasTextOp.cpp index 6cf037b93499..133bbd0d8e5e 100644 --- a/src/gpu/ganesh/ops/AtlasTextOp.cpp +++ b/src/gpu/ganesh/ops/AtlasTextOp.cpp @@ -519,13 +519,13 @@ GrGeometryProcessor* AtlasTextOp::setupDfProcessor(SkArenaAlloc* arena, GrOp::Owner AtlasTextOp::CreateOpTestingOnly(skgpu::ganesh::SurfaceDrawContext* sdc, const SkPaint& skPaint, const SkFont& font, - const SkMatrixProvider& mtxProvider, + const SkMatrix& ctm, const char* text, int x, int y) { size_t textLen = (int)strlen(text); - SkMatrix drawMatrix(mtxProvider.localToDevice()); + SkMatrix drawMatrix = ctm; drawMatrix.preTranslate(x, y); auto drawOrigin = SkPoint::Make(x, y); sktext::GlyphRunBuilder builder; @@ -552,7 +552,7 @@ GrOp::Owner AtlasTextOp::CreateOpTestingOnly(skgpu::ganesh::SurfaceDrawContext* GrOp::Owner op; std::tie(std::ignore, op) = subRun->makeAtlasTextOp( - nullptr, mtxProvider, glyphRunList.origin(), skPaint, blob, sdc); + nullptr, ctm, glyphRunList.origin(), skPaint, blob, sdc); return op; } #endif @@ -561,7 +561,7 @@ GrOp::Owner AtlasTextOp::CreateOpTestingOnly(skgpu::ganesh::SurfaceDrawContext* #if GR_TEST_UTILS GR_DRAW_OP_TEST_DEFINE(AtlasTextOp) { - SkMatrixProvider matrixProvider(GrTest::TestMatrixInvertible(random)); + SkMatrix ctm = GrTest::TestMatrixInvertible(random); SkPaint skPaint; skPaint.setColor(random->nextU()); @@ -583,7 +583,7 @@ GR_DRAW_OP_TEST_DEFINE(AtlasTextOp) { int xInt = (random->nextU() % kMaxTrans) * xPos; int yInt = (random->nextU() % kMaxTrans) * yPos; - return skgpu::ganesh::AtlasTextOp::CreateOpTestingOnly(sdc, skPaint, font, matrixProvider, + return skgpu::ganesh::AtlasTextOp::CreateOpTestingOnly(sdc, skPaint, font, ctm, text, xInt, yInt); } #endif diff --git a/src/gpu/ganesh/ops/AtlasTextOp.h b/src/gpu/ganesh/ops/AtlasTextOp.h index e54cc31e7929..e8b46991746f 100644 --- a/src/gpu/ganesh/ops/AtlasTextOp.h +++ b/src/gpu/ganesh/ops/AtlasTextOp.h @@ -108,7 +108,7 @@ class AtlasTextOp final : public GrMeshDrawOp { static GrOp::Owner CreateOpTestingOnly(skgpu::ganesh::SurfaceDrawContext*, const SkPaint&, const SkFont&, - const SkMatrixProvider&, + const SkMatrix&, const char* text, int x, int y); diff --git a/src/gpu/ganesh/ops/DashOp.cpp b/src/gpu/ganesh/ops/DashOp.cpp index 15ff5887e67e..e0e380c8bd3e 100644 --- a/src/gpu/ganesh/ops/DashOp.cpp +++ b/src/gpu/ganesh/ops/DashOp.cpp @@ -759,9 +759,6 @@ class DashingCircleEffect::Impl : public ProgramImpl { SkMatrix fLocalMatrix = SkMatrix::InvalidMatrix(); SkPMColor4f fColor = SK_PMColor4fILLEGAL; - float fPrevRadius = SK_FloatNaN; - float fPrevCenterX = SK_FloatNaN; - float fPrevIntervalLength = SK_FloatNaN; UniformHandle fParamUniform; UniformHandle fColorUniform; diff --git a/src/gpu/ganesh/ops/DrawMeshOp.cpp b/src/gpu/ganesh/ops/DrawMeshOp.cpp index b2db7d873a2b..73af48cb5219 100644 --- a/src/gpu/ganesh/ops/DrawMeshOp.cpp +++ b/src/gpu/ganesh/ops/DrawMeshOp.cpp @@ -16,6 +16,7 @@ #include "src/gpu/BufferWriter.h" #include "src/gpu/KeyBuilder.h" #include "src/gpu/ganesh/GrGeometryProcessor.h" +#include "src/gpu/ganesh/GrMeshBuffers.h" #include "src/gpu/ganesh/GrOpFlushState.h" #include "src/gpu/ganesh/GrProgramInfo.h" #include "src/gpu/ganesh/glsl/GrGLSLColorSpaceXformHelper.h" @@ -39,6 +40,19 @@ GrPrimitiveType primitive_type(SkMesh::Mode mode) { SkUNREACHABLE; } +using MeshAttributeType = SkMeshSpecification::Attribute::Type; + +GrVertexAttribType attrib_type(MeshAttributeType type) { + switch (type) { + case MeshAttributeType::kFloat: return kFloat_GrVertexAttribType; + case MeshAttributeType::kFloat2: return kFloat2_GrVertexAttribType; + case MeshAttributeType::kFloat3: return kFloat3_GrVertexAttribType; + case MeshAttributeType::kFloat4: return kFloat4_GrVertexAttribType; + case MeshAttributeType::kUByte4_unorm: return kUByte4_norm_GrVertexAttribType; + } + SkUNREACHABLE; +} + class MeshGP : public GrGeometryProcessor { public: static GrGeometryProcessor* Make(SkArenaAlloc* arena, @@ -425,11 +439,10 @@ class MeshGP : public GrGeometryProcessor { , fNeedsLocalCoords(needsLocalCoords) { fColor = color.value_or(SK_PMColor4fILLEGAL); for (const auto& srcAttr : fSpec->attributes()) { - fAttributes.emplace_back( - srcAttr.name.c_str(), - SkMeshSpecificationPriv::AttrTypeAsVertexAttribType(srcAttr.type), - SkMeshSpecificationPriv::AttrTypeAsSLType(srcAttr.type), - srcAttr.offset); + fAttributes.emplace_back(srcAttr.name.c_str(), + attrib_type(srcAttr.type), + SkMeshSpecificationPriv::AttrTypeAsSLType(srcAttr.type), + srcAttr.offset); } this->setVertexAttributes(fAttributes.data(), fAttributes.size(), fSpec->stride()); } @@ -457,7 +470,7 @@ class MeshOp final : public GrMeshDrawOp { const SkMesh&, GrAAType, sk_sp, - const SkMatrixProvider&); + const SkMatrix&); MeshOp(GrProcessorSet*, const SkPMColor4f&, @@ -465,7 +478,7 @@ class MeshOp final : public GrMeshDrawOp { const GrPrimitiveType*, GrAAType, sk_sp, - const SkMatrixProvider&); + const SkMatrix&); const char* name() const override { return "MeshOp"; } @@ -532,14 +545,31 @@ class MeshOp final : public GrMeshDrawOp { if (this->isFromVertices()) { return {}; } - return {fMeshData.vb->asGpuBuffer(), fMeshData.voffset}; + SkASSERT(fMeshData.vb); + if (!fMeshData.vb->isGaneshBacked()) { + // This is a signal to upload the vertices which weren't already uploaded + // to the GPU (e.g. SkPicture containing a mesh). + return {nullptr, 0}; + } + if (auto buf = static_cast(fMeshData.vb.get())) { + return {buf->asGpuBuffer(), fMeshData.voffset}; + } + return {}; } std::tuple, size_t> gpuIB() const { if (this->isFromVertices() || !fMeshData.ib) { return {}; } - return {fMeshData.ib->asGpuBuffer(), fMeshData.ioffset}; + if (!fMeshData.ib->isGaneshBacked()) { + // This is a signal to upload the indices which weren't already uploaded + // to the GPU (e.g. SkPicture containing a mesh). + return {nullptr, 0}; + } + if (auto buf = static_cast(fMeshData.ib.get())) { + return {buf->asGpuBuffer(), fMeshData.ioffset}; + } + return {}; } void writeVertices(skgpu::VertexWriter& writer, @@ -617,6 +647,7 @@ class MeshOp final : public GrMeshDrawOp { MeshOp::Mesh::Mesh(const SkMesh& mesh) { new (&fMeshData) MeshData(); + SkASSERT(mesh.vertexBuffer()); fMeshData.vb = sk_ref_sp(static_cast(mesh.vertexBuffer())); if (mesh.indexBuffer()) { fMeshData.ib = sk_ref_sp(static_cast(mesh.indexBuffer())); @@ -699,13 +730,13 @@ MeshOp::MeshOp(GrProcessorSet* processorSet, const SkMesh& mesh, GrAAType aaType, sk_sp colorSpaceXform, - const SkMatrixProvider& matrixProvider) + const SkMatrix& viewMatrix) : INHERITED(ClassID()) , fHelper(processorSet, aaType) , fPrimitiveType(primitive_type(mesh.mode())) , fColorSpaceXform(std::move(colorSpaceXform)) , fColor(color) - , fViewMatrix(matrixProvider.localToDevice()) { + , fViewMatrix(viewMatrix) { fMeshes.emplace_back(mesh); fSpecification = mesh.refSpec(); @@ -776,12 +807,12 @@ MeshOp::MeshOp(GrProcessorSet* processorSet, const GrPrimitiveType* overridePrimitiveType, GrAAType aaType, sk_sp colorSpaceXform, - const SkMatrixProvider& matrixProvider) + const SkMatrix& viewMatrix) : INHERITED(ClassID()) , fHelper(processorSet, aaType) , fColorSpaceXform(std::move(colorSpaceXform)) , fColor(color) - , fViewMatrix(matrixProvider.localToDevice()) { + , fViewMatrix(viewMatrix) { int attrs = (vertices->priv().hasColors() ? 0b01 : 0b00) | (vertices->priv().hasTexCoords() ? 0b10 : 0b00); switch (attrs) { @@ -1056,7 +1087,7 @@ namespace skgpu::ganesh::DrawMeshOp { GrOp::Owner Make(GrRecordingContext* context, GrPaint&& paint, const SkMesh& mesh, - const SkMatrixProvider& matrixProvider, + const SkMatrix& viewMatrix, GrAAType aaType, sk_sp colorSpaceXform) { return GrSimpleMeshDrawOpHelper::FactoryHelper(context, @@ -1064,14 +1095,14 @@ GrOp::Owner Make(GrRecordingContext* context, mesh, aaType, std::move(colorSpaceXform), - matrixProvider); + viewMatrix); } GrOp::Owner Make(GrRecordingContext* context, GrPaint&& paint, sk_sp vertices, const GrPrimitiveType* overridePrimitiveType, - const SkMatrixProvider& matrixProvider, + const SkMatrix& viewMatrix, GrAAType aaType, sk_sp colorSpaceXform) { return GrSimpleMeshDrawOpHelper::FactoryHelper(context, @@ -1080,7 +1111,7 @@ GrOp::Owner Make(GrRecordingContext* context, overridePrimitiveType, aaType, std::move(colorSpaceXform), - matrixProvider); + viewMatrix); } } // namespace skgpu::ganesh::DrawMeshOp diff --git a/src/gpu/ganesh/ops/DrawMeshOp.h b/src/gpu/ganesh/ops/DrawMeshOp.h index 9c14f41b631a..88a6f125acb4 100644 --- a/src/gpu/ganesh/ops/DrawMeshOp.h +++ b/src/gpu/ganesh/ops/DrawMeshOp.h @@ -16,14 +16,14 @@ class GrColorSpaceXform; class GrPaint; class GrRecordingContext; +class SkMatrix; class SkMesh; -class SkMatrixProvider; namespace skgpu::ganesh::DrawMeshOp { GrOp::Owner Make(GrRecordingContext*, GrPaint&&, const SkMesh&, - const SkMatrixProvider&, + const SkMatrix&, GrAAType, sk_sp); @@ -31,7 +31,7 @@ GrOp::Owner Make(GrRecordingContext*, GrPaint&&, sk_sp, const GrPrimitiveType* overridePrimitiveType, - const SkMatrixProvider&, + const SkMatrix&, GrAAType, sk_sp); } // namespace skgpu::ganesh::DrawMeshOp diff --git a/src/gpu/ganesh/ops/SmallPathRenderer.cpp b/src/gpu/ganesh/ops/SmallPathRenderer.cpp index 4036b044e48a..e2761dcd89e6 100644 --- a/src/gpu/ganesh/ops/SmallPathRenderer.cpp +++ b/src/gpu/ganesh/ops/SmallPathRenderer.cpp @@ -416,8 +416,7 @@ class SmallPathOp final : public GrMeshDrawOp { SkRasterClip rasterClip; rasterClip.setRect(devPathBounds); draw.fRC = &rasterClip; - SkMatrixProvider matrixProvider(drawMatrix); - draw.fMatrixProvider = &matrixProvider; + draw.fCTM = &drawMatrix; draw.fDst = dst; draw.drawPathCoverage(path, paint); @@ -494,10 +493,9 @@ class SmallPathOp final : public GrMeshDrawOp { SkRasterClip rasterClip; rasterClip.setRect(devPathBounds); - draw.fRC = &rasterClip; drawMatrix.postTranslate(translateX, translateY); - SkMatrixProvider matrixProvider(drawMatrix); - draw.fMatrixProvider = &matrixProvider; + draw.fRC = &rasterClip; + draw.fCTM = &drawMatrix; draw.fDst = dst; draw.drawPathCoverage(path, paint); diff --git a/src/gpu/ganesh/surface/SkSurface_AndroidFactories.cpp b/src/gpu/ganesh/surface/SkSurface_AndroidFactories.cpp index d1af3ed93ee7..b2a401e8eb15 100644 --- a/src/gpu/ganesh/surface/SkSurface_AndroidFactories.cpp +++ b/src/gpu/ganesh/surface/SkSurface_AndroidFactories.cpp @@ -35,7 +35,7 @@ #include "src/gpu/SkBackingFit.h" #include "src/gpu/SkRenderEngineAbortf.h" #include "src/gpu/ganesh/Device.h" -#include "src/gpu/ganesh/GrAHardwareBufferUtils_impl.h" +#include "include/android/GrAHardwareBufferUtils.h" #include "src/gpu/ganesh/GrCaps.h" #include "src/gpu/ganesh/GrContextThreadSafeProxyPriv.h" #include "src/gpu/ganesh/GrDirectContextPriv.h" @@ -114,6 +114,7 @@ sk_sp WrapAndroidHardwareBuffer(GrDirectContext* dContext, SkColorType colorType = GrAHardwareBufferUtils::GetSkColorTypeFromBufferFormat(bufferDesc.format); + // Will call deleteImageProc if SkSurface creation fails. sk_sp surface = SkSurfaces::WrapBackendTexture(dContext, backendTexture, origin, @@ -124,11 +125,6 @@ sk_sp WrapAndroidHardwareBuffer(GrDirectContext* dContext, deleteImageProc, deleteImageCtx); - if (!surface) { - SkASSERT(deleteImageProc); - deleteImageProc(deleteImageCtx); - } - return surface; } else { return nullptr; diff --git a/src/gpu/ganesh/surface/SkSurface_Ganesh.cpp b/src/gpu/ganesh/surface/SkSurface_Ganesh.cpp index 64492cfb05b3..567e8ff9799d 100644 --- a/src/gpu/ganesh/surface/SkSurface_Ganesh.cpp +++ b/src/gpu/ganesh/surface/SkSurface_Ganesh.cpp @@ -194,6 +194,7 @@ void SkSurface_Ganesh::onAsyncRescaleAndReadPixels(const SkImageInfo& info, } void SkSurface_Ganesh::onAsyncRescaleAndReadPixelsYUV420(SkYUVColorSpace yuvColorSpace, + bool readAlpha, sk_sp dstColorSpace, SkIRect srcRect, SkISize dstSize, @@ -202,6 +203,7 @@ void SkSurface_Ganesh::onAsyncRescaleAndReadPixelsYUV420(SkYUVColorSpace yuvColo ReadPixelsCallback callback, ReadPixelsContext context) { fDevice->asyncRescaleAndReadPixelsYUV420(yuvColorSpace, + readAlpha, std::move(dstColorSpace), srcRect, dstSize, @@ -775,7 +777,7 @@ GrSemaphoresSubmitted Flush(sk_sp surface) { return GrSemaphoresSubmitted::kNo; } if (auto rContext = surface->recordingContext(); rContext != nullptr) { - return rContext->asDirectContext()->flush(surface, {}); + return rContext->asDirectContext()->flush(surface.get(), {}); } return GrSemaphoresSubmitted::kNo; } @@ -785,7 +787,7 @@ void FlushAndSubmit(SkSurface* surface) { return; } if (auto rContext = surface->recordingContext(); rContext != nullptr) { - rContext->asDirectContext()->flushAndSubmit(surface); + rContext->asDirectContext()->flushAndSubmit(surface, false); } } @@ -794,7 +796,7 @@ void FlushAndSubmit(sk_sp surface) { return; } if (auto rContext = surface->recordingContext(); rContext != nullptr) { - rContext->asDirectContext()->flushAndSubmit(surface); + rContext->asDirectContext()->flushAndSubmit(surface.get(), false); } } diff --git a/src/gpu/ganesh/surface/SkSurface_Ganesh.h b/src/gpu/ganesh/surface/SkSurface_Ganesh.h index f2d88348d050..a4617b0bff3f 100644 --- a/src/gpu/ganesh/surface/SkSurface_Ganesh.h +++ b/src/gpu/ganesh/surface/SkSurface_Ganesh.h @@ -66,6 +66,7 @@ class SkSurface_Ganesh : public SkSurface_Base { ReadPixelsCallback callback, ReadPixelsContext context) override; void onAsyncRescaleAndReadPixelsYUV420(SkYUVColorSpace yuvColorSpace, + bool readAlpha, sk_sp dstColorSpace, SkIRect srcRect, SkISize dstSize, diff --git a/src/gpu/ganesh/vk/AHardwareBufferVk.cpp b/src/gpu/ganesh/vk/AHardwareBufferVk.cpp new file mode 100644 index 000000000000..728a14d8fb0a --- /dev/null +++ b/src/gpu/ganesh/vk/AHardwareBufferVk.cpp @@ -0,0 +1,397 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "include/android/GrAHardwareBufferUtils.h" + +#if defined(SK_BUILD_FOR_ANDROID) && __ANDROID_API__ >= 26 + +#include "include/gpu/GrBackendSurface.h" +#include "include/gpu/GrDirectContext.h" +#include "include/private/gpu/vk/SkiaVulkan.h" +#include "src/gpu/ganesh/GrDirectContextPriv.h" +#include "src/gpu/ganesh/vk/GrVkCaps.h" +#include "src/gpu/ganesh/vk/GrVkGpu.h" + +#include + +#define VK_CALL(X) gpu->vkInterface()->fFunctions.f##X + +namespace GrAHardwareBufferUtils { + +GrBackendFormat GetVulkanBackendFormat(GrDirectContext* dContext, AHardwareBuffer* hardwareBuffer, + uint32_t bufferFormat, bool requireKnownFormat) { + GrBackendApi backend = dContext->backend(); + + if (backend != GrBackendApi::kVulkan) { + return GrBackendFormat(); + } + switch (bufferFormat) { + case AHARDWAREBUFFER_FORMAT_R8G8B8A8_UNORM: + return GrBackendFormat::MakeVk(VK_FORMAT_R8G8B8A8_UNORM); + case AHARDWAREBUFFER_FORMAT_R16G16B16A16_FLOAT: + return GrBackendFormat::MakeVk(VK_FORMAT_R16G16B16A16_SFLOAT); + case AHARDWAREBUFFER_FORMAT_R5G6B5_UNORM: + return GrBackendFormat::MakeVk(VK_FORMAT_R5G6B5_UNORM_PACK16); + case AHARDWAREBUFFER_FORMAT_R10G10B10A2_UNORM: + return GrBackendFormat::MakeVk(VK_FORMAT_A2B10G10R10_UNORM_PACK32); + case AHARDWAREBUFFER_FORMAT_R8G8B8X8_UNORM: + return GrBackendFormat::MakeVk(VK_FORMAT_R8G8B8A8_UNORM); + case AHARDWAREBUFFER_FORMAT_R8G8B8_UNORM: + return GrBackendFormat::MakeVk(VK_FORMAT_R8G8B8_UNORM); +#if __ANDROID_API__ >= 33 + case AHARDWAREBUFFER_FORMAT_R8_UNORM: + return GrBackendFormat::MakeVk(VK_FORMAT_R8_UNORM); +#endif + default: { + if (requireKnownFormat) { + return GrBackendFormat(); + } else { + GrVkGpu* gpu = static_cast(dContext->priv().getGpu()); + SkASSERT(gpu); + VkDevice device = gpu->device(); + + if (!gpu->vkCaps().supportsAndroidHWBExternalMemory()) { + return GrBackendFormat(); + } + VkAndroidHardwareBufferFormatPropertiesANDROID hwbFormatProps; + hwbFormatProps.sType = + VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID; + hwbFormatProps.pNext = nullptr; + + VkAndroidHardwareBufferPropertiesANDROID hwbProps; + hwbProps.sType = VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID; + hwbProps.pNext = &hwbFormatProps; + + VkResult err = VK_CALL(GetAndroidHardwareBufferProperties(device, + hardwareBuffer, + &hwbProps)); + if (VK_SUCCESS != err) { + return GrBackendFormat(); + } + + if (hwbFormatProps.format != VK_FORMAT_UNDEFINED) { + return GrBackendFormat(); + } + + GrVkYcbcrConversionInfo ycbcrConversion; + ycbcrConversion.fYcbcrModel = hwbFormatProps.suggestedYcbcrModel; + ycbcrConversion.fYcbcrRange = hwbFormatProps.suggestedYcbcrRange; + ycbcrConversion.fXChromaOffset = hwbFormatProps.suggestedXChromaOffset; + ycbcrConversion.fYChromaOffset = hwbFormatProps.suggestedYChromaOffset; + ycbcrConversion.fForceExplicitReconstruction = VK_FALSE; + ycbcrConversion.fExternalFormat = hwbFormatProps.externalFormat; + ycbcrConversion.fFormatFeatures = hwbFormatProps.formatFeatures; + if (VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT & + hwbFormatProps.formatFeatures) { + ycbcrConversion.fChromaFilter = VK_FILTER_LINEAR; + } else { + ycbcrConversion.fChromaFilter = VK_FILTER_NEAREST; + } + + return GrBackendFormat::MakeVk(ycbcrConversion); + } + } + } +} + +class VulkanCleanupHelper { +public: + VulkanCleanupHelper(GrVkGpu* gpu, VkImage image, VkDeviceMemory memory) + : fDevice(gpu->device()) + , fImage(image) + , fMemory(memory) + , fDestroyImage(gpu->vkInterface()->fFunctions.fDestroyImage) + , fFreeMemory(gpu->vkInterface()->fFunctions.fFreeMemory) {} + ~VulkanCleanupHelper() { + fDestroyImage(fDevice, fImage, nullptr); + fFreeMemory(fDevice, fMemory, nullptr); + } +private: + VkDevice fDevice; + VkImage fImage; + VkDeviceMemory fMemory; + PFN_vkDestroyImage fDestroyImage; + PFN_vkFreeMemory fFreeMemory; +}; + +void delete_vk_image(void* context) { + VulkanCleanupHelper* cleanupHelper = static_cast(context); + delete cleanupHelper; +} + +void update_vk_image(void* context, GrDirectContext* dContext) { + // no op +} + +static GrBackendTexture make_vk_backend_texture( + GrDirectContext* dContext, AHardwareBuffer* hardwareBuffer, + int width, int height, + DeleteImageProc* deleteProc, + UpdateImageProc* updateProc, + TexImageCtx* imageCtx, + bool isProtectedContent, + const GrBackendFormat& backendFormat, + bool isRenderable, + bool fromAndroidWindow) { + SkASSERT(dContext->backend() == GrBackendApi::kVulkan); + GrVkGpu* gpu = static_cast(dContext->priv().getGpu()); + + SkASSERT(!isProtectedContent || gpu->protectedContext()); + + VkPhysicalDevice physicalDevice = gpu->physicalDevice(); + VkDevice device = gpu->device(); + + SkASSERT(gpu); + + if (!gpu->vkCaps().supportsAndroidHWBExternalMemory()) { + return GrBackendTexture(); + } + + VkFormat format; + if (!backendFormat.asVkFormat(&format)) { + SkDebugf("asVkFormat failed (valid: %d, backend: %u)", + backendFormat.isValid(), + (unsigned)backendFormat.backend()); + return GrBackendTexture(); + } + + VkResult err; + + VkAndroidHardwareBufferFormatPropertiesANDROID hwbFormatProps; + hwbFormatProps.sType = VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID; + hwbFormatProps.pNext = nullptr; + + VkAndroidHardwareBufferPropertiesANDROID hwbProps; + hwbProps.sType = VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID; + hwbProps.pNext = &hwbFormatProps; + + err = VK_CALL(GetAndroidHardwareBufferProperties(device, hardwareBuffer, &hwbProps)); + if (VK_SUCCESS != err) { + return GrBackendTexture(); + } + + if (hwbFormatProps.format != format) { + SkDebugf("Queried format not consistent with expected format; got: %d, expected: %d", + hwbFormatProps.format, + format); + return GrBackendTexture(); + } + + VkExternalFormatANDROID externalFormat; + externalFormat.sType = VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID; + externalFormat.pNext = nullptr; + externalFormat.externalFormat = 0; // If this is zero it is as if we aren't using this struct. + + const GrVkYcbcrConversionInfo* ycbcrConversion = backendFormat.getVkYcbcrConversionInfo(); + if (!ycbcrConversion) { + return GrBackendTexture(); + } + + if (hwbFormatProps.format != VK_FORMAT_UNDEFINED) { + // TODO: We should not assume the transfer features here and instead should have a way for + // Ganesh's tracking of intenral images to report whether or not they support transfers. + SkASSERT(SkToBool(VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT & hwbFormatProps.formatFeatures) && + SkToBool(VK_FORMAT_FEATURE_TRANSFER_SRC_BIT & hwbFormatProps.formatFeatures) && + SkToBool(VK_FORMAT_FEATURE_TRANSFER_DST_BIT & hwbFormatProps.formatFeatures)); + SkASSERT(!ycbcrConversion->isValid()); + } else { + SkASSERT(ycbcrConversion->isValid()); + // We have an external only format + SkASSERT(SkToBool(VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT & hwbFormatProps.formatFeatures)); + SkASSERT(format == VK_FORMAT_UNDEFINED); + SkASSERT(hwbFormatProps.externalFormat == ycbcrConversion->fExternalFormat); + externalFormat.externalFormat = hwbFormatProps.externalFormat; + } + + const VkExternalMemoryImageCreateInfo externalMemoryImageInfo{ + VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO, // sType + &externalFormat, // pNext + VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID, // handleTypes + }; + VkImageUsageFlags usageFlags = VK_IMAGE_USAGE_SAMPLED_BIT; + if (format != VK_FORMAT_UNDEFINED) { + usageFlags = usageFlags | + VK_IMAGE_USAGE_TRANSFER_SRC_BIT | + VK_IMAGE_USAGE_TRANSFER_DST_BIT; + if (isRenderable) { + usageFlags = usageFlags | VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT; + } + } + + // TODO: Check the supported tilings vkGetPhysicalDeviceImageFormatProperties2 to see if we have + // to use linear. Add better linear support throughout Ganesh. + VkImageTiling tiling = VK_IMAGE_TILING_OPTIMAL; + + VkImageCreateFlags flags = isProtectedContent ? VK_IMAGE_CREATE_PROTECTED_BIT : 0; + + const VkImageCreateInfo imageCreateInfo = { + VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, // sType + &externalMemoryImageInfo, // pNext + flags, // VkImageCreateFlags + VK_IMAGE_TYPE_2D, // VkImageType + format, // VkFormat + { (uint32_t)width, (uint32_t)height, 1 }, // VkExtent3D + 1, // mipLevels + 1, // arrayLayers + VK_SAMPLE_COUNT_1_BIT, // samples + tiling, // VkImageTiling + usageFlags, // VkImageUsageFlags + VK_SHARING_MODE_EXCLUSIVE, // VkSharingMode + 0, // queueFamilyCount + nullptr, // pQueueFamilyIndices + VK_IMAGE_LAYOUT_UNDEFINED, // initialLayout + }; + + VkImage image; + err = VK_CALL(CreateImage(device, &imageCreateInfo, nullptr, &image)); + if (VK_SUCCESS != err) { + return GrBackendTexture(); + } + + VkPhysicalDeviceMemoryProperties2 phyDevMemProps; + phyDevMemProps.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2; + phyDevMemProps.pNext = nullptr; + + uint32_t typeIndex = 0; + bool foundHeap = false; + VK_CALL(GetPhysicalDeviceMemoryProperties2(physicalDevice, &phyDevMemProps)); + uint32_t memTypeCnt = phyDevMemProps.memoryProperties.memoryTypeCount; + for (uint32_t i = 0; i < memTypeCnt && !foundHeap; ++i) { + if (hwbProps.memoryTypeBits & (1 << i)) { + const VkPhysicalDeviceMemoryProperties& pdmp = phyDevMemProps.memoryProperties; + uint32_t supportedFlags = pdmp.memoryTypes[i].propertyFlags & + VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT; + if (supportedFlags == VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT) { + typeIndex = i; + foundHeap = true; + } + } + } + + // Fallback to use any available memory type for AHB + // + // For external memory import, compatible memory types are decided by the Vulkan driver since + // the memory has been allocated externally. There are usually special requirements against + // external memory. e.g. AHB allocated with CPU R/W often usage bits is only importable for + // non-device-local heap on some AMD systems. + if (!foundHeap && hwbProps.memoryTypeBits) { + typeIndex = ffs(hwbProps.memoryTypeBits) - 1; + foundHeap = true; + } + + if (!foundHeap) { + VK_CALL(DestroyImage(device, image, nullptr)); + return GrBackendTexture(); + } + + VkImportAndroidHardwareBufferInfoANDROID hwbImportInfo; + hwbImportInfo.sType = VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID; + hwbImportInfo.pNext = nullptr; + hwbImportInfo.buffer = hardwareBuffer; + + VkMemoryDedicatedAllocateInfo dedicatedAllocInfo; + dedicatedAllocInfo.sType = VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO; + dedicatedAllocInfo.pNext = &hwbImportInfo; + dedicatedAllocInfo.image = image; + dedicatedAllocInfo.buffer = VK_NULL_HANDLE; + + VkMemoryAllocateInfo allocInfo = { + VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, // sType + &dedicatedAllocInfo, // pNext + hwbProps.allocationSize, // allocationSize + typeIndex, // memoryTypeIndex + }; + + VkDeviceMemory memory; + + err = VK_CALL(AllocateMemory(device, &allocInfo, nullptr, &memory)); + if (VK_SUCCESS != err) { + VK_CALL(DestroyImage(device, image, nullptr)); + return GrBackendTexture(); + } + + VkBindImageMemoryInfo bindImageInfo; + bindImageInfo.sType = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO; + bindImageInfo.pNext = nullptr; + bindImageInfo.image = image; + bindImageInfo.memory = memory; + bindImageInfo.memoryOffset = 0; + + err = VK_CALL(BindImageMemory2(device, 1, &bindImageInfo)); + if (VK_SUCCESS != err) { + VK_CALL(DestroyImage(device, image, nullptr)); + VK_CALL(FreeMemory(device, memory, nullptr)); + return GrBackendTexture(); + } + + skgpu::VulkanAlloc alloc; + alloc.fMemory = memory; + alloc.fOffset = 0; + alloc.fSize = hwbProps.allocationSize; + alloc.fFlags = 0; + + GrVkImageInfo imageInfo; + imageInfo.fImage = image; + imageInfo.fAlloc = alloc; + imageInfo.fImageTiling = tiling; + imageInfo.fImageLayout = VK_IMAGE_LAYOUT_UNDEFINED; + imageInfo.fFormat = format; + imageInfo.fLevelCount = 1; + // TODO: This should possibly be VK_QUEUE_FAMILY_FOREIGN_EXT but current Adreno devices do not + // support that extension. Or if we know the source of the AHardwareBuffer is not from a + // "foreign" device we can leave them as external. + imageInfo.fCurrentQueueFamily = VK_QUEUE_FAMILY_EXTERNAL; + imageInfo.fProtected = isProtectedContent ? GrProtected::kYes : GrProtected::kNo; + imageInfo.fYcbcrConversionInfo = *ycbcrConversion; + imageInfo.fSharingMode = imageCreateInfo.sharingMode; +#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK + imageInfo.fPartOfSwapchainOrAndroidWindow = fromAndroidWindow; +#endif + + *deleteProc = delete_vk_image; + *updateProc = update_vk_image; + *imageCtx = new VulkanCleanupHelper(gpu, image, memory); + + return GrBackendTexture(width, height, imageInfo); +} + +static bool can_import_protected_content(GrDirectContext* dContext) { + SkASSERT(GrBackendApi::kVulkan == dContext->backend()); + return static_cast(dContext->priv().getGpu())->protectedContext(); +} + +GrBackendTexture MakeVulkanBackendTexture(GrDirectContext* dContext, + AHardwareBuffer* hardwareBuffer, + int width, int height, + DeleteImageProc* deleteProc, + UpdateImageProc* updateProc, + TexImageCtx* imageCtx, + bool isProtectedContent, + const GrBackendFormat& backendFormat, + bool isRenderable, + bool fromAndroidWindow) { + SkASSERT(dContext); + if (!dContext || dContext->abandoned()) { + return GrBackendTexture(); + } + + if (GrBackendApi::kVulkan != dContext->backend()) { + return GrBackendTexture(); + } + + if (isProtectedContent && !can_import_protected_content(dContext)) { + return GrBackendTexture(); + } + + return make_vk_backend_texture(dContext, hardwareBuffer, width, height, deleteProc, + updateProc, imageCtx, isProtectedContent, backendFormat, + isRenderable, fromAndroidWindow); +} + +} // namespace GrAHardwareBufferUtils + +#endif diff --git a/src/gpu/ganesh/vk/BUILD.bazel b/src/gpu/ganesh/vk/BUILD.bazel index bbe6718d8c09..8a3ec5cfc29c 100644 --- a/src/gpu/ganesh/vk/BUILD.bazel +++ b/src/gpu/ganesh/vk/BUILD.bazel @@ -6,6 +6,7 @@ licenses(["notice"]) exports_files_legacy() VK_FILES = [ + "AHardwareBufferVk.cpp", "GrVkBuffer.cpp", "GrVkBuffer.h", "GrVkCaps.cpp", diff --git a/src/gpu/ganesh/vk/GrVkGpu.cpp b/src/gpu/ganesh/vk/GrVkGpu.cpp index 384b8c2795d7..b5e75101c7ec 100644 --- a/src/gpu/ganesh/vk/GrVkGpu.cpp +++ b/src/gpu/ganesh/vk/GrVkGpu.cpp @@ -2679,7 +2679,7 @@ void GrVkGpu::submit(GrOpsRenderPass* renderPass) { fCachedOpsRenderPass->reset(); } -GrFence SK_WARN_UNUSED_RESULT GrVkGpu::insertFence() { +[[nodiscard]] GrFence GrVkGpu::insertFence() { VkFenceCreateInfo createInfo; memset(&createInfo, 0, sizeof(VkFenceCreateInfo)); createInfo.sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO; @@ -2714,7 +2714,7 @@ void GrVkGpu::deleteFence(GrFence fence) { VK_CALL(DestroyFence(this->device(), (VkFence)fence, nullptr)); } -std::unique_ptr SK_WARN_UNUSED_RESULT GrVkGpu::makeSemaphore(bool isOwned) { +[[nodiscard]] std::unique_ptr GrVkGpu::makeSemaphore(bool isOwned) { return GrVkSemaphore::Make(this, isOwned); } diff --git a/src/gpu/ganesh/vk/GrVkGpu.h b/src/gpu/ganesh/vk/GrVkGpu.h index 44ba5763c11b..80567447902e 100644 --- a/src/gpu/ganesh/vk/GrVkGpu.h +++ b/src/gpu/ganesh/vk/GrVkGpu.h @@ -153,11 +153,11 @@ class GrVkGpu : public GrGpu { void submit(GrOpsRenderPass*) override; - GrFence SK_WARN_UNUSED_RESULT insertFence() override; + [[nodiscard]] GrFence insertFence() override; bool waitFence(GrFence) override; void deleteFence(GrFence) override; - std::unique_ptr SK_WARN_UNUSED_RESULT makeSemaphore(bool isOwned) override; + [[nodiscard]] std::unique_ptr makeSemaphore(bool isOwned) override; std::unique_ptr wrapBackendSemaphore(const GrBackendSemaphore&, GrSemaphoreWrapType, GrWrapOwnership) override; diff --git a/src/gpu/graphite/AtlasProvider.cpp b/src/gpu/graphite/AtlasProvider.cpp new file mode 100644 index 000000000000..9734c3660672 --- /dev/null +++ b/src/gpu/graphite/AtlasProvider.cpp @@ -0,0 +1,54 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "src/gpu/graphite/AtlasProvider.h" + +#include "include/gpu/graphite/Recorder.h" +#include "src/gpu/graphite/PathAtlas.h" +#include "src/gpu/graphite/RecorderPriv.h" +#include "src/gpu/graphite/TextureProxy.h" +#include "src/gpu/graphite/text/TextAtlasManager.h" + +namespace skgpu::graphite { + +AtlasProvider::AtlasProvider(Recorder* recorder) + : fTextAtlasManager(std::make_unique(recorder)) {} + +std::unique_ptr AtlasProvider::createComputePathAtlas(Recorder* recorder) const { +#ifdef SK_ENABLE_VELLO_SHADERS + if (recorder->priv().caps()->computeSupport()) { + return std::make_unique(); + } +#endif // SK_ENABLE_VELLO_SHADERS + return nullptr; +} + +sk_sp AtlasProvider::getAtlasTexture(Recorder* recorder, + uint32_t width, + uint32_t height) { + uint64_t key = (static_cast(width) << 32) | static_cast(height); + auto iter = fTexturePool.find(key); + if (iter != fTexturePool.end()) { + return iter->second; + } + + // TODO(chromium:1856): WebGPU does not support the "storage binding" usage for the R8Unorm + // texture format. This means that we may have to use RGBA8 on Dawn until it provides an + // optional feature. + auto proxy = TextureProxy::MakeStorage(recorder->priv().caps(), + SkISize::Make(int32_t(width), int32_t(height)), + kAlpha_8_SkColorType, + skgpu::Budgeted::kYes); + if (!proxy) { + return nullptr; + } + + fTexturePool[key] = proxy; + return proxy; +} + +} // namespace skgpu::graphite diff --git a/src/gpu/graphite/AtlasProvider.h b/src/gpu/graphite/AtlasProvider.h new file mode 100644 index 000000000000..ce4a94902fa3 --- /dev/null +++ b/src/gpu/graphite/AtlasProvider.h @@ -0,0 +1,58 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef skgpu_graphite_AtlasProvider_DEFINED +#define skgpu_graphite_AtlasProvider_DEFINED + +#include "include/core/SkRefCnt.h" + +#include +#include + +namespace skgpu::graphite { + +class ComputePathAtlas; +class Recorder; +class TextAtlasManager; +class TextureProxy; + +/** + * AtlasProvider groups various texture atlas management algorithms together. + */ +class AtlasProvider final { +public: + explicit AtlasProvider(Recorder*); + ~AtlasProvider() = default; + + // Returns the TextAtlasManager that provides access to persistent DrawAtlas'es used in glyph + // rendering. This TextAtlasManager is always available. + TextAtlasManager* textAtlasManager() const { return fTextAtlasManager.get(); } + + // Creates a new transient atlas handler that uses compute shaders to rasterize coverage masks + // for path rendering. This method returns nullptr if compute shaders are not supported by the + // owning Recorder's context. + std::unique_ptr createComputePathAtlas(Recorder*) const; + + // Return an Alpha_8 TextureProxy with the given dimensions. + sk_sp getAtlasTexture(Recorder*, uint32_t width, uint32_t height); + +private: + std::unique_ptr fTextAtlasManager; + + // Allocated and cached texture proxies shared by all PathAtlas instances. It is possible for + // the same texture to be bound to multiple DispatchGroups and DrawPasses across flushes. The + // owning Recorder must guarantee that any uploads or compute dispatches are scheduled to remain + // coherent across flushes. + // TODO: This requirement might change with a more sophisticated reuse scheme for texture + // allocations. For now our model is simple: all PathAtlases target the same texture and only + // one of them will render to the texture during a given command submission. + std::unordered_map> fTexturePool; +}; + +} // namespace skgpu::graphite + +#endif // skgpu_graphite_AtlasProvider_DEFINED diff --git a/src/gpu/graphite/BackendSemaphore.cpp b/src/gpu/graphite/BackendSemaphore.cpp index da8e43af433d..e415a337a803 100644 --- a/src/gpu/graphite/BackendSemaphore.cpp +++ b/src/gpu/graphite/BackendSemaphore.cpp @@ -70,7 +70,9 @@ uint64_t BackendSemaphore::getMtlValue() const { #ifdef SK_VULKAN BackendSemaphore::BackendSemaphore(VkSemaphore semaphore) - : fVkSemaphore(semaphore) {} + : fVkSemaphore(semaphore) + , fIsValid(true) + , fBackend(BackendApi::kVulkan) {} VkSemaphore BackendSemaphore::getVkSemaphore() const { if (this->isValid() && this->backend() == BackendApi::kVulkan) { diff --git a/src/gpu/graphite/BackendTexture.cpp b/src/gpu/graphite/BackendTexture.cpp index 2af478384de5..8369a085260f 100644 --- a/src/gpu/graphite/BackendTexture.cpp +++ b/src/gpu/graphite/BackendTexture.cpp @@ -96,6 +96,10 @@ void BackendTexture::setMutableState(const skgpu::MutableTextureState& newState) fMutableState->set(newState); } +sk_sp BackendTexture::getMutableState() const { + return fMutableState; +} + #ifdef SK_DAWN BackendTexture::BackendTexture(WGPUTexture texture) : fDimensions{static_cast(wgpuTextureGetWidth(texture)), diff --git a/src/gpu/graphite/BufferManager.h b/src/gpu/graphite/BufferManager.h index 51425573945d..2498d9bf4723 100644 --- a/src/gpu/graphite/BufferManager.h +++ b/src/gpu/graphite/BufferManager.h @@ -15,6 +15,7 @@ #include "src/gpu/graphite/ResourceTypes.h" #include +#include #include namespace skgpu::graphite { diff --git a/src/gpu/graphite/BuiltInCodeSnippetID.h b/src/gpu/graphite/BuiltInCodeSnippetID.h index 815331607463..464f1dfc4d84 100644 --- a/src/gpu/graphite/BuiltInCodeSnippetID.h +++ b/src/gpu/graphite/BuiltInCodeSnippetID.h @@ -38,6 +38,7 @@ enum class BuiltInCodeSnippetID : int32_t { kLocalMatrixShader, kImageShader, + kCubicImageShader, kYUVImageShader, kCoordClampShader, kDitherShader, @@ -98,6 +99,6 @@ static constexpr int kFixedFunctionBlendModeIDOffset = static_assert(BuiltInCodeSnippetID::kLast == BuiltInCodeSnippetID::kFixedFunctionScreenBlendMode); -} // skgpu::graphite +} // namespace skgpu::graphite #endif // skgpu_graphite_BuiltInCodeSnippetID_DEFINED diff --git a/src/gpu/graphite/Caps.cpp b/src/gpu/graphite/Caps.cpp index 417448bee02f..795947e99a22 100644 --- a/src/gpu/graphite/Caps.cpp +++ b/src/gpu/graphite/Caps.cpp @@ -27,6 +27,8 @@ Caps::~Caps() {} void Caps::finishInitialization(const ContextOptions& options) { fCapabilities->initSkCaps(fShaderCaps.get()); + fDefaultMSAASamples = options.fInternalMultisampleCount; + if (options.fShaderErrorHandler) { fShaderErrorHandler = options.fShaderErrorHandler; } else { @@ -34,6 +36,7 @@ void Caps::finishInitialization(const ContextOptions& options) { } #if GRAPHITE_TEST_UTILS + fMaxTextureSize = std::min(fMaxTextureSize, options.fMaxTextureSizeOverride); fMaxTextureAtlasSize = options.fMaxTextureAtlasSize; #endif fGlyphCacheTextureMaximumBytes = options.fGlyphCacheTextureMaximumBytes; @@ -59,6 +62,43 @@ bool Caps::areColorTypeAndTextureInfoCompatible(SkColorType ct, const TextureInf return SkToBool(this->getColorTypeInfo(ct, info)); } +static inline SkColorType color_type_fallback(SkColorType ct) { + switch (ct) { + // kRGBA_8888 is our default fallback for many color types that may not have renderable + // backend formats. + case kAlpha_8_SkColorType: + case kRGB_565_SkColorType: + case kARGB_4444_SkColorType: + case kBGRA_8888_SkColorType: + case kRGBA_1010102_SkColorType: + case kBGRA_1010102_SkColorType: + case kRGBA_F16_SkColorType: + case kRGBA_F16Norm_SkColorType: + return kRGBA_8888_SkColorType; + case kA16_float_SkColorType: + return kRGBA_F16_SkColorType; + case kGray_8_SkColorType: + return kRGB_888x_SkColorType; + default: + return kUnknown_SkColorType; + } +} + +SkColorType Caps::getRenderableColorType(SkColorType ct) const { + do { + auto texInfo = this->getDefaultSampledTextureInfo(ct, + Mipmapped::kNo, + Protected::kNo, + Renderable::kYes); + // We continue to the fallback color type if there is no default renderable format + if (texInfo.isValid() && this->isRenderable(texInfo)) { + return ct; + } + ct = color_type_fallback(ct); + } while (ct != kUnknown_SkColorType); + return kUnknown_SkColorType; +} + skgpu::Swizzle Caps::getReadSwizzle(SkColorType ct, const TextureInfo& info) const { // TODO: add SkTextureCompressionType handling // (can be handled by setting up the colorTypeInfo instead?) diff --git a/src/gpu/graphite/Caps.h b/src/gpu/graphite/Caps.h index 08c218fd2677..370f031e3cc7 100644 --- a/src/gpu/graphite/Caps.h +++ b/src/gpu/graphite/Caps.h @@ -13,7 +13,7 @@ #include "include/core/SkImageInfo.h" #include "include/core/SkRefCnt.h" #include "include/private/base/SkAlign.h" -#include "src/core/SkEnumBitMask.h" +#include "src/base/SkEnumBitMask.h" #include "src/gpu/ResourceKey.h" #include "src/gpu/Swizzle.h" #include "src/gpu/graphite/ResourceTypes.h" @@ -101,9 +101,6 @@ class Caps { Shareable, GraphiteResourceKey*) const = 0; - // Returns the number of bytes for the backend format in the TextureInfo - virtual size_t bytesPerPixel(const TextureInfo&) const = 0; - const ResourceBindingRequirements& resourceBindingRequirements() const { return fResourceBindingReqs; } @@ -159,6 +156,13 @@ class Caps { const TextureInfo& srcTextureInfo, SkColorType dstColorType) const = 0; + /** + * Checks whether the passed color type is renderable. If so, the same color type is passed + * back. If not, provides an alternative (perhaps lower bit depth and/or unorm instead of float) + * color type that is supported or kUnknown if there no renderable fallback format. + */ + SkColorType getRenderableColorType(SkColorType) const; + bool clampToBorderSupport() const { return fClampToBorderSupport; } bool protectedSupport() const { return fProtectedSupport; } @@ -176,6 +180,9 @@ class Caps { // Returns whether a draw buffer can be mapped. bool drawBufferCanBeMapped() const { return fDrawBufferCanBeMapped; } + // Returns whether compute shaders are supported. + bool computeSupport() const { return fComputeSupport; } + // Returns the skgpu::Swizzle to use when sampling or reading back from a texture with the // passed in SkColorType and TextureInfo. skgpu::Swizzle getReadSwizzle(SkColorType, const TextureInfo&) const; @@ -206,9 +213,6 @@ class Caps { // the caps. void finishInitialization(const ContextOptions&); - // TODO: This value should be set by some context option. For now just making it 4. - uint32_t defaultMSAASamples() const { return 4; } - // There are only a few possible valid sample counts (1, 2, 4, 8, 16). So we can key on those 5 // options instead of the actual sample value. static inline uint32_t SamplesToKey(uint32_t numSamples) { @@ -246,6 +250,7 @@ class Caps { }; int fMaxTextureSize = 0; + int fDefaultMSAASamples = 4; size_t fRequiredUniformBufferAlignment = 0; size_t fRequiredStorageBufferAlignment = 0; size_t fRequiredTransferBufferAlignment = 0; @@ -260,6 +265,8 @@ class Caps { bool fStorageBufferPreferred = false; bool fDrawBufferCanBeMapped = true; + bool fComputeSupport = false; + ResourceBindingRequirements fResourceBindingReqs; ////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/gpu/graphite/ClipStack_graphite.cpp b/src/gpu/graphite/ClipStack_graphite.cpp index edf1ebb887c0..efa1c3b72308 100644 --- a/src/gpu/graphite/ClipStack_graphite.cpp +++ b/src/gpu/graphite/ClipStack_graphite.cpp @@ -16,6 +16,7 @@ #include "src/core/SkRectPriv.h" #include "src/gpu/graphite/Device.h" #include "src/gpu/graphite/DrawParams.h" +#include "src/gpu/graphite/Renderer.h" #include "src/gpu/graphite/geom/BoundsManager.h" #include "src/gpu/graphite/geom/Geometry.h" @@ -371,7 +372,8 @@ void ClipStack::RawElement::drawClip(Device* device) { // draw directly. SkASSERT((fOp == SkClipOp::kDifference && !fShape.inverted()) || (fOp == SkClipOp::kIntersect && fShape.inverted())); - device->drawClipShape(fLocalToDevice, fShape, Clip{drawBounds, scissor.asSkIRect()}, order); + device->drawClipShape( + fLocalToDevice, fShape, Clip{drawBounds, drawBounds, scissor.asSkIRect()}, order); } // After the clip shape is drawn, reset its state. If the clip element is being popped off the @@ -511,24 +513,22 @@ void ClipStack::RawElement::updateForElement(RawElement* added, const SaveRecord } } -std::pair -ClipStack::RawElement::updateForDraw(const BoundsManager* boundsManager, - const TransformedShape& draw, - PaintersDepth drawZ) { +ClipStack::RawElement::DrawInfluence +ClipStack::RawElement::testForDraw(const TransformedShape& draw) const { if (this->isInvalid()) { // Cannot affect the draw - return {/*clippedOut=*/false, DrawOrder::kNoIntersection}; + return DrawInfluence::kNone; } // For this analysis, A refers to the Element and B refers to the draw switch(Simplify(*this, draw)) { case SimplifyResult::kEmpty: // The more detailed per-element checks have determined the draw is clipped out. - return {/*clippedOut=*/true, DrawOrder::kNoIntersection}; + return DrawInfluence::kClipOut; case SimplifyResult::kBOnly: // This element does not affect the draw - return {/*clippedOut=*/false, DrawOrder::kNoIntersection}; + return DrawInfluence::kNone; case SimplifyResult::kAOnly: // If this were the only element, we could replace the draw's geometry but that only @@ -537,50 +537,59 @@ ClipStack::RawElement::updateForDraw(const BoundsManager* boundsManager, [[fallthrough]]; case SimplifyResult::kBoth: - if (!this->hasPendingDraw()) { - // No usage yet so we need an order that we will use when drawing to just the depth - // attachment. It is sufficient to use the next CompressedPaintersOrder after the - // most recent draw under this clip's outer bounds. It is necessary to use the - // entire clip's outer bounds because the order has to be determined before the - // final usage bounds are known and a subsequent draw could require a completely - // different portion of the clip than this triggering draw. - // - // Lazily determining the order has several benefits to computing it when the clip - // element was first created: - // - Elements that are invalidated by nested clips before draws are made do not - // waste time in the BoundsManager. - // - Elements that never actually modify a draw (e.g. a defensive clip) do not - // waste time in the BoundsManager. - // - A draw that triggers clip usage on multiple elements will more likely assign - // the same order to those elements, meaning their depth-only draws are more - // likely to batch in the final DrawPass. - // - // However, it does mean that clip elements can have the same order as each other, - // or as later draws (e.g. after the clip has been popped off the stack). Any - // overlap between clips or draws is addressed when the clip is drawn by selecting - // an appropriate DisjointStencilIndex value. Stencil-aside, this order assignment - // logic, max Z tracking, and the depth test during rasterization are able to - // resolve everything correctly even if clips have the same order value. - // See go/clip-stack-order for a detailed analysis of why this works. - fOrder = boundsManager->getMostRecentDraw(fOuterBounds).next(); - fUsageBounds = draw.fOuterBounds; - fMaxZ = drawZ; - } else { - // Earlier draws have already used this element so we cannot change where the - // depth-only draw will be sorted to, but we need to ensure we cover the new draw's - // bounds and use a Z value that will clip out its pixels as appropriate. - fUsageBounds.join(draw.fOuterBounds); - if (drawZ > fMaxZ) { - fMaxZ = drawZ; - } - } - - return {/*clippedOut=*/false, fOrder}; + return DrawInfluence::kIntersect; } SkUNREACHABLE; } +CompressedPaintersOrder ClipStack::RawElement::updateForDraw(const BoundsManager* boundsManager, + const Rect& drawBounds, + PaintersDepth drawZ) { + SkASSERT(!this->isInvalid()); + SkASSERT(!drawBounds.isEmptyNegativeOrNaN()); + + if (!this->hasPendingDraw()) { + // No usage yet so we need an order that we will use when drawing to just the depth + // attachment. It is sufficient to use the next CompressedPaintersOrder after the + // most recent draw under this clip's outer bounds. It is necessary to use the + // entire clip's outer bounds because the order has to be determined before the + // final usage bounds are known and a subsequent draw could require a completely + // different portion of the clip than this triggering draw. + // + // Lazily determining the order has several benefits to computing it when the clip + // element was first created: + // - Elements that are invalidated by nested clips before draws are made do not + // waste time in the BoundsManager. + // - Elements that never actually modify a draw (e.g. a defensive clip) do not + // waste time in the BoundsManager. + // - A draw that triggers clip usage on multiple elements will more likely assign + // the same order to those elements, meaning their depth-only draws are more + // likely to batch in the final DrawPass. + // + // However, it does mean that clip elements can have the same order as each other, + // or as later draws (e.g. after the clip has been popped off the stack). Any + // overlap between clips or draws is addressed when the clip is drawn by selecting + // an appropriate DisjointStencilIndex value. Stencil-aside, this order assignment + // logic, max Z tracking, and the depth test during rasterization are able to + // resolve everything correctly even if clips have the same order value. + // See go/clip-stack-order for a detailed analysis of why this works. + fOrder = boundsManager->getMostRecentDraw(fOuterBounds).next(); + fUsageBounds = drawBounds; + fMaxZ = drawZ; + } else { + // Earlier draws have already used this element so we cannot change where the + // depth-only draw will be sorted to, but we need to ensure we cover the new draw's + // bounds and use a Z value that will clip out its pixels as appropriate. + fUsageBounds.join(drawBounds); + if (drawZ > fMaxZ) { + fMaxZ = drawZ; + } + } + + return fOrder; +} + ClipStack::ClipState ClipStack::RawElement::clipType() const { // Map from the internal shape kind to the clip state enum switch (fShape.type()) { @@ -1075,14 +1084,13 @@ void ClipStack::clipShape(const Transform& localToDevice, } } -std::pair ClipStack::applyClipToDraw( - const BoundsManager* boundsManager, - const Transform& localToDevice, - const Geometry& geometry, - const SkStrokeRec& style, - PaintersDepth z) { - static const std::pair kClippedOut = - {{Rect::InfiniteInverted(), SkIRect::MakeEmpty()}, DrawOrder::kNoIntersection}; +Clip ClipStack::visitClipStackForDraw(const Transform& localToDevice, + const Geometry& geometry, + const SkStrokeRec& style, + const Renderer& renderer, + ClipStack::ElementList* outEffectiveElements) const { + static const Clip kClippedOut = { + Rect::InfiniteInverted(), Rect::InfiniteInverted(), SkIRect::MakeEmpty()}; const SaveRecord& cs = this->currentSaveRecord(); if (cs.state() == ClipState::kEmpty) { @@ -1106,64 +1114,81 @@ std::pair ClipStack::applyClipToDraw( auto origSize = geometry.bounds().size(); if (!std::isfinite(origSize.x()) || !std::isfinite(origSize.y())) { - // Discard all non-fininte geometry as if it were clipped out + // Discard all non-finite geometry as if it were clipped out return kClippedOut; } - Rect drawBounds; // defined in device space + // Inverse-filled shapes always fill the entire device (restricted to the clip). + // Query the invertedness of the shape before any of the `setRect` calls below, which can + // modify it. + bool infiniteBounds = styledShape->inverted(); + + // Discard fills and strokes that cannot produce any coverage: an empty fill, or a + // zero-length stroke that has butt caps. Otherwise the stroke style applies to a vertical + // or horizontal line (making it non-empty), or it's a zero-length path segment that + // must produce round or square caps (making it non-empty): + // https://www.w3.org/TR/SVG11/implnote.html#PathElementImplementationNotes + if (!infiniteBounds && (styledShape->isLine() || any(origSize == 0.f))) { + if (style.isFillStyle() || (style.getCap() == SkPaint::kButt_Cap && all(origSize == 0.f))) { + return kClippedOut; + } + } + + Rect transformedShapeBounds; bool shapeInDeviceSpace = false; - if (styledShape->inverted()) { - // Inverse-filled shapes always fill the entire device (restricted to the clip). - drawBounds = deviceBounds; - styledShape.writable()->setRect(drawBounds); - shapeInDeviceSpace = true; + + // Some renderers make the drawn area larger than the geometry. + float rendererOutset = renderer.boundsOutset(localToDevice, styledShape->bounds()); + if (!SkScalarIsFinite(rendererOutset)) { + transformedShapeBounds = deviceBounds; + infiniteBounds = true; } else { - // Discard fills and strokes that cannot produce any coverage: an empty fill, or a - // zero-length stroke that has butt caps. Otherwise the stroke style applies to a vertical - // or horizontal line (making it non-empty), or it's a zero-length path segment that - // must produce round or square caps (making it non-empty): - // https://www.w3.org/TR/SVG11/implnote.html#PathElementImplementationNotes - if (styledShape->isLine() || any(origSize == 0.f)) { - if (style.isFillStyle() || - (style.getCap() == SkPaint::kButt_Cap && all(origSize == 0.f))) { - return kClippedOut; - } - } + // Will be in device space once style/AA outsets and the localToDevice transform are + // applied. + transformedShapeBounds = styledShape->bounds(); // Regular filled shapes and strokes get larger based on style and transform - drawBounds = styledShape->bounds(); - if (!style.isHairlineStyle()) { - float localStyleOutset = style.getInflationRadius(); - drawBounds.outset(localStyleOutset); + if (!style.isHairlineStyle() || rendererOutset != 0.0f) { + float localStyleOutset = style.getInflationRadius() + rendererOutset; + transformedShapeBounds.outset(localStyleOutset); - if (!style.isFillStyle()) { + if (!style.isFillStyle() || rendererOutset != 0.0f) { // While this loses any shape type, the bounds remain local so hopefully tests are // fairly accurate. - styledShape.writable()->setRect(drawBounds); + styledShape.writable()->setRect(transformedShapeBounds); } } - drawBounds = localToDevice.mapRect(drawBounds); - // Hairlines get an extra pixel *after* transforming to device space - if (style.isHairlineStyle()) { - drawBounds.outset(0.5f); - // and the associated transform must be kIdentity since drawBounds has been mapped by + transformedShapeBounds = localToDevice.mapRect(transformedShapeBounds); + + // Hairlines get an extra pixel *after* transforming to device space, unless the renderer + // has already defined an outset + if (style.isHairlineStyle() && rendererOutset == 0.0f) { + transformedShapeBounds.outset(0.5f); + // and the associated transform must be kIdentity since the bounds have been mapped by // localToDevice already. - styledShape.writable()->setRect(drawBounds); + styledShape.writable()->setRect(transformedShapeBounds); shapeInDeviceSpace = true; } - // TODO: b/273924867 incorporate any outset required for analytic AA, too. - // Restrict bounds to the device limits - drawBounds.intersect(deviceBounds); + // Restrict bounds to the device limits. + transformedShapeBounds.intersect(deviceBounds); + } + + Rect drawBounds; // defined in device space + if (infiniteBounds) { + drawBounds = deviceBounds; + styledShape.writable()->setRect(drawBounds); + shapeInDeviceSpace = true; + } else { + drawBounds = transformedShapeBounds; } if (drawBounds.isEmptyNegativeOrNaN() || cs.state() == ClipState::kWideOpen) { // Either the draw is off screen, so it's clipped out regardless of the state of the // SaveRecord, or there are no elements to apply to the draw. In both cases, 'drawBounds' - // has the correct value, the scissor is the device bounds (ignored if clipped-out), and - // we can return kNoIntersection for the painter's order. - return {Clip{drawBounds, deviceBounds.asSkIRect()}, DrawOrder::kNoIntersection}; + // has the correct value, the scissor is the device bounds (ignored if clipped-out). + return Clip(drawBounds, transformedShapeBounds, deviceBounds.asSkIRect()); } // We don't evaluate Simplify() on the SaveRecord and the draw because a reduced version of @@ -1177,9 +1202,10 @@ std::pair ClipStack::applyClipToDraw( // coordinates. Rect scissor = cs.scissor(deviceBounds, drawBounds).makeRoundOut(); drawBounds.intersect(scissor); + transformedShapeBounds.intersect(scissor); if (drawBounds.isEmptyNegativeOrNaN() || cs.innerBounds().contains(drawBounds)) { - // Like above, in both cases drawBounds holds the right value and can return kNoIntersection - return {Clip{drawBounds, scissor.asSkIRect()}, DrawOrder::kNoIntersection}; + // Like above, in both cases drawBounds holds the right value. + return Clip(drawBounds, transformedShapeBounds, scissor.asSkIRect()); } // If we made it here, the clip stack affects the draw in a complex way so iterate each element. @@ -1194,9 +1220,10 @@ std::pair ClipStack::applyClipToDraw( /*op=*/SkClipOp::kIntersect, /*containsChecksOnlyBounds=*/true}; - CompressedPaintersOrder maxClipOrder = DrawOrder::kNoIntersection; + SkASSERT(outEffectiveElements); + SkASSERT(outEffectiveElements->empty()); int i = fElements.count(); - for (RawElement& e : fElements.ritems()) { + for (const RawElement& e : fElements.ritems()) { --i; if (i < cs.oldestElementIndex()) { // All earlier elements have been invalidated by elements already processed so the draw @@ -1204,16 +1231,43 @@ std::pair ClipStack::applyClipToDraw( break; } - auto [clippedOut, order] = e.updateForDraw(boundsManager, draw, z); - if (clippedOut) { - drawBounds = Rect::InfiniteInverted(); - break; - } else { - maxClipOrder = std::max(order, maxClipOrder); + auto influence = e.testForDraw(draw); + if (influence == RawElement::DrawInfluence::kClipOut) { + outEffectiveElements->clear(); + return kClippedOut; + } + if (influence == RawElement::DrawInfluence::kIntersect) { + outEffectiveElements->push_back(&e); } } - return {Clip{drawBounds, scissor.asSkIRect()}, maxClipOrder}; + return Clip(drawBounds, transformedShapeBounds, scissor.asSkIRect()); +} + +CompressedPaintersOrder ClipStack::updateClipStateForDraw(const Clip& clip, + const ElementList& effectiveElements, + const BoundsManager* boundsManager, + PaintersDepth z) { + if (clip.isClippedOut()) { + return DrawOrder::kNoIntersection; + } + + SkDEBUGCODE(const SaveRecord& cs = this->currentSaveRecord();) + SkASSERT(cs.state() != ClipState::kEmpty); + + CompressedPaintersOrder maxClipOrder = DrawOrder::kNoIntersection; + for (int i = 0; i < effectiveElements.size(); ++i) { + // ClipStack owns the elements in the `clipState` so it's OK to downcast and cast away + // const. + // TODO: Enforce the ownership? In debug builds we could invalidate a `ClipStateForDraw` if + // its element pointers become dangling and assert validity here. + const RawElement* e = static_cast(effectiveElements[i]); + CompressedPaintersOrder order = + const_cast(e)->updateForDraw(boundsManager, clip.drawBounds(), z); + maxClipOrder = std::max(order, maxClipOrder); + } + + return maxClipOrder; } void ClipStack::recordDeferredClipDraws() { diff --git a/src/gpu/graphite/ClipStack_graphite.h b/src/gpu/graphite/ClipStack_graphite.h index 8dc03e5944e5..bc89707a7d13 100644 --- a/src/gpu/graphite/ClipStack_graphite.h +++ b/src/gpu/graphite/ClipStack_graphite.h @@ -9,8 +9,10 @@ #define skgpu_graphite_ClipStack_DEFINED #include "include/core/SkClipOp.h" +#include "include/private/base/SkTArray.h" #include "src/base/SkTBlockList.h" #include "src/gpu/graphite/DrawOrder.h" +#include "src/gpu/graphite/DrawParams.h" #include "src/gpu/graphite/geom/Shape.h" #include "src/gpu/graphite/geom/Transform_graphite.h" @@ -20,9 +22,9 @@ class SkStrokeRec; namespace skgpu::graphite { class BoundsManager; -class Clip; class Device; class Geometry; +class Renderer; // TODO: Port over many of the unit tests for skgpu/v1/ClipStack defined in GrClipStackTest since // those tests do a thorough job of enumerating the different element combinations. @@ -66,27 +68,43 @@ class ClipStack { void clipShape(const Transform& localToDevice, const Shape& shape, SkClipOp op); void clipShader(sk_sp shader); - // Apply the clip stack to the draw described by the provided transform, shape, and stroke. - // The provided 'z' value is the depth value that the draw will use if it's not clipped out - // entirely. Applying clips to a draw is a mostly lazy operation except for what is returned: + // Compute the bounds and the effective elements of the clip stack when applied to the draw + // described by the provided transform, shape, and stroke. + // + // Applying clips to a draw is a mostly lazy operation except for what is returned: // - The Clip's scissor is set to 'conservativeBounds()'. // - The Clip stores the draw's clipped bounds, taking into account its transform, styling, and // the above scissor. - // - The CompressedPaintersOrder is the largest order that will be used by any of the clip - // elements that affect the draw. + // - The Clip also stores the draw's fill-style invariant clipped bounds which is used in atlas + // draws and may differ from the draw bounds. + // + // All clip elements that affect the draw will be returned in `outEffectiveElements` alongside + // the bounds. This method does not have any side-effects and the per-clip element state has to + // be explicitly updated by calling `updateClipStateForDraw()` which prepares the clip stack for + // later rendering. + // + // The returned clip element list will be empty if the shape is clipped out or if the draw is + // unaffected by any of the clip elements. + using ElementList = skia_private::STArray<4, const Element*>; + Clip visitClipStackForDraw(const Transform&, + const Geometry&, + const SkStrokeRec&, + const Renderer&, + ElementList* outEffectiveElements) const; + + // Update the per-clip element state for later rendering using pre-computed clip state data for + // a particular draw. The provided 'z' value is the depth value that the draw will use if it's + // not clipped out entirely. // - // In addition to computing these values, the clip stack updates per-clip element state for - // later rendering. Clip shapes that affect draws are later recorded into the Device's - // DrawContext with their own painter's order chosen to sort earlier than all affected draws - // but using a Z value greater than affected draws. This ensures that the draws fail the depth - // test for clipped-out pixels. + // The returned CompressedPaintersOrder is the largest order that will be used by any of the + // clip elements that affect the draw. // - // If the draw is clipped out, the returned draw bounds will be empty. - std::pair applyClipToDraw(const BoundsManager*, - const Transform&, - const Geometry&, - const SkStrokeRec&, - PaintersDepth z); + // If the provided `clipState` indicates that the draw will be clipped out, then this method has + // no effect and returns DrawOrder::kNoIntersection. + CompressedPaintersOrder updateClipStateForDraw(const Clip& clip, + const ElementList& effectiveElements, + const BoundsManager*, + PaintersDepth z); void recordDeferredClipDraws(); @@ -120,7 +138,7 @@ class ClipStack { static SimplifyResult Simplify(const TransformedShape& a, const TransformedShape& b); // Wraps the geometric Element data with logic for containment and bounds testing. - class RawElement : private Element { + class RawElement : public Element { public: using Stack = SkTBlockList; @@ -142,15 +160,13 @@ class ClipStack { operator TransformedShape() const; - const Element& asElement() const { return *this; } - bool hasPendingDraw() const { return fOrder != DrawOrder::kNoIntersection; } - - const Shape& shape() const { return fShape; } - const Transform& localToDevice() const { return fLocalToDevice; } - const Rect& outerBounds() const { return fOuterBounds; } - const Rect& innerBounds() const { return fInnerBounds; } - SkClipOp op() const { return fOp; } - ClipState clipType() const; + bool hasPendingDraw() const { return fOrder != DrawOrder::kNoIntersection; } + const Shape& shape() const { return fShape; } + const Transform& localToDevice() const { return fLocalToDevice; } + const Rect& outerBounds() const { return fOuterBounds; } + const Rect& innerBounds() const { return fInnerBounds; } + SkClipOp op() const { return fOp; } + ClipState clipType() const; // As new elements are pushed on to the stack, they may make older elements redundant. // The old elements are marked invalid so they are skipped during clip application, but may @@ -173,15 +189,27 @@ class ClipStack { // is handled by modifying 'added'. void updateForElement(RawElement* added, const SaveRecord& current); + // Returns how this element affects the draw after more detailed analysis. + enum class DrawInfluence { + kNone, // The element does not affect the draw + kClipOut, // The element causes the draw shape to be entirely clipped out + kIntersect, // The element intersects the draw shape in a complex way + }; + DrawInfluence testForDraw(const TransformedShape& draw) const; + // Updates usage tracking to incorporate the bounds and Z value for the new draw call. // If this element hasn't affected any prior draws, it will use the bounds manager to // assign itself a compressed painters order for later rendering. // - // Returns whether or not this element clips out the draw with more detailed analysis, and - // if not, returns the painters order the draw must sort after. - std::pair updateForDraw(const BoundsManager* boundsManager, - const TransformedShape& draw, - PaintersDepth drawZ); + // This method assumes that this element affects the draw in a complex way, such that + // calling `testForDraw()` on the same draw would return `DrawInfluence::kIntersect`. It is + // assumed that `testForDraw()` was called beforehand to ensure that this is the case. + // + // Assuming that this element does not clip out the draw, returns the painters order the + // draw must sort after. + CompressedPaintersOrder updateForDraw(const BoundsManager* boundsManager, + const Rect& drawBounds, + PaintersDepth drawZ); // Record a depth-only draw to the given device, restricted to the portion of the clip that // is actually required based on prior recorded draws. Resets usage tracking for subsequent @@ -319,7 +347,7 @@ class ClipStack::ElementIter { return o.fItem != fItem && o.fRemaining != fRemaining; } - const Element& operator*() const { return (*fItem).asElement(); } + const Element& operator*() const { return *fItem; } ElementIter& operator++() { // Skip over invalidated elements diff --git a/src/gpu/graphite/CommandBuffer.h b/src/gpu/graphite/CommandBuffer.h index 0cb45c78fb18..5b045cdf005a 100644 --- a/src/gpu/graphite/CommandBuffer.h +++ b/src/gpu/graphite/CommandBuffer.h @@ -19,6 +19,7 @@ namespace skgpu { class RefCntedCallback; +class MutableTextureState; } namespace skgpu::graphite { @@ -54,6 +55,13 @@ class CommandBuffer { void addFinishedProc(sk_sp finishedProc); void callFinishedProcs(bool success); + virtual void addWaitSemaphores(size_t numWaitSemaphores, + const BackendSemaphore* waitSemaphores) {} + virtual void addSignalSemaphores(size_t numWaitSemaphores, + const BackendSemaphore* signalSemaphores) {} + virtual void prepareSurfaceForStateUpdate(SkSurface* targetSurface, + const MutableTextureState* newState) {} + bool addRenderPass(const RenderPassDesc&, sk_sp colorTexture, sk_sp resolveTexture, diff --git a/src/gpu/graphite/Context.cpp b/src/gpu/graphite/Context.cpp index 6566414aae60..4e560617f6f4 100644 --- a/src/gpu/graphite/Context.cpp +++ b/src/gpu/graphite/Context.cpp @@ -7,14 +7,17 @@ #include "include/gpu/graphite/Context.h" +#include "include/core/SkColorSpace.h" #include "include/core/SkPathTypes.h" #include "include/effects/SkRuntimeEffect.h" #include "include/gpu/graphite/BackendTexture.h" #include "include/gpu/graphite/Recorder.h" #include "include/gpu/graphite/Recording.h" +#include "include/gpu/graphite/Surface.h" #include "include/gpu/graphite/TextureInfo.h" #include "src/base/SkRectMemcpy.h" #include "src/core/SkConvertPixels.h" +#include "src/core/SkYUVMath.h" #include "src/gpu/RefCntedCallback.h" #include "src/gpu/graphite/BufferManager.h" #include "src/gpu/graphite/Caps.h" @@ -41,6 +44,7 @@ #include "src/gpu/graphite/Surface_Graphite.h" #include "src/gpu/graphite/SynchronizeToCpuTask.h" #include "src/gpu/graphite/TextureProxyView.h" +#include "src/gpu/graphite/TextureUtils.h" #include "src/gpu/graphite/UploadTask.h" namespace skgpu::graphite { @@ -132,12 +136,14 @@ bool Context::submit(SyncToCpu syncToCpu) { return success; } -void Context::asyncReadPixels(const SkImage* image, - const SkColorInfo& dstColorInfo, - const SkIRect& srcRect, - SkImage::ReadPixelsCallback callback, - SkImage::ReadPixelsContext callbackContext) { - if (!as_IB(image)->isGraphiteBacked()) { +void Context::asyncRescaleAndReadPixels(const SkImage* image, + const SkImageInfo& dstImageInfo, + const SkIRect& srcRect, + SkImage::RescaleGamma rescaleGamma, + SkImage::RescaleMode rescaleMode, + SkImage::ReadPixelsCallback callback, + SkImage::ReadPixelsContext callbackContext) { + if (!image || !as_IB(image)->isGraphiteBacked()) { callback(callbackContext, nullptr); return; } @@ -146,35 +152,84 @@ void Context::asyncReadPixels(const SkImage* image, callback(callbackContext, nullptr); return; } - auto graphiteImage = reinterpret_cast(image); - TextureProxyView proxyView = graphiteImage->textureProxyView(); - this->asyncReadPixels(proxyView.proxy(), - image->imageInfo(), - dstColorInfo, - srcRect, + if (!SkIRect::MakeSize(image->imageInfo().dimensions()).contains(srcRect)) { + callback(callbackContext, nullptr); + return; + } + + if (srcRect.size() == dstImageInfo.bounds().size()) { + // No need for rescale + auto graphiteImage = reinterpret_cast(image); + TextureProxyView proxyView = graphiteImage->textureProxyView(); + return this->asyncReadPixels(proxyView.proxy(), + image->imageInfo(), + dstImageInfo.colorInfo(), + srcRect, + callback, + callbackContext); + } + + // Make a recorder to record drawing commands into + std::unique_ptr recorder = this->makeRecorder(); + + sk_sp scaledImage = RescaleImage(recorder.get(), + image, + srcRect, + dstImageInfo, + rescaleGamma, + rescaleMode); + if (!scaledImage) { + callback(callbackContext, nullptr); + return; + } + + // Add draw commands to queue before starting the transfer + std::unique_ptr recording = recorder->snap(); + if (!recording) { + callback(callbackContext, nullptr); + return; + } + InsertRecordingInfo recordingInfo; + recordingInfo.fRecording = recording.get(); + if (!this->insertRecording(recordingInfo)) { + callback(callbackContext, nullptr); + return; + } + + SkASSERT(scaledImage->imageInfo() == dstImageInfo); + + auto scaledGraphiteImage = reinterpret_cast(scaledImage.get()); + TextureProxyView scaledProxyView = scaledGraphiteImage->textureProxyView(); + + this->asyncReadPixels(scaledProxyView.proxy(), + dstImageInfo, + dstImageInfo.colorInfo(), + dstImageInfo.bounds(), callback, callbackContext); } -void Context::asyncReadPixels(const SkSurface* surface, - const SkColorInfo& dstColorInfo, - const SkIRect& srcRect, - SkImage::ReadPixelsCallback callback, - SkImage::ReadPixelsContext callbackContext) { +void Context::asyncRescaleAndReadPixels(const SkSurface* surface, + const SkImageInfo& dstImageInfo, + const SkIRect& srcRect, + SkImage::RescaleGamma rescaleGamma, + SkImage::RescaleMode rescaleMode, + SkImage::ReadPixelsCallback callback, + SkImage::ReadPixelsContext callbackContext) { if (!static_cast(surface)->isGraphiteBacked()) { callback(callbackContext, nullptr); return; } - auto graphiteSurface = reinterpret_cast(surface); - TextureProxyView proxyView = graphiteSurface->readSurfaceView(); - this->asyncReadPixels(proxyView.proxy(), - surface->imageInfo(), - dstColorInfo, - srcRect, - callback, - callbackContext); + sk_sp surfaceImage = SkSurfaces::AsImage(sk_ref_sp(surface)); + this->asyncRescaleAndReadPixels(surfaceImage.get(), + dstImageInfo, + srcRect, + rescaleGamma, + rescaleMode, + callback, + callbackContext); } void Context::asyncReadPixels(const TextureProxy* proxy, @@ -183,7 +238,7 @@ void Context::asyncReadPixels(const TextureProxy* proxy, const SkIRect& srcRect, SkImage::ReadPixelsCallback callback, SkImage::ReadPixelsContext callbackContext) { - if (!proxy) { + if (!proxy || proxy->textureInfo().isProtected() == Protected::kYes) { callback(callbackContext, nullptr); return; } @@ -253,6 +308,350 @@ void Context::asyncReadPixels(const TextureProxy* proxy, } } +void Context::asyncRescaleAndReadPixelsYUV420(const SkImage* image, + SkYUVColorSpace yuvColorSpace, + sk_sp dstColorSpace, + const SkIRect& srcRect, + const SkISize& dstSize, + SkImage::RescaleGamma rescaleGamma, + SkImage::RescaleMode rescaleMode, + SkImage::ReadPixelsCallback callback, + SkImage::ReadPixelsContext callbackContext) { + this->asyncRescaleAndReadPixelsYUV420Impl(image, + yuvColorSpace, + /*readAlpha=*/false, + dstColorSpace, + srcRect, + dstSize, + rescaleGamma, + rescaleMode, + callback, + callbackContext); +} + +void Context::asyncRescaleAndReadPixelsYUV420(const SkSurface* surface, + SkYUVColorSpace yuvColorSpace, + sk_sp dstColorSpace, + const SkIRect& srcRect, + const SkISize& dstSize, + SkImage::RescaleGamma rescaleGamma, + SkImage::RescaleMode rescaleMode, + SkImage::ReadPixelsCallback callback, + SkImage::ReadPixelsContext callbackContext) { + if (!static_cast(surface)->isGraphiteBacked()) { + callback(callbackContext, nullptr); + return; + } + + sk_sp surfaceImage = SkSurfaces::AsImage(sk_ref_sp(surface)); + this->asyncRescaleAndReadPixelsYUV420(surfaceImage.get(), + yuvColorSpace, + dstColorSpace, + srcRect, + dstSize, + rescaleGamma, + rescaleMode, + callback, + callbackContext); +} + +void Context::asyncRescaleAndReadPixelsYUVA420(const SkImage* image, + SkYUVColorSpace yuvColorSpace, + sk_sp dstColorSpace, + const SkIRect& srcRect, + const SkISize& dstSize, + SkImage::RescaleGamma rescaleGamma, + SkImage::RescaleMode rescaleMode, + SkImage::ReadPixelsCallback callback, + SkImage::ReadPixelsContext callbackContext) { + this->asyncRescaleAndReadPixelsYUV420Impl(image, + yuvColorSpace, + /*readAlpha=*/true, + dstColorSpace, + srcRect, + dstSize, + rescaleGamma, + rescaleMode, + callback, + callbackContext); +} + +void Context::asyncRescaleAndReadPixelsYUVA420(const SkSurface* surface, + SkYUVColorSpace yuvColorSpace, + sk_sp dstColorSpace, + const SkIRect& srcRect, + const SkISize& dstSize, + SkImage::RescaleGamma rescaleGamma, + SkImage::RescaleMode rescaleMode, + SkImage::ReadPixelsCallback callback, + SkImage::ReadPixelsContext callbackContext) { + if (!static_cast(surface)->isGraphiteBacked()) { + callback(callbackContext, nullptr); + return; + } + + sk_sp surfaceImage = SkSurfaces::AsImage(sk_ref_sp(surface)); + this->asyncRescaleAndReadPixelsYUVA420(surfaceImage.get(), + yuvColorSpace, + dstColorSpace, + srcRect, + dstSize, + rescaleGamma, + rescaleMode, + callback, + callbackContext); +} + +void Context::asyncRescaleAndReadPixelsYUV420Impl(const SkImage* image, + SkYUVColorSpace yuvColorSpace, + bool readAlpha, + sk_sp dstColorSpace, + const SkIRect& srcRect, + const SkISize& dstSize, + SkImage::RescaleGamma rescaleGamma, + SkImage::RescaleMode rescaleMode, + SkImage::ReadPixelsCallback callback, + SkImage::ReadPixelsContext callbackContext) { + if (!image || !as_IB(image)->isGraphiteBacked()) { + callback(callbackContext, nullptr); + return; + } + + const SkImageInfo& srcImageInfo = image->imageInfo(); + if (!SkIRect::MakeSize(srcImageInfo.dimensions()).contains(srcRect)) { + callback(callbackContext, nullptr); + return; + } + + // Make a recorder to record drawing commands into + std::unique_ptr recorder = this->makeRecorder(); + + if (srcRect.size() == dstSize && + SkColorSpace::Equals(srcImageInfo.colorInfo().colorSpace(), + dstColorSpace.get())) { + // No need for rescale + return this->asyncReadPixelsYUV420(recorder.get(), + image, + yuvColorSpace, + readAlpha, + srcRect, + callback, + callbackContext); + } + + SkImageInfo dstImageInfo = SkImageInfo::Make(dstSize, + kRGBA_8888_SkColorType, + srcImageInfo.colorInfo().alphaType(), + dstColorSpace); + sk_sp scaledImage = RescaleImage(recorder.get(), + image, + srcRect, + dstImageInfo, + rescaleGamma, + rescaleMode); + if (!scaledImage) { + callback(callbackContext, nullptr); + return; + } + + this->asyncReadPixelsYUV420(recorder.get(), + scaledImage.get(), + yuvColorSpace, + readAlpha, + SkIRect::MakeSize(dstSize), + callback, + callbackContext); +} + +void Context::asyncReadPixelsYUV420(Recorder* recorder, + const SkImage* srcImage, + SkYUVColorSpace yuvColorSpace, + bool readAlpha, + const SkIRect& srcRect, + SkImage::ReadPixelsCallback callback, + SkImage::ReadPixelsContext callbackContext) { + // Make three or four Surfaces to draw the YUV[A] planes into + SkImageInfo yaInfo = SkImageInfo::MakeA8(srcRect.size()); + sk_sp ySurface = Surface::MakeGraphite(recorder, yaInfo, Budgeted::kNo); + sk_sp aSurface; + if (readAlpha) { + aSurface = Surface::MakeGraphite(recorder, yaInfo, Budgeted::kNo); + } + + SkImageInfo uvInfo = yaInfo.makeWH(yaInfo.width()/2, yaInfo.height()/2); + sk_sp uSurface = Surface::MakeGraphite(recorder, uvInfo, Budgeted::kNo); + sk_sp vSurface = Surface::MakeGraphite(recorder, uvInfo, Budgeted::kNo); + + if (!ySurface || !uSurface || !vSurface || (readAlpha && !aSurface)) { + callback(callbackContext, nullptr); + return; + } + + // Set up draws and transfers + // TODO: Use one transfer buffer for all three planes to reduce map/unmap cost? + auto drawPlane = [](SkSurface* dstSurface, + const SkImage* srcImage, + float rgb2yuv[20], + const SkMatrix& texMatrix) { + // Render the plane defined by rgb2yuv from srcImage into dstSurface + SkPaint paint; + const SkSamplingOptions sampling(SkFilterMode::kLinear, SkMipmapMode::kNone); + sk_sp imgShader = srcImage->makeShader(SkTileMode::kClamp, SkTileMode::kClamp, + sampling, texMatrix); + paint.setShader(std::move(imgShader)); + + if (rgb2yuv) { + sk_sp matrixFilter = SkColorFilters::Matrix(rgb2yuv); + paint.setColorFilter(std::move(matrixFilter)); + } + + SkCanvas* canvas = dstSurface->getCanvas(); + canvas->drawPaint(paint); + }; + + auto copyPlane = [this](SkSurface* surface) { + // Transfer result from dstSurface + auto graphiteSurface = reinterpret_cast(surface); + TextureProxyView proxyView = graphiteSurface->readSurfaceView(); + + auto srcImageInfo = surface->imageInfo(); + auto dstColorInfo = srcImageInfo.colorInfo().makeColorType(kAlpha_8_SkColorType); + return this->transferPixels(proxyView.proxy(), + srcImageInfo, + dstColorInfo, + SkIRect::MakeWH(surface->width(), surface->height())); + }; + + float baseM[20]; + SkColorMatrix_RGB2YUV(yuvColorSpace, baseM); + SkMatrix texMatrix = SkMatrix::Translate(srcRect.fLeft, srcRect.fTop); + + // This matrix generates (r,g,b,a) = (0, 0, 0, y) + float yM[20]; + std::fill_n(yM, 15, 0.f); + std::copy_n(baseM + 0, 5, yM + 15); + drawPlane(ySurface.get(), srcImage, yM, texMatrix); + if (readAlpha) { + // No matrix, straight copy of alpha channel + SkASSERT(baseM[15] == 0 && + baseM[16] == 0 && + baseM[17] == 0 && + baseM[18] == 1 && + baseM[19] == 0); + drawPlane(aSurface.get(), srcImage, nullptr, texMatrix); + } + + texMatrix.preScale(0.5f, 0.5f); + // This matrix generates (r,g,b,a) = (0, 0, 0, u) + float uM[20]; + std::fill_n(uM, 15, 0.f); + std::copy_n(baseM + 5, 5, uM + 15); + drawPlane(uSurface.get(), srcImage, uM, texMatrix); + + // This matrix generates (r,g,b,a) = (0, 0, 0, v) + float vM[20]; + std::fill_n(vM, 15, 0.f); + std::copy_n(baseM + 10, 5, vM + 15); + drawPlane(vSurface.get(), srcImage, vM, texMatrix); + + // Add draw commands to queue + std::unique_ptr recording = recorder->snap(); + if (!recording) { + callback(callbackContext, nullptr); + return; + } + InsertRecordingInfo recordingInfo; + recordingInfo.fRecording = recording.get(); + if (!this->insertRecording(recordingInfo)) { + callback(callbackContext, nullptr); + return; + } + + // Now set up transfers + PixelTransferResult yTransfer, uTransfer, vTransfer, aTransfer; + yTransfer = copyPlane(ySurface.get()); + if (!yTransfer.fTransferBuffer) { + callback(callbackContext, nullptr); + return; + } + uTransfer = copyPlane(uSurface.get()); + if (!uTransfer.fTransferBuffer) { + callback(callbackContext, nullptr); + return; + } + vTransfer = copyPlane(vSurface.get()); + if (!vTransfer.fTransferBuffer) { + callback(callbackContext, nullptr); + return; + } + if (readAlpha) { + aTransfer = copyPlane(aSurface.get()); + if (!aTransfer.fTransferBuffer) { + callback(callbackContext, nullptr); + return; + } + } + + // Set up FinishContext and add transfer commands to queue + using AsyncReadResult = skgpu::TAsyncReadResult; + struct FinishContext { + SkImage::ReadPixelsCallback* fClientCallback; + SkImage::ReadPixelsContext fClientContext; + SkISize fSize; + ClientMappedBufferManager* fMappedBufferManager; + PixelTransferResult fYTransfer; + PixelTransferResult fUTransfer; + PixelTransferResult fVTransfer; + PixelTransferResult fATransfer; + }; + auto* finishContext = new FinishContext{callback, + callbackContext, + srcRect.size(), + fMappedBufferManager.get(), + std::move(yTransfer), + std::move(uTransfer), + std::move(vTransfer), + std::move(aTransfer)}; + GpuFinishedProc finishCallback = [](GpuFinishedContext c, CallbackResult status) { + const auto* context = reinterpret_cast(c); + if (status == CallbackResult::kSuccess) { + auto manager = context->fMappedBufferManager; + auto result = std::make_unique(manager->ownerID()); + if (!result->addTransferResult(context->fYTransfer, context->fSize, + context->fYTransfer.fRowBytes, manager)) { + result.reset(); + } + SkISize uvSize = {context->fSize.width() / 2, context->fSize.height() / 2}; + if (result && !result->addTransferResult(context->fUTransfer, uvSize, + context->fUTransfer.fRowBytes, manager)) { + result.reset(); + } + if (result && !result->addTransferResult(context->fVTransfer, uvSize, + context->fVTransfer.fRowBytes, manager)) { + result.reset(); + } + if (result && context->fATransfer.fTransferBuffer && + !result->addTransferResult(context->fATransfer, context->fSize, + context->fATransfer.fRowBytes, manager)) { + result.reset(); + } + (*context->fClientCallback)(context->fClientContext, std::move(result)); + } else { + (*context->fClientCallback)(context->fClientContext, nullptr); + } + delete context; + }; + + InsertFinishInfo finishInfo; + finishInfo.fFinishedContext = finishContext; + finishInfo.fFinishedProc = finishCallback; + // If addFinishInfo() fails, it invokes the finish callback automatically, which handles all the + // required clean up for us, just log an error message. + if (!fQueueManager->addFinishInfo(finishInfo, fResourceProvider.get())) { + SKGPU_LOG_E("Failed to register finish callbacks for asyncReadPixels."); + } +} + Context::PixelTransferResult Context::transferPixels(const TextureProxy* proxy, const SkImageInfo& srcImageInfo, const SkColorInfo& dstColorInfo, diff --git a/src/gpu/graphite/ContextUtils.cpp b/src/gpu/graphite/ContextUtils.cpp index f9bf45ad05ae..3a651b9d3f4b 100644 --- a/src/gpu/graphite/ContextUtils.cpp +++ b/src/gpu/graphite/ContextUtils.cpp @@ -21,6 +21,7 @@ #include "src/gpu/graphite/ShaderCodeDictionary.h" #include "src/gpu/graphite/UniformManager.h" #include "src/gpu/graphite/UniquePaintParamsID.h" +#include "src/gpu/graphite/compute/ComputeStep.h" #include "src/sksl/SkSLString.h" #include "src/sksl/SkSLUtil.h" @@ -34,12 +35,14 @@ ExtractPaintData(Recorder* recorder, const SkM44& local2Dev, const PaintParams& p, sk_sp dstTexture, + SkIPoint dstOffset, const SkColorInfo& targetColorInfo) { SkDEBUGCODE(builder->checkReset()); gatherer->resetWithNewLayout(layout); - KeyContext keyContext(recorder, local2Dev, targetColorInfo, p.color(), std::move(dstTexture)); + KeyContext keyContext( + recorder, local2Dev, targetColorInfo, p.color(), std::move(dstTexture), dstOffset); p.toKey(keyContext, builder, gatherer); UniquePaintParamsID paintID = recorder->priv().shaderCodeDictionary()->findOrCreate(builder); @@ -273,20 +276,20 @@ std::string EmitSamplerLayout(const ResourceBindingRequirements& bindingReqs, in // If fDistinctIndexRanges is false, then texture and sampler indices may clash with other // resource indices. Graphite assumes that they will be placed in descriptor set (Vulkan) and // bind group (Dawn) index 1. + const char* distinctIndexRange = bindingReqs.fDistinctIndexRanges ? "" : "set=1, "; + if (bindingReqs.fSeparateTextureAndSamplerBinding) { int samplerIndex = (*binding)++; int textureIndex = (*binding)++; - SkSL::String::appendf(&result, - "layout(wgsl, %ssampler=%d, texture=%d)", - bindingReqs.fDistinctIndexRanges ? "" : "set=1, ", - samplerIndex, - textureIndex); + result = SkSL::String::printf("layout(wgsl, %ssampler=%d, texture=%d)", + distinctIndexRange, + samplerIndex, + textureIndex); } else { - SkSL::String::appendf(&result, - "layout(%sbinding=%d)", - bindingReqs.fDistinctIndexRanges ? "" : "set=1, ", - *binding); - (*binding)++; + int samplerIndex = (*binding)++; + result = SkSL::String::printf("layout(%sbinding=%d)", + distinctIndexRange, + samplerIndex); } return result; } @@ -327,7 +330,7 @@ std::string EmitVaryings(const RenderStep* step, if (emitShadingSsboIndexVarying) { SkSL::String::appendf(&result, - " layout(location=%d) %s int shadingSsboIndexVar;\n", + " layout(location=%d) %s flat int shadingSsboIndexVar;\n", location++, direction); } @@ -347,10 +350,10 @@ std::string EmitVaryings(const RenderStep* step, return result; } -std::string GetSkSLVS(const ResourceBindingRequirements& bindingReqs, - const RenderStep* step, - bool defineShadingSsboIndexVarying, - bool defineLocalCoordsVarying) { +std::string BuildVertexSkSL(const ResourceBindingRequirements& bindingReqs, + const RenderStep* step, + bool defineShadingSsboIndexVarying, + bool defineLocalCoordsVarying) { // TODO: To more completely support end-to-end rendering, this will need to be updated so that // the RenderStep shader snippet can produce a device coord, a local coord, and depth. // If the paint combination doesn't need the local coord it can be ignored, otherwise we need @@ -404,13 +407,13 @@ std::string GetSkSLVS(const ResourceBindingRequirements& bindingReqs, return sksl; } -FragSkSLInfo GetSkSLFS(const Caps* caps, - const ShaderCodeDictionary* dict, - const RuntimeEffectDictionary* rteDict, - const RenderStep* step, - UniquePaintParamsID paintID, - bool useStorageBuffers, - skgpu::Swizzle writeSwizzle) { +FragSkSLInfo BuildFragmentSkSL(const Caps* caps, + const ShaderCodeDictionary* dict, + const RuntimeEffectDictionary* rteDict, + const RenderStep* step, + UniquePaintParamsID paintID, + bool useStorageBuffers, + skgpu::Swizzle writeSwizzle) { if (!paintID.isValid()) { // TODO: we should return the error shader code here return {}; @@ -437,4 +440,14 @@ FragSkSLInfo GetSkSLFS(const Caps* caps, return result; } +std::string BuildComputeSkSL(const Caps* caps, const ComputeStep* step) { + std::string sksl = + SkSL::String::printf("layout(local_size_x=%u, local_size_y=%u, local_size_z=%u) in;\n", + step->localDispatchSize().fWidth, + step->localDispatchSize().fHeight, + step->localDispatchSize().fDepth); + sksl += step->computeSkSL(caps->resourceBindingRequirements(), /*nextBindingIndex=*/0); + return sksl; +} + } // namespace skgpu::graphite diff --git a/src/gpu/graphite/ContextUtils.h b/src/gpu/graphite/ContextUtils.h index bf87b0ee6ffc..ccbafe0e4d98 100644 --- a/src/gpu/graphite/ContextUtils.h +++ b/src/gpu/graphite/ContextUtils.h @@ -13,6 +13,7 @@ #include "src/gpu/graphite/PipelineDataCache.h" #include +#include class SkColorInfo; class SkM44; @@ -24,6 +25,7 @@ class Swizzle; namespace skgpu::graphite { +class ComputeStep; class DrawParams; enum class DstReadRequirement; class GraphicsPipelineDesc; @@ -52,6 +54,7 @@ ExtractPaintData(Recorder*, const SkM44& local2Dev, const PaintParams&, sk_sp dstTexture, + SkIPoint dstOffset, const SkColorInfo& targetColorInfo); std::tuple ExtractRenderStepData( @@ -64,18 +67,20 @@ std::tuple ExtractRenderStepDa DstReadRequirement GetDstReadRequirement(const Caps*, std::optional, bool hasCoverage); -std::string GetSkSLVS(const ResourceBindingRequirements&, - const RenderStep* step, - bool defineShadingSsboIndexVarying, - bool defineLocalCoordsVarying); - -FragSkSLInfo GetSkSLFS(const Caps* caps, - const ShaderCodeDictionary*, - const RuntimeEffectDictionary*, - const RenderStep* renderStep, - UniquePaintParamsID paintID, - bool useStorageBuffers, - skgpu::Swizzle writeSwizzle); +std::string BuildVertexSkSL(const ResourceBindingRequirements&, + const RenderStep* step, + bool defineShadingSsboIndexVarying, + bool defineLocalCoordsVarying); + +FragSkSLInfo BuildFragmentSkSL(const Caps* caps, + const ShaderCodeDictionary*, + const RuntimeEffectDictionary*, + const RenderStep* renderStep, + UniquePaintParamsID paintID, + bool useStorageBuffers, + skgpu::Swizzle writeSwizzle); + +std::string BuildComputeSkSL(const Caps*, const ComputeStep*); std::string EmitPaintParamsUniforms(int bufferID, const char* name, diff --git a/src/gpu/graphite/DescriptorTypes.h b/src/gpu/graphite/DescriptorTypes.h index fc033a948f57..a25ff385bbfc 100644 --- a/src/gpu/graphite/DescriptorTypes.h +++ b/src/gpu/graphite/DescriptorTypes.h @@ -15,6 +15,7 @@ namespace skgpu::graphite { */ enum class DescriptorType : uint8_t { kUniformBuffer = 0, + kInlineUniform, kTextureSampler, kTexture, kCombinedTextureSampler, @@ -25,12 +26,13 @@ enum class DescriptorType : uint8_t { }; static constexpr int kDescriptorTypeCount = (int)(DescriptorType::kLast) + 1; -struct DescTypeAndCount { - DescTypeAndCount(DescriptorType descType, uint32_t descCount) - : type (descType), count (descCount) {} +struct DescriptorData { + DescriptorData(DescriptorType descType, uint32_t descCount, int bindingIdx) + : type (descType), count (descCount), bindingIndex (bindingIdx) {} DescriptorType type; uint32_t count; + int bindingIndex; }; }; // namespace skgpu::graphite diff --git a/src/gpu/graphite/Device.cpp b/src/gpu/graphite/Device.cpp index 209d19a3ae14..a98440b42cb7 100644 --- a/src/gpu/graphite/Device.cpp +++ b/src/gpu/graphite/Device.cpp @@ -11,6 +11,7 @@ #include "include/gpu/graphite/Recording.h" #include "include/gpu/graphite/Surface.h" #include "src/gpu/AtlasTypes.h" +#include "src/gpu/graphite/AtlasProvider.h" #include "src/gpu/graphite/Buffer.h" #include "src/gpu/graphite/Caps.h" #include "src/gpu/graphite/CommandBuffer.h" @@ -23,10 +24,12 @@ #include "src/gpu/graphite/ImageUtils.h" #include "src/gpu/graphite/Image_Graphite.h" #include "src/gpu/graphite/Log.h" +#include "src/gpu/graphite/PathAtlas.h" #include "src/gpu/graphite/RecorderPriv.h" #include "src/gpu/graphite/Renderer.h" #include "src/gpu/graphite/RendererProvider.h" #include "src/gpu/graphite/SharedContext.h" +#include "src/gpu/graphite/SpecialImage_Graphite.h" #include "src/gpu/graphite/TextureProxy.h" #include "src/gpu/graphite/TextureUtils.h" #include "src/gpu/graphite/geom/BoundsManager.h" @@ -34,7 +37,7 @@ #include "src/gpu/graphite/geom/IntersectionTree.h" #include "src/gpu/graphite/geom/Shape.h" #include "src/gpu/graphite/geom/Transform_graphite.h" -#include "src/gpu/graphite/text/AtlasManager.h" +#include "src/gpu/graphite/text/TextAtlasManager.h" #include "include/core/SkColorSpace.h" #include "include/core/SkPath.h" @@ -59,6 +62,7 @@ #include "src/text/gpu/SlugImpl.h" #include "src/text/gpu/SubRunContainer.h" #include "src/text/gpu/TextBlobRedrawCoordinator.h" +#include "src/text/gpu/VertexFiller.h" #include #include @@ -149,17 +153,23 @@ SkIRect rect_to_pixelbounds(const Rect& r) { return r.makeRoundOut().asSkIRect(); } -// TODO: this doesn't support the SrcRectConstraint option. bool create_img_shader_paint(sk_sp image, const SkRect& subset, + SkCanvas::SrcRectConstraint constraint, const SkSamplingOptions& sampling, const SkMatrix* localMatrix, SkPaint* paint) { bool imageIsAlphaOnly = SkColorTypeIsAlphaOnly(image->colorType()); - sk_sp imgShader = SkImageShader::MakeSubset(std::move(image), subset, - SkTileMode::kClamp, SkTileMode::kClamp, - sampling, localMatrix); + sk_sp imgShader; + if (constraint == SkCanvas::kStrict_SrcRectConstraint) { + imgShader = SkImageShader::MakeSubset(std::move(image), subset, + SkTileMode::kClamp, SkTileMode::kClamp, + sampling, localMatrix); + } else { + imgShader = image->makeShader(SkTileMode::kClamp, SkTileMode::kClamp, + sampling, localMatrix); + } if (!imgShader) { SKGPU_LOG_W("Couldn't create subset image shader"); return false; @@ -440,28 +450,6 @@ bool Device::onReadPixels(const SkPixmap& pm, int srcX, int srcY) { return false; } -void Device::asyncRescaleAndReadPixels(const SkImageInfo& info, - SkIRect srcRect, - RescaleGamma rescaleGamma, - RescaleMode rescaleMode, - ReadPixelsCallback callback, - ReadPixelsContext context) { - // Not supported for Graphite - callback(context, nullptr); -} - -void Device::asyncRescaleAndReadPixelsYUV420(SkYUVColorSpace yuvColorSpace, - sk_sp dstColorSpace, - SkIRect srcRect, - SkISize dstSize, - RescaleGamma rescaleGamma, - RescaleMode rescaleMode, - ReadPixelsCallback callback, - ReadPixelsContext context) { - // TODO: implement for Graphite - callback(context, nullptr); -} - bool Device::onWritePixels(const SkPixmap& src, int x, int y) { // TODO: we may need to share this in a more central place to handle uploads // to backend textures @@ -774,7 +762,7 @@ void Device::drawEdgeAAImageSet(const SkCanvas::ImageSetEntry set[], int count, // TODO: Produce an image shading paint key and data directly without having to reconstruct // the equivalent SkPaint for each entry. Reuse the key and data between entries if possible paintWithShader.setShader(paint.refShader()); - if (!create_img_shader_paint(std::move(imageToDraw), src, newSampling, + if (!create_img_shader_paint(std::move(imageToDraw), src, constraint, newSampling, &localMatrix, &paintWithShader)) { return; } @@ -823,8 +811,9 @@ sktext::gpu::AtlasDrawDelegate Device::atlasDelegate() { return [&](const sktext::gpu::AtlasSubRun* subRun, SkPoint drawOrigin, const SkPaint& paint, - sk_sp subRunStorage) { - this->drawAtlasSubRun(subRun, drawOrigin, paint, subRunStorage); + sk_sp subRunStorage, + sktext::gpu::RendererData rendererData) { + this->drawAtlasSubRun(subRun, drawOrigin, paint, subRunStorage, rendererData); }; } @@ -843,7 +832,8 @@ void Device::onDrawGlyphRunList(SkCanvas* canvas, void Device::drawAtlasSubRun(const sktext::gpu::AtlasSubRun* subRun, SkPoint drawOrigin, const SkPaint& paint, - sk_sp subRunStorage) { + sk_sp subRunStorage, + sktext::gpu::RendererData rendererData) { const int subRunEnd = subRun->glyphCount(); auto regenerateDelegate = [&](sktext::gpu::GlyphVector* glyphs, int begin, @@ -853,7 +843,7 @@ void Device::drawAtlasSubRun(const sktext::gpu::AtlasSubRun* subRun, return glyphs->regenerateAtlasForGraphite(begin, end, maskFormat, padding, fRecorder); }; for (int subRunCursor = 0; subRunCursor < subRunEnd;) { - // For the remainder of the run, add any atlas uploads to the Recorder's AtlasManager + // For the remainder of the run, add any atlas uploads to the Recorder's TextAtlasManager auto[ok, glyphsRegenerated] = subRun->regenerateAtlas(subRunCursor, subRunEnd, regenerateDelegate); // There was a problem allocating the glyph in the atlas. Bail. @@ -861,7 +851,7 @@ void Device::drawAtlasSubRun(const sktext::gpu::AtlasSubRun* subRun, return; } if (glyphsRegenerated) { - auto [bounds, localToDevice] = subRun->boundsAndDeviceMatrix( + auto [bounds, localToDevice] = subRun->vertexFiller().boundsAndDeviceMatrix( this->localToDeviceTransform(), drawOrigin); SkPaint subRunPaint = paint; // For color emoji, only the paint alpha affects the final color @@ -873,9 +863,11 @@ void Device::drawAtlasSubRun(const sktext::gpu::AtlasSubRun* subRun, Geometry(SubRunData(subRun, subRunStorage, bounds, + this->localToDeviceTransform().inverse(), subRunCursor, glyphsRegenerated, - fRecorder)), + fRecorder, + rendererData)), subRunPaint, DefaultFillStyle(), DrawFlags::kIgnorePathEffect | DrawFlags::kIgnoreMaskFilter); @@ -946,8 +938,9 @@ void Device::drawGeometry(const Transform& localToDevice, return; } - // TODO: The tessellating path renderers haven't implemented perspective yet, so transform to - // device space so we draw something approximately correct (barring local coord issues). + // TODO: The tessellating and atlas path renderers haven't implemented perspective yet, so + // transform to device space so we draw something approximately correct (barring local coord + // issues). if (geometry.isShape() && localToDevice.type() == Transform::Type::kProjection && !is_simple_shape(geometry.shape(), style.getStyle())) { SkPath devicePath = geometry.shape().asPath(); @@ -967,13 +960,23 @@ void Device::drawGeometry(const Transform& localToDevice, SkASSERT(!SkToBool(paint.getPathEffect()) || (flags & DrawFlags::kIgnorePathEffect)); SkASSERT(!SkToBool(paint.getMaskFilter()) || (flags & DrawFlags::kIgnoreMaskFilter)); - const Renderer* renderer = + auto [renderer, pathAtlas] = this->chooseRenderer(localToDevice, geometry, style, /*requireMSAA=*/false); if (!renderer) { SKGPU_LOG_W("Skipping draw with no supported renderer."); return; } + // Calculate the clipped bounds of the draw and determine the clip elements that affect the + // draw without updating the clip stack. + ClipStack::ElementList clipElements; + const Clip clip = + fClip.visitClipStackForDraw(localToDevice, geometry, style, *renderer, &clipElements); + if (clip.isClippedOut()) { + // Clipped out, so don't record anything. + return; + } + // Figure out what dst color requirements we have, if any. DstReadRequirement dstReadReq = DstReadRequirement::kNone; const SkBlenderBase* blender = as_BB(paint.getBlender()); @@ -982,22 +985,64 @@ void Device::drawGeometry(const Transform& localToDevice, recorder()->priv().caps(), blender->asBlendMode(), renderer->emitsCoverage()); } - // Decide if we have any reason to flush pending work. We only want to flush once, before - // calculating clipping, since otherwise clip operations for the current draw will be flushed. + // When using a tessellating path renderer a stroke-and-fill is rendered using two draws. When + // drawing from an atlas we issue a single draw as the atlas mask covers both styles. SkStrokeRec::Style styleType = style.getStyle(); - const int numNewDraws = style.getStyle() == SkStrokeRec::kStrokeAndFill_Style ? 2 : 1; - if (this->needsFlushBeforeDraw(numNewDraws, dstReadReq)) { + const int numNewDraws = !pathAtlas && (styleType == SkStrokeRec::kStrokeAndFill_Style) ? 2 : 1; + + // Decide if we have any reason to flush pending work. We want to flush before updating the clip + // state or making any permanent changes to a path atlas, since otherwise clip operations and/or + // atlas entries for the current draw will be flushed. + const bool needsFlush = this->needsFlushBeforeDraw(numNewDraws, dstReadReq); + if (needsFlush) { this->flushPendingWorkToRecorder(); } - DrawOrder order(fCurrentDepth.next()); - auto [clip, clipOrder] = fClip.applyClipToDraw( - fColorDepthBoundsManager.get(), localToDevice, geometry, style, order.depth()); - if (clip.drawBounds().isEmptyNegativeOrNaN()) { - // Clipped out, so don't record anything - return; + // If an atlas path renderer was chosen we need to insert the shape into the atlas and schedule + // it to be drawn. + AtlasShape::MaskInfo atlasMaskInfo; // only used if `pathAtlas != nullptr` + + // It is possible for the transformed shape bounds to be fully clipped out while the draw still + // produces coverage due to an inverse fill. In this case, don't render any mask; + // AtlasShapeRenderStep will automatically handle the simple fill. + if (pathAtlas != nullptr && !clip.transformedShapeBounds().isEmptyNegativeOrNaN()) { + bool foundAtlasSpace = pathAtlas->addShape(recorder(), + clip.transformedShapeBounds(), + geometry.shape(), + localToDevice, + style, + &atlasMaskInfo); + + // If there was no space in the atlas and we haven't flushed already, then flush pending + // work to clear up space in the atlas. If we had already flushed once (which would have + // cleared the atlas) then the atlas is too small for this shape. + if (!foundAtlasSpace && !needsFlush) { + this->flushPendingWorkToRecorder(); + + // Try inserting the shape again. + foundAtlasSpace = pathAtlas->addShape(recorder(), + clip.transformedShapeBounds(), + geometry.shape(), + localToDevice, + style, + &atlasMaskInfo); + } + + if (!foundAtlasSpace) { + SKGPU_LOG_E("Shape is too large for path atlas!"); + // TODO(b/285195175): This can happen if the atlas is not large enough. Handle this case + // in `chooseRenderer` and make sure that the atlas path renderer is not chosen if the + // path is larger than the atlas texture. + return; + } } + // Update the clip stack after issuing a flush (if it was needed). A draw will be recorded after + // this point. + DrawOrder order(fCurrentDepth.next()); + CompressedPaintersOrder clipOrder = fClip.updateClipStateForDraw( + clip, clipElements, fColorDepthBoundsManager.get(), order.depth()); + #if defined(SK_DEBUG) // Renderers and their component RenderSteps have flexibility in defining their // DepthStencilSettings. However, the clipping and ordering managed between Device and ClipStack @@ -1046,20 +1091,30 @@ void Device::drawGeometry(const Transform& localToDevice, order.dependsOnStencil(setIndex); } - if (styleType == SkStrokeRec::kStroke_Style || - styleType == SkStrokeRec::kHairline_Style || - styleType == SkStrokeRec::kStrokeAndFill_Style) { - // For stroke-and-fill, 'renderer' is used for the fill and we always use the - // TessellatedStrokes renderer; for stroke and hairline, 'renderer' is used. - StrokeStyle stroke(style.getWidth(), style.getMiter(), style.getJoin(), style.getCap()); - fDC->recordDraw(styleType == SkStrokeRec::kStrokeAndFill_Style - ? fRecorder->priv().rendererProvider()->tessellatedStrokes() - : renderer, - localToDevice, geometry, clip, order, &shading, &stroke); - } - if (styleType == SkStrokeRec::kFill_Style || - styleType == SkStrokeRec::kStrokeAndFill_Style) { - fDC->recordDraw(renderer, localToDevice, geometry, clip, order, &shading, nullptr); + // If the atlas path renderer was chosen, then schedule the shape to be rendered into the atlas + // and record a single AtlashShape draw. + if (pathAtlas != nullptr) { + // Record the draw as a fill since stroking is handled by the atlas render. + Geometry atlasShape( + AtlasShape(geometry.shape(), pathAtlas, localToDevice.inverse(), atlasMaskInfo)); + fDC->recordDraw( + renderer, Transform::Identity(), atlasShape, clip, order, &shading, nullptr); + } else { + if (styleType == SkStrokeRec::kStroke_Style || + styleType == SkStrokeRec::kHairline_Style || + styleType == SkStrokeRec::kStrokeAndFill_Style) { + // For stroke-and-fill, 'renderer' is used for the fill and we always use the + // TessellatedStrokes renderer; for stroke and hairline, 'renderer' is used. + StrokeStyle stroke(style.getWidth(), style.getMiter(), style.getJoin(), style.getCap()); + fDC->recordDraw(styleType == SkStrokeRec::kStrokeAndFill_Style + ? fRecorder->priv().rendererProvider()->tessellatedStrokes() + : renderer, + localToDevice, geometry, clip, order, &shading, &stroke); + } + if (styleType == SkStrokeRec::kFill_Style || + styleType == SkStrokeRec::kStrokeAndFill_Style) { + fDC->recordDraw(renderer, localToDevice, geometry, clip, order, &shading, nullptr); + } } // TODO: If 'fullyOpaque' is true, it might be useful to store the draw bounds and Z in a @@ -1086,10 +1141,10 @@ void Device::drawClipShape(const Transform& localToDevice, // A clip draw's state is almost fully defined by the ClipStack. The only thing we need // to account for is selecting a Renderer and tracking the stencil buffer usage. Geometry geometry{shape}; - const Renderer* renderer = this->chooseRenderer(localToDevice, - geometry, - DefaultFillStyle(), - /*requireMSAA=*/true); + auto [renderer, pathAtlas] = this->chooseRenderer(localToDevice, + geometry, + DefaultFillStyle(), + /*requireMSAA=*/true); if (!renderer) { SKGPU_LOG_W("Skipping clip with no supported path renderer."); return; @@ -1098,9 +1153,11 @@ void Device::drawClipShape(const Transform& localToDevice, clip.drawBounds()); order.dependsOnStencil(setIndex); } + // Anti-aliased clipping requires the renderer to use MSAA to modify the depth per sample, so // analytic coverage renderers cannot be used. SkASSERT(!renderer->emitsCoverage() && renderer->requiresMSAA()); + SkASSERT(pathAtlas == nullptr); // Clips draws are depth-only (null PaintParams), and filled (null StrokeStyle). // TODO: Remove this CPU-transform once perspective is supported for all path renderers @@ -1121,31 +1178,53 @@ void Device::drawClipShape(const Transform& localToDevice, // TODO: Currently all Renderers are always defined, but with config options and caps that may not // be the case, in which case chooseRenderer() will have to go through compatible choices. -const Renderer* Device::chooseRenderer(const Transform& localToDevice, - const Geometry& geometry, - const SkStrokeRec& style, - bool requireMSAA) const { +std::pair Device::chooseRenderer(const Transform& localToDevice, + const Geometry& geometry, + const SkStrokeRec& style, + bool requireMSAA) const { const RendererProvider* renderers = fRecorder->priv().rendererProvider(); + SkASSERT(renderers); SkStrokeRec::Style type = style.getStyle(); if (geometry.isSubRun()) { SkASSERT(!requireMSAA); - return geometry.subRunData().subRun()->renderer(renderers); + sktext::gpu::RendererData rendererData = geometry.subRunData().rendererData(); + if (!rendererData.isSDF) { + return {renderers->bitmapText(), nullptr}; + } + return {renderers->sdfText(rendererData.isLCD), nullptr}; } else if (geometry.isVertices()) { SkVerticesPriv info(geometry.vertices()->priv()); - return renderers->vertices(info.mode(), info.hasColors(), info.hasTexCoords()); + return {renderers->vertices(info.mode(), info.hasColors(), info.hasTexCoords()), nullptr}; } else if (geometry.isEdgeAAQuad()) { SkASSERT(!requireMSAA && style.isFillStyle()); - return renderers->analyticRRect(); // handled by the same system as rects and round rects + // handled by the same system as rects and round rects + return {renderers->analyticRRect(), nullptr}; } else if (!geometry.isShape()) { // We must account for new Geometry types with specific Renderers - return nullptr; + return {nullptr, nullptr}; } const Shape& shape = geometry.shape(); // We can't use this renderer if we require MSAA for an effect (i.e. clipping or stroke+fill). if (!requireMSAA && is_simple_shape(shape, type)) { - return renderers->analyticRRect(); + return {renderers->analyticRRect(), nullptr}; + } + + // Prefer compute atlas draws if supported. This currently implicitly filters out clip draws as + // they require MSAA. Eventually we may want to route clip shapes to the atlas as well but not + // if hardware MSAA is required. + // TODO(b/285195175): There may be reasons to prefer tessellation, e.g. if the shape is large + // and hardware MSAA looks acceptable. + // TODO(b/280927548): Currently we assume `pathAtlas` is a GPU compute path atlas and select it + // if it's supported (this should be always nullptr if SK_ENABLE_VELLO_SHADERS isn't defined). + // This will likely need to provide more information about the PathAtlas' rendering algorithm + // when we support non-compute PathAtlases, which may factor into the renderer choice. + PathAtlas* pathAtlas = fDC->getOrCreatePathAtlas(fRecorder); + if (!requireMSAA && pathAtlas) { + // TODO: vello can't do correct strokes yet. Maybe this shouldn't get selected for stroke + // renders until all stroke styles are supported? + return {renderers->atlasShape(), pathAtlas}; } // If we got here, it requires tessellated path rendering or an MSAA technique applied to a @@ -1165,7 +1244,7 @@ const Renderer* Device::chooseRenderer(const Transform& localToDevice, // stenciling first with the HW stroke tessellator and then covering their bounds, but // inverse-filled strokes are not well-specified in our public canvas behavior so we may be // able to remove it. - return renderers->tessellatedStrokes(); + return {renderers->tessellatedStrokes(), nullptr}; } // 'type' could be kStrokeAndFill, but in that case chooseRenderer() is meant to return the @@ -1173,7 +1252,7 @@ const Renderer* Device::chooseRenderer(const Transform& localToDevice, if (shape.convex() && !shape.inverted()) { // TODO: Ganesh doesn't have a curve+middle-out triangles option for convex paths, but it // would be pretty trivial to spin up. - return renderers->convexTessellatedWedges(); + return {renderers->convexTessellatedWedges(), nullptr}; } else { Rect drawBounds = localToDevice.mapRect(shape.bounds()); drawBounds.intersect(fClip.conservativeBounds()); @@ -1189,9 +1268,9 @@ const Renderer* Device::chooseRenderer(const Transform& localToDevice, drawBounds.area() <= (256 * 256); if (preferWedges) { - return renderers->stencilTessellatedWedges(shape.fillType()); + return {renderers->stencilTessellatedWedges(shape.fillType()), nullptr}; } else { - return renderers->stencilTessellatedCurvesAndTris(shape.fillType()); + return {renderers->stencilTessellatedCurvesAndTris(shape.fillType()), nullptr}; } } } @@ -1203,9 +1282,9 @@ void Device::flushPendingWorkToRecorder() { // DrawPass stealing will need to share some of the same logic w/o becoming a Task. // push any pending uploads from the atlasmanager - auto atlasManager = fRecorder->priv().atlasManager(); - if (!fDC->recordTextUploads(atlasManager)) { - SKGPU_LOG_E("AtlasManager uploads have failed -- may see invalid results."); + auto textAtlasManager = fRecorder->priv().atlasProvider()->textAtlasManager(); + if (!fDC->recordTextUploads(textAtlasManager)) { + SKGPU_LOG_E("TextAtlasManager uploads have failed -- may see invalid results."); } auto uploadTask = fDC->snapUploadTask(fRecorder); @@ -1216,7 +1295,7 @@ void Device::flushPendingWorkToRecorder() { fClip.recordDeferredClipDraws(); // Snap the render pass task before snapping the compute task because creating a DrawPass may - // record DispatchGroups that it depends on (e.g. to process geometry). + // record DispatchGroups that it depends on (e.g. to process geometry or atlas draws). auto drawTask = fDC->snapRenderPassTask(fRecorder); auto computeTask = fDC->snapComputeTask(fRecorder); @@ -1276,7 +1355,8 @@ void Device::drawSpecial(SkSpecialImage* special, SkASSERT(srcToDst.isTranslate()); SkPaint paintWithShader(paint); - if (!create_img_shader_paint(std::move(img), src, sampling, &srcToDst, &paintWithShader)) { + if (!create_img_shader_paint(std::move(img), src, SkCanvas::kStrict_SrcRectConstraint ,sampling, + &srcToDst, &paintWithShader)) { return; } @@ -1310,16 +1390,15 @@ sk_sp Device::snapSpecial(const SkIRect& subset, bool forceCopy) finalSubset = SkIRect::MakeWH(view.width(), view.height()); } - return SkSpecialImage::MakeGraphite(fRecorder, - finalSubset, - kNeedNewImageUniqueID_SpecialImage, - std::move(view), - this->imageInfo().colorInfo(), - this->surfaceProps()); + return SkSpecialImages::MakeGraphite(finalSubset, + kNeedNewImageUniqueID_SpecialImage, + std::move(view), + this->imageInfo().colorInfo(), + this->surfaceProps()); } skif::Context Device::createContext(const skif::ContextInfo& ctxInfo) const { - return skif::Context::MakeGraphite(fRecorder, ctxInfo); + return skif::MakeGraphiteContext(fRecorder, ctxInfo); } TextureProxy* Device::target() { return fDC->target(); } @@ -1334,7 +1413,7 @@ TextureProxyView Device::readSurfaceView() const { sk_sp Device::convertGlyphRunListToSlug(const sktext::GlyphRunList& glyphRunList, const SkPaint& initialPaint, const SkPaint& drawingPaint) { - return sktext::gpu::SlugImpl::Make(this->asMatrixProvider(), + return sktext::gpu::SlugImpl::Make(this->localToDevice(), glyphRunList, initialPaint, drawingPaint, diff --git a/src/gpu/graphite/Device.h b/src/gpu/graphite/Device.h index 4b7a9b56e688..720ed45c0d02 100644 --- a/src/gpu/graphite/Device.h +++ b/src/gpu/graphite/Device.h @@ -10,8 +10,8 @@ #include "include/core/SkImage.h" #include "include/gpu/GpuTypes.h" +#include "src/base/SkEnumBitMask.h" #include "src/core/SkDevice.h" -#include "src/core/SkEnumBitMask.h" #include "src/gpu/graphite/ClipStack_graphite.h" #include "src/gpu/graphite/DrawOrder.h" #include "src/gpu/graphite/geom/Rect.h" @@ -23,6 +23,7 @@ class SkStrokeRec; namespace skgpu::graphite { +class PathAtlas; class BoundsManager; class Clip; class Context; @@ -61,7 +62,7 @@ class Device final : public SkBaseDevice { Device* asGraphiteDevice() override { return this; } - Recorder* recorder() { return fRecorder; } + Recorder* recorder() const override { return fRecorder; } // This call is triggered from the Recorder on its registered Devices. It is typically called // when the Recorder is abandoned or deleted. void abandonRecorder(); @@ -72,22 +73,6 @@ class Device final : public SkBaseDevice { TextureProxyView createCopy(const SkIRect* subset, Mipmapped); - void asyncRescaleAndReadPixels(const SkImageInfo& info, - SkIRect srcRect, - SkImage::RescaleGamma rescaleGamma, - SkImage::RescaleMode rescaleMode, - SkImage::ReadPixelsCallback callback, - SkImage::ReadPixelsContext context); - - void asyncRescaleAndReadPixelsYUV420(SkYUVColorSpace yuvColorSpace, - sk_sp dstColorSpace, - SkIRect srcRect, - SkISize dstSize, - SkImage::RescaleGamma rescaleGamma, - SkImage::RescaleMode, - SkImage::ReadPixelsCallback callback, - SkImage::ReadPixelsContext context); - const Transform& localToDeviceTransform(); SkStrikeDeviceInfo strikeDeviceInfo() const override; @@ -213,7 +198,8 @@ class Device final : public SkBaseDevice { void drawAtlasSubRun(const sktext::gpu::AtlasSubRun*, SkPoint drawOrigin, const SkPaint& paint, - sk_sp subRunStorage); + sk_sp subRunStorage, + sktext::gpu::RendererData); sk_sp convertGlyphRunListToSlug(const sktext::GlyphRunList& glyphRunList, const SkPaint& initialPaint, @@ -225,15 +211,21 @@ class Device final : public SkBaseDevice { // stroke-and-fill, this returns the Renderer used for the fill portion and it can be assumed // that Renderer::TessellatedStrokes() will be used for the stroke portion. // + // Depending on the preferred anti-aliasing quality and platform capabilities (such as compute + // shader support), an atlas handler for path rendering may be returned alongside the chosen + // Renderer. In that case, all fill, stroke, and stroke-and-fill styles should be rendered with + // a single recorded AtlasShape draw and the shape data should be added to the provided atlas + // handler to be scheduled for a coverage mask render. + // // TODO: Renderers may have fallbacks (e.g. pre-chop large paths, or convert stroke to fill). // Are those handled inside ChooseRenderer() where it can modify the shape, stroke? or does it // return a retry error code? or does drawGeometry() handle all the fallbacks, knowing that // a particular shape type needs to be pre-chopped? // TODO: Move this into a RendererSelector object provided by the Context. - const Renderer* chooseRenderer(const Transform& localToDevice, - const Geometry&, - const SkStrokeRec&, - bool requireMSAA) const; + std::pair chooseRenderer(const Transform& localToDevice, + const Geometry&, + const SkStrokeRec&, + bool requireMSAA) const; bool needsFlushBeforeDraw(int numNewDraws, DstReadRequirement) const; diff --git a/src/gpu/graphite/DrawAtlas.cpp b/src/gpu/graphite/DrawAtlas.cpp index f0e52f93fee6..675096770fc8 100644 --- a/src/gpu/graphite/DrawAtlas.cpp +++ b/src/gpu/graphite/DrawAtlas.cpp @@ -473,13 +473,13 @@ bool DrawAtlas::activateNewPage(Recorder* recorder) { SkASSERT(fNumActivePages < this->maxPages()); SkASSERT(!fProxies[fNumActivePages]); - auto textureInfo = recorder->priv().caps()->getDefaultSampledTextureInfo( - fColorType, - /*mipmapped=*/Mipmapped::kNo, - Protected::kNo, - Renderable::kNo); - fProxies[fNumActivePages].reset( - new TextureProxy({fTextureWidth, fTextureHeight}, textureInfo, skgpu::Budgeted::kYes)); + const Caps* caps = recorder->priv().caps(); + auto textureInfo = caps->getDefaultSampledTextureInfo(fColorType, + /*mipmapped=*/Mipmapped::kNo, + Protected::kNo, + Renderable::kNo); + fProxies[fNumActivePages] = TextureProxy::Make( + caps, {fTextureWidth, fTextureHeight}, textureInfo, skgpu::Budgeted::kYes); if (!fProxies[fNumActivePages]) { return false; } diff --git a/src/gpu/graphite/DrawAtlas.h b/src/gpu/graphite/DrawAtlas.h index 8c6470457922..ec52f62ec0d3 100644 --- a/src/gpu/graphite/DrawAtlas.h +++ b/src/gpu/graphite/DrawAtlas.h @@ -16,7 +16,6 @@ #include "src/core/SkIPoint16.h" #include "src/core/SkTHash.h" #include "src/gpu/AtlasTypes.h" -#include "src/gpu/RectanizerSkyline.h" namespace skgpu::graphite { diff --git a/src/gpu/graphite/DrawContext.cpp b/src/gpu/graphite/DrawContext.cpp index 75249011c67a..46653d9a743a 100644 --- a/src/gpu/graphite/DrawContext.cpp +++ b/src/gpu/graphite/DrawContext.cpp @@ -13,6 +13,7 @@ #include "include/gpu/graphite/Context.h" #include "include/gpu/graphite/Recorder.h" +#include "src/gpu/graphite/AtlasProvider.h" #include "src/gpu/graphite/Buffer.h" #include "src/gpu/graphite/Caps.h" #include "src/gpu/graphite/CommandBuffer.h" @@ -20,6 +21,7 @@ #include "src/gpu/graphite/ContextPriv.h" #include "src/gpu/graphite/DrawList.h" #include "src/gpu/graphite/DrawPass.h" +#include "src/gpu/graphite/PathAtlas.h" #include "src/gpu/graphite/RecorderPriv.h" #include "src/gpu/graphite/RenderPassTask.h" #include "src/gpu/graphite/ResourceTypes.h" @@ -30,7 +32,7 @@ #include "src/gpu/graphite/compute/DispatchGroup.h" #include "src/gpu/graphite/geom/BoundsManager.h" #include "src/gpu/graphite/geom/Geometry.h" -#include "src/gpu/graphite/text/AtlasManager.h" +#include "src/gpu/graphite/text/TextAtlasManager.h" namespace skgpu::graphite { @@ -87,6 +89,10 @@ void DrawContext::clear(const SkColor4f& clearColor) { // a fullscreen clear will overwrite anything that came before, so start a new DrawList // and clear any drawpasses that haven't been snapped yet fPendingDraws = std::make_unique(); + if (fComputePathAtlas) { + fComputePathAtlas->reset(); + } + fDispatchGroups.clear(); fDrawPasses.clear(); } @@ -101,7 +107,7 @@ void DrawContext::recordDraw(const Renderer* renderer, fPendingDraws->recordDraw(renderer, localToDevice, geometry, clip, ordering, paint, stroke); } -bool DrawContext::recordTextUploads(AtlasManager* am) { +bool DrawContext::recordTextUploads(TextAtlasManager* am) { return am->recordUploads(fPendingUploads.get(), /*useCachedUploads=*/false); } @@ -124,11 +130,21 @@ bool DrawContext::recordUpload(Recorder* recorder, std::move(condContext)); } +PathAtlas* DrawContext::getOrCreatePathAtlas(Recorder* recorder) { + if (!fComputePathAtlas) { + fComputePathAtlas = recorder->priv().atlasProvider()->createComputePathAtlas(recorder); + } + return fComputePathAtlas.get(); +} + void DrawContext::snapDrawPass(Recorder* recorder) { if (fPendingDraws->drawCount() == 0 && fPendingLoadOp != LoadOp::kClear) { return; } + // Instantiate the compute pass that may render an atlas texture used by this draw pass. + this->snapPathAtlasDispatches(recorder); + auto pass = DrawPass::Make(recorder, std::move(fPendingDraws), fTarget, @@ -159,20 +175,27 @@ RenderPassDesc RenderPassDesc::Make(const Caps* caps, // persistently associated with the framebuffer, in which case it's not discardable. desc.fColorAttachment.fTextureInfo = caps->getDefaultMSAATextureInfo(targetInfo, Discardable::kYes); - if (loadOp != LoadOp::kClear) { - desc.fColorAttachment.fLoadOp = LoadOp::kDiscard; + if (desc.fColorAttachment.fTextureInfo.isValid()) { + if (loadOp != LoadOp::kClear) { + desc.fColorAttachment.fLoadOp = LoadOp::kDiscard; + } else { + desc.fColorAttachment.fLoadOp = LoadOp::kClear; + } + desc.fColorAttachment.fStoreOp = StoreOp::kDiscard; + + desc.fColorResolveAttachment.fTextureInfo = targetInfo; + if (loadOp != LoadOp::kLoad) { + desc.fColorResolveAttachment.fLoadOp = LoadOp::kDiscard; + } else { + desc.fColorResolveAttachment.fLoadOp = LoadOp::kLoad; + } + desc.fColorResolveAttachment.fStoreOp = storeOp; } else { - desc.fColorAttachment.fLoadOp = LoadOp::kClear; + // fall back to single sampled + desc.fColorAttachment.fTextureInfo = targetInfo; + desc.fColorAttachment.fLoadOp = loadOp; + desc.fColorAttachment.fStoreOp = storeOp; } - desc.fColorAttachment.fStoreOp = StoreOp::kDiscard; - - desc.fColorResolveAttachment.fTextureInfo = targetInfo; - if (loadOp != LoadOp::kLoad) { - desc.fColorResolveAttachment.fLoadOp = LoadOp::kDiscard; - } else { - desc.fColorResolveAttachment.fLoadOp = LoadOp::kLoad; - } - desc.fColorResolveAttachment.fStoreOp = storeOp; } else { desc.fColorAttachment.fTextureInfo = targetInfo; desc.fColorAttachment.fLoadOp = loadOp; @@ -238,7 +261,21 @@ sk_sp DrawContext::snapComputeTask(Recorder* recorder) { if (fDispatchGroups.empty()) { return nullptr; } + SkASSERT(fDispatchGroups.size() == 1); return ComputeTask::Make(std::move(fDispatchGroups)); } +void DrawContext::snapPathAtlasDispatches(Recorder* recorder) { + if (!fComputePathAtlas) { + // Platform doesn't support compute or atlas was never initialized. + return; + } + auto dispatchGroup = fComputePathAtlas->recordDispatches(recorder); + if (dispatchGroup) { + SkASSERT(fPendingDraws->hasAtlasDraws()); + fDispatchGroups.push_back(std::move(dispatchGroup)); + } + fComputePathAtlas->reset(); +} + } // namespace skgpu::graphite diff --git a/src/gpu/graphite/DrawContext.h b/src/gpu/graphite/DrawContext.h index b7475bb925cb..183683d0aef6 100644 --- a/src/gpu/graphite/DrawContext.h +++ b/src/gpu/graphite/DrawContext.h @@ -29,11 +29,13 @@ class Geometry; class Recorder; class Transform; -class AtlasManager; class Caps; +class ComputePathAtlas; class DispatchGroup; class DrawPass; +class PathAtlas; class Task; +class TextAtlasManager; class TextureProxy; class TextureProxyView; @@ -71,7 +73,7 @@ class DrawContext final : public SkRefCnt { const PaintParams* paint, const StrokeStyle* stroke); - bool recordTextUploads(AtlasManager*); + bool recordTextUploads(TextAtlasManager*); bool recordUpload(Recorder* recorder, sk_sp targetProxy, const SkColorInfo& srcColorInfo, @@ -80,6 +82,15 @@ class DrawContext final : public SkRefCnt { const SkIRect& dstRect, std::unique_ptr); + // Returns the transient path atlas that accummulates coverage masks for atlas draws recorded to + // this SDC. The atlas gets created lazily upon request. Returns nullptr if atlas draws are not + // supported. + // + // TODO: Should this be explicit about how the atlas gets drawn (i.e. GPU compute vs CPU)? + // Currently this is assumed to use GPU compute atlas. Maybe the PathAtlas class should report + // its rendering algorithm to aid the renderer selection in `chooseRenderer`? + PathAtlas* getOrCreatePathAtlas(Recorder*); + // Ends the current DrawList being accumulated by the SDC, converting it into an optimized and // immutable DrawPass. The DrawPass will be ordered after any other snapped DrawPasses or // appended DrawPasses from a child SDC. A new DrawList is started to record subsequent drawing @@ -129,6 +140,9 @@ class DrawContext final : public SkRefCnt { private: DrawContext(sk_sp, const SkImageInfo&, const SkSurfaceProps&); + // If a compute atlas was initialized, schedule its accummulated paths to be rendered. + void snapPathAtlasDispatches(Recorder*); + sk_sp fTarget; SkImageInfo fImageInfo; const SkSurfaceProps fSurfaceProps; @@ -141,6 +155,19 @@ class DrawContext final : public SkRefCnt { StoreOp fPendingStoreOp = StoreOp::kStore; std::array fPendingClearColor = { 0, 0, 0, 0 }; + // Accummulates atlas coverage masks that are required by one or more entries in + // `fPendingDraws`. When pending draws are snapped into a new DrawPass, a compute dispatch group + // gets recorded which schedules the accummulated masks to get drawn into an atlas texture. The + // accummulated masks are then cleared which frees up the atlas for future draws. + // + // TODO: Currently every PathAtlas contains to a single texture. If multiple snapped draw + // passes resulted in multiple ComputePathAtlas dispatch groups, the later dispatches would + // overwrite the atlas texture since all compute tasks are scheduled before render tasks. This + // is currently not an issue since there is only one DrawPass per flush but we may want to + // either support one atlas texture per DrawPass or record the dispatches once per + // RenderPassTask rather than DrawPass. + std::unique_ptr fComputePathAtlas; + // Stores previously snapped DrawPasses of this DC, or inlined child DCs whose content // couldn't have been copied directly to fPendingDraws. While each DrawPass is immutable, the // list of DrawPasses is not final until there is an external dependency on the SDC's content diff --git a/src/gpu/graphite/DrawList.cpp b/src/gpu/graphite/DrawList.cpp index 9e385458b52f..ab483dc7eff4 100644 --- a/src/gpu/graphite/DrawList.cpp +++ b/src/gpu/graphite/DrawList.cpp @@ -39,6 +39,16 @@ void DrawList::recordDraw(const Renderer* renderer, fDraws.push_back({renderer, this->deduplicateTransform(localToDevice), geometry, clip, ordering, paint, stroke}); fRenderStepCount += renderer->numRenderSteps(); + +#if defined(SK_DEBUG) + if (geometry.isAtlasShape()) { + fAtlasShapeDrawCount++; + } +#endif + + if (paint && paint->dstReadRequirement() == DstReadRequirement::kTextureCopy) { + fDstCopyBounds.join(clip.drawBounds()); + } } } // namespace skgpu::graphite diff --git a/src/gpu/graphite/DrawList.h b/src/gpu/graphite/DrawList.h index 55a568d65f89..b43d8f23d1af 100644 --- a/src/gpu/graphite/DrawList.h +++ b/src/gpu/graphite/DrawList.h @@ -15,6 +15,7 @@ #include "src/gpu/graphite/DrawParams.h" #include "src/gpu/graphite/PaintParams.h" #include "src/gpu/graphite/geom/Geometry.h" +#include "src/gpu/graphite/geom/Rect.h" #include "src/gpu/graphite/geom/Transform_graphite.h" #include @@ -79,6 +80,11 @@ class DrawList { int drawCount() const { return fDraws.count(); } int renderStepCount() const { return fRenderStepCount; } + // Bounds for a dst copy required by this DrawList. + const Rect& dstCopyBounds() const { return fDstCopyBounds; } + + SkDEBUGCODE(bool hasAtlasDraws() const { return fAtlasShapeDrawCount > 0; }) + private: friend class DrawPass; @@ -103,6 +109,13 @@ class DrawList { // Running total of RenderSteps for all draws, assuming nothing is culled int fRenderStepCount; + +#if defined(SK_DEBUG) + // The number of AtlasShape draws that have been recorded. Used in debugging. + int fAtlasShapeDrawCount = 0; +#endif + + Rect fDstCopyBounds = Rect::InfiniteInverted(); }; } // namespace skgpu::graphite diff --git a/src/gpu/graphite/DrawParams.h b/src/gpu/graphite/DrawParams.h index 1da80124c7c5..9302969e6fb6 100644 --- a/src/gpu/graphite/DrawParams.h +++ b/src/gpu/graphite/DrawParams.h @@ -64,21 +64,32 @@ class StrokeStyle { class Clip { public: Clip() = default; - Clip(const Rect& drawBounds, const SkIRect& scissor) - : fDrawBounds(drawBounds) - , fScissor(scissor) {} + Clip(const Rect& drawBounds, const Rect& shapeBounds, const SkIRect& scissor) + : fDrawBounds(drawBounds), fTransformedShapeBounds(shapeBounds), fScissor(scissor) {} - const Rect& drawBounds() const { return fDrawBounds; } - const SkIRect& scissor() const { return fScissor; } + // Tight bounds of the draw, including any padding/outset for stroking and expansion due to + // inverse fill and intersected with the scissor. + const Rect& drawBounds() const { return fDrawBounds; } + + // The scissor rectangle obtained by restricting the bounds of the clip stack that affects the + // draw to the device bounds. The scissor must contain drawBounds() and must already be + // intersected with the device bounds. + const SkIRect& scissor() const { return fScissor; } + + // Clipped bounds of the shape in device space, including any padding/outset for stroking, + // intersected with the scissor and ignoring the fill rule. For a regular fill this is identical + // to drawBounds(). For an inverse fill, this is a subset of drawBounds(). + const Rect& transformedShapeBounds() const { return fTransformedShapeBounds; } + + bool isClippedOut() const { return fDrawBounds.isEmptyNegativeOrNaN(); } private: - // Draw bounds represent the tight bounds of the draw, including any padding/outset for stroking - // and intersected with the scissor. - // - DrawList assumes the DrawBounds are correct for a given shape, transform, and style. They - // are provided to the DrawList to avoid re-calculating the same bounds. + // DrawList assumes the DrawBounds are correct for a given shape, transform, and style. They + // are provided to the DrawList to avoid re-calculating the same bounds. Rect fDrawBounds; - // The scissor must contain fDrawBounds, and must already be intersected with the device bounds. + Rect fTransformedShapeBounds; SkIRect fScissor; + // TODO: If we add more complex analytic shapes for clipping, e.g. coverage rrect, it should // go here. }; diff --git a/src/gpu/graphite/DrawPass.cpp b/src/gpu/graphite/DrawPass.cpp index d9944eefc207..b67d0d809440 100644 --- a/src/gpu/graphite/DrawPass.cpp +++ b/src/gpu/graphite/DrawPass.cpp @@ -31,7 +31,6 @@ #include "src/gpu/graphite/ResourceProvider.h" #include "src/gpu/graphite/Sampler.h" #include "src/gpu/graphite/Texture.h" -#include "src/gpu/graphite/TextureProxy.h" #include "src/gpu/graphite/UniformManager.h" #include "src/gpu/graphite/geom/BoundsManager.h" @@ -125,7 +124,7 @@ struct TextureBinding { } }; -using UniformSsboCache = DenseBiMap; +using UniformCache = DenseBiMap; using TextureBindingCache = DenseBiMap; using GraphicsPipelineCache = DenseBiMap; @@ -195,16 +194,16 @@ class TextureBindingTracker { // Collects and writes uniform data either to uniform buffers or to shared storage buffers, and // tracks when bindings need to change between draws. -class UniformSsboTracker { +class UniformTracker { public: - UniformSsboTracker(bool useStorageBuffers) : fUseStorageBuffers(useStorageBuffers) {} + UniformTracker(bool useStorageBuffers) : fUseStorageBuffers(useStorageBuffers) {} - // Maps a given {pipeline index, uniform data cache index} pair to an SSBO index within the + // Maps a given {pipeline index, uniform data cache index} pair to a buffer index within the // pipeline's accumulated array of uniforms. - UniformSsboCache::Index trackUniforms(GraphicsPipelineCache::Index pipelineIndex, - const UniformDataBlock* cpuData) { + UniformCache::Index trackUniforms(GraphicsPipelineCache::Index pipelineIndex, + const UniformDataBlock* cpuData) { if (!cpuData) { - return UniformSsboCache::kInvalidIndex; + return UniformCache::kInvalidIndex; } if (pipelineIndex >= SkToU32(fPerPipelineCaches.size())) { @@ -215,11 +214,11 @@ class UniformSsboTracker { } // Writes all tracked uniform data into buffers, tracking the bindings for the written buffers - // by GraphicsPipelineCache::Index and possibly the UniformSsboCache::Index (when not using - // SSBOs). When using SSBos, the buffer is the same for all UniformSsboCache::Indices that share - // the same pipeline (and is stored in index 0). + // by GraphicsPipelineCache::Index and possibly the UniformCache::Index (when not using SSBOs). + // When using SSBOs, the buffer is the same for all UniformCache::Indices that share the same + // pipeline (and is stored in index 0). void writeUniforms(DrawBufferManager* bufferMgr) { - for (UniformSsboCache& cache : fPerPipelineCaches) { + for (UniformCache& cache : fPerPipelineCaches) { if (cache.empty()) { continue; } @@ -247,22 +246,22 @@ class UniformSsboTracker { } } - // Updates the current tracked pipeline and ssbo index and returns whether or not bindBuffers() - // needs to be called, depending on if 'fUseStorageBuffers' is true or not. + // Updates the current tracked pipeline and uniform index and returns whether or not + // bindBuffers() needs to be called, depending on if 'fUseStorageBuffers' is true or not. bool setCurrentUniforms(GraphicsPipelineCache::Index pipelineIndex, - UniformSsboCache::Index ssboIndex) { - if (ssboIndex >= UniformSsboCache::kInvalidIndex) { + UniformCache::Index uniformIndex) { + if (uniformIndex >= UniformCache::kInvalidIndex) { return false; } SkASSERT(pipelineIndex < SkToU32(fPerPipelineCaches.size()) && - ssboIndex < fPerPipelineCaches[pipelineIndex].size()); + uniformIndex < fPerPipelineCaches[pipelineIndex].size()); if (fUseStorageBuffers) { - ssboIndex = 0; // The specific index has no effect on binding + uniformIndex = 0; // The specific index has no effect on binding } - if (fLastPipeline != pipelineIndex || fLastIndex != ssboIndex) { + if (fLastPipeline != pipelineIndex || fLastIndex != uniformIndex) { fLastPipeline = pipelineIndex; - fLastIndex = ssboIndex; + fLastIndex = uniformIndex; return true; } else { return false; @@ -273,7 +272,7 @@ class UniformSsboTracker { // data cache index. void bindUniforms(UniformSlot slot, DrawPassCommands::List* commandList) { SkASSERT(fLastPipeline < GraphicsPipelineCache::kInvalidIndex && - fLastIndex < UniformSsboCache::kInvalidIndex); + fLastIndex < UniformCache::kInvalidIndex); SkASSERT(!fUseStorageBuffers || fLastIndex == 0); const BindBufferInfo& binding = fPerPipelineCaches[fLastPipeline].lookup(fLastIndex).fGpuData; @@ -281,15 +280,15 @@ class UniformSsboTracker { } private: - // Access first by pipeline index. The final UniformSsboCache::Index is either used to select - // the BindBufferInfo for a draw using UBOs, or it's the real index into a packed array of - // uniforms in a storage buffer object (whose binding is stored in index 0). - TArray fPerPipelineCaches; + // Access first by pipeline index. The final UniformCache::Index is either used to select the + // BindBufferInfo for a draw using UBOs, or it's the real index into a packed array of uniforms + // in a storage buffer object (whose binding is stored in index 0). + TArray fPerPipelineCaches; const bool fUseStorageBuffers; GraphicsPipelineCache::Index fLastPipeline = GraphicsPipelineCache::kInvalidIndex; - UniformSsboCache::Index fLastIndex = UniformSsboCache::kInvalidIndex; + UniformCache::Index fLastIndex = UniformCache::kInvalidIndex; }; } // namespace @@ -324,15 +323,15 @@ class DrawPass::SortKey { SortKey(const DrawList::Draw* draw, int renderStep, GraphicsPipelineCache::Index pipelineIndex, - UniformSsboCache::Index geomSsboIndex, - UniformSsboCache::Index shadingSsboIndex, + UniformCache::Index geomUniformIndex, + UniformCache::Index shadingUniformIndex, TextureBindingCache::Index textureBindingIndex) : fPipelineKey(ColorDepthOrderField::set(draw->fDrawParams.order().paintOrder().bits()) | StencilIndexField::set(draw->fDrawParams.order().stencilIndex().bits()) | RenderStepField::set(static_cast(renderStep)) | PipelineField::set(pipelineIndex)) - , fUniformKey(GeometryUniformField::set(geomSsboIndex) | - ShadingUniformField::set(shadingSsboIndex) | + , fUniformKey(GeometryUniformField::set(geomUniformIndex) | + ShadingUniformField::set(shadingUniformIndex) | TextureBindingsField::set(textureBindingIndex)) , fDraw(draw) { SkASSERT(pipelineIndex < GraphicsPipelineCache::kInvalidIndex); @@ -353,10 +352,10 @@ class DrawPass::SortKey { GraphicsPipelineCache::Index pipelineIndex() const { return PipelineField::get(fPipelineKey); } - UniformSsboCache::Index geometrySsboIndex() const { + UniformCache::Index geometryUniformIndex() const { return GeometryUniformField::get(fUniformKey); } - UniformSsboCache::Index shadingSsboIndex() const { + UniformCache::Index shadingUniformIndex() const { return ShadingUniformField::get(fUniformKey); } TextureBindingCache::Index textureBindingIndex() const { @@ -401,15 +400,13 @@ class DrawPass::SortKey { sk_sp add_copy_target_task(Recorder* recorder, sk_sp target, - const SkImageInfo& targetInfo) { + const SkImageInfo& targetInfo, + const SkIPoint& targetOffset) { SkASSERT(recorder->priv().caps()->isTexturable(target->textureInfo())); - SkIRect dstSrcRect = SkIRect::MakeSize(targetInfo.dimensions()); + SkIRect dstSrcRect = SkIRect::MakePtSize(targetOffset, targetInfo.dimensions()); sk_sp copy = TextureProxy::Make(recorder->priv().caps(), - dstSrcRect.size(), - targetInfo.colorType(), - Mipmapped::kNo, - target->textureInfo().isProtected(), - Renderable::kNo, + targetInfo.dimensions(), + target->textureInfo(), skgpu::Budgeted::kYes); if (!copy) { return nullptr; @@ -476,12 +473,12 @@ std::unique_ptr DrawPass::Make(Recorder* recorder, const ResourceBindingRequirements& bindingReqs = recorder->priv().caps()->resourceBindingRequirements(); Layout geometryUniformLayout = bindingReqs.fUniformBufferLayout; - UniformSsboTracker geometrySsboTracker(/*useStorageBuffers=*/false); + UniformTracker geometryUniformTracker(/*useStorageBuffers=*/false); bool useStorageBuffers = recorder->priv().caps()->storageBufferPreferred(); Layout shadingUniformLayout = useStorageBuffers ? bindingReqs.fStorageBufferLayout : bindingReqs.fUniformBufferLayout; - UniformSsboTracker shadingSsboTracker(useStorageBuffers); + UniformTracker shadingUniformTracker(useStorageBuffers); TextureBindingTracker textureBindingTracker; ShaderCodeDictionary* dict = recorder->priv().shaderCodeDictionary(); @@ -493,9 +490,18 @@ std::unique_ptr DrawPass::Make(Recorder* recorder, // Copy of destination, if needed. sk_sp dst; + SkIPoint dstOffset; + if (!draws->dstCopyBounds().isEmptyNegativeOrNaN()) { + SkIRect dstCopyPixelBounds = draws->dstCopyBounds().makeRoundOut().asSkIRect(); + dstOffset = dstCopyPixelBounds.topLeft(); + dst = add_copy_target_task( + recorder, target, targetInfo.makeDimensions(dstCopyPixelBounds.size()), dstOffset); + SkASSERT(dst); + } std::vector keys; keys.reserve(draws->renderStepCount()); + for (const DrawList::Draw& draw : draws->fDraws.items()) { // If we have two different descriptors, such that the uniforms from the PaintParams can be // bound independently of those used by the rest of the RenderStep, then we can upload now @@ -504,16 +510,10 @@ std::unique_ptr DrawPass::Make(Recorder* recorder, const UniformDataBlock* shadingUniforms = nullptr; const TextureDataBlock* paintTextures = nullptr; if (draw.fPaintParams.has_value()) { - TextureProxy* curDst = nullptr; - if (draw.fPaintParams->dstReadRequirement() == DstReadRequirement::kTextureCopy) { - // TODO(b/274811856) Only copy a subset of the render target that we need for draws - // needing a dst copy, and pass in uniforms to offset the dst sample coords. - if (!dst) { - dst = add_copy_target_task(recorder, target, targetInfo); - SkASSERT(dst); - } - curDst = dst.get(); - } + sk_sp curDst = + draw.fPaintParams->dstReadRequirement() == DstReadRequirement::kTextureCopy + ? dst + : nullptr; std::tie(shaderID, shadingUniforms, paintTextures) = ExtractPaintData(recorder, &gatherer, @@ -521,7 +521,8 @@ std::unique_ptr DrawPass::Make(Recorder* recorder, shadingUniformLayout, draw.fDrawParams.transform(), draw.fPaintParams.value(), - curDst ? sk_ref_sp(curDst) : nullptr, + curDst, + dstOffset, targetInfo.colorInfo()); } // else depth-only @@ -538,15 +539,15 @@ std::unique_ptr DrawPass::Make(Recorder* recorder, step, draw.fDrawParams); - UniformSsboCache::Index geomSsboIndex = geometrySsboTracker.trackUniforms( + UniformCache::Index geomUniformIndex = geometryUniformTracker.trackUniforms( pipelineIndex, geometryUniforms); - UniformSsboCache::Index shadingSsboIndex = shadingSsboTracker.trackUniforms( + UniformCache::Index shadingUniformIndex = shadingUniformTracker.trackUniforms( pipelineIndex, performsShading ? shadingUniforms : nullptr); TextureBindingCache::Index textureIndex = textureBindingTracker.trackTextures( performsShading ? paintTextures : nullptr, stepTextures); keys.push_back({&draw, stepIndex, pipelineIndex, - geomSsboIndex, shadingSsboIndex, textureIndex}); + geomUniformIndex, shadingUniformIndex, textureIndex}); } passBounds.join(draw.fDrawParams.clip().drawBounds()); @@ -554,8 +555,8 @@ std::unique_ptr DrawPass::Make(Recorder* recorder, drawPass->fRequiresMSAA |= draw.fRenderer->requiresMSAA(); } - geometrySsboTracker.writeUniforms(bufferMgr); - shadingSsboTracker.writeUniforms(bufferMgr); + geometryUniformTracker.writeUniforms(bufferMgr); + shadingUniformTracker.writeUniforms(bufferMgr); // TODO: Explore sorting algorithms; in all likelihood this will be mostly sorted already, so // algorithms that approach O(n) in that condition may be favorable. Alternatively, could @@ -581,10 +582,10 @@ std::unique_ptr DrawPass::Make(Recorder* recorder, const bool pipelineChange = key.pipelineIndex() != lastPipeline; - const bool geomBindingChange = geometrySsboTracker.setCurrentUniforms( - key.pipelineIndex(), key.geometrySsboIndex()); - const bool shadingBindingChange = shadingSsboTracker.setCurrentUniforms( - key.pipelineIndex(), key.shadingSsboIndex()); + const bool geomBindingChange = geometryUniformTracker.setCurrentUniforms( + key.pipelineIndex(), key.geometryUniformIndex()); + const bool shadingBindingChange = shadingUniformTracker.setCurrentUniforms( + key.pipelineIndex(), key.shadingUniformIndex()); const bool textureBindingsChange = textureBindingTracker.setCurrentTextureBindings( key.textureBindingIndex()); const SkIRect* newScissor = draw.fDrawParams.clip().scissor() != lastScissor ? @@ -612,10 +613,11 @@ std::unique_ptr DrawPass::Make(Recorder* recorder, } if (stateChange) { if (geomBindingChange) { - geometrySsboTracker.bindUniforms(UniformSlot::kRenderStep, &drawPass->fCommandList); + geometryUniformTracker.bindUniforms(UniformSlot::kRenderStep, + &drawPass->fCommandList); } if (shadingBindingChange) { - shadingSsboTracker.bindUniforms(UniformSlot::kPaint, &drawPass->fCommandList); + shadingUniformTracker.bindUniforms(UniformSlot::kPaint, &drawPass->fCommandList); } if (textureBindingsChange) { textureBindingTracker.bindTextures(&drawPass->fCommandList); @@ -626,7 +628,7 @@ std::unique_ptr DrawPass::Make(Recorder* recorder, } } - renderStep.writeVertices(&drawWriter, draw.fDrawParams, key.shadingSsboIndex()); + renderStep.writeVertices(&drawWriter, draw.fDrawParams, key.shadingUniformIndex()); } // Finish recording draw calls for any collected data at the end of the loop drawWriter.flush(); diff --git a/src/gpu/graphite/DrawPass.h b/src/gpu/graphite/DrawPass.h index 7744e16894e3..e293a51c06ad 100644 --- a/src/gpu/graphite/DrawPass.h +++ b/src/gpu/graphite/DrawPass.h @@ -12,12 +12,13 @@ #include "include/core/SkRect.h" #include "include/core/SkRefCnt.h" #include "include/private/base/SkTArray.h" -#include "src/core/SkEnumBitMask.h" +#include "src/base/SkEnumBitMask.h" #include "src/gpu/graphite/AttachmentTypes.h" #include "src/gpu/graphite/DrawCommands.h" #include "src/gpu/graphite/DrawTypes.h" #include "src/gpu/graphite/GraphicsPipelineDesc.h" #include "src/gpu/graphite/ResourceTypes.h" +#include "src/gpu/graphite/TextureProxy.h" #include @@ -35,7 +36,6 @@ class ResourceProvider; class RuntimeEffectDictionary; class Sampler; class TextureDataBlock; -class TextureProxy; class Texture; enum class UniformSlot; @@ -94,6 +94,8 @@ class DrawPass { const Texture* getTexture(size_t index) const; const Sampler* getSampler(size_t index) const; + skia_private::TArray> sampledTextures() const { return fSampledTextures; } + void addResourceRefs(CommandBuffer*) const; private: diff --git a/src/gpu/graphite/DrawTypes.h b/src/gpu/graphite/DrawTypes.h index 9baa06f686fe..daa47696f69a 100644 --- a/src/gpu/graphite/DrawTypes.h +++ b/src/gpu/graphite/DrawTypes.h @@ -10,9 +10,6 @@ #include "include/gpu/graphite/GraphiteTypes.h" -#include "include/core/SkSamplingOptions.h" -#include "include/core/SkTileMode.h" - #include "src/gpu/graphite/ResourceTypes.h" #include @@ -145,44 +142,6 @@ static constexpr inline size_t VertexAttribTypeSize(VertexAttribType type) { SkUNREACHABLE; } -/** - * Struct used to describe how a Texture/TextureProxy/TextureProxyView is sampled. - */ -struct SamplerDesc { - static_assert(kSkTileModeCount <= 4 && kSkFilterModeCount <= 2 && kSkMipmapModeCount <= 4); - SamplerDesc(const SkSamplingOptions& samplingOptions, const SkTileMode tileModes[2]) - : fDesc((static_cast(tileModes[0]) << 0) | - (static_cast(tileModes[1]) << 2) | - (static_cast(samplingOptions.filter) << 4) | - (static_cast(samplingOptions.mipmap) << 5)) { - // Cubic sampling is handled in a shader, with the actual texture sampled by with NN, - // but that is what a cubic SkSamplingOptions is set to if you ignore 'cubic', which let's - // us simplify how we construct SamplerDec's from the options passed to high-level draws. - SkASSERT(!samplingOptions.useCubic || (samplingOptions.filter == SkFilterMode::kNearest && - samplingOptions.mipmap == SkMipmapMode::kNone)); - } - - SamplerDesc(const SamplerDesc&) = default; - - bool operator==(const SamplerDesc& o) const { return o.fDesc == fDesc; } - bool operator!=(const SamplerDesc& o) const { return o.fDesc != fDesc; } - - SkTileMode tileModeX() const { return static_cast((fDesc >> 0) & 0b11); } - SkTileMode tileModeY() const { return static_cast((fDesc >> 2) & 0b11); } - - // NOTE: returns the HW sampling options to use, so a bicubic SkSamplingOptions will become - // nearest-neighbor sampling in HW. - SkSamplingOptions samplingOptions() const { - // TODO: Add support for anisotropic filtering - SkFilterMode filter = static_cast((fDesc >> 4) & 0b01); - SkMipmapMode mipmap = static_cast((fDesc >> 5) & 0b11); - return SkSamplingOptions(filter, mipmap); - } - -private: - uint32_t fDesc; -}; - enum class UniformSlot { // TODO: Want this? // Meant for uniforms that change rarely to never over the course of a render pass diff --git a/src/gpu/graphite/FactoryFunctions.cpp b/src/gpu/graphite/FactoryFunctions.cpp index e4ddff0e5ce5..b4c763909d20 100644 --- a/src/gpu/graphite/FactoryFunctions.cpp +++ b/src/gpu/graphite/FactoryFunctions.cpp @@ -273,13 +273,20 @@ class PrecompileImageShader : public PrecompileShader { PrecompileImageShader() {} private: + int numIntrinsicCombinations() const override { + return 2; // cubic and non-cubic sampling + } + void addToKey(const KeyContext& keyContext, int desiredCombination, PaintParamsKeyBuilder* builder) const override { - SkASSERT(desiredCombination == 0); - - ImageShaderBlock::BeginBlock(keyContext, builder, - /* gatherer= */ nullptr, /* imgData= */ nullptr); + if (desiredCombination == 0) { + ImageShaderBlock::BeginBlock(keyContext, builder, + /* gatherer= */ nullptr, /* imgData= */ nullptr); + } else { + ImageShaderBlock::BeginCubicBlock(keyContext, builder, + /* gatherer= */ nullptr, /* imgData= */ nullptr); + } builder->endBlock(); } }; diff --git a/src/gpu/graphite/GlobalCache.cpp b/src/gpu/graphite/GlobalCache.cpp index 41973c48357b..61c14662b3a9 100644 --- a/src/gpu/graphite/GlobalCache.cpp +++ b/src/gpu/graphite/GlobalCache.cpp @@ -67,6 +67,15 @@ void GlobalCache::resetGraphicsPipelines() { fGraphicsPipelineCache.reset(); } + +void GlobalCache::forEachGraphicsPipeline( + const std::function& fn) { + SkAutoSpinlock lock{fSpinLock}; + + fGraphicsPipelineCache.foreach([&](const UniqueKey* k, const sk_sp* v) { + fn(*k, v->get()); + }); +} #endif // GRAPHITE_TEST_UTILS sk_sp GlobalCache::findComputePipeline(const UniqueKey& key) { diff --git a/src/gpu/graphite/GlobalCache.h b/src/gpu/graphite/GlobalCache.h index a39ee63800d9..a38504f985e3 100644 --- a/src/gpu/graphite/GlobalCache.h +++ b/src/gpu/graphite/GlobalCache.h @@ -14,6 +14,7 @@ #include "src/core/SkLRUCache.h" #include "src/gpu/ResourceKey.h" +#include namespace skgpu::graphite { @@ -42,6 +43,7 @@ class GlobalCache { // Find a cached GraphicsPipeline that matches the associated key. sk_sp findGraphicsPipeline(const UniqueKey&) SK_EXCLUDES(fSpinLock); + // Associate the given pipeline with the key. If the key has already had a separate pipeline // associated with the key, that pipeline is returned and the passed-in pipeline is discarded. // Otherwise, the passed-in pipeline is held by the GlobalCache and also returned back. @@ -51,9 +53,12 @@ class GlobalCache { #if GRAPHITE_TEST_UTILS int numGraphicsPipelines() const SK_EXCLUDES(fSpinLock); void resetGraphicsPipelines() SK_EXCLUDES(fSpinLock); + void forEachGraphicsPipeline( + const std::function& fn) + SK_EXCLUDES(fSpinLock); #endif - // Find amd add operations for ComputePipelines, with the same pattern as GraphicsPipelines. + // Find and add operations for ComputePipelines, with the same pattern as GraphicsPipelines. sk_sp findComputePipeline(const UniqueKey&) SK_EXCLUDES(fSpinLock); sk_sp addComputePipeline(const UniqueKey&, sk_sp) SK_EXCLUDES(fSpinLock); @@ -84,6 +89,6 @@ class GlobalCache { skia_private::TArray> fStaticResource SK_GUARDED_BY(fSpinLock); }; -} // namespace skgpu::graphite +} // namespace skgpu::graphite #endif // skgpu_graphite_GlobalCache_DEFINED diff --git a/src/gpu/graphite/GraphicsPipeline.cpp b/src/gpu/graphite/GraphicsPipeline.cpp index 0bdebeb69ecf..c67c2536643f 100644 --- a/src/gpu/graphite/GraphicsPipeline.cpp +++ b/src/gpu/graphite/GraphicsPipeline.cpp @@ -6,13 +6,24 @@ */ #include "src/gpu/graphite/GraphicsPipeline.h" +#include "src/utils/SkShaderUtils.h" namespace skgpu::graphite { -GraphicsPipeline::GraphicsPipeline(const SharedContext* sharedContext) - : Resource(sharedContext, Ownership::kOwned, skgpu::Budgeted::kYes, /*gpuMemorySize=*/0) {} - -GraphicsPipeline::~GraphicsPipeline() { +GraphicsPipeline::GraphicsPipeline(const SharedContext* sharedContext, Shaders* pipelineShaders) + : Resource(sharedContext, Ownership::kOwned, skgpu::Budgeted::kYes, /*gpuMemorySize=*/0) { +#if GRAPHITE_TEST_UTILS + if (pipelineShaders) { + fPipelineShaders.fSkSLVertexShader = + SkShaderUtils::PrettyPrint(pipelineShaders->fSkSLVertexShader); + fPipelineShaders.fSkSLFragmentShader = + SkShaderUtils::PrettyPrint(pipelineShaders->fSkSLFragmentShader); + fPipelineShaders.fNativeVertexShader = std::move(pipelineShaders->fNativeVertexShader); + fPipelineShaders.fNativeFragmentShader = std::move(pipelineShaders->fNativeFragmentShader); + } +#endif } -} // namespace skgpu::graphite +GraphicsPipeline::~GraphicsPipeline() = default; + +} // namespace skgpu::graphite diff --git a/src/gpu/graphite/GraphicsPipeline.h b/src/gpu/graphite/GraphicsPipeline.h index e80944ee9322..231a2f77b767 100644 --- a/src/gpu/graphite/GraphicsPipeline.h +++ b/src/gpu/graphite/GraphicsPipeline.h @@ -26,12 +26,30 @@ class GraphicsPipeline : public Resource { public: ~GraphicsPipeline() override; +#if GRAPHITE_TEST_UTILS + struct Shaders { + std::string fSkSLVertexShader; + std::string fSkSLFragmentShader; + std::string fNativeVertexShader; + std::string fNativeFragmentShader; + }; + + const Shaders& getPipelineShaders() const { + return fPipelineShaders; + } +#else + struct Shaders; +#endif + protected: - GraphicsPipeline(const SharedContext*); + GraphicsPipeline(const SharedContext*, Shaders*); private: +#if GRAPHITE_TEST_UTILS + Shaders fPipelineShaders; +#endif }; -} // namespace skgpu::graphite +} // namespace skgpu::graphite #endif // skgpu_graphite_GraphicsPipeline_DEFINED diff --git a/src/gpu/graphite/ImageFactories.cpp b/src/gpu/graphite/ImageFactories.cpp index 7f97670cec33..1c460876af73 100644 --- a/src/gpu/graphite/ImageFactories.cpp +++ b/src/gpu/graphite/ImageFactories.cpp @@ -87,7 +87,8 @@ sk_sp AdoptTextureFrom(Recorder* recorder, } texture->setReleaseCallback(std::move(releaseHelper)); - sk_sp proxy(new TextureProxy(std::move(texture))); + sk_sp proxy = TextureProxy::Wrap(std::move(texture)); + SkASSERT(proxy); skgpu::Swizzle swizzle = caps->getReadSwizzle(ct, backendTex.info()); TextureProxyView view(std::move(proxy), swizzle); @@ -126,7 +127,8 @@ sk_sp PromiseTextureFrom(Recorder* recorder, return nullptr; } - sk_sp proxy = Image::MakePromiseImageLazyProxy(dimensions, + sk_sp proxy = Image::MakePromiseImageLazyProxy(caps, + dimensions, textureInfo, isVolatile, fulfillProc, @@ -180,7 +182,8 @@ SK_API sk_sp PromiseTextureFromYUVA(skgpu::graphite::Recorder* recorder // Make a lazy proxy for each plane sk_sp proxies[4]; for (int p = 0; p < numPlanes; ++p) { - proxies[p] = Image_YUVA::MakePromiseImageLazyProxy(planeDimensions[p], + proxies[p] = Image_YUVA::MakePromiseImageLazyProxy(recorder->priv().caps(), + planeDimensions[p], backendTextureInfo.planeTextureInfo(p), isVolatile, fulfillProc, @@ -315,7 +318,7 @@ sk_sp TextureFromYUVAPixmaps(Recorder* recorder, bool limitToMaxTextureSize, sk_sp imageColorSpace) { if (!recorder) { - return nullptr; // until we impl this for raster backend + return nullptr; } if (!pixmaps.isValid()) { @@ -399,7 +402,8 @@ sk_sp TextureFromYUVATextures(Recorder* recorder, } texture->setReleaseCallback(releaseHelper); - sk_sp proxy(new TextureProxy(std::move(texture))); + sk_sp proxy = TextureProxy::Wrap(std::move(texture)); + SkASSERT(proxy); textureProxyViews[plane] = TextureProxyView(std::move(proxy)); } YUVATextureProxies yuvaProxies(recorder, diff --git a/src/gpu/graphite/ImageUtils.cpp b/src/gpu/graphite/ImageUtils.cpp index 185d4bd71560..2f008bc8bfad 100644 --- a/src/gpu/graphite/ImageUtils.cpp +++ b/src/gpu/graphite/ImageUtils.cpp @@ -7,11 +7,17 @@ #include "src/gpu/graphite/ImageUtils.h" +#include "include/core/SkBitmap.h" #include "include/gpu/graphite/ImageProvider.h" #include "include/gpu/graphite/Recorder.h" +#include "src/core/SkImageFilterTypes.h" #include "src/core/SkSamplingPriv.h" +#include "src/core/SkSpecialSurface.h" +#include "src/gpu/graphite/Caps.h" #include "src/gpu/graphite/Image_Graphite.h" #include "src/gpu/graphite/Log.h" +#include "src/gpu/graphite/RecorderPriv.h" +#include "src/gpu/graphite/SpecialImage_Graphite.h" #include "src/image/SkImage_Base.h" namespace { @@ -111,3 +117,39 @@ std::tuple AsView(Recorder* reco } } // namespace skgpu::graphite + +namespace skif { + +Context MakeGraphiteContext(skgpu::graphite::Recorder* recorder, + const ContextInfo& info) { + SkASSERT(recorder); + SkASSERT(!info.fSource.image() || info.fSource.image()->isGraphiteBacked()); + + auto makeSurfaceFunctor = [recorder](const SkImageInfo& imageInfo, + const SkSurfaceProps* props) { + return SkSpecialSurfaces::MakeGraphite(recorder, imageInfo, *props); + }; + auto makeImageCallback = [recorder](const SkIRect& subset, + sk_sp image, + const SkSurfaceProps& props) { + // This just makes a raster image, but it could maybe call MakeFromGraphite + return SkSpecialImages::MakeGraphite(recorder, subset, image, props); + }; + auto makeCachedBitmapCallback = [recorder](const SkBitmap& data) -> sk_sp { + auto proxy = skgpu::graphite::RecorderPriv::CreateCachedProxy(recorder, data); + if (!proxy) { + return nullptr; + } + + const SkColorInfo& colorInfo = data.info().colorInfo(); + skgpu::Swizzle swizzle = recorder->priv().caps()->getReadSwizzle(colorInfo.colorType(), + proxy->textureInfo()); + return sk_make_sp( + data.getGenerationID(), + skgpu::graphite::TextureProxyView(std::move(proxy), swizzle), + colorInfo); + }; + + return Context(info, nullptr, makeSurfaceFunctor, makeImageCallback, makeCachedBitmapCallback); +} +} // namespace skif diff --git a/src/gpu/graphite/ImageUtils.h b/src/gpu/graphite/ImageUtils.h index 3a3379cf4907..6900e5480221 100644 --- a/src/gpu/graphite/ImageUtils.h +++ b/src/gpu/graphite/ImageUtils.h @@ -11,6 +11,9 @@ #include "include/core/SkRefCnt.h" #include "include/gpu/GpuTypes.h" +#include +#include + enum SkColorType : int; class SkImage; struct SkSamplingOptions; @@ -30,4 +33,11 @@ std::pair, SkSamplingOptions> GetGraphiteBacked(Recorder*, } // namespace skgpu::graphite +namespace skif { +class Context; +struct ContextInfo; +Context MakeGraphiteContext(skgpu::graphite::Recorder* recorder, + const ContextInfo& info); +} // namespace skif + #endif // skgpu_graphite_ImageUtils_DEFINED diff --git a/src/gpu/graphite/Image_Base_Graphite.cpp b/src/gpu/graphite/Image_Base_Graphite.cpp index a95bb3b92423..b12f532e34fb 100644 --- a/src/gpu/graphite/Image_Base_Graphite.cpp +++ b/src/gpu/graphite/Image_Base_Graphite.cpp @@ -36,6 +36,7 @@ void Image_Base::onAsyncRescaleAndReadPixels(const SkImageInfo& info, } void Image_Base::onAsyncRescaleAndReadPixelsYUV420(SkYUVColorSpace yuvColorSpace, + bool readAlpha, sk_sp dstColorSpace, const SkIRect srcRect, const SkISize dstSize, diff --git a/src/gpu/graphite/Image_Base_Graphite.h b/src/gpu/graphite/Image_Base_Graphite.h index f8844a83ad85..7543cbffe4f5 100644 --- a/src/gpu/graphite/Image_Base_Graphite.h +++ b/src/gpu/graphite/Image_Base_Graphite.h @@ -53,6 +53,7 @@ class Image_Base : public SkImage_Base { ReadPixelsContext) const override; void onAsyncRescaleAndReadPixelsYUV420(SkYUVColorSpace, + bool readAlpha, sk_sp, SkIRect srcRect, SkISize dstSize, diff --git a/src/gpu/graphite/Image_Graphite.cpp b/src/gpu/graphite/Image_Graphite.cpp index 686262dbf459..f058e97f0cdb 100644 --- a/src/gpu/graphite/Image_Graphite.cpp +++ b/src/gpu/graphite/Image_Graphite.cpp @@ -33,6 +33,18 @@ Image::Image(uint32_t uniqueID, Image::~Image() {} +size_t Image::textureSize() const { + if (!fTextureProxyView.proxy()) { + return 0; + } + + if (!fTextureProxyView.proxy()->texture()) { + return fTextureProxyView.proxy()->uninstantiatedGpuMemorySize(); + } + + return fTextureProxyView.proxy()->texture()->gpuMemorySize(); +} + sk_sp Image::onMakeSubset(Recorder* recorder, const SkIRect& subset, RequiredProperties requiredProps) const { @@ -109,6 +121,7 @@ using SkImages::GraphitePromiseImageFulfillProc; using SkImages::GraphitePromiseTextureReleaseProc; sk_sp Image::MakePromiseImageLazyProxy( + const Caps* caps, SkISize dimensions, TextureInfo textureInfo, Volatile isVolatile, @@ -175,20 +188,10 @@ sk_sp Image::MakePromiseImageLazyProxy( } callback(fulfillProc, std::move(releaseHelper), textureReleaseProc); - return TextureProxy::MakeLazy(dimensions, + return TextureProxy::MakeLazy(caps, + dimensions, textureInfo, skgpu::Budgeted::kNo, // This is destined for a user's SkImage isVolatile, std::move(callback)); } - -#if !defined(SK_DISABLE_LEGACY_GRAPHITE_IMAGE_METHODS) -#include "include/gpu/graphite/Image.h" - -sk_sp SkImage::makeTextureImage(skgpu::graphite::Recorder* recorder, - RequiredImageProperties props) const { - auto mm = props.fMipmapped == skgpu::Mipmapped::kYes; - return SkImages::TextureFromImage(recorder, this, {mm}); -} -#endif - diff --git a/src/gpu/graphite/Image_Graphite.h b/src/gpu/graphite/Image_Graphite.h index 7303052fd419..6d428d64796d 100644 --- a/src/gpu/graphite/Image_Graphite.h +++ b/src/gpu/graphite/Image_Graphite.h @@ -33,11 +33,14 @@ class Image final : public Image_Base { SkImage_Base::Type type() const override { return SkImage_Base::Type::kGraphite; } + size_t textureSize() const override; + sk_sp onReinterpretColorSpace(sk_sp) const override; TextureProxyView textureProxyView() const { return fTextureProxyView; } static sk_sp MakePromiseImageLazyProxy( + const Caps*, SkISize dimensions, TextureInfo, Volatile, diff --git a/src/gpu/graphite/Image_YUVA_Graphite.cpp b/src/gpu/graphite/Image_YUVA_Graphite.cpp index 98b5133859a8..27e07e07ada7 100644 --- a/src/gpu/graphite/Image_YUVA_Graphite.cpp +++ b/src/gpu/graphite/Image_YUVA_Graphite.cpp @@ -50,6 +50,16 @@ Image_YUVA::Image_YUVA(uint32_t uniqueID, SkASSERT(fYUVAProxies.isValid()); } +size_t Image_YUVA::textureSize() const { + size_t size = 0; + for (int i = 0; i < fYUVAProxies.numPlanes(); ++i) { + if (fYUVAProxies.proxy(i)->texture()) { + size += fYUVAProxies.proxy(i)->texture()->gpuMemorySize(); + } + } + return size; +} + } // namespace skgpu::graphite using namespace skgpu::graphite; @@ -58,6 +68,7 @@ using SkImages::GraphitePromiseTextureContext; using SkImages::GraphitePromiseTextureReleaseProc; sk_sp Image_YUVA::MakePromiseImageLazyProxy( + const Caps* caps, SkISize dimensions, TextureInfo textureInfo, Volatile isVolatile, @@ -128,11 +139,10 @@ sk_sp Image_YUVA::MakePromiseImageLazyProxy( } callback(fulfillProc, std::move(releaseHelper), textureContext, textureReleaseProc); - return TextureProxy::MakeLazy(dimensions, + return TextureProxy::MakeLazy(caps, + dimensions, textureInfo, skgpu::Budgeted::kNo, // This is destined for a user's SkImage isVolatile, std::move(callback)); } - - diff --git a/src/gpu/graphite/Image_YUVA_Graphite.h b/src/gpu/graphite/Image_YUVA_Graphite.h index c6c551ea8db7..a6186f30fb8c 100644 --- a/src/gpu/graphite/Image_YUVA_Graphite.h +++ b/src/gpu/graphite/Image_YUVA_Graphite.h @@ -31,6 +31,8 @@ class Image_YUVA final : public Image_Base { SkImage_Base::Type type() const override { return SkImage_Base::Type::kGraphiteYUVA; } + size_t textureSize() const override; + bool onHasMipmaps() const override { // TODO: Add mipmap support return false; @@ -45,6 +47,7 @@ class Image_YUVA final : public Image_Base { } static sk_sp MakePromiseImageLazyProxy( + const Caps*, SkISize dimensions, TextureInfo, Volatile, diff --git a/src/gpu/graphite/KeyContext.cpp b/src/gpu/graphite/KeyContext.cpp index 2302e8746c40..e40c76b3db1b 100644 --- a/src/gpu/graphite/KeyContext.cpp +++ b/src/gpu/graphite/KeyContext.cpp @@ -16,13 +16,15 @@ KeyContext::KeyContext(skgpu::graphite::Recorder* recorder, const SkM44& local2Dev, const SkColorInfo& dstColorInfo, const SkColor4f& paintColor, - sk_sp dstTexture) + sk_sp dstTexture, + SkIPoint dstOffset) : fRecorder(recorder) , fLocal2Dev(local2Dev) , fLocalMatrix(nullptr) , fDstColorInfo(dstColorInfo) , fCaps(recorder->priv().caps()) - , fDstTexture(std::move(dstTexture)) { + , fDstTexture(std::move(dstTexture)) + , fDstOffset(dstOffset) { fDictionary = fRecorder->priv().shaderCodeDictionary(); fRTEffectDict = fRecorder->priv().runtimeEffectDictionary(); fPaintColor = PaintParams::Color4fPrepForDst(paintColor, fDstColorInfo).makeOpaque().premul(); @@ -37,6 +39,7 @@ KeyContext::KeyContext(const KeyContext& other) , fDstColorInfo(other.fDstColorInfo) , fPaintColor(other.fPaintColor) , fCaps(other.fCaps) - , fDstTexture(other.fDstTexture) {} + , fDstTexture(other.fDstTexture) + , fDstOffset(other.fDstOffset) {} } // namespace skgpu::graphite diff --git a/src/gpu/graphite/KeyContext.h b/src/gpu/graphite/KeyContext.h index dc1dc9ac04cc..d539c042ea0a 100644 --- a/src/gpu/graphite/KeyContext.h +++ b/src/gpu/graphite/KeyContext.h @@ -32,19 +32,22 @@ class KeyContext { ShaderCodeDictionary* dict, RuntimeEffectDictionary* rtEffectDict, const SkColorInfo& dstColorInfo, - sk_sp dstTexture) + sk_sp dstTexture, + SkIPoint dstOffset) : fDictionary(dict) , fRTEffectDict(rtEffectDict) , fDstColorInfo(dstColorInfo) , fCaps(caps) - , fDstTexture(std::move(dstTexture)) {} + , fDstTexture(std::move(dstTexture)) + , fDstOffset(dstOffset) {} // Constructor for the ExtractPaintData code path (i.e., with a Recorder) KeyContext(Recorder*, const SkM44& local2Dev, const SkColorInfo&, const SkColor4f& paintColor, - sk_sp dstTexture); + sk_sp dstTexture, + SkIPoint dstOffset); KeyContext(const KeyContext&); @@ -60,7 +63,10 @@ class KeyContext { const SkColorInfo& dstColorInfo() const { return fDstColorInfo; } + // Proxy to the destination texture, if it needs to be read from, or null otherwise. sk_sp dstTexture() const { return fDstTexture; } + // Offset within dstTexture to the top-left corner of the area that needs to be read. + SkIPoint dstOffset() const { return fDstOffset; } const SkPMColor4f& paintColor() const { return fPaintColor; } @@ -76,6 +82,7 @@ class KeyContext { private: const Caps* fCaps = nullptr; sk_sp fDstTexture; + SkIPoint fDstOffset; }; class KeyContextWithLocalMatrix : public KeyContext { diff --git a/src/gpu/graphite/KeyHelpers.cpp b/src/gpu/graphite/KeyHelpers.cpp index 4f0696ba5e8b..0e04caf2b086 100644 --- a/src/gpu/graphite/KeyHelpers.cpp +++ b/src/gpu/graphite/KeyHelpers.cpp @@ -7,15 +7,35 @@ #include "src/gpu/graphite/KeyHelpers.h" +#include "include/core/SkColorFilter.h" #include "include/core/SkData.h" #include "include/effects/SkRuntimeEffect.h" +#include "include/gpu/graphite/Surface.h" +#include "src/base/SkHalf.h" +#include "src/core/SkBlendModeBlender.h" #include "src/core/SkBlenderBase.h" #include "src/core/SkColorSpacePriv.h" #include "src/core/SkDebugUtils.h" +#include "src/core/SkRuntimeBlender.h" #include "src/core/SkRuntimeEffectPriv.h" +#include "src/core/SkYUVMath.h" +#include "src/effects/colorfilters/SkBlendModeColorFilter.h" +#include "src/effects/colorfilters/SkColorFilterBase.h" +#include "src/effects/colorfilters/SkColorSpaceXformColorFilter.h" +#include "src/effects/colorfilters/SkComposeColorFilter.h" +#include "src/effects/colorfilters/SkGaussianColorFilter.h" +#include "src/effects/colorfilters/SkMatrixColorFilter.h" +#include "src/effects/colorfilters/SkRuntimeColorFilter.h" +#include "src/effects/colorfilters/SkTableColorFilter.h" +#include "src/effects/colorfilters/SkWorkingFormatColorFilter.h" #include "src/gpu/Blend.h" #include "src/gpu/DitherUtils.h" +#include "src/gpu/graphite/Caps.h" +#include "src/gpu/graphite/ImageUtils.h" +#include "src/gpu/graphite/Image_Graphite.h" +#include "src/gpu/graphite/Image_YUVA_Graphite.h" #include "src/gpu/graphite/KeyContext.h" +#include "src/gpu/graphite/KeyHelpers.h" #include "src/gpu/graphite/Log.h" #include "src/gpu/graphite/PaintParamsKey.h" #include "src/gpu/graphite/PipelineData.h" @@ -29,8 +49,26 @@ #include "src/gpu/graphite/TextureProxyView.h" #include "src/gpu/graphite/Uniform.h" #include "src/gpu/graphite/UniformManager.h" +#include "src/gpu/graphite/YUVATextureProxies.h" #include "src/image/SkImage_Base.h" +#include "src/shaders/SkBlendShader.h" +#include "src/shaders/SkColorFilterShader.h" +#include "src/shaders/SkColorShader.h" +#include "src/shaders/SkCoordClampShader.h" +#include "src/shaders/SkEmptyShader.h" #include "src/shaders/SkImageShader.h" +#include "src/shaders/SkLocalMatrixShader.h" +#include "src/shaders/SkPerlinNoiseShaderImpl.h" +#include "src/shaders/SkPictureShader.h" +#include "src/shaders/SkRuntimeShader.h" +#include "src/shaders/SkShaderBase.h" +#include "src/shaders/SkTransformShader.h" +#include "src/shaders/SkTriColorShader.h" +#include "src/shaders/gradients/SkConicalGradient.h" +#include "src/shaders/gradients/SkGradientBaseShader.h" +#include "src/shaders/gradients/SkLinearGradient.h" +#include "src/shaders/gradients/SkRadialGradient.h" +#include "src/shaders/gradients/SkSweepGradient.h" constexpr SkPMColor4f kErrorColor = { 1, 0, 0, 1 }; @@ -78,15 +116,16 @@ void SolidColorShaderBlock::BeginBlock(const KeyContext& keyContext, namespace { void add_dst_read_sample_uniform_data(const ShaderCodeDictionary* dict, - PipelineDataGatherer* gatherer, - sk_sp dstTexture) { + PipelineDataGatherer* gatherer, + sk_sp dstTexture, + SkIPoint dstOffset) { static const SkTileMode kTileModes[2] = {SkTileMode::kClamp, SkTileMode::kClamp}; gatherer->add(SkSamplingOptions(), kTileModes, dstTexture); VALIDATE_UNIFORMS(gatherer, dict, BuiltInCodeSnippetID::kDstReadSample) - SkV4 coords{0.0f, - 0.0f, + SkV4 coords{static_cast(dstOffset.x()), + static_cast(dstOffset.y()), 1.0f / dstTexture->dimensions().width(), 1.0f / dstTexture->dimensions().height()}; gatherer->write(coords); @@ -97,9 +136,11 @@ void add_dst_read_sample_uniform_data(const ShaderCodeDictionary* dict, void DstReadSampleBlock::BeginBlock(const KeyContext& keyContext, PaintParamsKeyBuilder* builder, PipelineDataGatherer* gatherer, - sk_sp dstTexture) { + sk_sp dstTexture, + SkIPoint dstOffset) { if (gatherer) { - add_dst_read_sample_uniform_data(keyContext.dict(), gatherer, std::move(dstTexture)); + add_dst_read_sample_uniform_data( + keyContext.dict(), gatherer, std::move(dstTexture), dstOffset); } builder->beginBlock(BuiltInCodeSnippetID::kDstReadSample); } @@ -122,10 +163,20 @@ void add_gradient_preamble(const GradientShaderBlocks::GradientData& gradData, constexpr int kInternalStopLimit = GradientShaderBlocks::GradientData::kNumInternalStorageStops; if (gradData.fNumStops <= kInternalStopLimit) { - int stops = gradData.fNumStops <= 4 ? 4 : 8; - - gatherer->writeArray({gradData.fColors, stops}); - gatherer->writeArray({gradData.fOffsets, stops}); + if (gradData.fNumStops <= 4) { + // Round up to 4 stops. + gatherer->writeArray({gradData.fColors, 4}); + // The offsets are packed into a single float4 to save space. + gatherer->write(SkSLType::kFloat4, &gradData.fOffsets); + } else if (gradData.fNumStops <= 8) { + // Round up to 8 stops. + gatherer->writeArray({gradData.fColors, 8}); + // The offsets are packed into a float4 array to save space. + gatherer->writeArray(SkSLType::kFloat4, &gradData.fOffsets, 2); + } else { + // Did kNumInternalStorageStops change? + SkUNREACHABLE; + } } } @@ -230,7 +281,7 @@ GradientShaderBlocks::GradientData::GradientData(SkShaderBase::GradientType type SkTileMode tm, int numStops, const SkPMColor4f* colors, - float* offsets, + const float* offsets, sk_sp colorsAndOffsetsProxy, const SkGradientShader::Interpolation& interp) : fType(type) @@ -403,6 +454,7 @@ void add_color_space_uniforms(const SkColorSpaceXformSteps& steps, PipelineDataG void add_image_uniform_data(const ShaderCodeDictionary* dict, const ImageShaderBlock::ImageData& imgData, PipelineDataGatherer* gatherer) { + SkASSERT(!imgData.fSampling.useCubic); VALIDATE_UNIFORMS(gatherer, dict, BuiltInCodeSnippetID::kImageShader) gatherer->write(SkPoint::Make(imgData.fTextureProxy->dimensions().fWidth, @@ -411,13 +463,25 @@ void add_image_uniform_data(const ShaderCodeDictionary* dict, gatherer->write(SkTo(imgData.fTileModes[0])); gatherer->write(SkTo(imgData.fTileModes[1])); gatherer->write(SkTo(imgData.fSampling.filter)); - gatherer->write(imgData.fSampling.useCubic); - if (imgData.fSampling.useCubic) { - const SkCubicResampler& cubic = imgData.fSampling.cubic; - gatherer->writeHalf(SkImageShader::CubicResamplerMatrix(cubic.B, cubic.C)); - } else { - gatherer->writeHalf(SkM44()); - } + gatherer->write(SkTo(imgData.fReadSwizzle)); + + add_color_space_uniforms(imgData.fSteps, gatherer); +} + + +void add_cubic_image_uniform_data(const ShaderCodeDictionary* dict, + const ImageShaderBlock::ImageData& imgData, + PipelineDataGatherer* gatherer) { + SkASSERT(imgData.fSampling.useCubic); + VALIDATE_UNIFORMS(gatherer, dict, BuiltInCodeSnippetID::kCubicImageShader) + + gatherer->write(SkPoint::Make(imgData.fTextureProxy->dimensions().fWidth, + imgData.fTextureProxy->dimensions().fHeight)); + gatherer->write(imgData.fSubset); + gatherer->write(SkTo(imgData.fTileModes[0])); + gatherer->write(SkTo(imgData.fTileModes[1])); + const SkCubicResampler& cubic = imgData.fSampling.cubic; + gatherer->writeHalf(SkImageShader::CubicResamplerMatrix(cubic.B, cubic.C)); gatherer->write(SkTo(imgData.fReadSwizzle)); add_color_space_uniforms(imgData.fSteps, gatherer); @@ -446,7 +510,7 @@ void ImageShaderBlock::BeginBlock(const KeyContext& keyContext, // TODO: allow through lazy proxies if (gatherer && !imgData->fTextureProxy) { // TODO: At some point the pre-compile path should also be creating a texture - // proxy (i.e., we can remove the 'pipelineData' in the above test). + // proxy (i.e., we can remove the 'gatherer' in the above test). SolidColorShaderBlock::BeginBlock(keyContext, builder, gatherer, kErrorColor); return; } @@ -463,6 +527,32 @@ void ImageShaderBlock::BeginBlock(const KeyContext& keyContext, builder->beginBlock(BuiltInCodeSnippetID::kImageShader); } +void ImageShaderBlock::BeginCubicBlock(const KeyContext& keyContext, + PaintParamsKeyBuilder* builder, + PipelineDataGatherer* gatherer, + const ImageData* imgData) { + SkASSERT(!gatherer == !imgData); + + // TODO: allow through lazy proxies + if (gatherer && !imgData->fTextureProxy) { + // TODO: At some point the pre-compile path should also be creating a texture + // proxy (i.e., we can remove the 'gatherer' in the above test). + SolidColorShaderBlock::BeginBlock(keyContext, builder, gatherer, kErrorColor); + return; + } + + auto dict = keyContext.dict(); + if (gatherer) { + gatherer->add(imgData->fSampling, + imgData->fTileModes, + imgData->fTextureProxy); + + add_cubic_image_uniform_data(dict, *imgData, gatherer); + } + + builder->beginBlock(BuiltInCodeSnippetID::kCubicImageShader); +} + //-------------------------------------------------------------------------------------------------- // makes use of ImageShader functions, above @@ -840,7 +930,7 @@ void AddDstBlendBlock(const KeyContext& keyContext, DstColorBlock::BeginBlock(keyContext, builder, gatherer); builder->endBlock(); // blender -- shader based blending - as_BB(blender)->addToKey(keyContext, builder, gatherer); + AddToKey(keyContext, builder, gatherer, blender); builder->endBlock(); // BlendShaderBlock } @@ -858,7 +948,7 @@ void AddPrimitiveBlendBlock(const KeyContext& keyContext, PrimitiveColorBlock::BeginBlock(keyContext, builder, gatherer); builder->endBlock(); // blender -- shader based blending - as_BB(blender)->addToKey(keyContext, builder, gatherer); + AddToKey(keyContext, builder, gatherer, blender); builder->endBlock(); // BlendShaderBlock } @@ -940,4 +1030,976 @@ void RuntimeEffectBlock::BeginBlock(const KeyContext& keyContext, builder->beginBlock(codeSnippetID); } +// ================================================================== + +static void add_to_key(const KeyContext& keyContext, + PaintParamsKeyBuilder* builder, + PipelineDataGatherer* gatherer, + const SkBlendModeBlender* blender) { + SkASSERT(blender); + SkSpan coeffs = skgpu::GetPorterDuffBlendConstants(blender->mode()); + if (!coeffs.empty()) { + CoeffBlenderBlock::BeginBlock(keyContext, builder, gatherer, coeffs); + builder->endBlock(); + } else { + BlendModeBlenderBlock::BeginBlock(keyContext, builder, gatherer, blender->mode()); + builder->endBlock(); + } +} + +static void add_children_to_key(const KeyContext& keyContext, + PaintParamsKeyBuilder* builder, + PipelineDataGatherer* gatherer, + SkSpan children, + SkSpan childInfo) { + SkASSERT(children.size() == childInfo.size()); + + using ChildType = SkRuntimeEffect::ChildType; + + for (size_t index = 0; index < children.size(); ++index) { + const SkRuntimeEffect::ChildPtr& child = children[index]; + std::optional type = child.type(); + if (type == ChildType::kShader) { + AddToKey(keyContext, builder, gatherer, child.shader()); + } else if (type == ChildType::kColorFilter) { + AddToKey(keyContext, builder, gatherer, child.colorFilter()); + } else if (type == ChildType::kBlender) { + AddToKey(keyContext, builder, gatherer, child.blender()); + } else { + // We don't have a child effect. Substitute in a no-op effect. + switch (childInfo[index].type) { + case ChildType::kShader: + case ChildType::kColorFilter: + // A "passthrough" shader returns the input color as-is. + PriorOutputBlock::BeginBlock(keyContext, builder, gatherer); + builder->endBlock(); + break; + + case ChildType::kBlender: + // A "passthrough" blender performs `blend_src_over(src, dest)`. + BlendModeBlenderBlock::BeginBlock( + keyContext, builder, gatherer, SkBlendMode::kSrcOver); + builder->endBlock(); + break; + } + } + } +} +static void add_to_key(const KeyContext& keyContext, + PaintParamsKeyBuilder* builder, + PipelineDataGatherer* gatherer, + const SkRuntimeBlender* blender) { + SkASSERT(blender); + sk_sp effect = blender->effect(); + SkASSERT(effect); + sk_sp uniforms = SkRuntimeEffectPriv::TransformUniforms( + effect->uniforms(), + blender->uniforms(), + keyContext.dstColorInfo().colorSpace()); + SkASSERT(uniforms); + + RuntimeEffectBlock::BeginBlock(keyContext, builder, gatherer, + { effect, std::move(uniforms) }); + + add_children_to_key(keyContext, builder, gatherer, + blender->children(), effect->children()); + + builder->endBlock(); +} + +void AddToKey(const KeyContext& keyContext, + PaintParamsKeyBuilder* builder, + PipelineDataGatherer* gatherer, + const SkBlender* blender) { + if (!blender) { + return; + } + switch (as_BB(blender)->type()) { +#define M(type) \ + case SkBlenderBase::BlenderType::k##type: \ + add_to_key(keyContext, \ + builder, \ + gatherer, \ + static_cast(blender)); \ + return; + SK_ALL_BLENDERS(M) +#undef M + } + SkUNREACHABLE; +} + +static SkPMColor4f map_color(const SkColor4f& c, SkColorSpace* src, SkColorSpace* dst) { + SkPMColor4f color = {c.fR, c.fG, c.fB, c.fA}; + SkColorSpaceXformSteps(src, kUnpremul_SkAlphaType, dst, kPremul_SkAlphaType).apply(color.vec()); + return color; +} +static void add_to_key(const KeyContext& keyContext, + PaintParamsKeyBuilder* builder, + PipelineDataGatherer* gatherer, + const SkBlendModeColorFilter* filter) { + SkASSERT(filter); + + SkPMColor4f color = + map_color(filter->color(), sk_srgb_singleton(), keyContext.dstColorInfo().colorSpace()); + AddColorBlendBlock(keyContext, builder, gatherer, filter->mode(), color); +} + +static void add_to_key(const KeyContext& keyContext, + PaintParamsKeyBuilder* builder, + PipelineDataGatherer* gatherer, + const SkColorSpaceXformColorFilter* filter) { + SkASSERT(filter); + + constexpr SkAlphaType alphaType = kPremul_SkAlphaType; + ColorSpaceTransformBlock::ColorSpaceTransformData data( + filter->src().get(), alphaType, filter->dst().get(), alphaType); + ColorSpaceTransformBlock::BeginBlock(keyContext, builder, gatherer, &data); + builder->endBlock(); +} + +static void add_to_key(const KeyContext& keyContext, + PaintParamsKeyBuilder* builder, + PipelineDataGatherer* gatherer, + const SkComposeColorFilter* filter) { + SkASSERT(filter); + + ComposeColorFilterBlock::BeginBlock(keyContext, builder, gatherer); + + AddToKey(keyContext, builder, gatherer, filter->inner().get()); + AddToKey(keyContext, builder, gatherer, filter->outer().get()); + + builder->endBlock(); +} + +static void add_to_key(const KeyContext& keyContext, + PaintParamsKeyBuilder* builder, + PipelineDataGatherer* gatherer, + const SkGaussianColorFilter*) { + GaussianColorFilterBlock::BeginBlock(keyContext, builder, gatherer); + builder->endBlock(); +} + +static void add_to_key(const KeyContext& keyContext, + PaintParamsKeyBuilder* builder, + PipelineDataGatherer* gatherer, + const SkMatrixColorFilter* filter) { + SkASSERT(filter); + + bool inHSLA = filter->domain() == SkMatrixColorFilter::Domain::kHSLA; + MatrixColorFilterBlock::MatrixColorFilterData matrixCFData(filter->matrix(), inHSLA); + + MatrixColorFilterBlock::BeginBlock(keyContext, builder, gatherer, &matrixCFData); + builder->endBlock(); +} + +static void add_to_key(const KeyContext& keyContext, + PaintParamsKeyBuilder* builder, + PipelineDataGatherer* gatherer, + const SkRuntimeColorFilter* filter) { + SkASSERT(filter); + + sk_sp effect = filter->effect(); + sk_sp uniforms = SkRuntimeEffectPriv::TransformUniforms( + effect->uniforms(), filter->uniforms(), keyContext.dstColorInfo().colorSpace()); + SkASSERT(uniforms); + + RuntimeEffectBlock::BeginBlock(keyContext, builder, gatherer, {effect, std::move(uniforms)}); + + add_children_to_key(keyContext, builder, gatherer, + filter->children(), effect->children()); + + builder->endBlock(); +} + +static void add_to_key(const KeyContext& keyContext, + PaintParamsKeyBuilder* builder, + PipelineDataGatherer* gatherer, + const SkTableColorFilter* filter) { + SkASSERT(filter); + + sk_sp proxy = RecorderPriv::CreateCachedProxy(keyContext.recorder(), + filter->bitmap()); + if (!proxy) { + SKGPU_LOG_W("Couldn't create TableColorFilter's table"); + + // Return the input color as-is. + PriorOutputBlock::BeginBlock(keyContext, builder, gatherer); + builder->endBlock(); + return; + } + + TableColorFilterBlock::TableColorFilterData data(std::move(proxy)); + + TableColorFilterBlock::BeginBlock(keyContext, builder, gatherer, data); + builder->endBlock(); +} + +static void add_to_key(const KeyContext& keyContext, + PaintParamsKeyBuilder* builder, + PipelineDataGatherer* gatherer, + const SkWorkingFormatColorFilter* filter) { + SkASSERT(filter); + + const SkAlphaType dstAT = keyContext.dstColorInfo().alphaType(); + sk_sp dstCS = keyContext.dstColorInfo().refColorSpace(); + if (!dstCS) { + dstCS = SkColorSpace::MakeSRGB(); + } + + SkAlphaType workingAT; + sk_sp workingCS = filter->workingFormat(dstCS, &workingAT); + + // Use two nested compose blocks to chain (dst->working), child, and (working->dst) together + // while appearing as one block to the parent node. + ComposeColorFilterBlock::BeginBlock(keyContext, builder, gatherer); + // Inner compose + ComposeColorFilterBlock::BeginBlock(keyContext, builder, gatherer); + // Innermost (inner of inner compose) + ColorSpaceTransformBlock::ColorSpaceTransformData data1( + dstCS.get(), dstAT, workingCS.get(), workingAT); + ColorSpaceTransformBlock::BeginBlock(keyContext, builder, gatherer, &data1); + builder->endBlock(); + + // Middle (outer of inner compose) + AddToKey(keyContext, builder, gatherer, filter->child().get()); + builder->endBlock(); + + // Outermost (outer of outer compose) + ColorSpaceTransformBlock::ColorSpaceTransformData data2( + workingCS.get(), workingAT, dstCS.get(), dstAT); + ColorSpaceTransformBlock::BeginBlock(keyContext, builder, gatherer, &data2); + builder->endBlock(); + builder->endBlock(); +} + +void AddToKey(const KeyContext& keyContext, + PaintParamsKeyBuilder* builder, + PipelineDataGatherer* gatherer, + const SkColorFilter* filter) { + if (!filter) { + return; + } + switch (as_CFB(filter)->type()) { + case SkColorFilterBase::Type::kNoop: + // Return the input color as-is. + PriorOutputBlock::BeginBlock(keyContext, builder, gatherer); + builder->endBlock(); + return; +#define M(type) \ + case SkColorFilterBase::Type::k##type: \ + add_to_key(keyContext, \ + builder, \ + gatherer, \ + static_cast(filter)); \ + return; + SK_ALL_COLOR_FILTERS(M) +#undef M + } + SkUNREACHABLE; +} + +// ================================================================== + +static void add_to_key(const KeyContext& keyContext, + PaintParamsKeyBuilder* builder, + PipelineDataGatherer* gatherer, + const SkBlendShader* shader) { + SkASSERT(shader); + + BlendShaderBlock::BeginBlock(keyContext, builder, gatherer); + + AddToKey(keyContext, builder, gatherer, shader->src().get()); + AddToKey(keyContext, builder, gatherer, shader->dst().get()); + + SkSpan porterDuffConstants = skgpu::GetPorterDuffBlendConstants(shader->mode()); + if (!porterDuffConstants.empty()) { + CoeffBlenderBlock::BeginBlock(keyContext, builder, gatherer, porterDuffConstants); + builder->endBlock(); + } else { + BlendModeBlenderBlock::BeginBlock(keyContext, builder, gatherer, shader->mode()); + builder->endBlock(); + } + + builder->endBlock(); // BlendShaderBlock +} + +static void add_to_key(const KeyContext& keyContext, + PaintParamsKeyBuilder* builder, + PipelineDataGatherer* gatherer, + const SkCTMShader*) { + SolidColorShaderBlock::BeginBlock(keyContext, builder, gatherer, kErrorColor); + // TODO(michaelludwig) implement this when clipShader() is implemented + builder->endBlock(); +} + +static void add_to_key(const KeyContext& keyContext, + PaintParamsKeyBuilder* builder, + PipelineDataGatherer* gatherer, + const SkColorShader* shader) { + SkASSERT(shader); + + SolidColorShaderBlock::BeginBlock(keyContext, builder, gatherer, + SkColor4f::FromColor(shader->color()).premul()); + builder->endBlock(); +} + +static void add_to_key(const KeyContext& keyContext, + PaintParamsKeyBuilder* builder, + PipelineDataGatherer* gatherer, + const SkColor4Shader* shader) { + SkASSERT(shader); + + SolidColorShaderBlock::BeginBlock(keyContext, builder, gatherer, shader->color().premul()); + builder->endBlock(); +} + +static void add_to_key(const KeyContext& keyContext, + PaintParamsKeyBuilder* builder, + PipelineDataGatherer* gatherer, + const SkColorFilterShader* shader) { + SkASSERT(shader); + + ColorFilterShaderBlock::BeginBlock(keyContext, builder, gatherer); + + AddToKey(keyContext, builder, gatherer, shader->shader().get()); + AddToKey(keyContext, builder, gatherer, shader->filter().get()); + + builder->endBlock(); +} + +static void add_to_key(const KeyContext& keyContext, + PaintParamsKeyBuilder* builder, + PipelineDataGatherer* gatherer, + const SkCoordClampShader* shader) { + SkASSERT(shader); + + CoordClampShaderBlock::CoordClampData data(shader->subset()); + + CoordClampShaderBlock::BeginBlock(keyContext, builder, gatherer, &data); + AddToKey(keyContext, builder, gatherer, shader->shader().get()); + builder->endBlock(); +} + +static void add_to_key(const KeyContext& keyContext, + PaintParamsKeyBuilder* builder, + PipelineDataGatherer* gatherer, + const SkEmptyShader*) { + SolidColorShaderBlock::BeginBlock(keyContext, builder, gatherer, kErrorColor); + builder->endBlock(); +} + +static void add_yuv_image_to_key(const KeyContext& keyContext, + PaintParamsKeyBuilder* builder, + PipelineDataGatherer* gatherer, + const SkImageShader* origShader, + sk_sp imageToDraw, + SkSamplingOptions sampling) { + SkASSERT(!imageToDraw->isAlphaOnly()); + + const YUVATextureProxies& yuvaProxies = + static_cast(imageToDraw.get())->yuvaProxies(); + const SkYUVAInfo& yuvaInfo = yuvaProxies.yuvaInfo(); + + YUVImageShaderBlock::ImageData imgData(sampling, origShader->tileModeX(), + origShader->tileModeY(), origShader->subset()); + imgData.fImgSize = { (float)imageToDraw->width(), (float)imageToDraw->height() }; + for (int i = 0; i < SkYUVAInfo::kYUVAChannelCount; ++i) { + memset(&imgData.fChannelSelect[i], 0, sizeof(SkColor4f)); + } + int textureCount = 0; + SkYUVAInfo::YUVALocations yuvaLocations = yuvaProxies.yuvaLocations(); + for (int locIndex = 0; locIndex < SkYUVAInfo::kYUVAChannelCount; ++locIndex) { + auto [yuvPlane, yuvChannel] = yuvaLocations[locIndex]; + if (yuvPlane >= 0) { + SkASSERT(locIndex == textureCount); + TextureProxyView view = yuvaProxies.makeView(yuvPlane); + imgData.fTextureProxies[locIndex] = view.refProxy(); + imgData.fChannelSelect[locIndex][static_cast(yuvChannel)] = 1.0f; + ++textureCount; + } + } + SkASSERT(textureCount == 3 || textureCount == 4); + // If the format has no alpha, we still need to set the proxy to something + if (textureCount == 3) { + imgData.fTextureProxies[3] = imgData.fTextureProxies[0]; + } + float yuvM[20]; + SkColorMatrix_YUV2RGB(yuvaInfo.yuvColorSpace(), yuvM); + // We drop the fourth column entirely since the transformation + // should not depend on alpha. The fifth column is sent as a separate + // vector. The fourth row is also dropped entirely because alpha should + // never be modified. + SkASSERT(yuvM[3] == 0 && yuvM[8] == 0 && yuvM[13] == 0 && yuvM[18] == 1); + SkASSERT(yuvM[15] == 0 && yuvM[16] == 0 && yuvM[17] == 0 && yuvM[19] == 0); + imgData.fYUVtoRGBMatrix.setAll( + yuvM[ 0], yuvM[ 1], yuvM[ 2], + yuvM[ 5], yuvM[ 6], yuvM[ 7], + yuvM[10], yuvM[11], yuvM[12] + ); + imgData.fYUVtoRGBTranslate = {yuvM[4], yuvM[9], yuvM[14]}; + + if (!origShader->isRaw()) { + imgData.fSteps = SkColorSpaceXformSteps(imageToDraw->colorSpace(), + imageToDraw->alphaType(), + keyContext.dstColorInfo().colorSpace(), + keyContext.dstColorInfo().alphaType()); + } + + // The YUV formats can encode their own origin including reflection and rotation, + // so we need to wrap our block in an additional local matrix transform. + SkMatrix originMatrix = yuvaInfo.originMatrix(); + LocalMatrixShaderBlock::LMShaderData lmShaderData(originMatrix); + + KeyContextWithLocalMatrix newContext(keyContext, originMatrix); + + LocalMatrixShaderBlock::BeginBlock(newContext, builder, gatherer, &lmShaderData); + + YUVImageShaderBlock::BeginBlock(newContext, builder, gatherer, &imgData); + builder->endBlock(); + + builder->endBlock(); +} + +static skgpu::graphite::ReadSwizzle swizzle_class_to_read_enum(const skgpu::Swizzle& swizzle) { + if (swizzle == skgpu::Swizzle::RGBA()) { + return skgpu::graphite::ReadSwizzle::kRGBA; + } else if (swizzle == skgpu::Swizzle::RGB1()) { + return skgpu::graphite::ReadSwizzle::kRGB1; + } else if (swizzle == skgpu::Swizzle("rrrr")) { + return skgpu::graphite::ReadSwizzle::kRRRR; + } else if (swizzle == skgpu::Swizzle("rrr1")) { + return skgpu::graphite::ReadSwizzle::kRRR1; + } else if (swizzle == skgpu::Swizzle::BGRA()) { + return skgpu::graphite::ReadSwizzle::kBGRA; + } else { + SKGPU_LOG_W("%s is an unsupported read swizzle. Defaulting to RGBA.\n", + swizzle.asString().data()); + return skgpu::graphite::ReadSwizzle::kRGBA; + } +} + +static void add_to_key(const KeyContext& keyContext, + PaintParamsKeyBuilder* builder, + PipelineDataGatherer* gatherer, + const SkImageShader* shader) { + SkASSERT(shader); + + auto [ imageToDraw, newSampling ] = GetGraphiteBacked(keyContext.recorder(), + shader->image().get(), + shader->sampling()); + if (!imageToDraw) { + SolidColorShaderBlock::BeginBlock(keyContext, builder, gatherer, + kErrorColor); + builder->endBlock(); + return; + } + if (as_IB(imageToDraw)->isYUVA()) { + return add_yuv_image_to_key(keyContext, + builder, + gatherer, + shader, + std::move(imageToDraw), + newSampling); + } + + skgpu::Mipmapped mipmapped = (newSampling.mipmap != SkMipmapMode::kNone) + ? skgpu::Mipmapped::kYes : skgpu::Mipmapped::kNo; + + auto [view, _] = AsView(keyContext.recorder(), imageToDraw.get(), mipmapped); + + ImageShaderBlock::ImageData imgData(shader->sampling(), shader->tileModeX(), + shader->tileModeY(), shader->subset(), + ReadSwizzle::kRGBA); + imgData.fSampling = newSampling; + imgData.fTextureProxy = view.refProxy(); + skgpu::Swizzle readSwizzle = view.swizzle(); + // If the color type is alpha-only, propagate the alpha value to the other channels. + if (imageToDraw->isAlphaOnly()) { + readSwizzle = skgpu::Swizzle::Concat(readSwizzle, skgpu::Swizzle("aaaa")); + } + imgData.fReadSwizzle = swizzle_class_to_read_enum(readSwizzle); + + if (!shader->isRaw()) { + imgData.fSteps = SkColorSpaceXformSteps(imageToDraw->colorSpace(), + imageToDraw->alphaType(), + keyContext.dstColorInfo().colorSpace(), + keyContext.dstColorInfo().alphaType()); + + if (imageToDraw->isAlphaOnly()) { + SkSpan constants = skgpu::GetPorterDuffBlendConstants(SkBlendMode::kDstIn); + BlendShaderBlock::BeginBlock(keyContext, builder, gatherer); + + // src + if (imgData.fSampling.useCubic) { + ImageShaderBlock::BeginCubicBlock(keyContext, builder, gatherer, &imgData); + } else { + ImageShaderBlock::BeginBlock(keyContext, builder, gatherer, &imgData); + } + builder->endBlock(); + + // dst + SolidColorShaderBlock::BeginBlock(keyContext, builder, gatherer, + keyContext.paintColor()); + builder->endBlock(); + + CoeffBlenderBlock::BeginBlock(keyContext, builder, gatherer, constants); + builder->endBlock(); + + builder->endBlock(); + return; + } + } + + if (imgData.fSampling.useCubic) { + ImageShaderBlock::BeginCubicBlock(keyContext, builder, gatherer, &imgData); + } else { + ImageShaderBlock::BeginBlock(keyContext, builder, gatherer, &imgData); + } + builder->endBlock(); +} + +static void add_to_key(const KeyContext& keyContext, + PaintParamsKeyBuilder* builder, + PipelineDataGatherer* gatherer, + const SkLocalMatrixShader* shader) { + SkASSERT(shader); + + LocalMatrixShaderBlock::LMShaderData lmShaderData(shader->localMatrix()); + + KeyContextWithLocalMatrix newContext(keyContext, shader->localMatrix()); + + LocalMatrixShaderBlock::BeginBlock(newContext, builder, gatherer, &lmShaderData); + + AddToKey(newContext, builder, gatherer, shader->wrappedShader().get()); + + builder->endBlock(); +} + +// If either of these change then the corresponding change must also be made in the SkSL +// perlin_noise_shader function. +static_assert((int)SkPerlinNoiseShader::kFractalNoise_Type == + (int)PerlinNoiseShaderBlock::Type::kFractalNoise); +static_assert((int)SkPerlinNoiseShader::kTurbulence_Type == + (int)PerlinNoiseShaderBlock::Type::kTurbulence); +static void add_to_key(const KeyContext& keyContext, + PaintParamsKeyBuilder* builder, + PipelineDataGatherer* gatherer, + const SkPerlinNoiseShader* shader) { + SkASSERT(shader); + SkASSERT(shader->numOctaves()); + + SkMatrix totalMatrix = keyContext.local2Dev().asM33(); + if (keyContext.localMatrix()) { + totalMatrix.preConcat(*keyContext.localMatrix()); + } + + SkMatrix invTotal; + bool result = totalMatrix.invert(&invTotal); + if (!result) { + SKGPU_LOG_W("Couldn't invert totalMatrix for PerlinNoiseShader"); + + SolidColorShaderBlock::BeginBlock(keyContext, builder, gatherer, kErrorColor); + builder->endBlock(); + return; + } + + std::unique_ptr paintingData = + shader->getPaintingData(totalMatrix); + paintingData->generateBitmaps(); + + sk_sp perm = RecorderPriv::CreateCachedProxy( + keyContext.recorder(), paintingData->getPermutationsBitmap()); + + sk_sp noise = + RecorderPriv::CreateCachedProxy(keyContext.recorder(), paintingData->getNoiseBitmap()); + + if (!perm || !noise) { + SKGPU_LOG_W("Couldn't create tables for PerlinNoiseShader"); + + SolidColorShaderBlock::BeginBlock(keyContext, builder, gatherer, kErrorColor); + builder->endBlock(); + return; + } + + PerlinNoiseShaderBlock::PerlinNoiseData data( + static_cast(shader->noiseType()), + paintingData->fBaseFrequency, + shader->numOctaves(), + {paintingData->fStitchDataInit.fWidth, paintingData->fStitchDataInit.fHeight}); + + data.fPermutationsProxy = std::move(perm); + data.fNoiseProxy = std::move(noise); + + // This (1,1) translation is due to WebKit's 1 based coordinates for the noise + // (as opposed to 0 based, usually). Remember: this matrix (shader2World) is going to be + // inverted before being applied. + SkMatrix shader2Local = + SkMatrix::Translate(-1 + totalMatrix.getTranslateX(), -1 + totalMatrix.getTranslateY()); + shader2Local.postConcat(invTotal); + + LocalMatrixShaderBlock::LMShaderData lmShaderData(shader2Local); + + KeyContextWithLocalMatrix newContext(keyContext, shader2Local); + + LocalMatrixShaderBlock::BeginBlock(newContext, builder, gatherer, &lmShaderData); + PerlinNoiseShaderBlock::BeginBlock(newContext, builder, gatherer, &data); + builder->endBlock(); + builder->endBlock(); + +} + +static void add_to_key(const KeyContext& keyContext, + PaintParamsKeyBuilder* builder, + PipelineDataGatherer* gatherer, + const SkPictureShader* shader) { + SkASSERT(shader); + + Recorder* recorder = keyContext.recorder(); + const Caps* caps = recorder->priv().caps(); + + // TODO: We'll need additional plumbing to get the correct props from our callers. In + // particular we'll need to expand the keyContext to have the surfaceProps, the dstColorType + // and dstColorSpace. + SkSurfaceProps props{}; + + SkMatrix totalM = keyContext.local2Dev().asM33(); + if (keyContext.localMatrix()) { + totalM.preConcat(*keyContext.localMatrix()); + } + auto info = SkPictureShader::CachedImageInfo::Make(shader->tile(), + totalM, + /* dstColorType= */ kRGBA_8888_SkColorType, + /* dstColorSpace= */ nullptr, + caps->maxTextureSize(), + props); + if (!info.success) { + SolidColorShaderBlock::BeginBlock(keyContext, builder, gatherer, kErrorColor); + builder->endBlock(); + return; + } + + // TODO: right now we're explicitly not caching here. We could expand the ImageProvider + // API to include already Graphite-backed images, add a Recorder-local cache or add + // rendered-picture images to the global cache. + sk_sp img = info.makeImage( + SkSurfaces::RenderTarget(recorder, info.imageInfo, skgpu::Mipmapped::kNo, &info.props), + shader->picture().get()); + if (!img) { + SolidColorShaderBlock::BeginBlock(keyContext, builder, gatherer, kErrorColor); + builder->endBlock(); + return; + } + + const auto shaderLM = SkMatrix::Scale(1.f/info.tileScale.width(), 1.f/info.tileScale.height()); + sk_sp imgShader = img->makeShader(shader->tileModeX(), shader->tileModeY(), + SkSamplingOptions(shader->filter()), &shaderLM); + if (!imgShader) { + SolidColorShaderBlock::BeginBlock(keyContext, builder, gatherer, kErrorColor); + builder->endBlock(); + return; + } + + AddToKey(keyContext, builder, gatherer, imgShader.get()); +} + +static void add_to_key(const KeyContext& keyContext, + PaintParamsKeyBuilder* builder, + PipelineDataGatherer* gatherer, + const SkRuntimeShader* shader) { + SkASSERT(shader); + sk_sp effect = shader->effect(); + sk_sp uniforms = SkRuntimeEffectPriv::TransformUniforms( + effect->uniforms(), + shader->uniformData(keyContext.dstColorInfo().colorSpace()), + keyContext.dstColorInfo().colorSpace()); + SkASSERT(uniforms); + + RuntimeEffectBlock::BeginBlock(keyContext, builder, gatherer, + {effect, std::move(uniforms)}); + + add_children_to_key(keyContext, builder, gatherer, + shader->children(), effect->children()); + + builder->endBlock(); + +} + +static void add_to_key(const KeyContext& keyContext, + PaintParamsKeyBuilder* builder, + PipelineDataGatherer* gatherer, + const SkTransformShader* shader) { + SolidColorShaderBlock::BeginBlock(keyContext, builder, gatherer, kErrorColor); + builder->endBlock(); +} + +static void add_to_key(const KeyContext& keyContext, + PaintParamsKeyBuilder* builder, + PipelineDataGatherer* gatherer, + const SkTriColorShader* shader) { + SolidColorShaderBlock::BeginBlock(keyContext, builder, gatherer, kErrorColor); + builder->endBlock(); +} + +static SkBitmap create_color_and_offset_bitmap(int numStops, + const SkPMColor4f* colors, + const float* offsets) { + SkBitmap colorsAndOffsetsBitmap; + + colorsAndOffsetsBitmap.allocPixels( + SkImageInfo::Make(numStops, 2, kRGBA_F16_SkColorType, kPremul_SkAlphaType)); + + for (int i = 0; i < numStops; i++) { + // TODO: there should be a way to directly set a premul pixel in a bitmap with + // a premul color. + SkColor4f unpremulColor = colors[i].unpremul(); + colorsAndOffsetsBitmap.erase(unpremulColor, SkIRect::MakeXYWH(i, 0, 1, 1)); + + float offset = offsets ? offsets[i] : SkIntToFloat(i) / (numStops - 1); + SkASSERT(offset >= 0.0f && offset <= 1.0f); + + int exponent; + float mantissa = frexp(offset, &exponent); + + SkHalf halfE = SkFloatToHalf(exponent); + if ((int)SkHalfToFloat(halfE) != exponent) { + SKGPU_LOG_W("Encoding gradient to f16 failed"); + return {}; + } + +#if defined(SK_DEBUG) + SkHalf halfM = SkFloatToHalf(mantissa); + + float restored = ldexp(SkHalfToFloat(halfM), (int)SkHalfToFloat(halfE)); + float error = abs(restored - offset); + SkASSERT(error < 0.001f); +#endif + + // TODO: we're only using 2 of the f16s here. The encoding could be altered to better + // preserve precision. This encoding yields < 0.001f error for 2^20 evenly spaced stops. + colorsAndOffsetsBitmap.erase(SkColor4f{mantissa, (float)exponent, 0, 1}, + SkIRect::MakeXYWH(i, 1, 1, 1)); + } + + return colorsAndOffsetsBitmap; +} + +// Please see GrGradientShader.cpp::make_interpolated_to_dst for substantial comments +// as to why this code is structured this way. +static void make_interpolated_to_dst(const KeyContext& keyContext, + PaintParamsKeyBuilder* builder, + PipelineDataGatherer* gatherer, + const GradientShaderBlocks::GradientData& gradData, + const SkGradientShader::Interpolation& interp, + SkColorSpace* intermediateCS) { + using ColorSpace = SkGradientShader::Interpolation::ColorSpace; + + bool inputPremul = static_cast(interp.fInPremul); + + switch (interp.fColorSpace) { + case ColorSpace::kLab: + case ColorSpace::kOKLab: + case ColorSpace::kLCH: + case ColorSpace::kOKLCH: + case ColorSpace::kHSL: + case ColorSpace::kHWB: + inputPremul = false; + break; + default: + break; + } + + const SkColorInfo& dstColorInfo = keyContext.dstColorInfo(); + + SkColorSpace* dstColorSpace = + dstColorInfo.colorSpace() ? dstColorInfo.colorSpace() : sk_srgb_singleton(); + + SkAlphaType intermediateAlphaType = inputPremul ? kPremul_SkAlphaType : kUnpremul_SkAlphaType; + + ColorSpaceTransformBlock::ColorSpaceTransformData data( + intermediateCS, intermediateAlphaType, dstColorSpace, dstColorInfo.alphaType()); + + // The gradient block and colorSpace conversion block need to be combined together + // (via the colorFilterShader block) so that the localMatrix block can treat them as + // one child. + ColorFilterShaderBlock::BeginBlock(keyContext, builder, gatherer); + + GradientShaderBlocks::BeginBlock(keyContext, builder, gatherer, gradData); + builder->endBlock(); + + ColorSpaceTransformBlock::BeginBlock(keyContext, builder, gatherer, &data); + builder->endBlock(); + + builder->endBlock(); +} + +static void add_gradient_to_key(const KeyContext& keyContext, + PaintParamsKeyBuilder* builder, + PipelineDataGatherer* gatherer, + const SkGradientBaseShader* shader, + SkPoint point0, + SkPoint point1, + float radius0, + float radius1, + float bias, + float scale) { + SkColor4fXformer xformedColors(shader, keyContext.dstColorInfo().colorSpace()); + const SkPMColor4f* colors = xformedColors.fColors.begin(); + + sk_sp proxy; + + if (shader->getColorCount() > GradientShaderBlocks::GradientData::kNumInternalStorageStops) { + if (shader->cachedBitmap().empty()) { + SkBitmap colorsAndOffsetsBitmap = create_color_and_offset_bitmap( + shader->getColorCount(), colors, shader->getPositions()); + if (colorsAndOffsetsBitmap.empty()) { + SKGPU_LOG_W("Couldn't create GradientShader's color and offset bitmap"); + + SolidColorShaderBlock::BeginBlock(keyContext, builder, gatherer, kErrorColor); + builder->endBlock(); + return; + } + shader->setCachedBitmap(colorsAndOffsetsBitmap); + } + + proxy = RecorderPriv::CreateCachedProxy(keyContext.recorder(), shader->cachedBitmap()); + if (!proxy) { + SKGPU_LOG_W("Couldn't create GradientShader's color and offset bitmap proxy"); + + SolidColorShaderBlock::BeginBlock(keyContext, builder, gatherer, kErrorColor); + builder->endBlock(); + return; + } + } + + GradientShaderBlocks::GradientData data(shader->asGradient(), + point0, + point1, + radius0, + radius1, + bias, + scale, + shader->getTileMode(), + shader->getColorCount(), + colors, + shader->getPositions(), + std::move(proxy), + shader->getInterpolation()); + + make_interpolated_to_dst(keyContext, + builder, + gatherer, + data, + shader->getInterpolation(), + xformedColors.fIntermediateColorSpace.get()); +} + +static void add_gradient_to_key(const KeyContext& keyContext, + PaintParamsKeyBuilder* builder, + PipelineDataGatherer* gatherer, + const SkConicalGradient* shader) { + add_gradient_to_key(keyContext, + builder, + gatherer, + shader, + shader->getStartCenter(), + shader->getEndCenter(), + shader->getStartRadius(), + shader->getEndRadius(), + 0.0f, + 0.0f); +} + +static void add_gradient_to_key(const KeyContext& keyContext, + PaintParamsKeyBuilder* builder, + PipelineDataGatherer* gatherer, + const SkLinearGradient* shader) { + add_gradient_to_key(keyContext, + builder, + gatherer, + shader, + shader->start(), + shader->end(), + 0.0f, + 0.0f, + 0.0f, + 0.0f); +} + +static void add_gradient_to_key(const KeyContext& keyContext, + PaintParamsKeyBuilder* builder, + PipelineDataGatherer* gatherer, + const SkRadialGradient* shader) { + add_gradient_to_key(keyContext, + builder, + gatherer, + shader, + shader->center(), + { 0.0f, 0.0f }, + shader->radius(), + 0.0f, + 0.0f, + 0.0f); +} + +static void add_gradient_to_key(const KeyContext& keyContext, + PaintParamsKeyBuilder* builder, + PipelineDataGatherer* gatherer, + const SkSweepGradient* shader) { + add_gradient_to_key(keyContext, + builder, + gatherer, + shader, + shader->center(), + { 0.0f, 0.0f }, + 0.0f, + 0.0f, + shader->tBias(), + shader->tScale()); +} + +static void add_to_key(const KeyContext& keyContext, + PaintParamsKeyBuilder* builder, + PipelineDataGatherer* gatherer, + const SkGradientBaseShader* shader) { + SkASSERT(shader); + switch (shader->asGradient()) { +#define M(type) \ + case SkShaderBase::GradientType::k##type: \ + add_gradient_to_key(keyContext, \ + builder, \ + gatherer, \ + static_cast(shader)); \ + return; + SK_ALL_GRADIENTS(M) +#undef M + case SkShaderBase::GradientType::kNone: + SkDEBUGFAIL("Gradient shader says its type is none"); + return; + } + SkUNREACHABLE; +} + + +void AddToKey(const KeyContext& keyContext, + PaintParamsKeyBuilder* builder, + PipelineDataGatherer* gatherer, + const SkShader* shader) { + if (!shader) { + return; + } + switch (as_SB(shader)->type()) { +#define M(type) \ + case SkShaderBase::ShaderType::k##type: \ + add_to_key(keyContext, \ + builder, \ + gatherer, \ + static_cast(shader)); \ + return; + SK_ALL_SHADERS(M) +#undef M + } + SkUNREACHABLE; +} + + } // namespace skgpu::graphite diff --git a/src/gpu/graphite/KeyHelpers.h b/src/gpu/graphite/KeyHelpers.h index ab14df56fd9b..ff3b720f4457 100644 --- a/src/gpu/graphite/KeyHelpers.h +++ b/src/gpu/graphite/KeyHelpers.h @@ -23,6 +23,7 @@ #include "src/gpu/graphite/TextureProxy.h" #include "src/shaders/SkShaderBase.h" +class SkColorFilter; class SkData; class SkRuntimeEffect; @@ -62,7 +63,8 @@ struct DstReadSampleBlock { static void BeginBlock(const KeyContext&, PaintParamsKeyBuilder*, PipelineDataGatherer*, - sk_sp dst); + sk_sp dst, + SkIPoint dstOffset); }; struct DstReadFetchBlock { @@ -98,7 +100,7 @@ struct GradientShaderBlocks { SkTileMode, int numStops, const SkPMColor4f* colors, - float* offsets, + const float* offsets, sk_sp colorsAndOffsetsProxy, const SkGradientShader::Interpolation&); @@ -169,10 +171,17 @@ struct ImageShaderBlock { }; // The gatherer and imageData should be null or non-null together + // If imageData is not null, it's sampling options must have useCubic == false static void BeginBlock(const KeyContext&, PaintParamsKeyBuilder*, PipelineDataGatherer*, const ImageData*); + + // If imageData is not null, it's sampling options must have useCubic == true + static void BeginCubicBlock(const KeyContext&, + PaintParamsKeyBuilder*, + PipelineDataGatherer*, + const ImageData*); }; struct YUVImageShaderBlock { @@ -415,6 +424,39 @@ struct RuntimeEffectBlock { const ShaderData&); }; +void AddToKey(const KeyContext&, + PaintParamsKeyBuilder*, + PipelineDataGatherer*, + const SkBlender*); + +/** + * Add implementation details, for the specified backend, of this SkColorFilter to the + * provided key. + * + * @param keyContext backend context for key creation + * @param builder builder for creating the key for this SkShader + * @param gatherer if non-null, storage for this colorFilter's data + * @param filter This function is a no-op if filter is null. + */ +void AddToKey(const KeyContext& keyContext, + PaintParamsKeyBuilder* builder, + PipelineDataGatherer* gatherer, + const SkColorFilter* filter); + +/** + * Add implementation details, for the specified backend, of this SkShader to the + * provided key. + * + * @param keyContext backend context for key creation + * @param builder builder for creating the key for this SkShader + * @param gatherer if non-null, storage for this colorFilter's data + * @param shader This function is a no-op if shader is null. + */ +void AddToKey(const KeyContext& keyContext, + PaintParamsKeyBuilder* builder, + PipelineDataGatherer* gatherer, + const SkShader* shader); + } // namespace skgpu::graphite #endif // skgpu_graphite_KeyHelpers_DEFINED diff --git a/src/gpu/graphite/PaintParams.cpp b/src/gpu/graphite/PaintParams.cpp index 1c898a8afa6f..46be5761b865 100644 --- a/src/gpu/graphite/PaintParams.cpp +++ b/src/gpu/graphite/PaintParams.cpp @@ -114,7 +114,8 @@ void PaintParams::toKey(const KeyContext& keyContext, fDstReadReq == DstReadRequirement::kTextureSample; SkASSERT(needsDstSample == SkToBool(keyContext.dstTexture())); if (needsDstSample) { - DstReadSampleBlock::BeginBlock(keyContext, builder, gatherer, keyContext.dstTexture()); + DstReadSampleBlock::BeginBlock( + keyContext, builder, gatherer, keyContext.dstTexture(), keyContext.dstOffset()); builder->endBlock(); } else if (fDstReadReq == DstReadRequirement::kFramebufferFetch) { @@ -122,9 +123,7 @@ void PaintParams::toKey(const KeyContext& keyContext, builder->endBlock(); } - if (fShader) { - as_SB(fShader)->addToKey(keyContext, builder, gatherer); - } + AddToKey(keyContext, builder, gatherer, fShader.get()); if (fPrimitiveBlender) { AddPrimitiveBlendBlock(keyContext, builder, gatherer, fPrimitiveBlender.get()); @@ -136,9 +135,7 @@ void PaintParams::toKey(const KeyContext& keyContext, keyContext, builder, gatherer, SkBlendMode::kDstIn, {0, 0, 0, fColor.fA}); } - if (fColorFilter) { - as_CFB(fColorFilter)->addToKey(keyContext, builder, gatherer); - } + AddToKey(keyContext, builder, gatherer, fColorFilter.get()); #ifndef SK_IGNORE_GPU_DITHER SkColorType ct = keyContext.dstColorInfo().colorType(); diff --git a/src/gpu/graphite/PaintParamsKey.h b/src/gpu/graphite/PaintParamsKey.h index ba8dbb1c3160..a3e2624f8e8f 100644 --- a/src/gpu/graphite/PaintParamsKey.h +++ b/src/gpu/graphite/PaintParamsKey.h @@ -190,6 +190,6 @@ class AutoLockBuilderAsKey { PaintParamsKey fKey; }; -} // skgpu::graphite +} // namespace skgpu::graphite #endif // skgpu_graphite_PaintParamsKey_DEFINED diff --git a/src/gpu/graphite/PathAtlas.cpp b/src/gpu/graphite/PathAtlas.cpp new file mode 100644 index 000000000000..e97f4ae04b21 --- /dev/null +++ b/src/gpu/graphite/PathAtlas.cpp @@ -0,0 +1,185 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "src/gpu/graphite/PathAtlas.h" + +#include "include/gpu/graphite/Recorder.h" +#include "src/core/SkIPoint16.h" +#include "src/gpu/graphite/AtlasProvider.h" +#include "src/gpu/graphite/Caps.h" +#include "src/gpu/graphite/Log.h" +#include "src/gpu/graphite/RecorderPriv.h" +#include "src/gpu/graphite/RendererProvider.h" +#include "src/gpu/graphite/TextureProxy.h" +#include "src/gpu/graphite/geom/Rect.h" +#include "src/gpu/graphite/geom/Shape.h" +#include "src/gpu/graphite/geom/Transform_graphite.h" + +#ifdef SK_ENABLE_VELLO_SHADERS +#include "src/gpu/graphite/compute/DispatchGroup.h" +#endif + +namespace skgpu::graphite { +namespace { + +// TODO: select atlas size dynamically? Take ContextOptions::fMaxTextureAtlasSize into account? +// TODO: This is the maximum target dimension that vello can handle today +constexpr uint32_t kComputeAtlasDim = 4096; + +} // namespace + +PathAtlas::PathAtlas(uint32_t width, uint32_t height) : fRectanizer(width, height) {} + +PathAtlas::~PathAtlas() = default; + +bool PathAtlas::addShape(Recorder* recorder, + const Rect& transformedShapeBounds, + const Shape& shape, + const Transform& localToDevice, + const SkStrokeRec& style, + AtlasShape::MaskInfo* out) { + SkASSERT(out); + SkASSERT(!transformedShapeBounds.isEmptyNegativeOrNaN()); + + if (!fTexture) { + fTexture = recorder->priv().atlasProvider()->getAtlasTexture( + recorder, this->width(), this->height()); + if (!fTexture) { + SKGPU_LOG_E("Failed to instantiate an atlas texture"); + return false; + } + } + + // Round out the shape bounds to preserve any fractional offset so that it is present in the + // translation that we use when deriving the atlas-space transform later. + Rect maskBounds = transformedShapeBounds.makeRoundOut(); + + // Add an additional one pixel outset as buffer between atlas slots. This prevents sampling from + // neighboring atlas slots; the AtlasShape renderer also uses the outset to sample zero coverage + // on inverse fill pixels that fall outside the mask bounds. + skvx::float2 maskSize = maskBounds.size(); + skvx::float2 atlasSize = maskSize + 2; + SkIPoint16 pos; + if (!fRectanizer.addRect(atlasSize.x(), atlasSize.y(), &pos)) { + return false; + } + + out->fDeviceOrigin = skvx::int2((int)maskBounds.x(), (int)maskBounds.y()); + out->fAtlasOrigin = skvx::half2(pos.x(), pos.y()); + out->fMaskSize = skvx::half2((uint16_t)maskSize.x(), (uint16_t)maskSize.y()); + + this->onAddShape(shape, + localToDevice, + Rect::XYWH(skvx::float2(pos.x(), pos.y()), atlasSize), + out->fDeviceOrigin, + style); + return true; +} + +void PathAtlas::reset() { + fRectanizer.reset(); + this->onReset(); +} + +ComputePathAtlas::ComputePathAtlas() : PathAtlas(kComputeAtlasDim, kComputeAtlasDim) {} + +#ifdef SK_ENABLE_VELLO_SHADERS + +std::unique_ptr VelloComputePathAtlas::recordDispatches(Recorder* recorder) const { + if (!this->texture()) { + return nullptr; + } + + SkASSERT(recorder); + return recorder->priv().rendererProvider()->velloRenderer()->renderScene( + {fOccuppiedWidth, fOccuppiedHeight, SkColors::kBlack}, + fScene, + sk_ref_sp(this->texture()), + recorder); +} + +void VelloComputePathAtlas::onAddShape(const Shape& shape, + const Transform& localToDevice, + const Rect& atlasBounds, + skvx::int2 deviceOffset, + const SkStrokeRec& style) { + // TODO: The compute renderer doesn't support perspective yet. We assume that the path has been + // appropriately transformed in that case. + SkASSERT(localToDevice.type() != Transform::Type::kProjection); + + // Restrict the render to the occupied area of the atlas. + fOccuppiedWidth = std::max(fOccuppiedWidth, (uint32_t)atlasBounds.right()); + fOccuppiedHeight = std::max(fOccuppiedHeight, (uint32_t)atlasBounds.bot()); + + // TODO(b/283876964): Apply clips here. Initially we'll need to encode the clip stack repeatedly + // for each shape since the full vello renderer treats clips and their affected draws as a + // single shape hierarchy in the same scene coordinate space. For coverage masks we want each + // mask to be transformed to its atlas allocation coordinates and for the clip to be applied + // with a translation relative to the atlas slot. + // + // Repeatedly encoding the clip stack should be relatively cheap (depending on how deep the + // clips get) however it is wasteful both in terms of time and memory. If this proves to hurt + // performance, future work will explore building an atlas-oriented element processing stage + // that applies the atlas-relative translation while evaluating the stack monoid on the GPU. + + // Clip the mask to the bounds of the atlas slot. When the rectangle gets turned into a path, + // its bottom and right edges are included in the clip, however semantically those pixels are + // outside the atlas region (the implementation of Rect::size() implies that the bottom-right + // bounds are exclusive). For the clip shape we inset the bottom and right edges by one pixel to + // avoid filling into neighboring regions. + Rect clipBounds(atlasBounds.topLeft() + 1, atlasBounds.botRight() - 1); + SkPath clipRect = SkPath::Rect(clipBounds.asSkRect()); + fScene.pushClipLayer(clipRect, Transform::Identity()); + + // The atlas transform of the shape is the linear-components (scale, rotation, skew) of + // `localToDevice` translated by the top-left offset of `atlasBounds`, accounting for the 1 + // pixel-wide border we added earlier, so that the shape is correctly centered. + SkM44 atlasMatrix = localToDevice.matrix(); + atlasMatrix.postTranslate(atlasBounds.x() + 1 - deviceOffset.x(), + atlasBounds.y() + 1 - deviceOffset.y()); + + Transform atlasTransform(atlasMatrix); + SkPath devicePath = shape.asPath(); + + // For stroke-and-fill, draw two masks into the same atlas slot: one for the stroke and one for + // the fill. + SkStrokeRec::Style styleType = style.getStyle(); + if (styleType == SkStrokeRec::kStroke_Style || + styleType == SkStrokeRec::kHairline_Style || + styleType == SkStrokeRec::kStrokeAndFill_Style) { + // We need to special-case hairline strokes and strokes with sub-pixel width as Vello + // draws these with aliasing and the results are barely visible. Draw the stroke with a + // device-space width of 1 pixel and scale down the alpha by the true width to approximate + // the sampled area. + float width = style.getWidth(); + float deviceWidth = width * atlasTransform.maxScaleFactor(); + if (style.isHairlineStyle() || deviceWidth <= 1.0) { + // Both strokes get 1/2 weight scaled by the theoretical area (1 for hairlines, + // `deviceWidth` otherwise). + SkColor4f color = SkColors::kRed; + color.fR *= style.isHairlineStyle() ? 1.0 : deviceWidth; + + // Transform the stroke's width to its local coordinate space since it'll get drawn with + // `atlasTransform`. + float transformedWidth = 1.0f / atlasTransform.maxScaleFactor(); + SkStrokeRec adjustedStyle(style); + adjustedStyle.setStrokeStyle(transformedWidth); + fScene.solidStroke(devicePath, color, adjustedStyle, atlasTransform); + } else { + fScene.solidStroke(devicePath, SkColors::kRed, style, atlasTransform); + } + } + if (styleType == SkStrokeRec::kFill_Style || styleType == SkStrokeRec::kStrokeAndFill_Style) { + fScene.solidFill(devicePath, SkColors::kRed, shape.fillType(), atlasTransform); + } + + fScene.popClipLayer(); +} + +#endif // SK_ENABLE_VELLO_SHADERS + +} // namespace skgpu::graphite diff --git a/src/gpu/graphite/PathAtlas.h b/src/gpu/graphite/PathAtlas.h new file mode 100644 index 000000000000..aff0f227b5b9 --- /dev/null +++ b/src/gpu/graphite/PathAtlas.h @@ -0,0 +1,160 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef skgpu_graphite_PathAtlas_DEFINED +#define skgpu_graphite_PathAtlas_DEFINED + +#include "include/core/SkStrokeRec.h" +#include "src/gpu/RectanizerSkyline.h" +#include "src/gpu/graphite/geom/AtlasShape.h" + +#ifdef SK_ENABLE_VELLO_SHADERS +#include "src/gpu/graphite/compute/VelloRenderer.h" +#endif + +#include + +namespace skgpu::graphite { + +class Recorder; +class Rect; +class Shape; +class TextureProxy; +class Transform; + +/** + * PathAtlas manages one or more atlas textures that store coverage masks for path rendering. + * + * The contents of a PathAtlas are intended to be transient: atlas regions are considered valid only + * for the scope of the render passes that sample them. Unlike DrawAtlas, PathAtlas does not support + * partial eviction and reuse of subregions. Once an atlas texture is filled up, all of its + * sub-allocations must be invalidated before it can be reused. + * + * PathAtlas does not prescribe how atlas contents get uploaded to the GPU. The specific task + * mechanism is defined by subclasses. + */ +class PathAtlas { +public: + PathAtlas(uint32_t width, uint32_t height); + virtual ~PathAtlas(); + + /** + * Searches the atlas for a slot that can fit a coverage mask for a clipped shape with the given + * bounds in device coordinates and submits the mask to be drawn into the found atlas region. + * + * Returns false if a the shape cannot fit in the atlas. Otherwise, returns true and populates + * `outAtlasBounds` with the atlas-space boundaries of the mask region. + * + * The bounds of the atlas entry is laid out with a 1 pixel outset from the given dimensions. + * + * `shape` will be drawn after applying the linear components (scale, rotation, skew) of the + * provided `localToDevice` transform. This is done by translating the shape by the inverse of + * the rounded out `transformedShapeBounds` offset. For an unclipped shape this amounts to + * translating it back to its origin while preserving any sub-pixel translation. For a clipped + * shape, this ensures that the visible portions of the mask are centered in the atlas slot + * while invisible portions that would lie outside the atlas slot get clipped out. + * + * `addShape()` schedules the shape to be drawn but when and how the rendering happens is + * specified by the subclass implementation. + * + * The stroke-and-fill style is drawn as a single combined coverage mask containing the stroke + * and the fill. + * + * This method lazily creates a TextureProxy that can be referenced by tasks that want to sample + * the atlas. + */ + bool addShape(Recorder*, + const Rect& transformedShapeBounds, + const Shape& shape, + const Transform& localToDevice, + const SkStrokeRec& style, + AtlasShape::MaskInfo* outMaskInfo); + + // Clear all scheduled atlas draws and free up atlas allocations. After this call the atlas can + // be considered cleared and available for new shape insertions. However this method does not + // have any bearing on the contents of the atlas texture itself, which may be in use by GPU + // commands that are in-flight or yet to be submitted. + void reset(); + + // Returns a pointer to the atlas texture. + const TextureProxy* texture() const { return fTexture.get(); } + + uint32_t width() const { return static_cast(fRectanizer.width()); } + uint32_t height() const { return static_cast(fRectanizer.height()); } + +protected: + virtual void onAddShape(const Shape&, + const Transform& transform, + const Rect& atlasBounds, + skvx::int2 deviceOffset, + const SkStrokeRec&) = 0; + virtual void onReset() = 0; + +private: + skgpu::RectanizerSkyline fRectanizer; + + // A PathAtlas lazily requests a texture from the AtlasProvider when the first shape gets added + // to it and references the same texture for the duration of its lifetime. A reference to this + // texture is stored here, which is used by AtlasShapeRenderStep when encoding the render pass. + // + // TODO: Rather than permanently assigning a texture we may want PathAtlases to request one from + // a pool on demand while encoding a dispatch. Currently all PathAtlases reference the same + // TextureProxy and the RenderStep can reference it easily via the PathAtlas. We may want to + // revise how a RenderStep obtains the correct texture if we move to a pooled approach. + sk_sp fTexture; +}; + +class DispatchGroup; + +/** + * Base class for PathAtlas implementations that rasterize coverage masks on the GPU using compute + * shaders. + * + * When a new shape gets added, it gets tracked as input to a series of GPU compute passes. This + * data is recorded by `recordDispatches()` into a DispatchGroup which can be added to a + * ComputeTask. + * + * After a successful call to `recordDispatches()`, the client is free to call `reset()` and start + * adding new shapes for a future atlas render. + */ +class ComputePathAtlas : public PathAtlas { +public: + ComputePathAtlas(); + virtual std::unique_ptr recordDispatches(Recorder*) const = 0; +}; + +#ifdef SK_ENABLE_VELLO_SHADERS + +/** + * ComputePathAtlas that uses a VelloRenderer. + */ +class VelloComputePathAtlas final : public ComputePathAtlas { +public: + // Record the compute dispatches that will draw the atlas contents. + std::unique_ptr recordDispatches(Recorder*) const override; + +private: + void onAddShape( + const Shape&, const Transform&, const Rect&, skvx::int2, const SkStrokeRec&) override; + void onReset() override { + fScene.reset(); + fOccuppiedWidth = fOccuppiedHeight = 0; + } + + // Contains the encoded scene buffer data that serves as the input to a vello compute pass. + VelloScene fScene; + + // Occuppied bounds of the atlas + uint32_t fOccuppiedWidth = 0; + uint32_t fOccuppiedHeight = 0; +}; + +#endif // SK_ENABLE_VELLO_SHADERS + +} // namespace skgpu::graphite + +#endif // skgpu_graphite_PathAtlas_DEFINED diff --git a/src/gpu/graphite/PipelineData.h b/src/gpu/graphite/PipelineData.h index 33b8fa8d5941..fd95dd757b9b 100644 --- a/src/gpu/graphite/PipelineData.h +++ b/src/gpu/graphite/PipelineData.h @@ -16,7 +16,7 @@ #include "include/core/SkSpan.h" #include "include/core/SkTileMode.h" #include "include/private/SkColorData.h" -#include "src/core/SkEnumBitMask.h" +#include "src/base/SkEnumBitMask.h" #include "src/gpu/graphite/DrawTypes.h" #include "src/gpu/graphite/TextureProxy.h" #include "src/gpu/graphite/UniformManager.h" @@ -115,10 +115,10 @@ class PipelineDataGatherer { void write(float f) { fUniformManager.write(f); } void write(int i) { fUniformManager.write(i); } - void write(SkSLType t, const void* data) { fUniformManager.write(t, data); } void write(const Uniform& u, const uint8_t* data) { fUniformManager.write(u, data); } + void writeArray(SkSLType t, const void* data, int n) { fUniformManager.writeArray(t, data, n); } void writeArray(SkSpan colors) { fUniformManager.writeArray(colors); } void writeArray(SkSpan colors) { fUniformManager.writeArray(colors); } void writeArray(SkSpan floats) { fUniformManager.writeArray(floats); } diff --git a/src/gpu/graphite/PipelineDataCache.h b/src/gpu/graphite/PipelineDataCache.h index b520f1d26d33..c6703160063b 100644 --- a/src/gpu/graphite/PipelineDataCache.h +++ b/src/gpu/graphite/PipelineDataCache.h @@ -78,7 +78,8 @@ class PipelineDataCache { SkArenaAlloc fArena{0}; }; -// A UniformDataCache lives for the entire duration of a Recorder. +// A UniformDataCache only lives for a single Recording. It's used to deduplicate uniform data +// blocks uploaded to uniform/storage buffers for a DrawPass pipeline. using UniformDataCache = PipelineDataCache; // A TextureDataCache only lives for a single Recording. When a Recording is snapped it is pulled diff --git a/src/gpu/graphite/Precompile.cpp b/src/gpu/graphite/Precompile.cpp index c9f7cd07ea14..58e1badd75ab 100644 --- a/src/gpu/graphite/Precompile.cpp +++ b/src/gpu/graphite/Precompile.cpp @@ -141,8 +141,11 @@ void PaintOptions::createKey(const KeyContext& keyContext, bool needsDstSample = dstReadReq == DstReadRequirement::kTextureCopy || dstReadReq == DstReadRequirement::kTextureSample; if (needsDstSample) { - DstReadSampleBlock::BeginBlock( - keyContext, keyBuilder, /* gatherer= */ nullptr, /* dstTexture= */ nullptr); + DstReadSampleBlock::BeginBlock(keyContext, + keyBuilder, + /* gatherer= */ nullptr, + /* dstTexture= */ nullptr, + /* dstOffset= */ {0, 0}); keyBuilder->endBlock(); } else if (dstReadReq == DstReadRequirement::kFramebufferFetch) { diff --git a/src/gpu/graphite/PublicPrecompile.cpp b/src/gpu/graphite/PublicPrecompile.cpp index 25f03bafb9d8..95701a6388a8 100644 --- a/src/gpu/graphite/PublicPrecompile.cpp +++ b/src/gpu/graphite/PublicPrecompile.cpp @@ -85,7 +85,8 @@ void Precompile(Context* context, const PaintOptions& options, DrawTypeFlags dra auto rtEffectDict = std::make_unique(); SkColorInfo ci(kRGBA_8888_SkColorType, kPremul_SkAlphaType, nullptr); - KeyContext keyContext(caps, dict, rtEffectDict.get(), ci, /* dstTexture= */ nullptr); + KeyContext keyContext( + caps, dict, rtEffectDict.get(), ci, /* dstTexture= */ nullptr, /* dstOffset= */ {0, 0}); // TODO: we need iterate over a broader set of TextureInfos here. Perhaps, allow the client // to pass in colorType, mipmapping and protection. diff --git a/src/gpu/graphite/QueueManager.cpp b/src/gpu/graphite/QueueManager.cpp index c9c2487c5c58..c88147755fb6 100644 --- a/src/gpu/graphite/QueueManager.cpp +++ b/src/gpu/graphite/QueueManager.cpp @@ -112,6 +112,7 @@ bool QueueManager::addRecording(const InsertRecordingInfo& info, Context* contex } } + fCurrentCommandBuffer->addWaitSemaphores(info.fNumWaitSemaphores, info.fWaitSemaphores); if (!info.fRecording->priv().addCommands(context, fCurrentCommandBuffer.get(), static_cast(info.fTargetSurface), @@ -124,6 +125,11 @@ bool QueueManager::addRecording(const InsertRecordingInfo& info, Context* contex SKGPU_LOG_E("Adding Recording commands to the CommandBuffer has failed"); return false; } + fCurrentCommandBuffer->addSignalSemaphores(info.fNumSignalSemaphores, info.fSignalSemaphores); + if (info.fTargetTextureState) { + fCurrentCommandBuffer->prepareSurfaceForStateUpdate(info.fTargetSurface, + info.fTargetTextureState); + } if (callback) { fCurrentCommandBuffer->addFinishedProc(std::move(callback)); diff --git a/src/gpu/graphite/QueueManager.h b/src/gpu/graphite/QueueManager.h index d07b2b3d1147..0c9f5f0d9b2f 100644 --- a/src/gpu/graphite/QueueManager.h +++ b/src/gpu/graphite/QueueManager.h @@ -30,15 +30,15 @@ class QueueManager { virtual ~QueueManager(); // Adds the commands from the passed in Recording to the current CommandBuffer - bool SK_WARN_UNUSED_RESULT addRecording(const InsertRecordingInfo&, Context*); + [[nodiscard]] bool addRecording(const InsertRecordingInfo&, Context*); // Adds the commands from the passed in Task to the current CommandBuffer - bool SK_WARN_UNUSED_RESULT addTask(Task*, Context*); + [[nodiscard]] bool addTask(Task*, Context*); // Adds a proc that will be called when the current CommandBuffer is submitted and finishes - bool SK_WARN_UNUSED_RESULT addFinishInfo(const InsertFinishInfo&, ResourceProvider*); + [[nodiscard]] bool addFinishInfo(const InsertFinishInfo&, ResourceProvider*); - bool SK_WARN_UNUSED_RESULT submitToGpu(); + [[nodiscard]] bool submitToGpu(); void checkForFinishedWork(SyncToCpu); #if GRAPHITE_TEST_UTILS diff --git a/src/gpu/graphite/Recorder.cpp b/src/gpu/graphite/Recorder.cpp index 42e7502b009f..29db83429092 100644 --- a/src/gpu/graphite/Recorder.cpp +++ b/src/gpu/graphite/Recorder.cpp @@ -7,6 +7,7 @@ #include "include/gpu/graphite/Recorder.h" +#include "include/core/SkBitmap.h" #include "include/core/SkCanvas.h" #include "include/effects/SkRuntimeEffect.h" #include "include/gpu/graphite/BackendTexture.h" @@ -17,6 +18,7 @@ #include "src/core/SkConvertPixels.h" #include "src/gpu/AtlasTypes.h" #include "src/gpu/RefCntedCallback.h" +#include "src/gpu/graphite/AtlasProvider.h" #include "src/gpu/graphite/BufferManager.h" #include "src/gpu/graphite/Caps.h" #include "src/gpu/graphite/CommandBuffer.h" @@ -25,6 +27,7 @@ #include "src/gpu/graphite/Device.h" #include "src/gpu/graphite/GlobalCache.h" #include "src/gpu/graphite/Log.h" +#include "src/gpu/graphite/PathAtlas.h" #include "src/gpu/graphite/PipelineData.h" #include "src/gpu/graphite/PipelineDataCache.h" #include "src/gpu/graphite/ProxyCache.h" @@ -36,7 +39,7 @@ #include "src/gpu/graphite/Texture.h" #include "src/gpu/graphite/UploadBufferManager.h" #include "src/gpu/graphite/UploadTask.h" -#include "src/gpu/graphite/text/AtlasManager.h" +#include "src/gpu/graphite/text/TextAtlasManager.h" #include "src/image/SkImage_Base.h" #include "src/text/gpu/StrikeCache.h" #include "src/text/gpu/TextBlobRedrawCoordinator.h" @@ -83,19 +86,17 @@ static int32_t next_id() { return id; } -Recorder::Recorder(sk_sp sharedContext, - const RecorderOptions& options) +Recorder::Recorder(sk_sp sharedContext, const RecorderOptions& options) : fSharedContext(std::move(sharedContext)) , fRuntimeEffectDict(std::make_unique()) , fGraph(new TaskGraph) , fUniformDataCache(new UniformDataCache) , fTextureDataCache(new TextureDataCache) , fRecorderID(next_id()) - , fAtlasManager(std::make_unique(this)) + , fAtlasProvider(std::make_unique(this)) , fTokenTracker(std::make_unique()) , fStrikeCache(std::make_unique()) , fTextBlobCache(std::make_unique(fRecorderID)) { - fClientImageProvider = options.fImageProvider; if (!fClientImageProvider) { fClientImageProvider = DefaultImageProvider::Make(); @@ -161,7 +162,7 @@ std::unique_ptr Recorder::snap() { fDrawBufferManager.reset(new DrawBufferManager(fResourceProvider.get(), fSharedContext->caps())); fTextureDataCache = std::make_unique(); - // We leave the UniformDataCache alone + fUniformDataCache = std::make_unique(); fGraph->reset(); fRuntimeEffectDict->reset(); return nullptr; @@ -185,10 +186,11 @@ std::unique_ptr Recorder::snap() { fGraph = std::make_unique(); fRuntimeEffectDict->reset(); fTextureDataCache = std::make_unique(); + fUniformDataCache = std::make_unique(); // inject an initial task to maintain atlas state for next Recording auto uploads = std::make_unique(); - fAtlasManager->recordUploads(uploads.get(), /*useCachedUploads=*/true); + fAtlasProvider->textAtlasManager()->recordUploads(uploads.get(), /*useCachedUploads=*/true); if (uploads->size() > 0) { sk_sp uploadTask = UploadTask::Make(uploads.get()); this->priv().add(std::move(uploadTask)); @@ -286,7 +288,7 @@ bool Recorder::updateBackendTexture(const BackendTexture& backendTex, return false; } - sk_sp proxy(new TextureProxy(std::move(texture))); + sk_sp proxy = TextureProxy::Wrap(std::move(texture)); std::vector mipLevels; mipLevels.resize(numLevels); @@ -354,9 +356,14 @@ void RecorderPriv::flushTrackedDevices() { sk_sp RecorderPriv::CreateCachedProxy(Recorder* recorder, const SkBitmap& bitmap, Mipmapped mipmapped) { + SkASSERT(!bitmap.isNull()); return recorder->priv().proxyCache()->findOrCreateCachedProxy(recorder, bitmap, mipmapped); } +size_t RecorderPriv::getResourceCacheLimit() const { + return fRecorder->fResourceProvider->getResourceCacheLimit(); +} + #if GRAPHITE_TEST_UTILS // used by the Context that created this Recorder to set a back pointer void RecorderPriv::setContext(Context* context) { diff --git a/src/gpu/graphite/RecorderPriv.h b/src/gpu/graphite/RecorderPriv.h index 204cf4d7e097..38d9324d12f4 100644 --- a/src/gpu/graphite/RecorderPriv.h +++ b/src/gpu/graphite/RecorderPriv.h @@ -54,7 +54,7 @@ class RecorderPriv { DrawBufferManager* drawBufferManager() { return fRecorder->fDrawBufferManager.get(); } UploadBufferManager* uploadBufferManager() { return fRecorder->fUploadBufferManager.get(); } - AtlasManager* atlasManager() { return fRecorder->fAtlasManager.get(); } + AtlasProvider* atlasProvider() { return fRecorder->fAtlasProvider.get(); } TokenTracker* tokenTracker() { return fRecorder->fTokenTracker.get(); } sktext::gpu::StrikeCache* strikeCache() { return fRecorder->fStrikeCache.get(); } sktext::gpu::TextBlobRedrawCoordinator* textBlobCache() { @@ -68,6 +68,8 @@ class RecorderPriv { uint32_t recorderID() const { return fRecorder->fRecorderID; } + size_t getResourceCacheLimit() const; + #if GRAPHITE_TEST_UTILS ResourceCache* resourceCache() { return fRecorder->fResourceProvider->resourceCache(); } // used by the Context that created this Recorder to set a back pointer diff --git a/src/gpu/graphite/Recording.cpp b/src/gpu/graphite/Recording.cpp index 3c4b9df9850e..74ab69891402 100644 --- a/src/gpu/graphite/Recording.cpp +++ b/src/gpu/graphite/Recording.cpp @@ -42,16 +42,28 @@ Recording::~Recording() { this->priv().setFailureResultForFinishedProcs(); } -#if GRAPHITE_TEST_UTILS -bool Recording::isTargetProxyInstantiated() const { - return fTargetProxyData->lazyProxy()->isInstantiated(); -} -#endif - std::size_t Recording::ProxyHash::operator()(const sk_sp &proxy) const { return SkGoodHash()(proxy.get()); } +Recording::LazyProxyData::LazyProxyData(const TextureInfo& textureInfo) { + fTargetProxy = TextureProxy::MakeFullyLazy( + textureInfo, skgpu::Budgeted::kNo, Volatile::kYes, [this](ResourceProvider*) { + SkASSERT(SkToBool(fTarget)); + return std::move(fTarget); + }); +} + +TextureProxy* Recording::LazyProxyData::lazyProxy() { return fTargetProxy.get(); } + +sk_sp Recording::LazyProxyData::refLazyProxy() { return fTargetProxy; } + +bool Recording::LazyProxyData::lazyInstantiate(ResourceProvider* resourceProvider, + sk_sp texture) { + fTarget = std::move(texture); + return fTargetProxy->lazyInstantiate(resourceProvider); +} + //////////////////////////////////////////////////////////////////////////////// bool RecordingPriv::hasNonVolatileLazyProxies() const { return !fRecording->fNonVolatileLazyProxies.empty(); @@ -106,34 +118,22 @@ void RecordingPriv::setFailureResultForFinishedProcs() { fRecording->fFinishedProcs.clear(); } -#if GRAPHITE_TEST_UTILS -int RecordingPriv::numVolatilePromiseImages() const { - return fRecording->fVolatileLazyProxies.size(); -} - -int RecordingPriv::numNonVolatilePromiseImages() const { - return fRecording->fNonVolatileLazyProxies.size(); -} - -bool RecordingPriv::hasTasks() const { return fRecording->fGraph->hasTasks(); } -#endif - bool RecordingPriv::addCommands(Context* context, CommandBuffer* commandBuffer, - Surface* replaySurface, - SkIVector replayTranslation) { + Surface* targetSurface, + SkIVector targetTranslation) { AutoDeinstantiateTextureProxy autoDeinstantiateTargetProxy( fRecording->fTargetProxyData ? fRecording->fTargetProxyData->lazyProxy() : nullptr); const Texture* replayTarget = nullptr; - SkASSERT(SkToBool(fRecording->fTargetProxyData) == SkToBool(replaySurface)); ResourceProvider* resourceProvider = context->priv().resourceProvider(); + SkASSERT(!SkToBool(fRecording->fTargetProxyData) || SkToBool(targetSurface)); if (fRecording->fTargetProxyData) { - if (!replaySurface) { + if (!targetSurface) { SKGPU_LOG_E("No surface provided to instantiate target texture proxy."); return false; } - TextureProxy* surfaceTexture = replaySurface->backingTextureProxy(); + TextureProxy* surfaceTexture = targetSurface->backingTextureProxy(); if (!surfaceTexture->instantiate(resourceProvider)) { SKGPU_LOG_E("Could not instantiate target texture proxy."); return false; @@ -150,7 +150,7 @@ bool RecordingPriv::addCommands(Context* context, commandBuffer->trackResource(fRecording->fExtraResourceRefs[i]); } if (!fRecording->fGraph->addCommands( - context, commandBuffer, {replayTarget, replayTranslation})) { + context, commandBuffer, {replayTarget, targetTranslation})) { return false; } for (int i = 0; i < fRecording->fFinishedProcs.size(); ++i) { @@ -169,22 +169,22 @@ void RecordingPriv::addTask(sk_sp task) { fRecording->fGraph->prepend(std::move(task)); } -Recording::LazyProxyData::LazyProxyData(const TextureInfo& textureInfo) { - fTargetProxy = TextureProxy::MakeFullyLazy( - textureInfo, skgpu::Budgeted::kNo, Volatile::kYes, [this](ResourceProvider*) { - SkASSERT(SkToBool(fTarget)); - return std::move(fTarget); - }); +//////////////////////////////////////////////////////////////////////////////// +// Utility methods for testing only +bool RecordingPriv::isTargetProxyInstantiated() const { + return fRecording->fTargetProxyData->lazyProxy()->isInstantiated(); } -TextureProxy* Recording::LazyProxyData::lazyProxy() { return fTargetProxy.get(); } +int RecordingPriv::numVolatilePromiseImages() const { + return fRecording->fVolatileLazyProxies.size(); +} -sk_sp Recording::LazyProxyData::refLazyProxy() { return fTargetProxy; } +int RecordingPriv::numNonVolatilePromiseImages() const { + return fRecording->fNonVolatileLazyProxies.size(); +} -bool Recording::LazyProxyData::lazyInstantiate(ResourceProvider* resourceProvider, - sk_sp texture) { - fTarget = std::move(texture); - return fTargetProxy->lazyInstantiate(resourceProvider); +bool RecordingPriv::hasTasks() const { + return fRecording->fGraph->hasTasks(); } } // namespace skgpu::graphite diff --git a/src/gpu/graphite/RecordingPriv.h b/src/gpu/graphite/RecordingPriv.h index c042d15e3c7e..222e6b0556bc 100644 --- a/src/gpu/graphite/RecordingPriv.h +++ b/src/gpu/graphite/RecordingPriv.h @@ -27,15 +27,16 @@ class RecordingPriv { void setFailureResultForFinishedProcs(); -#if GRAPHITE_TEST_UTILS + bool addCommands(Context*, CommandBuffer*, Surface* targetSurface, SkIVector targetTranslation); + void addResourceRef(sk_sp resource); + void addTask(sk_sp task); + + //////////////////////////////////////////////////////////////////////////////// + // Utility methods for testing only + bool isTargetProxyInstantiated() const; int numVolatilePromiseImages() const; int numNonVolatilePromiseImages() const; bool hasTasks() const; -#endif - - bool addCommands(Context*, CommandBuffer*, Surface* replaySurface, SkIVector replayTranslation); - void addResourceRef(sk_sp resource); - void addTask(sk_sp task); private: explicit RecordingPriv(Recording* recorder) : fRecording(recorder) {} diff --git a/src/gpu/graphite/Renderer.cpp b/src/gpu/graphite/Renderer.cpp index c9be89c1babb..977a44724e85 100644 --- a/src/gpu/graphite/Renderer.cpp +++ b/src/gpu/graphite/Renderer.cpp @@ -49,4 +49,12 @@ RenderStep::RenderStep(std::string_view className, } } +float Renderer::boundsOutset(const Transform& localToDevice, const Rect& bounds) const { + float outset = 0.0f; + for (int i = 0; i < this->numRenderSteps(); ++i) { + outset = std::max(outset, this->step(i).boundsOutset(localToDevice, bounds)); + } + return outset; +} + } // namespace skgpu::graphite diff --git a/src/gpu/graphite/Renderer.h b/src/gpu/graphite/Renderer.h index fd702ddfd9b8..4b0201a7a7b1 100644 --- a/src/gpu/graphite/Renderer.h +++ b/src/gpu/graphite/Renderer.h @@ -11,7 +11,7 @@ #include "include/core/SkSpan.h" #include "include/core/SkString.h" #include "include/core/SkTypes.h" -#include "src/core/SkEnumBitMask.h" +#include "src/base/SkEnumBitMask.h" #include "src/gpu/graphite/Attribute.h" #include "src/gpu/graphite/DrawTypes.h" #include "src/gpu/graphite/ResourceTypes.h" @@ -32,8 +32,10 @@ namespace skgpu::graphite { class DrawWriter; class DrawParams; class PipelineDataGatherer; +class Rect; class ResourceProvider; class TextureDataBlock; +class Transform; struct ResourceBindingRequirements; @@ -104,17 +106,23 @@ class RenderStep { // 'half4 primitiveColor' variable (defined in the calling code). virtual const char* fragmentColorSkSL() const { return R"()"; } + // Returns the effective local-space outset the RenderStep applies to geometry transformed by + // `localToDevice` contained in the local `bounds`. + virtual float boundsOutset(const Transform& localToDevice, const Rect& bounds) const { + return 0.0f; + } + uint32_t uniqueID() const { return fUniqueID; } // Returns a name formatted as "Subclass[variant]", where "Subclass" matches the C++ class name // and variant is a unique term describing instance's specific configuration. const char* name() const { return fName.c_str(); } - bool requiresMSAA() const { return fFlags & Flags::kRequiresMSAA; } - bool performsShading() const { return fFlags & Flags::kPerformsShading; } - bool hasTextures() const { return fFlags & Flags::kHasTextures; } - bool emitsCoverage() const { return fFlags & Flags::kEmitsCoverage; } - bool emitsPrimitiveColor() const { return fFlags & Flags::kEmitsPrimitiveColor; } + bool requiresMSAA() const { return SkToBool(fFlags & Flags::kRequiresMSAA); } + bool performsShading() const { return SkToBool(fFlags & Flags::kPerformsShading); } + bool hasTextures() const { return SkToBool(fFlags & Flags::kHasTextures); } + bool emitsCoverage() const { return SkToBool(fFlags & Flags::kEmitsCoverage); } + bool emitsPrimitiveColor() const { return SkToBool(fFlags & Flags::kEmitsPrimitiveColor); } PrimitiveType primitiveType() const { return fPrimitiveType; } size_t vertexStride() const { return fVertexStride; } @@ -202,7 +210,7 @@ class RenderStep { std::string fName; }; -SK_MAKE_BITMASK_OPS(RenderStep::Flags); +SK_MAKE_BITMASK_OPS(RenderStep::Flags) class Renderer { using StepFlags = RenderStep::Flags; @@ -223,12 +231,22 @@ class Renderer { DrawTypeFlags drawTypes() const { return fDrawTypes; } int numRenderSteps() const { return fStepCount; } - bool requiresMSAA() const { return fStepFlags & StepFlags::kRequiresMSAA; } - bool emitsCoverage() const { return fStepFlags & StepFlags::kEmitsCoverage; } - bool emitsPrimitiveColor() const { return fStepFlags & StepFlags::kEmitsPrimitiveColor; } + bool requiresMSAA() const { + return SkToBool(fStepFlags & StepFlags::kRequiresMSAA); + } + bool emitsCoverage() const { + return SkToBool(fStepFlags & StepFlags::kEmitsCoverage); + } + bool emitsPrimitiveColor() const { + return SkToBool(fStepFlags & StepFlags::kEmitsPrimitiveColor); + } SkEnumBitMask depthStencilFlags() const { return fDepthStencilFlags; } + // Returns the effective local-space outset the Renderer applies to geometry transformed by + // `localToDevice` contained in the local `bounds`. + float boundsOutset(const Transform& localToDevice, const Rect& bounds) const; + private: friend class RendererProvider; // for ctors diff --git a/src/gpu/graphite/RendererProvider.cpp b/src/gpu/graphite/RendererProvider.cpp index 353000df2271..5928c6c6c293 100644 --- a/src/gpu/graphite/RendererProvider.cpp +++ b/src/gpu/graphite/RendererProvider.cpp @@ -11,6 +11,7 @@ #include "include/core/SkVertices.h" #include "src/gpu/graphite/Caps.h" #include "src/gpu/graphite/render/AnalyticRRectRenderStep.h" +#include "src/gpu/graphite/render/AtlasShapeRenderStep.h" #include "src/gpu/graphite/render/BitmapTextRenderStep.h" #include "src/gpu/graphite/render/CommonDepthStencilSettings.h" #include "src/gpu/graphite/render/CoverBoundsRenderStep.h" @@ -50,6 +51,7 @@ RendererProvider::RendererProvider(const Caps* caps, StaticBufferManager* buffer DrawTypeFlags::kShape); fTessellatedStrokes = makeFromStep( std::make_unique(infinitySupport), DrawTypeFlags::kShape); + fAtlasShape = makeFromStep(std::make_unique(), DrawTypeFlags::kShape); fBitmapText = makeFromStep(std::make_unique(), DrawTypeFlags::kText); for (bool lcd : {false, true}) { diff --git a/src/gpu/graphite/RendererProvider.h b/src/gpu/graphite/RendererProvider.h index f2267490904a..4d5329a1af0a 100644 --- a/src/gpu/graphite/RendererProvider.h +++ b/src/gpu/graphite/RendererProvider.h @@ -47,6 +47,9 @@ class RendererProvider { const Renderer* convexTessellatedWedges() const { return &fConvexTessellatedWedges; } const Renderer* tessellatedStrokes() const { return &fTessellatedStrokes; } + // Atlas'ed path rendering + const Renderer* atlasShape() const { return &fAtlasShape; } + // Atlas'ed text rendering const Renderer* bitmapText() const { return &fBitmapText; } const Renderer* sdfText(bool useLCDText) const { return &fSDFText[useLCDText]; } @@ -73,6 +76,7 @@ class RendererProvider { const RenderStep* lookup(uint32_t uniqueID) const; #ifdef SK_ENABLE_VELLO_SHADERS + // Compute shader-based path renderer and compositor. const VelloRenderer* velloRenderer() const { return fVelloRenderer.get(); } #endif @@ -99,6 +103,8 @@ class RendererProvider { Renderer fConvexTessellatedWedges; Renderer fTessellatedStrokes; + Renderer fAtlasShape; + Renderer fBitmapText; Renderer fSDFText[2]; // bool isLCD diff --git a/src/gpu/graphite/Resource.h b/src/gpu/graphite/Resource.h index 416cccc41eb9..0c6c46833dff 100644 --- a/src/gpu/graphite/Resource.h +++ b/src/gpu/graphite/Resource.h @@ -23,6 +23,10 @@ namespace skgpu::graphite { class ResourceCache; class SharedContext; +#if GRAPHITE_TEST_UTILS +class Texture; +#endif + /** * Base class for objects that can be kept in the ResourceCache. */ @@ -109,6 +113,8 @@ class Resource { #if GRAPHITE_TEST_UTILS bool testingShouldDeleteASAP() const { return fDeleteASAP == DeleteASAP::kYes; } + + virtual const Texture* asTexture() const { return nullptr; } #endif protected: diff --git a/src/gpu/graphite/ResourceCache.cpp b/src/gpu/graphite/ResourceCache.cpp index 2be64640f8fd..a10d7d2285b5 100644 --- a/src/gpu/graphite/ResourceCache.cpp +++ b/src/gpu/graphite/ResourceCache.cpp @@ -14,6 +14,10 @@ #include "src/gpu/graphite/ProxyCache.h" #include "src/gpu/graphite/Resource.h" +#if GRAPHITE_TEST_UTILS +#include "src/gpu/graphite/Texture.h" +#endif + namespace skgpu::graphite { #define ASSERT_SINGLE_OWNER SKGPU_ASSERT_SINGLE_OWNER(fSingleOwner) @@ -653,6 +657,20 @@ Resource* ResourceCache::topOfPurgeableQueue() { return fPurgeableQueue.peek(); } +void ResourceCache::visitTextures( + const std::function& func) const { + for (int i = 0; i < fNonpurgeableResources.size(); ++i) { + if (const Texture* tex = fNonpurgeableResources[i]->asTexture()) { + func(tex, /* purgeable= */ false); + } + } + for (int i = 0; i < fPurgeableQueue.count(); ++i) { + if (const Texture* tex = fPurgeableQueue.at(i)->asTexture()) { + func(tex, /* purgeable= */ true); + } + } +} + #endif // GRAPHITE_TEST_UTILS } // namespace skgpu::graphite diff --git a/src/gpu/graphite/ResourceCache.h b/src/gpu/graphite/ResourceCache.h index 0db7615db8eb..083ff4eedc43 100644 --- a/src/gpu/graphite/ResourceCache.h +++ b/src/gpu/graphite/ResourceCache.h @@ -17,6 +17,9 @@ #include "src/gpu/GpuTypesPriv.h" #include "src/gpu/graphite/ResourceTypes.h" +#if GRAPHITE_TEST_UTILS +#include +#endif #include namespace skgpu { @@ -29,6 +32,10 @@ class GraphiteResourceKey; class ProxyCache; class Resource; +#if GRAPHITE_TEST_UTILS +class Texture; +#endif + class ResourceCache : public SkRefCnt { public: static sk_sp Make(SingleOwner*, uint32_t recorderID); @@ -65,6 +72,8 @@ class ResourceCache : public SkRefCnt { // the return queue). Also no new Resources can be retrieved from the ResourceCache. void shutdown(); + size_t getMaxBudget() const { return fMaxBytes; } + #if GRAPHITE_TEST_UTILS void forceProcessReturnedResources() { this->processReturnedResources(); } @@ -83,6 +92,8 @@ class ResourceCache : public SkRefCnt { Resource* topOfPurgeableQueue(); bool testingInPurgeableQueue(Resource* resource) { return this->inPurgeableQueue(resource); } + + void visitTextures(const std::function&) const; #endif ProxyCache* proxyCache() { return fProxyCache.get(); } diff --git a/src/gpu/graphite/ResourceProvider.cpp b/src/gpu/graphite/ResourceProvider.cpp index b90cbafd71ce..a5dc76df82c9 100644 --- a/src/gpu/graphite/ResourceProvider.cpp +++ b/src/gpu/graphite/ResourceProvider.cpp @@ -31,8 +31,7 @@ ResourceProvider::ResourceProvider(SharedContext* sharedContext, SingleOwner* singleOwner, uint32_t recorderID) : fSharedContext(sharedContext) - , fResourceCache(ResourceCache::Make(singleOwner, recorderID)) - , fCompiler(std::make_unique(fSharedContext->caps()->shaderCaps())) {} + , fResourceCache(ResourceCache::Make(singleOwner, recorderID)) {} ResourceProvider::~ResourceProvider() { fResourceCache->shutdown(); diff --git a/src/gpu/graphite/ResourceProvider.h b/src/gpu/graphite/ResourceProvider.h index 09a3b10fe578..e99edf089ee2 100644 --- a/src/gpu/graphite/ResourceProvider.h +++ b/src/gpu/graphite/ResourceProvider.h @@ -72,13 +72,13 @@ class ResourceProvider { SkTileMode xTileMode, SkTileMode yTileMode); - SkSL::Compiler* skslCompiler() { return fCompiler.get(); } - BackendTexture createBackendTexture(SkISize dimensions, const TextureInfo&); void deleteBackendTexture(BackendTexture&); ProxyCache* proxyCache() { return fResourceCache->proxyCache(); } + size_t getResourceCacheLimit() const { return fResourceCache->getMaxBudget(); } + #if GRAPHITE_TEST_UTILS ResourceCache* resourceCache() { return fResourceCache.get(); } const SharedContext* sharedContext() { return fSharedContext; } @@ -113,10 +113,6 @@ class ResourceProvider { virtual BackendTexture onCreateBackendTexture(SkISize dimensions, const TextureInfo&) = 0; virtual void onDeleteBackendTexture(BackendTexture&) = 0; - - // Compiler used for compiling SkSL into backend shader code. We only want to create the - // compiler once, as there is significant overhead to the first compile. - std::unique_ptr fCompiler; }; } // namespace skgpu::graphite diff --git a/src/gpu/graphite/ResourceTypes.h b/src/gpu/graphite/ResourceTypes.h index f739b61edf3f..3c6e9d6779d9 100644 --- a/src/gpu/graphite/ResourceTypes.h +++ b/src/gpu/graphite/ResourceTypes.h @@ -8,9 +8,11 @@ #ifndef skgpu_graphite_ResourceTypes_DEFINED #define skgpu_graphite_ResourceTypes_DEFINED +#include "include/core/SkSamplingOptions.h" +#include "include/core/SkTileMode.h" #include "include/gpu/graphite/GraphiteTypes.h" #include "include/private/base/SkTo.h" -#include "src/core/SkEnumBitMask.h" +#include "src/base/SkEnumBitMask.h" namespace skgpu::graphite { @@ -22,7 +24,7 @@ enum class DepthStencilFlags : int { kStencil = 0b010, kDepthStencil = kDepth | kStencil, }; -SK_MAKE_BITMASK_OPS(DepthStencilFlags); +SK_MAKE_BITMASK_OPS(DepthStencilFlags) /** * What a GPU buffer will be used for @@ -145,6 +147,44 @@ struct ClearBufferInfo { operator bool() const { return SkToBool(fBuffer); } }; +/** + * Struct used to describe how a Texture/TextureProxy/TextureProxyView is sampled. + */ +struct SamplerDesc { + static_assert(kSkTileModeCount <= 4 && kSkFilterModeCount <= 2 && kSkMipmapModeCount <= 4); + SamplerDesc(const SkSamplingOptions& samplingOptions, const SkTileMode tileModes[2]) + : fDesc((static_cast(tileModes[0]) << 0) | + (static_cast(tileModes[1]) << 2) | + (static_cast(samplingOptions.filter) << 4) | + (static_cast(samplingOptions.mipmap) << 5)) { + // Cubic sampling is handled in a shader, with the actual texture sampled by with NN, + // but that is what a cubic SkSamplingOptions is set to if you ignore 'cubic', which let's + // us simplify how we construct SamplerDec's from the options passed to high-level draws. + SkASSERT(!samplingOptions.useCubic || (samplingOptions.filter == SkFilterMode::kNearest && + samplingOptions.mipmap == SkMipmapMode::kNone)); + } + + SamplerDesc(const SamplerDesc&) = default; + + bool operator==(const SamplerDesc& o) const { return o.fDesc == fDesc; } + bool operator!=(const SamplerDesc& o) const { return o.fDesc != fDesc; } + + SkTileMode tileModeX() const { return static_cast((fDesc >> 0) & 0b11); } + SkTileMode tileModeY() const { return static_cast((fDesc >> 2) & 0b11); } + + // NOTE: returns the HW sampling options to use, so a bicubic SkSamplingOptions will become + // nearest-neighbor sampling in HW. + SkSamplingOptions samplingOptions() const { + // TODO: Add support for anisotropic filtering + SkFilterMode filter = static_cast((fDesc >> 4) & 0b01); + SkMipmapMode mipmap = static_cast((fDesc >> 5) & 0b11); + return SkSamplingOptions(filter, mipmap); + } + +private: + uint32_t fDesc; +}; + }; // namespace skgpu::graphite #endif // skgpu_graphite_ResourceTypes_DEFINED diff --git a/src/gpu/graphite/ShaderCodeDictionary.cpp b/src/gpu/graphite/ShaderCodeDictionary.cpp index 6853fc251961..45dae7fb18b4 100644 --- a/src/gpu/graphite/ShaderCodeDictionary.cpp +++ b/src/gpu/graphite/ShaderCodeDictionary.cpp @@ -602,7 +602,7 @@ static constexpr int kEightStopGradient = 8; static constexpr Uniform kLinearGradientUniforms4[] = { { "colors", SkSLType::kFloat4, kFourStopGradient }, - { "offsets", SkSLType::kFloat, kFourStopGradient }, + { "offsets", SkSLType::kFloat4 }, { "point0", SkSLType::kFloat2 }, { "point1", SkSLType::kFloat2 }, { "tilemode", SkSLType::kInt }, @@ -611,7 +611,7 @@ static constexpr Uniform kLinearGradientUniforms4[] = { }; static constexpr Uniform kLinearGradientUniforms8[] = { { "colors", SkSLType::kFloat4, kEightStopGradient }, - { "offsets", SkSLType::kFloat, kEightStopGradient }, + { "offsets", SkSLType::kFloat4, 2 }, { "point0", SkSLType::kFloat2 }, { "point1", SkSLType::kFloat2 }, { "tilemode", SkSLType::kInt }, @@ -633,7 +633,7 @@ static constexpr TextureAndSampler kTextureGradientTexturesAndSamplers[] = { static constexpr Uniform kRadialGradientUniforms4[] = { { "colors", SkSLType::kFloat4, kFourStopGradient }, - { "offsets", SkSLType::kFloat, kFourStopGradient }, + { "offsets", SkSLType::kFloat4 }, { "center", SkSLType::kFloat2 }, { "radius", SkSLType::kFloat }, { "tilemode", SkSLType::kInt }, @@ -642,7 +642,7 @@ static constexpr Uniform kRadialGradientUniforms4[] = { }; static constexpr Uniform kRadialGradientUniforms8[] = { { "colors", SkSLType::kFloat4, kEightStopGradient }, - { "offsets", SkSLType::kFloat, kEightStopGradient }, + { "offsets", SkSLType::kFloat4, 2 }, { "center", SkSLType::kFloat2 }, { "radius", SkSLType::kFloat }, { "tilemode", SkSLType::kInt }, @@ -660,7 +660,7 @@ static constexpr Uniform kRadialGradientUniformsTexture[] = { static constexpr Uniform kSweepGradientUniforms4[] = { { "colors", SkSLType::kFloat4, kFourStopGradient }, - { "offsets", SkSLType::kFloat, kFourStopGradient }, + { "offsets", SkSLType::kFloat4 }, { "center", SkSLType::kFloat2 }, { "bias", SkSLType::kFloat }, { "scale", SkSLType::kFloat }, @@ -670,7 +670,7 @@ static constexpr Uniform kSweepGradientUniforms4[] = { }; static constexpr Uniform kSweepGradientUniforms8[] = { { "colors", SkSLType::kFloat4, kEightStopGradient }, - { "offsets", SkSLType::kFloat, kEightStopGradient }, + { "offsets", SkSLType::kFloat4, 2 }, { "center", SkSLType::kFloat2 }, { "bias", SkSLType::kFloat }, { "scale", SkSLType::kFloat }, @@ -690,7 +690,7 @@ static constexpr Uniform kSweepGradientUniformsTexture[] = { static constexpr Uniform kConicalGradientUniforms4[] = { { "colors", SkSLType::kFloat4, kFourStopGradient }, - { "offsets", SkSLType::kFloat, kFourStopGradient }, + { "offsets", SkSLType::kFloat4 }, { "point0", SkSLType::kFloat2 }, { "point1", SkSLType::kFloat2 }, { "radius0", SkSLType::kFloat }, @@ -701,7 +701,7 @@ static constexpr Uniform kConicalGradientUniforms4[] = { }; static constexpr Uniform kConicalGradientUniforms8[] = { { "colors", SkSLType::kFloat4, kEightStopGradient }, - { "offsets", SkSLType::kFloat, kEightStopGradient }, + { "offsets", SkSLType::kFloat4, 2 }, { "point0", SkSLType::kFloat2 }, { "point1", SkSLType::kFloat2 }, { "radius0", SkSLType::kFloat }, @@ -789,7 +789,21 @@ static constexpr Uniform kImageShaderUniforms[] = { { "tilemodeX", SkSLType::kInt }, { "tilemodeY", SkSLType::kInt }, { "filterMode", SkSLType::kInt }, - { "useCubic", SkSLType::kInt }, + { "readSwizzle", SkSLType::kInt }, + // The next 6 uniforms are for the color space transformation + { "csXformFlags", SkSLType::kInt }, + { "csXformSrcKind", SkSLType::kInt }, + { "csXformSrcCoeffs", SkSLType::kHalf, kNumXferFnCoeffs }, + { "csXformGamutTransform", SkSLType::kHalf3x3 }, + { "csXformDstKind", SkSLType::kInt }, + { "csXformDstCoeffs", SkSLType::kHalf, kNumXferFnCoeffs }, +}; + +static constexpr Uniform kCubicImageShaderUniforms[] = { + { "imgSize", SkSLType::kFloat2 }, + { "subset", SkSLType::kFloat4 }, + { "tilemodeX", SkSLType::kInt }, + { "tilemodeY", SkSLType::kInt }, { "cubicCoeffs", SkSLType::kHalf4x4 }, { "readSwizzle", SkSLType::kInt }, // The next 6 uniforms are for the color space transformation @@ -827,6 +841,7 @@ static_assert(4 == static_cast(ReadSwizzle::kBGRA), "ImageShader code depends on ReadSwizzle"); static constexpr char kImageShaderName[] = "sk_image_shader"; +static constexpr char kCubicImageShaderName[] = "sk_cubic_image_shader"; //-------------------------------------------------------------------------------------------------- @@ -1015,8 +1030,7 @@ class GraphitePipelineCallbacks : public SkSL::PipelineStage::Callbacks { } void declareFunction(const char* decl) override { - // TODO(skbug.com/14387) - The pipeline generator does not include semicolons for functions - *fPreamble += std::string(decl) + ";"; + *fPreamble += std::string(decl); } void defineStruct(const char* definition) override { @@ -1537,6 +1551,16 @@ ShaderCodeDictionary::ShaderCodeDictionary() { GenerateDefaultPreamble, kNoChildren }; + fBuiltInCodeSnippets[(int) BuiltInCodeSnippetID::kCubicImageShader] = { + "CubicImageShader", + SkSpan(kCubicImageShaderUniforms), + SnippetRequirementFlags::kLocalCoords, + SkSpan(kISTexturesAndSamplers), + kCubicImageShaderName, + GenerateDefaultExpression, + GenerateDefaultPreamble, + kNoChildren + }; fBuiltInCodeSnippets[(int) BuiltInCodeSnippetID::kYUVImageShader] = { "YUVImageShader", SkSpan(kYUVImageShaderUniforms), diff --git a/src/gpu/graphite/ShaderCodeDictionary.h b/src/gpu/graphite/ShaderCodeDictionary.h index b86325e2bf32..c957011e9c57 100644 --- a/src/gpu/graphite/ShaderCodeDictionary.h +++ b/src/gpu/graphite/ShaderCodeDictionary.h @@ -16,8 +16,8 @@ #include "include/private/base/SkThreadAnnotations.h" #include "include/private/base/SkTo.h" #include "src/base/SkArenaAlloc.h" +#include "src/base/SkEnumBitMask.h" #include "src/base/SkSpinlock.h" -#include "src/core/SkEnumBitMask.h" #include "src/core/SkTHash.h" #include "src/gpu/Blend.h" #include "src/gpu/graphite/BuiltInCodeSnippetID.h" @@ -62,7 +62,7 @@ enum class SnippetRequirementFlags : uint32_t { kBlenderDstColor = 0x4, // The "dst" argument for a blender kSurfaceColor = 0x8, }; -SK_MAKE_BITMASK_OPS(SnippetRequirementFlags); +SK_MAKE_BITMASK_OPS(SnippetRequirementFlags) class ShaderInfo; class ShaderNode; @@ -102,13 +102,13 @@ struct ShaderSnippet { , fNumChildren(numChildren) {} bool needsLocalCoords() const { - return fSnippetRequirementFlags & SnippetRequirementFlags::kLocalCoords; + return SkToBool(fSnippetRequirementFlags & SnippetRequirementFlags::kLocalCoords); } bool needsPriorStageOutput() const { - return fSnippetRequirementFlags & SnippetRequirementFlags::kPriorStageOutput; + return SkToBool(fSnippetRequirementFlags & SnippetRequirementFlags::kPriorStageOutput); } bool needsBlenderDstColor() const { - return fSnippetRequirementFlags & SnippetRequirementFlags::kBlenderDstColor; + return SkToBool(fSnippetRequirementFlags & SnippetRequirementFlags::kBlenderDstColor); } const char* fName = nullptr; @@ -177,10 +177,10 @@ class ShaderInfo { const char* ssboIndex); bool needsLocalCoords() const { - return fSnippetRequirementFlags & SnippetRequirementFlags::kLocalCoords; + return SkToBool(fSnippetRequirementFlags & SnippetRequirementFlags::kLocalCoords); } bool needsSurfaceColor() const { - return fSnippetRequirementFlags & SnippetRequirementFlags::kSurfaceColor; + return SkToBool(fSnippetRequirementFlags & SnippetRequirementFlags::kSurfaceColor); } const RuntimeEffectDictionary* runtimeEffectDictionary() const { return fRuntimeEffectDictionary; diff --git a/src/gpu/graphite/SpecialImage_Graphite.cpp b/src/gpu/graphite/SpecialImage_Graphite.cpp index e131fb0d53a9..7309cb06e4c0 100644 --- a/src/gpu/graphite/SpecialImage_Graphite.cpp +++ b/src/gpu/graphite/SpecialImage_Graphite.cpp @@ -5,10 +5,14 @@ * found in the LICENSE file. */ +#include "src/gpu/graphite/SpecialImage_Graphite.h" + #include "include/core/SkCanvas.h" #include "include/core/SkColorSpace.h" #include "src/core/SkSpecialImage.h" #include "src/core/SkSpecialSurface.h" +#include "src/gpu/graphite/Device.h" +#include "src/gpu/graphite/ImageUtils.h" #include "src/gpu/graphite/Image_Graphite.h" #include "src/gpu/graphite/Surface_Graphite.h" #include "src/shaders/SkImageShader.h" @@ -17,14 +21,12 @@ namespace skgpu::graphite { class SkSpecialImage_Graphite final : public SkSpecialImage { public: - SkSpecialImage_Graphite(Recorder* recorder, - const SkIRect& subset, + SkSpecialImage_Graphite(const SkIRect& subset, uint32_t uniqueID, TextureProxyView view, const SkColorInfo& colorInfo, const SkSurfaceProps& props) : SkSpecialImage(subset, uniqueID, colorInfo, props) - , fRecorder(recorder) , fTextureProxyView(std::move(view)) { } @@ -33,6 +35,10 @@ class SkSpecialImage_Graphite final : public SkSpecialImage { return 0; } + bool isGraphiteBacked() const override { return true; } + + TextureProxyView textureProxyView() const { return fTextureProxyView; } + void onDraw(SkCanvas* canvas, SkScalar x, SkScalar y, const SkSamplingOptions& sampling, @@ -48,17 +54,6 @@ class SkSpecialImage_Graphite final : public SkSpecialImage { sampling, paint, SkCanvas::kStrict_SrcRectConstraint); } -#if defined(SK_GANESH) - GrSurfaceProxyView onView(GrRecordingContext*) const override { - // To get here we would have to be requesting a Ganesh resource from a Graphite-backed - // special image. That should never happen. - SkASSERT(false); - return {}; - } -#endif - - TextureProxyView onTextureProxyView() const override { return fTextureProxyView; } - bool onGetROPixels(SkBitmap* dst) const override { // This should never be called: All GPU image filters are implemented entirely on the GPU, // so we never perform read-back. @@ -69,12 +64,11 @@ class SkSpecialImage_Graphite final : public SkSpecialImage { } sk_sp onMakeSubset(const SkIRect& subset) const override { - return SkSpecialImage::MakeGraphite(fRecorder, - subset, - this->uniqueID(), - fTextureProxyView, - this->colorInfo(), - this->props()); + return SkSpecialImages::MakeGraphite(subset, + this->uniqueID(), + fTextureProxyView, + this->colorInfo(), + this->props()); } sk_sp onAsImage(const SkIRect* subset) const override { @@ -104,23 +98,85 @@ class SkSpecialImage_Graphite final : public SkSpecialImage { } private: - Recorder* fRecorder; TextureProxyView fTextureProxyView; }; } // namespace skgpu::graphite -sk_sp SkSpecialImage::MakeGraphite(skgpu::graphite::Recorder* recorder, - const SkIRect& subset, - uint32_t uniqueID, - skgpu::graphite::TextureProxyView view, - const SkColorInfo& colorInfo, - const SkSurfaceProps& props) { - if (!recorder || !view) { +namespace SkSpecialImages { + +sk_sp MakeGraphite(skgpu::graphite::Recorder* recorder, + const SkIRect& subset, + sk_sp image, + const SkSurfaceProps& props) { + if (!recorder || !image || subset.isEmpty()) { return nullptr; } - SkASSERT(RectFits(subset, view.width(), view.height())); - return sk_make_sp(recorder, subset, uniqueID, + SkASSERT(image->bounds().contains(subset)); + + // This will work even if the image is a raster-backed image and the Recorder's + // client ImageProvider does a valid upload. + if (!as_IB(image)->isGraphiteBacked()) { + auto [graphiteImage, _] = + skgpu::graphite::GetGraphiteBacked(recorder, image.get(), {}); + if (!graphiteImage) { + return nullptr; + } + + image = graphiteImage; + } + auto [view, ct] = skgpu::graphite::AsView(recorder, image.get(), skgpu::Mipmapped::kNo); + return MakeGraphite(subset, image->uniqueID(), std::move(view), + {ct, image->alphaType(), image->refColorSpace()}, props); +} + +sk_sp MakeGraphite(const SkIRect& subset, + uint32_t uniqueID, + skgpu::graphite::TextureProxyView view, + const SkColorInfo& colorInfo, + const SkSurfaceProps& props) { + if (!view) { + return nullptr; + } + + SkASSERT(SkIRect::MakeSize(view.dimensions()).contains(subset)); + return sk_make_sp(subset, uniqueID, std::move(view), colorInfo, props); } + +skgpu::graphite::TextureProxyView AsTextureProxyView(const SkSpecialImage* img) { + if (!img || !img->isGraphiteBacked()) { + return {}; + } + auto grImg = static_cast(img); + return grImg->textureProxyView(); +} + +} // namespace SkSpecialImages + +namespace SkSpecialSurfaces { +sk_sp MakeGraphite(skgpu::graphite::Recorder* recorder, + const SkImageInfo& ii, + const SkSurfaceProps& props) { + using namespace skgpu::graphite; + + if (!recorder) { + return nullptr; + } + + sk_sp device = Device::Make(recorder, + ii, + skgpu::Budgeted::kYes, + skgpu::Mipmapped::kNo, + {props.flags(), kUnknown_SkPixelGeometry}, + /* addInitialClear= */ false); + if (!device) { + return nullptr; + } + + const SkIRect subset = SkIRect::MakeSize(ii.dimensions()); + + return sk_make_sp(std::move(device), subset); +} +} // namespace SkSpecialSurfaces diff --git a/src/gpu/graphite/SpecialImage_Graphite.h b/src/gpu/graphite/SpecialImage_Graphite.h new file mode 100644 index 000000000000..31c5295da9d1 --- /dev/null +++ b/src/gpu/graphite/SpecialImage_Graphite.h @@ -0,0 +1,57 @@ +/* + * Copyright 2022 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef skgpu_graphite_SpecialImage_Graphite_DEFINED +#define skgpu_graphite_SpecialImage_Graphite_DEFINED + +#include "include/core/SkRefCnt.h" +#include "src/core/SkSpecialImage.h" +#include "src/gpu/graphite/TextureProxyView.h" + +#include + +class SkColorInfo; +class SkImage; +class SkSpecialSurface; +class SkSurfaceProps; +struct SkIRect; +struct SkImageInfo; + +namespace skgpu::graphite { +class Recorder; +class TextureProxyView; +} // namespace skgpu::graphite + +namespace SkSpecialImages { + +sk_sp MakeGraphite(skgpu::graphite::Recorder*, + const SkIRect& subset, + sk_sp, + const SkSurfaceProps&); + +sk_sp MakeGraphite(const SkIRect& subset, + uint32_t uniqueID, + skgpu::graphite::TextureProxyView, + const SkColorInfo&, + const SkSurfaceProps&); + +// NOTE: Unlike Ganesh's SkSpecialImages::AsView(), this will not automatically upload a +// raster image to a new texture +skgpu::graphite::TextureProxyView AsTextureProxyView(const SkSpecialImage*); +inline skgpu::graphite::TextureProxyView AsTextureProxyView(sk_sp img) { + return AsTextureProxyView(img.get()); +} + +} // namespace SkSpecialImages + +namespace SkSpecialSurfaces { +sk_sp MakeGraphite(skgpu::graphite::Recorder*, + const SkImageInfo&, + const SkSurfaceProps&); +} // namespace SkSpecialSurfaces + +#endif diff --git a/src/gpu/graphite/Surface_Graphite.cpp b/src/gpu/graphite/Surface_Graphite.cpp index d2ea3c70fb79..5ed79e319b2c 100644 --- a/src/gpu/graphite/Surface_Graphite.cpp +++ b/src/gpu/graphite/Surface_Graphite.cpp @@ -98,15 +98,12 @@ void Surface::onAsyncRescaleAndReadPixels(const SkImageInfo& info, RescaleMode rescaleMode, ReadPixelsCallback callback, ReadPixelsContext context) { - fDevice->asyncRescaleAndReadPixels(info, - srcRect, - rescaleGamma, - rescaleMode, - callback, - context); + // Not supported for Graphite. Use Context::asyncRescaleAndReadPixels instead. + callback(context, nullptr); } void Surface::onAsyncRescaleAndReadPixelsYUV420(SkYUVColorSpace yuvColorSpace, + bool readAlpha, sk_sp dstColorSpace, SkIRect srcRect, SkISize dstSize, @@ -114,14 +111,8 @@ void Surface::onAsyncRescaleAndReadPixelsYUV420(SkYUVColorSpace yuvColorSpace, RescaleMode rescaleMode, ReadPixelsCallback callback, ReadPixelsContext context) { - fDevice->asyncRescaleAndReadPixelsYUV420(yuvColorSpace, - dstColorSpace, - srcRect, - dstSize, - rescaleGamma, - rescaleMode, - callback, - context); + // Not supported for Graphite. Use Context::asyncRescaleAndReadPixelsYUV420 instead. + callback(context, nullptr); } sk_sp Surface::onCapabilities() { @@ -253,7 +244,7 @@ sk_sp WrapBackendTexture(Recorder* recorder, return nullptr; } - sk_sp proxy(new TextureProxy(std::move(texture))); + sk_sp proxy = TextureProxy::Wrap(std::move(texture)); sk_sp device = Device::Make(recorder, std::move(proxy), diff --git a/src/gpu/graphite/Surface_Graphite.h b/src/gpu/graphite/Surface_Graphite.h index 6271dfad0676..aa5b21c5bdaa 100644 --- a/src/gpu/graphite/Surface_Graphite.h +++ b/src/gpu/graphite/Surface_Graphite.h @@ -48,6 +48,7 @@ class Surface final : public SkSurface_Base { ReadPixelsCallback callback, ReadPixelsContext context) override; void onAsyncRescaleAndReadPixelsYUV420(SkYUVColorSpace yuvColorSpace, + bool readAlpha, sk_sp dstColorSpace, SkIRect srcRect, SkISize dstSize, diff --git a/src/gpu/graphite/TaskGraph.h b/src/gpu/graphite/TaskGraph.h index ce4ba701973b..42950e2e04a4 100644 --- a/src/gpu/graphite/TaskGraph.h +++ b/src/gpu/graphite/TaskGraph.h @@ -30,9 +30,7 @@ class TaskGraph { void reset(); -#ifdef GRAPHITE_TEST_UTILS bool hasTasks() const { return !fTasks.empty(); } -#endif protected: private: diff --git a/src/gpu/graphite/Texture.cpp b/src/gpu/graphite/Texture.cpp index 4ec3ab499dd3..4815ff1afefa 100644 --- a/src/gpu/graphite/Texture.cpp +++ b/src/gpu/graphite/Texture.cpp @@ -11,26 +11,10 @@ #include "src/gpu/RefCntedCallback.h" #include "src/gpu/graphite/Caps.h" #include "src/gpu/graphite/SharedContext.h" +#include "src/gpu/graphite/TextureUtils.h" namespace skgpu::graphite { -// TODO: Make this computed size more generic to handle compressed textures -size_t compute_size(const SharedContext* sharedContext, - SkISize dimensions, - const TextureInfo& info) { - // TODO: Should we make sure the backends return zero here if the TextureInfo is for a - // memoryless texture? - size_t bytesPerPixel = sharedContext->caps()->bytesPerPixel(info); - - size_t colorSize = (size_t)dimensions.width() * dimensions.height() * bytesPerPixel; - - size_t finalSize = colorSize * info.numSamples(); - - if (info.mipmapped() == Mipmapped::kYes) { - finalSize += colorSize/3; - } - return finalSize; -} Texture::Texture(const SharedContext* sharedContext, SkISize dimensions, @@ -38,9 +22,7 @@ Texture::Texture(const SharedContext* sharedContext, sk_sp mutableState, Ownership ownership, skgpu::Budgeted budgeted) - : Resource(sharedContext, ownership, budgeted, compute_size(sharedContext, - dimensions, - info)) + : Resource(sharedContext, ownership, budgeted, ComputeSize(dimensions, info)) , fDimensions(dimensions) , fInfo(info) , fMutableState(std::move(mutableState)) {} diff --git a/src/gpu/graphite/Texture.h b/src/gpu/graphite/Texture.h index ae0dbfdbbc56..b4e6d99d987a 100644 --- a/src/gpu/graphite/Texture.h +++ b/src/gpu/graphite/Texture.h @@ -33,6 +33,10 @@ class Texture : public Resource { void setReleaseCallback(sk_sp); +#if GRAPHITE_TEST_UTILS + const Texture* asTexture() const override { return this; } +#endif + protected: Texture(const SharedContext*, SkISize dimensions, diff --git a/src/gpu/graphite/TextureInfo.cpp b/src/gpu/graphite/TextureInfo.cpp index 19fa70c2431e..82ad6b210f7f 100644 --- a/src/gpu/graphite/TextureInfo.cpp +++ b/src/gpu/graphite/TextureInfo.cpp @@ -7,6 +7,21 @@ #include "include/gpu/graphite/TextureInfo.h" +#ifdef SK_DAWN +#include "src/gpu/dawn/DawnUtilsPriv.h" +#endif + +#ifdef SK_METAL +namespace skgpu::graphite { + // Including Metal types/headers here is tricky. This is defined in MtlGraphiteUtils.mm + size_t MtlFormatBytesPerBlock(MtlPixelFormat); +} +#endif + +#ifdef SK_VULKAN +#include "src/gpu/vk/VulkanUtilsPriv.h" +#endif + namespace skgpu::graphite { TextureInfo& TextureInfo::operator=(const TextureInfo& that) { @@ -79,6 +94,39 @@ bool TextureInfo::operator==(const TextureInfo& that) const { } } +bool TextureInfo::isCompatible(const TextureInfo& that) const { + if (!this->isValid() || !that.isValid()) { + return false; + } + + if (fSampleCount != that.fSampleCount || + fMipmapped != that.fMipmapped || + fProtected != that.fProtected) { + return false; + } + + if (fBackend != that.fBackend) { + return false; + } + + switch (fBackend) { +#ifdef SK_DAWN + case BackendApi::kDawn: + return fDawnSpec.isCompatible(that.fDawnSpec); +#endif +#ifdef SK_METAL + case BackendApi::kMetal: + return fMtlSpec.isCompatible(that.fMtlSpec); +#endif +#ifdef SK_VULKAN + case BackendApi::kVulkan: + return fVkSpec.isCompatible(that.fVkSpec); +#endif + default: + return false; + } +} + #ifdef SK_DAWN bool TextureInfo::getDawnTextureInfo(DawnTextureInfo* info) const { if (!this->isValid() || fBackend != BackendApi::kDawn) { @@ -121,5 +169,27 @@ SkString TextureInfo::toString() const { return ret; } -} // namespace skgpu::graphite +size_t TextureInfo::bytesPerPixel() const { + if (!this->isValid()) { + return 0; + } + + switch (fBackend) { +#ifdef SK_DAWN + case BackendApi::kDawn: + return DawnFormatBytesPerBlock(this->dawnTextureSpec().fFormat); +#endif +#ifdef SK_METAL + case BackendApi::kMetal: + return MtlFormatBytesPerBlock(this->mtlTextureSpec().fFormat); +#endif +#ifdef SK_VULKAN + case BackendApi::kVulkan: + return VkFormatBytesPerBlock(this->vulkanTextureSpec().fFormat); +#endif + default: + return 0; + } +} +} // namespace skgpu::graphite diff --git a/src/gpu/graphite/TextureProxy.cpp b/src/gpu/graphite/TextureProxy.cpp index b33185ea81d2..a982325e7040 100644 --- a/src/gpu/graphite/TextureProxy.cpp +++ b/src/gpu/graphite/TextureProxy.cpp @@ -11,6 +11,7 @@ #include "src/gpu/graphite/Caps.h" #include "src/gpu/graphite/ResourceProvider.h" #include "src/gpu/graphite/Texture.h" +#include "src/gpu/graphite/TextureUtils.h" namespace skgpu::graphite { @@ -66,6 +67,9 @@ bool TextureProxy::isVolatile() const { return fVolatile == Volatile::kYes; } +size_t TextureProxy::uninstantiatedGpuMemorySize() const { + return ComputeSize(fDimensions, fInfo); +} bool TextureProxy::instantiate(ResourceProvider* resourceProvider) { SkASSERT(!this->isLazy()); @@ -120,6 +124,20 @@ const Texture* TextureProxy::texture() const { return fTexture.get(); } +sk_sp TextureProxy::Make(const Caps* caps, + SkISize dimensions, + const TextureInfo& textureInfo, + skgpu::Budgeted budgeted) { + if (dimensions.width() < 1 || dimensions.height() < 1 || + dimensions.width() > caps->maxTextureSize() || + dimensions.height() > caps->maxTextureSize() || + !textureInfo.isValid()) { + return nullptr; + } + + return sk_sp(new TextureProxy(dimensions, textureInfo, budgeted)); +} + sk_sp TextureProxy::Make(const Caps* caps, SkISize dimensions, SkColorType colorType, @@ -127,27 +145,26 @@ sk_sp TextureProxy::Make(const Caps* caps, Protected isProtected, Renderable renderable, skgpu::Budgeted budgeted) { - if (dimensions.width() < 1 || dimensions.height() < 1) { - return nullptr; - } - TextureInfo textureInfo = caps->getDefaultSampledTextureInfo(colorType, mipmapped, isProtected, renderable); - if (!textureInfo.isValid()) { - return nullptr; - } - return sk_make_sp(dimensions, textureInfo, budgeted); + return Make(caps, dimensions, textureInfo, budgeted); } -sk_sp TextureProxy::MakeLazy(SkISize dimensions, +sk_sp TextureProxy::MakeLazy(const Caps* caps, + SkISize dimensions, const TextureInfo& textureInfo, skgpu::Budgeted budgeted, Volatile isVolatile, LazyInstantiateCallback&& callback) { SkASSERT(textureInfo.isValid()); + if (dimensions.width() < 1 || dimensions.height() < 1 || + dimensions.width() > caps->maxTextureSize() || + dimensions.height() > caps->maxTextureSize()) { + return nullptr; + } return sk_sp(new TextureProxy(dimensions, textureInfo, budgeted, isVolatile, std::move(callback))); @@ -157,30 +174,30 @@ sk_sp TextureProxy::MakeFullyLazy(const TextureInfo& textureInfo, skgpu::Budgeted budgeted, Volatile isVolatile, LazyInstantiateCallback&& callback) { - return MakeLazy(SkISize::Make(-1, -1), textureInfo, budgeted, isVolatile, std::move(callback)); + SkASSERT(textureInfo.isValid()); + + return sk_sp(new TextureProxy( + SkISize::Make(-1, -1), textureInfo, budgeted, isVolatile, std::move(callback))); } sk_sp TextureProxy::MakeStorage(const Caps* caps, SkISize dimensions, SkColorType colorType, skgpu::Budgeted budgeted) { - if (dimensions.width() < 1 || dimensions.height() < 1) { - return nullptr; - } - TextureInfo textureInfo = caps->getDefaultStorageTextureInfo(colorType); - if (!textureInfo.isValid()) { - return nullptr; - } - return sk_make_sp(dimensions, textureInfo, budgeted); + return Make(caps, dimensions, textureInfo, budgeted); +} + +sk_sp TextureProxy::Wrap(sk_sp texture) { + return sk_sp(new TextureProxy(std::move(texture))); } #ifdef SK_DEBUG void TextureProxy::validateTexture(const Texture* texture) { SkASSERT(this->isFullyLazy() || fDimensions == texture->dimensions()); - SkASSERTF(fInfo == texture->textureInfo(), - "proxy->fInfo[%s] != texture->fInfo[%s]", + SkASSERTF(fInfo.isCompatible(texture->textureInfo()), + "proxy->fInfo[%s] incompatible with texture->fInfo[%s]", fInfo.toString().c_str(), texture->textureInfo().toString().c_str()); } diff --git a/src/gpu/graphite/TextureProxy.h b/src/gpu/graphite/TextureProxy.h index 7f81cf29423b..b2e48da2194a 100644 --- a/src/gpu/graphite/TextureProxy.h +++ b/src/gpu/graphite/TextureProxy.h @@ -25,9 +25,6 @@ class Texture; class TextureProxy : public SkRefCnt { public: - TextureProxy(SkISize dimensions, const TextureInfo& info, skgpu::Budgeted budgeted); - TextureProxy(sk_sp); - TextureProxy() = delete; ~TextureProxy() override; @@ -42,6 +39,8 @@ class TextureProxy : public SkRefCnt { bool isFullyLazy() const; bool isVolatile() const; + size_t uninstantiatedGpuMemorySize() const; + bool instantiate(ResourceProvider*); /* * We currently only instantiate lazy proxies at insertion-time. Snap-time 'instantiate' @@ -71,10 +70,15 @@ class TextureProxy : public SkRefCnt { Protected, Renderable, skgpu::Budgeted); + static sk_sp Make(const Caps*, + SkISize dimensions, + const TextureInfo&, + skgpu::Budgeted); using LazyInstantiateCallback = std::function (ResourceProvider*)>; - static sk_sp MakeLazy(SkISize dimensions, + static sk_sp MakeLazy(const Caps*, + SkISize dimensions, const TextureInfo&, skgpu::Budgeted, Volatile, @@ -89,12 +93,16 @@ class TextureProxy : public SkRefCnt { SkColorType, skgpu::Budgeted); + static sk_sp Wrap(sk_sp); + private: + TextureProxy(SkISize dimensions, const TextureInfo& info, skgpu::Budgeted budgeted); TextureProxy(SkISize dimensions, const TextureInfo&, skgpu::Budgeted, Volatile, LazyInstantiateCallback&&); + TextureProxy(sk_sp); #ifdef SK_DEBUG void validateTexture(const Texture*); diff --git a/src/gpu/graphite/TextureUtils.cpp b/src/gpu/graphite/TextureUtils.cpp index 82db25c2ef79..cb3e6458d386 100644 --- a/src/gpu/graphite/TextureUtils.cpp +++ b/src/gpu/graphite/TextureUtils.cpp @@ -8,12 +8,17 @@ #include "src/gpu/graphite/TextureUtils.h" #include "include/core/SkBitmap.h" +#include "include/core/SkCanvas.h" +#include "include/core/SkColorSpace.h" +#include "include/core/SkPaint.h" +#include "include/core/SkSurface.h" #include "src/core/SkMipmap.h" #include "include/gpu/graphite/Context.h" #include "include/gpu/graphite/GraphiteTypes.h" #include "include/gpu/graphite/Recorder.h" #include "include/gpu/graphite/Recording.h" +#include "include/gpu/graphite/Surface.h" #include "src/gpu/graphite/Buffer.h" #include "src/gpu/graphite/Caps.h" #include "src/gpu/graphite/CommandBuffer.h" @@ -101,7 +106,8 @@ std::tuple MakeBitmapProxyView(Recorder* recorder } // Create proxy - sk_sp proxy(new TextureProxy(bmpToUpload.dimensions(), textureInfo, budgeted)); + sk_sp proxy = + TextureProxy::Make(caps, bmpToUpload.dimensions(), textureInfo, budgeted); if (!proxy) { return {}; } @@ -146,4 +152,160 @@ sk_sp MakeFromBitmap(Recorder* recorder, colorInfo.makeColorType(ct)); } + +// TODO: Make this computed size more generic to handle compressed textures +size_t ComputeSize(SkISize dimensions, + const TextureInfo& info) { + // TODO: Should we make sure the backends return zero here if the TextureInfo is for a + // memoryless texture? + size_t bytesPerPixel = info.bytesPerPixel(); + + size_t colorSize = (size_t)dimensions.width() * dimensions.height() * bytesPerPixel; + + size_t finalSize = colorSize * info.numSamples(); + + if (info.mipmapped() == Mipmapped::kYes) { + finalSize += colorSize/3; + } + return finalSize; +} + +sk_sp make_surface_with_fallback(Recorder* recorder, + const SkImageInfo& info, + Mipmapped mipmapped, + const SkSurfaceProps* surfaceProps) { + SkColorType ct = recorder->priv().caps()->getRenderableColorType(info.colorType()); + if (ct == kUnknown_SkColorType) { + return nullptr; + } + + return SkSurfaces::RenderTarget(recorder, info.makeColorType(ct), mipmapped, surfaceProps); +} + +sk_sp RescaleImage(Recorder* recorder, + const SkImage* srcImage, + SkIRect srcIRect, + const SkImageInfo& dstInfo, + SkImage::RescaleGamma rescaleGamma, + SkImage::RescaleMode rescaleMode) { + // make a Surface matching dstInfo to rescale into + SkSurfaceProps surfaceProps = {}; + sk_sp dst = make_surface_with_fallback(recorder, + dstInfo, + Mipmapped::kNo, + &surfaceProps); + if (!dst) { + return nullptr; + } + + SkRect srcRect = SkRect::Make(srcIRect); + SkRect dstRect = SkRect::Make(dstInfo.dimensions()); + + // Get backing texture information for source Image. + // For now this needs to be texturable because we can't depend on copies to scale. + auto srcGraphiteImage = reinterpret_cast(srcImage); + + TextureProxyView imageView = srcGraphiteImage->textureProxyView(); + if (!imageView.proxy()) { + // TODO: if not texturable, copy to a texturable format + return nullptr; + } + + SkISize finalSize = SkISize::Make(dstRect.width(), dstRect.height()); + if (finalSize == srcIRect.size()) { + rescaleGamma = Image::RescaleGamma::kSrc; + rescaleMode = Image::RescaleMode::kNearest; + } + + // Within a rescaling pass tempInput is read from and tempOutput is written to. + // At the end of the pass tempOutput's texture is wrapped and assigned to tempInput. + const SkImageInfo& srcImageInfo = srcImage->imageInfo(); + sk_sp tempInput(new Image(kNeedNewImageUniqueID, + imageView, + srcImageInfo.colorInfo())); + sk_sp tempOutput; + + // Assume we should ignore the rescale linear request if the surface has no color space since + // it's unclear how we'd linearize from an unknown color space. + if (rescaleGamma == Image::RescaleGamma::kLinear && + srcImageInfo.colorSpace() && + !srcImageInfo.colorSpace()->gammaIsLinear()) { + // Draw the src image into a new surface with linear gamma, and make that the new tempInput + sk_sp linearGamma = srcImageInfo.colorSpace()->makeLinearGamma(); + SkImageInfo gammaDstInfo = SkImageInfo::Make(srcIRect.size(), + tempInput->imageInfo().colorType(), + kPremul_SkAlphaType, + std::move(linearGamma)); + tempOutput = make_surface_with_fallback(recorder, + gammaDstInfo, + Mipmapped::kNo, + &surfaceProps); + if (!tempOutput) { + return nullptr; + } + SkCanvas* gammaDst = tempOutput->getCanvas(); + SkRect gammaDstRect = SkRect::Make(srcIRect.size()); + + SkPaint paint; + gammaDst->drawImageRect(tempInput, srcRect, gammaDstRect, + SkSamplingOptions(SkFilterMode::kNearest), &paint, + SkCanvas::kStrict_SrcRectConstraint); + tempInput = SkSurfaces::AsImage(tempOutput); + srcRect = gammaDstRect; + } + + SkImageInfo outImageInfo = tempInput->imageInfo().makeAlphaType(kPremul_SkAlphaType); + do { + SkISize nextDims = finalSize; + if (rescaleMode != Image::RescaleMode::kNearest && + rescaleMode != Image::RescaleMode::kLinear) { + if (srcRect.width() > finalSize.width()) { + nextDims.fWidth = std::max((srcRect.width() + 1)/2, (float)finalSize.width()); + } else if (srcRect.width() < finalSize.width()) { + nextDims.fWidth = std::min(srcRect.width()*2, (float)finalSize.width()); + } + if (srcRect.height() > finalSize.height()) { + nextDims.fHeight = std::max((srcRect.height() + 1)/2, (float)finalSize.height()); + } else if (srcRect.height() < finalSize.height()) { + nextDims.fHeight = std::min(srcRect.height()*2, (float)finalSize.height()); + } + } + + SkCanvas* stepDst; + SkRect stepDstRect; + if (nextDims == finalSize) { + stepDst = dst->getCanvas(); + stepDstRect = dstRect; + } else { + SkImageInfo nextInfo = outImageInfo.makeDimensions(nextDims); + tempOutput = make_surface_with_fallback(recorder, + nextInfo, + Mipmapped::kNo, + &surfaceProps); + if (!tempOutput) { + return nullptr; + } + stepDst = tempOutput->getCanvas(); + stepDstRect = SkRect::Make(tempOutput->imageInfo().dimensions()); + } + + SkSamplingOptions samplingOptions; + if (rescaleMode == Image::RescaleMode::kRepeatedCubic) { + samplingOptions = SkSamplingOptions(SkCubicResampler::CatmullRom()); + } else { + samplingOptions = (rescaleMode == Image::RescaleMode::kNearest) ? + SkSamplingOptions(SkFilterMode::kNearest) : + SkSamplingOptions(SkFilterMode::kLinear); + } + SkPaint paint; + stepDst->drawImageRect(tempInput, srcRect, stepDstRect, samplingOptions, &paint, + SkCanvas::kStrict_SrcRectConstraint); + + tempInput = SkSurfaces::AsImage(tempOutput); + srcRect = SkRect::Make(nextDims); + } while (srcRect.width() != finalSize.width() || srcRect.height() != finalSize.height()); + + return SkSurfaces::AsImage(dst); +} + } // namespace skgpu::graphite diff --git a/src/gpu/graphite/TextureUtils.h b/src/gpu/graphite/TextureUtils.h index d611337d61c5..ab6cc84bcbea 100644 --- a/src/gpu/graphite/TextureUtils.h +++ b/src/gpu/graphite/TextureUtils.h @@ -12,6 +12,7 @@ #include "src/gpu/graphite/TextureProxyView.h" #include +#include class SkBitmap; enum SkColorType : int; @@ -32,6 +33,16 @@ sk_sp MakeFromBitmap(Recorder*, sk_sp, skgpu::Budgeted, SkImage::RequiredProperties); + +size_t ComputeSize(SkISize dimensions, const TextureInfo&); + +sk_sp RescaleImage(Recorder*, + const SkImage* srcImage, + SkIRect srcIRect, + const SkImageInfo& dstInfo, + SkImage::RescaleGamma rescaleGamma, + SkImage::RescaleMode rescaleMode); + } // namespace skgpu::graphite #endif // skgpu_graphite_TextureUtils_DEFINED diff --git a/src/gpu/graphite/UploadBufferManager.h b/src/gpu/graphite/UploadBufferManager.h index a08d0c120bb7..255d82bb3bb6 100644 --- a/src/gpu/graphite/UploadBufferManager.h +++ b/src/gpu/graphite/UploadBufferManager.h @@ -8,6 +8,7 @@ #ifndef skgpu_graphite_UploadBufferManager_DEFINED #define skgpu_graphite_UploadBufferManager_DEFINED +#include #include #include "include/core/SkRefCnt.h" diff --git a/src/gpu/graphite/compute/ComputeStep.cpp b/src/gpu/graphite/compute/ComputeStep.cpp index 1714f2d6a0db..44594a20f581 100644 --- a/src/gpu/graphite/compute/ComputeStep.cpp +++ b/src/gpu/graphite/compute/ComputeStep.cpp @@ -110,10 +110,18 @@ size_t ComputeStep::calculateBufferSize(const DrawParams&, int, const ResourceDe std::tuple ComputeStep::calculateTextureParameters( const DrawParams&, int resourceIndex, const ResourceDesc&) const { - SK_ABORT("ComputeStep that initialize a texture must override calculateTextureParameters()"); + SK_ABORT("ComputeSteps that initialize a texture must override calculateTextureParameters()"); return {SkISize::MakeEmpty(), kUnknown_SkColorType}; } +SamplerDesc ComputeStep::calculateSamplerParameters(const DrawParams&, + int resourceIndex, + const ResourceDesc&) const { + SK_ABORT("ComputeSteps that initialize a sampler must override calculateSamplerParameters()"); + constexpr SkTileMode kTileModes[2] = {SkTileMode::kClamp, SkTileMode::kClamp}; + return {{}, kTileModes}; +} + WorkgroupSize ComputeStep::calculateGlobalDispatchSize(const DrawParams&) const { SK_ABORT("ComputeSteps must override calculateGlobalDispatchSize() if it participates " "in resource creation"); diff --git a/src/gpu/graphite/compute/ComputeStep.h b/src/gpu/graphite/compute/ComputeStep.h index f2049e3b6162..c8a3133c7001 100644 --- a/src/gpu/graphite/compute/ComputeStep.h +++ b/src/gpu/graphite/compute/ComputeStep.h @@ -12,7 +12,8 @@ #include "include/core/SkSize.h" #include "include/core/SkSpan.h" #include "include/private/base/SkTArray.h" -#include "src/core/SkEnumBitMask.h" +#include "include/private/base/SkTo.h" +#include "src/base/SkEnumBitMask.h" #include "src/gpu/graphite/ComputeTypes.h" #include @@ -91,6 +92,7 @@ class ComputeStep { kStorageTexture, kTexture, + kSampler, }; enum class ResourcePolicy { @@ -185,6 +187,12 @@ class ComputeStep { int resourceIndex, const ResourceDesc&) const; + // This method will be called for sampler entries in the ComputeStep's resource list to + // determine the sampling and tile mode options. + virtual SamplerDesc calculateSamplerParameters(const DrawParams&, + int resourceIndex, + const ResourceDesc&) const; + // Return the global dispatch size (aka "workgroup count") for this step based on the draw // parameters. The default value is a workgroup count of (1, 1, 1) // @@ -241,13 +249,13 @@ class ComputeStep { // other backends, this value will be baked into the pipeline. WorkgroupSize localDispatchSize() const { return fLocalDispatchSize; } - bool supportsNativeShader() const { return fFlags & Flags::kSupportsNativeShader; } + bool supportsNativeShader() const { return SkToBool(fFlags & Flags::kSupportsNativeShader); } // Data flow behavior queries: - bool outputsVertices() const { return fFlags & Flags::kOutputsVertexBuffer; } - bool outputsIndices() const { return fFlags & Flags::kOutputsIndexBuffer; } - bool outputsInstances() const { return fFlags & Flags::kOutputsInstanceBuffer; } - bool writesIndirectDraw() const { return fFlags & Flags::kOutputsIndirectDrawBuffer; } + bool outputsVertices() const { return SkToBool(fFlags & Flags::kOutputsVertexBuffer); } + bool outputsIndices() const { return SkToBool(fFlags & Flags::kOutputsIndexBuffer); } + bool outputsInstances() const { return SkToBool(fFlags & Flags::kOutputsInstanceBuffer); } + bool writesIndirectDraw() const { return SkToBool(fFlags & Flags::kOutputsIndirectDrawBuffer); } protected: enum class Flags : uint8_t { @@ -284,7 +292,7 @@ class ComputeStep { // workgroup size declaration to avoid any validation failures. WorkgroupSize fLocalDispatchSize; }; -SK_MAKE_BITMASK_OPS(ComputeStep::Flags); +SK_MAKE_BITMASK_OPS(ComputeStep::Flags) } // namespace skgpu::graphite diff --git a/src/gpu/graphite/compute/DispatchGroup.cpp b/src/gpu/graphite/compute/DispatchGroup.cpp index 28293fdbdf1c..67a2ca53a94c 100644 --- a/src/gpu/graphite/compute/DispatchGroup.cpp +++ b/src/gpu/graphite/compute/DispatchGroup.cpp @@ -45,9 +45,20 @@ bool DispatchGroup::prepareResources(ResourceProvider* resourceProvider) { } } - // The DispatchGroup may be long lived on a Recording and we no longer need ComputePipelineDescs + for (const SamplerDesc& desc : fSamplerDescs) { + sk_sp sampler = resourceProvider->findOrCreateCompatibleSampler( + desc.samplingOptions(), desc.tileModeX(), desc.tileModeY()); + if (!sampler) { + SKGPU_LOG_W("Failed to create sampler. Dropping dispatch group!"); + return false; + } + fSamplers.push_back(std::move(sampler)); + } + + // The DispatchGroup may be long lived on a Recording and we no longer need the descriptors // once we've created pipelines. fPipelineDescs.clear(); + fSamplerDescs.clear(); return true; } @@ -61,13 +72,19 @@ void DispatchGroup::addResourceRefs(CommandBuffer* commandBuffer) const { } } -const Texture* DispatchGroup::getTexture(TextureIndex index) const { +const Texture* DispatchGroup::getTexture(size_t index) const { SkASSERT(index < SkToSizeT(fTextures.size())); SkASSERT(fTextures[index]); SkASSERT(fTextures[index]->texture()); return fTextures[index]->texture(); } +const Sampler* DispatchGroup::getSampler(size_t index) const { + SkASSERT(index < SkToSizeT(fSamplers.size())); + SkASSERT(fSamplers[index]); + return fSamplers[index].get(); +} + using Builder = DispatchGroup::Builder; Builder::Builder(Recorder* recorder) : fObj(new DispatchGroup()), fRecorder(recorder) { @@ -90,19 +107,24 @@ bool Builder::appendStep(const ComputeStep* step, // `nextIndex` matches the declaration order of resources as specified by the ComputeStep. int nextIndex = 0; - // We assign buffer and texture indices from separate ranges. This is compatible with how - // Graphite assigns indices in all of its backends: on Metal these map directly to - // the `buffer()` and `texture()` index ranges; on Dawn/Vulkan these are allocated from separate - // bind groups/descriptor sets. + // We assign buffer, texture, and sampler indices from separate ranges. This is compatible with + // how Graphite assigns indices on Metal, as these map directly to the buffer/texture/sampler + // index ranges. On Dawn/Vulkan buffers and textures/samplers are allocated from separate bind + // groups/descriptor sets but texture and sampler indices need to not overlap. + // + // TODO(armansito): Count the indices based on + // `ResourceBindingRequirements::fDistinctIndexRanges` obtained from Caps. // - // TODO(armansito): This also happens to be compatible with the binding index reassignment - // scheme that the vello_shaders crate implements for WGSL->MSL translation (see - // https://github.com/linebender/vello/blob/main/crates/shaders/src/compile/msl.rs#L10). However - // Vello WGSL bindings are currently all assigned from the same bind group without separate - // assignments for textures and buffers. We'll need to figure out how to re-map these on - // Graphite's Dawn backend which should use the WGSL text directly. + // TODO(armansito): The Metal backend index binding scheme happens to be compatible with the + // vello_shaders crate's WGSL->MSL translation (see + // https://github.com/linebender/vello/blob/main/crates/shaders/src/compile/msl.rs#L10). + // However, Vello's WGSL shaders assign all resources to the same bind group (at index 0) which + // differs from how Graphite binds textures and samplers (at index 1). We can handle this by + // having ComputeStep resources define a bind group index explicitly and assigning them to the + // specified bind group during command encoding. int bufferIndex = 0; int texIndex = 0; + int samplerIndex = 0; for (const ComputeStep::ResourceDesc& r : resources) { SkASSERT(r.fSlot == -1 || (r.fSlot >= 0 && r.fSlot < kMaxComputeDataFlowSlots)); int index = nextIndex++; @@ -152,6 +174,9 @@ bool Builder::appendStep(const ComputeStep* step, } else if (const TextureIndex* texIdx = std::get_if(&maybeResource)) { dispatchResource = *texIdx; bindingIndex = texIndex++; + } else if (const SamplerIndex* samplerIdx = std::get_if(&maybeResource)) { + dispatchResource = *samplerIdx; + bindingIndex = samplerIndex++; } else { SKGPU_LOG_W("Failed to allocate resource for compute dispatch"); return false; @@ -192,7 +217,7 @@ void Builder::assignSharedTexture(sk_sp texture, unsigned int slot SkASSERT(texture); fObj->fTextures.push_back(std::move(texture)); - fOutputTable.fSharedSlots[slot] = TextureIndex(fObj->fTextures.size() - 1); + fOutputTable.fSharedSlots[slot] = TextureIndex{fObj->fTextures.size() - 1u}; } std::unique_ptr Builder::finalize() { @@ -220,8 +245,8 @@ sk_sp Builder::getSharedTextureResource(unsigned int slot) const { return nullptr; } - SkASSERT(*idx < SkToSizeT(fObj->fTextures.size())); - return fObj->fTextures[*idx]; + SkASSERT(idx->fValue < SkToSizeT(fObj->fTextures.size())); + return fObj->fTextures[idx->fValue]; } BindBufferInfo Builder::allocateDrawBuffer(const ComputeStep* step, @@ -329,19 +354,28 @@ DispatchResourceOptional Builder::allocateResource(const ComputeStep* step, fRecorder->priv().caps(), size, colorType, skgpu::Budgeted::kYes); if (texture) { fObj->fTextures.push_back(std::move(texture)); - result = TextureIndex(fObj->fTextures.size() - 1); + result = TextureIndex{fObj->fTextures.size() - 1u}; } break; } case Type::kTexture: // This resource type is meant to be populated externally (e.g. by an upload or a render - // pass) and only sampled by a ComputeStep. It's not meaningful to allocate an internal - // texture for a DispatchGroup if none of the ComputeSteps will write to it. + // pass) and only read/sampled by a ComputeStep. It's not meaningful to allocate an + // internal texture for a DispatchGroup if none of the ComputeSteps will write to it. // // Instead of using internal allocation, this texture must be assigned explicitly to a // slot by calling the Builder::assignSharedTexture() method. + // + // Note: A ComputeStep is allowed to read/sample from a storage texture that a previous + // ComputeStep has written to. SK_ABORT("a sampled texture must be externally assigned to a ComputeStep"); break; + case Type::kSampler: { + fObj->fSamplerDescs.push_back( + step->calculateSamplerParameters(params, resourceIdx, resource)); + result = SamplerIndex{fObj->fSamplerDescs.size() - 1u}; + break; + } } return result; } diff --git a/src/gpu/graphite/compute/DispatchGroup.h b/src/gpu/graphite/compute/DispatchGroup.h index c305cf6f566e..0f8324865696 100644 --- a/src/gpu/graphite/compute/DispatchGroup.h +++ b/src/gpu/graphite/compute/DispatchGroup.h @@ -13,6 +13,7 @@ #include "src/gpu/graphite/ComputePipelineDesc.h" #include "src/gpu/graphite/ComputeTypes.h" #include "src/gpu/graphite/ResourceTypes.h" +#include "src/gpu/graphite/Sampler.h" #include "src/gpu/graphite/TextureProxy.h" #include "src/gpu/graphite/compute/ComputeStep.h" @@ -26,9 +27,11 @@ class Recorder; class ResourceProvider; using BindingIndex = uint32_t; -using TextureIndex = uint32_t; -using DispatchResource = std::variant; -using DispatchResourceOptional = std::variant; +struct TextureIndex { uint32_t fValue; }; +struct SamplerIndex { uint32_t fValue; }; +using DispatchResource = std::variant; +using DispatchResourceOptional = + std::variant; struct ResourceBinding { BindingIndex fIndex; @@ -65,7 +68,8 @@ class DispatchGroup final { const skia_private::TArray& dispatches() const { return fDispatchList; } const ComputePipeline* getPipeline(size_t index) const { return fPipelines[index].get(); } - const Texture* getTexture(TextureIndex index) const; + const Texture* getTexture(size_t index) const; + const Sampler* getSampler(size_t index) const; bool prepareResources(ResourceProvider*); void addResourceRefs(CommandBuffer*) const; @@ -84,10 +88,12 @@ class DispatchGroup final { // Pipelines are referenced by index by each Dispatch in `fDispatchList`. They are stored as a // pipeline description until instantiated in `prepareResources()`. skia_private::TArray fPipelineDescs; + skia_private::TArray fSamplerDescs; // Resources instantiated by `prepareResources()` skia_private::TArray> fPipelines; skia_private::TArray> fTextures; + skia_private::TArray> fSamplers; }; class DispatchGroup::Builder final { diff --git a/src/gpu/graphite/compute/VelloComputeSteps.cpp b/src/gpu/graphite/compute/VelloComputeSteps.cpp index a16495f56130..24ba31976f6c 100644 --- a/src/gpu/graphite/compute/VelloComputeSteps.cpp +++ b/src/gpu/graphite/compute/VelloComputeSteps.cpp @@ -303,12 +303,6 @@ VelloDrawLeafStep::VelloDrawLeafStep() : VelloStep( // ClipReduce VelloClipReduceStep::VelloClipReduceStep() : VelloStep( /*resources=*/{ - { - /*type=*/ResourceType::kStorageBuffer, - /*flow=*/DataFlow::kShared, - /*policy=*/ResourcePolicy::kNone, - /*slot=*/kVelloSlot_ConfigUniform, - }, { /*type=*/ResourceType::kStorageBuffer, /*flow=*/DataFlow::kShared, diff --git a/src/gpu/graphite/compute/VelloRenderer.cpp b/src/gpu/graphite/compute/VelloRenderer.cpp index 490d2a934a4e..d25a661a9efa 100644 --- a/src/gpu/graphite/compute/VelloRenderer.cpp +++ b/src/gpu/graphite/compute/VelloRenderer.cpp @@ -54,16 +54,16 @@ WorkgroupSize to_wg_size(const vello_cpp::WorkgroupSize& src) { } vello_cpp::Fill to_fill_type(SkPathFillType fillType) { + // Vello does not provide an encoding for inverse fill types. When Skia uses vello to render + // a coverage mask for an inverse fill, it encodes a regular fill and inverts the coverage value + // after sampling the mask. switch (fillType) { case SkPathFillType::kWinding: + case SkPathFillType::kInverseWinding: return vello_cpp::Fill::NonZero; case SkPathFillType::kEvenOdd: + case SkPathFillType::kInverseEvenOdd: return vello_cpp::Fill::EvenOdd; - default: - // TODO(b/238756757): vello doesn't define fill types for kInverseWinding and - // kInverseEvenOdd. This should be updated to support those cases. - SkDebugf("fill type not supported by vello\n"); - break; } return vello_cpp::Fill::NonZero; } @@ -174,14 +174,26 @@ void VelloScene::solidFill(const SkPath& shape, void VelloScene::solidStroke(const SkPath& shape, const SkColor4f& fillColor, - float width, + const SkStrokeRec& style, const Transform& t) { - // Vello currently only supports round stroke styles - PathIter iter(shape, t); - fEncoding->stroke({width}, - to_vello_affine(t), - {vello_cpp::BrushKind::Solid, {to_vello_color(fillColor)}}, - iter); + // TODO(b/285423263): Vello currently only supports round stroke styles. Draw unsupported + // stroke styles by expanding the stroke and encoding it as a fill, until the GPU pipelines + // support them. + if (style.getCap() == SkPaint::kRound_Cap && style.getJoin() == SkPaint::kRound_Join) { + PathIter iter(shape, t); + fEncoding->stroke({style.getWidth()}, + to_vello_affine(t), + {vello_cpp::BrushKind::Solid, {to_vello_color(fillColor)}}, + iter); + } else { + SkPath p; + style.applyToPath(&p, shape); + PathIter iter(p, t); + fEncoding->fill(vello_cpp::Fill::NonZero, + to_vello_affine(t), + {vello_cpp::BrushKind::Solid, {to_vello_color(fillColor)}}, + iter); + } } void VelloScene::pushClipLayer(const SkPath& shape, const Transform& t) { @@ -274,16 +286,20 @@ std::unique_ptr VelloRenderer::renderScene(const RenderParams& pa } // TODO(b/285189802): The default sizes for the bump buffers (~97MB) exceed Graphite's resource - // budget if multiple passes are necessary per frame (250MB, see ResouceCache.h). We shrink - // them by half here as a crude reduction which seems to be enough for a 4k x 4k atlas render - // even in dense situations (e.g. paris-30k). We need to come up with a better approach - // to accurately predict the sizes for these buffers based on the scene encoding and our - // resource budget. + // budget if multiple passes are necessary per frame (250MB, see ResouceCache.h). We apply a + // crude size reduction here which seems to be enough for a 4k x 4k atlas render for the GMs + // that we have tested. The numbers below are able to render GM_longpathdash with CPU-side + // stroke expansion. + // + // We need to come up with a better approach to accurately predict the sizes for these buffers + // based on the scene encoding and our resource budget. It should be possible to build a + // conservative estimate using the total number of path verbs, some heuristic based on the verb + // and the path's transform, and the total number of tiles. // // The following numbers amount to ~48MB const size_t bin_data_size = bufferSizes.bin_data / 2; const size_t tiles_size = bufferSizes.tiles / 2; - const size_t segments_size = bufferSizes.segments / 2; + const size_t segments_size = bufferSizes.segments * 2 / 3; const size_t ptcl_size = bufferSizes.ptcl / 2; // See the comments in VelloComputeSteps.h for an explanation of the logic here. diff --git a/src/gpu/graphite/compute/VelloRenderer.h b/src/gpu/graphite/compute/VelloRenderer.h index bbed39c2051d..fbdc196694fa 100644 --- a/src/gpu/graphite/compute/VelloRenderer.h +++ b/src/gpu/graphite/compute/VelloRenderer.h @@ -43,7 +43,7 @@ class VelloScene final { void solidStroke(const SkPath&, const SkColor4f&, - float width, + const SkStrokeRec&, const Transform& transform); void pushClipLayer(const SkPath& shape, const Transform& transform); diff --git a/src/gpu/graphite/dawn/DawnCaps.cpp b/src/gpu/graphite/dawn/DawnCaps.cpp index 9e43fb87e28c..04aebd0d05b3 100644 --- a/src/gpu/graphite/dawn/DawnCaps.cpp +++ b/src/gpu/graphite/dawn/DawnCaps.cpp @@ -113,7 +113,6 @@ TextureInfo DawnCaps::getDefaultSampledTextureInfo(SkColorType colorType, wgpu::TextureFormat format = this->getFormatFromColorType(colorType); if (format == wgpu::TextureFormat::Undefined) { - SkDebugf("colorType=%d is not supported\n", static_cast(colorType)); return {}; } @@ -128,13 +127,21 @@ TextureInfo DawnCaps::getDefaultSampledTextureInfo(SkColorType colorType, TextureInfo DawnCaps::getDefaultMSAATextureInfo(const TextureInfo& singleSampledInfo, Discardable discardable) const { + if (fDefaultMSAASamples <= 1) { + return {}; + } const DawnTextureSpec& singleSpec = singleSampledInfo.dawnTextureSpec(); DawnTextureInfo info; - info.fSampleCount = this->defaultMSAASamples(); + info.fSampleCount = fDefaultMSAASamples; info.fMipmapped = Mipmapped::kNo; info.fFormat = singleSpec.fFormat; info.fUsage = wgpu::TextureUsage::RenderAttachment; + + if (fTransientAttachmentSupport && discardable == Discardable::kYes) { + info.fUsage |= wgpu::TextureUsage::TransientAttachment; + } + return info; } @@ -147,6 +154,11 @@ TextureInfo DawnCaps::getDefaultDepthStencilTextureInfo( info.fMipmapped = Mipmapped::kNo; info.fFormat = DawnDepthStencilFlagsToFormat(depthStencilType); info.fUsage = wgpu::TextureUsage::RenderAttachment; + + if (fTransientAttachmentSupport) { + info.fUsage |= wgpu::TextureUsage::TransientAttachment; + } + return info; } @@ -235,7 +247,9 @@ void DawnCaps::initCaps(const wgpu::Device& device) { fTextureDataRowBytesAlignment = 256; fResourceBindingReqs.fUniformBufferLayout = Layout::kStd140; - fResourceBindingReqs.fStorageBufferLayout = Layout::kStd430; + // TODO(skia:14639): We cannot use std430 layout for SSBOs until SkSL gracefully handles + // implicit array stride. + fResourceBindingReqs.fStorageBufferLayout = Layout::kStd140; fResourceBindingReqs.fSeparateTextureAndSamplerBinding = true; // TODO: support storage buffer @@ -246,6 +260,8 @@ void DawnCaps::initCaps(const wgpu::Device& device) { // TODO: support clamp to border. fClampToBorderSupport = false; + + fTransientAttachmentSupport = device.HasFeature(wgpu::FeatureName::TransientAttachments); } void DawnCaps::initShaderCaps() { @@ -318,7 +334,7 @@ void DawnCaps::initFormatTable(const wgpu::Device& device) { { info = &fFormatTable[GetFormatIndex(wgpu::TextureFormat::BGRA8Unorm)]; info->fFlags = FormatInfo::kAllFlags; - info->fColorTypeInfoCount = 1; + info->fColorTypeInfoCount = 2; info->fColorTypeInfos.reset(new ColorTypeInfo[info->fColorTypeInfoCount]()); int ctIdx = 0; // Format: BGRA8Unorm, Surface: kBGRA_8888 @@ -327,6 +343,12 @@ void DawnCaps::initFormatTable(const wgpu::Device& device) { ctInfo.fColorType = kBGRA_8888_SkColorType; ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag | ColorTypeInfo::kRenderable_Flag; } + // Format: BGRA8Unorm, Surface: kRGB_888x + { + auto& ctInfo = info->fColorTypeInfos[ctIdx++]; + ctInfo.fColorType = kRGB_888x_SkColorType; + ctInfo.fFlags = ColorTypeInfo::kUploadData_Flag; + } } // Format: RGBA16Float @@ -449,7 +471,8 @@ void DawnCaps::initFormatTable(const wgpu::Device& device) { this->setColorType(kAlpha_8_SkColorType, { wgpu::TextureFormat::R8Unorm }); this->setColorType(kRGBA_8888_SkColorType, { wgpu::TextureFormat::RGBA8Unorm }); - this->setColorType(kRGB_888x_SkColorType, { wgpu::TextureFormat::RGBA8Unorm }); + this->setColorType(kRGB_888x_SkColorType, + {wgpu::TextureFormat::RGBA8Unorm, wgpu::TextureFormat::BGRA8Unorm}); this->setColorType(kBGRA_8888_SkColorType, { wgpu::TextureFormat::BGRA8Unorm }); this->setColorType(kGray_8_SkColorType, { wgpu::TextureFormat::R8Unorm }); this->setColorType(kR8_unorm_SkColorType, { wgpu::TextureFormat::R8Unorm }); @@ -467,7 +490,7 @@ size_t DawnCaps::GetFormatIndex(wgpu::TextureFormat format) { return i; } if (kFormats[i] == wgpu::TextureFormat::Undefined) { - SkDEBUGFAILF("Not supported wgpu::TextureFormat: %d\n", format); + SkDEBUGFAILF("Unsupported wgpu::TextureFormat: %d\n", static_cast(format)); return i; } } @@ -567,9 +590,9 @@ void DawnCaps::buildKeyForTexture(SkISize dimensions, // Confirm all the below parts of the key can fit in a single uint32_t. The sum of the shift // amounts in the asserts must be less than or equal to 32. - SkASSERT(samplesKey < (1u << 3)); - SkASSERT(static_cast(isMipped) < (1u << 1)); - SkASSERT(static_cast(dawnSpec.fUsage) < (1u << 5)); + SkASSERT(samplesKey < (1u << 3)); // sample key is first 3 bits + SkASSERT(static_cast(isMipped) < (1u << 1)); // isMapped is 4th bit + SkASSERT(static_cast(dawnSpec.fUsage) < (1u << 28)); // usage is remaining 28 bits // We need two uint32_ts for dimensions, 1 for format, and 1 for the rest of the key; static int kNum32DataCnt = 2 + 1 + 1; @@ -584,8 +607,4 @@ void DawnCaps::buildKeyForTexture(SkISize dimensions, (static_cast(dawnSpec.fUsage) << 4); } -size_t DawnCaps::bytesPerPixel(const TextureInfo& info) const { - return DawnFormatBytesPerBlock(info.dawnTextureSpec().fFormat); -} - } // namespace skgpu::graphite diff --git a/src/gpu/graphite/dawn/DawnCaps.h b/src/gpu/graphite/dawn/DawnCaps.h index 592921355b1f..5299dd220a12 100644 --- a/src/gpu/graphite/dawn/DawnCaps.h +++ b/src/gpu/graphite/dawn/DawnCaps.h @@ -43,7 +43,6 @@ class DawnCaps final : public Caps { ResourceType, Shareable, GraphiteResourceKey*) const override; - size_t bytesPerPixel(const TextureInfo&) const override; uint64_t getRenderPassDescKey(const RenderPassDesc& renderPassDesc) const; private: @@ -107,6 +106,8 @@ class DawnCaps final : public Caps { wgpu::TextureFormat fColorTypeToFormatTable[kSkColorTypeCnt]; void setColorType(SkColorType, std::initializer_list formats); + + bool fTransientAttachmentSupport = false; }; } // namespace skgpu::graphite diff --git a/src/gpu/graphite/dawn/DawnCommandBuffer.cpp b/src/gpu/graphite/dawn/DawnCommandBuffer.cpp index 8c6d773b7823..58ecbbcd3263 100644 --- a/src/gpu/graphite/dawn/DawnCommandBuffer.cpp +++ b/src/gpu/graphite/dawn/DawnCommandBuffer.cpp @@ -117,10 +117,14 @@ bool DawnCommandBuffer::onAddComputePass(const DispatchGroupList& groups) { if (const BindBufferInfo* buffer = std::get_if(&binding.fResource)) { this->bindBuffer(buffer->fBuffer, buffer->fOffset, binding.fIndex); - } else { - const TextureIndex* texIdx = std::get_if(&binding.fResource); + } else if (const TextureIndex* texIdx = + std::get_if(&binding.fResource)) { SkASSERT(texIdx); - this->bindTexture(group->getTexture(*texIdx), binding.fIndex); + this->bindTexture(group->getTexture(texIdx->fValue), binding.fIndex); + } else { + const SamplerIndex* samplerIdx = std::get_if(&binding.fResource); + SkASSERT(samplerIdx); + this->bindSampler(group->getSampler(samplerIdx->fValue), binding.fIndex); } } this->dispatchThreadgroups(dispatch.fParams.fGlobalDispatchSize, @@ -738,6 +742,11 @@ void DawnCommandBuffer::bindTexture(const Texture* texture, unsigned int index) SkASSERT(false); } +void DawnCommandBuffer::bindSampler(const Sampler* sampler, unsigned int index) { + // TODO: https://b.corp.google.com/issues/260341543 + SkASSERT(false); +} + void DawnCommandBuffer::dispatchThreadgroups(const WorkgroupSize& globalSize, const WorkgroupSize& localSize) { // TODO: https://b.corp.google.com/issues/260341543 diff --git a/src/gpu/graphite/dawn/DawnCommandBuffer.h b/src/gpu/graphite/dawn/DawnCommandBuffer.h index 310e6f02daf3..cfc992f29eb6 100644 --- a/src/gpu/graphite/dawn/DawnCommandBuffer.h +++ b/src/gpu/graphite/dawn/DawnCommandBuffer.h @@ -105,6 +105,7 @@ class DawnCommandBuffer final : public CommandBuffer { void bindComputePipeline(const ComputePipeline*); void bindBuffer(const Buffer* buffer, unsigned int offset, unsigned int index); void bindTexture(const Texture* texture, unsigned int index); + void bindSampler(const Sampler* sampler, unsigned int index); void dispatchThreadgroups(const WorkgroupSize& globalSize, const WorkgroupSize& localSize); void endComputePass(); diff --git a/src/gpu/graphite/dawn/DawnGraphicsPipeline.cpp b/src/gpu/graphite/dawn/DawnGraphicsPipeline.cpp index 3bf60261c368..dfb7604be120 100644 --- a/src/gpu/graphite/dawn/DawnGraphicsPipeline.cpp +++ b/src/gpu/graphite/dawn/DawnGraphicsPipeline.cpp @@ -256,22 +256,22 @@ sk_sp DawnGraphicsPipeline::Make(const DawnSharedContext* // Some steps just render depth buffer but not color buffer, so the fragment // shader is null. - const FragSkSLInfo fsSkSLInfo = GetSkSLFS(sharedContext->caps(), - sharedContext->shaderCodeDictionary(), - runtimeDict, - step, - pipelineDesc.paintParamsID(), - useShadingSsboIndex, - renderPassDesc.fWriteSwizzle); - const std::string& fsSKSL = fsSkSLInfo.fSkSL; + FragSkSLInfo fsSkSLInfo = BuildFragmentSkSL(sharedContext->caps(), + sharedContext->shaderCodeDictionary(), + runtimeDict, + step, + pipelineDesc.paintParamsID(), + useShadingSsboIndex, + renderPassDesc.fWriteSwizzle); + std::string& fsSkSL = fsSkSLInfo.fSkSL; const BlendInfo& blendInfo = fsSkSLInfo.fBlendInfo; const bool localCoordsNeeded = fsSkSLInfo.fRequiresLocalCoords; const int numTexturesAndSamplers = fsSkSLInfo.fNumTexturesAndSamplers; - bool hasFragment = !fsSKSL.empty(); + bool hasFragment = !fsSkSL.empty(); if (hasFragment) { if (!SkSLToSPIRV(compiler, - fsSKSL, + fsSkSL, SkSL::ProgramKind::kGraphiteFragment, settings, &fsSPIRV, @@ -287,11 +287,12 @@ sk_sp DawnGraphicsPipeline::Make(const DawnSharedContext* } } + std::string vsSkSL = BuildVertexSkSL(sharedContext->caps()->resourceBindingRequirements(), + step, + useShadingSsboIndex, + localCoordsNeeded); if (!SkSLToSPIRV(compiler, - GetSkSLVS(sharedContext->caps()->resourceBindingRequirements(), - step, - useShadingSsboIndex, - localCoordsNeeded), + vsSkSL, SkSL::ProgramKind::kGraphiteVertex, settings, &vsSPIRV, @@ -530,8 +531,21 @@ sk_sp DawnGraphicsPipeline::Make(const DawnSharedContext* return {}; } +#if GRAPHITE_TEST_UTILS + GraphicsPipeline::Shaders pipelineShaders = { + std::move(vsSkSL), + std::move(fsSkSL), + "SPIR-V disassembly not available", + "SPIR-V disassembly not available", + }; + GraphicsPipeline::Shaders* pipelineShadersPtr = &pipelineShaders; +#else + GraphicsPipeline::Shaders* pipelineShadersPtr = nullptr; +#endif + return sk_sp( new DawnGraphicsPipeline(sharedContext, + pipelineShadersPtr, std::move(pipeline), step->primitiveType(), depthStencilSettings.fStencilReferenceValue, @@ -539,6 +553,20 @@ sk_sp DawnGraphicsPipeline::Make(const DawnSharedContext* hasFragment)); } +DawnGraphicsPipeline::DawnGraphicsPipeline(const skgpu::graphite::SharedContext* sharedContext, + Shaders* pipelineShaders, + wgpu::RenderPipeline renderPipeline, + PrimitiveType primitiveType, + uint32_t refValue, + bool hasStepUniforms, + bool hasFragment) + : GraphicsPipeline(sharedContext, pipelineShaders) + , fRenderPipeline(std::move(renderPipeline)) + , fPrimitiveType(primitiveType) + , fStencilReferenceValue(refValue) + , fHasStepUniforms(hasStepUniforms) + , fHasFragment(hasFragment) {} + void DawnGraphicsPipeline::freeGpuData() { fRenderPipeline = nullptr; } diff --git a/src/gpu/graphite/dawn/DawnGraphicsPipeline.h b/src/gpu/graphite/dawn/DawnGraphicsPipeline.h index a6a7932b6eb2..7f56c90f15e4 100644 --- a/src/gpu/graphite/dawn/DawnGraphicsPipeline.h +++ b/src/gpu/graphite/dawn/DawnGraphicsPipeline.h @@ -66,17 +66,12 @@ class DawnGraphicsPipeline final : public GraphicsPipeline { private: DawnGraphicsPipeline(const skgpu::graphite::SharedContext* sharedContext, + Shaders* pipelineShaders, wgpu::RenderPipeline renderPipeline, PrimitiveType primitiveType, uint32_t refValue, bool hasStepUniforms, - bool hasFragment) - : GraphicsPipeline(sharedContext) - , fRenderPipeline(std::move(renderPipeline)) - , fPrimitiveType(primitiveType) - , fStencilReferenceValue(refValue) - , fHasStepUniforms(hasStepUniforms) - , fHasFragment(hasFragment) {} + bool hasFragment); void freeGpuData() override; diff --git a/src/gpu/graphite/dawn/DawnGraphiteUtils.cpp b/src/gpu/graphite/dawn/DawnGraphiteUtils.cpp index 0f113cef846e..9befc12b9a51 100644 --- a/src/gpu/graphite/dawn/DawnGraphiteUtils.cpp +++ b/src/gpu/graphite/dawn/DawnGraphiteUtils.cpp @@ -89,11 +89,11 @@ wgpu::TextureFormat DawnDepthStencilFlagsToFormat(SkEnumBitMask(spirv.c_str()); + spirvDesc.code = reinterpret_cast(spirv.data()); // Skia often generates shaders that select a texture/sampler conditionally based on an // attribute (specifically in the case of texture atlas indexing). We disable derivative @@ -108,4 +108,16 @@ wgpu::ShaderModule DawnCompileSPIRVShaderModule(const DawnSharedContext* sharedC return sharedContext->device().CreateShaderModule(&desc); } +wgpu::ShaderModule DawnCompileWGSLShaderModule(const DawnSharedContext* sharedContext, + const std::string& wgsl, + ShaderErrorHandler*) { + wgpu::ShaderModuleWGSLDescriptor wgslDesc; + wgslDesc.code = wgsl.c_str(); + + wgpu::ShaderModuleDescriptor desc; + desc.nextInChain = &wgslDesc; + + return sharedContext->device().CreateShaderModule(&desc); +} + } // namespace skgpu::graphite diff --git a/src/gpu/graphite/dawn/DawnGraphiteUtilsPriv.h b/src/gpu/graphite/dawn/DawnGraphiteUtilsPriv.h index c2bd586f3bec..d5f3ab1afa85 100644 --- a/src/gpu/graphite/dawn/DawnGraphiteUtilsPriv.h +++ b/src/gpu/graphite/dawn/DawnGraphiteUtilsPriv.h @@ -34,8 +34,13 @@ bool DawnFormatIsStencil(wgpu::TextureFormat); wgpu::TextureFormat DawnDepthStencilFlagsToFormat(SkEnumBitMask); wgpu::ShaderModule DawnCompileSPIRVShaderModule(const DawnSharedContext* sharedContext, - const std::string& spirv, + std::string_view spirv, ShaderErrorHandler* errorHandler); + +wgpu::ShaderModule DawnCompileWGSLShaderModule(const DawnSharedContext* sharedContext, + const std::string& wgsl, + ShaderErrorHandler* errorHandler); + } // namespace skgpu::graphite #endif // skgpu_graphite_DawnGraphiteUtilsPriv_DEFINED diff --git a/src/gpu/graphite/dawn/DawnResourceProvider.cpp b/src/gpu/graphite/dawn/DawnResourceProvider.cpp index 6ac8e8610ec0..38c85622084d 100644 --- a/src/gpu/graphite/dawn/DawnResourceProvider.cpp +++ b/src/gpu/graphite/dawn/DawnResourceProvider.cpp @@ -14,6 +14,7 @@ #include "src/gpu/graphite/dawn/DawnSampler.h" #include "src/gpu/graphite/dawn/DawnSharedContext.h" #include "src/gpu/graphite/dawn/DawnTexture.h" +#include "src/sksl/SkSLCompiler.h" namespace skgpu::graphite { @@ -165,11 +166,20 @@ sk_sp DawnResourceProvider::findOrCreateDiscardableMSAALoadTexture( SkISize dimensions, const TextureInfo& msaaInfo) { SkASSERT(msaaInfo.isValid()); + // Derive the load texture's info from MSAA texture's info. DawnTextureInfo dawnMsaaLoadTextureInfo; msaaInfo.getDawnTextureInfo(&dawnMsaaLoadTextureInfo); dawnMsaaLoadTextureInfo.fSampleCount = 1; dawnMsaaLoadTextureInfo.fUsage |= wgpu::TextureUsage::TextureBinding; + // MSAA texture can be transient attachment (memoryless) but the load texture cannot be. + // This is because the load texture will need to have its content retained between two passes + // loading: + // - first pass: the resolve texture is blitted to the load texture. + // - 2nd pass: the actual render pass is started and the load texture is blitted to the MSAA + // texture. + dawnMsaaLoadTextureInfo.fUsage &= (~wgpu::TextureUsage::TransientAttachment); + auto texture = this->findOrCreateDiscardableMSAAAttachment(dimensions, dawnMsaaLoadTextureInfo); return sk_sp(static_cast(texture.release())); @@ -179,8 +189,9 @@ sk_sp DawnResourceProvider::createGraphicsPipeline( const RuntimeEffectDictionary* runtimeDict, const GraphicsPipelineDesc& pipelineDesc, const RenderPassDesc& renderPassDesc) { + SkSL::Compiler skslCompiler(fSharedContext->caps()->shaderCaps()); return DawnGraphicsPipeline::Make(this->dawnSharedContext(), - this->skslCompiler(), + &skslCompiler, runtimeDict, pipelineDesc, renderPassDesc); diff --git a/src/gpu/graphite/dawn/DawnSampler.cpp b/src/gpu/graphite/dawn/DawnSampler.cpp index 0099b821e9b9..c30a86360087 100644 --- a/src/gpu/graphite/dawn/DawnSampler.cpp +++ b/src/gpu/graphite/dawn/DawnSampler.cpp @@ -11,6 +11,8 @@ #include "src/gpu/graphite/dawn/DawnCaps.h" #include "src/gpu/graphite/dawn/DawnSharedContext.h" +#include + namespace skgpu::graphite { namespace { diff --git a/src/gpu/graphite/geom/AtlasShape.h b/src/gpu/graphite/geom/AtlasShape.h new file mode 100644 index 000000000000..721164666ac4 --- /dev/null +++ b/src/gpu/graphite/geom/AtlasShape.h @@ -0,0 +1,115 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef skgpu_graphite_geom_AtlasShape_DEFINED +#define skgpu_graphite_geom_AtlasShape_DEFINED + +#include "src/base/SkVx.h" +#include "src/gpu/graphite/geom/Rect.h" +#include "src/gpu/graphite/geom/Shape.h" + +namespace skgpu::graphite { + +class PathAtlas; + +/** + * AtlasShape represents a shape for which per-pixel coverage data comes from a transient atlas + * texture. This excludes font glyphs that are rendered to a persistent atlas, as those are + * represented by the SubRunData geometry type. + * + * The bounds of an atlas shape are always specified in device space and the transform of the + * DrawParams is expected to be identity. These bounds are restricted to the conservative bounds of + * the draw's clip stack and may have the draw's clip stack fully applied to the mask shape. + */ +class AtlasShape { + using half2 = skvx::half2; + using int2 = skvx::int2; + +public: + struct MaskInfo { + // The top-left device space coordinates of the clipped atlas mask shape. For regular fills + // this is equal to the device origin of the draw bounds rounded out to pixel boundaries. + // For inverse fills this point is often within the draw bounds, however it is allowed to be + // smaller for a partially clipped inverse fill that has its mask shape completely clipped + // out. + // + // This is used to determine the position of the UV bounds of the mask relative to the draw + // bounds, especially for inverse fills that may contain a larger draw bounds than the + // coverage mask. The resulting offset is added to the UV coordinates of the corners of the + // rendered quad and rounding this to the nearest pixel coordinate samples the correct + // coverage value, since the mask is rendered into the atlas with any fractional (sub-pixel) + // offset present in the draw's transform. + int2 fDeviceOrigin; + + // The altas-relative integer UV coordinates of the top-left corner of this shape's atlas + // coverage mask bounds. This includes the rounded out transformed device space bounds of + // the shape plus a 2-pixel border (AA border + atlas slot border). + half2 fAtlasOrigin; + + // The width and height of the bounds of the coverage mask shape in device coordinates. This + // includes the rounded out transformed device space bounds of the shape + a 1-pixel border + // added for AA. + half2 fMaskSize; + }; + + AtlasShape() = default; + AtlasShape(const Shape& shape, + const PathAtlas* atlas, + const SkM44& deviceToLocal, + const MaskInfo& maskInfo) + : fAtlas(atlas) + , fDeviceToLocal(deviceToLocal) + , fInverted(shape.inverted()) + , fMaskInfo(maskInfo) {} + AtlasShape(const AtlasShape&) = default; + + ~AtlasShape() = default; + + // NOTE: None of the geometry types benefit from move semantics, so we don't bother + // defining a move assignment operator for AtlasShape. + AtlasShape& operator=(AtlasShape&&) = delete; + AtlasShape& operator=(const AtlasShape&) = default; + + // Returns the device-space bounds of the clipped coverage mask shape. For inverse fills this + // is different from the actual draw bounds stored in the Clip. + const Rect bounds() const { + return Rect(skvx::float2((float)this->deviceOrigin().x(), float(this->deviceOrigin().y())), + skvx::float2((float)this->maskSize().x(), (float)(this->maskSize().y()))); + } + + // The inverse local-to-device matrix. + const SkM44& deviceToLocal() const { return fDeviceToLocal; } + + // The top-left device-space coordinates of the (clipped) atlas mask shape. For regular fills + // this is equal to the device-space origin of the draw bounds. For inverse fills this point + // is often within the draw bounds, however it is allowed to be smaller for a partially clipped + // inverse fill that has its mask shape completely clipped out. + const int2& deviceOrigin() const { return fMaskInfo.fDeviceOrigin; } + + // The altas-relative integer UV coordinates of the top-left corner of this shape's atlas + // coverage mask bounds. + const half2& atlasOrigin() const { return fMaskInfo.fAtlasOrigin; } + + // The width and height of the bounds of the coverage mask shape in device coordinates. + const half2& maskSize() const { return fMaskInfo.fMaskSize; } + + // The atlas that the shape will be rendered to. + const PathAtlas* atlas() const { return fAtlas; } + + // Whether or not the shape will be painted according to an inverse fill rule. + bool inverted() const { return fInverted; } + +private: + const PathAtlas* fAtlas; + SkM44 fDeviceToLocal; + bool fInverted; + MaskInfo fMaskInfo; +}; + +} // namespace skgpu::graphite + +#endif // skgpu_graphite_geom_AtlasShape_DEFINED diff --git a/src/gpu/graphite/geom/EdgeAAQuad.h b/src/gpu/graphite/geom/EdgeAAQuad.h index 5b7bbe82b883..4a75e239b841 100644 --- a/src/gpu/graphite/geom/EdgeAAQuad.h +++ b/src/gpu/graphite/geom/EdgeAAQuad.h @@ -9,8 +9,8 @@ #define skgpu_graphite_geom_EdgeAAQuad_DEFINED #include "include/core/SkRect.h" +#include "src/base/SkEnumBitMask.h" #include "src/base/SkVx.h" -#include "src/core/SkEnumBitMask.h" #include "src/gpu/graphite/geom/Rect.h" namespace skgpu::graphite { diff --git a/src/gpu/graphite/geom/Geometry.h b/src/gpu/graphite/geom/Geometry.h index e25a24970258..468dfb7913e9 100644 --- a/src/gpu/graphite/geom/Geometry.h +++ b/src/gpu/graphite/geom/Geometry.h @@ -10,6 +10,7 @@ #include "include/core/SkVertices.h" #include "src/core/SkVerticesPriv.h" +#include "src/gpu/graphite/geom/AtlasShape.h" #include "src/gpu/graphite/geom/EdgeAAQuad.h" #include "src/gpu/graphite/geom/Rect.h" #include "src/gpu/graphite/geom/Shape.h" @@ -24,7 +25,7 @@ namespace skgpu::graphite { class Geometry { public: enum class Type : uint8_t { - kEmpty, kShape, kVertices, kSubRun, kEdgeAAQuad + kEmpty, kShape, kVertices, kSubRun, kEdgeAAQuad, kAtlasShape }; Geometry() {} @@ -35,6 +36,7 @@ class Geometry { explicit Geometry(const SubRunData& subrun) { this->setSubRun(subrun); } explicit Geometry(sk_sp vertices) { this->setVertices(vertices); } explicit Geometry(const EdgeAAQuad& edgeAAQuad) { this->setEdgeAAQuad(edgeAAQuad); } + explicit Geometry(const AtlasShape& atlasShape) { this->setAtlasShape(atlasShape); } ~Geometry() { this->setType(Type::kEmpty); } @@ -60,6 +62,10 @@ class Geometry { this->setEdgeAAQuad(geom.edgeAAQuad()); geom.setType(Type::kEmpty); break; + case Type::kAtlasShape: + this->setAtlasShape(geom.atlasShape()); + geom.setType(Type::kEmpty); + break; } } return *this; @@ -71,6 +77,7 @@ class Geometry { case Type::kSubRun: this->setSubRun(geom.subRunData()); break; case Type::kVertices: this->setVertices(geom.fVertices); break; case Type::kEdgeAAQuad: this->setEdgeAAQuad(geom.edgeAAQuad()); break; + case Type::kAtlasShape: this->setAtlasShape(geom.atlasShape()); break; default: break; } return *this; @@ -82,6 +89,7 @@ class Geometry { bool isVertices() const { return fType == Type::kVertices; } bool isSubRun() const { return fType == Type::kSubRun; } bool isEdgeAAQuad() const { return fType == Type::kEdgeAAQuad; } + bool isAtlasShape() const { return fType == Type::kAtlasShape; } bool isEmpty() const { return fType == (Type::kEmpty) || (this->isShape() && this->shape().isEmpty()); } @@ -89,6 +97,7 @@ class Geometry { const Shape& shape() const { SkASSERT(this->isShape()); return fShape; } const SubRunData& subRunData() const { SkASSERT(this->isSubRun()); return fSubRunData; } const EdgeAAQuad& edgeAAQuad() const { SkASSERT(this->isEdgeAAQuad()); return fEdgeAAQuad; } + const AtlasShape& atlasShape() const { SkASSERT(this->isAtlasShape()); return fAtlasShape; } const SkVertices* vertices() const { SkASSERT(this->isVertices()); return fVertices.get(); } sk_sp refVertices() const { SkASSERT(this->isVertices()); @@ -129,6 +138,15 @@ class Geometry { } } + void setAtlasShape(const AtlasShape& atlasShape) { + if (fType == Type::kAtlasShape) { + fAtlasShape = atlasShape; + } else { + this->setType(Type::kAtlasShape); + new (&fAtlasShape) AtlasShape(atlasShape); + } + } + Rect bounds() const { switch (fType) { case Type::kEmpty: return Rect(0, 0, 0, 0); @@ -136,6 +154,7 @@ class Geometry { case Type::kVertices: return fVertices->bounds(); case Type::kSubRun: return fSubRunData.bounds(); case Type::kEdgeAAQuad: return fEdgeAAQuad.bounds(); + case Type::kAtlasShape: return fAtlasShape.bounds(); } SkUNREACHABLE; } @@ -149,6 +168,8 @@ class Geometry { fSubRunData.~SubRunData(); } else if (this->isVertices() && type != Type::kVertices) { fVertices.~sk_sp(); + } else if (this->isAtlasShape() && type != Type::kAtlasShape) { + fAtlasShape.~AtlasShape(); } fType = type; } @@ -159,6 +180,7 @@ class Geometry { SubRunData fSubRunData; sk_sp fVertices; EdgeAAQuad fEdgeAAQuad; + AtlasShape fAtlasShape; }; }; diff --git a/src/gpu/graphite/geom/Rect.h b/src/gpu/graphite/geom/Rect.h index 776edefebd67..7de5c9abea1d 100644 --- a/src/gpu/graphite/geom/Rect.h +++ b/src/gpu/graphite/geom/Rect.h @@ -16,7 +16,7 @@ namespace skgpu::graphite { #define AI SK_ALWAYS_INLINE /** - * SIMD rect implementation. Vales are stored internally in the form: [left, top, -right, -bot]. + * SIMD rect implementation. Values are stored internally in the form: [left, top, -right, -bot]. * * Some operations (e.g., intersect, inset) may return a negative or empty rect * (negative meaning, left >= right or top >= bot). diff --git a/src/gpu/graphite/geom/SubRunData.h b/src/gpu/graphite/geom/SubRunData.h index 70a8893dcff9..b65b3e1eab5f 100644 --- a/src/gpu/graphite/geom/SubRunData.h +++ b/src/gpu/graphite/geom/SubRunData.h @@ -8,7 +8,9 @@ #ifndef skgpu_graphite_geom_SubRunData_DEFINED #define skgpu_graphite_geom_SubRunData_DEFINED +#include "include/core/SkM44.h" #include "src/gpu/graphite/geom/Rect.h" +#include "src/text/gpu/SubRunContainer.h" namespace sktext::gpu { class AtlasSubRun; } @@ -17,7 +19,18 @@ namespace skgpu::graphite { class Recorder; /** - * SubRunData contains all the data we need to render AtlasSubRuns + * SubRunData represents an AtlasSubRun subspan for which per-pixel coverage data comes from a + * persistent glyph atlas texture. + * + * The bounds() represent the bounds of the entire AtlasSubRun and does not directly map to the + * local coordinates of this particular subspan. Rather, the dimensions and offset coordinates of a + * subspan are defined in a coordinate space that is partially transformed by a decomposition of + * the local-to-device matrix computed by the AtlasSubRun per instance. The transform of the draw is + * the rest of the decomposed transform (often only a translation) that maps this intermediate space + * to the device-space coordinates of the draw. + * + * The local coordinates used in shading are derived by transforming the final device coordinates + * using the inverse of the local-to-device matrix. */ class SubRunData { public: @@ -28,15 +41,19 @@ class SubRunData { SubRunData(const sktext::gpu::AtlasSubRun* subRun, sk_sp supportDataKeepAlive, Rect deviceBounds, + const SkM44& deviceToLocal, int startGlyphIndex, int glyphCount, - Recorder* recorder) + Recorder* recorder, + sktext::gpu::RendererData rendererData) : fSubRun(subRun) , fSupportDataKeepAlive(std::move(supportDataKeepAlive)) , fBounds(deviceBounds) + , fDeviceToLocal(deviceToLocal) , fStartGlyphIndex(startGlyphIndex) , fGlyphCount(glyphCount) - , fRecorder(recorder) {} + , fRecorder(recorder) + , fRendererData(rendererData) {} ~SubRunData() = default; @@ -45,14 +62,18 @@ class SubRunData { SubRunData& operator=(SubRunData&&) = delete; SubRunData& operator=(const SubRunData& that) = default; - // The bounding box of the subrun data. + // The bounding box of the originating AtlasSubRun. Rect bounds() const { return fBounds; } + // The inverse local-to-device matrix. + const SkM44& deviceToLocal() const { return fDeviceToLocal; } + // Access the individual elements of the subrun data. const sktext::gpu::AtlasSubRun* subRun() const { return fSubRun; } int startGlyphIndex() const { return fStartGlyphIndex; } int glyphCount() const { return fGlyphCount; } Recorder* recorder() const { return fRecorder; } + const sktext::gpu::RendererData& rendererData() const { return fRendererData; } private: const sktext::gpu::AtlasSubRun* fSubRun; @@ -60,9 +81,11 @@ class SubRunData { sk_sp fSupportDataKeepAlive; Rect fBounds; // bounds of the data stored in the SubRun + SkM44 fDeviceToLocal; int fStartGlyphIndex; int fGlyphCount; Recorder* fRecorder; // this SubRun can only be associated with this Recorder's atlas + sktext::gpu::RendererData fRendererData; }; } // namespace skgpu::graphite diff --git a/src/gpu/graphite/mtl/MtlCaps.h b/src/gpu/graphite/mtl/MtlCaps.h index 3e0eeff20e1f..58b309aed7ee 100644 --- a/src/gpu/graphite/mtl/MtlCaps.h +++ b/src/gpu/graphite/mtl/MtlCaps.h @@ -58,8 +58,6 @@ class MtlCaps final : public Caps { Shareable, GraphiteResourceKey*) const override; - size_t bytesPerPixel(const TextureInfo&) const override; - private: void initGPUFamily(const id); diff --git a/src/gpu/graphite/mtl/MtlCaps.mm b/src/gpu/graphite/mtl/MtlCaps.mm index 59d3e34cbbb6..b72aed7eb535 100644 --- a/src/gpu/graphite/mtl/MtlCaps.mm +++ b/src/gpu/graphite/mtl/MtlCaps.mm @@ -253,6 +253,8 @@ fStorageBufferSupport = true; fStorageBufferPreferred = true; + fComputeSupport = true; + if (@available(macOS 10.12, iOS 14.0, tvOS 14.0, *)) { fClampToBorderSupport = (this->isMac() || fFamilyGroup >= 7); } else { @@ -773,12 +775,15 @@ TextureInfo MtlCaps::getDefaultMSAATextureInfo(const TextureInfo& singleSampledInfo, Discardable discardable) const { + if (fDefaultMSAASamples <= 1) { + return {}; + } const MtlTextureSpec& singleSpec = singleSampledInfo.mtlTextureSpec(); MTLTextureUsage usage = MTLTextureUsageRenderTarget; MtlTextureInfo info; - info.fSampleCount = this->defaultMSAASamples(); + info.fSampleCount = fDefaultMSAASamples; info.fMipmapped = Mipmapped::kNo; info.fFormat = singleSpec.fFormat; info.fUsage = usage; @@ -906,7 +911,7 @@ bool MtlCaps::isTexturable(MTLPixelFormat format) const { const FormatInfo& formatInfo = this->getFormatInfo(format); - return SkToBool(FormatInfo::kTexturable_Flag && formatInfo.fFlags); + return SkToBool(FormatInfo::kTexturable_Flag & formatInfo.fFlags); } bool MtlCaps::isRenderable(const TextureInfo& info) const { @@ -1063,8 +1068,4 @@ } -size_t MtlCaps::bytesPerPixel(const TextureInfo& info) const { - return MtlFormatBytesPerBlock((MTLPixelFormat)info.mtlTextureSpec().fFormat); -} - } // namespace skgpu::graphite diff --git a/src/gpu/graphite/mtl/MtlCommandBuffer.h b/src/gpu/graphite/mtl/MtlCommandBuffer.h index 57f2f40466da..17b6197faa52 100644 --- a/src/gpu/graphite/mtl/MtlCommandBuffer.h +++ b/src/gpu/graphite/mtl/MtlCommandBuffer.h @@ -37,6 +37,11 @@ class MtlCommandBuffer final : public CommandBuffer { bool setNewCommandBufferResources() override; + void addWaitSemaphores(size_t numWaitSemaphores, + const BackendSemaphore* waitSemaphores) override; + void addSignalSemaphores(size_t numSignalSemaphores, + const BackendSemaphore* signalSemaphores) override; + bool isFinished() { return (*fCommandBuffer).status == MTLCommandBufferStatusCompleted || (*fCommandBuffer).status == MTLCommandBufferStatusError; @@ -119,6 +124,7 @@ class MtlCommandBuffer final : public CommandBuffer { void bindComputePipeline(const ComputePipeline*); void bindBuffer(const Buffer* buffer, unsigned int offset, unsigned int index); void bindTexture(const Texture* texture, unsigned int index); + void bindSampler(const Sampler* sampler, unsigned int index); void dispatchThreadgroups(const WorkgroupSize& globalSize, const WorkgroupSize& localSize); void endComputePass(); diff --git a/src/gpu/graphite/mtl/MtlCommandBuffer.mm b/src/gpu/graphite/mtl/MtlCommandBuffer.mm index bd48fe99114b..30c5b6b71ff6 100644 --- a/src/gpu/graphite/mtl/MtlCommandBuffer.mm +++ b/src/gpu/graphite/mtl/MtlCommandBuffer.mm @@ -7,6 +7,7 @@ #include "src/gpu/graphite/mtl/MtlCommandBuffer.h" +#include "include/gpu/graphite/BackendSemaphore.h" #include "src/gpu/graphite/Log.h" #include "src/gpu/graphite/TextureProxy.h" #include "src/gpu/graphite/compute/DispatchGroup.h" @@ -103,6 +104,53 @@ fCurrentIndexBufferOffset = 0; } +void MtlCommandBuffer::addWaitSemaphores(size_t numWaitSemaphores, + const BackendSemaphore* waitSemaphores) { + if (!waitSemaphores) { + SkASSERT(numWaitSemaphores == 0); + return; + } + + // Can only insert events with no active encoder + SkASSERT(!fActiveRenderCommandEncoder); + SkASSERT(!fActiveComputeCommandEncoder); + this->endBlitCommandEncoder(); + if (@available(macOS 10.14, iOS 12.0, *)) { + for (size_t i = 0; i < numWaitSemaphores; ++i) { + auto semaphore = waitSemaphores[i]; + if (semaphore.isValid() && semaphore.backend() == BackendApi::kMetal) { + id mtlEvent = (__bridge id)semaphore.getMtlEvent(); + [(*fCommandBuffer) encodeWaitForEvent: mtlEvent + value: semaphore.getMtlValue()]; + } + } + } +} + +void MtlCommandBuffer::addSignalSemaphores(size_t numSignalSemaphores, + const BackendSemaphore* signalSemaphores) { + if (!signalSemaphores) { + SkASSERT(numSignalSemaphores == 0); + return; + } + + // Can only insert events with no active encoder + SkASSERT(!fActiveRenderCommandEncoder); + SkASSERT(!fActiveComputeCommandEncoder); + this->endBlitCommandEncoder(); + + if (@available(macOS 10.14, iOS 12.0, *)) { + for (size_t i = 0; i < numSignalSemaphores; ++i) { + auto semaphore = signalSemaphores[i]; + if (semaphore.isValid() && semaphore.backend() == BackendApi::kMetal) { + id mtlEvent = (__bridge id)semaphore.getMtlEvent(); + [(*fCommandBuffer) encodeSignalEvent: mtlEvent + value: semaphore.getMtlValue()]; + } + } + } +} + bool MtlCommandBuffer::onAddRenderPass(const RenderPassDesc& renderPassDesc, const Texture* colorTexture, const Texture* resolveTexture, @@ -133,10 +181,14 @@ if (const BindBufferInfo* buffer = std::get_if(&binding.fResource)) { this->bindBuffer(buffer->fBuffer, buffer->fOffset, binding.fIndex); - } else { - const TextureIndex* texIdx = std::get_if(&binding.fResource); + } else if (const TextureIndex* texIdx = + std::get_if(&binding.fResource)) { SkASSERT(texIdx); - this->bindTexture(group->getTexture(*texIdx), binding.fIndex); + this->bindTexture(group->getTexture(texIdx->fValue), binding.fIndex); + } else { + const SamplerIndex* samplerIdx = std::get_if(&binding.fResource); + SkASSERT(samplerIdx); + this->bindSampler(group->getSampler(samplerIdx->fValue), binding.fIndex); } } SkASSERT(fActiveComputeCommandEncoder); @@ -694,6 +746,14 @@ static MTLPrimitiveType graphite_to_mtl_primitive(PrimitiveType primitiveType) { fActiveComputeCommandEncoder->setTexture(mtlTexture, index); } +void MtlCommandBuffer::bindSampler(const Sampler* sampler, unsigned int index) { + SkASSERT(fActiveComputeCommandEncoder); + + id mtlSamplerState = + sampler ? static_cast(sampler)->mtlSamplerState() : nil; + fActiveComputeCommandEncoder->setSamplerState(mtlSamplerState, index); +} + void MtlCommandBuffer::dispatchThreadgroups(const WorkgroupSize& globalSize, const WorkgroupSize& localSize) { SkASSERT(fActiveComputeCommandEncoder); diff --git a/src/gpu/graphite/mtl/MtlGraphicsPipeline.h b/src/gpu/graphite/mtl/MtlGraphicsPipeline.h index 6157a965f772..7a65b0c21131 100644 --- a/src/gpu/graphite/mtl/MtlGraphicsPipeline.h +++ b/src/gpu/graphite/mtl/MtlGraphicsPipeline.h @@ -47,7 +47,8 @@ class MtlGraphicsPipeline final : public GraphicsPipeline { sk_cfp>, uint32_t stencilRefValue, const BlendInfo& blendInfo, - const RenderPassDesc&); + const RenderPassDesc&, + Shaders* pipelineShaders); ~MtlGraphicsPipeline() override {} @@ -57,13 +58,10 @@ class MtlGraphicsPipeline final : public GraphicsPipeline { private: MtlGraphicsPipeline(const skgpu::graphite::SharedContext* sharedContext, + Shaders* pipelineShaders, sk_cfp> pso, sk_cfp> dss, - uint32_t refValue) - : GraphicsPipeline(sharedContext) - , fPipelineState(std::move(pso)) - , fDepthStencilState(dss) - , fStencilReferenceValue(refValue) {} + uint32_t refValue); void freeGpuData() override; diff --git a/src/gpu/graphite/mtl/MtlGraphicsPipeline.mm b/src/gpu/graphite/mtl/MtlGraphicsPipeline.mm index b5f6abbfdec2..cea1f0abfb5e 100644 --- a/src/gpu/graphite/mtl/MtlGraphicsPipeline.mm +++ b/src/gpu/graphite/mtl/MtlGraphicsPipeline.mm @@ -261,7 +261,8 @@ static MTLBlendOperation blend_equation_to_mtl_blend_op(skgpu::BlendEquation equ sk_cfp> dss, uint32_t stencilRefValue, const BlendInfo& blendInfo, - const RenderPassDesc& renderPassDesc) { + const RenderPassDesc& renderPassDesc, + Shaders* pipelineShaders) { id vsLibrary = std::get<0>(vertexMain); id fsLibrary = std::get<0>(fragmentMain); if (!vsLibrary || !fsLibrary) { @@ -313,11 +314,22 @@ static MTLBlendOperation blend_equation_to_mtl_blend_op(skgpu::BlendEquation equ } return sk_sp(new MtlGraphicsPipeline(sharedContext, + pipelineShaders, std::move(pso), std::move(dss), stencilRefValue)); } +MtlGraphicsPipeline::MtlGraphicsPipeline(const skgpu::graphite::SharedContext* sharedContext, + Shaders* pipelineShaders, + sk_cfp> pso, + sk_cfp> dss, + uint32_t refValue) + : GraphicsPipeline(sharedContext, pipelineShaders) + , fPipelineState(std::move(pso)) + , fDepthStencilState(dss) + , fStencilReferenceValue(refValue) {} + void MtlGraphicsPipeline::freeGpuData() { fPipelineState.reset(); } diff --git a/src/gpu/graphite/mtl/MtlGraphiteUtils.mm b/src/gpu/graphite/mtl/MtlGraphiteUtils.mm index 31e0bdb5e1d1..0efdff41cb59 100644 --- a/src/gpu/graphite/mtl/MtlGraphiteUtils.mm +++ b/src/gpu/graphite/mtl/MtlGraphiteUtils.mm @@ -14,6 +14,7 @@ #include "src/gpu/graphite/ContextPriv.h" #include "src/gpu/graphite/mtl/MtlQueueManager.h" #include "src/gpu/graphite/mtl/MtlSharedContext.h" +#include "src/gpu/mtl/MtlUtilsPriv.h" namespace skgpu::graphite { @@ -98,4 +99,8 @@ MTLPixelFormat MtlDepthStencilFlagsToFormat(SkEnumBitMask mas return compiledLibrary; } +size_t MtlFormatBytesPerBlock(MtlPixelFormat format) { + return skgpu::MtlFormatBytesPerBlock((MTLPixelFormat) format); +} + } // namespace skgpu::graphite diff --git a/src/gpu/graphite/mtl/MtlResourceProvider.mm b/src/gpu/graphite/mtl/MtlResourceProvider.mm index d2445147de68..891bc277c73d 100644 --- a/src/gpu/graphite/mtl/MtlResourceProvider.mm +++ b/src/gpu/graphite/mtl/MtlResourceProvider.mm @@ -30,6 +30,7 @@ #include "src/gpu/graphite/mtl/MtlSharedContext.h" #include "src/gpu/graphite/mtl/MtlTexture.h" #include "src/gpu/mtl/MtlUtilsPriv.h" +#include "src/sksl/SkSLCompiler.h" #include "src/sksl/SkSLProgramSettings.h" #import @@ -91,7 +92,8 @@ fragment float4 fragmentMain(VertexOutput in [[stage_in]], std::move(ignoreDS), /*stencilRefValue=*/0, noBlend, - renderPassDesc); + renderPassDesc, + /*pipelineShaders=*/nullptr); if (pipeline) { fLoadMSAAPipelines.set(renderPassKey, pipeline); } @@ -110,7 +112,7 @@ fragment float4 fragmentMain(VertexOutput in [[stage_in]], settings.fForceNoRTFlip = true; - auto skslCompiler = this->skslCompiler(); + SkSL::Compiler skslCompiler(fSharedContext->caps()->shaderCaps()); ShaderErrorHandler* errorHandler = fSharedContext->caps()->shaderErrorHandler(); const RenderStep* step = @@ -119,17 +121,17 @@ fragment float4 fragmentMain(VertexOutput in [[stage_in]], bool useShadingSsboIndex = fSharedContext->caps()->storageBufferPreferred() && step->performsShading(); - const FragSkSLInfo fsSkSLInfo = GetSkSLFS(fSharedContext->caps(), - fSharedContext->shaderCodeDictionary(), - runtimeDict, - step, - pipelineDesc.paintParamsID(), - useShadingSsboIndex, - renderPassDesc.fWriteSwizzle); - const std::string& fsSkSL = fsSkSLInfo.fSkSL; + FragSkSLInfo fsSkSLInfo = BuildFragmentSkSL(fSharedContext->caps(), + fSharedContext->shaderCodeDictionary(), + runtimeDict, + step, + pipelineDesc.paintParamsID(), + useShadingSsboIndex, + renderPassDesc.fWriteSwizzle); + std::string& fsSkSL = fsSkSLInfo.fSkSL; const BlendInfo& blendInfo = fsSkSLInfo.fBlendInfo; const bool localCoordsNeeded = fsSkSLInfo.fRequiresLocalCoords; - if (!SkSLToMSL(skslCompiler, + if (!SkSLToMSL(&skslCompiler, fsSkSL, SkSL::ProgramKind::kGraphiteFragment, settings, @@ -139,11 +141,12 @@ fragment float4 fragmentMain(VertexOutput in [[stage_in]], return nullptr; } - if (!SkSLToMSL(skslCompiler, - GetSkSLVS(fSharedContext->caps()->resourceBindingRequirements(), - step, - useShadingSsboIndex, - localCoordsNeeded), + std::string vsSkSL = BuildVertexSkSL(fSharedContext->caps()->resourceBindingRequirements(), + step, + useShadingSsboIndex, + localCoordsNeeded); + if (!SkSLToMSL(&skslCompiler, + vsSkSL, SkSL::ProgramKind::kGraphiteVertex, settings, &vsMSL, @@ -158,6 +161,17 @@ fragment float4 fragmentMain(VertexOutput in [[stage_in]], sk_cfp> dss = this->findOrCreateCompatibleDepthStencilState(step->depthStencilSettings()); +#if GRAPHITE_TEST_UTILS + GraphicsPipeline::Shaders pipelineShaders = { + std::move(vsSkSL), + std::move(fsSkSL), + std::move(vsMSL), + std::move(fsMSL), + }; + GraphicsPipeline::Shaders* pipelineShadersPtr = &pipelineShaders; +#else + GraphicsPipeline::Shaders* pipelineShadersPtr = nullptr; +#endif return MtlGraphicsPipeline::Make(this->mtlSharedContext(), step->name(), {vsLibrary.get(), "vertexMain"}, @@ -167,7 +181,8 @@ fragment float4 fragmentMain(VertexOutput in [[stage_in]], std::move(dss), step->depthStencilSettings().fStencilReferenceValue, blendInfo, - renderPassDesc); + renderPassDesc, + pipelineShadersPtr); } sk_sp MtlResourceProvider::createComputePipeline( @@ -189,12 +204,10 @@ fragment float4 fragmentMain(VertexOutput in [[stage_in]], SkSL::Program::Interface interface; SkSL::ProgramSettings settings; - auto skslCompiler = this->skslCompiler(); - auto computeSkSL = pipelineDesc.computeStep()->computeSkSL( - fSharedContext->caps()->resourceBindingRequirements(), - /*nextBindingIndex=*/0); - if (!SkSLToMSL(skslCompiler, - computeSkSL, + SkSL::Compiler skslCompiler(fSharedContext->caps()->shaderCaps()); + std::string sksl = BuildComputeSkSL(fSharedContext->caps(), pipelineDesc.computeStep()); + if (!SkSLToMSL(&skslCompiler, + sksl, SkSL::ProgramKind::kCompute, settings, &msl, diff --git a/src/gpu/graphite/render/AnalyticRRectRenderStep.cpp b/src/gpu/graphite/render/AnalyticRRectRenderStep.cpp index 3cbf286bbe1f..c8e80eab44db 100644 --- a/src/gpu/graphite/render/AnalyticRRectRenderStep.cpp +++ b/src/gpu/graphite/render/AnalyticRRectRenderStep.cpp @@ -511,373 +511,35 @@ AnalyticRRectRenderStep::AnalyticRRectRenderStep(StaticBufferManager* bufferMana AnalyticRRectRenderStep::~AnalyticRRectRenderStep() {} std::string AnalyticRRectRenderStep::vertexSkSL() const { - // TODO: Move this into a module - return R"( - const int kCornerVertexCount = 9; // KEEP IN SYNC WITH C++'s kCornerVertexCount - const float kMiterScale = 1.0; - const float kBevelScale = 0.0; - const float kRoundScale = 0.41421356237; // sqrt(2)-1 - - const float kEpsilon = 0.00024; // SK_ScalarNearlyZero - - // Default to miter'ed vertex positioning. Corners with sufficiently large corner radii, or - // bevel'ed strokes will adjust vertex placement on a per corner basis. This will not affect - // the final coverage calculations in the fragment shader. - float joinScale = kMiterScale; - - // Unpack instance-level state that determines the vertex placement and style of shape. - bool bidirectionalCoverage = center.z <= 0.0; - bool deviceSpaceDistances = false; - float4 xs, ys; // ordered TL, TR, BR, BL - float4 edgeAA = float4(1.0); // ordered L,T,R,B. 1 = AA, 0 = no AA - bool strokedLine = false; - if (xRadiiOrFlags.x < -1.0) { - // Stroked [round] rect or line - // If y > 0, unpack the line end points, otherwise unpack the rect edges - strokedLine = xRadiiOrFlags.y > 0.0; - xs = strokedLine ? ltrbOrQuadYs.LLRR : ltrbOrQuadYs.LRRL; - ys = ltrbOrQuadYs.TTBB; - - if (xRadiiOrFlags.y < 0.0) { - // A hairline [r]rect so the X radii are encoded as negative values in this field, - // and Y radii are stored directly in the subsequent float4. - xRadii = -xRadiiOrFlags - 2.0; - yRadii = radiiOrQuadXs; - - // All hairlines use miter joins (join style > 0) - strokeParams = float2(0.0, 1.0); - } else { - xRadii = radiiOrQuadXs; - yRadii = xRadii; // regular strokes are circular - strokeParams = xRadiiOrFlags.zw; - - if (strokeParams.y < 0.0) { - joinScale = kRoundScale; // the stroke radius rounds rectangular corners - } else if (strokeParams.y == 0.0) { - joinScale = kBevelScale; - } // else stay mitered - } - } else if (any(greaterThan(xRadiiOrFlags, float4(0.0)))) { - // Filled round rect - xs = ltrbOrQuadYs.LRRL; - ys = ltrbOrQuadYs.TTBB; - - xRadii = xRadiiOrFlags; - yRadii = radiiOrQuadXs; - - strokeParams = float2(0.0, -1.0); // A negative join style is "round" - } else { - // Per-edge quadrilateral, so we have to calculate the corner's basis from the - // quad's edges. - xs = radiiOrQuadXs; - ys = ltrbOrQuadYs; - edgeAA = -xRadiiOrFlags; // AA flags needed to be < 0 on upload, so flip the sign. - - xRadii = float4(0.0); - yRadii = float4(0.0); - - strokeParams = float2(0.0, 1.0); // Will be ignored, but set to a "miter" - deviceSpaceDistances = true; - } - - // Adjust state on a per-corner basis - int cornerID = sk_VertexID / kCornerVertexCount; - float2 cornerRadii = float2(xRadii[cornerID], yRadii[cornerID]); - if (cornerID % 2 != 0) { - // Corner radii are uploaded in the local coordinate frame, but vertex placement happens - // in a consistent winding before transforming to final local coords, so swap the - // radii for odd corners. - cornerRadii = cornerRadii.yx; - } - - float2 cornerAspectRatio = float2(1.0); - if (cornerRadii.x > 0 && cornerRadii.y > 0) { - // Position vertices for an elliptical corner; overriding any previous join style since - // that only applies when radii are 0. - joinScale = kRoundScale; - cornerAspectRatio = cornerRadii.yx; - } - - // Calculate the local edge vectors, ordered L, T, R, B starting from the bottom left point. - // For quadrilaterals these are not necessarily axis-aligned, but in all cases they orient - // the +X/+Y normalized vertex template for each corner. - float4 dx = xs - xs.wxyz; - float4 dy = ys - ys.wxyz; - float4 edgeLen = sqrt(dx*dx + dy*dy); - - float4 edgeMask = sign(edgeLen); // 0 for zero-length edge, 1 for non-zero edge. - float4 edgeBias = float4(0.0); // adjustment to edge distance for butt cap correction - float2 strokeRadius = float2(strokeParams.x); - if (any(equal(edgeMask, float4(0.0)))) { - // Must clean up (dx,dy) depending on the empty edge configuration - if (all(equal(edgeMask, float4(0.0)))) { - // A point so use the canonical basis - dx = float4( 0.0, 1.0, 0.0, -1.0); - dy = float4(-1.0, 0.0, 1.0, 0.0); - edgeLen = float4(1.0); - } else { - // Triangles (3 non-zero edges) copy the adjacent edge. Otherwise it's a line so - // replace empty edges with the left-hand normal vector of the adjacent edge. - bool triangle = (edgeMask[0] + edgeMask[1] + edgeMask[2] + edgeMask[3]) > 2.5; - float4 edgeX = triangle ? dx.yzwx : dy.yzwx; - float4 edgeY = triangle ? dy.yzwx : -dx.yzwx; - - dx = mix(edgeX, dx, edgeMask); - dy = mix(edgeY, dy, edgeMask); - edgeLen = mix(edgeLen.yzwx, edgeLen, edgeMask); - edgeAA = mix(edgeAA.yzwx, edgeAA, edgeMask); - - if (!triangle && joinScale == kBevelScale) { - // Don't outset by stroke radius for butt caps on the zero-length edge, but - // adjust edgeBias and strokeParams to calculate an AA miter'ed shape with the - // non-uniform stroke outset. - strokeRadius *= float2(edgeMask[cornerID], edgeMask.yzwx[cornerID]); - edgeBias = (edgeMask - 1.0) * strokeParams.x; - strokeParams.y = 1.0; - joinScale = kMiterScale; - } - } - } - - dx /= edgeLen; - dy /= edgeLen; - - // Calculate local coordinate for the vertex (relative to xAxis and yAxis at first). - float2 xAxis = -float2(dx.yzwx[cornerID], dy.yzwx[cornerID]); - float2 yAxis = float2(dx.xyzw[cornerID], dy.xyzw[cornerID]); - float2 localPos; - bool snapToCenter = false; - if (normalScale < 0.0) { - // Vertex is inset from the base shape, so we scale by (cornerRadii - strokeRadius) - // and have to check for the possibility of an inner miter. It is always inset by an - // additional conservative AA amount. - if (center.w < 0.0 || centerWeight * center.z != 0.0) { - snapToCenter = true; - } else { - float localAARadius = center.w; - float2 insetRadii = - cornerRadii + (bidirectionalCoverage ? -strokeRadius : strokeRadius); - if (joinScale == kMiterScale || - insetRadii.x <= localAARadius || insetRadii.y <= localAARadius) { - // Miter the inset position - localPos = (insetRadii - localAARadius); - } else { - localPos = insetRadii*position - localAARadius*normal; - } - } - } else { - // Vertex is outset from the base shape (and possibly with an additional AA outset later - // in device space). - localPos = (cornerRadii + strokeRadius) * (position + joinScale*position.yx); - } - - if (snapToCenter) { - // Center is already relative to true local coords, not the corner basis. - localPos = center.xy; - } else { - // Transform from corner basis to true local coords. - localPos -= cornerRadii; - localPos = float2(xs[cornerID], ys[cornerID]) + xAxis*localPos.x + yAxis*localPos.y; - } - - // Calculate edge distances and device space coordinate for the vertex - // TODO: Apply edge AA flags to these values to turn off AA when necessary. - edgeDistances = dy*(xs - localPos.x) - dx*(ys - localPos.y) + edgeBias; - - float3x3 localToDevice = float3x3(mat0, mat1, mat2); - // NOTE: This 3x3 inverse is different than just taking the 1st two columns of the 4x4 - // inverse of the original SkM44 local-to-device matrix. We could calculate the 3x3 inverse - // and upload it, but it does not seem to be a bottleneck and saves on bandwidth to - // calculate it here instead. - float3x3 deviceToLocal = inverse(localToDevice); - float3 devPos = localToDevice * localPos.xy1; - jacobian = float4(deviceToLocal[0].xy - deviceToLocal[0].z*localPos, - deviceToLocal[1].xy - deviceToLocal[1].z*localPos); - - if (deviceSpaceDistances) { - // Apply the Jacobian in the vertex shader so any quadrilateral normals do not have to - // be passed to the fragment shader. However, it's important to use the Jacobian at a - // vertex on the edge, not the current vertex's Jacobian. - float4 gx = -dy*(deviceToLocal[0].x - deviceToLocal[0].z*xs) + - dx*(deviceToLocal[0].y - deviceToLocal[0].z*ys); - float4 gy = -dy*(deviceToLocal[1].x - deviceToLocal[1].z*xs) + - dx*(deviceToLocal[1].y - deviceToLocal[1].z*ys); - // NOTE: The gradient is missing a W term so edgeDistances must still be multiplied by - // 1/w in the fragment shader. The same goes for the encoded coverage scale. - edgeDistances *= inversesqrt(gx*gx + gy*gy); - - // Bias non-AA edge distances by device W so its coverage contribution is >= 1.0 - edgeDistances += (1 - edgeAA)*abs(devPos.z); - - // Mixed edge AA shapes do not use subpixel scale+bias for coverage, since they tile - // to a large shape of unknown--but likely not subpixel--size. Triangles and quads do - // not use subpixel coverage since the scale+bias is not constant over the shape, but - // we can't evaluate per-fragment since we aren't passing down their arbitrary normals. - bool subpixelCoverage = edgeAA == float4(1.0) && - dot(abs(dx*dx.yzwx + dy*dy.yzwx), float4(1.0)) < kEpsilon; - if (subpixelCoverage) { - // Reconstructs the actual device-space width and height for all rectangle vertices. - float2 dim = edgeDistances.xy + edgeDistances.zw; - perPixelControl.y = 1.0 + min(min(dim.x, dim.y), abs(devPos.z)); - } else { - perPixelControl.y = 1.0 + abs(devPos.z); // standard 1px width pre W division. - } - } - - // Only outset for a vertex that is in front of the w=0 plane to avoid dealing with outset - // triangles rasterizing differently from the main triangles as w crosses 0. - if (normalScale > 0.0 && devPos.z > 0.0) { - // Note that when there's no perspective, the jacobian is equivalent to the normal - // matrix (inverse transpose), but produces correct results when there's perspective - // because it accounts for the position's influence on a line's projected direction. - float2x2 J = float2x2(jacobian); - - float2 edgeAANormal = float2(edgeAA[cornerID], edgeAA.yzwx[cornerID]) * normal; - float2 nx = cornerAspectRatio.x * edgeAANormal.x * perp(-yAxis) * J; - float2 ny = cornerAspectRatio.y * edgeAANormal.y * perp( xAxis) * J; - - bool isMidVertex = edgeAANormal.x != 0.0 && edgeAANormal.y != 0.0; - if (joinScale == kMiterScale && isMidVertex) { - // Produce a bisecting vector in device space. - nx = normalize(nx); - ny = normalize(ny); - if (dot(nx, ny) < -0.8) { - // Normals are in nearly opposite directions, so adjust to avoid float error. - float s = sign(cross_length_2d(nx, ny)); - nx = s*perp(nx); - ny = -s*perp(ny); - } - } - // Adding the normal components together directly results in what we'd have - // calculated if we'd just transformed 'normal' in one go, assuming they weren't - // normalized in the if-block above. If they were normalized, the sum equals the - // bisector between the original nx and ny. - // - // We multiply by W so that after perspective division the new point is offset by the - // now-unit normal. - // NOTE: (nx + ny) can become the zero vector if the device outset is for an edge - // marked as non-AA. In this case normalize() could produce the zero vector or NaN. - // Until a counter-example is found, GPUs seem to discard triangles with NaN vertices, - // which has the same effect as outsetting by the zero vector with this mesh, so we - // don't bother guarding the normalize() (yet). - devPos.xy += devPos.z * normalize(nx + ny); - - // By construction these points are 1px away from the outer edge in device space. - if (deviceSpaceDistances) { - // Apply directly to edgeDistances to save work per pixel later on. - edgeDistances -= devPos.z; - } else { - // Otherwise store separately so edgeDistances can be used to reconstruct corner pos - perPixelControl.y = -devPos.z; - } - } else if (!deviceSpaceDistances) { - // Triangles are within the original shape so there's no additional outsetting to - // take into account for coverage calculations. - perPixelControl.y = 0.0; - } - - if (centerWeight != 0.0) { - // A positive value signals that a pixel is trivially full coverage. - perPixelControl.x = 1.0; - } else { - // A negative value signals bidirectional coverage, and a zero value signals a solid - // interior with per-pixel coverage. - perPixelControl.x = bidirectionalCoverage ? -1.0 : 0.0; - } - - // The fragment shader operates in a canonical basis (x-axis = (1,0), y-axis = (0,1)). For - // stroked lines, incorporate their local orientation into the Jacobian to preserve this. - if (strokedLine) { - // The updated Jacobian is J' = B^-1 * J, where B is float2x2(xAxis, yAxis) for the - // top-left corner (so that B^-1 is constant over the whole shape). Since it's a line - // the basis was constructed to be orthonormal, det(B) = 1 and B^-1 is trivial. - // NOTE: float2x2 is column-major. - jacobian = float4(float2x2(dy[0], -dy[1], -dx[0], dx[1]) * float2x2(jacobian)); - } - - // Write out final results - stepLocalCoords = localPos; - float4 devPosition = float4(devPos.xy, devPos.z*depth, devPos.z); - )"; + // Returns the body of a vertex function, which must define a float4 devPosition variable and + // must write to an already-defined float2 stepLocalCoords variable. + return "float4 devPosition = analytic_rrect_vertex_fn(" + // Vertex Attributes + "position, normal, normalScale, centerWeight, " + // Instance Attributes + "xRadiiOrFlags, radiiOrQuadXs, ltrbOrQuadYs, center, depth, " + "float3x3(mat0, mat1, mat2), " + // Varyings + "jacobian, edgeDistances, xRadii, yRadii, strokeParams, perPixelControl, " + // Render Step + "stepLocalCoords);\n"; } const char* AnalyticRRectRenderStep::fragmentCoverageSkSL() const { - // TODO: Further modularize this - return R"( - if (perPixelControl.x > 0.0) { - // A trivially solid interior pixel, either from a filled rect or round rect, or a - // stroke with sufficiently large width that the interior completely overlaps itself. - outputCoverage = half4(1.0); - } else if (perPixelControl.y > 1.0) { - // This represents a filled rectangle or quadrilateral, where the distances have already - // been converted to device space. Mitered strokes cannot use this optimization because - // their scale and bias is not uniform over the shape; Rounded shapes cannot use this - // because they rely on the edge distances being in local space to reconstruct the - // per-corner positions for the elliptical implicit functions. - float2 outerDist = min(edgeDistances.xy, edgeDistances.zw); - float c = min(outerDist.x, outerDist.y) * sk_FragCoord.w; - float scale = (perPixelControl.y - 1.0) * sk_FragCoord.w; - float bias = coverage_bias(scale); - outputCoverage = half4(clamp(scale * (c + bias), 0.0, 1.0)); - } else { - // Compute per-pixel coverage, mixing four outer edge distances, possibly four inner - // edge distances, and per-corner elliptical distances into a final coverage value. - // The Jacobian needs to be multiplied by W, but sk_FragCoord.w stores 1/w. - float2x2 J = float2x2(jacobian) / sk_FragCoord.w; - - float2 invGradLen = float2(inverse_grad_len(float2(1.0, 0.0), J), - inverse_grad_len(float2(0.0, 1.0), J)); - float2 outerDist = invGradLen * (strokeParams.x + min(edgeDistances.xy, - edgeDistances.zw)); - - // d.x tracks minimum outer distance (pre scale-and-biasing to a coverage value). - // d.y tracks negative maximum inner distance (so min() over c accumulates min and outer - // and max inner simultaneously).) - float2 d = float2(min(outerDist.x, outerDist.y), -1.0); - float scale, bias; - - // Check for bidirectional coverage, which is is marked as a -1 from the vertex shader. - // We don't just check for < 0 since extrapolated fill triangle samples can have small - // negative values. - if (perPixelControl.x > -0.95) { - // A solid interior, so update scale and bias based on full width and height - float2 dim = invGradLen * (edgeDistances.xy + edgeDistances.zw + 2*strokeParams.xx); - scale = min(min(dim.x, dim.y), 1.0); - bias = coverage_bias(scale); - // Since we leave d.y = -1.0, no inner curve coverage will adjust it closer to 0, - // so 'finalCoverage' is based solely on outer edges and curves. - } else { - // Bidirectional coverage, so we modify c.y to hold the negative of the maximum - // interior coverage, and update scale and bias based on stroke width. - float2 strokeWidth = 2.0 * strokeParams.x * invGradLen; - float2 innerDist = strokeWidth - outerDist; - - d.y = -max(innerDist.x, innerDist.y); - if (strokeParams.x > 0.0) { - float strokeDim = min(strokeWidth.x, strokeWidth.y); - if (innerDist.y >= -0.5 && strokeWidth.y > strokeDim) { - strokeDim = strokeWidth.y; - } - if (innerDist.x >= -0.5 && strokeWidth.x > strokeDim) { - strokeDim = strokeWidth.x; - } - scale = min(strokeDim, 1.0); - bias = coverage_bias(scale); - } else { - // A hairline, so scale and bias should both be 1 - scale = bias = 1.0; - } - } - - // Check all corners, although most pixels should only be influenced by 1. - corner_distances(d, J, strokeParams, edgeDistances, xRadii, yRadii); - - float outsetDist = min(perPixelControl.y, 0.0) * sk_FragCoord.w; - float finalCoverage = scale * (min(d.x + outsetDist, -d.y) + bias); + // The returned SkSL must write its coverage into a 'half4 outputCoverage' variable (defined in + // the calling code) with the actual coverage splatted out into all four channels. + return "outputCoverage = analytic_rrect_coverage_fn(sk_FragCoord, " + "jacobian, " + "edgeDistances, " + "xRadii, " + "yRadii, " + "strokeParams, " + "perPixelControl);"; +} - outputCoverage = half4(clamp(finalCoverage, 0.0, 1.0)); - } - )"; +float AnalyticRRectRenderStep::boundsOutset(const Transform& localToDevice, + const Rect& bounds) const { + return local_aa_radius(localToDevice, bounds); } void AnalyticRRectRenderStep::writeVertices(DrawWriter* writer, diff --git a/src/gpu/graphite/render/AnalyticRRectRenderStep.h b/src/gpu/graphite/render/AnalyticRRectRenderStep.h index d258b9fb7a9c..9ab7f38ea3c7 100644 --- a/src/gpu/graphite/render/AnalyticRRectRenderStep.h +++ b/src/gpu/graphite/render/AnalyticRRectRenderStep.h @@ -23,6 +23,8 @@ class AnalyticRRectRenderStep final : public RenderStep { std::string vertexSkSL() const override; const char* fragmentCoverageSkSL() const override; + float boundsOutset(const Transform& localToDevice, const Rect& bounds) const override; + void writeVertices(DrawWriter*, const DrawParams&, int ssboIndex) const override; void writeUniformsAndTextures(const DrawParams&, PipelineDataGatherer*) const override; diff --git a/src/gpu/graphite/render/AtlasShapeRenderStep.cpp b/src/gpu/graphite/render/AtlasShapeRenderStep.cpp new file mode 100644 index 000000000000..52aae8762b05 --- /dev/null +++ b/src/gpu/graphite/render/AtlasShapeRenderStep.cpp @@ -0,0 +1,136 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ +#include "src/gpu/graphite/render/AtlasShapeRenderStep.h" + +#include "src/gpu/graphite/ContextUtils.h" +#include "src/gpu/graphite/DrawParams.h" +#include "src/gpu/graphite/DrawWriter.h" +#include "src/gpu/graphite/PathAtlas.h" +#include "src/gpu/graphite/geom/AtlasShape.h" +#include "src/gpu/graphite/render/CommonDepthStencilSettings.h" + +namespace skgpu::graphite { + +AtlasShapeRenderStep::AtlasShapeRenderStep() + : RenderStep("AtlasShapeRenderStep", + "", + Flags::kPerformsShading | Flags::kHasTextures | Flags::kEmitsCoverage, + /*uniforms=*/{{"atlasSizeInv", SkSLType::kFloat2}, + {"isInverted", SkSLType::kInt}}, + PrimitiveType::kTriangleStrip, + kDirectDepthGEqualPass, + /*vertexAttrs=*/{}, + /*instanceAttrs=*/ + {{"drawBounds" , VertexAttribType::kFloat4 , SkSLType::kFloat4}, // ltrb + {"deviceOrigin", VertexAttribType::kInt2, SkSLType::kInt2}, + {"uvOrigin" , VertexAttribType::kUShort2, SkSLType::kUShort2}, + {"maskSize" , VertexAttribType::kUShort2, SkSLType::kUShort2}, + {"depth" , VertexAttribType::kFloat, SkSLType::kFloat}, + {"ssboIndex" , VertexAttribType::kInt , SkSLType::kInt}, + {"mat0", VertexAttribType::kFloat3, SkSLType::kFloat3}, + {"mat1", VertexAttribType::kFloat3, SkSLType::kFloat3}, + {"mat2", VertexAttribType::kFloat3, SkSLType::kFloat3}}, + /*varyings=*/ + {// `maskBounds` are the atlas-relative bounds of the coverage mask. + // `textureCoords` are the atlas-relative UV coordinates of the draw, which + // can spill beyond `maskBounds` for inverse fills. + // TODO: maskBounds is constant for all fragments for a given instance, + // could we store them in the draw's SSBO? + {"maskBounds" , SkSLType::kFloat4}, + {"textureCoords", SkSLType::kFloat2}}) {} + +std::string AtlasShapeRenderStep::vertexSkSL() const { + // Returns the body of a vertex function, which must define a float4 devPosition variable and + // must write to an already-defined float2 stepLocalCoords variable. + return "float4 devPosition = atlas_shape_vertex_fn(" + "float2(sk_VertexID >> 1, sk_VertexID & 1), atlasSizeInv, " + "drawBounds, float2(deviceOrigin), float2(uvOrigin), " + "float2(maskSize), depth, float3x3(mat0, mat1, mat2), " + "maskBounds, textureCoords, stepLocalCoords);\n"; +} + +std::string AtlasShapeRenderStep::texturesAndSamplersSkSL( + const ResourceBindingRequirements& bindingReqs, int* nextBindingIndex) const { + return EmitSamplerLayout(bindingReqs, nextBindingIndex) + " uniform sampler2D pathAtlas;"; +} + +const char* AtlasShapeRenderStep::fragmentCoverageSkSL() const { + return R"( + half c = sample(pathAtlas, clamp(textureCoords, maskBounds.LT, maskBounds.RB)).r; + outputCoverage = half4(isInverted == 1 ? (1 - c) : c); + )"; +} + +float AtlasShapeRenderStep::boundsOutset(const Transform& localToDevice, const Rect&) const { + // Always incorporate a 1-pixel wide border to the (device space) mask for AA. AtlasShapes are + // expected to be in device space but only after the clip stack has been applied to the + // AtlasShape's originating geometry. Hence `localToDevice` is not guaranteed to be identity + // `boundsOutset` needs to return a local coordinate outset for the shape which will be applied + // to its local-coordinate bounds before it gets transformed to device space. + // + // TODO(b/238770428): This won't produce an accurate result if the transform has perspective as + // the scale is not uniform across the shape. Reconsider what to do here when this RenderStep + // supports perspective. + return 1.0 / localToDevice.maxScaleFactor(); +} + +void AtlasShapeRenderStep::writeVertices(DrawWriter* dw, + const DrawParams& params, + int ssboIndex) const { + const AtlasShape& atlasShape = params.geometry().atlasShape(); + + // A quad is a 4-vertex instance. The coordinates are derived from the vertex IDs. + DrawWriter::Instances instances(*dw, {}, {}, 4); + + skvx::half2 maskSize, uvOrigin; + skvx::int2 deviceOrigin; + if (params.clip().transformedShapeBounds().isEmptyNegativeOrNaN()) { + // If the mask shape is clipped out then this must be an inverse fill. There is no mask to + // sample but we still need to paint the fill region that excludes the mask shape. Signal + // this by setting the mask size to 0. + SkASSERT(atlasShape.inverted()); + maskSize = uvOrigin = 0; + deviceOrigin = 0; + } else { + // `maskSize` and `deviceOrigin` correspond to the mask bounds (transformed shape bounds + // expanded by a 1-pixel border for AA). `uvOrigin` is positioned to include the additional + // 1-pixel border between atlas entries (which corresponds to their clip bounds and should + // contain 0). + maskSize = atlasShape.maskSize(); + deviceOrigin = atlasShape.deviceOrigin(); + uvOrigin = atlasShape.atlasOrigin(); + } + + const SkM44& m = atlasShape.deviceToLocal(); + instances.append(1) << params.clip().drawBounds().ltrb() // drawBounds + << deviceOrigin << uvOrigin << maskSize + << params.order().depthAsFloat() << ssboIndex + << m.rc(0,0) << m.rc(1,0) << m.rc(3,0) // mat0 + << m.rc(0,1) << m.rc(1,1) << m.rc(3,1) // mat1 + << m.rc(0,3) << m.rc(1,3) << m.rc(3,3); // mat2 +} + +void AtlasShapeRenderStep::writeUniformsAndTextures(const DrawParams& params, + PipelineDataGatherer* gatherer) const { + SkDEBUGCODE(UniformExpectationsValidator uev(gatherer, this->uniforms());) + + const AtlasShape& atlasShape = params.geometry().atlasShape(); + const TextureProxy* proxy = atlasShape.atlas()->texture(); + SkASSERT(proxy); + + // write uniforms + SkV2 atlasSizeInv = {1.f / proxy->dimensions().width(), 1.f / proxy->dimensions().height()}; + gatherer->write(atlasSizeInv); + gatherer->write(int(atlasShape.inverted())); + + // write textures and samplers + const SkSamplingOptions kSamplingOptions(SkFilterMode::kNearest); + constexpr SkTileMode kTileModes[2] = {SkTileMode::kClamp, SkTileMode::kClamp}; + gatherer->add(kSamplingOptions, kTileModes, sk_ref_sp(proxy)); +} + +} // namespace skgpu::graphite diff --git a/src/gpu/graphite/render/AtlasShapeRenderStep.h b/src/gpu/graphite/render/AtlasShapeRenderStep.h new file mode 100644 index 000000000000..190edc3ab4cd --- /dev/null +++ b/src/gpu/graphite/render/AtlasShapeRenderStep.h @@ -0,0 +1,33 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef skgpu_graphite_render_AtlasShapeRenderStep_DEFINED +#define skgpu_graphite_render_AtlasShapeRenderStep_DEFINED + +#include "src/gpu/graphite/Renderer.h" + +namespace skgpu::graphite { + +class AtlasShapeRenderStep final : public RenderStep { +public: + AtlasShapeRenderStep(); + ~AtlasShapeRenderStep() override = default; + + std::string vertexSkSL() const override; + std::string texturesAndSamplersSkSL(const ResourceBindingRequirements&, + int* nextBindingIndex) const override; + const char* fragmentCoverageSkSL() const override; + + float boundsOutset(const Transform& localToDevice, const Rect& bounds) const override; + + void writeVertices(DrawWriter*, const DrawParams&, int ssboIndex) const override; + void writeUniformsAndTextures(const DrawParams&, PipelineDataGatherer*) const override; +}; + +} // namespace skgpu::graphite + +#endif // skgpu_graphite_render_AtlasShapeRenderStep_DEFINED diff --git a/src/gpu/graphite/render/BitmapTextRenderStep.cpp b/src/gpu/graphite/render/BitmapTextRenderStep.cpp index 4209950e6779..fc5dc1928a58 100644 --- a/src/gpu/graphite/render/BitmapTextRenderStep.cpp +++ b/src/gpu/graphite/render/BitmapTextRenderStep.cpp @@ -9,15 +9,17 @@ #include "include/core/SkM44.h" #include "include/gpu/graphite/Recorder.h" +#include "src/gpu/graphite/AtlasProvider.h" #include "src/gpu/graphite/ContextUtils.h" #include "src/gpu/graphite/DrawParams.h" #include "src/gpu/graphite/DrawWriter.h" #include "src/gpu/graphite/PipelineData.h" #include "src/gpu/graphite/RecorderPriv.h" #include "src/gpu/graphite/render/CommonDepthStencilSettings.h" -#include "src/gpu/graphite/text/AtlasManager.h" +#include "src/gpu/graphite/text/TextAtlasManager.h" #include "src/sksl/SkSLString.h" #include "src/text/gpu/SubRunContainer.h" +#include "src/text/gpu/VertexFiller.h" using AtlasSubRun = sktext::gpu::AtlasSubRun; @@ -34,8 +36,9 @@ BitmapTextRenderStep::BitmapTextRenderStep() : RenderStep("BitmapTextRenderStep", "", Flags::kPerformsShading | Flags::kHasTextures | Flags::kEmitsCoverage, - /*uniforms=*/{{"deviceMatrix", SkSLType::kFloat4x4}, - {"atlasSizeInv", SkSLType::kFloat2}}, + /*uniforms=*/{{"subRunDeviceMatrix", SkSLType::kFloat4x4}, + {"deviceToLocal" , SkSLType::kFloat4x4}, + {"atlasSizeInv" , SkSLType::kFloat2}}, PrimitiveType::kTriangleStrip, kDirectDepthGEqualPass, /*vertexAttrs=*/ {}, @@ -59,8 +62,16 @@ std::string BitmapTextRenderStep::vertexSkSL() const { "float2 baseCoords = float2(float(sk_VertexID >> 1), float(sk_VertexID & 1));" "baseCoords.xy *= float2(size);" - "stepLocalCoords = strikeToSourceScale*baseCoords + float2(xyPos);" - "float4 position = deviceMatrix*float4(stepLocalCoords, 0, 1);" + // Sub runs have a decomposed transform and are sometimes already transformed into device + // space, in which `subRunCoords` represents the bounds projected to device space without + // the local-to-device translation and `subRunDeviceMatrix` contains the translation. + "float2 subRunCoords = strikeToSourceScale * baseCoords + float2(xyPos);" + "float4 position = subRunDeviceMatrix * float4(subRunCoords, 0, 1);" + + // Calculate the local coords used for shading. + // TODO(b/246963258): This is incorrect if the transform has perspective, which would + // require a division + a valid z coordinate (which is currently set to 0). + "stepLocalCoords = (deviceToLocal * position).xy;" "float2 unormTexCoords = baseCoords + float2(uvPos);" "textureCoords = unormTexCoords * atlasSizeInv;" @@ -113,8 +124,13 @@ void BitmapTextRenderStep::writeVertices(DrawWriter* dw, int ssboIndex) const { const SubRunData& subRunData = params.geometry().subRunData(); - subRunData.subRun()->fillInstanceData(dw, subRunData.startGlyphIndex(), subRunData.glyphCount(), - ssboIndex, params.order().depthAsFloat()); + subRunData.subRun()->vertexFiller().fillInstanceData(dw, + subRunData.startGlyphIndex(), + subRunData.glyphCount(), + subRunData.subRun()->instanceFlags(), + ssboIndex, + subRunData.subRun()->glyphs(), + params.order().depthAsFloat()); } void BitmapTextRenderStep::writeUniformsAndTextures(const DrawParams& params, @@ -125,12 +141,13 @@ void BitmapTextRenderStep::writeUniformsAndTextures(const DrawParams& params, unsigned int numProxies; Recorder* recorder = subRunData.recorder(); const sk_sp* proxies = - recorder->priv().atlasManager()->getProxies(subRunData.subRun()->maskFormat(), - &numProxies); + recorder->priv().atlasProvider()->textAtlasManager()->getProxies( + subRunData.subRun()->maskFormat(), &numProxies); SkASSERT(proxies && numProxies > 0); // write uniforms - gatherer->write(params.transform()); + gatherer->write(params.transform()); // subRunDeviceMatrix + gatherer->write(subRunData.deviceToLocal()); SkV2 atlasDimensionsInverse = {1.f/proxies[0]->dimensions().width(), 1.f/proxies[0]->dimensions().height()}; gatherer->write(atlasDimensionsInverse); diff --git a/src/gpu/graphite/render/CoverBoundsRenderStep.cpp b/src/gpu/graphite/render/CoverBoundsRenderStep.cpp index ebf0466947ad..a3a3429948cf 100644 --- a/src/gpu/graphite/render/CoverBoundsRenderStep.cpp +++ b/src/gpu/graphite/render/CoverBoundsRenderStep.cpp @@ -35,27 +35,12 @@ CoverBoundsRenderStep::CoverBoundsRenderStep(bool inverseFill) CoverBoundsRenderStep::~CoverBoundsRenderStep() {} std::string CoverBoundsRenderStep::vertexSkSL() const { - return R"( - float3x3 matrix = float3x3(mat0, mat1, mat2); - float2 corner = float2(float(sk_VertexID / 2), float(sk_VertexID % 2)); - - float4 devPosition; - if (bounds.L <= bounds.R && bounds.T <= bounds.B) { - // A regular fill - corner = (1.0 - corner) * bounds.LT + corner * bounds.RB; - float3 devCorner = matrix * corner.xy1; - devPosition = float4(devCorner.xy, depth, devCorner.z); - stepLocalCoords = corner; - } else { - // An inverse fill - corner = corner * bounds.LT + (1.0 - corner) * bounds.RB; - devPosition = float4(corner, depth, 1.0); - // TODO: Support float3 local coordinates if the matrix has perspective so that W - // is interpolated correctly to the fragment shader. - float3 localCoords = matrix * corner.xy1; - stepLocalCoords = localCoords.xy / localCoords.z; - } - )"; + // Returns the body of a vertex function, which must define a float4 devPosition variable and + // must write to an already-defined float2 stepLocalCoords variable. + return "float4 devPosition = cover_bounds_vertex_fn(" + "float2(sk_VertexID / 2, sk_VertexID % 2), " + "bounds, depth, float3x3(mat0, mat1, mat2), " + "stepLocalCoords);\n"; } void CoverBoundsRenderStep::writeVertices(DrawWriter* writer, diff --git a/src/gpu/graphite/render/GraphiteVertexFiller.cpp b/src/gpu/graphite/render/GraphiteVertexFiller.cpp new file mode 100644 index 000000000000..8fcc2e25cbef --- /dev/null +++ b/src/gpu/graphite/render/GraphiteVertexFiller.cpp @@ -0,0 +1,90 @@ +/* +* Copyright 2023 Google LLC +* +* Use of this source code is governed by a BSD-style license that can be +* found in the LICENSE file. +*/ +#include "src/gpu/AtlasTypes.h" +#include "src/text/gpu/VertexFiller.h" +#include "src/gpu/graphite/Device.h" +#include "src/base/SkZip.h" +#include "src/gpu/graphite/DrawWriter.h" +#include "src/gpu/graphite/Renderer.h" +#include "src/gpu/graphite/RendererProvider.h" +#include "src/text/gpu/Glyph.h" +#include "src/text/gpu/SubRunAllocator.h" +#include "src/text/gpu/SubRunContainer.h" + +namespace sktext::gpu { + +struct AtlasPt { + uint16_t u; + uint16_t v; +}; + +void VertexFiller::fillInstanceData(skgpu::graphite::DrawWriter* dw, + int offset, int count, + unsigned short flags, + int ssboIndex, + SkSpan glyphs, + SkScalar depth) const { + auto quadData = [&]() { + return SkMakeZip(glyphs.subspan(offset, count), + fLeftTop.subspan(offset, count)); + }; + + skgpu::graphite::DrawWriter::Instances instances{*dw, {}, {}, 4}; + instances.reserve(count); + // Need to send width, height, uvPos, xyPos, and strikeToSourceScale + // pre-transform coords = (s*w*b_x + t_x, s*h*b_y + t_y) + // where (b_x, b_y) are the vertexID coords + for (auto [glyph, leftTop]: quadData()) { + auto[al, at, ar, ab] = glyph->fAtlasLocator.getUVs(); + instances.append(1) << AtlasPt{uint16_t(ar-al), uint16_t(ab-at)} + << AtlasPt{uint16_t(al & 0x1fff), at} + << leftTop << /*index=*/uint16_t(al >> 13) << flags + << 1.0f + << depth << ssboIndex; + } +} + +using Rect = skgpu::graphite::Rect; +using Transform = skgpu::graphite::Transform; + +std::tuple VertexFiller::boundsAndDeviceMatrix(const Transform& localToDevice, + SkPoint drawOrigin) const { + // The baked-in matrix differs from the current localToDevice by a translation if the + // upper 2x2 remains the same, and there's no perspective. Since there's no projection, + // Z is irrelevant, so it's okay that fCreationMatrix is an SkMatrix and has + // discarded the 3rd row/col, and can ignore those values in localToDevice. + const SkM44& positionMatrix = localToDevice.matrix(); + const bool compatibleMatrix = positionMatrix.rc(0,0) == fCreationMatrix.rc(0, 0) && + positionMatrix.rc(0,1) == fCreationMatrix.rc(0, 1) && + positionMatrix.rc(1,0) == fCreationMatrix.rc(1, 0) && + positionMatrix.rc(1,1) == fCreationMatrix.rc(1, 1) && + localToDevice.type() != Transform::Type::kProjection && + !fCreationMatrix.hasPerspective(); + + if (compatibleMatrix) { + const SkV4 mappedOrigin = positionMatrix.map(drawOrigin.x(), drawOrigin.y(), 0.f, 1.f); + const SkV2 offset = {mappedOrigin.x - fCreationMatrix.getTranslateX(), + mappedOrigin.y - fCreationMatrix.getTranslateY()}; + if (SkScalarIsInt(offset.x) && SkScalarIsInt(offset.y)) { + // The offset is an integer (but make sure), which means the generated mask can be + // accessed without changing how texels would be sampled. + return {Rect(fCreationBounds), + Transform(SkM44::Translate(SkScalarRoundToInt(offset.x), + SkScalarRoundToInt(offset.y)))}; + } + } + + // Otherwise compute the relative transformation from fCreationMatrix to + // localToDevice, with the drawOrigin applied. If fCreationMatrix or the + // concatenation is not invertible the returned Transform is marked invalid and the draw + // will be automatically dropped. + const SkMatrix viewDifference = this->viewDifference( + localToDevice.preTranslate(drawOrigin.x(), drawOrigin.y())); + return {Rect(fCreationBounds), Transform(SkM44(viewDifference))}; +} + +} // namespace sktext::gpu diff --git a/src/gpu/graphite/render/SDFTextRenderStep.cpp b/src/gpu/graphite/render/SDFTextRenderStep.cpp index 39fea9f6c180..ba87852fb3b5 100644 --- a/src/gpu/graphite/render/SDFTextRenderStep.cpp +++ b/src/gpu/graphite/render/SDFTextRenderStep.cpp @@ -9,15 +9,17 @@ #include "include/core/SkM44.h" #include "include/gpu/graphite/Recorder.h" +#include "src/gpu/graphite/AtlasProvider.h" #include "src/gpu/graphite/ContextUtils.h" #include "src/gpu/graphite/DrawParams.h" #include "src/gpu/graphite/DrawWriter.h" #include "src/gpu/graphite/PipelineData.h" #include "src/gpu/graphite/RecorderPriv.h" #include "src/gpu/graphite/render/CommonDepthStencilSettings.h" -#include "src/gpu/graphite/text/AtlasManager.h" +#include "src/gpu/graphite/text/TextAtlasManager.h" #include "src/sksl/SkSLString.h" #include "src/text/gpu/SubRunContainer.h" +#include "src/text/gpu/VertexFiller.h" namespace skgpu::graphite { @@ -32,7 +34,8 @@ SDFTextRenderStep::SDFTextRenderStep(bool isA8) : RenderStep("SDFTextRenderStep", isA8 ? "A8" : "565", Flags::kPerformsShading | Flags::kHasTextures | Flags::kEmitsCoverage, - /*uniforms=*/{{"deviceMatrix", SkSLType::kFloat4x4}, + /*uniforms=*/{{"subRunDeviceMatrix", SkSLType::kFloat4x4}, + {"deviceToLocal", SkSLType::kFloat4x4}, {"atlasSizeInv", SkSLType::kFloat2}, {"distAdjust", SkSLType::kFloat}}, PrimitiveType::kTriangleStrip, @@ -60,8 +63,16 @@ std::string SDFTextRenderStep::vertexSkSL() const { "float2 baseCoords = float2(float(sk_VertexID >> 1), float(sk_VertexID & 1));" "baseCoords.xy *= float2(size);" - "stepLocalCoords = strikeToSourceScale*baseCoords + float2(xyPos);" - "float4 position = deviceMatrix*float4(stepLocalCoords, 0, 1);" + // Sub runs have a decomposed transform and are sometimes already transformed into device + // space, in which `subRunCoords` represents the bounds projected to device space without + // the local-to-device translation and `subRunDeviceMatrix` contains the translation. + "float2 subRunCoords = strikeToSourceScale * baseCoords + float2(xyPos);" + "float4 position = subRunDeviceMatrix * float4(subRunCoords, 0, 1);" + + // Calculate the local coords used for shading. + // TODO(b/246963258): This is incorrect if the transform has perspective, which would + // require a division + a valid z coordinate (which is currently set to 0). + "stepLocalCoords = (deviceToLocal * position).xy;" "unormTexCoords = baseCoords + float2(uvPos);" "textureCoords = unormTexCoords * atlasSizeInv;" @@ -143,8 +154,13 @@ void SDFTextRenderStep::writeVertices(DrawWriter* dw, const DrawParams& params, int ssboIndex) const { const SubRunData& subRunData = params.geometry().subRunData(); - subRunData.subRun()->fillInstanceData(dw, subRunData.startGlyphIndex(), subRunData.glyphCount(), - ssboIndex, params.order().depthAsFloat()); + subRunData.subRun()->vertexFiller().fillInstanceData(dw, + subRunData.startGlyphIndex(), + subRunData.glyphCount(), + subRunData.subRun()->instanceFlags(), + ssboIndex, + subRunData.subRun()->glyphs(), + params.order().depthAsFloat()); } void SDFTextRenderStep::writeUniformsAndTextures(const DrawParams& params, @@ -155,12 +171,13 @@ void SDFTextRenderStep::writeUniformsAndTextures(const DrawParams& params, unsigned int numProxies; Recorder* recorder = subRunData.recorder(); const sk_sp* proxies = - recorder->priv().atlasManager()->getProxies(subRunData.subRun()->maskFormat(), - &numProxies); + recorder->priv().atlasProvider()->textAtlasManager()->getProxies( + subRunData.subRun()->maskFormat(), &numProxies); SkASSERT(proxies && numProxies > 0); // write uniforms - gatherer->write(params.transform()); + gatherer->write(params.transform()); // subRunDeviceMatrix + gatherer->write(subRunData.deviceToLocal()); SkV2 atlasDimensionsInverse = {1.f/proxies[0]->dimensions().width(), 1.f/proxies[0]->dimensions().height()}; gatherer->write(atlasDimensionsInverse); diff --git a/src/gpu/graphite/text/AtlasManager.cpp b/src/gpu/graphite/text/TextAtlasManager.cpp similarity index 91% rename from src/gpu/graphite/text/AtlasManager.cpp rename to src/gpu/graphite/text/TextAtlasManager.cpp index 27f7825b95f5..ca6a0e5db6f7 100644 --- a/src/gpu/graphite/text/AtlasManager.cpp +++ b/src/gpu/graphite/text/TextAtlasManager.cpp @@ -5,13 +5,14 @@ * found in the LICENSE file. */ -#include "src/gpu/graphite/text/AtlasManager.h" +#include "src/gpu/graphite/text/TextAtlasManager.h" #include "include/core/SkColorSpace.h" #include "include/gpu/graphite/Recorder.h" #include "src/base/SkAutoMalloc.h" #include "src/codec/SkMasks.h" #include "src/core/SkDistanceFieldGen.h" +#include "src/gpu/graphite/AtlasProvider.h" #include "src/gpu/graphite/DrawAtlas.h" #include "src/gpu/graphite/RecorderPriv.h" #include "src/gpu/graphite/TextureProxy.h" @@ -24,7 +25,7 @@ using Glyph = sktext::gpu::Glyph; namespace skgpu::graphite { -AtlasManager::AtlasManager(Recorder* recorder) +TextAtlasManager::TextAtlasManager(Recorder* recorder) : fRecorder(recorder) , fSupportBilerpAtlas{recorder->priv().caps()->supportBilerpFromGlyphAtlas()} , fAtlasConfig{recorder->priv().caps()->maxTextureSize(), @@ -33,21 +34,21 @@ AtlasManager::AtlasManager(Recorder* recorder) // multitexturing supported only if range can represent the index + texcoords fully !(recorder->priv().caps()->shaderCaps()->fFloatIs32Bits || recorder->priv().caps()->shaderCaps()->fIntegerSupport)) { - fAllowMultitexturing = DrawAtlas::AllowMultitexturing::kNo; + fAllowMultitexturing = DrawAtlas::AllowMultitexturing::kNo; } else { - fAllowMultitexturing = DrawAtlas::AllowMultitexturing::kYes; + fAllowMultitexturing = DrawAtlas::AllowMultitexturing::kYes; } } -AtlasManager::~AtlasManager() = default; +TextAtlasManager::~TextAtlasManager() = default; -void AtlasManager::freeAll() { +void TextAtlasManager::freeAll() { for (int i = 0; i < kMaskFormatCount; ++i) { fAtlases[i] = nullptr; } } -bool AtlasManager::hasGlyph(MaskFormat format, Glyph* glyph) { +bool TextAtlasManager::hasGlyph(MaskFormat format, Glyph* glyph) { SkASSERT(glyph); return this->getAtlas(format)->hasID(glyph->fAtlasLocator.plotLocator()); } @@ -149,7 +150,7 @@ static void get_packed_glyph_image( } } -MaskFormat AtlasManager::resolveMaskFormat(MaskFormat format) const { +MaskFormat TextAtlasManager::resolveMaskFormat(MaskFormat format) const { if (MaskFormat::kA565 == format && !fRecorder->priv().caps()->getDefaultSampledTextureInfo(kRGB_565_SkColorType, /*mipmapped=*/Mipmapped::kNo, @@ -162,9 +163,9 @@ MaskFormat AtlasManager::resolveMaskFormat(MaskFormat format) const { // Returns kSucceeded if glyph successfully added to texture atlas, kTryAgain if a RenderPassTask // needs to be snapped before adding the glyph, and kError if it can't be added at all. -DrawAtlas::ErrorCode AtlasManager::addGlyphToAtlas(const SkGlyph& skGlyph, - Glyph* glyph, - int srcPadding) { +DrawAtlas::ErrorCode TextAtlasManager::addGlyphToAtlas(const SkGlyph& skGlyph, + Glyph* glyph, + int srcPadding) { #if !defined(SK_DISABLE_SDF_TEXT) SkASSERT(0 <= srcPadding && srcPadding <= SK_DistanceFieldInset); #else @@ -239,7 +240,7 @@ DrawAtlas::ErrorCode AtlasManager::addGlyphToAtlas(const SkGlyph& skGlyph, return errorCode; } -bool AtlasManager::recordUploads(UploadList* ul, bool useCachedUploads) { +bool TextAtlasManager::recordUploads(UploadList* ul, bool useCachedUploads) { for (int i = 0; i < skgpu::kMaskFormatCount; i++) { if (fAtlases[i] && !fAtlases[i]->recordUploads(ul, fRecorder, useCachedUploads)) { return false; @@ -250,16 +251,17 @@ bool AtlasManager::recordUploads(UploadList* ul, bool useCachedUploads) { return true; } -void AtlasManager::addGlyphToBulkAndSetUseToken(BulkUsePlotUpdater* updater, - MaskFormat format, Glyph* glyph, - AtlasToken token) { +void TextAtlasManager::addGlyphToBulkAndSetUseToken(BulkUsePlotUpdater* updater, + MaskFormat format, + Glyph* glyph, + AtlasToken token) { SkASSERT(glyph); if (updater->add(glyph->fAtlasLocator)) { this->getAtlas(format)->setLastUseToken(glyph->fAtlasLocator, token); } } -void AtlasManager::setAtlasDimensionsToMinimum_ForTesting() { +void TextAtlasManager::setAtlasDimensionsToMinimum_ForTesting() { // Delete any old atlases. // This should be safe to do as long as we are not in the middle of a flush. for (int i = 0; i < skgpu::kMaskFormatCount; i++) { @@ -270,7 +272,7 @@ void AtlasManager::setAtlasDimensionsToMinimum_ForTesting() { new (&fAtlasConfig) DrawAtlasConfig{2048, 0}; } -bool AtlasManager::initAtlas(MaskFormat format) { +bool TextAtlasManager::initAtlas(MaskFormat format) { int index = MaskFormatToAtlasIndex(format); if (fAtlases[index] == nullptr) { SkColorType colorType = MaskFormatToColorType(format); @@ -304,7 +306,7 @@ std::tuple GlyphVector::regenerateAtlasForGraphite(int begin, skgpu::MaskFormat maskFormat, int srcPadding, skgpu::graphite::Recorder* recorder) { - auto atlasManager = recorder->priv().atlasManager(); + auto atlasManager = recorder->priv().atlasProvider()->textAtlasManager(); auto tokenTracker = recorder->priv().tokenTracker(); // TODO: this is not a great place for this -- need a better way to init atlases when needed diff --git a/src/gpu/graphite/text/AtlasManager.h b/src/gpu/graphite/text/TextAtlasManager.h similarity index 91% rename from src/gpu/graphite/text/AtlasManager.h rename to src/gpu/graphite/text/TextAtlasManager.h index bff71fd33edd..7c2a2a278cdc 100644 --- a/src/gpu/graphite/text/AtlasManager.h +++ b/src/gpu/graphite/text/TextAtlasManager.h @@ -5,8 +5,8 @@ * found in the LICENSE file. */ -#ifndef skgpu_graphite_AtlasManager_DEFINED -#define skgpu_graphite_AtlasManager_DEFINED +#ifndef skgpu_graphite_TextAtlasManager_DEFINED +#define skgpu_graphite_TextAtlasManager_DEFINED #include "include/gpu/graphite/TextureInfo.h" #include "src/gpu/AtlasTypes.h" @@ -24,12 +24,12 @@ class Recorder; class UploadList; ////////////////////////////////////////////////////////////////////////////////////////////////// -/** The AtlasManager manages the lifetime of and access to DrawAtlases. +/** The TextAtlasManager manages the lifetime of and access to DrawAtlases used in glyph rendering. */ -class AtlasManager : public AtlasGenerationCounter { +class TextAtlasManager : public AtlasGenerationCounter { public: - AtlasManager(Recorder*); - ~AtlasManager(); + TextAtlasManager(Recorder*); + ~TextAtlasManager(); // If getProxies returns nullptr, the client must not try to use other functions on the // StrikeCache which use the atlas. This function *must* be called first, before other @@ -114,4 +114,4 @@ class AtlasManager : public AtlasGenerationCounter { } // namespace skgpu::graphite -#endif // skgpu_graphite_AtlasManager_DEFINED +#endif // skgpu_graphite_TextAtlasManager_DEFINED diff --git a/src/gpu/graphite/vk/VulkanCaps.cpp b/src/gpu/graphite/vk/VulkanCaps.cpp index 0eb41d68f628..e66b22470033 100644 --- a/src/gpu/graphite/vk/VulkanCaps.cpp +++ b/src/gpu/graphite/vk/VulkanCaps.cpp @@ -11,8 +11,14 @@ #include "include/gpu/graphite/TextureInfo.h" #include "include/gpu/graphite/vk/VulkanGraphiteTypes.h" #include "include/gpu/vk/VulkanExtensions.h" +#include "src/gpu/graphite/AttachmentTypes.h" +#include "src/gpu/graphite/ContextUtils.h" +#include "src/gpu/graphite/GraphicsPipelineDesc.h" #include "src/gpu/graphite/GraphiteResourceKey.h" +#include "src/gpu/graphite/RendererProvider.h" +#include "src/gpu/graphite/RuntimeEffectDictionary.h" #include "src/gpu/graphite/vk/VulkanGraphiteUtilsPriv.h" +#include "src/gpu/graphite/vk/VulkanSharedContext.h" #include "src/gpu/vk/VulkanUtilsPriv.h" #ifdef SK_BUILD_FOR_ANDROID @@ -47,12 +53,14 @@ void VulkanCaps::init(const skgpu::VulkanInterface* vkInterface, // give the minimum max size across all configs. So for simplicity we will use that for now. fMaxTextureSize = std::min(physDevProperties.limits.maxImageDimension2D, (uint32_t)INT_MAX); - fRequiredUniformBufferAlignment = 256; - fRequiredStorageBufferAlignment = 1; + fRequiredUniformBufferAlignment = physDevProperties.limits.minUniformBufferOffsetAlignment; + fRequiredStorageBufferAlignment = physDevProperties.limits.minStorageBufferOffsetAlignment; fRequiredTransferBufferAlignment = 4; fResourceBindingReqs.fUniformBufferLayout = Layout::kStd140; - fResourceBindingReqs.fStorageBufferLayout = Layout::kStd430; + // TODO(skia:14639): We cannot use std430 layout for SSBOs until SkSL gracefully handles + // implicit array stride. + fResourceBindingReqs.fStorageBufferLayout = Layout::kStd140; fResourceBindingReqs.fSeparateTextureAndSamplerBinding = false; fResourceBindingReqs.fDistinctIndexRanges = false; @@ -96,6 +104,12 @@ void VulkanCaps::init(const skgpu::VulkanInterface* vkInterface, } else { fMaxVertexAttributes = physDevProperties.limits.maxVertexInputAttributes; } + fMaxUniformBufferRange = physDevProperties.limits.maxUniformBufferRange; + // TODO: Add support for using regular uniform buffers or push constants to store intrinsic + // constant information. For now, require inline uniform support. + fSupportsInlineUniformBlocks = + extensions->hasExtension(VK_EXT_INLINE_UNIFORM_BLOCK_EXTENSION_NAME, 1); + SkASSERT(fSupportsInlineUniformBlocks); this->finishInitialization(contextOptions); } @@ -185,15 +199,19 @@ TextureInfo VulkanCaps::getDefaultSampledTextureInfo(SkColorType ct, TextureInfo VulkanCaps::getDefaultMSAATextureInfo(const TextureInfo& singleSampledInfo, Discardable discardable) const { + if (fDefaultMSAASamples <= 1) { + return {}; + } + const VkFormat singleSpecFormat = singleSampledInfo.vulkanTextureSpec().fFormat; const FormatInfo& formatInfo = this->getFormatInfo(singleSpecFormat); if ((singleSampledInfo.isProtected() == Protected::kYes && !this->protectedSupport()) || - !formatInfo.isRenderable(VK_IMAGE_TILING_OPTIMAL, this->defaultMSAASamples())) { + !formatInfo.isRenderable(VK_IMAGE_TILING_OPTIMAL, fDefaultMSAASamples)) { return {}; } VulkanTextureInfo info; - info.fSampleCount = this->defaultMSAASamples(); + info.fSampleCount = fDefaultMSAASamples; info.fMipmapped = Mipmapped::kNo; info.fFlags = (singleSampledInfo.isProtected() == Protected::kYes) ? VK_IMAGE_CREATE_PROTECTED_BIT : 0; @@ -270,11 +288,6 @@ uint32_t VulkanCaps::channelMask(const TextureInfo& textureInfo) const { return skgpu::VkFormatChannels(textureInfo.vulkanTextureSpec().fFormat); } -size_t VulkanCaps::bytesPerPixel(const TextureInfo& info) const { - const VkFormat format = info.vulkanTextureSpec().fFormat; - return VkFormatBytesPerBlock(format); -} - void VulkanCaps::initFormatTable(const skgpu::VulkanInterface* interface, VkPhysicalDevice physDev, const VkPhysicalDeviceProperties& properties) { @@ -974,8 +987,7 @@ bool VulkanCaps::DepthStencilFormatInfo::isDepthStencilSupported(VkFormatFeature VkFormat VulkanCaps::getFormatFromDepthStencilFlags(const SkEnumBitMask& flags) const { - int idx = static_cast(flags); - return fDepthStencilFlagsToFormatTable[idx]; + return fDepthStencilFlagsToFormatTable[flags.value()]; } VulkanCaps::DepthStencilFormatInfo& VulkanCaps::getDepthStencilFormatInfo(VkFormat format) { @@ -1026,6 +1038,15 @@ bool VulkanCaps::onIsTexturable(const TextureInfo& texInfo) const { return info.isTexturable(vkInfo.fImageTiling); } + +bool VulkanCaps::isRenderable(const TextureInfo& texInfo) const { + VulkanTextureInfo vkInfo; + texInfo.getVulkanTextureInfo(&vkInfo); + + const FormatInfo& info = this->getFormatInfo(vkInfo.fFormat); + return info.isRenderable(vkInfo.fImageTiling, texInfo.numSamples()); +} + bool VulkanCaps::supportsWritePixels(const TextureInfo& texInfo) const { VulkanTextureInfo vkInfo; texInfo.getVulkanTextureInfo(&vkInfo); @@ -1126,16 +1147,25 @@ SkColorType VulkanCaps::supportedReadPixelsColorType(SkColorType srcColorType, return kUnknown_SkColorType; } -UniqueKey VulkanCaps::makeGraphicsPipelineKey(const GraphicsPipelineDesc&, - const RenderPassDesc&) const { +UniqueKey VulkanCaps::makeGraphicsPipelineKey(const GraphicsPipelineDesc& pipelineDesc, + const RenderPassDesc& renderPassDesc) const { UniqueKey pipelineKey; { static const skgpu::UniqueKey::Domain kGraphicsPipelineDomain = UniqueKey::GenerateDomain(); - // TODO: set proper key size - UniqueKey::Builder builder(&pipelineKey, kGraphicsPipelineDomain, 1, "GraphicsPipeline"); - // TODO: fill in key data here + // 5 uint32_t's (render step id, paint id, uint64 renderpass desc, uint16 write swizzle key) + UniqueKey::Builder builder(&pipelineKey, kGraphicsPipelineDomain, 5, "GraphicsPipeline"); + // add graphicspipelinedesc key + builder[0] = pipelineDesc.renderStepID(); + builder[1] = pipelineDesc.paintParamsID().asUInt(); + + // add renderpassdesc key + uint64_t renderPassKey = this->getRenderPassDescKey(renderPassDesc); + builder[2] = renderPassKey & 0xFFFFFFFF; + builder[3] = (renderPassKey >> 32) & 0xFFFFFFFF; + builder[4] = renderPassDesc.fWriteSwizzle.asKey(); + builder.finish(); } @@ -1165,13 +1195,13 @@ void VulkanCaps::buildKeyForTexture(SkISize dimensions, // Confirm all the below parts of the key can fit in a single uint32_t. The sum of the shift // amounts in the asserts must be less than or equal to 32. vkSpec.fFlags will go into its // own 32-bit block. - SkASSERT(samplesKey < (1u << 3)); - SkASSERT(static_cast(isMipped) < (1u << 1)); - SkASSERT(static_cast(isProtected) < (1u << 1)); - SkASSERT(vkSpec.fImageTiling < (1u << 1)); - SkASSERT(vkSpec.fImageUsageFlags < (1u << 5)); - SkASSERT(vkSpec.fSharingMode < (1u << 1)); - SkASSERT(vkSpec.fAspectMask < (1u << 11)); + SkASSERT(samplesKey < (1u << 3)); // sample key is first 3 bits + SkASSERT(static_cast(isMipped) < (1u << 1)); // isMapped is 4th bit + SkASSERT(static_cast(isProtected) < (1u << 1)); // isProtected is 5th bit + SkASSERT(vkSpec.fImageTiling < (1u << 1)); // imageTiling is 6th bit + SkASSERT(vkSpec.fSharingMode < (1u << 1)); // sharingMode is 7th bit + SkASSERT(vkSpec.fAspectMask < (1u << 11)); // aspectMask is bits 8 - 19 + SkASSERT(vkSpec.fImageUsageFlags < (1u << 12)); // imageUsageFlags are bits 20-32 // We need two uint32_ts for dimensions, 1 for format, and 2 for the rest of the key. static int kNum32DataCnt = 2 + 1 + 2; @@ -1182,14 +1212,23 @@ void VulkanCaps::buildKeyForTexture(SkISize dimensions, builder[1] = dimensions.height(); builder[2] = formatKey; builder[3] = (static_cast(vkSpec.fFlags)); - builder[4] = (samplesKey << 0) | - (static_cast(isMipped) << 3) | - (static_cast(isProtected) << 4) | - (static_cast(vkSpec.fImageTiling) << 5) | - (static_cast(vkSpec.fImageUsageFlags) << 10) | - (static_cast(vkSpec.fSharingMode) << 11) | - (static_cast(vkSpec.fAspectMask) << 12); + builder[4] = (samplesKey << 0) | + (static_cast(isMipped) << 3) | + (static_cast(isProtected) << 4) | + (static_cast(vkSpec.fImageTiling) << 5) | + (static_cast(vkSpec.fSharingMode) << 6) | + (static_cast(vkSpec.fAspectMask) << 7) | + (static_cast(vkSpec.fImageUsageFlags) << 19); } -} // namespace skgpu::graphite +uint64_t VulkanCaps::getRenderPassDescKey(const RenderPassDesc& renderPassDesc) const { + VulkanTextureInfo colorInfo, depthStencilInfo; + renderPassDesc.fColorAttachment.fTextureInfo.getVulkanTextureInfo(&colorInfo); + renderPassDesc.fDepthStencilAttachment.fTextureInfo.getVulkanTextureInfo(&depthStencilInfo); + SkASSERT(colorInfo.fFormat < 65535 && depthStencilInfo.fFormat < 65535); + uint32_t colorAttachmentKey = colorInfo.fFormat << 16 | colorInfo.fSampleCount; + uint32_t dsAttachmentKey = depthStencilInfo.fFormat << 16 | depthStencilInfo.fSampleCount; + return (((uint64_t) colorAttachmentKey) << 32) | dsAttachmentKey; +} +} // namespace skgpu::graphite diff --git a/src/gpu/graphite/vk/VulkanCaps.h b/src/gpu/graphite/vk/VulkanCaps.h index 133b00051fcd..179a1b7981fa 100644 --- a/src/gpu/graphite/vk/VulkanCaps.h +++ b/src/gpu/graphite/vk/VulkanCaps.h @@ -45,7 +45,7 @@ class VulkanCaps final : public Caps { uint32_t channelMask(const TextureInfo&) const override; - bool isRenderable(const TextureInfo&) const override { return false; } + bool isRenderable(const TextureInfo&) const override; bool isStorage(const TextureInfo&) const override { // TODO: support storage textures return false; @@ -57,8 +57,6 @@ class VulkanCaps final : public Caps { Shareable, GraphiteResourceKey*) const override; - size_t bytesPerPixel(const TextureInfo&) const override; - bool shouldAlwaysUseDedicatedImageMemory() const { return fShouldAlwaysUseDedicatedImageMemory; } @@ -76,9 +74,14 @@ class VulkanCaps final : public Caps { return fShouldPersistentlyMapCpuToGpuBuffers; } + bool supportsInlineUniformBlocks() const { return fSupportsInlineUniformBlocks; } + uint32_t maxVertexAttributes() const { return fMaxVertexAttributes; } + uint64_t maxUniformBufferRange() const { return fMaxUniformBufferRange; } + + uint64_t getRenderPassDescKey(const RenderPassDesc& renderPassDesc) const; private: enum VkVendor { @@ -206,6 +209,7 @@ class VulkanCaps final : public Caps { const DepthStencilFormatInfo& getDepthStencilFormatInfo(VkFormat) const; uint32_t fMaxVertexAttributes; + uint64_t fMaxUniformBufferRange; // Various bools to define whether certain Vulkan features are supported. bool fSupportsMemorylessAttachments = false; @@ -213,6 +217,7 @@ class VulkanCaps final : public Caps { bool fShouldAlwaysUseDedicatedImageMemory = false; bool fGpuOnlyBuffersMorePerformant = false; bool fShouldPersistentlyMapCpuToGpuBuffers = true; + bool fSupportsInlineUniformBlocks = false; }; } // namespace skgpu::graphite diff --git a/src/gpu/graphite/vk/VulkanCommandBuffer.cpp b/src/gpu/graphite/vk/VulkanCommandBuffer.cpp index ce4a6f96383a..3342ab4478ef 100644 --- a/src/gpu/graphite/vk/VulkanCommandBuffer.cpp +++ b/src/gpu/graphite/vk/VulkanCommandBuffer.cpp @@ -7,9 +7,13 @@ #include "src/gpu/graphite/vk/VulkanCommandBuffer.h" +#include "include/gpu/MutableTextureState.h" +#include "include/gpu/graphite/BackendSemaphore.h" #include "include/private/base/SkTArray.h" #include "src/gpu/graphite/DescriptorTypes.h" #include "src/gpu/graphite/Log.h" +#include "src/gpu/graphite/Surface_Graphite.h" +#include "src/gpu/graphite/TextureProxy.h" #include "src/gpu/graphite/vk/VulkanBuffer.h" #include "src/gpu/graphite/vk/VulkanDescriptorSet.h" #include "src/gpu/graphite/vk/VulkanGraphiteUtilsPriv.h" @@ -18,14 +22,24 @@ #include "src/gpu/graphite/vk/VulkanSharedContext.h" #include "src/gpu/graphite/vk/VulkanTexture.h" -#define SK_DISABLE_VULKAN_RENDERING - using namespace skia_private; namespace skgpu::graphite { class VulkanDescriptorSet; +namespace { // anonymous namespace + +uint64_t clamp_ubo_binding_size(const uint64_t& offset, + const uint64_t& bufferSize, + const uint64_t& maxSize) { + SkASSERT(offset <= bufferSize); + auto remainSize = bufferSize - offset; + return remainSize > maxSize ? maxSize : remainSize; +} + +} // anonymous namespace + std::unique_ptr VulkanCommandBuffer::Make( const VulkanSharedContext* sharedContext, VulkanResourceProvider* resourceProvider) { @@ -85,6 +99,11 @@ VulkanCommandBuffer::VulkanCommandBuffer(VkCommandPool pool, , fResourceProvider(resourceProvider) { // When making a new command buffer, we automatically begin the command buffer this->begin(); + // Each command buffer will have an intrinsic uniform buffer, so create & store that buffer + // TODO: Look into implementing this with a push constant or an inline uniform block + fIntrinsicUniformBuffer = resourceProvider->createBuffer(4 * sizeof(float), + BufferType::kUniform, + AccessPattern::kHostVisible); } VulkanCommandBuffer::~VulkanCommandBuffer() { @@ -112,8 +131,22 @@ void VulkanCommandBuffer::onResetCommandBuffer() { 0)); fActiveGraphicsPipeline = nullptr; fBindUniformBuffers = true; + fBoundIndexBuffer = VK_NULL_HANDLE; + fBoundIndexBufferOffset = 0; + fBoundIndirectBuffer = VK_NULL_HANDLE; + fBoundIndirectBufferOffset = 0; fTextureSamplerDescSetToBind = VK_NULL_HANDLE; - fUniformBuffersToBind.clear(); + fNumTextureSamplers = 0; + fUniformBuffersToBind.fill({nullptr, 0}); + for (int i = 0; i < 4; ++i) { + fCachedBlendConstant[i] = -1.0; + } + for (auto& boundInputBuffer : fBoundInputBuffers) { + boundInputBuffer = VK_NULL_HANDLE; + } + for (auto& boundInputOffset : fBoundInputBufferOffsets) { + boundInputOffset = 0; + } } bool VulkanCommandBuffer::setNewCommandBufferResources() { @@ -146,6 +179,71 @@ void VulkanCommandBuffer::end() { fActive = false; } +void VulkanCommandBuffer::addWaitSemaphores(size_t numWaitSemaphores, + const BackendSemaphore* waitSemaphores) { + if (!waitSemaphores) { + SkASSERT(numWaitSemaphores == 0); + return; + } + + for (size_t i = 0; i < numWaitSemaphores; ++i) { + auto& semaphore = waitSemaphores[i]; + if (semaphore.isValid() && semaphore.backend() == BackendApi::kVulkan) { + fWaitSemaphores.push_back(semaphore.getVkSemaphore()); + } + } +} + +void VulkanCommandBuffer::addSignalSemaphores(size_t numSignalSemaphores, + const BackendSemaphore* signalSemaphores) { + if (!signalSemaphores) { + SkASSERT(numSignalSemaphores == 0); + return; + } + + for (size_t i = 0; i < numSignalSemaphores; ++i) { + auto& semaphore = signalSemaphores[i]; + if (semaphore.isValid() && semaphore.backend() == BackendApi::kVulkan) { + fSignalSemaphores.push_back(semaphore.getVkSemaphore()); + } + } +} + +void VulkanCommandBuffer::prepareSurfaceForStateUpdate(SkSurface* targetSurface, + const MutableTextureState* newState) { + TextureProxy* textureProxy = static_cast(targetSurface)->backingTextureProxy(); + VulkanTexture* texture = static_cast(textureProxy->texture()); + + // Even though internally we use this helper for getting src access flags and stages they + // can also be used for general dst flags since we don't know exactly what the client + // plans on using the image for. + VkImageLayout newLayout = newState->getVkImageLayout(); + if (newLayout == VK_IMAGE_LAYOUT_UNDEFINED) { + newLayout = texture->currentLayout(); + } + VkPipelineStageFlags dstStage = VulkanTexture::LayoutToPipelineSrcStageFlags(newLayout); + VkAccessFlags dstAccess = VulkanTexture::LayoutToSrcAccessMask(newLayout); + + uint32_t currentQueueFamilyIndex = texture->currentQueueFamilyIndex(); + uint32_t newQueueFamilyIndex = newState->getQueueFamilyIndex(); + auto isSpecialQueue = [](uint32_t queueFamilyIndex) { + return queueFamilyIndex == VK_QUEUE_FAMILY_EXTERNAL || + queueFamilyIndex == VK_QUEUE_FAMILY_FOREIGN_EXT; + }; + if (isSpecialQueue(currentQueueFamilyIndex) && isSpecialQueue(newQueueFamilyIndex)) { + // It is illegal to have both the new and old queue be special queue families (i.e. external + // or foreign). + return; + } + + texture->setImageLayoutAndQueueIndex(this, + newLayout, + dstAccess, + dstStage, + false, + newQueueFamilyIndex); +} + static bool submit_to_queue(const VulkanInterface* interface, VkQueue queue, VkFence fence, @@ -210,18 +308,25 @@ bool VulkanCommandBuffer::submit(VkQueue queue) { } SkASSERT(fSubmitFence != VK_NULL_HANDLE); + int waitCount = fWaitSemaphores.size(); + TArray vkWaitStages(waitCount); + for (int i = 0; i < waitCount; ++i) { + vkWaitStages.push_back(VK_PIPELINE_STAGE_ALL_COMMANDS_BIT); + } bool submitted = submit_to_queue(interface, queue, fSubmitFence, - /*waitCount=*/0, - /*waitSemaphores=*/nullptr, - /*waitStages=*/nullptr, + waitCount, + fWaitSemaphores.data(), + vkWaitStages.data(), /*commandBufferCount*/1, &fPrimaryCommandBuffer, - /*signalCount=*/0, - /*signalSemaphores=*/nullptr, + fSignalSemaphores.size(), + fSignalSemaphores.data(), fSharedContext->isProtected()); + fWaitSemaphores.clear(); + fSignalSemaphores.clear(); if (!submitted) { // Destroy the fence or else we will try to wait forever for it to finish. VULKAN_CALL(interface, DestroyFence(device, fSubmitFence, nullptr)); @@ -272,6 +377,25 @@ bool VulkanCommandBuffer::onAddRenderPass(const RenderPassDesc& renderPassDesc, const Texture* depthStencilTexture, SkRect viewport, const DrawPassList& drawPasses) { + for (const auto& drawPass : drawPasses) { + // Our current implementation of setting texture image layouts does not allow layout changes + // once we have already begun a render pass, so prior to any other commands, set the layout + // of all sampled textures from the drawpass so they can be sampled from the shader. + const skia_private::TArray>& sampledTextureProxies = + drawPass->sampledTextures(); + for (sk_sp textureProxy : sampledTextureProxies) { + VulkanTexture* vulkanTexture = const_cast( + static_cast( + textureProxy->texture())); + vulkanTexture->setImageLayout(this, + VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, + VK_ACCESS_SHADER_READ_BIT, + VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, + false); + this->submitPipelineBarriers(); + } + } + if (!this->beginRenderPass(renderPassDesc, colorTexture, resolveTexture, depthStencilTexture)) { return false; } @@ -289,6 +413,7 @@ bool VulkanCommandBuffer::onAddRenderPass(const RenderPassDesc& renderPassDesc, /*firstViewport=*/0, /*viewportCount=*/1, &vkViewport)); + fCurrentViewport = viewport; for (const auto& drawPass : drawPasses) { this->addDrawPass(drawPass.get()); @@ -345,9 +470,11 @@ bool VulkanCommandBuffer::beginRenderPass(const RenderPassDesc& renderPassDesc, memcpy(&colorAttachment.clearValue.color.float32, &renderPassDesc.fClearColor, 4*sizeof(float)); - vulkanTexture->setImageLayout(this, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, + vulkanTexture->setImageLayout(this, + VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, + VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT, VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, - VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT, false); + false); // Set up resolve attachment if (resolveTexture) { SkASSERT(renderPassDesc.fColorResolveAttachment.fStoreOp == StoreOp::kStore); @@ -358,9 +485,11 @@ bool VulkanCommandBuffer::beginRenderPass(const RenderPassDesc& renderPassDesc, vulkanTexture->getImageView(VulkanImageView::Usage::kAttachment)->imageView(); colorAttachment.resolveImageLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; SkASSERT(colorAttachment.storeOp == VK_ATTACHMENT_STORE_OP_DONT_CARE); - vulkanTexture->setImageLayout(this, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, + vulkanTexture->setImageLayout(this, + VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, + VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT, VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, - VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT, false); + false); } renderingInfo.colorAttachmentCount = 1; @@ -414,6 +543,7 @@ bool VulkanCommandBuffer::beginRenderPass(const RenderPassDesc& renderPassDesc, // TODO: If needed, load MSAA from resolve // Only possible with RenderPass interface, not beginRendering() + this->submitPipelineBarriers(); VULKAN_CALL(fSharedContext->interface(), CmdBeginRendering(fPrimaryCommandBuffer, &renderingInfo)); fActiveRenderPass = true; @@ -442,10 +572,8 @@ void VulkanCommandBuffer::addDrawPass(const DrawPass* drawPass) { break; } case DrawPassCommands::Type::kBindUniformBuffer: { -#ifndef SK_DISABLE_VULKAN_RENDERING auto bub = static_cast(cmdPtr); this->recordBufferBindingInfo(bub->fInfo, bub->fSlot); -#endif break; } case DrawPassCommands::Type::kBindDrawBuffers: { @@ -455,10 +583,8 @@ void VulkanCommandBuffer::addDrawPass(const DrawPass* drawPass) { break; } case DrawPassCommands::Type::kBindTexturesAndSamplers: { -#ifndef SK_DISABLE_VULKAN_RENDERING auto bts = static_cast(cmdPtr); this->recordTextureAndSamplerDescSet(*drawPass, *bts); -#endif break; } case DrawPassCommands::Type::kSetScissor: { @@ -468,33 +594,26 @@ void VulkanCommandBuffer::addDrawPass(const DrawPass* drawPass) { break; } case DrawPassCommands::Type::kDraw: { -#ifndef SK_DISABLE_VULKAN_RENDERING auto draw = static_cast(cmdPtr); this->draw(draw->fType, draw->fBaseVertex, draw->fVertexCount); -#endif break; } case DrawPassCommands::Type::kDrawIndexed: { -#ifndef SK_DISABLE_VULKAN_RENDERING auto draw = static_cast(cmdPtr); this->drawIndexed( draw->fType, draw->fBaseIndex, draw->fIndexCount, draw->fBaseVertex); -#endif break; } case DrawPassCommands::Type::kDrawInstanced: { -#ifndef SK_DISABLE_VULKAN_RENDERING auto draw = static_cast(cmdPtr); this->drawInstanced(draw->fType, draw->fBaseVertex, draw->fVertexCount, draw->fBaseInstance, draw->fInstanceCount); -#endif break; } case DrawPassCommands::Type::kDrawIndexedInstanced: { -#ifndef SK_DISABLE_VULKAN_RENDERING auto draw = static_cast(cmdPtr); this->drawIndexedInstanced(draw->fType, draw->fBaseIndex, @@ -502,21 +621,16 @@ void VulkanCommandBuffer::addDrawPass(const DrawPass* drawPass) { draw->fBaseVertex, draw->fBaseInstance, draw->fInstanceCount); -#endif break; } case DrawPassCommands::Type::kDrawIndirect: { -#ifndef SK_DISABLE_VULKAN_RENDERING auto draw = static_cast(cmdPtr); this->drawIndirect(draw->fType); -#endif break; } case DrawPassCommands::Type::kDrawIndexedIndirect: { -#ifndef SK_DISABLE_VULKAN_RENDERING auto draw = static_cast(cmdPtr); this->drawIndexedIndirect(draw->fType); -#endif break; } } @@ -524,14 +638,24 @@ void VulkanCommandBuffer::addDrawPass(const DrawPass* drawPass) { } void VulkanCommandBuffer::bindGraphicsPipeline(const GraphicsPipeline* graphicsPipeline) { - // TODO: Implement. - // So long as 2 pipelines have the same pipeline layout, descriptor sets do not need to be - // re-bound. If the layouts differ, we should set fBindUniformBuffers to true. fActiveGraphicsPipeline = static_cast(graphicsPipeline); + SkASSERT(fActiveRenderPass); + VULKAN_CALL(fSharedContext->interface(), CmdBindPipeline(fPrimaryCommandBuffer, + VK_PIPELINE_BIND_POINT_GRAPHICS, + fActiveGraphicsPipeline->pipeline())); + // TODO(b/293924877): Compare pipeline layouts. If 2 pipelines have the same pipeline layout, + // then descriptor sets do not need to be re-bound. For now, simply force a re-binding of + // descriptor sets with any new bindGraphicsPipeline DrawPassCommand. + fBindUniformBuffers = true; } void VulkanCommandBuffer::setBlendConstants(float* blendConstants) { - // TODO: Implement + SkASSERT(fActive); + if (0 != memcmp(blendConstants, fCachedBlendConstant, 4 * sizeof(float))) { + VULKAN_CALL(fSharedContext->interface(), + CmdSetBlendConstants(fPrimaryCommandBuffer, blendConstants)); + memcpy(fCachedBlendConstant, blendConstants, 4 * sizeof(float)); + } } void VulkanCommandBuffer::recordBufferBindingInfo(const BindBufferInfo& info, UniformSlot slot) { @@ -567,63 +691,101 @@ void VulkanCommandBuffer::syncDescriptorSets() { void VulkanCommandBuffer::bindUniformBuffers() { fBindUniformBuffers = false; - STArray<3, DescTypeAndCount> descriptors; - // We always bind at least one uniform buffer descriptor for intrinsic uniforms. - uint32_t numBuffers = 1; - descriptors[0].type = DescriptorType::kUniformBuffer; - descriptors[0].count = 1; - + // We always bind at least one uniform buffer descriptor for intrinsic uniforms, but can bind + // up to three (one for render step uniforms, one for paint uniforms). + fUniformBuffersToBind[VulkanGraphicsPipeline::kIntrinsicUniformBufferIndex] = + {fIntrinsicUniformBuffer.get(), /*size_t offset=*/0}; + STArray descriptors; + descriptors.push_back(VulkanGraphicsPipeline::kIntrinsicUniformDescriptor); if (fActiveGraphicsPipeline->hasStepUniforms() && - fUniformBuffersToBind[VulkanGraphicsPipeline::kRenderStepUniformBufferIndex]) { - descriptors[numBuffers].type = DescriptorType::kUniformBuffer; - descriptors[numBuffers].count = 1; - ++numBuffers; + fUniformBuffersToBind[VulkanGraphicsPipeline::kRenderStepUniformBufferIndex].fBuffer) { + descriptors.push_back(VulkanGraphicsPipeline::kRenderStepUniformDescriptor); } if (fActiveGraphicsPipeline->hasFragment() && - fUniformBuffersToBind[VulkanGraphicsPipeline::kPaintUniformBufferIndex]) { - descriptors[numBuffers].type = DescriptorType::kUniformBuffer; - descriptors[numBuffers].count = 1; - ++numBuffers; + fUniformBuffersToBind[VulkanGraphicsPipeline::kPaintUniformBufferIndex].fBuffer) { + descriptors.push_back(VulkanGraphicsPipeline::kPaintUniformDescriptor); } - - VulkanDescriptorSet* set = fResourceProvider->findOrCreateDescriptorSet( - SkSpan{&descriptors.front(), numBuffers}); + sk_sp set = fResourceProvider->findOrCreateDescriptorSet( + SkSpan{&descriptors.front(), descriptors.size()}); if (!set) { SKGPU_LOG_E("Unable to find or create descriptor set"); - } else { - std::vector writeDescriptorSets; - for (uint32_t i = 0; i < numBuffers; i++) { + return; + } + static uint64_t maxUniformBufferRange = static_cast( + fSharedContext)->vulkanCaps().maxUniformBufferRange(); + + for (int i = 0; i < descriptors.size(); i++) { + int descriptorBindingIndex = descriptors.at(i).bindingIndex; + SkASSERT(static_cast(descriptorBindingIndex) + < fUniformBuffersToBind.size()); + if (fUniformBuffersToBind[descriptorBindingIndex].fBuffer) { VkDescriptorBufferInfo bufferInfo; memset(&bufferInfo, 0, sizeof(VkDescriptorBufferInfo)); - auto vulkanBuffer = static_cast(fUniformBuffersToBind[i].fBuffer); + auto vulkanBuffer = static_cast( + fUniformBuffersToBind[descriptorBindingIndex].fBuffer); bufferInfo.buffer = vulkanBuffer->vkBuffer(); - bufferInfo.offset = fUniformBuffersToBind[i].fOffset; - bufferInfo.range = vulkanBuffer->size(); + bufferInfo.offset = fUniformBuffersToBind[descriptorBindingIndex].fOffset; + bufferInfo.range = clamp_ubo_binding_size(bufferInfo.offset, vulkanBuffer->size(), + maxUniformBufferRange); VkWriteDescriptorSet writeInfo; + VkWriteDescriptorSetInlineUniformBlockEXT writeInlineUniform; memset(&writeInfo, 0, sizeof(VkWriteDescriptorSet)); writeInfo.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; - writeInfo.pNext = nullptr; + // Perform special setup for intrinsic uniform when appropriate. + if (descriptors.at(i).type == DescriptorType::kInlineUniform) { + // Vulkan's framebuffer space has (0, 0) at the top left. This agrees with + // Skia's device coords. However, in NDC (-1, -1) is the bottom left. So we flip + // the origin here (assuming all surfaces we have are TopLeft origin). + const float x = fCurrentViewport.x() - fReplayTranslation.x(); + const float y = fCurrentViewport.y() - fReplayTranslation.y(); + float invTwoW = 2.f / fCurrentViewport.width(); + float invTwoH = 2.f / fCurrentViewport.height(); + float rtAdjust[4] = {invTwoW, invTwoH, -1.f - x * invTwoW, -1.f - y * invTwoH}; + + writeInlineUniform.sType = + VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK_EXT; + writeInlineUniform.pNext = nullptr; + writeInlineUniform.dataSize = fIntrinsicUniformBuffer->size(); + writeInlineUniform.pData = &rtAdjust; + + writeInfo.pNext = &writeInlineUniform; + } else { + writeInfo.pNext = nullptr; + } writeInfo.dstSet = *set->descriptorSet(); - writeInfo.dstBinding = i; + writeInfo.dstBinding = descriptorBindingIndex; writeInfo.dstArrayElement = 0; - writeInfo.descriptorCount = 1; - writeInfo.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; + writeInfo.descriptorCount = descriptors.at(i).count; + writeInfo.descriptorType = DsTypeEnumToVkDs(descriptors.at(i).type); writeInfo.pImageInfo = nullptr; writeInfo.pBufferInfo = &bufferInfo; writeInfo.pTexelBufferView = nullptr; - writeDescriptorSets[i] = writeInfo; + // TODO(b/293925059): Migrate to updating all the uniform descriptors with one driver + // call. Calling UpdateDescriptorSets once to encapsulate updates to all uniform + // descriptors would be ideal, but that led to issues with draws where all the UBOs + // within that set would unexpectedly be assigned the same offset. Updating them one at + // a time within this loop works in the meantime but is suboptimal. + VULKAN_CALL(fSharedContext->interface(), + UpdateDescriptorSets(fSharedContext->device(), + /*descriptorWriteCount=*/1, + &writeInfo, + /*descriptorCopyCount=*/0, + /*pDescriptorCopies=*/nullptr)); } - - VULKAN_CALL(fSharedContext->interface(), - UpdateDescriptorSets(fSharedContext->device(), - numBuffers, - &writeDescriptorSets[0], - /*descriptorCopyCount=*/0, - /*pDescriptorCopies=*/nullptr)); } + VULKAN_CALL(fSharedContext->interface(), + CmdBindDescriptorSets(fPrimaryCommandBuffer, + VK_PIPELINE_BIND_POINT_GRAPHICS, + fActiveGraphicsPipeline->layout(), + VulkanGraphicsPipeline::kUniformBufferDescSetIndex, + /*setCount=*/1, + set->descriptorSet(), + /*dynamicOffsetCount=*/0, + /*dynamicOffsets=*/nullptr)); + this->trackResource(std::move(set)); } void VulkanCommandBuffer::bindDrawBuffers(const BindBufferInfo& vertices, @@ -701,32 +863,52 @@ void VulkanCommandBuffer::bindIndirectBuffer(const Buffer* indirectBuffer, size_ void VulkanCommandBuffer::recordTextureAndSamplerDescSet( const DrawPass& drawPass, const DrawPassCommands::BindTexturesAndSamplers& command) { + if (command.fNumTexSamplers == 0) { + fNumTextureSamplers = 0; + fTextureSamplerDescSetToBind = VK_NULL_HANDLE; + fBindTextureSamplers = false; + return; + } // Query resource provider to obtain a descriptor set for the texture/samplers - std::vector descriptors; + TArray descriptors(command.fNumTexSamplers); for (int i = 0; i < command.fNumTexSamplers; i++) { - descriptors.push_back({DescriptorType::kCombinedTextureSampler, 1}); + descriptors.push_back({DescriptorType::kCombinedTextureSampler, 1, i}); } - VulkanDescriptorSet* set = fResourceProvider->findOrCreateDescriptorSet( - SkSpan{&descriptors.front(), descriptors.size()}); + sk_sp set = fResourceProvider->findOrCreateDescriptorSet( + SkSpan{&descriptors.front(), descriptors.size()}); if (!set) { SKGPU_LOG_E("Unable to find or create descriptor set"); + fNumTextureSamplers = 0; + fTextureSamplerDescSetToBind = VK_NULL_HANDLE; + fBindTextureSamplers = false; + return; } else { // Populate the descriptor set with texture/sampler descriptors - std::vector writeDescriptorSets; + TArray writeDescriptorSets(command.fNumTexSamplers); for (int i = 0; i < command.fNumTexSamplers; ++i) { - auto texture = static_cast( - drawPass.getTexture(command.fTextureIndices[i])); + auto texture = const_cast(static_cast( + drawPass.getTexture(command.fTextureIndices[i]))); auto sampler = static_cast( drawPass.getSampler(command.fSamplerIndices[i])); + if (!texture || !sampler) { + // TODO(b/294198324): Investigate the root cause for null texture or samplers on + // Ubuntu QuadP400 GPU + SKGPU_LOG_E("Texture and sampler must not be null"); + fNumTextureSamplers = 0; + fTextureSamplerDescSetToBind = VK_NULL_HANDLE; + fBindTextureSamplers = false; + return; + } VkDescriptorImageInfo textureInfo; memset(&textureInfo, 0, sizeof(VkDescriptorImageInfo)); textureInfo.sampler = sampler->vkSampler(); - textureInfo.imageView = VK_NULL_HANDLE; // TODO: Obtain texture view from VulkanImage. - textureInfo.imageLayout = texture->currentLayout(); + textureInfo.imageView = + texture->getImageView(VulkanImageView::Usage::kShaderInput)->imageView(); + textureInfo.imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; - VkWriteDescriptorSet writeInfo; + VkWriteDescriptorSet& writeInfo = writeDescriptorSets.push_back(); memset(&writeInfo, 0, sizeof(VkWriteDescriptorSet)); writeInfo.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; writeInfo.pNext = nullptr; @@ -738,8 +920,6 @@ void VulkanCommandBuffer::recordTextureAndSamplerDescSet( writeInfo.pImageInfo = &textureInfo; writeInfo.pBufferInfo = nullptr; writeInfo.pTexelBufferView = nullptr; - - writeDescriptorSets[i] = writeInfo; } VULKAN_CALL(fSharedContext->interface(), @@ -752,14 +932,17 @@ void VulkanCommandBuffer::recordTextureAndSamplerDescSet( // Store the updated descriptor set to be actually bound later on. This avoids binding and // potentially having to re-bind in cases where earlier descriptor sets change while going // through drawpass commands. - fTextureSamplerDescSetToBind = *(set->descriptorSet()); + fTextureSamplerDescSetToBind = *set->descriptorSet(); fBindTextureSamplers = true; + fNumTextureSamplers = command.fNumTexSamplers; + this->trackResource(std::move(set)); } } void VulkanCommandBuffer::bindTextureSamplers() { fBindTextureSamplers = false; - if (fTextureSamplerDescSetToBind != VK_NULL_HANDLE) { + if (fTextureSamplerDescSetToBind != VK_NULL_HANDLE && + fActiveGraphicsPipeline->numTextureSamplers() == fNumTextureSamplers) { VULKAN_CALL(fSharedContext->interface(), CmdBindDescriptorSets(fPrimaryCommandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, @@ -794,7 +977,7 @@ void VulkanCommandBuffer::draw(PrimitiveType, VULKAN_CALL(fSharedContext->interface(), CmdDraw(fPrimaryCommandBuffer, vertexCount, - /*instanceCount=*/0, + /*instanceCount=*/1, baseVertex, /*firstInstance=*/0)); } @@ -809,7 +992,7 @@ void VulkanCommandBuffer::drawIndexed(PrimitiveType, VULKAN_CALL(fSharedContext->interface(), CmdDrawIndexed(fPrimaryCommandBuffer, indexCount, - /*instanceCount=*/0, + /*instanceCount=*/1, baseIndex, baseVertex, /*firstInstance=*/0)); diff --git a/src/gpu/graphite/vk/VulkanCommandBuffer.h b/src/gpu/graphite/vk/VulkanCommandBuffer.h index 891fb5faa586..224d35e8834f 100644 --- a/src/gpu/graphite/vk/VulkanCommandBuffer.h +++ b/src/gpu/graphite/vk/VulkanCommandBuffer.h @@ -18,6 +18,7 @@ namespace skgpu::graphite { class VulkanResourceProvider; class VulkanSharedContext; +class Buffer; class VulkanCommandBuffer final : public CommandBuffer { public: @@ -59,6 +60,13 @@ class VulkanCommandBuffer final : public CommandBuffer { void begin(); void end(); + void addWaitSemaphores(size_t numWaitSemaphores, + const BackendSemaphore* waitSemaphores) override; + void addSignalSemaphores(size_t numWaitSemaphores, + const BackendSemaphore* signalSemaphores) override; + void prepareSurfaceForStateUpdate(SkSurface* targetSurface, + const MutableTextureState* newState) override; + bool onAddRenderPass(const RenderPassDesc&, const Texture* colorTexture, const Texture* resolveTexture, @@ -168,6 +176,10 @@ class VulkanCommandBuffer final : public CommandBuffer { VkFence fSubmitFence = VK_NULL_HANDLE; + // Current semaphores + skia_private::STArray<1, VkSemaphore> fWaitSemaphores; + skia_private::STArray<1, VkSemaphore> fSignalSemaphores; + // Tracking of memory barriers so that we can submit them all in a batch together. skia_private::STArray<1, VkBufferMemoryBarrier> fBufferBarriers; skia_private::STArray<2, VkImageMemoryBarrier> fImageBarriers; @@ -178,9 +190,17 @@ class VulkanCommandBuffer final : public CommandBuffer { // Track whether certain descriptor sets need to be bound bool fBindUniformBuffers = false; bool fBindTextureSamplers = false; - skia_private::TArray fUniformBuffersToBind; + + sk_sp fIntrinsicUniformBuffer; + std::array fUniformBuffersToBind + = {{{nullptr, 0}}}; VkDescriptorSet fTextureSamplerDescSetToBind = VK_NULL_HANDLE; + int fNumTextureSamplers = 0; + // Store the current viewport so we can calculate rtAdjust when it is time to populate / bind + // the intrinsic uniform buffer. + SkRect fCurrentViewport; + VkBuffer fBoundInputBuffers[VulkanGraphicsPipeline::kNumInputBuffers]; size_t fBoundInputBufferOffsets[VulkanGraphicsPipeline::kNumInputBuffers]; @@ -188,6 +208,8 @@ class VulkanCommandBuffer final : public CommandBuffer { VkBuffer fBoundIndirectBuffer = VK_NULL_HANDLE; size_t fBoundIndexBufferOffset = 0; size_t fBoundIndirectBufferOffset = 0; + + float fCachedBlendConstant[4]; }; } // namespace skgpu::graphite diff --git a/src/gpu/graphite/vk/VulkanDescriptorPool.cpp b/src/gpu/graphite/vk/VulkanDescriptorPool.cpp index d2ec165856de..b63e91166cd3 100644 --- a/src/gpu/graphite/vk/VulkanDescriptorPool.cpp +++ b/src/gpu/graphite/vk/VulkanDescriptorPool.cpp @@ -8,14 +8,13 @@ #include "src/gpu/graphite/vk/VulkanDescriptorPool.h" #include "include/private/base/SkTArray.h" -#include "src/gpu/graphite/vk/VulkanDescriptorSet.h" #include "src/gpu/graphite/vk/VulkanSharedContext.h" namespace skgpu::graphite { -sk_sp VulkanDescriptorPool::Make( - const VulkanSharedContext* context, - SkSpan requestedDescCounts) { +sk_sp VulkanDescriptorPool::Make(const VulkanSharedContext* context, + SkSpan requestedDescCounts, + VkDescriptorSetLayout layout) { if (requestedDescCounts.empty()) { return nullptr; @@ -38,18 +37,23 @@ sk_sp VulkanDescriptorPool::Make( kMaxNumDescriptors); return nullptr; } - VkDescriptorPoolSize* poolSize = &poolSizes.at(i); - memset(poolSize, 0, sizeof(VkDescriptorPoolSize)); + VkDescriptorPoolSize& poolSize = poolSizes.push_back(); + memset(&poolSize, 0, sizeof(VkDescriptorPoolSize)); // Map each DescriptorSetType to the appropriate backend VkDescriptorType - poolSize->type = VulkanDescriptorSet::DsTypeEnumToVkDs(requestedDescCounts[i].type); + poolSize.type = DsTypeEnumToVkDs(requestedDescCounts[i].type); // Create a pool large enough to accommodate the maximum possible number of descriptor sets - poolSize->descriptorCount = requestedDescCounts[i].count * kMaxNumSets; + poolSize.descriptorCount = requestedDescCounts[i].count * kMaxNumSets; } + VkDescriptorPoolInlineUniformBlockCreateInfoEXT inlineUniformInfo; + inlineUniformInfo.sType = + VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO_EXT; + inlineUniformInfo.pNext = nullptr; + VkDescriptorPoolCreateInfo createInfo; memset(&createInfo, 0, sizeof(VkDescriptorPoolCreateInfo)); createInfo.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO; - createInfo.pNext = nullptr; + createInfo.pNext = &inlineUniformInfo; createInfo.flags = 0; createInfo.maxSets = kMaxNumSets; createInfo.poolSizeCount = requestedDescCounts.size(); @@ -57,26 +61,35 @@ sk_sp VulkanDescriptorPool::Make( VkDescriptorPool pool; VkResult result; - VULKAN_CALL_RESULT(context->interface(), result, CreateDescriptorPool(context->device(), - &createInfo, - nullptr, - &pool)); + VULKAN_CALL_RESULT(context->interface(), + result, + CreateDescriptorPool(context->device(), + &createInfo, + /*const VkAllocationCallbacks*=*/nullptr, + &pool)); if (result != VK_SUCCESS) { return nullptr; } - return sk_sp(new VulkanDescriptorPool(context, pool)); + return sk_sp(new VulkanDescriptorPool(context, pool, layout)); } VulkanDescriptorPool::VulkanDescriptorPool(const VulkanSharedContext* context, - VkDescriptorPool pool) + VkDescriptorPool pool, + VkDescriptorSetLayout layout) : fSharedContext(context) - , fDescPool(pool) {} + , fDescPool(pool) + , fDescSetLayout(layout) {} VulkanDescriptorPool::~VulkanDescriptorPool() { // Destroying the VkDescriptorPool will automatically free and delete any VkDescriptorSets // allocated from the pool. VULKAN_CALL(fSharedContext->interface(), DestroyDescriptorPool(fSharedContext->device(), fDescPool, nullptr)); + if (fDescSetLayout != VK_NULL_HANDLE) { + VULKAN_CALL(fSharedContext->interface(), + DestroyDescriptorSetLayout(fSharedContext->device(), fDescSetLayout, nullptr)); + fDescSetLayout = VK_NULL_HANDLE; + } } } // namespace skgpu::graphite diff --git a/src/gpu/graphite/vk/VulkanDescriptorPool.h b/src/gpu/graphite/vk/VulkanDescriptorPool.h index d199eb847b82..24bb5130b4b4 100644 --- a/src/gpu/graphite/vk/VulkanDescriptorPool.h +++ b/src/gpu/graphite/vk/VulkanDescriptorPool.h @@ -28,9 +28,10 @@ class VulkanDescriptorPool : public SkRefCnt { * sets possible (kMaxNumSets). Counts must be > 0. */ static sk_sp Make(const VulkanSharedContext*, - SkSpan); + SkSpan, + VkDescriptorSetLayout); - VkDescriptorPool* descPool() { return &fDescPool; } + VkDescriptorPool descPool() { return fDescPool; } private: // Conservative overestimation of a maximum number of descriptors of any given type that can be @@ -38,11 +39,15 @@ class VulkanDescriptorPool : public SkRefCnt { static constexpr int kMaxNumDescriptors = 1024; VulkanDescriptorPool(const VulkanSharedContext*, - VkDescriptorPool); + VkDescriptorPool, + VkDescriptorSetLayout); ~VulkanDescriptorPool() override; const VulkanSharedContext* fSharedContext; VkDescriptorPool fDescPool; + // Hang on to the VkDescSetLayout handle used to allocate sets from this pool. Pools are only + // deleted once sets no longer need them, so we can safely destoy the layout alongside the pool. + VkDescriptorSetLayout fDescSetLayout; }; } // namespace skgpu::graphite diff --git a/src/gpu/graphite/vk/VulkanDescriptorSet.cpp b/src/gpu/graphite/vk/VulkanDescriptorSet.cpp index 62ee8310487d..79561e61b992 100644 --- a/src/gpu/graphite/vk/VulkanDescriptorSet.cpp +++ b/src/gpu/graphite/vk/VulkanDescriptorSet.cpp @@ -14,16 +14,16 @@ namespace skgpu::graphite { sk_sp VulkanDescriptorSet::Make(const VulkanSharedContext* ctxt, sk_sp pool, - const VkDescriptorSetLayout* layout) { + const VkDescriptorSetLayout layout) { + SkASSERT(layout != VK_NULL_HANDLE && pool); VkDescriptorSet descSet; - VkDescriptorSetAllocateInfo dsAllocateInfo; memset(&dsAllocateInfo, 0, sizeof(VkDescriptorSetAllocateInfo)); dsAllocateInfo.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; dsAllocateInfo.pNext = nullptr; - dsAllocateInfo.descriptorPool = *(pool->descPool()); - dsAllocateInfo.descriptorSetCount = VulkanDescriptorPool::kMaxNumSets; - dsAllocateInfo.pSetLayouts = layout; + dsAllocateInfo.descriptorPool = pool->descPool(); + dsAllocateInfo.descriptorSetCount = 1; + dsAllocateInfo.pSetLayouts = &layout; VkResult result; VULKAN_CALL_RESULT(ctxt->interface(), @@ -37,24 +37,6 @@ sk_sp VulkanDescriptorSet::Make(const VulkanSharedContext* return sk_sp(new VulkanDescriptorSet(ctxt, descSet, pool)); } -VkDescriptorType VulkanDescriptorSet::DsTypeEnumToVkDs(DescriptorType type) { - switch (type) { - case DescriptorType::kUniformBuffer: - return VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; - case DescriptorType::kTextureSampler: - return VK_DESCRIPTOR_TYPE_SAMPLER; - case DescriptorType::kTexture: - return VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE; - case DescriptorType::kCombinedTextureSampler: - return VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER; - case DescriptorType::kStorageBuffer: - return VK_DESCRIPTOR_TYPE_STORAGE_BUFFER; - case DescriptorType::kInputAttachment: - return VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT; - } - SkUNREACHABLE; -} - VulkanDescriptorSet::VulkanDescriptorSet(const VulkanSharedContext* ctxt, VkDescriptorSet set, sk_sp pool) diff --git a/src/gpu/graphite/vk/VulkanDescriptorSet.h b/src/gpu/graphite/vk/VulkanDescriptorSet.h index a9745c0ae713..910badbe7651 100644 --- a/src/gpu/graphite/vk/VulkanDescriptorSet.h +++ b/src/gpu/graphite/vk/VulkanDescriptorSet.h @@ -21,20 +21,16 @@ class VulkanSharedContext; /** * Wrapper around VkDescriptorSet which maintains a reference to its descriptor pool. Once the ref * count on that pool is 0, it will be destroyed. - * - * TODO: Track whether a descriptor set is available for use or if it is already in use elsewhere. */ class VulkanDescriptorSet : public Resource { public: static sk_sp Make(const VulkanSharedContext*, sk_sp, - const VkDescriptorSetLayout*); + const VkDescriptorSetLayout); - static VkDescriptorType DsTypeEnumToVkDs(DescriptorType type); - - VulkanDescriptorSet(const VulkanSharedContext*, VkDescriptorSet, sk_sp); - - VkDescriptorSetLayout layout() const { return fDescLayout; } + VulkanDescriptorSet(const VulkanSharedContext*, + VkDescriptorSet, + sk_sp); const VkDescriptorSet* descriptorSet() { return &fDescSet; } @@ -46,7 +42,6 @@ class VulkanDescriptorSet : public Resource { // is 0, that means all the descriptor sets that came from that pool are no longer needed, so // the pool can safely be destroyed. sk_sp fPool; - VkDescriptorSetLayout fDescLayout; }; } // namespace skgpu::graphite diff --git a/src/gpu/graphite/vk/VulkanGraphicsPipeline.cpp b/src/gpu/graphite/vk/VulkanGraphicsPipeline.cpp index ad556bd33a92..bbd5f9e0c909 100644 --- a/src/gpu/graphite/vk/VulkanGraphicsPipeline.cpp +++ b/src/gpu/graphite/vk/VulkanGraphicsPipeline.cpp @@ -7,13 +7,23 @@ #include "src/gpu/graphite/vk/VulkanGraphicsPipeline.h" +#include "include/gpu/ShaderErrorHandler.h" #include "include/private/base/SkTArray.h" +#include "src/core/SkSLTypeShared.h" +#include "src/core/SkTraceEvent.h" +#include "src/gpu/PipelineUtils.h" #include "src/gpu/graphite/AttachmentTypes.h" #include "src/gpu/graphite/Attribute.h" +#include "src/gpu/graphite/ContextUtils.h" +#include "src/gpu/graphite/GraphicsPipelineDesc.h" #include "src/gpu/graphite/Log.h" +#include "src/gpu/graphite/RendererProvider.h" +#include "src/gpu/graphite/RuntimeEffectDictionary.h" #include "src/gpu/graphite/vk/VulkanGraphicsPipeline.h" -#include "src/gpu/graphite/vk/VulkanGraphiteUtilsPriv.h" #include "src/gpu/graphite/vk/VulkanSharedContext.h" +#include "src/sksl/SkSLProgramKind.h" +#include "src/sksl/SkSLProgramSettings.h" +#include "src/sksl/ir/SkSLProgram.h" namespace skgpu::graphite { @@ -427,36 +437,194 @@ static void setup_shader_stage_info(VkShaderStageFlagBits stage, shaderStageInfo->pSpecializationInfo = nullptr; } +static VkPipelineLayout setup_pipeline_layout(const VulkanSharedContext* sharedContext, + bool hasStepUniforms, + bool hasFragment, + int numTextureSamplers) { + // Determine descriptor set layouts based upon the number of uniform buffers & texture/samplers. + skia_private::STArray<2, VkDescriptorSetLayout> setLayouts; + skia_private::STArray + uniformDescriptors; + uniformDescriptors.push_back(VulkanGraphicsPipeline::kIntrinsicUniformDescriptor); + if (hasStepUniforms) { + uniformDescriptors.push_back(VulkanGraphicsPipeline::kRenderStepUniformDescriptor); + } + if (hasFragment) { + uniformDescriptors.push_back(VulkanGraphicsPipeline::kPaintUniformDescriptor); + } + VkDescriptorSetLayout uniformSetLayout; + DescriptorDataToVkDescSetLayout(sharedContext, uniformDescriptors, &uniformSetLayout); + if (uniformSetLayout != VK_NULL_HANDLE) { + setLayouts.push_back(uniformSetLayout); + } else { + SkDebugf("Failed to create uniform descriptor set layout; pipeline creation will fail.\n"); + return VK_NULL_HANDLE; + } + + VkDescriptorSetLayout textureSamplerSetLayout; + if (numTextureSamplers > 0) { + skia_private::TArray textureSamplerDescs(numTextureSamplers); + + for (int i = 0; i < numTextureSamplers; i++) { + textureSamplerDescs.push_back({DescriptorType::kCombinedTextureSampler, 1, i}); + } + DescriptorDataToVkDescSetLayout( + sharedContext, textureSamplerDescs, &textureSamplerSetLayout); + if (textureSamplerSetLayout != VK_NULL_HANDLE) { + setLayouts.push_back(textureSamplerSetLayout); + } else { + SKGPU_LOG_W("Failed to create texture/sampler descriptor set layout!\n"); + SkDebugf("Texture/sampler descriptors will not be able to bind.\n"); + } + } + + VkPipelineLayoutCreateInfo layoutCreateInfo; + memset(&layoutCreateInfo, 0, sizeof(VkPipelineLayoutCreateFlags)); + layoutCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; + layoutCreateInfo.pNext = nullptr; + layoutCreateInfo.flags = 0; + layoutCreateInfo.setLayoutCount = setLayouts.size(); + layoutCreateInfo.pSetLayouts = setLayouts.begin(); + // TODO: Add support for push constants. + layoutCreateInfo.pushConstantRangeCount = 0; + layoutCreateInfo.pPushConstantRanges = nullptr; + + VkResult result; + VkPipelineLayout layout; + VULKAN_CALL_RESULT(sharedContext->interface(), + result, + CreatePipelineLayout(sharedContext->device(), + &layoutCreateInfo, + /*const VkAllocationCallbacks*=*/nullptr, + &layout)); + // Whether the pipeline layout creation was successful or not, clean up the prerequisite + // DescriptorSetLayout(s) that are no longer needed. + for (int i = 0; i < setLayouts.size(); i++) { + if (setLayouts[i] != VK_NULL_HANDLE) { + VULKAN_CALL(sharedContext->interface(), + DestroyDescriptorSetLayout(sharedContext->device(), + setLayouts[i], + nullptr)); + } + } + return result == VK_SUCCESS ? layout : VK_NULL_HANDLE; +} + +static void destroy_shader_modules(const VulkanSharedContext* sharedContext, + VkShaderModule vsModule, + VkShaderModule fsModule) { + if (vsModule != VK_NULL_HANDLE) { + VULKAN_CALL(sharedContext->interface(), + DestroyShaderModule(sharedContext->device(), vsModule, nullptr)); + } + if (fsModule != VK_NULL_HANDLE) { + VULKAN_CALL(sharedContext->interface(), + DestroyShaderModule(sharedContext->device(), fsModule, nullptr)); + } +} + +static void setup_dynamic_state(VkPipelineDynamicStateCreateInfo* dynamicInfo, + VkDynamicState* dynamicStates) { + memset(dynamicInfo, 0, sizeof(VkPipelineDynamicStateCreateInfo)); + dynamicInfo->sType = VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO; + dynamicInfo->pNext = VK_NULL_HANDLE; + dynamicInfo->flags = 0; + dynamicStates[0] = VK_DYNAMIC_STATE_VIEWPORT; + dynamicStates[1] = VK_DYNAMIC_STATE_SCISSOR; + dynamicStates[2] = VK_DYNAMIC_STATE_BLEND_CONSTANTS; + dynamicInfo->dynamicStateCount = 3; + dynamicInfo->pDynamicStates = dynamicStates; +} + sk_sp VulkanGraphicsPipeline::Make( const VulkanSharedContext* sharedContext, - VkShaderModule vertexShader, - SkSpan vertexAttrs, - SkSpan instanceAttrs, - VkShaderModule fragShader, - DepthStencilSettings stencilSettings, - PrimitiveType primitiveType, - const BlendInfo& blendInfo, - const RenderPassDesc& renderPassDesc) { - - VkPipelineVertexInputStateCreateInfo vertexInputInfo; - skia_private::STArray<2, VkVertexInputBindingDescription, true> bindingDescs; - skia_private::STArray<16, VkVertexInputAttributeDescription> attributeDescs; - if (vertexAttrs.size() + instanceAttrs.size() > + SkSL::Compiler* compiler, + const RuntimeEffectDictionary* runtimeDict, + const GraphicsPipelineDesc& pipelineDesc, + const RenderPassDesc& renderPassDesc, + VkPipelineCache pipelineCache) { + SkSL::Program::Interface vsInterface, fsInterface; + SkSL::ProgramSettings settings; + settings.fForceNoRTFlip = true; // TODO: Confirm + ShaderErrorHandler* errorHandler = sharedContext->caps()->shaderErrorHandler(); + + const RenderStep* step = + sharedContext->rendererProvider()->lookup(pipelineDesc.renderStepID()); + bool useShadingSsboIndex = + sharedContext->caps()->storageBufferPreferred() && step->performsShading(); + + if (step->vertexAttributes().size() + step->instanceAttributes().size() > sharedContext->vulkanCaps().maxVertexAttributes()) { SKGPU_LOG_W("Requested more than the supported number of vertex attributes"); return nullptr; } - setup_vertex_input_state(vertexAttrs, - instanceAttrs, + + FragSkSLInfo fsSkSLInfo = BuildFragmentSkSL(sharedContext->caps(), + sharedContext->shaderCodeDictionary(), + runtimeDict, + step, + pipelineDesc.paintParamsID(), + useShadingSsboIndex, + renderPassDesc.fWriteSwizzle); + std::string& fsSkSL = fsSkSLInfo.fSkSL; + const bool localCoordsNeeded = fsSkSLInfo.fRequiresLocalCoords; + + bool hasFragment = !fsSkSL.empty(); + std::string vsSPIRV, fsSPIRV; + VkShaderModule fsModule = VK_NULL_HANDLE, vsModule = VK_NULL_HANDLE; + + if (hasFragment) { + if (!SkSLToSPIRV(compiler, + fsSkSL, + SkSL::ProgramKind::kGraphiteFragment, + settings, + &fsSPIRV, + &fsInterface, + errorHandler)) { + return nullptr; + } + + fsModule = createVulkanShaderModule(sharedContext, fsSPIRV, VK_SHADER_STAGE_FRAGMENT_BIT); + if (!fsModule) { + return nullptr; + } + } + + std::string vsSkSL = BuildVertexSkSL(sharedContext->caps()->resourceBindingRequirements(), + step, + useShadingSsboIndex, + localCoordsNeeded); + if (!SkSLToSPIRV(compiler, + vsSkSL, + SkSL::ProgramKind::kGraphiteVertex, + settings, + &vsSPIRV, + &vsInterface, + errorHandler)) { + return nullptr; + } + + vsModule = createVulkanShaderModule(sharedContext, vsSPIRV, VK_SHADER_STAGE_VERTEX_BIT); + if (!vsModule) { + // Clean up the other shader module before returning. + destroy_shader_modules(sharedContext, VK_NULL_HANDLE, fsModule); + return nullptr; + } + + VkPipelineVertexInputStateCreateInfo vertexInputInfo; + skia_private::STArray<2, VkVertexInputBindingDescription, true> bindingDescs; + skia_private::STArray<16, VkVertexInputAttributeDescription> attributeDescs; + setup_vertex_input_state(step->vertexAttributes(), + step->instanceAttributes(), &vertexInputInfo, &bindingDescs, &attributeDescs); VkPipelineInputAssemblyStateCreateInfo inputAssemblyInfo; - setup_input_assembly_state(primitiveType, &inputAssemblyInfo); + setup_input_assembly_state(step->primitiveType(), &inputAssemblyInfo); VkPipelineDepthStencilStateCreateInfo depthStencilInfo; - setup_depth_stencil_state(stencilSettings, &depthStencilInfo); + setup_depth_stencil_state(step->depthStencilSettings(), &depthStencilInfo); VkPipelineViewportStateCreateInfo viewportInfo; setup_viewport_scissor_state(&viewportInfo); @@ -468,35 +636,137 @@ sk_sp VulkanGraphicsPipeline::Make( // We will only have one color blend attachment per pipeline. VkPipelineColorBlendAttachmentState attachmentStates[1]; VkPipelineColorBlendStateCreateInfo colorBlendInfo; - setup_color_blend_state(blendInfo, &colorBlendInfo, attachmentStates); + setup_color_blend_state(fsSkSLInfo.fBlendInfo, &colorBlendInfo, attachmentStates); VkPipelineRasterizationStateCreateInfo rasterInfo; // TODO: Check for wire frame mode once that is an available context option within graphite. setup_raster_state(/*isWireframe=*/false, &rasterInfo); - VkPipelineShaderStageCreateInfo vertexShaderStageInfo; + VkPipelineShaderStageCreateInfo pipelineShaderStages[2]; setup_shader_stage_info(VK_SHADER_STAGE_VERTEX_BIT, - vertexShader, - &vertexShaderStageInfo); - VkPipelineShaderStageCreateInfo fragShaderStageInfo; - setup_shader_stage_info(VK_SHADER_STAGE_FRAGMENT_BIT, - fragShader, - &fragShaderStageInfo); - - // TODO: Set up other helpers and structs to populate VkGraphicsPipelineCreateInfo. - - // After setting modules in VkPipelineShaderStageCreateInfo, we can clean them up. - VULKAN_CALL(sharedContext->interface(), - DestroyShaderModule(sharedContext->device(), vertexShader, nullptr)); - if (fragShader != VK_NULL_HANDLE) { - VULKAN_CALL(sharedContext->interface(), - DestroyShaderModule(sharedContext->device(), fragShader, nullptr)); + vsModule, + &pipelineShaderStages[0]); + if (hasFragment) { + setup_shader_stage_info(VK_SHADER_STAGE_FRAGMENT_BIT, + fsModule, + &pipelineShaderStages[1]); } - return sk_sp(new VulkanGraphicsPipeline(sharedContext)); + VkPipelineLayout pipelineLayout = setup_pipeline_layout(sharedContext, + !step->uniforms().empty(), + hasFragment, + fsSkSLInfo.fNumTexturesAndSamplers); + if (pipelineLayout == VK_NULL_HANDLE) { + destroy_shader_modules(sharedContext, vsModule, fsModule); + return nullptr; + } + + VkDynamicState dynamicStates[3]; + VkPipelineDynamicStateCreateInfo dynamicInfo; + setup_dynamic_state(&dynamicInfo, dynamicStates); + + VkPipelineRenderingCreateInfoKHR pipelineRenderingInfo; + memset(&pipelineRenderingInfo, 0, sizeof(VkPipelineRenderingCreateInfoKHR)); + pipelineRenderingInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO_KHR; + pipelineRenderingInfo.colorAttachmentCount = 1; + VulkanTextureInfo textureInfo; + bool validTextureInfo = + renderPassDesc.fColorAttachment.fTextureInfo.getVulkanTextureInfo(&textureInfo); + pipelineRenderingInfo.pColorAttachmentFormats = validTextureInfo ? &textureInfo.fFormat + : VK_NULL_HANDLE; + + VkGraphicsPipelineCreateInfo pipelineCreateInfo; + memset(&pipelineCreateInfo, 0, sizeof(VkGraphicsPipelineCreateInfo)); + pipelineCreateInfo.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO; + pipelineCreateInfo.pNext = &pipelineRenderingInfo; + pipelineCreateInfo.flags = 0; + pipelineCreateInfo.stageCount = hasFragment ? 2 : 1; + pipelineCreateInfo.pStages = &pipelineShaderStages[0]; + pipelineCreateInfo.pVertexInputState = &vertexInputInfo; + pipelineCreateInfo.pInputAssemblyState = &inputAssemblyInfo; + pipelineCreateInfo.pTessellationState = nullptr; + pipelineCreateInfo.pViewportState = &viewportInfo; + pipelineCreateInfo.pRasterizationState = &rasterInfo; + pipelineCreateInfo.pMultisampleState = &multisampleInfo; + pipelineCreateInfo.pDepthStencilState = &depthStencilInfo; + pipelineCreateInfo.pColorBlendState = &colorBlendInfo; + pipelineCreateInfo.pDynamicState = &dynamicInfo; + pipelineCreateInfo.layout = pipelineLayout; + pipelineCreateInfo.renderPass = VK_NULL_HANDLE; + // For the vast majority of cases we only have one subpass so we default piplines to subpass 0. + // TODO: However, if we need to load a resolve into msaa attachment for discardable msaa then + // the main subpass will be 1. + pipelineCreateInfo.subpass = 0; + pipelineCreateInfo.basePipelineHandle = VK_NULL_HANDLE; + pipelineCreateInfo.basePipelineIndex = -1; + + VkPipeline vkPipeline; + VkResult result; + { + TRACE_EVENT0_ALWAYS("skia.shaders", "CreateGraphicsPipeline"); + VULKAN_CALL_RESULT(sharedContext->interface(), + result, + CreateGraphicsPipelines(sharedContext->device(), + pipelineCache, + 1, + &pipelineCreateInfo, + nullptr, + &vkPipeline)); + } + if (result != VK_SUCCESS) { + SkDebugf("Failed to create pipeline. Error: %d\n", result); + return nullptr; + } + + // After creating the pipeline object, we can clean up the VkShaderModule(s). + destroy_shader_modules(sharedContext, vsModule, fsModule); + +#if GRAPHITE_TEST_UTILS + GraphicsPipeline::Shaders pipelineShaders = { + std::move(vsSkSL), + std::move(fsSkSL), + "SPIR-V disassembly not available", + "SPIR-V disassembly not available", + }; + GraphicsPipeline::Shaders* pipelineShadersPtr = &pipelineShaders; +#else + GraphicsPipeline::Shaders* pipelineShadersPtr = nullptr; +#endif + + return sk_sp( + new VulkanGraphicsPipeline(sharedContext, + pipelineShadersPtr, + pipelineLayout, + vkPipeline, + hasFragment, + !step->uniforms().empty(), + fsSkSLInfo.fNumTexturesAndSamplers)); } +VulkanGraphicsPipeline::VulkanGraphicsPipeline(const skgpu::graphite::SharedContext* sharedContext, + Shaders* pipelineShaders, + VkPipelineLayout pipelineLayout, + VkPipeline pipeline, + bool hasFragment, + bool hasStepUniforms, + int numTextureSamplers) + : GraphicsPipeline(sharedContext, pipelineShaders) + , fPipelineLayout(pipelineLayout) + , fPipeline(pipeline) + , fHasFragment(hasFragment) + , fHasStepUniforms(hasStepUniforms) + , fNumTextureSamplers(numTextureSamplers) {} + void VulkanGraphicsPipeline::freeGpuData() { + auto sharedCtxt = static_cast(this->sharedContext()); + if (fPipeline != VK_NULL_HANDLE) { + VULKAN_CALL(sharedCtxt->interface(), + DestroyPipeline(sharedCtxt->device(), fPipeline, nullptr)); + } + if (fPipelineLayout != VK_NULL_HANDLE) { + VULKAN_CALL(sharedCtxt->interface(), + DestroyPipelineLayout(sharedCtxt->device(), fPipelineLayout, nullptr)); + } } } // namespace skgpu::graphite diff --git a/src/gpu/graphite/vk/VulkanGraphicsPipeline.h b/src/gpu/graphite/vk/VulkanGraphicsPipeline.h index ef7ee2cc0708..f32d74a18164 100644 --- a/src/gpu/graphite/vk/VulkanGraphicsPipeline.h +++ b/src/gpu/graphite/vk/VulkanGraphicsPipeline.h @@ -14,18 +14,41 @@ #include "src/gpu/Blend.h" #include "src/gpu/graphite/DrawTypes.h" #include "src/gpu/graphite/GraphicsPipeline.h" +#include "src/gpu/graphite/vk/VulkanGraphiteUtilsPriv.h" + +namespace SkSL { + class Compiler; +} namespace skgpu::graphite { class Attribute; -struct RenderPassDesc; +class GraphicsPipelineDesc; +class RuntimeEffectDictionary; class VulkanSharedContext; +struct RenderPassDesc; class VulkanGraphicsPipeline final : public GraphicsPipeline { public: inline static constexpr unsigned int kIntrinsicUniformBufferIndex = 0; inline static constexpr unsigned int kRenderStepUniformBufferIndex = 1; inline static constexpr unsigned int kPaintUniformBufferIndex = 2; + inline static constexpr unsigned int kNumUniformBuffers = 3; + + inline static const DescriptorData kIntrinsicUniformDescriptor = + {DescriptorType::kInlineUniform, + // For inline uniform descriptors, the descriptor count field is actually the number of + // bytes to allocate for descriptors given this type. + /*count=*/sizeof(float) * 4, + VulkanGraphicsPipeline::kIntrinsicUniformBufferIndex}; + inline static const DescriptorData kRenderStepUniformDescriptor = + {DescriptorType::kUniformBuffer, + /*count=*/1, + VulkanGraphicsPipeline::kRenderStepUniformBufferIndex}; + inline static const DescriptorData kPaintUniformDescriptor = + {DescriptorType::kUniformBuffer, + /*count=*/1, + VulkanGraphicsPipeline::kPaintUniformBufferIndex}; // For now, rigidly assign all uniform buffer descriptors to be in one descriptor set in binding // 0 and all texture/samplers to be in binding 1. @@ -37,15 +60,12 @@ class VulkanGraphicsPipeline final : public GraphicsPipeline { inline static constexpr unsigned int kInstanceBufferIndex = 1; inline static constexpr unsigned int kNumInputBuffers = 2; - static sk_sp Make(const VulkanSharedContext* sharedContext, - VkShaderModule vertexShader, - SkSpan vertexAttrs, - SkSpan instanceAttrs, - VkShaderModule fragShader, - DepthStencilSettings, - PrimitiveType, - const BlendInfo&, - const RenderPassDesc&); + static sk_sp Make(const VulkanSharedContext*, + SkSL::Compiler* compiler, + const RuntimeEffectDictionary*, + const GraphicsPipelineDesc&, + const RenderPassDesc&, + VkPipelineCache); ~VulkanGraphicsPipeline() override {} @@ -54,18 +74,31 @@ class VulkanGraphicsPipeline final : public GraphicsPipeline { return fPipelineLayout; } - // TODO: Implement. - bool hasStepUniforms() const { return false; } - bool hasFragment() const { return false; } + VkPipeline pipeline() const { + SkASSERT(fPipeline != VK_NULL_HANDLE); + return fPipeline; + } + + bool hasFragment() const { return fHasFragment; } + bool hasStepUniforms() const { return fHasStepUniforms; } + int numTextureSamplers() const { return fNumTextureSamplers; } private: - VulkanGraphicsPipeline(const skgpu::graphite::SharedContext* sharedContext - /* TODO: fill out argument list */) - : GraphicsPipeline(sharedContext) { } + VulkanGraphicsPipeline(const skgpu::graphite::SharedContext* sharedContext, + Shaders* pipelineShaders, + VkPipelineLayout, + VkPipeline, + bool hasFragment, + bool hasStepUniforms, + int numTextureSamplers); void freeGpuData() override; - VkPipelineLayout fPipelineLayout; + VkPipelineLayout fPipelineLayout = VK_NULL_HANDLE; + VkPipeline fPipeline = VK_NULL_HANDLE; + bool fHasFragment = false; + bool fHasStepUniforms = false; + int fNumTextureSamplers = 0; }; } // namespace skgpu::graphite diff --git a/src/gpu/graphite/vk/VulkanGraphiteUtils.cpp b/src/gpu/graphite/vk/VulkanGraphiteUtils.cpp index b7688eb7a272..b339dd216c1e 100644 --- a/src/gpu/graphite/vk/VulkanGraphiteUtils.cpp +++ b/src/gpu/graphite/vk/VulkanGraphiteUtils.cpp @@ -16,7 +16,6 @@ #include "src/gpu/graphite/vk/VulkanQueueManager.h" #include "src/gpu/graphite/vk/VulkanSharedContext.h" #include "src/sksl/SkSLProgramSettings.h" - namespace skgpu::graphite::ContextFactory { std::unique_ptr MakeVulkan(const VulkanBackendContext& backendContext, @@ -68,4 +67,96 @@ VkShaderModule createVulkanShaderModule(const VulkanSharedContext* context, return shaderModule; } +void DescriptorDataToVkDescSetLayout(const VulkanSharedContext* ctxt, + const SkSpan& requestedDescriptors, + VkDescriptorSetLayout* outLayout) { + skia_private::STArray bindingLayouts; + for (size_t i = 0; i < requestedDescriptors.size(); i++) { + if (requestedDescriptors[i].count != 0) { + VkDescriptorSetLayoutBinding& layoutBinding = bindingLayouts.push_back(); + memset(&layoutBinding, 0, sizeof(VkDescriptorSetLayoutBinding)); + layoutBinding.binding = requestedDescriptors[i].bindingIndex; + layoutBinding.descriptorType = DsTypeEnumToVkDs(requestedDescriptors[i].type); + layoutBinding.descriptorCount = requestedDescriptors[i].count; + // TODO: Obtain layout binding stage flags from visibility (vertex or shader) + layoutBinding.stageFlags = VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT; + // TODO: Optionally set immutableSamplers here. + layoutBinding.pImmutableSamplers = nullptr; + } + } + + VkDescriptorSetLayoutCreateInfo layoutCreateInfo; + memset(&layoutCreateInfo, 0, sizeof(VkDescriptorSetLayoutCreateInfo)); + layoutCreateInfo.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; + layoutCreateInfo.pNext = nullptr; + layoutCreateInfo.flags = 0; + layoutCreateInfo.bindingCount = bindingLayouts.size(); + layoutCreateInfo.pBindings = &bindingLayouts.front(); + + VkResult result; + VULKAN_CALL_RESULT(ctxt->interface(), + result, + CreateDescriptorSetLayout(ctxt->device(), + &layoutCreateInfo, + nullptr, + outLayout)); + if (result != VK_SUCCESS) { + SkDebugf("Failed to create VkDescriptorSetLayout\n"); + outLayout = VK_NULL_HANDLE; + } +} + +VkDescriptorType DsTypeEnumToVkDs(DescriptorType type) { + switch (type) { + case DescriptorType::kUniformBuffer: + return VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; + case DescriptorType::kInlineUniform: + return VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT; + case DescriptorType::kTextureSampler: + return VK_DESCRIPTOR_TYPE_SAMPLER; + case DescriptorType::kTexture: + return VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE; + case DescriptorType::kCombinedTextureSampler: + return VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER; + case DescriptorType::kStorageBuffer: + return VK_DESCRIPTOR_TYPE_STORAGE_BUFFER; + case DescriptorType::kInputAttachment: + return VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT; + } + SkUNREACHABLE; +} + +bool vkFormatIsSupported(VkFormat format) { + switch (format) { + case VK_FORMAT_R8G8B8A8_UNORM: + case VK_FORMAT_B8G8R8A8_UNORM: + case VK_FORMAT_R8G8B8A8_SRGB: + case VK_FORMAT_R8G8B8_UNORM: + case VK_FORMAT_R8G8_UNORM: + case VK_FORMAT_A2B10G10R10_UNORM_PACK32: + case VK_FORMAT_A2R10G10B10_UNORM_PACK32: + case VK_FORMAT_R5G6B5_UNORM_PACK16: + case VK_FORMAT_B4G4R4A4_UNORM_PACK16: + case VK_FORMAT_R4G4B4A4_UNORM_PACK16: + case VK_FORMAT_R8_UNORM: + case VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK: + case VK_FORMAT_BC1_RGB_UNORM_BLOCK: + case VK_FORMAT_BC1_RGBA_UNORM_BLOCK: + case VK_FORMAT_R16G16B16A16_SFLOAT: + case VK_FORMAT_R16_SFLOAT: + case VK_FORMAT_R16_UNORM: + case VK_FORMAT_R16G16_UNORM: + case VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM: + case VK_FORMAT_G8_B8R8_2PLANE_420_UNORM: + case VK_FORMAT_R16G16B16A16_UNORM: + case VK_FORMAT_R16G16_SFLOAT: + case VK_FORMAT_S8_UINT: + case VK_FORMAT_D24_UNORM_S8_UINT: + case VK_FORMAT_D32_SFLOAT_S8_UINT: + return true; + default: + return false; + } +} + } // namespace skgpu::graphite diff --git a/src/gpu/graphite/vk/VulkanGraphiteUtilsPriv.h b/src/gpu/graphite/vk/VulkanGraphiteUtilsPriv.h index 472fac14531b..a116bdd184a0 100644 --- a/src/gpu/graphite/vk/VulkanGraphiteUtilsPriv.h +++ b/src/gpu/graphite/vk/VulkanGraphiteUtilsPriv.h @@ -8,10 +8,14 @@ #ifndef skgpu_graphite_VulkanGraphiteUtilsPriv_DEFINED #define skgpu_graphite_VulkanGraphiteUtilsPriv_DEFINED +#include "include/core/SkSpan.h" #include "include/gpu/vk/VulkanTypes.h" +#include "src/gpu/graphite/DescriptorTypes.h" #include "src/gpu/graphite/Log.h" #include "src/gpu/vk/VulkanInterface.h" +#include + // Helper macros to call functions on the VulkanInterface #define VULKAN_CALL(IFACE, X) (IFACE)->fFunctions.f##X @@ -42,6 +46,13 @@ VkShaderModule createVulkanShaderModule(const VulkanSharedContext*, const std::string& spirv, VkShaderStageFlagBits); +VkDescriptorType DsTypeEnumToVkDs(DescriptorType); +void DescriptorDataToVkDescSetLayout(const VulkanSharedContext*, + const SkSpan&, + VkDescriptorSetLayout*); + +bool vkFormatIsSupported(VkFormat); + } // namespace skgpu::graphite #endif // skgpu_graphite_VulkanGraphiteUtilsPriv_DEFINED diff --git a/src/gpu/graphite/vk/VulkanResourceProvider.cpp b/src/gpu/graphite/vk/VulkanResourceProvider.cpp index 5e19486d344b..327e0e35e1ee 100644 --- a/src/gpu/graphite/vk/VulkanResourceProvider.cpp +++ b/src/gpu/graphite/vk/VulkanResourceProvider.cpp @@ -8,15 +8,11 @@ #include "src/gpu/graphite/vk/VulkanResourceProvider.h" #include "include/core/SkSpan.h" -#include "include/gpu/ShaderErrorHandler.h" #include "include/gpu/graphite/BackendTexture.h" -#include "src/core/SkSLTypeShared.h" -#include "src/gpu/PipelineUtils.h" +#include "src/gpu/MutableTextureStateRef.h" #include "src/gpu/graphite/Buffer.h" #include "src/gpu/graphite/ComputePipeline.h" -#include "src/gpu/graphite/ContextUtils.h" #include "src/gpu/graphite/GraphicsPipeline.h" -#include "src/gpu/graphite/RendererProvider.h" #include "src/gpu/graphite/Sampler.h" #include "src/gpu/graphite/Texture.h" #include "src/gpu/graphite/vk/VulkanBuffer.h" @@ -24,58 +20,50 @@ #include "src/gpu/graphite/vk/VulkanDescriptorPool.h" #include "src/gpu/graphite/vk/VulkanDescriptorSet.h" #include "src/gpu/graphite/vk/VulkanGraphicsPipeline.h" -#include "src/gpu/graphite/vk/VulkanGraphiteUtilsPriv.h" #include "src/gpu/graphite/vk/VulkanSampler.h" #include "src/gpu/graphite/vk/VulkanSharedContext.h" #include "src/gpu/graphite/vk/VulkanTexture.h" -#include "src/sksl/SkSLProgramKind.h" -#include "src/sksl/SkSLProgramSettings.h" -#include "src/sksl/ir/SkSLProgram.h" +#include "src/sksl/SkSLCompiler.h" namespace skgpu::graphite { -VkDescriptorSetLayout VulkanResourceProvider::DescTypeAndCountToVkDescSetLayout( - const VulkanSharedContext* ctxt, - SkSpan requestedDescriptors) { +GraphiteResourceKey build_desc_set_key(const SkSpan& requestedDescriptors, + const uint32_t uniqueId) { + // TODO(nicolettep): Finalize & optimize key structure. Refactor to have the order of the + // requested descriptors be irrelevant. + // For now, to place some kind of upper limit on key size, limit a key to only containing + // information for up to 9 descriptors. This number was selected due to having a maximum of 3 + // uniform buffer descriptors and observationally only encountering up to 6 texture/samplers for + // our testing use cases. The 10th uint32 is reserved for housing a unique descriptor set ID. + static const int kMaxDescriptorQuantity = 9; + static const int kNum32DataCnt = kMaxDescriptorQuantity + 1; + static const ResourceType kType = GraphiteResourceKey::GenerateResourceType(); - VkDescriptorSetLayout layout; - skia_private::STArray bindingLayouts; + GraphiteResourceKey key; + GraphiteResourceKey::Builder builder(&key, kType, kNum32DataCnt, Shareable::kNo); - for (size_t i = 0, j = 0; i < requestedDescriptors.size(); i++) { - if (requestedDescriptors[i].count != 0) { - VkDescriptorSetLayoutBinding* layoutBinding = &bindingLayouts.at(j++); - memset(layoutBinding, 0, sizeof(VkDescriptorSetLayoutBinding)); - layoutBinding->binding = 0; - layoutBinding->descriptorType = - VulkanDescriptorSet::DsTypeEnumToVkDs(requestedDescriptors[i].type); - layoutBinding->descriptorCount = requestedDescriptors[i].count; - // TODO: Obtain layout binding stage flags from visibility (vertex or shader) - layoutBinding->stageFlags = 0; - // TODO: Optionally set immutableSamplers here. - layoutBinding->pImmutableSamplers = nullptr; - } + if (requestedDescriptors.size() > kMaxDescriptorQuantity) { + SKGPU_LOG_E("%d descriptors requested, but graphite currently only supports creating" + "descriptor set keys for up to %d. The key will only take the first %d into" + " account.", static_cast(requestedDescriptors.size()), + kMaxDescriptorQuantity, kMaxDescriptorQuantity); } - VkDescriptorSetLayoutCreateInfo layoutCreateInfo; - memset(&layoutCreateInfo, 0, sizeof(VkDescriptorSetLayoutCreateInfo)); - layoutCreateInfo.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; - layoutCreateInfo.pNext = nullptr; - layoutCreateInfo.flags = 0; - layoutCreateInfo.bindingCount = bindingLayouts.size(); - layoutCreateInfo.pBindings = &bindingLayouts.front(); - - VkResult result; - VULKAN_CALL_RESULT(ctxt->interface(), - result, - CreateDescriptorSetLayout(ctxt->device(), - &layoutCreateInfo, - nullptr, - &layout)); - if (result != VK_SUCCESS) { - SkDebugf("Failed to create VkDescriptorSetLayout\n"); - layout = VK_NULL_HANDLE; + for (size_t i = 0; i < kNum32DataCnt; i++) { + if (i < requestedDescriptors.size()) { + // TODO: Consider making the DescriptorData struct itself just use uint16_t. + uint16_t smallerCount = static_cast(requestedDescriptors[i].count); + builder[i] = static_cast(requestedDescriptors[i].type) << 24 + | requestedDescriptors[i].bindingIndex << 16 + | smallerCount; + } else { + // Populate reminaing key components with 0. + builder[i] = 0; + } } - return layout; + builder[kNum32DataCnt - 1] = uniqueId; + builder.finish(); + return key; } VulkanResourceProvider::VulkanResourceProvider(SharedContext* sharedContext, @@ -83,98 +71,39 @@ VulkanResourceProvider::VulkanResourceProvider(SharedContext* sharedContext, uint32_t recorderID) : ResourceProvider(sharedContext, singleOwner, recorderID) {} -VulkanResourceProvider::~VulkanResourceProvider() {} +VulkanResourceProvider::~VulkanResourceProvider() { + if (fPipelineCache != VK_NULL_HANDLE) { + VULKAN_CALL(this->vulkanSharedContext()->interface(), + DestroyPipelineCache(this->vulkanSharedContext()->device(), + fPipelineCache, + nullptr)); + } +} const VulkanSharedContext* VulkanResourceProvider::vulkanSharedContext() { return static_cast(fSharedContext); } -sk_sp VulkanResourceProvider::createWrappedTexture(const BackendTexture&) { - return nullptr; +sk_sp VulkanResourceProvider::createWrappedTexture(const BackendTexture& texture) { + return VulkanTexture::MakeWrapped(this->vulkanSharedContext(), + texture.dimensions(), + texture.info(), + texture.getMutableState(), + texture.getVkImage(), + {}); } sk_sp VulkanResourceProvider::createGraphicsPipeline( const RuntimeEffectDictionary* runtimeDict, const GraphicsPipelineDesc& pipelineDesc, const RenderPassDesc& renderPassDesc) { - SkSL::Program::Interface vsInterface, fsInterface; - SkSL::ProgramSettings settings; - - settings.fForceNoRTFlip = true; // TODO: Confirm - - auto compiler = this->skslCompiler(); - ShaderErrorHandler* errorHandler = fSharedContext->caps()->shaderErrorHandler(); - - const RenderStep* step = - fSharedContext->rendererProvider()->lookup(pipelineDesc.renderStepID()); - - bool useShadingSsboIndex = - fSharedContext->caps()->storageBufferPreferred() && step->performsShading(); - - const FragSkSLInfo fsSkSLInfo = GetSkSLFS(fSharedContext->caps(), - fSharedContext->shaderCodeDictionary(), - runtimeDict, - step, - pipelineDesc.paintParamsID(), - useShadingSsboIndex, - renderPassDesc.fWriteSwizzle); - const std::string& fsSkSL = fsSkSLInfo.fSkSL; - const bool localCoordsNeeded = fsSkSLInfo.fRequiresLocalCoords; - - bool hasFragment = !fsSkSL.empty(); - std::string vsSPIRV, fsSPIRV; - VkShaderModule fsModule = VK_NULL_HANDLE, vsModule = VK_NULL_HANDLE; - - if (hasFragment) { - if (!SkSLToSPIRV(compiler, - fsSkSL, - SkSL::ProgramKind::kGraphiteFragment, - settings, - &fsSPIRV, - &fsInterface, - errorHandler)) { - return {}; - } - - fsModule = createVulkanShaderModule(this->vulkanSharedContext(), - fsSPIRV, - VK_SHADER_STAGE_FRAGMENT_BIT); - - if (!fsModule) { - return {}; - } - } - - if (!SkSLToSPIRV(compiler, - GetSkSLVS(fSharedContext->caps()->resourceBindingRequirements(), - step, - useShadingSsboIndex, - localCoordsNeeded), - SkSL::ProgramKind::kGraphiteVertex, - settings, - &vsSPIRV, - &vsInterface, - errorHandler)) { - return {}; - } - - vsModule = createVulkanShaderModule(this->vulkanSharedContext(), - vsSPIRV, - VK_SHADER_STAGE_VERTEX_BIT); - if (!vsModule) { - return {}; - } - - // TODO: Generate depth-stencil state, blend info + SkSL::Compiler skslCompiler(fSharedContext->caps()->shaderCaps()); return VulkanGraphicsPipeline::Make(this->vulkanSharedContext(), - vsModule, - step->vertexAttributes(), - step->instanceAttributes(), - fsModule, - step->depthStencilSettings(), - step->primitiveType(), - fsSkSLInfo.fBlendInfo, - renderPassDesc); + &skslCompiler, + runtimeDict, + pipelineDesc, + renderPassDesc, + this->pipelineCache()); } sk_sp VulkanResourceProvider::createComputePipeline(const ComputePipelineDesc&) { @@ -203,68 +132,69 @@ BackendTexture VulkanResourceProvider::onCreateBackendTexture(SkISize dimensions return {}; } -VulkanDescriptorSet* VulkanResourceProvider::findOrCreateDescriptorSet( - SkSpan requestedDescriptors) { - GraphiteResourceKey key; - // TODO(nicolettep): Optimize key structure. It is horrendously inefficient but functional. - // Fow now, have each descriptor type and quantity take up an entire uint32_t, with an - // additional uint32_t added to include a unique identifier for different descriptor sets that - // have the same set layout. - static const int kNum32DataCnt = (kDescriptorTypeCount * 2) + 1; - static const ResourceType kType = GraphiteResourceKey::GenerateResourceType(); - - Resource* descSet = nullptr; - // Search for available descriptor sets by assembling the last part of the key with a unique set - // ID (which ranges from 0 to kMaxNumSets - 1). Start the search at 0 and continue until an - // available set is found. +sk_sp VulkanResourceProvider::findOrCreateDescriptorSet( + SkSpan requestedDescriptors) { + if (requestedDescriptors.empty()) { + return nullptr; + } + // Search for available descriptor sets by assembling a key based upon the set's structure with + // a unique set ID (which ranges from 0 to kMaxNumSets - 1). Start the search at 0 and continue + // until an available set is found. // TODO(nicolettep): Explore ways to optimize this traversal. + GraphiteResourceKey descSetKeys [VulkanDescriptorPool::kMaxNumSets]; for (uint32_t i = 0; i < VulkanDescriptorPool::kMaxNumSets; i++) { - GraphiteResourceKey::Builder builder(&key, kType, kNum32DataCnt, Shareable::kNo); - // Assemble the base component of a descriptor set key which is determined by the type and - // quantity of requested descriptors. - for (size_t j = 0, k = 0; k < requestedDescriptors.size(); j = j + 2, k++) { - builder[j+1] = static_cast(requestedDescriptors[k].type); - builder[j] = requestedDescriptors[k].count; - } - builder[kNum32DataCnt - 1] = i; - builder.finish(); - - if ((descSet = fResourceCache->findAndRefResource(key, skgpu::Budgeted::kNo))) { + GraphiteResourceKey key = build_desc_set_key(requestedDescriptors, i); + if (auto descSet = fResourceCache->findAndRefResource(key, skgpu::Budgeted::kNo)) { // A non-null resource pointer indicates we have found an available descriptor set. - return static_cast(descSet); + return sk_sp(static_cast(descSet)); } - key.reset(); + descSetKeys[i] = key; } // If we did not find an existing avilable desc set, allocate sets with the appropriate layout // and add them to the cache. - auto pool = VulkanDescriptorPool::Make(this->vulkanSharedContext(), requestedDescriptors); - VkDescriptorSetLayout layout = DescTypeAndCountToVkDescSetLayout( - this->vulkanSharedContext(), - requestedDescriptors); + VkDescriptorSetLayout layout; + DescriptorDataToVkDescSetLayout(this->vulkanSharedContext(), requestedDescriptors, &layout); + if (!layout) { + return nullptr; + } + auto pool = VulkanDescriptorPool::Make(this->vulkanSharedContext(), + requestedDescriptors, + layout); + SkASSERT(pool); - // Store the key of the first descriptor set so it can be easily accessed later. - GraphiteResourceKey firstSetKey; // Allocate the maximum number of sets so they can be easily accessed as needed from the cache. for (int i = 0; i < VulkanDescriptorPool::kMaxNumSets ; i++) { - GraphiteResourceKey::Builder builder(&key, kType, kNum32DataCnt, Shareable::kNo); - descSet = VulkanDescriptorSet::Make(this->vulkanSharedContext(), pool, &layout).get(); - // Assemble the base component of a descriptor set key which is determined by the type and - // quantity of requested descriptors. - for (size_t j = 0, k = 0; k < requestedDescriptors.size(); j = j + 2, k++) { - builder[j+1] = static_cast(requestedDescriptors[k].type); - builder[j] = requestedDescriptors[k].count; - } - builder[kNum32DataCnt - 1] = i; - builder.finish(); - descSet->setKey(key); - fResourceCache->insertResource(descSet); - if (i == 0) { - firstSetKey = key; + auto descSet = VulkanDescriptorSet::Make(this->vulkanSharedContext(), pool, layout); + SkASSERT(descSet); + descSet->setKey(descSetKeys[i]); + fResourceCache->insertResource(descSet.get()); + } + auto descSet = fResourceCache->findAndRefResource(descSetKeys[0], skgpu::Budgeted::kNo); + return descSet ? sk_sp(static_cast(descSet)) + : nullptr; +} + +VkPipelineCache VulkanResourceProvider::pipelineCache() { + if (fPipelineCache == VK_NULL_HANDLE) { + VkPipelineCacheCreateInfo createInfo; + memset(&createInfo, 0, sizeof(VkPipelineCacheCreateInfo)); + createInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO; + createInfo.pNext = nullptr; + createInfo.flags = 0; + createInfo.initialDataSize = 0; + createInfo.pInitialData = nullptr; + VkResult result; + VULKAN_CALL_RESULT(this->vulkanSharedContext()->interface(), + result, + CreatePipelineCache(this->vulkanSharedContext()->device(), + &createInfo, + nullptr, + &fPipelineCache)); + if (VK_SUCCESS != result) { + fPipelineCache = VK_NULL_HANDLE; } - key.reset(); } - descSet = fResourceCache->findAndRefResource(firstSetKey, skgpu::Budgeted::kNo); - return descSet ? static_cast(descSet) : nullptr; + return fPipelineCache; } } // namespace skgpu::graphite diff --git a/src/gpu/graphite/vk/VulkanResourceProvider.h b/src/gpu/graphite/vk/VulkanResourceProvider.h index 4453758b6489..c6d3326717d4 100644 --- a/src/gpu/graphite/vk/VulkanResourceProvider.h +++ b/src/gpu/graphite/vk/VulkanResourceProvider.h @@ -21,9 +21,6 @@ class VulkanSharedContext; class VulkanResourceProvider final : public ResourceProvider { public: - static VkDescriptorSetLayout DescTypeAndCountToVkDescSetLayout(const VulkanSharedContext* ctxt, - SkSpan); - VulkanResourceProvider(SharedContext* sharedContext, SingleOwner*, uint32_t recorderID); ~VulkanResourceProvider() override; @@ -47,9 +44,11 @@ class VulkanResourceProvider final : public ResourceProvider { BackendTexture onCreateBackendTexture(SkISize dimensions, const TextureInfo&) override; void onDeleteBackendTexture(BackendTexture&) override {} - VulkanDescriptorSet* findOrCreateDescriptorSet(SkSpan); + sk_sp findOrCreateDescriptorSet(SkSpan); + VkPipelineCache pipelineCache(); friend class VulkanCommandBuffer; + VkPipelineCache fPipelineCache = VK_NULL_HANDLE; }; } // namespace skgpu::graphite diff --git a/src/gpu/graphite/vk/VulkanTexture.cpp b/src/gpu/graphite/vk/VulkanTexture.cpp index 49e91321da71..9511dca05296 100644 --- a/src/gpu/graphite/vk/VulkanTexture.cpp +++ b/src/gpu/graphite/vk/VulkanTexture.cpp @@ -156,11 +156,11 @@ sk_sp VulkanTexture::Make(const VulkanSharedContext* sharedContext, } sk_sp VulkanTexture::MakeWrapped(const VulkanSharedContext* sharedContext, - SkISize dimensions, - const TextureInfo& info, - sk_sp mutableState, - VkImage image, - const VulkanAlloc& alloc) { + SkISize dimensions, + const TextureInfo& info, + sk_sp mutableState, + VkImage image, + const VulkanAlloc& alloc) { return sk_sp(new VulkanTexture(sharedContext, dimensions, info, @@ -189,7 +189,7 @@ void VulkanTexture::setImageLayoutAndQueueIndex(VulkanCommandBuffer* cmdBuffer, VkAccessFlags dstAccessMask, VkPipelineStageFlags dstStageMask, bool byRegion, - uint32_t newQueueFamilyIndex) { + uint32_t newQueueFamilyIndex) const { SkASSERT(newLayout == this->currentLayout() || (VK_IMAGE_LAYOUT_UNDEFINED != newLayout && @@ -302,9 +302,13 @@ void VulkanTexture::freeGpuData() { // Need to delete any ImageViews first fImageViews.clear(); - auto sharedContext = static_cast(this->sharedContext()); - VULKAN_CALL(sharedContext->interface(), DestroyImage(sharedContext->device(), fImage, nullptr)); - skgpu::VulkanMemory::FreeImageMemory(sharedContext->memoryAllocator(), fMemoryAlloc); + // If the texture is wrapped we don't own this data + if (this->ownership() != Ownership::kWrapped) { + auto sharedContext = static_cast(this->sharedContext()); + VULKAN_CALL(sharedContext->interface(), + DestroyImage(sharedContext->device(), fImage, nullptr)); + skgpu::VulkanMemory::FreeImageMemory(sharedContext->memoryAllocator(), fMemoryAlloc); + } } VkImageLayout VulkanTexture::currentLayout() const { @@ -370,7 +374,7 @@ VkAccessFlags VulkanTexture::LayoutToSrcAccessMask(const VkImageLayout layout) { return flags; } -const VulkanImageView* VulkanTexture::getImageView(VulkanImageView::Usage usage) { +const VulkanImageView* VulkanTexture::getImageView(VulkanImageView::Usage usage) const { for (int i = 0; i < fImageViews.size(); ++i) { if (fImageViews[i]->usage() == usage) { return fImageViews[i].get(); diff --git a/src/gpu/graphite/vk/VulkanTexture.h b/src/gpu/graphite/vk/VulkanTexture.h index e10195c13d58..2da48f167007 100644 --- a/src/gpu/graphite/vk/VulkanTexture.h +++ b/src/gpu/graphite/vk/VulkanTexture.h @@ -56,7 +56,7 @@ class VulkanTexture : public Texture { VkImageLayout newLayout, VkAccessFlags dstAccessMask, VkPipelineStageFlags dstStageMask, - bool byRegion) { + bool byRegion) const { this->setImageLayoutAndQueueIndex(buffer, newLayout, dstAccessMask, dstStageMask, byRegion, VK_QUEUE_FAMILY_IGNORED); } @@ -66,12 +66,12 @@ class VulkanTexture : public Texture { VkAccessFlags dstAccessMask, VkPipelineStageFlags dstStageMask, bool byRegion, - uint32_t newQueueFamilyIndex); + uint32_t newQueueFamilyIndex) const; VkImageLayout currentLayout() const; uint32_t currentQueueFamilyIndex() const; - const VulkanImageView* getImageView(VulkanImageView::Usage); + const VulkanImageView* getImageView(VulkanImageView::Usage) const; // Helpers to use for setting the layout of the VkImage static VkPipelineStageFlags LayoutToPipelineSrcStageFlags(const VkImageLayout layout); @@ -92,7 +92,7 @@ class VulkanTexture : public Texture { VkImage fImage; VulkanAlloc fMemoryAlloc; - skia_private::STArray<2, std::unique_ptr> fImageViews; + mutable skia_private::STArray<2, std::unique_ptr> fImageViews; }; } // namespace skgpu::graphite diff --git a/src/gpu/tessellate/MiddleOutPolygonTriangulator.h b/src/gpu/tessellate/MiddleOutPolygonTriangulator.h index 75aec6460879..df600c1423ac 100644 --- a/src/gpu/tessellate/MiddleOutPolygonTriangulator.h +++ b/src/gpu/tessellate/MiddleOutPolygonTriangulator.h @@ -134,7 +134,7 @@ class MiddleOutPolygonTriangulator { // Returns an RAII object that first allows the caller to iterate the triangles we will pop, // pops those triangles, and finally pushes 'pt' onto the vertex stack. - SK_WARN_UNUSED_RESULT PoppedTriangleStack pushVertex(SkPoint pt) { + [[nodiscard]] PoppedTriangleStack pushVertex(SkPoint pt) { // Our topology wants triangles that have the same vertexIdxDelta on both sides: // e.g., a run of 9 points should be triangulated as: // @@ -161,7 +161,7 @@ class MiddleOutPolygonTriangulator { // Returns an RAII object that first allows the caller to iterate the remaining triangles, then // resets the vertex stack with newStartPoint. - SK_WARN_UNUSED_RESULT PoppedTriangleStack closeAndMove(SkPoint newStartPoint) { + [[nodiscard]] PoppedTriangleStack closeAndMove(SkPoint newStartPoint) { // Add an implicit line back to the starting point. SkPoint startPt = fVertexStack[0].fPoint; @@ -178,7 +178,7 @@ class MiddleOutPolygonTriangulator { // Returns an RAII object that first allows the caller to iterate the remaining triangles, then // resets the vertex stack with the same starting point as it had before. - SK_WARN_UNUSED_RESULT PoppedTriangleStack close() { + [[nodiscard]] PoppedTriangleStack close() { return this->closeAndMove(fVertexStack[0].fPoint); } diff --git a/src/gpu/tessellate/WangsFormula.h b/src/gpu/tessellate/WangsFormula.h index 1ca46ca081f1..ffa9c8c5b238 100644 --- a/src/gpu/tessellate/WangsFormula.h +++ b/src/gpu/tessellate/WangsFormula.h @@ -42,12 +42,47 @@ AI float root4(float x) { return sqrtf(sqrtf(x)); } +// For finite positive x > 1, return ceil(log2(x)) otherwise, return 0. +// For +/- NaN return 0. +// For +infinity return 128. +// For -infinity return 0. +// +// nextlog2((-inf..1]) -> 0 +// nextlog2((1..2]) -> 1 +// nextlog2((2..4]) -> 2 +// nextlog2((4..8]) -> 3 +// ... +AI int nextlog2(float x) { + if (x <= 1) { + return 0; + } + + uint32_t bits = (uint32_t)SkFloat2Bits(x); + static constexpr uint32_t kDigitsAfterBinaryPoint = std::numeric_limits::digits - 1; + + // The constant is a significand of all 1s -- 0b0'00000000'111'1111111111'111111111. So, if + // the significand of x is all 0s (and therefore an integer power of two) this will not + // increment the exponent, but if it is just one ULP above the power of two the carry will + // ripple into the exponent incrementing the exponent by 1. + bits += (1u << kDigitsAfterBinaryPoint) - 1u; + + // Shift the exponent down, and adjust it by the exponent offset so that 2^0 is really 0 instead + // of 127. Remember that 1 was added to the exponent, if x is NaN, then the exponent will + // carry a 1 into the sign bit during the addition to bits. Be sure to strip off the sign bit. + // In addition, infinity is an exponent of all 1's, and a significand of all 0, so + // the exponent is not affected during the addition to bits, and the exponent remains all 1's. + const int exp = ((bits >> kDigitsAfterBinaryPoint) & 0b1111'1111) - 127; + + // Return 0 for x <= 1. + return exp > 0 ? exp : 0; +} + // Returns nextlog2(sqrt(x)): // // log2(sqrt(x)) == log2(x^(1/2)) == log2(x)/2 == log2(x)/log2(4) == log4(x) // AI int nextlog4(float x) { - return (sk_float_nextlog2(x) + 1) >> 1; + return (nextlog2(x) + 1) >> 1; } // Returns nextlog2(sqrt(sqrt(x))): @@ -55,7 +90,7 @@ AI int nextlog4(float x) { // log2(sqrt(sqrt(x))) == log2(x^(1/4)) == log2(x)/4 == log2(x)/log2(16) == log16(x) // AI int nextlog16(float x) { - return (sk_float_nextlog2(x) + 3) >> 2; + return (nextlog2(x) + 3) >> 2; } // Represents the upper-left 2x2 matrix of an affine transform for applying to vectors: diff --git a/src/gpu/vk/VulkanUtilsPriv.h b/src/gpu/vk/VulkanUtilsPriv.h index 462113f5d40b..6de1e33aa78a 100644 --- a/src/gpu/vk/VulkanUtilsPriv.h +++ b/src/gpu/vk/VulkanUtilsPriv.h @@ -10,6 +10,8 @@ #include "include/gpu/vk/VulkanTypes.h" +#include "include/core/SkColor.h" + namespace skgpu { static constexpr uint32_t VkFormatChannels(VkFormat vkFormat) { diff --git a/src/image/SkImage.cpp b/src/image/SkImage.cpp index 00f42b0c1888..905fd8b1894e 100644 --- a/src/image/SkImage.cpp +++ b/src/image/SkImage.cpp @@ -10,13 +10,19 @@ #include "include/core/SkBitmap.h" #include "include/core/SkColorSpace.h" #include "include/core/SkData.h" +#include "include/core/SkMatrix.h" #include "include/core/SkPixmap.h" +#include "include/core/SkPoint.h" #include "include/core/SkTileMode.h" #include "include/core/SkTypes.h" #include "src/core/SkColorSpacePriv.h" +#include "src/core/SkImageFilterCache.h" +#include "src/core/SkImageFilterTypes.h" +#include "src/core/SkImageFilter_Base.h" #include "src/core/SkImageInfoPriv.h" #include "src/core/SkMipmap.h" #include "src/core/SkNextID.h" +#include "src/core/SkSpecialImage.h" #include "src/image/SkImage_Base.h" #include "src/shaders/SkImageShader.h" @@ -81,6 +87,31 @@ void SkImage::asyncRescaleAndReadPixelsYUV420(SkYUVColorSpace yuvColorSpace, return; } as_IB(this)->onAsyncRescaleAndReadPixelsYUV420(yuvColorSpace, + /*readAlpha=*/false, + std::move(dstColorSpace), + srcRect, + dstSize, + rescaleGamma, + rescaleMode, + callback, + context); +} + +void SkImage::asyncRescaleAndReadPixelsYUVA420(SkYUVColorSpace yuvColorSpace, + sk_sp dstColorSpace, + const SkIRect& srcRect, + const SkISize& dstSize, + RescaleGamma rescaleGamma, + RescaleMode rescaleMode, + ReadPixelsCallback callback, + ReadPixelsContext context) const { + if (!SkIRect::MakeWH(this->width(), this->height()).contains(srcRect) || dstSize.isZero() || + (dstSize.width() & 0b1) || (dstSize.height() & 0b1)) { + callback(context, nullptr); + return; + } + as_IB(this)->onAsyncRescaleAndReadPixelsYUV420(yuvColorSpace, + /*readAlpha=*/true, std::move(dstColorSpace), srcRect, dstSize, @@ -270,16 +301,66 @@ sk_sp SkImage::withDefaultMipmaps() const { return this->withMipmaps(nullptr); } -#if !defined(SK_DISABLE_LEGACY_IMAGE_COLORSPACE_METHODS) -sk_sp SkImage::makeColorSpace(sk_sp target, GrDirectContext* direct) const { - return makeColorSpace(direct, target); -} -#endif +sk_sp SkImage::makeWithFilter(GrRecordingContext* rContext, + const SkImageFilter* filter, + const SkIRect& subset, + const SkIRect& clipBounds, + SkIRect* outSubset, + SkIPoint* offset) const { + if (!filter || !outSubset || !offset || !this->bounds().contains(subset)) { + return nullptr; + } + + sk_sp cache( + SkImageFilterCache::Create(SkImageFilterCache::kDefaultTransientSize)); + + // The filters operate in the local space of the src image, where (0,0) corresponds to the + // subset's top left corner. But the clip bounds and any crop rects on the filters are in the + // original coordinate system, so configure the CTM to correct crop rects and explicitly adjust + // the clip bounds (since it is assumed to already be in image space). + // TODO: Once all image filters support it, we can just use the subset's top left corner as + // the source FilterResult's origin. + skif::ContextInfo ctxInfo = { + skif::Mapping(SkMatrix::Translate(-subset.x(), -subset.y())), + skif::LayerSpace(clipBounds.makeOffset(-subset.topLeft())), + /*srcImag=*/{}, // Will be filled in with this image after createContext() comes back + fInfo.colorType(), + fInfo.colorSpace(), + /*fSurfaceProps=*/{}, + cache.get()}; + skif::Context context = as_IB(this)->onCreateFilterContext(rContext, ctxInfo); + + auto srcSpecialImage = context.makeImage(subset, sk_ref_sp(this)); + if (!srcSpecialImage) { + return nullptr; + } -#if !defined(SK_DISABLE_LEGACY_IMAGE_COLORSPACE_METHODS) -sk_sp SkImage::makeColorTypeAndColorSpace(SkColorType targetColorType, - sk_sp targetColorSpace, - GrDirectContext* direct) const { - return makeColorTypeAndColorSpace(direct, targetColorType, targetColorSpace); + // TODO: Pass subset.topLeft() as the origin of the source FilterResult + context = context.withNewSource(skif::FilterResult{srcSpecialImage}); + sk_sp result = as_IFB(filter)->filterImage(context) + .imageAndOffset(context, offset); + if (!result) { + return nullptr; + } + + // The output image and offset are relative to the subset rectangle, so the offset needs to + // be shifted to put it in the correct spot with respect to the original coordinate system + offset->fX += subset.x(); + offset->fY += subset.y(); + + // Final clip against the exact clipBounds (the clip provided in the context gets adjusted + // to account for pixel-moving filters so doesn't always exactly match when finished). The + // clipBounds are translated into the clippedDstRect coordinate space, including the + // result->subset() ensures that the result's image pixel origin does not affect results. + SkIRect dstRect = result->subset(); + SkIRect clippedDstRect = dstRect; + if (!clippedDstRect.intersect(clipBounds.makeOffset(result->subset().topLeft() - *offset))) { + return nullptr; + } + + // Adjust the geometric offset if the top-left corner moved as well + offset->fX += (clippedDstRect.x() - dstRect.x()); + offset->fY += (clippedDstRect.y() - dstRect.y()); + *outSubset = clippedDstRect; + return result->asImage(); } -#endif diff --git a/src/image/SkImage_AndroidFactories.cpp b/src/image/SkImage_AndroidFactories.cpp index f79e50aaafa1..a595c96dbe6c 100644 --- a/src/image/SkImage_AndroidFactories.cpp +++ b/src/image/SkImage_AndroidFactories.cpp @@ -11,6 +11,7 @@ #include "include/android/SkImageAndroid.h" +#include "include/android/GrAHardwareBufferUtils.h" #include "include/core/SkAlphaType.h" #include "include/core/SkBitmap.h" #include "include/core/SkColorSpace.h" @@ -37,7 +38,6 @@ #include "src/gpu/RefCntedCallback.h" #include "src/gpu/SkBackingFit.h" #include "src/gpu/ganesh/GrAHardwareBufferImageGenerator.h" -#include "src/gpu/ganesh/GrAHardwareBufferUtils_impl.h" #include "src/gpu/ganesh/GrBackendTextureImageGenerator.h" #include "src/gpu/ganesh/GrBackendUtils.h" #include "src/gpu/ganesh/GrCaps.h" diff --git a/src/image/SkImage_Base.cpp b/src/image/SkImage_Base.cpp index dab64de05b2f..5a2c3f8e2269 100644 --- a/src/image/SkImage_Base.cpp +++ b/src/image/SkImage_Base.cpp @@ -12,27 +12,19 @@ #include "include/core/SkColorType.h" #include "include/core/SkImage.h" #include "include/core/SkImageInfo.h" -#include "include/core/SkMatrix.h" #include "include/core/SkPixmap.h" -#include "include/core/SkPoint.h" #include "include/core/SkRect.h" #include "include/core/SkSize.h" -#include "include/core/SkSurfaceProps.h" #include "include/core/SkTypes.h" #include "include/private/base/SkDebug.h" #include "src/core/SkBitmapCache.h" #include "src/core/SkColorSpacePriv.h" -#include "src/core/SkImageFilterCache.h" #include "src/core/SkImageFilterTypes.h" -#include "src/core/SkImageFilter_Base.h" -#include "src/core/SkSpecialImage.h" #include "src/image/SkRescaleAndReadPixels.h" #include #include -class SkImageFilter; - SkImage_Base::SkImage_Base(const SkImageInfo& info, uint32_t uniqueID) : SkImage(info, uniqueID), fAddedToRasterCache(false) {} @@ -119,80 +111,8 @@ sk_sp SkImage_Base::makeSubset(skgpu::graphite::Recorder* recorder, return this->onMakeSubset(recorder, subset, requiredProps); } -sk_sp SkImage_Base::makeWithFilter(GrRecordingContext*, - const SkImageFilter* filter, - const SkIRect& subset, - const SkIRect& clipBounds, - SkIRect* outSubset, - SkIPoint* offset) const { - if (!filter || !outSubset || !offset || !this->bounds().contains(subset)) { - return nullptr; - } - - auto srcSpecialImage = SkSpecialImage::MakeFromImage( - nullptr, subset, sk_ref_sp(const_cast(this)), SkSurfaceProps()); - if (!srcSpecialImage) { - return nullptr; - } - - sk_sp cache( - SkImageFilterCache::Create(SkImageFilterCache::kDefaultTransientSize)); - - // The filters operate in the local space of the src image, where (0,0) corresponds to the - // subset's top left corner. But the clip bounds and any crop rects on the filters are in the - // original coordinate system, so configure the CTM to correct crop rects and explicitly adjust - // the clip bounds (since it is assumed to already be in image space). - // TODO: Once all image filters support it, we can just use the subset's top left corner as - // the source FilterResult's origin. - skif::ContextInfo ctxInfo = { - skif::Mapping(SkMatrix::Translate(-subset.x(), -subset.y())), - skif::LayerSpace(clipBounds.makeOffset(-subset.topLeft())), - skif::FilterResult(srcSpecialImage), - fInfo.colorType(), - fInfo.colorSpace(), - /*fSurfaceProps=*/{}, - cache.get()}; - skif::Context context = skif::Context::MakeRaster(ctxInfo); - - return this->filterSpecialImage( - context, as_IFB(filter), srcSpecialImage.get(), subset, clipBounds, outSubset, offset); -} - -sk_sp SkImage_Base::filterSpecialImage(skif::Context context, - const SkImageFilter_Base* filter, - const SkSpecialImage* specialImage, - const SkIRect& subset, - const SkIRect& clipBounds, - SkIRect* outSubset, - SkIPoint* offset) const { - sk_sp result = filter->filterImage(context).imageAndOffset(context, offset); - if (!result) { - return nullptr; - } - - // The output image and offset are relative to the subset rectangle, so the offset needs to - // be shifted to put it in the correct spot with respect to the original coordinate system - offset->fX += subset.x(); - offset->fY += subset.y(); - - // Final clip against the exact clipBounds (the clip provided in the context gets adjusted - // to account for pixel-moving filters so doesn't always exactly match when finished). The - // clipBounds are translated into the clippedDstRect coordinate space, including the - // result->subset() ensures that the result's image pixel origin does not affect results. - SkIRect dstRect = result->subset(); - SkIRect clippedDstRect = dstRect; - if (!clippedDstRect.intersect(clipBounds.makeOffset(result->subset().topLeft() - *offset))) { - return nullptr; - } - - // Adjust the geometric offset if the top-left corner moved as well - offset->fX += (clippedDstRect.x() - dstRect.x()); - offset->fY += (clippedDstRect.y() - dstRect.y()); - *outSubset = clippedDstRect; - return result->asImage(); -} - void SkImage_Base::onAsyncRescaleAndReadPixelsYUV420(SkYUVColorSpace, + bool readAlpha, sk_sp dstColorSpace, SkIRect srcRect, SkISize dstSize, @@ -245,3 +165,8 @@ sk_sp SkImage_Base::makeColorTypeAndColorSpace(skgpu::graphite::Recorde // this method and things work correctly. return this->makeColorTypeAndColorSpace(nullptr, ct, std::move(cs)); } + +skif::Context SkImage_Base::onCreateFilterContext(GrRecordingContext*, + const skif::ContextInfo& ctxInfo) const { + return skif::Context::MakeRaster(ctxInfo); +} diff --git a/src/image/SkImage_Base.h b/src/image/SkImage_Base.h index ac74f2b8ac23..522f2e423983 100644 --- a/src/image/SkImage_Base.h +++ b/src/image/SkImage_Base.h @@ -23,13 +23,9 @@ class GrImageContext; class GrRecordingContext; class SkBitmap; class SkColorSpace; -class SkImageFilter; -class SkImageFilter_Base; class SkPixmap; -class SkSpecialImage; enum SkColorType : int; enum SkYUVColorSpace : int; -struct SkIPoint; struct SkIRect; struct SkISize; struct SkImageInfo; @@ -40,6 +36,7 @@ enum { namespace skif { class Context; +struct ContextInfo; } namespace skgpu { namespace graphite { class Recorder; } } @@ -64,12 +61,7 @@ class SkImage_Base : public SkImage { sk_sp makeSubset(skgpu::graphite::Recorder*, const SkIRect&, RequiredProperties) const override; - sk_sp makeWithFilter(GrRecordingContext* context, - const SkImageFilter* filter, - const SkIRect& subset, - const SkIRect& clipBounds, - SkIRect* outSubset, - SkIPoint* offset) const override; + size_t textureSize() const override { return 0; } // Methods that we want to use elsewhere in Skia, but not be a part of the public API. @@ -106,6 +98,7 @@ class SkImage_Base : public SkImage { * Default implementation does a rescale/read/yuv conversion and then calls the callback. */ virtual void onAsyncRescaleAndReadPixelsYUV420(SkYUVColorSpace, + bool readAlpha, sk_sp dstColorSpace, SkIRect srcRect, SkISize dstSize, @@ -194,17 +187,13 @@ class SkImage_Base : public SkImage { const SkIRect&, RequiredProperties) const = 0; + // Returns a raster-backed image filtering context by default. + virtual skif::Context onCreateFilterContext(GrRecordingContext* rContext, + const skif::ContextInfo& info) const; + protected: SkImage_Base(const SkImageInfo& info, uint32_t uniqueID); - sk_sp filterSpecialImage(skif::Context context, - const SkImageFilter_Base* filter, - const SkSpecialImage* specialImage, - const SkIRect& subset, - const SkIRect& clipBounds, - SkIRect* outSubset, - SkIPoint* offset) const; - private: // Set true by caches when they cache content that's derived from the current pixels. mutable std::atomic fAddedToRasterCache; diff --git a/src/image/SkSurface.cpp b/src/image/SkSurface.cpp index 9ece09aadc76..333ef9a1dd1b 100644 --- a/src/image/SkSurface.cpp +++ b/src/image/SkSurface.cpp @@ -156,6 +156,31 @@ void SkSurface::asyncRescaleAndReadPixelsYUV420(SkYUVColorSpace yuvColorSpace, return; } asSB(this)->onAsyncRescaleAndReadPixelsYUV420(yuvColorSpace, + /*readAlpha=*/false, + std::move(dstColorSpace), + srcRect, + dstSize, + rescaleGamma, + rescaleMode, + callback, + context); +} + +void SkSurface::asyncRescaleAndReadPixelsYUVA420(SkYUVColorSpace yuvColorSpace, + sk_sp dstColorSpace, + const SkIRect& srcRect, + const SkISize& dstSize, + RescaleGamma rescaleGamma, + RescaleMode rescaleMode, + ReadPixelsCallback callback, + ReadPixelsContext context) { + if (!SkIRect::MakeWH(this->width(), this->height()).contains(srcRect) || dstSize.isZero() || + (dstSize.width() & 0b1) || (dstSize.height() & 0b1)) { + callback(context, nullptr); + return; + } + asSB(this)->onAsyncRescaleAndReadPixelsYUV420(yuvColorSpace, + /*readAlpha=*/true, std::move(dstColorSpace), srcRect, dstSize, @@ -209,49 +234,3 @@ bool SkSurface::characterize(GrSurfaceCharacterization* characterization) const bool SkSurface::isCompatible(const GrSurfaceCharacterization& characterization) const { return asConstSB(this)->onIsCompatible(characterization); } - -#if !defined(SK_DISABLE_LEGACY_SKSURFACE_FLUSH) && !defined(SK_GANESH) -void SkSurface::flush() {} -void SkSurface::flushAndSubmit(bool syncCpu) {} -#endif - -#if !defined(SK_DISABLE_LEGACY_SKSURFACE_FLUSH) && defined(SK_GANESH) -#include "include/gpu/GrDirectContext.h" -#include "include/gpu/GrRecordingContext.h" -#include "include/gpu/GrTypes.h" -#include "include/gpu/ganesh/SkSurfaceGanesh.h" - -GrSemaphoresSubmitted SkSurface::flush(BackendSurfaceAccess access, const GrFlushInfo& info) { - auto dContext = GrAsDirectContext(this->recordingContext()); - if (!dContext) { - return GrSemaphoresSubmitted::kNo; - } - return dContext->flush(this, access, info); -} - -GrSemaphoresSubmitted SkSurface::flush(const GrFlushInfo& info, - const skgpu::MutableTextureState* newState) { - auto dContext = GrAsDirectContext(this->recordingContext()); - if (!dContext) { - return GrSemaphoresSubmitted::kNo; - } - return dContext->flush(this, info, newState); -} - -void SkSurface::flush() { - this->flush(GrFlushInfo()); -} - -void SkSurface::flushAndSubmit(bool syncCpu) { - this->flush(BackendSurfaceAccess::kNoAccess, GrFlushInfo()); - - auto direct = GrAsDirectContext(this->recordingContext()); - if (direct) { - direct->submit(syncCpu); - } -} - -void SkSurface::resolveMSAA() { - SkSurfaces::ResolveMSAA(this); -} -#endif diff --git a/src/image/SkSurface_Base.cpp b/src/image/SkSurface_Base.cpp index d2d4943bfe84..67826bef32be 100644 --- a/src/image/SkSurface_Base.cpp +++ b/src/image/SkSurface_Base.cpp @@ -80,8 +80,8 @@ void SkSurface_Base::onAsyncRescaleAndReadPixels(const SkImageInfo& info, } void SkSurface_Base::onAsyncRescaleAndReadPixelsYUV420( - SkYUVColorSpace yuvColorSpace, sk_sp dstColorSpace, SkIRect srcRect, - SkISize dstSize, RescaleGamma rescaleGamma, RescaleMode, + SkYUVColorSpace yuvColorSpace, bool readAlpha, sk_sp dstColorSpace, + SkIRect srcRect, SkISize dstSize, RescaleGamma rescaleGamma, RescaleMode, ReadPixelsCallback callback, ReadPixelsContext context) { // TODO: Call non-YUV asyncRescaleAndReadPixels and then make our callback convert to YUV and // call client's callback. diff --git a/src/image/SkSurface_Base.h b/src/image/SkSurface_Base.h index f007dd046f12..93755184af0d 100644 --- a/src/image/SkSurface_Base.h +++ b/src/image/SkSurface_Base.h @@ -108,6 +108,7 @@ class SkSurface_Base : public SkSurface { * Default implementation does a rescale/read/yuv conversion and then calls the callback. */ virtual void onAsyncRescaleAndReadPixelsYUV420(SkYUVColorSpace, + bool readAlpha, sk_sp dstColorSpace, SkIRect srcRect, SkISize dstSize, @@ -140,7 +141,7 @@ class SkSurface_Base : public SkSurface { * * Returns false if the backing cannot be un-shared. */ - virtual bool SK_WARN_UNUSED_RESULT onCopyOnWrite(ContentChangeMode) = 0; + [[nodiscard]] virtual bool onCopyOnWrite(ContentChangeMode) = 0; /** * Signal the surface to remind its backing store that it's mutable again. @@ -174,11 +175,11 @@ class SkSurface_Base : public SkSurface { uint32_t newGenerationID(); private: - std::unique_ptr fCachedCanvas; - sk_sp fCachedImage; + std::unique_ptr fCachedCanvas = nullptr; + sk_sp fCachedImage = nullptr; // Returns false if drawing should not take place (allocation failure). - bool SK_WARN_UNUSED_RESULT aboutToDraw(ContentChangeMode mode); + [[nodiscard]] bool aboutToDraw(ContentChangeMode mode); // Returns true if there is an outstanding image-snapshot, indicating that a call to aboutToDraw // would trigger a copy-on-write. diff --git a/src/image/SkTiledImageUtils.cpp b/src/image/SkTiledImageUtils.cpp index de83a0892f41..adc354a3702d 100644 --- a/src/image/SkTiledImageUtils.cpp +++ b/src/image/SkTiledImageUtils.cpp @@ -7,6 +7,18 @@ #include "include/core/SkTiledImageUtils.h" +#include "include/core/SkBitmap.h" +#include "include/core/SkPixelRef.h" +#include "include/private/base/SkAssert.h" +#include "include/private/base/SkTFitsIn.h" +#include "src/image/SkImage_Base.h" + +#if defined(SK_GRAPHITE) +#include "src/gpu/TiledTextureUtils.h" +#endif + +#include + namespace SkTiledImageUtils { void DrawImageRect(SkCanvas* canvas, @@ -16,15 +28,49 @@ void DrawImageRect(SkCanvas* canvas, const SkSamplingOptions& sampling, const SkPaint* paint, SkCanvas::SrcRectConstraint constraint) { - if (!image) { + if (!image || !canvas) { return; } - if (canvas->recordingContext() || canvas->recorder()) { - // TODO: branch off into Ganesh and Graphite specific tiling +#if defined(SK_GRAPHITE) + if (canvas->recorder()) { + if (skgpu::TiledTextureUtils::DrawAsTiledImageRect(canvas, image, src, dst, + SkCanvas::kAll_QuadAAFlags, sampling, + paint, constraint)) { + return; + } } +#endif canvas->drawImageRect(image, src, dst, sampling, paint, constraint); } +void GetImageKeyValues(const SkImage* image, uint32_t keyValues[kNumImageKeyValues]) { + if (!image || !keyValues) { + if (keyValues) { + memset(keyValues, 0, kNumImageKeyValues * sizeof(uint32_t)); + } + return; + } + + SkIRect subset = image->bounds(); + + if (const SkBitmap* bm = as_IB(image)->onPeekBitmap()) { + keyValues[0] = bm->pixelRef()->getGenerationID(); + subset.offset(bm->pixelRefOrigin()); + } else { + keyValues[0] = image->uniqueID(); + } + + SkASSERT(SkTFitsIn(subset.fLeft)); + SkASSERT(SkTFitsIn(subset.fTop)); + SkASSERT(SkTFitsIn(subset.fRight)); + SkASSERT(SkTFitsIn(subset.fBottom)); + + keyValues[1] = subset.fLeft; + keyValues[2] = subset.fTop; + keyValues[3] = subset.fRight; + keyValues[4] = subset.fBottom; +} + } // namespace SkTiledImageUtils diff --git a/src/lazy/SkDiscardableMemoryPool.cpp b/src/lazy/SkDiscardableMemoryPool.cpp index 9184851b137c..0a5d592a8018 100644 --- a/src/lazy/SkDiscardableMemoryPool.cpp +++ b/src/lazy/SkDiscardableMemoryPool.cpp @@ -174,7 +174,7 @@ std::unique_ptr DiscardableMemoryPool::make(size_t bytes) { fList.addToHead(dm.get()); fUsed += bytes; this->dumpDownTo(fBudget); - return std::move(dm); + return dm; } void DiscardableMemoryPool::removeFromPool(PoolDiscardableMemory* dm) { diff --git a/src/opts/BUILD.bazel b/src/opts/BUILD.bazel index 3b9df1ddb141..4e4eb71b3a6d 100644 --- a/src/opts/BUILD.bazel +++ b/src/opts/BUILD.bazel @@ -34,10 +34,11 @@ skia_filegroup( "SkBitmapProcState_opts.h", "SkBlitMask_opts.h", "SkBlitRow_opts.h", + "SkOpts_RestoreTarget.h", + "SkOpts_SetTarget.h", "SkRasterPipeline_opts.h", "SkSwizzler_opts.h", "SkUtils_opts.h", - "SkVM_opts.h", ], visibility = ["//src:__pkg__"], ) @@ -79,23 +80,16 @@ skia_cc_library( ], ) -skia_cc_library( - name = "skx", # https://en.wikipedia.org/wiki/Advanced_Vector_Extensions#AVX-512 - srcs = ["SkOpts_skx.cpp"], - copts = DEFAULT_COPTS + ["-march=skylake-avx512"], - local_defines = DEFAULT_DEFINES + DEFAULT_LOCAL_DEFINES, - textual_hdrs = OPTS_HDRS, - deps = ["@skia_user_config//:user_config"], -) - skia_cc_deps( name = "deps", - visibility = ["//src:__pkg__"], + visibility = [ + "//:__pkg__", # Needed in G3 + "//src:__pkg__", + ], deps = selects.with_or({ ("@platforms//cpu:x86_64", "@platforms//cpu:x86_32"): [ ":avx", ":hsw", - ":skx", ":ssse3", ], # We have no architecture specific optimizations for ARM64 right now diff --git a/src/opts/SkBlitRow_opts.h b/src/opts/SkBlitRow_opts.h index de3cded27c0c..c5143578a991 100644 --- a/src/opts/SkBlitRow_opts.h +++ b/src/opts/SkBlitRow_opts.h @@ -176,9 +176,9 @@ inline void blit_row_s32a_opaque(SkPMColor* dst, const SkPMColor* src, int len, } } -// Blend constant color over count src pixels, writing into dst. +// Blend constant color over count dst pixels /*not static*/ -inline void blit_row_color32(SkPMColor* dst, const SkPMColor* src, int count, SkPMColor color) { +inline void blit_row_color32(SkPMColor* dst, int count, SkPMColor color) { constexpr int N = 4; // 8, 16 also reasonable choices using U32 = skvx::Vec< N, uint32_t>; using U16 = skvx::Vec<4*N, uint16_t>; @@ -199,13 +199,13 @@ inline void blit_row_color32(SkPMColor* dst, const SkPMColor* src, int count, Sk }; while (count >= N) { - kernel(U32::Load(src)).store(dst); - src += N; + kernel(U32::Load(dst)).store(dst); dst += N; count -= N; } while (count --> 0) { - *dst++ = kernel(U32{*src++})[0]; + *dst = kernel(U32{*dst})[0]; + dst++; } } diff --git a/src/opts/SkOpts_RestoreTarget.h b/src/opts/SkOpts_RestoreTarget.h new file mode 100644 index 000000000000..a28572e0a562 --- /dev/null +++ b/src/opts/SkOpts_RestoreTarget.h @@ -0,0 +1,30 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +// Include guards are intentionally omitted + +#include "include/private/base/SkFeatures.h" + +#if SK_OPTS_TARGET == SK_OPTS_TARGET_DEFAULT + // Nothing to do here +#else + + #if !defined(SK_OLD_CPU_SSE_LEVEL) + #error Include SkOpts_SetTarget before including SkOpts_RestoreTarget + #endif + + #undef SK_CPU_SSE_LEVEL + #define SK_CPU_SSE_LEVEL SK_OLD_CPU_SSE_LEVEL + #undef SK_OLD_CPU_SSE_LEVEL + + #if defined(__clang__) + #pragma clang attribute pop + #elif defined(__GNUC__) + #pragma GCC pop_options + #endif + +#endif diff --git a/src/opts/SkOpts_SetTarget.h b/src/opts/SkOpts_SetTarget.h new file mode 100644 index 000000000000..93945fe39233 --- /dev/null +++ b/src/opts/SkOpts_SetTarget.h @@ -0,0 +1,130 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +// Include guards are intentionally omitted + +#include "include/private/base/SkFeatures.h" + +#if !defined(SK_OPTS_TARGET) + #error Define SK_OPTS_TARGET before including SkOpts_SetTarget +#endif + +#if SK_OPTS_TARGET == SK_OPTS_TARGET_DEFAULT + + #if defined(SK_ARM_HAS_NEON) + #define SK_OPTS_NS neon + #elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SKX + #define SK_OPTS_NS skx + #elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_AVX2 + #define SK_OPTS_NS avx2 + #elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_AVX + #define SK_OPTS_NS avx + #elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE42 + #define SK_OPTS_NS sse42 + #elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE41 + #define SK_OPTS_NS sse41 + #elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSSE3 + #define SK_OPTS_NS ssse3 + #elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE3 + #define SK_OPTS_NS sse3 + #elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2 + #define SK_OPTS_NS sse2 + #elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE1 + #define SK_OPTS_NS sse + #else + #define SK_OPTS_NS portable + #endif + + #define DEFINE_DEFAULT(name) decltype(name) name = SK_OPTS_NS::name + +#else // SK_OPTS_TARGET != SK_OPTS_TARGET_DEFAULT + + #if defined(SK_OLD_CPU_SSE_LEVEL) + #error Include SkOpts_RestoreTarget before re-including SkOpts_SetTarget + #endif + + #define SK_OLD_CPU_SSE_LEVEL SK_CPU_SSE_LEVEL + #undef SK_CPU_SSE_LEVEL + + // NOTE: Below, we automatically include arch-specific intrinsic headers when we've detected + // that the compiler is clang-cl. Clang's headers skip including "unsupported" intrinsics (via + // defines like __AVX__ etc.), but only when _MSC_VER is also defined. To get around that, we + // directly include the headers for any intrinsics that ought to be present in each opts target. + // + // Each of the specific intrinsic headers also checks to ensure that immintrin.h has been + // included, so do that here, first. + #if defined(__clang__) && defined(_MSC_VER) + #include + #endif + + // Why not put the target string in a #define, and remove the boilerplate? Because GCC doesn't + // allow the target() option to be expanded by the preprocessor - it must be a literal string. + #if SK_OPTS_TARGET == SK_OPTS_TARGET_SSSE3 + + #define SK_CPU_SSE_LEVEL SK_CPU_SSE_LEVEL_SSSE3 + #define SK_OPTS_NS ssse3 + + #if defined(__clang__) + #pragma clang attribute push(__attribute__((target("sse2,ssse3"))), apply_to=function) + #elif defined(__GNUC__) + #pragma GCC push_options + #pragma GCC target("sse2,ssse3") + #endif + + #if defined(__clang__) && defined(_MSC_VER) + #include + #include + #endif + + #elif SK_OPTS_TARGET == SK_OPTS_TARGET_AVX + + #define SK_CPU_SSE_LEVEL SK_CPU_SSE_LEVEL_AVX + #define SK_OPTS_NS avx + + #if defined(__clang__) + #pragma clang attribute push(__attribute__((target("sse2,ssse3,sse4.1,sse4.2,avx"))), apply_to=function) + #elif defined(__GNUC__) + #pragma GCC push_options + #pragma GCC target("sse2,ssse3,sse4.1,sse4.2,avx") + #endif + + #if defined(__clang__) && defined(_MSC_VER) + #include + #include + #include + #include + #endif + + #elif SK_OPTS_TARGET == SK_OPTS_TARGET_HSW + + #define SK_CPU_SSE_LEVEL SK_CPU_SSE_LEVEL_AVX2 + #define SK_OPTS_NS hsw + + #if defined(__clang__) + #pragma clang attribute push(__attribute__((target("sse2,ssse3,sse4.1,sse4.2,avx,avx2,bmi,bmi2,f16c,fma"))), apply_to=function) + #elif defined(__GNUC__) + #pragma GCC push_options + #pragma GCC target("sse2,ssse3,sse4.1,sse4.2,avx,avx2,bmi,bmi2,f16c,fma") + #endif + + #if defined(__clang__) && defined(_MSC_VER) + #include + #include + #include + #include + #include + #include + #include + #include + #endif + + #else + #error Unexpected value of SK_OPTS_TARGET + + #endif + +#endif // !SK_OPTS_TARGET_DEFAULT diff --git a/src/opts/SkOpts_hsw.cpp b/src/opts/SkOpts_hsw.cpp index c0b2cb64ef45..cea2e1571c29 100644 --- a/src/opts/SkOpts_hsw.cpp +++ b/src/opts/SkOpts_hsw.cpp @@ -10,20 +10,15 @@ #if !defined(SK_ENABLE_OPTIMIZE_SIZE) #define SK_OPTS_NS hsw -#include "src/opts/SkBitmapProcState_opts.h" #include "src/opts/SkBlitRow_opts.h" #include "src/opts/SkRasterPipeline_opts.h" #include "src/opts/SkSwizzler_opts.h" -#include "src/opts/SkUtils_opts.h" -#include "src/opts/SkVM_opts.h" namespace SkOpts { void Init_hsw() { blit_row_color32 = hsw::blit_row_color32; blit_row_s32a_opaque = hsw::blit_row_s32a_opaque; - S32_alpha_D32_filter_DX = hsw::S32_alpha_D32_filter_DX; - RGBA_to_BGRA = SK_OPTS_NS::RGBA_to_BGRA; RGBA_to_rgbA = SK_OPTS_NS::RGBA_to_rgbA; RGBA_to_bgrA = SK_OPTS_NS::RGBA_to_bgrA; @@ -47,10 +42,6 @@ namespace SkOpts { just_return_lowp = (StageFn)SK_OPTS_NS::lowp::just_return; start_pipeline_lowp = SK_OPTS_NS::lowp::start_pipeline; #undef M - - #if defined(SK_ENABLE_SKVM) - interpret_skvm = SK_OPTS_NS::interpret_skvm; - #endif } } // namespace SkOpts diff --git a/src/opts/SkOpts_skx.cpp b/src/opts/SkOpts_skx.cpp deleted file mode 100644 index d961f5e58c3b..000000000000 --- a/src/opts/SkOpts_skx.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright 2020 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#include "src/core/SkOpts.h" - -#if !defined(SK_ENABLE_OPTIMIZE_SIZE) - -#define SK_OPTS_NS skx -#include "src/opts/SkVM_opts.h" - -namespace SkOpts { - void Init_skx() { -#if defined(SK_ENABLE_SKVM) - interpret_skvm = SK_OPTS_NS::interpret_skvm; -#endif - } -} // namespace SkOpts - -#endif // SK_ENABLE_OPTIMIZE_SIZE diff --git a/src/opts/SkOpts_ssse3.cpp b/src/opts/SkOpts_ssse3.cpp index a2d8972fe6e5..a7499711b8ea 100644 --- a/src/opts/SkOpts_ssse3.cpp +++ b/src/opts/SkOpts_ssse3.cpp @@ -10,14 +10,10 @@ #if !defined(SK_ENABLE_OPTIMIZE_SIZE) #define SK_OPTS_NS ssse3 -#include "src/opts/SkBitmapProcState_opts.h" -#include "src/opts/SkBlitMask_opts.h" #include "src/opts/SkSwizzler_opts.h" namespace SkOpts { void Init_ssse3() { - blit_mask_d32_a8 = ssse3::blit_mask_d32_a8; - RGBA_to_BGRA = ssse3::RGBA_to_BGRA; RGBA_to_rgbA = ssse3::RGBA_to_rgbA; RGBA_to_bgrA = ssse3::RGBA_to_bgrA; @@ -28,8 +24,6 @@ namespace SkOpts { grayA_to_rgbA = ssse3::grayA_to_rgbA; inverted_CMYK_to_RGB1 = ssse3::inverted_CMYK_to_RGB1; inverted_CMYK_to_BGR1 = ssse3::inverted_CMYK_to_BGR1; - - S32_alpha_D32_filter_DX = ssse3::S32_alpha_D32_filter_DX; } } // namespace SkOpts diff --git a/src/opts/SkRasterPipeline_opts.h b/src/opts/SkRasterPipeline_opts.h index 7522741fb912..8da2fd865ade 100644 --- a/src/opts/SkRasterPipeline_opts.h +++ b/src/opts/SkRasterPipeline_opts.h @@ -27,6 +27,12 @@ #define SI static inline #endif +#if defined(__clang__) + #define SK_UNROLL _Pragma("unroll") +#else + #define SK_UNROLL +#endif + template SI Dst widen_cast(const Src& src) { static_assert(sizeof(Dst) > sizeof(Src)); @@ -3305,8 +3311,6 @@ STAGE_TAIL(set_base_pointer, std::byte* p) { base = p; } -#ifdef SK_ENABLE_SKSL_IN_RASTER_PIPELINE - // All control flow stages used by SkSL maintain some state in the common registers: // r: condition mask // g: loop mask @@ -3603,12 +3607,42 @@ STAGE_TAIL(copy_4_slots_unmasked, SkRasterPipeline_BinaryOpCtx* packed) { copy_n_slots_unmasked_fn<4>(packed, base); } +template +SI void copy_n_immutable_unmasked_fn(SkRasterPipeline_BinaryOpCtx* packed, std::byte* base) { + auto ctx = SkRPCtxUtils::Unpack(packed); + + // Load the scalar values. + float* src = (float*)(base + ctx.src); + float values[NumSlots]; + SK_UNROLL for (int index = 0; index < NumSlots; ++index) { + values[index] = src[index]; + } + // Broadcast the scalars into the destination. + F* dst = (F*)(base + ctx.dst); + SK_UNROLL for (int index = 0; index < NumSlots; ++index) { + dst[index] = values[index]; + } +} + +STAGE_TAIL(copy_immutable_unmasked, SkRasterPipeline_BinaryOpCtx* packed) { + copy_n_immutable_unmasked_fn<1>(packed, base); +} +STAGE_TAIL(copy_2_immutables_unmasked, SkRasterPipeline_BinaryOpCtx* packed) { + copy_n_immutable_unmasked_fn<2>(packed, base); +} +STAGE_TAIL(copy_3_immutables_unmasked, SkRasterPipeline_BinaryOpCtx* packed) { + copy_n_immutable_unmasked_fn<3>(packed, base); +} +STAGE_TAIL(copy_4_immutables_unmasked, SkRasterPipeline_BinaryOpCtx* packed) { + copy_n_immutable_unmasked_fn<4>(packed, base); +} + template SI void copy_n_slots_masked_fn(SkRasterPipeline_BinaryOpCtx* packed, std::byte* base, I32 mask) { auto ctx = SkRPCtxUtils::Unpack(packed); F* dst = (F*)(base + ctx.dst); F* src = (F*)(base + ctx.src); - for (int count = 0; count < NumSlots; ++count) { + SK_UNROLL for (int count = 0; count < NumSlots; ++count) { *dst = if_then_else(mask, *src, *dst); dst += 1; src += 1; @@ -3631,7 +3665,7 @@ STAGE_TAIL(copy_4_slots_masked, SkRasterPipeline_BinaryOpCtx* packed) { template SI void shuffle_fn(std::byte* ptr, OffsetType* offsets, int numSlots) { F scratch[16]; - for (int count = 0; count < LoopCount; ++count) { + SK_UNROLL for (int count = 0; count < LoopCount; ++count) { scratch[count] = *(F*)(ptr + offsets[count]); } // Surprisingly, this switch generates significantly better code than a memcpy (on x86-64) when @@ -3685,7 +3719,7 @@ STAGE_TAIL(shuffle, SkRasterPipeline_ShuffleCtx* ctx) { template SI void swizzle_copy_masked_fn(F* dst, const F* src, uint16_t* offsets, I32 mask) { std::byte* dstB = (std::byte*)dst; - for (int count = 0; count < NumSlots; ++count) { + SK_UNROLL for (int count = 0; count < NumSlots; ++count) { F* dstS = (F*)(dstB + *offsets); *dstS = if_then_else(mask, *src, *dstS); offsets += 1; @@ -3994,7 +4028,7 @@ SI void apply_binary_immediate(SkRasterPipeline_ConstantCtx* packed, std::byte* V* dst = (V*)(base + ctx.dst); // get a pointer to the destination S scalar = sk_bit_cast(ctx.value); // bit-pun the constant value as desired V src = scalar; // broadcast the constant value into a vector - for (int index = 0; index < N; ++index) { + SK_UNROLL for (int index = 0; index < N; ++index) { ApplyFn(dst, &src); // perform the operation dst += 1; } @@ -4367,8 +4401,6 @@ DECLARE_TERNARY_INT(mix) #undef DECLARE_TERNARY_FLOAT #undef DECLARE_TERNARY_INT -#endif // SK_ENABLE_SKSL_IN_RASTER_PIPELINE - STAGE(gauss_a_to_rgba, NoCtx) { // x = 1 - x; // exp(-x * x * 4) - 0.018f; diff --git a/src/opts/SkUtils_opts.h b/src/opts/SkUtils_opts.h index 2ec42285c8e7..0a46ce406ba5 100644 --- a/src/opts/SkUtils_opts.h +++ b/src/opts/SkUtils_opts.h @@ -16,21 +16,21 @@ namespace SK_OPTS_NS { template static void memsetT(T buffer[], T value, int count) { #if defined(SK_CPU_SSE_LEVEL) && SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_AVX - static constexpr int N = 32 / sizeof(T); + static constexpr int VecSize = 32 / sizeof(T); #else - static constexpr int N = 16 / sizeof(T); + static constexpr int VecSize = 16 / sizeof(T); #endif - static_assert(N > 0, "T is too big for memsetT"); - // Create an N-wide version of value - skvx::Vec wideValue(value); - while (count >= N) { - // N at a time, copy the values into the destination buffer + static_assert(VecSize > 0, "T is too big for memsetT"); + // Create an vectorized version of value + skvx::Vec wideValue(value); + while (count >= VecSize) { + // Copy the value into the destination buffer (VecSize elements at a time) wideValue.store(buffer); - buffer += N; - count -= N; + buffer += VecSize; + count -= VecSize; } - // If count was not an even multiple of N, take care of the last few. - while (count --> 0) { + // If count was not an even multiple of VecSize, take care of the last few. + while (count-- > 0) { *buffer++ = value; } } diff --git a/src/opts/SkVM_opts.h b/src/opts/SkVM_opts.h deleted file mode 100644 index 89773fe0ed52..000000000000 --- a/src/opts/SkVM_opts.h +++ /dev/null @@ -1,354 +0,0 @@ -// Copyright 2020 Google LLC. -// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. - -#ifndef SkVM_opts_DEFINED -#define SkVM_opts_DEFINED - -#if defined(SK_ENABLE_SKVM) - -#include "src/base/SkVx.h" -#include "src/core/SkVM.h" -#include "src/sksl/tracing/SkSLTraceHook.h" -#if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_AVX2 - #include -#endif - -template -static inline skvx::Vec gather32(const int* ptr, const skvx::Vec& ix) { -#if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_AVX2 - if constexpr (N == 8) { - return sk_bit_cast>( - _mm256_i32gather_epi32(ptr, sk_bit_cast<__m256i>(ix), 4)); - } -#endif - // Try to recurse on specializations, falling back on standard scalar map()-based impl. - if constexpr (N > 8) { - return join(gather32(ptr, ix.lo), - gather32(ptr, ix.hi)); - } - return map([&](int i) { return ptr[i]; }, ix); -} - -namespace SK_OPTS_NS { - -namespace SkVMInterpreterTypes { -#if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_AVX2 - constexpr inline int K = 32; // 1024-bit: 4 ymm or 2 zmm at a time -#else - constexpr inline int K = 8; // 256-bit: 2 xmm, 2 v-registers, etc. -#endif - using I32 = skvx::Vec; - using I16 = skvx::Vec; - using F32 = skvx::Vec; - using U64 = skvx::Vec; - using U32 = skvx::Vec; - using U16 = skvx::Vec; - using U8 = skvx::Vec; - union Slot { - F32 f32; - I32 i32; - U32 u32; - I16 i16; - U16 u16; - }; -} // namespace SkVMInterpreterTypes - - inline void interpret_skvm(const skvm::InterpreterInstruction insts[], const int ninsts, - const int nregs, const int loop, - const int strides[], - SkSL::TraceHook* traceHooks[], const int nTraceHooks, - const int nargs, int n, void* args[]) { - using namespace skvm; - - using SkVMInterpreterTypes::K; - using SkVMInterpreterTypes::I32; - using SkVMInterpreterTypes::I16; - using SkVMInterpreterTypes::F32; - using SkVMInterpreterTypes::U64; - using SkVMInterpreterTypes::U32; - using SkVMInterpreterTypes::U16; - using SkVMInterpreterTypes::U8; - using SkVMInterpreterTypes::Slot; - - // We'll operate in SIMT style, knocking off K-size chunks from n while possible. - - Slot few_regs[16]; - std::unique_ptr many_regs; - - Slot* r = few_regs; - - if (nregs > (int)std::size(few_regs)) { - // Annoyingly we can't trust that malloc() or new will work with Slot because - // the skvx::Vec types may have alignment greater than what they provide. - // We'll overallocate one extra register so we can align manually. - many_regs.reset(new char[ sizeof(Slot) * (nregs + 1) ]); - - uintptr_t addr = (uintptr_t)many_regs.get(); - addr += alignof(Slot) - - (addr & (alignof(Slot) - 1)); - SkASSERT((addr & (alignof(Slot) - 1)) == 0); - r = (Slot*)addr; - } - - const auto should_trace = [&](int stride, int immA, Reg x, Reg y) -> bool { - if (immA < 0 || immA >= nTraceHooks) { - return false; - } - // When stride == K, all lanes are used. - if (stride == K) { - return any(r[x].i32 & r[y].i32); - } - // When stride == 1, only the first lane is used; the rest are not meaningful. - return r[x].i32[0] & r[y].i32[0]; - }; - - // Step each argument pointer ahead by its stride a number of times. - auto step_args = [&](int times) { - for (int i = 0; i < nargs; i++) { - args[i] = (void*)( (char*)args[i] + times * strides[i] ); - } - }; - - int start = 0, - stride; - for ( ; n > 0; start = loop, n -= stride, step_args(stride)) { - stride = n >= K ? K : 1; - - for (int instIdx = start; instIdx < ninsts; instIdx++) { - InterpreterInstruction inst = insts[instIdx]; - - // d = op(x,y,z,w, immA,immB) - Reg d = inst.d, - x = inst.x, - y = inst.y, - z = inst.z, - w = inst.w; - int immA = inst.immA, - immB = inst.immB, - immC = inst.immC; - - // Ops that interact with memory need to know whether we're stride=1 or K, - // but all non-memory ops can run the same code no matter the stride. - switch (2*(int)inst.op + (stride == K ? 1 : 0)) { - default: SkUNREACHABLE; - - #define STRIDE_1(op) case 2*(int)op - #define STRIDE_K(op) case 2*(int)op + 1 - STRIDE_1(Op::store8 ): memcpy(args[immA], &r[x].i32, 1); break; - STRIDE_1(Op::store16): memcpy(args[immA], &r[x].i32, 2); break; - STRIDE_1(Op::store32): memcpy(args[immA], &r[x].i32, 4); break; - STRIDE_1(Op::store64): memcpy((char*)args[immA]+0, &r[x].i32, 4); - memcpy((char*)args[immA]+4, &r[y].i32, 4); break; - - STRIDE_K(Op::store8 ): skvx::cast (r[x].i32).store(args[immA]); break; - STRIDE_K(Op::store16): skvx::cast(r[x].i32).store(args[immA]); break; - STRIDE_K(Op::store32): (r[x].i32).store(args[immA]); break; - STRIDE_K(Op::store64): (skvx::cast(r[x].u32) << 0 | - skvx::cast(r[y].u32) << 32).store(args[immA]); - break; - - STRIDE_1(Op::load8 ): r[d].i32 = 0; memcpy(&r[d].i32, args[immA], 1); break; - STRIDE_1(Op::load16): r[d].i32 = 0; memcpy(&r[d].i32, args[immA], 2); break; - STRIDE_1(Op::load32): r[d].i32 = 0; memcpy(&r[d].i32, args[immA], 4); break; - STRIDE_1(Op::load64): - r[d].i32 = 0; memcpy(&r[d].i32, (char*)args[immA] + 4*immB, 4); break; - - STRIDE_K(Op::load8 ): r[d].i32= skvx::cast(U8 ::Load(args[immA])); break; - STRIDE_K(Op::load16): r[d].i32= skvx::cast(U16::Load(args[immA])); break; - STRIDE_K(Op::load32): r[d].i32= I32::Load(args[immA]) ; break; - STRIDE_K(Op::load64): - // Low 32 bits if immB=0, or high 32 bits if immB=1. - r[d].i32 = skvx::cast(U64::Load(args[immA]) >> (32*immB)); break; - - // The pointer we base our gather on is loaded indirectly from a uniform: - // - args[immA] is the uniform holding our gather base pointer somewhere; - // - (const uint8_t*)args[immA] + immB points to the gather base pointer; - // - memcpy() loads the gather base and into a pointer of the right type. - // After all that we have an ordinary (uniform) pointer `ptr` to load from, - // and we then gather from it using the varying indices in r[x]. - STRIDE_1(Op::gather8): { - const uint8_t* ptr; - memcpy(&ptr, (const uint8_t*)args[immA] + immB, sizeof(ptr)); - r[d].i32 = ptr[ r[x].i32[0] ]; - } break; - STRIDE_1(Op::gather16): { - const uint16_t* ptr; - memcpy(&ptr, (const uint8_t*)args[immA] + immB, sizeof(ptr)); - r[d].i32 = ptr[ r[x].i32[0] ]; - } break; - STRIDE_1(Op::gather32): { - const int* ptr; - memcpy(&ptr, (const uint8_t*)args[immA] + immB, sizeof(ptr)); - r[d].i32 = ptr[ r[x].i32[0] ]; - } break; - - STRIDE_K(Op::gather8): { - const uint8_t* ptr; - memcpy(&ptr, (const uint8_t*)args[immA] + immB, sizeof(ptr)); - r[d].i32 = map([&](int ix) { return (int)ptr[ix]; }, r[x].i32); - } break; - STRIDE_K(Op::gather16): { - const uint16_t* ptr; - memcpy(&ptr, (const uint8_t*)args[immA] + immB, sizeof(ptr)); - r[d].i32 = map([&](int ix) { return (int)ptr[ix]; }, r[x].i32); - } break; - STRIDE_K(Op::gather32): { - const int* ptr; - memcpy(&ptr, (const uint8_t*)args[immA] + immB, sizeof(ptr)); - r[d].i32 = gather32(ptr, r[x].i32); - } break; - - #undef STRIDE_1 - #undef STRIDE_K - - // Ops that don't interact with memory should never care about the stride. - #define CASE(op) case 2*(int)op: /*fallthrough*/ case 2*(int)op+1 - - // These 128-bit ops are implemented serially for simplicity. - CASE(Op::store128): { - U64 lo = (skvx::cast(r[x].u32) << 0 | - skvx::cast(r[y].u32) << 32), - hi = (skvx::cast(r[z].u32) << 0 | - skvx::cast(r[w].u32) << 32); - for (int i = 0; i < stride; i++) { - memcpy((char*)args[immA] + 16*i + 0, &lo[i], 8); - memcpy((char*)args[immA] + 16*i + 8, &hi[i], 8); - } - } break; - - CASE(Op::load128): - r[d].i32 = 0; - for (int i = 0; i < stride; i++) { - memcpy(&r[d].i32[i], (const char*)args[immA] + 16*i+ 4*immB, 4); - } break; - - CASE(Op::assert_true): - #ifdef SK_DEBUG - if (!all(r[x].i32)) { - SkDebugf("inst %d, register %d\n", instIdx, y); - for (int i = 0; i < K; i++) { - SkDebugf("\t%2d: %08x (%g)\n", - instIdx, r[y].i32[instIdx], r[y].f32[instIdx]); - } - SkASSERT(false); - } - #endif - break; - - CASE(Op::trace_line): - if (should_trace(stride, immA, x, y)) { - traceHooks[immA]->line(immB); - } - break; - - CASE(Op::trace_var): - if (should_trace(stride, immA, x, y)) { - for (int i = 0; i < K; ++i) { - if (r[x].i32[i] & r[y].i32[i]) { - traceHooks[immA]->var(immB, r[z].i32[i]); - break; - } - } - } - break; - - CASE(Op::trace_enter): - if (should_trace(stride, immA, x, y)) { - traceHooks[immA]->enter(immB); - } - break; - - CASE(Op::trace_exit): - if (should_trace(stride, immA, x, y)) { - traceHooks[immA]->exit(immB); - } - break; - - CASE(Op::trace_scope): - if (should_trace(stride, immA, x, y)) { - traceHooks[immA]->scope(immB); - } - break; - - CASE(Op::index): { - const int iota[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15, - 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31, - 32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47, - 48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63 }; - static_assert(K <= std::size(iota), ""); - - r[d].i32 = n - I32::Load(iota); - } break; - - CASE(Op::uniform32): - r[d].i32 = *(const int*)( (const char*)args[immA] + immB ); - break; - - CASE(Op::array32): - const int* ptr; - memcpy(&ptr, (const uint8_t*)args[immA] + immB, sizeof(ptr)); - r[d].i32 = ptr[immC/sizeof(int)]; - break; - - CASE(Op::splat): r[d].i32 = immA; break; - - CASE(Op::add_f32): r[d].f32 = r[x].f32 + r[y].f32; break; - CASE(Op::sub_f32): r[d].f32 = r[x].f32 - r[y].f32; break; - CASE(Op::mul_f32): r[d].f32 = r[x].f32 * r[y].f32; break; - CASE(Op::div_f32): r[d].f32 = r[x].f32 / r[y].f32; break; - CASE(Op::min_f32): r[d].f32 = min(r[x].f32, r[y].f32); break; - CASE(Op::max_f32): r[d].f32 = max(r[x].f32, r[y].f32); break; - - CASE(Op::fma_f32): r[d].f32 = fma( r[x].f32, r[y].f32, r[z].f32); break; - CASE(Op::fms_f32): r[d].f32 = fma( r[x].f32, r[y].f32, -r[z].f32); break; - CASE(Op::fnma_f32): r[d].f32 = fma(-r[x].f32, r[y].f32, r[z].f32); break; - - CASE(Op::sqrt_f32): r[d].f32 = sqrt(r[x].f32); break; - - CASE(Op::add_i32): r[d].i32 = r[x].i32 + r[y].i32; break; - CASE(Op::sub_i32): r[d].i32 = r[x].i32 - r[y].i32; break; - CASE(Op::mul_i32): r[d].i32 = r[x].i32 * r[y].i32; break; - - CASE(Op::shl_i32): r[d].i32 = r[x].i32 << immA; break; - CASE(Op::sra_i32): r[d].i32 = r[x].i32 >> immA; break; - CASE(Op::shr_i32): r[d].u32 = r[x].u32 >> immA; break; - - CASE(Op:: eq_f32): r[d].i32 = r[x].f32 == r[y].f32; break; - CASE(Op::neq_f32): r[d].i32 = r[x].f32 != r[y].f32; break; - CASE(Op:: gt_f32): r[d].i32 = r[x].f32 > r[y].f32; break; - CASE(Op::gte_f32): r[d].i32 = r[x].f32 >= r[y].f32; break; - - CASE(Op:: eq_i32): r[d].i32 = r[x].i32 == r[y].i32; break; - CASE(Op:: gt_i32): r[d].i32 = r[x].i32 > r[y].i32; break; - - CASE(Op::bit_and ): r[d].i32 = r[x].i32 & r[y].i32; break; - CASE(Op::bit_or ): r[d].i32 = r[x].i32 | r[y].i32; break; - CASE(Op::bit_xor ): r[d].i32 = r[x].i32 ^ r[y].i32; break; - CASE(Op::bit_clear): r[d].i32 = r[x].i32 & ~r[y].i32; break; - - CASE(Op::select): r[d].i32 = skvx::if_then_else(r[x].i32, r[y].i32, r[z].i32); - break; - - CASE(Op::ceil): r[d].f32 = skvx::ceil(r[x].f32) ; break; - CASE(Op::floor): r[d].f32 = skvx::floor(r[x].f32) ; break; - CASE(Op::to_f32): r[d].f32 = skvx::cast( r[x].i32 ); break; - CASE(Op::trunc): r[d].i32 = skvx::cast ( r[x].f32 ); break; - CASE(Op::round): r[d].i32 = skvx::cast (skvx::lrint(r[x].f32)); break; - - CASE(Op::to_fp16): - r[d].i32 = skvx::cast(skvx::to_half(r[x].f32)); - break; - CASE(Op::from_fp16): - r[d].f32 = skvx::from_half(skvx::cast(r[x].i32)); - break; - - #undef CASE - } - } - } - } - -} // namespace SK_OPTS_NS - -#endif // defined(SK_ENABLE_SKVM) -#endif // SkVM_opts_DEFINED diff --git a/src/pathops/SkOpBuilder.cpp b/src/pathops/SkOpBuilder.cpp index 57752e3a57b3..f2422cf1a4fb 100644 --- a/src/pathops/SkOpBuilder.cpp +++ b/src/pathops/SkOpBuilder.cpp @@ -11,11 +11,11 @@ #include "include/core/SkRect.h" #include "include/core/SkTypes.h" #include "include/pathops/SkPathOps.h" -#include "include/private/base/SkPathEnums.h" #include "include/private/base/SkTArray.h" #include "include/private/base/SkTDArray.h" #include "include/private/base/SkTo.h" #include "src/base/SkArenaAlloc.h" +#include "src/core/SkPathEnums.h" #include "src/core/SkPathPriv.h" #include "src/pathops/SkOpContour.h" #include "src/pathops/SkOpEdgeBuilder.h" diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp index 815a68813641..f53aa142980a 100644 --- a/src/pdf/SkPDFDevice.cpp +++ b/src/pdf/SkPDFDevice.cpp @@ -104,7 +104,7 @@ class ScopedOutputMarkedContentTags { // Utility functions // This function destroys the mask and either frees or takes the pixels. -sk_sp mask_to_greyscale_image(SkMask* mask) { +sk_sp mask_to_greyscale_image(SkMaskBuilder* mask) { sk_sp img; SkPixmap pm(SkImageInfo::Make(mask->fBounds.width(), mask->fBounds.height(), kGray_8_SkColorType, kOpaque_SkAlphaType), @@ -118,15 +118,15 @@ sk_sp mask_to_greyscale_image(SkMask* mask) { img = SkImages::DeferredFromEncodedData(buffer.detachAsData()); SkASSERT(img); if (img) { - SkMask::FreeImage(mask->fImage); + SkMaskBuilder::FreeImage(mask->image()); } } } if (!img) { img = SkImages::RasterFromPixmap( - pm, [](const void* p, void*) { SkMask::FreeImage((void*)p); }, nullptr); + pm, [](const void* p, void*) { SkMaskBuilder::FreeImage((void*)p); }, nullptr); } - *mask = SkMask(); // destructive; + *mask = SkMaskBuilder(); // destructive; return img; } @@ -157,7 +157,7 @@ static void draw_points(SkCanvas::PointMode mode, SkRasterClip rc(bounds); SkDraw draw; draw.fDst = SkPixmap(SkImageInfo::MakeUnknown(bounds.right(), bounds.bottom()), nullptr, 0); - draw.fMatrixProvider = device; + draw.fCTM = &device->localToDevice(); draw.fRC = &rc; draw.drawPoints(mode, count, points, paint, device); } @@ -512,14 +512,14 @@ void SkPDFDevice::internalDrawPathWithFilter(const SkClipStack& clipStack, path.transform(ctm, &path); SkIRect bounds = clipStack.bounds(this->bounds()).roundOut(); - SkMask sourceMask; + SkMaskBuilder sourceMask; if (!SkDraw::DrawToMask(path, bounds, paint->getMaskFilter(), &SkMatrix::I(), - &sourceMask, SkMask::kComputeBoundsAndRenderImage_CreateMode, + &sourceMask, SkMaskBuilder::kComputeBoundsAndRenderImage_CreateMode, initStyle)) { return; } - SkAutoMaskFreeImage srcAutoMaskFreeImage(sourceMask.fImage); - SkMask dstMask; + SkAutoMaskFreeImage srcAutoMaskFreeImage(sourceMask.image()); + SkMaskBuilder dstMask; SkIPoint margin; if (!as_MFB(paint->getMaskFilter())->filterMask(&dstMask, sourceMask, ctm, &margin)) { return; @@ -973,14 +973,12 @@ void SkPDFDevice::drawVertices(const SkVertices*, sk_sp, const SkPain // TODO: implement drawVertices } -#ifdef SK_ENABLE_SKSL void SkPDFDevice::drawMesh(const SkMesh&, sk_sp, const SkPaint&) { if (this->hasEmptyClip()) { return; } // TODO: implement drawMesh } -#endif void SkPDFDevice::drawFormXObject(SkPDFIndirectReference xObject, SkDynamicMemoryWStream* content) { ScopedOutputMarkedContentTags mark(fNodeId, fDocument, content); @@ -1727,7 +1725,7 @@ void SkPDFDevice::drawSpecial(SkSpecialImage* srcImg, const SkMatrix& localToDev if (this->hasEmptyClip()) { return; } - SkASSERT(!srcImg->isTextureBacked()); + SkASSERT(!srcImg->isGaneshBacked() && !srcImg->isGraphiteBacked()); SkASSERT(!paint.getMaskFilter() && !paint.getImageFilter()); SkBitmap resultBM; @@ -1739,12 +1737,12 @@ void SkPDFDevice::drawSpecial(SkSpecialImage* srcImg, const SkMatrix& localToDev } sk_sp SkPDFDevice::makeSpecial(const SkBitmap& bitmap) { - return SkSpecialImage::MakeFromRaster(bitmap.bounds(), bitmap, this->surfaceProps()); + return SkSpecialImages::MakeFromRaster(bitmap.bounds(), bitmap, this->surfaceProps()); } sk_sp SkPDFDevice::makeSpecial(const SkImage* image) { - return SkSpecialImage::MakeFromImage(nullptr, image->bounds(), image->makeNonTextureImage(), - this->surfaceProps()); + return SkSpecialImages::MakeFromRaster( + image->bounds(), image->makeNonTextureImage(), this->surfaceProps()); } SkImageFilterCache* SkPDFDevice::getImageFilterCache() { diff --git a/src/pdf/SkPDFDevice.h b/src/pdf/SkPDFDevice.h index dd8008278491..a38dadf5bb98 100644 --- a/src/pdf/SkPDFDevice.h +++ b/src/pdf/SkPDFDevice.h @@ -93,9 +93,7 @@ class SkPDFDevice final : public SkClipStackDevice { const SkPaint& initialPaint, const SkPaint& drawingPaint) override; void drawVertices(const SkVertices*, sk_sp, const SkPaint&, bool) override; -#ifdef SK_ENABLE_SKSL void drawMesh(const SkMesh&, sk_sp, const SkPaint&) override; -#endif // PDF specific methods. void drawSprite(const SkBitmap& bitmap, int x, int y, diff --git a/src/pdf/SkPDFFont.cpp b/src/pdf/SkPDFFont.cpp index cc4b828607ff..a9cafb4f3c28 100644 --- a/src/pdf/SkPDFFont.cpp +++ b/src/pdf/SkPDFFont.cpp @@ -24,8 +24,8 @@ #include "include/core/SkSurfaceProps.h" #include "include/core/SkTypes.h" #include "include/docs/SkPDFDocument.h" -#include "include/private/SkBitmaskEnum.h" #include "include/private/base/SkTo.h" +#include "src/base/SkBitmaskEnum.h" #include "src/base/SkUTF.h" #include "src/core/SkGlyph.h" #include "src/core/SkImagePriv.h" @@ -482,14 +482,16 @@ static ImageAndOffset to_image(SkGlyphID gid, SkBulkGlyphMetricsAndImages* small bm.setImmutable(); return {bm.asImage(), {bounds.x(), bounds.y()}}; case SkMask::kA8_Format: - bm.installPixels(SkImageInfo::MakeA8(bounds.width(), bounds.height()), - mask.fImage, mask.fRowBytes); - return {SkMakeImageFromRasterBitmap(bm, kAlways_SkCopyPixelsMode), + return {SkImages::RasterFromData( + SkImageInfo::MakeA8(bounds.width(), bounds.height()), + SkData::MakeWithCopy(mask.fImage, mask.computeTotalImageSize()), + mask.fRowBytes), {bounds.x(), bounds.y()}}; case SkMask::kARGB32_Format: - bm.installPixels(SkImageInfo::MakeN32Premul(bounds.width(), bounds.height()), - mask.fImage, mask.fRowBytes); - return {SkMakeImageFromRasterBitmap(bm, kAlways_SkCopyPixelsMode), + return {SkImages::RasterFromData( + SkImageInfo::MakeN32Premul(bounds.width(), bounds.height()), + SkData::MakeWithCopy(mask.fImage, mask.computeTotalImageSize()), + mask.fRowBytes), {bounds.x(), bounds.y()}}; case SkMask::k3D_Format: case SkMask::kLCD16_Format: diff --git a/src/pdf/SkPDFGradientShader.cpp b/src/pdf/SkPDFGradientShader.cpp index 3ec2f867a0aa..f5e1a7cbfd8e 100644 --- a/src/pdf/SkPDFGradientShader.cpp +++ b/src/pdf/SkPDFGradientShader.cpp @@ -7,6 +7,7 @@ #include "src/pdf/SkPDFGradientShader.h" +#include "include/core/SkTileMode.h" #include "include/docs/SkPDFDocument.h" #include "src/core/SkChecksum.h" #include "src/pdf/SkPDFDocumentPriv.h" diff --git a/src/pdf/SkPDFMetadata.cpp b/src/pdf/SkPDFMetadata.cpp index 943dfbc84690..443e5d1f4956 100644 --- a/src/pdf/SkPDFMetadata.cpp +++ b/src/pdf/SkPDFMetadata.cpp @@ -7,6 +7,7 @@ #include "src/pdf/SkPDFMetadata.h" +#include "include/private/base/SkTemplates.h" #include "include/private/base/SkTo.h" #include "src/base/SkUTF.h" #include "src/base/SkUtils.h" @@ -71,7 +72,7 @@ std::unique_ptr SkPDFMetadata::MakeDocumentInformationDict( if (metadata.fModified != kZeroTime) { dict->insertTextString("ModDate", pdf_date(metadata.fModified)); } - return std::move(dict); + return dict; } SkUUID SkPDFMetadata::CreateUUID(const SkPDF::Metadata& metadata) { @@ -112,7 +113,7 @@ std::unique_ptr SkPDFMetadata::MakePdfId(const SkUUID& doc, const S static_assert(sizeof(SkUUID) == 16, "uuid_size"); array->appendByteString(SkString(reinterpret_cast(&doc ), sizeof(SkUUID))); array->appendByteString(SkString(reinterpret_cast(&instance), sizeof(SkUUID))); - return std::move(array); + return array; } // Convert a block of memory to hexadecimal. Input and output pointers will be diff --git a/src/pdf/SkPDFShader.cpp b/src/pdf/SkPDFShader.cpp index 3f5b4a591de1..eec75488f5f4 100644 --- a/src/pdf/SkPDFShader.cpp +++ b/src/pdf/SkPDFShader.cpp @@ -11,6 +11,7 @@ #include "include/core/SkScalar.h" #include "include/core/SkStream.h" #include "include/core/SkSurface.h" +#include "include/core/SkTileMode.h" #include "include/docs/SkPDFDocument.h" #include "include/private/base/SkMath.h" #include "include/private/base/SkTPin.h" diff --git a/src/ports/BUILD.bazel b/src/ports/BUILD.bazel index c7d0d02a5f9c..c38207283be4 100644 --- a/src/ports/BUILD.bazel +++ b/src/ports/BUILD.bazel @@ -35,7 +35,6 @@ skia_filegroup( srcs = select({ "//bazel/common_config_settings:use_fontations_true": [ "SkTypeface_fontations.cpp", - "//src/ports/fontations:srcs", ], "//conditions:default": [], }), @@ -93,6 +92,13 @@ skia_filegroup( ], ) +skia_filegroup( + name = "fontmgr_android_hdrs", + srcs = [ + "SkFontMgr_android_parser.h", + ], +) + skia_filegroup( name = "fontmgr_android_factory", srcs = [ @@ -287,7 +293,7 @@ skia_filegroup( "@platforms//os:ios": ["SkOSFile_ios.h"], "//conditions:default": [], }) + select({ - "//bazel/common_config_settings:uses_android_fontmgr": ["SkFontMgr_android_parser.h"], + "//bazel/common_config_settings:uses_android_fontmgr": [":fontmgr_android_hdrs"], "//conditions:default": [], }) + select({ "//bazel/common_config_settings:uses_fci_fontmgr": [ diff --git a/src/ports/SkDebug_android.cpp b/src/ports/SkDebug_android.cpp index 58a6748e4df3..5949a332a4b7 100644 --- a/src/ports/SkDebug_android.cpp +++ b/src/ports/SkDebug_android.cpp @@ -6,6 +6,8 @@ */ #include "include/core/SkTypes.h" +#include "include/private/base/SkDebug.h" + #if defined(SK_BUILD_FOR_ANDROID) #include @@ -36,4 +38,4 @@ void SkDebugf(const char format[], ...) { va_end(args1); } -#endif//defined(SK_BUILD_FOR_ANDROID) +#endif // defined(SK_BUILD_FOR_ANDROID) diff --git a/src/ports/SkDebug_stdio.cpp b/src/ports/SkDebug_stdio.cpp index 78c7072bd0d7..6a58936900c1 100644 --- a/src/ports/SkDebug_stdio.cpp +++ b/src/ports/SkDebug_stdio.cpp @@ -5,6 +5,7 @@ * found in the LICENSE file. */ +#include "include/private/base/SkDebug.h" #include "include/private/base/SkFeatures.h" #include "include/private/base/SkLoadUserConfig.h" @@ -22,4 +23,4 @@ void SkDebugf(const char format[], ...) { #pragma GCC diagnostic pop va_end(args); } -#endif//!defined(SK_BUILD_FOR_WIN) && !defined(SK_BUILD_FOR_ANDROID) +#endif // !defined(SK_BUILD_FOR_WIN) && !defined(SK_BUILD_FOR_ANDROID) diff --git a/src/ports/SkDebug_win.cpp b/src/ports/SkDebug_win.cpp index 1ad754e62424..ac2ececd609a 100644 --- a/src/ports/SkDebug_win.cpp +++ b/src/ports/SkDebug_win.cpp @@ -6,6 +6,7 @@ */ #include "include/core/SkTypes.h" +#include "include/private/base/SkDebug.h" #if defined(SK_BUILD_FOR_WIN) @@ -31,4 +32,4 @@ void SkDebugf(const char format[], ...) { OutputDebugStringA(buffer); } -#endif//defined(SK_BUILD_FOR_WIN) +#endif // defined(SK_BUILD_FOR_WIN) diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp index f46bf19e6c20..88b117d7a285 100644 --- a/src/ports/SkFontHost_FreeType.cpp +++ b/src/ports/SkFontHost_FreeType.cpp @@ -444,9 +444,8 @@ class SkScalerContext_FreeType : public SkScalerContext_FreeType_Base { } protected: - bool generateAdvance(SkGlyph* glyph) override; - void generateMetrics(SkGlyph* glyph, SkArenaAlloc*) override; - void generateImage(const SkGlyph& glyph) override; + GlyphMetrics generateMetrics(const SkGlyph&, SkArenaAlloc*) override; + void generateImage(const SkGlyph&, void*) override; bool generatePath(const SkGlyph& glyph, SkPath* path) override; sk_sp generateDrawable(const SkGlyph&) override; void generateFontMetrics(SkFontMetrics*) override; @@ -473,10 +472,10 @@ class SkScalerContext_FreeType : public SkScalerContext_FreeType_Base { FT_Error setupSize(); static bool getBoundsOfCurrentOutlineGlyph(FT_GlyphSlot glyph, SkRect* bounds); - static void setGlyphBounds(SkGlyph* glyph, SkRect* bounds, bool subpixel); + static SkIRect computeGlyphBounds(const SkGlyph&, SkRect* bounds, bool subpixel); bool getCBoxForLetter(char letter, FT_BBox* bbox); // Caller must lock f_t_mutex() before calling this function. - void updateGlyphBoundsIfLCD(SkGlyph* glyph); + void updateGlyphBoundsIfLCD(GlyphMetrics* mx); // Caller must lock f_t_mutex() before calling this function. // update FreeType2 glyph slot with glyph emboldened void emboldenIfNeeded(FT_Face face, FT_GlyphSlot glyph, SkGlyphID gid); @@ -678,7 +677,7 @@ std::unique_ptr SkTypeface_FreeType::onCreateScalerContext( auto c = std::make_unique( sk_ref_sp(const_cast(this)), effects, desc); if (c->success()) { - return std::move(c); + return c; } return SkScalerContext::MakeEmpty( sk_ref_sp(const_cast(this)), effects, desc); @@ -1074,38 +1073,6 @@ FT_Error SkScalerContext_FreeType::setupSize() { return 0; } -bool SkScalerContext_FreeType::generateAdvance(SkGlyph* glyph) { - /* unhinted and light hinted text have linearly scaled advances - * which are very cheap to compute with some font formats... - */ - if (!fDoLinearMetrics) { - return false; - } - - SkAutoMutexExclusive ac(f_t_mutex()); - - if (this->setupSize()) { - glyph->zeroMetrics(); - return true; - } - - FT_Error error; - FT_Fixed advance; - - error = FT_Get_Advance( fFace, glyph->getGlyphID(), - fLoadGlyphFlags | FT_ADVANCE_FLAG_FAST_ONLY, - &advance ); - - if (error != 0) { - return false; - } - - const SkScalar advanceScalar = SkFT_FixedToScalar(advance); - glyph->fAdvanceX = SkScalarToFloat(fMatrix22Scalar.getScaleX() * advanceScalar); - glyph->fAdvanceY = SkScalarToFloat(fMatrix22Scalar.getSkewY() * advanceScalar); - return true; -} - bool SkScalerContext_FreeType::getBoundsOfCurrentOutlineGlyph(FT_GlyphSlot glyph, SkRect* bounds) { if (glyph->format != FT_GLYPH_FORMAT_OUTLINE) { SkASSERT(false); @@ -1138,41 +1105,31 @@ bool SkScalerContext_FreeType::getCBoxForLetter(char letter, FT_BBox* bbox) { return true; } -void SkScalerContext_FreeType::setGlyphBounds(SkGlyph* glyph, SkRect* bounds, bool subpixel) { +SkIRect SkScalerContext_FreeType::computeGlyphBounds(const SkGlyph& glyph, SkRect* bounds, + bool subpixel) { SkIRect irect; if (bounds->isEmpty()) { irect = SkIRect::MakeEmpty(); } else { if (subpixel) { - bounds->offset(SkFixedToScalar(glyph->getSubXFixed()), - SkFixedToScalar(glyph->getSubYFixed())); + bounds->offset(SkFixedToScalar(glyph.getSubXFixed()), + SkFixedToScalar(glyph.getSubYFixed())); } - irect = bounds->roundOut(); - if (!SkTFitsInfWidth )>(irect.width ()) || - !SkTFitsInfHeight)>(irect.height()) || - !SkTFitsInfTop )>(irect.top ()) || - !SkTFitsInfLeft )>(irect.left ()) ) - { - irect = SkIRect::MakeEmpty(); - } } - glyph->fWidth = SkToU16(irect.width ()); - glyph->fHeight = SkToU16(irect.height()); - glyph->fTop = SkToS16(irect.top ()); - glyph->fLeft = SkToS16(irect.left ()); + return irect; } -void SkScalerContext_FreeType::updateGlyphBoundsIfLCD(SkGlyph* glyph) { - if (glyph->fMaskFormat == SkMask::kLCD16_Format && - glyph->fWidth > 0 && glyph->fHeight > 0) +void SkScalerContext_FreeType::updateGlyphBoundsIfLCD(GlyphMetrics* mx) { + if (mx->maskFormat == SkMask::kLCD16_Format && + mx->bounds.width() > 0 && mx->bounds.height() > 0) { if (fLCDIsVert) { - glyph->fHeight += 2; - glyph->fTop -= 1; + mx->bounds.fBottom += 1; + mx->bounds.fTop -= 1; } else { - glyph->fWidth += 2; - glyph->fLeft -= 1; + mx->bounds.fRight += 1; + mx->bounds.fLeft -= 1; } } } @@ -1193,12 +1150,14 @@ bool SkScalerContext_FreeType::shouldSubpixelBitmap(const SkGlyph& glyph, const return mechanism && policy; } -void SkScalerContext_FreeType::generateMetrics(SkGlyph* glyph, SkArenaAlloc* alloc) { +SkScalerContext::GlyphMetrics SkScalerContext_FreeType::generateMetrics(const SkGlyph& glyph, + SkArenaAlloc* alloc) { SkAutoMutexExclusive ac(f_t_mutex()); + GlyphMetrics mx(glyph.maskFormat()); + if (this->setupSize()) { - glyph->zeroMetrics(); - return; + return mx; } FT_Bool haveLayers = false; @@ -1208,14 +1167,14 @@ void SkScalerContext_FreeType::generateMetrics(SkGlyph* glyph, SkArenaAlloc* all SkRect bounds = SkRect::MakeEmpty(); #ifdef TT_SUPPORT_COLRV1 FT_OpaquePaint opaqueLayerPaint{nullptr, 1}; - if (FT_Get_Color_Glyph_Paint(fFace, glyph->getGlyphID(), + if (FT_Get_Color_Glyph_Paint(fFace, glyph.getGlyphID(), FT_COLOR_INCLUDE_ROOT_TRANSFORM, &opaqueLayerPaint)) { haveLayers = true; - glyph->fScalerContextBits = ScalerContextBits::COLRv1; + mx.extraBits = ScalerContextBits::COLRv1; // COLRv1 optionally provides a ClipBox. FT_ClipBox clipBox; - if (FT_Get_Color_Glyph_ClipBox(fFace, glyph->getGlyphID(), &clipBox)) { + if (FT_Get_Color_Glyph_ClipBox(fFace, glyph.getGlyphID(), &clipBox)) { // Find bounding box of clip box corner points, needed when clipbox is transformed. FT_BBox bbox; bbox.xMin = clipBox.bottom_left.x; @@ -1234,11 +1193,10 @@ void SkScalerContext_FreeType::generateMetrics(SkGlyph* glyph, SkArenaAlloc* all // Traverse the glyph graph with a focus on measuring the required bounding box. // The call to computeColrV1GlyphBoundingBox may modify the face. // Reset the face to load the base glyph for metrics. - if (!computeColrV1GlyphBoundingBox(fFace, glyph->getGlyphID(), &bounds) || + if (!computeColrV1GlyphBoundingBox(fFace, glyph.getGlyphID(), &bounds) || this->setupSize()) { - glyph->zeroMetrics(); - return; + return mx; } } } @@ -1254,12 +1212,11 @@ void SkScalerContext_FreeType::generateMetrics(SkGlyph* glyph, SkArenaAlloc* all flags &= ~FT_LOAD_RENDER; // Don't scan convert. flags &= ~FT_LOAD_COLOR; // Ignore SVG. // For COLRv0 compute the glyph bounding box from the union of layer bounding boxes. - while (FT_Get_Color_Glyph_Layer(fFace, glyph->getGlyphID(), &layerGlyphIndex, + while (FT_Get_Color_Glyph_Layer(fFace, glyph.getGlyphID(), &layerGlyphIndex, &layerColorIndex, &layerIterator)) { haveLayers = true; if (FT_Load_Glyph(fFace, layerGlyphIndex, flags)) { - glyph->zeroMetrics(); - return; + return mx; } SkRect currentBounds; @@ -1268,37 +1225,36 @@ void SkScalerContext_FreeType::generateMetrics(SkGlyph* glyph, SkArenaAlloc* all } } if (haveLayers) { - glyph->fScalerContextBits = ScalerContextBits::COLRv0; + mx.extraBits = ScalerContextBits::COLRv0; } } if (haveLayers) { - glyph->fMaskFormat = SkMask::kARGB32_Format; - glyph->setPath(alloc, nullptr, false); - setGlyphBounds(glyph, &bounds, this->isSubpixel()); + mx.maskFormat = SkMask::kARGB32_Format; + mx.neverRequestPath = true; + mx.bounds = computeGlyphBounds(glyph, &bounds, this->isSubpixel()); } } #endif //FT_COLOR_H // Even if haveLayers, the base glyph must be loaded to get the metrics. - if (FT_Load_Glyph(fFace, glyph->getGlyphID(), fLoadGlyphFlags | FT_LOAD_BITMAP_METRICS_ONLY)) { - glyph->zeroMetrics(); - return; + if (FT_Load_Glyph(fFace, glyph.getGlyphID(), fLoadGlyphFlags | FT_LOAD_BITMAP_METRICS_ONLY)) { + return mx; } if (!haveLayers) { - emboldenIfNeeded(fFace, fFace->glyph, glyph->getGlyphID()); + emboldenIfNeeded(fFace, fFace->glyph, glyph.getGlyphID()); if (fFace->glyph->format == FT_GLYPH_FORMAT_OUTLINE) { SkRect bounds; if (!getBoundsOfCurrentOutlineGlyph(fFace->glyph, &bounds)) { bounds = SkRect::MakeEmpty(); } - setGlyphBounds(glyph, &bounds, this->isSubpixel()); - updateGlyphBoundsIfLCD(glyph); + mx.bounds = computeGlyphBounds(glyph, &bounds, this->isSubpixel()); + updateGlyphBoundsIfLCD(&mx); } else if (fFace->glyph->format == FT_GLYPH_FORMAT_BITMAP) { - glyph->setPath(alloc, nullptr, false); + mx.neverRequestPath = true; if (this->isVertical()) { FT_Vector vector; @@ -1310,7 +1266,7 @@ void SkScalerContext_FreeType::generateMetrics(SkGlyph* glyph, SkArenaAlloc* all } if (fFace->glyph->bitmap.pixel_mode == FT_PIXEL_MODE_BGRA) { - glyph->fMaskFormat = SkMask::kARGB32_Format; + mx.maskFormat = SkMask::kARGB32_Format; } SkRect bounds = SkRect::MakeXYWH(SkIntToScalar(fFace->glyph->bitmap_left ), @@ -1318,13 +1274,14 @@ void SkScalerContext_FreeType::generateMetrics(SkGlyph* glyph, SkArenaAlloc* all SkIntToScalar(fFace->glyph->bitmap.width), SkIntToScalar(fFace->glyph->bitmap.rows )); fMatrix22Scalar.mapRect(&bounds); - setGlyphBounds(glyph, &bounds, this->shouldSubpixelBitmap(*glyph, fMatrix22Scalar)); + mx.bounds = computeGlyphBounds(glyph, &bounds, + this->shouldSubpixelBitmap(glyph, fMatrix22Scalar)); #if defined(FT_CONFIG_OPTION_SVG) } else if (fFace->glyph->format == FT_GLYPH_FORMAT_SVG) { - glyph->fScalerContextBits = ScalerContextBits::SVG; - glyph->fMaskFormat = SkMask::kARGB32_Format; - glyph->setPath(alloc, nullptr, false); + mx.extraBits = ScalerContextBits::SVG; + mx.maskFormat = SkMask::kARGB32_Format; + mx.neverRequestPath = true; SkPictureRecorder recorder; SkRect infiniteRect = SkRect::MakeLTRB(-SK_ScalarInfinity, -SK_ScalarInfinity, @@ -1332,70 +1289,69 @@ void SkScalerContext_FreeType::generateMetrics(SkGlyph* glyph, SkArenaAlloc* all sk_sp bboxh = SkRTreeFactory()(); SkSpan palette(fFaceRec->fSkPalette.get(), fFaceRec->fFTPaletteEntryCount); SkCanvas* recordingCanvas = recorder.beginRecording(infiniteRect, bboxh); - if (!this->drawSVGGlyph(fFace, *glyph, fLoadGlyphFlags, palette, recordingCanvas)) { - glyph->zeroMetrics(); - return; + if (!this->drawSVGGlyph(fFace, glyph, fLoadGlyphFlags, palette, recordingCanvas)) { + return mx; } sk_sp pic = recorder.finishRecordingAsPicture(); SkRect bounds = pic->cullRect(); SkASSERT(bounds.isFinite()); // drawSVGGlyph already applied the subpixel positioning. - setGlyphBounds(glyph, &bounds, false); + mx.bounds = computeGlyphBounds(glyph, &bounds, false); #endif // FT_CONFIG_OPTION_SVG } else { SkDEBUGFAIL("unknown glyph format"); - glyph->zeroMetrics(); - return; + return mx; } } if (this->isVertical()) { if (fDoLinearMetrics) { const SkScalar advanceScalar = SkFT_FixedToScalar(fFace->glyph->linearVertAdvance); - glyph->fAdvanceX = SkScalarToFloat(fMatrix22Scalar.getSkewX() * advanceScalar); - glyph->fAdvanceY = SkScalarToFloat(fMatrix22Scalar.getScaleY() * advanceScalar); + mx.advance.fX = SkScalarToFloat(fMatrix22Scalar.getSkewX() * advanceScalar); + mx.advance.fY = SkScalarToFloat(fMatrix22Scalar.getScaleY() * advanceScalar); } else { - glyph->fAdvanceX = -SkFDot6ToFloat(fFace->glyph->advance.x); - glyph->fAdvanceY = SkFDot6ToFloat(fFace->glyph->advance.y); + mx.advance.fX = -SkFDot6ToFloat(fFace->glyph->advance.x); + mx.advance.fY = SkFDot6ToFloat(fFace->glyph->advance.y); } } else { if (fDoLinearMetrics) { const SkScalar advanceScalar = SkFT_FixedToScalar(fFace->glyph->linearHoriAdvance); - glyph->fAdvanceX = SkScalarToFloat(fMatrix22Scalar.getScaleX() * advanceScalar); - glyph->fAdvanceY = SkScalarToFloat(fMatrix22Scalar.getSkewY() * advanceScalar); + mx.advance.fX = SkScalarToFloat(fMatrix22Scalar.getScaleX() * advanceScalar); + mx.advance.fY = SkScalarToFloat(fMatrix22Scalar.getSkewY() * advanceScalar); } else { - glyph->fAdvanceX = SkFDot6ToFloat(fFace->glyph->advance.x); - glyph->fAdvanceY = -SkFDot6ToFloat(fFace->glyph->advance.y); + mx.advance.fX = SkFDot6ToFloat(fFace->glyph->advance.x); + mx.advance.fY = -SkFDot6ToFloat(fFace->glyph->advance.y); } } #ifdef ENABLE_GLYPH_SPEW - LOG_INFO("Metrics(glyph:%d flags:0x%x) w:%d\n", glyph->getGlyphID(), fLoadGlyphFlags, glyph->fWidth); + LOG_INFO("Metrics(glyph:%d flags:0x%x) w:%d\n", glyph->getGlyphID(), fLoadGlyphFlags, glyph->width()); #endif + return mx; } -void SkScalerContext_FreeType::generateImage(const SkGlyph& glyph) { +void SkScalerContext_FreeType::generateImage(const SkGlyph& glyph, void* imageBuffer) { SkAutoMutexExclusive ac(f_t_mutex()); if (this->setupSize()) { - sk_bzero(glyph.fImage, glyph.imageSize()); + sk_bzero(imageBuffer, glyph.imageSize()); return; } - if (glyph.fScalerContextBits == ScalerContextBits::COLRv0 || - glyph.fScalerContextBits == ScalerContextBits::COLRv1 || - glyph.fScalerContextBits == ScalerContextBits::SVG ) + if (glyph.extraBits() == ScalerContextBits::COLRv0 || + glyph.extraBits() == ScalerContextBits::COLRv1 || + glyph.extraBits() == ScalerContextBits::SVG ) { SkASSERT(glyph.maskFormat() == SkMask::kARGB32_Format); SkBitmap dstBitmap; // TODO: mark this as sRGB when the blits will be sRGB. - dstBitmap.setInfo(SkImageInfo::Make(glyph.fWidth, glyph.fHeight, + dstBitmap.setInfo(SkImageInfo::Make(glyph.width(), glyph.height(), kN32_SkColorType, kPremul_SkAlphaType), glyph.rowBytes()); - dstBitmap.setPixels(glyph.fImage); + dstBitmap.setPixels(imageBuffer); SkCanvas canvas(dstBitmap); if constexpr (kSkShowTextBlitCoverage) { @@ -1403,18 +1359,18 @@ void SkScalerContext_FreeType::generateImage(const SkGlyph& glyph) { } else { canvas.clear(SK_ColorTRANSPARENT); } - canvas.translate(-glyph.fLeft, -glyph.fTop); + canvas.translate(-glyph.left(), -glyph.top()); SkSpan palette(fFaceRec->fSkPalette.get(), fFaceRec->fFTPaletteEntryCount); - if (glyph.fScalerContextBits == ScalerContextBits::COLRv0) { + if (glyph.extraBits() == ScalerContextBits::COLRv0) { #ifdef FT_COLOR_H this->drawCOLRv0Glyph(fFace, glyph, fLoadGlyphFlags, palette, &canvas); #endif - } else if (glyph.fScalerContextBits == ScalerContextBits::COLRv1) { + } else if (glyph.extraBits() == ScalerContextBits::COLRv1) { #ifdef TT_SUPPORT_COLRV1 this->drawCOLRv1Glyph(fFace, glyph, fLoadGlyphFlags, palette, &canvas); #endif - } else if (glyph.fScalerContextBits == ScalerContextBits::SVG) { + } else if (glyph.extraBits() == ScalerContextBits::SVG) { #if defined(FT_CONFIG_OPTION_SVG) if (FT_Load_Glyph(fFace, glyph.getGlyphID(), fLoadGlyphFlags)) { return; @@ -1426,7 +1382,7 @@ void SkScalerContext_FreeType::generateImage(const SkGlyph& glyph) { } if (FT_Load_Glyph(fFace, glyph.getGlyphID(), fLoadGlyphFlags)) { - sk_bzero(glyph.fImage, glyph.imageSize()); + sk_bzero(imageBuffer, glyph.imageSize()); return; } emboldenIfNeeded(fFace, fFace->glyph, glyph.getGlyphID()); @@ -1440,7 +1396,7 @@ void SkScalerContext_FreeType::generateImage(const SkGlyph& glyph) { bitmapMatrix = &subpixelBitmapMatrix; } - generateGlyphImage(fFace, glyph, *bitmapMatrix); + generateGlyphImage(fFace, glyph, imageBuffer, *bitmapMatrix); } sk_sp SkScalerContext_FreeType::generateDrawable(const SkGlyph& glyph) { @@ -1457,14 +1413,14 @@ sk_sp SkScalerContext_FreeType::generateDrawable(const SkGlyph& glyp } #if defined(FT_COLOR_H) || defined(TT_SUPPORT_COLRV1) || defined(FT_CONFIG_OPTION_SVG) - if (glyph.fScalerContextBits == ScalerContextBits::COLRv0 || - glyph.fScalerContextBits == ScalerContextBits::COLRv1 || - glyph.fScalerContextBits == ScalerContextBits::SVG ) + if (glyph.extraBits() == ScalerContextBits::COLRv0 || + glyph.extraBits() == ScalerContextBits::COLRv1 || + glyph.extraBits() == ScalerContextBits::SVG ) { SkSpan palette(fFaceRec->fSkPalette.get(), fFaceRec->fFTPaletteEntryCount); SkPictureRecorder recorder; SkCanvas* recordingCanvas = recorder.beginRecording(SkRect::Make(glyph.mask().fBounds)); - if (glyph.fScalerContextBits == ScalerContextBits::COLRv0) { + if (glyph.extraBits() == ScalerContextBits::COLRv0) { #ifdef FT_COLOR_H if (!this->drawCOLRv0Glyph(fFace, glyph, fLoadGlyphFlags, palette, recordingCanvas)) { return nullptr; @@ -1472,7 +1428,7 @@ sk_sp SkScalerContext_FreeType::generateDrawable(const SkGlyph& glyp #else return nullptr; #endif - } else if (glyph.fScalerContextBits == ScalerContextBits::COLRv1) { + } else if (glyph.extraBits() == ScalerContextBits::COLRv1) { #ifdef TT_SUPPORT_COLRV1 if (!this->drawCOLRv1Glyph(fFace, glyph, fLoadGlyphFlags, palette, recordingCanvas)) { return nullptr; @@ -1480,7 +1436,7 @@ sk_sp SkScalerContext_FreeType::generateDrawable(const SkGlyph& glyp #else return nullptr; #endif - } else if (glyph.fScalerContextBits == ScalerContextBits::SVG) { + } else if (glyph.extraBits() == ScalerContextBits::SVG) { #if defined(FT_CONFIG_OPTION_SVG) if (FT_Load_Glyph(fFace, glyph.getGlyphID(), fLoadGlyphFlags)) { return nullptr; diff --git a/src/ports/SkFontHost_FreeType_common.cpp b/src/ports/SkFontHost_FreeType_common.cpp index 355ee02e20f3..70af19768662 100644 --- a/src/ports/SkFontHost_FreeType_common.cpp +++ b/src/ports/SkFontHost_FreeType_common.cpp @@ -152,23 +152,23 @@ int bittst(const uint8_t data[], int bitOffset) { * FT_PIXEL_MODE_LCD_V */ template -void copyFT2LCD16(const FT_Bitmap& bitmap, const SkMask& mask, int lcdIsBGR, +void copyFT2LCD16(const FT_Bitmap& bitmap, SkMaskBuilder* dstMask, int lcdIsBGR, const uint8_t* tableR, const uint8_t* tableG, const uint8_t* tableB) { - SkASSERT(SkMask::kLCD16_Format == mask.fFormat); + SkASSERT(SkMask::kLCD16_Format == dstMask->fFormat); if (FT_PIXEL_MODE_LCD != bitmap.pixel_mode) { - SkASSERT(mask.fBounds.width() == static_cast(bitmap.width)); + SkASSERT(dstMask->fBounds.width() == static_cast(bitmap.width)); } if (FT_PIXEL_MODE_LCD_V != bitmap.pixel_mode) { - SkASSERT(mask.fBounds.height() == static_cast(bitmap.rows)); + SkASSERT(dstMask->fBounds.height() == static_cast(bitmap.rows)); } const uint8_t* src = bitmap.buffer; - uint16_t* dst = reinterpret_cast(mask.fImage); - const size_t dstRB = mask.fRowBytes; + uint16_t* dst = reinterpret_cast(dstMask->image()); + const size_t dstRB = dstMask->fRowBytes; - const int width = mask.fBounds.width(); - const int height = mask.fBounds.height(); + const int width = dstMask->fBounds.width(); + const int height = dstMask->fBounds.height(); switch (bitmap.pixel_mode) { case FT_PIXEL_MODE_MONO: @@ -190,7 +190,7 @@ void copyFT2LCD16(const FT_Bitmap& bitmap, const SkMask& mask, int lcdIsBGR, } break; case FT_PIXEL_MODE_LCD: - SkASSERT(3 * mask.fBounds.width() == static_cast(bitmap.width)); + SkASSERT(3 * dstMask->fBounds.width() == static_cast(bitmap.width)); for (int y = height; y --> 0;) { const uint8_t* triple = src; if (lcdIsBGR) { @@ -213,7 +213,7 @@ void copyFT2LCD16(const FT_Bitmap& bitmap, const SkMask& mask, int lcdIsBGR, } break; case FT_PIXEL_MODE_LCD_V: - SkASSERT(3 * mask.fBounds.height() == static_cast(bitmap.rows)); + SkASSERT(3 * dstMask->fBounds.height() == static_cast(bitmap.rows)); for (int y = height; y --> 0;) { const uint8_t* srcR = src; const uint8_t* srcG = srcR + bitmap.pitch; @@ -254,17 +254,17 @@ void copyFT2LCD16(const FT_Bitmap& bitmap, const SkMask& mask, int lcdIsBGR, * * TODO: All of these N need to be Y or otherwise ruled out. */ -void copyFTBitmap(const FT_Bitmap& srcFTBitmap, SkMask& dstMask) { - SkASSERTF(dstMask.fBounds.width() == static_cast(srcFTBitmap.width), +void copyFTBitmap(const FT_Bitmap& srcFTBitmap, SkMaskBuilder* dstMask) { + SkASSERTF(dstMask->fBounds.width() == static_cast(srcFTBitmap.width), "dstMask.fBounds.width() = %d\n" "static_cast(srcFTBitmap.width) = %d", - dstMask.fBounds.width(), + dstMask->fBounds.width(), static_cast(srcFTBitmap.width) ); - SkASSERTF(dstMask.fBounds.height() == static_cast(srcFTBitmap.rows), + SkASSERTF(dstMask->fBounds.height() == static_cast(srcFTBitmap.rows), "dstMask.fBounds.height() = %d\n" "static_cast(srcFTBitmap.rows) = %d", - dstMask.fBounds.height(), + dstMask->fBounds.height(), static_cast(srcFTBitmap.rows) ); @@ -274,9 +274,9 @@ void copyFTBitmap(const FT_Bitmap& srcFTBitmap, SkMask& dstMask) { const int srcPitch = srcFTBitmap.pitch; const size_t srcRowBytes = SkTAbs(srcPitch); - uint8_t* dst = dstMask.fImage; - const SkMask::Format dstFormat = static_cast(dstMask.fFormat); - const size_t dstRowBytes = dstMask.fRowBytes; + uint8_t* dst = dstMask->image(); + const SkMask::Format dstFormat = dstMask->fFormat; + const size_t dstRowBytes = dstMask->fRowBytes; const size_t width = srcFTBitmap.width; const size_t height = srcFTBitmap.rows; @@ -352,14 +352,14 @@ uint8_t pack_8_to_1(const uint8_t alpha[8]) { return SkToU8(bits); } -void packA8ToA1(const SkMask& mask, const uint8_t* src, size_t srcRB) { - const int height = mask.fBounds.height(); - const int width = mask.fBounds.width(); +void packA8ToA1(SkMaskBuilder* dstMask, const uint8_t* src, size_t srcRB) { + const int height = dstMask->fBounds.height(); + const int width = dstMask->fBounds.width(); const int octs = width >> 3; const int leftOverBits = width & 7; - uint8_t* dst = mask.fImage; - const int dstPad = mask.fRowBytes - SkAlign8(width)/8; + uint8_t* dst = dstMask->image(); + const int dstPad = dstMask->fRowBytes - SkAlign8(width)/8; SkASSERT(dstPad >= 0); const int srcPad = srcRB - width; @@ -1634,7 +1634,7 @@ bool SkScalerContext_FreeType_Base::drawSVGGlyph(FT_Face face, #endif // FT_CONFIG_OPTION_SVG void SkScalerContext_FreeType_Base::generateGlyphImage(FT_Face face, - const SkGlyph& glyph, + const SkGlyph& glyph, void* imageBuffer, const SkMatrix& bitmapTransform) { switch ( face->glyph->format ) { @@ -1649,9 +1649,9 @@ void SkScalerContext_FreeType_Base::generateGlyphImage(FT_Face face, dy = -dy; } - memset(glyph.fImage, 0, glyph.rowBytes() * glyph.fHeight); + memset(imageBuffer, 0, glyph.rowBytes() * glyph.height()); - if (SkMask::kLCD16_Format == glyph.fMaskFormat) { + if (SkMask::kLCD16_Format == glyph.maskFormat()) { const bool doBGR = SkToBool(fRec.fFlags & SkScalerContext::kLCD_BGROrder_Flag); const bool doVert = SkToBool(fRec.fFlags & SkScalerContext::kLCD_Vertical_Flag); @@ -1663,9 +1663,11 @@ void SkScalerContext_FreeType_Base::generateGlyphImage(FT_Face face, return; } - SkMask mask = glyph.mask(); + SkMaskBuilder mask(static_cast(imageBuffer), + glyph.iRect(), glyph.rowBytes(), glyph.maskFormat()); + if constexpr (kSkShowTextBlitCoverage) { - memset(mask.fImage, 0x80, mask.fBounds.height() * mask.fRowBytes); + memset(mask.image(), 0x80, mask.fBounds.height() * mask.fRowBytes); } FT_GlyphSlotRec& ftGlyph = *face->glyph; @@ -1695,12 +1697,12 @@ void SkScalerContext_FreeType_Base::generateGlyphImage(FT_Face face, ftGlyph.bitmap_left = mask.fBounds.fLeft; } if (mask.fBounds.fTop < -ftGlyph.bitmap_top) { - mask.fImage += mask.fRowBytes * (-ftGlyph.bitmap_top - mask.fBounds.fTop); - mask.fBounds.fTop = -ftGlyph.bitmap_top; + mask.image() += mask.fRowBytes * (-ftGlyph.bitmap_top - mask.fBounds.fTop); + mask.bounds().fTop = -ftGlyph.bitmap_top; } if (mask.fBounds.fLeft < ftGlyph.bitmap_left) { - mask.fImage += sizeof(uint16_t) * (ftGlyph.bitmap_left - mask.fBounds.fLeft); - mask.fBounds.fLeft = ftGlyph.bitmap_left; + mask.image() += sizeof(uint16_t) * (ftGlyph.bitmap_left - mask.fBounds.fLeft); + mask.bounds().fLeft = ftGlyph.bitmap_left; } // Origins aligned, clean up the width and height. int ftVertScale = (doVert ? 3 : 1); @@ -1712,16 +1714,16 @@ void SkScalerContext_FreeType_Base::generateGlyphImage(FT_Face face, ftGlyph.bitmap.width = mask.fBounds.width() * ftHoriScale; } if (SkToInt(ftGlyph.bitmap.rows) < mask.fBounds.height() * ftVertScale) { - mask.fBounds.fBottom = mask.fBounds.fTop + ftGlyph.bitmap.rows / ftVertScale; + mask.bounds().fBottom = mask.fBounds.fTop + ftGlyph.bitmap.rows / ftVertScale; } if (SkToInt(ftGlyph.bitmap.width) < mask.fBounds.width() * ftHoriScale) { - mask.fBounds.fRight = mask.fBounds.fLeft + ftGlyph.bitmap.width / ftHoriScale; + mask.bounds().fRight = mask.fBounds.fLeft + ftGlyph.bitmap.width / ftHoriScale; } if (fPreBlend.isApplicable()) { - copyFT2LCD16(ftGlyph.bitmap, mask, doBGR, + copyFT2LCD16(ftGlyph.bitmap, &mask, doBGR, fPreBlend.fR, fPreBlend.fG, fPreBlend.fB); } else { - copyFT2LCD16(ftGlyph.bitmap, mask, doBGR, + copyFT2LCD16(ftGlyph.bitmap, &mask, doBGR, fPreBlend.fR, fPreBlend.fG, fPreBlend.fB); } // Restore the buffer pointer so FreeType can properly free it. @@ -1741,16 +1743,16 @@ void SkScalerContext_FreeType_Base::generateGlyphImage(FT_Face face, FT_Outline_Translate(outline, dx - ((bbox.xMin + dx) & ~63), dy - ((bbox.yMin + dy) & ~63)); - target.width = glyph.fWidth; - target.rows = glyph.fHeight; + target.width = glyph.width(); + target.rows = glyph.height(); target.pitch = glyph.rowBytes(); - target.buffer = reinterpret_cast(glyph.fImage); - target.pixel_mode = compute_pixel_mode(glyph.fMaskFormat); + target.buffer = static_cast(imageBuffer); + target.pixel_mode = compute_pixel_mode(glyph.maskFormat()); target.num_grays = 256; FT_Outline_Get_Bitmap(face->glyph->library, outline, &target); if constexpr (kSkShowTextBlitCoverage) { - if (glyph.fMaskFormat == SkMask::kBW_Format) { + if (glyph.maskFormat() == SkMask::kBW_Format) { for (unsigned y = 0; y < target.rows; y += 2) { for (unsigned x = (y & 0x2); x < target.width; x+=4) { uint8_t& b = target.buffer[(target.pitch * y) + (x >> 3)]; @@ -1771,7 +1773,7 @@ void SkScalerContext_FreeType_Base::generateGlyphImage(FT_Face face, case FT_GLYPH_FORMAT_BITMAP: { FT_Pixel_Mode pixel_mode = static_cast(face->glyph->bitmap.pixel_mode); - SkMask::Format maskFormat = static_cast(glyph.fMaskFormat); + SkMask::Format maskFormat = glyph.maskFormat(); // Assume that the other formats do not exist. SkASSERT(FT_PIXEL_MODE_MONO == pixel_mode || @@ -1786,8 +1788,10 @@ void SkScalerContext_FreeType_Base::generateGlyphImage(FT_Face face, // If no scaling needed, directly copy glyph bitmap. if (bitmapTransform.isIdentity()) { - SkMask dstMask = glyph.mask(); - copyFTBitmap(face->glyph->bitmap, dstMask); + SkMaskBuilder dstMask = SkMaskBuilder(static_cast(imageBuffer), + glyph.iRect(), glyph.rowBytes(), + glyph.maskFormat()); + copyFTBitmap(face->glyph->bitmap, &dstMask); break; } @@ -1801,17 +1805,17 @@ void SkScalerContext_FreeType_Base::generateGlyphImage(FT_Face face, SkColorType_for_FTPixelMode(pixel_mode), kPremul_SkAlphaType)); if (!unscaledBitmap.tryAllocPixels()) { - // TODO: set the fImage to indicate "missing" - memset(glyph.fImage, 0, glyph.rowBytes() * glyph.fHeight); + // TODO: set the imageBuffer to indicate "missing" + memset(imageBuffer, 0, glyph.rowBytes() * glyph.height()); return; } - SkMask unscaledBitmapAlias; - unscaledBitmapAlias.fImage = reinterpret_cast(unscaledBitmap.getPixels()); - unscaledBitmapAlias.fBounds.setWH(unscaledBitmap.width(), unscaledBitmap.height()); - unscaledBitmapAlias.fRowBytes = unscaledBitmap.rowBytes(); - unscaledBitmapAlias.fFormat = SkMaskFormat_for_SkColorType(unscaledBitmap.colorType()); - copyFTBitmap(face->glyph->bitmap, unscaledBitmapAlias); + SkMaskBuilder unscaledBitmapAlias( + reinterpret_cast(unscaledBitmap.getPixels()), + SkIRect::MakeWH(unscaledBitmap.width(), unscaledBitmap.height()), + unscaledBitmap.rowBytes(), + SkMaskFormat_for_SkColorType(unscaledBitmap.colorType())); + copyFTBitmap(face->glyph->bitmap, &unscaledBitmapAlias); // Wrap the glyph's mask in a bitmap, unless the glyph's mask is BW or LCD. // BW requires an A8 target for resizing, which can then be down sampled. @@ -1823,18 +1827,18 @@ void SkScalerContext_FreeType_Base::generateGlyphImage(FT_Face face, } SkBitmap dstBitmap; // TODO: mark this as sRGB when the blits will be sRGB. - dstBitmap.setInfo(SkImageInfo::Make(glyph.fWidth, glyph.fHeight, + dstBitmap.setInfo(SkImageInfo::Make(glyph.width(), glyph.height(), SkColorType_for_SkMaskFormat(maskFormat), kPremul_SkAlphaType), bitmapRowBytes); if (SkMask::kBW_Format == maskFormat || SkMask::kLCD16_Format == maskFormat) { if (!dstBitmap.tryAllocPixels()) { // TODO: set the fImage to indicate "missing" - memset(glyph.fImage, 0, glyph.rowBytes() * glyph.fHeight); + memset(imageBuffer, 0, glyph.rowBytes() * glyph.height()); return; } } else { - dstBitmap.setPixels(glyph.fImage); + dstBitmap.setPixels(imageBuffer); } // Scale unscaledBitmap into dstBitmap. @@ -1844,7 +1848,7 @@ void SkScalerContext_FreeType_Base::generateGlyphImage(FT_Face face, } else { canvas.clear(SK_ColorTRANSPARENT); } - canvas.translate(-glyph.fLeft, -glyph.fTop); + canvas.translate(-glyph.left(), -glyph.top()); canvas.concat(bitmapTransform); canvas.translate(face->glyph->bitmap_left, -face->glyph->bitmap_top); @@ -1853,13 +1857,14 @@ void SkScalerContext_FreeType_Base::generateGlyphImage(FT_Face face, // If the destination is BW or LCD, convert from A8. if (SkMask::kBW_Format == maskFormat) { - // Copy the A8 dstBitmap into the A1 glyph.fImage. - SkMask dstMask = glyph.mask(); - packA8ToA1(dstMask, dstBitmap.getAddr8(0, 0), dstBitmap.rowBytes()); + // Copy the A8 dstBitmap into the A1 imageBuffer. + SkMaskBuilder dstMask(static_cast(imageBuffer), + glyph.iRect(), glyph.rowBytes(), glyph.maskFormat()); + packA8ToA1(&dstMask, dstBitmap.getAddr8(0, 0), dstBitmap.rowBytes()); } else if (SkMask::kLCD16_Format == maskFormat) { - // Copy the A8 dstBitmap into the LCD16 glyph.fImage. + // Copy the A8 dstBitmap into the LCD16 imageBuffer. uint8_t* src = dstBitmap.getAddr8(0, 0); - uint16_t* dst = reinterpret_cast(glyph.fImage); + uint16_t* dst = reinterpret_cast(imageBuffer); for (int y = dstBitmap.height(); y --> 0;) { for (int x = 0; x < dstBitmap.width(); ++x) { dst[x] = grayToRGB16(src[x]); @@ -1872,19 +1877,19 @@ void SkScalerContext_FreeType_Base::generateGlyphImage(FT_Face face, default: SkDEBUGFAIL("unknown glyph format"); - memset(glyph.fImage, 0, glyph.rowBytes() * glyph.fHeight); + memset(imageBuffer, 0, glyph.rowBytes() * glyph.height()); return; } // We used to always do this pre-USE_COLOR_LUMINANCE, but with colorlum, // it is optional #if defined(SK_GAMMA_APPLY_TO_A8) - if (SkMask::kA8_Format == glyph.fMaskFormat && fPreBlend.isApplicable()) { - uint8_t* SK_RESTRICT dst = (uint8_t*)glyph.fImage; + if (SkMask::kA8_Format == glyph.maskFormat() && fPreBlend.isApplicable()) { + uint8_t* SK_RESTRICT dst = (uint8_t*)imageBuffer; unsigned rowBytes = glyph.rowBytes(); - for (int y = glyph.fHeight - 1; y >= 0; --y) { - for (int x = glyph.fWidth - 1; x >= 0; --x) { + for (int y = glyph.height() - 1; y >= 0; --y) { + for (int x = glyph.width() - 1; x >= 0; --x) { dst[x] = fPreBlend.fG[dst[x]]; } dst += rowBytes; diff --git a/src/ports/SkFontHost_FreeType_common.h b/src/ports/SkFontHost_FreeType_common.h index 1d3a8f89fe90..6cba6046ee6c 100644 --- a/src/ports/SkFontHost_FreeType_common.h +++ b/src/ports/SkFontHost_FreeType_common.h @@ -58,7 +58,7 @@ class SkScalerContext_FreeType_Base : public SkScalerContext { SkSpan palette, SkCanvas*); bool drawSVGGlyph(FT_Face, const SkGlyph&, uint32_t loadGlyphFlags, SkSpan palette, SkCanvas*); - void generateGlyphImage(FT_Face, const SkGlyph&, const SkMatrix& bitmapTransform); + void generateGlyphImage(FT_Face, const SkGlyph&, void*, const SkMatrix& bitmapTransform); bool generateGlyphPath(FT_Face, SkPath*); bool generateFacePath(FT_Face, SkGlyphID, uint32_t loadGlyphFlags, SkPath*); diff --git a/src/ports/SkFontHost_win.cpp b/src/ports/SkFontHost_win.cpp index 50888188283f..7f09fb38c00c 100644 --- a/src/ports/SkFontHost_win.cpp +++ b/src/ports/SkFontHost_win.cpp @@ -572,9 +572,8 @@ class SkScalerContext_GDI : public SkScalerContext { bool isValid() const; protected: - bool generateAdvance(SkGlyph* glyph) override; - void generateMetrics(SkGlyph* glyph, SkArenaAlloc*) override; - void generateImage(const SkGlyph& glyph) override; + GlyphMetrics generateMetrics(const SkGlyph&, SkArenaAlloc*) override; + void generateImage(const SkGlyph&, void* imageBuffer) override; bool generatePath(const SkGlyph& glyph, SkPath* path) override; void generateFontMetrics(SkFontMetrics*) override; @@ -583,10 +582,11 @@ class SkScalerContext_GDI : public SkScalerContext { AutoSTMalloc* glyphbuf); template static void RGBToA8(const SkGdiRGB* SK_RESTRICT src, size_t srcRB, - const SkGlyph& glyph, const uint8_t* table8); + const SkGlyph& glyph, void* imageBuffer, const uint8_t* table8); template static void RGBToLcd16(const SkGdiRGB* SK_RESTRICT src, size_t srcRB, const SkGlyph& glyph, + void* imageBuffer, const uint8_t* tableR, const uint8_t* tableG, const uint8_t* tableB); HDCOffscreen fOffscreen; @@ -806,60 +806,53 @@ bool SkScalerContext_GDI::isValid() const { return fDDC && fFont; } -bool SkScalerContext_GDI::generateAdvance(SkGlyph* glyph) { - return false; -} - -void SkScalerContext_GDI::generateMetrics(SkGlyph* glyph, SkArenaAlloc* alloc) { +SkScalerContext::GlyphMetrics SkScalerContext_GDI::generateMetrics(const SkGlyph& glyph, + SkArenaAlloc*) { SkASSERT(fDDC); - glyph->fMaskFormat = fRec.fMaskFormat; + GlyphMetrics mx(glyph.maskFormat()); if (fType == SkScalerContext_GDI::kBitmap_Type || fType == SkScalerContext_GDI::kLine_Type) { SIZE size; - WORD glyphs = glyph->getGlyphID(); + WORD glyphs = glyph.getGlyphID(); + int width, height; if (0 == GetTextExtentPointI(fDDC, &glyphs, 1, &size)) { - glyph->fWidth = SkToS16(fTM.tmMaxCharWidth); - glyph->fHeight = SkToS16(fTM.tmHeight); + width = fTM.tmMaxCharWidth; + height = fTM.tmHeight; } else { - glyph->fWidth = SkToS16(size.cx); - glyph->fHeight = SkToS16(size.cy); + width = size.cx; + height = size.cy; } - glyph->fTop = SkToS16(-fTM.tmAscent); // Bitmap FON cannot underhang, but vector FON may. // There appears no means of determining underhang of vector FON. - glyph->fLeft = SkToS16(0); - glyph->fAdvanceX = glyph->width(); - glyph->fAdvanceY = 0; + int left = 0; + int top = -fTM.tmAscent; + + mx.bounds = SkIRect::MakeXYWH(left, top, width, height); + mx.advance = SkVector{(float)width, 0}; // Vector FON will transform nicely, but bitmap FON do not. if (fType == SkScalerContext_GDI::kLine_Type) { - SkRect bounds = SkRect::MakeXYWH(glyph->fLeft, glyph->fTop, - glyph->width(), glyph->height()); + SkRect bounds = SkRect::MakeXYWH(left, top, width, height); SkMatrix m; m.setAll(SkFIXEDToScalar(fMat22.eM11), -SkFIXEDToScalar(fMat22.eM21), 0, -SkFIXEDToScalar(fMat22.eM12), SkFIXEDToScalar(fMat22.eM22), 0, 0, 0, 1); m.mapRect(&bounds); - bounds.roundOut(&bounds); - glyph->fLeft = SkScalarTruncToInt(bounds.fLeft); - glyph->fTop = SkScalarTruncToInt(bounds.fTop); - glyph->fWidth = SkScalarTruncToInt(bounds.width()); - glyph->fHeight = SkScalarTruncToInt(bounds.height()); + bounds.roundOut(&mx.bounds); } // Apply matrix to advance. - glyph->fAdvanceY = -SkFIXEDToFloat(fMat22.eM12) * glyph->fAdvanceX; - glyph->fAdvanceX *= SkFIXEDToFloat(fMat22.eM11); + mx.advance.fY = -SkFIXEDToFloat(fMat22.eM12) * mx.advance.fX; + mx.advance.fX *= SkFIXEDToFloat(fMat22.eM11); // These do not have an outline path at all. - glyph->setPath(alloc, nullptr, false); - - return; + mx.neverRequestPath = true; + return mx; } - UINT glyphId = glyph->getGlyphID(); + UINT glyphId = glyph.getGlyphID(); GLYPHMETRICS gm; sk_bzero(&gm, sizeof(gm)); @@ -869,8 +862,7 @@ void SkScalerContext_GDI::generateMetrics(SkGlyph* glyph, SkArenaAlloc* alloc) { LogFontTypeface::EnsureAccessible(this->getTypeface()); status = GetGlyphOutlineW(fDDC, glyphId, GGO_METRICS | GGO_GLYPH_INDEX, &gm, 0, nullptr, &fMat22); if (GDI_ERROR == status) { - glyph->zeroMetrics(); - return; + return mx; } } @@ -884,43 +876,34 @@ void SkScalerContext_GDI::generateMetrics(SkGlyph* glyph, SkArenaAlloc* alloc) { empty = (0 == bufferSize); } - glyph->fTop = SkToS16(-gm.gmptGlyphOrigin.y); - glyph->fLeft = SkToS16(gm.gmptGlyphOrigin.x); - if (empty) { - glyph->fWidth = 0; - glyph->fHeight = 0; - } else { + + if (!empty) { + int y = -gm.gmptGlyphOrigin.y; + int x = gm.gmptGlyphOrigin.x; // Outset, since the image may bleed out of the black box. // For embedded bitmaps the black box should be exact. // For outlines we need to outset by 1 in all directions for bleed. // For ClearType we need to outset by 2 for bleed. - glyph->fWidth = gm.gmBlackBoxX + 4; - glyph->fHeight = gm.gmBlackBoxY + 4; - glyph->fTop -= 2; - glyph->fLeft -= 2; + mx.bounds = SkIRect::MakeXYWH(x, y, gm.gmBlackBoxX, gm.gmBlackBoxY).makeOutset(2, 2); } // TODO(benjaminwagner): What is the type of gm.gmCellInc[XY]? - glyph->fAdvanceX = (float)((int)gm.gmCellIncX); - glyph->fAdvanceY = (float)((int)gm.gmCellIncY); + mx.advance.fX = (float)((int)gm.gmCellIncX); + mx.advance.fY = (float)((int)gm.gmCellIncY); if ((fTM.tmPitchAndFamily & TMPF_VECTOR) && this->isLinearMetrics()) { sk_bzero(&gm, sizeof(gm)); status = GetGlyphOutlineW(fDDC, glyphId, GGO_METRICS | GGO_GLYPH_INDEX, &gm, 0, nullptr, &fHighResMat22); if (GDI_ERROR != status) { - SkPoint advance; - fHiResMatrix.mapXY(SkIntToScalar(gm.gmCellIncX), SkIntToScalar(gm.gmCellIncY), &advance); - glyph->fAdvanceX = SkScalarToFloat(advance.fX); - glyph->fAdvanceY = SkScalarToFloat(advance.fY); + mx.advance = fHiResMatrix.mapXY(SkIntToScalar(gm.gmCellIncX), + SkIntToScalar(gm.gmCellIncY)); } } else if (!isAxisAligned(this->fRec)) { status = GetGlyphOutlineW(fDDC, glyphId, GGO_METRICS | GGO_GLYPH_INDEX, &gm, 0, nullptr, &fGsA); if (GDI_ERROR != status) { - SkPoint advance; - fG_inv.mapXY(SkIntToScalar(gm.gmCellIncX), SkIntToScalar(gm.gmCellIncY), &advance); - glyph->fAdvanceX = SkScalarToFloat(advance.fX); - glyph->fAdvanceY = SkScalarToFloat(advance.fY); + mx.advance = fG_inv.mapXY(SkIntToScalar(gm.gmCellIncX), SkIntToScalar(gm.gmCellIncY)); } } + return mx; } static const MAT2 gMat2Identity = {{0, 1}, {0, 0}, {0, 0}, {0, 1}}; @@ -1067,12 +1050,12 @@ static inline uint16_t rgb_to_lcd16(SkGdiRGB rgb, const uint8_t* tableR, template void SkScalerContext_GDI::RGBToA8(const SkGdiRGB* SK_RESTRICT src, size_t srcRB, - const SkGlyph& glyph, const uint8_t* table8) { + const SkGlyph& glyph, void* imageBuffer, const uint8_t* table8) { const size_t dstRB = glyph.rowBytes(); const int width = glyph.width(); - uint8_t* SK_RESTRICT dst = (uint8_t*)((char*)glyph.fImage + (glyph.height() - 1) * dstRB); + uint8_t* SK_RESTRICT dst = (uint8_t*)((char*)imageBuffer + (glyph.height() - 1) * dstRB); - for (int y = 0; y < glyph.fHeight; y++) { + for (int y = 0; y < glyph.height(); y++) { for (int i = 0; i < width; i++) { dst[i] = rgb_to_a8(src[i], table8); if constexpr (kSkShowTextBlitCoverage) { @@ -1086,13 +1069,13 @@ void SkScalerContext_GDI::RGBToA8(const SkGdiRGB* SK_RESTRICT src, size_t srcRB, template void SkScalerContext_GDI::RGBToLcd16( - const SkGdiRGB* SK_RESTRICT src, size_t srcRB, const SkGlyph& glyph, + const SkGdiRGB* SK_RESTRICT src, size_t srcRB, const SkGlyph& glyph, void* imageBuffer, const uint8_t* tableR, const uint8_t* tableG, const uint8_t* tableB) { const size_t dstRB = glyph.rowBytes(); const int width = glyph.width(); - uint16_t* SK_RESTRICT dst = (uint16_t*)((char*)glyph.fImage + (glyph.height() - 1) * dstRB); + uint16_t* SK_RESTRICT dst = (uint16_t*)((char*)imageBuffer + (glyph.height() - 1) * dstRB); - for (int y = 0; y < glyph.fHeight; y++) { + for (int y = 0; y < glyph.height(); y++) { for (int i = 0; i < width; i++) { dst[i] = rgb_to_lcd16(src[i], tableR, tableG, tableB); } @@ -1101,7 +1084,7 @@ void SkScalerContext_GDI::RGBToLcd16( } } -void SkScalerContext_GDI::generateImage(const SkGlyph& glyph) { +void SkScalerContext_GDI::generateImage(const SkGlyph& glyph, void* imageBuffer) { SkASSERT(fDDC); const bool isBW = SkMask::kBW_Format == fRec.fMaskFormat; @@ -1113,7 +1096,7 @@ void SkScalerContext_GDI::generateImage(const SkGlyph& glyph) { LogFontTypeface::EnsureAccessible(this->getTypeface()); bits = fOffscreen.draw(glyph, isBW, &srcRB); if (nullptr == bits) { - sk_bzero(glyph.fImage, glyph.imageSize()); + sk_bzero(imageBuffer, glyph.imageSize()); return; } } @@ -1133,7 +1116,7 @@ void SkScalerContext_GDI::generateImage(const SkGlyph& glyph) { //Other code may also be applying the pre-blend, so we'd need another //one with this and one without. SkGdiRGB* addr = (SkGdiRGB*)bits; - for (int y = 0; y < glyph.fHeight; ++y) { + for (int y = 0; y < glyph.height(); ++y) { for (int x = 0; x < glyph.width(); ++x) { int r = (addr[x] >> 16) & 0xFF; int g = (addr[x] >> 8) & 0xFF; @@ -1147,17 +1130,17 @@ void SkScalerContext_GDI::generateImage(const SkGlyph& glyph) { size_t dstRB = glyph.rowBytes(); if (isBW) { const uint8_t* src = (const uint8_t*)bits; - uint8_t* dst = (uint8_t*)((char*)glyph.fImage + (glyph.fHeight - 1) * dstRB); - for (int y = 0; y < glyph.fHeight; y++) { + uint8_t* dst = (uint8_t*)((char*)imageBuffer + (glyph.height() - 1) * dstRB); + for (int y = 0; y < glyph.height(); y++) { memcpy(dst, src, dstRB); src += srcRB; dst -= dstRB; } if constexpr (kSkShowTextBlitCoverage) { - if (glyph.width() > 0 && glyph.fHeight > 0) { + if (glyph.width() > 0 && glyph.height() > 0) { int bitCount = glyph.width() & 7; - uint8_t* first = (uint8_t*)glyph.fImage; - uint8_t* last = (uint8_t*)((char*)glyph.fImage + glyph.height() * dstRB - 1); + uint8_t* first = (uint8_t*)imageBuffer; + uint8_t* last = first + glyph.height() * dstRB - 1; *first |= 1 << 7; *last |= bitCount == 0 ? 1 : 1 << (8 - bitCount); } @@ -1167,17 +1150,19 @@ void SkScalerContext_GDI::generateImage(const SkGlyph& glyph) { // ... until we have the caller tell us that explicitly const SkGdiRGB* src = (const SkGdiRGB*)bits; if (fPreBlend.isApplicable()) { - RGBToA8(src, srcRB, glyph, fPreBlend.fG); + RGBToA8(src, srcRB, glyph, imageBuffer, fPreBlend.fG); } else { - RGBToA8(src, srcRB, glyph, fPreBlend.fG); + RGBToA8(src, srcRB, glyph, imageBuffer, fPreBlend.fG); } } else { // LCD16 const SkGdiRGB* src = (const SkGdiRGB*)bits; - SkASSERT(SkMask::kLCD16_Format == glyph.fMaskFormat); + SkASSERT(SkMask::kLCD16_Format == glyph.maskFormat()); if (fPreBlend.isApplicable()) { - RGBToLcd16(src, srcRB, glyph, fPreBlend.fR, fPreBlend.fG, fPreBlend.fB); + RGBToLcd16(src, srcRB, glyph, imageBuffer, + fPreBlend.fR, fPreBlend.fG, fPreBlend.fB); } else { - RGBToLcd16(src, srcRB, glyph, fPreBlend.fR, fPreBlend.fG, fPreBlend.fB); + RGBToLcd16(src, srcRB, glyph, imageBuffer, + fPreBlend.fR, fPreBlend.fG, fPreBlend.fB); } } } diff --git a/src/ports/SkFontMgr_android.cpp b/src/ports/SkFontMgr_android.cpp index 25cc9f9172d9..0de567146d9f 100644 --- a/src/ports/SkFontMgr_android.cpp +++ b/src/ports/SkFontMgr_android.cpp @@ -385,7 +385,7 @@ class SkFontMgr_Android : public SkFontMgr { style, SkToBool(elegant), lang.getTag(), character); if (matchingTypeface) { - return std::move(matchingTypeface); + return matchingTypeface; } lang = lang.getParent(); @@ -396,7 +396,7 @@ class SkFontMgr_Android : public SkFontMgr { style, SkToBool(elegant), SkString(), character); if (matchingTypeface) { - return std::move(matchingTypeface); + return matchingTypeface; } } } diff --git a/src/ports/SkGlobalInitialization_default.cpp b/src/ports/SkGlobalInitialization_default.cpp index d5baac476dfc..d33ea2f8032f 100644 --- a/src/ports/SkGlobalInitialization_default.cpp +++ b/src/ports/SkGlobalInitialization_default.cpp @@ -129,7 +129,6 @@ SkRegisterComposeImageFilterFlattenable(); SkRegisterCropImageFilterFlattenable(); SkRegisterDisplacementMapImageFilterFlattenable(); - SkRegisterDropShadowImageFilterFlattenable(); SkRegisterImageImageFilterFlattenable(); SkRegisterLightingImageFilterFlattenables(); SkRegisterMagnifierImageFilterFlattenable(); @@ -142,8 +141,9 @@ SkRegisterRuntimeImageFilterFlattenable(); #endif SkRegisterShaderImageFilterFlattenable(); - SkRegisterTileImageFilterFlattenable(); SK_REGISTER_FLATTENABLE(SkLocalMatrixImageFilter); + + SkRegisterLegacyDropShadowImageFilterFlattenable(); } #endif diff --git a/src/ports/SkOSFile_posix.cpp b/src/ports/SkOSFile_posix.cpp index c8ba97412c0b..1be133079044 100644 --- a/src/ports/SkOSFile_posix.cpp +++ b/src/ports/SkOSFile_posix.cpp @@ -61,7 +61,7 @@ static bool sk_ino(FILE* a, SkFILEID* id) { if (fd < 0) { return 0; } - struct stat status; + struct stat status = {}; if (0 != fstat(fd, &status)) { return 0; } @@ -82,7 +82,7 @@ void sk_fmunmap(const void* addr, size_t length) { } void* sk_fdmmap(int fd, size_t* size) { - struct stat status; + struct stat status = {}; if (0 != fstat(fd, &status)) { return nullptr; } @@ -189,7 +189,7 @@ bool SkOSFile::Iter::next(SkString* name, bool getDir) { dirent* entry; while ((entry = ::readdir(self.fDIR)) != nullptr) { - struct stat s; + struct stat s = {}; SkString str(self.fPath); if (!str.endsWith("/") && !str.endsWith("\\")) { diff --git a/src/ports/SkOSFile_stdio.cpp b/src/ports/SkOSFile_stdio.cpp index 895802ec5a3a..029e68d50f34 100644 --- a/src/ports/SkOSFile_stdio.cpp +++ b/src/ports/SkOSFile_stdio.cpp @@ -139,7 +139,7 @@ void sk_fclose(FILE* f) { } bool sk_isdir(const char *path) { - struct stat status; + struct stat status = {}; if (0 != stat(path, &status)) { #ifdef SK_BUILD_FOR_IOS // check the bundle directory if not in default path diff --git a/src/ports/SkScalerContext_mac_ct.cpp b/src/ports/SkScalerContext_mac_ct.cpp index 31a3e6a6bf6c..9593ba21349a 100644 --- a/src/ports/SkScalerContext_mac_ct.cpp +++ b/src/ports/SkScalerContext_mac_ct.cpp @@ -293,27 +293,21 @@ CGRGBPixel* SkScalerContext_Mac::Offscreen::getCG(const SkScalerContext_Mac& con return image; } -bool SkScalerContext_Mac::generateAdvance(SkGlyph* glyph) { - return false; -} - -void SkScalerContext_Mac::generateMetrics(SkGlyph* glyph, SkArenaAlloc* alloc) { - glyph->fMaskFormat = fRec.fMaskFormat; +SkScalerContext::GlyphMetrics SkScalerContext_Mac::generateMetrics(const SkGlyph& glyph, + SkArenaAlloc*) { + GlyphMetrics mx(glyph.maskFormat()); - if (((SkTypeface_Mac*)this->getTypeface())->fHasColorGlyphs) { - glyph->setPath(alloc, nullptr, false); - } + mx.neverRequestPath = ((SkTypeface_Mac*)this->getTypeface())->fHasColorGlyphs; - const CGGlyph cgGlyph = (CGGlyph) glyph->getGlyphID(); - glyph->zeroMetrics(); + const CGGlyph cgGlyph = (CGGlyph)glyph.getGlyphID(); // The following block produces cgAdvance in CG units (pixels, y up). CGSize cgAdvance; CTFontGetAdvancesForGlyphs(fCTFont.get(), kCTFontOrientationHorizontal, &cgGlyph, &cgAdvance, 1); cgAdvance = CGSizeApplyAffineTransform(cgAdvance, fTransform); - glyph->fAdvanceX = SkFloatFromCGFloat(cgAdvance.width); - glyph->fAdvanceY = -SkFloatFromCGFloat(cgAdvance.height); + mx.advance.fX = SkFloatFromCGFloat(cgAdvance.width); + mx.advance.fY = -SkFloatFromCGFloat(cgAdvance.height); // The following produces skBounds in SkGlyph units (pixels, y down), // or returns early if skBounds would be empty. @@ -339,12 +333,12 @@ void SkScalerContext_Mac::generateMetrics(SkGlyph* glyph, SkArenaAlloc* alloc) { if (0 == cgAdvance.width && 0 == cgAdvance.height) { SkUniqueCFRef path(CTFontCreatePathForGlyph(fCTFont.get(), cgGlyph,nullptr)); if (!path || CGPathIsEmpty(path.get())) { - return; + return mx; } } if (SkCGRectIsEmpty(cgBounds)) { - return; + return mx; } // Convert cgBounds to SkGlyph units (pixels, y down). @@ -355,27 +349,17 @@ void SkScalerContext_Mac::generateMetrics(SkGlyph* glyph, SkArenaAlloc* alloc) { // Currently the bounds are based on being rendered at (0,0). // The top left must not move, since that is the base from which subpixel positioning is offset. if (fDoSubPosition) { - skBounds.fRight += SkFixedToFloat(glyph->getSubXFixed()); - skBounds.fBottom += SkFixedToFloat(glyph->getSubYFixed()); - } - - // We're trying to pack left and top into int16_t, - // and width and height into uint16_t, after outsetting by 1. - if (!SkRect::MakeXYWH(-32767, -32767, 65535, 65535).contains(skBounds)) { - return; + skBounds.fRight += SkFixedToFloat(glyph.getSubXFixed()); + skBounds.fBottom += SkFixedToFloat(glyph.getSubYFixed()); } - SkIRect skIBounds; - skBounds.roundOut(&skIBounds); + skBounds.roundOut(&mx.bounds); // Expand the bounds by 1 pixel, to give CG room for anti-aliasing. // Note that this outset is to allow room for LCD smoothed glyphs. However, the correct outset // is not currently known, as CG dilates the outlines by some percentage. // Note that if this context is A8 and not back-forming from LCD, there is no need to outset. - skIBounds.outset(1, 1); - glyph->fLeft = SkToS16(skIBounds.fLeft); - glyph->fTop = SkToS16(skIBounds.fTop); - glyph->fWidth = SkToU16(skIBounds.width()); - glyph->fHeight = SkToU16(skIBounds.height()); + mx.bounds.outset(1, 1); + return mx; } static constexpr uint8_t sk_pow2_table(size_t i) { @@ -476,7 +460,7 @@ static SkPMColor cgpixels_to_pmcolor(CGRGBPixel rgb) { return SkPackARGB32(a, r, g, b); } -void SkScalerContext_Mac::generateImage(const SkGlyph& glyph) { +void SkScalerContext_Mac::generateImage(const SkGlyph& glyph, void* imageBuffer) { CGGlyph cgGlyph = SkTo(glyph.getGlyphID()); // FIXME: lcd smoothed un-hinted rasterization unsupported. @@ -490,8 +474,8 @@ void SkScalerContext_Mac::generateImage(const SkGlyph& glyph) { } // Fix the glyph - if ((glyph.fMaskFormat == SkMask::kLCD16_Format) || - (glyph.fMaskFormat == SkMask::kA8_Format + if ((glyph.maskFormat() == SkMask::kLCD16_Format) || + (glyph.maskFormat() == SkMask::kA8_Format && requestSmooth && SkCTFontGetSmoothBehavior() != SkCTFontSmoothBehavior::none)) { @@ -503,8 +487,8 @@ void SkScalerContext_Mac::generateImage(const SkGlyph& glyph) { //Other code may also be applying the pre-blend, so we'd need another //one with this and one without. CGRGBPixel* addr = cgPixels; - for (int y = 0; y < glyph.fHeight; ++y) { - for (int x = 0; x < glyph.fWidth; ++x) { + for (int y = 0; y < glyph.height(); ++y) { + for (int x = 0; x < glyph.width(); ++x) { int r = (addr[x] >> 16) & 0xFF; int g = (addr[x] >> 8) & 0xFF; int b = (addr[x] >> 0) & 0xFF; @@ -515,38 +499,38 @@ void SkScalerContext_Mac::generateImage(const SkGlyph& glyph) { } // Convert glyph to mask - switch (glyph.fMaskFormat) { + switch (glyph.maskFormat()) { case SkMask::kLCD16_Format: { if (fPreBlend.isApplicable()) { - RGBToLcd16(cgPixels, cgRowBytes, glyph, glyph.fImage, + RGBToLcd16(cgPixels, cgRowBytes, glyph, imageBuffer, fPreBlend.fR, fPreBlend.fG, fPreBlend.fB); } else { - RGBToLcd16(cgPixels, cgRowBytes, glyph, glyph.fImage, + RGBToLcd16(cgPixels, cgRowBytes, glyph, imageBuffer, fPreBlend.fR, fPreBlend.fG, fPreBlend.fB); } } break; case SkMask::kA8_Format: { if (fPreBlend.isApplicable()) { - RGBToA8(cgPixels, cgRowBytes, glyph, glyph.fImage, fPreBlend.fG); + RGBToA8(cgPixels, cgRowBytes, glyph, imageBuffer, fPreBlend.fG); } else { - RGBToA8(cgPixels, cgRowBytes, glyph, glyph.fImage, fPreBlend.fG); + RGBToA8(cgPixels, cgRowBytes, glyph, imageBuffer, fPreBlend.fG); } } break; case SkMask::kBW_Format: { - const int width = glyph.fWidth; + const int width = glyph.width(); size_t dstRB = glyph.rowBytes(); - uint8_t* dst = (uint8_t*)glyph.fImage; - for (int y = 0; y < glyph.fHeight; y++) { + uint8_t* dst = (uint8_t*)imageBuffer; + for (int y = 0; y < glyph.height(); y++) { cgpixels_to_bits(dst, cgPixels, width); cgPixels = SkTAddOffset(cgPixels, cgRowBytes); dst = SkTAddOffset(dst, dstRB); } } break; case SkMask::kARGB32_Format: { - const int width = glyph.fWidth; + const int width = glyph.width(); size_t dstRB = glyph.rowBytes(); - SkPMColor* dst = (SkPMColor*)glyph.fImage; - for (int y = 0; y < glyph.fHeight; y++) { + SkPMColor* dst = (SkPMColor*)imageBuffer; + for (int y = 0; y < glyph.height(); y++) { for (int x = 0; x < width; ++x) { dst[x] = cgpixels_to_pmcolor(cgPixels[x]); } diff --git a/src/ports/SkScalerContext_mac_ct.h b/src/ports/SkScalerContext_mac_ct.h index 3e234a90c565..614c53638e18 100644 --- a/src/ports/SkScalerContext_mac_ct.h +++ b/src/ports/SkScalerContext_mac_ct.h @@ -44,9 +44,8 @@ class SkScalerContext_Mac : public SkScalerContext { SkScalerContext_Mac(sk_sp, const SkScalerContextEffects&, const SkDescriptor*); protected: - bool generateAdvance(SkGlyph* glyph) override; - void generateMetrics(SkGlyph* glyph, SkArenaAlloc*) override; - void generateImage(const SkGlyph& glyph) override; + GlyphMetrics generateMetrics(const SkGlyph&, SkArenaAlloc*) override; + void generateImage(const SkGlyph&, void*) override; bool generatePath(const SkGlyph& glyph, SkPath* path) override; void generateFontMetrics(SkFontMetrics*) override; diff --git a/src/ports/SkScalerContext_win_dw.cpp b/src/ports/SkScalerContext_win_dw.cpp index 3c71539aa145..608374ae3687 100644 --- a/src/ports/SkScalerContext_win_dw.cpp +++ b/src/ports/SkScalerContext_win_dw.cpp @@ -1232,15 +1232,15 @@ bool SkScalerContext_DW::drawColorV1Image(const SkGlyph& glyph, SkCanvas& canvas return this->drawColorV1Paint(canvas, *paintReader, paintElement); } -bool SkScalerContext_DW::generateColorV1Image(const SkGlyph& glyph) { - SkASSERT(glyph.fMaskFormat == SkMask::Format::kARGB32_Format); +bool SkScalerContext_DW::generateColorV1Image(const SkGlyph& glyph, void* imageBuffer) { + SkASSERT(glyph.maskFormat() == SkMask::Format::kARGB32_Format); SkBitmap dstBitmap; // TODO: mark this as sRGB when the blits will be sRGB. - dstBitmap.setInfo(SkImageInfo::Make(glyph.fWidth, glyph.fHeight, + dstBitmap.setInfo(SkImageInfo::Make(glyph.width(), glyph.height(), kN32_SkColorType, kPremul_SkAlphaType), glyph.rowBytes()); - dstBitmap.setPixels(glyph.fImage); + dstBitmap.setPixels(imageBuffer); SkCanvas canvas(dstBitmap); if constexpr (kSkShowTextBlitCoverage) { @@ -1248,7 +1248,7 @@ bool SkScalerContext_DW::generateColorV1Image(const SkGlyph& glyph) { } else { canvas.clear(SK_ColorTRANSPARENT); } - canvas.translate(-SkIntToScalar(glyph.fLeft), -SkIntToScalar(glyph.fTop)); + canvas.translate(-SkIntToScalar(glyph.left()), -SkIntToScalar(glyph.top())); return this->drawColorV1Image(glyph, canvas); } @@ -1391,13 +1391,13 @@ bool SkScalerContext_DW::generateColorV1PaintBounds( } } -bool SkScalerContext_DW::generateColorV1Metrics(SkGlyph* glyph) { +bool SkScalerContext_DW::generateColorV1Metrics(const SkGlyph& glyph, SkIRect* ibounds) { DWriteFontTypeface* typeface = this->getDWriteTypeface(); IDWriteFontFace7* fontFace = typeface->fDWriteFontFace7/*.get()*/; if (!fontFace) { return false; } - UINT32 glyphIndex = glyph->getGlyphID(); + UINT32 glyphIndex = glyph.getGlyphID(); SkTScopedComPtr paintReader; HRESULT hr; @@ -1428,8 +1428,8 @@ bool SkScalerContext_DW::generateColorV1Metrics(SkGlyph* glyph) { SkScalar scale = fTextSizeRender; matrix.preScale(scale, scale); if (this->isSubpixel()) { - matrix.postTranslate(SkFixedToScalar(glyph->getSubXFixed()), - SkFixedToScalar(glyph->getSubYFixed())); + matrix.postTranslate(SkFixedToScalar(glyph.getSubXFixed()), + SkFixedToScalar(glyph.getSubYFixed())); } SkRect r; @@ -1443,22 +1443,21 @@ bool SkScalerContext_DW::generateColorV1Metrics(SkGlyph* glyph) { r = sk_rect_from(clipBox); matrix.mapRect(&r); } - SetGlyphBounds(glyph, r); + r.roundOut(ibounds); return true; } #else // DWRITE_CORE || (defined(NTDDI_WIN11_ZN) && NTDDI_VERSION >= NTDDI_WIN11_ZN) -bool SkScalerContext_DW::generateColorV1Metrics(SkGlyph*) { return false; } -bool SkScalerContext_DW::generateColorV1Image(const SkGlyph&) { return false; } +bool SkScalerContext_DW::generateColorV1Metrics(const SkGlyph&, SkIRect*) { return false; } +bool SkScalerContext_DW::generateColorV1Image(const SkGlyph&, void*) { return false; } bool SkScalerContext_DW::drawColorV1Image(const SkGlyph&, SkCanvas&) { return false; } #endif // DWRITE_CORE || (defined(NTDDI_WIN11_ZN) && NTDDI_VERSION >= NTDDI_WIN11_ZN) -bool SkScalerContext_DW::generateAdvance(SkGlyph* glyph) { - glyph->fAdvanceX = 0; - glyph->fAdvanceY = 0; - uint16_t glyphId = glyph->getGlyphID(); +bool SkScalerContext_DW::setAdvance(const SkGlyph& glyph, SkVector* advance) { + *advance = {0, 0}; + uint16_t glyphId = glyph.getGlyphID(); DWriteFontTypeface* typeface = this->getDWriteTypeface(); // DirectWrite treats all out of bounds glyph ids as having the same data as glyph 0. @@ -1496,34 +1495,32 @@ bool SkScalerContext_DW::generateAdvance(SkGlyph* glyph) { } SkScalar advanceX = fTextSizeMeasure * gm.advanceWidth / dwfm.designUnitsPerEm; - SkVector advance = { advanceX, 0 }; + *advance = { advanceX, 0 }; if (DWRITE_MEASURING_MODE_GDI_CLASSIC == fMeasuringMode || DWRITE_MEASURING_MODE_GDI_NATURAL == fMeasuringMode) { // DirectWrite produced 'compatible' metrics, but while close, // the end result is not always an integer as it would be with GDI. - advance.fX = SkScalarRoundToScalar(advance.fX); + advance->fX = SkScalarRoundToScalar(advance->fX); } - fSkXform.mapVectors(&advance, 1); - - glyph->fAdvanceX = SkScalarToFloat(advance.fX); - glyph->fAdvanceY = SkScalarToFloat(advance.fY); + fSkXform.mapVectors(advance, 1); return true; } -bool SkScalerContext_DW::generateDWMetrics(SkGlyph* glyph, +bool SkScalerContext_DW::generateDWMetrics(const SkGlyph& glyph, DWRITE_RENDERING_MODE renderingMode, - DWRITE_TEXTURE_TYPE textureType) + DWRITE_TEXTURE_TYPE textureType, + SkIRect* ibounds) { DWriteFontTypeface* typeface = this->getDWriteTypeface(); //Measure raster size. - fXform.dx = SkFixedToFloat(glyph->getSubXFixed()); - fXform.dy = SkFixedToFloat(glyph->getSubYFixed()); + fXform.dx = SkFixedToFloat(glyph.getSubXFixed()); + fXform.dy = SkFixedToFloat(glyph.getSubYFixed()); FLOAT advance = 0; - UINT16 glyphId = glyph->getGlyphID(); + UINT16 glyphId = glyph.getGlyphID(); DWRITE_GLYPH_OFFSET offset; offset.advanceOffset = 0.0f; @@ -1585,17 +1582,7 @@ bool SkScalerContext_DW::generateDWMetrics(SkGlyph* glyph, return false; } - // We're trying to pack left and top into int16_t, - // and width and height into uint16_t, after outsetting by 1. - if (!SkIRect::MakeXYWH(-32767, -32767, 65535, 65535).contains( - SkIRect::MakeLTRB(bbox.left, bbox.top, bbox.right, bbox.bottom))) { - return false; - } - - glyph->fWidth = SkToU16(bbox.right - bbox.left); - glyph->fHeight = SkToU16(bbox.bottom - bbox.top); - glyph->fLeft = SkToS16(bbox.left); - glyph->fTop = SkToS16(bbox.top); + *ibounds = SkIRect::MakeLTRB(bbox.left, bbox.top, bbox.right, bbox.bottom); return true; } @@ -1628,26 +1615,9 @@ bool SkScalerContext_DW::getColorGlyphRun(const SkGlyph& glyph, return true; } -void SkScalerContext_DW::SetGlyphBounds(SkGlyph* glyph, const SkRect& bounds) { - SkIRect ibounds = bounds.roundOut(); - - if (!SkTFitsInfWidth )>(ibounds.width ()) || - !SkTFitsInfHeight)>(ibounds.height()) || - !SkTFitsInfTop )>(ibounds.top ()) || - !SkTFitsInfLeft )>(ibounds.left ()) ) - { - ibounds = SkIRect::MakeEmpty(); - } - - glyph->fWidth = SkToU16(ibounds.width ()); - glyph->fHeight = SkToU16(ibounds.height()); - glyph->fTop = SkToS16(ibounds.top ()); - glyph->fLeft = SkToS16(ibounds.left ()); -} - -bool SkScalerContext_DW::generateColorMetrics(SkGlyph* glyph) { +bool SkScalerContext_DW::generateColorMetrics(const SkGlyph& glyph, SkIRect* ibounds) { SkTScopedComPtr colorLayers; - if (!getColorGlyphRun(*glyph, &colorLayers)) { + if (!getColorGlyphRun(glyph, &colorLayers)) { return false; } SkASSERT(colorLayers.get()); @@ -1679,28 +1649,27 @@ bool SkScalerContext_DW::generateColorMetrics(SkGlyph* glyph) { } SkMatrix matrix = fSkXform; if (this->isSubpixel()) { - matrix.postTranslate(SkFixedToScalar(glyph->getSubXFixed()), - SkFixedToScalar(glyph->getSubYFixed())); + matrix.postTranslate(SkFixedToScalar(glyph.getSubXFixed()), + SkFixedToScalar(glyph.getSubYFixed())); } matrix.mapRect(&bounds); - SetGlyphBounds(glyph, bounds); + bounds.roundOut(ibounds); return true; } -bool SkScalerContext_DW::generateSVGMetrics(SkGlyph* glyph) { +bool SkScalerContext_DW::generateSVGMetrics(const SkGlyph& glyph, SkIRect* ibounds) { SkPictureRecorder recorder; SkRect infiniteRect = SkRect::MakeLTRB(-SK_ScalarInfinity, -SK_ScalarInfinity, SK_ScalarInfinity, SK_ScalarInfinity); sk_sp bboxh = SkRTreeFactory()(); SkCanvas* recordingCanvas = recorder.beginRecording(infiniteRect, bboxh); - if (!this->drawSVGImage(*glyph, *recordingCanvas)) { + if (!this->drawSVGImage(glyph, *recordingCanvas)) { return false; } sk_sp pic = recorder.finishRecordingAsPicture(); SkRect bounds = pic->cullRect(); SkASSERT(bounds.isFinite()); - - SetGlyphBounds(glyph, bounds); + bounds.roundOut(ibounds); return true; } @@ -1721,14 +1690,14 @@ static void ReleaseProc(const void* ptr, void* context) { } } -bool SkScalerContext_DW::generatePngMetrics(SkGlyph* glyph) { +bool SkScalerContext_DW::generatePngMetrics(const SkGlyph& glyph, SkIRect* ibounds) { IDWriteFontFace4* fontFace4 = this->getDWriteTypeface()->fDWriteFontFace4.get(); if (!fontFace4) { return false; } DWRITE_GLYPH_IMAGE_FORMATS imageFormats; - HRBM(fontFace4->GetGlyphImageFormats(glyph->getGlyphID(), 0, UINT32_MAX, &imageFormats), + HRBM(fontFace4->GetGlyphImageFormats(glyph.getGlyphID(), 0, UINT32_MAX, &imageFormats), "Cannot get glyph image formats."); if (!(imageFormats & DWRITE_GLYPH_IMAGE_FORMATS_PNG)) { return false; @@ -1736,7 +1705,7 @@ bool SkScalerContext_DW::generatePngMetrics(SkGlyph* glyph) { DWRITE_GLYPH_IMAGE_DATA glyphData; void* glyphDataContext; - HRBM(fontFace4->GetGlyphImageData(glyph->getGlyphID(), + HRBM(fontFace4->GetGlyphImageData(glyph.getGlyphID(), fTextSizeRender, DWRITE_GLYPH_IMAGE_FORMATS_PNG, &glyphData, @@ -1765,59 +1734,58 @@ bool SkScalerContext_DW::generatePngMetrics(SkGlyph* glyph) { matrix.preScale(scale, scale); matrix.preTranslate(-glyphData.horizontalLeftOrigin.x, -glyphData.horizontalLeftOrigin.y); if (this->isSubpixel()) { - matrix.postTranslate(SkFixedToScalar(glyph->getSubXFixed()), - SkFixedToScalar(glyph->getSubYFixed())); + matrix.postTranslate(SkFixedToScalar(glyph.getSubXFixed()), + SkFixedToScalar(glyph.getSubYFixed())); } matrix.mapRect(&bounds); - SetGlyphBounds(glyph, bounds); + bounds.roundOut(ibounds); return true; } -void SkScalerContext_DW::generateMetrics(SkGlyph* glyph, SkArenaAlloc* alloc) { - glyph->fWidth = 0; - glyph->fHeight = 0; - glyph->fLeft = 0; - glyph->fTop = 0; - glyph->fScalerContextBits = ScalerContextBits::NONE; +SkScalerContext::GlyphMetrics SkScalerContext_DW::generateMetrics(const SkGlyph& glyph, + SkArenaAlloc* alloc) { + GlyphMetrics mx(glyph.maskFormat()); - if (!this->generateAdvance(glyph)) { - return; + mx.extraBits = ScalerContextBits::NONE; + + if (!this->setAdvance(glyph, &mx.advance)) { + return mx; } DWriteFontTypeface* typeface = this->getDWriteTypeface(); if (typeface->fIsColorFont) { - if (generateColorV1Metrics(glyph)) { - glyph->fMaskFormat = SkMask::kARGB32_Format; - glyph->fScalerContextBits |= ScalerContextBits::COLRv1; - glyph->setPath(alloc, nullptr, false); - return; + if (generateColorV1Metrics(glyph, &mx.bounds)) { + mx.maskFormat = SkMask::kARGB32_Format; + mx.extraBits |= ScalerContextBits::COLRv1; + mx.neverRequestPath = true; + return mx; } - if (generateColorMetrics(glyph)) { - glyph->fMaskFormat = SkMask::kARGB32_Format; - glyph->fScalerContextBits |= ScalerContextBits::COLR; - glyph->setPath(alloc, nullptr, false); - return; + if (generateColorMetrics(glyph, &mx.bounds)) { + mx.maskFormat = SkMask::kARGB32_Format; + mx.extraBits |= ScalerContextBits::COLR; + mx.neverRequestPath = true; + return mx; } - if (generateSVGMetrics(glyph)) { - glyph->fMaskFormat = SkMask::kARGB32_Format; - glyph->fScalerContextBits |= ScalerContextBits::SVG; - glyph->setPath(alloc, nullptr, false); - return; + if (generateSVGMetrics(glyph, &mx.bounds)) { + mx.maskFormat = SkMask::kARGB32_Format; + mx.extraBits |= ScalerContextBits::SVG; + mx.neverRequestPath = true; + return mx; } - if (generatePngMetrics(glyph)) { - glyph->fMaskFormat = SkMask::kARGB32_Format; - glyph->fScalerContextBits |= ScalerContextBits::PNG; - glyph->setPath(alloc, nullptr, false); - return; + if (generatePngMetrics(glyph, &mx.bounds)) { + mx.maskFormat = SkMask::kARGB32_Format; + mx.extraBits |= ScalerContextBits::PNG; + mx.neverRequestPath = true; + return mx; } } - if (this->generateDWMetrics(glyph, fRenderingMode, fTextureType)) { - glyph->fScalerContextBits = ScalerContextBits::DW; - return; + if (this->generateDWMetrics(glyph, fRenderingMode, fTextureType, &mx.bounds)) { + mx.extraBits = ScalerContextBits::DW; + return mx; } // GetAlphaTextureBounds succeeds but returns an empty RECT if there are no @@ -1828,30 +1796,21 @@ void SkScalerContext_DW::generateMetrics(SkGlyph* glyph, SkArenaAlloc* alloc) { { if (this->generateDWMetrics(glyph, DWRITE_RENDERING_MODE_ALIASED, - DWRITE_TEXTURE_ALIASED_1x1)) + DWRITE_TEXTURE_ALIASED_1x1, + &mx.bounds)) { - glyph->fMaskFormat = SkMask::kBW_Format; - glyph->fScalerContextBits = ScalerContextBits::DW_1; - return; + mx.maskFormat = SkMask::kBW_Format; + mx.extraBits = ScalerContextBits::DW_1; + return mx; } } // TODO: Try DWRITE_TEXTURE_CLEARTYPE_3x1 if DWRITE_TEXTURE_ALIASED_1x1 fails // GetAlphaTextureBounds can fail for various reasons. // As a fallback, attempt to generate the metrics and image from the path. - SkDEBUGCODE(glyph->fAdvancesBoundsFormatAndInitialPathDone = true;) - this->getPath(*glyph, alloc); - const SkPath* devPath = glyph->path(); - if (devPath) { - // Sometimes all the above fails. If so, try to create the glyph from path. - const SkMask::Format format = glyph->maskFormat(); - const bool doVert = SkToBool(fRec.fFlags & SkScalerContext::kLCD_Vertical_Flag); - const bool a8LCD = SkToBool(fRec.fFlags & SkScalerContext::kGenA8FromLCD_Flag); - const bool hairline = glyph->pathIsHairline(); - if (GenerateMetricsFromPath(glyph, *devPath, format, doVert, a8LCD, hairline)) { - glyph->fScalerContextBits = ScalerContextBits::PATH; - } - } + mx.computeFromPath = true; + mx.extraBits = ScalerContextBits::PATH; + return mx; } void SkScalerContext_DW::generateFontMetrics(SkFontMetrics* metrics) { @@ -1935,10 +1894,11 @@ void SkScalerContext_DW::generateFontMetrics(SkFontMetrics* metrics) { #include "include/private/SkColorData.h" -void SkScalerContext_DW::BilevelToBW(const uint8_t* SK_RESTRICT src, const SkGlyph& glyph) { +void SkScalerContext_DW::BilevelToBW(const uint8_t* SK_RESTRICT src, + const SkGlyph& glyph, void* imageBuffer) { const int width = glyph.width(); const size_t dstRB = (width + 7) >> 3; - uint8_t* SK_RESTRICT dst = static_cast(glyph.fImage); + uint8_t* SK_RESTRICT dst = static_cast(imageBuffer); int byteCount = width >> 3; int bitCount = width & 7; @@ -1973,7 +1933,7 @@ void SkScalerContext_DW::BilevelToBW(const uint8_t* SK_RESTRICT src, const SkGly } if constexpr (kSkShowTextBlitCoverage) { - dst = static_cast(glyph.fImage); + dst = static_cast(imageBuffer); for (unsigned y = 0; y < (unsigned)glyph.height(); y += 2) { for (unsigned x = (y & 0x2); x < (unsigned)glyph.width(); x+=4) { uint8_t& b = dst[(dstRB * y) + (x >> 3)]; @@ -1985,11 +1945,11 @@ void SkScalerContext_DW::BilevelToBW(const uint8_t* SK_RESTRICT src, const SkGly template void SkScalerContext_DW::GrayscaleToA8(const uint8_t* SK_RESTRICT src, - const SkGlyph& glyph, + const SkGlyph& glyph, void* imageBuffer, const uint8_t* table8) { const size_t dstRB = glyph.rowBytes(); const int width = glyph.width(); - uint8_t* SK_RESTRICT dst = static_cast(glyph.fImage); + uint8_t* SK_RESTRICT dst = static_cast(imageBuffer); for (int y = 0; y < glyph.height(); y++) { for (int i = 0; i < width; i++) { @@ -2005,11 +1965,11 @@ void SkScalerContext_DW::GrayscaleToA8(const uint8_t* SK_RESTRICT src, template void SkScalerContext_DW::RGBToA8(const uint8_t* SK_RESTRICT src, - const SkGlyph& glyph, + const SkGlyph& glyph, void* imageBuffer, const uint8_t* table8) { const size_t dstRB = glyph.rowBytes(); const int width = glyph.width(); - uint8_t* SK_RESTRICT dst = static_cast(glyph.fImage); + uint8_t* SK_RESTRICT dst = static_cast(imageBuffer); for (int y = 0; y < glyph.height(); y++) { for (int i = 0; i < width; i++) { @@ -2027,11 +1987,12 @@ void SkScalerContext_DW::RGBToA8(const uint8_t* SK_RESTRICT src, template void SkScalerContext_DW::RGBToLcd16(const uint8_t* SK_RESTRICT src, const SkGlyph& glyph, + void* imageBuffer, const uint8_t* tableR, const uint8_t* tableG, const uint8_t* tableB) { const size_t dstRB = glyph.rowBytes(); const int width = glyph.width(); - uint16_t* SK_RESTRICT dst = static_cast(glyph.fImage); + uint16_t* SK_RESTRICT dst = static_cast(imageBuffer); for (int y = 0; y < glyph.height(); y++) { for (int i = 0; i < width; i++) { @@ -2143,9 +2104,9 @@ const void* SkScalerContext_DW::getDWMaskBits(const SkGlyph& glyph, return fBits.begin(); } -bool SkScalerContext_DW::generateDWImage(const SkGlyph& glyph) { +bool SkScalerContext_DW::generateDWImage(const SkGlyph& glyph, void* imageBuffer) { //Create the mask. - ScalerContextBits::value_type format = glyph.fScalerContextBits; + ScalerContextBits::value_type format = glyph.extraBits(); DWRITE_RENDERING_MODE renderingMode = fRenderingMode; DWRITE_TEXTURE_TYPE textureType = fTextureType; if (format == ScalerContextBits::DW_1) { @@ -2154,43 +2115,47 @@ bool SkScalerContext_DW::generateDWImage(const SkGlyph& glyph) { } const void* bits = this->getDWMaskBits(glyph, renderingMode, textureType); if (!bits) { - sk_bzero(glyph.fImage, glyph.imageSize()); + sk_bzero(imageBuffer, glyph.imageSize()); return false; } //Copy the mask into the glyph. const uint8_t* src = (const uint8_t*)bits; if (DWRITE_RENDERING_MODE_ALIASED == renderingMode) { - SkASSERT(SkMask::kBW_Format == glyph.fMaskFormat); + SkASSERT(SkMask::kBW_Format == glyph.maskFormat()); SkASSERT(DWRITE_TEXTURE_ALIASED_1x1 == textureType); - BilevelToBW(src, glyph); + BilevelToBW(src, glyph, imageBuffer); } else if (!isLCD(fRec)) { if (textureType == DWRITE_TEXTURE_ALIASED_1x1) { if (fPreBlend.isApplicable()) { - GrayscaleToA8(src, glyph, fPreBlend.fG); + GrayscaleToA8(src, glyph, imageBuffer, fPreBlend.fG); } else { - GrayscaleToA8(src, glyph, fPreBlend.fG); + GrayscaleToA8(src, glyph, imageBuffer, fPreBlend.fG); } } else { if (fPreBlend.isApplicable()) { - RGBToA8(src, glyph, fPreBlend.fG); + RGBToA8(src, glyph, imageBuffer, fPreBlend.fG); } else { - RGBToA8(src, glyph, fPreBlend.fG); + RGBToA8(src, glyph, imageBuffer, fPreBlend.fG); } } } else { - SkASSERT(SkMask::kLCD16_Format == glyph.fMaskFormat); + SkASSERT(SkMask::kLCD16_Format == glyph.maskFormat()); if (fPreBlend.isApplicable()) { if (fRec.fFlags & SkScalerContext::kLCD_BGROrder_Flag) { - RGBToLcd16(src, glyph, fPreBlend.fR, fPreBlend.fG, fPreBlend.fB); + RGBToLcd16(src, glyph, imageBuffer, + fPreBlend.fR, fPreBlend.fG, fPreBlend.fB); } else { - RGBToLcd16(src, glyph, fPreBlend.fR, fPreBlend.fG, fPreBlend.fB); + RGBToLcd16(src, glyph, imageBuffer, + fPreBlend.fR, fPreBlend.fG, fPreBlend.fB); } } else { if (fRec.fFlags & SkScalerContext::kLCD_BGROrder_Flag) { - RGBToLcd16(src, glyph, fPreBlend.fR, fPreBlend.fG, fPreBlend.fB); + RGBToLcd16(src, glyph, imageBuffer, + fPreBlend.fR, fPreBlend.fG, fPreBlend.fB); } else { - RGBToLcd16(src, glyph, fPreBlend.fR, fPreBlend.fG, fPreBlend.fB); + RGBToLcd16(src, glyph, imageBuffer, + fPreBlend.fR, fPreBlend.fG, fPreBlend.fB); } } } @@ -2254,15 +2219,15 @@ bool SkScalerContext_DW::drawColorImage(const SkGlyph& glyph, SkCanvas& canvas) return true; } -bool SkScalerContext_DW::generateColorImage(const SkGlyph& glyph) { - SkASSERT(glyph.fMaskFormat == SkMask::Format::kARGB32_Format); +bool SkScalerContext_DW::generateColorImage(const SkGlyph& glyph, void* imageBuffer) { + SkASSERT(glyph.maskFormat() == SkMask::Format::kARGB32_Format); SkBitmap dstBitmap; // TODO: mark this as sRGB when the blits will be sRGB. - dstBitmap.setInfo(SkImageInfo::Make(glyph.fWidth, glyph.fHeight, + dstBitmap.setInfo(SkImageInfo::Make(glyph.width(), glyph.height(), kN32_SkColorType, kPremul_SkAlphaType), glyph.rowBytes()); - dstBitmap.setPixels(glyph.fImage); + dstBitmap.setPixels(imageBuffer); SkCanvas canvas(dstBitmap); if constexpr (kSkShowTextBlitCoverage) { @@ -2270,7 +2235,7 @@ bool SkScalerContext_DW::generateColorImage(const SkGlyph& glyph) { } else { canvas.clear(SK_ColorTRANSPARENT); } - canvas.translate(-SkIntToScalar(glyph.fLeft), -SkIntToScalar(glyph.fTop)); + canvas.translate(-SkIntToScalar(glyph.left()), -SkIntToScalar(glyph.top())); return this->drawColorImage(glyph, canvas); } @@ -2326,15 +2291,15 @@ bool SkScalerContext_DW::drawSVGImage(const SkGlyph& glyph, SkCanvas& canvas) { fRec.fForegroundColor, SkSpan(palette, paletteEntryCount)); } -bool SkScalerContext_DW::generateSVGImage(const SkGlyph& glyph) { - SkASSERT(glyph.fMaskFormat == SkMask::Format::kARGB32_Format); +bool SkScalerContext_DW::generateSVGImage(const SkGlyph& glyph, void* imageBuffer) { + SkASSERT(glyph.maskFormat() == SkMask::Format::kARGB32_Format); SkBitmap dstBitmap; // TODO: mark this as sRGB when the blits will be sRGB. - dstBitmap.setInfo(SkImageInfo::Make(glyph.fWidth, glyph.fHeight, + dstBitmap.setInfo(SkImageInfo::Make(glyph.width(), glyph.height(), kN32_SkColorType, kPremul_SkAlphaType), glyph.rowBytes()); - dstBitmap.setPixels(glyph.fImage); + dstBitmap.setPixels(imageBuffer); SkCanvas canvas(dstBitmap); if constexpr (kSkShowTextBlitCoverage) { @@ -2342,7 +2307,7 @@ bool SkScalerContext_DW::generateSVGImage(const SkGlyph& glyph) { } else { canvas.clear(SK_ColorTRANSPARENT); } - canvas.translate(-SkIntToScalar(glyph.fLeft), -SkIntToScalar(glyph.fTop)); + canvas.translate(-SkIntToScalar(glyph.left()), -SkIntToScalar(glyph.top())); return this->drawSVGImage(glyph, canvas); } @@ -2383,14 +2348,14 @@ bool SkScalerContext_DW::drawPngImage(const SkGlyph& glyph, SkCanvas& canvas) { return true; } -bool SkScalerContext_DW::generatePngImage(const SkGlyph& glyph) { - SkASSERT(glyph.fMaskFormat == SkMask::Format::kARGB32_Format); +bool SkScalerContext_DW::generatePngImage(const SkGlyph& glyph, void* imageBuffer) { + SkASSERT(glyph.maskFormat() == SkMask::Format::kARGB32_Format); SkBitmap dstBitmap; dstBitmap.setInfo(SkImageInfo::Make(glyph.width(), glyph.height(), kN32_SkColorType, kPremul_SkAlphaType), glyph.rowBytes()); - dstBitmap.setPixels(glyph.fImage); + dstBitmap.setPixels(imageBuffer); SkCanvas canvas(dstBitmap); canvas.clear(SK_ColorTRANSPARENT); @@ -2399,24 +2364,25 @@ bool SkScalerContext_DW::generatePngImage(const SkGlyph& glyph) { return this->drawPngImage(glyph, canvas); } -void SkScalerContext_DW::generateImage(const SkGlyph& glyph) { - ScalerContextBits::value_type format = glyph.fScalerContextBits; +void SkScalerContext_DW::generateImage(const SkGlyph& glyph, void* imageBuffer) { + ScalerContextBits::value_type format = glyph.extraBits(); if (format == ScalerContextBits::DW || format == ScalerContextBits::DW_1) { - this->generateDWImage(glyph); + this->generateDWImage(glyph, imageBuffer); } else if (format == ScalerContextBits::COLRv1) { - this->generateColorV1Image(glyph); + this->generateColorV1Image(glyph, imageBuffer); } else if (format == ScalerContextBits::COLR) { - this->generateColorImage(glyph); + this->generateColorImage(glyph, imageBuffer); } else if (format == ScalerContextBits::SVG) { - this->generateSVGImage(glyph); + this->generateSVGImage(glyph, imageBuffer); } else if (format == ScalerContextBits::PNG) { - this->generatePngImage(glyph); + this->generatePngImage(glyph, imageBuffer); } else if (format == ScalerContextBits::PATH) { const SkPath* devPath = glyph.path(); SkASSERT_RELEASE(devPath); - SkMask mask = glyph.mask(); + SkMaskBuilder mask(static_cast(imageBuffer), + glyph.iRect(), glyph.rowBytes(), glyph.maskFormat()); SkASSERT(SkMask::kARGB32_Format != mask.fFormat); const bool doBGR = SkToBool(fRec.fFlags & SkScalerContext::kLCD_BGROrder_Flag); const bool doVert = SkToBool(fRec.fFlags & SkScalerContext::kLCD_Vertical_Flag); @@ -2501,7 +2467,7 @@ sk_sp SkScalerContext_DW::generateDrawable(const SkGlyph& glyph) { fSelf->drawSVGImage(fGlyph, *canvas); } }; - ScalerContextBits::value_type format = glyph.fScalerContextBits; + ScalerContextBits::value_type format = glyph.extraBits(); if (format == ScalerContextBits::COLRv1) { return sk_sp(new COLRv1GlyphDrawable(this, glyph)); } diff --git a/src/ports/SkScalerContext_win_dw.h b/src/ports/SkScalerContext_win_dw.h index 30a1ff525f1b..10a60e783387 100644 --- a/src/ports/SkScalerContext_win_dw.h +++ b/src/ports/SkScalerContext_win_dw.h @@ -32,16 +32,17 @@ class SkScalerContext_DW : public SkScalerContext { ~SkScalerContext_DW() override; protected: - bool generateAdvance(SkGlyph* glyph) override; - void generateMetrics(SkGlyph* glyph, SkArenaAlloc*) override; - void generateImage(const SkGlyph& glyph) override; + GlyphMetrics generateMetrics(const SkGlyph&, SkArenaAlloc*) override; + void generateImage(const SkGlyph&, void* imageBuffer) override; bool generatePath(const SkGlyph&, SkPath*) override; sk_sp generateDrawable(const SkGlyph&) override; void generateFontMetrics(SkFontMetrics*) override; private: + bool setAdvance(const SkGlyph&, SkVector*); + struct ScalerContextBits { - using value_type = decltype(SkGlyph::fScalerContextBits); + using value_type = uint16_t; static const constexpr value_type NONE = 0; static const constexpr value_type DW = 1; static const constexpr value_type DW_1 = 2; @@ -52,20 +53,20 @@ class SkScalerContext_DW : public SkScalerContext { static const constexpr value_type PATH = 7; }; - static void BilevelToBW(const uint8_t* SK_RESTRICT src, const SkGlyph& glyph); + static void BilevelToBW(const uint8_t* SK_RESTRICT src, const SkGlyph& glyph, void* dst); template static void GrayscaleToA8(const uint8_t* SK_RESTRICT src, - const SkGlyph& glyph, + const SkGlyph& glyph, void* dst, const uint8_t* table8); template static void RGBToA8(const uint8_t* SK_RESTRICT src, - const SkGlyph& glyph, + const SkGlyph& glyph, void* dst, const uint8_t* table8); template - static void RGBToLcd16(const uint8_t* SK_RESTRICT src, const SkGlyph& glyph, + static void RGBToLcd16(const uint8_t* SK_RESTRICT src, const SkGlyph& glyph, void* dst, const uint8_t* tableR, const uint8_t* tableG, const uint8_t* tableB); DWriteFontTypeface* getDWriteTypeface() { @@ -73,29 +74,27 @@ class SkScalerContext_DW : public SkScalerContext { } bool generateColorV1PaintBounds(SkMatrix*, SkRect*, IDWritePaintReader&, DWRITE_PAINT_ELEMENT const &); - bool generateColorV1Metrics(SkGlyph*); - bool generateColorV1Image(const SkGlyph&); + bool generateColorV1Metrics(const SkGlyph&, SkIRect*); + bool generateColorV1Image(const SkGlyph&, void* dst); bool drawColorV1Paint(SkCanvas&, IDWritePaintReader&, DWRITE_PAINT_ELEMENT const &); bool drawColorV1Image(const SkGlyph&, SkCanvas&); bool getColorGlyphRun(const SkGlyph&, IDWriteColorGlyphRunEnumerator**); - bool generateColorMetrics(SkGlyph*); - bool generateColorImage(const SkGlyph&); + bool generateColorMetrics(const SkGlyph&, SkIRect*); + bool generateColorImage(const SkGlyph&, void* dst); bool drawColorImage(const SkGlyph&, SkCanvas&); - bool generateSVGMetrics(SkGlyph*); - bool generateSVGImage(const SkGlyph&); + bool generateSVGMetrics(const SkGlyph&, SkIRect*); + bool generateSVGImage(const SkGlyph&, void* dst); bool drawSVGImage(const SkGlyph&, SkCanvas&); - bool generatePngMetrics(SkGlyph*); - bool generatePngImage(const SkGlyph&); + bool generatePngMetrics(const SkGlyph&, SkIRect*); + bool generatePngImage(const SkGlyph&, void* dst); bool drawPngImage(const SkGlyph&, SkCanvas&); - bool generateDWMetrics(SkGlyph*, DWRITE_RENDERING_MODE, DWRITE_TEXTURE_TYPE); + bool generateDWMetrics(const SkGlyph&, DWRITE_RENDERING_MODE, DWRITE_TEXTURE_TYPE, SkIRect*); const void* getDWMaskBits(const SkGlyph&, DWRITE_RENDERING_MODE, DWRITE_TEXTURE_TYPE); - bool generateDWImage(const SkGlyph&); - - static void SetGlyphBounds(SkGlyph* glyph, const SkRect& bounds); + bool generateDWImage(const SkGlyph&, void* dst); SkTDArray fBits; /** The total matrix without the text height scale. */ diff --git a/src/ports/SkTypeface_fontations.cpp b/src/ports/SkTypeface_fontations.cpp index 16edf6138c2e..41efbcd5ed25 100644 --- a/src/ports/SkTypeface_fontations.cpp +++ b/src/ports/SkTypeface_fontations.cpp @@ -79,6 +79,41 @@ sk_sp SkTypeface_Fontations::MakeFromData(sk_sp data, return probeTypeface->hasValidBridgeFontRef() ? probeTypeface : nullptr; } +void SkPathWrapper::move_to(float x, float y) { path_.moveTo(x, y); } + +void SkPathWrapper::line_to(float x, float y) { path_.lineTo(x, y); } + +void SkPathWrapper::quad_to(float cx0, float cy0, float x, float y) { + path_.quadTo(cx0, cy0, x, y); +} +void SkPathWrapper::curve_to(float cx0, float cy0, float cx1, float cy1, float x, float y) { + path_.cubicTo(cx0, cy0, cx1, cy1, x, y); +} + +void SkPathWrapper::close() { path_.close(); } + +SkPath SkPathWrapper::into_inner() && { return std::move(path_); } + + +SkAxisWrapper::SkAxisWrapper(SkFontParameters::Variation::Axis axisArray[], size_t axisCount) + : fAxisArray(axisArray), fAxisCount(axisCount) {} + +bool SkAxisWrapper::populate_axis( + size_t i, uint32_t axisTag, float min, float def, float max, bool hidden) { + if (i >= fAxisCount) { + return false; + } + SkFontParameters::Variation::Axis& axis = fAxisArray[i]; + axis.tag = axisTag; + axis.min = min; + axis.def = def; + axis.max = max; + axis.setHidden(hidden); + return true; +} + +size_t SkAxisWrapper::size() const { return fAxisCount; } + int SkTypeface_Fontations::onGetUPEM() const { return fontations_ffi::units_per_em_or_zero(*fBridgeFontRef); } @@ -159,33 +194,28 @@ class SkFontationsScalerContext : public SkScalerContext { } protected: - bool generateAdvance(SkGlyph* glyph) override { + GlyphMetrics generateMetrics(const SkGlyph& glyph, SkArenaAlloc*) override { + GlyphMetrics mx(fRec.fMaskFormat); + SkVector scale; SkMatrix remainingMatrix; - if (!glyph || - !fRec.computeMatrices( + if (!fRec.computeMatrices( SkScalerContextRec::PreMatrixScale::kVertical, &scale, &remainingMatrix)) { - return false; + return mx; } float x_advance = 0.0f; x_advance = fontations_ffi::advance_width_or_zero( - fBridgeFontRef, scale.y(), fBridgeNormalizedCoords, glyph->getGlyphID()); + fBridgeFontRef, scale.y(), fBridgeNormalizedCoords, glyph.getGlyphID()); // TODO(drott): y-advance? - const SkVector advance = remainingMatrix.mapXY(x_advance, SkFloatToScalar(0.f)); - glyph->fAdvanceX = SkScalarToFloat(advance.fX); - glyph->fAdvanceY = SkScalarToFloat(advance.fY); - return true; + mx.advance = remainingMatrix.mapXY(x_advance, SkFloatToScalar(0.f)); + mx.computeFromPath = true; + return mx; } - void generateMetrics(SkGlyph* glyph, SkArenaAlloc*) override { - glyph->fMaskFormat = fRec.fMaskFormat; - glyph->zeroMetrics(); - this->generateAdvance(glyph); - // Always generates from paths, so SkScalerContext::makeGlyph will figure the bounds. + void generateImage(const SkGlyph&, void*) override { + SK_ABORT("Should have generated from path."); } - void generateImage(const SkGlyph&) override { SK_ABORT("Should have generated from path."); } - bool generatePath(const SkGlyph& glyph, SkPath* path) override { SkVector scale; SkMatrix remainingMatrix; @@ -193,7 +223,7 @@ class SkFontationsScalerContext : public SkScalerContext { SkScalerContextRec::PreMatrixScale::kVertical, &scale, &remainingMatrix)) { return false; } - fontations_ffi::SkPathWrapper pathWrapper; + SkPathWrapper pathWrapper; if (!fontations_ffi::get_path(fBridgeFontRef, glyph.getGlyphID(), @@ -248,11 +278,6 @@ std::unique_ptr SkTypeface_Fontations::onCreateScalerContext( sk_ref_sp(const_cast(this)), effects, desc); } -SkTypeface_Fontations::Register::Register() { - SkTypeface::Register(SkTypeface_Fontations::FactoryId, &SkTypeface_Fontations::MakeFromStream); -} -static SkTypeface_Fontations::Register registerer; - void SkTypeface_Fontations::onGetFontDescriptor(SkFontDescriptor* desc, bool* serialize) const { SkString familyName; onGetFamilyName(&familyName); @@ -294,3 +319,9 @@ int SkTypeface_Fontations::onGetVariationDesignPosition( } return fontations_ffi::variation_position(*fBridgeNormalizedCoords, copyToCoordinates); } + +int SkTypeface_Fontations::onGetVariationDesignParameters( + SkFontParameters::Variation::Axis parameters[], int parameterCount) const { + SkAxisWrapper axisWrapper(parameters, parameterCount); + return fontations_ffi::populate_axes(*fBridgeFontRef, axisWrapper); +} diff --git a/src/ports/SkTypeface_fontations_priv.h b/src/ports/SkTypeface_fontations_priv.h index a0b623e18ad8..bcf42eb1bf26 100644 --- a/src/ports/SkTypeface_fontations_priv.h +++ b/src/ports/SkTypeface_fontations_priv.h @@ -8,6 +8,8 @@ #ifndef SkTypeface_Fontations_priv_DEFINED #define SkTypeface_Fontations_priv_DEFINED +#include "include/core/SkFontParameters.h" +#include "include/core/SkPath.h" #include "include/core/SkStream.h" #include "include/core/SkTypeface.h" #include "src/core/SkAdvancedTypefaceMetrics.h" @@ -18,6 +20,40 @@ class SkStreamAsset; +/** SkPathWrapper implementation of PathWrapper FFI C++ interface which allows Rust to call back + * into C++ without exposing Skia types on the interface, see skpath_bridge.h. */ +class SkPathWrapper : public fontations_ffi::PathWrapper { +public: + /* From fontations_ffi::PathWrapper. */ + void move_to(float x, float y) override; + void line_to(float x, float y) override; + void quad_to(float cx0, float cy0, float x, float y) override; + void curve_to(float cx0, float cy0, float cx1, float cy1, float x, float y) override; + void close() override; + + SkPath into_inner() &&; + +private: + SkPath path_; +}; + +/** SkAxiswrapper implementation of AxisWrapper FFI C++ interface, allowing Rust to call back into + * C++ for populating variable axis availability information, see skpath_bridge.h. */ +class SkAxisWrapper : public fontations_ffi::AxisWrapper { +public: + SkAxisWrapper(SkFontParameters::Variation::Axis axisArray[], size_t axisCount); + SkAxisWrapper() = delete; + /* From fontations_ffi::AxisWrapper. */ + bool populate_axis( + size_t i, uint32_t axisTag, float min, float def, float max, bool hidden) override; + size_t size() const override; + +private: + SkFontParameters::Variation::Axis* fAxisArray; + size_t fAxisCount; +}; + + /** SkTypeface implementation based on Google Fonts Fontations Rust libraries. */ class SkTypeface_Fontations : public SkTypeface { public: @@ -34,7 +70,6 @@ class SkTypeface_Fontations : public SkTypeface { static sk_sp MakeFromData(sk_sp fontData, const SkFontArguments&); static sk_sp MakeFromStream(std::unique_ptr, const SkFontArguments&); - struct Register { Register(); }; protected: std::unique_ptr onOpenStream(int* ttcIndex) const override; sk_sp onMakeClone(const SkFontArguments& args) const override; @@ -57,9 +92,7 @@ class SkTypeface_Fontations : public SkTypeface { int onGetVariationDesignPosition(SkFontArguments::VariationPosition::Coordinate coordinates[], int coordinateCount) const override; int onGetVariationDesignParameters(SkFontParameters::Variation::Axis parameters[], - int parameterCount) const override { - return 0; - } + int parameterCount) const override; int onGetTableTags(SkFontTableTag tags[]) const override; size_t onGetTableData(SkFontTableTag, size_t, size_t, void*) const override; diff --git a/src/ports/fontations/BUILD.bazel b/src/ports/fontations/BUILD.bazel index c294a8bac96d..5b8363ea0df6 100644 --- a/src/ports/fontations/BUILD.bazel +++ b/src/ports/fontations/BUILD.bazel @@ -36,17 +36,9 @@ skia_cc_library( ], ) -skia_filegroup( - name = "fontations_c_side", - srcs = [ - "src/skpath_bridge.cpp", - ], -) - skia_filegroup( name = "srcs", srcs = [ - ":fontations_c_side", ":fontations_ffi/filegroup", ], visibility = ["//src/ports:__pkg__"], diff --git a/src/ports/fontations/src/ffi.rs b/src/ports/fontations/src/ffi.rs index 687050cc0265..d1745cd2f98b 100644 --- a/src/ports/fontations/src/ffi.rs +++ b/src/ports/fontations/src/ffi.rs @@ -14,7 +14,8 @@ use skrifa::{ }; use std::pin::Pin; -use crate::ffi::SkPathWrapper; +use crate::ffi::AxisWrapper; +use crate::ffi::PathWrapper; fn lookup_glyph_or_zero(font_ref: &BridgeFontRef, codepoint: u32) -> u16 { font_ref @@ -29,10 +30,10 @@ fn num_glyphs(font_ref: &BridgeFontRef) -> u16 { } struct PathWrapperPen<'a> { - path_wrapper: Pin<&'a mut ffi::SkPathWrapper>, + path_wrapper: Pin<&'a mut ffi::PathWrapper>, } -// We need to wrap ffi::SkPathWrapper in PathWrapperPen and forward the path +// We need to wrap ffi::PathWrapper in PathWrapperPen and forward the path // recording calls to the path wrapper as we can't define trait implementations // inside the cxx::bridge section. impl<'a> Pen for PathWrapperPen<'a> { @@ -64,7 +65,7 @@ fn get_path( glyph_id: u16, size: f32, coords: &BridgeNormalizedCoords, - path_wrapper: Pin<&mut SkPathWrapper>, + path_wrapper: Pin<&mut PathWrapper>, ) -> bool { font_ref .with_font(|f| { @@ -252,6 +253,31 @@ fn variation_position( coords.filtered_user_coords.len().try_into().unwrap() } +fn populate_axes(font_ref: &BridgeFontRef, mut axis_wrapper: Pin<&mut AxisWrapper>) -> isize { + font_ref + .with_font(|f| { + let axes = f.axes(); + // Populate incoming allocated SkFontParameters::Variation::Axis[] only when a + // buffer is passed. + if axis_wrapper.as_ref().size() > 0 { + for (i, axis) in axes.iter().enumerate() { + if !axis_wrapper.as_mut().populate_axis( + i, + u32::from_be_bytes(axis.tag().into_bytes()), + axis.min_value(), + axis.default_value(), + axis.max_value(), + axis.is_hidden(), + ) { + return None; + } + } + } + isize::try_from(axes.len()).ok() + }) + .unwrap_or(-1) +} + fn make_font_ref_internal<'a>(font_data: &'a [u8], index: u32) -> Result, ReadError> { match FileRef::new(font_data) { Ok(file_ref) => match file_ref { @@ -356,7 +382,7 @@ mod ffi { glyph_id: u16, size: f32, coords: &BridgeNormalizedCoords, - path_wrapper: Pin<&mut SkPathWrapper>, + path_wrapper: Pin<&mut PathWrapper>, ) -> bool; fn advance_width_or_zero( font_ref: &BridgeFontRef, @@ -381,6 +407,8 @@ mod ffi { coordinates: &mut [SkiaDesignCoordinate], ) -> isize; + fn populate_axes(font_ref: &BridgeFontRef, axis_wrapper: Pin<&mut AxisWrapper>) -> isize; + type BridgeLocalizedStrings<'a>; unsafe fn get_localized_strings<'a>( font_ref: &'a BridgeFontRef<'a>, @@ -401,17 +429,18 @@ mod ffi { unsafe extern "C++" { include!("src/ports/fontations/src/skpath_bridge.h"); - type SkPathWrapper; + + type PathWrapper; #[allow(dead_code)] - fn move_to(self: Pin<&mut SkPathWrapper>, x: f32, y: f32); + fn move_to(self: Pin<&mut PathWrapper>, x: f32, y: f32); #[allow(dead_code)] - fn line_to(self: Pin<&mut SkPathWrapper>, x: f32, y: f32); + fn line_to(self: Pin<&mut PathWrapper>, x: f32, y: f32); #[allow(dead_code)] - fn quad_to(self: Pin<&mut SkPathWrapper>, cx0: f32, cy0: f32, x: f32, y: f32); + fn quad_to(self: Pin<&mut PathWrapper>, cx0: f32, cy0: f32, x: f32, y: f32); #[allow(dead_code)] fn curve_to( - self: Pin<&mut SkPathWrapper>, + self: Pin<&mut PathWrapper>, cx0: f32, cy0: f32, cx1: f32, @@ -420,8 +449,20 @@ mod ffi { y: f32, ); #[allow(dead_code)] - fn close(self: Pin<&mut SkPathWrapper>); - #[allow(dead_code)] - fn dump(self: Pin<&mut SkPathWrapper>); + fn close(self: Pin<&mut PathWrapper>); + + type AxisWrapper; + + fn populate_axis( + self: Pin<&mut AxisWrapper>, + i: usize, + axis: u32, + min: f32, + def: f32, + max: f32, + hidden: bool, + ) -> bool; + fn size(self: Pin<&AxisWrapper>) -> usize; + } } diff --git a/src/ports/fontations/src/skpath_bridge.cpp b/src/ports/fontations/src/skpath_bridge.cpp deleted file mode 100644 index 75eff593c090..000000000000 --- a/src/ports/fontations/src/skpath_bridge.cpp +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2023 Google LLC -// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. -#include "src/ports/fontations/src/skpath_bridge.h" - -namespace fontations_ffi { -SkPathWrapper::SkPathWrapper() {} - -void SkPathWrapper::move_to(float x, float y) { path_.moveTo(x, y); } - -void SkPathWrapper::line_to(float x, float y) { path_.lineTo(x, y); } - -void SkPathWrapper::quad_to(float cx0, float cy0, float x, float y) { - path_.quadTo(cx0, cy0, x, y); -} -void SkPathWrapper::curve_to(float cx0, float cy0, float cx1, float cy1, float x, float y) { - path_.cubicTo(cx0, cy0, cx1, cy1, x, y); -} - -void SkPathWrapper::close() { path_.close(); } - -void SkPathWrapper::dump() { path_.dump(); } - -SkPath SkPathWrapper::into_inner() && { return std::move(path_); } - -} // namespace fontations_ffi diff --git a/src/ports/fontations/src/skpath_bridge.h b/src/ports/fontations/src/skpath_bridge.h index 183573ca352b..30e8ed8ad286 100644 --- a/src/ports/fontations/src/skpath_bridge.h +++ b/src/ports/fontations/src/skpath_bridge.h @@ -3,25 +3,35 @@ #ifndef SkPathBridge_DEFINED #define SkPathBridge_DEFINED -#include -#include "include/core/SkPath.h" - -class SkPath; +#include +#include namespace fontations_ffi { -class SkPathWrapper { + +/** C++ pure virtual interface type, exposed to Rust side to be able to write + * from Skrifa path output functions to an SkPath type to capture and convert a + * glyph path. */ +class PathWrapper { public: - SkPathWrapper(); - void move_to(float x, float y); - void line_to(float x, float y); - void quad_to(float cx0, float cy0, float x, float y); - void curve_to(float cx0, float cy0, float cx1, float cy1, float x, float y); - void close(); - void dump(); - SkPath into_inner() &&; + virtual ~PathWrapper() = default; + virtual void move_to(float x, float y) = 0; + virtual void line_to(float x, float y) = 0; + virtual void quad_to(float cx0, float cy0, float x, float y) = 0; + virtual void curve_to(float cx0, float cy0, float cx1, float cy1, float x, float y) = 0; + virtual void close() = 0; +}; -private: - SkPath path_; +/** C++ pure virtual interface type, exposed to Rust side to be able to write + * out variation design parameters to the caller-side allocated + * SkFontParameters::Variation::Axis. A direct cast or mapping between a shared + * C++/Rust struct and a Skia side struct is not possible because the + * hidden-axis flag is private on SkFontParameters::Variation::Axis. */ +class AxisWrapper { +public: + virtual ~AxisWrapper() = default; + virtual bool populate_axis( + size_t i, uint32_t axisTag, float min, float def, float max, bool hidden) = 0; + virtual size_t size() const = 0; }; } // namespace fontations_ffi diff --git a/src/shaders/BUILD.bazel b/src/shaders/BUILD.bazel index 5db1548b2aee..bdd76176c33d 100644 --- a/src/shaders/BUILD.bazel +++ b/src/shaders/BUILD.bazel @@ -18,7 +18,6 @@ SHADER_FILES = [ "SkCoordClampShader.h", "SkEmptyShader.cpp", "SkEmptyShader.h", - "SkGainmapShader.cpp", "SkImageShader.cpp", "SkImageShader.h", "SkLocalMatrixShader.cpp", @@ -58,7 +57,10 @@ bool_flag( skia_filegroup( name = "sksl_srcs", - srcs = ["SkRuntimeShader.cpp"], + srcs = [ + "SkGainmapShader.cpp", + "SkRuntimeShader.cpp", + ], ) skia_filegroup( diff --git a/src/shaders/SkBitmapProcShader.cpp b/src/shaders/SkBitmapProcShader.cpp index dd4df8598d29..911ffa553dc8 100644 --- a/src/shaders/SkBitmapProcShader.cpp +++ b/src/shaders/SkBitmapProcShader.cpp @@ -79,7 +79,7 @@ SkShaderBase::Context* SkBitmapProcLegacyShader::MakeContext( { SkMatrix totalInverse; // Do this first, so we know the matrix can be inverted. - if (!shader.computeTotalInverse(*rec.fMatrix, rec.fLocalMatrix, &totalInverse)) { + if (!rec.fMatrixRec.totalInverse(&totalInverse)) { return nullptr; } diff --git a/src/shaders/SkBlendShader.cpp b/src/shaders/SkBlendShader.cpp index e5358d38ca78..03c5a2f7ef75 100644 --- a/src/shaders/SkBlendShader.cpp +++ b/src/shaders/SkBlendShader.cpp @@ -11,7 +11,6 @@ #include "include/core/SkBlender.h" #include "include/core/SkData.h" #include "include/core/SkFlattenable.h" -#include "include/effects/SkRuntimeEffect.h" #include "src/base/SkArenaAlloc.h" #include "src/core/SkBlendModePriv.h" #include "src/core/SkBlenderBase.h" @@ -20,14 +19,12 @@ #include "src/core/SkRasterPipelineOpContexts.h" #include "src/core/SkRasterPipelineOpList.h" #include "src/core/SkReadBuffer.h" -#include "src/core/SkRuntimeEffectPriv.h" #include "src/core/SkWriteBuffer.h" #include "src/shaders/SkShaderBase.h" -#if defined(SK_GRAPHITE) -#include "src/gpu/Blend.h" -#include "src/gpu/graphite/KeyHelpers.h" -#include "src/gpu/graphite/PaintParamsKey.h" +#if defined(SK_ENABLE_SKSL) +#include "include/effects/SkRuntimeEffect.h" +#include "src/core/SkRuntimeEffectPriv.h" #endif #include @@ -103,48 +100,6 @@ bool SkBlendShader::appendStages(const SkStageRec& rec, const SkShaders::MatrixR return true; } -#if defined(SK_ENABLE_SKVM) -skvm::Color SkBlendShader::program(skvm::Builder* p, - skvm::Coord device, - skvm::Coord local, - skvm::Color paint, - const SkShaders::MatrixRec& mRec, - const SkColorInfo& cinfo, - skvm::Uniforms* uniforms, - SkArenaAlloc* alloc) const { - skvm::Color d, s; - if ((d = as_SB(fDst)->program(p, device, local, paint, mRec, cinfo, uniforms, alloc)) && - (s = as_SB(fSrc)->program(p, device, local, paint, mRec, cinfo, uniforms, alloc))) { - return p->blend(fMode, s, d); - } - return {}; -} -#endif - -#if defined(SK_GRAPHITE) -void SkBlendShader::addToKey(const skgpu::graphite::KeyContext& keyContext, - skgpu::graphite::PaintParamsKeyBuilder* builder, - skgpu::graphite::PipelineDataGatherer* gatherer) const { - using namespace skgpu::graphite; - - BlendShaderBlock::BeginBlock(keyContext, builder, gatherer); - - as_SB(fSrc)->addToKey(keyContext, builder, gatherer); - as_SB(fDst)->addToKey(keyContext, builder, gatherer); - - SkSpan porterDuffConstants = skgpu::GetPorterDuffBlendConstants(fMode); - if (!porterDuffConstants.empty()) { - CoeffBlenderBlock::BeginBlock(keyContext, builder, gatherer, porterDuffConstants); - builder->endBlock(); - } else { - BlendModeBlenderBlock::BeginBlock(keyContext, builder, gatherer, fMode); - builder->endBlock(); - } - - builder->endBlock(); // BlendShaderBlock -} -#endif - sk_sp SkShaders::Blend(SkBlendMode mode, sk_sp dst, sk_sp src) { if (!src || !dst) { return nullptr; diff --git a/src/shaders/SkBlendShader.h b/src/shaders/SkBlendShader.h index 0cea61e87e5b..79d847af940b 100644 --- a/src/shaders/SkBlendShader.h +++ b/src/shaders/SkBlendShader.h @@ -13,16 +13,6 @@ #include "include/core/SkShader.h" #include "src/shaders/SkShaderBase.h" -#if defined(SK_GRAPHITE) -#include "src/gpu/Blend.h" -#include "src/gpu/graphite/KeyHelpers.h" -#include "src/gpu/graphite/PaintParamsKey.h" -#endif - -#if defined(SK_ENABLE_SKVM) -#include "src/core/SkVM.h" -#endif - #include class SkReadBuffer; @@ -37,12 +27,6 @@ class SkBlendShader final : public SkShaderBase { ShaderType type() const override { return ShaderType::kBlend; } -#if defined(SK_GRAPHITE) - void addToKey(const skgpu::graphite::KeyContext&, - skgpu::graphite::PaintParamsKeyBuilder*, - skgpu::graphite::PipelineDataGatherer*) const override; -#endif - sk_sp dst() const { return fDst; } sk_sp src() const { return fSrc; } SkBlendMode mode() const { return fMode; } @@ -52,17 +36,6 @@ class SkBlendShader final : public SkShaderBase { void flatten(SkWriteBuffer&) const override; bool appendStages(const SkStageRec&, const SkShaders::MatrixRec&) const override; -#if defined(SK_ENABLE_SKVM) - skvm::Color program(skvm::Builder*, - skvm::Coord device, - skvm::Coord local, - skvm::Color paint, - const SkShaders::MatrixRec& mRec, - const SkColorInfo& dst, - skvm::Uniforms*, - SkArenaAlloc*) const override; -#endif // defined(SK_ENABLE_SKVM) - private: friend void ::SkRegisterBlendShaderFlattenable(); SK_FLATTENABLE_HOOKS(SkBlendShader) diff --git a/src/shaders/SkColorFilterShader.cpp b/src/shaders/SkColorFilterShader.cpp index 4745ceab800f..27cf358b2f42 100644 --- a/src/shaders/SkColorFilterShader.cpp +++ b/src/shaders/SkColorFilterShader.cpp @@ -18,11 +18,6 @@ #include "src/core/SkWriteBuffer.h" #include "src/effects/colorfilters/SkColorFilterBase.h" -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/KeyHelpers.h" -#include "src/gpu/graphite/PaintParamsKey.h" -#endif - #include SkColorFilterShader::SkColorFilterShader(sk_sp shader, @@ -63,55 +58,8 @@ bool SkColorFilterShader::appendStages(const SkStageRec& rec, if (fAlpha != 1.0f) { rec.fPipeline->append(SkRasterPipelineOp::scale_1_float, rec.fAlloc->make(fAlpha)); } - if (!fFilter->appendStages(rec, fShader->isOpaque())) { + if (!fFilter->appendStages(rec, fAlpha == 1.0f && fShader->isOpaque())) { return false; } return true; } - -#if defined(SK_ENABLE_SKVM) -skvm::Color SkColorFilterShader::program(skvm::Builder* p, - skvm::Coord device, - skvm::Coord local, - skvm::Color paint, - const SkShaders::MatrixRec& mRec, - const SkColorInfo& dst, - skvm::Uniforms* uniforms, - SkArenaAlloc* alloc) const { - // Run the shader. - skvm::Color c = as_SB(fShader)->program(p, device, local, paint, mRec, dst, uniforms, alloc); - if (!c) { - return {}; - } - // Scale that by alpha. - if (fAlpha != 1.0f) { - skvm::F32 A = p->uniformF(uniforms->pushF(fAlpha)); - c.r *= A; - c.g *= A; - c.b *= A; - c.a *= A; - } - - // Finally run that through the color filter. - return fFilter->program(p,c, dst, uniforms,alloc); -} -#endif - -/////////////////////////////////////////////////////////////////////////////////////////////////// - -#if defined(SK_GRAPHITE) - -void SkColorFilterShader::addToKey(const skgpu::graphite::KeyContext& keyContext, - skgpu::graphite::PaintParamsKeyBuilder* builder, - skgpu::graphite::PipelineDataGatherer* gatherer) const { - using namespace skgpu::graphite; - - ColorFilterShaderBlock::BeginBlock(keyContext, builder, gatherer); - - as_SB(fShader)->addToKey(keyContext, builder, gatherer); - as_CFB(fFilter)->addToKey(keyContext, builder, gatherer); - - builder->endBlock(); -} - -#endif // SK_ENABLE_SKSL diff --git a/src/shaders/SkColorFilterShader.h b/src/shaders/SkColorFilterShader.h index 95e3af233c82..3c23ef97cc74 100644 --- a/src/shaders/SkColorFilterShader.h +++ b/src/shaders/SkColorFilterShader.h @@ -25,12 +25,6 @@ class SkColorFilterShader : public SkShaderBase { ShaderType type() const override { return ShaderType::kColorFilter; } -#if defined(SK_GRAPHITE) - void addToKey(const skgpu::graphite::KeyContext&, - skgpu::graphite::PaintParamsKeyBuilder*, - skgpu::graphite::PipelineDataGatherer*) const override; -#endif - sk_sp shader() const { return fShader; } sk_sp filter() const { return fFilter; } float alpha() const { return fAlpha; } @@ -40,17 +34,6 @@ class SkColorFilterShader : public SkShaderBase { void flatten(SkWriteBuffer&) const override; bool appendStages(const SkStageRec&, const SkShaders::MatrixRec&) const override; -#if defined(SK_ENABLE_SKVM) - skvm::Color program(skvm::Builder*, - skvm::Coord device, - skvm::Coord local, - skvm::Color paint, - const SkShaders::MatrixRec&, - const SkColorInfo& dst, - skvm::Uniforms* uniforms, - SkArenaAlloc*) const override; -#endif - SK_FLATTENABLE_HOOKS(SkColorFilterShader) sk_sp fShader; diff --git a/src/shaders/SkColorShader.cpp b/src/shaders/SkColorShader.cpp index bd611e6b3fe8..13c441f67e26 100644 --- a/src/shaders/SkColorShader.cpp +++ b/src/shaders/SkColorShader.cpp @@ -22,11 +22,6 @@ #include "src/core/SkWriteBuffer.h" #include "src/shaders/SkShaderBase.h" -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/KeyHelpers.h" -#include "src/gpu/graphite/PaintParamsKey.h" -#endif - #include SkColorShader::SkColorShader(SkColor c) : fColor(c) {} @@ -86,89 +81,6 @@ bool SkColor4Shader::appendStages(const SkStageRec& rec, const SkShaders::Matrix return true; } -#if defined(SK_ENABLE_SKVM) -skvm::Color SkColorShader::program(skvm::Builder* p, - skvm::Coord /*device*/, - skvm::Coord /*local*/, - skvm::Color /*paint*/, - const SkShaders::MatrixRec&, - const SkColorInfo& dst, - skvm::Uniforms* uniforms, - SkArenaAlloc*) const { - SkColor4f color = SkColor4f::FromColor(fColor); - SkColorSpaceXformSteps(sk_srgb_singleton(), kUnpremul_SkAlphaType, - dst.colorSpace(), kPremul_SkAlphaType).apply(color.vec()); - return p->uniformColor(color, uniforms); -} - -skvm::Color SkColor4Shader::program(skvm::Builder* p, - skvm::Coord /*device*/, - skvm::Coord /*local*/, - skvm::Color /*paint*/, - const SkShaders::MatrixRec&, - const SkColorInfo& dst, - skvm::Uniforms* uniforms, - SkArenaAlloc*) const { - SkColor4f color = fColor; - SkColorSpaceXformSteps(fColorSpace.get(), kUnpremul_SkAlphaType, - dst.colorSpace(), kPremul_SkAlphaType).apply(color.vec()); - return p->uniformColor(color, uniforms); -} -#endif // defined(SK_ENABLE_SKVM) - -#if defined(SK_GRAPHITE) -void SkColorShader::addToKey(const skgpu::graphite::KeyContext& keyContext, - skgpu::graphite::PaintParamsKeyBuilder* builder, - skgpu::graphite::PipelineDataGatherer* gatherer) const { - using namespace skgpu::graphite; - - SolidColorShaderBlock::BeginBlock(keyContext, builder, gatherer, - SkColor4f::FromColor(fColor).premul()); - builder->endBlock(); -} - -void SkColor4Shader::addToKey(const skgpu::graphite::KeyContext& keyContext, - skgpu::graphite::PaintParamsKeyBuilder* builder, - skgpu::graphite::PipelineDataGatherer* gatherer) const { - using namespace skgpu::graphite; - - SolidColorShaderBlock::BeginBlock(keyContext, builder, gatherer, fColor.premul()); - builder->endBlock(); -} -#endif - -SkUpdatableColorShader::SkUpdatableColorShader(SkColorSpace* cs) - : fSteps{sk_srgb_singleton(), kUnpremul_SkAlphaType, cs, kUnpremul_SkAlphaType} {} - -#if defined(SK_ENABLE_SKVM) -skvm::Color SkUpdatableColorShader::program(skvm::Builder* builder, - skvm::Coord device, - skvm::Coord local, - skvm::Color paint, - const SkShaders::MatrixRec&, - const SkColorInfo& dst, - skvm::Uniforms* uniforms, - SkArenaAlloc* alloc) const { - skvm::Uniform color = uniforms->pushPtr(fValues); - skvm::F32 r = builder->arrayF(color, 0); - skvm::F32 g = builder->arrayF(color, 1); - skvm::F32 b = builder->arrayF(color, 2); - skvm::F32 a = builder->arrayF(color, 3); - - return {r, g, b, a}; -} -#endif - -void SkUpdatableColorShader::updateColor(SkColor c) const { - SkColor4f c4 = SkColor4f::FromColor(c); - fSteps.apply(c4.vec()); - auto cp4 = c4.premul(); - fValues[0] = cp4.fR; - fValues[1] = cp4.fG; - fValues[2] = cp4.fB; - fValues[3] = cp4.fA; -} - ///////////////////////////////////////////////////////////////////////////////////////////////// void SkRegisterColor4ShaderFlattenable() { diff --git a/src/shaders/SkColorShader.h b/src/shaders/SkColorShader.h index c5fedc56a95d..63f319c937d6 100644 --- a/src/shaders/SkColorShader.h +++ b/src/shaders/SkColorShader.h @@ -12,14 +12,8 @@ #include "include/core/SkColorSpace.h" #include "include/core/SkFlattenable.h" #include "include/core/SkRefCnt.h" -#include "src/core/SkColorSpaceXformSteps.h" #include "src/shaders/SkShaderBase.h" -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/KeyHelpers.h" -#include "src/gpu/graphite/PaintParamsKey.h" -#endif - class SkReadBuffer; class SkWriteBuffer; struct SkStageRec; @@ -42,12 +36,6 @@ class SkColorShader : public SkShaderBase { ShaderType type() const override { return ShaderType::kColor; } -#if defined(SK_GRAPHITE) - void addToKey(const skgpu::graphite::KeyContext&, - skgpu::graphite::PaintParamsKeyBuilder*, - skgpu::graphite::PipelineDataGatherer*) const override; -#endif - SkColor color() const { return fColor; } private: @@ -63,17 +51,6 @@ class SkColorShader : public SkShaderBase { bool appendStages(const SkStageRec&, const SkShaders::MatrixRec&) const override; -#if defined(SK_ENABLE_SKVM) - skvm::Color program(skvm::Builder*, - skvm::Coord device, - skvm::Coord local, - skvm::Color paint, - const SkShaders::MatrixRec&, - const SkColorInfo& dst, - skvm::Uniforms* uniforms, - SkArenaAlloc*) const override; -#endif - SkColor fColor; }; @@ -86,12 +63,6 @@ class SkColor4Shader : public SkShaderBase { ShaderType type() const override { return ShaderType::kColor4; } -#if defined(SK_GRAPHITE) - void addToKey(const skgpu::graphite::KeyContext&, - skgpu::graphite::PaintParamsKeyBuilder*, - skgpu::graphite::PipelineDataGatherer*) const override; -#endif - sk_sp colorSpace() const { return fColorSpace; } SkColor4f color() const { return fColor; } @@ -102,46 +73,8 @@ class SkColor4Shader : public SkShaderBase { void flatten(SkWriteBuffer&) const override; bool appendStages(const SkStageRec&, const SkShaders::MatrixRec&) const override; -#if defined(SK_ENABLE_SKVM) - skvm::Color program(skvm::Builder*, - skvm::Coord device, - skvm::Coord local, - skvm::Color paint, - const SkShaders::MatrixRec&, - const SkColorInfo& dst, - skvm::Uniforms* uniforms, - SkArenaAlloc*) const override; -#endif - sk_sp fColorSpace; const SkColor4f fColor; }; -class SkUpdatableColorShader : public SkShaderBase { -public: - explicit SkUpdatableColorShader(SkColorSpace* cs); -#if defined(SK_ENABLE_SKVM) - skvm::Color program(skvm::Builder* builder, - skvm::Coord device, - skvm::Coord local, - skvm::Color paint, - const SkShaders::MatrixRec&, - const SkColorInfo& dst, - skvm::Uniforms* uniforms, - SkArenaAlloc* alloc) const override; -#endif - - ShaderType type() const override { return ShaderType::kUpdatableColor; } - - void updateColor(SkColor c) const; - -private: - // For serialization. This will never be called. - Factory getFactory() const override { return nullptr; } - const char* getTypeName() const override { return nullptr; } - - SkColorSpaceXformSteps fSteps; - mutable float fValues[4]; -}; - #endif diff --git a/src/shaders/SkCoordClampShader.cpp b/src/shaders/SkCoordClampShader.cpp index 9c5336d4b1bc..c40877ce61b4 100644 --- a/src/shaders/SkCoordClampShader.cpp +++ b/src/shaders/SkCoordClampShader.cpp @@ -18,16 +18,6 @@ #include "src/core/SkWriteBuffer.h" #include "src/shaders/SkShaderBase.h" -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/KeyHelpers.h" -#include "src/gpu/graphite/PaintParamsKey.h" -#endif // SK_GRAPHITE - -#if defined(SK_ENABLE_SKVM) -#include "src/core/SkRuntimeEffectPriv.h" -#include "src/core/SkVM.h" -#endif - #include sk_sp SkCoordClampShader::CreateProc(SkReadBuffer& buffer) { @@ -59,47 +49,6 @@ bool SkCoordClampShader::appendStages(const SkStageRec& rec, return as_SB(fShader)->appendStages(rec, *childMRec); } -#if defined(SK_ENABLE_SKVM) -skvm::Color SkCoordClampShader::program(skvm::Builder* p, - skvm::Coord device, - skvm::Coord local, - skvm::Color paint, - const SkShaders::MatrixRec& mRec, - const SkColorInfo& cinfo, - skvm::Uniforms* uniforms, - SkArenaAlloc* alloc) const { - std::optional childMRec = mRec.apply(p, &local, uniforms); - if (!childMRec.has_value()) { - return {}; - } - // See comment in appendStages about not marking childMRec with an invalid total matrix. - - auto l = uniforms->pushF(fSubset.left()); - auto t = uniforms->pushF(fSubset.top()); - auto r = uniforms->pushF(fSubset.right()); - auto b = uniforms->pushF(fSubset.bottom()); - - local.x = p->clamp(local.x, p->uniformF(l), p->uniformF(r)); - local.y = p->clamp(local.y, p->uniformF(t), p->uniformF(b)); - - return as_SB(fShader)->program(p, device, local, paint, *childMRec, cinfo, uniforms, alloc); -} -#endif - -#if defined(SK_GRAPHITE) -void SkCoordClampShader::addToKey(const skgpu::graphite::KeyContext& keyContext, - skgpu::graphite::PaintParamsKeyBuilder* builder, - skgpu::graphite::PipelineDataGatherer* gatherer) const { - using namespace skgpu::graphite; - - CoordClampShaderBlock::CoordClampData data(fSubset); - - CoordClampShaderBlock::BeginBlock(keyContext, builder, gatherer, &data); - as_SB(fShader)->addToKey(keyContext, builder, gatherer); - builder->endBlock(); -} -#endif // SK_GRAPHITE - void SkRegisterCoordClampShaderFlattenable() { SK_REGISTER_FLATTENABLE(SkCoordClampShader); diff --git a/src/shaders/SkCoordClampShader.h b/src/shaders/SkCoordClampShader.h index b44e7af12b1e..e33e508d4e74 100644 --- a/src/shaders/SkCoordClampShader.h +++ b/src/shaders/SkCoordClampShader.h @@ -14,11 +14,6 @@ #include "include/core/SkShader.h" #include "src/shaders/SkShaderBase.h" -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/KeyHelpers.h" -#include "src/gpu/graphite/PaintParamsKey.h" -#endif // SK_GRAPHITE - #include class SkReadBuffer; @@ -32,12 +27,6 @@ class SkCoordClampShader final : public SkShaderBase { ShaderType type() const override { return ShaderType::kCoordClamp; } -#if defined(SK_GRAPHITE) - void addToKey(const skgpu::graphite::KeyContext&, - skgpu::graphite::PaintParamsKeyBuilder*, - skgpu::graphite::PipelineDataGatherer*) const override; -#endif - sk_sp shader() const { return fShader; } SkRect subset() const { return fSubset; } @@ -45,16 +34,6 @@ class SkCoordClampShader final : public SkShaderBase { SkCoordClampShader(SkReadBuffer&); void flatten(SkWriteBuffer&) const override; bool appendStages(const SkStageRec&, const SkShaders::MatrixRec&) const override; -#if defined(SK_ENABLE_SKVM) - skvm::Color program(skvm::Builder*, - skvm::Coord device, - skvm::Coord local, - skvm::Color paint, - const SkShaders::MatrixRec&, - const SkColorInfo& dst, - skvm::Uniforms*, - SkArenaAlloc*) const override; -#endif private: friend void ::SkRegisterCoordClampShaderFlattenable(); diff --git a/src/shaders/SkEmptyShader.cpp b/src/shaders/SkEmptyShader.cpp index 7853d3ca89ba..1c365aceaaa2 100644 --- a/src/shaders/SkEmptyShader.cpp +++ b/src/shaders/SkEmptyShader.cpp @@ -13,19 +13,6 @@ class SkReadBuffer; -#if defined(SK_ENABLE_SKVM) -skvm::Color SkEmptyShader::program(skvm::Builder*, - skvm::Coord, - skvm::Coord, - skvm::Color, - const SkShaders::MatrixRec&, - const SkColorInfo&, - skvm::Uniforms*, - SkArenaAlloc*) const { - return {}; // signal failure -} -#endif - sk_sp SkEmptyShader::CreateProc(SkReadBuffer&) { return SkShaders::Empty(); } diff --git a/src/shaders/SkEmptyShader.h b/src/shaders/SkEmptyShader.h index ae36c6223ddb..07491b4551ee 100644 --- a/src/shaders/SkEmptyShader.h +++ b/src/shaders/SkEmptyShader.h @@ -9,10 +9,6 @@ #include "include/core/SkFlattenable.h" -#if defined(SK_ENABLE_SKVM) -#include "src/core/SkVM.h" -#endif - class SkReadBuffer; class SkWriteBuffer; struct SkStageRec; @@ -38,17 +34,6 @@ class SkEmptyShader : public SkShaderBase { ShaderType type() const override { return ShaderType::kEmpty; } -#if defined(SK_ENABLE_SKVM) - skvm::Color program(skvm::Builder*, - skvm::Coord, - skvm::Coord, - skvm::Color, - const SkShaders::MatrixRec&, - const SkColorInfo&, - skvm::Uniforms*, - SkArenaAlloc*) const override; -#endif - private: friend void ::SkRegisterEmptyShaderFlattenable(); SK_FLATTENABLE_HOOKS(SkEmptyShader) diff --git a/src/shaders/SkGainmapShader.cpp b/src/shaders/SkGainmapShader.cpp index e2cf42656452..e4259c0c4996 100644 --- a/src/shaders/SkGainmapShader.cpp +++ b/src/shaders/SkGainmapShader.cpp @@ -23,15 +23,14 @@ #include -#ifdef SK_ENABLE_SKSL static constexpr char gGainmapSKSL[] = "uniform shader base;" "uniform shader gainmap;" "uniform half4 logRatioMin;" "uniform half4 logRatioMax;" "uniform half4 gainmapGamma;" - "uniform half4 epsilonSdr;" - "uniform half4 epsilonHdr;" + "uniform half4 epsilonBase;" + "uniform half4 epsilonOther;" "uniform half W;" "uniform int gainmapIsAlpha;" "uniform int gainmapIsRed;" @@ -54,7 +53,7 @@ static constexpr char gGainmapSKSL[] = "} else {" "L = mix(logRatioMin.r, logRatioMax.r, pow(G.r, gainmapGamma.r));" "}" - "half3 H = (S.rgb + epsilonSdr.rgb) * exp(L * W) - epsilonHdr.rgb;" + "half3 H = (S.rgb + epsilonBase.rgb) * exp(L * W) - epsilonOther.rgb;" "return half4(H.r, H.g, H.b, S.a);" "} else {" "half3 L;" @@ -63,7 +62,7 @@ static constexpr char gGainmapSKSL[] = "} else {" "L = mix(logRatioMin.rgb, logRatioMax.rgb, pow(G.rgb, gainmapGamma.rgb));" "}" - "half3 H = (S.rgb + epsilonSdr.rgb) * exp(L * W) - epsilonHdr.rgb;" + "half3 H = (S.rgb + epsilonBase.rgb) * exp(L * W) - epsilonOther.rgb;" "return half4(H.r, H.g, H.b, S.a);" "}" "}"; @@ -78,7 +77,6 @@ static sk_sp gainmap_apply_effect() { static bool all_channels_equal(const SkColor4f& c) { return c.fR == c.fG && c.fR == c.fB; } -#endif // SK_ENABLE_SKSL sk_sp SkGainmapShader::Make(const sk_sp& baseImage, const SkRect& baseRect, @@ -90,7 +88,6 @@ sk_sp SkGainmapShader::Make(const sk_sp& baseImage, const SkRect& dstRect, float dstHdrRatio, sk_sp dstColorSpace) { -#ifdef SK_ENABLE_SKSL sk_sp baseColorSpace = baseImage->colorSpace() ? baseImage->refColorSpace() : SkColorSpace::MakeSRGB(); @@ -116,6 +113,11 @@ sk_sp SkGainmapShader::Make(const sk_sp& baseImage, } } + const bool baseImageIsHdr = (gainmapInfo.fBaseImageType == SkGainmapInfo::BaseImageType::kHDR); + if (baseImageIsHdr) { + W -= 1.f; + } + // Return the base image directly if the gainmap will not be applied at all. if (W == 0.f) { return baseImage->makeShader(baseSamplingOptions, &baseRectToDstRect); @@ -164,13 +166,17 @@ sk_sp SkGainmapShader::Make(const sk_sp& baseImage, (colorTypeFlags == kGray_SkColorChannelFlag || colorTypeFlags == kAlpha_SkColorChannelFlag || colorTypeFlags == kRed_SkColorChannelFlag); + const SkColor4f& epsilonBase = + baseImageIsHdr ? gainmapInfo.fEpsilonHdr : gainmapInfo.fEpsilonSdr; + const SkColor4f& epsilonOther = + baseImageIsHdr ? gainmapInfo.fEpsilonSdr : gainmapInfo.fEpsilonHdr; builder.child("base") = baseImageShader; builder.child("gainmap") = gainmapImageShader; builder.uniform("logRatioMin") = logRatioMin; builder.uniform("logRatioMax") = logRatioMax; builder.uniform("gainmapGamma") = gainmapInfo.fGainmapGamma; - builder.uniform("epsilonSdr") = gainmapInfo.fEpsilonSdr; - builder.uniform("epsilonHdr") = gainmapInfo.fEpsilonHdr; + builder.uniform("epsilonBase") = epsilonBase; + builder.uniform("epsilonOther") = epsilonOther; builder.uniform("noGamma") = noGamma; builder.uniform("singleChannel") = singleChannel; builder.uniform("gainmapIsAlpha") = gainmapIsAlpha; @@ -182,8 +188,4 @@ sk_sp SkGainmapShader::Make(const sk_sp& baseImage, // Return a shader that will apply the gainmap and then convert to the destination color space. return gainmapMathShader->makeWithColorFilter(colorXformGainmapToDst); -#else - // This shader is currently only implemented using SkSL. - return nullptr; -#endif } diff --git a/src/shaders/SkImageShader.cpp b/src/shaders/SkImageShader.cpp index d37dc80edb0a..489f01407512 100644 --- a/src/shaders/SkImageShader.cpp +++ b/src/shaders/SkImageShader.cpp @@ -35,43 +35,6 @@ #include "src/image/SkImage_Base.h" #include "src/shaders/SkLocalMatrixShader.h" -#if defined(SK_GRAPHITE) -#include "src/core/SkYUVMath.h" -#include "src/gpu/Blend.h" -#include "src/gpu/graphite/ImageUtils.h" -#include "src/gpu/graphite/Image_Graphite.h" -#include "src/gpu/graphite/Image_YUVA_Graphite.h" -#include "src/gpu/graphite/KeyContext.h" -#include "src/gpu/graphite/KeyHelpers.h" -#include "src/gpu/graphite/Log.h" -#include "src/gpu/graphite/PaintParamsKey.h" -#include "src/gpu/graphite/ReadSwizzle.h" -#include "src/gpu/graphite/TextureProxyView.h" -#include "src/gpu/graphite/YUVATextureProxies.h" - -static skgpu::graphite::ReadSwizzle swizzle_class_to_read_enum(const skgpu::Swizzle& swizzle) { - if (swizzle == skgpu::Swizzle::RGBA()) { - return skgpu::graphite::ReadSwizzle::kRGBA; - } else if (swizzle == skgpu::Swizzle::RGB1()) { - return skgpu::graphite::ReadSwizzle::kRGB1; - } else if (swizzle == skgpu::Swizzle("rrrr")) { - return skgpu::graphite::ReadSwizzle::kRRRR; - } else if (swizzle == skgpu::Swizzle("rrr1")) { - return skgpu::graphite::ReadSwizzle::kRRR1; - } else if (swizzle == skgpu::Swizzle::BGRA()) { - return skgpu::graphite::ReadSwizzle::kBGRA; - } else { - SKGPU_LOG_W("%s is an unsupported read swizzle. Defaulting to RGBA.\n", - swizzle.asString().data()); - return skgpu::graphite::ReadSwizzle::kRGBA; - } -} -#endif - -#if defined(SK_ENABLE_SKVM) -#include "src/core/SkVM.h" -#endif - #ifdef SK_ENABLE_LEGACY_SHADERCONTEXT #include "src/shaders/SkBitmapProcShader.h" #endif @@ -304,8 +267,7 @@ SkShaderBase::Context* SkImageShader::onMakeContext(const ContextRec& rec, } SkMatrix inv; - if (!this->computeTotalInverse(*rec.fMatrix, rec.fLocalMatrix, &inv) || - !legacy_shader_can_handle(inv)) { + if (!rec.fMatrixRec.totalInverse(&inv) || !legacy_shader_can_handle(inv)) { return nullptr; } @@ -391,150 +353,6 @@ sk_sp SkImageShader::MakeSubset(sk_sp image, clampAsIfUnpremul); } -#if defined(SK_GRAPHITE) - -void SkImageShader::addToKey(const skgpu::graphite::KeyContext& keyContext, - skgpu::graphite::PaintParamsKeyBuilder* builder, - skgpu::graphite::PipelineDataGatherer* gatherer) const { - using namespace skgpu::graphite; - - auto [ imageToDraw, newSampling ] = skgpu::graphite::GetGraphiteBacked(keyContext.recorder(), - fImage.get(), - fSampling); - if (!imageToDraw) { - constexpr SkPMColor4f kErrorColor = { 1, 0, 0, 1 }; - SolidColorShaderBlock::BeginBlock(keyContext, builder, gatherer, - kErrorColor); - builder->endBlock(); - return; - } - if (as_IB(imageToDraw)->isYUVA()) { - return this->addYUVImageToKey(keyContext, - builder, - gatherer, - std::move(imageToDraw), - newSampling); - } - - skgpu::Mipmapped mipmapped = (newSampling.mipmap != SkMipmapMode::kNone) - ? skgpu::Mipmapped::kYes : skgpu::Mipmapped::kNo; - - auto [view, _] = skgpu::graphite::AsView(keyContext.recorder(), imageToDraw.get(), mipmapped); - - ImageShaderBlock::ImageData imgData(fSampling, fTileModeX, fTileModeY, fSubset, - ReadSwizzle::kRGBA); - imgData.fSampling = newSampling; - imgData.fTextureProxy = view.refProxy(); - skgpu::Swizzle readSwizzle = view.swizzle(); - // If the color type is alpha-only, propagate the alpha value to the other channels. - if (imageToDraw->isAlphaOnly()) { - readSwizzle = skgpu::Swizzle::Concat(readSwizzle, skgpu::Swizzle("aaaa")); - } - imgData.fReadSwizzle = swizzle_class_to_read_enum(readSwizzle); - - if (!fRaw) { - imgData.fSteps = SkColorSpaceXformSteps(imageToDraw->colorSpace(), - imageToDraw->alphaType(), - keyContext.dstColorInfo().colorSpace(), - keyContext.dstColorInfo().alphaType()); - - if (imageToDraw->isAlphaOnly()) { - SkSpan constants = skgpu::GetPorterDuffBlendConstants(SkBlendMode::kDstIn); - BlendShaderBlock::BeginBlock(keyContext, builder, gatherer); - - // src - ImageShaderBlock::BeginBlock(keyContext, builder, gatherer, &imgData); - builder->endBlock(); - - // dst - SolidColorShaderBlock::BeginBlock(keyContext, builder, gatherer, - keyContext.paintColor()); - builder->endBlock(); - - CoeffBlenderBlock::BeginBlock(keyContext, builder, gatherer, constants); - builder->endBlock(); - - builder->endBlock(); - return; - } - } - - ImageShaderBlock::BeginBlock(keyContext, builder, gatherer, &imgData); - builder->endBlock(); -} - -void SkImageShader::addYUVImageToKey(const skgpu::graphite::KeyContext& keyContext, - skgpu::graphite::PaintParamsKeyBuilder* builder, - skgpu::graphite::PipelineDataGatherer* gatherer, - sk_sp imageToDraw, - SkSamplingOptions sampling) const { - using namespace skgpu::graphite; - - SkASSERT(!imageToDraw->isAlphaOnly()); - const YUVATextureProxies& yuvaProxies = - static_cast(imageToDraw.get())->yuvaProxies(); - const SkYUVAInfo& yuvaInfo = yuvaProxies.yuvaInfo(); - - YUVImageShaderBlock::ImageData imgData(sampling, fTileModeX, fTileModeY, fSubset); - imgData.fImgSize = { (float)imageToDraw->width(), (float)imageToDraw->height() }; - for (int i = 0; i < SkYUVAInfo::kYUVAChannelCount; ++i) { - memset(&imgData.fChannelSelect[i], 0, sizeof(SkColor4f)); - } - int textureCount = 0; - SkYUVAInfo::YUVALocations yuvaLocations = yuvaProxies.yuvaLocations(); - for (int locIndex = 0; locIndex < SkYUVAInfo::kYUVAChannelCount; ++locIndex) { - auto [yuvPlane, yuvChannel] = yuvaLocations[locIndex]; - if (yuvPlane >= 0) { - SkASSERT(locIndex == textureCount); - TextureProxyView view = yuvaProxies.makeView(yuvPlane); - imgData.fTextureProxies[locIndex] = view.refProxy(); - imgData.fChannelSelect[locIndex][static_cast(yuvChannel)] = 1.0f; - ++textureCount; - } - } - SkASSERT(textureCount == 3 || textureCount == 4); - // If the format has no alpha, we still need to set the proxy to something - if (textureCount == 3) { - imgData.fTextureProxies[3] = imgData.fTextureProxies[0]; - } - float yuvM[20]; - SkColorMatrix_YUV2RGB(yuvaInfo.yuvColorSpace(), yuvM); - // We drop the fourth column entirely since the transformation - // should not depend on alpha. The fifth column is sent as a separate - // vector. The fourth row is also dropped entirely because alpha should - // never be modified. - SkASSERT(yuvM[3] == 0 && yuvM[8] == 0 && yuvM[13] == 0 && yuvM[18] == 1); - SkASSERT(yuvM[15] == 0 && yuvM[16] == 0 && yuvM[17] == 0 && yuvM[19] == 0); - imgData.fYUVtoRGBMatrix.setAll( - yuvM[ 0], yuvM[ 1], yuvM[ 2], - yuvM[ 5], yuvM[ 6], yuvM[ 7], - yuvM[10], yuvM[11], yuvM[12] - ); - imgData.fYUVtoRGBTranslate = {yuvM[4], yuvM[9], yuvM[14]}; - - if (!fRaw) { - imgData.fSteps = SkColorSpaceXformSteps(imageToDraw->colorSpace(), - imageToDraw->alphaType(), - keyContext.dstColorInfo().colorSpace(), - keyContext.dstColorInfo().alphaType()); - } - - // The YUV formats can encode their own origin including reflection and rotation, - // so we need to wrap our block in an additional local matrix transform. - SkMatrix originMatrix = yuvaInfo.originMatrix(); - LocalMatrixShaderBlock::LMShaderData lmShaderData(originMatrix); - - KeyContextWithLocalMatrix newContext(keyContext, originMatrix); - - LocalMatrixShaderBlock::BeginBlock(newContext, builder, gatherer, &lmShaderData); - - YUVImageShaderBlock::BeginBlock(newContext, builder, gatherer, &imgData); - builder->endBlock(); - - builder->endBlock(); -} -#endif - /////////////////////////////////////////////////////////////////////////////////////////////////// sk_sp SkMakeBitmapShaderForPaint(const SkPaint& paint, const SkBitmap& src, @@ -920,294 +738,3 @@ bool SkImageShader::appendStages(const SkStageRec& rec, const SkShaders::MatrixR return append_misc(); } - -#if defined(SK_ENABLE_SKVM) -skvm::Color SkImageShader::program(skvm::Builder* p, - skvm::Coord device, - skvm::Coord origLocal, - skvm::Color paint, - const SkShaders::MatrixRec& mRec, - const SkColorInfo& dst, - skvm::Uniforms* uniforms, - SkArenaAlloc* alloc) const { - SkASSERT(!needs_subset(fImage.get(), fSubset)); // TODO(skbug.com/12784) - - auto sampling = fSampling; - if (sampling.isAniso()) { - sampling = SkSamplingPriv::AnisoFallback(fImage->hasMipmaps()); - } - - SkMatrix baseInv; - // If the total matrix isn't valid then we will always access the base MIP level. - if (mRec.totalMatrixIsValid()) { - if (!mRec.totalInverse(&baseInv)) { - return {}; - } - baseInv.normalizePerspective(); - } - - SkASSERT(!sampling.useCubic || sampling.mipmap == SkMipmapMode::kNone); - auto* access = SkMipmapAccessor::Make(alloc, fImage.get(), baseInv, sampling.mipmap); - if (!access) { - return {}; - } - - SkPixmap upper; - SkMatrix upperInv; - std::tie(upper, upperInv) = access->level(); - - if (!sampling.useCubic) { - // TODO: can tweak_sampling sometimes for cubic too when B=0 - if (mRec.totalMatrixIsValid()) { - sampling = tweak_sampling(sampling, SkMatrix::Concat(upperInv, baseInv)); - } - } - - SkPixmap lowerPixmap; - SkMatrix lowerInv; - SkPixmap* lower = nullptr; - float lowerWeight = access->lowerWeight(); - if (lowerWeight > 0) { - std::tie(lowerPixmap, lowerInv) = access->lowerLevel(); - lower = &lowerPixmap; - } - - skvm::Coord upperLocal = origLocal; - if (!mRec.apply(p, &upperLocal, uniforms, upperInv).has_value()) { - return {}; - } - - // We can exploit image opacity to skip work unpacking alpha channels. - const bool input_is_opaque = SkAlphaTypeIsOpaque(upper.alphaType()) - || SkColorTypeIsAlwaysOpaque(upper.colorType()); - - // Each call to sample() will try to rewrite the same uniforms over and over, - // so remember where we start and reset back there each time. That way each - // sample() call uses the same uniform offsets. - - auto compute_clamp_limit = [&](float limit) { - // Subtract an ulp so the upper clamp limit excludes limit itself. - int bits; - memcpy(&bits, &limit, 4); - return p->uniformF(uniforms->push(bits-1)); - }; - - // Except in the simplest case (no mips, no filtering), we reference uniforms - // more than once. To avoid adding/registering them multiple times, we pre-load them - // into a struct (just to logically group them together), based on the "current" - // pixmap (level of a mipmap). - // - struct Uniforms { - skvm::F32 w, iw, i2w, - h, ih, i2h; - - skvm::F32 clamp_w, - clamp_h; - - skvm::Uniform addr; - skvm::I32 rowBytesAsPixels; - - skvm::PixelFormat pixelFormat; // not a uniform, but needed for each texel sample, - // so we store it here, since it is also dependent on - // the current pixmap (level). - }; - - auto setup_uniforms = [&](const SkPixmap& pm) -> Uniforms { - skvm::PixelFormat pixelFormat = skvm::SkColorType_to_PixelFormat(pm.colorType()); - return { - p->uniformF(uniforms->pushF( pm.width())), - p->uniformF(uniforms->pushF(1.0f/pm.width())), // iff tileX == kRepeat - p->uniformF(uniforms->pushF(0.5f/pm.width())), // iff tileX == kMirror - - p->uniformF(uniforms->pushF( pm.height())), - p->uniformF(uniforms->pushF(1.0f/pm.height())), // iff tileY == kRepeat - p->uniformF(uniforms->pushF(0.5f/pm.height())), // iff tileY == kMirror - - compute_clamp_limit(pm. width()), - compute_clamp_limit(pm.height()), - - uniforms->pushPtr(pm.addr()), - p->uniform32(uniforms->push(pm.rowBytesAsPixels())), - - pixelFormat, - }; - }; - - auto sample_texel = [&](const Uniforms& u, skvm::F32 sx, skvm::F32 sy) -> skvm::Color { - // repeat() and mirror() are written assuming they'll be followed by a [0,scale) clamp. - auto repeat = [&](skvm::F32 v, skvm::F32 S, skvm::F32 I) { - return v - floor(v * I) * S; - }; - auto mirror = [&](skvm::F32 v, skvm::F32 S, skvm::F32 I2) { - // abs( (v-scale) - (2*scale)*floor((v-scale)*(0.5f/scale)) - scale ) - // {---A---} {------------------B------------------} - skvm::F32 A = v - S, - B = (S + S) * floor(A * I2); - return abs(A - B - S); - }; - switch (fTileModeX) { - case SkTileMode::kDecal: /* handled after gather */ break; - case SkTileMode::kClamp: /* we always clamp */ break; - case SkTileMode::kRepeat: sx = repeat(sx, u.w, u.iw); break; - case SkTileMode::kMirror: sx = mirror(sx, u.w, u.i2w); break; - } - switch (fTileModeY) { - case SkTileMode::kDecal: /* handled after gather */ break; - case SkTileMode::kClamp: /* we always clamp */ break; - case SkTileMode::kRepeat: sy = repeat(sy, u.h, u.ih); break; - case SkTileMode::kMirror: sy = mirror(sy, u.h, u.i2h); break; - } - - // Always clamp sample coordinates to [0,width), [0,height), both for memory - // safety and to handle the clamps still needed by kClamp, kRepeat, and kMirror. - skvm::F32 clamped_x = clamp(sx, 0, u.clamp_w), - clamped_y = clamp(sy, 0, u.clamp_h); - - // Load pixels from pm.addr()[(int)sx + (int)sy*stride]. - skvm::I32 index = trunc(clamped_x) + - trunc(clamped_y) * u.rowBytesAsPixels; - skvm::Color c = gather(u.pixelFormat, u.addr, index); - - // If we know the image is opaque, jump right to alpha = 1.0f, skipping work to unpack it. - if (input_is_opaque) { - c.a = p->splat(1.0f); - } - - // Mask away any pixels that we tried to sample outside the bounds in kDecal. - if (fTileModeX == SkTileMode::kDecal || fTileModeY == SkTileMode::kDecal) { - skvm::I32 mask = p->splat(~0); - if (fTileModeX == SkTileMode::kDecal) { mask &= (sx == clamped_x); } - if (fTileModeY == SkTileMode::kDecal) { mask &= (sy == clamped_y); } - c.r = pun_to_F32(p->bit_and(mask, pun_to_I32(c.r))); - c.g = pun_to_F32(p->bit_and(mask, pun_to_I32(c.g))); - c.b = pun_to_F32(p->bit_and(mask, pun_to_I32(c.b))); - c.a = pun_to_F32(p->bit_and(mask, pun_to_I32(c.a))); - // Notice that even if input_is_opaque, c.a might now be 0. - } - - return c; - }; - - auto sample_level = [&](const SkPixmap& pm, skvm::Coord local) { - const Uniforms u = setup_uniforms(pm); - - if (sampling.useCubic) { - // All bicubic samples have the same fractional offset (fx,fy) from the center. - // They're either the 16 corners of a 3x3 grid/ surrounding (x,y) at (0.5,0.5) off-center. - skvm::F32 fx = fract(local.x + 0.5f), - fy = fract(local.y + 0.5f); - skvm::F32 wx[4], - wy[4]; - - SkM44 weights = CubicResamplerMatrix(sampling.cubic.B, sampling.cubic.C); - - auto dot = [](const skvm::F32 a[], const skvm::F32 b[]) { - return a[0]*b[0] + a[1]*b[1] + a[2]*b[2] + a[3]*b[3]; - }; - const skvm::F32 tmpx[] = { p->splat(1.0f), fx, fx*fx, fx*fx*fx }; - const skvm::F32 tmpy[] = { p->splat(1.0f), fy, fy*fy, fy*fy*fy }; - - for (int row = 0; row < 4; ++row) { - SkV4 r = weights.row(row); - skvm::F32 ru[] = { - p->uniformF(uniforms->pushF(r[0])), - p->uniformF(uniforms->pushF(r[1])), - p->uniformF(uniforms->pushF(r[2])), - p->uniformF(uniforms->pushF(r[3])), - }; - wx[row] = dot(ru, tmpx); - wy[row] = dot(ru, tmpy); - } - - skvm::Color c; - c.r = c.g = c.b = c.a = p->splat(0.0f); - - skvm::F32 sy = local.y - 1.5f; - for (int j = 0; j < 4; j++, sy += 1.0f) { - skvm::F32 sx = local.x - 1.5f; - for (int i = 0; i < 4; i++, sx += 1.0f) { - skvm::Color s = sample_texel(u, sx,sy); - skvm::F32 w = wx[i] * wy[j]; - - c.r += s.r * w; - c.g += s.g * w; - c.b += s.b * w; - c.a += s.a * w; - } - } - return c; - } else if (sampling.filter == SkFilterMode::kLinear) { - // Our four sample points are the corners of a logical 1x1 pixel - // box surrounding (x,y) at (0.5,0.5) off-center. - skvm::F32 left = local.x - 0.5f, - top = local.y - 0.5f, - right = local.x + 0.5f, - bottom = local.y + 0.5f; - - // The fractional parts of right and bottom are our lerp factors in x and y respectively. - skvm::F32 fx = fract(right ), - fy = fract(bottom); - - return lerp(lerp(sample_texel(u, left,top ), sample_texel(u, right,top ), fx), - lerp(sample_texel(u, left,bottom), sample_texel(u, right,bottom), fx), fy); - } else { - SkASSERT(sampling.filter == SkFilterMode::kNearest); - // Our rasterizer biases upward. That is a rect from 0.5...1.5 fills pixel 1 and not - // pixel 0. To make an image that is mapped 1:1 with device pixels but at a half pixel - // offset select every pixel from the src image once we make exact integer pixel sample - // values round down not up. Note that a mirror mapping will not have this property. - local.x = skvm::pun_to_F32(skvm::pun_to_I32(local.x) - 1); - local.y = skvm::pun_to_F32(skvm::pun_to_I32(local.y) - 1); - return sample_texel(u, local.x,local.y); - } - }; - - skvm::Color c = sample_level(upper, upperLocal); - if (lower) { - skvm::Coord lowerLocal = origLocal; - if (!mRec.apply(p, &lowerLocal, uniforms, lowerInv)) { - return {}; - } - // lower * weight + upper * (1 - weight) - c = lerp(c, - sample_level(*lower, lowerLocal), - p->uniformF(uniforms->pushF(lowerWeight))); - } - - // If the input is opaque and we're not in decal mode, that means the output is too. - // Forcing *a to 1.0 here will retroactively skip any work we did to interpolate sample alphas. - if (input_is_opaque - && fTileModeX != SkTileMode::kDecal - && fTileModeY != SkTileMode::kDecal) { - c.a = p->splat(1.0f); - } - - // Alpha-only images get their color from the paint (already converted to dst color space). - SkColorSpace* cs = upper.colorSpace(); - SkAlphaType at = upper.alphaType(); - if (SkColorTypeIsAlphaOnly(upper.colorType()) && !fRaw) { - c.r = paint.r; - c.g = paint.g; - c.b = paint.b; - - cs = dst.colorSpace(); - at = kUnpremul_SkAlphaType; - } - - if (sampling.useCubic) { - // Bicubic filtering naturally produces out of range values on both sides of [0,1]. - c.a = clamp01(c.a); - - skvm::F32 limit = (at == kUnpremul_SkAlphaType || fClampAsIfUnpremul) - ? p->splat(1.0f) - : c.a; - c.r = clamp(c.r, 0.0f, limit); - c.g = clamp(c.g, 0.0f, limit); - c.b = clamp(c.b, 0.0f, limit); - } - - return fRaw ? c - : SkColorSpaceXformSteps{cs, at, dst.colorSpace(), dst.alphaType()}.program( - p, uniforms, c); -} -#endif diff --git a/src/shaders/SkImageShader.h b/src/shaders/SkImageShader.h index 8334192df4fc..70d4fcc76f45 100644 --- a/src/shaders/SkImageShader.h +++ b/src/shaders/SkImageShader.h @@ -17,13 +17,6 @@ #include "include/core/SkTypes.h" #include "src/shaders/SkShaderBase.h" -#if defined(SK_GRAPHITE) -namespace skgpu::graphite { -class KeyContext; -enum class ReadSwizzle; -} -#endif - class SkArenaAlloc; class SkMatrix; class SkReadBuffer; @@ -68,11 +61,6 @@ class SkImageShader : public SkShaderBase { ShaderType type() const override { return ShaderType::kImage; } -#if defined(SK_GRAPHITE) - void addToKey(const skgpu::graphite::KeyContext&, - skgpu::graphite::PaintParamsKeyBuilder*, - skgpu::graphite::PipelineDataGatherer*) const override; -#endif static SkM44 CubicResamplerMatrix(float B, float C); SkTileMode tileModeX() const { return fTileModeX; } @@ -93,25 +81,6 @@ class SkImageShader : public SkShaderBase { bool appendStages(const SkStageRec&, const SkShaders::MatrixRec&) const override; -#if defined(SK_ENABLE_SKVM) - skvm::Color program(skvm::Builder*, - skvm::Coord device, - skvm::Coord local, - skvm::Color paint, - const SkShaders::MatrixRec&, - const SkColorInfo& dst, - skvm::Uniforms* uniforms, - SkArenaAlloc*) const override; -#endif // defined(SK_ENABLE_SKVM) - -#if defined(SK_GRAPHITE) - void addYUVImageToKey(const skgpu::graphite::KeyContext&, - skgpu::graphite::PaintParamsKeyBuilder*, - skgpu::graphite::PipelineDataGatherer*, - sk_sp, - SkSamplingOptions) const; -#endif - sk_sp fImage; const SkSamplingOptions fSampling; const SkTileMode fTileModeX; diff --git a/src/shaders/SkLocalMatrixShader.cpp b/src/shaders/SkLocalMatrixShader.cpp index f19078b86ba9..e41dbe9f8279 100644 --- a/src/shaders/SkLocalMatrixShader.cpp +++ b/src/shaders/SkLocalMatrixShader.cpp @@ -6,16 +6,9 @@ */ #include "src/shaders/SkLocalMatrixShader.h" -#include "src/base/SkTLazy.h" #include "src/core/SkReadBuffer.h" #include "src/core/SkWriteBuffer.h" -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/KeyContext.h" -#include "src/gpu/graphite/KeyHelpers.h" -#include "src/gpu/graphite/PaintParamsKey.h" -#endif - class SkImage; enum class SkTileMode; struct SkStageRec; @@ -29,24 +22,6 @@ SkShaderBase::GradientType SkLocalMatrixShader::asGradient(GradientInfo* info, return type; } -#if defined(SK_GRAPHITE) -void SkLocalMatrixShader::addToKey(const skgpu::graphite::KeyContext& keyContext, - skgpu::graphite::PaintParamsKeyBuilder* builder, - skgpu::graphite::PipelineDataGatherer* gatherer) const { - using namespace skgpu::graphite; - - LocalMatrixShaderBlock::LMShaderData lmShaderData(fLocalMatrix); - - KeyContextWithLocalMatrix newContext(keyContext, fLocalMatrix); - - LocalMatrixShaderBlock::BeginBlock(newContext, builder, gatherer, &lmShaderData); - - as_SB(fWrappedShader)->addToKey(newContext, builder, gatherer); - - builder->endBlock(); -} -#endif - sk_sp SkLocalMatrixShader::CreateProc(SkReadBuffer& buffer) { SkMatrix lm; buffer.readMatrix(&lm); @@ -63,18 +38,9 @@ void SkLocalMatrixShader::flatten(SkWriteBuffer& buffer) const { } #ifdef SK_ENABLE_LEGACY_SHADERCONTEXT -SkShaderBase::Context* SkLocalMatrixShader::onMakeContext( - const ContextRec& rec, SkArenaAlloc* alloc) const -{ - SkTCopyOnFirstWrite lm(fLocalMatrix); - if (rec.fLocalMatrix) { - *lm.writable() = ConcatLocalMatrices(*rec.fLocalMatrix, *lm); - } - - ContextRec newRec(rec); - newRec.fLocalMatrix = lm; - - return as_SB(fWrappedShader)->makeContext(newRec, alloc); +SkShaderBase::Context* SkLocalMatrixShader::onMakeContext(const ContextRec& rec, + SkArenaAlloc* alloc) const { + return as_SB(fWrappedShader)->makeContext(ContextRec::Concat(rec, fLocalMatrix), alloc); } #endif @@ -93,26 +59,6 @@ bool SkLocalMatrixShader::appendStages(const SkStageRec& rec, return as_SB(fWrappedShader)->appendStages(rec, mRec.concat(fLocalMatrix)); } -#if defined(SK_ENABLE_SKVM) -skvm::Color SkLocalMatrixShader::program(skvm::Builder* p, - skvm::Coord device, - skvm::Coord local, - skvm::Color paint, - const SkShaders::MatrixRec& mRec, - const SkColorInfo& dst, - skvm::Uniforms* uniforms, - SkArenaAlloc* alloc) const { - return as_SB(fWrappedShader)->program(p, - device, - local, - paint, - mRec.concat(fLocalMatrix), - dst, - uniforms, - alloc); -} -#endif - //////////////////////////////////////////////////////////////////// SkCTMShader::SkCTMShader(sk_sp proxy, const SkMatrix& ctm) @@ -127,19 +73,6 @@ bool SkCTMShader::appendStages(const SkStageRec& rec, const SkShaders::MatrixRec return as_SB(fProxyShader)->appendRootStages(rec, fCTM); } -#if defined(SK_ENABLE_SKVM) -skvm::Color SkCTMShader::program(skvm::Builder* p, - skvm::Coord device, - skvm::Coord local, - skvm::Color paint, - const SkShaders::MatrixRec& mRec, - const SkColorInfo& dst, - skvm::Uniforms* uniforms, - SkArenaAlloc* alloc) const { - return as_SB(fProxyShader)->rootProgram(p, device, paint, fCTM, dst, uniforms, alloc); -} -#endif - sk_sp SkCTMShader::CreateProc(SkReadBuffer& buffer) { SkASSERT(false); return nullptr; diff --git a/src/shaders/SkLocalMatrixShader.h b/src/shaders/SkLocalMatrixShader.h index ce007c103c36..62ea398e2e5f 100644 --- a/src/shaders/SkLocalMatrixShader.h +++ b/src/shaders/SkLocalMatrixShader.h @@ -32,7 +32,7 @@ class SkLocalMatrixShader final : public SkShaderBase { MakeWrapped(const SkMatrix* localMatrix, Args&&... args) { auto t = sk_make_sp(std::forward(args)...); if (!localMatrix || localMatrix->isIdentity()) { - return std::move(t); + return t; } return sk_make_sp(sk_sp(std::move(t)), *localMatrix); } @@ -43,12 +43,6 @@ class SkLocalMatrixShader final : public SkShaderBase { GradientType asGradient(GradientInfo* info, SkMatrix* localMatrix) const override; ShaderType type() const override { return ShaderType::kLocalMatrix; } -#if defined(SK_GRAPHITE) - void addToKey(const skgpu::graphite::KeyContext&, - skgpu::graphite::PaintParamsKeyBuilder*, - skgpu::graphite::PipelineDataGatherer*) const override; -#endif - sk_sp makeAsALocalMatrixShader(SkMatrix* localMatrix) const override { if (localMatrix) { *localMatrix = fLocalMatrix; @@ -70,17 +64,6 @@ class SkLocalMatrixShader final : public SkShaderBase { bool appendStages(const SkStageRec&, const SkShaders::MatrixRec&) const override; -#if defined(SK_ENABLE_SKVM) - skvm::Color program(skvm::Builder*, - skvm::Coord device, - skvm::Coord local, - skvm::Color paint, - const SkShaders::MatrixRec&, - const SkColorInfo& dst, - skvm::Uniforms* uniforms, - SkArenaAlloc*) const override; -#endif - private: SK_FLATTENABLE_HOOKS(SkLocalMatrixShader) @@ -109,17 +92,6 @@ class SkCTMShader final : public SkShaderBase { bool appendStages(const SkStageRec& rec, const SkShaders::MatrixRec&) const override; -#if defined(SK_ENABLE_SKVM) - skvm::Color program(skvm::Builder* p, - skvm::Coord device, - skvm::Coord local, - skvm::Color paint, - const SkShaders::MatrixRec& mRec, - const SkColorInfo& dst, - skvm::Uniforms* uniforms, - SkArenaAlloc* alloc) const override; -#endif - private: SK_FLATTENABLE_HOOKS(SkCTMShader) diff --git a/src/shaders/SkPerlinNoiseShaderImpl.cpp b/src/shaders/SkPerlinNoiseShaderImpl.cpp index 374ee5628a9d..394a2fa0b2b5 100644 --- a/src/shaders/SkPerlinNoiseShaderImpl.cpp +++ b/src/shaders/SkPerlinNoiseShaderImpl.cpp @@ -17,16 +17,6 @@ #include "src/core/SkReadBuffer.h" #include "src/core/SkWriteBuffer.h" -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/KeyContext.h" -#include "src/gpu/graphite/KeyHelpers.h" -#include "src/gpu/graphite/Log.h" -#include "src/gpu/graphite/PaintParamsKey.h" -#include "src/gpu/graphite/RecorderPriv.h" -#include "src/gpu/graphite/TextureProxyView.h" -#include "src/image/SkImage_Base.h" -#endif // SK_GRAPHITE - namespace { // noiseValue is the color component's value (or color) @@ -63,6 +53,10 @@ SkPerlinNoiseShader::SkPerlinNoiseShader(SkPerlinNoiseShader::Type type, SkASSERT(numOctaves >= 0 && numOctaves <= kMaxOctaves); SkASSERT(fBaseFrequencyX >= 0); SkASSERT(fBaseFrequencyY >= 0); + + // If kBlockSize changes then it must be changed in the SkSL noise_function + // implementation and the graphite backend + static_assert(SkPerlinNoiseShader::kBlockSize == 256); } sk_sp SkPerlinNoiseShader::CreateProc(SkReadBuffer& buffer) { @@ -223,18 +217,10 @@ SkShaderBase::Context* SkPerlinNoiseShader::onMakeContext(const ContextRec& rec, } #endif -static inline SkMatrix total_matrix(const SkShaderBase::ContextRec& rec, - const SkShaderBase& shader) { - if (rec.fLocalMatrix) { - return SkMatrix::Concat(*rec.fMatrix, *rec.fLocalMatrix); - } - return *rec.fMatrix; -} - SkPerlinNoiseShader::PerlinNoiseShaderContext::PerlinNoiseShaderContext( const SkPerlinNoiseShader& shader, const ContextRec& rec) : Context(shader, rec) - , fMatrix(total_matrix(rec, shader)) // used for temp storage, adjusted below + , fMatrix(rec.fMatrixRec.totalMatrix()) // used for temp storage, adjusted below , fPaintingData(shader.fTileSize, shader.fSeed, shader.fBaseFrequencyX, @@ -258,85 +244,6 @@ void SkPerlinNoiseShader::PerlinNoiseShaderContext::shadeSpan(int x, } } -#if defined(SK_GRAPHITE) - -// If either of these change then the corresponding change must also be made in the SkSL -// perlin_noise_shader function. -static_assert((int)SkPerlinNoiseShader::kFractalNoise_Type == - (int)skgpu::graphite::PerlinNoiseShaderBlock::Type::kFractalNoise); -static_assert((int)SkPerlinNoiseShader::kTurbulence_Type == - (int)skgpu::graphite::PerlinNoiseShaderBlock::Type::kTurbulence); - -void SkPerlinNoiseShader::addToKey(const skgpu::graphite::KeyContext& keyContext, - skgpu::graphite::PaintParamsKeyBuilder* builder, - skgpu::graphite::PipelineDataGatherer* gatherer) const { - // If kBlockSize changes here then it must also be changed in the SkSL noise_function - // implementation. - static_assert(SkPerlinNoiseShader::kBlockSize == 256); - - using namespace skgpu::graphite; - - SkASSERT(fNumOctaves); - - SkMatrix totalMatrix = keyContext.local2Dev().asM33(); - if (keyContext.localMatrix()) { - totalMatrix.preConcat(*keyContext.localMatrix()); - } - - SkMatrix invTotal; - bool result = totalMatrix.invert(&invTotal); - if (!result) { - SKGPU_LOG_W("Couldn't invert totalMatrix for PerlinNoiseShader"); - - SolidColorShaderBlock::BeginBlock(keyContext, builder, gatherer, {1, 0, 0, 1}); - builder->endBlock(); - return; - } - - auto paintingData = this->getPaintingData(totalMatrix); - paintingData->generateBitmaps(); - - sk_sp perm = RecorderPriv::CreateCachedProxy( - keyContext.recorder(), paintingData->getPermutationsBitmap()); - - sk_sp noise = - RecorderPriv::CreateCachedProxy(keyContext.recorder(), paintingData->getNoiseBitmap()); - - if (!perm || !noise) { - SKGPU_LOG_W("Couldn't create tables for PerlinNoiseShader"); - - SolidColorShaderBlock::BeginBlock(keyContext, builder, gatherer, {1, 0, 0, 1}); - builder->endBlock(); - return; - } - - PerlinNoiseShaderBlock::PerlinNoiseData data( - static_cast(fType), - paintingData->fBaseFrequency, - fNumOctaves, - {paintingData->fStitchDataInit.fWidth, paintingData->fStitchDataInit.fHeight}); - - data.fPermutationsProxy = std::move(perm); - data.fNoiseProxy = std::move(noise); - - // This (1,1) translation is due to WebKit's 1 based coordinates for the noise - // (as opposed to 0 based, usually). Remember: this matrix (shader2World) is going to be - // inverted before being applied. - SkMatrix shader2Local = - SkMatrix::Translate(-1 + totalMatrix.getTranslateX(), -1 + totalMatrix.getTranslateY()); - shader2Local.postConcat(invTotal); - - LocalMatrixShaderBlock::LMShaderData lmShaderData(shader2Local); - - KeyContextWithLocalMatrix newContext(keyContext, shader2Local); - - LocalMatrixShaderBlock::BeginBlock(newContext, builder, gatherer, &lmShaderData); - PerlinNoiseShaderBlock::BeginBlock(newContext, builder, gatherer, &data); - builder->endBlock(); - builder->endBlock(); -} -#endif // SK_GRAPHITE - /////////////////////////////////////////////////////////////////////////////////////////////////// static bool valid_input( diff --git a/src/shaders/SkPerlinNoiseShaderImpl.h b/src/shaders/SkPerlinNoiseShaderImpl.h index 29175ac640d2..8d975d075d0d 100644 --- a/src/shaders/SkPerlinNoiseShaderImpl.h +++ b/src/shaders/SkPerlinNoiseShaderImpl.h @@ -31,16 +31,6 @@ class SkArenaAlloc; class SkReadBuffer; class SkWriteBuffer; -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/KeyContext.h" -#include "src/gpu/graphite/KeyHelpers.h" -#include "src/gpu/graphite/Log.h" -#include "src/gpu/graphite/PaintParamsKey.h" -#include "src/gpu/graphite/RecorderPriv.h" -#include "src/gpu/graphite/TextureProxyView.h" -#include "src/image/SkImage_Base.h" -#endif // SK_GRAPHITE - class SkPerlinNoiseShader : public SkShaderBase { private: static constexpr int kBlockSize = 256; @@ -299,25 +289,6 @@ class SkPerlinNoiseShader : public SkShaderBase { PaintingData fPaintingData; }; -#if defined(SK_GRAPHITE) - void addToKey(const skgpu::graphite::KeyContext&, - skgpu::graphite::PaintParamsKeyBuilder*, - skgpu::graphite::PipelineDataGatherer*) const override; -#endif -#if defined(SK_ENABLE_SKVM) - skvm::Color program(skvm::Builder*, - skvm::Coord, - skvm::Coord, - skvm::Color, - const SkShaders::MatrixRec&, - const SkColorInfo&, - skvm::Uniforms*, - SkArenaAlloc*) const override { - // Unimplemented - return {}; - } -#endif - SkPerlinNoiseShader::Type noiseType() const { return fType; } int numOctaves() const { return fNumOctaves; } bool stitchTiles() const { return fStitchTiles; } diff --git a/src/shaders/SkPictureShader.cpp b/src/shaders/SkPictureShader.cpp index 18945c4bed36..b776dfc9dacf 100644 --- a/src/shaders/SkPictureShader.cpp +++ b/src/shaders/SkPictureShader.cpp @@ -29,15 +29,6 @@ #include "src/core/SkWriteBuffer.h" #include "src/shaders/SkLocalMatrixShader.h" -#if defined(SK_GRAPHITE) -#include "include/gpu/graphite/Surface.h" -#include "src/gpu/graphite/Caps.h" -#include "src/gpu/graphite/KeyContext.h" -#include "src/gpu/graphite/KeyHelpers.h" -#include "src/gpu/graphite/PaintParamsKey.h" -#include "src/gpu/graphite/RecorderPriv.h" -#endif - #include #include #include @@ -310,39 +301,13 @@ bool SkPictureShader::appendStages(const SkStageRec& rec, const SkShaders::Matri return as_SB(bitmapShader)->appendStages(rec, mRec); } -#if defined(SK_ENABLE_SKVM) -skvm::Color SkPictureShader::program(skvm::Builder* p, - skvm::Coord device, - skvm::Coord local, - skvm::Color paint, - const SkShaders::MatrixRec& mRec, - const SkColorInfo& dst, - skvm::Uniforms* uniforms, - SkArenaAlloc* alloc) const { - // TODO: We'll need additional plumbing to get the correct props from our callers. - SkSurfaceProps props{}; - - // Keep bitmapShader alive by using alloc instead of stack memory - auto& bitmapShader = *alloc->make>(); - bitmapShader = this->rasterShader(mRec.totalMatrix(), dst.colorType(), dst.colorSpace(), props); - if (!bitmapShader) { - return {}; - } - - return as_SB(bitmapShader)->program(p, device, local, paint, mRec, dst, uniforms, alloc); -} -#endif - ///////////////////////////////////////////////////////////////////////////////////////// #ifdef SK_ENABLE_LEGACY_SHADERCONTEXT -SkShaderBase::Context* SkPictureShader::onMakeContext(const ContextRec& rec, SkArenaAlloc* alloc) -const { - const auto& vm = *rec.fMatrix; - const auto* lm = rec.fLocalMatrix; - const auto totalM = lm ? SkMatrix::Concat(vm, *lm) : vm; - sk_sp bitmapShader = this->rasterShader(totalM, rec.fDstColorType, - rec.fDstColorSpace, rec.fProps); +SkShaderBase::Context* SkPictureShader::onMakeContext(const ContextRec& rec, + SkArenaAlloc* alloc) const { + sk_sp bitmapShader = this->rasterShader( + rec.fMatrixRec.totalMatrix(), rec.fDstColorType, rec.fDstColorSpace, rec.fProps); if (!bitmapShader) { return nullptr; } @@ -350,58 +315,3 @@ const { return as_SB(bitmapShader)->makeContext(rec, alloc); } #endif - -#if defined(SK_GRAPHITE) -void SkPictureShader::addToKey(const skgpu::graphite::KeyContext& keyContext, - skgpu::graphite::PaintParamsKeyBuilder* builder, - skgpu::graphite::PipelineDataGatherer* gatherer) const { - - using namespace skgpu::graphite; - - Recorder* recorder = keyContext.recorder(); - const Caps* caps = recorder->priv().caps(); - - // TODO: We'll need additional plumbing to get the correct props from our callers. In - // particular we'll need to expand the keyContext to have the surfaceProps, the dstColorType - // and dstColorSpace. - SkSurfaceProps props{}; - - SkMatrix totalM = keyContext.local2Dev().asM33(); - if (keyContext.localMatrix()) { - totalM.preConcat(*keyContext.localMatrix()); - } - CachedImageInfo info = CachedImageInfo::Make(fTile, - totalM, - /* dstColorType= */ kRGBA_8888_SkColorType, - /* dstColorSpace= */ nullptr, - caps->maxTextureSize(), - props); - if (!info.success) { - SolidColorShaderBlock::BeginBlock(keyContext, builder, gatherer, {1, 0, 0, 1}); - builder->endBlock(); - return; - } - - // TODO: right now we're explicitly not caching here. We could expand the ImageProvider - // API to include already Graphite-backed images, add a Recorder-local cache or add - // rendered-picture images to the global cache. - sk_sp img = info.makeImage( - SkSurfaces::RenderTarget(recorder, info.imageInfo, skgpu::Mipmapped::kNo, &info.props), - fPicture.get()); - if (!img) { - SolidColorShaderBlock::BeginBlock(keyContext, builder, gatherer, {1, 0, 0, 1}); - builder->endBlock(); - return; - } - - const auto shaderLM = SkMatrix::Scale(1.f/info.tileScale.width(), 1.f/info.tileScale.height()); - sk_sp shader = img->makeShader(fTmx, fTmy, SkSamplingOptions(fFilter), &shaderLM); - if (!shader) { - SolidColorShaderBlock::BeginBlock(keyContext, builder, gatherer, {1, 0, 0, 1}); - builder->endBlock(); - return; - } - - as_SB(shader)->addToKey(keyContext, builder, gatherer); -} -#endif // SK_GRAPHITE diff --git a/src/shaders/SkPictureShader.h b/src/shaders/SkPictureShader.h index bb810b0614e5..f1de010cd2a2 100644 --- a/src/shaders/SkPictureShader.h +++ b/src/shaders/SkPictureShader.h @@ -42,12 +42,6 @@ class SkPictureShader : public SkShaderBase { static sk_sp Make(sk_sp, SkTileMode, SkTileMode, SkFilterMode, const SkMatrix*, const SkRect*); -#if defined(SK_GRAPHITE) - void addToKey(const skgpu::graphite::KeyContext&, - skgpu::graphite::PaintParamsKeyBuilder*, - skgpu::graphite::PipelineDataGatherer*) const override; -#endif - SkPictureShader(sk_sp, SkTileMode, SkTileMode, SkFilterMode, const SkRect*); ShaderType type() const override { return ShaderType::kPicture; } @@ -79,16 +73,6 @@ class SkPictureShader : public SkShaderBase { SkPictureShader(SkReadBuffer&); void flatten(SkWriteBuffer&) const override; bool appendStages(const SkStageRec&, const SkShaders::MatrixRec&) const override; -#if defined(SK_ENABLE_SKVM) - skvm::Color program(skvm::Builder*, - skvm::Coord device, - skvm::Coord local, - skvm::Color paint, - const SkShaders::MatrixRec&, - const SkColorInfo& dst, - skvm::Uniforms* uniforms, - SkArenaAlloc* alloc) const override; -#endif #ifdef SK_ENABLE_LEGACY_SHADERCONTEXT Context* onMakeContext(const ContextRec&, SkArenaAlloc*) const override; #endif diff --git a/src/shaders/SkRuntimeShader.cpp b/src/shaders/SkRuntimeShader.cpp index cbaee17ffcd9..05ccb7b97b1e 100644 --- a/src/shaders/SkRuntimeShader.cpp +++ b/src/shaders/SkRuntimeShader.cpp @@ -27,12 +27,6 @@ #include "src/sksl/codegen/SkSLRasterPipelineBuilder.h" #include "src/sksl/tracing/SkSLDebugTracePriv.h" -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/KeyContext.h" -#include "src/gpu/graphite/KeyHelpers.h" -#include "src/gpu/graphite/PaintParamsKey.h" -#endif - #include #include #include @@ -44,7 +38,7 @@ struct SkIPoint; SkRuntimeShader::SkRuntimeShader(sk_sp effect, sk_sp debugTrace, sk_sp uniforms, - SkSpan children) + SkSpan children) : fEffect(std::move(effect)) , fDebugTrace(std::move(debugTrace)) , fUniformData(std::move(uniforms)) @@ -53,7 +47,7 @@ SkRuntimeShader::SkRuntimeShader(sk_sp effect, SkRuntimeShader::SkRuntimeShader(sk_sp effect, sk_sp debugTrace, UniformsCallback uniformsCallback, - SkSpan children) + SkSpan children) : fEffect(std::move(effect)) , fDebugTrace(std::move(debugTrace)) , fUniformsCallback(std::move(uniformsCallback)) @@ -76,29 +70,7 @@ SkRuntimeEffect::TracedShader SkRuntimeShader::makeTracedClone(const SkIPoint& c return SkRuntimeEffect::TracedShader{std::move(debugShader), std::move(debugTrace)}; } -#if defined(SK_GRAPHITE) -void SkRuntimeShader::addToKey(const skgpu::graphite::KeyContext& keyContext, - skgpu::graphite::PaintParamsKeyBuilder* builder, - skgpu::graphite::PipelineDataGatherer* gatherer) const { - using namespace skgpu::graphite; - - sk_sp uniforms = SkRuntimeEffectPriv::TransformUniforms( - fEffect->uniforms(), - this->uniformData(keyContext.dstColorInfo().colorSpace()), - keyContext.dstColorInfo().colorSpace()); - SkASSERT(uniforms); - - RuntimeEffectBlock::BeginBlock(keyContext, builder, gatherer, {fEffect, std::move(uniforms)}); - - SkRuntimeEffectPriv::AddChildrenToKey( - fChildren, fEffect->children(), keyContext, builder, gatherer); - - builder->endBlock(); -} -#endif - bool SkRuntimeShader::appendStages(const SkStageRec& rec, const SkShaders::MatrixRec& mRec) const { -#ifdef SK_ENABLE_SKSL_IN_RASTER_PIPELINE if (!SkRuntimeEffectPriv::CanDraw(SkCapabilities::RasterBackend().get(), fEffect.get())) { // SkRP has support for many parts of #version 300 already, but for now, we restrict its // usage in runtime effects to just #version 100. @@ -119,53 +91,9 @@ bool SkRuntimeShader::appendStages(const SkStageRec& rec, const SkShaders::Matri bool success = program->appendStages(rec.fPipeline, rec.fAlloc, &callbacks, uniforms); return success; } -#endif return false; } -#if defined(SK_ENABLE_SKVM) -skvm::Color SkRuntimeShader::program(skvm::Builder* p, - skvm::Coord device, - skvm::Coord local, - skvm::Color paint, - const SkShaders::MatrixRec& mRec, - const SkColorInfo& colorInfo, - skvm::Uniforms* uniforms, - SkArenaAlloc* alloc) const { - if (!SkRuntimeEffectPriv::CanDraw(SkCapabilities::RasterBackend().get(), fEffect.get())) { - return {}; - } - - sk_sp inputs = SkRuntimeEffectPriv::TransformUniforms( - fEffect->uniforms(), this->uniformData(colorInfo.colorSpace()), colorInfo.colorSpace()); - SkASSERT(inputs); - - // Ensure any pending transform is applied before running the runtime shader's code, which - // gets to use and manipulate the coordinates. - std::optional newMRec = mRec.apply(p, &local, uniforms); - if (!newMRec.has_value()) { - return {}; - } - // We could omit this for children that are only sampled with passthrough coords. - newMRec->markTotalMatrixInvalid(); - - RuntimeEffectVMCallbacks callbacks(p, uniforms, alloc, fChildren, *newMRec, paint, colorInfo); - std::vector uniform = - SkRuntimeEffectPriv::MakeSkVMUniforms(p, uniforms, fEffect->uniformSize(), *inputs); - - return SkSL::ProgramToSkVM(*fEffect->fBaseProgram, - fEffect->fMain, - p, - fDebugTrace.get(), - SkSpan(uniform), - device, - local, - paint, - paint, - &callbacks); -} -#endif - void SkRuntimeShader::flatten(SkWriteBuffer& buffer) const { buffer.writeString(fEffect->source().c_str()); buffer.writeDataAsByteArray(this->uniformData(nullptr).get()); diff --git a/src/shaders/SkRuntimeShader.h b/src/shaders/SkRuntimeShader.h index 9a8372b95069..da36ccb7b450 100644 --- a/src/shaders/SkRuntimeShader.h +++ b/src/shaders/SkRuntimeShader.h @@ -17,12 +17,6 @@ #include "src/shaders/SkShaderBase.h" #include "src/sksl/tracing/SkSLDebugTracePriv.h" -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/KeyContext.h" -#include "src/gpu/graphite/KeyHelpers.h" -#include "src/gpu/graphite/PaintParamsKey.h" -#endif - #include class SkColorSpace; @@ -38,12 +32,12 @@ class SkRuntimeShader : public SkShaderBase { SkRuntimeShader(sk_sp effect, sk_sp debugTrace, sk_sp uniforms, - SkSpan children); + SkSpan children); SkRuntimeShader(sk_sp effect, sk_sp debugTrace, UniformsCallback uniformsCallback, - SkSpan children); + SkSpan children); SkRuntimeEffect::TracedShader makeTracedClone(const SkIPoint& coord); @@ -51,31 +45,14 @@ class SkRuntimeShader : public SkShaderBase { ShaderType type() const override { return ShaderType::kRuntime; } -#if defined(SK_GRAPHITE) - void addToKey(const skgpu::graphite::KeyContext& keyContext, - skgpu::graphite::PaintParamsKeyBuilder* builder, - skgpu::graphite::PipelineDataGatherer* gatherer) const override; -#endif - bool appendStages(const SkStageRec& rec, const SkShaders::MatrixRec& mRec) const override; -#if defined(SK_ENABLE_SKVM) - skvm::Color program(skvm::Builder* p, - skvm::Coord device, - skvm::Coord local, - skvm::Color paint, - const SkShaders::MatrixRec& mRec, - const SkColorInfo& colorInfo, - skvm::Uniforms* uniforms, - SkArenaAlloc* alloc) const override; -#endif - void flatten(SkWriteBuffer& buffer) const override; SkRuntimeEffect* asRuntimeEffect() const override { return fEffect.get(); } sk_sp effect() const { return fEffect; } - std::vector children() const { return fChildren; } + SkSpan children() const { return fChildren; } sk_sp uniformData(const SkColorSpace* dstCS) const; diff --git a/src/shaders/SkShaderBase.cpp b/src/shaders/SkShaderBase.cpp index b5712235fcf5..a91232c823b2 100644 --- a/src/shaders/SkShaderBase.cpp +++ b/src/shaders/SkShaderBase.cpp @@ -20,11 +20,6 @@ #include "src/core/SkRasterPipelineOpList.h" #include "src/shaders/SkLocalMatrixShader.h" -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/KeyHelpers.h" -#include "src/gpu/graphite/PaintParamsKey.h" -#endif - #include class SkWriteBuffer; @@ -53,29 +48,6 @@ std::optional MatrixRec::apply(const SkStageRec& rec, const SkMatrix& /*ctmApplied=*/true}; } -#if defined(SK_ENABLE_SKVM) -std::optional MatrixRec::apply(skvm::Builder* p, - skvm::Coord* local, - skvm::Uniforms* uniforms, - const SkMatrix& postInv) const { - SkMatrix total = fPendingLocalMatrix; - if (!fCTMApplied) { - total = SkMatrix::Concat(fCTM, total); - } - if (!total.invert(&total)) { - return {}; - } - total = SkMatrix::Concat(postInv, total); - // ApplyMatrix is a no-op if total worked out to identity. - *local = SkShaderBase::ApplyMatrix(p, total, *local, uniforms); - return MatrixRec{fCTM, - fTotalLocalMatrix, - /*pendingLocalMatrix=*/SkMatrix::I(), - fTotalMatrixIsValid, - /*ctmApplied=*/true}; -} -#endif - std::tuple MatrixRec::applyForFragmentProcessor(const SkMatrix& postInv) const { SkASSERT(!fCTMApplied); SkMatrix total; @@ -113,12 +85,6 @@ SkShaderBase::~SkShaderBase() = default; void SkShaderBase::flatten(SkWriteBuffer& buffer) const { this->INHERITED::flatten(buffer); } -bool SkShaderBase::computeTotalInverse(const SkMatrix& ctm, - const SkMatrix* localMatrix, - SkMatrix* totalInverse) const { - return (localMatrix ? SkMatrix::Concat(ctm, *localMatrix) : ctm).invert(totalInverse); -} - bool SkShaderBase::asLuminanceColor(SkColor* colorPtr) const { SkColor storage; if (nullptr == colorPtr) { @@ -134,8 +100,8 @@ bool SkShaderBase::asLuminanceColor(SkColor* colorPtr) const { SkShaderBase::Context* SkShaderBase::makeContext(const ContextRec& rec, SkArenaAlloc* alloc) const { #ifdef SK_ENABLE_LEGACY_SHADERCONTEXT // We always fall back to raster pipeline when perspective is present. - if (rec.fMatrix->hasPerspective() || (rec.fLocalMatrix && rec.fLocalMatrix->hasPerspective()) || - !this->computeTotalInverse(*rec.fMatrix, rec.fLocalMatrix, nullptr)) { + auto totalMatrix = rec.fMatrixRec.totalMatrix(); + if (totalMatrix.hasPerspective() || !totalMatrix.invert(nullptr)) { return nullptr; } @@ -146,14 +112,13 @@ SkShaderBase::Context* SkShaderBase::makeContext(const ContextRec& rec, SkArenaA } SkShaderBase::Context::Context(const SkShaderBase& shader, const ContextRec& rec) - : fShader(shader), fCTM(*rec.fMatrix) { + : fShader(shader) { // We should never use a context with perspective. - SkASSERT(!rec.fMatrix->hasPerspective()); - SkASSERT(!rec.fLocalMatrix || !rec.fLocalMatrix->hasPerspective()); + SkASSERT(!rec.fMatrixRec.totalMatrix().hasPerspective()); // Because the context parameters must be valid at this point, we know that the matrix is // invertible. - SkAssertResult(fShader.computeTotalInverse(*rec.fMatrix, rec.fLocalMatrix, &fTotalInverse)); + SkAssertResult(rec.fMatrixRec.totalInverse(&fTotalInverse)); fPaintAlpha = rec.fPaintAlpha; } @@ -170,18 +135,6 @@ bool SkShaderBase::ContextRec::isLegacyCompatible(SkColorSpace* shaderColorSpace sk_sp SkShaderBase::makeAsALocalMatrixShader(SkMatrix*) const { return nullptr; } -#if defined(SK_GRAPHITE) -// TODO: add implementations for derived classes -void SkShaderBase::addToKey(const skgpu::graphite::KeyContext& keyContext, - skgpu::graphite::PaintParamsKeyBuilder* builder, - skgpu::graphite::PipelineDataGatherer* gatherer) const { - using namespace skgpu::graphite; - - SolidColorShaderBlock::BeginBlock(keyContext, builder, gatherer, {1, 0, 0, 1}); - builder->endBlock(); -} -#endif - bool SkShaderBase::appendRootStages(const SkStageRec& rec, const SkMatrix& ctm) const { return this->appendStages(rec, SkShaders::MatrixRec(ctm)); } @@ -189,18 +142,8 @@ bool SkShaderBase::appendRootStages(const SkStageRec& rec, const SkMatrix& ctm) bool SkShaderBase::appendStages(const SkStageRec& rec, const SkShaders::MatrixRec& mRec) const { // SkShader::Context::shadeSpan() handles the paint opacity internally, // but SkRasterPipelineBlitter applies it as a separate stage. - // We skip the internal shadeSpan() step by forcing the paint opaque. - SkColor4f opaquePaintColor = rec.fPaintColor.makeOpaque(); - - // We don't have a separate ctm and local matrix at this point. Just pass the combined matrix - // as the CTM. TODO: thread the MatrixRec through the legacy context system. - auto tm = mRec.totalMatrix(); - ContextRec cr(opaquePaintColor, - tm, - nullptr, - rec.fDstColorType, - sk_srgb_singleton(), - rec.fSurfaceProps); + // We skip the internal shadeSpan() step by forcing the alpha to be opaque. + ContextRec cr(SK_AlphaOPAQUE, mRec, rec.fDstColorType, sk_srgb_singleton(), rec.fSurfaceProps); struct CallbackCtx : SkRasterPipeline_CallbackCtx { sk_sp shader; @@ -237,82 +180,7 @@ sk_sp SkShaderBase::makeWithCTM(const SkMatrix& postM) const { return sk_sp(new SkCTMShader(sk_ref_sp(this), postM)); } -#if defined(SK_ENABLE_SKVM) -skvm::Color SkShaderBase::rootProgram(skvm::Builder* p, - skvm::Coord device, - skvm::Color paint, - const SkMatrix& ctm, - const SkColorInfo& dst, - skvm::Uniforms* uniforms, - SkArenaAlloc* alloc) const { - // Shader subclasses should always act as if the destination were premul or opaque. - // SkVMBlitter handles all the coordination of unpremul itself, via premul. - SkColorInfo tweaked = - dst.alphaType() == kUnpremul_SkAlphaType ? dst.makeAlphaType(kPremul_SkAlphaType) : dst; - - // Force opaque alpha for all opaque shaders. - // - // This is primarily nice in that we usually have a 1.0f constant splat - // somewhere in the program anyway, and this will let us drop the work the - // shader notionally does to produce alpha, p->extract(...), etc. in favor - // of that simple hoistable splat. - // - // More subtly, it makes isOpaque() a parameter to all shader program - // generation, guaranteeing that is-opaque bit is mixed into the overall - // shader program hash and blitter Key. This makes it safe for us to use - // that bit to make decisions when constructing an SkVMBlitter, like doing - // SrcOver -> Src strength reduction. - if (auto color = this->program(p, - device, - /*local=*/device, - paint, - SkShaders::MatrixRec(ctm), - tweaked, - uniforms, - alloc)) { - if (this->isOpaque()) { - color.a = p->splat(1.0f); - } - return color; - } - return {}; -} -#endif // defined(SK_ENABLE_SKVM) - // need a cheap way to invert the alpha channel of a shader (i.e. 1 - a) sk_sp SkShaderBase::makeInvertAlpha() const { return this->makeWithColorFilter(SkColorFilters::Blend(0xFFFFFFFF, SkBlendMode::kSrcOut)); } - -#if defined(SK_ENABLE_SKVM) -skvm::Coord SkShaderBase::ApplyMatrix(skvm::Builder* p, - const SkMatrix& m, - skvm::Coord coord, - skvm::Uniforms* uniforms) { - skvm::F32 x = coord.x, y = coord.y; - if (m.isIdentity()) { - // That was easy. - } else if (m.isTranslate()) { - x = p->add(x, p->uniformF(uniforms->pushF(m[2]))); - y = p->add(y, p->uniformF(uniforms->pushF(m[5]))); - } else if (m.isScaleTranslate()) { - x = p->mad(x, p->uniformF(uniforms->pushF(m[0])), p->uniformF(uniforms->pushF(m[2]))); - y = p->mad(y, p->uniformF(uniforms->pushF(m[4])), p->uniformF(uniforms->pushF(m[5]))); - } else { // Affine or perspective. - auto dot = [&, x, y](int row) { - return p->mad(x, - p->uniformF(uniforms->pushF(m[3 * row + 0])), - p->mad(y, - p->uniformF(uniforms->pushF(m[3 * row + 1])), - p->uniformF(uniforms->pushF(m[3 * row + 2])))); - }; - x = dot(0); - y = dot(1); - if (m.hasPerspective()) { - x = x * (1.0f / dot(2)); - y = y * (1.0f / dot(2)); - } - } - return {x, y}; -} -#endif // defined(SK_ENABLE_SKVM) diff --git a/src/shaders/SkShaderBase.h b/src/shaders/SkShaderBase.h index c7ecb18c4869..3e158cf79c70 100644 --- a/src/shaders/SkShaderBase.h +++ b/src/shaders/SkShaderBase.h @@ -34,31 +34,19 @@ enum class SkTileMode; struct SkDeserialProcs; struct SkStageRec; -#if defined(SK_GRAPHITE) -namespace skgpu::graphite { -class KeyContext; -class PaintParamsKeyBuilder; -class PipelineDataGatherer; -} -#endif - -#if defined(SK_ENABLE_SKVM) -#include "include/core/SkImageInfo.h" -#include "src/core/SkVM.h" -#endif - namespace SkShaders { /** * This is used to accumulate matrices, starting with the CTM, when building up - * SkRasterPipeline, SkVM, and GrFragmentProcessor by walking the SkShader tree. It avoids + * SkRasterPipeline or GrFragmentProcessor by walking the SkShader tree. It avoids * adding a matrix multiply for each individual matrix. It also handles the reverse matrix * concatenation order required by Android Framework, see b/256873449. * - * This also tracks the dubious concept of a "total matrix", which includes all the matrices - * encountered during traversal to the current shader, including ones that have already been - * applied. The total matrix represents the transformation from the current shader's coordinate - * space to device space. It is dubious because it doesn't account for SkShaders that manipulate - * the coordinates passed to their children, which may not even be representable by a matrix. + * This also tracks the dubious concept of a "total matrix", in the legacy Context/shadeSpan system. + * That includes all the matrices encountered during traversal to the current shader, including ones + * that have already been applied. The total matrix represents the transformation from the current + * shader's coordinate space to device space. It is dubious because it doesn't account for SkShaders + * that manipulate the coordinates passed to their children, which may not even be representable by + * a matrix. * * The total matrix is used for mipmap level selection and a filter downgrade optimizations in * SkImageShader and sizing of the SkImage created by SkPictureShader. If we can remove usages @@ -76,7 +64,7 @@ class MatrixRec { * Returns a new MatrixRec that represents the existing total and pending matrix * pre-concat'ed with m. */ - MatrixRec SK_WARN_UNUSED_RESULT concat(const SkMatrix& m) const; + [[nodiscard]] MatrixRec concat(const SkMatrix& m) const; /** * Appends a mul by the inverse of the pending local matrix to the pipeline. 'postInv' is an @@ -84,26 +72,14 @@ class MatrixRec { * not invertible the std::optional result won't have a value and the pipeline will be * unmodified. */ - std::optional SK_WARN_UNUSED_RESULT apply(const SkStageRec& rec, - const SkMatrix& postInv = {}) const; + [[nodiscard]] std::optional apply(const SkStageRec& rec, + const SkMatrix& postInv = {}) const; -#if defined(SK_ENABLE_SKVM) /** - * Muls local by the inverse of the pending matrix. 'postInv' is an additional matrix to - * post-apply to the inverted pending matrix. If the pending matrix is not invertible the - * std::optional result won't have a value and the Builder will be unmodified. - */ - std::optional SK_WARN_UNUSED_RESULT apply(skvm::Builder*, - skvm::Coord* local, // inout - skvm::Uniforms*, - const SkMatrix& postInv = {}) const; -#endif - - /** - * FP matrices work differently than SkRasterPipeline and SkVM. The starting coordinates - * provided to the root SkShader's FP are already in local space. So we never apply the inverse - * CTM. This returns the inverted pending local matrix with the provided postInv matrix - * applied after it. If the pending local matrix cannot be inverted, the boolean is false. + * FP matrices work differently than SkRasterPipeline. The starting coordinates provided to the + * root SkShader's FP are already in local space. So we never apply the inverse CTM. This + * returns the inverted pending local matrix with the provided postInv matrix applied after it. + * If the pending local matrix cannot be inverted, the boolean is false. */ std::tuple applyForFragmentProcessor(const SkMatrix& postInv) const; @@ -141,7 +117,7 @@ class MatrixRec { SkMatrix totalMatrix() const { return SkMatrix::Concat(fCTM, fTotalLocalMatrix); } /** Gets the inverse of totalMatrix(), if invertible. */ - bool SK_WARN_UNUSED_RESULT totalInverse(SkMatrix* out) const { + [[nodiscard]] bool totalInverse(SkMatrix* out) const { return this->totalMatrix().invert(out); } @@ -198,8 +174,7 @@ class MatrixRec { M(Picture) \ M(Runtime) \ M(Transform) \ - M(TriColor) \ - M(UpdatableColor) + M(TriColor) #define SK_ALL_GRADIENTS(M) \ M(Conical) \ @@ -290,22 +265,30 @@ class SkShaderBase : public SkShader { * ContextRec acts as a parameter bundle for creating Contexts. */ struct ContextRec { - ContextRec(const SkColor4f& paintColor, const SkMatrix& matrix, const SkMatrix* localM, - SkColorType dstColorType, SkColorSpace* dstColorSpace, SkSurfaceProps props) - : fMatrix(&matrix) - , fLocalMatrix(localM) - , fDstColorType(dstColorType) - , fDstColorSpace(dstColorSpace) - , fProps(props) { - fPaintAlpha = SkColorGetA(paintColor.toSkColor()); - } - - const SkMatrix* fMatrix; // the current matrix in the canvas - const SkMatrix* fLocalMatrix; // optional local matrix - SkColorType fDstColorType; // the color type of the dest surface - SkColorSpace* fDstColorSpace; // the color space of the dest surface (if any) - SkSurfaceProps fProps; // props of the dest surface - SkAlpha fPaintAlpha; + ContextRec(SkAlpha paintAlpha, + const SkShaders::MatrixRec& matrixRec, + SkColorType dstColorType, + SkColorSpace* dstColorSpace, + SkSurfaceProps props) + : fMatrixRec(matrixRec) + , fDstColorType(dstColorType) + , fDstColorSpace(dstColorSpace) + , fProps(props) + , fPaintAlpha(paintAlpha) {} + + static ContextRec Concat(const ContextRec& parentRec, const SkMatrix& localM) { + return {parentRec.fPaintAlpha, + parentRec.fMatrixRec.concat(localM), + parentRec.fDstColorType, + parentRec.fDstColorSpace, + parentRec.fProps}; + } + + const SkShaders::MatrixRec fMatrixRec; + SkColorType fDstColorType; // the color type of the dest surface + SkColorSpace* fDstColorSpace; // the color space of the dest surface (if any) + SkSurfaceProps fProps; // props of the dest surface + SkAlpha fPaintAlpha; bool isLegacyCompatible(SkColorSpace* shadersColorSpace) const; }; @@ -338,14 +321,10 @@ class SkShaderBase : public SkShader { uint8_t getPaintAlpha() const { return fPaintAlpha; } const SkMatrix& getTotalInverse() const { return fTotalInverse; } - const SkMatrix& getCTM() const { return fCTM; } private: - SkMatrix fCTM; SkMatrix fTotalInverse; uint8_t fPaintAlpha; - - using INHERITED = SkNoncopyable; }; /** @@ -370,8 +349,7 @@ class SkShaderBase : public SkShader { * only be called on a root-level effect. It assumes that the initial device coordinates have * not yet been seeded. */ - SK_WARN_UNUSED_RESULT - bool appendRootStages(const SkStageRec& rec, const SkMatrix& ctm) const; + [[nodiscard]] bool appendRootStages(const SkStageRec& rec, const SkMatrix& ctm) const; /** * Adds stages to implement this shader. To ensure that the correct input coords are present @@ -380,10 +358,6 @@ class SkShaderBase : public SkShader { */ virtual bool appendStages(const SkStageRec&, const SkShaders::MatrixRec&) const; - bool SK_WARN_UNUSED_RESULT computeTotalInverse(const SkMatrix& ctm, - const SkMatrix* localMatrix, - SkMatrix* totalInverse) const; - virtual SkImage* onIsAImage(SkMatrix*, SkTileMode[2]) const { return nullptr; } @@ -406,50 +380,6 @@ class SkShaderBase : public SkShader { */ virtual sk_sp makeAsALocalMatrixShader(SkMatrix* localMatrix) const; -#if defined(SK_ENABLE_SKVM) - /** - * Called at the root of a shader tree to build a VM that produces color. The device coords - * should be initialized to the centers of device space pixels being shaded and the inverse of - * ctm should be the transform of those coords to local space. - */ - SK_WARN_UNUSED_RESULT - skvm::Color rootProgram(skvm::Builder*, - skvm::Coord device, - skvm::Color paint, - const SkMatrix& ctm, - const SkColorInfo& dst, - skvm::Uniforms* uniforms, - SkArenaAlloc* alloc) const; - - /** - * Virtualized implementation of above. A note on the local coords param: it must be transformed - * by the inverse of the "pending" matrix in MatrixRec to be put in the correct space for this - * shader. This is done by calling MatrixRec::apply(). - */ - virtual skvm::Color program(skvm::Builder*, - skvm::Coord device, - skvm::Coord local, - skvm::Color paint, - const SkShaders::MatrixRec&, - const SkColorInfo& dst, - skvm::Uniforms*, - SkArenaAlloc*) const = 0; -#endif // defined(SK_ENABLE_SKVM) - -#if defined(SK_GRAPHITE) - /** - Add implementation details, for the specified backend, of this SkShader to the - provided key. - - @param keyContext backend context for key creation - @param builder builder for creating the key for this SkShader - @param gatherer if non-null, storage for this shader's data - */ - virtual void addToKey(const skgpu::graphite::KeyContext& keyContext, - skgpu::graphite::PaintParamsKeyBuilder* builder, - skgpu::graphite::PipelineDataGatherer* gatherer) const; -#endif - static SkMatrix ConcatLocalMatrices(const SkMatrix& parentLM, const SkMatrix& childLM) { #if defined(SK_BUILD_FOR_ANDROID_FRAMEWORK) // b/256873449 return SkMatrix::Concat(childLM, parentLM); @@ -476,11 +406,6 @@ class SkShaderBase : public SkShader { return false; } -protected: -#if defined(SK_ENABLE_SKVM) - static skvm::Coord ApplyMatrix(skvm::Builder*, const SkMatrix&, skvm::Coord, skvm::Uniforms*); -#endif - friend class SkShaders::MatrixRec; }; inline SkShaderBase* as_SB(SkShader* shader) { diff --git a/src/shaders/SkTransformShader.cpp b/src/shaders/SkTransformShader.cpp index 8ea3cd6620d6..8a18ccad1a79 100644 --- a/src/shaders/SkTransformShader.cpp +++ b/src/shaders/SkTransformShader.cpp @@ -12,10 +12,6 @@ #include "src/core/SkRasterPipeline.h" #include "src/core/SkRasterPipelineOpList.h" -#if defined(SK_ENABLE_SKVM) -#include "src/core/SkVM.h" -#endif - #include SkTransformShader::SkTransformShader(const SkShaderBase& shader, bool allowPerspective) @@ -23,55 +19,6 @@ SkTransformShader::SkTransformShader(const SkShaderBase& shader, bool allowPersp SkMatrix::I().get9(fMatrixStorage); } -#if defined(SK_ENABLE_SKVM) -skvm::Color SkTransformShader::program(skvm::Builder* b, - skvm::Coord device, - skvm::Coord local, - skvm::Color color, - const SkShaders::MatrixRec& mRec, - const SkColorInfo& dst, - skvm::Uniforms* uniforms, - SkArenaAlloc* alloc) const { - // We have to seed and apply any constant matrices before appending our matrix that may - // mutate. We could try to apply one matrix stage and then incorporate the parent matrix - // with the variable matrix in each call to update(). However, in practice our callers - // fold the CTM into the update() matrix and don't wrap the transform shader in local matrix - // shaders so the call to apply below should be no-op. If this assert fires it just indicates an - // optimization opportunity, not a correctness bug. - SkASSERT(!mRec.hasPendingMatrix()); - - std::optional childMRec = mRec.apply(b, &local, uniforms); - if (!childMRec.has_value()) { - return {}; - } - // The matrix we're about to insert gets updated between uses of the VM so our children can't - // know the total transform when they add their stages. We don't incorporate this shader's - // matrix into the SkShaders::MatrixRec at all. - childMRec->markTotalMatrixInvalid(); - - auto matrix = uniforms->pushPtr(&fMatrixStorage); - - skvm::F32 x = local.x, - y = local.y; - - auto dot = [&, x, y](int row) { - return b->mad(x, - b->arrayF(matrix, 3 * row + 0), - b->mad(y, b->arrayF(matrix, 3 * row + 1), b->arrayF(matrix, 3 * row + 2))); - }; - - x = dot(0); - y = dot(1); - if (fAllowPerspective) { - x = x * (1.0f / dot(2)); - y = y * (1.0f / dot(2)); - } - - skvm::Coord newLocal = {x, y}; - return fShader.program(b, device, newLocal, color, *childMRec, dst, uniforms, alloc); -} -#endif - bool SkTransformShader::update(const SkMatrix& matrix) { if (SkMatrix inv; matrix.invert(&inv)) { if (!fAllowPerspective && inv.hasPerspective()) { diff --git a/src/shaders/SkTransformShader.h b/src/shaders/SkTransformShader.h index ea08bda3681d..daeb80bf8efc 100644 --- a/src/shaders/SkTransformShader.h +++ b/src/shaders/SkTransformShader.h @@ -24,25 +24,11 @@ class SkTransformShader : public SkShaderBase { public: explicit SkTransformShader(const SkShaderBase& shader, bool allowPerspective); -#if defined(SK_ENABLE_SKVM) - // Adds instructions to use the mapping stored in the uniforms represented by fMatrix. After - // generating a new skvm::Coord, it passes the mapped coordinates to fShader's program - // along with the identity matrix. - skvm::Color program(skvm::Builder* b, - skvm::Coord device, - skvm::Coord local, - skvm::Color color, - const SkShaders::MatrixRec& mRec, - const SkColorInfo& dst, - skvm::Uniforms* uniforms, - SkArenaAlloc* alloc) const override; -#endif - // Adds a pipestage to multiply the incoming coords in 'r' and 'g' by the matrix. The child // shader is called with no pending local matrix and the total transform as unknowable. bool appendStages(const SkStageRec& rec, const SkShaders::MatrixRec&) const override; - // Change the matrix used by the generated SkRasterpipeline or SkVM. + // Change the matrix used by the generated SkRasterPipeline. bool update(const SkMatrix& matrix); ShaderType type() const override { return ShaderType::kTransform; } diff --git a/src/shaders/SkTriColorShader.cpp b/src/shaders/SkTriColorShader.cpp index 9e4e5ee44f44..c3f354ae6c9f 100644 --- a/src/shaders/SkTriColorShader.cpp +++ b/src/shaders/SkTriColorShader.cpp @@ -16,10 +16,6 @@ #include "src/core/SkRasterPipeline.h" #include "src/core/SkRasterPipelineOpList.h" -#if defined(SK_ENABLE_SKVM) -#include "src/core/SkVM.h" -#endif - bool SkTriColorShader::appendStages(const SkStageRec& rec, const SkShaders::MatrixRec&) const { rec.fPipeline->append(SkRasterPipelineOp::seed_shader); if (fUsePersp) { @@ -29,48 +25,6 @@ bool SkTriColorShader::appendStages(const SkStageRec& rec, const SkShaders::Matr return true; } -#if defined(SK_ENABLE_SKVM) -skvm::Color SkTriColorShader::program(skvm::Builder* b, - skvm::Coord device, - skvm::Coord local, - skvm::Color, - const SkShaders::MatrixRec&, - const SkColorInfo&, - skvm::Uniforms* uniforms, - SkArenaAlloc* alloc) const { - fColorMatrix = uniforms->pushPtr(&fM43); - - skvm::F32 x = local.x, y = local.y; - - if (fUsePersp) { - fCoordMatrix = uniforms->pushPtr(&fM33); - auto dot = [&, x, y](int row) { - return b->mad(x, b->arrayF(fCoordMatrix, row), - b->mad(y, b->arrayF(fCoordMatrix, row + 3), - b->arrayF(fCoordMatrix, row + 6))); - }; - - x = dot(0); - y = dot(1); - x = x * (1.0f / dot(2)); - y = y * (1.0f / dot(2)); - } - - auto colorDot = [&, x, y](int row) { - return b->mad(x, b->arrayF(fColorMatrix, row), - b->mad(y, b->arrayF(fColorMatrix, row + 4), - b->arrayF(fColorMatrix, row + 8))); - }; - - skvm::Color color; - color.r = colorDot(0); - color.g = colorDot(1); - color.b = colorDot(2); - color.a = colorDot(3); - return color; -} -#endif - bool SkTriColorShader::update(const SkMatrix& ctmInv, const SkPoint pts[], const SkPMColor4f colors[], diff --git a/src/shaders/SkTriColorShader.h b/src/shaders/SkTriColorShader.h index 38ad997898e7..68065102a836 100644 --- a/src/shaders/SkTriColorShader.h +++ b/src/shaders/SkTriColorShader.h @@ -32,17 +32,6 @@ class SkTriColorShader : public SkShaderBase { protected: bool appendStages(const SkStageRec& rec, const SkShaders::MatrixRec&) const override; -#if defined(SK_ENABLE_SKVM) - skvm::Color program(skvm::Builder*, - skvm::Coord, - skvm::Coord, - skvm::Color, - const SkShaders::MatrixRec&, - const SkColorInfo&, - skvm::Uniforms*, - SkArenaAlloc*) const override; -#endif - private: bool isOpaque() const override { return fIsOpaque; } // For serialization. This will never be called. @@ -85,10 +74,6 @@ class SkTriColorShader : public SkShaderBase { SkMatrix fM33; const bool fIsOpaque; const bool fUsePersp; // controls our stages, and what we do in update() -#if defined(SK_ENABLE_SKVM) - mutable skvm::Uniform fColorMatrix; - mutable skvm::Uniform fCoordMatrix; -#endif }; #endif diff --git a/src/shaders/gradients/SkConicalGradient.cpp b/src/shaders/gradients/SkConicalGradient.cpp index 0a71e8b5e228..e977384234c3 100644 --- a/src/shaders/gradients/SkConicalGradient.cpp +++ b/src/shaders/gradients/SkConicalGradient.cpp @@ -25,12 +25,6 @@ #include "src/shaders/SkShaderBase.h" #include "src/shaders/gradients/SkGradientBaseShader.h" -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/KeyContext.h" -#include "src/gpu/graphite/KeyHelpers.h" -#include "src/gpu/graphite/PaintParamsKey.h" -#endif - #include #include #include @@ -249,85 +243,6 @@ void SkConicalGradient::appendGradientStages(SkArenaAlloc* alloc, } } -#if defined(SK_ENABLE_SKVM) -skvm::F32 SkConicalGradient::transformT(skvm::Builder* p, - skvm::Uniforms* uniforms, - skvm::Coord coord, - skvm::I32* mask) const { - auto mag = [](skvm::F32 x, skvm::F32 y) { return sqrt(x * x + y * y); }; - - // See https://skia.org/dev/design/conical, and appendStages() above. - // There's a lot going on here, and I'm not really sure what's independent - // or disjoint, what can be reordered, simplified, etc. Tweak carefully. - - const skvm::F32 x = coord.x, y = coord.y; - if (fType == Type::kRadial) { - float denom = 1.0f / (fRadius2 - fRadius1); - float scale = std::max(fRadius1, fRadius2) * denom; - float bias = -fRadius1 * denom; - return mag(x,y) * p->uniformF(uniforms->pushF(scale)) - + p->uniformF(uniforms->pushF(bias )); - } - - if (fType == Type::kStrip) { - float r = fRadius1 / this->getCenterX1(); - skvm::F32 t = x + sqrt(p->uniformF(uniforms->pushF(r * r)) - y * y); - - *mask = (t == t); // t != NaN - return t; - } - - const skvm::F32 invR1 = p->uniformF(uniforms->pushF(1 / fFocalData.fR1)); - - skvm::F32 t; - if (fFocalData.isFocalOnCircle()) { - t = (y / x) * y + x; // (x^2 + y^2) / x ~~> x + y^2/x ~~> y/x * y + x - } else if (fFocalData.isWellBehaved()) { - t = mag(x, y) - x * invR1; - } else { - skvm::F32 k = sqrt(x * x - y * y); - if (fFocalData.isSwapped() || 1 - fFocalData.fFocalX < 0) { - k = -k; - } - t = k - x * invR1; - } - - if (!fFocalData.isWellBehaved()) { - // TODO: not sure why we consider t == 0 degenerate - *mask = (t > 0.0f); // and implicitly, t != NaN - } - - const skvm::F32 focalX = p->uniformF(uniforms->pushF(fFocalData.fFocalX)); - if (1 - fFocalData.fFocalX < 0) { - t = -t; - } - if (!fFocalData.isNativelyFocal()) { - t += focalX; - } - if (fFocalData.isSwapped()) { - t = 1.0f - t; - } - return t; -} -#endif - -#if defined(SK_GRAPHITE) -void SkConicalGradient::addToKey(const skgpu::graphite::KeyContext& keyContext, - skgpu::graphite::PaintParamsKeyBuilder* builder, - skgpu::graphite::PipelineDataGatherer* gatherer) const { - this->addToKeyCommon(keyContext, - builder, - gatherer, - GradientType::kConical, - fCenter1, - fCenter2, - fRadius1, - fRadius2, - 0.0f, - 0.0f); -} -#endif - // assumes colors is SkColor4f* and pos is SkScalar* #define EXPAND_1_COLOR(count) \ SkColor4f tmp[2]; \ diff --git a/src/shaders/gradients/SkConicalGradient.h b/src/shaders/gradients/SkConicalGradient.h index e66d61754978..3e450ab1eba0 100644 --- a/src/shaders/gradients/SkConicalGradient.h +++ b/src/shaders/gradients/SkConicalGradient.h @@ -13,12 +13,6 @@ #include "include/core/SkScalar.h" #include "src/shaders/gradients/SkGradientBaseShader.h" -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/KeyContext.h" -#include "src/gpu/graphite/KeyHelpers.h" -#include "src/gpu/graphite/PaintParamsKey.h" -#endif - class SkArenaAlloc; class SkMatrix; class SkRasterPipeline; @@ -64,11 +58,6 @@ class SkConicalGradient final : public SkGradientBaseShader { const SkMatrix* localMatrix); GradientType asGradient(GradientInfo* info, SkMatrix* localMatrix) const override; -#if defined(SK_GRAPHITE) - void addToKey(const skgpu::graphite::KeyContext&, - skgpu::graphite::PaintParamsKeyBuilder*, - skgpu::graphite::PipelineDataGatherer*) const override; -#endif bool isOpaque() const override; SkScalar getCenterX1() const { return SkPoint::Distance(fCenter1, fCenter2); } @@ -96,12 +85,6 @@ class SkConicalGradient final : public SkGradientBaseShader { void appendGradientStages(SkArenaAlloc* alloc, SkRasterPipeline* tPipeline, SkRasterPipeline* postPipeline) const override; -#if defined(SK_ENABLE_SKVM) - skvm::F32 transformT(skvm::Builder*, - skvm::Uniforms*, - skvm::Coord coord, - skvm::I32* mask) const final; -#endif private: friend void ::SkRegisterConicalGradientShaderFlattenable(); diff --git a/src/shaders/gradients/SkGradientBaseShader.cpp b/src/shaders/gradients/SkGradientBaseShader.cpp index d2db58f28967..248f6bc7c786 100644 --- a/src/shaders/gradients/SkGradientBaseShader.cpp +++ b/src/shaders/gradients/SkGradientBaseShader.cpp @@ -32,16 +32,6 @@ #include "src/core/SkReadBuffer.h" #include "src/core/SkWriteBuffer.h" -#if defined(SK_GRAPHITE) -#include "src/base/SkHalf.h" -#include "src/core/SkColorSpacePriv.h" -#include "src/gpu/graphite/KeyContext.h" -#include "src/gpu/graphite/KeyHelpers.h" -#include "src/gpu/graphite/Log.h" -#include "src/gpu/graphite/PaintParamsKey.h" -#include "src/gpu/graphite/RecorderPriv.h" -#endif - #include #include #include @@ -528,308 +518,6 @@ bool SkGradientBaseShader::appendStages(const SkStageRec& rec, return true; } -#if defined(SK_ENABLE_SKVM) -// Color conversion functions used in gradient interpolation, based on -// https://www.w3.org/TR/css-color-4/#color-conversion-code -static skvm::Color css_lab_to_xyz(skvm::Color lab) { - constexpr float k = 24389 / 27.0f; - constexpr float e = 216 / 24389.0f; - - skvm::F32 f[3]; - f[1] = (lab.r + 16) * (1 / 116.0f); - f[0] = (lab.g * (1 / 500.0f)) + f[1]; - f[2] = f[1] - (lab.b * (1 / 200.0f)); - - skvm::F32 f_cubed[3] = {f[0] * f[0] * f[0], f[1] * f[1] * f[1], f[2] * f[2] * f[2]}; - - skvm::F32 xyz[3] = {skvm::select(f_cubed[0] > e, f_cubed[0], (116 * f[0] - 16) * (1 / k)), - skvm::select(lab.r > k * e, f_cubed[1], lab.r * (1 / k)), - skvm::select(f_cubed[2] > e, f_cubed[2], (116 * f[2] - 16) * (1 / k))}; - - constexpr float D50[3] = {0.3457f / 0.3585f, 1.0f, (1.0f - 0.3457f - 0.3585f) / 0.3585f}; - return skvm::Color{xyz[0] * D50[0], xyz[1] * D50[1], xyz[2] * D50[2], lab.a}; -} - -// Skia stores all polar colors with hue in the first component, so this "LCH -> Lab" transform -// actually takes "HCL". This is also used to do the same polar transform for OkHCL to OkLAB. -static skvm::Color css_hcl_to_lab(skvm::Color hcl) { - skvm::F32 hueRadians = hcl.r * (SK_FloatPI / 180); - return skvm::Color{ - hcl.b, hcl.g * approx_cos(hueRadians), hcl.g * approx_sin(hueRadians), hcl.a}; -} - -static skvm::Color css_hcl_to_xyz(skvm::Color hcl) { return css_lab_to_xyz(css_hcl_to_lab(hcl)); } - -static skvm::Color css_oklab_to_linear_srgb(skvm::Color oklab) { - skvm::F32 l_ = oklab.r + 0.3963377774f * oklab.g + 0.2158037573f * oklab.b, - m_ = oklab.r - 0.1055613458f * oklab.g - 0.0638541728f * oklab.b, - s_ = oklab.r - 0.0894841775f * oklab.g - 1.2914855480f * oklab.b; - - skvm::F32 l = l_ * l_ * l_, m = m_ * m_ * m_, s = s_ * s_ * s_; - - return skvm::Color{+4.0767416621f * l - 3.3077115913f * m + 0.2309699292f * s, - -1.2684380046f * l + 2.6097574011f * m - 0.3413193965f * s, - -0.0041960863f * l - 0.7034186147f * m + 1.7076147010f * s, - oklab.a}; -} - -static skvm::Color css_okhcl_to_linear_srgb(skvm::Color okhcl) { - return css_oklab_to_linear_srgb(css_hcl_to_lab(okhcl)); -} - -static skvm::F32 mod_f(skvm::F32 x, float y) { return x - y * skvm::floor(x * (1 / y)); } - -static skvm::Color css_hsl_to_srgb(skvm::Color hsl) { - hsl.r = mod_f(hsl.r, 360); - hsl.r = skvm::select(hsl.r < 0, hsl.r + 360, hsl.r); - - hsl.g *= 0.01f; - hsl.b *= 0.01f; - - skvm::F32 k[3] = { - mod_f(0 + hsl.r * (1 / 30.0f), 12), - mod_f(8 + hsl.r * (1 / 30.0f), 12), - mod_f(4 + hsl.r * (1 / 30.0f), 12), - }; - skvm::F32 a = hsl.g * min(hsl.b, 1 - hsl.b); - return skvm::Color{hsl.b - a * clamp(min(k[0] - 3, 9 - k[0]), -1, 1), - hsl.b - a * clamp(min(k[1] - 3, 9 - k[1]), -1, 1), - hsl.b - a * clamp(min(k[2] - 3, 9 - k[2]), -1, 1), - hsl.a}; -} - -static skvm::Color css_hwb_to_srgb(skvm::Color hwb, skvm::Builder* p) { - hwb.g *= 0.01f; - hwb.b *= 0.01f; - - skvm::F32 gray = hwb.g / (hwb.g + hwb.b); - - skvm::Color rgb = css_hsl_to_srgb(skvm::Color{hwb.r, p->splat(100.0f), p->splat(50.0f), hwb.a}); - rgb.r = rgb.r * (1 - hwb.g - hwb.b) + hwb.g; - rgb.g = rgb.g * (1 - hwb.g - hwb.b) + hwb.g; - rgb.b = rgb.b * (1 - hwb.g - hwb.b) + hwb.g; - - skvm::I32 isGray = (hwb.g + hwb.b) >= 1; - - return skvm::Color{select(isGray, gray, rgb.r), - select(isGray, gray, rgb.g), - select(isGray, gray, rgb.b), - hwb.a}; -} - -skvm::Color SkGradientBaseShader::program(skvm::Builder* p, - skvm::Coord device, - skvm::Coord local, - skvm::Color /*paint*/, - const SkShaders::MatrixRec& mRec, - const SkColorInfo& dstInfo, - skvm::Uniforms* uniforms, - SkArenaAlloc* alloc) const { - if (!mRec.apply(p, &local, uniforms, fPtsToUnit).has_value()) { - return {}; - } - - skvm::I32 mask = p->splat(~0); - skvm::F32 t = this->transformT(p, uniforms, local, &mask); - - // Perhaps unexpectedly, clamping is handled naturally by our search, so we - // don't explicitly clamp t to [0,1]. That clamp would break hard stops - // right at 0 or 1 boundaries in kClamp mode. (kRepeat and kMirror always - // produce values in [0,1].) - switch (fTileMode) { - case SkTileMode::kClamp: - break; - - case SkTileMode::kDecal: - mask &= (t == clamp01(t)); - break; - - case SkTileMode::kRepeat: - t = fract(t); - break; - - case SkTileMode::kMirror: { - // t = | (t-1) - 2*(floor( (t-1)*0.5 )) - 1 | - // {-A-} {--------B-------} - skvm::F32 A = t - 1.0f, B = floor(A * 0.5f); - t = abs(A - (B + B) - 1.0f); - } break; - } - - // Transform our colors as we want them interpolated, in dst color space, possibly premul. - SkColor4fXformer xformedColors(this, dstInfo.colorSpace()); - const SkPMColor4f* rgba = xformedColors.fColors.begin(); - - // Transform our colors into a scale factor f and bias b such that for - // any t between stops i and i+1, the color we want is mad(t, f[i], b[i]). - using F4 = skvx::Vec<4, float>; - struct FB { - F4 f, b; - }; - skvm::Color color; - - auto uniformF = [&](float x) { return p->uniformF(uniforms->pushF(x)); }; - - if (fColorCount == 2) { - // 2-stop gradients have colors at 0 and 1, and so must be evenly spaced. - SkASSERT(fPositions == nullptr); - - // With 2 stops, we upload the single FB as uniforms and interpolate directly with t. - F4 lo = F4::Load(rgba + 0), hi = F4::Load(rgba + 1); - F4 F = hi - lo, B = lo; - - auto T = clamp01(t); - color = { - T * uniformF(F[0]) + uniformF(B[0]), - T * uniformF(F[1]) + uniformF(B[1]), - T * uniformF(F[2]) + uniformF(B[2]), - T * uniformF(F[3]) + uniformF(B[3]), - }; - } else { - // To handle clamps in search we add a conceptual stop at t=-inf, so we - // may need up to fColorCount+1 FBs and fColorCount t stops between them: - // - // FBs: [color 0] [color 0->1] [color 1->2] [color 2->3] ... - // stops: (-inf) t0 t1 t2 ... - // - // Both these arrays could end up shorter if any hard stops share the same t. - FB* fb = alloc->makeArrayDefault(fColorCount + 1); - std::vector stops; // TODO: SkSTArray? - stops.reserve(fColorCount); - - // Here's our conceptual stop at t=-inf covering all t<=0, clamping to our first color. - float t_lo = this->getPos(0); - F4 color_lo = F4::Load(rgba); - fb[0] = {0.0f, color_lo}; - // N.B. No stops[] entry for this implicit -inf. - - // Now the non-edge cases, calculating scale and bias between adjacent normal stops. - for (int i = 1; i < fColorCount; i++) { - float t_hi = this->getPos(i); - F4 color_hi = F4::Load(rgba + i); - - // If t_lo == t_hi, we're on a hard stop, and transition immediately to the next color. - SkASSERT(t_lo <= t_hi); - if (t_lo < t_hi) { - F4 f = (color_hi - color_lo) / (t_hi - t_lo), b = color_lo - f * t_lo; - stops.push_back(t_lo); - fb[stops.size()] = {f, b}; - } - - t_lo = t_hi; - color_lo = color_hi; - } - // Anything >= our final t clamps to our final color. - stops.push_back(t_lo); - fb[stops.size()] = {0.0f, color_lo}; - - // We'll gather FBs from that array we just created. - skvm::Uniform fbs = uniforms->pushPtr(fb); - - // Find the two stops we need to interpolate. - skvm::I32 ix; - if (fPositions == nullptr) { - // Evenly spaced stops... we can calculate ix directly. - ix = trunc(clamp(t * uniformF(stops.size() - 1) + 1.0f, 0.0f, uniformF(stops.size()))); - } else { - // Starting ix at 0 bakes in our conceptual first stop at -inf. - // TODO: good place to experiment with a loop in skvm.... stops.size() can be huge. - ix = p->splat(0); - for (float stop : stops) { - // ix += (t >= stop) ? +1 : 0 ~~> - // ix -= (t >= stop) ? -1 : 0 - ix -= (t >= uniformF(stop)); - } - // TODO: we could skip any of the default stops GradientShaderBase's ctor added - // to ensure the full [0,1] span is covered. This linear search doesn't need - // them for correctness, and it'd be up to two fewer stops to check. - // N.B. we do still need those stops for the fPositions == nullptr direct math path. - } - - // A scale factor and bias for each lane, 8 total. - // TODO: simpler, faster, tidier to push 8 uniform pointers, one for each struct lane? - ix = shl(ix, 3); - skvm::F32 Fr = gatherF(fbs, ix + 0); - skvm::F32 Fg = gatherF(fbs, ix + 1); - skvm::F32 Fb = gatherF(fbs, ix + 2); - skvm::F32 Fa = gatherF(fbs, ix + 3); - - skvm::F32 Br = gatherF(fbs, ix + 4); - skvm::F32 Bg = gatherF(fbs, ix + 5); - skvm::F32 Bb = gatherF(fbs, ix + 6); - skvm::F32 Ba = gatherF(fbs, ix + 7); - - // This is what we've been building towards! - color = { - t * Fr + Br, - t * Fg + Bg, - t * Fb + Bb, - t * Fa + Ba, - }; - } - - using ColorSpace = Interpolation::ColorSpace; - bool colorIsPremul = this->interpolateInPremul(); - - // If we interpolated premul colors in any of the special color spaces, we need to unpremul - if (colorIsPremul) { - switch (fInterpolation.fColorSpace) { - case ColorSpace::kLab: - case ColorSpace::kOKLab: - color = unpremul(color); - colorIsPremul = false; - break; - case ColorSpace::kLCH: - case ColorSpace::kOKLCH: - case ColorSpace::kHSL: - case ColorSpace::kHWB: { - // Avoid unpremuling hue - skvm::F32 hue = color.r; - color = unpremul(color); - color.r = hue; - colorIsPremul = false; - } break; - default: - break; - } - } - - // Convert colors in exotic spaces back to their intermediate SkColorSpace - switch (fInterpolation.fColorSpace) { - case ColorSpace::kLab: color = css_lab_to_xyz(color); break; - case ColorSpace::kOKLab: color = css_oklab_to_linear_srgb(color); break; - case ColorSpace::kLCH: color = css_hcl_to_xyz(color); break; - case ColorSpace::kOKLCH: color = css_okhcl_to_linear_srgb(color); break; - case ColorSpace::kHSL: color = css_hsl_to_srgb(color); break; - case ColorSpace::kHWB: color = css_hwb_to_srgb(color, p); break; - default: break; - } - - // Now transform from intermediate to destination color space. - // See comments in GrGradientShader.cpp about the decisions here. - SkColorSpace* dstColorSpace = dstInfo.colorSpace() ? dstInfo.colorSpace() : sk_srgb_singleton(); - SkAlphaType intermediateAlphaType = colorIsPremul ? kPremul_SkAlphaType : kUnpremul_SkAlphaType; - SkAlphaType dstAlphaType = dstInfo.alphaType(); - - if (fColorsAreOpaque) { - intermediateAlphaType = dstAlphaType = kUnpremul_SkAlphaType; - } - - color = SkColorSpaceXformSteps{xformedColors.fIntermediateColorSpace.get(), - intermediateAlphaType, - dstColorSpace, - dstAlphaType} - .program(p, uniforms, color); - - return { - pun_to_F32(mask & pun_to_I32(color.r)), - pun_to_F32(mask & pun_to_I32(color.g)), - pun_to_F32(mask & pun_to_I32(color.b)), - pun_to_F32(mask & pun_to_I32(color.a)), - }; -} -#endif // defined(SK_ENABLE_SKVM) - bool SkGradientBaseShader::isOpaque() const { return fColorsAreOpaque && (this->getTileMode() != SkTileMode::kDecal); } @@ -1294,166 +982,3 @@ SkGradientBaseShader::ColorStopOptimizer::ColorStopOptimizer(const SkColor4f* co } } } - -#if defined(SK_GRAPHITE) - -namespace { - -// Please see GrGradientShader.cpp::make_interpolated_to_dst for substantial comments -// as to why this code is structured this way. -void make_interpolated_to_dst(const skgpu::graphite::KeyContext& keyContext, - skgpu::graphite::PaintParamsKeyBuilder* builder, - skgpu::graphite::PipelineDataGatherer* gatherer, - const skgpu::graphite::GradientShaderBlocks::GradientData& gradData, - const SkGradientShader::Interpolation& interp, - SkColorSpace* intermediateCS) { - using ColorSpace = SkGradientShader::Interpolation::ColorSpace; - using namespace skgpu::graphite; - - bool inputPremul = static_cast(interp.fInPremul); - - switch (interp.fColorSpace) { - case ColorSpace::kLab: - case ColorSpace::kOKLab: - case ColorSpace::kLCH: - case ColorSpace::kOKLCH: - case ColorSpace::kHSL: - case ColorSpace::kHWB: - inputPremul = false; - break; - default: - break; - } - - const SkColorInfo& dstColorInfo = keyContext.dstColorInfo(); - - SkColorSpace* dstColorSpace = - dstColorInfo.colorSpace() ? dstColorInfo.colorSpace() : sk_srgb_singleton(); - - SkAlphaType intermediateAlphaType = inputPremul ? kPremul_SkAlphaType : kUnpremul_SkAlphaType; - - ColorSpaceTransformBlock::ColorSpaceTransformData data( - intermediateCS, intermediateAlphaType, dstColorSpace, dstColorInfo.alphaType()); - - // The gradient block and colorSpace conversion block need to be combined together - // (via the colorFilterShader block) so that the localMatrix block can treat them as - // one child. - ColorFilterShaderBlock::BeginBlock(keyContext, builder, gatherer); - - GradientShaderBlocks::BeginBlock(keyContext, builder, gatherer, gradData); - builder->endBlock(); - - ColorSpaceTransformBlock::BeginBlock(keyContext, builder, gatherer, &data); - builder->endBlock(); - - builder->endBlock(); -} - -SkBitmap create_color_and_offset_bitmap(int numStops, - const SkPMColor4f* colors, - const float* offsets) { - SkBitmap colorsAndOffsetsBitmap; - - colorsAndOffsetsBitmap.allocPixels( - SkImageInfo::Make(numStops, 2, kRGBA_F16_SkColorType, kPremul_SkAlphaType)); - - for (int i = 0; i < numStops; i++) { - // TODO: there should be a way to directly set a premul pixel in a bitmap with - // a premul color. - SkColor4f unpremulColor = colors[i].unpremul(); - colorsAndOffsetsBitmap.erase(unpremulColor, SkIRect::MakeXYWH(i, 0, 1, 1)); - - float offset = offsets ? offsets[i] : SkIntToFloat(i) / (numStops - 1); - SkASSERT(offset >= 0.0f && offset <= 1.0f); - - int exponent; - float mantissa = frexp(offset, &exponent); - - SkHalf halfE = SkFloatToHalf(exponent); - if ((int)SkHalfToFloat(halfE) != exponent) { - SKGPU_LOG_W("Encoding gradient to f16 failed"); - return {}; - } - -#if defined(SK_DEBUG) - SkHalf halfM = SkFloatToHalf(mantissa); - - float restored = ldexp(SkHalfToFloat(halfM), (int)SkHalfToFloat(halfE)); - float error = abs(restored - offset); - SkASSERT(error < 0.001f); -#endif - - // TODO: we're only using 2 of the f16s here. The encoding could be altered to better - // preserve precision. This encoding yields < 0.001f error for 2^20 evenly spaced stops. - colorsAndOffsetsBitmap.erase(SkColor4f{mantissa, (float)exponent, 0, 1}, - SkIRect::MakeXYWH(i, 1, 1, 1)); - } - - return colorsAndOffsetsBitmap; -} - -} // anonymous namespace - -void SkGradientBaseShader::addToKeyCommon(const skgpu::graphite::KeyContext& keyContext, - skgpu::graphite::PaintParamsKeyBuilder* builder, - skgpu::graphite::PipelineDataGatherer* gatherer, - GradientType type, - SkPoint point0, - SkPoint point1, - float radius0, - float radius1, - float bias, - float scale) const { - using namespace skgpu::graphite; - - SkColor4fXformer xformedColors(this, keyContext.dstColorInfo().colorSpace()); - const SkPMColor4f* colors = xformedColors.fColors.begin(); - - sk_sp proxy; - - if (fColorCount > GradientShaderBlocks::GradientData::kNumInternalStorageStops) { - if (fColorsAndOffsetsBitmap.empty()) { - fColorsAndOffsetsBitmap = - create_color_and_offset_bitmap(fColorCount, colors, fPositions); - if (fColorsAndOffsetsBitmap.empty()) { - SKGPU_LOG_W("Couldn't create GradientShader's color and offset bitmap"); - - SolidColorShaderBlock::BeginBlock(keyContext, builder, gatherer, {1, 0, 0, 1}); - builder->endBlock(); - return; - } - } - - proxy = RecorderPriv::CreateCachedProxy(keyContext.recorder(), fColorsAndOffsetsBitmap); - if (!proxy) { - SKGPU_LOG_W("Couldn't create GradientShader's color and offset bitmap proxy"); - - SolidColorShaderBlock::BeginBlock(keyContext, builder, gatherer, {1, 0, 0, 1}); - builder->endBlock(); - return; - } - } - - GradientShaderBlocks::GradientData data(type, - point0, - point1, - radius0, - radius1, - bias, - scale, - fTileMode, - fColorCount, - colors, - fPositions, - std::move(proxy), - fInterpolation); - - make_interpolated_to_dst(keyContext, - builder, - gatherer, - data, - fInterpolation, - xformedColors.fIntermediateColorSpace.get()); -} - -#endif // defined(SK_GRAPHITE) diff --git a/src/shaders/gradients/SkGradientBaseShader.h b/src/shaders/gradients/SkGradientBaseShader.h index cfc24f73476c..818d4419adf9 100644 --- a/src/shaders/gradients/SkGradientBaseShader.h +++ b/src/shaders/gradients/SkGradientBaseShader.h @@ -8,6 +8,7 @@ #ifndef SkGradientShaderPriv_DEFINED #define SkGradientShaderPriv_DEFINED +#include "include/core/SkBitmap.h" #include "include/core/SkColor.h" #include "include/core/SkColorSpace.h" #include "include/core/SkMatrix.h" @@ -20,10 +21,6 @@ #include "include/private/base/SkTemplates.h" #include "src/shaders/SkShaderBase.h" -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/KeyHelpers.h" -#endif - #include #include @@ -81,6 +78,9 @@ class SkGradientBaseShader : public SkShaderBase { } const SkMatrix& getGradientMatrix() const { return fPtsToUnit; } + int getColorCount() const { return fColorCount; } + const float* getPositions() const { return fPositions; } + const Interpolation& getInterpolation() const { return fInterpolation; } static bool ValidGradient(const SkColor4f colors[], int count, @@ -117,49 +117,13 @@ class SkGradientBaseShader : public SkShaderBase { bool appendStages(const SkStageRec&, const SkShaders::MatrixRec&) const override; -#if defined(SK_ENABLE_SKVM) - skvm::Color program(skvm::Builder*, - skvm::Coord device, - skvm::Coord local, - skvm::Color paint, - const SkShaders::MatrixRec&, - const SkColorInfo& dstCS, - skvm::Uniforms* uniforms, - SkArenaAlloc* alloc) const override; -#endif - virtual void appendGradientStages(SkArenaAlloc* alloc, SkRasterPipeline* tPipeline, SkRasterPipeline* postPipeline) const = 0; -#if defined(SK_ENABLE_SKVM) - // Produce t from (x,y), modifying mask if it should be anything other than ~0. - virtual skvm::F32 transformT(skvm::Builder*, - skvm::Uniforms*, - skvm::Coord coord, - skvm::I32* mask) const = 0; -#endif const SkMatrix fPtsToUnit; SkTileMode fTileMode; -#if defined(SK_GRAPHITE) - // When the number of stops exceeds Graphite's uniform-based limit the colors and offsets - // are stored in this bitmap. It is stored in the shader so it can be cached with a stable - // id and easily regenerated if purged. - mutable SkBitmap fColorsAndOffsetsBitmap; - - void addToKeyCommon(const skgpu::graphite::KeyContext&, - skgpu::graphite::PaintParamsKeyBuilder*, - skgpu::graphite::PipelineDataGatherer*, - GradientType, - SkPoint point0, - SkPoint point1, - float radius0, - float radius1, - float bias, - float scale) const; -#endif - public: static void AppendGradientFillStages(SkRasterPipeline* p, SkArenaAlloc* alloc, @@ -196,7 +160,16 @@ class SkGradientBaseShader : public SkShaderBase { SkTileMode getTileMode() const { return fTileMode; } + const SkBitmap& cachedBitmap() const { return fColorsAndOffsetsBitmap; } + void setCachedBitmap(SkBitmap b) const { fColorsAndOffsetsBitmap = b; } + private: + // When the number of stops exceeds Graphite's uniform-based limit the colors and offsets + // are stored in this bitmap. It is stored in the shader so it can be cached with a stable + // id and easily regenerated if purged. + // TODO(b/293160919) remove this field when we can store bitmaps in the cache by id. + mutable SkBitmap fColorsAndOffsetsBitmap; + // Reserve inline space for up to 4 stops. inline static constexpr size_t kInlineStopCount = 4; inline static constexpr size_t kInlineStorageSize = diff --git a/src/shaders/gradients/SkLinearGradient.cpp b/src/shaders/gradients/SkLinearGradient.cpp index 079e597ba1e9..d22e2ff7f82e 100644 --- a/src/shaders/gradients/SkLinearGradient.cpp +++ b/src/shaders/gradients/SkLinearGradient.cpp @@ -20,12 +20,6 @@ #include "src/shaders/SkLocalMatrixShader.h" #include "src/shaders/SkShaderBase.h" -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/KeyContext.h" -#include "src/gpu/graphite/KeyHelpers.h" -#include "src/gpu/graphite/PaintParamsKey.h" -#endif - #include #include @@ -81,14 +75,6 @@ void SkLinearGradient::appendGradientStages(SkArenaAlloc*, SkRasterPipeline*, // No extra stage needed for linear gradients. } -#if defined(SK_ENABLE_SKVM) -skvm::F32 SkLinearGradient::transformT(skvm::Builder* p, skvm::Uniforms*, - skvm::Coord coord, skvm::I32* mask) const { - // We've baked getting t in x into the matrix, so this is pretty trivial. - return coord.x; -} -#endif - SkShaderBase::GradientType SkLinearGradient::asGradient(GradientInfo* info, SkMatrix* localMatrix) const { if (info) { @@ -102,18 +88,6 @@ SkShaderBase::GradientType SkLinearGradient::asGradient(GradientInfo* info, return GradientType::kLinear; } -#if defined(SK_GRAPHITE) -void SkLinearGradient::addToKey(const skgpu::graphite::KeyContext& keyContext, - skgpu::graphite::PaintParamsKeyBuilder* builder, - skgpu::graphite::PipelineDataGatherer* gatherer) const { - this->addToKeyCommon(keyContext, builder, gatherer, - GradientType::kLinear, - fStart, fEnd, - 0.0f, 0.0f, - 0.0f, 0.0f); -} -#endif - sk_sp SkGradientShader::MakeLinear(const SkPoint pts[2], const SkColor4f colors[], sk_sp colorSpace, diff --git a/src/shaders/gradients/SkLinearGradient.h b/src/shaders/gradients/SkLinearGradient.h index 572ebf10af0d..9a48a43ce7c1 100644 --- a/src/shaders/gradients/SkLinearGradient.h +++ b/src/shaders/gradients/SkLinearGradient.h @@ -23,22 +23,15 @@ class SkLinearGradient final : public SkGradientBaseShader { SkLinearGradient(const SkPoint pts[2], const Descriptor&); GradientType asGradient(GradientInfo* info, SkMatrix* localMatrix) const override; -#if defined(SK_GRAPHITE) - void addToKey(const skgpu::graphite::KeyContext&, - skgpu::graphite::PaintParamsKeyBuilder*, - skgpu::graphite::PipelineDataGatherer*) const override; -#endif + const SkPoint& start() const { return fStart; } + const SkPoint& end() const { return fEnd; } protected: SkLinearGradient(SkReadBuffer& buffer); void flatten(SkWriteBuffer& buffer) const override; void appendGradientStages(SkArenaAlloc* alloc, SkRasterPipeline* tPipeline, SkRasterPipeline* postPipeline) const final; -#if defined(SK_ENABLE_SKVM) - skvm::F32 transformT(skvm::Builder*, skvm::Uniforms*, - skvm::Coord coord, skvm::I32* mask) const final; -#endif private: friend void ::SkRegisterLinearGradientShaderFlattenable(); diff --git a/src/shaders/gradients/SkRadialGradient.cpp b/src/shaders/gradients/SkRadialGradient.cpp index c72f3678b915..49ffec948d01 100644 --- a/src/shaders/gradients/SkRadialGradient.cpp +++ b/src/shaders/gradients/SkRadialGradient.cpp @@ -21,12 +21,6 @@ #include "src/shaders/SkShaderBase.h" #include "src/shaders/gradients/SkGradientBaseShader.h" -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/KeyContext.h" -#include "src/gpu/graphite/KeyHelpers.h" -#include "src/gpu/graphite/PaintParamsKey.h" -#endif - #include #include @@ -90,25 +84,6 @@ void SkRadialGradient::appendGradientStages(SkArenaAlloc*, SkRasterPipeline* p, p->append(SkRasterPipelineOp::xy_to_radius); } -#if defined(SK_ENABLE_SKVM) -skvm::F32 SkRadialGradient::transformT(skvm::Builder* p, skvm::Uniforms*, - skvm::Coord coord, skvm::I32* mask) const { - return sqrt(coord.x*coord.x + coord.y*coord.y); -} -#endif - -#if defined(SK_GRAPHITE) -void SkRadialGradient::addToKey(const skgpu::graphite::KeyContext& keyContext, - skgpu::graphite::PaintParamsKeyBuilder* builder, - skgpu::graphite::PipelineDataGatherer* gatherer) const { - this->addToKeyCommon(keyContext, builder, gatherer, - GradientType::kRadial, - fCenter, { 0.0f, 0.0f }, - fRadius, 0.0f, - 0.0f, 0.0f); -} -#endif - sk_sp SkGradientShader::MakeRadial(const SkPoint& center, SkScalar radius, const SkColor4f colors[], sk_sp colorSpace, diff --git a/src/shaders/gradients/SkRadialGradient.h b/src/shaders/gradients/SkRadialGradient.h index 0f882d1aec1b..49f77f2ac102 100644 --- a/src/shaders/gradients/SkRadialGradient.h +++ b/src/shaders/gradients/SkRadialGradient.h @@ -12,12 +12,6 @@ #include "include/core/SkScalar.h" #include "src/shaders/gradients/SkGradientBaseShader.h" -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/KeyContext.h" -#include "src/gpu/graphite/KeyHelpers.h" -#include "src/gpu/graphite/PaintParamsKey.h" -#endif - class SkArenaAlloc; class SkMatrix; class SkRasterPipeline; @@ -29,11 +23,9 @@ class SkRadialGradient final : public SkGradientBaseShader { SkRadialGradient(const SkPoint& center, SkScalar radius, const Descriptor&); GradientType asGradient(GradientInfo* info, SkMatrix* matrix) const override; -#if defined(SK_GRAPHITE) - void addToKey(const skgpu::graphite::KeyContext&, - skgpu::graphite::PaintParamsKeyBuilder*, - skgpu::graphite::PipelineDataGatherer*) const override; -#endif + + const SkPoint& center() const { return fCenter; } + SkScalar radius() const { return fRadius; } protected: SkRadialGradient(SkReadBuffer& buffer); void flatten(SkWriteBuffer& buffer) const override; @@ -41,13 +33,6 @@ class SkRadialGradient final : public SkGradientBaseShader { void appendGradientStages(SkArenaAlloc* alloc, SkRasterPipeline* tPipeline, SkRasterPipeline* postPipeline) const override; -#if defined(SK_ENABLE_SKVM) - skvm::F32 transformT(skvm::Builder*, - skvm::Uniforms*, - skvm::Coord coord, - skvm::I32* mask) const final; -#endif - private: friend void ::SkRegisterRadialGradientShaderFlattenable(); SK_FLATTENABLE_HOOKS(SkRadialGradient) diff --git a/src/shaders/gradients/SkSweepGradient.cpp b/src/shaders/gradients/SkSweepGradient.cpp index ce5af4aa3698..926ec8934931 100644 --- a/src/shaders/gradients/SkSweepGradient.cpp +++ b/src/shaders/gradients/SkSweepGradient.cpp @@ -25,12 +25,6 @@ #include "src/shaders/SkShaderBase.h" #include "src/shaders/gradients/SkGradientBaseShader.h" -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/KeyContext.h" -#include "src/gpu/graphite/KeyHelpers.h" -#include "src/gpu/graphite/PaintParamsKey.h" -#endif - #include #include #include @@ -101,49 +95,6 @@ void SkSweepGradient::appendGradientStages(SkArenaAlloc* alloc, SkRasterPipeline p->append_matrix(alloc, SkMatrix::Scale(fTScale, 1) * SkMatrix::Translate(fTBias, 0)); } -#if defined(SK_ENABLE_SKVM) -skvm::F32 SkSweepGradient::transformT(skvm::Builder* p, skvm::Uniforms* uniforms, - skvm::Coord coord, skvm::I32* mask) const { - skvm::F32 xabs = abs(coord.x), - yabs = abs(coord.y), - slope = min(xabs, yabs) / max(xabs, yabs); - skvm::F32 s = slope * slope; - - // Use a 7th degree polynomial to approximate atan. - // This was generated using sollya.gforge.inria.fr. - // A float optimized polynomial was generated using the following command. - // P1 = fpminimax((1/(2*Pi))*atan(x),[|1,3,5,7|],[|24...|],[2^(-40),1],relative); - skvm::F32 phi = slope * poly(s, -7.0547382347285747528076171875e-3f, - +2.476101927459239959716796875e-2f, - -5.185396969318389892578125e-2f, - +0.15912117063999176025390625f); - phi = select( xabs < yabs, (1/4.0f) - phi, phi); - phi = select(coord.x < 0.0f, (1/2.0f) - phi, phi); - phi = select(coord.y < 0.0f, (1/1.0f) - phi, phi); - - skvm::F32 t = select(is_NaN(phi), p->splat(0.0f) - , phi); - - if (fTScale != 1.0f || fTBias != 0.0f) { - t = t * p->uniformF(uniforms->pushF(fTScale)) - + p->uniformF(uniforms->pushF(fTScale*fTBias)); - } - return t; -} -#endif - -#if defined(SK_GRAPHITE) -void SkSweepGradient::addToKey(const skgpu::graphite::KeyContext& keyContext, - skgpu::graphite::PaintParamsKeyBuilder* builder, - skgpu::graphite::PipelineDataGatherer* gatherer) const { - this->addToKeyCommon(keyContext, builder, gatherer, - GradientType::kSweep, - fCenter, { 0.0f, 0.0f }, - 0.0, 0.0f, - fTBias, fTScale); -} -#endif - sk_sp SkGradientShader::MakeSweep(SkScalar cx, SkScalar cy, const SkColor4f colors[], sk_sp colorSpace, diff --git a/src/shaders/gradients/SkSweepGradient.h b/src/shaders/gradients/SkSweepGradient.h index 997435c55c37..7773903188c8 100644 --- a/src/shaders/gradients/SkSweepGradient.h +++ b/src/shaders/gradients/SkSweepGradient.h @@ -12,12 +12,6 @@ #include "include/core/SkScalar.h" #include "src/shaders/gradients/SkGradientBaseShader.h" -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/KeyContext.h" -#include "src/gpu/graphite/KeyHelpers.h" -#include "src/gpu/graphite/PaintParamsKey.h" -#endif - class SkArenaAlloc; class SkMatrix; class SkRasterPipeline; @@ -30,12 +24,7 @@ class SkSweepGradient final : public SkGradientBaseShader { GradientType asGradient(GradientInfo* info, SkMatrix* localMatrix) const override; -#if defined(SK_GRAPHITE) - void addToKey(const skgpu::graphite::KeyContext&, - skgpu::graphite::PaintParamsKeyBuilder*, - skgpu::graphite::PipelineDataGatherer*) const override; -#endif - + const SkPoint& center() const { return fCenter; } SkScalar tBias() const { return fTBias; } SkScalar tScale() const { return fTScale; } @@ -45,12 +34,6 @@ class SkSweepGradient final : public SkGradientBaseShader { void appendGradientStages(SkArenaAlloc* alloc, SkRasterPipeline* tPipeline, SkRasterPipeline* postPipeline) const override; -#if defined(SK_ENABLE_SKVM) - skvm::F32 transformT(skvm::Builder*, - skvm::Uniforms*, - skvm::Coord coord, - skvm::I32* mask) const final; -#endif private: friend void ::SkRegisterSweepGradientShaderFlattenable(); diff --git a/src/sksl/BUILD.bazel b/src/sksl/BUILD.bazel index 192f4607bf32..4d160bfe9fa5 100644 --- a/src/sksl/BUILD.bazel +++ b/src/sksl/BUILD.bazel @@ -70,7 +70,6 @@ CORE_SRCS = [ "SkSLMangler.h", "SkSLMemoryLayout.h", "SkSLMemoryPool.h", - "SkSLModifiersPool.h", "SkSLModuleLoader.cpp", "SkSLModuleLoader.h", "SkSLOperator.cpp", @@ -111,7 +110,7 @@ skia_filegroup( selects.config_setting_group( name = "needs_sksl", match_any = [ - "//src/gpu:has_gpu_backend", + "//src/gpu:has_ganesh_backend", ":enable_sksl_true", ], visibility = ["//:__subpackages__"], @@ -120,7 +119,7 @@ selects.config_setting_group( selects.config_setting_group( name = "use_sksl_gpu_srcs", match_any = [ - "//src/gpu:has_gpu_backend", + "//src/gpu:has_ganesh_backend", ":enable_skslc_true", ], visibility = ["//:__subpackages__"], @@ -147,7 +146,6 @@ skia_filegroup( ":core_srcs", "//src/sksl/analysis:srcs", "//src/sksl/codegen:srcs", - "//src/sksl/dsl:srcs", "//src/sksl/ir:srcs", "//src/sksl/tracing:srcs", "//src/sksl/transform:srcs", diff --git a/src/sksl/SkSLAnalysis.cpp b/src/sksl/SkSLAnalysis.cpp index 3491356dde37..6bec32612937 100644 --- a/src/sksl/SkSLAnalysis.cpp +++ b/src/sksl/SkSLAnalysis.cpp @@ -12,6 +12,7 @@ #include "include/private/SkSLDefines.h" #include "include/private/SkSLSampleUsage.h" #include "include/private/base/SkTArray.h" +#include "src/base/SkEnumBitMask.h" #include "src/core/SkTHash.h" #include "src/sksl/SkSLBuiltinTypes.h" #include "src/sksl/SkSLCompiler.h" @@ -39,7 +40,7 @@ #include "src/sksl/ir/SkSLIfStatement.h" #include "src/sksl/ir/SkSLIndexExpression.h" #include "src/sksl/ir/SkSLLayout.h" -#include "src/sksl/ir/SkSLModifiers.h" +#include "src/sksl/ir/SkSLModifierFlags.h" #include "src/sksl/ir/SkSLPostfixExpression.h" #include "src/sksl/ir/SkSLPrefixExpression.h" #include "src/sksl/ir/SkSLProgram.h" @@ -83,10 +84,18 @@ class MergeSampleUsageVisitor : public ProgramVisitor { protected: const Context& fContext; const Variable& fChild; + const Variable* fMainCoordsParam = nullptr; const bool fWritesToSampleCoords; SampleUsage fUsage; int fElidedSampleCoordCount = 0; + bool visitProgramElement(const ProgramElement& pe) override { + fMainCoordsParam = pe.is() + ? pe.as().declaration().getMainCoordsParameter() + : nullptr; + return INHERITED::visitProgramElement(pe); + } + bool visitExpression(const Expression& e) override { // Looking for child(...) if (e.is() && &e.as().child() == &fChild) { @@ -100,8 +109,7 @@ class MergeSampleUsageVisitor : public ProgramVisitor { // coords are never modified, we can conservatively turn this into PassThrough // sampling. In all other cases, we consider it Explicit. if (!fWritesToSampleCoords && maybeCoords->is() && - maybeCoords->as().variable()->modifiers().fLayout.fBuiltin == - SK_MAIN_COORDS_BUILTIN) { + maybeCoords->as().variable() == fMainCoordsParam) { fUsage.merge(SampleUsage::PassThrough()); ++fElidedSampleCoordCount; } else { @@ -250,11 +258,11 @@ class IsAssignableVisitor { return fieldAccess ? fieldAccess->description(OperatorPrecedence::kExpression) : std::string(var->name()); }; - if (var->modifiers().fFlags & (Modifiers::kConst_Flag | Modifiers::kUniform_Flag)) { + if (var->modifierFlags().isConst() || var->modifierFlags().isUniform()) { fErrors->error(expr.fPosition, "cannot modify immutable variable '" + fieldName() + "'"); } else if (var->storage() == Variable::Storage::kGlobal && - (var->modifiers().fFlags & Modifiers::kIn_Flag)) { + (var->modifierFlags() & ModifierFlag::kIn)) { fErrors->error(expr.fPosition, "cannot modify pipeline input variable '" + fieldName() + "'"); } else { @@ -328,7 +336,7 @@ SampleUsage Analysis::GetSampleUsage(const Program& program, bool Analysis::ReferencesBuiltin(const Program& program, int builtin) { SkASSERT(program.fUsage); for (const auto& [variable, counts] : program.fUsage->fVariableCounts) { - if (counts.fRead > 0 && variable->modifiers().fLayout.fBuiltin == builtin) { + if (counts.fRead > 0 && variable->layout().fBuiltin == builtin) { return true; } } @@ -336,7 +344,21 @@ bool Analysis::ReferencesBuiltin(const Program& program, int builtin) { } bool Analysis::ReferencesSampleCoords(const Program& program) { - return Analysis::ReferencesBuiltin(program, SK_MAIN_COORDS_BUILTIN); + // Look for main(). + for (const std::unique_ptr& pe : program.fOwnedElements) { + if (pe->is()) { + const FunctionDeclaration& func = pe->as().declaration(); + if (func.isMain()) { + // See if main() has a coords parameter that is read from anywhere. + if (const Variable* coords = func.getMainCoordsParameter()) { + ProgramUsage::VariableCounts counts = program.fUsage->get(*coords); + return counts.fRead > 0; + } + } + } + } + // The program is missing a main(). + return false; } bool Analysis::ReferencesFragCoords(const Program& program) { @@ -517,6 +539,7 @@ bool ProgramVisitor::visit(const Program& program) { template bool TProgramVisitor::visitExpression(typename T::Expression& e) { switch (e.kind()) { + case Expression::Kind::kEmpty: case Expression::Kind::kFunctionReference: case Expression::Kind::kLiteral: case Expression::Kind::kMethodReference: diff --git a/src/sksl/SkSLAnalysis.h b/src/sksl/SkSLAnalysis.h index 559fb8cf5357..b7fec4bc3609 100644 --- a/src/sksl/SkSLAnalysis.h +++ b/src/sksl/SkSLAnalysis.h @@ -41,11 +41,10 @@ struct Program; namespace Analysis { /** - * Determines how `program` samples `child`. By default, assumes that the sample coords - * (SK_MAIN_COORDS_BUILTIN) might be modified, so `child.eval(sampleCoords)` is treated as - * Explicit. If writesToSampleCoords is false, treats that as PassThrough, instead. - * If elidedSampleCoordCount is provided, the pointed to value will be incremented by the - * number of sample calls where the above rewrite was performed. + * Determines how `program` samples `child`. By default, assumes that the sample coords might be + * modified, so `child.eval(sampleCoords)` is treated as Explicit. If writesToSampleCoords is false, + * treats that as PassThrough, instead. If elidedSampleCoordCount is provided, the pointed to value + * will be incremented by the number of sample calls where the above rewrite was performed. */ SampleUsage GetSampleUsage(const Program& program, const Variable& child, @@ -77,9 +76,7 @@ bool ReturnsInputAlpha(const FunctionDefinition& function, const ProgramUsage& u /** * Checks for recursion or overly-deep function-call chains, and rejects programs which have them. * Also, computes the size of the program in a completely flattened state--loops fully unrolled, - * function calls inlined--and rejects programs that exceed an arbitrary upper bound. This is - * intended to prevent absurdly large programs from overwhemling SkVM. Only strict-ES2 mode is - * supported; complex control flow is not SkVM-compatible (and this becomes the halting problem) + * function calls inlined--and rejects programs that exceed an arbitrary upper bound. */ bool CheckProgramStructure(const Program& program, bool enforceSizeLimit); diff --git a/src/sksl/SkSLCompiler.cpp b/src/sksl/SkSLCompiler.cpp index 7870ea0f14bb..286fbb9184c7 100644 --- a/src/sksl/SkSLCompiler.cpp +++ b/src/sksl/SkSLCompiler.cpp @@ -13,7 +13,6 @@ #include "src/sksl/SkSLAnalysis.h" #include "src/sksl/SkSLContext.h" #include "src/sksl/SkSLInliner.h" -#include "src/sksl/SkSLModifiersPool.h" // IWYU pragma: keep #include "src/sksl/SkSLModuleLoader.h" #include "src/sksl/SkSLOutputStream.h" #include "src/sksl/SkSLParser.h" @@ -23,7 +22,6 @@ #include "src/sksl/SkSLStringStream.h" #include "src/sksl/SkSLThreadContext.h" #include "src/sksl/analysis/SkSLProgramUsage.h" -#include "src/sksl/dsl/DSLType.h" #include "src/sksl/ir/SkSLExpression.h" #include "src/sksl/ir/SkSLFieldAccess.h" #include "src/sksl/ir/SkSLFieldSymbol.h" @@ -33,6 +31,7 @@ #include "src/sksl/ir/SkSLProgram.h" #include "src/sksl/ir/SkSLSymbol.h" #include "src/sksl/ir/SkSLSymbolTable.h" // IWYU pragma: keep +#include "src/sksl/ir/SkSLType.h" #include "src/sksl/ir/SkSLTypeReference.h" #include "src/sksl/ir/SkSLVariable.h" #include "src/sksl/ir/SkSLVariableReference.h" @@ -118,21 +117,6 @@ class AutoShaderCaps { const ShaderCaps* fOldCaps; }; -class AutoModifiersPool { -public: - AutoModifiersPool(std::shared_ptr& context, ModifiersPool* modifiersPool) - : fContext(context.get()) { - SkASSERT(!fContext->fModifiersPool); - fContext->fModifiersPool = modifiersPool; - } - - ~AutoModifiersPool() { - fContext->fModifiersPool = nullptr; - } - - Context* fContext; -}; - Compiler::Compiler(const ShaderCaps* caps) : fErrorReporter(this), fCaps(caps) { SkASSERT(caps); @@ -204,7 +188,6 @@ std::unique_ptr Compiler::compileModule(ProgramKind kind, const char* moduleName, std::string moduleSource, const Module* parent, - ModifiersPool& modifiersPool, bool shouldInline) { SkASSERT(parent); SkASSERT(!moduleSource.empty()); @@ -212,7 +195,6 @@ std::unique_ptr Compiler::compileModule(ProgramKind kind, // Modules are shared and cannot rely on shader caps. AutoShaderCaps autoCaps(fContext, nullptr); - AutoModifiersPool autoPool(fContext, &modifiersPool); // Compile the module from source, using default program settings. ProgramSettings settings; @@ -253,7 +235,6 @@ std::unique_ptr Compiler::releaseProgram(std::unique_ptrfSymbolTable), std::move(instance.fPool), instance.fInterface); @@ -274,10 +255,10 @@ std::unique_ptr Compiler::convertIdentifier(Position pos, std::strin return nullptr; } switch (result->kind()) { - case Symbol::Kind::kFunctionDeclaration: { + case Symbol::Kind::kFunctionDeclaration: return std::make_unique(*fContext, pos, &result->as()); - } + case Symbol::Kind::kVariable: { const Variable* var = &result->as(); // default to kRead_RefKind; this will be corrected later if the variable is written to @@ -290,13 +271,12 @@ std::unique_ptr Compiler::convertIdentifier(Position pos, std::strin return FieldAccess::Make(*fContext, pos, std::move(base), field->fieldIndex(), FieldAccess::OwnerKind::kAnonymousInterfaceBlock); } - case Symbol::Kind::kType: { - // go through DSLType so we report errors on private types - dsl::DSLType dslType(result->name(), pos); - return TypeReference::Convert(*fContext, pos, &dslType.skslType()); - } + case Symbol::Kind::kType: + return TypeReference::Convert(*fContext, pos, &result->as()); + default: - SK_ABORT("unsupported symbol type %d\n", (int) result->kind()); + SkDEBUGFAILF("unsupported symbol type %d\n", (int)result->kind()); + return nullptr; } } @@ -310,7 +290,6 @@ bool Compiler::optimizeModuleBeforeMinifying(ProgramKind kind, Module& module) { config.fIsBuiltinCode = true; config.fKind = kind; AutoProgramConfig autoConfig(this->context(), &config); - AutoModifiersPool autoPool(fContext, &m.coreModifiers()); std::unique_ptr usage = Analysis::GetUsage(module); @@ -416,6 +395,15 @@ bool Compiler::optimize(Program& program) { return this->errorCount() == 0; } +void Compiler::runInliner(Program& program) { +#ifndef SK_ENABLE_OPTIMIZE_SIZE + AutoProgramConfig autoConfig(this->context(), program.fConfig.get()); + AutoShaderCaps autoCaps(fContext, fCaps); + Inliner inliner(fContext.get()); + this->runInliner(&inliner, program.fOwnedElements, program.fSymbols, program.fUsage.get()); +#endif +} + bool Compiler::runInliner(Inliner* inliner, const std::vector>& elements, std::shared_ptr symbols, @@ -424,13 +412,7 @@ bool Compiler::runInliner(Inliner* inliner, return true; #else // The program's SymbolTable was taken out of the context when the program was bundled, but - // the inliner relies (indirectly) on having a valid SymbolTable. - // In particular, inlining can turn a non-optimizable expression like `normalize(myVec)` into - // `normalize(vec2(7))`, which is now optimizable. The optimizer can use DSL to simplify this - // expression--e.g., in the case of normalize, using DSL's Length(). The DSL relies on - // convertIdentifier() to look up `length`. convertIdentifier() needs a valid symbol table to - // find the declaration of `length`. To allow this chain of events to succeed, we re-insert the - // program's symbol table temporarily. + // the inliner creates IR objects which may expect the context to hold a valid SymbolTable. SkASSERT(!fContext->fSymbolTable); fContext->fSymbolTable = symbols; @@ -497,7 +479,9 @@ static bool validate_spirv(ErrorReporter& reporter, std::string_view program) { #if defined(SKSL_STANDALONE) // Convert the string-stream to a SPIR-V disassembly. std::string disassembly; - if (tools.Disassemble(programData, programSize, &disassembly)) { + uint32_t options = spvtools::SpirvTools::kDefaultDisassembleOption; + options |= SPV_BINARY_TO_TEXT_OPTION_INDENT; + if (tools.Disassemble(programData, programSize, &disassembly, options)) { errors.append(disassembly); } reporter.error(Position(), errors); @@ -538,11 +522,11 @@ bool Compiler::toSPIRV(Program& program, OutputStream& out) { bool Compiler::toSPIRV(Program& program, std::string* out) { StringStream buffer; - bool result = this->toSPIRV(program, buffer); - if (result) { - *out = buffer.str(); + if (!this->toSPIRV(program, buffer)) { + return false; } - return result; + *out = buffer.str(); + return true; } bool Compiler::toGLSL(Program& program, OutputStream& out) { @@ -556,11 +540,11 @@ bool Compiler::toGLSL(Program& program, OutputStream& out) { bool Compiler::toGLSL(Program& program, std::string* out) { StringStream buffer; - bool result = this->toGLSL(program, buffer); - if (result) { - *out = buffer.str(); + if (!this->toGLSL(program, buffer)) { + return false; } - return result; + *out = buffer.str(); + return true; } bool Compiler::toHLSL(Program& program, OutputStream& out) { @@ -598,11 +582,11 @@ bool Compiler::toMetal(Program& program, OutputStream& out) { bool Compiler::toMetal(Program& program, std::string* out) { StringStream buffer; - bool result = this->toMetal(program, buffer); - if (result) { - *out = buffer.str(); + if (!this->toMetal(program, buffer)) { + return false; } - return result; + *out = buffer.str(); + return true; } #if defined(SK_ENABLE_WGSL_VALIDATION) @@ -661,6 +645,15 @@ bool Compiler::toWGSL(Program& program, OutputStream& out) { return result; } +bool Compiler::toWGSL(Program& program, std::string* out) { + StringStream buffer; + if (!this->toWGSL(program, buffer)) { + return false; + } + *out = buffer.str(); + return true; +} + #endif // defined(SKSL_STANDALONE) || defined(SK_GANESH) || defined(SK_GRAPHITE) void Compiler::handleError(std::string_view msg, Position pos) { diff --git a/src/sksl/SkSLCompiler.h b/src/sksl/SkSLCompiler.h index 9ea2e2ea5e89..0959ae376d06 100644 --- a/src/sksl/SkSLCompiler.h +++ b/src/sksl/SkSLCompiler.h @@ -25,9 +25,6 @@ #define SK_FRAGCOLOR_BUILTIN 10001 #define SK_LASTFRAGCOLOR_BUILTIN 10008 -#define SK_MAIN_COORDS_BUILTIN 10009 -#define SK_INPUT_COLOR_BUILTIN 10010 -#define SK_DEST_COLOR_BUILTIN 10011 #define SK_SECONDARYFRAGCOLOR_BUILTIN 10012 #define SK_FRAGCOORD_BUILTIN 15 #define SK_CLOCKWISE_BUILTIN 17 @@ -47,7 +44,6 @@ namespace SkSL { class Expression; class Inliner; -class ModifiersPool; class OutputStream; class ProgramUsage; class SymbolTable; @@ -149,6 +145,8 @@ class SK_API Compiler { bool toWGSL(Program& program, OutputStream& out); + bool toWGSL(Program& program, std::string* out); + void handleError(std::string_view msg, Position pos); std::string errorText(bool showCount = true); @@ -176,7 +174,6 @@ class SK_API Compiler { const char* moduleName, std::string moduleSource, const Module* parent, - ModifiersPool& modifiersPool, bool shouldInline); /** Optimize a module at minification time, before writing it out. */ @@ -184,6 +181,9 @@ class SK_API Compiler { const Module* moduleForProgramKind(ProgramKind kind); + /** Run the inliner on a program which was compiled earlier (with inlining turned off). */ + void runInliner(Program& program); + private: class CompilerErrorReporter : public ErrorReporter { public: diff --git a/src/sksl/SkSLConstantFolder.cpp b/src/sksl/SkSLConstantFolder.cpp index ee0ebeac06f9..68771fc63839 100644 --- a/src/sksl/SkSLConstantFolder.cpp +++ b/src/sksl/SkSLConstantFolder.cpp @@ -21,7 +21,7 @@ #include "src/sksl/ir/SkSLConstructorSplat.h" #include "src/sksl/ir/SkSLExpression.h" #include "src/sksl/ir/SkSLLiteral.h" -#include "src/sksl/ir/SkSLModifiers.h" +#include "src/sksl/ir/SkSLModifierFlags.h" #include "src/sksl/ir/SkSLPrefixExpression.h" #include "src/sksl/ir/SkSLType.h" #include "src/sksl/ir/SkSLVariable.h" @@ -148,7 +148,13 @@ static std::unique_ptr simplify_matrix_multiplication(const Context& for (int dotIdx = 0; dotIdx < leftColumns; ++dotIdx) { val += leftVals[dotIdx][r] * rightVals[c][dotIdx]; } - args[argIndex++] = val; + + if (val >= -FLT_MAX && val <= FLT_MAX) { + args[argIndex++] = val; + } else { + // The value is outside the 32-bit float range, or is NaN; do not optimize. + return nullptr; + } } } @@ -431,40 +437,35 @@ static bool error_on_divide_by_zero(const Context& context, Position pos, Operat } } -const Expression* ConstantFolder::GetConstantValueOrNullForVariable(const Expression& inExpr) { - for (const Expression* expr = &inExpr;;) { - if (!expr->is()) { - break; - } +const Expression* ConstantFolder::GetConstantValueOrNull(const Expression& inExpr) { + const Expression* expr = &inExpr; + while (expr->is()) { const VariableReference& varRef = expr->as(); if (varRef.refKind() != VariableRefKind::kRead) { - break; + return nullptr; } const Variable& var = *varRef.variable(); - if (!(var.modifiers().fFlags & Modifiers::kConst_Flag)) { - break; + if (!var.modifierFlags().isConst()) { + return nullptr; } expr = var.initialValue(); if (!expr) { - // Function parameters can be const but won't have an initial value. - break; - } - if (Analysis::IsCompileTimeConstant(*expr)) { - return expr; + // Generally, const variables must have initial values. However, function parameters are + // an exception; they can be const but won't have an initial value. + return nullptr; } } - // We didn't find a compile-time constant at the end. - return nullptr; + return Analysis::IsCompileTimeConstant(*expr) ? expr : nullptr; } const Expression* ConstantFolder::GetConstantValueForVariable(const Expression& inExpr) { - const Expression* expr = GetConstantValueOrNullForVariable(inExpr); + const Expression* expr = GetConstantValueOrNull(inExpr); return expr ? expr : &inExpr; } std::unique_ptr ConstantFolder::MakeConstantValueForVariable( Position pos, std::unique_ptr inExpr) { - const Expression* expr = GetConstantValueOrNullForVariable(*inExpr); + const Expression* expr = GetConstantValueOrNull(*inExpr); return expr ? expr->clone(pos) : std::move(inExpr); } diff --git a/src/sksl/SkSLConstantFolder.h b/src/sksl/SkSLConstantFolder.h index 450d58de8dbf..761b4fe1a41c 100644 --- a/src/sksl/SkSLConstantFolder.h +++ b/src/sksl/SkSLConstantFolder.h @@ -45,10 +45,10 @@ class ConstantFolder { static const Expression* GetConstantValueForVariable(const Expression& value); /** - * If the expression is a const variable with a known compile-time-constant value, returns that - * value. If not, returns null. + * If the expression can be replaced by a compile-time-constant value, returns that value. + * If not, returns null. */ - static const Expression* GetConstantValueOrNullForVariable(const Expression& value); + static const Expression* GetConstantValueOrNull(const Expression& value); /** Returns true if the expression contains `value` in every slot. */ static bool IsConstantSplat(const Expression& expr, double value); diff --git a/src/sksl/SkSLContext.h b/src/sksl/SkSLContext.h index d94adfbcf6fb..5acaa88f0791 100644 --- a/src/sksl/SkSLContext.h +++ b/src/sksl/SkSLContext.h @@ -14,7 +14,6 @@ namespace SkSL { class BuiltinTypes; class ErrorReporter; -class ModifiersPool; struct Module; struct ProgramConfig; struct ShaderCaps; @@ -34,9 +33,6 @@ class Context { // The Context holds a reference to our shader caps bits. const ShaderCaps* fCaps; - // The Context holds a pointer to our pool of modifiers. - ModifiersPool* fModifiersPool = nullptr; - // The Context holds a pointer to the configuration of the program being compiled. ProgramConfig* fConfig = nullptr; diff --git a/src/sksl/SkSLInliner.cpp b/src/sksl/SkSLInliner.cpp index 9eeaf9eac365..4cc4da307e2a 100644 --- a/src/sksl/SkSLInliner.cpp +++ b/src/sksl/SkSLInliner.cpp @@ -13,6 +13,7 @@ #include "include/core/SkTypes.h" #include "include/private/SkSLDefines.h" #include "include/private/base/SkTArray.h" +#include "src/base/SkEnumBitMask.h" #include "src/sksl/SkSLAnalysis.h" #include "src/sksl/SkSLErrorReporter.h" #include "src/sksl/SkSLOperator.h" @@ -31,6 +32,7 @@ #include "src/sksl/ir/SkSLConstructorSplat.h" #include "src/sksl/ir/SkSLConstructorStruct.h" #include "src/sksl/ir/SkSLDoStatement.h" +#include "src/sksl/ir/SkSLEmptyExpression.h" #include "src/sksl/ir/SkSLExpressionStatement.h" #include "src/sksl/ir/SkSLFieldAccess.h" #include "src/sksl/ir/SkSLForStatement.h" @@ -40,8 +42,7 @@ #include "src/sksl/ir/SkSLIRNode.h" #include "src/sksl/ir/SkSLIfStatement.h" #include "src/sksl/ir/SkSLIndexExpression.h" -#include "src/sksl/ir/SkSLLiteral.h" -#include "src/sksl/ir/SkSLModifiers.h" +#include "src/sksl/ir/SkSLModifierFlags.h" #include "src/sksl/ir/SkSLNop.h" #include "src/sksl/ir/SkSLPostfixExpression.h" #include "src/sksl/ir/SkSLPrefixExpression.h" @@ -187,8 +188,10 @@ std::unique_ptr Inliner::inlineExpression(Position pos, binaryExpr.getOperator(), expr(binaryExpr.right())); } + case Expression::Kind::kEmpty: + return expression.clone(pos); case Expression::Kind::kLiteral: - return expression.clone(); + return expression.clone(pos); case Expression::Kind::kChildCall: { const ChildCall& childCall = expression.as(); return ChildCall::Make(*fContext, @@ -264,13 +267,13 @@ std::unique_ptr Inliner::inlineExpression(Position pos, argList(funcCall.arguments())); } case Expression::Kind::kFunctionReference: - return expression.clone(); + return expression.clone(pos); case Expression::Kind::kIndex: { const IndexExpression& idx = expression.as(); return IndexExpression::Make(*fContext, pos, expr(idx.base()), expr(idx.index())); } case Expression::Kind::kMethodReference: - return expression.clone(); + return expression.clone(pos); case Expression::Kind::kPrefix: { const PrefixExpression& p = expression.as(); return PrefixExpression::Make(*fContext, pos, p.getOperator(), expr(p.operand())); @@ -293,17 +296,17 @@ std::unique_ptr Inliner::inlineExpression(Position pos, expr(t.ifTrue()), expr(t.ifFalse())); } case Expression::Kind::kTypeReference: - return expression.clone(); + return expression.clone(pos); case Expression::Kind::kVariableReference: { const VariableReference& v = expression.as(); std::unique_ptr* remap = varMap->find(v.variable()); if (remap) { return clone_with_ref_kind(**remap, v.refKind()); } - return expression.clone(); + return expression.clone(pos); } default: - SkASSERT(false); + SkDEBUGFAILF("unsupported expression: %s", expression.description().c_str()); return nullptr; } } @@ -338,8 +341,8 @@ std::unique_ptr Inliner::inlineStatement(Position pos, return nullptr; }; auto variableModifiers = [&](const Variable& variable, - const Expression* initialValue) -> const Modifiers* { - return Transform::AddConstToVarModifiers(*fContext, variable, initialValue, &usage); + const Expression* initialValue) -> ModifierFlags { + return Transform::AddConstToVarModifiers(variable, initialValue, &usage); }; ++fInlinedStatementCounter; @@ -446,14 +449,15 @@ std::unique_ptr Inliner::inlineStatement(Position pos, // names are important. const std::string* name = symbolTableForStatement->takeOwnershipOfString( fMangler.uniqueName(variable->name(), symbolTableForStatement)); - auto clonedVar = - std::make_unique(pos, - variable->modifiersPosition(), - variableModifiers(*variable, initialValue.get()), - name->c_str(), - variable->type().clone(symbolTableForStatement), - isBuiltinCode, - variable->storage()); + auto clonedVar = Variable::Make(pos, + variable->modifiersPosition(), + variable->layout(), + variableModifiers(*variable, initialValue.get()), + variable->type().clone(symbolTableForStatement), + name->c_str(), + /*mangledName=*/"", + isBuiltinCode, + variable->storage()); varMap->set(variable, VariableReference::Make(pos, clonedVar.get())); std::unique_ptr result = VarDeclaration::Make(*fContext, @@ -470,6 +474,24 @@ std::unique_ptr Inliner::inlineStatement(Position pos, } } +static bool argument_needs_scratch_variable(const Expression* arg, + const Variable* param, + const ProgramUsage& usage) { + // If the parameter isn't written to within the inline function ... + const ProgramUsage::VariableCounts& paramUsage = usage.get(*param); + if (!paramUsage.fWrite) { + // ... and can be inlined trivially (e.g. a swizzle, or a constant array index), + // or any expression without side effects that is only accessed at most once... + if ((paramUsage.fRead > 1) ? Analysis::IsTrivialExpression(*arg) + : !Analysis::HasSideEffects(*arg)) { + // ... we don't need to copy it at all! We can just use the existing expression. + return false; + } + } + // We need a scratch variable. + return true; +} + Inliner::InlinedCall Inliner::inlineCall(const FunctionCall& call, std::shared_ptr symbolTable, const ProgramUsage& usage, @@ -482,9 +504,7 @@ Inliner::InlinedCall Inliner::inlineCall(const FunctionCall& call, // // Since we can't insert statements into an expression, we run the inline function as extra // statements before the statement we're currently processing, relying on a lack of execution - // order guarantees. Since we can't use gotos (which are normally used to replace return - // statements), we wrap the whole function in a loop and use break statements to jump to the - // end. + // order guarantees. SkASSERT(fContext); SkASSERT(this->isSafeToInline(call.function().definition(), usage)); @@ -511,7 +531,7 @@ Inliner::InlinedCall Inliner::inlineCall(const FunctionCall& call, fMangler, function.declaration().name(), &function.declaration().returnType(), - Modifiers{}, + ModifierFlag::kNone, symbolTable.get(), /*initialValue=*/nullptr); inlineStatements.push_back(std::move(var.fVarDecl)); @@ -522,25 +542,17 @@ Inliner::InlinedCall Inliner::inlineCall(const FunctionCall& call, // them. VariableRewriteMap varMap; for (int i = 0; i < arguments.size(); ++i) { - // If the parameter isn't written to within the inline function ... const Expression* arg = arguments[i].get(); const Variable* param = function.declaration().parameters()[i]; - const ProgramUsage::VariableCounts& paramUsage = usage.get(*param); - if (!paramUsage.fWrite) { - // ... and can be inlined trivially (e.g. a swizzle, or a constant array index), - // or any expression without side effects that is only accessed at most once... - if ((paramUsage.fRead > 1) ? Analysis::IsTrivialExpression(*arg) - : !Analysis::HasSideEffects(*arg)) { - // ... we don't need to copy it at all! We can just use the existing expression. - varMap.set(param, arg->clone()); - continue; - } + if (!argument_needs_scratch_variable(arg, param, usage)) { + varMap.set(param, arg->clone()); + continue; } ScratchVariable var = Variable::MakeScratchVariable(*fContext, fMangler, param->name(), &arg->type(), - param->modifiers(), + param->modifierFlags(), symbolTable.get(), arg->clone()); inlineStatements.push_back(std::move(var.fVarDecl)); @@ -564,9 +576,8 @@ Inliner::InlinedCall Inliner::inlineCall(const FunctionCall& call, // Return our result expression as-is. inlinedCall.fReplacementExpr = std::move(resultExpr); } else if (function.declaration().returnType().isVoid()) { - // It's a void function, so it doesn't actually result in anything, but we have to return - // something non-null as a standin. - inlinedCall.fReplacementExpr = Literal::MakeBool(*fContext, pos, /*value=*/false); + // It's a void function, so its result is the empty expression. + inlinedCall.fReplacementExpr = EmptyExpression::Make(pos, *fContext); } else { // It's a non-void function, but it never created a result expression--that is, it never // returned anything on any path! This should have been detected in the function finalizer. @@ -597,7 +608,7 @@ bool Inliner::isSafeToInline(const FunctionDefinition* functionDef, const Progra return false; } - if (functionDef->declaration().modifiers().fFlags & Modifiers::kNoInline_Flag) { + if (functionDef->declaration().modifierFlags().isNoInline()) { // Refuse to inline functions decorated with `noinline`. return false; } @@ -606,7 +617,7 @@ bool Inliner::isSafeToInline(const FunctionDefinition* functionDef, const Progra // We don't allow inlining functions with parameters that are written-to, if they... // - are `out` parameters (see skia:11326 for rationale.) // - are arrays or structures (introducing temporary copies is non-trivial) - if ((param->modifiers().fFlags & Modifiers::Flag::kOut_Flag) || + if ((param->modifierFlags() & ModifierFlag::kOut) || param->type().isArray() || param->type().isStruct()) { ProgramUsage::VariableCounts counts = usage.get(*param); @@ -895,10 +906,9 @@ static const FunctionDeclaration& candidate_func(const InlineCandidate& candidat return (*candidate.fCandidateExpr)->as().function(); } -bool Inliner::candidateCanBeInlined(const InlineCandidate& candidate, - const ProgramUsage& usage, - InlinabilityCache* cache) { - const FunctionDeclaration& funcDecl = candidate_func(candidate); +bool Inliner::functionCanBeInlined(const FunctionDeclaration& funcDecl, + const ProgramUsage& usage, + InlinabilityCache* cache) { if (const bool* cachedInlinability = cache->find(&funcDecl)) { return *cachedInlinability; } @@ -907,6 +917,33 @@ bool Inliner::candidateCanBeInlined(const InlineCandidate& candidate, return inlinability; } +bool Inliner::candidateCanBeInlined(const InlineCandidate& candidate, + const ProgramUsage& usage, + InlinabilityCache* cache) { + // Check the cache to see if this function is safe to inline. + const FunctionDeclaration& funcDecl = candidate_func(candidate); + if (!this->functionCanBeInlined(funcDecl, usage, cache)) { + return false; + } + + // Even if the function is safe, the arguments we are passing may not be. In particular, we + // can't make copies of opaque values, so we need to reject inline candidates that would need to + // do this. Every call has different arguments, so this part is not cacheable. (skia:13824) + const FunctionCall& call = candidate.fCandidateExpr->get()->as(); + const ExpressionArray& arguments = call.arguments(); + for (int i = 0; i < arguments.size(); ++i) { + const Expression* arg = arguments[i].get(); + if (arg->type().isOpaque()) { + const Variable* param = funcDecl.parameters()[i]; + if (argument_needs_scratch_variable(arg, param, usage)) { + return false; + } + } + } + + return true; +} + int Inliner::getFunctionSize(const FunctionDeclaration& funcDecl, FunctionSizeCache* cache) { if (const int* cachedSize = cache->find(&funcDecl)) { return *cachedSize; @@ -962,7 +999,7 @@ void Inliner::buildCandidateList(const std::vector; int getFunctionSize(const FunctionDeclaration& fnDecl, FunctionSizeCache* cache); diff --git a/src/sksl/SkSLModifiersPool.h b/src/sksl/SkSLModifiersPool.h deleted file mode 100644 index 56d21bd5d9e7..000000000000 --- a/src/sksl/SkSLModifiersPool.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2020 Google LLC. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#ifndef SKSL_MODIFIERSPOOL -#define SKSL_MODIFIERSPOOL - -#include "src/sksl/ir/SkSLModifiers.h" - -#include - -namespace SkSL { - -/** - * Deduplicates Modifiers objects and stores them in a shared pool. Modifiers are fairly heavy, and - * tend to be reused a lot, so deduplication can be a significant win. - */ -class ModifiersPool { -public: - const Modifiers* add(const Modifiers& modifiers) { - auto [iter, wasInserted] = fModifiersSet.insert(modifiers); - return &*iter; - } - - void clear() { - fModifiersSet.clear(); - } - -private: - std::unordered_set fModifiersSet; -}; - -} // namespace SkSL - -#endif diff --git a/src/sksl/SkSLModuleLoader.cpp b/src/sksl/SkSLModuleLoader.cpp index d173a39a2a31..6d1127e67359 100644 --- a/src/sksl/SkSLModuleLoader.cpp +++ b/src/sksl/SkSLModuleLoader.cpp @@ -11,11 +11,11 @@ #include "src/base/SkNoDestructor.h" #include "src/sksl/SkSLBuiltinTypes.h" #include "src/sksl/SkSLCompiler.h" -#include "src/sksl/SkSLModifiersPool.h" #include "src/sksl/SkSLPosition.h" #include "src/sksl/SkSLProgramKind.h" #include "src/sksl/ir/SkSLIRNode.h" -#include "src/sksl/ir/SkSLModifiers.h" +#include "src/sksl/ir/SkSLLayout.h" +#include "src/sksl/ir/SkSLModifierFlags.h" #include "src/sksl/ir/SkSLProgramElement.h" #include "src/sksl/ir/SkSLSymbolTable.h" #include "src/sksl/ir/SkSLType.h" @@ -151,7 +151,6 @@ struct ModuleLoader::Impl { // ModuleLoader object falls out of scope. SkMutex fMutex; const BuiltinTypes fBuiltinTypes; - ModifiersPool fCoreModifiers; std::unique_ptr fRootModule; @@ -208,13 +207,11 @@ static std::unique_ptr compile_and_shrink(SkSL::Compiler* compiler, ProgramKind kind, const char* moduleName, std::string moduleSource, - const Module* parent, - ModifiersPool& modifiersPool) { + const Module* parent) { std::unique_ptr m = compiler->compileModule(kind, moduleName, std::move(moduleSource), parent, - modifiersPool, /*shouldInline=*/true); if (!m) { SK_ABORT("Unable to load module %s", moduleName); @@ -253,10 +250,6 @@ const BuiltinTypes& ModuleLoader::builtinTypes() { return fModuleLoader.fBuiltinTypes; } -ModifiersPool& ModuleLoader::coreModifiers() { - return fModuleLoader.fCoreModifiers; -} - const Module* ModuleLoader::rootModule() { return fModuleLoader.fRootModule.get(); } @@ -305,8 +298,7 @@ const Module* ModuleLoader::loadPublicModule(SkSL::Compiler* compiler) { fModuleLoader.fPublicModule = compile_and_shrink(compiler, ProgramKind::kFragment, MODULE_DATA(sksl_public), - sharedModule, - this->coreModifiers()); + sharedModule); this->addPublicTypeAliases(fModuleLoader.fPublicModule.get()); } return fModuleLoader.fPublicModule.get(); @@ -318,8 +310,7 @@ const Module* ModuleLoader::loadPrivateRTShaderModule(SkSL::Compiler* compiler) fModuleLoader.fRuntimeShaderModule = compile_and_shrink(compiler, ProgramKind::kFragment, MODULE_DATA(sksl_rt_shader), - publicModule, - this->coreModifiers()); + publicModule); } return fModuleLoader.fRuntimeShaderModule.get(); } @@ -330,8 +321,7 @@ const Module* ModuleLoader::loadSharedModule(SkSL::Compiler* compiler) { fModuleLoader.fSharedModule = compile_and_shrink(compiler, ProgramKind::kFragment, MODULE_DATA(sksl_shared), - rootModule, - this->coreModifiers()); + rootModule); } return fModuleLoader.fSharedModule.get(); } @@ -342,8 +332,7 @@ const Module* ModuleLoader::loadGPUModule(SkSL::Compiler* compiler) { fModuleLoader.fGPUModule = compile_and_shrink(compiler, ProgramKind::kFragment, MODULE_DATA(sksl_gpu), - sharedModule, - this->coreModifiers()); + sharedModule); } return fModuleLoader.fGPUModule.get(); } @@ -354,8 +343,7 @@ const Module* ModuleLoader::loadFragmentModule(SkSL::Compiler* compiler) { fModuleLoader.fFragmentModule = compile_and_shrink(compiler, ProgramKind::kFragment, MODULE_DATA(sksl_frag), - gpuModule, - this->coreModifiers()); + gpuModule); } return fModuleLoader.fFragmentModule.get(); } @@ -366,8 +354,7 @@ const Module* ModuleLoader::loadVertexModule(SkSL::Compiler* compiler) { fModuleLoader.fVertexModule = compile_and_shrink(compiler, ProgramKind::kVertex, MODULE_DATA(sksl_vert), - gpuModule, - this->coreModifiers()); + gpuModule); } return fModuleLoader.fVertexModule.get(); } @@ -378,8 +365,7 @@ const Module* ModuleLoader::loadComputeModule(SkSL::Compiler* compiler) { fModuleLoader.fComputeModule = compile_and_shrink(compiler, ProgramKind::kCompute, MODULE_DATA(sksl_compute), - gpuModule, - this->coreModifiers()); + gpuModule); add_compute_type_aliases(fModuleLoader.fComputeModule->fSymbols.get(), this->builtinTypes()); } @@ -393,8 +379,7 @@ const Module* ModuleLoader::loadGraphiteFragmentModule(SkSL::Compiler* compiler) fModuleLoader.fGraphiteFragmentModule = compile_and_shrink(compiler, ProgramKind::kGraphiteFragment, MODULE_DATA(sksl_graphite_frag), - fragmentModule, - this->coreModifiers()); + fragmentModule); } return fModuleLoader.fGraphiteFragmentModule.get(); #else @@ -409,8 +394,7 @@ const Module* ModuleLoader::loadGraphiteVertexModule(SkSL::Compiler* compiler) { fModuleLoader.fGraphiteVertexModule = compile_and_shrink(compiler, ProgramKind::kGraphiteVertex, MODULE_DATA(sksl_graphite_vert), - vertexModule, - this->coreModifiers()); + vertexModule); } return fModuleLoader.fGraphiteVertexModule.get(); #else @@ -432,13 +416,15 @@ void ModuleLoader::Impl::makeRootSymbolTable() { // sk_Caps is "builtin", but all references to it are resolved to Settings, so we don't need to // treat it as builtin (ie, no need to clone it into the Program). - rootModule->fSymbols->add(std::make_unique(/*pos=*/Position(), - /*modifiersPosition=*/Position(), - fCoreModifiers.add(Modifiers{}), - "sk_Caps", - fBuiltinTypes.fSkCaps.get(), - /*builtin=*/false, - Variable::Storage::kGlobal)); + rootModule->fSymbols->add(Variable::Make(/*pos=*/Position(), + /*modifiersPosition=*/Position(), + Layout{}, + ModifierFlag::kNone, + fBuiltinTypes.fSkCaps.get(), + "sk_Caps", + /*mangledName=*/"", + /*builtin=*/false, + Variable::Storage::kGlobal)); fRootModule = std::move(rootModule); } diff --git a/src/sksl/SkSLModuleLoader.h b/src/sksl/SkSLModuleLoader.h index bb300e2f7a13..d8e6566c70df 100644 --- a/src/sksl/SkSLModuleLoader.h +++ b/src/sksl/SkSLModuleLoader.h @@ -14,7 +14,6 @@ namespace SkSL { class Compiler; -class ModifiersPool; struct Module; class Type; @@ -38,9 +37,6 @@ class ModuleLoader { const BuiltinTypes& builtinTypes(); const Module* rootModule(); - // This ModifiersPool is shared by every built-in module. - ModifiersPool& coreModifiers(); - // These modules are loaded on demand; once loaded, they are kept for the lifetime of the // process. const Module* loadSharedModule(SkSL::Compiler* compiler); diff --git a/src/sksl/SkSLOperator.cpp b/src/sksl/SkSLOperator.cpp index ae78102e64c0..35cfb6366f0f 100644 --- a/src/sksl/SkSLOperator.cpp +++ b/src/sksl/SkSLOperator.cpp @@ -126,6 +126,10 @@ bool Operator::isAssignment() const { } } +bool Operator::isCompoundAssignment() const { + return this->isAssignment() && this->kind() != Kind::EQ; +} + Operator Operator::removeAssignment() const { switch (this->kind()) { case Kind::PLUSEQ: return Kind::PLUS; diff --git a/src/sksl/SkSLOperator.h b/src/sksl/SkSLOperator.h index d8dd63bd4f25..b980011bc386 100644 --- a/src/sksl/SkSLOperator.h +++ b/src/sksl/SkSLOperator.h @@ -96,11 +96,14 @@ class Operator { // Returns the operator name without any surrounding whitespace. std::string_view tightOperatorName() const; - // Returns true if op is '=' or any compound assignment operator ('+=', '-=', etc.) + // Returns true if op is `=` or any compound-assignment operator (`+=`, `-=`, etc.) bool isAssignment() const; - // Given a compound assignment operator, returns the non-assignment version of the operator - // (e.g. '+=' becomes '+') + // Returns true if op is any compound-assignment operator (`+=`, `-=`, etc.) but false for `=` + bool isCompoundAssignment() const; + + // Given a compound-assignment operator, returns the non-assignment version of the operator + // (e.g. `+=` becomes `+`) Operator removeAssignment() const; /** diff --git a/src/sksl/SkSLParser.cpp b/src/sksl/SkSLParser.cpp index 3fa7db3431cd..69ab6c46871a 100644 --- a/src/sksl/SkSLParser.cpp +++ b/src/sksl/SkSLParser.cpp @@ -10,8 +10,10 @@ #include "include/core/SkSpan.h" #include "include/private/base/SkTArray.h" #include "include/sksl/SkSLVersion.h" +#include "src/base/SkEnumBitMask.h" #include "src/base/SkNoDestructor.h" #include "src/core/SkTHash.h" +#include "src/sksl/SkSLBuiltinTypes.h" #include "src/sksl/SkSLCompiler.h" #include "src/sksl/SkSLConstantFolder.h" #include "src/sksl/SkSLContext.h" @@ -26,6 +28,7 @@ #include "src/sksl/ir/SkSLDiscardStatement.h" #include "src/sksl/ir/SkSLDoStatement.h" #include "src/sksl/ir/SkSLExpression.h" +#include "src/sksl/ir/SkSLExpressionStatement.h" #include "src/sksl/ir/SkSLExtension.h" #include "src/sksl/ir/SkSLFieldAccess.h" #include "src/sksl/ir/SkSLForStatement.h" @@ -38,9 +41,10 @@ #include "src/sksl/ir/SkSLInterfaceBlock.h" #include "src/sksl/ir/SkSLLayout.h" #include "src/sksl/ir/SkSLLiteral.h" -#include "src/sksl/ir/SkSLModifiers.h" +#include "src/sksl/ir/SkSLModifierFlags.h" #include "src/sksl/ir/SkSLModifiersDeclaration.h" #include "src/sksl/ir/SkSLNop.h" +#include "src/sksl/ir/SkSLPoison.h" #include "src/sksl/ir/SkSLPostfixExpression.h" #include "src/sksl/ir/SkSLPrefixExpression.h" #include "src/sksl/ir/SkSLProgram.h" @@ -50,9 +54,11 @@ #include "src/sksl/ir/SkSLStructDefinition.h" #include "src/sksl/ir/SkSLSwitchStatement.h" #include "src/sksl/ir/SkSLSwizzle.h" +#include "src/sksl/ir/SkSLSymbol.h" #include "src/sksl/ir/SkSLSymbolTable.h" #include "src/sksl/ir/SkSLTernaryExpression.h" #include "src/sksl/ir/SkSLType.h" +#include "src/sksl/ir/SkSLTypeReference.h" #include "src/sksl/ir/SkSLVarDeclarations.h" #include "src/sksl/ir/SkSLVariable.h" @@ -64,34 +70,33 @@ #include using namespace skia_private; -using namespace SkSL::dsl; namespace SkSL { static constexpr int kMaxParseDepth = 50; -static int parse_modifier_token(Token::Kind token) { +static ModifierFlags parse_modifier_token(Token::Kind token) { switch (token) { - case Token::Kind::TK_UNIFORM: return Modifiers::kUniform_Flag; - case Token::Kind::TK_CONST: return Modifiers::kConst_Flag; - case Token::Kind::TK_IN: return Modifiers::kIn_Flag; - case Token::Kind::TK_OUT: return Modifiers::kOut_Flag; - case Token::Kind::TK_INOUT: return Modifiers::kIn_Flag | Modifiers::kOut_Flag; - case Token::Kind::TK_FLAT: return Modifiers::kFlat_Flag; - case Token::Kind::TK_NOPERSPECTIVE: return Modifiers::kNoPerspective_Flag; - case Token::Kind::TK_PURE: return Modifiers::kPure_Flag; - case Token::Kind::TK_INLINE: return Modifiers::kInline_Flag; - case Token::Kind::TK_NOINLINE: return Modifiers::kNoInline_Flag; - case Token::Kind::TK_HIGHP: return Modifiers::kHighp_Flag; - case Token::Kind::TK_MEDIUMP: return Modifiers::kMediump_Flag; - case Token::Kind::TK_LOWP: return Modifiers::kLowp_Flag; - case Token::Kind::TK_EXPORT: return Modifiers::kExport_Flag; - case Token::Kind::TK_ES3: return Modifiers::kES3_Flag; - case Token::Kind::TK_WORKGROUP: return Modifiers::kWorkgroup_Flag; - case Token::Kind::TK_READONLY: return Modifiers::kReadOnly_Flag; - case Token::Kind::TK_WRITEONLY: return Modifiers::kWriteOnly_Flag; - case Token::Kind::TK_BUFFER: return Modifiers::kBuffer_Flag; - default: return 0; + case Token::Kind::TK_UNIFORM: return ModifierFlag::kUniform; + case Token::Kind::TK_CONST: return ModifierFlag::kConst; + case Token::Kind::TK_IN: return ModifierFlag::kIn; + case Token::Kind::TK_OUT: return ModifierFlag::kOut; + case Token::Kind::TK_INOUT: return ModifierFlag::kIn | ModifierFlag::kOut; + case Token::Kind::TK_FLAT: return ModifierFlag::kFlat; + case Token::Kind::TK_NOPERSPECTIVE: return ModifierFlag::kNoPerspective; + case Token::Kind::TK_PURE: return ModifierFlag::kPure; + case Token::Kind::TK_INLINE: return ModifierFlag::kInline; + case Token::Kind::TK_NOINLINE: return ModifierFlag::kNoInline; + case Token::Kind::TK_HIGHP: return ModifierFlag::kHighp; + case Token::Kind::TK_MEDIUMP: return ModifierFlag::kMediump; + case Token::Kind::TK_LOWP: return ModifierFlag::kLowp; + case Token::Kind::TK_EXPORT: return ModifierFlag::kExport; + case Token::Kind::TK_ES3: return ModifierFlag::kES3; + case Token::Kind::TK_WORKGROUP: return ModifierFlag::kWorkgroup; + case Token::Kind::TK_READONLY: return ModifierFlag::kReadOnly; + case Token::Kind::TK_WRITEONLY: return ModifierFlag::kWriteOnly; + case Token::Kind::TK_BUFFER: return ModifierFlag::kBuffer; + default: return ModifierFlag::kNone; } } @@ -420,11 +425,10 @@ std::unique_ptr Parser::moduleInheritingFrom(const SkSL::Module* p void Parser::declarations() { fEncounteredFatalError = false; - // If the program is longer than 8MB (Position::kMaxOffset), error reporting goes off the rails. + // If the program is 8MB or longer (Position::kMaxOffset), error reporting goes off the rails. // At any rate, there's no good reason for a program to be this long. if (fText->size() >= Position::kMaxOffset) { this->error(Position(), "program is too large"); - fEncounteredFatalError = true; return; } @@ -432,23 +436,22 @@ void Parser::declarations() { if (this->peek().fKind == Token::Kind::TK_DIRECTIVE) { this->directive(/*allowVersion=*/true); } - bool done = false; - while (!done) { + + while (!fEncounteredFatalError) { switch (this->peek().fKind) { case Token::Kind::TK_END_OF_FILE: - done = true; - break; - case Token::Kind::TK_DIRECTIVE: - this->directive(/*allowVersion=*/false); - break; + return; + case Token::Kind::TK_INVALID: this->error(this->peek(), "invalid token"); - this->nextToken(); - done = true; + return; + + case Token::Kind::TK_DIRECTIVE: + this->directive(/*allowVersion=*/false); break; + default: this->declaration(); - done = fEncounteredFatalError; break; } } @@ -525,10 +528,9 @@ void Parser::directive(bool allowVersion) { this->error(start, "unsupported directive '" + std::string(this->text(start)) + "'"); } -bool Parser::modifiersDeclarationEnd(const dsl::DSLModifiers& mods) { +bool Parser::modifiersDeclarationEnd(const SkSL::Modifiers& mods) { std::unique_ptr decl = ModifiersDeclaration::Convert(fCompiler.context(), - mods.fPosition, - mods.fModifiers); + mods); if (!decl) { return false; } @@ -545,7 +547,7 @@ bool Parser::declaration() { this->error(start, "expected a declaration, but found ';'"); return false; } - DSLModifiers modifiers = this->modifiers(); + Modifiers modifiers = this->modifiers(); Token lookahead = this->peek(); if (lookahead.fKind == Token::Kind::TK_IDENTIFIER && !this->symbolTable()->isType(this->text(lookahead))) { @@ -560,8 +562,8 @@ bool Parser::declaration() { this->structVarDeclaration(this->position(start), modifiers); return true; } - DSLType type = this->type(&modifiers); - if (!type.hasValue()) { + const Type* type = this->type(&modifiers); + if (!type) { return false; } Token name; @@ -578,8 +580,8 @@ bool Parser::declaration() { /* (RPAREN | VOID RPAREN | parameter (COMMA parameter)* RPAREN) (block | SEMICOLON) */ bool Parser::functionDeclarationEnd(Position start, - DSLModifiers& modifiers, - DSLType returnType, + Modifiers& modifiers, + const Type* returnType, const Token& name) { Token lookahead = this->peek(); bool validParams = true; @@ -610,12 +612,11 @@ bool Parser::functionDeclarationEnd(Position start, if (validParams) { decl = SkSL::FunctionDeclaration::Convert(ThreadContext::Context(), this->rangeFrom(start), - modifiers.fPosition, - &modifiers.fModifiers, + modifiers, this->text(name), std::move(parameters), start, - &returnType.skslType()); + returnType); } if (this->checkNext(Token::Kind::TK_SEMICOLON)) { @@ -644,14 +645,14 @@ bool Parser::defineFunction(SkSL::FunctionDeclaration* decl) { // Parse the function body. Token bodyStart = this->peek(); - std::optional body = this->block(); + std::unique_ptr body = this->block(); // If there was a problem with the declarations or body, don't actually create a definition. if (!decl || !body) { return false; } - std::unique_ptr block = body->release(); + std::unique_ptr block = std::move(body); SkASSERT(block->is()); Position pos = this->rangeFrom(bodyStart); block->fPosition = pos; @@ -677,12 +678,11 @@ bool Parser::arraySize(SKSL_INT* outResult) { this->error(this->position(next), "unsized arrays are not permitted here"); return true; } - DSLExpression sizeExpr = this->expression(); - if (!sizeExpr.hasValue()) { + std::unique_ptr sizeLiteral = this->expression(); + if (!sizeLiteral) { return false; } - if (sizeExpr.isValid()) { - std::unique_ptr sizeLiteral = sizeExpr.release(); + if (!sizeLiteral->is()) { SKSL_INT size; if (!ConstantFolder::GetConstantInt(*sizeLiteral, &size)) { this->error(sizeLiteral->fPosition, "array size must be an integer"); @@ -702,12 +702,29 @@ bool Parser::arraySize(SKSL_INT* outResult) { return true; } -bool Parser::parseArrayDimensions(Position pos, DSLType* type) { +const Type* Parser::arrayType(const Type* base, int count, Position pos) { + const Context& context = fCompiler.context(); + count = base->convertArraySize(context, pos, pos, count); + if (!count) { + return context.fTypes.fPoison.get(); + } + return this->symbolTable()->addArrayDimension(base, count); +} + +const Type* Parser::unsizedArrayType(const Type* base, Position pos) { + const Context& context = fCompiler.context(); + if (!base->checkIfUsableInArray(context, pos)) { + return context.fTypes.fPoison.get(); + } + return this->symbolTable()->addArrayDimension(base, SkSL::Type::kUnsizedArray); +} + +bool Parser::parseArrayDimensions(Position pos, const Type** type) { Token next; while (this->checkNext(Token::Kind::TK_LBRACKET, &next)) { if (this->checkNext(Token::Kind::TK_RBRACKET)) { if (this->allowUnsizedArrays()) { - *type = UnsizedArray(*type, this->rangeFrom(pos)); + *type = this->unsizedArrayType(*type, this->rangeFrom(pos)); } else { this->error(this->rangeFrom(pos), "unsized arrays are not permitted here"); } @@ -719,21 +736,21 @@ bool Parser::parseArrayDimensions(Position pos, DSLType* type) { if (!this->expect(Token::Kind::TK_RBRACKET, "']'")) { return false; } - *type = Array(*type, size, this->rangeFrom(pos)); + *type = this->arrayType(*type, size, this->rangeFrom(pos)); } } return true; } -bool Parser::parseInitializer(Position pos, DSLExpression* initializer) { +bool Parser::parseInitializer(Position pos, std::unique_ptr* initializer) { if (this->checkNext(Token::Kind::TK_EQ)) { *initializer = this->assignmentExpression(); - return initializer->hasValue(); + return *initializer != nullptr; } return true; } -void Parser::addGlobalVarDeclaration(std::unique_ptr decl) { +void Parser::addGlobalVarDeclaration(std::unique_ptr decl) { if (decl) { ThreadContext::ProgramElements().push_back( std::make_unique(std::move(decl))); @@ -743,11 +760,11 @@ void Parser::addGlobalVarDeclaration(std::unique_ptr decl) /* (LBRACKET expression? RBRACKET)* (EQ assignmentExpression)? (COMMA IDENTIFER (LBRACKET expression? RBRACKET)* (EQ assignmentExpression)?)* SEMICOLON */ void Parser::globalVarDeclarationEnd(Position pos, - const dsl::DSLModifiers& mods, - dsl::DSLType baseType, + const Modifiers& mods, + const Type* baseType, Token name) { - DSLType type = baseType; - DSLExpression initializer; + const Type* type = baseType; + std::unique_ptr initializer; if (!this->parseArrayDimensions(pos, &type)) { return; } @@ -756,13 +773,12 @@ void Parser::globalVarDeclarationEnd(Position pos, } this->addGlobalVarDeclaration(VarDeclaration::Convert(fCompiler.context(), this->rangeFrom(pos), - mods.fPosition, - mods.fModifiers, - type.skslType(), + mods, + *type, this->position(name), this->text(name), VariableStorage::kGlobal, - initializer.releaseIfPossible())); + std::move(initializer))); while (this->checkNext(Token::Kind::TK_COMMA)) { type = baseType; Token identifierName; @@ -772,47 +788,44 @@ void Parser::globalVarDeclarationEnd(Position pos, if (!this->parseArrayDimensions(pos, &type)) { return; } - DSLExpression anotherInitializer; + std::unique_ptr anotherInitializer; if (!this->parseInitializer(pos, &anotherInitializer)) { return; } - this->addGlobalVarDeclaration( - VarDeclaration::Convert(fCompiler.context(), - this->rangeFrom(identifierName), - mods.fPosition, - mods.fModifiers, - type.skslType(), - this->position(identifierName), - this->text(identifierName), - VariableStorage::kGlobal, - anotherInitializer.releaseIfPossible())); + this->addGlobalVarDeclaration(VarDeclaration::Convert(fCompiler.context(), + this->rangeFrom(identifierName), + mods, + *type, + this->position(identifierName), + this->text(identifierName), + VariableStorage::kGlobal, + std::move(anotherInitializer))); } this->expect(Token::Kind::TK_SEMICOLON, "';'"); } /* (LBRACKET expression? RBRACKET)* (EQ assignmentExpression)? (COMMA IDENTIFER (LBRACKET expression? RBRACKET)* (EQ assignmentExpression)?)* SEMICOLON */ -DSLStatement Parser::localVarDeclarationEnd(Position pos, - const dsl::DSLModifiers& mods, - dsl::DSLType baseType, - Token name) { - DSLType type = baseType; - DSLExpression initializer; +std::unique_ptr Parser::localVarDeclarationEnd(Position pos, + const Modifiers& mods, + const Type* baseType, + Token name) { + const Type* type = baseType; + std::unique_ptr initializer; if (!this->parseArrayDimensions(pos, &type)) { - return {}; + return nullptr; } if (!this->parseInitializer(pos, &initializer)) { - return {}; + return nullptr; } std::unique_ptr result = VarDeclaration::Convert(fCompiler.context(), this->rangeFrom(pos), - mods.fPosition, - mods.fModifiers, - type.skslType(), + mods, + *type, this->position(name), this->text(name), VariableStorage::kLocal, - initializer.releaseIfPossible()); + std::move(initializer)); for (;;) { if (!this->checkNext(Token::Kind::TK_COMMA)) { this->expect(Token::Kind::TK_SEMICOLON, "';'"); @@ -826,28 +839,27 @@ DSLStatement Parser::localVarDeclarationEnd(Position pos, if (!this->parseArrayDimensions(pos, &type)) { break; } - DSLExpression anotherInitializer; + std::unique_ptr anotherInitializer; if (!this->parseInitializer(pos, &anotherInitializer)) { break; } - std::unique_ptr next = - VarDeclaration::Convert(fCompiler.context(), - this->rangeFrom(identifierName), - mods.fPosition, - mods.fModifiers, - type.skslType(), - this->position(identifierName), - this->text(identifierName), - VariableStorage::kLocal, - anotherInitializer.releaseIfPossible()); + std::unique_ptr next = VarDeclaration::Convert(fCompiler.context(), + this->rangeFrom(identifierName), + mods, + *type, + this->position(identifierName), + this->text(identifierName), + VariableStorage::kLocal, + std::move(anotherInitializer)); result = Block::MakeCompoundStatement(std::move(result), std::move(next)); } - return DSLStatement(std::move(result), this->rangeFrom(pos)); + pos = this->rangeFrom(pos); + return this->statementOrNop(pos, std::move(result)); } /* (varDeclarations | expressionStatement) */ -DSLStatement Parser::varDeclarationsOrExpressionStatement() { +std::unique_ptr Parser::varDeclarationsOrExpressionStatement() { Token nextToken = this->peek(); if (nextToken.fKind == Token::Kind::TK_CONST) { // Statements that begin with `const` might be variable declarations, but can't be legal @@ -883,75 +895,76 @@ bool Parser::varDeclarationsPrefix(VarDeclarationsPrefix* prefixData) { prefixData->fPosition = this->position(this->peek()); prefixData->fModifiers = this->modifiers(); prefixData->fType = this->type(&prefixData->fModifiers); - if (!prefixData->fType.hasValue()) { + if (!prefixData->fType) { return false; } return this->expectIdentifier(&prefixData->fName); } /* modifiers type IDENTIFIER varDeclarationEnd */ -DSLStatement Parser::varDeclarations() { +std::unique_ptr Parser::varDeclarations() { VarDeclarationsPrefix prefix; if (!this->varDeclarationsPrefix(&prefix)) { - return {}; + return nullptr; } return this->localVarDeclarationEnd(prefix.fPosition, prefix.fModifiers, prefix.fType, - prefix.fName); + prefix.fName); } /* STRUCT IDENTIFIER LBRACE varDeclaration* RBRACE */ -DSLType Parser::structDeclaration() { +const Type* Parser::structDeclaration() { AutoDepth depth(this); Position start = this->position(this->peek()); if (!this->expect(Token::Kind::TK_STRUCT, "'struct'")) { - return DSLType(nullptr); + return nullptr; } Token name; if (!this->expectIdentifier(&name)) { - return DSLType(nullptr); + return nullptr; } if (!this->expect(Token::Kind::TK_LBRACE, "'{'")) { - return DSLType(nullptr); + return nullptr; } if (!depth.increase()) { - return DSLType(nullptr); + return nullptr; } TArray fields; while (!this->checkNext(Token::Kind::TK_RBRACE)) { Token fieldStart = this->peek(); - DSLModifiers modifiers = this->modifiers(); - DSLType type = this->type(&modifiers); - if (!type.hasValue()) { - return DSLType(nullptr); + Modifiers modifiers = this->modifiers(); + const Type* type = this->type(&modifiers); + if (!type) { + return nullptr; } do { - DSLType actualType = type; + const Type* actualType = type; Token memberName; if (!this->expectIdentifier(&memberName)) { - return DSLType(nullptr); + return nullptr; } while (this->checkNext(Token::Kind::TK_LBRACKET)) { SKSL_INT size; if (!this->arraySize(&size)) { - return DSLType(nullptr); + return nullptr; } if (!this->expect(Token::Kind::TK_RBRACKET, "']'")) { - return DSLType(nullptr); + return nullptr; } - actualType = dsl::Array(actualType, size, - this->rangeFrom(this->position(fieldStart))); + actualType = this->arrayType(actualType, size, + this->rangeFrom(this->position(fieldStart))); } fields.push_back(SkSL::Field(this->rangeFrom(fieldStart), - modifiers.fModifiers, + modifiers.fLayout, + modifiers.fFlags, this->text(memberName), - &actualType.skslType())); + actualType)); } while (this->checkNext(Token::Kind::TK_COMMA)); if (!this->expect(Token::Kind::TK_SEMICOLON, "';'")) { - return DSLType(nullptr); + return nullptr; } } std::unique_ptr def = StructDefinition::Convert(fCompiler.context(), @@ -959,18 +972,18 @@ DSLType Parser::structDeclaration() { this->text(name), std::move(fields)); if (!def) { - return DSLType(nullptr); + return nullptr; } - DSLType result(&def->type()); + const Type* result = &def->type(); ThreadContext::ProgramElements().push_back(std::move(def)); return result; } /* structDeclaration ((IDENTIFIER varDeclarationEnd) | SEMICOLON) */ -void Parser::structVarDeclaration(Position start, const DSLModifiers& modifiers) { - DSLType type = this->structDeclaration(); - if (!type.hasValue()) { +void Parser::structVarDeclaration(Position start, const Modifiers& modifiers) { + const Type* type = this->structDeclaration(); + if (!type) { return; } Token name; @@ -984,9 +997,9 @@ void Parser::structVarDeclaration(Position start, const DSLModifiers& modifiers) /* modifiers type IDENTIFIER (LBRACKET INT_LITERAL RBRACKET)? */ bool Parser::parameter(std::unique_ptr* outParam) { Position pos = this->position(this->peek()); - DSLModifiers modifiers = this->modifiers(); - DSLType type = this->type(&modifiers); - if (!type.hasValue()) { + Modifiers modifiers = this->modifiers(); + const Type* type = this->type(&modifiers); + if (!type) { return false; } Token name; @@ -1004,8 +1017,9 @@ bool Parser::parameter(std::unique_ptr* outParam) { *outParam = SkSL::Variable::Convert(fCompiler.context(), this->rangeFrom(pos), modifiers.fPosition, - modifiers.fModifiers, - &type.skslType(), + modifiers.fLayout, + modifiers.fFlags, + type, namePos, nameText, VariableStorage::kParameter); @@ -1044,25 +1058,27 @@ std::string_view Parser::layoutIdentifier() { /* LAYOUT LPAREN IDENTIFIER (EQ INT_LITERAL)? (COMMA IDENTIFIER (EQ INT_LITERAL)?)* RPAREN */ SkSL::Layout Parser::layout() { - using LayoutMap = THashMap; + using LayoutMap = THashMap; static SkNoDestructor sLayoutTokens(LayoutMap{ - {"location", SkSL::Layout::kLocation_Flag}, - {"offset", SkSL::Layout::kOffset_Flag}, - {"binding", SkSL::Layout::kBinding_Flag}, - {"texture", SkSL::Layout::kTexture_Flag}, - {"sampler", SkSL::Layout::kSampler_Flag}, - {"index", SkSL::Layout::kIndex_Flag}, - {"set", SkSL::Layout::kSet_Flag}, - {"builtin", SkSL::Layout::kBuiltin_Flag}, - {"input_attachment_index", SkSL::Layout::kInputAttachmentIndex_Flag}, - {"origin_upper_left", SkSL::Layout::kOriginUpperLeft_Flag}, - {"blend_support_all_equations", SkSL::Layout::kBlendSupportAllEquations_Flag}, - {"push_constant", SkSL::Layout::kPushConstant_Flag}, - {"color", SkSL::Layout::kColor_Flag}, - {"spirv", SkSL::Layout::kSPIRV_Flag}, - {"metal", SkSL::Layout::kMetal_Flag}, - {"gl", SkSL::Layout::kGL_Flag}, - {"wgsl", SkSL::Layout::kWGSL_Flag}, + {"location", SkSL::LayoutFlag::kLocation}, + {"offset", SkSL::LayoutFlag::kOffset}, + {"binding", SkSL::LayoutFlag::kBinding}, + {"texture", SkSL::LayoutFlag::kTexture}, + {"sampler", SkSL::LayoutFlag::kSampler}, + {"index", SkSL::LayoutFlag::kIndex}, + {"set", SkSL::LayoutFlag::kSet}, + {"builtin", SkSL::LayoutFlag::kBuiltin}, + {"input_attachment_index", SkSL::LayoutFlag::kInputAttachmentIndex}, + {"origin_upper_left", SkSL::LayoutFlag::kOriginUpperLeft}, + {"blend_support_all_equations", SkSL::LayoutFlag::kBlendSupportAllEquations}, + {"push_constant", SkSL::LayoutFlag::kPushConstant}, + {"color", SkSL::LayoutFlag::kColor}, + {"spirv", SkSL::LayoutFlag::kSPIRV}, + {"metal", SkSL::LayoutFlag::kMetal}, + {"wgsl", SkSL::LayoutFlag::kWGSL}, + {"local_size_x", SkSL::LayoutFlag::kLocalSizeX}, + {"local_size_y", SkSL::LayoutFlag::kLocalSizeY}, + {"local_size_z", SkSL::LayoutFlag::kLocalSizeZ}, }); Layout result; @@ -1072,7 +1088,7 @@ SkSL::Layout Parser::layout() { for (;;) { Token t = this->nextToken(); std::string_view text = this->text(t); - SkSL::Layout::Flag* found = sLayoutTokens->find(text); + SkSL::LayoutFlag* found = sLayoutTokens->find(text); if (!found) { this->error(t, "'" + std::string(text) + "' is not a valid layout qualifier"); @@ -1085,33 +1101,42 @@ SkSL::Layout Parser::layout() { result.fFlags |= *found; switch (*found) { - case SkSL::Layout::kLocation_Flag: + case SkSL::LayoutFlag::kLocation: result.fLocation = this->layoutInt(); break; - case SkSL::Layout::kOffset_Flag: + case SkSL::LayoutFlag::kOffset: result.fOffset = this->layoutInt(); break; - case SkSL::Layout::kBinding_Flag: + case SkSL::LayoutFlag::kBinding: result.fBinding = this->layoutInt(); break; - case SkSL::Layout::kIndex_Flag: + case SkSL::LayoutFlag::kIndex: result.fIndex = this->layoutInt(); break; - case SkSL::Layout::kSet_Flag: + case SkSL::LayoutFlag::kSet: result.fSet = this->layoutInt(); break; - case SkSL::Layout::kTexture_Flag: + case SkSL::LayoutFlag::kTexture: result.fTexture = this->layoutInt(); break; - case SkSL::Layout::kSampler_Flag: + case SkSL::LayoutFlag::kSampler: result.fSampler = this->layoutInt(); break; - case SkSL::Layout::kBuiltin_Flag: + case SkSL::LayoutFlag::kBuiltin: result.fBuiltin = this->layoutInt(); break; - case SkSL::Layout::kInputAttachmentIndex_Flag: + case SkSL::LayoutFlag::kInputAttachmentIndex: result.fInputAttachmentIndex = this->layoutInt(); break; + case SkSL::LayoutFlag::kLocalSizeX: + result.fLocalSizeX = this->layoutInt(); + break; + case SkSL::LayoutFlag::kLocalSizeY: + result.fLocalSizeY = this->layoutInt(); + break; + case SkSL::LayoutFlag::kLocalSizeZ: + result.fLocalSizeZ = this->layoutInt(); + break; default: break; } @@ -1129,7 +1154,7 @@ SkSL::Layout Parser::layout() { /* layout? (UNIFORM | CONST | IN | OUT | INOUT | LOWP | MEDIUMP | HIGHP | FLAT | NOPERSPECTIVE | VARYING | INLINE | WORKGROUP | READONLY | WRITEONLY | BUFFER)* */ -DSLModifiers Parser::modifiers() { +Modifiers Parser::modifiers() { int start = this->peek().fOffset; SkSL::Layout layout = this->layout(); Token raw = this->nextRawToken(); @@ -1137,29 +1162,38 @@ DSLModifiers Parser::modifiers() { if (!is_whitespace(raw.fKind)) { this->pushback(raw); } - int flags = 0; + ModifierFlags flags = ModifierFlag::kNone; for (;;) { - int tokenFlag = parse_modifier_token(peek().fKind); - if (!tokenFlag) { + ModifierFlags tokenFlag = parse_modifier_token(peek().fKind); + if (tokenFlag == ModifierFlag::kNone) { break; } Token modifier = this->nextToken(); - if (int duplicateFlags = (tokenFlag & flags)) { - this->error(modifier, "'" + Modifiers::DescribeFlags(duplicateFlags) + - "' appears more than once"); + if (ModifierFlags duplicateFlags = (tokenFlag & flags)) { + this->error(modifier, "'" + duplicateFlags.description() + "' appears more than once"); } flags |= tokenFlag; end = this->position(modifier).endOffset(); } - return DSLModifiers{Modifiers(layout, flags), Position::Range(start, end)}; + return Modifiers{Position::Range(start, end), layout, flags}; +} + +std::unique_ptr Parser::statementOrNop(Position pos, std::unique_ptr stmt) { + if (!stmt) { + stmt = Nop::Make(); + } + if (pos.valid() && !stmt->position().valid()) { + stmt->setPosition(pos); + } + return stmt; } /* ifStatement | forStatement | doStatement | whileStatement | block | expression */ -DSLStatement Parser::statement() { +std::unique_ptr Parser::statement() { Token start = this->nextToken(); AutoDepth depth(this); if (!depth.increase()) { - return {}; + return nullptr; } this->pushback(start); switch (start.fKind) { @@ -1181,13 +1215,11 @@ DSLStatement Parser::statement() { return this->continueStatement(); case Token::Kind::TK_DISCARD: return this->discardStatement(); - case Token::Kind::TK_LBRACE: { - std::optional result = this->block(); - return result ? std::move(*result) : DSLStatement(); - } + case Token::Kind::TK_LBRACE: + return this->block(); case Token::Kind::TK_SEMICOLON: this->nextToken(); - return DSLStatement(Nop::Make()); + return Nop::Make(); case Token::Kind::TK_HIGHP: case Token::Kind::TK_MEDIUMP: case Token::Kind::TK_LOWP: @@ -1199,39 +1231,61 @@ DSLStatement Parser::statement() { } } +const Type* Parser::findType(Position pos, + Modifiers* modifiers, + std::string_view name) { + const Context& context = fCompiler.context(); + const Symbol* symbol = this->symbolTable()->find(name); + if (!symbol) { + this->error(pos, "no symbol named '" + std::string(name) + "'"); + return context.fTypes.fPoison.get(); + } + if (!symbol->is()) { + this->error(pos, "symbol '" + std::string(name) + "' is not a type"); + return context.fTypes.fPoison.get(); + } + const SkSL::Type* type = &symbol->as(); + if (!context.fConfig->fIsBuiltinCode) { + if (!TypeReference::VerifyType(context, type, pos)) { + return context.fTypes.fPoison.get(); + } + } + return modifiers ? type->applyQualifiers(context, &modifiers->fFlags, modifiers->fPosition) + : type; +} + /* IDENTIFIER(type) (LBRACKET intLiteral? RBRACKET)* QUESTION? */ -DSLType Parser::type(DSLModifiers* modifiers) { +const Type* Parser::type(Modifiers* modifiers) { Token type; if (!this->expect(Token::Kind::TK_IDENTIFIER, "a type", &type)) { - return DSLType(nullptr); + return nullptr; } if (!this->symbolTable()->isType(this->text(type))) { this->error(type, "no type named '" + std::string(this->text(type)) + "'"); - return DSLType::Invalid(); + return fCompiler.context().fTypes.fInvalid.get(); } - DSLType result(this->text(type), this->position(type), - &modifiers->fModifiers, modifiers->fPosition); - if (result.isInterfaceBlock()) { + const Type* result = this->findType(this->position(type), modifiers, this->text(type)); + if (result->isInterfaceBlock()) { // SkSL puts interface blocks into the symbol table, but they aren't general-purpose types; // you can't use them to declare a variable type or a function return type. this->error(type, "expected a type, found '" + std::string(this->text(type)) + "'"); - return DSLType::Invalid(); + return fCompiler.context().fTypes.fInvalid.get(); } Token bracket; while (this->checkNext(Token::Kind::TK_LBRACKET, &bracket)) { if (this->checkNext(Token::Kind::TK_RBRACKET)) { if (this->allowUnsizedArrays()) { - result = UnsizedArray(result, this->rangeFrom(type)); + result = this->unsizedArrayType(result, this->rangeFrom(type)); } else { this->error(this->rangeFrom(bracket), "unsized arrays are not permitted here"); } } else { SKSL_INT size; if (!this->arraySize(&size)) { - return DSLType(nullptr); + return nullptr; } this->expect(Token::Kind::TK_RBRACKET, "']'"); - result = Array(result, size, this->rangeFrom(type)); + result = this->arrayType(result, size, this->rangeFrom(type)); } } return result; @@ -1240,7 +1294,7 @@ DSLType Parser::type(DSLModifiers* modifiers) { /* IDENTIFIER LBRACE varDeclaration+ RBRACE (IDENTIFIER (LBRACKET expression RBRACKET)*)? SEMICOLON */ -bool Parser::interfaceBlock(const dsl::DSLModifiers& modifiers) { +bool Parser::interfaceBlock(const Modifiers& modifiers) { Token typeName; if (!this->expectIdentifier(&typeName)) { return false; @@ -1256,9 +1310,9 @@ bool Parser::interfaceBlock(const dsl::DSLModifiers& modifiers) { TArray fields; while (!this->checkNext(Token::Kind::TK_RBRACE)) { Position fieldPos = this->position(this->peek()); - DSLModifiers fieldModifiers = this->modifiers(); - DSLType type = this->type(&fieldModifiers); - if (!type.hasValue()) { + Modifiers fieldModifiers = this->modifiers(); + const Type* type = this->type(&fieldModifiers); + if (!type) { return false; } do { @@ -1266,7 +1320,7 @@ bool Parser::interfaceBlock(const dsl::DSLModifiers& modifiers) { if (!this->expectIdentifier(&fieldName)) { return false; } - DSLType actualType = type; + const Type* actualType = type; if (this->checkNext(Token::Kind::TK_LBRACKET)) { Token sizeToken = this->peek(); if (sizeToken.fKind != Token::Kind::TK_RBRACKET) { @@ -1274,9 +1328,9 @@ bool Parser::interfaceBlock(const dsl::DSLModifiers& modifiers) { if (!this->arraySize(&size)) { return false; } - actualType = Array(std::move(actualType), size, this->position(typeName)); + actualType = this->arrayType(actualType, size, this->position(typeName)); } else if (this->allowUnsizedArrays()) { - actualType = UnsizedArray(std::move(actualType), this->position(typeName)); + actualType = this->unsizedArrayType(actualType, this->position(typeName)); } else { this->error(sizeToken, "unsized arrays are not permitted here"); } @@ -1287,9 +1341,10 @@ bool Parser::interfaceBlock(const dsl::DSLModifiers& modifiers) { } fields.push_back(SkSL::Field(this->rangeFrom(fieldPos), - fieldModifiers.fModifiers, + fieldModifiers.fLayout, + fieldModifiers.fFlags, this->text(fieldName), - &actualType.skslType())); + actualType)); } while (this->checkNext(Token::Kind::TK_COMMA)); } std::string_view instanceName; @@ -1308,8 +1363,7 @@ bool Parser::interfaceBlock(const dsl::DSLModifiers& modifiers) { if (std::unique_ptr ib = InterfaceBlock::Convert(fCompiler.context(), this->position(typeName), - modifiers.fModifiers, - modifiers.fPosition, + modifiers, this->text(typeName), std::move(fields), instanceName, @@ -1321,95 +1375,95 @@ bool Parser::interfaceBlock(const dsl::DSLModifiers& modifiers) { } /* IF LPAREN expression RPAREN statement (ELSE statement)? */ -DSLStatement Parser::ifStatement() { +std::unique_ptr Parser::ifStatement() { Token start; if (!this->expect(Token::Kind::TK_IF, "'if'", &start)) { - return {}; + return nullptr; } if (!this->expect(Token::Kind::TK_LPAREN, "'('")) { - return {}; + return nullptr; } - DSLExpression test = this->expression(); - if (!test.hasValue()) { - return {}; + std::unique_ptr test = this->expression(); + if (!test) { + return nullptr; } if (!this->expect(Token::Kind::TK_RPAREN, "')'")) { - return {}; + return nullptr; } - DSLStatement ifTrue = this->statement(); - if (!ifTrue.hasValue()) { - return {}; + std::unique_ptr ifTrue = this->statement(); + if (!ifTrue) { + return nullptr; } - DSLStatement ifFalse; + std::unique_ptr ifFalse; if (this->checkNext(Token::Kind::TK_ELSE)) { ifFalse = this->statement(); - if (!ifFalse.hasValue()) { - return {}; + if (!ifFalse) { + return nullptr; } } Position pos = this->rangeFrom(start); - return DSLStatement(IfStatement::Convert(fCompiler.context(), - pos, - test.release(), - ifTrue.release(), - ifFalse.releaseIfPossible()), pos); + return this->statementOrNop(pos, IfStatement::Convert(fCompiler.context(), + pos, + std::move(test), + std::move(ifTrue), + std::move(ifFalse))); } /* DO statement WHILE LPAREN expression RPAREN SEMICOLON */ -DSLStatement Parser::doStatement() { +std::unique_ptr Parser::doStatement() { Token start; if (!this->expect(Token::Kind::TK_DO, "'do'", &start)) { - return {}; + return nullptr; } - DSLStatement statement = this->statement(); - if (!statement.hasValue()) { - return {}; + std::unique_ptr statement = this->statement(); + if (!statement) { + return nullptr; } if (!this->expect(Token::Kind::TK_WHILE, "'while'")) { - return {}; + return nullptr; } if (!this->expect(Token::Kind::TK_LPAREN, "'('")) { - return {}; + return nullptr; } - DSLExpression test = this->expression(); - if (!test.hasValue()) { - return {}; + std::unique_ptr test = this->expression(); + if (!test) { + return nullptr; } if (!this->expect(Token::Kind::TK_RPAREN, "')'")) { - return {}; + return nullptr; } if (!this->expect(Token::Kind::TK_SEMICOLON, "';'")) { - return {}; + return nullptr; } Position pos = this->rangeFrom(start); - return DSLStatement(DoStatement::Convert(fCompiler.context(), pos, - statement.release(), test.release()), pos); + return this->statementOrNop(pos, DoStatement::Convert(fCompiler.context(), pos, + std::move(statement), std::move(test))); } /* WHILE LPAREN expression RPAREN STATEMENT */ -DSLStatement Parser::whileStatement() { +std::unique_ptr Parser::whileStatement() { Token start; if (!this->expect(Token::Kind::TK_WHILE, "'while'", &start)) { - return {}; + return nullptr; } if (!this->expect(Token::Kind::TK_LPAREN, "'('")) { - return {}; + return nullptr; } - DSLExpression test = this->expression(); - if (!test.hasValue()) { - return {}; + std::unique_ptr test = this->expression(); + if (!test) { + return nullptr; } if (!this->expect(Token::Kind::TK_RPAREN, "')'")) { - return {}; + return nullptr; } - DSLStatement statement = this->statement(); - if (!statement.hasValue()) { - return {}; + std::unique_ptr statement = this->statement(); + if (!statement) { + return nullptr; } Position pos = this->rangeFrom(start); - return DSLStatement(ForStatement::ConvertWhile(fCompiler.context(), pos, - test.release(), - statement.release()), pos); + return this->statementOrNop(pos, ForStatement::ConvertWhile(fCompiler.context(), pos, + std::move(test), + std::move(statement))); } /* COLON statement* */ @@ -1423,11 +1477,11 @@ bool Parser::switchCaseBody(ExpressionArray* values, while (this->peek().fKind != Token::Kind::TK_RBRACE && this->peek().fKind != Token::Kind::TK_CASE && this->peek().fKind != Token::Kind::TK_DEFAULT) { - DSLStatement s = this->statement(); - if (!s.hasValue()) { + std::unique_ptr s = this->statement(); + if (!s) { return false; } - statements.push_back(s.release()); + statements.push_back(std::move(s)); } values->push_back(std::move(caseValue)); caseBlocks->push_back(SkSL::Block::Make(Position(), std::move(statements), @@ -1441,55 +1495,55 @@ bool Parser::switchCase(ExpressionArray* values, StatementArray* caseBlocks) { if (!this->expect(Token::Kind::TK_CASE, "'case'", &start)) { return false; } - DSLExpression caseValue = this->expression(); - if (!caseValue.hasValue()) { + std::unique_ptr caseValue = this->expression(); + if (!caseValue) { return false; } - return this->switchCaseBody(values, caseBlocks, caseValue.release()); + return this->switchCaseBody(values, caseBlocks, std::move(caseValue)); } /* SWITCH LPAREN expression RPAREN LBRACE switchCase* (DEFAULT COLON statement*)? RBRACE */ -DSLStatement Parser::switchStatement() { +std::unique_ptr Parser::switchStatement() { Token start; if (!this->expect(Token::Kind::TK_SWITCH, "'switch'", &start)) { - return {}; + return nullptr; } if (!this->expect(Token::Kind::TK_LPAREN, "'('")) { - return {}; + return nullptr; } - DSLExpression value = this->expression(); - if (!value.hasValue()) { - return {}; + std::unique_ptr value = this->expression(); + if (!value) { + return nullptr; } if (!this->expect(Token::Kind::TK_RPAREN, "')'")) { - return {}; + return nullptr; } if (!this->expect(Token::Kind::TK_LBRACE, "'{'")) { - return {}; + return nullptr; } ExpressionArray values; StatementArray caseBlocks; while (this->peek().fKind == Token::Kind::TK_CASE) { if (!this->switchCase(&values, &caseBlocks)) { - return {}; + return nullptr; } } // Requiring `default:` to be last (in defiance of C and GLSL) was a deliberate decision. Other // parts of the compiler are allowed to rely upon this assumption. if (this->checkNext(Token::Kind::TK_DEFAULT)) { if (!this->switchCaseBody(&values, &caseBlocks, /*value=*/nullptr)) { - return {}; + return nullptr; } } if (!this->expect(Token::Kind::TK_RBRACE, "'}'")) { - return {}; + return nullptr; } Position pos = this->rangeFrom(start); - return DSLStatement(SwitchStatement::Convert(fCompiler.context(), pos, - value.release(), - std::move(values), - std::move(caseBlocks)), pos); + return this->statementOrNop(pos, SwitchStatement::Convert(fCompiler.context(), pos, + std::move(value), + std::move(values), + std::move(caseBlocks))); } static Position range_of_at_least_one_char(int start, int end) { @@ -1498,17 +1552,17 @@ static Position range_of_at_least_one_char(int start, int end) { /* FOR LPAREN (declaration | expression)? SEMICOLON expression? SEMICOLON expression? RPAREN STATEMENT */ -dsl::DSLStatement Parser::forStatement() { +std::unique_ptr Parser::forStatement() { Token start; if (!this->expect(Token::Kind::TK_FOR, "'for'", &start)) { - return {}; + return nullptr; } Token lparen; if (!this->expect(Token::Kind::TK_LPAREN, "'('", &lparen)) { - return {}; + return nullptr; } AutoSymbolTable symbols(this); - dsl::DSLStatement initializer; + std::unique_ptr initializer; Token nextToken = this->peek(); int firstSemicolonOffset; if (nextToken.fKind == Token::Kind::TK_SEMICOLON) { @@ -1517,36 +1571,36 @@ dsl::DSLStatement Parser::forStatement() { } else { // The init-statement must be an expression or variable declaration. initializer = this->varDeclarationsOrExpressionStatement(); - if (!initializer.hasValue()) { - return {}; + if (!initializer) { + return nullptr; } firstSemicolonOffset = fLexer.getCheckpoint().fOffset - 1; } - dsl::DSLExpression test; + std::unique_ptr test; if (this->peek().fKind != Token::Kind::TK_SEMICOLON) { test = this->expression(); - if (!test.hasValue()) { - return {}; + if (!test) { + return nullptr; } } Token secondSemicolon; if (!this->expect(Token::Kind::TK_SEMICOLON, "';'", &secondSemicolon)) { - return {}; + return nullptr; } - dsl::DSLExpression next; + std::unique_ptr next; if (this->peek().fKind != Token::Kind::TK_RPAREN) { next = this->expression(); - if (!next.hasValue()) { - return {}; + if (!next) { + return nullptr; } } Token rparen; if (!this->expect(Token::Kind::TK_RPAREN, "')'", &rparen)) { - return {}; + return nullptr; } - dsl::DSLStatement statement = this->statement(); - if (!statement.hasValue()) { - return {}; + std::unique_ptr statement = this->statement(); + if (!statement) { + return nullptr; } Position pos = this->rangeFrom(start); ForLoopPositions loopPositions{ @@ -1554,80 +1608,80 @@ dsl::DSLStatement Parser::forStatement() { range_of_at_least_one_char(firstSemicolonOffset + 1, secondSemicolon.fOffset), range_of_at_least_one_char(secondSemicolon.fOffset + 1, rparen.fOffset), }; - return DSLStatement(ForStatement::Convert(fCompiler.context(), pos, loopPositions, - initializer.releaseIfPossible(), - test.releaseIfPossible(), - next.releaseIfPossible(), - statement.release()), pos); + return this->statementOrNop(pos, ForStatement::Convert(fCompiler.context(), pos, loopPositions, + std::move(initializer), + std::move(test), + std::move(next), + std::move(statement))); } /* RETURN expression? SEMICOLON */ -DSLStatement Parser::returnStatement() { +std::unique_ptr Parser::returnStatement() { Token start; if (!this->expect(Token::Kind::TK_RETURN, "'return'", &start)) { - return {}; + return nullptr; } - DSLExpression expression; + std::unique_ptr expression; if (this->peek().fKind != Token::Kind::TK_SEMICOLON) { expression = this->expression(); - if (!expression.hasValue()) { - return {}; + if (!expression) { + return nullptr; } } if (!this->expect(Token::Kind::TK_SEMICOLON, "';'")) { - return {}; + return nullptr; } // We do not check for errors, or coerce the value to the correct type, until the return // statement is actually added to a function. (This is done in FunctionDefinition::Convert.) - return ReturnStatement::Make(this->rangeFrom(start), expression.releaseIfPossible()); + return ReturnStatement::Make(this->rangeFrom(start), std::move(expression)); } /* BREAK SEMICOLON */ -DSLStatement Parser::breakStatement() { +std::unique_ptr Parser::breakStatement() { Token start; if (!this->expect(Token::Kind::TK_BREAK, "'break'", &start)) { - return {}; + return nullptr; } if (!this->expect(Token::Kind::TK_SEMICOLON, "';'")) { - return {}; + return nullptr; } return SkSL::BreakStatement::Make(this->position(start)); } /* CONTINUE SEMICOLON */ -DSLStatement Parser::continueStatement() { +std::unique_ptr Parser::continueStatement() { Token start; if (!this->expect(Token::Kind::TK_CONTINUE, "'continue'", &start)) { - return {}; + return nullptr; } if (!this->expect(Token::Kind::TK_SEMICOLON, "';'")) { - return {}; + return nullptr; } return SkSL::ContinueStatement::Make(this->position(start)); } /* DISCARD SEMICOLON */ -DSLStatement Parser::discardStatement() { +std::unique_ptr Parser::discardStatement() { Token start; if (!this->expect(Token::Kind::TK_DISCARD, "'continue'", &start)) { - return {}; + return nullptr; } if (!this->expect(Token::Kind::TK_SEMICOLON, "';'")) { - return {}; + return nullptr; } Position pos = this->position(start); - return DSLStatement(SkSL::DiscardStatement::Convert(fCompiler.context(), pos), pos); + return this->statementOrNop(pos, SkSL::DiscardStatement::Convert(fCompiler.context(), pos)); } /* LBRACE statement* RBRACE */ -std::optional Parser::block() { +std::unique_ptr Parser::block() { AutoDepth depth(this); Token start; if (!this->expect(Token::Kind::TK_LBRACE, "'{'", &start)) { - return std::nullopt; + return nullptr; } if (!depth.increase()) { - return std::nullopt; + return nullptr; } AutoSymbolTable symbols(this); StatementArray statements; @@ -1636,21 +1690,21 @@ std::optional Parser::block() { case Token::Kind::TK_RBRACE: { this->nextToken(); Position pos = this->rangeFrom(start); - return DSLStatement(SkSL::Block::MakeBlock(pos, std::move(statements), - Block::Kind::kBracedScope, - this->symbolTable()), pos); + return SkSL::Block::MakeBlock(pos, std::move(statements), + Block::Kind::kBracedScope, + this->symbolTable()); } case Token::Kind::TK_END_OF_FILE: { this->error(this->peek(), "expected '}', but found end of file"); - return std::nullopt; + return nullptr; } default: { - DSLStatement statement = this->statement(); + std::unique_ptr statement = this->statement(); if (fEncounteredFatalError) { - return std::nullopt; + return nullptr; } - if (statement.hasValue()) { - statements.push_back(statement.release()); + if (statement) { + statements.push_back(std::move(statement)); } break; } @@ -1659,56 +1713,79 @@ std::optional Parser::block() { } /* expression SEMICOLON */ -DSLStatement Parser::expressionStatement() { - DSLExpression expr = this->expression(); - if (expr.hasValue()) { - if (!this->expect(Token::Kind::TK_SEMICOLON, "';'")) { - return {}; - } - return DSLStatement(std::move(expr)); +std::unique_ptr Parser::expressionStatement() { + std::unique_ptr expr = this->expression(); + if (!expr) { + return nullptr; + } + if (!this->expect(Token::Kind::TK_SEMICOLON, "';'")) { + return nullptr; + } + Position pos = expr->position(); + return this->statementOrNop(pos, SkSL::ExpressionStatement::Convert(fCompiler.context(), + std::move(expr))); +} + +std::unique_ptr Parser::poison(Position pos) { + return Poison::Make(pos, fCompiler.context()); +} + +std::unique_ptr Parser::expressionOrPoison(Position pos, + std::unique_ptr expr) { + if (!expr) { + // If no expression was passed in, create a poison expression. + expr = this->poison(pos); } - return {}; + // If a valid position was passed in, it must match the expression's position. + SkASSERTF(!pos.valid() || expr->position() == pos, + "expected expression position (%d-%d), but received (%d-%d)", + pos.startOffset(), + pos.endOffset(), + expr->position().startOffset(), + expr->position().endOffset()); + return expr; } bool Parser::operatorRight(Parser::AutoDepth& depth, Operator::Kind op, BinaryParseFn rightFn, - DSLExpression& expr) { + std::unique_ptr& expr) { this->nextToken(); if (!depth.increase()) { return false; } - DSLExpression right = (this->*rightFn)(); - if (!right.hasValue()) { + std::unique_ptr right = (this->*rightFn)(); + if (!right) { return false; } - Position pos = expr.position().rangeThrough(right.position()); - expr = DSLExpression(BinaryExpression::Convert(fCompiler.context(), pos, - expr.release(), op, right.release()), pos); + Position pos = expr->position().rangeThrough(right->position()); + expr = this->expressionOrPoison(pos, BinaryExpression::Convert(fCompiler.context(), pos, + std::move(expr), op, + std::move(right))); return true; } /* assignmentExpression (COMMA assignmentExpression)* */ -DSLExpression Parser::expression() { +std::unique_ptr Parser::expression() { AutoDepth depth(this); [[maybe_unused]] Token start = this->peek(); - DSLExpression result = this->assignmentExpression(); - if (!result.hasValue()) { - return {}; + std::unique_ptr result = this->assignmentExpression(); + if (!result) { + return nullptr; } while (this->peek().fKind == Token::Kind::TK_COMMA) { if (!this->operatorRight(depth, Operator::Kind::COMMA, &Parser::assignmentExpression, result)) { - return {}; + return nullptr; } } - SkASSERTF(result.position().valid(), "Expression %s has invalid position", - result.description().c_str()); - SkASSERTF(result.position().startOffset() == this->position(start).startOffset(), + SkASSERTF(result->position().valid(), "Expression %s has invalid position", + result->description().c_str()); + SkASSERTF(result->position().startOffset() == this->position(start).startOffset(), "Expected %s to start at %d (first token: '%.*s'), but it has range %d-%d\n", - result.description().c_str(), this->position(start).startOffset(), + result->description().c_str(), this->position(start).startOffset(), (int)this->text(start).length(), this->text(start).data(), - result.position().startOffset(), result.position().endOffset()); + result->position().startOffset(), result->position().endOffset()); return result; } @@ -1716,11 +1793,11 @@ DSLExpression Parser::expression() { BITWISEANDEQ | BITWISEXOREQ | BITWISEOREQ | LOGICALANDEQ | LOGICALXOREQ | LOGICALOREQ) assignmentExpression)* */ -DSLExpression Parser::assignmentExpression() { +std::unique_ptr Parser::assignmentExpression() { AutoDepth depth(this); - DSLExpression result = this->ternaryExpression(); - if (!result.hasValue()) { - return {}; + std::unique_ptr result = this->ternaryExpression(); + if (!result) { + return nullptr; } for (;;) { Operator::Kind op; @@ -1739,142 +1816,144 @@ DSLExpression Parser::assignmentExpression() { default: return result; } if (!this->operatorRight(depth, op, &Parser::assignmentExpression, result)) { - return {}; + return nullptr; } } } /* logicalOrExpression ('?' expression ':' assignmentExpression)? */ -DSLExpression Parser::ternaryExpression() { +std::unique_ptr Parser::ternaryExpression() { AutoDepth depth(this); - DSLExpression base = this->logicalOrExpression(); - if (!base.hasValue()) { - return {}; + std::unique_ptr base = this->logicalOrExpression(); + if (!base) { + return nullptr; } if (!this->checkNext(Token::Kind::TK_QUESTION)) { return base; } if (!depth.increase()) { - return {}; + return nullptr; } - DSLExpression trueExpr = this->expression(); - if (!trueExpr.hasValue()) { - return {}; + std::unique_ptr trueExpr = this->expression(); + if (!trueExpr) { + return nullptr; } if (!this->expect(Token::Kind::TK_COLON, "':'")) { - return {}; + return nullptr; } - DSLExpression falseExpr = this->assignmentExpression(); - if (!falseExpr.hasValue()) { - return {}; + std::unique_ptr falseExpr = this->assignmentExpression(); + if (!falseExpr) { + return nullptr; } - Position pos = base.position().rangeThrough(falseExpr.position()); - return DSLExpression(TernaryExpression::Convert(fCompiler.context(), pos, base.release(), - trueExpr.release(), falseExpr.release()), pos); + Position pos = base->position().rangeThrough(falseExpr->position()); + return this->expressionOrPoison(pos, TernaryExpression::Convert(fCompiler.context(), + pos, std::move(base), + std::move(trueExpr), + std::move(falseExpr))); } /* logicalXorExpression (LOGICALOR logicalXorExpression)* */ -DSLExpression Parser::logicalOrExpression() { +std::unique_ptr Parser::logicalOrExpression() { AutoDepth depth(this); - DSLExpression result = this->logicalXorExpression(); - if (!result.hasValue()) { - return {}; + std::unique_ptr result = this->logicalXorExpression(); + if (!result) { + return nullptr; } while (this->peek().fKind == Token::Kind::TK_LOGICALOR) { if (!this->operatorRight(depth, Operator::Kind::LOGICALOR, &Parser::logicalXorExpression, result)) { - return {}; + return nullptr; } } return result; } /* logicalAndExpression (LOGICALXOR logicalAndExpression)* */ -DSLExpression Parser::logicalXorExpression() { +std::unique_ptr Parser::logicalXorExpression() { AutoDepth depth(this); - DSLExpression result = this->logicalAndExpression(); - if (!result.hasValue()) { - return {}; + std::unique_ptr result = this->logicalAndExpression(); + if (!result) { + return nullptr; } while (this->peek().fKind == Token::Kind::TK_LOGICALXOR) { if (!this->operatorRight(depth, Operator::Kind::LOGICALXOR, &Parser::logicalAndExpression, result)) { - return {}; + return nullptr; } } return result; } /* bitwiseOrExpression (LOGICALAND bitwiseOrExpression)* */ -DSLExpression Parser::logicalAndExpression() { +std::unique_ptr Parser::logicalAndExpression() { AutoDepth depth(this); - DSLExpression result = this->bitwiseOrExpression(); - if (!result.hasValue()) { - return {}; + std::unique_ptr result = this->bitwiseOrExpression(); + if (!result) { + return nullptr; } while (this->peek().fKind == Token::Kind::TK_LOGICALAND) { if (!this->operatorRight(depth, Operator::Kind::LOGICALAND, &Parser::bitwiseOrExpression, result)) { - return {}; + return nullptr; } } return result; } /* bitwiseXorExpression (BITWISEOR bitwiseXorExpression)* */ -DSLExpression Parser::bitwiseOrExpression() { +std::unique_ptr Parser::bitwiseOrExpression() { AutoDepth depth(this); - DSLExpression result = this->bitwiseXorExpression(); - if (!result.hasValue()) { - return {}; + std::unique_ptr result = this->bitwiseXorExpression(); + if (!result) { + return nullptr; } while (this->peek().fKind == Token::Kind::TK_BITWISEOR) { if (!this->operatorRight(depth, Operator::Kind::BITWISEOR, &Parser::bitwiseXorExpression, result)) { - return {}; + return nullptr; } } return result; } /* bitwiseAndExpression (BITWISEXOR bitwiseAndExpression)* */ -DSLExpression Parser::bitwiseXorExpression() { +std::unique_ptr Parser::bitwiseXorExpression() { AutoDepth depth(this); - DSLExpression result = this->bitwiseAndExpression(); - if (!result.hasValue()) { - return {}; + std::unique_ptr result = this->bitwiseAndExpression(); + if (!result) { + return nullptr; } while (this->peek().fKind == Token::Kind::TK_BITWISEXOR) { if (!this->operatorRight(depth, Operator::Kind::BITWISEXOR, &Parser::bitwiseAndExpression, result)) { - return {}; + return nullptr; } } return result; } /* equalityExpression (BITWISEAND equalityExpression)* */ -DSLExpression Parser::bitwiseAndExpression() { +std::unique_ptr Parser::bitwiseAndExpression() { AutoDepth depth(this); - DSLExpression result = this->equalityExpression(); - if (!result.hasValue()) { - return {}; + std::unique_ptr result = this->equalityExpression(); + if (!result) { + return nullptr; } while (this->peek().fKind == Token::Kind::TK_BITWISEAND) { if (!this->operatorRight(depth, Operator::Kind::BITWISEAND, &Parser::equalityExpression, result)) { - return {}; + return nullptr; } } return result; } /* relationalExpression ((EQEQ | NEQ) relationalExpression)* */ -DSLExpression Parser::equalityExpression() { +std::unique_ptr Parser::equalityExpression() { AutoDepth depth(this); - DSLExpression result = this->relationalExpression(); - if (!result.hasValue()) { - return {}; + std::unique_ptr result = this->relationalExpression(); + if (!result) { + return nullptr; } for (;;) { Operator::Kind op; @@ -1884,17 +1963,17 @@ DSLExpression Parser::equalityExpression() { default: return result; } if (!this->operatorRight(depth, op, &Parser::relationalExpression, result)) { - return {}; + return nullptr; } } } /* shiftExpression ((LT | GT | LTEQ | GTEQ) shiftExpression)* */ -DSLExpression Parser::relationalExpression() { +std::unique_ptr Parser::relationalExpression() { AutoDepth depth(this); - DSLExpression result = this->shiftExpression(); - if (!result.hasValue()) { - return {}; + std::unique_ptr result = this->shiftExpression(); + if (!result) { + return nullptr; } for (;;) { Operator::Kind op; @@ -1906,17 +1985,17 @@ DSLExpression Parser::relationalExpression() { default: return result; } if (!this->operatorRight(depth, op, &Parser::shiftExpression, result)) { - return {}; + return nullptr; } } } /* additiveExpression ((SHL | SHR) additiveExpression)* */ -DSLExpression Parser::shiftExpression() { +std::unique_ptr Parser::shiftExpression() { AutoDepth depth(this); - DSLExpression result = this->additiveExpression(); - if (!result.hasValue()) { - return {}; + std::unique_ptr result = this->additiveExpression(); + if (!result) { + return nullptr; } for (;;) { Operator::Kind op; @@ -1926,17 +2005,17 @@ DSLExpression Parser::shiftExpression() { default: return result; } if (!this->operatorRight(depth, op, &Parser::additiveExpression, result)) { - return {}; + return nullptr; } } } /* multiplicativeExpression ((PLUS | MINUS) multiplicativeExpression)* */ -DSLExpression Parser::additiveExpression() { +std::unique_ptr Parser::additiveExpression() { AutoDepth depth(this); - DSLExpression result = this->multiplicativeExpression(); - if (!result.hasValue()) { - return {}; + std::unique_ptr result = this->multiplicativeExpression(); + if (!result) { + return nullptr; } for (;;) { Operator::Kind op; @@ -1946,17 +2025,17 @@ DSLExpression Parser::additiveExpression() { default: return result; } if (!this->operatorRight(depth, op, &Parser::multiplicativeExpression, result)) { - return {}; + return nullptr; } } } /* unaryExpression ((STAR | SLASH | PERCENT) unaryExpression)* */ -DSLExpression Parser::multiplicativeExpression() { +std::unique_ptr Parser::multiplicativeExpression() { AutoDepth depth(this); - DSLExpression result = this->unaryExpression(); - if (!result.hasValue()) { - return {}; + std::unique_ptr result = this->unaryExpression(); + if (!result) { + return nullptr; } for (;;) { Operator::Kind op; @@ -1967,13 +2046,13 @@ DSLExpression Parser::multiplicativeExpression() { default: return result; } if (!this->operatorRight(depth, op, &Parser::unaryExpression, result)) { - return {}; + return nullptr; } } } /* postfixExpression | (PLUS | MINUS | NOT | PLUSPLUS | MINUSMINUS) unaryExpression */ -DSLExpression Parser::unaryExpression() { +std::unique_ptr Parser::unaryExpression() { AutoDepth depth(this); Operator::Kind op; Token start = this->peek(); @@ -1988,23 +2067,23 @@ DSLExpression Parser::unaryExpression() { } this->nextToken(); if (!depth.increase()) { - return {}; + return nullptr; } - DSLExpression expr = this->unaryExpression(); - if (!expr.hasValue()) { - return {}; + std::unique_ptr expr = this->unaryExpression(); + if (!expr) { + return nullptr; } - Position pos = Position::Range(start.fOffset, expr.position().endOffset()); - return DSLExpression(PrefixExpression::Convert(fCompiler.context(), - pos, op, expr.release()), pos); + Position pos = Position::Range(start.fOffset, expr->position().endOffset()); + return this->expressionOrPoison(pos, PrefixExpression::Convert(fCompiler.context(), + pos, op, std::move(expr))); } /* term suffix* */ -DSLExpression Parser::postfixExpression() { +std::unique_ptr Parser::postfixExpression() { AutoDepth depth(this); - DSLExpression result = this->term(); - if (!result.hasValue()) { - return {}; + std::unique_ptr result = this->term(); + if (!result) { + return nullptr; } for (;;) { Token t = this->peek(); @@ -2020,11 +2099,11 @@ DSLExpression Parser::postfixExpression() { case Token::Kind::TK_PLUSPLUS: case Token::Kind::TK_MINUSMINUS: { if (!depth.increase()) { - return {}; + return nullptr; } result = this->suffix(std::move(result)); - if (!result.hasValue()) { - return {}; + if (!result) { + return nullptr; } break; } @@ -2034,94 +2113,57 @@ DSLExpression Parser::postfixExpression() { } } -DSLExpression Parser::swizzle(Position pos, - DSLExpression base, - std::string_view swizzleMask, - Position maskPos) { - SkASSERT(swizzleMask.length() > 0); - if (!base.type().isVector() && !base.type().isScalar()) { - return DSLExpression( - FieldAccess::Convert(fCompiler.context(), pos, base.release(), swizzleMask), - pos); - } - int length = swizzleMask.length(); - SkSL::ComponentArray components; - components.resize(4); - for (int i = 0; i < length; ++i) { - if (i >= 4) { - Position errorPos = maskPos.valid() ? Position::Range(maskPos.startOffset() + 4, - maskPos.endOffset()) - : pos; - this->error(errorPos, "too many components in swizzle mask"); - return DSLExpression::Poison(pos); - } - switch (swizzleMask[i]) { - case '0': components[i] = SwizzleComponent::ZERO; break; - case '1': components[i] = SwizzleComponent::ONE; break; - case 'r': components[i] = SwizzleComponent::R; break; - case 'x': components[i] = SwizzleComponent::X; break; - case 's': components[i] = SwizzleComponent::S; break; - case 'L': components[i] = SwizzleComponent::UL; break; - case 'g': components[i] = SwizzleComponent::G; break; - case 'y': components[i] = SwizzleComponent::Y; break; - case 't': components[i] = SwizzleComponent::T; break; - case 'T': components[i] = SwizzleComponent::UT; break; - case 'b': components[i] = SwizzleComponent::B; break; - case 'z': components[i] = SwizzleComponent::Z; break; - case 'p': components[i] = SwizzleComponent::P; break; - case 'R': components[i] = SwizzleComponent::UR; break; - case 'a': components[i] = SwizzleComponent::A; break; - case 'w': components[i] = SwizzleComponent::W; break; - case 'q': components[i] = SwizzleComponent::Q; break; - case 'B': components[i] = SwizzleComponent::UB; break; - default: { - Position componentPos = Position::Range(maskPos.startOffset() + i, - maskPos.startOffset() + i + 1); - this->error(componentPos, String::printf("invalid swizzle component '%c'", - swizzleMask[i]).c_str()); - return DSLExpression::Poison(pos); - } - } +std::unique_ptr Parser::swizzle(Position pos, + std::unique_ptr base, + std::string_view swizzleMask, + Position maskPos) { + SkASSERT(!swizzleMask.empty()); + if (!base->type().isVector() && !base->type().isScalar()) { + return this->expressionOrPoison(pos, FieldAccess::Convert(fCompiler.context(), pos, + std::move(base), swizzleMask)); + } - SkASSERT(length >= 1 && length <= 4); - components.resize(length); - return DSLExpression(Swizzle::Convert(fCompiler.context(), pos, maskPos, - base.release(), std::move(components)), pos); + return this->expressionOrPoison(pos, Swizzle::Convert(fCompiler.context(), pos, maskPos, + std::move(base), swizzleMask)); } -dsl::DSLExpression Parser::call(Position pos, dsl::DSLExpression base, ExpressionArray args) { - return DSLExpression(SkSL::FunctionCall::Convert(fCompiler.context(), pos, base.release(), - std::move(args)), pos); +std::unique_ptr Parser::call(Position pos, + std::unique_ptr base, + ExpressionArray args) { + return this->expressionOrPoison(pos, SkSL::FunctionCall::Convert(fCompiler.context(), pos, + std::move(base), + std::move(args))); } /* LBRACKET expression? RBRACKET | DOT IDENTIFIER | LPAREN arguments RPAREN | PLUSPLUS | MINUSMINUS | COLONCOLON IDENTIFIER | FLOAT_LITERAL [IDENTIFIER] */ -DSLExpression Parser::suffix(DSLExpression base) { +std::unique_ptr Parser::suffix(std::unique_ptr base) { AutoDepth depth(this); Token next = this->nextToken(); if (!depth.increase()) { - return {}; + return nullptr; } switch (next.fKind) { case Token::Kind::TK_LBRACKET: { if (this->checkNext(Token::Kind::TK_RBRACKET)) { this->error(this->rangeFrom(next), "missing index in '[]'"); - return DSLExpression::Poison(this->rangeFrom(base.position())); + return this->poison(this->rangeFrom(base->position())); } - DSLExpression index = this->expression(); - if (!index.hasValue()) { - return {}; + std::unique_ptr index = this->expression(); + if (!index) { + return nullptr; } this->expect(Token::Kind::TK_RBRACKET, "']' to complete array access expression"); - Position pos = this->rangeFrom(base.position()); - return DSLExpression(IndexExpression::Convert(fCompiler.context(), pos, - base.release(), index.release()), pos); + Position pos = this->rangeFrom(base->position()); + return this->expressionOrPoison(pos, IndexExpression::Convert(fCompiler.context(), pos, + std::move(base), + std::move(index))); } case Token::Kind::TK_DOT: { std::string_view text; if (this->identifier(&text)) { - Position pos = this->rangeFrom(base.position()); + Position pos = this->rangeFrom(base->position()); return this->swizzle(pos, std::move(base), text, this->rangeFrom(this->position(next).after())); } @@ -2135,20 +2177,23 @@ DSLExpression Parser::suffix(DSLExpression base) { field.remove_prefix(1); // use the next *raw* token so we don't ignore whitespace - we only care about // identifiers that directly follow the float - Position pos = this->rangeFrom(base.position()); + Position pos = this->rangeFrom(base->position()); Position start = this->position(next); // skip past the "." start = Position::Range(start.startOffset() + 1, start.endOffset()); Position maskPos = this->rangeFrom(start); Token id = this->nextRawToken(); if (id.fKind == Token::Kind::TK_IDENTIFIER) { - pos = this->rangeFrom(base.position()); + pos = this->rangeFrom(base->position()); maskPos = this->rangeFrom(start); - return this->swizzle(pos, std::move(base), std::string(field) + - std::string(this->text(id)), maskPos); - } else if (field.empty()) { + return this->swizzle(pos, + std::move(base), + std::string(field) + std::string(this->text(id)), + maskPos); + } + if (field.empty()) { this->error(pos, "expected field name or swizzle mask after '.'"); - return {{DSLExpression::Poison(pos)}}; + return this->poison(pos); } this->pushback(id); return this->swizzle(pos, std::move(base), field, maskPos); @@ -2157,18 +2202,18 @@ DSLExpression Parser::suffix(DSLExpression base) { ExpressionArray args; if (this->peek().fKind != Token::Kind::TK_RPAREN) { for (;;) { - DSLExpression expr = this->assignmentExpression(); - if (!expr.hasValue()) { - return {}; + std::unique_ptr expr = this->assignmentExpression(); + if (!expr) { + return nullptr; } - args.push_back(expr.release()); + args.push_back(std::move(expr)); if (!this->checkNext(Token::Kind::TK_COMMA)) { break; } } } this->expect(Token::Kind::TK_RPAREN, "')' to complete function arguments"); - Position pos = this->rangeFrom(base.position()); + Position pos = this->rangeFrom(base->position()); return this->call(pos, std::move(base), std::move(args)); } case Token::Kind::TK_PLUSPLUS: @@ -2176,21 +2221,21 @@ DSLExpression Parser::suffix(DSLExpression base) { Operator::Kind op = (next.fKind == Token::Kind::TK_PLUSPLUS) ? Operator::Kind::PLUSPLUS : Operator::Kind::MINUSMINUS; - Position pos = this->rangeFrom(base.position()); - return DSLExpression( - PostfixExpression::Convert(fCompiler.context(), pos, base.release(), op), - pos); + Position pos = this->rangeFrom(base->position()); + return this->expressionOrPoison(pos, PostfixExpression::Convert(fCompiler.context(), + pos, std::move(base), + op)); } default: { this->error(next, "expected expression suffix, but found '" + std::string(this->text(next)) + "'"); - return {}; + return nullptr; } } } /* IDENTIFIER | intLiteral | floatLiteral | boolLiteral | '(' expression ')' */ -DSLExpression Parser::term() { +std::unique_ptr Parser::term() { AutoDepth depth(this); Token t = this->peek(); switch (t.fKind) { @@ -2198,7 +2243,7 @@ DSLExpression Parser::term() { std::string_view text; if (this->identifier(&text)) { Position pos = this->position(t); - return DSLExpression(fCompiler.convertIdentifier(pos, text), pos); + return this->expressionOrPoison(pos, fCompiler.convertIdentifier(pos, text)); } break; } @@ -2208,7 +2253,8 @@ DSLExpression Parser::term() { i = 0; } Position pos = this->position(t); - return DSLExpression(SkSL::Literal::MakeInt(fCompiler.context(), pos, i), pos); + return this->expressionOrPoison(pos, SkSL::Literal::MakeInt(fCompiler.context(), + pos, i)); } case Token::Kind::TK_FLOAT_LITERAL: { SKSL_FLOAT f; @@ -2216,24 +2262,26 @@ DSLExpression Parser::term() { f = 0.0f; } Position pos = this->position(t); - return DSLExpression(SkSL::Literal::MakeFloat(fCompiler.context(), pos, f), pos); + return this->expressionOrPoison(pos, SkSL::Literal::MakeFloat(fCompiler.context(), + pos, f)); } case Token::Kind::TK_TRUE_LITERAL: // fall through case Token::Kind::TK_FALSE_LITERAL: { bool b; SkAssertResult(this->boolLiteral(&b)); Position pos = this->position(t); - return DSLExpression(SkSL::Literal::MakeBool(fCompiler.context(), pos, b), pos); + return this->expressionOrPoison(pos, SkSL::Literal::MakeBool(fCompiler.context(), + pos, b)); } case Token::Kind::TK_LPAREN: { this->nextToken(); if (!depth.increase()) { - return {}; + return nullptr; } - DSLExpression result = this->expression(); - if (result.hasValue()) { + std::unique_ptr result = this->expression(); + if (result != nullptr) { this->expect(Token::Kind::TK_RPAREN, "')' to complete expression"); - result.setPosition(this->rangeFrom(this->position(t))); + result->setPosition(this->rangeFrom(this->position(t))); return result; } break; @@ -2244,7 +2292,7 @@ DSLExpression Parser::term() { fEncounteredFatalError = true; break; } - return {}; + return nullptr; } /* INT_LITERAL */ diff --git a/src/sksl/SkSLParser.h b/src/sksl/SkSLParser.h index ee5c8ed9e469..fba1273e0081 100644 --- a/src/sksl/SkSLParser.h +++ b/src/sksl/SkSLParser.h @@ -14,15 +14,11 @@ #include "src/sksl/SkSLOperator.h" #include "src/sksl/SkSLPosition.h" #include "src/sksl/SkSLProgramSettings.h" -#include "src/sksl/dsl/DSLExpression.h" -#include "src/sksl/dsl/DSLModifiers.h" -#include "src/sksl/dsl/DSLStatement.h" -#include "src/sksl/dsl/DSLType.h" #include "src/sksl/ir/SkSLLayout.h" +#include "src/sksl/ir/SkSLModifiers.h" #include #include -#include #include #include @@ -32,15 +28,17 @@ class Compiler; class ErrorReporter; class Expression; class FunctionDeclaration; -class SymbolTable; -enum class ProgramKind : int8_t; struct Module; struct Program; +enum class ProgramKind : int8_t; +class Statement; +class SymbolTable; +class Type; class VarDeclaration; class Variable; /** - * Consumes .sksl text and invokes DSL functions to instantiate the program. + * Consumes .sksl text and converts it into an IR tree, encapsulated in a Program. */ class Parser { public: @@ -148,8 +146,8 @@ class Parser { bool declaration(); bool functionDeclarationEnd(Position start, - dsl::DSLModifiers& modifiers, - dsl::DSLType returnType, + Modifiers& modifiers, + const Type* returnType, const Token& name); bool prototypeFunction(SkSL::FunctionDeclaration* decl); @@ -158,39 +156,45 @@ class Parser { struct VarDeclarationsPrefix { Position fPosition; - dsl::DSLModifiers fModifiers; - dsl::DSLType fType = dsl::DSLType::Void(); + Modifiers fModifiers; + const Type* fType; Token fName; }; bool varDeclarationsPrefix(VarDeclarationsPrefix* prefixData); - dsl::DSLStatement varDeclarationsOrExpressionStatement(); + std::unique_ptr varDeclarationsOrExpressionStatement(); - dsl::DSLStatement varDeclarations(); + std::unique_ptr varDeclarations(); - dsl::DSLType structDeclaration(); + const Type* structDeclaration(); - void structVarDeclaration(Position start, const dsl::DSLModifiers& modifiers); + void structVarDeclaration(Position start, const Modifiers& modifiers); bool allowUnsizedArrays() { return ProgramConfig::IsCompute(fKind) || ProgramConfig::IsFragment(fKind) || ProgramConfig::IsVertex(fKind); } - bool parseArrayDimensions(Position pos, dsl::DSLType* type); + const Type* arrayType(const Type* base, int count, Position pos); + + const Type* unsizedArrayType(const Type* base, Position pos); - bool parseInitializer(Position pos, dsl::DSLExpression* initializer); + bool parseArrayDimensions(Position pos, const Type** type); + + bool parseInitializer(Position pos, std::unique_ptr* initializer); void addGlobalVarDeclaration(std::unique_ptr decl); - void globalVarDeclarationEnd(Position position, const dsl::DSLModifiers& mods, - dsl::DSLType baseType, Token name); + void globalVarDeclarationEnd(Position position, const Modifiers& mods, + const Type* baseType, Token name); - dsl::DSLStatement localVarDeclarationEnd(Position position, const dsl::DSLModifiers& mods, - dsl::DSLType baseType, Token name); + std::unique_ptr localVarDeclarationEnd(Position position, + const Modifiers& mods, + const Type* baseType, + Token name); - bool modifiersDeclarationEnd(const dsl::DSLModifiers& mods); + bool modifiersDeclarationEnd(const Modifiers& mods); bool parameter(std::unique_ptr* outParam); @@ -200,21 +204,25 @@ class Parser { SkSL::Layout layout(); - dsl::DSLModifiers modifiers(); + Modifiers modifiers(); + + std::unique_ptr statementOrNop(Position pos, std::unique_ptr stmt); + + std::unique_ptr statement(); - dsl::DSLStatement statement(); + const Type* findType(Position pos, Modifiers* modifiers, std::string_view name); - dsl::DSLType type(dsl::DSLModifiers* modifiers); + const Type* type(Modifiers* modifiers); - bool interfaceBlock(const dsl::DSLModifiers& mods); + bool interfaceBlock(const Modifiers& mods); - dsl::DSLStatement ifStatement(); + std::unique_ptr ifStatement(); - dsl::DSLStatement doStatement(); + std::unique_ptr doStatement(); - dsl::DSLStatement whileStatement(); + std::unique_ptr whileStatement(); - dsl::DSLStatement forStatement(); + std::unique_ptr forStatement(); bool switchCaseBody(ExpressionArray* values, StatementArray* caseBlocks, @@ -222,64 +230,74 @@ class Parser { bool switchCase(ExpressionArray* values, StatementArray* caseBlocks); - dsl::DSLStatement switchStatement(); + std::unique_ptr switchStatement(); + + std::unique_ptr returnStatement(); + + std::unique_ptr breakStatement(); - dsl::DSLStatement returnStatement(); + std::unique_ptr continueStatement(); - dsl::DSLStatement breakStatement(); + std::unique_ptr discardStatement(); - dsl::DSLStatement continueStatement(); + std::unique_ptr block(); - dsl::DSLStatement discardStatement(); + std::unique_ptr expressionStatement(); - std::optional block(); + using BinaryParseFn = std::unique_ptr (Parser::*)(); + [[nodiscard]] bool operatorRight(AutoDepth& depth, + Operator::Kind op, + BinaryParseFn rightFn, + std::unique_ptr& expr); - dsl::DSLStatement expressionStatement(); + std::unique_ptr poison(Position pos); - using BinaryParseFn = dsl::DSLExpression (Parser::*)(); - bool SK_WARN_UNUSED_RESULT operatorRight(AutoDepth& depth, Operator::Kind op, - BinaryParseFn rightFn, dsl::DSLExpression& expr); + std::unique_ptr expressionOrPoison(Position pos, std::unique_ptr expr); - dsl::DSLExpression expression(); + std::unique_ptr expression(); - dsl::DSLExpression assignmentExpression(); + std::unique_ptr assignmentExpression(); - dsl::DSLExpression ternaryExpression(); + std::unique_ptr ternaryExpression(); - dsl::DSLExpression logicalOrExpression(); + std::unique_ptr logicalOrExpression(); - dsl::DSLExpression logicalXorExpression(); + std::unique_ptr logicalXorExpression(); - dsl::DSLExpression logicalAndExpression(); + std::unique_ptr logicalAndExpression(); - dsl::DSLExpression bitwiseOrExpression(); + std::unique_ptr bitwiseOrExpression(); - dsl::DSLExpression bitwiseXorExpression(); + std::unique_ptr bitwiseXorExpression(); - dsl::DSLExpression bitwiseAndExpression(); + std::unique_ptr bitwiseAndExpression(); - dsl::DSLExpression equalityExpression(); + std::unique_ptr equalityExpression(); - dsl::DSLExpression relationalExpression(); + std::unique_ptr relationalExpression(); - dsl::DSLExpression shiftExpression(); + std::unique_ptr shiftExpression(); - dsl::DSLExpression additiveExpression(); + std::unique_ptr additiveExpression(); - dsl::DSLExpression multiplicativeExpression(); + std::unique_ptr multiplicativeExpression(); - dsl::DSLExpression unaryExpression(); + std::unique_ptr unaryExpression(); - dsl::DSLExpression postfixExpression(); + std::unique_ptr postfixExpression(); - dsl::DSLExpression swizzle(Position pos, dsl::DSLExpression base, - std::string_view swizzleMask, Position maskPos); + std::unique_ptr swizzle(Position pos, + std::unique_ptr base, + std::string_view swizzleMask, + Position maskPos); - dsl::DSLExpression call(Position pos, dsl::DSLExpression base, ExpressionArray args); + std::unique_ptr call(Position pos, + std::unique_ptr base, + ExpressionArray args); - dsl::DSLExpression suffix(dsl::DSLExpression base); + std::unique_ptr suffix(std::unique_ptr base); - dsl::DSLExpression term(); + std::unique_ptr term(); bool intLiteral(SKSL_INT* dest); diff --git a/src/sksl/SkSLProgramSettings.h b/src/sksl/SkSLProgramSettings.h index 74576f82bdfc..4617ebba593f 100644 --- a/src/sksl/SkSLProgramSettings.h +++ b/src/sksl/SkSLProgramSettings.h @@ -151,6 +151,16 @@ struct ProgramConfig { kind == ProgramKind::kPrivateRuntimeShader); } + static bool IsRuntimeColorFilter(ProgramKind kind) { + return (kind == ProgramKind::kRuntimeColorFilter || + kind == ProgramKind::kPrivateRuntimeColorFilter); + } + + static bool IsRuntimeBlender(ProgramKind kind) { + return (kind == ProgramKind::kRuntimeBlender || + kind == ProgramKind::kPrivateRuntimeBlender); + } + static bool AllowsPrivateIdentifiers(ProgramKind kind) { return (kind != ProgramKind::kRuntimeColorFilter && kind != ProgramKind::kRuntimeShader && diff --git a/src/sksl/SkSLThreadContext.cpp b/src/sksl/SkSLThreadContext.cpp index c1383680184c..778d3e9ae216 100644 --- a/src/sksl/SkSLThreadContext.cpp +++ b/src/sksl/SkSLThreadContext.cpp @@ -8,7 +8,6 @@ #include "src/sksl/SkSLThreadContext.h" #include "src/sksl/SkSLCompiler.h" -#include "src/sksl/SkSLModifiersPool.h" #include "src/sksl/SkSLPool.h" #include "src/sksl/SkSLPosition.h" #include "src/sksl/ir/SkSLProgramElement.h" @@ -25,7 +24,6 @@ ThreadContext::ThreadContext(SkSL::Compiler* compiler, bool isModule) : fCompiler(compiler) , fOldConfig(fCompiler->fContext->fConfig) - , fOldModifiersPool(fCompiler->fContext->fModifiersPool) , fOldErrorReporter(*fCompiler->fContext->fErrors) , fSettings(settings) { if (!isModule) { @@ -33,8 +31,6 @@ ThreadContext::ThreadContext(SkSL::Compiler* compiler, fPool = Pool::Create(); fPool->attachToThread(); } - fModifiersPool = std::make_unique(); - fCompiler->fContext->fModifiersPool = fModifiersPool.get(); } fConfig = std::make_unique(); @@ -58,7 +54,6 @@ ThreadContext::~ThreadContext() { } fCompiler->fContext->fErrors = &fOldErrorReporter; fCompiler->fContext->fConfig = fOldConfig; - fCompiler->fContext->fModifiersPool = fOldModifiersPool; if (fPool) { fPool->detachFromThread(); } diff --git a/src/sksl/SkSLThreadContext.h b/src/sksl/SkSLThreadContext.h index b13731cfbec6..cde3778cbd43 100644 --- a/src/sksl/SkSLThreadContext.h +++ b/src/sksl/SkSLThreadContext.h @@ -23,7 +23,6 @@ namespace SkSL { class Compiler; -class ModifiersPool; class Pool; class ProgramElement; class Variable; @@ -59,17 +58,17 @@ class ThreadContext { static void End(); /** - * Returns the Compiler used by DSL operations in the current thread. + * Returns the Compiler used by SkSL in the current thread. */ static SkSL::Compiler& Compiler() { return *Instance().fCompiler; } /** - * Returns the Context used by DSL operations in the current thread. + * Returns the Context used by SkSL in the current thread. */ static SkSL::Context& Context(); /** - * Returns the collection to which DSL program elements in this thread should be appended. + * Returns the collection to which SkSL program elements in this thread should be appended. */ static std::vector>& ProgramElements() { return Instance().fProgramElements; @@ -132,11 +131,9 @@ class ThreadContext { void setupSymbolTable(); std::unique_ptr fConfig; - std::unique_ptr fModifiersPool; SkSL::Compiler* fCompiler; std::unique_ptr fPool; SkSL::ProgramConfig* fOldConfig; - SkSL::ModifiersPool* fOldModifiersPool; std::vector> fProgramElements; std::vector fSharedElements; DefaultErrorReporter fDefaultErrorReporter; diff --git a/src/sksl/analysis/SkSLCheckProgramStructure.cpp b/src/sksl/analysis/SkSLCheckProgramStructure.cpp index 60c5da4fb07d..37062678e0eb 100644 --- a/src/sksl/analysis/SkSLCheckProgramStructure.cpp +++ b/src/sksl/analysis/SkSLCheckProgramStructure.cpp @@ -34,9 +34,10 @@ using namespace skia_private; namespace SkSL { bool Analysis::CheckProgramStructure(const Program& program, bool enforceSizeLimit) { - // We check the size of strict-ES2 programs; since SkVM will completely unroll them, it's - // important to know how large the result will be. For non-ES2 code, we compute an approximate - // lower bound by assuming all non-unrollable loops will execute one time only. + // We check the size of strict-ES2 programs; this behavior is a holdover from SkVM, which would + // completely unroll all loops. (SkRP supports loops properly, but does inline function calls.) + // For non-ES2 code, we compute an approximate lower bound by assuming all non-unrollable loops + // will execute one time only. const Context& context = *program.fContext; // If we decide that expressions are cheaper than statements, or that certain statements are diff --git a/src/sksl/analysis/SkSLFinalizationChecks.cpp b/src/sksl/analysis/SkSLFinalizationChecks.cpp index be86099f432d..1b0e7f83cda9 100644 --- a/src/sksl/analysis/SkSLFinalizationChecks.cpp +++ b/src/sksl/analysis/SkSLFinalizationChecks.cpp @@ -8,12 +8,14 @@ #include "include/core/SkSpan.h" #include "include/core/SkTypes.h" #include "include/private/SkSLDefines.h" +#include "src/base/SkEnumBitMask.h" #include "src/base/SkSafeMath.h" #include "src/core/SkTHash.h" #include "src/sksl/SkSLAnalysis.h" #include "src/sksl/SkSLBuiltinTypes.h" #include "src/sksl/SkSLContext.h" #include "src/sksl/SkSLErrorReporter.h" +#include "src/sksl/SkSLPosition.h" #include "src/sksl/SkSLProgramSettings.h" #include "src/sksl/analysis/SkSLProgramUsage.h" #include "src/sksl/analysis/SkSLProgramVisitor.h" @@ -24,7 +26,8 @@ #include "src/sksl/ir/SkSLIRNode.h" #include "src/sksl/ir/SkSLInterfaceBlock.h" #include "src/sksl/ir/SkSLLayout.h" -#include "src/sksl/ir/SkSLModifiers.h" +#include "src/sksl/ir/SkSLModifierFlags.h" +#include "src/sksl/ir/SkSLModifiersDeclaration.h" #include "src/sksl/ir/SkSLProgram.h" #include "src/sksl/ir/SkSLProgramElement.h" #include "src/sksl/ir/SkSLType.h" @@ -59,6 +62,9 @@ class FinalizationVisitor : public ProgramVisitor { case ProgramElement::Kind::kFunction: this->checkOutParamsAreAssigned(pe.as()); break; + case ProgramElement::Kind::kModifiers: + this->checkWorkgroupLocalSize(pe.as()); + break; default: break; } @@ -84,8 +90,8 @@ class FinalizationVisitor : public ProgramVisitor { void checkBindUniqueness(const InterfaceBlock& block) { const Variable* var = block.var(); - int32_t set = var->modifiers().fLayout.fSet; - int32_t binding = var->modifiers().fLayout.fBinding; + int32_t set = var->layout().fSet; + int32_t binding = var->layout().fBinding; if (binding != -1) { // TODO(skia:13664): This should map a `set` value of -1 to the default settings value // used by codegen backends to prevent duplicates that may arise from the effective @@ -114,9 +120,9 @@ class FinalizationVisitor : public ProgramVisitor { // Searches for `out` parameters that are not written to. According to the GLSL spec, // the value of an out-param that's never assigned to is unspecified, so report it. for (const Variable* param : funcDecl.parameters()) { - const int paramInout = param->modifiers().fFlags & (Modifiers::Flag::kIn_Flag | - Modifiers::Flag::kOut_Flag); - if (paramInout == Modifiers::Flag::kOut_Flag) { + const ModifierFlags paramInout = param->modifierFlags() & (ModifierFlag::kIn | + ModifierFlag::kOut); + if (paramInout == ModifierFlag::kOut) { ProgramUsage::VariableCounts counts = fUsage.get(*param); if (counts.fWrite <= 0) { fContext.fErrors->error(param->fPosition, @@ -128,13 +134,37 @@ class FinalizationVisitor : public ProgramVisitor { } } + void checkWorkgroupLocalSize(const ModifiersDeclaration& d) { + if (d.layout().fLocalSizeX >= 0) { + if (fLocalSizeX >= 0) { + fContext.fErrors->error(d.fPosition, "'local_size_x' was specified more than once"); + } else { + fLocalSizeX = d.layout().fLocalSizeX; + } + } + if (d.layout().fLocalSizeY >= 0) { + if (fLocalSizeY >= 0) { + fContext.fErrors->error(d.fPosition, "'local_size_y' was specified more than once"); + } else { + fLocalSizeY = d.layout().fLocalSizeY; + } + } + if (d.layout().fLocalSizeZ >= 0) { + if (fLocalSizeZ >= 0) { + fContext.fErrors->error(d.fPosition, "'local_size_z' was specified more than once"); + } else { + fLocalSizeZ = d.layout().fLocalSizeZ; + } + } + } + bool visitExpression(const Expression& expr) override { switch (expr.kind()) { case Expression::Kind::kFunctionCall: { const FunctionDeclaration& decl = expr.as().function(); if (!decl.isBuiltin() && !decl.definition()) { fContext.fErrors->error(expr.fPosition, "function '" + decl.description() + - "' is not defined"); + "' is not defined"); } break; } @@ -153,6 +183,10 @@ class FinalizationVisitor : public ProgramVisitor { return INHERITED::visitExpression(expr); } + bool definesLocalSize() const { + return fLocalSizeX >= 0 || fLocalSizeY >= 0 || fLocalSizeZ >= 0; + } + private: using INHERITED = ProgramVisitor; size_t fGlobalSlotsUsed = 0; @@ -160,6 +194,12 @@ class FinalizationVisitor : public ProgramVisitor { const ProgramUsage& fUsage; // we pack the set/binding pair into a single 64 bit int THashSet fBindings; + + // Compute programs must at least specify the X dimension of the local size. The other + // dimensions have a default value of "1". + int fLocalSizeX = -1; + int fLocalSizeY = -1; + int fLocalSizeZ = -1; }; } // namespace @@ -170,6 +210,10 @@ void Analysis::DoFinalizationChecks(const Program& program) { for (const std::unique_ptr& element : program.fOwnedElements) { visitor.visitProgramElement(*element); } + if (ProgramConfig::IsCompute(program.fConfig->fKind) && !visitor.definesLocalSize()) { + program.fContext->fErrors->error(Position(), + "compute programs must specify a workgroup size"); + } } } // namespace SkSL diff --git a/src/sksl/analysis/SkSLHasSideEffects.cpp b/src/sksl/analysis/SkSLHasSideEffects.cpp index c876d06aacf4..1dd25829cb21 100644 --- a/src/sksl/analysis/SkSLHasSideEffects.cpp +++ b/src/sksl/analysis/SkSLHasSideEffects.cpp @@ -14,7 +14,7 @@ #include "src/sksl/ir/SkSLFunctionCall.h" #include "src/sksl/ir/SkSLFunctionDeclaration.h" #include "src/sksl/ir/SkSLIRNode.h" -#include "src/sksl/ir/SkSLModifiers.h" +#include "src/sksl/ir/SkSLModifierFlags.h" #include "src/sksl/ir/SkSLPrefixExpression.h" namespace SkSL { @@ -26,7 +26,7 @@ bool Analysis::HasSideEffects(const Expression& expr) { switch (expr.kind()) { case Expression::Kind::kFunctionCall: { const FunctionCall& call = expr.as(); - if (!(call.function().modifiers().fFlags & Modifiers::kPure_Flag)) { + if (!call.function().modifierFlags().isPure()) { return true; } break; diff --git a/src/sksl/analysis/SkSLIsConstantExpression.cpp b/src/sksl/analysis/SkSLIsConstantExpression.cpp index cc182972378e..ae8dca3aadde 100644 --- a/src/sksl/analysis/SkSLIsConstantExpression.cpp +++ b/src/sksl/analysis/SkSLIsConstantExpression.cpp @@ -16,7 +16,7 @@ #include "src/sksl/ir/SkSLForStatement.h" #include "src/sksl/ir/SkSLIRNode.h" #include "src/sksl/ir/SkSLIndexExpression.h" -#include "src/sksl/ir/SkSLModifiers.h" +#include "src/sksl/ir/SkSLModifierFlags.h" #include "src/sksl/ir/SkSLStatement.h" #include "src/sksl/ir/SkSLVarDeclarations.h" #include "src/sksl/ir/SkSLVariable.h" @@ -54,9 +54,8 @@ class ConstantExpressionVisitor : public ProgramVisitor { // ... loop indices as defined in section 4. [constant-index-expression] case Expression::Kind::kVariableReference: { const Variable* v = e.as().variable(); - if ((v->storage() == Variable::Storage::kGlobal || - v->storage() == Variable::Storage::kLocal) && - (v->modifiers().fFlags & Modifiers::kConst_Flag)) { + if (v->modifierFlags().isConst() && (v->storage() == Variable::Storage::kGlobal || + v->storage() == Variable::Storage::kLocal)) { return false; } return !fLoopIndices || !fLoopIndices->contains(v); @@ -100,6 +99,7 @@ class ConstantExpressionVisitor : public ProgramVisitor { case Expression::Kind::kFunctionReference: case Expression::Kind::kMethodReference: case Expression::Kind::kTypeReference: + case Expression::Kind::kEmpty: return true; default: diff --git a/src/sksl/analysis/SkSLIsDynamicallyUniformExpression.cpp b/src/sksl/analysis/SkSLIsDynamicallyUniformExpression.cpp index ec4d6b2f7d24..42c6c81176fb 100644 --- a/src/sksl/analysis/SkSLIsDynamicallyUniformExpression.cpp +++ b/src/sksl/analysis/SkSLIsDynamicallyUniformExpression.cpp @@ -12,7 +12,7 @@ #include "src/sksl/ir/SkSLFunctionCall.h" #include "src/sksl/ir/SkSLFunctionDeclaration.h" #include "src/sksl/ir/SkSLIRNode.h" -#include "src/sksl/ir/SkSLModifiers.h" +#include "src/sksl/ir/SkSLModifierFlags.h" #include "src/sksl/ir/SkSLVariable.h" #include "src/sksl/ir/SkSLVariableReference.h" @@ -46,21 +46,21 @@ bool Analysis::IsDynamicallyUniformExpression(const Expression& expr) { case Expression::Kind::kVariableReference: { // Verify that variable references are const or uniform. const Variable* var = expr.as().variable(); - if (!var || !(var->modifiers().fFlags & (Modifiers::Flag::kConst_Flag | - Modifiers::Flag::kUniform_Flag))) { - fIsDynamicallyUniform = false; - return true; + if (var && (var->modifierFlags().isConst() || + var->modifierFlags().isUniform())) { + break; } - break; + fIsDynamicallyUniform = false; + return true; } case Expression::Kind::kFunctionCall: { // Verify that function calls are pure. const FunctionDeclaration& decl = expr.as().function(); - if (!(decl.modifiers().fFlags & Modifiers::Flag::kPure_Flag)) { - fIsDynamicallyUniform = false; - return true; + if (decl.modifierFlags().isPure()) { + break; } - break; + fIsDynamicallyUniform = false; + return true; } case Expression::Kind::kLiteral: // Literals are compile-time constants. diff --git a/src/sksl/analysis/SkSLProgramUsage.cpp b/src/sksl/analysis/SkSLProgramUsage.cpp index 968a07755327..9b360cb1a08a 100644 --- a/src/sksl/analysis/SkSLProgramUsage.cpp +++ b/src/sksl/analysis/SkSLProgramUsage.cpp @@ -8,6 +8,7 @@ #include "include/core/SkSpan.h" #include "include/core/SkTypes.h" #include "include/private/base/SkDebug.h" +#include "src/base/SkEnumBitMask.h" #include "src/core/SkTHash.h" #include "src/sksl/SkSLAnalysis.h" #include "src/sksl/SkSLCompiler.h" @@ -18,7 +19,7 @@ #include "src/sksl/ir/SkSLFunctionDeclaration.h" #include "src/sksl/ir/SkSLFunctionDefinition.h" #include "src/sksl/ir/SkSLInterfaceBlock.h" -#include "src/sksl/ir/SkSLModifiers.h" +#include "src/sksl/ir/SkSLModifierFlags.h" #include "src/sksl/ir/SkSLProgramElement.h" #include "src/sksl/ir/SkSLStatement.h" #include "src/sksl/ir/SkSLVarDeclarations.h" @@ -132,11 +133,10 @@ ProgramUsage::VariableCounts ProgramUsage::get(const Variable& v) const { } bool ProgramUsage::isDead(const Variable& v) const { - const Modifiers& modifiers = v.modifiers(); + ModifierFlags flags = v.modifierFlags(); VariableCounts counts = this->get(v); if ((v.storage() != Variable::Storage::kLocal && counts.fRead) || - (modifiers.fFlags & - (Modifiers::kIn_Flag | Modifiers::kOut_Flag | Modifiers::kUniform_Flag))) { + (flags & (ModifierFlag::kIn | ModifierFlag::kOut | ModifierFlag::kUniform))) { return false; } // Consider the variable dead if it's never read and never written (besides the initial-value). diff --git a/src/sksl/codegen/BUILD.bazel b/src/sksl/codegen/BUILD.bazel index f17ab2b5a031..4775884cc31d 100644 --- a/src/sksl/codegen/BUILD.bazel +++ b/src/sksl/codegen/BUILD.bazel @@ -9,7 +9,6 @@ skia_filegroup( srcs = [ "SkSLRasterPipelineBuilder.cpp", "SkSLRasterPipelineCodeGenerator.cpp", - "SkSLVMCodeGenerator.cpp", ], ) @@ -52,7 +51,6 @@ skia_filegroup( srcs = [ "SkSLRasterPipelineBuilder.h", "SkSLRasterPipelineCodeGenerator.h", - "SkSLVMCodeGenerator.h", ] + select({ "//src/sksl:use_sksl_gpu_srcs": [":gpu_hdrs"], "//conditions:default": [], diff --git a/src/sksl/codegen/SkSLCodeGenerator.h b/src/sksl/codegen/SkSLCodeGenerator.h index 14a6bd59c53d..c3c674387aff 100644 --- a/src/sksl/codegen/SkSLCodeGenerator.h +++ b/src/sksl/codegen/SkSLCodeGenerator.h @@ -9,7 +9,6 @@ #define SKSL_CODEGENERATOR #include "src/sksl/SkSLContext.h" -#include "src/sksl/SkSLModifiersPool.h" #include "src/sksl/SkSLOutputStream.h" #include "src/sksl/ir/SkSLProgram.h" @@ -27,7 +26,6 @@ class CodeGenerator { fProgram.fContext->fCaps, *fProgram.fContext->fErrors) , fOut(stream) { - fContext.fModifiersPool = &fModifiersPool; fContext.fConfig = fProgram.fConfig.get(); fContext.fModule = fProgram.fContext->fModule; fContext.fSymbolTable = fProgram.fSymbols; @@ -59,7 +57,6 @@ class CodeGenerator { const Program& fProgram; Context fContext; - ModifiersPool fModifiersPool; OutputStream* fOut; }; diff --git a/src/sksl/codegen/SkSLGLSLCodeGenerator.cpp b/src/sksl/codegen/SkSLGLSLCodeGenerator.cpp index 136af489fe02..c79de5ca11e3 100644 --- a/src/sksl/codegen/SkSLGLSLCodeGenerator.cpp +++ b/src/sksl/codegen/SkSLGLSLCodeGenerator.cpp @@ -11,6 +11,7 @@ #include "include/core/SkTypes.h" #include "include/private/SkSLDefines.h" #include "include/private/base/SkTArray.h" +#include "src/base/SkEnumBitMask.h" #include "src/base/SkStringView.h" #include "src/sksl/SkSLAnalysis.h" #include "src/sksl/SkSLBuiltinTypes.h" @@ -46,7 +47,7 @@ #include "src/sksl/ir/SkSLInterfaceBlock.h" #include "src/sksl/ir/SkSLLayout.h" #include "src/sksl/ir/SkSLLiteral.h" -#include "src/sksl/ir/SkSLModifiers.h" +#include "src/sksl/ir/SkSLModifierFlags.h" #include "src/sksl/ir/SkSLModifiersDeclaration.h" #include "src/sksl/ir/SkSLPostfixExpression.h" #include "src/sksl/ir/SkSLPrefixExpression.h" @@ -198,7 +199,7 @@ void GLSLCodeGenerator::writeStructDefinition(const StructDefinition& s) { this->writeLine(" {"); fIndentation++; for (const auto& f : type.fields()) { - this->writeModifiers(f.fModifiers, false); + this->writeModifiers(f.fLayout, f.fModifierFlags, /*globalContext=*/false); this->writeTypePrecision(*f.fType); const Type& baseType = f.fType->isArray() ? f.fType->componentType() : *f.fType; this->writeType(baseType); @@ -242,6 +243,9 @@ void GLSLCodeGenerator::writeExpression(const Expression& expr, Precedence paren case Expression::Kind::kConstructorCompoundCast: this->writeCastConstructor(expr.asAnyConstructor(), parentPrecedence); break; + case Expression::Kind::kEmpty: + this->write("false"); + break; case Expression::Kind::kFieldAccess: this->writeFieldAccess(expr.as()); break; @@ -880,7 +884,7 @@ void GLSLCodeGenerator::writeFragCoord() { } void GLSLCodeGenerator::writeVariableReference(const VariableReference& ref) { - switch (ref.variable()->modifiers().fLayout.fBuiltin) { + switch (ref.variable()->layout().fBuiltin) { case SK_FRAGCOLOR_BUILTIN: if (this->caps().mustDeclareFragmentShaderOutput()) { this->writeIdentifier("sk_FragColor"); @@ -934,8 +938,7 @@ void GLSLCodeGenerator::writeIndexExpression(const IndexExpression& expr) { } bool is_sk_position(const FieldAccess& f) { - return f.base()->type().fields()[f.fieldIndex()].fModifiers.fLayout.fBuiltin == - SK_POSITION_BUILTIN; + return f.base()->type().fields()[f.fieldIndex()].fLayout.fBuiltin == SK_POSITION_BUILTIN; } void GLSLCodeGenerator::writeFieldAccess(const FieldAccess& f) { @@ -944,7 +947,7 @@ void GLSLCodeGenerator::writeFieldAccess(const FieldAccess& f) { this->write("."); } const Type& baseType = f.base()->type(); - int builtin = baseType.fields()[f.fieldIndex()].fModifiers.fLayout.fBuiltin; + int builtin = baseType.fields()[f.fieldIndex()].fLayout.fBuiltin; if (builtin == SK_POSITION_BUILTIN) { this->writeIdentifier("gl_Position"); } else if (builtin == SK_POINTSIZE_BUILTIN) { @@ -1121,17 +1124,18 @@ void GLSLCodeGenerator::writeFunctionDeclaration(const FunctionDeclaration& f) { const Variable* param = f.parameters()[index]; // This is a workaround for our test files. They use the runtime effect signature, so main - // takes a coords parameter. The IR generator tags those with a builtin ID (sk_FragCoord), - // and we omit them from the declaration here, so the function is valid GLSL. - if (f.isMain() && param->modifiers().fLayout.fBuiltin != -1) { + // takes a coords parameter. We detect these at IR generation time, and we omit them from + // the declaration here, so the function is valid GLSL. (Well, valid as long as the + // coordinates aren't actually referenced.) + if (f.isMain() && param == f.getMainCoordsParameter()) { continue; } this->write(separator()); - Modifiers modifiers = param->modifiers(); + ModifierFlags flags = param->modifierFlags(); if (this->caps().fRemoveConstFromFunctionParameters) { - modifiers.fFlags &= ~Modifiers::kConst_Flag; + flags &= ~ModifierFlag::kConst; } - this->writeModifiers(modifiers, false); + this->writeModifiers(param->layout(), flags, /*globalContext=*/false); std::vector sizes; const Type* type = ¶m->type(); if (type->isArray()) { @@ -1190,53 +1194,49 @@ void GLSLCodeGenerator::writeFunctionPrototype(const FunctionPrototype& f) { this->writeLine(";"); } -void GLSLCodeGenerator::writeModifiers(const Modifiers& modifiers, +void GLSLCodeGenerator::writeModifiers(const Layout& layout, + ModifierFlags flags, bool globalContext) { - std::string layout = modifiers.fLayout.description(); - if (layout.size()) { - this->write(layout + " "); - } + this->write(layout.paddedDescription()); // For GLSL 4.1 and below, qualifier-order matters! These are written out in Modifier-bit order. - if (modifiers.fFlags & Modifiers::kFlat_Flag) { + if (flags & ModifierFlag::kFlat) { this->write("flat "); } - if (modifiers.fFlags & Modifiers::kNoPerspective_Flag) { + if (flags & ModifierFlag::kNoPerspective) { this->write("noperspective "); } - if (modifiers.fFlags & Modifiers::kConst_Flag) { + if (flags.isConst()) { this->write("const "); } - if (modifiers.fFlags & Modifiers::kUniform_Flag) { + if (flags.isUniform()) { this->write("uniform "); } - if ((modifiers.fFlags & Modifiers::kIn_Flag) && - (modifiers.fFlags & Modifiers::kOut_Flag)) { + if ((flags & ModifierFlag::kIn) && (flags & ModifierFlag::kOut)) { this->write("inout "); - } else if (modifiers.fFlags & Modifiers::kIn_Flag) { + } else if (flags & ModifierFlag::kIn) { if (globalContext && this->caps().fGLSLGeneration < SkSL::GLSLGeneration::k130) { this->write(ProgramConfig::IsVertex(fProgram.fConfig->fKind) ? "attribute " : "varying "); } else { this->write("in "); } - } else if (modifiers.fFlags & Modifiers::kOut_Flag) { - if (globalContext && - this->caps().fGLSLGeneration < SkSL::GLSLGeneration::k130) { + } else if (flags & ModifierFlag::kOut) { + if (globalContext && this->caps().fGLSLGeneration < SkSL::GLSLGeneration::k130) { this->write("varying "); } else { this->write("out "); } } - if (modifiers.fFlags & Modifiers::kReadOnly_Flag) { + if (flags.isReadOnly()) { this->write("readonly "); } - if (modifiers.fFlags & Modifiers::kWriteOnly_Flag) { + if (flags.isWriteOnly()) { this->write("writeonly "); } - if (modifiers.fFlags & Modifiers::kBuffer_Flag) { + if (flags.isBuffer()) { this->write("buffer "); } } @@ -1246,12 +1246,12 @@ void GLSLCodeGenerator::writeInterfaceBlock(const InterfaceBlock& intf) { return; } const Type* structType = &intf.var()->type().componentType(); - this->writeModifiers(intf.var()->modifiers(), true); + this->writeModifiers(intf.var()->layout(), intf.var()->modifierFlags(), /*globalContext=*/true); this->writeType(*structType); this->writeLine(" {"); fIndentation++; for (const auto& f : structType->fields()) { - this->writeModifiers(f.fModifiers, false); + this->writeModifiers(f.fLayout, f.fModifierFlags, /*globalContext=*/false); this->writeTypePrecision(*f.fType); this->writeType(*f.fType); this->write(" "); @@ -1312,7 +1312,7 @@ void GLSLCodeGenerator::writeTypePrecision(const Type& type) { } void GLSLCodeGenerator::writeVarDeclaration(const VarDeclaration& var, bool global) { - this->writeModifiers(var.var()->modifiers(), global); + this->writeModifiers(var.var()->layout(), var.var()->modifierFlags(), global); this->writeTypePrecision(var.baseType()); this->writeType(var.baseType()); this->write(" "); @@ -1648,7 +1648,7 @@ void GLSLCodeGenerator::writeProgramElement(const ProgramElement& e) { break; case ProgramElement::Kind::kGlobalVar: { const VarDeclaration& decl = e.as().varDeclaration(); - int builtin = decl.var()->modifiers().fLayout.fBuiltin; + int builtin = decl.var()->layout().fBuiltin; if (builtin == -1) { // normal var this->writeVarDeclaration(decl, true); @@ -1677,8 +1677,8 @@ void GLSLCodeGenerator::writeProgramElement(const ProgramElement& e) { this->writeFunctionPrototype(e.as()); break; case ProgramElement::Kind::kModifiers: { - const Modifiers& modifiers = e.as().modifiers(); - this->writeModifiers(modifiers, true); + const ModifiersDeclaration& d = e.as(); + this->writeModifiers(d.layout(), d.modifierFlags(), /*globalContext=*/true); this->writeLine(";"); break; } @@ -1736,15 +1736,13 @@ bool GLSLCodeGenerator::generateCode() { if (!this->caps().fCanUseFragCoord) { Layout layout; if (ProgramConfig::IsVertex(fProgram.fConfig->fKind)) { - Modifiers modifiers(layout, Modifiers::kOut_Flag); - this->writeModifiers(modifiers, true); + this->writeModifiers(layout, ModifierFlag::kOut, /*globalContext=*/true); if (this->usesPrecisionModifiers()) { this->write("highp "); } this->write("vec4 sk_FragCoord_Workaround;\n"); } else if (ProgramConfig::IsFragment(fProgram.fConfig->fKind)) { - Modifiers modifiers(layout, Modifiers::kIn_Flag); - this->writeModifiers(modifiers, true); + this->writeModifiers(layout, ModifierFlag::kIn, /*globalContext=*/true); if (this->usesPrecisionModifiers()) { this->write("highp "); } diff --git a/src/sksl/codegen/SkSLGLSLCodeGenerator.h b/src/sksl/codegen/SkSLGLSLCodeGenerator.h index e6672ab45ffb..6cccfbdf1fae 100644 --- a/src/sksl/codegen/SkSLGLSLCodeGenerator.h +++ b/src/sksl/codegen/SkSLGLSLCodeGenerator.h @@ -11,6 +11,7 @@ #include "src/sksl/SkSLContext.h" #include "src/sksl/SkSLStringStream.h" #include "src/sksl/codegen/SkSLCodeGenerator.h" +#include "src/sksl/ir/SkSLModifierFlags.h" #include #include @@ -52,7 +53,6 @@ class Variable; class VariableReference; enum class OperatorPrecedence : uint8_t; struct Layout; -struct Modifiers; struct Program; struct ShaderCaps; @@ -99,7 +99,7 @@ class GLSLCodeGenerator : public CodeGenerator { void writeLayout(const Layout& layout); - void writeModifiers(const Modifiers& modifiers, bool globalContext); + void writeModifiers(const Layout& layout, ModifierFlags flags, bool globalContext); virtual void writeInputVars(); diff --git a/src/sksl/codegen/SkSLMetalCodeGenerator.cpp b/src/sksl/codegen/SkSLMetalCodeGenerator.cpp index 12032f6cbc57..0efe485c80aa 100644 --- a/src/sksl/codegen/SkSLMetalCodeGenerator.cpp +++ b/src/sksl/codegen/SkSLMetalCodeGenerator.cpp @@ -9,7 +9,9 @@ #include "include/core/SkSpan.h" #include "include/core/SkTypes.h" +#include "include/private/base/SkTArray.h" #include "include/private/base/SkTo.h" +#include "src/base/SkEnumBitMask.h" #include "src/base/SkScopeExit.h" #include "src/sksl/SkSLAnalysis.h" #include "src/sksl/SkSLBuiltinTypes.h" @@ -47,8 +49,7 @@ #include "src/sksl/ir/SkSLInterfaceBlock.h" #include "src/sksl/ir/SkSLLayout.h" #include "src/sksl/ir/SkSLLiteral.h" -#include "src/sksl/ir/SkSLModifiers.h" -#include "src/sksl/ir/SkSLModifiersDeclaration.h" +#include "src/sksl/ir/SkSLModifierFlags.h" #include "src/sksl/ir/SkSLNop.h" #include "src/sksl/ir/SkSLPostfixExpression.h" #include "src/sksl/ir/SkSLPrefixExpression.h" @@ -73,6 +74,7 @@ #include #include #include +#include #include using namespace skia_private; @@ -90,8 +92,7 @@ class MetalCodeGenerator::GlobalStructVisitor { public: virtual ~GlobalStructVisitor() = default; virtual void visitInterfaceBlock(const InterfaceBlock& block, std::string_view blockName) {} - virtual void visitTexture(const Type& type, const Modifiers& modifiers, - std::string_view name) {} + virtual void visitTexture(const Type& type, std::string_view name) {} virtual void visitSampler(const Type& type, std::string_view name) {} virtual void visitConstantVariable(const VarDeclaration& decl) {} virtual void visitNonconstantVariable(const Variable& var, const Expression* value) {} @@ -212,6 +213,9 @@ void MetalCodeGenerator::writeExpression(const Expression& expr, Precedence pare case Expression::Kind::kConstructorCompoundCast: this->writeCastConstructor(expr.asAnyConstructor(), "(", ")", parentPrecedence); break; + case Expression::Kind::kEmpty: + this->write("false"); + break; case Expression::Kind::kFieldAccess: this->writeFieldAccess(expr.as()); break; @@ -249,164 +253,52 @@ void MetalCodeGenerator::writeExpression(const Expression& expr, Precedence pare } // returns true if we should pass by reference instead of by value -static bool pass_by_reference(const Type& type, const Modifiers& modifiers) { - return (modifiers.fFlags & Modifiers::kOut_Flag) && !type.isUnsizedArray(); +static bool pass_by_reference(const Type& type, ModifierFlags flags) { + return (flags & ModifierFlag::kOut) && !type.isUnsizedArray(); } // returns true if we need to specify an address space modifier -static bool needs_address_space(const Type& type, const Modifiers& modifiers) { +static bool needs_address_space(const Type& type, ModifierFlags modifiers) { return type.isUnsizedArray() || pass_by_reference(type, modifiers); } // returns true if the InterfaceBlock has the `buffer` modifier static bool is_buffer(const InterfaceBlock& block) { - return block.var()->modifiers().fFlags & Modifiers::kBuffer_Flag; + return block.var()->modifierFlags().isBuffer(); } // returns true if the InterfaceBlock has the `readonly` modifier static bool is_readonly(const InterfaceBlock& block) { - return block.var()->modifiers().fFlags & Modifiers::kReadOnly_Flag; + return block.var()->modifierFlags().isReadOnly(); } -std::string MetalCodeGenerator::getOutParamHelper(const FunctionCall& call, - const ExpressionArray& arguments, - const TArray& outVars) { - // It's possible for out-param function arguments to contain an out-param function call - // expression. Emit the function into a temporary stream to prevent the nested helper from - // clobbering the current helper as we recursively evaluate argument expressions. - StringStream tmpStream; - AutoOutputStream outputToExtraFunctions(this, &tmpStream, &fIndentation); - - const FunctionDeclaration& function = call.function(); - - std::string name = "_skOutParamHelper" + std::to_string(fSwizzleHelperCount++) + - "_" + function.mangledName(); - const char* separator = ""; - - // Emit a prototype for the function we'll be calling through to in our helper. - if (!function.isBuiltin()) { - this->writeFunctionDeclaration(function); - this->writeLine(";"); - } - - // Synthesize a helper function that takes the same inputs as `function`, except in places where - // `outVars` is non-null; in those places, we take the type of the VariableReference. - // - // float _skOutParamHelper0_originalFuncName(float _var0, float _var1, float& outParam) { - this->writeType(call.type()); - this->write(" "); - this->write(name); - this->write("("); - this->writeFunctionRequirementParams(function, separator); - - SkASSERT(outVars.size() == arguments.size()); - SkASSERT(SkToSizeT(outVars.size()) == function.parameters().size()); - - // We need to detect cases where the caller passes the same variable as an out-param more than - // once, and avoid reusing the variable name. (In those cases we can actually just ignore the - // redundant input parameter entirely, and not give it any name.) - THashSet writtenVars; - - for (int index = 0; index < arguments.size(); ++index) { - this->write(separator); - separator = ", "; - - const Variable* param = function.parameters()[index]; - this->writeModifiers(param->modifiers()); - - const Type* type = outVars[index] ? &outVars[index]->type() : &arguments[index]->type(); - this->writeType(*type); - - if (pass_by_reference(param->type(), param->modifiers())) { - this->write("&"); - } - if (outVars[index]) { - const Variable* var = outVars[index]->variable(); - if (!writtenVars.contains(var)) { - writtenVars.add(var); - - this->write(" "); - fIgnoreVariableReferenceModifiers = true; - this->writeVariableReference(*outVars[index]); - fIgnoreVariableReferenceModifiers = false; - } - } else { - this->write(" _var"); - this->write(std::to_string(index)); - } - } - this->writeLine(") {"); - - ++fIndentation; - for (int index = 0; index < outVars.size(); ++index) { - if (!outVars[index]) { - continue; - } - // float3 _var2[ = outParam.zyx]; - this->writeType(arguments[index]->type()); - this->write(" _var"); - this->write(std::to_string(index)); - - const Variable* param = function.parameters()[index]; - if (param->modifiers().fFlags & Modifiers::kIn_Flag) { - this->write(" = "); - fIgnoreVariableReferenceModifiers = true; - this->writeExpression(*arguments[index], Precedence::kAssignment); - fIgnoreVariableReferenceModifiers = false; - } - - this->writeLine(";"); - } - - // [int _skResult = ] myFunction(inputs, outputs, _globals, _var0, _var1, _var2, _var3); - bool hasResult = (call.type().name() != "void"); - if (hasResult) { - this->writeType(call.type()); - this->write(" _skResult = "); - } - - this->writeName(function.mangledName()); - this->write("("); - separator = ""; - this->writeFunctionRequirementArgs(function, separator); - - for (int index = 0; index < arguments.size(); ++index) { - this->write(separator); - separator = ", "; +std::string MetalCodeGenerator::getBitcastIntrinsic(const Type& outType) { + return "as_type<" + outType.displayName() + ">"; +} - this->write("_var"); - this->write(std::to_string(index)); - } - this->writeLine(");"); +void MetalCodeGenerator::writeWithIndexSubstitution(const std::function& fn) { + auto oldIndexSubstitutionData = std::make_unique(); + fIndexSubstitutionData.swap(oldIndexSubstitutionData); - for (int index = 0; index < outVars.size(); ++index) { - if (!outVars[index]) { - continue; - } - // outParam.zyx = _var2; - fIgnoreVariableReferenceModifiers = true; - this->writeExpression(*arguments[index], Precedence::kAssignment); - fIgnoreVariableReferenceModifiers = false; - this->write(" = _var"); - this->write(std::to_string(index)); - this->writeLine(";"); + // Invoke our helper function, with output going into our temporary stream. + { + AutoOutputStream outputToMainStream(this, &fIndexSubstitutionData->fMainStream); + fn(); } - if (hasResult) { - this->writeLine("return _skResult;"); + if (fIndexSubstitutionData->fPrefixStream.bytesWritten() == 0) { + // Emit the main stream into the program as-is. + write_stringstream(fIndexSubstitutionData->fMainStream, *fOut); + } else { + // Emit the prefix stream and main stream into the program as a sequence-expression. + // (Each prefix-expression must end with a comma.) + this->write("("); + write_stringstream(fIndexSubstitutionData->fPrefixStream, *fOut); + write_stringstream(fIndexSubstitutionData->fMainStream, *fOut); + this->write(")"); } - --fIndentation; - this->writeLine("}"); - - // Write the function out to `fExtraFunctions`. - write_stringstream(tmpStream, fExtraFunctions); - - return name; -} - -std::string MetalCodeGenerator::getBitcastIntrinsic(const Type& outType) { - return "as_type<" + outType.displayName() + ">"; + fIndexSubstitutionData.swap(oldIndexSubstitutionData); } void MetalCodeGenerator::writeFunctionCall(const FunctionCall& c) { @@ -419,55 +311,128 @@ void MetalCodeGenerator::writeFunctionCall(const FunctionCall& c) { } } - // Determine whether or not we need to emulate GLSL's out-param semantics for Metal using a - // helper function. (Specifically, out-parameters in GLSL are only written back to the original - // variable at the end of the function call; also, swizzles are supported, whereas Metal doesn't - // allow a swizzle to be passed to a `floatN&`.) + // Look for out parameters. SkSL guarantees GLSL's out-param semantics, and we need to emulate + // it if an out-param is encountered. (Specifically, out-parameters in GLSL are only written + // back to the original variable at the end of the function call; also, swizzles are supported, + // whereas Metal doesn't allow a swizzle to be passed to a `floatN&`.) const ExpressionArray& arguments = c.arguments(); SkSpan parameters = function.parameters(); SkASSERT(SkToSizeT(arguments.size()) == parameters.size()); bool foundOutParam = false; - STArray<16, VariableReference*> outVars; - outVars.push_back_n(arguments.size(), (VariableReference*)nullptr); + STArray<16, std::string> scratchVarName; + scratchVarName.push_back_n(arguments.size(), std::string()); for (int index = 0; index < arguments.size(); ++index) { // If this is an out parameter... - if (parameters[index]->modifiers().fFlags & Modifiers::kOut_Flag) { - // Find the expression's inner variable being written to. - Analysis::AssignmentInfo info; + if (parameters[index]->modifierFlags() & ModifierFlag::kOut) { // Assignability was verified at IRGeneration time, so this should always succeed. - SkAssertResult(Analysis::IsAssignable(*arguments[index], &info)); - outVars[index] = info.fAssignedVar; + [[maybe_unused]] Analysis::AssignmentInfo info; + SkASSERT(Analysis::IsAssignable(*arguments[index], &info)); + + scratchVarName[index] = this->getTempVariable(arguments[index]->type()); foundOutParam = true; } } if (foundOutParam) { // Out parameters need to be written back to at the end of the function. To do this, we - // synthesize a helper function which evaluates the out-param expression into a temporary - // variable, calls the original function, then writes the temp var back into the out param - // using the original out-param expression. (This lets us support things like swizzles and - // array indices.) - this->write(getOutParamHelper(c, arguments, outVars)); - } else { - this->write(function.mangledName()); - } + // generate a comma-separated sequence expression that copies the out-param expressions into + // our temporary variables, calls the original function--storing its result into a scratch + // variable--and then writes the temp variables back into the original out params using the + // original out-param expressions. This would look something like: + // + // ((_skResult = func((_skTemp = myOutParam.x), 123)), (myOutParam.x = _skTemp), _skResult) + // ^ ^ ^ ^ + // return value passes copy of argument copies back into argument return value + // + // While these expressions are complex, they allow us to maintain the proper sequencing that + // is necessary for out-parameters, as well as allowing us to support things like swizzles + // and array indices which Metal references cannot natively handle. + + // We will be emitting inout expressions twice, so it's important to enable index + // substitution in case we encounter any side-effecting indexes. + this->writeWithIndexSubstitution([&] { + this->write("(("); - this->write("("); - const char* separator = ""; - this->writeFunctionRequirementArgs(function, separator); - for (int i = 0; i < arguments.size(); ++i) { - this->write(separator); - separator = ", "; + // ((_skResult = + std::string scratchResultName; + if (!function.returnType().isVoid()) { + scratchResultName = this->getTempVariable(c.type()); + this->write(scratchResultName); + this->write(" = "); + } - if (outVars[i]) { - this->writeExpression(*outVars[i], Precedence::kSequence); - } else { + // ((_skResult = func( + this->write(function.mangledName()); + this->write("("); + + // ((_skResult = func((_skTemp = myOutParam.x), 123 + const char* separator = ""; + this->writeFunctionRequirementArgs(function, separator); + + for (int i = 0; i < arguments.size(); ++i) { + this->write(separator); + separator = ", "; + if (parameters[i]->modifierFlags() & ModifierFlag::kOut) { + SkASSERT(!scratchVarName[i].empty()); + if (parameters[i]->modifierFlags() & ModifierFlag::kIn) { + // `inout` parameters initialize the scratch variable with the passed-in + // argument's value. + this->write("("); + this->write(scratchVarName[i]); + this->write(" = "); + this->writeExpression(*arguments[i], Precedence::kAssignment); + this->write(")"); + } else { + // `out` parameters pass a reference to the uninitialized scratch variable. + this->write(scratchVarName[i]); + } + } else { + // Regular parameters are passed as-is. + this->writeExpression(*arguments[i], Precedence::kSequence); + } + } + + // ((_skResult = func((_skTemp = myOutParam.x), 123)) + this->write("))"); + + // ((_skResult = func((_skTemp = myOutParam.x), 123)), (myOutParam.x = _skTemp) + for (int i = 0; i < arguments.size(); ++i) { + if (!scratchVarName[i].empty()) { + this->write(", ("); + this->writeExpression(*arguments[i], Precedence::kAssignment); + this->write(" = "); + this->write(scratchVarName[i]); + this->write(")"); + } + } + + // ((_skResult = func((_skTemp = myOutParam.x), 123)), (myOutParam.x = _skTemp), + // _skResult + if (!scratchResultName.empty()) { + this->write(", "); + this->write(scratchResultName); + } + + // ((_skResult = func((_skTemp = myOutParam.x), 123)), (myOutParam.x = _skTemp), + // _skResult) + this->write(")"); + }); + } else { + // Emit the function call as-is, only prepending the required arguments. + this->write(function.mangledName()); + this->write("("); + const char* separator = ""; + this->writeFunctionRequirementArgs(function, separator); + for (int i = 0; i < arguments.size(); ++i) { + SkASSERT(scratchVarName[i].empty()); + this->write(separator); + separator = ", "; this->writeExpression(*arguments[i], Precedence::kSequence); } + this->write(")"); } - this->write(")"); } static constexpr char kInverse2x2[] = R"( @@ -1443,7 +1408,7 @@ void MetalCodeGenerator::writeFragCoord() { } static bool is_compute_builtin(const Variable& var) { - switch (var.modifiers().fLayout.fBuiltin) { + switch (var.layout().fBuiltin) { case SK_NUMWORKGROUPS_BUILTIN: case SK_WORKGROUPID_BUILTIN: case SK_LOCALINVOCATIONID_BUILTIN: @@ -1459,8 +1424,8 @@ static bool is_compute_builtin(const Variable& var) { // true if the var is part of the Inputs struct static bool is_input(const Variable& var) { SkASSERT(var.storage() == VariableStorage::kGlobal); - return var.modifiers().fFlags & Modifiers::kIn_Flag && - (var.modifiers().fLayout.fBuiltin == -1 || is_compute_builtin(var)) && + return var.modifierFlags() & ModifierFlag::kIn && + (var.layout().fBuiltin == -1 || is_compute_builtin(var)) && var.type().typeKind() != Type::TypeKind::kTexture; } @@ -1468,41 +1433,33 @@ static bool is_input(const Variable& var) { static bool is_output(const Variable& var) { SkASSERT(var.storage() == VariableStorage::kGlobal); // inout vars get written into the Inputs struct, so we exclude them from Outputs - return (var.modifiers().fFlags & Modifiers::kOut_Flag) && - !(var.modifiers().fFlags & Modifiers::kIn_Flag) && - var.modifiers().fLayout.fBuiltin == -1 && - var.type().typeKind() != Type::TypeKind::kTexture; + return (var.modifierFlags() & ModifierFlag::kOut) && + !(var.modifierFlags() & ModifierFlag::kIn) && + var.layout().fBuiltin == -1 && + var.type().typeKind() != Type::TypeKind::kTexture; } // true if the var is part of the Uniforms struct static bool is_uniforms(const Variable& var) { SkASSERT(var.storage() == VariableStorage::kGlobal); - return var.modifiers().fFlags & Modifiers::kUniform_Flag && + return var.modifierFlags().isUniform() && var.type().typeKind() != Type::TypeKind::kSampler; } // true if the var is part of the Threadgroups struct static bool is_threadgroup(const Variable& var) { SkASSERT(var.storage() == VariableStorage::kGlobal); - return var.modifiers().fFlags & Modifiers::kWorkgroup_Flag; + return var.modifierFlags().isWorkgroup(); } // true if the var is part of the Globals struct static bool is_in_globals(const Variable& var) { SkASSERT(var.storage() == VariableStorage::kGlobal); - return !(var.modifiers().fFlags & Modifiers::kConst_Flag); + return !var.modifierFlags().isConst(); } void MetalCodeGenerator::writeVariableReference(const VariableReference& ref) { - // When assembling out-param helper functions, we copy variables into local clones with matching - // names. We never want to prepend "_in." or "_globals." when writing these variables since - // we're actually targeting the clones. - if (fIgnoreVariableReferenceModifiers) { - this->writeName(ref.variable()->mangledName()); - return; - } - - switch (ref.variable()->modifiers().fLayout.fBuiltin) { + switch (ref.variable()->layout().fBuiltin) { case SK_FRAGCOLOR_BUILTIN: this->write("_out.sk_FragColor"); break; @@ -1557,31 +1514,60 @@ void MetalCodeGenerator::writeVariableReference(const VariableReference& ref) { } } +void MetalCodeGenerator::writeIndexInnerExpression(const Expression& expr) { + if (fIndexSubstitutionData) { + // If this expression already exists in the index-substitution map, use the substitute. + if (const std::string* existing = fIndexSubstitutionData->fMap.find(&expr)) { + this->write(*existing); + return; + } + + // If this expression is non-trivial, we will need to create a scratch variable and store + // its value there. + if (fIndexSubstitutionData->fCreateSubstitutes && !Analysis::IsTrivialExpression(expr)) { + // Create a substitute variable and emit it into the main stream. + std::string scratchVar = this->getTempVariable(expr.type()); + this->write(scratchVar); + + // Initialize the substitute variable in the prefix-stream. + AutoOutputStream outputToPrefixStream(this, &fIndexSubstitutionData->fPrefixStream); + this->write(scratchVar); + this->write(" = "); + this->writeExpression(expr, Precedence::kAssignment); + this->write(", "); + + // Remember the substitute variable in our map. + fIndexSubstitutionData->fMap.set(&expr, std::move(scratchVar)); + return; + } + } + + // We don't require index-substitution; just emit the expression normally. + this->writeExpression(expr, Precedence::kExpression); +} + void MetalCodeGenerator::writeIndexExpression(const IndexExpression& expr) { // Metal does not seem to handle assignment into `vec.zyx[i]` properly--it compiles, but the // results are wrong. We rewrite the expression as `vec[uint3(2,1,0)[i]]` instead. (Filed with // Apple as FB12055941.) - if (expr.base()->is()) { + if (expr.base()->is() && expr.base()->as().components().size() > 1) { const Swizzle& swizzle = expr.base()->as(); - if (swizzle.components().size() > 1) { - this->writeExpression(*swizzle.base(), Precedence::kPostfix); - this->write("[uint" + std::to_string(swizzle.components().size()) + "("); - auto separator = SkSL::String::Separator(); - for (int8_t component : swizzle.components()) { - this->write(separator()); - this->write(std::to_string(component)); - } - this->write(")["); - this->writeExpression(*expr.index(), Precedence::kExpression); - this->write("]]"); - return; - } + this->writeExpression(*swizzle.base(), Precedence::kPostfix); + this->write("[uint" + std::to_string(swizzle.components().size()) + "("); + auto separator = SkSL::String::Separator(); + for (int8_t component : swizzle.components()) { + this->write(separator()); + this->write(std::to_string(component)); + } + this->write(")["); + this->writeIndexInnerExpression(*expr.index()); + this->write("]]"); + } else { + this->writeExpression(*expr.base(), Precedence::kPostfix); + this->write("["); + this->writeIndexInnerExpression(*expr.index()); + this->write("]"); } - - this->writeExpression(*expr.base(), Precedence::kPostfix); - this->write("["); - this->writeExpression(*expr.index(), Precedence::kExpression); - this->write("]"); } void MetalCodeGenerator::writeFieldAccess(const FieldAccess& f) { @@ -1590,7 +1576,7 @@ void MetalCodeGenerator::writeFieldAccess(const FieldAccess& f) { this->writeExpression(*f.base(), Precedence::kPostfix); this->write("."); } - switch (field->fModifiers.fLayout.fBuiltin) { + switch (field->fLayout.fBuiltin) { case SK_POSITION_BUILTIN: this->write("_out.sk_Position"); break; @@ -1600,7 +1586,7 @@ void MetalCodeGenerator::writeFieldAccess(const FieldAccess& f) { default: if (FieldAccess::OwnerKind::kAnonymousInterfaceBlock == f.ownerKind()) { this->write("_globals."); - this->write(fInterfaceBlockNameMap[fInterfaceBlockMap[field]]); + this->write(fInterfaceBlockNameMap[&f.base()->type()]); this->write("->"); } this->writeName(field->fName); @@ -1889,26 +1875,35 @@ void MetalCodeGenerator::writeBinaryExpression(const BinaryExpression& b, this->write("("); } - this->writeBinaryExpressionElement(left, op, right, precedence); + // Some expressions need to be rewritten from `lhs *= rhs` to `lhs = lhs * rhs`, e.g.: + // float4 x = float4(1); + // x.xy *= float2x2(...); + // will report the error "non-const reference cannot bind to vector element." + if (op.isCompoundAssignment() && left.kind() == Expression::Kind::kSwizzle) { + // We need to do the rewrite. This could be dangerous if the lhs contains an index + // expression with a side effect (such as `array[Func()]`), so we enable index-substitution + // here for the LHS; any index-expression with side effects will be evaluated into a scratch + // variable. + this->writeWithIndexSubstitution([&] { + this->writeExpression(left, precedence); + this->write(" = "); + this->writeExpression(left, Precedence::kAssignment); + this->write(operator_name(op.removeAssignment())); - if (op.kind() != Operator::Kind::EQ && op.isAssignment() && - left.kind() == Expression::Kind::kSwizzle && !Analysis::HasSideEffects(left)) { - // This doesn't compile in Metal: - // float4 x = float4(1); - // x.xy *= float2x2(...); - // with the error message "non-const reference cannot bind to vector element", - // but switching it to x.xy = x.xy * float2x2(...) fixes it. We perform this tranformation - // as long as the LHS has no side effects, and hope for the best otherwise. - this->write(" = "); - this->writeExpression(left, Precedence::kAssignment); - this->write(operator_name(op.removeAssignment())); - precedence = op.removeAssignment().getBinaryPrecedence(); + // We never want to create index-expression substitutes on the RHS of the expression; + // the RHS is only emitted one time. + fIndexSubstitutionData->fCreateSubstitutes = false; + + this->writeBinaryExpressionElement(right, op, left, + op.removeAssignment().getBinaryPrecedence()); + }); } else { + // We don't need any rewrite; emit the binary expression as-is. + this->writeBinaryExpressionElement(left, op, right, precedence); this->write(operator_name(op)); + this->writeBinaryExpressionElement(right, op, left, precedence); } - this->writeBinaryExpressionElement(right, op, left, precedence); - if (needParens) { this->write(")"); } @@ -2025,6 +2020,16 @@ void MetalCodeGenerator::writeFunctionRequirementArgs(const FunctionDeclaration& this->write("_fragCoord"); separator = ", "; } + if (requirements & kVertexID_Requirement) { + this->write(separator); + this->write("sk_VertexID"); + separator = ", "; + } + if (requirements & kInstanceID_Requirement) { + this->write(separator); + this->write("sk_InstanceID"); + separator = ", "; + } if (requirements & kThreadgroups_Requirement) { this->write(separator); this->write("_threadgroups"); @@ -2060,6 +2065,16 @@ void MetalCodeGenerator::writeFunctionRequirementParams(const FunctionDeclaratio this->write("float4 _fragCoord"); separator = ", "; } + if (requirements & kVertexID_Requirement) { + this->write(separator); + this->write("uint sk_VertexID"); + separator = ", "; + } + if (requirements & kInstanceID_Requirement) { + this->write(separator); + this->write("uint sk_InstanceID"); + separator = ", "; + } if (requirements & kThreadgroups_Requirement) { this->write(separator); this->write("threadgroup Threadgroups& _threadgroups"); @@ -2067,14 +2082,14 @@ void MetalCodeGenerator::writeFunctionRequirementParams(const FunctionDeclaratio } } -int MetalCodeGenerator::getUniformBinding(const Modifiers& m) { - return (m.fLayout.fBinding >= 0) ? m.fLayout.fBinding - : fProgram.fConfig->fSettings.fDefaultUniformBinding; +int MetalCodeGenerator::getUniformBinding(const Layout& layout) { + return (layout.fBinding >= 0) ? layout.fBinding + : fProgram.fConfig->fSettings.fDefaultUniformBinding; } -int MetalCodeGenerator::getUniformSet(const Modifiers& m) { - return (m.fLayout.fSet >= 0) ? m.fLayout.fSet - : fProgram.fConfig->fSettings.fDefaultUniformSet; +int MetalCodeGenerator::getUniformSet(const Layout& layout) { + return (layout.fSet >= 0) ? layout.fSet + : fProgram.fConfig->fSettings.fDefaultUniformSet; } bool MetalCodeGenerator::writeFunctionDeclaration(const FunctionDeclaration& f) { @@ -2118,7 +2133,7 @@ bool MetalCodeGenerator::writeFunctionDeclaration(const FunctionDeclaration& f) return false; } - int binding = getUniformBinding(var->modifiers()); + int binding = getUniformBinding(var->layout()); this->write(separator); separator = ", "; @@ -2146,7 +2161,7 @@ bool MetalCodeGenerator::writeFunctionDeclaration(const FunctionDeclaration& f) } } else if (ProgramConfig::IsCompute(fProgram.fConfig->fKind)) { std::string type, attr; - switch (var->modifiers().fLayout.fBuiltin) { + switch (var->layout().fBuiltin) { case SK_NUMWORKGROUPS_BUILTIN: type = "uint3 "; attr = " [[threadgroups_per_grid]]"; @@ -2190,9 +2205,9 @@ bool MetalCodeGenerator::writeFunctionDeclaration(const FunctionDeclaration& f) this->write(is_buffer(intf) ? "device " : "constant "); this->writeType(intf.var()->type()); this->write("& " ); - this->write(fInterfaceBlockNameMap[&intf]); + this->write(fInterfaceBlockNameMap[&intf.var()->type()]); this->write(" [[buffer("); - this->write(std::to_string(this->getUniformBinding(intf.var()->modifiers()))); + this->write(std::to_string(this->getUniformBinding(intf.var()->layout()))); this->write(")]]"); separator = ", "; } @@ -2229,14 +2244,18 @@ bool MetalCodeGenerator::writeFunctionDeclaration(const FunctionDeclaration& f) this->writeFunctionRequirementParams(f, separator); } for (const Variable* param : f.parameters()) { - if (f.isMain() && param->modifiers().fLayout.fBuiltin != -1) { + // This is a workaround for our test files. They use the runtime effect signature, so main + // takes a coords parameter. We detect these at IR generation time, and we omit them from + // the declaration here, so the function is valid Metal. (Well, valid as long as the + // coordinates aren't actually referenced.) + if (f.isMain() && param == f.getMainCoordsParameter()) { continue; } this->write(separator); separator = ", "; - this->writeModifiers(param->modifiers()); + this->writeModifiers(param->modifierFlags()); this->writeType(param->type()); - if (pass_by_reference(param->type(), param->modifiers())) { + if (pass_by_reference(param->type(), param->modifierFlags())) { this->write("&"); } this->write(" "); @@ -2343,14 +2362,14 @@ void MetalCodeGenerator::writeFunction(const FunctionDefinition& f) { this->write(buffer.str()); } -void MetalCodeGenerator::writeModifiers(const Modifiers& modifiers) { +void MetalCodeGenerator::writeModifiers(ModifierFlags flags) { if (ProgramConfig::IsCompute(fProgram.fConfig->fKind) && - (modifiers.fFlags & (Modifiers::kIn_Flag | Modifiers::kOut_Flag))) { + (flags & (ModifierFlag::kIn | ModifierFlag::kOut))) { this->write("device "); - } else if (modifiers.fFlags & Modifiers::kOut_Flag) { + } else if (flags & ModifierFlag::kOut) { this->write("thread "); } - if (modifiers.fFlags & Modifiers::kConst_Flag) { + if (flags.isConst()) { this->write("const "); } } @@ -2360,12 +2379,12 @@ void MetalCodeGenerator::writeInterfaceBlock(const InterfaceBlock& intf) { return; } const Type* structType = &intf.var()->type().componentType(); - this->writeModifiers(intf.var()->modifiers()); + this->writeModifiers(intf.var()->modifierFlags()); this->write("struct "); this->writeType(*structType); this->writeLine(" {"); fIndentation++; - this->writeFields(structType->fields(), structType->fPosition, &intf); + this->writeFields(structType->fields(), structType->fPosition); if (fProgram.fInterface.fUseFlipRTUniform) { this->writeLine("float2 " SKSL_RTFLIP_NAME ";"); } @@ -2379,21 +2398,19 @@ void MetalCodeGenerator::writeInterfaceBlock(const InterfaceBlock& intf) { this->write(std::to_string(intf.arraySize())); this->write("]"); } - fInterfaceBlockNameMap.set(&intf, intf.instanceName()); + fInterfaceBlockNameMap.set(&intf.var()->type(), std::string(intf.instanceName())); } else { - fInterfaceBlockNameMap.set(&intf, *fProgram.fSymbols->takeOwnershipOfString( - "_anonInterface" + std::to_string(fAnonInterfaceCount++))); + fInterfaceBlockNameMap.set(&intf.var()->type(), + "_anonInterface" + std::to_string(fAnonInterfaceCount++)); } this->writeLine(";"); } -void MetalCodeGenerator::writeFields(SkSpan fields, - Position parentPos, - const InterfaceBlock* parentIntf) { +void MetalCodeGenerator::writeFields(SkSpan fields, Position parentPos) { MemoryLayout memoryLayout(MemoryLayout::Standard::kMetal); int currentOffset = 0; for (const Field& field : fields) { - int fieldOffset = field.fModifiers.fLayout.fOffset; + int fieldOffset = field.fLayout.fOffset; const Type* fieldType = field.fType; if (!memoryLayout.isSupported(*fieldType)) { fContext.fErrors->error(parentPos, "type '" + std::string(fieldType->name()) + @@ -2430,7 +2447,7 @@ void MetalCodeGenerator::writeFields(SkSpan fields, // padding past the first element of the array. An alternative approach is to declare // the struct without the unsized array member and replace variable references with a // buffer offset calculation based on sizeof(). - this->writeModifiers(field.fModifiers); + this->writeModifiers(field.fModifierFlags); this->writeType(fieldType->componentType()); this->write(" "); this->writeName(field.fName); @@ -2442,15 +2459,12 @@ void MetalCodeGenerator::writeFields(SkSpan fields, return; } currentOffset += fieldSize; - this->writeModifiers(field.fModifiers); + this->writeModifiers(field.fModifierFlags); this->writeType(*fieldType); this->write(" "); this->writeName(field.fName); } this->writeLine(";"); - if (parentIntf) { - fInterfaceBlockMap.set(&field, parentIntf); - } } } @@ -2466,7 +2480,7 @@ void MetalCodeGenerator::writeName(std::string_view name) { } void MetalCodeGenerator::writeVarDeclaration(const VarDeclaration& varDecl) { - this->writeModifiers(varDecl.var()->modifiers()); + this->writeModifiers(varDecl.var()->modifierFlags()); this->writeType(varDecl.var()->type()); this->write(" "); this->writeName(varDecl.var()->mangledName()); @@ -2710,10 +2724,10 @@ void MetalCodeGenerator::writeUniformStruct() { if (e->is()) { const GlobalVarDeclaration& decls = e->as(); const Variable& var = *decls.varDeclaration().var(); - if (var.modifiers().fFlags & Modifiers::kUniform_Flag && + if (var.modifierFlags().isUniform() && var.type().typeKind() != Type::TypeKind::kSampler && var.type().typeKind() != Type::TypeKind::kTexture) { - int uniformSet = this->getUniformSet(var.modifiers()); + int uniformSet = this->getUniformSet(var.layout()); // Make sure that the program's uniform-set value is consistent throughout. if (-1 == fUniformBuffer) { this->write("struct Uniforms {\n"); @@ -2745,23 +2759,23 @@ void MetalCodeGenerator::writeInputStruct() { if (is_input(var)) { this->write(" "); if (ProgramConfig::IsCompute(fProgram.fConfig->fKind) && - needs_address_space(var.type(), var.modifiers())) { + needs_address_space(var.type(), var.modifierFlags())) { // TODO: address space support this->write("device "); } this->writeType(var.type()); - if (pass_by_reference(var.type(), var.modifiers())) { + if (pass_by_reference(var.type(), var.modifierFlags())) { this->write("&"); } this->write(" "); this->writeName(var.mangledName()); - if (-1 != var.modifiers().fLayout.fLocation) { + if (-1 != var.layout().fLocation) { if (ProgramConfig::IsVertex(fProgram.fConfig->fKind)) { - this->write(" [[attribute(" + - std::to_string(var.modifiers().fLayout.fLocation) + ")]]"); + this->write(" [[attribute(" + std::to_string(var.layout().fLocation) + + ")]]"); } else if (ProgramConfig::IsFragment(fProgram.fConfig->fKind)) { - this->write(" [[user(locn" + - std::to_string(var.modifiers().fLayout.fLocation) + ")]]"); + this->write(" [[user(locn" + std::to_string(var.layout().fLocation) + + ")]]"); } } this->write(";\n"); @@ -2792,28 +2806,28 @@ void MetalCodeGenerator::writeOutputStruct() { if (is_output(var)) { this->write(" "); if (ProgramConfig::IsCompute(fProgram.fConfig->fKind) && - needs_address_space(var.type(), var.modifiers())) { + needs_address_space(var.type(), var.modifierFlags())) { // TODO: address space support this->write("device "); } this->writeType(var.type()); if (ProgramConfig::IsCompute(fProgram.fConfig->fKind) && - pass_by_reference(var.type(), var.modifiers())) { + pass_by_reference(var.type(), var.modifierFlags())) { this->write("&"); } this->write(" "); this->writeName(var.mangledName()); - int location = var.modifiers().fLayout.fLocation; + int location = var.layout().fLocation; if (!ProgramConfig::IsCompute(fProgram.fConfig->fKind) && location < 0 && var.type().typeKind() != Type::TypeKind::kTexture) { fContext.fErrors->error(var.fPosition, - "Metal out variables must have 'layout(location=...)'"); + "Metal out variables must have 'layout(location=...)'"); } else if (ProgramConfig::IsVertex(fProgram.fConfig->fKind)) { this->write(" [[user(locn" + std::to_string(location) + ")]]"); } else if (ProgramConfig::IsFragment(fProgram.fConfig->fKind)) { this->write(" [[color(" + std::to_string(location) + ")"); - int colorIndex = var.modifiers().fLayout.fIndex; + int colorIndex = var.layout().fIndex; if (colorIndex) { this->write(", index(" + std::to_string(colorIndex) + ")"); } @@ -2873,7 +2887,7 @@ void MetalCodeGenerator::visitGlobalStruct(GlobalStructVisitor* visitor) { if (element->is()) { const auto* ib = &element->as(); if (ib->typeName() != "sk_PerVertex") { - visitor->visitInterfaceBlock(*ib, fInterfaceBlockNameMap[ib]); + visitor->visitInterfaceBlock(*ib, fInterfaceBlockNameMap[&ib->var()->type()]); } continue; } @@ -2888,17 +2902,16 @@ void MetalCodeGenerator::visitGlobalStruct(GlobalStructVisitor* visitor) { continue; } if (var.type().typeKind() == Type::TypeKind::kTexture) { - visitor->visitTexture(var.type(), var.modifiers(), var.mangledName()); + visitor->visitTexture(var.type(), var.mangledName()); continue; } - if (!(var.modifiers().fFlags & ~Modifiers::kConst_Flag) && - var.modifiers().fLayout.fBuiltin == -1) { + if (!(var.modifierFlags() & ~ModifierFlag::kConst) && var.layout().fBuiltin == -1) { if (is_in_globals(var)) { // Visit a regular global variable. visitor->visitNonconstantVariable(var, decl.value().get()); } else { // Visit a constant-expression variable. - SkASSERT(var.modifiers().fFlags & Modifiers::kConst_Flag); + SkASSERT(var.modifierFlags().isConst()); visitor->visitConstantVariable(decl); } } @@ -2921,8 +2934,7 @@ void MetalCodeGenerator::writeGlobalStruct() { fCodeGen->writeName(blockName); fCodeGen->write(";\n"); } - void visitTexture(const Type& type, const Modifiers& modifiers, - std::string_view name) override { + void visitTexture(const Type& type, std::string_view name) override { this->addElement(); fCodeGen->write(" "); fCodeGen->writeType(type); @@ -2942,7 +2954,7 @@ void MetalCodeGenerator::writeGlobalStruct() { void visitNonconstantVariable(const Variable& var, const Expression* value) override { this->addElement(); fCodeGen->write(" "); - fCodeGen->writeModifiers(var.modifiers()); + fCodeGen->writeModifiers(var.modifierFlags()); fCodeGen->writeType(var.type()); fCodeGen->write(" "); fCodeGen->writeName(var.mangledName()); @@ -2979,7 +2991,7 @@ void MetalCodeGenerator::writeGlobalInit() { fCodeGen->write("&"); fCodeGen->writeName(blockName); } - void visitTexture(const Type&, const Modifiers& modifiers, std::string_view name) override { + void visitTexture(const Type&, std::string_view name) override { this->addElement(); fCodeGen->writeName(name); } @@ -3035,9 +3047,9 @@ void MetalCodeGenerator::visitThreadgroupStruct(ThreadgroupStructVisitor* visito const GlobalVarDeclaration& global = element->as(); const VarDeclaration& decl = global.varDeclaration(); const Variable& var = *decl.var(); - if (var.modifiers().fFlags & Modifiers::kWorkgroup_Flag) { + if (var.modifierFlags().isWorkgroup()) { SkASSERT(!decl.value()); - SkASSERT(!(var.modifiers().fFlags & Modifiers::kConst_Flag)); + SkASSERT(!var.modifierFlags().isConst()); visitor->visitNonconstantVariable(var); } } @@ -3049,7 +3061,7 @@ void MetalCodeGenerator::writeThreadgroupStruct() { void visitNonconstantVariable(const Variable& var) override { this->addElement(); fCodeGen->write(" "); - fCodeGen->writeModifiers(var.modifiers()); + fCodeGen->writeModifiers(var.modifierFlags()); fCodeGen->writeType(var.type()); fCodeGen->write(" "); fCodeGen->writeName(var.mangledName()); @@ -3114,10 +3126,10 @@ void MetalCodeGenerator::writeProgramElement(const ProgramElement& e) { case ProgramElement::Kind::kGlobalVar: break; case ProgramElement::Kind::kInterfaceBlock: - // handled in writeInterfaceBlocks, do nothing + // Handled in writeInterfaceBlocks; do nothing. break; case ProgramElement::Kind::kStructDefinition: - // Handled in writeStructDefinitions. Do nothing. + // Handled in writeStructDefinitions; do nothing. break; case ProgramElement::Kind::kFunction: this->writeFunction(e.as()); @@ -3126,8 +3138,7 @@ void MetalCodeGenerator::writeProgramElement(const ProgramElement& e) { this->writeFunctionPrototype(e.as()); break; case ProgramElement::Kind::kModifiers: - this->writeModifiers(e.as().modifiers()); - this->writeLine(";"); + // Not necessary in Metal; do nothing. break; default: SkDEBUGFAILF("unsupported program element: %s\n", e.description().c_str()); @@ -3158,8 +3169,12 @@ MetalCodeGenerator::Requirements MetalCodeGenerator::requirements(const Statemen case Expression::Kind::kVariableReference: { const Variable& var = *e.as().variable(); - if (var.modifiers().fLayout.fBuiltin == SK_FRAGCOORD_BUILTIN) { + if (var.layout().fBuiltin == SK_FRAGCOORD_BUILTIN) { fRequirements |= kGlobals_Requirement | kFragCoord_Requirement; + } else if (var.layout().fBuiltin == SK_VERTEXID_BUILTIN) { + fRequirements |= kVertexID_Requirement; + } else if (var.layout().fBuiltin == SK_INSTANCEID_BUILTIN) { + fRequirements |= kInstanceID_Requirement; } else if (var.storage() == Variable::Storage::kGlobal) { if (is_input(var)) { fRequirements |= kInputs_Requirement; diff --git a/src/sksl/codegen/SkSLMetalCodeGenerator.h b/src/sksl/codegen/SkSLMetalCodeGenerator.h index abea302c5e0c..f1a082e9b01b 100644 --- a/src/sksl/codegen/SkSLMetalCodeGenerator.h +++ b/src/sksl/codegen/SkSLMetalCodeGenerator.h @@ -10,13 +10,15 @@ #include "include/core/SkSpan.h" #include "include/private/SkSLDefines.h" -#include "include/private/base/SkTArray.h" #include "src/core/SkTHash.h" #include "src/sksl/SkSLStringStream.h" #include "src/sksl/codegen/SkSLCodeGenerator.h" +#include "src/sksl/ir/SkSLModifierFlags.h" #include +#include #include +#include #include #include @@ -63,7 +65,6 @@ class VariableReference; enum class OperatorPrecedence : uint8_t; enum IntrinsicKind : int8_t; struct Layout; -struct Modifiers; struct Program; /** @@ -88,7 +89,9 @@ class MetalCodeGenerator : public CodeGenerator { inline static constexpr Requirements kUniforms_Requirement = 1 << 2; inline static constexpr Requirements kGlobals_Requirement = 1 << 3; inline static constexpr Requirements kFragCoord_Requirement = 1 << 4; - inline static constexpr Requirements kThreadgroups_Requirement = 1 << 5; + inline static constexpr Requirements kVertexID_Requirement = 1 << 5; + inline static constexpr Requirements kInstanceID_Requirement = 1 << 6; + inline static constexpr Requirements kThreadgroups_Requirement = 1 << 7; class GlobalStructVisitor; void visitGlobalStruct(GlobalStructVisitor* visitor); @@ -118,9 +121,7 @@ class MetalCodeGenerator : public CodeGenerator { void writeConstantVariables(); - void writeFields(SkSpan fields, - Position pos, - const InterfaceBlock* parentIntf = nullptr); + void writeFields(SkSpan fields, Position pos); int size(const Type* type, bool isPacked) const; @@ -159,7 +160,7 @@ class MetalCodeGenerator : public CodeGenerator { void writeLayout(const Layout& layout); - void writeModifiers(const Modifiers& modifiers); + void writeModifiers(ModifierFlags flags); void writeVarInitializer(const Variable& var, const Expression& value); @@ -175,10 +176,6 @@ class MetalCodeGenerator : public CodeGenerator { void writeMinAbsHack(Expression& absExpr, Expression& otherExpr); - std::string getOutParamHelper(const FunctionCall& c, - const ExpressionArray& arguments, - const skia_private::TArray& outVars); - std::string getInversePolyfill(const ExpressionArray& arguments); std::string getBitcastIntrinsic(const Type& outType); @@ -255,6 +252,8 @@ class MetalCodeGenerator : public CodeGenerator { void writeIndexExpression(const IndexExpression& expr); + void writeIndexInnerExpression(const Expression& expr); + void writePrefixExpression(const PrefixExpression& p, Precedence parentPrecedence); void writePostfixExpression(const PostfixExpression& p, Precedence parentPrecedence); @@ -291,13 +290,14 @@ class MetalCodeGenerator : public CodeGenerator { // instances, not the types themselves) void writeComputeMainInputs(); - int getUniformBinding(const Modifiers& m); + int getUniformBinding(const Layout& layout); - int getUniformSet(const Modifiers& m); + int getUniformSet(const Layout& layout); + + void writeWithIndexSubstitution(const std::function& fn); skia_private::THashSet fReservedWords; - skia_private::THashMap fInterfaceBlockMap; - skia_private::THashMap fInterfaceBlockNameMap; + skia_private::THashMap fInterfaceBlockNameMap; int fAnonInterfaceCount = 0; int fPaddingCount = 0; const char* fLineEnding; @@ -315,10 +315,24 @@ class MetalCodeGenerator : public CodeGenerator { std::string fRTFlipName; const FunctionDeclaration* fCurrentFunction = nullptr; int fSwizzleHelperCount = 0; - bool fIgnoreVariableReferenceModifiers = false; static constexpr char kTextureSuffix[] = "_Tex"; static constexpr char kSamplerSuffix[] = "_Smplr"; + // If we might use an index expression more than once, we need to capture the result in a + // temporary variable to avoid double-evaluation. This should generally only occur when emitting + // a function call, since we need to polyfill GLSL-style out-parameter support. (skia:14130) + // The map holds . + using IndexSubstitutionMap = skia_private::THashMap; + + // When fIndexSubstitution is null (usually), index-substitution does not need to be performed. + struct IndexSubstitutionData { + IndexSubstitutionMap fMap; + StringStream fMainStream; + StringStream fPrefixStream; + bool fCreateSubstitutes = true; + }; + std::unique_ptr fIndexSubstitutionData; + // Workaround/polyfill flags bool fWrittenInverse2 = false, fWrittenInverse3 = false, fWrittenInverse4 = false; bool fWrittenMatrixCompMult = false; diff --git a/src/sksl/codegen/SkSLPipelineStageCodeGenerator.cpp b/src/sksl/codegen/SkSLPipelineStageCodeGenerator.cpp index c396be07d301..45e7ca5c6a69 100644 --- a/src/sksl/codegen/SkSLPipelineStageCodeGenerator.cpp +++ b/src/sksl/codegen/SkSLPipelineStageCodeGenerator.cpp @@ -13,9 +13,10 @@ #include "include/core/SkTypes.h" #include "include/private/SkSLDefines.h" #include "include/private/base/SkTArray.h" +#include "src/base/SkEnumBitMask.h" #include "src/core/SkTHash.h" #include "src/sksl/SkSLBuiltinTypes.h" -#include "src/sksl/SkSLCompiler.h" +#include "src/sksl/SkSLContext.h" // IWYU pragma: keep #include "src/sksl/SkSLIntrinsicList.h" #include "src/sksl/SkSLOperator.h" #include "src/sksl/SkSLProgramKind.h" @@ -37,8 +38,7 @@ #include "src/sksl/ir/SkSLIRNode.h" #include "src/sksl/ir/SkSLIfStatement.h" #include "src/sksl/ir/SkSLIndexExpression.h" -#include "src/sksl/ir/SkSLLayout.h" -#include "src/sksl/ir/SkSLModifiers.h" +#include "src/sksl/ir/SkSLModifierFlags.h" #include "src/sksl/ir/SkSLPostfixExpression.h" #include "src/sksl/ir/SkSLPrefixExpression.h" #include "src/sksl/ir/SkSLProgram.h" @@ -92,7 +92,7 @@ class PipelineStageCodeGenerator { void writeFunction(const FunctionDefinition& f); void writeFunctionDeclaration(const FunctionDeclaration& decl); - std::string modifierString(const Modifiers& modifiers); + std::string modifierString(ModifierFlags modifiers); std::string functionDeclaration(const FunctionDeclaration& decl); // Handles arrays correctly, eg: `float x[2]` @@ -151,8 +151,9 @@ class PipelineStageCodeGenerator { THashMap fFunctionNames; THashMap fStructNames; - StringStream* fBuffer = nullptr; - bool fCastReturnsToHalf = false; + StringStream* fBuffer = nullptr; + bool fCastReturnsToHalf = false; + const FunctionDeclaration* fCurrentFunction = nullptr; }; @@ -275,15 +276,16 @@ void PipelineStageCodeGenerator::writeFunctionCall(const FunctionCall& c) { void PipelineStageCodeGenerator::writeVariableReference(const VariableReference& ref) { const Variable* var = ref.variable(); - const Modifiers& modifiers = var->modifiers(); - if (modifiers.fLayout.fBuiltin == SK_MAIN_COORDS_BUILTIN) { + if (fCurrentFunction && var == fCurrentFunction->getMainCoordsParameter()) { this->write(fSampleCoords); return; - } else if (modifiers.fLayout.fBuiltin == SK_INPUT_COLOR_BUILTIN) { + } + if (fCurrentFunction && var == fCurrentFunction->getMainInputColorParameter()) { this->write(fInputColor); return; - } else if (modifiers.fLayout.fBuiltin == SK_DEST_COLOR_BUILTIN) { + } + if (fCurrentFunction && var == fCurrentFunction->getMainDestColorParameter()) { this->write(fDestColor); return; } @@ -361,6 +363,9 @@ void PipelineStageCodeGenerator::writeFunction(const FunctionDefinition& f) { return; } + SkASSERT(!fCurrentFunction); + fCurrentFunction = &f.declaration(); + AutoOutputBuffer body(this); // We allow public SkSL's main() to return half4 -or- float4 (ie vec4). When we emit @@ -387,6 +392,8 @@ void PipelineStageCodeGenerator::writeFunction(const FunctionDefinition& f) { fCallbacks->defineFunction(this->functionDeclaration(decl).c_str(), body.fBuffer.str().c_str(), decl.isMain()); + + fCurrentFunction = nullptr; } std::string PipelineStageCodeGenerator::functionDeclaration(const FunctionDeclaration& decl) { @@ -394,14 +401,14 @@ std::string PipelineStageCodeGenerator::functionDeclaration(const FunctionDeclar // on the function (e.g. `inline`) and its parameters (e.g. `inout`). std::string declString = String::printf("%s%s%s %s(", - (decl.modifiers().fFlags & Modifiers::kInline_Flag) ? "inline " : "", - (decl.modifiers().fFlags & Modifiers::kNoInline_Flag) ? "noinline " : "", + decl.modifierFlags().isInline() ? "inline " : "", + decl.modifierFlags().isNoInline() ? "noinline " : "", this->typeName(decl.returnType()).c_str(), this->functionName(decl).c_str()); auto separator = SkSL::String::Separator(); for (const Variable* p : decl.parameters()) { declString.append(separator()); - declString.append(this->modifierString(p->modifiers())); + declString.append(this->modifierString(p->modifierFlags())); declString.append(this->typedVariable(p->type(), p->name()).c_str()); } @@ -410,7 +417,8 @@ std::string PipelineStageCodeGenerator::functionDeclaration(const FunctionDeclar void PipelineStageCodeGenerator::writeFunctionDeclaration(const FunctionDeclaration& decl) { if (!decl.isMain() && !decl.isBuiltin()) { - fCallbacks->declareFunction(this->functionDeclaration(decl).c_str()); + std::string prototype = this->functionDeclaration(decl) + ';'; + fCallbacks->declareFunction(prototype.c_str()); } } @@ -420,14 +428,13 @@ void PipelineStageCodeGenerator::writeGlobalVarDeclaration(const GlobalVarDeclar if (var.isBuiltin() || var.type().isOpaque()) { // Don't re-declare these. (eg, sk_FragCoord, or fragmentProcessor children) - } else if (var.modifiers().fFlags & Modifiers::kUniform_Flag) { + } else if (var.modifierFlags().isUniform()) { std::string uniformName = fCallbacks->declareUniform(&decl); fVariableNames.set(&var, std::move(uniformName)); } else { std::string mangledName = fCallbacks->getMangledName(std::string(var.name()).c_str()); - std::string declaration = this->modifierString(var.modifiers()) + - this->typedVariable(var.type(), - std::string_view(mangledName.c_str())); + std::string declaration = this->modifierString(var.modifierFlags()) + + this->typedVariable(var.type(), mangledName); if (decl.value()) { AutoOutputBuffer outputToBuffer(this); this->writeExpression(*decl.value(), Precedence::kExpression); @@ -525,6 +532,9 @@ void PipelineStageCodeGenerator::writeExpression(const Expression& expr, case Expression::Kind::kConstructorStruct: this->writeAnyConstructor(expr.asAnyConstructor(), parentPrecedence); break; + case Expression::Kind::kEmpty: + this->write("false"); + break; case Expression::Kind::kFieldAccess: this->writeFieldAccess(expr.as()); break; @@ -647,17 +657,16 @@ void PipelineStageCodeGenerator::writePostfixExpression(const PostfixExpression& } } -std::string PipelineStageCodeGenerator::modifierString(const Modifiers& modifiers) { +std::string PipelineStageCodeGenerator::modifierString(ModifierFlags flags) { std::string result; - if (modifiers.fFlags & Modifiers::kConst_Flag) { + if (flags.isConst()) { result.append("const "); } - - if ((modifiers.fFlags & Modifiers::kIn_Flag) && (modifiers.fFlags & Modifiers::kOut_Flag)) { + if ((flags & ModifierFlag::kIn) && (flags & ModifierFlag::kOut)) { result.append("inout "); - } else if (modifiers.fFlags & Modifiers::kIn_Flag) { + } else if (flags & ModifierFlag::kIn) { result.append("in "); - } else if (modifiers.fFlags & Modifiers::kOut_Flag) { + } else if (flags & ModifierFlag::kOut) { result.append("out "); } @@ -675,7 +684,7 @@ std::string PipelineStageCodeGenerator::typedVariable(const Type& type, std::str } void PipelineStageCodeGenerator::writeVarDeclaration(const VarDeclaration& var) { - this->write(this->modifierString(var.var()->modifiers())); + this->write(this->modifierString(var.var()->modifierFlags())); this->write(this->typedVariable(var.var()->type(), var.var()->name())); if (var.value()) { this->write(" = "); diff --git a/src/sksl/codegen/SkSLRasterPipelineBuilder.cpp b/src/sksl/codegen/SkSLRasterPipelineBuilder.cpp index c5d573790a21..a16690488a0c 100644 --- a/src/sksl/codegen/SkSLRasterPipelineBuilder.cpp +++ b/src/sksl/codegen/SkSLRasterPipelineBuilder.cpp @@ -7,8 +7,6 @@ #include "src/sksl/codegen/SkSLRasterPipelineBuilder.h" -#ifdef SK_ENABLE_SKSL_IN_RASTER_PIPELINE - #include "include/core/SkStream.h" #include "include/private/base/SkMalloc.h" #include "include/private/base/SkTo.h" @@ -182,11 +180,35 @@ static BuilderOp convert_n_way_op_to_immediate(BuilderOp op, int slots, int32_t* return op; } +void Builder::appendInstruction(BuilderOp op, SlotList slots, + int immA, int immB, int immC, int immD) { + fInstructions.push_back({op, slots.fSlotA, slots.fSlotB, + immA, immB, immC, immD, fCurrentStackID}); +} + +Instruction* Builder::lastInstruction(int fromBack) { + if (fInstructions.size() <= fromBack) { + return nullptr; + } + Instruction* inst = &fInstructions.fromBack(fromBack); + if (inst->fStackID != fCurrentStackID) { + return nullptr; + } + return inst; +} + +Instruction* Builder::lastInstructionOnAnyStack(int fromBack) { + if (fInstructions.size() <= fromBack) { + return nullptr; + } + return &fInstructions.fromBack(fromBack); +} + void Builder::unary_op(BuilderOp op, int32_t slots) { switch (op) { case ALL_SINGLE_SLOT_UNARY_OP_CASES: case ALL_MULTI_SLOT_UNARY_OP_CASES: - fInstructions.push_back({op, {}, slots}); + this->appendInstruction(op, {}, slots); break; default: @@ -196,17 +218,17 @@ void Builder::unary_op(BuilderOp op, int32_t slots) { } void Builder::binary_op(BuilderOp op, int32_t slots) { - if (!fInstructions.empty()) { + if (Instruction* lastInstruction = this->lastInstruction()) { // If we just pushed or splatted a constant onto the stack... - Instruction& lastInstruction = fInstructions.back(); - if (lastInstruction.fOp == BuilderOp::push_constant && lastInstruction.fImmA >= slots) { + if (lastInstruction->fOp == BuilderOp::push_constant && + lastInstruction->fImmA >= slots) { // ... and this op has an immediate-mode equivalent... - int32_t constantValue = lastInstruction.fImmB; + int32_t constantValue = lastInstruction->fImmB; BuilderOp immOp = convert_n_way_op_to_immediate(op, slots, &constantValue); if (immOp != op) { // ... discard the constants from the stack, and use an immediate-mode op. this->discard_stack(slots); - fInstructions.push_back({immOp, {}, slots, constantValue}); + this->appendInstruction(immOp, {}, slots, constantValue); return; } } @@ -215,7 +237,7 @@ void Builder::binary_op(BuilderOp op, int32_t slots) { switch (op) { case ALL_N_WAY_BINARY_OP_CASES: case ALL_MULTI_SLOT_BINARY_OP_CASES: - fInstructions.push_back({op, {}, slots}); + this->appendInstruction(op, {}, slots); break; default: @@ -228,7 +250,7 @@ void Builder::ternary_op(BuilderOp op, int32_t slots) { switch (op) { case ALL_N_WAY_TERNARY_OP_CASES: case ALL_MULTI_SLOT_TERNARY_OP_CASES: - fInstructions.push_back({op, {}, slots}); + this->appendInstruction(op, {}, slots); break; default: @@ -239,10 +261,10 @@ void Builder::ternary_op(BuilderOp op, int32_t slots) { void Builder::dot_floats(int32_t slots) { switch (slots) { - case 1: fInstructions.push_back({BuilderOp::mul_n_floats, {}, slots}); break; - case 2: fInstructions.push_back({BuilderOp::dot_2_floats, {}, slots}); break; - case 3: fInstructions.push_back({BuilderOp::dot_3_floats, {}, slots}); break; - case 4: fInstructions.push_back({BuilderOp::dot_4_floats, {}, slots}); break; + case 1: this->appendInstruction(BuilderOp::mul_n_floats, {}, slots); break; + case 2: this->appendInstruction(BuilderOp::dot_2_floats, {}, slots); break; + case 3: this->appendInstruction(BuilderOp::dot_3_floats, {}, slots); break; + case 4: this->appendInstruction(BuilderOp::dot_4_floats, {}, slots); break; default: SkDEBUGFAIL("invalid number of slots"); @@ -251,21 +273,21 @@ void Builder::dot_floats(int32_t slots) { } void Builder::refract_floats() { - fInstructions.push_back({BuilderOp::refract_4_floats, {}}); + this->appendInstruction(BuilderOp::refract_4_floats, {}); } void Builder::inverse_matrix(int32_t n) { switch (n) { - case 2: fInstructions.push_back({BuilderOp::inverse_mat2, {}, 4}); break; - case 3: fInstructions.push_back({BuilderOp::inverse_mat3, {}, 9}); break; - case 4: fInstructions.push_back({BuilderOp::inverse_mat4, {}, 16}); break; + case 2: this->appendInstruction(BuilderOp::inverse_mat2, {}, 4); break; + case 3: this->appendInstruction(BuilderOp::inverse_mat3, {}, 9); break; + case 4: this->appendInstruction(BuilderOp::inverse_mat4, {}, 16); break; default: SkUNREACHABLE; } } void Builder::pad_stack(int32_t count) { if (count > 0) { - fInstructions.push_back({BuilderOp::pad_stack, {}, count}); + this->appendInstruction(BuilderOp::pad_stack, {}, count); } } @@ -277,27 +299,31 @@ bool Builder::simplifyImmediateUnmaskedOp() { // If we detect a pattern of 'push, immediate-op, unmasked pop', then we can // convert it into an immediate-op directly onto the value slots and take the // stack entirely out of the equation. - Instruction& popInstruction = fInstructions.back(); - Instruction& immInstruction = fInstructions.fromBack(1); - Instruction& pushInstruction = fInstructions.fromBack(2); + Instruction* popInstruction = this->lastInstruction(/*fromBack=*/0); + Instruction* immInstruction = this->lastInstruction(/*fromBack=*/1); + Instruction* pushInstruction = this->lastInstruction(/*fromBack=*/2); // If the last instruction is an unmasked pop... - if (popInstruction.fOp == BuilderOp::copy_stack_to_slots_unmasked) { + if (popInstruction && immInstruction && pushInstruction && + popInstruction->fOp == BuilderOp::copy_stack_to_slots_unmasked) { // ... and the prior instruction was an immediate-mode op, with the same number of slots... - if (is_immediate_op(immInstruction.fOp) && immInstruction.fImmA == popInstruction.fImmA) { + if (is_immediate_op(immInstruction->fOp) && + immInstruction->fImmA == popInstruction->fImmA) { // ... and we support multiple-slot immediates (if this op calls for it)... - if (immInstruction.fImmA == 1 || is_multi_slot_immediate_op(immInstruction.fOp)) { - // ... and the prior instruction was `push_slots` of at least that many slots... - if (pushInstruction.fOp == BuilderOp::push_slots && - pushInstruction.fImmA >= popInstruction.fImmA) { + if (immInstruction->fImmA == 1 || is_multi_slot_immediate_op(immInstruction->fOp)) { + // ... and the prior instruction was `push_slots` or `push_immutable` of at least + // that many slots... + if ((pushInstruction->fOp == BuilderOp::push_slots || + pushInstruction->fOp == BuilderOp::push_immutable) && + pushInstruction->fImmA >= popInstruction->fImmA) { // ... onto the same slot range... - Slot immSlot = popInstruction.fSlotA + popInstruction.fImmA; - Slot pushSlot = pushInstruction.fSlotA + pushInstruction.fImmA; + Slot immSlot = popInstruction->fSlotA + popInstruction->fImmA; + Slot pushSlot = pushInstruction->fSlotA + pushInstruction->fImmA; if (immSlot == pushSlot) { // ... we can shrink the push, eliminate the pop, and perform the immediate // op in-place instead. - pushInstruction.fImmA -= immInstruction.fImmA; - immInstruction.fSlotA = immSlot - immInstruction.fImmA; + pushInstruction->fImmA -= immInstruction->fImmA; + immInstruction->fSlotA = immSlot - immInstruction->fImmA; fInstructions.pop_back(); return true; } @@ -309,22 +335,27 @@ bool Builder::simplifyImmediateUnmaskedOp() { return false; } -void Builder::discard_stack(int32_t count) { +void Builder::discard_stack(int32_t count, int stackID) { // If we pushed something onto the stack and then immediately discarded part of it, we can // shrink or eliminate the push. - while (count > 0 && !fInstructions.empty()) { - Instruction& lastInstruction = fInstructions.back(); + while (count > 0) { + Instruction* lastInstruction = this->lastInstructionOnAnyStack(); + if (!lastInstruction || lastInstruction->fStackID != stackID) { + break; + } - switch (lastInstruction.fOp) { + switch (lastInstruction->fOp) { case BuilderOp::discard_stack: // Our last op was actually a separate discard_stack; combine the discards. - lastInstruction.fImmA += count; + lastInstruction->fImmA += count; return; - case BuilderOp::push_constant: case BuilderOp::push_clone: case BuilderOp::push_clone_from_stack: case BuilderOp::push_clone_indirect_from_stack: + case BuilderOp::push_constant: + case BuilderOp::push_immutable: + case BuilderOp::push_immutable_indirect: case BuilderOp::push_slots: case BuilderOp::push_slots_indirect: case BuilderOp::push_uniform: @@ -332,10 +363,10 @@ void Builder::discard_stack(int32_t count) { case BuilderOp::pad_stack: { // Our last op was a multi-slot push; these cancel out. Eliminate the op if its // count reached zero. - int cancelOut = std::min(count, lastInstruction.fImmA); - count -= cancelOut; - lastInstruction.fImmA -= cancelOut; - if (lastInstruction.fImmA == 0) { + int cancelOut = std::min(count, lastInstruction->fImmA); + count -= cancelOut; + lastInstruction->fImmA -= cancelOut; + if (lastInstruction->fImmA == 0) { fInstructions.pop_back(); } continue; @@ -361,8 +392,8 @@ void Builder::discard_stack(int32_t count) { // op with an equal number of slots, is interpreted as an unmasked stack pop. // We can simplify pops in a variety of ways. First, temporarily get rid of // `copy_stack_to_slots_unmasked`. - if (count == lastInstruction.fImmA) { - SlotRange dst{lastInstruction.fSlotA, lastInstruction.fImmA}; + if (count == lastInstruction->fImmA) { + SlotRange dst{lastInstruction->fSlotA, lastInstruction->fImmA}; fInstructions.pop_back(); // See if we can write this pop in a simpler way. @@ -389,7 +420,7 @@ void Builder::discard_stack(int32_t count) { } if (count > 0) { - fInstructions.push_back({BuilderOp::discard_stack, {}, count}); + this->appendInstruction(BuilderOp::discard_stack, {}, count); } } @@ -398,15 +429,14 @@ void Builder::label(int labelID) { // If the previous instruction was a branch to this label, it's a no-op; jumping to the very // next instruction is effectively meaningless. - while (!fInstructions.empty()) { - Instruction& lastInstruction = fInstructions.back(); - switch (lastInstruction.fOp) { + while (const Instruction* lastInstruction = this->lastInstructionOnAnyStack()) { + switch (lastInstruction->fOp) { case BuilderOp::jump: case BuilderOp::branch_if_all_lanes_active: case BuilderOp::branch_if_any_lanes_active: case BuilderOp::branch_if_no_lanes_active: case BuilderOp::branch_if_no_active_lanes_on_stack_top_equal: - if (lastInstruction.fImmA == labelID) { + if (lastInstruction->fImmA == labelID) { fInstructions.pop_back(); continue; } @@ -417,16 +447,18 @@ void Builder::label(int labelID) { } break; } - fInstructions.push_back({BuilderOp::label, {}, labelID}); + this->appendInstruction(BuilderOp::label, {}, labelID); } void Builder::jump(int labelID) { SkASSERT(labelID >= 0 && labelID < fNumLabels); - if (!fInstructions.empty() && fInstructions.back().fOp == BuilderOp::jump) { - // The previous instruction was also `jump`, so this branch could never possibly occur. - return; + if (const Instruction* lastInstruction = this->lastInstructionOnAnyStack()) { + if (lastInstruction->fOp == BuilderOp::jump) { + // The previous instruction was also `jump`, so this branch could never possibly occur. + return; + } } - fInstructions.push_back({BuilderOp::jump, {}, labelID}); + this->appendInstruction(BuilderOp::jump, {}, labelID); } void Builder::branch_if_any_lanes_active(int labelID) { @@ -436,14 +468,15 @@ void Builder::branch_if_any_lanes_active(int labelID) { } SkASSERT(labelID >= 0 && labelID < fNumLabels); - if (!fInstructions.empty() && - (fInstructions.back().fOp == BuilderOp::branch_if_any_lanes_active || - fInstructions.back().fOp == BuilderOp::jump)) { - // The previous instruction was `jump` or `branch_if_any_lanes_active`, so this branch - // could never possibly occur. - return; + if (const Instruction* lastInstruction = this->lastInstructionOnAnyStack()) { + if (lastInstruction->fOp == BuilderOp::branch_if_any_lanes_active || + lastInstruction->fOp == BuilderOp::jump) { + // The previous instruction was `jump` or `branch_if_any_lanes_active`, so this branch + // could never possibly occur. + return; + } } - fInstructions.push_back({BuilderOp::branch_if_any_lanes_active, {}, labelID}); + this->appendInstruction(BuilderOp::branch_if_any_lanes_active, {}, labelID); } void Builder::branch_if_all_lanes_active(int labelID) { @@ -453,14 +486,15 @@ void Builder::branch_if_all_lanes_active(int labelID) { } SkASSERT(labelID >= 0 && labelID < fNumLabels); - if (!fInstructions.empty() && - (fInstructions.back().fOp == BuilderOp::branch_if_all_lanes_active || - fInstructions.back().fOp == BuilderOp::jump)) { - // The previous instruction was `jump` or `branch_if_all_lanes_active`, so this branch - // could never possibly occur. - return; + if (const Instruction* lastInstruction = this->lastInstructionOnAnyStack()) { + if (lastInstruction->fOp == BuilderOp::branch_if_all_lanes_active || + lastInstruction->fOp == BuilderOp::jump) { + // The previous instruction was `jump` or `branch_if_all_lanes_active`, so this branch + // could never possibly occur. + return; + } } - fInstructions.push_back({BuilderOp::branch_if_all_lanes_active, {}, labelID}); + this->appendInstruction(BuilderOp::branch_if_all_lanes_active, {}, labelID); } void Builder::branch_if_no_lanes_active(int labelID) { @@ -469,101 +503,104 @@ void Builder::branch_if_no_lanes_active(int labelID) { } SkASSERT(labelID >= 0 && labelID < fNumLabels); - if (!fInstructions.empty() && - (fInstructions.back().fOp == BuilderOp::branch_if_no_lanes_active || - fInstructions.back().fOp == BuilderOp::jump)) { - // The previous instruction was `jump` or `branch_if_no_lanes_active`, so this branch - // could never possibly occur. - return; + if (const Instruction* lastInstruction = this->lastInstructionOnAnyStack()) { + if (lastInstruction->fOp == BuilderOp::branch_if_no_lanes_active || + lastInstruction->fOp == BuilderOp::jump) { + // The previous instruction was `jump` or `branch_if_no_lanes_active`, so this branch + // could never possibly occur. + return; + } } - fInstructions.push_back({BuilderOp::branch_if_no_lanes_active, {}, labelID}); + this->appendInstruction(BuilderOp::branch_if_no_lanes_active, {}, labelID); } void Builder::branch_if_no_active_lanes_on_stack_top_equal(int value, int labelID) { SkASSERT(labelID >= 0 && labelID < fNumLabels); - if (!fInstructions.empty() && - (fInstructions.back().fOp == BuilderOp::jump || - (fInstructions.back().fOp == BuilderOp::branch_if_no_active_lanes_on_stack_top_equal && - fInstructions.back().fImmB == value))) { - // The previous instruction was `jump` or `branch_if_no_active_lanes_on_stack_top_equal` - // (checking against the same value), so this branch could never possibly occur. - return; + if (const Instruction* lastInstruction = this->lastInstructionOnAnyStack()) { + if (lastInstruction->fOp == BuilderOp::jump || + (lastInstruction->fOp == BuilderOp::branch_if_no_active_lanes_on_stack_top_equal && + lastInstruction->fImmB == value)) { + // The previous instruction was `jump` or `branch_if_no_active_lanes_on_stack_top_equal` + // (checking against the same value), so this branch could never possibly occur. + return; + } } - fInstructions.push_back({BuilderOp::branch_if_no_active_lanes_on_stack_top_equal, - {}, labelID, value}); + this->appendInstruction(BuilderOp::branch_if_no_active_lanes_on_stack_top_equal, + {}, labelID, value); } -void Builder::push_slots(SlotRange src) { +void Builder::push_slots_or_immutable(SlotRange src, BuilderOp op) { SkASSERT(src.count >= 0); - if (!fInstructions.empty()) { - Instruction& lastInstruction = fInstructions.back(); - + if (Instruction* lastInstruction = this->lastInstruction()) { // If the previous instruction was pushing slots contiguous to this range, we can collapse // the two pushes into one larger push. - if (lastInstruction.fOp == BuilderOp::push_slots && - lastInstruction.fSlotA + lastInstruction.fImmA == src.index) { - lastInstruction.fImmA += src.count; + if (lastInstruction->fOp == op && + lastInstruction->fSlotA + lastInstruction->fImmA == src.index) { + lastInstruction->fImmA += src.count; src.count = 0; } } if (src.count > 0) { - fInstructions.push_back({BuilderOp::push_slots, {src.index}, src.count}); + this->appendInstruction(op, {src.index}, src.count); } // Look for a sequence of "copy stack to X, discard stack, copy X to stack". This is a common // pattern when multiple operations in a row affect the same variable. When we see this, we can // eliminate both the discard and the push. - if (fInstructions.size() >= 3 && fInstructions.back().fOp == BuilderOp::push_slots) { - int pushIndex = fInstructions.back().fSlotA; - int pushCount = fInstructions.back().fImmA; - - const Instruction& discardInst = fInstructions.fromBack(1); - const Instruction& copyToSlotsInst = fInstructions.fromBack(2); - - // Look for a `discard_stack` matching our push count. - if (discardInst.fOp == BuilderOp::discard_stack && discardInst.fImmA == pushCount) { - // Look for a `copy_stack_to_slots` matching our push. - if ((copyToSlotsInst.fOp == BuilderOp::copy_stack_to_slots || - copyToSlotsInst.fOp == BuilderOp::copy_stack_to_slots_unmasked) && - copyToSlotsInst.fSlotA == pushIndex && - copyToSlotsInst.fImmA == pushCount) { - // We found a matching sequence. Remove the discard and push. - fInstructions.pop_back(); - fInstructions.pop_back(); - return; + if (fInstructions.size() >= 3) { + const Instruction* pushInst = this->lastInstruction(/*fromBack=*/0); + const Instruction* discardInst = this->lastInstruction(/*fromBack=*/1); + const Instruction* copyToSlotsInst = this->lastInstruction(/*fromBack=*/2); + + if (pushInst && discardInst && copyToSlotsInst && pushInst->fOp == BuilderOp::push_slots) { + int pushIndex = pushInst->fSlotA; + int pushCount = pushInst->fImmA; + + // Look for a `discard_stack` matching our push count. + if (discardInst->fOp == BuilderOp::discard_stack && discardInst->fImmA == pushCount) { + // Look for a `copy_stack_to_slots` matching our push. + if ((copyToSlotsInst->fOp == BuilderOp::copy_stack_to_slots || + copyToSlotsInst->fOp == BuilderOp::copy_stack_to_slots_unmasked) && + copyToSlotsInst->fSlotA == pushIndex && copyToSlotsInst->fImmA == pushCount) { + // We found a matching sequence. Remove the discard and push. + fInstructions.pop_back(); + fInstructions.pop_back(); + return; + } } } } } -void Builder::push_slots_indirect(SlotRange fixedRange, int dynamicStackID, SlotRange limitRange) { +void Builder::push_slots_or_immutable_indirect(SlotRange fixedRange, + int dynamicStackID, + SlotRange limitRange, + BuilderOp op) { // SlotA: fixed-range start // SlotB: limit-range end // immA: number of slots // immB: dynamic stack ID - fInstructions.push_back({BuilderOp::push_slots_indirect, - {fixedRange.index, limitRange.index + limitRange.count}, - fixedRange.count, - dynamicStackID}); + this->appendInstruction(op, + {fixedRange.index, limitRange.index + limitRange.count}, + fixedRange.count, + dynamicStackID); } void Builder::push_uniform(SlotRange src) { SkASSERT(src.count >= 0); - if (!fInstructions.empty()) { - Instruction& lastInstruction = fInstructions.back(); - + if (Instruction* lastInstruction = this->lastInstruction()) { // If the previous instruction was pushing uniforms contiguous to this range, we can // collapse the two pushes into one larger push. - if (lastInstruction.fOp == BuilderOp::push_uniform && - lastInstruction.fSlotA + lastInstruction.fImmA == src.index) { - lastInstruction.fImmA += src.count; + if (lastInstruction->fOp == BuilderOp::push_uniform && + lastInstruction->fSlotA + lastInstruction->fImmA == src.index) { + lastInstruction->fImmA += src.count; return; } } if (src.count > 0) { - fInstructions.push_back({BuilderOp::push_uniform, {src.index}, src.count}); + this->appendInstruction(BuilderOp::push_uniform, {src.index}, src.count); } } @@ -574,10 +611,10 @@ void Builder::push_uniform_indirect(SlotRange fixedRange, // SlotB: limit-range end // immA: number of slots // immB: dynamic stack ID - fInstructions.push_back({BuilderOp::push_uniform_indirect, - {fixedRange.index, limitRange.index + limitRange.count}, - fixedRange.count, - dynamicStackID}); + this->appendInstruction(BuilderOp::push_uniform_indirect, + {fixedRange.index, limitRange.index + limitRange.count}, + fixedRange.count, + dynamicStackID); } void Builder::trace_var_indirect(int traceMaskStackID, @@ -589,36 +626,32 @@ void Builder::trace_var_indirect(int traceMaskStackID, // immA: trace-mask stack ID // immB: number of slots // immC: dynamic stack ID - fInstructions.push_back({BuilderOp::trace_var_indirect, - {fixedRange.index, limitRange.index + limitRange.count}, - traceMaskStackID, - fixedRange.count, - dynamicStackID}); + this->appendInstruction(BuilderOp::trace_var_indirect, + {fixedRange.index, limitRange.index + limitRange.count}, + traceMaskStackID, + fixedRange.count, + dynamicStackID); } void Builder::push_constant_i(int32_t val, int count) { SkASSERT(count >= 0); if (count > 0) { - if (!fInstructions.empty()) { - Instruction& lastInstruction = fInstructions.back(); - + if (Instruction* lastInstruction = this->lastInstruction()) { // If the previous op is pushing the same value, we can just push more of them. - if (lastInstruction.fOp == BuilderOp::push_constant && lastInstruction.fImmB == val) { - lastInstruction.fImmA += count; + if (lastInstruction->fOp == BuilderOp::push_constant && lastInstruction->fImmB == val) { + lastInstruction->fImmA += count; return; } } - fInstructions.push_back({BuilderOp::push_constant, {}, count, val}); + this->appendInstruction(BuilderOp::push_constant, {}, count, val); } } void Builder::push_duplicates(int count) { - if (!fInstructions.empty()) { - Instruction& lastInstruction = fInstructions.back(); - + if (Instruction* lastInstruction = this->lastInstruction()) { // If the previous op is pushing a constant, we can just push more of them. - if (lastInstruction.fOp == BuilderOp::push_constant) { - lastInstruction.fImmA += count; + if (lastInstruction->fOp == BuilderOp::push_constant) { + lastInstruction->fImmA += count; return; } } @@ -644,17 +677,16 @@ void Builder::push_duplicates(int count) { void Builder::push_clone(int numSlots, int offsetFromStackTop) { // If we are cloning the stack top... if (numSlots == 1 && offsetFromStackTop == 0) { - if (!fInstructions.empty()) { - // ... and the previous op is pushing a constant... - Instruction& lastInstruction = fInstructions.back(); - if (lastInstruction.fOp == BuilderOp::push_constant) { + // ... and the previous op is pushing a constant... + if (Instruction* lastInstruction = this->lastInstruction()) { + if (lastInstruction->fOp == BuilderOp::push_constant) { // ... we can just push more of them. - lastInstruction.fImmA += 1; + lastInstruction->fImmA += 1; return; } } } - fInstructions.push_back({BuilderOp::push_clone, {}, numSlots, numSlots + offsetFromStackTop}); + this->appendInstruction(BuilderOp::push_clone, {}, numSlots, numSlots + offsetFromStackTop); } void Builder::push_clone_from_stack(SlotRange range, int otherStackID, int offsetFromStackTop) { @@ -663,23 +695,21 @@ void Builder::push_clone_from_stack(SlotRange range, int otherStackID, int offse // immC: offset from stack top offsetFromStackTop -= range.index; - if (!fInstructions.empty()) { - Instruction& lastInstruction = fInstructions.back(); - + if (Instruction* lastInstruction = this->lastInstruction()) { // If the previous op is also pushing a clone... - if (lastInstruction.fOp == BuilderOp::push_clone_from_stack && + if (lastInstruction->fOp == BuilderOp::push_clone_from_stack && // ... from the same stack... - lastInstruction.fImmB == otherStackID && + lastInstruction->fImmB == otherStackID && // ... and this clone starts at the same place that the last clone ends... - lastInstruction.fImmC - lastInstruction.fImmA == offsetFromStackTop) { + lastInstruction->fImmC - lastInstruction->fImmA == offsetFromStackTop) { // ... just extend the existing clone-op. - lastInstruction.fImmA += range.count; + lastInstruction->fImmA += range.count; return; } } - fInstructions.push_back({BuilderOp::push_clone_from_stack, {}, - range.count, otherStackID, offsetFromStackTop}); + this->appendInstruction(BuilderOp::push_clone_from_stack, {}, + range.count, otherStackID, offsetFromStackTop); } void Builder::push_clone_indirect_from_stack(SlotRange fixedOffset, @@ -692,8 +722,8 @@ void Builder::push_clone_indirect_from_stack(SlotRange fixedOffset, // immD: dynamic stack ID offsetFromStackTop -= fixedOffset.index; - fInstructions.push_back({BuilderOp::push_clone_indirect_from_stack, {}, - fixedOffset.count, otherStackID, offsetFromStackTop, dynamicStackID}); + this->appendInstruction(BuilderOp::push_clone_indirect_from_stack, {}, + fixedOffset.count, otherStackID, offsetFromStackTop, dynamicStackID); } void Builder::pop_slots(SlotRange dst) { @@ -707,20 +737,24 @@ void Builder::pop_slots(SlotRange dst) { } void Builder::simplifyPopSlotsUnmasked(SlotRange* dst) { - if (!dst->count || fInstructions.empty()) { + if (!dst->count) { // There's nothing left to simplify. return; } - - Instruction& lastInstruction = fInstructions.back(); + Instruction* lastInstruction = this->lastInstruction(); + if (!lastInstruction) { + // There's nothing left to simplify. + return; + } + BuilderOp lastOp = lastInstruction->fOp; // If the last instruction is pushing a constant, we can simplify it by copying the constant // directly into the destination slot. - if (lastInstruction.fOp == BuilderOp::push_constant) { + if (lastOp == BuilderOp::push_constant) { // Get the last slot. - int32_t value = lastInstruction.fImmB; - lastInstruction.fImmA--; - if (lastInstruction.fImmA == 0) { + int32_t value = lastInstruction->fImmB; + lastInstruction->fImmA--; + if (lastInstruction->fImmA == 0) { fInstructions.pop_back(); } @@ -738,11 +772,11 @@ void Builder::simplifyPopSlotsUnmasked(SlotRange* dst) { // If the last instruction is pushing a uniform, we can simplify it by copying the uniform // directly into the destination slot. - if (lastInstruction.fOp == BuilderOp::push_uniform) { + if (lastOp == BuilderOp::push_uniform) { // Get the last slot. - Slot sourceSlot = lastInstruction.fSlotA + lastInstruction.fImmA - 1; - lastInstruction.fImmA--; - if (lastInstruction.fImmA == 0) { + Slot sourceSlot = lastInstruction->fSlotA + lastInstruction->fImmA - 1; + lastInstruction->fImmA--; + if (lastInstruction->fImmA == 0) { fInstructions.pop_back(); } @@ -758,12 +792,12 @@ void Builder::simplifyPopSlotsUnmasked(SlotRange* dst) { return; } - // If the last instruction is pushing a slot, we can just copy that slot. - if (lastInstruction.fOp == BuilderOp::push_slots) { + // If the last instruction is pushing a slot or immutable, we can just copy that slot. + if (lastOp == BuilderOp::push_slots || lastOp == BuilderOp::push_immutable) { // Get the last slot. - Slot sourceSlot = lastInstruction.fSlotA + lastInstruction.fImmA - 1; - lastInstruction.fImmA--; - if (lastInstruction.fImmA == 0) { + Slot sourceSlot = lastInstruction->fSlotA + lastInstruction->fImmA - 1; + lastInstruction->fImmA--; + if (lastInstruction->fImmA == 0) { fInstructions.pop_back(); } @@ -775,8 +809,15 @@ void Builder::simplifyPopSlotsUnmasked(SlotRange* dst) { this->simplifyPopSlotsUnmasked(dst); // Copy the slot directly. - if (destinationSlot != sourceSlot) { - this->copy_slots_unmasked({destinationSlot, 1}, {sourceSlot, 1}); + if (lastOp == BuilderOp::push_slots) { + if (destinationSlot != sourceSlot) { + this->copy_slots_unmasked({destinationSlot, 1}, {sourceSlot, 1}); + } else { + // Copying from a value-slot into the same value-slot is a no-op. + } + } else { + // Copy from immutable data directly to the destination slot. + this->copy_immutable_unmasked({destinationSlot, 1}, {sourceSlot, 1}); } return; } @@ -789,26 +830,22 @@ void Builder::pop_slots_unmasked(SlotRange dst) { } void Builder::exchange_src() { - if (!fInstructions.empty()) { - Instruction& lastInstruction = fInstructions.back(); - + if (Instruction* lastInstruction = this->lastInstruction()) { // If the previous op is also an exchange-src... - if (lastInstruction.fOp == BuilderOp::exchange_src) { + if (lastInstruction->fOp == BuilderOp::exchange_src) { // ... both ops can be eliminated. A double-swap is a no-op. fInstructions.pop_back(); return; } } - fInstructions.push_back({BuilderOp::exchange_src, {}}); + this->appendInstruction(BuilderOp::exchange_src, {}); } void Builder::pop_src_rgba() { - if (!fInstructions.empty()) { - Instruction& lastInstruction = fInstructions.back(); - + if (Instruction* lastInstruction = this->lastInstruction()) { // If the previous op is exchanging src.rgba with the stack... - if (lastInstruction.fOp == BuilderOp::exchange_src) { + if (lastInstruction->fOp == BuilderOp::exchange_src) { // ... both ops can be eliminated. It's just sliding the color back and forth. fInstructions.pop_back(); this->discard_stack(4); @@ -816,7 +853,7 @@ void Builder::pop_src_rgba() { } } - fInstructions.push_back({BuilderOp::pop_src_rgba, {}}); + this->appendInstruction(BuilderOp::pop_src_rgba, {}); } void Builder::copy_stack_to_slots(SlotRange dst, int offsetFromStackTop) { @@ -827,23 +864,21 @@ void Builder::copy_stack_to_slots(SlotRange dst, int offsetFromStackTop) { } // If the last instruction copied the previous stack slots, just extend it. - if (!fInstructions.empty()) { - Instruction& lastInstruction = fInstructions.back(); - + if (Instruction* lastInstruction = this->lastInstruction()) { // If the last op is copy-stack-to-slots... - if (lastInstruction.fOp == BuilderOp::copy_stack_to_slots && + if (lastInstruction->fOp == BuilderOp::copy_stack_to_slots && // and this op's destination is immediately after the last copy-slots-op's destination - lastInstruction.fSlotA + lastInstruction.fImmA == dst.index && + lastInstruction->fSlotA + lastInstruction->fImmA == dst.index && // and this op's source is immediately after the last copy-slots-op's source - lastInstruction.fImmB - lastInstruction.fImmA == offsetFromStackTop) { + lastInstruction->fImmB - lastInstruction->fImmA == offsetFromStackTop) { // then we can just extend the copy! - lastInstruction.fImmA += dst.count; + lastInstruction->fImmA += dst.count; return; } } - fInstructions.push_back({BuilderOp::copy_stack_to_slots, {dst.index}, - dst.count, offsetFromStackTop}); + this->appendInstruction(BuilderOp::copy_stack_to_slots, {dst.index}, + dst.count, offsetFromStackTop); } void Builder::copy_stack_to_slots_indirect(SlotRange fixedRange, @@ -853,10 +888,10 @@ void Builder::copy_stack_to_slots_indirect(SlotRange fixedRange, // SlotB: limit-range end // immA: number of slots // immB: dynamic stack ID - fInstructions.push_back({BuilderOp::copy_stack_to_slots_indirect, - {fixedRange.index, limitRange.index + limitRange.count}, - fixedRange.count, - dynamicStackID}); + this->appendInstruction(BuilderOp::copy_stack_to_slots_indirect, + {fixedRange.index, limitRange.index + limitRange.count}, + fixedRange.count, + dynamicStackID); } static bool slot_ranges_overlap(SlotRange x, SlotRange y) { @@ -866,89 +901,100 @@ static bool slot_ranges_overlap(SlotRange x, SlotRange y) { void Builder::copy_constant(Slot slot, int constantValue) { // If the last instruction copied the same constant, just extend it. - if (!fInstructions.empty()) { - Instruction& lastInstr = fInstructions.back(); - + if (Instruction* lastInstr = this->lastInstruction()) { // If the last op is copy-constant... - if (lastInstr.fOp == BuilderOp::copy_constant && + if (lastInstr->fOp == BuilderOp::copy_constant && // ... and has the same value... - lastInstr.fImmB == constantValue && + lastInstr->fImmB == constantValue && // ... and the slot is immediately after the last copy-constant's destination... - lastInstr.fSlotA + lastInstr.fImmA == slot) { + lastInstr->fSlotA + lastInstr->fImmA == slot) { // ... then we can extend the copy! - lastInstr.fImmA += 1; + lastInstr->fImmA += 1; return; } } - fInstructions.push_back({BuilderOp::copy_constant, {slot}, 1, constantValue}); + this->appendInstruction(BuilderOp::copy_constant, {slot}, 1, constantValue); } void Builder::copy_slots_unmasked(SlotRange dst, SlotRange src) { // If the last instruction copied adjacent slots, just extend it. - if (!fInstructions.empty()) { - Instruction& lastInstr = fInstructions.back(); - - // If the last op is copy-slots-unmasked... - if (lastInstr.fOp == BuilderOp::copy_slot_unmasked && + if (Instruction* lastInstr = this->lastInstruction()) { + // If the last op is a match... + if (lastInstr->fOp == BuilderOp::copy_slot_unmasked && // and this op's destination is immediately after the last copy-slots-op's destination - lastInstr.fSlotA + lastInstr.fImmA == dst.index && + lastInstr->fSlotA + lastInstr->fImmA == dst.index && // and this op's source is immediately after the last copy-slots-op's source - lastInstr.fSlotB + lastInstr.fImmA == src.index && + lastInstr->fSlotB + lastInstr->fImmA == src.index && // and the source/dest ranges will not overlap - !slot_ranges_overlap({lastInstr.fSlotB, lastInstr.fImmA + dst.count}, - {lastInstr.fSlotA, lastInstr.fImmA + dst.count})) { + !slot_ranges_overlap({lastInstr->fSlotB, lastInstr->fImmA + dst.count}, + {lastInstr->fSlotA, lastInstr->fImmA + dst.count})) { // then we can just extend the copy! - lastInstr.fImmA += dst.count; + lastInstr->fImmA += dst.count; return; } } SkASSERT(dst.count == src.count); - fInstructions.push_back({BuilderOp::copy_slot_unmasked, {dst.index, src.index}, dst.count}); + this->appendInstruction(BuilderOp::copy_slot_unmasked, {dst.index, src.index}, dst.count); } -void Builder::copy_uniform_to_slots_unmasked(SlotRange dst, SlotRange src) { - // If the last instruction copied adjacent slots, just extend it. - if (!fInstructions.empty()) { - Instruction& lastInstr = fInstructions.back(); +void Builder::copy_immutable_unmasked(SlotRange dst, SlotRange src) { + // If the last instruction copied adjacent immutable data, just extend it. + if (Instruction* lastInstr = this->lastInstruction()) { + // If the last op is a match... + if (lastInstr->fOp == BuilderOp::copy_immutable_unmasked && + // and this op's destination is immediately after the last copy-slots-op's destination + lastInstr->fSlotA + lastInstr->fImmA == dst.index && + // and this op's source is immediately after the last copy-slots-op's source + lastInstr->fSlotB + lastInstr->fImmA == src.index) { + // then we can just extend the copy! + lastInstr->fImmA += dst.count; + return; + } + } + + SkASSERT(dst.count == src.count); + this->appendInstruction(BuilderOp::copy_immutable_unmasked, {dst.index, src.index}, dst.count); +} +void Builder::copy_uniform_to_slots_unmasked(SlotRange dst, SlotRange src) { + // If the last instruction copied adjacent uniforms, just extend it. + if (Instruction* lastInstr = this->lastInstruction()) { // If the last op is copy-constant... - if (lastInstr.fOp == BuilderOp::copy_uniform_to_slots_unmasked && + if (lastInstr->fOp == BuilderOp::copy_uniform_to_slots_unmasked && // and this op's destination is immediately after the last copy-constant's destination - lastInstr.fSlotB + lastInstr.fImmA == dst.index && + lastInstr->fSlotB + lastInstr->fImmA == dst.index && // and this op's source is immediately after the last copy-constant's source - lastInstr.fSlotA + lastInstr.fImmA == src.index) { + lastInstr->fSlotA + lastInstr->fImmA == src.index) { // then we can just extend the copy! - lastInstr.fImmA += dst.count; + lastInstr->fImmA += dst.count; return; } } SkASSERT(dst.count == src.count); - fInstructions.push_back({BuilderOp::copy_uniform_to_slots_unmasked, {src.index, dst.index}, - dst.count}); + this->appendInstruction(BuilderOp::copy_uniform_to_slots_unmasked, {src.index, dst.index}, + dst.count); } void Builder::copy_stack_to_slots_unmasked(SlotRange dst, int offsetFromStackTop) { // If the last instruction copied the previous stack slots, just extend it. - if (!fInstructions.empty()) { - Instruction& lastInstr = fInstructions.back(); - + if (Instruction* lastInstr = this->lastInstruction()) { // If the last op is copy-stack-to-slots-unmasked... - if (lastInstr.fOp == BuilderOp::copy_stack_to_slots_unmasked && + if (lastInstr->fOp == BuilderOp::copy_stack_to_slots_unmasked && // and this op's destination is immediately after the last copy-slots-op's destination - lastInstr.fSlotA + lastInstr.fImmA == dst.index && + lastInstr->fSlotA + lastInstr->fImmA == dst.index && // and this op's source is immediately after the last copy-slots-op's source - lastInstr.fImmB - lastInstr.fImmA == offsetFromStackTop) { + lastInstr->fImmB - lastInstr->fImmA == offsetFromStackTop) { // then we can just extend the copy! - lastInstr.fImmA += dst.count; + lastInstr->fImmA += dst.count; return; } } - fInstructions.push_back({BuilderOp::copy_stack_to_slots_unmasked, {dst.index}, - dst.count, offsetFromStackTop}); + this->appendInstruction(BuilderOp::copy_stack_to_slots_unmasked, {dst.index}, + dst.count, offsetFromStackTop); } void Builder::pop_return_mask() { @@ -956,40 +1002,52 @@ void Builder::pop_return_mask() { // This instruction is going to overwrite the return mask. If the previous instruction was // masking off the return mask, that's wasted work and it can be eliminated. - if (!fInstructions.empty()) { - Instruction& lastInstruction = fInstructions.back(); + if (Instruction* lastInstruction = this->lastInstructionOnAnyStack()) { + if (lastInstruction->fOp == BuilderOp::mask_off_return_mask) { + fInstructions.pop_back(); + } + } + + this->appendInstruction(BuilderOp::pop_return_mask, {}); +} - if (lastInstruction.fOp == BuilderOp::mask_off_return_mask) { +void Builder::merge_condition_mask() { + SkASSERT(this->executionMaskWritesAreEnabled()); + + // This instruction is going to overwrite the condition mask. If the previous instruction was + // loading the condition mask, that's wasted work and it can be eliminated. + if (Instruction* lastInstruction = this->lastInstructionOnAnyStack()) { + if (lastInstruction->fOp == BuilderOp::pop_condition_mask) { + int stackID = lastInstruction->fStackID; fInstructions.pop_back(); + this->discard_stack(/*count=*/1, stackID); } } - fInstructions.push_back({BuilderOp::pop_return_mask, {}}); + this->appendInstruction(BuilderOp::merge_condition_mask, {}); } void Builder::zero_slots_unmasked(SlotRange dst) { - if (!fInstructions.empty()) { - Instruction& lastInstruction = fInstructions.back(); - - if (lastInstruction.fOp == BuilderOp::copy_constant && lastInstruction.fImmB == 0) { - if (lastInstruction.fSlotA + lastInstruction.fImmA == dst.index) { + if (Instruction* lastInstruction = this->lastInstruction()) { + if (lastInstruction->fOp == BuilderOp::copy_constant && lastInstruction->fImmB == 0) { + if (lastInstruction->fSlotA + lastInstruction->fImmA == dst.index) { // The previous instruction was zeroing the range immediately before this range. // Combine the ranges. - lastInstruction.fImmA += dst.count; + lastInstruction->fImmA += dst.count; return; } - if (lastInstruction.fSlotA == dst.index + dst.count) { + if (lastInstruction->fSlotA == dst.index + dst.count) { // The previous instruction was zeroing the range immediately after this range. // Combine the ranges. - lastInstruction.fSlotA = dst.index; - lastInstruction.fImmA += dst.count; + lastInstruction->fSlotA = dst.index; + lastInstruction->fImmA += dst.count; return; } } } - fInstructions.push_back({BuilderOp::copy_constant, {dst.index}, dst.count, 0}); + this->appendInstruction(BuilderOp::copy_constant, {dst.index}, dst.count, 0); } static int pack_nybbles(SkSpan components) { @@ -1031,10 +1089,10 @@ void Builder::swizzle_copy_stack_to_slots(SlotRange dst, // immA: number of swizzle components // immB: swizzle components // immC: offset from stack top - fInstructions.push_back({BuilderOp::swizzle_copy_stack_to_slots, {dst.index}, - (int)components.size(), - pack_nybbles(components), - offsetFromStackTop}); + this->appendInstruction(BuilderOp::swizzle_copy_stack_to_slots, {dst.index}, + (int)components.size(), + pack_nybbles(components), + offsetFromStackTop); } void Builder::swizzle_copy_stack_to_slots_indirect(SlotRange fixedRange, @@ -1051,12 +1109,12 @@ void Builder::swizzle_copy_stack_to_slots_indirect(SlotRange fixedRange, // immB: swizzle components // immC: offset from stack top // immD: dynamic stack ID - fInstructions.push_back({BuilderOp::swizzle_copy_stack_to_slots_indirect, - {fixedRange.index, limitRange.index + limitRange.count}, - (int)components.size(), - pack_nybbles(components), - offsetFromStackTop, - dynamicStackID}); + this->appendInstruction(BuilderOp::swizzle_copy_stack_to_slots_indirect, + {fixedRange.index, limitRange.index + limitRange.count}, + (int)components.size(), + pack_nybbles(components), + offsetFromStackTop, + dynamicStackID); } void Builder::swizzle(int consumedSlots, SkSpan components) { @@ -1101,17 +1159,17 @@ void Builder::swizzle(int consumedSlots, SkSpan components) { if (consumedSlots <= 4 && numElements <= 4) { // We can fit everything into a little swizzle. int op = (int)BuilderOp::swizzle_1 + numElements - 1; - fInstructions.push_back({(BuilderOp)op, {}, consumedSlots, - pack_nybbles(SkSpan(elements, numElements))}); + this->appendInstruction((BuilderOp)op, {}, consumedSlots, + pack_nybbles(SkSpan(elements, numElements))); return; } // This is a big swizzle. We use the `shuffle` op to handle these. immA counts the consumed // slots. immB counts the generated slots. immC and immD hold packed-nybble shuffle values. - fInstructions.push_back({BuilderOp::shuffle, {}, - consumedSlots, numElements, - pack_nybbles(SkSpan(&elements[0], 8)), - pack_nybbles(SkSpan(&elements[8], 8))}); + this->appendInstruction(BuilderOp::shuffle, {}, + consumedSlots, numElements, + pack_nybbles(SkSpan(&elements[0], 8)), + pack_nybbles(SkSpan(&elements[8], 8))); } void Builder::transpose(int columns, int rows) { @@ -1183,17 +1241,18 @@ void Builder::matrix_multiply(int leftColumns, int leftRows, int rightColumns, i default: SkDEBUGFAIL("unsupported matrix dimensions"); return; } - fInstructions.push_back({op, {}, leftColumns, leftRows, rightColumns, rightRows}); + this->appendInstruction(op, {}, leftColumns, leftRows, rightColumns, rightRows); } std::unique_ptr Builder::finish(int numValueSlots, int numUniformSlots, + int numImmutableSlots, DebugTracePriv* debugTrace) { // Verify that calls to enableExecutionMaskWrites and disableExecutionMaskWrites are balanced. SkASSERT(fExecutionMaskWritesEnabled == 0); return std::make_unique(std::move(fInstructions), numValueSlots, numUniformSlots, - fNumLabels, debugTrace); + numImmutableSlots, fNumLabels, debugTrace); } void Program::optimize() { @@ -1212,6 +1271,8 @@ static int stack_usage(const Instruction& inst) { case BuilderOp::push_device_xy01: return 4; + case BuilderOp::push_immutable: + case BuilderOp::push_immutable_indirect: case BuilderOp::push_constant: case BuilderOp::push_slots: case BuilderOp::push_slots_indirect: @@ -1285,9 +1346,7 @@ Program::StackDepths Program::tempStackMaxDepths() const { // Count the number of separate temp stacks that the program uses. int numStacks = 1; for (const Instruction& inst : fInstructions) { - if (inst.fOp == BuilderOp::set_current_stack) { - numStacks = std::max(numStacks, inst.fImmA + 1); - } + numStacks = std::max(numStacks, inst.fStackID + 1); } // Walk the program and calculate how deep each stack can potentially get. @@ -1295,23 +1354,18 @@ Program::StackDepths Program::tempStackMaxDepths() const { largest.push_back_n(numStacks, 0); current.push_back_n(numStacks, 0); - int curIdx = 0; for (const Instruction& inst : fInstructions) { - if (inst.fOp == BuilderOp::set_current_stack) { - curIdx = inst.fImmA; - SkASSERTF(curIdx >= 0 && curIdx < numStacks, - "instruction references nonexistent stack %d", curIdx); - } - current[curIdx] += stack_usage(inst); - largest[curIdx] = std::max(current[curIdx], largest[curIdx]); + int stackID = inst.fStackID; + current[stackID] += stack_usage(inst); + largest[stackID] = std::max(current[stackID], largest[stackID]); // If we assert here, the generated program has popped off the top of the stack. - SkASSERTF(current[curIdx] >= 0, "unbalanced temp stack push/pop on stack %d", curIdx); + SkASSERTF(current[stackID] >= 0, "unbalanced temp stack push/pop on stack %d", stackID); } // Ensure that when the program is complete, our stacks are fully balanced. - for (int stackIdx = 0; stackIdx < numStacks; ++stackIdx) { + for (int stackID = 0; stackID < numStacks; ++stackID) { // If we assert here, the generated program has pushed more data than it has popped. - SkASSERTF(current[stackIdx] == 0, "unbalanced temp stack push/pop on stack %d", stackIdx); + SkASSERTF(current[stackID] == 0, "unbalanced temp stack push/pop on stack %d", stackID); } return largest; @@ -1320,11 +1374,13 @@ Program::StackDepths Program::tempStackMaxDepths() const { Program::Program(TArray instrs, int numValueSlots, int numUniformSlots, + int numImmutableSlots, int numLabels, DebugTracePriv* debugTrace) : fInstructions(std::move(instrs)) , fNumValueSlots(numValueSlots) , fNumUniformSlots(numUniformSlots) + , fNumImmutableSlots(numImmutableSlots) , fNumLabels(numLabels) , fDebugTrace(debugTrace) { this->optimize(); @@ -1346,14 +1402,17 @@ Program::~Program() = default; void Program::appendCopy(TArray* pipeline, SkArenaAlloc* alloc, ProgramOp baseStage, - SkRPOffset dst, - SkRPOffset src, + SkRPOffset dst, int dstStride, + SkRPOffset src, int srcStride, int numSlots) const { SkASSERT(numSlots >= 0); while (numSlots > 4) { - this->appendCopy(pipeline, alloc, baseStage, dst, src, /*numSlots=*/4); - dst += 4 * SkOpts::raster_pipeline_highp_stride * sizeof(float); - src += 4 * SkOpts::raster_pipeline_highp_stride * sizeof(float); + this->appendCopy(pipeline, alloc, baseStage, + dst, dstStride, + src, srcStride, + /*numSlots=*/4); + dst += 4 * dstStride * sizeof(float); + src += 4 * srcStride * sizeof(float); numSlots -= 4; } @@ -1374,7 +1433,21 @@ void Program::appendCopySlotsUnmasked(TArray* pipeline, int numSlots) const { this->appendCopy(pipeline, alloc, ProgramOp::copy_slot_unmasked, - dst, src, numSlots); + dst, SkOpts::raster_pipeline_highp_stride, + src, SkOpts::raster_pipeline_highp_stride, + numSlots); +} + +void Program::appendCopyImmutableUnmasked(TArray* pipeline, + SkArenaAlloc* alloc, + SkRPOffset dst, + SkRPOffset src, + int numSlots) const { + this->appendCopy(pipeline, alloc, + ProgramOp::copy_immutable_unmasked, + dst, SkOpts::raster_pipeline_highp_stride, + src, 1, + numSlots); } void Program::appendCopySlotsMasked(TArray* pipeline, @@ -1384,7 +1457,9 @@ void Program::appendCopySlotsMasked(TArray* pipeline, int numSlots) const { this->appendCopy(pipeline, alloc, ProgramOp::copy_slot_masked, - dst, src, numSlots); + dst, SkOpts::raster_pipeline_highp_stride, + src, SkOpts::raster_pipeline_highp_stride, + numSlots); } void Program::appendSingleSlotUnaryOp(TArray* pipeline, ProgramOp stage, @@ -1509,17 +1584,20 @@ static void* context_bit_pun(intptr_t val) { } Program::SlotData Program::allocateSlotData(SkArenaAlloc* alloc) const { - // Allocate a contiguous slab of slot data for values and stack entries. + // Allocate a contiguous slab of slot data for immutables, values, and stack entries. const int N = SkOpts::raster_pipeline_highp_stride; + const int scalarWidth = 1 * sizeof(float); const int vectorWidth = N * sizeof(float); - const int allocSize = vectorWidth * (fNumValueSlots + fNumTempStackSlots); + const int allocSize = vectorWidth * (fNumValueSlots + fNumTempStackSlots) + + scalarWidth * fNumImmutableSlots; float* slotPtr = static_cast(alloc->makeBytesAlignedTo(allocSize, vectorWidth)); sk_bzero(slotPtr, allocSize); - // Store the temp stack immediately after the values. + // Store the temp stack immediately after the values, and immutable data after the stack. SlotData s; - s.values = SkSpan{slotPtr, N * fNumValueSlots}; - s.stack = SkSpan{s.values.end(), N * fNumTempStackSlots}; + s.values = SkSpan{slotPtr, N * fNumValueSlots}; + s.stack = SkSpan{s.values.end(), N * fNumTempStackSlots}; + s.immutable = SkSpan{s.stack.end(), 1 * fNumImmutableSlots}; return s; } @@ -1651,7 +1729,6 @@ void Program::makeStages(TArray* pipeline, SkASSERT(fNumUniformSlots == SkToInt(uniforms.size())); const int N = SkOpts::raster_pipeline_highp_stride; - int currentStack = 0; int mostRecentRewind = 0; // Assemble a map holding the current stack-top for each temporary stack. Position each temp @@ -1685,9 +1762,11 @@ void Program::makeStages(TArray* pipeline, // Write each BuilderOp to the pipeline array. pipeline->reserve_exact(pipeline->size() + fInstructions.size()); for (const Instruction& inst : fInstructions) { - auto SlotA = [&]() { return &slots.values[N * inst.fSlotA]; }; - auto SlotB = [&]() { return &slots.values[N * inst.fSlotB]; }; - auto UniformA = [&]() { return &uniforms[inst.fSlotA]; }; + auto ImmutableA = [&]() { return &slots.immutable[1 * inst.fSlotA]; }; + auto ImmutableB = [&]() { return &slots.immutable[1 * inst.fSlotB]; }; + auto SlotA = [&]() { return &slots.values[N * inst.fSlotA]; }; + auto SlotB = [&]() { return &slots.values[N * inst.fSlotB]; }; + auto UniformA = [&]() { return &uniforms[inst.fSlotA]; }; auto AllocTraceContext = [&](auto* ctx) { // We pass `ctx` solely for its type; the value is unused. using ContextType = typename std::remove_reference::type; @@ -1696,7 +1775,7 @@ void Program::makeStages(TArray* pipeline, ctx->traceHook = fTraceHook.get(); return ctx; }; - float*& tempStackPtr = tempStackMap[currentStack]; + float*& tempStackPtr = tempStackMap[inst.fStackID]; switch (inst.fOp) { case BuilderOp::label: @@ -1749,10 +1828,8 @@ void Program::makeStages(TArray* pipeline, break; case BuilderOp::store_immutable_value: { - float* dst = SlotA(); - for (int index = 0; index < N; ++index) { - dst[index] = sk_bit_cast(inst.fImmA); - } + float* dst = ImmutableA(); + *dst = sk_bit_cast(inst.fImmA); break; } case BuilderOp::load_src: @@ -1845,6 +1922,14 @@ void Program::makeStages(TArray* pipeline, inst.fImmA); break; + case BuilderOp::copy_immutable_unmasked: + this->appendCopyImmutableUnmasked(pipeline, + alloc, + OffsetFromBase(SlotA()), + OffsetFromBase(ImmutableB()), + inst.fImmA); + break; + case BuilderOp::refract_4_floats: { float* dst = tempStackPtr - (9 * N); pipeline->push_back({ProgramOp::refract_4_floats, dst}); @@ -1942,7 +2027,16 @@ void Program::makeStages(TArray* pipeline, inst.fImmA); break; } + case BuilderOp::push_immutable: { + float* dst = tempStackPtr; + this->appendCopyImmutableUnmasked(pipeline, alloc, + OffsetFromBase(dst), + OffsetFromBase(ImmutableA()), + inst.fImmA); + break; + } case BuilderOp::copy_stack_to_slots_indirect: + case BuilderOp::push_immutable_indirect: case BuilderOp::push_slots_indirect: case BuilderOp::push_uniform_indirect: { // SlotA: fixed-range start @@ -1959,6 +2053,11 @@ void Program::makeStages(TArray* pipeline, op = ProgramOp::copy_from_indirect_unmasked; ctx->src = SlotA(); ctx->dst = tempStackPtr; + } else if (inst.fOp == BuilderOp::push_immutable_indirect) { + // We reuse the indirect-uniform op for indirect copies of immutable data. + op = ProgramOp::copy_from_indirect_uniform_unmasked; + ctx->src = ImmutableA(); + ctx->dst = tempStackPtr; } else if (inst.fOp == BuilderOp::push_uniform_indirect) { op = ProgramOp::copy_from_indirect_uniform_unmasked; ctx->src = UniformA(); @@ -2170,10 +2269,6 @@ void Program::makeStages(TArray* pipeline, case BuilderOp::discard_stack: break; - case BuilderOp::set_current_stack: - currentStack = inst.fImmA; - break; - case BuilderOp::invoke_shader: case BuilderOp::invoke_color_filter: case BuilderOp::invoke_blender: @@ -2254,7 +2349,7 @@ class Program::Dumper { public: Dumper(const Program& p) : fProgram(p) {} - void dump(SkWStream* out); + void dump(SkWStream* out, bool writeInstructionCount); // Finds the labels in the program, and keeps track of their offsets. void buildLabelToStageMap() { @@ -2430,15 +2525,26 @@ class Program::Dumper { return {}; } + // Attempts to interpret the passed-in pointer as a immutable slot range. + std::string immutablePtrCtx(const float* ptr, int numSlots) const { + const float* end = ptr + numSlots; + if (ptr >= fSlots.immutable.begin() && end <= fSlots.immutable.end()) { + int index = ptr - fSlots.immutable.begin(); + return 'i' + this->asRange(index, numSlots) + ' ' + + this->multiImmCtx(ptr, numSlots); + } + return {}; + } + // Interprets the context value as a pointer to `count` immediate values. std::string multiImmCtx(const float* ptr, int count) const { // If this is a uniform, print it by name. if (std::string text = this->uniformPtrCtx(ptr, count); !text.empty()) { return text; } - // Emit a single unbracketed immediate. + // Emit a single bracketed immediate. if (count == 1) { - return this->imm(*ptr); + return '[' + this->imm(*ptr) + ']'; } // Emit a list like `[0x00000000 (0.0), 0x3F80000 (1.0)]`. std::string text = "["; @@ -2453,13 +2559,16 @@ class Program::Dumper { // Interprets the context value as a generic pointer. std::string ptrCtx(const void* ctx, int numSlots) const { const float *ctxAsSlot = static_cast(ctx); - // Check for uniform and value pointers. + // Check for uniform, value, and immutable pointers. if (std::string uniform = this->uniformPtrCtx(ctxAsSlot, numSlots); !uniform.empty()) { return uniform; } if (std::string value = this->valuePtrCtx(ctxAsSlot, numSlots); !value.empty()) { return value; } + if (std::string value = this->immutablePtrCtx(ctxAsSlot, numSlots); !value.empty()) { + return value; + } // Handle pointers to temporary stack slots. if (ctxAsSlot >= fSlots.stack.begin() && ctxAsSlot < fSlots.stack.end()) { int stackIdx = ctxAsSlot - fSlots.stack.begin(); @@ -2653,7 +2762,9 @@ class Program::Dumper { SkSpan fUniforms; }; -void Program::Dumper::dump(SkWStream* out) { +void Program::Dumper::dump(SkWStream* out, bool writeInstructionCount) { + using POp = ProgramOp; + // Allocate memory for the slot and uniform data, even though the program won't ever be // executed. The program requires pointer ranges for managing its data, and ASAN will report // errors if those pointers are pointing at unallocated memory. @@ -2669,13 +2780,47 @@ void Program::Dumper::dump(SkWStream* out) { this->buildLabelToStageMap(); this->buildUniqueSlotNameList(); + // Emit the program's instruction count. + if (writeInstructionCount) { + int invocationCount = 0, instructionCount = 0; + for (const Stage& stage : fStages) { + switch (stage.op) { + case POp::label: + // consumes zero instructions + break; + + case POp::invoke_shader: + case POp::invoke_color_filter: + case POp::invoke_blender: + case POp::invoke_to_linear_srgb: + case POp::invoke_from_linear_srgb: + ++invocationCount; + break; + + default: + ++instructionCount; + break; + } + } + + out->writeText(std::to_string(instructionCount).c_str()); + out->writeText(" instructions"); + if (invocationCount > 0) { + out->writeText(", "); + out->writeText(std::to_string(invocationCount).c_str()); + out->writeText(" invocations"); + } + out->writeText("\n\n"); + } + // Emit all of the program's immutable data. const char* header = "[immutable slots]\n"; const char* footer = ""; for (const Instruction& inst : fProgram.fInstructions) { if (inst.fOp == BuilderOp::store_immutable_value) { out->writeText(header); - out->writeText(this->slotName({inst.fSlotA, 1}).c_str()); + out->writeText("i"); + out->writeText(std::to_string(inst.fSlotA).c_str()); out->writeText(" = "); out->writeText(this->imm(sk_bit_cast(inst.fImmA)).c_str()); out->writeText("\n"); @@ -2691,7 +2836,6 @@ void Program::Dumper::dump(SkWStream* out) { const Stage& stage = fStages[index]; std::string opArg1, opArg2, opArg3, opSwizzle; - using POp = ProgramOp; switch (stage.op) { case POp::label: case POp::invoke_shader: @@ -2883,24 +3027,29 @@ void Program::Dumper::dump(SkWStream* out) { case POp::copy_slot_masked: case POp::copy_slot_unmasked: + case POp::copy_immutable_unmasked: std::tie(opArg1, opArg2) = this->binaryOpCtx(stage.ctx, 1); break; case POp::copy_2_slots_masked: case POp::copy_2_slots_unmasked: + case POp::copy_2_immutables_unmasked: std::tie(opArg1, opArg2) = this->binaryOpCtx(stage.ctx, 2); break; case POp::copy_3_slots_masked: case POp::copy_3_slots_unmasked: + case POp::copy_3_immutables_unmasked: std::tie(opArg1, opArg2) = this->binaryOpCtx(stage.ctx, 3); break; case POp::copy_4_slots_masked: case POp::copy_4_slots_unmasked: + case POp::copy_4_immutables_unmasked: std::tie(opArg1, opArg2) = this->binaryOpCtx(stage.ctx, 4); break; + case POp::copy_from_indirect_uniform_unmasked: case POp::copy_from_indirect_unmasked: case POp::copy_to_indirect_masked: { const auto* ctx = static_cast(stage.ctx); @@ -2910,13 +3059,6 @@ void Program::Dumper::dump(SkWStream* out) { opArg3 = this->ptrCtx(ctx->indirectOffset, 1); break; } - case POp::copy_from_indirect_uniform_unmasked: { - const auto* ctx = static_cast(stage.ctx); - opArg1 = this->ptrCtx(ctx->dst, ctx->slots); - opArg2 = this->uniformPtrCtx(ctx->src, ctx->slots); - opArg3 = this->ptrCtx(ctx->indirectOffset, 1); - break; - } case POp::swizzle_copy_to_indirect_masked: { const auto* ctx = static_cast(stage.ctx); opArg1 = this->ptrCtx(ctx->dst, this->swizzleWidth(SkSpan(ctx->offsets, @@ -3265,6 +3407,8 @@ void Program::Dumper::dump(SkWStream* out) { case POp::copy_3_uniforms: case POp::copy_4_uniforms: case POp::copy_slot_unmasked: case POp::copy_2_slots_unmasked: case POp::copy_3_slots_unmasked: case POp::copy_4_slots_unmasked: + case POp::copy_immutable_unmasked: case POp::copy_2_immutables_unmasked: + case POp::copy_3_immutables_unmasked: case POp::copy_4_immutables_unmasked: case POp::copy_constant: case POp::splat_2_constants: case POp::splat_3_constants: case POp::splat_4_constants: case POp::swizzle_1: case POp::swizzle_2: @@ -3549,10 +3693,8 @@ void Program::Dumper::dump(SkWStream* out) { } } -void Program::dump(SkWStream* out) const { - Dumper(*this).dump(out); +void Program::dump(SkWStream* out, bool writeInstructionCount) const { + Dumper(*this).dump(out, writeInstructionCount); } } // namespace SkSL::RP - -#endif // SK_ENABLE_SKSL_IN_RASTER_PIPELINE diff --git a/src/sksl/codegen/SkSLRasterPipelineBuilder.h b/src/sksl/codegen/SkSLRasterPipelineBuilder.h index 6ede32c28816..4412c4e6e2de 100644 --- a/src/sksl/codegen/SkSLRasterPipelineBuilder.h +++ b/src/sksl/codegen/SkSLRasterPipelineBuilder.h @@ -10,8 +10,6 @@ #include "include/core/SkTypes.h" -#ifdef SK_ENABLE_SKSL_IN_RASTER_PIPELINE - #include "include/core/SkSpan.h" #include "include/core/SkTypes.h" #include "include/private/base/SkTArray.h" @@ -20,7 +18,6 @@ #include #include -#include #include class SkArenaAlloc; @@ -88,14 +85,16 @@ enum class BuilderOp { // ... and also has Builder-specific ops. These ops generally interface with the stack, and are // converted into ProgramOps during `makeStages`. + push_clone, + push_clone_from_stack, + push_clone_indirect_from_stack, push_constant, + push_immutable, + push_immutable_indirect, push_slots, push_slots_indirect, push_uniform, push_uniform_indirect, - push_clone, - push_clone_from_stack, - push_clone_indirect_from_stack, copy_stack_to_slots, copy_stack_to_slots_unmasked, copy_stack_to_slots_indirect, @@ -118,7 +117,6 @@ enum class BuilderOp { push_device_xy01, pop_src_rgba, pop_dst_rgba, - set_current_stack, trace_var_indirect, branch_if_no_active_lanes_on_stack_top_equal, unsupported @@ -129,15 +127,6 @@ static_assert((int)ProgramOp::label == (int)BuilderOp::label); // Represents a single raster-pipeline SkSL instruction. struct Instruction { - Instruction(BuilderOp op, std::initializer_list slots, - int a = 0, int b = 0, int c = 0, int d = 0) - : fOp(op), fImmA(a), fImmB(b), fImmC(c), fImmD(d) { - auto iter = slots.begin(); - if (iter != slots.end()) { fSlotA = *iter++; } - if (iter != slots.end()) { fSlotB = *iter++; } - SkASSERT(iter == slots.end()); - } - BuilderOp fOp; Slot fSlotA = NA; Slot fSlotB = NA; @@ -145,6 +134,7 @@ struct Instruction { int fImmB = 0; int fImmC = 0; int fImmD = 0; + int fStackID = 0; }; class Callbacks { @@ -164,6 +154,7 @@ class Program { Program(skia_private::TArray instrs, int numValueSlots, int numUniformSlots, + int numImmutableSlots, int numLabels, DebugTracePriv* debugTrace); ~Program(); @@ -173,7 +164,7 @@ class Program { Callbacks* callbacks, SkSpan uniforms) const; - void dump(SkWStream* out) const; + void dump(SkWStream* out, bool writeInstructionCount = false) const; int numUniforms() const { return fNumUniformSlots; } @@ -183,6 +174,7 @@ class Program { struct SlotData { SkSpan values; SkSpan stack; + SkSpan immutable; }; SlotData allocateSlotData(SkArenaAlloc* alloc) const; @@ -201,9 +193,14 @@ class Program { void appendCopy(skia_private::TArray* pipeline, SkArenaAlloc* alloc, ProgramOp baseStage, - SkRPOffset dst, - SkRPOffset src, + SkRPOffset dst, int dstStride, + SkRPOffset src, int srcStride, int numSlots) const; + void appendCopyImmutableUnmasked(skia_private::TArray* pipeline, + SkArenaAlloc* alloc, + SkRPOffset dst, + SkRPOffset src, + int numSlots) const; void appendCopySlotsUnmasked(skia_private::TArray* pipeline, SkArenaAlloc* alloc, SkRPOffset dst, @@ -284,6 +281,7 @@ class Program { skia_private::TArray fInstructions; int fNumValueSlots = 0; int fNumUniformSlots = 0; + int fNumImmutableSlots = 0; int fNumTempStackSlots = 0; int fNumLabels = 0; StackDepths fTempStackMaxDepths; @@ -296,6 +294,7 @@ class Builder { /** Finalizes and optimizes the program. */ std::unique_ptr finish(int numValueSlots, int numUniformSlots, + int numImmutableSlots, DebugTracePriv* debugTrace = nullptr); /** * Peels off a label ID for use in the program. Set the label's position in the program with @@ -326,41 +325,41 @@ class Builder { /** Assemble a program from the Raster Pipeline instructions below. */ void init_lane_masks() { - fInstructions.push_back({BuilderOp::init_lane_masks, {}}); + this->appendInstruction(BuilderOp::init_lane_masks, {}); } void store_src_rg(SlotRange slots) { SkASSERT(slots.count == 2); - fInstructions.push_back({BuilderOp::store_src_rg, {slots.index}}); + this->appendInstruction(BuilderOp::store_src_rg, {slots.index}); } void store_src(SlotRange slots) { SkASSERT(slots.count == 4); - fInstructions.push_back({BuilderOp::store_src, {slots.index}}); + this->appendInstruction(BuilderOp::store_src, {slots.index}); } void store_dst(SlotRange slots) { SkASSERT(slots.count == 4); - fInstructions.push_back({BuilderOp::store_dst, {slots.index}}); + this->appendInstruction(BuilderOp::store_dst, {slots.index}); } void store_device_xy01(SlotRange slots) { SkASSERT(slots.count == 4); - fInstructions.push_back({BuilderOp::store_device_xy01, {slots.index}}); + this->appendInstruction(BuilderOp::store_device_xy01, {slots.index}); } void load_src(SlotRange slots) { SkASSERT(slots.count == 4); - fInstructions.push_back({BuilderOp::load_src, {slots.index}}); + this->appendInstruction(BuilderOp::load_src, {slots.index}); } void load_dst(SlotRange slots) { SkASSERT(slots.count == 4); - fInstructions.push_back({BuilderOp::load_dst, {slots.index}}); + this->appendInstruction(BuilderOp::load_dst, {slots.index}); } - void set_current_stack(int stackIdx) { - fInstructions.push_back({BuilderOp::set_current_stack, {}, stackIdx}); + void set_current_stack(int stackID) { + fCurrentStackID = stackID; } // Inserts a label into the instruction stream. @@ -402,17 +401,7 @@ class Builder { // Initializes the Raster Pipeline slot with a constant value when the program is first created. // Does not add any instructions to the program. void store_immutable_value_i(Slot slot, int32_t val) { - fInstructions.push_back({BuilderOp::store_immutable_value, {slot}, val}); - } - - void store_immutable_value_f(Slot slot, float val) { - fInstructions.push_back({BuilderOp::store_immutable_value, - {slot}, sk_bit_cast(val)}); - } - - void store_immutable_value_u(Slot slot, uint32_t val) { - fInstructions.push_back({BuilderOp::store_immutable_value, - {slot}, sk_bit_cast(val)}); + this->appendInstruction(BuilderOp::store_immutable_value, {slot}, val); } // Translates into copy_uniforms (from uniforms into value-slots) in Raster Pipeline. @@ -424,14 +413,35 @@ class Builder { // `limitRange`; this is used as a hard cap, to avoid indexing outside of bounds. void push_uniform_indirect(SlotRange fixedRange, int dynamicStack, SlotRange limitRange); + // Translates into copy_slots_unmasked (from values into temp stack) in Raster Pipeline. - void push_slots(SlotRange src); + void push_slots(SlotRange src) { + this->push_slots_or_immutable(src, BuilderOp::push_slots); + } + + // Translates into copy_immutable_unmasked (from immutables into temp stack) in Raster Pipeline. + void push_immutable(SlotRange src) { + this->push_slots_or_immutable(src, BuilderOp::push_immutable); + } + + void push_slots_or_immutable(SlotRange src, BuilderOp op); // Translates into copy_from_indirect_unmasked (from values into temp stack) in Raster Pipeline. // `fixedRange` denotes a fixed set of slots; this range is pushed forward by the value at the // top of stack `dynamicStack`. Pass the slot range of the variable being indexed as // `limitRange`; this is used as a hard cap, to avoid indexing outside of bounds. - void push_slots_indirect(SlotRange fixedRange, int dynamicStack, SlotRange limitRange); + void push_slots_indirect(SlotRange fixedRange, int dynamicStack, SlotRange limitRange) { + this->push_slots_or_immutable_indirect(fixedRange, dynamicStack, limitRange, + BuilderOp::push_slots_indirect); + } + + void push_immutable_indirect(SlotRange fixedRange, int dynamicStack, SlotRange limitRange) { + this->push_slots_or_immutable_indirect(fixedRange, dynamicStack, limitRange, + BuilderOp::push_immutable_indirect); + } + + void push_slots_or_immutable_indirect(SlotRange fixedRange, int dynamicStack, + SlotRange limitRange, BuilderOp op); // Translates into copy_slots_masked (from temp stack to values) in Raster Pipeline. // Does not discard any values on the temp stack. @@ -501,7 +511,11 @@ class Builder { void inverse_matrix(int32_t n); // Shrinks the temp stack, discarding values on top. - void discard_stack(int32_t count); + void discard_stack(int32_t count, int stackID); + + void discard_stack(int32_t count) { + this->discard_stack(count, fCurrentStackID); + } // Grows the temp stack, leaving any preexisting values in place. void pad_stack(int32_t count); @@ -529,19 +543,19 @@ class Builder { // Compares the stack top with the passed-in value; if it matches, enables the loop mask. void case_op(int value) { - fInstructions.push_back({BuilderOp::case_op, {}, value}); + this->appendInstruction(BuilderOp::case_op, {}, value); } // Performs a `continue` in a loop. void continue_op(int continueMaskStackID) { - fInstructions.push_back({BuilderOp::continue_op, {}, continueMaskStackID}); + this->appendInstruction(BuilderOp::continue_op, {}, continueMaskStackID); } void select(int slots) { // Overlays the top two entries on the stack, making one hybrid entry. The execution mask // is used to select which lanes are preserved. SkASSERT(slots > 0); - fInstructions.push_back({BuilderOp::select, {}, slots}); + this->appendInstruction(BuilderOp::select, {}, slots); } // The opposite of push_slots; copies values from the temp stack into value slots, then @@ -550,11 +564,13 @@ class Builder { void copy_slots_masked(SlotRange dst, SlotRange src) { SkASSERT(dst.count == src.count); - fInstructions.push_back({BuilderOp::copy_slot_masked, {dst.index, src.index}, dst.count}); + this->appendInstruction(BuilderOp::copy_slot_masked, {dst.index, src.index}, dst.count); } void copy_slots_unmasked(SlotRange dst, SlotRange src); + void copy_immutable_unmasked(SlotRange dst, SlotRange src); + // Directly writes a constant value into a slot. void copy_constant(Slot slot, int constantValue); @@ -579,105 +595,102 @@ class Builder { void push_condition_mask() { SkASSERT(this->executionMaskWritesAreEnabled()); - fInstructions.push_back({BuilderOp::push_condition_mask, {}}); + this->appendInstruction(BuilderOp::push_condition_mask, {}); } void pop_condition_mask() { SkASSERT(this->executionMaskWritesAreEnabled()); - fInstructions.push_back({BuilderOp::pop_condition_mask, {}}); + this->appendInstruction(BuilderOp::pop_condition_mask, {}); } - void merge_condition_mask() { - SkASSERT(this->executionMaskWritesAreEnabled()); - fInstructions.push_back({BuilderOp::merge_condition_mask, {}}); - } + void merge_condition_mask(); void merge_inv_condition_mask() { SkASSERT(this->executionMaskWritesAreEnabled()); - fInstructions.push_back({BuilderOp::merge_inv_condition_mask, {}}); + this->appendInstruction(BuilderOp::merge_inv_condition_mask, {}); } void push_loop_mask() { SkASSERT(this->executionMaskWritesAreEnabled()); - fInstructions.push_back({BuilderOp::push_loop_mask, {}}); + this->appendInstruction(BuilderOp::push_loop_mask, {}); } void pop_loop_mask() { SkASSERT(this->executionMaskWritesAreEnabled()); - fInstructions.push_back({BuilderOp::pop_loop_mask, {}}); + this->appendInstruction(BuilderOp::pop_loop_mask, {}); } // Exchanges src.rgba with the four values at the top of the stack. void exchange_src(); void push_src_rgba() { - fInstructions.push_back({BuilderOp::push_src_rgba, {}}); + this->appendInstruction(BuilderOp::push_src_rgba, {}); } void push_dst_rgba() { - fInstructions.push_back({BuilderOp::push_dst_rgba, {}}); + this->appendInstruction(BuilderOp::push_dst_rgba, {}); } void push_device_xy01() { - fInstructions.push_back({BuilderOp::push_device_xy01, {}}); + this->appendInstruction(BuilderOp::push_device_xy01, {}); } void pop_src_rgba(); void pop_dst_rgba() { - fInstructions.push_back({BuilderOp::pop_dst_rgba, {}}); + this->appendInstruction(BuilderOp::pop_dst_rgba, {}); } void mask_off_loop_mask() { SkASSERT(this->executionMaskWritesAreEnabled()); - fInstructions.push_back({BuilderOp::mask_off_loop_mask, {}}); + this->appendInstruction(BuilderOp::mask_off_loop_mask, {}); } void reenable_loop_mask(SlotRange src) { SkASSERT(this->executionMaskWritesAreEnabled()); SkASSERT(src.count == 1); - fInstructions.push_back({BuilderOp::reenable_loop_mask, {src.index}}); + this->appendInstruction(BuilderOp::reenable_loop_mask, {src.index}); } void pop_and_reenable_loop_mask() { SkASSERT(this->executionMaskWritesAreEnabled()); - fInstructions.push_back({BuilderOp::pop_and_reenable_loop_mask, {}}); + this->appendInstruction(BuilderOp::pop_and_reenable_loop_mask, {}); } void merge_loop_mask() { SkASSERT(this->executionMaskWritesAreEnabled()); - fInstructions.push_back({BuilderOp::merge_loop_mask, {}}); + this->appendInstruction(BuilderOp::merge_loop_mask, {}); } void push_return_mask() { SkASSERT(this->executionMaskWritesAreEnabled()); - fInstructions.push_back({BuilderOp::push_return_mask, {}}); + this->appendInstruction(BuilderOp::push_return_mask, {}); } void pop_return_mask(); void mask_off_return_mask() { SkASSERT(this->executionMaskWritesAreEnabled()); - fInstructions.push_back({BuilderOp::mask_off_return_mask, {}}); + this->appendInstruction(BuilderOp::mask_off_return_mask, {}); } void invoke_shader(int childIdx) { - fInstructions.push_back({BuilderOp::invoke_shader, {}, childIdx}); + this->appendInstruction(BuilderOp::invoke_shader, {}, childIdx); } void invoke_color_filter(int childIdx) { - fInstructions.push_back({BuilderOp::invoke_color_filter, {}, childIdx}); + this->appendInstruction(BuilderOp::invoke_color_filter, {}, childIdx); } void invoke_blender(int childIdx) { - fInstructions.push_back({BuilderOp::invoke_blender, {}, childIdx}); + this->appendInstruction(BuilderOp::invoke_blender, {}, childIdx); } void invoke_to_linear_srgb() { // The intrinsics accept a three-component value; add a fourth padding element (which // will be ignored) since our RP ops deal in RGBA colors. this->pad_stack(1); - fInstructions.push_back({BuilderOp::invoke_to_linear_srgb, {}}); + this->appendInstruction(BuilderOp::invoke_to_linear_srgb, {}); this->discard_stack(1); } @@ -685,18 +698,18 @@ class Builder { // The intrinsics accept a three-component value; add a fourth padding element (which // will be ignored) since our RP ops deal in RGBA colors. this->pad_stack(1); - fInstructions.push_back({BuilderOp::invoke_from_linear_srgb, {}}); + this->appendInstruction(BuilderOp::invoke_from_linear_srgb, {}); this->discard_stack(1); } // Writes the current line number to the debug trace. void trace_line(int traceMaskStackID, int line) { - fInstructions.push_back({BuilderOp::trace_line, {}, traceMaskStackID, line}); + this->appendInstruction(BuilderOp::trace_line, {}, traceMaskStackID, line); } // Writes a variable update to the debug trace. void trace_var(int traceMaskStackID, SlotRange r) { - fInstructions.push_back({BuilderOp::trace_var, {r.index}, traceMaskStackID, r.count}); + this->appendInstruction(BuilderOp::trace_var, {r.index}, traceMaskStackID, r.count); } // Writes a variable update (via indirection) to the debug trace. @@ -705,38 +718,39 @@ class Builder { // Writes a function-entrance to the debug trace. void trace_enter(int traceMaskStackID, int funcID) { - fInstructions.push_back({BuilderOp::trace_enter, {}, traceMaskStackID, funcID}); + this->appendInstruction(BuilderOp::trace_enter, {}, traceMaskStackID, funcID); } // Writes a function-exit to the debug trace. void trace_exit(int traceMaskStackID, int funcID) { - fInstructions.push_back({BuilderOp::trace_exit, {}, traceMaskStackID, funcID}); + this->appendInstruction(BuilderOp::trace_exit, {}, traceMaskStackID, funcID); } // Writes a scope-level change to the debug trace. void trace_scope(int traceMaskStackID, int delta) { - fInstructions.push_back({BuilderOp::trace_scope, {}, traceMaskStackID, delta}); + this->appendInstruction(BuilderOp::trace_scope, {}, traceMaskStackID, delta); } private: + struct SlotList { + SlotList(Slot a = NA, Slot b = NA) : fSlotA(a), fSlotB(b) {} + Slot fSlotA = NA; + Slot fSlotB = NA; + }; + void appendInstruction(BuilderOp op, SlotList slots, + int a = 0, int b = 0, int c = 0, int d = 0); + Instruction* lastInstruction(int fromBack = 0); + Instruction* lastInstructionOnAnyStack(int fromBack = 0); void simplifyPopSlotsUnmasked(SlotRange* dst); bool simplifyImmediateUnmaskedOp(); skia_private::TArray fInstructions; int fNumLabels = 0; int fExecutionMaskWritesEnabled = 0; + int fCurrentStackID = 0; }; } // namespace RP } // namespace SkSL -#else // !defined(SK_ENABLE_SKSL_IN_RASTER_PIPELINE) - -namespace SkSL::RP { - -class Program {}; - -} // namespace SkSL::RP - -#endif // SK_ENABLE_SKSL_IN_RASTER_PIPELINE #endif // SKSL_RASTERPIPELINEBUILDER diff --git a/src/sksl/codegen/SkSLRasterPipelineCodeGenerator.cpp b/src/sksl/codegen/SkSLRasterPipelineCodeGenerator.cpp index 0c49c5d68c50..a047adc6c14e 100644 --- a/src/sksl/codegen/SkSLRasterPipelineCodeGenerator.cpp +++ b/src/sksl/codegen/SkSLRasterPipelineCodeGenerator.cpp @@ -7,13 +7,14 @@ #include "src/sksl/codegen/SkSLRasterPipelineCodeGenerator.h" -#ifdef SK_ENABLE_SKSL_IN_RASTER_PIPELINE - #include "include/core/SkPoint.h" #include "include/core/SkSpan.h" #include "include/private/SkSLDefines.h" #include "include/private/base/SkTArray.h" +#include "include/private/base/SkTo.h" +#include "src/base/SkEnumBitMask.h" #include "src/base/SkStringView.h" +#include "src/base/SkUtils.h" #include "src/core/SkTHash.h" #include "src/sksl/SkSLAnalysis.h" #include "src/sksl/SkSLBuiltinTypes.h" @@ -21,7 +22,6 @@ #include "src/sksl/SkSLConstantFolder.h" #include "src/sksl/SkSLContext.h" #include "src/sksl/SkSLIntrinsicList.h" -#include "src/sksl/SkSLModifiersPool.h" #include "src/sksl/SkSLOperator.h" #include "src/sksl/SkSLPosition.h" #include "src/sksl/analysis/SkSLProgramUsage.h" @@ -48,7 +48,7 @@ #include "src/sksl/ir/SkSLIndexExpression.h" #include "src/sksl/ir/SkSLLayout.h" #include "src/sksl/ir/SkSLLiteral.h" -#include "src/sksl/ir/SkSLModifiers.h" +#include "src/sksl/ir/SkSLModifierFlags.h" #include "src/sksl/ir/SkSLPostfixExpression.h" #include "src/sksl/ir/SkSLPrefixExpression.h" #include "src/sksl/ir/SkSLProgram.h" @@ -67,6 +67,7 @@ #include "src/sksl/transform/SkSLTransform.h" #include +#include #include #include #include @@ -112,6 +113,12 @@ class SlotManager { Position pos, bool isFunctionReturnValue); + /** + * Associates previously-created slots with an SkSL variable. (This would result in multiple + * variables sharing a slot range.) + */ + void mapVariableToSlots(const Variable& v, SlotRange range); + /** Looks up the slots associated with an SkSL variable; creates the slot if necessary. */ SlotRange getVariableSlots(const Variable& v); @@ -174,8 +181,8 @@ class Generator { , fDebugTrace(debugTrace) , fWriteTraceOps(writeTraceOps) , fProgramSlots(debugTrace ? &debugTrace->fSlotInfo : nullptr) - , fUniformSlots(debugTrace ? &debugTrace->fUniformInfo : nullptr) { - fContext.fModifiersPool = &fModifiersPool; + , fUniformSlots(debugTrace ? &debugTrace->fUniformInfo : nullptr) + , fImmutableSlots(nullptr) { fContext.fConfig = fProgram.fConfig.get(); fContext.fModule = fProgram.fContext->fModule; } @@ -206,15 +213,26 @@ class Generator { */ int getFunctionDebugInfo(const FunctionDeclaration& decl); - /** Looks up the slots associated with an SkSL variable; creates the slot if necessary. */ + /** Looks up the slots associated with an SkSL variable; creates the slots if necessary. */ SlotRange getVariableSlots(const Variable& v) { SkASSERT(!IsUniform(v)); + SkASSERT(!fImmutableVariables.contains(&v)); return fProgramSlots.getVariableSlots(v); } - /** Looks up the slots associated with an SkSL uniform; creates the slot if necessary. */ + /** + * Looks up the slots associated with an immutable variable; creates the slots if necessary. + */ + SlotRange getImmutableSlots(const Variable& v) { + SkASSERT(!IsUniform(v)); + SkASSERT(fImmutableVariables.contains(&v)); + return fImmutableSlots.getVariableSlots(v); + } + + /** Looks up the slots associated with an SkSL uniform; creates the slots if necessary. */ SlotRange getUniformSlots(const Variable& v) { SkASSERT(IsUniform(v)); + SkASSERT(!fImmutableVariables.contains(&v)); return fUniformSlots.getVariableSlots(v); } @@ -314,6 +332,18 @@ class Generator { const Expression& ifFalse); [[nodiscard]] bool pushVariableReference(const VariableReference& v); + /** Support methods for immutable data, which trade more slots for smaller code size. */ + using ImmutableBits = int32_t; + + [[nodiscard]] bool pushImmutableData(const Expression& e); + [[nodiscard]] std::optional findPreexistingImmutableData( + const TArray& immutableValues); + [[nodiscard]] std::optional getImmutableBitsForSlot(const Expression& expr, + size_t slot); + [[nodiscard]] bool getImmutableValueForExpression(const Expression& expr, + TArray* immutableValues); + void storeImmutableValueToSlots(const TArray& immutableValues, SlotRange slots); + /** Pops an expression from the value stack and copies it into slots. */ void popToSlotRange(SlotRange r) { fBuilder.pop_slots(r); @@ -420,23 +450,22 @@ class Generator { } static bool IsUniform(const Variable& var) { - return var.modifiers().fFlags & Modifiers::kUniform_Flag; + return var.modifierFlags().isUniform(); } static bool IsOutParameter(const Variable& var) { - return (var.modifiers().fFlags & (Modifiers::kIn_Flag | Modifiers::kOut_Flag)) == - Modifiers::kOut_Flag; + return (var.modifierFlags() & (ModifierFlag::kIn | ModifierFlag::kOut)) == + ModifierFlag::kOut; } static bool IsInoutParameter(const Variable& var) { - return (var.modifiers().fFlags & (Modifiers::kIn_Flag | Modifiers::kOut_Flag)) == - (Modifiers::kIn_Flag | Modifiers::kOut_Flag); + return (var.modifierFlags() & (ModifierFlag::kIn | ModifierFlag::kOut)) == + (ModifierFlag::kIn | ModifierFlag::kOut); } private: const SkSL::Program& fProgram; SkSL::Context fContext; - SkSL::ModifiersPool fModifiersPool; Builder fBuilder; DebugTracePriv* fDebugTrace = nullptr; bool fWriteTraceOps = false; @@ -444,6 +473,7 @@ class Generator { SlotManager fProgramSlots; SlotManager fUniformSlots; + SlotManager fImmutableSlots; std::optional fTraceMask; const FunctionDefinition* fCurrentFunction = nullptr; @@ -456,6 +486,9 @@ class Generator { THashMap fReturnComplexityMap; + THashMap> fImmutableSlotMap; + THashSet fImmutableVariables; + // `fInsideCompoundStatement` will be nonzero if we are currently writing statements inside of a // compound-statement Block. (Conceptually those statements should all count as one.) int fInsideCompoundStatement = 0; @@ -817,6 +850,50 @@ class VariableLValue final : public LValue { const Variable* fVariable; }; +class ImmutableLValue final : public LValue { +public: + explicit ImmutableLValue(const Variable* v) : fVariable(v) {} + + bool isWritable() const override { + return false; + } + + SlotRange fixedSlotRange(Generator* gen) override { + return gen->getImmutableSlots(*fVariable); + } + + AutoStack* dynamicSlotRange() override { + return nullptr; + } + + [[nodiscard]] bool push(Generator* gen, + SlotRange fixedOffset, + AutoStack* dynamicOffset, + SkSpan swizzle) override { + if (dynamicOffset) { + gen->builder()->push_immutable_indirect(fixedOffset, dynamicOffset->stackID(), + this->fixedSlotRange(gen)); + } else { + gen->builder()->push_immutable(fixedOffset); + } + if (!swizzle.empty()) { + gen->builder()->swizzle(fixedOffset.count, swizzle); + } + return true; + } + + [[nodiscard]] bool store(Generator* gen, + SlotRange fixedOffset, + AutoStack* dynamicOffset, + SkSpan swizzle) override { + SkDEBUGFAIL("immutable values cannot be stored into"); + return unsupported(); + } + +private: + const Variable* fVariable; +}; + class SwizzleLValue final : public LValue { public: explicit SwizzleLValue(std::unique_ptr p, const ComponentArray& c) @@ -1105,6 +1182,11 @@ SlotRange SlotManager::createSlots(std::string name, return result; } +void SlotManager::mapVariableToSlots(const Variable& v, SlotRange range) { + SkASSERT(v.type().slotCount() == SkToSizeT(range.count)); + fSlotMap.set(&v, range); +} + SlotRange SlotManager::getVariableSlots(const Variable& v) { SlotRange* entry = fSlotMap.find(&v); if (entry != nullptr) { @@ -1114,7 +1196,7 @@ SlotRange SlotManager::getVariableSlots(const Variable& v) { v.type(), v.fPosition, /*isFunctionReturnValue=*/false); - fSlotMap.set(&v, range); + this->mapVariableToSlots(v, range); return range; } @@ -1145,7 +1227,11 @@ static bool is_sliceable_swizzle(SkSpan components) { std::unique_ptr Generator::makeLValue(const Expression& e, bool allowScratch) { if (e.is()) { - return std::make_unique(e.as().variable()); + const Variable* variable = e.as().variable(); + if (fImmutableVariables.contains(variable)) { + return std::make_unique(variable); + } + return std::make_unique(variable); } if (e.is()) { const Swizzle& swizzleExpr = e.as(); @@ -1457,7 +1543,7 @@ bool Generator::writeGlobals() { SkASSERT(!var->type().isOpaque()); // Builtin variables are system-defined, with special semantics. - if (int builtin = var->modifiers().fLayout.fBuiltin; builtin >= 0) { + if (int builtin = var->layout().fBuiltin; builtin >= 0) { if (builtin == SK_FRAGCOORD_BUILTIN) { fBuilder.store_device_xy01(this->getVariableSlots(*var)); continue; @@ -1980,6 +2066,12 @@ bool Generator::writeSwitchStatement(const SwitchStatement& s) { } bool Generator::writeImmutableVarDeclaration(const VarDeclaration& d) { + // In a debugging session, we expect debug traces for a variable declaration to appear, even if + // it's constant, so we don't use immutable slots for variables when tracing is on. + if (this->shouldWriteTraceOps()) { + return false; + } + // Find the constant value for this variable. const Expression* initialValue = ConstantFolder::GetConstantValueForVariable(*d.value()); SkASSERT(initialValue); @@ -1990,60 +2082,22 @@ bool Generator::writeImmutableVarDeclaration(const VarDeclaration& d) { return false; } - SlotRange varSlots = this->getVariableSlots(*d.var()); - size_t numSlots = varSlots.count; - - STArray<16, Type::NumberKind> kinds; - kinds.reserve_exact(numSlots); - - STArray<16, double> values; - values.reserve_exact(numSlots); - - for (size_t index = 0; index < numSlots; ++index) { - // Determine the number-kind of the slot; bail if it's non-numeric. - Type::NumberKind kind = initialValue->type().slotType(index).numberKind(); - switch (kind) { - case Type::NumberKind::kFloat: - case Type::NumberKind::kSigned: - case Type::NumberKind::kUnsigned: - case Type::NumberKind::kBoolean: - kinds.push_back(kind); - break; - default: - return false; - } - - // Determine the constant-value of the slot. - std::optional v = initialValue->getConstantValue(index); - if (!v.has_value()) { - return false; - } - values.push_back(*v); + STArray<16, ImmutableBits> immutableValues; + if (!this->getImmutableValueForExpression(*initialValue, &immutableValues)) { + return false; } - // Write out the constant value back to slots immutably. (This generates no runtime code.) - for (int index = 0; index < varSlots.count; ++index) { - switch (kinds[index]) { - case Type::NumberKind::kFloat: - fBuilder.store_immutable_value_f(varSlots.index + index, values[index]); - break; - case Type::NumberKind::kSigned: - fBuilder.store_immutable_value_i(varSlots.index + index, values[index]); - break; - case Type::NumberKind::kUnsigned: - fBuilder.store_immutable_value_u(varSlots.index + index, values[index]); - break; - case Type::NumberKind::kBoolean: - fBuilder.store_immutable_value_u(varSlots.index + index, values[index] ? ~0 : 0); - break; - default: - SkUNREACHABLE; - } - } + fImmutableVariables.add(d.var()); - // In a debugging session, we still expect debug traces for this variable declaration to appear. - if (this->shouldWriteTraceOps()) { - fBuilder.trace_var(fTraceMask->stackID(), varSlots); + std::optional preexistingSlots = this->findPreexistingImmutableData(immutableValues); + if (preexistingSlots.has_value()) { + // Associate this variable with a preexisting range of immutable data (no new data or code). + fImmutableSlots.mapVariableToSlots(*d.var(), *preexistingSlots); + } else { + // Write out the constant value back to immutable slots. (This generates data, but no + // runtime code.) + SlotRange slots = this->getImmutableSlots(*d.var()); + this->storeImmutableValueToSlots(immutableValues, slots); } return true; @@ -2093,6 +2147,9 @@ bool Generator::pushExpression(const Expression& e, bool usesResult) { case Expression::Kind::kConstructorSplat: return this->pushConstructorSplat(e.as()); + case Expression::Kind::kEmpty: + return true; + case Expression::Kind::kFieldAccess: return this->pushFieldAccess(e.as()); @@ -2539,7 +2596,133 @@ bool Generator::pushBinaryExpression(const Expression& left, Operator op, const : true; } +std::optional Generator::getImmutableBitsForSlot(const Expression& expr, + size_t slot) { + // Determine the constant-value of the slot; bail if it isn't constant. + std::optional v = expr.getConstantValue(slot); + if (!v.has_value()) { + return std::nullopt; + } + // Determine the number-kind of the slot, and convert the value to its bit-representation. + Type::NumberKind kind = expr.type().slotType(slot).numberKind(); + double value = *v; + switch (kind) { + case Type::NumberKind::kFloat: + return sk_bit_cast((float)value); + + case Type::NumberKind::kSigned: + return sk_bit_cast((int32_t)value); + + case Type::NumberKind::kUnsigned: + return sk_bit_cast((uint32_t)value); + + case Type::NumberKind::kBoolean: + return value ? ~0 : 0; + + default: + return std::nullopt; + } +} + +bool Generator::getImmutableValueForExpression(const Expression& expr, + TArray* immutableValues) { + if (!expr.supportsConstantValues()) { + return false; + } + size_t numSlots = expr.type().slotCount(); + immutableValues->reserve_exact(numSlots); + for (size_t index = 0; index < numSlots; ++index) { + std::optional bits = this->getImmutableBitsForSlot(expr, index); + if (!bits.has_value()) { + return false; + } + immutableValues->push_back(*bits); + } + return true; +} + +void Generator::storeImmutableValueToSlots(const TArray& immutableValues, + SlotRange slots) { + for (int index = 0; index < slots.count; ++index) { + // Store the immutable value in its slot. + const Slot slot = slots.index++; + const ImmutableBits bits = immutableValues[index]; + fBuilder.store_immutable_value_i(slot, bits); + + // Keep track of every stored immutable value for potential later reuse. + fImmutableSlotMap[bits].add(slot); + } +} + +std::optional Generator::findPreexistingImmutableData( + const TArray& immutableValues) { + STArray<16, const THashSet*> slotArray; + slotArray.reserve_exact(immutableValues.size()); + + // Find all the slots associated with each immutable-value bit representation. + // If a given bit-pattern doesn't exist anywhere in our program yet, we can stop searching. + for (const ImmutableBits& immutableValue : immutableValues) { + const THashSet* slotsForValue = fImmutableSlotMap.find(immutableValue); + if (!slotsForValue) { + return std::nullopt; + } + slotArray.push_back(slotsForValue); + } + + // Look for the group with the fewest number of entries, since that can be searched in the + // least amount of effort. + int leastSlotIndex = 0, leastSlotCount = INT_MAX; + for (int index = 0; index < slotArray.size(); ++index) { + int currentCount = slotArray[index]->count(); + if (currentCount < leastSlotCount) { + leastSlotIndex = index; + leastSlotCount = currentCount; + } + } + + // See if we can reconstitute the value that we want with any of the data we've already got. + for (int slot : *slotArray[leastSlotIndex]) { + int firstSlot = slot - leastSlotIndex; + bool found = true; + for (int index = 0; index < slotArray.size(); ++index) { + if (!slotArray[index]->contains(firstSlot + index)) { + found = false; + break; + } + } + if (found) { + // We've found an exact match for the input value; return its slot-range. + return SlotRange{firstSlot, slotArray.size()}; + } + } + + // We didn't find any reusable slot ranges. + return std::nullopt; +} + +bool Generator::pushImmutableData(const Expression& e) { + STArray<16, ImmutableBits> immutableValues; + if (!this->getImmutableValueForExpression(e, &immutableValues)) { + return false; + } + std::optional preexistingData = this->findPreexistingImmutableData(immutableValues); + if (preexistingData.has_value()) { + fBuilder.push_immutable(*preexistingData); + return true; + } + SlotRange range = fImmutableSlots.createSlots(e.description(), + e.type(), + e.fPosition, + /*isFunctionReturnValue=*/false); + this->storeImmutableValueToSlots(immutableValues, range); + fBuilder.push_immutable(range); + return true; +} + bool Generator::pushConstructorCompound(const AnyConstructor& c) { + if (c.type().slotCount() > 1 && this->pushImmutableData(c)) { + return true; + } for (const std::unique_ptr &arg : c.argumentSpan()) { if (!this->pushExpression(*arg)) { return unsupported(); @@ -2941,6 +3124,7 @@ bool Generator::pushIntrinsic(IntrinsicKind intrinsic, const Expression& arg0) { } int slotCount = arg0.type().slotCount(); if (slotCount > 1) { +#if defined(SK_USE_RSQRT_IN_RP_NORMALIZE) // Instead of `x / sqrt(dot(x, x))`, we can get roughly the same result in less time // by computing `x * invsqrt(dot(x, x))`. fBuilder.push_clone(slotCount); @@ -2953,6 +3137,21 @@ bool Generator::pushIntrinsic(IntrinsicKind intrinsic, const Expression& arg0) { // Return `x * vec(inversesqrt(dot(x, x)))`. return this->binaryOp(arg0.type(), kMultiplyOps); +#else + // TODO: We can get roughly the same result in less time by using `invsqrt`, but + // that leads to more variance across architectures, which Chromium layout tests do + // not handle nicely. + fBuilder.push_clone(slotCount); + fBuilder.push_clone(slotCount); + fBuilder.dot_floats(slotCount); + + // Compute `vec(sqrt(dot(x, x)))`. + fBuilder.unary_op(BuilderOp::sqrt_float, 1); + fBuilder.push_duplicates(slotCount - 1); + + // Return `x / vec(sqrt(dot(x, x)))`. + return this->binaryOp(arg0.type(), kDivideOps); +#endif } else { // For single-slot normalization, we can simplify `sqrt(x * x)` into `abs(x)`. fBuilder.push_clone(slotCount); @@ -3208,13 +3407,13 @@ bool Generator::pushIntrinsic(IntrinsicKind intrinsic, return true; } case IntrinsicKind::k_step_IntrinsicKind: { - // Compute step as `float(lessThan(edge, x))`. We convert from boolean 0/~0 to floating - // point zero/one by using a bitwise-and against the bit-pattern of 1.0. + // Compute step as `float(lessThanEqual(edge, x))`. We convert from boolean 0/~0 to + // floating point zero/one by using a bitwise-and against the bit-pattern of 1.0. SkASSERT(arg0.type().componentType().matches(arg1.type().componentType())); if (!this->pushVectorizedExpression(arg0, arg1.type()) || !this->pushExpression(arg1)) { return unsupported(); } - if (!this->binaryOp(arg1.type(), kLessThanOps)) { + if (!this->binaryOp(arg1.type(), kLessThanEqualOps)) { return unsupported(); } Literal pos1Literal{Position{}, 1.0, &arg1.type().componentType()}; @@ -3661,14 +3860,14 @@ bool Generator::pushTernaryExpression(const Expression& test, } bool Generator::pushVariableReference(const VariableReference& var) { - // If we are pushing a constant-value variable, and it's a scalar or splat-vector, just push - // the value directly. This shouldn't consume extra ops, and literal values are more amenable to - // optimization. + // If we are pushing a constant-value variable, push the value directly; literal values are more + // amenable to optimization. if (var.type().isScalar() || var.type().isVector()) { - if (const Expression* expr = ConstantFolder::GetConstantValueOrNullForVariable(var)) { - if (ConstantFolder::IsConstantSplat(*expr, *expr->getConstantValue(0))) { - return this->pushExpression(*expr); - } + if (const Expression* expr = ConstantFolder::GetConstantValueOrNull(var)) { + return this->pushExpression(*expr); + } + if (fImmutableVariables.contains(var.variable())) { + return this->pushExpression(*var.variable()->initialValue()); } } return this->pushVariableReferencePartial(var, SlotRange{0, (int)var.type().slotCount()}); @@ -3678,12 +3877,31 @@ bool Generator::pushVariableReferencePartial(const VariableReference& v, SlotRan const Variable& var = *v.variable(); SlotRange r; if (IsUniform(var)) { + // Push a uniform. r = this->getUniformSlots(var); SkASSERT(r.count == (int)var.type().slotCount()); r.index += subset.index; r.count = subset.count; fBuilder.push_uniform(r); + } else if (fImmutableVariables.contains(&var)) { + // If we only need a single slot, we can push a constant. This saves a lookup, and can + // occasionally permit the use of an immediate-mode op. + if (subset.count == 1) { + const Expression& expr = *v.variable()->initialValue(); + std::optional bits = this->getImmutableBitsForSlot(expr, subset.index); + if (bits.has_value()) { + fBuilder.push_constant_i(*bits); + return true; + } + } + // Push the immutable slot range. + r = this->getImmutableSlots(var); + SkASSERT(r.count == (int)var.type().slotCount()); + r.index += subset.index; + r.count = subset.count; + fBuilder.push_immutable(r); } else { + // Push the variable. r = this->getVariableSlots(var); SkASSERT(r.count == (int)var.type().slotCount()); r.index += subset.index; @@ -3721,33 +3939,29 @@ bool Generator::writeProgram(const FunctionDefinition& function) { } // Assign slots to the parameters of main; copy src and dst into those slots as appropriate. + const SkSL::Variable* mainCoordsParam = function.declaration().getMainCoordsParameter(); + const SkSL::Variable* mainInputColorParam = function.declaration().getMainInputColorParameter(); + const SkSL::Variable* mainDestColorParam = function.declaration().getMainDestColorParameter(); + for (const SkSL::Variable* param : function.declaration().parameters()) { - switch (param->modifiers().fLayout.fBuiltin) { - case SK_MAIN_COORDS_BUILTIN: { - // Coordinates are passed via RG. - SlotRange fragCoord = this->getVariableSlots(*param); - SkASSERT(fragCoord.count == 2); - fBuilder.store_src_rg(fragCoord); - break; - } - case SK_INPUT_COLOR_BUILTIN: { - // Input colors are passed via RGBA. - SlotRange srcColor = this->getVariableSlots(*param); - SkASSERT(srcColor.count == 4); - fBuilder.store_src(srcColor); - break; - } - case SK_DEST_COLOR_BUILTIN: { - // Dest colors are passed via dRGBA. - SlotRange destColor = this->getVariableSlots(*param); - SkASSERT(destColor.count == 4); - fBuilder.store_dst(destColor); - break; - } - default: { - SkDEBUGFAIL("Invalid parameter to main()"); - return unsupported(); - } + if (param == mainCoordsParam) { + // Coordinates are passed via RG. + SlotRange fragCoord = this->getVariableSlots(*param); + SkASSERT(fragCoord.count == 2); + fBuilder.store_src_rg(fragCoord); + } else if (param == mainInputColorParam) { + // Input colors are passed via RGBA. + SlotRange srcColor = this->getVariableSlots(*param); + SkASSERT(srcColor.count == 4); + fBuilder.store_src(srcColor); + } else if (param == mainDestColorParam) { + // Dest colors are passed via dRGBA. + SlotRange destColor = this->getVariableSlots(*param); + SkASSERT(destColor.count == 4); + fBuilder.store_dst(destColor); + } else { + SkDEBUGFAIL("Invalid parameter to main()"); + return unsupported(); } } @@ -3784,7 +3998,10 @@ bool Generator::writeProgram(const FunctionDefinition& function) { } std::unique_ptr Generator::finish() { - return fBuilder.finish(fProgramSlots.slotCount(), fUniformSlots.slotCount(), fDebugTrace); + return fBuilder.finish(fProgramSlots.slotCount(), + fUniformSlots.slotCount(), + fImmutableSlots.slotCount(), + fDebugTrace); } } // namespace RP @@ -3801,5 +4018,3 @@ std::unique_ptr MakeRasterPipelineProgram(const SkSL::Program& prog } } // namespace SkSL - -#endif // SK_ENABLE_SKSL_IN_RASTER_PIPELINE diff --git a/src/sksl/codegen/SkSLSPIRVCodeGenerator.cpp b/src/sksl/codegen/SkSLSPIRVCodeGenerator.cpp index a61f99afad8e..90019cbfc16e 100644 --- a/src/sksl/codegen/SkSLSPIRVCodeGenerator.cpp +++ b/src/sksl/codegen/SkSLSPIRVCodeGenerator.cpp @@ -10,6 +10,8 @@ #include "include/core/SkSpan.h" #include "include/core/SkTypes.h" #include "include/private/base/SkTArray.h" +#include "include/private/base/SkTo.h" +#include "src/base/SkEnumBitMask.h" #include "src/core/SkChecksum.h" #include "src/sksl/GLSL.std.450.h" #include "src/sksl/SkSLAnalysis.h" @@ -19,7 +21,6 @@ #include "src/sksl/SkSLContext.h" #include "src/sksl/SkSLErrorReporter.h" #include "src/sksl/SkSLIntrinsicList.h" -#include "src/sksl/SkSLModifiersPool.h" #include "src/sksl/SkSLOperator.h" #include "src/sksl/SkSLOutputStream.h" #include "src/sksl/SkSLPool.h" @@ -52,7 +53,10 @@ #include "src/sksl/ir/SkSLIfStatement.h" #include "src/sksl/ir/SkSLIndexExpression.h" #include "src/sksl/ir/SkSLInterfaceBlock.h" +#include "src/sksl/ir/SkSLLayout.h" #include "src/sksl/ir/SkSLLiteral.h" +#include "src/sksl/ir/SkSLModifierFlags.h" +#include "src/sksl/ir/SkSLModifiersDeclaration.h" #include "src/sksl/ir/SkSLPoison.h" #include "src/sksl/ir/SkSLPostfixExpression.h" #include "src/sksl/ir/SkSLPrefixExpression.h" @@ -253,6 +257,11 @@ SPIRVCodeGenerator::Intrinsic SPIRVCodeGenerator::getIntrinsic(IntrinsicKind ik) case k_sampleLod_IntrinsicKind: return SPECIAL(TextureLod); case k_subpassLoad_IntrinsicKind: return SPECIAL(SubpassLoad); + case k_textureRead_IntrinsicKind: return SPECIAL(TextureRead); + case k_textureWrite_IntrinsicKind: return SPECIAL(TextureWrite); + case k_textureWidth_IntrinsicKind: return SPECIAL(TextureWidth); + case k_textureHeight_IntrinsicKind: return SPECIAL(TextureHeight); + case k_floatBitsToInt_IntrinsicKind: return ALL_SPIRV(Bitcast); case k_floatBitsToUint_IntrinsicKind: return ALL_SPIRV(Bitcast); case k_intBitsToFloat_IntrinsicKind: return ALL_SPIRV(Bitcast); @@ -298,6 +307,13 @@ SPIRVCodeGenerator::Intrinsic SPIRVCodeGenerator::getIntrinsic(IntrinsicKind ik) SpvOpSGreaterThanEqual, SpvOpUGreaterThanEqual, SpvOpUndef}; + + case k_atomicAdd_IntrinsicKind: return SPECIAL(AtomicAdd); + case k_atomicLoad_IntrinsicKind: return SPECIAL(AtomicLoad); + case k_atomicStore_IntrinsicKind: return SPECIAL(AtomicStore); + + case k_storageBarrier_IntrinsicKind: return SPECIAL(StorageBarrier); + case k_workgroupBarrier_IntrinsicKind: return SPECIAL(WorkgroupBarrier); default: return Intrinsic{kInvalid_IntrinsicOpcodeKind, 0, 0, 0, 0}; } @@ -342,22 +358,16 @@ static T pick_by_type(const Type& type, T ifFloat, T ifInt, T ifUInt, T ifBool) return ifFloat; } -static bool is_out(const Modifiers& m) { - return (m.fFlags & Modifiers::kOut_Flag) != 0; +static bool is_out(ModifierFlags f) { + return SkToBool(f & ModifierFlag::kOut); } -static bool is_in(const Modifiers& m) { - switch (m.fFlags & (Modifiers::kOut_Flag | Modifiers::kIn_Flag)) { - case Modifiers::kOut_Flag: // out - return false; - - case 0: // implicit in - case Modifiers::kIn_Flag: // explicit in - case Modifiers::kOut_Flag | Modifiers::kIn_Flag: // inout - return true; - - default: SkUNREACHABLE; +static bool is_in(ModifierFlags f) { + if (f & ModifierFlag::kIn) { + return true; // `in` and `inout` both count } + // If neither in/out flag is set, the type is implicitly `in`. + return !SkToBool(f & ModifierFlag::kOut); } static bool is_control_flow_op(SpvOp_ op) { @@ -992,7 +1002,7 @@ SpvId SPIRVCodeGenerator::writeStruct(const Type& type, const MemoryLayout& memo } size_t size = memoryLayout.size(*field.fType); size_t alignment = memoryLayout.alignment(*field.fType); - const Layout& fieldLayout = field.fModifiers.fLayout; + const Layout& fieldLayout = field.fLayout; if (fieldLayout.fOffset >= 0) { if (fieldLayout.fOffset < (int) offset) { fContext.fErrors->error(field.fPosition, "offset of field '" + @@ -1012,7 +1022,7 @@ SpvId SPIRVCodeGenerator::writeStruct(const Type& type, const MemoryLayout& memo } this->writeInstruction(SpvOpMemberName, resultId, i, field.fName, fNameBuffer); this->writeFieldLayout(fieldLayout, resultId, i); - if (field.fModifiers.fLayout.fBuiltin < 0) { + if (field.fLayout.fBuiltin < 0) { this->writeInstruction(SpvOpMemberDecorate, resultId, (SpvId) i, SpvDecorationOffset, (SpvId) offset, fDecorationBuffer); } @@ -1131,6 +1141,13 @@ SpvId SPIRVCodeGenerator::getType(const Type& rawType, const MemoryLayout& layou case Type::TypeKind::kTexture: { SpvId floatTypeId = this->getType(*fContext.fTypes.fFloat, layout); int sampled = (type->textureAccess() == Type::TextureAccess::kSample) ? 1 : 2; + + // TODO(skia:293670098) SkSL doesn't provide a way to specify a pixel format. Until + // then, access an unsampled storage texture as rgba8 and pretend the underlying + // resource has a compatible format. + SpvImageFormat format = (sampled == 2 && type->dimensions() != SpvDimSubpassData) + ? SpvImageFormatRgba8 + : SpvImageFormatUnknown; return this->writeInstruction(SpvOpTypeImage, Words{Word::Result(), floatTypeId, @@ -1139,7 +1156,16 @@ SpvId SPIRVCodeGenerator::getType(const Type& rawType, const MemoryLayout& layou Word::Number(type->isArrayedTexture()), Word::Number(type->isMultisampled()), Word::Number(sampled), - SpvImageFormatUnknown}, + format}, + fConstantBuffer); + } + case Type::TypeKind::kAtomic: { + // SkSL currently only supports the atomicUint type. + SkASSERT(type->matches(*fContext.fTypes.fAtomicUInt)); + // SPIR-V doesn't have atomic types. Rather, it allows atomic operations on primitive + // types. The SPIR-V type of an SkSL atomic is simply the underlying type. + return this->writeInstruction(SpvOpTypeInt, + Words{Word::Result(), Word::Number(32), Word::Number(0)}, fConstantBuffer); } default: { @@ -1242,6 +1268,8 @@ SpvId SPIRVCodeGenerator::writeExpression(const Expression& expr, OutputStream& return this->writeConstructorCompound(expr.as(), out); case Expression::Kind::kConstructorCompoundCast: return this->writeConstructorCompoundCast(expr.as(), out); + case Expression::Kind::kEmpty: + return NA; case Expression::Kind::kFieldAccess: return this->writeFieldAccess(expr.as(), out); case Expression::Kind::kFunctionCall: @@ -1540,6 +1568,63 @@ SpvId SPIRVCodeGenerator::writeSpecialIntrinsic(const FunctionCall& c, SpecialIn out); break; } + case kTextureRead_SpecialIntrinsic: { + SkASSERT(arguments[0]->type().dimensions() == SpvDim2D); + SkASSERT(arguments[1]->type().matches(*fContext.fTypes.fUInt2)); + + SpvId type = this->getType(callType); + SpvId image = this->writeExpression(*arguments[0], out); + SpvId coord = this->writeExpression(*arguments[1], out); + + const Type& arg0Type = arguments[0]->type(); + SkASSERT(arg0Type.typeKind() == Type::TypeKind::kTexture); + + switch (arg0Type.textureAccess()) { + case Type::TextureAccess::kSample: + this->writeInstruction(SpvOpImageFetch, type, result, image, coord, + SpvImageOperandsLodMask, + this->writeOpConstant(*fContext.fTypes.fInt, 0), + out); + break; + case Type::TextureAccess::kRead: + case Type::TextureAccess::kReadWrite: + this->writeInstruction(SpvOpImageRead, type, result, image, coord, out); + break; + case Type::TextureAccess::kWrite: + default: + SkDEBUGFAIL("'textureRead' called on writeonly texture type"); + break; + } + + break; + } + case kTextureWrite_SpecialIntrinsic: { + SkASSERT(arguments[0]->type().dimensions() == SpvDim2D); + SkASSERT(arguments[1]->type().matches(*fContext.fTypes.fUInt2)); + SkASSERT(arguments[2]->type().matches(*fContext.fTypes.fHalf4)); + + SpvId image = this->writeExpression(*arguments[0], out); + SpvId coord = this->writeExpression(*arguments[1], out); + SpvId texel = this->writeExpression(*arguments[2], out); + + this->writeInstruction(SpvOpImageWrite, image, coord, texel, out); + break; + } + case kTextureWidth_SpecialIntrinsic: + case kTextureHeight_SpecialIntrinsic: { + SkASSERT(arguments[0]->type().dimensions() == SpvDim2D); + fCapabilities |= 1ULL << SpvCapabilityImageQuery; + + SpvId dimsType = this->getType(*fContext.fTypes.fUInt2); + SpvId dims = this->nextId(nullptr); + SpvId image = this->writeExpression(*arguments[0], out); + this->writeInstruction(SpvOpImageQuerySize, dimsType, dims, image, out); + + SpvId type = this->getType(callType); + int32_t index = (kind == kTextureWidth_SpecialIntrinsic) ? 0 : 1; + this->writeInstruction(SpvOpCompositeExtract, type, result, dims, index, out); + break; + } case kMod_SpecialIntrinsic: { TArray args = this->vectorize(arguments, out); SkASSERT(args.size() == 2); @@ -1644,10 +1729,113 @@ SpvId SPIRVCodeGenerator::writeSpecialIntrinsic(const FunctionCall& c, SpecialIn result = this->writeComponentwiseMatrixBinary(callType, lhs, rhs, SpvOpFMul, out); break; } + case kAtomicAdd_SpecialIntrinsic: + case kAtomicLoad_SpecialIntrinsic: + case kAtomicStore_SpecialIntrinsic: + result = this->writeAtomicIntrinsic(c, kind, result, out); + break; + case kStorageBarrier_SpecialIntrinsic: + case kWorkgroupBarrier_SpecialIntrinsic: { + // Both barrier types operate in the workgroup execution and memory scope and differ + // only in memory semantics. storageBarrier() is not a device-scope barrier. + SpvId scopeId = + this->writeOpConstant(*fContext.fTypes.fUInt, (int32_t)SpvScopeWorkgroup); + int32_t memSemMask = (kind == kStorageBarrier_SpecialIntrinsic) + ? SpvMemorySemanticsAcquireReleaseMask | + SpvMemorySemanticsUniformMemoryMask + : SpvMemorySemanticsAcquireReleaseMask | + SpvMemorySemanticsWorkgroupMemoryMask; + SpvId memorySemanticsId = this->writeOpConstant(*fContext.fTypes.fUInt, memSemMask); + this->writeInstruction(SpvOpControlBarrier, + scopeId, // execution scope + scopeId, // memory scope + memorySemanticsId, + out); + break; + } } return result; } +SpvId SPIRVCodeGenerator::writeAtomicIntrinsic(const FunctionCall& c, + SpecialIntrinsic kind, + SpvId resultId, + OutputStream& out) { + const ExpressionArray& arguments = c.arguments(); + SkASSERT(!arguments.empty()); + + std::unique_ptr atomicPtr = this->getLValue(*arguments[0], out); + SpvId atomicPtrId = atomicPtr->getPointer(); + if (atomicPtrId == NA) { + SkDEBUGFAILF("atomic intrinsic expected a pointer argument: %s", + arguments[0]->description().c_str()); + return NA; + } + + SpvId memoryScopeId = NA; + { + // In SkSL, the atomicUint type can only be declared as a workgroup variable or SSBO block + // member. The two memory scopes that these map to are "workgroup" and "device", + // respectively. + SpvScope memoryScope; + switch (atomicPtr->storageClass()) { + case SpvStorageClassUniform: + // We encode storage buffers in the uniform address space (with the BufferBlock + // decorator). + memoryScope = SpvScopeDevice; + break; + case SpvStorageClassWorkgroup: + memoryScope = SpvScopeWorkgroup; + break; + default: + SkDEBUGFAILF("atomic argument has invalid storage class: %d", + atomicPtr->storageClass()); + return NA; + } + memoryScopeId = this->writeOpConstant(*fContext.fTypes.fUInt, (int32_t)memoryScope); + } + + SpvId relaxedMemoryOrderId = + this->writeOpConstant(*fContext.fTypes.fUInt, (int32_t)SpvMemorySemanticsMaskNone); + + switch (kind) { + case kAtomicAdd_SpecialIntrinsic: + SkASSERT(arguments.size() == 2); + this->writeInstruction(SpvOpAtomicIAdd, + this->getType(c.type()), + resultId, + atomicPtrId, + memoryScopeId, + relaxedMemoryOrderId, + this->writeExpression(*arguments[1], out), + out); + break; + case kAtomicLoad_SpecialIntrinsic: + SkASSERT(arguments.size() == 1); + this->writeInstruction(SpvOpAtomicLoad, + this->getType(c.type()), + resultId, + atomicPtrId, + memoryScopeId, + relaxedMemoryOrderId, + out); + break; + case kAtomicStore_SpecialIntrinsic: + SkASSERT(arguments.size() == 2); + this->writeInstruction(SpvOpAtomicStore, + atomicPtrId, + memoryScopeId, + relaxedMemoryOrderId, + this->writeExpression(*arguments[1], out), + out); + break; + default: + SkUNREACHABLE; + } + + return resultId; +} + SpvId SPIRVCodeGenerator::writeFunctionCallArgument(const FunctionCall& call, int argIndex, std::vector* tempVars, @@ -1655,7 +1843,7 @@ SpvId SPIRVCodeGenerator::writeFunctionCallArgument(const FunctionCall& call, SpvId* outSynthesizedSamplerId) { const FunctionDeclaration& funcDecl = call.function(); const Expression& arg = *call.arguments()[argIndex]; - const Modifiers& paramModifiers = funcDecl.parameters()[argIndex]->modifiers(); + ModifierFlags paramFlags = funcDecl.parameters()[argIndex]->modifierFlags(); // ID of temporary variable that we will use to hold this argument, or 0 if it is being // passed directly @@ -1663,13 +1851,13 @@ SpvId SPIRVCodeGenerator::writeFunctionCallArgument(const FunctionCall& call, // if we need a temporary var to store this argument, this is the value to store in the var SpvId tmpValueId = NA; - if (is_out(paramModifiers)) { + if (is_out(paramFlags)) { std::unique_ptr lv = this->getLValue(arg, out); // We handle out params with a temp var that we copy back to the original variable at the // end of the call. GLSL guarantees that the original variable will be unchanged until the // end of the call, and also that out params are written back to their original variables in // a specific order (left-to-right), so it's unsafe to pass a pointer to the original value. - if (is_in(paramModifiers)) { + if (is_in(paramFlags)) { tmpValueId = lv->load(out); } tmpVar = this->nextId(&arg.type()); @@ -2207,27 +2395,29 @@ static SpvStorageClass_ get_storage_class_for_global_variable( const Variable& var, SpvStorageClass_ fallbackStorageClass) { SkASSERT(var.storage() == Variable::Storage::kGlobal); - const Modifiers& modifiers = var.modifiers(); - if (modifiers.fFlags & Modifiers::kIn_Flag) { - SkASSERT(!(modifiers.fLayout.fFlags & Layout::kPushConstant_Flag)); + if (var.type().typeKind() == Type::TypeKind::kSampler || + var.type().typeKind() == Type::TypeKind::kSeparateSampler || + var.type().typeKind() == Type::TypeKind::kTexture) { + return SpvStorageClassUniformConstant; + } + + const Layout& layout = var.layout(); + ModifierFlags flags = var.modifierFlags(); + if (flags & ModifierFlag::kIn) { + SkASSERT(!(layout.fFlags & LayoutFlag::kPushConstant)); return SpvStorageClassInput; } - if (modifiers.fFlags & Modifiers::kOut_Flag) { - SkASSERT(!(modifiers.fLayout.fFlags & Layout::kPushConstant_Flag)); + if (flags & ModifierFlag::kOut) { + SkASSERT(!(layout.fFlags & LayoutFlag::kPushConstant)); return SpvStorageClassOutput; } - if (modifiers.fFlags & Modifiers::kUniform_Flag) { - if (modifiers.fLayout.fFlags & Layout::kPushConstant_Flag) { + if (flags.isUniform()) { + if (layout.fFlags & LayoutFlag::kPushConstant) { return SpvStorageClassPushConstant; } - if (var.type().typeKind() == Type::TypeKind::kSampler || - var.type().typeKind() == Type::TypeKind::kSeparateSampler || - var.type().typeKind() == Type::TypeKind::kTexture) { - return SpvStorageClassUniformConstant; - } return SpvStorageClassUniform; } - if (modifiers.fFlags & Modifiers::kBuffer_Flag) { + if (flags.isBuffer()) { // Note: In SPIR-V 1.3, a storage buffer can be declared with the "StorageBuffer" // storage class and the "Block" decoration and the <1.3 approach we use here ("Uniform" // storage class and the "BufferBlock" decoration) is deprecated. Since we target SPIR-V @@ -2236,6 +2426,9 @@ static SpvStorageClass_ get_storage_class_for_global_variable( // would benefit from SPV_KHR_variable_pointers capabilities). return SpvStorageClassUniform; } + if (flags.isWorkgroup()) { + return SpvStorageClassWorkgroup; + } return fallbackStorageClass; } @@ -2306,6 +2499,10 @@ class PointerLValue : public SPIRVCodeGenerator::LValue { return fIsMemoryObject; } + SpvStorageClass storageClass() const override { + return fStorageClass; + } + SpvId load(OutputStream& out) override { return fGen.writeOpLoad(fType, fPrecision, fPointer, out); } @@ -2357,6 +2554,10 @@ class SwizzleLValue : public SPIRVCodeGenerator::LValue { return true; } + SpvStorageClass storageClass() const override { + return fStorageClass; + } + SpvId load(OutputStream& out) override { SpvId base = fGen.nextId(fBaseType); fGen.writeInstruction(SpvOpLoad, fGen.getType(*fBaseType), base, fVecPointer, out); @@ -2528,7 +2729,7 @@ std::unique_ptr SPIRVCodeGenerator::identifier(std::string_view name SpvId SPIRVCodeGenerator::writeVariableReference(const VariableReference& ref, OutputStream& out) { const Variable* variable = ref.variable(); - switch (variable->modifiers().fLayout.fBuiltin) { + switch (variable->layout().fBuiltin) { case DEVICE_FRAGCOORDS_BUILTIN: { // Down below, we rewrite raw references to sk_FragCoord with expressions that reference // DEVICE_FRAGCOORDS_BUILTIN. This is a fake variable that means we need to directly @@ -2562,15 +2763,17 @@ SpvId SPIRVCodeGenerator::writeVariableReference(const VariableReference& ref, O static constexpr char DEVICE_COORDS_NAME[] = "$device_FragCoords"; if (!fProgram.fSymbols->find(DEVICE_COORDS_NAME)) { AutoAttachPoolToThread attach(fProgram.fPool.get()); - Modifiers modifiers; - modifiers.fLayout.fBuiltin = DEVICE_FRAGCOORDS_BUILTIN; - auto coordsVar = std::make_unique(/*pos=*/Position(), - /*modifiersPosition=*/Position(), - fContext.fModifiersPool->add(modifiers), - DEVICE_COORDS_NAME, - fContext.fTypes.fFloat4.get(), - /*builtin=*/true, - Variable::Storage::kGlobal); + Layout layout; + layout.fBuiltin = DEVICE_FRAGCOORDS_BUILTIN; + auto coordsVar = Variable::Make(/*pos=*/Position(), + /*modifiersPosition=*/Position(), + layout, + ModifierFlag::kNone, + fContext.fTypes.fFloat4.get(), + DEVICE_COORDS_NAME, + /*mangledName=*/"", + /*builtin=*/true, + Variable::Storage::kGlobal); fSPIRVBonusVariables.add(coordsVar.get()); fProgram.fSymbols->add(std::move(coordsVar)); } @@ -2612,16 +2815,17 @@ SpvId SPIRVCodeGenerator::writeVariableReference(const VariableReference& ref, O static constexpr char DEVICE_CLOCKWISE_NAME[] = "$device_Clockwise"; if (!fProgram.fSymbols->find(DEVICE_CLOCKWISE_NAME)) { AutoAttachPoolToThread attach(fProgram.fPool.get()); - Modifiers modifiers; - modifiers.fLayout.fBuiltin = DEVICE_CLOCKWISE_BUILTIN; - auto clockwiseVar = std::make_unique( - /*pos=*/Position(), - /*modifiersPosition=*/Position(), - fContext.fModifiersPool->add(modifiers), - DEVICE_CLOCKWISE_NAME, - fContext.fTypes.fBool.get(), - /*builtin=*/true, - Variable::Storage::kGlobal); + Layout layout; + layout.fBuiltin = DEVICE_CLOCKWISE_BUILTIN; + auto clockwiseVar = Variable::Make(/*pos=*/Position(), + /*modifiersPosition=*/Position(), + layout, + ModifierFlag::kNone, + fContext.fTypes.fBool.get(), + DEVICE_CLOCKWISE_NAME, + /*mangledName=*/"", + /*builtin=*/true, + Variable::Storage::kGlobal); fSPIRVBonusVariables.add(clockwiseVar.get()); fProgram.fSymbols->add(std::move(clockwiseVar)); } @@ -2647,7 +2851,7 @@ SpvId SPIRVCodeGenerator::writeVariableReference(const VariableReference& ref, O } default: { // Constant-propagate variables that have a known compile-time value. - if (const Expression* expr = ConstantFolder::GetConstantValueOrNullForVariable(ref)) { + if (const Expression* expr = ConstantFolder::GetConstantValueOrNull(ref)) { return this->writeExpression(*expr, out); } @@ -3477,7 +3681,7 @@ SpvId SPIRVCodeGenerator::writeFunction(const FunctionDefinition& f, OutputStrea } void SPIRVCodeGenerator::writeLayout(const Layout& layout, SpvId target, Position pos) { - bool isPushConstant = (layout.fFlags & Layout::kPushConstant_Flag); + bool isPushConstant = SkToBool(layout.fFlags & LayoutFlag::kPushConstant); if (layout.fLocation >= 0) { this->writeInstruction(SpvOpDecorate, target, SpvDecorationLocation, layout.fLocation, fDecorationBuffer); @@ -3541,7 +3745,7 @@ MemoryLayout SPIRVCodeGenerator::memoryLayoutForStorageClass(SpvStorageClass_ st } MemoryLayout SPIRVCodeGenerator::memoryLayoutForVariable(const Variable& v) const { - bool pushConstant = ((v.modifiers().fLayout.fFlags & Layout::kPushConstant_Flag) != 0); + bool pushConstant = SkToBool(v.layout().fFlags & LayoutFlag::kPushConstant); return pushConstant ? MemoryLayout(MemoryLayout::Standard::k430) : fDefaultLayout; } @@ -3565,15 +3769,15 @@ SpvId SPIRVCodeGenerator::writeInterfaceBlock(const InterfaceBlock& intf, bool a SkSpan fieldSpan = type.fields(); TArray fields(fieldSpan.data(), fieldSpan.size()); fields.emplace_back(Position(), - Modifiers(Layout(/*flags=*/0, - /*location=*/-1, - fProgram.fConfig->fSettings.fRTFlipOffset, - /*binding=*/-1, - /*index=*/-1, - /*set=*/-1, - /*builtin=*/-1, - /*inputAttachmentIndex=*/-1), - /*flags=*/0), + Layout(LayoutFlag::kNone, + /*location=*/-1, + fProgram.fConfig->fSettings.fRTFlipOffset, + /*binding=*/-1, + /*index=*/-1, + /*set=*/-1, + /*builtin=*/-1, + /*inputAttachmentIndex=*/-1), + ModifierFlag::kNone, SKSL_RTFLIP_NAME, fContext.fTypes.fFloat2.get()); { @@ -3584,15 +3788,16 @@ SpvId SPIRVCodeGenerator::writeInterfaceBlock(const InterfaceBlock& intf, bool a type.name(), std::move(fields), /*interfaceBlock=*/true)); - ExtendedVariable* modifiedVar = fProgram.fSymbols->takeOwnershipOfSymbol( - std::make_unique(intfVar.fPosition, - intfVar.modifiersPosition(), - &intfVar.modifiers(), - intfVar.name(), - rtFlipStructType, - intfVar.isBuiltin(), - intfVar.storage(), - /*mangledName=*/"")); + Variable* modifiedVar = fProgram.fSymbols->takeOwnershipOfSymbol( + Variable::Make(intfVar.fPosition, + intfVar.modifiersPosition(), + intfVar.layout(), + intfVar.modifierFlags(), + rtFlipStructType, + intfVar.name(), + /*mangledName=*/"", + intfVar.isBuiltin(), + intfVar.storage())); fSPIRVBonusVariables.add(modifiedVar); InterfaceBlock modifiedCopy(intf.fPosition, modifiedVar, intf.typeOwner()); result = this->writeInterfaceBlock(modifiedCopy, /*appendRTFlip=*/false); @@ -3603,16 +3808,15 @@ SpvId SPIRVCodeGenerator::writeInterfaceBlock(const InterfaceBlock& intf, bool a fWroteRTFlip = true; return result; } - const Modifiers& intfModifiers = intfVar.modifiers(); SpvId typeId = this->getType(type, memoryLayout); - if (intfModifiers.fLayout.fBuiltin == -1) { + if (intfVar.layout().fBuiltin == -1) { // Note: In SPIR-V 1.3, a storage buffer can be declared with the "StorageBuffer" // storage class and the "Block" decoration and the <1.3 approach we use here ("Uniform" // storage class and the "BufferBlock" decoration) is deprecated. Since we target SPIR-V // 1.0, we have to use the deprecated approach which is well supported in Vulkan and // addresses SkSL use cases (notably SkSL currently doesn't support pointer features that // would benefit from SPV_KHR_variable_pointers capabilities). - bool isStorageBuffer = intfModifiers.fFlags & Modifiers::kBuffer_Flag; + bool isStorageBuffer = intfVar.modifierFlags().isBuffer(); this->writeInstruction(SpvOpDecorate, typeId, isStorageBuffer ? SpvDecorationBufferBlock : SpvDecorationBlock, @@ -3621,7 +3825,7 @@ SpvId SPIRVCodeGenerator::writeInterfaceBlock(const InterfaceBlock& intf, bool a SpvId ptrType = this->nextId(nullptr); this->writeInstruction(SpvOpTypePointer, ptrType, storageClass, typeId, fConstantBuffer); this->writeInstruction(SpvOpVariable, ptrType, result, storageClass, fConstantBuffer); - Layout layout = intfModifiers.fLayout; + Layout layout = intfVar.layout(); if (storageClass == SpvStorageClassUniform && layout.fSet < 0) { layout.fSet = fProgram.fConfig->fSettings.fDefaultUniformSet; } @@ -3642,8 +3846,8 @@ bool SPIRVCodeGenerator::isDead(const Variable& var) const { } // It's not entirely clear what the rules are for eliding interface variables. Generally, it // causes problems to elide them, even when they're dead. - return !(var.modifiers().fFlags & - (Modifiers::kIn_Flag | Modifiers::kOut_Flag | Modifiers::kUniform_Flag)); + return !(var.modifierFlags() & + (ModifierFlag::kIn | ModifierFlag::kOut | ModifierFlag::kUniform)); } // This function determines whether to skip an OpVariable (of pointer type) declaration for @@ -3657,9 +3861,9 @@ bool SPIRVCodeGenerator::isDead(const Variable& var) const { // This is why we always emit an OpVariable for all non-scalar and non-vector types in case they get // accessed via a dynamic index. static bool is_vardecl_compile_time_constant(const VarDeclaration& varDecl) { - return varDecl.var()->modifiers().fFlags & Modifiers::kConst_Flag && + return varDecl.var()->modifierFlags().isConst() && (varDecl.var()->type().isScalar() || varDecl.var()->type().isVector()) && - (ConstantFolder::GetConstantValueOrNullForVariable(*varDecl.value()) || + (ConstantFolder::GetConstantValueOrNull(*varDecl.value()) || Analysis::IsCompileTimeConstant(*varDecl.value())); } @@ -3667,8 +3871,9 @@ bool SPIRVCodeGenerator::writeGlobalVarDeclaration(ProgramKind kind, const VarDeclaration& varDecl) { const Variable* var = varDecl.var(); const bool inDawnMode = fProgram.fConfig->fSettings.fSPIRVDawnCompatMode; - const int backendFlags = var->modifiers().fLayout.fFlags & Layout::kAllBackendFlagsMask; - const int permittedBackendFlags = Layout::kSPIRV_Flag | (inDawnMode ? Layout::kWGSL_Flag : 0); + const LayoutFlags backendFlags = var->layout().fFlags & LayoutFlag::kAllBackends; + const LayoutFlags permittedBackendFlags = LayoutFlag::kSPIRV | (inDawnMode ? LayoutFlag::kWGSL + : LayoutFlag::kNone); if (backendFlags & ~permittedBackendFlags) { fContext.fErrors->error(var->fPosition, "incompatible backend flag in SPIR-V codegen"); return false; @@ -3693,11 +3898,11 @@ bool SPIRVCodeGenerator::writeGlobalVarDeclaration(ProgramKind kind, } if (var->type().typeKind() == Type::TypeKind::kSampler && inDawnMode) { - if (var->modifiers().fLayout.fTexture == -1 || var->modifiers().fLayout.fSampler == -1 || - !(var->modifiers().fLayout.fFlags & Layout::kWGSL_Flag)) { - fContext.fErrors->error(var->fPosition, - "SPIR-V dawn compatibility mode requires an explicit texture " - "and sampler index"); + if (var->layout().fTexture == -1 || + var->layout().fSampler == -1 || + !(var->layout().fFlags & LayoutFlag::kWGSL)) { + fContext.fErrors->error(var->fPosition, "SPIR-V dawn compatibility mode requires an " + "explicit texture and sampler index"); return false; } SkASSERT(storageClass == SpvStorageClassUniformConstant); @@ -3723,7 +3928,7 @@ bool SPIRVCodeGenerator::writeGlobalVarDeclaration(ProgramKind kind, SpvId SPIRVCodeGenerator::writeGlobalVar(ProgramKind kind, SpvStorageClass_ storageClass, const Variable& var) { - if (var.modifiers().fLayout.fBuiltin == SK_FRAGCOLOR_BUILTIN && + if (var.layout().fBuiltin == SK_FRAGCOLOR_BUILTIN && !ProgramConfig::IsFragment(kind)) { SkASSERT(!fProgram.fConfig->fSettings.fFragColorIsInOut); return NA; @@ -3734,7 +3939,7 @@ SpvId SPIRVCodeGenerator::writeGlobalVar(ProgramKind kind, SpvId id = this->nextId(&type); fVariableMap.set(&var, id); - Layout layout = var.modifiers().fLayout; + Layout layout = var.layout(); if (layout.fSet < 0 && storageClass == SpvStorageClassUniformConstant) { layout.fSet = fProgram.fConfig->fSettings.fDefaultUniformSet; } @@ -3743,13 +3948,18 @@ SpvId SPIRVCodeGenerator::writeGlobalVar(ProgramKind kind, this->writeInstruction(SpvOpVariable, typeId, id, storageClass, fConstantBuffer); this->writeInstruction(SpvOpName, id, var.name(), fNameBuffer); this->writeLayout(layout, id, var.fPosition); - if (var.modifiers().fFlags & Modifiers::kFlat_Flag) { + if (var.modifierFlags() & ModifierFlag::kFlat) { this->writeInstruction(SpvOpDecorate, id, SpvDecorationFlat, fDecorationBuffer); } - if (var.modifiers().fFlags & Modifiers::kNoPerspective_Flag) { + if (var.modifierFlags() & ModifierFlag::kNoPerspective) { this->writeInstruction(SpvOpDecorate, id, SpvDecorationNoPerspective, fDecorationBuffer); } + if (var.modifierFlags().isWriteOnly()) { + this->writeInstruction(SpvOpDecorate, id, SpvDecorationNonReadable, fDecorationBuffer); + } else if (var.modifierFlags().isReadOnly()) { + this->writeInstruction(SpvOpDecorate, id, SpvDecorationNonWritable, fDecorationBuffer); + } return id; } @@ -4099,11 +4309,10 @@ SPIRVCodeGenerator::EntrypointAdapter SPIRVCodeGenerator::writeEntrypointAdapter Block::Kind::kBracedScope, symbolTable); // Declare an entrypoint function. EntrypointAdapter adapter; - adapter.fLayout = {}; - adapter.fModifiers = Modifiers{adapter.fLayout, Modifiers::kNo_Flag}; adapter.entrypointDecl = - std::make_unique(Position(), - &adapter.fModifiers, + std::make_unique(fContext, + Position(), + ModifierFlag::kNone, "_entrypoint", /*parameters=*/TArray{}, /*returnType=*/fContext.fTypes.fVoid.get(), @@ -4130,9 +4339,8 @@ void SPIRVCodeGenerator::writeUniformBuffer(std::shared_ptr topLeve for (const VarDeclaration* topLevelUniform : fTopLevelUniforms) { const Variable* var = topLevelUniform->var(); fTopLevelUniformMap.set(var, (int)fields.size()); - Modifiers modifiers = var->modifiers(); - modifiers.fFlags &= ~Modifiers::kUniform_Flag; - fields.emplace_back(var->fPosition, modifiers, var->name(), &var->type()); + ModifierFlags flags = var->modifierFlags() & ~ModifierFlag::kUniform; + fields.emplace_back(var->fPosition, var->layout(), flags, var->name(), &var->type()); } fUniformBuffer.fStruct = Type::MakeStructType(fContext, Position(), @@ -4144,17 +4352,16 @@ void SPIRVCodeGenerator::writeUniformBuffer(std::shared_ptr topLeve Layout layout; layout.fBinding = fProgram.fConfig->fSettings.fDefaultUniformBinding; layout.fSet = fProgram.fConfig->fSettings.fDefaultUniformSet; - Modifiers modifiers{layout, Modifiers::kUniform_Flag}; - - fUniformBuffer.fInnerVariable = std::make_unique( - /*pos=*/Position(), - /*modifiersPosition=*/Position(), - fContext.fModifiersPool->add(modifiers), - kUniformBufferName, - fUniformBuffer.fStruct.get(), - /*builtin=*/false, - Variable::Storage::kGlobal, - /*mangledName=*/""); + + fUniformBuffer.fInnerVariable = Variable::Make(/*pos=*/Position(), + /*modifiersPosition=*/Position(), + layout, + ModifierFlag::kUniform, + fUniformBuffer.fStruct.get(), + kUniformBufferName, + /*mangledName=*/"", + /*builtin=*/false, + Variable::Storage::kGlobal); // Create an interface block object for this global variable. fUniformBuffer.fInterfaceBlock = @@ -4180,15 +4387,15 @@ void SPIRVCodeGenerator::addRTFlipUniform(Position pos) { fContext.fErrors->error(pos, "RTFlipOffset is negative"); } fields.emplace_back(pos, - Modifiers(Layout(/*flags=*/0, - /*location=*/-1, - fProgram.fConfig->fSettings.fRTFlipOffset, - /*binding=*/-1, - /*index=*/-1, - /*set=*/-1, - /*builtin=*/-1, - /*inputAttachmentIndex=*/-1), - /*flags=*/0), + Layout(LayoutFlag::kNone, + /*location=*/-1, + fProgram.fConfig->fSettings.fRTFlipOffset, + /*binding=*/-1, + /*index=*/-1, + /*set=*/-1, + /*builtin=*/-1, + /*inputAttachmentIndex=*/-1), + ModifierFlag::kNone, SKSL_RTFLIP_NAME, fContext.fTypes.fFloat2.get()); std::string_view name = "sksl_synthetic_uniforms"; @@ -4206,30 +4413,24 @@ void SPIRVCodeGenerator::addRTFlipUniform(Position pos) { fContext.fErrors->error(pos, "layout(set=...) is required in SPIR-V"); } } - int flags = usePushConstants ? Layout::Flag::kPushConstant_Flag : 0; - const Modifiers* modsPtr; - { - AutoAttachPoolToThread attach(fProgram.fPool.get()); - Modifiers modifiers(Layout(flags, - /*location=*/-1, - /*offset=*/-1, - binding, - /*index=*/-1, - set, - /*builtin=*/-1, - /*inputAttachmentIndex=*/-1), - Modifiers::kUniform_Flag); - modsPtr = fContext.fModifiersPool->add(modifiers); - } - ExtendedVariable* intfVar = fSynthetics.takeOwnershipOfSymbol( - std::make_unique(/*pos=*/Position(), - /*modifiersPosition=*/Position(), - modsPtr, - name, - intfStruct, - /*builtin=*/false, - Variable::Storage::kGlobal, - /*mangledName=*/"")); + Layout layout(/*flags=*/usePushConstants ? LayoutFlag::kPushConstant : LayoutFlag::kNone, + /*location=*/-1, + /*offset=*/-1, + binding, + /*index=*/-1, + set, + /*builtin=*/-1, + /*inputAttachmentIndex=*/-1); + Variable* intfVar = + fSynthetics.takeOwnershipOfSymbol(Variable::Make(/*pos=*/Position(), + /*modifiersPosition=*/Position(), + layout, + ModifierFlag::kUniform, + intfStruct, + name, + /*mangledName=*/"", + /*builtin=*/false, + Variable::Storage::kGlobal)); fSPIRVBonusVariables.add(intfVar); { AutoAttachPoolToThread attach(fProgram.fPool.get()); @@ -4244,31 +4445,37 @@ std::tuple SPIRVCodeGenerator::synthesizeTextu SkASSERT(fProgram.fConfig->fSettings.fSPIRVDawnCompatMode); SkASSERT(combinedSampler.type().typeKind() == Type::TypeKind::kSampler); - const Modifiers& modifiers = combinedSampler.modifiers(); + const Layout& layout = combinedSampler.layout(); auto data = std::make_unique(); - Modifiers texModifiers = modifiers; - texModifiers.fLayout.fBinding = modifiers.fLayout.fTexture; + Layout texLayout = layout; + texLayout.fBinding = layout.fTexture; data->fTextureName = std::string(combinedSampler.name()) + "_texture"; - auto texture = std::make_unique(/*pos=*/Position(), - /*modifierPosition=*/Position(), - fContext.fModifiersPool->add(texModifiers), - data->fTextureName, - &combinedSampler.type().textureType(), - /*builtin=*/false, - Variable::Storage::kGlobal); - - Modifiers samplerModifiers = modifiers; - samplerModifiers.fLayout.fBinding = modifiers.fLayout.fSampler; + + auto texture = Variable::Make(/*pos=*/Position(), + /*modifiersPosition=*/Position(), + texLayout, + combinedSampler.modifierFlags(), + &combinedSampler.type().textureType(), + data->fTextureName, + /*mangledName=*/"", + /*builtin=*/false, + Variable::Storage::kGlobal); + + Layout samplerLayout = layout; + samplerLayout.fBinding = layout.fSampler; data->fSamplerName = std::string(combinedSampler.name()) + "_sampler"; - auto sampler = std::make_unique(/*pos=*/Position(), - /*modifierPosition=*/Position(), - fContext.fModifiersPool->add(samplerModifiers), - data->fSamplerName, - fContext.fTypes.fSampler.get(), - /*builtin=*/false, - Variable::Storage::kGlobal); + + auto sampler = Variable::Make(/*pos=*/Position(), + /*modifiersPosition=*/Position(), + samplerLayout, + combinedSampler.modifierFlags(), + fContext.fTypes.fSampler.get(), + data->fSamplerName, + /*mangledName=*/"", + /*builtin=*/false, + Variable::Storage::kGlobal); const Variable* t = texture.get(); const Variable* s = sampler.get(); @@ -4284,6 +4491,9 @@ void SPIRVCodeGenerator::writeInstructions(const Program& program, OutputStream& StringStream body; // Assign SpvIds to functions. const FunctionDeclaration* main = nullptr; + // During the same iteration, collect the local size values to assign if this is a compute + // program. Dimensions that are not present get assigned a value of 1. + int localSizeX = 1, localSizeY = 1, localSizeZ = 1; for (const ProgramElement* e : program.elements()) { if (e->is()) { const FunctionDefinition& funcDef = e->as(); @@ -4292,8 +4502,21 @@ void SPIRVCodeGenerator::writeInstructions(const Program& program, OutputStream& if (funcDecl.isMain()) { main = &funcDecl; } + } else if (ProgramConfig::IsCompute(program.fConfig->fKind) && + e->is()) { + const ModifiersDeclaration& modifiers = e->as(); + if (modifiers.layout().fLocalSizeX >= 0) { + localSizeX = modifiers.layout().fLocalSizeX; + } + if (modifiers.layout().fLocalSizeY >= 0) { + localSizeY = modifiers.layout().fLocalSizeY; + } + if (modifiers.layout().fLocalSizeZ >= 0) { + localSizeZ = modifiers.layout().fLocalSizeZ; + } } } + // Make sure we have a main() function. if (!main) { fContext.fErrors->error(Position(), "program does not contain a main() function"); @@ -4306,9 +4529,9 @@ void SPIRVCodeGenerator::writeInstructions(const Program& program, OutputStream& const InterfaceBlock& intf = e->as(); SpvId id = this->writeInterfaceBlock(intf); - const Modifiers& modifiers = intf.var()->modifiers(); - if ((modifiers.fFlags & (Modifiers::kIn_Flag | Modifiers::kOut_Flag)) && - modifiers.fLayout.fBuiltin == -1 && !this->isDead(*intf.var())) { + if ((intf.var()->modifierFlags() & (ModifierFlag::kIn | ModifierFlag::kOut)) && + intf.var()->layout().fBuiltin == -1 && + !this->isDead(*intf.var())) { interfaceVars.insert(id); } } @@ -4346,7 +4569,7 @@ void SPIRVCodeGenerator::writeInstructions(const Program& program, OutputStream& // Add global in/out variables to the list of interface variables. for (const auto& [var, spvId] : fVariableMap) { if (var->storage() == Variable::Storage::kGlobal && - (var->modifiers().fFlags & (Modifiers::kIn_Flag | Modifiers::kOut_Flag)) && + (var->modifierFlags() & (ModifierFlag::kIn | ModifierFlag::kOut)) && !this->isDead(*var)) { interfaceVars.insert(spvId); } @@ -4360,6 +4583,8 @@ void SPIRVCodeGenerator::writeInstructions(const Program& program, OutputStream& this->writeWord(SpvExecutionModelVertex, out); } else if (ProgramConfig::IsFragment(program.fConfig->fKind)) { this->writeWord(SpvExecutionModelFragment, out); + } else if (ProgramConfig::IsCompute(program.fConfig->fKind)) { + this->writeWord(SpvExecutionModelGLCompute, out); } else { SK_ABORT("cannot write this kind of program to SPIR-V\n"); } @@ -4374,6 +4599,12 @@ void SPIRVCodeGenerator::writeInstructions(const Program& program, OutputStream& fFunctionMap[main], SpvExecutionModeOriginUpperLeft, out); + } else if (ProgramConfig::IsCompute(program.fConfig->fKind)) { + this->writeInstruction(SpvOpExecutionMode, + fFunctionMap[main], + SpvExecutionModeLocalSize, + localSizeX, localSizeY, localSizeZ, + out); } for (const ProgramElement* e : program.elements()) { if (e->is()) { diff --git a/src/sksl/codegen/SkSLSPIRVCodeGenerator.h b/src/sksl/codegen/SkSLSPIRVCodeGenerator.h index 735c45bbfa57..4d8509b64f4e 100644 --- a/src/sksl/codegen/SkSLSPIRVCodeGenerator.h +++ b/src/sksl/codegen/SkSLSPIRVCodeGenerator.h @@ -18,8 +18,6 @@ #include "src/sksl/ir/SkSLFunctionDeclaration.h" #include "src/sksl/ir/SkSLFunctionDefinition.h" #include "src/sksl/ir/SkSLInterfaceBlock.h" -#include "src/sksl/ir/SkSLLayout.h" -#include "src/sksl/ir/SkSLModifiers.h" #include "src/sksl/ir/SkSLSymbolTable.h" #include "src/sksl/ir/SkSLType.h" #include "src/sksl/ir/SkSLVariable.h" @@ -51,6 +49,7 @@ class ForStatement; class FunctionCall; class IfStatement; class IndexExpression; +struct Layout; class Literal; class Operator; class OutputStream; @@ -96,6 +95,9 @@ class SPIRVCodeGenerator : public CodeGenerator { return false; } + // Returns the storage class of the lvalue. + virtual SpvStorageClass storageClass() const = 0; + virtual SpvId load(OutputStream& out) = 0; virtual void store(SpvId value, OutputStream& out) = 0; @@ -136,6 +138,15 @@ class SPIRVCodeGenerator : public CodeGenerator { kTexture_SpecialIntrinsic, kTextureGrad_SpecialIntrinsic, kTextureLod_SpecialIntrinsic, + kTextureRead_SpecialIntrinsic, + kTextureWrite_SpecialIntrinsic, + kTextureWidth_SpecialIntrinsic, + kTextureHeight_SpecialIntrinsic, + kAtomicAdd_SpecialIntrinsic, + kAtomicLoad_SpecialIntrinsic, + kAtomicStore_SpecialIntrinsic, + kStorageBarrier_SpecialIntrinsic, + kWorkgroupBarrier_SpecialIntrinsic, }; enum class Precision { @@ -236,6 +247,10 @@ class SPIRVCodeGenerator : public CodeGenerator { skia_private::TArray vectorize(const ExpressionArray& args, OutputStream& out); SpvId writeSpecialIntrinsic(const FunctionCall& c, SpecialIntrinsic kind, OutputStream& out); + SpvId writeAtomicIntrinsic(const FunctionCall& c, + SpecialIntrinsic kind, + SpvId resultId, + OutputStream& out); SpvId writeScalarToMatrixSplat(const Type& matrixType, SpvId scalarId, OutputStream& out); @@ -504,8 +519,6 @@ class SPIRVCodeGenerator : public CodeGenerator { struct EntrypointAdapter { std::unique_ptr entrypointDef; std::unique_ptr entrypointDecl; - Layout fLayout; - Modifiers fModifiers; }; EntrypointAdapter writeEntrypointAdapter(const FunctionDeclaration& main); diff --git a/src/sksl/codegen/SkSLVMCodeGenerator.cpp b/src/sksl/codegen/SkSLVMCodeGenerator.cpp deleted file mode 100644 index a008ad72449a..000000000000 --- a/src/sksl/codegen/SkSLVMCodeGenerator.cpp +++ /dev/null @@ -1,2307 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#include "include/core/SkTypes.h" -#include "src/sksl/codegen/SkSLVMCodeGenerator.h" - -#if defined(SK_ENABLE_SKVM) - -#include "include/core/SkBlendMode.h" -#include "include/core/SkColor.h" -#include "include/core/SkColorType.h" -#include "include/core/SkPoint.h" -#include "include/core/SkSpan.h" -#include "include/private/SkSLDefines.h" -#include "include/private/base/SkFloatingPoint.h" -#include "include/private/base/SkTArray.h" -#include "include/private/base/SkTPin.h" -#include "src/base/SkStringView.h" -#include "src/core/SkTHash.h" -#include "src/sksl/SkSLBuiltinTypes.h" -#include "src/sksl/SkSLCompiler.h" -#include "src/sksl/SkSLIntrinsicList.h" -#include "src/sksl/SkSLOperator.h" -#include "src/sksl/SkSLPosition.h" -#include "src/sksl/SkSLProgramSettings.h" -#include "src/sksl/ir/SkSLBinaryExpression.h" -#include "src/sksl/ir/SkSLBlock.h" -#include "src/sksl/ir/SkSLChildCall.h" -#include "src/sksl/ir/SkSLConstructor.h" -#include "src/sksl/ir/SkSLConstructorArrayCast.h" -#include "src/sksl/ir/SkSLConstructorDiagonalMatrix.h" -#include "src/sksl/ir/SkSLConstructorMatrixResize.h" -#include "src/sksl/ir/SkSLConstructorSplat.h" -#include "src/sksl/ir/SkSLExpression.h" -#include "src/sksl/ir/SkSLExpressionStatement.h" -#include "src/sksl/ir/SkSLFieldAccess.h" -#include "src/sksl/ir/SkSLForStatement.h" -#include "src/sksl/ir/SkSLFunctionCall.h" -#include "src/sksl/ir/SkSLFunctionDeclaration.h" -#include "src/sksl/ir/SkSLFunctionDefinition.h" -#include "src/sksl/ir/SkSLIRNode.h" -#include "src/sksl/ir/SkSLIfStatement.h" -#include "src/sksl/ir/SkSLIndexExpression.h" -#include "src/sksl/ir/SkSLLayout.h" -#include "src/sksl/ir/SkSLLiteral.h" -#include "src/sksl/ir/SkSLModifiers.h" -#include "src/sksl/ir/SkSLPostfixExpression.h" -#include "src/sksl/ir/SkSLPrefixExpression.h" -#include "src/sksl/ir/SkSLProgram.h" -#include "src/sksl/ir/SkSLProgramElement.h" -#include "src/sksl/ir/SkSLReturnStatement.h" -#include "src/sksl/ir/SkSLStatement.h" -#include "src/sksl/ir/SkSLSwitchCase.h" -#include "src/sksl/ir/SkSLSwitchStatement.h" -#include "src/sksl/ir/SkSLSwizzle.h" -#include "src/sksl/ir/SkSLTernaryExpression.h" -#include "src/sksl/ir/SkSLType.h" -#include "src/sksl/ir/SkSLVarDeclarations.h" -#include "src/sksl/ir/SkSLVariable.h" -#include "src/sksl/ir/SkSLVariableReference.h" -#include "src/sksl/tracing/SkSLDebugTracePriv.h" -#include "src/sksl/tracing/SkSLTraceHook.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace skia_private; - -namespace { - // sksl allows the optimizations of fast_mul(), so we want to use that most of the time. - // This little sneaky snippet of code lets us use ** as a fast multiply infix operator. - struct FastF32 { skvm::F32 val; }; - static FastF32 operator*(skvm::F32 y) { return {y}; } - static skvm::F32 operator*(skvm::F32 x, FastF32 y) { return fast_mul(x, y.val); } - static skvm::F32 operator*(float x, FastF32 y) { return fast_mul(x, y.val); } -} - -namespace SkSL { - -namespace { - -// Holds scalars, vectors, or matrices -struct Value { - Value() = default; - explicit Value(size_t slots) { - fVals.resize(slots); - } - Value(skvm::F32 x) : fVals({ x.id }) {} - Value(skvm::I32 x) : fVals({ x.id }) {} - - explicit operator bool() const { return !fVals.empty(); } - - size_t slots() const { return fVals.size(); } - - struct ValRef { - ValRef(skvm::Val& val) : fVal(val) {} - - ValRef& operator=(ValRef v) { fVal = v.fVal; return *this; } - ValRef& operator=(skvm::Val v) { fVal = v; return *this; } - ValRef& operator=(skvm::F32 v) { fVal = v.id; return *this; } - ValRef& operator=(skvm::I32 v) { fVal = v.id; return *this; } - - operator skvm::Val() { return fVal; } - - skvm::Val& fVal; - }; - - ValRef operator[](int i) { - // These redundant asserts work around what we think is a codegen bug in GCC 8.x for - // 32-bit x86 Debug builds. - SkASSERT(i < fVals.size()); - return fVals[i]; - } - skvm::Val operator[](int i) const { - // These redundant asserts work around what we think is a codegen bug in GCC 8.x for - // 32-bit x86 Debug builds. - SkASSERT(i < fVals.size()); - return fVals[i]; - } - - SkSpan asSpan() { return SkSpan(fVals); } - -private: - STArray<4, skvm::Val, true> fVals; -}; - -} // namespace - -class SkVMGenerator { -public: - SkVMGenerator(const Program& program, - skvm::Builder* builder, - DebugTracePriv* debugTrace, - SkVMCallbacks* callbacks); - - void writeProgram(SkSpan uniforms, - skvm::Coord device, - const FunctionDefinition& function, - SkSpan arguments, - SkSpan outReturn); - -private: - /** - * In SkSL, a Variable represents a named, typed value (along with qualifiers, etc). - * Every Variable is mapped to one (or several, contiguous) indices into our vector of - * skvm::Val. Those skvm::Val entries hold the current actual value of that variable. - * - * NOTE: Conceptually, each Variable is just mapped to a Value. We could implement it that way, - * (and eliminate the indirection), but it would add overhead for each Variable, - * and add additional (different) bookkeeping for things like lvalue-swizzles. - * - * Any time a variable appears in an expression, that's a VariableReference, which is a kind of - * Expression. Evaluating that VariableReference (or any other Expression) produces a Value, - * which is a set of skvm::Val. (This allows an Expression to produce a vector or matrix, in - * addition to a scalar). - * - * For a VariableReference, producing a Value is straightforward - we get the slot of the - * Variable (from fSlotMap), use that to look up the current skvm::Vals holding the variable's - * contents, and construct a Value with those ids. - */ - - /** Creates a Value from a collection of adjacent slots. */ - Value getSlotValue(size_t slot, size_t nslots); - - /** - * Returns the slot index of this function inside the FunctionDebugInfo array in DebugTracePriv. - * The FunctionDebugInfo slot will be created if it doesn't already exist. - */ - int getDebugFunctionInfo(const FunctionDeclaration& decl); - - /** Used by `createSlot` to add this variable to SlotDebugInfo inside the DebugTrace. */ - void addDebugSlotInfo(const std::string& varName, const Type& type, int line, - int fnReturnValue); - - void addDebugSlotInfoForGroup(const std::string& varName, const Type& type, int line, - int* groupIndex, int fnReturnValue); - - /** Used by `getSlot` to create a new slot on its first access. */ - size_t createSlot(const std::string& name, const Type& type, int line, int fnReturnValue); - - /** - * Returns the slot holding v's Val(s). Allocates storage if this is first time 'v' is - * referenced. Compound variables (e.g. vectors) will consume more than one slot, with - * getSlot returning the start of the contiguous chunk of slots. - */ - size_t getSlot(const Variable& v); - - /** - * Returns the slot holding fn's return value. Each call site is given a distinct slot, since - * multiple calls to the same function can occur in a single statement. This is generally the - * FunctionCall or ChildCall node, but main() doesn't have one of these so it uses the - * FunctionDefinition. Allocates storage if this is first time accessing the slot. - */ - size_t getFunctionSlot(const IRNode& callSite, const FunctionDefinition& fn); - - /** - * Writes a value to a slot previously created by getSlot. - */ - void writeToSlot(int slot, skvm::Val value); - - /** - * Returns the line number corresponding to a position. - */ - int getLine(Position pos); - - /** - * Emits a trace_line opcode. writeStatement does this, and statements that alter control flow - * may need to explicitly add additional traces. - */ - void emitTraceLine(int line); - - /** Emits a trace_scope opcode, which alters the SkSL variable-scope depth. */ - void emitTraceScope(skvm::I32 executionMask, int delta); - - /** Initializes uniforms and global variables at the start of main(). */ - void setupGlobals(SkSpan uniforms, skvm::Coord device); - - /** Emits an SkSL function. Returns the slot index of the SkSL function's return value. */ - size_t writeFunction(const IRNode& caller, - const FunctionDefinition& function, - SkSpan arguments); - - skvm::F32 f32(skvm::Val id) { SkASSERT(id != skvm::NA); return {fBuilder, id}; } - skvm::I32 i32(skvm::Val id) { SkASSERT(id != skvm::NA); return {fBuilder, id}; } - - // Shorthand for scalars - skvm::F32 f32(const Value& v) { SkASSERT(v.slots() == 1); return f32(v[0]); } - skvm::I32 i32(const Value& v) { SkASSERT(v.slots() == 1); return i32(v[0]); } - - template - Value unary(const Value& v, Fn&& fn) { - Value result(v.slots()); - for (size_t i = 0; i < v.slots(); ++i) { - result[i] = fn({fBuilder, v[i]}); - } - return result; - } - - skvm::I32 mask() { - // Mask off execution if we have encountered `break` or `continue` on this path. - skvm::I32 result = fConditionMask & fLoopMask; - if (!fFunctionStack.empty()) { - // As we encounter (possibly conditional) return statements, fReturned is updated to - // store the lanes that have already returned. For the remainder of the current - // function, those lanes should be disabled. - result = result & ~currentFunction().fReturned; - } - return result; - } - - size_t indexSlotOffset(const IndexExpression& expr); - - Value writeExpression(const Expression& expr); - Value writeBinaryExpression(const BinaryExpression& b); - Value writeAggregationConstructor(const AnyConstructor& c); - Value writeChildCall(const ChildCall& c); - Value writeConstructorDiagonalMatrix(const ConstructorDiagonalMatrix& c); - Value writeConstructorMatrixResize(const ConstructorMatrixResize& c); - Value writeConstructorCast(const AnyConstructor& c); - Value writeConstructorSplat(const ConstructorSplat& c); - Value writeFunctionCall(const FunctionCall& c); - Value writeFieldAccess(const FieldAccess& expr); - Value writeLiteral(const Literal& l); - Value writeIndexExpression(const IndexExpression& expr); - Value writeIntrinsicCall(const FunctionCall& c); - Value writePostfixExpression(const PostfixExpression& p); - Value writePrefixExpression(const PrefixExpression& p); - Value writeSwizzle(const Swizzle& swizzle); - Value writeTernaryExpression(const TernaryExpression& t); - Value writeVariableExpression(const VariableReference& expr); - - Value writeTypeConversion(const Value& src, Type::NumberKind srcKind, Type::NumberKind dstKind); - - void writeStatement(const Statement& s); - void writeBlock(const Block& b); - void writeBreakStatement(); - void writeContinueStatement(); - void writeForStatement(const ForStatement& f); - void writeIfStatement(const IfStatement& stmt); - void writeReturnStatement(const ReturnStatement& r); - void writeSwitchStatement(const SwitchStatement& s); - void writeVarDeclaration(const VarDeclaration& decl); - - Value writeStore(const Expression& lhs, const Value& rhs); - skvm::Val writeConditionalStore(skvm::Val lhs, skvm::Val rhs, skvm::I32 mask); - - Value writeMatrixInverse2x2(const Value& m); - Value writeMatrixInverse3x3(const Value& m); - Value writeMatrixInverse4x4(const Value& m); - - void recursiveBinaryCompare(const Value& lVal, const Type& lType, - const Value& rVal, const Type& rType, - size_t* slotOffset, Value* result, - const std::function & float_comp, - const std::function & int_comp); - - void determineLineOffsets(); - - // - // Global state for the lifetime of the generator: - // - const Program& fProgram; - skvm::Builder* fBuilder; - DebugTracePriv* fDebugTrace; - int fTraceHookID = -1; - SkVMCallbacks* fCallbacks; - // contains the position of each newline in the source, plus a zero at the beginning and the - // total source length at the end as sentinels - std::vector fLineOffsets; - - struct Slot { - skvm::Val val; - bool writtenTo = false; - }; - std::vector fSlots; - - // [Variable/Function, first slot in fSlots] - THashMap fSlotMap; - - // Debug trace mask (set to true when fTraceCoord matches device coordinates) - skvm::I32 fTraceMask; - - // Conditional execution mask (managed by ScopedCondition, and tied to control-flow scopes) - skvm::I32 fConditionMask; - - // Similar: loop execution masks. Each loop starts with all lanes active (fLoopMask). - // 'break' disables a lane in fLoopMask until the loop finishes - // 'continue' disables a lane in fLoopMask, and sets fContinueMask to be re-enabled on the next - // iteration - skvm::I32 fLoopMask; - skvm::I32 fContinueMask; - - // `fInsideCompoundStatement` will be nonzero if we are currently writing statements inside of a - // compound-statement Block. (Conceptually those statements should all count as one.) - int fInsideCompoundStatement = 0; - - // - // State that's local to the generation of a single function: - // - struct Function { - size_t fReturnSlot; - skvm::I32 fReturned; - }; - std::vector fFunctionStack; - Function& currentFunction() { return fFunctionStack.back(); } - - class ScopedCondition { - public: - ScopedCondition(SkVMGenerator* generator, skvm::I32 mask) - : fGenerator(generator), fOldConditionMask(fGenerator->fConditionMask) { - fGenerator->fConditionMask &= mask; - } - - ~ScopedCondition() { fGenerator->fConditionMask = fOldConditionMask; } - - private: - SkVMGenerator* fGenerator; - skvm::I32 fOldConditionMask; - }; -}; - -static Type::NumberKind base_number_kind(const Type& type) { - if (type.typeKind() == Type::TypeKind::kMatrix || type.typeKind() == Type::TypeKind::kVector) { - return base_number_kind(type.componentType()); - } - return type.numberKind(); -} - -static inline bool is_uniform(const SkSL::Variable& var) { - return var.modifiers().fFlags & Modifiers::kUniform_Flag; -} - -SkVMGenerator::SkVMGenerator(const Program& program, - skvm::Builder* builder, - DebugTracePriv* debugTrace, - SkVMCallbacks* callbacks) - : fProgram(program) - , fBuilder(builder) - , fDebugTrace(debugTrace) - , fCallbacks(callbacks) {} - -void SkVMGenerator::writeProgram(SkSpan uniforms, - skvm::Coord device, - const FunctionDefinition& function, - SkSpan arguments, - SkSpan outReturn) { - this->determineLineOffsets(); - fConditionMask = fLoopMask = fBuilder->splat(0xffff'ffff); - - this->setupGlobals(uniforms, device); - size_t returnSlot = this->writeFunction(function, function, arguments); - - // Copy the value from the return slot into outReturn. - SkASSERT(function.declaration().returnType().slotCount() == outReturn.size()); - for (size_t i = 0; i < outReturn.size(); ++i) { - outReturn[i] = fSlots[returnSlot + i].val; - } -} - -void SkVMGenerator::determineLineOffsets() { - SkASSERT(fLineOffsets.empty()); - fLineOffsets.push_back(0); - for (size_t i = 0; i < fProgram.fSource->length(); ++i) { - if ((*fProgram.fSource)[i] == '\n') { - fLineOffsets.push_back(i); - } - } - fLineOffsets.push_back(fProgram.fSource->length()); -} - -void SkVMGenerator::setupGlobals(SkSpan uniforms, skvm::Coord device) { - if (fDebugTrace) { - // Copy the program source into the debug info so that it will be written in the trace file. - fDebugTrace->setSource(*fProgram.fSource); - - // Create a trace hook and attach it to the builder. - fDebugTrace->fTraceHook = SkSL::Tracer::Make(&fDebugTrace->fTraceInfo); - fTraceHookID = fBuilder->attachTraceHook(fDebugTrace->fTraceHook.get()); - - // The SkVM blitter generates centered pixel coordinates. (0.5, 1.5, 2.5, 3.5, etc.) - // Add 0.5 to the requested trace coordinate to match this. - skvm::Coord traceCoord = {to_F32(fBuilder->splat(fDebugTrace->fTraceCoord.fX)) + 0.5f, - to_F32(fBuilder->splat(fDebugTrace->fTraceCoord.fY)) + 0.5f}; - - // If we are debugging, we need to create a trace mask. This will be true when the current - // device coordinates match the requested trace coordinates. We calculate each mask - // individually to guarantee consistent order-of-evaluation. - skvm::I32 xMask = (device.x == traceCoord.x), - yMask = (device.y == traceCoord.y); - fTraceMask = xMask & yMask; - } - - // Add storage for each global variable (including uniforms) to fSlots, and entries in - // fSlotMap to remember where every variable is stored. - const skvm::Val* uniformIter = uniforms.begin(); - size_t fpCount = 0; - for (const ProgramElement* e : fProgram.elements()) { - if (e->is()) { - const GlobalVarDeclaration& gvd = e->as(); - const VarDeclaration& decl = gvd.varDeclaration(); - const Variable* var = decl.var(); - SkASSERT(!fSlotMap.find(var)); - - // For most variables, fSlotMap stores an index into fSlots, but for children, - // fSlotMap stores the index to pass to fSample(Shader|ColorFilter|Blender) - if (var->type().isEffectChild()) { - fSlotMap.set(var, fpCount++); - continue; - } - - // Opaque types include child processors and GL objects (samplers, textures, etc). - // Of those, only child processors are legal variables. - SkASSERT(!var->type().isVoid()); - SkASSERT(!var->type().isOpaque()); - - // getSlot() allocates space for the variable's value in fSlots, initializes it to zero, - // and populates fSlotMap. - size_t slot = this->getSlot(*var), - nslots = var->type().slotCount(); - - // builtin variables are system-defined, with special semantics. The only builtin - // variable exposed to runtime effects is sk_FragCoord. - if (int builtin = var->modifiers().fLayout.fBuiltin; builtin >= 0) { - switch (builtin) { - case SK_FRAGCOORD_BUILTIN: - SkASSERT(nslots == 4); - this->writeToSlot(slot + 0, device.x.id); - this->writeToSlot(slot + 1, device.y.id); - this->writeToSlot(slot + 2, fBuilder->splat(0.0f).id); - this->writeToSlot(slot + 3, fBuilder->splat(1.0f).id); - break; - default: - SkDEBUGFAILF("Unsupported builtin %d", builtin); - } - continue; - } - - // For uniforms, copy the supplied IDs over - if (is_uniform(*var)) { - SkASSERT(uniformIter + nslots <= uniforms.end()); - for (size_t i = 0; i < nslots; ++i) { - this->writeToSlot(slot + i, uniformIter[i]); - } - uniformIter += nslots; - continue; - } - - // For other globals, populate with the initializer expression (if there is one) - if (decl.value()) { - Value val = this->writeExpression(*decl.value()); - for (size_t i = 0; i < nslots; ++i) { - this->writeToSlot(slot + i, val[i]); - } - } - } - } - SkASSERT(uniformIter == uniforms.end()); -} - -Value SkVMGenerator::getSlotValue(size_t slot, size_t nslots) { - Value val(nslots); - for (size_t i = 0; i < nslots; ++i) { - val[i] = fSlots[slot + i].val; - } - return val; -} - -int SkVMGenerator::getDebugFunctionInfo(const FunctionDeclaration& decl) { - SkASSERT(fDebugTrace); - - std::string name = decl.description(); - - // When generating the debug trace, we typically mark every function as `noinline`. This makes - // the trace more confusing, since this isn't in the source program, so remove it. - static constexpr std::string_view kNoInline = "noinline "; - if (skstd::starts_with(name, kNoInline)) { - name = name.substr(kNoInline.size()); - } - - // Look for a matching FunctionDebugInfo slot. - for (size_t index = 0; index < fDebugTrace->fFuncInfo.size(); ++index) { - if (fDebugTrace->fFuncInfo[index].name == name) { - return index; - } - } - - // We've never called this function before; create a new slot to hold its information. - int slot = (int)fDebugTrace->fFuncInfo.size(); - fDebugTrace->fFuncInfo.push_back(FunctionDebugInfo{std::move(name)}); - return slot; -} - -size_t SkVMGenerator::writeFunction(const IRNode& caller, - const FunctionDefinition& function, - SkSpan arguments) { - const FunctionDeclaration& decl = function.declaration(); - - int funcIndex = -1; - if (fDebugTrace) { - funcIndex = this->getDebugFunctionInfo(decl); - fBuilder->trace_enter(fTraceHookID, this->mask(), fTraceMask, funcIndex); - } - - size_t returnSlot = this->getFunctionSlot(caller, function); - fFunctionStack.push_back({/*fReturnSlot=*/returnSlot, /*fReturned=*/fBuilder->splat(0)}); - - // For all parameters, copy incoming argument IDs to our vector of (all) variable IDs - size_t argIdx = 0; - for (const Variable* p : decl.parameters()) { - size_t paramSlot = this->getSlot(*p), - nslots = p->type().slotCount(); - - for (size_t i = 0; i < nslots; ++i) { - fSlots[paramSlot + i].writtenTo = false; - this->writeToSlot(paramSlot + i, arguments[argIdx + i]); - } - argIdx += nslots; - } - SkASSERT(argIdx == arguments.size()); - - this->writeBlock(function.body()->as()); - - // Copy 'out' and 'inout' parameters back to their caller-supplied argument storage - argIdx = 0; - for (const Variable* p : decl.parameters()) { - size_t nslots = p->type().slotCount(); - - if (p->modifiers().fFlags & Modifiers::kOut_Flag) { - size_t paramSlot = this->getSlot(*p); - for (size_t i = 0; i < nslots; ++i) { - arguments[argIdx + i] = fSlots[paramSlot + i].val; - } - } - argIdx += nslots; - } - SkASSERT(argIdx == arguments.size()); - - fFunctionStack.pop_back(); - - if (fDebugTrace) { - fBuilder->trace_exit(fTraceHookID, this->mask(), fTraceMask, funcIndex); - } - - return returnSlot; -} - -void SkVMGenerator::writeToSlot(int slot, skvm::Val value) { - if (fDebugTrace && (!fSlots[slot].writtenTo || fSlots[slot].val != value)) { - if (fProgram.fConfig->fSettings.fAllowTraceVarInDebugTrace) { - fBuilder->trace_var(fTraceHookID, this->mask(), fTraceMask, slot, i32(value)); - } - fSlots[slot].writtenTo = true; - } - - fSlots[slot].val = value; -} - -void SkVMGenerator::addDebugSlotInfoForGroup(const std::string& varName, const Type& type, int line, - int* groupIndex, int fnReturnValue) { - SkASSERT(fDebugTrace); - switch (type.typeKind()) { - case Type::TypeKind::kArray: { - int nslots = type.columns(); - const Type& elemType = type.componentType(); - for (int slot = 0; slot < nslots; ++slot) { - this->addDebugSlotInfoForGroup(varName + "[" + std::to_string(slot) + "]", elemType, - line, groupIndex, fnReturnValue); - } - break; - } - case Type::TypeKind::kStruct: { - for (const Field& field : type.fields()) { - this->addDebugSlotInfoForGroup(varName + "." + std::string(field.fName), - *field.fType, line, groupIndex, fnReturnValue); - } - break; - } - default: - SkASSERTF(0, "unsupported slot type %d", (int)type.typeKind()); - [[fallthrough]]; - - case Type::TypeKind::kScalar: - case Type::TypeKind::kVector: - case Type::TypeKind::kMatrix: { - Type::NumberKind numberKind = type.componentType().numberKind(); - int nslots = type.slotCount(); - - for (int slot = 0; slot < nslots; ++slot) { - SlotDebugInfo slotInfo; - slotInfo.name = varName; - slotInfo.columns = type.columns(); - slotInfo.rows = type.rows(); - slotInfo.componentIndex = slot; - slotInfo.groupIndex = (*groupIndex)++; - slotInfo.numberKind = numberKind; - slotInfo.line = line; - slotInfo.fnReturnValue = fnReturnValue; - fDebugTrace->fSlotInfo.push_back(std::move(slotInfo)); - } - break; - } - } -} - -void SkVMGenerator::addDebugSlotInfo(const std::string& varName, const Type& type, int line, - int fnReturnValue) { - int groupIndex = 0; - this->addDebugSlotInfoForGroup(varName, type, line, &groupIndex, fnReturnValue); - SkASSERT((size_t)groupIndex == type.slotCount()); -} - -size_t SkVMGenerator::createSlot(const std::string& name, - const Type& type, - int line, - int fnReturnValue) { - size_t slot = fSlots.size(), - nslots = type.slotCount(); - - if (nslots > 0) { - if (fDebugTrace) { - // Our debug slot-info table should have the same length as the actual slot table. - SkASSERT(fDebugTrace->fSlotInfo.size() == slot); - - // Append slot names and types to our debug slot-info table. - fDebugTrace->fSlotInfo.reserve(slot + nslots); - this->addDebugSlotInfo(name, type, line, fnReturnValue); - - // Confirm that we added the expected number of slots. - SkASSERT(fDebugTrace->fSlotInfo.size() == (slot + nslots)); - } - - // Create brand new slots initialized to zero. - skvm::Val initialValue = fBuilder->splat(0.0f).id; - fSlots.insert(fSlots.end(), nslots, Slot{initialValue}); - } - return slot; -} - -// TODO(skia:13058): remove this and track positions directly -int SkVMGenerator::getLine(Position pos) { - if (pos.valid()) { - // Binary search within fLineOffets to find the line. - SkASSERT(fLineOffsets.size() >= 2); - SkASSERT(fLineOffsets[0] == 0); - SkASSERT(fLineOffsets.back() == (int)fProgram.fSource->length()); - return std::distance(fLineOffsets.begin(), std::upper_bound(fLineOffsets.begin(), - fLineOffsets.end(), pos.startOffset())); - } else { - return -1; - } -} - -size_t SkVMGenerator::getSlot(const Variable& v) { - size_t* entry = fSlotMap.find(&v); - if (entry != nullptr) { - return *entry; - } - - size_t slot = this->createSlot(std::string(v.name()), v.type(), this->getLine(v.fPosition), - /*fnReturnValue=*/-1); - fSlotMap.set(&v, slot); - return slot; -} - -size_t SkVMGenerator::getFunctionSlot(const IRNode& callSite, const FunctionDefinition& fn) { - size_t* entry = fSlotMap.find(&callSite); - if (entry != nullptr) { - return *entry; - } - - const FunctionDeclaration& decl = fn.declaration(); - size_t slot = this->createSlot("[" + std::string(decl.name()) + "].result", - decl.returnType(), - this->getLine(fn.fPosition), - /*fnReturnValue=*/1); - fSlotMap.set(&callSite, slot); - return slot; -} - -void SkVMGenerator::recursiveBinaryCompare( - const Value& lVal, - const Type& lType, - const Value& rVal, - const Type& rType, - size_t* slotOffset, - Value* result, - const std::function& float_comp, - const std::function& int_comp) { - switch (lType.typeKind()) { - case Type::TypeKind::kStruct: - SkASSERT(rType.typeKind() == Type::TypeKind::kStruct); - // Go through all the fields - for (size_t f = 0; f < lType.fields().size(); ++f) { - const Field& lField = lType.fields()[f]; - const Field& rField = rType.fields()[f]; - this->recursiveBinaryCompare(lVal, - *lField.fType, - rVal, - *rField.fType, - slotOffset, - result, - float_comp, - int_comp); - } - break; - - case Type::TypeKind::kArray: - case Type::TypeKind::kVector: - case Type::TypeKind::kMatrix: - SkASSERT(lType.typeKind() == rType.typeKind()); - // Go through all the elements - for (int c = 0; c < lType.columns(); ++c) { - this->recursiveBinaryCompare(lVal, - lType.componentType(), - rVal, - rType.componentType(), - slotOffset, - result, - float_comp, - int_comp); - } - break; - default: - SkASSERT(lType.typeKind() == rType.typeKind() && - lType.slotCount() == rType.slotCount()); - Type::NumberKind nk = base_number_kind(lType); - auto L = lVal[*slotOffset]; - auto R = rVal[*slotOffset]; - (*result)[*slotOffset] = - i32(nk == Type::NumberKind::kFloat - ? float_comp(f32(L), f32(R)) - : int_comp(i32(L), i32(R))).id; - *slotOffset += lType.slotCount(); - break; - } -} - -Value SkVMGenerator::writeBinaryExpression(const BinaryExpression& b) { - const Expression& left = *b.left(); - const Expression& right = *b.right(); - Operator op = b.getOperator(); - if (op.kind() == Operator::Kind::EQ) { - return this->writeStore(left, this->writeExpression(right)); - } - - const Type& lType = left.type(); - const Type& rType = right.type(); - bool lVecOrMtx = (lType.isVector() || lType.isMatrix()); - bool rVecOrMtx = (rType.isVector() || rType.isMatrix()); - bool isAssignment = op.isAssignment(); - if (isAssignment) { - op = op.removeAssignment(); - } - Type::NumberKind nk = base_number_kind(lType); - - // A few ops require special treatment: - switch (op.kind()) { - case Operator::Kind::LOGICALAND: { - SkASSERT(!isAssignment); - SkASSERT(nk == Type::NumberKind::kBoolean); - skvm::I32 lVal = i32(this->writeExpression(left)); - ScopedCondition shortCircuit(this, lVal); - skvm::I32 rVal = i32(this->writeExpression(right)); - return lVal & rVal; - } - case Operator::Kind::LOGICALOR: { - SkASSERT(!isAssignment); - SkASSERT(nk == Type::NumberKind::kBoolean); - skvm::I32 lVal = i32(this->writeExpression(left)); - ScopedCondition shortCircuit(this, ~lVal); - skvm::I32 rVal = i32(this->writeExpression(right)); - return lVal | rVal; - } - case Operator::Kind::COMMA: - // We write the left side of the expression to preserve its side effects, even though we - // immediately discard the result. - this->writeExpression(left); - return this->writeExpression(right); - default: - break; - } - - // All of the other ops always evaluate both sides of the expression - Value lVal = this->writeExpression(left), - rVal = this->writeExpression(right); - - // Special case for M*V, V*M, M*M (but not V*V!) - if (op.kind() == Operator::Kind::STAR - && lVecOrMtx && rVecOrMtx && !(lType.isVector() && rType.isVector())) { - int rCols = rType.columns(), - rRows = rType.rows(), - lCols = lType.columns(), - lRows = lType.rows(); - // M*V treats the vector as a column - if (rType.isVector()) { - std::swap(rCols, rRows); - } - SkASSERT(lCols == rRows); - SkASSERT(b.type().slotCount() == static_cast(lRows * rCols)); - Value result(lRows * rCols); - size_t resultIdx = 0; - const skvm::F32 zero = fBuilder->splat(0.0f); - for (int c = 0; c < rCols; ++c) - for (int r = 0; r < lRows; ++r) { - skvm::F32 sum = zero; - for (int j = 0; j < lCols; ++j) { - sum += f32(lVal[j*lRows + r]) * f32(rVal[c*rRows + j]); - } - result[resultIdx++] = sum; - } - SkASSERT(resultIdx == result.slots()); - return isAssignment ? this->writeStore(left, result) : result; - } - - size_t nslots = std::max(lVal.slots(), rVal.slots()); - - auto binary = [&](const std::function & f_fn, - const std::function & i_fn, - bool foldResults = false) -> Value { - - Value result(nslots); - if (op.isEquality() && (lType.isStruct() || lType.isArray())) { - // Shifting over lVal and rVal - size_t slotOffset = 0; - this->recursiveBinaryCompare( - lVal, lType, rVal, rType, &slotOffset, &result, f_fn, i_fn); - SkASSERT(slotOffset == nslots); - } else { - for (size_t slot = 0; slot < nslots; ++slot) { - // If one side is scalar, replicate it to all channels - skvm::Val L = lVal.slots() == 1 ? lVal[0] : lVal[slot], - R = rVal.slots() == 1 ? rVal[0] : rVal[slot]; - - if (nk == Type::NumberKind::kFloat) { - result[slot] = i32(f_fn(f32(L), f32(R))); - } else { - result[slot] = i32(i_fn(i32(L), i32(R))); - } - } - } - - if (foldResults && nslots > 1) { - SkASSERT(op.isEquality()); - skvm::I32 folded = i32(result[0]); - for (size_t i = 1; i < nslots; ++i) { - if (op.kind() == Operator::Kind::NEQ) { - folded |= i32(result[i]); - } else { - folded &= i32(result[i]); - } - } - return folded; - } - - return isAssignment ? this->writeStore(left, result) : result; - }; - - auto unsupported_f = [&](skvm::F32, skvm::F32) { - SkDEBUGFAIL("Unsupported operator"); - return skvm::F32{}; - }; - - switch (op.kind()) { - case Operator::Kind::EQEQ: - SkASSERT(!isAssignment); - return binary([](skvm::F32 x, skvm::F32 y) { return x == y; }, - [](skvm::I32 x, skvm::I32 y) { return x == y; }, /*foldResults=*/ true); - case Operator::Kind::NEQ: - SkASSERT(!isAssignment); - return binary([](skvm::F32 x, skvm::F32 y) { return x != y; }, - [](skvm::I32 x, skvm::I32 y) { return x != y; }, /*foldResults=*/ true); - case Operator::Kind::GT: - return binary([](skvm::F32 x, skvm::F32 y) { return x > y; }, - [](skvm::I32 x, skvm::I32 y) { return x > y; }); - case Operator::Kind::GTEQ: - return binary([](skvm::F32 x, skvm::F32 y) { return x >= y; }, - [](skvm::I32 x, skvm::I32 y) { return x >= y; }); - case Operator::Kind::LT: - return binary([](skvm::F32 x, skvm::F32 y) { return x < y; }, - [](skvm::I32 x, skvm::I32 y) { return x < y; }); - case Operator::Kind::LTEQ: - return binary([](skvm::F32 x, skvm::F32 y) { return x <= y; }, - [](skvm::I32 x, skvm::I32 y) { return x <= y; }); - - case Operator::Kind::PLUS: - return binary([](skvm::F32 x, skvm::F32 y) { return x + y; }, - [](skvm::I32 x, skvm::I32 y) { return x + y; }); - case Operator::Kind::MINUS: - return binary([](skvm::F32 x, skvm::F32 y) { return x - y; }, - [](skvm::I32 x, skvm::I32 y) { return x - y; }); - case Operator::Kind::STAR: - return binary([](skvm::F32 x, skvm::F32 y) { return x ** y; }, - [](skvm::I32 x, skvm::I32 y) { return x * y; }); - case Operator::Kind::SLASH: - // Minimum spec (GLSL ES 1.0) has very loose requirements for integer operations. - // (Low-end GPUs may not have integer ALUs). Given that, we are allowed to do floating - // point division plus rounding. Section 10.28 of the spec even clarifies that the - // rounding mode is undefined (but round-towards-zero is the obvious/common choice). - return binary([](skvm::F32 x, skvm::F32 y) { return x / y; }, - [](skvm::I32 x, skvm::I32 y) { - return skvm::trunc(skvm::to_F32(x) / skvm::to_F32(y)); - }); - - case Operator::Kind::BITWISEXOR: - case Operator::Kind::LOGICALXOR: - return binary(unsupported_f, [](skvm::I32 x, skvm::I32 y) { return x ^ y; }); - case Operator::Kind::BITWISEAND: - return binary(unsupported_f, [](skvm::I32 x, skvm::I32 y) { return x & y; }); - case Operator::Kind::BITWISEOR: - return binary(unsupported_f, [](skvm::I32 x, skvm::I32 y) { return x | y; }); - - // These three operators are all 'reserved' (illegal) in our minimum spec, but will require - // implementation in the future. - case Operator::Kind::PERCENT: - case Operator::Kind::SHL: - case Operator::Kind::SHR: - default: - SkDEBUGFAIL("Unsupported operator"); - return {}; - } -} - -Value SkVMGenerator::writeAggregationConstructor(const AnyConstructor& c) { - Value result(c.type().slotCount()); - size_t resultIdx = 0; - for (const auto &arg : c.argumentSpan()) { - Value tmp = this->writeExpression(*arg); - for (size_t tmpSlot = 0; tmpSlot < tmp.slots(); ++tmpSlot) { - result[resultIdx++] = tmp[tmpSlot]; - } - } - return result; -} - -Value SkVMGenerator::writeTypeConversion(const Value& src, - Type::NumberKind srcKind, - Type::NumberKind dstKind) { - // Conversion among "similar" types (floatN <-> halfN), (shortN <-> intN), etc. is a no-op. - if (srcKind == dstKind) { - return src; - } - - // TODO: Handle signed vs. unsigned. GLSL ES 1.0 only has 'int', so no problem yet. - Value dst(src.slots()); - switch (dstKind) { - case Type::NumberKind::kFloat: - if (srcKind == Type::NumberKind::kSigned) { - // int -> float - for (size_t i = 0; i < src.slots(); ++i) { - dst[i] = skvm::to_F32(i32(src[i])); - } - return dst; - } - if (srcKind == Type::NumberKind::kBoolean) { - // bool -> float - for (size_t i = 0; i < src.slots(); ++i) { - dst[i] = skvm::select(i32(src[i]), 1.0f, 0.0f); - } - return dst; - } - break; - - case Type::NumberKind::kSigned: - if (srcKind == Type::NumberKind::kFloat) { - // float -> int - for (size_t i = 0; i < src.slots(); ++i) { - dst[i] = skvm::trunc(f32(src[i])); - } - return dst; - } - if (srcKind == Type::NumberKind::kBoolean) { - // bool -> int - for (size_t i = 0; i < src.slots(); ++i) { - dst[i] = skvm::select(i32(src[i]), 1, 0); - } - return dst; - } - break; - - case Type::NumberKind::kBoolean: - if (srcKind == Type::NumberKind::kSigned) { - // int -> bool - for (size_t i = 0; i < src.slots(); ++i) { - dst[i] = i32(src[i]) != 0; - } - return dst; - } - if (srcKind == Type::NumberKind::kFloat) { - // float -> bool - for (size_t i = 0; i < src.slots(); ++i) { - dst[i] = f32(src[i]) != 0.0; - } - return dst; - } - break; - - default: - break; - } - SkDEBUGFAILF("Unsupported type conversion: %d -> %d", (int)srcKind, (int)dstKind); - return {}; -} - -Value SkVMGenerator::writeConstructorCast(const AnyConstructor& c) { - auto arguments = c.argumentSpan(); - SkASSERT(arguments.size() == 1); - const Expression& argument = *arguments.front(); - - const Type& srcType = argument.type(); - const Type& dstType = c.type(); - Type::NumberKind srcKind = base_number_kind(srcType); - Type::NumberKind dstKind = base_number_kind(dstType); - Value src = this->writeExpression(argument); - return this->writeTypeConversion(src, srcKind, dstKind); -} - -Value SkVMGenerator::writeConstructorSplat(const ConstructorSplat& c) { - SkASSERT(c.type().isVector()); - SkASSERT(c.argument()->type().isScalar()); - int columns = c.type().columns(); - - // Splat the argument across all components of a vector. - Value src = this->writeExpression(*c.argument()); - Value dst(columns); - for (int i = 0; i < columns; ++i) { - dst[i] = src[0]; - } - return dst; -} - -Value SkVMGenerator::writeConstructorDiagonalMatrix(const ConstructorDiagonalMatrix& ctor) { - const Type& dstType = ctor.type(); - SkASSERT(dstType.isMatrix()); - SkASSERT(ctor.argument()->type().matches(dstType.componentType())); - - Value src = this->writeExpression(*ctor.argument()); - Value dst(dstType.rows() * dstType.columns()); - size_t dstIndex = 0; - - // Matrix-from-scalar builds a diagonal scale matrix - const skvm::F32 zero = fBuilder->splat(0.0f); - for (int c = 0; c < dstType.columns(); ++c) { - for (int r = 0; r < dstType.rows(); ++r) { - dst[dstIndex++] = (c == r ? f32(src) : zero); - } - } - - SkASSERT(dstIndex == dst.slots()); - return dst; -} - -Value SkVMGenerator::writeConstructorMatrixResize(const ConstructorMatrixResize& ctor) { - const Type& srcType = ctor.argument()->type(); - const Type& dstType = ctor.type(); - Value src = this->writeExpression(*ctor.argument()); - Value dst(dstType.rows() * dstType.columns()); - - // Matrix-from-matrix uses src where it overlaps, and fills in missing fields with identity. - size_t dstIndex = 0; - for (int c = 0; c < dstType.columns(); ++c) { - for (int r = 0; r < dstType.rows(); ++r) { - if (c < srcType.columns() && r < srcType.rows()) { - dst[dstIndex++] = src[c * srcType.rows() + r]; - } else { - dst[dstIndex++] = fBuilder->splat(c == r ? 1.0f : 0.0f); - } - } - } - - SkASSERT(dstIndex == dst.slots()); - return dst; -} - -Value SkVMGenerator::writeFieldAccess(const FieldAccess& expr) { - Value base = this->writeExpression(*expr.base()); - Value field(expr.type().slotCount()); - size_t offset = expr.initialSlot(); - for (size_t i = 0; i < field.slots(); ++i) { - field[i] = base[offset + i]; - } - return field; -} - -size_t SkVMGenerator::indexSlotOffset(const IndexExpression& expr) { - Value index = this->writeExpression(*expr.index()); - int indexValue = -1; - SkAssertResult(fBuilder->allImm(index[0], &indexValue)); - - // When indexing by a literal, the front-end guarantees that we don't go out of bounds. - // But when indexing by a loop variable, it's possible to generate out-of-bounds access. - // The GLSL spec leaves that behavior undefined - we'll just clamp everything here. - indexValue = SkTPin(indexValue, 0, expr.base()->type().columns() - 1); - - size_t stride = expr.type().slotCount(); - return indexValue * stride; -} - -Value SkVMGenerator::writeIndexExpression(const IndexExpression& expr) { - Value base = this->writeExpression(*expr.base()); - Value element(expr.type().slotCount()); - size_t offset = this->indexSlotOffset(expr); - for (size_t i = 0; i < element.slots(); ++i) { - element[i] = base[offset + i]; - } - return element; -} - -Value SkVMGenerator::writeVariableExpression(const VariableReference& expr) { - size_t slot = this->getSlot(*expr.variable()); - return this->getSlotValue(slot, expr.type().slotCount()); -} - -Value SkVMGenerator::writeMatrixInverse2x2(const Value& m) { - SkASSERT(m.slots() == 4); - skvm::F32 a = f32(m[0]), - b = f32(m[1]), - c = f32(m[2]), - d = f32(m[3]); - skvm::F32 idet = 1.0f / (a*d - b*c); - - Value result(m.slots()); - result[0] = ( d ** idet); - result[1] = (-b ** idet); - result[2] = (-c ** idet); - result[3] = ( a ** idet); - return result; -} - -Value SkVMGenerator::writeMatrixInverse3x3(const Value& m) { - SkASSERT(m.slots() == 9); - skvm::F32 a11 = f32(m[0]), a12 = f32(m[3]), a13 = f32(m[6]), - a21 = f32(m[1]), a22 = f32(m[4]), a23 = f32(m[7]), - a31 = f32(m[2]), a32 = f32(m[5]), a33 = f32(m[8]); - skvm::F32 idet = 1.0f / (a11*a22*a33 + a12*a23*a31 + a13*a21*a32 - - a11*a23*a32 - a12*a21*a33 - a13*a22*a31); - - Value result(m.slots()); - result[0] = ((a22**a33 - a23**a32) ** idet); - result[1] = ((a23**a31 - a21**a33) ** idet); - result[2] = ((a21**a32 - a22**a31) ** idet); - result[3] = ((a13**a32 - a12**a33) ** idet); - result[4] = ((a11**a33 - a13**a31) ** idet); - result[5] = ((a12**a31 - a11**a32) ** idet); - result[6] = ((a12**a23 - a13**a22) ** idet); - result[7] = ((a13**a21 - a11**a23) ** idet); - result[8] = ((a11**a22 - a12**a21) ** idet); - return result; -} - -Value SkVMGenerator::writeMatrixInverse4x4(const Value& m) { - SkASSERT(m.slots() == 16); - skvm::F32 a00 = f32(m[0]), a10 = f32(m[4]), a20 = f32(m[ 8]), a30 = f32(m[12]), - a01 = f32(m[1]), a11 = f32(m[5]), a21 = f32(m[ 9]), a31 = f32(m[13]), - a02 = f32(m[2]), a12 = f32(m[6]), a22 = f32(m[10]), a32 = f32(m[14]), - a03 = f32(m[3]), a13 = f32(m[7]), a23 = f32(m[11]), a33 = f32(m[15]); - - skvm::F32 b00 = a00**a11 - a01**a10, - b01 = a00**a12 - a02**a10, - b02 = a00**a13 - a03**a10, - b03 = a01**a12 - a02**a11, - b04 = a01**a13 - a03**a11, - b05 = a02**a13 - a03**a12, - b06 = a20**a31 - a21**a30, - b07 = a20**a32 - a22**a30, - b08 = a20**a33 - a23**a30, - b09 = a21**a32 - a22**a31, - b10 = a21**a33 - a23**a31, - b11 = a22**a33 - a23**a32; - - skvm::F32 idet = 1.0f / (b00**b11 - b01**b10 + b02**b09 + b03**b08 - b04**b07 + b05**b06); - - b00 *= idet; - b01 *= idet; - b02 *= idet; - b03 *= idet; - b04 *= idet; - b05 *= idet; - b06 *= idet; - b07 *= idet; - b08 *= idet; - b09 *= idet; - b10 *= idet; - b11 *= idet; - - Value result(m.slots()); - result[ 0] = (a11*b11 - a12*b10 + a13*b09); - result[ 1] = (a02*b10 - a01*b11 - a03*b09); - result[ 2] = (a31*b05 - a32*b04 + a33*b03); - result[ 3] = (a22*b04 - a21*b05 - a23*b03); - result[ 4] = (a12*b08 - a10*b11 - a13*b07); - result[ 5] = (a00*b11 - a02*b08 + a03*b07); - result[ 6] = (a32*b02 - a30*b05 - a33*b01); - result[ 7] = (a20*b05 - a22*b02 + a23*b01); - result[ 8] = (a10*b10 - a11*b08 + a13*b06); - result[ 9] = (a01*b08 - a00*b10 - a03*b06); - result[10] = (a30*b04 - a31*b02 + a33*b00); - result[11] = (a21*b02 - a20*b04 - a23*b00); - result[12] = (a11*b07 - a10*b09 - a12*b06); - result[13] = (a00*b09 - a01*b07 + a02*b06); - result[14] = (a31*b01 - a30*b03 - a32*b00); - result[15] = (a20*b03 - a21*b01 + a22*b00); - return result; -} - -Value SkVMGenerator::writeChildCall(const ChildCall& c) { - size_t* childPtr = fSlotMap.find(&c.child()); - SkASSERT(childPtr != nullptr); - - const Expression* arg = c.arguments()[0].get(); - Value argVal = this->writeExpression(*arg); - skvm::Color color; - - switch (c.child().type().typeKind()) { - case Type::TypeKind::kShader: { - SkASSERT(c.arguments().size() == 1); - SkASSERT(arg->type().matches(*fProgram.fContext->fTypes.fFloat2)); - skvm::Coord coord = {f32(argVal[0]), f32(argVal[1])}; - color = fCallbacks->sampleShader(*childPtr, coord); - break; - } - case Type::TypeKind::kColorFilter: { - SkASSERT(c.arguments().size() == 1); - SkASSERT(arg->type().matches(*fProgram.fContext->fTypes.fHalf4) || - arg->type().matches(*fProgram.fContext->fTypes.fFloat4)); - skvm::Color inColor = {f32(argVal[0]), f32(argVal[1]), f32(argVal[2]), f32(argVal[3])}; - color = fCallbacks->sampleColorFilter(*childPtr, inColor); - break; - } - case Type::TypeKind::kBlender: { - SkASSERT(c.arguments().size() == 2); - SkASSERT(arg->type().matches(*fProgram.fContext->fTypes.fHalf4) || - arg->type().matches(*fProgram.fContext->fTypes.fFloat4)); - skvm::Color srcColor = {f32(argVal[0]), f32(argVal[1]), f32(argVal[2]), f32(argVal[3])}; - - arg = c.arguments()[1].get(); - argVal = this->writeExpression(*arg); - SkASSERT(arg->type().matches(*fProgram.fContext->fTypes.fHalf4) || - arg->type().matches(*fProgram.fContext->fTypes.fFloat4)); - skvm::Color dstColor = {f32(argVal[0]), f32(argVal[1]), f32(argVal[2]), f32(argVal[3])}; - - color = fCallbacks->sampleBlender(*childPtr, srcColor, dstColor); - break; - } - default: { - SkDEBUGFAILF("cannot sample from type '%s'", c.child().type().description().c_str()); - } - } - - Value result(4); - result[0] = color.r; - result[1] = color.g; - result[2] = color.b; - result[3] = color.a; - return result; -} - -Value SkVMGenerator::writeIntrinsicCall(const FunctionCall& c) { - IntrinsicKind intrinsicKind = c.function().intrinsicKind(); - SkASSERT(intrinsicKind != kNotIntrinsic); - - const size_t nargs = c.arguments().size(); - const size_t kMaxArgs = 3; // eg: clamp, mix, smoothstep - Value args[kMaxArgs]; - SkASSERT(nargs >= 1 && nargs <= std::size(args)); - - // All other intrinsics have at most three args, and those can all be evaluated up front: - for (size_t i = 0; i < nargs; ++i) { - args[i] = this->writeExpression(*c.arguments()[i]); - } - Type::NumberKind nk = base_number_kind(c.arguments()[0]->type()); - - auto binary = [&](auto&& fn) { - // Binary intrinsics are (vecN, vecN), (vecN, float), or (float, vecN) - size_t nslots = std::max(args[0].slots(), args[1].slots()); - Value result(nslots); - SkASSERT(args[0].slots() == nslots || args[0].slots() == 1); - SkASSERT(args[1].slots() == nslots || args[1].slots() == 1); - - for (size_t i = 0; i < nslots; ++i) { - result[i] = fn({fBuilder, args[0][args[0].slots() == 1 ? 0 : i]}, - {fBuilder, args[1][args[1].slots() == 1 ? 0 : i]}); - } - return result; - }; - - auto ternary = [&](auto&& fn) { - // Ternary intrinsics are some combination of vecN and float - size_t nslots = std::max({args[0].slots(), args[1].slots(), args[2].slots()}); - Value result(nslots); - SkASSERT(args[0].slots() == nslots || args[0].slots() == 1); - SkASSERT(args[1].slots() == nslots || args[1].slots() == 1); - SkASSERT(args[2].slots() == nslots || args[2].slots() == 1); - - for (size_t i = 0; i < nslots; ++i) { - result[i] = fn({fBuilder, args[0][args[0].slots() == 1 ? 0 : i]}, - {fBuilder, args[1][args[1].slots() == 1 ? 0 : i]}, - {fBuilder, args[2][args[2].slots() == 1 ? 0 : i]}); - } - return result; - }; - - auto dot = [&](const Value& x, const Value& y) { - SkASSERT(x.slots() == y.slots()); - skvm::F32 result = f32(x[0]) * f32(y[0]); - for (size_t i = 1; i < x.slots(); ++i) { - result += f32(x[i]) * f32(y[i]); - } - return result; - }; - - switch (intrinsicKind) { - case k_radians_IntrinsicKind: - return unary(args[0], [](skvm::F32 deg) { return deg * (SK_FloatPI / 180); }); - case k_degrees_IntrinsicKind: - return unary(args[0], [](skvm::F32 rad) { return rad * (180 / SK_FloatPI); }); - - case k_sin_IntrinsicKind: return unary(args[0], skvm::approx_sin); - case k_cos_IntrinsicKind: return unary(args[0], skvm::approx_cos); - case k_tan_IntrinsicKind: return unary(args[0], skvm::approx_tan); - - case k_asin_IntrinsicKind: return unary(args[0], skvm::approx_asin); - case k_acos_IntrinsicKind: return unary(args[0], skvm::approx_acos); - - case k_atan_IntrinsicKind: return nargs == 1 ? unary(args[0], skvm::approx_atan) - : binary(skvm::approx_atan2); - - case k_pow_IntrinsicKind: - return binary([](skvm::F32 x, skvm::F32 y) { return skvm::approx_powf(x, y); }); - case k_exp_IntrinsicKind: return unary(args[0], skvm::approx_exp); - case k_log_IntrinsicKind: return unary(args[0], skvm::approx_log); - case k_exp2_IntrinsicKind: return unary(args[0], skvm::approx_pow2); - case k_log2_IntrinsicKind: return unary(args[0], skvm::approx_log2); - - case k_sqrt_IntrinsicKind: return unary(args[0], skvm::sqrt); - case k_inversesqrt_IntrinsicKind: - return unary(args[0], [](skvm::F32 x) { return 1.0f / skvm::sqrt(x); }); - - case k_abs_IntrinsicKind: return unary(args[0], skvm::abs); - case k_sign_IntrinsicKind: - return unary(args[0], [](skvm::F32 x) { return select(x < 0, -1.0f, - select(x > 0, +1.0f, 0.0f)); }); - case k_floor_IntrinsicKind: return unary(args[0], skvm::floor); - case k_ceil_IntrinsicKind: return unary(args[0], skvm::ceil); - case k_fract_IntrinsicKind: return unary(args[0], skvm::fract); - case k_mod_IntrinsicKind: - return binary([](skvm::F32 x, skvm::F32 y) { return x - y*skvm::floor(x / y); }); - - case k_min_IntrinsicKind: - return binary([](skvm::F32 x, skvm::F32 y) { return skvm::min(x, y); }); - case k_max_IntrinsicKind: - return binary([](skvm::F32 x, skvm::F32 y) { return skvm::max(x, y); }); - case k_clamp_IntrinsicKind: - return ternary( - [](skvm::F32 x, skvm::F32 lo, skvm::F32 hi) { return skvm::clamp(x, lo, hi); }); - case k_saturate_IntrinsicKind: - return unary(args[0], [](skvm::F32 x) { return skvm::clamp01(x); }); - case k_mix_IntrinsicKind: - return ternary( - [](skvm::F32 x, skvm::F32 y, skvm::F32 t) { return skvm::lerp(x, y, t); }); - case k_step_IntrinsicKind: - return binary([](skvm::F32 edge, skvm::F32 x) { return select(x < edge, 0.0f, 1.0f); }); - case k_smoothstep_IntrinsicKind: - return ternary([](skvm::F32 edge0, skvm::F32 edge1, skvm::F32 x) { - skvm::F32 t = skvm::clamp01((x - edge0) / (edge1 - edge0)); - return t ** t ** (3 - 2 ** t); - }); - - case k_length_IntrinsicKind: return skvm::sqrt(dot(args[0], args[0])); - case k_distance_IntrinsicKind: { - Value vec = binary([](skvm::F32 x, skvm::F32 y) { return x - y; }); - return skvm::sqrt(dot(vec, vec)); - } - case k_dot_IntrinsicKind: return dot(args[0], args[1]); - case k_cross_IntrinsicKind: { - skvm::F32 ax = f32(args[0][0]), ay = f32(args[0][1]), az = f32(args[0][2]), - bx = f32(args[1][0]), by = f32(args[1][1]), bz = f32(args[1][2]); - Value result(3); - result[0] = ay**bz - az**by; - result[1] = az**bx - ax**bz; - result[2] = ax**by - ay**bx; - return result; - } - case k_normalize_IntrinsicKind: { - skvm::F32 invLen = 1.0f / skvm::sqrt(dot(args[0], args[0])); - return unary(args[0], [&](skvm::F32 x) { return x ** invLen; }); - } - case k_faceforward_IntrinsicKind: { - const Value &N = args[0], - &I = args[1], - &Nref = args[2]; - - skvm::F32 dotNrefI = dot(Nref, I); - return unary(N, [&](skvm::F32 n) { return select(dotNrefI<0, n, -n); }); - } - case k_reflect_IntrinsicKind: { - const Value &I = args[0], - &N = args[1]; - - skvm::F32 dotNI = dot(N, I); - return binary([&](skvm::F32 i, skvm::F32 n) { - return i - 2**dotNI**n; - }); - } - case k_refract_IntrinsicKind: { - const Value &I = args[0], - &N = args[1]; - skvm::F32 eta = f32(args[2]); - - skvm::F32 dotNI = dot(N, I), - k = 1 - eta**eta**(1 - dotNI**dotNI); - return binary([&](skvm::F32 i, skvm::F32 n) { - return select(k<0, 0.0f, eta**i - (eta**dotNI + sqrt(k))**n); - }); - } - - case k_matrixCompMult_IntrinsicKind: - return binary([](skvm::F32 x, skvm::F32 y) { return x ** y; }); - case k_inverse_IntrinsicKind: { - switch (args[0].slots()) { - case 4: return this->writeMatrixInverse2x2(args[0]); - case 9: return this->writeMatrixInverse3x3(args[0]); - case 16: return this->writeMatrixInverse4x4(args[0]); - default: - SkDEBUGFAIL("Invalid call to inverse"); - return {}; - } - } - - case k_lessThan_IntrinsicKind: - return nk == Type::NumberKind::kFloat - ? binary([](skvm::F32 x, skvm::F32 y) { return x < y; }) - : binary([](skvm::I32 x, skvm::I32 y) { return x < y; }); - case k_lessThanEqual_IntrinsicKind: - return nk == Type::NumberKind::kFloat - ? binary([](skvm::F32 x, skvm::F32 y) { return x <= y; }) - : binary([](skvm::I32 x, skvm::I32 y) { return x <= y; }); - case k_greaterThan_IntrinsicKind: - return nk == Type::NumberKind::kFloat - ? binary([](skvm::F32 x, skvm::F32 y) { return x > y; }) - : binary([](skvm::I32 x, skvm::I32 y) { return x > y; }); - case k_greaterThanEqual_IntrinsicKind: - return nk == Type::NumberKind::kFloat - ? binary([](skvm::F32 x, skvm::F32 y) { return x >= y; }) - : binary([](skvm::I32 x, skvm::I32 y) { return x >= y; }); - - case k_equal_IntrinsicKind: - return nk == Type::NumberKind::kFloat - ? binary([](skvm::F32 x, skvm::F32 y) { return x == y; }) - : binary([](skvm::I32 x, skvm::I32 y) { return x == y; }); - case k_notEqual_IntrinsicKind: - return nk == Type::NumberKind::kFloat - ? binary([](skvm::F32 x, skvm::F32 y) { return x != y; }) - : binary([](skvm::I32 x, skvm::I32 y) { return x != y; }); - - case k_any_IntrinsicKind: { - skvm::I32 result = i32(args[0][0]); - for (size_t i = 1; i < args[0].slots(); ++i) { - result |= i32(args[0][i]); - } - return result; - } - case k_all_IntrinsicKind: { - skvm::I32 result = i32(args[0][0]); - for (size_t i = 1; i < args[0].slots(); ++i) { - result &= i32(args[0][i]); - } - return result; - } - case k_not_IntrinsicKind: return unary(args[0], [](skvm::I32 x) { return ~x; }); - - case k_toLinearSrgb_IntrinsicKind: { - skvm::Color color = { - f32(args[0][0]), f32(args[0][1]), f32(args[0][2]), fBuilder->splat(1.0f)}; - color = fCallbacks->toLinearSrgb(color); - Value result(3); - result[0] = color.r; - result[1] = color.g; - result[2] = color.b; - return result; - } - case k_fromLinearSrgb_IntrinsicKind: { - skvm::Color color = { - f32(args[0][0]), f32(args[0][1]), f32(args[0][2]), fBuilder->splat(1.0f)}; - color = fCallbacks->fromLinearSrgb(color); - Value result(3); - result[0] = color.r; - result[1] = color.g; - result[2] = color.b; - return result; - } - - default: - SkDEBUGFAILF("unsupported intrinsic %s", c.function().description().c_str()); - return {}; - } - SkUNREACHABLE; -} - -Value SkVMGenerator::writeFunctionCall(const FunctionCall& call) { - if (call.function().isIntrinsic() && !call.function().definition()) { - return this->writeIntrinsicCall(call); - } - - const FunctionDeclaration& decl = call.function(); - SkASSERTF(decl.definition(), "no definition for function '%s'", decl.description().c_str()); - const FunctionDefinition& funcDef = *decl.definition(); - - // Evaluate all arguments, gather the results into a contiguous list of IDs - std::vector argVals; - for (const auto& arg : call.arguments()) { - Value v = this->writeExpression(*arg); - for (size_t i = 0; i < v.slots(); ++i) { - argVals.push_back(v[i]); - } - } - - size_t returnSlot; - { - // This merges currentFunction().fReturned into fConditionMask. Lanes that conditionally - // returned in the current function would otherwise resume execution within the child. - ScopedCondition m(this, ~currentFunction().fReturned); - returnSlot = this->writeFunction(call, funcDef, SkSpan(argVals)); - } - - // Propagate new values of any 'out' params back to the original arguments - const std::unique_ptr* argIter = call.arguments().begin(); - size_t valIdx = 0; - for (const Variable* p : decl.parameters()) { - size_t nslots = p->type().slotCount(); - if (p->modifiers().fFlags & Modifiers::kOut_Flag) { - Value v(nslots); - for (size_t i = 0; i < nslots; ++i) { - v[i] = argVals[valIdx + i]; - } - const std::unique_ptr& arg = *argIter; - this->writeStore(*arg, v); - } - valIdx += nslots; - argIter++; - } - - // Create a result Value from the return slot - return this->getSlotValue(returnSlot, call.type().slotCount()); -} - -Value SkVMGenerator::writeLiteral(const Literal& l) { - if (l.type().isFloat()) { - return fBuilder->splat(l.as().floatValue()); - } - if (l.type().isInteger()) { - return fBuilder->splat(static_cast(l.as().intValue())); - } - SkASSERT(l.type().isBoolean()); - return fBuilder->splat(l.as().boolValue() ? ~0 : 0); -} - -Value SkVMGenerator::writePrefixExpression(const PrefixExpression& p) { - Value val = this->writeExpression(*p.operand()); - - switch (p.getOperator().kind()) { - case Operator::Kind::PLUSPLUS: - case Operator::Kind::MINUSMINUS: { - bool incr = p.getOperator().kind() == Operator::Kind::PLUSPLUS; - - switch (base_number_kind(p.type())) { - case Type::NumberKind::kFloat: - val = f32(val) + fBuilder->splat(incr ? 1.0f : -1.0f); - break; - case Type::NumberKind::kSigned: - val = i32(val) + fBuilder->splat(incr ? 1 : -1); - break; - default: - SkASSERT(false); - return {}; - } - return this->writeStore(*p.operand(), val); - } - case Operator::Kind::MINUS: { - switch (base_number_kind(p.type())) { - case Type::NumberKind::kFloat: - return this->unary(val, [](skvm::F32 x) { return -x; }); - case Type::NumberKind::kSigned: - return this->unary(val, [](skvm::I32 x) { return -x; }); - default: - SkASSERT(false); - return {}; - } - } - case Operator::Kind::LOGICALNOT: - case Operator::Kind::BITWISENOT: - return this->unary(val, [](skvm::I32 x) { return ~x; }); - default: - SkASSERT(false); - return {}; - } -} - -Value SkVMGenerator::writePostfixExpression(const PostfixExpression& p) { - switch (p.getOperator().kind()) { - case Operator::Kind::PLUSPLUS: - case Operator::Kind::MINUSMINUS: { - Value old = this->writeExpression(*p.operand()), - val = old; - SkASSERT(val.slots() == 1); - bool incr = p.getOperator().kind() == Operator::Kind::PLUSPLUS; - - switch (base_number_kind(p.type())) { - case Type::NumberKind::kFloat: - val = f32(val) + fBuilder->splat(incr ? 1.0f : -1.0f); - break; - case Type::NumberKind::kSigned: - val = i32(val) + fBuilder->splat(incr ? 1 : -1); - break; - default: - SkASSERT(false); - return {}; - } - this->writeStore(*p.operand(), val); - return old; - } - default: - SkASSERT(false); - return {}; - } -} - -Value SkVMGenerator::writeSwizzle(const Swizzle& s) { - Value base = this->writeExpression(*s.base()); - Value swizzled(s.components().size()); - for (int i = 0; i < s.components().size(); ++i) { - swizzled[i] = base[s.components()[i]]; - } - return swizzled; -} - -Value SkVMGenerator::writeTernaryExpression(const TernaryExpression& t) { - skvm::I32 test = i32(this->writeExpression(*t.test())); - Value ifTrue, ifFalse; - - { - ScopedCondition m(this, test); - ifTrue = this->writeExpression(*t.ifTrue()); - } - { - ScopedCondition m(this, ~test); - ifFalse = this->writeExpression(*t.ifFalse()); - } - - size_t nslots = ifTrue.slots(); - SkASSERT(nslots == ifFalse.slots()); - - Value result(nslots); - for (size_t i = 0; i < nslots; ++i) { - result[i] = skvm::select(test, i32(ifTrue[i]), i32(ifFalse[i])); - } - return result; -} - -Value SkVMGenerator::writeExpression(const Expression& e) { - switch (e.kind()) { - case Expression::Kind::kBinary: - return this->writeBinaryExpression(e.as()); - case Expression::Kind::kChildCall: - return this->writeChildCall(e.as()); - case Expression::Kind::kConstructorArray: - case Expression::Kind::kConstructorCompound: - case Expression::Kind::kConstructorStruct: - return this->writeAggregationConstructor(e.asAnyConstructor()); - case Expression::Kind::kConstructorArrayCast: - return this->writeExpression(*e.as().argument()); - case Expression::Kind::kConstructorDiagonalMatrix: - return this->writeConstructorDiagonalMatrix(e.as()); - case Expression::Kind::kConstructorMatrixResize: - return this->writeConstructorMatrixResize(e.as()); - case Expression::Kind::kConstructorScalarCast: - case Expression::Kind::kConstructorCompoundCast: - return this->writeConstructorCast(e.asAnyConstructor()); - case Expression::Kind::kConstructorSplat: - return this->writeConstructorSplat(e.as()); - case Expression::Kind::kFieldAccess: - return this->writeFieldAccess(e.as()); - case Expression::Kind::kIndex: - return this->writeIndexExpression(e.as()); - case Expression::Kind::kVariableReference: - return this->writeVariableExpression(e.as()); - case Expression::Kind::kLiteral: - return this->writeLiteral(e.as()); - case Expression::Kind::kFunctionCall: - return this->writeFunctionCall(e.as()); - case Expression::Kind::kPrefix: - return this->writePrefixExpression(e.as()); - case Expression::Kind::kPostfix: - return this->writePostfixExpression(e.as()); - case Expression::Kind::kSwizzle: - return this->writeSwizzle(e.as()); - case Expression::Kind::kTernary: - return this->writeTernaryExpression(e.as()); - default: - SkDEBUGFAIL("Unsupported expression"); - return {}; - } -} - -Value SkVMGenerator::writeStore(const Expression& lhs, const Value& rhs) { - SkASSERTF(rhs.slots() == lhs.type().slotCount(), - "lhs=%s (%s)\nrhs=%zu slot", - lhs.type().description().c_str(), lhs.description().c_str(), rhs.slots()); - - // We need to figure out the collection of slots that we're storing into. The l-value (lhs) - // is always a VariableReference, possibly wrapped by one or more Swizzle, FieldAccess, or - // IndexExpressions. The underlying VariableReference has a range of slots for its storage, - // and each expression wrapped around that selects a sub-set of those slots (Field/Index), - // or rearranges them (Swizzle). - STArray<4, size_t, true> slots; - slots.resize(rhs.slots()); - - // Start with the identity slot map - this basically says that the values from rhs belong in - // slots [0, 1, 2 ... N] of the lhs. - for (int i = 0; i < slots.size(); ++i) { - slots[i] = i; - } - - // Now, as we peel off each outer expression, adjust 'slots' to be the locations relative to - // the next (inner) expression: - const Expression* expr = &lhs; - while (!expr->is()) { - switch (expr->kind()) { - case Expression::Kind::kFieldAccess: { - const FieldAccess& fld = expr->as(); - size_t offset = fld.initialSlot(); - for (size_t& s : slots) { - s += offset; - } - expr = fld.base().get(); - } break; - case Expression::Kind::kIndex: { - const IndexExpression& idx = expr->as(); - size_t offset = this->indexSlotOffset(idx); - for (size_t& s : slots) { - s += offset; - } - expr = idx.base().get(); - } break; - case Expression::Kind::kSwizzle: { - const Swizzle& swz = expr->as(); - for (size_t& s : slots) { - s = swz.components()[s]; - } - expr = swz.base().get(); - } break; - default: - // No other kinds of expressions are valid in lvalues. (see Analysis::IsAssignable) - SkDEBUGFAIL("Invalid expression type"); - return {}; - } - } - - // When we get here, 'slots' are all relative to the first slot holding 'var's storage - const Variable& var = *expr->as().variable(); - size_t varSlot = this->getSlot(var); - for (size_t& slot : slots) { - SkASSERT(slot < var.type().slotCount()); - slot += varSlot; - } - - // `slots` are now absolute indices into `fSlots`. - skvm::I32 mask = this->mask(); - for (size_t i = 0; i < rhs.slots(); ++i) { - int slotNum = slots[i]; - skvm::Val conditionalStore = this->writeConditionalStore(fSlots[slotNum].val, rhs[i], mask); - this->writeToSlot(slotNum, conditionalStore); - } - - return rhs; -} - -skvm::Val SkVMGenerator::writeConditionalStore(skvm::Val lhs, skvm::Val rhs, skvm::I32 mask) { - return select(mask, f32(rhs), f32(lhs)).id; -} - -void SkVMGenerator::writeBlock(const Block& b) { - skvm::I32 mask = this->mask(); - if (b.blockKind() == Block::Kind::kCompoundStatement) { - this->emitTraceLine(this->getLine(b.fPosition)); - ++fInsideCompoundStatement; - } else { - this->emitTraceScope(mask, +1); - } - - for (const std::unique_ptr& stmt : b.children()) { - this->writeStatement(*stmt); - } - - if (b.blockKind() == Block::Kind::kCompoundStatement) { - --fInsideCompoundStatement; - } else { - this->emitTraceScope(mask, -1); - } -} - -void SkVMGenerator::writeBreakStatement() { - // Any active lanes stop executing for the duration of the current loop - fLoopMask &= ~this->mask(); -} - -void SkVMGenerator::writeContinueStatement() { - // Any active lanes stop executing for the current iteration. - // Remember them in fContinueMask, to be re-enabled later. - skvm::I32 mask = this->mask(); - fLoopMask &= ~mask; - fContinueMask |= mask; -} - -void SkVMGenerator::writeForStatement(const ForStatement& f) { - // We require that all loops be ES2-compliant (unrollable), and actually unroll them here - SkASSERT(f.unrollInfo()); - const LoopUnrollInfo& loop = *f.unrollInfo(); - SkASSERT(loop.fIndex->type().slotCount() == 1); - - size_t indexSlot = this->getSlot(*loop.fIndex); - double val = loop.fStart; - - const skvm::I32 zero = fBuilder->splat(0); - skvm::I32 oldLoopMask = fLoopMask, - oldContinueMask = fContinueMask; - - const Type::NumberKind indexKind = base_number_kind(loop.fIndex->type()); - - // We want the loop index to disappear at the end of the loop, so wrap the for statement in a - // trace scope. - if (loop.fCount > 0) { - int line = this->getLine(f.test() ? f.test()->fPosition : f.fPosition); - skvm::I32 mask = this->mask(); - this->emitTraceScope(mask, +1); - - for (int i = 0; i < loop.fCount; ++i) { - this->writeToSlot(indexSlot, (indexKind == Type::NumberKind::kFloat) - ? fBuilder->splat(static_cast(val)).id - : fBuilder->splat(static_cast(val)).id); - - fContinueMask = zero; - this->writeStatement(*f.statement()); - fLoopMask |= fContinueMask; - - this->emitTraceLine(line); - val += loop.fDelta; - } - - this->emitTraceScope(mask, -1); - } - - fLoopMask = oldLoopMask; - fContinueMask = oldContinueMask; -} - -void SkVMGenerator::writeIfStatement(const IfStatement& i) { - Value test = this->writeExpression(*i.test()); - { - ScopedCondition ifTrue(this, i32(test)); - this->writeStatement(*i.ifTrue()); - } - if (i.ifFalse()) { - ScopedCondition ifFalse(this, ~i32(test)); - this->writeStatement(*i.ifFalse()); - } -} - -void SkVMGenerator::writeReturnStatement(const ReturnStatement& r) { - skvm::I32 returnsHere = this->mask(); - - if (r.expression()) { - Value val = this->writeExpression(*r.expression()); - - size_t slot = currentFunction().fReturnSlot; - size_t nslots = r.expression()->type().slotCount(); - for (size_t i = 0; i < nslots; ++i) { - fSlots[slot + i].writtenTo = false; - skvm::Val conditionalStore = this->writeConditionalStore(fSlots[slot + i].val, val[i], - returnsHere); - this->writeToSlot(slot + i, conditionalStore); - } - } - - currentFunction().fReturned |= returnsHere; -} - -void SkVMGenerator::writeSwitchStatement(const SwitchStatement& s) { - skvm::I32 falseValue = fBuilder->splat( 0); - skvm::I32 trueValue = fBuilder->splat(~0); - - // Create a "switchFallthough" scratch variable, initialized to false. - skvm::I32 switchFallthrough = falseValue; - - // Loop masks behave just like for statements. When a break is encountered, it masks off all - // lanes for the rest of the body of the switch. - skvm::I32 oldLoopMask = fLoopMask; - Value switchValue = this->writeExpression(*s.value()); - - for (const std::unique_ptr& stmt : s.cases()) { - const SwitchCase& c = stmt->as(); - if (!c.isDefault()) { - Value caseValue = fBuilder->splat((int) c.value()); - - // We want to execute this switch case if we're falling through from a previous case, or - // if the case value matches. - ScopedCondition conditionalCaseBlock( - this, - switchFallthrough | (i32(caseValue) == i32(switchValue))); - this->writeStatement(*c.statement()); - - // If we are inside the case block, we set the fallthrough flag to true (`break` still - // works to stop the flow of execution regardless, since it zeroes out the loop-mask). - switchFallthrough.id = this->writeConditionalStore(switchFallthrough.id, trueValue.id, - this->mask()); - } else { - // This is the default case. Since it's always last, we can just dump in the code. - this->writeStatement(*c.statement()); - } - } - - // Restore state. - fLoopMask = oldLoopMask; -} - -void SkVMGenerator::writeVarDeclaration(const VarDeclaration& decl) { - size_t slot = this->getSlot(*decl.var()), - nslots = decl.var()->type().slotCount(); - - Value val = decl.value() ? this->writeExpression(*decl.value()) : Value{}; - for (size_t i = 0; i < nslots; ++i) { - fSlots[slot + i].writtenTo = false; - this->writeToSlot(slot + i, val ? val[i] : fBuilder->splat(0.0f).id); - } -} - -void SkVMGenerator::emitTraceLine(int line) { - if (fDebugTrace && line > 0 && fInsideCompoundStatement == 0) { - fBuilder->trace_line(fTraceHookID, this->mask(), fTraceMask, line); - } -} - -void SkVMGenerator::emitTraceScope(skvm::I32 executionMask, int delta) { - if (fDebugTrace) { - fBuilder->trace_scope(fTraceHookID, executionMask, fTraceMask, delta); - } -} - -void SkVMGenerator::writeStatement(const Statement& s) { - // The debugger should stop on all types of statements, except for Blocks. - if (!s.is()) { - this->emitTraceLine(this->getLine(s.fPosition)); - } - - switch (s.kind()) { - case Statement::Kind::kBlock: - this->writeBlock(s.as()); - break; - case Statement::Kind::kBreak: - this->writeBreakStatement(); - break; - case Statement::Kind::kContinue: - this->writeContinueStatement(); - break; - case Statement::Kind::kExpression: - this->writeExpression(*s.as().expression()); - break; - case Statement::Kind::kFor: - this->writeForStatement(s.as()); - break; - case Statement::Kind::kIf: - this->writeIfStatement(s.as()); - break; - case Statement::Kind::kReturn: - this->writeReturnStatement(s.as()); - break; - case Statement::Kind::kSwitch: - this->writeSwitchStatement(s.as()); - break; - case Statement::Kind::kVarDeclaration: - this->writeVarDeclaration(s.as()); - break; - case Statement::Kind::kDiscard: - case Statement::Kind::kDo: - SkDEBUGFAIL("Unsupported control flow"); - break; - case Statement::Kind::kNop: - break; - default: - SkDEBUGFAIL("Unrecognized statement"); - break; - } -} - -skvm::Color ProgramToSkVM(const Program& program, - const FunctionDefinition& function, - skvm::Builder* builder, - DebugTracePriv* debugTrace, - SkSpan uniforms, - skvm::Coord device, - skvm::Coord local, - skvm::Color inputColor, - skvm::Color destColor, - SkVMCallbacks* callbacks) { - skvm::Val zero = builder->splat(0.0f).id; - skvm::Val result[4] = {zero,zero,zero,zero}; - - skvm::Val args[8]; // At most 8 arguments (half4 srcColor, half4 dstColor) - size_t argSlots = 0; - for (const SkSL::Variable* param : function.declaration().parameters()) { - switch (param->modifiers().fLayout.fBuiltin) { - case SK_MAIN_COORDS_BUILTIN: - SkASSERT(param->type().slotCount() == 2); - SkASSERT((argSlots + 2) <= std::size(args)); - args[argSlots++] = local.x.id; - args[argSlots++] = local.y.id; - break; - case SK_INPUT_COLOR_BUILTIN: - SkASSERT(param->type().slotCount() == 4); - SkASSERT((argSlots + 4) <= std::size(args)); - args[argSlots++] = inputColor.r.id; - args[argSlots++] = inputColor.g.id; - args[argSlots++] = inputColor.b.id; - args[argSlots++] = inputColor.a.id; - break; - case SK_DEST_COLOR_BUILTIN: - SkASSERT(param->type().slotCount() == 4); - SkASSERT((argSlots + 4) <= std::size(args)); - args[argSlots++] = destColor.r.id; - args[argSlots++] = destColor.g.id; - args[argSlots++] = destColor.b.id; - args[argSlots++] = destColor.a.id; - break; - default: - SkDEBUGFAIL("Invalid parameter to main()"); - return {}; - } - } - SkASSERT(argSlots <= std::size(args)); - - // Make sure that the DebugTrace starts from a clean slate. - if (debugTrace) { - debugTrace->fSlotInfo.clear(); - debugTrace->fFuncInfo.clear(); - debugTrace->fTraceInfo.clear(); - } - - SkVMGenerator generator(program, builder, debugTrace, callbacks); - generator.writeProgram(uniforms, device, function, {args, argSlots}, SkSpan(result)); - - return skvm::Color{{builder, result[0]}, - {builder, result[1]}, - {builder, result[2]}, - {builder, result[3]}}; -} - -bool ProgramToSkVM(const Program& program, - const FunctionDefinition& function, - skvm::Builder* b, - DebugTracePriv* debugTrace, - SkSpan uniforms, - SkVMSignature* outSignature) { - SkVMSignature ignored, - *signature = outSignature ? outSignature : &ignored; - - std::vector argPtrs; - std::vector argVals; - - for (const Variable* p : function.declaration().parameters()) { - size_t slots = p->type().slotCount(); - signature->fParameterSlots += slots; - for (size_t i = 0; i < slots; ++i) { - argPtrs.push_back(b->varying()); - argVals.push_back(b->loadF(argPtrs.back()).id); - } - } - - std::vector returnPtrs; - std::vector returnVals; - - signature->fReturnSlots = function.declaration().returnType().slotCount(); - for (size_t i = 0; i < signature->fReturnSlots; ++i) { - returnPtrs.push_back(b->varying()); - returnVals.push_back(b->splat(0.0f).id); - } - - class Callbacks : public SkVMCallbacks { - public: - Callbacks(skvm::Color color) : fColor(color) {} - - skvm::Color sampleShader(int, skvm::Coord) override { - fUsedUnsupportedFeatures = true; - return fColor; - } - skvm::Color sampleColorFilter(int, skvm::Color) override { - fUsedUnsupportedFeatures = true; - return fColor; - } - skvm::Color sampleBlender(int, skvm::Color, skvm::Color) override { - fUsedUnsupportedFeatures = true; - return fColor; - } - - skvm::Color toLinearSrgb(skvm::Color) override { - fUsedUnsupportedFeatures = true; - return fColor; - } - skvm::Color fromLinearSrgb(skvm::Color) override { - fUsedUnsupportedFeatures = true; - return fColor; - } - - bool fUsedUnsupportedFeatures = false; - const skvm::Color fColor; - }; - - // Set up device coordinates so that the rightmost evaluated pixel will be centered on (0, 0). - // (If the coordinates aren't used, dead-code elimination will optimize this away.) - skvm::F32 pixelCenter = b->splat(0.5f); - skvm::Coord device = {pixelCenter, pixelCenter}; - device.x += to_F32(b->splat(1) - b->index()); - - skvm::F32 zero = b->splat(0.0f); - skvm::Color sampledColor{zero, zero, zero, zero}; - Callbacks callbacks(sampledColor); - - SkVMGenerator generator(program, b, debugTrace, &callbacks); - generator.writeProgram(uniforms, device, function, SkSpan(argVals), SkSpan(returnVals)); - - // If the SkSL tried to use any shader, colorFilter, or blender objects - we don't have a - // mechanism (yet) for binding to those. - if (callbacks.fUsedUnsupportedFeatures) { - return false; - } - - // generateCode has updated the contents of 'argVals' for any 'out' or 'inout' parameters. - // Propagate those changes back to our varying buffers: - size_t argIdx = 0; - for (const Variable* p : function.declaration().parameters()) { - size_t nslots = p->type().slotCount(); - if (p->modifiers().fFlags & Modifiers::kOut_Flag) { - for (size_t i = 0; i < nslots; ++i) { - b->storeF(argPtrs[argIdx + i], skvm::F32{b, argVals[argIdx + i]}); - } - } - argIdx += nslots; - } - - // It's also updated the contents of 'returnVals' with the return value of the entry point. - // Store that as well: - for (size_t i = 0; i < signature->fReturnSlots; ++i) { - b->storeF(returnPtrs[i], skvm::F32{b, returnVals[i]}); - } - - return true; -} - -/* - * Testing utility function that emits program's "main" with a minimal harness. Used to create - * representative skvm op sequences for SkSL tests. - */ -bool testingOnly_ProgramToSkVMShader(const Program& program, - skvm::Builder* builder, - DebugTracePriv* debugTrace) { - const SkSL::FunctionDeclaration* main = program.getFunction("main"); - if (!main) { - return false; - } - - size_t uniformSlots = 0; - int childSlots = 0; - for (const SkSL::ProgramElement* e : program.elements()) { - if (e->is()) { - const GlobalVarDeclaration& decl = e->as(); - const Variable& var = *decl.varDeclaration().var(); - if (var.type().isEffectChild()) { - childSlots++; - } else if (is_uniform(var)) { - uniformSlots += var.type().slotCount(); - } - } - } - - skvm::Uniforms uniforms(builder->uniform(), 0); - - auto new_uni = [&]() { return builder->uniformF(uniforms.pushF(0.0f)); }; - - // Assume identity CTM - skvm::Coord device = {pun_to_F32(builder->index()), new_uni()}; - // Position device coords at pixel centers, so debug traces will trigger - device.x += 0.5f; - device.y += 0.5f; - skvm::Coord local = device; - - class Callbacks : public SkVMCallbacks { - public: - Callbacks(skvm::Builder* builder, skvm::Uniforms* uniforms, int numChildren) { - for (int i = 0; i < numChildren; ++i) { - fChildren.push_back( - {uniforms->pushPtr(nullptr), builder->uniform32(uniforms->push(0))}); - } - } - - skvm::Color sampleShader(int i, skvm::Coord coord) override { - skvm::PixelFormat pixelFormat = skvm::SkColorType_to_PixelFormat(kRGBA_F32_SkColorType); - skvm::I32 index = trunc(coord.x); - index += trunc(coord.y) * fChildren[i].rowBytesAsPixels; - return gather(pixelFormat, fChildren[i].addr, index); - } - - skvm::Color sampleColorFilter(int i, skvm::Color color) override { - return color; - } - - skvm::Color sampleBlender(int i, skvm::Color src, skvm::Color dst) override { - return blend(SkBlendMode::kSrcOver, src, dst); - } - - // TODO(skia:10479): Make these actually convert to/from something like sRGB, for use in - // test files. - skvm::Color toLinearSrgb(skvm::Color color) override { - return color; - } - skvm::Color fromLinearSrgb(skvm::Color color) override { - return color; - } - - struct Child { - skvm::Uniform addr; - skvm::I32 rowBytesAsPixels; - }; - std::vector fChildren; - }; - Callbacks callbacks(builder, &uniforms, childSlots); - - std::vector uniformVals; - for (size_t i = 0; i < uniformSlots; ++i) { - uniformVals.push_back(new_uni().id); - } - - skvm::Color inColor = builder->uniformColor(SkColors::kWhite, &uniforms); - skvm::Color destColor = builder->uniformColor(SkColors::kBlack, &uniforms); - - skvm::Color result = SkSL::ProgramToSkVM(program, *main->definition(), builder, debugTrace, - SkSpan(uniformVals), device, local, inColor, - destColor, &callbacks); - - storeF(builder->varying(), result.r); - storeF(builder->varying(), result.g); - storeF(builder->varying(), result.b); - storeF(builder->varying(), result.a); - - return true; -} - -} // namespace SkSL - -#endif // defined(SK_ENABLE_SKVM) diff --git a/src/sksl/codegen/SkSLVMCodeGenerator.h b/src/sksl/codegen/SkSLVMCodeGenerator.h deleted file mode 100644 index c4a73a3ef4f9..000000000000 --- a/src/sksl/codegen/SkSLVMCodeGenerator.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#ifndef SKSL_VMGENERATOR -#define SKSL_VMGENERATOR - -#include "include/core/SkTypes.h" - -#if defined(SK_ENABLE_SKVM) - -#include "src/core/SkVM.h" -#include - -template class SkSpan; - -namespace SkSL { - -class FunctionDefinition; -struct Program; -class DebugTracePriv; - -class SkVMCallbacks { -public: - virtual ~SkVMCallbacks() = default; - - virtual skvm::Color sampleShader(int index, skvm::Coord coord) = 0; - virtual skvm::Color sampleColorFilter(int index, skvm::Color color) = 0; - virtual skvm::Color sampleBlender(int index, skvm::Color src, skvm::Color dst) = 0; - - virtual skvm::Color toLinearSrgb(skvm::Color color) = 0; - virtual skvm::Color fromLinearSrgb(skvm::Color color) = 0; -}; - -// Convert 'function' to skvm instructions in 'builder', for use by blends, shaders, & color filters -skvm::Color ProgramToSkVM(const Program& program, - const FunctionDefinition& function, - skvm::Builder* builder, - DebugTracePriv* debugTrace, - SkSpan uniforms, - skvm::Coord device, - skvm::Coord local, - skvm::Color inputColor, - skvm::Color destColor, - SkVMCallbacks* callbacks); - -struct SkVMSignature { - size_t fParameterSlots = 0; - size_t fReturnSlots = 0; -}; - -/* - * Converts 'function' to skvm instructions in 'builder'. Always adds one arg per value in the - * parameter list, then one per value in the return type. For example: - * - * float2 fn(float2 a, float b) { ... } - * - * ... is mapped so that it can be called as: - * - * p.eval(N, &a.x, &a.y, &b, &return.x, &return.y); - * - * The number of parameter and return slots (pointers) is placed in 'outSignature', if provided. - * If the program declares any uniforms, 'uniforms' should contain the IDs of each individual value - * (eg, one ID per component of a vector). - */ -bool ProgramToSkVM(const Program& program, - const FunctionDefinition& function, - skvm::Builder* b, - DebugTracePriv* debugTrace, - SkSpan uniforms, - SkVMSignature* outSignature = nullptr); - -bool testingOnly_ProgramToSkVMShader(const Program& program, - skvm::Builder* builder, - DebugTracePriv* debugTrace); - -} // namespace SkSL - -#endif // defined(SK_ENABLE_SKVM) -#endif // SKSL_VMGENERATOR diff --git a/src/sksl/codegen/SkSLWGSLCodeGenerator.cpp b/src/sksl/codegen/SkSLWGSLCodeGenerator.cpp index dd85cf9b0a9e..c86e5530b407 100644 --- a/src/sksl/codegen/SkSLWGSLCodeGenerator.cpp +++ b/src/sksl/codegen/SkSLWGSLCodeGenerator.cpp @@ -9,15 +9,17 @@ #include "include/core/SkSpan.h" #include "include/core/SkTypes.h" -#include "include/private/SkBitmaskEnum.h" #include "include/private/base/SkTArray.h" #include "include/private/base/SkTo.h" +#include "src/base/SkEnumBitMask.h" #include "src/sksl/SkSLAnalysis.h" #include "src/sksl/SkSLBuiltinTypes.h" #include "src/sksl/SkSLCompiler.h" +#include "src/sksl/SkSLConstantFolder.h" #include "src/sksl/SkSLContext.h" #include "src/sksl/SkSLErrorReporter.h" #include "src/sksl/SkSLIntrinsicList.h" +#include "src/sksl/SkSLMemoryLayout.h" #include "src/sksl/SkSLOperator.h" #include "src/sksl/SkSLOutputStream.h" #include "src/sksl/SkSLPosition.h" @@ -30,6 +32,7 @@ #include "src/sksl/ir/SkSLBinaryExpression.h" #include "src/sksl/ir/SkSLBlock.h" #include "src/sksl/ir/SkSLConstructor.h" +#include "src/sksl/ir/SkSLConstructorArrayCast.h" #include "src/sksl/ir/SkSLConstructorCompound.h" #include "src/sksl/ir/SkSLConstructorDiagonalMatrix.h" #include "src/sksl/ir/SkSLConstructorMatrixResize.h" @@ -47,7 +50,7 @@ #include "src/sksl/ir/SkSLInterfaceBlock.h" #include "src/sksl/ir/SkSLLayout.h" #include "src/sksl/ir/SkSLLiteral.h" -#include "src/sksl/ir/SkSLModifiers.h" +#include "src/sksl/ir/SkSLModifierFlags.h" #include "src/sksl/ir/SkSLPostfixExpression.h" #include "src/sksl/ir/SkSLPrefixExpression.h" #include "src/sksl/ir/SkSLProgram.h" @@ -66,6 +69,7 @@ #include "src/sksl/ir/SkSLVarDeclarations.h" #include "src/sksl/ir/SkSLVariable.h" #include "src/sksl/ir/SkSLVariableReference.h" +#include "src/sksl/spirv.h" #include "src/sksl/transform/SkSLTransform.h" #include @@ -77,16 +81,15 @@ using namespace skia_private; -// TODO(skia:13092): This is a temporary debug feature. Remove when the implementation is -// complete and this is no longer needed. -#define DUMP_SRC_IR 0 - namespace SkSL { enum class ProgramKind : int8_t; namespace { +static constexpr char kSamplerSuffix[] = "_Sampler"; +static constexpr char kTextureSuffix[] = "_Texture"; + // See https://www.w3.org/TR/WGSL/#memory-view-types enum class PtrAddressSpace { kFunction, @@ -94,6 +97,13 @@ enum class PtrAddressSpace { kStorage, }; +const char* operator_name(Operator op) { + switch (op.kind()) { + case Operator::Kind::LOGICALXOR: return " != "; + default: return op.operatorName(); + } +} + std::string_view pipeline_struct_prefix(ProgramKind kind) { if (ProgramConfig::IsVertex(kind)) { return "VS"; @@ -161,6 +171,11 @@ std::string to_wgsl_type(const Type& type) { } return String::printf("array<%s, %d>", elementType.c_str(), type.columns()); } + case Type::TypeKind::kTexture: + // TODO(b/40044498): we will need to support texture_storage_2d as well, once the + // details are ironed out. + return "texture_2d"; + default: break; } @@ -248,7 +263,7 @@ std::string_view wgsl_builtin_type(WGSLCodeGenerator::Builtin builtin) { // reference. Returns the WGSL type of the conversion target if conversion is needed, otherwise // returns std::nullopt. std::optional needs_builtin_type_conversion(const Variable& v) { - switch (v.modifiers().fLayout.fBuiltin) { + switch (v.layout().fBuiltin) { case SK_VERTEXID_BUILTIN: case SK_INSTANCEID_BUILTIN: return {"i32"}; @@ -308,7 +323,7 @@ const char* delimiter_to_str(WGSLCodeGenerator::Delimiter delimiter) { // synthesize arguments when writing out function definitions. class FunctionDependencyResolver : public ProgramVisitor { public: - using Deps = WGSLCodeGenerator::FunctionDependencies; + using Deps = WGSLFunctionDependencies; using DepsMap = WGSLCodeGenerator::ProgramRequirements::DepsMap; FunctionDependencyResolver(const Program* p, @@ -317,7 +332,7 @@ class FunctionDependencyResolver : public ProgramVisitor { : fProgram(p), fFunction(f), fDependencyMap(programDependencyMap) {} Deps resolve() { - fDeps = Deps::kNone; + fDeps = WGSLFunctionDependency::kNone; this->visit(*fProgram); return fDeps; } @@ -335,13 +350,13 @@ class FunctionDependencyResolver : public ProgramVisitor { bool visitExpression(const Expression& e) override { if (e.is()) { const VariableReference& v = e.as(); - const Modifiers& modifiers = v.variable()->modifiers(); if (v.variable()->storage() == Variable::Storage::kGlobal) { - if (modifiers.fFlags & Modifiers::kIn_Flag) { - fDeps |= Deps::kPipelineInputs; + ModifierFlags flags = v.variable()->modifierFlags(); + if (flags & ModifierFlag::kIn) { + fDeps |= WGSLFunctionDependency::kPipelineInputs; } - if (modifiers.fFlags & Modifiers::kOut_Flag) { - fDeps |= Deps::kPipelineOutputs; + if (flags & ModifierFlag::kOut) { + fDeps |= WGSLFunctionDependency::kPipelineOutputs; } } } else if (e.is()) { @@ -379,7 +394,7 @@ class FunctionDependencyResolver : public ProgramVisitor { const Program* const fProgram; const FunctionDeclaration* const fFunction; DepsMap* const fDependencyMap; - Deps fDeps = Deps::kNone; + Deps fDeps = WGSLFunctionDependency::kNone; using INHERITED = ProgramVisitor; }; @@ -394,14 +409,7 @@ WGSLCodeGenerator::ProgramRequirements resolve_program_requirements(const Progra } const FunctionDeclaration& decl = e->as().declaration(); - if (decl.isMain()) { - for (const Variable* v : decl.parameters()) { - if (v->modifiers().fLayout.fBuiltin == SK_MAIN_COORDS_BUILTIN) { - mainNeedsCoordsArgument = true; - break; - } - } - } + mainNeedsCoordsArgument |= (decl.getMainCoordsParameter() != nullptr); FunctionDependencyResolver resolver(program, &decl, &dependencies); dependencies.set(&decl, resolver.resolve()); @@ -415,12 +423,12 @@ int count_pipeline_inputs(const Program* program) { for (const ProgramElement* e : program->elements()) { if (e->is()) { const Variable* v = e->as().varDeclaration().var(); - if (v->modifiers().fFlags & Modifiers::kIn_Flag) { + if (v->modifierFlags() & ModifierFlag::kIn) { inputCount++; } } else if (e->is()) { const Variable* v = e->as().var(); - if (v->modifiers().fFlags & Modifiers::kIn_Flag) { + if (v->modifierFlags() & ModifierFlag::kIn) { inputCount++; } } @@ -430,7 +438,9 @@ int count_pipeline_inputs(const Program* program) { bool is_in_global_uniforms(const Variable& var) { SkASSERT(var.storage() == VariableStorage::kGlobal); - return var.modifiers().fFlags & Modifiers::kUniform_Flag && !var.type().isOpaque(); + return var.modifierFlags().isUniform() && + !var.type().isOpaque() && + !var.interfaceBlock(); } } // namespace @@ -439,12 +449,6 @@ class WGSLCodeGenerator::LValue { public: virtual ~LValue() = default; - // Returns a pointer to the lvalue, if possible. If the lvalue cannot be directly referenced - // by a pointer (e.g. vector swizzles), returns "". - virtual std::string getPointer() { - return ""; - } - // Returns a WGSL expression that loads from the lvalue with no side effects. // (e.g. `array[index].field`) virtual std::string load() = 0; @@ -460,10 +464,6 @@ class WGSLCodeGenerator::PointerLValue : public WGSLCodeGenerator::LValue { // of. (e.g. `array[index].field` would be valid, but `array[Func()]` or `vector.x` are not.) PointerLValue(std::string name) : fName(std::move(name)) {} - std::string getPointer() override { - return std::string("&(") + fName + std::string(")"); - } - std::string load() override { return fName; } @@ -482,10 +482,6 @@ class WGSLCodeGenerator::VectorComponentLValue : public WGSLCodeGenerator::LValu // WGSL vector. VectorComponentLValue(std::string name) : fName(std::move(name)) {} - std::string getPointer() override { - return ""; - } - std::string load() override { return fName; } @@ -550,10 +546,6 @@ class WGSLCodeGenerator::SwizzleLValue : public WGSLCodeGenerator::LValue { } } - std::string getPointer() override { - return ""; - } - std::string load() override { return fName + "." + Swizzle::MaskString(fComponents); } @@ -601,13 +593,12 @@ bool WGSLCodeGenerator::generateCode() { // - All uniform and storage type resources are declared in global scope. this->preprocessProgram(); - StringStream header; { - AutoOutputStream outputToHeader(this, &header, &fIndentation); - // TODO(skia:13092): Implement the following: - // - global uniform/storage resource declarations, including interface blocks. + AutoOutputStream outputToHeader(this, &fHeader, &fIndentation); + this->writeLine("diagnostic(off, derivative_uniformity);"); this->writeStageInputStruct(); this->writeStageOutputStruct(); + this->writeUniformsAndBuffers(); this->writeNonBlockUniformsForTests(); } StringStream body; @@ -616,19 +607,9 @@ bool WGSLCodeGenerator::generateCode() { for (const ProgramElement* e : fProgram.elements()) { this->writeProgramElement(*e); } - -// TODO(skia:13092): This is a temporary debug feature. Remove when the implementation is -// complete and this is no longer needed. -#if DUMP_SRC_IR - this->writeLine("\n----------"); - this->writeLine("Source IR:\n"); - for (const ProgramElement* e : fProgram.elements()) { - this->writeLine(e->description().c_str()); - } -#endif } - write_stringstream(header, *fOut); + write_stringstream(fHeader, *fOut); write_stringstream(body, *fOut); return fContext.fErrors->errorCount() == 0; } @@ -681,7 +662,7 @@ void WGSLCodeGenerator::writeVariableDecl(const Type& type, this->writeLine(delimiter_to_str(delimiter)); } -void WGSLCodeGenerator::writePipelineIODeclaration(Modifiers modifiers, +void WGSLCodeGenerator::writePipelineIODeclaration(const Layout& layout, const Type& type, std::string_view name, Delimiter delimiter) { @@ -698,11 +679,10 @@ void WGSLCodeGenerator::writePipelineIODeclaration(Modifiers modifiers, // https://www.w3.org/TR/WGSL/#input-output-locations // https://www.w3.org/TR/WGSL/#attribute-location // https://www.w3.org/TR/WGSL/#builtin-inputs-outputs - int location = modifiers.fLayout.fLocation; - if (location >= 0) { - this->writeUserDefinedIODecl(type, name, location, delimiter); - } else if (modifiers.fLayout.fBuiltin >= 0) { - auto builtin = builtin_from_sksl_name(modifiers.fLayout.fBuiltin); + if (layout.fLocation >= 0) { + this->writeUserDefinedIODecl(type, name, layout.fLocation, delimiter); + } else if (layout.fBuiltin >= 0) { + auto builtin = builtin_from_sksl_name(layout.fBuiltin); if (builtin.has_value()) { this->writeBuiltinIODecl(type, name, *builtin, delimiter); } @@ -755,12 +735,12 @@ void WGSLCodeGenerator::writeFunction(const FunctionDefinition& f) { // create properly-named `let` aliases. for (size_t index = 0; index < decl.parameters().size(); ++index) { const Variable& param = *decl.parameters()[index]; - if (!param.name().empty()) { - const ProgramUsage::VariableCounts counts = fProgram.fUsage->get(param); + if (!param.name().empty() && !param.type().isOpaque()) { // Variables which are never written-to don't need dedicated storage and can use `let`. // Out-parameters are passed as pointers; the pointer itself is never modified, so it // doesn't need a dedicated variable and can use `let`. - this->write(((param.modifiers().fFlags & Modifiers::kOut_Flag) || counts.fWrite == 0) + const ProgramUsage::VariableCounts counts = fProgram.fUsage->get(param); + this->write(((param.modifierFlags() & ModifierFlag::kOut) || counts.fWrite == 0) ? "let " : "var "); this->write(this->assembleName(param.mangledName())); @@ -802,16 +782,37 @@ void WGSLCodeGenerator::writeFunctionDeclaration(const FunctionDeclaration& decl separator(); // update the separator as parameters have been written } for (size_t index = 0; index < decl.parameters().size(); ++index) { - const Variable& param = *decl.parameters()[index]; this->write(separator()); - this->write("_skParam" + std::to_string(index)); - this->write(": "); - // Declare an "out" function parameter as a pointer. - if (param.modifiers().fFlags & Modifiers::kOut_Flag) { - this->write(to_ptr_type(param.type())); + const Variable& param = *decl.parameters()[index]; + if (param.type().isOpaque()) { + if (param.type().isSampler()) { + // Create parameters for both the texture and associated sampler. + this->write(param.name()); + this->write(kTextureSuffix); + this->write(": texture_2d, "); + this->write(param.name()); + this->write(kSamplerSuffix); + this->write(": sampler"); + } else { + // Create a parameter for the opaque object. + this->write(param.name()); + this->write(": "); + this->write(to_wgsl_type(param.type())); + } } else { - this->write(to_wgsl_type(param.type())); + // Create an unnamed parameter, which will later be assigned a `var` or `let` in the + // function body. + this->write("_skParam"); + this->write(std::to_string(index)); + this->write(": "); + + // Declare an "out" function parameter as a pointer. + if (param.modifierFlags() & ModifierFlag::kOut) { + this->write(to_ptr_type(param.type())); + } else { + this->write(to_wgsl_type(param.type())); + } } } this->write(")"); @@ -883,32 +884,28 @@ void WGSLCodeGenerator::writeEntryPoint(const FunctionDefinition& main) { this->write(main.declaration().mangledName()); this->write("("); auto separator = SkSL::String::Separator(); - FunctionDependencies* deps = fRequirements.dependencies.find(&main.declaration()); + WGSLFunctionDependencies* deps = fRequirements.dependencies.find(&main.declaration()); if (deps) { - if ((*deps & FunctionDependencies::kPipelineInputs) != FunctionDependencies::kNone) { + if (*deps & WGSLFunctionDependency::kPipelineInputs) { this->write(separator()); this->write("_stageIn"); } - if ((*deps & FunctionDependencies::kPipelineOutputs) != FunctionDependencies::kNone) { + if (*deps & WGSLFunctionDependency::kPipelineOutputs) { this->write(separator()); this->write("&_stageOut"); } } // TODO(armansito): Handle arbitrary parameters. - if (main.declaration().parameters().size() != 0) { - const Variable* v = main.declaration().parameters()[0]; + if (const Variable* v = main.declaration().getMainCoordsParameter()) { const Type& type = v->type(); - if (v->modifiers().fLayout.fBuiltin == SK_MAIN_COORDS_BUILTIN) { - if (!type.matches(*fContext.fTypes.fFloat2)) { - fContext.fErrors->error( - main.fPosition, - "main function has unsupported parameter: " + type.description()); - return; - } - - this->write(separator()); - this->write("_stageIn.sk_FragCoord.xy"); + if (!type.matches(*fContext.fTypes.fFloat2)) { + fContext.fErrors->error(main.fPosition, "main function has unsupported parameter: " + + type.description()); + return; } + + this->write(separator()); + this->write("_stageIn.sk_FragCoord.xy"); } this->writeLine(");"); this->writeLine("return _stageOut;"); @@ -1152,9 +1149,9 @@ void WGSLCodeGenerator::writeIfStatement(const IfStatement& s) { ++fConditionalScopeDepth; std::string testExpr = this->assembleExpression(*s.test(), Precedence::kExpression); - this->write("if ("); + this->write("if "); this->write(testExpr); - this->writeLine(") {"); + this->writeLine(" {"); fIndentation++; this->writeStatement(*s.ifTrue()); this->finishLine(); @@ -1383,7 +1380,7 @@ void WGSLCodeGenerator::writeVarDeclaration(const VarDeclaration& varDecl) { varDecl.value() ? this->assembleExpression(*varDecl.value(), Precedence::kAssignment) : std::string(); - if (varDecl.var()->modifiers().fFlags & Modifiers::kConst_Flag) { + if (varDecl.var()->modifierFlags().isConst()) { // Use `const` at global scope, or if the value is a compile-time constant. SkASSERTF(varDecl.value(), "a constant variable must specify a value"); this->write((!fAtFunctionScope || Analysis::IsCompileTimeConstant(*varDecl.value())) @@ -1452,6 +1449,12 @@ std::string WGSLCodeGenerator::assembleExpression(const Expression& e, case Expression::Kind::kConstructorCompound: return this->assembleConstructorCompound(e.as(), parentPrecedence); + case Expression::Kind::kConstructorArrayCast: + // This is a no-op, since WGSL 1.0 doesn't have any concept of precision qualifiers. + // When we add support for f16, this will need to copy the array contents. + return this->assembleExpression(*e.as().argument(), + parentPrecedence); + case Expression::Kind::kConstructorArray: case Expression::Kind::kConstructorCompoundCast: case Expression::Kind::kConstructorScalarCast: @@ -1467,6 +1470,9 @@ std::string WGSLCodeGenerator::assembleExpression(const Expression& e, return this->assembleConstructorMatrixResize(e.as(), parentPrecedence); + case Expression::Kind::kEmpty: + return "false"; + case Expression::Kind::kFieldAccess: return this->assembleFieldAccess(e.as()); @@ -1498,13 +1504,37 @@ std::string WGSLCodeGenerator::assembleExpression(const Expression& e, return this->assembleVariableReference(e.as()); default: - SkDEBUGFAILF("unsupported expression (kind: %d) %s", - static_cast(e.kind()), - e.description().c_str()); + SkDEBUGFAILF("unsupported expression:\n%s", e.description().c_str()); return {}; } } +std::string WGSLCodeGenerator::assembleBinaryExpressionElement(const Expression& expr, + Operator op, + const Expression& other, + Precedence precedence) { + // SkSL supports `matrix op scalar` for any operator, but WGSL only supports multiplication. + // If we detect a matrix-op-scalar expression that isn't multiplication, we need to manually + // splat the scalar into a matrix. + bool needMatrixSplatOnScalar = other.type().isMatrix() && expr.type().isScalar() && + op.isValidForMatrixOrVector() && + op.removeAssignment().kind() != Operator::Kind::STAR; + if (needMatrixSplatOnScalar) { + std::string scalar = this->writeNontrivialScratchLet(expr, Precedence::kSequence); + std::string result = to_wgsl_type(other.type()) + '('; + auto separator = String::Separator(); + int numSlots = other.type().slotCount(); + for (int index = 0; index < numSlots; ++index) { + result += separator(); + result += scalar; + } + return result + ')'; + } + + // For other expression types, we can emit them as-is. + return this->assembleExpression(expr, precedence); +} + std::string WGSLCodeGenerator::assembleBinaryExpression(const BinaryExpression& b, Precedence parentPrecedence) { return this->assembleBinaryExpression(*b.left(), b.getOperator(), *b.right(), b.type(), @@ -1620,11 +1650,16 @@ std::string WGSLCodeGenerator::assembleBinaryExpression(const Expression& left, std::string result; if (op.kind() == OperatorKind::EQ) { // Evaluate the right-hand side of simple assignment (`a = b` --> `b`). - result = this->assembleExpression(right, Precedence::kAssignment); + result = this->assembleBinaryExpressionElement(right, op, left, + Precedence::kAssignment); } else { // Evaluate the right-hand side of compound-assignment (`a += b` --> `a + b`). - result = this->assembleBinaryExpression(left, op.removeAssignment(), right, resultType, - Precedence::kAssignment); + op = op.removeAssignment(); + + result += lvalue->load(); + result += operator_name(op); + result += this->assembleBinaryExpressionElement(right, op, left, + op.getBinaryPrecedence()); } // Emit the assignment statement (`a = a + b`). @@ -1641,13 +1676,45 @@ std::string WGSLCodeGenerator::assembleBinaryExpression(const Expression& left, Precedence precedence = op.getBinaryPrecedence(); bool needParens = precedence >= parentPrecedence; + // WGSL always requires parentheses for some operators which are deemed to be ambiguous. + // (8.19. Operator Precedence and Associativity) + switch (op.kind()) { + case OperatorKind::LOGICALOR: + case OperatorKind::LOGICALAND: + case OperatorKind::BITWISEOR: + case OperatorKind::BITWISEAND: + case OperatorKind::BITWISEXOR: + case OperatorKind::SHL: + case OperatorKind::SHR: + case OperatorKind::LT: + case OperatorKind::GT: + case OperatorKind::LTEQ: + case OperatorKind::GTEQ: + precedence = Precedence::kParentheses; + break; + + default: + break; + } + if (needParens) { expr.push_back('('); } - expr += this->assembleExpression(left, precedence); - expr += op.operatorName(); - expr += this->assembleExpression(right, precedence); + if (ConstantFolder::GetConstantValueOrNull(left) && + ConstantFolder::GetConstantValueOrNull(right)) { + // If we are emitting `constant + constant`, this generally indicates that the values could + // not be constant-folded. This happens when the values overflow or become nan. WGSL will + // refuse to compile such expressions, as WGSL 1.0 has no infinity/nan support. However, the + // WGSL compile-time check can be dodged by putting one side into a let-variable. This + // technically gives us an indeterminate result, but the vast majority of backends will just + // calculate an infinity or nan here, as we would expect. (skia:14385) + expr += this->writeScratchLet(left, precedence); + } else { + expr += this->assembleBinaryExpressionElement(left, op, right, precedence); + } + expr += operator_name(op); + expr += this->assembleBinaryExpressionElement(right, op, left, precedence); if (needParens) { expr.push_back(')'); @@ -1658,32 +1725,46 @@ std::string WGSLCodeGenerator::assembleBinaryExpression(const Expression& left, std::string WGSLCodeGenerator::assembleFieldAccess(const FieldAccess& f) { std::string expr; - const Field* field = &f.base()->type().fields()[f.fieldIndex()]; - if (FieldAccess::OwnerKind::kDefault == f.ownerKind()) { - expr += this->assembleExpression(*f.base(), Precedence::kPostfix); - expr.push_back('.'); - } else { - // We are accessing a field in an anonymous interface block. If the field refers to a - // pipeline IO parameter, then we access it via the synthesized IO structs. We make an - // explicit exception for `sk_PointSize` which we declare as a placeholder variable in - // global scope as it is not supported by WebGPU as a pipeline IO parameter (see comments - // in `writeStageOutputStruct`). - const Variable& v = *f.base()->as().variable(); - if (v.modifiers().fFlags & Modifiers::kIn_Flag) { - expr += "_stageIn."; - } else if (v.modifiers().fFlags & Modifiers::kOut_Flag && - field->fModifiers.fLayout.fBuiltin != SK_POINTSIZE_BUILTIN) { - expr += "(*_stageOut)."; - } else { - // TODO(skia:13092): Reference the variable using the base name used for its - // uniform/storage block global declaration. - } + + switch (f.ownerKind()) { + case FieldAccess::OwnerKind::kDefault: + expr = this->assembleExpression(*f.base(), Precedence::kPostfix) + '.'; + break; + + case FieldAccess::OwnerKind::kAnonymousInterfaceBlock: + if (f.base()->is() && + field->fLayout.fBuiltin != SK_POINTSIZE_BUILTIN) { + expr = this->variablePrefix(*f.base()->as().variable()); + } + break; + } + + expr += std::string(field->fName); + + if (fMatrixPolyfillFields.contains(field)) { + expr = String::printf("_skMatrixUnpack%d%d(%s)", + field->fType->columns(), field->fType->rows(), expr.c_str()); } - expr += field->fName; + return expr; } +static bool all_arguments_constant(const ExpressionArray& arguments) { + // Returns true if all arguments in the ExpressionArray are compile-time constants. If we are + // calling an intrinsic and all of its inputs are constant, but we didn't constant-fold it, this + // generally indicates that constant-folding resulted in an infinity or nan. The WGSL compiler + // will reject such an expression with a compile-time error. We can dodge the error, taking on + // the risk of indeterminate behavior instead, by replacing one of the constant values with a + // scratch let-variable. (skia:14385) + for (const std::unique_ptr& arg : arguments) { + if (!ConstantFolder::GetConstantValueOrNull(*arg)) { + return false; + } + } + return true; +} + std::string WGSLCodeGenerator::assembleSimpleIntrinsic(std::string_view intrinsicName, const FunctionCall& call) { SkASSERT(!call.type().isVoid()); @@ -1693,9 +1774,14 @@ std::string WGSLCodeGenerator::assembleSimpleIntrinsic(std::string_view intrinsi expr.push_back('('); const ExpressionArray& args = call.arguments(); auto separator = SkSL::String::Separator(); + bool allConstant = all_arguments_constant(call.arguments()); for (int index = 0; index < args.size(); ++index) { expr += separator(); - expr += this->assembleExpression(*args[index], Precedence::kSequence); + + // We can use a scratch-let for argument 0 to dodge WGSL overflow errors. (skia:14385) + std::string argument = this->assembleExpression(*args[index], Precedence::kSequence); + expr += (allConstant && index == 0) ? this->writeScratchLet(argument) + : argument; } expr.push_back(')'); @@ -1713,6 +1799,7 @@ std::string WGSLCodeGenerator::assembleVectorizedIntrinsic(std::string_view intr auto separator = SkSL::String::Separator(); const ExpressionArray& args = call.arguments(); bool returnsVector = call.type().isVector(); + bool allConstant = all_arguments_constant(call.arguments()); for (int index = 0; index < args.size(); ++index) { expr += separator(); @@ -1722,8 +1809,10 @@ std::string WGSLCodeGenerator::assembleVectorizedIntrinsic(std::string_view intr expr.push_back('('); } - expr += this->assembleExpression(*args[index], Precedence::kSequence); - + // We can use a scratch-let for argument 0 to dodge WGSL overflow errors. (skia:14385) + std::string argument = this->assembleExpression(*args[index], Precedence::kSequence); + expr += (allConstant && index == 0) ? this->writeScratchLet(argument) + : argument; if (vectorize) { expr.push_back(')'); } @@ -1745,7 +1834,7 @@ std::string WGSLCodeGenerator::assembleUnaryOpIntrinsic(Operator op, expr.push_back('('); } - expr += op.operatorName(); + expr += operator_name(op); expr += this->assembleExpression(*call.arguments()[0], Precedence::kPrefix); if (needParens) { @@ -1768,8 +1857,11 @@ std::string WGSLCodeGenerator::assembleBinaryOpIntrinsic(Operator op, expr.push_back('('); } - expr += this->assembleExpression(*call.arguments()[0], precedence); - expr += op.operatorName(); + // We can use a scratch-let for argument 0 to dodge WGSL overflow errors. (skia:14385) + std::string argument = this->assembleExpression(*call.arguments()[0], precedence); + expr += all_arguments_constant(call.arguments()) ? this->writeScratchLet(argument) + : argument; + expr += operator_name(op); expr += this->assembleExpression(*call.arguments()[1], precedence); if (needParens) { @@ -1779,18 +1871,57 @@ std::string WGSLCodeGenerator::assembleBinaryOpIntrinsic(Operator op, return expr; } +std::string WGSLCodeGenerator::assemblePartialSampleCall(std::string_view functionName, + const Expression& sampler, + const Expression& coords) { + // This function returns `functionName(samplerᵗ, samplerˢ, coords` without a terminating + // comma or close-parenthesis. This allows the caller to add more arguments as needed. + SkASSERT(sampler.type().typeKind() == Type::TypeKind::kSampler); + std::string expr = std::string(functionName) + '(' + + this->assembleExpression(sampler, Precedence::kSequence) + + kTextureSuffix + ", " + + this->assembleExpression(sampler, Precedence::kSequence) + + kSamplerSuffix + ", "; + + // Compute the sample coordinates, dividing out the Z if a vec3 was provided. + SkASSERT(coords.type().isVector()); + if (coords.type().columns() == 3) { + // The coordinates were passed as a vec3, so we need to emit `coords.xy / coords.z`. + std::string vec3Coords = this->writeScratchLet(coords, Precedence::kMultiplicative); + expr += vec3Coords + ".xy / " + vec3Coords + ".z"; + } else { + // The coordinates should be a plain vec2; emit the expression as-is. + SkASSERT(coords.type().columns() == 2); + expr += this->assembleExpression(coords, Precedence::kSequence); + } + + return expr; +} + std::string WGSLCodeGenerator::assembleIntrinsicCall(const FunctionCall& call, IntrinsicKind kind, Precedence parentPrecedence) { + // Be careful: WGSL 1.0 will reject any intrinsic calls which can be constant-evaluated to + // infinity or nan with a compile error. If all arguments to an intrinsic are compile-time + // constants (`all_arguments_constant`), it is safest to copy one argument into a scratch-let so + // that the call will be seen as runtime-evaluated, which defuses the overflow checks. + // Don't worry; a competent driver should still optimize it away. + const ExpressionArray& arguments = call.arguments(); switch (kind) { case k_atan_IntrinsicKind: { const char* name = (arguments.size() == 1) ? "atan" : "atan2"; return this->assembleSimpleIntrinsic(name, call); } + case k_dFdx_IntrinsicKind: + return this->assembleSimpleIntrinsic("dpdx", call); + + case k_dFdy_IntrinsicKind: + // TODO(b/294274678): apply RTFlip here + return this->assembleSimpleIntrinsic("dpdy", call); case k_dot_IntrinsicKind: { - if (arguments[0]->type().columns() == 1) { + if (arguments[0]->type().isScalar()) { return this->assembleBinaryOpIntrinsic(OperatorKind::STAR, call, parentPrecedence); } return this->assembleSimpleIntrinsic("dot", call); @@ -1799,15 +1930,18 @@ std::string WGSLCodeGenerator::assembleIntrinsicCall(const FunctionCall& call, return this->assembleBinaryOpIntrinsic(OperatorKind::EQEQ, call, parentPrecedence); case k_faceforward_IntrinsicKind: { - if (arguments[0]->type().columns() == 1) { - // (select(-1.0, 1.0, (I * Nref) < 0) * N) + if (arguments[0]->type().isScalar()) { + // select(-N, N, (I * Nref) < 0) + std::string N = this->writeNontrivialScratchLet(*arguments[0], + Precedence::kAssignment); return this->writeScratchLet( - "(select(-1.0, 1.0, (" + - this->assembleExpression(*arguments[1], Precedence::kMultiplicative) + - " * " + - this->assembleExpression(*arguments[2], Precedence::kMultiplicative) + - ") < 0) * " + - this->assembleExpression(*arguments[0], Precedence::kMultiplicative) + ")"); + "select(-" + N + ", " + N + ", " + + this->assembleBinaryExpression(*arguments[1], + OperatorKind::STAR, + *arguments[2], + arguments[1]->type(), + Precedence::kRelational) + + " < 0)"); } return this->assembleSimpleIntrinsic("faceForward", call); } @@ -1817,6 +1951,9 @@ std::string WGSLCodeGenerator::assembleIntrinsicCall(const FunctionCall& call, case k_greaterThanEqual_IntrinsicKind: return this->assembleBinaryOpIntrinsic(OperatorKind::GTEQ, call, parentPrecedence); + case k_inverse_IntrinsicKind: + return this->assembleInversePolyfill(call); + case k_inversesqrt_IntrinsicKind: return this->assembleSimpleIntrinsic("inverseSqrt", call); @@ -1826,14 +1963,34 @@ std::string WGSLCodeGenerator::assembleIntrinsicCall(const FunctionCall& call, case k_lessThanEqual_IntrinsicKind: return this->assembleBinaryOpIntrinsic(OperatorKind::LTEQ, call, parentPrecedence); + case k_matrixCompMult_IntrinsicKind: { + // We use a scratch-let for arg0 to avoid the potential for WGSL overflow. (skia:14385) + std::string arg0 = all_arguments_constant(arguments) + ? this->writeScratchLet(*arguments[0], Precedence::kPostfix) + : this->writeNontrivialScratchLet(*arguments[0], Precedence::kPostfix); + std::string arg1 = this->writeNontrivialScratchLet(*arguments[1], Precedence::kPostfix); + std::string expr = to_wgsl_type(arguments[0]->type()) + '('; + + auto separator = String::Separator(); + int columns = arguments[0]->type().columns(); + for (int c = 0; c < columns; ++c) { + String::appendf(&expr, "%s%s[%d] * %s[%d]", + separator().c_str(), arg0.c_str(), c, arg1.c_str(), c); + } + expr += ')'; + return this->writeScratchLet(expr); + } case k_mix_IntrinsicKind: { const char* name = arguments[2]->type().componentType().isBoolean() ? "select" : "mix"; return this->assembleVectorizedIntrinsic(name, call); } case k_mod_IntrinsicKind: { // WGSL has no intrinsic equivalent to `mod`. Synthesize `x - y * floor(x / y)`. - std::string arg0 = this->writeNontrivialScratchLet(*arguments[0], - Precedence::kAdditive); + // We can use a scratch-let on one side to dodge WGSL overflow errors. In practice, I + // can't find any values of x or y which would overflow, but it can't hurt. (skia:14385) + std::string arg0 = all_arguments_constant(arguments) + ? this->writeScratchLet(*arguments[0], Precedence::kAdditive) + : this->writeNontrivialScratchLet(*arguments[0], Precedence::kAdditive); std::string arg1 = this->writeNontrivialScratchLet(*arguments[1], Precedence::kAdditive); return this->writeScratchLet(arg0 + " - " + arg1 + " * floor(" + @@ -1849,6 +2006,41 @@ std::string WGSLCodeGenerator::assembleIntrinsicCall(const FunctionCall& call, case k_notEqual_IntrinsicKind: return this->assembleBinaryOpIntrinsic(OperatorKind::NEQ, call, parentPrecedence); + case k_reflect_IntrinsicKind: + if (arguments[0]->type().isScalar()) { + // I - 2 * N * I * N + // We can use a scratch-let for N to dodge WGSL overflow errors. (skia:14385) + std::string I = this->writeNontrivialScratchLet(*arguments[0], + Precedence::kAdditive); + std::string N = all_arguments_constant(arguments) + ? this->writeScratchLet(*arguments[1], Precedence::kMultiplicative) + : this->writeNontrivialScratchLet(*arguments[1], Precedence::kMultiplicative); + return this->writeScratchLet(String::printf("%s - 2 * %s * %s * %s", + I.c_str(), N.c_str(), + I.c_str(), N.c_str())); + } + return this->assembleSimpleIntrinsic("reflect", call); + + case k_refract_IntrinsicKind: + if (arguments[0]->type().isScalar()) { + // WGSL only implements refract for vectors; rather than reimplementing refract from + // scratch, we can replace the call with `refract(float2(I,0), float2(N,0), eta).x`. + std::string I = this->writeNontrivialScratchLet(*arguments[0], + Precedence::kSequence); + std::string N = this->writeNontrivialScratchLet(*arguments[1], + Precedence::kSequence); + // We can use a scratch-let for Eta to avoid WGSL overflow errors. (skia:14385) + std::string Eta = all_arguments_constant(arguments) + ? this->writeScratchLet(*arguments[2], Precedence::kSequence) + : this->writeNontrivialScratchLet(*arguments[2], Precedence::kSequence); + return this->writeScratchLet( + String::printf("refract(vec2<%s>(%s, 0), vec2<%s>(%s, 0), %s).x", + to_wgsl_type(arguments[0]->type()).c_str(), I.c_str(), + to_wgsl_type(arguments[1]->type()).c_str(), N.c_str(), + Eta.c_str())); + } + return this->assembleSimpleIntrinsic("refract", call); + case k_clamp_IntrinsicKind: case k_max_IntrinsicKind: case k_min_IntrinsicKind: @@ -1856,16 +2048,60 @@ std::string WGSLCodeGenerator::assembleIntrinsicCall(const FunctionCall& call, case k_step_IntrinsicKind: return this->assembleVectorizedIntrinsic(call.function().name(), call); + case k_sample_IntrinsicKind: { + // Determine if a bias argument was passed in. + SkASSERT(arguments.size() == 2 || arguments.size() == 3); + bool callIncludesBias = (arguments.size() == 3); + + if (fProgram.fConfig->fSettings.fSharpenTextures || callIncludesBias) { + // We need to supply a bias argument; this is a separate intrinsic in WGSL. + std::string expr = this->assemblePartialSampleCall("textureSampleBias", + *arguments[0], + *arguments[1]); + expr += ", "; + if (callIncludesBias) { + expr += this->assembleExpression(*arguments[2], Precedence::kAdditive) + + " + "; + } + expr += skstd::to_string(fProgram.fConfig->fSettings.fSharpenTextures + ? kSharpenTexturesBias + : 0.0f); + return expr + ')'; + } + + // No bias is necessary, so we can call `textureSample` directly. + return this->assemblePartialSampleCall("textureSample", + *arguments[0], + *arguments[1]) + ')'; + } + case k_sampleLod_IntrinsicKind: + return this->assemblePartialSampleCall("textureSampleLevel", + *arguments[0], + *arguments[1]) + ", " + + this->assembleExpression(*arguments[2], Precedence::kSequence) + ')'; + + case k_sampleGrad_IntrinsicKind: + return this->assemblePartialSampleCall("textureSampleGrad", + *arguments[0], + *arguments[1]) + ", " + + this->assembleExpression(*arguments[2], Precedence::kSequence) + ", " + + this->assembleExpression(*arguments[3], Precedence::kSequence) + ')'; + case k_abs_IntrinsicKind: case k_acos_IntrinsicKind: + case k_all_IntrinsicKind: + case k_any_IntrinsicKind: case k_asin_IntrinsicKind: case k_ceil_IntrinsicKind: case k_cos_IntrinsicKind: + case k_cross_IntrinsicKind: case k_degrees_IntrinsicKind: + case k_distance_IntrinsicKind: case k_exp_IntrinsicKind: case k_exp2_IntrinsicKind: case k_floor_IntrinsicKind: case k_fract_IntrinsicKind: + case k_length_IntrinsicKind: case k_log_IntrinsicKind: case k_log2_IntrinsicKind: case k_radians_IntrinsicKind: @@ -1879,6 +2115,104 @@ std::string WGSLCodeGenerator::assembleIntrinsicCall(const FunctionCall& call, } } +static constexpr char kInverse2x2[] = + "fn mat2_inverse(m: mat2x2) -> mat2x2 {" +"\n" "return mat2x2(m[1].y, -m[0].y, -m[1].x, m[0].x) * (1/determinant(m));" +"\n" "}" +"\n"; + +static constexpr char kInverse3x3[] = + "fn mat3_inverse(m: mat3x3) -> mat3x3 {" +"\n" "let a00 = m[0].x; let a01 = m[0].y; let a02 = m[0].z;" +"\n" "let a10 = m[1].x; let a11 = m[1].y; let a12 = m[1].z;" +"\n" "let a20 = m[2].x; let a21 = m[2].y; let a22 = m[2].z;" +"\n" "let b01 = a22*a11 - a12*a21;" +"\n" "let b11 = -a22*a10 + a12*a20;" +"\n" "let b21 = a21*a10 - a11*a20;" +"\n" "let det = a00*b01 + a01*b11 + a02*b21;" +"\n" "return mat3x3(b01, (-a22*a01 + a02*a21), ( a12*a01 - a02*a11)," +"\n" "b11, ( a22*a00 - a02*a20), (-a12*a00 + a02*a10)," +"\n" "b21, (-a21*a00 + a01*a20), ( a11*a00 - a01*a10)) * (1/det);" +"\n" "}" +"\n"; + +static constexpr char kInverse4x4[] = + "fn mat4_inverse(m: mat4x4) -> mat4x4{" +"\n" "let a00 = m[0].x; let a01 = m[0].y; let a02 = m[0].z; let a03 = m[0].w;" +"\n" "let a10 = m[1].x; let a11 = m[1].y; let a12 = m[1].z; let a13 = m[1].w;" +"\n" "let a20 = m[2].x; let a21 = m[2].y; let a22 = m[2].z; let a23 = m[2].w;" +"\n" "let a30 = m[3].x; let a31 = m[3].y; let a32 = m[3].z; let a33 = m[3].w;" +"\n" "let b00 = a00*a11 - a01*a10;" +"\n" "let b01 = a00*a12 - a02*a10;" +"\n" "let b02 = a00*a13 - a03*a10;" +"\n" "let b03 = a01*a12 - a02*a11;" +"\n" "let b04 = a01*a13 - a03*a11;" +"\n" "let b05 = a02*a13 - a03*a12;" +"\n" "let b06 = a20*a31 - a21*a30;" +"\n" "let b07 = a20*a32 - a22*a30;" +"\n" "let b08 = a20*a33 - a23*a30;" +"\n" "let b09 = a21*a32 - a22*a31;" +"\n" "let b10 = a21*a33 - a23*a31;" +"\n" "let b11 = a22*a33 - a23*a32;" +"\n" "let det = b00*b11 - b01*b10 + b02*b09 + b03*b08 - b04*b07 + b05*b06;" +"\n" "return mat4x4(a11*b11 - a12*b10 + a13*b09," +"\n" "a02*b10 - a01*b11 - a03*b09," +"\n" "a31*b05 - a32*b04 + a33*b03," +"\n" "a22*b04 - a21*b05 - a23*b03," +"\n" "a12*b08 - a10*b11 - a13*b07," +"\n" "a00*b11 - a02*b08 + a03*b07," +"\n" "a32*b02 - a30*b05 - a33*b01," +"\n" "a20*b05 - a22*b02 + a23*b01," +"\n" "a10*b10 - a11*b08 + a13*b06," +"\n" "a01*b08 - a00*b10 - a03*b06," +"\n" "a30*b04 - a31*b02 + a33*b00," +"\n" "a21*b02 - a20*b04 - a23*b00," +"\n" "a11*b07 - a10*b09 - a12*b06," +"\n" "a00*b09 - a01*b07 + a02*b06," +"\n" "a31*b01 - a30*b03 - a32*b00," +"\n" "a20*b03 - a21*b01 + a22*b00) * (1/det);" +"\n" "}" +"\n"; + +std::string WGSLCodeGenerator::assembleInversePolyfill(const FunctionCall& call) { + const ExpressionArray& arguments = call.arguments(); + const Type& type = arguments.front()->type(); + + // The `inverse` intrinsic should only accept a single-argument square matrix. + // Once we implement f16 support, these polyfills will need to be updated to support `hmat`; + // for the time being, all floats in WGSL are f32, so we don't need to worry about precision. + SkASSERT(arguments.size() == 1); + SkASSERT(type.isMatrix()); + SkASSERT(type.rows() == type.columns()); + + switch (type.slotCount()) { + case 4: + if (!fWrittenInverse2) { + fWrittenInverse2 = true; + fHeader.writeText(kInverse2x2); + } + return this->assembleSimpleIntrinsic("mat2_inverse", call); + + case 9: + if (!fWrittenInverse3) { + fWrittenInverse3 = true; + fHeader.writeText(kInverse3x3); + } + return this->assembleSimpleIntrinsic("mat3_inverse", call); + + case 16: + if (!fWrittenInverse4) { + fWrittenInverse4 = true; + fHeader.writeText(kInverse4x4); + } + return this->assembleSimpleIntrinsic("mat4_inverse", call); + + default: + // We only support square matrices. + SkUNREACHABLE; + } +} + std::string WGSLCodeGenerator::assembleFunctionCall(const FunctionCall& call, Precedence parentPrecedence) { const FunctionDeclaration& func = call.function(); @@ -1915,9 +2249,9 @@ std::string WGSLCodeGenerator::assembleFunctionCall(const FunctionCall& call, substituteArgument.reserve_exact(args.size()); for (int index = 0; index < args.size(); ++index) { - if (params[index]->modifiers().fFlags & Modifiers::kOut_Flag) { + if (params[index]->modifierFlags() & ModifierFlag::kOut) { std::unique_ptr lvalue = this->makeLValue(*args[index]); - if (params[index]->modifiers().fFlags & Modifiers::kIn_Flag) { + if (params[index]->modifierFlags() & ModifierFlag::kIn) { // Load the lvalue's contents into the substitute argument. substituteArgument.push_back(this->writeScratchVar(args[index]->type(), lvalue->load())); @@ -1947,6 +2281,14 @@ std::string WGSLCodeGenerator::assembleFunctionCall(const FunctionCall& call, if (!substituteArgument[index].empty()) { // We need to take the address of the variable and pass it down as a pointer. expr += '&' + substituteArgument[index]; + } else if (args[index]->type().isSampler()) { + // If the argument is a sampler, we need to pass the texture _and_ its associated + // sampler. (Function parameter lists also convert sampler parameters into a matching + // texture/sampler parameter pair.) + expr += this->assembleExpression(*args[index], Precedence::kSequence) + + kTextureSuffix + ", " + + this->assembleExpression(*args[index], Precedence::kSequence) + + kSamplerSuffix; } else { expr += this->assembleExpression(*args[index], Precedence::kSequence); } @@ -2122,6 +2464,11 @@ std::string WGSLCodeGenerator::writeScratchLet(const std::string& expr) { return scratchVarName; } +std::string WGSLCodeGenerator::writeScratchLet(const Expression& expr, + Precedence parentPrecedence) { + return this->writeScratchLet(this->assembleExpression(expr, parentPrecedence)); +} + std::string WGSLCodeGenerator::writeNontrivialScratchLet(const Expression& expr, Precedence parentPrecedence) { std::string result = this->assembleExpression(expr, parentPrecedence); @@ -2206,43 +2553,53 @@ std::string WGSLCodeGenerator::assembleTernaryExpression(const TernaryExpression return expr; } +std::string WGSLCodeGenerator::variablePrefix(const Variable& v) { + if (v.storage() == Variable::Storage::kGlobal) { + // If the field refers to a pipeline IO parameter, then we access it via the synthesized IO + // structs. We make an explicit exception for `sk_PointSize` which we declare as a + // placeholder variable in global scope as it is not supported by WebGPU as a pipeline IO + // parameter (see comments in `writeStageOutputStruct`). + if (v.modifierFlags() & ModifierFlag::kIn) { + return "_stageIn."; + } + if (v.modifierFlags() & ModifierFlag::kOut) { + return "(*_stageOut)."; + } + + // If the field refers to an anonymous-interface-block structure, access it via the + // synthesized `_uniform0` or `_storage1` global. + if (const InterfaceBlock* ib = v.interfaceBlock()) { + if (const std::string* ibName = fInterfaceBlockNameMap.find(&ib->var()->type())) { + return *ibName + '.'; + } + } + + // If the field refers to an top-level uniform, access it via the synthesized + // `_globalUniforms` global. (Note that this should only occur in test code; Skia will + // always put uniforms in an interface block.) + if (is_in_global_uniforms(v)) { + return "_globalUniforms."; + } + } + + return ""; +} + std::string WGSLCodeGenerator::variableReferenceNameForLValue(const VariableReference& r) { - std::string expr; const Variable& v = *r.variable(); - bool needsDeref = false; - // When a variable is referenced in the context of a synthesized out-parameter helper argument, - // two special rules apply: - // 1. If it's accessed via a pipeline I/O or global uniforms struct, it should instead - // be referenced by name (since it's actually referring to a function parameter). - // 2. Its type should be treated as a pointer and should be dereferenced as such. - if (v.storage() == Variable::Storage::kGlobal) { - if (v.modifiers().fFlags & Modifiers::kIn_Flag) { - expr += "_stageIn."; - } else if (v.modifiers().fFlags & Modifiers::kOut_Flag) { - expr += "(*_stageOut)."; - } else if (is_in_global_uniforms(v)) { - expr += "_globalUniforms."; - } - } else if ((v.storage() == Variable::Storage::kParameter && - v.modifiers().fFlags & Modifiers::kOut_Flag)) { - // This is an out-parameter and its type is a pointer, which we need to dereference. - // We wrap the dereference in parentheses in case the value is used in an access expression - // later. - needsDeref = true; - expr += "(*"; - } - - expr += this->assembleName(v.mangledName()); - if (needsDeref) { - expr.push_back(')'); + if ((v.storage() == Variable::Storage::kParameter && + v.modifierFlags() & ModifierFlag::kOut)) { + // This is an out-parameter; it's pointer-typed, so we need to dereference it. We wrap the + // dereference in parentheses, in case the value is used in an access expression later. + return "(*" + this->assembleName(v.mangledName()) + ')'; } - return expr; + return this->variablePrefix(v) + this->assembleName(v.mangledName()); } std::string WGSLCodeGenerator::assembleVariableReference(const VariableReference& r) { - // TODO(skia:13092): Correctly handle RTFlip for built-ins. + // TODO(b/294274678): Correctly handle RTFlip for built-ins. const Variable& v = *r.variable(); // Insert a conversion expression if this is a built-in variable whose type differs from the @@ -2410,7 +2767,7 @@ std::string WGSLCodeGenerator::assembleEqualityExpression(const Type& left, std::string suffix = '[' + std::to_string(index) + ']'; expr += this->assembleEqualityExpression(vecType, leftName + suffix, vecType, rightName + suffix, - op, Precedence::kLogicalAnd); + op, Precedence::kParentheses); separator = combiner; } return expr + ')'; @@ -2425,7 +2782,7 @@ std::string WGSLCodeGenerator::assembleEqualityExpression(const Type& left, std::string suffix = '[' + std::to_string(index) + ']'; expr += this->assembleEqualityExpression(indexedType, leftName + suffix, indexedType, rightName + suffix, - op, Precedence::kLogicalAnd); + op, Precedence::kParentheses); separator = combiner; } return expr + ')'; @@ -2442,7 +2799,7 @@ std::string WGSLCodeGenerator::assembleEqualityExpression(const Type& left, expr += this->assembleEqualityExpression( *field.fType, leftName + '.' + std::string(field.fName), *field.fType, rightName + '.' + std::string(field.fName), - op, Precedence::kLogicalAnd); + op, Precedence::kParentheses); separator = combiner; } return expr + ')'; @@ -2455,20 +2812,20 @@ std::string WGSLCodeGenerator::assembleEqualityExpression(const Type& left, expr += isEqual ? "all(" : "any("; expr += leftName; - expr += op.operatorName(); + expr += operator_name(op); expr += rightName; return expr + ')'; } // Compare scalars via `x == y`. SkASSERT(right.isScalar()); - if (Precedence::kEquality >= parentPrecedence) { + if (parentPrecedence < Precedence::kSequence) { expr = '('; } expr += leftName; - expr += op.operatorName(); + expr += operator_name(op); expr += rightName; - if (Precedence::kEquality >= parentPrecedence) { + if (parentPrecedence < Precedence::kSequence) { expr += ')'; } return expr; @@ -2482,8 +2839,8 @@ std::string WGSLCodeGenerator::assembleEqualityExpression(const Expression& left if (left.type().isScalar() || left.type().isVector()) { // WGSL supports scalar and vector comparisons natively. We know the expressions will only // be emitted once, so there isn't a benefit to creating a let-declaration. - leftName = this->assembleExpression(left, Precedence::kAssignment); - rightName = this->assembleExpression(right, Precedence::kAssignment); + leftName = this->assembleExpression(left, Precedence::kParentheses); + rightName = this->assembleExpression(right, Precedence::kParentheses); } else { leftName = this->writeNontrivialScratchLet(left, Precedence::kAssignment); rightName = this->writeNontrivialScratchLet(right, Precedence::kAssignment); @@ -2527,26 +2884,72 @@ void WGSLCodeGenerator::writeProgramElement(const ProgramElement& e) { } } +void WGSLCodeGenerator::writeTextureOrSampler(const Variable& var, + int bindingLocation, + std::string_view suffix, + std::string_view wgslType) { + if (var.type().dimensions() != SpvDim2D) { + // Skia currently only uses 2D textures. + fContext.fErrors->error(var.varDeclaration()->position(), "unsupported texture dimensions"); + return; + } + + this->write("@group("); + this->write(std::to_string(std::max(0, var.layout().fSet))); + this->write(") @binding("); + this->write(std::to_string(bindingLocation)); + this->write(") var "); + this->write(this->assembleName(var.mangledName())); + this->write(suffix); + this->write(": "); + this->write(wgslType); + this->writeLine(";"); +} + void WGSLCodeGenerator::writeGlobalVarDeclaration(const GlobalVarDeclaration& d) { - const Variable& var = *d.declaration()->as().var(); - if ((var.modifiers().fFlags & (Modifiers::kIn_Flag | Modifiers::kOut_Flag)) || + const VarDeclaration& decl = d.varDeclaration(); + const Variable& var = *decl.var(); + if ((var.modifierFlags() & (ModifierFlag::kIn | ModifierFlag::kOut)) || is_in_global_uniforms(var)) { // Pipeline stage I/O parameters and top-level (non-block) uniforms are handled specially // in generateCode(). return; } + const Type::TypeKind varKind = var.type().typeKind(); + if (varKind == Type::TypeKind::kSampler) { + // If the sampler binding was unassigned, provide a scratch value; this will make + // golden-output tests pass, but will not actually be usable for drawing. + int samplerLocation = var.layout().fSampler >= 0 ? var.layout().fSampler + : 10000 + fScratchCount++; + this->writeTextureOrSampler(var, samplerLocation, kSamplerSuffix, "sampler"); + + // If the texture binding was unassigned, provide a scratch value (for golden-output tests). + int textureLocation = var.layout().fTexture >= 0 ? var.layout().fTexture + : 10000 + fScratchCount++; + this->writeTextureOrSampler(var, textureLocation, kTextureSuffix, "texture_2d"); + return; + } + + if (varKind == Type::TypeKind::kTexture) { + // If a binding location was unassigned, provide a scratch value (for golden-output tests). + int textureLocation = var.layout().fBinding >= 0 ? var.layout().fBinding + : 10000 + fScratchCount++; + // For a texture without an associated sampler, we don't apply a suffix. + this->writeTextureOrSampler(var, textureLocation, /*suffix=*/"", "texture_2d"); + return; + } + // TODO(skia:13092): Implement workgroup variable decoration std::string initializer; - if (d.varDeclaration().value()) { + if (decl.value()) { // We assume here that the initial-value expression will not emit any helper statements. // Initial-value expressions are required to pass IsConstantExpression, which limits the // blast radius to constructors, literals, and other constant values/variables. initializer += " = "; - initializer += this->assembleExpression(*d.varDeclaration().value(), - Precedence::kAssignment); + initializer += this->assembleExpression(*decl.value(), Precedence::kAssignment); } - this->write((var.modifiers().fFlags & Modifiers::kConst_Flag) ? "const " : "var "); + this->write(var.modifierFlags().isConst() ? "const " : "var "); this->write(this->assembleName(var.mangledName())); this->write(": " + to_wgsl_type(var.type())); this->write(initializer); @@ -2556,21 +2959,53 @@ void WGSLCodeGenerator::writeGlobalVarDeclaration(const GlobalVarDeclaration& d) void WGSLCodeGenerator::writeStructDefinition(const StructDefinition& s) { const Type& type = s.type(); this->writeLine("struct " + type.displayName() + " {"); - fIndentation++; - this->writeFields(SkSpan(type.fields()), type.fPosition); - fIndentation--; + this->writeFields(type.fields(), /*memoryLayout=*/nullptr); this->writeLine("};"); } -void WGSLCodeGenerator::writeFields(SkSpan fields, - Position parentPos, - const MemoryLayout*) { - // TODO(skia:13092): Check alignment against `layout` constraints, if present. A layout - // constraint will be specified for interface blocks and for structs that appear in a block. - for (const Field& field : fields) { - const Type* fieldType = field.fType; - this->writeVariableDecl(*fieldType, field.fName, Delimiter::kComma); +void WGSLCodeGenerator::writeFields(SkSpan fields, const MemoryLayout* memoryLayout) { + fIndentation++; + + // TODO(skia:14370): array uniforms may need manual fixup for std140 padding. (Those uniforms + // will also need special handling when they are accessed, or passed to functions.) + for (size_t index = 0; index < fields.size(); ++index) { + const Field& field = fields[index]; + if (memoryLayout && !memoryLayout->isSupported(*field.fType)) { + // Reject types that aren't supported by the memory layout. + fContext.fErrors->error(field.fPosition, "type '" + std::string(field.fType->name()) + + "' is not permitted here"); + return; + } + + // Prepend @size(n) to enforce the offsets from the SkSL layout. (This is effectively + // a gadget that we can use to insert padding between elements.) + if (index < fields.size() - 1) { + int thisFieldOffset = field.fLayout.fOffset; + int nextFieldOffset = fields[index + 1].fLayout.fOffset; + if (index == 0 && thisFieldOffset > 0) { + fContext.fErrors->error(field.fPosition, "field must have an offset of zero"); + return; + } + if (thisFieldOffset >= 0 && nextFieldOffset > thisFieldOffset) { + this->write("@size("); + this->write(std::to_string(nextFieldOffset - thisFieldOffset)); + this->write(") "); + } + } + + this->write(this->assembleName(field.fName)); + this->write(": "); + if (fMatrixPolyfillFields.contains(&field)) { + this->write("_skMatrix"); + this->write(std::to_string(field.fType->columns())); + this->write(std::to_string(field.fType->rows())); + } else { + this->write(to_wgsl_type(*field.fType)); + } + this->writeLine(","); } + + fIndentation--; } void WGSLCodeGenerator::writeStageInputStruct() { @@ -2595,10 +3030,10 @@ void WGSLCodeGenerator::writeStageInputStruct() { if (e->is()) { const Variable* v = e->as().declaration() ->as().var(); - if (v->modifiers().fFlags & Modifiers::kIn_Flag) { - this->writePipelineIODeclaration(v->modifiers(), v->type(), v->mangledName(), + if (v->modifierFlags() & ModifierFlag::kIn) { + this->writePipelineIODeclaration(v->layout(), v->type(), v->mangledName(), Delimiter::kComma); - if (v->modifiers().fLayout.fBuiltin == SK_FRAGCOORD_BUILTIN) { + if (v->layout().fBuiltin == SK_FRAGCOORD_BUILTIN) { declaredFragCoordsBuiltin = true; } } @@ -2609,11 +3044,11 @@ void WGSLCodeGenerator::writeStageInputStruct() { // // TODO(armansito): Is it legal to have an interface block without a storage qualifier // but with members that have individual storage qualifiers? - if (v->modifiers().fFlags & Modifiers::kIn_Flag) { + if (v->modifierFlags() & ModifierFlag::kIn) { for (const auto& f : v->type().fields()) { - this->writePipelineIODeclaration(f.fModifiers, *f.fType, f.fName, + this->writePipelineIODeclaration(f.fLayout, *f.fType, f.fName, Delimiter::kComma); - if (f.fModifiers.fLayout.fBuiltin == SK_FRAGCOORD_BUILTIN) { + if (f.fLayout.fBuiltin == SK_FRAGCOORD_BUILTIN) { declaredFragCoordsBuiltin = true; } } @@ -2650,8 +3085,8 @@ void WGSLCodeGenerator::writeStageOutputStruct() { if (e->is()) { const Variable* v = e->as().declaration() ->as().var(); - if (v->modifiers().fFlags & Modifiers::kOut_Flag) { - this->writePipelineIODeclaration(v->modifiers(), v->type(), v->mangledName(), + if (v->modifierFlags() & ModifierFlag::kOut) { + this->writePipelineIODeclaration(v->layout(), v->type(), v->mangledName(), Delimiter::kComma); } } else if (e->is()) { @@ -2661,13 +3096,13 @@ void WGSLCodeGenerator::writeStageOutputStruct() { // // TODO(armansito): Is it legal to have an interface block without a storage qualifier // but with members that have individual storage qualifiers? - if (v->modifiers().fFlags & Modifiers::kOut_Flag) { + if (v->modifierFlags() & ModifierFlag::kOut) { for (const auto& f : v->type().fields()) { - this->writePipelineIODeclaration(f.fModifiers, *f.fType, f.fName, + this->writePipelineIODeclaration(f.fLayout, *f.fType, f.fName, Delimiter::kComma); - if (f.fModifiers.fLayout.fBuiltin == SK_POSITION_BUILTIN) { + if (f.fLayout.fBuiltin == SK_POSITION_BUILTIN) { declaredPositionBuiltin = true; - } else if (f.fModifiers.fLayout.fBuiltin == SK_POINTSIZE_BUILTIN) { + } else if (f.fLayout.fBuiltin == SK_POINTSIZE_BUILTIN) { // sk_PointSize is explicitly not supported by `builtin_from_sksl_name` so // writePipelineIODeclaration will never write it. We mark it here if the // declaration is needed so we can synthesize it below. @@ -2697,22 +3132,169 @@ void WGSLCodeGenerator::writeStageOutputStruct() { } } +void WGSLCodeGenerator::writeUniformPolyfills(const Type& structType, + MemoryLayout::Standard nativeLayout) { + SkSL::MemoryLayout std140(MemoryLayout::Standard::k140); + SkSL::MemoryLayout native(nativeLayout); + + for (const Field& field : structType.fields()) { + // Matrices will be represented as 16-byte aligned arrays in std140, and reconstituted into + // proper matrices as they are later accessed. We need to synthesize helpers for this. + if (field.fType->isMatrix()) { + // A polyfill is only necessary if the std140 layout (what Skia provides) actually + // differs from native layout (what WGSL expects). Otherwise the matrix is used as-is. + if (std140.stride(*field.fType) == native.stride(*field.fType)) { + continue; + } + + // Add a polyfill for this matrix type. + fMatrixPolyfillFields.add(&field); + + int c = field.fType->columns(); + int r = field.fType->rows(); + if (!fWrittenUniformRowPolyfill[r]) { + fWrittenUniformRowPolyfill[r] = true; + + this->write("struct _skRow"); + this->write(std::to_string(r)); + this->writeLine(" {"); + this->write(" @size(16) r : vec"); + this->write(std::to_string(r)); + this->write("<"); + this->write(to_wgsl_type(field.fType->componentType())); + this->writeLine(">"); + this->writeLine("};"); + } + + if (!fWrittenUniformMatrixPolyfill[c][r]) { + fWrittenUniformMatrixPolyfill[c][r] = true; + + this->write("struct _skMatrix"); + this->write(std::to_string(c)); + this->write(std::to_string(r)); + this->writeLine(" {"); + this->write(" c : array<_skRow"); + this->write(std::to_string(r)); + this->write(", "); + this->write(std::to_string(c)); + this->writeLine(">"); + this->writeLine("};"); + + this->write("fn _skMatrixUnpack"); + this->write(std::to_string(c)); + this->write(std::to_string(r)); + this->write("(m : _skMatrix"); + this->write(std::to_string(c)); + this->write(std::to_string(r)); + this->write(") -> "); + this->write(to_wgsl_type(*field.fType)); + this->writeLine(" {"); + this->write(" return "); + this->write(to_wgsl_type(*field.fType)); + this->write("("); + auto separator = String::Separator(); + for (int column = 0; column < c; column++) { + this->write(separator()); + this->write("m.c["); + this->write(std::to_string(column)); + this->write("].r"); + } + this->writeLine(");"); + this->writeLine("}"); + } + } + } +} + +void WGSLCodeGenerator::writeUniformsAndBuffers() { + for (const ProgramElement* e : fProgram.elements()) { + // Iterate through the interface blocks. + if (!e->is()) { + continue; + } + const InterfaceBlock& ib = e->as(); + + // Determine if this interface block holds uniforms, buffers, or something else (skip it). + std::string_view addressSpace; + std::string_view accessMode; + MemoryLayout::Standard nativeLayout; + if (ib.var()->modifierFlags().isUniform()) { + addressSpace = "uniform"; + nativeLayout = MemoryLayout::Standard::kWGSLUniform; + } else if (ib.var()->modifierFlags().isBuffer()) { + addressSpace = "storage"; + nativeLayout = MemoryLayout::Standard::kWGSLStorage; + if (ib.var()->modifierFlags().isReadOnly()) { + accessMode = ", read"; + } else if (ib.var()->modifierFlags().isWriteOnly()) { + accessMode = ", write"; + } else { + accessMode = ", read_write"; + } + } else { + continue; + } + + this->writeUniformPolyfills(ib.var()->type().componentType(), nativeLayout); + + // Create a struct to hold all of the fields from this InterfaceBlock. + SkASSERT(!ib.typeName().empty()); + this->write("struct "); + this->write(ib.typeName()); + this->writeLine(" {"); + + // If we have an anonymous interface block, assign a name like `_uniform0` or `_storage1`. + std::string instanceName; + if (ib.instanceName().empty()) { + instanceName = "_" + std::string(addressSpace) + std::to_string(fScratchCount++); + fInterfaceBlockNameMap[&ib.var()->type()] = instanceName; + } else { + instanceName = std::string(ib.instanceName()); + } + + // Find the struct type and fields used by this interface block. + const Type& ibType = ib.var()->type().componentType(); + SkASSERT(ibType.isStruct()); + + SkSpan ibFields = ibType.fields(); + SkASSERT(!ibFields.empty()); + + MemoryLayout layout(MemoryLayout::Standard::k140); + this->writeFields(ibFields, &layout); + this->writeLine("};"); + this->write("@group("); + this->write(std::to_string(std::max(0, ib.var()->layout().fSet))); + this->write(") @binding("); + this->write(std::to_string(std::max(0, ib.var()->layout().fBinding))); + this->write(") var<"); + this->write(addressSpace); + this->write(accessMode); + this->write("> "); + this->write(instanceName); + this->write(" : "); + this->write(to_wgsl_type(ib.var()->type())); + this->writeLine(";"); + } +} + void WGSLCodeGenerator::writeNonBlockUniformsForTests() { + bool declaredUniformsStruct = false; + for (const ProgramElement* e : fProgram.elements()) { if (e->is()) { const GlobalVarDeclaration& decls = e->as(); const Variable& var = *decls.varDeclaration().var(); if (is_in_global_uniforms(var)) { - if (!fDeclaredUniformsStruct) { + if (!declaredUniformsStruct) { this->write("struct _GlobalUniforms {\n"); - fDeclaredUniformsStruct = true; + declaredUniformsStruct = true; } this->write(" "); this->writeVariableDecl(var.type(), var.mangledName(), Delimiter::kComma); } } } - if (fDeclaredUniformsStruct) { + if (declaredUniformsStruct) { int binding = fProgram.fConfig->fSettings.fDefaultUniformBinding; int set = fProgram.fConfig->fSettings.fDefaultUniformSet; this->write("};\n"); @@ -2723,15 +3305,15 @@ void WGSLCodeGenerator::writeNonBlockUniformsForTests() { } std::string WGSLCodeGenerator::functionDependencyArgs(const FunctionDeclaration& f) { - FunctionDependencies* deps = fRequirements.dependencies.find(&f); + WGSLFunctionDependencies* deps = fRequirements.dependencies.find(&f); std::string args; - if (deps && *deps != FunctionDependencies::kNone) { + if (deps && *deps) { const char* separator = ""; - if ((*deps & FunctionDependencies::kPipelineInputs) != FunctionDependencies::kNone) { + if (*deps & WGSLFunctionDependency::kPipelineInputs) { args += "_stageIn"; separator = ", "; } - if ((*deps & FunctionDependencies::kPipelineOutputs) != FunctionDependencies::kNone) { + if (*deps & WGSLFunctionDependency::kPipelineOutputs) { args += separator; args += "_stageOut"; } @@ -2740,8 +3322,8 @@ std::string WGSLCodeGenerator::functionDependencyArgs(const FunctionDeclaration& } bool WGSLCodeGenerator::writeFunctionDependencyParams(const FunctionDeclaration& f) { - FunctionDependencies* deps = fRequirements.dependencies.find(&f); - if (!deps || *deps == FunctionDependencies::kNone) { + WGSLFunctionDependencies* deps = fRequirements.dependencies.find(&f); + if (!deps || !*deps) { return false; } @@ -2750,13 +3332,13 @@ bool WGSLCodeGenerator::writeFunctionDependencyParams(const FunctionDeclaration& return false; } const char* separator = ""; - if ((*deps & FunctionDependencies::kPipelineInputs) != FunctionDependencies::kNone) { + if (*deps & WGSLFunctionDependency::kPipelineInputs) { this->write("_stageIn: "); separator = ", "; this->write(structNamePrefix); this->write("In"); } - if ((*deps & FunctionDependencies::kPipelineOutputs) != FunctionDependencies::kNone) { + if (*deps & WGSLFunctionDependency::kPipelineOutputs) { this->write(separator); this->write("_stageOut: ptrwrite(structNamePrefix); diff --git a/src/sksl/codegen/SkSLWGSLCodeGenerator.h b/src/sksl/codegen/SkSLWGSLCodeGenerator.h index 38bec74835a8..0c3e08de19c8 100644 --- a/src/sksl/codegen/SkSLWGSLCodeGenerator.h +++ b/src/sksl/codegen/SkSLWGSLCodeGenerator.h @@ -10,8 +10,11 @@ #include "include/core/SkSpan.h" #include "include/private/SkSLDefines.h" +#include "src/base/SkEnumBitMask.h" #include "src/core/SkTHash.h" +#include "src/sksl/SkSLMemoryLayout.h" #include "src/sksl/SkSLOperator.h" +#include "src/sksl/SkSLStringStream.h" #include "src/sksl/codegen/SkSLCodeGenerator.h" #include @@ -21,10 +24,6 @@ #include #include -namespace sknonstd { -template struct is_bitmask_enum; -} // namespace sknonstd - namespace SkSL { class AnyConstructor; @@ -46,11 +45,9 @@ class GlobalVarDeclaration; class IfStatement; class IndexExpression; enum IntrinsicKind : int8_t; +struct Layout; class Literal; -class MemoryLayout; -struct Modifiers; class OutputStream; -class Position; class PostfixExpression; class PrefixExpression; struct Program; @@ -64,8 +61,27 @@ class Swizzle; class TernaryExpression; class Type; class VarDeclaration; +class Variable; class VariableReference; +// Represents a function's dependencies that are not accessible in global scope. For instance, +// pipeline stage input and output parameters must be passed in as an argument. +// +// This is a bitmask enum. (It would be inside `class WGSLCodeGenerator`, but this leads to build +// errors in MSVC.) +enum class WGSLFunctionDependency : uint8_t { + kNone = 0, + kPipelineInputs = 1 << 0, + kPipelineOutputs = 1 << 1, +}; +using WGSLFunctionDependencies = SkEnumBitMask; + +} // namespace SkSL + +SK_MAKE_BITMASK_OPS(SkSL::WGSLFunctionDependency) + +namespace SkSL { + /** * Convert a Program into WGSL code. */ @@ -92,15 +108,6 @@ class WGSLCodeGenerator : public CodeGenerator { kNumWorkgroups, // input }; - // Represents a function's dependencies that are not accessible in global scope. For instance, - // pipeline stage input and output parameters must be passed in as an argument. - // - // This is a bitmask enum. - enum class FunctionDependencies : uint8_t { - kNone = 0, - kPipelineInputs = 1, - kPipelineOutputs = 2, - }; // Variable declarations can be terminated by: // - comma (","), e.g. in struct member declarations or function parameters @@ -114,7 +121,8 @@ class WGSLCodeGenerator : public CodeGenerator { }; struct ProgramRequirements { - using DepsMap = skia_private::THashMap; + using DepsMap = skia_private::THashMap; ProgramRequirements() = default; ProgramRequirements(DepsMap dependencies, bool mainNeedsCoordsArgument) @@ -159,7 +167,7 @@ class WGSLCodeGenerator : public CodeGenerator { void writeVariableDecl(const Type& type, std::string_view name, Delimiter delimiter); // Helpers to declare a pipeline stage IO parameter declaration. - void writePipelineIODeclaration(Modifiers modifiers, + void writePipelineIODeclaration(const Layout& layout, const Type& type, std::string_view name, Delimiter delimiter); @@ -203,6 +211,7 @@ class WGSLCodeGenerator : public CodeGenerator { std::unique_ptr makeLValue(const Expression& e); std::string variableReferenceNameForLValue(const VariableReference& r); + std::string variablePrefix(const Variable& v); // Writers for expressions. These return the final expression text as a string, and emit any // necessary setup code directly into the program as necessary. The returned expression may be @@ -214,6 +223,10 @@ class WGSLCodeGenerator : public CodeGenerator { const Expression& right, const Type& resultType, Precedence parentPrecedence); + std::string assembleBinaryExpressionElement(const Expression& expr, + Operator op, + const Expression& other, + Precedence parentPrecedence); std::string assembleFieldAccess(const FieldAccess& f); std::string assembleFunctionCall(const FunctionCall& call, Precedence parentPrecedence); std::string assembleIndexExpression(const IndexExpression& i); @@ -238,6 +251,10 @@ class WGSLCodeGenerator : public CodeGenerator { Precedence parentPrecedence); std::string assembleVectorizedIntrinsic(std::string_view intrinsicName, const FunctionCall& call); + std::string assemblePartialSampleCall(std::string_view functionName, + const Expression& sampler, + const Expression& coords); + std::string assembleInversePolyfill(const FunctionCall& call); // Constructor expressions std::string assembleAnyConstructor(const AnyConstructor& c, Precedence parentPrecedence); @@ -270,6 +287,7 @@ class WGSLCodeGenerator : public CodeGenerator { // Writes a scratch let-variable into the program, gives it the value of `expr`, and returns its // name (e.g. `_skTemp123`). std::string writeScratchLet(const std::string& expr); + std::string writeScratchLet(const Expression& expr, Precedence parentPrecedence); // Converts `expr` into a string and returns a scratch let-variable associated with the // expression. Compile-time constants and plain variable references will return the expression @@ -285,13 +303,18 @@ class WGSLCodeGenerator : public CodeGenerator { // space layout constraints // (https://www.w3.org/TR/WGSL/#address-space-layout-constraints) if a `layout` is // provided. A struct that does not need to be host-shareable does not require a `layout`. - void writeFields(SkSpan fields, - Position parentPos, - const MemoryLayout* layout = nullptr); + void writeFields(SkSpan fields, const MemoryLayout* memoryLayout = nullptr); - // We bundle all varying pipeline stage inputs and outputs in a struct. + // We bundle uniforms, and all varying pipeline stage inputs and outputs, into separate structs. void writeStageInputStruct(); void writeStageOutputStruct(); + void writeUniformsAndBuffers(); + void writeUniformPolyfills(const Type& structType, MemoryLayout::Standard nativeLayout); + + void writeTextureOrSampler(const Variable& var, + int bindingLocation, + std::string_view suffix, + std::string_view wgslType); // Writes all top-level non-opaque global uniform declarations (i.e. not part of an interface // block) into a single uniform block binding. @@ -313,11 +336,29 @@ class WGSLCodeGenerator : public CodeGenerator { std::string functionDependencyArgs(const FunctionDeclaration&); bool writeFunctionDependencyParams(const FunctionDeclaration&); + // Code in the header appears before the main body of code. + StringStream fHeader; + + // We assign unique names to anonymous interface blocks based on the type. + skia_private::THashMap fInterfaceBlockNameMap; + // Stores the disallowed identifier names. skia_private::THashSet fReservedWords; ProgramRequirements fRequirements; int fPipelineInputCount = 0; - bool fDeclaredUniformsStruct = false; + + // These fields track whether we have written the polyfill for `inverse()` for a given matrix + // type. + bool fWrittenInverse2 = false; + bool fWrittenInverse3 = false; + bool fWrittenInverse4 = false; + + // These fields control uniform-matrix polyfill support. Because our uniform data is provided in + // std140 layout, matrices need to be represented as arrays of @size(16)-aligned vectors, and + // are unpacked as they are referenced. + skia_private::THashSet fMatrixPolyfillFields; + bool fWrittenUniformMatrixPolyfill[5][5] = {}; // m[column][row] for each matrix type + bool fWrittenUniformRowPolyfill[5] = {}; // for each matrix row-size // Output processing state. int fIndentation = 0; @@ -331,9 +372,4 @@ class WGSLCodeGenerator : public CodeGenerator { } // namespace SkSL -namespace sknonstd { -template <> -struct is_bitmask_enum : std::true_type {}; -} // namespace sknonstd - #endif // SKSL_WGSLCODEGENERATOR diff --git a/src/sksl/dsl/BUILD.bazel b/src/sksl/dsl/BUILD.bazel deleted file mode 100644 index d2e32a93552e..000000000000 --- a/src/sksl/dsl/BUILD.bazel +++ /dev/null @@ -1,19 +0,0 @@ -load("//bazel:skia_rules.bzl", "exports_files_legacy", "skia_filegroup") - -licenses(["notice"]) - -exports_files_legacy() - -skia_filegroup( - name = "srcs", - srcs = [ - "DSLExpression.cpp", - "DSLExpression.h", - "DSLModifiers.h", - "DSLStatement.cpp", - "DSLStatement.h", - "DSLType.cpp", - "DSLType.h", - ], - visibility = ["//src/sksl:__pkg__"], -) diff --git a/src/sksl/dsl/DSLExpression.cpp b/src/sksl/dsl/DSLExpression.cpp deleted file mode 100644 index 8ade99da8c16..000000000000 --- a/src/sksl/dsl/DSLExpression.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#include "src/sksl/dsl/DSLExpression.h" - -#include "include/core/SkTypes.h" -#include "include/private/base/SkTArray.h" -#include "src/sksl/SkSLThreadContext.h" -#include "src/sksl/dsl/DSLType.h" -#include "src/sksl/ir/SkSLExpression.h" -#include "src/sksl/ir/SkSLPoison.h" - -#include - -using namespace skia_private; - -namespace SkSL { -namespace dsl { - -DSLExpression::DSLExpression(std::unique_ptr expression, Position pos) - : fExpression(expression ? std::move(expression) - : SkSL::Poison::Make(pos, ThreadContext::Context())) { - // If a position was passed in, it must match the expression's position. - SkASSERTF(!pos.valid() || this->position() == pos, - "expected expression position (%d-%d), but received (%d-%d)", - pos.startOffset(), pos.endOffset(), - this->position().startOffset(), this->position().endOffset()); -} - -DSLExpression DSLExpression::Poison(Position pos) { - return DSLExpression(SkSL::Poison::Make(pos, ThreadContext::Context())); -} - -bool DSLExpression::isValid() const { - return this->hasValue() && !fExpression->is(); -} - -DSLType DSLExpression::type() const { - if (!this->hasValue()) { - return DSLType::Void(); - } - return &fExpression->type(); -} - -std::string DSLExpression::description() const { - SkASSERT(this->hasValue()); - return fExpression->description(); -} - -Position DSLExpression::position() const { - SkASSERT(this->hasValue()); - return fExpression->fPosition; -} - -void DSLExpression::setPosition(Position pos) { - SkASSERT(this->hasValue()); - fExpression->fPosition = pos; -} - -} // namespace dsl -} // namespace SkSL diff --git a/src/sksl/dsl/DSLExpression.h b/src/sksl/dsl/DSLExpression.h deleted file mode 100644 index 47888795e999..000000000000 --- a/src/sksl/dsl/DSLExpression.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#ifndef SKSL_DSL_EXPRESSION -#define SKSL_DSL_EXPRESSION - -#include "include/private/base/SkAssert.h" -#include "src/sksl/SkSLPosition.h" -#include "src/sksl/ir/SkSLExpression.h" - -#include -#include -#include -#include - -namespace SkSL::dsl { - -class DSLType; - -/** - * Represents an expression such as 'cos(x)' or 'a + b'. - */ -class DSLExpression { -public: - DSLExpression() = default; - ~DSLExpression() = default; - - DSLExpression(DSLExpression&&) = default; - DSLExpression& operator=(DSLExpression&&) = default; - - DSLExpression(const DSLExpression&) = delete; - DSLExpression& operator=(const DSLExpression&) = delete; - - // If expression is null, returns Poison. - explicit DSLExpression(std::unique_ptr expression, Position pos = {}); - - static DSLExpression Poison(Position pos = {}); - - DSLType type() const; - - std::string description() const; - - Position position() const; - - void setPosition(Position pos); - - /** - * Returns true if this object contains an expression. DSLExpressions which were created with - * the empty constructor or which have already been release()ed do not have a value. - * DSLExpressions created with errors are still considered to have a value (but contain poison). - */ - bool hasValue() const { - return fExpression != nullptr; - } - - /** - * Returns true if this object contains an expression which is not poison. - */ - bool isValid() const; - - /** - * Invalidates this object and returns the SkSL expression it represents. It is an error to call - * this on an invalid DSLExpression. - */ - std::unique_ptr release() { - SkASSERT(this->hasValue()); - return std::move(fExpression); - } - - /** - * Calls release if this expression has a value, otherwise returns null. - */ - std::unique_ptr releaseIfPossible() { - return std::move(fExpression); - } - -private: - std::unique_ptr fExpression; -}; - -} // namespace SkSL::dsl - -template struct sk_is_trivially_relocatable; - -template <> -struct sk_is_trivially_relocatable : std::true_type {}; - -#endif diff --git a/src/sksl/dsl/DSLModifiers.h b/src/sksl/dsl/DSLModifiers.h deleted file mode 100644 index a4a476167873..000000000000 --- a/src/sksl/dsl/DSLModifiers.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#ifndef SKSL_DSL_MODIFIERS -#define SKSL_DSL_MODIFIERS - -#include "src/sksl/SkSLPosition.h" -#include "src/sksl/ir/SkSLModifiers.h" - -namespace SkSL::dsl { - -struct DSLModifiers { - SkSL::Modifiers fModifiers; - Position fPosition; -}; - -} // namespace SkSL::dsl - -#endif diff --git a/src/sksl/dsl/DSLStatement.cpp b/src/sksl/dsl/DSLStatement.cpp deleted file mode 100644 index eea38c1280f2..000000000000 --- a/src/sksl/dsl/DSLStatement.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2021 Google LLC. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#include "src/sksl/dsl/DSLStatement.h" - -#include "src/sksl/SkSLPosition.h" -#include "src/sksl/SkSLThreadContext.h" -#include "src/sksl/dsl/DSLExpression.h" -#include "src/sksl/ir/SkSLExpression.h" -#include "src/sksl/ir/SkSLExpressionStatement.h" -#include "src/sksl/ir/SkSLNop.h" - -namespace SkSL::dsl { - -DSLStatement::DSLStatement(DSLExpression expr) { - std::unique_ptr skslExpr = expr.release(); - if (skslExpr) { - fStatement = SkSL::ExpressionStatement::Convert(ThreadContext::Context(), - std::move(skslExpr)); - } -} - -DSLStatement::DSLStatement(std::unique_ptr stmt) - : fStatement(std::move(stmt)) { - SkASSERT(this->hasValue()); -} - -DSLStatement::DSLStatement(std::unique_ptr stmt, Position pos) - : fStatement(stmt ? std::move(stmt) : SkSL::Nop::Make()) { - if (pos.valid() && !fStatement->fPosition.valid()) { - fStatement->fPosition = pos; - } -} - -} // namespace SkSL::dsl diff --git a/src/sksl/dsl/DSLStatement.h b/src/sksl/dsl/DSLStatement.h deleted file mode 100644 index d639027046a3..000000000000 --- a/src/sksl/dsl/DSLStatement.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2021 Google LLC. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#ifndef SKSL_DSL_STATEMENT -#define SKSL_DSL_STATEMENT - -#include "include/core/SkTypes.h" -#include "src/sksl/SkSLPosition.h" -#include "src/sksl/ir/SkSLStatement.h" - -#include -#include - -namespace SkSL::dsl { - -class DSLExpression; - -class DSLStatement { -public: - DSLStatement() = default; - ~DSLStatement() = default; - - DSLStatement(DSLStatement&&) = default; - DSLStatement& operator=(DSLStatement&& other) = default; - - DSLStatement(const DSLStatement&) = delete; - DSLStatement& operator=(const DSLStatement& other) = delete; - - DSLStatement(DSLExpression expr); - - DSLStatement(std::unique_ptr stmt, Position pos); - DSLStatement(std::unique_ptr stmt); - - Position position() { - SkASSERT(this->hasValue()); - return fStatement->fPosition; - } - - void setPosition(Position pos) { - SkASSERT(this->hasValue()); - fStatement->fPosition = pos; - } - - bool hasValue() { return fStatement != nullptr; } - - std::unique_ptr release() { - SkASSERT(this->hasValue()); - return std::move(fStatement); - } - - std::unique_ptr releaseIfPossible() { - return std::move(fStatement); - } - -private: - std::unique_ptr fStatement; -}; - -} // namespace SkSL::dsl - -#endif diff --git a/src/sksl/dsl/DSLType.cpp b/src/sksl/dsl/DSLType.cpp deleted file mode 100644 index 29fce6db672d..000000000000 --- a/src/sksl/dsl/DSLType.cpp +++ /dev/null @@ -1,175 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#include "src/sksl/dsl/DSLType.h" - -#include "include/core/SkSpan.h" -#include "include/core/SkTypes.h" -#include "include/private/base/SkTArray.h" -#include "src/sksl/SkSLBuiltinTypes.h" -#include "src/sksl/SkSLContext.h" -#include "src/sksl/SkSLErrorReporter.h" -#include "src/sksl/SkSLProgramSettings.h" -#include "src/sksl/SkSLString.h" -#include "src/sksl/SkSLThreadContext.h" -#include "src/sksl/ir/SkSLSymbol.h" -#include "src/sksl/ir/SkSLSymbolTable.h" // IWYU pragma: keep -#include "src/sksl/ir/SkSLType.h" - -#include -#include - -using namespace skia_private; - -namespace SkSL { - -struct Modifiers; - -namespace dsl { - -static const SkSL::Type* verify_type(const Context& context, - const SkSL::Type* type, - bool allowGenericTypes, - Position pos) { - if (!context.fConfig->fIsBuiltinCode && type) { - if (!allowGenericTypes && (type->isGeneric() || type->isLiteral())) { - context.fErrors->error(pos, "type '" + std::string(type->name()) + "' is generic"); - return context.fTypes.fPoison.get(); - } - if (!type->isAllowedInES2(context)) { - context.fErrors->error(pos, "type '" + std::string(type->name()) +"' is not supported"); - return context.fTypes.fPoison.get(); - } - } - return type; -} - -static const SkSL::Type* find_type(const Context& context, std::string_view name, Position pos) { - const Symbol* symbol = context.fSymbolTable->find(name); - if (!symbol) { - context.fErrors->error(pos, String::printf("no symbol named '%.*s'", - (int)name.length(), name.data())); - return context.fTypes.fPoison.get(); - } - if (!symbol->is()) { - context.fErrors->error(pos, String::printf("symbol '%.*s' is not a type", - (int)name.length(), name.data())); - return context.fTypes.fPoison.get(); - } - const SkSL::Type* type = &symbol->as(); - return verify_type(context, type, /*allowGenericTypes=*/false, pos); -} - -static const SkSL::Type* find_type(const Context& context, - std::string_view name, - Position overallPos, - Modifiers* modifiers, - Position modifiersPos) { - const Type* type = find_type(context, name, overallPos); - return type->applyQualifiers(context, modifiers, modifiersPos); -} - -DSLType::DSLType(std::string_view name, Position pos) - : fSkSLType(find_type(ThreadContext::Context(), name, pos)) {} - -DSLType::DSLType(std::string_view name, - Position overallPos, - SkSL::Modifiers* modifiers, - Position modifiersPos) - : fSkSLType(find_type(ThreadContext::Context(), - name, - overallPos, - modifiers, - modifiersPos)) {} - -DSLType::DSLType(const SkSL::Type* type, Position pos) - : fSkSLType(verify_type(ThreadContext::Context(), type, /*allowGenericTypes=*/true, pos)) {} - -DSLType DSLType::Invalid() { - return DSLType(ThreadContext::Context().fTypes.fInvalid.get(), Position()); -} - -DSLType DSLType::Poison() { - return DSLType(ThreadContext::Context().fTypes.fPoison.get(), Position()); -} - -DSLType DSLType::Void() { - return DSLType(ThreadContext::Context().fTypes.fVoid.get(), Position()); -} - -bool DSLType::isBoolean() const { - return this->skslType().isBoolean(); -} - -bool DSLType::isNumber() const { - return this->skslType().isNumber(); -} - -bool DSLType::isFloat() const { - return this->skslType().isFloat(); -} - -bool DSLType::isSigned() const { - return this->skslType().isSigned(); -} - -bool DSLType::isUnsigned() const { - return this->skslType().isUnsigned(); -} - -bool DSLType::isInteger() const { - return this->skslType().isInteger(); -} - -bool DSLType::isScalar() const { - return this->skslType().isScalar(); -} - -bool DSLType::isVector() const { - return this->skslType().isVector(); -} - -bool DSLType::isMatrix() const { - return this->skslType().isMatrix(); -} - -bool DSLType::isArray() const { - return this->skslType().isArray(); -} - -bool DSLType::isStruct() const { - return this->skslType().isStruct(); -} - -bool DSLType::isInterfaceBlock() const { - return this->skslType().isInterfaceBlock(); -} - -bool DSLType::isEffectChild() const { - return this->skslType().isEffectChild(); -} - -DSLType Array(const DSLType& base, int count, Position pos) { - SkSL::Context& context = ThreadContext::Context(); - count = base.skslType().convertArraySize(context, pos, pos, count); - if (!count) { - return DSLType::Poison(); - } - return DSLType(context.fSymbolTable->addArrayDimension(&base.skslType(), count), pos); -} - -DSLType UnsizedArray(const DSLType& base, Position pos) { - SkSL::Context& context = ThreadContext::Context(); - if (!base.skslType().checkIfUsableInArray(context, pos)) { - return DSLType::Poison(); - } - return context.fSymbolTable->addArrayDimension(&base.skslType(), SkSL::Type::kUnsizedArray); -} - -} // namespace dsl - -} // namespace SkSL diff --git a/src/sksl/dsl/DSLType.h b/src/sksl/dsl/DSLType.h deleted file mode 100644 index 4e61ca398179..000000000000 --- a/src/sksl/dsl/DSLType.h +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#ifndef SKSL_DSL_TYPE -#define SKSL_DSL_TYPE - -#include "include/core/SkTypes.h" -#include "src/sksl/SkSLPosition.h" // IWYU pragma: keep - -#include - -namespace SkSL { - -class Type; -struct Modifiers; - -namespace dsl { - -class DSLType { -public: - DSLType(const SkSL::Type* type, Position pos = {}); - - DSLType(std::string_view name, Position pos = {}); - - DSLType(std::string_view name, Position overallPos, - SkSL::Modifiers* modifiers, Position modifiersPos); - - static DSLType Invalid(); - static DSLType Poison(); - static DSLType Void(); - - /** - * Returns true if the SkSL type is non-null. - */ - bool hasValue() const { return fSkSLType != nullptr; } - - /** - * Returns true if this type is a bool. - */ - bool isBoolean() const; - - /** - * Returns true if this is a numeric scalar type. - */ - bool isNumber() const; - - /** - * Returns true if this is a floating-point scalar type (float or half). - */ - bool isFloat() const; - - /** - * Returns true if this is a signed scalar type (int or short). - */ - bool isSigned() const; - - /** - * Returns true if this is an unsigned scalar type (uint or ushort). - */ - bool isUnsigned() const; - - /** - * Returns true if this is a signed or unsigned integer. - */ - bool isInteger() const; - - /** - * Returns true if this is a scalar type. - */ - bool isScalar() const; - - /** - * Returns true if this is a vector type. - */ - bool isVector() const; - - /** - * Returns true if this is a matrix type. - */ - bool isMatrix() const; - - /** - * Returns true if this is a array type. - */ - bool isArray() const; - - /** - * Returns true if this is a struct type. - */ - bool isStruct() const; - - /** - * Returns true if this is an interface block - */ - bool isInterfaceBlock() const; - - /** - * Returns true if this is a Skia object type (shader, colorFilter, blender). - */ - bool isEffectChild() const; - - const SkSL::Type& skslType() const { - SkASSERT(fSkSLType); - return *fSkSLType; - } - -private: - const SkSL::Type* fSkSLType = nullptr; - - friend DSLType Array(const DSLType& base, int count, Position pos); - friend DSLType UnsizedArray(const DSLType& base, Position pos); -}; - -DSLType Array(const DSLType& base, int count, Position pos = {}); - -DSLType UnsizedArray(const DSLType& base, Position pos = {}); - -} // namespace dsl - -} // namespace SkSL - -#endif diff --git a/src/sksl/generated/sksl_graphite_frag.minified.sksl b/src/sksl/generated/sksl_graphite_frag.minified.sksl index 756503b9a2a9..c6b98f704746 100644 --- a/src/sksl/generated/sksl_graphite_frag.minified.sksl +++ b/src/sksl/generated/sksl_graphite_frag.minified.sksl @@ -35,36 +35,39 @@ static constexpr char SKSL_MINIFIED_sksl_graphite_frag[] = "(0.);for(int p=0;p<4;++p){o+=k[p]*$n(a+float2(float(p),float(n)),b,c,d,e,0," "h,i);}m+=l[n]*o;}m.w=saturate(m.w);m.xyz=clamp(m.xyz,half3(0.),m.www);return" " m;}$pure half4 sk_image_shader(float2 a,float2 b,float4 c,int d,int e,int f" -",int g,half4x4 h,int i,int j,int k,half[7]l,half3x3 m,int n,half[7]o,sampler2D" -" p){half4 q=g!=0?$o(a,b,c,d,e,h,i,p):$n(a,b,c,d,e,f,i,p);return sk_color_space_transform" -"(q,j,k,l,m,n,o);}$pure half4 sk_yuv_image_shader(float2 a,float2 b,float4 c" -",int d,int e,int f,int g,half4x4 h,half4 i,half4 j,half4 k,half4 l,half3x3 m" -",float3 n,int o,int p,half[7]q,half3x3 r,int s,half[7]t,sampler2D u,sampler2D" -" v,sampler2D w,sampler2D x){half4 y=g!=0?$o(a,b,c,d,e,h,0,u):$n(a,b,c,d,e,f" -",0,u);half4 z=g!=0?$o(a,b,c,d,e,h,0,v):$n(a,b,c,d,e,f,0,v);half4 A=g!=0?$o(" -"a,b,c,d,e,h,0,u):$n(a,b,c,d,e,f,0,w);float B=float(dot(i,y));float C=float(" -"dot(j,z));float D=float(dot(k,A));half3 E=half3(half(B),half(C),half(D));half4" -" F;F.xyz=saturate(E*m+half3(n));if(l==half4(0.)){F.w=1.;}else{half4 G=g!=0?" -"$o(a,b,c,d,e,h,0,x):$n(a,b,c,d,e,f,0,x);F.w=dot(l,G);F.xyz*=F.w;}return sk_color_space_transform" -"(F,o,p,q,r,s,t);}$pure half4 sk_dither_shader(half4 a,float2 b,half c,sampler2D" -" d){half f=sample(d,b*.125).x-.5;return half4(clamp(a.xyz+f*c,0.,a.w),a.w);" -"}$pure float2 $p(int a,float2 b){switch(a){case 0:b.x=clamp(b.x,0.,1.);break" -";case 1:b.x=fract(b.x);break;case 2:{float c=b.x-1.;b.x=(c-2.*floor(c*.5))-" -"1.;if(sk_Caps.mustDoOpBetweenFloorAndAbs){b.x=clamp(b.x,-1.,1.);}b.x=abs(b." -"x);break;}case 3:if(b.x<0.||b.x>1.){return float2(0.,-1.);}break;}return b;" -"}$pure half4 $q(float4[4]a,float[4]b,float2 c){if(c.y<0.){return half4(0.);" -"}else if(c.x<=b[0]){return half4(a[0]);}else if(c.x1.){return" +" float2(0.,-1.);}break;}return b;}$pure half4 $q(float4[4]a,float4 b,float2" +" c){if(c.y<0.){return half4(0.);}else if(c.x<=b.x){return half4(a[0]);}else" +" if(c.x1.;float x=-1.;if(r){x=dot(s,s)/s.x;}else if(w){x=length" -"(s)-s.x*u;}else{float y=s.x*s.x-s.y*s.y;if(y>=0.){if(l||v<0.){x=-sqrt(y)-s." -"x*u;}else{x=sqrt(y)-s.x*u;}}}if(!w&&x<0.){return float2(0.,-1.);}float y=k+" -"v*x;if(l){y=1.-y;}return float2(y,1.);}}$pure half4 sk_linear_grad_4_shader" -"(float2 a,float4[4]b,float[4]c,float2 d,float2 e,int f,int g,int h){float2 i" -"=$t(d,e,a);i=$p(f,i);half4 j=$q(b,c,i);return $interpolated_to_rgb_unpremul" -"(j,g,h);}$pure half4 sk_linear_grad_8_shader(float2 a,float4[8]b,float[8]c," -"float2 d,float2 e,int f,int g,int h){float2 i=$t(d,e,a);i=$p(f,i);half4 j=$r" -"(b,c,i);return $interpolated_to_rgb_unpremul(j,g,h);}$pure half4 sk_linear_grad_tex_shader" +"(k-1.)1.;float x=-1.;if(r){x=dot(s,s)/s.x;}else if(w){x=length(s" +")-s.x*u;}else{float y=s.x*s.x-s.y*s.y;if(y>=0.){if(l||v<0.){x=-sqrt(y)-s.x*" +"u;}else{x=sqrt(y)-s.x*u;}}}if(!w&&x<0.){return float2(0.,-1.);}float y=k+v*" +"x;if(l){y=1.-y;}return float2(y,1.);}}$pure half4 sk_linear_grad_4_shader(float2" +" a,float4[4]b,float4 c,float2 d,float2 e,int f,int g,int h){float2 i=$t(d,e" +",a);i=$p(f,i);half4 j=$q(b,c,i);return $interpolated_to_rgb_unpremul(j,g,h)" +";}$pure half4 sk_linear_grad_8_shader(float2 a,float4[8]b,float4[2]c,float2" +" d,float2 e,int f,int g,int h){float2 i=$t(d,e,a);i=$p(f,i);half4 j=$r(b,c," +"i);return $interpolated_to_rgb_unpremul(j,g,h);}$pure half4 sk_linear_grad_tex_shader" "(float2 a,float2 b,float2 c,int d,int e,int f,int g,sampler2D h){float2 i=$t" "(b,c,a);i=$p(e,i);half4 j=$s(h,d,i);return $interpolated_to_rgb_unpremul(j," -"f,g);}$pure half4 sk_radial_grad_4_shader(float2 a,float4[4]b,float[4]c,float2" +"f,g);}$pure half4 sk_radial_grad_4_shader(float2 a,float4[4]b,float4 c,float2" " d,float e,int f,int g,int h){float2 i=$u(d,e,a);i=$p(f,i);half4 j=$q(b,c,i" ");return $interpolated_to_rgb_unpremul(j,g,h);}$pure half4 sk_radial_grad_8_shader" -"(float2 a,float4[8]b,float[8]c,float2 d,float e,int f,int g,int h){float2 i" +"(float2 a,float4[8]b,float4[2]c,float2 d,float e,int f,int g,int h){float2 i" "=$u(d,e,a);i=$p(f,i);half4 j=$r(b,c,i);return $interpolated_to_rgb_unpremul" "(j,g,h);}$pure half4 sk_radial_grad_tex_shader(float2 a,float2 b,float c,int" " d,int e,int f,int g,sampler2D h){float2 i=$u(b,c,a);i=$p(e,i);half4 j=$s(h" ",d,i);return $interpolated_to_rgb_unpremul(j,f,g);}$pure half4 sk_sweep_grad_4_shader" -"(float2 a,float4[4]b,float[4]c,float2 d,float e,float f,int g,int h,int i){" -"float2 j=$v(d,e,f,a);j=$p(g,j);half4 k=$q(b,c,j);return $interpolated_to_rgb_unpremul" -"(k,h,i);}$pure half4 sk_sweep_grad_8_shader(float2 a,float4[8]b,float[8]c,float2" -" d,float e,float f,int g,int h,int i){float2 j=$v(d,e,f,a);j=$p(g,j);half4 k" -"=$r(b,c,j);return $interpolated_to_rgb_unpremul(k,h,i);}$pure half4 sk_sweep_grad_tex_shader" +"(float2 a,float4[4]b,float4 c,float2 d,float e,float f,int g,int h,int i){float2" +" j=$v(d,e,f,a);j=$p(g,j);half4 k=$q(b,c,j);return $interpolated_to_rgb_unpremul" +"(k,h,i);}$pure half4 sk_sweep_grad_8_shader(float2 a,float4[8]b,float4[2]c," +"float2 d,float e,float f,int g,int h,int i){float2 j=$v(d,e,f,a);j=$p(g,j);" +"half4 k=$r(b,c,j);return $interpolated_to_rgb_unpremul(k,h,i);}$pure half4 sk_sweep_grad_tex_shader" "(float2 a,float2 b,float c,float d,int e,int f,int g,int h,sampler2D i){float2" " j=$v(b,c,d,a);j=$p(f,j);half4 k=$s(i,e,j);return $interpolated_to_rgb_unpremul" -"(k,g,h);}$pure half4 sk_conical_grad_4_shader(float2 a,float4[4]b,float[4]c" -",float2 d,float2 e,float f,float g,int h,int i,int j){float2 k=$x(d,e,f,g,a" -");k=$p(h,k);half4 l=$q(b,c,k);return $interpolated_to_rgb_unpremul(l,i,j);}" -"$pure half4 sk_conical_grad_8_shader(float2 a,float4[8]b,float[8]c,float2 d" -",float2 e,float f,float g,int h,int i,int j){float2 k=$x(d,e,f,g,a);k=$p(h," -"k);half4 l=$r(b,c,k);return $interpolated_to_rgb_unpremul(l,i,j);}$pure half4" -" sk_conical_grad_tex_shader(float2 a,float2 b,float2 c,float d,float e,int f" -",int g,int h,int i,sampler2D j){float2 k=$x(b,c,d,e,a);k=$p(g,k);half4 l=$s" -"(j,f,k);return $interpolated_to_rgb_unpremul(l,h,i);}$pure half4 sk_matrix_colorfilter" -"(half4 a,float4x4 b,float4 c,int d){if(bool(d)){a=$rgb_to_hsl(a.xyz,a.w);}else" -"{a=unpremul(a);}half4 e=half4(b*float4(a)+c);if(bool(d)){e=$hsl_to_rgb(e.xyz" -",e.w);}else{e=saturate(e);e.xyz*=e.w;}return e;}$pure half4 noise_helper(half2" -" a,half2 b,int c,sampler2D d){half4 f;f.xy=floor(a);f.zw=f.xy+half2(1.);if(" -"bool(c)){f-=step(b.xyxy,f)*b.xyxy;}half g=sample(d,float2(half2(f.x*.00390625" -",.5))).x;half h=sample(d,float2(half2(f.z*.00390625,.5))).x;half2 i=half2(g" -",h);if(sk_Caps.PerlinNoiseRoundingFix){i=floor(i*half2(255.)+half2(.5))*half2" -"(.003921569);}half4 j=256.*i.xyxy+f.yyww;j*=half4(.00390625);return j;}$pure" -" half4 noise_function(half2 a,half4 b,sampler2D c){half2 d=fract(a);half2 e" -"=(d*d)*(half2(3.)-2.*d);const half f=.00390625;half4 g;for(int h=0;h<4;h++)" -"{half i=(half(h)+.5)*.25;half4 j=sample(c,float2(half2(b.x,i)));half4 k=sample" -"(c,float2(half2(b.y,i)));half4 l=sample(c,float2(half2(b.w,i)));half4 m=sample" -"(c,float2(half2(b.z,i)));half2 n;half2 o=d;n.x=dot((j.yw+j.xz*f)*2.-half2(1." -"),o);o.x-=1.;n.y=dot((k.yw+k.xz*f)*2.-half2(1.),o);half2 p;p.x=mix(n.x,n.y," -"e.x);o.y-=1.;n.y=dot((l.yw+l.xz*f)*2.-half2(1.),o);o.x+=1.;n.x=dot((m.yw+m." -"xz*f)*2.-half2(1.),o);p.y=mix(n.x,n.y,e.x);g[h]=mix(p.x,p.y,e.y);}return g;" -"}$pure half4 perlin_noise_shader(float2 a,float2 b,float2 c,int d,int e,int" -" f,sampler2D g,sampler2D h){half2 k=half2(floor(a)*b);half4 l=half4(0.);half2" -" m=half2(c);half n=1.;for(int o=0;o0.&&g.y>0.){if(f.x>0.&&f.y>0.||c.x>0.&&c.y<0.){float2 h=elliptical_distance" -"(g*e,f,c.x,b);if(f.x-c.x<=0.){h.y=1.;}else{h.y*=-1.;}a=min(a,h);}else if(c." -"y==0.){float h=((c.x-g.x)-g.y)*inverse_grad_len(e,b);a.x=min(a.x,h);}}}void" -" corner_distances(inout float2 a,float2x2 b,float2 c,float4 e,float4 f,float4" -" g){corner_distance(a,b,c,e.xy,float2(-1.),float2(f.x,g.x));corner_distance" -"(a,b,c,e.zy,float2(1.,-1.),float2(f.y,g.y));corner_distance(a,b,c,e.zw,float2" -"(1.),float2(f.z,g.z));corner_distance(a,b,c,e.xw,float2(-1.,1.),float2(f.w," -"g.w));}"; +"(k,g,h);}$pure half4 sk_conical_grad_4_shader(float2 a,float4[4]b,float4 c," +"float2 d,float2 e,float f,float g,int h,int i,int j){float2 k=$x(d,e,f,g,a)" +";k=$p(h,k);half4 l=$q(b,c,k);return $interpolated_to_rgb_unpremul(l,i,j);}$pure" +" half4 sk_conical_grad_8_shader(float2 a,float4[8]b,float4[2]c,float2 d,float2" +" e,float f,float g,int h,int i,int j){float2 k=$x(d,e,f,g,a);k=$p(h,k);half4" +" l=$r(b,c,k);return $interpolated_to_rgb_unpremul(l,i,j);}$pure half4 sk_conical_grad_tex_shader" +"(float2 a,float2 b,float2 c,float d,float e,int f,int g,int h,int i,sampler2D" +" j){float2 k=$x(b,c,d,e,a);k=$p(g,k);half4 l=$s(j,f,k);return $interpolated_to_rgb_unpremul" +"(l,h,i);}$pure half4 sk_matrix_colorfilter(half4 a,float4x4 b,float4 c,int d" +"){if(bool(d)){a=$rgb_to_hsl(a.xyz,a.w);}else{a=unpremul(a);}half4 e=half4(b" +"*float4(a)+c);if(bool(d)){e=$hsl_to_rgb(e.xyz,e.w);}else{e=saturate(e);e.xyz" +"*=e.w;}return e;}$pure half4 noise_helper(half2 a,half2 b,int c,sampler2D d" +"){half4 f;f.xy=floor(a);f.zw=f.xy+half2(1.);if(bool(c)){f-=step(b.xyxy,f)*b" +".xyxy;}half g=sample(d,float2(half2(f.x*.00390625,.5))).x;half h=sample(d,float2" +"(half2(f.z*.00390625,.5))).x;half2 i=half2(g,h);if(sk_Caps.PerlinNoiseRoundingFix" +"){i=floor(i*half2(255.)+half2(.5))*half2(.003921569);}half4 j=256.*i.xyxy+f" +".yyww;j*=half4(.00390625);return j;}$pure half4 noise_function(half2 a,half4" +" b,sampler2D c){half2 d=fract(a);half2 e=(d*d)*(half2(3.)-2.*d);const half f" +"=.00390625;half4 g;for(int h=0;h<4;h++){half i=(half(h)+.5)*.25;half4 j=sample" +"(c,float2(half2(b.x,i)));half4 k=sample(c,float2(half2(b.y,i)));half4 l=sample" +"(c,float2(half2(b.w,i)));half4 m=sample(c,float2(half2(b.z,i)));half2 n;half2" +" o=d;n.x=dot((j.yw+j.xz*f)*2.-half2(1.),o);o.x-=1.;n.y=dot((k.yw+k.xz*f)*2." +"-half2(1.),o);half2 p;p.x=mix(n.x,n.y,e.x);o.y-=1.;n.y=dot((l.yw+l.xz*f)*2." +"-half2(1.),o);o.x+=1.;n.x=dot((m.yw+m.xz*f)*2.-half2(1.),o);p.y=mix(n.x,n.y" +",e.x);g[h]=mix(p.x,p.y,e.y);}return g;}$pure half4 perlin_noise_shader(float2" +" a,float2 b,float2 c,int d,int e,int f,sampler2D g,sampler2D h){half2 k=half2" +"(floor(a)*b);half4 l=half4(0.);half2 m=half2(c);half n=1.;for(int o=0;o0.&&g.y>0.){if(f.x>0.&&f.y>0.||c.x>0.&&c.y<0.){float2 h=$z(g*e," +"f,c.x,b);if(f.x-c.x<=0.){h.y=1.;}else{h.y*=-1.;}a=min(a,h);}else if(c.y==0." +"){float h=((c.x-g.x)-g.y)*$y(e,b);a.x=min(a.x,h);}}}void $B(inout float2 a," +"float2x2 b,float2 c,float4 e,float4 f,float4 g){$A(a,b,c,e.xy,float2(-1.),float2" +"(f.x,g.x));$A(a,b,c,e.zy,float2(1.,-1.),float2(f.y,g.y));$A(a,b,c,e.zw,float2" +"(1.),float2(f.z,g.z));$A(a,b,c,e.xw,float2(-1.,1.),float2(f.w,g.w));}$pure half4" +" analytic_rrect_coverage_fn(float4 a,float4 b,float4 c,float4 d,float4 e,float2" +" f,float2 g){if(g.x>0.){return half4(1.);}else if(g.y>1.){float2 h=min(c.xy" +",c.zw);float i=min(h.x,h.y)*a.w;float j=(g.y-1.)*a.w;float k=coverage_bias(" +"j);return half4(half(saturate(j*(i+k))));}else{float2x2 h=float2x2(b)*(1./a" +".w);float2 i=float2($y(float2(1.,0.),h),$y(float2(0.,1.),h));float2 j=i*(f." +"x+min(c.xy,c.zw));float2 k=float2(min(j.x,j.y),-1.);float l;float m;if(g.x>" +"-.95){float2 n=i*((c.xy+c.zw)+2.*f.xx);l=min(min(n.x,n.y),1.);m=coverage_bias" +"(l);}else{float2 n=(2.*f.x)*i;float2 o=n-j;k.y=-max(o.x,o.y);if(f.x>0.){float" +" p=min(n.x,n.y);if(o.y>=-.5&&n.y>p){p=n.y;}if(o.x>=-.5&&n.x>p){p=n.x;}l=min" +"(p,1.);m=coverage_bias(l);}else{l=(m=1.);}}$B(k,h,f,c,d,e);float n=min(g.y," +"0.)*a.w;float o=l*(min(k.x+n,-k.y)+m);return half4(half(saturate(o)));}}"; diff --git a/src/sksl/generated/sksl_graphite_frag.unoptimized.sksl b/src/sksl/generated/sksl_graphite_frag.unoptimized.sksl index 7c475d7f20c1..6f32721e53b9 100644 --- a/src/sksl/generated/sksl_graphite_frag.unoptimized.sksl +++ b/src/sksl/generated/sksl_graphite_frag.unoptimized.sksl @@ -69,21 +69,26 @@ static constexpr char SKSL_MINIFIED_sksl_graphite_frag[] = ",readSwizzle,s);}color+=wy[y]*rowColor;}color.w=saturate(color.w);color.xyz" "=clamp(color.xyz,half3(0.),color.www);return color;}$pure half4 sk_image_shader" "(float2 coords,float2 imgSize,float4 subset,int tileModeX,int tileModeY,int" -" filterMode,int useCubic,half4x4 cubicCoeffs,int readSwizzle,int csXformFlags" -",int csXformSrcKind,half[7]csXformSrcCoeffs,half3x3 csXformGamutTransform,int" -" csXformDstKind,half[7]csXformDstCoeffs,sampler2D s){half4 sampleColor=useCubic" -"!=0?$cubic_filter_image(coords,imgSize,subset,tileModeX,tileModeY,cubicCoeffs" -",readSwizzle,s):$sample_image(coords,imgSize,subset,tileModeX,tileModeY,filterMode" -",readSwizzle,s);return sk_color_space_transform(sampleColor,csXformFlags,csXformSrcKind" -",csXformSrcCoeffs,csXformGamutTransform,csXformDstKind,csXformDstCoeffs);}$pure" -" half4 sk_yuv_image_shader(float2 coords,float2 imgSize,float4 subset,int tileModeX" -",int tileModeY,int filterMode,int useCubic,half4x4 cubicCoeffs,half4 channelSelectY" -",half4 channelSelectU,half4 channelSelectV,half4 channelSelectA,half3x3 yuvToRGBMatrix" -",float3 yuvToRGBTranslate,int csXformFlags,int csXformSrcKind,half[7]csXformSrcCoeffs" +" filterMode,int readSwizzle,int csXformFlags,int csXformSrcKind,half[7]csXformSrcCoeffs" ",half3x3 csXformGamutTransform,int csXformDstKind,half[7]csXformDstCoeffs,sampler2D" -" sY,sampler2D sU,sampler2D sV,sampler2D sA){half4 sampleColorY=useCubic!=0?" -"$cubic_filter_image(coords,imgSize,subset,tileModeX,tileModeY,cubicCoeffs,$kReadSwizzleNormalRGBA" -",sY):$sample_image(coords,imgSize,subset,tileModeX,tileModeY,filterMode,$kReadSwizzleNormalRGBA" +" s){half4 sampleColor=$sample_image(coords,imgSize,subset,tileModeX,tileModeY" +",filterMode,readSwizzle,s);return sk_color_space_transform(sampleColor,csXformFlags" +",csXformSrcKind,csXformSrcCoeffs,csXformGamutTransform,csXformDstKind,csXformDstCoeffs" +");}$pure half4 sk_cubic_image_shader(float2 coords,float2 imgSize,float4 subset" +",int tileModeX,int tileModeY,half4x4 cubicCoeffs,int readSwizzle,int csXformFlags" +",int csXformSrcKind,half[7]csXformSrcCoeffs,half3x3 csXformGamutTransform,int" +" csXformDstKind,half[7]csXformDstCoeffs,sampler2D s){half4 sampleColor=$cubic_filter_image" +"(coords,imgSize,subset,tileModeX,tileModeY,cubicCoeffs,readSwizzle,s);return" +" sk_color_space_transform(sampleColor,csXformFlags,csXformSrcKind,csXformSrcCoeffs" +",csXformGamutTransform,csXformDstKind,csXformDstCoeffs);}$pure half4 sk_yuv_image_shader" +"(float2 coords,float2 imgSize,float4 subset,int tileModeX,int tileModeY,int" +" filterMode,int useCubic,half4x4 cubicCoeffs,half4 channelSelectY,half4 channelSelectU" +",half4 channelSelectV,half4 channelSelectA,half3x3 yuvToRGBMatrix,float3 yuvToRGBTranslate" +",int csXformFlags,int csXformSrcKind,half[7]csXformSrcCoeffs,half3x3 csXformGamutTransform" +",int csXformDstKind,half[7]csXformDstCoeffs,sampler2D sY,sampler2D sU,sampler2D" +" sV,sampler2D sA){half4 sampleColorY=useCubic!=0?$cubic_filter_image(coords" +",imgSize,subset,tileModeX,tileModeY,cubicCoeffs,$kReadSwizzleNormalRGBA,sY)" +":$sample_image(coords,imgSize,subset,tileModeX,tileModeY,filterMode,$kReadSwizzleNormalRGBA" ",sY);half4 sampleColorU=useCubic!=0?$cubic_filter_image(coords,imgSize,subset" ",tileModeX,tileModeY,cubicCoeffs,$kReadSwizzleNormalRGBA,sU):$sample_image(" "coords,imgSize,subset,tileModeX,tileModeY,filterMode,$kReadSwizzleNormalRGBA" @@ -103,59 +108,59 @@ static constexpr char SKSL_MINIFIED_sksl_graphite_frag[] = " half4 sk_dither_shader(half4 colorIn,float2 coords,half range,sampler2D lut" "){const float kImgSize=8.;half value=sample(lut,coords*.125).x-.5;return half4" "(clamp(colorIn.xyz+value*range,0.,colorIn.w),colorIn.w);}$pure float2 $tile_grad" -"(int tileMode,float2 t){switch(tileMode){case 0:t.x=clamp(t.x,0.,1.);break;" -"case 1:t.x=fract(t.x);break;case 2:{float t_1=t.x-1.;t.x=(t_1-2.*floor(t_1*" -".5))-1.;if(sk_Caps.mustDoOpBetweenFloorAndAbs){t.x=clamp(t.x,-1.,1.);}t.x=abs" -"(t.x);break;}case 3:if(t.x<0.||t.x>1.){return float2(0.,-1.);}break;}return" -" t;}$pure half4 $colorize_grad_4(float4[4]colorsParam,float[4]offsetsParam," -"float2 t){if(t.y<0.){return half4(0.);}else if(t.x<=offsetsParam[0]){return" -" half4(colorsParam[0]);}else if(t.x1.){return float2(0.,-1.);}break;}return t" +";}$pure half4 $colorize_grad_4(float4[4]colorsParam,float4 offsetsParam,float2" +" t){if(t.y<0.){return half4(0.);}else if(t.x<=offsetsParam.x){return half4(" +"colorsParam[0]);}else if(t.x0.&&uv.y>0.){if(radii.x>0.&&radii.y>0.||strokeParams" -".x>0.&&strokeParams.y<0.){float2 d=elliptical_distance(uv*xyFlip,radii,strokeParams" +".x>0.&&strokeParams.y<0.){float2 d=$elliptical_distance(uv*xyFlip,radii,strokeParams" ".x,jacobian);if(radii.x-strokeParams.x<=0.){d.y=1.;}else{d.y*=-1.;}dist=min" "(dist,d);}else if(strokeParams.y==0.){float bevelDist=((strokeParams.x-uv.x" -")-uv.y)*inverse_grad_len(xyFlip,jacobian);dist.x=min(dist.x,bevelDist);}}}void" -" corner_distances(inout float2 d,float2x2 J,float2 stroke,float4 edgeDists," -"float4 xRadii,float4 yRadii){corner_distance(d,J,stroke,edgeDists.xy,float2" -"(-1.),float2(xRadii.x,yRadii.x));corner_distance(d,J,stroke,edgeDists.zy,float2" -"(1.,-1.),float2(xRadii.y,yRadii.y));corner_distance(d,J,stroke,edgeDists.zw" -",float2(1.),float2(xRadii.z,yRadii.z));corner_distance(d,J,stroke,edgeDists" -".xw,float2(-1.,1.),float2(xRadii.w,yRadii.w));}"; +")-uv.y)*$inverse_grad_len(xyFlip,jacobian);dist.x=min(dist.x,bevelDist);}}}" +"void $corner_distances(inout float2 d,float2x2 J,float2 stroke,float4 edgeDists" +",float4 xRadii,float4 yRadii){$corner_distance(d,J,stroke,edgeDists.xy,float2" +"(-1.),float2(xRadii.x,yRadii.x));$corner_distance(d,J,stroke,edgeDists.zy,float2" +"(1.,-1.),float2(xRadii.y,yRadii.y));$corner_distance(d,J,stroke,edgeDists.zw" +",float2(1.),float2(xRadii.z,yRadii.z));$corner_distance(d,J,stroke,edgeDists" +".xw,float2(-1.,1.),float2(xRadii.w,yRadii.w));}$pure half4 analytic_rrect_coverage_fn" +"(float4 coords,float4 jacobian,float4 edgeDistances,float4 xRadii,float4 yRadii" +",float2 strokeParams,float2 perPixelControl){if(perPixelControl.x>0.){return" +" half4(1.);}else if(perPixelControl.y>1.){float2 outerDist=min(edgeDistances" +".xy,edgeDistances.zw);float c=min(outerDist.x,outerDist.y)*coords.w;float scale" +"=(perPixelControl.y-1.)*coords.w;float bias=coverage_bias(scale);return half4" +"(half(saturate(scale*(c+bias))));}else{float2x2 J=float2x2(jacobian)*(1./coords" +".w);float2 invGradLen=float2($inverse_grad_len(float2(1.,0.),J),$inverse_grad_len" +"(float2(0.,1.),J));float2 outerDist=invGradLen*(strokeParams.x+min(edgeDistances" +".xy,edgeDistances.zw));float2 d=float2(min(outerDist.x,outerDist.y),-1.);float" +" scale;float bias;if(perPixelControl.x>-.95){float2 dim=invGradLen*((edgeDistances" +".xy+edgeDistances.zw)+2.*strokeParams.xx);scale=min(min(dim.x,dim.y),1.);bias" +"=coverage_bias(scale);}else{float2 strokeWidth=(2.*strokeParams.x)*invGradLen" +";float2 innerDist=strokeWidth-outerDist;d.y=-max(innerDist.x,innerDist.y);if" +"(strokeParams.x>0.){float strokeDim=min(strokeWidth.x,strokeWidth.y);if(innerDist" +".y>=-.5&&strokeWidth.y>strokeDim){strokeDim=strokeWidth.y;}if(innerDist.x>=" +"-.5&&strokeWidth.x>strokeDim){strokeDim=strokeWidth.x;}scale=min(strokeDim," +"1.);bias=coverage_bias(scale);}else{scale=(bias=1.);}}$corner_distances(d,J" +",strokeParams,edgeDistances,xRadii,yRadii);float outsetDist=min(perPixelControl" +".y,0.)*coords.w;float finalCoverage=scale*(min(d.x+outsetDist,-d.y)+bias);return" +" half4(half(saturate(finalCoverage)));}}"; diff --git a/src/sksl/generated/sksl_graphite_vert.minified.sksl b/src/sksl/generated/sksl_graphite_vert.minified.sksl index 99bded4db64d..bc2dc4871735 100644 --- a/src/sksl/generated/sksl_graphite_vert.minified.sksl +++ b/src/sksl/generated/sksl_graphite_vert.minified.sksl @@ -61,4 +61,45 @@ static constexpr char SKSL_MINIFIED_sksl_graphite_vert[] = "=$w(ak,al,ai);float2 ao=$w(am,an,ai);float ap=$w(1.,o,ai);float aq=(o+1.)-ap" ";float ar=$w(ap,aq,ai);if(ai!=ah){H=o>=0.?$s(ak*ap,aj*aq):$s(an,am);}I=o>=0." "?am/ar:ao;}else{H=z==0.?u:v;I=z==0.?k:n;}float2 J=float2(H.y,-H.x);I+=J*(q*" -"D);if(s){return float4(I+d,inverse(c)*I);}else{return float4(c*I+d,I);}}"; +"D);if(s){return float4(I+d,inverse(c)*I);}else{return float4(c*I+d,I);}}float4" +" analytic_rrect_vertex_fn(float2 a,float2 b,float c,float d,float4 e,float4" +" f,float4 g,float4 h,float i,float3x3 j,out float4 k,out float4 l,out float4" +" m,out float4 n,out float2 o,out float2 p,out float2 q){float w=1.;bool x=h" +".z<=0.;bool y=false;float4 z;float4 A;float4 B=float4(1.);bool C=false;if(e" +".x<-1.){C=e.y>0.;z=C?g.xxzz:g.xzzx;A=g.yyww;if(e.y<0.){m=-e-2.;n=f;o=float2" +"(0.,1.);}else{m=f;n=m;o=e.zw;if(o.y<0.){w=.414213568;}else if(o.y==0.){w=0." +";}}}else if(any(greaterThan(e,float4(0.)))){z=g.xzzx;A=g.yyww;m=e;n=f;o=float2" +"(0.,-1.);}else{z=f;A=g;B=-e;m=float4(0.);n=float4(0.);o=float2(0.,1.);y=true" +";}int D=sk_VertexID/9;float2 E=float2(m[D],n[D]);if(D%2!=0){E=E.yx;}float2 F" +"=float2(1.);if(E.x>0.&&E.y>0.){w=.414213568;F=E.yx;}float4 G=z-z.wxyz;float4" +" H=A-A.wxyz;float4 I=G*G+H*H;float4 J=sign(I);float4 K=float4(0.);float2 L=" +"float2(o.x);if(any(equal(J,float4(0.)))){if(all(equal(J,float4(0.)))){G=float4" +"(0.,1.,0.,-1.);H=float4(-1.,0.,1.,0.);I=float4(1.);}else{bool M=((J.x+J.y)+" +"J.z)+J.w>2.5;float4 N=M?G.yzwx:H.yzwx;float4 O=M?H.yzwx:-G.yzwx;G=mix(N,G,J" +");H=mix(O,H,J);I=mix(I.yzwx,I,J);B=mix(B.yzwx,B,J);if(!M&&w==0.){L*=float2(" +"J[D],J.yzwx[D]);K=(J-1.)*o.x;o.y=1.;w=1.;}}}float4 M=inversesqrt(I);G*=M;H*=" +"M;float2 N=-float2(G.yzwx[D],H.yzwx[D]);float2 O=float2(G[D],H[D]);float2 P" +";bool Q=false;if(c<0.){if(h.w<0.||d*h.z!=0.){Q=true;}else{float R=h.w;float2" +" S=E+(x?-L:L);if((w==1.||S.x<=R)||S.y<=R){P=S-R;}else{P=S*a-R*b;}}}else{P=(" +"E+L)*(a+w*a.yx);}if(Q){P=h.xy;}else{P-=E;P=(float2(z[D],A[D])+N*P.x)+O*P.y;" +"}l=(H*(z-P.x)-G*(A-P.y))+K;float3x3 R=inverse(j);float3 S=j*float3(P,1.);k=" +"float4(R[0].xy-R[0].z*P,R[1].xy-R[1].z*P);if(y){float4 T=-H*(R[0].x-R[0].z*" +"z)+G*(R[0].y-R[0].z*A);float4 U=-H*(R[1].x-R[1].z*z)+G*(R[1].y-R[1].z*A);l*=" +"inversesqrt(T*T+U*U);l+=(1.-B)*abs(S.z);bool V=B==float4(1.)&&dot(abs(G*G.yzwx" +"+H*H.yzwx),float4(1.))<.00024;if(V){float2 W=l.xy+l.zw;p.y=1.+min(min(W.x,W" +".y),abs(S.z));}else{p.y=1.+abs(S.z);}}if(c>0.&&S.z>0.){float2x2 T=float2x2(" +"k);float2 U=float2(B[D],B.yzwx[D])*b;float2 V=((F.x*U.x)*perp(-O))*T;float2" +" W=((F.y*U.y)*perp(N))*T;bool X=U.x!=0.&&U.y!=0.;if(w==1.&&X){V=normalize(V" +");W=normalize(W);if(dot(V,W)<-.8){float Y=sign(cross_length_2d(V,W));V=Y*perp" +"(V);W=-Y*perp(W);}}S.xy+=S.z*normalize(V+W);if(y){l-=S.z;}else{p.y=-S.z;}}else" +" if(!y){p.y=0.;}if(d!=0.){p.x=1.;}else{p.x=float(x?-1.:0.);}if(C){k=float4(" +"float2x2(H.x,-H.y,-G.x,G.y)*float2x2(k));}q=P;return float4(S.xy,S.z*i,S.z)" +";}float4 atlas_shape_vertex_fn(float2 a,float2 b,float4 c,float2 d,float2 e" +",float2 f,float g,float3x3 h,out float4 i,out float2 j,out float2 k){float2" +" l=c.xy+a*max(c.zw-c.xy,f);float3 m=h*float3(l,1.);k=m.xy/m.z;if(all(greaterThan" +"(f,float2(0.)))){i=float4(e,(e+f)+float2(1.))*b.xyxy;j=(((e+float2(1.))+l)-" +"d)*b;}else{i=float4(0.);j=float2(0.);}return float4(l,g,1.);}float4 cover_bounds_vertex_fn" +"(float2 a,float4 b,float c,float3x3 d,out float2 e){if(all(lessThanEqual(b." +"xy,b.zw))){a=mix(b.xy,b.zw,a);float3 f=d*float3(a,1.);e=a;return float4(f.xy" +",c,f.z);}else{a=mix(b.zw,b.xy,a);float3 f=d*float3(a,1.);e=f.xy/f.z;return float4" +"(a,c,1.);}}"; diff --git a/src/sksl/generated/sksl_graphite_vert.unoptimized.sksl b/src/sksl/generated/sksl_graphite_vert.unoptimized.sksl index e2b4f80fc557..95c55519decb 100644 --- a/src/sksl/generated/sksl_graphite_vert.unoptimized.sksl +++ b/src/sksl/generated/sksl_graphite_vert.unoptimized.sksl @@ -118,4 +118,83 @@ static constexpr char SKSL_MINIFIED_sksl_graphite_vert[] = ":p3;}float2 ortho=float2(tangent.y,-tangent.x);strokeCoord+=ortho*(strokeRadius" "*strokeOutset);if(isHairline){return float4(strokeCoord+translate,inverse(affineMatrix" ")*strokeCoord);}else{return float4(affineMatrix*strokeCoord+translate,strokeCoord" -");}}"; +");}}float4 analytic_rrect_vertex_fn(float2 position,float2 normal,float normalScale" +",float centerWeight,float4 xRadiiOrFlags,float4 radiiOrQuadXs,float4 ltrbOrQuadYs" +",float4 center,float depth,float3x3 localToDevice,out float4 jacobian,out float4" +" edgeDistances,out float4 xRadii,out float4 yRadii,out float2 strokeParams," +"out float2 perPixelControl,out float2 stepLocalCoords){const int kCornerVertexCount" +"=9;const float kMiterScale=1.;const float kBevelScale=0.;const float kRoundScale" +"=.414213568;const float kEpsilon=.00024;float joinScale=kMiterScale;bool bidirectionalCoverage" +"=center.z<=0.;bool deviceSpaceDistances=false;float4 xs;float4 ys;float4 edgeAA" +"=float4(1.);bool strokedLine=false;if(xRadiiOrFlags.x<-1.){strokedLine=xRadiiOrFlags" +".y>0.;xs=strokedLine?ltrbOrQuadYs.xxzz:ltrbOrQuadYs.xzzx;ys=ltrbOrQuadYs.yyww" +";if(xRadiiOrFlags.y<0.){xRadii=-xRadiiOrFlags-2.;yRadii=radiiOrQuadXs;strokeParams" +"=float2(0.,1.);}else{xRadii=radiiOrQuadXs;yRadii=xRadii;strokeParams=xRadiiOrFlags" +".zw;if(strokeParams.y<0.){joinScale=kRoundScale;}else if(strokeParams.y==0." +"){joinScale=kBevelScale;}}}else if(any(greaterThan(xRadiiOrFlags,float4(0.)" +"))){xs=ltrbOrQuadYs.xzzx;ys=ltrbOrQuadYs.yyww;xRadii=xRadiiOrFlags;yRadii=radiiOrQuadXs" +";strokeParams=float2(0.,-1.);}else{xs=radiiOrQuadXs;ys=ltrbOrQuadYs;edgeAA=" +"-xRadiiOrFlags;xRadii=float4(0.);yRadii=float4(0.);strokeParams=float2(0.,1." +");deviceSpaceDistances=true;}int cornerID=sk_VertexID/kCornerVertexCount;float2" +" cornerRadii=float2(xRadii[cornerID],yRadii[cornerID]);if(cornerID%2!=0){cornerRadii" +"=cornerRadii.yx;}float2 cornerAspectRatio=float2(1.);if(cornerRadii.x>0.&&cornerRadii" +".y>0.){joinScale=kRoundScale;cornerAspectRatio=cornerRadii.yx;}float4 dx=xs" +"-xs.wxyz;float4 dy=ys-ys.wxyz;float4 edgeSquaredLen=dx*dx+dy*dy;float4 edgeMask" +"=sign(edgeSquaredLen);float4 edgeBias=float4(0.);float2 strokeRadius=float2" +"(strokeParams.x);if(any(equal(edgeMask,float4(0.)))){if(all(equal(edgeMask," +"float4(0.)))){dx=float4(0.,1.,0.,-1.);dy=float4(-1.,0.,1.,0.);edgeSquaredLen" +"=float4(1.);}else{bool triangle=((edgeMask.x+edgeMask.y)+edgeMask.z)+edgeMask" +".w>2.5;float4 edgeX=triangle?dx.yzwx:dy.yzwx;float4 edgeY=triangle?dy.yzwx:" +"-dx.yzwx;dx=mix(edgeX,dx,edgeMask);dy=mix(edgeY,dy,edgeMask);edgeSquaredLen" +"=mix(edgeSquaredLen.yzwx,edgeSquaredLen,edgeMask);edgeAA=mix(edgeAA.yzwx,edgeAA" +",edgeMask);if(!triangle&&joinScale==kBevelScale){strokeRadius*=float2(edgeMask" +"[cornerID],edgeMask.yzwx[cornerID]);edgeBias=(edgeMask-1.)*strokeParams.x;strokeParams" +".y=1.;joinScale=kMiterScale;}}}float4 inverseEdgeLen=inversesqrt(edgeSquaredLen" +");dx*=inverseEdgeLen;dy*=inverseEdgeLen;float2 xAxis=-float2(dx.yzwx[cornerID" +"],dy.yzwx[cornerID]);float2 yAxis=float2(dx[cornerID],dy[cornerID]);float2 localPos" +";bool snapToCenter=false;if(normalScale<0.){if(center.w<0.||centerWeight*center" +".z!=0.){snapToCenter=true;}else{float localAARadius=center.w;float2 insetRadii" +"=cornerRadii+(bidirectionalCoverage?-strokeRadius:strokeRadius);if((joinScale" +"==kMiterScale||insetRadii.x<=localAARadius)||insetRadii.y<=localAARadius){localPos" +"=insetRadii-localAARadius;}else{localPos=insetRadii*position-localAARadius*" +"normal;}}}else{localPos=(cornerRadii+strokeRadius)*(position+joinScale*position" +".yx);}if(snapToCenter){localPos=center.xy;}else{localPos-=cornerRadii;localPos" +"=(float2(xs[cornerID],ys[cornerID])+xAxis*localPos.x)+yAxis*localPos.y;}edgeDistances" +"=(dy*(xs-localPos.x)-dx*(ys-localPos.y))+edgeBias;float3x3 deviceToLocal=inverse" +"(localToDevice);float3 devPos=localToDevice*float3(localPos,1.);jacobian=float4" +"(deviceToLocal[0].xy-deviceToLocal[0].z*localPos,deviceToLocal[1].xy-deviceToLocal" +"[1].z*localPos);if(deviceSpaceDistances){float4 gx=-dy*(deviceToLocal[0].x-" +"deviceToLocal[0].z*xs)+dx*(deviceToLocal[0].y-deviceToLocal[0].z*ys);float4" +" gy=-dy*(deviceToLocal[1].x-deviceToLocal[1].z*xs)+dx*(deviceToLocal[1].y-deviceToLocal" +"[1].z*ys);edgeDistances*=inversesqrt(gx*gx+gy*gy);edgeDistances+=(1.-edgeAA" +")*abs(devPos.z);bool subpixelCoverage=edgeAA==float4(1.)&&dot(abs(dx*dx.yzwx" +"+dy*dy.yzwx),float4(1.))0.&&devPos.z>0." +"){float2x2 J=float2x2(jacobian);float2 edgeAANormal=float2(edgeAA[cornerID]" +",edgeAA.yzwx[cornerID])*normal;float2 nx=((cornerAspectRatio.x*edgeAANormal" +".x)*perp(-yAxis))*J;float2 ny=((cornerAspectRatio.y*edgeAANormal.y)*perp(xAxis" +"))*J;bool isMidVertex=edgeAANormal.x!=0.&&edgeAANormal.y!=0.;if(joinScale==" +"kMiterScale&&isMidVertex){nx=normalize(nx);ny=normalize(ny);if(dot(nx,ny)<-" +".8){float s=sign(cross_length_2d(nx,ny));nx=s*perp(nx);ny=-s*perp(ny);}}devPos" +".xy+=devPos.z*normalize(nx+ny);if(deviceSpaceDistances){edgeDistances-=devPos" +".z;}else{perPixelControl.y=-devPos.z;}}else if(!deviceSpaceDistances){perPixelControl" +".y=0.;}if(centerWeight!=0.){perPixelControl.x=1.;}else{perPixelControl.x=float" +"(bidirectionalCoverage?-1.:0.);}if(strokedLine){jacobian=float4(float2x2(dy" +".x,-dy.y,-dx.x,dx.y)*float2x2(jacobian));}stepLocalCoords=localPos;return float4" +"(devPos.xy,devPos.z*depth,devPos.z);}float4 atlas_shape_vertex_fn(float2 quadCoords" +",float2 atlasSizeInv,float4 drawBounds,float2 deviceOrigin,float2 uvPos,float2" +" maskDims,float depth,float3x3 deviceToLocal,out float4 maskBounds,out float2" +" textureCoords,out float2 stepLocalCoords){float2 drawCoords=drawBounds.xy+" +"quadCoords*max(drawBounds.zw-drawBounds.xy,maskDims);float3 localCoords=deviceToLocal" +"*float3(drawCoords,1.);stepLocalCoords=localCoords.xy/localCoords.z;if(all(" +"greaterThan(maskDims,float2(0.)))){maskBounds=float4(uvPos,(uvPos+maskDims)" +"+float2(1.))*atlasSizeInv.xyxy;textureCoords=(((uvPos+float2(1.))+drawCoords" +")-deviceOrigin)*atlasSizeInv;}else{maskBounds=float4(0.);textureCoords=float2" +"(0.);}return float4(drawCoords,depth,1.);}float4 cover_bounds_vertex_fn(float2" +" corner,float4 bounds,float depth,float3x3 matrix,out float2 stepLocalCoords" +"){if(all(lessThanEqual(bounds.xy,bounds.zw))){corner=mix(bounds.xy,bounds.zw" +",corner);float3 devCorner=matrix*float3(corner,1.);stepLocalCoords=corner;return" +" float4(devCorner.xy,depth,devCorner.z);}else{corner=mix(bounds.zw,bounds.xy" +",corner);float3 localCoords=matrix*float3(corner,1.);stepLocalCoords=localCoords" +".xy/localCoords.z;return float4(corner,depth,1.);}}"; diff --git a/src/sksl/generated/sksl_shared.minified.sksl b/src/sksl/generated/sksl_shared.minified.sksl index 7f2b17c64c72..13621aa5127f 100644 --- a/src/sksl/generated/sksl_shared.minified.sksl +++ b/src/sksl/generated/sksl_shared.minified.sksl @@ -55,12 +55,12 @@ static constexpr char SKSL_MINIFIED_sksl_shared[] = ",$genType,$genBType);$es3 $pure $genHType mix($genHType,$genHType,$genBType" ");$es3 $pure $genBType isnan($genType);$es3 $pure $genBType isnan($genHType" ");$es3 $pure $genBType isinf($genType);$es3 $pure $genBType isinf($genHType" -");$es3 $pure $genType modf($genType,out $genType);$es3 $pure $genHType modf" -"($genHType,out $genHType);$es3 $pure uint packUnorm2x16(float2);$es3 $pure float2" -" unpackUnorm2x16(uint);$pure float length($genType);$pure half length($genHType" -");$pure float distance($genType,$genType);$pure half distance($genHType,$genHType" -");$pure float dot($genType,$genType);$pure half dot($genHType,$genHType);$pure" -" float3 cross(float3,float3);$pure half3 cross(half3,half3);$pure $genType normalize" +");$es3 $genType modf($genType,out $genType);$es3 $genHType modf($genHType,out" +" $genHType);$es3 $pure uint packUnorm2x16(float2);$es3 $pure float2 unpackUnorm2x16" +"(uint);$pure float length($genType);$pure half length($genHType);$pure float" +" distance($genType,$genType);$pure half distance($genHType,$genHType);$pure" +" float dot($genType,$genType);$pure half dot($genHType,$genHType);$pure float3" +" cross(float3,float3);$pure half3 cross(half3,half3);$pure $genType normalize" "($genType);$pure $genHType normalize($genHType);$pure $genType faceforward(" "$genType,$genType,$genType);$pure $genHType faceforward($genHType,$genHType" ",$genHType);$pure $genType reflect($genType,$genType);$pure $genHType reflect" diff --git a/src/sksl/generated/sksl_shared.unoptimized.sksl b/src/sksl/generated/sksl_shared.unoptimized.sksl index 050060ed4b44..c1ad2cb5affc 100644 --- a/src/sksl/generated/sksl_shared.unoptimized.sksl +++ b/src/sksl/generated/sksl_shared.unoptimized.sksl @@ -61,46 +61,46 @@ static constexpr char SKSL_MINIFIED_sksl_shared[] = " minVal,uint maxVal);$es3 $pure $genType mix($genType x,$genType y,$genBType" " a);$es3 $pure $genHType mix($genHType x,$genHType y,$genBType a);$es3 $pure" " $genBType isnan($genType x);$es3 $pure $genBType isnan($genHType x);$es3 $pure" -" $genBType isinf($genType x);$es3 $pure $genBType isinf($genHType x);$es3 $pure" -" $genType modf($genType x,out $genType i);$es3 $pure $genHType modf($genHType" -" x,out $genHType i);$es3 $pure uint packUnorm2x16(float2 v);$es3 $pure float2" -" unpackUnorm2x16(uint p);$pure float length($genType x);$pure half length($genHType" -" x);$pure float distance($genType p0,$genType p1);$pure half distance($genHType" -" p0,$genHType p1);$pure float dot($genType x,$genType y);$pure half dot($genHType" -" x,$genHType y);$pure float3 cross(float3 x,float3 y);$pure half3 cross(half3" -" x,half3 y);$pure $genType normalize($genType x);$pure $genHType normalize(" -"$genHType x);$pure $genType faceforward($genType N,$genType I,$genType Nref" -");$pure $genHType faceforward($genHType N,$genHType I,$genHType Nref);$pure" -" $genType reflect($genType I,$genType N);$pure $genHType reflect($genHType I" -",$genHType N);$pure $genType refract($genType I,$genType N,float eta);$pure" -" $genHType refract($genHType I,$genHType N,half eta);$pure $squareMat matrixCompMult" -"($squareMat x,$squareMat y);$pure $squareHMat matrixCompMult($squareHMat x," -"$squareHMat y);$es3 $pure $mat matrixCompMult($mat x,$mat y);$es3 $pure $hmat" -" matrixCompMult($hmat x,$hmat y);$pure $squareMat inverse($squareMat m);$pure" -" $squareHMat inverse($squareHMat m);$es3 $pure float determinant($squareMat" -" m);$es3 $pure half determinant($squareHMat m);$es3 $pure $squareMat transpose" -"($squareMat m);$es3 $pure $squareHMat transpose($squareHMat m);$es3 $pure float2x3" -" transpose(float3x2 m);$es3 $pure half2x3 transpose(half3x2 m);$es3 $pure float2x4" -" transpose(float4x2 m);$es3 $pure half2x4 transpose(half4x2 m);$es3 $pure float3x2" -" transpose(float2x3 m);$es3 $pure half3x2 transpose(half2x3 m);$es3 $pure float3x4" -" transpose(float4x3 m);$es3 $pure half3x4 transpose(half4x3 m);$es3 $pure float4x2" -" transpose(float2x4 m);$es3 $pure half4x2 transpose(half2x4 m);$es3 $pure float4x3" -" transpose(float3x4 m);$es3 $pure half4x3 transpose(half3x4 m);$es3 $pure $squareMat" -" outerProduct($vec c,$vec r);$es3 $pure $squareHMat outerProduct($hvec c,$hvec" -" r);$es3 $pure float2x3 outerProduct(float3 c,float2 r);$es3 $pure half2x3 outerProduct" -"(half3 c,half2 r);$es3 $pure float3x2 outerProduct(float2 c,float3 r);$es3 $pure" -" half3x2 outerProduct(half2 c,half3 r);$es3 $pure float2x4 outerProduct(float4" -" c,float2 r);$es3 $pure half2x4 outerProduct(half4 c,half2 r);$es3 $pure float4x2" -" outerProduct(float2 c,float4 r);$es3 $pure half4x2 outerProduct(half2 c,half4" -" r);$es3 $pure float3x4 outerProduct(float4 c,float3 r);$es3 $pure half3x4 outerProduct" -"(half4 c,half3 r);$es3 $pure float4x3 outerProduct(float3 c,float4 r);$es3 $pure" -" half4x3 outerProduct(half3 c,half4 r);$pure $bvec lessThan($vec x,$vec y);" -"$pure $bvec lessThan($hvec x,$hvec y);$pure $bvec lessThan($ivec x,$ivec y)" -";$pure $bvec lessThan($svec x,$svec y);$pure $bvec lessThanEqual($vec x,$vec" -" y);$pure $bvec lessThanEqual($hvec x,$hvec y);$pure $bvec lessThanEqual($ivec" -" x,$ivec y);$pure $bvec lessThanEqual($svec x,$svec y);$pure $bvec greaterThan" -"($vec x,$vec y);$pure $bvec greaterThan($hvec x,$hvec y);$pure $bvec greaterThan" -"($ivec x,$ivec y);$pure $bvec greaterThan($svec x,$svec y);$pure $bvec greaterThanEqual" +" $genBType isinf($genType x);$es3 $pure $genBType isinf($genHType x);$es3 $genType" +" modf($genType x,out $genType i);$es3 $genHType modf($genHType x,out $genHType" +" i);$es3 $pure uint packUnorm2x16(float2 v);$es3 $pure float2 unpackUnorm2x16" +"(uint p);$pure float length($genType x);$pure half length($genHType x);$pure" +" float distance($genType p0,$genType p1);$pure half distance($genHType p0,$genHType" +" p1);$pure float dot($genType x,$genType y);$pure half dot($genHType x,$genHType" +" y);$pure float3 cross(float3 x,float3 y);$pure half3 cross(half3 x,half3 y" +");$pure $genType normalize($genType x);$pure $genHType normalize($genHType x" +");$pure $genType faceforward($genType N,$genType I,$genType Nref);$pure $genHType" +" faceforward($genHType N,$genHType I,$genHType Nref);$pure $genType reflect" +"($genType I,$genType N);$pure $genHType reflect($genHType I,$genHType N);$pure" +" $genType refract($genType I,$genType N,float eta);$pure $genHType refract(" +"$genHType I,$genHType N,half eta);$pure $squareMat matrixCompMult($squareMat" +" x,$squareMat y);$pure $squareHMat matrixCompMult($squareHMat x,$squareHMat" +" y);$es3 $pure $mat matrixCompMult($mat x,$mat y);$es3 $pure $hmat matrixCompMult" +"($hmat x,$hmat y);$pure $squareMat inverse($squareMat m);$pure $squareHMat inverse" +"($squareHMat m);$es3 $pure float determinant($squareMat m);$es3 $pure half determinant" +"($squareHMat m);$es3 $pure $squareMat transpose($squareMat m);$es3 $pure $squareHMat" +" transpose($squareHMat m);$es3 $pure float2x3 transpose(float3x2 m);$es3 $pure" +" half2x3 transpose(half3x2 m);$es3 $pure float2x4 transpose(float4x2 m);$es3" +" $pure half2x4 transpose(half4x2 m);$es3 $pure float3x2 transpose(float2x3 m" +");$es3 $pure half3x2 transpose(half2x3 m);$es3 $pure float3x4 transpose(float4x3" +" m);$es3 $pure half3x4 transpose(half4x3 m);$es3 $pure float4x2 transpose(float2x4" +" m);$es3 $pure half4x2 transpose(half2x4 m);$es3 $pure float4x3 transpose(float3x4" +" m);$es3 $pure half4x3 transpose(half3x4 m);$es3 $pure $squareMat outerProduct" +"($vec c,$vec r);$es3 $pure $squareHMat outerProduct($hvec c,$hvec r);$es3 $pure" +" float2x3 outerProduct(float3 c,float2 r);$es3 $pure half2x3 outerProduct(half3" +" c,half2 r);$es3 $pure float3x2 outerProduct(float2 c,float3 r);$es3 $pure half3x2" +" outerProduct(half2 c,half3 r);$es3 $pure float2x4 outerProduct(float4 c,float2" +" r);$es3 $pure half2x4 outerProduct(half4 c,half2 r);$es3 $pure float4x2 outerProduct" +"(float2 c,float4 r);$es3 $pure half4x2 outerProduct(half2 c,half4 r);$es3 $pure" +" float3x4 outerProduct(float4 c,float3 r);$es3 $pure half3x4 outerProduct(half4" +" c,half3 r);$es3 $pure float4x3 outerProduct(float3 c,float4 r);$es3 $pure half4x3" +" outerProduct(half3 c,half4 r);$pure $bvec lessThan($vec x,$vec y);$pure $bvec" +" lessThan($hvec x,$hvec y);$pure $bvec lessThan($ivec x,$ivec y);$pure $bvec" +" lessThan($svec x,$svec y);$pure $bvec lessThanEqual($vec x,$vec y);$pure $bvec" +" lessThanEqual($hvec x,$hvec y);$pure $bvec lessThanEqual($ivec x,$ivec y);" +"$pure $bvec lessThanEqual($svec x,$svec y);$pure $bvec greaterThan($vec x,$vec" +" y);$pure $bvec greaterThan($hvec x,$hvec y);$pure $bvec greaterThan($ivec x" +",$ivec y);$pure $bvec greaterThan($svec x,$svec y);$pure $bvec greaterThanEqual" "($vec x,$vec y);$pure $bvec greaterThanEqual($hvec x,$hvec y);$pure $bvec greaterThanEqual" "($ivec x,$ivec y);$pure $bvec greaterThanEqual($svec x,$svec y);$pure $bvec" " equal($vec x,$vec y);$pure $bvec equal($hvec x,$hvec y);$pure $bvec equal(" diff --git a/src/sksl/ir/BUILD.bazel b/src/sksl/ir/BUILD.bazel index 6d7cd65273ab..caa95916111d 100644 --- a/src/sksl/ir/BUILD.bazel +++ b/src/sksl/ir/BUILD.bazel @@ -37,6 +37,7 @@ IR_FILES = [ "SkSLDiscardStatement.h", "SkSLDoStatement.cpp", "SkSLDoStatement.h", + "SkSLEmptyExpression.h", "SkSLExpression.cpp", "SkSLExpression.h", "SkSLExpressionStatement.cpp", @@ -69,7 +70,8 @@ IR_FILES = [ "SkSLLiteral.cpp", "SkSLLiteral.h", "SkSLMethodReference.h", - "SkSLModifiers.cpp", + "SkSLModifierFlags.cpp", + "SkSLModifierFlags.h", "SkSLModifiers.h", "SkSLModifiersDeclaration.cpp", "SkSLModifiersDeclaration.h", diff --git a/src/sksl/ir/SkSLEmptyExpression.h b/src/sksl/ir/SkSLEmptyExpression.h new file mode 100644 index 000000000000..2e88f8ee4d80 --- /dev/null +++ b/src/sksl/ir/SkSLEmptyExpression.h @@ -0,0 +1,46 @@ +/* + * Copyright 2023 Google LLC. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "src/sksl/SkSLBuiltinTypes.h" +#include "src/sksl/SkSLCompiler.h" +#include "src/sksl/SkSLContext.h" + +namespace SkSL { + +/** + * The EmptyExpression is a void-typed expression with nothing inside. EmptyExpressions can exist + * inside an ExpressionStatement; this construct is functionally equivalent to a Nop. + */ +class EmptyExpression : public Expression { +public: + inline static constexpr Kind kIRNodeKind = Kind::kEmpty; + + static std::unique_ptr Make(Position pos, const Context& context) { + return std::make_unique(pos, context.fTypes.fVoid.get()); + } + + EmptyExpression(Position pos, const Type* type) + : INHERITED(pos, kIRNodeKind, type) { + SkASSERT(type->isVoid()); + } + + std::unique_ptr clone(Position pos) const override { + return std::make_unique(pos, &this->type()); + } + + std::string description(OperatorPrecedence) const override { + // There's no way in GLSL to directly emit a void-typed expression. + // `false` is used here as a placeholder expression; the value of a void-typed expression is + // never meaningful, so this should be a decent substitute. + return "false"; + } + +private: + using INHERITED = Expression; +}; + +} // namespace SkSL diff --git a/src/sksl/ir/SkSLExpression.h b/src/sksl/ir/SkSLExpression.h index c41ab0a61f7e..058fb50bdd71 100644 --- a/src/sksl/ir/SkSLExpression.h +++ b/src/sksl/ir/SkSLExpression.h @@ -38,7 +38,7 @@ class Expression : public IRNode { } Kind kind() const { - return (Kind) fKind; + return (Kind)fKind; } virtual const Type& type() const { @@ -47,7 +47,7 @@ class Expression : public IRNode { bool isAnyConstructor() const { static_assert((int)Kind::kConstructorArray - 1 == (int)Kind::kChildCall); - static_assert((int)Kind::kConstructorStruct + 1 == (int)Kind::kFieldAccess); + static_assert((int)Kind::kConstructorStruct + 1 == (int)Kind::kEmpty); return this->kind() >= Kind::kConstructorArray && this->kind() <= Kind::kConstructorStruct; } diff --git a/src/sksl/ir/SkSLFieldSymbol.h b/src/sksl/ir/SkSLFieldSymbol.h index 3335825df5d2..3f35c2aeb4e3 100644 --- a/src/sksl/ir/SkSLFieldSymbol.h +++ b/src/sksl/ir/SkSLFieldSymbol.h @@ -8,7 +8,7 @@ #ifndef SKSL_FIELD #define SKSL_FIELD -#include "src/sksl/ir/SkSLModifiers.h" +#include "src/sksl/ir/SkSLModifierFlags.h" #include "src/sksl/ir/SkSLSymbol.h" #include "src/sksl/ir/SkSLType.h" #include "src/sksl/ir/SkSLVariable.h" diff --git a/src/sksl/ir/SkSLFunctionCall.cpp b/src/sksl/ir/SkSLFunctionCall.cpp index 77f18663fb9d..b14f2d9bd36c 100644 --- a/src/sksl/ir/SkSLFunctionCall.cpp +++ b/src/sksl/ir/SkSLFunctionCall.cpp @@ -12,6 +12,7 @@ #include "include/private/base/SkFloatingPoint.h" #include "include/private/base/SkTArray.h" #include "include/private/base/SkTo.h" +#include "src/base/SkEnumBitMask.h" #include "src/base/SkHalf.h" #include "src/core/SkMatrixInvert.h" #include "src/sksl/SkSLAnalysis.h" @@ -30,7 +31,7 @@ #include "src/sksl/ir/SkSLFunctionReference.h" #include "src/sksl/ir/SkSLLiteral.h" #include "src/sksl/ir/SkSLMethodReference.h" -#include "src/sksl/ir/SkSLModifiers.h" +#include "src/sksl/ir/SkSLModifierFlags.h" #include "src/sksl/ir/SkSLType.h" #include "src/sksl/ir/SkSLTypeReference.h" #include "src/sksl/ir/SkSLVariable.h" @@ -1024,8 +1025,7 @@ std::string FunctionCall::description(OperatorPrecedence) const { static CoercionCost call_cost(const Context& context, const FunctionDeclaration& function, const ExpressionArray& arguments) { - if (context.fConfig->strictES2Mode() && - (function.modifiers().fFlags & Modifiers::kES3_Flag)) { + if (context.fConfig->strictES2Mode() && function.modifierFlags().isES3()) { return CoercionCost::Impossible(); } if (function.parameters().size() != SkToSizeT(arguments.size())) { @@ -1124,7 +1124,7 @@ std::unique_ptr FunctionCall::Convert(const Context& context, const FunctionDeclaration& function, ExpressionArray arguments) { // Reject ES3 function calls in strict ES2 mode. - if (context.fConfig->strictES2Mode() && (function.modifiers().fFlags & Modifiers::kES3_Flag)) { + if (context.fConfig->strictES2Mode() && function.modifierFlags().isES3()) { context.fErrors->error(pos, "call to '" + function.description() + "' is not supported"); return nullptr; } @@ -1158,9 +1158,9 @@ std::unique_ptr FunctionCall::Convert(const Context& context, return nullptr; } // Update the refKind on out-parameters, and ensure that they are actually assignable. - const Modifiers& paramModifiers = function.parameters()[i]->modifiers(); - if (paramModifiers.fFlags & Modifiers::kOut_Flag) { - const VariableRefKind refKind = paramModifiers.fFlags & Modifiers::kIn_Flag + ModifierFlags paramFlags = function.parameters()[i]->modifierFlags(); + if (paramFlags & ModifierFlag::kOut) { + const VariableRefKind refKind = (paramFlags & ModifierFlag::kIn) ? VariableReference::RefKind::kReadWrite : VariableReference::RefKind::kPointer; if (!Analysis::UpdateVariableRefKind(arguments[i].get(), refKind, context.fErrors)) { diff --git a/src/sksl/ir/SkSLFunctionDeclaration.cpp b/src/sksl/ir/SkSLFunctionDeclaration.cpp index 4db37153d9da..0dd555e078c1 100644 --- a/src/sksl/ir/SkSLFunctionDeclaration.cpp +++ b/src/sksl/ir/SkSLFunctionDeclaration.cpp @@ -11,24 +11,23 @@ #include "include/core/SkTypes.h" #include "include/private/SkSLDefines.h" #include "include/private/base/SkTo.h" +#include "src/base/SkEnumBitMask.h" #include "src/base/SkStringView.h" #include "src/sksl/SkSLBuiltinTypes.h" -#include "src/sksl/SkSLCompiler.h" #include "src/sksl/SkSLContext.h" #include "src/sksl/SkSLErrorReporter.h" -#include "src/sksl/SkSLModifiersPool.h" #include "src/sksl/SkSLPosition.h" #include "src/sksl/SkSLProgramKind.h" #include "src/sksl/SkSLProgramSettings.h" #include "src/sksl/SkSLString.h" #include "src/sksl/ir/SkSLExpression.h" #include "src/sksl/ir/SkSLLayout.h" +#include "src/sksl/ir/SkSLModifierFlags.h" #include "src/sksl/ir/SkSLModifiers.h" #include "src/sksl/ir/SkSLSymbolTable.h" #include "src/sksl/ir/SkSLType.h" #include "src/sksl/ir/SkSLVariable.h" -#include #include #include @@ -36,17 +35,15 @@ using namespace skia_private; namespace SkSL { -static bool check_modifiers(const Context& context, - Position pos, - const Modifiers& modifiers) { - const int permitted = Modifiers::kInline_Flag | - Modifiers::kNoInline_Flag | - (context.fConfig->fIsBuiltinCode ? (Modifiers::kES3_Flag | - Modifiers::kPure_Flag | - Modifiers::kExport_Flag) : 0); - modifiers.checkPermitted(context, pos, permitted, /*permittedLayoutFlags=*/0); - if ((modifiers.fFlags & Modifiers::kInline_Flag) && - (modifiers.fFlags & Modifiers::kNoInline_Flag)) { +static bool check_modifiers(const Context& context, Position pos, ModifierFlags modifierFlags) { + const ModifierFlags permitted = ModifierFlag::kInline | + ModifierFlag::kNoInline | + (context.fConfig->fIsBuiltinCode ? ModifierFlag::kES3 | + ModifierFlag::kPure | + ModifierFlag::kExport + : ModifierFlag::kNone); + modifierFlags.checkPermittedFlags(context, pos, permitted); + if (modifierFlags.isInline() && modifierFlags.isNoInline()) { context.fErrors->error(pos, "functions cannot be both 'inline' and 'noinline'"); return false; } @@ -73,29 +70,21 @@ static bool check_return_type(const Context& context, Position pos, const Type& static bool check_parameters(const Context& context, TArray>& parameters, - bool isMain) { - auto typeIsValidForColor = [&](const Type& type) { - return type.matches(*context.fTypes.fHalf4) || type.matches(*context.fTypes.fFloat4); - }; - - // The first color parameter passed to main() is the input color; the second is the dest color. - static constexpr int kBuiltinColorIDs[] = {SK_INPUT_COLOR_BUILTIN, SK_DEST_COLOR_BUILTIN}; - unsigned int builtinColorIndex = 0; - + ModifierFlags modifierFlags) { // Check modifiers on each function parameter. for (auto& param : parameters) { const Type& type = param->type(); - int permittedFlags = Modifiers::kConst_Flag | Modifiers::kIn_Flag; + ModifierFlags permittedFlags = ModifierFlag::kConst | ModifierFlag::kIn; if (!type.isOpaque()) { - permittedFlags |= Modifiers::kOut_Flag; + permittedFlags |= ModifierFlag::kOut; } if (type.typeKind() == Type::TypeKind::kTexture) { - permittedFlags |= Modifiers::kReadOnly_Flag | Modifiers::kWriteOnly_Flag; + permittedFlags |= ModifierFlag::kReadOnly | ModifierFlag::kWriteOnly; } - param->modifiers().checkPermitted(context, - param->modifiersPosition(), - permittedFlags, - /*permittedLayoutFlags=*/0); + param->modifierFlags().checkPermittedFlags(context, param->modifiersPosition(), + permittedFlags); + param->layout().checkPermittedLayout(context, param->modifiersPosition(), + /*permittedLayoutFlags=*/LayoutFlag::kNone); // Only the (builtin) declarations of 'sample' are allowed to have shader/colorFilter or FP // parameters. You can pass other opaque types to functions safely; this restriction is // specific to "child" objects. @@ -105,107 +94,75 @@ static bool check_parameters(const Context& context, return false; } - Modifiers m = param->modifiers(); - bool modifiersChanged = false; - - // The `in` modifier on function parameters is implicit, so we can replace `in float x` with - // `float x`. This prevents any ambiguity when matching a function by its param types. - if (Modifiers::kIn_Flag == (m.fFlags & (Modifiers::kOut_Flag | Modifiers::kIn_Flag))) { - m.fFlags &= ~(Modifiers::kOut_Flag | Modifiers::kIn_Flag); - modifiersChanged = true; - } - - if (isMain) { - if (ProgramConfig::IsRuntimeEffect(context.fConfig->fKind) && - context.fConfig->fKind != ProgramKind::kMeshFragment && - context.fConfig->fKind != ProgramKind::kMeshVertex) { - // We verify that the signature is fully correct later. For now, if this is a - // runtime effect of any flavor, a float2 param is supposed to be the coords, and a - // half4/float parameter is supposed to be the input or destination color: - if (type.matches(*context.fTypes.fFloat2)) { - m.fLayout.fBuiltin = SK_MAIN_COORDS_BUILTIN; - modifiersChanged = true; - } else if (typeIsValidForColor(type) && - builtinColorIndex < std::size(kBuiltinColorIDs)) { - m.fLayout.fBuiltin = kBuiltinColorIDs[builtinColorIndex++]; - modifiersChanged = true; - } - } else if (ProgramConfig::IsFragment(context.fConfig->fKind)) { - // For testing purposes, we have .sksl inputs that are treated as both runtime - // effects and fragment shaders. To make that work, fragment shaders are allowed to - // have a coords parameter. - if (type.matches(*context.fTypes.fFloat2)) { - m.fLayout.fBuiltin = SK_MAIN_COORDS_BUILTIN; - modifiersChanged = true; - } - } - } - - if (modifiersChanged) { - param->setModifiers(context.fModifiersPool->add(m)); + // Pure functions should not change any state, and should be safe to eliminate if their + // result is not used; this is incompatible with out-parameters, so we forbid it here. + // (We don't exhaustively guard against pure functions changing global state in other ways, + // though, since they aren't allowed in user code.) + if (modifierFlags.isPure() && (param->modifierFlags() & ModifierFlag::kOut)) { + context.fErrors->error(param->modifiersPosition(), + "pure functions cannot have out parameters"); + return false; } } return true; } +static bool type_is_valid_for_color(const Type& type) { + return type.isVector() && type.columns() == 4 && type.componentType().isFloat(); +} + +static bool type_is_valid_for_coords(const Type& type) { + return type.isVector() && type.highPrecision() && type.columns() == 2 && + type.componentType().isFloat(); +} + static bool check_main_signature(const Context& context, Position pos, const Type& returnType, TArray>& parameters) { ErrorReporter& errors = *context.fErrors; ProgramKind kind = context.fConfig->fKind; - auto typeIsValidForColor = [&](const Type& type) { - return type.matches(*context.fTypes.fHalf4) || type.matches(*context.fTypes.fFloat4); - }; - - auto typeIsValidForAttributes = [&](const Type& type) { + auto typeIsValidForAttributes = [](const Type& type) { return type.isStruct() && type.name() == "Attributes"; }; - auto typeIsValidForVaryings = [&](const Type& type) { + auto typeIsValidForVaryings = [](const Type& type) { return type.isStruct() && type.name() == "Varyings"; }; auto paramIsCoords = [&](int idx) { const Variable& p = *parameters[idx]; - return p.type().matches(*context.fTypes.fFloat2) && - p.modifiers().fFlags == 0 && - p.modifiers().fLayout.fBuiltin == SK_MAIN_COORDS_BUILTIN; + return type_is_valid_for_coords(p.type()) && p.modifierFlags() == ModifierFlag::kNone; }; - auto paramIsBuiltinColor = [&](int idx, int builtinID) { + auto paramIsColor = [&](int idx) { const Variable& p = *parameters[idx]; - return typeIsValidForColor(p.type()) && - p.modifiers().fFlags == 0 && - p.modifiers().fLayout.fBuiltin == builtinID; + return type_is_valid_for_color(p.type()) && p.modifierFlags() == ModifierFlag::kNone; }; auto paramIsConstInAttributes = [&](int idx) { const Variable& p = *parameters[idx]; - return typeIsValidForAttributes(p.type()) && p.modifiers().fFlags == Modifiers::kConst_Flag; + return typeIsValidForAttributes(p.type()) && p.modifierFlags() == ModifierFlag::kConst; }; auto paramIsConstInVaryings = [&](int idx) { const Variable& p = *parameters[idx]; - return typeIsValidForVaryings(p.type()) && p.modifiers().fFlags == Modifiers::kConst_Flag; + return typeIsValidForVaryings(p.type()) && p.modifierFlags() == ModifierFlag::kConst; }; auto paramIsOutColor = [&](int idx) { const Variable& p = *parameters[idx]; - return typeIsValidForColor(p.type()) && p.modifiers().fFlags == Modifiers::kOut_Flag; + return type_is_valid_for_color(p.type()) && p.modifierFlags() == ModifierFlag::kOut; }; - auto paramIsInputColor = [&](int n) { return paramIsBuiltinColor(n, SK_INPUT_COLOR_BUILTIN); }; - auto paramIsDestColor = [&](int n) { return paramIsBuiltinColor(n, SK_DEST_COLOR_BUILTIN); }; - switch (kind) { case ProgramKind::kRuntimeColorFilter: case ProgramKind::kPrivateRuntimeColorFilter: { // (half4|float4) main(half4|float4) - if (!typeIsValidForColor(returnType)) { + if (!type_is_valid_for_color(returnType)) { errors.error(pos, "'main' must return: 'vec4', 'float4', or 'half4'"); return false; } - bool validParams = (parameters.size() == 1 && paramIsInputColor(0)); + bool validParams = (parameters.size() == 1 && paramIsColor(0)); if (!validParams) { errors.error(pos, "'main' parameter must be 'vec4', 'float4', or 'half4'"); return false; @@ -215,7 +172,7 @@ static bool check_main_signature(const Context& context, Position pos, const Typ case ProgramKind::kRuntimeShader: case ProgramKind::kPrivateRuntimeShader: { // (half4|float4) main(float2) - if (!typeIsValidForColor(returnType)) { + if (!type_is_valid_for_color(returnType)) { errors.error(pos, "'main' must return: 'vec4', 'float4', or 'half4'"); return false; } @@ -228,15 +185,13 @@ static bool check_main_signature(const Context& context, Position pos, const Typ case ProgramKind::kRuntimeBlender: case ProgramKind::kPrivateRuntimeBlender: { // (half4|float4) main(half4|float4, half4|float4) - if (!typeIsValidForColor(returnType)) { + if (!type_is_valid_for_color(returnType)) { errors.error(pos, "'main' must return: 'vec4', 'float4', or 'half4'"); return false; } - if (!(parameters.size() == 2 && - paramIsInputColor(0) && - paramIsDestColor(1))) { + if (!(parameters.size() == 2 && paramIsColor(0) && paramIsColor(1))) { errors.error(pos, "'main' parameters must be (vec4|float4|half4, " - "vec4|float4|half4)"); + "vec4|float4|half4)"); return false; } break; @@ -255,7 +210,7 @@ static bool check_main_signature(const Context& context, Position pos, const Typ } case ProgramKind::kMeshFragment: { // float2 main(const Varyings) -or- float2 main(const Varyings, out half4|float4) - if (!returnType.matches(*context.fTypes.fFloat2)) { + if (!type_is_valid_for_coords(returnType)) { errors.error(pos, "'main' must return: 'vec2' or 'float2'"); return false; } @@ -375,7 +330,7 @@ static bool parameters_match(SkSpan> params, */ static bool find_existing_declaration(const Context& context, Position pos, - const Modifiers* modifiers, + ModifierFlags modifierFlags, std::string_view name, TArray>& parameters, Position returnTypePos, @@ -387,8 +342,9 @@ static bool find_existing_declaration(const Context& context, for (std::unique_ptr& param : parameters) { paramPtrs.push_back(param.get()); } - return FunctionDeclaration(pos, - modifiers, + return FunctionDeclaration(context, + pos, + modifierFlags, name, std::move(paramPtrs), returnType, @@ -411,20 +367,21 @@ static bool find_existing_declaration(const Context& context, continue; } if (!type_generically_matches(*returnType, other->returnType())) { - errors.error(returnTypePos, - "functions '" + invalidDeclDescription() + "' and '" + - other->description() + "' differ only in return type"); + errors.error(returnTypePos, "functions '" + invalidDeclDescription() + "' and '" + + other->description() + "' differ only in return type"); return false; } for (int i = 0; i < parameters.size(); i++) { - if (parameters[i]->modifiers() != other->parameters()[i]->modifiers()) { + if (parameters[i]->modifierFlags() != other->parameters()[i]->modifierFlags() || + parameters[i]->layout() != other->parameters()[i]->layout()) { errors.error(parameters[i]->fPosition, "modifiers on parameter " + std::to_string(i + 1) + " differ between declaration and definition"); return false; } } - if (*modifiers != other->modifiers() || other->definition() || other->isIntrinsic()) { + if (other->definition() || other->isIntrinsic() || + modifierFlags != other->modifierFlags()) { errors.error(pos, "duplicate definition of '" + invalidDeclDescription() + "'"); return false; } @@ -439,50 +396,80 @@ static bool find_existing_declaration(const Context& context, return true; } -FunctionDeclaration::FunctionDeclaration(Position pos, - const Modifiers* modifiers, +FunctionDeclaration::FunctionDeclaration(const Context& context, + Position pos, + ModifierFlags modifierFlags, std::string_view name, TArray parameters, const Type* returnType, bool builtin) : INHERITED(pos, kIRNodeKind, name, /*type=*/nullptr) , fDefinition(nullptr) - , fModifiers(modifiers) , fParameters(std::move(parameters)) , fReturnType(returnType) + , fModifierFlags(modifierFlags) + , fIntrinsicKind(builtin ? FindIntrinsicKind(name) : kNotIntrinsic) , fBuiltin(builtin) - , fIsMain(name == "main") - , fIntrinsicKind(builtin ? FindIntrinsicKind(name) : kNotIntrinsic) { - // None of the parameters are allowed to be be null. - SkASSERT(std::count(fParameters.begin(), fParameters.end(), nullptr) == 0); + , fIsMain(name == "main") { + int builtinColorIndex = 0; + for (const Variable* param : fParameters) { + // None of the parameters are allowed to be be null. + SkASSERT(param); + + // Keep track of arguments to main for runtime effects. + if (fIsMain) { + if (ProgramConfig::IsRuntimeShader(context.fConfig->fKind) || + ProgramConfig::IsFragment(context.fConfig->fKind)) { + // If this is a runtime shader, a float2 param is supposed to be the coords. + // For testing purposes, we have .sksl inputs that are treated as both runtime + // effects and fragment shaders. To make that work, fragment shaders are allowed to + // have a coords parameter as well. + if (type_is_valid_for_coords(param->type())) { + fHasMainCoordsParameter = true; + } + } else if (ProgramConfig::IsRuntimeColorFilter(context.fConfig->fKind) || + ProgramConfig::IsRuntimeBlender(context.fConfig->fKind)) { + // If this is a runtime color filter or blender, the params are an input color, + // followed by a destination color for blenders. + if (type_is_valid_for_color(param->type())) { + switch (builtinColorIndex++) { + case 0: fHasMainInputColorParameter = true; break; + case 1: fHasMainDestColorParameter = true; break; + default: /* unknown color parameter */ break; + } + } + } + } + } } FunctionDeclaration* FunctionDeclaration::Convert(const Context& context, Position pos, - Position modifiersPosition, - const Modifiers* modifiers, + const Modifiers& modifiers, std::string_view name, TArray> parameters, Position returnTypePos, const Type* returnType) { + // No layout flag is permissible on a function. + modifiers.fLayout.checkPermittedLayout(context, pos, + /*permittedLayoutFlags=*/LayoutFlag::kNone); + // If requested, apply the `noinline` modifier to every function. This allows us to test Runtime // Effects without any inlining, even when the code is later added to a paint. - Modifiers updatedModifiers; + ModifierFlags modifierFlags = modifiers.fFlags; if (context.fConfig->fSettings.fForceNoInline) { - updatedModifiers = *modifiers; - updatedModifiers.fFlags &= ~Modifiers::kInline_Flag; - updatedModifiers.fFlags |= Modifiers::kNoInline_Flag; - modifiers = &updatedModifiers; + modifierFlags &= ~ModifierFlag::kInline; + modifierFlags |= ModifierFlag::kNoInline; } bool isMain = (name == "main"); FunctionDeclaration* decl = nullptr; - if (!check_modifiers(context, modifiersPosition, *modifiers) || + if (!check_modifiers(context, modifiers.fPosition, modifierFlags) || !check_return_type(context, returnTypePos, *returnType) || - !check_parameters(context, parameters, isMain) || + !check_parameters(context, parameters, modifierFlags) || (isMain && !check_main_signature(context, pos, *returnType, parameters)) || - !find_existing_declaration(context, pos, modifiers, name, parameters, + !find_existing_declaration(context, pos, modifierFlags, name, parameters, returnTypePos, returnType, &decl)) { return nullptr; } @@ -495,8 +482,9 @@ FunctionDeclaration* FunctionDeclaration::Convert(const Context& context, return decl; } return context.fSymbolTable->add( - std::make_unique(pos, - context.fModifiersPool->add(*modifiers), + std::make_unique(context, + pos, + modifierFlags, name, std::move(finalParameters), returnType, @@ -532,21 +520,12 @@ std::string FunctionDeclaration::mangledName() const { } std::string FunctionDeclaration::description() const { - int modifierFlags = this->modifiers().fFlags; - std::string result = - (modifierFlags ? Modifiers::DescribeFlags(modifierFlags) + " " : std::string()) + - this->returnType().displayName() + " " + std::string(this->name()) + "("; + std::string result = (fModifierFlags ? fModifierFlags.description() + " " : std::string()) + + this->returnType().displayName() + " " + std::string(this->name()) + "("; auto separator = SkSL::String::Separator(); for (const Variable* p : this->parameters()) { result += separator(); - // We can't just say `p->description()` here, because occasionally might have added layout - // flags onto parameters (like `layout(builtin=10009)`) and don't want to reproduce that. - if (p->modifiers().fFlags) { - result += Modifiers::DescribeFlags(p->modifiers().fFlags) + " "; - } - result += p->type().displayName(); - result += " "; - result += p->name(); + result += p->description(); } result += ")"; return result; diff --git a/src/sksl/ir/SkSLFunctionDeclaration.h b/src/sksl/ir/SkSLFunctionDeclaration.h index b04168eca358..0ce869e4dd23 100644 --- a/src/sksl/ir/SkSLFunctionDeclaration.h +++ b/src/sksl/ir/SkSLFunctionDeclaration.h @@ -13,6 +13,7 @@ #include "include/private/base/SkTArray.h" #include "src/sksl/SkSLIntrinsicList.h" #include "src/sksl/ir/SkSLIRNode.h" +#include "src/sksl/ir/SkSLModifierFlags.h" #include "src/sksl/ir/SkSLSymbol.h" #include @@ -24,12 +25,11 @@ namespace SkSL { class Context; class ExpressionArray; class FunctionDefinition; +struct Modifiers; class Position; class Type; class Variable; -struct Modifiers; - /** * A function declaration (not a definition -- does not contain a body). */ @@ -37,8 +37,9 @@ class FunctionDeclaration final : public Symbol { public: inline static constexpr Kind kIRNodeKind = Kind::kFunctionDeclaration; - FunctionDeclaration(Position pos, - const Modifiers* modifiers, + FunctionDeclaration(const Context& context, + Position pos, + ModifierFlags modifierFlags, std::string_view name, skia_private::TArray parameters, const Type* returnType, @@ -46,8 +47,7 @@ class FunctionDeclaration final : public Symbol { static FunctionDeclaration* Convert(const Context& context, Position pos, - Position modifiersPos, - const Modifiers* modifiers, + const Modifiers& modifiers, std::string_view name, skia_private::TArray> parameters, Position returnTypePos, @@ -55,12 +55,12 @@ class FunctionDeclaration final : public Symbol { void addParametersToSymbolTable(const Context& context); - const Modifiers& modifiers() const { - return *fModifiers; + ModifierFlags modifierFlags() const { + return fModifierFlags; } - void setModifiers(const Modifiers* m) { - fModifiers = m; + void setModifierFlags(ModifierFlags m) { + fModifierFlags = m; } const FunctionDefinition* definition() const { @@ -115,6 +115,22 @@ class FunctionDeclaration final : public Symbol { bool matches(const FunctionDeclaration& f) const; + /** + * If this function is main(), and it has the requested parameter, returns that parameter. + * For instance, only a runtime-blend program will have a dest-color parameter, in parameter 1; + * `getMainDestColorParameter` will return that parameter if this is a runtime-blend main() + * function. Otherwise, null is returned. + */ + const Variable* getMainCoordsParameter() const { + return fHasMainCoordsParameter ? fParameters[0] : nullptr; + } + const Variable* getMainInputColorParameter() const { + return fHasMainInputColorParameter ? fParameters[0] : nullptr; + } + const Variable* getMainDestColorParameter() const { + return fHasMainDestColorParameter ? fParameters[1] : nullptr; + } + /** * Determine the effective types of this function's parameters and return value when called with * the given arguments. This is relevant for functions with generic parameter types, where this @@ -138,12 +154,15 @@ class FunctionDeclaration final : public Symbol { private: const FunctionDefinition* fDefinition; FunctionDeclaration* fNextOverload = nullptr; - const Modifiers* fModifiers; skia_private::TArray fParameters; - const Type* fReturnType; - bool fBuiltin; - bool fIsMain; + const Type* fReturnType = nullptr; + ModifierFlags fModifierFlags; mutable IntrinsicKind fIntrinsicKind = kNotIntrinsic; + bool fBuiltin = false; + bool fIsMain = false; + bool fHasMainCoordsParameter = false; + bool fHasMainInputColorParameter = false; + bool fHasMainDestColorParameter = false; using INHERITED = Symbol; }; diff --git a/src/sksl/ir/SkSLIRNode.h b/src/sksl/ir/SkSLIRNode.h index 98dcd29585eb..cce0307395bc 100644 --- a/src/sksl/ir/SkSLIRNode.h +++ b/src/sksl/ir/SkSLIRNode.h @@ -71,6 +71,7 @@ enum class ExpressionKind { kConstructorScalarCast, kConstructorSplat, kConstructorStruct, + kEmpty, kFieldAccess, kFunctionReference, kFunctionCall, @@ -104,9 +105,17 @@ class IRNode : public Poolable { IRNode(const IRNode&) = delete; IRNode& operator=(const IRNode&) = delete; - // position of this element within the program being compiled, for error reporting purposes + // Position of this element within the program being compiled, for error reporting purposes. Position fPosition; + Position position() const { + return fPosition; + } + + void setPosition(Position p) { + fPosition = p; + } + /** * Use is to check the type of an IRNode. * e.g. replace `s.kind() == Statement::Kind::kReturn` with `s.is()`. diff --git a/src/sksl/ir/SkSLInterfaceBlock.cpp b/src/sksl/ir/SkSLInterfaceBlock.cpp index bfeb8b28bb6a..a39d0e1472db 100644 --- a/src/sksl/ir/SkSLInterfaceBlock.cpp +++ b/src/sksl/ir/SkSLInterfaceBlock.cpp @@ -15,6 +15,8 @@ #include "src/sksl/SkSLThreadContext.h" #include "src/sksl/ir/SkSLFieldSymbol.h" #include "src/sksl/ir/SkSLInterfaceBlock.h" +#include "src/sksl/ir/SkSLLayout.h" +#include "src/sksl/ir/SkSLModifierFlags.h" #include "src/sksl/ir/SkSLModifiers.h" #include "src/sksl/ir/SkSLSymbolTable.h" #include "src/sksl/ir/SkSLVarDeclarations.h" @@ -48,8 +50,7 @@ static std::optional find_rt_adjust_index(SkSpan fields) { std::unique_ptr InterfaceBlock::Convert(const Context& context, Position pos, - const SkSL::Modifiers& modifiers, - Position modifiersPos, + const Modifiers& modifiers, std::string_view typeName, TArray fields, std::string_view varName, @@ -88,8 +89,9 @@ std::unique_ptr InterfaceBlock::Convert(const Context& context, // Error-check the interface block as if it were being declared as a global variable. VarDeclaration::ErrorCheck(context, pos, - modifiersPos, - modifiers, + modifiers.fPosition, + modifiers.fLayout, + modifiers.fFlags, type, baseType, VariableStorage::kGlobal); @@ -97,8 +99,9 @@ std::unique_ptr InterfaceBlock::Convert(const Context& context, // Create a global variable for the Interface Block. std::unique_ptr var = SkSL::Variable::Convert(context, pos, - modifiersPos, - modifiers, + modifiers.fPosition, + modifiers.fLayout, + modifiers.fFlags, type, pos, varName, @@ -151,7 +154,8 @@ std::unique_ptr InterfaceBlock::clone() const { } std::string InterfaceBlock::description() const { - std::string result = this->var()->modifiers().description() + + std::string result = this->var()->layout().description() + + this->var()->modifierFlags().description() + ' ' + std::string(this->typeName()) + " {\n"; const Type* structType = &this->var()->type(); if (structType->isArray()) { diff --git a/src/sksl/ir/SkSLInterfaceBlock.h b/src/sksl/ir/SkSLInterfaceBlock.h index 9d8223ae2bda..dd98dafd2a10 100644 --- a/src/sksl/ir/SkSLInterfaceBlock.h +++ b/src/sksl/ir/SkSLInterfaceBlock.h @@ -61,8 +61,7 @@ class InterfaceBlock final : public ProgramElement { // (if it is named) or each of the interface block fields (if it is anonymous). static std::unique_ptr Convert(const Context& context, Position pos, - const SkSL::Modifiers& modifiers, - Position modifiersPos, + const Modifiers& modifiers, std::string_view typeName, skia_private::TArray fields, std::string_view varName, diff --git a/src/sksl/ir/SkSLLayout.cpp b/src/sksl/ir/SkSLLayout.cpp index 8d080d334ff2..bff9c62c4164 100644 --- a/src/sksl/ir/SkSLLayout.cpp +++ b/src/sksl/ir/SkSLLayout.cpp @@ -5,14 +5,29 @@ * found in the LICENSE file. */ -#include "src/sksl/SkSLString.h" #include "src/sksl/ir/SkSLLayout.h" +#include "include/private/base/SkAssert.h" +#include "src/base/SkMathPriv.h" +#include "src/sksl/SkSLContext.h" +#include "src/sksl/SkSLErrorReporter.h" +#include "src/sksl/SkSLPosition.h" +#include "src/sksl/SkSLString.h" + namespace SkSL { -std::string Layout::description() const { +std::string Layout::paddedDescription() const { std::string result; auto separator = SkSL::String::Separator(); + if (fFlags & LayoutFlag::kSPIRV) { + result += separator() + "spirv"; + } + if (fFlags & LayoutFlag::kMetal) { + result += separator() + "metal"; + } + if (fFlags & LayoutFlag::kWGSL) { + result += separator() + "wgsl"; + } if (fLocation >= 0) { result += separator() + "location = " + std::to_string(fLocation); } @@ -41,24 +56,107 @@ std::string Layout::description() const { result += separator() + "input_attachment_index = " + std::to_string(fInputAttachmentIndex); } - if (fFlags & kOriginUpperLeft_Flag) { + if (fFlags & LayoutFlag::kOriginUpperLeft) { result += separator() + "origin_upper_left"; } - if (fFlags & kBlendSupportAllEquations_Flag) { + if (fFlags & LayoutFlag::kBlendSupportAllEquations) { result += separator() + "blend_support_all_equations"; } - if (fFlags & kPushConstant_Flag) { + if (fFlags & LayoutFlag::kPushConstant) { result += separator() + "push_constant"; } - if (fFlags & kColor_Flag) { + if (fFlags & LayoutFlag::kColor) { result += separator() + "color"; } + if (fLocalSizeX >= 0) { + result += separator() + "local_size_x = " + std::to_string(fLocalSizeX); + } + if (fLocalSizeY >= 0) { + result += separator() + "local_size_y = " + std::to_string(fLocalSizeY); + } + if (fLocalSizeZ >= 0) { + result += separator() + "local_size_z = " + std::to_string(fLocalSizeZ); + } if (result.size() > 0) { - result = "layout (" + result + ")"; + result = "layout (" + result + ") "; } return result; } +std::string Layout::description() const { + std::string s = this->paddedDescription(); + if (!s.empty()) { + s.pop_back(); + } + return s; +} + +bool Layout::checkPermittedLayout(const Context& context, + Position pos, + LayoutFlags permittedLayoutFlags) const { + static constexpr struct { LayoutFlag flag; const char* name; } kLayoutFlags[] = { + { LayoutFlag::kOriginUpperLeft, "origin_upper_left"}, + { LayoutFlag::kPushConstant, "push_constant"}, + { LayoutFlag::kBlendSupportAllEquations, "blend_support_all_equations"}, + { LayoutFlag::kColor, "color"}, + { LayoutFlag::kLocation, "location"}, + { LayoutFlag::kOffset, "offset"}, + { LayoutFlag::kBinding, "binding"}, + { LayoutFlag::kTexture, "texture"}, + { LayoutFlag::kSampler, "sampler"}, + { LayoutFlag::kIndex, "index"}, + { LayoutFlag::kSet, "set"}, + { LayoutFlag::kBuiltin, "builtin"}, + { LayoutFlag::kInputAttachmentIndex, "input_attachment_index"}, + { LayoutFlag::kSPIRV, "spirv"}, + { LayoutFlag::kMetal, "metal"}, + { LayoutFlag::kWGSL, "wgsl"}, + { LayoutFlag::kLocalSizeX, "local_size_x"}, + { LayoutFlag::kLocalSizeY, "local_size_y"}, + { LayoutFlag::kLocalSizeZ, "local_size_z"}, + }; + + bool success = true; + LayoutFlags layoutFlags = fFlags; + + LayoutFlags backendFlags = layoutFlags & LayoutFlag::kAllBackends; + if (SkPopCount(backendFlags.value()) > 1) { + context.fErrors->error(pos, "only one backend qualifier can be used"); + success = false; + } + + if ((layoutFlags & (LayoutFlag::kTexture | LayoutFlag::kSampler)) && + layoutFlags & LayoutFlag::kBinding) { + context.fErrors->error(pos, "'binding' modifier cannot coexist with 'texture'/'sampler'"); + success = false; + } + // The `texture` and `sampler` flags are only allowed when explicitly targeting Metal and WGSL. + if (!(layoutFlags & (LayoutFlag::kMetal | LayoutFlag::kWGSL))) { + permittedLayoutFlags &= ~LayoutFlag::kTexture; + permittedLayoutFlags &= ~LayoutFlag::kSampler; + } + // The `set` flag is not allowed when explicitly targeting Metal. It is currently allowed when + // no backend flag is present. + // TODO(skia:14023): Further restrict the `set` flag to SPIR-V and WGSL + if (layoutFlags & LayoutFlag::kMetal) { + permittedLayoutFlags &= ~LayoutFlag::kSet; + } + // TODO(skia:14023): Restrict the `push_constant` flag to SPIR-V and WGSL. + + for (const auto& lf : kLayoutFlags) { + if (layoutFlags & lf.flag) { + if (!(permittedLayoutFlags & lf.flag)) { + context.fErrors->error(pos, "layout qualifier '" + std::string(lf.name) + + "' is not permitted here"); + success = false; + } + layoutFlags &= ~lf.flag; + } + } + SkASSERT(layoutFlags == LayoutFlag::kNone); + return success; +} + bool Layout::operator==(const Layout& other) const { return fFlags == other.fFlags && fLocation == other.fLocation && @@ -69,7 +167,10 @@ bool Layout::operator==(const Layout& other) const { fIndex == other.fIndex && fSet == other.fSet && fBuiltin == other.fBuiltin && - fInputAttachmentIndex == other.fInputAttachmentIndex; + fInputAttachmentIndex == other.fInputAttachmentIndex && + fLocalSizeX == other.fLocalSizeX && + fLocalSizeY == other.fLocalSizeY && + fLocalSizeZ == other.fLocalSizeZ; } } // namespace SkSL diff --git a/src/sksl/ir/SkSLLayout.h b/src/sksl/ir/SkSLLayout.h index 6f608c5cbf3d..42a6d9334e61 100644 --- a/src/sksl/ir/SkSLLayout.h +++ b/src/sksl/ir/SkSLLayout.h @@ -8,45 +8,64 @@ #ifndef SKSL_LAYOUT #define SKSL_LAYOUT +#include "src/base/SkEnumBitMask.h" + #include namespace SkSL { +class Context; +class Position; + +enum class LayoutFlag : int { + kNone = 0, + kAll = ~0, + + kOriginUpperLeft = 1 << 0, + kPushConstant = 1 << 1, + kBlendSupportAllEquations = 1 << 2, + kColor = 1 << 3, + + // These flags indicate if the qualifier appeared, regardless of the accompanying value. + kLocation = 1 << 4, + kOffset = 1 << 5, + kBinding = 1 << 6, + kTexture = 1 << 7, + kSampler = 1 << 8, + kIndex = 1 << 9, + kSet = 1 << 10, + kBuiltin = 1 << 11, + kInputAttachmentIndex = 1 << 12, + + // These flags indicate the backend type; only one at most can be set. + kSPIRV = 1 << 13, + kMetal = 1 << 14, + kWGSL = 1 << 15, + + kAllBackends = kSPIRV | kMetal | kWGSL, + + // The local invocation size of a compute program. + kLocalSizeX = 1 << 16, + kLocalSizeY = 1 << 17, + kLocalSizeZ = 1 << 18, +}; + +} // namespace SkSL + +SK_MAKE_BITMASK_OPS(SkSL::LayoutFlag); + +namespace SkSL { + +using LayoutFlags = SkEnumBitMask; + /** * Represents a layout block appearing before a variable declaration, as in: * * layout (location = 0) int x; */ struct Layout { - enum Flag { - kOriginUpperLeft_Flag = 1 << 0, - kPushConstant_Flag = 1 << 1, - kBlendSupportAllEquations_Flag = 1 << 2, - kColor_Flag = 1 << 3, - - // These flags indicate if the qualifier appeared, regardless of the accompanying value. - kLocation_Flag = 1 << 4, - kOffset_Flag = 1 << 5, - kBinding_Flag = 1 << 6, - kTexture_Flag = 1 << 7, - kSampler_Flag = 1 << 8, - kIndex_Flag = 1 << 9, - kSet_Flag = 1 << 10, - kBuiltin_Flag = 1 << 11, - kInputAttachmentIndex_Flag = 1 << 12, - - // These flags indicate the backend type; only one at most can be set. - kSPIRV_Flag = 1 << 13, - kMetal_Flag = 1 << 14, - kGL_Flag = 1 << 15, - kWGSL_Flag = 1 << 16, - }; - - static constexpr int kAllBackendFlagsMask = - Layout::kSPIRV_Flag | Layout::kMetal_Flag | Layout::kGL_Flag | Layout::kWGSL_Flag; - - Layout(int flags, int location, int offset, int binding, int index, int set, int builtin, - int inputAttachmentIndex) + Layout(LayoutFlags flags, int location, int offset, int binding, int index, int set, + int builtin, int inputAttachmentIndex) : fFlags(flags) , fLocation(location) , fOffset(offset) @@ -56,7 +75,7 @@ struct Layout { , fBuiltin(builtin) , fInputAttachmentIndex(inputAttachmentIndex) {} - Layout() = default; + constexpr Layout() = default; static Layout builtin(int builtin) { Layout result; @@ -65,6 +84,15 @@ struct Layout { } std::string description() const; + std::string paddedDescription() const; + + /** + * Verifies that only permitted layout flags are included. Reports errors and returns false in + * the event of a violation. + */ + bool checkPermittedLayout(const Context& context, + Position pos, + LayoutFlags permittedLayoutFlags) const; bool operator==(const Layout& other) const; @@ -72,7 +100,7 @@ struct Layout { return !(*this == other); } - int fFlags = 0; + LayoutFlags fFlags = LayoutFlag::kNone; int fLocation = -1; int fOffset = -1; int fBinding = -1; @@ -86,6 +114,11 @@ struct Layout { // input_attachment_index comes from Vulkan/SPIR-V to connect a shader variable to the a // corresponding attachment on the subpass in which the shader is being used. int fInputAttachmentIndex = -1; + + // The local invocation size dimensions of a compute program. + int fLocalSizeX = -1; + int fLocalSizeY = -1; + int fLocalSizeZ = -1; }; } // namespace SkSL diff --git a/src/sksl/ir/SkSLModifierFlags.cpp b/src/sksl/ir/SkSLModifierFlags.cpp new file mode 100644 index 000000000000..308e72a8da8a --- /dev/null +++ b/src/sksl/ir/SkSLModifierFlags.cpp @@ -0,0 +1,131 @@ +/* + * Copyright 2021 Google LLC. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "src/sksl/ir/SkSLModifierFlags.h" + +#include "include/core/SkTypes.h" +#include "src/sksl/SkSLContext.h" +#include "src/sksl/SkSLErrorReporter.h" +#include "src/sksl/SkSLPosition.h" + +namespace SkSL { + +std::string ModifierFlags::paddedDescription() const { + // SkSL extensions + std::string result; + if (*this & ModifierFlag::kExport) { + result += "$export "; + } + if (*this & ModifierFlag::kES3) { + result += "$es3 "; + } + if (*this & ModifierFlag::kPure) { + result += "$pure "; + } + if (*this & ModifierFlag::kInline) { + result += "inline "; + } + if (*this & ModifierFlag::kNoInline) { + result += "noinline "; + } + + // Real GLSL qualifiers (must be specified in order in GLSL 4.1 and below) + if (*this & ModifierFlag::kFlat) { + result += "flat "; + } + if (*this & ModifierFlag::kNoPerspective) { + result += "noperspective "; + } + if (*this & ModifierFlag::kConst) { + result += "const "; + } + if (*this & ModifierFlag::kUniform) { + result += "uniform "; + } + if ((*this & ModifierFlag::kIn) && (*this & ModifierFlag::kOut)) { + result += "inout "; + } else if (*this & ModifierFlag::kIn) { + result += "in "; + } else if (*this & ModifierFlag::kOut) { + result += "out "; + } + if (*this & ModifierFlag::kHighp) { + result += "highp "; + } + if (*this & ModifierFlag::kMediump) { + result += "mediump "; + } + if (*this & ModifierFlag::kLowp) { + result += "lowp "; + } + if (*this & ModifierFlag::kReadOnly) { + result += "readonly "; + } + if (*this & ModifierFlag::kWriteOnly) { + result += "writeonly "; + } + if (*this & ModifierFlag::kBuffer) { + result += "buffer "; + } + + // We're using a non-GLSL name for this one; the GLSL equivalent is "shared" + if (*this & ModifierFlag::kWorkgroup) { + result += "workgroup "; + } + + return result; +} + +std::string ModifierFlags::description() const { + std::string s = this->paddedDescription(); + if (!s.empty()) { + s.pop_back(); + } + return s; +} + +bool ModifierFlags::checkPermittedFlags(const Context& context, + Position pos, + ModifierFlags permittedModifierFlags) const { + static constexpr struct { ModifierFlag flag; const char* name; } kModifierFlags[] = { + { ModifierFlag::kConst, "const" }, + { ModifierFlag::kIn, "in" }, + { ModifierFlag::kOut, "out" }, + { ModifierFlag::kUniform, "uniform" }, + { ModifierFlag::kFlat, "flat" }, + { ModifierFlag::kNoPerspective, "noperspective" }, + { ModifierFlag::kPure, "$pure" }, + { ModifierFlag::kInline, "inline" }, + { ModifierFlag::kNoInline, "noinline" }, + { ModifierFlag::kHighp, "highp" }, + { ModifierFlag::kMediump, "mediump" }, + { ModifierFlag::kLowp, "lowp" }, + { ModifierFlag::kExport, "$export" }, + { ModifierFlag::kES3, "$es3" }, + { ModifierFlag::kWorkgroup, "workgroup" }, + { ModifierFlag::kReadOnly, "readonly" }, + { ModifierFlag::kWriteOnly, "writeonly" }, + { ModifierFlag::kBuffer, "buffer" }, + }; + + bool success = true; + ModifierFlags modifierFlags = *this; + for (const auto& f : kModifierFlags) { + if (modifierFlags & f.flag) { + if (!(permittedModifierFlags & f.flag)) { + context.fErrors->error(pos, "'" + std::string(f.name) + "' is not permitted here"); + success = false; + } + modifierFlags &= ~f.flag; + } + } + SkASSERT(modifierFlags == ModifierFlag::kNone); + + return success; +} + +} // namespace SkSL diff --git a/src/sksl/ir/SkSLModifierFlags.h b/src/sksl/ir/SkSLModifierFlags.h new file mode 100644 index 000000000000..851bd4f4545f --- /dev/null +++ b/src/sksl/ir/SkSLModifierFlags.h @@ -0,0 +1,84 @@ +/* + * Copyright 2016 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef SKSL_MODIFIERFLAGS +#define SKSL_MODIFIERFLAGS + +#include "include/private/base/SkTo.h" +#include "src/base/SkEnumBitMask.h" + +#include + +namespace SkSL { + +class Context; +class Position; + +enum class ModifierFlag : int { + kNone = 0, + // Real GLSL modifiers + kFlat = 1 << 0, + kNoPerspective = 1 << 1, + kConst = 1 << 2, + kUniform = 1 << 3, + kIn = 1 << 4, + kOut = 1 << 5, + kHighp = 1 << 6, + kMediump = 1 << 7, + kLowp = 1 << 8, + kReadOnly = 1 << 9, + kWriteOnly = 1 << 10, + kBuffer = 1 << 11, + // Corresponds to the GLSL 'shared' modifier. Only allowed in a compute program. + kWorkgroup = 1 << 12, + // SkSL extensions, not present in GLSL + kExport = 1 << 13, + kES3 = 1 << 14, + kPure = 1 << 15, + kInline = 1 << 16, + kNoInline = 1 << 17, +}; + +} // namespace SkSL + +SK_MAKE_BITMASK_OPS(SkSL::ModifierFlag); + +namespace SkSL { + +class ModifierFlags : public SkEnumBitMask { +public: + using SkEnumBitMask::SkEnumBitMask; + ModifierFlags(SkEnumBitMask that) + : SkEnumBitMask(that) {} + + std::string description() const; + std::string paddedDescription() const; + + /** + * Verifies that only permitted modifier flags are included. Reports errors and returns false in + * the event of a violation. + */ + bool checkPermittedFlags(const Context& context, + Position pos, + ModifierFlags permittedModifierFlags) const; + + bool isConst() const { return SkToBool(*this & ModifierFlag::kConst); } + bool isUniform() const { return SkToBool(*this & ModifierFlag::kUniform); } + bool isReadOnly() const { return SkToBool(*this & ModifierFlag::kReadOnly); } + bool isWriteOnly() const { return SkToBool(*this & ModifierFlag::kWriteOnly); } + bool isBuffer() const { return SkToBool(*this & ModifierFlag::kBuffer); } + bool isWorkgroup() const { return SkToBool(*this & ModifierFlag::kWorkgroup); } + bool isExport() const { return SkToBool(*this & ModifierFlag::kExport); } + bool isES3() const { return SkToBool(*this & ModifierFlag::kES3); } + bool isPure() const { return SkToBool(*this & ModifierFlag::kPure); } + bool isInline() const { return SkToBool(*this & ModifierFlag::kInline); } + bool isNoInline() const { return SkToBool(*this & ModifierFlag::kNoInline); } +}; + +} // namespace SkSL + +#endif diff --git a/src/sksl/ir/SkSLModifiers.cpp b/src/sksl/ir/SkSLModifiers.cpp deleted file mode 100644 index 120e2a27838b..000000000000 --- a/src/sksl/ir/SkSLModifiers.cpp +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright 2021 Google LLC. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#include "src/sksl/ir/SkSLModifiers.h" - -#include "include/core/SkTypes.h" -#include "src/base/SkMathPriv.h" -#include "src/sksl/SkSLContext.h" -#include "src/sksl/SkSLErrorReporter.h" -#include "src/sksl/SkSLPosition.h" - -namespace SkSL { - -bool Modifiers::checkPermitted(const Context& context, - Position pos, - int permittedModifierFlags, - int permittedLayoutFlags) const { - static constexpr struct { Modifiers::Flag flag; const char* name; } kModifierFlags[] = { - { Modifiers::kConst_Flag, "const" }, - { Modifiers::kIn_Flag, "in" }, - { Modifiers::kOut_Flag, "out" }, - { Modifiers::kUniform_Flag, "uniform" }, - { Modifiers::kFlat_Flag, "flat" }, - { Modifiers::kNoPerspective_Flag, "noperspective" }, - { Modifiers::kPure_Flag, "$pure" }, - { Modifiers::kInline_Flag, "inline" }, - { Modifiers::kNoInline_Flag, "noinline" }, - { Modifiers::kHighp_Flag, "highp" }, - { Modifiers::kMediump_Flag, "mediump" }, - { Modifiers::kLowp_Flag, "lowp" }, - { Modifiers::kExport_Flag, "$export" }, - { Modifiers::kES3_Flag, "$es3" }, - { Modifiers::kWorkgroup_Flag, "workgroup" }, - { Modifiers::kReadOnly_Flag, "readonly" }, - { Modifiers::kWriteOnly_Flag, "writeonly" }, - { Modifiers::kBuffer_Flag, "buffer" }, - }; - - bool success = true; - int modifierFlags = fFlags; - for (const auto& f : kModifierFlags) { - if (modifierFlags & f.flag) { - if (!(permittedModifierFlags & f.flag)) { - context.fErrors->error(pos, "'" + std::string(f.name) + "' is not permitted here"); - success = false; - } - modifierFlags &= ~f.flag; - } - } - SkASSERT(modifierFlags == 0); - - int backendFlags = fLayout.fFlags & Layout::kAllBackendFlagsMask; - if (SkPopCount(backendFlags) > 1) { - context.fErrors->error(pos, "only one backend qualifier can be used"); - success = false; - } - - static constexpr struct { Layout::Flag flag; const char* name; } kLayoutFlags[] = { - { Layout::kOriginUpperLeft_Flag, "origin_upper_left"}, - { Layout::kPushConstant_Flag, "push_constant"}, - { Layout::kBlendSupportAllEquations_Flag, "blend_support_all_equations"}, - { Layout::kColor_Flag, "color"}, - { Layout::kLocation_Flag, "location"}, - { Layout::kOffset_Flag, "offset"}, - { Layout::kBinding_Flag, "binding"}, - { Layout::kTexture_Flag, "texture"}, - { Layout::kSampler_Flag, "sampler"}, - { Layout::kIndex_Flag, "index"}, - { Layout::kSet_Flag, "set"}, - { Layout::kBuiltin_Flag, "builtin"}, - { Layout::kInputAttachmentIndex_Flag, "input_attachment_index"}, - { Layout::kSPIRV_Flag, "spirv"}, - { Layout::kMetal_Flag, "metal"}, - { Layout::kGL_Flag, "gl"}, - { Layout::kWGSL_Flag, "wgsl"}, - }; - - int layoutFlags = fLayout.fFlags; - if ((layoutFlags & (Layout::kTexture_Flag | Layout::kSampler_Flag)) && - layoutFlags & Layout::kBinding_Flag) { - context.fErrors->error(pos, "'binding' modifier cannot coexist with 'texture'/'sampler'"); - success = false; - } - // The `texture` and `sampler` flags are only allowed when explicitly targeting Metal and WGSL - if (!(layoutFlags & (Layout::kMetal_Flag | Layout::kWGSL_Flag))) { - permittedLayoutFlags &= ~Layout::kTexture_Flag; - permittedLayoutFlags &= ~Layout::kSampler_Flag; - } - // The `set` flag is not allowed when explicitly targeting Metal and GLSL. It is currently - // allowed when no backend flag is present. - // TODO(skia:14023): Further restrict the `set` flag to SPIR-V and WGSL - if (layoutFlags & (Layout::kMetal_Flag | Layout::kGL_Flag)) { - permittedLayoutFlags &= ~Layout::kSet_Flag; - } - // TODO(skia:14023): Restrict the `push_constant` flag to SPIR-V and WGSL - - for (const auto& lf : kLayoutFlags) { - if (layoutFlags & lf.flag) { - if (!(permittedLayoutFlags & lf.flag)) { - context.fErrors->error(pos, "layout qualifier '" + std::string(lf.name) + - "' is not permitted here"); - success = false; - } - layoutFlags &= ~lf.flag; - } - } - SkASSERT(layoutFlags == 0); - return success; -} - -} // namespace SkSL diff --git a/src/sksl/ir/SkSLModifiers.h b/src/sksl/ir/SkSLModifiers.h index 3752480e1cee..44606f42a994 100644 --- a/src/sksl/ir/SkSLModifiers.h +++ b/src/sksl/ir/SkSLModifiers.h @@ -1,5 +1,5 @@ /* - * Copyright 2016 Google Inc. + * Copyright 2020 Google LLC * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. @@ -8,171 +8,18 @@ #ifndef SKSL_MODIFIERS #define SKSL_MODIFIERS +#include "src/sksl/SkSLPosition.h" #include "src/sksl/ir/SkSLLayout.h" - -#include -#include -#include +#include "src/sksl/ir/SkSLModifierFlags.h" namespace SkSL { -class Context; -class Position; - -/** - * A set of modifier keywords (in, out, uniform, etc.) appearing before a declaration. - */ struct Modifiers { - /** - * OpenGL requires modifiers to be in a strict order: - * - invariant-qualifier: (invariant) - * - interpolation-qualifier: flat, noperspective, (smooth) - * - storage-qualifier: const, uniform - * - parameter-qualifier: in, out, inout - * - precision-qualifier: highp, mediump, lowp - * - * SkSL does not have `invariant` or `smooth`. - */ - - enum Flag { - kNo_Flag = 0, - // Real GLSL modifiers - kFlat_Flag = 1 << 0, - kNoPerspective_Flag = 1 << 1, - kConst_Flag = 1 << 2, - kUniform_Flag = 1 << 3, - kIn_Flag = 1 << 4, - kOut_Flag = 1 << 5, - kHighp_Flag = 1 << 6, - kMediump_Flag = 1 << 7, - kLowp_Flag = 1 << 8, - kReadOnly_Flag = 1 << 9, - kWriteOnly_Flag = 1 << 10, - kBuffer_Flag = 1 << 11, - // Corresponds to the GLSL 'shared' modifier. Only allowed in a compute program. - kWorkgroup_Flag = 1 << 12, - // SkSL extensions, not present in GLSL - kExport_Flag = 1 << 13, - kES3_Flag = 1 << 14, - kPure_Flag = 1 << 15, - kInline_Flag = 1 << 16, - kNoInline_Flag = 1 << 17, - }; - - Modifiers() - : fLayout(Layout()) - , fFlags(0) {} - - Modifiers(const Layout& layout, int flags) - : fLayout(layout) - , fFlags(flags) {} - - std::string description() const { - return fLayout.description() + DescribeFlags(fFlags) + " "; - } - - static std::string DescribeFlags(int flags) { - // SkSL extensions - std::string result; - if (flags & kExport_Flag) { - result += "$export "; - } - if (flags & kES3_Flag) { - result += "$es3 "; - } - if (flags & kPure_Flag) { - result += "$pure "; - } - if (flags & kInline_Flag) { - result += "inline "; - } - if (flags & kNoInline_Flag) { - result += "noinline "; - } - - // Real GLSL qualifiers (must be specified in order in GLSL 4.1 and below) - if (flags & kFlat_Flag) { - result += "flat "; - } - if (flags & kNoPerspective_Flag) { - result += "noperspective "; - } - if (flags & kConst_Flag) { - result += "const "; - } - if (flags & kUniform_Flag) { - result += "uniform "; - } - if ((flags & kIn_Flag) && (flags & kOut_Flag)) { - result += "inout "; - } else if (flags & kIn_Flag) { - result += "in "; - } else if (flags & kOut_Flag) { - result += "out "; - } - if (flags & kHighp_Flag) { - result += "highp "; - } - if (flags & kMediump_Flag) { - result += "mediump "; - } - if (flags & kLowp_Flag) { - result += "lowp "; - } - if (flags & kReadOnly_Flag) { - result += "readonly "; - } - if (flags & kWriteOnly_Flag) { - result += "writeonly "; - } - if (flags & kBuffer_Flag) { - result += "buffer "; - } - - // We're using a non-GLSL name for this one; the GLSL equivalent is "shared" - if (flags & kWorkgroup_Flag) { - result += "workgroup "; - } - - if (!result.empty()) { - result.pop_back(); - } - return result; - } - - bool operator==(const Modifiers& other) const { - return fLayout == other.fLayout && fFlags == other.fFlags; - } - - bool operator!=(const Modifiers& other) const { - return !(*this == other); - } - - /** - * Verifies that only permitted modifiers and layout flags are included. Reports errors and - * returns false in the event of a violation. - */ - bool checkPermitted(const Context& context, - Position pos, - int permittedModifierFlags, - int permittedLayoutFlags) const; - - Layout fLayout; - int fFlags; -}; - -} // namespace SkSL - -namespace std { - -template <> -struct hash { - size_t operator()(const SkSL::Modifiers& key) const { - return (size_t) key.fFlags ^ ((size_t) key.fLayout.fFlags << 8) ^ - ((size_t) key.fLayout.fBuiltin << 16); - } + Position fPosition; + SkSL::Layout fLayout; + SkSL::ModifierFlags fFlags = ModifierFlag::kNone; }; -} // namespace std +} // namespace SkSL #endif diff --git a/src/sksl/ir/SkSLModifiersDeclaration.cpp b/src/sksl/ir/SkSLModifiersDeclaration.cpp index 775c64a59c34..cd59c34e9a91 100644 --- a/src/sksl/ir/SkSLModifiersDeclaration.cpp +++ b/src/sksl/ir/SkSLModifiersDeclaration.cpp @@ -5,12 +5,14 @@ * found in the LICENSE file. */ +#include "src/sksl/ir/SkSLModifiersDeclaration.h" + #include "include/private/base/SkAssert.h" +#include "src/base/SkEnumBitMask.h" #include "src/sksl/SkSLContext.h" #include "src/sksl/SkSLErrorReporter.h" -#include "src/sksl/SkSLModifiersPool.h" #include "src/sksl/SkSLProgramSettings.h" -#include "src/sksl/ir/SkSLModifiersDeclaration.h" +#include "src/sksl/ir/SkSLModifiers.h" #include @@ -19,26 +21,43 @@ namespace SkSL { enum class ProgramKind : int8_t; std::unique_ptr ModifiersDeclaration::Convert(const Context& context, - Position pos, const Modifiers& modifiers) { SkSL::ProgramKind kind = context.fConfig->fKind; - if (!ProgramConfig::IsFragment(kind) && - !ProgramConfig::IsVertex(kind)) { - context.fErrors->error(pos, "layout qualifiers are not allowed in this kind of program"); + if (!ProgramConfig::IsFragment(kind) && !ProgramConfig::IsVertex(kind) && + !ProgramConfig::IsCompute(kind)) { + context.fErrors->error(modifiers.fPosition, + "layout qualifiers are not allowed in this kind of program"); return nullptr; } - return ModifiersDeclaration::Make(context, pos, modifiers); + if ((modifiers.fLayout.fLocalSizeX >= 0 || modifiers.fLayout.fLocalSizeY >= 0 || + modifiers.fLayout.fLocalSizeZ >= 0)) { + if (!ProgramConfig::IsCompute(kind)) { + context.fErrors->error( + modifiers.fPosition, + "local size layout qualifiers are only allowed in a compute program"); + return nullptr; + } + if (modifiers.fFlags != ModifierFlag::kIn) { + context.fErrors->error( + modifiers.fPosition, + "local size layout qualifiers must be defined using an 'in' declaration"); + return nullptr; + } + } + + return ModifiersDeclaration::Make(context, modifiers); } std::unique_ptr ModifiersDeclaration::Make(const Context& context, - Position pos, const Modifiers& modifiers) { [[maybe_unused]] SkSL::ProgramKind kind = context.fConfig->fKind; - SkASSERT(ProgramConfig::IsFragment(kind) || - ProgramConfig::IsVertex(kind)); + SkASSERT(ProgramConfig::IsFragment(kind) || ProgramConfig::IsVertex(kind) || + ProgramConfig::IsCompute(kind)); - return std::make_unique(pos, context.fModifiersPool->add(modifiers)); + return std::make_unique(modifiers.fPosition, + modifiers.fLayout, + modifiers.fFlags); } } // namespace SkSL diff --git a/src/sksl/ir/SkSLModifiersDeclaration.h b/src/sksl/ir/SkSLModifiersDeclaration.h index a5bd9983f4d7..85ffc9fa49d8 100644 --- a/src/sksl/ir/SkSLModifiersDeclaration.h +++ b/src/sksl/ir/SkSLModifiersDeclaration.h @@ -10,7 +10,8 @@ #include "src/sksl/SkSLPosition.h" #include "src/sksl/ir/SkSLIRNode.h" -#include "src/sksl/ir/SkSLModifiers.h" +#include "src/sksl/ir/SkSLLayout.h" +#include "src/sksl/ir/SkSLModifierFlags.h" #include "src/sksl/ir/SkSLProgramElement.h" #include @@ -19,6 +20,7 @@ namespace SkSL { class Context; +struct Modifiers; /** * A declaration that consists only of modifiers, e.g.: @@ -29,32 +31,36 @@ class ModifiersDeclaration final : public ProgramElement { public: inline static constexpr Kind kIRNodeKind = Kind::kModifiers; - ModifiersDeclaration(Position pos, const Modifiers* modifiers) + ModifiersDeclaration(Position pos, const Layout& layout, ModifierFlags flags) : INHERITED(pos, kIRNodeKind) - , fModifiers(modifiers) {} + , fLayout(layout) + , fFlags(flags) {} static std::unique_ptr Convert(const Context& context, - Position pos, const Modifiers& modifiers); static std::unique_ptr Make(const Context& context, - Position pos, const Modifiers& modifiers); - const Modifiers& modifiers() const { - return *fModifiers; + const Layout& layout() const { + return fLayout; + } + + ModifierFlags modifierFlags() const { + return fFlags; } std::unique_ptr clone() const override { - return std::make_unique(fPosition, fModifiers); + return std::make_unique(fPosition, fLayout, fFlags); } std::string description() const override { - return this->modifiers().description() + ";"; + return fLayout.paddedDescription() + fFlags.description() + ';'; } private: - const Modifiers* fModifiers; + Layout fLayout; + ModifierFlags fFlags; using INHERITED = ProgramElement; }; diff --git a/src/sksl/ir/SkSLProgram.cpp b/src/sksl/ir/SkSLProgram.cpp index 44e51f1c0dc6..f5d874124fc9 100644 --- a/src/sksl/ir/SkSLProgram.cpp +++ b/src/sksl/ir/SkSLProgram.cpp @@ -6,7 +6,6 @@ */ #include "src/sksl/SkSLAnalysis.h" -#include "src/sksl/SkSLModifiersPool.h" #include "src/sksl/SkSLPool.h" #include "src/sksl/SkSLProgramSettings.h" #include "src/sksl/analysis/SkSLProgramUsage.h" @@ -26,14 +25,12 @@ Program::Program(std::unique_ptr source, std::shared_ptr context, std::vector> elements, std::vector sharedElements, - std::unique_ptr modifiers, std::shared_ptr symbols, std::unique_ptr pool, Interface interface) : fSource(std::move(source)) , fConfig(std::move(config)) , fContext(context) - , fModifiers(std::move(modifiers)) , fSymbols(symbols) , fPool(std::move(pool)) , fOwnedElements(std::move(elements)) @@ -51,7 +48,6 @@ Program::~Program() { fOwnedElements.clear(); fContext.reset(); fSymbols.reset(); - fModifiers.reset(); } std::string Program::description() const { diff --git a/src/sksl/ir/SkSLProgram.h b/src/sksl/ir/SkSLProgram.h index 90abc1d9a38d..bd0d350ef123 100644 --- a/src/sksl/ir/SkSLProgram.h +++ b/src/sksl/ir/SkSLProgram.h @@ -22,7 +22,6 @@ namespace SkSL { class Context; class FunctionDeclaration; -class ModifiersPool; class Pool; class ProgramElement; class ProgramUsage; @@ -64,7 +63,6 @@ struct Program { std::shared_ptr context, std::vector> elements, std::vector sharedElements, - std::unique_ptr modifiers, std::shared_ptr symbols, std::unique_ptr pool, Interface); @@ -152,7 +150,6 @@ struct Program { std::unique_ptr fConfig; std::shared_ptr fContext; std::unique_ptr fUsage; - std::unique_ptr fModifiers; // it's important to keep fOwnedElements defined after (and thus destroyed before) fSymbols, // because destroying elements can modify reference counts in symbols std::shared_ptr fSymbols; diff --git a/src/sksl/ir/SkSLStructDefinition.cpp b/src/sksl/ir/SkSLStructDefinition.cpp index 6030997ccf0c..1cc578c7318a 100644 --- a/src/sksl/ir/SkSLStructDefinition.cpp +++ b/src/sksl/ir/SkSLStructDefinition.cpp @@ -9,7 +9,8 @@ #include "include/private/base/SkSpan_impl.h" #include "src/sksl/SkSLContext.h" -#include "src/sksl/ir/SkSLModifiers.h" +#include "src/sksl/ir/SkSLLayout.h" +#include "src/sksl/ir/SkSLModifierFlags.h" #include "src/sksl/ir/SkSLSymbolTable.h" #include "src/sksl/ir/SkSLType.h" @@ -39,9 +40,11 @@ std::string StructDefinition::description() const { s += this->type().name(); s += " { "; for (const auto& f : this->type().fields()) { - s += f.fModifiers.description(); + s += f.fLayout.description(); + s += f.fModifierFlags.description(); + s += ' '; s += f.fType->description(); - s += " "; + s += ' '; s += f.fName; s += "; "; } diff --git a/src/sksl/ir/SkSLSwizzle.cpp b/src/sksl/ir/SkSLSwizzle.cpp index fb941f71984b..9ea4a5db0538 100644 --- a/src/sksl/ir/SkSLSwizzle.cpp +++ b/src/sksl/ir/SkSLSwizzle.cpp @@ -286,10 +286,16 @@ std::unique_ptr Swizzle::Convert(const Context& context, // 'float4(base.xw, 1, 0).xzyw'. std::unique_ptr Swizzle::Convert(const Context& context, Position pos, - Position rawMaskPos, + Position maskPos, std::unique_ptr base, ComponentArray inComponents) { - Position maskPos = rawMaskPos.valid() ? rawMaskPos : pos; + if (inComponents.size() > 4) { + context.fErrors->error(Position::Range(maskPos.startOffset() + 4, + maskPos.endOffset()), + "too many components in swizzle mask"); + return nullptr; + } + if (!validate_swizzle_domain(inComponents)) { context.fErrors->error(maskPos, "invalid swizzle mask '" + MaskString(inComponents) + "'"); return nullptr; @@ -303,15 +309,6 @@ std::unique_ptr Swizzle::Convert(const Context& context, return nullptr; } - if (inComponents.size() > 4) { - Position errorPos = rawMaskPos.valid() ? Position::Range(maskPos.startOffset() + 4, - maskPos.endOffset()) - : pos; - context.fErrors->error(errorPos, "too many components in swizzle mask '" + - MaskString(inComponents) + "'"); - return nullptr; - } - ComponentArray maskComponents; bool foundXYZW = false; for (int i = 0; i < inComponents.size(); ++i) { diff --git a/src/sksl/ir/SkSLTernaryExpression.cpp b/src/sksl/ir/SkSLTernaryExpression.cpp index 835d9a56524d..1939f6e19e32 100644 --- a/src/sksl/ir/SkSLTernaryExpression.cpp +++ b/src/sksl/ir/SkSLTernaryExpression.cpp @@ -31,7 +31,7 @@ std::unique_ptr TernaryExpression::Convert(const Context& context, } if (ifTrue->type().componentType().isOpaque()) { context.fErrors->error(pos, "ternary expression of opaque type '" + - ifTrue->type().displayName() + "' not allowed"); + ifTrue->type().displayName() + "' is not allowed"); return nullptr; } const Type* trueType; @@ -41,14 +41,19 @@ std::unique_ptr TernaryExpression::Convert(const Context& context, if (!equalityOp.determineBinaryType(context, ifTrue->type(), ifFalse->type(), &trueType, &falseType, &resultType) || !trueType->matches(*falseType)) { - context.fErrors->error(ifTrue->fPosition.rangeThrough(ifFalse->fPosition), - "ternary operator result mismatch: '" + ifTrue->type().displayName() + "', '" + - ifFalse->type().displayName() + "'"); + Position errorPos = ifTrue->fPosition.rangeThrough(ifFalse->fPosition); + if (ifTrue->type().isVoid()) { + context.fErrors->error(errorPos, "ternary expression of type 'void' is not allowed"); + } else { + context.fErrors->error(errorPos, "ternary operator result mismatch: '" + + ifTrue->type().displayName() + "', '" + + ifFalse->type().displayName() + "'"); + } return nullptr; } - if (context.fConfig->strictES2Mode() && trueType->isOrContainsArray()) { + if (trueType->isOrContainsArray()) { context.fErrors->error(pos, "ternary operator result may not be an array (or struct " - "containing an array)"); + "containing an array)"); return nullptr; } ifTrue = trueType->coerceExpression(std::move(ifTrue), context); diff --git a/src/sksl/ir/SkSLType.cpp b/src/sksl/ir/SkSLType.cpp index eeed3a172dd8..589bd994bf17 100644 --- a/src/sksl/ir/SkSLType.cpp +++ b/src/sksl/ir/SkSLType.cpp @@ -8,6 +8,7 @@ #include "src/sksl/ir/SkSLType.h" #include "include/private/base/SkTo.h" +#include "src/base/SkEnumBitMask.h" #include "src/base/SkMathPriv.h" #include "src/base/SkSafeMath.h" #include "src/core/SkTHash.h" @@ -22,6 +23,7 @@ #include "src/sksl/ir/SkSLConstructorScalarCast.h" #include "src/sksl/ir/SkSLExpression.h" #include "src/sksl/ir/SkSLLayout.h" +#include "src/sksl/ir/SkSLModifierFlags.h" #include "src/sksl/ir/SkSLSymbolTable.h" #include @@ -753,17 +755,16 @@ std::unique_ptr Type::MakeStructType(const Context& context, std::string(structOrIB) + " ('" + std::string(name) + "')"); } - if (field.fModifiers.fFlags != Modifiers::kNo_Flag) { - std::string desc = field.fModifiers.description(); - desc.pop_back(); // remove trailing space + if (field.fModifierFlags != ModifierFlag::kNone) { + std::string desc = field.fModifierFlags.description(); context.fErrors->error(field.fPosition, "modifier '" + desc + "' is not permitted on " + std::string(aStructOrIB) + " field"); } - if (field.fModifiers.fLayout.fFlags & Layout::kBinding_Flag) { + if (field.fLayout.fFlags & LayoutFlag::kBinding) { context.fErrors->error(field.fPosition, "layout qualifier 'binding' is not permitted " "on " + std::string(aStructOrIB) + " field"); } - if (field.fModifiers.fLayout.fFlags & Layout::kSet_Flag) { + if (field.fLayout.fFlags & LayoutFlag::kSet) { context.fErrors->error(field.fPosition, "layout qualifier 'set' is not permitted on " + std::string(aStructOrIB) + " field"); } @@ -853,21 +854,21 @@ CoercionCost Type::coercionCost(const Type& other) const { } const Type* Type::applyQualifiers(const Context& context, - Modifiers* modifiers, + ModifierFlags* modifierFlags, Position pos) const { const Type* type; - type = this->applyPrecisionQualifiers(context, modifiers, pos); - type = type->applyAccessQualifiers(context, modifiers, pos); + type = this->applyPrecisionQualifiers(context, modifierFlags, pos); + type = type->applyAccessQualifiers(context, modifierFlags, pos); return type; } const Type* Type::applyPrecisionQualifiers(const Context& context, - Modifiers* modifiers, + ModifierFlags* modifierFlags, Position pos) const { - int precisionQualifiers = modifiers->fFlags & (Modifiers::kHighp_Flag | - Modifiers::kMediump_Flag | - Modifiers::kLowp_Flag); - if (!precisionQualifiers) { + ModifierFlags precisionQualifiers = *modifierFlags & (ModifierFlag::kHighp | + ModifierFlag::kMediump | + ModifierFlag::kLowp); + if (precisionQualifiers == ModifierFlag::kNone) { // No precision qualifiers here. Return the type as-is. return this; } @@ -879,19 +880,19 @@ const Type* Type::applyPrecisionQualifiers(const Context& context, return context.fTypes.fPoison.get(); } - if (SkPopCount(precisionQualifiers) > 1) { + if (SkPopCount(precisionQualifiers.value()) > 1) { context.fErrors->error(pos, "only one precision qualifier can be used"); return context.fTypes.fPoison.get(); } // We're going to return a whole new type, so the modifier bits can be cleared out. - modifiers->fFlags &= ~(Modifiers::kHighp_Flag | - Modifiers::kMediump_Flag | - Modifiers::kLowp_Flag); + *modifierFlags &= ~(ModifierFlag::kHighp | + ModifierFlag::kMediump | + ModifierFlag::kLowp); const Type& component = this->componentType(); if (component.highPrecision()) { - if (precisionQualifiers & Modifiers::kHighp_Flag) { + if (precisionQualifiers & ModifierFlag::kHighp) { // Type is already high precision, and we are requesting high precision. Return as-is. return this; } @@ -931,36 +932,32 @@ const Type* Type::applyPrecisionQualifiers(const Context& context, } const Type* Type::applyAccessQualifiers(const Context& context, - Modifiers* modifiers, + ModifierFlags* modifierFlags, Position pos) const { - int accessQualifiers = modifiers->fFlags & (Modifiers::kReadOnly_Flag | - Modifiers::kWriteOnly_Flag); + ModifierFlags accessQualifiers = *modifierFlags & (ModifierFlag::kReadOnly | + ModifierFlag::kWriteOnly); if (!accessQualifiers) { // No access qualifiers here. Return the type as-is. return this; } // We're going to return a whole new type, so the modifier bits can be cleared out. - modifiers->fFlags &= ~(Modifiers::kReadOnly_Flag | - Modifiers::kWriteOnly_Flag); + *modifierFlags &= ~(ModifierFlag::kReadOnly | + ModifierFlag::kWriteOnly); if (this->matches(*context.fTypes.fReadWriteTexture2D)) { - switch (accessQualifiers) { - case Modifiers::kReadOnly_Flag: - return context.fTypes.fReadOnlyTexture2D.get(); - - case Modifiers::kWriteOnly_Flag: - return context.fTypes.fWriteOnlyTexture2D.get(); - - default: - context.fErrors->error(pos, "'readonly' and 'writeonly' qualifiers " - "cannot be combined"); - return this; + if (accessQualifiers == ModifierFlag::kReadOnly) { + return context.fTypes.fReadOnlyTexture2D.get(); } + if (accessQualifiers == ModifierFlag::kWriteOnly) { + return context.fTypes.fWriteOnlyTexture2D.get(); + } + context.fErrors->error(pos, "'readonly' and 'writeonly' qualifiers cannot be combined"); + return this; } context.fErrors->error(pos, "type '" + this->displayName() + "' does not support qualifier '" + - Modifiers::DescribeFlags(accessQualifiers) + "'"); + accessQualifiers.description() + "'"); return this; } @@ -1311,7 +1308,8 @@ SKSL_INT Type::convertArraySize(const Context& context, } std::string Field::description() const { - return fModifiers.description() + fType->displayName() + " " + std::string(fName) + ";"; + return fLayout.paddedDescription() + fModifierFlags.paddedDescription() + fType->displayName() + + ' ' + std::string(fName) + ';'; } } // namespace SkSL diff --git a/src/sksl/ir/SkSLType.h b/src/sksl/ir/SkSLType.h index beb711d40485..3291b3c7ba7f 100644 --- a/src/sksl/ir/SkSLType.h +++ b/src/sksl/ir/SkSLType.h @@ -14,7 +14,8 @@ #include "include/private/base/SkTArray.h" #include "src/sksl/SkSLPosition.h" #include "src/sksl/ir/SkSLIRNode.h" -#include "src/sksl/ir/SkSLModifiers.h" +#include "src/sksl/ir/SkSLLayout.h" +#include "src/sksl/ir/SkSLModifierFlags.h" #include "src/sksl/ir/SkSLSymbol.h" #include "src/sksl/spirv.h" @@ -70,16 +71,18 @@ struct CoercionCost { * Represents a single field in a struct type. */ struct Field { - Field(Position pos, Modifiers modifiers, std::string_view name, const Type* type) + Field(Position pos, Layout layout, ModifierFlags flags, std::string_view name, const Type* type) : fPosition(pos) - , fModifiers(modifiers) + , fLayout(layout) + , fModifierFlags(flags) , fName(name) , fType(type) {} std::string description() const; Position fPosition; - Modifiers fModifiers; + Layout fLayout; + ModifierFlags fModifierFlags; std::string_view fName; const Type* fType; }; @@ -470,6 +473,10 @@ class Type : public Symbol { return fTypeKind == TypeKind::kGeneric; } + bool isSampler() const { + return fTypeKind == TypeKind::kSampler; + } + bool isAtomic() const { return this->typeKind() == TypeKind::kAtomic; } virtual bool isScalar() const { @@ -527,7 +534,7 @@ class Type : public Symbol { } bool hasPrecision() const { - return this->componentType().isNumber() || fTypeKind == TypeKind::kSampler; + return this->componentType().isNumber() || this->isSampler(); } bool highPrecision() const { @@ -549,12 +556,15 @@ class Type : public Symbol { const Type& toCompound(const Context& context, int columns, int rows) const; /** - * Returns a type which honors the precision and access-level qualifiers set in Modifiers. e.g.: + * Returns a type which honors the precision and access-level qualifiers set in ModifierFlags. + * For example: * - Modifier `mediump` + Type `float2`: Type `half2` * - Modifier `readonly` + Type `texture2D`: Type `readonlyTexture2D` * Generates an error if the qualifiers don't make sense (`highp bool`, `writeonly MyStruct`) */ - const Type* applyQualifiers(const Context& context, Modifiers* modifiers, Position pos) const; + const Type* applyQualifiers(const Context& context, + ModifierFlags* modifierFlags, + Position pos) const; /** * Coerces the passed-in expression to this type. If the types are incompatible, reports an @@ -596,11 +606,11 @@ class Type : public Symbol { } const Type* applyPrecisionQualifiers(const Context& context, - Modifiers* modifiers, + ModifierFlags* modifierFlags, Position pos) const; const Type* applyAccessQualifiers(const Context& context, - Modifiers* modifiers, + ModifierFlags* modifierFlags, Position pos) const; private: diff --git a/src/sksl/ir/SkSLTypeReference.cpp b/src/sksl/ir/SkSLTypeReference.cpp index 52b56d7a2b26..655f48e70065 100644 --- a/src/sksl/ir/SkSLTypeReference.cpp +++ b/src/sksl/ir/SkSLTypeReference.cpp @@ -9,17 +9,29 @@ #include "include/core/SkTypes.h" #include "src/sksl/SkSLErrorReporter.h" +#include "src/sksl/SkSLProgramSettings.h" namespace SkSL { +bool TypeReference::VerifyType(const Context& context, const SkSL::Type* type, Position pos) { + if (!context.fConfig->fIsBuiltinCode && type) { + if (type->isGeneric() || type->isLiteral()) { + context.fErrors->error(pos, "type '" + std::string(type->name()) + "' is generic"); + return false; + } + if (!type->isAllowedInES2(context)) { + context.fErrors->error(pos, "type '" + std::string(type->name()) +"' is not supported"); + return false; + } + } + return true; +} + std::unique_ptr TypeReference::Convert(const Context& context, Position pos, const Type* type) { - if (!type->isAllowedInES2(context)) { - context.fErrors->error(pos, "type '" + type->displayName() + "' is not supported"); - return nullptr; - } - return TypeReference::Make(context, pos, type); + return VerifyType(context, type, pos) ? TypeReference::Make(context, pos, type) + : nullptr; } std::unique_ptr TypeReference::Make(const Context& context, diff --git a/src/sksl/ir/SkSLTypeReference.h b/src/sksl/ir/SkSLTypeReference.h index 08fd39dce7ae..4055634a0f14 100644 --- a/src/sksl/ir/SkSLTypeReference.h +++ b/src/sksl/ir/SkSLTypeReference.h @@ -32,7 +32,12 @@ class TypeReference final : public Expression { inline static constexpr Kind kIRNodeKind = Kind::kTypeReference; TypeReference(const Context& context, Position pos, const Type* value) - : TypeReference(pos, value, context.fTypes.fInvalid.get()) {} + : TypeReference(pos, value, context.fTypes.fInvalid.get()) {} + + // Reports an error and returns false if the type is generic or, in a strict-ES2 program, if the + // type is not allowed in ES2. Otherwise, returns true. (These are the same checks performed by + // Convert.) + static bool VerifyType(const Context& context, const SkSL::Type* type, Position pos); // Creates a reference to an SkSL type; uses the ErrorReporter to report errors. static std::unique_ptr Convert(const Context& context, diff --git a/src/sksl/ir/SkSLVarDeclarations.cpp b/src/sksl/ir/SkSLVarDeclarations.cpp index f8cedd6b0525..6beaa07321a5 100644 --- a/src/sksl/ir/SkSLVarDeclarations.cpp +++ b/src/sksl/ir/SkSLVarDeclarations.cpp @@ -9,6 +9,7 @@ #include "include/core/SkSpan.h" #include "include/private/base/SkTo.h" +#include "src/base/SkEnumBitMask.h" #include "src/sksl/SkSLAnalysis.h" #include "src/sksl/SkSLBuiltinTypes.h" #include "src/sksl/SkSLCompiler.h" @@ -20,6 +21,7 @@ #include "src/sksl/SkSLString.h" #include "src/sksl/SkSLThreadContext.h" #include "src/sksl/ir/SkSLLayout.h" +#include "src/sksl/ir/SkSLModifierFlags.h" #include "src/sksl/ir/SkSLModifiers.h" #include "src/sksl/ir/SkSLSymbolTable.h" // IWYU pragma: keep #include "src/sksl/ir/SkSLType.h" @@ -120,8 +122,9 @@ std::unique_ptr VarDeclaration::clone() const { } std::string VarDeclaration::description() const { - std::string result = this->var()->modifiers().description() + this->baseType().description() + - " " + std::string(this->var()->name()); + std::string result = this->var()->layout().paddedDescription() + + this->var()->modifierFlags().paddedDescription() + + this->baseType().description() + ' ' + std::string(this->var()->name()); if (this->arraySize() > 0) { String::appendf(&result, "[%d]", this->arraySize()); } @@ -135,7 +138,8 @@ std::string VarDeclaration::description() const { void VarDeclaration::ErrorCheck(const Context& context, Position pos, Position modifiersPosition, - const Modifiers& modifiers, + const Layout& layout, + ModifierFlags modifierFlags, const Type* type, const Type* baseType, Variable::Storage storage) { @@ -147,34 +151,32 @@ void VarDeclaration::ErrorCheck(const Context& context, context.fErrors->error(pos, "variables of type '" + baseType->displayName() + "' must be global"); } - if ((modifiers.fFlags & Modifiers::kIn_Flag) && baseType->isMatrix()) { + if ((modifierFlags & ModifierFlag::kIn) && baseType->isMatrix()) { context.fErrors->error(pos, "'in' variables may not have matrix type"); } - if ((modifiers.fFlags & Modifiers::kIn_Flag) && type->isUnsizedArray()) { + if ((modifierFlags & ModifierFlag::kIn) && type->isUnsizedArray()) { context.fErrors->error(pos, "'in' variables may not have unsized array type"); } - if ((modifiers.fFlags & Modifiers::kOut_Flag) && type->isUnsizedArray()) { + if ((modifierFlags & ModifierFlag::kOut) && type->isUnsizedArray()) { context.fErrors->error(pos, "'out' variables may not have unsized array type"); } - if ((modifiers.fFlags & Modifiers::kIn_Flag) && (modifiers.fFlags & Modifiers::kUniform_Flag)) { + if ((modifierFlags & ModifierFlag::kIn) && modifierFlags.isUniform()) { context.fErrors->error(pos, "'in uniform' variables not permitted"); } - if ((modifiers.fFlags & Modifiers::kReadOnly_Flag) && - (modifiers.fFlags & Modifiers::kWriteOnly_Flag)) { + if (modifierFlags.isReadOnly() && modifierFlags.isWriteOnly()) { context.fErrors->error(pos, "'readonly' and 'writeonly' qualifiers cannot be combined"); } - if ((modifiers.fFlags & Modifiers::kUniform_Flag) && - (modifiers.fFlags & Modifiers::kBuffer_Flag)) { + if (modifierFlags.isUniform() && modifierFlags.isBuffer()) { context.fErrors->error(pos, "'uniform buffer' variables not permitted"); } - if ((modifiers.fFlags & Modifiers::kWorkgroup_Flag) && - (modifiers.fFlags & (Modifiers::kIn_Flag | Modifiers::kOut_Flag))) { + if (modifierFlags.isWorkgroup() && (modifierFlags & (ModifierFlag::kIn | + ModifierFlag::kOut))) { context.fErrors->error(pos, "in / out variables may not be declared workgroup"); } - if ((modifiers.fFlags & Modifiers::kUniform_Flag)) { + if (modifierFlags.isUniform()) { check_valid_uniform_type(pos, baseType, context); } - if (baseType->isEffectChild() && !(modifiers.fFlags & Modifiers::kUniform_Flag)) { + if (baseType->isEffectChild() && !modifierFlags.isUniform()) { context.fErrors->error(pos, "variables of type '" + baseType->displayName() + "' must be uniform"); } @@ -193,22 +195,20 @@ void VarDeclaration::ErrorCheck(const Context& context, // declared with the workgroup modifier, then it must be declared in the interface block // storage. If this is the declaration for an interface block that contains an atomic // member, then it must have the `buffer` modifier and no `readonly` modifier. - bool isWorkgroup = modifiers.fFlags & Modifiers::kWorkgroup_Flag; bool isBlockMember = (storage == Variable::Storage::kInterfaceBlock); - bool isWritableStorageBuffer = modifiers.fFlags & Modifiers::kBuffer_Flag && - !(modifiers.fFlags & Modifiers::kReadOnly_Flag); + bool isWritableStorageBuffer = modifierFlags.isBuffer() && !modifierFlags.isReadOnly(); - if (!isWorkgroup && + if (!modifierFlags.isWorkgroup() && !(baseType->isInterfaceBlock() ? isWritableStorageBuffer : isBlockMember)) { context.fErrors->error(pos, "atomics are only permitted in workgroup variables and " "writable storage blocks"); } } - if (modifiers.fLayout.fFlags & Layout::kColor_Flag) { + if (layout.fFlags & LayoutFlag::kColor) { if (!ProgramConfig::IsRuntimeEffect(context.fConfig->fKind)) { context.fErrors->error(pos, "'layout(color)' is only permitted in runtime effects"); } - if (!(modifiers.fFlags & Modifiers::kUniform_Flag)) { + if (!modifierFlags.isUniform()) { context.fErrors->error(pos, "'layout(color)' is only permitted on 'uniform' variables"); } auto validColorXformType = [](const Type& t) { @@ -221,30 +221,30 @@ void VarDeclaration::ErrorCheck(const Context& context, } } - int permitted = Modifiers::kConst_Flag | Modifiers::kHighp_Flag | Modifiers::kMediump_Flag | - Modifiers::kLowp_Flag; + ModifierFlags permitted = ModifierFlag::kConst | ModifierFlag::kHighp | ModifierFlag::kMediump | + ModifierFlag::kLowp; if (storage == Variable::Storage::kGlobal) { // Uniforms are allowed in all programs - permitted |= Modifiers::kUniform_Flag; + permitted |= ModifierFlag::kUniform; // No other modifiers are allowed in runtime effects. if (!ProgramConfig::IsRuntimeEffect(context.fConfig->fKind)) { if (baseType->isInterfaceBlock()) { // Interface blocks allow `buffer`. - permitted |= Modifiers::kBuffer_Flag; + permitted |= ModifierFlag::kBuffer; - if (modifiers.fFlags & Modifiers::kBuffer_Flag) { + if (modifierFlags.isBuffer()) { // Only storage blocks allow `readonly` and `writeonly`. // (`readonly` and `writeonly` textures are converted to separate types via // applyAccessQualifiers.) - permitted |= Modifiers::kReadOnly_Flag | Modifiers::kWriteOnly_Flag; + permitted |= ModifierFlag::kReadOnly | ModifierFlag::kWriteOnly; } // It is an error for an unsized array to appear anywhere but the last member of a // "buffer" block. const auto& fields = baseType->fields(); const int illegalRangeEnd = SkToInt(fields.size()) - - ((modifiers.fFlags & Modifiers::kBuffer_Flag) ? 1 : 0); + (modifierFlags.isBuffer() ? 1 : 0); for (int i = 0; i < illegalRangeEnd; ++i) { if (fields[i].fType->isUnsizedArray()) { context.fErrors->error( @@ -256,21 +256,21 @@ void VarDeclaration::ErrorCheck(const Context& context, if (!baseType->isOpaque()) { // Only non-opaque types allow `in` and `out`. - permitted |= Modifiers::kIn_Flag | Modifiers::kOut_Flag; + permitted |= ModifierFlag::kIn | ModifierFlag::kOut; } if (ProgramConfig::IsCompute(context.fConfig->fKind)) { // Only compute shaders allow `workgroup`. if (!baseType->isOpaque() || baseType->isAtomic()) { - permitted |= Modifiers::kWorkgroup_Flag; + permitted |= ModifierFlag::kWorkgroup; } } else { // Only vertex/fragment shaders allow `flat` and `noperspective`. - permitted |= Modifiers::kFlat_Flag | Modifiers::kNoPerspective_Flag; + permitted |= ModifierFlag::kFlat | ModifierFlag::kNoPerspective; } } } - int permittedLayoutFlags = ~0; + LayoutFlags permittedLayoutFlags = LayoutFlag::kAll; // The `texture` and `sampler` modifiers can be present respectively on a texture and sampler or // simultaneously on a combined image-sampler but they are not permitted on any other type. @@ -279,13 +279,13 @@ void VarDeclaration::ErrorCheck(const Context& context, // Both texture and sampler flags are permitted break; case Type::TypeKind::kTexture: - permittedLayoutFlags &= ~Layout::kSampler_Flag; + permittedLayoutFlags &= ~LayoutFlag::kSampler; break; case Type::TypeKind::kSeparateSampler: - permittedLayoutFlags &= ~Layout::kTexture_Flag; + permittedLayoutFlags &= ~LayoutFlag::kTexture; break; default: - permittedLayoutFlags &= ~(Layout::kTexture_Flag | Layout::kSampler_Flag); + permittedLayoutFlags &= ~(LayoutFlag::kTexture | LayoutFlag::kSampler); break; } @@ -296,27 +296,27 @@ void VarDeclaration::ErrorCheck(const Context& context, baseType->typeKind() == Type::TypeKind::kSeparateSampler || baseType->typeKind() == Type::TypeKind::kTexture || baseType->isInterfaceBlock(); - if (storage != Variable::Storage::kGlobal || - ((modifiers.fFlags & Modifiers::kUniform_Flag) && !permitBindingAndSet)) { - permittedLayoutFlags &= ~Layout::kBinding_Flag; - permittedLayoutFlags &= ~Layout::kSet_Flag; - permittedLayoutFlags &= ~Layout::kSPIRV_Flag; - permittedLayoutFlags &= ~Layout::kMetal_Flag; - permittedLayoutFlags &= ~Layout::kWGSL_Flag; - permittedLayoutFlags &= ~Layout::kGL_Flag; + if (storage != Variable::Storage::kGlobal || (modifierFlags.isUniform() && + !permitBindingAndSet)) { + permittedLayoutFlags &= ~LayoutFlag::kBinding; + permittedLayoutFlags &= ~LayoutFlag::kSet; + permittedLayoutFlags &= ~LayoutFlag::kSPIRV; + permittedLayoutFlags &= ~LayoutFlag::kMetal; + permittedLayoutFlags &= ~LayoutFlag::kWGSL; } if (ProgramConfig::IsRuntimeEffect(context.fConfig->fKind)) { // Disallow all layout flags except 'color' in runtime effects - permittedLayoutFlags &= Layout::kColor_Flag; + permittedLayoutFlags &= LayoutFlag::kColor; } // The `push_constant` flag isn't allowed on in-variables, out-variables, bindings or sets. - if ((modifiers.fLayout.fFlags & (Layout::kSet_Flag | Layout::kBinding_Flag)) || - (modifiers.fFlags & (Modifiers::kIn_Flag | Modifiers::kOut_Flag))) { - permittedLayoutFlags &= ~Layout::kPushConstant_Flag; + if ((layout.fFlags & (LayoutFlag::kSet | LayoutFlag::kBinding)) || + (modifierFlags & (ModifierFlag::kIn | ModifierFlag::kOut))) { + permittedLayoutFlags &= ~LayoutFlag::kPushConstant; } - modifiers.checkPermitted(context, modifiersPosition, permitted, permittedLayoutFlags); + modifierFlags.checkPermittedFlags(context, modifiersPosition, permitted); + layout.checkPermittedLayout(context, modifiersPosition, permittedLayoutFlags); } bool VarDeclaration::ErrorCheckAndCoerce(const Context& context, @@ -332,20 +332,20 @@ bool VarDeclaration::ErrorCheckAndCoerce(const Context& context, return false; } - ErrorCheck(context, var.fPosition, var.modifiersPosition(), var.modifiers(), &var.type(), - baseType, var.storage()); + ErrorCheck(context, var.fPosition, var.modifiersPosition(), var.layout(), var.modifierFlags(), + &var.type(), baseType, var.storage()); if (value) { if (var.type().isOpaque()) { context.fErrors->error(value->fPosition, "opaque type '" + var.type().displayName() + "' cannot use initializer expressions"); return false; } - if (var.modifiers().fFlags & Modifiers::kIn_Flag) { + if (var.modifierFlags() & ModifierFlag::kIn) { context.fErrors->error(value->fPosition, "'in' variables cannot use initializer expressions"); return false; } - if (var.modifiers().fFlags & Modifiers::kUniform_Flag) { + if (var.modifierFlags().isUniform()) { context.fErrors->error(value->fPosition, "'uniform' variables cannot use initializer expressions"); return false; @@ -365,7 +365,7 @@ bool VarDeclaration::ErrorCheckAndCoerce(const Context& context, return false; } } - if (var.modifiers().fFlags & Modifiers::kConst_Flag) { + if (var.modifierFlags().isConst()) { if (!value) { context.fErrors->error(var.fPosition, "'const' variables must be initialized"); return false; @@ -395,7 +395,6 @@ bool VarDeclaration::ErrorCheckAndCoerce(const Context& context, std::unique_ptr VarDeclaration::Convert(const Context& context, Position overallPos, - Position modifiersPos, const Modifiers& modifiers, const Type& type, Position namePos, @@ -407,8 +406,9 @@ std::unique_ptr VarDeclaration::Convert(const Context& context, std::unique_ptr var = Variable::Convert(context, overallPos, - modifiersPos, - modifiers, + modifiers.fPosition, + modifiers.fLayout, + modifiers.fFlags, &type, namePos, name, @@ -474,10 +474,9 @@ std::unique_ptr VarDeclaration::Make(const Context& context, // function parameters cannot have variable declarations SkASSERT(var->storage() != Variable::Storage::kParameter); // 'const' variables must be initialized - SkASSERT(!(var->modifiers().fFlags & Modifiers::kConst_Flag) || value); + SkASSERT(!var->modifierFlags().isConst() || value); // 'const' variable initializer must be a constant expression - SkASSERT(!(var->modifiers().fFlags & Modifiers::kConst_Flag) || - Analysis::IsConstantExpression(*value)); + SkASSERT(!var->modifierFlags().isConst() || Analysis::IsConstantExpression(*value)); // global variable initializer must be a constant expression SkASSERT(!(value && var->storage() == Variable::Storage::kGlobal && !Analysis::IsConstantExpression(*value))); @@ -488,9 +487,9 @@ std::unique_ptr VarDeclaration::Make(const Context& context, // opaque type cannot use initializer expressions SkASSERT(!(value && var->type().isOpaque())); // 'in' variables cannot use initializer expressions - SkASSERT(!(value && (var->modifiers().fFlags & Modifiers::kIn_Flag))); + SkASSERT(!(value && (var->modifierFlags() & ModifierFlag::kIn))); // 'uniform' variables cannot use initializer expressions - SkASSERT(!(value && (var->modifiers().fFlags & Modifiers::kUniform_Flag))); + SkASSERT(!(value && var->modifierFlags().isUniform())); // in strict-ES2 mode, is-or-contains-array types cannot use initializer expressions SkASSERT(!(value && var->type().isOrContainsArray() && context.fConfig->strictES2Mode())); diff --git a/src/sksl/ir/SkSLVarDeclarations.h b/src/sksl/ir/SkSLVarDeclarations.h index 9ffa908f0520..3c7615e6b9ee 100644 --- a/src/sksl/ir/SkSLVarDeclarations.h +++ b/src/sksl/ir/SkSLVarDeclarations.h @@ -11,6 +11,7 @@ #include "include/core/SkTypes.h" #include "src/sksl/ir/SkSLExpression.h" #include "src/sksl/ir/SkSLIRNode.h" +#include "src/sksl/ir/SkSLModifierFlags.h" #include "src/sksl/ir/SkSLProgramElement.h" #include "src/sksl/ir/SkSLStatement.h" #include "src/sksl/ir/SkSLVariable.h" @@ -23,11 +24,11 @@ namespace SkSL { class Context; +struct Layout; +struct Modifiers; class Position; class Type; -struct Modifiers; - /** * A single variable declaration statement. Multiple variables declared together are expanded to * separate (sequential) statements. For instance, the SkSL 'int x = 2, y[3];' produces two @@ -60,15 +61,14 @@ class VarDeclaration final : public Statement { // errors if needed. This method is implicitly called during Convert(), but is also explicitly // called while processing interface block fields. static void ErrorCheck(const Context& context, Position pos, Position modifiersPosition, - const Modifiers& modifiers, const Type* type, const Type* baseType, - Variable::Storage storage); + const Layout& layout, ModifierFlags modifierFlags, const Type* type, + const Type* baseType, Variable::Storage storage); // For use when no Variable yet exists. The newly-created variable will be added to the active // symbol table. Performs proper error checking and type coercion; reports errors via // ErrorReporter. static std::unique_ptr Convert(const Context& context, Position overallPos, - Position modifiersPos, const Modifiers& modifiers, const Type& type, Position namePos, diff --git a/src/sksl/ir/SkSLVariable.cpp b/src/sksl/ir/SkSLVariable.cpp index 0293b417cfbe..8a6bffd8a211 100644 --- a/src/sksl/ir/SkSLVariable.cpp +++ b/src/sksl/ir/SkSLVariable.cpp @@ -7,15 +7,14 @@ #include "src/sksl/ir/SkSLVariable.h" +#include "src/base/SkEnumBitMask.h" #include "src/base/SkStringView.h" #include "src/sksl/SkSLCompiler.h" #include "src/sksl/SkSLContext.h" #include "src/sksl/SkSLErrorReporter.h" #include "src/sksl/SkSLIntrinsicList.h" #include "src/sksl/SkSLMangler.h" -#include "src/sksl/SkSLModifiersPool.h" #include "src/sksl/SkSLProgramSettings.h" -#include "src/sksl/SkSLThreadContext.h" #include "src/sksl/ir/SkSLExpression.h" #include "src/sksl/ir/SkSLIRNode.h" #include "src/sksl/ir/SkSLInterfaceBlock.h" @@ -27,6 +26,8 @@ namespace SkSL { +static constexpr Layout kDefaultLayout; + Variable::~Variable() { // Unhook this Variable from its associated VarDeclaration, since we're being deleted. if (VarDeclaration* declaration = this->varDeclaration()) { @@ -80,6 +81,10 @@ void Variable::setGlobalVarDeclaration(GlobalVarDeclaration* global) { fDeclaringElement = global; } +const Layout& Variable::layout() const { + return kDefaultLayout; +} + std::string_view ExtendedVariable::mangledName() const { return fMangledName.empty() ? this->name() : fMangledName; } @@ -87,41 +92,40 @@ std::string_view ExtendedVariable::mangledName() const { std::unique_ptr Variable::Convert(const Context& context, Position pos, Position modifiersPos, - const Modifiers& modifiers, + const Layout& layout, + ModifierFlags flags, const Type* type, Position namePos, std::string_view name, - Variable::Storage storage) { - if (modifiers.fLayout.fLocation == 0 && modifiers.fLayout.fIndex == 0 && - (modifiers.fFlags & Modifiers::kOut_Flag) && - ProgramConfig::IsFragment(context.fConfig->fKind) && name != Compiler::FRAGCOLOR_NAME) { + Storage storage) { + if (layout.fLocation == 0 && + layout.fIndex == 0 && + (flags & ModifierFlag::kOut) && + ProgramConfig::IsFragment(context.fConfig->fKind) && + name != Compiler::FRAGCOLOR_NAME) { context.fErrors->error(modifiersPos, "out location=0, index=0 is reserved for sk_FragColor"); } if (type->isUnsizedArray() && storage != Variable::Storage::kInterfaceBlock) { context.fErrors->error(pos, "unsized arrays are not permitted here"); } - if (ProgramConfig::IsCompute(ThreadContext::Context().fConfig->fKind) && - modifiers.fLayout.fBuiltin == -1) { + if (ProgramConfig::IsCompute(context.fConfig->fKind) && layout.fBuiltin == -1) { if (storage == Variable::Storage::kGlobal) { - if (modifiers.fFlags & Modifiers::kIn_Flag) { + if (flags & ModifierFlag::kIn) { context.fErrors->error(pos, "pipeline inputs not permitted in compute shaders"); - } else if (modifiers.fFlags & Modifiers::kOut_Flag) { + } else if (flags & ModifierFlag::kOut) { context.fErrors->error(pos, "pipeline outputs not permitted in compute shaders"); } } } + if (storage == Variable::Storage::kParameter) { + // The `in` modifier on function parameters is implicit, so we can replace `in float x` with + // `float x`. This prevents any ambiguity when matching a function by its param types. + if ((flags & (ModifierFlag::kOut | ModifierFlag::kIn)) == ModifierFlag::kIn) { + flags &= ~(ModifierFlag::kOut | ModifierFlag::kIn); + } + } - return Make(context, pos, modifiersPos, modifiers, type, name, storage); -} - -std::unique_ptr Variable::Make(const Context& context, - Position pos, - Position modifiersPos, - const Modifiers& modifiers, - const Type* type, - std::string_view name, - Variable::Storage storage) { // Invent a mangled name for the variable, if it needs one. std::string mangledName; if (skstd::starts_with(name, '$')) { @@ -134,22 +138,41 @@ std::unique_ptr Variable::Make(const Context& context, mangledName = Mangler{}.uniqueName(name, context.fSymbolTable.get()); } - if (type->componentType().isInterfaceBlock() || !mangledName.empty()) { + return Make(pos, modifiersPos, layout, flags, type, name, std::move(mangledName), + context.fConfig->fIsBuiltinCode, storage); +} + +std::unique_ptr Variable::Make(Position pos, + Position modifiersPosition, + const Layout& layout, + ModifierFlags flags, + const Type* type, + std::string_view name, + std::string mangledName, + bool builtin, + Variable::Storage storage) { + // the `in` modifier on function parameters is implicit and should have been removed + SkASSERT(!(storage == Variable::Storage::kParameter && + (flags & (ModifierFlag::kOut | ModifierFlag::kIn)) == ModifierFlag::kIn)); + + if (type->componentType().isInterfaceBlock() || !mangledName.empty() || + layout != kDefaultLayout) { return std::make_unique(pos, - modifiersPos, - context.fModifiersPool->add(modifiers), + modifiersPosition, + layout, + flags, name, type, - context.fConfig->fIsBuiltinCode, + builtin, storage, std::move(mangledName)); } else { return std::make_unique(pos, - modifiersPos, - context.fModifiersPool->add(modifiers), + modifiersPosition, + flags, name, type, - context.fConfig->fIsBuiltinCode, + builtin, storage); } } @@ -158,7 +181,7 @@ Variable::ScratchVariable Variable::MakeScratchVariable(const Context& context, Mangler& mangler, std::string_view baseName, const Type* type, - const Modifiers& modifiers, + ModifierFlags modifierFlags, SymbolTable* symbolTable, std::unique_ptr initialValue) { // $floatLiteral or $intLiteral aren't real types that we can use for scratch variables, so @@ -170,7 +193,7 @@ Variable::ScratchVariable Variable::MakeScratchVariable(const Context& context, } // Out-parameters aren't supported. - SkASSERT(!(modifiers.fFlags & Modifiers::kOut_Flag)); + SkASSERT(!(modifierFlags & ModifierFlag::kOut)); // Provide our new variable with a unique name, and add it to our symbol table. const std::string* name = @@ -180,7 +203,7 @@ Variable::ScratchVariable Variable::MakeScratchVariable(const Context& context, ScratchVariable result; auto var = std::make_unique(initialValue ? initialValue->fPosition : Position(), /*modifiersPosition=*/Position(), - context.fModifiersPool->add(Modifiers{}), + ModifierFlag::kNone, name->c_str(), type, symbolTable->isBuiltin(), diff --git a/src/sksl/ir/SkSLVariable.h b/src/sksl/ir/SkSLVariable.h index f095f5dbc731..2aee5b7fe74c 100644 --- a/src/sksl/ir/SkSLVariable.h +++ b/src/sksl/ir/SkSLVariable.h @@ -11,7 +11,8 @@ #include "include/core/SkTypes.h" #include "src/sksl/SkSLPosition.h" #include "src/sksl/ir/SkSLIRNode.h" -#include "src/sksl/ir/SkSLModifiers.h" +#include "src/sksl/ir/SkSLLayout.h" +#include "src/sksl/ir/SkSLModifierFlags.h" #include "src/sksl/ir/SkSLStatement.h" #include "src/sksl/ir/SkSLSymbol.h" #include "src/sksl/ir/SkSLType.h" @@ -50,10 +51,10 @@ class Variable : public Symbol { inline static constexpr Kind kIRNodeKind = Kind::kVariable; - Variable(Position pos, Position modifiersPosition, const Modifiers* modifiers, + Variable(Position pos, Position modifiersPosition, ModifierFlags modifierFlags, std::string_view name, const Type* type, bool builtin, Storage storage) : INHERITED(pos, kIRNodeKind, name, type) - , fModifiers(modifiers) + , fModifierFlags(modifierFlags) , fModifiersPosition(modifiersPosition) , fStorage(storage) , fBuiltin(builtin) {} @@ -61,14 +62,15 @@ class Variable : public Symbol { ~Variable() override; static std::unique_ptr Convert(const Context& context, Position pos, - Position modifiersPos, const Modifiers& modifiers, - const Type* type, Position namePos, - std::string_view name, Variable::Storage storage); + Position modifiersPos, const Layout& layout, + ModifierFlags flags, const Type* type, + Position namePos, std::string_view name, + Storage storage); - static std::unique_ptr Make(const Context& context, Position pos, - Position modifiersPos, const Modifiers& modifiers, + static std::unique_ptr Make(Position pos, Position modifiersPosition, + const Layout& layout, ModifierFlags flags, const Type* type, std::string_view name, - Variable::Storage storage); + std::string mangledName, bool builtin, Storage storage); /** * Creates a local scratch variable and the associated VarDeclaration statement. @@ -82,16 +84,14 @@ class Variable : public Symbol { Mangler& mangler, std::string_view baseName, const Type* type, - const Modifiers& modifiers, + ModifierFlags modifierFlags, SymbolTable* symbolTable, std::unique_ptr initialValue); - const Modifiers& modifiers() const { - return *fModifiers; + ModifierFlags modifierFlags() const { + return fModifierFlags; } - void setModifiers(const Modifiers* modifiers) { - fModifiers = modifiers; - } + virtual const Layout& layout() const; Position modifiersPosition() const { return fModifiersPosition; @@ -133,15 +133,13 @@ class Variable : public Symbol { virtual std::string_view mangledName() const { return this->name(); } std::string description() const override { - return this->modifiers().description() + this->type().displayName() + " " + - std::string(this->name()); + return this->layout().paddedDescription() + this->modifierFlags().paddedDescription() + + this->type().displayName() + " " + std::string(this->name()); } private: - // When non-null, `fMangledName` is owned by the SymbolTable. IRNode* fDeclaringElement = nullptr; - // We don't store the position in the Modifiers object itself because they are pooled. - const Modifiers* fModifiers = nullptr; + ModifierFlags fModifierFlags; Position fModifiersPosition; VariableStorage fStorage; bool fBuiltin; @@ -153,16 +151,18 @@ class Variable : public Symbol { * ExtendedVariable is functionally equivalent to a regular Variable, but it also contains extra * fields that most variables don't need: * - The variable's associated InterfaceBlock + * - The variable's layout * - The variable's mangled name * - * These fields can be null/empty. + * Some of these fields can be null/empty. */ class ExtendedVariable final : public Variable { public: - ExtendedVariable(Position pos, Position modifiersPosition, const Modifiers* modifiers, - std::string_view name, const Type* type, bool builtin, Storage storage, - std::string mangledName) - : INHERITED(pos, modifiersPosition, modifiers, name, type, builtin, storage) + ExtendedVariable(Position pos, Position modifiersPosition, const Layout& layout, + ModifierFlags flags, std::string_view name, const Type* type, bool builtin, + Storage storage, std::string mangledName) + : INHERITED(pos, modifiersPosition, flags, name, type, builtin, storage) + , fLayout(layout) , fMangledName(std::move(mangledName)) {} ~ExtendedVariable() override; @@ -171,6 +171,10 @@ class ExtendedVariable final : public Variable { return fInterfaceBlockElement; } + const Layout& layout() const override { + return fLayout; + } + void setInterfaceBlock(InterfaceBlock* elem) override { SkASSERT(!fInterfaceBlockElement); fInterfaceBlockElement = elem; @@ -185,6 +189,7 @@ class ExtendedVariable final : public Variable { private: InterfaceBlock* fInterfaceBlockElement = nullptr; + Layout fLayout; std::string fMangledName; using INHERITED = Variable; diff --git a/src/sksl/sksl_graphite_frag.sksl b/src/sksl/sksl_graphite_frag.sksl index f02f738596a0..6a52fe98c94f 100644 --- a/src/sksl/sksl_graphite_frag.sksl +++ b/src/sksl/sksl_graphite_frag.sksl @@ -268,8 +268,6 @@ $pure half4 sk_image_shader(float2 coords, int tileModeX, int tileModeY, int filterMode, - int useCubic, - half4x4 cubicCoeffs, int readSwizzle, int csXformFlags, int csXformSrcKind, @@ -278,10 +276,28 @@ $pure half4 sk_image_shader(float2 coords, int csXformDstKind, half csXformDstCoeffs[7], sampler2D s) { - half4 sampleColor = (useCubic != 0) - ? $cubic_filter_image(coords, imgSize, subset, tileModeX, tileModeY, cubicCoeffs, - readSwizzle, s) - : $sample_image(coords, imgSize, subset, tileModeX, tileModeY, filterMode, readSwizzle, s); + half4 sampleColor = + $sample_image(coords, imgSize, subset, tileModeX, tileModeY, filterMode, readSwizzle, s); + return sk_color_space_transform(sampleColor, csXformFlags, csXformSrcKind, csXformSrcCoeffs, + csXformGamutTransform, csXformDstKind, csXformDstCoeffs); +} + +$pure half4 sk_cubic_image_shader(float2 coords, + float2 imgSize, + float4 subset, + int tileModeX, + int tileModeY, + half4x4 cubicCoeffs, + int readSwizzle, + int csXformFlags, + int csXformSrcKind, + half csXformSrcCoeffs[7], + half3x3 csXformGamutTransform, + int csXformDstKind, + half csXformDstCoeffs[7], + sampler2D s) { + half4 sampleColor = $cubic_filter_image(coords, imgSize, subset, tileModeX, tileModeY, + cubicCoeffs, readSwizzle, s); return sk_color_space_transform(sampleColor, csXformFlags, csXformSrcKind, csXformSrcCoeffs, csXformGamutTransform, csXformDstKind, csXformDstCoeffs); } @@ -363,7 +379,7 @@ $pure half4 sk_dither_shader(half4 colorIn, $pure float2 $tile_grad(int tileMode, float2 t) { switch (tileMode) { case $kTileModeClamp: - t.x = clamp(t.x, 0, 1); + t.x = saturate(t.x); break; case $kTileModeRepeat: @@ -393,7 +409,7 @@ $pure float2 $tile_grad(int tileMode, float2 t) { return t; } -$pure half4 $colorize_grad_4(float4 colorsParam[4], float offsetsParam[4], float2 t) { +$pure half4 $colorize_grad_4(float4 colorsParam[4], float4 offsetsParam, float2 t) { if (t.y < 0) { return half4(0); @@ -413,52 +429,52 @@ $pure half4 $colorize_grad_4(float4 colorsParam[4], float offsetsParam[4], float } } -$pure half4 $colorize_grad_8(float4 colorsParam[8], float offsetsParam[8], float2 t) { +$pure half4 $colorize_grad_8(float4 colorsParam[8], float4 offsetsParam[2], float2 t) { if (t.y < 0) { return half4(0); // Unrolled binary search through intervals // ( .. 0), (0 .. 1), (1 .. 2), (2 .. 3), (3 .. 4), (4 .. 5), (5 .. 6), (6 .. 7), (7 .. ). - } else if (t.x < offsetsParam[4]) { - if (t.x < offsetsParam[2]) { - if (t.x <= offsetsParam[0]) { + } else if (t.x < offsetsParam[1][0]) { + if (t.x < offsetsParam[0][2]) { + if (t.x <= offsetsParam[0][0]) { return half4(colorsParam[0]); - } else if (t.x < offsetsParam[1]) { + } else if (t.x < offsetsParam[0][1]) { return half4(mix(colorsParam[0], colorsParam[1], - (t.x - offsetsParam[0]) / - (offsetsParam[1] - offsetsParam[0]))); + (t.x - offsetsParam[0][0]) / + (offsetsParam[0][1] - offsetsParam[0][0]))); } else { return half4(mix(colorsParam[1], colorsParam[2], - (t.x - offsetsParam[1]) / - (offsetsParam[2] - offsetsParam[1]))); + (t.x - offsetsParam[0][1]) / + (offsetsParam[0][2] - offsetsParam[0][1]))); } } else { - if (t.x < offsetsParam[3]) { + if (t.x < offsetsParam[0][3]) { return half4(mix(colorsParam[2], colorsParam[3], - (t.x - offsetsParam[2]) / - (offsetsParam[3] - offsetsParam[2]))); + (t.x - offsetsParam[0][2]) / + (offsetsParam[0][3] - offsetsParam[0][2]))); } else { return half4(mix(colorsParam[3], colorsParam[4], - (t.x - offsetsParam[3]) / - (offsetsParam[4] - offsetsParam[3]))); + (t.x - offsetsParam[0][3]) / + (offsetsParam[1][0] - offsetsParam[0][3]))); } } } else { - if (t.x < offsetsParam[6]) { - if (t.x < offsetsParam[5]) { + if (t.x < offsetsParam[1][2]) { + if (t.x < offsetsParam[1][1]) { return half4(mix(colorsParam[4], colorsParam[5], - (t.x - offsetsParam[4]) / - (offsetsParam[5] - offsetsParam[4]))); + (t.x - offsetsParam[1][0]) / + (offsetsParam[1][1] - offsetsParam[1][0]))); } else { return half4(mix(colorsParam[5], colorsParam[6], - (t.x - offsetsParam[5]) / - (offsetsParam[6] - offsetsParam[5]))); + (t.x - offsetsParam[1][1]) / + (offsetsParam[1][2] - offsetsParam[1][1]))); } } else { - if (t.x < offsetsParam[7]) { + if (t.x < offsetsParam[1][3]) { return half4(mix(colorsParam[6], colorsParam[7], - (t.x - offsetsParam[6]) / - (offsetsParam[7] - offsetsParam[6]))); + (t.x - offsetsParam[1][2]) / + (offsetsParam[1][3] - offsetsParam[1][2]))); } else { return half4(colorsParam[7]); } @@ -610,7 +626,7 @@ $pure float2 $conical_grad_layout(float2 point0Param, // Apply mapping from [Cf, C1] to unit x, and apply the precalculations from steps 3 and 4, // all in the same transformation. - float2 Cf = point0Param * (1 - f) + point1Param * f; + float2 Cf = mix(point0Param, point1Param, f); float3x3 transform = $map_to_unit_x(Cf, point1Param); float scaleX = abs(1 - f); @@ -667,7 +683,7 @@ $pure float2 $conical_grad_layout(float2 point0Param, $pure half4 sk_linear_grad_4_shader(float2 coords, float4 colorsParam[4], - float offsetsParam[4], + float4 offsetsParam, float2 point0Param, float2 point1Param, int tileMode, @@ -681,7 +697,7 @@ $pure half4 sk_linear_grad_4_shader(float2 coords, $pure half4 sk_linear_grad_8_shader(float2 coords, float4 colorsParam[8], - float offsetsParam[8], + float4 offsetsParam[2], float2 point0Param, float2 point1Param, int tileMode, @@ -709,7 +725,7 @@ $pure half4 sk_linear_grad_tex_shader(float2 coords, $pure half4 sk_radial_grad_4_shader(float2 coords, float4 colorsParam[4], - float offsetsParam[4], + float4 offsetsParam, float2 centerParam, float radiusParam, int tileMode, @@ -723,7 +739,7 @@ $pure half4 sk_radial_grad_4_shader(float2 coords, $pure half4 sk_radial_grad_8_shader(float2 coords, float4 colorsParam[8], - float offsetsParam[8], + float4 offsetsParam[2], float2 centerParam, float radiusParam, int tileMode, @@ -751,7 +767,7 @@ $pure half4 sk_radial_grad_tex_shader(float2 coords, $pure half4 sk_sweep_grad_4_shader(float2 coords, float4 colorsParam[4], - float offsetsParam[4], + float4 offsetsParam, float2 centerParam, float biasParam, float scaleParam, @@ -766,7 +782,7 @@ $pure half4 sk_sweep_grad_4_shader(float2 coords, $pure half4 sk_sweep_grad_8_shader(float2 coords, float4 colorsParam[8], - float offsetsParam[8], + float4 offsetsParam[2], float2 centerParam, float biasParam, float scaleParam, @@ -796,7 +812,7 @@ $pure half4 sk_sweep_grad_tex_shader(float2 coords, $pure half4 sk_conical_grad_4_shader(float2 coords, float4 colorsParam[4], - float offsetsParam[4], + float4 offsetsParam, float2 point0Param, float2 point1Param, float radius0Param, @@ -812,7 +828,7 @@ $pure half4 sk_conical_grad_4_shader(float2 coords, $pure half4 sk_conical_grad_8_shader(float2 coords, float4 colorsParam[8], - float offsetsParam[8], + float4 offsetsParam[2], float2 point0Param, float2 point1Param, float radius0Param, @@ -1103,7 +1119,7 @@ $pure half4 sk_gaussian_colorfilter(half4 inColor) { // equivalent to the "normal matrix", or the inverse transpose. For perspective, J should be // W(u,v) [m00' - m20'u m01' - m21'u] derived from the first two columns of the 3x3 inverse. // [m10' - m20'v m11' - m21'v] -$pure float inverse_grad_len(float2 localGrad, float2x2 jacobian) { +$pure float $inverse_grad_len(float2 localGrad, float2x2 jacobian) { // NOTE: By chain rule, the local gradient is on the left side of the Jacobian matrix float2 devGrad = localGrad * jacobian; // NOTE: This uses the L2 norm, which is more accurate than the L1 norm used by fwidth(). @@ -1115,7 +1131,7 @@ $pure float inverse_grad_len(float2 localGrad, float2x2 jacobian) { // Returns distance from both sides of a stroked circle or ellipse. Elliptical coverage is // only accurate if strokeRadius = 0. A positive value represents the interior of the stroke. -$pure float2 elliptical_distance(float2 uv, float2 radii, float strokeRadius, float2x2 jacobian) { +$pure float2 $elliptical_distance(float2 uv, float2 radii, float strokeRadius, float2x2 jacobian) { // We do need to evaluate up to two circle equations: one with // R = cornerRadius(r)+strokeRadius(s), and another with R = r-s. // This can be consolidated into a common evaluation against a circle of radius sqrt(r^2+s^2): @@ -1128,7 +1144,7 @@ $pure float2 elliptical_distance(float2 uv, float2 radii, float strokeRadius, fl // for elliptical corners where radii holds the different X and Y corner radii. float2 invR2 = 1.0 / (radii * radii + strokeRadius*strokeRadius); float2 normUV = invR2 * uv; - float invGradLength = inverse_grad_len(normUV, jacobian); + float invGradLength = $inverse_grad_len(normUV, jacobian); // Since normUV already includes 1/r^2 in the denominator, dot with just 'uv' instead. float f = 0.5 * invGradLength * (dot(uv, normUV) - 1.0); @@ -1142,12 +1158,12 @@ $pure float2 elliptical_distance(float2 uv, float2 radii, float strokeRadius, fl // Accumulates the minimum (and negative maximum) of the outer and inner corner distances in 'dist' // for a possibly elliptical corner with 'radii' and relative pixel location specified by // 'cornerEdgeDist'. The corner's basis relative to the jacobian is defined in 'xyFlip'. -void corner_distance(inout float2 dist, - float2x2 jacobian, - float2 strokeParams, - float2 cornerEdgeDist, - float2 xyFlip, - float2 radii) { +void $corner_distance(inout float2 dist, + float2x2 jacobian, + float2 strokeParams, + float2 cornerEdgeDist, + float2 xyFlip, + float2 radii) { float2 uv = radii - cornerEdgeDist; // NOTE: For mitered corners uv > 0 only if it's stroked, and in that case the // subsequent conditions skip calculating anything. @@ -1156,7 +1172,7 @@ void corner_distance(inout float2 dist, (strokeParams.x > 0.0 && strokeParams.y < 0.0 /* round-join */)) { // A rounded corner so incorporate outer elliptical distance if we're within the // quarter circle. - float2 d = elliptical_distance(uv * xyFlip, radii, strokeParams.x, jacobian); + float2 d = $elliptical_distance(uv * xyFlip, radii, strokeParams.x, jacobian); if (radii.x - strokeParams.x <= 0.0) { d.y = 1.0; // disregard inner curve since it's collapsed into an inner miter. } else { @@ -1167,7 +1183,7 @@ void corner_distance(inout float2 dist, // Bevels are--by construction--interior mitered, so inner distance is based // purely on the edge distance calculations, but the outer distance is to a 45-degree // line and not the vertical/horizontal lines of the other edges. - float bevelDist = (strokeParams.x - uv.x - uv.y) * inverse_grad_len(xyFlip, jacobian); + float bevelDist = (strokeParams.x - uv.x - uv.y) * $inverse_grad_len(xyFlip, jacobian); dist.x = min(dist.x, bevelDist); } // Else it's a miter so both inner and outer distances are unmodified } // Else we're not affected by the corner so leave distances unmodified @@ -1177,14 +1193,96 @@ void corner_distance(inout float2 dist, // for all four corners of a [round] rectangle. 'edgeDists' should be ordered LTRB with positive // distance representing the interior of the edge. 'xRadii' and 'yRadii' should hold the per-corner // elliptical radii, ordered TL, TR, BR, BL. -void corner_distances(inout float2 d, - float2x2 J, - float2 stroke, // {radii, joinStyle}, see StrokeStyle struct definition - float4 edgeDists, - float4 xRadii, - float4 yRadii) { - corner_distance(d, J, stroke, edgeDists.xy, float2(-1.0, -1.0), float2(xRadii[0], yRadii[0])); - corner_distance(d, J, stroke, edgeDists.zy, float2( 1.0, -1.0), float2(xRadii[1], yRadii[1])); - corner_distance(d, J, stroke, edgeDists.zw, float2( 1.0, 1.0), float2(xRadii[2], yRadii[2])); - corner_distance(d, J, stroke, edgeDists.xw, float2(-1.0, 1.0), float2(xRadii[3], yRadii[3])); +void $corner_distances(inout float2 d, + float2x2 J, + float2 stroke, // {radii, joinStyle}, see StrokeStyle struct definition + float4 edgeDists, + float4 xRadii, + float4 yRadii) { + $corner_distance(d, J, stroke, edgeDists.xy, float2(-1.0, -1.0), float2(xRadii[0], yRadii[0])); + $corner_distance(d, J, stroke, edgeDists.zy, float2( 1.0, -1.0), float2(xRadii[1], yRadii[1])); + $corner_distance(d, J, stroke, edgeDists.zw, float2( 1.0, 1.0), float2(xRadii[2], yRadii[2])); + $corner_distance(d, J, stroke, edgeDists.xw, float2(-1.0, 1.0), float2(xRadii[3], yRadii[3])); +} + +$pure half4 analytic_rrect_coverage_fn(float4 coords, + float4 jacobian, + float4 edgeDistances, + float4 xRadii, + float4 yRadii, + float2 strokeParams, + float2 perPixelControl) { + if (perPixelControl.x > 0.0) { + // A trivially solid interior pixel, either from a filled rect or round rect, or a + // stroke with sufficiently large width that the interior completely overlaps itself. + return half4(1.0); + } else if (perPixelControl.y > 1.0) { + // This represents a filled rectangle or quadrilateral, where the distances have already + // been converted to device space. Mitered strokes cannot use this optimization because + // their scale and bias is not uniform over the shape; Rounded shapes cannot use this + // because they rely on the edge distances being in local space to reconstruct the + // per-corner positions for the elliptical implicit functions. + float2 outerDist = min(edgeDistances.xy, edgeDistances.zw); + float c = min(outerDist.x, outerDist.y) * coords.w; + float scale = (perPixelControl.y - 1.0) * coords.w; + float bias = coverage_bias(scale); + return half4(saturate(scale * (c + bias))); + } else { + // Compute per-pixel coverage, mixing four outer edge distances, possibly four inner + // edge distances, and per-corner elliptical distances into a final coverage value. + // The Jacobian needs to be multiplied by W, but coords.w stores 1/w. + float2x2 J = float2x2(jacobian) / coords.w; + + float2 invGradLen = float2($inverse_grad_len(float2(1.0, 0.0), J), + $inverse_grad_len(float2(0.0, 1.0), J)); + float2 outerDist = invGradLen * (strokeParams.x + min(edgeDistances.xy, + edgeDistances.zw)); + + // d.x tracks minimum outer distance (pre scale-and-biasing to a coverage value). + // d.y tracks negative maximum inner distance (so min() over c accumulates min and outer + // and max inner simultaneously).) + float2 d = float2(min(outerDist.x, outerDist.y), -1.0); + float scale, bias; + + // Check for bidirectional coverage, which is is marked as a -1 from the vertex shader. + // We don't just check for < 0 since extrapolated fill triangle samples can have small + // negative values. + if (perPixelControl.x > -0.95) { + // A solid interior, so update scale and bias based on full width and height + float2 dim = invGradLen * (edgeDistances.xy + edgeDistances.zw + 2*strokeParams.xx); + scale = min(min(dim.x, dim.y), 1.0); + bias = coverage_bias(scale); + // Since we leave d.y = -1.0, no inner curve coverage will adjust it closer to 0, + // so 'finalCoverage' is based solely on outer edges and curves. + } else { + // Bidirectional coverage, so we modify c.y to hold the negative of the maximum + // interior coverage, and update scale and bias based on stroke width. + float2 strokeWidth = 2.0 * strokeParams.x * invGradLen; + float2 innerDist = strokeWidth - outerDist; + + d.y = -max(innerDist.x, innerDist.y); + if (strokeParams.x > 0.0) { + float strokeDim = min(strokeWidth.x, strokeWidth.y); + if (innerDist.y >= -0.5 && strokeWidth.y > strokeDim) { + strokeDim = strokeWidth.y; + } + if (innerDist.x >= -0.5 && strokeWidth.x > strokeDim) { + strokeDim = strokeWidth.x; + } + scale = min(strokeDim, 1.0); + bias = coverage_bias(scale); + } else { + // A hairline, so scale and bias should both be 1 + scale = bias = 1.0; + } + } + + // Check all corners, although most pixels should only be influenced by 1. + $corner_distances(d, J, strokeParams, edgeDistances, xRadii, yRadii); + + float outsetDist = min(perPixelControl.y, 0.0) * coords.w; + float finalCoverage = scale * (min(d.x + outsetDist, -d.y) + bias); + + return half4(saturate(finalCoverage)); + } } diff --git a/src/sksl/sksl_graphite_vert.sksl b/src/sksl/sksl_graphite_vert.sksl index 4f20c0bca50d..b901125c5235 100644 --- a/src/sksl/sksl_graphite_vert.sksl +++ b/src/sksl/sksl_graphite_vert.sksl @@ -533,3 +533,385 @@ $pure float4 tessellate_stroked_curve(float edgeID, float maxEdges, return float4(affineMatrix * strokeCoord + translate, strokeCoord); } } + +float4 analytic_rrect_vertex_fn(// Vertex Attributes + float2 position, + float2 normal, + float normalScale, + float centerWeight, + // Instance Attributes + float4 xRadiiOrFlags, + float4 radiiOrQuadXs, + float4 ltrbOrQuadYs, + float4 center, + float depth, + float3x3 localToDevice, + // Varyings + out float4 jacobian, + out float4 edgeDistances, + out float4 xRadii, + out float4 yRadii, + out float2 strokeParams, + out float2 perPixelControl, + // Render Step + out float2 stepLocalCoords) { + const int kCornerVertexCount = 9; // KEEP IN SYNC WITH C++'s + // AnalyticRRectRenderStep::kCornerVertexCount + const float kMiterScale = 1.0; + const float kBevelScale = 0.0; + const float kRoundScale = 0.41421356237; // sqrt(2)-1 + + const float kEpsilon = 0.00024; // SK_ScalarNearlyZero + + // Default to miter'ed vertex positioning. Corners with sufficiently large corner radii, or + // bevel'ed strokes will adjust vertex placement on a per corner basis. This will not affect + // the final coverage calculations in the fragment shader. + float joinScale = kMiterScale; + + // Unpack instance-level state that determines the vertex placement and style of shape. + bool bidirectionalCoverage = center.z <= 0.0; + bool deviceSpaceDistances = false; + float4 xs, ys; // ordered TL, TR, BR, BL + float4 edgeAA = float4(1.0); // ordered L,T,R,B. 1 = AA, 0 = no AA + bool strokedLine = false; + if (xRadiiOrFlags.x < -1.0) { + // Stroked [round] rect or line + // If y > 0, unpack the line end points, otherwise unpack the rect edges + strokedLine = xRadiiOrFlags.y > 0.0; + xs = strokedLine ? ltrbOrQuadYs.LLRR : ltrbOrQuadYs.LRRL; + ys = ltrbOrQuadYs.TTBB; + + if (xRadiiOrFlags.y < 0.0) { + // A hairline [r]rect so the X radii are encoded as negative values in this field, + // and Y radii are stored directly in the subsequent float4. + xRadii = -xRadiiOrFlags - 2.0; + yRadii = radiiOrQuadXs; + + // All hairlines use miter joins (join style > 0) + strokeParams = float2(0.0, 1.0); + } else { + xRadii = radiiOrQuadXs; + yRadii = xRadii; // regular strokes are circular + strokeParams = xRadiiOrFlags.zw; + + if (strokeParams.y < 0.0) { + joinScale = kRoundScale; // the stroke radius rounds rectangular corners + } else if (strokeParams.y == 0.0) { + joinScale = kBevelScale; + } // else stay mitered + } + } else if (any(greaterThan(xRadiiOrFlags, float4(0.0)))) { + // Filled round rect + xs = ltrbOrQuadYs.LRRL; + ys = ltrbOrQuadYs.TTBB; + + xRadii = xRadiiOrFlags; + yRadii = radiiOrQuadXs; + + strokeParams = float2(0.0, -1.0); // A negative join style is "round" + } else { + // Per-edge quadrilateral, so we have to calculate the corner's basis from the + // quad's edges. + xs = radiiOrQuadXs; + ys = ltrbOrQuadYs; + edgeAA = -xRadiiOrFlags; // AA flags needed to be < 0 on upload, so flip the sign. + + xRadii = float4(0.0); + yRadii = float4(0.0); + + strokeParams = float2(0.0, 1.0); // Will be ignored, but set to a "miter" + deviceSpaceDistances = true; + } + + // Adjust state on a per-corner basis + int cornerID = sk_VertexID / kCornerVertexCount; + float2 cornerRadii = float2(xRadii[cornerID], yRadii[cornerID]); + if (cornerID % 2 != 0) { + // Corner radii are uploaded in the local coordinate frame, but vertex placement happens + // in a consistent winding before transforming to final local coords, so swap the + // radii for odd corners. + cornerRadii = cornerRadii.yx; + } + + float2 cornerAspectRatio = float2(1.0); + if (cornerRadii.x > 0 && cornerRadii.y > 0) { + // Position vertices for an elliptical corner; overriding any previous join style since + // that only applies when radii are 0. + joinScale = kRoundScale; + cornerAspectRatio = cornerRadii.yx; + } + + // Calculate the local edge vectors, ordered L, T, R, B starting from the bottom left point. + // For quadrilaterals these are not necessarily axis-aligned, but in all cases they orient + // the +X/+Y normalized vertex template for each corner. + float4 dx = xs - xs.wxyz; + float4 dy = ys - ys.wxyz; + float4 edgeSquaredLen = dx*dx + dy*dy; + + float4 edgeMask = sign(edgeSquaredLen); // 0 for zero-length edge, 1 for non-zero edge. + float4 edgeBias = float4(0.0); // adjustment to edge distance for butt cap correction + float2 strokeRadius = float2(strokeParams.x); + if (any(equal(edgeMask, float4(0.0)))) { + // Must clean up (dx,dy) depending on the empty edge configuration + if (all(equal(edgeMask, float4(0.0)))) { + // A point so use the canonical basis + dx = float4( 0.0, 1.0, 0.0, -1.0); + dy = float4(-1.0, 0.0, 1.0, 0.0); + edgeSquaredLen = float4(1.0); + } else { + // Triangles (3 non-zero edges) copy the adjacent edge. Otherwise it's a line so + // replace empty edges with the left-hand normal vector of the adjacent edge. + bool triangle = (edgeMask[0] + edgeMask[1] + edgeMask[2] + edgeMask[3]) > 2.5; + float4 edgeX = triangle ? dx.yzwx : dy.yzwx; + float4 edgeY = triangle ? dy.yzwx : -dx.yzwx; + + dx = mix(edgeX, dx, edgeMask); + dy = mix(edgeY, dy, edgeMask); + edgeSquaredLen = mix(edgeSquaredLen.yzwx, edgeSquaredLen, edgeMask); + edgeAA = mix(edgeAA.yzwx, edgeAA, edgeMask); + + if (!triangle && joinScale == kBevelScale) { + // Don't outset by stroke radius for butt caps on the zero-length edge, but + // adjust edgeBias and strokeParams to calculate an AA miter'ed shape with the + // non-uniform stroke outset. + strokeRadius *= float2(edgeMask[cornerID], edgeMask.yzwx[cornerID]); + edgeBias = (edgeMask - 1.0) * strokeParams.x; + strokeParams.y = 1.0; + joinScale = kMiterScale; + } + } + } + + float4 inverseEdgeLen = inversesqrt(edgeSquaredLen); + dx *= inverseEdgeLen; + dy *= inverseEdgeLen; + + // Calculate local coordinate for the vertex (relative to xAxis and yAxis at first). + float2 xAxis = -float2(dx.yzwx[cornerID], dy.yzwx[cornerID]); + float2 yAxis = float2(dx.xyzw[cornerID], dy.xyzw[cornerID]); + float2 localPos; + bool snapToCenter = false; + if (normalScale < 0.0) { + // Vertex is inset from the base shape, so we scale by (cornerRadii - strokeRadius) + // and have to check for the possibility of an inner miter. It is always inset by an + // additional conservative AA amount. + if (center.w < 0.0 || centerWeight * center.z != 0.0) { + snapToCenter = true; + } else { + float localAARadius = center.w; + float2 insetRadii = + cornerRadii + (bidirectionalCoverage ? -strokeRadius : strokeRadius); + if (joinScale == kMiterScale || + insetRadii.x <= localAARadius || insetRadii.y <= localAARadius) { + // Miter the inset position + localPos = (insetRadii - localAARadius); + } else { + localPos = insetRadii*position - localAARadius*normal; + } + } + } else { + // Vertex is outset from the base shape (and possibly with an additional AA outset later + // in device space). + localPos = (cornerRadii + strokeRadius) * (position + joinScale*position.yx); + } + + if (snapToCenter) { + // Center is already relative to true local coords, not the corner basis. + localPos = center.xy; + } else { + // Transform from corner basis to true local coords. + localPos -= cornerRadii; + localPos = float2(xs[cornerID], ys[cornerID]) + xAxis*localPos.x + yAxis*localPos.y; + } + + // Calculate edge distances and device space coordinate for the vertex + // TODO: Apply edge AA flags to these values to turn off AA when necessary. + edgeDistances = dy*(xs - localPos.x) - dx*(ys - localPos.y) + edgeBias; + + // NOTE: This 3x3 inverse is different than just taking the 1st two columns of the 4x4 + // inverse of the original SkM44 local-to-device matrix. We could calculate the 3x3 inverse + // and upload it, but it does not seem to be a bottleneck and saves on bandwidth to + // calculate it here instead. + float3x3 deviceToLocal = inverse(localToDevice); + float3 devPos = localToDevice * localPos.xy1; + jacobian = float4(deviceToLocal[0].xy - deviceToLocal[0].z*localPos, + deviceToLocal[1].xy - deviceToLocal[1].z*localPos); + + if (deviceSpaceDistances) { + // Apply the Jacobian in the vertex shader so any quadrilateral normals do not have to + // be passed to the fragment shader. However, it's important to use the Jacobian at a + // vertex on the edge, not the current vertex's Jacobian. + float4 gx = -dy*(deviceToLocal[0].x - deviceToLocal[0].z*xs) + + dx*(deviceToLocal[0].y - deviceToLocal[0].z*ys); + float4 gy = -dy*(deviceToLocal[1].x - deviceToLocal[1].z*xs) + + dx*(deviceToLocal[1].y - deviceToLocal[1].z*ys); + // NOTE: The gradient is missing a W term so edgeDistances must still be multiplied by + // 1/w in the fragment shader. The same goes for the encoded coverage scale. + edgeDistances *= inversesqrt(gx*gx + gy*gy); + + // Bias non-AA edge distances by device W so its coverage contribution is >= 1.0 + edgeDistances += (1 - edgeAA)*abs(devPos.z); + + // Mixed edge AA shapes do not use subpixel scale+bias for coverage, since they tile + // to a large shape of unknown--but likely not subpixel--size. Triangles and quads do + // not use subpixel coverage since the scale+bias is not constant over the shape, but + // we can't evaluate per-fragment since we aren't passing down their arbitrary normals. + bool subpixelCoverage = edgeAA == float4(1.0) && + dot(abs(dx*dx.yzwx + dy*dy.yzwx), float4(1.0)) < kEpsilon; + if (subpixelCoverage) { + // Reconstructs the actual device-space width and height for all rectangle vertices. + float2 dim = edgeDistances.xy + edgeDistances.zw; + perPixelControl.y = 1.0 + min(min(dim.x, dim.y), abs(devPos.z)); + } else { + perPixelControl.y = 1.0 + abs(devPos.z); // standard 1px width pre W division. + } + } + + // Only outset for a vertex that is in front of the w=0 plane to avoid dealing with outset + // triangles rasterizing differently from the main triangles as w crosses 0. + if (normalScale > 0.0 && devPos.z > 0.0) { + // Note that when there's no perspective, the jacobian is equivalent to the normal + // matrix (inverse transpose), but produces correct results when there's perspective + // because it accounts for the position's influence on a line's projected direction. + float2x2 J = float2x2(jacobian); + + float2 edgeAANormal = float2(edgeAA[cornerID], edgeAA.yzwx[cornerID]) * normal; + float2 nx = cornerAspectRatio.x * edgeAANormal.x * perp(-yAxis) * J; + float2 ny = cornerAspectRatio.y * edgeAANormal.y * perp( xAxis) * J; + + bool isMidVertex = edgeAANormal.x != 0.0 && edgeAANormal.y != 0.0; + if (joinScale == kMiterScale && isMidVertex) { + // Produce a bisecting vector in device space. + nx = normalize(nx); + ny = normalize(ny); + if (dot(nx, ny) < -0.8) { + // Normals are in nearly opposite directions, so adjust to avoid float error. + float s = sign(cross_length_2d(nx, ny)); + nx = s*perp(nx); + ny = -s*perp(ny); + } + } + // Adding the normal components together directly results in what we'd have + // calculated if we'd just transformed 'normal' in one go, assuming they weren't + // normalized in the if-block above. If they were normalized, the sum equals the + // bisector between the original nx and ny. + // + // We multiply by W so that after perspective division the new point is offset by the + // now-unit normal. + // NOTE: (nx + ny) can become the zero vector if the device outset is for an edge + // marked as non-AA. In this case normalize() could produce the zero vector or NaN. + // Until a counter-example is found, GPUs seem to discard triangles with NaN vertices, + // which has the same effect as outsetting by the zero vector with this mesh, so we + // don't bother guarding the normalize() (yet). + devPos.xy += devPos.z * normalize(nx + ny); + + // By construction these points are 1px away from the outer edge in device space. + if (deviceSpaceDistances) { + // Apply directly to edgeDistances to save work per pixel later on. + edgeDistances -= devPos.z; + } else { + // Otherwise store separately so edgeDistances can be used to reconstruct corner pos + perPixelControl.y = -devPos.z; + } + } else if (!deviceSpaceDistances) { + // Triangles are within the original shape so there's no additional outsetting to + // take into account for coverage calculations. + perPixelControl.y = 0.0; + } + + if (centerWeight != 0.0) { + // A positive value signals that a pixel is trivially full coverage. + perPixelControl.x = 1.0; + } else { + // A negative value signals bidirectional coverage, and a zero value signals a solid + // interior with per-pixel coverage. + perPixelControl.x = bidirectionalCoverage ? -1.0 : 0.0; + } + + // The fragment shader operates in a canonical basis (x-axis = (1,0), y-axis = (0,1)). For + // stroked lines, incorporate their local orientation into the Jacobian to preserve this. + if (strokedLine) { + // The updated Jacobian is J' = B^-1 * J, where B is float2x2(xAxis, yAxis) for the + // top-left corner (so that B^-1 is constant over the whole shape). Since it's a line + // the basis was constructed to be orthonormal, det(B) = 1 and B^-1 is trivial. + // NOTE: float2x2 is column-major. + jacobian = float4(float2x2(dy[0], -dy[1], -dx[0], dx[1]) * float2x2(jacobian)); + } + + // Write out final results + stepLocalCoords = localPos; + return float4(devPos.xy, devPos.z*depth, devPos.z); +} + +float4 atlas_shape_vertex_fn(float2 quadCoords, + // Uniforms + float2 atlasSizeInv, + // Instance Attributes + float4 drawBounds, + float2 deviceOrigin, + float2 uvPos, + float2 maskDims, + float depth, + float3x3 deviceToLocal, + // Varyings + out float4 maskBounds, + out float2 textureCoords, + // Render Step + out float2 stepLocalCoords) { + // An atlas shape is an axis-aligned rectangle tessellated as a triangle strip. + // + // The bounds coordinates that we use here have already been transformed to device space and + // match the desired vertex coordinates of the draw (taking clipping into account), so a + // localToDevice transform is always the identity matrix. + // + // AtlasShape is always defined based on a regular Shape geometry and we can derive the local + // coordinates from the bounds by simply applying the inverse of the shape's localToDevice + // transform. + + // Vertex coordinates. + float2 drawCoords = drawBounds.xy + quadCoords * max(drawBounds.zw - drawBounds.xy, maskDims); + + // Local coordinates used for shading. + float3 localCoords = deviceToLocal * drawCoords.xy1; + stepLocalCoords = localCoords.xy / localCoords.z; + + // Adjust the `maskBounds` to span the full atlas entry with a 2-pixel outset (-1 since the + // clamp we apply in the fragment shader is inclusive). `textureCoords` get set with a 1 pixel + // inset and its dimensions should exactly match the draw coords. + // + // For an inverse fill, `textureCoords` will get clamped to `maskBounds` and the edge pixels + // will always land on a 0-coverage border pixel. + if (all(greaterThan(maskDims, float2(0)))) { + maskBounds = float4(uvPos, uvPos + maskDims + float2(1)) * atlasSizeInv.xyxy; + textureCoords = (uvPos + float2(1) + drawCoords - deviceOrigin) * atlasSizeInv; + } else { + // The mask is clipped out so send the texture coordinates to 0. This pixel should + // always be empty. + maskBounds = float4(0); + textureCoords = float2(0); + } + + return float4(drawCoords, depth, 1); +} + +float4 cover_bounds_vertex_fn(float2 corner, + float4 bounds, + float depth, + float3x3 matrix, + out float2 stepLocalCoords) { + if (all(lessThanEqual(bounds.LT, bounds.RB))) { + // A regular fill + corner = mix(bounds.LT, bounds.RB, corner); + float3 devCorner = matrix * corner.xy1; + stepLocalCoords = corner; + return float4(devCorner.xy, depth, devCorner.z); + } else { + // An inverse fill + corner = mix(bounds.RB, bounds.LT, corner); + // TODO: Support float3 local coordinates if the matrix has perspective so that W is + // interpolated correctly to the fragment shader. + float3 localCoords = matrix * corner.xy1; + stepLocalCoords = localCoords.xy / localCoords.z; + return float4(corner, depth, 1.0); + } +} diff --git a/src/sksl/sksl_shared.sksl b/src/sksl/sksl_shared.sksl index 3720e4c87235..db63497d9519 100644 --- a/src/sksl/sksl_shared.sksl +++ b/src/sksl/sksl_shared.sksl @@ -131,8 +131,8 @@ $pure $es3 $genBType isnan($genType x); $pure $es3 $genBType isnan($genHType x); $pure $es3 $genBType isinf($genType x); $pure $es3 $genBType isinf($genHType x); -$pure $es3 $genType modf($genType x, out $genType i); -$pure $es3 $genHType modf($genHType x, out $genHType i); + $es3 $genType modf($genType x, out $genType i); + $es3 $genHType modf($genHType x, out $genHType i); // 8.4 : Floating-Point Pack and Unpack Functions (GLSL ES 3.0) $pure $es3 uint packUnorm2x16(float2 v); diff --git a/src/sksl/tracing/SkSLDebugTracePriv.h b/src/sksl/tracing/SkSLDebugTracePriv.h index f17c21a39e61..5f62807d8863 100644 --- a/src/sksl/tracing/SkSLDebugTracePriv.h +++ b/src/sksl/tracing/SkSLDebugTracePriv.h @@ -91,7 +91,7 @@ class DebugTracePriv : public DebugTrace { /** The device-coordinate pixel to trace (controlled by setTraceCoord) */ SkIPoint fTraceCoord = {}; - /** SkRP stores uniform slot info in fUniformInfo. (In SkVM, they're mixed into fSlotInfo.) */ + /** SkRP stores uniform slot info in fUniformInfo. (In SkVM, they were mixed into fSlotInfo.) */ std::vector fUniformInfo; /** A 1:1 mapping of slot numbers to debug information. */ diff --git a/src/sksl/transform/SkSLAddConstToVarModifiers.cpp b/src/sksl/transform/SkSLAddConstToVarModifiers.cpp index 2d0f32154f32..97b8cc46130c 100644 --- a/src/sksl/transform/SkSLAddConstToVarModifiers.cpp +++ b/src/sksl/transform/SkSLAddConstToVarModifiers.cpp @@ -5,11 +5,10 @@ * found in the LICENSE file. */ +#include "src/base/SkEnumBitMask.h" #include "src/sksl/SkSLAnalysis.h" -#include "src/sksl/SkSLContext.h" -#include "src/sksl/SkSLModifiersPool.h" #include "src/sksl/analysis/SkSLProgramUsage.h" -#include "src/sksl/ir/SkSLModifiers.h" +#include "src/sksl/ir/SkSLModifierFlags.h" #include "src/sksl/ir/SkSLVariable.h" #include "src/sksl/transform/SkSLTransform.h" @@ -17,28 +16,25 @@ namespace SkSL { class Expression; -const Modifiers* Transform::AddConstToVarModifiers(const Context& context, - const Variable& var, - const Expression* initialValue, - const ProgramUsage* usage) { +ModifierFlags Transform::AddConstToVarModifiers(const Variable& var, + const Expression* initialValue, + const ProgramUsage* usage) { // If the variable is already marked as `const`, keep our existing modifiers. - const Modifiers* modifiers = &var.modifiers(); - if (modifiers->fFlags & Modifiers::kConst_Flag) { - return modifiers; + ModifierFlags flags = var.modifierFlags(); + if (flags.isConst()) { + return flags; } // If the variable doesn't have a compile-time-constant initial value, we can't `const` it. if (!initialValue || !Analysis::IsCompileTimeConstant(*initialValue)) { - return modifiers; + return flags; } // This only works for variables that are written-to a single time. ProgramUsage::VariableCounts counts = usage->get(var); if (counts.fWrite != 1) { - return modifiers; + return flags; } - // Add `const` to our variable's modifiers, making it eligible for constant-folding. - Modifiers constModifiers = *modifiers; - constModifiers.fFlags |= Modifiers::kConst_Flag; - return context.fModifiersPool->add(constModifiers); + // Add `const` to our variable's modifier flags, making it eligible for constant-folding. + return flags | ModifierFlag::kConst; } } // namespace SkSL diff --git a/src/sksl/transform/SkSLFindAndDeclareBuiltinVariables.cpp b/src/sksl/transform/SkSLFindAndDeclareBuiltinVariables.cpp index 66355a15a8d0..25aedb75fc8f 100644 --- a/src/sksl/transform/SkSLFindAndDeclareBuiltinVariables.cpp +++ b/src/sksl/transform/SkSLFindAndDeclareBuiltinVariables.cpp @@ -19,7 +19,6 @@ #include "src/sksl/ir/SkSLIRNode.h" #include "src/sksl/ir/SkSLInterfaceBlock.h" #include "src/sksl/ir/SkSLLayout.h" -#include "src/sksl/ir/SkSLModifiers.h" #include "src/sksl/ir/SkSLProgram.h" #include "src/sksl/ir/SkSLProgramElement.h" #include "src/sksl/ir/SkSLSymbol.h" @@ -105,11 +104,12 @@ class BuiltinVariableScanner { } switch (a->kind()) { case ProgramElement::Kind::kGlobalVar: - SkASSERT(GlobalVarBuiltinName(*a) != GlobalVarBuiltinName(*b)); + SkASSERT(a == b || + GlobalVarBuiltinName(*a) != GlobalVarBuiltinName(*b)); return GlobalVarBuiltinName(*a) < GlobalVarBuiltinName(*b); case ProgramElement::Kind::kInterfaceBlock: - SkASSERT(InterfaceBlockName(*a) != InterfaceBlockName(*b)); + SkASSERT(a == b || InterfaceBlockName(*a) != InterfaceBlockName(*b)); return InterfaceBlockName(*a) < InterfaceBlockName(*b); default: @@ -146,7 +146,7 @@ void FindAndDeclareBuiltinVariables(Program& program) { if (var->isBuiltin()) { scanner.addDeclaringElement(var); - switch (var->modifiers().fLayout.fBuiltin) { + switch (var->layout().fBuiltin) { // Set the FlipRT program input if we find sk_FragCoord or sk_Clockwise. case SK_FRAGCOORD_BUILTIN: if (context.fCaps->fCanUseFragCoord) { diff --git a/src/sksl/transform/SkSLHoistSwitchVarDeclarationsAtTopLevel.cpp b/src/sksl/transform/SkSLHoistSwitchVarDeclarationsAtTopLevel.cpp index b1e1f8d8f165..a1b0448577ed 100644 --- a/src/sksl/transform/SkSLHoistSwitchVarDeclarationsAtTopLevel.cpp +++ b/src/sksl/transform/SkSLHoistSwitchVarDeclarationsAtTopLevel.cpp @@ -14,7 +14,7 @@ #include "src/sksl/ir/SkSLExpression.h" #include "src/sksl/ir/SkSLIRHelpers.h" #include "src/sksl/ir/SkSLIRNode.h" -#include "src/sksl/ir/SkSLModifiers.h" +#include "src/sksl/ir/SkSLModifierFlags.h" #include "src/sksl/ir/SkSLNop.h" #include "src/sksl/ir/SkSLStatement.h" #include "src/sksl/ir/SkSLSwitchStatement.h" @@ -84,7 +84,7 @@ std::unique_ptr Transform::HoistSwitchVarDeclarationsAtTopLevel( // If no declarations were found, return the switch as-is. if (visitor.fVarDeclarations.empty()) { - return std::move(stmt); + return stmt; } // Move all of the var-declaration statements into a separate block. @@ -93,7 +93,7 @@ std::unique_ptr Transform::HoistSwitchVarDeclarationsAtTopLevel( for (std::unique_ptr* innerDeclaration : visitor.fVarDeclarations) { VarDeclaration& decl = (*innerDeclaration)->as(); std::unique_ptr replacementStmt; - bool isConst = decl.var()->modifiers().fFlags & Modifiers::kConst_Flag; + bool isConst = decl.var()->modifierFlags().isConst(); if (decl.value() && !isConst) { // The inner variable-declaration has an initial-value; we must replace the declaration // with an assignment to the variable. This also has the helpful effect of stripping off diff --git a/src/sksl/transform/SkSLRenamePrivateSymbols.cpp b/src/sksl/transform/SkSLRenamePrivateSymbols.cpp index 31193cdc85c6..d8f9d6eb4b27 100644 --- a/src/sksl/transform/SkSLRenamePrivateSymbols.cpp +++ b/src/sksl/transform/SkSLRenamePrivateSymbols.cpp @@ -7,17 +7,16 @@ #include "include/core/SkSpan.h" #include "include/core/SkTypes.h" +#include "src/base/SkEnumBitMask.h" #include "src/base/SkStringView.h" #include "src/sksl/SkSLAnalysis.h" #include "src/sksl/SkSLCompiler.h" -#include "src/sksl/SkSLContext.h" -#include "src/sksl/SkSLModifiersPool.h" #include "src/sksl/SkSLProgramSettings.h" #include "src/sksl/ir/SkSLFunctionDeclaration.h" #include "src/sksl/ir/SkSLFunctionDefinition.h" #include "src/sksl/ir/SkSLFunctionPrototype.h" #include "src/sksl/ir/SkSLIRNode.h" -#include "src/sksl/ir/SkSLModifiers.h" +#include "src/sksl/ir/SkSLModifierFlags.h" #include "src/sksl/ir/SkSLProgramElement.h" #include "src/sksl/ir/SkSLStatement.h" #include "src/sksl/ir/SkSLSymbol.h" @@ -36,6 +35,7 @@ namespace SkSL { +class Context; class ProgramUsage; enum class ProgramKind : int8_t; @@ -47,9 +47,9 @@ static void strip_export_flag(Context& context, while (mutableSym) { FunctionDeclaration* mutableDecl = &mutableSym->as(); - Modifiers modifiers = mutableDecl->modifiers(); - modifiers.fFlags &= ~Modifiers::kExport_Flag; - mutableDecl->setModifiers(context.fModifiersPool->add(modifiers)); + ModifierFlags flags = mutableDecl->modifierFlags(); + flags &= ~ModifierFlag::kExport; + mutableDecl->setModifierFlags(flags); mutableSym = mutableDecl->mutableNextOverload(); } @@ -155,7 +155,7 @@ void Transform::RenamePrivateSymbols(Context& context, } else { // We will only minify $private_functions, and only ones not marked as $export. return skstd::starts_with(funcDecl.name(), '$') && - !(funcDecl.modifiers().fFlags & Modifiers::kExport_Flag); + !funcDecl.modifierFlags().isExport(); } } @@ -234,7 +234,7 @@ void Transform::RenamePrivateSymbols(Context& context, for (std::unique_ptr& pe : module.fElements) { if (pe->is()) { const FunctionDeclaration* funcDecl = &pe->as().declaration(); - if (funcDecl->modifiers().fFlags & Modifiers::kExport_Flag) { + if (funcDecl->modifierFlags().isExport()) { strip_export_flag(context, funcDecl, module.fSymbols.get()); } } diff --git a/src/sksl/transform/SkSLReplaceConstVarsWithLiterals.cpp b/src/sksl/transform/SkSLReplaceConstVarsWithLiterals.cpp index 67fa56f98c4f..a6f9d95a5a72 100644 --- a/src/sksl/transform/SkSLReplaceConstVarsWithLiterals.cpp +++ b/src/sksl/transform/SkSLReplaceConstVarsWithLiterals.cpp @@ -12,7 +12,7 @@ #include "src/sksl/analysis/SkSLProgramUsage.h" #include "src/sksl/ir/SkSLExpression.h" #include "src/sksl/ir/SkSLFunctionDefinition.h" -#include "src/sksl/ir/SkSLModifiers.h" +#include "src/sksl/ir/SkSLModifierFlags.h" #include "src/sksl/ir/SkSLProgramElement.h" #include "src/sksl/ir/SkSLVariable.h" #include "src/sksl/ir/SkSLVariableReference.h" @@ -43,8 +43,7 @@ void Transform::ReplaceConstVarsWithLiterals(Module& module, ProgramUsage* usage // ... and it's a candidate for size reduction... if (fCandidates.contains(var.variable())) { // ... get its constant value... - if (const Expression* value = - ConstantFolder::GetConstantValueOrNullForVariable(var)) { + if (const Expression* value = ConstantFolder::GetConstantValueOrNull(var)) { // ... and replace it with that value. fUsage->remove(expr.get()); expr = value->clone(); @@ -69,7 +68,7 @@ void Transform::ReplaceConstVarsWithLiterals(Module& module, ProgramUsage* usage if (!count.fVarExists || count.fWrite != 1) { continue; } - if (!(var->modifiers().fFlags & Modifiers::kConst_Flag)) { + if (!var->modifierFlags().isConst()) { continue; } if (!var->initialValue()) { diff --git a/src/sksl/transform/SkSLTransform.h b/src/sksl/transform/SkSLTransform.h index 10ab78eb1f6d..f44b1c1d3025 100644 --- a/src/sksl/transform/SkSLTransform.h +++ b/src/sksl/transform/SkSLTransform.h @@ -17,7 +17,6 @@ namespace SkSL { class Context; class Expression; class IndexExpression; -struct Modifiers; struct Module; struct Program; class ProgramElement; @@ -30,14 +29,13 @@ enum class ProgramKind : int8_t; namespace Transform { /** - * Checks to see if it would be safe to add `const` to the modifiers of a variable. If so, returns - * the modifiers with `const` applied; if not, returns the existing modifiers as-is. Adding `const` - * allows the inliner to fold away more values and generate tighter code. + * Checks to see if it would be safe to add `const` to the modifier flags of a variable. If so, + * returns the modifiers with `const` applied; if not, returns the existing modifiers as-is. Adding + * `const` allows the inliner to fold away more values and generate tighter code. */ -const Modifiers* AddConstToVarModifiers(const Context& context, - const Variable& var, - const Expression* initialValue, - const ProgramUsage* usage); +ModifierFlags AddConstToVarModifiers(const Variable& var, + const Expression* initialValue, + const ProgramUsage* usage); /** * Rewrites indexed swizzles of the form `myVec.zyx[i]` by replacing the swizzle with a lookup into diff --git a/src/svg/SkSVGDevice.cpp b/src/svg/SkSVGDevice.cpp index 2f245face69d..e4d4f2e5a30f 100644 --- a/src/svg/SkSVGDevice.cpp +++ b/src/svg/SkSVGDevice.cpp @@ -1154,8 +1154,6 @@ void SkSVGDevice::drawVertices(const SkVertices*, sk_sp, const SkPain // todo } -#ifdef SK_ENABLE_SKSL void SkSVGDevice::drawMesh(const SkMesh&, sk_sp, const SkPaint&) { // todo } -#endif diff --git a/src/svg/SkSVGDevice.h b/src/svg/SkSVGDevice.h index e646fad2b6de..e78dc2d77b56 100644 --- a/src/svg/SkSVGDevice.h +++ b/src/svg/SkSVGDevice.h @@ -69,9 +69,7 @@ class SkSVGDevice final : public SkClipStackDevice { const SkPaint& initialPaint, const SkPaint& drawingPaint) override; void drawVertices(const SkVertices*, sk_sp, const SkPaint&, bool) override; -#ifdef SK_ENABLE_SKSL void drawMesh(const SkMesh&, sk_sp, const SkPaint&) override; -#endif private: SkSVGDevice(const SkISize& size, std::unique_ptr, uint32_t); ~SkSVGDevice() override; diff --git a/src/text/BUILD.bazel b/src/text/BUILD.bazel index b45421f674af..beb74829075e 100644 --- a/src/text/BUILD.bazel +++ b/src/text/BUILD.bazel @@ -9,6 +9,7 @@ TEXT_FILES = [ "GlyphRun.h", "StrikeForGPU.cpp", "StrikeForGPU.h", + "TextBlobMailbox.h", ] split_srcs_and_hdrs( @@ -27,3 +28,12 @@ skia_filegroup( srcs = [":text_hdrs"], visibility = ["//src:__pkg__"], ) + +skia_filegroup( + name = "no_slug_srcs", + srcs = [ + "EmptyMailboxImpl.cpp", + "EmptySlugImpl.cpp", + ], + visibility = ["//src:__pkg__"], +) diff --git a/src/text/EmptyMailboxImpl.cpp b/src/text/EmptyMailboxImpl.cpp new file mode 100644 index 000000000000..17cef70308cb --- /dev/null +++ b/src/text/EmptyMailboxImpl.cpp @@ -0,0 +1,12 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "src/text/TextBlobMailbox.h" + +namespace sktext { +void PostPurgeBlobMessage(uint32_t blobID, uint32_t cacheID) {} +} diff --git a/src/text/EmptySlugImpl.cpp b/src/text/EmptySlugImpl.cpp new file mode 100644 index 000000000000..3b9979f6ae55 --- /dev/null +++ b/src/text/EmptySlugImpl.cpp @@ -0,0 +1,17 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + * + * One day, slugs might be supported on a CPU backend, but for now are GPU-only. + * CPU-only builds need this file to allow SkPicture deserialization to link w/o errors. + */ + +#include "include/private/chromium/Slug.h" + +namespace sktext::gpu { +sk_sp Slug::MakeFromBuffer(SkReadBuffer&) { + return nullptr; +} +} diff --git a/src/text/TextBlobMailbox.h b/src/text/TextBlobMailbox.h new file mode 100644 index 000000000000..cd624926f5ff --- /dev/null +++ b/src/text/TextBlobMailbox.h @@ -0,0 +1,18 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef sktext_TextBlobMailbox_DEFINED + +#include + +namespace sktext { +// With a Ganesh or Graphite backend, this signals the given cache it can purge +// assets related to the given blob ID. A no-op on the software backend. +void PostPurgeBlobMessage(uint32_t blobID, uint32_t cacheID); +} + +#endif diff --git a/src/text/gpu/SDFMaskFilter.cpp b/src/text/gpu/SDFMaskFilter.cpp index 0c2ee314b7b3..a13cb978e4fd 100644 --- a/src/text/gpu/SDFMaskFilter.cpp +++ b/src/text/gpu/SDFMaskFilter.cpp @@ -29,18 +29,13 @@ class SDFMaskFilterImpl : public SkMaskFilterBase { // This method is not exported to java. SkMask::Format getFormat() const override; // This method is not exported to java. - bool filterMask(SkMask* dst, const SkMask& src, const SkMatrix&, + bool filterMask(SkMaskBuilder* dst, const SkMask& src, const SkMatrix&, SkIPoint* margin) const override; SkMaskFilterBase::Type type() const override { return SkMaskFilterBase::Type::kSDF; } void computeFastBounds(const SkRect&, SkRect*) const override; -protected: - private: SK_FLATTENABLE_HOOKS(SDFMaskFilterImpl) - - using INHERITED = SkMaskFilter; - friend void register_sdf_maskfilter_createproc(); }; /////////////////////////////////////////////////////////////////////////////// @@ -51,16 +46,16 @@ SkMask::Format SDFMaskFilterImpl::getFormat() const { return SkMask::kSDF_Format; } -bool SDFMaskFilterImpl::filterMask(SkMask* dst, const SkMask& src, - const SkMatrix& matrix, SkIPoint* margin) const { +bool SDFMaskFilterImpl::filterMask(SkMaskBuilder* dst, const SkMask& src, + const SkMatrix& matrix, SkIPoint* margin) const { if (src.fFormat != SkMask::kA8_Format && src.fFormat != SkMask::kBW_Format && src.fFormat != SkMask::kLCD16_Format) { return false; } - *dst = SkMask::PrepareDestination(SK_DistanceFieldPad, SK_DistanceFieldPad, src); - dst->fFormat = SkMask::kSDF_Format; + *dst = SkMaskBuilder::PrepareDestination(SK_DistanceFieldPad, SK_DistanceFieldPad, src); + dst->format() = SkMask::kSDF_Format; if (margin) { margin->set(SK_DistanceFieldPad, SK_DistanceFieldPad); @@ -70,20 +65,20 @@ bool SDFMaskFilterImpl::filterMask(SkMask* dst, const SkMask& src, return true; } if (dst->fImage == nullptr) { - dst->fBounds.setEmpty(); + dst->bounds().setEmpty(); return false; } if (src.fFormat == SkMask::kA8_Format) { - return SkGenerateDistanceFieldFromA8Image(dst->fImage, src.fImage, + return SkGenerateDistanceFieldFromA8Image(dst->image(), src.fImage, src.fBounds.width(), src.fBounds.height(), src.fRowBytes); } else if (src.fFormat == SkMask::kLCD16_Format) { - return SkGenerateDistanceFieldFromLCD16Mask(dst->fImage, src.fImage, + return SkGenerateDistanceFieldFromLCD16Mask(dst->image(), src.fImage, src.fBounds.width(), src.fBounds.height(), src.fRowBytes); } else { - return SkGenerateDistanceFieldFromBWImage(dst->fImage, src.fImage, + return SkGenerateDistanceFieldFromBWImage(dst->image(), src.fImage, src.fBounds.width(), src.fBounds.height(), src.fRowBytes); } @@ -99,8 +94,6 @@ sk_sp SDFMaskFilterImpl::CreateProc(SkReadBuffer& buffer) { return SDFMaskFilter::Make(); } -void register_sdf_maskfilter_createproc() { SK_REGISTER_FLATTENABLE(SDFMaskFilterImpl); } - /////////////////////////////////////////////////////////////////////////////// sk_sp SDFMaskFilter::Make() { diff --git a/src/text/gpu/SDFMaskFilter.h b/src/text/gpu/SDFMaskFilter.h index 9e789e8b25f7..86832618040e 100644 --- a/src/text/gpu/SDFMaskFilter.h +++ b/src/text/gpu/SDFMaskFilter.h @@ -26,8 +26,6 @@ class SDFMaskFilter : public SkMaskFilter { static sk_sp Make(); }; -extern void register_sdf_maskfilter_createproc(); - } // namespace sktext::gpu #endif // !defined(SK_DISABLE_SDF_TEXT) diff --git a/src/text/gpu/SlugImpl.cpp b/src/text/gpu/SlugImpl.cpp index 521a3b2f4bdb..28cb0fcefb9e 100644 --- a/src/text/gpu/SlugImpl.cpp +++ b/src/text/gpu/SlugImpl.cpp @@ -13,7 +13,6 @@ #include "include/private/base/SkAssert.h" #include "include/private/chromium/Slug.h" #include "src/core/SkDevice.h" -#include "src/core/SkMatrixProvider.h" #include "src/core/SkPaintPriv.h" #include "src/core/SkReadBuffer.h" #include "src/core/SkWriteBuffer.h" @@ -73,7 +72,7 @@ SkMatrix position_matrix(const SkMatrix& drawMatrix, SkPoint drawOrigin) { return position_matrix.preTranslate(drawOrigin.x(), drawOrigin.y()); } -sk_sp SlugImpl::Make(const SkMatrixProvider& viewMatrix, +sk_sp SlugImpl::Make(const SkMatrix& viewMatrix, const sktext::GlyphRunList& glyphRunList, const SkPaint& initialPaint, const SkPaint& drawingPaint, @@ -83,8 +82,7 @@ sk_sp SlugImpl::Make(const SkMatrixProvider& viewMatrix, auto [initializer, _, alloc] = SubRunAllocator::AllocateClassMemoryAndArena(subRunSizeHint); - const SkMatrix positionMatrix = - position_matrix(viewMatrix.localToDevice(), glyphRunList.origin()); + const SkMatrix positionMatrix = position_matrix(viewMatrix, glyphRunList.origin()); auto subRuns = gpu::SubRunContainer::MakeInAlloc(glyphRunList, positionMatrix, diff --git a/src/text/gpu/SlugImpl.h b/src/text/gpu/SlugImpl.h index 263837091f7b..ed798c697a47 100644 --- a/src/text/gpu/SlugImpl.h +++ b/src/text/gpu/SlugImpl.h @@ -13,7 +13,6 @@ #include "include/core/SkRefCnt.h" #include "include/private/base/SkAssert.h" #include "include/private/chromium/Slug.h" -#include "src/core/SkMatrixProvider.h" #include "src/text/gpu/SubRunAllocator.h" #include "src/text/gpu/SubRunContainer.h" @@ -41,7 +40,7 @@ class SlugImpl final : public Slug { SkPoint origin); ~SlugImpl() override = default; - static sk_sp Make(const SkMatrixProvider& viewMatrix, + static sk_sp Make(const SkMatrix& viewMatrix, const sktext::GlyphRunList& glyphRunList, const SkPaint& initialPaint, const SkPaint& drawingPaint, diff --git a/src/text/gpu/SubRunContainer.cpp b/src/text/gpu/SubRunContainer.cpp index 24a57ac264bc..df977f24a8c6 100644 --- a/src/text/gpu/SubRunContainer.cpp +++ b/src/text/gpu/SubRunContainer.cpp @@ -38,7 +38,6 @@ #include "src/core/SkMask.h" #include "src/core/SkMaskFilterBase.h" #include "src/core/SkMatrixPriv.h" -#include "src/core/SkMatrixProvider.h" #include "src/core/SkPaintPriv.h" #include "src/core/SkReadBuffer.h" #include "src/core/SkScalerContext.h" @@ -78,13 +77,6 @@ class GrRecordingContext; using AtlasTextOp = skgpu::ganesh::AtlasTextOp; #endif // defined(SK_GANESH) -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/Device.h" -#include "src/gpu/graphite/DrawWriter.h" -#include "src/gpu/graphite/Renderer.h" -#include "src/gpu/graphite/RendererProvider.h" -#endif - using namespace skia_private; using namespace skglyph; @@ -100,17 +92,17 @@ using namespace skglyph; // GrContextOptions. namespace sktext::gpu { -// -- SubRunType ----------------------------------------------------------------------------------- -enum SubRun::SubRunType : int { +// -- SubRunStreamTag ------------------------------------------------------------------------------ +enum SubRun::SubRunStreamTag : int { kBad = 0, // Make this 0 to line up with errors from readInt. - kDirectMask, + kDirectMaskStreamTag, #if !defined(SK_DISABLE_SDF_TEXT) - kSDFT, + kSDFTStreamTag, #endif - kTransformMask, - kPath, - kDrawable, - kSubRunTypeCount, + kTransformMaskStreamTag, + kPathStreamTag, + kDrawableStreamTag, + kSubRunStreamTagCount, }; } // namespace sktext::gpu @@ -120,20 +112,6 @@ using MaskFormat = skgpu::MaskFormat; using namespace sktext; using namespace sktext::gpu; -#if defined(SK_GRAPHITE) -namespace gr = skgpu::graphite; - -using BindBufferInfo = gr::BindBufferInfo; -using BufferType = gr::BufferType; -using Device = gr::Device; -using DrawWriter = gr::DrawWriter; -using Recorder = gr::Recorder; -using Renderer = gr::Renderer; -using RendererProvider = gr::RendererProvider; -using TextureProxy = gr::TextureProxy; -using Transform = gr::Transform; -#endif - namespace { #if defined(SK_GANESH) SkPMColor4f calculate_colors(skgpu::ganesh::SurfaceDrawContext* sdc, @@ -420,7 +398,7 @@ class PathSubRun final : public SubRun { const SkStrikeClient* client); protected: - SubRunType subRunType() const override { return SubRunType::kPath; } + SubRunStreamTag subRunStreamTag() const override { return SubRunStreamTag::kPathStreamTag; } void doFlatten(SkWriteBuffer& buffer) const override; private: @@ -624,7 +602,7 @@ class DrawableSubRun : public SubRun { const AtlasSubRun* testingOnly_atlasSubRun() const override; protected: - SubRunType subRunType() const override { return SubRunType::kDrawable; } + SubRunStreamTag subRunStreamTag() const override { return SubRunStreamTag::kDrawableStreamTag; } void doFlatten(SkWriteBuffer& buffer) const override; private: @@ -746,7 +724,8 @@ class DirectMaskSubRun final : public SubRun, public AtlasSubRun { const SkPaint& paint, sk_sp subRunStorage, AtlasDrawDelegate drawAtlas) const override { - drawAtlas(this, drawOrigin, paint, std::move(subRunStorage)); + drawAtlas(this, drawOrigin, paint, std::move(subRunStorage), + {/* isSDF = */false, /* isLCD = */false}); } int unflattenSize() const override { @@ -759,10 +738,18 @@ class DirectMaskSubRun final : public SubRun, public AtlasSubRun { return SkCount(fGlyphs.glyphs()); } + SkSpan glyphs() const override { + return fGlyphs.glyphs(); + } + MaskFormat maskFormat() const override { return fVertexFiller.grMaskType(); } int glyphSrcPadding() const override { return 0; } + unsigned short instanceFlags() const override { + return (unsigned short)fVertexFiller.grMaskType(); + } + void testingOnly_packedGlyphIDToGlyph(StrikeCache* cache) const override { fGlyphs.packedGlyphIDToGlyph(cache); } @@ -774,14 +761,13 @@ class DirectMaskSubRun final : public SubRun, public AtlasSubRun { std::tuple makeAtlasTextOp( const GrClip* clip, - const SkMatrixProvider& viewMatrix, + const SkMatrix& viewMatrix, SkPoint drawOrigin, const SkPaint& paint, sk_sp&& subRunStorage, skgpu::ganesh::SurfaceDrawContext* sdc) const override { SkASSERT(this->glyphCount() != 0); - const SkMatrix& drawMatrix = viewMatrix.localToDevice(); - const SkMatrix& positionMatrix = position_matrix(drawMatrix, drawOrigin); + const SkMatrix& positionMatrix = position_matrix(viewMatrix, drawOrigin); auto [integerTranslate, subRunDeviceBounds] = fVertexFiller.deviceRectAndCheckTransform(positionMatrix); @@ -818,12 +804,12 @@ class DirectMaskSubRun final : public SubRun, public AtlasSubRun { GrPaint grPaint; const SkPMColor4f drawingColor = calculate_colors(sdc, paint, - drawMatrix, + viewMatrix, fVertexFiller.grMaskType(), &grPaint); auto geometry = AtlasTextOp::Geometry::Make(*this, - drawMatrix, + viewMatrix, drawOrigin, geometricClipRect, std::move(subRunStorage), @@ -861,30 +847,7 @@ class DirectMaskSubRun final : public SubRun, public AtlasSubRun { &fGlyphs, begin, end, fVertexFiller.grMaskType(), this->glyphSrcPadding()); } -#if defined(SK_GRAPHITE) - - std::tuple boundsAndDeviceMatrix( - const Transform& localToDevice, SkPoint drawOrigin) const override { - return fVertexFiller.boundsAndDeviceMatrix(localToDevice, drawOrigin); - } - - const Renderer* renderer(const RendererProvider* renderers) const override { - return renderers->bitmapText(); - } - - void fillInstanceData(DrawWriter* dw, - int offset, int count, - int ssboIndex, - SkScalar depth) const override { - unsigned short flags = (unsigned short)fVertexFiller.grMaskType(); - fVertexFiller.fillInstanceData(dw, - offset, count, - flags, - ssboIndex, - fGlyphs.glyphs(), - depth); - } -#endif // defined(SK_GRAPHITE) + const VertexFiller& vertexFiller() const override { return fVertexFiller; } bool canReuse(const SkPaint& paint, const SkMatrix& positionMatrix) const override { auto [reuse, _] = fVertexFiller.deviceRectAndCheckTransform(positionMatrix); @@ -896,7 +859,9 @@ class DirectMaskSubRun final : public SubRun, public AtlasSubRun { } protected: - SubRunType subRunType() const override { return SubRunType::kDirectMask; } + SubRunStreamTag subRunStreamTag() const override { + return SubRunStreamTag::kDirectMaskStreamTag; + } void doFlatten(SkWriteBuffer& buffer) const override { fVertexFiller.flatten(buffer); @@ -980,6 +945,14 @@ class TransformedMaskSubRun final : public SubRun, public AtlasSubRun { int glyphCount() const override { return SkCount(fGlyphs.glyphs()); } + SkSpan glyphs() const override { + return fGlyphs.glyphs(); + } + + unsigned short instanceFlags() const override { + return (unsigned short)fVertexFiller.grMaskType(); + } + MaskFormat maskFormat() const override { return fVertexFiller.grMaskType(); } int glyphSrcPadding() const override { return 1; } @@ -989,7 +962,8 @@ class TransformedMaskSubRun final : public SubRun, public AtlasSubRun { const SkPaint& paint, sk_sp subRunStorage, AtlasDrawDelegate drawAtlas) const override { - drawAtlas(this, drawOrigin, paint, std::move(subRunStorage)); + drawAtlas(this, drawOrigin, paint, std::move(subRunStorage), + {/* isSDF = */false, /* isLCD = */false}); } #if defined(SK_GANESH) @@ -1000,24 +974,22 @@ class TransformedMaskSubRun final : public SubRun, public AtlasSubRun { std::tuple makeAtlasTextOp( const GrClip* clip, - const SkMatrixProvider& viewMatrix, + const SkMatrix& viewMatrix, SkPoint drawOrigin, const SkPaint& paint, sk_sp&& subRunStorage, skgpu::ganesh::SurfaceDrawContext* sdc) const override { SkASSERT(this->glyphCount() != 0); - const SkMatrix& drawMatrix = viewMatrix.localToDevice(); - GrPaint grPaint; SkPMColor4f drawingColor = calculate_colors(sdc, paint, - drawMatrix, + viewMatrix, fVertexFiller.grMaskType(), &grPaint); auto geometry = AtlasTextOp::Geometry::Make(*this, - drawMatrix, + viewMatrix, drawOrigin, SkIRect::MakeEmpty(), std::move(subRunStorage), @@ -1025,7 +997,7 @@ class TransformedMaskSubRun final : public SubRun, public AtlasSubRun { sdc->arenaAlloc()); GrRecordingContext* const rContext = sdc->recordingContext(); - SkMatrix positionMatrix = position_matrix(drawMatrix, drawOrigin); + SkMatrix positionMatrix = position_matrix(viewMatrix, drawOrigin); auto [_, deviceRect] = fVertexFiller.deviceRectAndCheckTransform(positionMatrix); GrOp::Owner op = GrOp::Make(rContext, fVertexFiller.opMaskType(), @@ -1058,34 +1030,12 @@ class TransformedMaskSubRun final : public SubRun, public AtlasSubRun { &fGlyphs, begin, end, fVertexFiller.grMaskType(), this->glyphSrcPadding()); } -#if defined(SK_GRAPHITE) - - std::tuple boundsAndDeviceMatrix(const Transform& localToDevice, - SkPoint drawOrigin) const override { - return fVertexFiller.boundsAndDeviceMatrix(localToDevice, drawOrigin); - } - - const Renderer* renderer(const RendererProvider* renderers) const override { - return renderers->bitmapText(); - } - - void fillInstanceData(DrawWriter* dw, - int offset, int count, - int ssboIndex, - SkScalar depth) const override { - unsigned short flags = (unsigned short)fVertexFiller.grMaskType(); - fVertexFiller.fillInstanceData(dw, - offset, count, - flags, - ssboIndex, - fGlyphs.glyphs(), - depth); - } - -#endif // SK_GRAPHITE + const VertexFiller& vertexFiller() const override { return fVertexFiller; } protected: - SubRunType subRunType() const override { return SubRunType::kTransformMask; } + SubRunStreamTag subRunStreamTag() const override { + return SubRunStreamTag::kTransformMaskStreamTag; + } void doFlatten(SkWriteBuffer& buffer) const override { fVertexFiller.flatten(buffer); @@ -1228,12 +1178,21 @@ class SDFTSubRun final : public SubRun, public AtlasSubRun { } int glyphSrcPadding() const override { return SK_DistanceFieldInset; } + SkSpan glyphs() const override { + return fGlyphs.glyphs(); + } + + unsigned short instanceFlags() const override { + return (unsigned short)MaskFormat::kA8; + } + void draw(SkCanvas*, SkPoint drawOrigin, const SkPaint& paint, sk_sp subRunStorage, AtlasDrawDelegate drawAtlas) const override { - drawAtlas(this, drawOrigin, paint, std::move(subRunStorage)); + drawAtlas(this, drawOrigin, paint, std::move(subRunStorage), + {/* isSDF = */true, /* isLCD = */fUseLCDText}); } #if defined(SK_GANESH) @@ -1243,27 +1202,25 @@ class SDFTSubRun final : public SubRun, public AtlasSubRun { std::tuple makeAtlasTextOp( const GrClip* clip, - const SkMatrixProvider& viewMatrix, + const SkMatrix& viewMatrix, SkPoint drawOrigin, const SkPaint& paint, sk_sp&& subRunStorage, skgpu::ganesh::SurfaceDrawContext* sdc) const override { SkASSERT(this->glyphCount() != 0); - const SkMatrix& drawMatrix = viewMatrix.localToDevice(); - GrPaint grPaint; SkPMColor4f drawingColor = calculate_colors(sdc, paint, - drawMatrix, + viewMatrix, MaskFormat::kA8, &grPaint); auto [maskType, DFGPFlags, useGammaCorrectDistanceTable] = - calculate_sdf_parameters(*sdc, drawMatrix, fUseLCDText, fAntiAliased); + calculate_sdf_parameters(*sdc, viewMatrix, fUseLCDText, fAntiAliased); auto geometry = AtlasTextOp::Geometry::Make(*this, - drawMatrix, + viewMatrix, drawOrigin, SkIRect::MakeEmpty(), std::move(subRunStorage), @@ -1271,7 +1228,7 @@ class SDFTSubRun final : public SubRun, public AtlasSubRun { sdc->arenaAlloc()); GrRecordingContext* const rContext = sdc->recordingContext(); - SkMatrix positionMatrix = position_matrix(drawMatrix, drawOrigin); + SkMatrix positionMatrix = position_matrix(viewMatrix, drawOrigin); auto [_, deviceRect] = fVertexFiller.deviceRectAndCheckTransform(positionMatrix); GrOp::Owner op = GrOp::Make(rContext, maskType, @@ -1309,32 +1266,10 @@ class SDFTSubRun final : public SubRun, public AtlasSubRun { return regenerateAtlas(&fGlyphs, begin, end, MaskFormat::kA8, this->glyphSrcPadding()); } -#if defined(SK_GRAPHITE) - - std::tuple boundsAndDeviceMatrix(const Transform& localToDevice, - SkPoint drawOrigin) const override { - return fVertexFiller.boundsAndDeviceMatrix(localToDevice, drawOrigin); - } - - const Renderer* renderer(const RendererProvider* renderers) const override { - return renderers->sdfText(fUseLCDText); - } - - void fillInstanceData(DrawWriter* dw, - int offset, int count, - int ssboIndex, - SkScalar depth) const override { - fVertexFiller.fillInstanceData(dw, - offset, count, /*flags=*/0, - ssboIndex, - fGlyphs.glyphs(), - depth); - } - -#endif // SK_GRAPHITE + const VertexFiller& vertexFiller() const override { return fVertexFiller; } protected: - SubRunType subRunType() const override { return SubRunType::kSDFT; } + SubRunStreamTag subRunStreamTag() const override { return SubRunStreamTag::kSDFTStreamTag; } void doFlatten(SkWriteBuffer& buffer) const override { buffer.writeInt(fUseLCDText); buffer.writeInt(fAntiAliased); @@ -1389,7 +1324,7 @@ void add_multi_mask_format( namespace sktext::gpu { SubRun::~SubRun() = default; void SubRun::flatten(SkWriteBuffer& buffer) const { - buffer.writeInt(this->subRunType()); + buffer.writeInt(this->subRunStreamTag()); this->doFlatten(buffer); } @@ -1400,7 +1335,7 @@ SubRunOwner SubRun::MakeFromBuffer(SkReadBuffer& buffer, SubRunAllocator*, const SkStrikeClient*); - static Maker makers[kSubRunTypeCount] = { + static Maker makers[kSubRunStreamTagCount] = { nullptr, // 0 index is bad. DirectMaskSubRun::MakeFromBuffer, #if !defined(SK_DISABLE_SDF_TEXT) @@ -1411,8 +1346,8 @@ SubRunOwner SubRun::MakeFromBuffer(SkReadBuffer& buffer, DrawableSubRun::MakeFromBuffer, }; int subRunTypeInt = buffer.readInt(); - SkASSERT(kBad < subRunTypeInt && subRunTypeInt < kSubRunTypeCount); - if (!buffer.validate(kBad < subRunTypeInt && subRunTypeInt < kSubRunTypeCount)) { + SkASSERT(kBad < subRunTypeInt && subRunTypeInt < kSubRunStreamTagCount); + if (!buffer.validate(kBad < subRunTypeInt && subRunTypeInt < kSubRunStreamTagCount)) { return nullptr; } auto maker = makers[subRunTypeInt]; diff --git a/src/text/gpu/SubRunContainer.h b/src/text/gpu/SubRunContainer.h index af687c3e3987..1d2e81e21e8c 100644 --- a/src/text/gpu/SubRunContainer.h +++ b/src/text/gpu/SubRunContainer.h @@ -11,7 +11,6 @@ #include "include/core/SkMatrix.h" #include "include/core/SkRefCnt.h" #include "include/core/SkSpan.h" -#include "include/private/base/SkAttributes.h" #include "src/text/gpu/SubRunAllocator.h" #include @@ -22,7 +21,6 @@ #include class SkCanvas; -class SkMatrixProvider; class SkPaint; class SkReadBuffer; class SkStrikeClient; @@ -50,22 +48,11 @@ class SurfaceDrawContext; } #endif -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/geom/Rect.h" -#include "src/gpu/graphite/geom/SubRunData.h" -#include "src/gpu/graphite/geom/Transform_graphite.h" - -namespace skgpu::graphite { -class DrawWriter; -class Recorder; -class Renderer; -class RendererProvider; -} -#endif - namespace sktext::gpu { class GlyphVector; +class Glyph; class StrikeCache; +class VertexFiller; using RegenerateAtlasDelegate = std::function(GlyphVector*, int begin, @@ -73,6 +60,11 @@ using RegenerateAtlasDelegate = std::function(GlyphVector* skgpu::MaskFormat, int padding)>; +struct RendererData { + bool isSDF = false; + bool isLCD = false; +}; + // -- AtlasSubRun -------------------------------------------------------------------------------- // AtlasSubRun is the API that AtlasTextOp uses to generate vertex data for drawing. // There are three different ways AtlasSubRun is specialized. @@ -91,16 +83,18 @@ class AtlasSubRun { public: virtual ~AtlasSubRun() = default; + virtual SkSpan glyphs() const = 0; virtual int glyphCount() const = 0; virtual skgpu::MaskFormat maskFormat() const = 0; virtual int glyphSrcPadding() const = 0; + virtual unsigned short instanceFlags() const = 0; #if defined(SK_GANESH) virtual size_t vertexStride(const SkMatrix& drawMatrix) const = 0; virtual std::tuple makeAtlasTextOp( const GrClip*, - const SkMatrixProvider& viewMatrix, + const SkMatrix& viewMatrix, SkPoint drawOrigin, const SkPaint&, sk_sp&& subRunStorage, @@ -117,20 +111,7 @@ class AtlasSubRun { virtual std::tuple regenerateAtlas( int begin, int end, RegenerateAtlasDelegate) const = 0; -#if defined(SK_GRAPHITE) - // returns bounds of the stored data and matrix to transform it to device space - virtual std::tuple boundsAndDeviceMatrix( - const skgpu::graphite::Transform& localToDevice, SkPoint drawOrigin) const = 0; - - virtual const skgpu::graphite::Renderer* renderer( - const skgpu::graphite::RendererProvider*) const = 0; - - virtual void fillInstanceData( - skgpu::graphite::DrawWriter*, - int offset, int count, - int ssboIndex, - SkScalar depth) const = 0; -#endif + virtual const VertexFiller& vertexFiller() const = 0; virtual void testingOnly_packedGlyphIDToGlyph(StrikeCache* cache) const = 0; }; @@ -138,7 +119,8 @@ class AtlasSubRun { using AtlasDrawDelegate = std::function subRunStorage)>; + sk_sp subRunStorage, + sktext::gpu::RendererData)>; // -- SubRun ------------------------------------------------------------------------------------- // SubRun defines the most basic functionality of a SubRun; the ability to draw, and the @@ -170,8 +152,8 @@ class SubRun { virtual const AtlasSubRun* testingOnly_atlasSubRun() const = 0; protected: - enum SubRunType : int; - virtual SubRunType subRunType() const = 0; + enum SubRunStreamTag : int; + virtual SubRunStreamTag subRunStreamTag() const = 0; virtual void doFlatten(SkWriteBuffer& buffer) const = 0; private: @@ -179,7 +161,7 @@ class SubRun { SubRunOwner fNext; }; -// -- SubRunList --------------------------------------------------------------------------------- +// -- SubRunList ----------------------------------------------------------------------------------- class SubRunList { public: class Iterator { @@ -242,15 +224,14 @@ class SubRunContainer { enum SubRunCreationBehavior {kAddSubRuns, kStrikeCalculationsOnly}; // The returned SubRunContainerOwner will never be null. If subRunCreation == // kStrikeCalculationsOnly, then the returned container will be empty. - static SK_WARN_UNUSED_RESULT SubRunContainerOwner MakeInAlloc( - const GlyphRunList& glyphRunList, - const SkMatrix& positionMatrix, - const SkPaint& runPaint, - SkStrikeDeviceInfo strikeDeviceInfo, - StrikeForGPUCacheInterface* strikeCache, - sktext::gpu::SubRunAllocator* alloc, - SubRunCreationBehavior creationBehavior, - const char* tag); + [[nodiscard]] static SubRunContainerOwner MakeInAlloc(const GlyphRunList& glyphRunList, + const SkMatrix& positionMatrix, + const SkPaint& runPaint, + SkStrikeDeviceInfo strikeDeviceInfo, + StrikeForGPUCacheInterface* strikeCache, + sktext::gpu::SubRunAllocator* alloc, + SubRunCreationBehavior creationBehavior, + const char* tag); static size_t EstimateAllocSize(const GlyphRunList& glyphRunList); diff --git a/src/text/gpu/TextBlob.cpp b/src/text/gpu/TextBlob.cpp index 14a06f9f9bf4..74cb1da02a6c 100644 --- a/src/text/gpu/TextBlob.cpp +++ b/src/text/gpu/TextBlob.cpp @@ -271,7 +271,7 @@ TextBlob::TextBlob(SubRunAllocator&& alloc, , fSize(totalMemorySize) , fInitialLuminance{initialLuminance} { } -sk_sp MakeSlug(const SkMatrixProvider& drawMatrix, +sk_sp MakeSlug(const SkMatrix& drawMatrix, const sktext::GlyphRunList& glyphRunList, const SkPaint& initialPaint, const SkPaint& drawingPaint, diff --git a/src/text/gpu/TextBlob.h b/src/text/gpu/TextBlob.h index 98b3a79b7f51..aeb488dfc092 100644 --- a/src/text/gpu/TextBlob.h +++ b/src/text/gpu/TextBlob.h @@ -25,7 +25,6 @@ #include class SkCanvas; -class SkMatrixProvider; struct SkPoint; struct SkStrikeDeviceInfo; @@ -135,7 +134,7 @@ class TextBlob final : public SkRefCnt { Key fKey; }; -sk_sp MakeSlug(const SkMatrixProvider& drawMatrix, +sk_sp MakeSlug(const SkMatrix& drawMatrix, const sktext::GlyphRunList& glyphRunList, const SkPaint& initialPaint, const SkPaint& drawingPaint, diff --git a/src/text/gpu/TextBlobRedrawCoordinator.cpp b/src/text/gpu/TextBlobRedrawCoordinator.cpp index 6904d9c87ed1..547a0cd1eee2 100644 --- a/src/text/gpu/TextBlobRedrawCoordinator.cpp +++ b/src/text/gpu/TextBlobRedrawCoordinator.cpp @@ -136,11 +136,6 @@ void TextBlobRedrawCoordinator::freeAll() { fCurrentSize = 0; } -void TextBlobRedrawCoordinator::PostPurgeBlobMessage(uint32_t blobID, uint32_t cacheID) { - SkASSERT(blobID != SK_InvalidGenID); - SkMessageBus::Post(PurgeBlobMessage(blobID, cacheID)); -} - void TextBlobRedrawCoordinator::purgeStaleBlobs() { SkAutoSpinlock lock{fSpinLock}; this->internalPurgeStaleBlobs(); @@ -264,3 +259,11 @@ int TextBlobRedrawCoordinator::BlobIDCacheEntry::findBlobIndex(const TextBlob::K } } // namespace sktext::gpu + +namespace sktext { +void PostPurgeBlobMessage(uint32_t blobID, uint32_t cacheID) { + using PurgeBlobMessage = sktext::gpu::TextBlobRedrawCoordinator::PurgeBlobMessage; + SkASSERT(blobID != SK_InvalidGenID); + SkMessageBus::Post(PurgeBlobMessage(blobID, cacheID)); +} +} diff --git a/src/text/gpu/TextBlobRedrawCoordinator.h b/src/text/gpu/TextBlobRedrawCoordinator.h index f5582982a9c9..6b0bd729dad6 100644 --- a/src/text/gpu/TextBlobRedrawCoordinator.h +++ b/src/text/gpu/TextBlobRedrawCoordinator.h @@ -59,8 +59,6 @@ class TextBlobRedrawCoordinator { uint32_t fContextID; }; - static void PostPurgeBlobMessage(uint32_t blobID, uint32_t cacheID); - void purgeStaleBlobs() SK_EXCLUDES(fSpinLock); size_t usedBytes() const SK_EXCLUDES(fSpinLock); diff --git a/src/text/gpu/VertexFiller.cpp b/src/text/gpu/VertexFiller.cpp index 2f46c68262b8..57bf28937c47 100644 --- a/src/text/gpu/VertexFiller.cpp +++ b/src/text/gpu/VertexFiller.cpp @@ -13,7 +13,6 @@ #include "include/core/SkRect.h" #include "include/core/SkScalar.h" #include "include/core/SkTypes.h" -#include "include/private/base/SkSpan_impl.h" #include "include/private/base/SkTLogic.h" #include "src/base/SkZip.h" #include "src/core/SkReadBuffer.h" @@ -27,13 +26,6 @@ #include "src/gpu/ganesh/ops/AtlasTextOp.h" #endif -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/Device.h" -#include "src/gpu/graphite/DrawWriter.h" -#include "src/gpu/graphite/Renderer.h" -#include "src/gpu/graphite/RendererProvider.h" -#endif - #include #include #include @@ -355,73 +347,6 @@ AtlasTextOp::MaskType VertexFiller::opMaskType() const { } #endif // defined(SK_GANESH) -#if defined(SK_GRAPHITE) -void VertexFiller::fillInstanceData(skgpu::graphite::DrawWriter* dw, - int offset, int count, - unsigned short flags, - int ssboIndex, - SkSpan glyphs, - SkScalar depth) const { - auto quadData = [&]() { - return SkMakeZip(glyphs.subspan(offset, count), - fLeftTop.subspan(offset, count)); - }; - - skgpu::graphite::DrawWriter::Instances instances{*dw, {}, {}, 4}; - instances.reserve(count); - // Need to send width, height, uvPos, xyPos, and strikeToSourceScale - // pre-transform coords = (s*w*b_x + t_x, s*h*b_y + t_y) - // where (b_x, b_y) are the vertexID coords - for (auto [glyph, leftTop]: quadData()) { - auto[al, at, ar, ab] = glyph->fAtlasLocator.getUVs(); - instances.append(1) << AtlasPt{uint16_t(ar-al), uint16_t(ab-at)} - << AtlasPt{uint16_t(al & 0x1fff), at} - << leftTop << /*index=*/uint16_t(al >> 13) << flags - << 1.0f - << depth << ssboIndex; - } -} - -using Rect = skgpu::graphite::Rect; -using Transform = skgpu::graphite::Transform; - -std::tuple VertexFiller::boundsAndDeviceMatrix( - const Transform& localToDevice, SkPoint drawOrigin) const { - // The baked-in matrix differs from the current localToDevice by a translation if the - // upper 2x2 remains the same, and there's no perspective. Since there's no projection, - // Z is irrelevant, so it's okay that fCreationMatrix is an SkMatrix and has - // discarded the 3rd row/col, and can ignore those values in localToDevice. - const SkM44& positionMatrix = localToDevice.matrix(); - const bool compatibleMatrix = positionMatrix.rc(0,0) == fCreationMatrix.rc(0, 0) && - positionMatrix.rc(0,1) == fCreationMatrix.rc(0, 1) && - positionMatrix.rc(1,0) == fCreationMatrix.rc(1, 0) && - positionMatrix.rc(1,1) == fCreationMatrix.rc(1, 1) && - localToDevice.type() != Transform::Type::kProjection && - !fCreationMatrix.hasPerspective(); - - if (compatibleMatrix) { - const SkV4 mappedOrigin = positionMatrix.map(drawOrigin.x(), drawOrigin.y(), 0.f, 1.f); - const SkV2 offset = {mappedOrigin.x - fCreationMatrix.getTranslateX(), - mappedOrigin.y - fCreationMatrix.getTranslateY()}; - if (SkScalarIsInt(offset.x) && SkScalarIsInt(offset.y)) { - // The offset is an integer (but make sure), which means the generated mask can be - // accessed without changing how texels would be sampled. - return {Rect(fCreationBounds), - Transform(SkM44::Translate(SkScalarRoundToInt(offset.x), - SkScalarRoundToInt(offset.y)))}; - } - } - - // Otherwise compute the relative transformation from fCreationMatrix to - // localToDevice, with the drawOrigin applied. If fCreationMatrix or the - // concatenation is not invertible the returned Transform is marked invalid and the draw - // will be automatically dropped. - const SkMatrix viewDifference = this->viewDifference( - localToDevice.preTranslate(drawOrigin.x(), drawOrigin.y())); - return {Rect(fCreationBounds), Transform(SkM44(viewDifference))}; -} -#endif // defined(SK_GRAPHITE) - // Return true if the positionMatrix represents an integer translation. Return the device // bounding box of all the glyphs. If the bounding box is empty, then something went singular // and this operation should be dropped. diff --git a/src/text/gpu/VertexFiller.h b/src/text/gpu/VertexFiller.h index e98b7345f723..de5e8e32f41a 100644 --- a/src/text/gpu/VertexFiller.h +++ b/src/text/gpu/VertexFiller.h @@ -10,8 +10,9 @@ #include "include/core/SkMatrix.h" #include "include/core/SkPoint.h" #include "include/core/SkRect.h" +#include "include/core/SkScalar.h" +#include "include/core/SkSpan.h" #include "include/core/SkTypes.h" -#include "include/private/base/SkSpan_impl.h" #include "include/private/base/SkTLogic.h" #include @@ -26,14 +27,15 @@ class SkWriteBuffer; #include "src/gpu/ganesh/ops/AtlasTextOp.h" #endif // defined(SK_GANESH) -#if defined(SK_GRAPHITE) -#include "src/gpu/graphite/Device.h" -#include "src/gpu/graphite/DrawWriter.h" -#include "src/gpu/graphite/Renderer.h" -#include "src/gpu/graphite/RendererProvider.h" -#endif +namespace skgpu { +enum class MaskFormat : int; -namespace skgpu { enum class MaskFormat : int; } +namespace graphite { +class DrawWriter; +class Rect; +class Transform; +} +} namespace sktext::gpu { class Glyph; @@ -89,7 +91,7 @@ class VertexFiller { skgpu::ganesh::AtlasTextOp::MaskType opMaskType() const; #endif // defined(SK_GANESH) -#if defined(SK_GRAPHITE) + // This is only available if the graphite backend is compiled in (see GraphiteVertexFiller.cpp) void fillInstanceData(skgpu::graphite::DrawWriter* dw, int offset, int count, unsigned short flags, @@ -99,7 +101,6 @@ class VertexFiller { std::tuple boundsAndDeviceMatrix( const skgpu::graphite::Transform& localToDevice, SkPoint drawOrigin) const; -#endif // defined(SK_GRAPHITE) // Return true if the positionMatrix represents an integer translation. Return the device // bounding box of all the glyphs. If the bounding box is empty, then something went singular diff --git a/src/utils/BUILD.bazel b/src/utils/BUILD.bazel index fc5bbfe781bb..97ea999f4e33 100644 --- a/src/utils/BUILD.bazel +++ b/src/utils/BUILD.bazel @@ -54,7 +54,6 @@ CORE_FILES = [ "SkShadowTessellator.cpp", "SkShadowTessellator.h", "SkShadowUtils.cpp", - "SkTestCanvas.h", "SkTextUtils.cpp", ] @@ -63,6 +62,16 @@ split_srcs_and_hdrs( files = CORE_FILES, ) +GPU_ONLY_FILES = [ + "SkTestCanvas.h", + "SkTestCanvas.cpp", +] + +split_srcs_and_hdrs( + name = "gpu", + files = GPU_ONLY_FILES, +) + skia_filegroup( name = "json_hdrs", srcs = [ @@ -70,6 +79,7 @@ skia_filegroup( "SkJSONWriter.h", ], visibility = [ + "//gm:__pkg__", "//modules/skottie:__pkg__", "//tools/debugger:__pkg__", ], @@ -82,6 +92,7 @@ skia_filegroup( "SkJSONWriter.cpp", ], visibility = [ + "//gm:__pkg__", "//modules/skottie:__pkg__", "//tools/debugger:__pkg__", ], @@ -127,6 +138,9 @@ skia_filegroup( }) + select({ ":needs_json": [":json_srcs"], "//conditions:default": [], + }) + select({ + "//src/gpu:has_ganesh_backend": [":gpu_srcs"], + "//conditions:default": [], }), visibility = ["//src:__pkg__"], ) @@ -143,6 +157,9 @@ skia_filegroup( }) + select({ ":needs_json": [":json_hdrs"], "//conditions:default": [], + }) + select({ + "//src/gpu:has_ganesh_backend": [":gpu_hdrs"], + "//conditions:default": [], }), visibility = ["//src:__pkg__"], ) diff --git a/src/utils/SkCanvasStateUtils.cpp b/src/utils/SkCanvasStateUtils.cpp index da73ed5656d0..d3dc365ced23 100644 --- a/src/utils/SkCanvasStateUtils.cpp +++ b/src/utils/SkCanvasStateUtils.cpp @@ -324,7 +324,7 @@ std::unique_ptr SkCanvasStateUtils::MakeFromCanvasState(const SkCanvas state_v1->layers[i].y)); } - return std::move(canvas); + return canvas; } //////////////////////////////////////////////////////////////////////////////// diff --git a/src/utils/SkCustomTypeface.cpp b/src/utils/SkCustomTypeface.cpp index be731f954d05..f7c57ecc9858 100644 --- a/src/utils/SkCustomTypeface.cpp +++ b/src/utils/SkCustomTypeface.cpp @@ -253,45 +253,33 @@ class SkUserScalerContext : public SkScalerContext { } protected: - bool generateAdvance(SkGlyph* glyph) override { - const SkUserTypeface* tf = this->userTF(); - auto advance = fMatrix.mapXY(tf->fGlyphRecs[glyph->getGlyphID()].fAdvance, 0); - - glyph->fAdvanceX = advance.fX; - glyph->fAdvanceY = advance.fY; - return true; - } + GlyphMetrics generateMetrics(const SkGlyph& glyph, SkArenaAlloc*) override { + GlyphMetrics mx(glyph.maskFormat()); - void generateMetrics(SkGlyph* glyph, SkArenaAlloc* alloc) override { - glyph->zeroMetrics(); - this->generateAdvance(glyph); + const SkUserTypeface* tf = this->userTF(); + mx.advance = fMatrix.mapXY(tf->fGlyphRecs[glyph.getGlyphID()].fAdvance, 0); - const auto& rec = this->userTF()->fGlyphRecs[glyph->getGlyphID()]; + const auto& rec = tf->fGlyphRecs[glyph.getGlyphID()]; if (rec.isDrawable()) { - glyph->fMaskFormat = SkMask::kARGB32_Format; + mx.maskFormat = SkMask::kARGB32_Format; SkRect bounds = fMatrix.mapRect(rec.fBounds); - bounds.offset(SkFixedToScalar(glyph->getSubXFixed()), - SkFixedToScalar(glyph->getSubYFixed())); - - SkIRect ibounds; - bounds.roundOut(&ibounds); - glyph->fLeft = ibounds.fLeft; - glyph->fTop = ibounds.fTop; - glyph->fWidth = ibounds.width(); - glyph->fHeight = ibounds.height(); + bounds.offset(SkFixedToScalar(glyph.getSubXFixed()), + SkFixedToScalar(glyph.getSubYFixed())); + bounds.roundOut(&mx.bounds); // These do not have an outline path. - glyph->setPath(alloc, nullptr, false); + mx.neverRequestPath = true; } + return mx; } - void generateImage(const SkGlyph& glyph) override { + void generateImage(const SkGlyph& glyph, void* imageBuffer) override { const auto& rec = this->userTF()->fGlyphRecs[glyph.getGlyphID()]; SkASSERTF(rec.isDrawable(), "Only drawable-backed glyphs should reach generateImage."); - auto canvas = SkCanvas::MakeRasterDirectN32(glyph.fWidth, glyph.fHeight, - static_cast(glyph.fImage), + auto canvas = SkCanvas::MakeRasterDirectN32(glyph.width(), glyph.height(), + static_cast(imageBuffer), glyph.rowBytes()); if constexpr (kSkShowTextBlitCoverage) { canvas->clear(0x33FF0000); @@ -299,7 +287,7 @@ class SkUserScalerContext : public SkScalerContext { canvas->clear(SK_ColorTRANSPARENT); } - canvas->translate(-glyph.fLeft, -glyph.fTop); + canvas->translate(-glyph.left(), -glyph.top()); canvas->translate(SkFixedToScalar(glyph.getSubXFixed()), SkFixedToScalar(glyph.getSubYFixed())); canvas->drawDrawable(rec.fDrawable.get(), &fMatrix); diff --git a/src/utils/SkDashPath.cpp b/src/utils/SkDashPath.cpp index ddcd08dd5c20..b704b0996068 100644 --- a/src/utils/SkDashPath.cpp +++ b/src/utils/SkDashPath.cpp @@ -18,8 +18,8 @@ #include "include/core/SkTypes.h" #include "include/private/base/SkAlign.h" #include "include/private/base/SkFloatingPoint.h" -#include "include/private/base/SkPathEnums.h" #include "include/private/base/SkTo.h" +#include "src/core/SkPathEnums.h" #include "src/core/SkPathPriv.h" #include "src/core/SkPointPriv.h" diff --git a/src/utils/SkNWayCanvas.cpp b/src/utils/SkNWayCanvas.cpp index 2b85fc1b54b9..cfd5ea548374 100644 --- a/src/utils/SkNWayCanvas.cpp +++ b/src/utils/SkNWayCanvas.cpp @@ -332,14 +332,12 @@ void SkNWayCanvas::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y } } -#if defined(SK_GANESH) void SkNWayCanvas::onDrawSlug(const sktext::gpu::Slug* slug) { Iter iter(fList); while (iter.next()) { iter->drawSlug(slug); } } -#endif void SkNWayCanvas::onDrawPicture(const SkPicture* picture, const SkMatrix* matrix, const SkPaint* paint) { @@ -405,10 +403,3 @@ void SkNWayCanvas::onDrawEdgeAAImageSet2(const ImageSetEntry set[], int count, set, count, dstClips, preViewMatrices, sampling, paint, constraint); } } - -void SkNWayCanvas::onFlush() { - Iter iter(fList); - while (iter.next()) { - iter->flush(); - } -} diff --git a/src/utils/SkTestCanvas.cpp b/src/utils/SkTestCanvas.cpp new file mode 100644 index 000000000000..0906e1853085 --- /dev/null +++ b/src/utils/SkTestCanvas.cpp @@ -0,0 +1,183 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "src/utils/SkTestCanvas.h" + +#include "include/core/SkCanvas.h" +#include "include/core/SkColorSpace.h" // IWYU pragma: keep +#include "include/core/SkData.h" +#include "include/core/SkImageInfo.h" +#include "include/core/SkRect.h" +#include "include/core/SkTypes.h" +#include "include/private/base/SkDebug.h" +#include "include/private/chromium/SkChromeRemoteGlyphCache.h" +#include "include/private/chromium/Slug.h" +#include "src/core/SkCanvasPriv.h" +#include "src/core/SkDevice.h" +#include "src/text/GlyphRun.h" + +#include +#include +#include +#include + +class SkPaint; + +SkTestCanvas::SkTestCanvas(SkCanvas* canvas) + : SkCanvas(sk_ref_sp(canvas->baseDevice())) {} + +void SkTestCanvas::onDrawGlyphRunList( + const sktext::GlyphRunList& glyphRunList, const SkPaint& paint) { + SkRect bounds = glyphRunList.sourceBoundsWithOrigin(); + if (this->internalQuickReject(bounds, paint)) { + return; + } + auto layer = this->aboutToDraw(this, paint, &bounds); + if (layer) { + if (glyphRunList.hasRSXForm()) { + this->SkCanvas::onDrawGlyphRunList(glyphRunList, layer->paint()); + } else { + auto slug = this->onConvertGlyphRunListToSlug(glyphRunList, layer->paint()); + this->drawSlug(slug.get()); + } + } +} + +SkTestCanvas::SkTestCanvas(SkCanvas* canvas) + : SkCanvas(sk_ref_sp(canvas->baseDevice())) {} + +void SkTestCanvas::onDrawGlyphRunList( + const sktext::GlyphRunList& glyphRunList, const SkPaint& paint) { + SkRect bounds = glyphRunList.sourceBoundsWithOrigin(); + if (this->internalQuickReject(bounds, paint)) { + return; + } + auto layer = this->aboutToDraw(this, paint, &bounds); + if (layer) { + if (glyphRunList.hasRSXForm()) { + this->SkCanvas::onDrawGlyphRunList(glyphRunList, layer->paint()); + } else { + sk_sp bytes; + { + auto slug = this->onConvertGlyphRunListToSlug(glyphRunList, layer->paint()); + if (slug != nullptr) { + bytes = slug->serialize(); + } + } + { + if (bytes != nullptr) { + auto slug = sktext::gpu::Slug::Deserialize(bytes->data(), bytes->size()); + this->drawSlug(slug.get()); + } + } + } + } +} + + +// A do nothing handle manager for the remote strike server. +class ServerHandleManager : public SkStrikeServer::DiscardableHandleManager { +public: + SkDiscardableHandleId createHandle() override { + return 0; + } + + bool lockHandle(SkDiscardableHandleId id) override { + return true; + } + + bool isHandleDeleted(SkDiscardableHandleId id) override { + return false; + } +}; + +// Lock the strikes into the cache for the length of the test. This handler is tied to the lifetime +// of the canvas used to render the entire test. +class ClientHandleManager : public SkStrikeClient::DiscardableHandleManager { +public: + bool deleteHandle(SkDiscardableHandleId id) override { + return fIsLocked; + } + + void assertHandleValid(SkDiscardableHandleId id) override { + DiscardableHandleManager::assertHandleValid(id); + } + + void notifyCacheMiss(SkStrikeClient::CacheMissType type, int fontSize) override { + + } + + void notifyReadFailure(const ReadFailureData& data) override { + DiscardableHandleManager::notifyReadFailure(data); + } + + void unlock() { + fIsLocked = true; + } + +private: + bool fIsLocked{false}; +}; + +SkTestCanvas::SkTestCanvas(SkCanvas* canvas) + : SkCanvas(sk_ref_sp(canvas->baseDevice())) + , fServerHandleManager(new ServerHandleManager{}) + , fClientHandleManager(new ClientHandleManager{}) + , fStrikeServer(fServerHandleManager.get()) + , fStrikeClient(fClientHandleManager) {} + +// Allow the strikes to be freed from the strike cache after the test has been drawn. +SkTestCanvas::~SkTestCanvas() { + static_cast(fClientHandleManager.get())->unlock(); +} + +void SkTestCanvas::onDrawGlyphRunList( + const sktext::GlyphRunList& glyphRunList, const SkPaint& paint) { + SkRect bounds = glyphRunList.sourceBoundsWithOrigin(); + if (this->internalQuickReject(bounds, paint)) { + return; + } + auto layer = this->aboutToDraw(this, paint, &bounds); + if (layer) { + if (glyphRunList.hasRSXForm()) { + this->SkCanvas::onDrawGlyphRunList(glyphRunList, layer->paint()); + } else { + sk_sp slugBytes; + std::vector glyphBytes; + { + auto analysisCanvas = fStrikeServer.makeAnalysisCanvas( + this->topDevice()->width(), + this->topDevice()->height(), + this->fProps, + this->topDevice()->imageInfo().refColorSpace(), + // TODO: Where should we get this value from? + /*DFTSupport=*/ true); + + // TODO: Move the analysis canvas processing up to the via to handle a whole + // document at a time. This is not the correct way to handle the CTM; it doesn't + // work for layers. + analysisCanvas->setMatrix(this->getLocalToDevice()); + auto slug = analysisCanvas->onConvertGlyphRunListToSlug(glyphRunList, + layer->paint()); + if (slug != nullptr) { + slugBytes = slug->serialize(); + } + fStrikeServer.writeStrikeData(&glyphBytes); + } + { + if (!glyphBytes.empty()) { + fStrikeClient.readStrikeData(glyphBytes.data(), glyphBytes.size()); + } + if (slugBytes != nullptr) { + auto slug = sktext::gpu::Slug::Deserialize( + slugBytes->data(), slugBytes->size(), &fStrikeClient); + this->drawSlug(slug.get()); + } + } + } + } +} diff --git a/src/utils/SkTestCanvas.h b/src/utils/SkTestCanvas.h index 56d5c0cf5e8a..b8ae447825af 100644 --- a/src/utils/SkTestCanvas.h +++ b/src/utils/SkTestCanvas.h @@ -15,11 +15,15 @@ #ifndef SkTestCanvas_DEFINED #define SkTestCanvas_DEFINED -#include "include/core/SkSize.h" +#include "include/core/SkCanvas.h" +#include "include/core/SkRefCnt.h" #include "include/private/chromium/SkChromeRemoteGlyphCache.h" -#include "include/utils/SkNWayCanvas.h" -#include "src/core/SkDevice.h" -#include "src/text/GlyphRun.h" + +#include + +class SkPaint; + +namespace sktext { class GlyphRunList; } // You can only make template specializations of SkTestCanvas. template class SkTestCanvas; diff --git a/src/utils/win/SkDWrite.cpp b/src/utils/win/SkDWrite.cpp index 2a758ef2b210..0f699b7b1738 100644 --- a/src/utils/win/SkDWrite.cpp +++ b/src/utils/win/SkDWrite.cpp @@ -28,12 +28,20 @@ static void release_dwrite_factory() { } static void create_dwrite_factory(IDWriteFactory** factory) { - typedef decltype(DWriteCreateFactory)* DWriteCreateFactoryProc; #ifdef SK_BUILD_FOR_WINRT + typedef decltype(DWriteCreateFactory)* DWriteCreateFactoryProc; DWriteCreateFactoryProc dWriteCreateFactoryProc = &DWriteCreateFactory; #else // SK_BUILD_FOR_WINRT - DWriteCreateFactoryProc dWriteCreateFactoryProc = reinterpret_cast( - GetProcAddress(LoadLibraryW(L"dwrite.dll"), "DWriteCreateFactory")); + using DWriteCreateFactoryProc = decltype(DWriteCreateFactory)*; + DWriteCreateFactoryProc dWriteCreateFactoryProc; + + dWriteCreateFactoryProc = reinterpret_cast( + GetProcAddress(LoadLibraryW(L"DWriteCore.dll"), "DWriteCoreCreateFactory")); + + if (!dWriteCreateFactoryProc) { + dWriteCreateFactoryProc = reinterpret_cast( + GetProcAddress(LoadLibraryW(L"dwrite.dll"), "DWriteCreateFactory")); + } if (!dWriteCreateFactoryProc) { HRESULT hr = HRESULT_FROM_WIN32(GetLastError()); diff --git a/src/xml/SkXMLParser.cpp b/src/xml/SkXMLParser.cpp index eab28cb9f692..7a9f0f087936 100644 --- a/src/xml/SkXMLParser.cpp +++ b/src/xml/SkXMLParser.cpp @@ -59,6 +59,8 @@ void SkXMLParserError::reset() { namespace { +constexpr const void* kHashSeed = &kHashSeed; + const XML_Memory_Handling_Suite sk_XML_alloc = { sk_malloc_throw, sk_realloc_throw, @@ -147,6 +149,13 @@ bool SkXMLParser::parse(SkStream& docStream) return false; } + // Avoid calls to rand_s if this is not set. This seed helps prevent DOS + // with a known hash sequence so an address is sufficient. The provided + // seed should not be zero as that results in a call to rand_s. + unsigned long seed = static_cast( + reinterpret_cast(kHashSeed) & 0xFFFFFFFF); + XML_SetHashSalt(ctx.fXMLParser, seed ? seed : 1); + XML_SetUserData(ctx.fXMLParser, &ctx); XML_SetElementHandler(ctx.fXMLParser, start_element_handler, end_element_handler); XML_SetCharacterDataHandler(ctx.fXMLParser, text_handler); diff --git a/src/xps/SkXPSDevice.cpp b/src/xps/SkXPSDevice.cpp index 7980a8e2b348..1d04cc458d14 100644 --- a/src/xps/SkXPSDevice.cpp +++ b/src/xps/SkXPSDevice.cpp @@ -633,13 +633,13 @@ static XPS_TILE_MODE SkToXpsTileMode(SkTileMode tmx, SkTileMode tmy) { } HRESULT SkXPSDevice::createXpsImageBrush( - const SkBitmap& bitmap, + const SkPixmap& bitmap, const SkMatrix& localMatrix, const SkTileMode (&xy)[2], const SkAlpha alpha, IXpsOMTileBrush** xpsBrush) { SkDynamicMemoryWStream write; - if (!SkPngEncoder::Encode(&write, bitmap.pixmap(), {})) { + if (!SkPngEncoder::Encode(&write, bitmap, {})) { HRM(E_FAIL, "Unable to encode bitmap as png."); } SkTScopedComPtr read; @@ -1055,7 +1055,8 @@ HRESULT SkXPSDevice::createXpsBrush(const SkPaint& skPaint, } SkTScopedComPtr tileBrush; - HR(this->createXpsImageBrush(outTexture, outMatrix, xy, skPaint.getAlpha(), &tileBrush)); + HR(this->createXpsImageBrush(outTexture.pixmap(), outMatrix, xy, skPaint.getAlpha(), + &tileBrush)); HRM(tileBrush->QueryInterface(brush), "QI failed."); } else { @@ -1414,11 +1415,12 @@ HRESULT SkXPSDevice::applyMask(const SkMask& mask, xy[0] = (SkTileMode)3; xy[1] = (SkTileMode)3; - SkBitmap bm; - bm.installMaskPixels(mask); + SkASSERT(mask.fFormat == SkMask::kA8_Format); + SkPixmap pm(SkImageInfo::MakeA8(mask.fBounds.width(), mask.fBounds.height()), + mask.fImage, mask.fRowBytes); SkTScopedComPtr maskBrush; - HR(this->createXpsImageBrush(bm, m, xy, 0xFF, &maskBrush)); + HR(this->createXpsImageBrush(pm, m, xy, 0xFF, &maskBrush)); HRM(shadedPath->SetOpacityMaskBrushLocal(maskBrush.get()), "Could not set mask."); @@ -1582,25 +1584,25 @@ void SkXPSDevice::drawPath(const SkPath& platonicPath, ? SkStrokeRec::kFill_InitStyle : SkStrokeRec::kHairline_InitStyle; //[Pixel-path -> Mask] - SkMask rasteredMask; + SkMaskBuilder rasteredMask; if (SkDraw::DrawToMask( *pixelPath, clipIRect, filter, //just to compute how much to draw. &matrix, &rasteredMask, - SkMask::kComputeBoundsAndRenderImage_CreateMode, + SkMaskBuilder::kComputeBoundsAndRenderImage_CreateMode, style)) { - SkAutoMaskFreeImage rasteredAmi(rasteredMask.fImage); + SkAutoMaskFreeImage rasteredAmi(rasteredMask.image()); mask = &rasteredMask; //[Mask -> Mask] - SkMask filteredMask; + SkMaskBuilder filteredMask; if (as_MFB(filter)->filterMask(&filteredMask, rasteredMask, matrix, nullptr)) { mask = &filteredMask; } - SkAutoMaskFreeImage filteredAmi(filteredMask.fImage); + SkAutoMaskFreeImage filteredAmi(filteredMask.image()); //Draw mask. HRV(this->applyMask(*mask, ppuScale, shadedPath.get())); diff --git a/src/xps/SkXPSDevice.h b/src/xps/SkXPSDevice.h index 857deb7a4c79..0ddc02874791 100644 --- a/src/xps/SkXPSDevice.h +++ b/src/xps/SkXPSDevice.h @@ -166,7 +166,7 @@ class SkXPSDevice : public SkClipStackDevice { IXpsOMBrush** xpsBrush); HRESULT createXpsImageBrush( - const SkBitmap& bitmap, + const SkPixmap& bitmap, const SkMatrix& localMatrix, const SkTileMode (&xy)[2], const SkAlpha alpha, diff --git a/tests/AAClipTest.cpp b/tests/AAClipTest.cpp index 873b90d99309..616da66e283f 100644 --- a/tests/AAClipTest.cpp +++ b/tests/AAClipTest.cpp @@ -75,27 +75,27 @@ static bool operator==(const SkMask& a, const SkMask& b) { return true; } -static void copyToMask(const SkRegion& rgn, SkMask* mask) { - mask->fFormat = SkMask::kA8_Format; +static void copyToMask(const SkRegion& rgn, SkMaskBuilder* mask) { + mask->format() = SkMask::kA8_Format; if (rgn.isEmpty()) { - mask->fBounds.setEmpty(); - mask->fRowBytes = 0; - mask->fImage = nullptr; + mask->bounds().setEmpty(); + mask->rowBytes() = 0; + mask->image() = nullptr; return; } - mask->fBounds = rgn.getBounds(); - mask->fRowBytes = mask->fBounds.width(); - mask->fImage = SkMask::AllocImage(mask->computeImageSize()); - sk_bzero(mask->fImage, mask->computeImageSize()); + mask->bounds() = rgn.getBounds(); + mask->rowBytes() = mask->fBounds.width(); + mask->image() = SkMaskBuilder::AllocImage(mask->computeImageSize()); + sk_bzero(mask->image(), mask->computeImageSize()); SkImageInfo info = SkImageInfo::Make(mask->fBounds.width(), mask->fBounds.height(), kAlpha_8_SkColorType, kPremul_SkAlphaType); SkBitmap bitmap; - bitmap.installPixels(info, mask->fImage, mask->fRowBytes); + bitmap.installPixels(info, mask->image(), mask->fRowBytes); // canvas expects its coordinate system to always be 0,0 in the top/left // so we translate the rgn to match that before drawing into the mask. @@ -108,7 +108,7 @@ static void copyToMask(const SkRegion& rgn, SkMask* mask) { canvas.drawColor(SK_ColorBLACK); } -static void copyToMask(const SkRasterClip& rc, SkMask* mask) { +static void copyToMask(const SkRasterClip& rc, SkMaskBuilder* mask) { if (rc.isBW()) { copyToMask(rc.bwRgn(), mask); } else { @@ -123,11 +123,11 @@ static bool operator==(const SkRasterClip& a, const SkRasterClip& b) { return false; } - SkMask mask0, mask1; + SkMaskBuilder mask0, mask1; copyToMask(a, &mask0); copyToMask(b, &mask1); - SkAutoMaskFreeImage free0(mask0.fImage); - SkAutoMaskFreeImage free1(mask1.fImage); + SkAutoMaskFreeImage free0(mask0.image()); + SkAutoMaskFreeImage free1(mask1.image()); return mask0 == mask1; } @@ -147,12 +147,12 @@ static void make_rand_rgn(SkRegion* rgn, SkRandom& rand) { } static bool operator==(const SkRegion& rgn, const SkAAClip& aaclip) { - SkMask mask0, mask1; + SkMaskBuilder mask0, mask1; copyToMask(rgn, &mask0); aaclip.copyToMask(&mask1); - SkAutoMaskFreeImage free0(mask0.fImage); - SkAutoMaskFreeImage free1(mask1.fImage); + SkAutoMaskFreeImage free0(mask0.image()); + SkAutoMaskFreeImage free1(mask1.image()); return mask0 == mask1; } @@ -250,7 +250,7 @@ static void test_empty(skiatest::Reporter* reporter) { REPORTER_ASSERT(reporter, clip.isEmpty()); REPORTER_ASSERT(reporter, clip.getBounds().isEmpty()); - SkMask mask; + SkMaskBuilder mask; clip.copyToMask(&mask); REPORTER_ASSERT(reporter, nullptr == mask.fImage); REPORTER_ASSERT(reporter, mask.fBounds.isEmpty()); @@ -297,11 +297,11 @@ static void test_irect(skiatest::Reporter* reporter) { clip2.getBounds().right(), clip2.getBounds().bottom()); } - SkMask maskBW, maskAA; + SkMaskBuilder maskBW, maskAA; copyToMask(rgn2, &maskBW); clip2.copyToMask(&maskAA); - SkAutoMaskFreeImage freeBW(maskBW.fImage); - SkAutoMaskFreeImage freeAA(maskAA.fImage); + SkAutoMaskFreeImage freeBW(maskBW.image()); + SkAutoMaskFreeImage freeAA(maskAA.image()); REPORTER_ASSERT(reporter, maskBW == maskAA); } } @@ -316,11 +316,7 @@ static void test_path_with_hole(skiatest::Reporter* reporter) { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, }; - SkMask expected; - expected.fBounds.setWH(4, 6); - expected.fRowBytes = 4; - expected.fFormat = SkMask::kA8_Format; - expected.fImage = (uint8_t*)gExpectedImage; + SkMask expected(gExpectedImage, SkIRect::MakeWH(4, 6), 4, SkMask::kA8_Format); SkPath path; path.addRect(SkRect::MakeXYWH(0, 0, @@ -332,9 +328,9 @@ static void test_path_with_hole(skiatest::Reporter* reporter) { SkAAClip clip; clip.setPath(path, path.getBounds().roundOut(), 1 == i); - SkMask mask; + SkMaskBuilder mask; clip.copyToMask(&mask); - SkAutoMaskFreeImage freeM(mask.fImage); + SkAutoMaskFreeImage freeM(mask.image()); REPORTER_ASSERT(reporter, expected == mask); } diff --git a/tests/BUILD.bazel b/tests/BUILD.bazel index c594d1cf14de..e58a7a2ace6b 100644 --- a/tests/BUILD.bazel +++ b/tests/BUILD.bazel @@ -11,7 +11,7 @@ load( "PATHOPS_TESTS", "PDF_TESTS", ) -load(":skia_android_unit_test.bzl", "skia_android_unit_test") +load(":android_unit_test.bzl", "android_unit_test") skia_cc_library( name = "tests_base", @@ -23,7 +23,7 @@ skia_cc_library( "TestHarness.cpp", "//tools/flags", ] + select({ - "//src/gpu:has_gpu_backend": ["TestUtils.cpp"], + "//src/gpu:has_ganesh_backend": ["TestUtils.cpp"], "//conditions:default": [], }), hdrs = [ @@ -36,7 +36,7 @@ skia_cc_library( "TestHarness.h", "//tools/fonts:test_empty_typeface", ] + select({ - "//src/gpu:has_gpu_backend": ["TestUtils.h"], + "//src/gpu:has_ganesh_backend": ["TestUtils.h"], "//conditions:default": [], }), deps = [ @@ -44,7 +44,7 @@ skia_cc_library( "//tools:registry", "//tools:tool_utils", ] + select({ - "//src/gpu:has_gpu_backend": ["//tools/gpu:utils"], + "//src/gpu:has_ganesh_backend": ["//tools/gpu:utils"], "//conditions:default": [], }) + select({ "//src/sksl:needs_sksl": ["//tools:runtime_blend_utils"], @@ -294,7 +294,7 @@ bool_flag( selects.config_setting_group( name = "skip_cpu_tests", match_all = [ - "//src/gpu:has_gpu_backend", + "//src/gpu:has_ganesh_backend", ":force_cpu_tests_false", ], ) @@ -309,7 +309,7 @@ selects.config_setting_group( # # $ bazel test //tests:android_codec_test --config=pixel_5 --config=linux_rbe --test_output=streamed -skia_android_unit_test( +android_unit_test( name = "android_codec_test", srcs = CODEC_TESTS, flags = { @@ -335,10 +335,10 @@ skia_android_unit_test( ], ) -skia_android_unit_test( +android_unit_test( name = "android_ganesh_test", srcs = GANESH_TESTS, - requires_condition = "//src/gpu:has_gpu_backend", + requires_condition = "//src/gpu:has_ganesh_backend", requires_resources_dir = True, deps = [ ":tests_base", @@ -346,7 +346,7 @@ skia_android_unit_test( ], ) -skia_android_unit_test( +android_unit_test( name = "android_pathops_test", srcs = PATHOPS_TESTS, requires_resources_dir = True, @@ -356,7 +356,7 @@ skia_android_unit_test( ], ) -skia_android_unit_test( +android_unit_test( name = "android_cpu_only_test", srcs = CPU_ONLY_TESTS, # TODO(lovisolo): We might want to extract these --skip flags into a separate file. @@ -391,7 +391,7 @@ skia_android_unit_test( ], ) -skia_android_unit_test( +android_unit_test( name = "android_discardable_memory_test", srcs = DISCARDABLE_MEMORY_POOL_TESTS, flags = { diff --git a/tests/BackendAllocationTest.cpp b/tests/BackendAllocationTest.cpp index e3fa06d00343..c1edd6ada3b6 100644 --- a/tests/BackendAllocationTest.cpp +++ b/tests/BackendAllocationTest.cpp @@ -64,6 +64,7 @@ #endif #if defined(SK_GL) +#include "include/gpu/ganesh/gl/GrGLBackendSurface.h" #include "include/gpu/gl/GrGLInterface.h" #include "include/gpu/gl/GrGLTypes.h" #include "src/gpu/ganesh/gl/GrGLCaps.h" @@ -182,7 +183,7 @@ static bool isBGRA8(const GrBackendFormat& format) { switch (format.backend()) { case GrBackendApi::kOpenGL: #ifdef SK_GL - return format.asGLFormat() == GrGLFormat::kBGRA8; + return GrBackendFormats::AsGLFormat(format) == GrGLFormat::kBGRA8; #else return false; #endif @@ -235,7 +236,7 @@ static bool isRGB(const GrBackendFormat& format) { switch (format.backend()) { case GrBackendApi::kOpenGL: #ifdef SK_GL - return format.asGLFormat() == GrGLFormat::kRGB8; + return GrBackendFormats::AsGLFormat(format) == GrGLFormat::kRGB8; #else return false; #endif @@ -853,7 +854,7 @@ DEF_GANESH_TEST_FOR_ALL_GL_CONTEXTS(GLBackendAllocationTest, for (GrTextureType textureType : {GrTextureType::k2D, GrTextureType::kRectangle}) { GrGLenum target = textureType == GrTextureType::k2D ? GR_GL_TEXTURE_2D : GR_GL_TEXTURE_RECTANGLE; - GrBackendFormat format = GrBackendFormat::MakeGL(combo.fFormat, target); + GrBackendFormat format = GrBackendFormats::MakeGL(combo.fFormat, target); if (!glCaps->isFormatTexturable(format, textureType)) { continue; } diff --git a/tests/BezierCurveTest.cpp b/tests/BezierCurveTest.cpp index 3ac2a9d36a86..71d14d45afb1 100644 --- a/tests/BezierCurveTest.cpp +++ b/tests/BezierCurveTest.cpp @@ -12,6 +12,11 @@ #include "tests/Test.h" #include +#include +#include +#include +#include +#include #include // Grouping the test inputs into DoublePoints makes the test cases easier to read. @@ -191,3 +196,70 @@ DEF_TEST(QuadRoots_CheckTRange, reporter) { } } +// Since, Roots and EvalAt are separately unit tested, make sure that the parametric pramater t +// is correctly in range, and checked. +DEF_TEST(SkBezierCubic_CheckTRange, reporter) { + // Pick interesting numbers around 0 and 1. + const double interestingRoots[] = + {-10, -5, -2, -1, 0, 0.5, 1, 2, 5, 10}; + + // Interesting scales to make the quadratic. + const double interestingScales[] = + {-1000, -10, -1, -0.1, -0.0001, 0.0001, 0.1, 1, 10, 1000}; + + auto outsideTRange = [](double r) { + return r < 0 || 1 < r; + }; + + auto insideTRange = [&] (double r) { + return !outsideTRange(r); + }; + + auto specialEqual = [] (double actual, double test) { + // At least a floats worth of digits are correct. + const double errorFactor = std::numeric_limits::epsilon(); + return std::abs(test - actual) <= errorFactor * std::max(std::abs(test), std::abs(actual)); + }; + + for (double r2 : interestingRoots) { + for (double r1 : interestingRoots) { + for (double r0 : interestingRoots) { + for (double s : interestingScales) { + // Create a cubic using the roots r0, r1, and r2. + // s(x-r0)(x-r1)(x-r2) = s(x^3 - (r0+r1+r2)x^2 + (r0r1+r1r2+r0r2)x - r0r1r2) + const double A = s, + B = -s * (r0+r1+r2), + C = s * (r0*r1 + r1*r2 + r0*r2), + D = -s * r0 * r1 * r2; + + // Accumulate all the valid t's. + std::set inRangeRoots; + for (auto r : {r0, r1, r2}) { + if (insideTRange(r)) { + inRangeRoots.insert(r); + } + } + + float storage[3]; + // The X coefficients are set to return t's generated by root intersection. + // The offset is set to 0, because an arbitrary offset is essentially encoded + // in C. + auto intersections = + SkBezierCubic::Intersect(0, 0, 1, 0, A, B, C, D, 0, storage); + + size_t correct = 0; + for (auto candidate : intersections) { + for (auto answer : inRangeRoots) { + if (specialEqual(candidate, answer)) { + correct += 1; + break; + } + } + } + REPORTER_ASSERT(reporter, correct == intersections.size()); + } + } + } + } +} + diff --git a/tests/BigImageTest.cpp b/tests/BigImageTest.cpp index b39aeb5271d7..89af95083342 100644 --- a/tests/BigImageTest.cpp +++ b/tests/BigImageTest.cpp @@ -22,13 +22,13 @@ #include "include/core/SkRefCnt.h" #include "include/core/SkSamplingOptions.h" #include "include/core/SkScalar.h" +#include "include/core/SkSize.h" #include "include/core/SkStream.h" #include "include/core/SkString.h" #include "include/core/SkSurface.h" #include "include/core/SkTiledImageUtils.h" #include "include/encode/SkPngEncoder.h" #include "include/gpu/GpuTypes.h" -#include "include/gpu/GrDirectContext.h" #include "include/private/base/SkAssert.h" #include "src/core/SkSamplingPriv.h" #include "tests/Test.h" @@ -36,14 +36,31 @@ #include "tools/ToolUtils.h" #if defined(SK_GANESH) +#include "include/gpu/GrDirectContext.h" #include "include/gpu/ganesh/SkSurfaceGanesh.h" +#include "src/gpu/ganesh/GrDirectContextPriv.h" +#include "src/gpu/ganesh/GrResourceCache.h" +#include "src/gpu/ganesh/GrSurface.h" +#include "src/gpu/ganesh/GrTexture.h" #include "tests/CtsEnforcement.h" struct GrContextOptions; #endif +#if defined(SK_GRAPHITE) +#include "include/gpu/graphite/Context.h" +#include "include/gpu/graphite/Recorder.h" +#include "include/gpu/graphite/Surface.h" +#include "src/gpu/graphite/Caps.h" +#include "src/gpu/graphite/RecorderPriv.h" +#include "src/gpu/graphite/Texture.h" +#else +namespace skgpu { namespace graphite { class Recorder; } } +#endif + #include #include #include +#include #include extern int gOverrideMaxTextureSize; @@ -119,14 +136,16 @@ const char* get_sampling_str(const SkSamplingOptions& sampling) { } } -SkString create_label(const char* generator, +SkString create_label(GrDirectContext* dContext, + const char* generator, const SkSamplingOptions& sampling, int scale, int rot, SkCanvas::SrcRectConstraint constraint, int numTiles) { SkString label; - label.appendf("%s-%s-%d-%d-%s-%d", + label.appendf("%s-%s-%s-%d-%d-%s-%d", + dContext ? "ganesh" : "graphite", generator, get_sampling_str(sampling), scale, @@ -232,26 +251,31 @@ bool difficult_case(const SkSamplingOptions& sampling, return false; } -} // anonymous namespace - - -#if defined(SK_GANESH) - -DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS(BigImageTest_Ganesh, - reporter, - ctxInfo, - CtsEnforcement::kNever) { - auto dContext = ctxInfo.directContext(); - +// compare tiled and untiled draws - varying the parameters (e.g., sampling, rotation, fast vs. +// strict, etc). +void tiling_comparison_test(GrDirectContext* dContext, + skgpu::graphite::Recorder* recorder, + skiatest::Reporter* reporter) { // We're using the knowledge that the internal tile size is 1024. By creating kImageSize // sized images we know we'll get a 4x4 tiling regardless of the sampling. static const int kImageSize = 4096 - 4 * 2 * kBicubicFilterTexelPad; static const int kOverrideMaxTextureSize = 1024; - if (dContext->maxTextureSize() < kImageSize) { +#if defined(SK_GANESH) + if (dContext && dContext->maxTextureSize() < kImageSize) { // For the expected images we need to be able to draw w/o tiling return; } +#endif + +#if defined(SK_GRAPHITE) + if (recorder) { + const skgpu::graphite::Caps* caps = recorder->priv().caps(); + if (caps->maxTextureSize() < kImageSize) { + return; + } + } +#endif static const int kWhiteBandWidth = 4; const SkRect srcRect = SkRect::MakeIWH(kImageSize, kImageSize).makeInset(kWhiteBandWidth, @@ -263,7 +287,7 @@ DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS(BigImageTest_Ganesh, static const struct { GeneratorT fGen; const char* fTag; - } kGenerators[] = { { make_big_bitmap_image, "BM" }, + } kGenerators[] = { { make_big_bitmap_image, "BM" }, { make_big_picture_image, "Picture" } }; static const SkSamplingOptions kSamplingOptions[] = { @@ -276,6 +300,17 @@ DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS(BigImageTest_Ganesh, int numClippedTiles = 9; for (auto gen : kGenerators) { + if (recorder && !strcmp(gen.fTag, "Picture")) { + // In the picture-image case, the non-tiled code path draws the picture directly into a + // gpu-backed surface while the tiled code path the picture is draws the picture into + // a raster-backed surface. For Ganesh this works out, since both Ganesh and Raster + // support non-AA rect draws. For Graphite the results are very different (since + // Graphite always anti-aliases. Forcing all the rect draws to be AA doesn't work out + // since AA introduces too much variance between both of the gpu backends and Raster - + // which would obscure any errors introduced by tiling. + continue; + } + sk_sp img = (*gen.fGen)(kImageSize, kWhiteBandWidth, /* desiredLineWidth= */ 16, @@ -303,9 +338,21 @@ DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS(BigImageTest_Ganesh, expected.allocPixels(destII); actual.allocPixels(destII); - sk_sp surface = SkSurfaces::RenderTarget(dContext, - skgpu::Budgeted::kNo, - destII); + sk_sp surface; + +#if defined(SK_GANESH) + if (dContext) { + surface = SkSurfaces::RenderTarget(dContext, + skgpu::Budgeted::kNo, + destII); + } +#endif + +#if defined(SK_GRAPHITE) + if (recorder) { + surface = SkSurfaces::RenderTarget(recorder, destII); + } +#endif for (auto sampling : kSamplingOptions) { for (auto constraint : { SkCanvas::kStrict_SrcRectConstraint, @@ -314,7 +361,7 @@ DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS(BigImageTest_Ganesh, continue; } - SkString label = create_label(gen.fTag, sampling, scale, rot, + SkString label = create_label(dContext, gen.fTag, sampling, scale, rot, constraint, numDesiredTiles); SkCanvas* canvas = surface->getCanvas(); @@ -334,21 +381,29 @@ DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS(BigImageTest_Ganesh, gOverrideMaxTextureSize = 0; gNumTilesDrawn.store(0, std::memory_order_relaxed); + canvas->clear(SK_ColorBLACK); + canvas->save(); canvas->clipRect(clipRect); - canvas->clear(SK_ColorBLACK); SkTiledImageUtils::DrawImageRect(canvas, img, srcRect, destRect, - sampling, nullptr, constraint); + sampling, /* paint= */ nullptr, + constraint); SkAssertResult(surface->readPixels(expected, 0, 0)); int actualNumTiles = gNumTilesDrawn.load(std::memory_order_acquire); REPORTER_ASSERT(reporter, actualNumTiles == 0); + canvas->restore(); + // Then, force 4x4 tiling gOverrideMaxTextureSize = kOverrideMaxTextureSize; canvas->clear(SK_ColorBLACK); + canvas->save(); + canvas->clipRect(clipRect); + SkTiledImageUtils::DrawImageRect(canvas, img, srcRect, destRect, - sampling, nullptr, constraint); + sampling, /* paint= */ nullptr, + constraint); SkAssertResult(surface->readPixels(actual, 0, 0)); actualNumTiles = gNumTilesDrawn.load(std::memory_order_acquire); @@ -356,6 +411,8 @@ DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS(BigImageTest_Ganesh, "mismatch expected: %d actual: %d\n", numDesiredTiles, actualNumTiles); + canvas->restore(); + REPORTER_ASSERT(reporter, check_pixels(reporter, expected, actual, label, rot)); @@ -369,5 +426,134 @@ DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS(BigImageTest_Ganesh, } } +// In this test we draw the same bitmap-backed image twice and check that we only upload it once. +// Everything is set up for the bitmap-backed image to be split into 16 1024x1024 tiles. +void tiled_image_caching_test(GrDirectContext* dContext, + skgpu::graphite::Recorder* recorder, + skiatest::Reporter* reporter) { + static const int kImageSize = 4096; + static const int kOverrideMaxTextureSize = 1024; + static const SkISize kExpectedTileSize { kOverrideMaxTextureSize, kOverrideMaxTextureSize }; + + sk_sp img = make_big_bitmap_image(kImageSize, + /* whiteBandWidth= */ 0, + /* desiredLineWidth= */ 16, + /* desiredDepth= */ 7); + + auto destII = SkImageInfo::Make(kImageSize, kImageSize, + kRGBA_8888_SkColorType, + kPremul_SkAlphaType); + + SkBitmap readback; + readback.allocPixels(destII); + + sk_sp surface; + +#if defined(SK_GANESH) + if (dContext) { + surface = SkSurfaces::RenderTarget(dContext, skgpu::Budgeted::kNo, destII); + } +#endif + +#if defined(SK_GRAPHITE) + if (recorder) { + surface = SkSurfaces::RenderTarget(recorder, destII); + } +#endif + + if (!surface) { + return; + } + + SkCanvas* canvas = surface->getCanvas(); + + gOverrideMaxTextureSize = kOverrideMaxTextureSize; + + for (int i = 0; i < 2; ++i) { + canvas->clear(SK_ColorBLACK); + + SkTiledImageUtils::DrawImage(canvas, img, + /* x= */ 0, /* y= */ 0, + SkSamplingOptions(SkFilterMode::kNearest, SkMipmapMode::kNone), + /* paint= */ nullptr, + SkCanvas::kFast_SrcRectConstraint); + SkAssertResult(surface->readPixels(readback, 0, 0)); + } + + int numFound = 0; + +#if defined(SK_GANESH) + if (dContext) { + GrResourceCache* cache = dContext->priv().getResourceCache(); + + cache->visitSurfaces([&](const GrSurface* surf, bool /* purgeable */) { + const GrTexture* tex = surf->asTexture(); + if (tex && tex->dimensions() == kExpectedTileSize) { + ++numFound; + } + }); + } +#endif + +#if defined(SK_GRAPHITE) + if (recorder) { + skgpu::graphite::ResourceCache* cache = recorder->priv().resourceCache(); + + cache->visitTextures([&](const skgpu::graphite::Texture* tex, bool /* purgeable */) { + if (tex->dimensions() == kExpectedTileSize) { + ++numFound; + } + }); + } +#endif + + REPORTER_ASSERT(reporter, numFound == 16, "Expected: 16 Actual: %d", numFound); + + gOverrideMaxTextureSize = 0; +} + +} // anonymous namespace + +#if defined(SK_GANESH) + +DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS(BigImageTest_Ganesh, + reporter, + ctxInfo, + CtsEnforcement::kNever) { + auto dContext = ctxInfo.directContext(); + + tiling_comparison_test(dContext, /* recorder= */ nullptr, reporter); +} + +DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS(TiledDrawCacheTest_Ganesh, + reporter, + ctxInfo, + CtsEnforcement::kNever) { + auto dContext = ctxInfo.directContext(); + + tiled_image_caching_test(dContext, /* recorder= */ nullptr, reporter); +} #endif // SK_GANESH + +#if defined(SK_GRAPHITE) + +DEF_GRAPHITE_TEST_FOR_RENDERING_CONTEXTS(BigImageTest_Graphite, + reporter, + context) { + std::unique_ptr recorder = + context->makeRecorder(ToolUtils::CreateTestingRecorderOptions()); + + tiling_comparison_test(/* dContext= */ nullptr, recorder.get(), reporter); +} + +DEF_GRAPHITE_TEST_FOR_RENDERING_CONTEXTS(TiledDrawCacheTest_Graphite, + reporter, + context) { + std::unique_ptr recorder = + context->makeRecorder(ToolUtils::CreateTestingRecorderOptions()); + + tiled_image_caching_test(/* dContext= */ nullptr, recorder.get(), reporter); +} + +#endif // SK_GRAPHITE diff --git a/tests/BlitMaskClip.cpp b/tests/BlitMaskClip.cpp index 8c4b1d4186d8..06c2e83e42c3 100644 --- a/tests/BlitMaskClip.cpp +++ b/tests/BlitMaskClip.cpp @@ -50,13 +50,7 @@ DEF_TEST(BlitAndClip, reporter) { memset(bits, 0xAA, rowBytes * height); SkIRect b = {originX, originY, originX + width, originY + height}; - - SkMask mask; - mask.fFormat = SkMask::kBW_Format; - mask.fBounds = b; - mask.fImage = (uint8_t*)bits; - mask.fRowBytes = rowBytes; - + SkMask mask(bits, b, rowBytes, SkMask::kBW_Format); TestBlitter tb(mask.fBounds, reporter); for (int top = b.fTop; top < b.fBottom; top++) { diff --git a/tests/BlurTest.cpp b/tests/BlurTest.cpp index e89c0f7b3d21..253e5a39ef68 100644 --- a/tests/BlurTest.cpp +++ b/tests/BlurTest.cpp @@ -34,10 +34,10 @@ #include "include/private/base/SkTPin.h" #include "src/base/SkMathPriv.h" #include "src/core/SkBlurMask.h" -#include "src/core/SkGpuBlurUtils.h" #include "src/core/SkMask.h" #include "src/core/SkMaskFilterBase.h" #include "src/effects/SkEmbossMaskFilter.h" +#include "src/gpu/ganesh/GrBlurUtils.h" #include "tests/CtsEnforcement.h" #include "tests/Test.h" #include "tools/ToolUtils.h" @@ -181,14 +181,14 @@ DEF_TEST(BlurDrawing, reporter) { static void ground_truth_2d(int width, int height, SkScalar sigma, int* result, int resultCount) { - SkMask src, dst; + SkMaskBuilder src, dst; - src.fBounds.setWH(width, height); - src.fFormat = SkMask::kA8_Format; - src.fRowBytes = src.fBounds.width(); - src.fImage = SkMask::AllocImage(src.computeTotalImageSize()); + src.bounds().setWH(width, height); + src.format() = SkMask::kA8_Format; + src.rowBytes() = src.fBounds.width(); + src.image() = SkMaskBuilder::AllocImage(src.computeTotalImageSize()); - memset(src.fImage, 0xff, src.computeTotalImageSize()); + memset(src.image(), 0xff, src.computeTotalImageSize()); if (!SkBlurMask::BlurGroundTruth(sigma, &dst, src, kNormal_SkBlurStyle)) { return; @@ -207,8 +207,8 @@ static void ground_truth_2d(int width, int height, result[i] = 0; } - SkMask::FreeImage(src.fImage); - SkMask::FreeImage(dst.fImage); + SkMaskBuilder::FreeImage(src.image()); + SkMaskBuilder::FreeImage(dst.image()); } // Implement a step function that is 255 between min and max; 0 elsewhere. @@ -443,10 +443,10 @@ DEF_TEST(BlurredRRectNinePatchComputation, reporter) { bool ninePatchable; SkRRect rrectToDraw; SkISize size; - SkScalar rectXs[SkGpuBlurUtils::kBlurRRectMaxDivisions], - rectYs[SkGpuBlurUtils::kBlurRRectMaxDivisions]; - SkScalar texXs[SkGpuBlurUtils::kBlurRRectMaxDivisions], - texYs[SkGpuBlurUtils::kBlurRRectMaxDivisions]; + SkScalar rectXs[GrBlurUtils::kBlurRRectMaxDivisions], + rectYs[GrBlurUtils::kBlurRRectMaxDivisions]; + SkScalar texXs[GrBlurUtils::kBlurRRectMaxDivisions], + texYs[GrBlurUtils::kBlurRRectMaxDivisions]; // not nine-patchable { @@ -455,7 +455,7 @@ DEF_TEST(BlurredRRectNinePatchComputation, reporter) { SkRRect rr; rr.setRectRadii(r, radii); - ninePatchable = SkGpuBlurUtils::ComputeBlurredRRectParams(rr, rr, kBlurRad, kBlurRad, + ninePatchable = GrBlurUtils::ComputeBlurredRRectParams(rr, rr, kBlurRad, kBlurRad, &rrectToDraw, &size, rectXs, rectYs, texXs, texYs); REPORTER_ASSERT(reporter, !ninePatchable); @@ -467,7 +467,7 @@ DEF_TEST(BlurredRRectNinePatchComputation, reporter) { SkRRect rr; rr.setRectXY(r, kCornerRad, kCornerRad); - ninePatchable = SkGpuBlurUtils::ComputeBlurredRRectParams(rr, rr, kBlurRad, kBlurRad, + ninePatchable = GrBlurUtils::ComputeBlurredRRectParams(rr, rr, kBlurRad, kBlurRad, &rrectToDraw, &size, rectXs, rectYs, texXs, texYs); @@ -484,7 +484,7 @@ DEF_TEST(BlurredRRectNinePatchComputation, reporter) { SkRRect rr; rr.setRectXY(r, kXCornerRad, kYCornerRad); - ninePatchable = SkGpuBlurUtils::ComputeBlurredRRectParams(rr, rr, kBlurRad, kBlurRad, + ninePatchable = GrBlurUtils::ComputeBlurredRRectParams(rr, rr, kBlurRad, kBlurRad, &rrectToDraw, &size, rectXs, rectYs, texXs, texYs); diff --git a/tests/CanvasTest.cpp b/tests/CanvasTest.cpp index e497196a1792..13a255768068 100644 --- a/tests/CanvasTest.cpp +++ b/tests/CanvasTest.cpp @@ -55,6 +55,10 @@ using namespace skia_private; class SkPicture; class SkReadBuffer; +namespace skif { +class Context; +} + #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK #include "include/core/SkColorSpace.h" #include "include/private/SkColorData.h" @@ -364,42 +368,26 @@ static CanvasTest kCanvasTests[] = { c->restoreToCount(baseSaveCount + 1); REPORTER_ASSERT(r, baseSaveCount + 1 == c->getSaveCount()); - // should this pin to 1, or be a no-op, or crash? - c->restoreToCount(0); - REPORTER_ASSERT(r, 1 == c->getSaveCount()); + // should this pin to 1, or be a no-op, or crash? + c->restoreToCount(0); + REPORTER_ASSERT(r, 1 == c->getSaveCount()); }, [](SkCanvas* c, skiatest::Reporter* r) { - // This test step challenges the TestDeferredCanvasStateConsistency - // test cases because the opaque paint can trigger an optimization - // that discards previously recorded commands. The challenge is to maintain - // correct clip and matrix stack state. - c->resetMatrix(); - c->rotate(SkIntToScalar(30)); - c->save(); - c->translate(SkIntToScalar(2), SkIntToScalar(1)); - c->save(); - c->scale(SkIntToScalar(3), SkIntToScalar(3)); - SkPaint paint; - paint.setColor(0xFFFFFFFF); - c->drawPaint(paint); - c->restore(); - c->restore(); - }, - [](SkCanvas* c, skiatest::Reporter* r) { - // This test step challenges the TestDeferredCanvasStateConsistency - // test case because the canvas flush on a deferred canvas will - // reset the recording session. The challenge is to maintain correct - // clip and matrix stack state on the playback canvas. - c->resetMatrix(); - c->rotate(SkIntToScalar(30)); - c->save(); - c->translate(SkIntToScalar(2), SkIntToScalar(1)); - c->save(); - c->scale(SkIntToScalar(3), SkIntToScalar(3)); - c->drawRect(kRect, SkPaint()); - c->flush(); - c->restore(); - c->restore(); + // This test step challenges the TestDeferredCanvasStateConsistency + // test cases because the opaque paint can trigger an optimization + // that discards previously recorded commands. The challenge is to maintain + // correct clip and matrix stack state. + c->resetMatrix(); + c->rotate(SkIntToScalar(30)); + c->save(); + c->translate(SkIntToScalar(2), SkIntToScalar(1)); + c->save(); + c->scale(SkIntToScalar(3), SkIntToScalar(3)); + SkPaint paint; + paint.setColor(0xFFFFFFFF); + c->drawPaint(paint); + c->restore(); + c->restore(); }, [](SkCanvas* c, skiatest::Reporter* r) { SkPoint pts[4]; @@ -639,7 +627,7 @@ class ZeroBoundsImageFilter : public SkImageFilter_Base { static sk_sp Make() { return sk_sp(new ZeroBoundsImageFilter); } protected: - sk_sp onFilterImage(const Context&, SkIPoint*) const override { + sk_sp onFilterImage(const skif::Context&, SkIPoint*) const override { return nullptr; } SkIRect onFilterNodeBounds(const SkIRect&, const SkMatrix&, diff --git a/tests/ColorFilterTest.cpp b/tests/ColorFilterTest.cpp index 4c474ccff027..35bf8f9651b2 100644 --- a/tests/ColorFilterTest.cpp +++ b/tests/ColorFilterTest.cpp @@ -6,6 +6,7 @@ */ #include "include/core/SkAlphaType.h" +#include "include/core/SkBitmap.h" #include "include/core/SkBlendMode.h" #include "include/core/SkCanvas.h" #include "include/core/SkColor.h" @@ -15,6 +16,7 @@ #include "include/core/SkPaint.h" #include "include/core/SkPoint.h" #include "include/core/SkRefCnt.h" +#include "include/core/SkShader.h" #include "include/core/SkSurface.h" #include "include/core/SkTileMode.h" #include "include/core/SkTypes.h" @@ -39,11 +41,6 @@ class SkFlattenable; struct GrContextOptions; struct SkStageRec; -#if defined(SK_ENABLE_SKVM) -#include "src/core/SkVM.h" -class SkArenaAlloc; -#endif - static sk_sp reincarnate_colorfilter(SkFlattenable* obj) { SkBinaryWriteBuffer wb; wb.writeFlattenable(obj); @@ -153,16 +150,6 @@ DEF_TEST(WorkingFormatFilterFlags, r) { } struct FailureColorFilter final : public SkColorFilterBase { -#if defined(SK_ENABLE_SKVM) - skvm::Color onProgram(skvm::Builder*, - skvm::Color c, - const SkColorInfo&, - skvm::Uniforms*, - SkArenaAlloc*) const override { - return {}; - } -#endif - SkColorFilterBase::Type type() const override { return SkColorFilterBase::Type::kNoop; } bool appendStages(const SkStageRec&, bool) const override { return false; } @@ -175,7 +162,7 @@ struct FailureColorFilter final : public SkColorFilterBase { DEF_GANESH_TEST_FOR_ALL_CONTEXTS(ComposeFailureWithInputElision, r, ctxInfo, - CtsEnforcement::kApiLevel_T) { + CtsEnforcement::kApiLevel_U) { SkImageInfo info = SkImageInfo::MakeN32Premul(8, 8); auto surface = SkSurfaces::RenderTarget(ctxInfo.directContext(), skgpu::Budgeted::kNo, info); SkPaint paint; @@ -197,3 +184,19 @@ DEF_GANESH_TEST_FOR_ALL_CONTEXTS(ComposeFailureWithInputElision, // At one time, this would trigger a use-after-free / crash, when converting the paint to FPs: surface->getCanvas()->drawPaint(paint); } + +DEF_TEST(ColorFilter_OpaqueShaderPaintAlpha, r) { + // skbug.com/14627: Prior to the fix, CPU backend would produce gray, not white. (It told the + // color filter that the shader output was opaque, ignoring the effect of paint alpha). + SkPaint paint; + paint.setShader(SkShaders::Color(SK_ColorWHITE)); + paint.setAlphaf(0.5f); + paint.setColorFilter(SkColorFilters::SRGBToLinearGamma()); + + SkBitmap bmp; + bmp.allocN32Pixels(1, 1); + SkCanvas canvas(bmp); + canvas.drawColor(SK_ColorWHITE); + canvas.drawPaint(paint); + REPORTER_ASSERT(r, bmp.getColor(0, 0) == SK_ColorWHITE); +} diff --git a/tests/DMSAATest.cpp b/tests/DMSAATest.cpp index 6f642e899366..9489fbf4fe5c 100644 --- a/tests/DMSAATest.cpp +++ b/tests/DMSAATest.cpp @@ -36,7 +36,6 @@ #include "include/private/SkColorData.h" #include "include/private/gpu/ganesh/GrTypesPriv.h" #include "src/core/SkBlendModePriv.h" -#include "src/core/SkMatrixProvider.h" #include "src/gpu/SkBackingFit.h" #include "src/gpu/ganesh/GrPaint.h" #include "src/gpu/ganesh/GrPixmap.h" @@ -83,7 +82,7 @@ static void draw_paint_with_dmsaa(skgpu::ganesh::SurfaceDrawContext* sdc, GrPaint paint; paint.setColor4f(color); paint.setXPFactory(GrXPFactory::FromBlendMode(blendMode)); - sdc->drawVertices(nullptr, std::move(paint), SkMatrixProvider(SkMatrix::I()), vertices); + sdc->drawVertices(nullptr, std::move(paint), SkMatrix::I(), vertices); } static bool fuzzy_equals(const float a[4], const SkPMColor4f& b) { diff --git a/tests/DeferredDisplayListTest.cpp b/tests/DeferredDisplayListTest.cpp index 2c48b9527e33..afdf1ec825f4 100644 --- a/tests/DeferredDisplayListTest.cpp +++ b/tests/DeferredDisplayListTest.cpp @@ -52,6 +52,7 @@ class SkImage; struct GrContextOptions; #ifdef SK_GL +#include "include/gpu/ganesh/gl/GrGLBackendSurface.h" #include "include/gpu/gl/GrGLTypes.h" #include "src/gpu/ganesh/gl/GrGLDefines.h" #endif @@ -246,7 +247,8 @@ class SurfaceParameters { fboInfo.fFormat = GR_GL_RGBA8; fboInfo.fProtected = skgpu::Protected::kNo; static constexpr int kStencilBits = 8; - GrBackendRenderTarget backendRT(fWidth, fHeight, 1, kStencilBits, fboInfo); + GrBackendRenderTarget backendRT = + GrBackendRenderTargets::MakeGL(fWidth, fHeight, 1, kStencilBits, fboInfo); if (!backendRT.isValid()) { return nullptr; @@ -643,7 +645,7 @@ DEF_GANESH_TEST_FOR_GL_RENDERING_CONTEXTS(CharacterizationFBO0nessTest, sk_sp proxy = context->threadSafeProxy(); const size_t resourceCacheLimit = context->getResourceCacheLimit(); - GrBackendFormat format = GrBackendFormat::MakeGL(GR_GL_RGBA8, GR_GL_TEXTURE_2D); + GrBackendFormat format = GrBackendFormats::MakeGL(GR_GL_RGBA8, GR_GL_TEXTURE_2D); int availableSamples = caps->getRenderTargetSampleCount(4, format); if (availableSamples <= 1) { @@ -682,7 +684,8 @@ DEF_GANESH_TEST_FOR_GL_RENDERING_CONTEXTS(CharacterizationFBO0nessTest, SkASSERT(characterizations[index].usesGLFBO0() == isFBO0); GrGLFramebufferInfo fboInfo{ isFBO0 ? 0 : (GrGLuint) 1, GR_GL_RGBA8 }; - GrBackendRenderTarget backendRT(128, 128, numSamples, kStencilBits, fboInfo); + GrBackendRenderTarget backendRT = + GrBackendRenderTargets::MakeGL(128, 128, numSamples, kStencilBits, fboInfo); SkAssertResult(backendRT.isValid()); surfaces[index] = SkSurfaces::WrapBackendRenderTarget(context, @@ -1263,7 +1266,7 @@ DEF_GANESH_TEST_FOR_GL_RENDERING_CONTEXTS(DDLTextureFlagsTest, for (GrGLenum target : { GR_GL_TEXTURE_EXTERNAL, GR_GL_TEXTURE_RECTANGLE, GR_GL_TEXTURE_2D } ) { for (auto mipmapped : { GrMipmapped::kNo, GrMipmapped::kYes }) { - GrBackendFormat format = GrBackendFormat::MakeGL(GR_GL_RGBA8, target); + GrBackendFormat format = GrBackendFormats::MakeGL(GR_GL_RGBA8, target); sk_sp image = SkImages::PromiseTextureFrom( recorder.getCanvas()->recordingContext()->threadSafeProxy(), diff --git a/tests/DeviceTest.cpp b/tests/DeviceTest.cpp index 8c99ff125e22..3a092acb90ad 100644 --- a/tests/DeviceTest.cpp +++ b/tests/DeviceTest.cpp @@ -106,7 +106,7 @@ DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS(SpecialImage_GPUDevice, // Create a gpu-backed special image from a raster-backed SkBitmap sk_sp special = DeviceTestingAccess::MakeSpecial(device.get(), bm); - SkASSERT(special->isTextureBacked()); + SkASSERT(special->isGaneshBacked()); SkASSERT(kWidth == special->width()); SkASSERT(kHeight == special->height()); SkASSERT(bm.getGenerationID() == special->uniqueID()); @@ -115,7 +115,7 @@ DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS(SpecialImage_GPUDevice, // Create a gpu-backed special image from a raster-backed SkImage sk_sp image(bm.asImage()); special = DeviceTestingAccess::MakeSpecial(device.get(), image.get()); - SkASSERT(special->isTextureBacked()); + SkASSERT(special->isGaneshBacked()); SkASSERT(kWidth == special->width()); SkASSERT(kHeight == special->height()); // TODO: Hmmm, this is a bit unexpected @@ -125,7 +125,7 @@ DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS(SpecialImage_GPUDevice, // Create a gpu-backed special image from a gpu-backed SkImage image = SkImages::TextureFromImage(dContext, image); special = DeviceTestingAccess::MakeSpecial(device.get(), image.get()); - SkASSERT(special->isTextureBacked()); + SkASSERT(special->isGaneshBacked()); SkASSERT(kWidth == special->width()); SkASSERT(kHeight == special->height()); SkASSERT(image->uniqueID() == special->uniqueID()); @@ -133,7 +133,7 @@ DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS(SpecialImage_GPUDevice, // Snap the device as a gpu-backed special image special = DeviceTestingAccess::SnapSpecial(device.get()); - SkASSERT(special->isTextureBacked()); + SkASSERT(special->isGaneshBacked()); SkASSERT(2*kWidth == special->width()); SkASSERT(2*kHeight == special->height()); SkASSERT(SkIRect::MakeWH(2*kWidth, 2*kHeight) == special->subset()); diff --git a/tests/DrawOpAtlasTest.cpp b/tests/DrawOpAtlasTest.cpp index 9828b2463984..12ebe39571de 100644 --- a/tests/DrawOpAtlasTest.cpp +++ b/tests/DrawOpAtlasTest.cpp @@ -20,7 +20,6 @@ #include "include/gpu/GrDirectContext.h" #include "include/gpu/GrTypes.h" #include "include/private/gpu/ganesh/GrTypesPriv.h" -#include "src/core/SkMatrixProvider.h" #include "src/gpu/AtlasTypes.h" #include "src/gpu/SkBackingFit.h" #include "src/gpu/ganesh/GrCaps.h" @@ -226,10 +225,9 @@ DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS(GrAtlasTextOpPreparation, font.setEdging(SkFont::Edging::kAlias); const char* text = "a"; - SkMatrixProvider matrixProvider(SkMatrix::I()); GrOp::Owner op = AtlasTextOp::CreateOpTestingOnly(sdc.get(), paint, - font, matrixProvider, + font, SkMatrix::I(), text, 16, 16); if (!op) { return; diff --git a/tests/EGLImageTest.cpp b/tests/EGLImageTest.cpp index b60ad030e9b7..29103d2e11f3 100644 --- a/tests/EGLImageTest.cpp +++ b/tests/EGLImageTest.cpp @@ -19,6 +19,7 @@ #include "include/gpu/GrBackendSurface.h" #include "include/gpu/GrDirectContext.h" #include "include/gpu/GrTypes.h" +#include "include/gpu/ganesh/gl/GrGLBackendSurface.h" #include "include/gpu/gl/GrGLFunctions.h" #include "include/gpu/gl/GrGLInterface.h" #include "include/gpu/gl/GrGLTypes.h" @@ -134,7 +135,7 @@ DEF_GANESH_TEST_FOR_GL_RENDERING_CONTEXTS(EGLImageTest, } GrGLTextureInfo texInfo; - if (!mbet->texture().getGLTextureInfo(&texInfo)) { + if (!GrBackendTextures::GetGLTextureInfo(mbet->texture(), &texInfo)) { ERRORF(reporter, "Failed to get GrGLTextureInfo"); return; } @@ -189,7 +190,8 @@ DEF_GANESH_TEST_FOR_GL_RENDERING_CONTEXTS(EGLImageTest, } // Wrap this texture ID in a GrTexture - GrBackendTexture backendTex(kSize, kSize, GrMipmapped::kNo, externalTexture); + GrBackendTexture backendTex = + GrBackendTextures::MakeGL(kSize, kSize, GrMipmapped::kNo, externalTexture); GrColorInfo colorInfo(GrColorType::kRGBA_8888, kPremul_SkAlphaType, nullptr); // TODO: If I make this TopLeft origin to match resolve_origin calls for kDefault, this test diff --git a/tests/FilterResultTest.cpp b/tests/FilterResultTest.cpp index 7ad172dead82..d883dfa07ca0 100644 --- a/tests/FilterResultTest.cpp +++ b/tests/FilterResultTest.cpp @@ -33,15 +33,18 @@ #include "include/private/base/SkTArray.h" #include "include/private/base/SkTo.h" #include "src/core/SkImageFilterTypes.h" +#include "src/core/SkMatrixPriv.h" #include "src/core/SkRectPriv.h" #include "src/core/SkSpecialImage.h" #include "src/core/SkSpecialSurface.h" #include "src/effects/colorfilters/SkColorFilterBase.h" +#include "src/gpu/ganesh/image/GrImageUtils.h" #include "tests/CtsEnforcement.h" #include "tests/Test.h" #include "tests/TestUtils.h" #include +#include #include #include #include @@ -53,7 +56,9 @@ using namespace skia_private; #if defined(SK_GRAPHITE) #include "include/gpu/graphite/Context.h" #include "src/gpu/graphite/ContextPriv.h" +#include "src/gpu/graphite/ImageUtils.h" #include "src/gpu/graphite/RecorderPriv.h" +#include "src/gpu/graphite/SpecialImage_Graphite.h" #include "src/gpu/graphite/TextureProxyView.h" #endif @@ -61,6 +66,7 @@ using namespace skia_private; #if defined(SK_GANESH) #include "include/gpu/GrDirectContext.h" #include "include/gpu/GrTypes.h" +#include "src/gpu/ganesh/image/SkSpecialImage_Ganesh.h" struct GrContextOptions; #endif @@ -126,7 +132,7 @@ class FilterResultImageResolver { canvas->drawPaint(paint); } else { SkASSERT(fMethod == Method::kDrawToCanvas); - image.draw(canvas); + image.draw(canvas, ctx.desiredOutput()); } return {surface->makeImageSnapshot(), SkIPoint(ctx.desiredOutput().topLeft())}; @@ -164,6 +170,11 @@ bool colorfilter_equals(const SkColorFilter* actual, const SkColorFilter* expect return actualData && actualData->equals(expectedData.get()); } +static constexpr SkTileMode kTileModes[4] = {SkTileMode::kClamp, + SkTileMode::kRepeat, + SkTileMode::kMirror, + SkTileMode::kDecal}; + enum class Expect { kDeferredImage, // i.e. modified properties of FilterResult instead of rendering kNewImage, // i.e. rendered a new image before modifying other properties @@ -177,7 +188,10 @@ class ApplyAction { }; struct CropParams { LayerSpace fRect; - // SkTileMode fTileMode; + SkTileMode fTileMode; + // Sometimes the expected bounds due to cropping and tiling are too hard to automate with + // simple test code. + std::optional> fExpectedBounds; }; public: @@ -185,28 +199,36 @@ class ApplyAction { const SkSamplingOptions& sampling, Expect expectation, const SkSamplingOptions& expectedSampling, + SkTileMode expectedTileMode, sk_sp expectedColorFilter) : fAction{TransformParams{LayerSpace(transform), sampling}} , fExpectation(expectation) , fExpectedSampling(expectedSampling) + , fExpectedTileMode(expectedTileMode) , fExpectedColorFilter(std::move(expectedColorFilter)) {} ApplyAction(const SkIRect& cropRect, + SkTileMode tileMode, + std::optional> expectedBounds, Expect expectation, const SkSamplingOptions& expectedSampling, + SkTileMode expectedTileMode, sk_sp expectedColorFilter) - : fAction{CropParams{LayerSpace(cropRect)}} + : fAction{CropParams{LayerSpace(cropRect), tileMode, expectedBounds}} , fExpectation(expectation) , fExpectedSampling(expectedSampling) + , fExpectedTileMode(expectedTileMode) , fExpectedColorFilter(std::move(expectedColorFilter)) {} ApplyAction(sk_sp colorFilter, Expect expectation, const SkSamplingOptions& expectedSampling, + SkTileMode expectedTileMode, sk_sp expectedColorFilter) : fAction(std::move(colorFilter)) , fExpectation(expectation) , fExpectedSampling(expectedSampling) + , fExpectedTileMode(expectedTileMode) , fExpectedColorFilter(std::move(expectedColorFilter)) {} // Test-simplified logic for bounds propagation similar to how image filters calculate bounds @@ -218,7 +240,7 @@ class ApplyAction { ? out : LayerSpace::Empty(); } else if (auto* c = std::get_if(&fAction)) { LayerSpace intersection = c->fRect; - if (!intersection.intersect(desiredOutput)) { + if (c->fTileMode == SkTileMode::kDecal && !intersection.intersect(desiredOutput)) { intersection = LayerSpace::Empty(); } return intersection; @@ -233,7 +255,7 @@ class ApplyAction { if (auto* t = std::get_if(&fAction)) { return in.applyTransform(ctx, t->fMatrix, t->fSampling); } else if (auto* c = std::get_if(&fAction)) { - return in.applyCrop(ctx, c->fRect); + return in.applyCrop(ctx, c->fRect, c->fTileMode); } else if (auto* cf = std::get_if>(&fAction)) { return in.applyColorFilter(ctx, *cf); } @@ -242,6 +264,7 @@ class ApplyAction { Expect expectation() const { return fExpectation; } const SkSamplingOptions& expectedSampling() const { return fExpectedSampling; } + SkTileMode expectedTileMode() const { return fExpectedTileMode; } const SkColorFilter* expectedColorFilter() const { return fExpectedColorFilter.get(); } LayerSpace expectedBounds(const LayerSpace& inputBounds) const { @@ -252,11 +275,16 @@ class ApplyAction { } return t->fMatrix.mapRect(inputBounds); } else if (auto* c = std::get_if(&fAction)) { + if (c->fExpectedBounds) { + return *c->fExpectedBounds; + } + LayerSpace intersection = c->fRect; if (!intersection.intersect(inputBounds)) { - intersection = LayerSpace::Empty(); + return LayerSpace::Empty(); } - return intersection; + return c->fTileMode == SkTileMode::kDecal + ? intersection : LayerSpace(SkRectPriv::MakeILarge()); } else if (auto* cf = std::get_if>(&fAction)) { if (as_CFB(*cf)->affectsTransparentBlack()) { // Fills out infinitely @@ -270,13 +298,15 @@ class ApplyAction { sk_sp renderExpectedImage(const Context& ctx, sk_sp source, - const LayerSpace& origin, + LayerSpace origin, const LayerSpace& desiredOutput) const { SkASSERT(source); + Expect effectiveExpectation = fExpectation; SkISize size(desiredOutput.size()); if (desiredOutput.isEmpty()) { size = {1, 1}; + effectiveExpectation = Expect::kEmptyImage; } auto surface = ctx.makeSurface(size); @@ -290,12 +320,13 @@ class ApplyAction { canvas->clipIRect(SkIRect(expectedBounds), SkClipOp::kIntersect); - if (fExpectation != Expect::kEmptyImage) { + if (effectiveExpectation != Expect::kEmptyImage) { SkPaint paint; paint.setAntiAlias(true); paint.setBlendMode(SkBlendMode::kSrc); // Start with NN to match exact subsetting FilterResult does for deferred images SkSamplingOptions sampling = {}; + SkTileMode tileMode = SkTileMode::kDecal; if (auto* t = std::get_if(&fAction)) { SkMatrix m{t->fMatrix}; // FilterResult treats default/bilerp filtering as NN when it has an integer @@ -307,11 +338,32 @@ class ApplyAction { } canvas->concat(m); } else if (auto* c = std::get_if(&fAction)) { - canvas->clipIRect(SkIRect(c->fRect)); + LayerSpace imageBounds( + SkIRect::MakeXYWH(origin.x(), origin.y(), + source->width(), source->height())); + if (c->fTileMode == SkTileMode::kDecal || imageBounds.contains(c->fRect)) { + // Extract a subset of the image + SkAssertResult(imageBounds.intersect(c->fRect)); + source = source->makeSubset({imageBounds.left() - origin.x(), + imageBounds.top() - origin.y(), + imageBounds.right() - origin.x(), + imageBounds.bottom() - origin.y()}); + origin = imageBounds.topLeft(); + } else { + // A non-decal tile mode where the image doesn't cover the crop requires the + // image to be padded out with transparency so the tiling matches 'fRect'. + auto paddedSurface = ctx.makeSurface(SkISize(c->fRect.size())); + paddedSurface->getCanvas()->clear(SK_ColorTRANSPARENT); + paddedSurface->getCanvas()->translate(-c->fRect.left(), -c->fRect.top()); + source->draw(paddedSurface->getCanvas(), origin.x(), origin.y()); + source = paddedSurface->makeImageSnapshot(); + origin = c->fRect.topLeft(); + } + tileMode = c->fTileMode; } else if (auto* cf = std::get_if>(&fAction)) { paint.setColorFilter(*cf); } - paint.setShader(source->asShader(SkTileMode::kDecal, + paint.setShader(source->asShader(tileMode, sampling, SkMatrix::Translate(origin.x(), origin.y()))); canvas->drawPaint(paint); @@ -329,6 +381,7 @@ class ApplyAction { // Expectation Expect fExpectation; SkSamplingOptions fExpectedSampling; + SkTileMode fExpectedTileMode; sk_sp fExpectedColorFilter; // The expected desired outputs and layer bounds are calculated automatically based on the // action type and parameters to simplify test case specification. @@ -364,17 +417,17 @@ class TestRunner { kPremul_SkAlphaType); #if defined(SK_GANESH) if (fDirectContext) { - return SkSpecialSurface::MakeRenderTarget(fDirectContext, info, {}, + return SkSpecialSurfaces::MakeRenderTarget(fDirectContext, info, {}, kTopLeft_GrSurfaceOrigin); } else #endif #if defined(SK_GRAPHITE) if (fRecorder) { - return SkSpecialSurface::MakeGraphite(fRecorder, info, {}); + return SkSpecialSurfaces::MakeGraphite(fRecorder, info, {}); } else #endif { - return SkSpecialSurface::MakeRaster(info, {}); + return SkSpecialSurfaces::MakeRaster(info, {}); } } @@ -388,12 +441,12 @@ class TestRunner { /*cache=*/nullptr}; #if defined(SK_GANESH) if (fDirectContext) { - return skif::Context::MakeGanesh(fDirectContext, kTopLeft_GrSurfaceOrigin, ctxInfo); + return skif::MakeGaneshContext(fDirectContext, kTopLeft_GrSurfaceOrigin, ctxInfo); } else #endif #if defined(SK_GRAPHITE) if (fRecorder) { - return skif::Context::MakeGraphite(fRecorder, ctxInfo); + return skif::MakeGraphiteContext(fRecorder, ctxInfo); } else #endif { @@ -582,7 +635,7 @@ class TestRunner { #if defined(SK_GANESH) if (fDirectContext) { // Ganesh backed, just use the SkImage::readPixels API - SkASSERT(specialImage->isTextureBacked()); + SkASSERT(specialImage->isGaneshBacked()); sk_sp image = specialImage->asImage(); SkAssertResult(image->readPixels(fDirectContext, bm.pixmap(), srcX, srcY)); } else @@ -591,7 +644,7 @@ class TestRunner { if (fRecorder) { // Graphite backed, so use the private testing-only synchronous API SkASSERT(specialImage->isGraphiteBacked()); - auto view = specialImage->textureProxyView(); + auto view = SkSpecialImages::AsTextureProxyView(specialImage); auto proxyII = ii.makeWH(view.width(), view.height()); SkAssertResult(fRecorder->priv().context()->priv().readPixels( bm.pixmap(), view.proxy(), proxyII, srcX, srcY)); @@ -653,19 +706,34 @@ class TestCase { : fRunner(runner) , fName(name) , fSourceBounds(LayerSpace::Empty()) - , fSourceColor(SkColors::kTransparent) , fDesiredOutput(LayerSpace::Empty()) {} - TestCase& source(const SkIRect& bounds, const SkColor4f& color) { + TestCase& source(const SkIRect& bounds) { fSourceBounds = LayerSpace(bounds); - fSourceColor = color; return *this; } + + TestCase& applyCrop(const SkIRect& crop, Expect expectation) { + return this->applyCrop(crop, SkTileMode::kDecal, expectation); + } + TestCase& applyCrop(const SkIRect& crop, - Expect expectation) { - fActions.emplace_back(crop, expectation, + SkTileMode tileMode, + Expect expectation, + std::optional expectedTileMode = {}, + std::optional expectedBounds = {}) { + // Fill-in automated expectations, which is to equal 'tileMode' when not overridden. + if (!expectedTileMode) { + expectedTileMode = tileMode; + } + std::optional> expectedLayerBounds; + if (expectedBounds) { + expectedLayerBounds = LayerSpace(*expectedBounds); + } + fActions.emplace_back(crop, tileMode, expectedLayerBounds, expectation, this->getDefaultExpectedSampling(expectation), + *expectedTileMode, this->getDefaultExpectedColorFilter(expectation)); return *this; } @@ -684,6 +752,8 @@ class TestCase { expectedSampling = sampling; } fActions.emplace_back(matrix, sampling, expectation, *expectedSampling, + this->getDefaultExpectedTileMode(expectation, + /*cfAffectsTransparency=*/false), this->getDefaultExpectedColorFilter(expectation)); return *this; } @@ -698,8 +768,10 @@ class TestCase { expectedColorFilter = SkColorFilters::Compose( colorFilter, this->getDefaultExpectedColorFilter(expectation)); } + const bool affectsTransparent = as_CFB(colorFilter)->affectsTransparentBlack(); fActions.emplace_back(std::move(colorFilter), expectation, this->getDefaultExpectedSampling(expectation), + this->getDefaultExpectedTileMode(expectation, affectsTransparent), std::move(*expectedColorFilter)); return *this; } @@ -749,7 +821,34 @@ class TestCase { if (!fSourceBounds.isEmpty()) { sk_sp sourceSurface = fRunner.newSurface(fSourceBounds.width(), fSourceBounds.height()); - sourceSurface->getCanvas()->clear(fSourceColor); + + const SkColor colors[] = { SK_ColorMAGENTA, + SK_ColorRED, + SK_ColorYELLOW, + SK_ColorGREEN, + SK_ColorCYAN, + SK_ColorBLUE }; + SkMatrix rotation = SkMatrix::RotateDeg(15.f, {fSourceBounds.width() / 2.f, + fSourceBounds.height() / 2.f}); + + SkCanvas* canvas = sourceSurface->getCanvas(); + canvas->clear(SK_ColorBLACK); + canvas->concat(rotation); + + int color = 0; + SkRect coverBounds; + SkRect dstBounds = SkRect::Make(canvas->imageInfo().bounds()); + SkAssertResult(SkMatrixPriv::InverseMapRect(rotation, &coverBounds, dstBounds)); + + float sz = fSourceBounds.width() <= 16.f || fSourceBounds.height() <= 16.f ? 2.f : 8.f; + for (float y = coverBounds.fTop; y < coverBounds.fBottom; y += sz) { + for (float x = coverBounds.fLeft; x < coverBounds.fRight; x += sz) { + SkPaint p; + p.setColor(colors[(color++) % std::size(colors)]); + canvas->drawRect(SkRect::MakeXYWH(x, y, sz, sz), p); + } + } + source = FilterResult(sourceSurface->makeImageSnapshot(), fSourceBounds.topLeft()); } Context baseContext = fRunner.newContext(source); @@ -779,7 +878,14 @@ class TestCase { LayerSpace expectedBounds = fActions[i].expectedBounds(source.layerBounds()); Expect correctedExpectation = fActions[i].expectation(); - if (!expectedBounds.intersect(desiredOutputs[i])) { + if (SkIRect(expectedBounds) == SkRectPriv::MakeILarge()) { + // An expected image filling out to infinity should have an actual image that + // fills the desired output. + expectedBounds = desiredOutputs[i]; + if (desiredOutputs[i].isEmpty()) { + correctedExpectation = Expect::kEmptyImage; + } + } else if (!expectedBounds.intersect(desiredOutputs[i])) { // Test cases should provide image expectations for the case where desired output // is not back-propagated. When desired output is back-propagated, it can lead to // earlier actions becoming empty actions. @@ -787,10 +893,6 @@ class TestCase { backPropagateDesiredOutput); expectedBounds = LayerSpace::Empty(); correctedExpectation = Expect::kEmptyImage; - } else if (SkIRect(expectedBounds) == SkRectPriv::MakeILarge()) { - // An expected image filling out to infinity should have an actual image that - // fills the desired output. - expectedBounds = desiredOutputs[i]; } bool actualNewImage = output.image() && @@ -812,6 +914,7 @@ class TestCase { REPORTER_ASSERT(fRunner, !expectedBounds.isEmpty()); REPORTER_ASSERT(fRunner, SkIRect(output.layerBounds()) == SkIRect(expectedBounds)); REPORTER_ASSERT(fRunner, output.sampling() == fActions[i].expectedSampling()); + REPORTER_ASSERT(fRunner, output.tileMode() == fActions[i].expectedTileMode()); REPORTER_ASSERT(fRunner, colorfilter_equals(output.colorFilter(), fActions[i].expectedColorFilter())); } @@ -843,6 +946,17 @@ class TestCase { return fActions[fActions.size() - 1].expectedSampling(); } } + // By default an action that doesn't define its own tiling will not change the tiling, unless it + // produces a new image, at which point it becomes kDecal again. + SkTileMode getDefaultExpectedTileMode(Expect expectation, bool cfAffectsTransparency) const { + if (expectation == Expect::kNewImage && cfAffectsTransparency) { + return SkTileMode::kClamp; + } else if (expectation != Expect::kDeferredImage || fActions.empty()) { + return SkTileMode::kDecal; + } else { + return fActions[fActions.size() - 1].expectedTileMode(); + } + } // By default an action that doesn't define its own color filter will not change filtering, // unless it produces a new image. Otherwise it inherits the prior action's expectations. sk_sp getDefaultExpectedColorFilter(Expect expectation) const { @@ -856,9 +970,8 @@ class TestCase { TestRunner& fRunner; std::string fName; - // Used to construct an SkSpecialImage of the given size/location filled with the known color. + // Used to construct an SkSpecialImage of the given size/location filled with the known pattern. LayerSpace fSourceBounds; - SkColor4f fSourceColor; // The intended area to fill with the result, controlled by outside factors (e.g. clip bounds) LayerSpace fDesiredOutput; @@ -884,11 +997,14 @@ sk_sp affect_transparent(SkColor4f color) { // ---------------------------------------------------------------------------- +// TODO(skbug.com/14607) - Run FilterResultTests on Dawn and ANGLE backends, too + #if defined(SK_GANESH) #define DEF_GANESH_TEST_SUITE(name) \ - DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS( \ - FilterResult_##name##_ganesh, \ - r, ctxInfo, CtsEnforcement::kApiLevel_T) { \ + DEF_GANESH_TEST_FOR_CONTEXTS( \ + FilterResult_ganesh_##name, \ + sk_gpu_test::GrContextFactory::IsNativeBackend, \ + r, ctxInfo, nullptr, CtsEnforcement::kApiLevel_T) { \ TestRunner runner(r, ctxInfo.directContext()); \ test_suite_##name(runner); \ } @@ -898,7 +1014,10 @@ sk_sp affect_transparent(SkColor4f color) { #if defined(SK_GRAPHITE) #define DEF_GRAPHITE_TEST_SUITE(name) \ - DEF_GRAPHITE_TEST_FOR_RENDERING_CONTEXTS(FilterResult_##name##_graphite, r, context) { \ + DEF_GRAPHITE_TEST_FOR_CONTEXTS( \ + FilterResult_graphite_##name, \ + sk_gpu_test::GrContextFactory::IsNativeBackend, \ + r, context) { \ using namespace skgpu::graphite; \ auto recorder = context->makeRecorder(); \ TestRunner runner(r, recorder.get()); \ @@ -917,13 +1036,12 @@ sk_sp affect_transparent(SkColor4f color) { #define DEF_GRAPHITE_TEST_SUITE(name) // do nothing #endif -// Assumes 'name' refers to a static function of type TestSuite. #define DEF_TEST_SUITE(name, runner) \ static void test_suite_##name(TestRunner&); \ /* TODO(b/274901800): Uncomment to enable Graphite test execution. */ \ /* DEF_GRAPHITE_TEST_SUITE(name) */ \ DEF_GANESH_TEST_SUITE(name) \ - DEF_TEST(FilterResult_##name##_raster, reporter) { \ + DEF_TEST(FilterResult_raster_##name, reporter) { \ TestRunner runner(reporter); \ test_suite_##name(runner); \ } \ @@ -936,23 +1054,25 @@ DEF_TEST_SUITE(EmptySource, r) { // This is testing that an empty input image is handled by the applied actions without having // to generate new images, or that it can produce a new image from nothing when it affects // transparent black. - TestCase(r, "applyCrop() to empty source") - .source(SkIRect::MakeEmpty(), SkColors::kRed) - .applyCrop({0, 0, 10, 10}, Expect::kEmptyImage) - .run(/*requestedOutput=*/{0, 0, 20, 20}); + for (SkTileMode tm : kTileModes) { + TestCase(r, "applyCrop() to empty source") + .source(SkIRect::MakeEmpty()) + .applyCrop({0, 0, 10, 10}, tm, Expect::kEmptyImage) + .run(/*requestedOutput=*/{0, 0, 20, 20}); + } TestCase(r, "applyTransform() to empty source") - .source(SkIRect::MakeEmpty(), SkColors::kRed) + .source(SkIRect::MakeEmpty()) .applyTransform(SkMatrix::Translate(10.f, 10.f), Expect::kEmptyImage) .run(/*requestedOutput=*/{10, 10, 20, 20}); TestCase(r, "applyColorFilter() to empty source") - .source(SkIRect::MakeEmpty(), SkColors::kRed) + .source(SkIRect::MakeEmpty()) .applyColorFilter(alpha_modulate(0.5f), Expect::kEmptyImage) .run(/*requestedOutput=*/{0, 0, 10, 10}); TestCase(r, "Transparency-affecting color filter overrules empty source") - .source(SkIRect::MakeEmpty(), SkColors::kRed) + .source(SkIRect::MakeEmpty()) .applyColorFilter(affect_transparent(SkColors::kBlue), Expect::kNewImage, /*expectedColorFilter=*/nullptr) // CF applied ASAP to make a new img .run(/*requestedOutput=*/{0, 0, 10, 10}); @@ -961,23 +1081,25 @@ DEF_TEST_SUITE(EmptySource, r) { DEF_TEST_SUITE(EmptyDesiredOutput, r) { // This is testing that an empty requested output is propagated through the applied actions so // that no actual images are generated. - TestCase(r, "applyCrop() + empty output becomes empty") - .source({0, 0, 10, 10}, SkColors::kRed) - .applyCrop({2, 2, 8, 8}, Expect::kEmptyImage) - .run(/*requestedOutput=*/SkIRect::MakeEmpty()); + for (SkTileMode tm : kTileModes) { + TestCase(r, "applyCrop() + empty output becomes empty") + .source({0, 0, 10, 10}) + .applyCrop({2, 2, 8, 8}, tm, Expect::kEmptyImage) + .run(/*requestedOutput=*/SkIRect::MakeEmpty()); + } TestCase(r, "applyTransform() + empty output becomes empty") - .source({0, 0, 10, 10}, SkColors::kRed) + .source({0, 0, 10, 10}) .applyTransform(SkMatrix::RotateDeg(10.f), Expect::kEmptyImage) .run(/*requestedOutput=*/SkIRect::MakeEmpty()); TestCase(r, "applyColorFilter() + empty output becomes empty") - .source({0, 0, 10, 10}, SkColors::kRed) + .source({0, 0, 10, 10}) .applyColorFilter(alpha_modulate(0.5f), Expect::kEmptyImage) .run(/*requestedOutput=*/SkIRect::MakeEmpty()); TestCase(r, "Transpency-affecting color filter + empty output is empty") - .source({0, 0, 10, 10}, SkColors::kRed) + .source({0, 0, 10, 10}) .applyColorFilter(affect_transparent(SkColors::kBlue), Expect::kEmptyImage) .run(/*requestedOutput=*/SkIRect::MakeEmpty()); } @@ -987,103 +1109,221 @@ DEF_TEST_SUITE(EmptyDesiredOutput, r) { DEF_TEST_SUITE(Crop, r) { // This is testing all the combinations of how the src, crop, and requested output rectangles - // can interact while still resulting in a deferred image. - TestCase(r, "applyCrop() contained in source and output") - .source({0, 0, 20, 20}, SkColors::kGreen) - .applyCrop({8, 8, 12, 12}, Expect::kDeferredImage) - .run(/*requestedOutput=*/{4, 4, 16, 16}); - - TestCase(r, "applyCrop() contained in source, intersects output") - .source({0, 0, 20, 20}, SkColors::kGreen) - .applyCrop({4, 4, 12, 12}, Expect::kDeferredImage) - .run(/*requestedOutput=*/{8, 8, 16, 16}); - - TestCase(r, "applyCrop() intersects source, contained in output") - .source({10, 10, 20, 20}, SkColors::kGreen) - .applyCrop({4, 4, 16, 16}, Expect::kDeferredImage) - .run(/*requestedOutput=*/{0, 0, 20, 20}); - - TestCase(r, "applyCrop() intersects source and output") - .source({0, 0, 10, 10}, SkColors::kGreen) - .applyCrop({5, -5, 15, 5}, Expect::kDeferredImage) - .run(/*requestedOutput=*/{7, -2, 12, 8}); - - TestCase(r, "applyCrop() contains source and output") - .source({0, 0, 10, 10}, SkColors::kGreen) - .applyCrop({-5, -5, 15, 15}, Expect::kDeferredImage) - .run(/*requestedOutput=*/{1, 1, 9, 9}); - - TestCase(r, "applyCrop() contains source, intersects output") - .source({4, 4, 16, 16}, SkColors::kGreen) - .applyCrop({0, 0, 20, 20}, Expect::kDeferredImage) - .run(/*requestedOutput=*/{-5, -5, 18, 18}); - - TestCase(r, "applyCrop() intersects source, contains output") - .source({0, 0, 20, 20}, SkColors::kGreen) - .applyCrop({-5, 5, 25, 15}, Expect::kDeferredImage) - .run(/*requestedOutput=*/{0, 5, 20, 15}); + // can interact while still resulting in a deferred image. The exception is non-decal tile + // modes where the crop rect includes transparent pixels not filled by the source, which + // requires a new image to ensure tiling matches the crop geometry. + for (SkTileMode tm : kTileModes) { + const Expect nonDecalExpectsNewImage = tm == SkTileMode::kDecal ? Expect::kDeferredImage + : Expect::kNewImage; + TestCase(r, "applyCrop() contained in source and output") + .source({0, 0, 20, 20}) + .applyCrop({8, 8, 12, 12}, tm, Expect::kDeferredImage) + .run(/*requestedOutput=*/{4, 4, 16, 16}); + + TestCase(r, "applyCrop() contained in source, intersects output") + .source({0, 0, 20, 20}) + .applyCrop({4, 4, 12, 12}, tm, Expect::kDeferredImage) + .run(/*requestedOutput=*/{8, 8, 16, 16}); + + TestCase(r, "applyCrop() intersects source, contained in output") + .source({10, 10, 20, 20}) + .applyCrop({4, 4, 16, 16}, tm, nonDecalExpectsNewImage) + .run(/*requestedOutput=*/{0, 0, 20, 20}); + + TestCase(r, "applyCrop() intersects source and output") + .source({0, 0, 10, 10}) + .applyCrop({5, -5, 15, 5}, tm, nonDecalExpectsNewImage) + .run(/*requestedOutput=*/{7, -2, 12, 8}); + + TestCase(r, "applyCrop() contains source, intersects output") + .source({4, 4, 16, 16}) + .applyCrop({0, 0, 20, 20}, tm, nonDecalExpectsNewImage) + .run(/*requestedOutput=*/{-5, -5, 18, 18}); + + // In these cases, cropping with a non-decal tile mode can be discarded because the output + // bounds are entirely within the crop so no tiled edges would be visible. + TestCase(r, "applyCrop() intersects source, contains output") + .source({0, 0, 20, 20}) + .applyCrop({-5, 5, 25, 15}, tm, Expect::kDeferredImage, SkTileMode::kDecal) + .run(/*requestedOutput=*/{0, 5, 20, 15}); + + TestCase(r, "applyCrop() contains source and output") + .source({0, 0, 10, 10}) + .applyCrop({-5, -5, 15, 15}, tm, Expect::kDeferredImage, SkTileMode::kDecal) + .run(/*requestedOutput=*/{1, 1, 9, 9}); + } } DEF_TEST_SUITE(CropDisjointFromSourceAndOutput, r) { // This tests all the combinations of src, crop, and requested output rectangles that result in - // an empty image without any of the rectangles being empty themselves. - TestCase(r, "applyCrop() disjoint from source, intersects output") - .source({0, 0, 10, 10}, SkColors::kBlue) - .applyCrop({11, 11, 20, 20}, Expect::kEmptyImage) - .run(/*requestedOutput=*/{0, 0, 15, 15}); - - TestCase(r, "applyCrop() disjoint from source, intersects output disjoint from source") - .source({0, 0, 10, 10}, SkColors::kBlue) - .applyCrop({11, 11, 20, 20}, Expect::kEmptyImage) - .run(/*requestedOutput=*/{12, 12, 18, 18}); - - TestCase(r, "applyCrop() intersects source, disjoint from output") - .source({0, 0, 10, 10}, SkColors::kBlue) - .applyCrop({-5, -5, 5, 5}, Expect::kEmptyImage) - .run(/*requestedOutput=*/{6, 6, 12, 12}); - - TestCase(r, "applyCrop() intersects source, disjoint from output disjoint from source") - .source({0, 0, 10, 10}, SkColors::kBlue) - .applyCrop({-5, -5, 5, 5}, Expect::kEmptyImage) - .run(/*requestedOutput=*/{12, 12, 18, 18}); - - TestCase(r, "applyCrop() disjoint from source and output") - .source({0, 0, 10, 10}, SkColors::kBlue) - .applyCrop({12, 12, 18, 18}, Expect::kEmptyImage) - .run(/*requestedOutput=*/{-1, -1, 11, 11}); - - TestCase(r, "applyCrop() disjoint from source and output disjoint from source") - .source({0, 0, 10, 10}, SkColors::kBlue) - .applyCrop({-10, 10, -1, -1}, Expect::kEmptyImage) - .run(/*requestedOutput=*/{11, 11, 20, 20}); + // an empty image without any of the rectangles being empty themselves. The exception is for + // non-decal tile modes when the source and crop still intersect. In that case the non-empty + // content is tiled into the disjoint output rect, producing a non-empty image. + for (SkTileMode tm : kTileModes) { + TestCase(r, "applyCrop() disjoint from source, intersects output") + .source({0, 0, 10, 10}) + .applyCrop({11, 11, 20, 20}, tm, Expect::kEmptyImage) + .run(/*requestedOutput=*/{0, 0, 15, 15}); + + TestCase(r, "applyCrop() disjoint from source, intersects output disjoint from source") + .source({0, 0, 10, 10}) + .applyCrop({11, 11, 20, 20}, tm, Expect::kEmptyImage) + .run(/*requestedOutput=*/{12, 12, 18, 18}); + + TestCase(r, "applyCrop() disjoint from source and output") + .source({0, 0, 10, 10}) + .applyCrop({12, 12, 18, 18}, tm, Expect::kEmptyImage) + .run(/*requestedOutput=*/{-1, -1, 11, 11}); + + TestCase(r, "applyCrop() disjoint from source and output disjoint from source") + .source({0, 0, 10, 10}) + .applyCrop({-10, 10, -1, -1}, tm, Expect::kEmptyImage) + .run(/*requestedOutput=*/{11, 11, 20, 20}); + + // When the source and crop intersect but are disjoint from the output, the behavior depends + // on the tile mode. For periodic tile modes, certain geometries can still be deferred by + // conversion to a transform, but to keep expectations simple we pick bounds such that the + // tiling can't be dropped. See PeriodicTileCrops for other scenarios. + Expect nonDecalExpectsImage = tm == SkTileMode::kDecal ? Expect::kEmptyImage : + tm == SkTileMode::kClamp ? Expect::kDeferredImage + : Expect::kNewImage; + TestCase(r, "applyCrop() intersects source, disjoint from output disjoint from source") + .source({0, 0, 10, 10}) + .applyCrop({-5, -5, 5, 5}, tm, nonDecalExpectsImage) + .run(/*requestedOutput=*/{12, 12, 18, 18}); + + TestCase(r, "applyCrop() intersects source, disjoint from output") + .source({0, 0, 10, 10}) + .applyCrop({-5, -5, 5, 5}, tm, nonDecalExpectsImage) + .run(/*requestedOutput=*/{6, 6, 18, 18}); + } } DEF_TEST_SUITE(EmptyCrop, r) { - TestCase(r, "applyCrop() is empty") - .source({0, 0, 10, 10}, SkColors::kYellow) - .applyCrop(SkIRect::MakeEmpty(), Expect::kEmptyImage) - .run(/*requestedOutput=*/{0, 0, 10, 10}); - - TestCase(r, "applyCrop() emptiness propagates") - .source({0, 0, 10, 10}, SkColors::kYellow) - .applyCrop({1, 1, 9, 9}, Expect::kDeferredImage) - .applyCrop(SkIRect::MakeEmpty(), Expect::kEmptyImage) - .run(/*requestedOutput=*/{0, 0, 10, 10}); + for (SkTileMode tm : kTileModes) { + TestCase(r, "applyCrop() is empty") + .source({0, 0, 10, 10}) + .applyCrop(SkIRect::MakeEmpty(), tm, Expect::kEmptyImage) + .run(/*requestedOutput=*/{0, 0, 10, 10}); + + TestCase(r, "applyCrop() emptiness propagates") + .source({0, 0, 10, 10}) + .applyCrop({1, 1, 9, 9}, tm, Expect::kDeferredImage) + .applyCrop(SkIRect::MakeEmpty(), tm, Expect::kEmptyImage) + .run(/*requestedOutput=*/{0, 0, 10, 10}); + } } DEF_TEST_SUITE(DisjointCrops, r) { - TestCase(r, "Disjoint applyCrops() become empty") - .source({0, 0, 10, 10}, SkColors::kCyan) - .applyCrop({0, 0, 4, 4}, Expect::kDeferredImage) - .applyCrop({6, 6, 10, 10}, Expect::kEmptyImage) - .run(/*requestedOutput=*/{0, 0, 10, 10}); + for (SkTileMode tm : kTileModes) { + TestCase(r, "Disjoint applyCrop() after kDecal become empty") + .source({0, 0, 10, 10}) + .applyCrop({0, 0, 4, 4}, SkTileMode::kDecal, Expect::kDeferredImage) + .applyCrop({6, 6, 10, 10}, tm, Expect::kEmptyImage) + .run(/*requestedOutput=*/{0, 0, 10, 10}); + + if (tm != SkTileMode::kDecal) { + TestCase(r, "Disjoint tiling applyCrop() before kDecal is not empty and combines") + .source({0, 0, 10, 10}) + .applyCrop({0, 0, 4, 4}, tm, Expect::kDeferredImage) + .applyCrop({6, 6, 10, 10}, SkTileMode::kDecal, Expect::kDeferredImage, tm) + .run(/*requestedOutput=*/{0, 0, 10, 10}); + + TestCase(r, "Disjoint non-decal applyCrops() are not empty") + .source({0, 0, 10, 10}) + .applyCrop({0, 0, 4, 4}, tm, Expect::kDeferredImage) + .applyCrop({6, 6, 10, 10}, tm, tm == SkTileMode::kClamp ? Expect::kDeferredImage + : Expect::kNewImage) + .run(/*requestedOutput=*/{0, 0, 10, 10}); + } + } } DEF_TEST_SUITE(IntersectingCrops, r) { - TestCase(r, "Consecutive applyCrops() combine") - .source({0, 0, 20, 20}, SkColors::kMagenta) - .applyCrop({5, 5, 15, 15}, Expect::kDeferredImage) - .applyCrop({10, 10, 20, 20}, Expect::kDeferredImage) + for (SkTileMode tm : kTileModes) { + TestCase(r, "Decal applyCrop() always combines with any other crop") + .source({0, 0, 20, 20}) + .applyCrop({5, 5, 15, 15}, tm, Expect::kDeferredImage) + .applyCrop({10, 10, 20, 20}, SkTileMode::kDecal, Expect::kDeferredImage, tm) + .run(/*requestedOutput=*/{0, 0, 20, 20}); + + if (tm != SkTileMode::kDecal) { + TestCase(r, "Decal applyCrop() before non-decal crop requires new image") + .source({0, 0, 20, 20}) + .applyCrop({5, 5, 15, 15}, SkTileMode::kDecal, Expect::kDeferredImage) + .applyCrop({10, 10, 20, 20}, tm, Expect::kNewImage) + .run(/*requestedOutput=*/{0, 0, 20, 20}); + + TestCase(r, "Consecutive non-decal crops combine if both are clamp") + .source({0, 0, 20, 20}) + .applyCrop({5, 5, 15, 15}, tm, Expect::kDeferredImage) + .applyCrop({10, 10, 20, 20}, tm, + tm == SkTileMode::kClamp ? Expect::kDeferredImage + : Expect::kNewImage) + .run(/*requestedOutput=*/{0, 0, 20, 20}); + } + } +} + +DEF_TEST_SUITE(PeriodicTileCrops, r) { + for (SkTileMode tm : {SkTileMode::kRepeat, SkTileMode::kMirror}) { + // In these tests, the crop periodically tiles such that it covers the desired output so + // the prior image can be simply transformed. + TestCase(r, "Periodic applyCrop() becomes a transform") + .source({0, 0, 20, 20}) + .applyCrop({5, 5, 15, 15}, tm, Expect::kDeferredImage, + /*expectedTileMode=*/SkTileMode::kDecal) + .run(/*requestedOutput=*/{25, 25, 35, 35}); + + TestCase(r, "Periodic applyCrop() with partial transparency still becomes a transform") + .source({0, 0, 20, 20}) + .applyCrop({-5, -5, 15, 15}, tm, Expect::kDeferredImage, + /*expectedTileMode=*/SkTileMode::kDecal, + /*expectedBounds=*/tm == SkTileMode::kRepeat ? SkIRect{20,20,35,35} + : SkIRect{15,15,30,30}) + .run(/*requestedOutput*/{15, 15, 35, 35}); + + TestCase(r, "Periodic applyCrop() after complex transform can still simplify") + .source({0, 0, 20, 20}) + .applyTransform(SkMatrix::RotateDeg(15.f, {10.f, 10.f}), Expect::kDeferredImage) + .applyCrop({-5, -5, 25, 25}, tm, Expect::kDeferredImage, + /*expectedTileMode=*/SkTileMode::kDecal, + /*expectedBounds*/SkIRect{57,57,83,83}) // source+15 degree rotation + .run(/*requestedOutput=*/{55,55,85,85}); + + // In these tests, the crop's periodic boundary intersects with the output so it should not + // simplify to just a transform. + TestCase(r, "Periodic applyCrop() with visible edge does not become a transform") + .source({0, 0, 20, 20}) + .applyCrop({5, 5, 15, 15}, tm, Expect::kDeferredImage) + .run(/*requestedOutput=*/{10, 10, 20, 20}); + + TestCase(r, "Periodic applyCrop() with visible edge and transparency creates new image") + .source({0, 0, 20, 20}) + .applyCrop({-5, -5, 15, 15}, tm, Expect::kNewImage) + .run(/*requestedOutput=*/{10, 10, 20, 20}); + + TestCase(r, "Periodic applyCropp() with visible edge and complex transform creates image") + .source({0, 0, 20, 20}) + .applyTransform(SkMatrix::RotateDeg(15.f, {10.f, 10.f}), Expect::kDeferredImage) + .applyCrop({-5, -5, 25, 25}, tm, Expect::kNewImage) + .run(/*requestedOutput=*/{20, 20, 50, 50}); + } +} + +DEF_TEST_SUITE(DecalThenClamp, r) { + TestCase(r, "Decal then clamp crop uses 1px buffer around intersection") + .source({0, 0, 20, 20}) + .applyCrop({3, 3, 17, 17}, SkTileMode::kDecal, Expect::kDeferredImage) + .applyColorFilter(alpha_modulate(0.5f), Expect::kDeferredImage) + .applyCrop({3, 3, 20, 20}, SkTileMode::kClamp, Expect::kNewImage, SkTileMode::kClamp) + .run(/*requestedOutput=*/{0, 0, 20, 20}); + + TestCase(r, "Decal then clamp crop uses 1px buffer around intersection, w/ alpha color filter") + .source({0, 0, 20, 20}) + .applyCrop({3, 3, 17, 17}, SkTileMode::kDecal, Expect::kDeferredImage) + .applyColorFilter(affect_transparent(SkColors::kCyan), Expect::kDeferredImage) + .applyCrop({0, 0, 17, 17}, SkTileMode::kClamp, Expect::kNewImage, SkTileMode::kClamp) .run(/*requestedOutput=*/{0, 0, 20, 20}); } @@ -1092,30 +1332,30 @@ DEF_TEST_SUITE(IntersectingCrops, r) { DEF_TEST_SUITE(Transform, r) { TestCase(r, "applyTransform() integer translate") - .source({0, 0, 10, 10}, SkColors::kRed) + .source({0, 0, 10, 10}) .applyTransform(SkMatrix::Translate(5, 5), Expect::kDeferredImage) .run(/*requestedOutput=*/{0, 0, 10, 10}); TestCase(r, "applyTransform() fractional translate") - .source({0, 0, 10, 10}, SkColors::kRed) + .source({0, 0, 10, 10}) .applyTransform(SkMatrix::Translate(1.5f, 3.24f), Expect::kDeferredImage) .run(/*requestedOutput=*/{0, 0, 10, 10}); TestCase(r, "applyTransform() scale") - .source({0, 0, 4, 4}, SkColors::kRed) - .applyTransform(SkMatrix::Scale(2.2f, 3.5f), Expect::kDeferredImage) - .run(/*requestedOutput=*/{-16, -16, 16, 16}); + .source({0, 0, 24, 24}) + .applyTransform(SkMatrix::Scale(2.2f, 3.1f), Expect::kDeferredImage) + .run(/*requestedOutput=*/{-16, -16, 96, 96}); // NOTE: complex is anything beyond a scale+translate. See SkImageFilter_Base::MatrixCapability. TestCase(r, "applyTransform() with complex transform") - .source({0, 0, 8, 8}, SkColors::kRed) + .source({0, 0, 8, 8}) .applyTransform(SkMatrix::RotateDeg(10.f, {4.f, 4.f}), Expect::kDeferredImage) .run(/*requestedOutput=*/{0, 0, 16, 16}); } DEF_TEST_SUITE(CompatibleSamplingConcatsTransforms, r) { TestCase(r, "linear + linear combine") - .source({0, 0, 8, 8}, SkColors::kGreen) + .source({0, 0, 8, 8}) .applyTransform(SkMatrix::RotateDeg(2.f, {4.f, 4.f}), SkFilterMode::kLinear, Expect::kDeferredImage) .applyTransform(SkMatrix::RotateDeg(2.f, {4.f, 4.f}), @@ -1123,7 +1363,7 @@ DEF_TEST_SUITE(CompatibleSamplingConcatsTransforms, r) { .run(/*requestedOutput=*/{0, 0, 16, 16}); TestCase(r, "equiv. bicubics combine") - .source({0, 0, 8, 8}, SkColors::kGreen) + .source({0, 0, 8, 8}) .applyTransform(SkMatrix::RotateDeg(2.f, {4.f, 4.f}), SkCubicResampler::Mitchell(), Expect::kDeferredImage) .applyTransform(SkMatrix::RotateDeg(2.f, {4.f, 4.f}), @@ -1131,7 +1371,7 @@ DEF_TEST_SUITE(CompatibleSamplingConcatsTransforms, r) { .run(/*requestedOutput=*/{0, 0, 16, 16}); TestCase(r, "linear + bicubic becomes bicubic") - .source({0, 0, 8, 8}, SkColors::kGreen) + .source({0, 0, 8, 8}) .applyTransform(SkMatrix::RotateDeg(2.f, {4.f, 4.f}), SkFilterMode::kLinear, Expect::kDeferredImage) .applyTransform(SkMatrix::RotateDeg(2.f, {4.f, 4.f}), @@ -1139,7 +1379,7 @@ DEF_TEST_SUITE(CompatibleSamplingConcatsTransforms, r) { .run(/*requestedOutput=*/{0, 0, 16, 16}); TestCase(r, "bicubic + linear becomes bicubic") - .source({0, 0, 8, 8}, SkColors::kGreen) + .source({0, 0, 8, 8}) .applyTransform(SkMatrix::RotateDeg(2.f, {4.f, 4.f}), SkCubicResampler::Mitchell(), Expect::kDeferredImage) .applyTransform(SkMatrix::RotateDeg(2.f, {4.f, 4.f}), @@ -1148,7 +1388,7 @@ DEF_TEST_SUITE(CompatibleSamplingConcatsTransforms, r) { .run(/*requestedOutput=*/{0, 0, 16, 16}); TestCase(r, "aniso picks max level to combine") - .source({0, 0, 8, 8}, SkColors::kGreen) + .source({0, 0, 8, 8}) .applyTransform(SkMatrix::RotateDeg(2.f, {4.f, 4.f}), SkSamplingOptions::Aniso(4.f), Expect::kDeferredImage) .applyTransform(SkMatrix::RotateDeg(2.f, {4.f, 4.f}), @@ -1157,7 +1397,7 @@ DEF_TEST_SUITE(CompatibleSamplingConcatsTransforms, r) { .run(/*requestedOutput=*/{0, 0, 16, 16}); TestCase(r, "aniso picks max level to combine (other direction)") - .source({0, 0, 8, 8}, SkColors::kGreen) + .source({0, 0, 8, 8}) .applyTransform(SkMatrix::RotateDeg(2.f, {4.f, 4.f}), SkSamplingOptions::Aniso(2.f), Expect::kDeferredImage) .applyTransform(SkMatrix::RotateDeg(2.f, {4.f, 4.f}), @@ -1165,7 +1405,7 @@ DEF_TEST_SUITE(CompatibleSamplingConcatsTransforms, r) { .run(/*requestedOutput=*/{0, 0, 16, 16}); TestCase(r, "linear + aniso becomes aniso") - .source({0, 0, 8, 8}, SkColors::kGreen) + .source({0, 0, 8, 8}) .applyTransform(SkMatrix::RotateDeg(2.f, {4.f, 4.f}), SkFilterMode::kLinear, Expect::kDeferredImage) .applyTransform(SkMatrix::RotateDeg(2.f, {4.f, 4.f}), @@ -1173,7 +1413,7 @@ DEF_TEST_SUITE(CompatibleSamplingConcatsTransforms, r) { .run(/*requestedOutput=*/{0, 0, 16, 16}); TestCase(r, "aniso + linear stays aniso") - .source({0, 0, 8, 8}, SkColors::kGreen) + .source({0, 0, 8, 8}) .applyTransform(SkMatrix::RotateDeg(2.f, {4.f, 4.f}), SkSamplingOptions::Aniso(4.f), Expect::kDeferredImage) .applyTransform(SkMatrix::RotateDeg(2.f, {4.f, 4.f}), @@ -1187,7 +1427,7 @@ DEF_TEST_SUITE(CompatibleSamplingConcatsTransforms, r) { DEF_TEST_SUITE(IncompatibleSamplingResolvesImages, r) { TestCase(r, "different bicubics do not combine") - .source({0, 0, 8, 8}, SkColors::kBlue) + .source({0, 0, 8, 8}) .applyTransform(SkMatrix::RotateDeg(2.f, {4.f, 4.f}), SkCubicResampler::Mitchell(), Expect::kDeferredImage) .applyTransform(SkMatrix::RotateDeg(2.f, {4.f, 4.f}), @@ -1195,7 +1435,7 @@ DEF_TEST_SUITE(IncompatibleSamplingResolvesImages, r) { .run(/*requestedOutput=*/{0, 0, 16, 16}); TestCase(r, "nearest + linear do not combine") - .source({0, 0, 8, 8}, SkColors::kBlue) + .source({0, 0, 8, 8}) .applyTransform(SkMatrix::RotateDeg(2.f, {4.f, 4.f}), SkFilterMode::kNearest, Expect::kDeferredImage) .applyTransform(SkMatrix::RotateDeg(2.f, {4.f, 4.f}), @@ -1203,7 +1443,7 @@ DEF_TEST_SUITE(IncompatibleSamplingResolvesImages, r) { .run(/*requestedOutput=*/{0, 0, 16, 16}); TestCase(r, "linear + nearest do not combine") - .source({0, 0, 8, 8}, SkColors::kBlue) + .source({0, 0, 8, 8}) .applyTransform(SkMatrix::RotateDeg(2.f, {4.f, 4.f}), SkFilterMode::kLinear, Expect::kDeferredImage) .applyTransform(SkMatrix::RotateDeg(2.f, {4.f, 4.f}), @@ -1211,7 +1451,7 @@ DEF_TEST_SUITE(IncompatibleSamplingResolvesImages, r) { .run(/*requestedOutput=*/{0, 0, 16, 16}); TestCase(r, "bicubic + aniso do not combine") - .source({0, 0, 8, 8}, SkColors::kBlue) + .source({0, 0, 8, 8}) .applyTransform(SkMatrix::RotateDeg(2.f, {4.f, 4.f}), SkCubicResampler::Mitchell(), Expect::kDeferredImage) .applyTransform(SkMatrix::RotateDeg(2.f, {4.f, 4.f}), @@ -1219,7 +1459,7 @@ DEF_TEST_SUITE(IncompatibleSamplingResolvesImages, r) { .run(/*requestedOutput=*/{0, 0, 16, 16}); TestCase(r, "aniso + bicubic do not combine") - .source({0, 0, 8, 8}, SkColors::kBlue) + .source({0, 0, 8, 8}) .applyTransform(SkMatrix::RotateDeg(2.f, {4.f, 4.f}), SkSamplingOptions::Aniso(4.f), Expect::kDeferredImage) .applyTransform(SkMatrix::RotateDeg(2.f, {4.f, 4.f}), @@ -1227,7 +1467,7 @@ DEF_TEST_SUITE(IncompatibleSamplingResolvesImages, r) { .run(/*requestedOutput=*/{0, 0, 16, 16}); TestCase(r, "nearest + nearest do not combine") - .source({0, 0, 8, 8}, SkColors::kBlue) + .source({0, 0, 8, 8}) .applyTransform(SkMatrix::RotateDeg(2.f, {4.f, 4.f}), SkFilterMode::kNearest, Expect::kDeferredImage) .applyTransform(SkMatrix::RotateDeg(2.f, {4.f, 4.f}), @@ -1239,7 +1479,7 @@ DEF_TEST_SUITE(IntegerOffsetIgnoresNearestSampling, r) { // Bicubic is used here to reflect that it should use the non-NN sampling and just needs to be // something other than the default to detect that it got carried through. TestCase(r, "integer translate+NN then bicubic combines") - .source({0, 0, 8, 8}, SkColors::kCyan) + .source({0, 0, 8, 8}) .applyTransform(SkMatrix::Translate(2, 2), SkFilterMode::kNearest, Expect::kDeferredImage, FilterResult::kDefaultSampling) @@ -1248,7 +1488,7 @@ DEF_TEST_SUITE(IntegerOffsetIgnoresNearestSampling, r) { .run(/*requestedOutput=*/{0, 0, 16, 16}); TestCase(r, "bicubic then integer translate+NN combines") - .source({0, 0, 8, 8}, SkColors::kCyan) + .source({0, 0, 8, 8}) .applyTransform(SkMatrix::RotateDeg(2.f, {4.f, 4.f}), SkCubicResampler::Mitchell(), Expect::kDeferredImage) .applyTransform(SkMatrix::Translate(2, 2), @@ -1262,18 +1502,18 @@ DEF_TEST_SUITE(IntegerOffsetIgnoresNearestSampling, r) { DEF_TEST_SUITE(TransformBecomesEmpty, r) { TestCase(r, "Transform moves src image outside of requested output") - .source({0, 0, 8, 8}, SkColors::kMagenta) + .source({0, 0, 8, 8}) .applyTransform(SkMatrix::Translate(10.f, 10.f), Expect::kEmptyImage) .run(/*requestedOutput=*/{0, 0, 8, 8}); TestCase(r, "Transform moves src image outside of crop") - .source({0, 0, 8, 8}, SkColors::kMagenta) + .source({0, 0, 8, 8}) .applyTransform(SkMatrix::Translate(10.f, 10.f), Expect::kDeferredImage) .applyCrop({2, 2, 6, 6}, Expect::kEmptyImage) .run(/*requestedOutput=*/{0, 0, 20, 20}); TestCase(r, "Transform moves cropped image outside of requested output") - .source({0, 0, 8, 8}, SkColors::kMagenta) + .source({0, 0, 8, 8}) .applyCrop({1, 1, 4, 4}, Expect::kDeferredImage) .applyTransform(SkMatrix::Translate(-5.f, -5.f), Expect::kEmptyImage) .run(/*requestedOutput=*/{0, 0, 8, 8}); @@ -1281,7 +1521,7 @@ DEF_TEST_SUITE(TransformBecomesEmpty, r) { DEF_TEST_SUITE(TransformAndCrop, r) { TestCase(r, "Crop after transform can always apply") - .source({0, 0, 16, 16}, SkColors::kGreen) + .source({0, 0, 16, 16}) .applyTransform(SkMatrix::RotateDeg(45.f, {3.f, 4.f}), Expect::kDeferredImage) .applyCrop({2, 2, 15, 15}, Expect::kDeferredImage) .run(/*requestedOutput=*/{0, 0, 16, 16}); @@ -1289,77 +1529,111 @@ DEF_TEST_SUITE(TransformAndCrop, r) { // TODO: Expand this test case to be arbitrary float S+T transforms when FilterResult tracks // both a srcRect and dstRect. TestCase(r, "Crop after translate is lifted to image subset") - .source({0, 0, 32, 32}, SkColors::kGreen) + .source({0, 0, 32, 32}) .applyTransform(SkMatrix::Translate(12.f, 8.f), Expect::kDeferredImage) .applyCrop({16, 16, 24, 24}, Expect::kDeferredImage) .applyTransform(SkMatrix::RotateDeg(45.f, {16.f, 16.f}), Expect::kDeferredImage) .run(/*requestedOutput=*/{0, 0, 32, 32}); TestCase(r, "Transform after unlifted crop triggers new image") - .source({0, 0, 16, 16}, SkColors::kGreen) + .source({0, 0, 16, 16}) .applyTransform(SkMatrix::RotateDeg(45.f, {8.f, 8.f}), Expect::kDeferredImage) .applyCrop({1, 1, 15, 15}, Expect::kDeferredImage) .applyTransform(SkMatrix::RotateDeg(-10.f, {8.f, 4.f}), Expect::kNewImage) .run(/*requestedOutput=*/{0, 0, 16, 16}); TestCase(r, "Transform after unlifted crop with interior output does not trigger new image") - .source({0, 0, 16, 16}, SkColors::kGreen) + .source({0, 0, 16, 16}) .applyTransform(SkMatrix::RotateDeg(45.f, {8.f, 8.f}), Expect::kDeferredImage) .applyCrop({1, 1, 15, 15}, Expect::kDeferredImage) .applyTransform(SkMatrix::RotateDeg(-10.f, {8.f, 4.f}), Expect::kDeferredImage) .run(/*requestedOutput=*/{4, 4, 12, 12}); TestCase(r, "Translate after unlifted crop does not trigger new image") - .source({0, 0, 16, 16}, SkColors::kGreen) + .source({0, 0, 16, 16}) .applyTransform(SkMatrix::RotateDeg(5.f, {8.f, 8.f}), Expect::kDeferredImage) .applyCrop({2, 2, 14, 14}, Expect::kDeferredImage) .applyTransform(SkMatrix::Translate(4.f, 6.f), Expect::kDeferredImage) .run(/*requestedOutput=*/{0, 0, 16, 16}); TestCase(r, "Transform after large no-op crop does not trigger new image") - .source({0, 0, 64, 64}, SkColors::kGreen) + .source({0, 0, 64, 64}) .applyTransform(SkMatrix::RotateDeg(45.f, {32.f, 32.f}), Expect::kDeferredImage) .applyCrop({-64, -64, 128, 128}, Expect::kDeferredImage) .applyTransform(SkMatrix::RotateDeg(-30.f, {32.f, 32.f}), Expect::kDeferredImage) .run(/*requestedOutput=*/{0, 0, 64, 64}); } +DEF_TEST_SUITE(TransformAndTile, r) { + // Test interactions of non-decal tile modes and transforms + for (SkTileMode tm : kTileModes) { + if (tm == SkTileMode::kDecal) { + continue; + } + + TestCase(r, "Transform after tile mode does not trigger new image") + .source({0, 0, 64, 64}) + .applyCrop({2, 2, 32, 32}, tm, Expect::kDeferredImage) + .applyTransform(SkMatrix::RotateDeg(20.f, {16.f, 8.f}), Expect::kDeferredImage) + .run(/*requestedOutput=*/{0, 0, 64, 64}); + + TestCase(r, "Integer transform before tile mode does not trigger new image") + .source({0, 0, 32, 32}) + .applyTransform(SkMatrix::Translate(16.f, 16.f), Expect::kDeferredImage) + .applyCrop({20, 20, 40, 40}, tm, Expect::kDeferredImage) + .run(/*requestedOutput=*/{0, 0, 64, 64}); + + TestCase(r, "Non-integer transform before tile mode triggers new image") + .source({0, 0, 50, 40}) + .applyTransform(SkMatrix::RotateDeg(-30.f, {20.f, 10.f}), Expect::kDeferredImage) + .applyCrop({10, 10, 30, 30}, tm, Expect::kNewImage) + .run(/*requestedOutput=*/{0, 0, 50, 50}); + + TestCase(r, "Non-integer transform before tiling defers image if edges are hidden") + .source({0, 0, 64, 64}) + .applyTransform(SkMatrix::RotateDeg(45.f, {32.f, 32.f}), Expect::kDeferredImage) + .applyCrop({10, 10, 50, 50}, tm, Expect::kDeferredImage, + /*expectedTileMode=*/SkTileMode::kDecal) + .run(/*requestedOutput=*/{11, 11, 49, 49}); + } +} + // ---------------------------------------------------------------------------- // applyColorFilter() and interactions with transforms/crops DEF_TEST_SUITE(ColorFilter, r) { TestCase(r, "applyColorFilter() defers image") - .source({0, 0, 24, 24}, SkColors::kGreen) + .source({0, 0, 24, 24}) .applyColorFilter(alpha_modulate(0.5f), Expect::kDeferredImage) .run(/*requestedOutput=*/{0, 0, 32, 32}); TestCase(r, "applyColorFilter() composes with other color filters") - .source({0, 0, 24, 24}, SkColors::kGreen) + .source({0, 0, 24, 24}) .applyColorFilter(alpha_modulate(0.5f), Expect::kDeferredImage) .applyColorFilter(alpha_modulate(0.5f), Expect::kDeferredImage) .run(/*requestedOutput=*/{0, 0, 32, 32}); TestCase(r, "Transparency-affecting color filter fills output") - .source({0, 0, 24, 24}, SkColors::kGreen) + .source({0, 0, 24, 24}) .applyColorFilter(affect_transparent(SkColors::kBlue), Expect::kDeferredImage) .run(/*requestedOutput=*/{-8, -8, 32, 32}); // Since there is no cropping between the composed color filters, transparency-affecting CFs // can still compose together. TestCase(r, "Transparency-affecting composition fills output (ATBx2)") - .source({0, 0, 24, 24}, SkColors::kGreen) + .source({0, 0, 24, 24}) .applyColorFilter(affect_transparent(SkColors::kBlue), Expect::kDeferredImage) .applyColorFilter(affect_transparent(SkColors::kRed), Expect::kDeferredImage) .run(/*requestedOutput=*/{-8, -8, 32, 32}); TestCase(r, "Transparency-affecting composition fills output (ATB,reg)") - .source({0, 0, 24, 24}, SkColors::kGreen) + .source({0, 0, 24, 24}) .applyColorFilter(affect_transparent(SkColors::kBlue), Expect::kDeferredImage) .applyColorFilter(alpha_modulate(0.5f), Expect::kDeferredImage) .run(/*requestedOutput=*/{-8, -8, 32, 32}); TestCase(r, "Transparency-affecting composition fills output (reg,ATB)") - .source({0, 0, 24, 24}, SkColors::kGreen) + .source({0, 0, 24, 24}) .applyColorFilter(alpha_modulate(0.5f), Expect::kDeferredImage) .applyColorFilter(affect_transparent(SkColors::kBlue), Expect::kDeferredImage) .run(/*requestedOutput=*/{-8, -8, 32, 32}); @@ -1367,19 +1641,19 @@ DEF_TEST_SUITE(ColorFilter, r) { DEF_TEST_SUITE(TransformedColorFilter, r) { TestCase(r, "Transform composes with regular CF") - .source({0, 0, 24, 24}, SkColors::kRed) + .source({0, 0, 24, 24}) .applyTransform(SkMatrix::RotateDeg(45.f, {12, 12}), Expect::kDeferredImage) .applyColorFilter(alpha_modulate(0.5f), Expect::kDeferredImage) .run(/*requestedOutput=*/{0, 0, 24, 24}); TestCase(r, "Regular CF composes with transform") - .source({0, 0, 24, 24}, SkColors::kRed) + .source({0, 0, 24, 24}) .applyColorFilter(alpha_modulate(0.5f), Expect::kDeferredImage) .applyTransform(SkMatrix::RotateDeg(45.f, {12, 12}), Expect::kDeferredImage) .run(/*requestedOutput=*/{0, 0, 24, 24}); TestCase(r, "Transform composes with transparency-affecting CF") - .source({0, 0, 24, 24}, SkColors::kRed) + .source({0, 0, 24, 24}) .applyTransform(SkMatrix::RotateDeg(45.f, {12, 12}), Expect::kDeferredImage) .applyColorFilter(affect_transparent(SkColors::kBlue), Expect::kDeferredImage) .run(/*requestedOutput=*/{0, 0, 24, 24}); @@ -1389,7 +1663,7 @@ DEF_TEST_SUITE(TransformedColorFilter, r) { // visible post transform. This is detected and allows the transform to be composed without // producing an intermediate image. See later tests for when a crop prevents this optimization. TestCase(r, "Transparency-affecting CF composes with transform") - .source({0, 0, 24, 24}, SkColors::kRed) + .source({0, 0, 24, 24}) .applyColorFilter(affect_transparent(SkColors::kBlue), Expect::kDeferredImage) .applyTransform(SkMatrix::RotateDeg(45.f, {12, 12}), Expect::kDeferredImage) .run(/*requestedOutput=*/{-50, -50, 50, 50}); @@ -1398,28 +1672,28 @@ DEF_TEST_SUITE(TransformedColorFilter, r) { DEF_TEST_SUITE(TransformBetweenColorFilters, r) { // NOTE: The lack of explicit crops allows all of these operations to be optimized as well. TestCase(r, "Transform between regular color filters") - .source({0, 0, 24, 24}, SkColors::kRed) + .source({0, 0, 24, 24}) .applyColorFilter(alpha_modulate(0.5f), Expect::kDeferredImage) .applyTransform(SkMatrix::RotateDeg(45.f, {12, 12}), Expect::kDeferredImage) .applyColorFilter(alpha_modulate(0.75f), Expect::kDeferredImage) .run(/*requestedOutput=*/{0, 0, 24, 24}); TestCase(r, "Transform between transparency-affecting color filters") - .source({0, 0, 24, 24}, SkColors::kRed) + .source({0, 0, 24, 24}) .applyColorFilter(affect_transparent(SkColors::kBlue), Expect::kDeferredImage) .applyTransform(SkMatrix::RotateDeg(45.f, {12, 12}), Expect::kDeferredImage) .applyColorFilter(affect_transparent(SkColors::kGreen), Expect::kDeferredImage) .run(/*requestedOutput=*/{0, 0, 24, 24}); TestCase(r, "Transform between ATB and regular color filters") - .source({0, 0, 24, 24}, SkColors::kRed) + .source({0, 0, 24, 24}) .applyColorFilter(affect_transparent(SkColors::kBlue), Expect::kDeferredImage) .applyTransform(SkMatrix::RotateDeg(45.f, {12, 12}), Expect::kDeferredImage) .applyColorFilter(alpha_modulate(0.75f), Expect::kDeferredImage) .run(/*requestedOutput=*/{0, 0, 24, 24}); TestCase(r, "Transform between regular and ATB color filters") - .source({0, 0, 24, 24}, SkColors::kRed) + .source({0, 0, 24, 24}) .applyColorFilter(alpha_modulate(0.5f), Expect::kDeferredImage) .applyTransform(SkMatrix::RotateDeg(45.f, {12, 12}), Expect::kDeferredImage) .applyColorFilter(affect_transparent(SkColors::kGreen), Expect::kDeferredImage) @@ -1428,14 +1702,14 @@ DEF_TEST_SUITE(TransformBetweenColorFilters, r) { DEF_TEST_SUITE(ColorFilterBetweenTransforms, r) { TestCase(r, "Regular color filter between transforms") - .source({0, 0, 24, 24}, SkColors::kGreen) + .source({0, 0, 24, 24}) .applyTransform(SkMatrix::RotateDeg(20.f, {12, 12}), Expect::kDeferredImage) .applyColorFilter(alpha_modulate(0.8f), Expect::kDeferredImage) .applyTransform(SkMatrix::RotateDeg(10.f, {5.f, 8.f}), Expect::kDeferredImage) .run(/*requestedOutput=*/{0, 0, 24, 24}); TestCase(r, "Transparency-affecting color filter between transforms") - .source({0, 0, 24, 24}, SkColors::kGreen) + .source({0, 0, 24, 24}) .applyTransform(SkMatrix::RotateDeg(20.f, {12, 12}), Expect::kDeferredImage) .applyColorFilter(affect_transparent(SkColors::kRed), Expect::kDeferredImage) .applyTransform(SkMatrix::RotateDeg(10.f, {5.f, 8.f}), Expect::kDeferredImage) @@ -1443,135 +1717,159 @@ DEF_TEST_SUITE(ColorFilterBetweenTransforms, r) { } DEF_TEST_SUITE(CroppedColorFilter, r) { - TestCase(r, "Regular color filter after empty crop stays empty") - .source({0, 0, 16, 16}, SkColors::kBlue) - .applyCrop(SkIRect::MakeEmpty(), Expect::kEmptyImage) - .applyColorFilter(alpha_modulate(0.2f), Expect::kEmptyImage) - .run(/*requestedOutput=*/{0, 0, 16, 16}); - - TestCase(r, "Transparency-affecting color filter after empty crop creates new image") - .source({0, 0, 16, 16}, SkColors::kBlue) - .applyCrop(SkIRect::MakeEmpty(), Expect::kEmptyImage) - .applyColorFilter(affect_transparent(SkColors::kRed), Expect::kNewImage, - /*expectedColorFilter=*/nullptr) // CF applied ASAP to make a new img - .run(/*requestedOutput=*/{0, 0, 16, 16}); - - TestCase(r, "Regular color filter composes with crop") - .source({0, 0, 32, 32}, SkColors::kBlue) - .applyColorFilter(alpha_modulate(0.7f), Expect::kDeferredImage) - .applyCrop({8, 8, 24, 24}, Expect::kDeferredImage) - .run(/*requestedOutput=*/{0, 0, 32, 32}); - - TestCase(r, "Crop composes with regular color filter") - .source({0, 0, 32, 32}, SkColors::kBlue) - .applyCrop({8, 8, 24, 24}, Expect::kDeferredImage) - .applyColorFilter(alpha_modulate(0.5f), Expect::kDeferredImage) - .run(/*requestedOutput=*/{0, 0, 32, 32}); - - TestCase(r, "Transparency-affecting color filter restricted by crop") - .source({0, 0, 32, 32}, SkColors::kBlue) - .applyColorFilter(affect_transparent(SkColors::kRed), Expect::kDeferredImage) - .applyCrop({8, 8, 24, 24}, Expect::kDeferredImage) - .run(/*requestedOutput=*/{0, 0, 32, 32}); - - TestCase(r, "Crop composes with transparency-affecting color filter") - .source({0, 0, 32, 32}, SkColors::kBlue) - .applyCrop({8, 8, 24, 24}, Expect::kDeferredImage) - .applyColorFilter(affect_transparent(SkColors::kRed), Expect::kDeferredImage) - .run(/*requestedOutput=*/{0, 0, 32, 32}); + for (SkTileMode tm : kTileModes) { + TestCase(r, "Regular color filter after empty crop stays empty") + .source({0, 0, 16, 16}) + .applyCrop(SkIRect::MakeEmpty(), tm, Expect::kEmptyImage) + .applyColorFilter(alpha_modulate(0.2f), Expect::kEmptyImage) + .run(/*requestedOutput=*/{0, 0, 16, 16}); + + TestCase(r, "Transparency-affecting color filter after empty crop creates new image") + .source({0, 0, 16, 16}) + .applyCrop(SkIRect::MakeEmpty(), tm, Expect::kEmptyImage) + .applyColorFilter(affect_transparent(SkColors::kRed), Expect::kNewImage, + /*expectedColorFilter=*/nullptr) // CF applied ASAP to new img + .run(/*requestedOutput=*/{0, 0, 16, 16}); + + TestCase(r, "Regular color filter composes with crop") + .source({0, 0, 32, 32}) + .applyColorFilter(alpha_modulate(0.7f), Expect::kDeferredImage) + .applyCrop({8, 8, 24, 24}, tm, Expect::kDeferredImage) + .run(/*requestedOutput=*/{0, 0, 32, 32}); + + TestCase(r, "Crop composes with regular color filter") + .source({0, 0, 32, 32}) + .applyCrop({8, 8, 24, 24}, tm, Expect::kDeferredImage) + .applyColorFilter(alpha_modulate(0.5f), Expect::kDeferredImage) + .run(/*requestedOutput=*/{0, 0, 32, 32}); + + TestCase(r, "Transparency-affecting color filter restricted by crop") + .source({0, 0, 32, 32}) + .applyColorFilter(affect_transparent(SkColors::kRed), Expect::kDeferredImage) + .applyCrop({8, 8, 24, 24}, tm, Expect::kDeferredImage) + .run(/*requestedOutput=*/{0, 0, 32, 32}); + + TestCase(r, "Crop composes with transparency-affecting color filter") + .source({0, 0, 32, 32}) + .applyCrop({8, 8, 24, 24}, tm, Expect::kDeferredImage) + .applyColorFilter(affect_transparent(SkColors::kRed), Expect::kDeferredImage) + .run(/*requestedOutput=*/{0, 0, 32, 32}); + } } DEF_TEST_SUITE(CropBetweenColorFilters, r) { - TestCase(r, "Crop between regular color filters") - .source({0, 0, 32, 32}, SkColors::kBlue) - .applyColorFilter(alpha_modulate(0.8f), Expect::kDeferredImage) - .applyCrop({8, 8, 24, 24}, Expect::kDeferredImage) - .applyColorFilter(alpha_modulate(0.4f), Expect::kDeferredImage) - .run(/*requestedOutput=*/{0, 0, 32, 32}); - - TestCase(r, "Crop between transparency-affecting color filters requires new image") - .source({0, 0, 32, 32}, SkColors::kBlue) - .applyColorFilter(affect_transparent(SkColors::kGreen), Expect::kDeferredImage) - .applyCrop({8, 8, 24, 24}, Expect::kDeferredImage) - .applyColorFilter(affect_transparent(SkColors::kRed), Expect::kNewImage) - .run(/*requestedOutput=*/{0, 0, 32, 32}); - - TestCase(r, "Output-constrained crop between transparency-affecting color filters does not") - .source({0, 0, 32, 32}, SkColors::kBlue) - .applyColorFilter(affect_transparent(SkColors::kGreen), Expect::kDeferredImage) - .applyCrop({8, 8, 24, 24}, Expect::kDeferredImage) - .applyColorFilter(affect_transparent(SkColors::kRed), Expect::kDeferredImage) - .run(/*requestedOutput=*/{8, 8, 24, 24}); - - TestCase(r, "Crop between regular and ATB color filters") - .source({0, 0, 32, 32}, SkColors::kBlue) - .applyColorFilter(alpha_modulate(0.5f), Expect::kDeferredImage) - .applyCrop({8, 8, 24, 24}, Expect::kDeferredImage) - .applyColorFilter(affect_transparent(SkColors::kRed), Expect::kDeferredImage) - .run(/*requestedOutput=*/{0, 0, 32, 32}); + for (SkTileMode tm : kTileModes) { + TestCase(r, "Crop between regular color filters") + .source({0, 0, 32, 32}) + .applyColorFilter(alpha_modulate(0.8f), Expect::kDeferredImage) + .applyCrop({8, 8, 24, 24}, tm, Expect::kDeferredImage) + .applyColorFilter(alpha_modulate(0.4f), Expect::kDeferredImage) + .run(/*requestedOutput=*/{0, 0, 32, 32}); + + if (tm == SkTileMode::kDecal) { + TestCase(r, "Crop between transparency-affecting color filters requires new image") + .source({0, 0, 32, 32}) + .applyColorFilter(affect_transparent(SkColors::kGreen), Expect::kDeferredImage) + .applyCrop({8, 8, 24, 24}, SkTileMode::kDecal, Expect::kDeferredImage) + .applyColorFilter(affect_transparent(SkColors::kRed), Expect::kNewImage) + .run(/*requestedOutput=*/{0, 0, 32, 32}); + + TestCase(r, "Output-constrained crop between transparency-affecting filters does not") + .source({0, 0, 32, 32}) + .applyColorFilter(affect_transparent(SkColors::kGreen), Expect::kDeferredImage) + .applyCrop({8, 8, 24, 24}, SkTileMode::kDecal, Expect::kDeferredImage) + .applyColorFilter(affect_transparent(SkColors::kRed), Expect::kDeferredImage) + .run(/*requestedOutput=*/{8, 8, 24, 24}); + } else { + TestCase(r, "Tiling between transparency-affecting color filters defers image") + .source({0, 0, 32, 32}) + .applyColorFilter(affect_transparent(SkColors::kGreen), Expect::kDeferredImage) + .applyCrop({8, 8, 24, 24}, tm, Expect::kDeferredImage) + .applyColorFilter(affect_transparent(SkColors::kRed), Expect::kDeferredImage) + .run(/*requestedOutput=*/{0, 0, 32, 32}); + } - TestCase(r, "Crop between ATB and regular color filters") - .source({0, 0, 32, 32}, SkColors::kBlue) - .applyColorFilter(affect_transparent(SkColors::kRed), Expect::kDeferredImage) - .applyCrop({8, 8, 24, 24}, Expect::kDeferredImage) - .applyColorFilter(alpha_modulate(0.5f), Expect::kDeferredImage) - .run(/*requestedOutput=*/{0, 0, 32, 32}); + TestCase(r, "Crop between regular and ATB color filters") + .source({0, 0, 32, 32}) + .applyColorFilter(alpha_modulate(0.5f), Expect::kDeferredImage) + .applyCrop({8, 8, 24, 24}, tm, Expect::kDeferredImage) + .applyColorFilter(affect_transparent(SkColors::kRed), Expect::kDeferredImage) + .run(/*requestedOutput=*/{0, 0, 32, 32}); + + TestCase(r, "Crop between ATB and regular color filters") + .source({0, 0, 32, 32}) + .applyColorFilter(affect_transparent(SkColors::kRed), Expect::kDeferredImage) + .applyCrop({8, 8, 24, 24}, tm, Expect::kDeferredImage) + .applyColorFilter(alpha_modulate(0.5f), Expect::kDeferredImage) + .run(/*requestedOutput=*/{0, 0, 32, 32}); + } } DEF_TEST_SUITE(ColorFilterBetweenCrops, r) { - TestCase(r, "Regular color filter between crops") - .source({0, 0, 32, 32}, SkColors::kBlue) - .applyCrop({4, 4, 24, 24}, Expect::kDeferredImage) - .applyColorFilter(alpha_modulate(0.5f), Expect::kDeferredImage) - .applyCrop({15, 15, 32, 32}, Expect::kDeferredImage) - .run(/*requestedOutput=*/{0, 0, 32, 32}); - - TestCase(r, "Transparency-affecting color filter between crops") - .source({0, 0, 32, 32}, SkColors::kBlue) - .applyCrop({4, 4, 24, 24}, Expect::kDeferredImage) - .applyColorFilter(affect_transparent(SkColors::kGreen), Expect::kDeferredImage) - .applyCrop({15, 15, 32, 32}, Expect::kDeferredImage) - .run(/*requestedOutput=*/{0, 0, 32, 32}); + for (SkTileMode firstTM : kTileModes) { + for (SkTileMode secondTM : kTileModes) { + Expect newImageIfNotDecalOrDoubleClamp = + secondTM != SkTileMode::kDecal && + !(secondTM == SkTileMode::kClamp && firstTM == SkTileMode::kClamp) ? + Expect::kNewImage : Expect::kDeferredImage; + + TestCase(r, "Regular color filter between crops") + .source({0, 0, 32, 32}) + .applyCrop({4, 4, 24, 24}, firstTM, Expect::kDeferredImage) + .applyColorFilter(alpha_modulate(0.5f), Expect::kDeferredImage) + .applyCrop({15, 15, 32, 32}, secondTM, newImageIfNotDecalOrDoubleClamp, + secondTM == SkTileMode::kDecal ? firstTM : secondTM) + .run(/*requestedOutput=*/{0, 0, 32, 32}); + + TestCase(r, "Transparency-affecting color filter between crops") + .source({0, 0, 32, 32}) + .applyCrop({4, 4, 24, 24}, firstTM, Expect::kDeferredImage) + .applyColorFilter(affect_transparent(SkColors::kGreen), Expect::kDeferredImage) + .applyCrop({15, 15, 32, 32}, secondTM, newImageIfNotDecalOrDoubleClamp, + secondTM == SkTileMode::kDecal ? firstTM : secondTM) + .run(/*requestedOutput=*/{0, 0, 32, 32}); + } + } } DEF_TEST_SUITE(CroppedTransformedColorFilter, r) { TestCase(r, "Transform -> crop -> regular color filter") - .source({0, 0, 32, 32}, SkColors::kRed) + .source({0, 0, 32, 32}) .applyTransform(SkMatrix::RotateDeg(30.f, {16, 16}), Expect::kDeferredImage) .applyCrop({2, 2, 30, 30}, Expect::kDeferredImage) .applyColorFilter(alpha_modulate(0.5f), Expect::kDeferredImage) .run(/*requestedOutput=*/{0, 0, 32, 32}); TestCase(r, "Transform -> regular color filter -> crop") - .source({0, 0, 32, 32}, SkColors::kRed) + .source({0, 0, 32, 32}) .applyTransform(SkMatrix::RotateDeg(30.f, {16, 16}), Expect::kDeferredImage) .applyColorFilter(alpha_modulate(0.5f), Expect::kDeferredImage) .applyCrop({2, 2, 30, 30}, Expect::kDeferredImage) .run(/*requestedOutput=*/{0, 0, 32, 32}); TestCase(r, "Crop -> transform -> regular color filter") - .source({0, 0, 32, 32}, SkColors::kRed) + .source({0, 0, 32, 32}) .applyCrop({2, 2, 30, 30}, Expect::kDeferredImage) .applyTransform(SkMatrix::RotateDeg(30.f, {16, 16}), Expect::kDeferredImage) .applyColorFilter(alpha_modulate(0.5f), Expect::kDeferredImage) .run(/*requestedOutput=*/{0, 0, 32, 32}); TestCase(r, "Crop -> regular color filter -> transform") - .source({0, 0, 32, 32}, SkColors::kRed) + .source({0, 0, 32, 32}) .applyCrop({2, 2, 30, 30}, Expect::kDeferredImage) .applyColorFilter(alpha_modulate(0.5f), Expect::kDeferredImage) .applyTransform(SkMatrix::RotateDeg(30.f, {16, 16}), Expect::kDeferredImage) .run(/*requestedOutput=*/{0, 0, 32, 32}); TestCase(r, "Regular color filter -> transform -> crop") - .source({0, 0, 32, 32}, SkColors::kRed) + .source({0, 0, 32, 32}) .applyColorFilter(alpha_modulate(0.5f), Expect::kDeferredImage) .applyTransform(SkMatrix::RotateDeg(30.f, {16, 16}), Expect::kDeferredImage) .applyCrop({2, 2, 30, 30}, Expect::kDeferredImage) .run(/*requestedOutput=*/{0, 0, 32, 32}); TestCase(r, "Regular color filter -> crop -> transform") - .source({0, 0, 32, 32}, SkColors::kRed) + .source({0, 0, 32, 32}) .applyColorFilter(alpha_modulate(0.5f), Expect::kDeferredImage) .applyCrop({2, 2, 30, 30}, Expect::kDeferredImage) .applyTransform(SkMatrix::RotateDeg(30.f, {16, 16}), Expect::kDeferredImage) @@ -1583,28 +1881,28 @@ DEF_TEST_SUITE(CroppedTransformedTransparencyAffectingColorFilter, r) { // either the order of operations or the bounds propagation means that every action can be // deferred. Below, when the crop is between the two actions, new images are triggered. TestCase(r, "Transform -> transparency-affecting color filter -> crop") - .source({0, 0, 32, 32}, SkColors::kRed) + .source({0, 0, 32, 32}) .applyTransform(SkMatrix::RotateDeg(30.f, {16, 16}), Expect::kDeferredImage) .applyColorFilter(affect_transparent(SkColors::kGreen), Expect::kDeferredImage) .applyCrop({2, 2, 30, 30}, Expect::kDeferredImage) .run(/*requestedOutput=*/{0, 0, 32, 32}); TestCase(r, "Crop -> transform -> transparency-affecting color filter") - .source({0, 0, 32, 32}, SkColors::kRed) + .source({0, 0, 32, 32}) .applyCrop({2, 2, 30, 30}, Expect::kDeferredImage) .applyTransform(SkMatrix::RotateDeg(30.f, {16, 16}), Expect::kDeferredImage) .applyColorFilter(affect_transparent(SkColors::kGreen), Expect::kDeferredImage) .run(/*requestedOutput=*/{0, 0, 32, 32}); TestCase(r, "Crop -> transparency-affecting color filter -> transform") - .source({0, 0, 32, 32}, SkColors::kRed) + .source({0, 0, 32, 32}) .applyCrop({2, 2, 30, 30}, Expect::kDeferredImage) .applyColorFilter(affect_transparent(SkColors::kGreen), Expect::kDeferredImage) .applyTransform(SkMatrix::RotateDeg(30.f, {16, 16}), Expect::kDeferredImage) .run(/*requestedOutput=*/{0, 0, 32, 32}); TestCase(r, "Transparency-affecting color filter -> transform -> crop") - .source({0, 0, 32, 32}, SkColors::kRed) + .source({0, 0, 32, 32}) .applyColorFilter(affect_transparent(SkColors::kGreen), Expect::kDeferredImage) .applyTransform(SkMatrix::RotateDeg(30.f, {16, 16}), Expect::kDeferredImage) .applyCrop({2, 2, 30, 30}, Expect::kDeferredImage) @@ -1614,14 +1912,14 @@ DEF_TEST_SUITE(CroppedTransformedTransparencyAffectingColorFilter, r) { // outside the crop is introduced that should not be affected by the color filter were no // new image to be created. TestCase(r, "Transform -> crop -> transparency-affecting color filter") - .source({0, 0, 32, 32}, SkColors::kRed) + .source({0, 0, 32, 32}) .applyTransform(SkMatrix::RotateDeg(30.f, {16, 16}), Expect::kDeferredImage) .applyCrop({2, 2, 30, 30}, Expect::kDeferredImage) .applyColorFilter(affect_transparent(SkColors::kGreen), Expect::kNewImage) .run(/*requestedOutput=*/{0, 0, 32, 32}); TestCase(r, "Transparency-affecting color filter -> crop -> transform") - .source({0, 0, 32, 32}, SkColors::kRed) + .source({0, 0, 32, 32}) .applyColorFilter(affect_transparent(SkColors::kGreen), Expect::kDeferredImage) .applyCrop({2, 2, 30, 30}, Expect::kDeferredImage) .applyTransform(SkMatrix::RotateDeg(30.f, {16, 16}), Expect::kNewImage) @@ -1630,14 +1928,14 @@ DEF_TEST_SUITE(CroppedTransformedTransparencyAffectingColorFilter, r) { // However if the output is small enough to fit within the transformed interior, the // transparency is not visible. TestCase(r, "Transform -> crop -> transparency-affecting color filter") - .source({0, 0, 32, 32}, SkColors::kRed) + .source({0, 0, 32, 32}) .applyTransform(SkMatrix::RotateDeg(30.f, {16, 16}), Expect::kDeferredImage) .applyCrop({2, 2, 30, 30}, Expect::kDeferredImage) .applyColorFilter(affect_transparent(SkColors::kGreen), Expect::kDeferredImage) .run(/*requestedOutput=*/{15, 15, 21, 21}); TestCase(r, "Transparency-affecting color filter -> crop -> transform") - .source({0, 0, 32, 32}, SkColors::kRed) + .source({0, 0, 32, 32}) .applyColorFilter(affect_transparent(SkColors::kGreen), Expect::kDeferredImage) .applyCrop({2, 2, 30, 30}, Expect::kDeferredImage) .applyTransform(SkMatrix::RotateDeg(30.f, {16, 16}), Expect::kDeferredImage) diff --git a/tests/FloatingPointTest.cpp b/tests/FloatingPointTest.cpp index e2ea308772ec..f284256840d6 100644 --- a/tests/FloatingPointTest.cpp +++ b/tests/FloatingPointTest.cpp @@ -148,3 +148,14 @@ DEF_TEST(FMA, reporter) { REPORTER_ASSERT(reporter, x == 0); REPORTER_ASSERT(reporter, y == -exp2(-62)); } + +DEF_TEST(Midpoint, reporter) { + const float smallest = std::numeric_limits::denorm_min(); + REPORTER_ASSERT(reporter, sk_float_midpoint(smallest, smallest) == smallest); + REPORTER_ASSERT(reporter, sk_float_midpoint(smallest, -smallest) == 0); + + const float biggest = std::numeric_limits::max(); + REPORTER_ASSERT(reporter, sk_float_midpoint(biggest, biggest) == biggest); + REPORTER_ASSERT(reporter, sk_float_midpoint(biggest, -biggest) == 0); + +} diff --git a/tests/FontHostTest.cpp b/tests/FontHostTest.cpp index f1cdb2f5f111..ac258e801fcd 100644 --- a/tests/FontHostTest.cpp +++ b/tests/FontHostTest.cpp @@ -208,8 +208,7 @@ static void test_tables(skiatest::Reporter* reporter) { } /* - * Verifies that the advance values returned by generateAdvance and - * generateMetrics match. + * Verifies that the advance values returned by various methods match. */ static void test_advances(skiatest::Reporter* reporter) { static const char* const faces[] = { @@ -263,16 +262,11 @@ static void test_advances(skiatest::Reporter* reporter) { SkRect bounds; - // For no hinting and light hinting this should take the - // optimized generateAdvance path. SkScalar width1 = font.measureText(txt, textLen, SkTextEncoding::kUTF8); // Requesting the bounds forces a generateMetrics call. SkScalar width2 = font.measureText(txt, textLen, SkTextEncoding::kUTF8, &bounds); - // SkDebugf("Font: %s, generateAdvance: %f, generateMetrics: %f\n", - // faces[i], SkScalarToFloat(width1), SkScalarToFloat(width2)); - REPORTER_ASSERT(reporter, width1 == width2); } } diff --git a/tests/FontationsTest.cpp b/tests/FontationsTest.cpp index 06ed1564616f..4d1ac10fd94f 100644 --- a/tests/FontationsTest.cpp +++ b/tests/FontationsTest.cpp @@ -18,6 +18,58 @@ const char kFontResource[] = "fonts/ahem.ttf"; const char kTtcResource[] = "fonts/test.ttc"; const char kVariableResource[] = "fonts/test_glyphs-glyf_colr_1_variable.ttf"; constexpr size_t kNumVariableAxes = 44; + +struct AxisExpectation { + SkFourByteTag tag; + float minValue; + float defValue; + float maxValue; +} axisExpectations[] = { + {SkSetFourByteTag('S', 'W', 'P', 'S'), -90.0, 0.0, 90.0}, + {SkSetFourByteTag('S', 'W', 'P', 'E'), -90.0, 0.0, 90.0}, + {SkSetFourByteTag('S', 'W', 'C', '1'), -2.0, 0.0, 2.0}, + {SkSetFourByteTag('S', 'W', 'C', '2'), -2.0, 0.0, 2.0}, + {SkSetFourByteTag('S', 'W', 'C', '3'), -2.0, 0.0, 2.0}, + {SkSetFourByteTag('S', 'W', 'C', '4'), -2.0, 0.0, 2.0}, + {SkSetFourByteTag('S', 'C', 'O', 'X'), -200., 0.0, 200.}, + {SkSetFourByteTag('S', 'C', 'O', 'Y'), -200., 0.0, 200.}, + {SkSetFourByteTag('S', 'C', 'S', 'X'), -2.0, 0.0, 1.9999389648437}, + {SkSetFourByteTag('S', 'C', 'S', 'Y'), -2.0, 0.0, 1.9999389648437}, + {SkSetFourByteTag('G', 'R', 'X', '0'), -1000, 0.0, 1000}, + {SkSetFourByteTag('G', 'R', 'Y', '0'), -1000, 0.0, 1000}, + {SkSetFourByteTag('G', 'R', 'X', '1'), -1000, 0.0, 1000}, + {SkSetFourByteTag('G', 'R', 'Y', '1'), -1000, 0.0, 1000}, + {SkSetFourByteTag('G', 'R', 'X', '2'), -1000, 0.0, 1000}, + {SkSetFourByteTag('G', 'R', 'Y', '2'), -1000, 0.0, 1000}, + {SkSetFourByteTag('G', 'R', 'R', '0'), -1000, 0.0, 1000}, + {SkSetFourByteTag('G', 'R', 'R', '1'), -1000, 0.0, 1000}, + {SkSetFourByteTag('C', 'O', 'L', '1'), -2.0, 0.0, 2.0}, + {SkSetFourByteTag('C', 'O', 'L', '2'), -2.0, 0.0, 2.0}, + {SkSetFourByteTag('C', 'O', 'L', '3'), -2.0, 0.0, 2.0}, + {SkSetFourByteTag('R', 'O', 'T', 'A'), 0.0, 0.0, 539.989013671875}, + {SkSetFourByteTag('R', 'O', 'T', 'X'), -500.0, 0.0, 500.0}, + {SkSetFourByteTag('R', 'O', 'T', 'Y'), -500.0, 0.0, 500.0}, + {SkSetFourByteTag('S', 'K', 'X', 'A'), -90.0, 0.0, 90.0}, + {SkSetFourByteTag('S', 'K', 'Y', 'A'), -90.0, 0.0, 90.0}, + {SkSetFourByteTag('S', 'K', 'C', 'X'), -500.0, 0.0, 500.0}, + {SkSetFourByteTag('S', 'K', 'C', 'Y'), -500.0, 0.0, 500.0}, + {SkSetFourByteTag('T', 'R', 'X', 'X'), -2.0, 0.0, 2.0}, + {SkSetFourByteTag('T', 'R', 'Y', 'X'), -2.0, 0.0, 2.0}, + {SkSetFourByteTag('T', 'R', 'X', 'Y'), -2.0, 0.0, 2.0}, + {SkSetFourByteTag('T', 'R', 'Y', 'Y'), -2.0, 0.0, 2.0}, + {SkSetFourByteTag('T', 'R', 'D', 'X'), -500.0, 0.0, 500.0}, + {SkSetFourByteTag('T', 'R', 'D', 'Y'), -500.0, 0.0, 500.0}, + {SkSetFourByteTag('T', 'L', 'D', 'X'), -500.0, 0.0, 500.0}, + {SkSetFourByteTag('T', 'L', 'D', 'Y'), -500.0, 0.0, 500.0}, + {SkSetFourByteTag('C', 'L', 'X', 'I'), -500.0, 0.0, 500.0}, + {SkSetFourByteTag('C', 'L', 'Y', 'I'), -500.0, 0.0, 500.0}, + {SkSetFourByteTag('C', 'L', 'X', 'A'), -500.0, 0.0, 500.0}, + {SkSetFourByteTag('C', 'L', 'Y', 'A'), -500.0, 0.0, 500.0}, + {SkSetFourByteTag('C', 'L', 'I', 'O'), -500.0, 0.0, 500.0}, + {SkSetFourByteTag('A', 'P', 'H', '1'), -1.0, 0.0, 0.0}, + {SkSetFourByteTag('A', 'P', 'H', '2'), -1.0, 0.0, 0.0}, + {SkSetFourByteTag('A', 'P', 'H', '3'), -1.0, 0.0, 0.0}, +}; } // namespace DEF_TEST(Fontations_DoNotMakeFromNull, reporter) { @@ -176,3 +228,34 @@ DEF_TEST(Fontations_VariationPosition, reporter) { retrieveCoordinates[1].axis == kSwpeCoordinate.axis && retrieveCoordinates[1].value == kSwpeCoordinate.value); } + +DEF_TEST(Fontations_VariationParameters, reporter) { + sk_sp variableTypeface( + SkTypeface_Make_Fontations(GetResourceAsStream(kVariableResource), SkFontArguments())); + REPORTER_ASSERT(reporter, + variableTypeface->getVariationDesignParameters(nullptr, 0) == kNumVariableAxes); + + SkFontParameters::Variation::Axis axes[kNumVariableAxes] = {}; + REPORTER_ASSERT(reporter, + variableTypeface->getVariationDesignParameters(axes, kNumVariableAxes) == + kNumVariableAxes); + + for (size_t i = 0; i < kNumVariableAxes; ++i) { + REPORTER_ASSERT(reporter, axes[i].tag == axisExpectations[i].tag); + REPORTER_ASSERT(reporter, axes[i].min == axisExpectations[i].minValue); + REPORTER_ASSERT(reporter, axes[i].def == axisExpectations[i].defValue); + REPORTER_ASSERT(reporter, axes[i].max == axisExpectations[i].maxValue); + } +} + +DEF_TEST(Fontations_VariationParameters_BufferTooSmall, reporter) { + sk_sp variableTypeface( + SkTypeface_Make_Fontations(GetResourceAsStream(kVariableResource), SkFontArguments())); + REPORTER_ASSERT(reporter, + variableTypeface->getVariationDesignParameters(nullptr, 0) == kNumVariableAxes); + + constexpr size_t kArrayTooSmall = 3; + SkFontParameters::Variation::Axis axes[kArrayTooSmall] = {}; + REPORTER_ASSERT(reporter, + variableTypeface->getVariationDesignParameters(axes, kArrayTooSmall) == -1); +} diff --git a/tests/GLBackendSurfaceTest.cpp b/tests/GLBackendSurfaceTest.cpp index c31674bbd7c7..e24d2498a37b 100644 --- a/tests/GLBackendSurfaceTest.cpp +++ b/tests/GLBackendSurfaceTest.cpp @@ -8,7 +8,6 @@ #include "include/core/SkTypes.h" #ifdef SK_GL - #include "include/core/SkAlphaType.h" #include "include/core/SkCanvas.h" #include "include/core/SkColorSpace.h" @@ -25,6 +24,7 @@ #include "include/gpu/GrTypes.h" #include "include/gpu/ganesh/SkImageGanesh.h" #include "include/gpu/ganesh/SkSurfaceGanesh.h" +#include "include/gpu/ganesh/gl/GrGLBackendSurface.h" #include "include/gpu/gl/GrGLTypes.h" #include "include/private/gpu/ganesh/GrGLTypesPriv.h" #include "src/gpu/ganesh/GrDirectContextPriv.h" @@ -79,7 +79,7 @@ DEF_GANESH_TEST_FOR_ALL_GL_CONTEXTS(GLTextureParameters, REPORTER_ASSERT(reporter, backendTex.isValid()); GrGLTextureInfo info; - REPORTER_ASSERT(reporter, backendTex.getGLTextureInfo(&info)); + REPORTER_ASSERT(reporter, GrBackendTextures::GetGLTextureInfo(backendTex, &info)); GrBackendTexture backendTexCopy = backendTex; REPORTER_ASSERT(reporter, backendTexCopy.isSameTexture(backendTex)); @@ -113,7 +113,7 @@ DEF_GANESH_TEST_FOR_ALL_GL_CONTEXTS(GLTextureParameters, REPORTER_ASSERT(reporter, surf); // Test invalidating from the GL backend texture. - backendTex.glTextureParametersModified(); + GrBackendTextures::GLTextureParametersModified(&backendTex); REPORTER_ASSERT(reporter, params_invalid(*parameters)); REPORTER_ASSERT(reporter, surf); @@ -122,7 +122,7 @@ DEF_GANESH_TEST_FOR_ALL_GL_CONTEXTS(GLTextureParameters, REPORTER_ASSERT(reporter, params_valid(*parameters, caps)); // Test invalidating from the copy. - backendTexCopy.glTextureParametersModified(); + GrBackendTextures::GLTextureParametersModified(&backendTexCopy); REPORTER_ASSERT(reporter, params_invalid(*parameters)); // Check that we can do things like assigning the backend texture to invalid one, assign an diff --git a/tests/GainmapShaderTest.cpp b/tests/GainmapShaderTest.cpp index 7e4184d175e1..f55550ce733c 100644 --- a/tests/GainmapShaderTest.cpp +++ b/tests/GainmapShaderTest.cpp @@ -122,7 +122,8 @@ DEF_TEST(GainmapShader_rects, r) { 2 * sizeof(SkColor4f)); auto gainmapImage = SkImages::RasterFromPixmap(gainmapPixmap, nullptr, nullptr); const auto gainmapImageRect = SkRect::MakeXYWH(1.f, 0.f, 1.f, 2.f); - const SkGainmapInfo gainmapInfo = simple_gainmap_info(2.f); + SkGainmapInfo gainmapInfo = simple_gainmap_info(2.f); + gainmapInfo.fEpsilonHdr[0] = 0.1f; SkImageInfo canvasInfo = SkImageInfo::Make( 4, 6, kRGBA_F32_SkColorType, kPremul_SkAlphaType, SkColorSpace::MakeSRGB()); @@ -147,18 +148,131 @@ DEF_TEST(GainmapShader_rects, r) { canvas.drawRect(canvasRect, paint); // Compute and compare the expected colors. - constexpr float k10G = 1.353256028586302f; // This is linearToSRGB(2.0). - constexpr float k05G = 0.6858361015012847f; // This is linearToSRGB(srgbToLinear(0.5)*2.0) + // This is linearToSRGB(srgbToLinear(1.0)*2.0) = linearToSRGB(2.0). + constexpr float k10G = 1.353256028586302f; + // This is linearToSRGB(srgbToLinear(0.5)*2.0) + constexpr float k05G = 0.6858361015012847f; + // The 'R' component also has a fEpsilonHdr set. + // This is linearToSRGB(srgbToLinear(1.0)*2.0-0.1) = linearToSRGB(1.9). + constexpr float kR10G = 1.3234778541409058f; + // This is linearToSRGB(srgbToLinear(0.5)-0.1) + // The gain map is 0.f (no gain), but there are still affectd by the offset. + constexpr float kR05G = 0.371934685412575f; + SkColor4f expectedColors[4][2] = { + {{kR10G, 1.0f, 1.0f, 1.0f}, {kR10G, 1.0f, 0.5f, 1.0f}}, + {{kR10G, 0.5f, 1.0f, 1.0f}, {kR10G, 0.5f, 0.5f, 1.0f}}, + {{kR05G, k10G, k10G, 1.0f}, {kR05G, k10G, k05G, 1.0f}}, + {{kR05G, k05G, k10G, 1.0f}, {kR05G, k05G, k05G, 1.0f}}, + }; + for (int y = 0; y < 4; ++y) { + for (int x = 0; x < 2; ++x) { + const auto color = canvasBitmap.getColor4f(x + 1, y + 1); + const auto& expected = expectedColors[y][x]; + REPORTER_ASSERT(r, + approx_equal(color, expected), + "color (%.3f %.3f %.3f %.3f) does not match expected color (%.3f %.3f " + "%.3f %.3f) at " + "pixel (%d, %d)", + color.fR, + color.fG, + color.fB, + color.fA, + expected.fR, + expected.fG, + expected.fB, + expected.fA, + x, + y); + } + } +} + +DEF_TEST(GainmapShader_baseImageIsHdr, r) { +SkColor4f hdrColors[4][2] = { + {{1.0f, 1.0f, 1.0f, 1.0f}, {1.0f, 1.0f, 0.5f, 1.0f}}, + {{1.0f, 0.5f, 1.0f, 1.0f}, {1.0f, 0.5f, 0.5f, 1.0f}}, + {{0.5f, 1.0f, 1.0f, 1.0f}, {0.5f, 1.0f, 0.5f, 1.0f}}, + {{0.5f, 0.5f, 1.0f, 1.0f}, {0.5f, 0.5f, 0.5f, 1.0f}}, + }; + SkPixmap hdrPixmap(SkImageInfo::Make(2, 4, kRGBA_F32_SkColorType, kOpaque_SkAlphaType), + hdrColors, + 2 * sizeof(SkColor4f)); + auto hdrImage = SkImages::RasterFromPixmap(hdrPixmap, nullptr, nullptr); + const auto hdrImageRect = SkRect::MakeXYWH(0.f, 0.f, 2.f, 4.f); + + // The top pixel indicates to gain only red, and the bottom pixel indicates to gain everything + // except red. + SkColor4f gainmapColors[2][1] = { + {{1.0f, 0.0f, 0.0f, 1.f}}, + {{0.0f, 1.0f, 1.0f, 1.f}}, + }; + SkPixmap gainmapPixmap(SkImageInfo::Make(1, 2, kRGBA_F32_SkColorType, kOpaque_SkAlphaType), + gainmapColors, + 1 * sizeof(SkColor4f)); + auto gainmapImage = SkImages::RasterFromPixmap(gainmapPixmap, nullptr, nullptr); + const auto gainmapImageRect = SkRect::MakeXYWH(0.f, 0.f, 1.f, 2.f); + SkGainmapInfo gainmapInfo = simple_gainmap_info(2.f); + gainmapInfo.fBaseImageType = SkGainmapInfo::BaseImageType::kHDR; + gainmapInfo.fEpsilonSdr[0] = 0.1f; + + SkImageInfo canvasInfo = SkImageInfo::Make( + 2, 4, kRGBA_F32_SkColorType, kPremul_SkAlphaType, SkColorSpace::MakeSRGB()); + SkBitmap canvasBitmap; + canvasBitmap.allocPixels(canvasInfo); + canvasBitmap.eraseColor(SK_ColorTRANSPARENT); + const auto canvasRect = SkRect::MakeXYWH(0.f, 0.f, 2.f, 4.f); + + sk_sp shader = SkGainmapShader::Make(hdrImage, + hdrImageRect, + SkSamplingOptions(), + gainmapImage, + gainmapImageRect, + SkSamplingOptions(), + gainmapInfo, + canvasRect, + gainmapInfo.fDisplayRatioSdr, + canvasInfo.refColorSpace()); + SkPaint paint; + paint.setShader(shader); + SkCanvas canvas(canvasBitmap); + canvas.drawRect(canvasRect, paint); + + // Compute and compare the expected colors. + // This is linearToSRGB(srgbToLinear(1.0)*0.5) = linearToSRGB(0.5). + constexpr float k10G = 0.7353569830524495f; + // This is linearToSRGB(srgbToLinear(0.5)*0.5) + constexpr float k05G = 0.3607802138332792f; + // The 'R' component also has a fEpsilonSdr set. + // This is linearToSRGB(srgbToLinear(1.0)*0.5-0.1) = linearToSRGB(0.4). + constexpr float kR10G = 0.6651850846308363f; + // This is linearToSRGB(srgbToLinear(0.5)-0.1) + // The gain map is 0.f (no gain), but there are still affectd by the offset. + constexpr float kR05G = 0.371934685412575f; SkColor4f expectedColors[4][2] = { - {{k10G, 1.0f, 1.0f, 1.0f}, {k10G, 1.0f, 0.5f, 1.0f}}, - {{k10G, 0.5f, 1.0f, 1.0f}, {k10G, 0.5f, 0.5f, 1.0f}}, - {{0.5f, k10G, k10G, 1.0f}, {0.5f, k10G, k05G, 1.0f}}, - {{0.5f, k05G, k10G, 1.0f}, {0.5f, k05G, k05G, 1.0f}}, + {{kR10G, 1.0f, 1.0f, 1.0f}, {kR10G, 1.0f, 0.5f, 1.0f}}, + {{kR10G, 0.5f, 1.0f, 1.0f}, {kR10G, 0.5f, 0.5f, 1.0f}}, + {{kR05G, k10G, k10G, 1.0f}, {kR05G, k10G, k05G, 1.0f}}, + {{kR05G, k05G, k10G, 1.0f}, {kR05G, k05G, k05G, 1.0f}}, }; for (int y = 0; y < 4; ++y) { for (int x = 0; x < 2; ++x) { - auto color = canvasBitmap.getColor4f(x + 1, y + 1); - REPORTER_ASSERT(r, approx_equal(color, expectedColors[y][x])); + const auto color = canvasBitmap.getColor4f(x, y); + const auto& expected = expectedColors[y][x]; + REPORTER_ASSERT(r, + approx_equal(color, expected), + "color (%.3f %.3f %.3f %.3f) does not match expected color (%.3f %.3f " + "%.3f %.3f) at " + "pixel (%d, %d)", + color.fR, + color.fG, + color.fB, + color.fA, + expected.fR, + expected.fG, + expected.fB, + expected.fA, + x, + y); } } } diff --git a/tests/GrClipStackTest.cpp b/tests/GrClipStackTest.cpp index d32a5a55bf9f..a42ff434558d 100644 --- a/tests/GrClipStackTest.cpp +++ b/tests/GrClipStackTest.cpp @@ -26,7 +26,6 @@ #include "include/gpu/mock/GrMockTypes.h" #include "include/private/base/SkTo.h" #include "include/private/gpu/ganesh/GrTypesPriv.h" -#include "src/core/SkMatrixProvider.h" #include "src/core/SkRRectPriv.h" #include "src/gpu/ResourceKey.h" #include "src/gpu/SkBackingFit.h" @@ -342,8 +341,7 @@ void TestCase::run(const std::vector& order, skiatest::Reporter* reporter) const { SkASSERT(fElements.size() == order.size()); - SkMatrixProvider matrixProvider(SkMatrix::I()); - ClipStack cs(fDeviceBounds, &matrixProvider, false); + ClipStack cs(fDeviceBounds, &SkMatrix::I(), false); if (policy == SavePolicy::kAtStart) { cs.save(); @@ -1757,14 +1755,13 @@ DEF_TEST(ClipStack_DiffRects, r) { GrMockOptions options; options.fMaxWindowRectangles = 8; - SkMatrixProvider matrixProvider = SkMatrix::I(); sk_sp context = GrDirectContext::MakeMock(&options); std::unique_ptr sdc = SurfaceDrawContext::Make( context.get(), GrColorType::kRGBA_8888, SkColorSpace::MakeSRGB(), SkBackingFit::kExact, kDeviceBounds.size(), SkSurfaceProps(), /*label=*/{}); - ClipStack cs(kDeviceBounds, &matrixProvider, false); + ClipStack cs(kDeviceBounds, &SkMatrix::I(), false); cs.save(); for (int y = 0; y < 10; ++y) { @@ -1912,14 +1909,13 @@ DEF_TEST(ClipStack_Shader, r) { sk_sp shader = SkShaders::Color({0.f, 0.f, 0.f, 0.5f}, nullptr); - SkMatrixProvider matrixProvider = SkMatrix::I(); sk_sp context = GrDirectContext::MakeMock(nullptr); std::unique_ptr sdc = SurfaceDrawContext::Make( context.get(), GrColorType::kRGBA_8888, SkColorSpace::MakeSRGB(), SkBackingFit::kExact, kDeviceBounds.size(), SkSurfaceProps(), /*label=*/{}); - ClipStack cs(kDeviceBounds, &matrixProvider, false); + ClipStack cs(kDeviceBounds, &SkMatrix::I(), false); cs.save(); cs.clipShader(shader); @@ -1966,14 +1962,13 @@ DEF_TEST(ClipStack_SimpleApply, r) { using ClipStack = skgpu::ganesh::ClipStack; using SurfaceDrawContext = skgpu::ganesh::SurfaceDrawContext; - SkMatrixProvider matrixProvider = SkMatrix::I(); sk_sp context = GrDirectContext::MakeMock(nullptr); std::unique_ptr sdc = SurfaceDrawContext::Make( context.get(), GrColorType::kRGBA_8888, SkColorSpace::MakeSRGB(), SkBackingFit::kExact, kDeviceBounds.size(), SkSurfaceProps(), /*label=*/{}); - ClipStack cs(kDeviceBounds, &matrixProvider, false); + ClipStack cs(kDeviceBounds, &SkMatrix::I(), false); // Offscreen draw is kClippedOut { @@ -2109,8 +2104,7 @@ DEF_GANESH_TEST_FOR_CONTEXTS(ClipStack_SWMask, context, GrColorType::kRGBA_8888, nullptr, SkBackingFit::kExact, kDeviceBounds.size(), SkSurfaceProps(), /*label=*/{}); - SkMatrixProvider matrixProvider = SkMatrix::I(); - std::unique_ptr cs(new ClipStack(kDeviceBounds, &matrixProvider, false)); + std::unique_ptr cs(new ClipStack(kDeviceBounds, &SkMatrix::I(), false)); auto addMaskRequiringClip = [&](SkScalar x, SkScalar y, SkScalar radius) { SkPath path; diff --git a/tests/GrFinishedFlushTest.cpp b/tests/GrFinishedFlushTest.cpp index 51ada91565f7..a0258c47fe21 100644 --- a/tests/GrFinishedFlushTest.cpp +++ b/tests/GrFinishedFlushTest.cpp @@ -178,7 +178,7 @@ static void async_callback(void* c, std::unique_ptr new_SDC(GrRecordingCon SkBackingFit::kExact, {wh, wh}, SkSurfaceProps(), - /*label=*/{}, - 1, + /* label= */ {}, + /* sampleCnt= */ 1, GrMipmapped::kNo, GrProtected::kNo, kImageOrigin, diff --git a/tests/ImageFilterCacheTest.cpp b/tests/ImageFilterCacheTest.cpp index 96ac6b49403d..a51104a436b0 100644 --- a/tests/ImageFilterCacheTest.cpp +++ b/tests/ImageFilterCacheTest.cpp @@ -37,6 +37,7 @@ #include "src/gpu/ganesh/GrSurfaceProxyView.h" #include "src/gpu/ganesh/GrTexture.h" #include "src/gpu/ganesh/SkGr.h" +#include "src/gpu/ganesh/image/SkSpecialImage_Ganesh.h" #include "tests/CtsEnforcement.h" #include "tests/Test.h" @@ -187,12 +188,12 @@ DEF_TEST(ImageFilterCache_RasterBacked, reporter) { const SkIRect& full = SkIRect::MakeWH(kFullSize, kFullSize); - sk_sp fullImg(SkSpecialImage::MakeFromRaster(full, srcBM, SkSurfaceProps())); + sk_sp fullImg(SkSpecialImages::MakeFromRaster(full, srcBM, SkSurfaceProps())); const SkIRect& subset = SkIRect::MakeXYWH(kPad, kPad, kSmallerSize, kSmallerSize); - sk_sp subsetImg(SkSpecialImage::MakeFromRaster(subset, srcBM, - SkSurfaceProps())); + sk_sp subsetImg( + SkSpecialImages::MakeFromRaster(subset, srcBM, SkSurfaceProps())); test_find_existing(reporter, fullImg, subsetImg); test_dont_find_if_diff_key(reporter, fullImg, subsetImg); @@ -207,13 +208,21 @@ static void test_image_backed(skiatest::Reporter* reporter, const sk_sp& srcImage) { const SkIRect& full = SkIRect::MakeWH(kFullSize, kFullSize); - sk_sp fullImg(SkSpecialImage::MakeFromImage(rContext, full, srcImage, - SkSurfaceProps())); + sk_sp fullImg; + if (rContext) { + fullImg = SkSpecialImages::MakeFromTextureImage(rContext, full, srcImage, {}); + } else { + fullImg = SkSpecialImages::MakeFromRaster(full, srcImage, {}); + } const SkIRect& subset = SkIRect::MakeXYWH(kPad, kPad, kSmallerSize, kSmallerSize); - sk_sp subsetImg(SkSpecialImage::MakeFromImage(rContext, subset, srcImage, - SkSurfaceProps())); + sk_sp subsetImg; + if (rContext) { + subsetImg = SkSpecialImages::MakeFromTextureImage(rContext, subset, srcImage, {}); + } else { + subsetImg = SkSpecialImages::MakeFromRaster(subset, srcImage, {}); + } test_find_existing(reporter, fullImg, subsetImg); test_dont_find_if_diff_key(reporter, fullImg, subsetImg); @@ -296,25 +305,23 @@ DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS(ImageFilterCache_GPUBacked, const SkIRect& full = SkIRect::MakeWH(kFullSize, kFullSize); - sk_sp fullImg(SkSpecialImage::MakeDeferredFromGpu( - dContext, full, - kNeedNewImageUniqueID_SpecialImage, - srcView, - { GrColorType::kRGBA_8888, - kPremul_SkAlphaType, - nullptr }, - SkSurfaceProps())); + sk_sp fullImg(SkSpecialImages::MakeDeferredFromGpu( + dContext, + full, + kNeedNewImageUniqueID_SpecialImage, + srcView, + {GrColorType::kRGBA_8888, kPremul_SkAlphaType, nullptr}, + SkSurfaceProps())); const SkIRect& subset = SkIRect::MakeXYWH(kPad, kPad, kSmallerSize, kSmallerSize); - sk_sp subsetImg(SkSpecialImage::MakeDeferredFromGpu( - dContext, subset, - kNeedNewImageUniqueID_SpecialImage, - std::move(srcView), - { GrColorType::kRGBA_8888, - kPremul_SkAlphaType, - nullptr }, - SkSurfaceProps())); + sk_sp subsetImg(SkSpecialImages::MakeDeferredFromGpu( + dContext, + subset, + kNeedNewImageUniqueID_SpecialImage, + std::move(srcView), + {GrColorType::kRGBA_8888, kPremul_SkAlphaType, nullptr}, + SkSurfaceProps())); test_find_existing(reporter, fullImg, subsetImg); test_dont_find_if_diff_key(reporter, fullImg, subsetImg); diff --git a/tests/ImageFilterTest.cpp b/tests/ImageFilterTest.cpp index e9792a9e3e5b..d861b8263c87 100644 --- a/tests/ImageFilterTest.cpp +++ b/tests/ImageFilterTest.cpp @@ -54,6 +54,7 @@ #include "src/gpu/ganesh/GrCaps.h" #include "src/gpu/ganesh/GrRecordingContextPriv.h" #include "src/gpu/ganesh/image/GrImageUtils.h" +#include "src/gpu/ganesh/image/SkSpecialImage_Ganesh.h" #include "tests/CtsEnforcement.h" #include "tests/Test.h" #include "tools/Resources.h" @@ -85,7 +86,7 @@ class MatrixTestImageFilter : public SkImageFilter_Base { } protected: - sk_sp onFilterImage(const Context& ctx, SkIPoint* offset) const override { + sk_sp onFilterImage(const skif::Context& ctx, SkIPoint* offset) const override { REPORTER_ASSERT(fReporter, ctx.ctm() == fExpectedMatrix); offset->fX = offset->fY = 0; return sk_ref_sp(ctx.sourceImage()); @@ -114,7 +115,7 @@ class FailImageFilter : public SkImageFilter_Base { public: FailImageFilter() : INHERITED(nullptr, 0, nullptr) { } - sk_sp onFilterImage(const Context& ctx, SkIPoint* offset) const override { + sk_sp onFilterImage(const skif::Context& ctx, SkIPoint* offset) const override { return nullptr; } @@ -296,7 +297,7 @@ class FixedBoundsImageFilter : public SkImageFilter_Base { Factory getFactory() const override { return nullptr; } const char* getTypeName() const override { return nullptr; } - sk_sp onFilterImage(const Context&, SkIPoint* offset) const override { + sk_sp onFilterImage(const skif::Context&, SkIPoint* offset) const override { return nullptr; } @@ -327,8 +328,8 @@ static skif::Context make_context(const SkIRect& out, const SkSpecialImage* src) src->getColorSpace(), src->props(), /*cache=*/nullptr}; - if (src->isTextureBacked()) { - return skif::Context::MakeGanesh(src->getContext(), kTestSurfaceOrigin, ctxInfo); + if (src->isGaneshBacked()) { + return skif::MakeGaneshContext(src->getContext(), kTestSurfaceOrigin, ctxInfo); } else { return skif::Context::MakeRaster(ctxInfo); } @@ -402,10 +403,10 @@ static sk_sp create_empty_special_surface(GrRecordingContext* kPremul_SkAlphaType); if (rContext) { - return SkSpecialSurface::MakeRenderTarget(rContext, ii, SkSurfaceProps(), + return SkSpecialSurfaces::MakeRenderTarget(rContext, ii, SkSurfaceProps(), kTestSurfaceOrigin); } else { - return SkSpecialSurface::MakeRaster(ii, SkSurfaceProps()); + return SkSpecialSurfaces::MakeRaster(ii, SkSurfaceProps()); } } @@ -587,9 +588,13 @@ static void test_negative_blur_sigma(skiatest::Reporter* reporter, sk_sp negativeFilter(SkImageFilters::Blur(-kBlurSigma, kBlurSigma, nullptr)); sk_sp gradient = make_gradient_circle(kWidth, kHeight).asImage(); - sk_sp imgSrc( - SkSpecialImage::MakeFromImage(dContext, SkIRect::MakeWH(kWidth, kHeight), gradient, - SkSurfaceProps())); + sk_sp imgSrc; + if (dContext) { + imgSrc = SkSpecialImages::MakeFromTextureImage( + dContext, SkIRect::MakeWH(kWidth, kHeight), gradient, SkSurfaceProps()); + } else { + imgSrc = SkSpecialImages::MakeFromRaster(SkIRect::MakeWH(kWidth, kHeight), gradient, {}); + } SkIPoint offset; skif::Context ctx = make_context(32, 32, imgSrc.get()); @@ -681,9 +686,13 @@ static void test_morphology_radius_with_mirror_ctm(skiatest::Reporter* reporter, canvas.drawRect(SkRect::MakeXYWH(kWidth / 4, kHeight / 4, kWidth / 2, kHeight / 2), paint); sk_sp image = bitmap.asImage(); - sk_sp imgSrc( - SkSpecialImage::MakeFromImage(dContext, SkIRect::MakeWH(kWidth, kHeight), image, - SkSurfaceProps())); + sk_sp imgSrc; + if (dContext) { + imgSrc = SkSpecialImages::MakeFromTextureImage( + dContext, SkIRect::MakeWH(kWidth, kHeight), image, SkSurfaceProps()); + } else { + imgSrc = SkSpecialImages::MakeFromRaster(SkIRect::MakeWH(kWidth, kHeight), image, {}); + } SkIPoint offset; skif::Context ctx = make_context(32, 32, imgSrc.get()); @@ -956,7 +965,8 @@ DEF_TEST(ImageFilterBlurThenShadowBounds, reporter) { sk_sp filter2(make_drop_shadow(std::move(filter1))); SkIRect bounds = SkIRect::MakeXYWH(0, 0, 100, 100); - SkIRect expectedBounds = SkIRect::MakeXYWH(-133, -133, 236, 236); + // Drop shadow offset pads 1px on top-left for linear filtering + SkIRect expectedBounds = SkIRect::MakeXYWH(-134, -134, 237, 237); bounds = filter2->filterBounds(bounds, SkMatrix::I(), SkImageFilter::kReverse_MapDirection, &bounds); @@ -968,7 +978,8 @@ DEF_TEST(ImageFilterShadowThenBlurBounds, reporter) { sk_sp filter2(make_blur(std::move(filter1))); SkIRect bounds = SkIRect::MakeXYWH(0, 0, 100, 100); - SkIRect expectedBounds = SkIRect::MakeXYWH(-133, -133, 236, 236); + // Drop shadow offset pads 1px on top-left for linear filtering + SkIRect expectedBounds = SkIRect::MakeXYWH(-134, -134, 237, 237); bounds = filter2->filterBounds(bounds, SkMatrix::I(), SkImageFilter::kReverse_MapDirection, &bounds); @@ -980,7 +991,8 @@ DEF_TEST(ImageFilterDilateThenBlurBounds, reporter) { sk_sp filter2(make_drop_shadow(std::move(filter1))); SkIRect bounds = SkIRect::MakeXYWH(0, 0, 100, 100); - SkIRect expectedBounds = SkIRect::MakeXYWH(-132, -132, 234, 234); + // Drop shadow offset pads 1px on top-left for linear filtering + SkIRect expectedBounds = SkIRect::MakeXYWH(-133, -133, 235, 235); bounds = filter2->filterBounds(bounds, SkMatrix::I(), SkImageFilter::kReverse_MapDirection, &bounds); @@ -1011,8 +1023,11 @@ DEF_TEST(ImageFilterScaledBlurRadius, reporter) { SkIRect shadowBounds = dropShadow->filterBounds( bounds, scaleMatrix, SkImageFilter::kForward_MapDirection, nullptr); REPORTER_ASSERT(reporter, shadowBounds == expectedShadowBounds); + + // An outset by 1px for linear filtering is applied to the input bounds, but only + // the L and T values are visible after the original bounds are joined with it. SkIRect expectedReverseShadowBounds = - SkIRect::MakeLTRB(-260, -260, 200, 200); + SkIRect::MakeLTRB(-261, -261, 200, 200); SkIRect reverseShadowBounds = dropShadow->filterBounds( bounds, scaleMatrix, SkImageFilter::kReverse_MapDirection, &bounds); REPORTER_ASSERT(reporter, reverseShadowBounds == expectedReverseShadowBounds); @@ -1035,8 +1050,10 @@ DEF_TEST(ImageFilterScaledBlurRadius, reporter) { SkIRect shadowBounds = dropShadow->filterBounds( bounds, scaleMatrix, SkImageFilter::kForward_MapDirection, nullptr); REPORTER_ASSERT(reporter, shadowBounds == expectedShadowBounds); + // Like above, the linear outset of 1px only remains visible on the L and B edges + // after joining the original bounds with what's required for the offset. SkIRect expectedReverseShadowBounds = - SkIRect::MakeLTRB(-130, -100, 100, 130); + SkIRect::MakeLTRB(-131, -100, 100, 131); SkIRect reverseShadowBounds = dropShadow->filterBounds( bounds, scaleMatrix, SkImageFilter::kReverse_MapDirection, &bounds); REPORTER_ASSERT(reporter, reverseShadowBounds == expectedReverseShadowBounds); @@ -1252,7 +1269,7 @@ static void test_big_kernel(skiatest::Reporter* reporter, GrRecordingContext* rC skif::Context ctx = make_context(100, 100, srcImg.get()); sk_sp resultImg(as_IFB(filter)->filterImage(ctx).imageAndOffset(ctx, &offset)); REPORTER_ASSERT(reporter, resultImg); - REPORTER_ASSERT(reporter, SkToBool(rContext) == resultImg->isTextureBacked()); + REPORTER_ASSERT(reporter, SkToBool(rContext) == resultImg->isGaneshBacked()); REPORTER_ASSERT(reporter, resultImg->width() == 100 && resultImg->height() == 100); REPORTER_ASSERT(reporter, offset.fX == 0 && offset.fY == 0); } diff --git a/tests/ImageIsOpaqueTest.cpp b/tests/ImageIsOpaqueTest.cpp index ae3c12b16b3a..2052dec7e454 100644 --- a/tests/ImageIsOpaqueTest.cpp +++ b/tests/ImageIsOpaqueTest.cpp @@ -11,6 +11,7 @@ #include "include/core/SkColorSpace.h" #include "include/core/SkImage.h" #include "include/core/SkImageInfo.h" +#include "include/core/SkPicture.h" // IWYU pragma: keep #include "include/core/SkPixmap.h" #include "include/core/SkRefCnt.h" #include "include/core/SkSurface.h" @@ -25,7 +26,6 @@ #include #include -class SkPicture; struct GrContextOptions; static void check_isopaque(skiatest::Reporter* reporter, const sk_sp& surface, diff --git a/tests/ImageTest.cpp b/tests/ImageTest.cpp index b6bcd2eef010..4edc46cd3d19 100644 --- a/tests/ImageTest.cpp +++ b/tests/ImageTest.cpp @@ -1342,7 +1342,7 @@ DEF_TEST(Image_makeColorSpace, r) { *srgbBitmap.getAddr32(0, 0) = SkSwizzle_RGBA_to_PMColor(0xFF604020); srgbBitmap.setImmutable(); sk_sp srgbImage = srgbBitmap.asImage(); - sk_sp p3Image = srgbImage->makeColorSpace(p3); + sk_sp p3Image = srgbImage->makeColorSpace(nullptr, p3); SkBitmap p3Bitmap; bool success = p3Image->asLegacyBitmap(&p3Bitmap); @@ -1353,7 +1353,7 @@ DEF_TEST(Image_makeColorSpace, r) { REPORTER_ASSERT(r, almost_equal(0x40, SkGetPackedG32(*p3Bitmap.getAddr32(0, 0)))); REPORTER_ASSERT(r, almost_equal(0x5E, SkGetPackedB32(*p3Bitmap.getAddr32(0, 0)))); - sk_sp adobeImage = srgbImage->makeColorSpace(adobeGamut); + sk_sp adobeImage = srgbImage->makeColorSpace(nullptr, adobeGamut); SkBitmap adobeBitmap; success = adobeImage->asLegacyBitmap(&adobeBitmap); REPORTER_ASSERT(r, success); @@ -1362,7 +1362,7 @@ DEF_TEST(Image_makeColorSpace, r) { REPORTER_ASSERT(r, almost_equal(0x4C, SkGetPackedB32(*adobeBitmap.getAddr32(0, 0)))); srgbImage = GetResourceAsImage("images/1x1.png"); - p3Image = srgbImage->makeColorSpace(p3); + p3Image = srgbImage->makeColorSpace(nullptr, p3); success = p3Image->asLegacyBitmap(&p3Bitmap); REPORTER_ASSERT(r, success); REPORTER_ASSERT(r, almost_equal(0x8B, SkGetPackedR32(*p3Bitmap.getAddr32(0, 0)))); @@ -1666,5 +1666,5 @@ DEF_TEST(image_subset_encode_skbug_7752, reporter) { check_roundtrip(image); // should trivially pass check_roundtrip(image->makeSubset(nullptr, {0, 0, W/2, H/2})); check_roundtrip(image->makeSubset(nullptr, {W/2, H/2, W, H})); - check_roundtrip(image->makeColorSpace(SkColorSpace::MakeSRGBLinear())); + check_roundtrip(image->makeColorSpace(nullptr, SkColorSpace::MakeSRGBLinear())); } diff --git a/tests/MaskCacheTest.cpp b/tests/MaskCacheTest.cpp index 3d3a4fce2f4f..487672f81d1f 100644 --- a/tests/MaskCacheTest.cpp +++ b/tests/MaskCacheTest.cpp @@ -9,7 +9,7 @@ #include "include/core/SkRRect.h" #include "include/core/SkRect.h" #include "include/core/SkScalar.h" -#include "include/private/base/SkMalloc.h" +#include "src/base/SkTLazy.h" #include "src/core/SkCachedData.h" #include "src/core/SkMask.h" #include "src/core/SkMaskCache.h" @@ -44,29 +44,28 @@ DEF_TEST(RRectMaskCache, reporter) { SkRRect rrect; rrect.setRectXY(rect, 30, 30); SkBlurStyle style = kNormal_SkBlurStyle; - SkMask mask; + SkTLazy lazyMask; - SkCachedData* data = SkMaskCache::FindAndRef(sigma, style, rrect, &mask, &cache); + SkCachedData* data = SkMaskCache::FindAndRef(sigma, style, rrect, &lazyMask, &cache); REPORTER_ASSERT(reporter, nullptr == data); + REPORTER_ASSERT(reporter, !lazyMask.isValid()); size_t size = 256; data = cache.newCachedData(size); memset(data->writable_data(), 0xff, size); - mask.fBounds.setXYWH(0, 0, 100, 100); - mask.fRowBytes = 100; - mask.fFormat = SkMask::kBW_Format; + SkMask mask(nullptr, SkIRect::MakeXYWH(0, 0, 100, 100), 100, SkMask::kBW_Format); SkMaskCache::Add(sigma, style, rrect, mask, data, &cache); check_data(reporter, data, 2, kInCache, kLocked); data->unref(); check_data(reporter, data, 1, kInCache, kUnlocked); - sk_bzero(&mask, sizeof(mask)); - data = SkMaskCache::FindAndRef(sigma, style, rrect, &mask, &cache); + lazyMask.reset(); + data = SkMaskCache::FindAndRef(sigma, style, rrect, &lazyMask, &cache); REPORTER_ASSERT(reporter, data); REPORTER_ASSERT(reporter, data->size() == size); - REPORTER_ASSERT(reporter, mask.fBounds.top() == 0 && mask.fBounds.bottom() == 100); - REPORTER_ASSERT(reporter, data->data() == (const void*)mask.fImage); + REPORTER_ASSERT(reporter, lazyMask->fBounds.top() == 0 && lazyMask->fBounds.bottom() == 100); + REPORTER_ASSERT(reporter, data->data() == static_cast(lazyMask->fImage)); check_data(reporter, data, 2, kInCache, kLocked); cache.purgeAll(); @@ -81,29 +80,28 @@ DEF_TEST(RectsMaskCache, reporter) { SkRect rect = SkRect::MakeWH(100, 100); SkRect rects[2] = {rect}; SkBlurStyle style = kNormal_SkBlurStyle; - SkMask mask; + SkTLazy lazyMask; - SkCachedData* data = SkMaskCache::FindAndRef(sigma, style, rects, 1, &mask, &cache); + SkCachedData* data = SkMaskCache::FindAndRef(sigma, style, rects, 1, &lazyMask, &cache); REPORTER_ASSERT(reporter, nullptr == data); + REPORTER_ASSERT(reporter, !lazyMask.isValid()); size_t size = 256; data = cache.newCachedData(size); memset(data->writable_data(), 0xff, size); - mask.fBounds.setXYWH(0, 0, 100, 100); - mask.fRowBytes = 100; - mask.fFormat = SkMask::kBW_Format; + SkMask mask(nullptr, SkIRect::MakeXYWH(0, 0, 100, 100), 100, SkMask::kBW_Format); SkMaskCache::Add(sigma, style, rects, 1, mask, data, &cache); check_data(reporter, data, 2, kInCache, kLocked); data->unref(); check_data(reporter, data, 1, kInCache, kUnlocked); - sk_bzero(&mask, sizeof(mask)); - data = SkMaskCache::FindAndRef(sigma, style, rects, 1, &mask, &cache); + lazyMask.reset(); + data = SkMaskCache::FindAndRef(sigma, style, rects, 1, &lazyMask, &cache); REPORTER_ASSERT(reporter, data); REPORTER_ASSERT(reporter, data->size() == size); - REPORTER_ASSERT(reporter, mask.fBounds.top() == 0 && mask.fBounds.bottom() == 100); - REPORTER_ASSERT(reporter, data->data() == (const void*)mask.fImage); + REPORTER_ASSERT(reporter, lazyMask->fBounds.top() == 0 && lazyMask->fBounds.bottom() == 100); + REPORTER_ASSERT(reporter, data->data() == static_cast(lazyMask->fImage)); check_data(reporter, data, 2, kInCache, kLocked); cache.purgeAll(); diff --git a/tests/MathTest.cpp b/tests/MathTest.cpp index c1c3f422ad57..2f5911d8d10a 100644 --- a/tests/MathTest.cpp +++ b/tests/MathTest.cpp @@ -24,7 +24,6 @@ #include #include #include -#include static void test_clz(skiatest::Reporter* reporter) { REPORTER_ASSERT(reporter, 32 == SkCLZ(0)); @@ -292,48 +291,6 @@ static void test_rsqrt(skiatest::Reporter* reporter, RSqrtFn rsqrt) { } } -static void test_nextlog2(skiatest::Reporter* r) { - REPORTER_ASSERT(r, sk_float_nextlog2(-std::numeric_limits::infinity()) == 0); - REPORTER_ASSERT(r, sk_float_nextlog2(-std::numeric_limits::max()) == 0); - REPORTER_ASSERT(r, sk_float_nextlog2(-1000.0f) == 0); - REPORTER_ASSERT(r, sk_float_nextlog2(-0.1f) == 0); - REPORTER_ASSERT(r, sk_float_nextlog2(-std::numeric_limits::min()) == 0); - REPORTER_ASSERT(r, sk_float_nextlog2(-std::numeric_limits::denorm_min()) == 0); - REPORTER_ASSERT(r, sk_float_nextlog2(0.0f) == 0); - REPORTER_ASSERT(r, sk_float_nextlog2(std::numeric_limits::denorm_min()) == 0); - REPORTER_ASSERT(r, sk_float_nextlog2(std::numeric_limits::min()) == 0); - REPORTER_ASSERT(r, sk_float_nextlog2(0.1f) == 0); - REPORTER_ASSERT(r, sk_float_nextlog2(1.0f) == 0); - REPORTER_ASSERT(r, sk_float_nextlog2(1.1f) == 1); - REPORTER_ASSERT(r, sk_float_nextlog2(2.0f) == 1); - REPORTER_ASSERT(r, sk_float_nextlog2(2.1f) == 2); - REPORTER_ASSERT(r, sk_float_nextlog2(3.0f) == 2); - REPORTER_ASSERT(r, sk_float_nextlog2(3.1f) == 2); - REPORTER_ASSERT(r, sk_float_nextlog2(4.0f) == 2); - REPORTER_ASSERT(r, sk_float_nextlog2(4.1f) == 3); - REPORTER_ASSERT(r, sk_float_nextlog2(5.0f) == 3); - REPORTER_ASSERT(r, sk_float_nextlog2(5.1f) == 3); - REPORTER_ASSERT(r, sk_float_nextlog2(6.0f) == 3); - REPORTER_ASSERT(r, sk_float_nextlog2(6.1f) == 3); - REPORTER_ASSERT(r, sk_float_nextlog2(7.0f) == 3); - REPORTER_ASSERT(r, sk_float_nextlog2(7.1f) == 3); - REPORTER_ASSERT(r, sk_float_nextlog2(8.0f) == 3); - REPORTER_ASSERT(r, sk_float_nextlog2(8.1f) == 4); - REPORTER_ASSERT(r, sk_float_nextlog2(9.0f) == 4); - REPORTER_ASSERT(r, sk_float_nextlog2(9.1f) == 4); - REPORTER_ASSERT(r, sk_float_nextlog2(std::numeric_limits::max()) == 128); - REPORTER_ASSERT(r, sk_float_nextlog2(std::numeric_limits::infinity()) > 0); - REPORTER_ASSERT(r, sk_float_nextlog2(std::numeric_limits::quiet_NaN()) >= 0); - - for (int i = 0; i < 100; ++i) { - float pow2 = std::ldexp(1, i); - float epsilon = std::ldexp(SK_ScalarNearlyZero, i); - REPORTER_ASSERT(r, sk_float_nextlog2(pow2) == i); - REPORTER_ASSERT(r, sk_float_nextlog2(pow2 + epsilon) == i + 1); - REPORTER_ASSERT(r, sk_float_nextlog2(pow2 - epsilon) == i); - } -} - static void test_muldiv255(skiatest::Reporter* reporter) { for (int a = 0; a <= 255; a++) { for (int b = 0; b <= 255; b++) { @@ -586,7 +543,6 @@ DEF_TEST(Math, reporter) { unittest_half(reporter); test_rsqrt(reporter, sk_float_rsqrt); test_rsqrt(reporter, sk_float_rsqrt_portable); - test_nextlog2(reporter); for (i = 0; i < 10000; i++) { SkFixed numer = rand.nextS(); diff --git a/tests/MetaDataTest.cpp b/tests/MetaDataTest.cpp index 52885d65b9aa..11f45728de3c 100644 --- a/tests/MetaDataTest.cpp +++ b/tests/MetaDataTest.cpp @@ -9,11 +9,12 @@ #include "tests/Test.h" #include "tools/SkMetaData.h" +#include #include #include DEF_TEST(MetaData, reporter) { - SkMetaData m1; + SkMetaData m1; REPORTER_ASSERT(reporter, !m1.findS32("int")); REPORTER_ASSERT(reporter, !m1.findScalar("scalar")); @@ -26,8 +27,8 @@ DEF_TEST(MetaData, reporter) { m1.setBool("true", true); m1.setBool("false", false); - int32_t n; - SkScalar s; + int32_t n; + SkScalar s; m1.setScalar("scalar", SK_Scalar1/2); @@ -51,9 +52,9 @@ DEF_TEST(MetaData, reporter) { { "false", SkMetaData::kBool_Type, 1 } }; - int loop = 0; + size_t loop = 0; int count; - SkMetaData::Type t; + SkMetaData::Type t; while ((name = iter.next(&t, &count)) != nullptr) { int match = 0; diff --git a/tests/MultiPictureDocumentTest.cpp b/tests/MultiPictureDocumentTest.cpp index 19485a014475..7694be3b6f7d 100644 --- a/tests/MultiPictureDocumentTest.cpp +++ b/tests/MultiPictureDocumentTest.cpp @@ -181,12 +181,12 @@ DEF_TEST(SkMultiPictureDocument_Serialize_and_deserialize, reporter) { #if defined(SK_GANESH) && defined(SK_BUILD_FOR_ANDROID) && __ANDROID_API__ >= 26 +#include "include/android/GrAHardwareBufferUtils.h" #include "include/core/SkBitmap.h" #include "include/core/SkColorSpace.h" #include "include/core/SkColorType.h" #include "include/gpu/GrDirectContext.h" #include "include/gpu/ganesh/SkImageGanesh.h" -#include "src/gpu/ganesh/GrAHardwareBufferUtils_impl.h" #include "src/gpu/ganesh/GrCaps.h" #include "src/gpu/ganesh/GrDirectContextPriv.h" diff --git a/tests/PDFPrimitivesTest.cpp b/tests/PDFPrimitivesTest.cpp index c78c367d586b..95413205163f 100644 --- a/tests/PDFPrimitivesTest.cpp +++ b/tests/PDFPrimitivesTest.cpp @@ -35,6 +35,7 @@ #include "include/private/base/SkFloatingPoint.h" #include "include/private/base/SkTo.h" #include "src/base/SkRandom.h" +#include "src/core/SkImageFilterTypes.h" #include "src/core/SkImageFilter_Base.h" #include "src/core/SkReadBuffer.h" #include "src/core/SkSpecialImage.h" @@ -282,7 +283,7 @@ class TestImageFilter : public SkImageFilter_Base { bool visited() const { return fVisited; } protected: - sk_sp onFilterImage(const Context& ctx, SkIPoint* offset) const override { + sk_sp onFilterImage(const skif::Context& ctx, SkIPoint* offset) const override { fVisited = true; offset->fX = offset->fY = 0; return sk_ref_sp(ctx.sourceImage()); diff --git a/tests/PathRendererCacheTests.cpp b/tests/PathRendererCacheTests.cpp index 2f884e1c426a..22ea0755f1b0 100644 --- a/tests/PathRendererCacheTests.cpp +++ b/tests/PathRendererCacheTests.cpp @@ -114,7 +114,7 @@ static void test_path( {800, 800}, SkSurfaceProps(), /*label=*/{}, - 1, + /* sampleCnt= */ 1, GrMipmapped::kNo, GrProtected::kNo, kTopLeft_GrSurfaceOrigin); diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp index 7cba2471a37f..319ebdd35e5e 100644 --- a/tests/PathTest.cpp +++ b/tests/PathTest.cpp @@ -36,7 +36,6 @@ #include "include/private/base/SkFloatBits.h" #include "include/private/base/SkFloatingPoint.h" #include "include/private/base/SkMalloc.h" -#include "include/private/base/SkPathEnums.h" #include "include/private/base/SkTo.h" #include "include/utils/SkNullCanvas.h" #include "include/utils/SkParse.h" @@ -44,6 +43,7 @@ #include "src/base/SkAutoMalloc.h" #include "src/base/SkRandom.h" #include "src/core/SkGeometry.h" +#include "src/core/SkPathEnums.h" #include "src/core/SkPathPriv.h" #include "src/core/SkReadBuffer.h" #include "src/core/SkWriteBuffer.h" @@ -5810,20 +5810,38 @@ static void test_addPath_and_injected_moveTo(skiatest::Reporter* reporter) { }; SkPath path1; - SkPath path2; - path1.moveTo(230, 230); // Needed to show the bug: a moveTo before the addRect + path1.moveTo(20,30).lineTo(40,30).lineTo(40,50).lineTo(20,50); + SkPath path1c(path1); + path1c.close(); - // add a rect, but the shape doesn't really matter - path1.moveTo(20,30).lineTo(40,30).lineTo(40,50).lineTo(20,50).close(); - - path2.addPath(path1); // this must correctly update its "last-move-to" so that when - // lineTo is called, it will inject the correct moveTo. - - // at this point, path1 and path2 should be the same... - - test_before_after_lineto(path1, {20,50}, {20,30}); + SkPath path2; + // If path2 contains zero points, the update calculation isn't tested. + path2.moveTo(144, 72); + path2.lineTo(146, 72); + SkPath path2c(path2); + path2c.close(); + SkPath path3(path2); + SkPath path3c(path2c); + + // Test addPath, adding a path that ends with close. + // The start point of the last contour added, + // and the internal flag tracking whether it is closed, + // must be updated correctly. + path2.addPath(path1c); + path2c.addPath(path1c); + // At this point, path1c, path2, and path2c should end the same way. + test_before_after_lineto(path1c, {20,50}, {20,30}); test_before_after_lineto(path2, {20,50}, {20,30}); + test_before_after_lineto(path2c, {20,50}, {20,30}); + + // Test addPath, adding a path not ending in close. + path3.addPath(path1); + path3c.addPath(path1); + // At this point, path1, path3, and path3c should end the same way. + test_before_after_lineto(path1, {20,50}, {20,50}); + test_before_after_lineto(path3, {20,50}, {20,50}); + test_before_after_lineto(path3c, {20,50}, {20,50}); } DEF_TEST(pathedger, r) { @@ -5847,13 +5865,28 @@ DEF_TEST(pathedger, r) { } DEF_TEST(path_addpath_crbug_1153516, r) { - // When we add a path to another path, we need to sniff out in case the argument ended - // with a kClose, in which case we need to fiddle with our lastMoveIndex (as ::close() does) + // When we add a closed path to another path, verify + // that the result has the right value for last contour start point. SkPath p1, p2; + p2.lineTo(10,20); p1.addRect({143,226,200,241}); + p2.addPath(p1); + p2.lineTo(262,513); // this should not assert + SkPoint rectangleStart = {143, 226}; + SkPoint lineEnd = {262, 513}; + SkPoint actualMoveTo = p2.getPoint(p2.countPoints() - 2); + REPORTER_ASSERT(r, actualMoveTo == rectangleStart ); + SkPoint actualLineTo = p2.getPoint(p2.countPoints() - 1); + REPORTER_ASSERT(r, actualLineTo == lineEnd); + + // Verify adding a closed path to itself p1.addPath(p1); - p1.lineTo(262,513); // this should not assert -} + p1.lineTo(262,513); + actualMoveTo = p1.getPoint(p1.countPoints() - 2); + REPORTER_ASSERT(r, actualMoveTo == rectangleStart ); + actualLineTo = p1.getPoint(p1.countPoints() - 1); + REPORTER_ASSERT(r, actualLineTo == lineEnd); + } DEF_TEST(path_convexity_scale_way_down, r) { SkPath path = SkPathBuilder().moveTo(0,0).lineTo(1, 0) diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp index 9074a1879474..5d3c4669c952 100644 --- a/tests/PictureTest.cpp +++ b/tests/PictureTest.cpp @@ -755,28 +755,6 @@ DEF_TEST(Picture_UpdatedCull_2, r) { REPORTER_ASSERT(r, pic->cullRect() == SkRectPriv::MakeLargest()); } -DEF_TEST(Picture_RecordsFlush, r) { - SkPictureRecorder recorder; - - auto canvas = recorder.beginRecording(SkRect::MakeWH(100,100)); - for (int i = 0; i < 10; i++) { - canvas->clear(0); - for (int j = 0; j < 10; j++) { - canvas->drawRect(SkRect::MakeXYWH(i*10,j*10,10,10), SkPaint()); - } - canvas->flush(); - } - - // Did we record the flushes? - auto pic = recorder.finishRecordingAsPicture(); - REPORTER_ASSERT(r, pic->approximateOpCount() == 120); // 10 clears, 100 draws, 10 flushes - - // Do we serialize and deserialize flushes? - auto skp = pic->serialize(); - auto back = SkPicture::MakeFromData(skp->data(), skp->size()); - REPORTER_ASSERT(r, back->approximateOpCount() == pic->approximateOpCount()); -} - DEF_TEST(Placeholder, r) { SkRect cull = { 0,0, 10,20 }; diff --git a/tests/ProtectedTest.cpp b/tests/ProtectedTest.cpp index 1288fed17d97..0474318f2434 100644 --- a/tests/ProtectedTest.cpp +++ b/tests/ProtectedTest.cpp @@ -11,156 +11,27 @@ #include "include/core/SkBitmap.h" #include "include/core/SkSurface.h" -#include "include/gpu/ganesh/SkImageGanesh.h" -#include "include/gpu/ganesh/SkSurfaceGanesh.h" -#include "src/gpu/ganesh/GrDirectContextPriv.h" +#include "include/gpu/GrBackendSurface.h" +#include "include/gpu/GrDirectContext.h" #include "tests/CtsEnforcement.h" -#include "tools/gpu/BackendSurfaceFactory.h" -#include "tools/gpu/BackendTextureImageFactory.h" +#include "tools/gpu/ProtectedUtils.h" -#ifdef SK_GL -#include "src/gpu/ganesh/gl/GrGLCaps.h" -#endif -#ifdef SK_VULKAN -#include "src/gpu/ganesh/vk/GrVkCaps.h" -#endif - -namespace { - -bool context_supports_protected(GrDirectContext* dContext) { - [[maybe_unused]] const GrCaps* caps = dContext->priv().caps(); - -#ifdef SK_GL - if (dContext->backend() == GrBackendApi::kOpenGL) { - const GrGLCaps* glCaps = static_cast(caps); - return glCaps->supportsProtected(); - } -#endif -#ifdef SK_VULKAN - if (dContext->backend() == GrBackendApi::kVulkan) { - const GrVkCaps* vkCaps = static_cast(caps); - return vkCaps->supportsProtectedMemory(); - } -#endif - if (dContext->backend() == GrBackendApi::kMock) { - return true; - } - - // Metal, Dawn and D3D don't support protected textures - return false; -} - -sk_sp create_protected_sksurface(GrDirectContext* dContext, - skiatest::Reporter* reporter, - bool textureable, - bool isProtected) { - const int kW = 8; - const int kH = 8; - SkSurfaceProps surfaceProps = SkSurfaceProps(0, kRGB_H_SkPixelGeometry); - sk_sp surface; - if (textureable) { - surface = sk_gpu_test::MakeBackendTextureSurface(dContext, - {kW, kH}, - kTopLeft_GrSurfaceOrigin, - 1, - kRGBA_8888_SkColorType, - /* colorSpace= */ nullptr, - GrMipmapped::kNo, - skgpu::Protected(isProtected), - &surfaceProps); - } else { - surface = sk_gpu_test::MakeBackendRenderTargetSurface(dContext, - {kW, kH}, - kTopLeft_GrSurfaceOrigin, - 1, - kRGBA_8888_SkColorType, - /* colorSpace= */ nullptr, - skgpu::Protected(isProtected), - &surfaceProps); - } - if (!surface) { - ERRORF(reporter, "Could not create %s surface.", isProtected ? "protected" : "unprotected"); - return nullptr; - } - - SkCanvas* canvas = surface->getCanvas(); - - canvas->clear(SkColors::kBlue); - - if (textureable) { - GrBackendTexture backendTex = SkSurfaces::GetBackendTexture( - surface.get(), SkSurfaces::BackendHandleAccess::kFlushRead); - REPORTER_ASSERT(reporter, backendTex.isValid()); - REPORTER_ASSERT(reporter, backendTex.isProtected() == isProtected); - } else { - GrBackendRenderTarget backendRT = SkSurfaces::GetBackendRenderTarget( - surface.get(), SkSurfaces::BackendHandleAccess::kFlushRead); - REPORTER_ASSERT(reporter, backendRT.isValid()); - REPORTER_ASSERT(reporter, backendRT.isProtected() == isProtected); - } - - return surface; -} - -void check_image_be_protection(SkImage* image, - skiatest::Reporter* reporter, - bool expectingProtected) { - GrBackendTexture beTex; - GrSurfaceOrigin origin; - bool result = SkImages::GetBackendTextureFromImage(image, - &beTex, - true, - &origin); - if (!result) { - ERRORF(reporter, "GetBackendTextureFromImage failed"); - return; - } - - REPORTER_ASSERT(reporter, beTex.isValid()); - REPORTER_ASSERT(reporter, beTex.isProtected() == expectingProtected); -} - -sk_sp create_protected_skimage(GrDirectContext* dContext, - skiatest::Reporter* reporter, - SkColor4f color, - bool isProtected) { - const int kW = 8; - const int kH = 8; - - SkImageInfo ii = SkImageInfo::Make(kW, kH, kRGBA_8888_SkColorType, kPremul_SkAlphaType); - - sk_sp image = sk_gpu_test::MakeBackendTextureImage(dContext, - ii, - color, - GrMipmapped::kNo, - GrRenderable::kNo, - kTopLeft_GrSurfaceOrigin, - skgpu::Protected(isProtected)); - if (!image) { - ERRORF(reporter, "Could not create %s image.", isProtected ? "protected" : "unprotected"); - return nullptr; - } - - check_image_be_protection(image.get(), reporter, isProtected); - - return image; -} - - -} // anonymous namespace +static const int kSize = 8; DEF_GANESH_TEST_FOR_ALL_CONTEXTS(Protected_SmokeTest, reporter, ctxInfo, CtsEnforcement::kNever) { auto dContext = ctxInfo.directContext(); - if (!context_supports_protected(dContext)) { + if (!ProtectedUtils::ContextSupportsProtected(dContext)) { // Protected content not supported return; } for (bool textureable : { true, false }) { for (bool isProtected : { true, false }) { - sk_sp surface = create_protected_sksurface(dContext, reporter, textureable, - isProtected); + sk_sp surface = ProtectedUtils::CreateProtectedSkSurface(dContext, + { kSize, kSize }, + textureable, + isProtected); if (!surface) { continue; } @@ -174,12 +45,13 @@ DEF_GANESH_TEST_FOR_ALL_CONTEXTS(Protected_SmokeTest, reporter, ctxInfo, CtsEnfo dContext->submit(/* syncCpu= */ true); - check_image_be_protection(image.get(), reporter, isProtected); + ProtectedUtils::CheckImageBEProtection(image.get(), isProtected); } } for (bool isProtected : { true, false }) { - create_protected_skimage(dContext, reporter, SkColors::kBlue, isProtected); + ProtectedUtils::CreateProtectedSkImage(dContext, { kSize, kSize }, SkColors::kBlue, + isProtected); } for (bool renderable : { true, false }) { @@ -208,15 +80,16 @@ DEF_GANESH_TEST_FOR_ALL_CONTEXTS(Protected_readPixelsFromSurfaces, reporter, ctx CtsEnforcement::kNever) { auto dContext = ctxInfo.directContext(); - if (!context_supports_protected(dContext)) { + if (!ProtectedUtils::ContextSupportsProtected(dContext)) { // Protected content not supported return; } for (bool isProtected : { true, false }) { - sk_sp surface = create_protected_sksurface(dContext, reporter, - /* textureable= */ true, - isProtected); + sk_sp surface = ProtectedUtils::CreateProtectedSkSurface(dContext, + { kSize, kSize }, + /* textureable= */ true, + isProtected); if (!surface) { continue; } @@ -247,15 +120,16 @@ DEF_GANESH_TEST_FOR_ALL_CONTEXTS(Protected_asyncRescaleAndReadPixelsFromSurfaces CtsEnforcement::kNever) { auto dContext = ctxInfo.directContext(); - if (!context_supports_protected(dContext)) { + if (!ProtectedUtils::ContextSupportsProtected(dContext)) { // Protected content not supported return; } for (bool isProtected : { true, false }) { - sk_sp surface = create_protected_sksurface(dContext, reporter, - /* textureable= */ true, - isProtected); + sk_sp surface = ProtectedUtils::CreateProtectedSkSurface(dContext, + { kSize, kSize }, + /* textureable= */ true, + isProtected); if (!surface) { continue; } diff --git a/tests/ProxyTest.cpp b/tests/ProxyTest.cpp index e137317e25bb..c577eb40310b 100644 --- a/tests/ProxyTest.cpp +++ b/tests/ProxyTest.cpp @@ -35,7 +35,7 @@ #include "tools/gpu/ManagedBackendTexture.h" #if defined(SK_GL) -#include "src/gpu/ganesh/gl/GrGLUtil.h" +#include "include/gpu/ganesh/gl/GrGLBackendSurface.h" #endif #include @@ -286,12 +286,12 @@ DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS(WrappedProxyTest, if (GrBackendApi::kOpenGL == ctxInfo.backend()) { GrGLFramebufferInfo fboInfo; fboInfo.fFBOID = 0; - fboInfo.fFormat = GrGLFormatToEnum(beFormat.asGLFormat()); + fboInfo.fFormat = GrBackendFormats::AsGLFormatEnum(beFormat); fboInfo.fProtected = skgpu::Protected::kNo; SkASSERT(fboInfo.fFormat); static constexpr int kStencilBits = 8; - GrBackendRenderTarget backendRT(kWidthHeight, kWidthHeight, numSamples, - kStencilBits, fboInfo); + GrBackendRenderTarget backendRT = GrBackendRenderTargets::MakeGL( + kWidthHeight, kWidthHeight, numSamples, kStencilBits, fboInfo); sk_sp sProxy( proxyProvider->wrapBackendRenderTarget(backendRT, nullptr)); check_surface( diff --git a/tests/RasterPipelineBuilderTest.cpp b/tests/RasterPipelineBuilderTest.cpp index 93b54048cc6c..aeda12ef9748 100644 --- a/tests/RasterPipelineBuilderTest.cpp +++ b/tests/RasterPipelineBuilderTest.cpp @@ -14,8 +14,6 @@ #include "src/sksl/tracing/SkSLDebugTracePriv.h" #include "tests/Test.h" -#ifdef SK_ENABLE_SKSL_IN_RASTER_PIPELINE - static sk_sp get_program_dump(SkSL::RP::Program& program) { SkDynamicMemoryWStream stream; program.dump(&stream); @@ -74,7 +72,8 @@ DEF_TEST(RasterPipelineBuilder, r) { builder.load_src(four_slots_at(1)); builder.load_dst(four_slots_at(3)); std::unique_ptr program = builder.finish(/*numValueSlots=*/10, - /*numUniformSlots=*/0); + /*numUniformSlots=*/0, + /*numImmutableSlots=*/0); check(r, *program, R"(store_src_rg v0..1 = src.rg store_src v2..5 = src.rgba @@ -116,7 +115,8 @@ DEF_TEST(RasterPipelineBuilderPushPopMaskRegisters, r) { REPORTER_ASSERT(r, !builder.executionMaskWritesAreEnabled()); std::unique_ptr program = builder.finish(/*numValueSlots=*/0, - /*numUniformSlots=*/0); + /*numUniformSlots=*/0, + /*numImmutableSlots=*/0); check(r, *program, R"(store_condition_mask $0 = CondMask store_loop_mask $1 = LoopMask @@ -146,7 +146,8 @@ DEF_TEST(RasterPipelineBuilderCaseOp, r) { builder.discard_stack(2); std::unique_ptr program = builder.finish(/*numValueSlots=*/0, - /*numUniformSlots=*/0); + /*numUniformSlots=*/0, + /*numImmutableSlots=*/0); check(r, *program, R"(copy_constant $0 = 0x0000007B (1.723597e-43) copy_constant $1 = 0xFFFFFFFF @@ -168,7 +169,8 @@ DEF_TEST(RasterPipelineBuilderPushPopSrcDst, r) { builder.pop_dst_rgba(); std::unique_ptr program = builder.finish(/*numValueSlots=*/0, - /*numUniformSlots=*/0); + /*numUniformSlots=*/0, + /*numImmutableSlots=*/0); check(r, *program, R"(store_src $0..3 = src.rgba store_dst $4..7 = dst.rgba @@ -187,8 +189,9 @@ DEF_TEST(RasterPipelineBuilderInvokeChild, r) { builder.invoke_blender(3); std::unique_ptr program = builder.finish(/*numValueSlots=*/0, - /*numUniformSlots=*/0); - check(r, *program, + /*numUniformSlots=*/0, + /*numImmutableSlots=*/0); +check(r, *program, R"(invoke_shader invoke_shader 0x00000001 invoke_color_filter invoke_color_filter 0x00000002 invoke_blender invoke_blender 0x00000003 @@ -216,7 +219,8 @@ DEF_TEST(RasterPipelineBuilderPushPopTempImmediates, r) { builder.push_constant_f(3.4f); // push into 6 builder.discard_stack(7); // discard 0 through 6 std::unique_ptr program = builder.finish(/*numValueSlots=*/1, - /*numUniformSlots=*/0); + /*numUniformSlots=*/0, + /*numImmutableSlots=*/0); check(r, *program, R"(copy_constant $2 = 0x000003E7 (1.399897e-42) copy_constant $0 = 0x41580000 (13.5) @@ -243,7 +247,8 @@ DEF_TEST(RasterPipelineBuilderPushPopIndirect, r) { builder.set_current_stack(1); builder.discard_stack(1); std::unique_ptr program = builder.finish(/*numValueSlots=*/20, - /*numUniformSlots=*/10); + /*numUniformSlots=*/10, + /*numImmutableSlots=*/0); check(r, *program, R"(copy_constant $10 = 0x00000003 (4.203895e-45) copy_from_indirect_unmasked $0..1 = Indirect(v0..1 + $10) @@ -263,7 +268,8 @@ DEF_TEST(RasterPipelineBuilderCopySlotsMasked, r) { builder.copy_slots_masked(two_slots_at(0), two_slots_at(2)); builder.copy_slots_masked(four_slots_at(1), four_slots_at(5)); std::unique_ptr program = builder.finish(/*numValueSlots=*/9, - /*numUniformSlots=*/0); + /*numUniformSlots=*/0, + /*numImmutableSlots=*/0); check(r, *program, R"(copy_2_slots_masked v0..1 = Mask(v2..3) copy_4_slots_masked v1..4 = Mask(v5..8) @@ -276,7 +282,8 @@ DEF_TEST(RasterPipelineBuilderCopySlotsUnmasked, r) { builder.copy_slots_unmasked(three_slots_at(0), three_slots_at(2)); builder.copy_slots_unmasked(five_slots_at(1), five_slots_at(5)); std::unique_ptr program = builder.finish(/*numValueSlots=*/10, - /*numUniformSlots=*/0); + /*numUniformSlots=*/0, + /*numImmutableSlots=*/0); check(r, *program, R"(copy_3_slots_unmasked v0..2 = v2..4 copy_4_slots_unmasked v1..4 = v5..8 @@ -297,7 +304,8 @@ DEF_TEST(RasterPipelineBuilderPushPopSlots, r) { builder.disableExecutionMaskWrites(); std::unique_ptr program = builder.finish(/*numValueSlots=*/50, - /*numUniformSlots=*/0); + /*numUniformSlots=*/0, + /*numImmutableSlots=*/0); check(r, *program, R"(copy_4_slots_unmasked $0..3 = v10..13 copy_slot_unmasked v5 = $1 @@ -327,7 +335,8 @@ DEF_TEST(RasterPipelineBuilderDuplicateSelectAndSwizzleSlots, r) { builder.swizzle(2, {0}); // eliminate element 1 (value.x) builder.discard_stack(1); // balance stack std::unique_ptr program = builder.finish(/*numValueSlots=*/6, - /*numUniformSlots=*/0); + /*numUniformSlots=*/0, + /*numImmutableSlots=*/0); check(r, *program, R"(splat_4_constants $0..3 = 0x3F800000 (1.0) splat_4_constants $4..7 = 0x3F800000 (1.0) @@ -354,7 +363,8 @@ DEF_TEST(RasterPipelineBuilderTransposeMatrix, r) { builder.transpose(4, 3); // transpose a 4x3 matrix builder.discard_stack(16); // balance stack std::unique_ptr program = builder.finish(/*numValueSlots=*/0, - /*numUniformSlots=*/0); + /*numUniformSlots=*/0, + /*numImmutableSlots=*/0); check(r, *program, R"(splat_4_constants $0..3 = 0x3F800000 (1.0) splat_4_constants $4..7 = 0x3F800000 (1.0) @@ -384,7 +394,8 @@ DEF_TEST(RasterPipelineBuilderDiagonalMatrix, r) { builder.diagonal_matrix(2, 3); // generate a 2x3 diagonal matrix builder.discard_stack(6); // balance stack std::unique_ptr program = builder.finish(/*numValueSlots=*/0, - /*numUniformSlots=*/0); + /*numUniformSlots=*/0, + /*numImmutableSlots=*/0); check(r, *program, R"(copy_constant $0 = 0 copy_constant $1 = 0x3F800000 (1.0) @@ -412,7 +423,8 @@ DEF_TEST(RasterPipelineBuilderMatrixResize, r) { builder.matrix_resize(4, 2, 3, 3); // resize 4x2 matrix into 3x3 builder.discard_stack(9); // balance stack std::unique_ptr program = builder.finish(/*numValueSlots=*/0, - /*numUniformSlots=*/0); + /*numUniformSlots=*/0, + /*numImmutableSlots=*/0); check(r, *program, R"(copy_constant $0 = 0x3F800000 (1.0) copy_constant $1 = 0x40000000 (2.0) @@ -542,7 +554,8 @@ branch_if_no_active_lanes_eq branch -16 (label 0 at #2) if no lanes of v2 == 0 } std::unique_ptr program = builder.finish(/*numValueSlots=*/3, - /*numUniformSlots=*/0); + /*numUniformSlots=*/0, + /*numImmutableSlots=*/0); check(r, *program, enableExecutionMaskWrites ? kExpectationWithExecutionMaskWrites : kExpectationWithKnownExecutionMask); @@ -567,7 +580,8 @@ DEF_TEST(RasterPipelineBuilderBinaryFloatOps, r) { builder.binary_op(BuilderOp::cmpne_n_floats, 2); builder.discard_stack(2); std::unique_ptr program = builder.finish(/*numValueSlots=*/0, - /*numUniformSlots=*/0); + /*numUniformSlots=*/0, + /*numImmutableSlots=*/0); check(r, *program, R"(splat_4_constants $0..3 = 0x41200000 (10.0) splat_4_constants $4..7 = 0x41200000 (10.0) @@ -611,7 +625,8 @@ DEF_TEST(RasterPipelineBuilderBinaryIntOps, r) { builder.binary_op(BuilderOp::cmpne_n_ints, 4); builder.discard_stack(4); std::unique_ptr program = builder.finish(/*numValueSlots=*/0, - /*numUniformSlots=*/0); + /*numUniformSlots=*/0, + /*numImmutableSlots=*/0); check(r, *program, R"(splat_4_constants $0..3 = 0x0000007B (1.723597e-43) splat_4_constants $4..7 = 0x0000007B (1.723597e-43) @@ -652,7 +667,8 @@ DEF_TEST(RasterPipelineBuilderBinaryUIntOps, r) { builder.binary_op(BuilderOp::min_n_uints, 2); builder.discard_stack(2); std::unique_ptr program = builder.finish(/*numValueSlots=*/0, - /*numUniformSlots=*/0); + /*numUniformSlots=*/0, + /*numImmutableSlots=*/0); check(r, *program, R"(splat_4_constants $0..3 = 0x000001C8 (6.389921e-43) splat_4_constants $4..7 = 0x000001C8 (6.389921e-43) @@ -687,7 +703,8 @@ DEF_TEST(RasterPipelineBuilderUnaryOps, r) { builder.unary_op(BuilderOp::ceil_float, 4); builder.discard_stack(5); std::unique_ptr program = builder.finish(/*numValueSlots=*/0, - /*numUniformSlots=*/0); + /*numUniformSlots=*/0, + /*numImmutableSlots=*/0); check(r, *program, R"(splat_4_constants $0..3 = 0x000001C8 (6.389921e-43) copy_constant $4 = 0x000001C8 (6.389921e-43) @@ -724,7 +741,8 @@ DEF_TEST(RasterPipelineBuilderUniforms, r) { builder.unary_op(BuilderOp::abs_int, 1); // perform work so the program isn't eliminated builder.discard_stack(15); // balance stack std::unique_ptr program = builder.finish(/*numValueSlots=*/0, - /*numUniformSlots=*/10); + /*numUniformSlots=*/10, + /*numImmutableSlots=*/0); check(r, *program, R"(copy_4_uniforms $0..3 = u0..3 copy_4_uniforms $4..7 = u4..7 @@ -748,7 +766,8 @@ DEF_TEST(RasterPipelineBuilderPushZeros, r) { builder.unary_op(BuilderOp::abs_int, 1); // perform work so the program isn't eliminated builder.discard_stack(15); // balance stack std::unique_ptr program = builder.finish(/*numValueSlots=*/0, - /*numUniformSlots=*/10); + /*numUniformSlots=*/10, + /*numImmutableSlots=*/0); check(r, *program, R"(splat_4_constants $0..3 = 0 splat_4_constants $4..7 = 0 @@ -767,7 +786,8 @@ DEF_TEST(RasterPipelineBuilderTernaryFloatOps, r) { builder.ternary_op(BuilderOp::mix_n_floats, 3); builder.discard_stack(3); std::unique_ptr program = builder.finish(/*numValueSlots=*/0, - /*numUniformSlots=*/0); + /*numUniformSlots=*/0, + /*numImmutableSlots=*/0); check(r, *program, R"(splat_4_constants $0..3 = 0x3F400000 (0.75) splat_4_constants $4..7 = 0x3F400000 (0.75) @@ -785,7 +805,8 @@ DEF_TEST(RasterPipelineBuilderAutomaticStackRewinding, r) { builder.unary_op(BuilderOp::abs_int, 1); // perform work so the program isn't eliminated builder.discard_stack(2001); std::unique_ptr program = builder.finish(/*numValueSlots=*/0, - /*numUniformSlots=*/0); + /*numUniformSlots=*/0, + /*numImmutableSlots=*/0); sk_sp dump = get_program_dump(*program); #if SK_HAS_MUSTTAIL @@ -817,7 +838,8 @@ DEF_TEST(RasterPipelineBuilderTraceOps, r) { if (!provideDebugTrace) { // Test the output when no DebugTrace info is provided. std::unique_ptr program = builder.finish(/*numValueSlots=*/20, - /*numUniformSlots=*/0); + /*numUniformSlots=*/0, + /*numImmutableSlots=*/0); check(r, *program, R"(copy_constant $0 = 0xFFFFFFFF trace_enter TraceEnter(???) when $0 is true @@ -846,6 +868,7 @@ trace_exit TraceExit(???) when $0 is true std::unique_ptr program = builder.finish(/*numValueSlots=*/20, /*numUniformSlots=*/0, + /*numImmutableSlots=*/0, &trace); check(r, *program, R"(copy_constant $0 = 0xFFFFFFFF @@ -859,5 +882,3 @@ trace_exit TraceExit(FunctionC) when $0 is true } } } - -#endif // SK_ENABLE_SKSL_IN_RASTER_PIPELINE diff --git a/tests/RasterPipelineCodeGeneratorTest.cpp b/tests/RasterPipelineCodeGeneratorTest.cpp index 96e96085e05a..e77db3d73bd2 100644 --- a/tests/RasterPipelineCodeGeneratorTest.cpp +++ b/tests/RasterPipelineCodeGeneratorTest.cpp @@ -24,8 +24,6 @@ #include #include -#ifdef SK_ENABLE_SKSL_IN_RASTER_PIPELINE - //#define DUMP_PROGRAMS 1 #if defined(DUMP_PROGRAMS) #include "src/core/SkStreamPriv.h" @@ -206,12 +204,20 @@ DEF_TEST(SkSLRasterPipelineCodeGeneratorIdentitySwizzle, r) { 1.0, 0.0, 0.0, 1.0}; test(r, R"__SkSL__( - uniform half4 colorGreen, colorRed; - half4 main(vec4 color) { - return (color.r == 0.5 && - color.rg == half2(0.5, 1.0) && - color.rgb == half3(0.5, 1.0, 0.0)) ? colorGreen : colorRed; - } + +uniform half4 colorGreen, colorRed; + +const int SEVEN = 7, TEN = 10; +const half4x4 MATRIXFIVE = half4x4(5); + +noinline bool verify_const_globals(int seven, int ten, half4x4 matrixFive) { + return seven == 7 && ten == 10 && matrixFive == half4x4(5); +} + +half4 main(float4) { + return verify_const_globals(SEVEN, TEN, MATRIXFIVE) ? colorGreen : colorRed; +} + )__SkSL__", kUniforms, /*startingColor=*/SkColor4f{0.5, 1.0, 0.0, 0.25}, @@ -286,5 +292,3 @@ DEF_TEST(SkSLRasterPipelineCodeGeneratorComparisonIntrinsicTest, r) { /*startingColor=*/SkColor4f{0.0, 0.0, 0.0, 0.0}, /*expectedResult=*/SkColor4f{0.0, 1.0, 0.0, 1.0}); } - -#endif // SK_ENABLE_SKSL_IN_RASTER_PIPELINE diff --git a/tests/ReadPixelsTest.cpp b/tests/ReadPixelsTest.cpp index 32f58a24ea02..cbbdf727db79 100644 --- a/tests/ReadPixelsTest.cpp +++ b/tests/ReadPixelsTest.cpp @@ -102,7 +102,7 @@ static SkPMColor convert_to_pmcolor(SkColorType ct, SkAlphaType at, const uint32 r = static_cast(c[0]); g = static_cast(c[1]); b = static_cast(c[2]); - // We set this even when for kRGB_888x because our caller will validate that it is 0xff. + // We set this even for kRGB_888x because our caller will validate that it is 0xff. a = static_cast(c[3]); break; default: diff --git a/tests/ReadWritePixelsGpuTest.cpp b/tests/ReadWritePixelsGpuTest.cpp index b8ac0934169d..4de710cdc821 100644 --- a/tests/ReadWritePixelsGpuTest.cpp +++ b/tests/ReadWritePixelsGpuTest.cpp @@ -782,7 +782,12 @@ DEF_GANESH_TEST(AsyncReadPixelsContextShutdown, reporter, options, CtsEnforcemen sequence == ShutdownSequence::kAbandon_DestroyContext_FreeResult)) { continue; } - for (bool yuv : {false, true}) { + enum class ReadType { + kRGBA, + kYUV, + kYUVA + }; + for (ReadType readType : {ReadType::kRGBA, ReadType::kYUV, ReadType::kYUVA}) { sk_gpu_test::GrContextFactory factory(options); auto direct = factory.get(type); if (!direct) { @@ -798,23 +803,40 @@ DEF_GANESH_TEST(AsyncReadPixelsContextShutdown, reporter, options, CtsEnforcemen continue; } AsyncContext cbContext; - if (yuv) { - surf->asyncRescaleAndReadPixelsYUV420( - kIdentity_SkYUVColorSpace, SkColorSpace::MakeSRGB(), ii.bounds(), - ii.dimensions(), SkImage::RescaleGamma::kSrc, - SkImage::RescaleMode::kNearest, &async_callback, &cbContext); - } else { - surf->asyncRescaleAndReadPixels(ii, ii.bounds(), SkImage::RescaleGamma::kSrc, - SkImage::RescaleMode::kNearest, &async_callback, - &cbContext); + switch (readType) { + case ReadType::kRGBA: + surf->asyncRescaleAndReadPixels(ii, ii.bounds(), + SkImage::RescaleGamma::kSrc, + SkImage::RescaleMode::kNearest, + &async_callback, &cbContext); + break; + case ReadType::kYUV: + surf->asyncRescaleAndReadPixelsYUV420( + kIdentity_SkYUVColorSpace, SkColorSpace::MakeSRGB(), ii.bounds(), + ii.dimensions(), SkImage::RescaleGamma::kSrc, + SkImage::RescaleMode::kNearest, &async_callback, &cbContext); + break; + case ReadType::kYUVA: + surf->asyncRescaleAndReadPixelsYUVA420( + kIdentity_SkYUVColorSpace, SkColorSpace::MakeSRGB(), ii.bounds(), + ii.dimensions(), SkImage::RescaleGamma::kSrc, + SkImage::RescaleMode::kNearest, &async_callback, &cbContext); + break; } + direct->submit(); while (!cbContext.fCalled) { direct->checkAsyncWorkCompletion(); } if (!cbContext.fResult) { - ERRORF(reporter, "Callback failed on %s. is YUV: %d", - sk_gpu_test::GrContextFactory::ContextTypeName(type), yuv); + const char* readTypeStr; + switch (readType) { + case ReadType::kRGBA: readTypeStr = "rgba"; break; + case ReadType::kYUV: readTypeStr = "yuv"; break; + case ReadType::kYUVA: readTypeStr = "yuva"; break; + } + ERRORF(reporter, "Callback failed on %s. read type is: %s", + sk_gpu_test::GrContextFactory::ContextTypeName(type), readTypeStr); continue; } // For vulkan we need to release all refs to the GrDirectContext before trying to diff --git a/tests/RectTest.cpp b/tests/RectTest.cpp index e4afd281799a..215d93374628 100644 --- a/tests/RectTest.cpp +++ b/tests/RectTest.cpp @@ -375,6 +375,46 @@ DEF_TEST(Rect_QuadContainsRect, reporter) { } } +DEF_TEST(Rect_ClosestDisjointEdge, r) { + struct TestCase { + std::string label; + SkIRect dst; + SkIRect expect; + }; + + // All test cases will use this rect for the src, so dst can be conveniently relative to it. + static constexpr SkIRect kSrc = {0,0,10,10}; + TestCase tests[] = { + { "src left edge", /*dst=*/{-15, -5, -2, 15}, /*expected=*/{0, 0, 1, 10}}, + { "src left edge clipped to dst", /*dst=*/{-15, 2, -2, 8}, /*expected=*/{0, 2, 1, 8}}, + { "src top-left corner", /*dst=*/{-15,-15, -2, -2}, /*expected=*/{0, 0, 1, 1}}, + { "src top edge", /*dst=*/{ -5,-10, 15, -2}, /*expected=*/{0, 0, 10, 1}}, + { "src top edge clipped to dst", /*dst=*/{ 2,-10, 8, -2}, /*expected=*/{2, 0, 8, 1}}, + { "src top-right corner", /*dst=*/{ 15,-15, 20, -2}, /*expected=*/{9, 0, 10, 1}}, + { "src right edge", /*dst=*/{ 15, -5, 20, 15}, /*expected=*/{9, 0, 10, 10}}, + { "src right edge clipped to dst", /*dst=*/{ 15, 2, 20, 8}, /*expected=*/{9, 2, 10, 8}}, + { "src bottom-right corner", /*dst=*/{ 15, 15, 20, 20}, /*expected=*/{9, 9, 10, 10}}, + { "src bottom edge", /*dst=*/{ -5, 15, 15, 20}, /*expected=*/{0, 9, 10, 10}}, + { "src bottom edge clipped to dst", /*dst=*/{ 2, 15, 8, 20}, /*expected=*/{2, 9, 8, 10}}, + { "src bottom-left corner", /*dst=*/{-15, 15, -2, 20}, /*expected=*/{0, 9, 1, 10}}, + { "src intersects dst high", /*dst=*/{ 2, 2, 15, 15}, /*expected=*/{2, 2, 10, 10}}, + { "src intersects dst low", /*dst=*/{ -5, -5, 8, 8}, /*expected=*/{0, 0, 8, 8}}, + { "src contains dst", /*dst=*/{ 2, 2, 8, 8}, /*expected=*/{2, 2, 8, 8}}, + { "src contained in dst", /*dst=*/{ -5, -5, 15, 15}, /*expected=*/{0, 0, 10, 10}} + }; + + for (const TestCase& t : tests) { + skiatest::ReporterContext c{r, t.label}; + SkIRect actual = SkRectPriv::ClosestDisjointEdge(kSrc, t.dst); + REPORTER_ASSERT(r, actual == t.expect); + } + + // Test emptiness of src and dst + REPORTER_ASSERT(r, SkRectPriv::ClosestDisjointEdge(SkIRect::MakeEmpty(), {0,0,8,8}).isEmpty()); + REPORTER_ASSERT(r, SkRectPriv::ClosestDisjointEdge({0,0,8,8}, SkIRect::MakeEmpty()).isEmpty()); + REPORTER_ASSERT(r, SkRectPriv::ClosestDisjointEdge({10,10,-1,2}, {15,8,-2,20}).isEmpty()); +} + // Before the fix, this sequence would trigger a release_assert in the Tiler // in SkBitmapDevice.cpp DEF_TEST(big_tiled_rect_crbug_927075, reporter) { diff --git a/tests/RectangleTextureTest.cpp b/tests/RectangleTextureTest.cpp index 81d00e794abf..a6a34bc10ff5 100644 --- a/tests/RectangleTextureTest.cpp +++ b/tests/RectangleTextureTest.cpp @@ -23,6 +23,7 @@ #include "include/gpu/GrBackendSurface.h" #include "include/gpu/GrDirectContext.h" #include "include/gpu/GrTypes.h" +#include "include/gpu/ganesh/gl/GrGLBackendSurface.h" #include "include/private/SkColorData.h" #include "include/private/base/SkTemplates.h" #include "include/private/gpu/ganesh/GrTypesPriv.h" @@ -171,8 +172,7 @@ DEF_GANESH_TEST_FOR_GL_RENDERING_CONTEXTS(RectangleTexture, SkPixmap pm(ii, pixels, sizeof(uint32_t)*kWidth); for (auto origin : { kBottomLeft_GrSurfaceOrigin, kTopLeft_GrSurfaceOrigin }) { - - auto format = GrBackendFormat::MakeGL(GR_GL_RGBA8, GR_GL_TEXTURE_RECTANGLE); + auto format = GrBackendFormats::MakeGL(GR_GL_RGBA8, GR_GL_TEXTURE_RECTANGLE); GrBackendTexture rectangleTex = dContext->createBackendTexture( kWidth, kHeight, format, GrMipmapped::kNo, GrRenderable::kYes); if (!rectangleTex.isValid()) { diff --git a/tests/RefCntTest.cpp b/tests/RefCntTest.cpp index 03a804445578..d5e93e1bfbbf 100644 --- a/tests/RefCntTest.cpp +++ b/tests/RefCntTest.cpp @@ -140,7 +140,7 @@ struct EffectImpl : public Effect { static sk_sp make_effect() { auto foo = EffectImpl::Create(); foo->fValue = 42; - return std::move(foo); + return foo; } static void reset_counters() { diff --git a/tests/SVGDeviceTest.cpp b/tests/SVGDeviceTest.cpp index 4a68e84a65f5..c6e733fcd5ab 100644 --- a/tests/SVGDeviceTest.cpp +++ b/tests/SVGDeviceTest.cpp @@ -17,6 +17,7 @@ #include "include/core/SkShader.h" #include "include/core/SkStream.h" #include "include/core/SkTextBlob.h" +#include "include/core/SkTileMode.h" #include "include/effects/SkDashPathEffect.h" #include "include/private/base/SkTo.h" #include "include/svg/SkSVGCanvas.h" diff --git a/tests/SkEnumBitMaskTest.cpp b/tests/SkEnumBitMaskTest.cpp index 7557fa9fb2e2..b2353d2be8f9 100644 --- a/tests/SkEnumBitMaskTest.cpp +++ b/tests/SkEnumBitMaskTest.cpp @@ -5,7 +5,7 @@ * found in the LICENSE file. */ -#include "src/core/SkEnumBitMask.h" +#include "src/base/SkEnumBitMask.h" #include "tests/Test.h" enum class Flags { diff --git a/tests/SkJpegXmpTest.cpp b/tests/SkJpegXmpTest.cpp index 5ae704d22e82..651b226dfffa 100644 --- a/tests/SkJpegXmpTest.cpp +++ b/tests/SkJpegXmpTest.cpp @@ -51,17 +51,8 @@ static std::string uint32_to_string(uint32_t v) { return std::string(c, 4); } -static std::string digest_to_hex_string(const SkMD5::Digest& digest) { - std::stringstream ss; - for (int i = 0; i < 16; ++i) { - ss << std::uppercase << std::setfill('0') << std::setw(2) << std::right << std::hex - << (int)digest.data[i]; - } - return ss.str(); -} - static std::string standard_xmp_with_header(const SkMD5::Digest& digest, const std::string& data) { - const std::string guid = digest_to_hex_string(digest); + const std::string guid = digest.toHexString().c_str(); const std::string dataWithGuid = std::regex_replace(data, std::regex("\\$GUID"), guid); return std::string("http://ns.adobe.com/xap/1.0/") + '\0' + dataWithGuid; } @@ -70,7 +61,7 @@ static std::string extended_xmp_with_header(const SkMD5::Digest& digest, uint32_t size, uint32_t offset, const std::string& data) { - return std::string("http://ns.adobe.com/xmp/extension/") + '\0' + digest_to_hex_string(digest) + + return std::string("http://ns.adobe.com/xmp/extension/") + '\0' + digest.toHexString().c_str() + uint32_to_string(size) + uint32_to_string(offset) + data; } diff --git a/tests/SkRasterPipelineTest.cpp b/tests/SkRasterPipelineTest.cpp index b1d44c521a47..49a030750b5b 100644 --- a/tests/SkRasterPipelineTest.cpp +++ b/tests/SkRasterPipelineTest.cpp @@ -104,8 +104,6 @@ DEF_TEST(SkRasterPipeline_PackBigContext, r) { REPORTER_ASSERT(r, unpacked.data == object.data); } -#ifdef SK_ENABLE_SKSL_IN_RASTER_PIPELINE - DEF_TEST(SkRasterPipeline_LoadStoreConditionMask, reporter) { alignas(64) int32_t mask[] = {~0, 0, ~0, 0, ~0, ~0, ~0, 0}; alignas(64) int32_t maskCopy[SkRasterPipeline_kMaxStride_highp] = {}; @@ -2746,8 +2744,6 @@ DEF_TEST(SkRasterPipeline_BranchIfActiveLanesEqual, r) { } } -#endif - DEF_TEST(SkRasterPipeline_empty, r) { // No asserts... just a test that this is safe to run. SkRasterPipeline_<256> p; diff --git a/tests/SkResourceCacheTest.cpp b/tests/SkResourceCacheTest.cpp index 5c29e8ced62c..aa42b199efcd 100644 --- a/tests/SkResourceCacheTest.cpp +++ b/tests/SkResourceCacheTest.cpp @@ -12,6 +12,7 @@ #include "include/core/SkImage.h" #include "include/core/SkImageInfo.h" #include "include/core/SkMatrix.h" +#include "include/core/SkPicture.h" // IWYU pragma: keep #include "include/core/SkPictureRecorder.h" #include "include/core/SkRefCnt.h" #include "include/core/SkSamplingOptions.h" diff --git a/tests/SkRuntimeEffectTest.cpp b/tests/SkRuntimeEffectTest.cpp index 84d066b864d8..337dcede00e4 100644 --- a/tests/SkRuntimeEffectTest.cpp +++ b/tests/SkRuntimeEffectTest.cpp @@ -125,8 +125,7 @@ DEF_TEST(SkRuntimeEffectInvalid_SkCapsDisallowed, r) { } DEF_TEST(SkRuntimeEffect_DeadCodeEliminationStackOverflow, r) { - // Verify that a deeply-nested loop does not cause stack overflow during SkVM dead-code - // elimination. + // Verify that a deeply-nested loop does not cause stack overflow during dead-code elimination. auto [effect, errorText] = SkRuntimeEffect::MakeForColorFilter(SkString(R"( half4 main(half4 color) { half value = color.r; @@ -841,7 +840,7 @@ DEF_TEST(SkRuntimeEffectObeysCapabilities_CPU, r) { DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS(SkRuntimeEffectObeysCapabilities_GPU, r, ctxInfo, - CtsEnforcement::kApiLevel_T) { + CtsEnforcement::kApiLevel_U) { SkImageInfo info = SkImageInfo::Make(2, 2, kRGBA_8888_SkColorType, kPremul_SkAlphaType); sk_sp surface = SkSurfaces::RenderTarget(ctxInfo.directContext(), skgpu::Budgeted::kNo, info); @@ -889,17 +888,6 @@ DEF_TEST(SkRuntimeEffectTraceShader, r) { )"); int center = imageSize / 2; std::string dump = effect.trace({center, 1}); - static constexpr char kSkVMSlotDump[] = -R"($0 = [main].result (float4 : slot 1/4, L2) -$1 = [main].result (float4 : slot 2/4, L2) -$2 = [main].result (float4 : slot 3/4, L2) -$3 = [main].result (float4 : slot 4/4, L2) -$4 = p (float2 : slot 1/2, L2) -$5 = p (float2 : slot 2/2, L2) -$6 = val (float2 : slot 1/2, L3) -$7 = val (float2 : slot 2/2, L3) -F0 = half4 main(float2 p) -)"; static constexpr char kSkRPSlotDump[] = R"($0 = p (float2 : slot 1/2, L0) $1 = p (float2 : slot 2/2, L0) @@ -929,8 +917,7 @@ exit half4 main(float2 p) )", center, center); REPORTER_ASSERT( r, - skstd::ends_with(dump, expectedTrace) && (skstd::starts_with(dump, kSkVMSlotDump) || - skstd::starts_with(dump, kSkRPSlotDump)), + skstd::starts_with(dump, kSkRPSlotDump) && skstd::ends_with(dump, expectedTrace), "Trace does not match expectation for %dx%d:\n%.*s\n", imageSize, imageSize, (int)dump.size(), dump.data()); } @@ -952,19 +939,6 @@ DEF_TEST(SkRuntimeEffectTracesAreUnoptimized, r) { } )"); std::string dump = effect.trace({1, 1}); - static constexpr char kSkVMSlotDump[] = -R"($0 = globalUnreferencedVar (int, L2) -$1 = [main].result (float4 : slot 1/4, L6) -$2 = [main].result (float4 : slot 2/4, L6) -$3 = [main].result (float4 : slot 3/4, L6) -$4 = [main].result (float4 : slot 4/4, L6) -$5 = p (float2 : slot 1/2, L6) -$6 = p (float2 : slot 2/2, L6) -$7 = localUnreferencedVar (int, L8) -$8 = [inlinableFunction].result (float, L3) -F0 = half4 main(float2 p) -F1 = half inlinableFunction() -)"; static constexpr char kSkRPSlotDump[] = R"($0 = p (float2 : slot 1/2, L0) $1 = p (float2 : slot 2/2, L0) @@ -1005,8 +979,7 @@ exit half4 main(float2 p) )"; REPORTER_ASSERT( r, - skstd::ends_with(dump, kExpectedTrace) && (skstd::starts_with(dump, kSkVMSlotDump) || - skstd::starts_with(dump, kSkRPSlotDump)), + skstd::starts_with(dump, kSkRPSlotDump) && skstd::ends_with(dump, kExpectedTrace), "Trace output does not match expectation:\n%.*s\n", (int)dump.size(), dump.data()); } @@ -1024,15 +997,6 @@ DEF_TEST(SkRuntimeEffectTraceCodeThatCannotBeUnoptimized, r) { } )"); std::string dump = effect.trace({1, 1}); - static constexpr char kSkVMSlotDump[] = -R"($0 = [main].result (float4 : slot 1/4, L2) -$1 = [main].result (float4 : slot 2/4, L2) -$2 = [main].result (float4 : slot 3/4, L2) -$3 = [main].result (float4 : slot 4/4, L2) -$4 = p (float2 : slot 1/2, L2) -$5 = p (float2 : slot 2/2, L2) -F0 = half4 main(float2 p) -)"; static constexpr char kSkRPSlotDump[] = R"($0 = p (float2 : slot 1/2, L0) $1 = p (float2 : slot 2/2, L0) @@ -1059,8 +1023,7 @@ exit half4 main(float2 p) )"; REPORTER_ASSERT( r, - skstd::ends_with(dump, kExpectedTrace) && (skstd::starts_with(dump, kSkVMSlotDump) || - skstd::starts_with(dump, kSkRPSlotDump)), + skstd::starts_with(dump, kSkRPSlotDump) && skstd::ends_with(dump, kExpectedTrace), "Trace output does not match expectation:\n%.*s\n", (int)dump.size(), dump.data()); } diff --git a/tests/SkSLDebugTracePlayerTest.cpp b/tests/SkSLDebugTracePlayerTest.cpp index a70a591b055a..1b0f44e8db35 100644 --- a/tests/SkSLDebugTracePlayerTest.cpp +++ b/tests/SkSLDebugTracePlayerTest.cpp @@ -29,7 +29,7 @@ #include #include -#if defined(SKSL_ENABLE_TRACING) && defined(SK_ENABLE_SKSL_IN_RASTER_PIPELINE) +#if defined(SKSL_ENABLE_TRACING) using LineNumberMap = SkSL::SkSLDebugTracePlayer::LineNumberMap; @@ -952,4 +952,4 @@ half4 main(float2 xy) { // Line 8 REPORTER_ASSERT(r, player.getCurrentLine() == 6); } -#endif // defined(SKSL_ENABLE_TRACING) && defined(SK_ENABLE_SKSL_IN_RASTER_PIPELINE) +#endif // defined(SKSL_ENABLE_TRACING) diff --git a/tests/SkSLMemoryLayoutTest.cpp b/tests/SkSLMemoryLayoutTest.cpp index ca37e72dc87f..4cee33ccc8e5 100644 --- a/tests/SkSLMemoryLayoutTest.cpp +++ b/tests/SkSLMemoryLayoutTest.cpp @@ -12,7 +12,8 @@ #include "src/sksl/SkSLMemoryLayout.h" #include "src/sksl/SkSLPosition.h" #include "src/sksl/SkSLUtil.h" -#include "src/sksl/ir/SkSLModifiers.h" +#include "src/sksl/ir/SkSLLayout.h" +#include "src/sksl/ir/SkSLModifierFlags.h" #include "src/sksl/ir/SkSLType.h" #include "tests/Test.h" @@ -70,22 +71,22 @@ DEF_TEST(SkSLMemoryLayout140Test, r) { // struct 1 TArray fields1; - fields1.emplace_back(SkSL::Position(), SkSL::Modifiers(), std::string_view("a"), - context.fTypes.fFloat3.get()); + fields1.emplace_back(SkSL::Position(), SkSL::Layout(), SkSL::ModifierFlag::kNone, + std::string_view("a"), context.fTypes.fFloat3.get()); std::unique_ptr s1 = SkSL::Type::MakeStructType(context, SkSL::Position(), std::string("s1"), fields1); REPORTER_ASSERT(r, 16 == layout.size(*s1)); REPORTER_ASSERT(r, 16 == layout.alignment(*s1)); - fields1.emplace_back(SkSL::Position(), SkSL::Modifiers(), std::string_view("b"), - context.fTypes.fFloat.get()); + fields1.emplace_back(SkSL::Position(), SkSL::Layout(), SkSL::ModifierFlag::kNone, + std::string_view("b"), context.fTypes.fFloat.get()); std::unique_ptr s2 = SkSL::Type::MakeStructType(context, SkSL::Position(), std::string("s2"), fields1); REPORTER_ASSERT(r, 16 == layout.size(*s2)); REPORTER_ASSERT(r, 16 == layout.alignment(*s2)); - fields1.emplace_back(SkSL::Position(), SkSL::Modifiers(), std::string_view("c"), - context.fTypes.fBool.get()); + fields1.emplace_back(SkSL::Position(), SkSL::Layout(), SkSL::ModifierFlag::kNone, + std::string_view("c"), context.fTypes.fBool.get()); std::unique_ptr s3 = SkSL::Type::MakeStructType(context, SkSL::Position(), std::string("s3"), fields1); REPORTER_ASSERT(r, 32 == layout.size(*s3)); @@ -93,15 +94,15 @@ DEF_TEST(SkSLMemoryLayout140Test, r) { // struct 2 TArray fields2; - fields2.emplace_back(SkSL::Position(), SkSL::Modifiers(), std::string_view("a"), - context.fTypes.fInt.get()); + fields2.emplace_back(SkSL::Position(), SkSL::Layout(), SkSL::ModifierFlag::kNone, + std::string_view("a"), context.fTypes.fInt.get()); std::unique_ptr s4 = SkSL::Type::MakeStructType(context, SkSL::Position(), std::string("s4"), fields2); REPORTER_ASSERT(r, 16 == layout.size(*s4)); REPORTER_ASSERT(r, 16 == layout.alignment(*s4)); - fields2.emplace_back(SkSL::Position(), SkSL::Modifiers(), std::string_view("b"), - context.fTypes.fFloat3.get()); + fields2.emplace_back(SkSL::Position(), SkSL::Layout(), SkSL::ModifierFlag::kNone, + std::string_view("b"), context.fTypes.fFloat3.get()); std::unique_ptr s5 = SkSL::Type::MakeStructType(context, SkSL::Position(), std::string("s5"), fields2); REPORTER_ASSERT(r, 32 == layout.size(*s5)); @@ -168,22 +169,22 @@ DEF_TEST(SkSLMemoryLayout430Test, r) { // struct 1 TArray fields1; - fields1.emplace_back(SkSL::Position(), SkSL::Modifiers(), std::string_view("a"), - context.fTypes.fFloat3.get()); + fields1.emplace_back(SkSL::Position(), SkSL::Layout(), SkSL::ModifierFlag::kNone, + std::string_view("a"), context.fTypes.fFloat3.get()); std::unique_ptr s1 = SkSL::Type::MakeStructType(context, SkSL::Position(), std::string("s1"), fields1); REPORTER_ASSERT(r, 16 == layout.size(*s1)); REPORTER_ASSERT(r, 16 == layout.alignment(*s1)); - fields1.emplace_back(SkSL::Position(), SkSL::Modifiers(), std::string_view("b"), - context.fTypes.fFloat.get()); + fields1.emplace_back(SkSL::Position(), SkSL::Layout(), SkSL::ModifierFlag::kNone, + std::string_view("b"), context.fTypes.fFloat.get()); std::unique_ptr s2 = SkSL::Type::MakeStructType(context, SkSL::Position(), std::string("s2"), fields1); REPORTER_ASSERT(r, 16 == layout.size(*s2)); REPORTER_ASSERT(r, 16 == layout.alignment(*s2)); - fields1.emplace_back(SkSL::Position(), SkSL::Modifiers(), std::string_view("c"), - context.fTypes.fBool.get()); + fields1.emplace_back(SkSL::Position(), SkSL::Layout(), SkSL::ModifierFlag::kNone, + std::string_view("c"), context.fTypes.fBool.get()); std::unique_ptr s3 = SkSL::Type::MakeStructType(context, SkSL::Position(), std::string("s3"), fields1); REPORTER_ASSERT(r, 32 == layout.size(*s3)); @@ -191,15 +192,15 @@ DEF_TEST(SkSLMemoryLayout430Test, r) { // struct 2 TArray fields2; - fields2.emplace_back(SkSL::Position(), SkSL::Modifiers(), std::string_view("a"), - context.fTypes.fInt.get()); + fields2.emplace_back(SkSL::Position(), SkSL::Layout(), SkSL::ModifierFlag::kNone, + std::string_view("a"), context.fTypes.fInt.get()); std::unique_ptr s4 = SkSL::Type::MakeStructType(context, SkSL::Position(), std::string("s4"), fields2); REPORTER_ASSERT(r, 4 == layout.size(*s4)); REPORTER_ASSERT(r, 4 == layout.alignment(*s4)); - fields2.emplace_back(SkSL::Position(), SkSL::Modifiers(), std::string_view("b"), - context.fTypes.fFloat3.get()); + fields2.emplace_back(SkSL::Position(), SkSL::Layout(), SkSL::ModifierFlag::kNone, + std::string_view("b"), context.fTypes.fFloat3.get()); std::unique_ptr s5 = SkSL::Type::MakeStructType(context, SkSL::Position(), std::string("s5"), fields2); REPORTER_ASSERT(r, 32 == layout.size(*s5)); @@ -407,19 +408,23 @@ DEF_TEST(SkSLMemoryLayoutWGSLUniformTest, r) { // } TArray fields; fields.emplace_back(SkSL::Position(), - SkSL::Modifiers(), + SkSL::Layout(), + SkSL::ModifierFlag::kNone, std::string_view("u"), context.fTypes.fFloat.get()); fields.emplace_back(SkSL::Position(), - SkSL::Modifiers(), + SkSL::Layout(), + SkSL::ModifierFlag::kNone, std::string_view("v"), context.fTypes.fFloat.get()); fields.emplace_back(SkSL::Position(), - SkSL::Modifiers(), + SkSL::Layout(), + SkSL::ModifierFlag::kNone, std::string_view("w"), context.fTypes.fFloat2.get()); fields.emplace_back(SkSL::Position(), - SkSL::Modifiers(), + SkSL::Layout(), + SkSL::ModifierFlag::kNone, std::string_view("x"), context.fTypes.fFloat.get()); std::unique_ptr structA = SkSL::Type::MakeStructType( @@ -443,30 +448,46 @@ DEF_TEST(SkSLMemoryLayoutWGSLUniformTest, r) { // // padding // offset(196) size(12) // } fields.emplace_back(SkSL::Position(), - SkSL::Modifiers(), + SkSL::Layout(), + SkSL::ModifierFlag::kNone, std::string_view("a"), context.fTypes.fFloat2.get()); fields.emplace_back(SkSL::Position(), - SkSL::Modifiers(), + SkSL::Layout(), + SkSL::ModifierFlag::kNone, std::string_view("b"), context.fTypes.fFloat3.get()); fields.emplace_back(SkSL::Position(), - SkSL::Modifiers(), + SkSL::Layout(), + SkSL::ModifierFlag::kNone, std::string_view("c"), context.fTypes.fFloat.get()); fields.emplace_back(SkSL::Position(), - SkSL::Modifiers(), + SkSL::Layout(), + SkSL::ModifierFlag::kNone, std::string_view("d"), context.fTypes.fFloat.get()); - fields.emplace_back(SkSL::Position(), SkSL::Modifiers(), std::string_view("e"), structA.get()); fields.emplace_back(SkSL::Position(), - SkSL::Modifiers(), + SkSL::Layout(), + SkSL::ModifierFlag::kNone, + std::string_view("e"), + structA.get()); + fields.emplace_back(SkSL::Position(), + SkSL::Layout(), + SkSL::ModifierFlag::kNone, std::string_view("f"), context.fTypes.fFloat3.get()); auto array = SkSL::Type::MakeArrayType("A[3]", *structA, 3); - fields.emplace_back(SkSL::Position(), SkSL::Modifiers(), std::string_view("g"), array.get()); - fields.emplace_back( - SkSL::Position(), SkSL::Modifiers(), std::string_view("h"), context.fTypes.fInt.get()); + fields.emplace_back(SkSL::Position(), + SkSL::Layout(), + SkSL::ModifierFlag::kNone, + std::string_view("g"), + array.get()); + fields.emplace_back(SkSL::Position(), + SkSL::Layout(), + SkSL::ModifierFlag::kNone, + std::string_view("h"), + context.fTypes.fInt.get()); std::unique_ptr structB = SkSL::Type::MakeStructType( context, SkSL::Position(), std::string_view("B"), std::move(fields)); REPORTER_ASSERT(r, 208 == layout.size(*structB)); @@ -660,19 +681,23 @@ DEF_TEST(SkSLMemoryLayoutWGSLStorageTest, r) { // } TArray fields; fields.emplace_back(SkSL::Position(), - SkSL::Modifiers(), + SkSL::Layout(), + SkSL::ModifierFlag::kNone, std::string_view("u"), context.fTypes.fFloat.get()); fields.emplace_back(SkSL::Position(), - SkSL::Modifiers(), + SkSL::Layout(), + SkSL::ModifierFlag::kNone, std::string_view("v"), context.fTypes.fFloat.get()); fields.emplace_back(SkSL::Position(), - SkSL::Modifiers(), + SkSL::Layout(), + SkSL::ModifierFlag::kNone, std::string_view("w"), context.fTypes.fFloat2.get()); fields.emplace_back(SkSL::Position(), - SkSL::Modifiers(), + SkSL::Layout(), + SkSL::ModifierFlag::kNone, std::string_view("x"), context.fTypes.fFloat.get()); std::unique_ptr structA = SkSL::Type::MakeStructType( @@ -696,30 +721,46 @@ DEF_TEST(SkSLMemoryLayoutWGSLStorageTest, r) { // // padding // offset(156) size(4) // } fields.emplace_back(SkSL::Position(), - SkSL::Modifiers(), + SkSL::Layout(), + SkSL::ModifierFlag::kNone, std::string_view("a"), context.fTypes.fFloat2.get()); fields.emplace_back(SkSL::Position(), - SkSL::Modifiers(), + SkSL::Layout(), + SkSL::ModifierFlag::kNone, std::string_view("b"), context.fTypes.fFloat3.get()); fields.emplace_back(SkSL::Position(), - SkSL::Modifiers(), + SkSL::Layout(), + SkSL::ModifierFlag::kNone, std::string_view("c"), context.fTypes.fFloat.get()); fields.emplace_back(SkSL::Position(), - SkSL::Modifiers(), + SkSL::Layout(), + SkSL::ModifierFlag::kNone, std::string_view("d"), context.fTypes.fFloat.get()); - fields.emplace_back(SkSL::Position(), SkSL::Modifiers(), std::string_view("e"), structA.get()); fields.emplace_back(SkSL::Position(), - SkSL::Modifiers(), + SkSL::Layout(), + SkSL::ModifierFlag::kNone, + std::string_view("e"), + structA.get()); + fields.emplace_back(SkSL::Position(), + SkSL::Layout(), + SkSL::ModifierFlag::kNone, std::string_view("f"), context.fTypes.fFloat3.get()); auto array = SkSL::Type::MakeArrayType("A[3]", *structA, 3); - fields.emplace_back(SkSL::Position(), SkSL::Modifiers(), std::string_view("g"), array.get()); - fields.emplace_back( - SkSL::Position(), SkSL::Modifiers(), std::string_view("h"), context.fTypes.fInt.get()); + fields.emplace_back(SkSL::Position(), + SkSL::Layout(), + SkSL::ModifierFlag::kNone, + std::string_view("g"), + array.get()); + fields.emplace_back(SkSL::Position(), + SkSL::Layout(), + SkSL::ModifierFlag::kNone, + std::string_view("h"), + context.fTypes.fInt.get()); std::unique_ptr structB = SkSL::Type::MakeStructType( context, SkSL::Position(), std::string_view("B"), std::move(fields)); REPORTER_ASSERT(r, 160 == layout.size(*structB)); @@ -735,8 +776,11 @@ DEF_TEST(SkSLMemoryLayoutWGSLUnsupportedTypesTest, r) { auto testArray = SkSL::Type::MakeArrayType("bool[3]", *context.fTypes.fBool, 3); TArray fields; - fields.emplace_back( - SkSL::Position(), SkSL::Modifiers(), std::string_view("foo"), testArray.get()); + fields.emplace_back(SkSL::Position(), + SkSL::Layout(), + SkSL::ModifierFlag::kNone, + std::string_view("foo"), + testArray.get()); auto testStruct = SkSL::Type::MakeStructType( context, SkSL::Position(), std::string_view("Test"), std::move(fields)); @@ -762,8 +806,11 @@ DEF_TEST(SkSLMemoryLayoutWGSLSupportedTypesTest, r) { auto testArray = SkSL::Type::MakeArrayType("float[3]", *context.fTypes.fFloat, 3); TArray fields; - fields.emplace_back( - SkSL::Position(), SkSL::Modifiers(), std::string_view("foo"), testArray.get()); + fields.emplace_back(SkSL::Position(), + SkSL::Layout(), + SkSL::ModifierFlag::kNone, + std::string_view("foo"), + testArray.get()); auto testStruct = SkSL::Type::MakeStructType( context, SkSL::Position(), std::string_view("Test"), std::move(fields)); diff --git a/tests/SkSLTest.cpp b/tests/SkSLTest.cpp index 2b68e1431c22..c2652087a3a2 100644 --- a/tests/SkSLTest.cpp +++ b/tests/SkSLTest.cpp @@ -25,7 +25,7 @@ #include "include/private/base/SkTArray.h" #include "include/sksl/SkSLVersion.h" #include "src/base/SkArenaAlloc.h" -#include "src/core/SkEnumBitMask.h" +#include "src/base/SkEnumBitMask.h" #include "src/core/SkRasterPipeline.h" #include "src/core/SkRasterPipelineOpContexts.h" #include "src/core/SkRasterPipelineOpList.h" @@ -41,7 +41,7 @@ #include "src/sksl/codegen/SkSLRasterPipelineBuilder.h" #include "src/sksl/codegen/SkSLRasterPipelineCodeGenerator.h" #include "src/sksl/ir/SkSLFunctionDeclaration.h" -#include "src/sksl/ir/SkSLModifiers.h" +#include "src/sksl/ir/SkSLModifierFlags.h" #include "src/sksl/ir/SkSLProgram.h" #include "src/sksl/ir/SkSLProgramElement.h" #include "src/sksl/ir/SkSLStatement.h" @@ -92,7 +92,7 @@ enum class SkSLTestFlags : int { }; static constexpr bool is_cpu(SkEnumBitMask flags) { - return flags & SkSLTestFlags::CPU; + return SkToBool(flags & SkSLTestFlags::CPU); } static constexpr bool is_gpu(SkEnumBitMask flags) { @@ -301,7 +301,7 @@ static void test_gpu(skiatest::Reporter* r, const char* testFile, SkEnumBitMask flags) { // If this is an ES3-only test on a GPU which doesn't support SkSL ES3, return immediately. - bool shouldRunGPU = (flags & SkSLTestFlags::GPU); + bool shouldRunGPU = SkToBool(flags & SkSLTestFlags::GPU); bool shouldRunGPU_ES3 = (flags & SkSLTestFlags::GPU_ES3) && (ctx->priv().caps()->shaderCaps()->supportedSkSLVerion() >= SkSL::Version::k300); @@ -358,7 +358,6 @@ static void test_clone(skiatest::Reporter* r, SkSL::ThreadContext::End(); } -#ifdef SK_ENABLE_SKSL_IN_RASTER_PIPELINE static void report_rp_pass(skiatest::Reporter* r, const char* testFile, SkEnumBitMask flags) { @@ -375,12 +374,10 @@ static void report_rp_fail(skiatest::Reporter* r, ERRORF(r, "%s: %s", testFile, reason); } } -#endif // SK_ENABLE_SKSL_IN_RASTER_PIPELINE static void test_raster_pipeline(skiatest::Reporter* r, const char* testFile, SkEnumBitMask flags) { -#ifdef SK_ENABLE_SKSL_IN_RASTER_PIPELINE SkString shaderString = load_source(r, testFile, ""); if (shaderString.isEmpty()) { return; @@ -421,7 +418,7 @@ static void test_raster_pipeline(skiatest::Reporter* r, return; } // 'uniform' variables - if (var.modifiers().fFlags & SkSL::Modifiers::kUniform_Flag) { + if (var.modifierFlags().isUniform()) { uniforms.push_back(SkRuntimeEffectPriv::VarAsUniform(var, ctx, &offset)); } } @@ -482,7 +479,6 @@ static void test_raster_pipeline(skiatest::Reporter* r, // Success! report_rp_pass(r, testFile, flags); -#endif // SK_ENABLE_SKSL_IN_RASTER_PIPELINE } #define SKSL_TEST(flags, ctsEnforcement, name, path) \ @@ -529,23 +525,24 @@ SKSL_TEST(CPU | GPU, kApiLevel_T, FloatFolding, "folding/ SKSL_TEST(CPU | GPU, kNextRelease,LogicalNot, "folding/LogicalNot.rts") SKSL_TEST(CPU | GPU, kApiLevel_T, MatrixFoldingES2, "folding/MatrixFoldingES2.rts") SKSL_TEST(ES3 | GPU_ES3, kNever, MatrixFoldingES3, "folding/MatrixFoldingES3.sksl") -SKSL_TEST(CPU | GPU, kApiLevel_T, MatrixNoOpFolding, "folding/MatrixNoOpFolding.rts") -SKSL_TEST(CPU | GPU, kApiLevel_T, MatrixScalarNoOpFolding, "folding/MatrixScalarNoOpFolding.rts") -SKSL_TEST(CPU | GPU, kApiLevel_T, MatrixVectorNoOpFolding, "folding/MatrixVectorNoOpFolding.rts") +SKSL_TEST(CPU | GPU, kApiLevel_U, MatrixNoOpFolding, "folding/MatrixNoOpFolding.rts") +SKSL_TEST(CPU | GPU, kApiLevel_U, MatrixScalarNoOpFolding, "folding/MatrixScalarNoOpFolding.rts") +SKSL_TEST(CPU | GPU, kApiLevel_U, MatrixVectorNoOpFolding, "folding/MatrixVectorNoOpFolding.rts") SKSL_TEST(CPU | GPU, kApiLevel_T, Negation, "folding/Negation.rts") // TODO(skia:13035): This test fails on Nvidia GPUs on OpenGL but passes Vulkan. Re-enable the test // on Vulkan when granular GPU backend selection is supported. SKSL_TEST(CPU, kApiLevel_T, PreserveSideEffects, "folding/PreserveSideEffects.rts") SKSL_TEST(CPU | GPU, kApiLevel_T, SelfAssignment, "folding/SelfAssignment.rts") SKSL_TEST(CPU | GPU, kApiLevel_T, ShortCircuitBoolFolding, "folding/ShortCircuitBoolFolding.rts") -SKSL_TEST(CPU | GPU, kApiLevel_T, StructFieldFolding, "folding/StructFieldFolding.rts") -SKSL_TEST(CPU | GPU, kApiLevel_T, StructFieldNoFolding, "folding/StructFieldNoFolding.rts") +SKSL_TEST(CPU | GPU, kApiLevel_U, StructFieldFolding, "folding/StructFieldFolding.rts") +SKSL_TEST(CPU | GPU, kApiLevel_U, StructFieldNoFolding, "folding/StructFieldNoFolding.rts") SKSL_TEST(CPU | GPU, kApiLevel_T, SwitchCaseFolding, "folding/SwitchCaseFolding.rts") SKSL_TEST(CPU | GPU, kApiLevel_T, SwizzleFolding, "folding/SwizzleFolding.rts") -SKSL_TEST(CPU | GPU, kApiLevel_T, TernaryFolding, "folding/TernaryFolding.rts") +SKSL_TEST(CPU | GPU, kApiLevel_U, TernaryFolding, "folding/TernaryFolding.rts") SKSL_TEST(CPU | GPU, kApiLevel_T, VectorScalarFolding, "folding/VectorScalarFolding.rts") SKSL_TEST(CPU | GPU, kApiLevel_T, VectorVectorFolding, "folding/VectorVectorFolding.rts") +SKSL_TEST(CPU | GPU, kNextRelease,CommaExpressionsAllowInlining, "inliner/CommaExpressionsAllowInlining.sksl") SKSL_TEST(ES3 | GPU_ES3, kNever, DoWhileBodyMustBeInlinedIntoAScope, "inliner/DoWhileBodyMustBeInlinedIntoAScope.sksl") SKSL_TEST(ES3 | GPU_ES3, kNever, DoWhileTestCannotBeInlined, "inliner/DoWhileTestCannotBeInlined.sksl") SKSL_TEST(CPU | GPU, kApiLevel_T, ForBodyMustBeInlinedIntoAScope, "inliner/ForBodyMustBeInlinedIntoAScope.sksl") @@ -563,7 +560,7 @@ SKSL_TEST(CPU | GPU, kApiLevel_T, InlinerElidesTempVarForReturnsInsideBlock, SKSL_TEST(CPU | GPU, kApiLevel_T, InlinerUsesTempVarForMultipleReturns, "inliner/InlinerUsesTempVarForMultipleReturns.sksl") SKSL_TEST(CPU | GPU, kApiLevel_T, InlinerUsesTempVarForReturnsInsideBlockWithVar, "inliner/InlinerUsesTempVarForReturnsInsideBlockWithVar.sksl") SKSL_TEST(CPU | GPU, kApiLevel_T, InlineThreshold, "inliner/InlineThreshold.sksl") -SKSL_TEST(ES3 | GPU_ES3, kApiLevel_T, InlineUnscopedVariable, "inliner/InlineUnscopedVariable.sksl") +SKSL_TEST(ES3 | GPU_ES3, kApiLevel_U, InlineUnscopedVariable, "inliner/InlineUnscopedVariable.sksl") SKSL_TEST(CPU | GPU, kApiLevel_T, InlineWithModifiedArgument, "inliner/InlineWithModifiedArgument.sksl") SKSL_TEST(CPU | GPU, kApiLevel_T, InlineWithNestedBigCalls, "inliner/InlineWithNestedBigCalls.sksl") SKSL_TEST(CPU | GPU, kApiLevel_T, InlineWithUnmodifiedArgument, "inliner/InlineWithUnmodifiedArgument.sksl") @@ -638,7 +635,7 @@ SKSL_TEST(ES3 | GPU_ES3, kNever, Commutative, "runtime/ SKSL_TEST(CPU, kNever, DivideByZero, "runtime/DivideByZero.rts") SKSL_TEST(CPU | GPU, kApiLevel_T, LoopFloat, "runtime/LoopFloat.rts") SKSL_TEST(CPU | GPU, kApiLevel_T, LoopInt, "runtime/LoopInt.rts") -SKSL_TEST(CPU | GPU, kApiLevel_T, Ossfuzz52603, "runtime/Ossfuzz52603.rts") +SKSL_TEST(CPU | GPU, kApiLevel_U, Ossfuzz52603, "runtime/Ossfuzz52603.rts") SKSL_TEST(CPU | GPU, kApiLevel_T, QualifierOrder, "runtime/QualifierOrder.rts") SKSL_TEST(CPU | GPU, kApiLevel_T, PrecisionQualifiers, "runtime/PrecisionQualifiers.rts") @@ -656,7 +653,7 @@ SKSL_TEST(CPU | GPU, kApiLevel_T, Assignment, "shared/A SKSL_TEST(CPU | GPU, kApiLevel_T, CastsRoundTowardZero, "shared/CastsRoundTowardZero.sksl") SKSL_TEST(CPU | GPU, kApiLevel_T, CommaMixedTypes, "shared/CommaMixedTypes.sksl") SKSL_TEST(CPU | GPU, kApiLevel_T, CommaSideEffects, "shared/CommaSideEffects.sksl") -SKSL_TEST(CPU | GPU, kApiLevel_T, CompileTimeConstantVariables, "shared/CompileTimeConstantVariables.sksl") +SKSL_TEST(CPU | GPU, kApiLevel_U, CompileTimeConstantVariables, "shared/CompileTimeConstantVariables.sksl") SKSL_TEST(ES3 | GPU_ES3, kNever, ConstantCompositeAccessViaConstantIndex, "shared/ConstantCompositeAccessViaConstantIndex.sksl") SKSL_TEST(ES3 | GPU_ES3, kNever, ConstantCompositeAccessViaDynamicIndex, "shared/ConstantCompositeAccessViaDynamicIndex.sksl") SKSL_TEST(CPU | GPU, kApiLevel_T, ConstantIf, "shared/ConstantIf.sksl") @@ -670,7 +667,7 @@ SKSL_TEST(CPU | GPU, kApiLevel_T, DeadReturn, "shared/D SKSL_TEST(ES3/* | GPU_ES3*/,kNever, DeadReturnES3, "shared/DeadReturnES3.sksl") SKSL_TEST(CPU | GPU, kApiLevel_T, DeadStripFunctions, "shared/DeadStripFunctions.sksl") SKSL_TEST(CPU | GPU, kApiLevel_T, DependentInitializers, "shared/DependentInitializers.sksl") -SKSL_TEST(CPU | GPU, kApiLevel_T, DoubleNegation, "shared/DoubleNegation.sksl") +SKSL_TEST(CPU | GPU, kApiLevel_U, DoubleNegation, "shared/DoubleNegation.sksl") SKSL_TEST(ES3 | GPU_ES3, kNever, DoWhileControlFlow, "shared/DoWhileControlFlow.sksl") SKSL_TEST(CPU | GPU, kApiLevel_T, EmptyBlocksES2, "shared/EmptyBlocksES2.sksl") SKSL_TEST(ES3 | GPU_ES3, kNever, EmptyBlocksES3, "shared/EmptyBlocksES3.sksl") @@ -685,8 +682,8 @@ SKSL_TEST(CPU | GPU, kApiLevel_T, HelloWorld, "shared/H SKSL_TEST(CPU | GPU, kApiLevel_T, Hex, "shared/Hex.sksl") SKSL_TEST(ES3 | GPU_ES3, kNever, HexUnsigned, "shared/HexUnsigned.sksl") SKSL_TEST(CPU | GPU, kApiLevel_T, InoutParameters, "shared/InoutParameters.sksl") -SKSL_TEST(CPU | GPU, kApiLevel_T, InoutParamsAreDistinct, "shared/InoutParamsAreDistinct.sksl") -SKSL_TEST(ES3 | GPU_ES3, kApiLevel_T, IntegerDivisionES3, "shared/IntegerDivisionES3.sksl") +SKSL_TEST(CPU | GPU, kApiLevel_U, InoutParamsAreDistinct, "shared/InoutParamsAreDistinct.sksl") +SKSL_TEST(ES3 | GPU_ES3, kApiLevel_U, IntegerDivisionES3, "shared/IntegerDivisionES3.sksl") SKSL_TEST(CPU | GPU, kApiLevel_U, LogicalAndShortCircuit, "shared/LogicalAndShortCircuit.sksl") SKSL_TEST(CPU | GPU, kApiLevel_U, LogicalOrShortCircuit, "shared/LogicalOrShortCircuit.sksl") SKSL_TEST(CPU | GPU, kApiLevel_T, Matrices, "shared/Matrices.sksl") @@ -710,7 +707,7 @@ SKSL_TEST(GPU_ES3, kNever, OperatorsES3, "shared/O SKSL_TEST(CPU | GPU, kApiLevel_T, Ossfuzz36852, "shared/Ossfuzz36852.sksl") SKSL_TEST(CPU | GPU, kApiLevel_T, OutParams, "shared/OutParams.sksl") SKSL_TEST(CPU | GPU, kApiLevel_T, OutParamsAreDistinct, "shared/OutParamsAreDistinct.sksl") -SKSL_TEST(CPU | GPU, kApiLevel_T, OutParamsAreDistinctFromGlobal, "shared/OutParamsAreDistinctFromGlobal.sksl") +SKSL_TEST(CPU | GPU, kApiLevel_U, OutParamsAreDistinctFromGlobal, "shared/OutParamsAreDistinctFromGlobal.sksl") SKSL_TEST(ES3 | GPU_ES3, kNever, OutParamsFunctionCallInArgument, "shared/OutParamsFunctionCallInArgument.sksl") SKSL_TEST(CPU | GPU, kApiLevel_T, OutParamsDoubleSwizzle, "shared/OutParamsDoubleSwizzle.sksl") SKSL_TEST(CPU | GPU, kNextRelease,PostfixExpressions, "shared/PostfixExpressions.sksl") @@ -738,6 +735,7 @@ SKSL_TEST(CPU | GPU, kApiLevel_T, SwitchWithFallthroughAndVarDecls,"shared/S SKSL_TEST(CPU | GPU, kApiLevel_T, SwitchWithLoops, "shared/SwitchWithLoops.sksl") SKSL_TEST(ES3 | GPU_ES3, kNever, SwitchWithLoopsES3, "shared/SwitchWithLoopsES3.sksl") SKSL_TEST(CPU | GPU, kNever, SwizzleAsLValue, "shared/SwizzleAsLValue.sksl") +SKSL_TEST(ES3 | GPU_ES3, kNever, SwizzleAsLValueES3, "shared/SwizzleAsLValueES3.sksl") SKSL_TEST(CPU | GPU, kApiLevel_T, SwizzleBoolConstants, "shared/SwizzleBoolConstants.sksl") SKSL_TEST(CPU | GPU, kApiLevel_T, SwizzleByConstantIndex, "shared/SwizzleByConstantIndex.sksl") SKSL_TEST(ES3 | GPU_ES3, kNever, SwizzleByIndex, "shared/SwizzleByIndex.sksl") @@ -758,7 +756,7 @@ SKSL_TEST(CPU | GPU, kNextRelease,TernaryNesting, "shared/T SKSL_TEST(CPU | GPU, kApiLevel_U, TernarySideEffects, "shared/TernarySideEffects.sksl") SKSL_TEST(CPU | GPU, kApiLevel_T, UnaryPositiveNegative, "shared/UnaryPositiveNegative.sksl") SKSL_TEST(CPU | GPU, kApiLevel_T, UniformArray, "shared/UniformArray.sksl") -SKSL_TEST(CPU | GPU, kApiLevel_T, UniformMatrixResize, "shared/UniformMatrixResize.sksl") +SKSL_TEST(CPU | GPU, kApiLevel_U, UniformMatrixResize, "shared/UniformMatrixResize.sksl") SKSL_TEST(CPU | GPU, kApiLevel_T, UnusedVariables, "shared/UnusedVariables.sksl") SKSL_TEST(CPU | GPU, kApiLevel_T, VectorConstructors, "shared/VectorConstructors.sksl") SKSL_TEST(CPU | GPU, kApiLevel_T, VectorToMatrixCast, "shared/VectorToMatrixCast.sksl") diff --git a/tests/SkSLWGSLTestbed.cpp b/tests/SkSLWGSLTestbed.cpp new file mode 100644 index 000000000000..d6c221bc72ad --- /dev/null +++ b/tests/SkSLWGSLTestbed.cpp @@ -0,0 +1,45 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "include/core/SkTypes.h" +#include "src/sksl/SkSLCompiler.h" +#include "src/sksl/SkSLProgramKind.h" +#include "src/sksl/SkSLProgramSettings.h" +#include "src/sksl/SkSLUtil.h" +#include "src/sksl/ir/SkSLProgram.h" +#include "tests/Test.h" + +#include +#include + +static void test(skiatest::Reporter* r, + const char* src, + SkSL::ProgramKind kind = SkSL::ProgramKind::kFragment) { + SkSL::Compiler compiler(SkSL::ShaderCapsFactory::Default()); + SkSL::ProgramSettings settings; + std::unique_ptr program = compiler.convertProgram(kind, std::string(src), + settings); + if (!program) { + SkDebugf("Unexpected error compiling %s\n%s", src, compiler.errorText().c_str()); + REPORTER_ASSERT(r, program); + } else { + std::string output; + REPORTER_ASSERT(r, compiler.toWGSL(*program, &output)); + REPORTER_ASSERT(r, output != ""); + //SkDebugf("WGSL output:\n\n%s", output.c_str()); + } +} + +DEF_TEST(SkSLWGSLTestbed, r) { + // Add in your SkSL here. + test(r, + R"__SkSL__( + void main() { + sk_FragColor = half4(0); + } + )__SkSL__"); +} diff --git a/tests/SkVMTest.cpp b/tests/SkVMTest.cpp deleted file mode 100644 index 86110fcee141..000000000000 --- a/tests/SkVMTest.cpp +++ /dev/null @@ -1,2851 +0,0 @@ -/* - * Copyright 2019 Google LLC - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#include "include/core/SkTypes.h" - -#if defined(SK_ENABLE_SKVM) - -#include "include/core/SkColorType.h" -#include "include/core/SkScalar.h" -#include "include/private/base/SkDebug.h" -#include "include/private/base/SkFloatingPoint.h" -#include "src/base/SkMSAN.h" -#include "src/core/SkVM.h" -#include "src/sksl/tracing/SkSLTraceHook.h" -#include "tests/Test.h" - -#include -#include -#include -#include -#include -#include - -template -static void test_jit_and_interpreter(const skvm::Builder& b, Fn&& test) { - skvm::Program p = b.done(); - test(p); - if (p.hasJIT()) { - test(b.done(/*debug_name=*/nullptr, /*allow_jit=*/false)); - } -} - -DEF_TEST(SkVM_eliminate_dead_code, r) { - skvm::Builder b; - { - skvm::Ptr arg = b.varying(); - skvm::I32 l = b.load32(arg); - skvm::I32 a = b.add(l, l); - b.add(a, b.splat(7)); - } - - std::vector program = b.program(); - REPORTER_ASSERT(r, program.size() == 4); - - program = skvm::eliminate_dead_code(program); - REPORTER_ASSERT(r, program.size() == 0); -} - -DEF_TEST(SkVM_Pointless, r) { - // Let's build a program with no memory arguments. - // It should all be pegged as dead code, but we should be able to "run" it. - skvm::Builder b; - { - b.add(b.splat(5.0f), - b.splat(4.0f)); - } - - test_jit_and_interpreter(b, [&](const skvm::Program& program) { - for (int N = 0; N < 64; N++) { - program.eval(N); - } - }); - - for (const skvm::OptimizedInstruction& inst : b.optimize()) { - REPORTER_ASSERT(r, inst.death == 0 && inst.can_hoist == true); - } -} - -DEF_TEST(SkVM_memset, r) { - skvm::Builder b; - b.store32(b.varying(), b.splat(42)); - - test_jit_and_interpreter(b, [&](const skvm::Program& p) { - int buf[18]; - buf[17] = 47; - - p.eval(17, buf); - for (int i = 0; i < 17; i++) { - REPORTER_ASSERT(r, buf[i] == 42); - } - REPORTER_ASSERT(r, buf[17] == 47); - }); -} - -DEF_TEST(SkVM_memcpy, r) { - skvm::Builder b; - { - auto src = b.varying(), - dst = b.varying(); - b.store32(dst, b.load32(src)); - } - - test_jit_and_interpreter(b, [&](const skvm::Program& p) { - int src[] = {1,2,3,4,5,6,7,8,9}, - dst[] = {0,0,0,0,0,0,0,0,0}; - - p.eval(std::size(src)-1, src, dst); - for (size_t i = 0; i < std::size(src)-1; i++) { - REPORTER_ASSERT(r, dst[i] == src[i]); - } - size_t i = std::size(src)-1; - REPORTER_ASSERT(r, dst[i] == 0); - }); -} - -DEF_TEST(SkVM_allow_jit, r) { - skvm::Builder b; - { - auto src = b.varying(), - dst = b.varying(); - b.store32(dst, b.load32(src)); - } - - if (b.done("test-allow_jit", /*allow_jit=*/true).hasJIT()) { - REPORTER_ASSERT(r, !b.done("", false).hasJIT()); - } -} - -DEF_TEST(SkVM_LoopCounts, r) { - // Make sure we cover all the exact N we want. - - // buf[i] += 1 - skvm::Builder b; - skvm::Ptr arg = b.varying(); - b.store32(arg, - b.add(b.splat(1), - b.load32(arg))); - - test_jit_and_interpreter(b, [&](const skvm::Program& program) { - int buf[64]; - for (int N = 0; N <= (int)std::size(buf); N++) { - for (int i = 0; i < (int)std::size(buf); i++) { - buf[i] = i; - } - program.eval(N, buf); - - for (int i = 0; i < N; i++) { - REPORTER_ASSERT(r, buf[i] == i+1); - } - for (int i = N; i < (int)std::size(buf); i++) { - REPORTER_ASSERT(r, buf[i] == i); - } - } - }); -} - -DEF_TEST(SkVM_gather32, r) { - skvm::Builder b; - { - skvm::UPtr uniforms = b.uniform(); - skvm::Ptr buf = b.varying(); - skvm::I32 x = b.load32(buf); - b.store32(buf, b.gather32(uniforms,0, b.bit_and(x, b.splat(7)))); - } - - test_jit_and_interpreter(b, [&](const skvm::Program& program) { - const int img[] = {12,34,56,78, 90,98,76,54}; - - int buf[20]; - for (int i = 0; i < 20; i++) { - buf[i] = i; - } - - struct Uniforms { - const int* img; - } uniforms{img}; - - program.eval(20, &uniforms, buf); - int i = 0; - REPORTER_ASSERT(r, buf[i] == 12); i++; - REPORTER_ASSERT(r, buf[i] == 34); i++; - REPORTER_ASSERT(r, buf[i] == 56); i++; - REPORTER_ASSERT(r, buf[i] == 78); i++; - REPORTER_ASSERT(r, buf[i] == 90); i++; - REPORTER_ASSERT(r, buf[i] == 98); i++; - REPORTER_ASSERT(r, buf[i] == 76); i++; - REPORTER_ASSERT(r, buf[i] == 54); i++; - - REPORTER_ASSERT(r, buf[i] == 12); i++; - REPORTER_ASSERT(r, buf[i] == 34); i++; - REPORTER_ASSERT(r, buf[i] == 56); i++; - REPORTER_ASSERT(r, buf[i] == 78); i++; - REPORTER_ASSERT(r, buf[i] == 90); i++; - REPORTER_ASSERT(r, buf[i] == 98); i++; - REPORTER_ASSERT(r, buf[i] == 76); i++; - REPORTER_ASSERT(r, buf[i] == 54); i++; - - REPORTER_ASSERT(r, buf[i] == 12); i++; - REPORTER_ASSERT(r, buf[i] == 34); i++; - REPORTER_ASSERT(r, buf[i] == 56); i++; - REPORTER_ASSERT(r, buf[i] == 78); i++; - }); -} - -DEF_TEST(SkVM_gathers, r) { - skvm::Builder b; - { - skvm::UPtr uniforms = b.uniform(); - skvm::Ptr buf32 = b.varying(), - buf16 = b.varying(), - buf8 = b.varying(); - - skvm::I32 x = b.load32(buf32); - - b.store32(buf32, b.gather32(uniforms,0, b.bit_and(x, b.splat( 7)))); - b.store16(buf16, b.gather16(uniforms,0, b.bit_and(x, b.splat(15)))); - b.store8 (buf8 , b.gather8 (uniforms,0, b.bit_and(x, b.splat(31)))); - } - - test_jit_and_interpreter(b, [&](const skvm::Program& program) { - const int img[] = {12,34,56,78, 90,98,76,54}; - - constexpr int N = 20; - int buf32[N]; - uint16_t buf16[N]; - uint8_t buf8 [N]; - - for (int i = 0; i < 20; i++) { - buf32[i] = i; - } - - struct Uniforms { - const int* img; - } uniforms{img}; - - program.eval(N, &uniforms, buf32, buf16, buf8); - int i = 0; - REPORTER_ASSERT(r, buf32[i] == 12 && buf16[i] == 12 && buf8[i] == 12); i++; - REPORTER_ASSERT(r, buf32[i] == 34 && buf16[i] == 0 && buf8[i] == 0); i++; - REPORTER_ASSERT(r, buf32[i] == 56 && buf16[i] == 34 && buf8[i] == 0); i++; - REPORTER_ASSERT(r, buf32[i] == 78 && buf16[i] == 0 && buf8[i] == 0); i++; - REPORTER_ASSERT(r, buf32[i] == 90 && buf16[i] == 56 && buf8[i] == 34); i++; - REPORTER_ASSERT(r, buf32[i] == 98 && buf16[i] == 0 && buf8[i] == 0); i++; - REPORTER_ASSERT(r, buf32[i] == 76 && buf16[i] == 78 && buf8[i] == 0); i++; - REPORTER_ASSERT(r, buf32[i] == 54 && buf16[i] == 0 && buf8[i] == 0); i++; - - REPORTER_ASSERT(r, buf32[i] == 12 && buf16[i] == 90 && buf8[i] == 56); i++; - REPORTER_ASSERT(r, buf32[i] == 34 && buf16[i] == 0 && buf8[i] == 0); i++; - REPORTER_ASSERT(r, buf32[i] == 56 && buf16[i] == 98 && buf8[i] == 0); i++; - REPORTER_ASSERT(r, buf32[i] == 78 && buf16[i] == 0 && buf8[i] == 0); i++; - REPORTER_ASSERT(r, buf32[i] == 90 && buf16[i] == 76 && buf8[i] == 78); i++; - REPORTER_ASSERT(r, buf32[i] == 98 && buf16[i] == 0 && buf8[i] == 0); i++; - REPORTER_ASSERT(r, buf32[i] == 76 && buf16[i] == 54 && buf8[i] == 0); i++; - REPORTER_ASSERT(r, buf32[i] == 54 && buf16[i] == 0 && buf8[i] == 0); i++; - - REPORTER_ASSERT(r, buf32[i] == 12 && buf16[i] == 12 && buf8[i] == 90); i++; - REPORTER_ASSERT(r, buf32[i] == 34 && buf16[i] == 0 && buf8[i] == 0); i++; - REPORTER_ASSERT(r, buf32[i] == 56 && buf16[i] == 34 && buf8[i] == 0); i++; - REPORTER_ASSERT(r, buf32[i] == 78 && buf16[i] == 0 && buf8[i] == 0); i++; - }); -} - -DEF_TEST(SkVM_gathers2, r) { - skvm::Builder b; - { - skvm::UPtr uniforms = b.uniform(); - skvm::Ptr buf32 = b.varying(), - buf16 = b.varying(), - buf8 = b.varying(); - - skvm::I32 x = b.load32(buf32); - - b.store32(buf32, b.gather32(uniforms,0, x)); - b.store16(buf16, b.gather16(uniforms,0, x)); - b.store8 (buf8 , b.gather8 (uniforms,0, x)); - } - - test_jit_and_interpreter(b, [&](const skvm::Program& program) { - uint8_t img[256]; - for (int i = 0; i < 256; i++) { - img[i] = i; - } - - int buf32[64]; - uint16_t buf16[64]; - uint8_t buf8 [64]; - - for (int i = 0; i < 64; i++) { - buf32[i] = (i*47)&63; - buf16[i] = 0; - buf8 [i] = 0; - } - - struct Uniforms { - const uint8_t* img; - } uniforms{img}; - - program.eval(64, &uniforms, buf32, buf16, buf8); - - for (int i = 0; i < 64; i++) { - REPORTER_ASSERT(r, buf8[i] == ((i*47)&63)); // 0,47,30,13,60,... - } - - REPORTER_ASSERT(r, buf16[ 0] == 0x0100); - REPORTER_ASSERT(r, buf16[63] == 0x2322); - - REPORTER_ASSERT(r, buf32[ 0] == 0x03020100); - REPORTER_ASSERT(r, buf32[63] == 0x47464544); - }); -} - -DEF_TEST(SkVM_bitops, r) { - skvm::Builder b; - { - skvm::Ptr ptr = b.varying(); - - skvm::I32 x = b.load32(ptr); - - x = b.bit_and (x, b.splat(0xf1)); // 0x40 - x = b.bit_or (x, b.splat(0x80)); // 0xc0 - x = b.bit_xor (x, b.splat(0xfe)); // 0x3e - x = b.bit_clear(x, b.splat(0x30)); // 0x0e - - x = b.shl(x, 28); // 0xe000'0000 - x = b.sra(x, 28); // 0xffff'fffe - x = b.shr(x, 1); // 0x7fff'ffff - - b.store32(ptr, x); - } - - test_jit_and_interpreter(b, [&](const skvm::Program& program) { - int x = 0x42; - program.eval(1, &x); - REPORTER_ASSERT(r, x == 0x7fff'ffff); - }); -} - -DEF_TEST(SkVM_select_is_NaN, r) { - skvm::Builder b; - { - skvm::Ptr src = b.varying(), - dst = b.varying(); - - skvm::F32 x = b.loadF(src); - x = select(is_NaN(x), b.splat(0.0f) - , x); - b.storeF(dst, x); - } - - std::vector program = b.optimize(); - REPORTER_ASSERT(r, program.size() == 4); - REPORTER_ASSERT(r, program[0].op == skvm::Op::load32); - REPORTER_ASSERT(r, program[1].op == skvm::Op::neq_f32); - REPORTER_ASSERT(r, program[2].op == skvm::Op::bit_clear); - REPORTER_ASSERT(r, program[3].op == skvm::Op::store32); - - test_jit_and_interpreter(b, [&](const skvm::Program& program) { - // ±NaN, ±0, ±1, ±inf - uint32_t src[] = {0x7f80'0001, 0xff80'0001, 0x0000'0000, 0x8000'0000, - 0x3f80'0000, 0xbf80'0000, 0x7f80'0000, 0xff80'0000}; - uint32_t dst[std::size(src)]; - program.eval(std::size(src), src, dst); - - for (int i = 0; i < (int)std::size(src); i++) { - REPORTER_ASSERT(r, dst[i] == (i < 2 ? 0 : src[i])); - } - }); -} - -DEF_TEST(SkVM_f32, r) { - skvm::Builder b; - { - skvm::Ptr arg = b.varying(); - - skvm::F32 x = b.loadF(arg), - y = b.add(x,x), // y = 2x - z = b.sub(y,x), // z = 2x-x = x - w = b.div(z,x); // w = x/x = 1 - b.storeF(arg, w); - } - - test_jit_and_interpreter(b, [&](const skvm::Program& program) { - float buf[] = { 1,2,3,4,5,6,7,8,9 }; - program.eval(std::size(buf), buf); - for (float v : buf) { - REPORTER_ASSERT(r, v == 1.0f); - } - }); -} - -DEF_TEST(SkVM_cmp_i32, r) { - skvm::Builder b; - { - skvm::I32 x = b.load32(b.varying()); - - auto to_bit = [&](int shift, skvm::I32 mask) { - return b.shl(b.bit_and(mask, b.splat(0x1)), shift); - }; - - skvm::I32 m = b.splat(0); - m = b.bit_or(m, to_bit(0, b. eq(x, b.splat(0)))); - m = b.bit_or(m, to_bit(1, b.neq(x, b.splat(1)))); - m = b.bit_or(m, to_bit(2, b. lt(x, b.splat(2)))); - m = b.bit_or(m, to_bit(3, b.lte(x, b.splat(3)))); - m = b.bit_or(m, to_bit(4, b. gt(x, b.splat(4)))); - m = b.bit_or(m, to_bit(5, b.gte(x, b.splat(5)))); - - b.store32(b.varying(), m); - } - test_jit_and_interpreter(b, [&](const skvm::Program& program) { - int in[] = { 0,1,2,3,4,5,6,7,8,9 }; - int out[std::size(in)]; - - program.eval(std::size(in), in, out); - - REPORTER_ASSERT(r, out[0] == 0b001111); - REPORTER_ASSERT(r, out[1] == 0b001100); - REPORTER_ASSERT(r, out[2] == 0b001010); - REPORTER_ASSERT(r, out[3] == 0b001010); - REPORTER_ASSERT(r, out[4] == 0b000010); - for (int i = 5; i < (int)std::size(out); i++) { - REPORTER_ASSERT(r, out[i] == 0b110010); - } - }); -} - -DEF_TEST(SkVM_cmp_f32, r) { - skvm::Builder b; - { - skvm::F32 x = b.loadF(b.varying()); - - auto to_bit = [&](int shift, skvm::I32 mask) { - return b.shl(b.bit_and(mask, b.splat(0x1)), shift); - }; - - skvm::I32 m = b.splat(0); - m = b.bit_or(m, to_bit(0, b. eq(x, b.splat(0.0f)))); - m = b.bit_or(m, to_bit(1, b.neq(x, b.splat(1.0f)))); - m = b.bit_or(m, to_bit(2, b. lt(x, b.splat(2.0f)))); - m = b.bit_or(m, to_bit(3, b.lte(x, b.splat(3.0f)))); - m = b.bit_or(m, to_bit(4, b. gt(x, b.splat(4.0f)))); - m = b.bit_or(m, to_bit(5, b.gte(x, b.splat(5.0f)))); - - b.store32(b.varying(), m); - } - - test_jit_and_interpreter(b, [&](const skvm::Program& program) { - float in[] = { 0,1,2,3,4,5,6,7,8,9 }; - int out[std::size(in)]; - - program.eval(std::size(in), in, out); - - REPORTER_ASSERT(r, out[0] == 0b001111); - REPORTER_ASSERT(r, out[1] == 0b001100); - REPORTER_ASSERT(r, out[2] == 0b001010); - REPORTER_ASSERT(r, out[3] == 0b001010); - REPORTER_ASSERT(r, out[4] == 0b000010); - for (int i = 5; i < (int)std::size(out); i++) { - REPORTER_ASSERT(r, out[i] == 0b110010); - } - }); -} - -DEF_TEST(SkVM_index, r) { - skvm::Builder b; - b.store32(b.varying(), b.index()); - - test_jit_and_interpreter(b, [&](const skvm::Program& program) { - int buf[23]; - program.eval(std::size(buf), buf); - for (int i = 0; i < (int)std::size(buf); i++) { - REPORTER_ASSERT(r, buf[i] == (int)std::size(buf)-i); - } - }); -} - -DEF_TEST(SkVM_mad, r) { - // This program is designed to exercise the tricky corners of instruction - // and register selection for Op::mad_f32. - - skvm::Builder b; - { - skvm::Ptr arg = b.varying(); - - skvm::F32 x = b.to_F32(b.load32(arg)), - y = b.mad(x,x,x), // x is needed in the future, so r[x] != r[y]. - z = b.mad(y,y,x), // y is needed in the future, but r[z] = r[x] is ok. - w = b.mad(z,z,y), // w can alias z but not y. - v = b.mad(w,y,w); // Got to stop somewhere. - b.store32(arg, b.trunc(v)); - } - - test_jit_and_interpreter(b, [&](const skvm::Program& program) { - int x = 2; - program.eval(1, &x); - // x = 2 - // y = 2*2 + 2 = 6 - // z = 6*6 + 2 = 38 - // w = 38*38 + 6 = 1450 - // v = 1450*6 + 1450 = 10150 - REPORTER_ASSERT(r, x == 10150); - }); -} - -DEF_TEST(SkVM_fms, r) { - // Create a pattern that can be peepholed into an Op::fms_f32. - skvm::Builder b; - { - skvm::Ptr arg = b.varying(); - - skvm::F32 x = b.to_F32(b.load32(arg)), - v = b.sub(b.mul(x, b.splat(2.0f)), - b.splat(1.0f)); - b.store32(arg, b.trunc(v)); - } - - test_jit_and_interpreter(b, [&](const skvm::Program& program) { - int buf[] = {0,1,2,3,4,5,6,7,8,9,10}; - program.eval((int)std::size(buf), &buf); - - for (int i = 0; i < (int)std::size(buf); i++) { - REPORTER_ASSERT(r, buf[i] = 2*i-1); - } - }); -} - -DEF_TEST(SkVM_fnma, r) { - // Create a pattern that can be peepholed into an Op::fnma_f32. - skvm::Builder b; - { - skvm::Ptr arg = b.varying(); - - skvm::F32 x = b.to_F32(b.load32(arg)), - v = b.sub(b.splat(1.0f), - b.mul(x, b.splat(2.0f))); - b.store32(arg, b.trunc(v)); - } - - test_jit_and_interpreter(b, [&](const skvm::Program& program) { - int buf[] = {0,1,2,3,4,5,6,7,8,9,10}; - program.eval((int)std::size(buf), &buf); - - for (int i = 0; i < (int)std::size(buf); i++) { - REPORTER_ASSERT(r, buf[i] = 1-2*i); - } - }); -} - -DEF_TEST(SkVM_madder, r) { - skvm::Builder b; - { - skvm::Ptr arg = b.varying(); - - skvm::F32 x = b.loadF(arg), - y = b.mad(x,x,x), // x is needed in the future, so r[x] != r[y]. - z = b.mad(y,x,y), // r[x] can be reused after this instruction, but not r[y]. - w = b.mad(y,y,z); - b.storeF(arg, w); - } - - test_jit_and_interpreter(b, [&](const skvm::Program& program) { - float x = 2.0f; - // y = 2*2 + 2 = 6 - // z = 6*2 + 6 = 18 - // w = 6*6 + 18 = 54 - program.eval(1, &x); - REPORTER_ASSERT(r, x == 54.0f); - }); -} - -DEF_TEST(SkVM_floor, r) { - skvm::Builder b; - { - skvm::Ptr arg = b.varying(); - b.storeF(arg, b.floor(b.loadF(arg))); - } - - test_jit_and_interpreter(b, [&](const skvm::Program& program) { - float buf[] = { -2.0f, -1.5f, -1.0f, 0.0f, 1.0f, 1.5f, 2.0f }; - float want[] = { -2.0f, -2.0f, -1.0f, 0.0f, 1.0f, 1.0f, 2.0f }; - program.eval(std::size(buf), buf); - for (int i = 0; i < (int)std::size(buf); i++) { - REPORTER_ASSERT(r, buf[i] == want[i]); - } - }); -} - -DEF_TEST(SkVM_round, r) { - skvm::Builder b; - { - skvm::Ptr src = b.varying(); - skvm::Ptr dst = b.varying(); - b.store32(dst, b.round(b.loadF(src))); - } - - // The test cases on exact 0.5f boundaries assume the current rounding mode is nearest even. - // We haven't explicitly guaranteed that here... it just probably is. - test_jit_and_interpreter(b, [&](const skvm::Program& program) { - float buf[] = { -1.5f, -0.5f, 0.0f, 0.5f, 0.2f, 0.6f, 1.0f, 1.4f, 1.5f, 2.0f }; - int want[] = { -2 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 2 , 2 }; - int dst[std::size(buf)]; - - program.eval(std::size(buf), buf, dst); - for (int i = 0; i < (int)std::size(dst); i++) { - REPORTER_ASSERT(r, dst[i] == want[i]); - } - }); -} - -DEF_TEST(SkVM_min, r) { - skvm::Builder b; - { - skvm::Ptr src1 = b.varying(); - skvm::Ptr src2 = b.varying(); - skvm::Ptr dst = b.varying(); - - b.storeF(dst, b.min(b.loadF(src1), b.loadF(src2))); - } - - test_jit_and_interpreter(b, [&](const skvm::Program& program) { - float s1[] = { 0.0f, 1.0f, 4.0f, -1.0f, -1.0f}; - float s2[] = { 0.0f, 2.0f, 3.0f, 1.0f, -2.0f}; - float want[] = { 0.0f, 1.0f, 3.0f, -1.0f, -2.0f}; - float d[std::size(s1)]; - program.eval(std::size(d), s1, s2, d); - for (int i = 0; i < (int)std::size(d); i++) { - REPORTER_ASSERT(r, d[i] == want[i]); - } - }); -} - -DEF_TEST(SkVM_max, r) { - skvm::Builder b; - { - skvm::Ptr src1 = b.varying(); - skvm::Ptr src2 = b.varying(); - skvm::Ptr dst = b.varying(); - - b.storeF(dst, b.max(b.loadF(src1), b.loadF(src2))); - } - - test_jit_and_interpreter(b, [&](const skvm::Program& program) { - float s1[] = { 0.0f, 1.0f, 4.0f, -1.0f, -1.0f}; - float s2[] = { 0.0f, 2.0f, 3.0f, 1.0f, -2.0f}; - float want[] = { 0.0f, 2.0f, 4.0f, 1.0f, -1.0f}; - float d[std::size(s1)]; - program.eval(std::size(d), s1, s2, d); - for (int i = 0; i < (int)std::size(d); i++) { - REPORTER_ASSERT(r, d[i] == want[i]); - } - }); -} - -DEF_TEST(SkVM_hoist, r) { - // This program uses enough constants that it will fail to JIT if we hoist them. - // The JIT will try again without hoisting, and that'll just need 2 registers. - skvm::Builder b; - { - skvm::Ptr arg = b.varying(); - skvm::I32 x = b.load32(arg); - for (int i = 0; i < 32; i++) { - x = b.add(x, b.splat(i)); - } - b.store32(arg, x); - } - - test_jit_and_interpreter(b, [&](const skvm::Program& program) { - int x = 4; - program.eval(1, &x); - // x += 0 + 1 + 2 + 3 + ... + 30 + 31 - // x += 496 - REPORTER_ASSERT(r, x == 500); - }); -} - -DEF_TEST(SkVM_select, r) { - skvm::Builder b; - { - skvm::Ptr buf = b.varying(); - - skvm::I32 x = b.load32(buf); - - x = b.select( b.gt(x, b.splat(4)), x, b.splat(42) ); - - b.store32(buf, x); - } - - test_jit_and_interpreter(b, [&](const skvm::Program& program) { - int buf[] = { 0,1,2,3,4,5,6,7,8 }; - program.eval(std::size(buf), buf); - for (int i = 0; i < (int)std::size(buf); i++) { - REPORTER_ASSERT(r, buf[i] == (i > 4 ? i : 42)); - } - }); -} - -DEF_TEST(SkVM_swap, r) { - skvm::Builder b; - { - // This program is the equivalent of - // x = *X - // y = *Y - // *X = y - // *Y = x - // One rescheduling of the program based only on data flow of Op arguments is - // x = *X - // *Y = x - // y = *Y - // *X = y - // but this reordering does not produce the same results and is invalid. - skvm::Ptr X = b.varying(), - Y = b.varying(); - - skvm::I32 x = b.load32(X), - y = b.load32(Y); - - b.store32(X, y); - b.store32(Y, x); - } - - test_jit_and_interpreter(b, [&](const skvm::Program& program) { - int b1[] = { 0,1,2,3 }; - int b2[] = { 4,5,6,7 }; - program.eval(std::size(b1), b1, b2); - for (int i = 0; i < (int)std::size(b1); i++) { - REPORTER_ASSERT(r, b1[i] == 4 + i); - REPORTER_ASSERT(r, b2[i] == i); - } - }); -} - -DEF_TEST(SkVM_NewOps, r) { - // Exercise a somewhat arbitrary set of new ops. - skvm::Builder b; - { - skvm::Ptr buf = b.varying(); - skvm::UPtr uniforms = b.uniform(); - - skvm::I32 x = b.load16(buf); - - const size_t kPtr = sizeof(const int*); - - x = b.add(x, b.uniform32(uniforms, kPtr+0)); - x = b.mul(x, b.uniform32(uniforms, kPtr+4)); - x = b.sub(x, b.uniform32(uniforms, kPtr+8)); - - skvm::I32 limit = b.uniform32(uniforms, kPtr+12); - x = b.select(b.lt(x, b.splat(0)), b.splat(0), x); - x = b.select(b.gt(x, limit ), limit , x); - - x = b.gather8(uniforms,0, x); - - b.store16(buf, x); - } - - test_jit_and_interpreter(b, [&](const skvm::Program& program) { - const int N = 31; - int16_t buf[N]; - for (int i = 0; i < N; i++) { - buf[i] = i; - } - - const int M = 16; - uint8_t img[M]; - for (int i = 0; i < M; i++) { - img[i] = i*i; - } - - struct { - const uint8_t* img; - int add = 5; - int mul = 3; - int sub = 18; - int limit = M-1; - } uniforms{img}; - - program.eval(N, buf, &uniforms); - - for (int i = 0; i < N; i++) { - // Our first math calculates x = (i+5)*3 - 18 a.k.a 3*(i-1). - int x = 3*(i-1); - - // Then that's pinned to the limits of img. - if (i < 2) { x = 0; } // Notice i == 1 hits x == 0 exactly... - if (i > 5) { x = 15; } // ...and i == 6 hits x == 15 exactly - REPORTER_ASSERT(r, buf[i] == img[x]); - } - }); -} - -DEF_TEST(SKVM_array32, r) { - - - - skvm::Builder b; - skvm::Uniforms uniforms(b.uniform(), 0); - // Take up the first slot, so other uniforms are not at 0 offset. - uniforms.push(0); - int i[] = {3, 7}; - skvm::Uniform array = uniforms.pushArray(i); - float f[] = {5, 9}; - skvm::Uniform arrayF = uniforms.pushArrayF(f); - { - skvm::Ptr buf0 = b.varying(), - buf1 = b.varying(), - buf2 = b.varying(); - - skvm::I32 j = b.array32(array, 0); - b.store32(buf0, j); - skvm::I32 k = b.array32(array, 1); - b.store32(buf1, k); - - skvm::F32 x = b.arrayF(arrayF, 0); - skvm::F32 y = b.arrayF(arrayF, 1); - b.store32(buf2, b.trunc(b.add(x, y))); - } - - test_jit_and_interpreter(b, [&](const skvm::Program& program) { - const int K = 10; - int32_t buf0[K], - buf1[K], - buf2[K]; - - // reset the i[0] for the two tests. - i[0] = 3; - f[1] = 9; - program.eval(K, uniforms.buf.data(), buf0, buf1, buf2); - for (auto v : buf0) { - REPORTER_ASSERT(r, v == 3); - } - for (auto v : buf1) { - REPORTER_ASSERT(r, v == 7); - } - for (auto v : buf2) { - REPORTER_ASSERT(r, v == 14); - } - i[0] = 4; - f[1] = 10; - program.eval(K, uniforms.buf.data(), buf0, buf1, buf2); - for (auto v : buf0) { - REPORTER_ASSERT(r, v == 4); - } - for (auto v : buf1) { - REPORTER_ASSERT(r, v == 7); - } - for (auto v : buf2) { - REPORTER_ASSERT(r, v == 15); - } - }); -} - -DEF_TEST(SkVM_sqrt, r) { - skvm::Builder b; - auto buf = b.varying(); - b.storeF(buf, b.sqrt(b.loadF(buf))); - - test_jit_and_interpreter(b, [&](const skvm::Program& program) { - constexpr int K = 17; - float buf[K]; - for (int i = 0; i < K; i++) { - buf[i] = (float)(i*i); - } - - // x^2 -> x - program.eval(K, buf); - - for (int i = 0; i < K; i++) { - REPORTER_ASSERT(r, buf[i] == (float)i); - } - }); -} - -DEF_TEST(SkVM_MSAN, r) { - // This little memset32() program should be able to JIT, but if we run that - // JIT code in an MSAN build, it won't see the writes initialize buf. So - // this tests that we're using the interpreter instead. - skvm::Builder b; - b.store32(b.varying(), b.splat(42)); - - test_jit_and_interpreter(b, [&](const skvm::Program& program) { - constexpr int K = 17; - int buf[K]; // Intentionally uninitialized. - program.eval(K, buf); - sk_msan_assert_initialized(buf, buf+K); - for (int x : buf) { - REPORTER_ASSERT(r, x == 42); - } - }); -} - -DEF_TEST(SkVM_assert, r) { - skvm::Builder b; - b.assert_true(b.lt(b.load32(b.varying()), - b.splat(42))); - - test_jit_and_interpreter(b, [&](const skvm::Program& program) { - int buf[] = { 0,1,2,3,4,5,6,7,8,9 }; - program.eval(std::size(buf), buf); - }); -} - -DEF_TEST(SkVM_trace_line, r) { - class TestTraceHook : public SkSL::TraceHook { - public: - void var(int, int32_t) override { fBuffer.push_back(-9999999); } - void enter(int) override { fBuffer.push_back(-9999999); } - void exit(int) override { fBuffer.push_back(-9999999); } - void scope(int) override { fBuffer.push_back(-9999999); } - void line(int lineNum) override { fBuffer.push_back(lineNum); } - - std::vector fBuffer; - }; - - skvm::Builder b; - TestTraceHook testTrace; - int traceHookID = b.attachTraceHook(&testTrace); - b.trace_line(traceHookID, b.splat(0xFFFFFFFF), b.splat(0xFFFFFFFF), 123); - b.trace_line(traceHookID, b.splat(0x00000000), b.splat(0xFFFFFFFF), 456); - b.trace_line(traceHookID, b.splat(0xFFFFFFFF), b.splat(0x00000000), 567); - b.trace_line(traceHookID, b.splat(0x00000000), b.splat(0x00000000), 678); - b.trace_line(traceHookID, b.splat(0xFFFFFFFF), b.splat(0xFFFFFFFF), 789); - skvm::Program p = b.done(); - p.eval(1); - - REPORTER_ASSERT(r, (testTrace.fBuffer == std::vector{123, 789})); -} - -DEF_TEST(SkVM_trace_var, r) { - class TestTraceHook : public SkSL::TraceHook { - public: - void line(int) override { fBuffer.push_back(-9999999); } - void enter(int) override { fBuffer.push_back(-9999999); } - void exit(int) override { fBuffer.push_back(-9999999); } - void scope(int) override { fBuffer.push_back(-9999999); } - void var(int slot, int32_t val) override { - fBuffer.push_back(slot); - fBuffer.push_back(val); - } - - std::vector fBuffer; - }; - - skvm::Builder b; - TestTraceHook testTrace; - int traceHookID = b.attachTraceHook(&testTrace); - b.trace_var(traceHookID, b.splat(0x00000000), b.splat(0xFFFFFFFF), 2, b.splat(333)); - b.trace_var(traceHookID, b.splat(0xFFFFFFFF), b.splat(0xFFFFFFFF), 4, b.splat(555)); - b.trace_var(traceHookID, b.splat(0x00000000), b.splat(0x00000000), 5, b.splat(666)); - b.trace_var(traceHookID, b.splat(0xFFFFFFFF), b.splat(0xFFFFFFFF), 6, b.splat(777)); - b.trace_var(traceHookID, b.splat(0xFFFFFFFF), b.splat(0x00000000), 8, b.splat(999)); - skvm::Program p = b.done(); - p.eval(1); - - REPORTER_ASSERT(r, (testTrace.fBuffer == std::vector{4, 555, 6, 777})); -} - -DEF_TEST(SkVM_trace_enter_exit, r) { - class TestTraceHook : public SkSL::TraceHook { - public: - void line(int) override { fBuffer.push_back(-9999999); } - void var(int, int32_t) override { fBuffer.push_back(-9999999); } - void scope(int) override { fBuffer.push_back(-9999999); } - void enter(int fnIdx) override { - fBuffer.push_back(fnIdx); - fBuffer.push_back(1); - } - void exit(int fnIdx) override { - fBuffer.push_back(fnIdx); - fBuffer.push_back(0); - } - - std::vector fBuffer; - }; - - skvm::Builder b; - TestTraceHook testTrace; - int traceHookID = b.attachTraceHook(&testTrace); - b.trace_enter(traceHookID, b.splat(0x00000000), b.splat(0x00000000), 99); - b.trace_enter(traceHookID, b.splat(0xFFFFFFFF), b.splat(0xFFFFFFFF), 12); - b.trace_enter(traceHookID, b.splat(0x00000000), b.splat(0xFFFFFFFF), 34); - b.trace_exit(traceHookID, b.splat(0xFFFFFFFF), b.splat(0xFFFFFFFF), 56); - b.trace_exit(traceHookID, b.splat(0xFFFFFFFF), b.splat(0x00000000), 78); - b.trace_exit(traceHookID, b.splat(0x00000000), b.splat(0x00000000), 90); - skvm::Program p = b.done(); - p.eval(1); - - REPORTER_ASSERT(r, (testTrace.fBuffer == std::vector{12, 1, 56, 0})); -} - -DEF_TEST(SkVM_trace_scope, r) { - class TestTraceHook : public SkSL::TraceHook { - public: - void var(int, int32_t) override { fBuffer.push_back(-9999999); } - void enter(int) override { fBuffer.push_back(-9999999); } - void exit(int) override { fBuffer.push_back(-9999999); } - void line(int) override { fBuffer.push_back(-9999999); } - void scope(int delta) override { fBuffer.push_back(delta); } - - std::vector fBuffer; - }; - - skvm::Builder b; - TestTraceHook testTrace; - int traceHookID = b.attachTraceHook(&testTrace); - b.trace_scope(traceHookID, b.splat(0xFFFFFFFF), b.splat(0xFFFFFFFF), 1); - b.trace_scope(traceHookID, b.splat(0xFFFFFFFF), b.splat(0x00000000), -2); - b.trace_scope(traceHookID, b.splat(0x00000000), b.splat(0x00000000), 3); - b.trace_scope(traceHookID, b.splat(0x00000000), b.splat(0xFFFFFFFF), 4); - b.trace_scope(traceHookID, b.splat(0xFFFFFFFF), b.splat(0xFFFFFFFF), -5); - skvm::Program p = b.done(); - p.eval(1); - - REPORTER_ASSERT(r, (testTrace.fBuffer == std::vector{1, -5})); -} - -DEF_TEST(SkVM_trace_multiple_hooks, r) { - class TestTraceHook : public SkSL::TraceHook { - public: - void var(int, int32_t) override { fBuffer.push_back(-9999999); } - void enter(int) override { fBuffer.push_back(-9999999); } - void exit(int) override { fBuffer.push_back(-9999999); } - void scope(int) override { fBuffer.push_back(-9999999); } - void line(int lineNum) override { fBuffer.push_back(lineNum); } - - std::vector fBuffer; - }; - - skvm::Builder b; - TestTraceHook testTraceA, testTraceB, testTraceC; - int traceHookAID = b.attachTraceHook(&testTraceA); - int traceHookBID = b.attachTraceHook(&testTraceB); - int traceHookCID = b.attachTraceHook(&testTraceC); - b.trace_line(traceHookCID, b.splat(0xFFFFFFFF), b.splat(0xFFFFFFFF), 111); - b.trace_line(traceHookAID, b.splat(0xFFFFFFFF), b.splat(0xFFFFFFFF), 222); - b.trace_line(traceHookCID, b.splat(0x00000000), b.splat(0x00000000), 333); - b.trace_line(traceHookBID, b.splat(0xFFFFFFFF), b.splat(0x00000000), 444); - b.trace_line(traceHookAID, b.splat(0x00000000), b.splat(0xFFFFFFFF), 555); - b.trace_line(traceHookBID, b.splat(0xFFFFFFFF), b.splat(0xFFFFFFFF), 666); - skvm::Program p = b.done(); - p.eval(1); - - REPORTER_ASSERT(r, (testTraceA.fBuffer == std::vector{222})); - REPORTER_ASSERT(r, (testTraceB.fBuffer == std::vector{666})); - REPORTER_ASSERT(r, (testTraceC.fBuffer == std::vector{111})); -} - -DEF_TEST(SkVM_premul, reporter) { - // Test that premul is short-circuited when alpha is known opaque. - { - skvm::Builder p; - auto rptr = p.varying(), - aptr = p.varying(); - - skvm::F32 r = p.loadF(rptr), - g = p.splat(0.0f), - b = p.splat(0.0f), - a = p.loadF(aptr); - - p.premul(&r, &g, &b, a); - p.storeF(rptr, r); - - // load red, load alpha, red *= alpha, store red - REPORTER_ASSERT(reporter, p.done().instructions().size() == 4); - } - - { - skvm::Builder p; - auto rptr = p.varying(); - - skvm::F32 r = p.loadF(rptr), - g = p.splat(0.0f), - b = p.splat(0.0f), - a = p.splat(1.0f); - - p.premul(&r, &g, &b, a); - p.storeF(rptr, r); - - // load red, store red - REPORTER_ASSERT(reporter, p.done().instructions().size() == 2); - } - - // Same deal for unpremul. - { - skvm::Builder p; - auto rptr = p.varying(), - aptr = p.varying(); - - skvm::F32 r = p.loadF(rptr), - g = p.splat(0.0f), - b = p.splat(0.0f), - a = p.loadF(aptr); - - p.unpremul(&r, &g, &b, a); - p.storeF(rptr, r); - - // load red, load alpha, a bunch of unpremul instructions, store red - REPORTER_ASSERT(reporter, p.done().instructions().size() >= 4); - } - - { - skvm::Builder p; - auto rptr = p.varying(); - - skvm::F32 r = p.loadF(rptr), - g = p.splat(0.0f), - b = p.splat(0.0f), - a = p.splat(1.0f); - - p.unpremul(&r, &g, &b, a); - p.storeF(rptr, r); - - // load red, store red - REPORTER_ASSERT(reporter, p.done().instructions().size() == 2); - } -} - -template -static void test_asm(skiatest::Reporter* r, Fn&& fn, std::initializer_list expected) { - uint8_t buf[4096]; - skvm::Assembler a{buf}; - fn(a); - - REPORTER_ASSERT(r, a.size() == expected.size()); - - auto got = (const uint8_t*)buf, - want = expected.begin(); - for (int i = 0; i < (int)std::min(a.size(), expected.size()); i++) { - REPORTER_ASSERT(r, got[i] == want[i], - "byte %d was %02x, want %02x", i, got[i], want[i]); - } -} - -DEF_TEST(SkVM_Assembler, r) { - // Easiest way to generate test cases is - // - // echo '...some asm...' | llvm-mc -show-encoding -x86-asm-syntax=intel - // - // The -x86-asm-syntax=intel bit is optional, controlling the - // input syntax only; the output will always be AT&T op x,y,dst style. - // Our APIs read more like Intel op dst,x,y as op(dst,x,y), so I find - // that a bit easier to use here, despite maybe favoring AT&T overall. - - using A = skvm::Assembler; - // Our exit strategy from AVX code. - test_asm(r, [&](A& a) { - a.int3(); - a.vzeroupper(); - a.ret(); - },{ - 0xcc, - 0xc5, 0xf8, 0x77, - 0xc3, - }); - - // Align should pad with zero - test_asm(r, [&](A& a) { - a.ret(); - a.align(4); - },{ - 0xc3, - 0x00, 0x00, 0x00, - }); - - test_asm(r, [&](A& a) { - a.add(A::rax, 8); // Always good to test rax. - a.sub(A::rax, 32); - - a.add(A::rdi, 12); // Last 0x48 REX - a.sub(A::rdi, 8); - - a.add(A::r8 , 7); // First 0x49 REX - a.sub(A::r8 , 4); - - a.add(A::rsi, 128); // Requires 4 byte immediate. - a.sub(A::r8 , 1000000); - - a.add(A::Mem{A::rsi}, 7); // addq $7, (%rsi) - a.add(A::Mem{A::rsi, 12}, 7); // addq $7, 12(%rsi) - a.add(A::Mem{A::rsp, 12}, 7); // addq $7, 12(%rsp) - a.add(A::Mem{A::r12, 12}, 7); // addq $7, 12(%r12) - a.add(A::Mem{A::rsp, 12, A::rax, A::FOUR}, 7); // addq $7, 12(%rsp,%rax,4) - a.add(A::Mem{A::r12, 12, A::rax, A::FOUR}, 7); // addq $7, 12(%r12,%rax,4) - a.add(A::Mem{A::rax, 12, A::r12, A::FOUR}, 7); // addq $7, 12(%rax,%r12,4) - a.add(A::Mem{A::r11, 12, A::r8 , A::TWO }, 7); // addq $7, 12(%r11,%r8,2) - a.add(A::Mem{A::r11, 12, A::rax} , 7); // addq $7, 12(%r11,%rax) - a.add(A::Mem{A::rax, 12, A::r11} , 7); // addq $7, 12(%rax,%r11) - - a.sub(A::Mem{A::rax, 12, A::r11} , 7); // subq $7, 12(%rax,%r11) - - a.add( A::rax , A::rcx); // addq %rcx, %rax - a.add(A::Mem{A::rax} , A::rcx); // addq %rcx, (%rax) - a.add(A::Mem{A::rax, 12}, A::rcx); // addq %rcx, 12(%rax) - a.add(A::rcx, A::Mem{A::rax, 12}); // addq 12(%rax), %rcx - - a.sub(A::rcx, A::Mem{A::rax, 12}); // subq 12(%rax), %rcx - },{ - 0x48, 0x83, 0b11'000'000, 0x08, - 0x48, 0x83, 0b11'101'000, 0x20, - - 0x48, 0x83, 0b11'000'111, 0x0c, - 0x48, 0x83, 0b11'101'111, 0x08, - - 0x49, 0x83, 0b11'000'000, 0x07, - 0x49, 0x83, 0b11'101'000, 0x04, - - 0x48, 0x81, 0b11'000'110, 0x80, 0x00, 0x00, 0x00, - 0x49, 0x81, 0b11'101'000, 0x40, 0x42, 0x0f, 0x00, - - 0x48,0x83,0x06,0x07, - 0x48,0x83,0x46,0x0c,0x07, - 0x48,0x83,0x44,0x24,0x0c,0x07, - 0x49,0x83,0x44,0x24,0x0c,0x07, - 0x48,0x83,0x44,0x84,0x0c,0x07, - 0x49,0x83,0x44,0x84,0x0c,0x07, - 0x4a,0x83,0x44,0xa0,0x0c,0x07, - 0x4b,0x83,0x44,0x43,0x0c,0x07, - 0x49,0x83,0x44,0x03,0x0c,0x07, - 0x4a,0x83,0x44,0x18,0x0c,0x07, - - 0x4a,0x83,0x6c,0x18,0x0c,0x07, - - 0x48,0x01,0xc8, - 0x48,0x01,0x08, - 0x48,0x01,0x48,0x0c, - 0x48,0x03,0x48,0x0c, - 0x48,0x2b,0x48,0x0c, - }); - - - test_asm(r, [&](A& a) { - a.vpaddd (A::ymm0, A::ymm1, A::ymm2); // Low registers and 0x0f map -> 2-byte VEX. - a.vpaddd (A::ymm8, A::ymm1, A::ymm2); // A high dst register is ok -> 2-byte VEX. - a.vpaddd (A::ymm0, A::ymm8, A::ymm2); // A high first argument register -> 2-byte VEX. - a.vpaddd (A::ymm0, A::ymm1, A::ymm8); // A high second argument -> 3-byte VEX. - a.vpmulld(A::ymm0, A::ymm1, A::ymm2); // Using non-0x0f map instruction -> 3-byte VEX. - a.vpsubd (A::ymm0, A::ymm1, A::ymm2); // Test vpsubd to ensure argument order is right. - },{ - /* VEX */ /*op*/ /*modRM*/ - 0xc5, 0xf5, 0xfe, 0xc2, - 0xc5, 0x75, 0xfe, 0xc2, - 0xc5, 0xbd, 0xfe, 0xc2, - 0xc4, 0xc1, 0x75, 0xfe, 0xc0, - 0xc4, 0xe2, 0x75, 0x40, 0xc2, - 0xc5, 0xf5, 0xfa, 0xc2, - }); - - test_asm(r, [&](A& a) { - a.vpaddw (A::ymm4, A::ymm3, A::ymm2); - a.vpavgw (A::ymm4, A::ymm3, A::ymm2); - a.vpcmpeqw (A::ymm4, A::ymm3, A::ymm2); - a.vpcmpgtw (A::ymm4, A::ymm3, A::ymm2); - - a.vpminsw (A::ymm4, A::ymm3, A::ymm2); - a.vpmaxsw (A::ymm4, A::ymm3, A::ymm2); - a.vpminuw (A::ymm4, A::ymm3, A::ymm2); - a.vpmaxuw (A::ymm4, A::ymm3, A::ymm2); - - a.vpmulhrsw(A::ymm4, A::ymm3, A::ymm2); - a.vpabsw (A::ymm4, A::ymm3); - a.vpsllw (A::ymm4, A::ymm3, 12); - a.vpsraw (A::ymm4, A::ymm3, 12); - },{ - 0xc5, 0xe5, 0xfd, 0xe2, - 0xc5, 0xe5, 0xe3, 0xe2, - 0xc5, 0xe5, 0x75, 0xe2, - 0xc5, 0xe5, 0x65, 0xe2, - - 0xc5, 0xe5, 0xea, 0xe2, - 0xc5, 0xe5, 0xee, 0xe2, - 0xc4,0xe2,0x65, 0x3a, 0xe2, - 0xc4,0xe2,0x65, 0x3e, 0xe2, - - 0xc4,0xe2,0x65, 0x0b, 0xe2, - 0xc4,0xe2,0x7d, 0x1d, 0xe3, - 0xc5,0xdd,0x71, 0xf3, 0x0c, - 0xc5,0xdd,0x71, 0xe3, 0x0c, - }); - - test_asm(r, [&](A& a) { - A::Label l; - a.vcmpeqps (A::ymm0, A::ymm1, &l); // vcmpeqps 0x1c(%rip), %ymm1, %ymm0 - a.vpcmpeqd (A::ymm0, A::ymm1, A::ymm2); - a.vpcmpgtd (A::ymm0, A::ymm1, A::ymm2); - a.vcmpeqps (A::ymm0, A::ymm1, A::ymm2); - a.vcmpltps (A::ymm0, A::ymm1, A::ymm2); - a.vcmpleps (A::ymm0, A::ymm1, A::ymm2); - a.vcmpneqps(A::ymm0, A::ymm1, A::ymm2); - a.label(&l); // 28 bytes after the vcmpeqps that uses it. - },{ - 0xc5,0xf4,0xc2,0x05,0x1c,0x00,0x00,0x00,0x00, - 0xc5,0xf5,0x76,0xc2, - 0xc5,0xf5,0x66,0xc2, - 0xc5,0xf4,0xc2,0xc2,0x00, - 0xc5,0xf4,0xc2,0xc2,0x01, - 0xc5,0xf4,0xc2,0xc2,0x02, - 0xc5,0xf4,0xc2,0xc2,0x04, - }); - - test_asm(r, [&](A& a) { - a.vminps(A::ymm0, A::ymm1, A::ymm2); - a.vmaxps(A::ymm0, A::ymm1, A::ymm2); - },{ - 0xc5,0xf4,0x5d,0xc2, - 0xc5,0xf4,0x5f,0xc2, - }); - - test_asm(r, [&](A& a) { - a.vpblendvb(A::ymm0, A::ymm1, A::ymm2, A::ymm3); - },{ - 0xc4,0xe3,0x75, 0x4c, 0xc2, 0x30, - }); - - test_asm(r, [&](A& a) { - a.vpsrld(A::ymm15, A::ymm2, 8); - a.vpsrld(A::ymm0 , A::ymm8, 5); - },{ - 0xc5, 0x85, 0x72,0xd2, 0x08, - 0xc4,0xc1,0x7d, 0x72,0xd0, 0x05, - }); - - test_asm(r, [&](A& a) { - A::Label l; - a.vpermps(A::ymm1, A::ymm2, A::Mem{A::rdi, 32}); - a.vperm2f128(A::ymm1, A::ymm2, &l, 0x20); - a.vpermq(A::ymm1, A::ymm2, 5); - a.label(&l); // 6 bytes after vperm2f128 - },{ - 0xc4,0xe2,0x6d,0x16,0x4f,0x20, - 0xc4,0xe3,0x6d,0x06,0x0d,0x06,0x00,0x00,0x00,0x20, - 0xc4,0xe3,0xfd, 0x00,0xca, 0x05, - }); - - test_asm(r, [&](A& a) { - a.vpunpckldq(A::ymm1, A::ymm2, A::Mem{A::rdi}); - a.vpunpckhdq(A::ymm1, A::ymm2, A::ymm3); - },{ - 0xc5,0xed,0x62,0x0f, - 0xc5,0xed,0x6a,0xcb, - }); - - test_asm(r, [&](A& a) { - a.vroundps(A::ymm1, A::ymm2, A::NEAREST); - a.vroundps(A::ymm1, A::ymm2, A::FLOOR); - a.vroundps(A::ymm1, A::ymm2, A::CEIL); - a.vroundps(A::ymm1, A::ymm2, A::TRUNC); - },{ - 0xc4,0xe3,0x7d,0x08,0xca,0x00, - 0xc4,0xe3,0x7d,0x08,0xca,0x01, - 0xc4,0xe3,0x7d,0x08,0xca,0x02, - 0xc4,0xe3,0x7d,0x08,0xca,0x03, - }); - - test_asm(r, [&](A& a) { - A::Label l; - a.label(&l); - a.byte(1); - a.byte(2); - a.byte(3); - a.byte(4); - - a.vbroadcastss(A::ymm0 , &l); - a.vbroadcastss(A::ymm1 , &l); - a.vbroadcastss(A::ymm8 , &l); - a.vbroadcastss(A::ymm15, &l); - - a.vpshufb(A::ymm4, A::ymm3, &l); - a.vpaddd (A::ymm4, A::ymm3, &l); - a.vpsubd (A::ymm4, A::ymm3, &l); - - a.vptest(A::ymm4, &l); - - a.vmulps (A::ymm4, A::ymm3, &l); - },{ - 0x01, 0x02, 0x03, 0x4, - - /* VEX */ /*op*/ /* ModRM */ /* offset */ - 0xc4, 0xe2, 0x7d, 0x18, 0b00'000'101, 0xf3,0xff,0xff,0xff, // 0xfffffff3 == -13 - 0xc4, 0xe2, 0x7d, 0x18, 0b00'001'101, 0xea,0xff,0xff,0xff, // 0xffffffea == -22 - 0xc4, 0x62, 0x7d, 0x18, 0b00'000'101, 0xe1,0xff,0xff,0xff, // 0xffffffe1 == -31 - 0xc4, 0x62, 0x7d, 0x18, 0b00'111'101, 0xd8,0xff,0xff,0xff, // 0xffffffd8 == -40 - - 0xc4, 0xe2, 0x65, 0x00, 0b00'100'101, 0xcf,0xff,0xff,0xff, // 0xffffffcf == -49 - - 0xc5, 0xe5, 0xfe, 0b00'100'101, 0xc7,0xff,0xff,0xff, // 0xffffffc7 == -57 - 0xc5, 0xe5, 0xfa, 0b00'100'101, 0xbf,0xff,0xff,0xff, // 0xffffffbf == -65 - - 0xc4, 0xe2, 0x7d, 0x17, 0b00'100'101, 0xb6,0xff,0xff,0xff, // 0xffffffb6 == -74 - - 0xc5, 0xe4, 0x59, 0b00'100'101, 0xae,0xff,0xff,0xff, // 0xffffffaf == -82 - }); - - test_asm(r, [&](A& a) { - a.vbroadcastss(A::ymm0, A::Mem{A::rdi, 0}); - a.vbroadcastss(A::ymm13, A::Mem{A::r14, 7}); - a.vbroadcastss(A::ymm8, A::Mem{A::rdx, -12}); - a.vbroadcastss(A::ymm8, A::Mem{A::rdx, 400}); - - a.vbroadcastss(A::ymm8, A::xmm0); - a.vbroadcastss(A::ymm0, A::xmm13); - },{ - /* VEX */ /*op*/ /*ModRM*/ /*offset*/ - 0xc4,0xe2,0x7d, 0x18, 0b00'000'111, - 0xc4,0x42,0x7d, 0x18, 0b01'101'110, 0x07, - 0xc4,0x62,0x7d, 0x18, 0b01'000'010, 0xf4, - 0xc4,0x62,0x7d, 0x18, 0b10'000'010, 0x90,0x01,0x00,0x00, - - 0xc4,0x62,0x7d, 0x18, 0b11'000'000, - 0xc4,0xc2,0x7d, 0x18, 0b11'000'101, - }); - - test_asm(r, [&](A& a) { - A::Label l; - a.label(&l); - a.jne(&l); - a.jne(&l); - a.je (&l); - a.jmp(&l); - a.jl (&l); - a.jc (&l); - - a.cmp(A::rdx, 1); - a.cmp(A::rax, 12); - a.cmp(A::r14, 2000000000); - },{ - 0x0f,0x85, 0xfa,0xff,0xff,0xff, // near jne -6 bytes - 0x0f,0x85, 0xf4,0xff,0xff,0xff, // near jne -12 bytes - 0x0f,0x84, 0xee,0xff,0xff,0xff, // near je -18 bytes - 0xe9, 0xe9,0xff,0xff,0xff, // near jmp -23 bytes - 0x0f,0x8c, 0xe3,0xff,0xff,0xff, // near jl -29 bytes - 0x0f,0x82, 0xdd,0xff,0xff,0xff, // near jc -35 bytes - - 0x48,0x83,0xfa,0x01, - 0x48,0x83,0xf8,0x0c, - 0x49,0x81,0xfe,0x00,0x94,0x35,0x77, - }); - - test_asm(r, [&](A& a) { - a.vmovups(A::ymm5, A::Mem{A::rsi}); - a.vmovups(A::Mem{A::rsi}, A::ymm5); - - a.vmovups(A::xmm5, A::Mem{A::rsi}); - a.vmovups(A::Mem{A::rsi}, A::xmm5); - - a.vpmovzxwd(A::ymm4, A::Mem{A::rsi}); - a.vpmovzxbd(A::ymm4, A::Mem{A::rsi}); - - a.vmovq(A::Mem{A::rdx}, A::xmm15); - },{ - /* VEX */ /*Op*/ /* ModRM */ - 0xc5, 0xfc, 0x10, 0b00'101'110, - 0xc5, 0xfc, 0x11, 0b00'101'110, - - 0xc5, 0xf8, 0x10, 0b00'101'110, - 0xc5, 0xf8, 0x11, 0b00'101'110, - - 0xc4,0xe2,0x7d, 0x33, 0b00'100'110, - 0xc4,0xe2,0x7d, 0x31, 0b00'100'110, - - 0xc5, 0x79, 0xd6, 0b00'111'010, - }); - - test_asm(r, [&](A& a) { - a.vmovups(A::ymm5, A::Mem{A::rsp, 0}); - a.vmovups(A::ymm5, A::Mem{A::rsp, 64}); - a.vmovups(A::ymm5, A::Mem{A::rsp,128}); - - a.vmovups(A::Mem{A::rsp, 0}, A::ymm5); - a.vmovups(A::Mem{A::rsp, 64}, A::ymm5); - a.vmovups(A::Mem{A::rsp,128}, A::ymm5); - },{ - 0xc5,0xfc,0x10,0x2c,0x24, - 0xc5,0xfc,0x10,0x6c,0x24,0x40, - 0xc5,0xfc,0x10,0xac,0x24,0x80,0x00,0x00,0x00, - - 0xc5,0xfc,0x11,0x2c,0x24, - 0xc5,0xfc,0x11,0x6c,0x24,0x40, - 0xc5,0xfc,0x11,0xac,0x24,0x80,0x00,0x00,0x00, - }); - - test_asm(r, [&](A& a) { - a.movzbq(A::rax, A::Mem{A::rsi}); // Low registers for src and dst. - a.movzbq(A::rax, A::Mem{A::r8,}); // High src register. - a.movzbq(A::r8 , A::Mem{A::rsi}); // High dst register. - a.movzbq(A::r8, A::Mem{A::rsi, 12}); - a.movzbq(A::r8, A::Mem{A::rsi, 400}); - - a.movzwq(A::rax, A::Mem{A::rsi}); // Low registers for src and dst. - a.movzwq(A::rax, A::Mem{A::r8,}); // High src register. - a.movzwq(A::r8 , A::Mem{A::rsi}); // High dst register. - a.movzwq(A::r8, A::Mem{A::rsi, 12}); - a.movzwq(A::r8, A::Mem{A::rsi, 400}); - - a.vmovd(A::Mem{A::rax}, A::xmm0); - a.vmovd(A::Mem{A::rax}, A::xmm8); - a.vmovd(A::Mem{A::r8 }, A::xmm0); - - a.vmovd(A::xmm0, A::Mem{A::rax}); - a.vmovd(A::xmm8, A::Mem{A::rax}); - a.vmovd(A::xmm0, A::Mem{A::r8 }); - - a.vmovd(A::xmm0 , A::Mem{A::rax, 0, A::rcx, A::FOUR}); - a.vmovd(A::xmm15, A::Mem{A::rax, 0, A::r8, A::TWO }); - a.vmovd(A::xmm0 , A::Mem{A::r8 , 0, A::rcx}); - - a.vmovd(A::rax, A::xmm0); - a.vmovd(A::rax, A::xmm8); - a.vmovd(A::r8 , A::xmm0); - - a.vmovd(A::xmm0, A::rax); - a.vmovd(A::xmm8, A::rax); - a.vmovd(A::xmm0, A::r8 ); - - a.movb(A::Mem{A::rdx}, A::rax); - a.movb(A::Mem{A::rdx}, A::r8 ); - a.movb(A::Mem{A::r8 }, A::rax); - - a.movb(A::rdx, A::Mem{A::rax}); - a.movb(A::rdx, A::Mem{A::r8 }); - a.movb(A::r8 , A::Mem{A::rax}); - - a.movb(A::rdx, 12); - a.movb(A::rax, 4); - a.movb(A::r8 , -1); - - a.movb(A::Mem{A::rdx}, 12); - a.movb(A::Mem{A::rax}, 4); - a.movb(A::Mem{A::r8 }, -1); - },{ - 0x48,0x0f,0xb6,0x06, // movzbq (%rsi), %rax - 0x49,0x0f,0xb6,0x00, - 0x4c,0x0f,0xb6,0x06, - 0x4c,0x0f,0xb6,0x46, 12, - 0x4c,0x0f,0xb6,0x86, 0x90,0x01,0x00,0x00, - - 0x48,0x0f,0xb7,0x06, // movzwq (%rsi), %rax - 0x49,0x0f,0xb7,0x00, - 0x4c,0x0f,0xb7,0x06, - 0x4c,0x0f,0xb7,0x46, 12, - 0x4c,0x0f,0xb7,0x86, 0x90,0x01,0x00,0x00, - - 0xc5,0xf9,0x7e,0x00, - 0xc5,0x79,0x7e,0x00, - 0xc4,0xc1,0x79,0x7e,0x00, - - 0xc5,0xf9,0x6e,0x00, - 0xc5,0x79,0x6e,0x00, - 0xc4,0xc1,0x79,0x6e,0x00, - - 0xc5,0xf9,0x6e,0x04,0x88, - 0xc4,0x21,0x79,0x6e,0x3c,0x40, - 0xc4,0xc1,0x79,0x6e,0x04,0x08, - - 0xc5,0xf9,0x7e,0xc0, - 0xc5,0x79,0x7e,0xc0, - 0xc4,0xc1,0x79,0x7e,0xc0, - - 0xc5,0xf9,0x6e,0xc0, - 0xc5,0x79,0x6e,0xc0, - 0xc4,0xc1,0x79,0x6e,0xc0, - - 0x48 ,0x88, 0x02, - 0x4c, 0x88, 0x02, - 0x49, 0x88, 0x00, - - 0x48 ,0x8a, 0x10, - 0x49, 0x8a, 0x10, - 0x4c, 0x8a, 0x00, - - 0x48, 0xc6, 0xc2, 0x0c, - 0x48, 0xc6, 0xc0, 0x04, - 0x49, 0xc6, 0xc0, 0xff, - - 0x48, 0xc6, 0x02, 0x0c, - 0x48, 0xc6, 0x00, 0x04, - 0x49, 0xc6, 0x00, 0xff, - }); - - test_asm(r, [&](A& a) { - a.vpinsrd(A::xmm1, A::xmm8, A::Mem{A::rsi}, 1); // vpinsrd $1, (%rsi), %xmm8, %xmm1 - a.vpinsrd(A::xmm8, A::xmm1, A::Mem{A::r8 }, 3); // vpinsrd $3, (%r8), %xmm1, %xmm8; - - a.vpinsrw(A::xmm1, A::xmm8, A::Mem{A::rsi}, 4); // vpinsrw $4, (%rsi), %xmm8, %xmm1 - a.vpinsrw(A::xmm8, A::xmm1, A::Mem{A::r8 }, 12); // vpinrsw $12, (%r8), %xmm1, %xmm8 - - a.vpinsrb(A::xmm1, A::xmm8, A::Mem{A::rsi}, 4); // vpinsrb $4, (%rsi), %xmm8, %xmm1 - a.vpinsrb(A::xmm8, A::xmm1, A::Mem{A::r8 }, 12); // vpinsrb $12, (%r8), %xmm1, %xmm8 - - a.vextracti128(A::xmm1, A::ymm8, 1); // vextracti128 $1, %ymm8, %xmm1 - a.vextracti128(A::xmm8, A::ymm1, 0); // vextracti128 $0, %ymm1, %xmm8 - - a.vpextrd(A::Mem{A::rsi}, A::xmm8, 3); // vpextrd $3, %xmm8, (%rsi) - a.vpextrd(A::Mem{A::r8 }, A::xmm1, 2); // vpextrd $2, %xmm1, (%r8) - - a.vpextrw(A::Mem{A::rsi}, A::xmm8, 7); - a.vpextrw(A::Mem{A::r8 }, A::xmm1, 15); - - a.vpextrb(A::Mem{A::rsi}, A::xmm8, 7); - a.vpextrb(A::Mem{A::r8 }, A::xmm1, 15); - },{ - 0xc4,0xe3,0x39, 0x22, 0x0e, 1, - 0xc4,0x43,0x71, 0x22, 0x00, 3, - - 0xc5,0xb9, 0xc4, 0x0e, 4, - 0xc4,0x41,0x71, 0xc4, 0x00, 12, - - 0xc4,0xe3,0x39, 0x20, 0x0e, 4, - 0xc4,0x43,0x71, 0x20, 0x00, 12, - - 0xc4,0x63,0x7d,0x39,0xc1, 1, - 0xc4,0xc3,0x7d,0x39,0xc8, 0, - - 0xc4,0x63,0x79,0x16,0x06, 3, - 0xc4,0xc3,0x79,0x16,0x08, 2, - - 0xc4,0x63,0x79, 0x15, 0x06, 7, - 0xc4,0xc3,0x79, 0x15, 0x08, 15, - - 0xc4,0x63,0x79, 0x14, 0x06, 7, - 0xc4,0xc3,0x79, 0x14, 0x08, 15, - }); - - test_asm(r, [&](A& a) { - a.vpandn(A::ymm3, A::ymm12, A::ymm2); - },{ - 0xc5, 0x9d, 0xdf, 0xda, - }); - - test_asm(r, [&](A& a) { - A::Label l; - a.vmovdqa(A::ymm3, A::ymm2); // vmovdqa %ymm2 , %ymm3 - - a.vmovdqa(A::ymm3, A::Mem{A::rsi}); // vmovdqa (%rsi) , %ymm3 - a.vmovdqa(A::ymm3, A::Mem{A::rsp}); // vmovdqa (%rsp) , %ymm3 - a.vmovdqa(A::ymm3, A::Mem{A::r11}); // vmovdqa (%r11) , %ymm3 - - a.vmovdqa(A::ymm3, A::Mem{A::rsi, 4}); // vmovdqa 4(%rsi) , %ymm3 - a.vmovdqa(A::ymm3, A::Mem{A::rsp, 4}); // vmovdqa 4(%rsp) , %ymm3 - - a.vmovdqa(A::ymm3, A::Mem{A::rsi, 4, A::rax, A::EIGHT}); // vmovdqa 4(%rsi,%rax,8), %ymm3 - a.vmovdqa(A::ymm3, A::Mem{A::r11, 4, A::rax, A::TWO }); // vmovdqa 4(%r11,%rax,2), %ymm3 - a.vmovdqa(A::ymm3, A::Mem{A::rsi, 4, A::r11, A::FOUR }); // vmovdqa 4(%rsi,%r11,4), %ymm3 - a.vmovdqa(A::ymm3, A::Mem{A::rsi, 4, A::r11, A::ONE }); // vmovdqa 4(%rsi,%r11,1), %ymm3 - a.vmovdqa(A::ymm3, A::Mem{A::rsi, 4, A::r11}); // vmovdqa 4(%rsi,%r11) , %ymm3 - - a.vmovdqa(A::ymm3, A::Mem{A::rsi, 64, A::r11}); // vmovdqa 64(%rsi,%r11), %ymm3 - a.vmovdqa(A::ymm3, A::Mem{A::rsi, 128, A::r11}); // vmovdqa 128(%rsi,%r11), %ymm3 - a.vmovdqa(A::ymm3, &l); // vmovdqa 16(%rip) , %ymm3 - - a.vcvttps2dq(A::ymm3, A::ymm2); - a.vcvtdq2ps (A::ymm3, A::ymm2); - a.vcvtps2dq (A::ymm3, A::ymm2); - a.vsqrtps (A::ymm3, A::ymm2); - a.label(&l); - },{ - 0xc5,0xfd,0x6f,0xda, - - 0xc5,0xfd,0x6f,0x1e, - 0xc5,0xfd,0x6f,0x1c,0x24, - 0xc4,0xc1,0x7d,0x6f,0x1b, - - 0xc5,0xfd,0x6f,0x5e,0x04, - 0xc5,0xfd,0x6f,0x5c,0x24,0x04, - - 0xc5,0xfd,0x6f,0x5c,0xc6,0x04, - 0xc4,0xc1,0x7d,0x6f,0x5c,0x43,0x04, - 0xc4,0xa1,0x7d,0x6f,0x5c,0x9e,0x04, - 0xc4,0xa1,0x7d,0x6f,0x5c,0x1e,0x04, - 0xc4,0xa1,0x7d,0x6f,0x5c,0x1e,0x04, - - 0xc4,0xa1,0x7d,0x6f,0x5c,0x1e,0x40, - 0xc4,0xa1,0x7d,0x6f,0x9c,0x1e,0x80,0x00,0x00,0x00, - - 0xc5,0xfd,0x6f,0x1d,0x10,0x00,0x00,0x00, - - 0xc5,0xfe,0x5b,0xda, - 0xc5,0xfc,0x5b,0xda, - 0xc5,0xfd,0x5b,0xda, - 0xc5,0xfc,0x51,0xda, - }); - - test_asm(r, [&](A& a) { - a.vcvtps2ph(A::xmm3, A::ymm2, A::CURRENT); - a.vcvtps2ph(A::Mem{A::rsi, 32, A::rax, A::EIGHT}, A::ymm5, A::CEIL); - - a.vcvtph2ps(A::ymm15, A::Mem{A::rdi, 12, A::r9, A::ONE}); - a.vcvtph2ps(A::ymm2, A::xmm3); - },{ - 0xc4,0xe3,0x7d,0x1d,0xd3,0x04, - 0xc4,0xe3,0x7d,0x1d,0x6c,0xc6,0x20,0x02, - - 0xc4,0x22,0x7d,0x13,0x7c,0x0f,0x0c, - 0xc4,0xe2,0x7d,0x13,0xd3, - }); - - test_asm(r, [&](A& a) { - a.vgatherdps(A::ymm1 , A::FOUR , A::ymm0 , A::rdi, A::ymm2 ); - a.vgatherdps(A::ymm0 , A::ONE , A::ymm2 , A::rax, A::ymm1 ); - a.vgatherdps(A::ymm10, A::ONE , A::ymm2 , A::rax, A::ymm1 ); - a.vgatherdps(A::ymm0 , A::ONE , A::ymm12, A::rax, A::ymm1 ); - a.vgatherdps(A::ymm0 , A::ONE , A::ymm2 , A::r9 , A::ymm1 ); - a.vgatherdps(A::ymm0 , A::ONE , A::ymm2 , A::rax, A::ymm12); - a.vgatherdps(A::ymm0 , A::EIGHT, A::ymm2 , A::rax, A::ymm12); - },{ - 0xc4,0xe2,0x6d,0x92,0x0c,0x87, - 0xc4,0xe2,0x75,0x92,0x04,0x10, - 0xc4,0x62,0x75,0x92,0x14,0x10, - 0xc4,0xa2,0x75,0x92,0x04,0x20, - 0xc4,0xc2,0x75,0x92,0x04,0x11, - 0xc4,0xe2,0x1d,0x92,0x04,0x10, - 0xc4,0xe2,0x1d,0x92,0x04,0xd0, - }); - - test_asm(r, [&](A& a) { - a.mov(A::rax, A::Mem{A::rdi, 0}); - a.mov(A::rax, A::Mem{A::rdi, 1}); - a.mov(A::rax, A::Mem{A::rdi, 512}); - a.mov(A::r15, A::Mem{A::r13, 42}); - a.mov(A::rax, A::Mem{A::r13, 42}); - a.mov(A::r15, A::Mem{A::rax, 42}); - a.mov(A::rax, 1); - a.mov(A::rax, A::rcx); - },{ - 0x48, 0x8b, 0x07, - 0x48, 0x8b, 0x47, 0x01, - 0x48, 0x8b, 0x87, 0x00,0x02,0x00,0x00, - 0x4d, 0x8b, 0x7d, 0x2a, - 0x49, 0x8b, 0x45, 0x2a, - 0x4c, 0x8b, 0x78, 0x2a, - 0x48, 0xc7, 0xc0, 0x01,0x00,0x00,0x00, - 0x48, 0x89, 0xc8, - }); - - // echo "fmul v4.4s, v3.4s, v1.4s" | llvm-mc -show-encoding -arch arm64 - - test_asm(r, [&](A& a) { - a.and16b(A::v4, A::v3, A::v1); - a.orr16b(A::v4, A::v3, A::v1); - a.eor16b(A::v4, A::v3, A::v1); - a.bic16b(A::v4, A::v3, A::v1); - a.bsl16b(A::v4, A::v3, A::v1); - a.not16b(A::v4, A::v3); - - a.add4s(A::v4, A::v3, A::v1); - a.sub4s(A::v4, A::v3, A::v1); - a.mul4s(A::v4, A::v3, A::v1); - - a.cmeq4s(A::v4, A::v3, A::v1); - a.cmgt4s(A::v4, A::v3, A::v1); - - a.sub8h(A::v4, A::v3, A::v1); - a.mul8h(A::v4, A::v3, A::v1); - - a.fadd4s(A::v4, A::v3, A::v1); - a.fsub4s(A::v4, A::v3, A::v1); - a.fmul4s(A::v4, A::v3, A::v1); - a.fdiv4s(A::v4, A::v3, A::v1); - a.fmin4s(A::v4, A::v3, A::v1); - a.fmax4s(A::v4, A::v3, A::v1); - - a.fneg4s (A::v4, A::v3); - a.fsqrt4s(A::v4, A::v3); - - a.fmla4s(A::v4, A::v3, A::v1); - a.fmls4s(A::v4, A::v3, A::v1); - - a.fcmeq4s(A::v4, A::v3, A::v1); - a.fcmgt4s(A::v4, A::v3, A::v1); - a.fcmge4s(A::v4, A::v3, A::v1); - },{ - 0x64,0x1c,0x21,0x4e, - 0x64,0x1c,0xa1,0x4e, - 0x64,0x1c,0x21,0x6e, - 0x64,0x1c,0x61,0x4e, - 0x64,0x1c,0x61,0x6e, - 0x64,0x58,0x20,0x6e, - - 0x64,0x84,0xa1,0x4e, - 0x64,0x84,0xa1,0x6e, - 0x64,0x9c,0xa1,0x4e, - - 0x64,0x8c,0xa1,0x6e, - 0x64,0x34,0xa1,0x4e, - - 0x64,0x84,0x61,0x6e, - 0x64,0x9c,0x61,0x4e, - - 0x64,0xd4,0x21,0x4e, - 0x64,0xd4,0xa1,0x4e, - 0x64,0xdc,0x21,0x6e, - 0x64,0xfc,0x21,0x6e, - 0x64,0xf4,0xa1,0x4e, - 0x64,0xf4,0x21,0x4e, - - 0x64,0xf8,0xa0,0x6e, - 0x64,0xf8,0xa1,0x6e, - - 0x64,0xcc,0x21,0x4e, - 0x64,0xcc,0xa1,0x4e, - - 0x64,0xe4,0x21,0x4e, - 0x64,0xe4,0xa1,0x6e, - 0x64,0xe4,0x21,0x6e, - }); - - test_asm(r, [&](A& a) { - a.shl4s(A::v4, A::v3, 0); - a.shl4s(A::v4, A::v3, 1); - a.shl4s(A::v4, A::v3, 8); - a.shl4s(A::v4, A::v3, 16); - a.shl4s(A::v4, A::v3, 31); - - a.sshr4s(A::v4, A::v3, 1); - a.sshr4s(A::v4, A::v3, 8); - a.sshr4s(A::v4, A::v3, 31); - - a.ushr4s(A::v4, A::v3, 1); - a.ushr4s(A::v4, A::v3, 8); - a.ushr4s(A::v4, A::v3, 31); - - a.ushr8h(A::v4, A::v3, 1); - a.ushr8h(A::v4, A::v3, 8); - a.ushr8h(A::v4, A::v3, 15); - },{ - 0x64,0x54,0x20,0x4f, - 0x64,0x54,0x21,0x4f, - 0x64,0x54,0x28,0x4f, - 0x64,0x54,0x30,0x4f, - 0x64,0x54,0x3f,0x4f, - - 0x64,0x04,0x3f,0x4f, - 0x64,0x04,0x38,0x4f, - 0x64,0x04,0x21,0x4f, - - 0x64,0x04,0x3f,0x6f, - 0x64,0x04,0x38,0x6f, - 0x64,0x04,0x21,0x6f, - - 0x64,0x04,0x1f,0x6f, - 0x64,0x04,0x18,0x6f, - 0x64,0x04,0x11,0x6f, - }); - - test_asm(r, [&](A& a) { - a.sli4s(A::v4, A::v3, 0); - a.sli4s(A::v4, A::v3, 1); - a.sli4s(A::v4, A::v3, 8); - a.sli4s(A::v4, A::v3, 16); - a.sli4s(A::v4, A::v3, 31); - },{ - 0x64,0x54,0x20,0x6f, - 0x64,0x54,0x21,0x6f, - 0x64,0x54,0x28,0x6f, - 0x64,0x54,0x30,0x6f, - 0x64,0x54,0x3f,0x6f, - }); - - test_asm(r, [&](A& a) { - a.scvtf4s (A::v4, A::v3); - a.fcvtzs4s(A::v4, A::v3); - a.fcvtns4s(A::v4, A::v3); - a.frintp4s(A::v4, A::v3); - a.frintm4s(A::v4, A::v3); - a.fcvtn (A::v4, A::v3); - a.fcvtl (A::v4, A::v3); - },{ - 0x64,0xd8,0x21,0x4e, - 0x64,0xb8,0xa1,0x4e, - 0x64,0xa8,0x21,0x4e, - 0x64,0x88,0xa1,0x4e, - 0x64,0x98,0x21,0x4e, - 0x64,0x68,0x21,0x0e, - 0x64,0x78,0x21,0x0e, - }); - - test_asm(r, [&](A& a) { - a.sub (A::sp, A::sp, 32); // sub sp, sp, #32 - a.strq(A::v0, A::sp, 1); // str q0, [sp, #16] - a.strq(A::v1, A::sp); // str q1, [sp] - a.strd(A::v0, A::sp, 6); // str s0, [sp, #48] - a.strs(A::v0, A::sp, 6); // str s0, [sp, #24] - a.strh(A::v0, A::sp, 10); // str h0, [sp, #20] - a.strb(A::v0, A::sp, 47); // str b0, [sp, #47] - a.ldrb(A::v9, A::sp, 42); // ldr b9, [sp, #42] - a.ldrh(A::v9, A::sp, 47); // ldr h9, [sp, #94] - a.ldrs(A::v7, A::sp, 10); // ldr s7, [sp, #40] - a.ldrd(A::v7, A::sp, 1); // ldr d7, [sp, #8] - a.ldrq(A::v5, A::sp, 128); // ldr q5, [sp, #2048] - a.add (A::sp, A::sp, 32); // add sp, sp, #32 - },{ - 0xff,0x83,0x00,0xd1, - 0xe0,0x07,0x80,0x3d, - 0xe1,0x03,0x80,0x3d, - 0xe0,0x1b,0x00,0xfd, - 0xe0,0x1b,0x00,0xbd, - 0xe0,0x2b,0x00,0x7d, - 0xe0,0xbf,0x00,0x3d, - 0xe9,0xab,0x40,0x3d, - 0xe9,0xbf,0x40,0x7d, - 0xe7,0x2b,0x40,0xbd, - 0xe7,0x07,0x40,0xfd, - 0xe5,0x03,0xc2,0x3d, - 0xff,0x83,0x00,0x91, - }); - - test_asm(r, [&](A& a) { - a.brk(0); - a.brk(65535); - - a.ret(A::x30); // Conventional ret using link register. - a.ret(A::x13); // Can really return using any register if we like. - - a.add(A::x2, A::x2, 4); - a.add(A::x3, A::x2, 32); - - a.sub(A::x2, A::x2, 4); - a.sub(A::x3, A::x2, 32); - - a.subs(A::x2, A::x2, 4); - a.subs(A::x3, A::x2, 32); - - a.subs(A::xzr, A::x2, 4); // These are actually the same instruction! - a.cmp(A::x2, 4); - - A::Label l; - a.label(&l); - a.bne(&l); - a.bne(&l); - a.blt(&l); - a.b(&l); - a.cbnz(A::x2, &l); - a.cbz(A::x2, &l); - - a.add(A::x3, A::x2, A::x1); // add x3,x2,x1 - a.add(A::x3, A::x2, A::x1, A::ASR, 3); // add x3,x2,x1, asr #3 - },{ - 0x00,0x00,0x20,0xd4, - 0xe0,0xff,0x3f,0xd4, - - 0xc0,0x03,0x5f,0xd6, - 0xa0,0x01,0x5f,0xd6, - - 0x42,0x10,0x00,0x91, - 0x43,0x80,0x00,0x91, - - 0x42,0x10,0x00,0xd1, - 0x43,0x80,0x00,0xd1, - - 0x42,0x10,0x00,0xf1, - 0x43,0x80,0x00,0xf1, - - 0x5f,0x10,0x00,0xf1, - 0x5f,0x10,0x00,0xf1, - - 0x01,0x00,0x00,0x54, // b.ne #0 - 0xe1,0xff,0xff,0x54, // b.ne #-4 - 0xcb,0xff,0xff,0x54, // b.lt #-8 - 0xae,0xff,0xff,0x54, // b.al #-12 - 0x82,0xff,0xff,0xb5, // cbnz x2, #-16 - 0x62,0xff,0xff,0xb4, // cbz x2, #-20 - - 0x43,0x00,0x01,0x8b, - 0x43,0x0c,0x81,0x8b, - }); - - // Can we cbz() to a not-yet-defined label? - test_asm(r, [&](A& a) { - A::Label l; - a.cbz(A::x2, &l); - a.add(A::x3, A::x2, 32); - a.label(&l); - a.ret(A::x30); - },{ - 0x42,0x00,0x00,0xb4, // cbz x2, #8 - 0x43,0x80,0x00,0x91, // add x3, x2, #32 - 0xc0,0x03,0x5f,0xd6, // ret - }); - - // If we start a label as a backward label, - // can we redefine it to be a future label? - // (Not sure this is useful... just want to test it works.) - test_asm(r, [&](A& a) { - A::Label l1; - a.label(&l1); - a.add(A::x3, A::x2, 32); - a.cbz(A::x2, &l1); // This will jump backward... nothing sneaky. - - A::Label l2; // Start off the same... - a.label(&l2); - a.add(A::x3, A::x2, 32); - a.cbz(A::x2, &l2); // Looks like this will go backward... - a.add(A::x2, A::x2, 4); - a.add(A::x3, A::x2, 32); - a.label(&l2); // But no... actually forward! What a switcheroo! - },{ - 0x43,0x80,0x00,0x91, // add x3, x2, #32 - 0xe2,0xff,0xff,0xb4, // cbz x2, #-4 - - 0x43,0x80,0x00,0x91, // add x3, x2, #32 - 0x62,0x00,0x00,0xb4, // cbz x2, #12 - 0x42,0x10,0x00,0x91, // add x2, x2, #4 - 0x43,0x80,0x00,0x91, // add x3, x2, #32 - }); - - // Loading from a label on ARM. - test_asm(r, [&](A& a) { - A::Label fore,aft; - a.label(&fore); - a.word(0x01234567); - a.ldrq(A::v1, &fore); - a.ldrq(A::v2, &aft); - a.label(&aft); - a.word(0x76543210); - },{ - 0x67,0x45,0x23,0x01, - 0xe1,0xff,0xff,0x9c, // ldr q1, #-4 - 0x22,0x00,0x00,0x9c, // ldr q2, #4 - 0x10,0x32,0x54,0x76, - }); - - test_asm(r, [&](A& a) { - a.ldrq(A::v0, A::x8); - a.strq(A::v0, A::x8); - },{ - 0x00,0x01,0xc0,0x3d, - 0x00,0x01,0x80,0x3d, - }); - - test_asm(r, [&](A& a) { - a.dup4s (A::v0, A::x8); - a.ld1r4s (A::v0, A::x8); // echo 'ld1r.4s {v0}, [x8]' | llvm-mc --show-encoding - a.ld1r8h (A::v0, A::x8); - a.ld1r16b(A::v0, A::x8); - },{ - 0x00,0x0d,0x04,0x4e, - 0x00,0xc9,0x40,0x4d, - 0x00,0xc5,0x40,0x4d, - 0x00,0xc1,0x40,0x4d, - }); - - test_asm(r, [&](A& a) { - a.ld24s(A::v0, A::x8); // echo 'ld2.4s {v0,v1}, [x8]' | llvm-mc --show-encoding - a.ld44s(A::v0, A::x8); - a.st24s(A::v0, A::x8); - a.st44s(A::v0, A::x8); // echo 'st4.4s {v0,v1,v2,v3}, [x8]' | llvm-mc --show-encoding - - a.ld24s(A::v0, A::x8, 0); //echo 'ld2 {v0.s,v1.s}[0], [x8]' | llvm-mc --show-encoding - a.ld24s(A::v0, A::x8, 1); - a.ld24s(A::v0, A::x8, 2); - a.ld24s(A::v0, A::x8, 3); - - a.ld44s(A::v0, A::x8, 0); // ld4 {v0.s,v1.s,v2.s,v3.s}[0], [x8] - a.ld44s(A::v0, A::x8, 1); - a.ld44s(A::v0, A::x8, 2); - a.ld44s(A::v0, A::x8, 3); - },{ - 0x00,0x89,0x40,0x4c, - 0x00,0x09,0x40,0x4c, - 0x00,0x89,0x00,0x4c, - 0x00,0x09,0x00,0x4c, - - 0x00,0x81,0x60,0x0d, - 0x00,0x91,0x60,0x0d, - 0x00,0x81,0x60,0x4d, - 0x00,0x91,0x60,0x4d, - - 0x00,0xa1,0x60,0x0d, - 0x00,0xb1,0x60,0x0d, - 0x00,0xa1,0x60,0x4d, - 0x00,0xb1,0x60,0x4d, - }); - - test_asm(r, [&](A& a) { - a.xtns2h(A::v0, A::v0); - a.xtnh2b(A::v0, A::v0); - a.strs (A::v0, A::x0); - - a.ldrs (A::v0, A::x0); - a.uxtlb2h(A::v0, A::v0); - a.uxtlh2s(A::v0, A::v0); - - a.uminv4s(A::v3, A::v4); - a.movs (A::x3, A::v4,0); // mov.s w3,v4[0] - a.movs (A::x3, A::v4,1); // mov.s w3,v4[1] - a.inss (A::v4, A::x3,3); // ins.s v4[3],w3 - },{ - 0x00,0x28,0x61,0x0e, - 0x00,0x28,0x21,0x0e, - 0x00,0x00,0x00,0xbd, - - 0x00,0x00,0x40,0xbd, - 0x00,0xa4,0x08,0x2f, - 0x00,0xa4,0x10,0x2f, - - 0x83,0xa8,0xb1,0x6e, - 0x83,0x3c,0x04,0x0e, - 0x83,0x3c,0x0c,0x0e, - 0x64,0x1c,0x1c,0x4e, - }); - - test_asm(r, [&](A& a) { - a.ldrb(A::v0, A::x8); - a.strb(A::v0, A::x8); - },{ - 0x00,0x01,0x40,0x3d, - 0x00,0x01,0x00,0x3d, - }); - - test_asm(r, [&](A& a) { - a.ldrd(A::x0, A::x1, 3); // ldr x0, [x1, #24] - a.ldrs(A::x0, A::x1, 3); // ldr w0, [x1, #12] - a.ldrh(A::x0, A::x1, 3); // ldrh w0, [x1, #6] - a.ldrb(A::x0, A::x1, 3); // ldrb w0, [x1, #3] - - a.strs(A::x0, A::x1, 3); // str w0, [x1, #12] - },{ - 0x20,0x0c,0x40,0xf9, - 0x20,0x0c,0x40,0xb9, - 0x20,0x0c,0x40,0x79, - 0x20,0x0c,0x40,0x39, - - 0x20,0x0c,0x00,0xb9, - }); - - test_asm(r, [&](A& a) { - a.tbl (A::v0, A::v1, A::v2); - a.uzp14s(A::v0, A::v1, A::v2); - a.uzp24s(A::v0, A::v1, A::v2); - a.zip14s(A::v0, A::v1, A::v2); - a.zip24s(A::v0, A::v1, A::v2); - },{ - 0x20,0x00,0x02,0x4e, - 0x20,0x18,0x82,0x4e, - 0x20,0x58,0x82,0x4e, - 0x20,0x38,0x82,0x4e, - 0x20,0x78,0x82,0x4e, - }); -} - -DEF_TEST(SkVM_approx_math, r) { - auto eval = [](int N, float values[], auto fn) { - skvm::Builder b; - skvm::Ptr inout = b.varying(); - - b.storeF(inout, fn(&b, b.loadF(inout))); - - b.done().eval(N, values); - }; - - auto compare = [r](int N, const float values[], const float expected[]) { - for (int i = 0; i < N; ++i) { - REPORTER_ASSERT(r, (values[i] == expected[i]) || - SkScalarNearlyEqual(values[i], expected[i], 0.001f), - "evaluated to %g, but expected %g", values[i], expected[i]); - } - }; - - // log2 - { - float values[] = {0.25f, 0.5f, 1, 2, 4, 8}; - constexpr int N = std::size(values); - eval(N, values, [](skvm::Builder* b, skvm::F32 v) { - return b->approx_log2(v); - }); - const float expected[] = {-2, -1, 0, 1, 2, 3}; - compare(N, values, expected); - } - - // pow2 - { - float values[] = {-80, -5, -2, -1, 0, 1, 2, 3, 5, 160}; - constexpr int N = std::size(values); - eval(N, values, [](skvm::Builder* b, skvm::F32 v) { - return b->approx_pow2(v); - }); - const float expected[] = {0, 0.03125f, 0.25f, 0.5f, 1, 2, 4, 8, 32, INFINITY}; - compare(N, values, expected); - } - // powf -- 1^x - { - float exps[] = {-2, -1, 0, 1, 2}; - constexpr int N = std::size(exps); - eval(N, exps, [](skvm::Builder* b, skvm::F32 exp) { - return b->approx_powf(b->splat(1.0f), exp); - }); - const float expected[] = {1, 1, 1, 1, 1}; - compare(N, exps, expected); - } - // powf -- 2^x - { - float exps[] = {-80, -5, -2, -1, 0, 1, 2, 3, 5, 160}; - constexpr int N = std::size(exps); - eval(N, exps, [](skvm::Builder* b, skvm::F32 exp) { - return b->approx_powf(2.0, exp); - }); - const float expected[] = {0, 0.03125f, 0.25f, 0.5f, 1, 2, 4, 8, 32, INFINITY}; - compare(N, exps, expected); - } - // powf -- 3^x - { - float exps[] = {-2, -1, 0, 1, 2}; - constexpr int N = std::size(exps); - eval(N, exps, [](skvm::Builder* b, skvm::F32 exp) { - return b->approx_powf(b->splat(3.0f), exp); - }); - const float expected[] = {1/9.0f, 1/3.0f, 1, 3, 9}; - compare(N, exps, expected); - } - // powf -- x^0.5 - { - float bases[] = {0, 1, 4, 9, 16}; - constexpr int N = std::size(bases); - eval(N, bases, [](skvm::Builder* b, skvm::F32 base) { - return b->approx_powf(base, b->splat(0.5f)); - }); - const float expected[] = {0, 1, 2, 3, 4}; - compare(N, bases, expected); - } - // powf -- x^1 - { - float bases[] = {0, 1, 2, 3, 4}; - constexpr int N = std::size(bases); - eval(N, bases, [](skvm::Builder* b, skvm::F32 base) { - return b->approx_powf(base, b->splat(1.0f)); - }); - const float expected[] = {0, 1, 2, 3, 4}; - compare(N, bases, expected); - } - // powf -- x^2 - { - float bases[] = {0, 1, 2, 3, 4}; - constexpr int N = std::size(bases); - eval(N, bases, [](skvm::Builder* b, skvm::F32 base) { - return b->approx_powf(base, b->splat(2.0f)); - }); - const float expected[] = {0, 1, 4, 9, 16}; - compare(N, bases, expected); - } - - auto test = [r](float arg, float expected, float tolerance, auto prog) { - skvm::Builder b; - skvm::Ptr inout = b.varying(); - b.storeF(inout, prog(b.loadF(inout))); - float actual = arg; - b.done().eval(1, &actual); - - float err = std::abs(actual - expected); - - if (err > tolerance) { - // SkDebugf("arg %g, expected %g, actual %g\n", arg, expected, actual); - REPORTER_ASSERT(r, true); - } - return err; - }; - - auto test2 = [r](float arg0, float arg1, float expected, float tolerance, auto prog) { - skvm::Builder b; - skvm::Ptr in0 = b.varying(); - skvm::Ptr in1 = b.varying(); - skvm::Ptr out = b.varying(); - b.storeF(out, prog(b.loadF(in0), b.loadF(in1))); - float actual; - b.done().eval(1, &arg0, &arg1, &actual); - - float err = std::abs(actual - expected); - - if (err > tolerance) { - // SkDebugf("[%g, %g]: expected %g, actual %g\n", arg0, arg1, expected, actual); - REPORTER_ASSERT(r, true); - } - return err; - }; - - // sine, cosine, tangent - { - constexpr float P = SK_ScalarPI; - constexpr float tol = 0.00175f; - for (float rad = -5*P; rad <= 5*P; rad += 0.1f) { - test(rad, sk_float_sin(rad), tol, [](skvm::F32 x) { - return approx_sin(x); - }); - test(rad, sk_float_cos(rad), tol, [](skvm::F32 x) { - return approx_cos(x); - }); - } - - // Our tangent diverge more as we get near infinities (x near +- Pi/2), - // so bring in the domain a little. - constexpr float eps = 0.16f; - float err = 0; - for (float rad = -P/2 + eps; rad <= P/2 - eps; rad += 0.01f) { - err += test(rad, sk_float_tan(rad), tol, [](skvm::F32 x) { - return approx_tan(x); - }); - // try again with some multiples of P, to check our periodicity - test(rad, sk_float_tan(rad), tol, [=](skvm::F32 x) { - return approx_tan(x + 3*P); - }); - test(rad, sk_float_tan(rad), tol, [=](skvm::F32 x) { - return approx_tan(x - 3*P); - }); - } - if ((false)) { SkDebugf("tan error %g\n", err); } - } - - // asin, acos, atan - { - constexpr float tol = 0.00175f; - float err = 0; - for (float x = -1; x <= 1; x += 1.0f/64) { - err += test(x, asin(x), tol, [](skvm::F32 x) { - return approx_asin(x); - }); - test(x, acos(x), tol, [](skvm::F32 x) { - return approx_acos(x); - }); - } - if ((false)) { SkDebugf("asin error %g\n", err); } - - err = 0; - for (float x = -10; x <= 10; x += 1.0f/16) { - err += test(x, atan(x), tol, [](skvm::F32 x) { - return approx_atan(x); - }); - } - if ((false)) { SkDebugf("atan error %g\n", err); } - - for (float y = -3; y <= 3; y += 1) { - for (float x = -3; x <= 3; x += 1) { - err += test2(y, x, atan2(y,x), tol, [](skvm::F32 y, skvm::F32 x) { - return approx_atan2(y,x); - }); - } - } - if ((false)) { SkDebugf("atan2 error %g\n", err); } - } -} - -DEF_TEST(SkVM_min_max, r) { - // min() and max() have subtle behavior when one argument is NaN and - // the other isn't. It's not sound to blindly swap their arguments. - // - // All backends must behave like std::min() and std::max(), which are - // - // min(x,y) = y(), - mn = b.varying(), - mx = b.varying(); - - skvm::F32 x = b.loadF(src), - y = b.uniformF(b.uniform(), 0); - - b.storeF(mn, b.min(x,y)); - b.storeF(mx, b.max(x,y)); - } - - test_jit_and_interpreter(b, [&](const skvm::Program& program){ - float mn[8], mx[8]; - for (int i = 0; i < 8; i++) { - // min() and max() everything with f[i]. - program.eval(8, f,mn,mx, &f[i]); - - for (int j = 0; j < 8; j++) { - REPORTER_ASSERT(r, identical(mn[j], std::min(f[j], f[i]))); - REPORTER_ASSERT(r, identical(mx[j], std::max(f[j], f[i]))); - } - } - }); - } - - // Test each with constant on the right. - for (int i = 0; i < 8; i++) { - skvm::Builder b; - { - skvm::Ptr src = b.varying(), - mn = b.varying(), - mx = b.varying(); - - skvm::F32 x = b.loadF(src), - y = b.splat(f[i]); - - b.storeF(mn, b.min(x,y)); - b.storeF(mx, b.max(x,y)); - } - - test_jit_and_interpreter(b, [&](const skvm::Program& program){ - float mn[8], mx[8]; - program.eval(8, f,mn,mx); - for (int j = 0; j < 8; j++) { - REPORTER_ASSERT(r, identical(mn[j], std::min(f[j], f[i]))); - REPORTER_ASSERT(r, identical(mx[j], std::max(f[j], f[i]))); - } - }); - } - - // Test each with constant on the left. - for (int i = 0; i < 8; i++) { - skvm::Builder b; - { - skvm::Ptr src = b.varying(), - mn = b.varying(), - mx = b.varying(); - - skvm::F32 x = b.splat(f[i]), - y = b.loadF(src); - - b.storeF(mn, b.min(x,y)); - b.storeF(mx, b.max(x,y)); - } - - test_jit_and_interpreter(b, [&](const skvm::Program& program){ - float mn[8], mx[8]; - program.eval(8, f,mn,mx); - for (int j = 0; j < 8; j++) { - REPORTER_ASSERT(r, identical(mn[j], std::min(f[i], f[j]))); - REPORTER_ASSERT(r, identical(mx[j], std::max(f[i], f[j]))); - } - }); - } -} - -DEF_TEST(SkVM_halfs, r) { - const uint16_t hs[] = {0x0000,0x3800,0x3c00,0x4000, - 0xc400,0xb800,0xbc00,0xc000}; - const float fs[] = {+0.0f,+0.5f,+1.0f,+2.0f, - -4.0f,-0.5f,-1.0f,-2.0f}; - { - skvm::Builder b; - skvm::Ptr src = b.varying(), - dst = b.varying(); - b.storeF(dst, b.from_fp16(b.load16(src))); - - test_jit_and_interpreter(b, [&](const skvm::Program& program){ - float dst[8]; - program.eval(8, hs, dst); - for (int i = 0; i < 8; i++) { - REPORTER_ASSERT(r, dst[i] == fs[i]); - } - }); - } - { - skvm::Builder b; - skvm::Ptr src = b.varying(), - dst = b.varying(); - b.store16(dst, b.to_fp16(b.loadF(src))); - - test_jit_and_interpreter(b, [&](const skvm::Program& program){ - uint16_t dst[8]; - program.eval(8, fs, dst); - for (int i = 0; i < 8; i++) { - REPORTER_ASSERT(r, dst[i] == hs[i]); - } - }); - } -} - -DEF_TEST(SkVM_64bit, r) { - uint32_t lo[65], - hi[65]; - uint64_t wide[65]; - for (int i = 0; i < 65; i++) { - lo[i] = 2*i+0; - hi[i] = 2*i+1; - wide[i] = ((uint64_t)lo[i] << 0) - | ((uint64_t)hi[i] << 32); - } - - { - skvm::Builder b; - { - skvm::Ptr widePtr = b.varying(), - loPtr = b.varying(), - hiPtr = b.varying(); - b.store32(loPtr, b.load64(widePtr, 0)); - b.store32(hiPtr, b.load64(widePtr, 1)); - } - test_jit_and_interpreter(b, [&](const skvm::Program& program){ - uint32_t l[65], h[65]; - program.eval(65, wide,l,h); - for (int i = 0; i < 65; i++) { - REPORTER_ASSERT(r, l[i] == lo[i]); - REPORTER_ASSERT(r, h[i] == hi[i]); - } - }); - } - - { - skvm::Builder b; - { - skvm::Ptr widePtr = b.varying(), - loPtr = b.varying(), - hiPtr = b.varying(); - b.store64(widePtr, b.load32(loPtr), b.load32(hiPtr)); - } - test_jit_and_interpreter(b, [&](const skvm::Program& program){ - uint64_t w[65]; - program.eval(65, w,lo,hi); - for (int i = 0; i < 65; i++) { - REPORTER_ASSERT(r, w[i] == wide[i]); - } - }); - } -} - -DEF_TEST(SkVM_128bit, r) { - float floats[4*63]; - uint8_t packed[4*63]; - - for (int i = 0; i < 4*63; i++) { - floats[i] = i * (1/255.0f); - } - - skvm::PixelFormat rgba_ffff = skvm::SkColorType_to_PixelFormat(kRGBA_F32_SkColorType), - rgba_8888 = skvm::SkColorType_to_PixelFormat(kRGBA_8888_SkColorType); - - { // Convert RGBA F32 to RGBA 8888, testing 128-bit loads. - skvm::Builder b; - { - skvm::Ptr dst = b.varying(4), - src = b.varying(16); - - skvm::Color c = b.load(rgba_ffff, src); - b.store(rgba_8888, dst, c); - } - test_jit_and_interpreter(b, [&](const skvm::Program& program){ - memset(packed, 0, sizeof(packed)); - program.eval(63, packed, floats); - for (int i = 0; i < 4*63; i++) { - REPORTER_ASSERT(r, packed[i] == i); - } - }); - } - - - { // Convert RGBA 8888 to RGBA F32, testing 128-bit stores. - skvm::Builder b; - { - skvm::Ptr dst = b.varying(16), - src = b.varying(4); - - skvm::Color c = b.load(rgba_8888, src); - b.store(rgba_ffff, dst, c); - } - test_jit_and_interpreter(b, [&](const skvm::Program& program){ - memset(floats, 0, sizeof(floats)); - program.eval(63, floats, packed); - for (int i = 0; i < 4*63; i++) { - REPORTER_ASSERT(r, floats[i] == i * (1/255.0f)); - } - }); - } - -} - -DEF_TEST(SkVM_is_NaN_is_finite, r) { - skvm::Builder b; - { - skvm::Ptr src = b.varying(), - nan = b.varying(), - fin = b.varying(); - b.store32(nan, is_NaN (b.loadF(src))); - b.store32(fin, is_finite(b.loadF(src))); - } - test_jit_and_interpreter(b, [&](const skvm::Program& program){ - // ±NaN, ±0, ±1, ±inf - const uint32_t bits[] = {0x7f80'0001, 0xff80'0001, 0x0000'0000, 0x8000'0000, - 0x3f80'0000, 0xbf80'0000, 0x7f80'0000, 0xff80'0000}; - uint32_t nan[8], fin[8]; - program.eval(8, bits, nan,fin); - - for (int i = 0; i < 8; i++) { - REPORTER_ASSERT(r, nan[i] == ((i == 0 || i == 1) ? 0xffffffff : 0)); - REPORTER_ASSERT(r, fin[i] == ((i == 2 || i == 3 || - i == 4 || i == 5) ? 0xffffffff : 0)); - } - }); -} - -DEF_TEST(SkVM_args, r) { - // Test we can handle at least six arguments. - skvm::Builder b; - { - skvm::Ptr dst = b.varying(), - A = b.varying(), - B = b.varying(), - C = b.varying(), - D = b.varying(), - E = b.varying(); - storeF(dst, b.loadF(A) - + b.loadF(B) - + b.loadF(C) - + b.loadF(D) - + b.loadF(E)); - } - - test_jit_and_interpreter(b, [&](const skvm::Program& program){ - float dst[17],A[17],B[17],C[17],D[17],E[17]; - for (int i = 0; i < 17; i++) { - A[i] = B[i] = C[i] = D[i] = E[i] = (float)i; - } - program.eval(17, dst,A,B,C,D,E); - for (int i = 0; i < 17; i++) { - REPORTER_ASSERT(r, dst[i] == 5.0f*i); - } - }); -} - -DEF_TEST(SkVM_badpack, reporter) { - // Test case distilled from actual failing draw, - // originally with a bad arm64 implementation of pack(). - skvm::Builder p; - { - skvm::UPtr uniforms = p.uniform(); - skvm::Ptr dst = p.varying(); - - skvm::I32 r = round(p.uniformF(uniforms, 8) * 15), - a = p.splat(0xf); - - skvm::I32 _4444 = p.splat(0); - _4444 = pack(_4444, r, 12); - _4444 = pack(_4444, a, 0); - store16(dst, _4444); - } - - test_jit_and_interpreter(p, [&](const skvm::Program& program){ - const float uniforms[] = { 0.0f, 0.0f, - 1.0f, 0.0f, 0.0f, 1.0f }; - - uint16_t dst[17] = {0}; - program.eval(17, uniforms,dst); - for (int i = 0; i < 17; i++) { - REPORTER_ASSERT(reporter, dst[i] == 0xf00f, "got %04x, want %04x\n", dst[i], 0xf00f); - } - }); -} - -DEF_TEST(SkVM_features, r) { - auto build_program = [](skvm::Builder* b) { - skvm::F32 x = b->loadF(b->varying()); - b->storeF(b->varying(), x*x+x); - }; - - { // load-fma-store with FMA available. - skvm::Features features; - features.fma = true; - skvm::Builder b(features); - build_program(&b); - REPORTER_ASSERT(r, b.optimize().size() == 3); - } - - { // load-mul-add-store without FMA. - skvm::Features features; - features.fma = false; - skvm::Builder b(features); - build_program(&b); - REPORTER_ASSERT(r, b.optimize().size() == 4); - } - - { // Auto-detected, could be either. - skvm::Builder b; - build_program(&b); - REPORTER_ASSERT(r, b.optimize().size() == 3 - || b.optimize().size() == 4); - } -} - -DEF_TEST(SkVM_gather_can_hoist, r) { - // A gather instruction isn't necessarily varying... it's whatever its index is. - // First a typical gather scenario with varying index. - { - skvm::Builder b; - skvm::UPtr uniforms = b.uniform(); - skvm::Ptr buf = b.varying(); - skvm::I32 ix = b.load32(buf); - b.store32(buf, b.gather32(uniforms,0, ix)); - - skvm::Program p = b.done(); - - // ix is varying, so the gather is too. - // - // loop: - // v0 = load32 buf - // v1 = gather32 uniforms+0 v0 - // store32 buf v1 - REPORTER_ASSERT(r, p.instructions().size() == 3); - REPORTER_ASSERT(r, p.loop() == 0); - } - - // Now the same but with a uniform index instead. - { - skvm::Builder b; - skvm::UPtr uniforms = b.uniform(); - skvm::Ptr buf = b.varying(); - skvm::I32 ix = b.uniform32(uniforms,8); - b.store32(buf, b.gather32(uniforms,0, ix)); - - skvm::Program p = b.done(); - - // ix is uniform, so the gather is too. - // - // v0 = uniform32 uniforms+8 - // v1 = gather32 uniforms+0 v0 - // loop: - // store32 buf v1 - REPORTER_ASSERT(r, p.instructions().size() == 3); - REPORTER_ASSERT(r, p.loop() == 2); - } -} - -DEF_TEST(SkVM_dont_dedup_loads, r) { - // We've been assuming that all Ops with the same arguments produce the same value - // and deduplicating them, which results in a simple common subexpression eliminator. - // - // But we can't soundly dedup two identical loads with a store between. - // If we dedup the loads in this test program it will always increment by 1, not K. - constexpr int K = 2; - skvm::Builder b; - { - skvm::Ptr buf = b.varying(); - for (int i = 0; i < K; i++) { - b.store32(buf, b.load32(buf) + 1); - } - } - - test_jit_and_interpreter(b, [&](const skvm::Program& program){ - int buf[] = { 0,1,2,3,4 }; - program.eval(std::size(buf), buf); - for (int i = 0; i < (int)std::size(buf); i++) { - REPORTER_ASSERT(r, buf[i] == i+K); - } - }); -} - -DEF_TEST(SkVM_dont_dedup_stores, r) { - // Following a similar line of reasoning to SkVM_dont_dedup_loads, - // we cannot dedup stores either. A different store between two identical stores - // will invalidate the first store, meaning we do need to reissue that store operation. - skvm::Builder b; - { - skvm::Ptr buf = b.varying(); - b.store32(buf, b.splat(4)); - b.store32(buf, b.splat(5)); - b.store32(buf, b.splat(4)); // If we dedup'd, we'd skip this store. - } - - test_jit_and_interpreter(b, [&](const skvm::Program& program){ - int buf[42]; - program.eval(std::size(buf), buf); - for (int x : buf) { - REPORTER_ASSERT(r, x == 4); - } - }); -} - -DEF_TEST(SkVM_fast_mul, r) { - skvm::Builder b; - { - skvm::Ptr src = b.varying(), - fast = b.varying(), - slow = b.varying(); - skvm::F32 x = b.loadF(src); - b.storeF(fast, fast_mul(0.0f, x)); - b.storeF(slow, 0.0f * x); - } - test_jit_and_interpreter(b, [&](const skvm::Program& program){ - const uint32_t bits[] = { - 0x0000'0000, 0x8000'0000, //±0 - 0x3f80'0000, 0xbf80'0000, //±1 - 0x7f80'0000, 0xff80'0000, //±inf - 0x7f80'0001, 0xff80'0001, //±NaN - }; - float fast[8], - slow[8]; - program.eval(8,bits,fast,slow); - - for (int i = 0; i < 8; i++) { - REPORTER_ASSERT(r, fast[i] == 0.0f); - - if (i < 4) { - REPORTER_ASSERT(r, slow[i] == 0.0f); - } else { - REPORTER_ASSERT(r, std::isnan(slow[i])); - } - } - }); -} - -DEF_TEST(SkVM_duplicates, reporter) { - { - skvm::Builder p(true); - auto rptr = p.varying(); - - skvm::F32 r = p.loadF(rptr), - g = p.splat(0.0f), - b = p.splat(0.0f), - a = p.splat(1.0f); - - p.unpremul(&r, &g, &b, a); - p.storeF(rptr, r); - - std::vector program = b->program(); - - auto withDuplicates = skvm::finalize(program); - int duplicates = 0; - for (const auto& instr : withDuplicates) { - if (instr.op == skvm::Op::duplicate) { - ++duplicates; - } - } - REPORTER_ASSERT(reporter, duplicates > 0); - - auto eliminatedAsDeadCode = skvm::eliminate_dead_code(program); - for (const auto& instr : eliminatedAsDeadCode) { - REPORTER_ASSERT(reporter, instr.op != skvm::Op::duplicate); - } - } - - { - skvm::Builder p(false); - auto rptr = p.varying(); - - skvm::F32 r = p.loadF(rptr), - g = p.splat(0.0f), - b = p.splat(0.0f), - a = p.splat(1.0f); - - p.unpremul(&r, &g, &b, a); - p.storeF(rptr, r); - - auto withoutDuplicates = p.done().instructions(); - for (const auto& instr : withoutDuplicates) { - REPORTER_ASSERT(reporter, instr.op != skvm::Op::duplicate); - } - } -} - -#endif // defined(SK_ENABLE_SKVM) diff --git a/tests/SkXmpTest.cpp b/tests/SkXmpTest.cpp index 78b893a99258..e5e0ed032c6c 100644 --- a/tests/SkXmpTest.cpp +++ b/tests/SkXmpTest.cpp @@ -5,6 +5,9 @@ * found in the LICENSE file. */ +#include "include/core/SkTypes.h" + +#if defined(SK_XML) #include "include/core/SkColor.h" #include "include/core/SkData.h" #include "include/core/SkRefCnt.h" @@ -241,3 +244,4 @@ DEF_TEST(SkXmp_xmpContainerTypedNodeRdfEquivalent, r) { REPORTER_ASSERT(r, xmp->getContainerGainmapLocation(&offset, &size)); REPORTER_ASSERT(r, size == 49035); } +#endif // SK_XML diff --git a/tests/SpecialImageTest.cpp b/tests/SpecialImageTest.cpp index 1db7d10236f6..7e33511897cf 100644 --- a/tests/SpecialImageTest.cpp +++ b/tests/SpecialImageTest.cpp @@ -27,6 +27,7 @@ #include "src/gpu/ganesh/GrColorInfo.h" // IWYU pragma: keep #include "src/gpu/ganesh/GrSurfaceProxyView.h" #include "src/gpu/ganesh/SkGr.h" +#include "src/gpu/ganesh/image/SkSpecialImage_Ganesh.h" #include "tests/CtsEnforcement.h" #include "tests/Test.h" @@ -78,18 +79,19 @@ static void test_image(const sk_sp& img, skiatest::Reporter* rep //-------------- // Test that isTextureBacked reports the correct backing type - REPORTER_ASSERT(reporter, isGPUBacked == img->isTextureBacked()); + REPORTER_ASSERT(reporter, isGPUBacked == img->isGaneshBacked()); + REPORTER_ASSERT(reporter, !img->isGraphiteBacked()); //-------------- // Test view - as long as there is a context this should succeed if (rContext) { - GrSurfaceProxyView view = img->view(rContext); + GrSurfaceProxyView view = SkSpecialImages::AsView(rContext, img); REPORTER_ASSERT(reporter, view.asTextureProxy()); } //-------------- // Test getROPixels - this only works for raster-backed special images - if (!img->isTextureBacked()) { + if (!img->isGaneshBacked()) { SkBitmap bitmap; REPORTER_ASSERT(reporter, img->getROPixels(&bitmap)); REPORTER_ASSERT(reporter, kSmallerSize == bitmap.width()); @@ -103,8 +105,8 @@ static void test_image(const sk_sp& img, skiatest::Reporter* rep kPremul_SkAlphaType, sk_ref_sp(img->getColorSpace())); sk_sp surf = isGPUBacked - ? SkSpecialSurface::MakeRenderTarget(rContext, imageInfo, {}, kTopLeft_GrSurfaceOrigin) - : SkSpecialSurface::MakeRaster(imageInfo, {}); + ? SkSpecialSurfaces::MakeRenderTarget(rContext, imageInfo, {}, kTopLeft_GrSurfaceOrigin) + : SkSpecialSurfaces::MakeRaster(imageInfo, {}); SkCanvas* canvas = surf->getCanvas(); @@ -129,15 +131,14 @@ static void test_image(const sk_sp& img, skiatest::Reporter* rep DEF_TEST(SpecialImage_Raster, reporter) { SkBitmap bm = create_bm(); - sk_sp fullSImage(SkSpecialImage::MakeFromRaster( - SkIRect::MakeWH(kFullSize, kFullSize), - bm, SkSurfaceProps())); + sk_sp fullSImage(SkSpecialImages::MakeFromRaster( + SkIRect::MakeWH(kFullSize, kFullSize), bm, SkSurfaceProps())); const SkIRect& subset = SkIRect::MakeXYWH(kPad, kPad, kSmallerSize, kSmallerSize); { - sk_sp subSImg1(SkSpecialImage::MakeFromRaster(subset, bm, - SkSurfaceProps())); + sk_sp subSImg1( + SkSpecialImages::MakeFromRaster(subset, bm, SkSurfaceProps())); test_image(subSImg1, reporter, nullptr, false); } @@ -152,17 +153,14 @@ static void test_specialimage_image(skiatest::Reporter* reporter) { sk_sp fullImage(bm.asImage()); - sk_sp fullSImage(SkSpecialImage::MakeFromImage( - nullptr, - SkIRect::MakeWH(kFullSize, kFullSize), - fullImage, - SkSurfaceProps())); + sk_sp fullSImage(SkSpecialImages::MakeFromRaster( + SkIRect::MakeWH(kFullSize, kFullSize), fullImage, SkSurfaceProps())); const SkIRect& subset = SkIRect::MakeXYWH(kPad, kPad, kSmallerSize, kSmallerSize); { - sk_sp subSImg1(SkSpecialImage::MakeFromImage(nullptr, subset, fullImage, - SkSurfaceProps())); + sk_sp subSImg1( + SkSpecialImages::MakeFromRaster(subset, fullImage, SkSurfaceProps())); test_image(subSImg1, reporter, nullptr, false); } @@ -188,23 +186,23 @@ DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS(SpecialImage_Gpu, } sk_sp fullSImg = - SkSpecialImage::MakeDeferredFromGpu(context, - SkIRect::MakeWH(kFullSize, kFullSize), - kNeedNewImageUniqueID_SpecialImage, - view, - { ct, kPremul_SkAlphaType, nullptr }, - SkSurfaceProps()); + SkSpecialImages::MakeDeferredFromGpu(context, + SkIRect::MakeWH(kFullSize, kFullSize), + kNeedNewImageUniqueID_SpecialImage, + view, + {ct, kPremul_SkAlphaType, nullptr}, + SkSurfaceProps()); const SkIRect& subset = SkIRect::MakeXYWH(kPad, kPad, kSmallerSize, kSmallerSize); { - sk_sp subSImg1 = SkSpecialImage::MakeDeferredFromGpu( - context, - subset, - kNeedNewImageUniqueID_SpecialImage, - std::move(view), - { ct, kPremul_SkAlphaType, nullptr }, - SkSurfaceProps()); + sk_sp subSImg1 = + SkSpecialImages::MakeDeferredFromGpu(context, + subset, + kNeedNewImageUniqueID_SpecialImage, + std::move(view), + {ct, kPremul_SkAlphaType, nullptr}, + SkSurfaceProps()); test_image(subSImg1, reporter, context, true); } diff --git a/tests/SpecialSurfaceTest.cpp b/tests/SpecialSurfaceTest.cpp index f9be8e25d6cc..02435ceb6782 100644 --- a/tests/SpecialSurfaceTest.cpp +++ b/tests/SpecialSurfaceTest.cpp @@ -18,6 +18,7 @@ #include "include/gpu/GrTypes.h" #include "src/core/SkSpecialImage.h" #include "src/core/SkSpecialSurface.h" +#include "src/gpu/ganesh/image/SkSpecialImage_Ganesh.h" #include "tests/CtsEnforcement.h" #include "tests/Test.h" @@ -55,7 +56,7 @@ static void test_surface(const sk_sp& surf, DEF_TEST(SpecialSurface_Raster, reporter) { SkImageInfo info = SkImageInfo::MakeN32(kSurfaceSize, kSurfaceSize, kOpaque_SkAlphaType); - sk_sp surf(SkSpecialSurface::MakeRaster(info, SkSurfaceProps())); + sk_sp surf(SkSpecialSurfaces::MakeRaster(info, SkSurfaceProps())); test_surface(surf, reporter, 0); } @@ -74,8 +75,8 @@ DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS(SpecialSurface_Gpu1, SkImageInfo ii = SkImageInfo::Make({ kSurfaceSize, kSurfaceSize }, colorType, kPremul_SkAlphaType); - auto surf(SkSpecialSurface::MakeRenderTarget(dContext, ii, SkSurfaceProps(), - kTopLeft_GrSurfaceOrigin)); + auto surf(SkSpecialSurfaces::MakeRenderTarget(dContext, ii, SkSurfaceProps(), + kTopLeft_GrSurfaceOrigin)); test_surface(surf, reporter, 0); } } @@ -86,6 +87,7 @@ DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS(SpecialSurface_Gpu1, #include "include/gpu/graphite/TextureInfo.h" #include "src/gpu/graphite/Caps.h" #include "src/gpu/graphite/ContextPriv.h" +#include "src/gpu/graphite/SpecialImage_Graphite.h" DEF_GRAPHITE_TEST_FOR_RENDERING_CONTEXTS(SpecialSurface_Graphite, reporter, context) { using namespace skgpu::graphite; @@ -105,7 +107,7 @@ DEF_GRAPHITE_TEST_FOR_RENDERING_CONTEXTS(SpecialSurface_Graphite, reporter, cont SkImageInfo ii = SkImageInfo::Make({ kSurfaceSize, kSurfaceSize }, colorType, kPremul_SkAlphaType); - auto surf(SkSpecialSurface::MakeGraphite(recorder.get(), ii, SkSurfaceProps())); + auto surf(SkSpecialSurfaces::MakeGraphite(recorder.get(), ii, SkSurfaceProps())); test_surface(surf, reporter, 0); } } diff --git a/tests/SurfaceTest.cpp b/tests/SurfaceTest.cpp index f5704f6dd184..c22775adc63a 100644 --- a/tests/SurfaceTest.cpp +++ b/tests/SurfaceTest.cpp @@ -1299,39 +1299,3 @@ DEF_TEST(surface_image_unity, reporter) { } } } - -DEF_TEST(VMBlitterInfiniteColorShader, r) { - // This replicates the underlying problem of oss-fuzz:49391. - // Steps: - // - Force the blitter chooser to use SkVM (done here with a runtime blender) - // - Have a paint with no shader (so the blitter tries to construct a color shader from the - // paint color) - // - Have a color filter that, when applied to the paint color, produces a color with a tiny - // (but nonzero) alpha value. This triggers overflow when the filtered color is unpremuled, - // resulting in infinite RGB values. - // - With infinite color, the color-shader factory rejects the color, and returns nullptr, - // breaking the assumptions in the blitter that a shader will - always - be constructed. - SkPaint paint; - - // This ensures that we will use SkVMBlitter - paint.setBlender(GetRuntimeBlendForBlendMode(SkBlendMode::kSrc)); - - // Start with a simple color - paint.setColor4f({ 1, 1, 1, 1 }); - - // Color filter that will set alpha to a tiny value. 1/X is not representable in float. - SkColorMatrix cm; - cm.setScale(1.0f, 1.0f, 1.0f, 7.4E-40f); - paint.setColorFilter(SkColorFilters::Matrix(cm)); - - // Confirm that our color filter produces infinite RGB when applied to the paint color - SkColor4f filtered = - paint.getColorFilter()->filterColor4f(paint.getColor4f(), nullptr, nullptr); - REPORTER_ASSERT(r, !sk_float_isfinite(filtered.fR)); - // ... and that we therefore can't construct a color shader from the result - REPORTER_ASSERT(r, !SkShaders::Color(filtered, nullptr)); - - // Now try to draw this paint. Before the fixing the bug, this would crash (null dereference) - auto surface = SkSurfaces::Raster(SkImageInfo::MakeN32Premul(8, 8)); - surface->getCanvas()->drawPaint(paint); -} diff --git a/tests/TArrayTest.cpp b/tests/TArrayTest.cpp index c51e0d15692e..15548543a3b9 100644 --- a/tests/TArrayTest.cpp +++ b/tests/TArrayTest.cpp @@ -413,3 +413,10 @@ DEF_TEST(TArray, reporter) { test_skstarray_compatibility, STArray<4, double>>(reporter); test_skstarray_compatibility, STArray<1, short>>(reporter); } + +DEF_TEST(TArray_BoundsCheck, reporter) { +#if 0 // The v[0] fails + TArray v; + v[0]; +#endif +} diff --git a/tests/TextureBindingsResetTest.cpp b/tests/TextureBindingsResetTest.cpp index 46fb1417d7e8..3295ee1c4765 100644 --- a/tests/TextureBindingsResetTest.cpp +++ b/tests/TextureBindingsResetTest.cpp @@ -26,6 +26,7 @@ #include "include/gpu/GrTypes.h" #include "include/gpu/ganesh/SkImageGanesh.h" #include "include/gpu/ganesh/SkSurfaceGanesh.h" +#include "include/gpu/ganesh/gl/GrGLBackendSurface.h" #include "include/gpu/gl/GrGLFunctions.h" #include "include/gpu/gl/GrGLInterface.h" #include "include/gpu/gl/GrGLTypes.h" @@ -150,7 +151,7 @@ DEF_GANESH_TEST_FOR_GL_RENDERING_CONTEXTS(TextureBindingsResetTest, GrRenderable::kNo, GrProtected::kNo); GrGLTextureInfo info2D; - REPORTER_ASSERT(reporter, texture2D.getGLTextureInfo(&info2D)); + REPORTER_ASSERT(reporter, GrBackendTextures::GetGLTextureInfo(texture2D, &info2D)); GrEGLImage eglImage = ctxInfo.glContext()->texture2DToEGLImage(info2D.fID); REPORTER_ASSERT(reporter, eglImage); GrGLTextureInfo infoExternal; @@ -159,7 +160,8 @@ DEF_GANESH_TEST_FOR_GL_RENDERING_CONTEXTS(TextureBindingsResetTest, infoExternal.fFormat = info2D.fFormat; REPORTER_ASSERT(reporter, infoExternal.fID); infoExternal.fProtected = info2D.fProtected; - GrBackendTexture backendTexture(10, 10, GrMipmapped::kNo, infoExternal); + GrBackendTexture backendTexture = + GrBackendTextures::MakeGL(10, 10, GrMipmapped::kNo, infoExternal); // Above texture creation will have messed with GL state and bindings. resetBindings(); dContext->resetContext(); @@ -183,7 +185,7 @@ DEF_GANESH_TEST_FOR_GL_RENDERING_CONTEXTS(TextureBindingsResetTest, } if (supportRectangle) { - format = GrBackendFormat::MakeGL(GR_GL_RGBA8, GR_GL_TEXTURE_RECTANGLE); + format = GrBackendFormats::MakeGL(GR_GL_RGBA8, GR_GL_TEXTURE_RECTANGLE); GrBackendTexture rectangleTexture = dContext->createBackendTexture( 10, 10, format, GrMipmapped::kNo, GrRenderable::kNo); if (rectangleTexture.isValid()) { diff --git a/tests/TextureSizeTest.cpp b/tests/TextureSizeTest.cpp new file mode 100644 index 000000000000..fec0af64529a --- /dev/null +++ b/tests/TextureSizeTest.cpp @@ -0,0 +1,107 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "include/core/SkAlphaType.h" +#include "include/core/SkBitmap.h" +#include "include/core/SkColor.h" +#include "include/core/SkColorType.h" +#include "include/core/SkImage.h" +#include "include/core/SkImageInfo.h" +#include "include/core/SkRefCnt.h" +#include "tests/CtsEnforcement.h" +#include "tests/Test.h" + +#if defined(SK_GRAPHITE) +#include "include/gpu/graphite/Context.h" +#include "include/gpu/graphite/Image.h" +#include "include/gpu/graphite/Recorder.h" +#endif + +#if defined(SK_GANESH) +#include "include/gpu/GpuTypes.h" +#include "include/gpu/GrDirectContext.h" +#include "include/gpu/ganesh/SkImageGanesh.h" +#include "src/gpu/ganesh/GrCaps.h" +#include "src/gpu/ganesh/GrDirectContextPriv.h" +struct GrContextOptions; +#endif + +#include +#include +#include + +namespace { + +void run_test(skiatest::Reporter* reporter, bool testMipmaps, + std::function(SkImage*, skgpu::Mipmapped)> convert2gpu) { + + for (auto mm : { skgpu::Mipmapped::kYes, skgpu::Mipmapped::kNo }) { + if (!testMipmaps && mm == skgpu::Mipmapped::kYes) { + continue; + } + + for (auto ct : { kRGBA_8888_SkColorType, kAlpha_8_SkColorType }) { + SkImageInfo ii = SkImageInfo::Make(9, 9, ct, kPremul_SkAlphaType); + + SkBitmap src; + src.allocPixels(ii); + src.eraseColor(SK_ColorWHITE); + + sk_sp raster = src.asImage(); + + sk_sp gpu = convert2gpu(raster.get(), mm); + + int bytesPerPixel = SkColorTypeBytesPerPixel(ct); + + size_t expectedSize = bytesPerPixel * gpu->width() * gpu->height(); + if (mm == skgpu::Mipmapped::kYes) { + expectedSize += expectedSize/3; + } + + size_t actualSize = gpu->textureSize(); + + REPORTER_ASSERT(reporter, actualSize == expectedSize, + "Expected: %zu Actual: %zu", expectedSize, actualSize); + } + } +} + +} // anonymous namespace + +#if defined(SK_GANESH) + +DEF_GANESH_TEST_FOR_ALL_CONTEXTS(ImageSizeTest_Ganesh, + reporter, + ctxInfo, + CtsEnforcement::kNextRelease) { + auto dContext = ctxInfo.directContext(); + + bool testMipmaps = dContext->priv().caps()->mipmapSupport(); + + run_test(reporter, testMipmaps, + [&](SkImage* src, skgpu::Mipmapped mipmapped) -> sk_sp { + return SkImages::TextureFromImage(dContext, src, mipmapped); + }); +} + +#endif // SK_GANESH + +#if defined(SK_GRAPHITE) + +DEF_GRAPHITE_TEST_FOR_ALL_CONTEXTS(ImageSizeTest_Graphite, reporter, context) { + using namespace skgpu::graphite; + + std::unique_ptr recorder = context->makeRecorder(); + + run_test(reporter, /* testMipmaps= */ true, + [&](SkImage* src, skgpu::Mipmapped mipmapped) -> sk_sp { + return SkImages::TextureFromImage(recorder.get(), src, + { mipmapped == skgpu::Mipmapped::kYes }); + }); +} + +#endif // SK_GRAPHITE diff --git a/tests/TriangulatingPathRendererTests.cpp b/tests/TriangulatingPathRendererTests.cpp index 48441233a7f1..7bdd8b6aca08 100644 --- a/tests/TriangulatingPathRendererTests.cpp +++ b/tests/TriangulatingPathRendererTests.cpp @@ -874,7 +874,7 @@ DEF_GANESH_TEST_FOR_ALL_CONTEXTS(TriangulatingPathRendererTests, {800, 800}, SkSurfaceProps(), /*label=*/{}, - 1, + /* sampleCnt= */ 1, GrMipmapped::kNo, GrProtected::kNo, kTopLeft_GrSurfaceOrigin); diff --git a/tests/VkHardwareBufferTest.cpp b/tests/VkHardwareBufferTest.cpp index a2eefedd4c28..ce4eac4b7309 100644 --- a/tests/VkHardwareBufferTest.cpp +++ b/tests/VkHardwareBufferTest.cpp @@ -21,6 +21,7 @@ #include "include/gpu/MutableTextureState.h" #include "include/gpu/ganesh/SkImageGanesh.h" #include "include/gpu/ganesh/SkSurfaceGanesh.h" +#include "include/gpu/ganesh/gl/GrGLBackendSurface.h" #include "include/gpu/vk/GrVkBackendContext.h" #include "include/gpu/vk/VulkanExtensions.h" #include "src/base/SkAutoMalloc.h" @@ -271,7 +272,7 @@ sk_sp EGLTestHelper::importHardwareBufferForRead(skiatest::Reporter* re textureInfo.fID = fTexID; textureInfo.fFormat = GR_GL_RGBA8; - GrBackendTexture backendTex(DEV_W, DEV_H, GrMipmapped::kNo, textureInfo); + auto backendTex = GrBackendTextures::MakeGL(DEV_W, DEV_H, GrMipmapped::kNo, textureInfo); REPORTER_ASSERT(reporter, backendTex.isValid()); sk_sp image = SkImages::BorrowTextureFrom(fDirectContext, @@ -299,7 +300,7 @@ sk_sp EGLTestHelper::importHardwareBufferForWrite(skiatest::Reporter* textureInfo.fID = fTexID; textureInfo.fFormat = GR_GL_RGBA8; - GrBackendTexture backendTex(DEV_W, DEV_H, GrMipmapped::kNo, textureInfo); + auto backendTex = GrBackendTextures::MakeGL(DEV_W, DEV_H, GrMipmapped::kNo, textureInfo); REPORTER_ASSERT(reporter, backendTex.isValid()); sk_sp surface = SkSurfaces::WrapBackendTexture(fDirectContext, diff --git a/tests/VkProtectedContextTest.cpp b/tests/VkProtectedContextTest.cpp index 9b1f52eb3fb8..d182cfd9c8be 100644 --- a/tests/VkProtectedContextTest.cpp +++ b/tests/VkProtectedContextTest.cpp @@ -25,16 +25,14 @@ #include "include/core/SkRect.h" #include "include/core/SkRefCnt.h" #include "include/core/SkSurface.h" -#include "include/core/SkSurfaceProps.h" #include "include/core/SkTypes.h" #include "include/gpu/GpuTypes.h" #include "include/gpu/GrBackendSurface.h" #include "include/gpu/GrDirectContext.h" #include "include/gpu/GrTypes.h" -#include "include/gpu/ganesh/SkSurfaceGanesh.h" #include "tests/CtsEnforcement.h" #include "tests/Test.h" -#include "tools/gpu/BackendSurfaceFactory.h" +#include "tools/gpu/ProtectedUtils.h" #include "tools/gpu/vk/VkTestHelper.h" #include @@ -42,50 +40,7 @@ struct GrContextOptions; -static sk_sp create_protected_sksurface(GrDirectContext* dContext, - skiatest::Reporter* reporter, - bool textureable = true) { - const int kW = 8; - const int kH = 8; - SkSurfaceProps surfaceProps = SkSurfaceProps(0, kRGB_H_SkPixelGeometry); - sk_sp surface; - if (textureable) { - surface = sk_gpu_test::MakeBackendTextureSurface(dContext, - {kW, kH}, - kTopLeft_GrSurfaceOrigin, - 1, - kRGBA_8888_SkColorType, - /* color space */ nullptr, - GrMipmapped::kNo, - GrProtected::kYes, - &surfaceProps); - } else { - surface = sk_gpu_test::MakeBackendRenderTargetSurface(dContext, - {kW, kH}, - kTopLeft_GrSurfaceOrigin, - 1, - kRGBA_8888_SkColorType, - /* color space */ nullptr, - GrProtected::kYes, - &surfaceProps); - } - if (!surface) { - ERRORF(reporter, "Could not create protected surface."); - return nullptr; - } - if (textureable) { - GrBackendTexture backendTex = SkSurfaces::GetBackendTexture( - surface.get(), SkSurfaces::BackendHandleAccess::kFlushRead); - REPORTER_ASSERT(reporter, backendTex.isValid()); - REPORTER_ASSERT(reporter, backendTex.isProtected()); - } else { - GrBackendRenderTarget backendRT = SkSurfaces::GetBackendRenderTarget( - surface.get(), SkSurfaces::BackendHandleAccess::kFlushRead); - REPORTER_ASSERT(reporter, backendRT.isValid()); - REPORTER_ASSERT(reporter, backendRT.isProtected()); - } - return surface; -} +static const int kSize = 8; DEF_GANESH_TEST(VkProtectedContext_CreateNonprotectedContext, reporter, @@ -116,8 +71,8 @@ DEF_GANESH_TEST(VkProtectedContext_CreateProtectedSkSurface, auto dContext = protectedTestHelper->directContext(); REPORTER_ASSERT(reporter, dContext != nullptr); - create_protected_sksurface(dContext, reporter, /*textureable*/ true); - create_protected_sksurface(dContext, reporter, /*textureable*/ false); + ProtectedUtils::CreateProtectedSkSurface(dContext, { kSize, kSize }, /* textureable= */ true); + ProtectedUtils::CreateProtectedSkSurface(dContext, { kSize, kSize }, /* textureable= */ false); } DEF_GANESH_TEST(VkProtectedContext_CreateNonprotectedTextureInProtectedContext, @@ -171,7 +126,8 @@ DEF_GANESH_TEST(VkProtectedContext_ReadFromProtectedSurface, } REPORTER_ASSERT(reporter, protectedTestHelper->directContext() != nullptr); - auto surface = create_protected_sksurface(protectedTestHelper->directContext(), reporter); + auto surface = ProtectedUtils::CreateProtectedSkSurface(protectedTestHelper->directContext(), + { kSize, kSize }); REPORTER_ASSERT(reporter, surface); REPORTER_ASSERT(reporter, !surface->readPixels(SkImageInfo(), nullptr, 8, 0, 0)); } @@ -204,7 +160,7 @@ DEF_GANESH_TEST(VkProtectedContext_AsyncReadFromProtectedSurface, REPORTER_ASSERT(reporter, dContext != nullptr); - auto surface = create_protected_sksurface(dContext, reporter); + auto surface = ProtectedUtils::CreateProtectedSkSurface(dContext, { kSize, kSize }); REPORTER_ASSERT(reporter, surface); AsyncContext cbContext; const auto image_info = SkImageInfo::Make(10, 10, kRGBA_8888_SkColorType, kPremul_SkAlphaType, @@ -228,7 +184,8 @@ DEF_GANESH_TEST(VkProtectedContext_DrawRectangle, reporter, options, CtsEnforcem } REPORTER_ASSERT(reporter, protectedTestHelper->directContext() != nullptr); - auto surface = create_protected_sksurface(protectedTestHelper->directContext(), reporter); + auto surface = ProtectedUtils::CreateProtectedSkSurface(protectedTestHelper->directContext(), + { kSize, kSize }); REPORTER_ASSERT(reporter, surface); SkCanvas* canvas = surface->getCanvas(); REPORTER_ASSERT(reporter, canvas); @@ -247,7 +204,8 @@ DEF_GANESH_TEST(VkProtectedContext_DrawRectangleWithAntiAlias, } REPORTER_ASSERT(reporter, protectedTestHelper->directContext() != nullptr); - auto surface = create_protected_sksurface(protectedTestHelper->directContext(), reporter); + auto surface = ProtectedUtils::CreateProtectedSkSurface(protectedTestHelper->directContext(), + { kSize, kSize }); REPORTER_ASSERT(reporter, surface); SkCanvas* canvas = surface->getCanvas(); REPORTER_ASSERT(reporter, canvas); @@ -267,7 +225,8 @@ DEF_GANESH_TEST(VkProtectedContext_DrawRectangleWithBlendMode, } REPORTER_ASSERT(reporter, protectedTestHelper->directContext() != nullptr); - auto surface = create_protected_sksurface(protectedTestHelper->directContext(), reporter); + auto surface = ProtectedUtils::CreateProtectedSkSurface(protectedTestHelper->directContext(), + { kSize, kSize }); REPORTER_ASSERT(reporter, surface); SkCanvas* canvas = surface->getCanvas(); REPORTER_ASSERT(reporter, canvas); @@ -287,7 +246,8 @@ DEF_GANESH_TEST(VkProtectedContext_DrawRectangleWithFilter, } REPORTER_ASSERT(reporter, protectedTestHelper->directContext() != nullptr); - auto surface = create_protected_sksurface(protectedTestHelper->directContext(), reporter); + auto surface = ProtectedUtils::CreateProtectedSkSurface(protectedTestHelper->directContext(), + { kSize, kSize }); REPORTER_ASSERT(reporter, surface); SkCanvas* canvas = surface->getCanvas(); REPORTER_ASSERT(reporter, canvas); @@ -306,7 +266,8 @@ DEF_GANESH_TEST(VkProtectedContext_DrawThinPath, reporter, options, CtsEnforceme } REPORTER_ASSERT(reporter, protectedTestHelper->directContext() != nullptr); - auto surface = create_protected_sksurface(protectedTestHelper->directContext(), reporter); + auto surface = ProtectedUtils::CreateProtectedSkSurface(protectedTestHelper->directContext(), + { kSize, kSize }); REPORTER_ASSERT(reporter, surface); SkCanvas* canvas = surface->getCanvas(); REPORTER_ASSERT(reporter, canvas); @@ -325,7 +286,8 @@ DEF_GANESH_TEST(VkProtectedContext_SaveLayer, reporter, options, CtsEnforcement: } REPORTER_ASSERT(reporter, protectedTestHelper->directContext() != nullptr); - auto surface = create_protected_sksurface(protectedTestHelper->directContext(), reporter); + auto surface = ProtectedUtils::CreateProtectedSkSurface(protectedTestHelper->directContext(), + { kSize, kSize }); REPORTER_ASSERT(reporter, surface); SkCanvas* canvas = surface->getCanvas(); REPORTER_ASSERT(reporter, canvas); @@ -347,13 +309,15 @@ DEF_GANESH_TEST(VkProtectedContext_DrawProtectedImageOnProtectedSurface, REPORTER_ASSERT(reporter, protectedTestHelper->directContext() != nullptr); // Create protected image. - auto surface1 = create_protected_sksurface(protectedTestHelper->directContext(), reporter); + auto surface1 = ProtectedUtils::CreateProtectedSkSurface(protectedTestHelper->directContext(), + { kSize, kSize }); REPORTER_ASSERT(reporter, surface1); auto image = surface1->makeImageSnapshot(); REPORTER_ASSERT(reporter, image); // Create protected canvas. - auto surface2 = create_protected_sksurface(protectedTestHelper->directContext(), reporter); + auto surface2 = ProtectedUtils::CreateProtectedSkSurface(protectedTestHelper->directContext(), + { kSize, kSize }); REPORTER_ASSERT(reporter, surface2); SkCanvas* canvas = surface2->getCanvas(); REPORTER_ASSERT(reporter, canvas); diff --git a/tests/WangsFormulaTest.cpp b/tests/WangsFormulaTest.cpp index 802776bd23e2..f93e27971110 100644 --- a/tests/WangsFormulaTest.cpp +++ b/tests/WangsFormulaTest.cpp @@ -534,4 +534,48 @@ DEF_TEST(wangs_formula_conic_vectorXforms, r) { } } +DEF_TEST(wangs_formula_nextlog2, r) { + REPORTER_ASSERT(r, 0b0'00000000'111'1111111111'1111111111 == (1u << 23) - 1u); + REPORTER_ASSERT(r, wangs_formula::nextlog2(-std::numeric_limits::infinity()) == 0); + REPORTER_ASSERT(r, wangs_formula::nextlog2(-std::numeric_limits::max()) == 0); + REPORTER_ASSERT(r, wangs_formula::nextlog2(-1000.0f) == 0); + REPORTER_ASSERT(r, wangs_formula::nextlog2(-0.1f) == 0); + REPORTER_ASSERT(r, wangs_formula::nextlog2(-std::numeric_limits::min()) == 0); + REPORTER_ASSERT(r, wangs_formula::nextlog2(-std::numeric_limits::denorm_min()) == 0); + REPORTER_ASSERT(r, wangs_formula::nextlog2(0.0f) == 0); + REPORTER_ASSERT(r, wangs_formula::nextlog2(std::numeric_limits::denorm_min()) == 0); + REPORTER_ASSERT(r, wangs_formula::nextlog2(std::numeric_limits::min()) == 0); + REPORTER_ASSERT(r, wangs_formula::nextlog2(0.1f) == 0); + REPORTER_ASSERT(r, wangs_formula::nextlog2(1.0f) == 0); + REPORTER_ASSERT(r, wangs_formula::nextlog2(1.1f) == 1); + REPORTER_ASSERT(r, wangs_formula::nextlog2(2.0f) == 1); + REPORTER_ASSERT(r, wangs_formula::nextlog2(2.1f) == 2); + REPORTER_ASSERT(r, wangs_formula::nextlog2(3.0f) == 2); + REPORTER_ASSERT(r, wangs_formula::nextlog2(3.1f) == 2); + REPORTER_ASSERT(r, wangs_formula::nextlog2(4.0f) == 2); + REPORTER_ASSERT(r, wangs_formula::nextlog2(4.1f) == 3); + REPORTER_ASSERT(r, wangs_formula::nextlog2(5.0f) == 3); + REPORTER_ASSERT(r, wangs_formula::nextlog2(5.1f) == 3); + REPORTER_ASSERT(r, wangs_formula::nextlog2(6.0f) == 3); + REPORTER_ASSERT(r, wangs_formula::nextlog2(6.1f) == 3); + REPORTER_ASSERT(r, wangs_formula::nextlog2(7.0f) == 3); + REPORTER_ASSERT(r, wangs_formula::nextlog2(7.1f) == 3); + REPORTER_ASSERT(r, wangs_formula::nextlog2(8.0f) == 3); + REPORTER_ASSERT(r, wangs_formula::nextlog2(8.1f) == 4); + REPORTER_ASSERT(r, wangs_formula::nextlog2(9.0f) == 4); + REPORTER_ASSERT(r, wangs_formula::nextlog2(9.1f) == 4); + REPORTER_ASSERT(r, wangs_formula::nextlog2(std::numeric_limits::max()) == 128); + REPORTER_ASSERT(r, wangs_formula::nextlog2(std::numeric_limits::infinity()) == 128); + REPORTER_ASSERT(r, wangs_formula::nextlog2(std::numeric_limits::quiet_NaN()) == 0); + REPORTER_ASSERT(r, wangs_formula::nextlog2(-std::numeric_limits::quiet_NaN()) == 0); + + for (int i = 0; i < 100; ++i) { + float pow2 = std::ldexp(1, i); + float epsilon = std::ldexp(SK_ScalarNearlyZero, i); + REPORTER_ASSERT(r, wangs_formula::nextlog2(pow2) == i); + REPORTER_ASSERT(r, wangs_formula::nextlog2(pow2 + epsilon) == i + 1); + REPORTER_ASSERT(r, wangs_formula::nextlog2(pow2 - epsilon) == i); + } +} + } // namespace skgpu::tess diff --git a/tests/android_unit_test.bzl b/tests/android_unit_test.bzl new file mode 100644 index 000000000000..447556958083 --- /dev/null +++ b/tests/android_unit_test.bzl @@ -0,0 +1,18 @@ +"""This module defines the android_unit_test macro.""" + +load("//bazel:android_test.bzl", "android_test") + +def android_unit_test(**kwargs): + """Defines an Android unit test. + + This macro is just a wrapper around the android_test macro with the necessary defaults for + Android unit tests. See the android_test macro documentation for details. + + Args: + **kwargs: Any arguments to pass to the underlying android_test macro instance. + """ + android_test( + test_runner_if_required_condition_is_satisfied = "//tests:BazelTestRunner.cpp", + test_runner_if_required_condition_is_not_satisfied = "//tests:BazelNoopRunner.cpp", + **kwargs + ) diff --git a/tests/graphite/CombinationBuilderTest.cpp b/tests/graphite/CombinationBuilderTest.cpp index ce4ad1b31154..ff00cb0be7af 100644 --- a/tests/graphite/CombinationBuilderTest.cpp +++ b/tests/graphite/CombinationBuilderTest.cpp @@ -133,7 +133,7 @@ void big_test(const KeyContext& keyContext, skiatest::Reporter* reporter) { // now, blend modes paintOptions.setBlendModes(evenMoreBlendModes); // c array - REPORTER_ASSERT(reporter, paintOptions.priv().numCombinations() == 17); + REPORTER_ASSERT(reporter, paintOptions.priv().numCombinations() == 26); std::vector precompileIDs; paintOptions.priv().buildCombinations(keyContext, @@ -143,7 +143,7 @@ void big_test(const KeyContext& keyContext, skiatest::Reporter* reporter) { precompileIDs.push_back(id); }); - SkASSERT(precompileIDs.size() == 17); + SkASSERT(precompileIDs.size() == 26); } template @@ -290,8 +290,12 @@ DEF_GRAPHITE_TEST_FOR_ALL_CONTEXTS(CombinationBuilderTest, reporter, context) { auto rtEffectDict = std::make_unique(); SkColorInfo ci(kRGBA_8888_SkColorType, kPremul_SkAlphaType, nullptr); - KeyContext keyContext( - context->priv().caps(), dict, rtEffectDict.get(), ci, /* dstTexture= */ nullptr); + KeyContext keyContext(context->priv().caps(), + dict, + rtEffectDict.get(), + ci, + /* dstTexture= */ nullptr, + /* dstOffset= */ {0, 0}); empty_test(keyContext, reporter); no_shader_option_test(keyContext, reporter); diff --git a/tests/graphite/ComputeTest.cpp b/tests/graphite/ComputeTest.cpp index a2c9bdb004e1..c9c5d02a614b 100644 --- a/tests/graphite/ComputeTest.cpp +++ b/tests/graphite/ComputeTest.cpp @@ -721,7 +721,7 @@ DEF_GRAPHITE_TEST_FOR_METAL_CONTEXT(Compute_StorageTexture, reporter, context) { class TestComputeStep : public ComputeStep { public: TestComputeStep() : ComputeStep( - /*name=*/"TestStorageTextures", + /*name=*/"TestStorageTexture", /*localDispatchSize=*/{kDim, kDim, 1}, /*resources=*/{ { @@ -811,7 +811,7 @@ DEF_GRAPHITE_TEST_FOR_METAL_CONTEXT(Compute_StorageTexture, reporter, context) { // Tests the readonly texture binding for a compute dispatch that random-access reads from a // CPU-populated texture and copies it to a storage texture. -DEF_GRAPHITE_TEST_FOR_METAL_CONTEXT(Compute_SampledTexture, reporter, context) { +DEF_GRAPHITE_TEST_FOR_METAL_CONTEXT(Compute_StorageTextureReadAndWrite, reporter, context) { std::unique_ptr recorder = context->makeRecorder(); // For this test we allocate a 16x16 tile which is written to by a single workgroup of the same @@ -821,7 +821,7 @@ DEF_GRAPHITE_TEST_FOR_METAL_CONTEXT(Compute_SampledTexture, reporter, context) { class TestComputeStep : public ComputeStep { public: TestComputeStep() : ComputeStep( - /*name=*/"TestSampledTextures", + /*name=*/"TestStorageTextureReadAndWrite", /*localDispatchSize=*/{kDim, kDim, 1}, /*resources=*/{ { @@ -1106,6 +1106,171 @@ DEF_GRAPHITE_TEST_FOR_METAL_CONTEXT(Compute_StorageTextureMultipleComputeSteps, } } +// Tests that a texture can be sampled by a compute step using a sampler. +DEF_GRAPHITE_TEST_FOR_METAL_CONTEXT(Compute_SampledTexture, reporter, context) { + std::unique_ptr recorder = context->makeRecorder(); + + // The first ComputeStep initializes a 16x16 texture with a checkerboard pattern of alternating + // red and black pixels. The second ComputeStep downsamples this texture into a 4x4 using + // bilinear filtering at pixel borders, intentionally averaging the values of each 4x4 tile in + // the source texture, and writes the result to the destination texture. + constexpr uint32_t kSrcDim = 16; + constexpr uint32_t kDstDim = 4; + + class TestComputeStep1 : public ComputeStep { + public: + TestComputeStep1() : ComputeStep( + /*name=*/"Test_SampledTexture_Init", + /*localDispatchSize=*/{kSrcDim, kSrcDim, 1}, + /*resources=*/{ + { + /*type=*/ResourceType::kStorageTexture, + /*flow=*/DataFlow::kShared, + /*policy=*/ResourcePolicy::kNone, + /*slot=*/0, + } + }) {} + ~TestComputeStep1() override = default; + + std::string computeSkSL(const ResourceBindingRequirements&, int) const override { + return R"( + layout(binding = 0) writeonly texture2D dest; + + void main() { + uint2 c = sk_LocalInvocationID.xy; + uint checkerBoardColor = (c.x + (c.y % 2)) % 2; + textureWrite(dest, c, half4(checkerBoardColor, 0, 0, 1)); + } + )"; + } + + std::tuple calculateTextureParameters( + const DrawParams&, int index, const ResourceDesc& r) const override { + SkASSERT(index == 0); + return {{kSrcDim, kSrcDim}, kRGBA_8888_SkColorType}; + } + + WorkgroupSize calculateGlobalDispatchSize(const DrawParams&) const override { + return WorkgroupSize(1, 1, 1); + } + } step1; + + class TestComputeStep2 : public ComputeStep { + public: + TestComputeStep2() : ComputeStep( + /*name=*/"Test_SampledTexture_Sample", + /*localDispatchSize=*/{kDstDim, kDstDim, 1}, + /*resources=*/{ + { + /*type=*/ResourceType::kTexture, + /*flow=*/DataFlow::kShared, + /*policy=*/ResourcePolicy::kNone, + /*slot=*/0, + }, + { + /*type=*/ResourceType::kSampler, + /*flow=*/DataFlow::kPrivate, + /*policy=*/ResourcePolicy::kNone, + }, + { + /*type=*/ResourceType::kStorageTexture, + /*flow=*/DataFlow::kShared, + /*policy=*/ResourcePolicy::kNone, + /*slot=*/1, + } + }) {} + ~TestComputeStep2() override = default; + + std::string computeSkSL(const ResourceBindingRequirements&, int) const override { + return R"( + layout(binding = 0) sampler2D src; + layout(binding = 1) writeonly texture2D dest; + + void main() { + // Normalize the 4x4 invocation indices and sample the source texture using + // that. + uint2 dstCoord = sk_LocalInvocationID.xy; + const float2 dstSizeInv = float2(0.25, 0.25); + float2 unormCoord = float2(dstCoord) * dstSizeInv; + + // Use explicit LOD, as quad derivatives are not available to a compute shader. + half4 color = sampleLod(src, unormCoord, 0); + textureWrite(dest, dstCoord, color); + } + )"; + } + + std::tuple calculateTextureParameters( + const DrawParams&, int index, const ResourceDesc& r) const override { + SkASSERT(index == 2); + return {{kDstDim, kDstDim}, kRGBA_8888_SkColorType}; + } + + SamplerDesc calculateSamplerParameters(const DrawParams&, + int index, + const ResourceDesc&) const override { + SkASSERT(index == 1); + // Use the repeat tile mode to sample an infinite checkerboard. + constexpr SkTileMode kTileModes[2] = {SkTileMode::kRepeat, SkTileMode::kRepeat}; + return {SkFilterMode::kLinear, kTileModes}; + } + + WorkgroupSize calculateGlobalDispatchSize(const DrawParams&) const override { + return WorkgroupSize(1, 1, 1); + } + } step2; + + DispatchGroup::Builder builder(recorder.get()); + builder.appendStep(&step1, fake_draw_params_for_testing(), 0); + builder.appendStep(&step2, fake_draw_params_for_testing(), 0); + + sk_sp dst = builder.getSharedTextureResource(1); + if (!dst) { + ERRORF(reporter, "shared resource at slot 1 is missing"); + return; + } + + // Record the compute task + ComputeTask::DispatchGroupList groups; + groups.push_back(builder.finalize()); + recorder->priv().add(ComputeTask::Make(std::move(groups))); + + // Submit the work and wait for it to complete. + std::unique_ptr recording = recorder->snap(); + if (!recording) { + ERRORF(reporter, "Failed to make recording"); + return; + } + + InsertRecordingInfo insertInfo; + insertInfo.fRecording = recording.get(); + context->insertRecording(insertInfo); + context->submit(SyncToCpu::kYes); + + SkBitmap bitmap; + SkImageInfo imgInfo = + SkImageInfo::Make(kDstDim, kDstDim, kRGBA_8888_SkColorType, kUnpremul_SkAlphaType); + bitmap.allocPixels(imgInfo); + + SkPixmap pixels; + bool peekPixelsSuccess = bitmap.peekPixels(&pixels); + REPORTER_ASSERT(reporter, peekPixelsSuccess); + + bool readPixelsSuccess = context->priv().readPixels(pixels, dst.get(), imgInfo, 0, 0); + REPORTER_ASSERT(reporter, readPixelsSuccess); + + for (uint32_t x = 0; x < kDstDim; ++x) { + for (uint32_t y = 0; y < kDstDim; ++y) { + SkColor4f color = pixels.getColor4f(x, y); + REPORTER_ASSERT(reporter, color.fR > 0.49 && color.fR < 0.51, + "At position {%u, %u}, " + "expected red channel in range [0.49, 0.51], " + "found {%.3f}", + x, y, color.fR); + } + } +} + // TODO(b/260622403): The shader tested here is identical to // `resources/sksl/compute/AtomicsOperations.compute`. It would be nice to be able to exercise SkSL // features like this as part of SkSLTest.cpp instead of as a graphite test. diff --git a/tests/graphite/ImageProviderTest.cpp b/tests/graphite/ImageProviderTest.cpp index ffe9dae80b46..46bf51233eaf 100644 --- a/tests/graphite/ImageProviderTest.cpp +++ b/tests/graphite/ImageProviderTest.cpp @@ -10,6 +10,7 @@ #include "include/core/SkBitmap.h" #include "include/core/SkColorSpace.h" #include "include/core/SkImageGenerator.h" +#include "include/core/SkPicture.h" #include "include/core/SkPictureRecorder.h" #include "include/core/SkSpan.h" #include "include/gpu/graphite/Context.h" diff --git a/tests/graphite/PaintParamsKeyTest.cpp b/tests/graphite/PaintParamsKeyTest.cpp index 22b570222119..66819cfc0d36 100644 --- a/tests/graphite/PaintParamsKeyTest.cpp +++ b/tests/graphite/PaintParamsKeyTest.cpp @@ -642,8 +642,12 @@ DEF_GRAPHITE_TEST_FOR_ALL_CONTEXTS(PaintParamsKeyTest, reporter, context) { SkColorSpace::MakeSRGB()); std::unique_ptr rtDict = std::make_unique(); - KeyContext precompileKeyContext( - recorder->priv().caps(), dict, rtDict.get(), ci, /* dstTexture= */ nullptr); + KeyContext precompileKeyContext(recorder->priv().caps(), + dict, + rtDict.get(), + ci, + /* dstTexture= */ nullptr, + /* dstOffset= */ {0, 0}); sk_sp fakeDstTexture = TextureProxy::Make(recorder->priv().caps(), SkISize::Make(1, 1), @@ -652,6 +656,7 @@ DEF_GRAPHITE_TEST_FOR_ALL_CONTEXTS(PaintParamsKeyTest, reporter, context) { skgpu::Protected::kNo, skgpu::Renderable::kYes, skgpu::Budgeted::kNo); + constexpr SkIPoint fakeDstOffset = SkIPoint::Make(0, 0); SkFont font(ToolUtils::create_portable_typeface(), 16); const char text[] = "hambur"; @@ -723,7 +728,7 @@ DEF_GRAPHITE_TEST_FOR_ALL_CONTEXTS(PaintParamsKeyTest, reporter, context) { std::move(primitiveBlender), dstReadReq, /* skipColorXform= */ false), - curDst, ci); + curDst, fakeDstOffset, ci); std::vector precompileIDs; paintOptions.priv().buildCombinations(precompileKeyContext, diff --git a/tests/graphite/ReadWritePixelsGraphiteTest.cpp b/tests/graphite/ReadWritePixelsGraphiteTest.cpp index 77db2faa26af..c59dffbe6e67 100644 --- a/tests/graphite/ReadWritePixelsGraphiteTest.cpp +++ b/tests/graphite/ReadWritePixelsGraphiteTest.cpp @@ -537,8 +537,13 @@ DEF_GRAPHITE_TEST_FOR_RENDERING_CONTEXTS(ImageAsyncReadPixelsGraphite, return Result::kExcusedFailure; } - context->asyncReadPixels(image.get(), pixels.info().colorInfo(), rect, - async_callback, &asyncContext); + context->asyncRescaleAndReadPixels(image.get(), + pixels.info(), + rect, + SkImage::RescaleGamma::kSrc, + SkImage::RescaleMode::kRepeatedLinear, + async_callback, + &asyncContext); if (!asyncContext.fCalled) { context->submit(); } @@ -606,8 +611,13 @@ DEF_GRAPHITE_TEST_FOR_RENDERING_CONTEXTS(SurfaceAsyncReadPixelsGraphite, AsyncContext asyncContext; auto rect = SkIRect::MakeSize(pixels.dimensions()).makeOffset(offset); - context->asyncReadPixels(surface.get(), pixels.info().colorInfo(), rect, - async_callback, &asyncContext); + context->asyncRescaleAndReadPixels(surface.get(), + pixels.info(), + rect, + SkImage::RescaleGamma::kSrc, + SkImage::RescaleMode::kRepeatedLinear, + async_callback, + &asyncContext); if (!asyncContext.fCalled) { context->submit(); } diff --git a/tests/graphite/RecordingSurfacesTest.cpp b/tests/graphite/RecordingSurfacesTest.cpp index 49aa6fec2466..6339c7118262 100644 --- a/tests/graphite/RecordingSurfacesTest.cpp +++ b/tests/graphite/RecordingSurfacesTest.cpp @@ -14,6 +14,7 @@ #include "include/gpu/graphite/Recorder.h" #include "include/gpu/graphite/Recording.h" #include "include/gpu/graphite/Surface.h" +#include "src/gpu/graphite/RecordingPriv.h" #include "src/gpu/graphite/Surface_Graphite.h" namespace skgpu::graphite { @@ -71,7 +72,7 @@ void run_test(skiatest::Reporter* reporter, } // Veryify expectations are met and recording is uninstantiated. - REPORTER_ASSERT(reporter, !recording->isTargetProxyInstantiated()); + REPORTER_ASSERT(reporter, !recording->priv().isTargetProxyInstantiated()); for (const Expectation& e : expectations) { SkColor4f color = pixmap.getColor4f(e.fX, e.fY); #ifdef SK_DEBUG diff --git a/tests/graphite/TextureProxyTest.cpp b/tests/graphite/TextureProxyTest.cpp index b2b636302da8..a6c7904df2f9 100644 --- a/tests/graphite/TextureProxyTest.cpp +++ b/tests/graphite/TextureProxyTest.cpp @@ -7,9 +7,14 @@ #include "tests/Test.h" +#include "include/core/SkBitmap.h" +#include "include/core/SkCanvas.h" +#include "include/core/SkColorSpace.h" #include "include/gpu/graphite/BackendTexture.h" #include "include/gpu/graphite/Context.h" +#include "include/gpu/graphite/Image.h" #include "include/gpu/graphite/Recorder.h" +#include "include/gpu/graphite/Surface.h" #include "src/gpu/graphite/Caps.h" #include "src/gpu/graphite/ContextPriv.h" #include "src/gpu/graphite/RecorderPriv.h" @@ -87,7 +92,7 @@ DEF_GRAPHITE_TEST_FOR_ALL_CONTEXTS(GraphiteTextureProxyTest, reporter, context) // Lazy, non-volatile TextureProxy, unsuccessful instantiation. textureProxy = TextureProxy::MakeLazy( - kValidSize, textureInfo, skgpu::Budgeted::kNo, Volatile::kNo, nullCallback); + caps, kValidSize, textureInfo, skgpu::Budgeted::kNo, Volatile::kNo, nullCallback); REPORTER_ASSERT(reporter, textureProxy->isLazy()); REPORTER_ASSERT(reporter, !textureProxy->isFullyLazy()); REPORTER_ASSERT(reporter, !textureProxy->isVolatile()); @@ -98,7 +103,7 @@ DEF_GRAPHITE_TEST_FOR_ALL_CONTEXTS(GraphiteTextureProxyTest, reporter, context) // Lazy, non-volatile TextureProxy, successful instantiation. textureProxy = TextureProxy::MakeLazy( - kValidSize, textureInfo, skgpu::Budgeted::kNo, Volatile::kNo, callback); + caps, kValidSize, textureInfo, skgpu::Budgeted::kNo, Volatile::kNo, callback); instantiateSuccess = textureProxy->lazyInstantiate(resourceProvider); REPORTER_ASSERT(reporter, instantiateSuccess); @@ -106,7 +111,7 @@ DEF_GRAPHITE_TEST_FOR_ALL_CONTEXTS(GraphiteTextureProxyTest, reporter, context) // Lazy, volatile TextureProxy, unsuccessful instantiation. textureProxy = TextureProxy::MakeLazy( - kValidSize, textureInfo, skgpu::Budgeted::kNo, Volatile::kYes, nullCallback); + caps, kValidSize, textureInfo, skgpu::Budgeted::kNo, Volatile::kYes, nullCallback); REPORTER_ASSERT(reporter, textureProxy->isLazy()); REPORTER_ASSERT(reporter, !textureProxy->isFullyLazy()); REPORTER_ASSERT(reporter, textureProxy->isVolatile()); @@ -117,7 +122,7 @@ DEF_GRAPHITE_TEST_FOR_ALL_CONTEXTS(GraphiteTextureProxyTest, reporter, context) // Lazy, volatile TextureProxy, successful instantiation. textureProxy = TextureProxy::MakeLazy( - kValidSize, textureInfo, skgpu::Budgeted::kNo, Volatile::kYes, callback); + caps, kValidSize, textureInfo, skgpu::Budgeted::kNo, Volatile::kYes, callback); instantiateSuccess = textureProxy->lazyInstantiate(resourceProvider); REPORTER_ASSERT(reporter, instantiateSuccess); @@ -164,9 +169,82 @@ DEF_GRAPHITE_TEST_FOR_ALL_CONTEXTS(GraphiteTextureProxyTest, reporter, context) REPORTER_ASSERT(reporter, instantiateSuccess); textureProxy = TextureProxy::MakeLazy( - kValidSize, textureInfo, skgpu::Budgeted::kNo, Volatile::kNo, nullCallback); + caps, kValidSize, textureInfo, skgpu::Budgeted::kNo, Volatile::kNo, nullCallback); instantiateSuccess = TextureProxy::InstantiateIfNotLazy(resourceProvider, textureProxy.get()); REPORTER_ASSERT(reporter, instantiateSuccess); } +DEF_GRAPHITE_TEST_FOR_ALL_CONTEXTS(GraphiteTextureTooLargeTest, reporter, context) { + std::unique_ptr recorder = context->makeRecorder(); + const Caps* caps = context->priv().caps(); + + // Try to create a texture that is too large for the backend. + SkBitmap bitmap; + SkISize dimensions = SkISize::Make(caps->maxTextureSize() + 1, 1); + bitmap.allocPixels(SkImageInfo::Make( + dimensions, SkColorType::kRGBA_8888_SkColorType, SkAlphaType::kPremul_SkAlphaType)); + sk_sp rasterImage = SkImages::RasterFromBitmap(bitmap); + sk_sp graphiteImage = + SkImages::TextureFromImage(recorder.get(), rasterImage.get(), /*requiredProps=*/{}); + + // Image creation should have failed. + REPORTER_ASSERT(reporter, !graphiteImage); + + // Snapping should still succeed, no texture upload should actually be attempted. + REPORTER_ASSERT(reporter, recorder->snap()); +} + +DEF_GRAPHITE_TEST_FOR_ALL_CONTEXTS(GraphiteLazyTextureInvalidDimensions, reporter, context) { + class FulfillContext { + public: + FulfillContext(BackendTexture backendTexture) : fBackendTexture(backendTexture) {} + + static std::tuple Fulfill(void* ctx) { + FulfillContext* self = reinterpret_cast(ctx); + return {self->fBackendTexture, nullptr}; + } + + BackendTexture fBackendTexture; + }; + + std::unique_ptr recorder = context->makeRecorder(); + const Caps* caps = context->priv().caps(); + + // Try to create textures with invalid dimensions. + SkISize largeDimensions = SkISize::Make(caps->maxTextureSize() + 1, 1); + SkISize negativeDimensions = SkISize::Make(-1, -1); + + for (const SkISize& dimensions : {largeDimensions, negativeDimensions}) { + SkImageInfo imageInfo = SkImageInfo::Make( + dimensions, SkColorType::kRGBA_8888_SkColorType, SkAlphaType::kPremul_SkAlphaType); + TextureInfo textureInfo = caps->getDefaultSampledTextureInfo( + imageInfo.colorInfo().colorType(), Mipmapped::kNo, Protected::kNo, Renderable::kNo); + + // The created BackendTexture should be invalid, so an invalid texture would be used to + // fulfill the promise image created later, if we were to attempt to draw it. + BackendTexture backendTexture = + recorder->createBackendTexture(imageInfo.dimensions(), textureInfo); + FulfillContext fulfillContext(backendTexture); + REPORTER_ASSERT(reporter, !backendTexture.isValid()); + + // Drawing should still succeed, as no image draw should actually be attempted with this + // texture. + SkImageInfo surfaceImageInfo = SkImageInfo::Make( + 1, 1, SkColorType::kRGBA_8888_SkColorType, SkAlphaType::kPremul_SkAlphaType); + sk_sp surface = SkSurfaces::RenderTarget(recorder.get(), surfaceImageInfo); + sk_sp promiseImage = SkImages::PromiseTextureFrom(recorder.get(), + imageInfo.dimensions(), + textureInfo, + imageInfo.colorInfo(), + Volatile::kNo, + FulfillContext::Fulfill, + nullptr, + nullptr, + &fulfillContext); + surface->getCanvas()->drawImage(promiseImage, 0.0f, 0.0f); + std::unique_ptr recording = recorder->snap(); + REPORTER_ASSERT(reporter, context->insertRecording({recording.get()})); + } +} + } // namespace skgpu::graphite diff --git a/tests/make_adb_test_tarball/BUILD.bazel b/tests/make_adb_test_tarball/BUILD.bazel deleted file mode 100644 index df79fff1004e..000000000000 --- a/tests/make_adb_test_tarball/BUILD.bazel +++ /dev/null @@ -1,14 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") - -go_library( - name = "make_adb_test_tarball_lib", - srcs = ["make_adb_test_tarball.go"], - importpath = "go.skia.org/skia/tests/make_adb_test_tarball", - visibility = ["//visibility:private"], -) - -go_binary( - name = "make_adb_test_tarball", - embed = [":make_adb_test_tarball_lib"], - visibility = ["//visibility:public"], -) diff --git a/tests/sksl/blend/BlendClear.asm.frag b/tests/sksl/blend/BlendClear.asm.frag index eadae0434ab4..0d71edacbaf5 100644 --- a/tests/sksl/blend/BlendClear.asm.frag +++ b/tests/sksl/blend/BlendClear.asm.frag @@ -1,41 +1,41 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "src" -OpMemberName %_UniformBuffer 1 "dst" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "src" + OpMemberName %_UniformBuffer 1 "dst" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%14 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%17 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 -%main = OpFunction %void None %14 -%15 = OpLabel -OpStore %sk_FragColor %17 -OpReturn -OpFunctionEnd + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %14 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %17 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %main = OpFunction %void None %14 + %15 = OpLabel + OpStore %sk_FragColor %17 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/blend/BlendClear.wgsl b/tests/sksl/blend/BlendClear.wgsl index 2141312931fd..cd73bde59ab8 100644 --- a/tests/sksl/blend/BlendClear.wgsl +++ b/tests/sksl/blend/BlendClear.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/blend/BlendColor.asm.frag b/tests/sksl/blend/BlendColor.asm.frag index c08e7d07a74e..a632c4db8660 100644 --- a/tests/sksl/blend/BlendColor.asm.frag +++ b/tests/sksl/blend/BlendColor.asm.frag @@ -1,412 +1,412 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %_kGuardedDivideEpsilon "$kGuardedDivideEpsilon" -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "src" -OpMemberName %_UniformBuffer 1 "dst" -OpName %blend_color_saturation_Qhh3 "blend_color_saturation_Qhh3" -OpName %blend_hslc_h4h2h4h4 "blend_hslc_h4h2h4h4" -OpName %alpha "alpha" -OpName %sda "sda" -OpName %dsa "dsa" -OpName %l "l" -OpName %r "r" -OpName %_2_mn "_2_mn" -OpName %_3_mx "_3_mx" -OpName %_4_lum "_4_lum" -OpName %_5_result "_5_result" -OpName %_6_minComp "_6_minComp" -OpName %_7_maxComp "_7_maxComp" -OpName %main "main" -OpDecorate %_kGuardedDivideEpsilon RelaxedPrecision -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %18 Binding 0 -OpDecorate %18 DescriptorSet 0 -OpDecorate %28 RelaxedPrecision -OpDecorate %29 RelaxedPrecision -OpDecorate %30 RelaxedPrecision -OpDecorate %31 RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %39 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %alpha RelaxedPrecision -OpDecorate %53 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %55 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %sda RelaxedPrecision -OpDecorate %59 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %62 RelaxedPrecision -OpDecorate %63 RelaxedPrecision -OpDecorate %dsa RelaxedPrecision -OpDecorate %65 RelaxedPrecision -OpDecorate %66 RelaxedPrecision -OpDecorate %67 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %69 RelaxedPrecision -OpDecorate %l RelaxedPrecision -OpDecorate %71 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %78 RelaxedPrecision -OpDecorate %r RelaxedPrecision -OpDecorate %80 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %87 RelaxedPrecision -OpDecorate %88 RelaxedPrecision -OpDecorate %89 RelaxedPrecision -OpDecorate %_2_mn RelaxedPrecision -OpDecorate %96 RelaxedPrecision -OpDecorate %97 RelaxedPrecision -OpDecorate %98 RelaxedPrecision -OpDecorate %_3_mx RelaxedPrecision -OpDecorate %107 RelaxedPrecision -OpDecorate %108 RelaxedPrecision -OpDecorate %111 RelaxedPrecision -OpDecorate %112 RelaxedPrecision -OpDecorate %114 RelaxedPrecision -OpDecorate %115 RelaxedPrecision -OpDecorate %117 RelaxedPrecision -OpDecorate %_4_lum RelaxedPrecision -OpDecorate %119 RelaxedPrecision -OpDecorate %124 RelaxedPrecision -OpDecorate %_5_result RelaxedPrecision -OpDecorate %126 RelaxedPrecision -OpDecorate %127 RelaxedPrecision -OpDecorate %128 RelaxedPrecision -OpDecorate %129 RelaxedPrecision -OpDecorate %130 RelaxedPrecision -OpDecorate %131 RelaxedPrecision -OpDecorate %_6_minComp RelaxedPrecision -OpDecorate %135 RelaxedPrecision -OpDecorate %136 RelaxedPrecision -OpDecorate %137 RelaxedPrecision -OpDecorate %_7_maxComp RelaxedPrecision -OpDecorate %148 RelaxedPrecision -OpDecorate %149 RelaxedPrecision -OpDecorate %150 RelaxedPrecision -OpDecorate %151 RelaxedPrecision -OpDecorate %152 RelaxedPrecision -OpDecorate %153 RelaxedPrecision -OpDecorate %154 RelaxedPrecision -OpDecorate %155 RelaxedPrecision -OpDecorate %163 RelaxedPrecision -OpDecorate %164 RelaxedPrecision -OpDecorate %165 RelaxedPrecision -OpDecorate %166 RelaxedPrecision -OpDecorate %167 RelaxedPrecision -OpDecorate %168 RelaxedPrecision -OpDecorate %169 RelaxedPrecision -OpDecorate %170 RelaxedPrecision -OpDecorate %171 RelaxedPrecision -OpDecorate %172 RelaxedPrecision -OpDecorate %173 RelaxedPrecision -OpDecorate %174 RelaxedPrecision -OpDecorate %175 RelaxedPrecision -OpDecorate %176 RelaxedPrecision -OpDecorate %177 RelaxedPrecision -OpDecorate %178 RelaxedPrecision -OpDecorate %179 RelaxedPrecision -OpDecorate %180 RelaxedPrecision -OpDecorate %181 RelaxedPrecision -OpDecorate %182 RelaxedPrecision -OpDecorate %183 RelaxedPrecision -OpDecorate %184 RelaxedPrecision -OpDecorate %185 RelaxedPrecision -OpDecorate %186 RelaxedPrecision -OpDecorate %187 RelaxedPrecision -OpDecorate %188 RelaxedPrecision -OpDecorate %189 RelaxedPrecision -OpDecorate %190 RelaxedPrecision -OpDecorate %191 RelaxedPrecision -OpDecorate %192 RelaxedPrecision -OpDecorate %202 RelaxedPrecision -OpDecorate %206 RelaxedPrecision -%float = OpTypeFloat 32 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %_kGuardedDivideEpsilon "$kGuardedDivideEpsilon" + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "src" + OpMemberName %_UniformBuffer 1 "dst" + OpName %blend_color_saturation_Qhh3 "blend_color_saturation_Qhh3" + OpName %blend_hslc_h4h2h4h4 "blend_hslc_h4h2h4h4" + OpName %alpha "alpha" + OpName %sda "sda" + OpName %dsa "dsa" + OpName %l "l" + OpName %r "r" + OpName %_2_mn "_2_mn" + OpName %_3_mx "_3_mx" + OpName %_4_lum "_4_lum" + OpName %_5_result "_5_result" + OpName %_6_minComp "_6_minComp" + OpName %_7_maxComp "_7_maxComp" + OpName %main "main" + OpDecorate %_kGuardedDivideEpsilon RelaxedPrecision + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %18 Binding 0 + OpDecorate %18 DescriptorSet 0 + OpDecorate %28 RelaxedPrecision + OpDecorate %29 RelaxedPrecision + OpDecorate %30 RelaxedPrecision + OpDecorate %31 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %alpha RelaxedPrecision + OpDecorate %53 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %55 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %sda RelaxedPrecision + OpDecorate %59 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %62 RelaxedPrecision + OpDecorate %63 RelaxedPrecision + OpDecorate %dsa RelaxedPrecision + OpDecorate %65 RelaxedPrecision + OpDecorate %66 RelaxedPrecision + OpDecorate %67 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %69 RelaxedPrecision + OpDecorate %l RelaxedPrecision + OpDecorate %71 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %78 RelaxedPrecision + OpDecorate %r RelaxedPrecision + OpDecorate %80 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %87 RelaxedPrecision + OpDecorate %88 RelaxedPrecision + OpDecorate %89 RelaxedPrecision + OpDecorate %_2_mn RelaxedPrecision + OpDecorate %96 RelaxedPrecision + OpDecorate %97 RelaxedPrecision + OpDecorate %98 RelaxedPrecision + OpDecorate %_3_mx RelaxedPrecision + OpDecorate %107 RelaxedPrecision + OpDecorate %108 RelaxedPrecision + OpDecorate %111 RelaxedPrecision + OpDecorate %112 RelaxedPrecision + OpDecorate %114 RelaxedPrecision + OpDecorate %115 RelaxedPrecision + OpDecorate %117 RelaxedPrecision + OpDecorate %_4_lum RelaxedPrecision + OpDecorate %119 RelaxedPrecision + OpDecorate %124 RelaxedPrecision + OpDecorate %_5_result RelaxedPrecision + OpDecorate %126 RelaxedPrecision + OpDecorate %127 RelaxedPrecision + OpDecorate %128 RelaxedPrecision + OpDecorate %129 RelaxedPrecision + OpDecorate %130 RelaxedPrecision + OpDecorate %131 RelaxedPrecision + OpDecorate %_6_minComp RelaxedPrecision + OpDecorate %135 RelaxedPrecision + OpDecorate %136 RelaxedPrecision + OpDecorate %137 RelaxedPrecision + OpDecorate %_7_maxComp RelaxedPrecision + OpDecorate %148 RelaxedPrecision + OpDecorate %149 RelaxedPrecision + OpDecorate %150 RelaxedPrecision + OpDecorate %151 RelaxedPrecision + OpDecorate %152 RelaxedPrecision + OpDecorate %153 RelaxedPrecision + OpDecorate %154 RelaxedPrecision + OpDecorate %155 RelaxedPrecision + OpDecorate %163 RelaxedPrecision + OpDecorate %164 RelaxedPrecision + OpDecorate %165 RelaxedPrecision + OpDecorate %166 RelaxedPrecision + OpDecorate %167 RelaxedPrecision + OpDecorate %168 RelaxedPrecision + OpDecorate %169 RelaxedPrecision + OpDecorate %170 RelaxedPrecision + OpDecorate %171 RelaxedPrecision + OpDecorate %172 RelaxedPrecision + OpDecorate %173 RelaxedPrecision + OpDecorate %174 RelaxedPrecision + OpDecorate %175 RelaxedPrecision + OpDecorate %176 RelaxedPrecision + OpDecorate %177 RelaxedPrecision + OpDecorate %178 RelaxedPrecision + OpDecorate %179 RelaxedPrecision + OpDecorate %180 RelaxedPrecision + OpDecorate %181 RelaxedPrecision + OpDecorate %182 RelaxedPrecision + OpDecorate %183 RelaxedPrecision + OpDecorate %184 RelaxedPrecision + OpDecorate %185 RelaxedPrecision + OpDecorate %186 RelaxedPrecision + OpDecorate %187 RelaxedPrecision + OpDecorate %188 RelaxedPrecision + OpDecorate %189 RelaxedPrecision + OpDecorate %190 RelaxedPrecision + OpDecorate %191 RelaxedPrecision + OpDecorate %192 RelaxedPrecision + OpDecorate %202 RelaxedPrecision + OpDecorate %206 RelaxedPrecision + %float = OpTypeFloat 32 %_ptr_Private_float = OpTypePointer Private %float %_kGuardedDivideEpsilon = OpVariable %_ptr_Private_float Private -%bool = OpTypeBool -%false = OpConstantFalse %bool + %bool = OpTypeBool + %false = OpConstantFalse %bool %float_9_99999994en09 = OpConstant %float 9.99999994e-09 -%float_0 = OpConstant %float 0 + %float_0 = OpConstant %float 0 %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%v4float = OpTypeVector %float 4 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%18 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%v3float = OpTypeVector %float 3 + %18 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %v3float = OpTypeVector %float 3 %_ptr_Function_v3float = OpTypePointer Function %v3float -%23 = OpTypeFunction %float %_ptr_Function_v3float -%v2float = OpTypeVector %float 2 + %23 = OpTypeFunction %float %_ptr_Function_v3float + %v2float = OpTypeVector %float 2 %_ptr_Function_v2float = OpTypePointer Function %v2float %_ptr_Function_v4float = OpTypePointer Function %v4float -%46 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float %_ptr_Function_v4float + %46 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float %_ptr_Function_v4float %_ptr_Function_float = OpTypePointer Function %float -%float_1 = OpConstant %float 1 -%116 = OpConstantComposite %v3float %float_0 %float_0 %float_0 + %float_1 = OpConstant %float 1 + %116 = OpConstantComposite %v3float %float_0 %float_0 %float_0 %float_0_300000012 = OpConstant %float 0.300000012 %float_0_589999974 = OpConstant %float 0.589999974 %float_0_109999999 = OpConstant %float 0.109999999 -%123 = OpConstantComposite %v3float %float_0_300000012 %float_0_589999974 %float_0_109999999 -%void = OpTypeVoid -%194 = OpTypeFunction %void -%196 = OpConstantComposite %v2float %float_0 %float_0 + %123 = OpConstantComposite %v3float %float_0_300000012 %float_0_589999974 %float_0_109999999 + %void = OpTypeVoid + %194 = OpTypeFunction %void + %196 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 %blend_color_saturation_Qhh3 = OpFunction %float None %23 -%24 = OpFunctionParameter %_ptr_Function_v3float -%25 = OpLabel -%28 = OpLoad %v3float %24 -%29 = OpCompositeExtract %float %28 0 -%30 = OpLoad %v3float %24 -%31 = OpCompositeExtract %float %30 1 -%27 = OpExtInst %float %1 FMax %29 %31 -%32 = OpLoad %v3float %24 -%33 = OpCompositeExtract %float %32 2 -%26 = OpExtInst %float %1 FMax %27 %33 -%36 = OpLoad %v3float %24 -%37 = OpCompositeExtract %float %36 0 -%38 = OpLoad %v3float %24 -%39 = OpCompositeExtract %float %38 1 -%35 = OpExtInst %float %1 FMin %37 %39 -%40 = OpLoad %v3float %24 -%41 = OpCompositeExtract %float %40 2 -%34 = OpExtInst %float %1 FMin %35 %41 -%42 = OpFSub %float %26 %34 -OpReturnValue %42 -OpFunctionEnd + %24 = OpFunctionParameter %_ptr_Function_v3float + %25 = OpLabel + %28 = OpLoad %v3float %24 + %29 = OpCompositeExtract %float %28 0 + %30 = OpLoad %v3float %24 + %31 = OpCompositeExtract %float %30 1 + %27 = OpExtInst %float %1 FMax %29 %31 + %32 = OpLoad %v3float %24 + %33 = OpCompositeExtract %float %32 2 + %26 = OpExtInst %float %1 FMax %27 %33 + %36 = OpLoad %v3float %24 + %37 = OpCompositeExtract %float %36 0 + %38 = OpLoad %v3float %24 + %39 = OpCompositeExtract %float %38 1 + %35 = OpExtInst %float %1 FMin %37 %39 + %40 = OpLoad %v3float %24 + %41 = OpCompositeExtract %float %40 2 + %34 = OpExtInst %float %1 FMin %35 %41 + %42 = OpFSub %float %26 %34 + OpReturnValue %42 + OpFunctionEnd %blend_hslc_h4h2h4h4 = OpFunction %v4float None %46 -%47 = OpFunctionParameter %_ptr_Function_v2float -%48 = OpFunctionParameter %_ptr_Function_v4float -%49 = OpFunctionParameter %_ptr_Function_v4float -%50 = OpLabel -%alpha = OpVariable %_ptr_Function_float Function -%sda = OpVariable %_ptr_Function_v3float Function -%dsa = OpVariable %_ptr_Function_v3float Function -%l = OpVariable %_ptr_Function_v3float Function -%74 = OpVariable %_ptr_Function_v3float Function -%r = OpVariable %_ptr_Function_v3float Function -%83 = OpVariable %_ptr_Function_v3float Function -%_2_mn = OpVariable %_ptr_Function_float Function -%_3_mx = OpVariable %_ptr_Function_float Function -%103 = OpVariable %_ptr_Function_v3float Function -%109 = OpVariable %_ptr_Function_v3float Function -%_4_lum = OpVariable %_ptr_Function_float Function -%_5_result = OpVariable %_ptr_Function_v3float Function -%_6_minComp = OpVariable %_ptr_Function_float Function -%_7_maxComp = OpVariable %_ptr_Function_float Function -%53 = OpLoad %v4float %49 -%54 = OpCompositeExtract %float %53 3 -%55 = OpLoad %v4float %48 -%56 = OpCompositeExtract %float %55 3 -%57 = OpFMul %float %54 %56 -OpStore %alpha %57 -%59 = OpLoad %v4float %48 -%60 = OpVectorShuffle %v3float %59 %59 0 1 2 -%61 = OpLoad %v4float %49 -%62 = OpCompositeExtract %float %61 3 -%63 = OpVectorTimesScalar %v3float %60 %62 -OpStore %sda %63 -%65 = OpLoad %v4float %49 -%66 = OpVectorShuffle %v3float %65 %65 0 1 2 -%67 = OpLoad %v4float %48 -%68 = OpCompositeExtract %float %67 3 -%69 = OpVectorTimesScalar %v3float %66 %68 -OpStore %dsa %69 -%71 = OpLoad %v2float %47 -%72 = OpCompositeExtract %float %71 0 -%73 = OpFUnordNotEqual %bool %72 %float_0 -OpSelectionMerge %77 None -OpBranchConditional %73 %75 %76 -%75 = OpLabel -OpStore %74 %69 -OpBranch %77 -%76 = OpLabel -OpStore %74 %63 -OpBranch %77 -%77 = OpLabel -%78 = OpLoad %v3float %74 -OpStore %l %78 -%80 = OpLoad %v2float %47 -%81 = OpCompositeExtract %float %80 0 -%82 = OpFUnordNotEqual %bool %81 %float_0 -OpSelectionMerge %86 None -OpBranchConditional %82 %84 %85 -%84 = OpLabel -OpStore %83 %63 -OpBranch %86 -%85 = OpLabel -OpStore %83 %69 -OpBranch %86 -%86 = OpLabel -%87 = OpLoad %v3float %83 -OpStore %r %87 -%88 = OpLoad %v2float %47 -%89 = OpCompositeExtract %float %88 1 -%90 = OpFUnordNotEqual %bool %89 %float_0 -OpSelectionMerge %92 None -OpBranchConditional %90 %91 %92 -%91 = OpLabel -%96 = OpCompositeExtract %float %78 0 -%97 = OpCompositeExtract %float %78 1 -%95 = OpExtInst %float %1 FMin %96 %97 -%98 = OpCompositeExtract %float %78 2 -%94 = OpExtInst %float %1 FMin %95 %98 -OpStore %_2_mn %94 -%101 = OpExtInst %float %1 FMax %96 %97 -%100 = OpExtInst %float %1 FMax %101 %98 -OpStore %_3_mx %100 -%102 = OpFOrdGreaterThan %bool %100 %94 -OpSelectionMerge %106 None -OpBranchConditional %102 %104 %105 -%104 = OpLabel -%107 = OpCompositeConstruct %v3float %94 %94 %94 -%108 = OpFSub %v3float %78 %107 -OpStore %109 %87 -%110 = OpFunctionCall %float %blend_color_saturation_Qhh3 %109 -%111 = OpVectorTimesScalar %v3float %108 %110 -%112 = OpFSub %float %100 %94 -%114 = OpFDiv %float %float_1 %112 -%115 = OpVectorTimesScalar %v3float %111 %114 -OpStore %103 %115 -OpBranch %106 -%105 = OpLabel -OpStore %103 %116 -OpBranch %106 -%106 = OpLabel -%117 = OpLoad %v3float %103 -OpStore %l %117 -OpStore %r %69 -OpBranch %92 -%92 = OpLabel -%124 = OpLoad %v3float %r -%119 = OpDot %float %123 %124 -OpStore %_4_lum %119 -%127 = OpLoad %v3float %l -%126 = OpDot %float %123 %127 -%128 = OpFSub %float %119 %126 -%129 = OpLoad %v3float %l -%130 = OpCompositeConstruct %v3float %128 %128 %128 -%131 = OpFAdd %v3float %130 %129 -OpStore %_5_result %131 -%135 = OpCompositeExtract %float %131 0 -%136 = OpCompositeExtract %float %131 1 -%134 = OpExtInst %float %1 FMin %135 %136 -%137 = OpCompositeExtract %float %131 2 -%133 = OpExtInst %float %1 FMin %134 %137 -OpStore %_6_minComp %133 -%140 = OpExtInst %float %1 FMax %135 %136 -%139 = OpExtInst %float %1 FMax %140 %137 -OpStore %_7_maxComp %139 -%141 = OpFOrdLessThan %bool %133 %float_0 -OpSelectionMerge %143 None -OpBranchConditional %141 %142 %143 -%142 = OpLabel -%144 = OpFUnordNotEqual %bool %119 %133 -OpBranch %143 -%143 = OpLabel -%145 = OpPhi %bool %false %92 %144 %142 -OpSelectionMerge %147 None -OpBranchConditional %145 %146 %147 -%146 = OpLabel -%148 = OpCompositeConstruct %v3float %119 %119 %119 -%149 = OpFSub %v3float %131 %148 -%150 = OpFSub %float %119 %133 -%151 = OpLoad %float %_kGuardedDivideEpsilon -%152 = OpFAdd %float %150 %151 -%153 = OpFDiv %float %119 %152 -%154 = OpVectorTimesScalar %v3float %149 %153 -%155 = OpFAdd %v3float %148 %154 -OpStore %_5_result %155 -OpBranch %147 -%147 = OpLabel -%156 = OpFOrdGreaterThan %bool %139 %57 -OpSelectionMerge %158 None -OpBranchConditional %156 %157 %158 -%157 = OpLabel -%159 = OpFUnordNotEqual %bool %139 %119 -OpBranch %158 -%158 = OpLabel -%160 = OpPhi %bool %false %147 %159 %157 -OpSelectionMerge %162 None -OpBranchConditional %160 %161 %162 -%161 = OpLabel -%163 = OpLoad %v3float %_5_result -%164 = OpCompositeConstruct %v3float %119 %119 %119 -%165 = OpFSub %v3float %163 %164 -%166 = OpFSub %float %57 %119 -%167 = OpVectorTimesScalar %v3float %165 %166 -%168 = OpFSub %float %139 %119 -%169 = OpLoad %float %_kGuardedDivideEpsilon -%170 = OpFAdd %float %168 %169 -%171 = OpFDiv %float %float_1 %170 -%172 = OpVectorTimesScalar %v3float %167 %171 -%173 = OpFAdd %v3float %164 %172 -OpStore %_5_result %173 -OpBranch %162 -%162 = OpLabel -%174 = OpLoad %v3float %_5_result -%175 = OpLoad %v4float %49 -%176 = OpVectorShuffle %v3float %175 %175 0 1 2 -%177 = OpFAdd %v3float %174 %176 -%178 = OpFSub %v3float %177 %69 -%179 = OpLoad %v4float %48 -%180 = OpVectorShuffle %v3float %179 %179 0 1 2 -%181 = OpFAdd %v3float %178 %180 -%182 = OpFSub %v3float %181 %63 -%183 = OpCompositeExtract %float %182 0 -%184 = OpCompositeExtract %float %182 1 -%185 = OpCompositeExtract %float %182 2 -%186 = OpLoad %v4float %48 -%187 = OpCompositeExtract %float %186 3 -%188 = OpLoad %v4float %49 -%189 = OpCompositeExtract %float %188 3 -%190 = OpFAdd %float %187 %189 -%191 = OpFSub %float %190 %57 -%192 = OpCompositeConstruct %v4float %183 %184 %185 %191 -OpReturnValue %192 -OpFunctionEnd -%main = OpFunction %void None %194 -%195 = OpLabel -%197 = OpVariable %_ptr_Function_v2float Function -%203 = OpVariable %_ptr_Function_v4float Function -%207 = OpVariable %_ptr_Function_v4float Function -%10 = OpSelect %float %false %float_9_99999994en09 %float_0 -OpStore %_kGuardedDivideEpsilon %10 -OpStore %197 %196 -%198 = OpAccessChain %_ptr_Uniform_v4float %18 %int_0 -%202 = OpLoad %v4float %198 -OpStore %203 %202 -%204 = OpAccessChain %_ptr_Uniform_v4float %18 %int_1 -%206 = OpLoad %v4float %204 -OpStore %207 %206 -%208 = OpFunctionCall %v4float %blend_hslc_h4h2h4h4 %197 %203 %207 -OpStore %sk_FragColor %208 -OpReturn -OpFunctionEnd + %47 = OpFunctionParameter %_ptr_Function_v2float + %48 = OpFunctionParameter %_ptr_Function_v4float + %49 = OpFunctionParameter %_ptr_Function_v4float + %50 = OpLabel + %alpha = OpVariable %_ptr_Function_float Function + %sda = OpVariable %_ptr_Function_v3float Function + %dsa = OpVariable %_ptr_Function_v3float Function + %l = OpVariable %_ptr_Function_v3float Function + %74 = OpVariable %_ptr_Function_v3float Function + %r = OpVariable %_ptr_Function_v3float Function + %83 = OpVariable %_ptr_Function_v3float Function + %_2_mn = OpVariable %_ptr_Function_float Function + %_3_mx = OpVariable %_ptr_Function_float Function + %103 = OpVariable %_ptr_Function_v3float Function + %109 = OpVariable %_ptr_Function_v3float Function + %_4_lum = OpVariable %_ptr_Function_float Function + %_5_result = OpVariable %_ptr_Function_v3float Function + %_6_minComp = OpVariable %_ptr_Function_float Function + %_7_maxComp = OpVariable %_ptr_Function_float Function + %53 = OpLoad %v4float %49 + %54 = OpCompositeExtract %float %53 3 + %55 = OpLoad %v4float %48 + %56 = OpCompositeExtract %float %55 3 + %57 = OpFMul %float %54 %56 + OpStore %alpha %57 + %59 = OpLoad %v4float %48 + %60 = OpVectorShuffle %v3float %59 %59 0 1 2 + %61 = OpLoad %v4float %49 + %62 = OpCompositeExtract %float %61 3 + %63 = OpVectorTimesScalar %v3float %60 %62 + OpStore %sda %63 + %65 = OpLoad %v4float %49 + %66 = OpVectorShuffle %v3float %65 %65 0 1 2 + %67 = OpLoad %v4float %48 + %68 = OpCompositeExtract %float %67 3 + %69 = OpVectorTimesScalar %v3float %66 %68 + OpStore %dsa %69 + %71 = OpLoad %v2float %47 + %72 = OpCompositeExtract %float %71 0 + %73 = OpFUnordNotEqual %bool %72 %float_0 + OpSelectionMerge %77 None + OpBranchConditional %73 %75 %76 + %75 = OpLabel + OpStore %74 %69 + OpBranch %77 + %76 = OpLabel + OpStore %74 %63 + OpBranch %77 + %77 = OpLabel + %78 = OpLoad %v3float %74 + OpStore %l %78 + %80 = OpLoad %v2float %47 + %81 = OpCompositeExtract %float %80 0 + %82 = OpFUnordNotEqual %bool %81 %float_0 + OpSelectionMerge %86 None + OpBranchConditional %82 %84 %85 + %84 = OpLabel + OpStore %83 %63 + OpBranch %86 + %85 = OpLabel + OpStore %83 %69 + OpBranch %86 + %86 = OpLabel + %87 = OpLoad %v3float %83 + OpStore %r %87 + %88 = OpLoad %v2float %47 + %89 = OpCompositeExtract %float %88 1 + %90 = OpFUnordNotEqual %bool %89 %float_0 + OpSelectionMerge %92 None + OpBranchConditional %90 %91 %92 + %91 = OpLabel + %96 = OpCompositeExtract %float %78 0 + %97 = OpCompositeExtract %float %78 1 + %95 = OpExtInst %float %1 FMin %96 %97 + %98 = OpCompositeExtract %float %78 2 + %94 = OpExtInst %float %1 FMin %95 %98 + OpStore %_2_mn %94 + %101 = OpExtInst %float %1 FMax %96 %97 + %100 = OpExtInst %float %1 FMax %101 %98 + OpStore %_3_mx %100 + %102 = OpFOrdGreaterThan %bool %100 %94 + OpSelectionMerge %106 None + OpBranchConditional %102 %104 %105 + %104 = OpLabel + %107 = OpCompositeConstruct %v3float %94 %94 %94 + %108 = OpFSub %v3float %78 %107 + OpStore %109 %87 + %110 = OpFunctionCall %float %blend_color_saturation_Qhh3 %109 + %111 = OpVectorTimesScalar %v3float %108 %110 + %112 = OpFSub %float %100 %94 + %114 = OpFDiv %float %float_1 %112 + %115 = OpVectorTimesScalar %v3float %111 %114 + OpStore %103 %115 + OpBranch %106 + %105 = OpLabel + OpStore %103 %116 + OpBranch %106 + %106 = OpLabel + %117 = OpLoad %v3float %103 + OpStore %l %117 + OpStore %r %69 + OpBranch %92 + %92 = OpLabel + %124 = OpLoad %v3float %r + %119 = OpDot %float %123 %124 + OpStore %_4_lum %119 + %127 = OpLoad %v3float %l + %126 = OpDot %float %123 %127 + %128 = OpFSub %float %119 %126 + %129 = OpLoad %v3float %l + %130 = OpCompositeConstruct %v3float %128 %128 %128 + %131 = OpFAdd %v3float %130 %129 + OpStore %_5_result %131 + %135 = OpCompositeExtract %float %131 0 + %136 = OpCompositeExtract %float %131 1 + %134 = OpExtInst %float %1 FMin %135 %136 + %137 = OpCompositeExtract %float %131 2 + %133 = OpExtInst %float %1 FMin %134 %137 + OpStore %_6_minComp %133 + %140 = OpExtInst %float %1 FMax %135 %136 + %139 = OpExtInst %float %1 FMax %140 %137 + OpStore %_7_maxComp %139 + %141 = OpFOrdLessThan %bool %133 %float_0 + OpSelectionMerge %143 None + OpBranchConditional %141 %142 %143 + %142 = OpLabel + %144 = OpFUnordNotEqual %bool %119 %133 + OpBranch %143 + %143 = OpLabel + %145 = OpPhi %bool %false %92 %144 %142 + OpSelectionMerge %147 None + OpBranchConditional %145 %146 %147 + %146 = OpLabel + %148 = OpCompositeConstruct %v3float %119 %119 %119 + %149 = OpFSub %v3float %131 %148 + %150 = OpFSub %float %119 %133 + %151 = OpLoad %float %_kGuardedDivideEpsilon + %152 = OpFAdd %float %150 %151 + %153 = OpFDiv %float %119 %152 + %154 = OpVectorTimesScalar %v3float %149 %153 + %155 = OpFAdd %v3float %148 %154 + OpStore %_5_result %155 + OpBranch %147 + %147 = OpLabel + %156 = OpFOrdGreaterThan %bool %139 %57 + OpSelectionMerge %158 None + OpBranchConditional %156 %157 %158 + %157 = OpLabel + %159 = OpFUnordNotEqual %bool %139 %119 + OpBranch %158 + %158 = OpLabel + %160 = OpPhi %bool %false %147 %159 %157 + OpSelectionMerge %162 None + OpBranchConditional %160 %161 %162 + %161 = OpLabel + %163 = OpLoad %v3float %_5_result + %164 = OpCompositeConstruct %v3float %119 %119 %119 + %165 = OpFSub %v3float %163 %164 + %166 = OpFSub %float %57 %119 + %167 = OpVectorTimesScalar %v3float %165 %166 + %168 = OpFSub %float %139 %119 + %169 = OpLoad %float %_kGuardedDivideEpsilon + %170 = OpFAdd %float %168 %169 + %171 = OpFDiv %float %float_1 %170 + %172 = OpVectorTimesScalar %v3float %167 %171 + %173 = OpFAdd %v3float %164 %172 + OpStore %_5_result %173 + OpBranch %162 + %162 = OpLabel + %174 = OpLoad %v3float %_5_result + %175 = OpLoad %v4float %49 + %176 = OpVectorShuffle %v3float %175 %175 0 1 2 + %177 = OpFAdd %v3float %174 %176 + %178 = OpFSub %v3float %177 %69 + %179 = OpLoad %v4float %48 + %180 = OpVectorShuffle %v3float %179 %179 0 1 2 + %181 = OpFAdd %v3float %178 %180 + %182 = OpFSub %v3float %181 %63 + %183 = OpCompositeExtract %float %182 0 + %184 = OpCompositeExtract %float %182 1 + %185 = OpCompositeExtract %float %182 2 + %186 = OpLoad %v4float %48 + %187 = OpCompositeExtract %float %186 3 + %188 = OpLoad %v4float %49 + %189 = OpCompositeExtract %float %188 3 + %190 = OpFAdd %float %187 %189 + %191 = OpFSub %float %190 %57 + %192 = OpCompositeConstruct %v4float %183 %184 %185 %191 + OpReturnValue %192 + OpFunctionEnd + %main = OpFunction %void None %194 + %195 = OpLabel + %197 = OpVariable %_ptr_Function_v2float Function + %203 = OpVariable %_ptr_Function_v4float Function + %207 = OpVariable %_ptr_Function_v4float Function + %10 = OpSelect %float %false %float_9_99999994en09 %float_0 + OpStore %_kGuardedDivideEpsilon %10 + OpStore %197 %196 + %198 = OpAccessChain %_ptr_Uniform_v4float %18 %int_0 + %202 = OpLoad %v4float %198 + OpStore %203 %202 + %204 = OpAccessChain %_ptr_Uniform_v4float %18 %int_1 + %206 = OpLoad %v4float %204 + OpStore %207 %206 + %208 = OpFunctionCall %v4float %blend_hslc_h4h2h4h4 %197 %203 %207 + OpStore %sk_FragColor %208 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/blend/BlendColor.wgsl b/tests/sksl/blend/BlendColor.wgsl index 4494995a13e0..4a5a6ce01ae1 100644 --- a/tests/sksl/blend/BlendColor.wgsl +++ b/tests/sksl/blend/BlendColor.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; @@ -30,7 +31,7 @@ fn blend_hslc_h4h2h4h4(_skParam0: vec2, _skParam1: vec4, _skParam2: ve var dsa: vec3 = dst.xyz * src.w; var l: vec3 = select(sda, dsa, vec3(bool(flipSat.x))); var r: vec3 = select(dsa, sda, vec3(bool(flipSat.x))); - if (bool(flipSat.y)) { + if bool(flipSat.y) { { let _skTemp4 = min(l.x, l.y); let _skTemp5 = min(_skTemp4, l.z); @@ -53,12 +54,12 @@ fn blend_hslc_h4h2h4h4(_skParam0: vec2, _skParam1: vec4, _skParam2: ve let _skTemp13 = max(_5_result.x, _5_result.y); let _skTemp14 = max(_skTemp13, _5_result.z); var _7_maxComp: f32 = _skTemp14; - if (_6_minComp < 0.0 && _4_lum != _6_minComp) { + if (_6_minComp < 0.0) && (_4_lum != _6_minComp) { { _5_result = _4_lum + (_5_result - _4_lum) * (_4_lum / ((_4_lum - _6_minComp) + sk_PrivkGuardedDivideEpsilon)); } } - if (_7_maxComp > alpha && _7_maxComp != _4_lum) { + if (_7_maxComp > alpha) && (_7_maxComp != _4_lum) { { _5_result = _4_lum + ((_5_result - _4_lum) * (alpha - _4_lum)) / ((_7_maxComp - _4_lum) + sk_PrivkGuardedDivideEpsilon); } diff --git a/tests/sksl/blend/BlendColorBurn.asm.frag b/tests/sksl/blend/BlendColorBurn.asm.frag index 36901bb410d2..82cac886392e 100644 --- a/tests/sksl/blend/BlendColorBurn.asm.frag +++ b/tests/sksl/blend/BlendColorBurn.asm.frag @@ -1,281 +1,281 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %_kGuardedDivideEpsilon "$kGuardedDivideEpsilon" -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "src" -OpMemberName %_UniformBuffer 1 "dst" -OpName %color_burn_component_Qhh2h2 "color_burn_component_Qhh2h2" -OpName %delta "delta" -OpName %main "main" -OpDecorate %_kGuardedDivideEpsilon RelaxedPrecision -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %17 Binding 0 -OpDecorate %17 DescriptorSet 0 -OpDecorate %26 RelaxedPrecision -OpDecorate %27 RelaxedPrecision -OpDecorate %28 RelaxedPrecision -OpDecorate %29 RelaxedPrecision -OpDecorate %34 RelaxedPrecision -OpDecorate %35 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %39 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %45 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %48 RelaxedPrecision -OpDecorate %49 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %51 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %53 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %55 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %62 RelaxedPrecision -OpDecorate %63 RelaxedPrecision -OpDecorate %64 RelaxedPrecision -OpDecorate %65 RelaxedPrecision -OpDecorate %delta RelaxedPrecision -OpDecorate %69 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -OpDecorate %71 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %73 RelaxedPrecision -OpDecorate %74 RelaxedPrecision -OpDecorate %75 RelaxedPrecision -OpDecorate %76 RelaxedPrecision -OpDecorate %77 RelaxedPrecision -OpDecorate %78 RelaxedPrecision -OpDecorate %79 RelaxedPrecision -OpDecorate %80 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %82 RelaxedPrecision -OpDecorate %83 RelaxedPrecision -OpDecorate %84 RelaxedPrecision -OpDecorate %85 RelaxedPrecision -OpDecorate %86 RelaxedPrecision -OpDecorate %87 RelaxedPrecision -OpDecorate %88 RelaxedPrecision -OpDecorate %89 RelaxedPrecision -OpDecorate %90 RelaxedPrecision -OpDecorate %91 RelaxedPrecision -OpDecorate %92 RelaxedPrecision -OpDecorate %93 RelaxedPrecision -OpDecorate %94 RelaxedPrecision -OpDecorate %95 RelaxedPrecision -OpDecorate %96 RelaxedPrecision -OpDecorate %97 RelaxedPrecision -OpDecorate %98 RelaxedPrecision -OpDecorate %99 RelaxedPrecision -OpDecorate %100 RelaxedPrecision -OpDecorate %101 RelaxedPrecision -OpDecorate %109 RelaxedPrecision -OpDecorate %110 RelaxedPrecision -OpDecorate %114 RelaxedPrecision -OpDecorate %115 RelaxedPrecision -OpDecorate %119 RelaxedPrecision -OpDecorate %120 RelaxedPrecision -OpDecorate %123 RelaxedPrecision -OpDecorate %124 RelaxedPrecision -OpDecorate %128 RelaxedPrecision -OpDecorate %129 RelaxedPrecision -OpDecorate %132 RelaxedPrecision -OpDecorate %133 RelaxedPrecision -OpDecorate %137 RelaxedPrecision -OpDecorate %138 RelaxedPrecision -OpDecorate %140 RelaxedPrecision -OpDecorate %141 RelaxedPrecision -OpDecorate %142 RelaxedPrecision -OpDecorate %144 RelaxedPrecision -OpDecorate %145 RelaxedPrecision -OpDecorate %146 RelaxedPrecision -OpDecorate %147 RelaxedPrecision -OpDecorate %148 RelaxedPrecision -%float = OpTypeFloat 32 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %_kGuardedDivideEpsilon "$kGuardedDivideEpsilon" + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "src" + OpMemberName %_UniformBuffer 1 "dst" + OpName %color_burn_component_Qhh2h2 "color_burn_component_Qhh2h2" + OpName %delta "delta" + OpName %main "main" + OpDecorate %_kGuardedDivideEpsilon RelaxedPrecision + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %17 Binding 0 + OpDecorate %17 DescriptorSet 0 + OpDecorate %26 RelaxedPrecision + OpDecorate %27 RelaxedPrecision + OpDecorate %28 RelaxedPrecision + OpDecorate %29 RelaxedPrecision + OpDecorate %34 RelaxedPrecision + OpDecorate %35 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %45 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %48 RelaxedPrecision + OpDecorate %49 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %53 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %55 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %62 RelaxedPrecision + OpDecorate %63 RelaxedPrecision + OpDecorate %64 RelaxedPrecision + OpDecorate %65 RelaxedPrecision + OpDecorate %delta RelaxedPrecision + OpDecorate %69 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %71 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %73 RelaxedPrecision + OpDecorate %74 RelaxedPrecision + OpDecorate %75 RelaxedPrecision + OpDecorate %76 RelaxedPrecision + OpDecorate %77 RelaxedPrecision + OpDecorate %78 RelaxedPrecision + OpDecorate %79 RelaxedPrecision + OpDecorate %80 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %82 RelaxedPrecision + OpDecorate %83 RelaxedPrecision + OpDecorate %84 RelaxedPrecision + OpDecorate %85 RelaxedPrecision + OpDecorate %86 RelaxedPrecision + OpDecorate %87 RelaxedPrecision + OpDecorate %88 RelaxedPrecision + OpDecorate %89 RelaxedPrecision + OpDecorate %90 RelaxedPrecision + OpDecorate %91 RelaxedPrecision + OpDecorate %92 RelaxedPrecision + OpDecorate %93 RelaxedPrecision + OpDecorate %94 RelaxedPrecision + OpDecorate %95 RelaxedPrecision + OpDecorate %96 RelaxedPrecision + OpDecorate %97 RelaxedPrecision + OpDecorate %98 RelaxedPrecision + OpDecorate %99 RelaxedPrecision + OpDecorate %100 RelaxedPrecision + OpDecorate %101 RelaxedPrecision + OpDecorate %109 RelaxedPrecision + OpDecorate %110 RelaxedPrecision + OpDecorate %114 RelaxedPrecision + OpDecorate %115 RelaxedPrecision + OpDecorate %119 RelaxedPrecision + OpDecorate %120 RelaxedPrecision + OpDecorate %123 RelaxedPrecision + OpDecorate %124 RelaxedPrecision + OpDecorate %128 RelaxedPrecision + OpDecorate %129 RelaxedPrecision + OpDecorate %132 RelaxedPrecision + OpDecorate %133 RelaxedPrecision + OpDecorate %137 RelaxedPrecision + OpDecorate %138 RelaxedPrecision + OpDecorate %140 RelaxedPrecision + OpDecorate %141 RelaxedPrecision + OpDecorate %142 RelaxedPrecision + OpDecorate %144 RelaxedPrecision + OpDecorate %145 RelaxedPrecision + OpDecorate %146 RelaxedPrecision + OpDecorate %147 RelaxedPrecision + OpDecorate %148 RelaxedPrecision + %float = OpTypeFloat 32 %_ptr_Private_float = OpTypePointer Private %float %_kGuardedDivideEpsilon = OpVariable %_ptr_Private_float Private -%bool = OpTypeBool -%false = OpConstantFalse %bool + %bool = OpTypeBool + %false = OpConstantFalse %bool %float_9_99999994en09 = OpConstant %float 9.99999994e-09 -%float_0 = OpConstant %float 0 + %float_0 = OpConstant %float 0 %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%v4float = OpTypeVector %float 4 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%17 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%v2float = OpTypeVector %float 2 + %17 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %v2float = OpTypeVector %float 2 %_ptr_Function_v2float = OpTypePointer Function %v2float -%22 = OpTypeFunction %float %_ptr_Function_v2float %_ptr_Function_v2float -%float_1 = OpConstant %float 1 + %22 = OpTypeFunction %float %_ptr_Function_v2float %_ptr_Function_v2float + %float_1 = OpConstant %float 1 %_ptr_Function_float = OpTypePointer Function %float -%void = OpTypeVoid -%103 = OpTypeFunction %void + %void = OpTypeVoid + %103 = OpTypeFunction %void %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 %color_burn_component_Qhh2h2 = OpFunction %float None %22 -%23 = OpFunctionParameter %_ptr_Function_v2float -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%delta = OpVariable %_ptr_Function_float Function -%26 = OpLoad %v2float %24 -%27 = OpCompositeExtract %float %26 1 -%28 = OpLoad %v2float %24 -%29 = OpCompositeExtract %float %28 0 -%30 = OpFOrdEqual %bool %27 %29 -OpSelectionMerge %33 None -OpBranchConditional %30 %31 %32 -%31 = OpLabel -%34 = OpLoad %v2float %23 -%35 = OpCompositeExtract %float %34 1 -%36 = OpLoad %v2float %24 -%37 = OpCompositeExtract %float %36 1 -%38 = OpFMul %float %35 %37 -%39 = OpLoad %v2float %23 -%40 = OpCompositeExtract %float %39 0 -%42 = OpLoad %v2float %24 -%43 = OpCompositeExtract %float %42 1 -%44 = OpFSub %float %float_1 %43 -%45 = OpFMul %float %40 %44 -%46 = OpFAdd %float %38 %45 -%47 = OpLoad %v2float %24 -%48 = OpCompositeExtract %float %47 0 -%49 = OpLoad %v2float %23 -%50 = OpCompositeExtract %float %49 1 -%51 = OpFSub %float %float_1 %50 -%52 = OpFMul %float %48 %51 -%53 = OpFAdd %float %46 %52 -OpReturnValue %53 -%32 = OpLabel -%54 = OpLoad %v2float %23 -%55 = OpCompositeExtract %float %54 0 -%56 = OpFOrdEqual %bool %55 %float_0 -OpSelectionMerge %59 None -OpBranchConditional %56 %57 %58 -%57 = OpLabel -%60 = OpLoad %v2float %24 -%61 = OpCompositeExtract %float %60 0 -%62 = OpLoad %v2float %23 -%63 = OpCompositeExtract %float %62 1 -%64 = OpFSub %float %float_1 %63 -%65 = OpFMul %float %61 %64 -OpReturnValue %65 -%58 = OpLabel -%69 = OpLoad %v2float %24 -%70 = OpCompositeExtract %float %69 1 -%71 = OpLoad %v2float %24 -%72 = OpCompositeExtract %float %71 1 -%73 = OpLoad %v2float %24 -%74 = OpCompositeExtract %float %73 0 -%75 = OpFSub %float %72 %74 -%76 = OpLoad %v2float %23 -%77 = OpCompositeExtract %float %76 1 -%78 = OpFMul %float %75 %77 -%79 = OpLoad %v2float %23 -%80 = OpCompositeExtract %float %79 0 -%81 = OpLoad %float %_kGuardedDivideEpsilon -%82 = OpFAdd %float %80 %81 -%83 = OpFDiv %float %78 %82 -%84 = OpFSub %float %70 %83 -%68 = OpExtInst %float %1 FMax %float_0 %84 -OpStore %delta %68 -%85 = OpLoad %v2float %23 -%86 = OpCompositeExtract %float %85 1 -%87 = OpFMul %float %68 %86 -%88 = OpLoad %v2float %23 -%89 = OpCompositeExtract %float %88 0 -%90 = OpLoad %v2float %24 -%91 = OpCompositeExtract %float %90 1 -%92 = OpFSub %float %float_1 %91 -%93 = OpFMul %float %89 %92 -%94 = OpFAdd %float %87 %93 -%95 = OpLoad %v2float %24 -%96 = OpCompositeExtract %float %95 0 -%97 = OpLoad %v2float %23 -%98 = OpCompositeExtract %float %97 1 -%99 = OpFSub %float %float_1 %98 -%100 = OpFMul %float %96 %99 -%101 = OpFAdd %float %94 %100 -OpReturnValue %101 -%59 = OpLabel -OpBranch %33 -%33 = OpLabel -OpUnreachable -OpFunctionEnd -%main = OpFunction %void None %103 -%104 = OpLabel -%111 = OpVariable %_ptr_Function_v2float Function -%116 = OpVariable %_ptr_Function_v2float Function -%121 = OpVariable %_ptr_Function_v2float Function -%125 = OpVariable %_ptr_Function_v2float Function -%130 = OpVariable %_ptr_Function_v2float Function -%134 = OpVariable %_ptr_Function_v2float Function -%9 = OpSelect %float %false %float_9_99999994en09 %float_0 -OpStore %_kGuardedDivideEpsilon %9 -%105 = OpAccessChain %_ptr_Uniform_v4float %17 %int_0 -%109 = OpLoad %v4float %105 -%110 = OpVectorShuffle %v2float %109 %109 0 3 -OpStore %111 %110 -%112 = OpAccessChain %_ptr_Uniform_v4float %17 %int_1 -%114 = OpLoad %v4float %112 -%115 = OpVectorShuffle %v2float %114 %114 0 3 -OpStore %116 %115 -%117 = OpFunctionCall %float %color_burn_component_Qhh2h2 %111 %116 -%118 = OpAccessChain %_ptr_Uniform_v4float %17 %int_0 -%119 = OpLoad %v4float %118 -%120 = OpVectorShuffle %v2float %119 %119 1 3 -OpStore %121 %120 -%122 = OpAccessChain %_ptr_Uniform_v4float %17 %int_1 -%123 = OpLoad %v4float %122 -%124 = OpVectorShuffle %v2float %123 %123 1 3 -OpStore %125 %124 -%126 = OpFunctionCall %float %color_burn_component_Qhh2h2 %121 %125 -%127 = OpAccessChain %_ptr_Uniform_v4float %17 %int_0 -%128 = OpLoad %v4float %127 -%129 = OpVectorShuffle %v2float %128 %128 2 3 -OpStore %130 %129 -%131 = OpAccessChain %_ptr_Uniform_v4float %17 %int_1 -%132 = OpLoad %v4float %131 -%133 = OpVectorShuffle %v2float %132 %132 2 3 -OpStore %134 %133 -%135 = OpFunctionCall %float %color_burn_component_Qhh2h2 %130 %134 -%136 = OpAccessChain %_ptr_Uniform_v4float %17 %int_0 -%137 = OpLoad %v4float %136 -%138 = OpCompositeExtract %float %137 3 -%139 = OpAccessChain %_ptr_Uniform_v4float %17 %int_0 -%140 = OpLoad %v4float %139 -%141 = OpCompositeExtract %float %140 3 -%142 = OpFSub %float %float_1 %141 -%143 = OpAccessChain %_ptr_Uniform_v4float %17 %int_1 -%144 = OpLoad %v4float %143 -%145 = OpCompositeExtract %float %144 3 -%146 = OpFMul %float %142 %145 -%147 = OpFAdd %float %138 %146 -%148 = OpCompositeConstruct %v4float %117 %126 %135 %147 -OpStore %sk_FragColor %148 -OpReturn -OpFunctionEnd + %23 = OpFunctionParameter %_ptr_Function_v2float + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %delta = OpVariable %_ptr_Function_float Function + %26 = OpLoad %v2float %24 + %27 = OpCompositeExtract %float %26 1 + %28 = OpLoad %v2float %24 + %29 = OpCompositeExtract %float %28 0 + %30 = OpFOrdEqual %bool %27 %29 + OpSelectionMerge %33 None + OpBranchConditional %30 %31 %32 + %31 = OpLabel + %34 = OpLoad %v2float %23 + %35 = OpCompositeExtract %float %34 1 + %36 = OpLoad %v2float %24 + %37 = OpCompositeExtract %float %36 1 + %38 = OpFMul %float %35 %37 + %39 = OpLoad %v2float %23 + %40 = OpCompositeExtract %float %39 0 + %42 = OpLoad %v2float %24 + %43 = OpCompositeExtract %float %42 1 + %44 = OpFSub %float %float_1 %43 + %45 = OpFMul %float %40 %44 + %46 = OpFAdd %float %38 %45 + %47 = OpLoad %v2float %24 + %48 = OpCompositeExtract %float %47 0 + %49 = OpLoad %v2float %23 + %50 = OpCompositeExtract %float %49 1 + %51 = OpFSub %float %float_1 %50 + %52 = OpFMul %float %48 %51 + %53 = OpFAdd %float %46 %52 + OpReturnValue %53 + %32 = OpLabel + %54 = OpLoad %v2float %23 + %55 = OpCompositeExtract %float %54 0 + %56 = OpFOrdEqual %bool %55 %float_0 + OpSelectionMerge %59 None + OpBranchConditional %56 %57 %58 + %57 = OpLabel + %60 = OpLoad %v2float %24 + %61 = OpCompositeExtract %float %60 0 + %62 = OpLoad %v2float %23 + %63 = OpCompositeExtract %float %62 1 + %64 = OpFSub %float %float_1 %63 + %65 = OpFMul %float %61 %64 + OpReturnValue %65 + %58 = OpLabel + %69 = OpLoad %v2float %24 + %70 = OpCompositeExtract %float %69 1 + %71 = OpLoad %v2float %24 + %72 = OpCompositeExtract %float %71 1 + %73 = OpLoad %v2float %24 + %74 = OpCompositeExtract %float %73 0 + %75 = OpFSub %float %72 %74 + %76 = OpLoad %v2float %23 + %77 = OpCompositeExtract %float %76 1 + %78 = OpFMul %float %75 %77 + %79 = OpLoad %v2float %23 + %80 = OpCompositeExtract %float %79 0 + %81 = OpLoad %float %_kGuardedDivideEpsilon + %82 = OpFAdd %float %80 %81 + %83 = OpFDiv %float %78 %82 + %84 = OpFSub %float %70 %83 + %68 = OpExtInst %float %1 FMax %float_0 %84 + OpStore %delta %68 + %85 = OpLoad %v2float %23 + %86 = OpCompositeExtract %float %85 1 + %87 = OpFMul %float %68 %86 + %88 = OpLoad %v2float %23 + %89 = OpCompositeExtract %float %88 0 + %90 = OpLoad %v2float %24 + %91 = OpCompositeExtract %float %90 1 + %92 = OpFSub %float %float_1 %91 + %93 = OpFMul %float %89 %92 + %94 = OpFAdd %float %87 %93 + %95 = OpLoad %v2float %24 + %96 = OpCompositeExtract %float %95 0 + %97 = OpLoad %v2float %23 + %98 = OpCompositeExtract %float %97 1 + %99 = OpFSub %float %float_1 %98 + %100 = OpFMul %float %96 %99 + %101 = OpFAdd %float %94 %100 + OpReturnValue %101 + %59 = OpLabel + OpBranch %33 + %33 = OpLabel + OpUnreachable + OpFunctionEnd + %main = OpFunction %void None %103 + %104 = OpLabel + %111 = OpVariable %_ptr_Function_v2float Function + %116 = OpVariable %_ptr_Function_v2float Function + %121 = OpVariable %_ptr_Function_v2float Function + %125 = OpVariable %_ptr_Function_v2float Function + %130 = OpVariable %_ptr_Function_v2float Function + %134 = OpVariable %_ptr_Function_v2float Function + %9 = OpSelect %float %false %float_9_99999994en09 %float_0 + OpStore %_kGuardedDivideEpsilon %9 + %105 = OpAccessChain %_ptr_Uniform_v4float %17 %int_0 + %109 = OpLoad %v4float %105 + %110 = OpVectorShuffle %v2float %109 %109 0 3 + OpStore %111 %110 + %112 = OpAccessChain %_ptr_Uniform_v4float %17 %int_1 + %114 = OpLoad %v4float %112 + %115 = OpVectorShuffle %v2float %114 %114 0 3 + OpStore %116 %115 + %117 = OpFunctionCall %float %color_burn_component_Qhh2h2 %111 %116 + %118 = OpAccessChain %_ptr_Uniform_v4float %17 %int_0 + %119 = OpLoad %v4float %118 + %120 = OpVectorShuffle %v2float %119 %119 1 3 + OpStore %121 %120 + %122 = OpAccessChain %_ptr_Uniform_v4float %17 %int_1 + %123 = OpLoad %v4float %122 + %124 = OpVectorShuffle %v2float %123 %123 1 3 + OpStore %125 %124 + %126 = OpFunctionCall %float %color_burn_component_Qhh2h2 %121 %125 + %127 = OpAccessChain %_ptr_Uniform_v4float %17 %int_0 + %128 = OpLoad %v4float %127 + %129 = OpVectorShuffle %v2float %128 %128 2 3 + OpStore %130 %129 + %131 = OpAccessChain %_ptr_Uniform_v4float %17 %int_1 + %132 = OpLoad %v4float %131 + %133 = OpVectorShuffle %v2float %132 %132 2 3 + OpStore %134 %133 + %135 = OpFunctionCall %float %color_burn_component_Qhh2h2 %130 %134 + %136 = OpAccessChain %_ptr_Uniform_v4float %17 %int_0 + %137 = OpLoad %v4float %136 + %138 = OpCompositeExtract %float %137 3 + %139 = OpAccessChain %_ptr_Uniform_v4float %17 %int_0 + %140 = OpLoad %v4float %139 + %141 = OpCompositeExtract %float %140 3 + %142 = OpFSub %float %float_1 %141 + %143 = OpAccessChain %_ptr_Uniform_v4float %17 %int_1 + %144 = OpLoad %v4float %143 + %145 = OpCompositeExtract %float %144 3 + %146 = OpFMul %float %142 %145 + %147 = OpFAdd %float %138 %146 + %148 = OpCompositeConstruct %v4float %117 %126 %135 %147 + OpStore %sk_FragColor %148 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/blend/BlendColorBurn.wgsl b/tests/sksl/blend/BlendColorBurn.wgsl index e78b78570627..c7006e3b847f 100644 --- a/tests/sksl/blend/BlendColorBurn.wgsl +++ b/tests/sksl/blend/BlendColorBurn.wgsl @@ -1,11 +1,12 @@ /* -:35:3 warning: code is unreachable +:36:3 warning: code is unreachable return f32(); ^^^^^^ */ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; @@ -22,12 +23,12 @@ fn color_burn_component_Qhh2h2(_skParam0: vec2, _skParam1: vec2) -> f3 let s = _skParam0; let d = _skParam1; { - if (d.y == d.x) { + if d.y == d.x { { return (s.y * d.y + s.x * (1.0 - d.y)) + d.x * (1.0 - s.y); } } else { - if (s.x == 0.0) { + if s.x == 0.0 { { return d.x * (1.0 - s.y); } diff --git a/tests/sksl/blend/BlendColorDodge.asm.frag b/tests/sksl/blend/BlendColorDodge.asm.frag index cd6e06c694a7..96159b30f949 100644 --- a/tests/sksl/blend/BlendColorDodge.asm.frag +++ b/tests/sksl/blend/BlendColorDodge.asm.frag @@ -1,272 +1,272 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %_kGuardedDivideEpsilon "$kGuardedDivideEpsilon" -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "src" -OpMemberName %_UniformBuffer 1 "dst" -OpName %color_dodge_component_Qhh2h2 "color_dodge_component_Qhh2h2" -OpName %delta "delta" -OpName %main "main" -OpDecorate %_kGuardedDivideEpsilon RelaxedPrecision -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %17 Binding 0 -OpDecorate %17 DescriptorSet 0 -OpDecorate %26 RelaxedPrecision -OpDecorate %27 RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %35 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %delta RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %45 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %51 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %53 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %55 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %58 RelaxedPrecision -OpDecorate %59 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %62 RelaxedPrecision -OpDecorate %63 RelaxedPrecision -OpDecorate %64 RelaxedPrecision -OpDecorate %65 RelaxedPrecision -OpDecorate %66 RelaxedPrecision -OpDecorate %67 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -OpDecorate %71 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %73 RelaxedPrecision -OpDecorate %74 RelaxedPrecision -OpDecorate %75 RelaxedPrecision -OpDecorate %76 RelaxedPrecision -OpDecorate %77 RelaxedPrecision -OpDecorate %78 RelaxedPrecision -OpDecorate %79 RelaxedPrecision -OpDecorate %80 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %82 RelaxedPrecision -OpDecorate %83 RelaxedPrecision -OpDecorate %84 RelaxedPrecision -OpDecorate %85 RelaxedPrecision -OpDecorate %86 RelaxedPrecision -OpDecorate %87 RelaxedPrecision -OpDecorate %88 RelaxedPrecision -OpDecorate %89 RelaxedPrecision -OpDecorate %90 RelaxedPrecision -OpDecorate %91 RelaxedPrecision -OpDecorate %92 RelaxedPrecision -OpDecorate %93 RelaxedPrecision -OpDecorate %94 RelaxedPrecision -OpDecorate %95 RelaxedPrecision -OpDecorate %96 RelaxedPrecision -OpDecorate %104 RelaxedPrecision -OpDecorate %105 RelaxedPrecision -OpDecorate %109 RelaxedPrecision -OpDecorate %110 RelaxedPrecision -OpDecorate %114 RelaxedPrecision -OpDecorate %115 RelaxedPrecision -OpDecorate %118 RelaxedPrecision -OpDecorate %119 RelaxedPrecision -OpDecorate %123 RelaxedPrecision -OpDecorate %124 RelaxedPrecision -OpDecorate %127 RelaxedPrecision -OpDecorate %128 RelaxedPrecision -OpDecorate %132 RelaxedPrecision -OpDecorate %133 RelaxedPrecision -OpDecorate %135 RelaxedPrecision -OpDecorate %136 RelaxedPrecision -OpDecorate %137 RelaxedPrecision -OpDecorate %139 RelaxedPrecision -OpDecorate %140 RelaxedPrecision -OpDecorate %141 RelaxedPrecision -OpDecorate %142 RelaxedPrecision -OpDecorate %143 RelaxedPrecision -%float = OpTypeFloat 32 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %_kGuardedDivideEpsilon "$kGuardedDivideEpsilon" + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "src" + OpMemberName %_UniformBuffer 1 "dst" + OpName %color_dodge_component_Qhh2h2 "color_dodge_component_Qhh2h2" + OpName %delta "delta" + OpName %main "main" + OpDecorate %_kGuardedDivideEpsilon RelaxedPrecision + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %17 Binding 0 + OpDecorate %17 DescriptorSet 0 + OpDecorate %26 RelaxedPrecision + OpDecorate %27 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %35 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %delta RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %45 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %53 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %55 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %58 RelaxedPrecision + OpDecorate %59 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %62 RelaxedPrecision + OpDecorate %63 RelaxedPrecision + OpDecorate %64 RelaxedPrecision + OpDecorate %65 RelaxedPrecision + OpDecorate %66 RelaxedPrecision + OpDecorate %67 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %71 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %73 RelaxedPrecision + OpDecorate %74 RelaxedPrecision + OpDecorate %75 RelaxedPrecision + OpDecorate %76 RelaxedPrecision + OpDecorate %77 RelaxedPrecision + OpDecorate %78 RelaxedPrecision + OpDecorate %79 RelaxedPrecision + OpDecorate %80 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %82 RelaxedPrecision + OpDecorate %83 RelaxedPrecision + OpDecorate %84 RelaxedPrecision + OpDecorate %85 RelaxedPrecision + OpDecorate %86 RelaxedPrecision + OpDecorate %87 RelaxedPrecision + OpDecorate %88 RelaxedPrecision + OpDecorate %89 RelaxedPrecision + OpDecorate %90 RelaxedPrecision + OpDecorate %91 RelaxedPrecision + OpDecorate %92 RelaxedPrecision + OpDecorate %93 RelaxedPrecision + OpDecorate %94 RelaxedPrecision + OpDecorate %95 RelaxedPrecision + OpDecorate %96 RelaxedPrecision + OpDecorate %104 RelaxedPrecision + OpDecorate %105 RelaxedPrecision + OpDecorate %109 RelaxedPrecision + OpDecorate %110 RelaxedPrecision + OpDecorate %114 RelaxedPrecision + OpDecorate %115 RelaxedPrecision + OpDecorate %118 RelaxedPrecision + OpDecorate %119 RelaxedPrecision + OpDecorate %123 RelaxedPrecision + OpDecorate %124 RelaxedPrecision + OpDecorate %127 RelaxedPrecision + OpDecorate %128 RelaxedPrecision + OpDecorate %132 RelaxedPrecision + OpDecorate %133 RelaxedPrecision + OpDecorate %135 RelaxedPrecision + OpDecorate %136 RelaxedPrecision + OpDecorate %137 RelaxedPrecision + OpDecorate %139 RelaxedPrecision + OpDecorate %140 RelaxedPrecision + OpDecorate %141 RelaxedPrecision + OpDecorate %142 RelaxedPrecision + OpDecorate %143 RelaxedPrecision + %float = OpTypeFloat 32 %_ptr_Private_float = OpTypePointer Private %float %_kGuardedDivideEpsilon = OpVariable %_ptr_Private_float Private -%bool = OpTypeBool -%false = OpConstantFalse %bool + %bool = OpTypeBool + %false = OpConstantFalse %bool %float_9_99999994en09 = OpConstant %float 9.99999994e-09 -%float_0 = OpConstant %float 0 + %float_0 = OpConstant %float 0 %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%v4float = OpTypeVector %float 4 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%17 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%v2float = OpTypeVector %float 2 + %17 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %v2float = OpTypeVector %float 2 %_ptr_Function_v2float = OpTypePointer Function %v2float -%22 = OpTypeFunction %float %_ptr_Function_v2float %_ptr_Function_v2float -%float_1 = OpConstant %float 1 + %22 = OpTypeFunction %float %_ptr_Function_v2float %_ptr_Function_v2float + %float_1 = OpConstant %float 1 %_ptr_Function_float = OpTypePointer Function %float -%void = OpTypeVoid -%98 = OpTypeFunction %void + %void = OpTypeVoid + %98 = OpTypeFunction %void %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 %color_dodge_component_Qhh2h2 = OpFunction %float None %22 -%23 = OpFunctionParameter %_ptr_Function_v2float -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%delta = OpVariable %_ptr_Function_float Function -%26 = OpLoad %v2float %24 -%27 = OpCompositeExtract %float %26 0 -%28 = OpFOrdEqual %bool %27 %float_0 -OpSelectionMerge %31 None -OpBranchConditional %28 %29 %30 -%29 = OpLabel -%32 = OpLoad %v2float %23 -%33 = OpCompositeExtract %float %32 0 -%35 = OpLoad %v2float %24 -%36 = OpCompositeExtract %float %35 1 -%37 = OpFSub %float %float_1 %36 -%38 = OpFMul %float %33 %37 -OpReturnValue %38 -%30 = OpLabel -%41 = OpLoad %v2float %23 -%42 = OpCompositeExtract %float %41 1 -%43 = OpLoad %v2float %23 -%44 = OpCompositeExtract %float %43 0 -%45 = OpFSub %float %42 %44 -OpStore %delta %45 -%46 = OpFOrdEqual %bool %45 %float_0 -OpSelectionMerge %49 None -OpBranchConditional %46 %47 %48 -%47 = OpLabel -%50 = OpLoad %v2float %23 -%51 = OpCompositeExtract %float %50 1 -%52 = OpLoad %v2float %24 -%53 = OpCompositeExtract %float %52 1 -%54 = OpFMul %float %51 %53 -%55 = OpLoad %v2float %23 -%56 = OpCompositeExtract %float %55 0 -%57 = OpLoad %v2float %24 -%58 = OpCompositeExtract %float %57 1 -%59 = OpFSub %float %float_1 %58 -%60 = OpFMul %float %56 %59 -%61 = OpFAdd %float %54 %60 -%62 = OpLoad %v2float %24 -%63 = OpCompositeExtract %float %62 0 -%64 = OpLoad %v2float %23 -%65 = OpCompositeExtract %float %64 1 -%66 = OpFSub %float %float_1 %65 -%67 = OpFMul %float %63 %66 -%68 = OpFAdd %float %61 %67 -OpReturnValue %68 -%48 = OpLabel -%70 = OpLoad %v2float %24 -%71 = OpCompositeExtract %float %70 1 -%72 = OpLoad %v2float %24 -%73 = OpCompositeExtract %float %72 0 -%74 = OpLoad %v2float %23 -%75 = OpCompositeExtract %float %74 1 -%76 = OpFMul %float %73 %75 -%77 = OpLoad %float %_kGuardedDivideEpsilon -%78 = OpFAdd %float %45 %77 -%79 = OpFDiv %float %76 %78 -%69 = OpExtInst %float %1 FMin %71 %79 -OpStore %delta %69 -%80 = OpLoad %v2float %23 -%81 = OpCompositeExtract %float %80 1 -%82 = OpFMul %float %69 %81 -%83 = OpLoad %v2float %23 -%84 = OpCompositeExtract %float %83 0 -%85 = OpLoad %v2float %24 -%86 = OpCompositeExtract %float %85 1 -%87 = OpFSub %float %float_1 %86 -%88 = OpFMul %float %84 %87 -%89 = OpFAdd %float %82 %88 -%90 = OpLoad %v2float %24 -%91 = OpCompositeExtract %float %90 0 -%92 = OpLoad %v2float %23 -%93 = OpCompositeExtract %float %92 1 -%94 = OpFSub %float %float_1 %93 -%95 = OpFMul %float %91 %94 -%96 = OpFAdd %float %89 %95 -OpReturnValue %96 -%49 = OpLabel -OpBranch %31 -%31 = OpLabel -OpUnreachable -OpFunctionEnd -%main = OpFunction %void None %98 -%99 = OpLabel -%106 = OpVariable %_ptr_Function_v2float Function -%111 = OpVariable %_ptr_Function_v2float Function -%116 = OpVariable %_ptr_Function_v2float Function -%120 = OpVariable %_ptr_Function_v2float Function -%125 = OpVariable %_ptr_Function_v2float Function -%129 = OpVariable %_ptr_Function_v2float Function -%9 = OpSelect %float %false %float_9_99999994en09 %float_0 -OpStore %_kGuardedDivideEpsilon %9 -%100 = OpAccessChain %_ptr_Uniform_v4float %17 %int_0 -%104 = OpLoad %v4float %100 -%105 = OpVectorShuffle %v2float %104 %104 0 3 -OpStore %106 %105 -%107 = OpAccessChain %_ptr_Uniform_v4float %17 %int_1 -%109 = OpLoad %v4float %107 -%110 = OpVectorShuffle %v2float %109 %109 0 3 -OpStore %111 %110 -%112 = OpFunctionCall %float %color_dodge_component_Qhh2h2 %106 %111 -%113 = OpAccessChain %_ptr_Uniform_v4float %17 %int_0 -%114 = OpLoad %v4float %113 -%115 = OpVectorShuffle %v2float %114 %114 1 3 -OpStore %116 %115 -%117 = OpAccessChain %_ptr_Uniform_v4float %17 %int_1 -%118 = OpLoad %v4float %117 -%119 = OpVectorShuffle %v2float %118 %118 1 3 -OpStore %120 %119 -%121 = OpFunctionCall %float %color_dodge_component_Qhh2h2 %116 %120 -%122 = OpAccessChain %_ptr_Uniform_v4float %17 %int_0 -%123 = OpLoad %v4float %122 -%124 = OpVectorShuffle %v2float %123 %123 2 3 -OpStore %125 %124 -%126 = OpAccessChain %_ptr_Uniform_v4float %17 %int_1 -%127 = OpLoad %v4float %126 -%128 = OpVectorShuffle %v2float %127 %127 2 3 -OpStore %129 %128 -%130 = OpFunctionCall %float %color_dodge_component_Qhh2h2 %125 %129 -%131 = OpAccessChain %_ptr_Uniform_v4float %17 %int_0 -%132 = OpLoad %v4float %131 -%133 = OpCompositeExtract %float %132 3 -%134 = OpAccessChain %_ptr_Uniform_v4float %17 %int_0 -%135 = OpLoad %v4float %134 -%136 = OpCompositeExtract %float %135 3 -%137 = OpFSub %float %float_1 %136 -%138 = OpAccessChain %_ptr_Uniform_v4float %17 %int_1 -%139 = OpLoad %v4float %138 -%140 = OpCompositeExtract %float %139 3 -%141 = OpFMul %float %137 %140 -%142 = OpFAdd %float %133 %141 -%143 = OpCompositeConstruct %v4float %112 %121 %130 %142 -OpStore %sk_FragColor %143 -OpReturn -OpFunctionEnd + %23 = OpFunctionParameter %_ptr_Function_v2float + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %delta = OpVariable %_ptr_Function_float Function + %26 = OpLoad %v2float %24 + %27 = OpCompositeExtract %float %26 0 + %28 = OpFOrdEqual %bool %27 %float_0 + OpSelectionMerge %31 None + OpBranchConditional %28 %29 %30 + %29 = OpLabel + %32 = OpLoad %v2float %23 + %33 = OpCompositeExtract %float %32 0 + %35 = OpLoad %v2float %24 + %36 = OpCompositeExtract %float %35 1 + %37 = OpFSub %float %float_1 %36 + %38 = OpFMul %float %33 %37 + OpReturnValue %38 + %30 = OpLabel + %41 = OpLoad %v2float %23 + %42 = OpCompositeExtract %float %41 1 + %43 = OpLoad %v2float %23 + %44 = OpCompositeExtract %float %43 0 + %45 = OpFSub %float %42 %44 + OpStore %delta %45 + %46 = OpFOrdEqual %bool %45 %float_0 + OpSelectionMerge %49 None + OpBranchConditional %46 %47 %48 + %47 = OpLabel + %50 = OpLoad %v2float %23 + %51 = OpCompositeExtract %float %50 1 + %52 = OpLoad %v2float %24 + %53 = OpCompositeExtract %float %52 1 + %54 = OpFMul %float %51 %53 + %55 = OpLoad %v2float %23 + %56 = OpCompositeExtract %float %55 0 + %57 = OpLoad %v2float %24 + %58 = OpCompositeExtract %float %57 1 + %59 = OpFSub %float %float_1 %58 + %60 = OpFMul %float %56 %59 + %61 = OpFAdd %float %54 %60 + %62 = OpLoad %v2float %24 + %63 = OpCompositeExtract %float %62 0 + %64 = OpLoad %v2float %23 + %65 = OpCompositeExtract %float %64 1 + %66 = OpFSub %float %float_1 %65 + %67 = OpFMul %float %63 %66 + %68 = OpFAdd %float %61 %67 + OpReturnValue %68 + %48 = OpLabel + %70 = OpLoad %v2float %24 + %71 = OpCompositeExtract %float %70 1 + %72 = OpLoad %v2float %24 + %73 = OpCompositeExtract %float %72 0 + %74 = OpLoad %v2float %23 + %75 = OpCompositeExtract %float %74 1 + %76 = OpFMul %float %73 %75 + %77 = OpLoad %float %_kGuardedDivideEpsilon + %78 = OpFAdd %float %45 %77 + %79 = OpFDiv %float %76 %78 + %69 = OpExtInst %float %1 FMin %71 %79 + OpStore %delta %69 + %80 = OpLoad %v2float %23 + %81 = OpCompositeExtract %float %80 1 + %82 = OpFMul %float %69 %81 + %83 = OpLoad %v2float %23 + %84 = OpCompositeExtract %float %83 0 + %85 = OpLoad %v2float %24 + %86 = OpCompositeExtract %float %85 1 + %87 = OpFSub %float %float_1 %86 + %88 = OpFMul %float %84 %87 + %89 = OpFAdd %float %82 %88 + %90 = OpLoad %v2float %24 + %91 = OpCompositeExtract %float %90 0 + %92 = OpLoad %v2float %23 + %93 = OpCompositeExtract %float %92 1 + %94 = OpFSub %float %float_1 %93 + %95 = OpFMul %float %91 %94 + %96 = OpFAdd %float %89 %95 + OpReturnValue %96 + %49 = OpLabel + OpBranch %31 + %31 = OpLabel + OpUnreachable + OpFunctionEnd + %main = OpFunction %void None %98 + %99 = OpLabel + %106 = OpVariable %_ptr_Function_v2float Function + %111 = OpVariable %_ptr_Function_v2float Function + %116 = OpVariable %_ptr_Function_v2float Function + %120 = OpVariable %_ptr_Function_v2float Function + %125 = OpVariable %_ptr_Function_v2float Function + %129 = OpVariable %_ptr_Function_v2float Function + %9 = OpSelect %float %false %float_9_99999994en09 %float_0 + OpStore %_kGuardedDivideEpsilon %9 + %100 = OpAccessChain %_ptr_Uniform_v4float %17 %int_0 + %104 = OpLoad %v4float %100 + %105 = OpVectorShuffle %v2float %104 %104 0 3 + OpStore %106 %105 + %107 = OpAccessChain %_ptr_Uniform_v4float %17 %int_1 + %109 = OpLoad %v4float %107 + %110 = OpVectorShuffle %v2float %109 %109 0 3 + OpStore %111 %110 + %112 = OpFunctionCall %float %color_dodge_component_Qhh2h2 %106 %111 + %113 = OpAccessChain %_ptr_Uniform_v4float %17 %int_0 + %114 = OpLoad %v4float %113 + %115 = OpVectorShuffle %v2float %114 %114 1 3 + OpStore %116 %115 + %117 = OpAccessChain %_ptr_Uniform_v4float %17 %int_1 + %118 = OpLoad %v4float %117 + %119 = OpVectorShuffle %v2float %118 %118 1 3 + OpStore %120 %119 + %121 = OpFunctionCall %float %color_dodge_component_Qhh2h2 %116 %120 + %122 = OpAccessChain %_ptr_Uniform_v4float %17 %int_0 + %123 = OpLoad %v4float %122 + %124 = OpVectorShuffle %v2float %123 %123 2 3 + OpStore %125 %124 + %126 = OpAccessChain %_ptr_Uniform_v4float %17 %int_1 + %127 = OpLoad %v4float %126 + %128 = OpVectorShuffle %v2float %127 %127 2 3 + OpStore %129 %128 + %130 = OpFunctionCall %float %color_dodge_component_Qhh2h2 %125 %129 + %131 = OpAccessChain %_ptr_Uniform_v4float %17 %int_0 + %132 = OpLoad %v4float %131 + %133 = OpCompositeExtract %float %132 3 + %134 = OpAccessChain %_ptr_Uniform_v4float %17 %int_0 + %135 = OpLoad %v4float %134 + %136 = OpCompositeExtract %float %135 3 + %137 = OpFSub %float %float_1 %136 + %138 = OpAccessChain %_ptr_Uniform_v4float %17 %int_1 + %139 = OpLoad %v4float %138 + %140 = OpCompositeExtract %float %139 3 + %141 = OpFMul %float %137 %140 + %142 = OpFAdd %float %133 %141 + %143 = OpCompositeConstruct %v4float %112 %121 %130 %142 + OpStore %sk_FragColor %143 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/blend/BlendColorDodge.wgsl b/tests/sksl/blend/BlendColorDodge.wgsl index 6e0a6bfbb02d..4c8769944ff5 100644 --- a/tests/sksl/blend/BlendColorDodge.wgsl +++ b/tests/sksl/blend/BlendColorDodge.wgsl @@ -1,11 +1,12 @@ /* -:38:3 warning: code is unreachable +:39:3 warning: code is unreachable return f32(); ^^^^^^ */ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; @@ -22,14 +23,14 @@ fn color_dodge_component_Qhh2h2(_skParam0: vec2, _skParam1: vec2) -> f let s = _skParam0; let d = _skParam1; { - if (d.x == 0.0) { + if d.x == 0.0 { { return s.x * (1.0 - d.y); } } else { { var delta: f32 = s.y - s.x; - if (delta == 0.0) { + if delta == 0.0 { { return (s.y * d.y + s.x * (1.0 - d.y)) + d.x * (1.0 - s.y); } diff --git a/tests/sksl/blend/BlendDarken.asm.frag b/tests/sksl/blend/BlendDarken.asm.frag index bafe98b872a6..b19c5c6c0c0a 100644 --- a/tests/sksl/blend/BlendDarken.asm.frag +++ b/tests/sksl/blend/BlendDarken.asm.frag @@ -1,101 +1,101 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "src" -OpMemberName %_UniformBuffer 1 "dst" -OpName %main "main" -OpName %_0_a "_0_a" -OpName %_1_b "_1_b" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %_0_a RelaxedPrecision -OpDecorate %22 RelaxedPrecision -OpDecorate %25 RelaxedPrecision -OpDecorate %26 RelaxedPrecision -OpDecorate %27 RelaxedPrecision -OpDecorate %30 RelaxedPrecision -OpDecorate %31 RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %_1_b RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %39 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %45 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %49 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %51 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "src" + OpMemberName %_UniformBuffer 1 "dst" + OpName %main "main" + OpName %_0_a "_0_a" + OpName %_1_b "_1_b" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %_0_a RelaxedPrecision + OpDecorate %22 RelaxedPrecision + OpDecorate %25 RelaxedPrecision + OpDecorate %26 RelaxedPrecision + OpDecorate %27 RelaxedPrecision + OpDecorate %30 RelaxedPrecision + OpDecorate %31 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %_1_b RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %45 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %49 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%14 = OpTypeFunction %void + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %14 = OpTypeFunction %void %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%float_1 = OpConstant %float 1 -%int_1 = OpConstant %int 1 -%v3float = OpTypeVector %float 3 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %float_1 = OpConstant %float 1 + %int_1 = OpConstant %int 1 + %v3float = OpTypeVector %float 3 %_ptr_Function_v3float = OpTypePointer Function %v3float -%main = OpFunction %void None %14 -%15 = OpLabel -%_0_a = OpVariable %_ptr_Function_v4float Function -%_1_b = OpVariable %_ptr_Function_v3float Function -%18 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%22 = OpLoad %v4float %18 -%24 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%25 = OpLoad %v4float %24 -%26 = OpCompositeExtract %float %25 3 -%27 = OpFSub %float %float_1 %26 -%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%30 = OpLoad %v4float %28 -%31 = OpVectorTimesScalar %v4float %30 %27 -%32 = OpFAdd %v4float %22 %31 -OpStore %_0_a %32 -%36 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%37 = OpLoad %v4float %36 -%38 = OpCompositeExtract %float %37 3 -%39 = OpFSub %float %float_1 %38 -%40 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%41 = OpLoad %v4float %40 -%42 = OpVectorShuffle %v3float %41 %41 0 1 2 -%43 = OpVectorTimesScalar %v3float %42 %39 -%44 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%45 = OpLoad %v4float %44 -%46 = OpVectorShuffle %v3float %45 %45 0 1 2 -%47 = OpFAdd %v3float %43 %46 -OpStore %_1_b %47 -%49 = OpVectorShuffle %v3float %32 %32 0 1 2 -%48 = OpExtInst %v3float %1 FMin %49 %47 -%50 = OpLoad %v4float %_0_a -%51 = OpVectorShuffle %v4float %50 %48 4 5 6 3 -OpStore %_0_a %51 -OpStore %sk_FragColor %51 -OpReturn -OpFunctionEnd + %main = OpFunction %void None %14 + %15 = OpLabel + %_0_a = OpVariable %_ptr_Function_v4float Function + %_1_b = OpVariable %_ptr_Function_v3float Function + %18 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %22 = OpLoad %v4float %18 + %24 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %25 = OpLoad %v4float %24 + %26 = OpCompositeExtract %float %25 3 + %27 = OpFSub %float %float_1 %26 + %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %30 = OpLoad %v4float %28 + %31 = OpVectorTimesScalar %v4float %30 %27 + %32 = OpFAdd %v4float %22 %31 + OpStore %_0_a %32 + %36 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %37 = OpLoad %v4float %36 + %38 = OpCompositeExtract %float %37 3 + %39 = OpFSub %float %float_1 %38 + %40 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %41 = OpLoad %v4float %40 + %42 = OpVectorShuffle %v3float %41 %41 0 1 2 + %43 = OpVectorTimesScalar %v3float %42 %39 + %44 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %45 = OpLoad %v4float %44 + %46 = OpVectorShuffle %v3float %45 %45 0 1 2 + %47 = OpFAdd %v3float %43 %46 + OpStore %_1_b %47 + %49 = OpVectorShuffle %v3float %32 %32 0 1 2 + %48 = OpExtInst %v3float %1 FMin %49 %47 + %50 = OpLoad %v4float %_0_a + %51 = OpVectorShuffle %v4float %50 %48 4 5 6 3 + OpStore %_0_a %51 + OpStore %sk_FragColor %51 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/blend/BlendDarken.wgsl b/tests/sksl/blend/BlendDarken.wgsl index 507de1321e9b..995d7aba5413 100644 --- a/tests/sksl/blend/BlendDarken.wgsl +++ b/tests/sksl/blend/BlendDarken.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/blend/BlendDifference.asm.frag b/tests/sksl/blend/BlendDifference.asm.frag index 8b2df49c3064..e6098f163823 100644 --- a/tests/sksl/blend/BlendDifference.asm.frag +++ b/tests/sksl/blend/BlendDifference.asm.frag @@ -1,116 +1,116 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "src" -OpMemberName %_UniformBuffer 1 "dst" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %20 RelaxedPrecision -OpDecorate %21 RelaxedPrecision -OpDecorate %25 RelaxedPrecision -OpDecorate %26 RelaxedPrecision -OpDecorate %27 RelaxedPrecision -OpDecorate %31 RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %34 RelaxedPrecision -OpDecorate %35 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %39 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %45 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %48 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %51 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %55 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %58 RelaxedPrecision -OpDecorate %59 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %62 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "src" + OpMemberName %_UniformBuffer 1 "dst" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %20 RelaxedPrecision + OpDecorate %21 RelaxedPrecision + OpDecorate %25 RelaxedPrecision + OpDecorate %26 RelaxedPrecision + OpDecorate %27 RelaxedPrecision + OpDecorate %31 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %34 RelaxedPrecision + OpDecorate %35 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %45 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %48 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %55 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %58 RelaxedPrecision + OpDecorate %59 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %62 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%14 = OpTypeFunction %void + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %14 = OpTypeFunction %void %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%v3float = OpTypeVector %float 3 -%int_1 = OpConstant %int 1 -%float_2 = OpConstant %float 2 -%float_1 = OpConstant %float 1 -%main = OpFunction %void None %14 -%15 = OpLabel -%16 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%20 = OpLoad %v4float %16 -%21 = OpVectorShuffle %v3float %20 %20 0 1 2 -%23 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%25 = OpLoad %v4float %23 -%26 = OpVectorShuffle %v3float %25 %25 0 1 2 -%27 = OpFAdd %v3float %21 %26 -%30 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%31 = OpLoad %v4float %30 -%32 = OpVectorShuffle %v3float %31 %31 0 1 2 -%33 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%34 = OpLoad %v4float %33 -%35 = OpCompositeExtract %float %34 3 -%36 = OpVectorTimesScalar %v3float %32 %35 -%37 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%38 = OpLoad %v4float %37 -%39 = OpVectorShuffle %v3float %38 %38 0 1 2 -%40 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%41 = OpLoad %v4float %40 -%42 = OpCompositeExtract %float %41 3 -%43 = OpVectorTimesScalar %v3float %39 %42 -%29 = OpExtInst %v3float %1 FMin %36 %43 -%44 = OpVectorTimesScalar %v3float %29 %float_2 -%45 = OpFSub %v3float %27 %44 -%46 = OpCompositeExtract %float %45 0 -%47 = OpCompositeExtract %float %45 1 -%48 = OpCompositeExtract %float %45 2 -%49 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%50 = OpLoad %v4float %49 -%51 = OpCompositeExtract %float %50 3 -%53 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%54 = OpLoad %v4float %53 -%55 = OpCompositeExtract %float %54 3 -%56 = OpFSub %float %float_1 %55 -%57 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%58 = OpLoad %v4float %57 -%59 = OpCompositeExtract %float %58 3 -%60 = OpFMul %float %56 %59 -%61 = OpFAdd %float %51 %60 -%62 = OpCompositeConstruct %v4float %46 %47 %48 %61 -OpStore %sk_FragColor %62 -OpReturn -OpFunctionEnd + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %v3float = OpTypeVector %float 3 + %int_1 = OpConstant %int 1 + %float_2 = OpConstant %float 2 + %float_1 = OpConstant %float 1 + %main = OpFunction %void None %14 + %15 = OpLabel + %16 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %20 = OpLoad %v4float %16 + %21 = OpVectorShuffle %v3float %20 %20 0 1 2 + %23 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %25 = OpLoad %v4float %23 + %26 = OpVectorShuffle %v3float %25 %25 0 1 2 + %27 = OpFAdd %v3float %21 %26 + %30 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %31 = OpLoad %v4float %30 + %32 = OpVectorShuffle %v3float %31 %31 0 1 2 + %33 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %34 = OpLoad %v4float %33 + %35 = OpCompositeExtract %float %34 3 + %36 = OpVectorTimesScalar %v3float %32 %35 + %37 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %38 = OpLoad %v4float %37 + %39 = OpVectorShuffle %v3float %38 %38 0 1 2 + %40 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %41 = OpLoad %v4float %40 + %42 = OpCompositeExtract %float %41 3 + %43 = OpVectorTimesScalar %v3float %39 %42 + %29 = OpExtInst %v3float %1 FMin %36 %43 + %44 = OpVectorTimesScalar %v3float %29 %float_2 + %45 = OpFSub %v3float %27 %44 + %46 = OpCompositeExtract %float %45 0 + %47 = OpCompositeExtract %float %45 1 + %48 = OpCompositeExtract %float %45 2 + %49 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %50 = OpLoad %v4float %49 + %51 = OpCompositeExtract %float %50 3 + %53 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %54 = OpLoad %v4float %53 + %55 = OpCompositeExtract %float %54 3 + %56 = OpFSub %float %float_1 %55 + %57 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %58 = OpLoad %v4float %57 + %59 = OpCompositeExtract %float %58 3 + %60 = OpFMul %float %56 %59 + %61 = OpFAdd %float %51 %60 + %62 = OpCompositeConstruct %v4float %46 %47 %48 %61 + OpStore %sk_FragColor %62 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/blend/BlendDifference.wgsl b/tests/sksl/blend/BlendDifference.wgsl index 28e2ed702499..f7ef631294bf 100644 --- a/tests/sksl/blend/BlendDifference.wgsl +++ b/tests/sksl/blend/BlendDifference.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/blend/BlendDst.asm.frag b/tests/sksl/blend/BlendDst.asm.frag index e2dd04164a47..ab8c3d214d19 100644 --- a/tests/sksl/blend/BlendDst.asm.frag +++ b/tests/sksl/blend/BlendDst.asm.frag @@ -1,45 +1,45 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "src" -OpMemberName %_UniformBuffer 1 "dst" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %20 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "src" + OpMemberName %_UniformBuffer 1 "dst" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %20 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%14 = OpTypeFunction %void + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %14 = OpTypeFunction %void %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_1 = OpConstant %int 1 -%main = OpFunction %void None %14 -%15 = OpLabel -%16 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%20 = OpLoad %v4float %16 -OpStore %sk_FragColor %20 -OpReturn -OpFunctionEnd + %int = OpTypeInt 32 1 + %int_1 = OpConstant %int 1 + %main = OpFunction %void None %14 + %15 = OpLabel + %16 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %20 = OpLoad %v4float %16 + OpStore %sk_FragColor %20 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/blend/BlendDst.wgsl b/tests/sksl/blend/BlendDst.wgsl index b50b7175ccdd..e58b0a3cca73 100644 --- a/tests/sksl/blend/BlendDst.wgsl +++ b/tests/sksl/blend/BlendDst.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/blend/BlendDstAtop.asm.frag b/tests/sksl/blend/BlendDstAtop.asm.frag index 2e174fd514f2..4c5b15f07791 100644 --- a/tests/sksl/blend/BlendDstAtop.asm.frag +++ b/tests/sksl/blend/BlendDstAtop.asm.frag @@ -1,68 +1,68 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "src" -OpMemberName %_UniformBuffer 1 "dst" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %20 RelaxedPrecision -OpDecorate %21 RelaxedPrecision -OpDecorate %24 RelaxedPrecision -OpDecorate %25 RelaxedPrecision -OpDecorate %28 RelaxedPrecision -OpDecorate %29 RelaxedPrecision -OpDecorate %30 RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %34 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "src" + OpMemberName %_UniformBuffer 1 "dst" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %20 RelaxedPrecision + OpDecorate %21 RelaxedPrecision + OpDecorate %24 RelaxedPrecision + OpDecorate %25 RelaxedPrecision + OpDecorate %28 RelaxedPrecision + OpDecorate %29 RelaxedPrecision + OpDecorate %30 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %34 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%14 = OpTypeFunction %void + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %14 = OpTypeFunction %void %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_1 = OpConstant %int 1 -%int_0 = OpConstant %int 0 -%float_1 = OpConstant %float 1 -%main = OpFunction %void None %14 -%15 = OpLabel -%16 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%20 = OpLoad %v4float %16 -%21 = OpCompositeExtract %float %20 3 -%22 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%24 = OpLoad %v4float %22 -%25 = OpVectorTimesScalar %v4float %24 %21 -%27 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%28 = OpLoad %v4float %27 -%29 = OpCompositeExtract %float %28 3 -%30 = OpFSub %float %float_1 %29 -%31 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%32 = OpLoad %v4float %31 -%33 = OpVectorTimesScalar %v4float %32 %30 -%34 = OpFAdd %v4float %25 %33 -OpStore %sk_FragColor %34 -OpReturn -OpFunctionEnd + %int = OpTypeInt 32 1 + %int_1 = OpConstant %int 1 + %int_0 = OpConstant %int 0 + %float_1 = OpConstant %float 1 + %main = OpFunction %void None %14 + %15 = OpLabel + %16 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %20 = OpLoad %v4float %16 + %21 = OpCompositeExtract %float %20 3 + %22 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %24 = OpLoad %v4float %22 + %25 = OpVectorTimesScalar %v4float %24 %21 + %27 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %28 = OpLoad %v4float %27 + %29 = OpCompositeExtract %float %28 3 + %30 = OpFSub %float %float_1 %29 + %31 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %32 = OpLoad %v4float %31 + %33 = OpVectorTimesScalar %v4float %32 %30 + %34 = OpFAdd %v4float %25 %33 + OpStore %sk_FragColor %34 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/blend/BlendDstAtop.wgsl b/tests/sksl/blend/BlendDstAtop.wgsl index 5cc11f536374..78c131486294 100644 --- a/tests/sksl/blend/BlendDstAtop.wgsl +++ b/tests/sksl/blend/BlendDstAtop.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/blend/BlendDstIn.asm.frag b/tests/sksl/blend/BlendDstIn.asm.frag index 36eb2dba6627..412b663cbe2e 100644 --- a/tests/sksl/blend/BlendDstIn.asm.frag +++ b/tests/sksl/blend/BlendDstIn.asm.frag @@ -1,53 +1,53 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "src" -OpMemberName %_UniformBuffer 1 "dst" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %20 RelaxedPrecision -OpDecorate %23 RelaxedPrecision -OpDecorate %24 RelaxedPrecision -OpDecorate %25 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "src" + OpMemberName %_UniformBuffer 1 "dst" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %20 RelaxedPrecision + OpDecorate %23 RelaxedPrecision + OpDecorate %24 RelaxedPrecision + OpDecorate %25 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%14 = OpTypeFunction %void + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %14 = OpTypeFunction %void %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_1 = OpConstant %int 1 -%int_0 = OpConstant %int 0 -%main = OpFunction %void None %14 -%15 = OpLabel -%16 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%20 = OpLoad %v4float %16 -%21 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%23 = OpLoad %v4float %21 -%24 = OpCompositeExtract %float %23 3 -%25 = OpVectorTimesScalar %v4float %20 %24 -OpStore %sk_FragColor %25 -OpReturn -OpFunctionEnd + %int = OpTypeInt 32 1 + %int_1 = OpConstant %int 1 + %int_0 = OpConstant %int 0 + %main = OpFunction %void None %14 + %15 = OpLabel + %16 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %20 = OpLoad %v4float %16 + %21 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %23 = OpLoad %v4float %21 + %24 = OpCompositeExtract %float %23 3 + %25 = OpVectorTimesScalar %v4float %20 %24 + OpStore %sk_FragColor %25 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/blend/BlendDstIn.wgsl b/tests/sksl/blend/BlendDstIn.wgsl index f0218af5deaf..2b623ec0c95e 100644 --- a/tests/sksl/blend/BlendDstIn.wgsl +++ b/tests/sksl/blend/BlendDstIn.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/blend/BlendDstOut.asm.frag b/tests/sksl/blend/BlendDstOut.asm.frag index a8431fcf9b8b..f48ca59a2af8 100644 --- a/tests/sksl/blend/BlendDstOut.asm.frag +++ b/tests/sksl/blend/BlendDstOut.asm.frag @@ -1,56 +1,56 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "src" -OpMemberName %_UniformBuffer 1 "dst" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %21 RelaxedPrecision -OpDecorate %22 RelaxedPrecision -OpDecorate %23 RelaxedPrecision -OpDecorate %26 RelaxedPrecision -OpDecorate %27 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "src" + OpMemberName %_UniformBuffer 1 "dst" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %21 RelaxedPrecision + OpDecorate %22 RelaxedPrecision + OpDecorate %23 RelaxedPrecision + OpDecorate %26 RelaxedPrecision + OpDecorate %27 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%14 = OpTypeFunction %void -%float_1 = OpConstant %float 1 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %14 = OpTypeFunction %void + %float_1 = OpConstant %float 1 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%main = OpFunction %void None %14 -%15 = OpLabel -%17 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%21 = OpLoad %v4float %17 -%22 = OpCompositeExtract %float %21 3 -%23 = OpFSub %float %float_1 %22 -%24 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%26 = OpLoad %v4float %24 -%27 = OpVectorTimesScalar %v4float %26 %23 -OpStore %sk_FragColor %27 -OpReturn -OpFunctionEnd + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %main = OpFunction %void None %14 + %15 = OpLabel + %17 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %21 = OpLoad %v4float %17 + %22 = OpCompositeExtract %float %21 3 + %23 = OpFSub %float %float_1 %22 + %24 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %26 = OpLoad %v4float %24 + %27 = OpVectorTimesScalar %v4float %26 %23 + OpStore %sk_FragColor %27 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/blend/BlendDstOut.wgsl b/tests/sksl/blend/BlendDstOut.wgsl index 3e5e4f86c27a..2ed3b4064fbc 100644 --- a/tests/sksl/blend/BlendDstOut.wgsl +++ b/tests/sksl/blend/BlendDstOut.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/blend/BlendDstOver.asm.frag b/tests/sksl/blend/BlendDstOver.asm.frag index bf81622e7f9b..d1a90a4a2b9b 100644 --- a/tests/sksl/blend/BlendDstOver.asm.frag +++ b/tests/sksl/blend/BlendDstOver.asm.frag @@ -1,61 +1,61 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "src" -OpMemberName %_UniformBuffer 1 "dst" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %21 RelaxedPrecision -OpDecorate %22 RelaxedPrecision -OpDecorate %23 RelaxedPrecision -OpDecorate %26 RelaxedPrecision -OpDecorate %27 RelaxedPrecision -OpDecorate %29 RelaxedPrecision -OpDecorate %30 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "src" + OpMemberName %_UniformBuffer 1 "dst" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %21 RelaxedPrecision + OpDecorate %22 RelaxedPrecision + OpDecorate %23 RelaxedPrecision + OpDecorate %26 RelaxedPrecision + OpDecorate %27 RelaxedPrecision + OpDecorate %29 RelaxedPrecision + OpDecorate %30 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%14 = OpTypeFunction %void -%float_1 = OpConstant %float 1 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %14 = OpTypeFunction %void + %float_1 = OpConstant %float 1 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_1 = OpConstant %int 1 -%int_0 = OpConstant %int 0 -%main = OpFunction %void None %14 -%15 = OpLabel -%17 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%21 = OpLoad %v4float %17 -%22 = OpCompositeExtract %float %21 3 -%23 = OpFSub %float %float_1 %22 -%24 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%26 = OpLoad %v4float %24 -%27 = OpVectorTimesScalar %v4float %26 %23 -%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%29 = OpLoad %v4float %28 -%30 = OpFAdd %v4float %27 %29 -OpStore %sk_FragColor %30 -OpReturn -OpFunctionEnd + %int = OpTypeInt 32 1 + %int_1 = OpConstant %int 1 + %int_0 = OpConstant %int 0 + %main = OpFunction %void None %14 + %15 = OpLabel + %17 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %21 = OpLoad %v4float %17 + %22 = OpCompositeExtract %float %21 3 + %23 = OpFSub %float %float_1 %22 + %24 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %26 = OpLoad %v4float %24 + %27 = OpVectorTimesScalar %v4float %26 %23 + %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %29 = OpLoad %v4float %28 + %30 = OpFAdd %v4float %27 %29 + OpStore %sk_FragColor %30 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/blend/BlendDstOver.wgsl b/tests/sksl/blend/BlendDstOver.wgsl index bab9f147f8d5..dedfe30dbbc4 100644 --- a/tests/sksl/blend/BlendDstOver.wgsl +++ b/tests/sksl/blend/BlendDstOver.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/blend/BlendExclusion.asm.frag b/tests/sksl/blend/BlendExclusion.asm.frag index 5b892d1b1ba6..a8bc7def7e5c 100644 --- a/tests/sksl/blend/BlendExclusion.asm.frag +++ b/tests/sksl/blend/BlendExclusion.asm.frag @@ -1,103 +1,103 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "src" -OpMemberName %_UniformBuffer 1 "dst" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %20 RelaxedPrecision -OpDecorate %21 RelaxedPrecision -OpDecorate %25 RelaxedPrecision -OpDecorate %26 RelaxedPrecision -OpDecorate %27 RelaxedPrecision -OpDecorate %30 RelaxedPrecision -OpDecorate %31 RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %34 RelaxedPrecision -OpDecorate %35 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %39 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %48 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %51 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %53 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "src" + OpMemberName %_UniformBuffer 1 "dst" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %20 RelaxedPrecision + OpDecorate %21 RelaxedPrecision + OpDecorate %25 RelaxedPrecision + OpDecorate %26 RelaxedPrecision + OpDecorate %27 RelaxedPrecision + OpDecorate %30 RelaxedPrecision + OpDecorate %31 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %34 RelaxedPrecision + OpDecorate %35 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %48 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %53 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%14 = OpTypeFunction %void + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %14 = OpTypeFunction %void %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_1 = OpConstant %int 1 -%v3float = OpTypeVector %float 3 -%int_0 = OpConstant %int 0 -%float_2 = OpConstant %float 2 -%float_1 = OpConstant %float 1 -%main = OpFunction %void None %14 -%15 = OpLabel -%16 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%20 = OpLoad %v4float %16 -%21 = OpVectorShuffle %v3float %20 %20 0 1 2 -%23 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%25 = OpLoad %v4float %23 -%26 = OpVectorShuffle %v3float %25 %25 0 1 2 -%27 = OpFAdd %v3float %21 %26 -%29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%30 = OpLoad %v4float %29 -%31 = OpVectorShuffle %v3float %30 %30 0 1 2 -%32 = OpVectorTimesScalar %v3float %31 %float_2 -%33 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%34 = OpLoad %v4float %33 -%35 = OpVectorShuffle %v3float %34 %34 0 1 2 -%36 = OpFMul %v3float %32 %35 -%37 = OpFSub %v3float %27 %36 -%38 = OpCompositeExtract %float %37 0 -%39 = OpCompositeExtract %float %37 1 -%40 = OpCompositeExtract %float %37 2 -%41 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%42 = OpLoad %v4float %41 -%43 = OpCompositeExtract %float %42 3 -%45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%46 = OpLoad %v4float %45 -%47 = OpCompositeExtract %float %46 3 -%48 = OpFSub %float %float_1 %47 -%49 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%50 = OpLoad %v4float %49 -%51 = OpCompositeExtract %float %50 3 -%52 = OpFMul %float %48 %51 -%53 = OpFAdd %float %43 %52 -%54 = OpCompositeConstruct %v4float %38 %39 %40 %53 -OpStore %sk_FragColor %54 -OpReturn -OpFunctionEnd + %int = OpTypeInt 32 1 + %int_1 = OpConstant %int 1 + %v3float = OpTypeVector %float 3 + %int_0 = OpConstant %int 0 + %float_2 = OpConstant %float 2 + %float_1 = OpConstant %float 1 + %main = OpFunction %void None %14 + %15 = OpLabel + %16 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %20 = OpLoad %v4float %16 + %21 = OpVectorShuffle %v3float %20 %20 0 1 2 + %23 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %25 = OpLoad %v4float %23 + %26 = OpVectorShuffle %v3float %25 %25 0 1 2 + %27 = OpFAdd %v3float %21 %26 + %29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %30 = OpLoad %v4float %29 + %31 = OpVectorShuffle %v3float %30 %30 0 1 2 + %32 = OpVectorTimesScalar %v3float %31 %float_2 + %33 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %34 = OpLoad %v4float %33 + %35 = OpVectorShuffle %v3float %34 %34 0 1 2 + %36 = OpFMul %v3float %32 %35 + %37 = OpFSub %v3float %27 %36 + %38 = OpCompositeExtract %float %37 0 + %39 = OpCompositeExtract %float %37 1 + %40 = OpCompositeExtract %float %37 2 + %41 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %42 = OpLoad %v4float %41 + %43 = OpCompositeExtract %float %42 3 + %45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %46 = OpLoad %v4float %45 + %47 = OpCompositeExtract %float %46 3 + %48 = OpFSub %float %float_1 %47 + %49 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %50 = OpLoad %v4float %49 + %51 = OpCompositeExtract %float %50 3 + %52 = OpFMul %float %48 %51 + %53 = OpFAdd %float %43 %52 + %54 = OpCompositeConstruct %v4float %38 %39 %40 %53 + OpStore %sk_FragColor %54 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/blend/BlendExclusion.wgsl b/tests/sksl/blend/BlendExclusion.wgsl index dbc39049d336..7724419e1fd6 100644 --- a/tests/sksl/blend/BlendExclusion.wgsl +++ b/tests/sksl/blend/BlendExclusion.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/blend/BlendHardLight.asm.frag b/tests/sksl/blend/BlendHardLight.asm.frag index a61f9ca8e57a..92e7e617c993 100644 --- a/tests/sksl/blend/BlendHardLight.asm.frag +++ b/tests/sksl/blend/BlendHardLight.asm.frag @@ -1,248 +1,248 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "src" -OpMemberName %_UniformBuffer 1 "dst" -OpName %blend_overlay_component_Qhh2h2 "blend_overlay_component_Qhh2h2" -OpName %blend_overlay_h4h4h4 "blend_overlay_h4h4h4" -OpName %result "result" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %12 Binding 0 -OpDecorate %12 DescriptorSet 0 -OpDecorate %22 RelaxedPrecision -OpDecorate %23 RelaxedPrecision -OpDecorate %24 RelaxedPrecision -OpDecorate %25 RelaxedPrecision -OpDecorate %26 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %34 RelaxedPrecision -OpDecorate %35 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %39 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %45 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %48 RelaxedPrecision -OpDecorate %49 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %51 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %53 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %55 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %result RelaxedPrecision -OpDecorate %64 RelaxedPrecision -OpDecorate %65 RelaxedPrecision -OpDecorate %67 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %71 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %74 RelaxedPrecision -OpDecorate %75 RelaxedPrecision -OpDecorate %78 RelaxedPrecision -OpDecorate %79 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %82 RelaxedPrecision -OpDecorate %85 RelaxedPrecision -OpDecorate %86 RelaxedPrecision -OpDecorate %88 RelaxedPrecision -OpDecorate %89 RelaxedPrecision -OpDecorate %90 RelaxedPrecision -OpDecorate %91 RelaxedPrecision -OpDecorate %92 RelaxedPrecision -OpDecorate %93 RelaxedPrecision -OpDecorate %94 RelaxedPrecision -OpDecorate %95 RelaxedPrecision -OpDecorate %96 RelaxedPrecision -OpDecorate %97 RelaxedPrecision -OpDecorate %99 RelaxedPrecision -OpDecorate %100 RelaxedPrecision -OpDecorate %101 RelaxedPrecision -OpDecorate %102 RelaxedPrecision -OpDecorate %103 RelaxedPrecision -OpDecorate %104 RelaxedPrecision -OpDecorate %105 RelaxedPrecision -OpDecorate %106 RelaxedPrecision -OpDecorate %107 RelaxedPrecision -OpDecorate %108 RelaxedPrecision -OpDecorate %109 RelaxedPrecision -OpDecorate %110 RelaxedPrecision -OpDecorate %111 RelaxedPrecision -OpDecorate %112 RelaxedPrecision -OpDecorate %113 RelaxedPrecision -OpDecorate %114 RelaxedPrecision -OpDecorate %122 RelaxedPrecision -OpDecorate %126 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "src" + OpMemberName %_UniformBuffer 1 "dst" + OpName %blend_overlay_component_Qhh2h2 "blend_overlay_component_Qhh2h2" + OpName %blend_overlay_h4h4h4 "blend_overlay_h4h4h4" + OpName %result "result" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %12 Binding 0 + OpDecorate %12 DescriptorSet 0 + OpDecorate %22 RelaxedPrecision + OpDecorate %23 RelaxedPrecision + OpDecorate %24 RelaxedPrecision + OpDecorate %25 RelaxedPrecision + OpDecorate %26 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %34 RelaxedPrecision + OpDecorate %35 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %45 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %48 RelaxedPrecision + OpDecorate %49 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %53 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %55 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %result RelaxedPrecision + OpDecorate %64 RelaxedPrecision + OpDecorate %65 RelaxedPrecision + OpDecorate %67 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %71 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %74 RelaxedPrecision + OpDecorate %75 RelaxedPrecision + OpDecorate %78 RelaxedPrecision + OpDecorate %79 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %82 RelaxedPrecision + OpDecorate %85 RelaxedPrecision + OpDecorate %86 RelaxedPrecision + OpDecorate %88 RelaxedPrecision + OpDecorate %89 RelaxedPrecision + OpDecorate %90 RelaxedPrecision + OpDecorate %91 RelaxedPrecision + OpDecorate %92 RelaxedPrecision + OpDecorate %93 RelaxedPrecision + OpDecorate %94 RelaxedPrecision + OpDecorate %95 RelaxedPrecision + OpDecorate %96 RelaxedPrecision + OpDecorate %97 RelaxedPrecision + OpDecorate %99 RelaxedPrecision + OpDecorate %100 RelaxedPrecision + OpDecorate %101 RelaxedPrecision + OpDecorate %102 RelaxedPrecision + OpDecorate %103 RelaxedPrecision + OpDecorate %104 RelaxedPrecision + OpDecorate %105 RelaxedPrecision + OpDecorate %106 RelaxedPrecision + OpDecorate %107 RelaxedPrecision + OpDecorate %108 RelaxedPrecision + OpDecorate %109 RelaxedPrecision + OpDecorate %110 RelaxedPrecision + OpDecorate %111 RelaxedPrecision + OpDecorate %112 RelaxedPrecision + OpDecorate %113 RelaxedPrecision + OpDecorate %114 RelaxedPrecision + OpDecorate %122 RelaxedPrecision + OpDecorate %126 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%12 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%v2float = OpTypeVector %float 2 + %12 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %v2float = OpTypeVector %float 2 %_ptr_Function_v2float = OpTypePointer Function %v2float -%17 = OpTypeFunction %float %_ptr_Function_v2float %_ptr_Function_v2float -%float_2 = OpConstant %float 2 + %17 = OpTypeFunction %float %_ptr_Function_v2float %_ptr_Function_v2float + %float_2 = OpConstant %float 2 %_ptr_Function_float = OpTypePointer Function %float %_ptr_Function_v4float = OpTypePointer Function %v4float -%59 = OpTypeFunction %v4float %_ptr_Function_v4float %_ptr_Function_v4float -%float_1 = OpConstant %float 1 -%v3float = OpTypeVector %float 3 -%void = OpTypeVoid -%116 = OpTypeFunction %void + %59 = OpTypeFunction %v4float %_ptr_Function_v4float %_ptr_Function_v4float + %float_1 = OpConstant %float 1 + %v3float = OpTypeVector %float 3 + %void = OpTypeVoid + %116 = OpTypeFunction %void %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_1 = OpConstant %int 1 -%int_0 = OpConstant %int 0 + %int = OpTypeInt 32 1 + %int_1 = OpConstant %int 1 + %int_0 = OpConstant %int 0 %blend_overlay_component_Qhh2h2 = OpFunction %float None %17 -%18 = OpFunctionParameter %_ptr_Function_v2float -%19 = OpFunctionParameter %_ptr_Function_v2float -%20 = OpLabel -%28 = OpVariable %_ptr_Function_float Function -%22 = OpLoad %v2float %19 -%23 = OpCompositeExtract %float %22 0 -%24 = OpFMul %float %float_2 %23 -%25 = OpLoad %v2float %19 -%26 = OpCompositeExtract %float %25 1 -%27 = OpFOrdLessThanEqual %bool %24 %26 -OpSelectionMerge %32 None -OpBranchConditional %27 %30 %31 -%30 = OpLabel -%33 = OpLoad %v2float %18 -%34 = OpCompositeExtract %float %33 0 -%35 = OpFMul %float %float_2 %34 -%36 = OpLoad %v2float %19 -%37 = OpCompositeExtract %float %36 0 -%38 = OpFMul %float %35 %37 -OpStore %28 %38 -OpBranch %32 -%31 = OpLabel -%39 = OpLoad %v2float %18 -%40 = OpCompositeExtract %float %39 1 -%41 = OpLoad %v2float %19 -%42 = OpCompositeExtract %float %41 1 -%43 = OpFMul %float %40 %42 -%44 = OpLoad %v2float %19 -%45 = OpCompositeExtract %float %44 1 -%46 = OpLoad %v2float %19 -%47 = OpCompositeExtract %float %46 0 -%48 = OpFSub %float %45 %47 -%49 = OpFMul %float %float_2 %48 -%50 = OpLoad %v2float %18 -%51 = OpCompositeExtract %float %50 1 -%52 = OpLoad %v2float %18 -%53 = OpCompositeExtract %float %52 0 -%54 = OpFSub %float %51 %53 -%55 = OpFMul %float %49 %54 -%56 = OpFSub %float %43 %55 -OpStore %28 %56 -OpBranch %32 -%32 = OpLabel -%57 = OpLoad %float %28 -OpReturnValue %57 -OpFunctionEnd + %18 = OpFunctionParameter %_ptr_Function_v2float + %19 = OpFunctionParameter %_ptr_Function_v2float + %20 = OpLabel + %28 = OpVariable %_ptr_Function_float Function + %22 = OpLoad %v2float %19 + %23 = OpCompositeExtract %float %22 0 + %24 = OpFMul %float %float_2 %23 + %25 = OpLoad %v2float %19 + %26 = OpCompositeExtract %float %25 1 + %27 = OpFOrdLessThanEqual %bool %24 %26 + OpSelectionMerge %32 None + OpBranchConditional %27 %30 %31 + %30 = OpLabel + %33 = OpLoad %v2float %18 + %34 = OpCompositeExtract %float %33 0 + %35 = OpFMul %float %float_2 %34 + %36 = OpLoad %v2float %19 + %37 = OpCompositeExtract %float %36 0 + %38 = OpFMul %float %35 %37 + OpStore %28 %38 + OpBranch %32 + %31 = OpLabel + %39 = OpLoad %v2float %18 + %40 = OpCompositeExtract %float %39 1 + %41 = OpLoad %v2float %19 + %42 = OpCompositeExtract %float %41 1 + %43 = OpFMul %float %40 %42 + %44 = OpLoad %v2float %19 + %45 = OpCompositeExtract %float %44 1 + %46 = OpLoad %v2float %19 + %47 = OpCompositeExtract %float %46 0 + %48 = OpFSub %float %45 %47 + %49 = OpFMul %float %float_2 %48 + %50 = OpLoad %v2float %18 + %51 = OpCompositeExtract %float %50 1 + %52 = OpLoad %v2float %18 + %53 = OpCompositeExtract %float %52 0 + %54 = OpFSub %float %51 %53 + %55 = OpFMul %float %49 %54 + %56 = OpFSub %float %43 %55 + OpStore %28 %56 + OpBranch %32 + %32 = OpLabel + %57 = OpLoad %float %28 + OpReturnValue %57 + OpFunctionEnd %blend_overlay_h4h4h4 = OpFunction %v4float None %59 -%60 = OpFunctionParameter %_ptr_Function_v4float -%61 = OpFunctionParameter %_ptr_Function_v4float -%62 = OpLabel -%result = OpVariable %_ptr_Function_v4float Function -%66 = OpVariable %_ptr_Function_v2float Function -%69 = OpVariable %_ptr_Function_v2float Function -%73 = OpVariable %_ptr_Function_v2float Function -%76 = OpVariable %_ptr_Function_v2float Function -%80 = OpVariable %_ptr_Function_v2float Function -%83 = OpVariable %_ptr_Function_v2float Function -%64 = OpLoad %v4float %60 -%65 = OpVectorShuffle %v2float %64 %64 0 3 -OpStore %66 %65 -%67 = OpLoad %v4float %61 -%68 = OpVectorShuffle %v2float %67 %67 0 3 -OpStore %69 %68 -%70 = OpFunctionCall %float %blend_overlay_component_Qhh2h2 %66 %69 -%71 = OpLoad %v4float %60 -%72 = OpVectorShuffle %v2float %71 %71 1 3 -OpStore %73 %72 -%74 = OpLoad %v4float %61 -%75 = OpVectorShuffle %v2float %74 %74 1 3 -OpStore %76 %75 -%77 = OpFunctionCall %float %blend_overlay_component_Qhh2h2 %73 %76 -%78 = OpLoad %v4float %60 -%79 = OpVectorShuffle %v2float %78 %78 2 3 -OpStore %80 %79 -%81 = OpLoad %v4float %61 -%82 = OpVectorShuffle %v2float %81 %81 2 3 -OpStore %83 %82 -%84 = OpFunctionCall %float %blend_overlay_component_Qhh2h2 %80 %83 -%85 = OpLoad %v4float %60 -%86 = OpCompositeExtract %float %85 3 -%88 = OpLoad %v4float %60 -%89 = OpCompositeExtract %float %88 3 -%90 = OpFSub %float %float_1 %89 -%91 = OpLoad %v4float %61 -%92 = OpCompositeExtract %float %91 3 -%93 = OpFMul %float %90 %92 -%94 = OpFAdd %float %86 %93 -%95 = OpCompositeConstruct %v4float %70 %77 %84 %94 -OpStore %result %95 -%96 = OpLoad %v4float %result -%97 = OpVectorShuffle %v3float %96 %96 0 1 2 -%99 = OpLoad %v4float %61 -%100 = OpVectorShuffle %v3float %99 %99 0 1 2 -%101 = OpLoad %v4float %60 -%102 = OpCompositeExtract %float %101 3 -%103 = OpFSub %float %float_1 %102 -%104 = OpVectorTimesScalar %v3float %100 %103 -%105 = OpLoad %v4float %60 -%106 = OpVectorShuffle %v3float %105 %105 0 1 2 -%107 = OpLoad %v4float %61 -%108 = OpCompositeExtract %float %107 3 -%109 = OpFSub %float %float_1 %108 -%110 = OpVectorTimesScalar %v3float %106 %109 -%111 = OpFAdd %v3float %104 %110 -%112 = OpFAdd %v3float %97 %111 -%113 = OpLoad %v4float %result -%114 = OpVectorShuffle %v4float %113 %112 4 5 6 3 -OpStore %result %114 -OpReturnValue %114 -OpFunctionEnd -%main = OpFunction %void None %116 -%117 = OpLabel -%123 = OpVariable %_ptr_Function_v4float Function -%127 = OpVariable %_ptr_Function_v4float Function -%118 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1 -%122 = OpLoad %v4float %118 -OpStore %123 %122 -%124 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 -%126 = OpLoad %v4float %124 -OpStore %127 %126 -%128 = OpFunctionCall %v4float %blend_overlay_h4h4h4 %123 %127 -OpStore %sk_FragColor %128 -OpReturn -OpFunctionEnd + %60 = OpFunctionParameter %_ptr_Function_v4float + %61 = OpFunctionParameter %_ptr_Function_v4float + %62 = OpLabel + %result = OpVariable %_ptr_Function_v4float Function + %66 = OpVariable %_ptr_Function_v2float Function + %69 = OpVariable %_ptr_Function_v2float Function + %73 = OpVariable %_ptr_Function_v2float Function + %76 = OpVariable %_ptr_Function_v2float Function + %80 = OpVariable %_ptr_Function_v2float Function + %83 = OpVariable %_ptr_Function_v2float Function + %64 = OpLoad %v4float %60 + %65 = OpVectorShuffle %v2float %64 %64 0 3 + OpStore %66 %65 + %67 = OpLoad %v4float %61 + %68 = OpVectorShuffle %v2float %67 %67 0 3 + OpStore %69 %68 + %70 = OpFunctionCall %float %blend_overlay_component_Qhh2h2 %66 %69 + %71 = OpLoad %v4float %60 + %72 = OpVectorShuffle %v2float %71 %71 1 3 + OpStore %73 %72 + %74 = OpLoad %v4float %61 + %75 = OpVectorShuffle %v2float %74 %74 1 3 + OpStore %76 %75 + %77 = OpFunctionCall %float %blend_overlay_component_Qhh2h2 %73 %76 + %78 = OpLoad %v4float %60 + %79 = OpVectorShuffle %v2float %78 %78 2 3 + OpStore %80 %79 + %81 = OpLoad %v4float %61 + %82 = OpVectorShuffle %v2float %81 %81 2 3 + OpStore %83 %82 + %84 = OpFunctionCall %float %blend_overlay_component_Qhh2h2 %80 %83 + %85 = OpLoad %v4float %60 + %86 = OpCompositeExtract %float %85 3 + %88 = OpLoad %v4float %60 + %89 = OpCompositeExtract %float %88 3 + %90 = OpFSub %float %float_1 %89 + %91 = OpLoad %v4float %61 + %92 = OpCompositeExtract %float %91 3 + %93 = OpFMul %float %90 %92 + %94 = OpFAdd %float %86 %93 + %95 = OpCompositeConstruct %v4float %70 %77 %84 %94 + OpStore %result %95 + %96 = OpLoad %v4float %result + %97 = OpVectorShuffle %v3float %96 %96 0 1 2 + %99 = OpLoad %v4float %61 + %100 = OpVectorShuffle %v3float %99 %99 0 1 2 + %101 = OpLoad %v4float %60 + %102 = OpCompositeExtract %float %101 3 + %103 = OpFSub %float %float_1 %102 + %104 = OpVectorTimesScalar %v3float %100 %103 + %105 = OpLoad %v4float %60 + %106 = OpVectorShuffle %v3float %105 %105 0 1 2 + %107 = OpLoad %v4float %61 + %108 = OpCompositeExtract %float %107 3 + %109 = OpFSub %float %float_1 %108 + %110 = OpVectorTimesScalar %v3float %106 %109 + %111 = OpFAdd %v3float %104 %110 + %112 = OpFAdd %v3float %97 %111 + %113 = OpLoad %v4float %result + %114 = OpVectorShuffle %v4float %113 %112 4 5 6 3 + OpStore %result %114 + OpReturnValue %114 + OpFunctionEnd + %main = OpFunction %void None %116 + %117 = OpLabel + %123 = OpVariable %_ptr_Function_v4float Function + %127 = OpVariable %_ptr_Function_v4float Function + %118 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1 + %122 = OpLoad %v4float %118 + OpStore %123 %122 + %124 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 + %126 = OpLoad %v4float %124 + OpStore %127 %126 + %128 = OpFunctionCall %v4float %blend_overlay_h4h4h4 %123 %127 + OpStore %sk_FragColor %128 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/blend/BlendHardLight.wgsl b/tests/sksl/blend/BlendHardLight.wgsl index 7a1804972eba..2eafc1a0d48b 100644 --- a/tests/sksl/blend/BlendHardLight.wgsl +++ b/tests/sksl/blend/BlendHardLight.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; @@ -13,7 +14,7 @@ fn blend_overlay_component_Qhh2h2(_skParam0: vec2, _skParam1: vec2) -> let s = _skParam0; let d = _skParam1; { - return select(s.y * d.y - (2.0 * (d.y - d.x)) * (s.y - s.x), (2.0 * s.x) * d.x, 2.0 * d.x <= d.y); + return select(s.y * d.y - (2.0 * (d.y - d.x)) * (s.y - s.x), (2.0 * s.x) * d.x, (2.0 * d.x) <= d.y); } } fn blend_overlay_h4h4h4(_skParam0: vec4, _skParam1: vec4) -> vec4 { diff --git a/tests/sksl/blend/BlendHue.asm.frag b/tests/sksl/blend/BlendHue.asm.frag index ab7653e1638c..fa6949a8af14 100644 --- a/tests/sksl/blend/BlendHue.asm.frag +++ b/tests/sksl/blend/BlendHue.asm.frag @@ -1,412 +1,412 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %_kGuardedDivideEpsilon "$kGuardedDivideEpsilon" -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "src" -OpMemberName %_UniformBuffer 1 "dst" -OpName %blend_color_saturation_Qhh3 "blend_color_saturation_Qhh3" -OpName %blend_hslc_h4h2h4h4 "blend_hslc_h4h2h4h4" -OpName %alpha "alpha" -OpName %sda "sda" -OpName %dsa "dsa" -OpName %l "l" -OpName %r "r" -OpName %_2_mn "_2_mn" -OpName %_3_mx "_3_mx" -OpName %_4_lum "_4_lum" -OpName %_5_result "_5_result" -OpName %_6_minComp "_6_minComp" -OpName %_7_maxComp "_7_maxComp" -OpName %main "main" -OpDecorate %_kGuardedDivideEpsilon RelaxedPrecision -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %18 Binding 0 -OpDecorate %18 DescriptorSet 0 -OpDecorate %28 RelaxedPrecision -OpDecorate %29 RelaxedPrecision -OpDecorate %30 RelaxedPrecision -OpDecorate %31 RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %39 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %alpha RelaxedPrecision -OpDecorate %53 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %55 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %sda RelaxedPrecision -OpDecorate %59 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %62 RelaxedPrecision -OpDecorate %63 RelaxedPrecision -OpDecorate %dsa RelaxedPrecision -OpDecorate %65 RelaxedPrecision -OpDecorate %66 RelaxedPrecision -OpDecorate %67 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %69 RelaxedPrecision -OpDecorate %l RelaxedPrecision -OpDecorate %71 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %78 RelaxedPrecision -OpDecorate %r RelaxedPrecision -OpDecorate %80 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %87 RelaxedPrecision -OpDecorate %88 RelaxedPrecision -OpDecorate %89 RelaxedPrecision -OpDecorate %_2_mn RelaxedPrecision -OpDecorate %96 RelaxedPrecision -OpDecorate %97 RelaxedPrecision -OpDecorate %98 RelaxedPrecision -OpDecorate %_3_mx RelaxedPrecision -OpDecorate %107 RelaxedPrecision -OpDecorate %108 RelaxedPrecision -OpDecorate %111 RelaxedPrecision -OpDecorate %112 RelaxedPrecision -OpDecorate %114 RelaxedPrecision -OpDecorate %115 RelaxedPrecision -OpDecorate %117 RelaxedPrecision -OpDecorate %_4_lum RelaxedPrecision -OpDecorate %119 RelaxedPrecision -OpDecorate %124 RelaxedPrecision -OpDecorate %_5_result RelaxedPrecision -OpDecorate %126 RelaxedPrecision -OpDecorate %127 RelaxedPrecision -OpDecorate %128 RelaxedPrecision -OpDecorate %129 RelaxedPrecision -OpDecorate %130 RelaxedPrecision -OpDecorate %131 RelaxedPrecision -OpDecorate %_6_minComp RelaxedPrecision -OpDecorate %135 RelaxedPrecision -OpDecorate %136 RelaxedPrecision -OpDecorate %137 RelaxedPrecision -OpDecorate %_7_maxComp RelaxedPrecision -OpDecorate %148 RelaxedPrecision -OpDecorate %149 RelaxedPrecision -OpDecorate %150 RelaxedPrecision -OpDecorate %151 RelaxedPrecision -OpDecorate %152 RelaxedPrecision -OpDecorate %153 RelaxedPrecision -OpDecorate %154 RelaxedPrecision -OpDecorate %155 RelaxedPrecision -OpDecorate %163 RelaxedPrecision -OpDecorate %164 RelaxedPrecision -OpDecorate %165 RelaxedPrecision -OpDecorate %166 RelaxedPrecision -OpDecorate %167 RelaxedPrecision -OpDecorate %168 RelaxedPrecision -OpDecorate %169 RelaxedPrecision -OpDecorate %170 RelaxedPrecision -OpDecorate %171 RelaxedPrecision -OpDecorate %172 RelaxedPrecision -OpDecorate %173 RelaxedPrecision -OpDecorate %174 RelaxedPrecision -OpDecorate %175 RelaxedPrecision -OpDecorate %176 RelaxedPrecision -OpDecorate %177 RelaxedPrecision -OpDecorate %178 RelaxedPrecision -OpDecorate %179 RelaxedPrecision -OpDecorate %180 RelaxedPrecision -OpDecorate %181 RelaxedPrecision -OpDecorate %182 RelaxedPrecision -OpDecorate %183 RelaxedPrecision -OpDecorate %184 RelaxedPrecision -OpDecorate %185 RelaxedPrecision -OpDecorate %186 RelaxedPrecision -OpDecorate %187 RelaxedPrecision -OpDecorate %188 RelaxedPrecision -OpDecorate %189 RelaxedPrecision -OpDecorate %190 RelaxedPrecision -OpDecorate %191 RelaxedPrecision -OpDecorate %192 RelaxedPrecision -OpDecorate %202 RelaxedPrecision -OpDecorate %206 RelaxedPrecision -%float = OpTypeFloat 32 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %_kGuardedDivideEpsilon "$kGuardedDivideEpsilon" + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "src" + OpMemberName %_UniformBuffer 1 "dst" + OpName %blend_color_saturation_Qhh3 "blend_color_saturation_Qhh3" + OpName %blend_hslc_h4h2h4h4 "blend_hslc_h4h2h4h4" + OpName %alpha "alpha" + OpName %sda "sda" + OpName %dsa "dsa" + OpName %l "l" + OpName %r "r" + OpName %_2_mn "_2_mn" + OpName %_3_mx "_3_mx" + OpName %_4_lum "_4_lum" + OpName %_5_result "_5_result" + OpName %_6_minComp "_6_minComp" + OpName %_7_maxComp "_7_maxComp" + OpName %main "main" + OpDecorate %_kGuardedDivideEpsilon RelaxedPrecision + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %18 Binding 0 + OpDecorate %18 DescriptorSet 0 + OpDecorate %28 RelaxedPrecision + OpDecorate %29 RelaxedPrecision + OpDecorate %30 RelaxedPrecision + OpDecorate %31 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %alpha RelaxedPrecision + OpDecorate %53 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %55 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %sda RelaxedPrecision + OpDecorate %59 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %62 RelaxedPrecision + OpDecorate %63 RelaxedPrecision + OpDecorate %dsa RelaxedPrecision + OpDecorate %65 RelaxedPrecision + OpDecorate %66 RelaxedPrecision + OpDecorate %67 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %69 RelaxedPrecision + OpDecorate %l RelaxedPrecision + OpDecorate %71 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %78 RelaxedPrecision + OpDecorate %r RelaxedPrecision + OpDecorate %80 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %87 RelaxedPrecision + OpDecorate %88 RelaxedPrecision + OpDecorate %89 RelaxedPrecision + OpDecorate %_2_mn RelaxedPrecision + OpDecorate %96 RelaxedPrecision + OpDecorate %97 RelaxedPrecision + OpDecorate %98 RelaxedPrecision + OpDecorate %_3_mx RelaxedPrecision + OpDecorate %107 RelaxedPrecision + OpDecorate %108 RelaxedPrecision + OpDecorate %111 RelaxedPrecision + OpDecorate %112 RelaxedPrecision + OpDecorate %114 RelaxedPrecision + OpDecorate %115 RelaxedPrecision + OpDecorate %117 RelaxedPrecision + OpDecorate %_4_lum RelaxedPrecision + OpDecorate %119 RelaxedPrecision + OpDecorate %124 RelaxedPrecision + OpDecorate %_5_result RelaxedPrecision + OpDecorate %126 RelaxedPrecision + OpDecorate %127 RelaxedPrecision + OpDecorate %128 RelaxedPrecision + OpDecorate %129 RelaxedPrecision + OpDecorate %130 RelaxedPrecision + OpDecorate %131 RelaxedPrecision + OpDecorate %_6_minComp RelaxedPrecision + OpDecorate %135 RelaxedPrecision + OpDecorate %136 RelaxedPrecision + OpDecorate %137 RelaxedPrecision + OpDecorate %_7_maxComp RelaxedPrecision + OpDecorate %148 RelaxedPrecision + OpDecorate %149 RelaxedPrecision + OpDecorate %150 RelaxedPrecision + OpDecorate %151 RelaxedPrecision + OpDecorate %152 RelaxedPrecision + OpDecorate %153 RelaxedPrecision + OpDecorate %154 RelaxedPrecision + OpDecorate %155 RelaxedPrecision + OpDecorate %163 RelaxedPrecision + OpDecorate %164 RelaxedPrecision + OpDecorate %165 RelaxedPrecision + OpDecorate %166 RelaxedPrecision + OpDecorate %167 RelaxedPrecision + OpDecorate %168 RelaxedPrecision + OpDecorate %169 RelaxedPrecision + OpDecorate %170 RelaxedPrecision + OpDecorate %171 RelaxedPrecision + OpDecorate %172 RelaxedPrecision + OpDecorate %173 RelaxedPrecision + OpDecorate %174 RelaxedPrecision + OpDecorate %175 RelaxedPrecision + OpDecorate %176 RelaxedPrecision + OpDecorate %177 RelaxedPrecision + OpDecorate %178 RelaxedPrecision + OpDecorate %179 RelaxedPrecision + OpDecorate %180 RelaxedPrecision + OpDecorate %181 RelaxedPrecision + OpDecorate %182 RelaxedPrecision + OpDecorate %183 RelaxedPrecision + OpDecorate %184 RelaxedPrecision + OpDecorate %185 RelaxedPrecision + OpDecorate %186 RelaxedPrecision + OpDecorate %187 RelaxedPrecision + OpDecorate %188 RelaxedPrecision + OpDecorate %189 RelaxedPrecision + OpDecorate %190 RelaxedPrecision + OpDecorate %191 RelaxedPrecision + OpDecorate %192 RelaxedPrecision + OpDecorate %202 RelaxedPrecision + OpDecorate %206 RelaxedPrecision + %float = OpTypeFloat 32 %_ptr_Private_float = OpTypePointer Private %float %_kGuardedDivideEpsilon = OpVariable %_ptr_Private_float Private -%bool = OpTypeBool -%false = OpConstantFalse %bool + %bool = OpTypeBool + %false = OpConstantFalse %bool %float_9_99999994en09 = OpConstant %float 9.99999994e-09 -%float_0 = OpConstant %float 0 + %float_0 = OpConstant %float 0 %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%v4float = OpTypeVector %float 4 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%18 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%v3float = OpTypeVector %float 3 + %18 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %v3float = OpTypeVector %float 3 %_ptr_Function_v3float = OpTypePointer Function %v3float -%23 = OpTypeFunction %float %_ptr_Function_v3float -%v2float = OpTypeVector %float 2 + %23 = OpTypeFunction %float %_ptr_Function_v3float + %v2float = OpTypeVector %float 2 %_ptr_Function_v2float = OpTypePointer Function %v2float %_ptr_Function_v4float = OpTypePointer Function %v4float -%46 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float %_ptr_Function_v4float + %46 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float %_ptr_Function_v4float %_ptr_Function_float = OpTypePointer Function %float -%float_1 = OpConstant %float 1 -%116 = OpConstantComposite %v3float %float_0 %float_0 %float_0 + %float_1 = OpConstant %float 1 + %116 = OpConstantComposite %v3float %float_0 %float_0 %float_0 %float_0_300000012 = OpConstant %float 0.300000012 %float_0_589999974 = OpConstant %float 0.589999974 %float_0_109999999 = OpConstant %float 0.109999999 -%123 = OpConstantComposite %v3float %float_0_300000012 %float_0_589999974 %float_0_109999999 -%void = OpTypeVoid -%194 = OpTypeFunction %void -%196 = OpConstantComposite %v2float %float_0 %float_1 + %123 = OpConstantComposite %v3float %float_0_300000012 %float_0_589999974 %float_0_109999999 + %void = OpTypeVoid + %194 = OpTypeFunction %void + %196 = OpConstantComposite %v2float %float_0 %float_1 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 %blend_color_saturation_Qhh3 = OpFunction %float None %23 -%24 = OpFunctionParameter %_ptr_Function_v3float -%25 = OpLabel -%28 = OpLoad %v3float %24 -%29 = OpCompositeExtract %float %28 0 -%30 = OpLoad %v3float %24 -%31 = OpCompositeExtract %float %30 1 -%27 = OpExtInst %float %1 FMax %29 %31 -%32 = OpLoad %v3float %24 -%33 = OpCompositeExtract %float %32 2 -%26 = OpExtInst %float %1 FMax %27 %33 -%36 = OpLoad %v3float %24 -%37 = OpCompositeExtract %float %36 0 -%38 = OpLoad %v3float %24 -%39 = OpCompositeExtract %float %38 1 -%35 = OpExtInst %float %1 FMin %37 %39 -%40 = OpLoad %v3float %24 -%41 = OpCompositeExtract %float %40 2 -%34 = OpExtInst %float %1 FMin %35 %41 -%42 = OpFSub %float %26 %34 -OpReturnValue %42 -OpFunctionEnd + %24 = OpFunctionParameter %_ptr_Function_v3float + %25 = OpLabel + %28 = OpLoad %v3float %24 + %29 = OpCompositeExtract %float %28 0 + %30 = OpLoad %v3float %24 + %31 = OpCompositeExtract %float %30 1 + %27 = OpExtInst %float %1 FMax %29 %31 + %32 = OpLoad %v3float %24 + %33 = OpCompositeExtract %float %32 2 + %26 = OpExtInst %float %1 FMax %27 %33 + %36 = OpLoad %v3float %24 + %37 = OpCompositeExtract %float %36 0 + %38 = OpLoad %v3float %24 + %39 = OpCompositeExtract %float %38 1 + %35 = OpExtInst %float %1 FMin %37 %39 + %40 = OpLoad %v3float %24 + %41 = OpCompositeExtract %float %40 2 + %34 = OpExtInst %float %1 FMin %35 %41 + %42 = OpFSub %float %26 %34 + OpReturnValue %42 + OpFunctionEnd %blend_hslc_h4h2h4h4 = OpFunction %v4float None %46 -%47 = OpFunctionParameter %_ptr_Function_v2float -%48 = OpFunctionParameter %_ptr_Function_v4float -%49 = OpFunctionParameter %_ptr_Function_v4float -%50 = OpLabel -%alpha = OpVariable %_ptr_Function_float Function -%sda = OpVariable %_ptr_Function_v3float Function -%dsa = OpVariable %_ptr_Function_v3float Function -%l = OpVariable %_ptr_Function_v3float Function -%74 = OpVariable %_ptr_Function_v3float Function -%r = OpVariable %_ptr_Function_v3float Function -%83 = OpVariable %_ptr_Function_v3float Function -%_2_mn = OpVariable %_ptr_Function_float Function -%_3_mx = OpVariable %_ptr_Function_float Function -%103 = OpVariable %_ptr_Function_v3float Function -%109 = OpVariable %_ptr_Function_v3float Function -%_4_lum = OpVariable %_ptr_Function_float Function -%_5_result = OpVariable %_ptr_Function_v3float Function -%_6_minComp = OpVariable %_ptr_Function_float Function -%_7_maxComp = OpVariable %_ptr_Function_float Function -%53 = OpLoad %v4float %49 -%54 = OpCompositeExtract %float %53 3 -%55 = OpLoad %v4float %48 -%56 = OpCompositeExtract %float %55 3 -%57 = OpFMul %float %54 %56 -OpStore %alpha %57 -%59 = OpLoad %v4float %48 -%60 = OpVectorShuffle %v3float %59 %59 0 1 2 -%61 = OpLoad %v4float %49 -%62 = OpCompositeExtract %float %61 3 -%63 = OpVectorTimesScalar %v3float %60 %62 -OpStore %sda %63 -%65 = OpLoad %v4float %49 -%66 = OpVectorShuffle %v3float %65 %65 0 1 2 -%67 = OpLoad %v4float %48 -%68 = OpCompositeExtract %float %67 3 -%69 = OpVectorTimesScalar %v3float %66 %68 -OpStore %dsa %69 -%71 = OpLoad %v2float %47 -%72 = OpCompositeExtract %float %71 0 -%73 = OpFUnordNotEqual %bool %72 %float_0 -OpSelectionMerge %77 None -OpBranchConditional %73 %75 %76 -%75 = OpLabel -OpStore %74 %69 -OpBranch %77 -%76 = OpLabel -OpStore %74 %63 -OpBranch %77 -%77 = OpLabel -%78 = OpLoad %v3float %74 -OpStore %l %78 -%80 = OpLoad %v2float %47 -%81 = OpCompositeExtract %float %80 0 -%82 = OpFUnordNotEqual %bool %81 %float_0 -OpSelectionMerge %86 None -OpBranchConditional %82 %84 %85 -%84 = OpLabel -OpStore %83 %63 -OpBranch %86 -%85 = OpLabel -OpStore %83 %69 -OpBranch %86 -%86 = OpLabel -%87 = OpLoad %v3float %83 -OpStore %r %87 -%88 = OpLoad %v2float %47 -%89 = OpCompositeExtract %float %88 1 -%90 = OpFUnordNotEqual %bool %89 %float_0 -OpSelectionMerge %92 None -OpBranchConditional %90 %91 %92 -%91 = OpLabel -%96 = OpCompositeExtract %float %78 0 -%97 = OpCompositeExtract %float %78 1 -%95 = OpExtInst %float %1 FMin %96 %97 -%98 = OpCompositeExtract %float %78 2 -%94 = OpExtInst %float %1 FMin %95 %98 -OpStore %_2_mn %94 -%101 = OpExtInst %float %1 FMax %96 %97 -%100 = OpExtInst %float %1 FMax %101 %98 -OpStore %_3_mx %100 -%102 = OpFOrdGreaterThan %bool %100 %94 -OpSelectionMerge %106 None -OpBranchConditional %102 %104 %105 -%104 = OpLabel -%107 = OpCompositeConstruct %v3float %94 %94 %94 -%108 = OpFSub %v3float %78 %107 -OpStore %109 %87 -%110 = OpFunctionCall %float %blend_color_saturation_Qhh3 %109 -%111 = OpVectorTimesScalar %v3float %108 %110 -%112 = OpFSub %float %100 %94 -%114 = OpFDiv %float %float_1 %112 -%115 = OpVectorTimesScalar %v3float %111 %114 -OpStore %103 %115 -OpBranch %106 -%105 = OpLabel -OpStore %103 %116 -OpBranch %106 -%106 = OpLabel -%117 = OpLoad %v3float %103 -OpStore %l %117 -OpStore %r %69 -OpBranch %92 -%92 = OpLabel -%124 = OpLoad %v3float %r -%119 = OpDot %float %123 %124 -OpStore %_4_lum %119 -%127 = OpLoad %v3float %l -%126 = OpDot %float %123 %127 -%128 = OpFSub %float %119 %126 -%129 = OpLoad %v3float %l -%130 = OpCompositeConstruct %v3float %128 %128 %128 -%131 = OpFAdd %v3float %130 %129 -OpStore %_5_result %131 -%135 = OpCompositeExtract %float %131 0 -%136 = OpCompositeExtract %float %131 1 -%134 = OpExtInst %float %1 FMin %135 %136 -%137 = OpCompositeExtract %float %131 2 -%133 = OpExtInst %float %1 FMin %134 %137 -OpStore %_6_minComp %133 -%140 = OpExtInst %float %1 FMax %135 %136 -%139 = OpExtInst %float %1 FMax %140 %137 -OpStore %_7_maxComp %139 -%141 = OpFOrdLessThan %bool %133 %float_0 -OpSelectionMerge %143 None -OpBranchConditional %141 %142 %143 -%142 = OpLabel -%144 = OpFUnordNotEqual %bool %119 %133 -OpBranch %143 -%143 = OpLabel -%145 = OpPhi %bool %false %92 %144 %142 -OpSelectionMerge %147 None -OpBranchConditional %145 %146 %147 -%146 = OpLabel -%148 = OpCompositeConstruct %v3float %119 %119 %119 -%149 = OpFSub %v3float %131 %148 -%150 = OpFSub %float %119 %133 -%151 = OpLoad %float %_kGuardedDivideEpsilon -%152 = OpFAdd %float %150 %151 -%153 = OpFDiv %float %119 %152 -%154 = OpVectorTimesScalar %v3float %149 %153 -%155 = OpFAdd %v3float %148 %154 -OpStore %_5_result %155 -OpBranch %147 -%147 = OpLabel -%156 = OpFOrdGreaterThan %bool %139 %57 -OpSelectionMerge %158 None -OpBranchConditional %156 %157 %158 -%157 = OpLabel -%159 = OpFUnordNotEqual %bool %139 %119 -OpBranch %158 -%158 = OpLabel -%160 = OpPhi %bool %false %147 %159 %157 -OpSelectionMerge %162 None -OpBranchConditional %160 %161 %162 -%161 = OpLabel -%163 = OpLoad %v3float %_5_result -%164 = OpCompositeConstruct %v3float %119 %119 %119 -%165 = OpFSub %v3float %163 %164 -%166 = OpFSub %float %57 %119 -%167 = OpVectorTimesScalar %v3float %165 %166 -%168 = OpFSub %float %139 %119 -%169 = OpLoad %float %_kGuardedDivideEpsilon -%170 = OpFAdd %float %168 %169 -%171 = OpFDiv %float %float_1 %170 -%172 = OpVectorTimesScalar %v3float %167 %171 -%173 = OpFAdd %v3float %164 %172 -OpStore %_5_result %173 -OpBranch %162 -%162 = OpLabel -%174 = OpLoad %v3float %_5_result -%175 = OpLoad %v4float %49 -%176 = OpVectorShuffle %v3float %175 %175 0 1 2 -%177 = OpFAdd %v3float %174 %176 -%178 = OpFSub %v3float %177 %69 -%179 = OpLoad %v4float %48 -%180 = OpVectorShuffle %v3float %179 %179 0 1 2 -%181 = OpFAdd %v3float %178 %180 -%182 = OpFSub %v3float %181 %63 -%183 = OpCompositeExtract %float %182 0 -%184 = OpCompositeExtract %float %182 1 -%185 = OpCompositeExtract %float %182 2 -%186 = OpLoad %v4float %48 -%187 = OpCompositeExtract %float %186 3 -%188 = OpLoad %v4float %49 -%189 = OpCompositeExtract %float %188 3 -%190 = OpFAdd %float %187 %189 -%191 = OpFSub %float %190 %57 -%192 = OpCompositeConstruct %v4float %183 %184 %185 %191 -OpReturnValue %192 -OpFunctionEnd -%main = OpFunction %void None %194 -%195 = OpLabel -%197 = OpVariable %_ptr_Function_v2float Function -%203 = OpVariable %_ptr_Function_v4float Function -%207 = OpVariable %_ptr_Function_v4float Function -%10 = OpSelect %float %false %float_9_99999994en09 %float_0 -OpStore %_kGuardedDivideEpsilon %10 -OpStore %197 %196 -%198 = OpAccessChain %_ptr_Uniform_v4float %18 %int_0 -%202 = OpLoad %v4float %198 -OpStore %203 %202 -%204 = OpAccessChain %_ptr_Uniform_v4float %18 %int_1 -%206 = OpLoad %v4float %204 -OpStore %207 %206 -%208 = OpFunctionCall %v4float %blend_hslc_h4h2h4h4 %197 %203 %207 -OpStore %sk_FragColor %208 -OpReturn -OpFunctionEnd + %47 = OpFunctionParameter %_ptr_Function_v2float + %48 = OpFunctionParameter %_ptr_Function_v4float + %49 = OpFunctionParameter %_ptr_Function_v4float + %50 = OpLabel + %alpha = OpVariable %_ptr_Function_float Function + %sda = OpVariable %_ptr_Function_v3float Function + %dsa = OpVariable %_ptr_Function_v3float Function + %l = OpVariable %_ptr_Function_v3float Function + %74 = OpVariable %_ptr_Function_v3float Function + %r = OpVariable %_ptr_Function_v3float Function + %83 = OpVariable %_ptr_Function_v3float Function + %_2_mn = OpVariable %_ptr_Function_float Function + %_3_mx = OpVariable %_ptr_Function_float Function + %103 = OpVariable %_ptr_Function_v3float Function + %109 = OpVariable %_ptr_Function_v3float Function + %_4_lum = OpVariable %_ptr_Function_float Function + %_5_result = OpVariable %_ptr_Function_v3float Function + %_6_minComp = OpVariable %_ptr_Function_float Function + %_7_maxComp = OpVariable %_ptr_Function_float Function + %53 = OpLoad %v4float %49 + %54 = OpCompositeExtract %float %53 3 + %55 = OpLoad %v4float %48 + %56 = OpCompositeExtract %float %55 3 + %57 = OpFMul %float %54 %56 + OpStore %alpha %57 + %59 = OpLoad %v4float %48 + %60 = OpVectorShuffle %v3float %59 %59 0 1 2 + %61 = OpLoad %v4float %49 + %62 = OpCompositeExtract %float %61 3 + %63 = OpVectorTimesScalar %v3float %60 %62 + OpStore %sda %63 + %65 = OpLoad %v4float %49 + %66 = OpVectorShuffle %v3float %65 %65 0 1 2 + %67 = OpLoad %v4float %48 + %68 = OpCompositeExtract %float %67 3 + %69 = OpVectorTimesScalar %v3float %66 %68 + OpStore %dsa %69 + %71 = OpLoad %v2float %47 + %72 = OpCompositeExtract %float %71 0 + %73 = OpFUnordNotEqual %bool %72 %float_0 + OpSelectionMerge %77 None + OpBranchConditional %73 %75 %76 + %75 = OpLabel + OpStore %74 %69 + OpBranch %77 + %76 = OpLabel + OpStore %74 %63 + OpBranch %77 + %77 = OpLabel + %78 = OpLoad %v3float %74 + OpStore %l %78 + %80 = OpLoad %v2float %47 + %81 = OpCompositeExtract %float %80 0 + %82 = OpFUnordNotEqual %bool %81 %float_0 + OpSelectionMerge %86 None + OpBranchConditional %82 %84 %85 + %84 = OpLabel + OpStore %83 %63 + OpBranch %86 + %85 = OpLabel + OpStore %83 %69 + OpBranch %86 + %86 = OpLabel + %87 = OpLoad %v3float %83 + OpStore %r %87 + %88 = OpLoad %v2float %47 + %89 = OpCompositeExtract %float %88 1 + %90 = OpFUnordNotEqual %bool %89 %float_0 + OpSelectionMerge %92 None + OpBranchConditional %90 %91 %92 + %91 = OpLabel + %96 = OpCompositeExtract %float %78 0 + %97 = OpCompositeExtract %float %78 1 + %95 = OpExtInst %float %1 FMin %96 %97 + %98 = OpCompositeExtract %float %78 2 + %94 = OpExtInst %float %1 FMin %95 %98 + OpStore %_2_mn %94 + %101 = OpExtInst %float %1 FMax %96 %97 + %100 = OpExtInst %float %1 FMax %101 %98 + OpStore %_3_mx %100 + %102 = OpFOrdGreaterThan %bool %100 %94 + OpSelectionMerge %106 None + OpBranchConditional %102 %104 %105 + %104 = OpLabel + %107 = OpCompositeConstruct %v3float %94 %94 %94 + %108 = OpFSub %v3float %78 %107 + OpStore %109 %87 + %110 = OpFunctionCall %float %blend_color_saturation_Qhh3 %109 + %111 = OpVectorTimesScalar %v3float %108 %110 + %112 = OpFSub %float %100 %94 + %114 = OpFDiv %float %float_1 %112 + %115 = OpVectorTimesScalar %v3float %111 %114 + OpStore %103 %115 + OpBranch %106 + %105 = OpLabel + OpStore %103 %116 + OpBranch %106 + %106 = OpLabel + %117 = OpLoad %v3float %103 + OpStore %l %117 + OpStore %r %69 + OpBranch %92 + %92 = OpLabel + %124 = OpLoad %v3float %r + %119 = OpDot %float %123 %124 + OpStore %_4_lum %119 + %127 = OpLoad %v3float %l + %126 = OpDot %float %123 %127 + %128 = OpFSub %float %119 %126 + %129 = OpLoad %v3float %l + %130 = OpCompositeConstruct %v3float %128 %128 %128 + %131 = OpFAdd %v3float %130 %129 + OpStore %_5_result %131 + %135 = OpCompositeExtract %float %131 0 + %136 = OpCompositeExtract %float %131 1 + %134 = OpExtInst %float %1 FMin %135 %136 + %137 = OpCompositeExtract %float %131 2 + %133 = OpExtInst %float %1 FMin %134 %137 + OpStore %_6_minComp %133 + %140 = OpExtInst %float %1 FMax %135 %136 + %139 = OpExtInst %float %1 FMax %140 %137 + OpStore %_7_maxComp %139 + %141 = OpFOrdLessThan %bool %133 %float_0 + OpSelectionMerge %143 None + OpBranchConditional %141 %142 %143 + %142 = OpLabel + %144 = OpFUnordNotEqual %bool %119 %133 + OpBranch %143 + %143 = OpLabel + %145 = OpPhi %bool %false %92 %144 %142 + OpSelectionMerge %147 None + OpBranchConditional %145 %146 %147 + %146 = OpLabel + %148 = OpCompositeConstruct %v3float %119 %119 %119 + %149 = OpFSub %v3float %131 %148 + %150 = OpFSub %float %119 %133 + %151 = OpLoad %float %_kGuardedDivideEpsilon + %152 = OpFAdd %float %150 %151 + %153 = OpFDiv %float %119 %152 + %154 = OpVectorTimesScalar %v3float %149 %153 + %155 = OpFAdd %v3float %148 %154 + OpStore %_5_result %155 + OpBranch %147 + %147 = OpLabel + %156 = OpFOrdGreaterThan %bool %139 %57 + OpSelectionMerge %158 None + OpBranchConditional %156 %157 %158 + %157 = OpLabel + %159 = OpFUnordNotEqual %bool %139 %119 + OpBranch %158 + %158 = OpLabel + %160 = OpPhi %bool %false %147 %159 %157 + OpSelectionMerge %162 None + OpBranchConditional %160 %161 %162 + %161 = OpLabel + %163 = OpLoad %v3float %_5_result + %164 = OpCompositeConstruct %v3float %119 %119 %119 + %165 = OpFSub %v3float %163 %164 + %166 = OpFSub %float %57 %119 + %167 = OpVectorTimesScalar %v3float %165 %166 + %168 = OpFSub %float %139 %119 + %169 = OpLoad %float %_kGuardedDivideEpsilon + %170 = OpFAdd %float %168 %169 + %171 = OpFDiv %float %float_1 %170 + %172 = OpVectorTimesScalar %v3float %167 %171 + %173 = OpFAdd %v3float %164 %172 + OpStore %_5_result %173 + OpBranch %162 + %162 = OpLabel + %174 = OpLoad %v3float %_5_result + %175 = OpLoad %v4float %49 + %176 = OpVectorShuffle %v3float %175 %175 0 1 2 + %177 = OpFAdd %v3float %174 %176 + %178 = OpFSub %v3float %177 %69 + %179 = OpLoad %v4float %48 + %180 = OpVectorShuffle %v3float %179 %179 0 1 2 + %181 = OpFAdd %v3float %178 %180 + %182 = OpFSub %v3float %181 %63 + %183 = OpCompositeExtract %float %182 0 + %184 = OpCompositeExtract %float %182 1 + %185 = OpCompositeExtract %float %182 2 + %186 = OpLoad %v4float %48 + %187 = OpCompositeExtract %float %186 3 + %188 = OpLoad %v4float %49 + %189 = OpCompositeExtract %float %188 3 + %190 = OpFAdd %float %187 %189 + %191 = OpFSub %float %190 %57 + %192 = OpCompositeConstruct %v4float %183 %184 %185 %191 + OpReturnValue %192 + OpFunctionEnd + %main = OpFunction %void None %194 + %195 = OpLabel + %197 = OpVariable %_ptr_Function_v2float Function + %203 = OpVariable %_ptr_Function_v4float Function + %207 = OpVariable %_ptr_Function_v4float Function + %10 = OpSelect %float %false %float_9_99999994en09 %float_0 + OpStore %_kGuardedDivideEpsilon %10 + OpStore %197 %196 + %198 = OpAccessChain %_ptr_Uniform_v4float %18 %int_0 + %202 = OpLoad %v4float %198 + OpStore %203 %202 + %204 = OpAccessChain %_ptr_Uniform_v4float %18 %int_1 + %206 = OpLoad %v4float %204 + OpStore %207 %206 + %208 = OpFunctionCall %v4float %blend_hslc_h4h2h4h4 %197 %203 %207 + OpStore %sk_FragColor %208 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/blend/BlendHue.wgsl b/tests/sksl/blend/BlendHue.wgsl index 85e95c63aa78..1b467b8980e3 100644 --- a/tests/sksl/blend/BlendHue.wgsl +++ b/tests/sksl/blend/BlendHue.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; @@ -30,7 +31,7 @@ fn blend_hslc_h4h2h4h4(_skParam0: vec2, _skParam1: vec4, _skParam2: ve var dsa: vec3 = dst.xyz * src.w; var l: vec3 = select(sda, dsa, vec3(bool(flipSat.x))); var r: vec3 = select(dsa, sda, vec3(bool(flipSat.x))); - if (bool(flipSat.y)) { + if bool(flipSat.y) { { let _skTemp4 = min(l.x, l.y); let _skTemp5 = min(_skTemp4, l.z); @@ -53,12 +54,12 @@ fn blend_hslc_h4h2h4h4(_skParam0: vec2, _skParam1: vec4, _skParam2: ve let _skTemp13 = max(_5_result.x, _5_result.y); let _skTemp14 = max(_skTemp13, _5_result.z); var _7_maxComp: f32 = _skTemp14; - if (_6_minComp < 0.0 && _4_lum != _6_minComp) { + if (_6_minComp < 0.0) && (_4_lum != _6_minComp) { { _5_result = _4_lum + (_5_result - _4_lum) * (_4_lum / ((_4_lum - _6_minComp) + sk_PrivkGuardedDivideEpsilon)); } } - if (_7_maxComp > alpha && _7_maxComp != _4_lum) { + if (_7_maxComp > alpha) && (_7_maxComp != _4_lum) { { _5_result = _4_lum + ((_5_result - _4_lum) * (alpha - _4_lum)) / ((_7_maxComp - _4_lum) + sk_PrivkGuardedDivideEpsilon); } diff --git a/tests/sksl/blend/BlendLighten.asm.frag b/tests/sksl/blend/BlendLighten.asm.frag index c8f5e19ba276..d2b839262724 100644 --- a/tests/sksl/blend/BlendLighten.asm.frag +++ b/tests/sksl/blend/BlendLighten.asm.frag @@ -1,96 +1,96 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "src" -OpMemberName %_UniformBuffer 1 "dst" -OpName %main "main" -OpName %_0_result "_0_result" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %_0_result RelaxedPrecision -OpDecorate %22 RelaxedPrecision -OpDecorate %25 RelaxedPrecision -OpDecorate %26 RelaxedPrecision -OpDecorate %27 RelaxedPrecision -OpDecorate %30 RelaxedPrecision -OpDecorate %31 RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %34 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %39 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %45 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %48 RelaxedPrecision -OpDecorate %49 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "src" + OpMemberName %_UniformBuffer 1 "dst" + OpName %main "main" + OpName %_0_result "_0_result" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %_0_result RelaxedPrecision + OpDecorate %22 RelaxedPrecision + OpDecorate %25 RelaxedPrecision + OpDecorate %26 RelaxedPrecision + OpDecorate %27 RelaxedPrecision + OpDecorate %30 RelaxedPrecision + OpDecorate %31 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %34 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %45 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %48 RelaxedPrecision + OpDecorate %49 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%14 = OpTypeFunction %void + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %14 = OpTypeFunction %void %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%float_1 = OpConstant %float 1 -%int_1 = OpConstant %int 1 -%v3float = OpTypeVector %float 3 -%main = OpFunction %void None %14 -%15 = OpLabel -%_0_result = OpVariable %_ptr_Function_v4float Function -%18 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%22 = OpLoad %v4float %18 -%24 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%25 = OpLoad %v4float %24 -%26 = OpCompositeExtract %float %25 3 -%27 = OpFSub %float %float_1 %26 -%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%30 = OpLoad %v4float %28 -%31 = OpVectorTimesScalar %v4float %30 %27 -%32 = OpFAdd %v4float %22 %31 -OpStore %_0_result %32 -%34 = OpVectorShuffle %v3float %32 %32 0 1 2 -%36 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%37 = OpLoad %v4float %36 -%38 = OpCompositeExtract %float %37 3 -%39 = OpFSub %float %float_1 %38 -%40 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%41 = OpLoad %v4float %40 -%42 = OpVectorShuffle %v3float %41 %41 0 1 2 -%43 = OpVectorTimesScalar %v3float %42 %39 -%44 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%45 = OpLoad %v4float %44 -%46 = OpVectorShuffle %v3float %45 %45 0 1 2 -%47 = OpFAdd %v3float %43 %46 -%33 = OpExtInst %v3float %1 FMax %34 %47 -%48 = OpLoad %v4float %_0_result -%49 = OpVectorShuffle %v4float %48 %33 4 5 6 3 -OpStore %_0_result %49 -OpStore %sk_FragColor %49 -OpReturn -OpFunctionEnd + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %float_1 = OpConstant %float 1 + %int_1 = OpConstant %int 1 + %v3float = OpTypeVector %float 3 + %main = OpFunction %void None %14 + %15 = OpLabel + %_0_result = OpVariable %_ptr_Function_v4float Function + %18 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %22 = OpLoad %v4float %18 + %24 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %25 = OpLoad %v4float %24 + %26 = OpCompositeExtract %float %25 3 + %27 = OpFSub %float %float_1 %26 + %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %30 = OpLoad %v4float %28 + %31 = OpVectorTimesScalar %v4float %30 %27 + %32 = OpFAdd %v4float %22 %31 + OpStore %_0_result %32 + %34 = OpVectorShuffle %v3float %32 %32 0 1 2 + %36 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %37 = OpLoad %v4float %36 + %38 = OpCompositeExtract %float %37 3 + %39 = OpFSub %float %float_1 %38 + %40 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %41 = OpLoad %v4float %40 + %42 = OpVectorShuffle %v3float %41 %41 0 1 2 + %43 = OpVectorTimesScalar %v3float %42 %39 + %44 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %45 = OpLoad %v4float %44 + %46 = OpVectorShuffle %v3float %45 %45 0 1 2 + %47 = OpFAdd %v3float %43 %46 + %33 = OpExtInst %v3float %1 FMax %34 %47 + %48 = OpLoad %v4float %_0_result + %49 = OpVectorShuffle %v4float %48 %33 4 5 6 3 + OpStore %_0_result %49 + OpStore %sk_FragColor %49 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/blend/BlendLighten.wgsl b/tests/sksl/blend/BlendLighten.wgsl index f18872abdb24..ebc454ac7057 100644 --- a/tests/sksl/blend/BlendLighten.wgsl +++ b/tests/sksl/blend/BlendLighten.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/blend/BlendLuminosity.asm.frag b/tests/sksl/blend/BlendLuminosity.asm.frag index f87fd2ccff98..214c4296d40e 100644 --- a/tests/sksl/blend/BlendLuminosity.asm.frag +++ b/tests/sksl/blend/BlendLuminosity.asm.frag @@ -1,412 +1,412 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %_kGuardedDivideEpsilon "$kGuardedDivideEpsilon" -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "src" -OpMemberName %_UniformBuffer 1 "dst" -OpName %blend_color_saturation_Qhh3 "blend_color_saturation_Qhh3" -OpName %blend_hslc_h4h2h4h4 "blend_hslc_h4h2h4h4" -OpName %alpha "alpha" -OpName %sda "sda" -OpName %dsa "dsa" -OpName %l "l" -OpName %r "r" -OpName %_2_mn "_2_mn" -OpName %_3_mx "_3_mx" -OpName %_4_lum "_4_lum" -OpName %_5_result "_5_result" -OpName %_6_minComp "_6_minComp" -OpName %_7_maxComp "_7_maxComp" -OpName %main "main" -OpDecorate %_kGuardedDivideEpsilon RelaxedPrecision -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %18 Binding 0 -OpDecorate %18 DescriptorSet 0 -OpDecorate %28 RelaxedPrecision -OpDecorate %29 RelaxedPrecision -OpDecorate %30 RelaxedPrecision -OpDecorate %31 RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %39 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %alpha RelaxedPrecision -OpDecorate %53 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %55 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %sda RelaxedPrecision -OpDecorate %59 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %62 RelaxedPrecision -OpDecorate %63 RelaxedPrecision -OpDecorate %dsa RelaxedPrecision -OpDecorate %65 RelaxedPrecision -OpDecorate %66 RelaxedPrecision -OpDecorate %67 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %69 RelaxedPrecision -OpDecorate %l RelaxedPrecision -OpDecorate %71 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %78 RelaxedPrecision -OpDecorate %r RelaxedPrecision -OpDecorate %80 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %87 RelaxedPrecision -OpDecorate %88 RelaxedPrecision -OpDecorate %89 RelaxedPrecision -OpDecorate %_2_mn RelaxedPrecision -OpDecorate %96 RelaxedPrecision -OpDecorate %97 RelaxedPrecision -OpDecorate %98 RelaxedPrecision -OpDecorate %_3_mx RelaxedPrecision -OpDecorate %107 RelaxedPrecision -OpDecorate %108 RelaxedPrecision -OpDecorate %111 RelaxedPrecision -OpDecorate %112 RelaxedPrecision -OpDecorate %114 RelaxedPrecision -OpDecorate %115 RelaxedPrecision -OpDecorate %117 RelaxedPrecision -OpDecorate %_4_lum RelaxedPrecision -OpDecorate %119 RelaxedPrecision -OpDecorate %124 RelaxedPrecision -OpDecorate %_5_result RelaxedPrecision -OpDecorate %126 RelaxedPrecision -OpDecorate %127 RelaxedPrecision -OpDecorate %128 RelaxedPrecision -OpDecorate %129 RelaxedPrecision -OpDecorate %130 RelaxedPrecision -OpDecorate %131 RelaxedPrecision -OpDecorate %_6_minComp RelaxedPrecision -OpDecorate %135 RelaxedPrecision -OpDecorate %136 RelaxedPrecision -OpDecorate %137 RelaxedPrecision -OpDecorate %_7_maxComp RelaxedPrecision -OpDecorate %148 RelaxedPrecision -OpDecorate %149 RelaxedPrecision -OpDecorate %150 RelaxedPrecision -OpDecorate %151 RelaxedPrecision -OpDecorate %152 RelaxedPrecision -OpDecorate %153 RelaxedPrecision -OpDecorate %154 RelaxedPrecision -OpDecorate %155 RelaxedPrecision -OpDecorate %163 RelaxedPrecision -OpDecorate %164 RelaxedPrecision -OpDecorate %165 RelaxedPrecision -OpDecorate %166 RelaxedPrecision -OpDecorate %167 RelaxedPrecision -OpDecorate %168 RelaxedPrecision -OpDecorate %169 RelaxedPrecision -OpDecorate %170 RelaxedPrecision -OpDecorate %171 RelaxedPrecision -OpDecorate %172 RelaxedPrecision -OpDecorate %173 RelaxedPrecision -OpDecorate %174 RelaxedPrecision -OpDecorate %175 RelaxedPrecision -OpDecorate %176 RelaxedPrecision -OpDecorate %177 RelaxedPrecision -OpDecorate %178 RelaxedPrecision -OpDecorate %179 RelaxedPrecision -OpDecorate %180 RelaxedPrecision -OpDecorate %181 RelaxedPrecision -OpDecorate %182 RelaxedPrecision -OpDecorate %183 RelaxedPrecision -OpDecorate %184 RelaxedPrecision -OpDecorate %185 RelaxedPrecision -OpDecorate %186 RelaxedPrecision -OpDecorate %187 RelaxedPrecision -OpDecorate %188 RelaxedPrecision -OpDecorate %189 RelaxedPrecision -OpDecorate %190 RelaxedPrecision -OpDecorate %191 RelaxedPrecision -OpDecorate %192 RelaxedPrecision -OpDecorate %202 RelaxedPrecision -OpDecorate %206 RelaxedPrecision -%float = OpTypeFloat 32 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %_kGuardedDivideEpsilon "$kGuardedDivideEpsilon" + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "src" + OpMemberName %_UniformBuffer 1 "dst" + OpName %blend_color_saturation_Qhh3 "blend_color_saturation_Qhh3" + OpName %blend_hslc_h4h2h4h4 "blend_hslc_h4h2h4h4" + OpName %alpha "alpha" + OpName %sda "sda" + OpName %dsa "dsa" + OpName %l "l" + OpName %r "r" + OpName %_2_mn "_2_mn" + OpName %_3_mx "_3_mx" + OpName %_4_lum "_4_lum" + OpName %_5_result "_5_result" + OpName %_6_minComp "_6_minComp" + OpName %_7_maxComp "_7_maxComp" + OpName %main "main" + OpDecorate %_kGuardedDivideEpsilon RelaxedPrecision + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %18 Binding 0 + OpDecorate %18 DescriptorSet 0 + OpDecorate %28 RelaxedPrecision + OpDecorate %29 RelaxedPrecision + OpDecorate %30 RelaxedPrecision + OpDecorate %31 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %alpha RelaxedPrecision + OpDecorate %53 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %55 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %sda RelaxedPrecision + OpDecorate %59 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %62 RelaxedPrecision + OpDecorate %63 RelaxedPrecision + OpDecorate %dsa RelaxedPrecision + OpDecorate %65 RelaxedPrecision + OpDecorate %66 RelaxedPrecision + OpDecorate %67 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %69 RelaxedPrecision + OpDecorate %l RelaxedPrecision + OpDecorate %71 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %78 RelaxedPrecision + OpDecorate %r RelaxedPrecision + OpDecorate %80 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %87 RelaxedPrecision + OpDecorate %88 RelaxedPrecision + OpDecorate %89 RelaxedPrecision + OpDecorate %_2_mn RelaxedPrecision + OpDecorate %96 RelaxedPrecision + OpDecorate %97 RelaxedPrecision + OpDecorate %98 RelaxedPrecision + OpDecorate %_3_mx RelaxedPrecision + OpDecorate %107 RelaxedPrecision + OpDecorate %108 RelaxedPrecision + OpDecorate %111 RelaxedPrecision + OpDecorate %112 RelaxedPrecision + OpDecorate %114 RelaxedPrecision + OpDecorate %115 RelaxedPrecision + OpDecorate %117 RelaxedPrecision + OpDecorate %_4_lum RelaxedPrecision + OpDecorate %119 RelaxedPrecision + OpDecorate %124 RelaxedPrecision + OpDecorate %_5_result RelaxedPrecision + OpDecorate %126 RelaxedPrecision + OpDecorate %127 RelaxedPrecision + OpDecorate %128 RelaxedPrecision + OpDecorate %129 RelaxedPrecision + OpDecorate %130 RelaxedPrecision + OpDecorate %131 RelaxedPrecision + OpDecorate %_6_minComp RelaxedPrecision + OpDecorate %135 RelaxedPrecision + OpDecorate %136 RelaxedPrecision + OpDecorate %137 RelaxedPrecision + OpDecorate %_7_maxComp RelaxedPrecision + OpDecorate %148 RelaxedPrecision + OpDecorate %149 RelaxedPrecision + OpDecorate %150 RelaxedPrecision + OpDecorate %151 RelaxedPrecision + OpDecorate %152 RelaxedPrecision + OpDecorate %153 RelaxedPrecision + OpDecorate %154 RelaxedPrecision + OpDecorate %155 RelaxedPrecision + OpDecorate %163 RelaxedPrecision + OpDecorate %164 RelaxedPrecision + OpDecorate %165 RelaxedPrecision + OpDecorate %166 RelaxedPrecision + OpDecorate %167 RelaxedPrecision + OpDecorate %168 RelaxedPrecision + OpDecorate %169 RelaxedPrecision + OpDecorate %170 RelaxedPrecision + OpDecorate %171 RelaxedPrecision + OpDecorate %172 RelaxedPrecision + OpDecorate %173 RelaxedPrecision + OpDecorate %174 RelaxedPrecision + OpDecorate %175 RelaxedPrecision + OpDecorate %176 RelaxedPrecision + OpDecorate %177 RelaxedPrecision + OpDecorate %178 RelaxedPrecision + OpDecorate %179 RelaxedPrecision + OpDecorate %180 RelaxedPrecision + OpDecorate %181 RelaxedPrecision + OpDecorate %182 RelaxedPrecision + OpDecorate %183 RelaxedPrecision + OpDecorate %184 RelaxedPrecision + OpDecorate %185 RelaxedPrecision + OpDecorate %186 RelaxedPrecision + OpDecorate %187 RelaxedPrecision + OpDecorate %188 RelaxedPrecision + OpDecorate %189 RelaxedPrecision + OpDecorate %190 RelaxedPrecision + OpDecorate %191 RelaxedPrecision + OpDecorate %192 RelaxedPrecision + OpDecorate %202 RelaxedPrecision + OpDecorate %206 RelaxedPrecision + %float = OpTypeFloat 32 %_ptr_Private_float = OpTypePointer Private %float %_kGuardedDivideEpsilon = OpVariable %_ptr_Private_float Private -%bool = OpTypeBool -%false = OpConstantFalse %bool + %bool = OpTypeBool + %false = OpConstantFalse %bool %float_9_99999994en09 = OpConstant %float 9.99999994e-09 -%float_0 = OpConstant %float 0 + %float_0 = OpConstant %float 0 %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%v4float = OpTypeVector %float 4 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%18 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%v3float = OpTypeVector %float 3 + %18 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %v3float = OpTypeVector %float 3 %_ptr_Function_v3float = OpTypePointer Function %v3float -%23 = OpTypeFunction %float %_ptr_Function_v3float -%v2float = OpTypeVector %float 2 + %23 = OpTypeFunction %float %_ptr_Function_v3float + %v2float = OpTypeVector %float 2 %_ptr_Function_v2float = OpTypePointer Function %v2float %_ptr_Function_v4float = OpTypePointer Function %v4float -%46 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float %_ptr_Function_v4float + %46 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float %_ptr_Function_v4float %_ptr_Function_float = OpTypePointer Function %float -%float_1 = OpConstant %float 1 -%116 = OpConstantComposite %v3float %float_0 %float_0 %float_0 + %float_1 = OpConstant %float 1 + %116 = OpConstantComposite %v3float %float_0 %float_0 %float_0 %float_0_300000012 = OpConstant %float 0.300000012 %float_0_589999974 = OpConstant %float 0.589999974 %float_0_109999999 = OpConstant %float 0.109999999 -%123 = OpConstantComposite %v3float %float_0_300000012 %float_0_589999974 %float_0_109999999 -%void = OpTypeVoid -%194 = OpTypeFunction %void -%196 = OpConstantComposite %v2float %float_1 %float_0 + %123 = OpConstantComposite %v3float %float_0_300000012 %float_0_589999974 %float_0_109999999 + %void = OpTypeVoid + %194 = OpTypeFunction %void + %196 = OpConstantComposite %v2float %float_1 %float_0 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 %blend_color_saturation_Qhh3 = OpFunction %float None %23 -%24 = OpFunctionParameter %_ptr_Function_v3float -%25 = OpLabel -%28 = OpLoad %v3float %24 -%29 = OpCompositeExtract %float %28 0 -%30 = OpLoad %v3float %24 -%31 = OpCompositeExtract %float %30 1 -%27 = OpExtInst %float %1 FMax %29 %31 -%32 = OpLoad %v3float %24 -%33 = OpCompositeExtract %float %32 2 -%26 = OpExtInst %float %1 FMax %27 %33 -%36 = OpLoad %v3float %24 -%37 = OpCompositeExtract %float %36 0 -%38 = OpLoad %v3float %24 -%39 = OpCompositeExtract %float %38 1 -%35 = OpExtInst %float %1 FMin %37 %39 -%40 = OpLoad %v3float %24 -%41 = OpCompositeExtract %float %40 2 -%34 = OpExtInst %float %1 FMin %35 %41 -%42 = OpFSub %float %26 %34 -OpReturnValue %42 -OpFunctionEnd + %24 = OpFunctionParameter %_ptr_Function_v3float + %25 = OpLabel + %28 = OpLoad %v3float %24 + %29 = OpCompositeExtract %float %28 0 + %30 = OpLoad %v3float %24 + %31 = OpCompositeExtract %float %30 1 + %27 = OpExtInst %float %1 FMax %29 %31 + %32 = OpLoad %v3float %24 + %33 = OpCompositeExtract %float %32 2 + %26 = OpExtInst %float %1 FMax %27 %33 + %36 = OpLoad %v3float %24 + %37 = OpCompositeExtract %float %36 0 + %38 = OpLoad %v3float %24 + %39 = OpCompositeExtract %float %38 1 + %35 = OpExtInst %float %1 FMin %37 %39 + %40 = OpLoad %v3float %24 + %41 = OpCompositeExtract %float %40 2 + %34 = OpExtInst %float %1 FMin %35 %41 + %42 = OpFSub %float %26 %34 + OpReturnValue %42 + OpFunctionEnd %blend_hslc_h4h2h4h4 = OpFunction %v4float None %46 -%47 = OpFunctionParameter %_ptr_Function_v2float -%48 = OpFunctionParameter %_ptr_Function_v4float -%49 = OpFunctionParameter %_ptr_Function_v4float -%50 = OpLabel -%alpha = OpVariable %_ptr_Function_float Function -%sda = OpVariable %_ptr_Function_v3float Function -%dsa = OpVariable %_ptr_Function_v3float Function -%l = OpVariable %_ptr_Function_v3float Function -%74 = OpVariable %_ptr_Function_v3float Function -%r = OpVariable %_ptr_Function_v3float Function -%83 = OpVariable %_ptr_Function_v3float Function -%_2_mn = OpVariable %_ptr_Function_float Function -%_3_mx = OpVariable %_ptr_Function_float Function -%103 = OpVariable %_ptr_Function_v3float Function -%109 = OpVariable %_ptr_Function_v3float Function -%_4_lum = OpVariable %_ptr_Function_float Function -%_5_result = OpVariable %_ptr_Function_v3float Function -%_6_minComp = OpVariable %_ptr_Function_float Function -%_7_maxComp = OpVariable %_ptr_Function_float Function -%53 = OpLoad %v4float %49 -%54 = OpCompositeExtract %float %53 3 -%55 = OpLoad %v4float %48 -%56 = OpCompositeExtract %float %55 3 -%57 = OpFMul %float %54 %56 -OpStore %alpha %57 -%59 = OpLoad %v4float %48 -%60 = OpVectorShuffle %v3float %59 %59 0 1 2 -%61 = OpLoad %v4float %49 -%62 = OpCompositeExtract %float %61 3 -%63 = OpVectorTimesScalar %v3float %60 %62 -OpStore %sda %63 -%65 = OpLoad %v4float %49 -%66 = OpVectorShuffle %v3float %65 %65 0 1 2 -%67 = OpLoad %v4float %48 -%68 = OpCompositeExtract %float %67 3 -%69 = OpVectorTimesScalar %v3float %66 %68 -OpStore %dsa %69 -%71 = OpLoad %v2float %47 -%72 = OpCompositeExtract %float %71 0 -%73 = OpFUnordNotEqual %bool %72 %float_0 -OpSelectionMerge %77 None -OpBranchConditional %73 %75 %76 -%75 = OpLabel -OpStore %74 %69 -OpBranch %77 -%76 = OpLabel -OpStore %74 %63 -OpBranch %77 -%77 = OpLabel -%78 = OpLoad %v3float %74 -OpStore %l %78 -%80 = OpLoad %v2float %47 -%81 = OpCompositeExtract %float %80 0 -%82 = OpFUnordNotEqual %bool %81 %float_0 -OpSelectionMerge %86 None -OpBranchConditional %82 %84 %85 -%84 = OpLabel -OpStore %83 %63 -OpBranch %86 -%85 = OpLabel -OpStore %83 %69 -OpBranch %86 -%86 = OpLabel -%87 = OpLoad %v3float %83 -OpStore %r %87 -%88 = OpLoad %v2float %47 -%89 = OpCompositeExtract %float %88 1 -%90 = OpFUnordNotEqual %bool %89 %float_0 -OpSelectionMerge %92 None -OpBranchConditional %90 %91 %92 -%91 = OpLabel -%96 = OpCompositeExtract %float %78 0 -%97 = OpCompositeExtract %float %78 1 -%95 = OpExtInst %float %1 FMin %96 %97 -%98 = OpCompositeExtract %float %78 2 -%94 = OpExtInst %float %1 FMin %95 %98 -OpStore %_2_mn %94 -%101 = OpExtInst %float %1 FMax %96 %97 -%100 = OpExtInst %float %1 FMax %101 %98 -OpStore %_3_mx %100 -%102 = OpFOrdGreaterThan %bool %100 %94 -OpSelectionMerge %106 None -OpBranchConditional %102 %104 %105 -%104 = OpLabel -%107 = OpCompositeConstruct %v3float %94 %94 %94 -%108 = OpFSub %v3float %78 %107 -OpStore %109 %87 -%110 = OpFunctionCall %float %blend_color_saturation_Qhh3 %109 -%111 = OpVectorTimesScalar %v3float %108 %110 -%112 = OpFSub %float %100 %94 -%114 = OpFDiv %float %float_1 %112 -%115 = OpVectorTimesScalar %v3float %111 %114 -OpStore %103 %115 -OpBranch %106 -%105 = OpLabel -OpStore %103 %116 -OpBranch %106 -%106 = OpLabel -%117 = OpLoad %v3float %103 -OpStore %l %117 -OpStore %r %69 -OpBranch %92 -%92 = OpLabel -%124 = OpLoad %v3float %r -%119 = OpDot %float %123 %124 -OpStore %_4_lum %119 -%127 = OpLoad %v3float %l -%126 = OpDot %float %123 %127 -%128 = OpFSub %float %119 %126 -%129 = OpLoad %v3float %l -%130 = OpCompositeConstruct %v3float %128 %128 %128 -%131 = OpFAdd %v3float %130 %129 -OpStore %_5_result %131 -%135 = OpCompositeExtract %float %131 0 -%136 = OpCompositeExtract %float %131 1 -%134 = OpExtInst %float %1 FMin %135 %136 -%137 = OpCompositeExtract %float %131 2 -%133 = OpExtInst %float %1 FMin %134 %137 -OpStore %_6_minComp %133 -%140 = OpExtInst %float %1 FMax %135 %136 -%139 = OpExtInst %float %1 FMax %140 %137 -OpStore %_7_maxComp %139 -%141 = OpFOrdLessThan %bool %133 %float_0 -OpSelectionMerge %143 None -OpBranchConditional %141 %142 %143 -%142 = OpLabel -%144 = OpFUnordNotEqual %bool %119 %133 -OpBranch %143 -%143 = OpLabel -%145 = OpPhi %bool %false %92 %144 %142 -OpSelectionMerge %147 None -OpBranchConditional %145 %146 %147 -%146 = OpLabel -%148 = OpCompositeConstruct %v3float %119 %119 %119 -%149 = OpFSub %v3float %131 %148 -%150 = OpFSub %float %119 %133 -%151 = OpLoad %float %_kGuardedDivideEpsilon -%152 = OpFAdd %float %150 %151 -%153 = OpFDiv %float %119 %152 -%154 = OpVectorTimesScalar %v3float %149 %153 -%155 = OpFAdd %v3float %148 %154 -OpStore %_5_result %155 -OpBranch %147 -%147 = OpLabel -%156 = OpFOrdGreaterThan %bool %139 %57 -OpSelectionMerge %158 None -OpBranchConditional %156 %157 %158 -%157 = OpLabel -%159 = OpFUnordNotEqual %bool %139 %119 -OpBranch %158 -%158 = OpLabel -%160 = OpPhi %bool %false %147 %159 %157 -OpSelectionMerge %162 None -OpBranchConditional %160 %161 %162 -%161 = OpLabel -%163 = OpLoad %v3float %_5_result -%164 = OpCompositeConstruct %v3float %119 %119 %119 -%165 = OpFSub %v3float %163 %164 -%166 = OpFSub %float %57 %119 -%167 = OpVectorTimesScalar %v3float %165 %166 -%168 = OpFSub %float %139 %119 -%169 = OpLoad %float %_kGuardedDivideEpsilon -%170 = OpFAdd %float %168 %169 -%171 = OpFDiv %float %float_1 %170 -%172 = OpVectorTimesScalar %v3float %167 %171 -%173 = OpFAdd %v3float %164 %172 -OpStore %_5_result %173 -OpBranch %162 -%162 = OpLabel -%174 = OpLoad %v3float %_5_result -%175 = OpLoad %v4float %49 -%176 = OpVectorShuffle %v3float %175 %175 0 1 2 -%177 = OpFAdd %v3float %174 %176 -%178 = OpFSub %v3float %177 %69 -%179 = OpLoad %v4float %48 -%180 = OpVectorShuffle %v3float %179 %179 0 1 2 -%181 = OpFAdd %v3float %178 %180 -%182 = OpFSub %v3float %181 %63 -%183 = OpCompositeExtract %float %182 0 -%184 = OpCompositeExtract %float %182 1 -%185 = OpCompositeExtract %float %182 2 -%186 = OpLoad %v4float %48 -%187 = OpCompositeExtract %float %186 3 -%188 = OpLoad %v4float %49 -%189 = OpCompositeExtract %float %188 3 -%190 = OpFAdd %float %187 %189 -%191 = OpFSub %float %190 %57 -%192 = OpCompositeConstruct %v4float %183 %184 %185 %191 -OpReturnValue %192 -OpFunctionEnd -%main = OpFunction %void None %194 -%195 = OpLabel -%197 = OpVariable %_ptr_Function_v2float Function -%203 = OpVariable %_ptr_Function_v4float Function -%207 = OpVariable %_ptr_Function_v4float Function -%10 = OpSelect %float %false %float_9_99999994en09 %float_0 -OpStore %_kGuardedDivideEpsilon %10 -OpStore %197 %196 -%198 = OpAccessChain %_ptr_Uniform_v4float %18 %int_0 -%202 = OpLoad %v4float %198 -OpStore %203 %202 -%204 = OpAccessChain %_ptr_Uniform_v4float %18 %int_1 -%206 = OpLoad %v4float %204 -OpStore %207 %206 -%208 = OpFunctionCall %v4float %blend_hslc_h4h2h4h4 %197 %203 %207 -OpStore %sk_FragColor %208 -OpReturn -OpFunctionEnd + %47 = OpFunctionParameter %_ptr_Function_v2float + %48 = OpFunctionParameter %_ptr_Function_v4float + %49 = OpFunctionParameter %_ptr_Function_v4float + %50 = OpLabel + %alpha = OpVariable %_ptr_Function_float Function + %sda = OpVariable %_ptr_Function_v3float Function + %dsa = OpVariable %_ptr_Function_v3float Function + %l = OpVariable %_ptr_Function_v3float Function + %74 = OpVariable %_ptr_Function_v3float Function + %r = OpVariable %_ptr_Function_v3float Function + %83 = OpVariable %_ptr_Function_v3float Function + %_2_mn = OpVariable %_ptr_Function_float Function + %_3_mx = OpVariable %_ptr_Function_float Function + %103 = OpVariable %_ptr_Function_v3float Function + %109 = OpVariable %_ptr_Function_v3float Function + %_4_lum = OpVariable %_ptr_Function_float Function + %_5_result = OpVariable %_ptr_Function_v3float Function + %_6_minComp = OpVariable %_ptr_Function_float Function + %_7_maxComp = OpVariable %_ptr_Function_float Function + %53 = OpLoad %v4float %49 + %54 = OpCompositeExtract %float %53 3 + %55 = OpLoad %v4float %48 + %56 = OpCompositeExtract %float %55 3 + %57 = OpFMul %float %54 %56 + OpStore %alpha %57 + %59 = OpLoad %v4float %48 + %60 = OpVectorShuffle %v3float %59 %59 0 1 2 + %61 = OpLoad %v4float %49 + %62 = OpCompositeExtract %float %61 3 + %63 = OpVectorTimesScalar %v3float %60 %62 + OpStore %sda %63 + %65 = OpLoad %v4float %49 + %66 = OpVectorShuffle %v3float %65 %65 0 1 2 + %67 = OpLoad %v4float %48 + %68 = OpCompositeExtract %float %67 3 + %69 = OpVectorTimesScalar %v3float %66 %68 + OpStore %dsa %69 + %71 = OpLoad %v2float %47 + %72 = OpCompositeExtract %float %71 0 + %73 = OpFUnordNotEqual %bool %72 %float_0 + OpSelectionMerge %77 None + OpBranchConditional %73 %75 %76 + %75 = OpLabel + OpStore %74 %69 + OpBranch %77 + %76 = OpLabel + OpStore %74 %63 + OpBranch %77 + %77 = OpLabel + %78 = OpLoad %v3float %74 + OpStore %l %78 + %80 = OpLoad %v2float %47 + %81 = OpCompositeExtract %float %80 0 + %82 = OpFUnordNotEqual %bool %81 %float_0 + OpSelectionMerge %86 None + OpBranchConditional %82 %84 %85 + %84 = OpLabel + OpStore %83 %63 + OpBranch %86 + %85 = OpLabel + OpStore %83 %69 + OpBranch %86 + %86 = OpLabel + %87 = OpLoad %v3float %83 + OpStore %r %87 + %88 = OpLoad %v2float %47 + %89 = OpCompositeExtract %float %88 1 + %90 = OpFUnordNotEqual %bool %89 %float_0 + OpSelectionMerge %92 None + OpBranchConditional %90 %91 %92 + %91 = OpLabel + %96 = OpCompositeExtract %float %78 0 + %97 = OpCompositeExtract %float %78 1 + %95 = OpExtInst %float %1 FMin %96 %97 + %98 = OpCompositeExtract %float %78 2 + %94 = OpExtInst %float %1 FMin %95 %98 + OpStore %_2_mn %94 + %101 = OpExtInst %float %1 FMax %96 %97 + %100 = OpExtInst %float %1 FMax %101 %98 + OpStore %_3_mx %100 + %102 = OpFOrdGreaterThan %bool %100 %94 + OpSelectionMerge %106 None + OpBranchConditional %102 %104 %105 + %104 = OpLabel + %107 = OpCompositeConstruct %v3float %94 %94 %94 + %108 = OpFSub %v3float %78 %107 + OpStore %109 %87 + %110 = OpFunctionCall %float %blend_color_saturation_Qhh3 %109 + %111 = OpVectorTimesScalar %v3float %108 %110 + %112 = OpFSub %float %100 %94 + %114 = OpFDiv %float %float_1 %112 + %115 = OpVectorTimesScalar %v3float %111 %114 + OpStore %103 %115 + OpBranch %106 + %105 = OpLabel + OpStore %103 %116 + OpBranch %106 + %106 = OpLabel + %117 = OpLoad %v3float %103 + OpStore %l %117 + OpStore %r %69 + OpBranch %92 + %92 = OpLabel + %124 = OpLoad %v3float %r + %119 = OpDot %float %123 %124 + OpStore %_4_lum %119 + %127 = OpLoad %v3float %l + %126 = OpDot %float %123 %127 + %128 = OpFSub %float %119 %126 + %129 = OpLoad %v3float %l + %130 = OpCompositeConstruct %v3float %128 %128 %128 + %131 = OpFAdd %v3float %130 %129 + OpStore %_5_result %131 + %135 = OpCompositeExtract %float %131 0 + %136 = OpCompositeExtract %float %131 1 + %134 = OpExtInst %float %1 FMin %135 %136 + %137 = OpCompositeExtract %float %131 2 + %133 = OpExtInst %float %1 FMin %134 %137 + OpStore %_6_minComp %133 + %140 = OpExtInst %float %1 FMax %135 %136 + %139 = OpExtInst %float %1 FMax %140 %137 + OpStore %_7_maxComp %139 + %141 = OpFOrdLessThan %bool %133 %float_0 + OpSelectionMerge %143 None + OpBranchConditional %141 %142 %143 + %142 = OpLabel + %144 = OpFUnordNotEqual %bool %119 %133 + OpBranch %143 + %143 = OpLabel + %145 = OpPhi %bool %false %92 %144 %142 + OpSelectionMerge %147 None + OpBranchConditional %145 %146 %147 + %146 = OpLabel + %148 = OpCompositeConstruct %v3float %119 %119 %119 + %149 = OpFSub %v3float %131 %148 + %150 = OpFSub %float %119 %133 + %151 = OpLoad %float %_kGuardedDivideEpsilon + %152 = OpFAdd %float %150 %151 + %153 = OpFDiv %float %119 %152 + %154 = OpVectorTimesScalar %v3float %149 %153 + %155 = OpFAdd %v3float %148 %154 + OpStore %_5_result %155 + OpBranch %147 + %147 = OpLabel + %156 = OpFOrdGreaterThan %bool %139 %57 + OpSelectionMerge %158 None + OpBranchConditional %156 %157 %158 + %157 = OpLabel + %159 = OpFUnordNotEqual %bool %139 %119 + OpBranch %158 + %158 = OpLabel + %160 = OpPhi %bool %false %147 %159 %157 + OpSelectionMerge %162 None + OpBranchConditional %160 %161 %162 + %161 = OpLabel + %163 = OpLoad %v3float %_5_result + %164 = OpCompositeConstruct %v3float %119 %119 %119 + %165 = OpFSub %v3float %163 %164 + %166 = OpFSub %float %57 %119 + %167 = OpVectorTimesScalar %v3float %165 %166 + %168 = OpFSub %float %139 %119 + %169 = OpLoad %float %_kGuardedDivideEpsilon + %170 = OpFAdd %float %168 %169 + %171 = OpFDiv %float %float_1 %170 + %172 = OpVectorTimesScalar %v3float %167 %171 + %173 = OpFAdd %v3float %164 %172 + OpStore %_5_result %173 + OpBranch %162 + %162 = OpLabel + %174 = OpLoad %v3float %_5_result + %175 = OpLoad %v4float %49 + %176 = OpVectorShuffle %v3float %175 %175 0 1 2 + %177 = OpFAdd %v3float %174 %176 + %178 = OpFSub %v3float %177 %69 + %179 = OpLoad %v4float %48 + %180 = OpVectorShuffle %v3float %179 %179 0 1 2 + %181 = OpFAdd %v3float %178 %180 + %182 = OpFSub %v3float %181 %63 + %183 = OpCompositeExtract %float %182 0 + %184 = OpCompositeExtract %float %182 1 + %185 = OpCompositeExtract %float %182 2 + %186 = OpLoad %v4float %48 + %187 = OpCompositeExtract %float %186 3 + %188 = OpLoad %v4float %49 + %189 = OpCompositeExtract %float %188 3 + %190 = OpFAdd %float %187 %189 + %191 = OpFSub %float %190 %57 + %192 = OpCompositeConstruct %v4float %183 %184 %185 %191 + OpReturnValue %192 + OpFunctionEnd + %main = OpFunction %void None %194 + %195 = OpLabel + %197 = OpVariable %_ptr_Function_v2float Function + %203 = OpVariable %_ptr_Function_v4float Function + %207 = OpVariable %_ptr_Function_v4float Function + %10 = OpSelect %float %false %float_9_99999994en09 %float_0 + OpStore %_kGuardedDivideEpsilon %10 + OpStore %197 %196 + %198 = OpAccessChain %_ptr_Uniform_v4float %18 %int_0 + %202 = OpLoad %v4float %198 + OpStore %203 %202 + %204 = OpAccessChain %_ptr_Uniform_v4float %18 %int_1 + %206 = OpLoad %v4float %204 + OpStore %207 %206 + %208 = OpFunctionCall %v4float %blend_hslc_h4h2h4h4 %197 %203 %207 + OpStore %sk_FragColor %208 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/blend/BlendLuminosity.wgsl b/tests/sksl/blend/BlendLuminosity.wgsl index f3fdf7a4fb39..764857ddaf08 100644 --- a/tests/sksl/blend/BlendLuminosity.wgsl +++ b/tests/sksl/blend/BlendLuminosity.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; @@ -30,7 +31,7 @@ fn blend_hslc_h4h2h4h4(_skParam0: vec2, _skParam1: vec4, _skParam2: ve var dsa: vec3 = dst.xyz * src.w; var l: vec3 = select(sda, dsa, vec3(bool(flipSat.x))); var r: vec3 = select(dsa, sda, vec3(bool(flipSat.x))); - if (bool(flipSat.y)) { + if bool(flipSat.y) { { let _skTemp4 = min(l.x, l.y); let _skTemp5 = min(_skTemp4, l.z); @@ -53,12 +54,12 @@ fn blend_hslc_h4h2h4h4(_skParam0: vec2, _skParam1: vec4, _skParam2: ve let _skTemp13 = max(_5_result.x, _5_result.y); let _skTemp14 = max(_skTemp13, _5_result.z); var _7_maxComp: f32 = _skTemp14; - if (_6_minComp < 0.0 && _4_lum != _6_minComp) { + if (_6_minComp < 0.0) && (_4_lum != _6_minComp) { { _5_result = _4_lum + (_5_result - _4_lum) * (_4_lum / ((_4_lum - _6_minComp) + sk_PrivkGuardedDivideEpsilon)); } } - if (_7_maxComp > alpha && _7_maxComp != _4_lum) { + if (_7_maxComp > alpha) && (_7_maxComp != _4_lum) { { _5_result = _4_lum + ((_5_result - _4_lum) * (alpha - _4_lum)) / ((_7_maxComp - _4_lum) + sk_PrivkGuardedDivideEpsilon); } diff --git a/tests/sksl/blend/BlendModulate.asm.frag b/tests/sksl/blend/BlendModulate.asm.frag index 84992c61d750..86ad08286622 100644 --- a/tests/sksl/blend/BlendModulate.asm.frag +++ b/tests/sksl/blend/BlendModulate.asm.frag @@ -1,51 +1,51 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "src" -OpMemberName %_UniformBuffer 1 "dst" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %20 RelaxedPrecision -OpDecorate %23 RelaxedPrecision -OpDecorate %24 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "src" + OpMemberName %_UniformBuffer 1 "dst" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %20 RelaxedPrecision + OpDecorate %23 RelaxedPrecision + OpDecorate %24 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%14 = OpTypeFunction %void + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %14 = OpTypeFunction %void %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%main = OpFunction %void None %14 -%15 = OpLabel -%16 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%20 = OpLoad %v4float %16 -%21 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%23 = OpLoad %v4float %21 -%24 = OpFMul %v4float %20 %23 -OpStore %sk_FragColor %24 -OpReturn -OpFunctionEnd + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %main = OpFunction %void None %14 + %15 = OpLabel + %16 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %20 = OpLoad %v4float %16 + %21 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %23 = OpLoad %v4float %21 + %24 = OpFMul %v4float %20 %23 + OpStore %sk_FragColor %24 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/blend/BlendModulate.wgsl b/tests/sksl/blend/BlendModulate.wgsl index 28f684463bac..673561667c5a 100644 --- a/tests/sksl/blend/BlendModulate.wgsl +++ b/tests/sksl/blend/BlendModulate.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/blend/BlendMultiply.asm.frag b/tests/sksl/blend/BlendMultiply.asm.frag index f1f56a70c1f2..3500737d0772 100644 --- a/tests/sksl/blend/BlendMultiply.asm.frag +++ b/tests/sksl/blend/BlendMultiply.asm.frag @@ -1,118 +1,118 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "src" -OpMemberName %_UniformBuffer 1 "dst" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %21 RelaxedPrecision -OpDecorate %22 RelaxedPrecision -OpDecorate %23 RelaxedPrecision -OpDecorate %26 RelaxedPrecision -OpDecorate %27 RelaxedPrecision -OpDecorate %29 RelaxedPrecision -OpDecorate %31 RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %35 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %45 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %48 RelaxedPrecision -OpDecorate %49 RelaxedPrecision -OpDecorate %51 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %55 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %58 RelaxedPrecision -OpDecorate %59 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %62 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "src" + OpMemberName %_UniformBuffer 1 "dst" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %21 RelaxedPrecision + OpDecorate %22 RelaxedPrecision + OpDecorate %23 RelaxedPrecision + OpDecorate %26 RelaxedPrecision + OpDecorate %27 RelaxedPrecision + OpDecorate %29 RelaxedPrecision + OpDecorate %31 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %35 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %45 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %48 RelaxedPrecision + OpDecorate %49 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %55 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %58 RelaxedPrecision + OpDecorate %59 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %62 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%14 = OpTypeFunction %void -%float_1 = OpConstant %float 1 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %14 = OpTypeFunction %void + %float_1 = OpConstant %float 1 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%v3float = OpTypeVector %float 3 -%main = OpFunction %void None %14 -%15 = OpLabel -%17 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%21 = OpLoad %v4float %17 -%22 = OpCompositeExtract %float %21 3 -%23 = OpFSub %float %float_1 %22 -%24 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%26 = OpLoad %v4float %24 -%27 = OpVectorShuffle %v3float %26 %26 0 1 2 -%29 = OpVectorTimesScalar %v3float %27 %23 -%30 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%31 = OpLoad %v4float %30 -%32 = OpCompositeExtract %float %31 3 -%33 = OpFSub %float %float_1 %32 -%34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%35 = OpLoad %v4float %34 -%36 = OpVectorShuffle %v3float %35 %35 0 1 2 -%37 = OpVectorTimesScalar %v3float %36 %33 -%38 = OpFAdd %v3float %29 %37 -%39 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%40 = OpLoad %v4float %39 -%41 = OpVectorShuffle %v3float %40 %40 0 1 2 -%42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%43 = OpLoad %v4float %42 -%44 = OpVectorShuffle %v3float %43 %43 0 1 2 -%45 = OpFMul %v3float %41 %44 -%46 = OpFAdd %v3float %38 %45 -%47 = OpCompositeExtract %float %46 0 -%48 = OpCompositeExtract %float %46 1 -%49 = OpCompositeExtract %float %46 2 -%50 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%51 = OpLoad %v4float %50 -%52 = OpCompositeExtract %float %51 3 -%53 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%54 = OpLoad %v4float %53 -%55 = OpCompositeExtract %float %54 3 -%56 = OpFSub %float %float_1 %55 -%57 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%58 = OpLoad %v4float %57 -%59 = OpCompositeExtract %float %58 3 -%60 = OpFMul %float %56 %59 -%61 = OpFAdd %float %52 %60 -%62 = OpCompositeConstruct %v4float %47 %48 %49 %61 -OpStore %sk_FragColor %62 -OpReturn -OpFunctionEnd + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %v3float = OpTypeVector %float 3 + %main = OpFunction %void None %14 + %15 = OpLabel + %17 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %21 = OpLoad %v4float %17 + %22 = OpCompositeExtract %float %21 3 + %23 = OpFSub %float %float_1 %22 + %24 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %26 = OpLoad %v4float %24 + %27 = OpVectorShuffle %v3float %26 %26 0 1 2 + %29 = OpVectorTimesScalar %v3float %27 %23 + %30 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %31 = OpLoad %v4float %30 + %32 = OpCompositeExtract %float %31 3 + %33 = OpFSub %float %float_1 %32 + %34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %35 = OpLoad %v4float %34 + %36 = OpVectorShuffle %v3float %35 %35 0 1 2 + %37 = OpVectorTimesScalar %v3float %36 %33 + %38 = OpFAdd %v3float %29 %37 + %39 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %40 = OpLoad %v4float %39 + %41 = OpVectorShuffle %v3float %40 %40 0 1 2 + %42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %43 = OpLoad %v4float %42 + %44 = OpVectorShuffle %v3float %43 %43 0 1 2 + %45 = OpFMul %v3float %41 %44 + %46 = OpFAdd %v3float %38 %45 + %47 = OpCompositeExtract %float %46 0 + %48 = OpCompositeExtract %float %46 1 + %49 = OpCompositeExtract %float %46 2 + %50 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %51 = OpLoad %v4float %50 + %52 = OpCompositeExtract %float %51 3 + %53 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %54 = OpLoad %v4float %53 + %55 = OpCompositeExtract %float %54 3 + %56 = OpFSub %float %float_1 %55 + %57 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %58 = OpLoad %v4float %57 + %59 = OpCompositeExtract %float %58 3 + %60 = OpFMul %float %56 %59 + %61 = OpFAdd %float %52 %60 + %62 = OpCompositeConstruct %v4float %47 %48 %49 %61 + OpStore %sk_FragColor %62 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/blend/BlendMultiply.wgsl b/tests/sksl/blend/BlendMultiply.wgsl index 47ee4e8e0f1d..46467affeb9a 100644 --- a/tests/sksl/blend/BlendMultiply.wgsl +++ b/tests/sksl/blend/BlendMultiply.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/blend/BlendOverlay.asm.frag b/tests/sksl/blend/BlendOverlay.asm.frag index f58521d1a193..7665583b1786 100644 --- a/tests/sksl/blend/BlendOverlay.asm.frag +++ b/tests/sksl/blend/BlendOverlay.asm.frag @@ -1,242 +1,242 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "src" -OpMemberName %_UniformBuffer 1 "dst" -OpName %blend_overlay_component_Qhh2h2 "blend_overlay_component_Qhh2h2" -OpName %main "main" -OpName %_0_result "_0_result" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %11 Binding 0 -OpDecorate %11 DescriptorSet 0 -OpDecorate %21 RelaxedPrecision -OpDecorate %22 RelaxedPrecision -OpDecorate %23 RelaxedPrecision -OpDecorate %24 RelaxedPrecision -OpDecorate %25 RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %34 RelaxedPrecision -OpDecorate %35 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %39 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %45 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %48 RelaxedPrecision -OpDecorate %49 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %51 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %53 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %55 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %_0_result RelaxedPrecision -OpDecorate %66 RelaxedPrecision -OpDecorate %67 RelaxedPrecision -OpDecorate %71 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %76 RelaxedPrecision -OpDecorate %77 RelaxedPrecision -OpDecorate %80 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %85 RelaxedPrecision -OpDecorate %86 RelaxedPrecision -OpDecorate %89 RelaxedPrecision -OpDecorate %90 RelaxedPrecision -OpDecorate %94 RelaxedPrecision -OpDecorate %95 RelaxedPrecision -OpDecorate %98 RelaxedPrecision -OpDecorate %99 RelaxedPrecision -OpDecorate %100 RelaxedPrecision -OpDecorate %102 RelaxedPrecision -OpDecorate %103 RelaxedPrecision -OpDecorate %104 RelaxedPrecision -OpDecorate %105 RelaxedPrecision -OpDecorate %106 RelaxedPrecision -OpDecorate %107 RelaxedPrecision -OpDecorate %108 RelaxedPrecision -OpDecorate %111 RelaxedPrecision -OpDecorate %112 RelaxedPrecision -OpDecorate %114 RelaxedPrecision -OpDecorate %115 RelaxedPrecision -OpDecorate %116 RelaxedPrecision -OpDecorate %117 RelaxedPrecision -OpDecorate %119 RelaxedPrecision -OpDecorate %120 RelaxedPrecision -OpDecorate %122 RelaxedPrecision -OpDecorate %123 RelaxedPrecision -OpDecorate %124 RelaxedPrecision -OpDecorate %125 RelaxedPrecision -OpDecorate %126 RelaxedPrecision -OpDecorate %127 RelaxedPrecision -OpDecorate %128 RelaxedPrecision -OpDecorate %129 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "src" + OpMemberName %_UniformBuffer 1 "dst" + OpName %blend_overlay_component_Qhh2h2 "blend_overlay_component_Qhh2h2" + OpName %main "main" + OpName %_0_result "_0_result" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %11 Binding 0 + OpDecorate %11 DescriptorSet 0 + OpDecorate %21 RelaxedPrecision + OpDecorate %22 RelaxedPrecision + OpDecorate %23 RelaxedPrecision + OpDecorate %24 RelaxedPrecision + OpDecorate %25 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %34 RelaxedPrecision + OpDecorate %35 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %45 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %48 RelaxedPrecision + OpDecorate %49 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %53 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %55 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %_0_result RelaxedPrecision + OpDecorate %66 RelaxedPrecision + OpDecorate %67 RelaxedPrecision + OpDecorate %71 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %76 RelaxedPrecision + OpDecorate %77 RelaxedPrecision + OpDecorate %80 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %85 RelaxedPrecision + OpDecorate %86 RelaxedPrecision + OpDecorate %89 RelaxedPrecision + OpDecorate %90 RelaxedPrecision + OpDecorate %94 RelaxedPrecision + OpDecorate %95 RelaxedPrecision + OpDecorate %98 RelaxedPrecision + OpDecorate %99 RelaxedPrecision + OpDecorate %100 RelaxedPrecision + OpDecorate %102 RelaxedPrecision + OpDecorate %103 RelaxedPrecision + OpDecorate %104 RelaxedPrecision + OpDecorate %105 RelaxedPrecision + OpDecorate %106 RelaxedPrecision + OpDecorate %107 RelaxedPrecision + OpDecorate %108 RelaxedPrecision + OpDecorate %111 RelaxedPrecision + OpDecorate %112 RelaxedPrecision + OpDecorate %114 RelaxedPrecision + OpDecorate %115 RelaxedPrecision + OpDecorate %116 RelaxedPrecision + OpDecorate %117 RelaxedPrecision + OpDecorate %119 RelaxedPrecision + OpDecorate %120 RelaxedPrecision + OpDecorate %122 RelaxedPrecision + OpDecorate %123 RelaxedPrecision + OpDecorate %124 RelaxedPrecision + OpDecorate %125 RelaxedPrecision + OpDecorate %126 RelaxedPrecision + OpDecorate %127 RelaxedPrecision + OpDecorate %128 RelaxedPrecision + OpDecorate %129 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%v2float = OpTypeVector %float 2 + %11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %v2float = OpTypeVector %float 2 %_ptr_Function_v2float = OpTypePointer Function %v2float -%16 = OpTypeFunction %float %_ptr_Function_v2float %_ptr_Function_v2float -%float_2 = OpConstant %float 2 + %16 = OpTypeFunction %float %_ptr_Function_v2float %_ptr_Function_v2float + %float_2 = OpConstant %float 2 %_ptr_Function_float = OpTypePointer Function %float -%void = OpTypeVoid -%58 = OpTypeFunction %void + %void = OpTypeVoid + %58 = OpTypeFunction %void %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%float_1 = OpConstant %float 1 -%v3float = OpTypeVector %float 3 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %float_1 = OpConstant %float 1 + %v3float = OpTypeVector %float 3 %blend_overlay_component_Qhh2h2 = OpFunction %float None %16 -%17 = OpFunctionParameter %_ptr_Function_v2float -%18 = OpFunctionParameter %_ptr_Function_v2float -%19 = OpLabel -%27 = OpVariable %_ptr_Function_float Function -%21 = OpLoad %v2float %18 -%22 = OpCompositeExtract %float %21 0 -%23 = OpFMul %float %float_2 %22 -%24 = OpLoad %v2float %18 -%25 = OpCompositeExtract %float %24 1 -%26 = OpFOrdLessThanEqual %bool %23 %25 -OpSelectionMerge %31 None -OpBranchConditional %26 %29 %30 -%29 = OpLabel -%32 = OpLoad %v2float %17 -%33 = OpCompositeExtract %float %32 0 -%34 = OpFMul %float %float_2 %33 -%35 = OpLoad %v2float %18 -%36 = OpCompositeExtract %float %35 0 -%37 = OpFMul %float %34 %36 -OpStore %27 %37 -OpBranch %31 -%30 = OpLabel -%38 = OpLoad %v2float %17 -%39 = OpCompositeExtract %float %38 1 -%40 = OpLoad %v2float %18 -%41 = OpCompositeExtract %float %40 1 -%42 = OpFMul %float %39 %41 -%43 = OpLoad %v2float %18 -%44 = OpCompositeExtract %float %43 1 -%45 = OpLoad %v2float %18 -%46 = OpCompositeExtract %float %45 0 -%47 = OpFSub %float %44 %46 -%48 = OpFMul %float %float_2 %47 -%49 = OpLoad %v2float %17 -%50 = OpCompositeExtract %float %49 1 -%51 = OpLoad %v2float %17 -%52 = OpCompositeExtract %float %51 0 -%53 = OpFSub %float %50 %52 -%54 = OpFMul %float %48 %53 -%55 = OpFSub %float %42 %54 -OpStore %27 %55 -OpBranch %31 -%31 = OpLabel -%56 = OpLoad %float %27 -OpReturnValue %56 -OpFunctionEnd -%main = OpFunction %void None %58 -%59 = OpLabel -%_0_result = OpVariable %_ptr_Function_v4float Function -%68 = OpVariable %_ptr_Function_v2float Function -%73 = OpVariable %_ptr_Function_v2float Function -%78 = OpVariable %_ptr_Function_v2float Function -%82 = OpVariable %_ptr_Function_v2float Function -%87 = OpVariable %_ptr_Function_v2float Function -%91 = OpVariable %_ptr_Function_v2float Function -%62 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 -%66 = OpLoad %v4float %62 -%67 = OpVectorShuffle %v2float %66 %66 0 3 -OpStore %68 %67 -%69 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 -%71 = OpLoad %v4float %69 -%72 = OpVectorShuffle %v2float %71 %71 0 3 -OpStore %73 %72 -%74 = OpFunctionCall %float %blend_overlay_component_Qhh2h2 %68 %73 -%75 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 -%76 = OpLoad %v4float %75 -%77 = OpVectorShuffle %v2float %76 %76 1 3 -OpStore %78 %77 -%79 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 -%80 = OpLoad %v4float %79 -%81 = OpVectorShuffle %v2float %80 %80 1 3 -OpStore %82 %81 -%83 = OpFunctionCall %float %blend_overlay_component_Qhh2h2 %78 %82 -%84 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 -%85 = OpLoad %v4float %84 -%86 = OpVectorShuffle %v2float %85 %85 2 3 -OpStore %87 %86 -%88 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 -%89 = OpLoad %v4float %88 -%90 = OpVectorShuffle %v2float %89 %89 2 3 -OpStore %91 %90 -%92 = OpFunctionCall %float %blend_overlay_component_Qhh2h2 %87 %91 -%93 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 -%94 = OpLoad %v4float %93 -%95 = OpCompositeExtract %float %94 3 -%97 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 -%98 = OpLoad %v4float %97 -%99 = OpCompositeExtract %float %98 3 -%100 = OpFSub %float %float_1 %99 -%101 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 -%102 = OpLoad %v4float %101 -%103 = OpCompositeExtract %float %102 3 -%104 = OpFMul %float %100 %103 -%105 = OpFAdd %float %95 %104 -%106 = OpCompositeConstruct %v4float %74 %83 %92 %105 -OpStore %_0_result %106 -%107 = OpLoad %v4float %_0_result -%108 = OpVectorShuffle %v3float %107 %107 0 1 2 -%110 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 -%111 = OpLoad %v4float %110 -%112 = OpVectorShuffle %v3float %111 %111 0 1 2 -%113 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 -%114 = OpLoad %v4float %113 -%115 = OpCompositeExtract %float %114 3 -%116 = OpFSub %float %float_1 %115 -%117 = OpVectorTimesScalar %v3float %112 %116 -%118 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 -%119 = OpLoad %v4float %118 -%120 = OpVectorShuffle %v3float %119 %119 0 1 2 -%121 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 -%122 = OpLoad %v4float %121 -%123 = OpCompositeExtract %float %122 3 -%124 = OpFSub %float %float_1 %123 -%125 = OpVectorTimesScalar %v3float %120 %124 -%126 = OpFAdd %v3float %117 %125 -%127 = OpFAdd %v3float %108 %126 -%128 = OpLoad %v4float %_0_result -%129 = OpVectorShuffle %v4float %128 %127 4 5 6 3 -OpStore %_0_result %129 -OpStore %sk_FragColor %129 -OpReturn -OpFunctionEnd + %17 = OpFunctionParameter %_ptr_Function_v2float + %18 = OpFunctionParameter %_ptr_Function_v2float + %19 = OpLabel + %27 = OpVariable %_ptr_Function_float Function + %21 = OpLoad %v2float %18 + %22 = OpCompositeExtract %float %21 0 + %23 = OpFMul %float %float_2 %22 + %24 = OpLoad %v2float %18 + %25 = OpCompositeExtract %float %24 1 + %26 = OpFOrdLessThanEqual %bool %23 %25 + OpSelectionMerge %31 None + OpBranchConditional %26 %29 %30 + %29 = OpLabel + %32 = OpLoad %v2float %17 + %33 = OpCompositeExtract %float %32 0 + %34 = OpFMul %float %float_2 %33 + %35 = OpLoad %v2float %18 + %36 = OpCompositeExtract %float %35 0 + %37 = OpFMul %float %34 %36 + OpStore %27 %37 + OpBranch %31 + %30 = OpLabel + %38 = OpLoad %v2float %17 + %39 = OpCompositeExtract %float %38 1 + %40 = OpLoad %v2float %18 + %41 = OpCompositeExtract %float %40 1 + %42 = OpFMul %float %39 %41 + %43 = OpLoad %v2float %18 + %44 = OpCompositeExtract %float %43 1 + %45 = OpLoad %v2float %18 + %46 = OpCompositeExtract %float %45 0 + %47 = OpFSub %float %44 %46 + %48 = OpFMul %float %float_2 %47 + %49 = OpLoad %v2float %17 + %50 = OpCompositeExtract %float %49 1 + %51 = OpLoad %v2float %17 + %52 = OpCompositeExtract %float %51 0 + %53 = OpFSub %float %50 %52 + %54 = OpFMul %float %48 %53 + %55 = OpFSub %float %42 %54 + OpStore %27 %55 + OpBranch %31 + %31 = OpLabel + %56 = OpLoad %float %27 + OpReturnValue %56 + OpFunctionEnd + %main = OpFunction %void None %58 + %59 = OpLabel + %_0_result = OpVariable %_ptr_Function_v4float Function + %68 = OpVariable %_ptr_Function_v2float Function + %73 = OpVariable %_ptr_Function_v2float Function + %78 = OpVariable %_ptr_Function_v2float Function + %82 = OpVariable %_ptr_Function_v2float Function + %87 = OpVariable %_ptr_Function_v2float Function + %91 = OpVariable %_ptr_Function_v2float Function + %62 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 + %66 = OpLoad %v4float %62 + %67 = OpVectorShuffle %v2float %66 %66 0 3 + OpStore %68 %67 + %69 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 + %71 = OpLoad %v4float %69 + %72 = OpVectorShuffle %v2float %71 %71 0 3 + OpStore %73 %72 + %74 = OpFunctionCall %float %blend_overlay_component_Qhh2h2 %68 %73 + %75 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 + %76 = OpLoad %v4float %75 + %77 = OpVectorShuffle %v2float %76 %76 1 3 + OpStore %78 %77 + %79 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 + %80 = OpLoad %v4float %79 + %81 = OpVectorShuffle %v2float %80 %80 1 3 + OpStore %82 %81 + %83 = OpFunctionCall %float %blend_overlay_component_Qhh2h2 %78 %82 + %84 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 + %85 = OpLoad %v4float %84 + %86 = OpVectorShuffle %v2float %85 %85 2 3 + OpStore %87 %86 + %88 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 + %89 = OpLoad %v4float %88 + %90 = OpVectorShuffle %v2float %89 %89 2 3 + OpStore %91 %90 + %92 = OpFunctionCall %float %blend_overlay_component_Qhh2h2 %87 %91 + %93 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 + %94 = OpLoad %v4float %93 + %95 = OpCompositeExtract %float %94 3 + %97 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 + %98 = OpLoad %v4float %97 + %99 = OpCompositeExtract %float %98 3 + %100 = OpFSub %float %float_1 %99 + %101 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 + %102 = OpLoad %v4float %101 + %103 = OpCompositeExtract %float %102 3 + %104 = OpFMul %float %100 %103 + %105 = OpFAdd %float %95 %104 + %106 = OpCompositeConstruct %v4float %74 %83 %92 %105 + OpStore %_0_result %106 + %107 = OpLoad %v4float %_0_result + %108 = OpVectorShuffle %v3float %107 %107 0 1 2 + %110 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 + %111 = OpLoad %v4float %110 + %112 = OpVectorShuffle %v3float %111 %111 0 1 2 + %113 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 + %114 = OpLoad %v4float %113 + %115 = OpCompositeExtract %float %114 3 + %116 = OpFSub %float %float_1 %115 + %117 = OpVectorTimesScalar %v3float %112 %116 + %118 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 + %119 = OpLoad %v4float %118 + %120 = OpVectorShuffle %v3float %119 %119 0 1 2 + %121 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 + %122 = OpLoad %v4float %121 + %123 = OpCompositeExtract %float %122 3 + %124 = OpFSub %float %float_1 %123 + %125 = OpVectorTimesScalar %v3float %120 %124 + %126 = OpFAdd %v3float %117 %125 + %127 = OpFAdd %v3float %108 %126 + %128 = OpLoad %v4float %_0_result + %129 = OpVectorShuffle %v4float %128 %127 4 5 6 3 + OpStore %_0_result %129 + OpStore %sk_FragColor %129 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/blend/BlendOverlay.wgsl b/tests/sksl/blend/BlendOverlay.wgsl index 7eeabf5e2ce7..7ed8b3812520 100644 --- a/tests/sksl/blend/BlendOverlay.wgsl +++ b/tests/sksl/blend/BlendOverlay.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; @@ -13,7 +14,7 @@ fn blend_overlay_component_Qhh2h2(_skParam0: vec2, _skParam1: vec2) -> let s = _skParam0; let d = _skParam1; { - return select(s.y * d.y - (2.0 * (d.y - d.x)) * (s.y - s.x), (2.0 * s.x) * d.x, 2.0 * d.x <= d.y); + return select(s.y * d.y - (2.0 * (d.y - d.x)) * (s.y - s.x), (2.0 * s.x) * d.x, (2.0 * d.x) <= d.y); } } fn main(_stageOut: ptr) { diff --git a/tests/sksl/blend/BlendPlus.asm.frag b/tests/sksl/blend/BlendPlus.asm.frag index 153516976399..360d5de62dd6 100644 --- a/tests/sksl/blend/BlendPlus.asm.frag +++ b/tests/sksl/blend/BlendPlus.asm.frag @@ -1,54 +1,54 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "src" -OpMemberName %_UniformBuffer 1 "dst" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %21 RelaxedPrecision -OpDecorate %24 RelaxedPrecision -OpDecorate %25 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "src" + OpMemberName %_UniformBuffer 1 "dst" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %21 RelaxedPrecision + OpDecorate %24 RelaxedPrecision + OpDecorate %25 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%14 = OpTypeFunction %void + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %14 = OpTypeFunction %void %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%float_1 = OpConstant %float 1 -%27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 -%main = OpFunction %void None %14 -%15 = OpLabel -%17 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%21 = OpLoad %v4float %17 -%22 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%24 = OpLoad %v4float %22 -%25 = OpFAdd %v4float %21 %24 -%16 = OpExtInst %v4float %1 FMin %25 %27 -OpStore %sk_FragColor %16 -OpReturn -OpFunctionEnd + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %main = OpFunction %void None %14 + %15 = OpLabel + %17 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %21 = OpLoad %v4float %17 + %22 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %24 = OpLoad %v4float %22 + %25 = OpFAdd %v4float %21 %24 + %16 = OpExtInst %v4float %1 FMin %25 %27 + OpStore %sk_FragColor %16 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/blend/BlendPlus.wgsl b/tests/sksl/blend/BlendPlus.wgsl index a4366c3602d3..df42a18f91cc 100644 --- a/tests/sksl/blend/BlendPlus.wgsl +++ b/tests/sksl/blend/BlendPlus.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/blend/BlendSaturation.asm.frag b/tests/sksl/blend/BlendSaturation.asm.frag index 5eef91c390b8..e0dbf808aa84 100644 --- a/tests/sksl/blend/BlendSaturation.asm.frag +++ b/tests/sksl/blend/BlendSaturation.asm.frag @@ -1,412 +1,412 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %_kGuardedDivideEpsilon "$kGuardedDivideEpsilon" -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "src" -OpMemberName %_UniformBuffer 1 "dst" -OpName %blend_color_saturation_Qhh3 "blend_color_saturation_Qhh3" -OpName %blend_hslc_h4h2h4h4 "blend_hslc_h4h2h4h4" -OpName %alpha "alpha" -OpName %sda "sda" -OpName %dsa "dsa" -OpName %l "l" -OpName %r "r" -OpName %_2_mn "_2_mn" -OpName %_3_mx "_3_mx" -OpName %_4_lum "_4_lum" -OpName %_5_result "_5_result" -OpName %_6_minComp "_6_minComp" -OpName %_7_maxComp "_7_maxComp" -OpName %main "main" -OpDecorate %_kGuardedDivideEpsilon RelaxedPrecision -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %18 Binding 0 -OpDecorate %18 DescriptorSet 0 -OpDecorate %28 RelaxedPrecision -OpDecorate %29 RelaxedPrecision -OpDecorate %30 RelaxedPrecision -OpDecorate %31 RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %39 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %alpha RelaxedPrecision -OpDecorate %53 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %55 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %sda RelaxedPrecision -OpDecorate %59 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %62 RelaxedPrecision -OpDecorate %63 RelaxedPrecision -OpDecorate %dsa RelaxedPrecision -OpDecorate %65 RelaxedPrecision -OpDecorate %66 RelaxedPrecision -OpDecorate %67 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %69 RelaxedPrecision -OpDecorate %l RelaxedPrecision -OpDecorate %71 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %78 RelaxedPrecision -OpDecorate %r RelaxedPrecision -OpDecorate %80 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %87 RelaxedPrecision -OpDecorate %88 RelaxedPrecision -OpDecorate %89 RelaxedPrecision -OpDecorate %_2_mn RelaxedPrecision -OpDecorate %96 RelaxedPrecision -OpDecorate %97 RelaxedPrecision -OpDecorate %98 RelaxedPrecision -OpDecorate %_3_mx RelaxedPrecision -OpDecorate %107 RelaxedPrecision -OpDecorate %108 RelaxedPrecision -OpDecorate %111 RelaxedPrecision -OpDecorate %112 RelaxedPrecision -OpDecorate %114 RelaxedPrecision -OpDecorate %115 RelaxedPrecision -OpDecorate %117 RelaxedPrecision -OpDecorate %_4_lum RelaxedPrecision -OpDecorate %119 RelaxedPrecision -OpDecorate %124 RelaxedPrecision -OpDecorate %_5_result RelaxedPrecision -OpDecorate %126 RelaxedPrecision -OpDecorate %127 RelaxedPrecision -OpDecorate %128 RelaxedPrecision -OpDecorate %129 RelaxedPrecision -OpDecorate %130 RelaxedPrecision -OpDecorate %131 RelaxedPrecision -OpDecorate %_6_minComp RelaxedPrecision -OpDecorate %135 RelaxedPrecision -OpDecorate %136 RelaxedPrecision -OpDecorate %137 RelaxedPrecision -OpDecorate %_7_maxComp RelaxedPrecision -OpDecorate %148 RelaxedPrecision -OpDecorate %149 RelaxedPrecision -OpDecorate %150 RelaxedPrecision -OpDecorate %151 RelaxedPrecision -OpDecorate %152 RelaxedPrecision -OpDecorate %153 RelaxedPrecision -OpDecorate %154 RelaxedPrecision -OpDecorate %155 RelaxedPrecision -OpDecorate %163 RelaxedPrecision -OpDecorate %164 RelaxedPrecision -OpDecorate %165 RelaxedPrecision -OpDecorate %166 RelaxedPrecision -OpDecorate %167 RelaxedPrecision -OpDecorate %168 RelaxedPrecision -OpDecorate %169 RelaxedPrecision -OpDecorate %170 RelaxedPrecision -OpDecorate %171 RelaxedPrecision -OpDecorate %172 RelaxedPrecision -OpDecorate %173 RelaxedPrecision -OpDecorate %174 RelaxedPrecision -OpDecorate %175 RelaxedPrecision -OpDecorate %176 RelaxedPrecision -OpDecorate %177 RelaxedPrecision -OpDecorate %178 RelaxedPrecision -OpDecorate %179 RelaxedPrecision -OpDecorate %180 RelaxedPrecision -OpDecorate %181 RelaxedPrecision -OpDecorate %182 RelaxedPrecision -OpDecorate %183 RelaxedPrecision -OpDecorate %184 RelaxedPrecision -OpDecorate %185 RelaxedPrecision -OpDecorate %186 RelaxedPrecision -OpDecorate %187 RelaxedPrecision -OpDecorate %188 RelaxedPrecision -OpDecorate %189 RelaxedPrecision -OpDecorate %190 RelaxedPrecision -OpDecorate %191 RelaxedPrecision -OpDecorate %192 RelaxedPrecision -OpDecorate %202 RelaxedPrecision -OpDecorate %206 RelaxedPrecision -%float = OpTypeFloat 32 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %_kGuardedDivideEpsilon "$kGuardedDivideEpsilon" + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "src" + OpMemberName %_UniformBuffer 1 "dst" + OpName %blend_color_saturation_Qhh3 "blend_color_saturation_Qhh3" + OpName %blend_hslc_h4h2h4h4 "blend_hslc_h4h2h4h4" + OpName %alpha "alpha" + OpName %sda "sda" + OpName %dsa "dsa" + OpName %l "l" + OpName %r "r" + OpName %_2_mn "_2_mn" + OpName %_3_mx "_3_mx" + OpName %_4_lum "_4_lum" + OpName %_5_result "_5_result" + OpName %_6_minComp "_6_minComp" + OpName %_7_maxComp "_7_maxComp" + OpName %main "main" + OpDecorate %_kGuardedDivideEpsilon RelaxedPrecision + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %18 Binding 0 + OpDecorate %18 DescriptorSet 0 + OpDecorate %28 RelaxedPrecision + OpDecorate %29 RelaxedPrecision + OpDecorate %30 RelaxedPrecision + OpDecorate %31 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %alpha RelaxedPrecision + OpDecorate %53 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %55 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %sda RelaxedPrecision + OpDecorate %59 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %62 RelaxedPrecision + OpDecorate %63 RelaxedPrecision + OpDecorate %dsa RelaxedPrecision + OpDecorate %65 RelaxedPrecision + OpDecorate %66 RelaxedPrecision + OpDecorate %67 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %69 RelaxedPrecision + OpDecorate %l RelaxedPrecision + OpDecorate %71 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %78 RelaxedPrecision + OpDecorate %r RelaxedPrecision + OpDecorate %80 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %87 RelaxedPrecision + OpDecorate %88 RelaxedPrecision + OpDecorate %89 RelaxedPrecision + OpDecorate %_2_mn RelaxedPrecision + OpDecorate %96 RelaxedPrecision + OpDecorate %97 RelaxedPrecision + OpDecorate %98 RelaxedPrecision + OpDecorate %_3_mx RelaxedPrecision + OpDecorate %107 RelaxedPrecision + OpDecorate %108 RelaxedPrecision + OpDecorate %111 RelaxedPrecision + OpDecorate %112 RelaxedPrecision + OpDecorate %114 RelaxedPrecision + OpDecorate %115 RelaxedPrecision + OpDecorate %117 RelaxedPrecision + OpDecorate %_4_lum RelaxedPrecision + OpDecorate %119 RelaxedPrecision + OpDecorate %124 RelaxedPrecision + OpDecorate %_5_result RelaxedPrecision + OpDecorate %126 RelaxedPrecision + OpDecorate %127 RelaxedPrecision + OpDecorate %128 RelaxedPrecision + OpDecorate %129 RelaxedPrecision + OpDecorate %130 RelaxedPrecision + OpDecorate %131 RelaxedPrecision + OpDecorate %_6_minComp RelaxedPrecision + OpDecorate %135 RelaxedPrecision + OpDecorate %136 RelaxedPrecision + OpDecorate %137 RelaxedPrecision + OpDecorate %_7_maxComp RelaxedPrecision + OpDecorate %148 RelaxedPrecision + OpDecorate %149 RelaxedPrecision + OpDecorate %150 RelaxedPrecision + OpDecorate %151 RelaxedPrecision + OpDecorate %152 RelaxedPrecision + OpDecorate %153 RelaxedPrecision + OpDecorate %154 RelaxedPrecision + OpDecorate %155 RelaxedPrecision + OpDecorate %163 RelaxedPrecision + OpDecorate %164 RelaxedPrecision + OpDecorate %165 RelaxedPrecision + OpDecorate %166 RelaxedPrecision + OpDecorate %167 RelaxedPrecision + OpDecorate %168 RelaxedPrecision + OpDecorate %169 RelaxedPrecision + OpDecorate %170 RelaxedPrecision + OpDecorate %171 RelaxedPrecision + OpDecorate %172 RelaxedPrecision + OpDecorate %173 RelaxedPrecision + OpDecorate %174 RelaxedPrecision + OpDecorate %175 RelaxedPrecision + OpDecorate %176 RelaxedPrecision + OpDecorate %177 RelaxedPrecision + OpDecorate %178 RelaxedPrecision + OpDecorate %179 RelaxedPrecision + OpDecorate %180 RelaxedPrecision + OpDecorate %181 RelaxedPrecision + OpDecorate %182 RelaxedPrecision + OpDecorate %183 RelaxedPrecision + OpDecorate %184 RelaxedPrecision + OpDecorate %185 RelaxedPrecision + OpDecorate %186 RelaxedPrecision + OpDecorate %187 RelaxedPrecision + OpDecorate %188 RelaxedPrecision + OpDecorate %189 RelaxedPrecision + OpDecorate %190 RelaxedPrecision + OpDecorate %191 RelaxedPrecision + OpDecorate %192 RelaxedPrecision + OpDecorate %202 RelaxedPrecision + OpDecorate %206 RelaxedPrecision + %float = OpTypeFloat 32 %_ptr_Private_float = OpTypePointer Private %float %_kGuardedDivideEpsilon = OpVariable %_ptr_Private_float Private -%bool = OpTypeBool -%false = OpConstantFalse %bool + %bool = OpTypeBool + %false = OpConstantFalse %bool %float_9_99999994en09 = OpConstant %float 9.99999994e-09 -%float_0 = OpConstant %float 0 + %float_0 = OpConstant %float 0 %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%v4float = OpTypeVector %float 4 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%18 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%v3float = OpTypeVector %float 3 + %18 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %v3float = OpTypeVector %float 3 %_ptr_Function_v3float = OpTypePointer Function %v3float -%23 = OpTypeFunction %float %_ptr_Function_v3float -%v2float = OpTypeVector %float 2 + %23 = OpTypeFunction %float %_ptr_Function_v3float + %v2float = OpTypeVector %float 2 %_ptr_Function_v2float = OpTypePointer Function %v2float %_ptr_Function_v4float = OpTypePointer Function %v4float -%46 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float %_ptr_Function_v4float + %46 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float %_ptr_Function_v4float %_ptr_Function_float = OpTypePointer Function %float -%float_1 = OpConstant %float 1 -%116 = OpConstantComposite %v3float %float_0 %float_0 %float_0 + %float_1 = OpConstant %float 1 + %116 = OpConstantComposite %v3float %float_0 %float_0 %float_0 %float_0_300000012 = OpConstant %float 0.300000012 %float_0_589999974 = OpConstant %float 0.589999974 %float_0_109999999 = OpConstant %float 0.109999999 -%123 = OpConstantComposite %v3float %float_0_300000012 %float_0_589999974 %float_0_109999999 -%void = OpTypeVoid -%194 = OpTypeFunction %void -%196 = OpConstantComposite %v2float %float_1 %float_1 + %123 = OpConstantComposite %v3float %float_0_300000012 %float_0_589999974 %float_0_109999999 + %void = OpTypeVoid + %194 = OpTypeFunction %void + %196 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 %blend_color_saturation_Qhh3 = OpFunction %float None %23 -%24 = OpFunctionParameter %_ptr_Function_v3float -%25 = OpLabel -%28 = OpLoad %v3float %24 -%29 = OpCompositeExtract %float %28 0 -%30 = OpLoad %v3float %24 -%31 = OpCompositeExtract %float %30 1 -%27 = OpExtInst %float %1 FMax %29 %31 -%32 = OpLoad %v3float %24 -%33 = OpCompositeExtract %float %32 2 -%26 = OpExtInst %float %1 FMax %27 %33 -%36 = OpLoad %v3float %24 -%37 = OpCompositeExtract %float %36 0 -%38 = OpLoad %v3float %24 -%39 = OpCompositeExtract %float %38 1 -%35 = OpExtInst %float %1 FMin %37 %39 -%40 = OpLoad %v3float %24 -%41 = OpCompositeExtract %float %40 2 -%34 = OpExtInst %float %1 FMin %35 %41 -%42 = OpFSub %float %26 %34 -OpReturnValue %42 -OpFunctionEnd + %24 = OpFunctionParameter %_ptr_Function_v3float + %25 = OpLabel + %28 = OpLoad %v3float %24 + %29 = OpCompositeExtract %float %28 0 + %30 = OpLoad %v3float %24 + %31 = OpCompositeExtract %float %30 1 + %27 = OpExtInst %float %1 FMax %29 %31 + %32 = OpLoad %v3float %24 + %33 = OpCompositeExtract %float %32 2 + %26 = OpExtInst %float %1 FMax %27 %33 + %36 = OpLoad %v3float %24 + %37 = OpCompositeExtract %float %36 0 + %38 = OpLoad %v3float %24 + %39 = OpCompositeExtract %float %38 1 + %35 = OpExtInst %float %1 FMin %37 %39 + %40 = OpLoad %v3float %24 + %41 = OpCompositeExtract %float %40 2 + %34 = OpExtInst %float %1 FMin %35 %41 + %42 = OpFSub %float %26 %34 + OpReturnValue %42 + OpFunctionEnd %blend_hslc_h4h2h4h4 = OpFunction %v4float None %46 -%47 = OpFunctionParameter %_ptr_Function_v2float -%48 = OpFunctionParameter %_ptr_Function_v4float -%49 = OpFunctionParameter %_ptr_Function_v4float -%50 = OpLabel -%alpha = OpVariable %_ptr_Function_float Function -%sda = OpVariable %_ptr_Function_v3float Function -%dsa = OpVariable %_ptr_Function_v3float Function -%l = OpVariable %_ptr_Function_v3float Function -%74 = OpVariable %_ptr_Function_v3float Function -%r = OpVariable %_ptr_Function_v3float Function -%83 = OpVariable %_ptr_Function_v3float Function -%_2_mn = OpVariable %_ptr_Function_float Function -%_3_mx = OpVariable %_ptr_Function_float Function -%103 = OpVariable %_ptr_Function_v3float Function -%109 = OpVariable %_ptr_Function_v3float Function -%_4_lum = OpVariable %_ptr_Function_float Function -%_5_result = OpVariable %_ptr_Function_v3float Function -%_6_minComp = OpVariable %_ptr_Function_float Function -%_7_maxComp = OpVariable %_ptr_Function_float Function -%53 = OpLoad %v4float %49 -%54 = OpCompositeExtract %float %53 3 -%55 = OpLoad %v4float %48 -%56 = OpCompositeExtract %float %55 3 -%57 = OpFMul %float %54 %56 -OpStore %alpha %57 -%59 = OpLoad %v4float %48 -%60 = OpVectorShuffle %v3float %59 %59 0 1 2 -%61 = OpLoad %v4float %49 -%62 = OpCompositeExtract %float %61 3 -%63 = OpVectorTimesScalar %v3float %60 %62 -OpStore %sda %63 -%65 = OpLoad %v4float %49 -%66 = OpVectorShuffle %v3float %65 %65 0 1 2 -%67 = OpLoad %v4float %48 -%68 = OpCompositeExtract %float %67 3 -%69 = OpVectorTimesScalar %v3float %66 %68 -OpStore %dsa %69 -%71 = OpLoad %v2float %47 -%72 = OpCompositeExtract %float %71 0 -%73 = OpFUnordNotEqual %bool %72 %float_0 -OpSelectionMerge %77 None -OpBranchConditional %73 %75 %76 -%75 = OpLabel -OpStore %74 %69 -OpBranch %77 -%76 = OpLabel -OpStore %74 %63 -OpBranch %77 -%77 = OpLabel -%78 = OpLoad %v3float %74 -OpStore %l %78 -%80 = OpLoad %v2float %47 -%81 = OpCompositeExtract %float %80 0 -%82 = OpFUnordNotEqual %bool %81 %float_0 -OpSelectionMerge %86 None -OpBranchConditional %82 %84 %85 -%84 = OpLabel -OpStore %83 %63 -OpBranch %86 -%85 = OpLabel -OpStore %83 %69 -OpBranch %86 -%86 = OpLabel -%87 = OpLoad %v3float %83 -OpStore %r %87 -%88 = OpLoad %v2float %47 -%89 = OpCompositeExtract %float %88 1 -%90 = OpFUnordNotEqual %bool %89 %float_0 -OpSelectionMerge %92 None -OpBranchConditional %90 %91 %92 -%91 = OpLabel -%96 = OpCompositeExtract %float %78 0 -%97 = OpCompositeExtract %float %78 1 -%95 = OpExtInst %float %1 FMin %96 %97 -%98 = OpCompositeExtract %float %78 2 -%94 = OpExtInst %float %1 FMin %95 %98 -OpStore %_2_mn %94 -%101 = OpExtInst %float %1 FMax %96 %97 -%100 = OpExtInst %float %1 FMax %101 %98 -OpStore %_3_mx %100 -%102 = OpFOrdGreaterThan %bool %100 %94 -OpSelectionMerge %106 None -OpBranchConditional %102 %104 %105 -%104 = OpLabel -%107 = OpCompositeConstruct %v3float %94 %94 %94 -%108 = OpFSub %v3float %78 %107 -OpStore %109 %87 -%110 = OpFunctionCall %float %blend_color_saturation_Qhh3 %109 -%111 = OpVectorTimesScalar %v3float %108 %110 -%112 = OpFSub %float %100 %94 -%114 = OpFDiv %float %float_1 %112 -%115 = OpVectorTimesScalar %v3float %111 %114 -OpStore %103 %115 -OpBranch %106 -%105 = OpLabel -OpStore %103 %116 -OpBranch %106 -%106 = OpLabel -%117 = OpLoad %v3float %103 -OpStore %l %117 -OpStore %r %69 -OpBranch %92 -%92 = OpLabel -%124 = OpLoad %v3float %r -%119 = OpDot %float %123 %124 -OpStore %_4_lum %119 -%127 = OpLoad %v3float %l -%126 = OpDot %float %123 %127 -%128 = OpFSub %float %119 %126 -%129 = OpLoad %v3float %l -%130 = OpCompositeConstruct %v3float %128 %128 %128 -%131 = OpFAdd %v3float %130 %129 -OpStore %_5_result %131 -%135 = OpCompositeExtract %float %131 0 -%136 = OpCompositeExtract %float %131 1 -%134 = OpExtInst %float %1 FMin %135 %136 -%137 = OpCompositeExtract %float %131 2 -%133 = OpExtInst %float %1 FMin %134 %137 -OpStore %_6_minComp %133 -%140 = OpExtInst %float %1 FMax %135 %136 -%139 = OpExtInst %float %1 FMax %140 %137 -OpStore %_7_maxComp %139 -%141 = OpFOrdLessThan %bool %133 %float_0 -OpSelectionMerge %143 None -OpBranchConditional %141 %142 %143 -%142 = OpLabel -%144 = OpFUnordNotEqual %bool %119 %133 -OpBranch %143 -%143 = OpLabel -%145 = OpPhi %bool %false %92 %144 %142 -OpSelectionMerge %147 None -OpBranchConditional %145 %146 %147 -%146 = OpLabel -%148 = OpCompositeConstruct %v3float %119 %119 %119 -%149 = OpFSub %v3float %131 %148 -%150 = OpFSub %float %119 %133 -%151 = OpLoad %float %_kGuardedDivideEpsilon -%152 = OpFAdd %float %150 %151 -%153 = OpFDiv %float %119 %152 -%154 = OpVectorTimesScalar %v3float %149 %153 -%155 = OpFAdd %v3float %148 %154 -OpStore %_5_result %155 -OpBranch %147 -%147 = OpLabel -%156 = OpFOrdGreaterThan %bool %139 %57 -OpSelectionMerge %158 None -OpBranchConditional %156 %157 %158 -%157 = OpLabel -%159 = OpFUnordNotEqual %bool %139 %119 -OpBranch %158 -%158 = OpLabel -%160 = OpPhi %bool %false %147 %159 %157 -OpSelectionMerge %162 None -OpBranchConditional %160 %161 %162 -%161 = OpLabel -%163 = OpLoad %v3float %_5_result -%164 = OpCompositeConstruct %v3float %119 %119 %119 -%165 = OpFSub %v3float %163 %164 -%166 = OpFSub %float %57 %119 -%167 = OpVectorTimesScalar %v3float %165 %166 -%168 = OpFSub %float %139 %119 -%169 = OpLoad %float %_kGuardedDivideEpsilon -%170 = OpFAdd %float %168 %169 -%171 = OpFDiv %float %float_1 %170 -%172 = OpVectorTimesScalar %v3float %167 %171 -%173 = OpFAdd %v3float %164 %172 -OpStore %_5_result %173 -OpBranch %162 -%162 = OpLabel -%174 = OpLoad %v3float %_5_result -%175 = OpLoad %v4float %49 -%176 = OpVectorShuffle %v3float %175 %175 0 1 2 -%177 = OpFAdd %v3float %174 %176 -%178 = OpFSub %v3float %177 %69 -%179 = OpLoad %v4float %48 -%180 = OpVectorShuffle %v3float %179 %179 0 1 2 -%181 = OpFAdd %v3float %178 %180 -%182 = OpFSub %v3float %181 %63 -%183 = OpCompositeExtract %float %182 0 -%184 = OpCompositeExtract %float %182 1 -%185 = OpCompositeExtract %float %182 2 -%186 = OpLoad %v4float %48 -%187 = OpCompositeExtract %float %186 3 -%188 = OpLoad %v4float %49 -%189 = OpCompositeExtract %float %188 3 -%190 = OpFAdd %float %187 %189 -%191 = OpFSub %float %190 %57 -%192 = OpCompositeConstruct %v4float %183 %184 %185 %191 -OpReturnValue %192 -OpFunctionEnd -%main = OpFunction %void None %194 -%195 = OpLabel -%197 = OpVariable %_ptr_Function_v2float Function -%203 = OpVariable %_ptr_Function_v4float Function -%207 = OpVariable %_ptr_Function_v4float Function -%10 = OpSelect %float %false %float_9_99999994en09 %float_0 -OpStore %_kGuardedDivideEpsilon %10 -OpStore %197 %196 -%198 = OpAccessChain %_ptr_Uniform_v4float %18 %int_0 -%202 = OpLoad %v4float %198 -OpStore %203 %202 -%204 = OpAccessChain %_ptr_Uniform_v4float %18 %int_1 -%206 = OpLoad %v4float %204 -OpStore %207 %206 -%208 = OpFunctionCall %v4float %blend_hslc_h4h2h4h4 %197 %203 %207 -OpStore %sk_FragColor %208 -OpReturn -OpFunctionEnd + %47 = OpFunctionParameter %_ptr_Function_v2float + %48 = OpFunctionParameter %_ptr_Function_v4float + %49 = OpFunctionParameter %_ptr_Function_v4float + %50 = OpLabel + %alpha = OpVariable %_ptr_Function_float Function + %sda = OpVariable %_ptr_Function_v3float Function + %dsa = OpVariable %_ptr_Function_v3float Function + %l = OpVariable %_ptr_Function_v3float Function + %74 = OpVariable %_ptr_Function_v3float Function + %r = OpVariable %_ptr_Function_v3float Function + %83 = OpVariable %_ptr_Function_v3float Function + %_2_mn = OpVariable %_ptr_Function_float Function + %_3_mx = OpVariable %_ptr_Function_float Function + %103 = OpVariable %_ptr_Function_v3float Function + %109 = OpVariable %_ptr_Function_v3float Function + %_4_lum = OpVariable %_ptr_Function_float Function + %_5_result = OpVariable %_ptr_Function_v3float Function + %_6_minComp = OpVariable %_ptr_Function_float Function + %_7_maxComp = OpVariable %_ptr_Function_float Function + %53 = OpLoad %v4float %49 + %54 = OpCompositeExtract %float %53 3 + %55 = OpLoad %v4float %48 + %56 = OpCompositeExtract %float %55 3 + %57 = OpFMul %float %54 %56 + OpStore %alpha %57 + %59 = OpLoad %v4float %48 + %60 = OpVectorShuffle %v3float %59 %59 0 1 2 + %61 = OpLoad %v4float %49 + %62 = OpCompositeExtract %float %61 3 + %63 = OpVectorTimesScalar %v3float %60 %62 + OpStore %sda %63 + %65 = OpLoad %v4float %49 + %66 = OpVectorShuffle %v3float %65 %65 0 1 2 + %67 = OpLoad %v4float %48 + %68 = OpCompositeExtract %float %67 3 + %69 = OpVectorTimesScalar %v3float %66 %68 + OpStore %dsa %69 + %71 = OpLoad %v2float %47 + %72 = OpCompositeExtract %float %71 0 + %73 = OpFUnordNotEqual %bool %72 %float_0 + OpSelectionMerge %77 None + OpBranchConditional %73 %75 %76 + %75 = OpLabel + OpStore %74 %69 + OpBranch %77 + %76 = OpLabel + OpStore %74 %63 + OpBranch %77 + %77 = OpLabel + %78 = OpLoad %v3float %74 + OpStore %l %78 + %80 = OpLoad %v2float %47 + %81 = OpCompositeExtract %float %80 0 + %82 = OpFUnordNotEqual %bool %81 %float_0 + OpSelectionMerge %86 None + OpBranchConditional %82 %84 %85 + %84 = OpLabel + OpStore %83 %63 + OpBranch %86 + %85 = OpLabel + OpStore %83 %69 + OpBranch %86 + %86 = OpLabel + %87 = OpLoad %v3float %83 + OpStore %r %87 + %88 = OpLoad %v2float %47 + %89 = OpCompositeExtract %float %88 1 + %90 = OpFUnordNotEqual %bool %89 %float_0 + OpSelectionMerge %92 None + OpBranchConditional %90 %91 %92 + %91 = OpLabel + %96 = OpCompositeExtract %float %78 0 + %97 = OpCompositeExtract %float %78 1 + %95 = OpExtInst %float %1 FMin %96 %97 + %98 = OpCompositeExtract %float %78 2 + %94 = OpExtInst %float %1 FMin %95 %98 + OpStore %_2_mn %94 + %101 = OpExtInst %float %1 FMax %96 %97 + %100 = OpExtInst %float %1 FMax %101 %98 + OpStore %_3_mx %100 + %102 = OpFOrdGreaterThan %bool %100 %94 + OpSelectionMerge %106 None + OpBranchConditional %102 %104 %105 + %104 = OpLabel + %107 = OpCompositeConstruct %v3float %94 %94 %94 + %108 = OpFSub %v3float %78 %107 + OpStore %109 %87 + %110 = OpFunctionCall %float %blend_color_saturation_Qhh3 %109 + %111 = OpVectorTimesScalar %v3float %108 %110 + %112 = OpFSub %float %100 %94 + %114 = OpFDiv %float %float_1 %112 + %115 = OpVectorTimesScalar %v3float %111 %114 + OpStore %103 %115 + OpBranch %106 + %105 = OpLabel + OpStore %103 %116 + OpBranch %106 + %106 = OpLabel + %117 = OpLoad %v3float %103 + OpStore %l %117 + OpStore %r %69 + OpBranch %92 + %92 = OpLabel + %124 = OpLoad %v3float %r + %119 = OpDot %float %123 %124 + OpStore %_4_lum %119 + %127 = OpLoad %v3float %l + %126 = OpDot %float %123 %127 + %128 = OpFSub %float %119 %126 + %129 = OpLoad %v3float %l + %130 = OpCompositeConstruct %v3float %128 %128 %128 + %131 = OpFAdd %v3float %130 %129 + OpStore %_5_result %131 + %135 = OpCompositeExtract %float %131 0 + %136 = OpCompositeExtract %float %131 1 + %134 = OpExtInst %float %1 FMin %135 %136 + %137 = OpCompositeExtract %float %131 2 + %133 = OpExtInst %float %1 FMin %134 %137 + OpStore %_6_minComp %133 + %140 = OpExtInst %float %1 FMax %135 %136 + %139 = OpExtInst %float %1 FMax %140 %137 + OpStore %_7_maxComp %139 + %141 = OpFOrdLessThan %bool %133 %float_0 + OpSelectionMerge %143 None + OpBranchConditional %141 %142 %143 + %142 = OpLabel + %144 = OpFUnordNotEqual %bool %119 %133 + OpBranch %143 + %143 = OpLabel + %145 = OpPhi %bool %false %92 %144 %142 + OpSelectionMerge %147 None + OpBranchConditional %145 %146 %147 + %146 = OpLabel + %148 = OpCompositeConstruct %v3float %119 %119 %119 + %149 = OpFSub %v3float %131 %148 + %150 = OpFSub %float %119 %133 + %151 = OpLoad %float %_kGuardedDivideEpsilon + %152 = OpFAdd %float %150 %151 + %153 = OpFDiv %float %119 %152 + %154 = OpVectorTimesScalar %v3float %149 %153 + %155 = OpFAdd %v3float %148 %154 + OpStore %_5_result %155 + OpBranch %147 + %147 = OpLabel + %156 = OpFOrdGreaterThan %bool %139 %57 + OpSelectionMerge %158 None + OpBranchConditional %156 %157 %158 + %157 = OpLabel + %159 = OpFUnordNotEqual %bool %139 %119 + OpBranch %158 + %158 = OpLabel + %160 = OpPhi %bool %false %147 %159 %157 + OpSelectionMerge %162 None + OpBranchConditional %160 %161 %162 + %161 = OpLabel + %163 = OpLoad %v3float %_5_result + %164 = OpCompositeConstruct %v3float %119 %119 %119 + %165 = OpFSub %v3float %163 %164 + %166 = OpFSub %float %57 %119 + %167 = OpVectorTimesScalar %v3float %165 %166 + %168 = OpFSub %float %139 %119 + %169 = OpLoad %float %_kGuardedDivideEpsilon + %170 = OpFAdd %float %168 %169 + %171 = OpFDiv %float %float_1 %170 + %172 = OpVectorTimesScalar %v3float %167 %171 + %173 = OpFAdd %v3float %164 %172 + OpStore %_5_result %173 + OpBranch %162 + %162 = OpLabel + %174 = OpLoad %v3float %_5_result + %175 = OpLoad %v4float %49 + %176 = OpVectorShuffle %v3float %175 %175 0 1 2 + %177 = OpFAdd %v3float %174 %176 + %178 = OpFSub %v3float %177 %69 + %179 = OpLoad %v4float %48 + %180 = OpVectorShuffle %v3float %179 %179 0 1 2 + %181 = OpFAdd %v3float %178 %180 + %182 = OpFSub %v3float %181 %63 + %183 = OpCompositeExtract %float %182 0 + %184 = OpCompositeExtract %float %182 1 + %185 = OpCompositeExtract %float %182 2 + %186 = OpLoad %v4float %48 + %187 = OpCompositeExtract %float %186 3 + %188 = OpLoad %v4float %49 + %189 = OpCompositeExtract %float %188 3 + %190 = OpFAdd %float %187 %189 + %191 = OpFSub %float %190 %57 + %192 = OpCompositeConstruct %v4float %183 %184 %185 %191 + OpReturnValue %192 + OpFunctionEnd + %main = OpFunction %void None %194 + %195 = OpLabel + %197 = OpVariable %_ptr_Function_v2float Function + %203 = OpVariable %_ptr_Function_v4float Function + %207 = OpVariable %_ptr_Function_v4float Function + %10 = OpSelect %float %false %float_9_99999994en09 %float_0 + OpStore %_kGuardedDivideEpsilon %10 + OpStore %197 %196 + %198 = OpAccessChain %_ptr_Uniform_v4float %18 %int_0 + %202 = OpLoad %v4float %198 + OpStore %203 %202 + %204 = OpAccessChain %_ptr_Uniform_v4float %18 %int_1 + %206 = OpLoad %v4float %204 + OpStore %207 %206 + %208 = OpFunctionCall %v4float %blend_hslc_h4h2h4h4 %197 %203 %207 + OpStore %sk_FragColor %208 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/blend/BlendSaturation.wgsl b/tests/sksl/blend/BlendSaturation.wgsl index 4e1842643fec..370aaa78f5a8 100644 --- a/tests/sksl/blend/BlendSaturation.wgsl +++ b/tests/sksl/blend/BlendSaturation.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; @@ -30,7 +31,7 @@ fn blend_hslc_h4h2h4h4(_skParam0: vec2, _skParam1: vec4, _skParam2: ve var dsa: vec3 = dst.xyz * src.w; var l: vec3 = select(sda, dsa, vec3(bool(flipSat.x))); var r: vec3 = select(dsa, sda, vec3(bool(flipSat.x))); - if (bool(flipSat.y)) { + if bool(flipSat.y) { { let _skTemp4 = min(l.x, l.y); let _skTemp5 = min(_skTemp4, l.z); @@ -53,12 +54,12 @@ fn blend_hslc_h4h2h4h4(_skParam0: vec2, _skParam1: vec4, _skParam2: ve let _skTemp13 = max(_5_result.x, _5_result.y); let _skTemp14 = max(_skTemp13, _5_result.z); var _7_maxComp: f32 = _skTemp14; - if (_6_minComp < 0.0 && _4_lum != _6_minComp) { + if (_6_minComp < 0.0) && (_4_lum != _6_minComp) { { _5_result = _4_lum + (_5_result - _4_lum) * (_4_lum / ((_4_lum - _6_minComp) + sk_PrivkGuardedDivideEpsilon)); } } - if (_7_maxComp > alpha && _7_maxComp != _4_lum) { + if (_7_maxComp > alpha) && (_7_maxComp != _4_lum) { { _5_result = _4_lum + ((_5_result - _4_lum) * (alpha - _4_lum)) / ((_7_maxComp - _4_lum) + sk_PrivkGuardedDivideEpsilon); } diff --git a/tests/sksl/blend/BlendScreen.asm.frag b/tests/sksl/blend/BlendScreen.asm.frag index 9a5d53c5c5c1..84ed153a293c 100644 --- a/tests/sksl/blend/BlendScreen.asm.frag +++ b/tests/sksl/blend/BlendScreen.asm.frag @@ -1,60 +1,60 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "src" -OpMemberName %_UniformBuffer 1 "dst" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %20 RelaxedPrecision -OpDecorate %23 RelaxedPrecision -OpDecorate %25 RelaxedPrecision -OpDecorate %28 RelaxedPrecision -OpDecorate %29 RelaxedPrecision -OpDecorate %30 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "src" + OpMemberName %_UniformBuffer 1 "dst" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %20 RelaxedPrecision + OpDecorate %23 RelaxedPrecision + OpDecorate %25 RelaxedPrecision + OpDecorate %28 RelaxedPrecision + OpDecorate %29 RelaxedPrecision + OpDecorate %30 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%14 = OpTypeFunction %void + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %14 = OpTypeFunction %void %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%float_1 = OpConstant %float 1 -%24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 -%int_1 = OpConstant %int 1 -%main = OpFunction %void None %14 -%15 = OpLabel -%16 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%20 = OpLoad %v4float %16 -%22 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%23 = OpLoad %v4float %22 -%25 = OpFSub %v4float %24 %23 -%26 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%28 = OpLoad %v4float %26 -%29 = OpFMul %v4float %25 %28 -%30 = OpFAdd %v4float %20 %29 -OpStore %sk_FragColor %30 -OpReturn -OpFunctionEnd + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %float_1 = OpConstant %float 1 + %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %int_1 = OpConstant %int 1 + %main = OpFunction %void None %14 + %15 = OpLabel + %16 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %20 = OpLoad %v4float %16 + %22 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %23 = OpLoad %v4float %22 + %25 = OpFSub %v4float %24 %23 + %26 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %28 = OpLoad %v4float %26 + %29 = OpFMul %v4float %25 %28 + %30 = OpFAdd %v4float %20 %29 + OpStore %sk_FragColor %30 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/blend/BlendScreen.wgsl b/tests/sksl/blend/BlendScreen.wgsl index a81cda934b44..19bbf4373148 100644 --- a/tests/sksl/blend/BlendScreen.wgsl +++ b/tests/sksl/blend/BlendScreen.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/blend/BlendSoftLight.asm.frag b/tests/sksl/blend/BlendSoftLight.asm.frag index 469b7e0d6f53..3b8852416523 100644 --- a/tests/sksl/blend/BlendSoftLight.asm.frag +++ b/tests/sksl/blend/BlendSoftLight.asm.frag @@ -1,468 +1,468 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %_kGuardedDivideEpsilon "$kGuardedDivideEpsilon" -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "src" -OpMemberName %_UniformBuffer 1 "dst" -OpName %soft_light_component_Qhh2h2 "soft_light_component_Qhh2h2" -OpName %DSqd "DSqd" -OpName %DCub "DCub" -OpName %DaSqd "DaSqd" -OpName %DaCub "DaCub" -OpName %main "main" -OpDecorate %_kGuardedDivideEpsilon RelaxedPrecision -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %17 Binding 0 -OpDecorate %17 DescriptorSet 0 -OpDecorate %27 RelaxedPrecision -OpDecorate %28 RelaxedPrecision -OpDecorate %29 RelaxedPrecision -OpDecorate %30 RelaxedPrecision -OpDecorate %31 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %39 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %45 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %48 RelaxedPrecision -OpDecorate %49 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %51 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %55 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %58 RelaxedPrecision -OpDecorate %59 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %62 RelaxedPrecision -OpDecorate %63 RelaxedPrecision -OpDecorate %64 RelaxedPrecision -OpDecorate %65 RelaxedPrecision -OpDecorate %66 RelaxedPrecision -OpDecorate %67 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %69 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -OpDecorate %71 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %74 RelaxedPrecision -OpDecorate %75 RelaxedPrecision -OpDecorate %76 RelaxedPrecision -OpDecorate %77 RelaxedPrecision -OpDecorate %78 RelaxedPrecision -OpDecorate %DSqd RelaxedPrecision -OpDecorate %85 RelaxedPrecision -OpDecorate %86 RelaxedPrecision -OpDecorate %87 RelaxedPrecision -OpDecorate %88 RelaxedPrecision -OpDecorate %89 RelaxedPrecision -OpDecorate %DCub RelaxedPrecision -OpDecorate %91 RelaxedPrecision -OpDecorate %92 RelaxedPrecision -OpDecorate %93 RelaxedPrecision -OpDecorate %DaSqd RelaxedPrecision -OpDecorate %95 RelaxedPrecision -OpDecorate %96 RelaxedPrecision -OpDecorate %97 RelaxedPrecision -OpDecorate %98 RelaxedPrecision -OpDecorate %99 RelaxedPrecision -OpDecorate %DaCub RelaxedPrecision -OpDecorate %101 RelaxedPrecision -OpDecorate %102 RelaxedPrecision -OpDecorate %103 RelaxedPrecision -OpDecorate %104 RelaxedPrecision -OpDecorate %105 RelaxedPrecision -OpDecorate %106 RelaxedPrecision -OpDecorate %107 RelaxedPrecision -OpDecorate %109 RelaxedPrecision -OpDecorate %110 RelaxedPrecision -OpDecorate %111 RelaxedPrecision -OpDecorate %113 RelaxedPrecision -OpDecorate %114 RelaxedPrecision -OpDecorate %115 RelaxedPrecision -OpDecorate %116 RelaxedPrecision -OpDecorate %117 RelaxedPrecision -OpDecorate %118 RelaxedPrecision -OpDecorate %119 RelaxedPrecision -OpDecorate %120 RelaxedPrecision -OpDecorate %122 RelaxedPrecision -OpDecorate %123 RelaxedPrecision -OpDecorate %124 RelaxedPrecision -OpDecorate %125 RelaxedPrecision -OpDecorate %126 RelaxedPrecision -OpDecorate %127 RelaxedPrecision -OpDecorate %128 RelaxedPrecision -OpDecorate %129 RelaxedPrecision -OpDecorate %130 RelaxedPrecision -OpDecorate %131 RelaxedPrecision -OpDecorate %132 RelaxedPrecision -OpDecorate %133 RelaxedPrecision -OpDecorate %135 RelaxedPrecision -OpDecorate %136 RelaxedPrecision -OpDecorate %137 RelaxedPrecision -OpDecorate %138 RelaxedPrecision -OpDecorate %139 RelaxedPrecision -OpDecorate %140 RelaxedPrecision -OpDecorate %141 RelaxedPrecision -OpDecorate %142 RelaxedPrecision -OpDecorate %143 RelaxedPrecision -OpDecorate %144 RelaxedPrecision -OpDecorate %145 RelaxedPrecision -OpDecorate %146 RelaxedPrecision -OpDecorate %147 RelaxedPrecision -OpDecorate %148 RelaxedPrecision -OpDecorate %149 RelaxedPrecision -OpDecorate %150 RelaxedPrecision -OpDecorate %151 RelaxedPrecision -OpDecorate %152 RelaxedPrecision -OpDecorate %153 RelaxedPrecision -OpDecorate %154 RelaxedPrecision -OpDecorate %155 RelaxedPrecision -OpDecorate %156 RelaxedPrecision -OpDecorate %157 RelaxedPrecision -OpDecorate %158 RelaxedPrecision -OpDecorate %159 RelaxedPrecision -OpDecorate %160 RelaxedPrecision -OpDecorate %161 RelaxedPrecision -OpDecorate %162 RelaxedPrecision -OpDecorate %163 RelaxedPrecision -OpDecorate %164 RelaxedPrecision -OpDecorate %165 RelaxedPrecision -OpDecorate %166 RelaxedPrecision -OpDecorate %167 RelaxedPrecision -OpDecorate %168 RelaxedPrecision -OpDecorate %169 RelaxedPrecision -OpDecorate %170 RelaxedPrecision -OpDecorate %171 RelaxedPrecision -OpDecorate %172 RelaxedPrecision -OpDecorate %173 RelaxedPrecision -OpDecorate %174 RelaxedPrecision -OpDecorate %175 RelaxedPrecision -OpDecorate %176 RelaxedPrecision -OpDecorate %177 RelaxedPrecision -OpDecorate %178 RelaxedPrecision -OpDecorate %179 RelaxedPrecision -OpDecorate %180 RelaxedPrecision -OpDecorate %181 RelaxedPrecision -OpDecorate %182 RelaxedPrecision -OpDecorate %183 RelaxedPrecision -OpDecorate %191 RelaxedPrecision -OpDecorate %192 RelaxedPrecision -OpDecorate %201 RelaxedPrecision -OpDecorate %203 RelaxedPrecision -OpDecorate %204 RelaxedPrecision -OpDecorate %207 RelaxedPrecision -OpDecorate %208 RelaxedPrecision -OpDecorate %212 RelaxedPrecision -OpDecorate %213 RelaxedPrecision -OpDecorate %216 RelaxedPrecision -OpDecorate %217 RelaxedPrecision -OpDecorate %221 RelaxedPrecision -OpDecorate %222 RelaxedPrecision -OpDecorate %225 RelaxedPrecision -OpDecorate %226 RelaxedPrecision -OpDecorate %230 RelaxedPrecision -OpDecorate %231 RelaxedPrecision -OpDecorate %233 RelaxedPrecision -OpDecorate %234 RelaxedPrecision -OpDecorate %235 RelaxedPrecision -OpDecorate %237 RelaxedPrecision -OpDecorate %238 RelaxedPrecision -OpDecorate %239 RelaxedPrecision -OpDecorate %240 RelaxedPrecision -OpDecorate %241 RelaxedPrecision -OpDecorate %242 RelaxedPrecision -%float = OpTypeFloat 32 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %_kGuardedDivideEpsilon "$kGuardedDivideEpsilon" + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "src" + OpMemberName %_UniformBuffer 1 "dst" + OpName %soft_light_component_Qhh2h2 "soft_light_component_Qhh2h2" + OpName %DSqd "DSqd" + OpName %DCub "DCub" + OpName %DaSqd "DaSqd" + OpName %DaCub "DaCub" + OpName %main "main" + OpDecorate %_kGuardedDivideEpsilon RelaxedPrecision + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %17 Binding 0 + OpDecorate %17 DescriptorSet 0 + OpDecorate %27 RelaxedPrecision + OpDecorate %28 RelaxedPrecision + OpDecorate %29 RelaxedPrecision + OpDecorate %30 RelaxedPrecision + OpDecorate %31 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %45 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %48 RelaxedPrecision + OpDecorate %49 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %55 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %58 RelaxedPrecision + OpDecorate %59 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %62 RelaxedPrecision + OpDecorate %63 RelaxedPrecision + OpDecorate %64 RelaxedPrecision + OpDecorate %65 RelaxedPrecision + OpDecorate %66 RelaxedPrecision + OpDecorate %67 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %69 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %71 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %74 RelaxedPrecision + OpDecorate %75 RelaxedPrecision + OpDecorate %76 RelaxedPrecision + OpDecorate %77 RelaxedPrecision + OpDecorate %78 RelaxedPrecision + OpDecorate %DSqd RelaxedPrecision + OpDecorate %85 RelaxedPrecision + OpDecorate %86 RelaxedPrecision + OpDecorate %87 RelaxedPrecision + OpDecorate %88 RelaxedPrecision + OpDecorate %89 RelaxedPrecision + OpDecorate %DCub RelaxedPrecision + OpDecorate %91 RelaxedPrecision + OpDecorate %92 RelaxedPrecision + OpDecorate %93 RelaxedPrecision + OpDecorate %DaSqd RelaxedPrecision + OpDecorate %95 RelaxedPrecision + OpDecorate %96 RelaxedPrecision + OpDecorate %97 RelaxedPrecision + OpDecorate %98 RelaxedPrecision + OpDecorate %99 RelaxedPrecision + OpDecorate %DaCub RelaxedPrecision + OpDecorate %101 RelaxedPrecision + OpDecorate %102 RelaxedPrecision + OpDecorate %103 RelaxedPrecision + OpDecorate %104 RelaxedPrecision + OpDecorate %105 RelaxedPrecision + OpDecorate %106 RelaxedPrecision + OpDecorate %107 RelaxedPrecision + OpDecorate %109 RelaxedPrecision + OpDecorate %110 RelaxedPrecision + OpDecorate %111 RelaxedPrecision + OpDecorate %113 RelaxedPrecision + OpDecorate %114 RelaxedPrecision + OpDecorate %115 RelaxedPrecision + OpDecorate %116 RelaxedPrecision + OpDecorate %117 RelaxedPrecision + OpDecorate %118 RelaxedPrecision + OpDecorate %119 RelaxedPrecision + OpDecorate %120 RelaxedPrecision + OpDecorate %122 RelaxedPrecision + OpDecorate %123 RelaxedPrecision + OpDecorate %124 RelaxedPrecision + OpDecorate %125 RelaxedPrecision + OpDecorate %126 RelaxedPrecision + OpDecorate %127 RelaxedPrecision + OpDecorate %128 RelaxedPrecision + OpDecorate %129 RelaxedPrecision + OpDecorate %130 RelaxedPrecision + OpDecorate %131 RelaxedPrecision + OpDecorate %132 RelaxedPrecision + OpDecorate %133 RelaxedPrecision + OpDecorate %135 RelaxedPrecision + OpDecorate %136 RelaxedPrecision + OpDecorate %137 RelaxedPrecision + OpDecorate %138 RelaxedPrecision + OpDecorate %139 RelaxedPrecision + OpDecorate %140 RelaxedPrecision + OpDecorate %141 RelaxedPrecision + OpDecorate %142 RelaxedPrecision + OpDecorate %143 RelaxedPrecision + OpDecorate %144 RelaxedPrecision + OpDecorate %145 RelaxedPrecision + OpDecorate %146 RelaxedPrecision + OpDecorate %147 RelaxedPrecision + OpDecorate %148 RelaxedPrecision + OpDecorate %149 RelaxedPrecision + OpDecorate %150 RelaxedPrecision + OpDecorate %151 RelaxedPrecision + OpDecorate %152 RelaxedPrecision + OpDecorate %153 RelaxedPrecision + OpDecorate %154 RelaxedPrecision + OpDecorate %155 RelaxedPrecision + OpDecorate %156 RelaxedPrecision + OpDecorate %157 RelaxedPrecision + OpDecorate %158 RelaxedPrecision + OpDecorate %159 RelaxedPrecision + OpDecorate %160 RelaxedPrecision + OpDecorate %161 RelaxedPrecision + OpDecorate %162 RelaxedPrecision + OpDecorate %163 RelaxedPrecision + OpDecorate %164 RelaxedPrecision + OpDecorate %165 RelaxedPrecision + OpDecorate %166 RelaxedPrecision + OpDecorate %167 RelaxedPrecision + OpDecorate %168 RelaxedPrecision + OpDecorate %169 RelaxedPrecision + OpDecorate %170 RelaxedPrecision + OpDecorate %171 RelaxedPrecision + OpDecorate %172 RelaxedPrecision + OpDecorate %173 RelaxedPrecision + OpDecorate %174 RelaxedPrecision + OpDecorate %175 RelaxedPrecision + OpDecorate %176 RelaxedPrecision + OpDecorate %177 RelaxedPrecision + OpDecorate %178 RelaxedPrecision + OpDecorate %179 RelaxedPrecision + OpDecorate %180 RelaxedPrecision + OpDecorate %181 RelaxedPrecision + OpDecorate %182 RelaxedPrecision + OpDecorate %183 RelaxedPrecision + OpDecorate %191 RelaxedPrecision + OpDecorate %192 RelaxedPrecision + OpDecorate %201 RelaxedPrecision + OpDecorate %203 RelaxedPrecision + OpDecorate %204 RelaxedPrecision + OpDecorate %207 RelaxedPrecision + OpDecorate %208 RelaxedPrecision + OpDecorate %212 RelaxedPrecision + OpDecorate %213 RelaxedPrecision + OpDecorate %216 RelaxedPrecision + OpDecorate %217 RelaxedPrecision + OpDecorate %221 RelaxedPrecision + OpDecorate %222 RelaxedPrecision + OpDecorate %225 RelaxedPrecision + OpDecorate %226 RelaxedPrecision + OpDecorate %230 RelaxedPrecision + OpDecorate %231 RelaxedPrecision + OpDecorate %233 RelaxedPrecision + OpDecorate %234 RelaxedPrecision + OpDecorate %235 RelaxedPrecision + OpDecorate %237 RelaxedPrecision + OpDecorate %238 RelaxedPrecision + OpDecorate %239 RelaxedPrecision + OpDecorate %240 RelaxedPrecision + OpDecorate %241 RelaxedPrecision + OpDecorate %242 RelaxedPrecision + %float = OpTypeFloat 32 %_ptr_Private_float = OpTypePointer Private %float %_kGuardedDivideEpsilon = OpVariable %_ptr_Private_float Private -%bool = OpTypeBool -%false = OpConstantFalse %bool + %bool = OpTypeBool + %false = OpConstantFalse %bool %float_9_99999994en09 = OpConstant %float 9.99999994e-09 -%float_0 = OpConstant %float 0 + %float_0 = OpConstant %float 0 %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%v4float = OpTypeVector %float 4 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%17 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%v2float = OpTypeVector %float 2 + %17 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %v2float = OpTypeVector %float 2 %_ptr_Function_v2float = OpTypePointer Function %v2float -%22 = OpTypeFunction %float %_ptr_Function_v2float %_ptr_Function_v2float -%float_2 = OpConstant %float 2 -%float_1 = OpConstant %float 1 -%float_4 = OpConstant %float 4 + %22 = OpTypeFunction %float %_ptr_Function_v2float %_ptr_Function_v2float + %float_2 = OpConstant %float 2 + %float_1 = OpConstant %float 1 + %float_4 = OpConstant %float 4 %_ptr_Function_float = OpTypePointer Function %float -%float_3 = OpConstant %float 3 -%float_6 = OpConstant %float 6 -%float_12 = OpConstant %float 12 -%float_16 = OpConstant %float 16 -%void = OpTypeVoid -%185 = OpTypeFunction %void + %float_3 = OpConstant %float 3 + %float_6 = OpConstant %float 6 + %float_12 = OpConstant %float 12 + %float_16 = OpConstant %float 16 + %void = OpTypeVoid + %185 = OpTypeFunction %void %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_1 = OpConstant %int 1 + %int = OpTypeInt 32 1 + %int_1 = OpConstant %int 1 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_0 = OpConstant %int 0 + %int_0 = OpConstant %int 0 %soft_light_component_Qhh2h2 = OpFunction %float None %22 -%23 = OpFunctionParameter %_ptr_Function_v2float -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%DSqd = OpVariable %_ptr_Function_float Function -%DCub = OpVariable %_ptr_Function_float Function -%DaSqd = OpVariable %_ptr_Function_float Function -%DaCub = OpVariable %_ptr_Function_float Function -%27 = OpLoad %v2float %23 -%28 = OpCompositeExtract %float %27 0 -%29 = OpFMul %float %float_2 %28 -%30 = OpLoad %v2float %23 -%31 = OpCompositeExtract %float %30 1 -%32 = OpFOrdLessThanEqual %bool %29 %31 -OpSelectionMerge %35 None -OpBranchConditional %32 %33 %34 -%33 = OpLabel -%36 = OpLoad %v2float %24 -%37 = OpCompositeExtract %float %36 0 -%38 = OpLoad %v2float %24 -%39 = OpCompositeExtract %float %38 0 -%40 = OpFMul %float %37 %39 -%41 = OpLoad %v2float %23 -%42 = OpCompositeExtract %float %41 1 -%43 = OpLoad %v2float %23 -%44 = OpCompositeExtract %float %43 0 -%45 = OpFMul %float %float_2 %44 -%46 = OpFSub %float %42 %45 -%47 = OpFMul %float %40 %46 -%48 = OpLoad %v2float %24 -%49 = OpCompositeExtract %float %48 1 -%50 = OpLoad %float %_kGuardedDivideEpsilon -%51 = OpFAdd %float %49 %50 -%52 = OpFDiv %float %47 %51 -%54 = OpLoad %v2float %24 -%55 = OpCompositeExtract %float %54 1 -%56 = OpFSub %float %float_1 %55 -%57 = OpLoad %v2float %23 -%58 = OpCompositeExtract %float %57 0 -%59 = OpFMul %float %56 %58 -%60 = OpFAdd %float %52 %59 -%61 = OpLoad %v2float %24 -%62 = OpCompositeExtract %float %61 0 -%63 = OpLoad %v2float %23 -%64 = OpCompositeExtract %float %63 1 -%65 = OpFNegate %float %64 -%66 = OpLoad %v2float %23 -%67 = OpCompositeExtract %float %66 0 -%68 = OpFMul %float %float_2 %67 -%69 = OpFAdd %float %65 %68 -%70 = OpFAdd %float %69 %float_1 -%71 = OpFMul %float %62 %70 -%72 = OpFAdd %float %60 %71 -OpReturnValue %72 -%34 = OpLabel -%74 = OpLoad %v2float %24 -%75 = OpCompositeExtract %float %74 0 -%76 = OpFMul %float %float_4 %75 -%77 = OpLoad %v2float %24 -%78 = OpCompositeExtract %float %77 1 -%79 = OpFOrdLessThanEqual %bool %76 %78 -OpSelectionMerge %82 None -OpBranchConditional %79 %80 %81 -%80 = OpLabel -%85 = OpLoad %v2float %24 -%86 = OpCompositeExtract %float %85 0 -%87 = OpLoad %v2float %24 -%88 = OpCompositeExtract %float %87 0 -%89 = OpFMul %float %86 %88 -OpStore %DSqd %89 -%91 = OpLoad %v2float %24 -%92 = OpCompositeExtract %float %91 0 -%93 = OpFMul %float %89 %92 -OpStore %DCub %93 -%95 = OpLoad %v2float %24 -%96 = OpCompositeExtract %float %95 1 -%97 = OpLoad %v2float %24 -%98 = OpCompositeExtract %float %97 1 -%99 = OpFMul %float %96 %98 -OpStore %DaSqd %99 -%101 = OpLoad %v2float %24 -%102 = OpCompositeExtract %float %101 1 -%103 = OpFMul %float %99 %102 -OpStore %DaCub %103 -%104 = OpLoad %v2float %23 -%105 = OpCompositeExtract %float %104 0 -%106 = OpLoad %v2float %24 -%107 = OpCompositeExtract %float %106 0 -%109 = OpLoad %v2float %23 -%110 = OpCompositeExtract %float %109 1 -%111 = OpFMul %float %float_3 %110 -%113 = OpLoad %v2float %23 -%114 = OpCompositeExtract %float %113 0 -%115 = OpFMul %float %float_6 %114 -%116 = OpFSub %float %111 %115 -%117 = OpFSub %float %116 %float_1 -%118 = OpFMul %float %107 %117 -%119 = OpFSub %float %105 %118 -%120 = OpFMul %float %99 %119 -%122 = OpLoad %v2float %24 -%123 = OpCompositeExtract %float %122 1 -%124 = OpFMul %float %float_12 %123 -%125 = OpFMul %float %124 %89 -%126 = OpLoad %v2float %23 -%127 = OpCompositeExtract %float %126 1 -%128 = OpLoad %v2float %23 -%129 = OpCompositeExtract %float %128 0 -%130 = OpFMul %float %float_2 %129 -%131 = OpFSub %float %127 %130 -%132 = OpFMul %float %125 %131 -%133 = OpFAdd %float %120 %132 -%135 = OpFMul %float %float_16 %93 -%136 = OpLoad %v2float %23 -%137 = OpCompositeExtract %float %136 1 -%138 = OpLoad %v2float %23 -%139 = OpCompositeExtract %float %138 0 -%140 = OpFMul %float %float_2 %139 -%141 = OpFSub %float %137 %140 -%142 = OpFMul %float %135 %141 -%143 = OpFSub %float %133 %142 -%144 = OpLoad %v2float %23 -%145 = OpCompositeExtract %float %144 0 -%146 = OpFMul %float %103 %145 -%147 = OpFSub %float %143 %146 -%148 = OpLoad %float %_kGuardedDivideEpsilon -%149 = OpFAdd %float %99 %148 -%150 = OpFDiv %float %147 %149 -OpReturnValue %150 -%81 = OpLabel -%151 = OpLoad %v2float %24 -%152 = OpCompositeExtract %float %151 0 -%153 = OpLoad %v2float %23 -%154 = OpCompositeExtract %float %153 1 -%155 = OpLoad %v2float %23 -%156 = OpCompositeExtract %float %155 0 -%157 = OpFMul %float %float_2 %156 -%158 = OpFSub %float %154 %157 -%159 = OpFAdd %float %158 %float_1 -%160 = OpFMul %float %152 %159 -%161 = OpLoad %v2float %23 -%162 = OpCompositeExtract %float %161 0 -%163 = OpFAdd %float %160 %162 -%165 = OpLoad %v2float %24 -%166 = OpCompositeExtract %float %165 1 -%167 = OpLoad %v2float %24 -%168 = OpCompositeExtract %float %167 0 -%169 = OpFMul %float %166 %168 -%164 = OpExtInst %float %1 Sqrt %169 -%170 = OpLoad %v2float %23 -%171 = OpCompositeExtract %float %170 1 -%172 = OpLoad %v2float %23 -%173 = OpCompositeExtract %float %172 0 -%174 = OpFMul %float %float_2 %173 -%175 = OpFSub %float %171 %174 -%176 = OpFMul %float %164 %175 -%177 = OpFSub %float %163 %176 -%178 = OpLoad %v2float %24 -%179 = OpCompositeExtract %float %178 1 -%180 = OpLoad %v2float %23 -%181 = OpCompositeExtract %float %180 0 -%182 = OpFMul %float %179 %181 -%183 = OpFSub %float %177 %182 -OpReturnValue %183 -%82 = OpLabel -OpBranch %35 -%35 = OpLabel -OpUnreachable -OpFunctionEnd -%main = OpFunction %void None %185 -%186 = OpLabel -%194 = OpVariable %_ptr_Function_v4float Function -%205 = OpVariable %_ptr_Function_v2float Function -%209 = OpVariable %_ptr_Function_v2float Function -%214 = OpVariable %_ptr_Function_v2float Function -%218 = OpVariable %_ptr_Function_v2float Function -%223 = OpVariable %_ptr_Function_v2float Function -%227 = OpVariable %_ptr_Function_v2float Function -%9 = OpSelect %float %false %float_9_99999994en09 %float_0 -OpStore %_kGuardedDivideEpsilon %9 -%187 = OpAccessChain %_ptr_Uniform_v4float %17 %int_1 -%191 = OpLoad %v4float %187 -%192 = OpCompositeExtract %float %191 3 -%193 = OpFOrdEqual %bool %192 %float_0 -OpSelectionMerge %198 None -OpBranchConditional %193 %196 %197 -%196 = OpLabel -%199 = OpAccessChain %_ptr_Uniform_v4float %17 %int_0 -%201 = OpLoad %v4float %199 -OpStore %194 %201 -OpBranch %198 -%197 = OpLabel -%202 = OpAccessChain %_ptr_Uniform_v4float %17 %int_0 -%203 = OpLoad %v4float %202 -%204 = OpVectorShuffle %v2float %203 %203 0 3 -OpStore %205 %204 -%206 = OpAccessChain %_ptr_Uniform_v4float %17 %int_1 -%207 = OpLoad %v4float %206 -%208 = OpVectorShuffle %v2float %207 %207 0 3 -OpStore %209 %208 -%210 = OpFunctionCall %float %soft_light_component_Qhh2h2 %205 %209 -%211 = OpAccessChain %_ptr_Uniform_v4float %17 %int_0 -%212 = OpLoad %v4float %211 -%213 = OpVectorShuffle %v2float %212 %212 1 3 -OpStore %214 %213 -%215 = OpAccessChain %_ptr_Uniform_v4float %17 %int_1 -%216 = OpLoad %v4float %215 -%217 = OpVectorShuffle %v2float %216 %216 1 3 -OpStore %218 %217 -%219 = OpFunctionCall %float %soft_light_component_Qhh2h2 %214 %218 -%220 = OpAccessChain %_ptr_Uniform_v4float %17 %int_0 -%221 = OpLoad %v4float %220 -%222 = OpVectorShuffle %v2float %221 %221 2 3 -OpStore %223 %222 -%224 = OpAccessChain %_ptr_Uniform_v4float %17 %int_1 -%225 = OpLoad %v4float %224 -%226 = OpVectorShuffle %v2float %225 %225 2 3 -OpStore %227 %226 -%228 = OpFunctionCall %float %soft_light_component_Qhh2h2 %223 %227 -%229 = OpAccessChain %_ptr_Uniform_v4float %17 %int_0 -%230 = OpLoad %v4float %229 -%231 = OpCompositeExtract %float %230 3 -%232 = OpAccessChain %_ptr_Uniform_v4float %17 %int_0 -%233 = OpLoad %v4float %232 -%234 = OpCompositeExtract %float %233 3 -%235 = OpFSub %float %float_1 %234 -%236 = OpAccessChain %_ptr_Uniform_v4float %17 %int_1 -%237 = OpLoad %v4float %236 -%238 = OpCompositeExtract %float %237 3 -%239 = OpFMul %float %235 %238 -%240 = OpFAdd %float %231 %239 -%241 = OpCompositeConstruct %v4float %210 %219 %228 %240 -OpStore %194 %241 -OpBranch %198 -%198 = OpLabel -%242 = OpLoad %v4float %194 -OpStore %sk_FragColor %242 -OpReturn -OpFunctionEnd + %23 = OpFunctionParameter %_ptr_Function_v2float + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %DSqd = OpVariable %_ptr_Function_float Function + %DCub = OpVariable %_ptr_Function_float Function + %DaSqd = OpVariable %_ptr_Function_float Function + %DaCub = OpVariable %_ptr_Function_float Function + %27 = OpLoad %v2float %23 + %28 = OpCompositeExtract %float %27 0 + %29 = OpFMul %float %float_2 %28 + %30 = OpLoad %v2float %23 + %31 = OpCompositeExtract %float %30 1 + %32 = OpFOrdLessThanEqual %bool %29 %31 + OpSelectionMerge %35 None + OpBranchConditional %32 %33 %34 + %33 = OpLabel + %36 = OpLoad %v2float %24 + %37 = OpCompositeExtract %float %36 0 + %38 = OpLoad %v2float %24 + %39 = OpCompositeExtract %float %38 0 + %40 = OpFMul %float %37 %39 + %41 = OpLoad %v2float %23 + %42 = OpCompositeExtract %float %41 1 + %43 = OpLoad %v2float %23 + %44 = OpCompositeExtract %float %43 0 + %45 = OpFMul %float %float_2 %44 + %46 = OpFSub %float %42 %45 + %47 = OpFMul %float %40 %46 + %48 = OpLoad %v2float %24 + %49 = OpCompositeExtract %float %48 1 + %50 = OpLoad %float %_kGuardedDivideEpsilon + %51 = OpFAdd %float %49 %50 + %52 = OpFDiv %float %47 %51 + %54 = OpLoad %v2float %24 + %55 = OpCompositeExtract %float %54 1 + %56 = OpFSub %float %float_1 %55 + %57 = OpLoad %v2float %23 + %58 = OpCompositeExtract %float %57 0 + %59 = OpFMul %float %56 %58 + %60 = OpFAdd %float %52 %59 + %61 = OpLoad %v2float %24 + %62 = OpCompositeExtract %float %61 0 + %63 = OpLoad %v2float %23 + %64 = OpCompositeExtract %float %63 1 + %65 = OpFNegate %float %64 + %66 = OpLoad %v2float %23 + %67 = OpCompositeExtract %float %66 0 + %68 = OpFMul %float %float_2 %67 + %69 = OpFAdd %float %65 %68 + %70 = OpFAdd %float %69 %float_1 + %71 = OpFMul %float %62 %70 + %72 = OpFAdd %float %60 %71 + OpReturnValue %72 + %34 = OpLabel + %74 = OpLoad %v2float %24 + %75 = OpCompositeExtract %float %74 0 + %76 = OpFMul %float %float_4 %75 + %77 = OpLoad %v2float %24 + %78 = OpCompositeExtract %float %77 1 + %79 = OpFOrdLessThanEqual %bool %76 %78 + OpSelectionMerge %82 None + OpBranchConditional %79 %80 %81 + %80 = OpLabel + %85 = OpLoad %v2float %24 + %86 = OpCompositeExtract %float %85 0 + %87 = OpLoad %v2float %24 + %88 = OpCompositeExtract %float %87 0 + %89 = OpFMul %float %86 %88 + OpStore %DSqd %89 + %91 = OpLoad %v2float %24 + %92 = OpCompositeExtract %float %91 0 + %93 = OpFMul %float %89 %92 + OpStore %DCub %93 + %95 = OpLoad %v2float %24 + %96 = OpCompositeExtract %float %95 1 + %97 = OpLoad %v2float %24 + %98 = OpCompositeExtract %float %97 1 + %99 = OpFMul %float %96 %98 + OpStore %DaSqd %99 + %101 = OpLoad %v2float %24 + %102 = OpCompositeExtract %float %101 1 + %103 = OpFMul %float %99 %102 + OpStore %DaCub %103 + %104 = OpLoad %v2float %23 + %105 = OpCompositeExtract %float %104 0 + %106 = OpLoad %v2float %24 + %107 = OpCompositeExtract %float %106 0 + %109 = OpLoad %v2float %23 + %110 = OpCompositeExtract %float %109 1 + %111 = OpFMul %float %float_3 %110 + %113 = OpLoad %v2float %23 + %114 = OpCompositeExtract %float %113 0 + %115 = OpFMul %float %float_6 %114 + %116 = OpFSub %float %111 %115 + %117 = OpFSub %float %116 %float_1 + %118 = OpFMul %float %107 %117 + %119 = OpFSub %float %105 %118 + %120 = OpFMul %float %99 %119 + %122 = OpLoad %v2float %24 + %123 = OpCompositeExtract %float %122 1 + %124 = OpFMul %float %float_12 %123 + %125 = OpFMul %float %124 %89 + %126 = OpLoad %v2float %23 + %127 = OpCompositeExtract %float %126 1 + %128 = OpLoad %v2float %23 + %129 = OpCompositeExtract %float %128 0 + %130 = OpFMul %float %float_2 %129 + %131 = OpFSub %float %127 %130 + %132 = OpFMul %float %125 %131 + %133 = OpFAdd %float %120 %132 + %135 = OpFMul %float %float_16 %93 + %136 = OpLoad %v2float %23 + %137 = OpCompositeExtract %float %136 1 + %138 = OpLoad %v2float %23 + %139 = OpCompositeExtract %float %138 0 + %140 = OpFMul %float %float_2 %139 + %141 = OpFSub %float %137 %140 + %142 = OpFMul %float %135 %141 + %143 = OpFSub %float %133 %142 + %144 = OpLoad %v2float %23 + %145 = OpCompositeExtract %float %144 0 + %146 = OpFMul %float %103 %145 + %147 = OpFSub %float %143 %146 + %148 = OpLoad %float %_kGuardedDivideEpsilon + %149 = OpFAdd %float %99 %148 + %150 = OpFDiv %float %147 %149 + OpReturnValue %150 + %81 = OpLabel + %151 = OpLoad %v2float %24 + %152 = OpCompositeExtract %float %151 0 + %153 = OpLoad %v2float %23 + %154 = OpCompositeExtract %float %153 1 + %155 = OpLoad %v2float %23 + %156 = OpCompositeExtract %float %155 0 + %157 = OpFMul %float %float_2 %156 + %158 = OpFSub %float %154 %157 + %159 = OpFAdd %float %158 %float_1 + %160 = OpFMul %float %152 %159 + %161 = OpLoad %v2float %23 + %162 = OpCompositeExtract %float %161 0 + %163 = OpFAdd %float %160 %162 + %165 = OpLoad %v2float %24 + %166 = OpCompositeExtract %float %165 1 + %167 = OpLoad %v2float %24 + %168 = OpCompositeExtract %float %167 0 + %169 = OpFMul %float %166 %168 + %164 = OpExtInst %float %1 Sqrt %169 + %170 = OpLoad %v2float %23 + %171 = OpCompositeExtract %float %170 1 + %172 = OpLoad %v2float %23 + %173 = OpCompositeExtract %float %172 0 + %174 = OpFMul %float %float_2 %173 + %175 = OpFSub %float %171 %174 + %176 = OpFMul %float %164 %175 + %177 = OpFSub %float %163 %176 + %178 = OpLoad %v2float %24 + %179 = OpCompositeExtract %float %178 1 + %180 = OpLoad %v2float %23 + %181 = OpCompositeExtract %float %180 0 + %182 = OpFMul %float %179 %181 + %183 = OpFSub %float %177 %182 + OpReturnValue %183 + %82 = OpLabel + OpBranch %35 + %35 = OpLabel + OpUnreachable + OpFunctionEnd + %main = OpFunction %void None %185 + %186 = OpLabel + %194 = OpVariable %_ptr_Function_v4float Function + %205 = OpVariable %_ptr_Function_v2float Function + %209 = OpVariable %_ptr_Function_v2float Function + %214 = OpVariable %_ptr_Function_v2float Function + %218 = OpVariable %_ptr_Function_v2float Function + %223 = OpVariable %_ptr_Function_v2float Function + %227 = OpVariable %_ptr_Function_v2float Function + %9 = OpSelect %float %false %float_9_99999994en09 %float_0 + OpStore %_kGuardedDivideEpsilon %9 + %187 = OpAccessChain %_ptr_Uniform_v4float %17 %int_1 + %191 = OpLoad %v4float %187 + %192 = OpCompositeExtract %float %191 3 + %193 = OpFOrdEqual %bool %192 %float_0 + OpSelectionMerge %198 None + OpBranchConditional %193 %196 %197 + %196 = OpLabel + %199 = OpAccessChain %_ptr_Uniform_v4float %17 %int_0 + %201 = OpLoad %v4float %199 + OpStore %194 %201 + OpBranch %198 + %197 = OpLabel + %202 = OpAccessChain %_ptr_Uniform_v4float %17 %int_0 + %203 = OpLoad %v4float %202 + %204 = OpVectorShuffle %v2float %203 %203 0 3 + OpStore %205 %204 + %206 = OpAccessChain %_ptr_Uniform_v4float %17 %int_1 + %207 = OpLoad %v4float %206 + %208 = OpVectorShuffle %v2float %207 %207 0 3 + OpStore %209 %208 + %210 = OpFunctionCall %float %soft_light_component_Qhh2h2 %205 %209 + %211 = OpAccessChain %_ptr_Uniform_v4float %17 %int_0 + %212 = OpLoad %v4float %211 + %213 = OpVectorShuffle %v2float %212 %212 1 3 + OpStore %214 %213 + %215 = OpAccessChain %_ptr_Uniform_v4float %17 %int_1 + %216 = OpLoad %v4float %215 + %217 = OpVectorShuffle %v2float %216 %216 1 3 + OpStore %218 %217 + %219 = OpFunctionCall %float %soft_light_component_Qhh2h2 %214 %218 + %220 = OpAccessChain %_ptr_Uniform_v4float %17 %int_0 + %221 = OpLoad %v4float %220 + %222 = OpVectorShuffle %v2float %221 %221 2 3 + OpStore %223 %222 + %224 = OpAccessChain %_ptr_Uniform_v4float %17 %int_1 + %225 = OpLoad %v4float %224 + %226 = OpVectorShuffle %v2float %225 %225 2 3 + OpStore %227 %226 + %228 = OpFunctionCall %float %soft_light_component_Qhh2h2 %223 %227 + %229 = OpAccessChain %_ptr_Uniform_v4float %17 %int_0 + %230 = OpLoad %v4float %229 + %231 = OpCompositeExtract %float %230 3 + %232 = OpAccessChain %_ptr_Uniform_v4float %17 %int_0 + %233 = OpLoad %v4float %232 + %234 = OpCompositeExtract %float %233 3 + %235 = OpFSub %float %float_1 %234 + %236 = OpAccessChain %_ptr_Uniform_v4float %17 %int_1 + %237 = OpLoad %v4float %236 + %238 = OpCompositeExtract %float %237 3 + %239 = OpFMul %float %235 %238 + %240 = OpFAdd %float %231 %239 + %241 = OpCompositeConstruct %v4float %210 %219 %228 %240 + OpStore %194 %241 + OpBranch %198 + %198 = OpLabel + %242 = OpLoad %v4float %194 + OpStore %sk_FragColor %242 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/blend/BlendSoftLight.wgsl b/tests/sksl/blend/BlendSoftLight.wgsl index 341335391140..0fcf7541d124 100644 --- a/tests/sksl/blend/BlendSoftLight.wgsl +++ b/tests/sksl/blend/BlendSoftLight.wgsl @@ -1,11 +1,12 @@ /* -:38:3 warning: code is unreachable +:39:3 warning: code is unreachable return f32(); ^^^^^^ */ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; @@ -22,12 +23,12 @@ fn soft_light_component_Qhh2h2(_skParam0: vec2, _skParam1: vec2) -> f3 let s = _skParam0; let d = _skParam1; { - if (2.0 * s.x <= s.y) { + if (2.0 * s.x) <= s.y { { return (((d.x * d.x) * (s.y - 2.0 * s.x)) / (d.y + sk_PrivkGuardedDivideEpsilon) + (1.0 - d.y) * s.x) + d.x * ((-s.y + 2.0 * s.x) + 1.0); } } else { - if (4.0 * d.x <= d.y) { + if (4.0 * d.x) <= d.y { { var DSqd: f32 = d.x * d.x; var DCub: f32 = DSqd * d.x; @@ -50,7 +51,7 @@ fn main(_stageOut: ptr) { let _skTemp1 = soft_light_component_Qhh2h2(_globalUniforms.src.xw, _globalUniforms.dst.xw); let _skTemp2 = soft_light_component_Qhh2h2(_globalUniforms.src.yw, _globalUniforms.dst.yw); let _skTemp3 = soft_light_component_Qhh2h2(_globalUniforms.src.zw, _globalUniforms.dst.zw); - (*_stageOut).sk_FragColor = select(vec4(_skTemp1, _skTemp2, _skTemp3, _globalUniforms.src.w + (1.0 - _globalUniforms.src.w) * _globalUniforms.dst.w), _globalUniforms.src, vec4(_globalUniforms.dst.w == 0.0)); + (*_stageOut).sk_FragColor = select(vec4(_skTemp1, _skTemp2, _skTemp3, _globalUniforms.src.w + (1.0 - _globalUniforms.src.w) * _globalUniforms.dst.w), _globalUniforms.src, vec4((_globalUniforms.dst.w == 0.0))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/blend/BlendSrc.asm.frag b/tests/sksl/blend/BlendSrc.asm.frag index 959792efeef6..f2d5ac911a73 100644 --- a/tests/sksl/blend/BlendSrc.asm.frag +++ b/tests/sksl/blend/BlendSrc.asm.frag @@ -1,45 +1,45 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "src" -OpMemberName %_UniformBuffer 1 "dst" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %20 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "src" + OpMemberName %_UniformBuffer 1 "dst" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %20 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%14 = OpTypeFunction %void + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %14 = OpTypeFunction %void %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%main = OpFunction %void None %14 -%15 = OpLabel -%16 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%20 = OpLoad %v4float %16 -OpStore %sk_FragColor %20 -OpReturn -OpFunctionEnd + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %main = OpFunction %void None %14 + %15 = OpLabel + %16 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %20 = OpLoad %v4float %16 + OpStore %sk_FragColor %20 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/blend/BlendSrc.wgsl b/tests/sksl/blend/BlendSrc.wgsl index 25aae36929d9..3fa237b6be5b 100644 --- a/tests/sksl/blend/BlendSrc.wgsl +++ b/tests/sksl/blend/BlendSrc.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/blend/BlendSrcAtop.asm.frag b/tests/sksl/blend/BlendSrcAtop.asm.frag index 2e174fd514f2..4c5b15f07791 100644 --- a/tests/sksl/blend/BlendSrcAtop.asm.frag +++ b/tests/sksl/blend/BlendSrcAtop.asm.frag @@ -1,68 +1,68 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "src" -OpMemberName %_UniformBuffer 1 "dst" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %20 RelaxedPrecision -OpDecorate %21 RelaxedPrecision -OpDecorate %24 RelaxedPrecision -OpDecorate %25 RelaxedPrecision -OpDecorate %28 RelaxedPrecision -OpDecorate %29 RelaxedPrecision -OpDecorate %30 RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %34 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "src" + OpMemberName %_UniformBuffer 1 "dst" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %20 RelaxedPrecision + OpDecorate %21 RelaxedPrecision + OpDecorate %24 RelaxedPrecision + OpDecorate %25 RelaxedPrecision + OpDecorate %28 RelaxedPrecision + OpDecorate %29 RelaxedPrecision + OpDecorate %30 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %34 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%14 = OpTypeFunction %void + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %14 = OpTypeFunction %void %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_1 = OpConstant %int 1 -%int_0 = OpConstant %int 0 -%float_1 = OpConstant %float 1 -%main = OpFunction %void None %14 -%15 = OpLabel -%16 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%20 = OpLoad %v4float %16 -%21 = OpCompositeExtract %float %20 3 -%22 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%24 = OpLoad %v4float %22 -%25 = OpVectorTimesScalar %v4float %24 %21 -%27 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%28 = OpLoad %v4float %27 -%29 = OpCompositeExtract %float %28 3 -%30 = OpFSub %float %float_1 %29 -%31 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%32 = OpLoad %v4float %31 -%33 = OpVectorTimesScalar %v4float %32 %30 -%34 = OpFAdd %v4float %25 %33 -OpStore %sk_FragColor %34 -OpReturn -OpFunctionEnd + %int = OpTypeInt 32 1 + %int_1 = OpConstant %int 1 + %int_0 = OpConstant %int 0 + %float_1 = OpConstant %float 1 + %main = OpFunction %void None %14 + %15 = OpLabel + %16 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %20 = OpLoad %v4float %16 + %21 = OpCompositeExtract %float %20 3 + %22 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %24 = OpLoad %v4float %22 + %25 = OpVectorTimesScalar %v4float %24 %21 + %27 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %28 = OpLoad %v4float %27 + %29 = OpCompositeExtract %float %28 3 + %30 = OpFSub %float %float_1 %29 + %31 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %32 = OpLoad %v4float %31 + %33 = OpVectorTimesScalar %v4float %32 %30 + %34 = OpFAdd %v4float %25 %33 + OpStore %sk_FragColor %34 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/blend/BlendSrcAtop.wgsl b/tests/sksl/blend/BlendSrcAtop.wgsl index 5cc11f536374..78c131486294 100644 --- a/tests/sksl/blend/BlendSrcAtop.wgsl +++ b/tests/sksl/blend/BlendSrcAtop.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/blend/BlendSrcIn.asm.frag b/tests/sksl/blend/BlendSrcIn.asm.frag index 7e4c527a0369..b7898106c7ba 100644 --- a/tests/sksl/blend/BlendSrcIn.asm.frag +++ b/tests/sksl/blend/BlendSrcIn.asm.frag @@ -1,53 +1,53 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "src" -OpMemberName %_UniformBuffer 1 "dst" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %20 RelaxedPrecision -OpDecorate %23 RelaxedPrecision -OpDecorate %24 RelaxedPrecision -OpDecorate %25 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "src" + OpMemberName %_UniformBuffer 1 "dst" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %20 RelaxedPrecision + OpDecorate %23 RelaxedPrecision + OpDecorate %24 RelaxedPrecision + OpDecorate %25 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%14 = OpTypeFunction %void + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %14 = OpTypeFunction %void %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%main = OpFunction %void None %14 -%15 = OpLabel -%16 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%20 = OpLoad %v4float %16 -%21 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%23 = OpLoad %v4float %21 -%24 = OpCompositeExtract %float %23 3 -%25 = OpVectorTimesScalar %v4float %20 %24 -OpStore %sk_FragColor %25 -OpReturn -OpFunctionEnd + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %main = OpFunction %void None %14 + %15 = OpLabel + %16 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %20 = OpLoad %v4float %16 + %21 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %23 = OpLoad %v4float %21 + %24 = OpCompositeExtract %float %23 3 + %25 = OpVectorTimesScalar %v4float %20 %24 + OpStore %sk_FragColor %25 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/blend/BlendSrcIn.wgsl b/tests/sksl/blend/BlendSrcIn.wgsl index 932008df0446..183b15f59ab1 100644 --- a/tests/sksl/blend/BlendSrcIn.wgsl +++ b/tests/sksl/blend/BlendSrcIn.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/blend/BlendSrcOut.asm.frag b/tests/sksl/blend/BlendSrcOut.asm.frag index ee3c71b26b28..057b465d91fe 100644 --- a/tests/sksl/blend/BlendSrcOut.asm.frag +++ b/tests/sksl/blend/BlendSrcOut.asm.frag @@ -1,56 +1,56 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "src" -OpMemberName %_UniformBuffer 1 "dst" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %21 RelaxedPrecision -OpDecorate %22 RelaxedPrecision -OpDecorate %23 RelaxedPrecision -OpDecorate %26 RelaxedPrecision -OpDecorate %27 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "src" + OpMemberName %_UniformBuffer 1 "dst" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %21 RelaxedPrecision + OpDecorate %22 RelaxedPrecision + OpDecorate %23 RelaxedPrecision + OpDecorate %26 RelaxedPrecision + OpDecorate %27 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%14 = OpTypeFunction %void -%float_1 = OpConstant %float 1 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %14 = OpTypeFunction %void + %float_1 = OpConstant %float 1 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_1 = OpConstant %int 1 -%int_0 = OpConstant %int 0 -%main = OpFunction %void None %14 -%15 = OpLabel -%17 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%21 = OpLoad %v4float %17 -%22 = OpCompositeExtract %float %21 3 -%23 = OpFSub %float %float_1 %22 -%24 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%26 = OpLoad %v4float %24 -%27 = OpVectorTimesScalar %v4float %26 %23 -OpStore %sk_FragColor %27 -OpReturn -OpFunctionEnd + %int = OpTypeInt 32 1 + %int_1 = OpConstant %int 1 + %int_0 = OpConstant %int 0 + %main = OpFunction %void None %14 + %15 = OpLabel + %17 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %21 = OpLoad %v4float %17 + %22 = OpCompositeExtract %float %21 3 + %23 = OpFSub %float %float_1 %22 + %24 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %26 = OpLoad %v4float %24 + %27 = OpVectorTimesScalar %v4float %26 %23 + OpStore %sk_FragColor %27 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/blend/BlendSrcOut.wgsl b/tests/sksl/blend/BlendSrcOut.wgsl index 45c52461528c..f2ab87234ce8 100644 --- a/tests/sksl/blend/BlendSrcOut.wgsl +++ b/tests/sksl/blend/BlendSrcOut.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/blend/BlendSrcOver.asm.frag b/tests/sksl/blend/BlendSrcOver.asm.frag index 4646d26d3f6c..3b3ab40b60cc 100644 --- a/tests/sksl/blend/BlendSrcOver.asm.frag +++ b/tests/sksl/blend/BlendSrcOver.asm.frag @@ -1,61 +1,61 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "src" -OpMemberName %_UniformBuffer 1 "dst" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %20 RelaxedPrecision -OpDecorate %23 RelaxedPrecision -OpDecorate %24 RelaxedPrecision -OpDecorate %25 RelaxedPrecision -OpDecorate %28 RelaxedPrecision -OpDecorate %29 RelaxedPrecision -OpDecorate %30 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "src" + OpMemberName %_UniformBuffer 1 "dst" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %20 RelaxedPrecision + OpDecorate %23 RelaxedPrecision + OpDecorate %24 RelaxedPrecision + OpDecorate %25 RelaxedPrecision + OpDecorate %28 RelaxedPrecision + OpDecorate %29 RelaxedPrecision + OpDecorate %30 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%14 = OpTypeFunction %void + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %14 = OpTypeFunction %void %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%float_1 = OpConstant %float 1 -%int_1 = OpConstant %int 1 -%main = OpFunction %void None %14 -%15 = OpLabel -%16 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%20 = OpLoad %v4float %16 -%22 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%23 = OpLoad %v4float %22 -%24 = OpCompositeExtract %float %23 3 -%25 = OpFSub %float %float_1 %24 -%26 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%28 = OpLoad %v4float %26 -%29 = OpVectorTimesScalar %v4float %28 %25 -%30 = OpFAdd %v4float %20 %29 -OpStore %sk_FragColor %30 -OpReturn -OpFunctionEnd + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %float_1 = OpConstant %float 1 + %int_1 = OpConstant %int 1 + %main = OpFunction %void None %14 + %15 = OpLabel + %16 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %20 = OpLoad %v4float %16 + %22 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %23 = OpLoad %v4float %22 + %24 = OpCompositeExtract %float %23 3 + %25 = OpFSub %float %float_1 %24 + %26 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %28 = OpLoad %v4float %26 + %29 = OpVectorTimesScalar %v4float %28 %25 + %30 = OpFAdd %v4float %20 %29 + OpStore %sk_FragColor %30 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/blend/BlendSrcOver.wgsl b/tests/sksl/blend/BlendSrcOver.wgsl index f4c3830f52ee..590049f92913 100644 --- a/tests/sksl/blend/BlendSrcOver.wgsl +++ b/tests/sksl/blend/BlendSrcOver.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/blend/BlendXor.asm.frag b/tests/sksl/blend/BlendXor.asm.frag index de4ef0b5e13c..29f650592b53 100644 --- a/tests/sksl/blend/BlendXor.asm.frag +++ b/tests/sksl/blend/BlendXor.asm.frag @@ -1,70 +1,70 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "src" -OpMemberName %_UniformBuffer 1 "dst" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %21 RelaxedPrecision -OpDecorate %22 RelaxedPrecision -OpDecorate %23 RelaxedPrecision -OpDecorate %26 RelaxedPrecision -OpDecorate %27 RelaxedPrecision -OpDecorate %29 RelaxedPrecision -OpDecorate %30 RelaxedPrecision -OpDecorate %31 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %34 RelaxedPrecision -OpDecorate %35 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "src" + OpMemberName %_UniformBuffer 1 "dst" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %21 RelaxedPrecision + OpDecorate %22 RelaxedPrecision + OpDecorate %23 RelaxedPrecision + OpDecorate %26 RelaxedPrecision + OpDecorate %27 RelaxedPrecision + OpDecorate %29 RelaxedPrecision + OpDecorate %30 RelaxedPrecision + OpDecorate %31 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %34 RelaxedPrecision + OpDecorate %35 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%14 = OpTypeFunction %void -%float_1 = OpConstant %float 1 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %14 = OpTypeFunction %void + %float_1 = OpConstant %float 1 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_1 = OpConstant %int 1 -%int_0 = OpConstant %int 0 -%main = OpFunction %void None %14 -%15 = OpLabel -%17 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%21 = OpLoad %v4float %17 -%22 = OpCompositeExtract %float %21 3 -%23 = OpFSub %float %float_1 %22 -%24 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%26 = OpLoad %v4float %24 -%27 = OpVectorTimesScalar %v4float %26 %23 -%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%29 = OpLoad %v4float %28 -%30 = OpCompositeExtract %float %29 3 -%31 = OpFSub %float %float_1 %30 -%32 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%33 = OpLoad %v4float %32 -%34 = OpVectorTimesScalar %v4float %33 %31 -%35 = OpFAdd %v4float %27 %34 -OpStore %sk_FragColor %35 -OpReturn -OpFunctionEnd + %int = OpTypeInt 32 1 + %int_1 = OpConstant %int 1 + %int_0 = OpConstant %int 0 + %main = OpFunction %void None %14 + %15 = OpLabel + %17 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %21 = OpLoad %v4float %17 + %22 = OpCompositeExtract %float %21 3 + %23 = OpFSub %float %float_1 %22 + %24 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %26 = OpLoad %v4float %24 + %27 = OpVectorTimesScalar %v4float %26 %23 + %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %29 = OpLoad %v4float %28 + %30 = OpCompositeExtract %float %29 3 + %31 = OpFSub %float %float_1 %30 + %32 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %33 = OpLoad %v4float %32 + %34 = OpVectorTimesScalar %v4float %33 %31 + %35 = OpFAdd %v4float %27 %34 + OpStore %sk_FragColor %35 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/blend/BlendXor.wgsl b/tests/sksl/blend/BlendXor.wgsl index 432206c8e04a..7eb36ed29057 100644 --- a/tests/sksl/blend/BlendXor.wgsl +++ b/tests/sksl/blend/BlendXor.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/compute/ArrayAdd.asm.comp b/tests/sksl/compute/ArrayAdd.asm.comp new file mode 100644 index 000000000000..db5d60501826 --- /dev/null +++ b/tests/sksl/compute/ArrayAdd.asm.comp @@ -0,0 +1,61 @@ + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint GLCompute %main "main" %sk_GlobalInvocationID + OpExecutionMode %main LocalSize 256 1 1 + OpName %inputBlock "inputBlock" + OpMemberName %inputBlock 0 "offset" + OpMemberName %inputBlock 1 "src" + OpName %outputBlock "outputBlock" + OpMemberName %outputBlock 0 "dest" + OpName %sk_GlobalInvocationID "sk_GlobalInvocationID" + OpName %main "main" + OpDecorate %_runtimearr_int ArrayStride 16 + OpMemberDecorate %inputBlock 0 Offset 0 + OpMemberDecorate %inputBlock 1 Offset 16 + OpDecorate %inputBlock BufferBlock + OpDecorate %3 Binding 0 + OpDecorate %3 DescriptorSet 0 + OpMemberDecorate %outputBlock 0 Offset 0 + OpDecorate %outputBlock BufferBlock + OpDecorate %9 Binding 1 + OpDecorate %9 DescriptorSet 0 + OpDecorate %sk_GlobalInvocationID BuiltIn GlobalInvocationId + %uint = OpTypeInt 32 0 + %int = OpTypeInt 32 1 +%_runtimearr_int = OpTypeRuntimeArray %int + %inputBlock = OpTypeStruct %uint %_runtimearr_int +%_ptr_Uniform_inputBlock = OpTypePointer Uniform %inputBlock + %3 = OpVariable %_ptr_Uniform_inputBlock Uniform +%outputBlock = OpTypeStruct %_runtimearr_int +%_ptr_Uniform_outputBlock = OpTypePointer Uniform %outputBlock + %9 = OpVariable %_ptr_Uniform_outputBlock Uniform + %v3uint = OpTypeVector %uint 3 +%_ptr_Input_v3uint = OpTypePointer Input %v3uint +%sk_GlobalInvocationID = OpVariable %_ptr_Input_v3uint Input + %void = OpTypeVoid + %16 = OpTypeFunction %void + %int_1 = OpConstant %int 1 +%_ptr_Uniform_int = OpTypePointer Uniform %int + %int_0 = OpConstant %int 0 +%_ptr_Uniform_uint = OpTypePointer Uniform %uint + %main = OpFunction %void None %16 + %17 = OpLabel + %19 = OpLoad %v3uint %sk_GlobalInvocationID + %20 = OpCompositeExtract %uint %19 0 + %21 = OpAccessChain %_ptr_Uniform_int %3 %int_1 %20 + %23 = OpLoad %int %21 + %24 = OpLoad %v3uint %sk_GlobalInvocationID + %25 = OpCompositeExtract %uint %24 0 + %27 = OpAccessChain %_ptr_Uniform_uint %3 %int_0 + %29 = OpLoad %uint %27 + %30 = OpIAdd %uint %25 %29 + %31 = OpAccessChain %_ptr_Uniform_int %3 %int_1 %30 + %32 = OpLoad %int %31 + %33 = OpIAdd %int %23 %32 + %34 = OpLoad %v3uint %sk_GlobalInvocationID + %35 = OpCompositeExtract %uint %34 0 + %36 = OpAccessChain %_ptr_Uniform_int %9 %int_0 %35 + OpStore %36 %33 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/compute/AtomicDeclarations.asm.comp b/tests/sksl/compute/AtomicDeclarations.asm.comp new file mode 100644 index 000000000000..345754db661d --- /dev/null +++ b/tests/sksl/compute/AtomicDeclarations.asm.comp @@ -0,0 +1,77 @@ + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint GLCompute %main "main" + OpExecutionMode %main LocalSize 64 1 1 + OpName %S "S" + OpMemberName %S 0 "structMemberAtomic" + OpMemberName %S 1 "structMemberAtomicArray" + OpName %NestedS "NestedS" + OpMemberName %NestedS 0 "nestedStructWithAtomicMember" + OpName %ssbo "ssbo" + OpMemberName %ssbo 0 "ssboAtomic" + OpMemberName %ssbo 1 "ssboAtomicArray" + OpMemberName %ssbo 2 "ssboStructWithAtomicMember" + OpMemberName %ssbo 3 "ssboStructWithAtomicMemberArray" + OpMemberName %ssbo 4 "ssboNestedStructWithAtomicMember" + OpName %wgAtomic "wgAtomic" + OpName %wgAtomicArray "wgAtomicArray" + OpName %wgNestedStructWithAtomicMember "wgNestedStructWithAtomicMember" + OpName %main "main" + OpDecorate %_arr_uint_int_2 ArrayStride 16 + OpMemberDecorate %S 0 Offset 0 + OpMemberDecorate %S 0 RelaxedPrecision + OpMemberDecorate %S 1 Offset 16 + OpMemberDecorate %S 1 RelaxedPrecision + OpDecorate %_arr_S_int_2 ArrayStride 48 + OpMemberDecorate %NestedS 0 Offset 0 + OpMemberDecorate %NestedS 0 RelaxedPrecision + OpMemberDecorate %ssbo 0 Offset 0 + OpMemberDecorate %ssbo 0 RelaxedPrecision + OpMemberDecorate %ssbo 1 Offset 16 + OpMemberDecorate %ssbo 1 RelaxedPrecision + OpMemberDecorate %ssbo 2 Offset 48 + OpMemberDecorate %ssbo 2 RelaxedPrecision + OpMemberDecorate %ssbo 3 Offset 96 + OpMemberDecorate %ssbo 3 RelaxedPrecision + OpMemberDecorate %ssbo 4 Offset 192 + OpMemberDecorate %ssbo 4 RelaxedPrecision + OpDecorate %ssbo BufferBlock + OpDecorate %3 Binding 0 + OpDecorate %3 DescriptorSet 0 + %uint = OpTypeInt 32 0 + %int = OpTypeInt 32 1 + %int_2 = OpConstant %int 2 +%_arr_uint_int_2 = OpTypeArray %uint %int_2 + %S = OpTypeStruct %uint %_arr_uint_int_2 +%_arr_S_int_2 = OpTypeArray %S %int_2 + %NestedS = OpTypeStruct %S + %ssbo = OpTypeStruct %uint %_arr_uint_int_2 %S %_arr_S_int_2 %NestedS +%_ptr_Uniform_ssbo = OpTypePointer Uniform %ssbo + %3 = OpVariable %_ptr_Uniform_ssbo Uniform +%_ptr_Workgroup_uint = OpTypePointer Workgroup %uint + %wgAtomic = OpVariable %_ptr_Workgroup_uint Workgroup +%_ptr_Workgroup__arr_uint_int_2 = OpTypePointer Workgroup %_arr_uint_int_2 +%wgAtomicArray = OpVariable %_ptr_Workgroup__arr_uint_int_2 Workgroup +%_ptr_Workgroup_NestedS = OpTypePointer Workgroup %NestedS +%wgNestedStructWithAtomicMember = OpVariable %_ptr_Workgroup_NestedS Workgroup + %void = OpTypeVoid + %20 = OpTypeFunction %void + %int_1 = OpConstant %int 1 + %uint_2 = OpConstant %uint 2 + %uint_0 = OpConstant %uint 0 + %int_0 = OpConstant %int 0 + %uint_1 = OpConstant %uint 1 + %main = OpFunction %void None %20 + %21 = OpLabel + %24 = OpAccessChain %_ptr_Workgroup_uint %wgAtomicArray %int_1 + %27 = OpAtomicLoad %uint %wgAtomic %uint_2 %uint_0 + %22 = OpAtomicIAdd %uint %24 %uint_2 %uint_0 %27 + %30 = OpAccessChain %_ptr_Workgroup_uint %wgAtomicArray %int_0 + %32 = OpAccessChain %_ptr_Workgroup_uint %wgAtomicArray %int_1 + %31 = OpAtomicLoad %uint %32 %uint_2 %uint_0 + %28 = OpAtomicIAdd %uint %30 %uint_2 %uint_0 %31 + %34 = OpAccessChain %_ptr_Workgroup_uint %wgNestedStructWithAtomicMember %int_0 %int_0 + %33 = OpAtomicIAdd %uint %34 %uint_2 %uint_0 %uint_1 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/compute/AtomicOperations.asm.comp b/tests/sksl/compute/AtomicOperations.asm.comp new file mode 100644 index 000000000000..e5f784d8a0b1 --- /dev/null +++ b/tests/sksl/compute/AtomicOperations.asm.comp @@ -0,0 +1,62 @@ + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint GLCompute %main "main" %sk_LocalInvocationID + OpExecutionMode %main LocalSize 64 1 1 + OpName %ssbo "ssbo" + OpMemberName %ssbo 0 "globalCounter" + OpName %sk_LocalInvocationID "sk_LocalInvocationID" + OpName %localCounter "localCounter" + OpName %main "main" + OpMemberDecorate %ssbo 0 Offset 0 + OpMemberDecorate %ssbo 0 RelaxedPrecision + OpDecorate %ssbo BufferBlock + OpDecorate %3 Binding 0 + OpDecorate %3 DescriptorSet 0 + OpDecorate %sk_LocalInvocationID BuiltIn LocalInvocationId + %uint = OpTypeInt 32 0 + %ssbo = OpTypeStruct %uint +%_ptr_Uniform_ssbo = OpTypePointer Uniform %ssbo + %3 = OpVariable %_ptr_Uniform_ssbo Uniform + %v3uint = OpTypeVector %uint 3 +%_ptr_Input_v3uint = OpTypePointer Input %v3uint +%sk_LocalInvocationID = OpVariable %_ptr_Input_v3uint Input +%_ptr_Workgroup_uint = OpTypePointer Workgroup %uint +%localCounter = OpVariable %_ptr_Workgroup_uint Workgroup + %void = OpTypeVoid + %13 = OpTypeFunction %void + %uint_0 = OpConstant %uint 0 + %bool = OpTypeBool + %uint_2 = OpConstant %uint 2 + %uint_264 = OpConstant %uint 264 + %uint_1 = OpConstant %uint 1 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 +%_ptr_Uniform_uint = OpTypePointer Uniform %uint + %main = OpFunction %void None %13 + %14 = OpLabel + %15 = OpLoad %v3uint %sk_LocalInvocationID + %16 = OpCompositeExtract %uint %15 0 + %18 = OpIEqual %bool %16 %uint_0 + OpSelectionMerge %21 None + OpBranchConditional %18 %20 %21 + %20 = OpLabel + OpAtomicStore %localCounter %uint_2 %uint_0 %uint_0 + OpBranch %21 + %21 = OpLabel + OpControlBarrier %uint_2 %uint_2 %uint_264 + %26 = OpAtomicIAdd %uint %localCounter %uint_2 %uint_0 %uint_1 + OpControlBarrier %uint_2 %uint_2 %uint_264 + %29 = OpLoad %v3uint %sk_LocalInvocationID + %30 = OpCompositeExtract %uint %29 0 + %31 = OpIEqual %bool %30 %uint_0 + OpSelectionMerge %33 None + OpBranchConditional %31 %32 %33 + %32 = OpLabel + %37 = OpAccessChain %_ptr_Uniform_uint %3 %int_0 + %39 = OpAtomicLoad %uint %localCounter %uint_2 %uint_0 + %34 = OpAtomicIAdd %uint %37 %uint_1 %uint_0 %39 + OpBranch %33 + %33 = OpLabel + OpReturn + OpFunctionEnd diff --git a/tests/sksl/compute/AtomicOperationsOverArrayAndStruct.asm.comp b/tests/sksl/compute/AtomicOperationsOverArrayAndStruct.asm.comp new file mode 100644 index 000000000000..d3ef28d07988 --- /dev/null +++ b/tests/sksl/compute/AtomicOperationsOverArrayAndStruct.asm.comp @@ -0,0 +1,94 @@ + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint GLCompute %main "main" %sk_LocalInvocationID + OpExecutionMode %main LocalSize 256 1 1 + OpName %GlobalCounts "GlobalCounts" + OpMemberName %GlobalCounts 0 "firstHalfCount" + OpMemberName %GlobalCounts 1 "secondHalfCount" + OpName %ssbo "ssbo" + OpMemberName %ssbo 0 "globalCounts" + OpName %sk_LocalInvocationID "sk_LocalInvocationID" + OpName %localCounts "localCounts" + OpName %main "main" + OpName %idx "idx" + OpMemberDecorate %GlobalCounts 0 Offset 0 + OpMemberDecorate %GlobalCounts 0 RelaxedPrecision + OpMemberDecorate %GlobalCounts 1 Offset 4 + OpMemberDecorate %GlobalCounts 1 RelaxedPrecision + OpMemberDecorate %ssbo 0 Offset 0 + OpMemberDecorate %ssbo 0 RelaxedPrecision + OpDecorate %ssbo BufferBlock + OpDecorate %3 Binding 0 + OpDecorate %3 DescriptorSet 0 + OpDecorate %sk_LocalInvocationID BuiltIn LocalInvocationId + OpDecorate %_arr_uint_int_2 ArrayStride 16 + %uint = OpTypeInt 32 0 +%GlobalCounts = OpTypeStruct %uint %uint + %ssbo = OpTypeStruct %GlobalCounts +%_ptr_Uniform_ssbo = OpTypePointer Uniform %ssbo + %3 = OpVariable %_ptr_Uniform_ssbo Uniform + %v3uint = OpTypeVector %uint 3 +%_ptr_Input_v3uint = OpTypePointer Input %v3uint +%sk_LocalInvocationID = OpVariable %_ptr_Input_v3uint Input + %int = OpTypeInt 32 1 + %int_2 = OpConstant %int 2 +%_arr_uint_int_2 = OpTypeArray %uint %int_2 +%_ptr_Workgroup__arr_uint_int_2 = OpTypePointer Workgroup %_arr_uint_int_2 +%localCounts = OpVariable %_ptr_Workgroup__arr_uint_int_2 Workgroup + %void = OpTypeVoid + %17 = OpTypeFunction %void + %uint_0 = OpConstant %uint 0 + %bool = OpTypeBool + %int_0 = OpConstant %int 0 +%_ptr_Workgroup_uint = OpTypePointer Workgroup %uint + %uint_2 = OpConstant %uint 2 + %int_1 = OpConstant %int 1 + %uint_264 = OpConstant %uint 264 +%_ptr_Function_uint = OpTypePointer Function %uint + %uint_128 = OpConstant %uint 128 + %uint_1 = OpConstant %uint 1 +%_ptr_Uniform_uint = OpTypePointer Uniform %uint + %main = OpFunction %void None %17 + %18 = OpLabel + %idx = OpVariable %_ptr_Function_uint Function + %19 = OpLoad %v3uint %sk_LocalInvocationID + %20 = OpCompositeExtract %uint %19 0 + %22 = OpIEqual %bool %20 %uint_0 + OpSelectionMerge %25 None + OpBranchConditional %22 %24 %25 + %24 = OpLabel + %28 = OpAccessChain %_ptr_Workgroup_uint %localCounts %int_0 + OpAtomicStore %28 %uint_2 %uint_0 %uint_0 + %33 = OpAccessChain %_ptr_Workgroup_uint %localCounts %int_1 + OpAtomicStore %33 %uint_2 %uint_0 %uint_0 + OpBranch %25 + %25 = OpLabel + OpControlBarrier %uint_2 %uint_2 %uint_264 + %38 = OpLoad %v3uint %sk_LocalInvocationID + %39 = OpCompositeExtract %uint %38 0 + %41 = OpULessThan %bool %39 %uint_128 + %42 = OpSelect %int %41 %int_0 %int_1 + %43 = OpBitcast %uint %42 + OpStore %idx %43 + %45 = OpAccessChain %_ptr_Workgroup_uint %localCounts %43 + %44 = OpAtomicIAdd %uint %45 %uint_2 %uint_0 %uint_1 + OpControlBarrier %uint_2 %uint_2 %uint_264 + %48 = OpLoad %v3uint %sk_LocalInvocationID + %49 = OpCompositeExtract %uint %48 0 + %50 = OpIEqual %bool %49 %uint_0 + OpSelectionMerge %52 None + OpBranchConditional %50 %51 %52 + %51 = OpLabel + %54 = OpAccessChain %_ptr_Uniform_uint %3 %int_0 %int_0 + %57 = OpAccessChain %_ptr_Workgroup_uint %localCounts %int_0 + %56 = OpAtomicLoad %uint %57 %uint_2 %uint_0 + %53 = OpAtomicIAdd %uint %54 %uint_1 %uint_0 %56 + %59 = OpAccessChain %_ptr_Uniform_uint %3 %int_0 %int_1 + %61 = OpAccessChain %_ptr_Workgroup_uint %localCounts %int_1 + %60 = OpAtomicLoad %uint %61 %uint_2 %uint_0 + %58 = OpAtomicIAdd %uint %59 %uint_1 %uint_0 %60 + OpBranch %52 + %52 = OpLabel + OpReturn + OpFunctionEnd diff --git a/tests/sksl/compute/AtomicOperationsOverArrayAndStruct.metal b/tests/sksl/compute/AtomicOperationsOverArrayAndStruct.metal index c14f6abb68f4..931ffc8d4198 100644 --- a/tests/sksl/compute/AtomicOperationsOverArrayAndStruct.metal +++ b/tests/sksl/compute/AtomicOperationsOverArrayAndStruct.metal @@ -28,7 +28,7 @@ kernel void computeMain(uint3 sk_LocalInvocationID [[thread_position_in_threadgr atomic_store_explicit(&_threadgroups.localCounts[1], 0u, memory_order_relaxed); } threadgroup_barrier(mem_flags::mem_threadgroup); - uint idx = uint(_in.sk_LocalInvocationID.x < 512u ? 0 : 1); + uint idx = uint(_in.sk_LocalInvocationID.x < 128u ? 0 : 1); atomic_fetch_add_explicit(&_threadgroups.localCounts[idx], 1u, memory_order_relaxed); threadgroup_barrier(mem_flags::mem_threadgroup); if (_in.sk_LocalInvocationID.x == 0u) { diff --git a/tests/sksl/compute/Barrier.asm.comp b/tests/sksl/compute/Barrier.asm.comp new file mode 100644 index 000000000000..878729790e1b --- /dev/null +++ b/tests/sksl/compute/Barrier.asm.comp @@ -0,0 +1,18 @@ + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint GLCompute %main "main" + OpExecutionMode %main LocalSize 64 1 1 + OpName %main "main" + %void = OpTypeVoid + %4 = OpTypeFunction %void + %uint = OpTypeInt 32 0 + %uint_2 = OpConstant %uint 2 + %uint_264 = OpConstant %uint 264 + %uint_72 = OpConstant %uint 72 + %main = OpFunction %void None %4 + %5 = OpLabel + OpControlBarrier %uint_2 %uint_2 %uint_264 + OpControlBarrier %uint_2 %uint_2 %uint_72 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/compute/BuiltinStageInputs.asm.comp b/tests/sksl/compute/BuiltinStageInputs.asm.comp new file mode 100644 index 000000000000..2fa29cde18d7 --- /dev/null +++ b/tests/sksl/compute/BuiltinStageInputs.asm.comp @@ -0,0 +1,66 @@ + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint GLCompute %main "main" %sk_GlobalInvocationID %sk_LocalInvocationID %sk_LocalInvocationIndex %sk_NumWorkgroups %sk_WorkgroupID + OpExecutionMode %main LocalSize 64 1 1 + OpName %outputs "outputs" + OpMemberName %outputs 0 "outputBuffer" + OpName %sk_GlobalInvocationID "sk_GlobalInvocationID" + OpName %sk_LocalInvocationID "sk_LocalInvocationID" + OpName %sk_LocalInvocationIndex "sk_LocalInvocationIndex" + OpName %sk_NumWorkgroups "sk_NumWorkgroups" + OpName %sk_WorkgroupID "sk_WorkgroupID" + OpName %helper_I "helper_I" + OpName %main "main" + OpDecorate %_runtimearr_uint ArrayStride 16 + OpMemberDecorate %outputs 0 Offset 0 + OpDecorate %outputs BufferBlock + OpDecorate %4 Binding 0 + OpDecorate %4 DescriptorSet 0 + OpDecorate %sk_GlobalInvocationID BuiltIn GlobalInvocationId + OpDecorate %sk_LocalInvocationID BuiltIn LocalInvocationId + OpDecorate %sk_LocalInvocationIndex BuiltIn LocalInvocationIndex + OpDecorate %sk_NumWorkgroups BuiltIn NumWorkgroups + OpDecorate %sk_WorkgroupID BuiltIn WorkgroupId + %uint = OpTypeInt 32 0 +%_runtimearr_uint = OpTypeRuntimeArray %uint + %outputs = OpTypeStruct %_runtimearr_uint +%_ptr_Uniform_outputs = OpTypePointer Uniform %outputs + %4 = OpVariable %_ptr_Uniform_outputs Uniform + %v3uint = OpTypeVector %uint 3 +%_ptr_Input_v3uint = OpTypePointer Input %v3uint +%sk_GlobalInvocationID = OpVariable %_ptr_Input_v3uint Input +%sk_LocalInvocationID = OpVariable %_ptr_Input_v3uint Input +%_ptr_Input_uint = OpTypePointer Input %uint +%sk_LocalInvocationIndex = OpVariable %_ptr_Input_uint Input +%sk_NumWorkgroups = OpVariable %_ptr_Input_v3uint Input +%sk_WorkgroupID = OpVariable %_ptr_Input_v3uint Input + %17 = OpTypeFunction %uint + %void = OpTypeVoid + %31 = OpTypeFunction %void + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 +%_ptr_Uniform_uint = OpTypePointer Uniform %uint + %helper_I = OpFunction %uint None %17 + %18 = OpLabel + %19 = OpLoad %v3uint %sk_NumWorkgroups + %20 = OpCompositeExtract %uint %19 0 + %21 = OpLoad %v3uint %sk_WorkgroupID + %22 = OpCompositeExtract %uint %21 0 + %23 = OpIAdd %uint %20 %22 + %24 = OpLoad %v3uint %sk_LocalInvocationID + %25 = OpCompositeExtract %uint %24 0 + %26 = OpIAdd %uint %23 %25 + %27 = OpLoad %v3uint %sk_GlobalInvocationID + %28 = OpCompositeExtract %uint %27 0 + %29 = OpIAdd %uint %26 %28 + OpReturnValue %29 + OpFunctionEnd + %main = OpFunction %void None %31 + %32 = OpLabel + %33 = OpFunctionCall %uint %helper_I + %36 = OpLoad %uint %sk_LocalInvocationIndex + %37 = OpAccessChain %_ptr_Uniform_uint %4 %int_0 %36 + OpStore %37 %33 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/compute/Desaturate.asm.comp b/tests/sksl/compute/Desaturate.asm.comp new file mode 100644 index 000000000000..1fa08414d545 --- /dev/null +++ b/tests/sksl/compute/Desaturate.asm.comp @@ -0,0 +1,90 @@ + OpCapability ImageQuery + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint GLCompute %main "main" %sk_GlobalInvocationID + OpExecutionMode %main LocalSize 16 16 1 + OpName %sk_GlobalInvocationID "sk_GlobalInvocationID" + OpName %src "src" + OpName %dest "dest" + OpName %main "main" + OpName %_0_color "_0_color" + OpDecorate %sk_GlobalInvocationID BuiltIn GlobalInvocationId + OpDecorate %src Binding 0 + OpDecorate %src DescriptorSet 0 + OpDecorate %dest Binding 1 + OpDecorate %dest DescriptorSet 0 + OpDecorate %22 RelaxedPrecision + OpDecorate %30 RelaxedPrecision + OpDecorate %_0_color RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %49 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %53 RelaxedPrecision + %uint = OpTypeInt 32 0 + %v3uint = OpTypeVector %uint 3 +%_ptr_Input_v3uint = OpTypePointer Input %v3uint +%sk_GlobalInvocationID = OpVariable %_ptr_Input_v3uint Input + %float = OpTypeFloat 32 + %9 = OpTypeImage %float 2D 0 0 0 2 Rgba8 +%_ptr_UniformConstant_9 = OpTypePointer UniformConstant %9 + %src = OpVariable %_ptr_UniformConstant_9 UniformConstant + %dest = OpVariable %_ptr_UniformConstant_9 UniformConstant + %void = OpTypeVoid + %13 = OpTypeFunction %void + %bool = OpTypeBool + %false = OpConstantFalse %bool + %v2uint = OpTypeVector %uint 2 + %v4float = OpTypeVector %float 4 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %v3float = OpTypeVector %float 3 +%float_0_219999999 = OpConstant %float 0.219999999 +%float_0_670000017 = OpConstant %float 0.670000017 +%float_0_109999999 = OpConstant %float 0.109999999 + %48 = OpConstantComposite %v3float %float_0_219999999 %float_0_670000017 %float_0_109999999 + %main = OpFunction %void None %13 + %14 = OpLabel + %_0_color = OpVariable %_ptr_Function_v4float Function + %17 = OpLoad %v3uint %sk_GlobalInvocationID + %18 = OpCompositeExtract %uint %17 0 + %22 = OpLoad %9 %src + %21 = OpImageQuerySize %v2uint %22 + %19 = OpCompositeExtract %uint %21 0 + %23 = OpULessThan %bool %18 %19 + OpSelectionMerge %25 None + OpBranchConditional %23 %24 %25 + %24 = OpLabel + %26 = OpLoad %v3uint %sk_GlobalInvocationID + %27 = OpCompositeExtract %uint %26 1 + %30 = OpLoad %9 %src + %29 = OpImageQuerySize %v2uint %30 + %28 = OpCompositeExtract %uint %29 1 + %31 = OpULessThan %bool %27 %28 + OpBranch %25 + %25 = OpLabel + %32 = OpPhi %bool %false %14 %31 %24 + OpSelectionMerge %34 None + OpBranchConditional %32 %33 %34 + %33 = OpLabel + %39 = OpLoad %9 %src + %40 = OpLoad %v3uint %sk_GlobalInvocationID + %41 = OpVectorShuffle %v2uint %40 %40 0 1 + %38 = OpImageRead %v4float %39 %41 + OpStore %_0_color %38 + %43 = OpVectorShuffle %v3float %38 %38 0 1 2 + %42 = OpDot %float %43 %48 + %49 = OpCompositeConstruct %v3float %42 %42 %42 + %50 = OpLoad %v4float %_0_color + %51 = OpVectorShuffle %v4float %50 %49 4 5 6 3 + OpStore %_0_color %51 + %53 = OpLoad %9 %dest + %54 = OpLoad %v3uint %sk_GlobalInvocationID + %55 = OpVectorShuffle %v2uint %54 %54 0 1 + OpImageWrite %53 %55 %51 + OpBranch %34 + %34 = OpLabel + OpReturn + OpFunctionEnd diff --git a/tests/sksl/compute/DesaturateFunction.asm.comp b/tests/sksl/compute/DesaturateFunction.asm.comp new file mode 100644 index 000000000000..f25a2021fd66 --- /dev/null +++ b/tests/sksl/compute/DesaturateFunction.asm.comp @@ -0,0 +1,99 @@ + OpCapability ImageQuery + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint GLCompute %main "main" %sk_GlobalInvocationID + OpExecutionMode %main LocalSize 16 16 1 + OpName %sk_GlobalInvocationID "sk_GlobalInvocationID" + OpName %src "src" + OpName %dest "dest" + OpName %desaturate_vTT "desaturate_vTT" + OpName %color "color" + OpName %main "main" + OpDecorate %sk_GlobalInvocationID BuiltIn GlobalInvocationId + OpDecorate %src Binding 0 + OpDecorate %src DescriptorSet 0 + OpDecorate %dest Binding 1 + OpDecorate %dest DescriptorSet 0 + OpDecorate %color RelaxedPrecision + OpDecorate %22 RelaxedPrecision + OpDecorate %26 RelaxedPrecision + OpDecorate %27 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %34 RelaxedPrecision + OpDecorate %35 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %48 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + %uint = OpTypeInt 32 0 + %v3uint = OpTypeVector %uint 3 +%_ptr_Input_v3uint = OpTypePointer Input %v3uint +%sk_GlobalInvocationID = OpVariable %_ptr_Input_v3uint Input + %float = OpTypeFloat 32 + %10 = OpTypeImage %float 2D 0 0 0 2 Rgba8 +%_ptr_UniformConstant_10 = OpTypePointer UniformConstant %10 + %src = OpVariable %_ptr_UniformConstant_10 UniformConstant + %dest = OpVariable %_ptr_UniformConstant_10 UniformConstant + %void = OpTypeVoid + %14 = OpTypeFunction %void %_ptr_UniformConstant_10 %_ptr_UniformConstant_10 + %v4float = OpTypeVector %float 4 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %v2uint = OpTypeVector %uint 2 + %v3float = OpTypeVector %float 3 +%float_0_219999999 = OpConstant %float 0.219999999 +%float_0_670000017 = OpConstant %float 0.670000017 +%float_0_109999999 = OpConstant %float 0.109999999 + %32 = OpConstantComposite %v3float %float_0_219999999 %float_0_670000017 %float_0_109999999 + %40 = OpTypeFunction %void + %bool = OpTypeBool + %false = OpConstantFalse %bool +%desaturate_vTT = OpFunction %void None %14 + %15 = OpFunctionParameter %_ptr_UniformConstant_10 + %16 = OpFunctionParameter %_ptr_UniformConstant_10 + %17 = OpLabel + %color = OpVariable %_ptr_Function_v4float Function + %22 = OpLoad %10 %15 + %23 = OpLoad %v3uint %sk_GlobalInvocationID + %24 = OpVectorShuffle %v2uint %23 %23 0 1 + %21 = OpImageRead %v4float %22 %24 + OpStore %color %21 + %27 = OpVectorShuffle %v3float %21 %21 0 1 2 + %26 = OpDot %float %27 %32 + %33 = OpCompositeConstruct %v3float %26 %26 %26 + %34 = OpLoad %v4float %color + %35 = OpVectorShuffle %v4float %34 %33 4 5 6 3 + OpStore %color %35 + %37 = OpLoad %10 %16 + %38 = OpLoad %v3uint %sk_GlobalInvocationID + %39 = OpVectorShuffle %v2uint %38 %38 0 1 + OpImageWrite %37 %39 %35 + OpReturn + OpFunctionEnd + %main = OpFunction %void None %40 + %41 = OpLabel + %44 = OpLoad %v3uint %sk_GlobalInvocationID + %45 = OpCompositeExtract %uint %44 0 + %48 = OpLoad %10 %src + %47 = OpImageQuerySize %v2uint %48 + %46 = OpCompositeExtract %uint %47 0 + %49 = OpULessThan %bool %45 %46 + OpSelectionMerge %51 None + OpBranchConditional %49 %50 %51 + %50 = OpLabel + %52 = OpLoad %v3uint %sk_GlobalInvocationID + %53 = OpCompositeExtract %uint %52 1 + %56 = OpLoad %10 %src + %55 = OpImageQuerySize %v2uint %56 + %54 = OpCompositeExtract %uint %55 1 + %57 = OpULessThan %bool %53 %54 + OpBranch %51 + %51 = OpLabel + %58 = OpPhi %bool %false %41 %57 %50 + OpSelectionMerge %60 None + OpBranchConditional %58 %59 %60 + %59 = OpLabel + %61 = OpFunctionCall %void %desaturate_vTT %src %dest + OpBranch %60 + %60 = OpLabel + OpReturn + OpFunctionEnd diff --git a/tests/sksl/compute/DesaturateReadWrite.asm.comp b/tests/sksl/compute/DesaturateReadWrite.asm.comp new file mode 100644 index 000000000000..d3ff3852f4a1 --- /dev/null +++ b/tests/sksl/compute/DesaturateReadWrite.asm.comp @@ -0,0 +1,86 @@ + OpCapability ImageQuery + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint GLCompute %main "main" %sk_GlobalInvocationID + OpExecutionMode %main LocalSize 16 16 1 + OpName %sk_GlobalInvocationID "sk_GlobalInvocationID" + OpName %tex "tex" + OpName %main "main" + OpName %_0_color "_0_color" + OpDecorate %sk_GlobalInvocationID BuiltIn GlobalInvocationId + OpDecorate %tex Binding 0 + OpDecorate %tex DescriptorSet 0 + OpDecorate %21 RelaxedPrecision + OpDecorate %29 RelaxedPrecision + OpDecorate %_0_color RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %48 RelaxedPrecision + OpDecorate %49 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + %uint = OpTypeInt 32 0 + %v3uint = OpTypeVector %uint 3 +%_ptr_Input_v3uint = OpTypePointer Input %v3uint +%sk_GlobalInvocationID = OpVariable %_ptr_Input_v3uint Input + %float = OpTypeFloat 32 + %9 = OpTypeImage %float 2D 0 0 0 2 Rgba8 +%_ptr_UniformConstant_9 = OpTypePointer UniformConstant %9 + %tex = OpVariable %_ptr_UniformConstant_9 UniformConstant + %void = OpTypeVoid + %12 = OpTypeFunction %void + %bool = OpTypeBool + %false = OpConstantFalse %bool + %v2uint = OpTypeVector %uint 2 + %v4float = OpTypeVector %float 4 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %v3float = OpTypeVector %float 3 +%float_0_219999999 = OpConstant %float 0.219999999 +%float_0_670000017 = OpConstant %float 0.670000017 +%float_0_109999999 = OpConstant %float 0.109999999 + %47 = OpConstantComposite %v3float %float_0_219999999 %float_0_670000017 %float_0_109999999 + %main = OpFunction %void None %12 + %13 = OpLabel + %_0_color = OpVariable %_ptr_Function_v4float Function + %16 = OpLoad %v3uint %sk_GlobalInvocationID + %17 = OpCompositeExtract %uint %16 0 + %21 = OpLoad %9 %tex + %20 = OpImageQuerySize %v2uint %21 + %18 = OpCompositeExtract %uint %20 0 + %22 = OpULessThan %bool %17 %18 + OpSelectionMerge %24 None + OpBranchConditional %22 %23 %24 + %23 = OpLabel + %25 = OpLoad %v3uint %sk_GlobalInvocationID + %26 = OpCompositeExtract %uint %25 1 + %29 = OpLoad %9 %tex + %28 = OpImageQuerySize %v2uint %29 + %27 = OpCompositeExtract %uint %28 1 + %30 = OpULessThan %bool %26 %27 + OpBranch %24 + %24 = OpLabel + %31 = OpPhi %bool %false %13 %30 %23 + OpSelectionMerge %33 None + OpBranchConditional %31 %32 %33 + %32 = OpLabel + %38 = OpLoad %9 %tex + %39 = OpLoad %v3uint %sk_GlobalInvocationID + %40 = OpVectorShuffle %v2uint %39 %39 0 1 + %37 = OpImageRead %v4float %38 %40 + OpStore %_0_color %37 + %42 = OpVectorShuffle %v3float %37 %37 0 1 2 + %41 = OpDot %float %42 %47 + %48 = OpCompositeConstruct %v3float %41 %41 %41 + %49 = OpLoad %v4float %_0_color + %50 = OpVectorShuffle %v4float %49 %48 4 5 6 3 + OpStore %_0_color %50 + %52 = OpLoad %9 %tex + %53 = OpLoad %v3uint %sk_GlobalInvocationID + %54 = OpVectorShuffle %v2uint %53 %53 0 1 + OpImageWrite %52 %54 %50 + OpBranch %33 + %33 = OpLabel + OpReturn + OpFunctionEnd diff --git a/tests/sksl/compute/MatrixMultiply.asm.comp b/tests/sksl/compute/MatrixMultiply.asm.comp new file mode 100644 index 000000000000..bef016d82921 --- /dev/null +++ b/tests/sksl/compute/MatrixMultiply.asm.comp @@ -0,0 +1,160 @@ + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint GLCompute %main "main" %sk_GlobalInvocationID + OpExecutionMode %main LocalSize 16 16 1 + OpName %sizeBuffer "sizeBuffer" + OpMemberName %sizeBuffer 0 "sizes" + OpName %inputs1 "inputs1" + OpMemberName %inputs1 0 "data1" + OpName %inputs2 "inputs2" + OpMemberName %inputs2 0 "data2" + OpName %result "result" + OpMemberName %result 0 "resultData" + OpName %sk_GlobalInvocationID "sk_GlobalInvocationID" + OpName %main "main" + OpName %resultCell "resultCell" + OpName %result_0 "result" + OpName %i "i" + OpName %a "a" + OpName %b "b" + OpName %index "index" + OpDecorate %_runtimearr_v2int ArrayStride 16 + OpMemberDecorate %sizeBuffer 0 Offset 0 + OpDecorate %sizeBuffer BufferBlock + OpDecorate %3 Binding 0 + OpDecorate %3 DescriptorSet 0 + OpDecorate %_runtimearr_float ArrayStride 16 + OpMemberDecorate %inputs1 0 Offset 0 + OpDecorate %inputs1 BufferBlock + OpDecorate %9 Binding 1 + OpDecorate %9 DescriptorSet 0 + OpMemberDecorate %inputs2 0 Offset 0 + OpDecorate %inputs2 BufferBlock + OpDecorate %14 Binding 2 + OpDecorate %14 DescriptorSet 0 + OpMemberDecorate %result 0 Offset 0 + OpDecorate %result BufferBlock + OpDecorate %17 Binding 3 + OpDecorate %17 DescriptorSet 0 + OpDecorate %sk_GlobalInvocationID BuiltIn GlobalInvocationId + %int = OpTypeInt 32 1 + %v2int = OpTypeVector %int 2 +%_runtimearr_v2int = OpTypeRuntimeArray %v2int + %sizeBuffer = OpTypeStruct %_runtimearr_v2int +%_ptr_Uniform_sizeBuffer = OpTypePointer Uniform %sizeBuffer + %3 = OpVariable %_ptr_Uniform_sizeBuffer Uniform + %float = OpTypeFloat 32 +%_runtimearr_float = OpTypeRuntimeArray %float + %inputs1 = OpTypeStruct %_runtimearr_float +%_ptr_Uniform_inputs1 = OpTypePointer Uniform %inputs1 + %9 = OpVariable %_ptr_Uniform_inputs1 Uniform + %inputs2 = OpTypeStruct %_runtimearr_float +%_ptr_Uniform_inputs2 = OpTypePointer Uniform %inputs2 + %14 = OpVariable %_ptr_Uniform_inputs2 Uniform + %result = OpTypeStruct %_runtimearr_float +%_ptr_Uniform_result = OpTypePointer Uniform %result + %17 = OpVariable %_ptr_Uniform_result Uniform + %uint = OpTypeInt 32 0 + %v3uint = OpTypeVector %uint 3 +%_ptr_Input_v3uint = OpTypePointer Input %v3uint +%sk_GlobalInvocationID = OpVariable %_ptr_Input_v3uint Input + %void = OpTypeVoid + %25 = OpTypeFunction %void + %int_0 = OpConstant %int 0 +%_ptr_Uniform_v2int = OpTypePointer Uniform %v2int + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 +%_ptr_Function_v2int = OpTypePointer Function %v2int +%_ptr_Function_float = OpTypePointer Function %float + %float_0 = OpConstant %float 0 +%_ptr_Function_int = OpTypePointer Function %int + %bool = OpTypeBool +%_ptr_Uniform_float = OpTypePointer Uniform %float + %main = OpFunction %void None %25 + %26 = OpLabel + %resultCell = OpVariable %_ptr_Function_v2int Function + %result_0 = OpVariable %_ptr_Function_float Function + %i = OpVariable %_ptr_Function_int Function + %a = OpVariable %_ptr_Function_int Function + %b = OpVariable %_ptr_Function_int Function + %index = OpVariable %_ptr_Function_int Function + %28 = OpAccessChain %_ptr_Uniform_v2int %3 %int_0 %int_0 + %30 = OpLoad %v2int %28 + %31 = OpCompositeExtract %int %30 0 + %33 = OpAccessChain %_ptr_Uniform_v2int %3 %int_0 %int_1 + %34 = OpLoad %v2int %33 + %35 = OpCompositeExtract %int %34 1 + %36 = OpCompositeConstruct %v2int %31 %35 + %38 = OpAccessChain %_ptr_Uniform_v2int %3 %int_0 %int_2 + OpStore %38 %36 + %41 = OpLoad %v3uint %sk_GlobalInvocationID + %42 = OpCompositeExtract %uint %41 0 + %43 = OpBitcast %int %42 + %44 = OpLoad %v3uint %sk_GlobalInvocationID + %45 = OpCompositeExtract %uint %44 1 + %46 = OpBitcast %int %45 + %47 = OpCompositeConstruct %v2int %43 %46 + OpStore %resultCell %47 + OpStore %result_0 %float_0 + OpStore %i %int_0 + OpBranch %53 + %53 = OpLabel + OpLoopMerge %57 %56 None + OpBranch %54 + %54 = OpLabel + %58 = OpLoad %int %i + %59 = OpAccessChain %_ptr_Uniform_v2int %3 %int_0 %int_0 + %60 = OpLoad %v2int %59 + %61 = OpCompositeExtract %int %60 1 + %62 = OpSLessThan %bool %58 %61 + OpBranchConditional %62 %55 %57 + %55 = OpLabel + %65 = OpLoad %int %i + %66 = OpLoad %v2int %resultCell + %67 = OpCompositeExtract %int %66 0 + %68 = OpAccessChain %_ptr_Uniform_v2int %3 %int_0 %int_0 + %69 = OpLoad %v2int %68 + %70 = OpCompositeExtract %int %69 1 + %71 = OpIMul %int %67 %70 + %72 = OpIAdd %int %65 %71 + OpStore %a %72 + %74 = OpLoad %v2int %resultCell + %75 = OpCompositeExtract %int %74 1 + %76 = OpLoad %int %i + %77 = OpAccessChain %_ptr_Uniform_v2int %3 %int_0 %int_1 + %78 = OpLoad %v2int %77 + %79 = OpCompositeExtract %int %78 1 + %80 = OpIMul %int %76 %79 + %81 = OpIAdd %int %75 %80 + OpStore %b %81 + %82 = OpLoad %float %result_0 + %83 = OpAccessChain %_ptr_Uniform_float %9 %int_0 %72 + %85 = OpLoad %float %83 + %86 = OpAccessChain %_ptr_Uniform_float %14 %int_0 %81 + %87 = OpLoad %float %86 + %88 = OpFMul %float %85 %87 + %89 = OpFAdd %float %82 %88 + OpStore %result_0 %89 + OpBranch %56 + %56 = OpLabel + %90 = OpLoad %int %i + %91 = OpIAdd %int %90 %int_1 + OpStore %i %91 + OpBranch %53 + %57 = OpLabel + %93 = OpLoad %v2int %resultCell + %94 = OpCompositeExtract %int %93 1 + %95 = OpLoad %v2int %resultCell + %96 = OpCompositeExtract %int %95 0 + %97 = OpAccessChain %_ptr_Uniform_v2int %3 %int_0 %int_1 + %98 = OpLoad %v2int %97 + %99 = OpCompositeExtract %int %98 1 + %100 = OpIMul %int %96 %99 + %101 = OpIAdd %int %94 %100 + OpStore %index %101 + %102 = OpLoad %float %result_0 + %103 = OpAccessChain %_ptr_Uniform_float %17 %int_0 %101 + OpStore %103 %102 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/compute/Raytrace.asm.comp b/tests/sksl/compute/Raytrace.asm.comp new file mode 100644 index 000000000000..22d168afe41d --- /dev/null +++ b/tests/sksl/compute/Raytrace.asm.comp @@ -0,0 +1,138 @@ + OpCapability ImageQuery + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint GLCompute %main "main" %sk_GlobalInvocationID + OpExecutionMode %main LocalSize 16 16 1 + OpName %sk_GlobalInvocationID "sk_GlobalInvocationID" + OpName %dest "dest" + OpName %main "main" + OpName %pixel "pixel" + OpName %max_x "max_x" + OpName %max_y "max_y" + OpName %x "x" + OpName %y "y" + OpName %ray_origin "ray_origin" + OpName %ray_target "ray_target" + OpName %sphere_center "sphere_center" + OpName %sphere_radius "sphere_radius" + OpName %t_minus_c "t_minus_c" + OpName %b "b" + OpName %c "c" + OpName %bsqmc "bsqmc" + OpDecorate %sk_GlobalInvocationID BuiltIn GlobalInvocationId + OpDecorate %dest Binding 0 + OpDecorate %dest DescriptorSet 0 + OpDecorate %pixel RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %85 RelaxedPrecision + OpDecorate %88 RelaxedPrecision + %uint = OpTypeInt 32 0 + %v3uint = OpTypeVector %uint 3 +%_ptr_Input_v3uint = OpTypePointer Input %v3uint +%sk_GlobalInvocationID = OpVariable %_ptr_Input_v3uint Input + %float = OpTypeFloat 32 + %9 = OpTypeImage %float 2D 0 0 0 2 Rgba8 +%_ptr_UniformConstant_9 = OpTypePointer UniformConstant %9 + %dest = OpVariable %_ptr_UniformConstant_9 UniformConstant + %void = OpTypeVoid + %12 = OpTypeFunction %void + %v4float = OpTypeVector %float 4 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %float_0 = OpConstant %float 0 + %float_1 = OpConstant %float 1 + %19 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_1 +%_ptr_Function_float = OpTypePointer Function %float + %float_5 = OpConstant %float 5 + %uint_2 = OpConstant %uint 2 + %v2uint = OpTypeVector %uint 2 + %v3float = OpTypeVector %float 3 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %float_n1 = OpConstant %float -1 + %58 = OpConstantComposite %v3float %float_0 %float_0 %float_n1 + %float_n10 = OpConstant %float -10 + %65 = OpConstantComposite %v3float %float_0 %float_0 %float_n10 + %bool = OpTypeBool +%float_0_400000006 = OpConstant %float 0.400000006 + %83 = OpConstantComposite %v4float %float_0_400000006 %float_0_400000006 %float_1 %float_1 + %main = OpFunction %void None %12 + %13 = OpLabel + %pixel = OpVariable %_ptr_Function_v4float Function + %max_x = OpVariable %_ptr_Function_float Function + %max_y = OpVariable %_ptr_Function_float Function + %x = OpVariable %_ptr_Function_float Function + %y = OpVariable %_ptr_Function_float Function + %ray_origin = OpVariable %_ptr_Function_v3float Function + %ray_target = OpVariable %_ptr_Function_v3float Function +%sphere_center = OpVariable %_ptr_Function_v3float Function +%sphere_radius = OpVariable %_ptr_Function_float Function + %t_minus_c = OpVariable %_ptr_Function_v3float Function + %b = OpVariable %_ptr_Function_float Function + %c = OpVariable %_ptr_Function_float Function + %bsqmc = OpVariable %_ptr_Function_float Function + OpStore %pixel %19 + OpStore %max_x %float_5 + OpStore %max_y %float_5 + %25 = OpLoad %v3uint %sk_GlobalInvocationID + %26 = OpCompositeExtract %uint %25 0 + %28 = OpIMul %uint %26 %uint_2 + %32 = OpLoad %9 %dest + %31 = OpImageQuerySize %v2uint %32 + %29 = OpCompositeExtract %uint %31 0 + %33 = OpISub %uint %28 %29 + %34 = OpConvertUToF %float %33 + %37 = OpLoad %9 %dest + %36 = OpImageQuerySize %v2uint %37 + %35 = OpCompositeExtract %uint %36 0 + %38 = OpConvertUToF %float %35 + %39 = OpFDiv %float %34 %38 + OpStore %x %39 + %41 = OpLoad %v3uint %sk_GlobalInvocationID + %42 = OpCompositeExtract %uint %41 1 + %43 = OpIMul %uint %42 %uint_2 + %46 = OpLoad %9 %dest + %45 = OpImageQuerySize %v2uint %46 + %44 = OpCompositeExtract %uint %45 1 + %47 = OpISub %uint %43 %44 + %48 = OpConvertUToF %float %47 + %51 = OpLoad %9 %dest + %50 = OpImageQuerySize %v2uint %51 + %49 = OpCompositeExtract %uint %50 1 + %52 = OpConvertUToF %float %49 + %53 = OpFDiv %float %48 %52 + OpStore %y %53 + OpStore %ray_origin %58 + %60 = OpFMul %float %39 %float_5 + %61 = OpFMul %float %53 %float_5 + %62 = OpCompositeConstruct %v3float %60 %61 %float_0 + OpStore %ray_target %62 + OpStore %sphere_center %65 + OpStore %sphere_radius %float_1 + %68 = OpFSub %v3float %62 %65 + OpStore %t_minus_c %68 + %70 = OpDot %float %58 %68 + OpStore %b %70 + %72 = OpDot %float %68 %68 + %73 = OpFMul %float %float_1 %float_1 + %74 = OpFSub %float %72 %73 + OpStore %c %74 + %76 = OpFMul %float %70 %70 + %77 = OpFSub %float %76 %74 + OpStore %bsqmc %77 + %78 = OpFOrdGreaterThanEqual %bool %77 %float_0 + OpSelectionMerge %81 None + OpBranchConditional %78 %80 %81 + %80 = OpLabel + OpStore %pixel %83 + OpBranch %81 + %81 = OpLabel + %85 = OpLoad %9 %dest + %86 = OpLoad %v3uint %sk_GlobalInvocationID + %87 = OpVectorShuffle %v2uint %86 %86 0 1 + %88 = OpLoad %v4float %pixel + OpImageWrite %85 %87 %88 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/compute/Uniforms.asm.comp b/tests/sksl/compute/Uniforms.asm.comp new file mode 100644 index 000000000000..923e4133e126 --- /dev/null +++ b/tests/sksl/compute/Uniforms.asm.comp @@ -0,0 +1,49 @@ + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint GLCompute %main "main" %sk_GlobalInvocationID + OpExecutionMode %main LocalSize 64 1 1 + OpName %constants "constants" + OpMemberName %constants 0 "x" + OpName %outputBuffer "outputBuffer" + OpMemberName %outputBuffer 0 "results" + OpName %sk_GlobalInvocationID "sk_GlobalInvocationID" + OpName %main "main" + OpMemberDecorate %constants 0 Offset 0 + OpDecorate %constants Block + OpDecorate %3 Binding 0 + OpDecorate %3 DescriptorSet 0 + OpDecorate %_runtimearr_int ArrayStride 16 + OpMemberDecorate %outputBuffer 0 Offset 0 + OpDecorate %outputBuffer BufferBlock + OpDecorate %7 Binding 1 + OpDecorate %7 DescriptorSet 0 + OpDecorate %sk_GlobalInvocationID BuiltIn GlobalInvocationId + %int = OpTypeInt 32 1 + %constants = OpTypeStruct %int +%_ptr_Uniform_constants = OpTypePointer Uniform %constants + %3 = OpVariable %_ptr_Uniform_constants Uniform +%_runtimearr_int = OpTypeRuntimeArray %int +%outputBuffer = OpTypeStruct %_runtimearr_int +%_ptr_Uniform_outputBuffer = OpTypePointer Uniform %outputBuffer + %7 = OpVariable %_ptr_Uniform_outputBuffer Uniform + %uint = OpTypeInt 32 0 + %v3uint = OpTypeVector %uint 3 +%_ptr_Input_v3uint = OpTypePointer Input %v3uint +%sk_GlobalInvocationID = OpVariable %_ptr_Input_v3uint Input + %void = OpTypeVoid + %16 = OpTypeFunction %void + %int_0 = OpConstant %int 0 +%_ptr_Uniform_int = OpTypePointer Uniform %int + %main = OpFunction %void None %16 + %17 = OpLabel + %19 = OpLoad %v3uint %sk_GlobalInvocationID + %20 = OpCompositeExtract %uint %19 0 + %21 = OpAccessChain %_ptr_Uniform_int %7 %int_0 %20 + %23 = OpLoad %int %21 + %24 = OpAccessChain %_ptr_Uniform_int %3 %int_0 + %25 = OpLoad %int %24 + %26 = OpIMul %int %23 %25 + OpStore %21 %26 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/compute/Workgroup.asm.comp b/tests/sksl/compute/Workgroup.asm.comp new file mode 100644 index 000000000000..7962ba0dab54 --- /dev/null +++ b/tests/sksl/compute/Workgroup.asm.comp @@ -0,0 +1,162 @@ + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint GLCompute %main "main" %sk_GlobalInvocationID + OpExecutionMode %main LocalSize 256 1 1 + OpName %inputs "inputs" + OpMemberName %inputs 0 "in_data" + OpName %outputs "outputs" + OpMemberName %outputs 0 "out_data" + OpName %sk_GlobalInvocationID "sk_GlobalInvocationID" + OpName %shared_data "shared_data" + OpName %store_vIf "store_vIf" + OpName %main "main" + OpName %id "id" + OpName %rd_id "rd_id" + OpName %wr_id "wr_id" + OpName %mask "mask" + OpName %step "step" + OpDecorate %_runtimearr_float ArrayStride 16 + OpMemberDecorate %inputs 0 Offset 0 + OpDecorate %inputs BufferBlock + OpDecorate %4 Binding 0 + OpDecorate %4 DescriptorSet 0 + OpMemberDecorate %outputs 0 Offset 0 + OpDecorate %outputs BufferBlock + OpDecorate %9 Binding 1 + OpDecorate %9 DescriptorSet 0 + OpDecorate %sk_GlobalInvocationID BuiltIn GlobalInvocationId + OpDecorate %_arr_float_int_512 ArrayStride 16 + %float = OpTypeFloat 32 +%_runtimearr_float = OpTypeRuntimeArray %float + %inputs = OpTypeStruct %_runtimearr_float +%_ptr_Uniform_inputs = OpTypePointer Uniform %inputs + %4 = OpVariable %_ptr_Uniform_inputs Uniform + %outputs = OpTypeStruct %_runtimearr_float +%_ptr_Uniform_outputs = OpTypePointer Uniform %outputs + %9 = OpVariable %_ptr_Uniform_outputs Uniform + %uint = OpTypeInt 32 0 + %v3uint = OpTypeVector %uint 3 +%_ptr_Input_v3uint = OpTypePointer Input %v3uint +%sk_GlobalInvocationID = OpVariable %_ptr_Input_v3uint Input + %int = OpTypeInt 32 1 + %int_512 = OpConstant %int 512 +%_arr_float_int_512 = OpTypeArray %float %int_512 +%_ptr_Workgroup__arr_float_int_512 = OpTypePointer Workgroup %_arr_float_int_512 +%shared_data = OpVariable %_ptr_Workgroup__arr_float_int_512 Workgroup + %void = OpTypeVoid +%_ptr_Function_uint = OpTypePointer Function %uint +%_ptr_Function_float = OpTypePointer Function %float + %24 = OpTypeFunction %void %_ptr_Function_uint %_ptr_Function_float +%_ptr_Workgroup_float = OpTypePointer Workgroup %float + %32 = OpTypeFunction %void + %int_0 = OpConstant %int 0 + %uint_2 = OpConstant %uint 2 +%_ptr_Uniform_float = OpTypePointer Uniform %float + %uint_1 = OpConstant %uint 1 + %uint_264 = OpConstant %uint 264 + %uint_0 = OpConstant %uint 0 + %uint_9 = OpConstant %uint 9 + %bool = OpTypeBool + %store_vIf = OpFunction %void None %24 + %25 = OpFunctionParameter %_ptr_Function_uint + %26 = OpFunctionParameter %_ptr_Function_float + %27 = OpLabel + %28 = OpLoad %float %26 + %29 = OpLoad %uint %25 + %30 = OpAccessChain %_ptr_Workgroup_float %shared_data %29 + OpStore %30 %28 + OpReturn + OpFunctionEnd + %main = OpFunction %void None %32 + %33 = OpLabel + %id = OpVariable %_ptr_Function_uint Function + %rd_id = OpVariable %_ptr_Function_uint Function + %wr_id = OpVariable %_ptr_Function_uint Function + %mask = OpVariable %_ptr_Function_uint Function + %step = OpVariable %_ptr_Function_uint Function + %85 = OpVariable %_ptr_Function_uint Function + %91 = OpVariable %_ptr_Function_float Function + %35 = OpLoad %v3uint %sk_GlobalInvocationID + %36 = OpCompositeExtract %uint %35 0 + OpStore %id %36 + %42 = OpIMul %uint %36 %uint_2 + %43 = OpAccessChain %_ptr_Uniform_float %4 %int_0 %42 + %45 = OpLoad %float %43 + %46 = OpIMul %uint %36 %uint_2 + %47 = OpAccessChain %_ptr_Workgroup_float %shared_data %46 + OpStore %47 %45 + %48 = OpLoad %uint %id + %49 = OpIMul %uint %48 %uint_2 + %51 = OpIAdd %uint %49 %uint_1 + %52 = OpAccessChain %_ptr_Uniform_float %4 %int_0 %51 + %53 = OpLoad %float %52 + %54 = OpLoad %uint %id + %55 = OpIMul %uint %54 %uint_2 + %56 = OpIAdd %uint %55 %uint_1 + %57 = OpAccessChain %_ptr_Workgroup_float %shared_data %56 + OpStore %57 %53 + OpControlBarrier %uint_2 %uint_2 %uint_264 + OpStore %step %uint_0 + OpBranch %62 + %62 = OpLabel + OpLoopMerge %66 %65 None + OpBranch %63 + %63 = OpLabel + %67 = OpLoad %uint %step + %69 = OpULessThan %bool %67 %uint_9 + OpBranchConditional %69 %64 %66 + %64 = OpLabel + %71 = OpLoad %uint %step + %72 = OpShiftLeftLogical %uint %uint_1 %71 + %73 = OpISub %uint %72 %uint_1 + OpStore %mask %73 + %74 = OpLoad %uint %id + %75 = OpLoad %uint %step + %76 = OpShiftRightLogical %uint %74 %75 + %77 = OpLoad %uint %step + %78 = OpIAdd %uint %77 %uint_1 + %79 = OpShiftLeftLogical %uint %76 %78 + %80 = OpIAdd %uint %79 %73 + OpStore %rd_id %80 + %81 = OpIAdd %uint %80 %uint_1 + %82 = OpLoad %uint %id + %83 = OpBitwiseAnd %uint %82 %73 + %84 = OpIAdd %uint %81 %83 + OpStore %wr_id %84 + OpStore %85 %84 + %86 = OpAccessChain %_ptr_Workgroup_float %shared_data %84 + %87 = OpLoad %float %86 + %88 = OpAccessChain %_ptr_Workgroup_float %shared_data %80 + %89 = OpLoad %float %88 + %90 = OpFAdd %float %87 %89 + OpStore %91 %90 + %92 = OpFunctionCall %void %store_vIf %85 %91 + OpControlBarrier %uint_2 %uint_2 %uint_264 + OpBranch %65 + %65 = OpLabel + %94 = OpLoad %uint %step + %95 = OpIAdd %uint %94 %uint_1 + OpStore %step %95 + OpBranch %62 + %66 = OpLabel + %96 = OpLoad %uint %id + %97 = OpIMul %uint %96 %uint_2 + %98 = OpAccessChain %_ptr_Workgroup_float %shared_data %97 + %99 = OpLoad %float %98 + %100 = OpLoad %uint %id + %101 = OpIMul %uint %100 %uint_2 + %102 = OpAccessChain %_ptr_Uniform_float %9 %int_0 %101 + OpStore %102 %99 + %103 = OpLoad %uint %id + %104 = OpIMul %uint %103 %uint_2 + %105 = OpIAdd %uint %104 %uint_1 + %106 = OpAccessChain %_ptr_Workgroup_float %shared_data %105 + %107 = OpLoad %float %106 + %108 = OpLoad %uint %id + %109 = OpIMul %uint %108 %uint_2 + %110 = OpIAdd %uint %109 %uint_1 + %111 = OpAccessChain %_ptr_Uniform_float %9 %int_0 %110 + OpStore %111 %107 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/compute/Workgroup.metal b/tests/sksl/compute/Workgroup.metal index fc3d2aa7c73c..3e8818957b9a 100644 --- a/tests/sksl/compute/Workgroup.metal +++ b/tests/sksl/compute/Workgroup.metal @@ -15,7 +15,7 @@ struct Globals { device outputs* _anonInterface1; }; struct Threadgroups { - array shared_data; + array shared_data; }; void store_vIf(threadgroup Threadgroups& _threadgroups, uint i, float value) { _threadgroups.shared_data[i] = value; @@ -33,7 +33,7 @@ kernel void computeMain(uint3 sk_GlobalInvocationID [[thread_position_in_grid]], _threadgroups.shared_data[id * 2u] = _globals._anonInterface0->in_data[id * 2u]; _threadgroups.shared_data[id * 2u + 1u] = _globals._anonInterface0->in_data[id * 2u + 1u]; threadgroup_barrier(mem_flags::mem_threadgroup); - const uint steps = 10u; + const uint steps = 9u; for (uint _0_step = 0u;_0_step < steps; _0_step++) { mask = (1u << _0_step) - 1u; rd_id = ((id >> _0_step) << _0_step + 1u) + mask; diff --git a/tests/sksl/errors/ArrayUnspecifiedDimensions.metal b/tests/sksl/errors/ArrayUnspecifiedDimensions.metal deleted file mode 100644 index 99fa1f7ff1ef..000000000000 --- a/tests/sksl/errors/ArrayUnspecifiedDimensions.metal +++ /dev/null @@ -1,69 +0,0 @@ -### Compilation failed: - -error: 1: unsized arrays are not permitted here -int arrUnsized[]; -^^^^^^^^^^^^^^^^ -error: 2: array size must be an integer -int arrFloat[1.]; - ^^ -error: 3: array size must be an integer -int arrBool[true]; - ^^^^ -error: 6: unsized arrays are not permitted here - int inStructVariable[]; - ^ -error: 8: unsized arrays are not permitted here -S arrOfStruct[]; -^^^^^^^^^^^^^^^ -error: 10: missing index in '[]' -int unsized_in_expression_a() { return int[](0)[0]; } - ^^ -error: 11: missing index in '[]' -S unsized_in_expression_b() { return S(int[](0)); } - ^^ -error: 14: unsized arrays are not permitted here - int[] inStructType; - ^^^^^^^^^^^^^^^^^^ -error: 17: unsized arrays are not permitted here -void unsized_in_parameter_a(int x[]) {} - ^^^^^^^ -error: 17: unsized arrays are not permitted here -void unsized_in_parameter_a(int x[]) {} - ^^ -error: 18: unsized arrays are not permitted here -void unsized_in_parameter_b(int[] x) {} - ^^^^^^^ -error: 18: unsized arrays are not permitted here -void unsized_in_parameter_b(int[] x) {} - ^^ -error: 19: unsized arrays are not permitted here -void unsized_in_parameter_c(int[]) {} - ^^^^^ -error: 19: unsized arrays are not permitted here -void unsized_in_parameter_c(int[]) {} - ^^ -error: 20: unsized arrays are not permitted here -void unsized_in_parameter_d(S x[]) {} - ^^^^^ -error: 20: unsized arrays are not permitted here -void unsized_in_parameter_d(S x[]) {} - ^^ -error: 21: unsized arrays are not permitted here -void unsized_in_parameter_e(S[] x) {} - ^^^^^ -error: 21: unsized arrays are not permitted here -void unsized_in_parameter_e(S[] x) {} - ^^ -error: 22: unsized arrays are not permitted here -void unsized_in_parameter_f(S[]) {} - ^^^ -error: 22: unsized arrays are not permitted here -void unsized_in_parameter_f(S[]) {} - ^^ -error: 24: functions may not return type 'int[]' -int[] unsized_in_return_type_a() {} -^^^ -error: 25: functions may not return type 'S[]' -S[] unsized_in_return_type_b() {} -^ -22 errors diff --git a/tests/sksl/errors/DuplicateWorkgroupSize.glsl b/tests/sksl/errors/DuplicateWorkgroupSize.glsl new file mode 100644 index 000000000000..fa376fa1c19f --- /dev/null +++ b/tests/sksl/errors/DuplicateWorkgroupSize.glsl @@ -0,0 +1,21 @@ +### Compilation failed: + +error: 2: 'local_size_x' was specified more than once +layout(local_size_x = 64) in; +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: 4: 'local_size_y' was specified more than once +layout(local_size_y = 64) in; +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: 6: 'local_size_z' was specified more than once +layout(local_size_z = 1) in; +^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: 7: 'local_size_x' was specified more than once +layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) in; +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: 7: 'local_size_y' was specified more than once +layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) in; +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: 7: 'local_size_z' was specified more than once +layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) in; +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +6 errors diff --git a/tests/sksl/errors/InvalidBackendBindingFlagsGL.glsl b/tests/sksl/errors/InvalidBackendBindingFlagsGL.glsl deleted file mode 100644 index 0f76a3486ca0..000000000000 --- a/tests/sksl/errors/InvalidBackendBindingFlagsGL.glsl +++ /dev/null @@ -1,15 +0,0 @@ -### Compilation failed: - -error: 8: layout qualifier 'texture' is not permitted here -layout(gl, texture=0) uniform texture2D texture2; // invalid -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: 9: layout qualifier 'texture' is not permitted here -layout(gl, texture=0, sampler=0) uniform sampler2D sampler2; // invalid -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: 9: layout qualifier 'sampler' is not permitted here -layout(gl, texture=0, sampler=0) uniform sampler2D sampler2; // invalid -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error: 10: layout qualifier 'set' is not permitted here -layout(gl, set=0, binding=0) uniform ubo2 { float c; }; // invalid -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -4 errors diff --git a/tests/sksl/errors/InvalidInOutType.metal b/tests/sksl/errors/InvalidInOutType.glsl similarity index 100% rename from tests/sksl/errors/InvalidInOutType.metal rename to tests/sksl/errors/InvalidInOutType.glsl diff --git a/tests/sksl/errors/InvalidLocalSizeQualifier.glsl b/tests/sksl/errors/InvalidLocalSizeQualifier.glsl new file mode 100644 index 000000000000..27b1a6ea5bf9 --- /dev/null +++ b/tests/sksl/errors/InvalidLocalSizeQualifier.glsl @@ -0,0 +1,54 @@ +### Compilation failed: + +error: 1: local size layout qualifiers must be defined using an 'in' declaration +layout(local_size_x = 16, local_size_y = 16, local_size_z = 1); +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: 2: local size layout qualifiers must be defined using an 'in' declaration +layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) out; +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: 3: local size layout qualifiers must be defined using an 'in' declaration +layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) inout; +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: 4: local size layout qualifiers must be defined using an 'in' declaration +layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) const; +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: 5: local size layout qualifiers must be defined using an 'in' declaration +layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) uniform; +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: 6: local size layout qualifiers must be defined using an 'in' declaration +layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) buffer; +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: 7: local size layout qualifiers must be defined using an 'in' declaration +layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) workgroup; +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: 8: local size layout qualifiers must be defined using an 'in' declaration +layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) highp; +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: 9: local size layout qualifiers must be defined using an 'in' declaration +layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) mediump; +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: 10: local size layout qualifiers must be defined using an 'in' declaration +layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) lowp; +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: 11: local size layout qualifiers must be defined using an 'in' declaration +layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) flat; +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: 12: local size layout qualifiers must be defined using an 'in' declaration +layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) noperspective; +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: 13: local size layout qualifiers must be defined using an 'in' declaration +layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) readonly; +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: 14: local size layout qualifiers must be defined using an 'in' declaration +layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) writeonly; +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: 16: local size layout qualifiers must be defined using an 'in' declaration +layout(local_size_x = 16) out; +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: 17: local size layout qualifiers must be defined using an 'in' declaration +layout(local_size_y = 16) out; +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: 18: local size layout qualifiers must be defined using an 'in' declaration +layout(local_size_z = 16) out; +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +17 errors diff --git a/tests/sksl/errors/InvalidMainParameters.metal b/tests/sksl/errors/InvalidMainParameters.glsl similarity index 100% rename from tests/sksl/errors/InvalidMainParameters.metal rename to tests/sksl/errors/InvalidMainParameters.glsl diff --git a/tests/sksl/errors/InvalidMainReturn.metal b/tests/sksl/errors/InvalidMainReturn.glsl similarity index 100% rename from tests/sksl/errors/InvalidMainReturn.metal rename to tests/sksl/errors/InvalidMainReturn.glsl diff --git a/tests/sksl/errors/InvalidOutParams.glsl b/tests/sksl/errors/InvalidOutParams.glsl index 91de66d33d8b..97a9f5d9762e 100644 --- a/tests/sksl/errors/InvalidOutParams.glsl +++ b/tests/sksl/errors/InvalidOutParams.glsl @@ -9,4 +9,22 @@ void test_b() { inc4(float4(0)); } error: 6: cannot assign to this expression void test_c() { inc1(sqrt(1)); } ^^^^^^^ -3 errors +error: 10: '$pure' is not permitted here +$pure void pure_function_with_out_param (out float x) { x = 1; } +^^^^^ +error: 10: pure functions cannot have out parameters +$pure void pure_function_with_out_param (out float x) { x = 1; } + ^^^ +error: 10: unknown identifier 'x' +$pure void pure_function_with_out_param (out float x) { x = 1; } + ^ +error: 11: '$pure' is not permitted here +$pure void pure_function_with_inout_param(inout float x) { x += 1; } +^^^^^ +error: 11: pure functions cannot have out parameters +$pure void pure_function_with_inout_param(inout float x) { x += 1; } + ^^^^^ +error: 11: unknown identifier 'x' +$pure void pure_function_with_inout_param(inout float x) { x += 1; } + ^ +9 errors diff --git a/tests/sksl/errors/InvalidUnsizedArray.metal b/tests/sksl/errors/InvalidUnsizedArray.glsl similarity index 100% rename from tests/sksl/errors/InvalidUnsizedArray.metal rename to tests/sksl/errors/InvalidUnsizedArray.glsl diff --git a/tests/sksl/errors/LayoutInFunctions.glsl b/tests/sksl/errors/LayoutInFunctions.glsl index a7a0874c1ca7..5a2dd4e6c6da 100644 --- a/tests/sksl/errors/LayoutInFunctions.glsl +++ b/tests/sksl/errors/LayoutInFunctions.glsl @@ -42,7 +42,7 @@ layout ( error: 1: layout qualifier 'metal' is not permitted here layout ( ^^^^^^^^... -error: 1: layout qualifier 'gl' is not permitted here +error: 1: layout qualifier 'wgsl' is not permitted here layout ( ^^^^^^^^... error: 19: only one backend qualifier can be used @@ -87,7 +87,7 @@ layout ( error: 19: layout qualifier 'metal' is not permitted here layout ( ^^^^^^^^... -error: 19: layout qualifier 'gl' is not permitted here +error: 19: layout qualifier 'wgsl' is not permitted here layout ( ^^^^^^^^... 30 errors diff --git a/tests/sksl/errors/LayoutRepeatedQualifiers.glsl b/tests/sksl/errors/LayoutRepeatedQualifiers.glsl index f78de6a9c22d..4e3f04b5e832 100644 --- a/tests/sksl/errors/LayoutRepeatedQualifiers.glsl +++ b/tests/sksl/errors/LayoutRepeatedQualifiers.glsl @@ -39,9 +39,9 @@ error: 28: layout qualifier 'spirv' appears more than once error: 29: layout qualifier 'metal' appears more than once metal, ^^^^^ -error: 30: layout qualifier 'gl' appears more than once - gl - ^^ +error: 30: layout qualifier 'wgsl' appears more than once + wgsl + ^^^^ error: 1: 'layout(color)' is only permitted in runtime effects layout ( ^^^^^^^^... diff --git a/tests/sksl/errors/MisplacedLocalSizeQualifier.glsl b/tests/sksl/errors/MisplacedLocalSizeQualifier.glsl new file mode 100644 index 000000000000..7d44562afe3b --- /dev/null +++ b/tests/sksl/errors/MisplacedLocalSizeQualifier.glsl @@ -0,0 +1,15 @@ +### Compilation failed: + +error: 1: local size layout qualifiers are only allowed in a compute program +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: 2: local size layout qualifiers are only allowed in a compute program +layout(local_size_x = 1) in; +^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: 3: local size layout qualifiers are only allowed in a compute program +layout(local_size_y = 1) in; +^^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: 4: local size layout qualifiers are only allowed in a compute program +layout(local_size_z = 1) in; +^^^^^^^^^^^^^^^^^^^^^^^^^^^ +4 errors diff --git a/tests/sksl/errors/MissingWorkgroupSize.glsl b/tests/sksl/errors/MissingWorkgroupSize.glsl new file mode 100644 index 000000000000..3df5130d3eed --- /dev/null +++ b/tests/sksl/errors/MissingWorkgroupSize.glsl @@ -0,0 +1,4 @@ +### Compilation failed: + +error: compute programs must specify a workgroup size +1 error diff --git a/tests/sksl/errors/MultipleBackendFlags.glsl b/tests/sksl/errors/MultipleBackendFlags.glsl index d37db64151f2..511ef889a6c3 100644 --- a/tests/sksl/errors/MultipleBackendFlags.glsl +++ b/tests/sksl/errors/MultipleBackendFlags.glsl @@ -1,8 +1,8 @@ ### Compilation failed: error: 1: only one backend qualifier can be used -layout(metal, spirv, wgsl, gl, binding = 0) uniform ubo { float f; }; // multiple backends -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +layout(metal, spirv, wgsl, binding = 0) uniform ubo { float f; }; // multiple backends +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: 2: layout qualifier 'texture' is not permitted here layout(texture=0, sampler=0) uniform sampler2D s; // invalid (requires backend) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/sksl/errors/Ossfuzz44045.glsl b/tests/sksl/errors/Ossfuzz44045.glsl index 6c8ed7acde91..4af1592ea873 100644 --- a/tests/sksl/errors/Ossfuzz44045.glsl +++ b/tests/sksl/errors/Ossfuzz44045.glsl @@ -2,7 +2,7 @@ error: 1: value is out of range for type 'int': 3976000000 int[int3(half3(int3(half3(662666666.*6))))[1]] x; - ^^^^^^^^^^^^^^^^^^^ + ^^^^^^^^^^^^^^^^^^^^^^^^^ error: 1: array size must be positive int[int3(half3(int3(half3(662666666.*6))))[1]] x; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/sksl/errors/OverflowInlinedLiteral.glsl b/tests/sksl/errors/OverflowInlinedLiteral.glsl index dd07c1881e8b..e68f2b1a16c2 100644 --- a/tests/sksl/errors/OverflowInlinedLiteral.glsl +++ b/tests/sksl/errors/OverflowInlinedLiteral.glsl @@ -2,16 +2,16 @@ error: 20: value is out of range for type 'short': 99999 cast_int_to_short(99999); - ^^^^^ + ^^^^^^^^^^^^^^^^^^^^^^^^ error: 21: value is out of range for type 'short': 67890 cast_int2_to_short2(int2(12345, 67890)); - ^^^^^^^^^^^^^^^^^^ + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: 22: value is out of range for type 'int': 5000000000 cast_float_to_int(5000000000.0); - ^^^^^^^^^^^^ + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: 23: value is out of range for type 'int': 3000000000 cast_float3_to_int3(float3(3000000000, 2000000, 1000)); - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: 24: value is out of range for type 'short': 32768 negate_short(-32768); ^^^^^^^^^^^^^^^^^^^^ diff --git a/tests/sksl/errors/TernaryMismatch.glsl b/tests/sksl/errors/TernaryMismatch.glsl index a1ca93f79565..adfb29884e2a 100644 --- a/tests/sksl/errors/TernaryMismatch.glsl +++ b/tests/sksl/errors/TernaryMismatch.glsl @@ -1,9 +1,12 @@ ### Compilation failed: -error: 1: ternary operator result mismatch: 'bool', 'float' +error: 2: ternary operator result mismatch: 'bool', 'float' void bool_or_float() { float x = 5 > 2 ? true : 1.0; } ^^^^^^^^^^ -error: 2: ternary operator result mismatch: 'float3', 'float' +error: 3: ternary operator result mismatch: 'float3', 'float' void float3_or_float() { float x = 5 > 2 ? float3(1) : 1.0; } ^^^^^^^^^^^^^^^ -2 errors +error: 4: ternary expression of type 'void' is not allowed +void void_or_void() { 5 > 2 ? void_function() : void_function(); } + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 errors diff --git a/tests/sksl/folding/ArrayFolding.skrp b/tests/sksl/folding/ArrayFolding.skrp index ea05685c1520..c08eac1bc1d6 100644 --- a/tests/sksl/folding/ArrayFolding.skrp +++ b/tests/sksl/folding/ArrayFolding.skrp @@ -1,6 +1,8 @@ +42 instructions + [immutable slots] -_8_flatten0 = 0x00000001 (1.401298e-45) -_10_flatten2 = 0x00000003 (4.203895e-45) +i0 = 0x00000001 (1.401298e-45) +i1 = 0x00000003 (4.203895e-45) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true diff --git a/tests/sksl/folding/ArraySizeFolding.skrp b/tests/sksl/folding/ArraySizeFolding.skrp index 20812ef1622b..cf1cf1f3048a 100644 --- a/tests/sksl/folding/ArraySizeFolding.skrp +++ b/tests/sksl/folding/ArraySizeFolding.skrp @@ -1,3 +1,5 @@ +61 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true splat_4_constants f[0], f[1], f[2], g[0] = 0 diff --git a/tests/sksl/folding/AssignmentOps.skrp b/tests/sksl/folding/AssignmentOps.skrp index 138484406ad0..881dbd483d2e 100644 --- a/tests/sksl/folding/AssignmentOps.skrp +++ b/tests/sksl/folding/AssignmentOps.skrp @@ -1,3 +1,5 @@ +75 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_constant ok = 0xFFFFFFFF diff --git a/tests/sksl/folding/BoolFolding.skrp b/tests/sksl/folding/BoolFolding.skrp index f62b73176156..d1a41e6ded46 100644 --- a/tests/sksl/folding/BoolFolding.skrp +++ b/tests/sksl/folding/BoolFolding.skrp @@ -1,3 +1,5 @@ +8 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_constant $4 = 0xFFFFFFFF diff --git a/tests/sksl/folding/CastFolding.skrp b/tests/sksl/folding/CastFolding.skrp index 2a8ae0a9beb5..d57922f00112 100644 --- a/tests/sksl/folding/CastFolding.skrp +++ b/tests/sksl/folding/CastFolding.skrp @@ -1,5 +1,7 @@ +8 instructions + [immutable slots] -_4_ok = 0xFFFFFFFF +i0 = 0xFFFFFFFF store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true diff --git a/tests/sksl/folding/FloatFolding.skrp b/tests/sksl/folding/FloatFolding.skrp index db5be5ff77d1..ad6591699382 100644 --- a/tests/sksl/folding/FloatFolding.skrp +++ b/tests/sksl/folding/FloatFolding.skrp @@ -1,3 +1,5 @@ +184 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_uniform _0_unknown = unknownInput diff --git a/tests/sksl/folding/IntFoldingES2.skrp b/tests/sksl/folding/IntFoldingES2.skrp index 7fbb9df904a4..88a80b7ccb69 100644 --- a/tests/sksl/folding/IntFoldingES2.skrp +++ b/tests/sksl/folding/IntFoldingES2.skrp @@ -1,3 +1,5 @@ +184 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_uniform $0 = unknownInput diff --git a/tests/sksl/folding/IntFoldingES3.skrp b/tests/sksl/folding/IntFoldingES3.skrp index 9da8d4caa821..2119743068ad 100644 --- a/tests/sksl/folding/IntFoldingES3.skrp +++ b/tests/sksl/folding/IntFoldingES3.skrp @@ -1,3 +1,5 @@ +43 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_constant _0_ok = 0xFFFFFFFF diff --git a/tests/sksl/folding/LogicalNot.skrp b/tests/sksl/folding/LogicalNot.skrp index 28bfe91fdec1..2e45f2973ffe 100644 --- a/tests/sksl/folding/LogicalNot.skrp +++ b/tests/sksl/folding/LogicalNot.skrp @@ -1,3 +1,5 @@ +47 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_constant ok = 0xFFFFFFFF diff --git a/tests/sksl/folding/MatrixFoldingES2.skrp b/tests/sksl/folding/MatrixFoldingES2.skrp index 560a8ba58d95..370422951e3b 100644 --- a/tests/sksl/folding/MatrixFoldingES2.skrp +++ b/tests/sksl/folding/MatrixFoldingES2.skrp @@ -1,12 +1,19 @@ +135 instructions + [immutable slots] -ok = 0xFFFFFFFF -ok₁ = 0xFFFFFFFF -ok₂ = 0xFFFFFFFF -ok₃ = 0xFFFFFFFF -ok₄ = 0xFFFFFFFF -ok₅ = 0xFFFFFFFF -ok₆ = 0xFFFFFFFF -ok₇ = 0xFFFFFFFF +i0 = 0x3F800000 (1.0) +i1 = 0x40000000 (2.0) +i2 = 0x40400000 (3.0) +i3 = 0x40800000 (4.0) +i4 = 0x3F800000 (1.0) +i5 = 0x40000000 (2.0) +i6 = 0 +i7 = 0 +i8 = 0x40400000 (3.0) +i9 = 0x40800000 (4.0) +i10 = 0 +i11 = 0 +i12 = 0xFFFFFFFF store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -47,10 +54,7 @@ bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_slot_unmasked _0_ok = $0 copy_4_uniforms $1..4 = testMatrix2x2 -copy_constant $5 = 0x3F800000 (1.0) -copy_constant $6 = 0x40000000 (2.0) -copy_constant $7 = 0x40400000 (3.0) -copy_constant $8 = 0x40800000 (4.0) +copy_4_immutables_unmasked $5..8 = i0..3 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -64,9 +68,7 @@ copy_constant $28 = 0 copy_constant $29 = 0x3F800000 (1.0) shuffle $22..34 = ($22..34)[6 0 1 2 6 3 4 5 6 6 6 6 7] copy_4_slots_unmasked $1..4 = $19..22 -copy_constant $5 = 0x3F800000 (1.0) -copy_constant $6 = 0x40000000 (2.0) -splat_2_constants $7..8 = 0 +copy_4_immutables_unmasked $5..8 = i4..7 [0x3F800000 (1.0), 0x40000000 (2.0), 0, 0] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -80,9 +82,7 @@ copy_constant $28 = 0 copy_constant $29 = 0x3F800000 (1.0) shuffle $22..34 = ($22..34)[6 0 1 2 6 3 4 5 6 6 6 6 7] copy_4_slots_unmasked $1..4 = $23..26 -copy_constant $5 = 0x40400000 (3.0) -copy_constant $6 = 0x40800000 (4.0) -splat_2_constants $7..8 = 0 +copy_4_immutables_unmasked $5..8 = i8..11 [0x40400000 (3.0), 0x40800000 (4.0), 0, 0] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -99,64 +99,64 @@ store_condition_mask $53 = CondMask copy_slot_unmasked $54 = _0_ok copy_constant $51 = 0 merge_condition_mask CondMask = $53 & $54 -branch_if_no_lanes_active branch_if_no_lanes_active +4 (label 8 at #96) -copy_slot_unmasked $52 = ok +branch_if_no_lanes_active branch_if_no_lanes_active +4 (label 8 at #89) +copy_constant $52 = 0xFFFFFFFF label label 0x00000009 copy_slot_masked $51 = Mask($52) label label 0x00000008 load_condition_mask CondMask = $53 copy_constant $48 = 0 merge_condition_mask CondMask = $50 & $51 -branch_if_no_lanes_active branch_if_no_lanes_active +4 (label 7 at #104) -copy_slot_unmasked $49 = ok₁ +branch_if_no_lanes_active branch_if_no_lanes_active +4 (label 7 at #97) +copy_constant $49 = 0xFFFFFFFF label label 0x0000000A copy_slot_masked $48 = Mask($49) label label 0x00000007 load_condition_mask CondMask = $50 copy_constant $45 = 0 merge_condition_mask CondMask = $47 & $48 -branch_if_no_lanes_active branch_if_no_lanes_active +4 (label 6 at #112) -copy_slot_unmasked $46 = ok₂ +branch_if_no_lanes_active branch_if_no_lanes_active +4 (label 6 at #105) +copy_constant $46 = 0xFFFFFFFF label label 0x0000000B copy_slot_masked $45 = Mask($46) label label 0x00000006 load_condition_mask CondMask = $47 copy_constant $42 = 0 merge_condition_mask CondMask = $44 & $45 -branch_if_no_lanes_active branch_if_no_lanes_active +4 (label 5 at #120) -copy_slot_unmasked $43 = ok₃ +branch_if_no_lanes_active branch_if_no_lanes_active +4 (label 5 at #113) +copy_constant $43 = 0xFFFFFFFF label label 0x0000000C copy_slot_masked $42 = Mask($43) label label 0x00000005 load_condition_mask CondMask = $44 copy_constant $39 = 0 merge_condition_mask CondMask = $41 & $42 -branch_if_no_lanes_active branch_if_no_lanes_active +4 (label 4 at #128) -copy_slot_unmasked $40 = ok₄ +branch_if_no_lanes_active branch_if_no_lanes_active +4 (label 4 at #121) +copy_constant $40 = 0xFFFFFFFF label label 0x0000000D copy_slot_masked $39 = Mask($40) label label 0x00000004 load_condition_mask CondMask = $41 copy_constant $36 = 0 merge_condition_mask CondMask = $38 & $39 -branch_if_no_lanes_active branch_if_no_lanes_active +4 (label 3 at #136) -copy_slot_unmasked $37 = ok₅ +branch_if_no_lanes_active branch_if_no_lanes_active +4 (label 3 at #129) +copy_constant $37 = 0xFFFFFFFF label label 0x0000000E copy_slot_masked $36 = Mask($37) label label 0x00000003 load_condition_mask CondMask = $38 copy_constant $20 = 0 merge_condition_mask CondMask = $35 & $36 -branch_if_no_lanes_active branch_if_no_lanes_active +4 (label 2 at #144) -copy_slot_unmasked $21 = ok₆ +branch_if_no_lanes_active branch_if_no_lanes_active +4 (label 2 at #137) +copy_constant $21 = 0xFFFFFFFF label label 0x0000000F copy_slot_masked $20 = Mask($21) label label 0x00000002 load_condition_mask CondMask = $35 copy_constant $0 = 0 merge_condition_mask CondMask = $19 & $20 -branch_if_no_lanes_active branch_if_no_lanes_active +4 (label 1 at #152) -copy_slot_unmasked $1 = ok₇ +branch_if_no_lanes_active branch_if_no_lanes_active +4 (label 1 at #145) +copy_constant $1 = 0xFFFFFFFF label label 0x00000010 copy_slot_masked $0 = Mask($1) label label 0x00000001 diff --git a/tests/sksl/folding/MatrixFoldingES3.skrp b/tests/sksl/folding/MatrixFoldingES3.skrp index 639f4d82fa49..682e59949089 100644 --- a/tests/sksl/folding/MatrixFoldingES3.skrp +++ b/tests/sksl/folding/MatrixFoldingES3.skrp @@ -1,12 +1,7 @@ +55 instructions + [immutable slots] -_0_ok = 0xFFFFFFFF -ok = 0xFFFFFFFF -ok₁ = 0xFFFFFFFF -ok₂ = 0xFFFFFFFF -ok₃ = 0xFFFFFFFF -ok₄ = 0xFFFFFFFF -ok₅ = 0xFFFFFFFF -ok₆ = 0xFFFFFFFF +i0 = 0xFFFFFFFF store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -19,7 +14,7 @@ store_condition_mask $27 = CondMask copy_constant $29 = 0xFFFFFFFF branch_if_no_active_lanes_eq branch +5 (label 7 at #15) if no lanes of $29 == 0xFFFFFFFF branch_if_no_lanes_active branch_if_no_lanes_active +2 (label 9 at #13) -copy_slot_unmasked $28 = ok +copy_constant $28 = 0xFFFFFFFF label label 0x00000009 jump jump +3 (label 8 at #17) label label 0x00000007 @@ -28,7 +23,7 @@ label label 0x00000008 copy_constant $25 = 0 merge_condition_mask CondMask = $27 & $28 branch_if_no_lanes_active branch_if_no_lanes_active +4 (label 6 at #24) -copy_slot_unmasked $26 = ok₁ +copy_constant $26 = 0xFFFFFFFF label label 0x0000000A copy_slot_masked $25 = Mask($26) label label 0x00000006 @@ -36,7 +31,7 @@ load_condition_mask CondMask = $27 copy_constant $22 = 0 merge_condition_mask CondMask = $24 & $25 branch_if_no_lanes_active branch_if_no_lanes_active +4 (label 5 at #32) -copy_slot_unmasked $23 = ok₂ +copy_constant $23 = 0xFFFFFFFF label label 0x0000000B copy_slot_masked $22 = Mask($23) label label 0x00000005 @@ -44,7 +39,7 @@ load_condition_mask CondMask = $24 copy_constant $19 = 0 merge_condition_mask CondMask = $21 & $22 branch_if_no_lanes_active branch_if_no_lanes_active +4 (label 4 at #40) -copy_slot_unmasked $20 = ok₃ +copy_constant $20 = 0xFFFFFFFF label label 0x0000000C copy_slot_masked $19 = Mask($20) label label 0x00000004 @@ -52,7 +47,7 @@ load_condition_mask CondMask = $21 copy_constant $16 = 0 merge_condition_mask CondMask = $18 & $19 branch_if_no_lanes_active branch_if_no_lanes_active +4 (label 3 at #48) -copy_slot_unmasked $17 = ok₄ +copy_constant $17 = 0xFFFFFFFF label label 0x0000000D copy_slot_masked $16 = Mask($17) label label 0x00000003 @@ -60,7 +55,7 @@ load_condition_mask CondMask = $18 copy_constant $13 = 0 merge_condition_mask CondMask = $15 & $16 branch_if_no_lanes_active branch_if_no_lanes_active +4 (label 2 at #56) -copy_slot_unmasked $14 = ok₅ +copy_constant $14 = 0xFFFFFFFF label label 0x0000000E copy_slot_masked $13 = Mask($14) label label 0x00000002 @@ -68,7 +63,7 @@ load_condition_mask CondMask = $15 copy_constant $0 = 0 merge_condition_mask CondMask = $12 & $13 branch_if_no_lanes_active branch_if_no_lanes_active +4 (label 1 at #64) -copy_slot_unmasked $1 = ok₆ +copy_constant $1 = 0xFFFFFFFF label label 0x0000000F copy_slot_masked $0 = Mask($1) label label 0x00000001 diff --git a/tests/sksl/folding/MatrixNoOpFolding.skrp b/tests/sksl/folding/MatrixNoOpFolding.skrp index e6bfcb1d1b15..b1d29a38bc0f 100644 --- a/tests/sksl/folding/MatrixNoOpFolding.skrp +++ b/tests/sksl/folding/MatrixNoOpFolding.skrp @@ -1,33 +1,35 @@ +190 instructions + [immutable slots] -_3_z(0) = 0 -_3_z(1) = 0 -_3_z(2) = 0 -_3_z(3) = 0 -z(0) = 0 -z(1) = 0 -z(2) = 0 -z(3) = 0 -z(4) = 0 -z(5) = 0 -z(6) = 0 -z(7) = 0 -z(8) = 0 -z₁(0) = 0 -z₁(1) = 0 -z₁(2) = 0 -z₁(3) = 0 -z₁(4) = 0 -z₁(5) = 0 -z₁(6) = 0 -z₁(7) = 0 -z₁(8) = 0 -z₁(9) = 0 -z₁(10) = 0 -z₁(11) = 0 -z₁(12) = 0 -z₁(13) = 0 -z₁(14) = 0 -z₁(15) = 0 +i0 = 0 +i1 = 0 +i2 = 0 +i3 = 0 +i4 = 0 +i5 = 0 +i6 = 0 +i7 = 0 +i8 = 0 +i9 = 0 +i10 = 0 +i11 = 0 +i12 = 0 +i13 = 0 +i14 = 0 +i15 = 0 +i16 = 0 +i17 = 0 +i18 = 0 +i19 = 0 +i20 = 0 +i21 = 0 +i22 = 0 +i23 = 0 +i24 = 0 +i25 = 0 +i26 = 0 +i27 = 0 +i28 = 0 store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -55,14 +57,14 @@ cmpeq_4_floats $79..82 = equal($79..82, $83..86) bitwise_and_2_ints $79..80 &= $81..82 bitwise_and_int $79 &= $80 copy_4_slots_unmasked $80..83 = _1_mm -copy_4_slots_unmasked $84..87 = _3_z +copy_4_immutables_unmasked $84..87 = i0..3 [0, 0, 0, 0] cmpeq_4_floats $80..83 = equal($80..83, $84..87) bitwise_and_2_ints $80..81 &= $82..83 bitwise_and_int $80 &= $81 bitwise_and_int $79 &= $80 copy_constant $50 = 0 merge_condition_mask CondMask = $78 & $79 -branch_if_no_lanes_active branch_if_no_lanes_active +63 (label 2 at #97) +branch_if_no_lanes_active branch_if_no_lanes_active +64 (label 2 at #98) splat_4_constants m(0..3) = 0 splat_4_constants m(4..7) = 0 splat_4_constants m(8), mm(0..2) = 0 @@ -114,9 +116,10 @@ bitwise_and_int $52 &= $53 bitwise_and_int $51 &= $52 copy_4_slots_unmasked $52..55 = mm(0..3) copy_4_slots_unmasked $56..59 = mm(4..7) -copy_4_slots_unmasked $60..63 = mm(8), z(0..2) -copy_4_slots_unmasked $64..67 = z(3..6) -copy_2_slots_unmasked $68..69 = z(7..8) +copy_slot_unmasked $60 = mm(8) +copy_4_immutables_unmasked $61..64 = i4..7 [0, 0, 0, 0] +copy_4_immutables_unmasked $65..68 = i8..11 [0, 0, 0, 0] +copy_immutable_unmasked $69 = i12 [0] cmpeq_n_floats $52..60 = equal($52..60, $61..69) bitwise_and_4_ints $53..56 &= $57..60 bitwise_and_2_ints $53..54 &= $55..56 @@ -129,7 +132,7 @@ label label 0x00000002 load_condition_mask CondMask = $78 copy_constant $0 = 0 merge_condition_mask CondMask = $49 & $50 -branch_if_no_lanes_active branch_if_no_lanes_active +86 (label 1 at #187) +branch_if_no_lanes_active branch_if_no_lanes_active +86 (label 1 at #188) copy_4_uniforms testMatrix4x4(0..3) = testInputs copy_4_uniforms testMatrix4x4(4..7) = testInputs copy_4_uniforms testMatrix4x4(8..11) = testInputs @@ -202,10 +205,10 @@ copy_4_slots_unmasked $2..5 = mm₁(0..3) copy_4_slots_unmasked $6..9 = mm₁(4..7) copy_4_slots_unmasked $10..13 = mm₁(8..11) copy_4_slots_unmasked $14..17 = mm₁(12..15) -copy_4_slots_unmasked $18..21 = z₁(0..3) -copy_4_slots_unmasked $22..25 = z₁(4..7) -copy_4_slots_unmasked $26..29 = z₁(8..11) -copy_4_slots_unmasked $30..33 = z₁(12..15) +copy_4_immutables_unmasked $18..21 = i13..16 [0, 0, 0, 0] +copy_4_immutables_unmasked $22..25 = i17..20 [0, 0, 0, 0] +copy_4_immutables_unmasked $26..29 = i21..24 [0, 0, 0, 0] +copy_4_immutables_unmasked $30..33 = i25..28 [0, 0, 0, 0] cmpeq_n_floats $2..17 = equal($2..17, $18..33) bitwise_and_4_ints $10..13 &= $14..17 bitwise_and_4_ints $6..9 &= $10..13 diff --git a/tests/sksl/folding/MatrixScalarNoOpFolding.skrp b/tests/sksl/folding/MatrixScalarNoOpFolding.skrp index cd1c1e7b7452..3aef838baf7a 100644 --- a/tests/sksl/folding/MatrixScalarNoOpFolding.skrp +++ b/tests/sksl/folding/MatrixScalarNoOpFolding.skrp @@ -1,91 +1,64 @@ +865 instructions + [immutable slots] -z(0) = 0 -z(1) = 0 -z(2) = 0 -z(3) = 0 -z₁(0) = 0 -z₁(1) = 0 -z₁(2) = 0 -z₁(3) = 0 -z₁(4) = 0 -z₁(5) = 0 -z₁(6) = 0 -z₁(7) = 0 -z₁(8) = 0 -z₂(0) = 0 -z₂(1) = 0 -z₂(2) = 0 -z₂(3) = 0 -z₂(4) = 0 -z₂(5) = 0 -z₂(6) = 0 -z₂(7) = 0 -z₂(8) = 0 -z₂(9) = 0 -z₂(10) = 0 -z₂(11) = 0 -z₂(12) = 0 -z₂(13) = 0 -z₂(14) = 0 -z₂(15) = 0 -z₃(0) = 0 -z₃(1) = 0 -z₃(2) = 0 -z₃(3) = 0 -s(0) = 0x3F800000 (1.0) -s(1) = 0x3F800000 (1.0) -s(2) = 0x3F800000 (1.0) -s(3) = 0x3F800000 (1.0) -z₄(0) = 0 -z₄(1) = 0 -z₄(2) = 0 -z₄(3) = 0 -z₄(4) = 0 -z₄(5) = 0 -z₄(6) = 0 -z₄(7) = 0 -z₄(8) = 0 -s₁(0) = 0x3F800000 (1.0) -s₁(1) = 0x3F800000 (1.0) -s₁(2) = 0x3F800000 (1.0) -s₁(3) = 0x3F800000 (1.0) -s₁(4) = 0x3F800000 (1.0) -s₁(5) = 0x3F800000 (1.0) -s₁(6) = 0x3F800000 (1.0) -s₁(7) = 0x3F800000 (1.0) -s₁(8) = 0x3F800000 (1.0) -z₅(0) = 0 -z₅(1) = 0 -z₅(2) = 0 -z₅(3) = 0 -z₅(4) = 0 -z₅(5) = 0 -z₅(6) = 0 -z₅(7) = 0 -z₅(8) = 0 -z₅(9) = 0 -z₅(10) = 0 -z₅(11) = 0 -z₅(12) = 0 -z₅(13) = 0 -z₅(14) = 0 -z₅(15) = 0 -s₂(0) = 0x3F800000 (1.0) -s₂(1) = 0x3F800000 (1.0) -s₂(2) = 0x3F800000 (1.0) -s₂(3) = 0x3F800000 (1.0) -s₂(4) = 0x3F800000 (1.0) -s₂(5) = 0x3F800000 (1.0) -s₂(6) = 0x3F800000 (1.0) -s₂(7) = 0x3F800000 (1.0) -s₂(8) = 0x3F800000 (1.0) -s₂(9) = 0x3F800000 (1.0) -s₂(10) = 0x3F800000 (1.0) -s₂(11) = 0x3F800000 (1.0) -s₂(12) = 0x3F800000 (1.0) -s₂(13) = 0x3F800000 (1.0) -s₂(14) = 0x3F800000 (1.0) -s₂(15) = 0x3F800000 (1.0) +i0 = 0 +i1 = 0 +i2 = 0 +i3 = 0 +i4 = 0 +i5 = 0 +i6 = 0 +i7 = 0 +i8 = 0 +i9 = 0 +i10 = 0 +i11 = 0 +i12 = 0 +i13 = 0 +i14 = 0 +i15 = 0 +i16 = 0 +i17 = 0 +i18 = 0 +i19 = 0 +i20 = 0 +i21 = 0 +i22 = 0 +i23 = 0 +i24 = 0 +i25 = 0 +i26 = 0 +i27 = 0 +i28 = 0 +i29 = 0x3F800000 (1.0) +i30 = 0x3F800000 (1.0) +i31 = 0x3F800000 (1.0) +i32 = 0x3F800000 (1.0) +i33 = 0x3F800000 (1.0) +i34 = 0x3F800000 (1.0) +i35 = 0x3F800000 (1.0) +i36 = 0x3F800000 (1.0) +i37 = 0x3F800000 (1.0) +i38 = 0x3F800000 (1.0) +i39 = 0x3F800000 (1.0) +i40 = 0x3F800000 (1.0) +i41 = 0x3F800000 (1.0) +i42 = 0x3F800000 (1.0) +i43 = 0x3F800000 (1.0) +i44 = 0x3F800000 (1.0) +i45 = 0x3F800000 (1.0) +i46 = 0x3F800000 (1.0) +i47 = 0x3F800000 (1.0) +i48 = 0x3F800000 (1.0) +i49 = 0x3F800000 (1.0) +i50 = 0x3F800000 (1.0) +i51 = 0x3F800000 (1.0) +i52 = 0x3F800000 (1.0) +i53 = 0x3F800000 (1.0) +i54 = 0x3F800000 (1.0) +i55 = 0x3F800000 (1.0) +i56 = 0x3F800000 (1.0) +i57 = 0x3F800000 (1.0) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -158,7 +131,7 @@ copy_4_slots_masked mm = Mask($183..186) splat_2_constants $183..184 = 0 swizzle_4 $183..186 = ($183..186).yxxy copy_4_slots_masked mm = Mask($183..186) -copy_4_slots_unmasked $187..190 = z +copy_4_immutables_unmasked $187..190 = i0..3 [0, 0, 0, 0] cmpeq_4_floats $183..186 = equal($183..186, $187..190) bitwise_and_2_ints $183..184 &= $185..186 bitwise_and_int $183 &= $184 @@ -279,9 +252,9 @@ shuffle $153..161 = ($153..161)[1 0 0 0 1 0 0 0 1] copy_4_slots_masked mm₁(0..3) = Mask($153..156) copy_4_slots_masked mm₁(4..7) = Mask($157..160) copy_slot_masked mm₁(8) = Mask($161) -copy_4_slots_unmasked $162..165 = z₁(0..3) -copy_4_slots_unmasked $166..169 = z₁(4..7) -copy_slot_unmasked $170 = z₁(8) +copy_4_immutables_unmasked $162..165 = i4..7 [0, 0, 0, 0] +copy_4_immutables_unmasked $166..169 = i8..11 [0, 0, 0, 0] +copy_immutable_unmasked $170 = i12 [0] cmpeq_n_floats $153..161 = equal($153..161, $162..170) bitwise_and_4_ints $154..157 &= $158..161 bitwise_and_2_ints $154..155 &= $156..157 @@ -436,10 +409,10 @@ copy_4_slots_masked mm₂(0..3) = Mask($101..104) copy_4_slots_masked mm₂(4..7) = Mask($105..108) copy_4_slots_masked mm₂(8..11) = Mask($109..112) copy_4_slots_masked mm₂(12..15) = Mask($113..116) -copy_4_slots_unmasked $117..120 = z₂(0..3) -copy_4_slots_unmasked $121..124 = z₂(4..7) -copy_4_slots_unmasked $125..128 = z₂(8..11) -copy_4_slots_unmasked $129..132 = z₂(12..15) +copy_4_immutables_unmasked $117..120 = i13..16 [0, 0, 0, 0] +copy_4_immutables_unmasked $121..124 = i17..20 [0, 0, 0, 0] +copy_4_immutables_unmasked $125..128 = i21..24 [0, 0, 0, 0] +copy_4_immutables_unmasked $129..132 = i25..28 [0, 0, 0, 0] cmpeq_n_floats $101..116 = equal($101..116, $117..132) bitwise_and_4_ints $109..112 &= $113..116 bitwise_and_4_ints $105..108 &= $109..112 @@ -483,7 +456,7 @@ mask_off_return_mask RetMask &= ~(CondMask & LoopMask & RetMask) load_condition_mask CondMask = $85 copy_slot_unmasked $85 = scalar swizzle_4 $85..88 = ($85..88).xxxx -copy_4_slots_unmasked $89..92 = s +copy_4_immutables_unmasked $89..92 = i29..32 [0x3F800000 (1.0), 0x3F800000 (1.0), 0x3F800000 (1.0), 0x3F800000 (1.0)] div_4_floats $85..88 /= $89..92 copy_4_slots_masked m₃ = Mask($85..88) store_condition_mask $85 = CondMask @@ -502,10 +475,10 @@ mask_off_return_mask RetMask &= ~(CondMask & LoopMask & RetMask) load_condition_mask CondMask = $85 copy_slot_unmasked $85 = scalar swizzle_4 $85..88 = ($85..88).xxxx -copy_4_slots_unmasked $89..92 = z₃ +copy_4_immutables_unmasked $89..92 = i0..3 [0, 0, 0, 0] add_4_floats $85..88 += $89..92 copy_4_slots_masked m₃ = Mask($85..88) -copy_4_slots_unmasked $85..88 = z₃ +copy_4_immutables_unmasked $85..88 = i0..3 [0, 0, 0, 0] copy_slot_unmasked $89 = scalar swizzle_4 $89..92 = ($89..92).xxxx add_4_floats $85..88 += $89..92 @@ -526,10 +499,10 @@ mask_off_return_mask RetMask &= ~(CondMask & LoopMask & RetMask) load_condition_mask CondMask = $85 copy_slot_unmasked $85 = scalar swizzle_4 $85..88 = ($85..88).xxxx -copy_4_slots_unmasked $89..92 = z₃ +copy_4_immutables_unmasked $89..92 = i0..3 [0, 0, 0, 0] sub_4_floats $85..88 -= $89..92 copy_4_slots_masked m₃ = Mask($85..88) -copy_4_slots_unmasked $85..88 = z₃ +copy_4_immutables_unmasked $85..88 = i0..3 [0, 0, 0, 0] copy_slot_unmasked $89 = scalar swizzle_4 $89..92 = ($89..92).xxxx sub_4_floats $85..88 -= $89..92 @@ -556,7 +529,7 @@ copy_4_slots_masked mm₃ = Mask($85..88) splat_2_constants $85..86 = 0 swizzle_4 $85..88 = ($85..88).yxxy copy_4_slots_masked mm₃ = Mask($85..88) -copy_4_slots_unmasked $89..92 = z₃ +copy_4_immutables_unmasked $89..92 = i0..3 [0, 0, 0, 0] cmpeq_4_floats $85..88 = equal($85..88, $89..92) bitwise_and_2_ints $85..86 &= $87..88 bitwise_and_int $85 &= $86 @@ -614,9 +587,9 @@ copy_slot_unmasked $54 = scalar₁ swizzle_4 $54..57 = ($54..57).xxxx copy_4_slots_unmasked $58..61 = $54..57 copy_slot_unmasked $62 = $61 -copy_4_slots_unmasked $63..66 = s₁(0..3) -copy_4_slots_unmasked $67..70 = s₁(4..7) -copy_slot_unmasked $71 = s₁(8) +copy_4_immutables_unmasked $63..66 = i33..36 [0x3F800000 (1.0), 0x3F800000 (1.0), 0x3F800000 (1.0), 0x3F800000 (1.0)] +copy_4_immutables_unmasked $67..70 = i37..40 [0x3F800000 (1.0), 0x3F800000 (1.0), 0x3F800000 (1.0), 0x3F800000 (1.0)] +copy_immutable_unmasked $71 = i41 [0x3F800000 (1.0)] div_n_floats $54..62 /= $63..71 copy_4_slots_masked m₄(0..3) = Mask($54..57) copy_4_slots_masked m₄(4..7) = Mask($58..61) @@ -642,16 +615,16 @@ copy_slot_unmasked $54 = scalar₁ swizzle_4 $54..57 = ($54..57).xxxx copy_4_slots_unmasked $58..61 = $54..57 copy_slot_unmasked $62 = $61 -copy_4_slots_unmasked $63..66 = z₄(0..3) -copy_4_slots_unmasked $67..70 = z₄(4..7) -copy_slot_unmasked $71 = z₄(8) +copy_4_immutables_unmasked $63..66 = i0..3 [0, 0, 0, 0] +copy_4_immutables_unmasked $67..70 = i4..7 [0, 0, 0, 0] +copy_immutable_unmasked $71 = i8 [0] add_n_floats $54..62 += $63..71 copy_4_slots_masked m₄(0..3) = Mask($54..57) copy_4_slots_masked m₄(4..7) = Mask($58..61) copy_slot_masked m₄(8) = Mask($62) -copy_4_slots_unmasked $54..57 = z₄(0..3) -copy_4_slots_unmasked $58..61 = z₄(4..7) -copy_slot_unmasked $62 = z₄(8) +copy_4_immutables_unmasked $54..57 = i0..3 [0, 0, 0, 0] +copy_4_immutables_unmasked $58..61 = i4..7 [0, 0, 0, 0] +copy_immutable_unmasked $62 = i8 [0] copy_slot_unmasked $63 = scalar₁ swizzle_4 $63..66 = ($63..66).xxxx copy_4_slots_unmasked $67..70 = $63..66 @@ -681,16 +654,16 @@ copy_slot_unmasked $54 = scalar₁ swizzle_4 $54..57 = ($54..57).xxxx copy_4_slots_unmasked $58..61 = $54..57 copy_slot_unmasked $62 = $61 -copy_4_slots_unmasked $63..66 = z₄(0..3) -copy_4_slots_unmasked $67..70 = z₄(4..7) -copy_slot_unmasked $71 = z₄(8) +copy_4_immutables_unmasked $63..66 = i0..3 [0, 0, 0, 0] +copy_4_immutables_unmasked $67..70 = i4..7 [0, 0, 0, 0] +copy_immutable_unmasked $71 = i8 [0] sub_n_floats $54..62 -= $63..71 copy_4_slots_masked m₄(0..3) = Mask($54..57) copy_4_slots_masked m₄(4..7) = Mask($58..61) copy_slot_masked m₄(8) = Mask($62) -copy_4_slots_unmasked $54..57 = z₄(0..3) -copy_4_slots_unmasked $58..61 = z₄(4..7) -copy_slot_unmasked $62 = z₄(8) +copy_4_immutables_unmasked $54..57 = i0..3 [0, 0, 0, 0] +copy_4_immutables_unmasked $58..61 = i4..7 [0, 0, 0, 0] +copy_immutable_unmasked $62 = i8 [0] copy_slot_unmasked $63 = scalar₁ swizzle_4 $63..66 = ($63..66).xxxx copy_4_slots_unmasked $67..70 = $63..66 @@ -730,9 +703,9 @@ shuffle $54..62 = ($54..62)[1 0 0 0 1 0 0 0 1] copy_4_slots_masked mm₄(0..3) = Mask($54..57) copy_4_slots_masked mm₄(4..7) = Mask($58..61) copy_slot_masked mm₄(8) = Mask($62) -copy_4_slots_unmasked $63..66 = z₄(0..3) -copy_4_slots_unmasked $67..70 = z₄(4..7) -copy_slot_unmasked $71 = z₄(8) +copy_4_immutables_unmasked $63..66 = i0..3 [0, 0, 0, 0] +copy_4_immutables_unmasked $67..70 = i4..7 [0, 0, 0, 0] +copy_immutable_unmasked $71 = i8 [0] cmpeq_n_floats $54..62 = equal($54..62, $63..71) bitwise_and_4_ints $55..58 &= $59..62 bitwise_and_2_ints $55..56 &= $57..58 @@ -799,10 +772,10 @@ swizzle_4 $2..5 = ($2..5).xxxx copy_4_slots_unmasked $6..9 = $2..5 copy_4_slots_unmasked $10..13 = $6..9 copy_4_slots_unmasked $14..17 = $10..13 -copy_4_slots_unmasked $18..21 = s₂(0..3) -copy_4_slots_unmasked $22..25 = s₂(4..7) -copy_4_slots_unmasked $26..29 = s₂(8..11) -copy_4_slots_unmasked $30..33 = s₂(12..15) +copy_4_immutables_unmasked $18..21 = i42..45 [0x3F800000 (1.0), 0x3F800000 (1.0), 0x3F800000 (1.0), 0x3F800000 (1.0)] +copy_4_immutables_unmasked $22..25 = i46..49 [0x3F800000 (1.0), 0x3F800000 (1.0), 0x3F800000 (1.0), 0x3F800000 (1.0)] +copy_4_immutables_unmasked $26..29 = i50..53 [0x3F800000 (1.0), 0x3F800000 (1.0), 0x3F800000 (1.0), 0x3F800000 (1.0)] +copy_4_immutables_unmasked $30..33 = i54..57 [0x3F800000 (1.0), 0x3F800000 (1.0), 0x3F800000 (1.0), 0x3F800000 (1.0)] div_n_floats $2..17 /= $18..33 copy_4_slots_masked m₅(0..3) = Mask($2..5) copy_4_slots_masked m₅(4..7) = Mask($6..9) @@ -833,19 +806,19 @@ swizzle_4 $2..5 = ($2..5).xxxx copy_4_slots_unmasked $6..9 = $2..5 copy_4_slots_unmasked $10..13 = $6..9 copy_4_slots_unmasked $14..17 = $10..13 -copy_4_slots_unmasked $18..21 = z₅(0..3) -copy_4_slots_unmasked $22..25 = z₅(4..7) -copy_4_slots_unmasked $26..29 = z₅(8..11) -copy_4_slots_unmasked $30..33 = z₅(12..15) +copy_4_immutables_unmasked $18..21 = i0..3 [0, 0, 0, 0] +copy_4_immutables_unmasked $22..25 = i4..7 [0, 0, 0, 0] +copy_4_immutables_unmasked $26..29 = i8..11 [0, 0, 0, 0] +copy_4_immutables_unmasked $30..33 = i12..15 [0, 0, 0, 0] add_n_floats $2..17 += $18..33 copy_4_slots_masked m₅(0..3) = Mask($2..5) copy_4_slots_masked m₅(4..7) = Mask($6..9) copy_4_slots_masked m₅(8..11) = Mask($10..13) copy_4_slots_masked m₅(12..15) = Mask($14..17) -copy_4_slots_unmasked $2..5 = z₅(0..3) -copy_4_slots_unmasked $6..9 = z₅(4..7) -copy_4_slots_unmasked $10..13 = z₅(8..11) -copy_4_slots_unmasked $14..17 = z₅(12..15) +copy_4_immutables_unmasked $2..5 = i0..3 [0, 0, 0, 0] +copy_4_immutables_unmasked $6..9 = i4..7 [0, 0, 0, 0] +copy_4_immutables_unmasked $10..13 = i8..11 [0, 0, 0, 0] +copy_4_immutables_unmasked $14..17 = i12..15 [0, 0, 0, 0] copy_slot_unmasked $18 = scalar₂ swizzle_4 $18..21 = ($18..21).xxxx copy_4_slots_unmasked $22..25 = $18..21 @@ -881,19 +854,19 @@ swizzle_4 $2..5 = ($2..5).xxxx copy_4_slots_unmasked $6..9 = $2..5 copy_4_slots_unmasked $10..13 = $6..9 copy_4_slots_unmasked $14..17 = $10..13 -copy_4_slots_unmasked $18..21 = z₅(0..3) -copy_4_slots_unmasked $22..25 = z₅(4..7) -copy_4_slots_unmasked $26..29 = z₅(8..11) -copy_4_slots_unmasked $30..33 = z₅(12..15) +copy_4_immutables_unmasked $18..21 = i0..3 [0, 0, 0, 0] +copy_4_immutables_unmasked $22..25 = i4..7 [0, 0, 0, 0] +copy_4_immutables_unmasked $26..29 = i8..11 [0, 0, 0, 0] +copy_4_immutables_unmasked $30..33 = i12..15 [0, 0, 0, 0] sub_n_floats $2..17 -= $18..33 copy_4_slots_masked m₅(0..3) = Mask($2..5) copy_4_slots_masked m₅(4..7) = Mask($6..9) copy_4_slots_masked m₅(8..11) = Mask($10..13) copy_4_slots_masked m₅(12..15) = Mask($14..17) -copy_4_slots_unmasked $2..5 = z₅(0..3) -copy_4_slots_unmasked $6..9 = z₅(4..7) -copy_4_slots_unmasked $10..13 = z₅(8..11) -copy_4_slots_unmasked $14..17 = z₅(12..15) +copy_4_immutables_unmasked $2..5 = i0..3 [0, 0, 0, 0] +copy_4_immutables_unmasked $6..9 = i4..7 [0, 0, 0, 0] +copy_4_immutables_unmasked $10..13 = i8..11 [0, 0, 0, 0] +copy_4_immutables_unmasked $14..17 = i12..15 [0, 0, 0, 0] copy_slot_unmasked $18 = scalar₂ swizzle_4 $18..21 = ($18..21).xxxx copy_4_slots_unmasked $22..25 = $18..21 @@ -941,10 +914,10 @@ copy_4_slots_masked mm₅(0..3) = Mask($2..5) copy_4_slots_masked mm₅(4..7) = Mask($6..9) copy_4_slots_masked mm₅(8..11) = Mask($10..13) copy_4_slots_masked mm₅(12..15) = Mask($14..17) -copy_4_slots_unmasked $18..21 = z₅(0..3) -copy_4_slots_unmasked $22..25 = z₅(4..7) -copy_4_slots_unmasked $26..29 = z₅(8..11) -copy_4_slots_unmasked $30..33 = z₅(12..15) +copy_4_immutables_unmasked $18..21 = i0..3 [0, 0, 0, 0] +copy_4_immutables_unmasked $22..25 = i4..7 [0, 0, 0, 0] +copy_4_immutables_unmasked $26..29 = i8..11 [0, 0, 0, 0] +copy_4_immutables_unmasked $30..33 = i12..15 [0, 0, 0, 0] cmpeq_n_floats $2..17 = equal($2..17, $18..33) bitwise_and_4_ints $10..13 &= $14..17 bitwise_and_4_ints $6..9 &= $10..13 diff --git a/tests/sksl/folding/MatrixVectorNoOpFolding.skrp b/tests/sksl/folding/MatrixVectorNoOpFolding.skrp index 25551f97ed7b..81dc13c82113 100644 --- a/tests/sksl/folding/MatrixVectorNoOpFolding.skrp +++ b/tests/sksl/folding/MatrixVectorNoOpFolding.skrp @@ -1,31 +1,61 @@ +450 instructions + [immutable slots] -n(0) = 0xBF800000 (-1.0) -n(1) = 0xBF800000 (-1.0) -i(0) = 0x3F800000 (1.0) -i(1) = 0x3F800000 (1.0) -z(0) = 0 -z(1) = 0 -n₁(0) = 0xBF800000 (-1.0) -n₁(1) = 0xBF800000 (-1.0) -n₁(2) = 0xBF800000 (-1.0) -i₁(0) = 0x3F800000 (1.0) -i₁(1) = 0x3F800000 (1.0) -i₁(2) = 0x3F800000 (1.0) -z₁(0) = 0 -z₁(1) = 0 -z₁(2) = 0 -n₂(0) = 0xBF800000 (-1.0) -n₂(1) = 0xBF800000 (-1.0) -n₂(2) = 0xBF800000 (-1.0) -n₂(3) = 0xBF800000 (-1.0) -i₂(0) = 0x3F800000 (1.0) -i₂(1) = 0x3F800000 (1.0) -i₂(2) = 0x3F800000 (1.0) -i₂(3) = 0x3F800000 (1.0) -z₂(0) = 0 -z₂(1) = 0 -z₂(2) = 0 -z₂(3) = 0 +i0 = 0xBF800000 (-1.0) +i1 = 0xBF800000 (-1.0) +i2 = 0x3F800000 (1.0) +i3 = 0x3F800000 (1.0) +i4 = 0 +i5 = 0 +i6 = 0x40400000 (3.0) +i7 = 0x40E00000 (7.0) +i8 = 0x40800000 (4.0) +i9 = 0x40C00000 (6.0) +i10 = 0xC0400000 (-3.0) +i11 = 0xC0E00000 (-7.0) +i12 = 0xC0800000 (-4.0) +i13 = 0xC0C00000 (-6.0) +i14 = 0xBF800000 (-1.0) +i15 = 0xBF800000 (-1.0) +i16 = 0xBF800000 (-1.0) +i17 = 0x3F800000 (1.0) +i18 = 0x3F800000 (1.0) +i19 = 0x3F800000 (1.0) +i20 = 0 +i21 = 0 +i22 = 0 +i23 = 0x40C00000 (6.0) +i24 = 0x41700000 (15.0) +i25 = 0x41C00000 (24.0) +i26 = 0x41400000 (12.0) +i27 = 0x41700000 (15.0) +i28 = 0x41900000 (18.0) +i29 = 0xC0C00000 (-6.0) +i30 = 0xC1700000 (-15.0) +i31 = 0xC1C00000 (-24.0) +i32 = 0xC1400000 (-12.0) +i33 = 0xC1700000 (-15.0) +i34 = 0xC1900000 (-18.0) +i35 = 0xBF800000 (-1.0) +i36 = 0xBF800000 (-1.0) +i37 = 0xBF800000 (-1.0) +i38 = 0xBF800000 (-1.0) +i39 = 0x3F800000 (1.0) +i40 = 0x3F800000 (1.0) +i41 = 0x3F800000 (1.0) +i42 = 0x3F800000 (1.0) +i43 = 0 +i44 = 0 +i45 = 0 +i46 = 0 +i47 = 0x40800000 (4.0) +i48 = 0x41000000 (8.0) +i49 = 0x41400000 (12.0) +i50 = 0x41800000 (16.0) +i51 = 0xC0800000 (-4.0) +i52 = 0xC1000000 (-8.0) +i53 = 0xC1400000 (-12.0) +i54 = 0xC1800000 (-16.0) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -230,7 +260,7 @@ label label 0x00000004 load_condition_mask CondMask = $71 copy_constant $45 = 0 merge_condition_mask CondMask = $55 & $56 -branch_if_no_lanes_active branch_if_no_lanes_active +73 (label 3 at #277) +branch_if_no_lanes_active branch_if_no_lanes_active +69 (label 3 at #273) store_return_mask $46 = RetMask splat_4_constants v₃, vv₃ = 0 splat_2_constants $47..48 = 0 @@ -251,8 +281,7 @@ matrix_multiply_2 mat2x1($47..48) = mat2x1($49..50) * mat2x2($51..5 copy_2_slots_masked v₃ = Mask($47..48) store_condition_mask $47 = CondMask copy_2_slots_unmasked $48..49 = v₃ -copy_constant $50 = 0x40400000 (3.0) -copy_constant $51 = 0x40E00000 (7.0) +copy_2_immutables_unmasked $50..51 = i6..7 [0x40400000 (3.0), 0x40E00000 (7.0)] cmpne_2_floats $48..49 = notEqual($48..49, $50..51) bitwise_or_int $48 |= $49 merge_condition_mask CondMask = $47 & $48 @@ -266,8 +295,7 @@ matrix_multiply_2 mat1x2($47..48) = mat2x2($49..52) * mat1x2($53..5 copy_2_slots_masked v₃ = Mask($47..48) store_condition_mask $47 = CondMask copy_2_slots_unmasked $48..49 = v₃ -copy_constant $50 = 0x40800000 (4.0) -copy_constant $51 = 0x40C00000 (6.0) +copy_2_immutables_unmasked $50..51 = i8..9 [0x40800000 (4.0), 0x40C00000 (6.0)] cmpne_2_floats $48..49 = notEqual($48..49, $50..51) bitwise_or_int $48 |= $49 merge_condition_mask CondMask = $47 & $48 @@ -281,8 +309,7 @@ matrix_multiply_2 mat2x1($47..48) = mat2x1($49..50) * mat2x2($51..5 copy_2_slots_masked v₃ = Mask($47..48) store_condition_mask $47 = CondMask copy_2_slots_unmasked $48..49 = v₃ -copy_constant $50 = 0xC0400000 (-3.0) -copy_constant $51 = 0xC0E00000 (-7.0) +copy_2_immutables_unmasked $50..51 = i10..11 [0xC0400000 (-3.0), 0xC0E00000 (-7.0)] cmpne_2_floats $48..49 = notEqual($48..49, $50..51) bitwise_or_int $48 |= $49 merge_condition_mask CondMask = $47 & $48 @@ -294,8 +321,7 @@ copy_4_uniforms $49..52 = testMatrix2x2 splat_2_constants $53..54 = 0xBF800000 (-1.0) matrix_multiply_2 mat1x2($47..48) = mat2x2($49..52) * mat1x2($53..54) copy_2_slots_masked v₃ = Mask($47..48) -copy_constant $49 = 0xC0800000 (-4.0) -copy_constant $50 = 0xC0C00000 (-6.0) +copy_2_immutables_unmasked $49..50 = i12..13 [0xC0800000 (-4.0), 0xC0C00000 (-6.0)] cmpeq_2_floats $47..48 = equal($47..48, $49..50) bitwise_and_int $47 &= $48 copy_slot_masked [test_no_op_vec2_X_mat2].result = Mask($47) @@ -307,7 +333,7 @@ label label 0x00000003 load_condition_mask CondMask = $55 copy_constant $27 = 0 merge_condition_mask CondMask = $44 & $45 -branch_if_no_lanes_active branch_if_no_lanes_active +91 (label 2 at #372) +branch_if_no_lanes_active branch_if_no_lanes_active +83 (label 2 at #360) store_return_mask $28 = RetMask splat_4_constants v₄, vv₄(0) = 0 splat_2_constants vv₄(1..2) = 0 @@ -332,9 +358,7 @@ matrix_multiply_3 mat3x1($29..31) = mat3x1($32..34) * mat3x3($35..4 copy_3_slots_masked v₄ = Mask($29..31) store_condition_mask $29 = CondMask copy_3_slots_unmasked $30..32 = v₄ -copy_constant $33 = 0x40C00000 (6.0) -copy_constant $34 = 0x41700000 (15.0) -copy_constant $35 = 0x41C00000 (24.0) +copy_3_immutables_unmasked $33..35 = i23..25 [0x40C00000 (6.0), 0x41700000 (15.0), 0x41C00000 (24.0)] cmpne_3_floats $30..32 = notEqual($30..32, $33..35) bitwise_or_int $31 |= $32 bitwise_or_int $30 |= $31 @@ -351,9 +375,7 @@ matrix_multiply_3 mat1x3($29..31) = mat3x3($32..40) * mat1x3($41..4 copy_3_slots_masked v₄ = Mask($29..31) store_condition_mask $29 = CondMask copy_3_slots_unmasked $30..32 = v₄ -copy_constant $33 = 0x41400000 (12.0) -copy_constant $34 = 0x41700000 (15.0) -copy_constant $35 = 0x41900000 (18.0) +copy_3_immutables_unmasked $33..35 = i26..28 [0x41400000 (12.0), 0x41700000 (15.0), 0x41900000 (18.0)] cmpne_3_floats $30..32 = notEqual($30..32, $33..35) bitwise_or_int $31 |= $32 bitwise_or_int $30 |= $31 @@ -370,9 +392,7 @@ matrix_multiply_3 mat3x1($29..31) = mat3x1($32..34) * mat3x3($35..4 copy_3_slots_masked v₄ = Mask($29..31) store_condition_mask $29 = CondMask copy_3_slots_unmasked $30..32 = v₄ -copy_constant $33 = 0xC0C00000 (-6.0) -copy_constant $34 = 0xC1700000 (-15.0) -copy_constant $35 = 0xC1C00000 (-24.0) +copy_3_immutables_unmasked $33..35 = i29..31 [0xC0C00000 (-6.0), 0xC1700000 (-15.0), 0xC1C00000 (-24.0)] cmpne_3_floats $30..32 = notEqual($30..32, $33..35) bitwise_or_int $31 |= $32 bitwise_or_int $30 |= $31 @@ -387,9 +407,7 @@ copy_uniform $40 = testMatrix3x3(8) splat_3_constants $41..43 = 0xBF800000 (-1.0) matrix_multiply_3 mat1x3($29..31) = mat3x3($32..40) * mat1x3($41..43) copy_3_slots_masked v₄ = Mask($29..31) -copy_constant $32 = 0xC1400000 (-12.0) -copy_constant $33 = 0xC1700000 (-15.0) -copy_constant $34 = 0xC1900000 (-18.0) +copy_3_immutables_unmasked $32..34 = i32..34 [0xC1400000 (-12.0), 0xC1700000 (-15.0), 0xC1900000 (-18.0)] cmpeq_3_floats $29..31 = equal($29..31, $32..34) bitwise_and_int $30 &= $31 bitwise_and_int $29 &= $30 @@ -402,7 +420,7 @@ label label 0x00000002 load_condition_mask CondMask = $44 copy_constant $0 = 0 merge_condition_mask CondMask = $26 & $27 -branch_if_no_lanes_active branch_if_no_lanes_active +97 (label 1 at #473) +branch_if_no_lanes_active branch_if_no_lanes_active +91 (label 1 at #455) store_return_mask $1 = RetMask copy_4_uniforms testMatrix4x4(0..3) = testMatrix2x2 copy_4_uniforms testMatrix4x4(4..7) = testMatrix2x2 @@ -450,10 +468,7 @@ matrix_multiply_4 mat1x4($2..5) = mat4x4($6..21) * mat1x4($22..25) copy_4_slots_masked v₅ = Mask($2..5) store_condition_mask $2 = CondMask copy_4_slots_unmasked $3..6 = v₅ -copy_constant $7 = 0x40800000 (4.0) -copy_constant $8 = 0x41000000 (8.0) -copy_constant $9 = 0x41400000 (12.0) -copy_constant $10 = 0x41800000 (16.0) +copy_4_immutables_unmasked $7..10 = i47..50 [0x40800000 (4.0), 0x41000000 (8.0), 0x41400000 (12.0), 0x41800000 (16.0)] cmpne_4_floats $3..6 = notEqual($3..6, $7..10) bitwise_or_2_ints $3..4 |= $5..6 bitwise_or_int $3 |= $4 @@ -487,10 +502,7 @@ copy_4_slots_unmasked $18..21 = testMatrix4x4(12..15) splat_4_constants $22..25 = 0xBF800000 (-1.0) matrix_multiply_4 mat1x4($2..5) = mat4x4($6..21) * mat1x4($22..25) copy_4_slots_masked v₅ = Mask($2..5) -copy_constant $6 = 0xC0800000 (-4.0) -copy_constant $7 = 0xC1000000 (-8.0) -copy_constant $8 = 0xC1400000 (-12.0) -copy_constant $9 = 0xC1800000 (-16.0) +copy_4_immutables_unmasked $6..9 = i51..54 [0xC0800000 (-4.0), 0xC1000000 (-8.0), 0xC1400000 (-12.0), 0xC1800000 (-16.0)] cmpeq_4_floats $2..5 = equal($2..5, $6..9) bitwise_and_2_ints $2..3 &= $4..5 bitwise_and_int $2 &= $3 diff --git a/tests/sksl/folding/Negation.skrp b/tests/sksl/folding/Negation.skrp index 4d9159a668f1..778c86f02559 100644 --- a/tests/sksl/folding/Negation.skrp +++ b/tests/sksl/folding/Negation.skrp @@ -1,27 +1,27 @@ +38 instructions + [immutable slots] -_4_ok = 0xFFFFFFFF -one = 0x00000001 (1.401298e-45) -two = 0x00000002 (2.802597e-45) -ok₁ = 0xFFFFFFFF +i0 = 0xFFFFFFFF +i1 = 0x00000001 (1.401298e-45) +i2 = 0x00000002 (2.802597e-45) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true store_condition_mask $12 = CondMask store_condition_mask $21 = CondMask -copy_slot_unmasked $22 = _4_ok +copy_constant $22 = 0xFFFFFFFF copy_constant $13 = 0 merge_condition_mask CondMask = $21 & $22 -branch_if_no_lanes_active branch_if_no_lanes_active +21 (label 2 at #29) +branch_if_no_lanes_active branch_if_no_lanes_active +20 (label 2 at #28) copy_constant ok = 0xFFFFFFFF copy_slot_unmasked $14 = ok -copy_slot_unmasked $15 = one +copy_constant $15 = 0x00000001 (1.401298e-45) mul_imm_int $15 *= 0xFFFFFFFF -copy_slot_unmasked $16 = one -copy_slot_unmasked $17 = one -add_int $16 += $17 +copy_constant $16 = 0x00000001 (1.401298e-45) +add_imm_int $16 += 0x00000001 splat_2_constants $17..18 = 0xFFFFFFFF mul_2_ints $15..16 *= $17..18 -copy_slot_unmasked $17 = one +copy_constant $17 = 0x00000001 (1.401298e-45) add_imm_int $17 += 0xFFFFFFFE copy_constant $18 = 0x00000002 (2.802597e-45) splat_2_constants $19..20 = 0xFFFFFFFF @@ -36,8 +36,8 @@ label label 0x00000002 load_condition_mask CondMask = $21 copy_constant $0 = 0 merge_condition_mask CondMask = $12 & $13 -branch_if_no_lanes_active branch_if_no_lanes_active +4 (label 1 at #37) -copy_slot_unmasked $1 = ok₁ +branch_if_no_lanes_active branch_if_no_lanes_active +4 (label 1 at #36) +copy_constant $1 = 0xFFFFFFFF label label 0x00000004 copy_slot_masked $0 = Mask($1) label label 0x00000001 diff --git a/tests/sksl/folding/PreserveSideEffects.skrp b/tests/sksl/folding/PreserveSideEffects.skrp index 52e054604742..db2b86d6e47b 100644 --- a/tests/sksl/folding/PreserveSideEffects.skrp +++ b/tests/sksl/folding/PreserveSideEffects.skrp @@ -1,3 +1,21 @@ +397 instructions + +[immutable slots] +i0 = 0x3F800000 (1.0) +i1 = 0 +i2 = 0x3F800000 (1.0) +i3 = 0 +i4 = 0 +i5 = 0x3F800000 (1.0) +i6 = 0x40000000 (2.0) +i7 = 0x40400000 (3.0) +i8 = 0x40800000 (4.0) +i9 = 0x40800000 (4.0) +i10 = 0x40A00000 (5.0) +i11 = 0x40C00000 (6.0) +i12 = 0x41500000 (13.0) +i13 = 0x41600000 (14.0) + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_constant _0_ok = 0xFFFFFFFF @@ -35,15 +53,14 @@ store_condition_mask $12 = CondMask copy_slot_unmasked $13 = _0_ok copy_constant $0 = 0 merge_condition_mask CondMask = $12 & $13 -branch_if_no_lanes_active branch_if_no_lanes_active +12 (label 2 at #50) +branch_if_no_lanes_active branch_if_no_lanes_active +11 (label 2 at #49) copy_slot_unmasked $1 = _1_num add_imm_float $1 += 0x3F800000 (1.0) copy_slot_masked _1_num = Mask($1) copy_constant $2 = 0x3F800000 (1.0) copy_constant $3 = 0 swizzle_2 $1..2 = ($1..3).yz -copy_constant $3 = 0x3F800000 (1.0) -copy_constant $4 = 0 +copy_2_immutables_unmasked $3..4 = i0..1 [0x3F800000 (1.0), 0] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 copy_slot_masked $0 = Mask($1) @@ -54,14 +71,13 @@ store_condition_mask $12 = CondMask copy_slot_unmasked $13 = _0_ok copy_constant $0 = 0 merge_condition_mask CondMask = $12 & $13 -branch_if_no_lanes_active branch_if_no_lanes_active +11 (label 3 at #68) +branch_if_no_lanes_active branch_if_no_lanes_active +10 (label 3 at #66) copy_constant $1 = 0x3F800000 (1.0) copy_constant $2 = 0 copy_slot_unmasked $3 = _1_num add_imm_float $3 += 0x3F800000 (1.0) copy_slot_masked _1_num = Mask($3) -copy_constant $3 = 0x3F800000 (1.0) -copy_constant $4 = 0 +copy_2_immutables_unmasked $3..4 = i0..1 [0x3F800000 (1.0), 0] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 copy_slot_masked $0 = Mask($1) @@ -72,15 +88,14 @@ store_condition_mask $12 = CondMask copy_slot_unmasked $13 = _0_ok copy_constant $0 = 0 merge_condition_mask CondMask = $12 & $13 -branch_if_no_lanes_active branch_if_no_lanes_active +12 (label 4 at #87) +branch_if_no_lanes_active branch_if_no_lanes_active +11 (label 4 at #84) copy_slot_unmasked $1 = _1_num add_imm_float $1 += 0x3F800000 (1.0) copy_slot_masked _1_num = Mask($1) copy_constant $2 = 0x3F800000 (1.0) copy_constant $3 = 0 swizzle_2 $1..2 = ($1..3).yz -copy_constant $3 = 0x3F800000 (1.0) -copy_constant $4 = 0 +copy_2_immutables_unmasked $3..4 = i0..1 [0x3F800000 (1.0), 0] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 copy_slot_masked $0 = Mask($1) @@ -91,15 +106,14 @@ store_condition_mask $12 = CondMask copy_slot_unmasked $13 = _0_ok copy_constant $0 = 0 merge_condition_mask CondMask = $12 & $13 -branch_if_no_lanes_active branch_if_no_lanes_active +13 (label 5 at #107) +branch_if_no_lanes_active branch_if_no_lanes_active +12 (label 5 at #103) copy_slot_unmasked $1 = _1_num add_imm_float $1 += 0x3F800000 (1.0) copy_slot_masked _1_num = Mask($1) copy_constant $2 = 0x3F800000 (1.0) splat_2_constants $3..4 = 0 swizzle_3 $1..3 = ($1..4).yzw -copy_constant $4 = 0x3F800000 (1.0) -splat_2_constants $5..6 = 0 +copy_3_immutables_unmasked $4..6 = i2..4 [0x3F800000 (1.0), 0, 0] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 @@ -111,7 +125,7 @@ store_condition_mask $12 = CondMask copy_slot_unmasked $13 = _0_ok copy_constant $0 = 0 merge_condition_mask CondMask = $12 & $13 -branch_if_no_lanes_active branch_if_no_lanes_active +7 (label 6 at #121) +branch_if_no_lanes_active branch_if_no_lanes_active +7 (label 6 at #117) copy_constant $1 = 0x3F800000 (1.0) copy_slot_unmasked $2 = _1_num add_imm_float $2 += 0x3F800000 (1.0) @@ -125,7 +139,7 @@ store_condition_mask $12 = CondMask copy_slot_unmasked $13 = _0_ok copy_constant $0 = 0 merge_condition_mask CondMask = $12 & $13 -branch_if_no_lanes_active branch_if_no_lanes_active +10 (label 7 at #138) +branch_if_no_lanes_active branch_if_no_lanes_active +10 (label 7 at #134) copy_constant $1 = 0x3F800000 (1.0) copy_constant $2 = 0 copy_slot_unmasked $3 = _1_num @@ -142,16 +156,14 @@ store_condition_mask $12 = CondMask copy_slot_unmasked $13 = _0_ok copy_constant $0 = 0 merge_condition_mask CondMask = $12 & $13 -branch_if_no_lanes_active branch_if_no_lanes_active +14 (label 8 at #159) +branch_if_no_lanes_active branch_if_no_lanes_active +12 (label 8 at #153) copy_constant $1 = 0x3F800000 (1.0) copy_constant $2 = 0 copy_constant $3 = 0x3F800000 (1.0) copy_slot_unmasked $4 = _1_num add_imm_float $4 += 0x3F800000 (1.0) copy_slot_masked _1_num = Mask($4) -copy_constant $4 = 0x3F800000 (1.0) -copy_constant $5 = 0 -copy_constant $6 = 0x3F800000 (1.0) +copy_3_immutables_unmasked $4..6 = i0..2 [0x3F800000 (1.0), 0, 0x3F800000 (1.0)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 @@ -165,14 +177,14 @@ cmpeq_imm_float $14 = equal($14, 0x41100000 (9.0)) bitwise_and_int $13 &= $14 copy_constant $0 = 0 merge_condition_mask CondMask = $12 & $13 -branch_if_no_lanes_active branch_if_no_lanes_active +258 (label 10 at #426) +branch_if_no_lanes_active branch_if_no_lanes_active +251 (label 10 at #413) copy_constant ok = 0xFFFFFFFF copy_constant num = 0 store_condition_mask $15 = CondMask copy_slot_unmasked $16 = ok copy_constant $1 = 0 merge_condition_mask CondMask = $15 & $16 -branch_if_no_lanes_active branch_if_no_lanes_active +13 (label 12 at #188) +branch_if_no_lanes_active branch_if_no_lanes_active +12 (label 12 at #181) copy_constant $17 = 0x3F800000 (1.0) copy_constant $18 = 0x40000000 (2.0) copy_constant $19 = 0x40400000 (3.0) @@ -180,8 +192,7 @@ copy_slot_unmasked $20 = num add_imm_float $20 += 0x3F800000 (1.0) copy_slot_masked num = Mask($20) copy_2_slots_unmasked $2..3 = $17..18 -copy_constant $4 = 0x3F800000 (1.0) -copy_constant $5 = 0x40000000 (2.0) +copy_2_immutables_unmasked $4..5 = i5..6 [0x3F800000 (1.0), 0x40000000 (2.0)] cmpeq_2_floats $2..3 = equal($2..3, $4..5) bitwise_and_int $2 &= $3 copy_slot_masked $1 = Mask($2) @@ -192,7 +203,7 @@ store_condition_mask $15 = CondMask copy_slot_unmasked $16 = ok copy_constant $1 = 0 merge_condition_mask CondMask = $15 & $16 -branch_if_no_lanes_active branch_if_no_lanes_active +13 (label 13 at #208) +branch_if_no_lanes_active branch_if_no_lanes_active +12 (label 13 at #200) copy_slot_unmasked $17 = num add_imm_float $17 += 0x3F800000 (1.0) copy_slot_masked num = Mask($17) @@ -200,8 +211,7 @@ copy_slot_unmasked $18 = $17 copy_constant $19 = 0x40400000 (3.0) copy_constant $20 = 0x40800000 (4.0) copy_2_slots_unmasked $2..3 = $19..20 -copy_constant $4 = 0x40400000 (3.0) -copy_constant $5 = 0x40800000 (4.0) +copy_2_immutables_unmasked $4..5 = i7..8 [0x40400000 (3.0), 0x40800000 (4.0)] cmpeq_2_floats $2..3 = equal($2..3, $4..5) bitwise_and_int $2 &= $3 copy_slot_masked $1 = Mask($2) @@ -212,7 +222,7 @@ store_condition_mask $15 = CondMask copy_slot_unmasked $16 = ok copy_constant $1 = 0 merge_condition_mask CondMask = $15 & $16 -branch_if_no_lanes_active branch_if_no_lanes_active +13 (label 14 at #228) +branch_if_no_lanes_active branch_if_no_lanes_active +13 (label 14 at #220) splat_3_constants $17..19 = 0x3F800000 (1.0) copy_slot_unmasked $20 = num add_imm_float $20 += 0x3F800000 (1.0) @@ -232,7 +242,7 @@ store_condition_mask $15 = CondMask copy_slot_unmasked $16 = ok copy_constant $1 = 0 merge_condition_mask CondMask = $15 & $16 -branch_if_no_lanes_active branch_if_no_lanes_active +13 (label 15 at #248) +branch_if_no_lanes_active branch_if_no_lanes_active +13 (label 15 at #240) splat_3_constants $17..19 = 0x3F800000 (1.0) copy_slot_unmasked $20 = num add_imm_float $20 += 0x3F800000 (1.0) @@ -252,7 +262,7 @@ store_condition_mask $15 = CondMask copy_slot_unmasked $16 = ok copy_constant $1 = 0 merge_condition_mask CondMask = $15 & $16 -branch_if_no_lanes_active branch_if_no_lanes_active +13 (label 16 at #268) +branch_if_no_lanes_active branch_if_no_lanes_active +13 (label 16 at #260) copy_slot_unmasked $17 = num add_imm_float $17 += 0x3F800000 (1.0) copy_slot_masked num = Mask($17) @@ -272,7 +282,7 @@ store_condition_mask $15 = CondMask copy_slot_unmasked $16 = ok copy_constant $1 = 0 merge_condition_mask CondMask = $15 & $16 -branch_if_no_lanes_active branch_if_no_lanes_active +20 (label 17 at #295) +branch_if_no_lanes_active branch_if_no_lanes_active +18 (label 17 at #285) copy_constant $17 = 0x3F800000 (1.0) copy_constant $18 = 0x40000000 (2.0) copy_constant $19 = 0x40400000 (3.0) @@ -285,9 +295,7 @@ copy_constant $23 = 0x40E00000 (7.0) copy_constant $24 = 0x41000000 (8.0) copy_constant $25 = 0x41100000 (9.0) copy_3_slots_unmasked $2..4 = $17..19 -copy_constant $5 = 0x3F800000 (1.0) -copy_constant $6 = 0x40000000 (2.0) -copy_constant $7 = 0x40400000 (3.0) +copy_3_immutables_unmasked $5..7 = i5..7 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0)] cmpeq_3_floats $2..4 = equal($2..4, $5..7) bitwise_and_int $3 &= $4 bitwise_and_int $2 &= $3 @@ -299,7 +307,7 @@ store_condition_mask $15 = CondMask copy_slot_unmasked $16 = ok copy_constant $1 = 0 merge_condition_mask CondMask = $15 & $16 -branch_if_no_lanes_active branch_if_no_lanes_active +21 (label 18 at #323) +branch_if_no_lanes_active branch_if_no_lanes_active +19 (label 18 at #311) copy_constant $17 = 0x3F800000 (1.0) copy_constant $18 = 0x40000000 (2.0) copy_constant $19 = 0x40400000 (3.0) @@ -313,9 +321,7 @@ copy_slot_masked num = Mask($24) copy_constant $24 = 0x41000000 (8.0) copy_constant $25 = 0x41100000 (9.0) copy_3_slots_unmasked $2..4 = $20..22 -copy_constant $5 = 0x40800000 (4.0) -copy_constant $6 = 0x40A00000 (5.0) -copy_constant $7 = 0x40C00000 (6.0) +copy_3_immutables_unmasked $5..7 = i9..11 [0x40800000 (4.0), 0x40A00000 (5.0), 0x40C00000 (6.0)] cmpeq_3_floats $2..4 = equal($2..4, $5..7) bitwise_and_int $3 &= $4 bitwise_and_int $2 &= $3 @@ -327,7 +333,7 @@ store_condition_mask $15 = CondMask copy_slot_unmasked $16 = ok copy_constant $1 = 0 merge_condition_mask CondMask = $15 & $16 -branch_if_no_lanes_active branch_if_no_lanes_active +14 (label 19 at #344) +branch_if_no_lanes_active branch_if_no_lanes_active +14 (label 19 at #332) copy_slot_unmasked $17 = num add_imm_float $17 += 0x3F800000 (1.0) copy_slot_masked num = Mask($17) @@ -348,7 +354,7 @@ store_condition_mask $15 = CondMask copy_slot_unmasked $16 = ok copy_constant $1 = 0 merge_condition_mask CondMask = $15 & $16 -branch_if_no_lanes_active branch_if_no_lanes_active +14 (label 20 at #365) +branch_if_no_lanes_active branch_if_no_lanes_active +14 (label 20 at #353) splat_4_constants $17..20 = 0x3F800000 (1.0) copy_slot_unmasked $21 = num add_imm_float $21 += 0x3F800000 (1.0) @@ -369,7 +375,7 @@ store_condition_mask $15 = CondMask copy_slot_unmasked $16 = ok copy_constant $1 = 0 merge_condition_mask CondMask = $15 & $16 -branch_if_no_lanes_active branch_if_no_lanes_active +14 (label 21 at #386) +branch_if_no_lanes_active branch_if_no_lanes_active +14 (label 21 at #374) splat_4_constants $17..20 = 0x3F800000 (1.0) splat_4_constants $21..24 = 0x3F800000 (1.0) copy_slot_unmasked $25 = num @@ -390,7 +396,7 @@ store_condition_mask $15 = CondMask copy_slot_unmasked $16 = ok copy_constant $1 = 0 merge_condition_mask CondMask = $15 & $16 -branch_if_no_lanes_active branch_if_no_lanes_active +25 (label 22 at #418) +branch_if_no_lanes_active branch_if_no_lanes_active +24 (label 22 at #405) copy_constant $17 = 0x3F800000 (1.0) copy_constant $18 = 0x40000000 (2.0) copy_constant $19 = 0x40400000 (3.0) @@ -410,8 +416,7 @@ add_imm_float $31 += 0x3F800000 (1.0) copy_slot_masked num = Mask($31) copy_constant $32 = 0x41800000 (16.0) copy_4_slots_unmasked $2..5 = $29..32 -copy_constant $4 = 0x41500000 (13.0) -copy_constant $5 = 0x41600000 (14.0) +copy_2_immutables_unmasked $4..5 = i12..13 [0x41500000 (13.0), 0x41600000 (14.0)] cmpeq_2_floats $2..3 = equal($2..3, $4..5) bitwise_and_int $2 &= $3 copy_slot_masked $1 = Mask($2) diff --git a/tests/sksl/folding/SelfAssignment.skrp b/tests/sksl/folding/SelfAssignment.skrp index 679209f84f2f..89578dc4333d 100644 --- a/tests/sksl/folding/SelfAssignment.skrp +++ b/tests/sksl/folding/SelfAssignment.skrp @@ -1,9 +1,14 @@ +21 instructions + +[immutable slots] +i0 = 0x40400000 (3.0) +i1 = 0x40000000 (2.0) +i2 = 0x3F800000 (1.0) +i3 = 0 + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true -copy_constant x(0) = 0x40400000 (3.0) -copy_constant x(1) = 0x40000000 (2.0) -copy_constant x(2) = 0x3F800000 (1.0) -copy_constant x(3) = 0 +copy_4_immutables_unmasked x = i0..3 [0x40400000 (3.0), 0x40000000 (2.0), 0x3F800000 (1.0), 0] copy_4_slots_unmasked $0..3 = x swizzle_3 $0..2 = ($0..2).zyx copy_3_slots_unmasked x(0..2) = $0..2 diff --git a/tests/sksl/folding/ShortCircuitBoolFolding.skrp b/tests/sksl/folding/ShortCircuitBoolFolding.skrp index 711c72ccf6af..83c97d3a8d76 100644 --- a/tests/sksl/folding/ShortCircuitBoolFolding.skrp +++ b/tests/sksl/folding/ShortCircuitBoolFolding.skrp @@ -1,3 +1,5 @@ +238 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_constant $0 = 0 diff --git a/tests/sksl/folding/StructFieldFolding.skrp b/tests/sksl/folding/StructFieldFolding.skrp index c324e57814da..460c46c784ab 100644 --- a/tests/sksl/folding/StructFieldFolding.skrp +++ b/tests/sksl/folding/StructFieldFolding.skrp @@ -1,10 +1,11 @@ +9 instructions + [immutable slots] -_6_two = 0x00000002 (2.802597e-45) -_8_flatten1 = 0x00000002 (2.802597e-45) +i0 = 0x00000002 (2.802597e-45) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true -copy_slot_unmasked $0 = _8_flatten1 +copy_constant $0 = 0x00000002 (2.802597e-45) cmpeq_imm_int $0 = equal($0, 0x00000002) swizzle_4 $0..3 = ($0..3).xxxx copy_4_uniforms $4..7 = colorRed diff --git a/tests/sksl/folding/StructFieldNoFolding.skrp b/tests/sksl/folding/StructFieldNoFolding.skrp index 2b1e2ed201d3..c6fba1074705 100644 --- a/tests/sksl/folding/StructFieldNoFolding.skrp +++ b/tests/sksl/folding/StructFieldNoFolding.skrp @@ -1,3 +1,5 @@ +50 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_constant numSideEffects = 0 diff --git a/tests/sksl/folding/SwitchCaseFolding.skrp b/tests/sksl/folding/SwitchCaseFolding.skrp index 8487aaefa1af..b395a7e24a7a 100644 --- a/tests/sksl/folding/SwitchCaseFolding.skrp +++ b/tests/sksl/folding/SwitchCaseFolding.skrp @@ -1,3 +1,5 @@ +41 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_4_uniforms color = colorRed diff --git a/tests/sksl/folding/SwizzleFolding.skrp b/tests/sksl/folding/SwizzleFolding.skrp index ddcefb0ab353..2ac531c5a968 100644 --- a/tests/sksl/folding/SwizzleFolding.skrp +++ b/tests/sksl/folding/SwizzleFolding.skrp @@ -1,3 +1,5 @@ +16 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_constant _2_ok = 0xFFFFFFFF diff --git a/tests/sksl/folding/TernaryFolding.skrp b/tests/sksl/folding/TernaryFolding.skrp index 59f489713a5f..13d9f835a73e 100644 --- a/tests/sksl/folding/TernaryFolding.skrp +++ b/tests/sksl/folding/TernaryFolding.skrp @@ -1,5 +1,7 @@ +19 instructions + [immutable slots] -ok = 0xFFFFFFFF +i0 = 0xFFFFFFFF store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -11,7 +13,7 @@ copy_constant $0 = 0 copy_slot_unmasked param = x label label 0 copy_constant call = 0xFFFFFFFF -copy_slot_unmasked $0 = ok +copy_constant $0 = 0xFFFFFFFF copy_slot_unmasked $1 = param bitwise_and_int $0 &= $1 copy_slot_unmasked $1 = call diff --git a/tests/sksl/folding/VectorScalarFolding.skrp b/tests/sksl/folding/VectorScalarFolding.skrp index f52d63b94a0f..5e77d05d6553 100644 --- a/tests/sksl/folding/VectorScalarFolding.skrp +++ b/tests/sksl/folding/VectorScalarFolding.skrp @@ -1,36 +1,96 @@ +685 instructions + +[immutable slots] +i0 = 0x40C00000 (6.0) +i1 = 0x40C00000 (6.0) +i2 = 0x40E00000 (7.0) +i3 = 0x41000000 (8.0) +i4 = 0x40E00000 (7.0) +i5 = 0x41100000 (9.0) +i6 = 0x41100000 (9.0) +i7 = 0x41100000 (9.0) +i8 = 0x41100000 (9.0) +i9 = 0x41100000 (9.0) +i10 = 0x41200000 (10.0) +i11 = 0x41200000 (10.0) +i12 = 0x40C00000 (6.0) +i13 = 0x40C00000 (6.0) +i14 = 0x40C00000 (6.0) +i15 = 0x41200000 (10.0) +i16 = 0x40400000 (3.0) +i17 = 0x40400000 (3.0) +i18 = 0x40C00000 (6.0) +i19 = 0x41200000 (10.0) +i20 = 0xC0E00000 (-7.0) +i21 = 0xC1100000 (-9.0) +i22 = 0xC1100000 (-9.0) +i23 = 0xC1100000 (-9.0) +i24 = 0x41000000 (8.0) +i25 = 0x41000000 (8.0) +i26 = 0x40C00000 (6.0) +i27 = 0x41200000 (10.0) +i28 = 0x40000000 (2.0) +i29 = 0x3F800000 (1.0) +i30 = 0x3F000000 (0.5) +i31 = 0x3E800000 (0.25) +i32 = 0x00000006 (8.407791e-45) +i33 = 0x00000006 (8.407791e-45) +i34 = 0x00000007 (9.809089e-45) +i35 = 0x00000008 (1.121039e-44) +i36 = 0x00000007 (9.809089e-45) +i37 = 0x00000009 (1.261169e-44) +i38 = 0x00000009 (1.261169e-44) +i39 = 0x00000009 (1.261169e-44) +i40 = 0x00000009 (1.261169e-44) +i41 = 0x00000009 (1.261169e-44) +i42 = 0x0000000A (1.401298e-44) +i43 = 0x0000000A (1.401298e-44) +i44 = 0x00000006 (8.407791e-45) +i45 = 0x00000006 (8.407791e-45) +i46 = 0x00000006 (8.407791e-45) +i47 = 0x0000000A (1.401298e-44) +i48 = 0x00000003 (4.203895e-45) +i49 = 0x00000003 (4.203895e-45) +i50 = 0x00000006 (8.407791e-45) +i51 = 0x0000000A (1.401298e-44) +i52 = 0xFFFFFFF9 +i53 = 0xFFFFFFF7 +i54 = 0xFFFFFFF7 +i55 = 0xFFFFFFF7 +i56 = 0x00000008 (1.121039e-44) +i57 = 0x00000008 (1.121039e-44) +i58 = 0x00000006 (8.407791e-45) +i59 = 0x0000000A (1.401298e-44) +i60 = 0x000000C8 (2.802597e-43) +i61 = 0x00000064 (1.401298e-43) +i62 = 0x00000032 (7.006492e-44) +i63 = 0x00000019 (3.503246e-44) + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_constant _0_ok = 0xFFFFFFFF -splat_2_constants _1_x(0..1) = 0x40C00000 (6.0) -copy_constant _1_x(2) = 0x40E00000 (7.0) -copy_constant _1_x(3) = 0x41000000 (8.0) +copy_4_immutables_unmasked _1_x = i0..3 [0x40C00000 (6.0), 0x40C00000 (6.0), 0x40E00000 (7.0), 0x41000000 (8.0)] copy_4_slots_unmasked $0..3 = _0_ok, _1_x(0..2) copy_slot_unmasked $4 = _1_x(3) -splat_2_constants $5..6 = 0x40C00000 (6.0) -copy_constant $7 = 0x40E00000 (7.0) -copy_constant $8 = 0x41000000 (8.0) +copy_4_immutables_unmasked $5..8 = i0..3 [0x40C00000 (6.0), 0x40C00000 (6.0), 0x40E00000 (7.0), 0x41000000 (8.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_slot_unmasked _0_ok = $0 -copy_constant _1_x(0) = 0x40E00000 (7.0) -splat_3_constants _1_x(1..3) = 0x41100000 (9.0) +copy_4_immutables_unmasked _1_x = i4..7 [0x40E00000 (7.0), 0x41100000 (9.0), 0x41100000 (9.0), 0x41100000 (9.0)] copy_4_slots_unmasked $0..3 = _0_ok, _1_x(0..2) copy_slot_unmasked $4 = _1_x(3) -copy_constant $5 = 0x40E00000 (7.0) -splat_3_constants $6..8 = 0x41100000 (9.0) +copy_4_immutables_unmasked $5..8 = i4..7 [0x40E00000 (7.0), 0x41100000 (9.0), 0x41100000 (9.0), 0x41100000 (9.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_slot_unmasked _0_ok = $0 -splat_2_constants _1_x(0..1) = 0x41100000 (9.0) -splat_2_constants _1_x(2..3) = 0x41200000 (10.0) +copy_4_immutables_unmasked _1_x = i8..11 [0x41100000 (9.0), 0x41100000 (9.0), 0x41200000 (10.0), 0x41200000 (10.0)] copy_4_slots_unmasked $0..3 = _0_ok, _1_x(0..2) copy_slot_unmasked $4 = _1_x(3) -splat_2_constants $5..6 = 0x41100000 (9.0) -splat_2_constants $7..8 = 0x41200000 (10.0) +copy_4_immutables_unmasked $5..8 = i8..11 [0x41100000 (9.0), 0x41100000 (9.0), 0x41200000 (10.0), 0x41200000 (10.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -39,8 +99,7 @@ copy_slot_unmasked _0_ok = $0 splat_3_constants _1_x(0..2) = 0x40C00000 (6.0) copy_4_slots_unmasked $0..3 = _0_ok, _1_x(0..2) copy_slot_unmasked $4 = _1_x(3) -splat_3_constants $5..7 = 0x40C00000 (6.0) -copy_constant $8 = 0x41200000 (10.0) +copy_4_immutables_unmasked $5..8 = i12..15 [0x40C00000 (6.0), 0x40C00000 (6.0), 0x40C00000 (6.0), 0x41200000 (10.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -49,9 +108,7 @@ copy_slot_unmasked _0_ok = $0 splat_2_constants _1_x(0..1) = 0x40400000 (3.0) copy_4_slots_unmasked $0..3 = _0_ok, _1_x(0..2) copy_slot_unmasked $4 = _1_x(3) -splat_2_constants $5..6 = 0x40400000 (3.0) -copy_constant $7 = 0x40C00000 (6.0) -copy_constant $8 = 0x41200000 (10.0) +copy_4_immutables_unmasked $5..8 = i16..19 [0x40400000 (3.0), 0x40400000 (3.0), 0x40C00000 (6.0), 0x41200000 (10.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -66,36 +123,28 @@ bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_slot_unmasked _0_ok = $0 -splat_2_constants _1_x(0..1) = 0x40C00000 (6.0) -copy_constant _1_x(2) = 0x40E00000 (7.0) -copy_constant _1_x(3) = 0x41000000 (8.0) +copy_4_immutables_unmasked _1_x = i0..3 [0x40C00000 (6.0), 0x40C00000 (6.0), 0x40E00000 (7.0), 0x41000000 (8.0)] copy_4_slots_unmasked $0..3 = _0_ok, _1_x(0..2) copy_slot_unmasked $4 = _1_x(3) -splat_2_constants $5..6 = 0x40C00000 (6.0) -copy_constant $7 = 0x40E00000 (7.0) -copy_constant $8 = 0x41000000 (8.0) +copy_4_immutables_unmasked $5..8 = i0..3 [0x40C00000 (6.0), 0x40C00000 (6.0), 0x40E00000 (7.0), 0x41000000 (8.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_slot_unmasked _0_ok = $0 -copy_constant _1_x(0) = 0xC0E00000 (-7.0) -splat_3_constants _1_x(1..3) = 0xC1100000 (-9.0) +copy_4_immutables_unmasked _1_x = i20..23 [0xC0E00000 (-7.0), 0xC1100000 (-9.0), 0xC1100000 (-9.0), 0xC1100000 (-9.0)] copy_4_slots_unmasked $0..3 = _0_ok, _1_x(0..2) copy_slot_unmasked $4 = _1_x(3) -copy_constant $5 = 0xC0E00000 (-7.0) -splat_3_constants $6..8 = 0xC1100000 (-9.0) +copy_4_immutables_unmasked $5..8 = i20..23 [0xC0E00000 (-7.0), 0xC1100000 (-9.0), 0xC1100000 (-9.0), 0xC1100000 (-9.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_slot_unmasked _0_ok = $0 -splat_2_constants _1_x(0..1) = 0x41100000 (9.0) -splat_2_constants _1_x(2..3) = 0x41200000 (10.0) +copy_4_immutables_unmasked _1_x = i8..11 [0x41100000 (9.0), 0x41100000 (9.0), 0x41200000 (10.0), 0x41200000 (10.0)] copy_4_slots_unmasked $0..3 = _0_ok, _1_x(0..2) copy_slot_unmasked $4 = _1_x(3) -splat_2_constants $5..6 = 0x41100000 (9.0) -splat_2_constants $7..8 = 0x41200000 (10.0) +copy_4_immutables_unmasked $5..8 = i8..11 [0x41100000 (9.0), 0x41100000 (9.0), 0x41200000 (10.0), 0x41200000 (10.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -104,8 +153,7 @@ copy_slot_unmasked _0_ok = $0 splat_3_constants _1_x(0..2) = 0x40C00000 (6.0) copy_4_slots_unmasked $0..3 = _0_ok, _1_x(0..2) copy_slot_unmasked $4 = _1_x(3) -splat_3_constants $5..7 = 0x40C00000 (6.0) -copy_constant $8 = 0x41200000 (10.0) +copy_4_immutables_unmasked $5..8 = i12..15 [0x40C00000 (6.0), 0x40C00000 (6.0), 0x40C00000 (6.0), 0x41200000 (10.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -114,24 +162,16 @@ copy_slot_unmasked _0_ok = $0 splat_2_constants _1_x(0..1) = 0x41000000 (8.0) copy_4_slots_unmasked $0..3 = _0_ok, _1_x(0..2) copy_slot_unmasked $4 = _1_x(3) -splat_2_constants $5..6 = 0x41000000 (8.0) -copy_constant $7 = 0x40C00000 (6.0) -copy_constant $8 = 0x41200000 (10.0) +copy_4_immutables_unmasked $5..8 = i24..27 [0x41000000 (8.0), 0x41000000 (8.0), 0x40C00000 (6.0), 0x41200000 (10.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_slot_unmasked _0_ok = $0 -copy_constant _1_x(0) = 0x40000000 (2.0) -copy_constant _1_x(1) = 0x3F800000 (1.0) -copy_constant _1_x(2) = 0x3F000000 (0.5) -copy_constant _1_x(3) = 0x3E800000 (0.25) +copy_4_immutables_unmasked _1_x = i28..31 [0x40000000 (2.0), 0x3F800000 (1.0), 0x3F000000 (0.5), 0x3E800000 (0.25)] copy_4_slots_unmasked $0..3 = _0_ok, _1_x(0..2) copy_slot_unmasked $4 = _1_x(3) -copy_constant $5 = 0x40000000 (2.0) -copy_constant $6 = 0x3F800000 (1.0) -copy_constant $7 = 0x3F000000 (0.5) -copy_constant $8 = 0x3E800000 (0.25) +copy_4_immutables_unmasked $5..8 = i28..31 [0x40000000 (2.0), 0x3F800000 (1.0), 0x3F000000 (0.5), 0x3E800000 (0.25)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -359,40 +399,32 @@ store_condition_mask $12 = CondMask copy_slot_unmasked $13 = _0_ok copy_constant $0 = 0 merge_condition_mask CondMask = $12 & $13 -branch_if_no_lanes_active branch_if_no_lanes_active +375 (label 1 at #737) +branch_if_no_lanes_active branch_if_no_lanes_active +347 (label 1 at #681) copy_constant ok = 0xFFFFFFFF -splat_2_constants x(0..1) = 0x00000006 (8.407791e-45) -copy_constant x(2) = 0x00000007 (9.809089e-45) -copy_constant x(3) = 0x00000008 (1.121039e-44) +copy_4_immutables_unmasked x = i32..35 [0x00000006 (8.407791e-45), 0x00000006 (8.407791e-45), 0x00000007 (9.809089e-45), 0x00000008 (1.121039e-44)] copy_4_slots_unmasked $1..4 = ok, x(0..2) copy_slot_unmasked $5 = x(3) -splat_2_constants $6..7 = 0x00000006 (8.407791e-45) -copy_constant $8 = 0x00000007 (9.809089e-45) -copy_constant $9 = 0x00000008 (1.121039e-44) +copy_4_immutables_unmasked $6..9 = i32..35 [0x00000006 (8.407791e-45), 0x00000006 (8.407791e-45), 0x00000007 (9.809089e-45), 0x00000008 (1.121039e-44)] cmpeq_4_ints $2..5 = equal($2..5, $6..9) bitwise_and_2_ints $2..3 &= $4..5 bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 copy_slot_masked ok = Mask($1) -copy_constant $1 = 0x00000007 (9.809089e-45) -splat_3_constants $2..4 = 0x00000009 (1.261169e-44) +copy_4_immutables_unmasked $1..4 = i36..39 [0x00000007 (9.809089e-45), 0x00000009 (1.261169e-44), 0x00000009 (1.261169e-44), 0x00000009 (1.261169e-44)] copy_4_slots_masked x = Mask($1..4) copy_4_slots_unmasked $1..4 = ok, x(0..2) copy_slot_unmasked $5 = x(3) -copy_constant $6 = 0x00000007 (9.809089e-45) -splat_3_constants $7..9 = 0x00000009 (1.261169e-44) +copy_4_immutables_unmasked $6..9 = i36..39 [0x00000007 (9.809089e-45), 0x00000009 (1.261169e-44), 0x00000009 (1.261169e-44), 0x00000009 (1.261169e-44)] cmpeq_4_ints $2..5 = equal($2..5, $6..9) bitwise_and_2_ints $2..3 &= $4..5 bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 copy_slot_masked ok = Mask($1) -splat_2_constants $1..2 = 0x00000009 (1.261169e-44) -splat_2_constants $3..4 = 0x0000000A (1.401298e-44) +copy_4_immutables_unmasked $1..4 = i40..43 [0x00000009 (1.261169e-44), 0x00000009 (1.261169e-44), 0x0000000A (1.401298e-44), 0x0000000A (1.401298e-44)] copy_4_slots_masked x = Mask($1..4) copy_4_slots_unmasked $1..4 = ok, x(0..2) copy_slot_unmasked $5 = x(3) -splat_2_constants $6..7 = 0x00000009 (1.261169e-44) -splat_2_constants $8..9 = 0x0000000A (1.401298e-44) +copy_4_immutables_unmasked $6..9 = i40..43 [0x00000009 (1.261169e-44), 0x00000009 (1.261169e-44), 0x0000000A (1.401298e-44), 0x0000000A (1.401298e-44)] cmpeq_4_ints $2..5 = equal($2..5, $6..9) bitwise_and_2_ints $2..3 &= $4..5 bitwise_and_int $2 &= $3 @@ -402,8 +434,7 @@ splat_3_constants $1..3 = 0x00000006 (8.407791e-45) copy_3_slots_masked x(0..2) = Mask($1..3) copy_4_slots_unmasked $1..4 = ok, x(0..2) copy_slot_unmasked $5 = x(3) -splat_3_constants $6..8 = 0x00000006 (8.407791e-45) -copy_constant $9 = 0x0000000A (1.401298e-44) +copy_4_immutables_unmasked $6..9 = i44..47 [0x00000006 (8.407791e-45), 0x00000006 (8.407791e-45), 0x00000006 (8.407791e-45), 0x0000000A (1.401298e-44)] cmpeq_4_ints $2..5 = equal($2..5, $6..9) bitwise_and_2_ints $2..3 &= $4..5 bitwise_and_int $2 &= $3 @@ -413,9 +444,7 @@ splat_2_constants $1..2 = 0x00000003 (4.203895e-45) copy_2_slots_masked x(0..1) = Mask($1..2) copy_4_slots_unmasked $1..4 = ok, x(0..2) copy_slot_unmasked $5 = x(3) -splat_2_constants $6..7 = 0x00000003 (4.203895e-45) -copy_constant $8 = 0x00000006 (8.407791e-45) -copy_constant $9 = 0x0000000A (1.401298e-44) +copy_4_immutables_unmasked $6..9 = i48..51 [0x00000003 (4.203895e-45), 0x00000003 (4.203895e-45), 0x00000006 (8.407791e-45), 0x0000000A (1.401298e-44)] cmpeq_4_ints $2..5 = equal($2..5, $6..9) bitwise_and_2_ints $2..3 &= $4..5 bitwise_and_int $2 &= $3 @@ -431,39 +460,31 @@ bitwise_and_2_ints $2..3 &= $4..5 bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 copy_slot_masked ok = Mask($1) -splat_2_constants $1..2 = 0x00000006 (8.407791e-45) -copy_constant $3 = 0x00000007 (9.809089e-45) -copy_constant $4 = 0x00000008 (1.121039e-44) +copy_4_immutables_unmasked $1..4 = i32..35 [0x00000006 (8.407791e-45), 0x00000006 (8.407791e-45), 0x00000007 (9.809089e-45), 0x00000008 (1.121039e-44)] copy_4_slots_masked x = Mask($1..4) copy_4_slots_unmasked $1..4 = ok, x(0..2) copy_slot_unmasked $5 = x(3) -splat_2_constants $6..7 = 0x00000006 (8.407791e-45) -copy_constant $8 = 0x00000007 (9.809089e-45) -copy_constant $9 = 0x00000008 (1.121039e-44) +copy_4_immutables_unmasked $6..9 = i32..35 [0x00000006 (8.407791e-45), 0x00000006 (8.407791e-45), 0x00000007 (9.809089e-45), 0x00000008 (1.121039e-44)] cmpeq_4_ints $2..5 = equal($2..5, $6..9) bitwise_and_2_ints $2..3 &= $4..5 bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 copy_slot_masked ok = Mask($1) -copy_constant $1 = 0xFFFFFFF9 -splat_3_constants $2..4 = 0xFFFFFFF7 +copy_4_immutables_unmasked $1..4 = i52..55 [0xFFFFFFF9, 0xFFFFFFF7, 0xFFFFFFF7, 0xFFFFFFF7] copy_4_slots_masked x = Mask($1..4) copy_4_slots_unmasked $1..4 = ok, x(0..2) copy_slot_unmasked $5 = x(3) -copy_constant $6 = 0xFFFFFFF9 -splat_3_constants $7..9 = 0xFFFFFFF7 +copy_4_immutables_unmasked $6..9 = i52..55 [0xFFFFFFF9, 0xFFFFFFF7, 0xFFFFFFF7, 0xFFFFFFF7] cmpeq_4_ints $2..5 = equal($2..5, $6..9) bitwise_and_2_ints $2..3 &= $4..5 bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 copy_slot_masked ok = Mask($1) -splat_2_constants $1..2 = 0x00000009 (1.261169e-44) -splat_2_constants $3..4 = 0x0000000A (1.401298e-44) +copy_4_immutables_unmasked $1..4 = i40..43 [0x00000009 (1.261169e-44), 0x00000009 (1.261169e-44), 0x0000000A (1.401298e-44), 0x0000000A (1.401298e-44)] copy_4_slots_masked x = Mask($1..4) copy_4_slots_unmasked $1..4 = ok, x(0..2) copy_slot_unmasked $5 = x(3) -splat_2_constants $6..7 = 0x00000009 (1.261169e-44) -splat_2_constants $8..9 = 0x0000000A (1.401298e-44) +copy_4_immutables_unmasked $6..9 = i40..43 [0x00000009 (1.261169e-44), 0x00000009 (1.261169e-44), 0x0000000A (1.401298e-44), 0x0000000A (1.401298e-44)] cmpeq_4_ints $2..5 = equal($2..5, $6..9) bitwise_and_2_ints $2..3 &= $4..5 bitwise_and_int $2 &= $3 @@ -473,8 +494,7 @@ splat_3_constants $1..3 = 0x00000006 (8.407791e-45) copy_3_slots_masked x(0..2) = Mask($1..3) copy_4_slots_unmasked $1..4 = ok, x(0..2) copy_slot_unmasked $5 = x(3) -splat_3_constants $6..8 = 0x00000006 (8.407791e-45) -copy_constant $9 = 0x0000000A (1.401298e-44) +copy_4_immutables_unmasked $6..9 = i44..47 [0x00000006 (8.407791e-45), 0x00000006 (8.407791e-45), 0x00000006 (8.407791e-45), 0x0000000A (1.401298e-44)] cmpeq_4_ints $2..5 = equal($2..5, $6..9) bitwise_and_2_ints $2..3 &= $4..5 bitwise_and_int $2 &= $3 @@ -484,26 +504,17 @@ splat_2_constants $1..2 = 0x00000008 (1.121039e-44) copy_2_slots_masked x(0..1) = Mask($1..2) copy_4_slots_unmasked $1..4 = ok, x(0..2) copy_slot_unmasked $5 = x(3) -splat_2_constants $6..7 = 0x00000008 (1.121039e-44) -copy_constant $8 = 0x00000006 (8.407791e-45) -copy_constant $9 = 0x0000000A (1.401298e-44) +copy_4_immutables_unmasked $6..9 = i56..59 [0x00000008 (1.121039e-44), 0x00000008 (1.121039e-44), 0x00000006 (8.407791e-45), 0x0000000A (1.401298e-44)] cmpeq_4_ints $2..5 = equal($2..5, $6..9) bitwise_and_2_ints $2..3 &= $4..5 bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 copy_slot_masked ok = Mask($1) -copy_constant $1 = 0x000000C8 (2.802597e-43) -copy_constant $2 = 0x00000064 (1.401298e-43) -copy_constant $3 = 0x00000032 (7.006492e-44) -copy_constant $4 = 0x00000019 (3.503246e-44) +copy_4_immutables_unmasked $1..4 = i60..63 [0x000000C8 (2.802597e-43), 0x00000064 (1.401298e-43), 0x00000032 (7.006492e-44), 0x00000019 (3.503246e-44)] copy_4_slots_masked x = Mask($1..4) copy_4_slots_unmasked $1..4 = ok, x(0..2) copy_slot_unmasked $5 = x(3) -stack_rewind -copy_constant $6 = 0x000000C8 (2.802597e-43) -copy_constant $7 = 0x00000064 (1.401298e-43) -copy_constant $8 = 0x00000032 (7.006492e-44) -copy_constant $9 = 0x00000019 (3.503246e-44) +copy_4_immutables_unmasked $6..9 = i60..63 [0x000000C8 (2.802597e-43), 0x00000064 (1.401298e-43), 0x00000032 (7.006492e-44), 0x00000019 (3.503246e-44)] cmpeq_4_ints $2..5 = equal($2..5, $6..9) bitwise_and_2_ints $2..3 &= $4..5 bitwise_and_int $2 &= $3 @@ -556,6 +567,7 @@ bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 copy_slot_masked ok = Mask($1) copy_slot_unmasked $1 = unknown +stack_rewind swizzle_4 $1..4 = ($1..4).xxxx copy_4_slots_masked x = Mask($1..4) copy_4_slots_unmasked $1..4 = ok, x(0..2) diff --git a/tests/sksl/folding/VectorVectorFolding.skrp b/tests/sksl/folding/VectorVectorFolding.skrp index 2f75f7d84b32..1a6ea31222f5 100644 --- a/tests/sksl/folding/VectorVectorFolding.skrp +++ b/tests/sksl/folding/VectorVectorFolding.skrp @@ -1,3 +1,5 @@ +134 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_uniform _0_unknown = unknownInput diff --git a/tests/sksl/inliner/CommaExpressionsAllowInlining.glsl b/tests/sksl/inliner/CommaExpressionsAllowInlining.glsl new file mode 100644 index 000000000000..0d1dded68a7f --- /dev/null +++ b/tests/sksl/inliner/CommaExpressionsAllowInlining.glsl @@ -0,0 +1,11 @@ + +out vec4 sk_FragColor; +uniform vec4 colorGreen; +void c_vi(out int i) { +} +vec4 main() { + int i; + int _0_i = i; + c_vi(_0_i); + return colorGreen; +} diff --git a/tests/sksl/inliner/OpaqueCallsCannotBeInlined.glsl b/tests/sksl/inliner/OpaqueCallsCannotBeInlined.glsl new file mode 100644 index 000000000000..fabbfd8455e6 --- /dev/null +++ b/tests/sksl/inliner/OpaqueCallsCannotBeInlined.glsl @@ -0,0 +1,10 @@ + +out vec4 sk_FragColor; +layout (binding = 0) uniform sampler uSampler; +layout (binding = 1) uniform texture2D uTexture; +vec4 squaredSample_h4f2Z(vec2 p, sampler2D s) { + return texture(s, p) * texture(s, p); +} +vec4 main() { + return texture(makeSampler2D(uTexture, uSampler), p) * squaredSample_h4f2Z(p, makeSampler2D(uTexture, uSampler)); +} diff --git a/tests/sksl/intrinsics/AbsFloat.asm.frag b/tests/sksl/intrinsics/AbsFloat.asm.frag index f8dc82987cf6..0f18592fe8aa 100644 --- a/tests/sksl/intrinsics/AbsFloat.asm.frag +++ b/tests/sksl/intrinsics/AbsFloat.asm.frag @@ -1,166 +1,166 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testInputs" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %expected "expected" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %100 RelaxedPrecision -OpDecorate %103 RelaxedPrecision -OpDecorate %104 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testInputs" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %expected "expected" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %100 RelaxedPrecision + OpDecorate %103 RelaxedPrecision + OpDecorate %104 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float -%float_1_25 = OpConstant %float 1.25 -%float_0_75 = OpConstant %float 0.75 -%float_2_25 = OpConstant %float 2.25 -%31 = OpConstantComposite %v4float %float_1_25 %float_0 %float_0_75 %float_2_25 -%false = OpConstantFalse %bool + %float_1_25 = OpConstant %float 1.25 + %float_0_75 = OpConstant %float 0.75 + %float_2_25 = OpConstant %float 2.25 + %31 = OpConstantComposite %v4float %float_1_25 %float_0 %float_0_75 %float_2_25 + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%v3bool = OpTypeVector %bool 3 -%v4bool = OpTypeVector %bool 4 -%true = OpConstantTrue %bool -%79 = OpConstantComposite %v2float %float_1_25 %float_0 -%86 = OpConstantComposite %v3float %float_1_25 %float_0 %float_0_75 -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %v3bool = OpTypeVector %bool 3 + %v4bool = OpTypeVector %bool 4 + %true = OpConstantTrue %bool + %79 = OpConstantComposite %v2float %float_1_25 %float_0 + %86 = OpConstantComposite %v3float %float_1_25 %float_0 %float_0_75 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%expected = OpVariable %_ptr_Function_v4float Function -%94 = OpVariable %_ptr_Function_v4float Function -OpStore %expected %31 -%34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%38 = OpLoad %v4float %34 -%39 = OpCompositeExtract %float %38 0 -%33 = OpExtInst %float %1 FAbs %39 -%40 = OpFOrdEqual %bool %33 %float_1_25 -OpSelectionMerge %42 None -OpBranchConditional %40 %41 %42 -%41 = OpLabel -%44 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%45 = OpLoad %v4float %44 -%46 = OpVectorShuffle %v2float %45 %45 0 1 -%43 = OpExtInst %v2float %1 FAbs %46 -%47 = OpVectorShuffle %v2float %31 %31 0 1 -%48 = OpFOrdEqual %v2bool %43 %47 -%50 = OpAll %bool %48 -OpBranch %42 -%42 = OpLabel -%51 = OpPhi %bool %false %25 %50 %41 -OpSelectionMerge %53 None -OpBranchConditional %51 %52 %53 -%52 = OpLabel -%55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%56 = OpLoad %v4float %55 -%57 = OpVectorShuffle %v3float %56 %56 0 1 2 -%54 = OpExtInst %v3float %1 FAbs %57 -%59 = OpVectorShuffle %v3float %31 %31 0 1 2 -%60 = OpFOrdEqual %v3bool %54 %59 -%62 = OpAll %bool %60 -OpBranch %53 -%53 = OpLabel -%63 = OpPhi %bool %false %42 %62 %52 -OpSelectionMerge %65 None -OpBranchConditional %63 %64 %65 -%64 = OpLabel -%67 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%68 = OpLoad %v4float %67 -%66 = OpExtInst %v4float %1 FAbs %68 -%69 = OpFOrdEqual %v4bool %66 %31 -%71 = OpAll %bool %69 -OpBranch %65 -%65 = OpLabel -%72 = OpPhi %bool %false %53 %71 %64 -OpSelectionMerge %74 None -OpBranchConditional %72 %73 %74 -%73 = OpLabel -OpBranch %74 -%74 = OpLabel -%76 = OpPhi %bool %false %65 %true %73 -OpSelectionMerge %78 None -OpBranchConditional %76 %77 %78 -%77 = OpLabel -%80 = OpVectorShuffle %v2float %31 %31 0 1 -%81 = OpFOrdEqual %v2bool %79 %80 -%82 = OpAll %bool %81 -OpBranch %78 -%78 = OpLabel -%83 = OpPhi %bool %false %74 %82 %77 -OpSelectionMerge %85 None -OpBranchConditional %83 %84 %85 -%84 = OpLabel -%87 = OpVectorShuffle %v3float %31 %31 0 1 2 -%88 = OpFOrdEqual %v3bool %86 %87 -%89 = OpAll %bool %88 -OpBranch %85 -%85 = OpLabel -%90 = OpPhi %bool %false %78 %89 %84 -OpSelectionMerge %92 None -OpBranchConditional %90 %91 %92 -%91 = OpLabel -OpBranch %92 -%92 = OpLabel -%93 = OpPhi %bool %false %85 %true %91 -OpSelectionMerge %97 None -OpBranchConditional %93 %95 %96 -%95 = OpLabel -%98 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%100 = OpLoad %v4float %98 -OpStore %94 %100 -OpBranch %97 -%96 = OpLabel -%101 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%103 = OpLoad %v4float %101 -OpStore %94 %103 -OpBranch %97 -%97 = OpLabel -%104 = OpLoad %v4float %94 -OpReturnValue %104 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %expected = OpVariable %_ptr_Function_v4float Function + %94 = OpVariable %_ptr_Function_v4float Function + OpStore %expected %31 + %34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %38 = OpLoad %v4float %34 + %39 = OpCompositeExtract %float %38 0 + %33 = OpExtInst %float %1 FAbs %39 + %40 = OpFOrdEqual %bool %33 %float_1_25 + OpSelectionMerge %42 None + OpBranchConditional %40 %41 %42 + %41 = OpLabel + %44 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %45 = OpLoad %v4float %44 + %46 = OpVectorShuffle %v2float %45 %45 0 1 + %43 = OpExtInst %v2float %1 FAbs %46 + %47 = OpVectorShuffle %v2float %31 %31 0 1 + %48 = OpFOrdEqual %v2bool %43 %47 + %50 = OpAll %bool %48 + OpBranch %42 + %42 = OpLabel + %51 = OpPhi %bool %false %25 %50 %41 + OpSelectionMerge %53 None + OpBranchConditional %51 %52 %53 + %52 = OpLabel + %55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %56 = OpLoad %v4float %55 + %57 = OpVectorShuffle %v3float %56 %56 0 1 2 + %54 = OpExtInst %v3float %1 FAbs %57 + %59 = OpVectorShuffle %v3float %31 %31 0 1 2 + %60 = OpFOrdEqual %v3bool %54 %59 + %62 = OpAll %bool %60 + OpBranch %53 + %53 = OpLabel + %63 = OpPhi %bool %false %42 %62 %52 + OpSelectionMerge %65 None + OpBranchConditional %63 %64 %65 + %64 = OpLabel + %67 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %68 = OpLoad %v4float %67 + %66 = OpExtInst %v4float %1 FAbs %68 + %69 = OpFOrdEqual %v4bool %66 %31 + %71 = OpAll %bool %69 + OpBranch %65 + %65 = OpLabel + %72 = OpPhi %bool %false %53 %71 %64 + OpSelectionMerge %74 None + OpBranchConditional %72 %73 %74 + %73 = OpLabel + OpBranch %74 + %74 = OpLabel + %76 = OpPhi %bool %false %65 %true %73 + OpSelectionMerge %78 None + OpBranchConditional %76 %77 %78 + %77 = OpLabel + %80 = OpVectorShuffle %v2float %31 %31 0 1 + %81 = OpFOrdEqual %v2bool %79 %80 + %82 = OpAll %bool %81 + OpBranch %78 + %78 = OpLabel + %83 = OpPhi %bool %false %74 %82 %77 + OpSelectionMerge %85 None + OpBranchConditional %83 %84 %85 + %84 = OpLabel + %87 = OpVectorShuffle %v3float %31 %31 0 1 2 + %88 = OpFOrdEqual %v3bool %86 %87 + %89 = OpAll %bool %88 + OpBranch %85 + %85 = OpLabel + %90 = OpPhi %bool %false %78 %89 %84 + OpSelectionMerge %92 None + OpBranchConditional %90 %91 %92 + %91 = OpLabel + OpBranch %92 + %92 = OpLabel + %93 = OpPhi %bool %false %85 %true %91 + OpSelectionMerge %97 None + OpBranchConditional %93 %95 %96 + %95 = OpLabel + %98 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %100 = OpLoad %v4float %98 + OpStore %94 %100 + OpBranch %97 + %96 = OpLabel + %101 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %103 = OpLoad %v4float %101 + OpStore %94 %103 + OpBranch %97 + %97 = OpLabel + %104 = OpLoad %v4float %94 + OpReturnValue %104 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/AbsFloat.skrp b/tests/sksl/intrinsics/AbsFloat.skrp index 49d2db3ace17..93fb319d038e 100644 --- a/tests/sksl/intrinsics/AbsFloat.skrp +++ b/tests/sksl/intrinsics/AbsFloat.skrp @@ -1,57 +1,52 @@ +50 instructions + [immutable slots] -expected(0) = 0x3FA00000 (1.25) -expected(1) = 0 -expected(2) = 0x3F400000 (0.75) -expected(3) = 0x40100000 (2.25) +i0 = 0x3FA00000 (1.25) +i1 = 0 +i2 = 0x3F400000 (0.75) +i3 = 0x40100000 (2.25) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_uniform $0 = testInputs(0) bitwise_and_imm_int $0 &= 0x7FFFFFFF -copy_slot_unmasked $1 = expected(0) -cmpeq_float $0 = equal($0, $1) +cmpeq_imm_float $0 = equal($0, 0x3FA00000 (1.25)) copy_2_uniforms $1..2 = testInputs(0..1) bitwise_and_imm_2_ints $1..2 &= 0x7FFFFFFF -copy_2_slots_unmasked $3..4 = expected(0..1) +copy_2_immutables_unmasked $3..4 = i0..1 [0x3FA00000 (1.25), 0] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_3_uniforms $1..3 = testInputs(0..2) bitwise_and_imm_3_ints $1..3 &= 0x7FFFFFFF -copy_3_slots_unmasked $4..6 = expected(0..2) +copy_3_immutables_unmasked $4..6 = i0..2 [0x3FA00000 (1.25), 0, 0x3F400000 (0.75)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_4_uniforms $1..4 = testInputs bitwise_and_imm_4_ints $1..4 &= 0x7FFFFFFF -copy_4_slots_unmasked $5..8 = expected +copy_4_immutables_unmasked $5..8 = i0..3 [0x3FA00000 (1.25), 0, 0x3F400000 (0.75), 0x40100000 (2.25)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expected(0) +copy_constant $1 = 0x3FA00000 (1.25) cmpeq_imm_float $1 = equal($1, 0x3FA00000 (1.25)) bitwise_and_int $0 &= $1 -copy_constant $1 = 0x3FA00000 (1.25) -copy_constant $2 = 0 -copy_2_slots_unmasked $3..4 = expected(0..1) +copy_2_immutables_unmasked $1..2 = i0..1 [0x3FA00000 (1.25), 0] +copy_2_immutables_unmasked $3..4 = i0..1 [0x3FA00000 (1.25), 0] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0x3FA00000 (1.25) -copy_constant $2 = 0 -copy_constant $3 = 0x3F400000 (0.75) -copy_3_slots_unmasked $4..6 = expected(0..2) +copy_3_immutables_unmasked $1..3 = i0..2 [0x3FA00000 (1.25), 0, 0x3F400000 (0.75)] +copy_3_immutables_unmasked $4..6 = i0..2 [0x3FA00000 (1.25), 0, 0x3F400000 (0.75)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0x3FA00000 (1.25) -copy_constant $2 = 0 -copy_constant $3 = 0x3F400000 (0.75) -copy_constant $4 = 0x40100000 (2.25) -copy_4_slots_unmasked $5..8 = expected +copy_4_immutables_unmasked $1..4 = i0..3 [0x3FA00000 (1.25), 0, 0x3F400000 (0.75), 0x40100000 (2.25)] +copy_4_immutables_unmasked $5..8 = i0..3 [0x3FA00000 (1.25), 0, 0x3F400000 (0.75), 0x40100000 (2.25)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 diff --git a/tests/sksl/intrinsics/AbsFloat.wgsl b/tests/sksl/intrinsics/AbsFloat.wgsl index 07b893c71e53..5a23cc309690 100644 --- a/tests/sksl/intrinsics/AbsFloat.wgsl +++ b/tests/sksl/intrinsics/AbsFloat.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -19,7 +20,7 @@ fn main(_skParam0: vec2) -> vec4 { let _skTemp1 = abs(_globalUniforms.testInputs.xy); let _skTemp2 = abs(_globalUniforms.testInputs.xyz); let _skTemp3 = abs(_globalUniforms.testInputs); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((_skTemp0 == expected.x && all(_skTemp1 == expected.xy)) && all(_skTemp2 == expected.xyz)) && all(_skTemp3 == expected)) && 1.25 == expected.x) && all(vec2(1.25, 0.0) == expected.xy)) && all(vec3(1.25, 0.0, 0.75) == expected.xyz)) && all(vec4(1.25, 0.0, 0.75, 2.25) == expected))); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((_skTemp0 == expected.x) && all(_skTemp1 == expected.xy)) && all(_skTemp2 == expected.xyz)) && all(_skTemp3 == expected)) && (1.25 == expected.x)) && all(vec2(1.25, 0.0) == expected.xy)) && all(vec3(1.25, 0.0, 0.75) == expected.xyz)) && all(vec4(1.25, 0.0, 0.75, 2.25) == expected))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/intrinsics/AbsInt.asm.frag b/tests/sksl/intrinsics/AbsInt.asm.frag index 4ce18788dc57..768e46383f6e 100644 --- a/tests/sksl/intrinsics/AbsInt.asm.frag +++ b/tests/sksl/intrinsics/AbsInt.asm.frag @@ -1,206 +1,206 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testInputs" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %expected "expected" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %38 RelaxedPrecision -OpDecorate %39 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %48 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %63 RelaxedPrecision -OpDecorate %64 RelaxedPrecision -OpDecorate %66 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -OpDecorate %83 RelaxedPrecision -OpDecorate %84 RelaxedPrecision -OpDecorate %86 RelaxedPrecision -OpDecorate %88 RelaxedPrecision -OpDecorate %90 RelaxedPrecision -OpDecorate %124 RelaxedPrecision -OpDecorate %126 RelaxedPrecision -OpDecorate %127 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testInputs" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %expected "expected" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %38 RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %48 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %63 RelaxedPrecision + OpDecorate %64 RelaxedPrecision + OpDecorate %66 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %83 RelaxedPrecision + OpDecorate %84 RelaxedPrecision + OpDecorate %86 RelaxedPrecision + OpDecorate %88 RelaxedPrecision + OpDecorate %90 RelaxedPrecision + OpDecorate %124 RelaxedPrecision + OpDecorate %126 RelaxedPrecision + OpDecorate %127 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%int = OpTypeInt 32 1 -%v4int = OpTypeVector %int 4 + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %int = OpTypeInt 32 1 + %v4int = OpTypeVector %int 4 %_ptr_Function_v4int = OpTypePointer Function %v4int -%int_1 = OpConstant %int 1 -%int_0 = OpConstant %int 0 -%int_2 = OpConstant %int 2 -%33 = OpConstantComposite %v4int %int_1 %int_0 %int_0 %int_2 -%false = OpConstantFalse %bool + %int_1 = OpConstant %int 1 + %int_0 = OpConstant %int 0 + %int_2 = OpConstant %int 2 + %33 = OpConstantComposite %v4int %int_1 %int_0 %int_0 %int_2 + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%v2int = OpTypeVector %int 2 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%v3int = OpTypeVector %int 3 -%v3bool = OpTypeVector %bool 3 -%v4bool = OpTypeVector %bool 4 -%true = OpConstantTrue %bool -%103 = OpConstantComposite %v2int %int_1 %int_0 -%110 = OpConstantComposite %v3int %int_1 %int_0 %int_0 + %v2int = OpTypeVector %int 2 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %v3int = OpTypeVector %int 3 + %v3bool = OpTypeVector %bool 3 + %v4bool = OpTypeVector %bool 4 + %true = OpConstantTrue %bool + %103 = OpConstantComposite %v2int %int_1 %int_0 + %110 = OpConstantComposite %v3int %int_1 %int_0 %int_0 %_ptr_Function_v4float = OpTypePointer Function %v4float %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%expected = OpVariable %_ptr_Function_v4int Function -%118 = OpVariable %_ptr_Function_v4float Function -OpStore %expected %33 -%36 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%38 = OpLoad %v4float %36 -%39 = OpCompositeExtract %float %38 0 -%40 = OpConvertFToS %int %39 -%35 = OpExtInst %int %1 SAbs %40 -%41 = OpIEqual %bool %35 %int_1 -OpSelectionMerge %43 None -OpBranchConditional %41 %42 %43 -%42 = OpLabel -%45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%46 = OpLoad %v4float %45 -%47 = OpVectorShuffle %v2float %46 %46 0 1 -%48 = OpCompositeExtract %float %47 0 -%49 = OpConvertFToS %int %48 -%50 = OpCompositeExtract %float %47 1 -%51 = OpConvertFToS %int %50 -%53 = OpCompositeConstruct %v2int %49 %51 -%44 = OpExtInst %v2int %1 SAbs %53 -%54 = OpVectorShuffle %v2int %33 %33 0 1 -%55 = OpIEqual %v2bool %44 %54 -%57 = OpAll %bool %55 -OpBranch %43 -%43 = OpLabel -%58 = OpPhi %bool %false %25 %57 %42 -OpSelectionMerge %60 None -OpBranchConditional %58 %59 %60 -%59 = OpLabel -%62 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%63 = OpLoad %v4float %62 -%64 = OpVectorShuffle %v3float %63 %63 0 1 2 -%66 = OpCompositeExtract %float %64 0 -%67 = OpConvertFToS %int %66 -%68 = OpCompositeExtract %float %64 1 -%69 = OpConvertFToS %int %68 -%70 = OpCompositeExtract %float %64 2 -%71 = OpConvertFToS %int %70 -%73 = OpCompositeConstruct %v3int %67 %69 %71 -%61 = OpExtInst %v3int %1 SAbs %73 -%74 = OpVectorShuffle %v3int %33 %33 0 1 2 -%75 = OpIEqual %v3bool %61 %74 -%77 = OpAll %bool %75 -OpBranch %60 -%60 = OpLabel -%78 = OpPhi %bool %false %43 %77 %59 -OpSelectionMerge %80 None -OpBranchConditional %78 %79 %80 -%79 = OpLabel -%82 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%83 = OpLoad %v4float %82 -%84 = OpCompositeExtract %float %83 0 -%85 = OpConvertFToS %int %84 -%86 = OpCompositeExtract %float %83 1 -%87 = OpConvertFToS %int %86 -%88 = OpCompositeExtract %float %83 2 -%89 = OpConvertFToS %int %88 -%90 = OpCompositeExtract %float %83 3 -%91 = OpConvertFToS %int %90 -%92 = OpCompositeConstruct %v4int %85 %87 %89 %91 -%81 = OpExtInst %v4int %1 SAbs %92 -%93 = OpIEqual %v4bool %81 %33 -%95 = OpAll %bool %93 -OpBranch %80 -%80 = OpLabel -%96 = OpPhi %bool %false %60 %95 %79 -OpSelectionMerge %98 None -OpBranchConditional %96 %97 %98 -%97 = OpLabel -OpBranch %98 -%98 = OpLabel -%100 = OpPhi %bool %false %80 %true %97 -OpSelectionMerge %102 None -OpBranchConditional %100 %101 %102 -%101 = OpLabel -%104 = OpVectorShuffle %v2int %33 %33 0 1 -%105 = OpIEqual %v2bool %103 %104 -%106 = OpAll %bool %105 -OpBranch %102 -%102 = OpLabel -%107 = OpPhi %bool %false %98 %106 %101 -OpSelectionMerge %109 None -OpBranchConditional %107 %108 %109 -%108 = OpLabel -%111 = OpVectorShuffle %v3int %33 %33 0 1 2 -%112 = OpIEqual %v3bool %110 %111 -%113 = OpAll %bool %112 -OpBranch %109 -%109 = OpLabel -%114 = OpPhi %bool %false %102 %113 %108 -OpSelectionMerge %116 None -OpBranchConditional %114 %115 %116 -%115 = OpLabel -OpBranch %116 -%116 = OpLabel -%117 = OpPhi %bool %false %109 %true %115 -OpSelectionMerge %122 None -OpBranchConditional %117 %120 %121 -%120 = OpLabel -%123 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%124 = OpLoad %v4float %123 -OpStore %118 %124 -OpBranch %122 -%121 = OpLabel -%125 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%126 = OpLoad %v4float %125 -OpStore %118 %126 -OpBranch %122 -%122 = OpLabel -%127 = OpLoad %v4float %118 -OpReturnValue %127 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %expected = OpVariable %_ptr_Function_v4int Function + %118 = OpVariable %_ptr_Function_v4float Function + OpStore %expected %33 + %36 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %38 = OpLoad %v4float %36 + %39 = OpCompositeExtract %float %38 0 + %40 = OpConvertFToS %int %39 + %35 = OpExtInst %int %1 SAbs %40 + %41 = OpIEqual %bool %35 %int_1 + OpSelectionMerge %43 None + OpBranchConditional %41 %42 %43 + %42 = OpLabel + %45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %46 = OpLoad %v4float %45 + %47 = OpVectorShuffle %v2float %46 %46 0 1 + %48 = OpCompositeExtract %float %47 0 + %49 = OpConvertFToS %int %48 + %50 = OpCompositeExtract %float %47 1 + %51 = OpConvertFToS %int %50 + %53 = OpCompositeConstruct %v2int %49 %51 + %44 = OpExtInst %v2int %1 SAbs %53 + %54 = OpVectorShuffle %v2int %33 %33 0 1 + %55 = OpIEqual %v2bool %44 %54 + %57 = OpAll %bool %55 + OpBranch %43 + %43 = OpLabel + %58 = OpPhi %bool %false %25 %57 %42 + OpSelectionMerge %60 None + OpBranchConditional %58 %59 %60 + %59 = OpLabel + %62 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %63 = OpLoad %v4float %62 + %64 = OpVectorShuffle %v3float %63 %63 0 1 2 + %66 = OpCompositeExtract %float %64 0 + %67 = OpConvertFToS %int %66 + %68 = OpCompositeExtract %float %64 1 + %69 = OpConvertFToS %int %68 + %70 = OpCompositeExtract %float %64 2 + %71 = OpConvertFToS %int %70 + %73 = OpCompositeConstruct %v3int %67 %69 %71 + %61 = OpExtInst %v3int %1 SAbs %73 + %74 = OpVectorShuffle %v3int %33 %33 0 1 2 + %75 = OpIEqual %v3bool %61 %74 + %77 = OpAll %bool %75 + OpBranch %60 + %60 = OpLabel + %78 = OpPhi %bool %false %43 %77 %59 + OpSelectionMerge %80 None + OpBranchConditional %78 %79 %80 + %79 = OpLabel + %82 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %83 = OpLoad %v4float %82 + %84 = OpCompositeExtract %float %83 0 + %85 = OpConvertFToS %int %84 + %86 = OpCompositeExtract %float %83 1 + %87 = OpConvertFToS %int %86 + %88 = OpCompositeExtract %float %83 2 + %89 = OpConvertFToS %int %88 + %90 = OpCompositeExtract %float %83 3 + %91 = OpConvertFToS %int %90 + %92 = OpCompositeConstruct %v4int %85 %87 %89 %91 + %81 = OpExtInst %v4int %1 SAbs %92 + %93 = OpIEqual %v4bool %81 %33 + %95 = OpAll %bool %93 + OpBranch %80 + %80 = OpLabel + %96 = OpPhi %bool %false %60 %95 %79 + OpSelectionMerge %98 None + OpBranchConditional %96 %97 %98 + %97 = OpLabel + OpBranch %98 + %98 = OpLabel + %100 = OpPhi %bool %false %80 %true %97 + OpSelectionMerge %102 None + OpBranchConditional %100 %101 %102 + %101 = OpLabel + %104 = OpVectorShuffle %v2int %33 %33 0 1 + %105 = OpIEqual %v2bool %103 %104 + %106 = OpAll %bool %105 + OpBranch %102 + %102 = OpLabel + %107 = OpPhi %bool %false %98 %106 %101 + OpSelectionMerge %109 None + OpBranchConditional %107 %108 %109 + %108 = OpLabel + %111 = OpVectorShuffle %v3int %33 %33 0 1 2 + %112 = OpIEqual %v3bool %110 %111 + %113 = OpAll %bool %112 + OpBranch %109 + %109 = OpLabel + %114 = OpPhi %bool %false %102 %113 %108 + OpSelectionMerge %116 None + OpBranchConditional %114 %115 %116 + %115 = OpLabel + OpBranch %116 + %116 = OpLabel + %117 = OpPhi %bool %false %109 %true %115 + OpSelectionMerge %122 None + OpBranchConditional %117 %120 %121 + %120 = OpLabel + %123 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %124 = OpLoad %v4float %123 + OpStore %118 %124 + OpBranch %122 + %121 = OpLabel + %125 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %126 = OpLoad %v4float %125 + OpStore %118 %126 + OpBranch %122 + %122 = OpLabel + %127 = OpLoad %v4float %118 + OpReturnValue %127 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/AbsInt.skrp b/tests/sksl/intrinsics/AbsInt.skrp index 6dcda167b377..97dad23561f7 100644 --- a/tests/sksl/intrinsics/AbsInt.skrp +++ b/tests/sksl/intrinsics/AbsInt.skrp @@ -1,27 +1,28 @@ +54 instructions + [immutable slots] -expected(0) = 0x00000001 (1.401298e-45) -expected(1) = 0 -expected(2) = 0 -expected(3) = 0x00000002 (2.802597e-45) +i0 = 0x00000001 (1.401298e-45) +i1 = 0 +i2 = 0 +i3 = 0x00000002 (2.802597e-45) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_uniform $0 = testInputs(0) cast_to_int_from_float $0 = FloatToInt($0) abs_int $0 = abs($0) -copy_slot_unmasked $1 = expected(0) -cmpeq_int $0 = equal($0, $1) +cmpeq_imm_int $0 = equal($0, 0x00000001) copy_2_uniforms $1..2 = testInputs(0..1) cast_to_int_from_2_floats $1..2 = FloatToInt($1..2) abs_2_ints $1..2 = abs($1..2) -copy_2_slots_unmasked $3..4 = expected(0..1) +copy_2_immutables_unmasked $3..4 = i0..1 [0x00000001 (1.401298e-45), 0] cmpeq_2_ints $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_3_uniforms $1..3 = testInputs(0..2) cast_to_int_from_3_floats $1..3 = FloatToInt($1..3) abs_3_ints $1..3 = abs($1..3) -copy_3_slots_unmasked $4..6 = expected(0..2) +copy_3_immutables_unmasked $4..6 = i0..2 [0x00000001 (1.401298e-45), 0, 0] cmpeq_3_ints $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 @@ -29,31 +30,27 @@ bitwise_and_int $0 &= $1 copy_4_uniforms $1..4 = testInputs cast_to_int_from_4_floats $1..4 = FloatToInt($1..4) abs_4_ints $1..4 = abs($1..4) -copy_4_slots_unmasked $5..8 = expected +copy_4_immutables_unmasked $5..8 = i0..3 [0x00000001 (1.401298e-45), 0, 0, 0x00000002 (2.802597e-45)] cmpeq_4_ints $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expected(0) +copy_constant $1 = 0x00000001 (1.401298e-45) cmpeq_imm_int $1 = equal($1, 0x00000001) bitwise_and_int $0 &= $1 -copy_constant $1 = 0x00000001 (1.401298e-45) -copy_constant $2 = 0 -copy_2_slots_unmasked $3..4 = expected(0..1) +copy_2_immutables_unmasked $1..2 = i0..1 [0x00000001 (1.401298e-45), 0] +copy_2_immutables_unmasked $3..4 = i0..1 [0x00000001 (1.401298e-45), 0] cmpeq_2_ints $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0x00000001 (1.401298e-45) -splat_2_constants $2..3 = 0 -copy_3_slots_unmasked $4..6 = expected(0..2) +copy_3_immutables_unmasked $1..3 = i0..2 [0x00000001 (1.401298e-45), 0, 0] +copy_3_immutables_unmasked $4..6 = i0..2 [0x00000001 (1.401298e-45), 0, 0] cmpeq_3_ints $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0x00000001 (1.401298e-45) -splat_2_constants $2..3 = 0 -copy_constant $4 = 0x00000002 (2.802597e-45) -copy_4_slots_unmasked $5..8 = expected +copy_4_immutables_unmasked $1..4 = i0..3 [0x00000001 (1.401298e-45), 0, 0, 0x00000002 (2.802597e-45)] +copy_4_immutables_unmasked $5..8 = i0..3 [0x00000001 (1.401298e-45), 0, 0, 0x00000002 (2.802597e-45)] cmpeq_4_ints $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 diff --git a/tests/sksl/intrinsics/AbsInt.wgsl b/tests/sksl/intrinsics/AbsInt.wgsl index 9e9044009f0d..e7715a07c452 100644 --- a/tests/sksl/intrinsics/AbsInt.wgsl +++ b/tests/sksl/intrinsics/AbsInt.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -19,7 +20,7 @@ fn main(_skParam0: vec2) -> vec4 { let _skTemp1 = abs(vec2(_globalUniforms.testInputs.xy)); let _skTemp2 = abs(vec3(_globalUniforms.testInputs.xyz)); let _skTemp3 = abs(vec4(_globalUniforms.testInputs)); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((_skTemp0 == expected.x && all(_skTemp1 == expected.xy)) && all(_skTemp2 == expected.xyz)) && all(_skTemp3 == expected)) && 1 == expected.x) && all(vec2(1, 0) == expected.xy)) && all(vec3(1, 0, 0) == expected.xyz)) && all(vec4(1, 0, 0, 2) == expected))); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((_skTemp0 == expected.x) && all(_skTemp1 == expected.xy)) && all(_skTemp2 == expected.xyz)) && all(_skTemp3 == expected)) && (1 == expected.x)) && all(vec2(1, 0) == expected.xy)) && all(vec3(1, 0, 0) == expected.xyz)) && all(vec4(1, 0, 0, 2) == expected))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/intrinsics/Acos.asm.frag b/tests/sksl/intrinsics/Acos.asm.frag index dc3e9edc541c..408f57568498 100644 --- a/tests/sksl/intrinsics/Acos.asm.frag +++ b/tests/sksl/intrinsics/Acos.asm.frag @@ -1,209 +1,209 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "inputVal" -OpMemberName %_UniformBuffer 1 "expected" -OpMemberName %_UniformBuffer 2 "colorGreen" -OpMemberName %_UniformBuffer 3 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 3 Offset 48 -OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %27 RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %80 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %87 RelaxedPrecision -OpDecorate %88 RelaxedPrecision -OpDecorate %96 RelaxedPrecision -OpDecorate %97 RelaxedPrecision -OpDecorate %105 RelaxedPrecision -OpDecorate %116 RelaxedPrecision -OpDecorate %119 RelaxedPrecision -OpDecorate %120 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "inputVal" + OpMemberName %_UniformBuffer 1 "expected" + OpMemberName %_UniformBuffer 2 "colorGreen" + OpMemberName %_UniformBuffer 3 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 3 Offset 48 + OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %27 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %80 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %87 RelaxedPrecision + OpDecorate %88 RelaxedPrecision + OpDecorate %96 RelaxedPrecision + OpDecorate %97 RelaxedPrecision + OpDecorate %105 RelaxedPrecision + OpDecorate %116 RelaxedPrecision + OpDecorate %119 RelaxedPrecision + OpDecorate %120 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%false = OpConstantFalse %bool + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%v3bool = OpTypeVector %bool 3 -%v4bool = OpTypeVector %bool 4 -%94 = OpConstantComposite %v3float %float_0 %float_0 %float_0 -%103 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %v3bool = OpTypeVector %bool 3 + %v4bool = OpTypeVector %bool 4 + %94 = OpConstantComposite %v3float %float_0 %float_0 %float_0 + %103 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_2 = OpConstant %int 2 -%int_3 = OpConstant %int 3 + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%109 = OpVariable %_ptr_Function_v4float Function -%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %28 -%33 = OpCompositeExtract %float %32 0 -%27 = OpExtInst %float %1 Acos %33 -%34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%36 = OpLoad %v4float %34 -%37 = OpCompositeExtract %float %36 0 -%38 = OpFOrdEqual %bool %27 %37 -OpSelectionMerge %40 None -OpBranchConditional %38 %39 %40 -%39 = OpLabel -%42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%43 = OpLoad %v4float %42 -%44 = OpVectorShuffle %v2float %43 %43 0 1 -%41 = OpExtInst %v2float %1 Acos %44 -%45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%46 = OpLoad %v4float %45 -%47 = OpVectorShuffle %v2float %46 %46 0 1 -%48 = OpFOrdEqual %v2bool %41 %47 -%50 = OpAll %bool %48 -OpBranch %40 -%40 = OpLabel -%51 = OpPhi %bool %false %25 %50 %39 -OpSelectionMerge %53 None -OpBranchConditional %51 %52 %53 -%52 = OpLabel -%55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%56 = OpLoad %v4float %55 -%57 = OpVectorShuffle %v3float %56 %56 0 1 2 -%54 = OpExtInst %v3float %1 Acos %57 -%59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%60 = OpLoad %v4float %59 -%61 = OpVectorShuffle %v3float %60 %60 0 1 2 -%62 = OpFOrdEqual %v3bool %54 %61 -%64 = OpAll %bool %62 -OpBranch %53 -%53 = OpLabel -%65 = OpPhi %bool %false %40 %64 %52 -OpSelectionMerge %67 None -OpBranchConditional %65 %66 %67 -%66 = OpLabel -%69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%70 = OpLoad %v4float %69 -%68 = OpExtInst %v4float %1 Acos %70 -%71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%72 = OpLoad %v4float %71 -%73 = OpFOrdEqual %v4bool %68 %72 -%75 = OpAll %bool %73 -OpBranch %67 -%67 = OpLabel -%76 = OpPhi %bool %false %53 %75 %66 -OpSelectionMerge %78 None -OpBranchConditional %76 %77 %78 -%77 = OpLabel -%79 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%80 = OpLoad %v4float %79 -%81 = OpCompositeExtract %float %80 0 -%82 = OpFOrdEqual %bool %float_0 %81 -OpBranch %78 -%78 = OpLabel -%83 = OpPhi %bool %false %67 %82 %77 -OpSelectionMerge %85 None -OpBranchConditional %83 %84 %85 -%84 = OpLabel -%86 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%87 = OpLoad %v4float %86 -%88 = OpVectorShuffle %v2float %87 %87 0 1 -%89 = OpFOrdEqual %v2bool %19 %88 -%90 = OpAll %bool %89 -OpBranch %85 -%85 = OpLabel -%91 = OpPhi %bool %false %78 %90 %84 -OpSelectionMerge %93 None -OpBranchConditional %91 %92 %93 -%92 = OpLabel -%95 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%96 = OpLoad %v4float %95 -%97 = OpVectorShuffle %v3float %96 %96 0 1 2 -%98 = OpFOrdEqual %v3bool %94 %97 -%99 = OpAll %bool %98 -OpBranch %93 -%93 = OpLabel -%100 = OpPhi %bool %false %85 %99 %92 -OpSelectionMerge %102 None -OpBranchConditional %100 %101 %102 -%101 = OpLabel -%104 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%105 = OpLoad %v4float %104 -%106 = OpFOrdEqual %v4bool %103 %105 -%107 = OpAll %bool %106 -OpBranch %102 -%102 = OpLabel -%108 = OpPhi %bool %false %93 %107 %101 -OpSelectionMerge %113 None -OpBranchConditional %108 %111 %112 -%111 = OpLabel -%114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%116 = OpLoad %v4float %114 -OpStore %109 %116 -OpBranch %113 -%112 = OpLabel -%117 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%119 = OpLoad %v4float %117 -OpStore %109 %119 -OpBranch %113 -%113 = OpLabel -%120 = OpLoad %v4float %109 -OpReturnValue %120 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %109 = OpVariable %_ptr_Function_v4float Function + %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %28 + %33 = OpCompositeExtract %float %32 0 + %27 = OpExtInst %float %1 Acos %33 + %34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %36 = OpLoad %v4float %34 + %37 = OpCompositeExtract %float %36 0 + %38 = OpFOrdEqual %bool %27 %37 + OpSelectionMerge %40 None + OpBranchConditional %38 %39 %40 + %39 = OpLabel + %42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %43 = OpLoad %v4float %42 + %44 = OpVectorShuffle %v2float %43 %43 0 1 + %41 = OpExtInst %v2float %1 Acos %44 + %45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %46 = OpLoad %v4float %45 + %47 = OpVectorShuffle %v2float %46 %46 0 1 + %48 = OpFOrdEqual %v2bool %41 %47 + %50 = OpAll %bool %48 + OpBranch %40 + %40 = OpLabel + %51 = OpPhi %bool %false %25 %50 %39 + OpSelectionMerge %53 None + OpBranchConditional %51 %52 %53 + %52 = OpLabel + %55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %56 = OpLoad %v4float %55 + %57 = OpVectorShuffle %v3float %56 %56 0 1 2 + %54 = OpExtInst %v3float %1 Acos %57 + %59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %60 = OpLoad %v4float %59 + %61 = OpVectorShuffle %v3float %60 %60 0 1 2 + %62 = OpFOrdEqual %v3bool %54 %61 + %64 = OpAll %bool %62 + OpBranch %53 + %53 = OpLabel + %65 = OpPhi %bool %false %40 %64 %52 + OpSelectionMerge %67 None + OpBranchConditional %65 %66 %67 + %66 = OpLabel + %69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %70 = OpLoad %v4float %69 + %68 = OpExtInst %v4float %1 Acos %70 + %71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %72 = OpLoad %v4float %71 + %73 = OpFOrdEqual %v4bool %68 %72 + %75 = OpAll %bool %73 + OpBranch %67 + %67 = OpLabel + %76 = OpPhi %bool %false %53 %75 %66 + OpSelectionMerge %78 None + OpBranchConditional %76 %77 %78 + %77 = OpLabel + %79 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %80 = OpLoad %v4float %79 + %81 = OpCompositeExtract %float %80 0 + %82 = OpFOrdEqual %bool %float_0 %81 + OpBranch %78 + %78 = OpLabel + %83 = OpPhi %bool %false %67 %82 %77 + OpSelectionMerge %85 None + OpBranchConditional %83 %84 %85 + %84 = OpLabel + %86 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %87 = OpLoad %v4float %86 + %88 = OpVectorShuffle %v2float %87 %87 0 1 + %89 = OpFOrdEqual %v2bool %19 %88 + %90 = OpAll %bool %89 + OpBranch %85 + %85 = OpLabel + %91 = OpPhi %bool %false %78 %90 %84 + OpSelectionMerge %93 None + OpBranchConditional %91 %92 %93 + %92 = OpLabel + %95 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %96 = OpLoad %v4float %95 + %97 = OpVectorShuffle %v3float %96 %96 0 1 2 + %98 = OpFOrdEqual %v3bool %94 %97 + %99 = OpAll %bool %98 + OpBranch %93 + %93 = OpLabel + %100 = OpPhi %bool %false %85 %99 %92 + OpSelectionMerge %102 None + OpBranchConditional %100 %101 %102 + %101 = OpLabel + %104 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %105 = OpLoad %v4float %104 + %106 = OpFOrdEqual %v4bool %103 %105 + %107 = OpAll %bool %106 + OpBranch %102 + %102 = OpLabel + %108 = OpPhi %bool %false %93 %107 %101 + OpSelectionMerge %113 None + OpBranchConditional %108 %111 %112 + %111 = OpLabel + %114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %116 = OpLoad %v4float %114 + OpStore %109 %116 + OpBranch %113 + %112 = OpLabel + %117 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %119 = OpLoad %v4float %117 + OpStore %109 %119 + OpBranch %113 + %113 = OpLabel + %120 = OpLoad %v4float %109 + OpReturnValue %120 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Acos.skrp b/tests/sksl/intrinsics/Acos.skrp index 591e1f836dc8..09ae96d1a64d 100644 --- a/tests/sksl/intrinsics/Acos.skrp +++ b/tests/sksl/intrinsics/Acos.skrp @@ -1,3 +1,5 @@ +57 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_uniform $4 = inputVal(0) diff --git a/tests/sksl/intrinsics/Acos.wgsl b/tests/sksl/intrinsics/Acos.wgsl index c4c253b6e374..0788b8a33e3e 100644 --- a/tests/sksl/intrinsics/Acos.wgsl +++ b/tests/sksl/intrinsics/Acos.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -19,7 +20,7 @@ fn main(_skParam0: vec2) -> vec4 { let _skTemp1 = acos(_globalUniforms.inputVal.xy); let _skTemp2 = acos(_globalUniforms.inputVal.xyz); let _skTemp3 = acos(_globalUniforms.inputVal); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((_skTemp0 == _globalUniforms.expected.x && all(_skTemp1 == _globalUniforms.expected.xy)) && all(_skTemp2 == _globalUniforms.expected.xyz)) && all(_skTemp3 == _globalUniforms.expected)) && 0.0 == _globalUniforms.expected.x) && all(vec2(0.0) == _globalUniforms.expected.xy)) && all(vec3(0.0) == _globalUniforms.expected.xyz)) && all(vec4(0.0) == _globalUniforms.expected))); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((_skTemp0 == _globalUniforms.expected.x) && all(_skTemp1 == _globalUniforms.expected.xy)) && all(_skTemp2 == _globalUniforms.expected.xyz)) && all(_skTemp3 == _globalUniforms.expected)) && (0.0 == _globalUniforms.expected.x)) && all(vec2(0.0) == _globalUniforms.expected.xy)) && all(vec3(0.0) == _globalUniforms.expected.xyz)) && all(vec4(0.0) == _globalUniforms.expected))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/intrinsics/Acosh.asm.frag b/tests/sksl/intrinsics/Acosh.asm.frag index 07887d845a47..679905cc9841 100644 --- a/tests/sksl/intrinsics/Acosh.asm.frag +++ b/tests/sksl/intrinsics/Acosh.asm.frag @@ -1,211 +1,211 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "inputVal" -OpMemberName %_UniformBuffer 1 "expected" -OpMemberName %_UniformBuffer 2 "colorGreen" -OpMemberName %_UniformBuffer 3 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 3 Offset 48 -OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %27 RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %80 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %87 RelaxedPrecision -OpDecorate %88 RelaxedPrecision -OpDecorate %97 RelaxedPrecision -OpDecorate %98 RelaxedPrecision -OpDecorate %107 RelaxedPrecision -OpDecorate %118 RelaxedPrecision -OpDecorate %121 RelaxedPrecision -OpDecorate %122 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "inputVal" + OpMemberName %_UniformBuffer 1 "expected" + OpMemberName %_UniformBuffer 2 "colorGreen" + OpMemberName %_UniformBuffer 3 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 3 Offset 48 + OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %27 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %80 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %87 RelaxedPrecision + OpDecorate %88 RelaxedPrecision + OpDecorate %97 RelaxedPrecision + OpDecorate %98 RelaxedPrecision + OpDecorate %107 RelaxedPrecision + OpDecorate %118 RelaxedPrecision + OpDecorate %121 RelaxedPrecision + OpDecorate %122 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%false = OpConstantFalse %bool + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%v3bool = OpTypeVector %bool 3 -%v4bool = OpTypeVector %bool 4 -%float_1 = OpConstant %float 1 -%95 = OpConstantComposite %v3float %float_0 %float_0 %float_1 -%float_2 = OpConstant %float 2 -%105 = OpConstantComposite %v4float %float_0 %float_0 %float_1 %float_2 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %v3bool = OpTypeVector %bool 3 + %v4bool = OpTypeVector %bool 4 + %float_1 = OpConstant %float 1 + %95 = OpConstantComposite %v3float %float_0 %float_0 %float_1 + %float_2 = OpConstant %float 2 + %105 = OpConstantComposite %v4float %float_0 %float_0 %float_1 %float_2 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_2 = OpConstant %int 2 -%int_3 = OpConstant %int 3 + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%111 = OpVariable %_ptr_Function_v4float Function -%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %28 -%33 = OpCompositeExtract %float %32 0 -%27 = OpExtInst %float %1 Acosh %33 -%34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%36 = OpLoad %v4float %34 -%37 = OpCompositeExtract %float %36 0 -%38 = OpFOrdEqual %bool %27 %37 -OpSelectionMerge %40 None -OpBranchConditional %38 %39 %40 -%39 = OpLabel -%42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%43 = OpLoad %v4float %42 -%44 = OpVectorShuffle %v2float %43 %43 0 1 -%41 = OpExtInst %v2float %1 Acosh %44 -%45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%46 = OpLoad %v4float %45 -%47 = OpVectorShuffle %v2float %46 %46 0 1 -%48 = OpFOrdEqual %v2bool %41 %47 -%50 = OpAll %bool %48 -OpBranch %40 -%40 = OpLabel -%51 = OpPhi %bool %false %25 %50 %39 -OpSelectionMerge %53 None -OpBranchConditional %51 %52 %53 -%52 = OpLabel -%55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%56 = OpLoad %v4float %55 -%57 = OpVectorShuffle %v3float %56 %56 0 1 2 -%54 = OpExtInst %v3float %1 Acosh %57 -%59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%60 = OpLoad %v4float %59 -%61 = OpVectorShuffle %v3float %60 %60 0 1 2 -%62 = OpFOrdEqual %v3bool %54 %61 -%64 = OpAll %bool %62 -OpBranch %53 -%53 = OpLabel -%65 = OpPhi %bool %false %40 %64 %52 -OpSelectionMerge %67 None -OpBranchConditional %65 %66 %67 -%66 = OpLabel -%69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%70 = OpLoad %v4float %69 -%68 = OpExtInst %v4float %1 Acosh %70 -%71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%72 = OpLoad %v4float %71 -%73 = OpFOrdEqual %v4bool %68 %72 -%75 = OpAll %bool %73 -OpBranch %67 -%67 = OpLabel -%76 = OpPhi %bool %false %53 %75 %66 -OpSelectionMerge %78 None -OpBranchConditional %76 %77 %78 -%77 = OpLabel -%79 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%80 = OpLoad %v4float %79 -%81 = OpCompositeExtract %float %80 0 -%82 = OpFOrdEqual %bool %float_0 %81 -OpBranch %78 -%78 = OpLabel -%83 = OpPhi %bool %false %67 %82 %77 -OpSelectionMerge %85 None -OpBranchConditional %83 %84 %85 -%84 = OpLabel -%86 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%87 = OpLoad %v4float %86 -%88 = OpVectorShuffle %v2float %87 %87 0 1 -%89 = OpFOrdEqual %v2bool %19 %88 -%90 = OpAll %bool %89 -OpBranch %85 -%85 = OpLabel -%91 = OpPhi %bool %false %78 %90 %84 -OpSelectionMerge %93 None -OpBranchConditional %91 %92 %93 -%92 = OpLabel -%96 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%97 = OpLoad %v4float %96 -%98 = OpVectorShuffle %v3float %97 %97 0 1 2 -%99 = OpFOrdEqual %v3bool %95 %98 -%100 = OpAll %bool %99 -OpBranch %93 -%93 = OpLabel -%101 = OpPhi %bool %false %85 %100 %92 -OpSelectionMerge %103 None -OpBranchConditional %101 %102 %103 -%102 = OpLabel -%106 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%107 = OpLoad %v4float %106 -%108 = OpFOrdEqual %v4bool %105 %107 -%109 = OpAll %bool %108 -OpBranch %103 -%103 = OpLabel -%110 = OpPhi %bool %false %93 %109 %102 -OpSelectionMerge %115 None -OpBranchConditional %110 %113 %114 -%113 = OpLabel -%116 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%118 = OpLoad %v4float %116 -OpStore %111 %118 -OpBranch %115 -%114 = OpLabel -%119 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%121 = OpLoad %v4float %119 -OpStore %111 %121 -OpBranch %115 -%115 = OpLabel -%122 = OpLoad %v4float %111 -OpReturnValue %122 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %111 = OpVariable %_ptr_Function_v4float Function + %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %28 + %33 = OpCompositeExtract %float %32 0 + %27 = OpExtInst %float %1 Acosh %33 + %34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %36 = OpLoad %v4float %34 + %37 = OpCompositeExtract %float %36 0 + %38 = OpFOrdEqual %bool %27 %37 + OpSelectionMerge %40 None + OpBranchConditional %38 %39 %40 + %39 = OpLabel + %42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %43 = OpLoad %v4float %42 + %44 = OpVectorShuffle %v2float %43 %43 0 1 + %41 = OpExtInst %v2float %1 Acosh %44 + %45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %46 = OpLoad %v4float %45 + %47 = OpVectorShuffle %v2float %46 %46 0 1 + %48 = OpFOrdEqual %v2bool %41 %47 + %50 = OpAll %bool %48 + OpBranch %40 + %40 = OpLabel + %51 = OpPhi %bool %false %25 %50 %39 + OpSelectionMerge %53 None + OpBranchConditional %51 %52 %53 + %52 = OpLabel + %55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %56 = OpLoad %v4float %55 + %57 = OpVectorShuffle %v3float %56 %56 0 1 2 + %54 = OpExtInst %v3float %1 Acosh %57 + %59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %60 = OpLoad %v4float %59 + %61 = OpVectorShuffle %v3float %60 %60 0 1 2 + %62 = OpFOrdEqual %v3bool %54 %61 + %64 = OpAll %bool %62 + OpBranch %53 + %53 = OpLabel + %65 = OpPhi %bool %false %40 %64 %52 + OpSelectionMerge %67 None + OpBranchConditional %65 %66 %67 + %66 = OpLabel + %69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %70 = OpLoad %v4float %69 + %68 = OpExtInst %v4float %1 Acosh %70 + %71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %72 = OpLoad %v4float %71 + %73 = OpFOrdEqual %v4bool %68 %72 + %75 = OpAll %bool %73 + OpBranch %67 + %67 = OpLabel + %76 = OpPhi %bool %false %53 %75 %66 + OpSelectionMerge %78 None + OpBranchConditional %76 %77 %78 + %77 = OpLabel + %79 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %80 = OpLoad %v4float %79 + %81 = OpCompositeExtract %float %80 0 + %82 = OpFOrdEqual %bool %float_0 %81 + OpBranch %78 + %78 = OpLabel + %83 = OpPhi %bool %false %67 %82 %77 + OpSelectionMerge %85 None + OpBranchConditional %83 %84 %85 + %84 = OpLabel + %86 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %87 = OpLoad %v4float %86 + %88 = OpVectorShuffle %v2float %87 %87 0 1 + %89 = OpFOrdEqual %v2bool %19 %88 + %90 = OpAll %bool %89 + OpBranch %85 + %85 = OpLabel + %91 = OpPhi %bool %false %78 %90 %84 + OpSelectionMerge %93 None + OpBranchConditional %91 %92 %93 + %92 = OpLabel + %96 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %97 = OpLoad %v4float %96 + %98 = OpVectorShuffle %v3float %97 %97 0 1 2 + %99 = OpFOrdEqual %v3bool %95 %98 + %100 = OpAll %bool %99 + OpBranch %93 + %93 = OpLabel + %101 = OpPhi %bool %false %85 %100 %92 + OpSelectionMerge %103 None + OpBranchConditional %101 %102 %103 + %102 = OpLabel + %106 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %107 = OpLoad %v4float %106 + %108 = OpFOrdEqual %v4bool %105 %107 + %109 = OpAll %bool %108 + OpBranch %103 + %103 = OpLabel + %110 = OpPhi %bool %false %93 %109 %102 + OpSelectionMerge %115 None + OpBranchConditional %110 %113 %114 + %113 = OpLabel + %116 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %118 = OpLoad %v4float %116 + OpStore %111 %118 + OpBranch %115 + %114 = OpLabel + %119 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %121 = OpLoad %v4float %119 + OpStore %111 %121 + OpBranch %115 + %115 = OpLabel + %122 = OpLoad %v4float %111 + OpReturnValue %122 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Acosh.wgsl b/tests/sksl/intrinsics/Acosh.wgsl new file mode 100644 index 000000000000..ae7a28b6d3f8 --- /dev/null +++ b/tests/sksl/intrinsics/Acosh.wgsl @@ -0,0 +1,30 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + inputVal: vec4, + expected: vec4, + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + let _skTemp0 = acosh(_globalUniforms.inputVal.x); + let _skTemp1 = acosh(_globalUniforms.inputVal.xy); + let _skTemp2 = acosh(_globalUniforms.inputVal.xyz); + let _skTemp3 = acosh(_globalUniforms.inputVal); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((_skTemp0 == _globalUniforms.expected.x) && all(_skTemp1 == _globalUniforms.expected.xy)) && all(_skTemp2 == _globalUniforms.expected.xyz)) && all(_skTemp3 == _globalUniforms.expected)) && (0.0 == _globalUniforms.expected.x)) && all(vec2(0.0) == _globalUniforms.expected.xy)) && all(vec3(0.0, 0.0, 1.0) == _globalUniforms.expected.xyz)) && all(vec4(0.0, 0.0, 1.0, 2.0) == _globalUniforms.expected))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/intrinsics/All.asm.frag b/tests/sksl/intrinsics/All.asm.frag index 244de7e8d3c1..3de607c2938a 100644 --- a/tests/sksl/intrinsics/All.asm.frag +++ b/tests/sksl/intrinsics/All.asm.frag @@ -1,168 +1,168 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %inputVal "inputVal" -OpName %expected "expected" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %33 RelaxedPrecision -OpDecorate %34 RelaxedPrecision -OpDecorate %35 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %39 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %48 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %97 RelaxedPrecision -OpDecorate %99 RelaxedPrecision -OpDecorate %100 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %inputVal "inputVal" + OpName %expected "expected" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %33 RelaxedPrecision + OpDecorate %34 RelaxedPrecision + OpDecorate %35 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %48 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %97 RelaxedPrecision + OpDecorate %99 RelaxedPrecision + OpDecorate %100 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%v4bool = OpTypeVector %bool 4 + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %v4bool = OpTypeVector %bool 4 %_ptr_Function_v4bool = OpTypePointer Function %v4bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_1 = OpConstant %int 1 -%false = OpConstantFalse %bool -%v2bool = OpTypeVector %bool 2 -%v3bool = OpTypeVector %bool 3 + %int = OpTypeInt 32 1 + %int_1 = OpConstant %int 1 + %false = OpConstantFalse %bool + %v2bool = OpTypeVector %bool 2 + %v3bool = OpTypeVector %bool 3 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_0 = OpConstant %int 0 + %int_0 = OpConstant %int 0 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%inputVal = OpVariable %_ptr_Function_v4bool Function -%expected = OpVariable %_ptr_Function_v4bool Function -%90 = OpVariable %_ptr_Function_v4float Function -%29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%33 = OpLoad %v4float %29 -%34 = OpVectorShuffle %v4float %33 %33 0 0 2 3 -%35 = OpCompositeExtract %float %34 0 -%36 = OpFUnordNotEqual %bool %35 %float_0 -%37 = OpCompositeExtract %float %34 1 -%38 = OpFUnordNotEqual %bool %37 %float_0 -%39 = OpCompositeExtract %float %34 2 -%40 = OpFUnordNotEqual %bool %39 %float_0 -%41 = OpCompositeExtract %float %34 3 -%42 = OpFUnordNotEqual %bool %41 %float_0 -%43 = OpCompositeConstruct %v4bool %36 %38 %40 %42 -OpStore %inputVal %43 -%45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%46 = OpLoad %v4float %45 -%47 = OpVectorShuffle %v4float %46 %46 0 1 2 2 -%48 = OpCompositeExtract %float %47 0 -%49 = OpFUnordNotEqual %bool %48 %float_0 -%50 = OpCompositeExtract %float %47 1 -%51 = OpFUnordNotEqual %bool %50 %float_0 -%52 = OpCompositeExtract %float %47 2 -%53 = OpFUnordNotEqual %bool %52 %float_0 -%54 = OpCompositeExtract %float %47 3 -%55 = OpFUnordNotEqual %bool %54 %float_0 -%56 = OpCompositeConstruct %v4bool %49 %51 %53 %55 -OpStore %expected %56 -%59 = OpVectorShuffle %v2bool %43 %43 0 1 -%58 = OpAll %bool %59 -%61 = OpCompositeExtract %bool %56 0 -%62 = OpLogicalEqual %bool %58 %61 -OpSelectionMerge %64 None -OpBranchConditional %62 %63 %64 -%63 = OpLabel -%66 = OpVectorShuffle %v3bool %43 %43 0 1 2 -%65 = OpAll %bool %66 -%68 = OpCompositeExtract %bool %56 1 -%69 = OpLogicalEqual %bool %65 %68 -OpBranch %64 -%64 = OpLabel -%70 = OpPhi %bool %false %25 %69 %63 -OpSelectionMerge %72 None -OpBranchConditional %70 %71 %72 -%71 = OpLabel -%73 = OpAll %bool %43 -%74 = OpCompositeExtract %bool %56 2 -%75 = OpLogicalEqual %bool %73 %74 -OpBranch %72 -%72 = OpLabel -%76 = OpPhi %bool %false %64 %75 %71 -OpSelectionMerge %78 None -OpBranchConditional %76 %77 %78 -%77 = OpLabel -OpBranch %78 -%78 = OpLabel -%79 = OpPhi %bool %false %72 %61 %77 -OpSelectionMerge %81 None -OpBranchConditional %79 %80 %81 -%80 = OpLabel -%82 = OpCompositeExtract %bool %56 1 -%83 = OpLogicalEqual %bool %false %82 -OpBranch %81 -%81 = OpLabel -%84 = OpPhi %bool %false %78 %83 %80 -OpSelectionMerge %86 None -OpBranchConditional %84 %85 %86 -%85 = OpLabel -%87 = OpCompositeExtract %bool %56 2 -%88 = OpLogicalEqual %bool %false %87 -OpBranch %86 -%86 = OpLabel -%89 = OpPhi %bool %false %81 %88 %85 -OpSelectionMerge %94 None -OpBranchConditional %89 %92 %93 -%92 = OpLabel -%95 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%97 = OpLoad %v4float %95 -OpStore %90 %97 -OpBranch %94 -%93 = OpLabel -%98 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%99 = OpLoad %v4float %98 -OpStore %90 %99 -OpBranch %94 -%94 = OpLabel -%100 = OpLoad %v4float %90 -OpReturnValue %100 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %inputVal = OpVariable %_ptr_Function_v4bool Function + %expected = OpVariable %_ptr_Function_v4bool Function + %90 = OpVariable %_ptr_Function_v4float Function + %29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %33 = OpLoad %v4float %29 + %34 = OpVectorShuffle %v4float %33 %33 0 0 2 3 + %35 = OpCompositeExtract %float %34 0 + %36 = OpFUnordNotEqual %bool %35 %float_0 + %37 = OpCompositeExtract %float %34 1 + %38 = OpFUnordNotEqual %bool %37 %float_0 + %39 = OpCompositeExtract %float %34 2 + %40 = OpFUnordNotEqual %bool %39 %float_0 + %41 = OpCompositeExtract %float %34 3 + %42 = OpFUnordNotEqual %bool %41 %float_0 + %43 = OpCompositeConstruct %v4bool %36 %38 %40 %42 + OpStore %inputVal %43 + %45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %46 = OpLoad %v4float %45 + %47 = OpVectorShuffle %v4float %46 %46 0 1 2 2 + %48 = OpCompositeExtract %float %47 0 + %49 = OpFUnordNotEqual %bool %48 %float_0 + %50 = OpCompositeExtract %float %47 1 + %51 = OpFUnordNotEqual %bool %50 %float_0 + %52 = OpCompositeExtract %float %47 2 + %53 = OpFUnordNotEqual %bool %52 %float_0 + %54 = OpCompositeExtract %float %47 3 + %55 = OpFUnordNotEqual %bool %54 %float_0 + %56 = OpCompositeConstruct %v4bool %49 %51 %53 %55 + OpStore %expected %56 + %59 = OpVectorShuffle %v2bool %43 %43 0 1 + %58 = OpAll %bool %59 + %61 = OpCompositeExtract %bool %56 0 + %62 = OpLogicalEqual %bool %58 %61 + OpSelectionMerge %64 None + OpBranchConditional %62 %63 %64 + %63 = OpLabel + %66 = OpVectorShuffle %v3bool %43 %43 0 1 2 + %65 = OpAll %bool %66 + %68 = OpCompositeExtract %bool %56 1 + %69 = OpLogicalEqual %bool %65 %68 + OpBranch %64 + %64 = OpLabel + %70 = OpPhi %bool %false %25 %69 %63 + OpSelectionMerge %72 None + OpBranchConditional %70 %71 %72 + %71 = OpLabel + %73 = OpAll %bool %43 + %74 = OpCompositeExtract %bool %56 2 + %75 = OpLogicalEqual %bool %73 %74 + OpBranch %72 + %72 = OpLabel + %76 = OpPhi %bool %false %64 %75 %71 + OpSelectionMerge %78 None + OpBranchConditional %76 %77 %78 + %77 = OpLabel + OpBranch %78 + %78 = OpLabel + %79 = OpPhi %bool %false %72 %61 %77 + OpSelectionMerge %81 None + OpBranchConditional %79 %80 %81 + %80 = OpLabel + %82 = OpCompositeExtract %bool %56 1 + %83 = OpLogicalEqual %bool %false %82 + OpBranch %81 + %81 = OpLabel + %84 = OpPhi %bool %false %78 %83 %80 + OpSelectionMerge %86 None + OpBranchConditional %84 %85 %86 + %85 = OpLabel + %87 = OpCompositeExtract %bool %56 2 + %88 = OpLogicalEqual %bool %false %87 + OpBranch %86 + %86 = OpLabel + %89 = OpPhi %bool %false %81 %88 %85 + OpSelectionMerge %94 None + OpBranchConditional %89 %92 %93 + %92 = OpLabel + %95 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %97 = OpLoad %v4float %95 + OpStore %90 %97 + OpBranch %94 + %93 = OpLabel + %98 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %99 = OpLoad %v4float %98 + OpStore %90 %99 + OpBranch %94 + %94 = OpLabel + %100 = OpLoad %v4float %90 + OpReturnValue %100 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/All.skrp b/tests/sksl/intrinsics/All.skrp index a90ae55a6bae..ad05f699a3c4 100644 --- a/tests/sksl/intrinsics/All.skrp +++ b/tests/sksl/intrinsics/All.skrp @@ -1,3 +1,5 @@ +41 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_4_uniforms $0..3 = colorRed diff --git a/tests/sksl/intrinsics/All.wgsl b/tests/sksl/intrinsics/All.wgsl new file mode 100644 index 000000000000..5dce07c694eb --- /dev/null +++ b/tests/sksl/intrinsics/All.wgsl @@ -0,0 +1,29 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var inputVal: vec4 = vec4(_globalUniforms.colorRed.xxzw); + var expected: vec4 = vec4(_globalUniforms.colorRed.xyzz); + let _skTemp0 = all(inputVal.xy); + let _skTemp1 = all(inputVal.xyz); + let _skTemp2 = all(inputVal); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((_skTemp0 == expected.x) && (_skTemp1 == expected.y)) && (_skTemp2 == expected.z)) && expected.x) && (false == expected.y)) && (false == expected.z))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/intrinsics/Any.asm.frag b/tests/sksl/intrinsics/Any.asm.frag index 20f06586b307..d2bcf69304b1 100644 --- a/tests/sksl/intrinsics/Any.asm.frag +++ b/tests/sksl/intrinsics/Any.asm.frag @@ -1,167 +1,167 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %inputVal "inputVal" -OpName %expected "expected" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %33 RelaxedPrecision -OpDecorate %34 RelaxedPrecision -OpDecorate %35 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %39 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %48 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %95 RelaxedPrecision -OpDecorate %98 RelaxedPrecision -OpDecorate %99 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %inputVal "inputVal" + OpName %expected "expected" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %33 RelaxedPrecision + OpDecorate %34 RelaxedPrecision + OpDecorate %35 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %48 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %95 RelaxedPrecision + OpDecorate %98 RelaxedPrecision + OpDecorate %99 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%v4bool = OpTypeVector %bool 4 + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %v4bool = OpTypeVector %bool 4 %_ptr_Function_v4bool = OpTypePointer Function %v4bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%false = OpConstantFalse %bool -%v2bool = OpTypeVector %bool 2 -%v3bool = OpTypeVector %bool 3 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %false = OpConstantFalse %bool + %v2bool = OpTypeVector %bool 2 + %v3bool = OpTypeVector %bool 3 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_1 = OpConstant %int 1 + %int_1 = OpConstant %int 1 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%inputVal = OpVariable %_ptr_Function_v4bool Function -%expected = OpVariable %_ptr_Function_v4bool Function -%89 = OpVariable %_ptr_Function_v4float Function -%29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%33 = OpLoad %v4float %29 -%34 = OpVectorShuffle %v4float %33 %33 0 0 1 2 -%35 = OpCompositeExtract %float %34 0 -%36 = OpFUnordNotEqual %bool %35 %float_0 -%37 = OpCompositeExtract %float %34 1 -%38 = OpFUnordNotEqual %bool %37 %float_0 -%39 = OpCompositeExtract %float %34 2 -%40 = OpFUnordNotEqual %bool %39 %float_0 -%41 = OpCompositeExtract %float %34 3 -%42 = OpFUnordNotEqual %bool %41 %float_0 -%43 = OpCompositeConstruct %v4bool %36 %38 %40 %42 -OpStore %inputVal %43 -%45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%46 = OpLoad %v4float %45 -%47 = OpVectorShuffle %v4float %46 %46 0 1 1 3 -%48 = OpCompositeExtract %float %47 0 -%49 = OpFUnordNotEqual %bool %48 %float_0 -%50 = OpCompositeExtract %float %47 1 -%51 = OpFUnordNotEqual %bool %50 %float_0 -%52 = OpCompositeExtract %float %47 2 -%53 = OpFUnordNotEqual %bool %52 %float_0 -%54 = OpCompositeExtract %float %47 3 -%55 = OpFUnordNotEqual %bool %54 %float_0 -%56 = OpCompositeConstruct %v4bool %49 %51 %53 %55 -OpStore %expected %56 -%59 = OpVectorShuffle %v2bool %43 %43 0 1 -%58 = OpAny %bool %59 -%61 = OpCompositeExtract %bool %56 0 -%62 = OpLogicalEqual %bool %58 %61 -OpSelectionMerge %64 None -OpBranchConditional %62 %63 %64 -%63 = OpLabel -%66 = OpVectorShuffle %v3bool %43 %43 0 1 2 -%65 = OpAny %bool %66 -%68 = OpCompositeExtract %bool %56 1 -%69 = OpLogicalEqual %bool %65 %68 -OpBranch %64 -%64 = OpLabel -%70 = OpPhi %bool %false %25 %69 %63 -OpSelectionMerge %72 None -OpBranchConditional %70 %71 %72 -%71 = OpLabel -%73 = OpAny %bool %43 -%74 = OpCompositeExtract %bool %56 2 -%75 = OpLogicalEqual %bool %73 %74 -OpBranch %72 -%72 = OpLabel -%76 = OpPhi %bool %false %64 %75 %71 -OpSelectionMerge %78 None -OpBranchConditional %76 %77 %78 -%77 = OpLabel -%79 = OpLogicalEqual %bool %false %61 -OpBranch %78 -%78 = OpLabel -%80 = OpPhi %bool %false %72 %79 %77 -OpSelectionMerge %82 None -OpBranchConditional %80 %81 %82 -%81 = OpLabel -%83 = OpCompositeExtract %bool %56 1 -OpBranch %82 -%82 = OpLabel -%84 = OpPhi %bool %false %78 %83 %81 -OpSelectionMerge %86 None -OpBranchConditional %84 %85 %86 -%85 = OpLabel -%87 = OpCompositeExtract %bool %56 2 -OpBranch %86 -%86 = OpLabel -%88 = OpPhi %bool %false %82 %87 %85 -OpSelectionMerge %93 None -OpBranchConditional %88 %91 %92 -%91 = OpLabel -%94 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%95 = OpLoad %v4float %94 -OpStore %89 %95 -OpBranch %93 -%92 = OpLabel -%96 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%98 = OpLoad %v4float %96 -OpStore %89 %98 -OpBranch %93 -%93 = OpLabel -%99 = OpLoad %v4float %89 -OpReturnValue %99 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %inputVal = OpVariable %_ptr_Function_v4bool Function + %expected = OpVariable %_ptr_Function_v4bool Function + %89 = OpVariable %_ptr_Function_v4float Function + %29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %33 = OpLoad %v4float %29 + %34 = OpVectorShuffle %v4float %33 %33 0 0 1 2 + %35 = OpCompositeExtract %float %34 0 + %36 = OpFUnordNotEqual %bool %35 %float_0 + %37 = OpCompositeExtract %float %34 1 + %38 = OpFUnordNotEqual %bool %37 %float_0 + %39 = OpCompositeExtract %float %34 2 + %40 = OpFUnordNotEqual %bool %39 %float_0 + %41 = OpCompositeExtract %float %34 3 + %42 = OpFUnordNotEqual %bool %41 %float_0 + %43 = OpCompositeConstruct %v4bool %36 %38 %40 %42 + OpStore %inputVal %43 + %45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %46 = OpLoad %v4float %45 + %47 = OpVectorShuffle %v4float %46 %46 0 1 1 3 + %48 = OpCompositeExtract %float %47 0 + %49 = OpFUnordNotEqual %bool %48 %float_0 + %50 = OpCompositeExtract %float %47 1 + %51 = OpFUnordNotEqual %bool %50 %float_0 + %52 = OpCompositeExtract %float %47 2 + %53 = OpFUnordNotEqual %bool %52 %float_0 + %54 = OpCompositeExtract %float %47 3 + %55 = OpFUnordNotEqual %bool %54 %float_0 + %56 = OpCompositeConstruct %v4bool %49 %51 %53 %55 + OpStore %expected %56 + %59 = OpVectorShuffle %v2bool %43 %43 0 1 + %58 = OpAny %bool %59 + %61 = OpCompositeExtract %bool %56 0 + %62 = OpLogicalEqual %bool %58 %61 + OpSelectionMerge %64 None + OpBranchConditional %62 %63 %64 + %63 = OpLabel + %66 = OpVectorShuffle %v3bool %43 %43 0 1 2 + %65 = OpAny %bool %66 + %68 = OpCompositeExtract %bool %56 1 + %69 = OpLogicalEqual %bool %65 %68 + OpBranch %64 + %64 = OpLabel + %70 = OpPhi %bool %false %25 %69 %63 + OpSelectionMerge %72 None + OpBranchConditional %70 %71 %72 + %71 = OpLabel + %73 = OpAny %bool %43 + %74 = OpCompositeExtract %bool %56 2 + %75 = OpLogicalEqual %bool %73 %74 + OpBranch %72 + %72 = OpLabel + %76 = OpPhi %bool %false %64 %75 %71 + OpSelectionMerge %78 None + OpBranchConditional %76 %77 %78 + %77 = OpLabel + %79 = OpLogicalEqual %bool %false %61 + OpBranch %78 + %78 = OpLabel + %80 = OpPhi %bool %false %72 %79 %77 + OpSelectionMerge %82 None + OpBranchConditional %80 %81 %82 + %81 = OpLabel + %83 = OpCompositeExtract %bool %56 1 + OpBranch %82 + %82 = OpLabel + %84 = OpPhi %bool %false %78 %83 %81 + OpSelectionMerge %86 None + OpBranchConditional %84 %85 %86 + %85 = OpLabel + %87 = OpCompositeExtract %bool %56 2 + OpBranch %86 + %86 = OpLabel + %88 = OpPhi %bool %false %82 %87 %85 + OpSelectionMerge %93 None + OpBranchConditional %88 %91 %92 + %91 = OpLabel + %94 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %95 = OpLoad %v4float %94 + OpStore %89 %95 + OpBranch %93 + %92 = OpLabel + %96 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %98 = OpLoad %v4float %96 + OpStore %89 %98 + OpBranch %93 + %93 = OpLabel + %99 = OpLoad %v4float %89 + OpReturnValue %99 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Any.skrp b/tests/sksl/intrinsics/Any.skrp index a4e705a0db08..9a93c9bd8c57 100644 --- a/tests/sksl/intrinsics/Any.skrp +++ b/tests/sksl/intrinsics/Any.skrp @@ -1,3 +1,5 @@ +40 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_4_uniforms $0..3 = colorGreen diff --git a/tests/sksl/intrinsics/Any.wgsl b/tests/sksl/intrinsics/Any.wgsl new file mode 100644 index 000000000000..2a6b75687bd4 --- /dev/null +++ b/tests/sksl/intrinsics/Any.wgsl @@ -0,0 +1,29 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var inputVal: vec4 = vec4(_globalUniforms.colorGreen.xxyz); + var expected: vec4 = vec4(_globalUniforms.colorGreen.xyyw); + let _skTemp0 = any(inputVal.xy); + let _skTemp1 = any(inputVal.xyz); + let _skTemp2 = any(inputVal); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((_skTemp0 == expected.x) && (_skTemp1 == expected.y)) && (_skTemp2 == expected.z)) && (false == expected.x)) && expected.y) && expected.z)); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/intrinsics/Asin.asm.frag b/tests/sksl/intrinsics/Asin.asm.frag index 11b97dda5033..da9e5e0fd152 100644 --- a/tests/sksl/intrinsics/Asin.asm.frag +++ b/tests/sksl/intrinsics/Asin.asm.frag @@ -1,209 +1,209 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "inputVal" -OpMemberName %_UniformBuffer 1 "expected" -OpMemberName %_UniformBuffer 2 "colorGreen" -OpMemberName %_UniformBuffer 3 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 3 Offset 48 -OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %27 RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %80 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %87 RelaxedPrecision -OpDecorate %88 RelaxedPrecision -OpDecorate %96 RelaxedPrecision -OpDecorate %97 RelaxedPrecision -OpDecorate %105 RelaxedPrecision -OpDecorate %116 RelaxedPrecision -OpDecorate %119 RelaxedPrecision -OpDecorate %120 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "inputVal" + OpMemberName %_UniformBuffer 1 "expected" + OpMemberName %_UniformBuffer 2 "colorGreen" + OpMemberName %_UniformBuffer 3 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 3 Offset 48 + OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %27 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %80 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %87 RelaxedPrecision + OpDecorate %88 RelaxedPrecision + OpDecorate %96 RelaxedPrecision + OpDecorate %97 RelaxedPrecision + OpDecorate %105 RelaxedPrecision + OpDecorate %116 RelaxedPrecision + OpDecorate %119 RelaxedPrecision + OpDecorate %120 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%false = OpConstantFalse %bool + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%v3bool = OpTypeVector %bool 3 -%v4bool = OpTypeVector %bool 4 -%94 = OpConstantComposite %v3float %float_0 %float_0 %float_0 -%103 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %v3bool = OpTypeVector %bool 3 + %v4bool = OpTypeVector %bool 4 + %94 = OpConstantComposite %v3float %float_0 %float_0 %float_0 + %103 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_2 = OpConstant %int 2 -%int_3 = OpConstant %int 3 + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%109 = OpVariable %_ptr_Function_v4float Function -%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %28 -%33 = OpCompositeExtract %float %32 0 -%27 = OpExtInst %float %1 Asin %33 -%34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%36 = OpLoad %v4float %34 -%37 = OpCompositeExtract %float %36 0 -%38 = OpFOrdEqual %bool %27 %37 -OpSelectionMerge %40 None -OpBranchConditional %38 %39 %40 -%39 = OpLabel -%42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%43 = OpLoad %v4float %42 -%44 = OpVectorShuffle %v2float %43 %43 0 1 -%41 = OpExtInst %v2float %1 Asin %44 -%45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%46 = OpLoad %v4float %45 -%47 = OpVectorShuffle %v2float %46 %46 0 1 -%48 = OpFOrdEqual %v2bool %41 %47 -%50 = OpAll %bool %48 -OpBranch %40 -%40 = OpLabel -%51 = OpPhi %bool %false %25 %50 %39 -OpSelectionMerge %53 None -OpBranchConditional %51 %52 %53 -%52 = OpLabel -%55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%56 = OpLoad %v4float %55 -%57 = OpVectorShuffle %v3float %56 %56 0 1 2 -%54 = OpExtInst %v3float %1 Asin %57 -%59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%60 = OpLoad %v4float %59 -%61 = OpVectorShuffle %v3float %60 %60 0 1 2 -%62 = OpFOrdEqual %v3bool %54 %61 -%64 = OpAll %bool %62 -OpBranch %53 -%53 = OpLabel -%65 = OpPhi %bool %false %40 %64 %52 -OpSelectionMerge %67 None -OpBranchConditional %65 %66 %67 -%66 = OpLabel -%69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%70 = OpLoad %v4float %69 -%68 = OpExtInst %v4float %1 Asin %70 -%71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%72 = OpLoad %v4float %71 -%73 = OpFOrdEqual %v4bool %68 %72 -%75 = OpAll %bool %73 -OpBranch %67 -%67 = OpLabel -%76 = OpPhi %bool %false %53 %75 %66 -OpSelectionMerge %78 None -OpBranchConditional %76 %77 %78 -%77 = OpLabel -%79 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%80 = OpLoad %v4float %79 -%81 = OpCompositeExtract %float %80 0 -%82 = OpFOrdEqual %bool %float_0 %81 -OpBranch %78 -%78 = OpLabel -%83 = OpPhi %bool %false %67 %82 %77 -OpSelectionMerge %85 None -OpBranchConditional %83 %84 %85 -%84 = OpLabel -%86 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%87 = OpLoad %v4float %86 -%88 = OpVectorShuffle %v2float %87 %87 0 1 -%89 = OpFOrdEqual %v2bool %19 %88 -%90 = OpAll %bool %89 -OpBranch %85 -%85 = OpLabel -%91 = OpPhi %bool %false %78 %90 %84 -OpSelectionMerge %93 None -OpBranchConditional %91 %92 %93 -%92 = OpLabel -%95 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%96 = OpLoad %v4float %95 -%97 = OpVectorShuffle %v3float %96 %96 0 1 2 -%98 = OpFOrdEqual %v3bool %94 %97 -%99 = OpAll %bool %98 -OpBranch %93 -%93 = OpLabel -%100 = OpPhi %bool %false %85 %99 %92 -OpSelectionMerge %102 None -OpBranchConditional %100 %101 %102 -%101 = OpLabel -%104 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%105 = OpLoad %v4float %104 -%106 = OpFOrdEqual %v4bool %103 %105 -%107 = OpAll %bool %106 -OpBranch %102 -%102 = OpLabel -%108 = OpPhi %bool %false %93 %107 %101 -OpSelectionMerge %113 None -OpBranchConditional %108 %111 %112 -%111 = OpLabel -%114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%116 = OpLoad %v4float %114 -OpStore %109 %116 -OpBranch %113 -%112 = OpLabel -%117 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%119 = OpLoad %v4float %117 -OpStore %109 %119 -OpBranch %113 -%113 = OpLabel -%120 = OpLoad %v4float %109 -OpReturnValue %120 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %109 = OpVariable %_ptr_Function_v4float Function + %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %28 + %33 = OpCompositeExtract %float %32 0 + %27 = OpExtInst %float %1 Asin %33 + %34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %36 = OpLoad %v4float %34 + %37 = OpCompositeExtract %float %36 0 + %38 = OpFOrdEqual %bool %27 %37 + OpSelectionMerge %40 None + OpBranchConditional %38 %39 %40 + %39 = OpLabel + %42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %43 = OpLoad %v4float %42 + %44 = OpVectorShuffle %v2float %43 %43 0 1 + %41 = OpExtInst %v2float %1 Asin %44 + %45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %46 = OpLoad %v4float %45 + %47 = OpVectorShuffle %v2float %46 %46 0 1 + %48 = OpFOrdEqual %v2bool %41 %47 + %50 = OpAll %bool %48 + OpBranch %40 + %40 = OpLabel + %51 = OpPhi %bool %false %25 %50 %39 + OpSelectionMerge %53 None + OpBranchConditional %51 %52 %53 + %52 = OpLabel + %55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %56 = OpLoad %v4float %55 + %57 = OpVectorShuffle %v3float %56 %56 0 1 2 + %54 = OpExtInst %v3float %1 Asin %57 + %59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %60 = OpLoad %v4float %59 + %61 = OpVectorShuffle %v3float %60 %60 0 1 2 + %62 = OpFOrdEqual %v3bool %54 %61 + %64 = OpAll %bool %62 + OpBranch %53 + %53 = OpLabel + %65 = OpPhi %bool %false %40 %64 %52 + OpSelectionMerge %67 None + OpBranchConditional %65 %66 %67 + %66 = OpLabel + %69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %70 = OpLoad %v4float %69 + %68 = OpExtInst %v4float %1 Asin %70 + %71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %72 = OpLoad %v4float %71 + %73 = OpFOrdEqual %v4bool %68 %72 + %75 = OpAll %bool %73 + OpBranch %67 + %67 = OpLabel + %76 = OpPhi %bool %false %53 %75 %66 + OpSelectionMerge %78 None + OpBranchConditional %76 %77 %78 + %77 = OpLabel + %79 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %80 = OpLoad %v4float %79 + %81 = OpCompositeExtract %float %80 0 + %82 = OpFOrdEqual %bool %float_0 %81 + OpBranch %78 + %78 = OpLabel + %83 = OpPhi %bool %false %67 %82 %77 + OpSelectionMerge %85 None + OpBranchConditional %83 %84 %85 + %84 = OpLabel + %86 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %87 = OpLoad %v4float %86 + %88 = OpVectorShuffle %v2float %87 %87 0 1 + %89 = OpFOrdEqual %v2bool %19 %88 + %90 = OpAll %bool %89 + OpBranch %85 + %85 = OpLabel + %91 = OpPhi %bool %false %78 %90 %84 + OpSelectionMerge %93 None + OpBranchConditional %91 %92 %93 + %92 = OpLabel + %95 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %96 = OpLoad %v4float %95 + %97 = OpVectorShuffle %v3float %96 %96 0 1 2 + %98 = OpFOrdEqual %v3bool %94 %97 + %99 = OpAll %bool %98 + OpBranch %93 + %93 = OpLabel + %100 = OpPhi %bool %false %85 %99 %92 + OpSelectionMerge %102 None + OpBranchConditional %100 %101 %102 + %101 = OpLabel + %104 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %105 = OpLoad %v4float %104 + %106 = OpFOrdEqual %v4bool %103 %105 + %107 = OpAll %bool %106 + OpBranch %102 + %102 = OpLabel + %108 = OpPhi %bool %false %93 %107 %101 + OpSelectionMerge %113 None + OpBranchConditional %108 %111 %112 + %111 = OpLabel + %114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %116 = OpLoad %v4float %114 + OpStore %109 %116 + OpBranch %113 + %112 = OpLabel + %117 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %119 = OpLoad %v4float %117 + OpStore %109 %119 + OpBranch %113 + %113 = OpLabel + %120 = OpLoad %v4float %109 + OpReturnValue %120 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Asin.skrp b/tests/sksl/intrinsics/Asin.skrp index 00a1f8f1d44c..bbf84423e0da 100644 --- a/tests/sksl/intrinsics/Asin.skrp +++ b/tests/sksl/intrinsics/Asin.skrp @@ -1,3 +1,5 @@ +57 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_uniform $4 = inputVal(0) diff --git a/tests/sksl/intrinsics/Asin.wgsl b/tests/sksl/intrinsics/Asin.wgsl index c8e17585575e..550ef3d2af6e 100644 --- a/tests/sksl/intrinsics/Asin.wgsl +++ b/tests/sksl/intrinsics/Asin.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -19,7 +20,7 @@ fn main(_skParam0: vec2) -> vec4 { let _skTemp1 = asin(_globalUniforms.inputVal.xy); let _skTemp2 = asin(_globalUniforms.inputVal.xyz); let _skTemp3 = asin(_globalUniforms.inputVal); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((_skTemp0 == _globalUniforms.expected.x && all(_skTemp1 == _globalUniforms.expected.xy)) && all(_skTemp2 == _globalUniforms.expected.xyz)) && all(_skTemp3 == _globalUniforms.expected)) && 0.0 == _globalUniforms.expected.x) && all(vec2(0.0) == _globalUniforms.expected.xy)) && all(vec3(0.0) == _globalUniforms.expected.xyz)) && all(vec4(0.0) == _globalUniforms.expected))); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((_skTemp0 == _globalUniforms.expected.x) && all(_skTemp1 == _globalUniforms.expected.xy)) && all(_skTemp2 == _globalUniforms.expected.xyz)) && all(_skTemp3 == _globalUniforms.expected)) && (0.0 == _globalUniforms.expected.x)) && all(vec2(0.0) == _globalUniforms.expected.xy)) && all(vec3(0.0) == _globalUniforms.expected.xyz)) && all(vec4(0.0) == _globalUniforms.expected))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/intrinsics/Asinh.asm.frag b/tests/sksl/intrinsics/Asinh.asm.frag index 9b9f1c14175a..f8cdd75b769e 100644 --- a/tests/sksl/intrinsics/Asinh.asm.frag +++ b/tests/sksl/intrinsics/Asinh.asm.frag @@ -1,211 +1,211 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "inputVal" -OpMemberName %_UniformBuffer 1 "expected" -OpMemberName %_UniformBuffer 2 "colorGreen" -OpMemberName %_UniformBuffer 3 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 3 Offset 48 -OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %27 RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %80 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %87 RelaxedPrecision -OpDecorate %88 RelaxedPrecision -OpDecorate %97 RelaxedPrecision -OpDecorate %98 RelaxedPrecision -OpDecorate %107 RelaxedPrecision -OpDecorate %118 RelaxedPrecision -OpDecorate %121 RelaxedPrecision -OpDecorate %122 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "inputVal" + OpMemberName %_UniformBuffer 1 "expected" + OpMemberName %_UniformBuffer 2 "colorGreen" + OpMemberName %_UniformBuffer 3 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 3 Offset 48 + OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %27 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %80 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %87 RelaxedPrecision + OpDecorate %88 RelaxedPrecision + OpDecorate %97 RelaxedPrecision + OpDecorate %98 RelaxedPrecision + OpDecorate %107 RelaxedPrecision + OpDecorate %118 RelaxedPrecision + OpDecorate %121 RelaxedPrecision + OpDecorate %122 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%false = OpConstantFalse %bool + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%v3bool = OpTypeVector %bool 3 -%v4bool = OpTypeVector %bool 4 -%float_1 = OpConstant %float 1 -%95 = OpConstantComposite %v3float %float_0 %float_0 %float_1 -%float_n1 = OpConstant %float -1 -%105 = OpConstantComposite %v4float %float_0 %float_0 %float_1 %float_n1 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %v3bool = OpTypeVector %bool 3 + %v4bool = OpTypeVector %bool 4 + %float_1 = OpConstant %float 1 + %95 = OpConstantComposite %v3float %float_0 %float_0 %float_1 + %float_n1 = OpConstant %float -1 + %105 = OpConstantComposite %v4float %float_0 %float_0 %float_1 %float_n1 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_2 = OpConstant %int 2 -%int_3 = OpConstant %int 3 + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%111 = OpVariable %_ptr_Function_v4float Function -%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %28 -%33 = OpCompositeExtract %float %32 0 -%27 = OpExtInst %float %1 Asinh %33 -%34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%36 = OpLoad %v4float %34 -%37 = OpCompositeExtract %float %36 0 -%38 = OpFOrdEqual %bool %27 %37 -OpSelectionMerge %40 None -OpBranchConditional %38 %39 %40 -%39 = OpLabel -%42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%43 = OpLoad %v4float %42 -%44 = OpVectorShuffle %v2float %43 %43 0 1 -%41 = OpExtInst %v2float %1 Asinh %44 -%45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%46 = OpLoad %v4float %45 -%47 = OpVectorShuffle %v2float %46 %46 0 1 -%48 = OpFOrdEqual %v2bool %41 %47 -%50 = OpAll %bool %48 -OpBranch %40 -%40 = OpLabel -%51 = OpPhi %bool %false %25 %50 %39 -OpSelectionMerge %53 None -OpBranchConditional %51 %52 %53 -%52 = OpLabel -%55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%56 = OpLoad %v4float %55 -%57 = OpVectorShuffle %v3float %56 %56 0 1 2 -%54 = OpExtInst %v3float %1 Asinh %57 -%59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%60 = OpLoad %v4float %59 -%61 = OpVectorShuffle %v3float %60 %60 0 1 2 -%62 = OpFOrdEqual %v3bool %54 %61 -%64 = OpAll %bool %62 -OpBranch %53 -%53 = OpLabel -%65 = OpPhi %bool %false %40 %64 %52 -OpSelectionMerge %67 None -OpBranchConditional %65 %66 %67 -%66 = OpLabel -%69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%70 = OpLoad %v4float %69 -%68 = OpExtInst %v4float %1 Asinh %70 -%71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%72 = OpLoad %v4float %71 -%73 = OpFOrdEqual %v4bool %68 %72 -%75 = OpAll %bool %73 -OpBranch %67 -%67 = OpLabel -%76 = OpPhi %bool %false %53 %75 %66 -OpSelectionMerge %78 None -OpBranchConditional %76 %77 %78 -%77 = OpLabel -%79 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%80 = OpLoad %v4float %79 -%81 = OpCompositeExtract %float %80 0 -%82 = OpFOrdEqual %bool %float_0 %81 -OpBranch %78 -%78 = OpLabel -%83 = OpPhi %bool %false %67 %82 %77 -OpSelectionMerge %85 None -OpBranchConditional %83 %84 %85 -%84 = OpLabel -%86 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%87 = OpLoad %v4float %86 -%88 = OpVectorShuffle %v2float %87 %87 0 1 -%89 = OpFOrdEqual %v2bool %19 %88 -%90 = OpAll %bool %89 -OpBranch %85 -%85 = OpLabel -%91 = OpPhi %bool %false %78 %90 %84 -OpSelectionMerge %93 None -OpBranchConditional %91 %92 %93 -%92 = OpLabel -%96 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%97 = OpLoad %v4float %96 -%98 = OpVectorShuffle %v3float %97 %97 0 1 2 -%99 = OpFOrdEqual %v3bool %95 %98 -%100 = OpAll %bool %99 -OpBranch %93 -%93 = OpLabel -%101 = OpPhi %bool %false %85 %100 %92 -OpSelectionMerge %103 None -OpBranchConditional %101 %102 %103 -%102 = OpLabel -%106 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%107 = OpLoad %v4float %106 -%108 = OpFOrdEqual %v4bool %105 %107 -%109 = OpAll %bool %108 -OpBranch %103 -%103 = OpLabel -%110 = OpPhi %bool %false %93 %109 %102 -OpSelectionMerge %115 None -OpBranchConditional %110 %113 %114 -%113 = OpLabel -%116 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%118 = OpLoad %v4float %116 -OpStore %111 %118 -OpBranch %115 -%114 = OpLabel -%119 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%121 = OpLoad %v4float %119 -OpStore %111 %121 -OpBranch %115 -%115 = OpLabel -%122 = OpLoad %v4float %111 -OpReturnValue %122 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %111 = OpVariable %_ptr_Function_v4float Function + %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %28 + %33 = OpCompositeExtract %float %32 0 + %27 = OpExtInst %float %1 Asinh %33 + %34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %36 = OpLoad %v4float %34 + %37 = OpCompositeExtract %float %36 0 + %38 = OpFOrdEqual %bool %27 %37 + OpSelectionMerge %40 None + OpBranchConditional %38 %39 %40 + %39 = OpLabel + %42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %43 = OpLoad %v4float %42 + %44 = OpVectorShuffle %v2float %43 %43 0 1 + %41 = OpExtInst %v2float %1 Asinh %44 + %45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %46 = OpLoad %v4float %45 + %47 = OpVectorShuffle %v2float %46 %46 0 1 + %48 = OpFOrdEqual %v2bool %41 %47 + %50 = OpAll %bool %48 + OpBranch %40 + %40 = OpLabel + %51 = OpPhi %bool %false %25 %50 %39 + OpSelectionMerge %53 None + OpBranchConditional %51 %52 %53 + %52 = OpLabel + %55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %56 = OpLoad %v4float %55 + %57 = OpVectorShuffle %v3float %56 %56 0 1 2 + %54 = OpExtInst %v3float %1 Asinh %57 + %59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %60 = OpLoad %v4float %59 + %61 = OpVectorShuffle %v3float %60 %60 0 1 2 + %62 = OpFOrdEqual %v3bool %54 %61 + %64 = OpAll %bool %62 + OpBranch %53 + %53 = OpLabel + %65 = OpPhi %bool %false %40 %64 %52 + OpSelectionMerge %67 None + OpBranchConditional %65 %66 %67 + %66 = OpLabel + %69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %70 = OpLoad %v4float %69 + %68 = OpExtInst %v4float %1 Asinh %70 + %71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %72 = OpLoad %v4float %71 + %73 = OpFOrdEqual %v4bool %68 %72 + %75 = OpAll %bool %73 + OpBranch %67 + %67 = OpLabel + %76 = OpPhi %bool %false %53 %75 %66 + OpSelectionMerge %78 None + OpBranchConditional %76 %77 %78 + %77 = OpLabel + %79 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %80 = OpLoad %v4float %79 + %81 = OpCompositeExtract %float %80 0 + %82 = OpFOrdEqual %bool %float_0 %81 + OpBranch %78 + %78 = OpLabel + %83 = OpPhi %bool %false %67 %82 %77 + OpSelectionMerge %85 None + OpBranchConditional %83 %84 %85 + %84 = OpLabel + %86 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %87 = OpLoad %v4float %86 + %88 = OpVectorShuffle %v2float %87 %87 0 1 + %89 = OpFOrdEqual %v2bool %19 %88 + %90 = OpAll %bool %89 + OpBranch %85 + %85 = OpLabel + %91 = OpPhi %bool %false %78 %90 %84 + OpSelectionMerge %93 None + OpBranchConditional %91 %92 %93 + %92 = OpLabel + %96 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %97 = OpLoad %v4float %96 + %98 = OpVectorShuffle %v3float %97 %97 0 1 2 + %99 = OpFOrdEqual %v3bool %95 %98 + %100 = OpAll %bool %99 + OpBranch %93 + %93 = OpLabel + %101 = OpPhi %bool %false %85 %100 %92 + OpSelectionMerge %103 None + OpBranchConditional %101 %102 %103 + %102 = OpLabel + %106 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %107 = OpLoad %v4float %106 + %108 = OpFOrdEqual %v4bool %105 %107 + %109 = OpAll %bool %108 + OpBranch %103 + %103 = OpLabel + %110 = OpPhi %bool %false %93 %109 %102 + OpSelectionMerge %115 None + OpBranchConditional %110 %113 %114 + %113 = OpLabel + %116 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %118 = OpLoad %v4float %116 + OpStore %111 %118 + OpBranch %115 + %114 = OpLabel + %119 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %121 = OpLoad %v4float %119 + OpStore %111 %121 + OpBranch %115 + %115 = OpLabel + %122 = OpLoad %v4float %111 + OpReturnValue %122 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Asinh.wgsl b/tests/sksl/intrinsics/Asinh.wgsl new file mode 100644 index 000000000000..c6588f20ee38 --- /dev/null +++ b/tests/sksl/intrinsics/Asinh.wgsl @@ -0,0 +1,30 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + inputVal: vec4, + expected: vec4, + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + let _skTemp0 = asinh(_globalUniforms.inputVal.x); + let _skTemp1 = asinh(_globalUniforms.inputVal.xy); + let _skTemp2 = asinh(_globalUniforms.inputVal.xyz); + let _skTemp3 = asinh(_globalUniforms.inputVal); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((_skTemp0 == _globalUniforms.expected.x) && all(_skTemp1 == _globalUniforms.expected.xy)) && all(_skTemp2 == _globalUniforms.expected.xyz)) && all(_skTemp3 == _globalUniforms.expected)) && (0.0 == _globalUniforms.expected.x)) && all(vec2(0.0) == _globalUniforms.expected.xy)) && all(vec3(0.0, 0.0, 1.0) == _globalUniforms.expected.xyz)) && all(vec4(0.0, 0.0, 1.0, -1.0) == _globalUniforms.expected))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/intrinsics/Atan.asm.frag b/tests/sksl/intrinsics/Atan.asm.frag index f4db366dab74..edb9959bd845 100644 --- a/tests/sksl/intrinsics/Atan.asm.frag +++ b/tests/sksl/intrinsics/Atan.asm.frag @@ -1,329 +1,329 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "inputVal" -OpMemberName %_UniformBuffer 1 "expected" -OpMemberName %_UniformBuffer 2 "colorGreen" -OpMemberName %_UniformBuffer 3 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 3 Offset 48 -OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %80 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %87 RelaxedPrecision -OpDecorate %88 RelaxedPrecision -OpDecorate %96 RelaxedPrecision -OpDecorate %97 RelaxedPrecision -OpDecorate %105 RelaxedPrecision -OpDecorate %113 RelaxedPrecision -OpDecorate %114 RelaxedPrecision -OpDecorate %117 RelaxedPrecision -OpDecorate %118 RelaxedPrecision -OpDecorate %125 RelaxedPrecision -OpDecorate %126 RelaxedPrecision -OpDecorate %129 RelaxedPrecision -OpDecorate %130 RelaxedPrecision -OpDecorate %138 RelaxedPrecision -OpDecorate %139 RelaxedPrecision -OpDecorate %142 RelaxedPrecision -OpDecorate %143 RelaxedPrecision -OpDecorate %151 RelaxedPrecision -OpDecorate %154 RelaxedPrecision -OpDecorate %161 RelaxedPrecision -OpDecorate %162 RelaxedPrecision -OpDecorate %168 RelaxedPrecision -OpDecorate %169 RelaxedPrecision -OpDecorate %176 RelaxedPrecision -OpDecorate %177 RelaxedPrecision -OpDecorate %184 RelaxedPrecision -OpDecorate %195 RelaxedPrecision -OpDecorate %198 RelaxedPrecision -OpDecorate %199 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "inputVal" + OpMemberName %_UniformBuffer 1 "expected" + OpMemberName %_UniformBuffer 2 "colorGreen" + OpMemberName %_UniformBuffer 3 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 3 Offset 48 + OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %80 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %87 RelaxedPrecision + OpDecorate %88 RelaxedPrecision + OpDecorate %96 RelaxedPrecision + OpDecorate %97 RelaxedPrecision + OpDecorate %105 RelaxedPrecision + OpDecorate %113 RelaxedPrecision + OpDecorate %114 RelaxedPrecision + OpDecorate %117 RelaxedPrecision + OpDecorate %118 RelaxedPrecision + OpDecorate %125 RelaxedPrecision + OpDecorate %126 RelaxedPrecision + OpDecorate %129 RelaxedPrecision + OpDecorate %130 RelaxedPrecision + OpDecorate %138 RelaxedPrecision + OpDecorate %139 RelaxedPrecision + OpDecorate %142 RelaxedPrecision + OpDecorate %143 RelaxedPrecision + OpDecorate %151 RelaxedPrecision + OpDecorate %154 RelaxedPrecision + OpDecorate %161 RelaxedPrecision + OpDecorate %162 RelaxedPrecision + OpDecorate %168 RelaxedPrecision + OpDecorate %169 RelaxedPrecision + OpDecorate %176 RelaxedPrecision + OpDecorate %177 RelaxedPrecision + OpDecorate %184 RelaxedPrecision + OpDecorate %195 RelaxedPrecision + OpDecorate %198 RelaxedPrecision + OpDecorate %199 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%false = OpConstantFalse %bool + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%v3bool = OpTypeVector %bool 3 -%v4bool = OpTypeVector %bool 4 -%94 = OpConstantComposite %v3float %float_0 %float_0 %float_0 -%103 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 -%float_1 = OpConstant %float 1 -%127 = OpConstantComposite %v2float %float_1 %float_1 -%140 = OpConstantComposite %v3float %float_1 %float_1 %float_1 -%152 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %v3bool = OpTypeVector %bool 3 + %v4bool = OpTypeVector %bool 4 + %94 = OpConstantComposite %v3float %float_0 %float_0 %float_0 + %103 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %float_1 = OpConstant %float 1 + %127 = OpConstantComposite %v2float %float_1 %float_1 + %140 = OpConstantComposite %v3float %float_1 %float_1 %float_1 + %152 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_2 = OpConstant %int 2 -%int_3 = OpConstant %int 3 + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%188 = OpVariable %_ptr_Function_v4float Function -%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %28 -%33 = OpCompositeExtract %float %32 0 -%27 = OpExtInst %float %1 Atan %33 -%34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%36 = OpLoad %v4float %34 -%37 = OpCompositeExtract %float %36 0 -%38 = OpFOrdEqual %bool %27 %37 -OpSelectionMerge %40 None -OpBranchConditional %38 %39 %40 -%39 = OpLabel -%42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%43 = OpLoad %v4float %42 -%44 = OpVectorShuffle %v2float %43 %43 0 1 -%41 = OpExtInst %v2float %1 Atan %44 -%45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%46 = OpLoad %v4float %45 -%47 = OpVectorShuffle %v2float %46 %46 0 1 -%48 = OpFOrdEqual %v2bool %41 %47 -%50 = OpAll %bool %48 -OpBranch %40 -%40 = OpLabel -%51 = OpPhi %bool %false %25 %50 %39 -OpSelectionMerge %53 None -OpBranchConditional %51 %52 %53 -%52 = OpLabel -%55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%56 = OpLoad %v4float %55 -%57 = OpVectorShuffle %v3float %56 %56 0 1 2 -%54 = OpExtInst %v3float %1 Atan %57 -%59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%60 = OpLoad %v4float %59 -%61 = OpVectorShuffle %v3float %60 %60 0 1 2 -%62 = OpFOrdEqual %v3bool %54 %61 -%64 = OpAll %bool %62 -OpBranch %53 -%53 = OpLabel -%65 = OpPhi %bool %false %40 %64 %52 -OpSelectionMerge %67 None -OpBranchConditional %65 %66 %67 -%66 = OpLabel -%69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%70 = OpLoad %v4float %69 -%68 = OpExtInst %v4float %1 Atan %70 -%71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%72 = OpLoad %v4float %71 -%73 = OpFOrdEqual %v4bool %68 %72 -%75 = OpAll %bool %73 -OpBranch %67 -%67 = OpLabel -%76 = OpPhi %bool %false %53 %75 %66 -OpSelectionMerge %78 None -OpBranchConditional %76 %77 %78 -%77 = OpLabel -%79 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%80 = OpLoad %v4float %79 -%81 = OpCompositeExtract %float %80 0 -%82 = OpFOrdEqual %bool %float_0 %81 -OpBranch %78 -%78 = OpLabel -%83 = OpPhi %bool %false %67 %82 %77 -OpSelectionMerge %85 None -OpBranchConditional %83 %84 %85 -%84 = OpLabel -%86 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%87 = OpLoad %v4float %86 -%88 = OpVectorShuffle %v2float %87 %87 0 1 -%89 = OpFOrdEqual %v2bool %19 %88 -%90 = OpAll %bool %89 -OpBranch %85 -%85 = OpLabel -%91 = OpPhi %bool %false %78 %90 %84 -OpSelectionMerge %93 None -OpBranchConditional %91 %92 %93 -%92 = OpLabel -%95 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%96 = OpLoad %v4float %95 -%97 = OpVectorShuffle %v3float %96 %96 0 1 2 -%98 = OpFOrdEqual %v3bool %94 %97 -%99 = OpAll %bool %98 -OpBranch %93 -%93 = OpLabel -%100 = OpPhi %bool %false %85 %99 %92 -OpSelectionMerge %102 None -OpBranchConditional %100 %101 %102 -%101 = OpLabel -%104 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%105 = OpLoad %v4float %104 -%106 = OpFOrdEqual %v4bool %103 %105 -%107 = OpAll %bool %106 -OpBranch %102 -%102 = OpLabel -%108 = OpPhi %bool %false %93 %107 %101 -OpSelectionMerge %110 None -OpBranchConditional %108 %109 %110 -%109 = OpLabel -%112 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%113 = OpLoad %v4float %112 -%114 = OpCompositeExtract %float %113 0 -%111 = OpExtInst %float %1 Atan2 %114 %float_1 -%116 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%117 = OpLoad %v4float %116 -%118 = OpCompositeExtract %float %117 0 -%119 = OpFOrdEqual %bool %111 %118 -OpBranch %110 -%110 = OpLabel -%120 = OpPhi %bool %false %102 %119 %109 -OpSelectionMerge %122 None -OpBranchConditional %120 %121 %122 -%121 = OpLabel -%124 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%125 = OpLoad %v4float %124 -%126 = OpVectorShuffle %v2float %125 %125 0 1 -%123 = OpExtInst %v2float %1 Atan2 %126 %127 -%128 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%129 = OpLoad %v4float %128 -%130 = OpVectorShuffle %v2float %129 %129 0 1 -%131 = OpFOrdEqual %v2bool %123 %130 -%132 = OpAll %bool %131 -OpBranch %122 -%122 = OpLabel -%133 = OpPhi %bool %false %110 %132 %121 -OpSelectionMerge %135 None -OpBranchConditional %133 %134 %135 -%134 = OpLabel -%137 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%138 = OpLoad %v4float %137 -%139 = OpVectorShuffle %v3float %138 %138 0 1 2 -%136 = OpExtInst %v3float %1 Atan2 %139 %140 -%141 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%142 = OpLoad %v4float %141 -%143 = OpVectorShuffle %v3float %142 %142 0 1 2 -%144 = OpFOrdEqual %v3bool %136 %143 -%145 = OpAll %bool %144 -OpBranch %135 -%135 = OpLabel -%146 = OpPhi %bool %false %122 %145 %134 -OpSelectionMerge %148 None -OpBranchConditional %146 %147 %148 -%147 = OpLabel -%150 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%151 = OpLoad %v4float %150 -%149 = OpExtInst %v4float %1 Atan2 %151 %152 -%153 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%154 = OpLoad %v4float %153 -%155 = OpFOrdEqual %v4bool %149 %154 -%156 = OpAll %bool %155 -OpBranch %148 -%148 = OpLabel -%157 = OpPhi %bool %false %135 %156 %147 -OpSelectionMerge %159 None -OpBranchConditional %157 %158 %159 -%158 = OpLabel -%160 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%161 = OpLoad %v4float %160 -%162 = OpCompositeExtract %float %161 0 -%163 = OpFOrdEqual %bool %float_0 %162 -OpBranch %159 -%159 = OpLabel -%164 = OpPhi %bool %false %148 %163 %158 -OpSelectionMerge %166 None -OpBranchConditional %164 %165 %166 -%165 = OpLabel -%167 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%168 = OpLoad %v4float %167 -%169 = OpVectorShuffle %v2float %168 %168 0 1 -%170 = OpFOrdEqual %v2bool %19 %169 -%171 = OpAll %bool %170 -OpBranch %166 -%166 = OpLabel -%172 = OpPhi %bool %false %159 %171 %165 -OpSelectionMerge %174 None -OpBranchConditional %172 %173 %174 -%173 = OpLabel -%175 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%176 = OpLoad %v4float %175 -%177 = OpVectorShuffle %v3float %176 %176 0 1 2 -%178 = OpFOrdEqual %v3bool %94 %177 -%179 = OpAll %bool %178 -OpBranch %174 -%174 = OpLabel -%180 = OpPhi %bool %false %166 %179 %173 -OpSelectionMerge %182 None -OpBranchConditional %180 %181 %182 -%181 = OpLabel -%183 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%184 = OpLoad %v4float %183 -%185 = OpFOrdEqual %v4bool %103 %184 -%186 = OpAll %bool %185 -OpBranch %182 -%182 = OpLabel -%187 = OpPhi %bool %false %174 %186 %181 -OpSelectionMerge %192 None -OpBranchConditional %187 %190 %191 -%190 = OpLabel -%193 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%195 = OpLoad %v4float %193 -OpStore %188 %195 -OpBranch %192 -%191 = OpLabel -%196 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%198 = OpLoad %v4float %196 -OpStore %188 %198 -OpBranch %192 -%192 = OpLabel -%199 = OpLoad %v4float %188 -OpReturnValue %199 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %188 = OpVariable %_ptr_Function_v4float Function + %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %28 + %33 = OpCompositeExtract %float %32 0 + %27 = OpExtInst %float %1 Atan %33 + %34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %36 = OpLoad %v4float %34 + %37 = OpCompositeExtract %float %36 0 + %38 = OpFOrdEqual %bool %27 %37 + OpSelectionMerge %40 None + OpBranchConditional %38 %39 %40 + %39 = OpLabel + %42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %43 = OpLoad %v4float %42 + %44 = OpVectorShuffle %v2float %43 %43 0 1 + %41 = OpExtInst %v2float %1 Atan %44 + %45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %46 = OpLoad %v4float %45 + %47 = OpVectorShuffle %v2float %46 %46 0 1 + %48 = OpFOrdEqual %v2bool %41 %47 + %50 = OpAll %bool %48 + OpBranch %40 + %40 = OpLabel + %51 = OpPhi %bool %false %25 %50 %39 + OpSelectionMerge %53 None + OpBranchConditional %51 %52 %53 + %52 = OpLabel + %55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %56 = OpLoad %v4float %55 + %57 = OpVectorShuffle %v3float %56 %56 0 1 2 + %54 = OpExtInst %v3float %1 Atan %57 + %59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %60 = OpLoad %v4float %59 + %61 = OpVectorShuffle %v3float %60 %60 0 1 2 + %62 = OpFOrdEqual %v3bool %54 %61 + %64 = OpAll %bool %62 + OpBranch %53 + %53 = OpLabel + %65 = OpPhi %bool %false %40 %64 %52 + OpSelectionMerge %67 None + OpBranchConditional %65 %66 %67 + %66 = OpLabel + %69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %70 = OpLoad %v4float %69 + %68 = OpExtInst %v4float %1 Atan %70 + %71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %72 = OpLoad %v4float %71 + %73 = OpFOrdEqual %v4bool %68 %72 + %75 = OpAll %bool %73 + OpBranch %67 + %67 = OpLabel + %76 = OpPhi %bool %false %53 %75 %66 + OpSelectionMerge %78 None + OpBranchConditional %76 %77 %78 + %77 = OpLabel + %79 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %80 = OpLoad %v4float %79 + %81 = OpCompositeExtract %float %80 0 + %82 = OpFOrdEqual %bool %float_0 %81 + OpBranch %78 + %78 = OpLabel + %83 = OpPhi %bool %false %67 %82 %77 + OpSelectionMerge %85 None + OpBranchConditional %83 %84 %85 + %84 = OpLabel + %86 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %87 = OpLoad %v4float %86 + %88 = OpVectorShuffle %v2float %87 %87 0 1 + %89 = OpFOrdEqual %v2bool %19 %88 + %90 = OpAll %bool %89 + OpBranch %85 + %85 = OpLabel + %91 = OpPhi %bool %false %78 %90 %84 + OpSelectionMerge %93 None + OpBranchConditional %91 %92 %93 + %92 = OpLabel + %95 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %96 = OpLoad %v4float %95 + %97 = OpVectorShuffle %v3float %96 %96 0 1 2 + %98 = OpFOrdEqual %v3bool %94 %97 + %99 = OpAll %bool %98 + OpBranch %93 + %93 = OpLabel + %100 = OpPhi %bool %false %85 %99 %92 + OpSelectionMerge %102 None + OpBranchConditional %100 %101 %102 + %101 = OpLabel + %104 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %105 = OpLoad %v4float %104 + %106 = OpFOrdEqual %v4bool %103 %105 + %107 = OpAll %bool %106 + OpBranch %102 + %102 = OpLabel + %108 = OpPhi %bool %false %93 %107 %101 + OpSelectionMerge %110 None + OpBranchConditional %108 %109 %110 + %109 = OpLabel + %112 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %113 = OpLoad %v4float %112 + %114 = OpCompositeExtract %float %113 0 + %111 = OpExtInst %float %1 Atan2 %114 %float_1 + %116 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %117 = OpLoad %v4float %116 + %118 = OpCompositeExtract %float %117 0 + %119 = OpFOrdEqual %bool %111 %118 + OpBranch %110 + %110 = OpLabel + %120 = OpPhi %bool %false %102 %119 %109 + OpSelectionMerge %122 None + OpBranchConditional %120 %121 %122 + %121 = OpLabel + %124 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %125 = OpLoad %v4float %124 + %126 = OpVectorShuffle %v2float %125 %125 0 1 + %123 = OpExtInst %v2float %1 Atan2 %126 %127 + %128 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %129 = OpLoad %v4float %128 + %130 = OpVectorShuffle %v2float %129 %129 0 1 + %131 = OpFOrdEqual %v2bool %123 %130 + %132 = OpAll %bool %131 + OpBranch %122 + %122 = OpLabel + %133 = OpPhi %bool %false %110 %132 %121 + OpSelectionMerge %135 None + OpBranchConditional %133 %134 %135 + %134 = OpLabel + %137 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %138 = OpLoad %v4float %137 + %139 = OpVectorShuffle %v3float %138 %138 0 1 2 + %136 = OpExtInst %v3float %1 Atan2 %139 %140 + %141 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %142 = OpLoad %v4float %141 + %143 = OpVectorShuffle %v3float %142 %142 0 1 2 + %144 = OpFOrdEqual %v3bool %136 %143 + %145 = OpAll %bool %144 + OpBranch %135 + %135 = OpLabel + %146 = OpPhi %bool %false %122 %145 %134 + OpSelectionMerge %148 None + OpBranchConditional %146 %147 %148 + %147 = OpLabel + %150 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %151 = OpLoad %v4float %150 + %149 = OpExtInst %v4float %1 Atan2 %151 %152 + %153 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %154 = OpLoad %v4float %153 + %155 = OpFOrdEqual %v4bool %149 %154 + %156 = OpAll %bool %155 + OpBranch %148 + %148 = OpLabel + %157 = OpPhi %bool %false %135 %156 %147 + OpSelectionMerge %159 None + OpBranchConditional %157 %158 %159 + %158 = OpLabel + %160 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %161 = OpLoad %v4float %160 + %162 = OpCompositeExtract %float %161 0 + %163 = OpFOrdEqual %bool %float_0 %162 + OpBranch %159 + %159 = OpLabel + %164 = OpPhi %bool %false %148 %163 %158 + OpSelectionMerge %166 None + OpBranchConditional %164 %165 %166 + %165 = OpLabel + %167 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %168 = OpLoad %v4float %167 + %169 = OpVectorShuffle %v2float %168 %168 0 1 + %170 = OpFOrdEqual %v2bool %19 %169 + %171 = OpAll %bool %170 + OpBranch %166 + %166 = OpLabel + %172 = OpPhi %bool %false %159 %171 %165 + OpSelectionMerge %174 None + OpBranchConditional %172 %173 %174 + %173 = OpLabel + %175 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %176 = OpLoad %v4float %175 + %177 = OpVectorShuffle %v3float %176 %176 0 1 2 + %178 = OpFOrdEqual %v3bool %94 %177 + %179 = OpAll %bool %178 + OpBranch %174 + %174 = OpLabel + %180 = OpPhi %bool %false %166 %179 %173 + OpSelectionMerge %182 None + OpBranchConditional %180 %181 %182 + %181 = OpLabel + %183 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %184 = OpLoad %v4float %183 + %185 = OpFOrdEqual %v4bool %103 %184 + %186 = OpAll %bool %185 + OpBranch %182 + %182 = OpLabel + %187 = OpPhi %bool %false %174 %186 %181 + OpSelectionMerge %192 None + OpBranchConditional %187 %190 %191 + %190 = OpLabel + %193 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %195 = OpLoad %v4float %193 + OpStore %188 %195 + OpBranch %192 + %191 = OpLabel + %196 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %198 = OpLoad %v4float %196 + OpStore %188 %198 + OpBranch %192 + %192 = OpLabel + %199 = OpLoad %v4float %188 + OpReturnValue %199 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Atan.skrp b/tests/sksl/intrinsics/Atan.skrp index 30f9325b7e71..c049b2d381a3 100644 --- a/tests/sksl/intrinsics/Atan.skrp +++ b/tests/sksl/intrinsics/Atan.skrp @@ -1,8 +1,10 @@ +106 instructions + [immutable slots] -constVal2(0) = 0x3F800000 (1.0) -constVal2(1) = 0x3F800000 (1.0) -constVal2(2) = 0x3F800000 (1.0) -constVal2(3) = 0x3F800000 (1.0) +i0 = 0x3F800000 (1.0) +i1 = 0x3F800000 (1.0) +i2 = 0x3F800000 (1.0) +i3 = 0x3F800000 (1.0) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true diff --git a/tests/sksl/intrinsics/Atan.wgsl b/tests/sksl/intrinsics/Atan.wgsl index d797f0de03c3..566ffa512842 100644 --- a/tests/sksl/intrinsics/Atan.wgsl +++ b/tests/sksl/intrinsics/Atan.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -24,7 +25,7 @@ fn main(_skParam0: vec2) -> vec4 { let _skTemp5 = atan2(_globalUniforms.inputVal.xy, vec2(1.0)); let _skTemp6 = atan2(_globalUniforms.inputVal.xyz, vec3(1.0)); let _skTemp7 = atan2(_globalUniforms.inputVal, constVal2); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((((((((((_skTemp0 == _globalUniforms.expected.x && all(_skTemp1 == _globalUniforms.expected.xy)) && all(_skTemp2 == _globalUniforms.expected.xyz)) && all(_skTemp3 == _globalUniforms.expected)) && 0.0 == _globalUniforms.expected.x) && all(vec2(0.0) == _globalUniforms.expected.xy)) && all(vec3(0.0) == _globalUniforms.expected.xyz)) && all(vec4(0.0) == _globalUniforms.expected)) && _skTemp4 == _globalUniforms.expected.x) && all(_skTemp5 == _globalUniforms.expected.xy)) && all(_skTemp6 == _globalUniforms.expected.xyz)) && all(_skTemp7 == _globalUniforms.expected)) && 0.0 == _globalUniforms.expected.x) && all(vec2(0.0) == _globalUniforms.expected.xy)) && all(vec3(0.0) == _globalUniforms.expected.xyz)) && all(vec4(0.0) == _globalUniforms.expected))); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((((((((((_skTemp0 == _globalUniforms.expected.x) && all(_skTemp1 == _globalUniforms.expected.xy)) && all(_skTemp2 == _globalUniforms.expected.xyz)) && all(_skTemp3 == _globalUniforms.expected)) && (0.0 == _globalUniforms.expected.x)) && all(vec2(0.0) == _globalUniforms.expected.xy)) && all(vec3(0.0) == _globalUniforms.expected.xyz)) && all(vec4(0.0) == _globalUniforms.expected)) && (_skTemp4 == _globalUniforms.expected.x)) && all(_skTemp5 == _globalUniforms.expected.xy)) && all(_skTemp6 == _globalUniforms.expected.xyz)) && all(_skTemp7 == _globalUniforms.expected)) && (0.0 == _globalUniforms.expected.x)) && all(vec2(0.0) == _globalUniforms.expected.xy)) && all(vec3(0.0) == _globalUniforms.expected.xyz)) && all(vec4(0.0) == _globalUniforms.expected))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/intrinsics/Atanh.asm.frag b/tests/sksl/intrinsics/Atanh.asm.frag index f4dcbe189eb0..298fdf1def02 100644 --- a/tests/sksl/intrinsics/Atanh.asm.frag +++ b/tests/sksl/intrinsics/Atanh.asm.frag @@ -1,213 +1,213 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "inputVal" -OpMemberName %_UniformBuffer 1 "expected" -OpMemberName %_UniformBuffer 2 "colorGreen" -OpMemberName %_UniformBuffer 3 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 3 Offset 48 -OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %27 RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %80 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %89 RelaxedPrecision -OpDecorate %90 RelaxedPrecision -OpDecorate %99 RelaxedPrecision -OpDecorate %100 RelaxedPrecision -OpDecorate %109 RelaxedPrecision -OpDecorate %120 RelaxedPrecision -OpDecorate %123 RelaxedPrecision -OpDecorate %124 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "inputVal" + OpMemberName %_UniformBuffer 1 "expected" + OpMemberName %_UniformBuffer 2 "colorGreen" + OpMemberName %_UniformBuffer 3 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 3 Offset 48 + OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %27 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %80 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %89 RelaxedPrecision + OpDecorate %90 RelaxedPrecision + OpDecorate %99 RelaxedPrecision + OpDecorate %100 RelaxedPrecision + OpDecorate %109 RelaxedPrecision + OpDecorate %120 RelaxedPrecision + OpDecorate %123 RelaxedPrecision + OpDecorate %124 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%false = OpConstantFalse %bool + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%v3bool = OpTypeVector %bool 3 -%v4bool = OpTypeVector %bool 4 -%float_0_25 = OpConstant %float 0.25 -%87 = OpConstantComposite %v2float %float_0 %float_0_25 -%float_0_5 = OpConstant %float 0.5 -%97 = OpConstantComposite %v3float %float_0 %float_0_25 %float_0_5 -%float_1 = OpConstant %float 1 -%107 = OpConstantComposite %v4float %float_0 %float_0_25 %float_0_5 %float_1 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %v3bool = OpTypeVector %bool 3 + %v4bool = OpTypeVector %bool 4 + %float_0_25 = OpConstant %float 0.25 + %87 = OpConstantComposite %v2float %float_0 %float_0_25 + %float_0_5 = OpConstant %float 0.5 + %97 = OpConstantComposite %v3float %float_0 %float_0_25 %float_0_5 + %float_1 = OpConstant %float 1 + %107 = OpConstantComposite %v4float %float_0 %float_0_25 %float_0_5 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_2 = OpConstant %int 2 -%int_3 = OpConstant %int 3 + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%113 = OpVariable %_ptr_Function_v4float Function -%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %28 -%33 = OpCompositeExtract %float %32 0 -%27 = OpExtInst %float %1 Atanh %33 -%34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%36 = OpLoad %v4float %34 -%37 = OpCompositeExtract %float %36 0 -%38 = OpFOrdEqual %bool %27 %37 -OpSelectionMerge %40 None -OpBranchConditional %38 %39 %40 -%39 = OpLabel -%42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%43 = OpLoad %v4float %42 -%44 = OpVectorShuffle %v2float %43 %43 0 1 -%41 = OpExtInst %v2float %1 Atanh %44 -%45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%46 = OpLoad %v4float %45 -%47 = OpVectorShuffle %v2float %46 %46 0 1 -%48 = OpFOrdEqual %v2bool %41 %47 -%50 = OpAll %bool %48 -OpBranch %40 -%40 = OpLabel -%51 = OpPhi %bool %false %25 %50 %39 -OpSelectionMerge %53 None -OpBranchConditional %51 %52 %53 -%52 = OpLabel -%55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%56 = OpLoad %v4float %55 -%57 = OpVectorShuffle %v3float %56 %56 0 1 2 -%54 = OpExtInst %v3float %1 Atanh %57 -%59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%60 = OpLoad %v4float %59 -%61 = OpVectorShuffle %v3float %60 %60 0 1 2 -%62 = OpFOrdEqual %v3bool %54 %61 -%64 = OpAll %bool %62 -OpBranch %53 -%53 = OpLabel -%65 = OpPhi %bool %false %40 %64 %52 -OpSelectionMerge %67 None -OpBranchConditional %65 %66 %67 -%66 = OpLabel -%69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%70 = OpLoad %v4float %69 -%68 = OpExtInst %v4float %1 Atanh %70 -%71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%72 = OpLoad %v4float %71 -%73 = OpFOrdEqual %v4bool %68 %72 -%75 = OpAll %bool %73 -OpBranch %67 -%67 = OpLabel -%76 = OpPhi %bool %false %53 %75 %66 -OpSelectionMerge %78 None -OpBranchConditional %76 %77 %78 -%77 = OpLabel -%79 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%80 = OpLoad %v4float %79 -%81 = OpCompositeExtract %float %80 0 -%82 = OpFOrdEqual %bool %float_0 %81 -OpBranch %78 -%78 = OpLabel -%83 = OpPhi %bool %false %67 %82 %77 -OpSelectionMerge %85 None -OpBranchConditional %83 %84 %85 -%84 = OpLabel -%88 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%89 = OpLoad %v4float %88 -%90 = OpVectorShuffle %v2float %89 %89 0 1 -%91 = OpFOrdEqual %v2bool %87 %90 -%92 = OpAll %bool %91 -OpBranch %85 -%85 = OpLabel -%93 = OpPhi %bool %false %78 %92 %84 -OpSelectionMerge %95 None -OpBranchConditional %93 %94 %95 -%94 = OpLabel -%98 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%99 = OpLoad %v4float %98 -%100 = OpVectorShuffle %v3float %99 %99 0 1 2 -%101 = OpFOrdEqual %v3bool %97 %100 -%102 = OpAll %bool %101 -OpBranch %95 -%95 = OpLabel -%103 = OpPhi %bool %false %85 %102 %94 -OpSelectionMerge %105 None -OpBranchConditional %103 %104 %105 -%104 = OpLabel -%108 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%109 = OpLoad %v4float %108 -%110 = OpFOrdEqual %v4bool %107 %109 -%111 = OpAll %bool %110 -OpBranch %105 -%105 = OpLabel -%112 = OpPhi %bool %false %95 %111 %104 -OpSelectionMerge %117 None -OpBranchConditional %112 %115 %116 -%115 = OpLabel -%118 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%120 = OpLoad %v4float %118 -OpStore %113 %120 -OpBranch %117 -%116 = OpLabel -%121 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%123 = OpLoad %v4float %121 -OpStore %113 %123 -OpBranch %117 -%117 = OpLabel -%124 = OpLoad %v4float %113 -OpReturnValue %124 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %113 = OpVariable %_ptr_Function_v4float Function + %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %28 + %33 = OpCompositeExtract %float %32 0 + %27 = OpExtInst %float %1 Atanh %33 + %34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %36 = OpLoad %v4float %34 + %37 = OpCompositeExtract %float %36 0 + %38 = OpFOrdEqual %bool %27 %37 + OpSelectionMerge %40 None + OpBranchConditional %38 %39 %40 + %39 = OpLabel + %42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %43 = OpLoad %v4float %42 + %44 = OpVectorShuffle %v2float %43 %43 0 1 + %41 = OpExtInst %v2float %1 Atanh %44 + %45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %46 = OpLoad %v4float %45 + %47 = OpVectorShuffle %v2float %46 %46 0 1 + %48 = OpFOrdEqual %v2bool %41 %47 + %50 = OpAll %bool %48 + OpBranch %40 + %40 = OpLabel + %51 = OpPhi %bool %false %25 %50 %39 + OpSelectionMerge %53 None + OpBranchConditional %51 %52 %53 + %52 = OpLabel + %55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %56 = OpLoad %v4float %55 + %57 = OpVectorShuffle %v3float %56 %56 0 1 2 + %54 = OpExtInst %v3float %1 Atanh %57 + %59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %60 = OpLoad %v4float %59 + %61 = OpVectorShuffle %v3float %60 %60 0 1 2 + %62 = OpFOrdEqual %v3bool %54 %61 + %64 = OpAll %bool %62 + OpBranch %53 + %53 = OpLabel + %65 = OpPhi %bool %false %40 %64 %52 + OpSelectionMerge %67 None + OpBranchConditional %65 %66 %67 + %66 = OpLabel + %69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %70 = OpLoad %v4float %69 + %68 = OpExtInst %v4float %1 Atanh %70 + %71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %72 = OpLoad %v4float %71 + %73 = OpFOrdEqual %v4bool %68 %72 + %75 = OpAll %bool %73 + OpBranch %67 + %67 = OpLabel + %76 = OpPhi %bool %false %53 %75 %66 + OpSelectionMerge %78 None + OpBranchConditional %76 %77 %78 + %77 = OpLabel + %79 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %80 = OpLoad %v4float %79 + %81 = OpCompositeExtract %float %80 0 + %82 = OpFOrdEqual %bool %float_0 %81 + OpBranch %78 + %78 = OpLabel + %83 = OpPhi %bool %false %67 %82 %77 + OpSelectionMerge %85 None + OpBranchConditional %83 %84 %85 + %84 = OpLabel + %88 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %89 = OpLoad %v4float %88 + %90 = OpVectorShuffle %v2float %89 %89 0 1 + %91 = OpFOrdEqual %v2bool %87 %90 + %92 = OpAll %bool %91 + OpBranch %85 + %85 = OpLabel + %93 = OpPhi %bool %false %78 %92 %84 + OpSelectionMerge %95 None + OpBranchConditional %93 %94 %95 + %94 = OpLabel + %98 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %99 = OpLoad %v4float %98 + %100 = OpVectorShuffle %v3float %99 %99 0 1 2 + %101 = OpFOrdEqual %v3bool %97 %100 + %102 = OpAll %bool %101 + OpBranch %95 + %95 = OpLabel + %103 = OpPhi %bool %false %85 %102 %94 + OpSelectionMerge %105 None + OpBranchConditional %103 %104 %105 + %104 = OpLabel + %108 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %109 = OpLoad %v4float %108 + %110 = OpFOrdEqual %v4bool %107 %109 + %111 = OpAll %bool %110 + OpBranch %105 + %105 = OpLabel + %112 = OpPhi %bool %false %95 %111 %104 + OpSelectionMerge %117 None + OpBranchConditional %112 %115 %116 + %115 = OpLabel + %118 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %120 = OpLoad %v4float %118 + OpStore %113 %120 + OpBranch %117 + %116 = OpLabel + %121 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %123 = OpLoad %v4float %121 + OpStore %113 %123 + OpBranch %117 + %117 = OpLabel + %124 = OpLoad %v4float %113 + OpReturnValue %124 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Atanh.wgsl b/tests/sksl/intrinsics/Atanh.wgsl new file mode 100644 index 000000000000..ffb9d203caab --- /dev/null +++ b/tests/sksl/intrinsics/Atanh.wgsl @@ -0,0 +1,30 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + inputVal: vec4, + expected: vec4, + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + let _skTemp0 = atanh(_globalUniforms.inputVal.x); + let _skTemp1 = atanh(_globalUniforms.inputVal.xy); + let _skTemp2 = atanh(_globalUniforms.inputVal.xyz); + let _skTemp3 = atanh(_globalUniforms.inputVal); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((_skTemp0 == _globalUniforms.expected.x) && all(_skTemp1 == _globalUniforms.expected.xy)) && all(_skTemp2 == _globalUniforms.expected.xyz)) && all(_skTemp3 == _globalUniforms.expected)) && (0.0 == _globalUniforms.expected.x)) && all(vec2(0.0, 0.25) == _globalUniforms.expected.xy)) && all(vec3(0.0, 0.25, 0.5) == _globalUniforms.expected.xyz)) && all(vec4(0.0, 0.25, 0.5, 1.0) == _globalUniforms.expected))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/intrinsics/BitCount.asm.frag b/tests/sksl/intrinsics/BitCount.asm.frag index e3957e451b23..b034c4e30361 100644 --- a/tests/sksl/intrinsics/BitCount.asm.frag +++ b/tests/sksl/intrinsics/BitCount.asm.frag @@ -1,57 +1,57 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "a" -OpMemberName %_UniformBuffer 1 "b" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 1 Offset 4 -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %23 RelaxedPrecision -OpDecorate %31 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "a" + OpMemberName %_UniformBuffer 1 "b" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 1 Offset 4 + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %23 RelaxedPrecision + OpDecorate %31 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%int = OpTypeInt 32 1 -%uint = OpTypeInt 32 0 + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 %_UniformBuffer = OpTypeStruct %int %uint %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%16 = OpTypeFunction %void + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %16 = OpTypeFunction %void %_ptr_Uniform_int = OpTypePointer Uniform %int -%int_0 = OpConstant %int 0 + %int_0 = OpConstant %int 0 %_ptr_Output_float = OpTypePointer Output %float %_ptr_Uniform_uint = OpTypePointer Uniform %uint -%int_1 = OpConstant %int 1 -%main = OpFunction %void None %16 -%17 = OpLabel -%19 = OpAccessChain %_ptr_Uniform_int %10 %int_0 -%22 = OpLoad %int %19 -%18 = OpBitCount %int %22 -%23 = OpConvertSToF %float %18 -%24 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 -OpStore %24 %23 -%27 = OpAccessChain %_ptr_Uniform_uint %10 %int_1 -%30 = OpLoad %uint %27 -%26 = OpBitCount %int %30 -%31 = OpConvertSToF %float %26 -%32 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_1 -OpStore %32 %31 -OpReturn -OpFunctionEnd + %int_1 = OpConstant %int 1 + %main = OpFunction %void None %16 + %17 = OpLabel + %19 = OpAccessChain %_ptr_Uniform_int %10 %int_0 + %22 = OpLoad %int %19 + %18 = OpBitCount %int %22 + %23 = OpConvertSToF %float %18 + %24 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 + OpStore %24 %23 + %27 = OpAccessChain %_ptr_Uniform_uint %10 %int_1 + %30 = OpLoad %uint %27 + %26 = OpBitCount %int %30 + %31 = OpConvertSToF %float %26 + %32 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_1 + OpStore %32 %31 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/intrinsics/BitCount.wgsl b/tests/sksl/intrinsics/BitCount.wgsl new file mode 100644 index 000000000000..f982306a8400 --- /dev/null +++ b/tests/sksl/intrinsics/BitCount.wgsl @@ -0,0 +1,34 @@ +### Compilation failed: + +error: :15:20 error: unresolved call target 'bitCount' + let _skTemp0 = bitCount(_globalUniforms.a); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + a: i32, + b: u32, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_stageOut: ptr) { + { + let _skTemp0 = bitCount(_globalUniforms.a); + (*_stageOut).sk_FragColor.x = f32(_skTemp0); + let _skTemp1 = bitCount(_globalUniforms.b); + (*_stageOut).sk_FragColor.y = f32(_skTemp1); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(&_stageOut); + return _stageOut; +} + +1 error diff --git a/tests/sksl/intrinsics/Ceil.asm.frag b/tests/sksl/intrinsics/Ceil.asm.frag index 95ad03ea92c9..a9a51d779120 100644 --- a/tests/sksl/intrinsics/Ceil.asm.frag +++ b/tests/sksl/intrinsics/Ceil.asm.frag @@ -1,183 +1,183 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testInputs" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %expected "expected" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %expected RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %39 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %45 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %59 RelaxedPrecision -OpDecorate %66 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %80 RelaxedPrecision -OpDecorate %87 RelaxedPrecision -OpDecorate %100 RelaxedPrecision -OpDecorate %103 RelaxedPrecision -OpDecorate %104 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testInputs" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %expected "expected" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %expected RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %45 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %59 RelaxedPrecision + OpDecorate %66 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %80 RelaxedPrecision + OpDecorate %87 RelaxedPrecision + OpDecorate %100 RelaxedPrecision + OpDecorate %103 RelaxedPrecision + OpDecorate %104 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float -%float_n1 = OpConstant %float -1 -%float_1 = OpConstant %float 1 -%float_3 = OpConstant %float 3 -%31 = OpConstantComposite %v4float %float_n1 %float_0 %float_1 %float_3 -%false = OpConstantFalse %bool + %float_n1 = OpConstant %float -1 + %float_1 = OpConstant %float 1 + %float_3 = OpConstant %float 3 + %31 = OpConstantComposite %v4float %float_n1 %float_0 %float_1 %float_3 + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%v3bool = OpTypeVector %bool 3 -%v4bool = OpTypeVector %bool 4 -%true = OpConstantTrue %bool -%79 = OpConstantComposite %v2float %float_n1 %float_0 -%86 = OpConstantComposite %v3float %float_n1 %float_0 %float_1 -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %v3bool = OpTypeVector %bool 3 + %v4bool = OpTypeVector %bool 4 + %true = OpConstantTrue %bool + %79 = OpConstantComposite %v2float %float_n1 %float_0 + %86 = OpConstantComposite %v3float %float_n1 %float_0 %float_1 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%expected = OpVariable %_ptr_Function_v4float Function -%94 = OpVariable %_ptr_Function_v4float Function -OpStore %expected %31 -%34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%38 = OpLoad %v4float %34 -%39 = OpCompositeExtract %float %38 0 -%33 = OpExtInst %float %1 Ceil %39 -%40 = OpFOrdEqual %bool %33 %float_n1 -OpSelectionMerge %42 None -OpBranchConditional %40 %41 %42 -%41 = OpLabel -%44 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%45 = OpLoad %v4float %44 -%46 = OpVectorShuffle %v2float %45 %45 0 1 -%43 = OpExtInst %v2float %1 Ceil %46 -%47 = OpVectorShuffle %v2float %31 %31 0 1 -%48 = OpFOrdEqual %v2bool %43 %47 -%50 = OpAll %bool %48 -OpBranch %42 -%42 = OpLabel -%51 = OpPhi %bool %false %25 %50 %41 -OpSelectionMerge %53 None -OpBranchConditional %51 %52 %53 -%52 = OpLabel -%55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%56 = OpLoad %v4float %55 -%57 = OpVectorShuffle %v3float %56 %56 0 1 2 -%54 = OpExtInst %v3float %1 Ceil %57 -%59 = OpVectorShuffle %v3float %31 %31 0 1 2 -%60 = OpFOrdEqual %v3bool %54 %59 -%62 = OpAll %bool %60 -OpBranch %53 -%53 = OpLabel -%63 = OpPhi %bool %false %42 %62 %52 -OpSelectionMerge %65 None -OpBranchConditional %63 %64 %65 -%64 = OpLabel -%67 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%68 = OpLoad %v4float %67 -%66 = OpExtInst %v4float %1 Ceil %68 -%69 = OpFOrdEqual %v4bool %66 %31 -%71 = OpAll %bool %69 -OpBranch %65 -%65 = OpLabel -%72 = OpPhi %bool %false %53 %71 %64 -OpSelectionMerge %74 None -OpBranchConditional %72 %73 %74 -%73 = OpLabel -OpBranch %74 -%74 = OpLabel -%76 = OpPhi %bool %false %65 %true %73 -OpSelectionMerge %78 None -OpBranchConditional %76 %77 %78 -%77 = OpLabel -%80 = OpVectorShuffle %v2float %31 %31 0 1 -%81 = OpFOrdEqual %v2bool %79 %80 -%82 = OpAll %bool %81 -OpBranch %78 -%78 = OpLabel -%83 = OpPhi %bool %false %74 %82 %77 -OpSelectionMerge %85 None -OpBranchConditional %83 %84 %85 -%84 = OpLabel -%87 = OpVectorShuffle %v3float %31 %31 0 1 2 -%88 = OpFOrdEqual %v3bool %86 %87 -%89 = OpAll %bool %88 -OpBranch %85 -%85 = OpLabel -%90 = OpPhi %bool %false %78 %89 %84 -OpSelectionMerge %92 None -OpBranchConditional %90 %91 %92 -%91 = OpLabel -OpBranch %92 -%92 = OpLabel -%93 = OpPhi %bool %false %85 %true %91 -OpSelectionMerge %97 None -OpBranchConditional %93 %95 %96 -%95 = OpLabel -%98 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%100 = OpLoad %v4float %98 -OpStore %94 %100 -OpBranch %97 -%96 = OpLabel -%101 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%103 = OpLoad %v4float %101 -OpStore %94 %103 -OpBranch %97 -%97 = OpLabel -%104 = OpLoad %v4float %94 -OpReturnValue %104 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %expected = OpVariable %_ptr_Function_v4float Function + %94 = OpVariable %_ptr_Function_v4float Function + OpStore %expected %31 + %34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %38 = OpLoad %v4float %34 + %39 = OpCompositeExtract %float %38 0 + %33 = OpExtInst %float %1 Ceil %39 + %40 = OpFOrdEqual %bool %33 %float_n1 + OpSelectionMerge %42 None + OpBranchConditional %40 %41 %42 + %41 = OpLabel + %44 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %45 = OpLoad %v4float %44 + %46 = OpVectorShuffle %v2float %45 %45 0 1 + %43 = OpExtInst %v2float %1 Ceil %46 + %47 = OpVectorShuffle %v2float %31 %31 0 1 + %48 = OpFOrdEqual %v2bool %43 %47 + %50 = OpAll %bool %48 + OpBranch %42 + %42 = OpLabel + %51 = OpPhi %bool %false %25 %50 %41 + OpSelectionMerge %53 None + OpBranchConditional %51 %52 %53 + %52 = OpLabel + %55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %56 = OpLoad %v4float %55 + %57 = OpVectorShuffle %v3float %56 %56 0 1 2 + %54 = OpExtInst %v3float %1 Ceil %57 + %59 = OpVectorShuffle %v3float %31 %31 0 1 2 + %60 = OpFOrdEqual %v3bool %54 %59 + %62 = OpAll %bool %60 + OpBranch %53 + %53 = OpLabel + %63 = OpPhi %bool %false %42 %62 %52 + OpSelectionMerge %65 None + OpBranchConditional %63 %64 %65 + %64 = OpLabel + %67 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %68 = OpLoad %v4float %67 + %66 = OpExtInst %v4float %1 Ceil %68 + %69 = OpFOrdEqual %v4bool %66 %31 + %71 = OpAll %bool %69 + OpBranch %65 + %65 = OpLabel + %72 = OpPhi %bool %false %53 %71 %64 + OpSelectionMerge %74 None + OpBranchConditional %72 %73 %74 + %73 = OpLabel + OpBranch %74 + %74 = OpLabel + %76 = OpPhi %bool %false %65 %true %73 + OpSelectionMerge %78 None + OpBranchConditional %76 %77 %78 + %77 = OpLabel + %80 = OpVectorShuffle %v2float %31 %31 0 1 + %81 = OpFOrdEqual %v2bool %79 %80 + %82 = OpAll %bool %81 + OpBranch %78 + %78 = OpLabel + %83 = OpPhi %bool %false %74 %82 %77 + OpSelectionMerge %85 None + OpBranchConditional %83 %84 %85 + %84 = OpLabel + %87 = OpVectorShuffle %v3float %31 %31 0 1 2 + %88 = OpFOrdEqual %v3bool %86 %87 + %89 = OpAll %bool %88 + OpBranch %85 + %85 = OpLabel + %90 = OpPhi %bool %false %78 %89 %84 + OpSelectionMerge %92 None + OpBranchConditional %90 %91 %92 + %91 = OpLabel + OpBranch %92 + %92 = OpLabel + %93 = OpPhi %bool %false %85 %true %91 + OpSelectionMerge %97 None + OpBranchConditional %93 %95 %96 + %95 = OpLabel + %98 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %100 = OpLoad %v4float %98 + OpStore %94 %100 + OpBranch %97 + %96 = OpLabel + %101 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %103 = OpLoad %v4float %101 + OpStore %94 %103 + OpBranch %97 + %97 = OpLabel + %104 = OpLoad %v4float %94 + OpReturnValue %104 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Ceil.skrp b/tests/sksl/intrinsics/Ceil.skrp index a9ff2ba54419..fbff58e029b8 100644 --- a/tests/sksl/intrinsics/Ceil.skrp +++ b/tests/sksl/intrinsics/Ceil.skrp @@ -1,57 +1,52 @@ +50 instructions + [immutable slots] -expected(0) = 0xBF800000 (-1.0) -expected(1) = 0 -expected(2) = 0x3F800000 (1.0) -expected(3) = 0x40400000 (3.0) +i0 = 0xBF800000 (-1.0) +i1 = 0 +i2 = 0x3F800000 (1.0) +i3 = 0x40400000 (3.0) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_uniform $0 = testInputs(0) ceil_float $0 = ceil($0) -copy_slot_unmasked $1 = expected(0) -cmpeq_float $0 = equal($0, $1) +cmpeq_imm_float $0 = equal($0, 0xBF800000 (-1.0)) copy_2_uniforms $1..2 = testInputs(0..1) ceil_2_floats $1..2 = ceil($1..2) -copy_2_slots_unmasked $3..4 = expected(0..1) +copy_2_immutables_unmasked $3..4 = i0..1 [0xBF800000 (-1.0), 0] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_3_uniforms $1..3 = testInputs(0..2) ceil_3_floats $1..3 = ceil($1..3) -copy_3_slots_unmasked $4..6 = expected(0..2) +copy_3_immutables_unmasked $4..6 = i0..2 [0xBF800000 (-1.0), 0, 0x3F800000 (1.0)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_4_uniforms $1..4 = testInputs ceil_4_floats $1..4 = ceil($1..4) -copy_4_slots_unmasked $5..8 = expected +copy_4_immutables_unmasked $5..8 = i0..3 [0xBF800000 (-1.0), 0, 0x3F800000 (1.0), 0x40400000 (3.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expected(0) +copy_constant $1 = 0xBF800000 (-1.0) cmpeq_imm_float $1 = equal($1, 0xBF800000 (-1.0)) bitwise_and_int $0 &= $1 -copy_constant $1 = 0xBF800000 (-1.0) -copy_constant $2 = 0 -copy_2_slots_unmasked $3..4 = expected(0..1) +copy_2_immutables_unmasked $1..2 = i0..1 [0xBF800000 (-1.0), 0] +copy_2_immutables_unmasked $3..4 = i0..1 [0xBF800000 (-1.0), 0] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0xBF800000 (-1.0) -copy_constant $2 = 0 -copy_constant $3 = 0x3F800000 (1.0) -copy_3_slots_unmasked $4..6 = expected(0..2) +copy_3_immutables_unmasked $1..3 = i0..2 [0xBF800000 (-1.0), 0, 0x3F800000 (1.0)] +copy_3_immutables_unmasked $4..6 = i0..2 [0xBF800000 (-1.0), 0, 0x3F800000 (1.0)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0xBF800000 (-1.0) -copy_constant $2 = 0 -copy_constant $3 = 0x3F800000 (1.0) -copy_constant $4 = 0x40400000 (3.0) -copy_4_slots_unmasked $5..8 = expected +copy_4_immutables_unmasked $1..4 = i0..3 [0xBF800000 (-1.0), 0, 0x3F800000 (1.0), 0x40400000 (3.0)] +copy_4_immutables_unmasked $5..8 = i0..3 [0xBF800000 (-1.0), 0, 0x3F800000 (1.0), 0x40400000 (3.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 diff --git a/tests/sksl/intrinsics/Ceil.wgsl b/tests/sksl/intrinsics/Ceil.wgsl index 5347f1bcf198..33ac585392cf 100644 --- a/tests/sksl/intrinsics/Ceil.wgsl +++ b/tests/sksl/intrinsics/Ceil.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -19,7 +20,7 @@ fn main(_skParam0: vec2) -> vec4 { let _skTemp1 = ceil(_globalUniforms.testInputs.xy); let _skTemp2 = ceil(_globalUniforms.testInputs.xyz); let _skTemp3 = ceil(_globalUniforms.testInputs); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((_skTemp0 == expected.x && all(_skTemp1 == expected.xy)) && all(_skTemp2 == expected.xyz)) && all(_skTemp3 == expected)) && -1.0 == expected.x) && all(vec2(-1.0, 0.0) == expected.xy)) && all(vec3(-1.0, 0.0, 1.0) == expected.xyz)) && all(vec4(-1.0, 0.0, 1.0, 3.0) == expected))); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((_skTemp0 == expected.x) && all(_skTemp1 == expected.xy)) && all(_skTemp2 == expected.xyz)) && all(_skTemp3 == expected)) && (-1.0 == expected.x)) && all(vec2(-1.0, 0.0) == expected.xy)) && all(vec3(-1.0, 0.0, 1.0) == expected.xyz)) && all(vec4(-1.0, 0.0, 1.0, 3.0) == expected))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/intrinsics/ClampFloat.asm.frag b/tests/sksl/intrinsics/ClampFloat.asm.frag index f894cc09098d..d6fe68a69e63 100644 --- a/tests/sksl/intrinsics/ClampFloat.asm.frag +++ b/tests/sksl/intrinsics/ClampFloat.asm.frag @@ -1,291 +1,291 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testInputs" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %expectedA "expectedA" -OpName %expectedB "expectedB" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %expectedA RelaxedPrecision -OpDecorate %expectedB RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %49 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %53 RelaxedPrecision -OpDecorate %62 RelaxedPrecision -OpDecorate %63 RelaxedPrecision -OpDecorate %67 RelaxedPrecision -OpDecorate %76 RelaxedPrecision -OpDecorate %87 RelaxedPrecision -OpDecorate %88 RelaxedPrecision -OpDecorate %95 RelaxedPrecision -OpDecorate %96 RelaxedPrecision -OpDecorate %101 RelaxedPrecision -OpDecorate %109 RelaxedPrecision -OpDecorate %110 RelaxedPrecision -OpDecorate %113 RelaxedPrecision -OpDecorate %121 RelaxedPrecision -OpDecorate %135 RelaxedPrecision -OpDecorate %142 RelaxedPrecision -OpDecorate %154 RelaxedPrecision -OpDecorate %161 RelaxedPrecision -OpDecorate %174 RelaxedPrecision -OpDecorate %177 RelaxedPrecision -OpDecorate %178 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testInputs" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %expectedA "expectedA" + OpName %expectedB "expectedB" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %expectedA RelaxedPrecision + OpDecorate %expectedB RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %49 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %53 RelaxedPrecision + OpDecorate %62 RelaxedPrecision + OpDecorate %63 RelaxedPrecision + OpDecorate %67 RelaxedPrecision + OpDecorate %76 RelaxedPrecision + OpDecorate %87 RelaxedPrecision + OpDecorate %88 RelaxedPrecision + OpDecorate %95 RelaxedPrecision + OpDecorate %96 RelaxedPrecision + OpDecorate %101 RelaxedPrecision + OpDecorate %109 RelaxedPrecision + OpDecorate %110 RelaxedPrecision + OpDecorate %113 RelaxedPrecision + OpDecorate %121 RelaxedPrecision + OpDecorate %135 RelaxedPrecision + OpDecorate %142 RelaxedPrecision + OpDecorate %154 RelaxedPrecision + OpDecorate %161 RelaxedPrecision + OpDecorate %174 RelaxedPrecision + OpDecorate %177 RelaxedPrecision + OpDecorate %178 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float -%float_n1 = OpConstant %float -1 -%float_0_75 = OpConstant %float 0.75 -%float_1 = OpConstant %float 1 -%31 = OpConstantComposite %v4float %float_n1 %float_0 %float_0_75 %float_1 -%float_0_5 = OpConstant %float 0.5 -%float_2_25 = OpConstant %float 2.25 -%35 = OpConstantComposite %v4float %float_n1 %float_0 %float_0_5 %float_2_25 -%false = OpConstantFalse %bool + %float_n1 = OpConstant %float -1 + %float_0_75 = OpConstant %float 0.75 + %float_1 = OpConstant %float 1 + %31 = OpConstantComposite %v4float %float_n1 %float_0 %float_0_75 %float_1 + %float_0_5 = OpConstant %float 0.5 + %float_2_25 = OpConstant %float 2.25 + %35 = OpConstantComposite %v4float %float_n1 %float_0 %float_0_5 %float_2_25 + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%51 = OpConstantComposite %v2float %float_n1 %float_n1 -%52 = OpConstantComposite %v2float %float_1 %float_1 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%65 = OpConstantComposite %v3float %float_n1 %float_n1 %float_n1 -%66 = OpConstantComposite %v3float %float_1 %float_1 %float_1 -%v3bool = OpTypeVector %bool 3 -%77 = OpConstantComposite %v4float %float_n1 %float_n1 %float_n1 %float_n1 -%78 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 -%v4bool = OpTypeVector %bool 4 -%float_n2 = OpConstant %float -2 -%98 = OpConstantComposite %v2float %float_n1 %float_n2 -%float_2 = OpConstant %float 2 -%100 = OpConstantComposite %v2float %float_1 %float_2 -%111 = OpConstantComposite %v3float %float_n1 %float_n2 %float_n2 -%112 = OpConstantComposite %v3float %float_1 %float_2 %float_0_5 -%122 = OpConstantComposite %v4float %float_n1 %float_n2 %float_n2 %float_1 -%float_3 = OpConstant %float 3 -%124 = OpConstantComposite %v4float %float_1 %float_2 %float_0_5 %float_3 -%true = OpConstantTrue %bool -%134 = OpConstantComposite %v2float %float_n1 %float_0 -%141 = OpConstantComposite %v3float %float_n1 %float_0 %float_0_75 -%160 = OpConstantComposite %v3float %float_n1 %float_0 %float_0_5 -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %51 = OpConstantComposite %v2float %float_n1 %float_n1 + %52 = OpConstantComposite %v2float %float_1 %float_1 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %65 = OpConstantComposite %v3float %float_n1 %float_n1 %float_n1 + %66 = OpConstantComposite %v3float %float_1 %float_1 %float_1 + %v3bool = OpTypeVector %bool 3 + %77 = OpConstantComposite %v4float %float_n1 %float_n1 %float_n1 %float_n1 + %78 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %v4bool = OpTypeVector %bool 4 + %float_n2 = OpConstant %float -2 + %98 = OpConstantComposite %v2float %float_n1 %float_n2 + %float_2 = OpConstant %float 2 + %100 = OpConstantComposite %v2float %float_1 %float_2 + %111 = OpConstantComposite %v3float %float_n1 %float_n2 %float_n2 + %112 = OpConstantComposite %v3float %float_1 %float_2 %float_0_5 + %122 = OpConstantComposite %v4float %float_n1 %float_n2 %float_n2 %float_1 + %float_3 = OpConstant %float 3 + %124 = OpConstantComposite %v4float %float_1 %float_2 %float_0_5 %float_3 + %true = OpConstantTrue %bool + %134 = OpConstantComposite %v2float %float_n1 %float_0 + %141 = OpConstantComposite %v3float %float_n1 %float_0 %float_0_75 + %160 = OpConstantComposite %v3float %float_n1 %float_0 %float_0_5 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%expectedA = OpVariable %_ptr_Function_v4float Function -%expectedB = OpVariable %_ptr_Function_v4float Function -%168 = OpVariable %_ptr_Function_v4float Function -OpStore %expectedA %31 -OpStore %expectedB %35 -%38 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%42 = OpLoad %v4float %38 -%43 = OpCompositeExtract %float %42 0 -%37 = OpExtInst %float %1 FClamp %43 %float_n1 %float_1 -%44 = OpFOrdEqual %bool %37 %float_n1 -OpSelectionMerge %46 None -OpBranchConditional %44 %45 %46 -%45 = OpLabel -%48 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%49 = OpLoad %v4float %48 -%50 = OpVectorShuffle %v2float %49 %49 0 1 -%47 = OpExtInst %v2float %1 FClamp %50 %51 %52 -%53 = OpVectorShuffle %v2float %31 %31 0 1 -%54 = OpFOrdEqual %v2bool %47 %53 -%56 = OpAll %bool %54 -OpBranch %46 -%46 = OpLabel -%57 = OpPhi %bool %false %25 %56 %45 -OpSelectionMerge %59 None -OpBranchConditional %57 %58 %59 -%58 = OpLabel -%61 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%62 = OpLoad %v4float %61 -%63 = OpVectorShuffle %v3float %62 %62 0 1 2 -%60 = OpExtInst %v3float %1 FClamp %63 %65 %66 -%67 = OpVectorShuffle %v3float %31 %31 0 1 2 -%68 = OpFOrdEqual %v3bool %60 %67 -%70 = OpAll %bool %68 -OpBranch %59 -%59 = OpLabel -%71 = OpPhi %bool %false %46 %70 %58 -OpSelectionMerge %73 None -OpBranchConditional %71 %72 %73 -%72 = OpLabel -%75 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%76 = OpLoad %v4float %75 -%74 = OpExtInst %v4float %1 FClamp %76 %77 %78 -%79 = OpFOrdEqual %v4bool %74 %31 -%81 = OpAll %bool %79 -OpBranch %73 -%73 = OpLabel -%82 = OpPhi %bool %false %59 %81 %72 -OpSelectionMerge %84 None -OpBranchConditional %82 %83 %84 -%83 = OpLabel -%86 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%87 = OpLoad %v4float %86 -%88 = OpCompositeExtract %float %87 0 -%85 = OpExtInst %float %1 FClamp %88 %float_n1 %float_1 -%89 = OpFOrdEqual %bool %85 %float_n1 -OpBranch %84 -%84 = OpLabel -%90 = OpPhi %bool %false %73 %89 %83 -OpSelectionMerge %92 None -OpBranchConditional %90 %91 %92 -%91 = OpLabel -%94 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%95 = OpLoad %v4float %94 -%96 = OpVectorShuffle %v2float %95 %95 0 1 -%93 = OpExtInst %v2float %1 FClamp %96 %98 %100 -%101 = OpVectorShuffle %v2float %35 %35 0 1 -%102 = OpFOrdEqual %v2bool %93 %101 -%103 = OpAll %bool %102 -OpBranch %92 -%92 = OpLabel -%104 = OpPhi %bool %false %84 %103 %91 -OpSelectionMerge %106 None -OpBranchConditional %104 %105 %106 -%105 = OpLabel -%108 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%109 = OpLoad %v4float %108 -%110 = OpVectorShuffle %v3float %109 %109 0 1 2 -%107 = OpExtInst %v3float %1 FClamp %110 %111 %112 -%113 = OpVectorShuffle %v3float %35 %35 0 1 2 -%114 = OpFOrdEqual %v3bool %107 %113 -%115 = OpAll %bool %114 -OpBranch %106 -%106 = OpLabel -%116 = OpPhi %bool %false %92 %115 %105 -OpSelectionMerge %118 None -OpBranchConditional %116 %117 %118 -%117 = OpLabel -%120 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%121 = OpLoad %v4float %120 -%119 = OpExtInst %v4float %1 FClamp %121 %122 %124 -%125 = OpFOrdEqual %v4bool %119 %35 -%126 = OpAll %bool %125 -OpBranch %118 -%118 = OpLabel -%127 = OpPhi %bool %false %106 %126 %117 -OpSelectionMerge %129 None -OpBranchConditional %127 %128 %129 -%128 = OpLabel -OpBranch %129 -%129 = OpLabel -%131 = OpPhi %bool %false %118 %true %128 -OpSelectionMerge %133 None -OpBranchConditional %131 %132 %133 -%132 = OpLabel -%135 = OpVectorShuffle %v2float %31 %31 0 1 -%136 = OpFOrdEqual %v2bool %134 %135 -%137 = OpAll %bool %136 -OpBranch %133 -%133 = OpLabel -%138 = OpPhi %bool %false %129 %137 %132 -OpSelectionMerge %140 None -OpBranchConditional %138 %139 %140 -%139 = OpLabel -%142 = OpVectorShuffle %v3float %31 %31 0 1 2 -%143 = OpFOrdEqual %v3bool %141 %142 -%144 = OpAll %bool %143 -OpBranch %140 -%140 = OpLabel -%145 = OpPhi %bool %false %133 %144 %139 -OpSelectionMerge %147 None -OpBranchConditional %145 %146 %147 -%146 = OpLabel -OpBranch %147 -%147 = OpLabel -%148 = OpPhi %bool %false %140 %true %146 -OpSelectionMerge %150 None -OpBranchConditional %148 %149 %150 -%149 = OpLabel -OpBranch %150 -%150 = OpLabel -%151 = OpPhi %bool %false %147 %true %149 -OpSelectionMerge %153 None -OpBranchConditional %151 %152 %153 -%152 = OpLabel -%154 = OpVectorShuffle %v2float %35 %35 0 1 -%155 = OpFOrdEqual %v2bool %134 %154 -%156 = OpAll %bool %155 -OpBranch %153 -%153 = OpLabel -%157 = OpPhi %bool %false %150 %156 %152 -OpSelectionMerge %159 None -OpBranchConditional %157 %158 %159 -%158 = OpLabel -%161 = OpVectorShuffle %v3float %35 %35 0 1 2 -%162 = OpFOrdEqual %v3bool %160 %161 -%163 = OpAll %bool %162 -OpBranch %159 -%159 = OpLabel -%164 = OpPhi %bool %false %153 %163 %158 -OpSelectionMerge %166 None -OpBranchConditional %164 %165 %166 -%165 = OpLabel -OpBranch %166 -%166 = OpLabel -%167 = OpPhi %bool %false %159 %true %165 -OpSelectionMerge %171 None -OpBranchConditional %167 %169 %170 -%169 = OpLabel -%172 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%174 = OpLoad %v4float %172 -OpStore %168 %174 -OpBranch %171 -%170 = OpLabel -%175 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%177 = OpLoad %v4float %175 -OpStore %168 %177 -OpBranch %171 -%171 = OpLabel -%178 = OpLoad %v4float %168 -OpReturnValue %178 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %expectedA = OpVariable %_ptr_Function_v4float Function + %expectedB = OpVariable %_ptr_Function_v4float Function + %168 = OpVariable %_ptr_Function_v4float Function + OpStore %expectedA %31 + OpStore %expectedB %35 + %38 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %42 = OpLoad %v4float %38 + %43 = OpCompositeExtract %float %42 0 + %37 = OpExtInst %float %1 FClamp %43 %float_n1 %float_1 + %44 = OpFOrdEqual %bool %37 %float_n1 + OpSelectionMerge %46 None + OpBranchConditional %44 %45 %46 + %45 = OpLabel + %48 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %49 = OpLoad %v4float %48 + %50 = OpVectorShuffle %v2float %49 %49 0 1 + %47 = OpExtInst %v2float %1 FClamp %50 %51 %52 + %53 = OpVectorShuffle %v2float %31 %31 0 1 + %54 = OpFOrdEqual %v2bool %47 %53 + %56 = OpAll %bool %54 + OpBranch %46 + %46 = OpLabel + %57 = OpPhi %bool %false %25 %56 %45 + OpSelectionMerge %59 None + OpBranchConditional %57 %58 %59 + %58 = OpLabel + %61 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %62 = OpLoad %v4float %61 + %63 = OpVectorShuffle %v3float %62 %62 0 1 2 + %60 = OpExtInst %v3float %1 FClamp %63 %65 %66 + %67 = OpVectorShuffle %v3float %31 %31 0 1 2 + %68 = OpFOrdEqual %v3bool %60 %67 + %70 = OpAll %bool %68 + OpBranch %59 + %59 = OpLabel + %71 = OpPhi %bool %false %46 %70 %58 + OpSelectionMerge %73 None + OpBranchConditional %71 %72 %73 + %72 = OpLabel + %75 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %76 = OpLoad %v4float %75 + %74 = OpExtInst %v4float %1 FClamp %76 %77 %78 + %79 = OpFOrdEqual %v4bool %74 %31 + %81 = OpAll %bool %79 + OpBranch %73 + %73 = OpLabel + %82 = OpPhi %bool %false %59 %81 %72 + OpSelectionMerge %84 None + OpBranchConditional %82 %83 %84 + %83 = OpLabel + %86 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %87 = OpLoad %v4float %86 + %88 = OpCompositeExtract %float %87 0 + %85 = OpExtInst %float %1 FClamp %88 %float_n1 %float_1 + %89 = OpFOrdEqual %bool %85 %float_n1 + OpBranch %84 + %84 = OpLabel + %90 = OpPhi %bool %false %73 %89 %83 + OpSelectionMerge %92 None + OpBranchConditional %90 %91 %92 + %91 = OpLabel + %94 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %95 = OpLoad %v4float %94 + %96 = OpVectorShuffle %v2float %95 %95 0 1 + %93 = OpExtInst %v2float %1 FClamp %96 %98 %100 + %101 = OpVectorShuffle %v2float %35 %35 0 1 + %102 = OpFOrdEqual %v2bool %93 %101 + %103 = OpAll %bool %102 + OpBranch %92 + %92 = OpLabel + %104 = OpPhi %bool %false %84 %103 %91 + OpSelectionMerge %106 None + OpBranchConditional %104 %105 %106 + %105 = OpLabel + %108 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %109 = OpLoad %v4float %108 + %110 = OpVectorShuffle %v3float %109 %109 0 1 2 + %107 = OpExtInst %v3float %1 FClamp %110 %111 %112 + %113 = OpVectorShuffle %v3float %35 %35 0 1 2 + %114 = OpFOrdEqual %v3bool %107 %113 + %115 = OpAll %bool %114 + OpBranch %106 + %106 = OpLabel + %116 = OpPhi %bool %false %92 %115 %105 + OpSelectionMerge %118 None + OpBranchConditional %116 %117 %118 + %117 = OpLabel + %120 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %121 = OpLoad %v4float %120 + %119 = OpExtInst %v4float %1 FClamp %121 %122 %124 + %125 = OpFOrdEqual %v4bool %119 %35 + %126 = OpAll %bool %125 + OpBranch %118 + %118 = OpLabel + %127 = OpPhi %bool %false %106 %126 %117 + OpSelectionMerge %129 None + OpBranchConditional %127 %128 %129 + %128 = OpLabel + OpBranch %129 + %129 = OpLabel + %131 = OpPhi %bool %false %118 %true %128 + OpSelectionMerge %133 None + OpBranchConditional %131 %132 %133 + %132 = OpLabel + %135 = OpVectorShuffle %v2float %31 %31 0 1 + %136 = OpFOrdEqual %v2bool %134 %135 + %137 = OpAll %bool %136 + OpBranch %133 + %133 = OpLabel + %138 = OpPhi %bool %false %129 %137 %132 + OpSelectionMerge %140 None + OpBranchConditional %138 %139 %140 + %139 = OpLabel + %142 = OpVectorShuffle %v3float %31 %31 0 1 2 + %143 = OpFOrdEqual %v3bool %141 %142 + %144 = OpAll %bool %143 + OpBranch %140 + %140 = OpLabel + %145 = OpPhi %bool %false %133 %144 %139 + OpSelectionMerge %147 None + OpBranchConditional %145 %146 %147 + %146 = OpLabel + OpBranch %147 + %147 = OpLabel + %148 = OpPhi %bool %false %140 %true %146 + OpSelectionMerge %150 None + OpBranchConditional %148 %149 %150 + %149 = OpLabel + OpBranch %150 + %150 = OpLabel + %151 = OpPhi %bool %false %147 %true %149 + OpSelectionMerge %153 None + OpBranchConditional %151 %152 %153 + %152 = OpLabel + %154 = OpVectorShuffle %v2float %35 %35 0 1 + %155 = OpFOrdEqual %v2bool %134 %154 + %156 = OpAll %bool %155 + OpBranch %153 + %153 = OpLabel + %157 = OpPhi %bool %false %150 %156 %152 + OpSelectionMerge %159 None + OpBranchConditional %157 %158 %159 + %158 = OpLabel + %161 = OpVectorShuffle %v3float %35 %35 0 1 2 + %162 = OpFOrdEqual %v3bool %160 %161 + %163 = OpAll %bool %162 + OpBranch %159 + %159 = OpLabel + %164 = OpPhi %bool %false %153 %163 %158 + OpSelectionMerge %166 None + OpBranchConditional %164 %165 %166 + %165 = OpLabel + OpBranch %166 + %166 = OpLabel + %167 = OpPhi %bool %false %159 %true %165 + OpSelectionMerge %171 None + OpBranchConditional %167 %169 %170 + %169 = OpLabel + %172 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %174 = OpLoad %v4float %172 + OpStore %168 %174 + OpBranch %171 + %170 = OpLabel + %175 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %177 = OpLoad %v4float %175 + OpStore %168 %177 + OpBranch %171 + %171 = OpLabel + %178 = OpLoad %v4float %168 + OpReturnValue %178 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/ClampFloat.skrp b/tests/sksl/intrinsics/ClampFloat.skrp index f367b68abc0a..827ff549e904 100644 --- a/tests/sksl/intrinsics/ClampFloat.skrp +++ b/tests/sksl/intrinsics/ClampFloat.skrp @@ -1,34 +1,35 @@ +114 instructions + [immutable slots] -expectedA(0) = 0xBF800000 (-1.0) -expectedA(1) = 0 -expectedA(2) = 0x3F400000 (0.75) -expectedA(3) = 0x3F800000 (1.0) -clampLow(0) = 0xBF800000 (-1.0) -clampLow(1) = 0xC0000000 (-2.0) -clampLow(2) = 0xC0000000 (-2.0) -clampLow(3) = 0x3F800000 (1.0) -expectedB(0) = 0xBF800000 (-1.0) -expectedB(1) = 0 -expectedB(2) = 0x3F000000 (0.5) -expectedB(3) = 0x40100000 (2.25) -clampHigh(0) = 0x3F800000 (1.0) -clampHigh(1) = 0x40000000 (2.0) -clampHigh(2) = 0x3F000000 (0.5) -clampHigh(3) = 0x40400000 (3.0) +i0 = 0xBF800000 (-1.0) +i1 = 0 +i2 = 0x3F400000 (0.75) +i3 = 0x3F800000 (1.0) +i4 = 0xBF800000 (-1.0) +i5 = 0xC0000000 (-2.0) +i6 = 0xC0000000 (-2.0) +i7 = 0x3F800000 (1.0) +i8 = 0xBF800000 (-1.0) +i9 = 0 +i10 = 0x3F000000 (0.5) +i11 = 0x40100000 (2.25) +i12 = 0x3F800000 (1.0) +i13 = 0x40000000 (2.0) +i14 = 0x3F000000 (0.5) +i15 = 0x40400000 (3.0) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_uniform $0 = testInputs(0) max_imm_float $0 = max($0, 0xBF800000 (-1.0)) min_imm_float $0 = min($0, 0x3F800000 (1.0)) -copy_slot_unmasked $1 = expectedA(0) -cmpeq_float $0 = equal($0, $1) +cmpeq_imm_float $0 = equal($0, 0xBF800000 (-1.0)) copy_2_uniforms $1..2 = testInputs(0..1) splat_2_constants $3..4 = 0xBF800000 (-1.0) max_2_floats $1..2 = max($1..2, $3..4) splat_2_constants $3..4 = 0x3F800000 (1.0) min_2_floats $1..2 = min($1..2, $3..4) -copy_2_slots_unmasked $3..4 = expectedA(0..1) +copy_2_immutables_unmasked $3..4 = i0..1 [0xBF800000 (-1.0), 0] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 @@ -37,7 +38,7 @@ splat_3_constants $4..6 = 0xBF800000 (-1.0) max_3_floats $1..3 = max($1..3, $4..6) splat_3_constants $4..6 = 0x3F800000 (1.0) min_3_floats $1..3 = min($1..3, $4..6) -copy_3_slots_unmasked $4..6 = expectedA(0..2) +copy_3_immutables_unmasked $4..6 = i0..2 [0xBF800000 (-1.0), 0, 0x3F400000 (0.75)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 @@ -47,7 +48,7 @@ splat_4_constants $5..8 = 0xBF800000 (-1.0) max_4_floats $1..4 = max($1..4, $5..8) splat_4_constants $5..8 = 0x3F800000 (1.0) min_4_floats $1..4 = min($1..4, $5..8) -copy_4_slots_unmasked $5..8 = expectedA +copy_4_immutables_unmasked $5..8 = i0..3 [0xBF800000 (-1.0), 0, 0x3F400000 (0.75), 0x3F800000 (1.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -55,91 +56,73 @@ bitwise_and_int $0 &= $1 copy_uniform $1 = testInputs(0) max_imm_float $1 = max($1, 0xBF800000 (-1.0)) min_imm_float $1 = min($1, 0x3F800000 (1.0)) -copy_slot_unmasked $2 = expectedB(0) -cmpeq_float $1 = equal($1, $2) +cmpeq_imm_float $1 = equal($1, 0xBF800000 (-1.0)) bitwise_and_int $0 &= $1 copy_2_uniforms $1..2 = testInputs(0..1) -copy_constant $3 = 0xBF800000 (-1.0) -copy_constant $4 = 0xC0000000 (-2.0) +copy_2_immutables_unmasked $3..4 = i4..5 [0xBF800000 (-1.0), 0xC0000000 (-2.0)] max_2_floats $1..2 = max($1..2, $3..4) -copy_constant $3 = 0x3F800000 (1.0) -copy_constant $4 = 0x40000000 (2.0) +copy_2_immutables_unmasked $3..4 = i12..13 [0x3F800000 (1.0), 0x40000000 (2.0)] min_2_floats $1..2 = min($1..2, $3..4) -copy_2_slots_unmasked $3..4 = expectedB(0..1) +copy_2_immutables_unmasked $3..4 = i8..9 [0xBF800000 (-1.0), 0] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_3_uniforms $1..3 = testInputs(0..2) -copy_constant $4 = 0xBF800000 (-1.0) -splat_2_constants $5..6 = 0xC0000000 (-2.0) +copy_3_immutables_unmasked $4..6 = i4..6 [0xBF800000 (-1.0), 0xC0000000 (-2.0), 0xC0000000 (-2.0)] max_3_floats $1..3 = max($1..3, $4..6) -copy_constant $4 = 0x3F800000 (1.0) -copy_constant $5 = 0x40000000 (2.0) -copy_constant $6 = 0x3F000000 (0.5) +copy_3_immutables_unmasked $4..6 = i12..14 [0x3F800000 (1.0), 0x40000000 (2.0), 0x3F000000 (0.5)] min_3_floats $1..3 = min($1..3, $4..6) -copy_3_slots_unmasked $4..6 = expectedB(0..2) +copy_3_immutables_unmasked $4..6 = i8..10 [0xBF800000 (-1.0), 0, 0x3F000000 (0.5)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_4_uniforms $1..4 = testInputs -copy_4_slots_unmasked $5..8 = clampLow +copy_4_immutables_unmasked $5..8 = i4..7 [0xBF800000 (-1.0), 0xC0000000 (-2.0), 0xC0000000 (-2.0), 0x3F800000 (1.0)] max_4_floats $1..4 = max($1..4, $5..8) -copy_4_slots_unmasked $5..8 = clampHigh +copy_4_immutables_unmasked $5..8 = i12..15 [0x3F800000 (1.0), 0x40000000 (2.0), 0x3F000000 (0.5), 0x40400000 (3.0)] min_4_floats $1..4 = min($1..4, $5..8) -copy_4_slots_unmasked $5..8 = expectedB +copy_4_immutables_unmasked $5..8 = i8..11 [0xBF800000 (-1.0), 0, 0x3F000000 (0.5), 0x40100000 (2.25)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expectedA(0) +copy_constant $1 = 0xBF800000 (-1.0) cmpeq_imm_float $1 = equal($1, 0xBF800000 (-1.0)) bitwise_and_int $0 &= $1 -copy_constant $1 = 0xBF800000 (-1.0) -copy_constant $2 = 0 -copy_2_slots_unmasked $3..4 = expectedA(0..1) +copy_2_immutables_unmasked $1..2 = i8..9 [0xBF800000 (-1.0), 0] +copy_2_immutables_unmasked $3..4 = i0..1 [0xBF800000 (-1.0), 0] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0xBF800000 (-1.0) -copy_constant $2 = 0 -copy_constant $3 = 0x3F400000 (0.75) -copy_3_slots_unmasked $4..6 = expectedA(0..2) +copy_3_immutables_unmasked $1..3 = i0..2 [0xBF800000 (-1.0), 0, 0x3F400000 (0.75)] +copy_3_immutables_unmasked $4..6 = i0..2 [0xBF800000 (-1.0), 0, 0x3F400000 (0.75)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0xBF800000 (-1.0) -copy_constant $2 = 0 -copy_constant $3 = 0x3F400000 (0.75) -copy_constant $4 = 0x3F800000 (1.0) -copy_4_slots_unmasked $5..8 = expectedA +copy_4_immutables_unmasked $1..4 = i0..3 [0xBF800000 (-1.0), 0, 0x3F400000 (0.75), 0x3F800000 (1.0)] +copy_4_immutables_unmasked $5..8 = i0..3 [0xBF800000 (-1.0), 0, 0x3F400000 (0.75), 0x3F800000 (1.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expectedB(0) +copy_constant $1 = 0xBF800000 (-1.0) cmpeq_imm_float $1 = equal($1, 0xBF800000 (-1.0)) bitwise_and_int $0 &= $1 -copy_constant $1 = 0xBF800000 (-1.0) -copy_constant $2 = 0 -copy_2_slots_unmasked $3..4 = expectedB(0..1) +copy_2_immutables_unmasked $1..2 = i8..9 [0xBF800000 (-1.0), 0] +copy_2_immutables_unmasked $3..4 = i8..9 [0xBF800000 (-1.0), 0] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0xBF800000 (-1.0) -copy_constant $2 = 0 -copy_constant $3 = 0x3F000000 (0.5) -copy_3_slots_unmasked $4..6 = expectedB(0..2) +copy_3_immutables_unmasked $1..3 = i8..10 [0xBF800000 (-1.0), 0, 0x3F000000 (0.5)] +copy_3_immutables_unmasked $4..6 = i8..10 [0xBF800000 (-1.0), 0, 0x3F000000 (0.5)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0xBF800000 (-1.0) -copy_constant $2 = 0 -copy_constant $3 = 0x3F000000 (0.5) -copy_constant $4 = 0x40100000 (2.25) -copy_4_slots_unmasked $5..8 = expectedB +copy_4_immutables_unmasked $1..4 = i8..11 [0xBF800000 (-1.0), 0, 0x3F000000 (0.5), 0x40100000 (2.25)] +copy_4_immutables_unmasked $5..8 = i8..11 [0xBF800000 (-1.0), 0, 0x3F000000 (0.5), 0x40100000 (2.25)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 diff --git a/tests/sksl/intrinsics/ClampFloat.wgsl b/tests/sksl/intrinsics/ClampFloat.wgsl index eb0eaaff9b1f..96b1b347b252 100644 --- a/tests/sksl/intrinsics/ClampFloat.wgsl +++ b/tests/sksl/intrinsics/ClampFloat.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -26,7 +27,7 @@ fn main(_skParam0: vec2) -> vec4 { let _skTemp5 = clamp(_globalUniforms.testInputs.xy, vec2(-1.0, -2.0), vec2(1.0, 2.0)); let _skTemp6 = clamp(_globalUniforms.testInputs.xyz, vec3(-1.0, -2.0, -2.0), vec3(1.0, 2.0, 0.5)); let _skTemp7 = clamp(_globalUniforms.testInputs, clampLow, clampHigh); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((((((((((_skTemp0 == expectedA.x && all(_skTemp1 == expectedA.xy)) && all(_skTemp2 == expectedA.xyz)) && all(_skTemp3 == expectedA)) && _skTemp4 == expectedB.x) && all(_skTemp5 == expectedB.xy)) && all(_skTemp6 == expectedB.xyz)) && all(_skTemp7 == expectedB)) && -1.0 == expectedA.x) && all(vec2(-1.0, 0.0) == expectedA.xy)) && all(vec3(-1.0, 0.0, 0.75) == expectedA.xyz)) && all(vec4(-1.0, 0.0, 0.75, 1.0) == expectedA)) && -1.0 == expectedB.x) && all(vec2(-1.0, 0.0) == expectedB.xy)) && all(vec3(-1.0, 0.0, 0.5) == expectedB.xyz)) && all(vec4(-1.0, 0.0, 0.5, 2.25) == expectedB))); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((((((((((_skTemp0 == expectedA.x) && all(_skTemp1 == expectedA.xy)) && all(_skTemp2 == expectedA.xyz)) && all(_skTemp3 == expectedA)) && (_skTemp4 == expectedB.x)) && all(_skTemp5 == expectedB.xy)) && all(_skTemp6 == expectedB.xyz)) && all(_skTemp7 == expectedB)) && (-1.0 == expectedA.x)) && all(vec2(-1.0, 0.0) == expectedA.xy)) && all(vec3(-1.0, 0.0, 0.75) == expectedA.xyz)) && all(vec4(-1.0, 0.0, 0.75, 1.0) == expectedA)) && (-1.0 == expectedB.x)) && all(vec2(-1.0, 0.0) == expectedB.xy)) && all(vec3(-1.0, 0.0, 0.5) == expectedB.xyz)) && all(vec4(-1.0, 0.0, 0.5, 2.25) == expectedB))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/intrinsics/ClampInt.asm.frag b/tests/sksl/intrinsics/ClampInt.asm.frag index 239fed7cf4c7..1b41ba4ce183 100644 --- a/tests/sksl/intrinsics/ClampInt.asm.frag +++ b/tests/sksl/intrinsics/ClampInt.asm.frag @@ -1,275 +1,275 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testInputs" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %intValues "intValues" -OpName %expectedA "expectedA" -OpName %expectedB "expectedB" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %33 RelaxedPrecision -OpDecorate %35 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %174 RelaxedPrecision -OpDecorate %177 RelaxedPrecision -OpDecorate %178 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testInputs" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %intValues "intValues" + OpName %expectedA "expectedA" + OpName %expectedB "expectedB" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %33 RelaxedPrecision + OpDecorate %35 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %174 RelaxedPrecision + OpDecorate %177 RelaxedPrecision + OpDecorate %178 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%int = OpTypeInt 32 1 -%v4int = OpTypeVector %int 4 + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %int = OpTypeInt 32 1 + %v4int = OpTypeVector %int 4 %_ptr_Function_v4int = OpTypePointer Function %v4int %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_0 = OpConstant %int 0 -%float_100 = OpConstant %float 100 -%int_n100 = OpConstant %int -100 -%int_75 = OpConstant %int 75 -%int_100 = OpConstant %int 100 -%49 = OpConstantComposite %v4int %int_n100 %int_0 %int_75 %int_100 -%int_50 = OpConstant %int 50 -%int_225 = OpConstant %int 225 -%53 = OpConstantComposite %v4int %int_n100 %int_0 %int_50 %int_225 -%false = OpConstantFalse %bool -%v2int = OpTypeVector %int 2 -%63 = OpConstantComposite %v2int %int_n100 %int_n100 -%64 = OpConstantComposite %v2int %int_100 %int_100 -%v2bool = OpTypeVector %bool 2 -%v3int = OpTypeVector %int 3 -%75 = OpConstantComposite %v3int %int_n100 %int_n100 %int_n100 -%76 = OpConstantComposite %v3int %int_100 %int_100 %int_100 -%v3bool = OpTypeVector %bool 3 -%85 = OpConstantComposite %v4int %int_n100 %int_n100 %int_n100 %int_n100 -%86 = OpConstantComposite %v4int %int_100 %int_100 %int_100 %int_100 -%v4bool = OpTypeVector %bool 4 -%true = OpConstantTrue %bool -%97 = OpConstantComposite %v2int %int_n100 %int_0 -%104 = OpConstantComposite %v3int %int_n100 %int_0 %int_75 -%int_n200 = OpConstant %int -200 -%122 = OpConstantComposite %v2int %int_n100 %int_n200 -%int_200 = OpConstant %int 200 -%124 = OpConstantComposite %v2int %int_100 %int_200 -%133 = OpConstantComposite %v3int %int_n100 %int_n200 %int_n200 -%134 = OpConstantComposite %v3int %int_100 %int_200 %int_50 -%142 = OpConstantComposite %v4int %int_n100 %int_n200 %int_n200 %int_100 -%int_300 = OpConstant %int 300 -%144 = OpConstantComposite %v4int %int_100 %int_200 %int_50 %int_300 -%159 = OpConstantComposite %v3int %int_n100 %int_0 %int_50 + %int_0 = OpConstant %int 0 + %float_100 = OpConstant %float 100 + %int_n100 = OpConstant %int -100 + %int_75 = OpConstant %int 75 + %int_100 = OpConstant %int 100 + %49 = OpConstantComposite %v4int %int_n100 %int_0 %int_75 %int_100 + %int_50 = OpConstant %int 50 + %int_225 = OpConstant %int 225 + %53 = OpConstantComposite %v4int %int_n100 %int_0 %int_50 %int_225 + %false = OpConstantFalse %bool + %v2int = OpTypeVector %int 2 + %63 = OpConstantComposite %v2int %int_n100 %int_n100 + %64 = OpConstantComposite %v2int %int_100 %int_100 + %v2bool = OpTypeVector %bool 2 + %v3int = OpTypeVector %int 3 + %75 = OpConstantComposite %v3int %int_n100 %int_n100 %int_n100 + %76 = OpConstantComposite %v3int %int_100 %int_100 %int_100 + %v3bool = OpTypeVector %bool 3 + %85 = OpConstantComposite %v4int %int_n100 %int_n100 %int_n100 %int_n100 + %86 = OpConstantComposite %v4int %int_100 %int_100 %int_100 %int_100 + %v4bool = OpTypeVector %bool 4 + %true = OpConstantTrue %bool + %97 = OpConstantComposite %v2int %int_n100 %int_0 + %104 = OpConstantComposite %v3int %int_n100 %int_0 %int_75 + %int_n200 = OpConstant %int -200 + %122 = OpConstantComposite %v2int %int_n100 %int_n200 + %int_200 = OpConstant %int 200 + %124 = OpConstantComposite %v2int %int_100 %int_200 + %133 = OpConstantComposite %v3int %int_n100 %int_n200 %int_n200 + %134 = OpConstantComposite %v3int %int_100 %int_200 %int_50 + %142 = OpConstantComposite %v4int %int_n100 %int_n200 %int_n200 %int_100 + %int_300 = OpConstant %int 300 + %144 = OpConstantComposite %v4int %int_100 %int_200 %int_50 %int_300 + %159 = OpConstantComposite %v3int %int_n100 %int_0 %int_50 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%intValues = OpVariable %_ptr_Function_v4int Function -%expectedA = OpVariable %_ptr_Function_v4int Function -%expectedB = OpVariable %_ptr_Function_v4int Function -%167 = OpVariable %_ptr_Function_v4float Function -%30 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%33 = OpLoad %v4float %30 -%35 = OpVectorTimesScalar %v4float %33 %float_100 -%36 = OpCompositeExtract %float %35 0 -%37 = OpConvertFToS %int %36 -%38 = OpCompositeExtract %float %35 1 -%39 = OpConvertFToS %int %38 -%40 = OpCompositeExtract %float %35 2 -%41 = OpConvertFToS %int %40 -%42 = OpCompositeExtract %float %35 3 -%43 = OpConvertFToS %int %42 -%44 = OpCompositeConstruct %v4int %37 %39 %41 %43 -OpStore %intValues %44 -OpStore %expectedA %49 -OpStore %expectedB %53 -%56 = OpCompositeExtract %int %44 0 -%55 = OpExtInst %int %1 SClamp %56 %int_n100 %int_100 -%57 = OpIEqual %bool %55 %int_n100 -OpSelectionMerge %59 None -OpBranchConditional %57 %58 %59 -%58 = OpLabel -%61 = OpVectorShuffle %v2int %44 %44 0 1 -%60 = OpExtInst %v2int %1 SClamp %61 %63 %64 -%65 = OpVectorShuffle %v2int %49 %49 0 1 -%66 = OpIEqual %v2bool %60 %65 -%68 = OpAll %bool %66 -OpBranch %59 -%59 = OpLabel -%69 = OpPhi %bool %false %25 %68 %58 -OpSelectionMerge %71 None -OpBranchConditional %69 %70 %71 -%70 = OpLabel -%73 = OpVectorShuffle %v3int %44 %44 0 1 2 -%72 = OpExtInst %v3int %1 SClamp %73 %75 %76 -%77 = OpVectorShuffle %v3int %49 %49 0 1 2 -%78 = OpIEqual %v3bool %72 %77 -%80 = OpAll %bool %78 -OpBranch %71 -%71 = OpLabel -%81 = OpPhi %bool %false %59 %80 %70 -OpSelectionMerge %83 None -OpBranchConditional %81 %82 %83 -%82 = OpLabel -%84 = OpExtInst %v4int %1 SClamp %44 %85 %86 -%87 = OpIEqual %v4bool %84 %49 -%89 = OpAll %bool %87 -OpBranch %83 -%83 = OpLabel -%90 = OpPhi %bool %false %71 %89 %82 -OpSelectionMerge %92 None -OpBranchConditional %90 %91 %92 -%91 = OpLabel -OpBranch %92 -%92 = OpLabel -%94 = OpPhi %bool %false %83 %true %91 -OpSelectionMerge %96 None -OpBranchConditional %94 %95 %96 -%95 = OpLabel -%98 = OpVectorShuffle %v2int %49 %49 0 1 -%99 = OpIEqual %v2bool %97 %98 -%100 = OpAll %bool %99 -OpBranch %96 -%96 = OpLabel -%101 = OpPhi %bool %false %92 %100 %95 -OpSelectionMerge %103 None -OpBranchConditional %101 %102 %103 -%102 = OpLabel -%105 = OpVectorShuffle %v3int %49 %49 0 1 2 -%106 = OpIEqual %v3bool %104 %105 -%107 = OpAll %bool %106 -OpBranch %103 -%103 = OpLabel -%108 = OpPhi %bool %false %96 %107 %102 -OpSelectionMerge %110 None -OpBranchConditional %108 %109 %110 -%109 = OpLabel -OpBranch %110 -%110 = OpLabel -%111 = OpPhi %bool %false %103 %true %109 -OpSelectionMerge %113 None -OpBranchConditional %111 %112 %113 -%112 = OpLabel -%114 = OpExtInst %int %1 SClamp %56 %int_n100 %int_100 -%115 = OpIEqual %bool %114 %int_n100 -OpBranch %113 -%113 = OpLabel -%116 = OpPhi %bool %false %110 %115 %112 -OpSelectionMerge %118 None -OpBranchConditional %116 %117 %118 -%117 = OpLabel -%120 = OpVectorShuffle %v2int %44 %44 0 1 -%119 = OpExtInst %v2int %1 SClamp %120 %122 %124 -%125 = OpVectorShuffle %v2int %53 %53 0 1 -%126 = OpIEqual %v2bool %119 %125 -%127 = OpAll %bool %126 -OpBranch %118 -%118 = OpLabel -%128 = OpPhi %bool %false %113 %127 %117 -OpSelectionMerge %130 None -OpBranchConditional %128 %129 %130 -%129 = OpLabel -%132 = OpVectorShuffle %v3int %44 %44 0 1 2 -%131 = OpExtInst %v3int %1 SClamp %132 %133 %134 -%135 = OpVectorShuffle %v3int %53 %53 0 1 2 -%136 = OpIEqual %v3bool %131 %135 -%137 = OpAll %bool %136 -OpBranch %130 -%130 = OpLabel -%138 = OpPhi %bool %false %118 %137 %129 -OpSelectionMerge %140 None -OpBranchConditional %138 %139 %140 -%139 = OpLabel -%141 = OpExtInst %v4int %1 SClamp %44 %142 %144 -%145 = OpIEqual %v4bool %141 %53 -%146 = OpAll %bool %145 -OpBranch %140 -%140 = OpLabel -%147 = OpPhi %bool %false %130 %146 %139 -OpSelectionMerge %149 None -OpBranchConditional %147 %148 %149 -%148 = OpLabel -OpBranch %149 -%149 = OpLabel -%150 = OpPhi %bool %false %140 %true %148 -OpSelectionMerge %152 None -OpBranchConditional %150 %151 %152 -%151 = OpLabel -%153 = OpVectorShuffle %v2int %53 %53 0 1 -%154 = OpIEqual %v2bool %97 %153 -%155 = OpAll %bool %154 -OpBranch %152 -%152 = OpLabel -%156 = OpPhi %bool %false %149 %155 %151 -OpSelectionMerge %158 None -OpBranchConditional %156 %157 %158 -%157 = OpLabel -%160 = OpVectorShuffle %v3int %53 %53 0 1 2 -%161 = OpIEqual %v3bool %159 %160 -%162 = OpAll %bool %161 -OpBranch %158 -%158 = OpLabel -%163 = OpPhi %bool %false %152 %162 %157 -OpSelectionMerge %165 None -OpBranchConditional %163 %164 %165 -%164 = OpLabel -OpBranch %165 -%165 = OpLabel -%166 = OpPhi %bool %false %158 %true %164 -OpSelectionMerge %171 None -OpBranchConditional %166 %169 %170 -%169 = OpLabel -%172 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%174 = OpLoad %v4float %172 -OpStore %167 %174 -OpBranch %171 -%170 = OpLabel -%175 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%177 = OpLoad %v4float %175 -OpStore %167 %177 -OpBranch %171 -%171 = OpLabel -%178 = OpLoad %v4float %167 -OpReturnValue %178 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %intValues = OpVariable %_ptr_Function_v4int Function + %expectedA = OpVariable %_ptr_Function_v4int Function + %expectedB = OpVariable %_ptr_Function_v4int Function + %167 = OpVariable %_ptr_Function_v4float Function + %30 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %33 = OpLoad %v4float %30 + %35 = OpVectorTimesScalar %v4float %33 %float_100 + %36 = OpCompositeExtract %float %35 0 + %37 = OpConvertFToS %int %36 + %38 = OpCompositeExtract %float %35 1 + %39 = OpConvertFToS %int %38 + %40 = OpCompositeExtract %float %35 2 + %41 = OpConvertFToS %int %40 + %42 = OpCompositeExtract %float %35 3 + %43 = OpConvertFToS %int %42 + %44 = OpCompositeConstruct %v4int %37 %39 %41 %43 + OpStore %intValues %44 + OpStore %expectedA %49 + OpStore %expectedB %53 + %56 = OpCompositeExtract %int %44 0 + %55 = OpExtInst %int %1 SClamp %56 %int_n100 %int_100 + %57 = OpIEqual %bool %55 %int_n100 + OpSelectionMerge %59 None + OpBranchConditional %57 %58 %59 + %58 = OpLabel + %61 = OpVectorShuffle %v2int %44 %44 0 1 + %60 = OpExtInst %v2int %1 SClamp %61 %63 %64 + %65 = OpVectorShuffle %v2int %49 %49 0 1 + %66 = OpIEqual %v2bool %60 %65 + %68 = OpAll %bool %66 + OpBranch %59 + %59 = OpLabel + %69 = OpPhi %bool %false %25 %68 %58 + OpSelectionMerge %71 None + OpBranchConditional %69 %70 %71 + %70 = OpLabel + %73 = OpVectorShuffle %v3int %44 %44 0 1 2 + %72 = OpExtInst %v3int %1 SClamp %73 %75 %76 + %77 = OpVectorShuffle %v3int %49 %49 0 1 2 + %78 = OpIEqual %v3bool %72 %77 + %80 = OpAll %bool %78 + OpBranch %71 + %71 = OpLabel + %81 = OpPhi %bool %false %59 %80 %70 + OpSelectionMerge %83 None + OpBranchConditional %81 %82 %83 + %82 = OpLabel + %84 = OpExtInst %v4int %1 SClamp %44 %85 %86 + %87 = OpIEqual %v4bool %84 %49 + %89 = OpAll %bool %87 + OpBranch %83 + %83 = OpLabel + %90 = OpPhi %bool %false %71 %89 %82 + OpSelectionMerge %92 None + OpBranchConditional %90 %91 %92 + %91 = OpLabel + OpBranch %92 + %92 = OpLabel + %94 = OpPhi %bool %false %83 %true %91 + OpSelectionMerge %96 None + OpBranchConditional %94 %95 %96 + %95 = OpLabel + %98 = OpVectorShuffle %v2int %49 %49 0 1 + %99 = OpIEqual %v2bool %97 %98 + %100 = OpAll %bool %99 + OpBranch %96 + %96 = OpLabel + %101 = OpPhi %bool %false %92 %100 %95 + OpSelectionMerge %103 None + OpBranchConditional %101 %102 %103 + %102 = OpLabel + %105 = OpVectorShuffle %v3int %49 %49 0 1 2 + %106 = OpIEqual %v3bool %104 %105 + %107 = OpAll %bool %106 + OpBranch %103 + %103 = OpLabel + %108 = OpPhi %bool %false %96 %107 %102 + OpSelectionMerge %110 None + OpBranchConditional %108 %109 %110 + %109 = OpLabel + OpBranch %110 + %110 = OpLabel + %111 = OpPhi %bool %false %103 %true %109 + OpSelectionMerge %113 None + OpBranchConditional %111 %112 %113 + %112 = OpLabel + %114 = OpExtInst %int %1 SClamp %56 %int_n100 %int_100 + %115 = OpIEqual %bool %114 %int_n100 + OpBranch %113 + %113 = OpLabel + %116 = OpPhi %bool %false %110 %115 %112 + OpSelectionMerge %118 None + OpBranchConditional %116 %117 %118 + %117 = OpLabel + %120 = OpVectorShuffle %v2int %44 %44 0 1 + %119 = OpExtInst %v2int %1 SClamp %120 %122 %124 + %125 = OpVectorShuffle %v2int %53 %53 0 1 + %126 = OpIEqual %v2bool %119 %125 + %127 = OpAll %bool %126 + OpBranch %118 + %118 = OpLabel + %128 = OpPhi %bool %false %113 %127 %117 + OpSelectionMerge %130 None + OpBranchConditional %128 %129 %130 + %129 = OpLabel + %132 = OpVectorShuffle %v3int %44 %44 0 1 2 + %131 = OpExtInst %v3int %1 SClamp %132 %133 %134 + %135 = OpVectorShuffle %v3int %53 %53 0 1 2 + %136 = OpIEqual %v3bool %131 %135 + %137 = OpAll %bool %136 + OpBranch %130 + %130 = OpLabel + %138 = OpPhi %bool %false %118 %137 %129 + OpSelectionMerge %140 None + OpBranchConditional %138 %139 %140 + %139 = OpLabel + %141 = OpExtInst %v4int %1 SClamp %44 %142 %144 + %145 = OpIEqual %v4bool %141 %53 + %146 = OpAll %bool %145 + OpBranch %140 + %140 = OpLabel + %147 = OpPhi %bool %false %130 %146 %139 + OpSelectionMerge %149 None + OpBranchConditional %147 %148 %149 + %148 = OpLabel + OpBranch %149 + %149 = OpLabel + %150 = OpPhi %bool %false %140 %true %148 + OpSelectionMerge %152 None + OpBranchConditional %150 %151 %152 + %151 = OpLabel + %153 = OpVectorShuffle %v2int %53 %53 0 1 + %154 = OpIEqual %v2bool %97 %153 + %155 = OpAll %bool %154 + OpBranch %152 + %152 = OpLabel + %156 = OpPhi %bool %false %149 %155 %151 + OpSelectionMerge %158 None + OpBranchConditional %156 %157 %158 + %157 = OpLabel + %160 = OpVectorShuffle %v3int %53 %53 0 1 2 + %161 = OpIEqual %v3bool %159 %160 + %162 = OpAll %bool %161 + OpBranch %158 + %158 = OpLabel + %163 = OpPhi %bool %false %152 %162 %157 + OpSelectionMerge %165 None + OpBranchConditional %163 %164 %165 + %164 = OpLabel + OpBranch %165 + %165 = OpLabel + %166 = OpPhi %bool %false %158 %true %164 + OpSelectionMerge %171 None + OpBranchConditional %166 %169 %170 + %169 = OpLabel + %172 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %174 = OpLoad %v4float %172 + OpStore %167 %174 + OpBranch %171 + %170 = OpLabel + %175 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %177 = OpLoad %v4float %175 + OpStore %167 %177 + OpBranch %171 + %171 = OpLabel + %178 = OpLoad %v4float %167 + OpReturnValue %178 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/ClampInt.skrp b/tests/sksl/intrinsics/ClampInt.skrp index 5f5eaca820ce..7fce499dd44b 100644 --- a/tests/sksl/intrinsics/ClampInt.skrp +++ b/tests/sksl/intrinsics/ClampInt.skrp @@ -1,20 +1,22 @@ +123 instructions + [immutable slots] -expectedA(0) = 0xFFFFFF9C -expectedA(1) = 0 -expectedA(2) = 0x0000004B (1.050974e-43) -expectedA(3) = 0x00000064 (1.401298e-43) -clampLow(0) = 0xFFFFFF9C -clampLow(1) = 0xFFFFFF38 -clampLow(2) = 0xFFFFFF38 -clampLow(3) = 0x00000064 (1.401298e-43) -expectedB(0) = 0xFFFFFF9C -expectedB(1) = 0 -expectedB(2) = 0x00000032 (7.006492e-44) -expectedB(3) = 0x000000E1 (3.152922e-43) -clampHigh(0) = 0x00000064 (1.401298e-43) -clampHigh(1) = 0x000000C8 (2.802597e-43) -clampHigh(2) = 0x00000032 (7.006492e-44) -clampHigh(3) = 0x0000012C (4.203895e-43) +i0 = 0xFFFFFF9C +i1 = 0 +i2 = 0x0000004B (1.050974e-43) +i3 = 0x00000064 (1.401298e-43) +i4 = 0xFFFFFF9C +i5 = 0xFFFFFF38 +i6 = 0xFFFFFF38 +i7 = 0x00000064 (1.401298e-43) +i8 = 0xFFFFFF9C +i9 = 0 +i10 = 0x00000032 (7.006492e-44) +i11 = 0x000000E1 (3.152922e-43) +i12 = 0x00000064 (1.401298e-43) +i13 = 0x000000C8 (2.802597e-43) +i14 = 0x00000032 (7.006492e-44) +i15 = 0x0000012C (4.203895e-43) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -28,14 +30,13 @@ copy_constant $1 = 0xFFFFFF9C max_int $0 = max($0, $1) copy_constant $1 = 0x00000064 (1.401298e-43) min_int $0 = min($0, $1) -copy_slot_unmasked $1 = expectedA(0) -cmpeq_int $0 = equal($0, $1) +cmpeq_imm_int $0 = equal($0, 0xFFFFFF9C) copy_2_slots_unmasked $1..2 = intValues(0..1) splat_2_constants $3..4 = 0xFFFFFF9C max_2_ints $1..2 = max($1..2, $3..4) splat_2_constants $3..4 = 0x00000064 (1.401298e-43) min_2_ints $1..2 = min($1..2, $3..4) -copy_2_slots_unmasked $3..4 = expectedA(0..1) +copy_2_immutables_unmasked $3..4 = i0..1 [0xFFFFFF9C, 0] cmpeq_2_ints $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 @@ -44,7 +45,7 @@ splat_3_constants $4..6 = 0xFFFFFF9C max_3_ints $1..3 = max($1..3, $4..6) splat_3_constants $4..6 = 0x00000064 (1.401298e-43) min_3_ints $1..3 = min($1..3, $4..6) -copy_3_slots_unmasked $4..6 = expectedA(0..2) +copy_3_immutables_unmasked $4..6 = i0..2 [0xFFFFFF9C, 0, 0x0000004B (1.050974e-43)] cmpeq_3_ints $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 @@ -54,33 +55,27 @@ splat_4_constants $5..8 = 0xFFFFFF9C max_4_ints $1..4 = max($1..4, $5..8) splat_4_constants $5..8 = 0x00000064 (1.401298e-43) min_4_ints $1..4 = min($1..4, $5..8) -copy_4_slots_unmasked $5..8 = expectedA +copy_4_immutables_unmasked $5..8 = i0..3 [0xFFFFFF9C, 0, 0x0000004B (1.050974e-43), 0x00000064 (1.401298e-43)] cmpeq_4_ints $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expectedA(0) +copy_constant $1 = 0xFFFFFF9C cmpeq_imm_int $1 = equal($1, 0xFFFFFF9C) bitwise_and_int $0 &= $1 -copy_constant $1 = 0xFFFFFF9C -copy_constant $2 = 0 -copy_2_slots_unmasked $3..4 = expectedA(0..1) +copy_2_immutables_unmasked $1..2 = i8..9 [0xFFFFFF9C, 0] +copy_2_immutables_unmasked $3..4 = i0..1 [0xFFFFFF9C, 0] cmpeq_2_ints $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0xFFFFFF9C -copy_constant $2 = 0 -copy_constant $3 = 0x0000004B (1.050974e-43) -copy_3_slots_unmasked $4..6 = expectedA(0..2) +copy_3_immutables_unmasked $1..3 = i0..2 [0xFFFFFF9C, 0, 0x0000004B (1.050974e-43)] +copy_3_immutables_unmasked $4..6 = i0..2 [0xFFFFFF9C, 0, 0x0000004B (1.050974e-43)] cmpeq_3_ints $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0xFFFFFF9C -copy_constant $2 = 0 -copy_constant $3 = 0x0000004B (1.050974e-43) -copy_constant $4 = 0x00000064 (1.401298e-43) -copy_4_slots_unmasked $5..8 = expectedA +copy_4_immutables_unmasked $1..4 = i0..3 [0xFFFFFF9C, 0, 0x0000004B (1.050974e-43), 0x00000064 (1.401298e-43)] +copy_4_immutables_unmasked $5..8 = i0..3 [0xFFFFFF9C, 0, 0x0000004B (1.050974e-43), 0x00000064 (1.401298e-43)] cmpeq_4_ints $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -90,65 +85,53 @@ copy_constant $2 = 0xFFFFFF9C max_int $1 = max($1, $2) copy_constant $2 = 0x00000064 (1.401298e-43) min_int $1 = min($1, $2) -copy_slot_unmasked $2 = expectedB(0) -cmpeq_int $1 = equal($1, $2) +cmpeq_imm_int $1 = equal($1, 0xFFFFFF9C) bitwise_and_int $0 &= $1 copy_2_slots_unmasked $1..2 = intValues(0..1) -copy_constant $3 = 0xFFFFFF9C -copy_constant $4 = 0xFFFFFF38 +copy_2_immutables_unmasked $3..4 = i4..5 [0xFFFFFF9C, 0xFFFFFF38] max_2_ints $1..2 = max($1..2, $3..4) -copy_constant $3 = 0x00000064 (1.401298e-43) -copy_constant $4 = 0x000000C8 (2.802597e-43) +copy_2_immutables_unmasked $3..4 = i12..13 [0x00000064 (1.401298e-43), 0x000000C8 (2.802597e-43)] min_2_ints $1..2 = min($1..2, $3..4) -copy_2_slots_unmasked $3..4 = expectedB(0..1) +copy_2_immutables_unmasked $3..4 = i8..9 [0xFFFFFF9C, 0] cmpeq_2_ints $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_3_slots_unmasked $1..3 = intValues(0..2) -copy_constant $4 = 0xFFFFFF9C -splat_2_constants $5..6 = 0xFFFFFF38 +copy_3_immutables_unmasked $4..6 = i4..6 [0xFFFFFF9C, 0xFFFFFF38, 0xFFFFFF38] max_3_ints $1..3 = max($1..3, $4..6) -copy_constant $4 = 0x00000064 (1.401298e-43) -copy_constant $5 = 0x000000C8 (2.802597e-43) -copy_constant $6 = 0x00000032 (7.006492e-44) +copy_3_immutables_unmasked $4..6 = i12..14 [0x00000064 (1.401298e-43), 0x000000C8 (2.802597e-43), 0x00000032 (7.006492e-44)] min_3_ints $1..3 = min($1..3, $4..6) -copy_3_slots_unmasked $4..6 = expectedB(0..2) +copy_3_immutables_unmasked $4..6 = i8..10 [0xFFFFFF9C, 0, 0x00000032 (7.006492e-44)] cmpeq_3_ints $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_4_slots_unmasked $1..4 = intValues -copy_4_slots_unmasked $5..8 = clampLow +copy_4_immutables_unmasked $5..8 = i4..7 [0xFFFFFF9C, 0xFFFFFF38, 0xFFFFFF38, 0x00000064 (1.401298e-43)] max_4_ints $1..4 = max($1..4, $5..8) -copy_4_slots_unmasked $5..8 = clampHigh +copy_4_immutables_unmasked $5..8 = i12..15 [0x00000064 (1.401298e-43), 0x000000C8 (2.802597e-43), 0x00000032 (7.006492e-44), 0x0000012C (4.203895e-43)] min_4_ints $1..4 = min($1..4, $5..8) -copy_4_slots_unmasked $5..8 = expectedB +copy_4_immutables_unmasked $5..8 = i8..11 [0xFFFFFF9C, 0, 0x00000032 (7.006492e-44), 0x000000E1 (3.152922e-43)] cmpeq_4_ints $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expectedB(0) +copy_constant $1 = 0xFFFFFF9C cmpeq_imm_int $1 = equal($1, 0xFFFFFF9C) bitwise_and_int $0 &= $1 -copy_constant $1 = 0xFFFFFF9C -copy_constant $2 = 0 -copy_2_slots_unmasked $3..4 = expectedB(0..1) +copy_2_immutables_unmasked $1..2 = i8..9 [0xFFFFFF9C, 0] +copy_2_immutables_unmasked $3..4 = i8..9 [0xFFFFFF9C, 0] cmpeq_2_ints $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0xFFFFFF9C -copy_constant $2 = 0 -copy_constant $3 = 0x00000032 (7.006492e-44) -copy_3_slots_unmasked $4..6 = expectedB(0..2) +copy_3_immutables_unmasked $1..3 = i8..10 [0xFFFFFF9C, 0, 0x00000032 (7.006492e-44)] +copy_3_immutables_unmasked $4..6 = i8..10 [0xFFFFFF9C, 0, 0x00000032 (7.006492e-44)] cmpeq_3_ints $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0xFFFFFF9C -copy_constant $2 = 0 -copy_constant $3 = 0x00000032 (7.006492e-44) -copy_constant $4 = 0x000000E1 (3.152922e-43) -copy_4_slots_unmasked $5..8 = expectedB +copy_4_immutables_unmasked $1..4 = i8..11 [0xFFFFFF9C, 0, 0x00000032 (7.006492e-44), 0x000000E1 (3.152922e-43)] +copy_4_immutables_unmasked $5..8 = i8..11 [0xFFFFFF9C, 0, 0x00000032 (7.006492e-44), 0x000000E1 (3.152922e-43)] cmpeq_4_ints $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 diff --git a/tests/sksl/intrinsics/ClampInt.wgsl b/tests/sksl/intrinsics/ClampInt.wgsl index 69c1441eaf1a..761e282b6656 100644 --- a/tests/sksl/intrinsics/ClampInt.wgsl +++ b/tests/sksl/intrinsics/ClampInt.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -27,7 +28,7 @@ fn main(_skParam0: vec2) -> vec4 { let _skTemp5 = clamp(intValues.xy, vec2(-100, -200), vec2(100, 200)); let _skTemp6 = clamp(intValues.xyz, vec3(-100, -200, -200), vec3(100, 200, 50)); let _skTemp7 = clamp(intValues, clampLow, clampHigh); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((((((((((_skTemp0 == expectedA.x && all(_skTemp1 == expectedA.xy)) && all(_skTemp2 == expectedA.xyz)) && all(_skTemp3 == expectedA)) && -100 == expectedA.x) && all(vec2(-100, 0) == expectedA.xy)) && all(vec3(-100, 0, 75) == expectedA.xyz)) && all(vec4(-100, 0, 75, 100) == expectedA)) && _skTemp4 == expectedB.x) && all(_skTemp5 == expectedB.xy)) && all(_skTemp6 == expectedB.xyz)) && all(_skTemp7 == expectedB)) && -100 == expectedB.x) && all(vec2(-100, 0) == expectedB.xy)) && all(vec3(-100, 0, 50) == expectedB.xyz)) && all(vec4(-100, 0, 50, 225) == expectedB))); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((((((((((_skTemp0 == expectedA.x) && all(_skTemp1 == expectedA.xy)) && all(_skTemp2 == expectedA.xyz)) && all(_skTemp3 == expectedA)) && (-100 == expectedA.x)) && all(vec2(-100, 0) == expectedA.xy)) && all(vec3(-100, 0, 75) == expectedA.xyz)) && all(vec4(-100, 0, 75, 100) == expectedA)) && (_skTemp4 == expectedB.x)) && all(_skTemp5 == expectedB.xy)) && all(_skTemp6 == expectedB.xyz)) && all(_skTemp7 == expectedB)) && (-100 == expectedB.x)) && all(vec2(-100, 0) == expectedB.xy)) && all(vec3(-100, 0, 50) == expectedB.xyz)) && all(vec4(-100, 0, 50, 225) == expectedB))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/intrinsics/ClampUInt.asm.frag b/tests/sksl/intrinsics/ClampUInt.asm.frag index f7d61f273456..396278db4b6a 100644 --- a/tests/sksl/intrinsics/ClampUInt.asm.frag +++ b/tests/sksl/intrinsics/ClampUInt.asm.frag @@ -1,281 +1,281 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testInputs" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %uintValues "uintValues" -OpName %expectedA "expectedA" -OpName %expectedB "expectedB" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %34 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %39 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %179 RelaxedPrecision -OpDecorate %182 RelaxedPrecision -OpDecorate %183 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testInputs" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %uintValues "uintValues" + OpName %expectedA "expectedA" + OpName %expectedB "expectedB" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %34 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %179 RelaxedPrecision + OpDecorate %182 RelaxedPrecision + OpDecorate %183 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%uint = OpTypeInt 32 0 -%v4uint = OpTypeVector %uint 4 + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %uint = OpTypeInt 32 0 + %v4uint = OpTypeVector %uint 4 %_ptr_Function_v4uint = OpTypePointer Function %v4uint %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%float_100 = OpConstant %float 100 -%float_200 = OpConstant %float 200 -%38 = OpConstantComposite %v4float %float_200 %float_200 %float_200 %float_200 -%uint_100 = OpConstant %uint 100 -%uint_200 = OpConstant %uint 200 -%uint_275 = OpConstant %uint 275 -%uint_300 = OpConstant %uint 300 -%54 = OpConstantComposite %v4uint %uint_100 %uint_200 %uint_275 %uint_300 -%uint_250 = OpConstant %uint 250 -%uint_425 = OpConstant %uint 425 -%58 = OpConstantComposite %v4uint %uint_100 %uint_200 %uint_250 %uint_425 -%false = OpConstantFalse %bool -%v2uint = OpTypeVector %uint 2 -%68 = OpConstantComposite %v2uint %uint_100 %uint_100 -%69 = OpConstantComposite %v2uint %uint_300 %uint_300 -%v2bool = OpTypeVector %bool 2 -%v3uint = OpTypeVector %uint 3 -%80 = OpConstantComposite %v3uint %uint_100 %uint_100 %uint_100 -%81 = OpConstantComposite %v3uint %uint_300 %uint_300 %uint_300 -%v3bool = OpTypeVector %bool 3 -%90 = OpConstantComposite %v4uint %uint_100 %uint_100 %uint_100 %uint_100 -%91 = OpConstantComposite %v4uint %uint_300 %uint_300 %uint_300 %uint_300 -%v4bool = OpTypeVector %bool 4 -%true = OpConstantTrue %bool -%102 = OpConstantComposite %v2uint %uint_100 %uint_200 -%109 = OpConstantComposite %v3uint %uint_100 %uint_200 %uint_275 -%uint_0 = OpConstant %uint 0 -%127 = OpConstantComposite %v2uint %uint_100 %uint_0 -%uint_400 = OpConstant %uint 400 -%129 = OpConstantComposite %v2uint %uint_300 %uint_400 -%138 = OpConstantComposite %v3uint %uint_100 %uint_0 %uint_0 -%139 = OpConstantComposite %v3uint %uint_300 %uint_400 %uint_250 -%147 = OpConstantComposite %v4uint %uint_100 %uint_0 %uint_0 %uint_300 -%uint_500 = OpConstant %uint 500 -%149 = OpConstantComposite %v4uint %uint_300 %uint_400 %uint_250 %uint_500 -%164 = OpConstantComposite %v3uint %uint_100 %uint_200 %uint_250 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %float_100 = OpConstant %float 100 + %float_200 = OpConstant %float 200 + %38 = OpConstantComposite %v4float %float_200 %float_200 %float_200 %float_200 + %uint_100 = OpConstant %uint 100 + %uint_200 = OpConstant %uint 200 + %uint_275 = OpConstant %uint 275 + %uint_300 = OpConstant %uint 300 + %54 = OpConstantComposite %v4uint %uint_100 %uint_200 %uint_275 %uint_300 + %uint_250 = OpConstant %uint 250 + %uint_425 = OpConstant %uint 425 + %58 = OpConstantComposite %v4uint %uint_100 %uint_200 %uint_250 %uint_425 + %false = OpConstantFalse %bool + %v2uint = OpTypeVector %uint 2 + %68 = OpConstantComposite %v2uint %uint_100 %uint_100 + %69 = OpConstantComposite %v2uint %uint_300 %uint_300 + %v2bool = OpTypeVector %bool 2 + %v3uint = OpTypeVector %uint 3 + %80 = OpConstantComposite %v3uint %uint_100 %uint_100 %uint_100 + %81 = OpConstantComposite %v3uint %uint_300 %uint_300 %uint_300 + %v3bool = OpTypeVector %bool 3 + %90 = OpConstantComposite %v4uint %uint_100 %uint_100 %uint_100 %uint_100 + %91 = OpConstantComposite %v4uint %uint_300 %uint_300 %uint_300 %uint_300 + %v4bool = OpTypeVector %bool 4 + %true = OpConstantTrue %bool + %102 = OpConstantComposite %v2uint %uint_100 %uint_200 + %109 = OpConstantComposite %v3uint %uint_100 %uint_200 %uint_275 + %uint_0 = OpConstant %uint 0 + %127 = OpConstantComposite %v2uint %uint_100 %uint_0 + %uint_400 = OpConstant %uint 400 + %129 = OpConstantComposite %v2uint %uint_300 %uint_400 + %138 = OpConstantComposite %v3uint %uint_100 %uint_0 %uint_0 + %139 = OpConstantComposite %v3uint %uint_300 %uint_400 %uint_250 + %147 = OpConstantComposite %v4uint %uint_100 %uint_0 %uint_0 %uint_300 + %uint_500 = OpConstant %uint 500 + %149 = OpConstantComposite %v4uint %uint_300 %uint_400 %uint_250 %uint_500 + %164 = OpConstantComposite %v3uint %uint_100 %uint_200 %uint_250 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%uintValues = OpVariable %_ptr_Function_v4uint Function -%expectedA = OpVariable %_ptr_Function_v4uint Function -%expectedB = OpVariable %_ptr_Function_v4uint Function -%172 = OpVariable %_ptr_Function_v4float Function -%30 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%34 = OpLoad %v4float %30 -%36 = OpVectorTimesScalar %v4float %34 %float_100 -%39 = OpFAdd %v4float %36 %38 -%40 = OpCompositeExtract %float %39 0 -%41 = OpConvertFToU %uint %40 -%42 = OpCompositeExtract %float %39 1 -%43 = OpConvertFToU %uint %42 -%44 = OpCompositeExtract %float %39 2 -%45 = OpConvertFToU %uint %44 -%46 = OpCompositeExtract %float %39 3 -%47 = OpConvertFToU %uint %46 -%48 = OpCompositeConstruct %v4uint %41 %43 %45 %47 -OpStore %uintValues %48 -OpStore %expectedA %54 -OpStore %expectedB %58 -%61 = OpCompositeExtract %uint %48 0 -%60 = OpExtInst %uint %1 UClamp %61 %uint_100 %uint_300 -%62 = OpIEqual %bool %60 %uint_100 -OpSelectionMerge %64 None -OpBranchConditional %62 %63 %64 -%63 = OpLabel -%66 = OpVectorShuffle %v2uint %48 %48 0 1 -%65 = OpExtInst %v2uint %1 UClamp %66 %68 %69 -%70 = OpVectorShuffle %v2uint %54 %54 0 1 -%71 = OpIEqual %v2bool %65 %70 -%73 = OpAll %bool %71 -OpBranch %64 -%64 = OpLabel -%74 = OpPhi %bool %false %25 %73 %63 -OpSelectionMerge %76 None -OpBranchConditional %74 %75 %76 -%75 = OpLabel -%78 = OpVectorShuffle %v3uint %48 %48 0 1 2 -%77 = OpExtInst %v3uint %1 UClamp %78 %80 %81 -%82 = OpVectorShuffle %v3uint %54 %54 0 1 2 -%83 = OpIEqual %v3bool %77 %82 -%85 = OpAll %bool %83 -OpBranch %76 -%76 = OpLabel -%86 = OpPhi %bool %false %64 %85 %75 -OpSelectionMerge %88 None -OpBranchConditional %86 %87 %88 -%87 = OpLabel -%89 = OpExtInst %v4uint %1 UClamp %48 %90 %91 -%92 = OpIEqual %v4bool %89 %54 -%94 = OpAll %bool %92 -OpBranch %88 -%88 = OpLabel -%95 = OpPhi %bool %false %76 %94 %87 -OpSelectionMerge %97 None -OpBranchConditional %95 %96 %97 -%96 = OpLabel -OpBranch %97 -%97 = OpLabel -%99 = OpPhi %bool %false %88 %true %96 -OpSelectionMerge %101 None -OpBranchConditional %99 %100 %101 -%100 = OpLabel -%103 = OpVectorShuffle %v2uint %54 %54 0 1 -%104 = OpIEqual %v2bool %102 %103 -%105 = OpAll %bool %104 -OpBranch %101 -%101 = OpLabel -%106 = OpPhi %bool %false %97 %105 %100 -OpSelectionMerge %108 None -OpBranchConditional %106 %107 %108 -%107 = OpLabel -%110 = OpVectorShuffle %v3uint %54 %54 0 1 2 -%111 = OpIEqual %v3bool %109 %110 -%112 = OpAll %bool %111 -OpBranch %108 -%108 = OpLabel -%113 = OpPhi %bool %false %101 %112 %107 -OpSelectionMerge %115 None -OpBranchConditional %113 %114 %115 -%114 = OpLabel -OpBranch %115 -%115 = OpLabel -%116 = OpPhi %bool %false %108 %true %114 -OpSelectionMerge %118 None -OpBranchConditional %116 %117 %118 -%117 = OpLabel -%119 = OpExtInst %uint %1 UClamp %61 %uint_100 %uint_300 -%120 = OpIEqual %bool %119 %uint_100 -OpBranch %118 -%118 = OpLabel -%121 = OpPhi %bool %false %115 %120 %117 -OpSelectionMerge %123 None -OpBranchConditional %121 %122 %123 -%122 = OpLabel -%125 = OpVectorShuffle %v2uint %48 %48 0 1 -%124 = OpExtInst %v2uint %1 UClamp %125 %127 %129 -%130 = OpVectorShuffle %v2uint %58 %58 0 1 -%131 = OpIEqual %v2bool %124 %130 -%132 = OpAll %bool %131 -OpBranch %123 -%123 = OpLabel -%133 = OpPhi %bool %false %118 %132 %122 -OpSelectionMerge %135 None -OpBranchConditional %133 %134 %135 -%134 = OpLabel -%137 = OpVectorShuffle %v3uint %48 %48 0 1 2 -%136 = OpExtInst %v3uint %1 UClamp %137 %138 %139 -%140 = OpVectorShuffle %v3uint %58 %58 0 1 2 -%141 = OpIEqual %v3bool %136 %140 -%142 = OpAll %bool %141 -OpBranch %135 -%135 = OpLabel -%143 = OpPhi %bool %false %123 %142 %134 -OpSelectionMerge %145 None -OpBranchConditional %143 %144 %145 -%144 = OpLabel -%146 = OpExtInst %v4uint %1 UClamp %48 %147 %149 -%150 = OpIEqual %v4bool %146 %58 -%151 = OpAll %bool %150 -OpBranch %145 -%145 = OpLabel -%152 = OpPhi %bool %false %135 %151 %144 -OpSelectionMerge %154 None -OpBranchConditional %152 %153 %154 -%153 = OpLabel -OpBranch %154 -%154 = OpLabel -%155 = OpPhi %bool %false %145 %true %153 -OpSelectionMerge %157 None -OpBranchConditional %155 %156 %157 -%156 = OpLabel -%158 = OpVectorShuffle %v2uint %58 %58 0 1 -%159 = OpIEqual %v2bool %102 %158 -%160 = OpAll %bool %159 -OpBranch %157 -%157 = OpLabel -%161 = OpPhi %bool %false %154 %160 %156 -OpSelectionMerge %163 None -OpBranchConditional %161 %162 %163 -%162 = OpLabel -%165 = OpVectorShuffle %v3uint %58 %58 0 1 2 -%166 = OpIEqual %v3bool %164 %165 -%167 = OpAll %bool %166 -OpBranch %163 -%163 = OpLabel -%168 = OpPhi %bool %false %157 %167 %162 -OpSelectionMerge %170 None -OpBranchConditional %168 %169 %170 -%169 = OpLabel -OpBranch %170 -%170 = OpLabel -%171 = OpPhi %bool %false %163 %true %169 -OpSelectionMerge %176 None -OpBranchConditional %171 %174 %175 -%174 = OpLabel -%177 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%179 = OpLoad %v4float %177 -OpStore %172 %179 -OpBranch %176 -%175 = OpLabel -%180 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%182 = OpLoad %v4float %180 -OpStore %172 %182 -OpBranch %176 -%176 = OpLabel -%183 = OpLoad %v4float %172 -OpReturnValue %183 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %uintValues = OpVariable %_ptr_Function_v4uint Function + %expectedA = OpVariable %_ptr_Function_v4uint Function + %expectedB = OpVariable %_ptr_Function_v4uint Function + %172 = OpVariable %_ptr_Function_v4float Function + %30 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %34 = OpLoad %v4float %30 + %36 = OpVectorTimesScalar %v4float %34 %float_100 + %39 = OpFAdd %v4float %36 %38 + %40 = OpCompositeExtract %float %39 0 + %41 = OpConvertFToU %uint %40 + %42 = OpCompositeExtract %float %39 1 + %43 = OpConvertFToU %uint %42 + %44 = OpCompositeExtract %float %39 2 + %45 = OpConvertFToU %uint %44 + %46 = OpCompositeExtract %float %39 3 + %47 = OpConvertFToU %uint %46 + %48 = OpCompositeConstruct %v4uint %41 %43 %45 %47 + OpStore %uintValues %48 + OpStore %expectedA %54 + OpStore %expectedB %58 + %61 = OpCompositeExtract %uint %48 0 + %60 = OpExtInst %uint %1 UClamp %61 %uint_100 %uint_300 + %62 = OpIEqual %bool %60 %uint_100 + OpSelectionMerge %64 None + OpBranchConditional %62 %63 %64 + %63 = OpLabel + %66 = OpVectorShuffle %v2uint %48 %48 0 1 + %65 = OpExtInst %v2uint %1 UClamp %66 %68 %69 + %70 = OpVectorShuffle %v2uint %54 %54 0 1 + %71 = OpIEqual %v2bool %65 %70 + %73 = OpAll %bool %71 + OpBranch %64 + %64 = OpLabel + %74 = OpPhi %bool %false %25 %73 %63 + OpSelectionMerge %76 None + OpBranchConditional %74 %75 %76 + %75 = OpLabel + %78 = OpVectorShuffle %v3uint %48 %48 0 1 2 + %77 = OpExtInst %v3uint %1 UClamp %78 %80 %81 + %82 = OpVectorShuffle %v3uint %54 %54 0 1 2 + %83 = OpIEqual %v3bool %77 %82 + %85 = OpAll %bool %83 + OpBranch %76 + %76 = OpLabel + %86 = OpPhi %bool %false %64 %85 %75 + OpSelectionMerge %88 None + OpBranchConditional %86 %87 %88 + %87 = OpLabel + %89 = OpExtInst %v4uint %1 UClamp %48 %90 %91 + %92 = OpIEqual %v4bool %89 %54 + %94 = OpAll %bool %92 + OpBranch %88 + %88 = OpLabel + %95 = OpPhi %bool %false %76 %94 %87 + OpSelectionMerge %97 None + OpBranchConditional %95 %96 %97 + %96 = OpLabel + OpBranch %97 + %97 = OpLabel + %99 = OpPhi %bool %false %88 %true %96 + OpSelectionMerge %101 None + OpBranchConditional %99 %100 %101 + %100 = OpLabel + %103 = OpVectorShuffle %v2uint %54 %54 0 1 + %104 = OpIEqual %v2bool %102 %103 + %105 = OpAll %bool %104 + OpBranch %101 + %101 = OpLabel + %106 = OpPhi %bool %false %97 %105 %100 + OpSelectionMerge %108 None + OpBranchConditional %106 %107 %108 + %107 = OpLabel + %110 = OpVectorShuffle %v3uint %54 %54 0 1 2 + %111 = OpIEqual %v3bool %109 %110 + %112 = OpAll %bool %111 + OpBranch %108 + %108 = OpLabel + %113 = OpPhi %bool %false %101 %112 %107 + OpSelectionMerge %115 None + OpBranchConditional %113 %114 %115 + %114 = OpLabel + OpBranch %115 + %115 = OpLabel + %116 = OpPhi %bool %false %108 %true %114 + OpSelectionMerge %118 None + OpBranchConditional %116 %117 %118 + %117 = OpLabel + %119 = OpExtInst %uint %1 UClamp %61 %uint_100 %uint_300 + %120 = OpIEqual %bool %119 %uint_100 + OpBranch %118 + %118 = OpLabel + %121 = OpPhi %bool %false %115 %120 %117 + OpSelectionMerge %123 None + OpBranchConditional %121 %122 %123 + %122 = OpLabel + %125 = OpVectorShuffle %v2uint %48 %48 0 1 + %124 = OpExtInst %v2uint %1 UClamp %125 %127 %129 + %130 = OpVectorShuffle %v2uint %58 %58 0 1 + %131 = OpIEqual %v2bool %124 %130 + %132 = OpAll %bool %131 + OpBranch %123 + %123 = OpLabel + %133 = OpPhi %bool %false %118 %132 %122 + OpSelectionMerge %135 None + OpBranchConditional %133 %134 %135 + %134 = OpLabel + %137 = OpVectorShuffle %v3uint %48 %48 0 1 2 + %136 = OpExtInst %v3uint %1 UClamp %137 %138 %139 + %140 = OpVectorShuffle %v3uint %58 %58 0 1 2 + %141 = OpIEqual %v3bool %136 %140 + %142 = OpAll %bool %141 + OpBranch %135 + %135 = OpLabel + %143 = OpPhi %bool %false %123 %142 %134 + OpSelectionMerge %145 None + OpBranchConditional %143 %144 %145 + %144 = OpLabel + %146 = OpExtInst %v4uint %1 UClamp %48 %147 %149 + %150 = OpIEqual %v4bool %146 %58 + %151 = OpAll %bool %150 + OpBranch %145 + %145 = OpLabel + %152 = OpPhi %bool %false %135 %151 %144 + OpSelectionMerge %154 None + OpBranchConditional %152 %153 %154 + %153 = OpLabel + OpBranch %154 + %154 = OpLabel + %155 = OpPhi %bool %false %145 %true %153 + OpSelectionMerge %157 None + OpBranchConditional %155 %156 %157 + %156 = OpLabel + %158 = OpVectorShuffle %v2uint %58 %58 0 1 + %159 = OpIEqual %v2bool %102 %158 + %160 = OpAll %bool %159 + OpBranch %157 + %157 = OpLabel + %161 = OpPhi %bool %false %154 %160 %156 + OpSelectionMerge %163 None + OpBranchConditional %161 %162 %163 + %162 = OpLabel + %165 = OpVectorShuffle %v3uint %58 %58 0 1 2 + %166 = OpIEqual %v3bool %164 %165 + %167 = OpAll %bool %166 + OpBranch %163 + %163 = OpLabel + %168 = OpPhi %bool %false %157 %167 %162 + OpSelectionMerge %170 None + OpBranchConditional %168 %169 %170 + %169 = OpLabel + OpBranch %170 + %170 = OpLabel + %171 = OpPhi %bool %false %163 %true %169 + OpSelectionMerge %176 None + OpBranchConditional %171 %174 %175 + %174 = OpLabel + %177 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %179 = OpLoad %v4float %177 + OpStore %172 %179 + OpBranch %176 + %175 = OpLabel + %180 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %182 = OpLoad %v4float %180 + OpStore %172 %182 + OpBranch %176 + %176 = OpLabel + %183 = OpLoad %v4float %172 + OpReturnValue %183 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/ClampUInt.skrp b/tests/sksl/intrinsics/ClampUInt.skrp index 767e8b34d0d8..1368e482c928 100644 --- a/tests/sksl/intrinsics/ClampUInt.skrp +++ b/tests/sksl/intrinsics/ClampUInt.skrp @@ -1,20 +1,22 @@ +125 instructions + [immutable slots] -expectedA(0) = 0x00000064 (1.401298e-43) -expectedA(1) = 0x000000C8 (2.802597e-43) -expectedA(2) = 0x00000113 (3.853571e-43) -expectedA(3) = 0x0000012C (4.203895e-43) -clampLow(0) = 0x00000064 (1.401298e-43) -clampLow(1) = 0 -clampLow(2) = 0 -clampLow(3) = 0x0000012C (4.203895e-43) -expectedB(0) = 0x00000064 (1.401298e-43) -expectedB(1) = 0x000000C8 (2.802597e-43) -expectedB(2) = 0x000000FA (3.503246e-43) -expectedB(3) = 0x000001A9 (5.955518e-43) -clampHigh(0) = 0x0000012C (4.203895e-43) -clampHigh(1) = 0x00000190 (5.605194e-43) -clampHigh(2) = 0x000000FA (3.503246e-43) -clampHigh(3) = 0x000001F4 (7.006492e-43) +i0 = 0x00000064 (1.401298e-43) +i1 = 0x000000C8 (2.802597e-43) +i2 = 0x00000113 (3.853571e-43) +i3 = 0x0000012C (4.203895e-43) +i4 = 0x00000064 (1.401298e-43) +i5 = 0 +i6 = 0 +i7 = 0x0000012C (4.203895e-43) +i8 = 0x00000064 (1.401298e-43) +i9 = 0x000000C8 (2.802597e-43) +i10 = 0x000000FA (3.503246e-43) +i11 = 0x000001A9 (5.955518e-43) +i12 = 0x0000012C (4.203895e-43) +i13 = 0x00000190 (5.605194e-43) +i14 = 0x000000FA (3.503246e-43) +i15 = 0x000001F4 (7.006492e-43) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -30,14 +32,13 @@ copy_constant $1 = 0x00000064 (1.401298e-43) max_uint $0 = max($0, $1) copy_constant $1 = 0x0000012C (4.203895e-43) min_uint $0 = min($0, $1) -copy_slot_unmasked $1 = expectedA(0) -cmpeq_int $0 = equal($0, $1) +cmpeq_imm_int $0 = equal($0, 0x00000064) copy_2_slots_unmasked $1..2 = uintValues(0..1) splat_2_constants $3..4 = 0x00000064 (1.401298e-43) max_2_uints $1..2 = max($1..2, $3..4) splat_2_constants $3..4 = 0x0000012C (4.203895e-43) min_2_uints $1..2 = min($1..2, $3..4) -copy_2_slots_unmasked $3..4 = expectedA(0..1) +copy_2_immutables_unmasked $3..4 = i0..1 [0x00000064 (1.401298e-43), 0x000000C8 (2.802597e-43)] cmpeq_2_ints $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 @@ -46,7 +47,7 @@ splat_3_constants $4..6 = 0x00000064 (1.401298e-43) max_3_uints $1..3 = max($1..3, $4..6) splat_3_constants $4..6 = 0x0000012C (4.203895e-43) min_3_uints $1..3 = min($1..3, $4..6) -copy_3_slots_unmasked $4..6 = expectedA(0..2) +copy_3_immutables_unmasked $4..6 = i0..2 [0x00000064 (1.401298e-43), 0x000000C8 (2.802597e-43), 0x00000113 (3.853571e-43)] cmpeq_3_ints $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 @@ -56,33 +57,27 @@ splat_4_constants $5..8 = 0x00000064 (1.401298e-43) max_4_uints $1..4 = max($1..4, $5..8) splat_4_constants $5..8 = 0x0000012C (4.203895e-43) min_4_uints $1..4 = min($1..4, $5..8) -copy_4_slots_unmasked $5..8 = expectedA +copy_4_immutables_unmasked $5..8 = i0..3 [0x00000064 (1.401298e-43), 0x000000C8 (2.802597e-43), 0x00000113 (3.853571e-43), 0x0000012C (4.203895e-43)] cmpeq_4_ints $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expectedA(0) +copy_constant $1 = 0x00000064 (1.401298e-43) cmpeq_imm_int $1 = equal($1, 0x00000064) bitwise_and_int $0 &= $1 -copy_constant $1 = 0x00000064 (1.401298e-43) -copy_constant $2 = 0x000000C8 (2.802597e-43) -copy_2_slots_unmasked $3..4 = expectedA(0..1) +copy_2_immutables_unmasked $1..2 = i8..9 [0x00000064 (1.401298e-43), 0x000000C8 (2.802597e-43)] +copy_2_immutables_unmasked $3..4 = i0..1 [0x00000064 (1.401298e-43), 0x000000C8 (2.802597e-43)] cmpeq_2_ints $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0x00000064 (1.401298e-43) -copy_constant $2 = 0x000000C8 (2.802597e-43) -copy_constant $3 = 0x00000113 (3.853571e-43) -copy_3_slots_unmasked $4..6 = expectedA(0..2) +copy_3_immutables_unmasked $1..3 = i0..2 [0x00000064 (1.401298e-43), 0x000000C8 (2.802597e-43), 0x00000113 (3.853571e-43)] +copy_3_immutables_unmasked $4..6 = i0..2 [0x00000064 (1.401298e-43), 0x000000C8 (2.802597e-43), 0x00000113 (3.853571e-43)] cmpeq_3_ints $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0x00000064 (1.401298e-43) -copy_constant $2 = 0x000000C8 (2.802597e-43) -copy_constant $3 = 0x00000113 (3.853571e-43) -copy_constant $4 = 0x0000012C (4.203895e-43) -copy_4_slots_unmasked $5..8 = expectedA +copy_4_immutables_unmasked $1..4 = i0..3 [0x00000064 (1.401298e-43), 0x000000C8 (2.802597e-43), 0x00000113 (3.853571e-43), 0x0000012C (4.203895e-43)] +copy_4_immutables_unmasked $5..8 = i0..3 [0x00000064 (1.401298e-43), 0x000000C8 (2.802597e-43), 0x00000113 (3.853571e-43), 0x0000012C (4.203895e-43)] cmpeq_4_ints $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -92,65 +87,53 @@ copy_constant $2 = 0x00000064 (1.401298e-43) max_uint $1 = max($1, $2) copy_constant $2 = 0x0000012C (4.203895e-43) min_uint $1 = min($1, $2) -copy_slot_unmasked $2 = expectedB(0) -cmpeq_int $1 = equal($1, $2) +cmpeq_imm_int $1 = equal($1, 0x00000064) bitwise_and_int $0 &= $1 copy_2_slots_unmasked $1..2 = uintValues(0..1) -copy_constant $3 = 0x00000064 (1.401298e-43) -copy_constant $4 = 0 +copy_2_immutables_unmasked $3..4 = i4..5 [0x00000064 (1.401298e-43), 0] max_2_uints $1..2 = max($1..2, $3..4) -copy_constant $3 = 0x0000012C (4.203895e-43) -copy_constant $4 = 0x00000190 (5.605194e-43) +copy_2_immutables_unmasked $3..4 = i12..13 [0x0000012C (4.203895e-43), 0x00000190 (5.605194e-43)] min_2_uints $1..2 = min($1..2, $3..4) -copy_2_slots_unmasked $3..4 = expectedB(0..1) +copy_2_immutables_unmasked $3..4 = i8..9 [0x00000064 (1.401298e-43), 0x000000C8 (2.802597e-43)] cmpeq_2_ints $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_3_slots_unmasked $1..3 = uintValues(0..2) -copy_constant $4 = 0x00000064 (1.401298e-43) -splat_2_constants $5..6 = 0 +copy_3_immutables_unmasked $4..6 = i4..6 [0x00000064 (1.401298e-43), 0, 0] max_3_uints $1..3 = max($1..3, $4..6) -copy_constant $4 = 0x0000012C (4.203895e-43) -copy_constant $5 = 0x00000190 (5.605194e-43) -copy_constant $6 = 0x000000FA (3.503246e-43) +copy_3_immutables_unmasked $4..6 = i12..14 [0x0000012C (4.203895e-43), 0x00000190 (5.605194e-43), 0x000000FA (3.503246e-43)] min_3_uints $1..3 = min($1..3, $4..6) -copy_3_slots_unmasked $4..6 = expectedB(0..2) +copy_3_immutables_unmasked $4..6 = i8..10 [0x00000064 (1.401298e-43), 0x000000C8 (2.802597e-43), 0x000000FA (3.503246e-43)] cmpeq_3_ints $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_4_slots_unmasked $1..4 = uintValues -copy_4_slots_unmasked $5..8 = clampLow +copy_4_immutables_unmasked $5..8 = i4..7 [0x00000064 (1.401298e-43), 0, 0, 0x0000012C (4.203895e-43)] max_4_uints $1..4 = max($1..4, $5..8) -copy_4_slots_unmasked $5..8 = clampHigh +copy_4_immutables_unmasked $5..8 = i12..15 [0x0000012C (4.203895e-43), 0x00000190 (5.605194e-43), 0x000000FA (3.503246e-43), 0x000001F4 (7.006492e-43)] min_4_uints $1..4 = min($1..4, $5..8) -copy_4_slots_unmasked $5..8 = expectedB +copy_4_immutables_unmasked $5..8 = i8..11 [0x00000064 (1.401298e-43), 0x000000C8 (2.802597e-43), 0x000000FA (3.503246e-43), 0x000001A9 (5.955518e-43)] cmpeq_4_ints $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expectedB(0) +copy_constant $1 = 0x00000064 (1.401298e-43) cmpeq_imm_int $1 = equal($1, 0x00000064) bitwise_and_int $0 &= $1 -copy_constant $1 = 0x00000064 (1.401298e-43) -copy_constant $2 = 0x000000C8 (2.802597e-43) -copy_2_slots_unmasked $3..4 = expectedB(0..1) +copy_2_immutables_unmasked $1..2 = i8..9 [0x00000064 (1.401298e-43), 0x000000C8 (2.802597e-43)] +copy_2_immutables_unmasked $3..4 = i8..9 [0x00000064 (1.401298e-43), 0x000000C8 (2.802597e-43)] cmpeq_2_ints $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0x00000064 (1.401298e-43) -copy_constant $2 = 0x000000C8 (2.802597e-43) -copy_constant $3 = 0x000000FA (3.503246e-43) -copy_3_slots_unmasked $4..6 = expectedB(0..2) +copy_3_immutables_unmasked $1..3 = i8..10 [0x00000064 (1.401298e-43), 0x000000C8 (2.802597e-43), 0x000000FA (3.503246e-43)] +copy_3_immutables_unmasked $4..6 = i8..10 [0x00000064 (1.401298e-43), 0x000000C8 (2.802597e-43), 0x000000FA (3.503246e-43)] cmpeq_3_ints $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0x00000064 (1.401298e-43) -copy_constant $2 = 0x000000C8 (2.802597e-43) -copy_constant $3 = 0x000000FA (3.503246e-43) -copy_constant $4 = 0x000001A9 (5.955518e-43) -copy_4_slots_unmasked $5..8 = expectedB +copy_4_immutables_unmasked $1..4 = i8..11 [0x00000064 (1.401298e-43), 0x000000C8 (2.802597e-43), 0x000000FA (3.503246e-43), 0x000001A9 (5.955518e-43)] +copy_4_immutables_unmasked $5..8 = i8..11 [0x00000064 (1.401298e-43), 0x000000C8 (2.802597e-43), 0x000000FA (3.503246e-43), 0x000001A9 (5.955518e-43)] cmpeq_4_ints $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 diff --git a/tests/sksl/intrinsics/ClampUInt.wgsl b/tests/sksl/intrinsics/ClampUInt.wgsl index eef5e47c9590..6def031245b6 100644 --- a/tests/sksl/intrinsics/ClampUInt.wgsl +++ b/tests/sksl/intrinsics/ClampUInt.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -27,7 +28,7 @@ fn main(_skParam0: vec2) -> vec4 { let _skTemp5 = clamp(uintValues.xy, vec2(100u, 0u), vec2(300u, 400u)); let _skTemp6 = clamp(uintValues.xyz, vec3(100u, 0u, 0u), vec3(300u, 400u, 250u)); let _skTemp7 = clamp(uintValues, clampLow, clampHigh); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((((((((((_skTemp0 == expectedA.x && all(_skTemp1 == expectedA.xy)) && all(_skTemp2 == expectedA.xyz)) && all(_skTemp3 == expectedA)) && 100u == expectedA.x) && all(vec2(100u, 200u) == expectedA.xy)) && all(vec3(100u, 200u, 275u) == expectedA.xyz)) && all(vec4(100u, 200u, 275u, 300u) == expectedA)) && _skTemp4 == expectedB.x) && all(_skTemp5 == expectedB.xy)) && all(_skTemp6 == expectedB.xyz)) && all(_skTemp7 == expectedB)) && 100u == expectedB.x) && all(vec2(100u, 200u) == expectedB.xy)) && all(vec3(100u, 200u, 250u) == expectedB.xyz)) && all(vec4(100u, 200u, 250u, 425u) == expectedB))); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((((((((((_skTemp0 == expectedA.x) && all(_skTemp1 == expectedA.xy)) && all(_skTemp2 == expectedA.xyz)) && all(_skTemp3 == expectedA)) && (100u == expectedA.x)) && all(vec2(100u, 200u) == expectedA.xy)) && all(vec3(100u, 200u, 275u) == expectedA.xyz)) && all(vec4(100u, 200u, 275u, 300u) == expectedA)) && (_skTemp4 == expectedB.x)) && all(_skTemp5 == expectedB.xy)) && all(_skTemp6 == expectedB.xyz)) && all(_skTemp7 == expectedB)) && (100u == expectedB.x)) && all(vec2(100u, 200u) == expectedB.xy)) && all(vec3(100u, 200u, 250u) == expectedB.xyz)) && all(vec4(100u, 200u, 250u, 425u) == expectedB))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/intrinsics/Cos.asm.frag b/tests/sksl/intrinsics/Cos.asm.frag index ce4753627f92..1b2eb8ad5054 100644 --- a/tests/sksl/intrinsics/Cos.asm.frag +++ b/tests/sksl/intrinsics/Cos.asm.frag @@ -1,211 +1,211 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "inputVal" -OpMemberName %_UniformBuffer 1 "expected" -OpMemberName %_UniformBuffer 2 "colorGreen" -OpMemberName %_UniformBuffer 3 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 3 Offset 48 -OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %27 RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %82 RelaxedPrecision -OpDecorate %89 RelaxedPrecision -OpDecorate %90 RelaxedPrecision -OpDecorate %98 RelaxedPrecision -OpDecorate %99 RelaxedPrecision -OpDecorate %107 RelaxedPrecision -OpDecorate %118 RelaxedPrecision -OpDecorate %121 RelaxedPrecision -OpDecorate %122 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "inputVal" + OpMemberName %_UniformBuffer 1 "expected" + OpMemberName %_UniformBuffer 2 "colorGreen" + OpMemberName %_UniformBuffer 3 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 3 Offset 48 + OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %27 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %82 RelaxedPrecision + OpDecorate %89 RelaxedPrecision + OpDecorate %90 RelaxedPrecision + OpDecorate %98 RelaxedPrecision + OpDecorate %99 RelaxedPrecision + OpDecorate %107 RelaxedPrecision + OpDecorate %118 RelaxedPrecision + OpDecorate %121 RelaxedPrecision + OpDecorate %122 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%false = OpConstantFalse %bool + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%v3bool = OpTypeVector %bool 3 -%v4bool = OpTypeVector %bool 4 -%float_1 = OpConstant %float 1 -%87 = OpConstantComposite %v2float %float_1 %float_1 -%96 = OpConstantComposite %v3float %float_1 %float_1 %float_1 -%105 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %v3bool = OpTypeVector %bool 3 + %v4bool = OpTypeVector %bool 4 + %float_1 = OpConstant %float 1 + %87 = OpConstantComposite %v2float %float_1 %float_1 + %96 = OpConstantComposite %v3float %float_1 %float_1 %float_1 + %105 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_2 = OpConstant %int 2 -%int_3 = OpConstant %int 3 + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%111 = OpVariable %_ptr_Function_v4float Function -%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %28 -%33 = OpCompositeExtract %float %32 0 -%27 = OpExtInst %float %1 Cos %33 -%34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%36 = OpLoad %v4float %34 -%37 = OpCompositeExtract %float %36 0 -%38 = OpFOrdEqual %bool %27 %37 -OpSelectionMerge %40 None -OpBranchConditional %38 %39 %40 -%39 = OpLabel -%42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%43 = OpLoad %v4float %42 -%44 = OpVectorShuffle %v2float %43 %43 0 1 -%41 = OpExtInst %v2float %1 Cos %44 -%45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%46 = OpLoad %v4float %45 -%47 = OpVectorShuffle %v2float %46 %46 0 1 -%48 = OpFOrdEqual %v2bool %41 %47 -%50 = OpAll %bool %48 -OpBranch %40 -%40 = OpLabel -%51 = OpPhi %bool %false %25 %50 %39 -OpSelectionMerge %53 None -OpBranchConditional %51 %52 %53 -%52 = OpLabel -%55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%56 = OpLoad %v4float %55 -%57 = OpVectorShuffle %v3float %56 %56 0 1 2 -%54 = OpExtInst %v3float %1 Cos %57 -%59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%60 = OpLoad %v4float %59 -%61 = OpVectorShuffle %v3float %60 %60 0 1 2 -%62 = OpFOrdEqual %v3bool %54 %61 -%64 = OpAll %bool %62 -OpBranch %53 -%53 = OpLabel -%65 = OpPhi %bool %false %40 %64 %52 -OpSelectionMerge %67 None -OpBranchConditional %65 %66 %67 -%66 = OpLabel -%69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%70 = OpLoad %v4float %69 -%68 = OpExtInst %v4float %1 Cos %70 -%71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%72 = OpLoad %v4float %71 -%73 = OpFOrdEqual %v4bool %68 %72 -%75 = OpAll %bool %73 -OpBranch %67 -%67 = OpLabel -%76 = OpPhi %bool %false %53 %75 %66 -OpSelectionMerge %78 None -OpBranchConditional %76 %77 %78 -%77 = OpLabel -%80 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%81 = OpLoad %v4float %80 -%82 = OpCompositeExtract %float %81 0 -%83 = OpFOrdEqual %bool %float_1 %82 -OpBranch %78 -%78 = OpLabel -%84 = OpPhi %bool %false %67 %83 %77 -OpSelectionMerge %86 None -OpBranchConditional %84 %85 %86 -%85 = OpLabel -%88 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%89 = OpLoad %v4float %88 -%90 = OpVectorShuffle %v2float %89 %89 0 1 -%91 = OpFOrdEqual %v2bool %87 %90 -%92 = OpAll %bool %91 -OpBranch %86 -%86 = OpLabel -%93 = OpPhi %bool %false %78 %92 %85 -OpSelectionMerge %95 None -OpBranchConditional %93 %94 %95 -%94 = OpLabel -%97 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%98 = OpLoad %v4float %97 -%99 = OpVectorShuffle %v3float %98 %98 0 1 2 -%100 = OpFOrdEqual %v3bool %96 %99 -%101 = OpAll %bool %100 -OpBranch %95 -%95 = OpLabel -%102 = OpPhi %bool %false %86 %101 %94 -OpSelectionMerge %104 None -OpBranchConditional %102 %103 %104 -%103 = OpLabel -%106 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%107 = OpLoad %v4float %106 -%108 = OpFOrdEqual %v4bool %105 %107 -%109 = OpAll %bool %108 -OpBranch %104 -%104 = OpLabel -%110 = OpPhi %bool %false %95 %109 %103 -OpSelectionMerge %115 None -OpBranchConditional %110 %113 %114 -%113 = OpLabel -%116 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%118 = OpLoad %v4float %116 -OpStore %111 %118 -OpBranch %115 -%114 = OpLabel -%119 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%121 = OpLoad %v4float %119 -OpStore %111 %121 -OpBranch %115 -%115 = OpLabel -%122 = OpLoad %v4float %111 -OpReturnValue %122 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %111 = OpVariable %_ptr_Function_v4float Function + %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %28 + %33 = OpCompositeExtract %float %32 0 + %27 = OpExtInst %float %1 Cos %33 + %34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %36 = OpLoad %v4float %34 + %37 = OpCompositeExtract %float %36 0 + %38 = OpFOrdEqual %bool %27 %37 + OpSelectionMerge %40 None + OpBranchConditional %38 %39 %40 + %39 = OpLabel + %42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %43 = OpLoad %v4float %42 + %44 = OpVectorShuffle %v2float %43 %43 0 1 + %41 = OpExtInst %v2float %1 Cos %44 + %45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %46 = OpLoad %v4float %45 + %47 = OpVectorShuffle %v2float %46 %46 0 1 + %48 = OpFOrdEqual %v2bool %41 %47 + %50 = OpAll %bool %48 + OpBranch %40 + %40 = OpLabel + %51 = OpPhi %bool %false %25 %50 %39 + OpSelectionMerge %53 None + OpBranchConditional %51 %52 %53 + %52 = OpLabel + %55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %56 = OpLoad %v4float %55 + %57 = OpVectorShuffle %v3float %56 %56 0 1 2 + %54 = OpExtInst %v3float %1 Cos %57 + %59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %60 = OpLoad %v4float %59 + %61 = OpVectorShuffle %v3float %60 %60 0 1 2 + %62 = OpFOrdEqual %v3bool %54 %61 + %64 = OpAll %bool %62 + OpBranch %53 + %53 = OpLabel + %65 = OpPhi %bool %false %40 %64 %52 + OpSelectionMerge %67 None + OpBranchConditional %65 %66 %67 + %66 = OpLabel + %69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %70 = OpLoad %v4float %69 + %68 = OpExtInst %v4float %1 Cos %70 + %71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %72 = OpLoad %v4float %71 + %73 = OpFOrdEqual %v4bool %68 %72 + %75 = OpAll %bool %73 + OpBranch %67 + %67 = OpLabel + %76 = OpPhi %bool %false %53 %75 %66 + OpSelectionMerge %78 None + OpBranchConditional %76 %77 %78 + %77 = OpLabel + %80 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %81 = OpLoad %v4float %80 + %82 = OpCompositeExtract %float %81 0 + %83 = OpFOrdEqual %bool %float_1 %82 + OpBranch %78 + %78 = OpLabel + %84 = OpPhi %bool %false %67 %83 %77 + OpSelectionMerge %86 None + OpBranchConditional %84 %85 %86 + %85 = OpLabel + %88 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %89 = OpLoad %v4float %88 + %90 = OpVectorShuffle %v2float %89 %89 0 1 + %91 = OpFOrdEqual %v2bool %87 %90 + %92 = OpAll %bool %91 + OpBranch %86 + %86 = OpLabel + %93 = OpPhi %bool %false %78 %92 %85 + OpSelectionMerge %95 None + OpBranchConditional %93 %94 %95 + %94 = OpLabel + %97 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %98 = OpLoad %v4float %97 + %99 = OpVectorShuffle %v3float %98 %98 0 1 2 + %100 = OpFOrdEqual %v3bool %96 %99 + %101 = OpAll %bool %100 + OpBranch %95 + %95 = OpLabel + %102 = OpPhi %bool %false %86 %101 %94 + OpSelectionMerge %104 None + OpBranchConditional %102 %103 %104 + %103 = OpLabel + %106 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %107 = OpLoad %v4float %106 + %108 = OpFOrdEqual %v4bool %105 %107 + %109 = OpAll %bool %108 + OpBranch %104 + %104 = OpLabel + %110 = OpPhi %bool %false %95 %109 %103 + OpSelectionMerge %115 None + OpBranchConditional %110 %113 %114 + %113 = OpLabel + %116 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %118 = OpLoad %v4float %116 + OpStore %111 %118 + OpBranch %115 + %114 = OpLabel + %119 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %121 = OpLoad %v4float %119 + OpStore %111 %121 + OpBranch %115 + %115 = OpLabel + %122 = OpLoad %v4float %111 + OpReturnValue %122 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Cos.skrp b/tests/sksl/intrinsics/Cos.skrp index efc71f63a0f6..e31ac925ab67 100644 --- a/tests/sksl/intrinsics/Cos.skrp +++ b/tests/sksl/intrinsics/Cos.skrp @@ -1,3 +1,5 @@ +57 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_uniform $4 = inputVal(0) diff --git a/tests/sksl/intrinsics/Cos.wgsl b/tests/sksl/intrinsics/Cos.wgsl index 8c965d298181..ae0ac2c3483f 100644 --- a/tests/sksl/intrinsics/Cos.wgsl +++ b/tests/sksl/intrinsics/Cos.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -19,7 +20,7 @@ fn main(_skParam0: vec2) -> vec4 { let _skTemp1 = cos(_globalUniforms.inputVal.xy); let _skTemp2 = cos(_globalUniforms.inputVal.xyz); let _skTemp3 = cos(_globalUniforms.inputVal); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((_skTemp0 == _globalUniforms.expected.x && all(_skTemp1 == _globalUniforms.expected.xy)) && all(_skTemp2 == _globalUniforms.expected.xyz)) && all(_skTemp3 == _globalUniforms.expected)) && 1.0 == _globalUniforms.expected.x) && all(vec2(1.0) == _globalUniforms.expected.xy)) && all(vec3(1.0) == _globalUniforms.expected.xyz)) && all(vec4(1.0) == _globalUniforms.expected))); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((_skTemp0 == _globalUniforms.expected.x) && all(_skTemp1 == _globalUniforms.expected.xy)) && all(_skTemp2 == _globalUniforms.expected.xyz)) && all(_skTemp3 == _globalUniforms.expected)) && (1.0 == _globalUniforms.expected.x)) && all(vec2(1.0) == _globalUniforms.expected.xy)) && all(vec3(1.0) == _globalUniforms.expected.xyz)) && all(vec4(1.0) == _globalUniforms.expected))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/intrinsics/Cosh.asm.frag b/tests/sksl/intrinsics/Cosh.asm.frag index 579f50071ea8..f6b2773af2b4 100644 --- a/tests/sksl/intrinsics/Cosh.asm.frag +++ b/tests/sksl/intrinsics/Cosh.asm.frag @@ -1,211 +1,211 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "inputVal" -OpMemberName %_UniformBuffer 1 "expected" -OpMemberName %_UniformBuffer 2 "colorGreen" -OpMemberName %_UniformBuffer 3 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 3 Offset 48 -OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %27 RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %82 RelaxedPrecision -OpDecorate %89 RelaxedPrecision -OpDecorate %90 RelaxedPrecision -OpDecorate %98 RelaxedPrecision -OpDecorate %99 RelaxedPrecision -OpDecorate %107 RelaxedPrecision -OpDecorate %118 RelaxedPrecision -OpDecorate %121 RelaxedPrecision -OpDecorate %122 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "inputVal" + OpMemberName %_UniformBuffer 1 "expected" + OpMemberName %_UniformBuffer 2 "colorGreen" + OpMemberName %_UniformBuffer 3 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 3 Offset 48 + OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %27 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %82 RelaxedPrecision + OpDecorate %89 RelaxedPrecision + OpDecorate %90 RelaxedPrecision + OpDecorate %98 RelaxedPrecision + OpDecorate %99 RelaxedPrecision + OpDecorate %107 RelaxedPrecision + OpDecorate %118 RelaxedPrecision + OpDecorate %121 RelaxedPrecision + OpDecorate %122 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%false = OpConstantFalse %bool + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%v3bool = OpTypeVector %bool 3 -%v4bool = OpTypeVector %bool 4 -%float_1 = OpConstant %float 1 -%87 = OpConstantComposite %v2float %float_1 %float_1 -%96 = OpConstantComposite %v3float %float_1 %float_1 %float_1 -%105 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %v3bool = OpTypeVector %bool 3 + %v4bool = OpTypeVector %bool 4 + %float_1 = OpConstant %float 1 + %87 = OpConstantComposite %v2float %float_1 %float_1 + %96 = OpConstantComposite %v3float %float_1 %float_1 %float_1 + %105 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_2 = OpConstant %int 2 -%int_3 = OpConstant %int 3 + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%111 = OpVariable %_ptr_Function_v4float Function -%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %28 -%33 = OpCompositeExtract %float %32 0 -%27 = OpExtInst %float %1 Cosh %33 -%34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%36 = OpLoad %v4float %34 -%37 = OpCompositeExtract %float %36 0 -%38 = OpFOrdEqual %bool %27 %37 -OpSelectionMerge %40 None -OpBranchConditional %38 %39 %40 -%39 = OpLabel -%42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%43 = OpLoad %v4float %42 -%44 = OpVectorShuffle %v2float %43 %43 0 1 -%41 = OpExtInst %v2float %1 Cosh %44 -%45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%46 = OpLoad %v4float %45 -%47 = OpVectorShuffle %v2float %46 %46 0 1 -%48 = OpFOrdEqual %v2bool %41 %47 -%50 = OpAll %bool %48 -OpBranch %40 -%40 = OpLabel -%51 = OpPhi %bool %false %25 %50 %39 -OpSelectionMerge %53 None -OpBranchConditional %51 %52 %53 -%52 = OpLabel -%55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%56 = OpLoad %v4float %55 -%57 = OpVectorShuffle %v3float %56 %56 0 1 2 -%54 = OpExtInst %v3float %1 Cosh %57 -%59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%60 = OpLoad %v4float %59 -%61 = OpVectorShuffle %v3float %60 %60 0 1 2 -%62 = OpFOrdEqual %v3bool %54 %61 -%64 = OpAll %bool %62 -OpBranch %53 -%53 = OpLabel -%65 = OpPhi %bool %false %40 %64 %52 -OpSelectionMerge %67 None -OpBranchConditional %65 %66 %67 -%66 = OpLabel -%69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%70 = OpLoad %v4float %69 -%68 = OpExtInst %v4float %1 Cosh %70 -%71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%72 = OpLoad %v4float %71 -%73 = OpFOrdEqual %v4bool %68 %72 -%75 = OpAll %bool %73 -OpBranch %67 -%67 = OpLabel -%76 = OpPhi %bool %false %53 %75 %66 -OpSelectionMerge %78 None -OpBranchConditional %76 %77 %78 -%77 = OpLabel -%80 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%81 = OpLoad %v4float %80 -%82 = OpCompositeExtract %float %81 0 -%83 = OpFOrdEqual %bool %float_1 %82 -OpBranch %78 -%78 = OpLabel -%84 = OpPhi %bool %false %67 %83 %77 -OpSelectionMerge %86 None -OpBranchConditional %84 %85 %86 -%85 = OpLabel -%88 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%89 = OpLoad %v4float %88 -%90 = OpVectorShuffle %v2float %89 %89 0 1 -%91 = OpFOrdEqual %v2bool %87 %90 -%92 = OpAll %bool %91 -OpBranch %86 -%86 = OpLabel -%93 = OpPhi %bool %false %78 %92 %85 -OpSelectionMerge %95 None -OpBranchConditional %93 %94 %95 -%94 = OpLabel -%97 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%98 = OpLoad %v4float %97 -%99 = OpVectorShuffle %v3float %98 %98 0 1 2 -%100 = OpFOrdEqual %v3bool %96 %99 -%101 = OpAll %bool %100 -OpBranch %95 -%95 = OpLabel -%102 = OpPhi %bool %false %86 %101 %94 -OpSelectionMerge %104 None -OpBranchConditional %102 %103 %104 -%103 = OpLabel -%106 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%107 = OpLoad %v4float %106 -%108 = OpFOrdEqual %v4bool %105 %107 -%109 = OpAll %bool %108 -OpBranch %104 -%104 = OpLabel -%110 = OpPhi %bool %false %95 %109 %103 -OpSelectionMerge %115 None -OpBranchConditional %110 %113 %114 -%113 = OpLabel -%116 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%118 = OpLoad %v4float %116 -OpStore %111 %118 -OpBranch %115 -%114 = OpLabel -%119 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%121 = OpLoad %v4float %119 -OpStore %111 %121 -OpBranch %115 -%115 = OpLabel -%122 = OpLoad %v4float %111 -OpReturnValue %122 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %111 = OpVariable %_ptr_Function_v4float Function + %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %28 + %33 = OpCompositeExtract %float %32 0 + %27 = OpExtInst %float %1 Cosh %33 + %34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %36 = OpLoad %v4float %34 + %37 = OpCompositeExtract %float %36 0 + %38 = OpFOrdEqual %bool %27 %37 + OpSelectionMerge %40 None + OpBranchConditional %38 %39 %40 + %39 = OpLabel + %42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %43 = OpLoad %v4float %42 + %44 = OpVectorShuffle %v2float %43 %43 0 1 + %41 = OpExtInst %v2float %1 Cosh %44 + %45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %46 = OpLoad %v4float %45 + %47 = OpVectorShuffle %v2float %46 %46 0 1 + %48 = OpFOrdEqual %v2bool %41 %47 + %50 = OpAll %bool %48 + OpBranch %40 + %40 = OpLabel + %51 = OpPhi %bool %false %25 %50 %39 + OpSelectionMerge %53 None + OpBranchConditional %51 %52 %53 + %52 = OpLabel + %55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %56 = OpLoad %v4float %55 + %57 = OpVectorShuffle %v3float %56 %56 0 1 2 + %54 = OpExtInst %v3float %1 Cosh %57 + %59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %60 = OpLoad %v4float %59 + %61 = OpVectorShuffle %v3float %60 %60 0 1 2 + %62 = OpFOrdEqual %v3bool %54 %61 + %64 = OpAll %bool %62 + OpBranch %53 + %53 = OpLabel + %65 = OpPhi %bool %false %40 %64 %52 + OpSelectionMerge %67 None + OpBranchConditional %65 %66 %67 + %66 = OpLabel + %69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %70 = OpLoad %v4float %69 + %68 = OpExtInst %v4float %1 Cosh %70 + %71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %72 = OpLoad %v4float %71 + %73 = OpFOrdEqual %v4bool %68 %72 + %75 = OpAll %bool %73 + OpBranch %67 + %67 = OpLabel + %76 = OpPhi %bool %false %53 %75 %66 + OpSelectionMerge %78 None + OpBranchConditional %76 %77 %78 + %77 = OpLabel + %80 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %81 = OpLoad %v4float %80 + %82 = OpCompositeExtract %float %81 0 + %83 = OpFOrdEqual %bool %float_1 %82 + OpBranch %78 + %78 = OpLabel + %84 = OpPhi %bool %false %67 %83 %77 + OpSelectionMerge %86 None + OpBranchConditional %84 %85 %86 + %85 = OpLabel + %88 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %89 = OpLoad %v4float %88 + %90 = OpVectorShuffle %v2float %89 %89 0 1 + %91 = OpFOrdEqual %v2bool %87 %90 + %92 = OpAll %bool %91 + OpBranch %86 + %86 = OpLabel + %93 = OpPhi %bool %false %78 %92 %85 + OpSelectionMerge %95 None + OpBranchConditional %93 %94 %95 + %94 = OpLabel + %97 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %98 = OpLoad %v4float %97 + %99 = OpVectorShuffle %v3float %98 %98 0 1 2 + %100 = OpFOrdEqual %v3bool %96 %99 + %101 = OpAll %bool %100 + OpBranch %95 + %95 = OpLabel + %102 = OpPhi %bool %false %86 %101 %94 + OpSelectionMerge %104 None + OpBranchConditional %102 %103 %104 + %103 = OpLabel + %106 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %107 = OpLoad %v4float %106 + %108 = OpFOrdEqual %v4bool %105 %107 + %109 = OpAll %bool %108 + OpBranch %104 + %104 = OpLabel + %110 = OpPhi %bool %false %95 %109 %103 + OpSelectionMerge %115 None + OpBranchConditional %110 %113 %114 + %113 = OpLabel + %116 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %118 = OpLoad %v4float %116 + OpStore %111 %118 + OpBranch %115 + %114 = OpLabel + %119 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %121 = OpLoad %v4float %119 + OpStore %111 %121 + OpBranch %115 + %115 = OpLabel + %122 = OpLoad %v4float %111 + OpReturnValue %122 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Cosh.wgsl b/tests/sksl/intrinsics/Cosh.wgsl new file mode 100644 index 000000000000..f3e1da41b7d3 --- /dev/null +++ b/tests/sksl/intrinsics/Cosh.wgsl @@ -0,0 +1,30 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + inputVal: vec4, + expected: vec4, + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + let _skTemp0 = cosh(_globalUniforms.inputVal.x); + let _skTemp1 = cosh(_globalUniforms.inputVal.xy); + let _skTemp2 = cosh(_globalUniforms.inputVal.xyz); + let _skTemp3 = cosh(_globalUniforms.inputVal); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((_skTemp0 == _globalUniforms.expected.x) && all(_skTemp1 == _globalUniforms.expected.xy)) && all(_skTemp2 == _globalUniforms.expected.xyz)) && all(_skTemp3 == _globalUniforms.expected)) && (1.0 == _globalUniforms.expected.x)) && all(vec2(1.0) == _globalUniforms.expected.xy)) && all(vec3(1.0) == _globalUniforms.expected.xyz)) && all(vec4(1.0) == _globalUniforms.expected))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/intrinsics/Cross.asm.frag b/tests/sksl/intrinsics/Cross.asm.frag index bf6b24a2aeb7..0d7a9fa322d7 100644 --- a/tests/sksl/intrinsics/Cross.asm.frag +++ b/tests/sksl/intrinsics/Cross.asm.frag @@ -1,116 +1,116 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testMatrix3x3" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 ColMajor -OpMemberDecorate %_UniformBuffer 0 MatrixStride 16 -OpMemberDecorate %_UniformBuffer 1 Offset 48 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 64 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %69 RelaxedPrecision -OpDecorate %71 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testMatrix3x3" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 ColMajor + OpMemberDecorate %_UniformBuffer 0 MatrixStride 16 + OpMemberDecorate %_UniformBuffer 1 Offset 48 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 64 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %69 RelaxedPrecision + OpDecorate %71 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%v3float = OpTypeVector %float 3 + %v3float = OpTypeVector %float 3 %mat3v3float = OpTypeMatrix %v3float 3 %_UniformBuffer = OpTypeStruct %mat3v3float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%17 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%21 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %17 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %21 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%25 = OpTypeFunction %v4float %_ptr_Function_v2float -%false = OpConstantFalse %bool + %25 = OpTypeFunction %v4float %_ptr_Function_v2float + %false = OpConstantFalse %bool %_ptr_Uniform_mat3v3float = OpTypePointer Uniform %mat3v3float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 %_ptr_Uniform_v3float = OpTypePointer Uniform %v3float -%int_1 = OpConstant %int 1 -%float_n3 = OpConstant %float -3 -%float_6 = OpConstant %float 6 -%43 = OpConstantComposite %v3float %float_n3 %float_6 %float_n3 -%v3bool = OpTypeVector %bool 3 -%int_2 = OpConstant %int 2 -%float_n12 = OpConstant %float -12 -%58 = OpConstantComposite %v3float %float_6 %float_n12 %float_6 + %int_1 = OpConstant %int 1 + %float_n3 = OpConstant %float -3 + %float_6 = OpConstant %float 6 + %43 = OpConstantComposite %v3float %float_n3 %float_6 %float_n3 + %v3bool = OpTypeVector %bool 3 + %int_2 = OpConstant %int 2 + %float_n12 = OpConstant %float -12 + %58 = OpConstantComposite %v3float %float_6 %float_n12 %float_6 %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float %_entrypoint_v = OpFunction %void None %17 -%18 = OpLabel -%22 = OpVariable %_ptr_Function_v2float Function -OpStore %22 %21 -%24 = OpFunctionCall %v4float %main %22 -OpStore %sk_FragColor %24 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %25 -%26 = OpFunctionParameter %_ptr_Function_v2float -%27 = OpLabel -%62 = OpVariable %_ptr_Function_v4float Function -%30 = OpAccessChain %_ptr_Uniform_mat3v3float %10 %int_0 -%34 = OpAccessChain %_ptr_Uniform_v3float %30 %int_0 -%36 = OpLoad %v3float %34 -%37 = OpAccessChain %_ptr_Uniform_mat3v3float %10 %int_0 -%39 = OpAccessChain %_ptr_Uniform_v3float %37 %int_1 -%40 = OpLoad %v3float %39 -%29 = OpExtInst %v3float %1 Cross %36 %40 -%44 = OpFOrdEqual %v3bool %29 %43 -%46 = OpAll %bool %44 -OpSelectionMerge %48 None -OpBranchConditional %46 %47 %48 -%47 = OpLabel -%50 = OpAccessChain %_ptr_Uniform_mat3v3float %10 %int_0 -%52 = OpAccessChain %_ptr_Uniform_v3float %50 %int_2 -%53 = OpLoad %v3float %52 -%54 = OpAccessChain %_ptr_Uniform_mat3v3float %10 %int_0 -%55 = OpAccessChain %_ptr_Uniform_v3float %54 %int_0 -%56 = OpLoad %v3float %55 -%49 = OpExtInst %v3float %1 Cross %53 %56 -%59 = OpFOrdEqual %v3bool %49 %58 -%60 = OpAll %bool %59 -OpBranch %48 -%48 = OpLabel -%61 = OpPhi %bool %false %27 %60 %47 -OpSelectionMerge %66 None -OpBranchConditional %61 %64 %65 -%64 = OpLabel -%67 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%69 = OpLoad %v4float %67 -OpStore %62 %69 -OpBranch %66 -%65 = OpLabel -%70 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%71 = OpLoad %v4float %70 -OpStore %62 %71 -OpBranch %66 -%66 = OpLabel -%72 = OpLoad %v4float %62 -OpReturnValue %72 -OpFunctionEnd + %18 = OpLabel + %22 = OpVariable %_ptr_Function_v2float Function + OpStore %22 %21 + %24 = OpFunctionCall %v4float %main %22 + OpStore %sk_FragColor %24 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %25 + %26 = OpFunctionParameter %_ptr_Function_v2float + %27 = OpLabel + %62 = OpVariable %_ptr_Function_v4float Function + %30 = OpAccessChain %_ptr_Uniform_mat3v3float %10 %int_0 + %34 = OpAccessChain %_ptr_Uniform_v3float %30 %int_0 + %36 = OpLoad %v3float %34 + %37 = OpAccessChain %_ptr_Uniform_mat3v3float %10 %int_0 + %39 = OpAccessChain %_ptr_Uniform_v3float %37 %int_1 + %40 = OpLoad %v3float %39 + %29 = OpExtInst %v3float %1 Cross %36 %40 + %44 = OpFOrdEqual %v3bool %29 %43 + %46 = OpAll %bool %44 + OpSelectionMerge %48 None + OpBranchConditional %46 %47 %48 + %47 = OpLabel + %50 = OpAccessChain %_ptr_Uniform_mat3v3float %10 %int_0 + %52 = OpAccessChain %_ptr_Uniform_v3float %50 %int_2 + %53 = OpLoad %v3float %52 + %54 = OpAccessChain %_ptr_Uniform_mat3v3float %10 %int_0 + %55 = OpAccessChain %_ptr_Uniform_v3float %54 %int_0 + %56 = OpLoad %v3float %55 + %49 = OpExtInst %v3float %1 Cross %53 %56 + %59 = OpFOrdEqual %v3bool %49 %58 + %60 = OpAll %bool %59 + OpBranch %48 + %48 = OpLabel + %61 = OpPhi %bool %false %27 %60 %47 + OpSelectionMerge %66 None + OpBranchConditional %61 %64 %65 + %64 = OpLabel + %67 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %69 = OpLoad %v4float %67 + OpStore %62 %69 + OpBranch %66 + %65 = OpLabel + %70 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %71 = OpLoad %v4float %70 + OpStore %62 %71 + OpBranch %66 + %66 = OpLabel + %72 = OpLoad %v4float %62 + OpReturnValue %72 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Cross.skrp b/tests/sksl/intrinsics/Cross.skrp index 98c0d526ccdd..eae718cb6c49 100644 --- a/tests/sksl/intrinsics/Cross.skrp +++ b/tests/sksl/intrinsics/Cross.skrp @@ -1,10 +1,12 @@ +40 instructions + [immutable slots] -expected1(0) = 0xC0400000 (-3.0) -expected1(1) = 0x40C00000 (6.0) -expected1(2) = 0xC0400000 (-3.0) -expected2(0) = 0x40C00000 (6.0) -expected2(1) = 0xC1400000 (-12.0) -expected2(2) = 0x40C00000 (6.0) +i0 = 0xC0400000 (-3.0) +i1 = 0x40C00000 (6.0) +i2 = 0xC0400000 (-3.0) +i3 = 0x40C00000 (6.0) +i4 = 0xC1400000 (-12.0) +i5 = 0x40C00000 (6.0) store_src_rg v0..1 = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -20,7 +22,7 @@ swizzle_3 $14..16 = ($14..16).yzx mul_3_floats $11..13 *= $14..16 copy_3_slots_unmasked $7..9 = $11..13 sub_3_floats $4..6 -= $7..9 -copy_3_slots_unmasked $7..9 = expected1 +copy_3_immutables_unmasked $7..9 = i0..2 [0xC0400000 (-3.0), 0x40C00000 (6.0), 0xC0400000 (-3.0)] cmpeq_3_floats $4..6 = equal($4..6, $7..9) bitwise_and_int $5 &= $6 bitwise_and_int $4 &= $5 @@ -36,7 +38,7 @@ swizzle_3 $14..16 = ($14..16).yzx mul_3_floats $11..13 *= $14..16 copy_3_slots_unmasked $8..10 = $11..13 sub_3_floats $5..7 -= $8..10 -copy_3_slots_unmasked $8..10 = expected2 +copy_3_immutables_unmasked $8..10 = i3..5 [0x40C00000 (6.0), 0xC1400000 (-12.0), 0x40C00000 (6.0)] cmpeq_3_floats $5..7 = equal($5..7, $8..10) bitwise_and_int $6 &= $7 bitwise_and_int $5 &= $6 diff --git a/tests/sksl/intrinsics/Cross.wgsl b/tests/sksl/intrinsics/Cross.wgsl new file mode 100644 index 000000000000..ed7637e68938 --- /dev/null +++ b/tests/sksl/intrinsics/Cross.wgsl @@ -0,0 +1,28 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + testMatrix3x3: mat3x3, + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + { + const expected1: vec3 = vec3(-3.0, 6.0, -3.0); + const expected2: vec3 = vec3(6.0, -12.0, 6.0); + let _skTemp0 = cross(_globalUniforms.testMatrix3x3[0], _globalUniforms.testMatrix3x3[1]); + let _skTemp1 = cross(_globalUniforms.testMatrix3x3[2], _globalUniforms.testMatrix3x3[0]); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(all(_skTemp0 == expected1) && all(_skTemp1 == expected2))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/intrinsics/CrossNoInline.asm.frag b/tests/sksl/intrinsics/CrossNoInline.asm.frag index 3f4fb5553295..2673afb82298 100644 --- a/tests/sksl/intrinsics/CrossNoInline.asm.frag +++ b/tests/sksl/intrinsics/CrossNoInline.asm.frag @@ -1,103 +1,103 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "ah" -OpMemberName %_UniformBuffer 1 "bh" -OpMemberName %_UniformBuffer 2 "af" -OpMemberName %_UniformBuffer 3 "bf" -OpName %cross_length_2d_ff2f2 "cross_length_2d_ff2f2" -OpName %cross_length_2d_hh2h2 "cross_length_2d_hh2h2" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 8 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 16 -OpMemberDecorate %_UniformBuffer 3 Offset 24 -OpDecorate %_UniformBuffer Block -OpDecorate %12 Binding 0 -OpDecorate %12 DescriptorSet 0 -OpDecorate %29 RelaxedPrecision -OpDecorate %30 RelaxedPrecision -OpDecorate %31 RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "ah" + OpMemberName %_UniformBuffer 1 "bh" + OpMemberName %_UniformBuffer 2 "af" + OpMemberName %_UniformBuffer 3 "bf" + OpName %cross_length_2d_ff2f2 "cross_length_2d_ff2f2" + OpName %cross_length_2d_hh2h2 "cross_length_2d_hh2h2" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 8 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 16 + OpMemberDecorate %_UniformBuffer 3 Offset 24 + OpDecorate %_UniformBuffer Block + OpDecorate %12 Binding 0 + OpDecorate %12 DescriptorSet 0 + OpDecorate %29 RelaxedPrecision + OpDecorate %30 RelaxedPrecision + OpDecorate %31 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%v2float = OpTypeVector %float 2 + %v2float = OpTypeVector %float 2 %_UniformBuffer = OpTypeStruct %v2float %v2float %v2float %v2float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%12 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %12 = OpVariable %_ptr_Uniform__UniformBuffer Uniform %_ptr_Function_v2float = OpTypePointer Function %v2float -%17 = OpTypeFunction %float %_ptr_Function_v2float %_ptr_Function_v2float + %17 = OpTypeFunction %float %_ptr_Function_v2float %_ptr_Function_v2float %mat2v2float = OpTypeMatrix %v2float 2 -%void = OpTypeVoid -%34 = OpTypeFunction %void + %void = OpTypeVoid + %34 = OpTypeFunction %void %_ptr_Uniform_v2float = OpTypePointer Uniform %v2float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 %_ptr_Output_float = OpTypePointer Output %float -%int_2 = OpConstant %int 2 -%int_3 = OpConstant %int 3 + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 %cross_length_2d_ff2f2 = OpFunction %float None %17 -%18 = OpFunctionParameter %_ptr_Function_v2float -%19 = OpFunctionParameter %_ptr_Function_v2float -%20 = OpLabel -%22 = OpLoad %v2float %18 -%23 = OpLoad %v2float %19 -%25 = OpCompositeConstruct %mat2v2float %22 %23 -%21 = OpExtInst %float %1 Determinant %25 -OpReturnValue %21 -OpFunctionEnd + %18 = OpFunctionParameter %_ptr_Function_v2float + %19 = OpFunctionParameter %_ptr_Function_v2float + %20 = OpLabel + %22 = OpLoad %v2float %18 + %23 = OpLoad %v2float %19 + %25 = OpCompositeConstruct %mat2v2float %22 %23 + %21 = OpExtInst %float %1 Determinant %25 + OpReturnValue %21 + OpFunctionEnd %cross_length_2d_hh2h2 = OpFunction %float None %17 -%26 = OpFunctionParameter %_ptr_Function_v2float -%27 = OpFunctionParameter %_ptr_Function_v2float -%28 = OpLabel -%30 = OpLoad %v2float %26 -%31 = OpLoad %v2float %27 -%32 = OpCompositeConstruct %mat2v2float %30 %31 -%29 = OpExtInst %float %1 Determinant %32 -OpReturnValue %29 -OpFunctionEnd -%main = OpFunction %void None %34 -%35 = OpLabel -%41 = OpVariable %_ptr_Function_v2float Function -%45 = OpVariable %_ptr_Function_v2float Function -%52 = OpVariable %_ptr_Function_v2float Function -%56 = OpVariable %_ptr_Function_v2float Function -%36 = OpAccessChain %_ptr_Uniform_v2float %12 %int_0 -%40 = OpLoad %v2float %36 -OpStore %41 %40 -%42 = OpAccessChain %_ptr_Uniform_v2float %12 %int_1 -%44 = OpLoad %v2float %42 -OpStore %45 %44 -%46 = OpFunctionCall %float %cross_length_2d_hh2h2 %41 %45 -%47 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 -OpStore %47 %46 -%49 = OpAccessChain %_ptr_Uniform_v2float %12 %int_2 -%51 = OpLoad %v2float %49 -OpStore %52 %51 -%53 = OpAccessChain %_ptr_Uniform_v2float %12 %int_3 -%55 = OpLoad %v2float %53 -OpStore %56 %55 -%57 = OpFunctionCall %float %cross_length_2d_ff2f2 %52 %56 -%58 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_1 -OpStore %58 %57 -OpReturn -OpFunctionEnd + %26 = OpFunctionParameter %_ptr_Function_v2float + %27 = OpFunctionParameter %_ptr_Function_v2float + %28 = OpLabel + %30 = OpLoad %v2float %26 + %31 = OpLoad %v2float %27 + %32 = OpCompositeConstruct %mat2v2float %30 %31 + %29 = OpExtInst %float %1 Determinant %32 + OpReturnValue %29 + OpFunctionEnd + %main = OpFunction %void None %34 + %35 = OpLabel + %41 = OpVariable %_ptr_Function_v2float Function + %45 = OpVariable %_ptr_Function_v2float Function + %52 = OpVariable %_ptr_Function_v2float Function + %56 = OpVariable %_ptr_Function_v2float Function + %36 = OpAccessChain %_ptr_Uniform_v2float %12 %int_0 + %40 = OpLoad %v2float %36 + OpStore %41 %40 + %42 = OpAccessChain %_ptr_Uniform_v2float %12 %int_1 + %44 = OpLoad %v2float %42 + OpStore %45 %44 + %46 = OpFunctionCall %float %cross_length_2d_hh2h2 %41 %45 + %47 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 + OpStore %47 %46 + %49 = OpAccessChain %_ptr_Uniform_v2float %12 %int_2 + %51 = OpLoad %v2float %49 + OpStore %52 %51 + %53 = OpAccessChain %_ptr_Uniform_v2float %12 %int_3 + %55 = OpLoad %v2float %53 + OpStore %56 %55 + %57 = OpFunctionCall %float %cross_length_2d_ff2f2 %52 %56 + %58 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_1 + OpStore %58 %57 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/intrinsics/CrossNoInline.wgsl b/tests/sksl/intrinsics/CrossNoInline.wgsl new file mode 100644 index 000000000000..ed5c04330dc6 --- /dev/null +++ b/tests/sksl/intrinsics/CrossNoInline.wgsl @@ -0,0 +1,43 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + ah: vec2, + bh: vec2, + af: vec2, + bf: vec2, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn cross_length_2d_ff2f2(_skParam0: vec2, _skParam1: vec2) -> f32 { + let a = _skParam0; + let b = _skParam1; + { + let _skTemp0 = determinant(mat2x2(a[0], a[1], b[0], b[1])); + return _skTemp0; + } +} +fn cross_length_2d_hh2h2(_skParam0: vec2, _skParam1: vec2) -> f32 { + let a = _skParam0; + let b = _skParam1; + { + let _skTemp1 = determinant(mat2x2(a[0], a[1], b[0], b[1])); + return _skTemp1; + } +} +fn main(_stageOut: ptr) { + { + let _skTemp2 = cross_length_2d_hh2h2(_globalUniforms.ah, _globalUniforms.bh); + (*_stageOut).sk_FragColor.x = _skTemp2; + let _skTemp3 = cross_length_2d_ff2f2(_globalUniforms.af, _globalUniforms.bf); + (*_stageOut).sk_FragColor.y = f32(_skTemp3); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(&_stageOut); + return _stageOut; +} diff --git a/tests/sksl/intrinsics/DFdx.asm.frag b/tests/sksl/intrinsics/DFdx.asm.frag index eb5bdb755e07..9b1fb041dcf6 100644 --- a/tests/sksl/intrinsics/DFdx.asm.frag +++ b/tests/sksl/intrinsics/DFdx.asm.frag @@ -1,183 +1,183 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testInputs" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %expected "expected" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %expected RelaxedPrecision -OpDecorate %30 RelaxedPrecision -OpDecorate %35 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %51 RelaxedPrecision -OpDecorate %53 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %63 RelaxedPrecision -OpDecorate %65 RelaxedPrecision -OpDecorate %105 RelaxedPrecision -OpDecorate %108 RelaxedPrecision -OpDecorate %109 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testInputs" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %expected "expected" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %expected RelaxedPrecision + OpDecorate %30 RelaxedPrecision + OpDecorate %35 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %53 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %63 RelaxedPrecision + OpDecorate %65 RelaxedPrecision + OpDecorate %105 RelaxedPrecision + OpDecorate %108 RelaxedPrecision + OpDecorate %109 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float -%28 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 -%false = OpConstantFalse %bool + %28 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%v3bool = OpTypeVector %bool 3 -%v4bool = OpTypeVector %bool 4 -%float_1 = OpConstant %float 1 -%77 = OpConstantComposite %v2float %float_1 %float_1 -%95 = OpConstantComposite %v2float %float_1 %float_0 -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %v3bool = OpTypeVector %bool 3 + %v4bool = OpTypeVector %bool 4 + %float_1 = OpConstant %float 1 + %77 = OpConstantComposite %v2float %float_1 %float_1 + %95 = OpConstantComposite %v2float %float_1 %float_0 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%expected = OpVariable %_ptr_Function_v4float Function -%99 = OpVariable %_ptr_Function_v4float Function -OpStore %expected %28 -%31 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%35 = OpLoad %v4float %31 -%36 = OpCompositeExtract %float %35 0 -%30 = OpDPdx %float %36 -%37 = OpFOrdEqual %bool %30 %float_0 -OpSelectionMerge %39 None -OpBranchConditional %37 %38 %39 -%38 = OpLabel -%41 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%42 = OpLoad %v4float %41 -%43 = OpVectorShuffle %v2float %42 %42 0 1 -%40 = OpDPdx %v2float %43 -%44 = OpVectorShuffle %v2float %28 %28 0 1 -%45 = OpFOrdEqual %v2bool %40 %44 -%47 = OpAll %bool %45 -OpBranch %39 -%39 = OpLabel -%48 = OpPhi %bool %false %25 %47 %38 -OpSelectionMerge %50 None -OpBranchConditional %48 %49 %50 -%49 = OpLabel -%52 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%53 = OpLoad %v4float %52 -%54 = OpVectorShuffle %v3float %53 %53 0 1 2 -%51 = OpDPdx %v3float %54 -%56 = OpVectorShuffle %v3float %28 %28 0 1 2 -%57 = OpFOrdEqual %v3bool %51 %56 -%59 = OpAll %bool %57 -OpBranch %50 -%50 = OpLabel -%60 = OpPhi %bool %false %39 %59 %49 -OpSelectionMerge %62 None -OpBranchConditional %60 %61 %62 -%61 = OpLabel -%64 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%65 = OpLoad %v4float %64 -%63 = OpDPdx %v4float %65 -%66 = OpFOrdEqual %v4bool %63 %28 -%68 = OpAll %bool %66 -OpBranch %62 -%62 = OpLabel -%69 = OpPhi %bool %false %50 %68 %61 -OpSelectionMerge %71 None -OpBranchConditional %69 %70 %71 -%70 = OpLabel -%74 = OpLoad %v2float %24 -%75 = OpVectorShuffle %v2float %74 %74 0 0 -%73 = OpDPdx %v2float %75 -%72 = OpExtInst %v2float %1 FSign %73 -%78 = OpFOrdEqual %v2bool %72 %77 -%79 = OpAll %bool %78 -OpBranch %71 -%71 = OpLabel -%80 = OpPhi %bool %false %62 %79 %70 -OpSelectionMerge %82 None -OpBranchConditional %80 %81 %82 -%81 = OpLabel -%85 = OpLoad %v2float %24 -%86 = OpVectorShuffle %v2float %85 %85 1 1 -%84 = OpDPdx %v2float %86 -%83 = OpExtInst %v2float %1 FSign %84 -%87 = OpFOrdEqual %v2bool %83 %19 -%88 = OpAll %bool %87 -OpBranch %82 -%82 = OpLabel -%89 = OpPhi %bool %false %71 %88 %81 -OpSelectionMerge %91 None -OpBranchConditional %89 %90 %91 -%90 = OpLabel -%94 = OpLoad %v2float %24 -%93 = OpDPdx %v2float %94 -%92 = OpExtInst %v2float %1 FSign %93 -%96 = OpFOrdEqual %v2bool %92 %95 -%97 = OpAll %bool %96 -OpBranch %91 -%91 = OpLabel -%98 = OpPhi %bool %false %82 %97 %90 -OpSelectionMerge %102 None -OpBranchConditional %98 %100 %101 -%100 = OpLabel -%103 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%105 = OpLoad %v4float %103 -OpStore %99 %105 -OpBranch %102 -%101 = OpLabel -%106 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%108 = OpLoad %v4float %106 -OpStore %99 %108 -OpBranch %102 -%102 = OpLabel -%109 = OpLoad %v4float %99 -OpReturnValue %109 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %expected = OpVariable %_ptr_Function_v4float Function + %99 = OpVariable %_ptr_Function_v4float Function + OpStore %expected %28 + %31 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %35 = OpLoad %v4float %31 + %36 = OpCompositeExtract %float %35 0 + %30 = OpDPdx %float %36 + %37 = OpFOrdEqual %bool %30 %float_0 + OpSelectionMerge %39 None + OpBranchConditional %37 %38 %39 + %38 = OpLabel + %41 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %42 = OpLoad %v4float %41 + %43 = OpVectorShuffle %v2float %42 %42 0 1 + %40 = OpDPdx %v2float %43 + %44 = OpVectorShuffle %v2float %28 %28 0 1 + %45 = OpFOrdEqual %v2bool %40 %44 + %47 = OpAll %bool %45 + OpBranch %39 + %39 = OpLabel + %48 = OpPhi %bool %false %25 %47 %38 + OpSelectionMerge %50 None + OpBranchConditional %48 %49 %50 + %49 = OpLabel + %52 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %53 = OpLoad %v4float %52 + %54 = OpVectorShuffle %v3float %53 %53 0 1 2 + %51 = OpDPdx %v3float %54 + %56 = OpVectorShuffle %v3float %28 %28 0 1 2 + %57 = OpFOrdEqual %v3bool %51 %56 + %59 = OpAll %bool %57 + OpBranch %50 + %50 = OpLabel + %60 = OpPhi %bool %false %39 %59 %49 + OpSelectionMerge %62 None + OpBranchConditional %60 %61 %62 + %61 = OpLabel + %64 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %65 = OpLoad %v4float %64 + %63 = OpDPdx %v4float %65 + %66 = OpFOrdEqual %v4bool %63 %28 + %68 = OpAll %bool %66 + OpBranch %62 + %62 = OpLabel + %69 = OpPhi %bool %false %50 %68 %61 + OpSelectionMerge %71 None + OpBranchConditional %69 %70 %71 + %70 = OpLabel + %74 = OpLoad %v2float %24 + %75 = OpVectorShuffle %v2float %74 %74 0 0 + %73 = OpDPdx %v2float %75 + %72 = OpExtInst %v2float %1 FSign %73 + %78 = OpFOrdEqual %v2bool %72 %77 + %79 = OpAll %bool %78 + OpBranch %71 + %71 = OpLabel + %80 = OpPhi %bool %false %62 %79 %70 + OpSelectionMerge %82 None + OpBranchConditional %80 %81 %82 + %81 = OpLabel + %85 = OpLoad %v2float %24 + %86 = OpVectorShuffle %v2float %85 %85 1 1 + %84 = OpDPdx %v2float %86 + %83 = OpExtInst %v2float %1 FSign %84 + %87 = OpFOrdEqual %v2bool %83 %19 + %88 = OpAll %bool %87 + OpBranch %82 + %82 = OpLabel + %89 = OpPhi %bool %false %71 %88 %81 + OpSelectionMerge %91 None + OpBranchConditional %89 %90 %91 + %90 = OpLabel + %94 = OpLoad %v2float %24 + %93 = OpDPdx %v2float %94 + %92 = OpExtInst %v2float %1 FSign %93 + %96 = OpFOrdEqual %v2bool %92 %95 + %97 = OpAll %bool %96 + OpBranch %91 + %91 = OpLabel + %98 = OpPhi %bool %false %82 %97 %90 + OpSelectionMerge %102 None + OpBranchConditional %98 %100 %101 + %100 = OpLabel + %103 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %105 = OpLoad %v4float %103 + OpStore %99 %105 + OpBranch %102 + %101 = OpLabel + %106 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %108 = OpLoad %v4float %106 + OpStore %99 %108 + OpBranch %102 + %102 = OpLabel + %109 = OpLoad %v4float %99 + OpReturnValue %109 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/DFdx.wgsl b/tests/sksl/intrinsics/DFdx.wgsl new file mode 100644 index 000000000000..d307d44cac7c --- /dev/null +++ b/tests/sksl/intrinsics/DFdx.wgsl @@ -0,0 +1,36 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + testInputs: vec4, + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var expected: vec4 = vec4(0.0); + let _skTemp0 = dpdx(_globalUniforms.testInputs.x); + let _skTemp1 = dpdx(_globalUniforms.testInputs.xy); + let _skTemp2 = dpdx(_globalUniforms.testInputs.xyz); + let _skTemp3 = dpdx(_globalUniforms.testInputs); + let _skTemp4 = dpdx(coords.xx); + let _skTemp5 = sign(_skTemp4); + let _skTemp6 = dpdx(coords.yy); + let _skTemp7 = sign(_skTemp6); + let _skTemp8 = dpdx(coords); + let _skTemp9 = sign(_skTemp8); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((_skTemp0 == expected.x) && all(_skTemp1 == expected.xy)) && all(_skTemp2 == expected.xyz)) && all(_skTemp3 == expected)) && all(_skTemp5 == vec2(1.0))) && all(_skTemp7 == vec2(0.0))) && all(_skTemp9 == vec2(1.0, 0.0)))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/intrinsics/DFdy.asm.frag b/tests/sksl/intrinsics/DFdy.asm.frag index 94feb71fa252..2dc636820d3d 100644 --- a/tests/sksl/intrinsics/DFdy.asm.frag +++ b/tests/sksl/intrinsics/DFdy.asm.frag @@ -1,215 +1,215 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testInputs" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpMemberName %_UniformBuffer 3 "u_skRTFlip" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %expected "expected" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 3 Offset 16384 -OpDecorate %_UniformBuffer Block -OpDecorate %11 Binding 0 -OpDecorate %11 DescriptorSet 0 -OpDecorate %expected RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %49 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %55 RelaxedPrecision -OpDecorate %64 RelaxedPrecision -OpDecorate %65 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -OpDecorate %71 RelaxedPrecision -OpDecorate %80 RelaxedPrecision -OpDecorate %84 RelaxedPrecision -OpDecorate %136 RelaxedPrecision -OpDecorate %139 RelaxedPrecision -OpDecorate %140 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testInputs" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpMemberName %_UniformBuffer 3 "u_skRTFlip" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %expected "expected" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 3 Offset 16384 + OpDecorate %_UniformBuffer Block + OpDecorate %11 Binding 0 + OpDecorate %11 DescriptorSet 0 + OpDecorate %expected RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %49 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %55 RelaxedPrecision + OpDecorate %64 RelaxedPrecision + OpDecorate %65 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %71 RelaxedPrecision + OpDecorate %80 RelaxedPrecision + OpDecorate %84 RelaxedPrecision + OpDecorate %136 RelaxedPrecision + OpDecorate %139 RelaxedPrecision + OpDecorate %140 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%v2float = OpTypeVector %float 2 + %v2float = OpTypeVector %float 2 %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %v2float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%17 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%20 = OpConstantComposite %v2float %float_0 %float_0 + %11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %17 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %20 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%24 = OpTypeFunction %v4float %_ptr_Function_v2float + %24 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float -%29 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 -%false = OpConstantFalse %bool + %29 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_3 = OpConstant %int 3 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_3 = OpConstant %int 3 %_ptr_Uniform_v2float = OpTypePointer Uniform %v2float -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%v3bool = OpTypeVector %bool 3 -%v4bool = OpTypeVector %bool 4 -%float_1 = OpConstant %float 1 -%113 = OpConstantComposite %v2float %float_1 %float_1 -%126 = OpConstantComposite %v2float %float_0 %float_1 -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %v3bool = OpTypeVector %bool 3 + %v4bool = OpTypeVector %bool 4 + %float_1 = OpConstant %float 1 + %113 = OpConstantComposite %v2float %float_1 %float_1 + %126 = OpConstantComposite %v2float %float_0 %float_1 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %17 -%18 = OpLabel -%21 = OpVariable %_ptr_Function_v2float Function -OpStore %21 %20 -%23 = OpFunctionCall %v4float %main %21 -OpStore %sk_FragColor %23 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %24 -%25 = OpFunctionParameter %_ptr_Function_v2float -%26 = OpLabel -%expected = OpVariable %_ptr_Function_v4float Function -%130 = OpVariable %_ptr_Function_v4float Function -OpStore %expected %29 -%32 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 -%36 = OpLoad %v4float %32 -%37 = OpCompositeExtract %float %36 0 -%31 = OpDPdy %float %37 -%39 = OpAccessChain %_ptr_Uniform_v2float %11 %int_3 -%41 = OpLoad %v2float %39 -%42 = OpCompositeExtract %float %41 1 -%43 = OpFMul %float %31 %42 -%44 = OpFOrdEqual %bool %43 %float_0 -OpSelectionMerge %46 None -OpBranchConditional %44 %45 %46 -%45 = OpLabel -%48 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 -%49 = OpLoad %v4float %48 -%50 = OpVectorShuffle %v2float %49 %49 0 1 -%47 = OpDPdy %v2float %50 -%51 = OpAccessChain %_ptr_Uniform_v2float %11 %int_3 -%52 = OpLoad %v2float %51 -%53 = OpVectorShuffle %v2float %52 %52 1 1 -%54 = OpFMul %v2float %47 %53 -%55 = OpVectorShuffle %v2float %29 %29 0 1 -%56 = OpFOrdEqual %v2bool %54 %55 -%58 = OpAll %bool %56 -OpBranch %46 -%46 = OpLabel -%59 = OpPhi %bool %false %26 %58 %45 -OpSelectionMerge %61 None -OpBranchConditional %59 %60 %61 -%60 = OpLabel -%63 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 -%64 = OpLoad %v4float %63 -%65 = OpVectorShuffle %v3float %64 %64 0 1 2 -%62 = OpDPdy %v3float %65 -%67 = OpAccessChain %_ptr_Uniform_v2float %11 %int_3 -%68 = OpLoad %v2float %67 -%69 = OpVectorShuffle %v3float %68 %68 1 1 1 -%70 = OpFMul %v3float %62 %69 -%71 = OpVectorShuffle %v3float %29 %29 0 1 2 -%72 = OpFOrdEqual %v3bool %70 %71 -%74 = OpAll %bool %72 -OpBranch %61 -%61 = OpLabel -%75 = OpPhi %bool %false %46 %74 %60 -OpSelectionMerge %77 None -OpBranchConditional %75 %76 %77 -%76 = OpLabel -%79 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 -%80 = OpLoad %v4float %79 -%78 = OpDPdy %v4float %80 -%81 = OpAccessChain %_ptr_Uniform_v2float %11 %int_3 -%82 = OpLoad %v2float %81 -%83 = OpVectorShuffle %v4float %82 %82 1 1 1 1 -%84 = OpFMul %v4float %78 %83 -%85 = OpFOrdEqual %v4bool %84 %29 -%87 = OpAll %bool %85 -OpBranch %77 -%77 = OpLabel -%88 = OpPhi %bool %false %61 %87 %76 -OpSelectionMerge %90 None -OpBranchConditional %88 %89 %90 -%89 = OpLabel -%93 = OpLoad %v2float %25 -%94 = OpVectorShuffle %v2float %93 %93 0 0 -%92 = OpDPdy %v2float %94 -%95 = OpAccessChain %_ptr_Uniform_v2float %11 %int_3 -%96 = OpLoad %v2float %95 -%97 = OpVectorShuffle %v2float %96 %96 1 1 -%98 = OpFMul %v2float %92 %97 -%91 = OpExtInst %v2float %1 FSign %98 -%99 = OpFOrdEqual %v2bool %91 %20 -%100 = OpAll %bool %99 -OpBranch %90 -%90 = OpLabel -%101 = OpPhi %bool %false %77 %100 %89 -OpSelectionMerge %103 None -OpBranchConditional %101 %102 %103 -%102 = OpLabel -%106 = OpLoad %v2float %25 -%107 = OpVectorShuffle %v2float %106 %106 1 1 -%105 = OpDPdy %v2float %107 -%108 = OpAccessChain %_ptr_Uniform_v2float %11 %int_3 -%109 = OpLoad %v2float %108 -%110 = OpVectorShuffle %v2float %109 %109 1 1 -%111 = OpFMul %v2float %105 %110 -%104 = OpExtInst %v2float %1 FSign %111 -%114 = OpFOrdEqual %v2bool %104 %113 -%115 = OpAll %bool %114 -OpBranch %103 -%103 = OpLabel -%116 = OpPhi %bool %false %90 %115 %102 -OpSelectionMerge %118 None -OpBranchConditional %116 %117 %118 -%117 = OpLabel -%121 = OpLoad %v2float %25 -%120 = OpDPdy %v2float %121 -%122 = OpAccessChain %_ptr_Uniform_v2float %11 %int_3 -%123 = OpLoad %v2float %122 -%124 = OpVectorShuffle %v2float %123 %123 1 1 -%125 = OpFMul %v2float %120 %124 -%119 = OpExtInst %v2float %1 FSign %125 -%127 = OpFOrdEqual %v2bool %119 %126 -%128 = OpAll %bool %127 -OpBranch %118 -%118 = OpLabel -%129 = OpPhi %bool %false %103 %128 %117 -OpSelectionMerge %133 None -OpBranchConditional %129 %131 %132 -%131 = OpLabel -%134 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 -%136 = OpLoad %v4float %134 -OpStore %130 %136 -OpBranch %133 -%132 = OpLabel -%137 = OpAccessChain %_ptr_Uniform_v4float %11 %int_2 -%139 = OpLoad %v4float %137 -OpStore %130 %139 -OpBranch %133 -%133 = OpLabel -%140 = OpLoad %v4float %130 -OpReturnValue %140 -OpFunctionEnd + %18 = OpLabel + %21 = OpVariable %_ptr_Function_v2float Function + OpStore %21 %20 + %23 = OpFunctionCall %v4float %main %21 + OpStore %sk_FragColor %23 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %24 + %25 = OpFunctionParameter %_ptr_Function_v2float + %26 = OpLabel + %expected = OpVariable %_ptr_Function_v4float Function + %130 = OpVariable %_ptr_Function_v4float Function + OpStore %expected %29 + %32 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 + %36 = OpLoad %v4float %32 + %37 = OpCompositeExtract %float %36 0 + %31 = OpDPdy %float %37 + %39 = OpAccessChain %_ptr_Uniform_v2float %11 %int_3 + %41 = OpLoad %v2float %39 + %42 = OpCompositeExtract %float %41 1 + %43 = OpFMul %float %31 %42 + %44 = OpFOrdEqual %bool %43 %float_0 + OpSelectionMerge %46 None + OpBranchConditional %44 %45 %46 + %45 = OpLabel + %48 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 + %49 = OpLoad %v4float %48 + %50 = OpVectorShuffle %v2float %49 %49 0 1 + %47 = OpDPdy %v2float %50 + %51 = OpAccessChain %_ptr_Uniform_v2float %11 %int_3 + %52 = OpLoad %v2float %51 + %53 = OpVectorShuffle %v2float %52 %52 1 1 + %54 = OpFMul %v2float %47 %53 + %55 = OpVectorShuffle %v2float %29 %29 0 1 + %56 = OpFOrdEqual %v2bool %54 %55 + %58 = OpAll %bool %56 + OpBranch %46 + %46 = OpLabel + %59 = OpPhi %bool %false %26 %58 %45 + OpSelectionMerge %61 None + OpBranchConditional %59 %60 %61 + %60 = OpLabel + %63 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 + %64 = OpLoad %v4float %63 + %65 = OpVectorShuffle %v3float %64 %64 0 1 2 + %62 = OpDPdy %v3float %65 + %67 = OpAccessChain %_ptr_Uniform_v2float %11 %int_3 + %68 = OpLoad %v2float %67 + %69 = OpVectorShuffle %v3float %68 %68 1 1 1 + %70 = OpFMul %v3float %62 %69 + %71 = OpVectorShuffle %v3float %29 %29 0 1 2 + %72 = OpFOrdEqual %v3bool %70 %71 + %74 = OpAll %bool %72 + OpBranch %61 + %61 = OpLabel + %75 = OpPhi %bool %false %46 %74 %60 + OpSelectionMerge %77 None + OpBranchConditional %75 %76 %77 + %76 = OpLabel + %79 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 + %80 = OpLoad %v4float %79 + %78 = OpDPdy %v4float %80 + %81 = OpAccessChain %_ptr_Uniform_v2float %11 %int_3 + %82 = OpLoad %v2float %81 + %83 = OpVectorShuffle %v4float %82 %82 1 1 1 1 + %84 = OpFMul %v4float %78 %83 + %85 = OpFOrdEqual %v4bool %84 %29 + %87 = OpAll %bool %85 + OpBranch %77 + %77 = OpLabel + %88 = OpPhi %bool %false %61 %87 %76 + OpSelectionMerge %90 None + OpBranchConditional %88 %89 %90 + %89 = OpLabel + %93 = OpLoad %v2float %25 + %94 = OpVectorShuffle %v2float %93 %93 0 0 + %92 = OpDPdy %v2float %94 + %95 = OpAccessChain %_ptr_Uniform_v2float %11 %int_3 + %96 = OpLoad %v2float %95 + %97 = OpVectorShuffle %v2float %96 %96 1 1 + %98 = OpFMul %v2float %92 %97 + %91 = OpExtInst %v2float %1 FSign %98 + %99 = OpFOrdEqual %v2bool %91 %20 + %100 = OpAll %bool %99 + OpBranch %90 + %90 = OpLabel + %101 = OpPhi %bool %false %77 %100 %89 + OpSelectionMerge %103 None + OpBranchConditional %101 %102 %103 + %102 = OpLabel + %106 = OpLoad %v2float %25 + %107 = OpVectorShuffle %v2float %106 %106 1 1 + %105 = OpDPdy %v2float %107 + %108 = OpAccessChain %_ptr_Uniform_v2float %11 %int_3 + %109 = OpLoad %v2float %108 + %110 = OpVectorShuffle %v2float %109 %109 1 1 + %111 = OpFMul %v2float %105 %110 + %104 = OpExtInst %v2float %1 FSign %111 + %114 = OpFOrdEqual %v2bool %104 %113 + %115 = OpAll %bool %114 + OpBranch %103 + %103 = OpLabel + %116 = OpPhi %bool %false %90 %115 %102 + OpSelectionMerge %118 None + OpBranchConditional %116 %117 %118 + %117 = OpLabel + %121 = OpLoad %v2float %25 + %120 = OpDPdy %v2float %121 + %122 = OpAccessChain %_ptr_Uniform_v2float %11 %int_3 + %123 = OpLoad %v2float %122 + %124 = OpVectorShuffle %v2float %123 %123 1 1 + %125 = OpFMul %v2float %120 %124 + %119 = OpExtInst %v2float %1 FSign %125 + %127 = OpFOrdEqual %v2bool %119 %126 + %128 = OpAll %bool %127 + OpBranch %118 + %118 = OpLabel + %129 = OpPhi %bool %false %103 %128 %117 + OpSelectionMerge %133 None + OpBranchConditional %129 %131 %132 + %131 = OpLabel + %134 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 + %136 = OpLoad %v4float %134 + OpStore %130 %136 + OpBranch %133 + %132 = OpLabel + %137 = OpAccessChain %_ptr_Uniform_v4float %11 %int_2 + %139 = OpLoad %v4float %137 + OpStore %130 %139 + OpBranch %133 + %133 = OpLabel + %140 = OpLoad %v4float %130 + OpReturnValue %140 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/DFdy.wgsl b/tests/sksl/intrinsics/DFdy.wgsl new file mode 100644 index 000000000000..32b5325f241e --- /dev/null +++ b/tests/sksl/intrinsics/DFdy.wgsl @@ -0,0 +1,36 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + testInputs: vec4, + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var expected: vec4 = vec4(0.0); + let _skTemp0 = dpdy(_globalUniforms.testInputs.x); + let _skTemp1 = dpdy(_globalUniforms.testInputs.xy); + let _skTemp2 = dpdy(_globalUniforms.testInputs.xyz); + let _skTemp3 = dpdy(_globalUniforms.testInputs); + let _skTemp4 = dpdy(coords.xx); + let _skTemp5 = sign(_skTemp4); + let _skTemp6 = dpdy(coords.yy); + let _skTemp7 = sign(_skTemp6); + let _skTemp8 = dpdy(coords); + let _skTemp9 = sign(_skTemp8); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((_skTemp0 == expected.x) && all(_skTemp1 == expected.xy)) && all(_skTemp2 == expected.xyz)) && all(_skTemp3 == expected)) && all(_skTemp5 == vec2(0.0))) && all(_skTemp7 == vec2(1.0))) && all(_skTemp9 == vec2(0.0, 1.0)))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/intrinsics/DFdyNoRTFlip.asm.frag b/tests/sksl/intrinsics/DFdyNoRTFlip.asm.frag index 642d5777d8af..41c861d31efd 100644 --- a/tests/sksl/intrinsics/DFdyNoRTFlip.asm.frag +++ b/tests/sksl/intrinsics/DFdyNoRTFlip.asm.frag @@ -1,179 +1,179 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testInputs" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %expected "expected" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %expected RelaxedPrecision -OpDecorate %35 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %53 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %65 RelaxedPrecision -OpDecorate %105 RelaxedPrecision -OpDecorate %108 RelaxedPrecision -OpDecorate %109 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testInputs" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %expected "expected" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %expected RelaxedPrecision + OpDecorate %35 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %53 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %65 RelaxedPrecision + OpDecorate %105 RelaxedPrecision + OpDecorate %108 RelaxedPrecision + OpDecorate %109 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float -%28 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 -%false = OpConstantFalse %bool + %28 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%v3bool = OpTypeVector %bool 3 -%v4bool = OpTypeVector %bool 4 -%float_1 = OpConstant %float 1 -%86 = OpConstantComposite %v2float %float_1 %float_1 -%95 = OpConstantComposite %v2float %float_0 %float_1 -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %v3bool = OpTypeVector %bool 3 + %v4bool = OpTypeVector %bool 4 + %float_1 = OpConstant %float 1 + %86 = OpConstantComposite %v2float %float_1 %float_1 + %95 = OpConstantComposite %v2float %float_0 %float_1 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%expected = OpVariable %_ptr_Function_v4float Function -%99 = OpVariable %_ptr_Function_v4float Function -OpStore %expected %28 -%31 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%35 = OpLoad %v4float %31 -%36 = OpCompositeExtract %float %35 0 -%30 = OpDPdy %float %36 -%37 = OpFOrdEqual %bool %30 %float_0 -OpSelectionMerge %39 None -OpBranchConditional %37 %38 %39 -%38 = OpLabel -%41 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%42 = OpLoad %v4float %41 -%43 = OpVectorShuffle %v2float %42 %42 0 1 -%40 = OpDPdy %v2float %43 -%44 = OpVectorShuffle %v2float %28 %28 0 1 -%45 = OpFOrdEqual %v2bool %40 %44 -%47 = OpAll %bool %45 -OpBranch %39 -%39 = OpLabel -%48 = OpPhi %bool %false %25 %47 %38 -OpSelectionMerge %50 None -OpBranchConditional %48 %49 %50 -%49 = OpLabel -%52 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%53 = OpLoad %v4float %52 -%54 = OpVectorShuffle %v3float %53 %53 0 1 2 -%51 = OpDPdy %v3float %54 -%56 = OpVectorShuffle %v3float %28 %28 0 1 2 -%57 = OpFOrdEqual %v3bool %51 %56 -%59 = OpAll %bool %57 -OpBranch %50 -%50 = OpLabel -%60 = OpPhi %bool %false %39 %59 %49 -OpSelectionMerge %62 None -OpBranchConditional %60 %61 %62 -%61 = OpLabel -%64 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%65 = OpLoad %v4float %64 -%63 = OpDPdy %v4float %65 -%66 = OpFOrdEqual %v4bool %63 %28 -%68 = OpAll %bool %66 -OpBranch %62 -%62 = OpLabel -%69 = OpPhi %bool %false %50 %68 %61 -OpSelectionMerge %71 None -OpBranchConditional %69 %70 %71 -%70 = OpLabel -%74 = OpLoad %v2float %24 -%75 = OpVectorShuffle %v2float %74 %74 0 0 -%73 = OpDPdy %v2float %75 -%72 = OpExtInst %v2float %1 FSign %73 -%76 = OpFOrdEqual %v2bool %72 %19 -%77 = OpAll %bool %76 -OpBranch %71 -%71 = OpLabel -%78 = OpPhi %bool %false %62 %77 %70 -OpSelectionMerge %80 None -OpBranchConditional %78 %79 %80 -%79 = OpLabel -%83 = OpLoad %v2float %24 -%84 = OpVectorShuffle %v2float %83 %83 1 1 -%82 = OpDPdy %v2float %84 -%81 = OpExtInst %v2float %1 FSign %82 -%87 = OpFOrdEqual %v2bool %81 %86 -%88 = OpAll %bool %87 -OpBranch %80 -%80 = OpLabel -%89 = OpPhi %bool %false %71 %88 %79 -OpSelectionMerge %91 None -OpBranchConditional %89 %90 %91 -%90 = OpLabel -%94 = OpLoad %v2float %24 -%93 = OpDPdy %v2float %94 -%92 = OpExtInst %v2float %1 FSign %93 -%96 = OpFOrdEqual %v2bool %92 %95 -%97 = OpAll %bool %96 -OpBranch %91 -%91 = OpLabel -%98 = OpPhi %bool %false %80 %97 %90 -OpSelectionMerge %102 None -OpBranchConditional %98 %100 %101 -%100 = OpLabel -%103 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%105 = OpLoad %v4float %103 -OpStore %99 %105 -OpBranch %102 -%101 = OpLabel -%106 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%108 = OpLoad %v4float %106 -OpStore %99 %108 -OpBranch %102 -%102 = OpLabel -%109 = OpLoad %v4float %99 -OpReturnValue %109 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %expected = OpVariable %_ptr_Function_v4float Function + %99 = OpVariable %_ptr_Function_v4float Function + OpStore %expected %28 + %31 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %35 = OpLoad %v4float %31 + %36 = OpCompositeExtract %float %35 0 + %30 = OpDPdy %float %36 + %37 = OpFOrdEqual %bool %30 %float_0 + OpSelectionMerge %39 None + OpBranchConditional %37 %38 %39 + %38 = OpLabel + %41 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %42 = OpLoad %v4float %41 + %43 = OpVectorShuffle %v2float %42 %42 0 1 + %40 = OpDPdy %v2float %43 + %44 = OpVectorShuffle %v2float %28 %28 0 1 + %45 = OpFOrdEqual %v2bool %40 %44 + %47 = OpAll %bool %45 + OpBranch %39 + %39 = OpLabel + %48 = OpPhi %bool %false %25 %47 %38 + OpSelectionMerge %50 None + OpBranchConditional %48 %49 %50 + %49 = OpLabel + %52 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %53 = OpLoad %v4float %52 + %54 = OpVectorShuffle %v3float %53 %53 0 1 2 + %51 = OpDPdy %v3float %54 + %56 = OpVectorShuffle %v3float %28 %28 0 1 2 + %57 = OpFOrdEqual %v3bool %51 %56 + %59 = OpAll %bool %57 + OpBranch %50 + %50 = OpLabel + %60 = OpPhi %bool %false %39 %59 %49 + OpSelectionMerge %62 None + OpBranchConditional %60 %61 %62 + %61 = OpLabel + %64 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %65 = OpLoad %v4float %64 + %63 = OpDPdy %v4float %65 + %66 = OpFOrdEqual %v4bool %63 %28 + %68 = OpAll %bool %66 + OpBranch %62 + %62 = OpLabel + %69 = OpPhi %bool %false %50 %68 %61 + OpSelectionMerge %71 None + OpBranchConditional %69 %70 %71 + %70 = OpLabel + %74 = OpLoad %v2float %24 + %75 = OpVectorShuffle %v2float %74 %74 0 0 + %73 = OpDPdy %v2float %75 + %72 = OpExtInst %v2float %1 FSign %73 + %76 = OpFOrdEqual %v2bool %72 %19 + %77 = OpAll %bool %76 + OpBranch %71 + %71 = OpLabel + %78 = OpPhi %bool %false %62 %77 %70 + OpSelectionMerge %80 None + OpBranchConditional %78 %79 %80 + %79 = OpLabel + %83 = OpLoad %v2float %24 + %84 = OpVectorShuffle %v2float %83 %83 1 1 + %82 = OpDPdy %v2float %84 + %81 = OpExtInst %v2float %1 FSign %82 + %87 = OpFOrdEqual %v2bool %81 %86 + %88 = OpAll %bool %87 + OpBranch %80 + %80 = OpLabel + %89 = OpPhi %bool %false %71 %88 %79 + OpSelectionMerge %91 None + OpBranchConditional %89 %90 %91 + %90 = OpLabel + %94 = OpLoad %v2float %24 + %93 = OpDPdy %v2float %94 + %92 = OpExtInst %v2float %1 FSign %93 + %96 = OpFOrdEqual %v2bool %92 %95 + %97 = OpAll %bool %96 + OpBranch %91 + %91 = OpLabel + %98 = OpPhi %bool %false %80 %97 %90 + OpSelectionMerge %102 None + OpBranchConditional %98 %100 %101 + %100 = OpLabel + %103 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %105 = OpLoad %v4float %103 + OpStore %99 %105 + OpBranch %102 + %101 = OpLabel + %106 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %108 = OpLoad %v4float %106 + OpStore %99 %108 + OpBranch %102 + %102 = OpLabel + %109 = OpLoad %v4float %99 + OpReturnValue %109 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/DFdyNoRTFlip.wgsl b/tests/sksl/intrinsics/DFdyNoRTFlip.wgsl new file mode 100644 index 000000000000..32b5325f241e --- /dev/null +++ b/tests/sksl/intrinsics/DFdyNoRTFlip.wgsl @@ -0,0 +1,36 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + testInputs: vec4, + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var expected: vec4 = vec4(0.0); + let _skTemp0 = dpdy(_globalUniforms.testInputs.x); + let _skTemp1 = dpdy(_globalUniforms.testInputs.xy); + let _skTemp2 = dpdy(_globalUniforms.testInputs.xyz); + let _skTemp3 = dpdy(_globalUniforms.testInputs); + let _skTemp4 = dpdy(coords.xx); + let _skTemp5 = sign(_skTemp4); + let _skTemp6 = dpdy(coords.yy); + let _skTemp7 = sign(_skTemp6); + let _skTemp8 = dpdy(coords); + let _skTemp9 = sign(_skTemp8); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((_skTemp0 == expected.x) && all(_skTemp1 == expected.xy)) && all(_skTemp2 == expected.xyz)) && all(_skTemp3 == expected)) && all(_skTemp5 == vec2(0.0))) && all(_skTemp7 == vec2(1.0))) && all(_skTemp9 == vec2(0.0, 1.0)))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/intrinsics/Degrees.asm.frag b/tests/sksl/intrinsics/Degrees.asm.frag index cf3329526188..0283d7aa53e1 100644 --- a/tests/sksl/intrinsics/Degrees.asm.frag +++ b/tests/sksl/intrinsics/Degrees.asm.frag @@ -1,142 +1,142 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testInputs" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %90 RelaxedPrecision -OpDecorate %93 RelaxedPrecision -OpDecorate %94 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testInputs" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %90 RelaxedPrecision + OpDecorate %93 RelaxedPrecision + OpDecorate %94 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%false = OpConstantFalse %bool + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 %float_n71_6197281 = OpConstant %float -71.6197281 %float_0_0500000007 = OpConstant %float 0.0500000007 -%48 = OpConstantComposite %v2float %float_n71_6197281 %float_0 -%50 = OpConstantComposite %v2float %float_0_0500000007 %float_0_0500000007 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 + %48 = OpConstantComposite %v2float %float_n71_6197281 %float_0 + %50 = OpConstantComposite %v2float %float_0_0500000007 %float_0_0500000007 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 %float_42_9718361 = OpConstant %float 42.9718361 -%64 = OpConstantComposite %v3float %float_n71_6197281 %float_0 %float_42_9718361 -%66 = OpConstantComposite %v3float %float_0_0500000007 %float_0_0500000007 %float_0_0500000007 -%v3bool = OpTypeVector %bool 3 + %64 = OpConstantComposite %v3float %float_n71_6197281 %float_0 %float_42_9718361 + %66 = OpConstantComposite %v3float %float_0_0500000007 %float_0_0500000007 %float_0_0500000007 + %v3bool = OpTypeVector %bool 3 %float_128_915512 = OpConstant %float 128.915512 -%78 = OpConstantComposite %v4float %float_n71_6197281 %float_0 %float_42_9718361 %float_128_915512 -%80 = OpConstantComposite %v4float %float_0_0500000007 %float_0_0500000007 %float_0_0500000007 %float_0_0500000007 -%v4bool = OpTypeVector %bool 4 + %78 = OpConstantComposite %v4float %float_n71_6197281 %float_0 %float_42_9718361 %float_128_915512 + %80 = OpConstantComposite %v4float %float_0_0500000007 %float_0_0500000007 %float_0_0500000007 %float_0_0500000007 + %v4bool = OpTypeVector %bool 4 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%83 = OpVariable %_ptr_Function_v4float Function -%29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%33 = OpLoad %v4float %29 -%34 = OpCompositeExtract %float %33 0 -%28 = OpExtInst %float %1 Degrees %34 -%36 = OpFSub %float %28 %float_n71_6197281 -%27 = OpExtInst %float %1 FAbs %36 -%38 = OpFOrdLessThan %bool %27 %float_0_0500000007 -OpSelectionMerge %40 None -OpBranchConditional %38 %39 %40 -%39 = OpLabel -%45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%46 = OpLoad %v4float %45 -%47 = OpVectorShuffle %v2float %46 %46 0 1 -%44 = OpExtInst %v2float %1 Degrees %47 -%49 = OpFSub %v2float %44 %48 -%43 = OpExtInst %v2float %1 FAbs %49 -%42 = OpFOrdLessThan %v2bool %43 %50 -%41 = OpAll %bool %42 -OpBranch %40 -%40 = OpLabel -%52 = OpPhi %bool %false %25 %41 %39 -OpSelectionMerge %54 None -OpBranchConditional %52 %53 %54 -%53 = OpLabel -%59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%60 = OpLoad %v4float %59 -%61 = OpVectorShuffle %v3float %60 %60 0 1 2 -%58 = OpExtInst %v3float %1 Degrees %61 -%65 = OpFSub %v3float %58 %64 -%57 = OpExtInst %v3float %1 FAbs %65 -%56 = OpFOrdLessThan %v3bool %57 %66 -%55 = OpAll %bool %56 -OpBranch %54 -%54 = OpLabel -%68 = OpPhi %bool %false %40 %55 %53 -OpSelectionMerge %70 None -OpBranchConditional %68 %69 %70 -%69 = OpLabel -%75 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%76 = OpLoad %v4float %75 -%74 = OpExtInst %v4float %1 Degrees %76 -%79 = OpFSub %v4float %74 %78 -%73 = OpExtInst %v4float %1 FAbs %79 -%72 = OpFOrdLessThan %v4bool %73 %80 -%71 = OpAll %bool %72 -OpBranch %70 -%70 = OpLabel -%82 = OpPhi %bool %false %54 %71 %69 -OpSelectionMerge %87 None -OpBranchConditional %82 %85 %86 -%85 = OpLabel -%88 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%90 = OpLoad %v4float %88 -OpStore %83 %90 -OpBranch %87 -%86 = OpLabel -%91 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%93 = OpLoad %v4float %91 -OpStore %83 %93 -OpBranch %87 -%87 = OpLabel -%94 = OpLoad %v4float %83 -OpReturnValue %94 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %83 = OpVariable %_ptr_Function_v4float Function + %29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %33 = OpLoad %v4float %29 + %34 = OpCompositeExtract %float %33 0 + %28 = OpExtInst %float %1 Degrees %34 + %36 = OpFSub %float %28 %float_n71_6197281 + %27 = OpExtInst %float %1 FAbs %36 + %38 = OpFOrdLessThan %bool %27 %float_0_0500000007 + OpSelectionMerge %40 None + OpBranchConditional %38 %39 %40 + %39 = OpLabel + %45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %46 = OpLoad %v4float %45 + %47 = OpVectorShuffle %v2float %46 %46 0 1 + %44 = OpExtInst %v2float %1 Degrees %47 + %49 = OpFSub %v2float %44 %48 + %43 = OpExtInst %v2float %1 FAbs %49 + %42 = OpFOrdLessThan %v2bool %43 %50 + %41 = OpAll %bool %42 + OpBranch %40 + %40 = OpLabel + %52 = OpPhi %bool %false %25 %41 %39 + OpSelectionMerge %54 None + OpBranchConditional %52 %53 %54 + %53 = OpLabel + %59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %60 = OpLoad %v4float %59 + %61 = OpVectorShuffle %v3float %60 %60 0 1 2 + %58 = OpExtInst %v3float %1 Degrees %61 + %65 = OpFSub %v3float %58 %64 + %57 = OpExtInst %v3float %1 FAbs %65 + %56 = OpFOrdLessThan %v3bool %57 %66 + %55 = OpAll %bool %56 + OpBranch %54 + %54 = OpLabel + %68 = OpPhi %bool %false %40 %55 %53 + OpSelectionMerge %70 None + OpBranchConditional %68 %69 %70 + %69 = OpLabel + %75 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %76 = OpLoad %v4float %75 + %74 = OpExtInst %v4float %1 Degrees %76 + %79 = OpFSub %v4float %74 %78 + %73 = OpExtInst %v4float %1 FAbs %79 + %72 = OpFOrdLessThan %v4bool %73 %80 + %71 = OpAll %bool %72 + OpBranch %70 + %70 = OpLabel + %82 = OpPhi %bool %false %54 %71 %69 + OpSelectionMerge %87 None + OpBranchConditional %82 %85 %86 + %85 = OpLabel + %88 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %90 = OpLoad %v4float %88 + OpStore %83 %90 + OpBranch %87 + %86 = OpLabel + %91 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %93 = OpLoad %v4float %91 + OpStore %83 %93 + OpBranch %87 + %87 = OpLabel + %94 = OpLoad %v4float %83 + OpReturnValue %94 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Degrees.skrp b/tests/sksl/intrinsics/Degrees.skrp index 9e2ba281ea48..e7358ae87e88 100644 --- a/tests/sksl/intrinsics/Degrees.skrp +++ b/tests/sksl/intrinsics/Degrees.skrp @@ -1,12 +1,14 @@ +44 instructions + [immutable slots] -expected(0) = 0xC28F3D4D (-71.61973) -expected(1) = 0 -expected(2) = 0x422BE329 (42.9718361) -expected(3) = 0x4300EA5F (128.915512) -allowedDelta(0) = 0x3D4CCCCD (0.05) -allowedDelta(1) = 0x3D4CCCCD (0.05) -allowedDelta(2) = 0x3D4CCCCD (0.05) -allowedDelta(3) = 0x3D4CCCCD (0.05) +i0 = 0xC28F3D4D (-71.61973) +i1 = 0 +i2 = 0x422BE329 (42.9718361) +i3 = 0x4300EA5F (128.915512) +i4 = 0x3D4CCCCD (0.05) +i5 = 0x3D4CCCCD (0.05) +i6 = 0x3D4CCCCD (0.05) +i7 = 0x3D4CCCCD (0.05) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -18,8 +20,7 @@ cmplt_imm_float $4 = lessThan($4, 0x3D4CCCCD (0.05)) copy_2_uniforms $5..6 = testInputs(0..1) splat_2_constants $7..8 = 0x42652EE1 (57.29578) mul_2_floats $5..6 *= $7..8 -copy_constant $7 = 0xC28F3D4D (-71.61973) -copy_constant $8 = 0 +copy_2_immutables_unmasked $7..8 = i0..1 [0xC28F3D4D (-71.61973), 0] sub_2_floats $5..6 -= $7..8 bitwise_and_imm_2_ints $5..6 &= 0x7FFFFFFF splat_2_constants $7..8 = 0x3D4CCCCD (0.05) @@ -29,9 +30,7 @@ bitwise_and_int $4 &= $5 copy_3_uniforms $5..7 = testInputs(0..2) splat_3_constants $8..10 = 0x42652EE1 (57.29578) mul_3_floats $5..7 *= $8..10 -copy_constant $8 = 0xC28F3D4D (-71.61973) -copy_constant $9 = 0 -copy_constant $10 = 0x422BE329 (42.9718361) +copy_3_immutables_unmasked $8..10 = i0..2 [0xC28F3D4D (-71.61973), 0, 0x422BE329 (42.9718361)] sub_3_floats $5..7 -= $8..10 bitwise_and_imm_3_ints $5..7 &= 0x7FFFFFFF splat_3_constants $8..10 = 0x3D4CCCCD (0.05) @@ -42,7 +41,7 @@ bitwise_and_int $4 &= $5 copy_4_uniforms $5..8 = testInputs splat_4_constants $9..12 = 0x42652EE1 (57.29578) mul_4_floats $5..8 *= $9..12 -copy_4_slots_unmasked $9..12 = expected +copy_4_immutables_unmasked $9..12 = i0..3 [0xC28F3D4D (-71.61973), 0, 0x422BE329 (42.9718361), 0x4300EA5F (128.915512)] sub_4_floats $5..8 -= $9..12 bitwise_and_imm_4_ints $5..8 &= 0x7FFFFFFF splat_4_constants $9..12 = 0x3D4CCCCD (0.05) @@ -50,9 +49,9 @@ cmplt_4_floats $5..8 = lessThan($5..8, $9..12) bitwise_and_2_ints $5..6 &= $7..8 bitwise_and_int $5 &= $6 bitwise_and_int $4 &= $5 -branch_if_no_active_lanes_eq branch +3 (label 0 at #46) if no lanes of $4 == 0xFFFFFFFF +branch_if_no_active_lanes_eq branch +3 (label 0 at #43) if no lanes of $4 == 0xFFFFFFFF copy_4_uniforms $0..3 = colorGreen -jump jump +3 (label 1 at #48) +jump jump +3 (label 1 at #45) label label 0 copy_4_uniforms $0..3 = colorRed label label 0x00000001 diff --git a/tests/sksl/intrinsics/Degrees.wgsl b/tests/sksl/intrinsics/Degrees.wgsl index a1cf340b2540..6b13c7e5acb3 100644 --- a/tests/sksl/intrinsics/Degrees.wgsl +++ b/tests/sksl/intrinsics/Degrees.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -27,7 +28,7 @@ fn main(_skParam0: vec2) -> vec4 { let _skTemp8 = degrees(_globalUniforms.testInputs); let _skTemp9 = abs(_skTemp8 - expected); let _skTemp10 = all(_skTemp9 < allowedDelta); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((_skTemp1 < 0.05 && _skTemp4) && _skTemp7) && _skTemp10)); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((_skTemp1 < 0.05) && _skTemp4) && _skTemp7) && _skTemp10)); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/intrinsics/Determinant.asm.frag b/tests/sksl/intrinsics/Determinant.asm.frag index 6850a5eda208..899ee0456d24 100644 --- a/tests/sksl/intrinsics/Determinant.asm.frag +++ b/tests/sksl/intrinsics/Determinant.asm.frag @@ -1,88 +1,88 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testMatrix2x2" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 ColMajor -OpMemberDecorate %_UniformBuffer 0 MatrixStride 16 -OpMemberDecorate %_UniformBuffer 1 Offset 32 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 48 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %43 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testMatrix2x2" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 ColMajor + OpMemberDecorate %_UniformBuffer 0 MatrixStride 16 + OpMemberDecorate %_UniformBuffer 1 Offset 32 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 48 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %43 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%v2float = OpTypeVector %float 2 + %v2float = OpTypeVector %float 2 %mat2v2float = OpTypeMatrix %v2float 2 %_UniformBuffer = OpTypeStruct %mat2v2float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%17 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%20 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %17 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %20 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%24 = OpTypeFunction %v4float %_ptr_Function_v2float + %24 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Uniform_mat2v2float = OpTypePointer Uniform %mat2v2float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%float_n2 = OpConstant %float -2 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %float_n2 = OpConstant %float -2 %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %17 -%18 = OpLabel -%21 = OpVariable %_ptr_Function_v2float Function -OpStore %21 %20 -%23 = OpFunctionCall %v4float %main %21 -OpStore %sk_FragColor %23 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %24 -%25 = OpFunctionParameter %_ptr_Function_v2float -%26 = OpLabel -%35 = OpVariable %_ptr_Function_v4float Function -%28 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_0 -%32 = OpLoad %mat2v2float %28 -%27 = OpExtInst %float %1 Determinant %32 -%34 = OpFOrdEqual %bool %27 %float_n2 -OpSelectionMerge %39 None -OpBranchConditional %34 %37 %38 -%37 = OpLabel -%40 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%43 = OpLoad %v4float %40 -OpStore %35 %43 -OpBranch %39 -%38 = OpLabel -%44 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%46 = OpLoad %v4float %44 -OpStore %35 %46 -OpBranch %39 -%39 = OpLabel -%47 = OpLoad %v4float %35 -OpReturnValue %47 -OpFunctionEnd + %18 = OpLabel + %21 = OpVariable %_ptr_Function_v2float Function + OpStore %21 %20 + %23 = OpFunctionCall %v4float %main %21 + OpStore %sk_FragColor %23 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %24 + %25 = OpFunctionParameter %_ptr_Function_v2float + %26 = OpLabel + %35 = OpVariable %_ptr_Function_v4float Function + %28 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_0 + %32 = OpLoad %mat2v2float %28 + %27 = OpExtInst %float %1 Determinant %32 + %34 = OpFOrdEqual %bool %27 %float_n2 + OpSelectionMerge %39 None + OpBranchConditional %34 %37 %38 + %37 = OpLabel + %40 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %43 = OpLoad %v4float %40 + OpStore %35 %43 + OpBranch %39 + %38 = OpLabel + %44 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %46 = OpLoad %v4float %44 + OpStore %35 %46 + OpBranch %39 + %39 = OpLabel + %47 = OpLoad %v4float %35 + OpReturnValue %47 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Determinant.wgsl b/tests/sksl/intrinsics/Determinant.wgsl new file mode 100644 index 000000000000..9a17d3304f25 --- /dev/null +++ b/tests/sksl/intrinsics/Determinant.wgsl @@ -0,0 +1,26 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + testMatrix2x2: mat2x2, + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + let _skTemp0 = determinant(_globalUniforms.testMatrix2x2); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((_skTemp0 == -2.0))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/intrinsics/Distance.asm.frag b/tests/sksl/intrinsics/Distance.asm.frag index aff1dcfddff8..6f9996af20c2 100644 --- a/tests/sksl/intrinsics/Distance.asm.frag +++ b/tests/sksl/intrinsics/Distance.asm.frag @@ -1,185 +1,185 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "pos1" -OpMemberName %_UniformBuffer 1 "pos2" -OpMemberName %_UniformBuffer 2 "colorGreen" -OpMemberName %_UniformBuffer 3 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %expected "expected" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 3 Offset 48 -OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %expected RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %39 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %49 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %53 RelaxedPrecision -OpDecorate %58 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %64 RelaxedPrecision -OpDecorate %65 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %74 RelaxedPrecision -OpDecorate %96 RelaxedPrecision -OpDecorate %99 RelaxedPrecision -OpDecorate %100 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "pos1" + OpMemberName %_UniformBuffer 1 "pos2" + OpMemberName %_UniformBuffer 2 "colorGreen" + OpMemberName %_UniformBuffer 3 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %expected "expected" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 3 Offset 48 + OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %expected RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %49 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %53 RelaxedPrecision + OpDecorate %58 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %64 RelaxedPrecision + OpDecorate %65 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %74 RelaxedPrecision + OpDecorate %96 RelaxedPrecision + OpDecorate %99 RelaxedPrecision + OpDecorate %100 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float -%float_3 = OpConstant %float 3 -%float_5 = OpConstant %float 5 -%float_13 = OpConstant %float 13 -%31 = OpConstantComposite %v4float %float_3 %float_3 %float_5 %float_13 -%false = OpConstantFalse %bool + %float_3 = OpConstant %float 3 + %float_5 = OpConstant %float 5 + %float_13 = OpConstant %float 13 + %31 = OpConstantComposite %v4float %float_3 %float_3 %float_5 %float_13 + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%v3float = OpTypeVector %float 3 -%true = OpConstantTrue %bool -%int_2 = OpConstant %int 2 -%int_3 = OpConstant %int 3 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %v3float = OpTypeVector %float 3 + %true = OpConstantTrue %bool + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%expected = OpVariable %_ptr_Function_v4float Function -%90 = OpVariable %_ptr_Function_v4float Function -OpStore %expected %31 -%34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%38 = OpLoad %v4float %34 -%39 = OpCompositeExtract %float %38 0 -%40 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%42 = OpLoad %v4float %40 -%43 = OpCompositeExtract %float %42 0 -%33 = OpExtInst %float %1 Distance %39 %43 -%44 = OpFOrdEqual %bool %33 %float_3 -OpSelectionMerge %46 None -OpBranchConditional %44 %45 %46 -%45 = OpLabel -%48 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%49 = OpLoad %v4float %48 -%50 = OpVectorShuffle %v2float %49 %49 0 1 -%51 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%52 = OpLoad %v4float %51 -%53 = OpVectorShuffle %v2float %52 %52 0 1 -%47 = OpExtInst %float %1 Distance %50 %53 -%54 = OpFOrdEqual %bool %47 %float_3 -OpBranch %46 -%46 = OpLabel -%55 = OpPhi %bool %false %25 %54 %45 -OpSelectionMerge %57 None -OpBranchConditional %55 %56 %57 -%56 = OpLabel -%59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%60 = OpLoad %v4float %59 -%61 = OpVectorShuffle %v3float %60 %60 0 1 2 -%63 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%64 = OpLoad %v4float %63 -%65 = OpVectorShuffle %v3float %64 %64 0 1 2 -%58 = OpExtInst %float %1 Distance %61 %65 -%66 = OpFOrdEqual %bool %58 %float_5 -OpBranch %57 -%57 = OpLabel -%67 = OpPhi %bool %false %46 %66 %56 -OpSelectionMerge %69 None -OpBranchConditional %67 %68 %69 -%68 = OpLabel -%71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%72 = OpLoad %v4float %71 -%73 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%74 = OpLoad %v4float %73 -%70 = OpExtInst %float %1 Distance %72 %74 -%75 = OpFOrdEqual %bool %70 %float_13 -OpBranch %69 -%69 = OpLabel -%76 = OpPhi %bool %false %57 %75 %68 -OpSelectionMerge %78 None -OpBranchConditional %76 %77 %78 -%77 = OpLabel -OpBranch %78 -%78 = OpLabel -%80 = OpPhi %bool %false %69 %true %77 -OpSelectionMerge %82 None -OpBranchConditional %80 %81 %82 -%81 = OpLabel -OpBranch %82 -%82 = OpLabel -%83 = OpPhi %bool %false %78 %true %81 -OpSelectionMerge %85 None -OpBranchConditional %83 %84 %85 -%84 = OpLabel -OpBranch %85 -%85 = OpLabel -%86 = OpPhi %bool %false %82 %true %84 -OpSelectionMerge %88 None -OpBranchConditional %86 %87 %88 -%87 = OpLabel -OpBranch %88 -%88 = OpLabel -%89 = OpPhi %bool %false %85 %true %87 -OpSelectionMerge %93 None -OpBranchConditional %89 %91 %92 -%91 = OpLabel -%94 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%96 = OpLoad %v4float %94 -OpStore %90 %96 -OpBranch %93 -%92 = OpLabel -%97 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%99 = OpLoad %v4float %97 -OpStore %90 %99 -OpBranch %93 -%93 = OpLabel -%100 = OpLoad %v4float %90 -OpReturnValue %100 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %expected = OpVariable %_ptr_Function_v4float Function + %90 = OpVariable %_ptr_Function_v4float Function + OpStore %expected %31 + %34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %38 = OpLoad %v4float %34 + %39 = OpCompositeExtract %float %38 0 + %40 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %42 = OpLoad %v4float %40 + %43 = OpCompositeExtract %float %42 0 + %33 = OpExtInst %float %1 Distance %39 %43 + %44 = OpFOrdEqual %bool %33 %float_3 + OpSelectionMerge %46 None + OpBranchConditional %44 %45 %46 + %45 = OpLabel + %48 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %49 = OpLoad %v4float %48 + %50 = OpVectorShuffle %v2float %49 %49 0 1 + %51 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %52 = OpLoad %v4float %51 + %53 = OpVectorShuffle %v2float %52 %52 0 1 + %47 = OpExtInst %float %1 Distance %50 %53 + %54 = OpFOrdEqual %bool %47 %float_3 + OpBranch %46 + %46 = OpLabel + %55 = OpPhi %bool %false %25 %54 %45 + OpSelectionMerge %57 None + OpBranchConditional %55 %56 %57 + %56 = OpLabel + %59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %60 = OpLoad %v4float %59 + %61 = OpVectorShuffle %v3float %60 %60 0 1 2 + %63 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %64 = OpLoad %v4float %63 + %65 = OpVectorShuffle %v3float %64 %64 0 1 2 + %58 = OpExtInst %float %1 Distance %61 %65 + %66 = OpFOrdEqual %bool %58 %float_5 + OpBranch %57 + %57 = OpLabel + %67 = OpPhi %bool %false %46 %66 %56 + OpSelectionMerge %69 None + OpBranchConditional %67 %68 %69 + %68 = OpLabel + %71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %72 = OpLoad %v4float %71 + %73 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %74 = OpLoad %v4float %73 + %70 = OpExtInst %float %1 Distance %72 %74 + %75 = OpFOrdEqual %bool %70 %float_13 + OpBranch %69 + %69 = OpLabel + %76 = OpPhi %bool %false %57 %75 %68 + OpSelectionMerge %78 None + OpBranchConditional %76 %77 %78 + %77 = OpLabel + OpBranch %78 + %78 = OpLabel + %80 = OpPhi %bool %false %69 %true %77 + OpSelectionMerge %82 None + OpBranchConditional %80 %81 %82 + %81 = OpLabel + OpBranch %82 + %82 = OpLabel + %83 = OpPhi %bool %false %78 %true %81 + OpSelectionMerge %85 None + OpBranchConditional %83 %84 %85 + %84 = OpLabel + OpBranch %85 + %85 = OpLabel + %86 = OpPhi %bool %false %82 %true %84 + OpSelectionMerge %88 None + OpBranchConditional %86 %87 %88 + %87 = OpLabel + OpBranch %88 + %88 = OpLabel + %89 = OpPhi %bool %false %85 %true %87 + OpSelectionMerge %93 None + OpBranchConditional %89 %91 %92 + %91 = OpLabel + %94 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %96 = OpLoad %v4float %94 + OpStore %90 %96 + OpBranch %93 + %92 = OpLabel + %97 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %99 = OpLoad %v4float %97 + OpStore %90 %99 + OpBranch %93 + %93 = OpLabel + %100 = OpLoad %v4float %90 + OpReturnValue %100 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Distance.skrp b/tests/sksl/intrinsics/Distance.skrp index ec5a85dedcfa..5f9ee6d62293 100644 --- a/tests/sksl/intrinsics/Distance.skrp +++ b/tests/sksl/intrinsics/Distance.skrp @@ -1,8 +1,10 @@ +48 instructions + [immutable slots] -expected(0) = 0x40400000 (3.0) -expected(1) = 0x40400000 (3.0) -expected(2) = 0x40A00000 (5.0) -expected(3) = 0x41500000 (13.0) +i0 = 0x40400000 (3.0) +i1 = 0x40400000 (3.0) +i2 = 0x40A00000 (5.0) +i3 = 0x41500000 (13.0) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -10,16 +12,14 @@ copy_uniform $0 = pos1(0) copy_uniform $1 = pos2(0) sub_float $0 -= $1 bitwise_and_imm_int $0 &= 0x7FFFFFFF -copy_slot_unmasked $1 = expected(0) -cmpeq_float $0 = equal($0, $1) +cmpeq_imm_float $0 = equal($0, 0x40400000 (3.0)) copy_2_uniforms $1..2 = pos1(0..1) copy_2_uniforms $3..4 = pos2(0..1) sub_2_floats $1..2 -= $3..4 copy_2_slots_unmasked $3..4 = $1..2 dot_2_floats $1 = dot($1..2, $3..4) sqrt_float $1 = sqrt($1) -copy_slot_unmasked $2 = expected(1) -cmpeq_float $1 = equal($1, $2) +cmpeq_imm_float $1 = equal($1, 0x40400000 (3.0)) bitwise_and_int $0 &= $1 copy_3_uniforms $1..3 = pos1(0..2) copy_3_uniforms $4..6 = pos2(0..2) @@ -27,8 +27,7 @@ sub_3_floats $1..3 -= $4..6 copy_3_slots_unmasked $4..6 = $1..3 dot_3_floats $1 = dot($1..3, $4..6) sqrt_float $1 = sqrt($1) -copy_slot_unmasked $2 = expected(2) -cmpeq_float $1 = equal($1, $2) +cmpeq_imm_float $1 = equal($1, 0x40A00000 (5.0)) bitwise_and_int $0 &= $1 copy_4_uniforms $1..4 = pos1 copy_4_uniforms $5..8 = pos2 @@ -36,19 +35,18 @@ sub_4_floats $1..4 -= $5..8 copy_4_slots_unmasked $5..8 = $1..4 dot_4_floats $1 = dot($1..4, $5..8) sqrt_float $1 = sqrt($1) -copy_slot_unmasked $2 = expected(3) -cmpeq_float $1 = equal($1, $2) +cmpeq_imm_float $1 = equal($1, 0x41500000 (13.0)) bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expected(0) +copy_constant $1 = 0x40400000 (3.0) cmpeq_imm_float $1 = equal($1, 0x40400000 (3.0)) bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expected(1) +copy_constant $1 = 0x40400000 (3.0) cmpeq_imm_float $1 = equal($1, 0x40400000 (3.0)) bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expected(2) +copy_constant $1 = 0x40A00000 (5.0) cmpeq_imm_float $1 = equal($1, 0x40A00000 (5.0)) bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expected(3) +copy_constant $1 = 0x41500000 (13.0) cmpeq_imm_float $1 = equal($1, 0x41500000 (13.0)) bitwise_and_int $0 &= $1 swizzle_4 $0..3 = ($0..3).xxxx diff --git a/tests/sksl/intrinsics/Distance.wgsl b/tests/sksl/intrinsics/Distance.wgsl new file mode 100644 index 000000000000..eeb1866b80d8 --- /dev/null +++ b/tests/sksl/intrinsics/Distance.wgsl @@ -0,0 +1,31 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + pos1: vec4, + pos2: vec4, + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var expected: vec4 = vec4(3.0, 3.0, 5.0, 13.0); + let _skTemp0 = distance(_globalUniforms.pos1.x, _globalUniforms.pos2.x); + let _skTemp1 = distance(_globalUniforms.pos1.xy, _globalUniforms.pos2.xy); + let _skTemp2 = distance(_globalUniforms.pos1.xyz, _globalUniforms.pos2.xyz); + let _skTemp3 = distance(_globalUniforms.pos1, _globalUniforms.pos2); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((_skTemp0 == expected.x) && (_skTemp1 == expected.y)) && (_skTemp2 == expected.z)) && (_skTemp3 == expected.w)) && (3.0 == expected.x)) && (3.0 == expected.y)) && (5.0 == expected.z)) && (13.0 == expected.w))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/intrinsics/Dot.asm.frag b/tests/sksl/intrinsics/Dot.asm.frag index 12db6ff7731d..ff31ad4e2b7b 100644 --- a/tests/sksl/intrinsics/Dot.asm.frag +++ b/tests/sksl/intrinsics/Dot.asm.frag @@ -1,162 +1,162 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testMatrix4x4" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %inputA "inputA" -OpName %inputB "inputB" -OpName %expected "expected" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 ColMajor -OpMemberDecorate %_UniformBuffer 0 MatrixStride 16 -OpMemberDecorate %_UniformBuffer 1 Offset 64 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 80 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %90 RelaxedPrecision -OpDecorate %93 RelaxedPrecision -OpDecorate %94 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testMatrix4x4" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %inputA "inputA" + OpName %inputB "inputB" + OpName %expected "expected" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 ColMajor + OpMemberDecorate %_UniformBuffer 0 MatrixStride 16 + OpMemberDecorate %_UniformBuffer 1 Offset 64 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 80 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %90 RelaxedPrecision + OpDecorate %93 RelaxedPrecision + OpDecorate %94 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %mat4v4float = OpTypeMatrix %v4float 4 %_UniformBuffer = OpTypeStruct %mat4v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%16 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%20 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %16 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %20 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%24 = OpTypeFunction %v4float %_ptr_Function_v2float + %24 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_mat4v4float = OpTypePointer Uniform %mat4v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_1 = OpConstant %int 1 -%float_5 = OpConstant %float 5 -%float_17 = OpConstant %float 17 -%float_38 = OpConstant %float 38 -%float_70 = OpConstant %float 70 -%46 = OpConstantComposite %v4float %float_5 %float_17 %float_38 %float_70 -%false = OpConstantFalse %bool -%v3float = OpTypeVector %float 3 -%true = OpConstantTrue %bool -%int_2 = OpConstant %int 2 + %int_1 = OpConstant %int 1 + %float_5 = OpConstant %float 5 + %float_17 = OpConstant %float 17 + %float_38 = OpConstant %float 38 + %float_70 = OpConstant %float 70 + %46 = OpConstantComposite %v4float %float_5 %float_17 %float_38 %float_70 + %false = OpConstantFalse %bool + %v3float = OpTypeVector %float 3 + %true = OpConstantTrue %bool + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %16 -%17 = OpLabel -%21 = OpVariable %_ptr_Function_v2float Function -OpStore %21 %20 -%23 = OpFunctionCall %v4float %main %21 -OpStore %sk_FragColor %23 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %24 -%25 = OpFunctionParameter %_ptr_Function_v2float -%26 = OpLabel -%inputA = OpVariable %_ptr_Function_v4float Function -%inputB = OpVariable %_ptr_Function_v4float Function -%expected = OpVariable %_ptr_Function_v4float Function -%85 = OpVariable %_ptr_Function_v4float Function -%29 = OpAccessChain %_ptr_Uniform_mat4v4float %10 %int_0 -%33 = OpAccessChain %_ptr_Uniform_v4float %29 %int_0 -%35 = OpLoad %v4float %33 -OpStore %inputA %35 -%37 = OpAccessChain %_ptr_Uniform_mat4v4float %10 %int_0 -%39 = OpAccessChain %_ptr_Uniform_v4float %37 %int_1 -%40 = OpLoad %v4float %39 -OpStore %inputB %40 -OpStore %expected %46 -%49 = OpCompositeExtract %float %35 0 -%50 = OpCompositeExtract %float %40 0 -%48 = OpFMul %float %49 %50 -%51 = OpFOrdEqual %bool %48 %float_5 -OpSelectionMerge %53 None -OpBranchConditional %51 %52 %53 -%52 = OpLabel -%55 = OpVectorShuffle %v2float %35 %35 0 1 -%56 = OpVectorShuffle %v2float %40 %40 0 1 -%54 = OpDot %float %55 %56 -%57 = OpFOrdEqual %bool %54 %float_17 -OpBranch %53 -%53 = OpLabel -%58 = OpPhi %bool %false %26 %57 %52 -OpSelectionMerge %60 None -OpBranchConditional %58 %59 %60 -%59 = OpLabel -%62 = OpVectorShuffle %v3float %35 %35 0 1 2 -%64 = OpVectorShuffle %v3float %40 %40 0 1 2 -%61 = OpDot %float %62 %64 -%65 = OpFOrdEqual %bool %61 %float_38 -OpBranch %60 -%60 = OpLabel -%66 = OpPhi %bool %false %53 %65 %59 -OpSelectionMerge %68 None -OpBranchConditional %66 %67 %68 -%67 = OpLabel -%69 = OpDot %float %35 %40 -%70 = OpFOrdEqual %bool %69 %float_70 -OpBranch %68 -%68 = OpLabel -%71 = OpPhi %bool %false %60 %70 %67 -OpSelectionMerge %73 None -OpBranchConditional %71 %72 %73 -%72 = OpLabel -OpBranch %73 -%73 = OpLabel -%75 = OpPhi %bool %false %68 %true %72 -OpSelectionMerge %77 None -OpBranchConditional %75 %76 %77 -%76 = OpLabel -OpBranch %77 -%77 = OpLabel -%78 = OpPhi %bool %false %73 %true %76 -OpSelectionMerge %80 None -OpBranchConditional %78 %79 %80 -%79 = OpLabel -OpBranch %80 -%80 = OpLabel -%81 = OpPhi %bool %false %77 %true %79 -OpSelectionMerge %83 None -OpBranchConditional %81 %82 %83 -%82 = OpLabel -OpBranch %83 -%83 = OpLabel -%84 = OpPhi %bool %false %80 %true %82 -OpSelectionMerge %88 None -OpBranchConditional %84 %86 %87 -%86 = OpLabel -%89 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%90 = OpLoad %v4float %89 -OpStore %85 %90 -OpBranch %88 -%87 = OpLabel -%91 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%93 = OpLoad %v4float %91 -OpStore %85 %93 -OpBranch %88 -%88 = OpLabel -%94 = OpLoad %v4float %85 -OpReturnValue %94 -OpFunctionEnd + %17 = OpLabel + %21 = OpVariable %_ptr_Function_v2float Function + OpStore %21 %20 + %23 = OpFunctionCall %v4float %main %21 + OpStore %sk_FragColor %23 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %24 + %25 = OpFunctionParameter %_ptr_Function_v2float + %26 = OpLabel + %inputA = OpVariable %_ptr_Function_v4float Function + %inputB = OpVariable %_ptr_Function_v4float Function + %expected = OpVariable %_ptr_Function_v4float Function + %85 = OpVariable %_ptr_Function_v4float Function + %29 = OpAccessChain %_ptr_Uniform_mat4v4float %10 %int_0 + %33 = OpAccessChain %_ptr_Uniform_v4float %29 %int_0 + %35 = OpLoad %v4float %33 + OpStore %inputA %35 + %37 = OpAccessChain %_ptr_Uniform_mat4v4float %10 %int_0 + %39 = OpAccessChain %_ptr_Uniform_v4float %37 %int_1 + %40 = OpLoad %v4float %39 + OpStore %inputB %40 + OpStore %expected %46 + %49 = OpCompositeExtract %float %35 0 + %50 = OpCompositeExtract %float %40 0 + %48 = OpFMul %float %49 %50 + %51 = OpFOrdEqual %bool %48 %float_5 + OpSelectionMerge %53 None + OpBranchConditional %51 %52 %53 + %52 = OpLabel + %55 = OpVectorShuffle %v2float %35 %35 0 1 + %56 = OpVectorShuffle %v2float %40 %40 0 1 + %54 = OpDot %float %55 %56 + %57 = OpFOrdEqual %bool %54 %float_17 + OpBranch %53 + %53 = OpLabel + %58 = OpPhi %bool %false %26 %57 %52 + OpSelectionMerge %60 None + OpBranchConditional %58 %59 %60 + %59 = OpLabel + %62 = OpVectorShuffle %v3float %35 %35 0 1 2 + %64 = OpVectorShuffle %v3float %40 %40 0 1 2 + %61 = OpDot %float %62 %64 + %65 = OpFOrdEqual %bool %61 %float_38 + OpBranch %60 + %60 = OpLabel + %66 = OpPhi %bool %false %53 %65 %59 + OpSelectionMerge %68 None + OpBranchConditional %66 %67 %68 + %67 = OpLabel + %69 = OpDot %float %35 %40 + %70 = OpFOrdEqual %bool %69 %float_70 + OpBranch %68 + %68 = OpLabel + %71 = OpPhi %bool %false %60 %70 %67 + OpSelectionMerge %73 None + OpBranchConditional %71 %72 %73 + %72 = OpLabel + OpBranch %73 + %73 = OpLabel + %75 = OpPhi %bool %false %68 %true %72 + OpSelectionMerge %77 None + OpBranchConditional %75 %76 %77 + %76 = OpLabel + OpBranch %77 + %77 = OpLabel + %78 = OpPhi %bool %false %73 %true %76 + OpSelectionMerge %80 None + OpBranchConditional %78 %79 %80 + %79 = OpLabel + OpBranch %80 + %80 = OpLabel + %81 = OpPhi %bool %false %77 %true %79 + OpSelectionMerge %83 None + OpBranchConditional %81 %82 %83 + %82 = OpLabel + OpBranch %83 + %83 = OpLabel + %84 = OpPhi %bool %false %80 %true %82 + OpSelectionMerge %88 None + OpBranchConditional %84 %86 %87 + %86 = OpLabel + %89 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %90 = OpLoad %v4float %89 + OpStore %85 %90 + OpBranch %88 + %87 = OpLabel + %91 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %93 = OpLoad %v4float %91 + OpStore %85 %93 + OpBranch %88 + %88 = OpLabel + %94 = OpLoad %v4float %85 + OpReturnValue %94 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Dot.skrp b/tests/sksl/intrinsics/Dot.skrp index 489288835878..e92567e7bada 100644 --- a/tests/sksl/intrinsics/Dot.skrp +++ b/tests/sksl/intrinsics/Dot.skrp @@ -1,8 +1,10 @@ +40 instructions + [immutable slots] -expected(0) = 0x40A00000 (5.0) -expected(1) = 0x41880000 (17.0) -expected(2) = 0x42180000 (38.0) -expected(3) = 0x428C0000 (70.0) +i0 = 0x40A00000 (5.0) +i1 = 0x41880000 (17.0) +i2 = 0x42180000 (38.0) +i3 = 0x428C0000 (70.0) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -11,36 +13,32 @@ copy_4_uniforms inputB = testMatrix4x4(4..7) copy_slot_unmasked $0 = inputA(0) copy_slot_unmasked $1 = inputB(0) mul_float $0 *= $1 -copy_slot_unmasked $1 = expected(0) -cmpeq_float $0 = equal($0, $1) +cmpeq_imm_float $0 = equal($0, 0x40A00000 (5.0)) copy_2_slots_unmasked $1..2 = inputA(0..1) copy_2_slots_unmasked $3..4 = inputB(0..1) dot_2_floats $1 = dot($1..2, $3..4) -copy_slot_unmasked $2 = expected(1) -cmpeq_float $1 = equal($1, $2) +cmpeq_imm_float $1 = equal($1, 0x41880000 (17.0)) bitwise_and_int $0 &= $1 copy_3_slots_unmasked $1..3 = inputA(0..2) copy_3_slots_unmasked $4..6 = inputB(0..2) dot_3_floats $1 = dot($1..3, $4..6) -copy_slot_unmasked $2 = expected(2) -cmpeq_float $1 = equal($1, $2) +cmpeq_imm_float $1 = equal($1, 0x42180000 (38.0)) bitwise_and_int $0 &= $1 copy_4_slots_unmasked $1..4 = inputA copy_4_slots_unmasked $5..8 = inputB dot_4_floats $1 = dot($1..4, $5..8) -copy_slot_unmasked $2 = expected(3) -cmpeq_float $1 = equal($1, $2) +cmpeq_imm_float $1 = equal($1, 0x428C0000 (70.0)) bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expected(0) +copy_constant $1 = 0x40A00000 (5.0) cmpeq_imm_float $1 = equal($1, 0x40A00000 (5.0)) bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expected(1) +copy_constant $1 = 0x41880000 (17.0) cmpeq_imm_float $1 = equal($1, 0x41880000 (17.0)) bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expected(2) +copy_constant $1 = 0x42180000 (38.0) cmpeq_imm_float $1 = equal($1, 0x42180000 (38.0)) bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expected(3) +copy_constant $1 = 0x428C0000 (70.0) cmpeq_imm_float $1 = equal($1, 0x428C0000 (70.0)) bitwise_and_int $0 &= $1 swizzle_4 $0..3 = ($0..3).xxxx diff --git a/tests/sksl/intrinsics/Dot.wgsl b/tests/sksl/intrinsics/Dot.wgsl index 1cecb855ce1d..bb3bda59c921 100644 --- a/tests/sksl/intrinsics/Dot.wgsl +++ b/tests/sksl/intrinsics/Dot.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -20,7 +21,7 @@ fn main(_skParam0: vec2) -> vec4 { let _skTemp0 = dot(inputA.xy, inputB.xy); let _skTemp1 = dot(inputA.xyz, inputB.xyz); let _skTemp2 = dot(inputA, inputB); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((inputA.x * inputB.x == expected.x && _skTemp0 == expected.y) && _skTemp1 == expected.z) && _skTemp2 == expected.w) && 5.0 == expected.x) && 17.0 == expected.y) && 38.0 == expected.z) && 70.0 == expected.w)); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((((inputA.x * inputB.x) == expected.x) && (_skTemp0 == expected.y)) && (_skTemp1 == expected.z)) && (_skTemp2 == expected.w)) && (5.0 == expected.x)) && (17.0 == expected.y)) && (38.0 == expected.z)) && (70.0 == expected.w))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/intrinsics/Equal.asm.frag b/tests/sksl/intrinsics/Equal.asm.frag index 19a61787ef6f..a2bed2068578 100644 --- a/tests/sksl/intrinsics/Equal.asm.frag +++ b/tests/sksl/intrinsics/Equal.asm.frag @@ -1,139 +1,139 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "a" -OpMemberName %_UniformBuffer 1 "b" -OpMemberName %_UniformBuffer 2 "c" -OpMemberName %_UniformBuffer 3 "d" -OpMemberName %_UniformBuffer 4 "e" -OpMemberName %_UniformBuffer 5 "f" -OpName %main "main" -OpName %expectTTFF "expectTTFF" -OpName %expectFFTT "expectFFTT" -OpName %expectTTTT "expectTTTT" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 3 Offset 40 -OpMemberDecorate %_UniformBuffer 4 Offset 48 -OpMemberDecorate %_UniformBuffer 5 Offset 64 -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %34 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %67 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -OpDecorate %74 RelaxedPrecision -OpDecorate %79 RelaxedPrecision -OpDecorate %82 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "a" + OpMemberName %_UniformBuffer 1 "b" + OpMemberName %_UniformBuffer 2 "c" + OpMemberName %_UniformBuffer 3 "d" + OpMemberName %_UniformBuffer 4 "e" + OpMemberName %_UniformBuffer 5 "f" + OpName %main "main" + OpName %expectTTFF "expectTTFF" + OpName %expectFFTT "expectFFTT" + OpName %expectTTTT "expectTTTT" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 3 Offset 40 + OpMemberDecorate %_UniformBuffer 4 Offset 48 + OpMemberDecorate %_UniformBuffer 5 Offset 64 + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %34 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %67 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %74 RelaxedPrecision + OpDecorate %79 RelaxedPrecision + OpDecorate %82 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%uint = OpTypeInt 32 0 -%v2uint = OpTypeVector %uint 2 -%int = OpTypeInt 32 1 -%v3int = OpTypeVector %int 3 + %uint = OpTypeInt 32 0 + %v2uint = OpTypeVector %uint 2 + %int = OpTypeInt 32 1 + %v3int = OpTypeVector %int 3 %_UniformBuffer = OpTypeStruct %v4float %v4float %v2uint %v2uint %v3int %v3int %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%18 = OpTypeFunction %void -%v4bool = OpTypeVector %bool 4 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %18 = OpTypeFunction %void + %v4bool = OpTypeVector %bool 4 %_ptr_Function_v4bool = OpTypePointer Function %v4bool -%true = OpConstantTrue %bool -%false = OpConstantFalse %bool -%25 = OpConstantComposite %v4bool %true %true %false %false -%27 = OpConstantComposite %v4bool %false %false %true %true -%29 = OpConstantComposite %v4bool %true %true %true %true + %true = OpConstantTrue %bool + %false = OpConstantFalse %bool + %25 = OpConstantComposite %v4bool %true %true %false %false + %27 = OpConstantComposite %v4bool %false %false %true %true + %29 = OpConstantComposite %v4bool %true %true %true %true %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 %_ptr_Output_float = OpTypePointer Output %float %_ptr_Uniform_v2uint = OpTypePointer Uniform %v2uint -%int_2 = OpConstant %int 2 -%int_3 = OpConstant %int 3 -%v2bool = OpTypeVector %bool 2 + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 + %v2bool = OpTypeVector %bool 2 %_ptr_Uniform_v3int = OpTypePointer Uniform %v3int -%int_4 = OpConstant %int 4 -%int_5 = OpConstant %int 5 -%v3bool = OpTypeVector %bool 3 -%main = OpFunction %void None %18 -%19 = OpLabel -%expectTTFF = OpVariable %_ptr_Function_v4bool Function -%expectFFTT = OpVariable %_ptr_Function_v4bool Function -%expectTTTT = OpVariable %_ptr_Function_v4bool Function -OpStore %expectTTFF %25 -OpStore %expectFFTT %27 -OpStore %expectTTTT %29 -%31 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%34 = OpLoad %v4float %31 -%35 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%37 = OpLoad %v4float %35 -%30 = OpFOrdEqual %v4bool %34 %37 -%38 = OpCompositeExtract %bool %30 0 -%39 = OpSelect %int %38 %int_1 %int_0 -%40 = OpConvertSToF %float %39 -%41 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 -OpStore %41 %40 -%44 = OpAccessChain %_ptr_Uniform_v2uint %10 %int_2 -%47 = OpLoad %v2uint %44 -%48 = OpAccessChain %_ptr_Uniform_v2uint %10 %int_3 -%50 = OpLoad %v2uint %48 -%43 = OpIEqual %v2bool %47 %50 -%52 = OpCompositeExtract %bool %43 1 -%53 = OpSelect %int %52 %int_1 %int_0 -%54 = OpConvertSToF %float %53 -%55 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_1 -OpStore %55 %54 -%57 = OpAccessChain %_ptr_Uniform_v3int %10 %int_4 -%60 = OpLoad %v3int %57 -%61 = OpAccessChain %_ptr_Uniform_v3int %10 %int_5 -%63 = OpLoad %v3int %61 -%56 = OpIEqual %v3bool %60 %63 -%65 = OpCompositeExtract %bool %56 2 -%66 = OpSelect %int %65 %int_1 %int_0 -%67 = OpConvertSToF %float %66 -%68 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_2 -OpStore %68 %67 -%70 = OpLoad %v4bool %expectTTFF -%69 = OpAny %bool %70 -OpSelectionMerge %72 None -OpBranchConditional %69 %72 %71 -%71 = OpLabel -%74 = OpLoad %v4bool %expectFFTT -%73 = OpAny %bool %74 -OpBranch %72 -%72 = OpLabel -%75 = OpPhi %bool %true %19 %73 %71 -OpSelectionMerge %77 None -OpBranchConditional %75 %77 %76 -%76 = OpLabel -%79 = OpLoad %v4bool %expectTTTT -%78 = OpAny %bool %79 -OpBranch %77 -%77 = OpLabel -%80 = OpPhi %bool %true %72 %78 %76 -%81 = OpSelect %int %80 %int_1 %int_0 -%82 = OpConvertSToF %float %81 -%83 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_3 -OpStore %83 %82 -OpReturn -OpFunctionEnd + %int_4 = OpConstant %int 4 + %int_5 = OpConstant %int 5 + %v3bool = OpTypeVector %bool 3 + %main = OpFunction %void None %18 + %19 = OpLabel + %expectTTFF = OpVariable %_ptr_Function_v4bool Function + %expectFFTT = OpVariable %_ptr_Function_v4bool Function + %expectTTTT = OpVariable %_ptr_Function_v4bool Function + OpStore %expectTTFF %25 + OpStore %expectFFTT %27 + OpStore %expectTTTT %29 + %31 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %34 = OpLoad %v4float %31 + %35 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %37 = OpLoad %v4float %35 + %30 = OpFOrdEqual %v4bool %34 %37 + %38 = OpCompositeExtract %bool %30 0 + %39 = OpSelect %int %38 %int_1 %int_0 + %40 = OpConvertSToF %float %39 + %41 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 + OpStore %41 %40 + %44 = OpAccessChain %_ptr_Uniform_v2uint %10 %int_2 + %47 = OpLoad %v2uint %44 + %48 = OpAccessChain %_ptr_Uniform_v2uint %10 %int_3 + %50 = OpLoad %v2uint %48 + %43 = OpIEqual %v2bool %47 %50 + %52 = OpCompositeExtract %bool %43 1 + %53 = OpSelect %int %52 %int_1 %int_0 + %54 = OpConvertSToF %float %53 + %55 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_1 + OpStore %55 %54 + %57 = OpAccessChain %_ptr_Uniform_v3int %10 %int_4 + %60 = OpLoad %v3int %57 + %61 = OpAccessChain %_ptr_Uniform_v3int %10 %int_5 + %63 = OpLoad %v3int %61 + %56 = OpIEqual %v3bool %60 %63 + %65 = OpCompositeExtract %bool %56 2 + %66 = OpSelect %int %65 %int_1 %int_0 + %67 = OpConvertSToF %float %66 + %68 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_2 + OpStore %68 %67 + %70 = OpLoad %v4bool %expectTTFF + %69 = OpAny %bool %70 + OpSelectionMerge %72 None + OpBranchConditional %69 %72 %71 + %71 = OpLabel + %74 = OpLoad %v4bool %expectFFTT + %73 = OpAny %bool %74 + OpBranch %72 + %72 = OpLabel + %75 = OpPhi %bool %true %19 %73 %71 + OpSelectionMerge %77 None + OpBranchConditional %75 %77 %76 + %76 = OpLabel + %79 = OpLoad %v4bool %expectTTTT + %78 = OpAny %bool %79 + OpBranch %77 + %77 = OpLabel + %80 = OpPhi %bool %true %72 %78 %76 + %81 = OpSelect %int %80 %int_1 %int_0 + %82 = OpConvertSToF %float %81 + %83 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_3 + OpStore %83 %82 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Equal.wgsl b/tests/sksl/intrinsics/Equal.wgsl index 0fc311c065f4..9bb876473eed 100644 --- a/tests/sksl/intrinsics/Equal.wgsl +++ b/tests/sksl/intrinsics/Equal.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/intrinsics/Exp.asm.frag b/tests/sksl/intrinsics/Exp.asm.frag index 0913dbc3f429..5154d33863eb 100644 --- a/tests/sksl/intrinsics/Exp.asm.frag +++ b/tests/sksl/intrinsics/Exp.asm.frag @@ -1,211 +1,211 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "inputVal" -OpMemberName %_UniformBuffer 1 "expected" -OpMemberName %_UniformBuffer 2 "colorGreen" -OpMemberName %_UniformBuffer 3 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 3 Offset 48 -OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %27 RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %82 RelaxedPrecision -OpDecorate %89 RelaxedPrecision -OpDecorate %90 RelaxedPrecision -OpDecorate %98 RelaxedPrecision -OpDecorate %99 RelaxedPrecision -OpDecorate %107 RelaxedPrecision -OpDecorate %118 RelaxedPrecision -OpDecorate %121 RelaxedPrecision -OpDecorate %122 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "inputVal" + OpMemberName %_UniformBuffer 1 "expected" + OpMemberName %_UniformBuffer 2 "colorGreen" + OpMemberName %_UniformBuffer 3 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 3 Offset 48 + OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %27 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %82 RelaxedPrecision + OpDecorate %89 RelaxedPrecision + OpDecorate %90 RelaxedPrecision + OpDecorate %98 RelaxedPrecision + OpDecorate %99 RelaxedPrecision + OpDecorate %107 RelaxedPrecision + OpDecorate %118 RelaxedPrecision + OpDecorate %121 RelaxedPrecision + OpDecorate %122 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%false = OpConstantFalse %bool + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%v3bool = OpTypeVector %bool 3 -%v4bool = OpTypeVector %bool 4 -%float_1 = OpConstant %float 1 -%87 = OpConstantComposite %v2float %float_1 %float_1 -%96 = OpConstantComposite %v3float %float_1 %float_1 %float_1 -%105 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %v3bool = OpTypeVector %bool 3 + %v4bool = OpTypeVector %bool 4 + %float_1 = OpConstant %float 1 + %87 = OpConstantComposite %v2float %float_1 %float_1 + %96 = OpConstantComposite %v3float %float_1 %float_1 %float_1 + %105 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_2 = OpConstant %int 2 -%int_3 = OpConstant %int 3 + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%111 = OpVariable %_ptr_Function_v4float Function -%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %28 -%33 = OpCompositeExtract %float %32 0 -%27 = OpExtInst %float %1 Exp %33 -%34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%36 = OpLoad %v4float %34 -%37 = OpCompositeExtract %float %36 0 -%38 = OpFOrdEqual %bool %27 %37 -OpSelectionMerge %40 None -OpBranchConditional %38 %39 %40 -%39 = OpLabel -%42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%43 = OpLoad %v4float %42 -%44 = OpVectorShuffle %v2float %43 %43 0 1 -%41 = OpExtInst %v2float %1 Exp %44 -%45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%46 = OpLoad %v4float %45 -%47 = OpVectorShuffle %v2float %46 %46 0 1 -%48 = OpFOrdEqual %v2bool %41 %47 -%50 = OpAll %bool %48 -OpBranch %40 -%40 = OpLabel -%51 = OpPhi %bool %false %25 %50 %39 -OpSelectionMerge %53 None -OpBranchConditional %51 %52 %53 -%52 = OpLabel -%55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%56 = OpLoad %v4float %55 -%57 = OpVectorShuffle %v3float %56 %56 0 1 2 -%54 = OpExtInst %v3float %1 Exp %57 -%59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%60 = OpLoad %v4float %59 -%61 = OpVectorShuffle %v3float %60 %60 0 1 2 -%62 = OpFOrdEqual %v3bool %54 %61 -%64 = OpAll %bool %62 -OpBranch %53 -%53 = OpLabel -%65 = OpPhi %bool %false %40 %64 %52 -OpSelectionMerge %67 None -OpBranchConditional %65 %66 %67 -%66 = OpLabel -%69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%70 = OpLoad %v4float %69 -%68 = OpExtInst %v4float %1 Exp %70 -%71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%72 = OpLoad %v4float %71 -%73 = OpFOrdEqual %v4bool %68 %72 -%75 = OpAll %bool %73 -OpBranch %67 -%67 = OpLabel -%76 = OpPhi %bool %false %53 %75 %66 -OpSelectionMerge %78 None -OpBranchConditional %76 %77 %78 -%77 = OpLabel -%80 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%81 = OpLoad %v4float %80 -%82 = OpCompositeExtract %float %81 0 -%83 = OpFOrdEqual %bool %float_1 %82 -OpBranch %78 -%78 = OpLabel -%84 = OpPhi %bool %false %67 %83 %77 -OpSelectionMerge %86 None -OpBranchConditional %84 %85 %86 -%85 = OpLabel -%88 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%89 = OpLoad %v4float %88 -%90 = OpVectorShuffle %v2float %89 %89 0 1 -%91 = OpFOrdEqual %v2bool %87 %90 -%92 = OpAll %bool %91 -OpBranch %86 -%86 = OpLabel -%93 = OpPhi %bool %false %78 %92 %85 -OpSelectionMerge %95 None -OpBranchConditional %93 %94 %95 -%94 = OpLabel -%97 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%98 = OpLoad %v4float %97 -%99 = OpVectorShuffle %v3float %98 %98 0 1 2 -%100 = OpFOrdEqual %v3bool %96 %99 -%101 = OpAll %bool %100 -OpBranch %95 -%95 = OpLabel -%102 = OpPhi %bool %false %86 %101 %94 -OpSelectionMerge %104 None -OpBranchConditional %102 %103 %104 -%103 = OpLabel -%106 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%107 = OpLoad %v4float %106 -%108 = OpFOrdEqual %v4bool %105 %107 -%109 = OpAll %bool %108 -OpBranch %104 -%104 = OpLabel -%110 = OpPhi %bool %false %95 %109 %103 -OpSelectionMerge %115 None -OpBranchConditional %110 %113 %114 -%113 = OpLabel -%116 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%118 = OpLoad %v4float %116 -OpStore %111 %118 -OpBranch %115 -%114 = OpLabel -%119 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%121 = OpLoad %v4float %119 -OpStore %111 %121 -OpBranch %115 -%115 = OpLabel -%122 = OpLoad %v4float %111 -OpReturnValue %122 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %111 = OpVariable %_ptr_Function_v4float Function + %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %28 + %33 = OpCompositeExtract %float %32 0 + %27 = OpExtInst %float %1 Exp %33 + %34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %36 = OpLoad %v4float %34 + %37 = OpCompositeExtract %float %36 0 + %38 = OpFOrdEqual %bool %27 %37 + OpSelectionMerge %40 None + OpBranchConditional %38 %39 %40 + %39 = OpLabel + %42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %43 = OpLoad %v4float %42 + %44 = OpVectorShuffle %v2float %43 %43 0 1 + %41 = OpExtInst %v2float %1 Exp %44 + %45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %46 = OpLoad %v4float %45 + %47 = OpVectorShuffle %v2float %46 %46 0 1 + %48 = OpFOrdEqual %v2bool %41 %47 + %50 = OpAll %bool %48 + OpBranch %40 + %40 = OpLabel + %51 = OpPhi %bool %false %25 %50 %39 + OpSelectionMerge %53 None + OpBranchConditional %51 %52 %53 + %52 = OpLabel + %55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %56 = OpLoad %v4float %55 + %57 = OpVectorShuffle %v3float %56 %56 0 1 2 + %54 = OpExtInst %v3float %1 Exp %57 + %59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %60 = OpLoad %v4float %59 + %61 = OpVectorShuffle %v3float %60 %60 0 1 2 + %62 = OpFOrdEqual %v3bool %54 %61 + %64 = OpAll %bool %62 + OpBranch %53 + %53 = OpLabel + %65 = OpPhi %bool %false %40 %64 %52 + OpSelectionMerge %67 None + OpBranchConditional %65 %66 %67 + %66 = OpLabel + %69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %70 = OpLoad %v4float %69 + %68 = OpExtInst %v4float %1 Exp %70 + %71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %72 = OpLoad %v4float %71 + %73 = OpFOrdEqual %v4bool %68 %72 + %75 = OpAll %bool %73 + OpBranch %67 + %67 = OpLabel + %76 = OpPhi %bool %false %53 %75 %66 + OpSelectionMerge %78 None + OpBranchConditional %76 %77 %78 + %77 = OpLabel + %80 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %81 = OpLoad %v4float %80 + %82 = OpCompositeExtract %float %81 0 + %83 = OpFOrdEqual %bool %float_1 %82 + OpBranch %78 + %78 = OpLabel + %84 = OpPhi %bool %false %67 %83 %77 + OpSelectionMerge %86 None + OpBranchConditional %84 %85 %86 + %85 = OpLabel + %88 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %89 = OpLoad %v4float %88 + %90 = OpVectorShuffle %v2float %89 %89 0 1 + %91 = OpFOrdEqual %v2bool %87 %90 + %92 = OpAll %bool %91 + OpBranch %86 + %86 = OpLabel + %93 = OpPhi %bool %false %78 %92 %85 + OpSelectionMerge %95 None + OpBranchConditional %93 %94 %95 + %94 = OpLabel + %97 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %98 = OpLoad %v4float %97 + %99 = OpVectorShuffle %v3float %98 %98 0 1 2 + %100 = OpFOrdEqual %v3bool %96 %99 + %101 = OpAll %bool %100 + OpBranch %95 + %95 = OpLabel + %102 = OpPhi %bool %false %86 %101 %94 + OpSelectionMerge %104 None + OpBranchConditional %102 %103 %104 + %103 = OpLabel + %106 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %107 = OpLoad %v4float %106 + %108 = OpFOrdEqual %v4bool %105 %107 + %109 = OpAll %bool %108 + OpBranch %104 + %104 = OpLabel + %110 = OpPhi %bool %false %95 %109 %103 + OpSelectionMerge %115 None + OpBranchConditional %110 %113 %114 + %113 = OpLabel + %116 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %118 = OpLoad %v4float %116 + OpStore %111 %118 + OpBranch %115 + %114 = OpLabel + %119 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %121 = OpLoad %v4float %119 + OpStore %111 %121 + OpBranch %115 + %115 = OpLabel + %122 = OpLoad %v4float %111 + OpReturnValue %122 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Exp.skrp b/tests/sksl/intrinsics/Exp.skrp index 319a246971fd..096737321c8a 100644 --- a/tests/sksl/intrinsics/Exp.skrp +++ b/tests/sksl/intrinsics/Exp.skrp @@ -1,3 +1,5 @@ +57 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_uniform $4 = inputVal(0) diff --git a/tests/sksl/intrinsics/Exp.wgsl b/tests/sksl/intrinsics/Exp.wgsl index 77f9de2d93b1..b7b2b6f966ac 100644 --- a/tests/sksl/intrinsics/Exp.wgsl +++ b/tests/sksl/intrinsics/Exp.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -19,7 +20,7 @@ fn main(_skParam0: vec2) -> vec4 { let _skTemp1 = exp(_globalUniforms.inputVal.xy); let _skTemp2 = exp(_globalUniforms.inputVal.xyz); let _skTemp3 = exp(_globalUniforms.inputVal); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((_skTemp0 == _globalUniforms.expected.x && all(_skTemp1 == _globalUniforms.expected.xy)) && all(_skTemp2 == _globalUniforms.expected.xyz)) && all(_skTemp3 == _globalUniforms.expected)) && 1.0 == _globalUniforms.expected.x) && all(vec2(1.0) == _globalUniforms.expected.xy)) && all(vec3(1.0) == _globalUniforms.expected.xyz)) && all(vec4(1.0) == _globalUniforms.expected))); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((_skTemp0 == _globalUniforms.expected.x) && all(_skTemp1 == _globalUniforms.expected.xy)) && all(_skTemp2 == _globalUniforms.expected.xyz)) && all(_skTemp3 == _globalUniforms.expected)) && (1.0 == _globalUniforms.expected.x)) && all(vec2(1.0) == _globalUniforms.expected.xy)) && all(vec3(1.0) == _globalUniforms.expected.xyz)) && all(vec4(1.0) == _globalUniforms.expected))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/intrinsics/Exp2.asm.frag b/tests/sksl/intrinsics/Exp2.asm.frag index 02568ab219bb..90aaf7778c46 100644 --- a/tests/sksl/intrinsics/Exp2.asm.frag +++ b/tests/sksl/intrinsics/Exp2.asm.frag @@ -1,214 +1,214 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "inputVal" -OpMemberName %_UniformBuffer 1 "expected" -OpMemberName %_UniformBuffer 2 "colorGreen" -OpMemberName %_UniformBuffer 3 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 3 Offset 48 -OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %27 RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %82 RelaxedPrecision -OpDecorate %90 RelaxedPrecision -OpDecorate %91 RelaxedPrecision -OpDecorate %100 RelaxedPrecision -OpDecorate %101 RelaxedPrecision -OpDecorate %110 RelaxedPrecision -OpDecorate %121 RelaxedPrecision -OpDecorate %124 RelaxedPrecision -OpDecorate %125 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "inputVal" + OpMemberName %_UniformBuffer 1 "expected" + OpMemberName %_UniformBuffer 2 "colorGreen" + OpMemberName %_UniformBuffer 3 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 3 Offset 48 + OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %27 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %82 RelaxedPrecision + OpDecorate %90 RelaxedPrecision + OpDecorate %91 RelaxedPrecision + OpDecorate %100 RelaxedPrecision + OpDecorate %101 RelaxedPrecision + OpDecorate %110 RelaxedPrecision + OpDecorate %121 RelaxedPrecision + OpDecorate %124 RelaxedPrecision + OpDecorate %125 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%false = OpConstantFalse %bool + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%v3bool = OpTypeVector %bool 3 -%v4bool = OpTypeVector %bool 4 -%float_1 = OpConstant %float 1 -%float_2 = OpConstant %float 2 -%88 = OpConstantComposite %v2float %float_1 %float_2 -%float_4 = OpConstant %float 4 -%98 = OpConstantComposite %v3float %float_1 %float_2 %float_4 -%float_8 = OpConstant %float 8 -%108 = OpConstantComposite %v4float %float_1 %float_2 %float_4 %float_8 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %v3bool = OpTypeVector %bool 3 + %v4bool = OpTypeVector %bool 4 + %float_1 = OpConstant %float 1 + %float_2 = OpConstant %float 2 + %88 = OpConstantComposite %v2float %float_1 %float_2 + %float_4 = OpConstant %float 4 + %98 = OpConstantComposite %v3float %float_1 %float_2 %float_4 + %float_8 = OpConstant %float 8 + %108 = OpConstantComposite %v4float %float_1 %float_2 %float_4 %float_8 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_2 = OpConstant %int 2 -%int_3 = OpConstant %int 3 + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%114 = OpVariable %_ptr_Function_v4float Function -%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %28 -%33 = OpCompositeExtract %float %32 0 -%27 = OpExtInst %float %1 Exp2 %33 -%34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%36 = OpLoad %v4float %34 -%37 = OpCompositeExtract %float %36 0 -%38 = OpFOrdEqual %bool %27 %37 -OpSelectionMerge %40 None -OpBranchConditional %38 %39 %40 -%39 = OpLabel -%42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%43 = OpLoad %v4float %42 -%44 = OpVectorShuffle %v2float %43 %43 0 1 -%41 = OpExtInst %v2float %1 Exp2 %44 -%45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%46 = OpLoad %v4float %45 -%47 = OpVectorShuffle %v2float %46 %46 0 1 -%48 = OpFOrdEqual %v2bool %41 %47 -%50 = OpAll %bool %48 -OpBranch %40 -%40 = OpLabel -%51 = OpPhi %bool %false %25 %50 %39 -OpSelectionMerge %53 None -OpBranchConditional %51 %52 %53 -%52 = OpLabel -%55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%56 = OpLoad %v4float %55 -%57 = OpVectorShuffle %v3float %56 %56 0 1 2 -%54 = OpExtInst %v3float %1 Exp2 %57 -%59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%60 = OpLoad %v4float %59 -%61 = OpVectorShuffle %v3float %60 %60 0 1 2 -%62 = OpFOrdEqual %v3bool %54 %61 -%64 = OpAll %bool %62 -OpBranch %53 -%53 = OpLabel -%65 = OpPhi %bool %false %40 %64 %52 -OpSelectionMerge %67 None -OpBranchConditional %65 %66 %67 -%66 = OpLabel -%69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%70 = OpLoad %v4float %69 -%68 = OpExtInst %v4float %1 Exp2 %70 -%71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%72 = OpLoad %v4float %71 -%73 = OpFOrdEqual %v4bool %68 %72 -%75 = OpAll %bool %73 -OpBranch %67 -%67 = OpLabel -%76 = OpPhi %bool %false %53 %75 %66 -OpSelectionMerge %78 None -OpBranchConditional %76 %77 %78 -%77 = OpLabel -%80 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%81 = OpLoad %v4float %80 -%82 = OpCompositeExtract %float %81 0 -%83 = OpFOrdEqual %bool %float_1 %82 -OpBranch %78 -%78 = OpLabel -%84 = OpPhi %bool %false %67 %83 %77 -OpSelectionMerge %86 None -OpBranchConditional %84 %85 %86 -%85 = OpLabel -%89 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%90 = OpLoad %v4float %89 -%91 = OpVectorShuffle %v2float %90 %90 0 1 -%92 = OpFOrdEqual %v2bool %88 %91 -%93 = OpAll %bool %92 -OpBranch %86 -%86 = OpLabel -%94 = OpPhi %bool %false %78 %93 %85 -OpSelectionMerge %96 None -OpBranchConditional %94 %95 %96 -%95 = OpLabel -%99 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%100 = OpLoad %v4float %99 -%101 = OpVectorShuffle %v3float %100 %100 0 1 2 -%102 = OpFOrdEqual %v3bool %98 %101 -%103 = OpAll %bool %102 -OpBranch %96 -%96 = OpLabel -%104 = OpPhi %bool %false %86 %103 %95 -OpSelectionMerge %106 None -OpBranchConditional %104 %105 %106 -%105 = OpLabel -%109 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%110 = OpLoad %v4float %109 -%111 = OpFOrdEqual %v4bool %108 %110 -%112 = OpAll %bool %111 -OpBranch %106 -%106 = OpLabel -%113 = OpPhi %bool %false %96 %112 %105 -OpSelectionMerge %118 None -OpBranchConditional %113 %116 %117 -%116 = OpLabel -%119 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%121 = OpLoad %v4float %119 -OpStore %114 %121 -OpBranch %118 -%117 = OpLabel -%122 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%124 = OpLoad %v4float %122 -OpStore %114 %124 -OpBranch %118 -%118 = OpLabel -%125 = OpLoad %v4float %114 -OpReturnValue %125 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %114 = OpVariable %_ptr_Function_v4float Function + %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %28 + %33 = OpCompositeExtract %float %32 0 + %27 = OpExtInst %float %1 Exp2 %33 + %34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %36 = OpLoad %v4float %34 + %37 = OpCompositeExtract %float %36 0 + %38 = OpFOrdEqual %bool %27 %37 + OpSelectionMerge %40 None + OpBranchConditional %38 %39 %40 + %39 = OpLabel + %42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %43 = OpLoad %v4float %42 + %44 = OpVectorShuffle %v2float %43 %43 0 1 + %41 = OpExtInst %v2float %1 Exp2 %44 + %45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %46 = OpLoad %v4float %45 + %47 = OpVectorShuffle %v2float %46 %46 0 1 + %48 = OpFOrdEqual %v2bool %41 %47 + %50 = OpAll %bool %48 + OpBranch %40 + %40 = OpLabel + %51 = OpPhi %bool %false %25 %50 %39 + OpSelectionMerge %53 None + OpBranchConditional %51 %52 %53 + %52 = OpLabel + %55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %56 = OpLoad %v4float %55 + %57 = OpVectorShuffle %v3float %56 %56 0 1 2 + %54 = OpExtInst %v3float %1 Exp2 %57 + %59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %60 = OpLoad %v4float %59 + %61 = OpVectorShuffle %v3float %60 %60 0 1 2 + %62 = OpFOrdEqual %v3bool %54 %61 + %64 = OpAll %bool %62 + OpBranch %53 + %53 = OpLabel + %65 = OpPhi %bool %false %40 %64 %52 + OpSelectionMerge %67 None + OpBranchConditional %65 %66 %67 + %66 = OpLabel + %69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %70 = OpLoad %v4float %69 + %68 = OpExtInst %v4float %1 Exp2 %70 + %71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %72 = OpLoad %v4float %71 + %73 = OpFOrdEqual %v4bool %68 %72 + %75 = OpAll %bool %73 + OpBranch %67 + %67 = OpLabel + %76 = OpPhi %bool %false %53 %75 %66 + OpSelectionMerge %78 None + OpBranchConditional %76 %77 %78 + %77 = OpLabel + %80 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %81 = OpLoad %v4float %80 + %82 = OpCompositeExtract %float %81 0 + %83 = OpFOrdEqual %bool %float_1 %82 + OpBranch %78 + %78 = OpLabel + %84 = OpPhi %bool %false %67 %83 %77 + OpSelectionMerge %86 None + OpBranchConditional %84 %85 %86 + %85 = OpLabel + %89 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %90 = OpLoad %v4float %89 + %91 = OpVectorShuffle %v2float %90 %90 0 1 + %92 = OpFOrdEqual %v2bool %88 %91 + %93 = OpAll %bool %92 + OpBranch %86 + %86 = OpLabel + %94 = OpPhi %bool %false %78 %93 %85 + OpSelectionMerge %96 None + OpBranchConditional %94 %95 %96 + %95 = OpLabel + %99 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %100 = OpLoad %v4float %99 + %101 = OpVectorShuffle %v3float %100 %100 0 1 2 + %102 = OpFOrdEqual %v3bool %98 %101 + %103 = OpAll %bool %102 + OpBranch %96 + %96 = OpLabel + %104 = OpPhi %bool %false %86 %103 %95 + OpSelectionMerge %106 None + OpBranchConditional %104 %105 %106 + %105 = OpLabel + %109 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %110 = OpLoad %v4float %109 + %111 = OpFOrdEqual %v4bool %108 %110 + %112 = OpAll %bool %111 + OpBranch %106 + %106 = OpLabel + %113 = OpPhi %bool %false %96 %112 %105 + OpSelectionMerge %118 None + OpBranchConditional %113 %116 %117 + %116 = OpLabel + %119 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %121 = OpLoad %v4float %119 + OpStore %114 %121 + OpBranch %118 + %117 = OpLabel + %122 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %124 = OpLoad %v4float %122 + OpStore %114 %124 + OpBranch %118 + %118 = OpLabel + %125 = OpLoad %v4float %114 + OpReturnValue %125 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Exp2.skrp b/tests/sksl/intrinsics/Exp2.skrp index 9861d69fee3a..5d9309052352 100644 --- a/tests/sksl/intrinsics/Exp2.skrp +++ b/tests/sksl/intrinsics/Exp2.skrp @@ -1,3 +1,16 @@ +57 instructions + +[immutable slots] +i0 = 0x3F800000 (1.0) +i1 = 0x40000000 (2.0) +i2 = 0x3F800000 (1.0) +i3 = 0x40000000 (2.0) +i4 = 0x40800000 (4.0) +i5 = 0x3F800000 (1.0) +i6 = 0x40000000 (2.0) +i7 = 0x40800000 (4.0) +i8 = 0x41000000 (8.0) + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_uniform $4 = inputVal(0) @@ -33,32 +46,26 @@ bitwise_and_int $4 &= $5 copy_uniform $5 = expected(0) cmpeq_imm_float $5 = equal($5, 0x3F800000 (1.0)) bitwise_and_int $4 &= $5 -copy_constant $5 = 0x3F800000 (1.0) -copy_constant $6 = 0x40000000 (2.0) +copy_2_immutables_unmasked $5..6 = i0..1 [0x3F800000 (1.0), 0x40000000 (2.0)] copy_2_uniforms $7..8 = expected(0..1) cmpeq_2_floats $5..6 = equal($5..6, $7..8) bitwise_and_int $5 &= $6 bitwise_and_int $4 &= $5 -copy_constant $5 = 0x3F800000 (1.0) -copy_constant $6 = 0x40000000 (2.0) -copy_constant $7 = 0x40800000 (4.0) +copy_3_immutables_unmasked $5..7 = i2..4 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40800000 (4.0)] copy_3_uniforms $8..10 = expected(0..2) cmpeq_3_floats $5..7 = equal($5..7, $8..10) bitwise_and_int $6 &= $7 bitwise_and_int $5 &= $6 bitwise_and_int $4 &= $5 -copy_constant $5 = 0x3F800000 (1.0) -copy_constant $6 = 0x40000000 (2.0) -copy_constant $7 = 0x40800000 (4.0) -copy_constant $8 = 0x41000000 (8.0) +copy_4_immutables_unmasked $5..8 = i5..8 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40800000 (4.0), 0x41000000 (8.0)] copy_4_uniforms $9..12 = expected cmpeq_4_floats $5..8 = equal($5..8, $9..12) bitwise_and_2_ints $5..6 &= $7..8 bitwise_and_int $5 &= $6 bitwise_and_int $4 &= $5 -branch_if_no_active_lanes_eq branch +3 (label 0 at #62) if no lanes of $4 == 0xFFFFFFFF +branch_if_no_active_lanes_eq branch +3 (label 0 at #56) if no lanes of $4 == 0xFFFFFFFF copy_4_uniforms $0..3 = colorGreen -jump jump +3 (label 1 at #64) +jump jump +3 (label 1 at #58) label label 0 copy_4_uniforms $0..3 = colorRed label label 0x00000001 diff --git a/tests/sksl/intrinsics/Exp2.wgsl b/tests/sksl/intrinsics/Exp2.wgsl index 14ea9876d49a..444c0436f1c6 100644 --- a/tests/sksl/intrinsics/Exp2.wgsl +++ b/tests/sksl/intrinsics/Exp2.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -19,7 +20,7 @@ fn main(_skParam0: vec2) -> vec4 { let _skTemp1 = exp2(_globalUniforms.inputVal.xy); let _skTemp2 = exp2(_globalUniforms.inputVal.xyz); let _skTemp3 = exp2(_globalUniforms.inputVal); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((_skTemp0 == _globalUniforms.expected.x && all(_skTemp1 == _globalUniforms.expected.xy)) && all(_skTemp2 == _globalUniforms.expected.xyz)) && all(_skTemp3 == _globalUniforms.expected)) && 1.0 == _globalUniforms.expected.x) && all(vec2(1.0, 2.0) == _globalUniforms.expected.xy)) && all(vec3(1.0, 2.0, 4.0) == _globalUniforms.expected.xyz)) && all(vec4(1.0, 2.0, 4.0, 8.0) == _globalUniforms.expected))); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((_skTemp0 == _globalUniforms.expected.x) && all(_skTemp1 == _globalUniforms.expected.xy)) && all(_skTemp2 == _globalUniforms.expected.xyz)) && all(_skTemp3 == _globalUniforms.expected)) && (1.0 == _globalUniforms.expected.x)) && all(vec2(1.0, 2.0) == _globalUniforms.expected.xy)) && all(vec3(1.0, 2.0, 4.0) == _globalUniforms.expected.xyz)) && all(vec4(1.0, 2.0, 4.0, 8.0) == _globalUniforms.expected))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/intrinsics/FaceForward.asm.frag b/tests/sksl/intrinsics/FaceForward.asm.frag index 15d4c98f724e..3c5ddb82947a 100644 --- a/tests/sksl/intrinsics/FaceForward.asm.frag +++ b/tests/sksl/intrinsics/FaceForward.asm.frag @@ -1,237 +1,271 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "N" -OpMemberName %_UniformBuffer 1 "I" -OpMemberName %_UniformBuffer 2 "NRef" -OpMemberName %_UniformBuffer 3 "colorGreen" -OpMemberName %_UniformBuffer 4 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %expectedPos "expectedPos" -OpName %expectedNeg "expectedNeg" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 3 Offset 48 -OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 4 Offset 64 -OpMemberDecorate %_UniformBuffer 4 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %expectedPos RelaxedPrecision -OpDecorate %expectedNeg RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %45 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %49 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %53 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %58 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %63 RelaxedPrecision -OpDecorate %64 RelaxedPrecision -OpDecorate %66 RelaxedPrecision -OpDecorate %67 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %75 RelaxedPrecision -OpDecorate %77 RelaxedPrecision -OpDecorate %78 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %82 RelaxedPrecision -OpDecorate %84 RelaxedPrecision -OpDecorate %85 RelaxedPrecision -OpDecorate %86 RelaxedPrecision -OpDecorate %93 RelaxedPrecision -OpDecorate %95 RelaxedPrecision -OpDecorate %97 RelaxedPrecision -OpDecorate %99 RelaxedPrecision -OpDecorate %111 RelaxedPrecision -OpDecorate %118 RelaxedPrecision -OpDecorate %131 RelaxedPrecision -OpDecorate %134 RelaxedPrecision -OpDecorate %135 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "N" + OpMemberName %_UniformBuffer 1 "I" + OpMemberName %_UniformBuffer 2 "NRef" + OpMemberName %_UniformBuffer 3 "colorGreen" + OpMemberName %_UniformBuffer 4 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %huge "huge" + OpName %huge2 "huge2" + OpName %huge3 "huge3" + OpName %huge4 "huge4" + OpName %expectedPos "expectedPos" + OpName %expectedNeg "expectedNeg" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 3 Offset 48 + OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 4 Offset 64 + OpMemberDecorate %_UniformBuffer 4 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %28 RelaxedPrecision + OpDecorate %expectedPos RelaxedPrecision + OpDecorate %expectedNeg RelaxedPrecision + OpDecorate %64 RelaxedPrecision + OpDecorate %69 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %73 RelaxedPrecision + OpDecorate %74 RelaxedPrecision + OpDecorate %77 RelaxedPrecision + OpDecorate %78 RelaxedPrecision + OpDecorate %82 RelaxedPrecision + OpDecorate %84 RelaxedPrecision + OpDecorate %85 RelaxedPrecision + OpDecorate %87 RelaxedPrecision + OpDecorate %88 RelaxedPrecision + OpDecorate %90 RelaxedPrecision + OpDecorate %91 RelaxedPrecision + OpDecorate %92 RelaxedPrecision + OpDecorate %99 RelaxedPrecision + OpDecorate %101 RelaxedPrecision + OpDecorate %102 RelaxedPrecision + OpDecorate %104 RelaxedPrecision + OpDecorate %105 RelaxedPrecision + OpDecorate %107 RelaxedPrecision + OpDecorate %108 RelaxedPrecision + OpDecorate %109 RelaxedPrecision + OpDecorate %116 RelaxedPrecision + OpDecorate %118 RelaxedPrecision + OpDecorate %120 RelaxedPrecision + OpDecorate %122 RelaxedPrecision + OpDecorate %134 RelaxedPrecision + OpDecorate %141 RelaxedPrecision + OpDecorate %154 RelaxedPrecision + OpDecorate %157 RelaxedPrecision + OpDecorate %158 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float +%_ptr_Function_float = OpTypePointer Function %float + %float_1 = OpConstant %float 1 +%float_1_00000002e_30 = OpConstant %float 1.00000002e+30 + %33 = OpConstantComposite %v2float %float_1 %float_1 + %34 = OpConstantComposite %v2float %float_1_00000002e_30 %float_1_00000002e_30 + %v3float = OpTypeVector %float 3 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %39 = OpConstantComposite %v3float %float_1 %float_1 %float_1 + %40 = OpConstantComposite %v3float %float_1_00000002e_30 %float_1_00000002e_30 %float_1_00000002e_30 %_ptr_Function_v4float = OpTypePointer Function %v4float -%float_1 = OpConstant %float 1 -%float_2 = OpConstant %float 2 -%float_3 = OpConstant %float 3 -%float_4 = OpConstant %float 4 -%32 = OpConstantComposite %v4float %float_1 %float_2 %float_3 %float_4 -%float_n1 = OpConstant %float -1 -%float_n2 = OpConstant %float -2 -%float_n3 = OpConstant %float -3 -%float_n4 = OpConstant %float -4 -%38 = OpConstantComposite %v4float %float_n1 %float_n2 %float_n3 %float_n4 -%false = OpConstantFalse %bool + %44 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %45 = OpConstantComposite %v4float %float_1_00000002e_30 %float_1_00000002e_30 %float_1_00000002e_30 %float_1_00000002e_30 + %float_2 = OpConstant %float 2 + %float_3 = OpConstant %float 3 + %float_4 = OpConstant %float 4 + %57 = OpConstantComposite %v4float %float_1 %float_2 %float_3 %float_4 + %float_n1 = OpConstant %float -1 + %float_n2 = OpConstant %float -2 + %float_n3 = OpConstant %float -3 + %float_n4 = OpConstant %float -4 + %62 = OpConstantComposite %v4float %float_n1 %float_n2 %float_n3 %float_n4 + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%v3bool = OpTypeVector %bool 3 -%v4bool = OpTypeVector %bool 4 -%true = OpConstantTrue %bool -%110 = OpConstantComposite %v2float %float_n1 %float_n2 -%117 = OpConstantComposite %v3float %float_1 %float_2 %float_3 -%int_3 = OpConstant %int 3 -%int_4 = OpConstant %int 4 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 + %v2bool = OpTypeVector %bool 2 + %v3bool = OpTypeVector %bool 3 + %v4bool = OpTypeVector %bool 4 + %true = OpConstantTrue %bool + %133 = OpConstantComposite %v2float %float_n1 %float_n2 + %140 = OpConstantComposite %v3float %float_1 %float_2 %float_3 + %int_3 = OpConstant %int 3 + %int_4 = OpConstant %int 4 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %huge = OpVariable %_ptr_Function_float Function + %huge2 = OpVariable %_ptr_Function_v2float Function + %huge3 = OpVariable %_ptr_Function_v3float Function + %huge4 = OpVariable %_ptr_Function_v4float Function %expectedPos = OpVariable %_ptr_Function_v4float Function %expectedNeg = OpVariable %_ptr_Function_v4float Function -%125 = OpVariable %_ptr_Function_v4float Function -OpStore %expectedPos %32 -OpStore %expectedNeg %38 -%41 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%45 = OpLoad %v4float %41 -%46 = OpCompositeExtract %float %45 0 -%47 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%49 = OpLoad %v4float %47 -%50 = OpCompositeExtract %float %49 0 -%51 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%53 = OpLoad %v4float %51 -%54 = OpCompositeExtract %float %53 0 -%40 = OpExtInst %float %1 FaceForward %46 %50 %54 -%55 = OpFOrdEqual %bool %40 %float_n1 -OpSelectionMerge %57 None -OpBranchConditional %55 %56 %57 -%56 = OpLabel -%59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%60 = OpLoad %v4float %59 -%61 = OpVectorShuffle %v2float %60 %60 0 1 -%62 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%63 = OpLoad %v4float %62 -%64 = OpVectorShuffle %v2float %63 %63 0 1 -%65 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%66 = OpLoad %v4float %65 -%67 = OpVectorShuffle %v2float %66 %66 0 1 -%58 = OpExtInst %v2float %1 FaceForward %61 %64 %67 -%68 = OpVectorShuffle %v2float %38 %38 0 1 -%69 = OpFOrdEqual %v2bool %58 %68 -%71 = OpAll %bool %69 -OpBranch %57 -%57 = OpLabel -%72 = OpPhi %bool %false %25 %71 %56 -OpSelectionMerge %74 None -OpBranchConditional %72 %73 %74 -%73 = OpLabel -%76 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%77 = OpLoad %v4float %76 -%78 = OpVectorShuffle %v3float %77 %77 0 1 2 -%80 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%81 = OpLoad %v4float %80 -%82 = OpVectorShuffle %v3float %81 %81 0 1 2 -%83 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%84 = OpLoad %v4float %83 -%85 = OpVectorShuffle %v3float %84 %84 0 1 2 -%75 = OpExtInst %v3float %1 FaceForward %78 %82 %85 -%86 = OpVectorShuffle %v3float %32 %32 0 1 2 -%87 = OpFOrdEqual %v3bool %75 %86 -%89 = OpAll %bool %87 -OpBranch %74 -%74 = OpLabel -%90 = OpPhi %bool %false %57 %89 %73 -OpSelectionMerge %92 None -OpBranchConditional %90 %91 %92 -%91 = OpLabel -%94 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%95 = OpLoad %v4float %94 -%96 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%97 = OpLoad %v4float %96 -%98 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%99 = OpLoad %v4float %98 -%93 = OpExtInst %v4float %1 FaceForward %95 %97 %99 -%100 = OpFOrdEqual %v4bool %93 %32 -%102 = OpAll %bool %100 -OpBranch %92 -%92 = OpLabel -%103 = OpPhi %bool %false %74 %102 %91 -OpSelectionMerge %105 None -OpBranchConditional %103 %104 %105 -%104 = OpLabel -OpBranch %105 -%105 = OpLabel -%107 = OpPhi %bool %false %92 %true %104 -OpSelectionMerge %109 None -OpBranchConditional %107 %108 %109 -%108 = OpLabel -%111 = OpVectorShuffle %v2float %38 %38 0 1 -%112 = OpFOrdEqual %v2bool %110 %111 -%113 = OpAll %bool %112 -OpBranch %109 -%109 = OpLabel -%114 = OpPhi %bool %false %105 %113 %108 -OpSelectionMerge %116 None -OpBranchConditional %114 %115 %116 -%115 = OpLabel -%118 = OpVectorShuffle %v3float %32 %32 0 1 2 -%119 = OpFOrdEqual %v3bool %117 %118 -%120 = OpAll %bool %119 -OpBranch %116 -%116 = OpLabel -%121 = OpPhi %bool %false %109 %120 %115 -OpSelectionMerge %123 None -OpBranchConditional %121 %122 %123 -%122 = OpLabel -OpBranch %123 -%123 = OpLabel -%124 = OpPhi %bool %false %116 %true %122 -OpSelectionMerge %128 None -OpBranchConditional %124 %126 %127 -%126 = OpLabel -%129 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%131 = OpLoad %v4float %129 -OpStore %125 %131 -OpBranch %128 -%127 = OpLabel -%132 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 -%134 = OpLoad %v4float %132 -OpStore %125 %134 -OpBranch %128 -%128 = OpLabel -%135 = OpLoad %v4float %125 -OpReturnValue %135 -OpFunctionEnd + %148 = OpVariable %_ptr_Function_v4float Function + %28 = OpExtInst %float %1 FaceForward %float_1 %float_1_00000002e_30 %float_1_00000002e_30 + OpStore %huge %28 + %32 = OpExtInst %v2float %1 FaceForward %33 %34 %34 + OpStore %huge2 %32 + %38 = OpExtInst %v3float %1 FaceForward %39 %40 %40 + OpStore %huge3 %38 + %43 = OpExtInst %v4float %1 FaceForward %44 %45 %45 + OpStore %huge4 %43 + %47 = OpCompositeConstruct %v4float %28 %28 %28 %28 + %48 = OpVectorShuffle %v4float %32 %32 0 0 0 0 + %49 = OpFAdd %v4float %47 %48 + OpStore %expectedPos %49 + %51 = OpVectorShuffle %v4float %38 %38 0 0 0 0 + %52 = OpVectorShuffle %v4float %43 %43 0 0 0 0 + %53 = OpFAdd %v4float %51 %52 + OpStore %expectedNeg %53 + OpStore %expectedPos %57 + OpStore %expectedNeg %62 + %65 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %69 = OpLoad %v4float %65 + %70 = OpCompositeExtract %float %69 0 + %71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %73 = OpLoad %v4float %71 + %74 = OpCompositeExtract %float %73 0 + %75 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %77 = OpLoad %v4float %75 + %78 = OpCompositeExtract %float %77 0 + %64 = OpExtInst %float %1 FaceForward %70 %74 %78 + %79 = OpFOrdEqual %bool %64 %float_n1 + OpSelectionMerge %81 None + OpBranchConditional %79 %80 %81 + %80 = OpLabel + %83 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %84 = OpLoad %v4float %83 + %85 = OpVectorShuffle %v2float %84 %84 0 1 + %86 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %87 = OpLoad %v4float %86 + %88 = OpVectorShuffle %v2float %87 %87 0 1 + %89 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %90 = OpLoad %v4float %89 + %91 = OpVectorShuffle %v2float %90 %90 0 1 + %82 = OpExtInst %v2float %1 FaceForward %85 %88 %91 + %92 = OpVectorShuffle %v2float %62 %62 0 1 + %93 = OpFOrdEqual %v2bool %82 %92 + %95 = OpAll %bool %93 + OpBranch %81 + %81 = OpLabel + %96 = OpPhi %bool %false %25 %95 %80 + OpSelectionMerge %98 None + OpBranchConditional %96 %97 %98 + %97 = OpLabel + %100 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %101 = OpLoad %v4float %100 + %102 = OpVectorShuffle %v3float %101 %101 0 1 2 + %103 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %104 = OpLoad %v4float %103 + %105 = OpVectorShuffle %v3float %104 %104 0 1 2 + %106 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %107 = OpLoad %v4float %106 + %108 = OpVectorShuffle %v3float %107 %107 0 1 2 + %99 = OpExtInst %v3float %1 FaceForward %102 %105 %108 + %109 = OpVectorShuffle %v3float %57 %57 0 1 2 + %110 = OpFOrdEqual %v3bool %99 %109 + %112 = OpAll %bool %110 + OpBranch %98 + %98 = OpLabel + %113 = OpPhi %bool %false %81 %112 %97 + OpSelectionMerge %115 None + OpBranchConditional %113 %114 %115 + %114 = OpLabel + %117 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %118 = OpLoad %v4float %117 + %119 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %120 = OpLoad %v4float %119 + %121 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %122 = OpLoad %v4float %121 + %116 = OpExtInst %v4float %1 FaceForward %118 %120 %122 + %123 = OpFOrdEqual %v4bool %116 %57 + %125 = OpAll %bool %123 + OpBranch %115 + %115 = OpLabel + %126 = OpPhi %bool %false %98 %125 %114 + OpSelectionMerge %128 None + OpBranchConditional %126 %127 %128 + %127 = OpLabel + OpBranch %128 + %128 = OpLabel + %130 = OpPhi %bool %false %115 %true %127 + OpSelectionMerge %132 None + OpBranchConditional %130 %131 %132 + %131 = OpLabel + %134 = OpVectorShuffle %v2float %62 %62 0 1 + %135 = OpFOrdEqual %v2bool %133 %134 + %136 = OpAll %bool %135 + OpBranch %132 + %132 = OpLabel + %137 = OpPhi %bool %false %128 %136 %131 + OpSelectionMerge %139 None + OpBranchConditional %137 %138 %139 + %138 = OpLabel + %141 = OpVectorShuffle %v3float %57 %57 0 1 2 + %142 = OpFOrdEqual %v3bool %140 %141 + %143 = OpAll %bool %142 + OpBranch %139 + %139 = OpLabel + %144 = OpPhi %bool %false %132 %143 %138 + OpSelectionMerge %146 None + OpBranchConditional %144 %145 %146 + %145 = OpLabel + OpBranch %146 + %146 = OpLabel + %147 = OpPhi %bool %false %139 %true %145 + OpSelectionMerge %151 None + OpBranchConditional %147 %149 %150 + %149 = OpLabel + %152 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %154 = OpLoad %v4float %152 + OpStore %148 %154 + OpBranch %151 + %150 = OpLabel + %155 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 + %157 = OpLoad %v4float %155 + OpStore %148 %157 + OpBranch %151 + %151 = OpLabel + %158 = OpLoad %v4float %148 + OpReturnValue %158 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/FaceForward.glsl b/tests/sksl/intrinsics/FaceForward.glsl index 4fd47b515247..f00421caf87a 100644 --- a/tests/sksl/intrinsics/FaceForward.glsl +++ b/tests/sksl/intrinsics/FaceForward.glsl @@ -6,7 +6,13 @@ uniform vec4 NRef; uniform vec4 colorGreen; uniform vec4 colorRed; vec4 main() { - vec4 expectedPos = vec4(1.0, 2.0, 3.0, 4.0); - vec4 expectedNeg = vec4(-1.0, -2.0, -3.0, -4.0); + float huge = faceforward(1.0, 1e+30, 1e+30); + vec2 huge2 = faceforward(vec2(1.0), vec2(1e+30), vec2(1e+30)); + vec3 huge3 = faceforward(vec3(1.0), vec3(1e+30), vec3(1e+30)); + vec4 huge4 = faceforward(vec4(1.0), vec4(1e+30), vec4(1e+30)); + vec4 expectedPos = vec4(huge) + huge2.xxxx; + vec4 expectedNeg = huge3.xxxx + huge4.xxxx; + expectedPos = vec4(1.0, 2.0, 3.0, 4.0); + expectedNeg = vec4(-1.0, -2.0, -3.0, -4.0); return ((((((faceforward(N.x, I.x, NRef.x) == expectedNeg.x && faceforward(N.xy, I.xy, NRef.xy) == expectedNeg.xy) && faceforward(N.xyz, I.xyz, NRef.xyz) == expectedPos.xyz) && faceforward(N, I, NRef) == expectedPos) && -1.0 == expectedNeg.x) && vec2(-1.0, -2.0) == expectedNeg.xy) && vec3(1.0, 2.0, 3.0) == expectedPos.xyz) && vec4(1.0, 2.0, 3.0, 4.0) == expectedPos ? colorGreen : colorRed; } diff --git a/tests/sksl/intrinsics/FaceForward.hlsl b/tests/sksl/intrinsics/FaceForward.hlsl index 9c71cf371814..7cd68d7f7229 100644 --- a/tests/sksl/intrinsics/FaceForward.hlsl +++ b/tests/sksl/intrinsics/FaceForward.hlsl @@ -22,84 +22,94 @@ float spvFaceForward(float n, float i, float nref) float4 main(float2 _24) { - float4 expectedPos = float4(1.0f, 2.0f, 3.0f, 4.0f); - float4 expectedNeg = float4(-1.0f, -2.0f, -3.0f, -4.0f); - bool _72 = false; + float _28 = spvFaceForward(1.0f, 1000000015047466219876688855040.0f, 1000000015047466219876688855040.0f); + float huge = _28; + float2 _32 = faceforward(1.0f.xx, 1000000015047466219876688855040.0f.xx, 1000000015047466219876688855040.0f.xx); + float2 huge2 = _32; + float3 _38 = faceforward(1.0f.xxx, 1000000015047466219876688855040.0f.xxx, 1000000015047466219876688855040.0f.xxx); + float3 huge3 = _38; + float4 _43 = faceforward(1.0f.xxxx, 1000000015047466219876688855040.0f.xxxx, 1000000015047466219876688855040.0f.xxxx); + float4 huge4 = _43; + float4 expectedPos = _28.xxxx + _32.xxxx; + float4 expectedNeg = _38.xxxx + _43.xxxx; + expectedPos = float4(1.0f, 2.0f, 3.0f, 4.0f); + expectedNeg = float4(-1.0f, -2.0f, -3.0f, -4.0f); + bool _96 = false; if (spvFaceForward(_10_N.x, _10_I.x, _10_NRef.x) == (-1.0f)) { - float2 _58 = faceforward(_10_N.xy, _10_I.xy, _10_NRef.xy); - _72 = all(bool2(_58.x == float4(-1.0f, -2.0f, -3.0f, -4.0f).xy.x, _58.y == float4(-1.0f, -2.0f, -3.0f, -4.0f).xy.y)); + float2 _82 = faceforward(_10_N.xy, _10_I.xy, _10_NRef.xy); + _96 = all(bool2(_82.x == float4(-1.0f, -2.0f, -3.0f, -4.0f).xy.x, _82.y == float4(-1.0f, -2.0f, -3.0f, -4.0f).xy.y)); } else { - _72 = false; + _96 = false; } - bool _90 = false; - if (_72) + bool _113 = false; + if (_96) { - float3 _75 = faceforward(_10_N.xyz, _10_I.xyz, _10_NRef.xyz); - _90 = all(bool3(_75.x == float4(1.0f, 2.0f, 3.0f, 4.0f).xyz.x, _75.y == float4(1.0f, 2.0f, 3.0f, 4.0f).xyz.y, _75.z == float4(1.0f, 2.0f, 3.0f, 4.0f).xyz.z)); + float3 _99 = faceforward(_10_N.xyz, _10_I.xyz, _10_NRef.xyz); + _113 = all(bool3(_99.x == float4(1.0f, 2.0f, 3.0f, 4.0f).xyz.x, _99.y == float4(1.0f, 2.0f, 3.0f, 4.0f).xyz.y, _99.z == float4(1.0f, 2.0f, 3.0f, 4.0f).xyz.z)); } else { - _90 = false; + _113 = false; } - bool _103 = false; - if (_90) + bool _126 = false; + if (_113) { - float4 _93 = faceforward(_10_N, _10_I, _10_NRef); - _103 = all(bool4(_93.x == float4(1.0f, 2.0f, 3.0f, 4.0f).x, _93.y == float4(1.0f, 2.0f, 3.0f, 4.0f).y, _93.z == float4(1.0f, 2.0f, 3.0f, 4.0f).z, _93.w == float4(1.0f, 2.0f, 3.0f, 4.0f).w)); + float4 _116 = faceforward(_10_N, _10_I, _10_NRef); + _126 = all(bool4(_116.x == float4(1.0f, 2.0f, 3.0f, 4.0f).x, _116.y == float4(1.0f, 2.0f, 3.0f, 4.0f).y, _116.z == float4(1.0f, 2.0f, 3.0f, 4.0f).z, _116.w == float4(1.0f, 2.0f, 3.0f, 4.0f).w)); } else { - _103 = false; + _126 = false; } - bool _107 = false; - if (_103) + bool _130 = false; + if (_126) { - _107 = true; + _130 = true; } else { - _107 = false; + _130 = false; } - bool _114 = false; - if (_107) + bool _137 = false; + if (_130) { - _114 = all(bool2(float2(-1.0f, -2.0f).x == float4(-1.0f, -2.0f, -3.0f, -4.0f).xy.x, float2(-1.0f, -2.0f).y == float4(-1.0f, -2.0f, -3.0f, -4.0f).xy.y)); + _137 = all(bool2(float2(-1.0f, -2.0f).x == float4(-1.0f, -2.0f, -3.0f, -4.0f).xy.x, float2(-1.0f, -2.0f).y == float4(-1.0f, -2.0f, -3.0f, -4.0f).xy.y)); } else { - _114 = false; + _137 = false; } - bool _121 = false; - if (_114) + bool _144 = false; + if (_137) { - _121 = all(bool3(float3(1.0f, 2.0f, 3.0f).x == float4(1.0f, 2.0f, 3.0f, 4.0f).xyz.x, float3(1.0f, 2.0f, 3.0f).y == float4(1.0f, 2.0f, 3.0f, 4.0f).xyz.y, float3(1.0f, 2.0f, 3.0f).z == float4(1.0f, 2.0f, 3.0f, 4.0f).xyz.z)); + _144 = all(bool3(float3(1.0f, 2.0f, 3.0f).x == float4(1.0f, 2.0f, 3.0f, 4.0f).xyz.x, float3(1.0f, 2.0f, 3.0f).y == float4(1.0f, 2.0f, 3.0f, 4.0f).xyz.y, float3(1.0f, 2.0f, 3.0f).z == float4(1.0f, 2.0f, 3.0f, 4.0f).xyz.z)); } else { - _121 = false; + _144 = false; } - bool _124 = false; - if (_121) + bool _147 = false; + if (_144) { - _124 = true; + _147 = true; } else { - _124 = false; + _147 = false; } - float4 _125 = 0.0f.xxxx; - if (_124) + float4 _148 = 0.0f.xxxx; + if (_147) { - _125 = _10_colorGreen; + _148 = _10_colorGreen; } else { - _125 = _10_colorRed; + _148 = _10_colorRed; } - return _125; + return _148; } void frag_main() diff --git a/tests/sksl/intrinsics/FaceForward.metal b/tests/sksl/intrinsics/FaceForward.metal index 334f6341bc6d..5da2370efa80 100644 --- a/tests/sksl/intrinsics/FaceForward.metal +++ b/tests/sksl/intrinsics/FaceForward.metal @@ -16,8 +16,14 @@ struct Outputs { fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) { Outputs _out; (void)_out; - half4 expectedPos = half4(1.0h, 2.0h, 3.0h, 4.0h); - half4 expectedNeg = half4(-1.0h, -2.0h, -3.0h, -4.0h); + float huge = float(((((1e+30h) * (1e+30h) < 0) ? 1 : -1) * (1.0h))); + float2 huge2 = faceforward(float2(1.0), float2(1e+30), float2(1e+30)); + float3 huge3 = faceforward(float3(1.0), float3(1e+30), float3(1e+30)); + float4 huge4 = faceforward(float4(1.0), float4(1e+30), float4(1e+30)); + half4 expectedPos = half4(float4(huge) + huge2.xxxx); + half4 expectedNeg = half4(huge3.xxxx + huge4.xxxx); + expectedPos = half4(1.0h, 2.0h, 3.0h, 4.0h); + expectedNeg = half4(-1.0h, -2.0h, -3.0h, -4.0h); _out.sk_FragColor = ((((((((((_uniforms.NRef.x) * (_uniforms.I.x) < 0) ? 1 : -1) * (_uniforms.N.x)) == expectedNeg.x && all(faceforward(_uniforms.N.xy, _uniforms.I.xy, _uniforms.NRef.xy) == expectedNeg.xy)) && all(faceforward(_uniforms.N.xyz, _uniforms.I.xyz, _uniforms.NRef.xyz) == expectedPos.xyz)) && all(faceforward(_uniforms.N, _uniforms.I, _uniforms.NRef) == expectedPos)) && -1.0h == expectedNeg.x) && all(half2(-1.0h, -2.0h) == expectedNeg.xy)) && all(half3(1.0h, 2.0h, 3.0h) == expectedPos.xyz)) && all(half4(1.0h, 2.0h, 3.0h, 4.0h) == expectedPos) ? _uniforms.colorGreen : _uniforms.colorRed; return _out; } diff --git a/tests/sksl/intrinsics/FaceForward.skrp b/tests/sksl/intrinsics/FaceForward.skrp index 055582eda74e..4cf21308fe5c 100644 --- a/tests/sksl/intrinsics/FaceForward.skrp +++ b/tests/sksl/intrinsics/FaceForward.skrp @@ -1,15 +1,68 @@ +129 instructions + [immutable slots] -expectedPos(0) = 0x3F800000 (1.0) -expectedPos(1) = 0x40000000 (2.0) -expectedPos(2) = 0x40400000 (3.0) -expectedPos(3) = 0x40800000 (4.0) -expectedNeg(0) = 0xBF800000 (-1.0) -expectedNeg(1) = 0xC0000000 (-2.0) -expectedNeg(2) = 0xC0400000 (-3.0) -expectedNeg(3) = 0xC0800000 (-4.0) +i0 = 0x3F800000 (1.0) +i1 = 0x40000000 (2.0) +i2 = 0x40400000 (3.0) +i3 = 0x40800000 (4.0) +i4 = 0xBF800000 (-1.0) +i5 = 0xC0000000 (-2.0) +i6 = 0xC0400000 (-3.0) +i7 = 0xC0800000 (-4.0) store_src_rg xy = src.rg init_lane_masks CondMask = LoopMask = RetMask = true +copy_constant $0 = 0x3F800000 (1.0) +copy_constant $1 = 0 +splat_2_constants $2..3 = 0x7149F2CA (1e+30) +mul_float $2 *= $3 +cmple_float $1 = lessThanEqual($1, $2) +bitwise_and_imm_int $1 &= 0x80000000 +bitwise_xor_int $0 ^= $1 +copy_slot_unmasked huge = $0 +splat_2_constants $0..1 = 0x3F800000 (1.0) +copy_constant $2 = 0 +splat_4_constants $3..6 = 0x7149F2CA (1e+30) +dot_2_floats $3 = dot($3..4, $5..6) +cmple_float $2 = lessThanEqual($2, $3) +bitwise_and_imm_int $2 &= 0x80000000 +copy_slot_unmasked $3 = $2 +bitwise_xor_2_ints $0..1 ^= $2..3 +copy_2_slots_unmasked huge2 = $0..1 +splat_3_constants $0..2 = 0x3F800000 (1.0) +copy_constant $3 = 0 +splat_4_constants $4..7 = 0x7149F2CA (1e+30) +splat_2_constants $8..9 = 0x7149F2CA (1e+30) +dot_3_floats $4 = dot($4..6, $7..9) +cmple_float $3 = lessThanEqual($3, $4) +bitwise_and_imm_int $3 &= 0x80000000 +swizzle_3 $3..5 = ($3..5).xxx +bitwise_xor_3_ints $0..2 ^= $3..5 +copy_3_slots_unmasked huge3 = $0..2 +splat_4_constants $0..3 = 0x3F800000 (1.0) +copy_constant $4 = 0 +splat_4_constants $5..8 = 0x7149F2CA (1e+30) +splat_4_constants $9..12 = 0x7149F2CA (1e+30) +dot_4_floats $5 = dot($5..8, $9..12) +cmple_float $4 = lessThanEqual($4, $5) +bitwise_and_imm_int $4 &= 0x80000000 +swizzle_4 $4..7 = ($4..7).xxxx +bitwise_xor_4_ints $0..3 ^= $4..7 +copy_4_slots_unmasked huge4 = $0..3 +copy_slot_unmasked $0 = huge +swizzle_4 $0..3 = ($0..3).xxxx +copy_2_slots_unmasked $4..5 = huge2 +swizzle_4 $4..7 = ($4..7).xxxx +add_4_floats $0..3 += $4..7 +copy_4_slots_unmasked expectedPos = $0..3 +copy_3_slots_unmasked $0..2 = huge3 +swizzle_4 $0..3 = ($0..3).xxxx +copy_4_slots_unmasked $4..7 = huge4 +swizzle_4 $4..7 = ($4..7).xxxx +add_4_floats $0..3 += $4..7 +copy_4_slots_unmasked expectedNeg = $0..3 +copy_4_immutables_unmasked expectedPos = i0..3 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked expectedNeg = i4..7 [0xBF800000 (-1.0), 0xC0000000 (-2.0), 0xC0400000 (-3.0), 0xC0800000 (-4.0)] copy_uniform $0 = N(0) copy_constant $1 = 0 copy_uniform $2 = I(0) @@ -64,24 +117,18 @@ bitwise_and_int $0 &= $1 copy_slot_unmasked $1 = expectedNeg(0) cmpeq_imm_float $1 = equal($1, 0xBF800000 (-1.0)) bitwise_and_int $0 &= $1 -copy_constant $1 = 0xBF800000 (-1.0) -copy_constant $2 = 0xC0000000 (-2.0) +copy_2_immutables_unmasked $1..2 = i4..5 [0xBF800000 (-1.0), 0xC0000000 (-2.0)] copy_2_slots_unmasked $3..4 = expectedNeg(0..1) cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0x3F800000 (1.0) -copy_constant $2 = 0x40000000 (2.0) -copy_constant $3 = 0x40400000 (3.0) +copy_3_immutables_unmasked $1..3 = i0..2 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0)] copy_3_slots_unmasked $4..6 = expectedPos(0..2) cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0x3F800000 (1.0) -copy_constant $2 = 0x40000000 (2.0) -copy_constant $3 = 0x40400000 (3.0) -copy_constant $4 = 0x40800000 (4.0) +copy_4_immutables_unmasked $1..4 = i0..3 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] copy_4_slots_unmasked $5..8 = expectedPos cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 diff --git a/tests/sksl/intrinsics/FaceForward.wgsl b/tests/sksl/intrinsics/FaceForward.wgsl index a28b6b7ee441..3d4c61529dd8 100644 --- a/tests/sksl/intrinsics/FaceForward.wgsl +++ b/tests/sksl/intrinsics/FaceForward.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -16,13 +17,28 @@ struct _GlobalUniforms { fn main(_skParam0: vec2) -> vec4 { let xy = _skParam0; { - var expectedPos: vec4 = vec4(1.0, 2.0, 3.0, 4.0); - var expectedNeg: vec4 = vec4(-1.0, -2.0, -3.0, -4.0); - let _skTemp0 = (select(-1.0, 1.0, (_globalUniforms.I.x * _globalUniforms.NRef.x) < 0) * _globalUniforms.N.x); - let _skTemp1 = faceForward(_globalUniforms.N.xy, _globalUniforms.I.xy, _globalUniforms.NRef.xy); - let _skTemp2 = faceForward(_globalUniforms.N.xyz, _globalUniforms.I.xyz, _globalUniforms.NRef.xyz); - let _skTemp3 = faceForward(_globalUniforms.N, _globalUniforms.I, _globalUniforms.NRef); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((_skTemp0 == expectedNeg.x && all(_skTemp1 == expectedNeg.xy)) && all(_skTemp2 == expectedPos.xyz)) && all(_skTemp3 == expectedPos)) && -1.0 == expectedNeg.x) && all(vec2(-1.0, -2.0) == expectedNeg.xy)) && all(vec3(1.0, 2.0, 3.0) == expectedPos.xyz)) && all(vec4(1.0, 2.0, 3.0, 4.0) == expectedPos))); + let _skTemp0 = 1e+30; + let _skTemp1 = select(-1.0, 1.0, _skTemp0 * 1e+30 < 0); + var huge: f32 = f32(_skTemp1); + let _skTemp2 = vec2(1.0); + let _skTemp3 = faceForward(_skTemp2, vec2(1e+30), vec2(1e+30)); + var huge2: vec2 = _skTemp3; + let _skTemp4 = vec3(1.0); + let _skTemp5 = faceForward(_skTemp4, vec3(1e+30), vec3(1e+30)); + var huge3: vec3 = _skTemp5; + let _skTemp6 = vec4(1.0); + let _skTemp7 = faceForward(_skTemp6, vec4(1e+30), vec4(1e+30)); + var huge4: vec4 = _skTemp7; + var expectedPos: vec4 = vec4(vec4(huge) + huge2.xxxx); + var expectedNeg: vec4 = vec4(huge3.xxxx + huge4.xxxx); + expectedPos = vec4(1.0, 2.0, 3.0, 4.0); + expectedNeg = vec4(-1.0, -2.0, -3.0, -4.0); + let _skTemp8 = _globalUniforms.N.x; + let _skTemp9 = select(-_skTemp8, _skTemp8, _globalUniforms.I.x * _globalUniforms.NRef.x < 0); + let _skTemp10 = faceForward(_globalUniforms.N.xy, _globalUniforms.I.xy, _globalUniforms.NRef.xy); + let _skTemp11 = faceForward(_globalUniforms.N.xyz, _globalUniforms.I.xyz, _globalUniforms.NRef.xyz); + let _skTemp12 = faceForward(_globalUniforms.N, _globalUniforms.I, _globalUniforms.NRef); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((_skTemp9 == expectedNeg.x) && all(_skTemp10 == expectedNeg.xy)) && all(_skTemp11 == expectedPos.xyz)) && all(_skTemp12 == expectedPos)) && (-1.0 == expectedNeg.x)) && all(vec2(-1.0, -2.0) == expectedNeg.xy)) && all(vec3(1.0, 2.0, 3.0) == expectedPos.xyz)) && all(vec4(1.0, 2.0, 3.0, 4.0) == expectedPos))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/intrinsics/FindLSB.asm.frag b/tests/sksl/intrinsics/FindLSB.asm.frag index 0bbdb92db546..c960204d2ce5 100644 --- a/tests/sksl/intrinsics/FindLSB.asm.frag +++ b/tests/sksl/intrinsics/FindLSB.asm.frag @@ -1,57 +1,57 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "a" -OpMemberName %_UniformBuffer 1 "b" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 1 Offset 4 -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %23 RelaxedPrecision -OpDecorate %31 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "a" + OpMemberName %_UniformBuffer 1 "b" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 1 Offset 4 + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %23 RelaxedPrecision + OpDecorate %31 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%int = OpTypeInt 32 1 -%uint = OpTypeInt 32 0 + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 %_UniformBuffer = OpTypeStruct %int %uint %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%16 = OpTypeFunction %void + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %16 = OpTypeFunction %void %_ptr_Uniform_int = OpTypePointer Uniform %int -%int_0 = OpConstant %int 0 + %int_0 = OpConstant %int 0 %_ptr_Output_float = OpTypePointer Output %float %_ptr_Uniform_uint = OpTypePointer Uniform %uint -%int_1 = OpConstant %int 1 -%main = OpFunction %void None %16 -%17 = OpLabel -%19 = OpAccessChain %_ptr_Uniform_int %10 %int_0 -%22 = OpLoad %int %19 -%18 = OpExtInst %int %1 FindILsb %22 -%23 = OpConvertSToF %float %18 -%24 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 -OpStore %24 %23 -%27 = OpAccessChain %_ptr_Uniform_uint %10 %int_1 -%30 = OpLoad %uint %27 -%26 = OpExtInst %int %1 FindILsb %30 -%31 = OpConvertSToF %float %26 -%32 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_1 -OpStore %32 %31 -OpReturn -OpFunctionEnd + %int_1 = OpConstant %int 1 + %main = OpFunction %void None %16 + %17 = OpLabel + %19 = OpAccessChain %_ptr_Uniform_int %10 %int_0 + %22 = OpLoad %int %19 + %18 = OpExtInst %int %1 FindILsb %22 + %23 = OpConvertSToF %float %18 + %24 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 + OpStore %24 %23 + %27 = OpAccessChain %_ptr_Uniform_uint %10 %int_1 + %30 = OpLoad %uint %27 + %26 = OpExtInst %int %1 FindILsb %30 + %31 = OpConvertSToF %float %26 + %32 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_1 + OpStore %32 %31 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/intrinsics/FindLSB.wgsl b/tests/sksl/intrinsics/FindLSB.wgsl new file mode 100644 index 000000000000..a8702c7318ee --- /dev/null +++ b/tests/sksl/intrinsics/FindLSB.wgsl @@ -0,0 +1,34 @@ +### Compilation failed: + +error: :15:20 error: unresolved call target 'findLSB' + let _skTemp0 = findLSB(_globalUniforms.a); + ^^^^^^^^^^^^^^^^^^^^^^^^^^ + + +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + a: i32, + b: u32, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_stageOut: ptr) { + { + let _skTemp0 = findLSB(_globalUniforms.a); + (*_stageOut).sk_FragColor.x = f32(_skTemp0); + let _skTemp1 = findLSB(_globalUniforms.b); + (*_stageOut).sk_FragColor.y = f32(_skTemp1); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(&_stageOut); + return _stageOut; +} + +1 error diff --git a/tests/sksl/intrinsics/FindMSB.asm.frag b/tests/sksl/intrinsics/FindMSB.asm.frag index ea1efd4bcff7..a6e9c2976593 100644 --- a/tests/sksl/intrinsics/FindMSB.asm.frag +++ b/tests/sksl/intrinsics/FindMSB.asm.frag @@ -1,57 +1,57 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "a" -OpMemberName %_UniformBuffer 1 "b" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 1 Offset 4 -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %23 RelaxedPrecision -OpDecorate %31 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "a" + OpMemberName %_UniformBuffer 1 "b" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 1 Offset 4 + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %23 RelaxedPrecision + OpDecorate %31 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%int = OpTypeInt 32 1 -%uint = OpTypeInt 32 0 + %int = OpTypeInt 32 1 + %uint = OpTypeInt 32 0 %_UniformBuffer = OpTypeStruct %int %uint %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%16 = OpTypeFunction %void + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %16 = OpTypeFunction %void %_ptr_Uniform_int = OpTypePointer Uniform %int -%int_0 = OpConstant %int 0 + %int_0 = OpConstant %int 0 %_ptr_Output_float = OpTypePointer Output %float %_ptr_Uniform_uint = OpTypePointer Uniform %uint -%int_1 = OpConstant %int 1 -%main = OpFunction %void None %16 -%17 = OpLabel -%19 = OpAccessChain %_ptr_Uniform_int %10 %int_0 -%22 = OpLoad %int %19 -%18 = OpExtInst %int %1 FindSMsb %22 -%23 = OpConvertSToF %float %18 -%24 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 -OpStore %24 %23 -%27 = OpAccessChain %_ptr_Uniform_uint %10 %int_1 -%30 = OpLoad %uint %27 -%26 = OpExtInst %int %1 FindUMsb %30 -%31 = OpConvertSToF %float %26 -%32 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_1 -OpStore %32 %31 -OpReturn -OpFunctionEnd + %int_1 = OpConstant %int 1 + %main = OpFunction %void None %16 + %17 = OpLabel + %19 = OpAccessChain %_ptr_Uniform_int %10 %int_0 + %22 = OpLoad %int %19 + %18 = OpExtInst %int %1 FindSMsb %22 + %23 = OpConvertSToF %float %18 + %24 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 + OpStore %24 %23 + %27 = OpAccessChain %_ptr_Uniform_uint %10 %int_1 + %30 = OpLoad %uint %27 + %26 = OpExtInst %int %1 FindUMsb %30 + %31 = OpConvertSToF %float %26 + %32 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_1 + OpStore %32 %31 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/intrinsics/FindMSB.wgsl b/tests/sksl/intrinsics/FindMSB.wgsl new file mode 100644 index 000000000000..138d447e61bc --- /dev/null +++ b/tests/sksl/intrinsics/FindMSB.wgsl @@ -0,0 +1,34 @@ +### Compilation failed: + +error: :15:20 error: unresolved call target 'findMSB' + let _skTemp0 = findMSB(_globalUniforms.a); + ^^^^^^^^^^^^^^^^^^^^^^^^^^ + + +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + a: i32, + b: u32, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_stageOut: ptr) { + { + let _skTemp0 = findMSB(_globalUniforms.a); + (*_stageOut).sk_FragColor.x = f32(_skTemp0); + let _skTemp1 = findMSB(_globalUniforms.b); + (*_stageOut).sk_FragColor.y = f32(_skTemp1); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(&_stageOut); + return _stageOut; +} + +1 error diff --git a/tests/sksl/intrinsics/FloatBitsToInt.asm.frag b/tests/sksl/intrinsics/FloatBitsToInt.asm.frag index 06d1e50fd90d..3704ad585666 100644 --- a/tests/sksl/intrinsics/FloatBitsToInt.asm.frag +++ b/tests/sksl/intrinsics/FloatBitsToInt.asm.frag @@ -1,144 +1,144 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testMatrix2x2" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %inputVal "inputVal" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 ColMajor -OpMemberDecorate %_UniformBuffer 0 MatrixStride 16 -OpMemberDecorate %_UniformBuffer 1 Offset 32 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 48 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %88 RelaxedPrecision -OpDecorate %91 RelaxedPrecision -OpDecorate %92 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testMatrix2x2" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %inputVal "inputVal" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 ColMajor + OpMemberDecorate %_UniformBuffer 0 MatrixStride 16 + OpMemberDecorate %_UniformBuffer 1 Offset 32 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 48 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %88 RelaxedPrecision + OpDecorate %91 RelaxedPrecision + OpDecorate %92 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%v2float = OpTypeVector %float 2 + %v2float = OpTypeVector %float 2 %mat2v2float = OpTypeMatrix %v2float 2 %_UniformBuffer = OpTypeStruct %mat2v2float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%17 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%20 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %17 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %20 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%24 = OpTypeFunction %v4float %_ptr_Function_v2float + %24 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_mat2v2float = OpTypePointer Uniform %mat2v2float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%float_1 = OpConstant %float 1 -%float_n1 = OpConstant %float -1 -%41 = OpConstantComposite %v4float %float_1 %float_1 %float_n1 %float_n1 -%false = OpConstantFalse %bool + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %float_1 = OpConstant %float 1 + %float_n1 = OpConstant %float -1 + %41 = OpConstantComposite %v4float %float_1 %float_1 %float_n1 %float_n1 + %false = OpConstantFalse %bool %int_1065353216 = OpConstant %int 1065353216 -%v2int = OpTypeVector %int 2 + %v2int = OpTypeVector %int 2 %int_1073741824 = OpConstant %int 1073741824 -%54 = OpConstantComposite %v2int %int_1065353216 %int_1073741824 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%v3int = OpTypeVector %int 3 + %54 = OpConstantComposite %v2int %int_1065353216 %int_1073741824 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %v3int = OpTypeVector %int 3 %int_n1069547520 = OpConstant %int -1069547520 -%66 = OpConstantComposite %v3int %int_1065353216 %int_1073741824 %int_n1069547520 -%v3bool = OpTypeVector %bool 3 -%v4int = OpTypeVector %int 4 + %66 = OpConstantComposite %v3int %int_1065353216 %int_1073741824 %int_n1069547520 + %v3bool = OpTypeVector %bool 3 + %v4int = OpTypeVector %int 4 %int_n1065353216 = OpConstant %int -1065353216 -%76 = OpConstantComposite %v4int %int_1065353216 %int_1073741824 %int_n1069547520 %int_n1065353216 -%v4bool = OpTypeVector %bool 4 + %76 = OpConstantComposite %v4int %int_1065353216 %int_1073741824 %int_n1069547520 %int_n1065353216 + %v4bool = OpTypeVector %bool 4 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %17 -%18 = OpLabel -%21 = OpVariable %_ptr_Function_v2float Function -OpStore %21 %20 -%23 = OpFunctionCall %v4float %main %21 -OpStore %sk_FragColor %23 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %24 -%25 = OpFunctionParameter %_ptr_Function_v2float -%26 = OpLabel -%inputVal = OpVariable %_ptr_Function_v4float Function -%81 = OpVariable %_ptr_Function_v4float Function -%29 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_0 -%33 = OpLoad %mat2v2float %29 -%34 = OpCompositeExtract %float %33 0 0 -%35 = OpCompositeExtract %float %33 0 1 -%36 = OpCompositeExtract %float %33 1 0 -%37 = OpCompositeExtract %float %33 1 1 -%38 = OpCompositeConstruct %v4float %34 %35 %36 %37 -%42 = OpFMul %v4float %38 %41 -OpStore %inputVal %42 -%45 = OpCompositeExtract %float %42 0 -%44 = OpBitcast %int %45 -%47 = OpIEqual %bool %44 %int_1065353216 -OpSelectionMerge %49 None -OpBranchConditional %47 %48 %49 -%48 = OpLabel -%51 = OpVectorShuffle %v2float %42 %42 0 1 -%50 = OpBitcast %v2int %51 -%55 = OpIEqual %v2bool %50 %54 -%57 = OpAll %bool %55 -OpBranch %49 -%49 = OpLabel -%58 = OpPhi %bool %false %26 %57 %48 -OpSelectionMerge %60 None -OpBranchConditional %58 %59 %60 -%59 = OpLabel -%62 = OpVectorShuffle %v3float %42 %42 0 1 2 -%61 = OpBitcast %v3int %62 -%67 = OpIEqual %v3bool %61 %66 -%69 = OpAll %bool %67 -OpBranch %60 -%60 = OpLabel -%70 = OpPhi %bool %false %49 %69 %59 -OpSelectionMerge %72 None -OpBranchConditional %70 %71 %72 -%71 = OpLabel -%73 = OpBitcast %v4int %42 -%77 = OpIEqual %v4bool %73 %76 -%79 = OpAll %bool %77 -OpBranch %72 -%72 = OpLabel -%80 = OpPhi %bool %false %60 %79 %71 -OpSelectionMerge %84 None -OpBranchConditional %80 %82 %83 -%82 = OpLabel -%85 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%88 = OpLoad %v4float %85 -OpStore %81 %88 -OpBranch %84 -%83 = OpLabel -%89 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%91 = OpLoad %v4float %89 -OpStore %81 %91 -OpBranch %84 -%84 = OpLabel -%92 = OpLoad %v4float %81 -OpReturnValue %92 -OpFunctionEnd + %18 = OpLabel + %21 = OpVariable %_ptr_Function_v2float Function + OpStore %21 %20 + %23 = OpFunctionCall %v4float %main %21 + OpStore %sk_FragColor %23 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %24 + %25 = OpFunctionParameter %_ptr_Function_v2float + %26 = OpLabel + %inputVal = OpVariable %_ptr_Function_v4float Function + %81 = OpVariable %_ptr_Function_v4float Function + %29 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_0 + %33 = OpLoad %mat2v2float %29 + %34 = OpCompositeExtract %float %33 0 0 + %35 = OpCompositeExtract %float %33 0 1 + %36 = OpCompositeExtract %float %33 1 0 + %37 = OpCompositeExtract %float %33 1 1 + %38 = OpCompositeConstruct %v4float %34 %35 %36 %37 + %42 = OpFMul %v4float %38 %41 + OpStore %inputVal %42 + %45 = OpCompositeExtract %float %42 0 + %44 = OpBitcast %int %45 + %47 = OpIEqual %bool %44 %int_1065353216 + OpSelectionMerge %49 None + OpBranchConditional %47 %48 %49 + %48 = OpLabel + %51 = OpVectorShuffle %v2float %42 %42 0 1 + %50 = OpBitcast %v2int %51 + %55 = OpIEqual %v2bool %50 %54 + %57 = OpAll %bool %55 + OpBranch %49 + %49 = OpLabel + %58 = OpPhi %bool %false %26 %57 %48 + OpSelectionMerge %60 None + OpBranchConditional %58 %59 %60 + %59 = OpLabel + %62 = OpVectorShuffle %v3float %42 %42 0 1 2 + %61 = OpBitcast %v3int %62 + %67 = OpIEqual %v3bool %61 %66 + %69 = OpAll %bool %67 + OpBranch %60 + %60 = OpLabel + %70 = OpPhi %bool %false %49 %69 %59 + OpSelectionMerge %72 None + OpBranchConditional %70 %71 %72 + %71 = OpLabel + %73 = OpBitcast %v4int %42 + %77 = OpIEqual %v4bool %73 %76 + %79 = OpAll %bool %77 + OpBranch %72 + %72 = OpLabel + %80 = OpPhi %bool %false %60 %79 %71 + OpSelectionMerge %84 None + OpBranchConditional %80 %82 %83 + %82 = OpLabel + %85 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %88 = OpLoad %v4float %85 + OpStore %81 %88 + OpBranch %84 + %83 = OpLabel + %89 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %91 = OpLoad %v4float %89 + OpStore %81 %91 + OpBranch %84 + %84 = OpLabel + %92 = OpLoad %v4float %81 + OpReturnValue %92 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/FloatBitsToInt.skrp b/tests/sksl/intrinsics/FloatBitsToInt.skrp index d3dfd8dd6e95..7238596c0d93 100644 --- a/tests/sksl/intrinsics/FloatBitsToInt.skrp +++ b/tests/sksl/intrinsics/FloatBitsToInt.skrp @@ -1,34 +1,36 @@ +30 instructions + [immutable slots] -expectedB(0) = 0x3F800000 (1.0) -expectedB(1) = 0x40000000 (2.0) -expectedB(2) = 0xC0400000 (-3.0) -expectedB(3) = 0xC0800000 (-4.0) +i0 = 0x3F800000 (1.0) +i1 = 0x3F800000 (1.0) +i2 = 0xBF800000 (-1.0) +i3 = 0xBF800000 (-1.0) +i4 = 0x3F800000 (1.0) +i5 = 0x40000000 (2.0) +i6 = 0xC0400000 (-3.0) +i7 = 0xC0800000 (-4.0) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_4_uniforms $0..3 = testMatrix2x2 -splat_2_constants $4..5 = 0x3F800000 (1.0) -splat_2_constants $6..7 = 0xBF800000 (-1.0) +copy_4_immutables_unmasked $4..7 = i0..3 [0x3F800000 (1.0), 0x3F800000 (1.0), 0xBF800000 (-1.0), 0xBF800000 (-1.0)] mul_4_floats $0..3 *= $4..7 copy_4_slots_unmasked inputVal = $0..3 copy_slot_unmasked $0 = inputVal(0) cmpeq_imm_int $0 = equal($0, 0x3F800000) copy_2_slots_unmasked $1..2 = inputVal(0..1) -copy_constant $3 = 0x3F800000 (1.0) -copy_constant $4 = 0x40000000 (2.0) +copy_2_immutables_unmasked $3..4 = i4..5 [0x3F800000 (1.0), 0x40000000 (2.0)] cmpeq_2_ints $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_3_slots_unmasked $1..3 = inputVal(0..2) -copy_constant $4 = 0x3F800000 (1.0) -copy_constant $5 = 0x40000000 (2.0) -copy_constant $6 = 0xC0400000 (-3.0) +copy_3_immutables_unmasked $4..6 = i4..6 [0x3F800000 (1.0), 0x40000000 (2.0), 0xC0400000 (-3.0)] cmpeq_3_ints $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_4_slots_unmasked $1..4 = inputVal -copy_4_slots_unmasked $5..8 = expectedB +copy_4_immutables_unmasked $5..8 = i4..7 [0x3F800000 (1.0), 0x40000000 (2.0), 0xC0400000 (-3.0), 0xC0800000 (-4.0)] cmpeq_4_ints $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 diff --git a/tests/sksl/intrinsics/FloatBitsToInt.wgsl b/tests/sksl/intrinsics/FloatBitsToInt.wgsl new file mode 100644 index 000000000000..a4ed01ceac9a --- /dev/null +++ b/tests/sksl/intrinsics/FloatBitsToInt.wgsl @@ -0,0 +1,40 @@ +### Compilation failed: + +error: :20:20 error: unresolved call target 'floatBitsToInt' + let _skTemp0 = floatBitsToInt(inputVal.x); + ^^^^^^^^^^^^^^^^^^^^^^^^^^ + + +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + testMatrix2x2: mat2x2, + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var inputVal: vec4 = vec4(_globalUniforms.testMatrix2x2[0], _globalUniforms.testMatrix2x2[1]) * vec4(1.0, 1.0, -1.0, -1.0); + const expectedB: vec4 = vec4(1065353216, 1073741824, -1069547520, -1065353216); + let _skTemp0 = floatBitsToInt(inputVal.x); + let _skTemp1 = floatBitsToInt(inputVal.xy); + let _skTemp2 = floatBitsToInt(inputVal.xyz); + let _skTemp3 = floatBitsToInt(inputVal); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((_skTemp0 == 1065353216) && all(_skTemp1 == vec2(1065353216, 1073741824))) && all(_skTemp2 == vec3(1065353216, 1073741824, -1069547520))) && all(_skTemp3 == expectedB))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} + +1 error diff --git a/tests/sksl/intrinsics/FloatBitsToUint.asm.frag b/tests/sksl/intrinsics/FloatBitsToUint.asm.frag index 8c47038914eb..9de4cf7a710d 100644 --- a/tests/sksl/intrinsics/FloatBitsToUint.asm.frag +++ b/tests/sksl/intrinsics/FloatBitsToUint.asm.frag @@ -1,145 +1,145 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testMatrix2x2" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %inputVal "inputVal" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 ColMajor -OpMemberDecorate %_UniformBuffer 0 MatrixStride 16 -OpMemberDecorate %_UniformBuffer 1 Offset 32 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 48 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %89 RelaxedPrecision -OpDecorate %92 RelaxedPrecision -OpDecorate %93 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testMatrix2x2" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %inputVal "inputVal" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 ColMajor + OpMemberDecorate %_UniformBuffer 0 MatrixStride 16 + OpMemberDecorate %_UniformBuffer 1 Offset 32 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 48 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %89 RelaxedPrecision + OpDecorate %92 RelaxedPrecision + OpDecorate %93 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%v2float = OpTypeVector %float 2 + %v2float = OpTypeVector %float 2 %mat2v2float = OpTypeMatrix %v2float 2 %_UniformBuffer = OpTypeStruct %mat2v2float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%17 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%20 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %17 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %20 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%24 = OpTypeFunction %v4float %_ptr_Function_v2float + %24 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_mat2v2float = OpTypePointer Uniform %mat2v2float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%float_1 = OpConstant %float 1 -%float_n1 = OpConstant %float -1 -%41 = OpConstantComposite %v4float %float_1 %float_1 %float_n1 %float_n1 -%false = OpConstantFalse %bool -%uint = OpTypeInt 32 0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %float_1 = OpConstant %float 1 + %float_n1 = OpConstant %float -1 + %41 = OpConstantComposite %v4float %float_1 %float_1 %float_n1 %float_n1 + %false = OpConstantFalse %bool + %uint = OpTypeInt 32 0 %uint_1065353216 = OpConstant %uint 1065353216 -%v2uint = OpTypeVector %uint 2 + %v2uint = OpTypeVector %uint 2 %uint_1073741824 = OpConstant %uint 1073741824 -%55 = OpConstantComposite %v2uint %uint_1065353216 %uint_1073741824 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%v3uint = OpTypeVector %uint 3 + %55 = OpConstantComposite %v2uint %uint_1065353216 %uint_1073741824 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %v3uint = OpTypeVector %uint 3 %uint_3225419776 = OpConstant %uint 3225419776 -%67 = OpConstantComposite %v3uint %uint_1065353216 %uint_1073741824 %uint_3225419776 -%v3bool = OpTypeVector %bool 3 -%v4uint = OpTypeVector %uint 4 + %67 = OpConstantComposite %v3uint %uint_1065353216 %uint_1073741824 %uint_3225419776 + %v3bool = OpTypeVector %bool 3 + %v4uint = OpTypeVector %uint 4 %uint_3229614080 = OpConstant %uint 3229614080 -%77 = OpConstantComposite %v4uint %uint_1065353216 %uint_1073741824 %uint_3225419776 %uint_3229614080 -%v4bool = OpTypeVector %bool 4 + %77 = OpConstantComposite %v4uint %uint_1065353216 %uint_1073741824 %uint_3225419776 %uint_3229614080 + %v4bool = OpTypeVector %bool 4 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %17 -%18 = OpLabel -%21 = OpVariable %_ptr_Function_v2float Function -OpStore %21 %20 -%23 = OpFunctionCall %v4float %main %21 -OpStore %sk_FragColor %23 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %24 -%25 = OpFunctionParameter %_ptr_Function_v2float -%26 = OpLabel -%inputVal = OpVariable %_ptr_Function_v4float Function -%82 = OpVariable %_ptr_Function_v4float Function -%29 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_0 -%33 = OpLoad %mat2v2float %29 -%34 = OpCompositeExtract %float %33 0 0 -%35 = OpCompositeExtract %float %33 0 1 -%36 = OpCompositeExtract %float %33 1 0 -%37 = OpCompositeExtract %float %33 1 1 -%38 = OpCompositeConstruct %v4float %34 %35 %36 %37 -%42 = OpFMul %v4float %38 %41 -OpStore %inputVal %42 -%45 = OpCompositeExtract %float %42 0 -%44 = OpBitcast %uint %45 -%48 = OpIEqual %bool %44 %uint_1065353216 -OpSelectionMerge %50 None -OpBranchConditional %48 %49 %50 -%49 = OpLabel -%52 = OpVectorShuffle %v2float %42 %42 0 1 -%51 = OpBitcast %v2uint %52 -%56 = OpIEqual %v2bool %51 %55 -%58 = OpAll %bool %56 -OpBranch %50 -%50 = OpLabel -%59 = OpPhi %bool %false %26 %58 %49 -OpSelectionMerge %61 None -OpBranchConditional %59 %60 %61 -%60 = OpLabel -%63 = OpVectorShuffle %v3float %42 %42 0 1 2 -%62 = OpBitcast %v3uint %63 -%68 = OpIEqual %v3bool %62 %67 -%70 = OpAll %bool %68 -OpBranch %61 -%61 = OpLabel -%71 = OpPhi %bool %false %50 %70 %60 -OpSelectionMerge %73 None -OpBranchConditional %71 %72 %73 -%72 = OpLabel -%74 = OpBitcast %v4uint %42 -%78 = OpIEqual %v4bool %74 %77 -%80 = OpAll %bool %78 -OpBranch %73 -%73 = OpLabel -%81 = OpPhi %bool %false %61 %80 %72 -OpSelectionMerge %85 None -OpBranchConditional %81 %83 %84 -%83 = OpLabel -%86 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%89 = OpLoad %v4float %86 -OpStore %82 %89 -OpBranch %85 -%84 = OpLabel -%90 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%92 = OpLoad %v4float %90 -OpStore %82 %92 -OpBranch %85 -%85 = OpLabel -%93 = OpLoad %v4float %82 -OpReturnValue %93 -OpFunctionEnd + %18 = OpLabel + %21 = OpVariable %_ptr_Function_v2float Function + OpStore %21 %20 + %23 = OpFunctionCall %v4float %main %21 + OpStore %sk_FragColor %23 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %24 + %25 = OpFunctionParameter %_ptr_Function_v2float + %26 = OpLabel + %inputVal = OpVariable %_ptr_Function_v4float Function + %82 = OpVariable %_ptr_Function_v4float Function + %29 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_0 + %33 = OpLoad %mat2v2float %29 + %34 = OpCompositeExtract %float %33 0 0 + %35 = OpCompositeExtract %float %33 0 1 + %36 = OpCompositeExtract %float %33 1 0 + %37 = OpCompositeExtract %float %33 1 1 + %38 = OpCompositeConstruct %v4float %34 %35 %36 %37 + %42 = OpFMul %v4float %38 %41 + OpStore %inputVal %42 + %45 = OpCompositeExtract %float %42 0 + %44 = OpBitcast %uint %45 + %48 = OpIEqual %bool %44 %uint_1065353216 + OpSelectionMerge %50 None + OpBranchConditional %48 %49 %50 + %49 = OpLabel + %52 = OpVectorShuffle %v2float %42 %42 0 1 + %51 = OpBitcast %v2uint %52 + %56 = OpIEqual %v2bool %51 %55 + %58 = OpAll %bool %56 + OpBranch %50 + %50 = OpLabel + %59 = OpPhi %bool %false %26 %58 %49 + OpSelectionMerge %61 None + OpBranchConditional %59 %60 %61 + %60 = OpLabel + %63 = OpVectorShuffle %v3float %42 %42 0 1 2 + %62 = OpBitcast %v3uint %63 + %68 = OpIEqual %v3bool %62 %67 + %70 = OpAll %bool %68 + OpBranch %61 + %61 = OpLabel + %71 = OpPhi %bool %false %50 %70 %60 + OpSelectionMerge %73 None + OpBranchConditional %71 %72 %73 + %72 = OpLabel + %74 = OpBitcast %v4uint %42 + %78 = OpIEqual %v4bool %74 %77 + %80 = OpAll %bool %78 + OpBranch %73 + %73 = OpLabel + %81 = OpPhi %bool %false %61 %80 %72 + OpSelectionMerge %85 None + OpBranchConditional %81 %83 %84 + %83 = OpLabel + %86 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %89 = OpLoad %v4float %86 + OpStore %82 %89 + OpBranch %85 + %84 = OpLabel + %90 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %92 = OpLoad %v4float %90 + OpStore %82 %92 + OpBranch %85 + %85 = OpLabel + %93 = OpLoad %v4float %82 + OpReturnValue %93 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/FloatBitsToUint.skrp b/tests/sksl/intrinsics/FloatBitsToUint.skrp index d3dfd8dd6e95..7238596c0d93 100644 --- a/tests/sksl/intrinsics/FloatBitsToUint.skrp +++ b/tests/sksl/intrinsics/FloatBitsToUint.skrp @@ -1,34 +1,36 @@ +30 instructions + [immutable slots] -expectedB(0) = 0x3F800000 (1.0) -expectedB(1) = 0x40000000 (2.0) -expectedB(2) = 0xC0400000 (-3.0) -expectedB(3) = 0xC0800000 (-4.0) +i0 = 0x3F800000 (1.0) +i1 = 0x3F800000 (1.0) +i2 = 0xBF800000 (-1.0) +i3 = 0xBF800000 (-1.0) +i4 = 0x3F800000 (1.0) +i5 = 0x40000000 (2.0) +i6 = 0xC0400000 (-3.0) +i7 = 0xC0800000 (-4.0) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_4_uniforms $0..3 = testMatrix2x2 -splat_2_constants $4..5 = 0x3F800000 (1.0) -splat_2_constants $6..7 = 0xBF800000 (-1.0) +copy_4_immutables_unmasked $4..7 = i0..3 [0x3F800000 (1.0), 0x3F800000 (1.0), 0xBF800000 (-1.0), 0xBF800000 (-1.0)] mul_4_floats $0..3 *= $4..7 copy_4_slots_unmasked inputVal = $0..3 copy_slot_unmasked $0 = inputVal(0) cmpeq_imm_int $0 = equal($0, 0x3F800000) copy_2_slots_unmasked $1..2 = inputVal(0..1) -copy_constant $3 = 0x3F800000 (1.0) -copy_constant $4 = 0x40000000 (2.0) +copy_2_immutables_unmasked $3..4 = i4..5 [0x3F800000 (1.0), 0x40000000 (2.0)] cmpeq_2_ints $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_3_slots_unmasked $1..3 = inputVal(0..2) -copy_constant $4 = 0x3F800000 (1.0) -copy_constant $5 = 0x40000000 (2.0) -copy_constant $6 = 0xC0400000 (-3.0) +copy_3_immutables_unmasked $4..6 = i4..6 [0x3F800000 (1.0), 0x40000000 (2.0), 0xC0400000 (-3.0)] cmpeq_3_ints $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_4_slots_unmasked $1..4 = inputVal -copy_4_slots_unmasked $5..8 = expectedB +copy_4_immutables_unmasked $5..8 = i4..7 [0x3F800000 (1.0), 0x40000000 (2.0), 0xC0400000 (-3.0), 0xC0800000 (-4.0)] cmpeq_4_ints $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 diff --git a/tests/sksl/intrinsics/FloatBitsToUint.wgsl b/tests/sksl/intrinsics/FloatBitsToUint.wgsl new file mode 100644 index 000000000000..f0bd058d4119 --- /dev/null +++ b/tests/sksl/intrinsics/FloatBitsToUint.wgsl @@ -0,0 +1,40 @@ +### Compilation failed: + +error: :20:20 error: unresolved call target 'floatBitsToUint' + let _skTemp0 = floatBitsToUint(inputVal.x); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + testMatrix2x2: mat2x2, + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var inputVal: vec4 = vec4(_globalUniforms.testMatrix2x2[0], _globalUniforms.testMatrix2x2[1]) * vec4(1.0, 1.0, -1.0, -1.0); + const expectedB: vec4 = vec4(1065353216u, 1073741824u, 3225419776u, 3229614080u); + let _skTemp0 = floatBitsToUint(inputVal.x); + let _skTemp1 = floatBitsToUint(inputVal.xy); + let _skTemp2 = floatBitsToUint(inputVal.xyz); + let _skTemp3 = floatBitsToUint(inputVal); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((_skTemp0 == 1065353216u) && all(_skTemp1 == vec2(1065353216u, 1073741824u))) && all(_skTemp2 == vec3(1065353216u, 1073741824u, 3225419776u))) && all(_skTemp3 == expectedB))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} + +1 error diff --git a/tests/sksl/intrinsics/Floor.asm.frag b/tests/sksl/intrinsics/Floor.asm.frag index ef1e3c541ed7..71408a76b6aa 100644 --- a/tests/sksl/intrinsics/Floor.asm.frag +++ b/tests/sksl/intrinsics/Floor.asm.frag @@ -1,182 +1,182 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testInputs" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %expected "expected" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %expected RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %45 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %53 RelaxedPrecision -OpDecorate %55 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %58 RelaxedPrecision -OpDecorate %65 RelaxedPrecision -OpDecorate %67 RelaxedPrecision -OpDecorate %79 RelaxedPrecision -OpDecorate %86 RelaxedPrecision -OpDecorate %99 RelaxedPrecision -OpDecorate %102 RelaxedPrecision -OpDecorate %103 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testInputs" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %expected "expected" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %expected RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %45 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %53 RelaxedPrecision + OpDecorate %55 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %58 RelaxedPrecision + OpDecorate %65 RelaxedPrecision + OpDecorate %67 RelaxedPrecision + OpDecorate %79 RelaxedPrecision + OpDecorate %86 RelaxedPrecision + OpDecorate %99 RelaxedPrecision + OpDecorate %102 RelaxedPrecision + OpDecorate %103 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float -%float_n2 = OpConstant %float -2 -%float_2 = OpConstant %float 2 -%30 = OpConstantComposite %v4float %float_n2 %float_0 %float_0 %float_2 -%false = OpConstantFalse %bool + %float_n2 = OpConstant %float -2 + %float_2 = OpConstant %float 2 + %30 = OpConstantComposite %v4float %float_n2 %float_0 %float_0 %float_2 + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%v3bool = OpTypeVector %bool 3 -%v4bool = OpTypeVector %bool 4 -%true = OpConstantTrue %bool -%78 = OpConstantComposite %v2float %float_n2 %float_0 -%85 = OpConstantComposite %v3float %float_n2 %float_0 %float_0 -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %v3bool = OpTypeVector %bool 3 + %v4bool = OpTypeVector %bool 4 + %true = OpConstantTrue %bool + %78 = OpConstantComposite %v2float %float_n2 %float_0 + %85 = OpConstantComposite %v3float %float_n2 %float_0 %float_0 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%expected = OpVariable %_ptr_Function_v4float Function -%93 = OpVariable %_ptr_Function_v4float Function -OpStore %expected %30 -%33 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%37 = OpLoad %v4float %33 -%38 = OpCompositeExtract %float %37 0 -%32 = OpExtInst %float %1 Floor %38 -%39 = OpFOrdEqual %bool %32 %float_n2 -OpSelectionMerge %41 None -OpBranchConditional %39 %40 %41 -%40 = OpLabel -%43 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%44 = OpLoad %v4float %43 -%45 = OpVectorShuffle %v2float %44 %44 0 1 -%42 = OpExtInst %v2float %1 Floor %45 -%46 = OpVectorShuffle %v2float %30 %30 0 1 -%47 = OpFOrdEqual %v2bool %42 %46 -%49 = OpAll %bool %47 -OpBranch %41 -%41 = OpLabel -%50 = OpPhi %bool %false %25 %49 %40 -OpSelectionMerge %52 None -OpBranchConditional %50 %51 %52 -%51 = OpLabel -%54 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%55 = OpLoad %v4float %54 -%56 = OpVectorShuffle %v3float %55 %55 0 1 2 -%53 = OpExtInst %v3float %1 Floor %56 -%58 = OpVectorShuffle %v3float %30 %30 0 1 2 -%59 = OpFOrdEqual %v3bool %53 %58 -%61 = OpAll %bool %59 -OpBranch %52 -%52 = OpLabel -%62 = OpPhi %bool %false %41 %61 %51 -OpSelectionMerge %64 None -OpBranchConditional %62 %63 %64 -%63 = OpLabel -%66 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%67 = OpLoad %v4float %66 -%65 = OpExtInst %v4float %1 Floor %67 -%68 = OpFOrdEqual %v4bool %65 %30 -%70 = OpAll %bool %68 -OpBranch %64 -%64 = OpLabel -%71 = OpPhi %bool %false %52 %70 %63 -OpSelectionMerge %73 None -OpBranchConditional %71 %72 %73 -%72 = OpLabel -OpBranch %73 -%73 = OpLabel -%75 = OpPhi %bool %false %64 %true %72 -OpSelectionMerge %77 None -OpBranchConditional %75 %76 %77 -%76 = OpLabel -%79 = OpVectorShuffle %v2float %30 %30 0 1 -%80 = OpFOrdEqual %v2bool %78 %79 -%81 = OpAll %bool %80 -OpBranch %77 -%77 = OpLabel -%82 = OpPhi %bool %false %73 %81 %76 -OpSelectionMerge %84 None -OpBranchConditional %82 %83 %84 -%83 = OpLabel -%86 = OpVectorShuffle %v3float %30 %30 0 1 2 -%87 = OpFOrdEqual %v3bool %85 %86 -%88 = OpAll %bool %87 -OpBranch %84 -%84 = OpLabel -%89 = OpPhi %bool %false %77 %88 %83 -OpSelectionMerge %91 None -OpBranchConditional %89 %90 %91 -%90 = OpLabel -OpBranch %91 -%91 = OpLabel -%92 = OpPhi %bool %false %84 %true %90 -OpSelectionMerge %96 None -OpBranchConditional %92 %94 %95 -%94 = OpLabel -%97 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%99 = OpLoad %v4float %97 -OpStore %93 %99 -OpBranch %96 -%95 = OpLabel -%100 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%102 = OpLoad %v4float %100 -OpStore %93 %102 -OpBranch %96 -%96 = OpLabel -%103 = OpLoad %v4float %93 -OpReturnValue %103 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %expected = OpVariable %_ptr_Function_v4float Function + %93 = OpVariable %_ptr_Function_v4float Function + OpStore %expected %30 + %33 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %37 = OpLoad %v4float %33 + %38 = OpCompositeExtract %float %37 0 + %32 = OpExtInst %float %1 Floor %38 + %39 = OpFOrdEqual %bool %32 %float_n2 + OpSelectionMerge %41 None + OpBranchConditional %39 %40 %41 + %40 = OpLabel + %43 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %44 = OpLoad %v4float %43 + %45 = OpVectorShuffle %v2float %44 %44 0 1 + %42 = OpExtInst %v2float %1 Floor %45 + %46 = OpVectorShuffle %v2float %30 %30 0 1 + %47 = OpFOrdEqual %v2bool %42 %46 + %49 = OpAll %bool %47 + OpBranch %41 + %41 = OpLabel + %50 = OpPhi %bool %false %25 %49 %40 + OpSelectionMerge %52 None + OpBranchConditional %50 %51 %52 + %51 = OpLabel + %54 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %55 = OpLoad %v4float %54 + %56 = OpVectorShuffle %v3float %55 %55 0 1 2 + %53 = OpExtInst %v3float %1 Floor %56 + %58 = OpVectorShuffle %v3float %30 %30 0 1 2 + %59 = OpFOrdEqual %v3bool %53 %58 + %61 = OpAll %bool %59 + OpBranch %52 + %52 = OpLabel + %62 = OpPhi %bool %false %41 %61 %51 + OpSelectionMerge %64 None + OpBranchConditional %62 %63 %64 + %63 = OpLabel + %66 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %67 = OpLoad %v4float %66 + %65 = OpExtInst %v4float %1 Floor %67 + %68 = OpFOrdEqual %v4bool %65 %30 + %70 = OpAll %bool %68 + OpBranch %64 + %64 = OpLabel + %71 = OpPhi %bool %false %52 %70 %63 + OpSelectionMerge %73 None + OpBranchConditional %71 %72 %73 + %72 = OpLabel + OpBranch %73 + %73 = OpLabel + %75 = OpPhi %bool %false %64 %true %72 + OpSelectionMerge %77 None + OpBranchConditional %75 %76 %77 + %76 = OpLabel + %79 = OpVectorShuffle %v2float %30 %30 0 1 + %80 = OpFOrdEqual %v2bool %78 %79 + %81 = OpAll %bool %80 + OpBranch %77 + %77 = OpLabel + %82 = OpPhi %bool %false %73 %81 %76 + OpSelectionMerge %84 None + OpBranchConditional %82 %83 %84 + %83 = OpLabel + %86 = OpVectorShuffle %v3float %30 %30 0 1 2 + %87 = OpFOrdEqual %v3bool %85 %86 + %88 = OpAll %bool %87 + OpBranch %84 + %84 = OpLabel + %89 = OpPhi %bool %false %77 %88 %83 + OpSelectionMerge %91 None + OpBranchConditional %89 %90 %91 + %90 = OpLabel + OpBranch %91 + %91 = OpLabel + %92 = OpPhi %bool %false %84 %true %90 + OpSelectionMerge %96 None + OpBranchConditional %92 %94 %95 + %94 = OpLabel + %97 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %99 = OpLoad %v4float %97 + OpStore %93 %99 + OpBranch %96 + %95 = OpLabel + %100 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %102 = OpLoad %v4float %100 + OpStore %93 %102 + OpBranch %96 + %96 = OpLabel + %103 = OpLoad %v4float %93 + OpReturnValue %103 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Floor.skrp b/tests/sksl/intrinsics/Floor.skrp index c2ab66981898..54312aa2b8df 100644 --- a/tests/sksl/intrinsics/Floor.skrp +++ b/tests/sksl/intrinsics/Floor.skrp @@ -1,55 +1,52 @@ +50 instructions + [immutable slots] -expected(0) = 0xC0000000 (-2.0) -expected(1) = 0 -expected(2) = 0 -expected(3) = 0x40000000 (2.0) +i0 = 0xC0000000 (-2.0) +i1 = 0 +i2 = 0 +i3 = 0x40000000 (2.0) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_uniform $0 = testInputs(0) floor_float $0 = floor($0) -copy_slot_unmasked $1 = expected(0) -cmpeq_float $0 = equal($0, $1) +cmpeq_imm_float $0 = equal($0, 0xC0000000 (-2.0)) copy_2_uniforms $1..2 = testInputs(0..1) floor_2_floats $1..2 = floor($1..2) -copy_2_slots_unmasked $3..4 = expected(0..1) +copy_2_immutables_unmasked $3..4 = i0..1 [0xC0000000 (-2.0), 0] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_3_uniforms $1..3 = testInputs(0..2) floor_3_floats $1..3 = floor($1..3) -copy_3_slots_unmasked $4..6 = expected(0..2) +copy_3_immutables_unmasked $4..6 = i0..2 [0xC0000000 (-2.0), 0, 0] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_4_uniforms $1..4 = testInputs floor_4_floats $1..4 = floor($1..4) -copy_4_slots_unmasked $5..8 = expected +copy_4_immutables_unmasked $5..8 = i0..3 [0xC0000000 (-2.0), 0, 0, 0x40000000 (2.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expected(0) +copy_constant $1 = 0xC0000000 (-2.0) cmpeq_imm_float $1 = equal($1, 0xC0000000 (-2.0)) bitwise_and_int $0 &= $1 -copy_constant $1 = 0xC0000000 (-2.0) -copy_constant $2 = 0 -copy_2_slots_unmasked $3..4 = expected(0..1) +copy_2_immutables_unmasked $1..2 = i0..1 [0xC0000000 (-2.0), 0] +copy_2_immutables_unmasked $3..4 = i0..1 [0xC0000000 (-2.0), 0] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0xC0000000 (-2.0) -splat_2_constants $2..3 = 0 -copy_3_slots_unmasked $4..6 = expected(0..2) +copy_3_immutables_unmasked $1..3 = i0..2 [0xC0000000 (-2.0), 0, 0] +copy_3_immutables_unmasked $4..6 = i0..2 [0xC0000000 (-2.0), 0, 0] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0xC0000000 (-2.0) -splat_2_constants $2..3 = 0 -copy_constant $4 = 0x40000000 (2.0) -copy_4_slots_unmasked $5..8 = expected +copy_4_immutables_unmasked $1..4 = i0..3 [0xC0000000 (-2.0), 0, 0, 0x40000000 (2.0)] +copy_4_immutables_unmasked $5..8 = i0..3 [0xC0000000 (-2.0), 0, 0, 0x40000000 (2.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 diff --git a/tests/sksl/intrinsics/Floor.wgsl b/tests/sksl/intrinsics/Floor.wgsl index 04621969fab4..157cf0724fb0 100644 --- a/tests/sksl/intrinsics/Floor.wgsl +++ b/tests/sksl/intrinsics/Floor.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -19,7 +20,7 @@ fn main(_skParam0: vec2) -> vec4 { let _skTemp1 = floor(_globalUniforms.testInputs.xy); let _skTemp2 = floor(_globalUniforms.testInputs.xyz); let _skTemp3 = floor(_globalUniforms.testInputs); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((_skTemp0 == expected.x && all(_skTemp1 == expected.xy)) && all(_skTemp2 == expected.xyz)) && all(_skTemp3 == expected)) && -2.0 == expected.x) && all(vec2(-2.0, 0.0) == expected.xy)) && all(vec3(-2.0, 0.0, 0.0) == expected.xyz)) && all(vec4(-2.0, 0.0, 0.0, 2.0) == expected))); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((_skTemp0 == expected.x) && all(_skTemp1 == expected.xy)) && all(_skTemp2 == expected.xyz)) && all(_skTemp3 == expected)) && (-2.0 == expected.x)) && all(vec2(-2.0, 0.0) == expected.xy)) && all(vec3(-2.0, 0.0, 0.0) == expected.xyz)) && all(vec4(-2.0, 0.0, 0.0, 2.0) == expected))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/intrinsics/Fma.asm.frag b/tests/sksl/intrinsics/Fma.asm.frag index f7b77d2d6af8..7e113de59b70 100644 --- a/tests/sksl/intrinsics/Fma.asm.frag +++ b/tests/sksl/intrinsics/Fma.asm.frag @@ -1,133 +1,133 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpMemberName %_UniformBuffer 2 "testArray" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %one "one" -OpName %two "two" -OpName %three "three" -OpName %four "four" -OpName %five "five" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %_arr_float_int_5 ArrayStride 16 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %four RelaxedPrecision -OpDecorate %five RelaxedPrecision -OpDecorate %63 RelaxedPrecision -OpDecorate %74 RelaxedPrecision -OpDecorate %76 RelaxedPrecision -OpDecorate %77 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpMemberName %_UniformBuffer 2 "testArray" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %one "one" + OpName %two "two" + OpName %three "three" + OpName %four "four" + OpName %five "five" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %_arr_float_int_5 ArrayStride 16 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %four RelaxedPrecision + OpDecorate %five RelaxedPrecision + OpDecorate %63 RelaxedPrecision + OpDecorate %74 RelaxedPrecision + OpDecorate %76 RelaxedPrecision + OpDecorate %77 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%int = OpTypeInt 32 1 -%int_5 = OpConstant %int 5 + %int = OpTypeInt 32 1 + %int_5 = OpConstant %int 5 %_arr_float_int_5 = OpTypeArray %float %int_5 %_UniformBuffer = OpTypeStruct %v4float %v4float %_arr_float_int_5 %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%18 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%22 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %18 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %22 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%26 = OpTypeFunction %v4float %_ptr_Function_v2float + %26 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_float = OpTypePointer Function %float %_ptr_Uniform__arr_float_int_5 = OpTypePointer Uniform %_arr_float_int_5 -%int_2 = OpConstant %int 2 -%int_0 = OpConstant %int 0 + %int_2 = OpConstant %int 2 + %int_0 = OpConstant %int 0 %_ptr_Uniform_float = OpTypePointer Uniform %float -%int_1 = OpConstant %int 1 -%int_3 = OpConstant %int 3 -%int_4 = OpConstant %int 4 -%false = OpConstantFalse %bool -%float_5 = OpConstant %float 5 -%float_17 = OpConstant %float 17 + %int_1 = OpConstant %int 1 + %int_3 = OpConstant %int 3 + %int_4 = OpConstant %int 4 + %false = OpConstantFalse %bool + %float_5 = OpConstant %float 5 + %float_17 = OpConstant %float 17 %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float %_entrypoint_v = OpFunction %void None %18 -%19 = OpLabel -%23 = OpVariable %_ptr_Function_v2float Function -OpStore %23 %22 -%25 = OpFunctionCall %v4float %main %23 -OpStore %sk_FragColor %25 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %26 -%27 = OpFunctionParameter %_ptr_Function_v2float -%28 = OpLabel -%one = OpVariable %_ptr_Function_float Function -%two = OpVariable %_ptr_Function_float Function -%three = OpVariable %_ptr_Function_float Function -%four = OpVariable %_ptr_Function_float Function -%five = OpVariable %_ptr_Function_float Function -%67 = OpVariable %_ptr_Function_v4float Function -%31 = OpAccessChain %_ptr_Uniform__arr_float_int_5 %10 %int_2 -%35 = OpAccessChain %_ptr_Uniform_float %31 %int_0 -%37 = OpLoad %float %35 -OpStore %one %37 -%39 = OpAccessChain %_ptr_Uniform__arr_float_int_5 %10 %int_2 -%41 = OpAccessChain %_ptr_Uniform_float %39 %int_1 -%42 = OpLoad %float %41 -OpStore %two %42 -%44 = OpAccessChain %_ptr_Uniform__arr_float_int_5 %10 %int_2 -%45 = OpAccessChain %_ptr_Uniform_float %44 %int_2 -%46 = OpLoad %float %45 -OpStore %three %46 -%48 = OpAccessChain %_ptr_Uniform__arr_float_int_5 %10 %int_2 -%50 = OpAccessChain %_ptr_Uniform_float %48 %int_3 -%51 = OpLoad %float %50 -OpStore %four %51 -%53 = OpAccessChain %_ptr_Uniform__arr_float_int_5 %10 %int_2 -%55 = OpAccessChain %_ptr_Uniform_float %53 %int_4 -%56 = OpLoad %float %55 -OpStore %five %56 -%58 = OpExtInst %float %1 Fma %37 %42 %46 -%60 = OpFOrdEqual %bool %58 %float_5 -OpSelectionMerge %62 None -OpBranchConditional %60 %61 %62 -%61 = OpLabel -%63 = OpExtInst %float %1 Fma %46 %51 %56 -%65 = OpFOrdEqual %bool %63 %float_17 -OpBranch %62 -%62 = OpLabel -%66 = OpPhi %bool %false %28 %65 %61 -OpSelectionMerge %71 None -OpBranchConditional %66 %69 %70 -%69 = OpLabel -%72 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%74 = OpLoad %v4float %72 -OpStore %67 %74 -OpBranch %71 -%70 = OpLabel -%75 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%76 = OpLoad %v4float %75 -OpStore %67 %76 -OpBranch %71 -%71 = OpLabel -%77 = OpLoad %v4float %67 -OpReturnValue %77 -OpFunctionEnd + %19 = OpLabel + %23 = OpVariable %_ptr_Function_v2float Function + OpStore %23 %22 + %25 = OpFunctionCall %v4float %main %23 + OpStore %sk_FragColor %25 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %26 + %27 = OpFunctionParameter %_ptr_Function_v2float + %28 = OpLabel + %one = OpVariable %_ptr_Function_float Function + %two = OpVariable %_ptr_Function_float Function + %three = OpVariable %_ptr_Function_float Function + %four = OpVariable %_ptr_Function_float Function + %five = OpVariable %_ptr_Function_float Function + %67 = OpVariable %_ptr_Function_v4float Function + %31 = OpAccessChain %_ptr_Uniform__arr_float_int_5 %10 %int_2 + %35 = OpAccessChain %_ptr_Uniform_float %31 %int_0 + %37 = OpLoad %float %35 + OpStore %one %37 + %39 = OpAccessChain %_ptr_Uniform__arr_float_int_5 %10 %int_2 + %41 = OpAccessChain %_ptr_Uniform_float %39 %int_1 + %42 = OpLoad %float %41 + OpStore %two %42 + %44 = OpAccessChain %_ptr_Uniform__arr_float_int_5 %10 %int_2 + %45 = OpAccessChain %_ptr_Uniform_float %44 %int_2 + %46 = OpLoad %float %45 + OpStore %three %46 + %48 = OpAccessChain %_ptr_Uniform__arr_float_int_5 %10 %int_2 + %50 = OpAccessChain %_ptr_Uniform_float %48 %int_3 + %51 = OpLoad %float %50 + OpStore %four %51 + %53 = OpAccessChain %_ptr_Uniform__arr_float_int_5 %10 %int_2 + %55 = OpAccessChain %_ptr_Uniform_float %53 %int_4 + %56 = OpLoad %float %55 + OpStore %five %56 + %58 = OpExtInst %float %1 Fma %37 %42 %46 + %60 = OpFOrdEqual %bool %58 %float_5 + OpSelectionMerge %62 None + OpBranchConditional %60 %61 %62 + %61 = OpLabel + %63 = OpExtInst %float %1 Fma %46 %51 %56 + %65 = OpFOrdEqual %bool %63 %float_17 + OpBranch %62 + %62 = OpLabel + %66 = OpPhi %bool %false %28 %65 %61 + OpSelectionMerge %71 None + OpBranchConditional %66 %69 %70 + %69 = OpLabel + %72 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %74 = OpLoad %v4float %72 + OpStore %67 %74 + OpBranch %71 + %70 = OpLabel + %75 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %76 = OpLoad %v4float %75 + OpStore %67 %76 + OpBranch %71 + %71 = OpLabel + %77 = OpLoad %v4float %67 + OpReturnValue %77 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Fma.wgsl b/tests/sksl/intrinsics/Fma.wgsl new file mode 100644 index 000000000000..b679173aa1ab --- /dev/null +++ b/tests/sksl/intrinsics/Fma.wgsl @@ -0,0 +1,55 @@ +### Compilation failed: + +error: :12:14 error: uniform storage requires that array elements are aligned to 16 bytes, but array element of type 'f32' has a stride of 4 bytes. Consider using a vector or struct as the element type instead. + testArray: array, + ^^^^^^^^^^^^^ + +:9:1 note: see layout of struct: +/* align(16) size(64) */ struct _GlobalUniforms { +/* offset( 0) align(16) size(16) */ colorGreen : vec4; +/* offset(16) align(16) size(16) */ colorRed : vec4; +/* offset(32) align( 4) size(20) */ testArray : array; +/* offset(52) align( 1) size(12) */ // -- implicit struct size padding --; +/* */ }; +struct _GlobalUniforms { +^^^^^^ + +:14:36 note: '_GlobalUniforms' used in address space 'uniform' here +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; + ^^^^^^^^^^^^^^^ + + +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, + testArray: array, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var one: f32 = _globalUniforms.testArray[0]; + var two: f32 = _globalUniforms.testArray[1]; + var three: f32 = _globalUniforms.testArray[2]; + var four: f32 = f32(_globalUniforms.testArray[3]); + var five: f32 = f32(_globalUniforms.testArray[4]); + let _skTemp0 = fma(one, two, three); + let _skTemp1 = fma(f32(three), four, five); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((_skTemp0 == 5.0) && (_skTemp1 == 17.0))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} + +1 error diff --git a/tests/sksl/intrinsics/Fract.asm.frag b/tests/sksl/intrinsics/Fract.asm.frag index 0e5585866bed..b7b768ebe995 100644 --- a/tests/sksl/intrinsics/Fract.asm.frag +++ b/tests/sksl/intrinsics/Fract.asm.frag @@ -1,129 +1,129 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testInputs" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %77 RelaxedPrecision -OpDecorate %80 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testInputs" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %77 RelaxedPrecision + OpDecorate %80 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%false = OpConstantFalse %bool + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%float_0_75 = OpConstant %float 0.75 -%42 = OpConstantComposite %v2float %float_0_75 %float_0 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%54 = OpConstantComposite %v3float %float_0_75 %float_0 %float_0_75 -%v3bool = OpTypeVector %bool 3 -%float_0_25 = OpConstant %float 0.25 -%65 = OpConstantComposite %v4float %float_0_75 %float_0 %float_0_75 %float_0_25 -%v4bool = OpTypeVector %bool 4 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %float_0_75 = OpConstant %float 0.75 + %42 = OpConstantComposite %v2float %float_0_75 %float_0 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %54 = OpConstantComposite %v3float %float_0_75 %float_0 %float_0_75 + %v3bool = OpTypeVector %bool 3 + %float_0_25 = OpConstant %float 0.25 + %65 = OpConstantComposite %v4float %float_0_75 %float_0 %float_0_75 %float_0_25 + %v4bool = OpTypeVector %bool 4 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%70 = OpVariable %_ptr_Function_v4float Function -%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %28 -%33 = OpCompositeExtract %float %32 0 -%27 = OpExtInst %float %1 Fract %33 -%35 = OpFOrdEqual %bool %27 %float_0_75 -OpSelectionMerge %37 None -OpBranchConditional %35 %36 %37 -%36 = OpLabel -%39 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%40 = OpLoad %v4float %39 -%41 = OpVectorShuffle %v2float %40 %40 0 1 -%38 = OpExtInst %v2float %1 Fract %41 -%43 = OpFOrdEqual %v2bool %38 %42 -%45 = OpAll %bool %43 -OpBranch %37 -%37 = OpLabel -%46 = OpPhi %bool %false %25 %45 %36 -OpSelectionMerge %48 None -OpBranchConditional %46 %47 %48 -%47 = OpLabel -%50 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%51 = OpLoad %v4float %50 -%52 = OpVectorShuffle %v3float %51 %51 0 1 2 -%49 = OpExtInst %v3float %1 Fract %52 -%55 = OpFOrdEqual %v3bool %49 %54 -%57 = OpAll %bool %55 -OpBranch %48 -%48 = OpLabel -%58 = OpPhi %bool %false %37 %57 %47 -OpSelectionMerge %60 None -OpBranchConditional %58 %59 %60 -%59 = OpLabel -%62 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%63 = OpLoad %v4float %62 -%61 = OpExtInst %v4float %1 Fract %63 -%66 = OpFOrdEqual %v4bool %61 %65 -%68 = OpAll %bool %66 -OpBranch %60 -%60 = OpLabel -%69 = OpPhi %bool %false %48 %68 %59 -OpSelectionMerge %74 None -OpBranchConditional %69 %72 %73 -%72 = OpLabel -%75 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%77 = OpLoad %v4float %75 -OpStore %70 %77 -OpBranch %74 -%73 = OpLabel -%78 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%80 = OpLoad %v4float %78 -OpStore %70 %80 -OpBranch %74 -%74 = OpLabel -%81 = OpLoad %v4float %70 -OpReturnValue %81 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %70 = OpVariable %_ptr_Function_v4float Function + %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %28 + %33 = OpCompositeExtract %float %32 0 + %27 = OpExtInst %float %1 Fract %33 + %35 = OpFOrdEqual %bool %27 %float_0_75 + OpSelectionMerge %37 None + OpBranchConditional %35 %36 %37 + %36 = OpLabel + %39 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %40 = OpLoad %v4float %39 + %41 = OpVectorShuffle %v2float %40 %40 0 1 + %38 = OpExtInst %v2float %1 Fract %41 + %43 = OpFOrdEqual %v2bool %38 %42 + %45 = OpAll %bool %43 + OpBranch %37 + %37 = OpLabel + %46 = OpPhi %bool %false %25 %45 %36 + OpSelectionMerge %48 None + OpBranchConditional %46 %47 %48 + %47 = OpLabel + %50 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %51 = OpLoad %v4float %50 + %52 = OpVectorShuffle %v3float %51 %51 0 1 2 + %49 = OpExtInst %v3float %1 Fract %52 + %55 = OpFOrdEqual %v3bool %49 %54 + %57 = OpAll %bool %55 + OpBranch %48 + %48 = OpLabel + %58 = OpPhi %bool %false %37 %57 %47 + OpSelectionMerge %60 None + OpBranchConditional %58 %59 %60 + %59 = OpLabel + %62 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %63 = OpLoad %v4float %62 + %61 = OpExtInst %v4float %1 Fract %63 + %66 = OpFOrdEqual %v4bool %61 %65 + %68 = OpAll %bool %66 + OpBranch %60 + %60 = OpLabel + %69 = OpPhi %bool %false %48 %68 %59 + OpSelectionMerge %74 None + OpBranchConditional %69 %72 %73 + %72 = OpLabel + %75 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %77 = OpLoad %v4float %75 + OpStore %70 %77 + OpBranch %74 + %73 = OpLabel + %78 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %80 = OpLoad %v4float %78 + OpStore %70 %80 + OpBranch %74 + %74 = OpLabel + %81 = OpLoad %v4float %70 + OpReturnValue %81 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Fract.skrp b/tests/sksl/intrinsics/Fract.skrp index 835f1a7cc54a..3eee4f48f946 100644 --- a/tests/sksl/intrinsics/Fract.skrp +++ b/tests/sksl/intrinsics/Fract.skrp @@ -1,8 +1,10 @@ +38 instructions + [immutable slots] -expected(0) = 0x3F400000 (0.75) -expected(1) = 0 -expected(2) = 0x3F400000 (0.75) -expected(3) = 0x3E800000 (0.25) +i0 = 0x3F400000 (0.75) +i1 = 0 +i2 = 0x3F400000 (0.75) +i3 = 0x3E800000 (0.25) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -15,8 +17,7 @@ copy_2_uniforms $5..6 = testInputs(0..1) copy_2_slots_unmasked $7..8 = $5..6 floor_2_floats $7..8 = floor($7..8) sub_2_floats $5..6 -= $7..8 -copy_constant $7 = 0x3F400000 (0.75) -copy_constant $8 = 0 +copy_2_immutables_unmasked $7..8 = i0..1 [0x3F400000 (0.75), 0] cmpeq_2_floats $5..6 = equal($5..6, $7..8) bitwise_and_int $5 &= $6 bitwise_and_int $4 &= $5 @@ -24,9 +25,7 @@ copy_3_uniforms $5..7 = testInputs(0..2) copy_3_slots_unmasked $8..10 = $5..7 floor_3_floats $8..10 = floor($8..10) sub_3_floats $5..7 -= $8..10 -copy_constant $8 = 0x3F400000 (0.75) -copy_constant $9 = 0 -copy_constant $10 = 0x3F400000 (0.75) +copy_3_immutables_unmasked $8..10 = i0..2 [0x3F400000 (0.75), 0, 0x3F400000 (0.75)] cmpeq_3_floats $5..7 = equal($5..7, $8..10) bitwise_and_int $6 &= $7 bitwise_and_int $5 &= $6 @@ -35,14 +34,14 @@ copy_4_uniforms $5..8 = testInputs copy_4_slots_unmasked $9..12 = $5..8 floor_4_floats $9..12 = floor($9..12) sub_4_floats $5..8 -= $9..12 -copy_4_slots_unmasked $9..12 = expected +copy_4_immutables_unmasked $9..12 = i0..3 [0x3F400000 (0.75), 0, 0x3F400000 (0.75), 0x3E800000 (0.25)] cmpeq_4_floats $5..8 = equal($5..8, $9..12) bitwise_and_2_ints $5..6 &= $7..8 bitwise_and_int $5 &= $6 bitwise_and_int $4 &= $5 -branch_if_no_active_lanes_eq branch +3 (label 0 at #40) if no lanes of $4 == 0xFFFFFFFF +branch_if_no_active_lanes_eq branch +3 (label 0 at #37) if no lanes of $4 == 0xFFFFFFFF copy_4_uniforms $0..3 = colorGreen -jump jump +3 (label 1 at #42) +jump jump +3 (label 1 at #39) label label 0 copy_4_uniforms $0..3 = colorRed label label 0x00000001 diff --git a/tests/sksl/intrinsics/Fract.wgsl b/tests/sksl/intrinsics/Fract.wgsl index 04f628533783..80ff66f95d60 100644 --- a/tests/sksl/intrinsics/Fract.wgsl +++ b/tests/sksl/intrinsics/Fract.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -19,7 +20,7 @@ fn main(_skParam0: vec2) -> vec4 { let _skTemp1 = fract(_globalUniforms.testInputs.xy); let _skTemp2 = fract(_globalUniforms.testInputs.xyz); let _skTemp3 = fract(_globalUniforms.testInputs); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((_skTemp0 == 0.75 && all(_skTemp1 == vec2(0.75, 0.0))) && all(_skTemp2 == vec3(0.75, 0.0, 0.75))) && all(_skTemp3 == expected))); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((_skTemp0 == 0.75) && all(_skTemp1 == vec2(0.75, 0.0))) && all(_skTemp2 == vec3(0.75, 0.0, 0.75))) && all(_skTemp3 == expected))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/intrinsics/Frexp.asm.frag b/tests/sksl/intrinsics/Frexp.asm.frag index 21f4d747264e..d960d1223bdc 100644 --- a/tests/sksl/intrinsics/Frexp.asm.frag +++ b/tests/sksl/intrinsics/Frexp.asm.frag @@ -1,198 +1,198 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %value "value" -OpName %exp "exp" -OpName %result "result" -OpName %ok "ok" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %35 RelaxedPrecision -OpDecorate %119 RelaxedPrecision -OpDecorate %125 RelaxedPrecision -OpDecorate %127 RelaxedPrecision -OpDecorate %128 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %value "value" + OpName %exp "exp" + OpName %result "result" + OpName %ok "ok" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %35 RelaxedPrecision + OpDecorate %119 RelaxedPrecision + OpDecorate %125 RelaxedPrecision + OpDecorate %127 RelaxedPrecision + OpDecorate %128 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%float_6 = OpConstant %float 6 -%v4int = OpTypeVector %int 4 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %float_6 = OpConstant %float 6 + %v4int = OpTypeVector %int 4 %_ptr_Function_v4int = OpTypePointer Function %v4int -%v4bool = OpTypeVector %bool 4 + %v4bool = OpTypeVector %bool 4 %_ptr_Function_v4bool = OpTypePointer Function %v4bool %_ptr_Function_int = OpTypePointer Function %int %_ptr_Function_float = OpTypePointer Function %float -%false = OpConstantFalse %bool -%float_0_75 = OpConstant %float 0.75 -%int_3 = OpConstant %int 3 + %false = OpConstantFalse %bool + %float_0_75 = OpConstant %float 0.75 + %int_3 = OpConstant %int 3 %_ptr_Function_bool = OpTypePointer Function %bool -%v2int = OpTypeVector %int 2 + %v2int = OpTypeVector %int 2 %_ptr_Function_v2int = OpTypePointer Function %v2int -%int_1 = OpConstant %int 1 -%v3float = OpTypeVector %float 3 -%v3int = OpTypeVector %int 3 + %int_1 = OpConstant %int 1 + %v3float = OpTypeVector %float 3 + %v3int = OpTypeVector %int 3 %_ptr_Function_v3int = OpTypePointer Function %v3int -%int_2 = OpConstant %int 2 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%value = OpVariable %_ptr_Function_v4float Function -%exp = OpVariable %_ptr_Function_v4int Function -%result = OpVariable %_ptr_Function_v4float Function -%ok = OpVariable %_ptr_Function_v4bool Function -%47 = OpVariable %_ptr_Function_int Function -%68 = OpVariable %_ptr_Function_v2int Function -%89 = OpVariable %_ptr_Function_v3int Function -%108 = OpVariable %_ptr_Function_v4int Function -%120 = OpVariable %_ptr_Function_v4float Function -%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %28 -%33 = OpVectorShuffle %v4float %32 %32 1 1 1 1 -%35 = OpVectorTimesScalar %v4float %33 %float_6 -OpStore %value %35 -%44 = OpCompositeExtract %float %35 0 -%45 = OpAccessChain %_ptr_Function_int %exp %int_0 -%43 = OpExtInst %float %1 Frexp %44 %47 -%48 = OpLoad %int %47 -OpStore %45 %48 -%49 = OpAccessChain %_ptr_Function_float %result %int_0 -OpStore %49 %43 -%52 = OpLoad %v4float %result -%53 = OpCompositeExtract %float %52 0 -%55 = OpFOrdEqual %bool %53 %float_0_75 -OpSelectionMerge %57 None -OpBranchConditional %55 %56 %57 -%56 = OpLabel -%58 = OpLoad %v4int %exp -%59 = OpCompositeExtract %int %58 0 -%61 = OpIEqual %bool %59 %int_3 -OpBranch %57 -%57 = OpLabel -%62 = OpPhi %bool %false %25 %61 %56 -%63 = OpAccessChain %_ptr_Function_bool %ok %int_0 -OpStore %63 %62 -%66 = OpLoad %v4float %value -%67 = OpVectorShuffle %v2float %66 %66 0 1 -%65 = OpExtInst %v2float %1 Frexp %67 %68 -%71 = OpLoad %v2int %68 -%72 = OpLoad %v4int %exp -%73 = OpVectorShuffle %v4int %72 %71 4 5 2 3 -OpStore %exp %73 -%74 = OpLoad %v4float %result -%75 = OpVectorShuffle %v4float %74 %65 4 5 2 3 -OpStore %result %75 -%76 = OpCompositeExtract %float %75 1 -%77 = OpFOrdEqual %bool %76 %float_0_75 -OpSelectionMerge %79 None -OpBranchConditional %77 %78 %79 -%78 = OpLabel -%80 = OpCompositeExtract %int %73 1 -%81 = OpIEqual %bool %80 %int_3 -OpBranch %79 -%79 = OpLabel -%82 = OpPhi %bool %false %57 %81 %78 -%83 = OpAccessChain %_ptr_Function_bool %ok %int_1 -OpStore %83 %82 -%86 = OpLoad %v4float %value -%87 = OpVectorShuffle %v3float %86 %86 0 1 2 -%85 = OpExtInst %v3float %1 Frexp %87 %89 -%92 = OpLoad %v3int %89 -%93 = OpLoad %v4int %exp -%94 = OpVectorShuffle %v4int %93 %92 4 5 6 3 -OpStore %exp %94 -%95 = OpLoad %v4float %result -%96 = OpVectorShuffle %v4float %95 %85 4 5 6 3 -OpStore %result %96 -%97 = OpCompositeExtract %float %96 2 -%98 = OpFOrdEqual %bool %97 %float_0_75 -OpSelectionMerge %100 None -OpBranchConditional %98 %99 %100 -%99 = OpLabel -%101 = OpCompositeExtract %int %94 2 -%102 = OpIEqual %bool %101 %int_3 -OpBranch %100 -%100 = OpLabel -%103 = OpPhi %bool %false %79 %102 %99 -%104 = OpAccessChain %_ptr_Function_bool %ok %int_2 -OpStore %104 %103 -%107 = OpLoad %v4float %value -%106 = OpExtInst %v4float %1 Frexp %107 %108 -%109 = OpLoad %v4int %108 -OpStore %exp %109 -OpStore %result %106 -%110 = OpCompositeExtract %float %106 3 -%111 = OpFOrdEqual %bool %110 %float_0_75 -OpSelectionMerge %113 None -OpBranchConditional %111 %112 %113 -%112 = OpLabel -%114 = OpCompositeExtract %int %109 3 -%115 = OpIEqual %bool %114 %int_3 -OpBranch %113 -%113 = OpLabel -%116 = OpPhi %bool %false %100 %115 %112 -%117 = OpAccessChain %_ptr_Function_bool %ok %int_3 -OpStore %117 %116 -%119 = OpLoad %v4bool %ok -%118 = OpAll %bool %119 -OpSelectionMerge %123 None -OpBranchConditional %118 %121 %122 -%121 = OpLabel -%124 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%125 = OpLoad %v4float %124 -OpStore %120 %125 -OpBranch %123 -%122 = OpLabel -%126 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%127 = OpLoad %v4float %126 -OpStore %120 %127 -OpBranch %123 -%123 = OpLabel -%128 = OpLoad %v4float %120 -OpReturnValue %128 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %value = OpVariable %_ptr_Function_v4float Function + %exp = OpVariable %_ptr_Function_v4int Function + %result = OpVariable %_ptr_Function_v4float Function + %ok = OpVariable %_ptr_Function_v4bool Function + %47 = OpVariable %_ptr_Function_int Function + %68 = OpVariable %_ptr_Function_v2int Function + %89 = OpVariable %_ptr_Function_v3int Function + %108 = OpVariable %_ptr_Function_v4int Function + %120 = OpVariable %_ptr_Function_v4float Function + %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %28 + %33 = OpVectorShuffle %v4float %32 %32 1 1 1 1 + %35 = OpVectorTimesScalar %v4float %33 %float_6 + OpStore %value %35 + %44 = OpCompositeExtract %float %35 0 + %45 = OpAccessChain %_ptr_Function_int %exp %int_0 + %43 = OpExtInst %float %1 Frexp %44 %47 + %48 = OpLoad %int %47 + OpStore %45 %48 + %49 = OpAccessChain %_ptr_Function_float %result %int_0 + OpStore %49 %43 + %52 = OpLoad %v4float %result + %53 = OpCompositeExtract %float %52 0 + %55 = OpFOrdEqual %bool %53 %float_0_75 + OpSelectionMerge %57 None + OpBranchConditional %55 %56 %57 + %56 = OpLabel + %58 = OpLoad %v4int %exp + %59 = OpCompositeExtract %int %58 0 + %61 = OpIEqual %bool %59 %int_3 + OpBranch %57 + %57 = OpLabel + %62 = OpPhi %bool %false %25 %61 %56 + %63 = OpAccessChain %_ptr_Function_bool %ok %int_0 + OpStore %63 %62 + %66 = OpLoad %v4float %value + %67 = OpVectorShuffle %v2float %66 %66 0 1 + %65 = OpExtInst %v2float %1 Frexp %67 %68 + %71 = OpLoad %v2int %68 + %72 = OpLoad %v4int %exp + %73 = OpVectorShuffle %v4int %72 %71 4 5 2 3 + OpStore %exp %73 + %74 = OpLoad %v4float %result + %75 = OpVectorShuffle %v4float %74 %65 4 5 2 3 + OpStore %result %75 + %76 = OpCompositeExtract %float %75 1 + %77 = OpFOrdEqual %bool %76 %float_0_75 + OpSelectionMerge %79 None + OpBranchConditional %77 %78 %79 + %78 = OpLabel + %80 = OpCompositeExtract %int %73 1 + %81 = OpIEqual %bool %80 %int_3 + OpBranch %79 + %79 = OpLabel + %82 = OpPhi %bool %false %57 %81 %78 + %83 = OpAccessChain %_ptr_Function_bool %ok %int_1 + OpStore %83 %82 + %86 = OpLoad %v4float %value + %87 = OpVectorShuffle %v3float %86 %86 0 1 2 + %85 = OpExtInst %v3float %1 Frexp %87 %89 + %92 = OpLoad %v3int %89 + %93 = OpLoad %v4int %exp + %94 = OpVectorShuffle %v4int %93 %92 4 5 6 3 + OpStore %exp %94 + %95 = OpLoad %v4float %result + %96 = OpVectorShuffle %v4float %95 %85 4 5 6 3 + OpStore %result %96 + %97 = OpCompositeExtract %float %96 2 + %98 = OpFOrdEqual %bool %97 %float_0_75 + OpSelectionMerge %100 None + OpBranchConditional %98 %99 %100 + %99 = OpLabel + %101 = OpCompositeExtract %int %94 2 + %102 = OpIEqual %bool %101 %int_3 + OpBranch %100 + %100 = OpLabel + %103 = OpPhi %bool %false %79 %102 %99 + %104 = OpAccessChain %_ptr_Function_bool %ok %int_2 + OpStore %104 %103 + %107 = OpLoad %v4float %value + %106 = OpExtInst %v4float %1 Frexp %107 %108 + %109 = OpLoad %v4int %108 + OpStore %exp %109 + OpStore %result %106 + %110 = OpCompositeExtract %float %106 3 + %111 = OpFOrdEqual %bool %110 %float_0_75 + OpSelectionMerge %113 None + OpBranchConditional %111 %112 %113 + %112 = OpLabel + %114 = OpCompositeExtract %int %109 3 + %115 = OpIEqual %bool %114 %int_3 + OpBranch %113 + %113 = OpLabel + %116 = OpPhi %bool %false %100 %115 %112 + %117 = OpAccessChain %_ptr_Function_bool %ok %int_3 + OpStore %117 %116 + %119 = OpLoad %v4bool %ok + %118 = OpAll %bool %119 + OpSelectionMerge %123 None + OpBranchConditional %118 %121 %122 + %121 = OpLabel + %124 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %125 = OpLoad %v4float %124 + OpStore %120 %125 + OpBranch %123 + %122 = OpLabel + %126 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %127 = OpLoad %v4float %126 + OpStore %120 %127 + OpBranch %123 + %123 = OpLabel + %128 = OpLoad %v4float %120 + OpReturnValue %128 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Frexp.metal b/tests/sksl/intrinsics/Frexp.metal index 9d011eeaf46a..5d1f252e5635 100644 --- a/tests/sksl/intrinsics/Frexp.metal +++ b/tests/sksl/intrinsics/Frexp.metal @@ -10,44 +10,28 @@ struct Inputs { struct Outputs { half4 sk_FragColor [[color(0)]]; }; -float _skOutParamHelper0_frexp(float _var0, thread int4& _0_exp) { - int _var1; - float _skResult = frexp(_var0, _var1); - _0_exp.x = _var1; - return _skResult; -} -float2 _skOutParamHelper1_frexp(float2 _var0, thread int4& _0_exp) { - int2 _var1; - float2 _skResult = frexp(_var0, _var1); - _0_exp.xy = _var1; - return _skResult; -} -float3 _skOutParamHelper2_frexp(float3 _var0, thread int4& _0_exp) { - int3 _var1; - float3 _skResult = frexp(_var0, _var1); - _0_exp.xyz = _var1; - return _skResult; -} -float4 _skOutParamHelper3_frexp(float4 _var0, thread int4& _0_exp) { - int4 _var1; - float4 _skResult = frexp(_var0, _var1); - _0_exp = _var1; - return _skResult; -} fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) { Outputs _out; (void)_out; + int _skTemp0; + float _skTemp1; + int2 _skTemp2; + float2 _skTemp3; + int3 _skTemp4; + float3 _skTemp5; + int4 _skTemp6; + float4 _skTemp7; float4 value = float4(_uniforms.colorGreen.yyyy * 6.0h); int4 _0_exp; float4 result; bool4 ok; - result.x = _skOutParamHelper0_frexp(value.x, _0_exp); + result.x = ((_skTemp1 = frexp(value.x, _skTemp0)), (_0_exp.x = _skTemp0), _skTemp1); ok.x = result.x == 0.75 && _0_exp.x == 3; - result.xy = _skOutParamHelper1_frexp(value.xy, _0_exp); + result.xy = ((_skTemp3 = frexp(value.xy, _skTemp2)), (_0_exp.xy = _skTemp2), _skTemp3); ok.y = result.y == 0.75 && _0_exp.y == 3; - result.xyz = _skOutParamHelper2_frexp(value.xyz, _0_exp); + result.xyz = ((_skTemp5 = frexp(value.xyz, _skTemp4)), (_0_exp.xyz = _skTemp4), _skTemp5); ok.z = result.z == 0.75 && _0_exp.z == 3; - result = _skOutParamHelper3_frexp(value, _0_exp); + result = ((_skTemp7 = frexp(value, _skTemp6)), (_0_exp = _skTemp6), _skTemp7); ok.w = result.w == 0.75 && _0_exp.w == 3; _out.sk_FragColor = all(ok) ? _uniforms.colorGreen : _uniforms.colorRed; return _out; diff --git a/tests/sksl/intrinsics/Frexp.wgsl b/tests/sksl/intrinsics/Frexp.wgsl new file mode 100644 index 000000000000..b03c4ebbfdf0 --- /dev/null +++ b/tests/sksl/intrinsics/Frexp.wgsl @@ -0,0 +1,55 @@ +### Compilation failed: + +error: :21:20 error: no matching call to frexp(f32, i32) + +2 candidate functions: + frexp(T) -> __frexp_result_T where: T is abstract-float, f32 or f16 + frexp(vecN) -> __frexp_result_vecN_T where: T is abstract-float, f32 or f16 + + let _skTemp0 = frexp(value.x, _0_exp.x); + ^^^^^^^^^^^^^^^^^^^^^^^^ + + +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var value: vec4 = vec4(_globalUniforms.colorGreen.yyyy * 6.0); + var _0_exp: vec4; + var result: vec4; + var ok: vec4; + let _skTemp0 = frexp(value.x, _0_exp.x); + result.x = _skTemp0; + ok.x = (result.x == 0.75) && (_0_exp.x == 3); + let _skTemp1 = frexp(value.xy, _0_exp.xy); + result = vec4((_skTemp1), result.zw).xyzw; + ok.y = (result.y == 0.75) && (_0_exp.y == 3); + let _skTemp2 = frexp(value.xyz, _0_exp.xyz); + result = vec4((_skTemp2), result.w).xyzw; + ok.z = (result.z == 0.75) && (_0_exp.z == 3); + let _skTemp3 = frexp(value, _0_exp); + result = _skTemp3; + ok.w = (result.w == 0.75) && (_0_exp.w == 3); + let _skTemp4 = all(ok); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(_skTemp4)); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} + +1 error diff --git a/tests/sksl/intrinsics/Fwidth.asm.frag b/tests/sksl/intrinsics/Fwidth.asm.frag index 46946f7db667..6446e6225ee5 100644 --- a/tests/sksl/intrinsics/Fwidth.asm.frag +++ b/tests/sksl/intrinsics/Fwidth.asm.frag @@ -1,210 +1,210 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testInputs" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %expected "expected" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %expected RelaxedPrecision -OpDecorate %30 RelaxedPrecision -OpDecorate %35 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %51 RelaxedPrecision -OpDecorate %53 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %63 RelaxedPrecision -OpDecorate %65 RelaxedPrecision -OpDecorate %126 RelaxedPrecision -OpDecorate %129 RelaxedPrecision -OpDecorate %130 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testInputs" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %expected "expected" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %expected RelaxedPrecision + OpDecorate %30 RelaxedPrecision + OpDecorate %35 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %53 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %63 RelaxedPrecision + OpDecorate %65 RelaxedPrecision + OpDecorate %126 RelaxedPrecision + OpDecorate %129 RelaxedPrecision + OpDecorate %130 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float -%28 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 -%false = OpConstantFalse %bool + %28 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%v3bool = OpTypeVector %bool 3 -%v4bool = OpTypeVector %bool 4 -%float_1 = OpConstant %float 1 -%77 = OpConstantComposite %v2float %float_1 %float_1 -%88 = OpConstantComposite %v2float %float_1 %float_0 -%108 = OpConstantComposite %v2float %float_0 %float_1 -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %v3bool = OpTypeVector %bool 3 + %v4bool = OpTypeVector %bool 4 + %float_1 = OpConstant %float 1 + %77 = OpConstantComposite %v2float %float_1 %float_1 + %88 = OpConstantComposite %v2float %float_1 %float_0 + %108 = OpConstantComposite %v2float %float_0 %float_1 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%expected = OpVariable %_ptr_Function_v4float Function -%120 = OpVariable %_ptr_Function_v4float Function -OpStore %expected %28 -%31 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%35 = OpLoad %v4float %31 -%36 = OpCompositeExtract %float %35 0 -%30 = OpDPdx %float %36 -%37 = OpFOrdEqual %bool %30 %float_0 -OpSelectionMerge %39 None -OpBranchConditional %37 %38 %39 -%38 = OpLabel -%41 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%42 = OpLoad %v4float %41 -%43 = OpVectorShuffle %v2float %42 %42 0 1 -%40 = OpDPdx %v2float %43 -%44 = OpVectorShuffle %v2float %28 %28 0 1 -%45 = OpFOrdEqual %v2bool %40 %44 -%47 = OpAll %bool %45 -OpBranch %39 -%39 = OpLabel -%48 = OpPhi %bool %false %25 %47 %38 -OpSelectionMerge %50 None -OpBranchConditional %48 %49 %50 -%49 = OpLabel -%52 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%53 = OpLoad %v4float %52 -%54 = OpVectorShuffle %v3float %53 %53 0 1 2 -%51 = OpDPdx %v3float %54 -%56 = OpVectorShuffle %v3float %28 %28 0 1 2 -%57 = OpFOrdEqual %v3bool %51 %56 -%59 = OpAll %bool %57 -OpBranch %50 -%50 = OpLabel -%60 = OpPhi %bool %false %39 %59 %49 -OpSelectionMerge %62 None -OpBranchConditional %60 %61 %62 -%61 = OpLabel -%64 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%65 = OpLoad %v4float %64 -%63 = OpDPdx %v4float %65 -%66 = OpFOrdEqual %v4bool %63 %28 -%68 = OpAll %bool %66 -OpBranch %62 -%62 = OpLabel -%69 = OpPhi %bool %false %50 %68 %61 -OpSelectionMerge %71 None -OpBranchConditional %69 %70 %71 -%70 = OpLabel -%74 = OpLoad %v2float %24 -%75 = OpVectorShuffle %v2float %74 %74 0 0 -%73 = OpFwidth %v2float %75 -%72 = OpExtInst %v2float %1 FSign %73 -%78 = OpFOrdEqual %v2bool %72 %77 -%79 = OpAll %bool %78 -OpBranch %71 -%71 = OpLabel -%80 = OpPhi %bool %false %62 %79 %70 -OpSelectionMerge %82 None -OpBranchConditional %80 %81 %82 -%81 = OpLabel -%85 = OpLoad %v2float %24 -%86 = OpCompositeExtract %float %85 0 -%87 = OpCompositeConstruct %v2float %86 %float_1 -%84 = OpFwidth %v2float %87 -%83 = OpExtInst %v2float %1 FSign %84 -%89 = OpFOrdEqual %v2bool %83 %88 -%90 = OpAll %bool %89 -OpBranch %82 -%82 = OpLabel -%91 = OpPhi %bool %false %71 %90 %81 -OpSelectionMerge %93 None -OpBranchConditional %91 %92 %93 -%92 = OpLabel -%96 = OpLoad %v2float %24 -%97 = OpVectorShuffle %v2float %96 %96 1 1 -%95 = OpFwidth %v2float %97 -%94 = OpExtInst %v2float %1 FSign %95 -%98 = OpFOrdEqual %v2bool %94 %77 -%99 = OpAll %bool %98 -OpBranch %93 -%93 = OpLabel -%100 = OpPhi %bool %false %82 %99 %92 -OpSelectionMerge %102 None -OpBranchConditional %100 %101 %102 -%101 = OpLabel -%105 = OpLoad %v2float %24 -%106 = OpCompositeExtract %float %105 1 -%107 = OpCompositeConstruct %v2float %float_0 %106 -%104 = OpFwidth %v2float %107 -%103 = OpExtInst %v2float %1 FSign %104 -%109 = OpFOrdEqual %v2bool %103 %108 -%110 = OpAll %bool %109 -OpBranch %102 -%102 = OpLabel -%111 = OpPhi %bool %false %93 %110 %101 -OpSelectionMerge %113 None -OpBranchConditional %111 %112 %113 -%112 = OpLabel -%116 = OpLoad %v2float %24 -%115 = OpFwidth %v2float %116 -%114 = OpExtInst %v2float %1 FSign %115 -%117 = OpFOrdEqual %v2bool %114 %77 -%118 = OpAll %bool %117 -OpBranch %113 -%113 = OpLabel -%119 = OpPhi %bool %false %102 %118 %112 -OpSelectionMerge %123 None -OpBranchConditional %119 %121 %122 -%121 = OpLabel -%124 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%126 = OpLoad %v4float %124 -OpStore %120 %126 -OpBranch %123 -%122 = OpLabel -%127 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%129 = OpLoad %v4float %127 -OpStore %120 %129 -OpBranch %123 -%123 = OpLabel -%130 = OpLoad %v4float %120 -OpReturnValue %130 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %expected = OpVariable %_ptr_Function_v4float Function + %120 = OpVariable %_ptr_Function_v4float Function + OpStore %expected %28 + %31 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %35 = OpLoad %v4float %31 + %36 = OpCompositeExtract %float %35 0 + %30 = OpDPdx %float %36 + %37 = OpFOrdEqual %bool %30 %float_0 + OpSelectionMerge %39 None + OpBranchConditional %37 %38 %39 + %38 = OpLabel + %41 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %42 = OpLoad %v4float %41 + %43 = OpVectorShuffle %v2float %42 %42 0 1 + %40 = OpDPdx %v2float %43 + %44 = OpVectorShuffle %v2float %28 %28 0 1 + %45 = OpFOrdEqual %v2bool %40 %44 + %47 = OpAll %bool %45 + OpBranch %39 + %39 = OpLabel + %48 = OpPhi %bool %false %25 %47 %38 + OpSelectionMerge %50 None + OpBranchConditional %48 %49 %50 + %49 = OpLabel + %52 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %53 = OpLoad %v4float %52 + %54 = OpVectorShuffle %v3float %53 %53 0 1 2 + %51 = OpDPdx %v3float %54 + %56 = OpVectorShuffle %v3float %28 %28 0 1 2 + %57 = OpFOrdEqual %v3bool %51 %56 + %59 = OpAll %bool %57 + OpBranch %50 + %50 = OpLabel + %60 = OpPhi %bool %false %39 %59 %49 + OpSelectionMerge %62 None + OpBranchConditional %60 %61 %62 + %61 = OpLabel + %64 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %65 = OpLoad %v4float %64 + %63 = OpDPdx %v4float %65 + %66 = OpFOrdEqual %v4bool %63 %28 + %68 = OpAll %bool %66 + OpBranch %62 + %62 = OpLabel + %69 = OpPhi %bool %false %50 %68 %61 + OpSelectionMerge %71 None + OpBranchConditional %69 %70 %71 + %70 = OpLabel + %74 = OpLoad %v2float %24 + %75 = OpVectorShuffle %v2float %74 %74 0 0 + %73 = OpFwidth %v2float %75 + %72 = OpExtInst %v2float %1 FSign %73 + %78 = OpFOrdEqual %v2bool %72 %77 + %79 = OpAll %bool %78 + OpBranch %71 + %71 = OpLabel + %80 = OpPhi %bool %false %62 %79 %70 + OpSelectionMerge %82 None + OpBranchConditional %80 %81 %82 + %81 = OpLabel + %85 = OpLoad %v2float %24 + %86 = OpCompositeExtract %float %85 0 + %87 = OpCompositeConstruct %v2float %86 %float_1 + %84 = OpFwidth %v2float %87 + %83 = OpExtInst %v2float %1 FSign %84 + %89 = OpFOrdEqual %v2bool %83 %88 + %90 = OpAll %bool %89 + OpBranch %82 + %82 = OpLabel + %91 = OpPhi %bool %false %71 %90 %81 + OpSelectionMerge %93 None + OpBranchConditional %91 %92 %93 + %92 = OpLabel + %96 = OpLoad %v2float %24 + %97 = OpVectorShuffle %v2float %96 %96 1 1 + %95 = OpFwidth %v2float %97 + %94 = OpExtInst %v2float %1 FSign %95 + %98 = OpFOrdEqual %v2bool %94 %77 + %99 = OpAll %bool %98 + OpBranch %93 + %93 = OpLabel + %100 = OpPhi %bool %false %82 %99 %92 + OpSelectionMerge %102 None + OpBranchConditional %100 %101 %102 + %101 = OpLabel + %105 = OpLoad %v2float %24 + %106 = OpCompositeExtract %float %105 1 + %107 = OpCompositeConstruct %v2float %float_0 %106 + %104 = OpFwidth %v2float %107 + %103 = OpExtInst %v2float %1 FSign %104 + %109 = OpFOrdEqual %v2bool %103 %108 + %110 = OpAll %bool %109 + OpBranch %102 + %102 = OpLabel + %111 = OpPhi %bool %false %93 %110 %101 + OpSelectionMerge %113 None + OpBranchConditional %111 %112 %113 + %112 = OpLabel + %116 = OpLoad %v2float %24 + %115 = OpFwidth %v2float %116 + %114 = OpExtInst %v2float %1 FSign %115 + %117 = OpFOrdEqual %v2bool %114 %77 + %118 = OpAll %bool %117 + OpBranch %113 + %113 = OpLabel + %119 = OpPhi %bool %false %102 %118 %112 + OpSelectionMerge %123 None + OpBranchConditional %119 %121 %122 + %121 = OpLabel + %124 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %126 = OpLoad %v4float %124 + OpStore %120 %126 + OpBranch %123 + %122 = OpLabel + %127 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %129 = OpLoad %v4float %127 + OpStore %120 %129 + OpBranch %123 + %123 = OpLabel + %130 = OpLoad %v4float %120 + OpReturnValue %130 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Fwidth.wgsl b/tests/sksl/intrinsics/Fwidth.wgsl new file mode 100644 index 000000000000..2eb175e8cac0 --- /dev/null +++ b/tests/sksl/intrinsics/Fwidth.wgsl @@ -0,0 +1,40 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + testInputs: vec4, + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var expected: vec4 = vec4(0.0); + let _skTemp0 = dpdx(_globalUniforms.testInputs.x); + let _skTemp1 = dpdx(_globalUniforms.testInputs.xy); + let _skTemp2 = dpdx(_globalUniforms.testInputs.xyz); + let _skTemp3 = dpdx(_globalUniforms.testInputs); + let _skTemp4 = fwidth(coords.xx); + let _skTemp5 = sign(_skTemp4); + let _skTemp6 = fwidth(vec2(coords.x, 1.0)); + let _skTemp7 = sign(_skTemp6); + let _skTemp8 = fwidth(coords.yy); + let _skTemp9 = sign(_skTemp8); + let _skTemp10 = fwidth(vec2(0.0, coords.y)); + let _skTemp11 = sign(_skTemp10); + let _skTemp12 = fwidth(coords); + let _skTemp13 = sign(_skTemp12); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((((_skTemp0 == expected.x) && all(_skTemp1 == expected.xy)) && all(_skTemp2 == expected.xyz)) && all(_skTemp3 == expected)) && all(_skTemp5 == vec2(1.0))) && all(_skTemp7 == vec2(1.0, 0.0))) && all(_skTemp9 == vec2(1.0))) && all(_skTemp11 == vec2(0.0, 1.0))) && all(_skTemp13 == vec2(1.0)))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/intrinsics/GreaterThan.asm.frag b/tests/sksl/intrinsics/GreaterThan.asm.frag index 7e4f057b6825..5e12ebf1c896 100644 --- a/tests/sksl/intrinsics/GreaterThan.asm.frag +++ b/tests/sksl/intrinsics/GreaterThan.asm.frag @@ -1,126 +1,126 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "a" -OpMemberName %_UniformBuffer 1 "b" -OpMemberName %_UniformBuffer 2 "c" -OpMemberName %_UniformBuffer 3 "d" -OpMemberName %_UniformBuffer 4 "e" -OpMemberName %_UniformBuffer 5 "f" -OpName %main "main" -OpName %expectFFTT "expectFFTT" -OpName %expectTTFF "expectTTFF" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 3 Offset 40 -OpMemberDecorate %_UniformBuffer 4 Offset 48 -OpMemberDecorate %_UniformBuffer 5 Offset 64 -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %32 RelaxedPrecision -OpDecorate %35 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %65 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %75 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "a" + OpMemberName %_UniformBuffer 1 "b" + OpMemberName %_UniformBuffer 2 "c" + OpMemberName %_UniformBuffer 3 "d" + OpMemberName %_UniformBuffer 4 "e" + OpMemberName %_UniformBuffer 5 "f" + OpName %main "main" + OpName %expectFFTT "expectFFTT" + OpName %expectTTFF "expectTTFF" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 3 Offset 40 + OpMemberDecorate %_UniformBuffer 4 Offset 48 + OpMemberDecorate %_UniformBuffer 5 Offset 64 + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %32 RelaxedPrecision + OpDecorate %35 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %65 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %75 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%uint = OpTypeInt 32 0 -%v2uint = OpTypeVector %uint 2 -%int = OpTypeInt 32 1 -%v3int = OpTypeVector %int 3 + %uint = OpTypeInt 32 0 + %v2uint = OpTypeVector %uint 2 + %int = OpTypeInt 32 1 + %v3int = OpTypeVector %int 3 %_UniformBuffer = OpTypeStruct %v4float %v4float %v2uint %v2uint %v3int %v3int %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%18 = OpTypeFunction %void -%v4bool = OpTypeVector %bool 4 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %18 = OpTypeFunction %void + %v4bool = OpTypeVector %bool 4 %_ptr_Function_v4bool = OpTypePointer Function %v4bool -%false = OpConstantFalse %bool -%true = OpConstantTrue %bool -%25 = OpConstantComposite %v4bool %false %false %true %true -%27 = OpConstantComposite %v4bool %true %true %false %false + %false = OpConstantFalse %bool + %true = OpConstantTrue %bool + %25 = OpConstantComposite %v4bool %false %false %true %true + %27 = OpConstantComposite %v4bool %true %true %false %false %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 %_ptr_Output_float = OpTypePointer Output %float %_ptr_Uniform_v2uint = OpTypePointer Uniform %v2uint -%int_2 = OpConstant %int 2 -%int_3 = OpConstant %int 3 -%v2bool = OpTypeVector %bool 2 + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 + %v2bool = OpTypeVector %bool 2 %_ptr_Uniform_v3int = OpTypePointer Uniform %v3int -%int_4 = OpConstant %int 4 -%int_5 = OpConstant %int 5 -%v3bool = OpTypeVector %bool 3 -%main = OpFunction %void None %18 -%19 = OpLabel -%expectFFTT = OpVariable %_ptr_Function_v4bool Function -%expectTTFF = OpVariable %_ptr_Function_v4bool Function -OpStore %expectFFTT %25 -OpStore %expectTTFF %27 -%29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %29 -%33 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%35 = OpLoad %v4float %33 -%28 = OpFOrdGreaterThan %v4bool %32 %35 -%36 = OpCompositeExtract %bool %28 0 -%37 = OpSelect %int %36 %int_1 %int_0 -%38 = OpConvertSToF %float %37 -%39 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 -OpStore %39 %38 -%42 = OpAccessChain %_ptr_Uniform_v2uint %10 %int_2 -%45 = OpLoad %v2uint %42 -%46 = OpAccessChain %_ptr_Uniform_v2uint %10 %int_3 -%48 = OpLoad %v2uint %46 -%41 = OpUGreaterThan %v2bool %45 %48 -%50 = OpCompositeExtract %bool %41 1 -%51 = OpSelect %int %50 %int_1 %int_0 -%52 = OpConvertSToF %float %51 -%53 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_1 -OpStore %53 %52 -%55 = OpAccessChain %_ptr_Uniform_v3int %10 %int_4 -%58 = OpLoad %v3int %55 -%59 = OpAccessChain %_ptr_Uniform_v3int %10 %int_5 -%61 = OpLoad %v3int %59 -%54 = OpSGreaterThan %v3bool %58 %61 -%63 = OpCompositeExtract %bool %54 2 -%64 = OpSelect %int %63 %int_1 %int_0 -%65 = OpConvertSToF %float %64 -%66 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_2 -OpStore %66 %65 -%68 = OpLoad %v4bool %expectTTFF -%67 = OpAny %bool %68 -OpSelectionMerge %70 None -OpBranchConditional %67 %70 %69 -%69 = OpLabel -%72 = OpLoad %v4bool %expectFFTT -%71 = OpAny %bool %72 -OpBranch %70 -%70 = OpLabel -%73 = OpPhi %bool %true %19 %71 %69 -%74 = OpSelect %int %73 %int_1 %int_0 -%75 = OpConvertSToF %float %74 -%76 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_3 -OpStore %76 %75 -OpReturn -OpFunctionEnd + %int_4 = OpConstant %int 4 + %int_5 = OpConstant %int 5 + %v3bool = OpTypeVector %bool 3 + %main = OpFunction %void None %18 + %19 = OpLabel + %expectFFTT = OpVariable %_ptr_Function_v4bool Function + %expectTTFF = OpVariable %_ptr_Function_v4bool Function + OpStore %expectFFTT %25 + OpStore %expectTTFF %27 + %29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %29 + %33 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %35 = OpLoad %v4float %33 + %28 = OpFOrdGreaterThan %v4bool %32 %35 + %36 = OpCompositeExtract %bool %28 0 + %37 = OpSelect %int %36 %int_1 %int_0 + %38 = OpConvertSToF %float %37 + %39 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 + OpStore %39 %38 + %42 = OpAccessChain %_ptr_Uniform_v2uint %10 %int_2 + %45 = OpLoad %v2uint %42 + %46 = OpAccessChain %_ptr_Uniform_v2uint %10 %int_3 + %48 = OpLoad %v2uint %46 + %41 = OpUGreaterThan %v2bool %45 %48 + %50 = OpCompositeExtract %bool %41 1 + %51 = OpSelect %int %50 %int_1 %int_0 + %52 = OpConvertSToF %float %51 + %53 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_1 + OpStore %53 %52 + %55 = OpAccessChain %_ptr_Uniform_v3int %10 %int_4 + %58 = OpLoad %v3int %55 + %59 = OpAccessChain %_ptr_Uniform_v3int %10 %int_5 + %61 = OpLoad %v3int %59 + %54 = OpSGreaterThan %v3bool %58 %61 + %63 = OpCompositeExtract %bool %54 2 + %64 = OpSelect %int %63 %int_1 %int_0 + %65 = OpConvertSToF %float %64 + %66 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_2 + OpStore %66 %65 + %68 = OpLoad %v4bool %expectTTFF + %67 = OpAny %bool %68 + OpSelectionMerge %70 None + OpBranchConditional %67 %70 %69 + %69 = OpLabel + %72 = OpLoad %v4bool %expectFFTT + %71 = OpAny %bool %72 + OpBranch %70 + %70 = OpLabel + %73 = OpPhi %bool %true %19 %71 %69 + %74 = OpSelect %int %73 %int_1 %int_0 + %75 = OpConvertSToF %float %74 + %76 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_3 + OpStore %76 %75 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/intrinsics/GreaterThan.wgsl b/tests/sksl/intrinsics/GreaterThan.wgsl index fe981c0bb027..d7af0df230d5 100644 --- a/tests/sksl/intrinsics/GreaterThan.wgsl +++ b/tests/sksl/intrinsics/GreaterThan.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/intrinsics/GreaterThanEqual.asm.frag b/tests/sksl/intrinsics/GreaterThanEqual.asm.frag index c346e5b49ce6..9df63c46d4bf 100644 --- a/tests/sksl/intrinsics/GreaterThanEqual.asm.frag +++ b/tests/sksl/intrinsics/GreaterThanEqual.asm.frag @@ -1,126 +1,126 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "a" -OpMemberName %_UniformBuffer 1 "b" -OpMemberName %_UniformBuffer 2 "c" -OpMemberName %_UniformBuffer 3 "d" -OpMemberName %_UniformBuffer 4 "e" -OpMemberName %_UniformBuffer 5 "f" -OpName %main "main" -OpName %expectFFTT "expectFFTT" -OpName %expectTTFF "expectTTFF" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 3 Offset 40 -OpMemberDecorate %_UniformBuffer 4 Offset 48 -OpMemberDecorate %_UniformBuffer 5 Offset 64 -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %32 RelaxedPrecision -OpDecorate %35 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %65 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %75 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "a" + OpMemberName %_UniformBuffer 1 "b" + OpMemberName %_UniformBuffer 2 "c" + OpMemberName %_UniformBuffer 3 "d" + OpMemberName %_UniformBuffer 4 "e" + OpMemberName %_UniformBuffer 5 "f" + OpName %main "main" + OpName %expectFFTT "expectFFTT" + OpName %expectTTFF "expectTTFF" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 3 Offset 40 + OpMemberDecorate %_UniformBuffer 4 Offset 48 + OpMemberDecorate %_UniformBuffer 5 Offset 64 + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %32 RelaxedPrecision + OpDecorate %35 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %65 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %75 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%uint = OpTypeInt 32 0 -%v2uint = OpTypeVector %uint 2 -%int = OpTypeInt 32 1 -%v3int = OpTypeVector %int 3 + %uint = OpTypeInt 32 0 + %v2uint = OpTypeVector %uint 2 + %int = OpTypeInt 32 1 + %v3int = OpTypeVector %int 3 %_UniformBuffer = OpTypeStruct %v4float %v4float %v2uint %v2uint %v3int %v3int %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%18 = OpTypeFunction %void -%v4bool = OpTypeVector %bool 4 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %18 = OpTypeFunction %void + %v4bool = OpTypeVector %bool 4 %_ptr_Function_v4bool = OpTypePointer Function %v4bool -%false = OpConstantFalse %bool -%true = OpConstantTrue %bool -%25 = OpConstantComposite %v4bool %false %false %true %true -%27 = OpConstantComposite %v4bool %true %true %false %false + %false = OpConstantFalse %bool + %true = OpConstantTrue %bool + %25 = OpConstantComposite %v4bool %false %false %true %true + %27 = OpConstantComposite %v4bool %true %true %false %false %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 %_ptr_Output_float = OpTypePointer Output %float %_ptr_Uniform_v2uint = OpTypePointer Uniform %v2uint -%int_2 = OpConstant %int 2 -%int_3 = OpConstant %int 3 -%v2bool = OpTypeVector %bool 2 + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 + %v2bool = OpTypeVector %bool 2 %_ptr_Uniform_v3int = OpTypePointer Uniform %v3int -%int_4 = OpConstant %int 4 -%int_5 = OpConstant %int 5 -%v3bool = OpTypeVector %bool 3 -%main = OpFunction %void None %18 -%19 = OpLabel -%expectFFTT = OpVariable %_ptr_Function_v4bool Function -%expectTTFF = OpVariable %_ptr_Function_v4bool Function -OpStore %expectFFTT %25 -OpStore %expectTTFF %27 -%29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %29 -%33 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%35 = OpLoad %v4float %33 -%28 = OpFOrdGreaterThanEqual %v4bool %32 %35 -%36 = OpCompositeExtract %bool %28 0 -%37 = OpSelect %int %36 %int_1 %int_0 -%38 = OpConvertSToF %float %37 -%39 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 -OpStore %39 %38 -%42 = OpAccessChain %_ptr_Uniform_v2uint %10 %int_2 -%45 = OpLoad %v2uint %42 -%46 = OpAccessChain %_ptr_Uniform_v2uint %10 %int_3 -%48 = OpLoad %v2uint %46 -%41 = OpUGreaterThanEqual %v2bool %45 %48 -%50 = OpCompositeExtract %bool %41 1 -%51 = OpSelect %int %50 %int_1 %int_0 -%52 = OpConvertSToF %float %51 -%53 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_1 -OpStore %53 %52 -%55 = OpAccessChain %_ptr_Uniform_v3int %10 %int_4 -%58 = OpLoad %v3int %55 -%59 = OpAccessChain %_ptr_Uniform_v3int %10 %int_5 -%61 = OpLoad %v3int %59 -%54 = OpSGreaterThanEqual %v3bool %58 %61 -%63 = OpCompositeExtract %bool %54 2 -%64 = OpSelect %int %63 %int_1 %int_0 -%65 = OpConvertSToF %float %64 -%66 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_2 -OpStore %66 %65 -%68 = OpLoad %v4bool %expectTTFF -%67 = OpAny %bool %68 -OpSelectionMerge %70 None -OpBranchConditional %67 %70 %69 -%69 = OpLabel -%72 = OpLoad %v4bool %expectFFTT -%71 = OpAny %bool %72 -OpBranch %70 -%70 = OpLabel -%73 = OpPhi %bool %true %19 %71 %69 -%74 = OpSelect %int %73 %int_1 %int_0 -%75 = OpConvertSToF %float %74 -%76 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_3 -OpStore %76 %75 -OpReturn -OpFunctionEnd + %int_4 = OpConstant %int 4 + %int_5 = OpConstant %int 5 + %v3bool = OpTypeVector %bool 3 + %main = OpFunction %void None %18 + %19 = OpLabel + %expectFFTT = OpVariable %_ptr_Function_v4bool Function + %expectTTFF = OpVariable %_ptr_Function_v4bool Function + OpStore %expectFFTT %25 + OpStore %expectTTFF %27 + %29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %29 + %33 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %35 = OpLoad %v4float %33 + %28 = OpFOrdGreaterThanEqual %v4bool %32 %35 + %36 = OpCompositeExtract %bool %28 0 + %37 = OpSelect %int %36 %int_1 %int_0 + %38 = OpConvertSToF %float %37 + %39 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 + OpStore %39 %38 + %42 = OpAccessChain %_ptr_Uniform_v2uint %10 %int_2 + %45 = OpLoad %v2uint %42 + %46 = OpAccessChain %_ptr_Uniform_v2uint %10 %int_3 + %48 = OpLoad %v2uint %46 + %41 = OpUGreaterThanEqual %v2bool %45 %48 + %50 = OpCompositeExtract %bool %41 1 + %51 = OpSelect %int %50 %int_1 %int_0 + %52 = OpConvertSToF %float %51 + %53 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_1 + OpStore %53 %52 + %55 = OpAccessChain %_ptr_Uniform_v3int %10 %int_4 + %58 = OpLoad %v3int %55 + %59 = OpAccessChain %_ptr_Uniform_v3int %10 %int_5 + %61 = OpLoad %v3int %59 + %54 = OpSGreaterThanEqual %v3bool %58 %61 + %63 = OpCompositeExtract %bool %54 2 + %64 = OpSelect %int %63 %int_1 %int_0 + %65 = OpConvertSToF %float %64 + %66 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_2 + OpStore %66 %65 + %68 = OpLoad %v4bool %expectTTFF + %67 = OpAny %bool %68 + OpSelectionMerge %70 None + OpBranchConditional %67 %70 %69 + %69 = OpLabel + %72 = OpLoad %v4bool %expectFFTT + %71 = OpAny %bool %72 + OpBranch %70 + %70 = OpLabel + %73 = OpPhi %bool %true %19 %71 %69 + %74 = OpSelect %int %73 %int_1 %int_0 + %75 = OpConvertSToF %float %74 + %76 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_3 + OpStore %76 %75 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/intrinsics/GreaterThanEqual.wgsl b/tests/sksl/intrinsics/GreaterThanEqual.wgsl index b06f433d62f5..82aff7ec971b 100644 --- a/tests/sksl/intrinsics/GreaterThanEqual.wgsl +++ b/tests/sksl/intrinsics/GreaterThanEqual.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/intrinsics/IntBitsToFloat.asm.frag b/tests/sksl/intrinsics/IntBitsToFloat.asm.frag index 7c0502127638..311f7f4195e4 100644 --- a/tests/sksl/intrinsics/IntBitsToFloat.asm.frag +++ b/tests/sksl/intrinsics/IntBitsToFloat.asm.frag @@ -1,148 +1,148 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testMatrix2x2" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %inputVal "inputVal" -OpName %expectedB "expectedB" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 ColMajor -OpMemberDecorate %_UniformBuffer 0 MatrixStride 16 -OpMemberDecorate %_UniformBuffer 1 Offset 32 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 48 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %90 RelaxedPrecision -OpDecorate %93 RelaxedPrecision -OpDecorate %94 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testMatrix2x2" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %inputVal "inputVal" + OpName %expectedB "expectedB" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 ColMajor + OpMemberDecorate %_UniformBuffer 0 MatrixStride 16 + OpMemberDecorate %_UniformBuffer 1 Offset 32 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 48 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %90 RelaxedPrecision + OpDecorate %93 RelaxedPrecision + OpDecorate %94 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%v2float = OpTypeVector %float 2 + %v2float = OpTypeVector %float 2 %mat2v2float = OpTypeMatrix %v2float 2 %_UniformBuffer = OpTypeStruct %mat2v2float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%17 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%20 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %17 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %20 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%24 = OpTypeFunction %v4float %_ptr_Function_v2float + %24 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_mat2v2float = OpTypePointer Uniform %mat2v2float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%float_1 = OpConstant %float 1 -%float_n1 = OpConstant %float -1 -%41 = OpConstantComposite %v4float %float_1 %float_1 %float_n1 %float_n1 -%v4int = OpTypeVector %int 4 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %float_1 = OpConstant %float 1 + %float_n1 = OpConstant %float -1 + %41 = OpConstantComposite %v4float %float_1 %float_1 %float_n1 %float_n1 + %v4int = OpTypeVector %int 4 %_ptr_Function_v4int = OpTypePointer Function %v4int %int_1065353216 = OpConstant %int 1065353216 %int_1073741824 = OpConstant %int 1073741824 %int_n1069547520 = OpConstant %int -1069547520 %int_n1065353216 = OpConstant %int -1065353216 -%50 = OpConstantComposite %v4int %int_1065353216 %int_1073741824 %int_n1069547520 %int_n1065353216 -%false = OpConstantFalse %bool -%v2int = OpTypeVector %int 2 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%v3int = OpTypeVector %int 3 -%v3bool = OpTypeVector %bool 3 -%v4bool = OpTypeVector %bool 4 + %50 = OpConstantComposite %v4int %int_1065353216 %int_1073741824 %int_n1069547520 %int_n1065353216 + %false = OpConstantFalse %bool + %v2int = OpTypeVector %int 2 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %v3int = OpTypeVector %int 3 + %v3bool = OpTypeVector %bool 3 + %v4bool = OpTypeVector %bool 4 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %17 -%18 = OpLabel -%21 = OpVariable %_ptr_Function_v2float Function -OpStore %21 %20 -%23 = OpFunctionCall %v4float %main %21 -OpStore %sk_FragColor %23 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %24 -%25 = OpFunctionParameter %_ptr_Function_v2float -%26 = OpLabel -%inputVal = OpVariable %_ptr_Function_v4float Function -%expectedB = OpVariable %_ptr_Function_v4int Function -%83 = OpVariable %_ptr_Function_v4float Function -%29 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_0 -%33 = OpLoad %mat2v2float %29 -%34 = OpCompositeExtract %float %33 0 0 -%35 = OpCompositeExtract %float %33 0 1 -%36 = OpCompositeExtract %float %33 1 0 -%37 = OpCompositeExtract %float %33 1 1 -%38 = OpCompositeConstruct %v4float %34 %35 %36 %37 -%42 = OpFMul %v4float %38 %41 -OpStore %inputVal %42 -OpStore %expectedB %50 -%52 = OpCompositeExtract %float %42 0 -%53 = OpBitcast %float %int_1065353216 -%54 = OpFOrdEqual %bool %52 %53 -OpSelectionMerge %56 None -OpBranchConditional %54 %55 %56 -%55 = OpLabel -%57 = OpVectorShuffle %v2float %42 %42 0 1 -%59 = OpVectorShuffle %v2int %50 %50 0 1 -%58 = OpBitcast %v2float %59 -%61 = OpFOrdEqual %v2bool %57 %58 -%63 = OpAll %bool %61 -OpBranch %56 -%56 = OpLabel -%64 = OpPhi %bool %false %26 %63 %55 -OpSelectionMerge %66 None -OpBranchConditional %64 %65 %66 -%65 = OpLabel -%67 = OpVectorShuffle %v3float %42 %42 0 1 2 -%70 = OpVectorShuffle %v3int %50 %50 0 1 2 -%69 = OpBitcast %v3float %70 -%72 = OpFOrdEqual %v3bool %67 %69 -%74 = OpAll %bool %72 -OpBranch %66 -%66 = OpLabel -%75 = OpPhi %bool %false %56 %74 %65 -OpSelectionMerge %77 None -OpBranchConditional %75 %76 %77 -%76 = OpLabel -%78 = OpBitcast %v4float %50 -%79 = OpFOrdEqual %v4bool %42 %78 -%81 = OpAll %bool %79 -OpBranch %77 -%77 = OpLabel -%82 = OpPhi %bool %false %66 %81 %76 -OpSelectionMerge %86 None -OpBranchConditional %82 %84 %85 -%84 = OpLabel -%87 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%90 = OpLoad %v4float %87 -OpStore %83 %90 -OpBranch %86 -%85 = OpLabel -%91 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%93 = OpLoad %v4float %91 -OpStore %83 %93 -OpBranch %86 -%86 = OpLabel -%94 = OpLoad %v4float %83 -OpReturnValue %94 -OpFunctionEnd + %18 = OpLabel + %21 = OpVariable %_ptr_Function_v2float Function + OpStore %21 %20 + %23 = OpFunctionCall %v4float %main %21 + OpStore %sk_FragColor %23 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %24 + %25 = OpFunctionParameter %_ptr_Function_v2float + %26 = OpLabel + %inputVal = OpVariable %_ptr_Function_v4float Function + %expectedB = OpVariable %_ptr_Function_v4int Function + %83 = OpVariable %_ptr_Function_v4float Function + %29 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_0 + %33 = OpLoad %mat2v2float %29 + %34 = OpCompositeExtract %float %33 0 0 + %35 = OpCompositeExtract %float %33 0 1 + %36 = OpCompositeExtract %float %33 1 0 + %37 = OpCompositeExtract %float %33 1 1 + %38 = OpCompositeConstruct %v4float %34 %35 %36 %37 + %42 = OpFMul %v4float %38 %41 + OpStore %inputVal %42 + OpStore %expectedB %50 + %52 = OpCompositeExtract %float %42 0 + %53 = OpBitcast %float %int_1065353216 + %54 = OpFOrdEqual %bool %52 %53 + OpSelectionMerge %56 None + OpBranchConditional %54 %55 %56 + %55 = OpLabel + %57 = OpVectorShuffle %v2float %42 %42 0 1 + %59 = OpVectorShuffle %v2int %50 %50 0 1 + %58 = OpBitcast %v2float %59 + %61 = OpFOrdEqual %v2bool %57 %58 + %63 = OpAll %bool %61 + OpBranch %56 + %56 = OpLabel + %64 = OpPhi %bool %false %26 %63 %55 + OpSelectionMerge %66 None + OpBranchConditional %64 %65 %66 + %65 = OpLabel + %67 = OpVectorShuffle %v3float %42 %42 0 1 2 + %70 = OpVectorShuffle %v3int %50 %50 0 1 2 + %69 = OpBitcast %v3float %70 + %72 = OpFOrdEqual %v3bool %67 %69 + %74 = OpAll %bool %72 + OpBranch %66 + %66 = OpLabel + %75 = OpPhi %bool %false %56 %74 %65 + OpSelectionMerge %77 None + OpBranchConditional %75 %76 %77 + %76 = OpLabel + %78 = OpBitcast %v4float %50 + %79 = OpFOrdEqual %v4bool %42 %78 + %81 = OpAll %bool %79 + OpBranch %77 + %77 = OpLabel + %82 = OpPhi %bool %false %66 %81 %76 + OpSelectionMerge %86 None + OpBranchConditional %82 %84 %85 + %84 = OpLabel + %87 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %90 = OpLoad %v4float %87 + OpStore %83 %90 + OpBranch %86 + %85 = OpLabel + %91 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %93 = OpLoad %v4float %91 + OpStore %83 %93 + OpBranch %86 + %86 = OpLabel + %94 = OpLoad %v4float %83 + OpReturnValue %94 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/IntBitsToFloat.skrp b/tests/sksl/intrinsics/IntBitsToFloat.skrp index f1534f543be4..208fc9620de8 100644 --- a/tests/sksl/intrinsics/IntBitsToFloat.skrp +++ b/tests/sksl/intrinsics/IntBitsToFloat.skrp @@ -1,32 +1,36 @@ +30 instructions + [immutable slots] -expectedB(0) = 0x3F800000 (1.0) -expectedB(1) = 0x40000000 (2.0) -expectedB(2) = 0xC0400000 (-3.0) -expectedB(3) = 0xC0800000 (-4.0) +i0 = 0x3F800000 (1.0) +i1 = 0x3F800000 (1.0) +i2 = 0xBF800000 (-1.0) +i3 = 0xBF800000 (-1.0) +i4 = 0x3F800000 (1.0) +i5 = 0x40000000 (2.0) +i6 = 0xC0400000 (-3.0) +i7 = 0xC0800000 (-4.0) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_4_uniforms $0..3 = testMatrix2x2 -splat_2_constants $4..5 = 0x3F800000 (1.0) -splat_2_constants $6..7 = 0xBF800000 (-1.0) +copy_4_immutables_unmasked $4..7 = i0..3 [0x3F800000 (1.0), 0x3F800000 (1.0), 0xBF800000 (-1.0), 0xBF800000 (-1.0)] mul_4_floats $0..3 *= $4..7 copy_4_slots_unmasked inputVal = $0..3 copy_slot_unmasked $0 = inputVal(0) -copy_slot_unmasked $1 = expectedB(0) -cmpeq_float $0 = equal($0, $1) +cmpeq_imm_float $0 = equal($0, 0x3F800000 (1.0)) copy_2_slots_unmasked $1..2 = inputVal(0..1) -copy_2_slots_unmasked $3..4 = expectedB(0..1) +copy_2_immutables_unmasked $3..4 = i4..5 [0x3F800000 (1.0), 0x40000000 (2.0)] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_3_slots_unmasked $1..3 = inputVal(0..2) -copy_3_slots_unmasked $4..6 = expectedB(0..2) +copy_3_immutables_unmasked $4..6 = i4..6 [0x3F800000 (1.0), 0x40000000 (2.0), 0xC0400000 (-3.0)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_4_slots_unmasked $1..4 = inputVal -copy_4_slots_unmasked $5..8 = expectedB +copy_4_immutables_unmasked $5..8 = i4..7 [0x3F800000 (1.0), 0x40000000 (2.0), 0xC0400000 (-3.0), 0xC0800000 (-4.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 diff --git a/tests/sksl/intrinsics/IntBitsToFloat.wgsl b/tests/sksl/intrinsics/IntBitsToFloat.wgsl new file mode 100644 index 000000000000..2f3e5ef51035 --- /dev/null +++ b/tests/sksl/intrinsics/IntBitsToFloat.wgsl @@ -0,0 +1,40 @@ +### Compilation failed: + +error: :20:20 error: unresolved call target 'intBitsToFloat' + let _skTemp0 = intBitsToFloat(expectedB.x); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + testMatrix2x2: mat2x2, + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var inputVal: vec4 = vec4(_globalUniforms.testMatrix2x2[0], _globalUniforms.testMatrix2x2[1]) * vec4(1.0, 1.0, -1.0, -1.0); + var expectedB: vec4 = vec4(1065353216, 1073741824, -1069547520, -1065353216); + let _skTemp0 = intBitsToFloat(expectedB.x); + let _skTemp1 = intBitsToFloat(expectedB.xy); + let _skTemp2 = intBitsToFloat(expectedB.xyz); + let _skTemp3 = intBitsToFloat(expectedB); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((inputVal.x == _skTemp0) && all(inputVal.xy == _skTemp1)) && all(inputVal.xyz == _skTemp2)) && all(inputVal == _skTemp3))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} + +1 error diff --git a/tests/sksl/intrinsics/Inverse.asm.frag b/tests/sksl/intrinsics/Inverse.asm.frag index 6fd56e415981..45c5aa24ff56 100644 --- a/tests/sksl/intrinsics/Inverse.asm.frag +++ b/tests/sksl/intrinsics/Inverse.asm.frag @@ -1,206 +1,282 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %inv2x2 "inv2x2" -OpName %inv3x3 "inv3x3" -OpName %inv4x4 "inv4x4" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %inv2x2 RelaxedPrecision -OpDecorate %inv3x3 RelaxedPrecision -OpDecorate %inv4x4 RelaxedPrecision -OpDecorate %67 RelaxedPrecision -OpDecorate %69 RelaxedPrecision -OpDecorate %75 RelaxedPrecision -OpDecorate %77 RelaxedPrecision -OpDecorate %80 RelaxedPrecision -OpDecorate %87 RelaxedPrecision -OpDecorate %89 RelaxedPrecision -OpDecorate %92 RelaxedPrecision -OpDecorate %95 RelaxedPrecision -OpDecorate %101 RelaxedPrecision -OpDecorate %110 RelaxedPrecision -OpDecorate %111 RelaxedPrecision -OpDecorate %113 RelaxedPrecision -OpDecorate %114 RelaxedPrecision -OpDecorate %117 RelaxedPrecision -OpDecorate %118 RelaxedPrecision -OpDecorate %131 RelaxedPrecision -OpDecorate %134 RelaxedPrecision -OpDecorate %135 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %matrix2x2 "matrix2x2" + OpName %inv2x2 "inv2x2" + OpName %inv3x3 "inv3x3" + OpName %inv4x4 "inv4x4" + OpName %Zero "Zero" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %75 RelaxedPrecision + OpDecorate %76 RelaxedPrecision + OpDecorate %211 RelaxedPrecision + OpDecorate %214 RelaxedPrecision + OpDecorate %215 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %mat2v2float = OpTypeMatrix %v2float 2 %_ptr_Function_mat2v2float = OpTypePointer Function %mat2v2float -%float_n2 = OpConstant %float -2 -%float_1 = OpConstant %float 1 -%float_1_5 = OpConstant %float 1.5 -%float_n0_5 = OpConstant %float -0.5 -%33 = OpConstantComposite %v2float %float_n2 %float_1 -%34 = OpConstantComposite %v2float %float_1_5 %float_n0_5 -%35 = OpConstantComposite %mat2v2float %33 %34 -%v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %float_2 = OpConstant %float 2 + %float_3 = OpConstant %float 3 + %float_4 = OpConstant %float 4 + %33 = OpConstantComposite %v2float %float_1 %float_2 + %34 = OpConstantComposite %v2float %float_3 %float_4 + %35 = OpConstantComposite %mat2v2float %33 %34 + %float_n2 = OpConstant %float -2 + %float_1_5 = OpConstant %float 1.5 + %float_n0_5 = OpConstant %float -0.5 + %40 = OpConstantComposite %v2float %float_n2 %float_1 + %41 = OpConstantComposite %v2float %float_1_5 %float_n0_5 + %42 = OpConstantComposite %mat2v2float %40 %41 + %v3float = OpTypeVector %float 3 %mat3v3float = OpTypeMatrix %v3float 3 %_ptr_Function_mat3v3float = OpTypePointer Function %mat3v3float -%float_n24 = OpConstant %float -24 -%float_18 = OpConstant %float 18 -%float_5 = OpConstant %float 5 -%float_20 = OpConstant %float 20 -%float_n15 = OpConstant %float -15 -%float_n4 = OpConstant %float -4 -%float_n5 = OpConstant %float -5 -%float_4 = OpConstant %float 4 -%48 = OpConstantComposite %v3float %float_n24 %float_18 %float_5 -%49 = OpConstantComposite %v3float %float_20 %float_n15 %float_n4 -%50 = OpConstantComposite %v3float %float_n5 %float_4 %float_1 -%51 = OpConstantComposite %mat3v3float %48 %49 %50 + %float_n24 = OpConstant %float -24 + %float_18 = OpConstant %float 18 + %float_5 = OpConstant %float 5 + %float_20 = OpConstant %float 20 + %float_n15 = OpConstant %float -15 + %float_n4 = OpConstant %float -4 + %float_n5 = OpConstant %float -5 + %54 = OpConstantComposite %v3float %float_n24 %float_18 %float_5 + %55 = OpConstantComposite %v3float %float_20 %float_n15 %float_n4 + %56 = OpConstantComposite %v3float %float_n5 %float_4 %float_1 + %57 = OpConstantComposite %mat3v3float %54 %55 %56 %mat4v4float = OpTypeMatrix %v4float 4 %_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float -%float_0_5 = OpConstant %float 0.5 -%float_n8 = OpConstant %float -8 -%float_n1 = OpConstant %float -1 -%float_2 = OpConstant %float 2 -%float_3 = OpConstant %float 3 -%60 = OpConstantComposite %v4float %float_n2 %float_n0_5 %float_1 %float_0_5 -%61 = OpConstantComposite %v4float %float_1 %float_0_5 %float_0 %float_n0_5 -%62 = OpConstantComposite %v4float %float_n8 %float_n1 %float_2 %float_2 -%63 = OpConstantComposite %v4float %float_3 %float_0_5 %float_n1 %float_n0_5 -%64 = OpConstantComposite %mat4v4float %60 %61 %62 %63 -%false = OpConstantFalse %bool -%v2bool = OpTypeVector %bool 2 -%v3bool = OpTypeVector %bool 3 -%v4bool = OpTypeVector %bool 4 -%float_6 = OpConstant %float 6 -%float_7 = OpConstant %float 7 -%float_8 = OpConstant %float 8 -%float_9 = OpConstant %float 9 -%106 = OpConstantComposite %v3float %float_1 %float_2 %float_3 -%107 = OpConstantComposite %v3float %float_4 %float_5 %float_6 -%108 = OpConstantComposite %v3float %float_7 %float_8 %float_9 -%109 = OpConstantComposite %mat3v3float %106 %107 %108 -%_ptr_Function_v4float = OpTypePointer Function %v4float + %float_0_5 = OpConstant %float 0.5 + %float_n8 = OpConstant %float -8 + %float_n1 = OpConstant %float -1 + %64 = OpConstantComposite %v4float %float_n2 %float_n0_5 %float_1 %float_0_5 + %65 = OpConstantComposite %v4float %float_1 %float_0_5 %float_0 %float_n0_5 + %66 = OpConstantComposite %v4float %float_n8 %float_n1 %float_2 %float_2 + %67 = OpConstantComposite %v4float %float_3 %float_0_5 %float_n1 %float_n0_5 + %68 = OpConstantComposite %mat4v4float %64 %65 %66 %67 +%_ptr_Function_float = OpTypePointer Function %float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %false = OpConstantFalse %bool + %v2bool = OpTypeVector %bool 2 + %v3bool = OpTypeVector %bool 3 + %v4bool = OpTypeVector %bool 4 + %float_6 = OpConstant %float 6 + %float_7 = OpConstant %float 7 + %float_8 = OpConstant %float 8 + %float_9 = OpConstant %float 9 + %118 = OpConstantComposite %v3float %float_1 %float_2 %float_3 + %119 = OpConstantComposite %v3float %float_4 %float_5 %float_6 + %120 = OpConstantComposite %v3float %float_7 %float_8 %float_9 + %121 = OpConstantComposite %mat3v3float %118 %119 %120 + %153 = OpConstantComposite %v3float %float_0 %float_1 %float_4 + %154 = OpConstantComposite %v3float %float_5 %float_6 %float_0 + %155 = OpConstantComposite %mat3v3float %118 %153 %154 + %177 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1 + %178 = OpConstantComposite %v4float %float_0 %float_2 %float_1 %float_2 + %179 = OpConstantComposite %v4float %float_2 %float_1 %float_0 %float_1 + %180 = OpConstantComposite %v4float %float_2 %float_0 %float_1 %float_4 + %181 = OpConstantComposite %mat4v4float %177 %178 %179 %180 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %int_1 = OpConstant %int 1 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%inv2x2 = OpVariable %_ptr_Function_mat2v2float Function -%inv3x3 = OpVariable %_ptr_Function_mat3v3float Function -%inv4x4 = OpVariable %_ptr_Function_mat4v4float Function -%122 = OpVariable %_ptr_Function_v4float Function -OpStore %inv2x2 %35 -OpStore %inv3x3 %51 -OpStore %inv4x4 %64 -%67 = OpFOrdEqual %v2bool %33 %33 -%68 = OpAll %bool %67 -%69 = OpFOrdEqual %v2bool %34 %34 -%70 = OpAll %bool %69 -%71 = OpLogicalAnd %bool %68 %70 -OpSelectionMerge %73 None -OpBranchConditional %71 %72 %73 -%72 = OpLabel -%75 = OpFOrdEqual %v3bool %48 %48 -%76 = OpAll %bool %75 -%77 = OpFOrdEqual %v3bool %49 %49 -%78 = OpAll %bool %77 -%79 = OpLogicalAnd %bool %76 %78 -%80 = OpFOrdEqual %v3bool %50 %50 -%81 = OpAll %bool %80 -%82 = OpLogicalAnd %bool %79 %81 -OpBranch %73 -%73 = OpLabel -%83 = OpPhi %bool %false %25 %82 %72 -OpSelectionMerge %85 None -OpBranchConditional %83 %84 %85 -%84 = OpLabel -%87 = OpFOrdEqual %v4bool %60 %60 -%88 = OpAll %bool %87 -%89 = OpFOrdEqual %v4bool %61 %61 -%90 = OpAll %bool %89 -%91 = OpLogicalAnd %bool %88 %90 -%92 = OpFOrdEqual %v4bool %62 %62 -%93 = OpAll %bool %92 -%94 = OpLogicalAnd %bool %91 %93 -%95 = OpFOrdEqual %v4bool %63 %63 -%96 = OpAll %bool %95 -%97 = OpLogicalAnd %bool %94 %96 -OpBranch %85 -%85 = OpLabel -%98 = OpPhi %bool %false %73 %97 %84 -OpSelectionMerge %100 None -OpBranchConditional %98 %99 %100 -%99 = OpLabel -%101 = OpExtInst %mat3v3float %1 MatrixInverse %109 -%110 = OpCompositeExtract %v3float %101 0 -%111 = OpFUnordNotEqual %v3bool %110 %48 -%112 = OpAny %bool %111 -%113 = OpCompositeExtract %v3float %101 1 -%114 = OpFUnordNotEqual %v3bool %113 %49 -%115 = OpAny %bool %114 -%116 = OpLogicalOr %bool %112 %115 -%117 = OpCompositeExtract %v3float %101 2 -%118 = OpFUnordNotEqual %v3bool %117 %50 -%119 = OpAny %bool %118 -%120 = OpLogicalOr %bool %116 %119 -OpBranch %100 -%100 = OpLabel -%121 = OpPhi %bool %false %85 %120 %99 -OpSelectionMerge %126 None -OpBranchConditional %121 %124 %125 -%124 = OpLabel -%127 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%131 = OpLoad %v4float %127 -OpStore %122 %131 -OpBranch %126 -%125 = OpLabel -%132 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%134 = OpLoad %v4float %132 -OpStore %122 %134 -OpBranch %126 -%126 = OpLabel -%135 = OpLoad %v4float %122 -OpReturnValue %135 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %matrix2x2 = OpVariable %_ptr_Function_mat2v2float Function + %inv2x2 = OpVariable %_ptr_Function_mat2v2float Function + %inv3x3 = OpVariable %_ptr_Function_mat3v3float Function + %inv4x4 = OpVariable %_ptr_Function_mat4v4float Function + %Zero = OpVariable %_ptr_Function_float Function + %205 = OpVariable %_ptr_Function_v4float Function + OpStore %matrix2x2 %35 + OpStore %inv2x2 %42 + OpStore %inv3x3 %57 + OpStore %inv4x4 %68 + %71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %75 = OpLoad %v4float %71 + %76 = OpCompositeExtract %float %75 2 + OpStore %Zero %76 + %79 = OpFOrdEqual %v2bool %40 %40 + %80 = OpAll %bool %79 + %81 = OpFOrdEqual %v2bool %41 %41 + %82 = OpAll %bool %81 + %83 = OpLogicalAnd %bool %80 %82 + OpSelectionMerge %85 None + OpBranchConditional %83 %84 %85 + %84 = OpLabel + %87 = OpFOrdEqual %v3bool %54 %54 + %88 = OpAll %bool %87 + %89 = OpFOrdEqual %v3bool %55 %55 + %90 = OpAll %bool %89 + %91 = OpLogicalAnd %bool %88 %90 + %92 = OpFOrdEqual %v3bool %56 %56 + %93 = OpAll %bool %92 + %94 = OpLogicalAnd %bool %91 %93 + OpBranch %85 + %85 = OpLabel + %95 = OpPhi %bool %false %25 %94 %84 + OpSelectionMerge %97 None + OpBranchConditional %95 %96 %97 + %96 = OpLabel + %99 = OpFOrdEqual %v4bool %64 %64 + %100 = OpAll %bool %99 + %101 = OpFOrdEqual %v4bool %65 %65 + %102 = OpAll %bool %101 + %103 = OpLogicalAnd %bool %100 %102 + %104 = OpFOrdEqual %v4bool %66 %66 + %105 = OpAll %bool %104 + %106 = OpLogicalAnd %bool %103 %105 + %107 = OpFOrdEqual %v4bool %67 %67 + %108 = OpAll %bool %107 + %109 = OpLogicalAnd %bool %106 %108 + OpBranch %97 + %97 = OpLabel + %110 = OpPhi %bool %false %85 %109 %96 + OpSelectionMerge %112 None + OpBranchConditional %110 %111 %112 + %111 = OpLabel + %113 = OpExtInst %mat3v3float %1 MatrixInverse %121 + %122 = OpCompositeExtract %v3float %113 0 + %123 = OpFUnordNotEqual %v3bool %122 %54 + %124 = OpAny %bool %123 + %125 = OpCompositeExtract %v3float %113 1 + %126 = OpFUnordNotEqual %v3bool %125 %55 + %127 = OpAny %bool %126 + %128 = OpLogicalOr %bool %124 %127 + %129 = OpCompositeExtract %v3float %113 2 + %130 = OpFUnordNotEqual %v3bool %129 %56 + %131 = OpAny %bool %130 + %132 = OpLogicalOr %bool %128 %131 + OpBranch %112 + %112 = OpLabel + %133 = OpPhi %bool %false %97 %132 %111 + OpSelectionMerge %135 None + OpBranchConditional %133 %134 %135 + %134 = OpLabel + %137 = OpCompositeConstruct %v2float %76 %76 + %138 = OpCompositeConstruct %mat2v2float %137 %137 + %139 = OpFAdd %v2float %33 %137 + %140 = OpFAdd %v2float %34 %137 + %141 = OpCompositeConstruct %mat2v2float %139 %140 + %136 = OpExtInst %mat2v2float %1 MatrixInverse %141 + %142 = OpCompositeExtract %v2float %136 0 + %143 = OpFOrdEqual %v2bool %142 %40 + %144 = OpAll %bool %143 + %145 = OpCompositeExtract %v2float %136 1 + %146 = OpFOrdEqual %v2bool %145 %41 + %147 = OpAll %bool %146 + %148 = OpLogicalAnd %bool %144 %147 + OpBranch %135 + %135 = OpLabel + %149 = OpPhi %bool %false %112 %148 %134 + OpSelectionMerge %151 None + OpBranchConditional %149 %150 %151 + %150 = OpLabel + %156 = OpCompositeConstruct %v3float %76 %76 %76 + %157 = OpCompositeConstruct %mat3v3float %156 %156 %156 + %158 = OpFAdd %v3float %118 %156 + %159 = OpFAdd %v3float %153 %156 + %160 = OpFAdd %v3float %154 %156 + %161 = OpCompositeConstruct %mat3v3float %158 %159 %160 + %152 = OpExtInst %mat3v3float %1 MatrixInverse %161 + %162 = OpCompositeExtract %v3float %152 0 + %163 = OpFOrdEqual %v3bool %162 %54 + %164 = OpAll %bool %163 + %165 = OpCompositeExtract %v3float %152 1 + %166 = OpFOrdEqual %v3bool %165 %55 + %167 = OpAll %bool %166 + %168 = OpLogicalAnd %bool %164 %167 + %169 = OpCompositeExtract %v3float %152 2 + %170 = OpFOrdEqual %v3bool %169 %56 + %171 = OpAll %bool %170 + %172 = OpLogicalAnd %bool %168 %171 + OpBranch %151 + %151 = OpLabel + %173 = OpPhi %bool %false %135 %172 %150 + OpSelectionMerge %175 None + OpBranchConditional %173 %174 %175 + %174 = OpLabel + %182 = OpCompositeConstruct %v4float %76 %76 %76 %76 + %183 = OpCompositeConstruct %mat4v4float %182 %182 %182 %182 + %184 = OpFAdd %v4float %177 %182 + %185 = OpFAdd %v4float %178 %182 + %186 = OpFAdd %v4float %179 %182 + %187 = OpFAdd %v4float %180 %182 + %188 = OpCompositeConstruct %mat4v4float %184 %185 %186 %187 + %176 = OpExtInst %mat4v4float %1 MatrixInverse %188 + %189 = OpCompositeExtract %v4float %176 0 + %190 = OpFOrdEqual %v4bool %189 %64 + %191 = OpAll %bool %190 + %192 = OpCompositeExtract %v4float %176 1 + %193 = OpFOrdEqual %v4bool %192 %65 + %194 = OpAll %bool %193 + %195 = OpLogicalAnd %bool %191 %194 + %196 = OpCompositeExtract %v4float %176 2 + %197 = OpFOrdEqual %v4bool %196 %66 + %198 = OpAll %bool %197 + %199 = OpLogicalAnd %bool %195 %198 + %200 = OpCompositeExtract %v4float %176 3 + %201 = OpFOrdEqual %v4bool %200 %67 + %202 = OpAll %bool %201 + %203 = OpLogicalAnd %bool %199 %202 + OpBranch %175 + %175 = OpLabel + %204 = OpPhi %bool %false %151 %203 %174 + OpSelectionMerge %209 None + OpBranchConditional %204 %207 %208 + %207 = OpLabel + %210 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %211 = OpLoad %v4float %210 + OpStore %205 %211 + OpBranch %209 + %208 = OpLabel + %212 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %214 = OpLoad %v4float %212 + OpStore %205 %214 + OpBranch %209 + %209 = OpLabel + %215 = OpLoad %v4float %205 + OpReturnValue %215 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Inverse.glsl b/tests/sksl/intrinsics/Inverse.glsl index cbda1df3dd86..96cb7d5bad6b 100644 --- a/tests/sksl/intrinsics/Inverse.glsl +++ b/tests/sksl/intrinsics/Inverse.glsl @@ -3,8 +3,10 @@ out vec4 sk_FragColor; uniform vec4 colorGreen; uniform vec4 colorRed; vec4 main() { + const mat2 matrix2x2 = mat2(1.0, 2.0, 3.0, 4.0); mat2 inv2x2 = mat2(-2.0, 1.0, 1.5, -0.5); mat3 inv3x3 = mat3(-24.0, 18.0, 5.0, 20.0, -15.0, -4.0, -5.0, 4.0, 1.0); mat4 inv4x4 = mat4(-2.0, -0.5, 1.0, 0.5, 1.0, 0.5, 0.0, -0.5, -8.0, -1.0, 2.0, 2.0, 3.0, 0.5, -1.0, -0.5); - return ((mat2(-2.0, 1.0, 1.5, -0.5) == inv2x2 && mat3(-24.0, 18.0, 5.0, 20.0, -15.0, -4.0, -5.0, 4.0, 1.0) == inv3x3) && mat4(-2.0, -0.5, 1.0, 0.5, 1.0, 0.5, 0.0, -0.5, -8.0, -1.0, 2.0, 2.0, 3.0, 0.5, -1.0, -0.5) == inv4x4) && inverse(mat3(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0)) != inv3x3 ? colorGreen : colorRed; + float Zero = colorGreen.z; + return (((((mat2(-2.0, 1.0, 1.5, -0.5) == inv2x2 && mat3(-24.0, 18.0, 5.0, 20.0, -15.0, -4.0, -5.0, 4.0, 1.0) == inv3x3) && mat4(-2.0, -0.5, 1.0, 0.5, 1.0, 0.5, 0.0, -0.5, -8.0, -1.0, 2.0, 2.0, 3.0, 0.5, -1.0, -0.5) == inv4x4) && inverse(mat3(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0)) != inv3x3) && inverse(matrix2x2 + Zero) == inv2x2) && inverse(mat3(1.0, 2.0, 3.0, 0.0, 1.0, 4.0, 5.0, 6.0, 0.0) + Zero) == inv3x3) && inverse(mat4(1.0, 0.0, 0.0, 1.0, 0.0, 2.0, 1.0, 2.0, 2.0, 1.0, 0.0, 1.0, 2.0, 0.0, 1.0, 4.0) + Zero) == inv4x4 ? colorGreen : colorRed; } diff --git a/tests/sksl/intrinsics/Inverse.hlsl b/tests/sksl/intrinsics/Inverse.hlsl index f8cd0dac3015..f4ac8550b483 100644 --- a/tests/sksl/intrinsics/Inverse.hlsl +++ b/tests/sksl/intrinsics/Inverse.hlsl @@ -12,6 +12,27 @@ struct SPIRV_Cross_Output float4 sk_FragColor : SV_Target0; }; +// Returns the inverse of a matrix, by using the algorithm of calculating the classical +// adjoint and dividing by the determinant. The contents of the matrix are changed. +float2x2 spvInverse(float2x2 m) +{ + float2x2 adj; // The adjoint matrix (inverse after dividing by determinant) + + // Create the transpose of the cofactors, as the classical adjoint of the matrix. + adj[0][0] = m[1][1]; + adj[0][1] = -m[0][1]; + + adj[1][0] = -m[1][0]; + adj[1][1] = m[0][0]; + + // Calculate the determinant as a combination of the cofactors of the first row. + float det = (adj[0][0] * m[0][0]) + (adj[0][1] * m[1][0]); + + // Divide the classical adjoint matrix by the determinant. + // If determinant is zero, matrix is not invertable, so leave it unchanged. + return (det != 0.0f) ? (adj * (1.0f / det)) : m; +} + // Returns the determinant of a 2x2 matrix. float spvDet2x2(float a1, float a2, float b1, float b2) { @@ -45,52 +66,137 @@ float3x3 spvInverse(float3x3 m) return (det != 0.0f) ? (adj * (1.0f / det)) : m; } +// Returns the determinant of a 3x3 matrix. +float spvDet3x3(float a1, float a2, float a3, float b1, float b2, float b3, float c1, float c2, float c3) +{ + return a1 * spvDet2x2(b2, b3, c2, c3) - b1 * spvDet2x2(a2, a3, c2, c3) + c1 * spvDet2x2(a2, a3, b2, b3); +} + +// Returns the inverse of a matrix, by using the algorithm of calculating the classical +// adjoint and dividing by the determinant. The contents of the matrix are changed. +float4x4 spvInverse(float4x4 m) +{ + float4x4 adj; // The adjoint matrix (inverse after dividing by determinant) + + // Create the transpose of the cofactors, as the classical adjoint of the matrix. + adj[0][0] = spvDet3x3(m[1][1], m[1][2], m[1][3], m[2][1], m[2][2], m[2][3], m[3][1], m[3][2], m[3][3]); + adj[0][1] = -spvDet3x3(m[0][1], m[0][2], m[0][3], m[2][1], m[2][2], m[2][3], m[3][1], m[3][2], m[3][3]); + adj[0][2] = spvDet3x3(m[0][1], m[0][2], m[0][3], m[1][1], m[1][2], m[1][3], m[3][1], m[3][2], m[3][3]); + adj[0][3] = -spvDet3x3(m[0][1], m[0][2], m[0][3], m[1][1], m[1][2], m[1][3], m[2][1], m[2][2], m[2][3]); + + adj[1][0] = -spvDet3x3(m[1][0], m[1][2], m[1][3], m[2][0], m[2][2], m[2][3], m[3][0], m[3][2], m[3][3]); + adj[1][1] = spvDet3x3(m[0][0], m[0][2], m[0][3], m[2][0], m[2][2], m[2][3], m[3][0], m[3][2], m[3][3]); + adj[1][2] = -spvDet3x3(m[0][0], m[0][2], m[0][3], m[1][0], m[1][2], m[1][3], m[3][0], m[3][2], m[3][3]); + adj[1][3] = spvDet3x3(m[0][0], m[0][2], m[0][3], m[1][0], m[1][2], m[1][3], m[2][0], m[2][2], m[2][3]); + + adj[2][0] = spvDet3x3(m[1][0], m[1][1], m[1][3], m[2][0], m[2][1], m[2][3], m[3][0], m[3][1], m[3][3]); + adj[2][1] = -spvDet3x3(m[0][0], m[0][1], m[0][3], m[2][0], m[2][1], m[2][3], m[3][0], m[3][1], m[3][3]); + adj[2][2] = spvDet3x3(m[0][0], m[0][1], m[0][3], m[1][0], m[1][1], m[1][3], m[3][0], m[3][1], m[3][3]); + adj[2][3] = -spvDet3x3(m[0][0], m[0][1], m[0][3], m[1][0], m[1][1], m[1][3], m[2][0], m[2][1], m[2][3]); + + adj[3][0] = -spvDet3x3(m[1][0], m[1][1], m[1][2], m[2][0], m[2][1], m[2][2], m[3][0], m[3][1], m[3][2]); + adj[3][1] = spvDet3x3(m[0][0], m[0][1], m[0][2], m[2][0], m[2][1], m[2][2], m[3][0], m[3][1], m[3][2]); + adj[3][2] = -spvDet3x3(m[0][0], m[0][1], m[0][2], m[1][0], m[1][1], m[1][2], m[3][0], m[3][1], m[3][2]); + adj[3][3] = spvDet3x3(m[0][0], m[0][1], m[0][2], m[1][0], m[1][1], m[1][2], m[2][0], m[2][1], m[2][2]); + + // Calculate the determinant as a combination of the cofactors of the first row. + float det = (adj[0][0] * m[0][0]) + (adj[0][1] * m[1][0]) + (adj[0][2] * m[2][0]) + (adj[0][3] * m[3][0]); + + // Divide the classical adjoint matrix by the determinant. + // If determinant is zero, matrix is not invertable, so leave it unchanged. + return (det != 0.0f) ? (adj * (1.0f / det)) : m; +} + float4 main(float2 _24) { + float2x2 matrix2x2 = float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f)); float2x2 inv2x2 = float2x2(float2(-2.0f, 1.0f), float2(1.5f, -0.5f)); float3x3 inv3x3 = float3x3(float3(-24.0f, 18.0f, 5.0f), float3(20.0f, -15.0f, -4.0f), float3(-5.0f, 4.0f, 1.0f)); float4x4 inv4x4 = float4x4(float4(-2.0f, -0.5f, 1.0f, 0.5f), float4(1.0f, 0.5f, 0.0f, -0.5f), float4(-8.0f, -1.0f, 2.0f, 2.0f), float4(3.0f, 0.5f, -1.0f, -0.5f)); - bool _83 = false; + float Zero = _10_colorGreen.z; + bool _95 = false; if (all(bool2(float2(-2.0f, 1.0f).x == float2(-2.0f, 1.0f).x, float2(-2.0f, 1.0f).y == float2(-2.0f, 1.0f).y)) && all(bool2(float2(1.5f, -0.5f).x == float2(1.5f, -0.5f).x, float2(1.5f, -0.5f).y == float2(1.5f, -0.5f).y))) { - _83 = (all(bool3(float3(-24.0f, 18.0f, 5.0f).x == float3(-24.0f, 18.0f, 5.0f).x, float3(-24.0f, 18.0f, 5.0f).y == float3(-24.0f, 18.0f, 5.0f).y, float3(-24.0f, 18.0f, 5.0f).z == float3(-24.0f, 18.0f, 5.0f).z)) && all(bool3(float3(20.0f, -15.0f, -4.0f).x == float3(20.0f, -15.0f, -4.0f).x, float3(20.0f, -15.0f, -4.0f).y == float3(20.0f, -15.0f, -4.0f).y, float3(20.0f, -15.0f, -4.0f).z == float3(20.0f, -15.0f, -4.0f).z))) && all(bool3(float3(-5.0f, 4.0f, 1.0f).x == float3(-5.0f, 4.0f, 1.0f).x, float3(-5.0f, 4.0f, 1.0f).y == float3(-5.0f, 4.0f, 1.0f).y, float3(-5.0f, 4.0f, 1.0f).z == float3(-5.0f, 4.0f, 1.0f).z)); + _95 = (all(bool3(float3(-24.0f, 18.0f, 5.0f).x == float3(-24.0f, 18.0f, 5.0f).x, float3(-24.0f, 18.0f, 5.0f).y == float3(-24.0f, 18.0f, 5.0f).y, float3(-24.0f, 18.0f, 5.0f).z == float3(-24.0f, 18.0f, 5.0f).z)) && all(bool3(float3(20.0f, -15.0f, -4.0f).x == float3(20.0f, -15.0f, -4.0f).x, float3(20.0f, -15.0f, -4.0f).y == float3(20.0f, -15.0f, -4.0f).y, float3(20.0f, -15.0f, -4.0f).z == float3(20.0f, -15.0f, -4.0f).z))) && all(bool3(float3(-5.0f, 4.0f, 1.0f).x == float3(-5.0f, 4.0f, 1.0f).x, float3(-5.0f, 4.0f, 1.0f).y == float3(-5.0f, 4.0f, 1.0f).y, float3(-5.0f, 4.0f, 1.0f).z == float3(-5.0f, 4.0f, 1.0f).z)); + } + else + { + _95 = false; + } + bool _110 = false; + if (_95) + { + _110 = ((all(bool4(float4(-2.0f, -0.5f, 1.0f, 0.5f).x == float4(-2.0f, -0.5f, 1.0f, 0.5f).x, float4(-2.0f, -0.5f, 1.0f, 0.5f).y == float4(-2.0f, -0.5f, 1.0f, 0.5f).y, float4(-2.0f, -0.5f, 1.0f, 0.5f).z == float4(-2.0f, -0.5f, 1.0f, 0.5f).z, float4(-2.0f, -0.5f, 1.0f, 0.5f).w == float4(-2.0f, -0.5f, 1.0f, 0.5f).w)) && all(bool4(float4(1.0f, 0.5f, 0.0f, -0.5f).x == float4(1.0f, 0.5f, 0.0f, -0.5f).x, float4(1.0f, 0.5f, 0.0f, -0.5f).y == float4(1.0f, 0.5f, 0.0f, -0.5f).y, float4(1.0f, 0.5f, 0.0f, -0.5f).z == float4(1.0f, 0.5f, 0.0f, -0.5f).z, float4(1.0f, 0.5f, 0.0f, -0.5f).w == float4(1.0f, 0.5f, 0.0f, -0.5f).w))) && all(bool4(float4(-8.0f, -1.0f, 2.0f, 2.0f).x == float4(-8.0f, -1.0f, 2.0f, 2.0f).x, float4(-8.0f, -1.0f, 2.0f, 2.0f).y == float4(-8.0f, -1.0f, 2.0f, 2.0f).y, float4(-8.0f, -1.0f, 2.0f, 2.0f).z == float4(-8.0f, -1.0f, 2.0f, 2.0f).z, float4(-8.0f, -1.0f, 2.0f, 2.0f).w == float4(-8.0f, -1.0f, 2.0f, 2.0f).w))) && all(bool4(float4(3.0f, 0.5f, -1.0f, -0.5f).x == float4(3.0f, 0.5f, -1.0f, -0.5f).x, float4(3.0f, 0.5f, -1.0f, -0.5f).y == float4(3.0f, 0.5f, -1.0f, -0.5f).y, float4(3.0f, 0.5f, -1.0f, -0.5f).z == float4(3.0f, 0.5f, -1.0f, -0.5f).z, float4(3.0f, 0.5f, -1.0f, -0.5f).w == float4(3.0f, 0.5f, -1.0f, -0.5f).w)); + } + else + { + _110 = false; + } + bool _133 = false; + if (_110) + { + float3x3 _113 = spvInverse(float3x3(float3(1.0f, 2.0f, 3.0f), float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f))); + float3 _122 = _113[0]; + float3 _125 = _113[1]; + float3 _129 = _113[2]; + _133 = (any(bool3(_122.x != float3(-24.0f, 18.0f, 5.0f).x, _122.y != float3(-24.0f, 18.0f, 5.0f).y, _122.z != float3(-24.0f, 18.0f, 5.0f).z)) || any(bool3(_125.x != float3(20.0f, -15.0f, -4.0f).x, _125.y != float3(20.0f, -15.0f, -4.0f).y, _125.z != float3(20.0f, -15.0f, -4.0f).z))) || any(bool3(_129.x != float3(-5.0f, 4.0f, 1.0f).x, _129.y != float3(-5.0f, 4.0f, 1.0f).y, _129.z != float3(-5.0f, 4.0f, 1.0f).z)); + } + else + { + _133 = false; + } + bool _149 = false; + if (_133) + { + float2 _137 = _10_colorGreen.z.xx; + float2x2 _136 = spvInverse(float2x2(float2(1.0f, 2.0f) + _137, float2(3.0f, 4.0f) + _137)); + float2 _142 = _136[0]; + float2 _145 = _136[1]; + _149 = all(bool2(_142.x == float2(-2.0f, 1.0f).x, _142.y == float2(-2.0f, 1.0f).y)) && all(bool2(_145.x == float2(1.5f, -0.5f).x, _145.y == float2(1.5f, -0.5f).y)); } else { - _83 = false; + _149 = false; } - bool _98 = false; - if (_83) + bool _173 = false; + if (_149) { - _98 = ((all(bool4(float4(-2.0f, -0.5f, 1.0f, 0.5f).x == float4(-2.0f, -0.5f, 1.0f, 0.5f).x, float4(-2.0f, -0.5f, 1.0f, 0.5f).y == float4(-2.0f, -0.5f, 1.0f, 0.5f).y, float4(-2.0f, -0.5f, 1.0f, 0.5f).z == float4(-2.0f, -0.5f, 1.0f, 0.5f).z, float4(-2.0f, -0.5f, 1.0f, 0.5f).w == float4(-2.0f, -0.5f, 1.0f, 0.5f).w)) && all(bool4(float4(1.0f, 0.5f, 0.0f, -0.5f).x == float4(1.0f, 0.5f, 0.0f, -0.5f).x, float4(1.0f, 0.5f, 0.0f, -0.5f).y == float4(1.0f, 0.5f, 0.0f, -0.5f).y, float4(1.0f, 0.5f, 0.0f, -0.5f).z == float4(1.0f, 0.5f, 0.0f, -0.5f).z, float4(1.0f, 0.5f, 0.0f, -0.5f).w == float4(1.0f, 0.5f, 0.0f, -0.5f).w))) && all(bool4(float4(-8.0f, -1.0f, 2.0f, 2.0f).x == float4(-8.0f, -1.0f, 2.0f, 2.0f).x, float4(-8.0f, -1.0f, 2.0f, 2.0f).y == float4(-8.0f, -1.0f, 2.0f, 2.0f).y, float4(-8.0f, -1.0f, 2.0f, 2.0f).z == float4(-8.0f, -1.0f, 2.0f, 2.0f).z, float4(-8.0f, -1.0f, 2.0f, 2.0f).w == float4(-8.0f, -1.0f, 2.0f, 2.0f).w))) && all(bool4(float4(3.0f, 0.5f, -1.0f, -0.5f).x == float4(3.0f, 0.5f, -1.0f, -0.5f).x, float4(3.0f, 0.5f, -1.0f, -0.5f).y == float4(3.0f, 0.5f, -1.0f, -0.5f).y, float4(3.0f, 0.5f, -1.0f, -0.5f).z == float4(3.0f, 0.5f, -1.0f, -0.5f).z, float4(3.0f, 0.5f, -1.0f, -0.5f).w == float4(3.0f, 0.5f, -1.0f, -0.5f).w)); + float3 _156 = _10_colorGreen.z.xxx; + float3x3 _152 = spvInverse(float3x3(float3(1.0f, 2.0f, 3.0f) + _156, float3(0.0f, 1.0f, 4.0f) + _156, float3(5.0f, 6.0f, 0.0f) + _156)); + float3 _162 = _152[0]; + float3 _165 = _152[1]; + float3 _169 = _152[2]; + _173 = (all(bool3(_162.x == float3(-24.0f, 18.0f, 5.0f).x, _162.y == float3(-24.0f, 18.0f, 5.0f).y, _162.z == float3(-24.0f, 18.0f, 5.0f).z)) && all(bool3(_165.x == float3(20.0f, -15.0f, -4.0f).x, _165.y == float3(20.0f, -15.0f, -4.0f).y, _165.z == float3(20.0f, -15.0f, -4.0f).z))) && all(bool3(_169.x == float3(-5.0f, 4.0f, 1.0f).x, _169.y == float3(-5.0f, 4.0f, 1.0f).y, _169.z == float3(-5.0f, 4.0f, 1.0f).z)); } else { - _98 = false; + _173 = false; } - bool _121 = false; - if (_98) + bool _204 = false; + if (_173) { - float3x3 _101 = spvInverse(float3x3(float3(1.0f, 2.0f, 3.0f), float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f))); - float3 _110 = _101[0]; - float3 _113 = _101[1]; - float3 _117 = _101[2]; - _121 = (any(bool3(_110.x != float3(-24.0f, 18.0f, 5.0f).x, _110.y != float3(-24.0f, 18.0f, 5.0f).y, _110.z != float3(-24.0f, 18.0f, 5.0f).z)) || any(bool3(_113.x != float3(20.0f, -15.0f, -4.0f).x, _113.y != float3(20.0f, -15.0f, -4.0f).y, _113.z != float3(20.0f, -15.0f, -4.0f).z))) || any(bool3(_117.x != float3(-5.0f, 4.0f, 1.0f).x, _117.y != float3(-5.0f, 4.0f, 1.0f).y, _117.z != float3(-5.0f, 4.0f, 1.0f).z)); + float4 _182 = _10_colorGreen.z.xxxx; + float4x4 _176 = spvInverse(float4x4(float4(1.0f, 0.0f, 0.0f, 1.0f) + _182, float4(0.0f, 2.0f, 1.0f, 2.0f) + _182, float4(2.0f, 1.0f, 0.0f, 1.0f) + _182, float4(2.0f, 0.0f, 1.0f, 4.0f) + _182)); + float4 _189 = _176[0]; + float4 _192 = _176[1]; + float4 _196 = _176[2]; + float4 _200 = _176[3]; + _204 = ((all(bool4(_189.x == float4(-2.0f, -0.5f, 1.0f, 0.5f).x, _189.y == float4(-2.0f, -0.5f, 1.0f, 0.5f).y, _189.z == float4(-2.0f, -0.5f, 1.0f, 0.5f).z, _189.w == float4(-2.0f, -0.5f, 1.0f, 0.5f).w)) && all(bool4(_192.x == float4(1.0f, 0.5f, 0.0f, -0.5f).x, _192.y == float4(1.0f, 0.5f, 0.0f, -0.5f).y, _192.z == float4(1.0f, 0.5f, 0.0f, -0.5f).z, _192.w == float4(1.0f, 0.5f, 0.0f, -0.5f).w))) && all(bool4(_196.x == float4(-8.0f, -1.0f, 2.0f, 2.0f).x, _196.y == float4(-8.0f, -1.0f, 2.0f, 2.0f).y, _196.z == float4(-8.0f, -1.0f, 2.0f, 2.0f).z, _196.w == float4(-8.0f, -1.0f, 2.0f, 2.0f).w))) && all(bool4(_200.x == float4(3.0f, 0.5f, -1.0f, -0.5f).x, _200.y == float4(3.0f, 0.5f, -1.0f, -0.5f).y, _200.z == float4(3.0f, 0.5f, -1.0f, -0.5f).z, _200.w == float4(3.0f, 0.5f, -1.0f, -0.5f).w)); } else { - _121 = false; + _204 = false; } - float4 _122 = 0.0f.xxxx; - if (_121) + float4 _205 = 0.0f.xxxx; + if (_204) { - _122 = _10_colorGreen; + _205 = _10_colorGreen; } else { - _122 = _10_colorRed; + _205 = _10_colorRed; } - return _122; + return _205; } void frag_main() diff --git a/tests/sksl/intrinsics/Inverse.metal b/tests/sksl/intrinsics/Inverse.metal index 534b1923c9b1..0bb34d8ffcb7 100644 --- a/tests/sksl/intrinsics/Inverse.metal +++ b/tests/sksl/intrinsics/Inverse.metal @@ -11,36 +11,36 @@ struct Outputs { half4 sk_FragColor [[color(0)]]; }; -thread bool operator==(const half2x2 left, const half2x2 right); -thread bool operator!=(const half2x2 left, const half2x2 right); +thread bool operator==(const float2x2 left, const float2x2 right); +thread bool operator!=(const float2x2 left, const float2x2 right); -thread bool operator==(const half3x3 left, const half3x3 right); -thread bool operator!=(const half3x3 left, const half3x3 right); +thread bool operator==(const float3x3 left, const float3x3 right); +thread bool operator!=(const float3x3 left, const float3x3 right); -thread bool operator==(const half4x4 left, const half4x4 right); -thread bool operator!=(const half4x4 left, const half4x4 right); -thread bool operator==(const half2x2 left, const half2x2 right) { +thread bool operator==(const float4x4 left, const float4x4 right); +thread bool operator!=(const float4x4 left, const float4x4 right); +thread bool operator==(const float2x2 left, const float2x2 right) { return all(left[0] == right[0]) && all(left[1] == right[1]); } -thread bool operator!=(const half2x2 left, const half2x2 right) { +thread bool operator!=(const float2x2 left, const float2x2 right) { return !(left == right); } -thread bool operator==(const half3x3 left, const half3x3 right) { +thread bool operator==(const float3x3 left, const float3x3 right) { return all(left[0] == right[0]) && all(left[1] == right[1]) && all(left[2] == right[2]); } -thread bool operator!=(const half3x3 left, const half3x3 right) { +thread bool operator!=(const float3x3 left, const float3x3 right) { return !(left == right); } -thread bool operator==(const half4x4 left, const half4x4 right) { +thread bool operator==(const float4x4 left, const float4x4 right) { return all(left[0] == right[0]) && all(left[1] == right[1]) && all(left[2] == right[2]) && all(left[3] == right[3]); } -thread bool operator!=(const half4x4 left, const half4x4 right) { +thread bool operator!=(const float4x4 left, const float4x4 right) { return !(left == right); } @@ -59,12 +59,58 @@ return matrix( b11, ( a22*a00 - a02*a20), (-a12*a00 + a02*a10), b21, (-a21*a00 + a01*a20), ( a11*a00 - a01*a10)) * (1/det); } + +template +matrix mat2_inverse(matrix m) { +return matrix(m[1].y, -m[0].y, -m[1].x, m[0].x) * (1/determinant(m)); +} + +template +matrix mat4_inverse(matrix m) { +T + a00 = m[0].x, a01 = m[0].y, a02 = m[0].z, a03 = m[0].w, + a10 = m[1].x, a11 = m[1].y, a12 = m[1].z, a13 = m[1].w, + a20 = m[2].x, a21 = m[2].y, a22 = m[2].z, a23 = m[2].w, + a30 = m[3].x, a31 = m[3].y, a32 = m[3].z, a33 = m[3].w, + b00 = a00*a11 - a01*a10, + b01 = a00*a12 - a02*a10, + b02 = a00*a13 - a03*a10, + b03 = a01*a12 - a02*a11, + b04 = a01*a13 - a03*a11, + b05 = a02*a13 - a03*a12, + b06 = a20*a31 - a21*a30, + b07 = a20*a32 - a22*a30, + b08 = a20*a33 - a23*a30, + b09 = a21*a32 - a22*a31, + b10 = a21*a33 - a23*a31, + b11 = a22*a33 - a23*a32, + det = b00*b11 - b01*b10 + b02*b09 + b03*b08 - b04*b07 + b05*b06; +return matrix( + a11*b11 - a12*b10 + a13*b09, + a02*b10 - a01*b11 - a03*b09, + a31*b05 - a32*b04 + a33*b03, + a22*b04 - a21*b05 - a23*b03, + a12*b08 - a10*b11 - a13*b07, + a00*b11 - a02*b08 + a03*b07, + a32*b02 - a30*b05 - a33*b01, + a20*b05 - a22*b02 + a23*b01, + a10*b10 - a11*b08 + a13*b06, + a01*b08 - a00*b10 - a03*b06, + a30*b04 - a31*b02 + a33*b00, + a21*b02 - a20*b04 - a23*b00, + a11*b07 - a10*b09 - a12*b06, + a00*b09 - a01*b07 + a02*b06, + a31*b01 - a30*b03 - a32*b00, + a20*b03 - a21*b01 + a22*b00) * (1/det); +} fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) { Outputs _out; (void)_out; - half2x2 inv2x2 = half2x2(half2(-2.0h, 1.0h), half2(1.5h, -0.5h)); - half3x3 inv3x3 = half3x3(half3(-24.0h, 18.0h, 5.0h), half3(20.0h, -15.0h, -4.0h), half3(-5.0h, 4.0h, 1.0h)); - half4x4 inv4x4 = half4x4(half4(-2.0h, -0.5h, 1.0h, 0.5h), half4(1.0h, 0.5h, 0.0h, -0.5h), half4(-8.0h, -1.0h, 2.0h, 2.0h), half4(3.0h, 0.5h, -1.0h, -0.5h)); - _out.sk_FragColor = ((half2x2(half2(-2.0h, 1.0h), half2(1.5h, -0.5h)) == inv2x2 && half3x3(half3(-24.0h, 18.0h, 5.0h), half3(20.0h, -15.0h, -4.0h), half3(-5.0h, 4.0h, 1.0h)) == inv3x3) && half4x4(half4(-2.0h, -0.5h, 1.0h, 0.5h), half4(1.0h, 0.5h, 0.0h, -0.5h), half4(-8.0h, -1.0h, 2.0h, 2.0h), half4(3.0h, 0.5h, -1.0h, -0.5h)) == inv4x4) && mat3_inverse(half3x3(half3(1.0h, 2.0h, 3.0h), half3(4.0h, 5.0h, 6.0h), half3(7.0h, 8.0h, 9.0h))) != inv3x3 ? _uniforms.colorGreen : _uniforms.colorRed; + const float2x2 matrix2x2 = float2x2(float2(1.0, 2.0), float2(3.0, 4.0)); + float2x2 inv2x2 = float2x2(float2(-2.0, 1.0), float2(1.5, -0.5)); + float3x3 inv3x3 = float3x3(float3(-24.0, 18.0, 5.0), float3(20.0, -15.0, -4.0), float3(-5.0, 4.0, 1.0)); + float4x4 inv4x4 = float4x4(float4(-2.0, -0.5, 1.0, 0.5), float4(1.0, 0.5, 0.0, -0.5), float4(-8.0, -1.0, 2.0, 2.0), float4(3.0, 0.5, -1.0, -0.5)); + float Zero = float(_uniforms.colorGreen.z); + _out.sk_FragColor = (((((float2x2(float2(-2.0, 1.0), float2(1.5, -0.5)) == inv2x2 && float3x3(float3(-24.0, 18.0, 5.0), float3(20.0, -15.0, -4.0), float3(-5.0, 4.0, 1.0)) == inv3x3) && float4x4(float4(-2.0, -0.5, 1.0, 0.5), float4(1.0, 0.5, 0.0, -0.5), float4(-8.0, -1.0, 2.0, 2.0), float4(3.0, 0.5, -1.0, -0.5)) == inv4x4) && mat3_inverse(float3x3(float3(1.0, 2.0, 3.0), float3(4.0, 5.0, 6.0), float3(7.0, 8.0, 9.0))) != inv3x3) && mat2_inverse(matrix2x2 + (float2x2(1.0, 1.0, 1.0, 1.0) * Zero)) == inv2x2) && mat3_inverse(float3x3(float3(1.0, 2.0, 3.0), float3(0.0, 1.0, 4.0), float3(5.0, 6.0, 0.0)) + (float3x3(1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0) * Zero)) == inv3x3) && mat4_inverse(float4x4(float4(1.0, 0.0, 0.0, 1.0), float4(0.0, 2.0, 1.0, 2.0), float4(2.0, 1.0, 0.0, 1.0), float4(2.0, 0.0, 1.0, 4.0)) + (float4x4(1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0) * Zero)) == inv4x4 ? _uniforms.colorGreen : _uniforms.colorRed; return _out; } diff --git a/tests/sksl/intrinsics/Inverse.skrp b/tests/sksl/intrinsics/Inverse.skrp index 56913e6875c3..4788e02479ef 100644 --- a/tests/sksl/intrinsics/Inverse.skrp +++ b/tests/sksl/intrinsics/Inverse.skrp @@ -1,81 +1,102 @@ +103 instructions + [immutable slots] -inv2x2(0) = 0xC0000000 (-2.0) -inv2x2(1) = 0x3F800000 (1.0) -inv2x2(2) = 0x3FC00000 (1.5) -inv2x2(3) = 0xBF000000 (-0.5) -inv3x3(0) = 0xC1C00000 (-24.0) -inv3x3(1) = 0x41900000 (18.0) -inv3x3(2) = 0x40A00000 (5.0) -inv3x3(3) = 0x41A00000 (20.0) -inv3x3(4) = 0xC1700000 (-15.0) -inv3x3(5) = 0xC0800000 (-4.0) -inv3x3(6) = 0xC0A00000 (-5.0) -inv3x3(7) = 0x40800000 (4.0) -inv3x3(8) = 0x3F800000 (1.0) -inv4x4(0) = 0xC0000000 (-2.0) -inv4x4(1) = 0xBF000000 (-0.5) -inv4x4(2) = 0x3F800000 (1.0) -inv4x4(3) = 0x3F000000 (0.5) -inv4x4(4) = 0x3F800000 (1.0) -inv4x4(5) = 0x3F000000 (0.5) -inv4x4(6) = 0 -inv4x4(7) = 0xBF000000 (-0.5) -inv4x4(8) = 0xC1000000 (-8.0) -inv4x4(9) = 0xBF800000 (-1.0) -inv4x4(10) = 0x40000000 (2.0) -inv4x4(11) = 0x40000000 (2.0) -inv4x4(12) = 0x40400000 (3.0) -inv4x4(13) = 0x3F000000 (0.5) -inv4x4(14) = 0xBF800000 (-1.0) -inv4x4(15) = 0xBF000000 (-0.5) +i0 = 0x3F800000 (1.0) +i1 = 0x40000000 (2.0) +i2 = 0x40400000 (3.0) +i3 = 0x40800000 (4.0) +i4 = 0xC0000000 (-2.0) +i5 = 0x3F800000 (1.0) +i6 = 0x3FC00000 (1.5) +i7 = 0xBF000000 (-0.5) +i8 = 0xC1C00000 (-24.0) +i9 = 0x41900000 (18.0) +i10 = 0x40A00000 (5.0) +i11 = 0x41A00000 (20.0) +i12 = 0xC1700000 (-15.0) +i13 = 0xC0800000 (-4.0) +i14 = 0xC0A00000 (-5.0) +i15 = 0x40800000 (4.0) +i16 = 0x3F800000 (1.0) +i17 = 0xC0000000 (-2.0) +i18 = 0xBF000000 (-0.5) +i19 = 0x3F800000 (1.0) +i20 = 0x3F000000 (0.5) +i21 = 0x3F800000 (1.0) +i22 = 0x3F000000 (0.5) +i23 = 0 +i24 = 0xBF000000 (-0.5) +i25 = 0xC1000000 (-8.0) +i26 = 0xBF800000 (-1.0) +i27 = 0x40000000 (2.0) +i28 = 0x40000000 (2.0) +i29 = 0x40400000 (3.0) +i30 = 0x3F000000 (0.5) +i31 = 0xBF800000 (-1.0) +i32 = 0xBF000000 (-0.5) +i33 = 0x3F800000 (1.0) +i34 = 0x40000000 (2.0) +i35 = 0x40400000 (3.0) +i36 = 0x40800000 (4.0) +i37 = 0x40A00000 (5.0) +i38 = 0x40C00000 (6.0) +i39 = 0x40E00000 (7.0) +i40 = 0x41000000 (8.0) +i41 = 0x41100000 (9.0) +i42 = 0x3F800000 (1.0) +i43 = 0x40000000 (2.0) +i44 = 0x40400000 (3.0) +i45 = 0 +i46 = 0x3F800000 (1.0) +i47 = 0x40800000 (4.0) +i48 = 0x40A00000 (5.0) +i49 = 0x40C00000 (6.0) +i50 = 0 +i51 = 0x3F800000 (1.0) +i52 = 0 +i53 = 0 +i54 = 0x3F800000 (1.0) +i55 = 0 +i56 = 0x40000000 (2.0) +i57 = 0x3F800000 (1.0) +i58 = 0x40000000 (2.0) +i59 = 0x40000000 (2.0) +i60 = 0x3F800000 (1.0) +i61 = 0 +i62 = 0x3F800000 (1.0) +i63 = 0x40000000 (2.0) +i64 = 0 +i65 = 0x3F800000 (1.0) +i66 = 0x40800000 (4.0) store_src_rg xy = src.rg init_lane_masks CondMask = LoopMask = RetMask = true -copy_constant $0 = 0xC0000000 (-2.0) -copy_constant $1 = 0x3F800000 (1.0) -copy_constant $2 = 0x3FC00000 (1.5) -copy_constant $3 = 0xBF000000 (-0.5) -copy_4_slots_unmasked $4..7 = inv2x2 +copy_uniform Zero = colorGreen(2) +copy_4_immutables_unmasked $0..3 = i4..7 [0xC0000000 (-2.0), 0x3F800000 (1.0), 0x3FC00000 (1.5), 0xBF000000 (-0.5)] +copy_4_immutables_unmasked $4..7 = i4..7 [0xC0000000 (-2.0), 0x3F800000 (1.0), 0x3FC00000 (1.5), 0xBF000000 (-0.5)] cmpeq_4_floats $0..3 = equal($0..3, $4..7) bitwise_and_2_ints $0..1 &= $2..3 bitwise_and_int $0 &= $1 -copy_constant $1 = 0xC1C00000 (-24.0) -copy_constant $2 = 0x41900000 (18.0) -copy_constant $3 = 0x40A00000 (5.0) -copy_constant $4 = 0x41A00000 (20.0) -copy_constant $5 = 0xC1700000 (-15.0) -copy_constant $6 = 0xC0800000 (-4.0) -copy_constant $7 = 0xC0A00000 (-5.0) -copy_constant $8 = 0x40800000 (4.0) -copy_constant $9 = 0x3F800000 (1.0) -copy_4_slots_unmasked $10..13 = inv3x3(0..3) -copy_4_slots_unmasked $14..17 = inv3x3(4..7) -copy_slot_unmasked $18 = inv3x3(8) +copy_4_immutables_unmasked $1..4 = i8..11 [0xC1C00000 (-24.0), 0x41900000 (18.0), 0x40A00000 (5.0), 0x41A00000 (20.0)] +copy_4_immutables_unmasked $5..8 = i12..15 [0xC1700000 (-15.0), 0xC0800000 (-4.0), 0xC0A00000 (-5.0), 0x40800000 (4.0)] +copy_immutable_unmasked $9 = i16 [0x3F800000 (1.0)] +copy_4_immutables_unmasked $10..13 = i8..11 [0xC1C00000 (-24.0), 0x41900000 (18.0), 0x40A00000 (5.0), 0x41A00000 (20.0)] +copy_4_immutables_unmasked $14..17 = i12..15 [0xC1700000 (-15.0), 0xC0800000 (-4.0), 0xC0A00000 (-5.0), 0x40800000 (4.0)] +copy_immutable_unmasked $18 = i16 [0x3F800000 (1.0)] cmpeq_n_floats $1..9 = equal($1..9, $10..18) bitwise_and_4_ints $2..5 &= $6..9 bitwise_and_2_ints $2..3 &= $4..5 bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0xC0000000 (-2.0) -copy_constant $2 = 0xBF000000 (-0.5) -copy_constant $3 = 0x3F800000 (1.0) -copy_constant $4 = 0x3F000000 (0.5) -copy_constant $5 = 0x3F800000 (1.0) -copy_constant $6 = 0x3F000000 (0.5) -copy_constant $7 = 0 -copy_constant $8 = 0xBF000000 (-0.5) -copy_constant $9 = 0xC1000000 (-8.0) -copy_constant $10 = 0xBF800000 (-1.0) -splat_2_constants $11..12 = 0x40000000 (2.0) -copy_constant $13 = 0x40400000 (3.0) -copy_constant $14 = 0x3F000000 (0.5) -copy_constant $15 = 0xBF800000 (-1.0) -copy_constant $16 = 0xBF000000 (-0.5) -copy_4_slots_unmasked $17..20 = inv4x4(0..3) -copy_4_slots_unmasked $21..24 = inv4x4(4..7) -copy_4_slots_unmasked $25..28 = inv4x4(8..11) -copy_4_slots_unmasked $29..32 = inv4x4(12..15) +copy_4_immutables_unmasked $1..4 = i17..20 [0xC0000000 (-2.0), 0xBF000000 (-0.5), 0x3F800000 (1.0), 0x3F000000 (0.5)] +copy_4_immutables_unmasked $5..8 = i21..24 [0x3F800000 (1.0), 0x3F000000 (0.5), 0, 0xBF000000 (-0.5)] +copy_4_immutables_unmasked $9..12 = i25..28 [0xC1000000 (-8.0), 0xBF800000 (-1.0), 0x40000000 (2.0), 0x40000000 (2.0)] +copy_4_immutables_unmasked $13..16 = i29..32 [0x40400000 (3.0), 0x3F000000 (0.5), 0xBF800000 (-1.0), 0xBF000000 (-0.5)] +copy_4_immutables_unmasked $17..20 = i17..20 [0xC0000000 (-2.0), 0xBF000000 (-0.5), 0x3F800000 (1.0), 0x3F000000 (0.5)] +copy_4_immutables_unmasked $21..24 = i21..24 [0x3F800000 (1.0), 0x3F000000 (0.5), 0, 0xBF000000 (-0.5)] +copy_4_immutables_unmasked $25..28 = i25..28 [0xC1000000 (-8.0), 0xBF800000 (-1.0), 0x40000000 (2.0), 0x40000000 (2.0)] +copy_4_immutables_unmasked $29..32 = i29..32 [0x40400000 (3.0), 0x3F000000 (0.5), 0xBF800000 (-1.0), 0xBF000000 (-0.5)] cmpeq_n_floats $1..16 = equal($1..16, $17..32) bitwise_and_4_ints $9..12 &= $13..16 bitwise_and_4_ints $5..8 &= $9..12 @@ -83,25 +104,69 @@ bitwise_and_4_ints $1..4 &= $5..8 bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0x3F800000 (1.0) -copy_constant $2 = 0x40000000 (2.0) -copy_constant $3 = 0x40400000 (3.0) -copy_constant $4 = 0x40800000 (4.0) -copy_constant $5 = 0x40A00000 (5.0) -copy_constant $6 = 0x40C00000 (6.0) -copy_constant $7 = 0x40E00000 (7.0) -copy_constant $8 = 0x41000000 (8.0) -copy_constant $9 = 0x41100000 (9.0) +copy_4_immutables_unmasked $1..4 = i33..36 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked $5..8 = i37..40 [0x40A00000 (5.0), 0x40C00000 (6.0), 0x40E00000 (7.0), 0x41000000 (8.0)] +copy_immutable_unmasked $9 = i41 [0x41100000 (9.0)] inverse_mat3 $1..9 = inverse($1..9) -copy_4_slots_unmasked $10..13 = inv3x3(0..3) -copy_4_slots_unmasked $14..17 = inv3x3(4..7) -copy_slot_unmasked $18 = inv3x3(8) +copy_4_immutables_unmasked $10..13 = i8..11 [0xC1C00000 (-24.0), 0x41900000 (18.0), 0x40A00000 (5.0), 0x41A00000 (20.0)] +copy_4_immutables_unmasked $14..17 = i12..15 [0xC1700000 (-15.0), 0xC0800000 (-4.0), 0xC0A00000 (-5.0), 0x40800000 (4.0)] +copy_immutable_unmasked $18 = i16 [0x3F800000 (1.0)] cmpne_n_floats $1..9 = notEqual($1..9, $10..18) bitwise_or_4_ints $2..5 |= $6..9 bitwise_or_2_ints $2..3 |= $4..5 bitwise_or_int $2 |= $3 bitwise_or_int $1 |= $2 bitwise_and_int $0 &= $1 +copy_4_immutables_unmasked $1..4 = i0..3 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] +copy_slot_unmasked $5 = Zero +swizzle_4 $5..8 = ($5..8).xxxx +add_4_floats $1..4 += $5..8 +inverse_mat2 $1..4 = inverse($1..4) +copy_4_immutables_unmasked $5..8 = i4..7 [0xC0000000 (-2.0), 0x3F800000 (1.0), 0x3FC00000 (1.5), 0xBF000000 (-0.5)] +cmpeq_4_floats $1..4 = equal($1..4, $5..8) +bitwise_and_2_ints $1..2 &= $3..4 +bitwise_and_int $1 &= $2 +bitwise_and_int $0 &= $1 +copy_4_immutables_unmasked $1..4 = i42..45 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0] +copy_4_immutables_unmasked $5..8 = i46..49 [0x3F800000 (1.0), 0x40800000 (4.0), 0x40A00000 (5.0), 0x40C00000 (6.0)] +copy_immutable_unmasked $9 = i50 [0] +copy_slot_unmasked $10 = Zero +swizzle_4 $10..13 = ($10..13).xxxx +copy_4_slots_unmasked $14..17 = $10..13 +copy_slot_unmasked $18 = $17 +add_n_floats $1..9 += $10..18 +inverse_mat3 $1..9 = inverse($1..9) +copy_4_immutables_unmasked $10..13 = i8..11 [0xC1C00000 (-24.0), 0x41900000 (18.0), 0x40A00000 (5.0), 0x41A00000 (20.0)] +copy_4_immutables_unmasked $14..17 = i12..15 [0xC1700000 (-15.0), 0xC0800000 (-4.0), 0xC0A00000 (-5.0), 0x40800000 (4.0)] +copy_immutable_unmasked $18 = i16 [0x3F800000 (1.0)] +cmpeq_n_floats $1..9 = equal($1..9, $10..18) +bitwise_and_4_ints $2..5 &= $6..9 +bitwise_and_2_ints $2..3 &= $4..5 +bitwise_and_int $2 &= $3 +bitwise_and_int $1 &= $2 +bitwise_and_int $0 &= $1 +copy_4_immutables_unmasked $1..4 = i51..54 [0x3F800000 (1.0), 0, 0, 0x3F800000 (1.0)] +copy_4_immutables_unmasked $5..8 = i55..58 [0, 0x40000000 (2.0), 0x3F800000 (1.0), 0x40000000 (2.0)] +copy_4_immutables_unmasked $9..12 = i59..62 [0x40000000 (2.0), 0x3F800000 (1.0), 0, 0x3F800000 (1.0)] +copy_4_immutables_unmasked $13..16 = i63..66 [0x40000000 (2.0), 0, 0x3F800000 (1.0), 0x40800000 (4.0)] +copy_slot_unmasked $17 = Zero +swizzle_4 $17..20 = ($17..20).xxxx +copy_4_slots_unmasked $21..24 = $17..20 +copy_4_slots_unmasked $25..28 = $21..24 +copy_4_slots_unmasked $29..32 = $25..28 +add_n_floats $1..16 += $17..32 +inverse_mat4 $1..16 = inverse($1..16) +copy_4_immutables_unmasked $17..20 = i17..20 [0xC0000000 (-2.0), 0xBF000000 (-0.5), 0x3F800000 (1.0), 0x3F000000 (0.5)] +copy_4_immutables_unmasked $21..24 = i21..24 [0x3F800000 (1.0), 0x3F000000 (0.5), 0, 0xBF000000 (-0.5)] +copy_4_immutables_unmasked $25..28 = i25..28 [0xC1000000 (-8.0), 0xBF800000 (-1.0), 0x40000000 (2.0), 0x40000000 (2.0)] +copy_4_immutables_unmasked $29..32 = i29..32 [0x40400000 (3.0), 0x3F000000 (0.5), 0xBF800000 (-1.0), 0xBF000000 (-0.5)] +cmpeq_n_floats $1..16 = equal($1..16, $17..32) +bitwise_and_4_ints $9..12 &= $13..16 +bitwise_and_4_ints $5..8 &= $9..12 +bitwise_and_4_ints $1..4 &= $5..8 +bitwise_and_2_ints $1..2 &= $3..4 +bitwise_and_int $1 &= $2 +bitwise_and_int $0 &= $1 swizzle_4 $0..3 = ($0..3).xxxx copy_4_uniforms $4..7 = colorRed copy_4_uniforms $8..11 = colorGreen diff --git a/tests/sksl/intrinsics/Inverse.wgsl b/tests/sksl/intrinsics/Inverse.wgsl new file mode 100644 index 000000000000..124cb3db6e8b --- /dev/null +++ b/tests/sksl/intrinsics/Inverse.wgsl @@ -0,0 +1,91 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn mat3_inverse(m: mat3x3) -> mat3x3 { +let a00 = m[0].x; let a01 = m[0].y; let a02 = m[0].z; +let a10 = m[1].x; let a11 = m[1].y; let a12 = m[1].z; +let a20 = m[2].x; let a21 = m[2].y; let a22 = m[2].z; +let b01 = a22*a11 - a12*a21; +let b11 = -a22*a10 + a12*a20; +let b21 = a21*a10 - a11*a20; +let det = a00*b01 + a01*b11 + a02*b21; +return mat3x3(b01, (-a22*a01 + a02*a21), ( a12*a01 - a02*a11), +b11, ( a22*a00 - a02*a20), (-a12*a00 + a02*a10), +b21, (-a21*a00 + a01*a20), ( a11*a00 - a01*a10)) * (1/det); +} +fn mat2_inverse(m: mat2x2) -> mat2x2 { +return mat2x2(m[1].y, -m[0].y, -m[1].x, m[0].x) * (1/determinant(m)); +} +fn mat4_inverse(m: mat4x4) -> mat4x4{ +let a00 = m[0].x; let a01 = m[0].y; let a02 = m[0].z; let a03 = m[0].w; +let a10 = m[1].x; let a11 = m[1].y; let a12 = m[1].z; let a13 = m[1].w; +let a20 = m[2].x; let a21 = m[2].y; let a22 = m[2].z; let a23 = m[2].w; +let a30 = m[3].x; let a31 = m[3].y; let a32 = m[3].z; let a33 = m[3].w; +let b00 = a00*a11 - a01*a10; +let b01 = a00*a12 - a02*a10; +let b02 = a00*a13 - a03*a10; +let b03 = a01*a12 - a02*a11; +let b04 = a01*a13 - a03*a11; +let b05 = a02*a13 - a03*a12; +let b06 = a20*a31 - a21*a30; +let b07 = a20*a32 - a22*a30; +let b08 = a20*a33 - a23*a30; +let b09 = a21*a32 - a22*a31; +let b10 = a21*a33 - a23*a31; +let b11 = a22*a33 - a23*a32; +let det = b00*b11 - b01*b10 + b02*b09 + b03*b08 - b04*b07 + b05*b06; +return mat4x4(a11*b11 - a12*b10 + a13*b09, +a02*b10 - a01*b11 - a03*b09, +a31*b05 - a32*b04 + a33*b03, +a22*b04 - a21*b05 - a23*b03, +a12*b08 - a10*b11 - a13*b07, +a00*b11 - a02*b08 + a03*b07, +a32*b02 - a30*b05 - a33*b01, +a20*b05 - a22*b02 + a23*b01, +a10*b10 - a11*b08 + a13*b06, +a01*b08 - a00*b10 - a03*b06, +a30*b04 - a31*b02 + a33*b00, +a21*b02 - a20*b04 - a23*b00, +a11*b07 - a10*b09 - a12*b06, +a00*b09 - a01*b07 + a02*b06, +a31*b01 - a30*b03 - a32*b00, +a20*b03 - a21*b01 + a22*b00) * (1/det); +} +fn main(_skParam0: vec2) -> vec4 { + let xy = _skParam0; + { + const matrix2x2: mat2x2 = mat2x2(1.0, 2.0, 3.0, 4.0); + var inv2x2: mat2x2 = mat2x2(-2.0, 1.0, 1.5, -0.5); + var inv3x3: mat3x3 = mat3x3(-24.0, 18.0, 5.0, 20.0, -15.0, -4.0, -5.0, 4.0, 1.0); + var inv4x4: mat4x4 = mat4x4(-2.0, -0.5, 1.0, 0.5, 1.0, 0.5, 0.0, -0.5, -8.0, -1.0, 2.0, 2.0, 3.0, 0.5, -1.0, -0.5); + var Zero: f32 = f32(_globalUniforms.colorGreen.z); + let _skTemp0 = mat2x2(-2.0, 1.0, 1.5, -0.5); + let _skTemp1 = mat3x3(-24.0, 18.0, 5.0, 20.0, -15.0, -4.0, -5.0, 4.0, 1.0); + let _skTemp2 = mat4x4(-2.0, -0.5, 1.0, 0.5, 1.0, 0.5, 0.0, -0.5, -8.0, -1.0, 2.0, 2.0, 3.0, 0.5, -1.0, -0.5); + let _skTemp3 = mat3x3(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0); + let _skTemp4 = mat3_inverse(_skTemp3); + let _skTemp5 = _skTemp4; + let _skTemp6 = mat2_inverse(matrix2x2 + mat2x2(Zero, Zero, Zero, Zero)); + let _skTemp7 = _skTemp6; + let _skTemp8 = mat3_inverse(mat3x3(1.0, 2.0, 3.0, 0.0, 1.0, 4.0, 5.0, 6.0, 0.0) + mat3x3(Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero)); + let _skTemp9 = _skTemp8; + let _skTemp10 = mat4_inverse(mat4x4(1.0, 0.0, 0.0, 1.0, 0.0, 2.0, 1.0, 2.0, 2.0, 1.0, 0.0, 1.0, 2.0, 0.0, 1.0, 4.0) + mat4x4(Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero, Zero)); + let _skTemp11 = _skTemp10; + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((all(_skTemp0[0] == inv2x2[0]) && all(_skTemp0[1] == inv2x2[1])) && (all(_skTemp1[0] == inv3x3[0]) && all(_skTemp1[1] == inv3x3[1]) && all(_skTemp1[2] == inv3x3[2]))) && (all(_skTemp2[0] == inv4x4[0]) && all(_skTemp2[1] == inv4x4[1]) && all(_skTemp2[2] == inv4x4[2]) && all(_skTemp2[3] == inv4x4[3]))) && (any(_skTemp5[0] != inv3x3[0]) || any(_skTemp5[1] != inv3x3[1]) || any(_skTemp5[2] != inv3x3[2]))) && (all(_skTemp7[0] == inv2x2[0]) && all(_skTemp7[1] == inv2x2[1]))) && (all(_skTemp9[0] == inv3x3[0]) && all(_skTemp9[1] == inv3x3[1]) && all(_skTemp9[2] == inv3x3[2]))) && (all(_skTemp11[0] == inv4x4[0]) && all(_skTemp11[1] == inv4x4[1]) && all(_skTemp11[2] == inv4x4[2]) && all(_skTemp11[3] == inv4x4[3])))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/intrinsics/Inversesqrt.asm.frag b/tests/sksl/intrinsics/Inversesqrt.asm.frag index 25dcfec43880..d4d527fd03a8 100644 --- a/tests/sksl/intrinsics/Inversesqrt.asm.frag +++ b/tests/sksl/intrinsics/Inversesqrt.asm.frag @@ -1,278 +1,278 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "inputVal" -OpMemberName %_UniformBuffer 1 "expected" -OpMemberName %_UniformBuffer 2 "colorGreen" -OpMemberName %_UniformBuffer 3 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 3 Offset 48 -OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %27 RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %82 RelaxedPrecision -OpDecorate %90 RelaxedPrecision -OpDecorate %91 RelaxedPrecision -OpDecorate %100 RelaxedPrecision -OpDecorate %101 RelaxedPrecision -OpDecorate %110 RelaxedPrecision -OpDecorate %116 RelaxedPrecision -OpDecorate %119 RelaxedPrecision -OpDecorate %120 RelaxedPrecision -OpDecorate %125 RelaxedPrecision -OpDecorate %129 RelaxedPrecision -OpDecorate %130 RelaxedPrecision -OpDecorate %136 RelaxedPrecision -OpDecorate %140 RelaxedPrecision -OpDecorate %141 RelaxedPrecision -OpDecorate %147 RelaxedPrecision -OpDecorate %151 RelaxedPrecision -OpDecorate %162 RelaxedPrecision -OpDecorate %165 RelaxedPrecision -OpDecorate %166 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "inputVal" + OpMemberName %_UniformBuffer 1 "expected" + OpMemberName %_UniformBuffer 2 "colorGreen" + OpMemberName %_UniformBuffer 3 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 3 Offset 48 + OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %27 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %82 RelaxedPrecision + OpDecorate %90 RelaxedPrecision + OpDecorate %91 RelaxedPrecision + OpDecorate %100 RelaxedPrecision + OpDecorate %101 RelaxedPrecision + OpDecorate %110 RelaxedPrecision + OpDecorate %116 RelaxedPrecision + OpDecorate %119 RelaxedPrecision + OpDecorate %120 RelaxedPrecision + OpDecorate %125 RelaxedPrecision + OpDecorate %129 RelaxedPrecision + OpDecorate %130 RelaxedPrecision + OpDecorate %136 RelaxedPrecision + OpDecorate %140 RelaxedPrecision + OpDecorate %141 RelaxedPrecision + OpDecorate %147 RelaxedPrecision + OpDecorate %151 RelaxedPrecision + OpDecorate %162 RelaxedPrecision + OpDecorate %165 RelaxedPrecision + OpDecorate %166 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%false = OpConstantFalse %bool + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%v3bool = OpTypeVector %bool 3 -%v4bool = OpTypeVector %bool 4 -%float_1 = OpConstant %float 1 -%float_0_5 = OpConstant %float 0.5 -%88 = OpConstantComposite %v2float %float_1 %float_0_5 -%float_0_25 = OpConstant %float 0.25 -%98 = OpConstantComposite %v3float %float_1 %float_0_5 %float_0_25 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %v3bool = OpTypeVector %bool 3 + %v4bool = OpTypeVector %bool 4 + %float_1 = OpConstant %float 1 + %float_0_5 = OpConstant %float 0.5 + %88 = OpConstantComposite %v2float %float_1 %float_0_5 + %float_0_25 = OpConstant %float 0.25 + %98 = OpConstantComposite %v3float %float_1 %float_0_5 %float_0_25 %float_0_125 = OpConstant %float 0.125 -%108 = OpConstantComposite %v4float %float_1 %float_0_5 %float_0_25 %float_0_125 -%float_n1 = OpConstant %float -1 -%float_n4 = OpConstant %float -4 -%127 = OpConstantComposite %v2float %float_n1 %float_n4 -%float_n16 = OpConstant %float -16 -%138 = OpConstantComposite %v3float %float_n1 %float_n4 %float_n16 -%float_n64 = OpConstant %float -64 -%149 = OpConstantComposite %v4float %float_n1 %float_n4 %float_n16 %float_n64 + %108 = OpConstantComposite %v4float %float_1 %float_0_5 %float_0_25 %float_0_125 + %float_n1 = OpConstant %float -1 + %float_n4 = OpConstant %float -4 + %127 = OpConstantComposite %v2float %float_n1 %float_n4 + %float_n16 = OpConstant %float -16 + %138 = OpConstantComposite %v3float %float_n1 %float_n4 %float_n16 + %float_n64 = OpConstant %float -64 + %149 = OpConstantComposite %v4float %float_n1 %float_n4 %float_n16 %float_n64 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_2 = OpConstant %int 2 -%int_3 = OpConstant %int 3 + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%155 = OpVariable %_ptr_Function_v4float Function -%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %28 -%33 = OpCompositeExtract %float %32 0 -%27 = OpExtInst %float %1 InverseSqrt %33 -%34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%36 = OpLoad %v4float %34 -%37 = OpCompositeExtract %float %36 0 -%38 = OpFOrdEqual %bool %27 %37 -OpSelectionMerge %40 None -OpBranchConditional %38 %39 %40 -%39 = OpLabel -%42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%43 = OpLoad %v4float %42 -%44 = OpVectorShuffle %v2float %43 %43 0 1 -%41 = OpExtInst %v2float %1 InverseSqrt %44 -%45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%46 = OpLoad %v4float %45 -%47 = OpVectorShuffle %v2float %46 %46 0 1 -%48 = OpFOrdEqual %v2bool %41 %47 -%50 = OpAll %bool %48 -OpBranch %40 -%40 = OpLabel -%51 = OpPhi %bool %false %25 %50 %39 -OpSelectionMerge %53 None -OpBranchConditional %51 %52 %53 -%52 = OpLabel -%55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%56 = OpLoad %v4float %55 -%57 = OpVectorShuffle %v3float %56 %56 0 1 2 -%54 = OpExtInst %v3float %1 InverseSqrt %57 -%59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%60 = OpLoad %v4float %59 -%61 = OpVectorShuffle %v3float %60 %60 0 1 2 -%62 = OpFOrdEqual %v3bool %54 %61 -%64 = OpAll %bool %62 -OpBranch %53 -%53 = OpLabel -%65 = OpPhi %bool %false %40 %64 %52 -OpSelectionMerge %67 None -OpBranchConditional %65 %66 %67 -%66 = OpLabel -%69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%70 = OpLoad %v4float %69 -%68 = OpExtInst %v4float %1 InverseSqrt %70 -%71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%72 = OpLoad %v4float %71 -%73 = OpFOrdEqual %v4bool %68 %72 -%75 = OpAll %bool %73 -OpBranch %67 -%67 = OpLabel -%76 = OpPhi %bool %false %53 %75 %66 -OpSelectionMerge %78 None -OpBranchConditional %76 %77 %78 -%77 = OpLabel -%80 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%81 = OpLoad %v4float %80 -%82 = OpCompositeExtract %float %81 0 -%83 = OpFOrdEqual %bool %float_1 %82 -OpBranch %78 -%78 = OpLabel -%84 = OpPhi %bool %false %67 %83 %77 -OpSelectionMerge %86 None -OpBranchConditional %84 %85 %86 -%85 = OpLabel -%89 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%90 = OpLoad %v4float %89 -%91 = OpVectorShuffle %v2float %90 %90 0 1 -%92 = OpFOrdEqual %v2bool %88 %91 -%93 = OpAll %bool %92 -OpBranch %86 -%86 = OpLabel -%94 = OpPhi %bool %false %78 %93 %85 -OpSelectionMerge %96 None -OpBranchConditional %94 %95 %96 -%95 = OpLabel -%99 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%100 = OpLoad %v4float %99 -%101 = OpVectorShuffle %v3float %100 %100 0 1 2 -%102 = OpFOrdEqual %v3bool %98 %101 -%103 = OpAll %bool %102 -OpBranch %96 -%96 = OpLabel -%104 = OpPhi %bool %false %86 %103 %95 -OpSelectionMerge %106 None -OpBranchConditional %104 %105 %106 -%105 = OpLabel -%109 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%110 = OpLoad %v4float %109 -%111 = OpFOrdEqual %v4bool %108 %110 -%112 = OpAll %bool %111 -OpBranch %106 -%106 = OpLabel -%113 = OpPhi %bool %false %96 %112 %105 -OpSelectionMerge %115 None -OpBranchConditional %113 %114 %115 -%114 = OpLabel -%116 = OpExtInst %float %1 InverseSqrt %float_n1 -%118 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%119 = OpLoad %v4float %118 -%120 = OpCompositeExtract %float %119 0 -%121 = OpFOrdEqual %bool %116 %120 -OpBranch %115 -%115 = OpLabel -%122 = OpPhi %bool %false %106 %121 %114 -OpSelectionMerge %124 None -OpBranchConditional %122 %123 %124 -%123 = OpLabel -%125 = OpExtInst %v2float %1 InverseSqrt %127 -%128 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%129 = OpLoad %v4float %128 -%130 = OpVectorShuffle %v2float %129 %129 0 1 -%131 = OpFOrdEqual %v2bool %125 %130 -%132 = OpAll %bool %131 -OpBranch %124 -%124 = OpLabel -%133 = OpPhi %bool %false %115 %132 %123 -OpSelectionMerge %135 None -OpBranchConditional %133 %134 %135 -%134 = OpLabel -%136 = OpExtInst %v3float %1 InverseSqrt %138 -%139 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%140 = OpLoad %v4float %139 -%141 = OpVectorShuffle %v3float %140 %140 0 1 2 -%142 = OpFOrdEqual %v3bool %136 %141 -%143 = OpAll %bool %142 -OpBranch %135 -%135 = OpLabel -%144 = OpPhi %bool %false %124 %143 %134 -OpSelectionMerge %146 None -OpBranchConditional %144 %145 %146 -%145 = OpLabel -%147 = OpExtInst %v4float %1 InverseSqrt %149 -%150 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%151 = OpLoad %v4float %150 -%152 = OpFOrdEqual %v4bool %147 %151 -%153 = OpAll %bool %152 -OpBranch %146 -%146 = OpLabel -%154 = OpPhi %bool %false %135 %153 %145 -OpSelectionMerge %159 None -OpBranchConditional %154 %157 %158 -%157 = OpLabel -%160 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%162 = OpLoad %v4float %160 -OpStore %155 %162 -OpBranch %159 -%158 = OpLabel -%163 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%165 = OpLoad %v4float %163 -OpStore %155 %165 -OpBranch %159 -%159 = OpLabel -%166 = OpLoad %v4float %155 -OpReturnValue %166 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %155 = OpVariable %_ptr_Function_v4float Function + %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %28 + %33 = OpCompositeExtract %float %32 0 + %27 = OpExtInst %float %1 InverseSqrt %33 + %34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %36 = OpLoad %v4float %34 + %37 = OpCompositeExtract %float %36 0 + %38 = OpFOrdEqual %bool %27 %37 + OpSelectionMerge %40 None + OpBranchConditional %38 %39 %40 + %39 = OpLabel + %42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %43 = OpLoad %v4float %42 + %44 = OpVectorShuffle %v2float %43 %43 0 1 + %41 = OpExtInst %v2float %1 InverseSqrt %44 + %45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %46 = OpLoad %v4float %45 + %47 = OpVectorShuffle %v2float %46 %46 0 1 + %48 = OpFOrdEqual %v2bool %41 %47 + %50 = OpAll %bool %48 + OpBranch %40 + %40 = OpLabel + %51 = OpPhi %bool %false %25 %50 %39 + OpSelectionMerge %53 None + OpBranchConditional %51 %52 %53 + %52 = OpLabel + %55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %56 = OpLoad %v4float %55 + %57 = OpVectorShuffle %v3float %56 %56 0 1 2 + %54 = OpExtInst %v3float %1 InverseSqrt %57 + %59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %60 = OpLoad %v4float %59 + %61 = OpVectorShuffle %v3float %60 %60 0 1 2 + %62 = OpFOrdEqual %v3bool %54 %61 + %64 = OpAll %bool %62 + OpBranch %53 + %53 = OpLabel + %65 = OpPhi %bool %false %40 %64 %52 + OpSelectionMerge %67 None + OpBranchConditional %65 %66 %67 + %66 = OpLabel + %69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %70 = OpLoad %v4float %69 + %68 = OpExtInst %v4float %1 InverseSqrt %70 + %71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %72 = OpLoad %v4float %71 + %73 = OpFOrdEqual %v4bool %68 %72 + %75 = OpAll %bool %73 + OpBranch %67 + %67 = OpLabel + %76 = OpPhi %bool %false %53 %75 %66 + OpSelectionMerge %78 None + OpBranchConditional %76 %77 %78 + %77 = OpLabel + %80 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %81 = OpLoad %v4float %80 + %82 = OpCompositeExtract %float %81 0 + %83 = OpFOrdEqual %bool %float_1 %82 + OpBranch %78 + %78 = OpLabel + %84 = OpPhi %bool %false %67 %83 %77 + OpSelectionMerge %86 None + OpBranchConditional %84 %85 %86 + %85 = OpLabel + %89 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %90 = OpLoad %v4float %89 + %91 = OpVectorShuffle %v2float %90 %90 0 1 + %92 = OpFOrdEqual %v2bool %88 %91 + %93 = OpAll %bool %92 + OpBranch %86 + %86 = OpLabel + %94 = OpPhi %bool %false %78 %93 %85 + OpSelectionMerge %96 None + OpBranchConditional %94 %95 %96 + %95 = OpLabel + %99 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %100 = OpLoad %v4float %99 + %101 = OpVectorShuffle %v3float %100 %100 0 1 2 + %102 = OpFOrdEqual %v3bool %98 %101 + %103 = OpAll %bool %102 + OpBranch %96 + %96 = OpLabel + %104 = OpPhi %bool %false %86 %103 %95 + OpSelectionMerge %106 None + OpBranchConditional %104 %105 %106 + %105 = OpLabel + %109 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %110 = OpLoad %v4float %109 + %111 = OpFOrdEqual %v4bool %108 %110 + %112 = OpAll %bool %111 + OpBranch %106 + %106 = OpLabel + %113 = OpPhi %bool %false %96 %112 %105 + OpSelectionMerge %115 None + OpBranchConditional %113 %114 %115 + %114 = OpLabel + %116 = OpExtInst %float %1 InverseSqrt %float_n1 + %118 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %119 = OpLoad %v4float %118 + %120 = OpCompositeExtract %float %119 0 + %121 = OpFOrdEqual %bool %116 %120 + OpBranch %115 + %115 = OpLabel + %122 = OpPhi %bool %false %106 %121 %114 + OpSelectionMerge %124 None + OpBranchConditional %122 %123 %124 + %123 = OpLabel + %125 = OpExtInst %v2float %1 InverseSqrt %127 + %128 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %129 = OpLoad %v4float %128 + %130 = OpVectorShuffle %v2float %129 %129 0 1 + %131 = OpFOrdEqual %v2bool %125 %130 + %132 = OpAll %bool %131 + OpBranch %124 + %124 = OpLabel + %133 = OpPhi %bool %false %115 %132 %123 + OpSelectionMerge %135 None + OpBranchConditional %133 %134 %135 + %134 = OpLabel + %136 = OpExtInst %v3float %1 InverseSqrt %138 + %139 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %140 = OpLoad %v4float %139 + %141 = OpVectorShuffle %v3float %140 %140 0 1 2 + %142 = OpFOrdEqual %v3bool %136 %141 + %143 = OpAll %bool %142 + OpBranch %135 + %135 = OpLabel + %144 = OpPhi %bool %false %124 %143 %134 + OpSelectionMerge %146 None + OpBranchConditional %144 %145 %146 + %145 = OpLabel + %147 = OpExtInst %v4float %1 InverseSqrt %149 + %150 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %151 = OpLoad %v4float %150 + %152 = OpFOrdEqual %v4bool %147 %151 + %153 = OpAll %bool %152 + OpBranch %146 + %146 = OpLabel + %154 = OpPhi %bool %false %135 %153 %145 + OpSelectionMerge %159 None + OpBranchConditional %154 %157 %158 + %157 = OpLabel + %160 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %162 = OpLoad %v4float %160 + OpStore %155 %162 + OpBranch %159 + %158 = OpLabel + %163 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %165 = OpLoad %v4float %163 + OpStore %155 %165 + OpBranch %159 + %159 = OpLabel + %166 = OpLoad %v4float %155 + OpReturnValue %166 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Inversesqrt.skrp b/tests/sksl/intrinsics/Inversesqrt.skrp index fb9d9882f332..4716cba46f71 100644 --- a/tests/sksl/intrinsics/Inversesqrt.skrp +++ b/tests/sksl/intrinsics/Inversesqrt.skrp @@ -1,8 +1,19 @@ +76 instructions + [immutable slots] -negativeVal(0) = 0xBF800000 (-1.0) -negativeVal(1) = 0xC0800000 (-4.0) -negativeVal(2) = 0xC1800000 (-16.0) -negativeVal(3) = 0xC2800000 (-64.0) +i0 = 0xBF800000 (-1.0) +i1 = 0xC0800000 (-4.0) +i2 = 0xC1800000 (-16.0) +i3 = 0xC2800000 (-64.0) +i4 = 0x3F800000 (1.0) +i5 = 0x3F000000 (0.5) +i6 = 0x3F800000 (1.0) +i7 = 0x3F000000 (0.5) +i8 = 0x3E800000 (0.25) +i9 = 0x3F800000 (1.0) +i10 = 0x3F000000 (0.5) +i11 = 0x3E800000 (0.25) +i12 = 0x3E000000 (0.125) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -33,24 +44,18 @@ bitwise_and_int $4 &= $5 copy_uniform $5 = expected(0) cmpeq_imm_float $5 = equal($5, 0x3F800000 (1.0)) bitwise_and_int $4 &= $5 -copy_constant $5 = 0x3F800000 (1.0) -copy_constant $6 = 0x3F000000 (0.5) +copy_2_immutables_unmasked $5..6 = i4..5 [0x3F800000 (1.0), 0x3F000000 (0.5)] copy_2_uniforms $7..8 = expected(0..1) cmpeq_2_floats $5..6 = equal($5..6, $7..8) bitwise_and_int $5 &= $6 bitwise_and_int $4 &= $5 -copy_constant $5 = 0x3F800000 (1.0) -copy_constant $6 = 0x3F000000 (0.5) -copy_constant $7 = 0x3E800000 (0.25) +copy_3_immutables_unmasked $5..7 = i6..8 [0x3F800000 (1.0), 0x3F000000 (0.5), 0x3E800000 (0.25)] copy_3_uniforms $8..10 = expected(0..2) cmpeq_3_floats $5..7 = equal($5..7, $8..10) bitwise_and_int $6 &= $7 bitwise_and_int $5 &= $6 bitwise_and_int $4 &= $5 -copy_constant $5 = 0x3F800000 (1.0) -copy_constant $6 = 0x3F000000 (0.5) -copy_constant $7 = 0x3E800000 (0.25) -copy_constant $8 = 0x3E000000 (0.125) +copy_4_immutables_unmasked $5..8 = i9..12 [0x3F800000 (1.0), 0x3F000000 (0.5), 0x3E800000 (0.25), 0x3E000000 (0.125)] copy_4_uniforms $9..12 = expected cmpeq_4_floats $5..8 = equal($5..8, $9..12) bitwise_and_2_ints $5..6 &= $7..8 @@ -61,32 +66,29 @@ invsqrt_float $5 = inversesqrt($5) copy_uniform $6 = expected(0) cmpeq_float $5 = equal($5, $6) bitwise_and_int $4 &= $5 -copy_constant $5 = 0xBF800000 (-1.0) -copy_constant $6 = 0xC0800000 (-4.0) +copy_2_immutables_unmasked $5..6 = i0..1 [0xBF800000 (-1.0), 0xC0800000 (-4.0)] invsqrt_2_floats $5..6 = inversesqrt($5..6) copy_2_uniforms $7..8 = expected(0..1) cmpeq_2_floats $5..6 = equal($5..6, $7..8) bitwise_and_int $5 &= $6 bitwise_and_int $4 &= $5 -copy_constant $5 = 0xBF800000 (-1.0) -copy_constant $6 = 0xC0800000 (-4.0) -copy_constant $7 = 0xC1800000 (-16.0) +copy_3_immutables_unmasked $5..7 = i0..2 [0xBF800000 (-1.0), 0xC0800000 (-4.0), 0xC1800000 (-16.0)] invsqrt_3_floats $5..7 = inversesqrt($5..7) copy_3_uniforms $8..10 = expected(0..2) cmpeq_3_floats $5..7 = equal($5..7, $8..10) bitwise_and_int $6 &= $7 bitwise_and_int $5 &= $6 bitwise_and_int $4 &= $5 -copy_4_slots_unmasked $5..8 = negativeVal +copy_4_immutables_unmasked $5..8 = i0..3 [0xBF800000 (-1.0), 0xC0800000 (-4.0), 0xC1800000 (-16.0), 0xC2800000 (-64.0)] invsqrt_4_floats $5..8 = inversesqrt($5..8) copy_4_uniforms $9..12 = expected cmpeq_4_floats $5..8 = equal($5..8, $9..12) bitwise_and_2_ints $5..6 &= $7..8 bitwise_and_int $5 &= $6 bitwise_and_int $4 &= $5 -branch_if_no_active_lanes_eq branch +3 (label 0 at #84) if no lanes of $4 == 0xFFFFFFFF +branch_if_no_active_lanes_eq branch +3 (label 0 at #75) if no lanes of $4 == 0xFFFFFFFF copy_4_uniforms $0..3 = colorGreen -jump jump +3 (label 1 at #86) +jump jump +3 (label 1 at #77) label label 0 copy_4_uniforms $0..3 = colorRed label label 0x00000001 diff --git a/tests/sksl/intrinsics/Inversesqrt.wgsl b/tests/sksl/intrinsics/Inversesqrt.wgsl index 530947fd438e..e01d3d1d66f7 100644 --- a/tests/sksl/intrinsics/Inversesqrt.wgsl +++ b/tests/sksl/intrinsics/Inversesqrt.wgsl @@ -1,10 +1,4 @@ -### Compilation failed: - -error: :23:20 error: inverseSqrt must be called with a value > 0 - let _skTemp4 = inverseSqrt(-1.0); - ^^^^^^^^^^^^^^^^^ - - +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -27,11 +21,15 @@ fn main(_skParam0: vec2) -> vec4 { let _skTemp1 = inverseSqrt(_globalUniforms.inputVal.xy); let _skTemp2 = inverseSqrt(_globalUniforms.inputVal.xyz); let _skTemp3 = inverseSqrt(_globalUniforms.inputVal); - let _skTemp4 = inverseSqrt(-1.0); - let _skTemp5 = inverseSqrt(vec2(-1.0, -4.0)); - let _skTemp6 = inverseSqrt(vec3(-1.0, -4.0, -16.0)); - let _skTemp7 = inverseSqrt(negativeVal); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((((((_skTemp0 == _globalUniforms.expected.x && all(_skTemp1 == _globalUniforms.expected.xy)) && all(_skTemp2 == _globalUniforms.expected.xyz)) && all(_skTemp3 == _globalUniforms.expected)) && 1.0 == _globalUniforms.expected.x) && all(vec2(1.0, 0.5) == _globalUniforms.expected.xy)) && all(vec3(1.0, 0.5, 0.25) == _globalUniforms.expected.xyz)) && all(vec4(1.0, 0.5, 0.25, 0.125) == _globalUniforms.expected)) && _skTemp4 == _globalUniforms.expected.x) && all(_skTemp5 == _globalUniforms.expected.xy)) && all(_skTemp6 == _globalUniforms.expected.xyz)) && all(_skTemp7 == _globalUniforms.expected))); + let _skTemp4 = -1.0; + let _skTemp5 = inverseSqrt(_skTemp4); + let _skTemp6 = vec2(-1.0, -4.0); + let _skTemp7 = inverseSqrt(_skTemp6); + let _skTemp8 = vec3(-1.0, -4.0, -16.0); + let _skTemp9 = inverseSqrt(_skTemp8); + let _skTemp10 = negativeVal; + let _skTemp11 = inverseSqrt(_skTemp10); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((((((_skTemp0 == _globalUniforms.expected.x) && all(_skTemp1 == _globalUniforms.expected.xy)) && all(_skTemp2 == _globalUniforms.expected.xyz)) && all(_skTemp3 == _globalUniforms.expected)) && (1.0 == _globalUniforms.expected.x)) && all(vec2(1.0, 0.5) == _globalUniforms.expected.xy)) && all(vec3(1.0, 0.5, 0.25) == _globalUniforms.expected.xyz)) && all(vec4(1.0, 0.5, 0.25, 0.125) == _globalUniforms.expected)) && (_skTemp5 == _globalUniforms.expected.x)) && all(_skTemp7 == _globalUniforms.expected.xy)) && all(_skTemp9 == _globalUniforms.expected.xyz)) && all(_skTemp11 == _globalUniforms.expected))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { @@ -39,5 +37,3 @@ fn main(_skParam0: vec2) -> vec4 { _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); return _stageOut; } - -1 error diff --git a/tests/sksl/intrinsics/IsInf.asm.frag b/tests/sksl/intrinsics/IsInf.asm.frag index 7f57f8a0b291..9655cd95435c 100644 --- a/tests/sksl/intrinsics/IsInf.asm.frag +++ b/tests/sksl/intrinsics/IsInf.asm.frag @@ -1,214 +1,214 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testMatrix2x2" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %infiniteValue "infiniteValue" -OpName %finiteValue "finiteValue" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 ColMajor -OpMemberDecorate %_UniformBuffer 0 MatrixStride 16 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 32 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 48 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %infiniteValue RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %34 RelaxedPrecision -OpDecorate %35 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %45 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %finiteValue RelaxedPrecision -OpDecorate %49 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %51 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %53 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %58 RelaxedPrecision -OpDecorate %59 RelaxedPrecision -OpDecorate %62 RelaxedPrecision -OpDecorate %67 RelaxedPrecision -OpDecorate %74 RelaxedPrecision -OpDecorate %88 RelaxedPrecision -OpDecorate %95 RelaxedPrecision -OpDecorate %102 RelaxedPrecision -OpDecorate %115 RelaxedPrecision -OpDecorate %118 RelaxedPrecision -OpDecorate %119 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testMatrix2x2" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %infiniteValue "infiniteValue" + OpName %finiteValue "finiteValue" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 ColMajor + OpMemberDecorate %_UniformBuffer 0 MatrixStride 16 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 32 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 48 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %infiniteValue RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %34 RelaxedPrecision + OpDecorate %35 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %45 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %finiteValue RelaxedPrecision + OpDecorate %49 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %53 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %58 RelaxedPrecision + OpDecorate %59 RelaxedPrecision + OpDecorate %62 RelaxedPrecision + OpDecorate %67 RelaxedPrecision + OpDecorate %74 RelaxedPrecision + OpDecorate %88 RelaxedPrecision + OpDecorate %95 RelaxedPrecision + OpDecorate %102 RelaxedPrecision + OpDecorate %115 RelaxedPrecision + OpDecorate %118 RelaxedPrecision + OpDecorate %119 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%v2float = OpTypeVector %float 2 + %v2float = OpTypeVector %float 2 %mat2v2float = OpTypeMatrix %v2float 2 %_UniformBuffer = OpTypeStruct %mat2v2float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%17 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%20 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %17 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %20 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%24 = OpTypeFunction %v4float %_ptr_Function_v2float + %24 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_mat2v2float = OpTypePointer Uniform %mat2v2float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_1 = OpConstant %int 1 -%float_1 = OpConstant %float 1 -%false = OpConstantFalse %bool -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%v3bool = OpTypeVector %bool 3 -%v4bool = OpTypeVector %bool 4 -%int_2 = OpConstant %int 2 + %int_1 = OpConstant %int 1 + %float_1 = OpConstant %float 1 + %false = OpConstantFalse %bool + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %v3bool = OpTypeVector %bool 3 + %v4bool = OpTypeVector %bool 4 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %17 -%18 = OpLabel -%21 = OpVariable %_ptr_Function_v2float Function -OpStore %21 %20 -%23 = OpFunctionCall %v4float %main %21 -OpStore %sk_FragColor %23 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %24 -%25 = OpFunctionParameter %_ptr_Function_v2float -%26 = OpLabel + %18 = OpLabel + %21 = OpVariable %_ptr_Function_v2float Function + OpStore %21 %20 + %23 = OpFunctionCall %v4float %main %21 + OpStore %sk_FragColor %23 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %24 + %25 = OpFunctionParameter %_ptr_Function_v2float + %26 = OpLabel %infiniteValue = OpVariable %_ptr_Function_v4float Function %finiteValue = OpVariable %_ptr_Function_v4float Function -%110 = OpVariable %_ptr_Function_v4float Function -%29 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_0 -%33 = OpLoad %mat2v2float %29 -%34 = OpCompositeExtract %float %33 0 0 -%35 = OpCompositeExtract %float %33 0 1 -%36 = OpCompositeExtract %float %33 1 0 -%37 = OpCompositeExtract %float %33 1 1 -%38 = OpCompositeConstruct %v4float %34 %35 %36 %37 -%39 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%42 = OpLoad %v4float %39 -%43 = OpCompositeExtract %float %42 0 -%45 = OpFDiv %float %float_1 %43 -%46 = OpVectorTimesScalar %v4float %38 %45 -OpStore %infiniteValue %46 -%48 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_0 -%49 = OpLoad %mat2v2float %48 -%50 = OpCompositeExtract %float %49 0 0 -%51 = OpCompositeExtract %float %49 0 1 -%52 = OpCompositeExtract %float %49 1 0 -%53 = OpCompositeExtract %float %49 1 1 -%54 = OpCompositeConstruct %v4float %50 %51 %52 %53 -%55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%56 = OpLoad %v4float %55 -%57 = OpCompositeExtract %float %56 1 -%58 = OpFDiv %float %float_1 %57 -%59 = OpVectorTimesScalar %v4float %54 %58 -OpStore %finiteValue %59 -%62 = OpCompositeExtract %float %46 0 -%61 = OpIsInf %bool %62 -OpSelectionMerge %64 None -OpBranchConditional %61 %63 %64 -%63 = OpLabel -%67 = OpVectorShuffle %v2float %46 %46 0 1 -%66 = OpIsInf %v2bool %67 -%65 = OpAll %bool %66 -OpBranch %64 -%64 = OpLabel -%69 = OpPhi %bool %false %26 %65 %63 -OpSelectionMerge %71 None -OpBranchConditional %69 %70 %71 -%70 = OpLabel -%74 = OpVectorShuffle %v3float %46 %46 0 1 2 -%73 = OpIsInf %v3bool %74 -%72 = OpAll %bool %73 -OpBranch %71 -%71 = OpLabel -%77 = OpPhi %bool %false %64 %72 %70 -OpSelectionMerge %79 None -OpBranchConditional %77 %78 %79 -%78 = OpLabel -%81 = OpIsInf %v4bool %46 -%80 = OpAll %bool %81 -OpBranch %79 -%79 = OpLabel -%83 = OpPhi %bool %false %71 %80 %78 -OpSelectionMerge %85 None -OpBranchConditional %83 %84 %85 -%84 = OpLabel -%88 = OpCompositeExtract %float %59 0 -%87 = OpIsInf %bool %88 -%86 = OpLogicalNot %bool %87 -OpBranch %85 -%85 = OpLabel -%89 = OpPhi %bool %false %79 %86 %84 -OpSelectionMerge %91 None -OpBranchConditional %89 %90 %91 -%90 = OpLabel -%95 = OpVectorShuffle %v2float %59 %59 0 1 -%94 = OpIsInf %v2bool %95 -%93 = OpAny %bool %94 -%92 = OpLogicalNot %bool %93 -OpBranch %91 -%91 = OpLabel -%96 = OpPhi %bool %false %85 %92 %90 -OpSelectionMerge %98 None -OpBranchConditional %96 %97 %98 -%97 = OpLabel -%102 = OpVectorShuffle %v3float %59 %59 0 1 2 -%101 = OpIsInf %v3bool %102 -%100 = OpAny %bool %101 -%99 = OpLogicalNot %bool %100 -OpBranch %98 -%98 = OpLabel -%103 = OpPhi %bool %false %91 %99 %97 -OpSelectionMerge %105 None -OpBranchConditional %103 %104 %105 -%104 = OpLabel -%108 = OpIsInf %v4bool %59 -%107 = OpAny %bool %108 -%106 = OpLogicalNot %bool %107 -OpBranch %105 -%105 = OpLabel -%109 = OpPhi %bool %false %98 %106 %104 -OpSelectionMerge %113 None -OpBranchConditional %109 %111 %112 -%111 = OpLabel -%114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%115 = OpLoad %v4float %114 -OpStore %110 %115 -OpBranch %113 -%112 = OpLabel -%116 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%118 = OpLoad %v4float %116 -OpStore %110 %118 -OpBranch %113 -%113 = OpLabel -%119 = OpLoad %v4float %110 -OpReturnValue %119 -OpFunctionEnd + %110 = OpVariable %_ptr_Function_v4float Function + %29 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_0 + %33 = OpLoad %mat2v2float %29 + %34 = OpCompositeExtract %float %33 0 0 + %35 = OpCompositeExtract %float %33 0 1 + %36 = OpCompositeExtract %float %33 1 0 + %37 = OpCompositeExtract %float %33 1 1 + %38 = OpCompositeConstruct %v4float %34 %35 %36 %37 + %39 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %42 = OpLoad %v4float %39 + %43 = OpCompositeExtract %float %42 0 + %45 = OpFDiv %float %float_1 %43 + %46 = OpVectorTimesScalar %v4float %38 %45 + OpStore %infiniteValue %46 + %48 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_0 + %49 = OpLoad %mat2v2float %48 + %50 = OpCompositeExtract %float %49 0 0 + %51 = OpCompositeExtract %float %49 0 1 + %52 = OpCompositeExtract %float %49 1 0 + %53 = OpCompositeExtract %float %49 1 1 + %54 = OpCompositeConstruct %v4float %50 %51 %52 %53 + %55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %56 = OpLoad %v4float %55 + %57 = OpCompositeExtract %float %56 1 + %58 = OpFDiv %float %float_1 %57 + %59 = OpVectorTimesScalar %v4float %54 %58 + OpStore %finiteValue %59 + %62 = OpCompositeExtract %float %46 0 + %61 = OpIsInf %bool %62 + OpSelectionMerge %64 None + OpBranchConditional %61 %63 %64 + %63 = OpLabel + %67 = OpVectorShuffle %v2float %46 %46 0 1 + %66 = OpIsInf %v2bool %67 + %65 = OpAll %bool %66 + OpBranch %64 + %64 = OpLabel + %69 = OpPhi %bool %false %26 %65 %63 + OpSelectionMerge %71 None + OpBranchConditional %69 %70 %71 + %70 = OpLabel + %74 = OpVectorShuffle %v3float %46 %46 0 1 2 + %73 = OpIsInf %v3bool %74 + %72 = OpAll %bool %73 + OpBranch %71 + %71 = OpLabel + %77 = OpPhi %bool %false %64 %72 %70 + OpSelectionMerge %79 None + OpBranchConditional %77 %78 %79 + %78 = OpLabel + %81 = OpIsInf %v4bool %46 + %80 = OpAll %bool %81 + OpBranch %79 + %79 = OpLabel + %83 = OpPhi %bool %false %71 %80 %78 + OpSelectionMerge %85 None + OpBranchConditional %83 %84 %85 + %84 = OpLabel + %88 = OpCompositeExtract %float %59 0 + %87 = OpIsInf %bool %88 + %86 = OpLogicalNot %bool %87 + OpBranch %85 + %85 = OpLabel + %89 = OpPhi %bool %false %79 %86 %84 + OpSelectionMerge %91 None + OpBranchConditional %89 %90 %91 + %90 = OpLabel + %95 = OpVectorShuffle %v2float %59 %59 0 1 + %94 = OpIsInf %v2bool %95 + %93 = OpAny %bool %94 + %92 = OpLogicalNot %bool %93 + OpBranch %91 + %91 = OpLabel + %96 = OpPhi %bool %false %85 %92 %90 + OpSelectionMerge %98 None + OpBranchConditional %96 %97 %98 + %97 = OpLabel + %102 = OpVectorShuffle %v3float %59 %59 0 1 2 + %101 = OpIsInf %v3bool %102 + %100 = OpAny %bool %101 + %99 = OpLogicalNot %bool %100 + OpBranch %98 + %98 = OpLabel + %103 = OpPhi %bool %false %91 %99 %97 + OpSelectionMerge %105 None + OpBranchConditional %103 %104 %105 + %104 = OpLabel + %108 = OpIsInf %v4bool %59 + %107 = OpAny %bool %108 + %106 = OpLogicalNot %bool %107 + OpBranch %105 + %105 = OpLabel + %109 = OpPhi %bool %false %98 %106 %104 + OpSelectionMerge %113 None + OpBranchConditional %109 %111 %112 + %111 = OpLabel + %114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %115 = OpLoad %v4float %114 + OpStore %110 %115 + OpBranch %113 + %112 = OpLabel + %116 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %118 = OpLoad %v4float %116 + OpStore %110 %118 + OpBranch %113 + %113 = OpLabel + %119 = OpLoad %v4float %110 + OpReturnValue %119 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/IsInf.wgsl b/tests/sksl/intrinsics/IsInf.wgsl new file mode 100644 index 000000000000..62d48a809ae5 --- /dev/null +++ b/tests/sksl/intrinsics/IsInf.wgsl @@ -0,0 +1,50 @@ +### Compilation failed: + +error: :20:20 error: unresolved call target 'isinf' + let _skTemp0 = isinf(infiniteValue.x); + ^^^^^^^^^^^^^^^^^^^^^^ + + +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + testMatrix2x2: mat2x2, + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var infiniteValue: vec4 = vec4(_globalUniforms.testMatrix2x2[0], _globalUniforms.testMatrix2x2[1]) / _globalUniforms.colorGreen.x; + var finiteValue: vec4 = vec4(_globalUniforms.testMatrix2x2[0], _globalUniforms.testMatrix2x2[1]) / _globalUniforms.colorGreen.y; + let _skTemp0 = isinf(infiniteValue.x); + let _skTemp1 = isinf(infiniteValue.xy); + let _skTemp2 = all(_skTemp1); + let _skTemp3 = isinf(infiniteValue.xyz); + let _skTemp4 = all(_skTemp3); + let _skTemp5 = isinf(infiniteValue); + let _skTemp6 = all(_skTemp5); + let _skTemp7 = isinf(finiteValue.x); + let _skTemp8 = isinf(finiteValue.xy); + let _skTemp9 = any(_skTemp8); + let _skTemp10 = isinf(finiteValue.xyz); + let _skTemp11 = any(_skTemp10); + let _skTemp12 = isinf(finiteValue); + let _skTemp13 = any(_skTemp12); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((_skTemp0 && _skTemp2) && _skTemp4) && _skTemp6) && (!_skTemp7)) && (!_skTemp9)) && (!_skTemp11)) && (!_skTemp13))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} + +1 error diff --git a/tests/sksl/intrinsics/IsNan.asm.frag b/tests/sksl/intrinsics/IsNan.asm.frag index 4fb5f6eb4606..8e0ac95e8f26 100644 --- a/tests/sksl/intrinsics/IsNan.asm.frag +++ b/tests/sksl/intrinsics/IsNan.asm.frag @@ -1,180 +1,180 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testInputs" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %valueIsNaN "valueIsNaN" -OpName %valueIsNumber "valueIsNumber" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %valueIsNaN RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %35 RelaxedPrecision -OpDecorate %valueIsNumber RelaxedPrecision -OpDecorate %39 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %49 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -OpDecorate %77 RelaxedPrecision -OpDecorate %84 RelaxedPrecision -OpDecorate %98 RelaxedPrecision -OpDecorate %101 RelaxedPrecision -OpDecorate %102 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testInputs" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %valueIsNaN "valueIsNaN" + OpName %valueIsNumber "valueIsNumber" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %valueIsNaN RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %35 RelaxedPrecision + OpDecorate %valueIsNumber RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %49 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %77 RelaxedPrecision + OpDecorate %84 RelaxedPrecision + OpDecorate %98 RelaxedPrecision + OpDecorate %101 RelaxedPrecision + OpDecorate %102 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%34 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 -%float_1 = OpConstant %float 1 -%40 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 -%false = OpConstantFalse %bool -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%v3bool = OpTypeVector %bool 3 -%v4bool = OpTypeVector %bool 4 -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %34 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %float_1 = OpConstant %float 1 + %40 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %false = OpConstantFalse %bool + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %v3bool = OpTypeVector %bool 3 + %v4bool = OpTypeVector %bool 4 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%valueIsNaN = OpVariable %_ptr_Function_v4float Function + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %valueIsNaN = OpVariable %_ptr_Function_v4float Function %valueIsNumber = OpVariable %_ptr_Function_v4float Function -%92 = OpVariable %_ptr_Function_v4float Function -%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %28 -%33 = OpVectorShuffle %v4float %32 %32 1 1 1 1 -%35 = OpFDiv %v4float %34 %33 -OpStore %valueIsNaN %35 -%38 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%39 = OpLoad %v4float %38 -%41 = OpFDiv %v4float %40 %39 -OpStore %valueIsNumber %41 -%44 = OpCompositeExtract %float %35 0 -%43 = OpIsNan %bool %44 -OpSelectionMerge %46 None -OpBranchConditional %43 %45 %46 -%45 = OpLabel -%49 = OpVectorShuffle %v2float %35 %35 0 1 -%48 = OpIsNan %v2bool %49 -%47 = OpAll %bool %48 -OpBranch %46 -%46 = OpLabel -%51 = OpPhi %bool %false %25 %47 %45 -OpSelectionMerge %53 None -OpBranchConditional %51 %52 %53 -%52 = OpLabel -%56 = OpVectorShuffle %v3float %35 %35 0 1 2 -%55 = OpIsNan %v3bool %56 -%54 = OpAll %bool %55 -OpBranch %53 -%53 = OpLabel -%59 = OpPhi %bool %false %46 %54 %52 -OpSelectionMerge %61 None -OpBranchConditional %59 %60 %61 -%60 = OpLabel -%63 = OpIsNan %v4bool %35 -%62 = OpAll %bool %63 -OpBranch %61 -%61 = OpLabel -%65 = OpPhi %bool %false %53 %62 %60 -OpSelectionMerge %67 None -OpBranchConditional %65 %66 %67 -%66 = OpLabel -%70 = OpCompositeExtract %float %41 0 -%69 = OpIsNan %bool %70 -%68 = OpLogicalNot %bool %69 -OpBranch %67 -%67 = OpLabel -%71 = OpPhi %bool %false %61 %68 %66 -OpSelectionMerge %73 None -OpBranchConditional %71 %72 %73 -%72 = OpLabel -%77 = OpVectorShuffle %v2float %41 %41 0 1 -%76 = OpIsNan %v2bool %77 -%75 = OpAny %bool %76 -%74 = OpLogicalNot %bool %75 -OpBranch %73 -%73 = OpLabel -%78 = OpPhi %bool %false %67 %74 %72 -OpSelectionMerge %80 None -OpBranchConditional %78 %79 %80 -%79 = OpLabel -%84 = OpVectorShuffle %v3float %41 %41 0 1 2 -%83 = OpIsNan %v3bool %84 -%82 = OpAny %bool %83 -%81 = OpLogicalNot %bool %82 -OpBranch %80 -%80 = OpLabel -%85 = OpPhi %bool %false %73 %81 %79 -OpSelectionMerge %87 None -OpBranchConditional %85 %86 %87 -%86 = OpLabel -%90 = OpIsNan %v4bool %41 -%89 = OpAny %bool %90 -%88 = OpLogicalNot %bool %89 -OpBranch %87 -%87 = OpLabel -%91 = OpPhi %bool %false %80 %88 %86 -OpSelectionMerge %95 None -OpBranchConditional %91 %93 %94 -%93 = OpLabel -%96 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%98 = OpLoad %v4float %96 -OpStore %92 %98 -OpBranch %95 -%94 = OpLabel -%99 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%101 = OpLoad %v4float %99 -OpStore %92 %101 -OpBranch %95 -%95 = OpLabel -%102 = OpLoad %v4float %92 -OpReturnValue %102 -OpFunctionEnd + %92 = OpVariable %_ptr_Function_v4float Function + %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %28 + %33 = OpVectorShuffle %v4float %32 %32 1 1 1 1 + %35 = OpFDiv %v4float %34 %33 + OpStore %valueIsNaN %35 + %38 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %39 = OpLoad %v4float %38 + %41 = OpFDiv %v4float %40 %39 + OpStore %valueIsNumber %41 + %44 = OpCompositeExtract %float %35 0 + %43 = OpIsNan %bool %44 + OpSelectionMerge %46 None + OpBranchConditional %43 %45 %46 + %45 = OpLabel + %49 = OpVectorShuffle %v2float %35 %35 0 1 + %48 = OpIsNan %v2bool %49 + %47 = OpAll %bool %48 + OpBranch %46 + %46 = OpLabel + %51 = OpPhi %bool %false %25 %47 %45 + OpSelectionMerge %53 None + OpBranchConditional %51 %52 %53 + %52 = OpLabel + %56 = OpVectorShuffle %v3float %35 %35 0 1 2 + %55 = OpIsNan %v3bool %56 + %54 = OpAll %bool %55 + OpBranch %53 + %53 = OpLabel + %59 = OpPhi %bool %false %46 %54 %52 + OpSelectionMerge %61 None + OpBranchConditional %59 %60 %61 + %60 = OpLabel + %63 = OpIsNan %v4bool %35 + %62 = OpAll %bool %63 + OpBranch %61 + %61 = OpLabel + %65 = OpPhi %bool %false %53 %62 %60 + OpSelectionMerge %67 None + OpBranchConditional %65 %66 %67 + %66 = OpLabel + %70 = OpCompositeExtract %float %41 0 + %69 = OpIsNan %bool %70 + %68 = OpLogicalNot %bool %69 + OpBranch %67 + %67 = OpLabel + %71 = OpPhi %bool %false %61 %68 %66 + OpSelectionMerge %73 None + OpBranchConditional %71 %72 %73 + %72 = OpLabel + %77 = OpVectorShuffle %v2float %41 %41 0 1 + %76 = OpIsNan %v2bool %77 + %75 = OpAny %bool %76 + %74 = OpLogicalNot %bool %75 + OpBranch %73 + %73 = OpLabel + %78 = OpPhi %bool %false %67 %74 %72 + OpSelectionMerge %80 None + OpBranchConditional %78 %79 %80 + %79 = OpLabel + %84 = OpVectorShuffle %v3float %41 %41 0 1 2 + %83 = OpIsNan %v3bool %84 + %82 = OpAny %bool %83 + %81 = OpLogicalNot %bool %82 + OpBranch %80 + %80 = OpLabel + %85 = OpPhi %bool %false %73 %81 %79 + OpSelectionMerge %87 None + OpBranchConditional %85 %86 %87 + %86 = OpLabel + %90 = OpIsNan %v4bool %41 + %89 = OpAny %bool %90 + %88 = OpLogicalNot %bool %89 + OpBranch %87 + %87 = OpLabel + %91 = OpPhi %bool %false %80 %88 %86 + OpSelectionMerge %95 None + OpBranchConditional %91 %93 %94 + %93 = OpLabel + %96 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %98 = OpLoad %v4float %96 + OpStore %92 %98 + OpBranch %95 + %94 = OpLabel + %99 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %101 = OpLoad %v4float %99 + OpStore %92 %101 + OpBranch %95 + %95 = OpLabel + %102 = OpLoad %v4float %92 + OpReturnValue %102 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/IsNan.wgsl b/tests/sksl/intrinsics/IsNan.wgsl new file mode 100644 index 000000000000..a43b6e3ea366 --- /dev/null +++ b/tests/sksl/intrinsics/IsNan.wgsl @@ -0,0 +1,50 @@ +### Compilation failed: + +error: :20:20 error: unresolved call target 'isnan' + let _skTemp0 = isnan(valueIsNaN.x); + ^^^^^^^^^^^^^^^^^^^ + + +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + testInputs: vec4, + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var valueIsNaN: vec4 = 0.0 / _globalUniforms.testInputs.yyyy; + var valueIsNumber: vec4 = 1.0 / _globalUniforms.testInputs; + let _skTemp0 = isnan(valueIsNaN.x); + let _skTemp1 = isnan(valueIsNaN.xy); + let _skTemp2 = all(_skTemp1); + let _skTemp3 = isnan(valueIsNaN.xyz); + let _skTemp4 = all(_skTemp3); + let _skTemp5 = isnan(valueIsNaN); + let _skTemp6 = all(_skTemp5); + let _skTemp7 = isnan(valueIsNumber.x); + let _skTemp8 = isnan(valueIsNumber.xy); + let _skTemp9 = any(_skTemp8); + let _skTemp10 = isnan(valueIsNumber.xyz); + let _skTemp11 = any(_skTemp10); + let _skTemp12 = isnan(valueIsNumber); + let _skTemp13 = any(_skTemp12); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((_skTemp0 && _skTemp2) && _skTemp4) && _skTemp6) && (!_skTemp7)) && (!_skTemp9)) && (!_skTemp11)) && (!_skTemp13))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} + +1 error diff --git a/tests/sksl/intrinsics/Ldexp.asm.frag b/tests/sksl/intrinsics/Ldexp.asm.frag index 41e73c71f39b..5a17174812c7 100644 --- a/tests/sksl/intrinsics/Ldexp.asm.frag +++ b/tests/sksl/intrinsics/Ldexp.asm.frag @@ -1,47 +1,47 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %b "b" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "a" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpDecorate %_UniformBuffer Block -OpDecorate %13 Binding 0 -OpDecorate %13 DescriptorSet 0 -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %b "b" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "a" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpDecorate %_UniformBuffer Block + OpDecorate %13 Binding 0 + OpDecorate %13 DescriptorSet 0 + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%int = OpTypeInt 32 1 + %int = OpTypeInt 32 1 %_ptr_Private_int = OpTypePointer Private %int -%b = OpVariable %_ptr_Private_int Private + %b = OpVariable %_ptr_Private_int Private %_UniformBuffer = OpTypeStruct %float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%13 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%17 = OpTypeFunction %void + %13 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %17 = OpTypeFunction %void %_ptr_Uniform_float = OpTypePointer Uniform %float -%int_0 = OpConstant %int 0 + %int_0 = OpConstant %int 0 %_ptr_Output_float = OpTypePointer Output %float -%main = OpFunction %void None %17 -%18 = OpLabel -%20 = OpAccessChain %_ptr_Uniform_float %13 %int_0 -%23 = OpLoad %float %20 -%24 = OpLoad %int %b -%19 = OpExtInst %float %1 Ldexp %23 %24 -%25 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 -OpStore %25 %19 -OpReturn -OpFunctionEnd + %main = OpFunction %void None %17 + %18 = OpLabel + %20 = OpAccessChain %_ptr_Uniform_float %13 %int_0 + %23 = OpLoad %float %20 + %24 = OpLoad %int %b + %19 = OpExtInst %float %1 Ldexp %23 %24 + %25 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 + OpStore %25 %19 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Ldexp.wgsl b/tests/sksl/intrinsics/Ldexp.wgsl new file mode 100644 index 000000000000..f19abfd6861a --- /dev/null +++ b/tests/sksl/intrinsics/Ldexp.wgsl @@ -0,0 +1,23 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + a: f32, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +var b: i32; +fn main(_stageOut: ptr) { + { + let _skTemp0 = ldexp(_globalUniforms.a, b); + (*_stageOut).sk_FragColor.x = f32(_skTemp0); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(&_stageOut); + return _stageOut; +} diff --git a/tests/sksl/intrinsics/Length.asm.frag b/tests/sksl/intrinsics/Length.asm.frag index b46b0a49224f..17381f51842e 100644 --- a/tests/sksl/intrinsics/Length.asm.frag +++ b/tests/sksl/intrinsics/Length.asm.frag @@ -1,173 +1,173 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testMatrix2x2" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %inputVal "inputVal" -OpName %expected "expected" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %105 RelaxedPrecision -OpDecorate %108 RelaxedPrecision -OpDecorate %109 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testMatrix2x2" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %inputVal "inputVal" + OpName %expected "expected" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %105 RelaxedPrecision + OpDecorate %108 RelaxedPrecision + OpDecorate %109 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%float_2 = OpConstant %float 2 -%float_n2 = OpConstant %float -2 -%float_1 = OpConstant %float 1 -%float_8 = OpConstant %float 8 -%37 = OpConstantComposite %v4float %float_2 %float_n2 %float_1 %float_8 -%float_3 = OpConstant %float 3 -%float_5 = OpConstant %float 5 -%float_13 = OpConstant %float 13 -%43 = OpConstantComposite %v4float %float_3 %float_3 %float_5 %float_13 -%false = OpConstantFalse %bool + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %float_2 = OpConstant %float 2 + %float_n2 = OpConstant %float -2 + %float_1 = OpConstant %float 1 + %float_8 = OpConstant %float 8 + %37 = OpConstantComposite %v4float %float_2 %float_n2 %float_1 %float_8 + %float_3 = OpConstant %float 3 + %float_5 = OpConstant %float 5 + %float_13 = OpConstant %float 13 + %43 = OpConstantComposite %v4float %float_3 %float_3 %float_5 %float_13 + %false = OpConstantFalse %bool %float_0_0500000007 = OpConstant %float 0.0500000007 -%v3float = OpTypeVector %float 3 -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 + %v3float = OpTypeVector %float 3 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%inputVal = OpVariable %_ptr_Function_v4float Function -%expected = OpVariable %_ptr_Function_v4float Function -%99 = OpVariable %_ptr_Function_v4float Function -%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %28 -%38 = OpFAdd %v4float %32 %37 -OpStore %inputVal %38 -OpStore %expected %43 -%47 = OpCompositeExtract %float %38 0 -%46 = OpExtInst %float %1 Length %47 -%48 = OpFSub %float %46 %float_3 -%45 = OpExtInst %float %1 FAbs %48 -%50 = OpFOrdLessThan %bool %45 %float_0_0500000007 -OpSelectionMerge %52 None -OpBranchConditional %50 %51 %52 -%51 = OpLabel -%55 = OpVectorShuffle %v2float %38 %38 0 1 -%54 = OpExtInst %float %1 Length %55 -%56 = OpFSub %float %54 %float_3 -%53 = OpExtInst %float %1 FAbs %56 -%57 = OpFOrdLessThan %bool %53 %float_0_0500000007 -OpBranch %52 -%52 = OpLabel -%58 = OpPhi %bool %false %25 %57 %51 -OpSelectionMerge %60 None -OpBranchConditional %58 %59 %60 -%59 = OpLabel -%63 = OpVectorShuffle %v3float %38 %38 0 1 2 -%62 = OpExtInst %float %1 Length %63 -%65 = OpFSub %float %62 %float_5 -%61 = OpExtInst %float %1 FAbs %65 -%66 = OpFOrdLessThan %bool %61 %float_0_0500000007 -OpBranch %60 -%60 = OpLabel -%67 = OpPhi %bool %false %52 %66 %59 -OpSelectionMerge %69 None -OpBranchConditional %67 %68 %69 -%68 = OpLabel -%71 = OpExtInst %float %1 Length %38 -%72 = OpFSub %float %71 %float_13 -%70 = OpExtInst %float %1 FAbs %72 -%73 = OpFOrdLessThan %bool %70 %float_0_0500000007 -OpBranch %69 -%69 = OpLabel -%74 = OpPhi %bool %false %60 %73 %68 -OpSelectionMerge %76 None -OpBranchConditional %74 %75 %76 -%75 = OpLabel -%78 = OpFSub %float %float_3 %float_3 -%77 = OpExtInst %float %1 FAbs %78 -%79 = OpFOrdLessThan %bool %77 %float_0_0500000007 -OpBranch %76 -%76 = OpLabel -%80 = OpPhi %bool %false %69 %79 %75 -OpSelectionMerge %82 None -OpBranchConditional %80 %81 %82 -%81 = OpLabel -%84 = OpFSub %float %float_3 %float_3 -%83 = OpExtInst %float %1 FAbs %84 -%85 = OpFOrdLessThan %bool %83 %float_0_0500000007 -OpBranch %82 -%82 = OpLabel -%86 = OpPhi %bool %false %76 %85 %81 -OpSelectionMerge %88 None -OpBranchConditional %86 %87 %88 -%87 = OpLabel -%90 = OpFSub %float %float_5 %float_5 -%89 = OpExtInst %float %1 FAbs %90 -%91 = OpFOrdLessThan %bool %89 %float_0_0500000007 -OpBranch %88 -%88 = OpLabel -%92 = OpPhi %bool %false %82 %91 %87 -OpSelectionMerge %94 None -OpBranchConditional %92 %93 %94 -%93 = OpLabel -%96 = OpFSub %float %float_13 %float_13 -%95 = OpExtInst %float %1 FAbs %96 -%97 = OpFOrdLessThan %bool %95 %float_0_0500000007 -OpBranch %94 -%94 = OpLabel -%98 = OpPhi %bool %false %88 %97 %93 -OpSelectionMerge %102 None -OpBranchConditional %98 %100 %101 -%100 = OpLabel -%103 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%105 = OpLoad %v4float %103 -OpStore %99 %105 -OpBranch %102 -%101 = OpLabel -%106 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%108 = OpLoad %v4float %106 -OpStore %99 %108 -OpBranch %102 -%102 = OpLabel -%109 = OpLoad %v4float %99 -OpReturnValue %109 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %inputVal = OpVariable %_ptr_Function_v4float Function + %expected = OpVariable %_ptr_Function_v4float Function + %99 = OpVariable %_ptr_Function_v4float Function + %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %28 + %38 = OpFAdd %v4float %32 %37 + OpStore %inputVal %38 + OpStore %expected %43 + %47 = OpCompositeExtract %float %38 0 + %46 = OpExtInst %float %1 Length %47 + %48 = OpFSub %float %46 %float_3 + %45 = OpExtInst %float %1 FAbs %48 + %50 = OpFOrdLessThan %bool %45 %float_0_0500000007 + OpSelectionMerge %52 None + OpBranchConditional %50 %51 %52 + %51 = OpLabel + %55 = OpVectorShuffle %v2float %38 %38 0 1 + %54 = OpExtInst %float %1 Length %55 + %56 = OpFSub %float %54 %float_3 + %53 = OpExtInst %float %1 FAbs %56 + %57 = OpFOrdLessThan %bool %53 %float_0_0500000007 + OpBranch %52 + %52 = OpLabel + %58 = OpPhi %bool %false %25 %57 %51 + OpSelectionMerge %60 None + OpBranchConditional %58 %59 %60 + %59 = OpLabel + %63 = OpVectorShuffle %v3float %38 %38 0 1 2 + %62 = OpExtInst %float %1 Length %63 + %65 = OpFSub %float %62 %float_5 + %61 = OpExtInst %float %1 FAbs %65 + %66 = OpFOrdLessThan %bool %61 %float_0_0500000007 + OpBranch %60 + %60 = OpLabel + %67 = OpPhi %bool %false %52 %66 %59 + OpSelectionMerge %69 None + OpBranchConditional %67 %68 %69 + %68 = OpLabel + %71 = OpExtInst %float %1 Length %38 + %72 = OpFSub %float %71 %float_13 + %70 = OpExtInst %float %1 FAbs %72 + %73 = OpFOrdLessThan %bool %70 %float_0_0500000007 + OpBranch %69 + %69 = OpLabel + %74 = OpPhi %bool %false %60 %73 %68 + OpSelectionMerge %76 None + OpBranchConditional %74 %75 %76 + %75 = OpLabel + %78 = OpFSub %float %float_3 %float_3 + %77 = OpExtInst %float %1 FAbs %78 + %79 = OpFOrdLessThan %bool %77 %float_0_0500000007 + OpBranch %76 + %76 = OpLabel + %80 = OpPhi %bool %false %69 %79 %75 + OpSelectionMerge %82 None + OpBranchConditional %80 %81 %82 + %81 = OpLabel + %84 = OpFSub %float %float_3 %float_3 + %83 = OpExtInst %float %1 FAbs %84 + %85 = OpFOrdLessThan %bool %83 %float_0_0500000007 + OpBranch %82 + %82 = OpLabel + %86 = OpPhi %bool %false %76 %85 %81 + OpSelectionMerge %88 None + OpBranchConditional %86 %87 %88 + %87 = OpLabel + %90 = OpFSub %float %float_5 %float_5 + %89 = OpExtInst %float %1 FAbs %90 + %91 = OpFOrdLessThan %bool %89 %float_0_0500000007 + OpBranch %88 + %88 = OpLabel + %92 = OpPhi %bool %false %82 %91 %87 + OpSelectionMerge %94 None + OpBranchConditional %92 %93 %94 + %93 = OpLabel + %96 = OpFSub %float %float_13 %float_13 + %95 = OpExtInst %float %1 FAbs %96 + %97 = OpFOrdLessThan %bool %95 %float_0_0500000007 + OpBranch %94 + %94 = OpLabel + %98 = OpPhi %bool %false %88 %97 %93 + OpSelectionMerge %102 None + OpBranchConditional %98 %100 %101 + %100 = OpLabel + %103 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %105 = OpLoad %v4float %103 + OpStore %99 %105 + OpBranch %102 + %101 = OpLabel + %106 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %108 = OpLoad %v4float %106 + OpStore %99 %108 + OpBranch %102 + %102 = OpLabel + %109 = OpLoad %v4float %99 + OpReturnValue %109 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Length.skrp b/tests/sksl/intrinsics/Length.skrp index 1fc6bd02ab77..bb186a42430a 100644 --- a/tests/sksl/intrinsics/Length.skrp +++ b/tests/sksl/intrinsics/Length.skrp @@ -1,31 +1,32 @@ +60 instructions + [immutable slots] -expected(0) = 0x40400000 (3.0) -expected(1) = 0x40400000 (3.0) -expected(2) = 0x40A00000 (5.0) -expected(3) = 0x41500000 (13.0) -allowedDelta = 0x3D4CCCCD (0.05) +i0 = 0x40000000 (2.0) +i1 = 0xC0000000 (-2.0) +i2 = 0x3F800000 (1.0) +i3 = 0x41000000 (8.0) +i4 = 0x40400000 (3.0) +i5 = 0x40400000 (3.0) +i6 = 0x40A00000 (5.0) +i7 = 0x41500000 (13.0) +i8 = 0x3D4CCCCD (0.05) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_4_uniforms $0..3 = testMatrix2x2 -copy_constant $4 = 0x40000000 (2.0) -copy_constant $5 = 0xC0000000 (-2.0) -copy_constant $6 = 0x3F800000 (1.0) -copy_constant $7 = 0x41000000 (8.0) +copy_4_immutables_unmasked $4..7 = i0..3 [0x40000000 (2.0), 0xC0000000 (-2.0), 0x3F800000 (1.0), 0x41000000 (8.0)] add_4_floats $0..3 += $4..7 copy_4_slots_unmasked inputVal = $0..3 copy_slot_unmasked $0 = inputVal(0) bitwise_and_imm_int $0 &= 0x7FFFFFFF -copy_slot_unmasked $1 = expected(0) -sub_float $0 -= $1 +add_imm_float $0 += 0xC0400000 (-3.0) bitwise_and_imm_int $0 &= 0x7FFFFFFF cmplt_imm_float $0 = lessThan($0, 0x3D4CCCCD (0.05)) copy_2_slots_unmasked $1..2 = inputVal(0..1) copy_2_slots_unmasked $3..4 = $1..2 dot_2_floats $1 = dot($1..2, $3..4) sqrt_float $1 = sqrt($1) -copy_slot_unmasked $2 = expected(1) -sub_float $1 -= $2 +add_imm_float $1 += 0xC0400000 (-3.0) bitwise_and_imm_int $1 &= 0x7FFFFFFF cmplt_imm_float $1 = lessThan($1, 0x3D4CCCCD (0.05)) bitwise_and_int $0 &= $1 @@ -33,8 +34,7 @@ copy_3_slots_unmasked $1..3 = inputVal(0..2) copy_3_slots_unmasked $4..6 = $1..3 dot_3_floats $1 = dot($1..3, $4..6) sqrt_float $1 = sqrt($1) -copy_slot_unmasked $2 = expected(2) -sub_float $1 -= $2 +add_imm_float $1 += 0xC0A00000 (-5.0) bitwise_and_imm_int $1 &= 0x7FFFFFFF cmplt_imm_float $1 = lessThan($1, 0x3D4CCCCD (0.05)) bitwise_and_int $0 &= $1 @@ -42,32 +42,27 @@ copy_4_slots_unmasked $1..4 = inputVal copy_4_slots_unmasked $5..8 = $1..4 dot_4_floats $1 = dot($1..4, $5..8) sqrt_float $1 = sqrt($1) -copy_slot_unmasked $2 = expected(3) -sub_float $1 -= $2 +add_imm_float $1 += 0xC1500000 (-13.0) bitwise_and_imm_int $1 &= 0x7FFFFFFF cmplt_imm_float $1 = lessThan($1, 0x3D4CCCCD (0.05)) bitwise_and_int $0 &= $1 copy_constant $1 = 0x40400000 (3.0) -copy_slot_unmasked $2 = expected(0) -sub_float $1 -= $2 +add_imm_float $1 += 0xC0400000 (-3.0) bitwise_and_imm_int $1 &= 0x7FFFFFFF cmplt_imm_float $1 = lessThan($1, 0x3D4CCCCD (0.05)) bitwise_and_int $0 &= $1 copy_constant $1 = 0x40400000 (3.0) -copy_slot_unmasked $2 = expected(1) -sub_float $1 -= $2 +add_imm_float $1 += 0xC0400000 (-3.0) bitwise_and_imm_int $1 &= 0x7FFFFFFF cmplt_imm_float $1 = lessThan($1, 0x3D4CCCCD (0.05)) bitwise_and_int $0 &= $1 copy_constant $1 = 0x40A00000 (5.0) -copy_slot_unmasked $2 = expected(2) -sub_float $1 -= $2 +add_imm_float $1 += 0xC0A00000 (-5.0) bitwise_and_imm_int $1 &= 0x7FFFFFFF cmplt_imm_float $1 = lessThan($1, 0x3D4CCCCD (0.05)) bitwise_and_int $0 &= $1 copy_constant $1 = 0x41500000 (13.0) -copy_slot_unmasked $2 = expected(3) -sub_float $1 -= $2 +add_imm_float $1 += 0xC1500000 (-13.0) bitwise_and_imm_int $1 &= 0x7FFFFFFF cmplt_imm_float $1 = lessThan($1, 0x3D4CCCCD (0.05)) bitwise_and_int $0 &= $1 diff --git a/tests/sksl/intrinsics/Length.wgsl b/tests/sksl/intrinsics/Length.wgsl new file mode 100644 index 000000000000..f304fff6a3d4 --- /dev/null +++ b/tests/sksl/intrinsics/Length.wgsl @@ -0,0 +1,40 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + testMatrix2x2: vec4, + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var inputVal: vec4 = _globalUniforms.testMatrix2x2 + vec4(2.0, -2.0, 1.0, 8.0); + var expected: vec4 = vec4(3.0, 3.0, 5.0, 13.0); + const allowedDelta: f32 = 0.05; + let _skTemp0 = length(inputVal.x); + let _skTemp1 = abs(_skTemp0 - expected.x); + let _skTemp2 = length(inputVal.xy); + let _skTemp3 = abs(_skTemp2 - expected.y); + let _skTemp4 = length(inputVal.xyz); + let _skTemp5 = abs(_skTemp4 - expected.z); + let _skTemp6 = length(inputVal); + let _skTemp7 = abs(_skTemp6 - expected.w); + let _skTemp8 = abs(3.0 - expected.x); + let _skTemp9 = abs(3.0 - expected.y); + let _skTemp10 = abs(5.0 - expected.z); + let _skTemp11 = abs(13.0 - expected.w); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((_skTemp1 < allowedDelta) && (_skTemp3 < allowedDelta)) && (_skTemp5 < allowedDelta)) && (_skTemp7 < allowedDelta)) && (_skTemp8 < allowedDelta)) && (_skTemp9 < allowedDelta)) && (_skTemp10 < allowedDelta)) && (_skTemp11 < allowedDelta))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/intrinsics/LessThan.asm.frag b/tests/sksl/intrinsics/LessThan.asm.frag index c254b5809f04..02ec59419f22 100644 --- a/tests/sksl/intrinsics/LessThan.asm.frag +++ b/tests/sksl/intrinsics/LessThan.asm.frag @@ -1,126 +1,126 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "a" -OpMemberName %_UniformBuffer 1 "b" -OpMemberName %_UniformBuffer 2 "c" -OpMemberName %_UniformBuffer 3 "d" -OpMemberName %_UniformBuffer 4 "e" -OpMemberName %_UniformBuffer 5 "f" -OpName %main "main" -OpName %expectTTFF "expectTTFF" -OpName %expectFFTT "expectFFTT" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 3 Offset 40 -OpMemberDecorate %_UniformBuffer 4 Offset 48 -OpMemberDecorate %_UniformBuffer 5 Offset 64 -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %32 RelaxedPrecision -OpDecorate %35 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %65 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %75 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "a" + OpMemberName %_UniformBuffer 1 "b" + OpMemberName %_UniformBuffer 2 "c" + OpMemberName %_UniformBuffer 3 "d" + OpMemberName %_UniformBuffer 4 "e" + OpMemberName %_UniformBuffer 5 "f" + OpName %main "main" + OpName %expectTTFF "expectTTFF" + OpName %expectFFTT "expectFFTT" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 3 Offset 40 + OpMemberDecorate %_UniformBuffer 4 Offset 48 + OpMemberDecorate %_UniformBuffer 5 Offset 64 + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %32 RelaxedPrecision + OpDecorate %35 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %65 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %75 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%uint = OpTypeInt 32 0 -%v2uint = OpTypeVector %uint 2 -%int = OpTypeInt 32 1 -%v3int = OpTypeVector %int 3 + %uint = OpTypeInt 32 0 + %v2uint = OpTypeVector %uint 2 + %int = OpTypeInt 32 1 + %v3int = OpTypeVector %int 3 %_UniformBuffer = OpTypeStruct %v4float %v4float %v2uint %v2uint %v3int %v3int %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%18 = OpTypeFunction %void -%v4bool = OpTypeVector %bool 4 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %18 = OpTypeFunction %void + %v4bool = OpTypeVector %bool 4 %_ptr_Function_v4bool = OpTypePointer Function %v4bool -%true = OpConstantTrue %bool -%false = OpConstantFalse %bool -%25 = OpConstantComposite %v4bool %true %true %false %false -%27 = OpConstantComposite %v4bool %false %false %true %true + %true = OpConstantTrue %bool + %false = OpConstantFalse %bool + %25 = OpConstantComposite %v4bool %true %true %false %false + %27 = OpConstantComposite %v4bool %false %false %true %true %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 %_ptr_Output_float = OpTypePointer Output %float %_ptr_Uniform_v2uint = OpTypePointer Uniform %v2uint -%int_2 = OpConstant %int 2 -%int_3 = OpConstant %int 3 -%v2bool = OpTypeVector %bool 2 + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 + %v2bool = OpTypeVector %bool 2 %_ptr_Uniform_v3int = OpTypePointer Uniform %v3int -%int_4 = OpConstant %int 4 -%int_5 = OpConstant %int 5 -%v3bool = OpTypeVector %bool 3 -%main = OpFunction %void None %18 -%19 = OpLabel -%expectTTFF = OpVariable %_ptr_Function_v4bool Function -%expectFFTT = OpVariable %_ptr_Function_v4bool Function -OpStore %expectTTFF %25 -OpStore %expectFFTT %27 -%29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %29 -%33 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%35 = OpLoad %v4float %33 -%28 = OpFOrdLessThan %v4bool %32 %35 -%36 = OpCompositeExtract %bool %28 0 -%37 = OpSelect %int %36 %int_1 %int_0 -%38 = OpConvertSToF %float %37 -%39 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 -OpStore %39 %38 -%42 = OpAccessChain %_ptr_Uniform_v2uint %10 %int_2 -%45 = OpLoad %v2uint %42 -%46 = OpAccessChain %_ptr_Uniform_v2uint %10 %int_3 -%48 = OpLoad %v2uint %46 -%41 = OpULessThan %v2bool %45 %48 -%50 = OpCompositeExtract %bool %41 1 -%51 = OpSelect %int %50 %int_1 %int_0 -%52 = OpConvertSToF %float %51 -%53 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_1 -OpStore %53 %52 -%55 = OpAccessChain %_ptr_Uniform_v3int %10 %int_4 -%58 = OpLoad %v3int %55 -%59 = OpAccessChain %_ptr_Uniform_v3int %10 %int_5 -%61 = OpLoad %v3int %59 -%54 = OpSLessThan %v3bool %58 %61 -%63 = OpCompositeExtract %bool %54 2 -%64 = OpSelect %int %63 %int_1 %int_0 -%65 = OpConvertSToF %float %64 -%66 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_2 -OpStore %66 %65 -%68 = OpLoad %v4bool %expectTTFF -%67 = OpAny %bool %68 -OpSelectionMerge %70 None -OpBranchConditional %67 %70 %69 -%69 = OpLabel -%72 = OpLoad %v4bool %expectFFTT -%71 = OpAny %bool %72 -OpBranch %70 -%70 = OpLabel -%73 = OpPhi %bool %true %19 %71 %69 -%74 = OpSelect %int %73 %int_1 %int_0 -%75 = OpConvertSToF %float %74 -%76 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_3 -OpStore %76 %75 -OpReturn -OpFunctionEnd + %int_4 = OpConstant %int 4 + %int_5 = OpConstant %int 5 + %v3bool = OpTypeVector %bool 3 + %main = OpFunction %void None %18 + %19 = OpLabel + %expectTTFF = OpVariable %_ptr_Function_v4bool Function + %expectFFTT = OpVariable %_ptr_Function_v4bool Function + OpStore %expectTTFF %25 + OpStore %expectFFTT %27 + %29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %29 + %33 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %35 = OpLoad %v4float %33 + %28 = OpFOrdLessThan %v4bool %32 %35 + %36 = OpCompositeExtract %bool %28 0 + %37 = OpSelect %int %36 %int_1 %int_0 + %38 = OpConvertSToF %float %37 + %39 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 + OpStore %39 %38 + %42 = OpAccessChain %_ptr_Uniform_v2uint %10 %int_2 + %45 = OpLoad %v2uint %42 + %46 = OpAccessChain %_ptr_Uniform_v2uint %10 %int_3 + %48 = OpLoad %v2uint %46 + %41 = OpULessThan %v2bool %45 %48 + %50 = OpCompositeExtract %bool %41 1 + %51 = OpSelect %int %50 %int_1 %int_0 + %52 = OpConvertSToF %float %51 + %53 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_1 + OpStore %53 %52 + %55 = OpAccessChain %_ptr_Uniform_v3int %10 %int_4 + %58 = OpLoad %v3int %55 + %59 = OpAccessChain %_ptr_Uniform_v3int %10 %int_5 + %61 = OpLoad %v3int %59 + %54 = OpSLessThan %v3bool %58 %61 + %63 = OpCompositeExtract %bool %54 2 + %64 = OpSelect %int %63 %int_1 %int_0 + %65 = OpConvertSToF %float %64 + %66 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_2 + OpStore %66 %65 + %68 = OpLoad %v4bool %expectTTFF + %67 = OpAny %bool %68 + OpSelectionMerge %70 None + OpBranchConditional %67 %70 %69 + %69 = OpLabel + %72 = OpLoad %v4bool %expectFFTT + %71 = OpAny %bool %72 + OpBranch %70 + %70 = OpLabel + %73 = OpPhi %bool %true %19 %71 %69 + %74 = OpSelect %int %73 %int_1 %int_0 + %75 = OpConvertSToF %float %74 + %76 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_3 + OpStore %76 %75 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/intrinsics/LessThan.wgsl b/tests/sksl/intrinsics/LessThan.wgsl index 18cf682ce2fd..a0ccd4f4a6ee 100644 --- a/tests/sksl/intrinsics/LessThan.wgsl +++ b/tests/sksl/intrinsics/LessThan.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/intrinsics/LessThanEqual.asm.frag b/tests/sksl/intrinsics/LessThanEqual.asm.frag index c60d5d3862a9..41b7839eaac9 100644 --- a/tests/sksl/intrinsics/LessThanEqual.asm.frag +++ b/tests/sksl/intrinsics/LessThanEqual.asm.frag @@ -1,126 +1,126 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "a" -OpMemberName %_UniformBuffer 1 "b" -OpMemberName %_UniformBuffer 2 "c" -OpMemberName %_UniformBuffer 3 "d" -OpMemberName %_UniformBuffer 4 "e" -OpMemberName %_UniformBuffer 5 "f" -OpName %main "main" -OpName %expectTTFF "expectTTFF" -OpName %expectFFTT "expectFFTT" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 3 Offset 40 -OpMemberDecorate %_UniformBuffer 4 Offset 48 -OpMemberDecorate %_UniformBuffer 5 Offset 64 -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %32 RelaxedPrecision -OpDecorate %35 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %65 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %75 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "a" + OpMemberName %_UniformBuffer 1 "b" + OpMemberName %_UniformBuffer 2 "c" + OpMemberName %_UniformBuffer 3 "d" + OpMemberName %_UniformBuffer 4 "e" + OpMemberName %_UniformBuffer 5 "f" + OpName %main "main" + OpName %expectTTFF "expectTTFF" + OpName %expectFFTT "expectFFTT" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 3 Offset 40 + OpMemberDecorate %_UniformBuffer 4 Offset 48 + OpMemberDecorate %_UniformBuffer 5 Offset 64 + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %32 RelaxedPrecision + OpDecorate %35 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %65 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %75 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%uint = OpTypeInt 32 0 -%v2uint = OpTypeVector %uint 2 -%int = OpTypeInt 32 1 -%v3int = OpTypeVector %int 3 + %uint = OpTypeInt 32 0 + %v2uint = OpTypeVector %uint 2 + %int = OpTypeInt 32 1 + %v3int = OpTypeVector %int 3 %_UniformBuffer = OpTypeStruct %v4float %v4float %v2uint %v2uint %v3int %v3int %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%18 = OpTypeFunction %void -%v4bool = OpTypeVector %bool 4 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %18 = OpTypeFunction %void + %v4bool = OpTypeVector %bool 4 %_ptr_Function_v4bool = OpTypePointer Function %v4bool -%true = OpConstantTrue %bool -%false = OpConstantFalse %bool -%25 = OpConstantComposite %v4bool %true %true %false %false -%27 = OpConstantComposite %v4bool %false %false %true %true + %true = OpConstantTrue %bool + %false = OpConstantFalse %bool + %25 = OpConstantComposite %v4bool %true %true %false %false + %27 = OpConstantComposite %v4bool %false %false %true %true %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 %_ptr_Output_float = OpTypePointer Output %float %_ptr_Uniform_v2uint = OpTypePointer Uniform %v2uint -%int_2 = OpConstant %int 2 -%int_3 = OpConstant %int 3 -%v2bool = OpTypeVector %bool 2 + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 + %v2bool = OpTypeVector %bool 2 %_ptr_Uniform_v3int = OpTypePointer Uniform %v3int -%int_4 = OpConstant %int 4 -%int_5 = OpConstant %int 5 -%v3bool = OpTypeVector %bool 3 -%main = OpFunction %void None %18 -%19 = OpLabel -%expectTTFF = OpVariable %_ptr_Function_v4bool Function -%expectFFTT = OpVariable %_ptr_Function_v4bool Function -OpStore %expectTTFF %25 -OpStore %expectFFTT %27 -%29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %29 -%33 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%35 = OpLoad %v4float %33 -%28 = OpFOrdLessThanEqual %v4bool %32 %35 -%36 = OpCompositeExtract %bool %28 0 -%37 = OpSelect %int %36 %int_1 %int_0 -%38 = OpConvertSToF %float %37 -%39 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 -OpStore %39 %38 -%42 = OpAccessChain %_ptr_Uniform_v2uint %10 %int_2 -%45 = OpLoad %v2uint %42 -%46 = OpAccessChain %_ptr_Uniform_v2uint %10 %int_3 -%48 = OpLoad %v2uint %46 -%41 = OpULessThanEqual %v2bool %45 %48 -%50 = OpCompositeExtract %bool %41 1 -%51 = OpSelect %int %50 %int_1 %int_0 -%52 = OpConvertSToF %float %51 -%53 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_1 -OpStore %53 %52 -%55 = OpAccessChain %_ptr_Uniform_v3int %10 %int_4 -%58 = OpLoad %v3int %55 -%59 = OpAccessChain %_ptr_Uniform_v3int %10 %int_5 -%61 = OpLoad %v3int %59 -%54 = OpSLessThanEqual %v3bool %58 %61 -%63 = OpCompositeExtract %bool %54 2 -%64 = OpSelect %int %63 %int_1 %int_0 -%65 = OpConvertSToF %float %64 -%66 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_2 -OpStore %66 %65 -%68 = OpLoad %v4bool %expectTTFF -%67 = OpAny %bool %68 -OpSelectionMerge %70 None -OpBranchConditional %67 %70 %69 -%69 = OpLabel -%72 = OpLoad %v4bool %expectFFTT -%71 = OpAny %bool %72 -OpBranch %70 -%70 = OpLabel -%73 = OpPhi %bool %true %19 %71 %69 -%74 = OpSelect %int %73 %int_1 %int_0 -%75 = OpConvertSToF %float %74 -%76 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_3 -OpStore %76 %75 -OpReturn -OpFunctionEnd + %int_4 = OpConstant %int 4 + %int_5 = OpConstant %int 5 + %v3bool = OpTypeVector %bool 3 + %main = OpFunction %void None %18 + %19 = OpLabel + %expectTTFF = OpVariable %_ptr_Function_v4bool Function + %expectFFTT = OpVariable %_ptr_Function_v4bool Function + OpStore %expectTTFF %25 + OpStore %expectFFTT %27 + %29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %29 + %33 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %35 = OpLoad %v4float %33 + %28 = OpFOrdLessThanEqual %v4bool %32 %35 + %36 = OpCompositeExtract %bool %28 0 + %37 = OpSelect %int %36 %int_1 %int_0 + %38 = OpConvertSToF %float %37 + %39 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 + OpStore %39 %38 + %42 = OpAccessChain %_ptr_Uniform_v2uint %10 %int_2 + %45 = OpLoad %v2uint %42 + %46 = OpAccessChain %_ptr_Uniform_v2uint %10 %int_3 + %48 = OpLoad %v2uint %46 + %41 = OpULessThanEqual %v2bool %45 %48 + %50 = OpCompositeExtract %bool %41 1 + %51 = OpSelect %int %50 %int_1 %int_0 + %52 = OpConvertSToF %float %51 + %53 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_1 + OpStore %53 %52 + %55 = OpAccessChain %_ptr_Uniform_v3int %10 %int_4 + %58 = OpLoad %v3int %55 + %59 = OpAccessChain %_ptr_Uniform_v3int %10 %int_5 + %61 = OpLoad %v3int %59 + %54 = OpSLessThanEqual %v3bool %58 %61 + %63 = OpCompositeExtract %bool %54 2 + %64 = OpSelect %int %63 %int_1 %int_0 + %65 = OpConvertSToF %float %64 + %66 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_2 + OpStore %66 %65 + %68 = OpLoad %v4bool %expectTTFF + %67 = OpAny %bool %68 + OpSelectionMerge %70 None + OpBranchConditional %67 %70 %69 + %69 = OpLabel + %72 = OpLoad %v4bool %expectFFTT + %71 = OpAny %bool %72 + OpBranch %70 + %70 = OpLabel + %73 = OpPhi %bool %true %19 %71 %69 + %74 = OpSelect %int %73 %int_1 %int_0 + %75 = OpConvertSToF %float %74 + %76 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_3 + OpStore %76 %75 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/intrinsics/LessThanEqual.wgsl b/tests/sksl/intrinsics/LessThanEqual.wgsl index 641dfda16817..0b3322ce99fb 100644 --- a/tests/sksl/intrinsics/LessThanEqual.wgsl +++ b/tests/sksl/intrinsics/LessThanEqual.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/intrinsics/Log.asm.frag b/tests/sksl/intrinsics/Log.asm.frag index ccd8e48af345..6bdf6e07dd0f 100644 --- a/tests/sksl/intrinsics/Log.asm.frag +++ b/tests/sksl/intrinsics/Log.asm.frag @@ -1,209 +1,209 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "inputVal" -OpMemberName %_UniformBuffer 1 "expected" -OpMemberName %_UniformBuffer 2 "colorGreen" -OpMemberName %_UniformBuffer 3 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 3 Offset 48 -OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %27 RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %80 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %87 RelaxedPrecision -OpDecorate %88 RelaxedPrecision -OpDecorate %96 RelaxedPrecision -OpDecorate %97 RelaxedPrecision -OpDecorate %105 RelaxedPrecision -OpDecorate %116 RelaxedPrecision -OpDecorate %119 RelaxedPrecision -OpDecorate %120 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "inputVal" + OpMemberName %_UniformBuffer 1 "expected" + OpMemberName %_UniformBuffer 2 "colorGreen" + OpMemberName %_UniformBuffer 3 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 3 Offset 48 + OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %27 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %80 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %87 RelaxedPrecision + OpDecorate %88 RelaxedPrecision + OpDecorate %96 RelaxedPrecision + OpDecorate %97 RelaxedPrecision + OpDecorate %105 RelaxedPrecision + OpDecorate %116 RelaxedPrecision + OpDecorate %119 RelaxedPrecision + OpDecorate %120 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%false = OpConstantFalse %bool + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%v3bool = OpTypeVector %bool 3 -%v4bool = OpTypeVector %bool 4 -%94 = OpConstantComposite %v3float %float_0 %float_0 %float_0 -%103 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %v3bool = OpTypeVector %bool 3 + %v4bool = OpTypeVector %bool 4 + %94 = OpConstantComposite %v3float %float_0 %float_0 %float_0 + %103 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_2 = OpConstant %int 2 -%int_3 = OpConstant %int 3 + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%109 = OpVariable %_ptr_Function_v4float Function -%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %28 -%33 = OpCompositeExtract %float %32 0 -%27 = OpExtInst %float %1 Log %33 -%34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%36 = OpLoad %v4float %34 -%37 = OpCompositeExtract %float %36 0 -%38 = OpFOrdEqual %bool %27 %37 -OpSelectionMerge %40 None -OpBranchConditional %38 %39 %40 -%39 = OpLabel -%42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%43 = OpLoad %v4float %42 -%44 = OpVectorShuffle %v2float %43 %43 0 1 -%41 = OpExtInst %v2float %1 Log %44 -%45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%46 = OpLoad %v4float %45 -%47 = OpVectorShuffle %v2float %46 %46 0 1 -%48 = OpFOrdEqual %v2bool %41 %47 -%50 = OpAll %bool %48 -OpBranch %40 -%40 = OpLabel -%51 = OpPhi %bool %false %25 %50 %39 -OpSelectionMerge %53 None -OpBranchConditional %51 %52 %53 -%52 = OpLabel -%55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%56 = OpLoad %v4float %55 -%57 = OpVectorShuffle %v3float %56 %56 0 1 2 -%54 = OpExtInst %v3float %1 Log %57 -%59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%60 = OpLoad %v4float %59 -%61 = OpVectorShuffle %v3float %60 %60 0 1 2 -%62 = OpFOrdEqual %v3bool %54 %61 -%64 = OpAll %bool %62 -OpBranch %53 -%53 = OpLabel -%65 = OpPhi %bool %false %40 %64 %52 -OpSelectionMerge %67 None -OpBranchConditional %65 %66 %67 -%66 = OpLabel -%69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%70 = OpLoad %v4float %69 -%68 = OpExtInst %v4float %1 Log %70 -%71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%72 = OpLoad %v4float %71 -%73 = OpFOrdEqual %v4bool %68 %72 -%75 = OpAll %bool %73 -OpBranch %67 -%67 = OpLabel -%76 = OpPhi %bool %false %53 %75 %66 -OpSelectionMerge %78 None -OpBranchConditional %76 %77 %78 -%77 = OpLabel -%79 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%80 = OpLoad %v4float %79 -%81 = OpCompositeExtract %float %80 0 -%82 = OpFOrdEqual %bool %float_0 %81 -OpBranch %78 -%78 = OpLabel -%83 = OpPhi %bool %false %67 %82 %77 -OpSelectionMerge %85 None -OpBranchConditional %83 %84 %85 -%84 = OpLabel -%86 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%87 = OpLoad %v4float %86 -%88 = OpVectorShuffle %v2float %87 %87 0 1 -%89 = OpFOrdEqual %v2bool %19 %88 -%90 = OpAll %bool %89 -OpBranch %85 -%85 = OpLabel -%91 = OpPhi %bool %false %78 %90 %84 -OpSelectionMerge %93 None -OpBranchConditional %91 %92 %93 -%92 = OpLabel -%95 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%96 = OpLoad %v4float %95 -%97 = OpVectorShuffle %v3float %96 %96 0 1 2 -%98 = OpFOrdEqual %v3bool %94 %97 -%99 = OpAll %bool %98 -OpBranch %93 -%93 = OpLabel -%100 = OpPhi %bool %false %85 %99 %92 -OpSelectionMerge %102 None -OpBranchConditional %100 %101 %102 -%101 = OpLabel -%104 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%105 = OpLoad %v4float %104 -%106 = OpFOrdEqual %v4bool %103 %105 -%107 = OpAll %bool %106 -OpBranch %102 -%102 = OpLabel -%108 = OpPhi %bool %false %93 %107 %101 -OpSelectionMerge %113 None -OpBranchConditional %108 %111 %112 -%111 = OpLabel -%114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%116 = OpLoad %v4float %114 -OpStore %109 %116 -OpBranch %113 -%112 = OpLabel -%117 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%119 = OpLoad %v4float %117 -OpStore %109 %119 -OpBranch %113 -%113 = OpLabel -%120 = OpLoad %v4float %109 -OpReturnValue %120 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %109 = OpVariable %_ptr_Function_v4float Function + %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %28 + %33 = OpCompositeExtract %float %32 0 + %27 = OpExtInst %float %1 Log %33 + %34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %36 = OpLoad %v4float %34 + %37 = OpCompositeExtract %float %36 0 + %38 = OpFOrdEqual %bool %27 %37 + OpSelectionMerge %40 None + OpBranchConditional %38 %39 %40 + %39 = OpLabel + %42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %43 = OpLoad %v4float %42 + %44 = OpVectorShuffle %v2float %43 %43 0 1 + %41 = OpExtInst %v2float %1 Log %44 + %45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %46 = OpLoad %v4float %45 + %47 = OpVectorShuffle %v2float %46 %46 0 1 + %48 = OpFOrdEqual %v2bool %41 %47 + %50 = OpAll %bool %48 + OpBranch %40 + %40 = OpLabel + %51 = OpPhi %bool %false %25 %50 %39 + OpSelectionMerge %53 None + OpBranchConditional %51 %52 %53 + %52 = OpLabel + %55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %56 = OpLoad %v4float %55 + %57 = OpVectorShuffle %v3float %56 %56 0 1 2 + %54 = OpExtInst %v3float %1 Log %57 + %59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %60 = OpLoad %v4float %59 + %61 = OpVectorShuffle %v3float %60 %60 0 1 2 + %62 = OpFOrdEqual %v3bool %54 %61 + %64 = OpAll %bool %62 + OpBranch %53 + %53 = OpLabel + %65 = OpPhi %bool %false %40 %64 %52 + OpSelectionMerge %67 None + OpBranchConditional %65 %66 %67 + %66 = OpLabel + %69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %70 = OpLoad %v4float %69 + %68 = OpExtInst %v4float %1 Log %70 + %71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %72 = OpLoad %v4float %71 + %73 = OpFOrdEqual %v4bool %68 %72 + %75 = OpAll %bool %73 + OpBranch %67 + %67 = OpLabel + %76 = OpPhi %bool %false %53 %75 %66 + OpSelectionMerge %78 None + OpBranchConditional %76 %77 %78 + %77 = OpLabel + %79 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %80 = OpLoad %v4float %79 + %81 = OpCompositeExtract %float %80 0 + %82 = OpFOrdEqual %bool %float_0 %81 + OpBranch %78 + %78 = OpLabel + %83 = OpPhi %bool %false %67 %82 %77 + OpSelectionMerge %85 None + OpBranchConditional %83 %84 %85 + %84 = OpLabel + %86 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %87 = OpLoad %v4float %86 + %88 = OpVectorShuffle %v2float %87 %87 0 1 + %89 = OpFOrdEqual %v2bool %19 %88 + %90 = OpAll %bool %89 + OpBranch %85 + %85 = OpLabel + %91 = OpPhi %bool %false %78 %90 %84 + OpSelectionMerge %93 None + OpBranchConditional %91 %92 %93 + %92 = OpLabel + %95 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %96 = OpLoad %v4float %95 + %97 = OpVectorShuffle %v3float %96 %96 0 1 2 + %98 = OpFOrdEqual %v3bool %94 %97 + %99 = OpAll %bool %98 + OpBranch %93 + %93 = OpLabel + %100 = OpPhi %bool %false %85 %99 %92 + OpSelectionMerge %102 None + OpBranchConditional %100 %101 %102 + %101 = OpLabel + %104 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %105 = OpLoad %v4float %104 + %106 = OpFOrdEqual %v4bool %103 %105 + %107 = OpAll %bool %106 + OpBranch %102 + %102 = OpLabel + %108 = OpPhi %bool %false %93 %107 %101 + OpSelectionMerge %113 None + OpBranchConditional %108 %111 %112 + %111 = OpLabel + %114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %116 = OpLoad %v4float %114 + OpStore %109 %116 + OpBranch %113 + %112 = OpLabel + %117 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %119 = OpLoad %v4float %117 + OpStore %109 %119 + OpBranch %113 + %113 = OpLabel + %120 = OpLoad %v4float %109 + OpReturnValue %120 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Log.skrp b/tests/sksl/intrinsics/Log.skrp index 36d9271c15c1..b8daa1420a6e 100644 --- a/tests/sksl/intrinsics/Log.skrp +++ b/tests/sksl/intrinsics/Log.skrp @@ -1,3 +1,5 @@ +57 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_uniform $4 = inputVal(0) diff --git a/tests/sksl/intrinsics/Log.wgsl b/tests/sksl/intrinsics/Log.wgsl index 985257ba5970..5f7d8e3ef265 100644 --- a/tests/sksl/intrinsics/Log.wgsl +++ b/tests/sksl/intrinsics/Log.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -19,7 +20,7 @@ fn main(_skParam0: vec2) -> vec4 { let _skTemp1 = log(_globalUniforms.inputVal.xy); let _skTemp2 = log(_globalUniforms.inputVal.xyz); let _skTemp3 = log(_globalUniforms.inputVal); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((_skTemp0 == _globalUniforms.expected.x && all(_skTemp1 == _globalUniforms.expected.xy)) && all(_skTemp2 == _globalUniforms.expected.xyz)) && all(_skTemp3 == _globalUniforms.expected)) && 0.0 == _globalUniforms.expected.x) && all(vec2(0.0) == _globalUniforms.expected.xy)) && all(vec3(0.0) == _globalUniforms.expected.xyz)) && all(vec4(0.0) == _globalUniforms.expected))); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((_skTemp0 == _globalUniforms.expected.x) && all(_skTemp1 == _globalUniforms.expected.xy)) && all(_skTemp2 == _globalUniforms.expected.xyz)) && all(_skTemp3 == _globalUniforms.expected)) && (0.0 == _globalUniforms.expected.x)) && all(vec2(0.0) == _globalUniforms.expected.xy)) && all(vec3(0.0) == _globalUniforms.expected.xyz)) && all(vec4(0.0) == _globalUniforms.expected))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/intrinsics/Log2.asm.frag b/tests/sksl/intrinsics/Log2.asm.frag index 1891c2a403dc..7ef6b3fef2da 100644 --- a/tests/sksl/intrinsics/Log2.asm.frag +++ b/tests/sksl/intrinsics/Log2.asm.frag @@ -1,213 +1,213 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "inputVal" -OpMemberName %_UniformBuffer 1 "expected" -OpMemberName %_UniformBuffer 2 "colorGreen" -OpMemberName %_UniformBuffer 3 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 3 Offset 48 -OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %27 RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %80 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %89 RelaxedPrecision -OpDecorate %90 RelaxedPrecision -OpDecorate %99 RelaxedPrecision -OpDecorate %100 RelaxedPrecision -OpDecorate %109 RelaxedPrecision -OpDecorate %120 RelaxedPrecision -OpDecorate %123 RelaxedPrecision -OpDecorate %124 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "inputVal" + OpMemberName %_UniformBuffer 1 "expected" + OpMemberName %_UniformBuffer 2 "colorGreen" + OpMemberName %_UniformBuffer 3 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 3 Offset 48 + OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %27 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %80 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %89 RelaxedPrecision + OpDecorate %90 RelaxedPrecision + OpDecorate %99 RelaxedPrecision + OpDecorate %100 RelaxedPrecision + OpDecorate %109 RelaxedPrecision + OpDecorate %120 RelaxedPrecision + OpDecorate %123 RelaxedPrecision + OpDecorate %124 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%false = OpConstantFalse %bool + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%v3bool = OpTypeVector %bool 3 -%v4bool = OpTypeVector %bool 4 -%float_1 = OpConstant %float 1 -%87 = OpConstantComposite %v2float %float_0 %float_1 -%float_2 = OpConstant %float 2 -%97 = OpConstantComposite %v3float %float_0 %float_1 %float_2 -%float_3 = OpConstant %float 3 -%107 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %v3bool = OpTypeVector %bool 3 + %v4bool = OpTypeVector %bool 4 + %float_1 = OpConstant %float 1 + %87 = OpConstantComposite %v2float %float_0 %float_1 + %float_2 = OpConstant %float 2 + %97 = OpConstantComposite %v3float %float_0 %float_1 %float_2 + %float_3 = OpConstant %float 3 + %107 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_2 = OpConstant %int 2 -%int_3 = OpConstant %int 3 + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%113 = OpVariable %_ptr_Function_v4float Function -%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %28 -%33 = OpCompositeExtract %float %32 0 -%27 = OpExtInst %float %1 Log2 %33 -%34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%36 = OpLoad %v4float %34 -%37 = OpCompositeExtract %float %36 0 -%38 = OpFOrdEqual %bool %27 %37 -OpSelectionMerge %40 None -OpBranchConditional %38 %39 %40 -%39 = OpLabel -%42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%43 = OpLoad %v4float %42 -%44 = OpVectorShuffle %v2float %43 %43 0 1 -%41 = OpExtInst %v2float %1 Log2 %44 -%45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%46 = OpLoad %v4float %45 -%47 = OpVectorShuffle %v2float %46 %46 0 1 -%48 = OpFOrdEqual %v2bool %41 %47 -%50 = OpAll %bool %48 -OpBranch %40 -%40 = OpLabel -%51 = OpPhi %bool %false %25 %50 %39 -OpSelectionMerge %53 None -OpBranchConditional %51 %52 %53 -%52 = OpLabel -%55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%56 = OpLoad %v4float %55 -%57 = OpVectorShuffle %v3float %56 %56 0 1 2 -%54 = OpExtInst %v3float %1 Log2 %57 -%59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%60 = OpLoad %v4float %59 -%61 = OpVectorShuffle %v3float %60 %60 0 1 2 -%62 = OpFOrdEqual %v3bool %54 %61 -%64 = OpAll %bool %62 -OpBranch %53 -%53 = OpLabel -%65 = OpPhi %bool %false %40 %64 %52 -OpSelectionMerge %67 None -OpBranchConditional %65 %66 %67 -%66 = OpLabel -%69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%70 = OpLoad %v4float %69 -%68 = OpExtInst %v4float %1 Log2 %70 -%71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%72 = OpLoad %v4float %71 -%73 = OpFOrdEqual %v4bool %68 %72 -%75 = OpAll %bool %73 -OpBranch %67 -%67 = OpLabel -%76 = OpPhi %bool %false %53 %75 %66 -OpSelectionMerge %78 None -OpBranchConditional %76 %77 %78 -%77 = OpLabel -%79 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%80 = OpLoad %v4float %79 -%81 = OpCompositeExtract %float %80 0 -%82 = OpFOrdEqual %bool %float_0 %81 -OpBranch %78 -%78 = OpLabel -%83 = OpPhi %bool %false %67 %82 %77 -OpSelectionMerge %85 None -OpBranchConditional %83 %84 %85 -%84 = OpLabel -%88 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%89 = OpLoad %v4float %88 -%90 = OpVectorShuffle %v2float %89 %89 0 1 -%91 = OpFOrdEqual %v2bool %87 %90 -%92 = OpAll %bool %91 -OpBranch %85 -%85 = OpLabel -%93 = OpPhi %bool %false %78 %92 %84 -OpSelectionMerge %95 None -OpBranchConditional %93 %94 %95 -%94 = OpLabel -%98 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%99 = OpLoad %v4float %98 -%100 = OpVectorShuffle %v3float %99 %99 0 1 2 -%101 = OpFOrdEqual %v3bool %97 %100 -%102 = OpAll %bool %101 -OpBranch %95 -%95 = OpLabel -%103 = OpPhi %bool %false %85 %102 %94 -OpSelectionMerge %105 None -OpBranchConditional %103 %104 %105 -%104 = OpLabel -%108 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%109 = OpLoad %v4float %108 -%110 = OpFOrdEqual %v4bool %107 %109 -%111 = OpAll %bool %110 -OpBranch %105 -%105 = OpLabel -%112 = OpPhi %bool %false %95 %111 %104 -OpSelectionMerge %117 None -OpBranchConditional %112 %115 %116 -%115 = OpLabel -%118 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%120 = OpLoad %v4float %118 -OpStore %113 %120 -OpBranch %117 -%116 = OpLabel -%121 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%123 = OpLoad %v4float %121 -OpStore %113 %123 -OpBranch %117 -%117 = OpLabel -%124 = OpLoad %v4float %113 -OpReturnValue %124 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %113 = OpVariable %_ptr_Function_v4float Function + %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %28 + %33 = OpCompositeExtract %float %32 0 + %27 = OpExtInst %float %1 Log2 %33 + %34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %36 = OpLoad %v4float %34 + %37 = OpCompositeExtract %float %36 0 + %38 = OpFOrdEqual %bool %27 %37 + OpSelectionMerge %40 None + OpBranchConditional %38 %39 %40 + %39 = OpLabel + %42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %43 = OpLoad %v4float %42 + %44 = OpVectorShuffle %v2float %43 %43 0 1 + %41 = OpExtInst %v2float %1 Log2 %44 + %45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %46 = OpLoad %v4float %45 + %47 = OpVectorShuffle %v2float %46 %46 0 1 + %48 = OpFOrdEqual %v2bool %41 %47 + %50 = OpAll %bool %48 + OpBranch %40 + %40 = OpLabel + %51 = OpPhi %bool %false %25 %50 %39 + OpSelectionMerge %53 None + OpBranchConditional %51 %52 %53 + %52 = OpLabel + %55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %56 = OpLoad %v4float %55 + %57 = OpVectorShuffle %v3float %56 %56 0 1 2 + %54 = OpExtInst %v3float %1 Log2 %57 + %59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %60 = OpLoad %v4float %59 + %61 = OpVectorShuffle %v3float %60 %60 0 1 2 + %62 = OpFOrdEqual %v3bool %54 %61 + %64 = OpAll %bool %62 + OpBranch %53 + %53 = OpLabel + %65 = OpPhi %bool %false %40 %64 %52 + OpSelectionMerge %67 None + OpBranchConditional %65 %66 %67 + %66 = OpLabel + %69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %70 = OpLoad %v4float %69 + %68 = OpExtInst %v4float %1 Log2 %70 + %71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %72 = OpLoad %v4float %71 + %73 = OpFOrdEqual %v4bool %68 %72 + %75 = OpAll %bool %73 + OpBranch %67 + %67 = OpLabel + %76 = OpPhi %bool %false %53 %75 %66 + OpSelectionMerge %78 None + OpBranchConditional %76 %77 %78 + %77 = OpLabel + %79 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %80 = OpLoad %v4float %79 + %81 = OpCompositeExtract %float %80 0 + %82 = OpFOrdEqual %bool %float_0 %81 + OpBranch %78 + %78 = OpLabel + %83 = OpPhi %bool %false %67 %82 %77 + OpSelectionMerge %85 None + OpBranchConditional %83 %84 %85 + %84 = OpLabel + %88 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %89 = OpLoad %v4float %88 + %90 = OpVectorShuffle %v2float %89 %89 0 1 + %91 = OpFOrdEqual %v2bool %87 %90 + %92 = OpAll %bool %91 + OpBranch %85 + %85 = OpLabel + %93 = OpPhi %bool %false %78 %92 %84 + OpSelectionMerge %95 None + OpBranchConditional %93 %94 %95 + %94 = OpLabel + %98 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %99 = OpLoad %v4float %98 + %100 = OpVectorShuffle %v3float %99 %99 0 1 2 + %101 = OpFOrdEqual %v3bool %97 %100 + %102 = OpAll %bool %101 + OpBranch %95 + %95 = OpLabel + %103 = OpPhi %bool %false %85 %102 %94 + OpSelectionMerge %105 None + OpBranchConditional %103 %104 %105 + %104 = OpLabel + %108 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %109 = OpLoad %v4float %108 + %110 = OpFOrdEqual %v4bool %107 %109 + %111 = OpAll %bool %110 + OpBranch %105 + %105 = OpLabel + %112 = OpPhi %bool %false %95 %111 %104 + OpSelectionMerge %117 None + OpBranchConditional %112 %115 %116 + %115 = OpLabel + %118 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %120 = OpLoad %v4float %118 + OpStore %113 %120 + OpBranch %117 + %116 = OpLabel + %121 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %123 = OpLoad %v4float %121 + OpStore %113 %123 + OpBranch %117 + %117 = OpLabel + %124 = OpLoad %v4float %113 + OpReturnValue %124 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Log2.skrp b/tests/sksl/intrinsics/Log2.skrp index dac20e66c0ec..bdc6d9515fb4 100644 --- a/tests/sksl/intrinsics/Log2.skrp +++ b/tests/sksl/intrinsics/Log2.skrp @@ -1,3 +1,16 @@ +57 instructions + +[immutable slots] +i0 = 0 +i1 = 0x3F800000 (1.0) +i2 = 0 +i3 = 0x3F800000 (1.0) +i4 = 0x40000000 (2.0) +i5 = 0 +i6 = 0x3F800000 (1.0) +i7 = 0x40000000 (2.0) +i8 = 0x40400000 (3.0) + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_uniform $4 = inputVal(0) @@ -33,32 +46,26 @@ bitwise_and_int $4 &= $5 copy_uniform $5 = expected(0) cmpeq_imm_float $5 = equal($5, 0) bitwise_and_int $4 &= $5 -copy_constant $5 = 0 -copy_constant $6 = 0x3F800000 (1.0) +copy_2_immutables_unmasked $5..6 = i0..1 [0, 0x3F800000 (1.0)] copy_2_uniforms $7..8 = expected(0..1) cmpeq_2_floats $5..6 = equal($5..6, $7..8) bitwise_and_int $5 &= $6 bitwise_and_int $4 &= $5 -copy_constant $5 = 0 -copy_constant $6 = 0x3F800000 (1.0) -copy_constant $7 = 0x40000000 (2.0) +copy_3_immutables_unmasked $5..7 = i2..4 [0, 0x3F800000 (1.0), 0x40000000 (2.0)] copy_3_uniforms $8..10 = expected(0..2) cmpeq_3_floats $5..7 = equal($5..7, $8..10) bitwise_and_int $6 &= $7 bitwise_and_int $5 &= $6 bitwise_and_int $4 &= $5 -copy_constant $5 = 0 -copy_constant $6 = 0x3F800000 (1.0) -copy_constant $7 = 0x40000000 (2.0) -copy_constant $8 = 0x40400000 (3.0) +copy_4_immutables_unmasked $5..8 = i5..8 [0, 0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0)] copy_4_uniforms $9..12 = expected cmpeq_4_floats $5..8 = equal($5..8, $9..12) bitwise_and_2_ints $5..6 &= $7..8 bitwise_and_int $5 &= $6 bitwise_and_int $4 &= $5 -branch_if_no_active_lanes_eq branch +3 (label 0 at #62) if no lanes of $4 == 0xFFFFFFFF +branch_if_no_active_lanes_eq branch +3 (label 0 at #56) if no lanes of $4 == 0xFFFFFFFF copy_4_uniforms $0..3 = colorGreen -jump jump +3 (label 1 at #64) +jump jump +3 (label 1 at #58) label label 0 copy_4_uniforms $0..3 = colorRed label label 0x00000001 diff --git a/tests/sksl/intrinsics/Log2.wgsl b/tests/sksl/intrinsics/Log2.wgsl index e9813e77c2c5..238ef9db88fe 100644 --- a/tests/sksl/intrinsics/Log2.wgsl +++ b/tests/sksl/intrinsics/Log2.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -19,7 +20,7 @@ fn main(_skParam0: vec2) -> vec4 { let _skTemp1 = log2(_globalUniforms.inputVal.xy); let _skTemp2 = log2(_globalUniforms.inputVal.xyz); let _skTemp3 = log2(_globalUniforms.inputVal); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((_skTemp0 == _globalUniforms.expected.x && all(_skTemp1 == _globalUniforms.expected.xy)) && all(_skTemp2 == _globalUniforms.expected.xyz)) && all(_skTemp3 == _globalUniforms.expected)) && 0.0 == _globalUniforms.expected.x) && all(vec2(0.0, 1.0) == _globalUniforms.expected.xy)) && all(vec3(0.0, 1.0, 2.0) == _globalUniforms.expected.xyz)) && all(vec4(0.0, 1.0, 2.0, 3.0) == _globalUniforms.expected))); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((_skTemp0 == _globalUniforms.expected.x) && all(_skTemp1 == _globalUniforms.expected.xy)) && all(_skTemp2 == _globalUniforms.expected.xyz)) && all(_skTemp3 == _globalUniforms.expected)) && (0.0 == _globalUniforms.expected.x)) && all(vec2(0.0, 1.0) == _globalUniforms.expected.xy)) && all(vec3(0.0, 1.0, 2.0) == _globalUniforms.expected.xyz)) && all(vec4(0.0, 1.0, 2.0, 3.0) == _globalUniforms.expected))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/intrinsics/MatrixCompMultES2.asm.frag b/tests/sksl/intrinsics/MatrixCompMultES2.asm.frag index 11dfb30ed2b2..9749ac76c160 100644 --- a/tests/sksl/intrinsics/MatrixCompMultES2.asm.frag +++ b/tests/sksl/intrinsics/MatrixCompMultES2.asm.frag @@ -1,193 +1,211 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpMemberName %_UniformBuffer 2 "testMatrix2x2" -OpMemberName %_UniformBuffer 3 "testMatrix3x3" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %h22 "h22" -OpName %f22 "f22" -OpName %h33 "h33" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 ColMajor -OpMemberDecorate %_UniformBuffer 2 MatrixStride 16 -OpMemberDecorate %_UniformBuffer 3 Offset 64 -OpMemberDecorate %_UniformBuffer 3 ColMajor -OpMemberDecorate %_UniformBuffer 3 MatrixStride 16 -OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %h22 RelaxedPrecision -OpDecorate %h33 RelaxedPrecision -OpDecorate %59 RelaxedPrecision -OpDecorate %63 RelaxedPrecision -OpDecorate %64 RelaxedPrecision -OpDecorate %65 RelaxedPrecision -OpDecorate %66 RelaxedPrecision -OpDecorate %67 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %69 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %74 RelaxedPrecision -OpDecorate %101 RelaxedPrecision -OpDecorate %103 RelaxedPrecision -OpDecorate %106 RelaxedPrecision -OpDecorate %118 RelaxedPrecision -OpDecorate %121 RelaxedPrecision -OpDecorate %122 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpMemberName %_UniformBuffer 2 "testMatrix2x2" + OpMemberName %_UniformBuffer 3 "testMatrix3x3" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %h22 "h22" + OpName %hugeM22 "hugeM22" + OpName %f22 "f22" + OpName %h33 "h33" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 ColMajor + OpMemberDecorate %_UniformBuffer 2 MatrixStride 16 + OpMemberDecorate %_UniformBuffer 3 Offset 64 + OpMemberDecorate %_UniformBuffer 3 ColMajor + OpMemberDecorate %_UniformBuffer 3 MatrixStride 16 + OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %h22 RelaxedPrecision + OpDecorate %hugeM22 RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %h33 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %74 RelaxedPrecision + OpDecorate %75 RelaxedPrecision + OpDecorate %76 RelaxedPrecision + OpDecorate %77 RelaxedPrecision + OpDecorate %78 RelaxedPrecision + OpDecorate %79 RelaxedPrecision + OpDecorate %80 RelaxedPrecision + OpDecorate %83 RelaxedPrecision + OpDecorate %85 RelaxedPrecision + OpDecorate %112 RelaxedPrecision + OpDecorate %114 RelaxedPrecision + OpDecorate %117 RelaxedPrecision + OpDecorate %129 RelaxedPrecision + OpDecorate %132 RelaxedPrecision + OpDecorate %133 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%v2float = OpTypeVector %float 2 + %v2float = OpTypeVector %float 2 %mat2v2float = OpTypeMatrix %v2float 2 -%v3float = OpTypeVector %float 3 + %v3float = OpTypeVector %float 3 %mat3v3float = OpTypeMatrix %v3float 3 %_UniformBuffer = OpTypeStruct %v4float %v4float %mat2v2float %mat3v3float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%19 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%22 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %19 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %22 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%26 = OpTypeFunction %v4float %_ptr_Function_v2float + %26 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_mat2v2float = OpTypePointer Function %mat2v2float -%float_5 = OpConstant %float 5 -%float_10 = OpConstant %float 10 -%float_15 = OpConstant %float 15 -%34 = OpConstantComposite %v2float %float_0 %float_5 -%35 = OpConstantComposite %v2float %float_10 %float_15 -%36 = OpConstantComposite %mat2v2float %34 %35 +%float_1000000 = OpConstant %float 1000000 + %32 = OpConstantComposite %v2float %float_1000000 %float_1000000 + %33 = OpConstantComposite %mat2v2float %32 %32 +%float_1_00000002e_30 = OpConstant %float 1.00000002e+30 + %36 = OpConstantComposite %v2float %float_1_00000002e_30 %float_1_00000002e_30 + %37 = OpConstantComposite %mat2v2float %36 %36 + %float_5 = OpConstant %float 5 + %float_10 = OpConstant %float 10 + %float_15 = OpConstant %float 15 + %45 = OpConstantComposite %v2float %float_0 %float_5 + %46 = OpConstantComposite %v2float %float_10 %float_15 + %47 = OpConstantComposite %mat2v2float %45 %46 %_ptr_Uniform_mat2v2float = OpTypePointer Uniform %mat2v2float -%int = OpTypeInt 32 1 -%int_2 = OpConstant %int 2 -%float_1 = OpConstant %float 1 -%45 = OpConstantComposite %v2float %float_1 %float_0 -%46 = OpConstantComposite %v2float %float_0 %float_1 -%47 = OpConstantComposite %mat2v2float %45 %46 + %int = OpTypeInt 32 1 + %int_2 = OpConstant %int 2 + %float_1 = OpConstant %float 1 + %56 = OpConstantComposite %v2float %float_1 %float_0 + %57 = OpConstantComposite %v2float %float_0 %float_1 + %58 = OpConstantComposite %mat2v2float %56 %57 %_ptr_Function_mat3v3float = OpTypePointer Function %mat3v3float %_ptr_Uniform_mat3v3float = OpTypePointer Uniform %mat3v3float -%int_3 = OpConstant %int 3 -%float_2 = OpConstant %float 2 -%61 = OpConstantComposite %v3float %float_2 %float_2 %float_2 -%62 = OpConstantComposite %mat3v3float %61 %61 %61 -%false = OpConstantFalse %bool -%v2bool = OpTypeVector %bool 2 -%float_4 = OpConstant %float 4 -%80 = OpConstantComposite %v2float %float_0 %float_4 -%81 = OpConstantComposite %mat2v2float %45 %80 -%float_6 = OpConstant %float 6 -%float_8 = OpConstant %float 8 -%float_12 = OpConstant %float 12 -%float_14 = OpConstant %float 14 -%float_16 = OpConstant %float 16 -%float_18 = OpConstant %float 18 -%96 = OpConstantComposite %v3float %float_2 %float_4 %float_6 -%97 = OpConstantComposite %v3float %float_8 %float_10 %float_12 -%98 = OpConstantComposite %v3float %float_14 %float_16 %float_18 -%99 = OpConstantComposite %mat3v3float %96 %97 %98 -%v3bool = OpTypeVector %bool 3 + %int_3 = OpConstant %int 3 + %float_2 = OpConstant %float 2 + %72 = OpConstantComposite %v3float %float_2 %float_2 %float_2 + %73 = OpConstantComposite %mat3v3float %72 %72 %72 + %false = OpConstantFalse %bool + %v2bool = OpTypeVector %bool 2 + %float_4 = OpConstant %float 4 + %91 = OpConstantComposite %v2float %float_0 %float_4 + %92 = OpConstantComposite %mat2v2float %56 %91 + %float_6 = OpConstant %float 6 + %float_8 = OpConstant %float 8 + %float_12 = OpConstant %float 12 + %float_14 = OpConstant %float 14 + %float_16 = OpConstant %float 16 + %float_18 = OpConstant %float 18 + %107 = OpConstantComposite %v3float %float_2 %float_4 %float_6 + %108 = OpConstantComposite %v3float %float_8 %float_10 %float_12 + %109 = OpConstantComposite %v3float %float_14 %float_16 %float_18 + %110 = OpConstantComposite %mat3v3float %107 %108 %109 + %v3bool = OpTypeVector %bool 3 %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 %_entrypoint_v = OpFunction %void None %19 -%20 = OpLabel -%23 = OpVariable %_ptr_Function_v2float Function -OpStore %23 %22 -%25 = OpFunctionCall %v4float %main %23 -OpStore %sk_FragColor %25 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %26 -%27 = OpFunctionParameter %_ptr_Function_v2float -%28 = OpLabel -%h22 = OpVariable %_ptr_Function_mat2v2float Function -%f22 = OpVariable %_ptr_Function_mat2v2float Function -%h33 = OpVariable %_ptr_Function_mat3v3float Function -%110 = OpVariable %_ptr_Function_v4float Function -OpStore %h22 %36 -%39 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2 -%43 = OpLoad %mat2v2float %39 -%48 = OpCompositeExtract %v2float %43 0 -%49 = OpFMul %v2float %48 %45 -%50 = OpCompositeExtract %v2float %43 1 -%51 = OpFMul %v2float %50 %46 -%52 = OpCompositeConstruct %mat2v2float %49 %51 -OpStore %f22 %52 -%56 = OpAccessChain %_ptr_Uniform_mat3v3float %10 %int_3 -%59 = OpLoad %mat3v3float %56 -%63 = OpCompositeExtract %v3float %59 0 -%64 = OpFMul %v3float %63 %61 -%65 = OpCompositeExtract %v3float %59 1 -%66 = OpFMul %v3float %65 %61 -%67 = OpCompositeExtract %v3float %59 2 -%68 = OpFMul %v3float %67 %61 -%69 = OpCompositeConstruct %mat3v3float %64 %66 %68 -OpStore %h33 %69 -%72 = OpFOrdEqual %v2bool %34 %34 -%73 = OpAll %bool %72 -%74 = OpFOrdEqual %v2bool %35 %35 -%75 = OpAll %bool %74 -%76 = OpLogicalAnd %bool %73 %75 -OpSelectionMerge %78 None -OpBranchConditional %76 %77 %78 -%77 = OpLabel -%82 = OpFOrdEqual %v2bool %49 %45 -%83 = OpAll %bool %82 -%84 = OpFOrdEqual %v2bool %51 %80 -%85 = OpAll %bool %84 -%86 = OpLogicalAnd %bool %83 %85 -OpBranch %78 -%78 = OpLabel -%87 = OpPhi %bool %false %28 %86 %77 -OpSelectionMerge %89 None -OpBranchConditional %87 %88 %89 -%88 = OpLabel -%101 = OpFOrdEqual %v3bool %64 %96 -%102 = OpAll %bool %101 -%103 = OpFOrdEqual %v3bool %66 %97 -%104 = OpAll %bool %103 -%105 = OpLogicalAnd %bool %102 %104 -%106 = OpFOrdEqual %v3bool %68 %98 -%107 = OpAll %bool %106 -%108 = OpLogicalAnd %bool %105 %107 -OpBranch %89 -%89 = OpLabel -%109 = OpPhi %bool %false %78 %108 %88 -OpSelectionMerge %114 None -OpBranchConditional %109 %112 %113 -%112 = OpLabel -%115 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%118 = OpLoad %v4float %115 -OpStore %110 %118 -OpBranch %114 -%113 = OpLabel -%119 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%121 = OpLoad %v4float %119 -OpStore %110 %121 -OpBranch %114 -%114 = OpLabel -%122 = OpLoad %v4float %110 -OpReturnValue %122 -OpFunctionEnd + %20 = OpLabel + %23 = OpVariable %_ptr_Function_v2float Function + OpStore %23 %22 + %25 = OpFunctionCall %v4float %main %23 + OpStore %sk_FragColor %25 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %26 + %27 = OpFunctionParameter %_ptr_Function_v2float + %28 = OpLabel + %h22 = OpVariable %_ptr_Function_mat2v2float Function + %hugeM22 = OpVariable %_ptr_Function_mat2v2float Function + %f22 = OpVariable %_ptr_Function_mat2v2float Function + %h33 = OpVariable %_ptr_Function_mat3v3float Function + %121 = OpVariable %_ptr_Function_v4float Function + OpStore %h22 %33 + OpStore %hugeM22 %37 + %39 = OpFMul %v2float %36 %36 + %40 = OpFMul %v2float %36 %36 + %41 = OpCompositeConstruct %mat2v2float %39 %40 + OpStore %h22 %41 + OpStore %h22 %47 + %50 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2 + %54 = OpLoad %mat2v2float %50 + %59 = OpCompositeExtract %v2float %54 0 + %60 = OpFMul %v2float %59 %56 + %61 = OpCompositeExtract %v2float %54 1 + %62 = OpFMul %v2float %61 %57 + %63 = OpCompositeConstruct %mat2v2float %60 %62 + OpStore %f22 %63 + %67 = OpAccessChain %_ptr_Uniform_mat3v3float %10 %int_3 + %70 = OpLoad %mat3v3float %67 + %74 = OpCompositeExtract %v3float %70 0 + %75 = OpFMul %v3float %74 %72 + %76 = OpCompositeExtract %v3float %70 1 + %77 = OpFMul %v3float %76 %72 + %78 = OpCompositeExtract %v3float %70 2 + %79 = OpFMul %v3float %78 %72 + %80 = OpCompositeConstruct %mat3v3float %75 %77 %79 + OpStore %h33 %80 + %83 = OpFOrdEqual %v2bool %45 %45 + %84 = OpAll %bool %83 + %85 = OpFOrdEqual %v2bool %46 %46 + %86 = OpAll %bool %85 + %87 = OpLogicalAnd %bool %84 %86 + OpSelectionMerge %89 None + OpBranchConditional %87 %88 %89 + %88 = OpLabel + %93 = OpFOrdEqual %v2bool %60 %56 + %94 = OpAll %bool %93 + %95 = OpFOrdEqual %v2bool %62 %91 + %96 = OpAll %bool %95 + %97 = OpLogicalAnd %bool %94 %96 + OpBranch %89 + %89 = OpLabel + %98 = OpPhi %bool %false %28 %97 %88 + OpSelectionMerge %100 None + OpBranchConditional %98 %99 %100 + %99 = OpLabel + %112 = OpFOrdEqual %v3bool %75 %107 + %113 = OpAll %bool %112 + %114 = OpFOrdEqual %v3bool %77 %108 + %115 = OpAll %bool %114 + %116 = OpLogicalAnd %bool %113 %115 + %117 = OpFOrdEqual %v3bool %79 %109 + %118 = OpAll %bool %117 + %119 = OpLogicalAnd %bool %116 %118 + OpBranch %100 + %100 = OpLabel + %120 = OpPhi %bool %false %89 %119 %99 + OpSelectionMerge %125 None + OpBranchConditional %120 %123 %124 + %123 = OpLabel + %126 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %129 = OpLoad %v4float %126 + OpStore %121 %129 + OpBranch %125 + %124 = OpLabel + %130 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %132 = OpLoad %v4float %130 + OpStore %121 %132 + OpBranch %125 + %125 = OpLabel + %133 = OpLoad %v4float %121 + OpReturnValue %133 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/MatrixCompMultES2.glsl b/tests/sksl/intrinsics/MatrixCompMultES2.glsl index f561042c1ce6..1e38bf7cfc7d 100644 --- a/tests/sksl/intrinsics/MatrixCompMultES2.glsl +++ b/tests/sksl/intrinsics/MatrixCompMultES2.glsl @@ -5,7 +5,10 @@ uniform vec4 colorRed; uniform mat2 testMatrix2x2; uniform mat3 testMatrix3x3; vec4 main() { - mat2 h22 = mat2(0.0, 5.0, 10.0, 15.0); + mat2 h22 = mat2(1000000.0, 1000000.0, 1000000.0, 1000000.0); + const mat2 hugeM22 = mat2(1e+30, 1e+30, 1e+30, 1e+30); + h22 = matrixCompMult(hugeM22, hugeM22); + h22 = mat2(0.0, 5.0, 10.0, 15.0); mat2 f22 = matrixCompMult(testMatrix2x2, mat2(1.0)); mat3 h33 = matrixCompMult(testMatrix3x3, mat3(2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0)); return (h22 == mat2(0.0, 5.0, 10.0, 15.0) && f22 == mat2(1.0, 0.0, 0.0, 4.0)) && h33 == mat3(2.0, 4.0, 6.0, 8.0, 10.0, 12.0, 14.0, 16.0, 18.0) ? colorGreen : colorRed; diff --git a/tests/sksl/intrinsics/MatrixCompMultES2.hlsl b/tests/sksl/intrinsics/MatrixCompMultES2.hlsl index 0689052e8274..becee7817645 100644 --- a/tests/sksl/intrinsics/MatrixCompMultES2.hlsl +++ b/tests/sksl/intrinsics/MatrixCompMultES2.hlsl @@ -16,42 +16,45 @@ struct SPIRV_Cross_Output float4 main(float2 _27) { - float2x2 h22 = float2x2(float2(0.0f, 5.0f), float2(10.0f, 15.0f)); - float2 _49 = _10_testMatrix2x2[0] * float2(1.0f, 0.0f); - float2 _51 = _10_testMatrix2x2[1] * float2(0.0f, 1.0f); - float2x2 f22 = float2x2(_49, _51); - float3 _64 = _10_testMatrix3x3[0] * 2.0f.xxx; - float3 _66 = _10_testMatrix3x3[1] * 2.0f.xxx; - float3 _68 = _10_testMatrix3x3[2] * 2.0f.xxx; - float3x3 h33 = float3x3(_64, _66, _68); - bool _87 = false; + float2x2 h22 = float2x2(1000000.0f.xx, 1000000.0f.xx); + float2x2 hugeM22 = float2x2(1000000015047466219876688855040.0f.xx, 1000000015047466219876688855040.0f.xx); + h22 = float2x2(1000000015047466219876688855040.0f.xx * 1000000015047466219876688855040.0f.xx, 1000000015047466219876688855040.0f.xx * 1000000015047466219876688855040.0f.xx); + h22 = float2x2(float2(0.0f, 5.0f), float2(10.0f, 15.0f)); + float2 _60 = _10_testMatrix2x2[0] * float2(1.0f, 0.0f); + float2 _62 = _10_testMatrix2x2[1] * float2(0.0f, 1.0f); + float2x2 f22 = float2x2(_60, _62); + float3 _75 = _10_testMatrix3x3[0] * 2.0f.xxx; + float3 _77 = _10_testMatrix3x3[1] * 2.0f.xxx; + float3 _79 = _10_testMatrix3x3[2] * 2.0f.xxx; + float3x3 h33 = float3x3(_75, _77, _79); + bool _98 = false; if (all(bool2(float2(0.0f, 5.0f).x == float2(0.0f, 5.0f).x, float2(0.0f, 5.0f).y == float2(0.0f, 5.0f).y)) && all(bool2(float2(10.0f, 15.0f).x == float2(10.0f, 15.0f).x, float2(10.0f, 15.0f).y == float2(10.0f, 15.0f).y))) { - _87 = all(bool2(_49.x == float2(1.0f, 0.0f).x, _49.y == float2(1.0f, 0.0f).y)) && all(bool2(_51.x == float2(0.0f, 4.0f).x, _51.y == float2(0.0f, 4.0f).y)); + _98 = all(bool2(_60.x == float2(1.0f, 0.0f).x, _60.y == float2(1.0f, 0.0f).y)) && all(bool2(_62.x == float2(0.0f, 4.0f).x, _62.y == float2(0.0f, 4.0f).y)); } else { - _87 = false; + _98 = false; } - bool _109 = false; - if (_87) + bool _120 = false; + if (_98) { - _109 = (all(bool3(_64.x == float3(2.0f, 4.0f, 6.0f).x, _64.y == float3(2.0f, 4.0f, 6.0f).y, _64.z == float3(2.0f, 4.0f, 6.0f).z)) && all(bool3(_66.x == float3(8.0f, 10.0f, 12.0f).x, _66.y == float3(8.0f, 10.0f, 12.0f).y, _66.z == float3(8.0f, 10.0f, 12.0f).z))) && all(bool3(_68.x == float3(14.0f, 16.0f, 18.0f).x, _68.y == float3(14.0f, 16.0f, 18.0f).y, _68.z == float3(14.0f, 16.0f, 18.0f).z)); + _120 = (all(bool3(_75.x == float3(2.0f, 4.0f, 6.0f).x, _75.y == float3(2.0f, 4.0f, 6.0f).y, _75.z == float3(2.0f, 4.0f, 6.0f).z)) && all(bool3(_77.x == float3(8.0f, 10.0f, 12.0f).x, _77.y == float3(8.0f, 10.0f, 12.0f).y, _77.z == float3(8.0f, 10.0f, 12.0f).z))) && all(bool3(_79.x == float3(14.0f, 16.0f, 18.0f).x, _79.y == float3(14.0f, 16.0f, 18.0f).y, _79.z == float3(14.0f, 16.0f, 18.0f).z)); } else { - _109 = false; + _120 = false; } - float4 _110 = 0.0f.xxxx; - if (_109) + float4 _121 = 0.0f.xxxx; + if (_120) { - _110 = _10_colorGreen; + _121 = _10_colorGreen; } else { - _110 = _10_colorRed; + _121 = _10_colorRed; } - return _110; + return _121; } void frag_main() diff --git a/tests/sksl/intrinsics/MatrixCompMultES2.metal b/tests/sksl/intrinsics/MatrixCompMultES2.metal index 02414f262923..e1aaff80df52 100644 --- a/tests/sksl/intrinsics/MatrixCompMultES2.metal +++ b/tests/sksl/intrinsics/MatrixCompMultES2.metal @@ -52,7 +52,10 @@ thread bool operator!=(const half3x3 left, const half3x3 right) { fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) { Outputs _out; (void)_out; - half2x2 h22 = half2x2(half2(0.0h, 5.0h), half2(10.0h, 15.0h)); + half2x2 h22 = half2x2(half2(1000000.0h, 1000000.0h), half2(1000000.0h, 1000000.0h)); + const half2x2 hugeM22 = half2x2(half2(1e+30h, 1e+30h), half2(1e+30h, 1e+30h)); + h22 = matrixCompMult(hugeM22, hugeM22); + h22 = half2x2(half2(0.0h, 5.0h), half2(10.0h, 15.0h)); float2x2 f22 = matrixCompMult(_uniforms.testMatrix2x2, float2x2(1.0)); half3x3 h33 = matrixCompMult(_uniforms.testMatrix3x3, half3x3(half3(2.0h, 2.0h, 2.0h), half3(2.0h, 2.0h, 2.0h), half3(2.0h, 2.0h, 2.0h))); _out.sk_FragColor = (h22 == half2x2(half2(0.0h, 5.0h), half2(10.0h, 15.0h)) && f22 == float2x2(float2(1.0, 0.0), float2(0.0, 4.0))) && h33 == half3x3(half3(2.0h, 4.0h, 6.0h), half3(8.0h, 10.0h, 12.0h), half3(14.0h, 16.0h, 18.0h)) ? _uniforms.colorGreen : _uniforms.colorRed; diff --git a/tests/sksl/intrinsics/MatrixCompMultES2.skrp b/tests/sksl/intrinsics/MatrixCompMultES2.skrp index 0eeee5bfff46..83ff936a8ba8 100644 --- a/tests/sksl/intrinsics/MatrixCompMultES2.skrp +++ b/tests/sksl/intrinsics/MatrixCompMultES2.skrp @@ -1,11 +1,49 @@ +52 instructions + [immutable slots] -h22(0) = 0 -h22(1) = 0x40A00000 (5.0) -h22(2) = 0x41200000 (10.0) -h22(3) = 0x41700000 (15.0) +i0 = 0x49742400 (1000000.0) +i1 = 0x49742400 (1000000.0) +i2 = 0x49742400 (1000000.0) +i3 = 0x49742400 (1000000.0) +i4 = 0x7149F2CA (1e+30) +i5 = 0x7149F2CA (1e+30) +i6 = 0x7149F2CA (1e+30) +i7 = 0x7149F2CA (1e+30) +i8 = 0 +i9 = 0x40A00000 (5.0) +i10 = 0x41200000 (10.0) +i11 = 0x41700000 (15.0) +i12 = 0x40000000 (2.0) +i13 = 0x40000000 (2.0) +i14 = 0x40000000 (2.0) +i15 = 0x40000000 (2.0) +i16 = 0x40000000 (2.0) +i17 = 0x40000000 (2.0) +i18 = 0x40000000 (2.0) +i19 = 0x40000000 (2.0) +i20 = 0x40000000 (2.0) +i21 = 0x3F800000 (1.0) +i22 = 0 +i23 = 0 +i24 = 0x40800000 (4.0) +i25 = 0x40000000 (2.0) +i26 = 0x40800000 (4.0) +i27 = 0x40C00000 (6.0) +i28 = 0x41000000 (8.0) +i29 = 0x41200000 (10.0) +i30 = 0x41400000 (12.0) +i31 = 0x41600000 (14.0) +i32 = 0x41800000 (16.0) +i33 = 0x41900000 (18.0) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true +copy_4_immutables_unmasked h22 = i0..3 [0x49742400 (1000000.0), 0x49742400 (1000000.0), 0x49742400 (1000000.0), 0x49742400 (1000000.0)] +copy_4_immutables_unmasked $0..3 = i4..7 [0x7149F2CA (1e+30), 0x7149F2CA (1e+30), 0x7149F2CA (1e+30), 0x7149F2CA (1e+30)] +copy_4_immutables_unmasked $4..7 = i4..7 [0x7149F2CA (1e+30), 0x7149F2CA (1e+30), 0x7149F2CA (1e+30), 0x7149F2CA (1e+30)] +mul_4_floats $0..3 *= $4..7 +copy_4_slots_unmasked h22 = $0..3 +copy_4_immutables_unmasked h22 = i8..11 [0, 0x40A00000 (5.0), 0x41200000 (10.0), 0x41700000 (15.0)] copy_4_uniforms $0..3 = testMatrix2x2 copy_constant $4 = 0 copy_constant $5 = 0x3F800000 (1.0) @@ -15,25 +53,20 @@ copy_4_slots_unmasked f22 = $0..3 copy_4_uniforms $0..3 = testMatrix3x3(0..3) copy_4_uniforms $4..7 = testMatrix3x3(4..7) copy_uniform $8 = testMatrix3x3(8) -splat_4_constants $9..12 = 0x40000000 (2.0) -splat_4_constants $13..16 = 0x40000000 (2.0) -copy_constant $17 = 0x40000000 (2.0) +copy_4_immutables_unmasked $9..12 = i12..15 [0x40000000 (2.0), 0x40000000 (2.0), 0x40000000 (2.0), 0x40000000 (2.0)] +copy_4_immutables_unmasked $13..16 = i16..19 [0x40000000 (2.0), 0x40000000 (2.0), 0x40000000 (2.0), 0x40000000 (2.0)] +copy_immutable_unmasked $17 = i20 [0x40000000 (2.0)] mul_n_floats $0..8 *= $9..17 copy_4_slots_unmasked h33(0..3) = $0..3 copy_4_slots_unmasked h33(4..7) = $4..7 copy_slot_unmasked h33(8) = $8 copy_4_slots_unmasked $0..3 = h22 -copy_constant $4 = 0 -copy_constant $5 = 0x40A00000 (5.0) -copy_constant $6 = 0x41200000 (10.0) -copy_constant $7 = 0x41700000 (15.0) +copy_4_immutables_unmasked $4..7 = i8..11 [0, 0x40A00000 (5.0), 0x41200000 (10.0), 0x41700000 (15.0)] cmpeq_4_floats $0..3 = equal($0..3, $4..7) bitwise_and_2_ints $0..1 &= $2..3 bitwise_and_int $0 &= $1 copy_4_slots_unmasked $1..4 = f22 -copy_constant $5 = 0x3F800000 (1.0) -splat_2_constants $6..7 = 0 -copy_constant $8 = 0x40800000 (4.0) +copy_4_immutables_unmasked $5..8 = i21..24 [0x3F800000 (1.0), 0, 0, 0x40800000 (4.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -41,15 +74,9 @@ bitwise_and_int $0 &= $1 copy_4_slots_unmasked $1..4 = h33(0..3) copy_4_slots_unmasked $5..8 = h33(4..7) copy_slot_unmasked $9 = h33(8) -copy_constant $10 = 0x40000000 (2.0) -copy_constant $11 = 0x40800000 (4.0) -copy_constant $12 = 0x40C00000 (6.0) -copy_constant $13 = 0x41000000 (8.0) -copy_constant $14 = 0x41200000 (10.0) -copy_constant $15 = 0x41400000 (12.0) -copy_constant $16 = 0x41600000 (14.0) -copy_constant $17 = 0x41800000 (16.0) -copy_constant $18 = 0x41900000 (18.0) +copy_4_immutables_unmasked $10..13 = i25..28 [0x40000000 (2.0), 0x40800000 (4.0), 0x40C00000 (6.0), 0x41000000 (8.0)] +copy_4_immutables_unmasked $14..17 = i29..32 [0x41200000 (10.0), 0x41400000 (12.0), 0x41600000 (14.0), 0x41800000 (16.0)] +copy_immutable_unmasked $18 = i33 [0x41900000 (18.0)] cmpeq_n_floats $1..9 = equal($1..9, $10..18) bitwise_and_4_ints $2..5 &= $6..9 bitwise_and_2_ints $2..3 &= $4..5 diff --git a/tests/sksl/intrinsics/MatrixCompMultES2.wgsl b/tests/sksl/intrinsics/MatrixCompMultES2.wgsl new file mode 100644 index 000000000000..81a08f7f7601 --- /dev/null +++ b/tests/sksl/intrinsics/MatrixCompMultES2.wgsl @@ -0,0 +1,41 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, + testMatrix2x2: mat2x2, + testMatrix3x3: mat3x3, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var h22: mat2x2 = mat2x2(1000000.0, 1000000.0, 1000000.0, 1000000.0); + const hugeM22: mat2x2 = mat2x2(1e+30, 1e+30, 1e+30, 1e+30); + let _skTemp0 = hugeM22; + let _skTemp1 = mat2x2(_skTemp0[0] * hugeM22[0], _skTemp0[1] * hugeM22[1]); + h22 = _skTemp1; + h22 = mat2x2(0.0, 5.0, 10.0, 15.0); + let _skTemp2 = mat2x2(1.0, 0.0, 0.0, 1.0); + let _skTemp3 = mat2x2(_globalUniforms.testMatrix2x2[0] * _skTemp2[0], _globalUniforms.testMatrix2x2[1] * _skTemp2[1]); + var f22: mat2x2 = _skTemp3; + let _skTemp4 = mat3x3(2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0); + let _skTemp5 = mat3x3(_globalUniforms.testMatrix3x3[0] * _skTemp4[0], _globalUniforms.testMatrix3x3[1] * _skTemp4[1], _globalUniforms.testMatrix3x3[2] * _skTemp4[2]); + var h33: mat3x3 = _skTemp5; + let _skTemp6 = mat2x2(0.0, 5.0, 10.0, 15.0); + let _skTemp7 = mat2x2(1.0, 0.0, 0.0, 4.0); + let _skTemp8 = mat3x3(2.0, 4.0, 6.0, 8.0, 10.0, 12.0, 14.0, 16.0, 18.0); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((all(h22[0] == _skTemp6[0]) && all(h22[1] == _skTemp6[1])) && (all(f22[0] == _skTemp7[0]) && all(f22[1] == _skTemp7[1]))) && (all(h33[0] == _skTemp8[0]) && all(h33[1] == _skTemp8[1]) && all(h33[2] == _skTemp8[2])))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/intrinsics/MatrixCompMultES3.asm.frag b/tests/sksl/intrinsics/MatrixCompMultES3.asm.frag index e38e171e3503..b1490b573915 100644 --- a/tests/sksl/intrinsics/MatrixCompMultES3.asm.frag +++ b/tests/sksl/intrinsics/MatrixCompMultES3.asm.frag @@ -1,234 +1,234 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %h24 "h24" -OpName %h42 "h42" -OpName %f43 "f43" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %h24 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %h42 RelaxedPrecision -OpDecorate %63 RelaxedPrecision -OpDecorate %65 RelaxedPrecision -OpDecorate %66 RelaxedPrecision -OpDecorate %67 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %69 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -OpDecorate %71 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %73 RelaxedPrecision -OpDecorate %74 RelaxedPrecision -OpDecorate %75 RelaxedPrecision -OpDecorate %76 RelaxedPrecision -OpDecorate %77 RelaxedPrecision -OpDecorate %78 RelaxedPrecision -OpDecorate %79 RelaxedPrecision -OpDecorate %80 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %82 RelaxedPrecision -OpDecorate %83 RelaxedPrecision -OpDecorate %104 RelaxedPrecision -OpDecorate %106 RelaxedPrecision -OpDecorate %117 RelaxedPrecision -OpDecorate %119 RelaxedPrecision -OpDecorate %122 RelaxedPrecision -OpDecorate %125 RelaxedPrecision -OpDecorate %150 RelaxedPrecision -OpDecorate %152 RelaxedPrecision -OpDecorate %153 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %h24 "h24" + OpName %h42 "h42" + OpName %f43 "f43" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %h24 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %h42 RelaxedPrecision + OpDecorate %63 RelaxedPrecision + OpDecorate %65 RelaxedPrecision + OpDecorate %66 RelaxedPrecision + OpDecorate %67 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %69 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %71 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %73 RelaxedPrecision + OpDecorate %74 RelaxedPrecision + OpDecorate %75 RelaxedPrecision + OpDecorate %76 RelaxedPrecision + OpDecorate %77 RelaxedPrecision + OpDecorate %78 RelaxedPrecision + OpDecorate %79 RelaxedPrecision + OpDecorate %80 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %82 RelaxedPrecision + OpDecorate %83 RelaxedPrecision + OpDecorate %104 RelaxedPrecision + OpDecorate %106 RelaxedPrecision + OpDecorate %117 RelaxedPrecision + OpDecorate %119 RelaxedPrecision + OpDecorate %122 RelaxedPrecision + OpDecorate %125 RelaxedPrecision + OpDecorate %150 RelaxedPrecision + OpDecorate %152 RelaxedPrecision + OpDecorate %153 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %mat2v4float = OpTypeMatrix %v4float 2 %_ptr_Function_mat2v4float = OpTypePointer Function %mat2v4float -%float_9 = OpConstant %float 9 -%31 = OpConstantComposite %v4float %float_9 %float_9 %float_9 %float_9 -%32 = OpConstantComposite %mat2v4float %31 %31 + %float_9 = OpConstant %float 9 + %31 = OpConstantComposite %v4float %float_9 %float_9 %float_9 %float_9 + %32 = OpConstantComposite %mat2v4float %31 %31 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_1 = OpConstant %int 1 -%int_0 = OpConstant %int 0 + %int = OpTypeInt 32 1 + %int_1 = OpConstant %int 1 + %int_0 = OpConstant %int 0 %mat4v2float = OpTypeMatrix %v2float 4 %_ptr_Function_mat4v2float = OpTypePointer Function %mat4v2float -%float_1 = OpConstant %float 1 -%float_2 = OpConstant %float 2 -%float_3 = OpConstant %float 3 -%float_4 = OpConstant %float 4 -%float_5 = OpConstant %float 5 -%float_6 = OpConstant %float 6 -%float_7 = OpConstant %float 7 -%float_8 = OpConstant %float 8 -%57 = OpConstantComposite %v2float %float_1 %float_2 -%58 = OpConstantComposite %v2float %float_3 %float_4 -%59 = OpConstantComposite %v2float %float_5 %float_6 -%60 = OpConstantComposite %v2float %float_7 %float_8 -%61 = OpConstantComposite %mat4v2float %57 %58 %59 %60 -%v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %float_2 = OpConstant %float 2 + %float_3 = OpConstant %float 3 + %float_4 = OpConstant %float 4 + %float_5 = OpConstant %float 5 + %float_6 = OpConstant %float 6 + %float_7 = OpConstant %float 7 + %float_8 = OpConstant %float 8 + %57 = OpConstantComposite %v2float %float_1 %float_2 + %58 = OpConstantComposite %v2float %float_3 %float_4 + %59 = OpConstantComposite %v2float %float_5 %float_6 + %60 = OpConstantComposite %v2float %float_7 %float_8 + %61 = OpConstantComposite %mat4v2float %57 %58 %59 %60 + %v3float = OpTypeVector %float 3 %mat4v3float = OpTypeMatrix %v3float 4 %_ptr_Function_mat4v3float = OpTypePointer Function %mat4v3float -%float_12 = OpConstant %float 12 -%float_22 = OpConstant %float 22 -%float_30 = OpConstant %float 30 -%float_36 = OpConstant %float 36 -%float_40 = OpConstant %float 40 -%float_42 = OpConstant %float 42 -%94 = OpConstantComposite %v3float %float_12 %float_22 %float_30 -%95 = OpConstantComposite %v3float %float_36 %float_40 %float_42 -%96 = OpConstantComposite %v3float %float_42 %float_40 %float_36 -%97 = OpConstantComposite %v3float %float_30 %float_22 %float_12 -%98 = OpConstantComposite %mat4v3float %94 %95 %96 %97 -%false = OpConstantFalse %bool -%100 = OpConstantComposite %v4float %float_9 %float_0 %float_0 %float_9 -%101 = OpConstantComposite %v4float %float_0 %float_9 %float_0 %float_9 -%102 = OpConstantComposite %mat2v4float %100 %101 -%v4bool = OpTypeVector %bool 4 -%111 = OpConstantComposite %v2float %float_1 %float_0 -%112 = OpConstantComposite %v2float %float_0 %float_4 -%113 = OpConstantComposite %v2float %float_0 %float_6 -%114 = OpConstantComposite %v2float %float_0 %float_8 -%115 = OpConstantComposite %mat4v2float %111 %112 %113 %114 -%v2bool = OpTypeVector %bool 2 -%v3bool = OpTypeVector %bool 3 + %float_12 = OpConstant %float 12 + %float_22 = OpConstant %float 22 + %float_30 = OpConstant %float 30 + %float_36 = OpConstant %float 36 + %float_40 = OpConstant %float 40 + %float_42 = OpConstant %float 42 + %94 = OpConstantComposite %v3float %float_12 %float_22 %float_30 + %95 = OpConstantComposite %v3float %float_36 %float_40 %float_42 + %96 = OpConstantComposite %v3float %float_42 %float_40 %float_36 + %97 = OpConstantComposite %v3float %float_30 %float_22 %float_12 + %98 = OpConstantComposite %mat4v3float %94 %95 %96 %97 + %false = OpConstantFalse %bool + %100 = OpConstantComposite %v4float %float_9 %float_0 %float_0 %float_9 + %101 = OpConstantComposite %v4float %float_0 %float_9 %float_0 %float_9 + %102 = OpConstantComposite %mat2v4float %100 %101 + %v4bool = OpTypeVector %bool 4 + %111 = OpConstantComposite %v2float %float_1 %float_0 + %112 = OpConstantComposite %v2float %float_0 %float_4 + %113 = OpConstantComposite %v2float %float_0 %float_6 + %114 = OpConstantComposite %v2float %float_0 %float_8 + %115 = OpConstantComposite %mat4v2float %111 %112 %113 %114 + %v2bool = OpTypeVector %bool 2 + %v3bool = OpTypeVector %bool 3 %_ptr_Function_v4float = OpTypePointer Function %v4float %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%h24 = OpVariable %_ptr_Function_mat2v4float Function -%h42 = OpVariable %_ptr_Function_mat4v2float Function -%f43 = OpVariable %_ptr_Function_mat4v3float Function -%144 = OpVariable %_ptr_Function_v4float Function -%33 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%37 = OpLoad %v4float %33 -%38 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%40 = OpLoad %v4float %38 -%41 = OpCompositeConstruct %mat2v4float %37 %40 -%42 = OpFMul %v4float %31 %37 -%43 = OpFMul %v4float %31 %40 -%44 = OpCompositeConstruct %mat2v4float %42 %43 -OpStore %h24 %44 -%62 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%63 = OpLoad %v4float %62 -%64 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%65 = OpLoad %v4float %64 -%66 = OpCompositeExtract %float %63 0 -%67 = OpCompositeExtract %float %63 1 -%68 = OpCompositeConstruct %v2float %66 %67 -%69 = OpCompositeExtract %float %63 2 -%70 = OpCompositeExtract %float %63 3 -%71 = OpCompositeConstruct %v2float %69 %70 -%72 = OpCompositeExtract %float %65 0 -%73 = OpCompositeExtract %float %65 1 -%74 = OpCompositeConstruct %v2float %72 %73 -%75 = OpCompositeExtract %float %65 2 -%76 = OpCompositeExtract %float %65 3 -%77 = OpCompositeConstruct %v2float %75 %76 -%78 = OpCompositeConstruct %mat4v2float %68 %71 %74 %77 -%79 = OpFMul %v2float %57 %68 -%80 = OpFMul %v2float %58 %71 -%81 = OpFMul %v2float %59 %74 -%82 = OpFMul %v2float %60 %77 -%83 = OpCompositeConstruct %mat4v2float %79 %80 %81 %82 -OpStore %h42 %83 -OpStore %f43 %98 -%104 = OpFOrdEqual %v4bool %42 %100 -%105 = OpAll %bool %104 -%106 = OpFOrdEqual %v4bool %43 %101 -%107 = OpAll %bool %106 -%108 = OpLogicalAnd %bool %105 %107 -OpSelectionMerge %110 None -OpBranchConditional %108 %109 %110 -%109 = OpLabel -%117 = OpFOrdEqual %v2bool %79 %111 -%118 = OpAll %bool %117 -%119 = OpFOrdEqual %v2bool %80 %112 -%120 = OpAll %bool %119 -%121 = OpLogicalAnd %bool %118 %120 -%122 = OpFOrdEqual %v2bool %81 %113 -%123 = OpAll %bool %122 -%124 = OpLogicalAnd %bool %121 %123 -%125 = OpFOrdEqual %v2bool %82 %114 -%126 = OpAll %bool %125 -%127 = OpLogicalAnd %bool %124 %126 -OpBranch %110 -%110 = OpLabel -%128 = OpPhi %bool %false %25 %127 %109 -OpSelectionMerge %130 None -OpBranchConditional %128 %129 %130 -%129 = OpLabel -%132 = OpFOrdEqual %v3bool %94 %94 -%133 = OpAll %bool %132 -%134 = OpFOrdEqual %v3bool %95 %95 -%135 = OpAll %bool %134 -%136 = OpLogicalAnd %bool %133 %135 -%137 = OpFOrdEqual %v3bool %96 %96 -%138 = OpAll %bool %137 -%139 = OpLogicalAnd %bool %136 %138 -%140 = OpFOrdEqual %v3bool %97 %97 -%141 = OpAll %bool %140 -%142 = OpLogicalAnd %bool %139 %141 -OpBranch %130 -%130 = OpLabel -%143 = OpPhi %bool %false %110 %142 %129 -OpSelectionMerge %148 None -OpBranchConditional %143 %146 %147 -%146 = OpLabel -%149 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%150 = OpLoad %v4float %149 -OpStore %144 %150 -OpBranch %148 -%147 = OpLabel -%151 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%152 = OpLoad %v4float %151 -OpStore %144 %152 -OpBranch %148 -%148 = OpLabel -%153 = OpLoad %v4float %144 -OpReturnValue %153 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %h24 = OpVariable %_ptr_Function_mat2v4float Function + %h42 = OpVariable %_ptr_Function_mat4v2float Function + %f43 = OpVariable %_ptr_Function_mat4v3float Function + %144 = OpVariable %_ptr_Function_v4float Function + %33 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %37 = OpLoad %v4float %33 + %38 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %40 = OpLoad %v4float %38 + %41 = OpCompositeConstruct %mat2v4float %37 %40 + %42 = OpFMul %v4float %31 %37 + %43 = OpFMul %v4float %31 %40 + %44 = OpCompositeConstruct %mat2v4float %42 %43 + OpStore %h24 %44 + %62 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %63 = OpLoad %v4float %62 + %64 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %65 = OpLoad %v4float %64 + %66 = OpCompositeExtract %float %63 0 + %67 = OpCompositeExtract %float %63 1 + %68 = OpCompositeConstruct %v2float %66 %67 + %69 = OpCompositeExtract %float %63 2 + %70 = OpCompositeExtract %float %63 3 + %71 = OpCompositeConstruct %v2float %69 %70 + %72 = OpCompositeExtract %float %65 0 + %73 = OpCompositeExtract %float %65 1 + %74 = OpCompositeConstruct %v2float %72 %73 + %75 = OpCompositeExtract %float %65 2 + %76 = OpCompositeExtract %float %65 3 + %77 = OpCompositeConstruct %v2float %75 %76 + %78 = OpCompositeConstruct %mat4v2float %68 %71 %74 %77 + %79 = OpFMul %v2float %57 %68 + %80 = OpFMul %v2float %58 %71 + %81 = OpFMul %v2float %59 %74 + %82 = OpFMul %v2float %60 %77 + %83 = OpCompositeConstruct %mat4v2float %79 %80 %81 %82 + OpStore %h42 %83 + OpStore %f43 %98 + %104 = OpFOrdEqual %v4bool %42 %100 + %105 = OpAll %bool %104 + %106 = OpFOrdEqual %v4bool %43 %101 + %107 = OpAll %bool %106 + %108 = OpLogicalAnd %bool %105 %107 + OpSelectionMerge %110 None + OpBranchConditional %108 %109 %110 + %109 = OpLabel + %117 = OpFOrdEqual %v2bool %79 %111 + %118 = OpAll %bool %117 + %119 = OpFOrdEqual %v2bool %80 %112 + %120 = OpAll %bool %119 + %121 = OpLogicalAnd %bool %118 %120 + %122 = OpFOrdEqual %v2bool %81 %113 + %123 = OpAll %bool %122 + %124 = OpLogicalAnd %bool %121 %123 + %125 = OpFOrdEqual %v2bool %82 %114 + %126 = OpAll %bool %125 + %127 = OpLogicalAnd %bool %124 %126 + OpBranch %110 + %110 = OpLabel + %128 = OpPhi %bool %false %25 %127 %109 + OpSelectionMerge %130 None + OpBranchConditional %128 %129 %130 + %129 = OpLabel + %132 = OpFOrdEqual %v3bool %94 %94 + %133 = OpAll %bool %132 + %134 = OpFOrdEqual %v3bool %95 %95 + %135 = OpAll %bool %134 + %136 = OpLogicalAnd %bool %133 %135 + %137 = OpFOrdEqual %v3bool %96 %96 + %138 = OpAll %bool %137 + %139 = OpLogicalAnd %bool %136 %138 + %140 = OpFOrdEqual %v3bool %97 %97 + %141 = OpAll %bool %140 + %142 = OpLogicalAnd %bool %139 %141 + OpBranch %130 + %130 = OpLabel + %143 = OpPhi %bool %false %110 %142 %129 + OpSelectionMerge %148 None + OpBranchConditional %143 %146 %147 + %146 = OpLabel + %149 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %150 = OpLoad %v4float %149 + OpStore %144 %150 + OpBranch %148 + %147 = OpLabel + %151 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %152 = OpLoad %v4float %151 + OpStore %144 %152 + OpBranch %148 + %148 = OpLabel + %153 = OpLoad %v4float %144 + OpReturnValue %153 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/MatrixCompMultES3.skrp b/tests/sksl/intrinsics/MatrixCompMultES3.skrp index 4ce6fd8e5537..a51acd8b54c1 100644 --- a/tests/sksl/intrinsics/MatrixCompMultES3.skrp +++ b/tests/sksl/intrinsics/MatrixCompMultES3.skrp @@ -1,34 +1,62 @@ +50 instructions + [immutable slots] -f43(0) = 0x41400000 (12.0) -f43(1) = 0x41B00000 (22.0) -f43(2) = 0x41F00000 (30.0) -f43(3) = 0x42100000 (36.0) -f43(4) = 0x42200000 (40.0) -f43(5) = 0x42280000 (42.0) -f43(6) = 0x42280000 (42.0) -f43(7) = 0x42200000 (40.0) -f43(8) = 0x42100000 (36.0) -f43(9) = 0x41F00000 (30.0) -f43(10) = 0x41B00000 (22.0) -f43(11) = 0x41400000 (12.0) +i0 = 0x41100000 (9.0) +i1 = 0x41100000 (9.0) +i2 = 0x41100000 (9.0) +i3 = 0x41100000 (9.0) +i4 = 0x41100000 (9.0) +i5 = 0x41100000 (9.0) +i6 = 0x41100000 (9.0) +i7 = 0x41100000 (9.0) +i8 = 0x3F800000 (1.0) +i9 = 0x40000000 (2.0) +i10 = 0x40400000 (3.0) +i11 = 0x40800000 (4.0) +i12 = 0x40A00000 (5.0) +i13 = 0x40C00000 (6.0) +i14 = 0x40E00000 (7.0) +i15 = 0x41000000 (8.0) +i16 = 0x41400000 (12.0) +i17 = 0x41B00000 (22.0) +i18 = 0x41F00000 (30.0) +i19 = 0x42100000 (36.0) +i20 = 0x42200000 (40.0) +i21 = 0x42280000 (42.0) +i22 = 0x42280000 (42.0) +i23 = 0x42200000 (40.0) +i24 = 0x42100000 (36.0) +i25 = 0x41F00000 (30.0) +i26 = 0x41B00000 (22.0) +i27 = 0x41400000 (12.0) +i28 = 0x41100000 (9.0) +i29 = 0 +i30 = 0 +i31 = 0x41100000 (9.0) +i32 = 0 +i33 = 0x41100000 (9.0) +i34 = 0 +i35 = 0x41100000 (9.0) +i36 = 0x3F800000 (1.0) +i37 = 0 +i38 = 0 +i39 = 0x40800000 (4.0) +i40 = 0 +i41 = 0x40C00000 (6.0) +i42 = 0 +i43 = 0x41000000 (8.0) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true -splat_4_constants $0..3 = 0x41100000 (9.0) -splat_4_constants $4..7 = 0x41100000 (9.0) +copy_4_immutables_unmasked $0..3 = i0..3 [0x41100000 (9.0), 0x41100000 (9.0), 0x41100000 (9.0), 0x41100000 (9.0)] +copy_4_immutables_unmasked $4..7 = i4..7 [0x41100000 (9.0), 0x41100000 (9.0), 0x41100000 (9.0), 0x41100000 (9.0)] copy_4_uniforms $8..11 = colorRed copy_4_uniforms $12..15 = colorGreen mul_n_floats $0..7 *= $8..15 copy_4_slots_unmasked h24(0..3) = $0..3 copy_4_slots_unmasked h24(4..7) = $4..7 -copy_constant $0 = 0x3F800000 (1.0) -copy_constant $1 = 0x40000000 (2.0) -copy_constant $2 = 0x40400000 (3.0) -copy_constant $3 = 0x40800000 (4.0) -copy_constant $4 = 0x40A00000 (5.0) -copy_constant $5 = 0x40C00000 (6.0) -copy_constant $6 = 0x40E00000 (7.0) -copy_constant $7 = 0x41000000 (8.0) +copy_4_immutables_unmasked $0..3 = i8..11 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked $4..7 = i12..15 [0x40A00000 (5.0), 0x40C00000 (6.0), 0x40E00000 (7.0), 0x41000000 (8.0)] copy_4_uniforms $8..11 = colorRed copy_4_uniforms $12..15 = colorGreen mul_n_floats $0..7 *= $8..15 @@ -36,45 +64,27 @@ copy_4_slots_unmasked h42(0..3) = $0..3 copy_4_slots_unmasked h42(4..7) = $4..7 copy_4_slots_unmasked $0..3 = h24(0..3) copy_4_slots_unmasked $4..7 = h24(4..7) -copy_constant $8 = 0x41100000 (9.0) -splat_2_constants $9..10 = 0 -copy_constant $11 = 0x41100000 (9.0) -copy_constant $12 = 0 -copy_constant $13 = 0x41100000 (9.0) -copy_constant $14 = 0 -copy_constant $15 = 0x41100000 (9.0) +copy_4_immutables_unmasked $8..11 = i28..31 [0x41100000 (9.0), 0, 0, 0x41100000 (9.0)] +copy_4_immutables_unmasked $12..15 = i32..35 [0, 0x41100000 (9.0), 0, 0x41100000 (9.0)] cmpeq_n_floats $0..7 = equal($0..7, $8..15) bitwise_and_4_ints $0..3 &= $4..7 bitwise_and_2_ints $0..1 &= $2..3 bitwise_and_int $0 &= $1 copy_4_slots_unmasked $1..4 = h42(0..3) copy_4_slots_unmasked $5..8 = h42(4..7) -copy_constant $9 = 0x3F800000 (1.0) -splat_2_constants $10..11 = 0 -copy_constant $12 = 0x40800000 (4.0) -copy_constant $13 = 0 -copy_constant $14 = 0x40C00000 (6.0) -copy_constant $15 = 0 -copy_constant $16 = 0x41000000 (8.0) +copy_4_immutables_unmasked $9..12 = i36..39 [0x3F800000 (1.0), 0, 0, 0x40800000 (4.0)] +copy_4_immutables_unmasked $13..16 = i40..43 [0, 0x40C00000 (6.0), 0, 0x41000000 (8.0)] cmpeq_n_floats $1..8 = equal($1..8, $9..16) bitwise_and_4_ints $1..4 &= $5..8 bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_4_slots_unmasked $1..4 = f43(0..3) -copy_4_slots_unmasked $5..8 = f43(4..7) -copy_4_slots_unmasked $9..12 = f43(8..11) -copy_constant $13 = 0x41400000 (12.0) -copy_constant $14 = 0x41B00000 (22.0) -copy_constant $15 = 0x41F00000 (30.0) -copy_constant $16 = 0x42100000 (36.0) -copy_constant $17 = 0x42200000 (40.0) -splat_2_constants $18..19 = 0x42280000 (42.0) -copy_constant $20 = 0x42200000 (40.0) -copy_constant $21 = 0x42100000 (36.0) -copy_constant $22 = 0x41F00000 (30.0) -copy_constant $23 = 0x41B00000 (22.0) -copy_constant $24 = 0x41400000 (12.0) +copy_4_immutables_unmasked $1..4 = i16..19 [0x41400000 (12.0), 0x41B00000 (22.0), 0x41F00000 (30.0), 0x42100000 (36.0)] +copy_4_immutables_unmasked $5..8 = i20..23 [0x42200000 (40.0), 0x42280000 (42.0), 0x42280000 (42.0), 0x42200000 (40.0)] +copy_4_immutables_unmasked $9..12 = i24..27 [0x42100000 (36.0), 0x41F00000 (30.0), 0x41B00000 (22.0), 0x41400000 (12.0)] +copy_4_immutables_unmasked $13..16 = i16..19 [0x41400000 (12.0), 0x41B00000 (22.0), 0x41F00000 (30.0), 0x42100000 (36.0)] +copy_4_immutables_unmasked $17..20 = i20..23 [0x42200000 (40.0), 0x42280000 (42.0), 0x42280000 (42.0), 0x42200000 (40.0)] +copy_4_immutables_unmasked $21..24 = i24..27 [0x42100000 (36.0), 0x41F00000 (30.0), 0x41B00000 (22.0), 0x41400000 (12.0)] cmpeq_n_floats $1..12 = equal($1..12, $13..24) bitwise_and_4_ints $5..8 &= $9..12 bitwise_and_4_ints $1..4 &= $5..8 diff --git a/tests/sksl/intrinsics/MatrixCompMultES3.wgsl b/tests/sksl/intrinsics/MatrixCompMultES3.wgsl new file mode 100644 index 000000000000..c7f89ffbe009 --- /dev/null +++ b/tests/sksl/intrinsics/MatrixCompMultES3.wgsl @@ -0,0 +1,36 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + let _skTemp0 = mat2x4(9.0, 9.0, 9.0, 9.0, 9.0, 9.0, 9.0, 9.0); + let _skTemp1 = mat2x4(_globalUniforms.colorRed[0], _globalUniforms.colorRed[1], _globalUniforms.colorRed[2], _globalUniforms.colorRed[3], _globalUniforms.colorGreen[0], _globalUniforms.colorGreen[1], _globalUniforms.colorGreen[2], _globalUniforms.colorGreen[3]); + let _skTemp2 = mat2x4(_skTemp0[0] * _skTemp1[0], _skTemp0[1] * _skTemp1[1]); + var h24: mat2x4 = _skTemp2; + let _skTemp3 = mat4x2(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0); + let _skTemp4 = mat4x2(_globalUniforms.colorRed[0], _globalUniforms.colorRed[1], _globalUniforms.colorRed[2], _globalUniforms.colorRed[3], _globalUniforms.colorGreen[0], _globalUniforms.colorGreen[1], _globalUniforms.colorGreen[2], _globalUniforms.colorGreen[3]); + let _skTemp5 = mat4x2(_skTemp3[0] * _skTemp4[0], _skTemp3[1] * _skTemp4[1], _skTemp3[2] * _skTemp4[2], _skTemp3[3] * _skTemp4[3]); + var h42: mat4x2 = _skTemp5; + var f43: mat4x3 = mat4x3(12.0, 22.0, 30.0, 36.0, 40.0, 42.0, 42.0, 40.0, 36.0, 30.0, 22.0, 12.0); + let _skTemp6 = mat2x4(9.0, 0.0, 0.0, 9.0, 0.0, 9.0, 0.0, 9.0); + let _skTemp7 = mat4x2(1.0, 0.0, 0.0, 4.0, 0.0, 6.0, 0.0, 8.0); + let _skTemp8 = mat4x3(12.0, 22.0, 30.0, 36.0, 40.0, 42.0, 42.0, 40.0, 36.0, 30.0, 22.0, 12.0); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((all(h24[0] == _skTemp6[0]) && all(h24[1] == _skTemp6[1])) && (all(h42[0] == _skTemp7[0]) && all(h42[1] == _skTemp7[1]) && all(h42[2] == _skTemp7[2]) && all(h42[3] == _skTemp7[3]))) && (all(f43[0] == _skTemp8[0]) && all(f43[1] == _skTemp8[1]) && all(f43[2] == _skTemp8[2]) && all(f43[3] == _skTemp8[3])))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/intrinsics/MaxFloat.asm.frag b/tests/sksl/intrinsics/MaxFloat.asm.frag index 35c9226eac53..270581796108 100644 --- a/tests/sksl/intrinsics/MaxFloat.asm.frag +++ b/tests/sksl/intrinsics/MaxFloat.asm.frag @@ -1,296 +1,296 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testInputs" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %expectedA "expectedA" -OpName %expectedB "expectedB" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %expectedA RelaxedPrecision -OpDecorate %expectedB RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %48 RelaxedPrecision -OpDecorate %49 RelaxedPrecision -OpDecorate %51 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %64 RelaxedPrecision -OpDecorate %73 RelaxedPrecision -OpDecorate %85 RelaxedPrecision -OpDecorate %92 RelaxedPrecision -OpDecorate %103 RelaxedPrecision -OpDecorate %104 RelaxedPrecision -OpDecorate %107 RelaxedPrecision -OpDecorate %108 RelaxedPrecision -OpDecorate %115 RelaxedPrecision -OpDecorate %116 RelaxedPrecision -OpDecorate %118 RelaxedPrecision -OpDecorate %119 RelaxedPrecision -OpDecorate %120 RelaxedPrecision -OpDecorate %128 RelaxedPrecision -OpDecorate %129 RelaxedPrecision -OpDecorate %131 RelaxedPrecision -OpDecorate %132 RelaxedPrecision -OpDecorate %133 RelaxedPrecision -OpDecorate %141 RelaxedPrecision -OpDecorate %143 RelaxedPrecision -OpDecorate %153 RelaxedPrecision -OpDecorate %160 RelaxedPrecision -OpDecorate %172 RelaxedPrecision -OpDecorate %175 RelaxedPrecision -OpDecorate %176 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testInputs" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %expectedA "expectedA" + OpName %expectedB "expectedB" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %expectedA RelaxedPrecision + OpDecorate %expectedB RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %48 RelaxedPrecision + OpDecorate %49 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %64 RelaxedPrecision + OpDecorate %73 RelaxedPrecision + OpDecorate %85 RelaxedPrecision + OpDecorate %92 RelaxedPrecision + OpDecorate %103 RelaxedPrecision + OpDecorate %104 RelaxedPrecision + OpDecorate %107 RelaxedPrecision + OpDecorate %108 RelaxedPrecision + OpDecorate %115 RelaxedPrecision + OpDecorate %116 RelaxedPrecision + OpDecorate %118 RelaxedPrecision + OpDecorate %119 RelaxedPrecision + OpDecorate %120 RelaxedPrecision + OpDecorate %128 RelaxedPrecision + OpDecorate %129 RelaxedPrecision + OpDecorate %131 RelaxedPrecision + OpDecorate %132 RelaxedPrecision + OpDecorate %133 RelaxedPrecision + OpDecorate %141 RelaxedPrecision + OpDecorate %143 RelaxedPrecision + OpDecorate %153 RelaxedPrecision + OpDecorate %160 RelaxedPrecision + OpDecorate %172 RelaxedPrecision + OpDecorate %175 RelaxedPrecision + OpDecorate %176 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float -%float_0_5 = OpConstant %float 0.5 -%float_0_75 = OpConstant %float 0.75 -%float_2_25 = OpConstant %float 2.25 -%31 = OpConstantComposite %v4float %float_0_5 %float_0_5 %float_0_75 %float_2_25 -%float_1 = OpConstant %float 1 -%34 = OpConstantComposite %v4float %float_0 %float_1 %float_0_75 %float_2_25 -%false = OpConstantFalse %bool + %float_0_5 = OpConstant %float 0.5 + %float_0_75 = OpConstant %float 0.75 + %float_2_25 = OpConstant %float 2.25 + %31 = OpConstantComposite %v4float %float_0_5 %float_0_5 %float_0_75 %float_2_25 + %float_1 = OpConstant %float 1 + %34 = OpConstantComposite %v4float %float_0 %float_1 %float_0_75 %float_2_25 + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%50 = OpConstantComposite %v2float %float_0_5 %float_0_5 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%63 = OpConstantComposite %v3float %float_0_5 %float_0_5 %float_0_5 -%v3bool = OpTypeVector %bool 3 -%74 = OpConstantComposite %v4float %float_0_5 %float_0_5 %float_0_5 %float_0_5 -%v4bool = OpTypeVector %bool 4 -%true = OpConstantTrue %bool -%91 = OpConstantComposite %v3float %float_0_5 %float_0_5 %float_0_75 -%int_1 = OpConstant %int 1 -%152 = OpConstantComposite %v2float %float_0 %float_1 -%159 = OpConstantComposite %v3float %float_0 %float_1 %float_0_75 -%int_2 = OpConstant %int 2 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %50 = OpConstantComposite %v2float %float_0_5 %float_0_5 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %63 = OpConstantComposite %v3float %float_0_5 %float_0_5 %float_0_5 + %v3bool = OpTypeVector %bool 3 + %74 = OpConstantComposite %v4float %float_0_5 %float_0_5 %float_0_5 %float_0_5 + %v4bool = OpTypeVector %bool 4 + %true = OpConstantTrue %bool + %91 = OpConstantComposite %v3float %float_0_5 %float_0_5 %float_0_75 + %int_1 = OpConstant %int 1 + %152 = OpConstantComposite %v2float %float_0 %float_1 + %159 = OpConstantComposite %v3float %float_0 %float_1 %float_0_75 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%expectedA = OpVariable %_ptr_Function_v4float Function -%expectedB = OpVariable %_ptr_Function_v4float Function -%167 = OpVariable %_ptr_Function_v4float Function -OpStore %expectedA %31 -OpStore %expectedB %34 -%37 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%41 = OpLoad %v4float %37 -%42 = OpCompositeExtract %float %41 0 -%36 = OpExtInst %float %1 FMax %42 %float_0_5 -%43 = OpFOrdEqual %bool %36 %float_0_5 -OpSelectionMerge %45 None -OpBranchConditional %43 %44 %45 -%44 = OpLabel -%47 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%48 = OpLoad %v4float %47 -%49 = OpVectorShuffle %v2float %48 %48 0 1 -%46 = OpExtInst %v2float %1 FMax %49 %50 -%51 = OpVectorShuffle %v2float %31 %31 0 1 -%52 = OpFOrdEqual %v2bool %46 %51 -%54 = OpAll %bool %52 -OpBranch %45 -%45 = OpLabel -%55 = OpPhi %bool %false %25 %54 %44 -OpSelectionMerge %57 None -OpBranchConditional %55 %56 %57 -%56 = OpLabel -%59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%60 = OpLoad %v4float %59 -%61 = OpVectorShuffle %v3float %60 %60 0 1 2 -%58 = OpExtInst %v3float %1 FMax %61 %63 -%64 = OpVectorShuffle %v3float %31 %31 0 1 2 -%65 = OpFOrdEqual %v3bool %58 %64 -%67 = OpAll %bool %65 -OpBranch %57 -%57 = OpLabel -%68 = OpPhi %bool %false %45 %67 %56 -OpSelectionMerge %70 None -OpBranchConditional %68 %69 %70 -%69 = OpLabel -%72 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%73 = OpLoad %v4float %72 -%71 = OpExtInst %v4float %1 FMax %73 %74 -%75 = OpFOrdEqual %v4bool %71 %31 -%77 = OpAll %bool %75 -OpBranch %70 -%70 = OpLabel -%78 = OpPhi %bool %false %57 %77 %69 -OpSelectionMerge %80 None -OpBranchConditional %78 %79 %80 -%79 = OpLabel -OpBranch %80 -%80 = OpLabel -%82 = OpPhi %bool %false %70 %true %79 -OpSelectionMerge %84 None -OpBranchConditional %82 %83 %84 -%83 = OpLabel -%85 = OpVectorShuffle %v2float %31 %31 0 1 -%86 = OpFOrdEqual %v2bool %50 %85 -%87 = OpAll %bool %86 -OpBranch %84 -%84 = OpLabel -%88 = OpPhi %bool %false %80 %87 %83 -OpSelectionMerge %90 None -OpBranchConditional %88 %89 %90 -%89 = OpLabel -%92 = OpVectorShuffle %v3float %31 %31 0 1 2 -%93 = OpFOrdEqual %v3bool %91 %92 -%94 = OpAll %bool %93 -OpBranch %90 -%90 = OpLabel -%95 = OpPhi %bool %false %84 %94 %89 -OpSelectionMerge %97 None -OpBranchConditional %95 %96 %97 -%96 = OpLabel -OpBranch %97 -%97 = OpLabel -%98 = OpPhi %bool %false %90 %true %96 -OpSelectionMerge %100 None -OpBranchConditional %98 %99 %100 -%99 = OpLabel -%102 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%103 = OpLoad %v4float %102 -%104 = OpCompositeExtract %float %103 0 -%105 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%107 = OpLoad %v4float %105 -%108 = OpCompositeExtract %float %107 0 -%101 = OpExtInst %float %1 FMax %104 %108 -%109 = OpFOrdEqual %bool %101 %float_0 -OpBranch %100 -%100 = OpLabel -%110 = OpPhi %bool %false %97 %109 %99 -OpSelectionMerge %112 None -OpBranchConditional %110 %111 %112 -%111 = OpLabel -%114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%115 = OpLoad %v4float %114 -%116 = OpVectorShuffle %v2float %115 %115 0 1 -%117 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%118 = OpLoad %v4float %117 -%119 = OpVectorShuffle %v2float %118 %118 0 1 -%113 = OpExtInst %v2float %1 FMax %116 %119 -%120 = OpVectorShuffle %v2float %34 %34 0 1 -%121 = OpFOrdEqual %v2bool %113 %120 -%122 = OpAll %bool %121 -OpBranch %112 -%112 = OpLabel -%123 = OpPhi %bool %false %100 %122 %111 -OpSelectionMerge %125 None -OpBranchConditional %123 %124 %125 -%124 = OpLabel -%127 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%128 = OpLoad %v4float %127 -%129 = OpVectorShuffle %v3float %128 %128 0 1 2 -%130 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%131 = OpLoad %v4float %130 -%132 = OpVectorShuffle %v3float %131 %131 0 1 2 -%126 = OpExtInst %v3float %1 FMax %129 %132 -%133 = OpVectorShuffle %v3float %34 %34 0 1 2 -%134 = OpFOrdEqual %v3bool %126 %133 -%135 = OpAll %bool %134 -OpBranch %125 -%125 = OpLabel -%136 = OpPhi %bool %false %112 %135 %124 -OpSelectionMerge %138 None -OpBranchConditional %136 %137 %138 -%137 = OpLabel -%140 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%141 = OpLoad %v4float %140 -%142 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%143 = OpLoad %v4float %142 -%139 = OpExtInst %v4float %1 FMax %141 %143 -%144 = OpFOrdEqual %v4bool %139 %34 -%145 = OpAll %bool %144 -OpBranch %138 -%138 = OpLabel -%146 = OpPhi %bool %false %125 %145 %137 -OpSelectionMerge %148 None -OpBranchConditional %146 %147 %148 -%147 = OpLabel -OpBranch %148 -%148 = OpLabel -%149 = OpPhi %bool %false %138 %true %147 -OpSelectionMerge %151 None -OpBranchConditional %149 %150 %151 -%150 = OpLabel -%153 = OpVectorShuffle %v2float %34 %34 0 1 -%154 = OpFOrdEqual %v2bool %152 %153 -%155 = OpAll %bool %154 -OpBranch %151 -%151 = OpLabel -%156 = OpPhi %bool %false %148 %155 %150 -OpSelectionMerge %158 None -OpBranchConditional %156 %157 %158 -%157 = OpLabel -%160 = OpVectorShuffle %v3float %34 %34 0 1 2 -%161 = OpFOrdEqual %v3bool %159 %160 -%162 = OpAll %bool %161 -OpBranch %158 -%158 = OpLabel -%163 = OpPhi %bool %false %151 %162 %157 -OpSelectionMerge %165 None -OpBranchConditional %163 %164 %165 -%164 = OpLabel -OpBranch %165 -%165 = OpLabel -%166 = OpPhi %bool %false %158 %true %164 -OpSelectionMerge %170 None -OpBranchConditional %166 %168 %169 -%168 = OpLabel -%171 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%172 = OpLoad %v4float %171 -OpStore %167 %172 -OpBranch %170 -%169 = OpLabel -%173 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%175 = OpLoad %v4float %173 -OpStore %167 %175 -OpBranch %170 -%170 = OpLabel -%176 = OpLoad %v4float %167 -OpReturnValue %176 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %expectedA = OpVariable %_ptr_Function_v4float Function + %expectedB = OpVariable %_ptr_Function_v4float Function + %167 = OpVariable %_ptr_Function_v4float Function + OpStore %expectedA %31 + OpStore %expectedB %34 + %37 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %41 = OpLoad %v4float %37 + %42 = OpCompositeExtract %float %41 0 + %36 = OpExtInst %float %1 FMax %42 %float_0_5 + %43 = OpFOrdEqual %bool %36 %float_0_5 + OpSelectionMerge %45 None + OpBranchConditional %43 %44 %45 + %44 = OpLabel + %47 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %48 = OpLoad %v4float %47 + %49 = OpVectorShuffle %v2float %48 %48 0 1 + %46 = OpExtInst %v2float %1 FMax %49 %50 + %51 = OpVectorShuffle %v2float %31 %31 0 1 + %52 = OpFOrdEqual %v2bool %46 %51 + %54 = OpAll %bool %52 + OpBranch %45 + %45 = OpLabel + %55 = OpPhi %bool %false %25 %54 %44 + OpSelectionMerge %57 None + OpBranchConditional %55 %56 %57 + %56 = OpLabel + %59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %60 = OpLoad %v4float %59 + %61 = OpVectorShuffle %v3float %60 %60 0 1 2 + %58 = OpExtInst %v3float %1 FMax %61 %63 + %64 = OpVectorShuffle %v3float %31 %31 0 1 2 + %65 = OpFOrdEqual %v3bool %58 %64 + %67 = OpAll %bool %65 + OpBranch %57 + %57 = OpLabel + %68 = OpPhi %bool %false %45 %67 %56 + OpSelectionMerge %70 None + OpBranchConditional %68 %69 %70 + %69 = OpLabel + %72 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %73 = OpLoad %v4float %72 + %71 = OpExtInst %v4float %1 FMax %73 %74 + %75 = OpFOrdEqual %v4bool %71 %31 + %77 = OpAll %bool %75 + OpBranch %70 + %70 = OpLabel + %78 = OpPhi %bool %false %57 %77 %69 + OpSelectionMerge %80 None + OpBranchConditional %78 %79 %80 + %79 = OpLabel + OpBranch %80 + %80 = OpLabel + %82 = OpPhi %bool %false %70 %true %79 + OpSelectionMerge %84 None + OpBranchConditional %82 %83 %84 + %83 = OpLabel + %85 = OpVectorShuffle %v2float %31 %31 0 1 + %86 = OpFOrdEqual %v2bool %50 %85 + %87 = OpAll %bool %86 + OpBranch %84 + %84 = OpLabel + %88 = OpPhi %bool %false %80 %87 %83 + OpSelectionMerge %90 None + OpBranchConditional %88 %89 %90 + %89 = OpLabel + %92 = OpVectorShuffle %v3float %31 %31 0 1 2 + %93 = OpFOrdEqual %v3bool %91 %92 + %94 = OpAll %bool %93 + OpBranch %90 + %90 = OpLabel + %95 = OpPhi %bool %false %84 %94 %89 + OpSelectionMerge %97 None + OpBranchConditional %95 %96 %97 + %96 = OpLabel + OpBranch %97 + %97 = OpLabel + %98 = OpPhi %bool %false %90 %true %96 + OpSelectionMerge %100 None + OpBranchConditional %98 %99 %100 + %99 = OpLabel + %102 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %103 = OpLoad %v4float %102 + %104 = OpCompositeExtract %float %103 0 + %105 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %107 = OpLoad %v4float %105 + %108 = OpCompositeExtract %float %107 0 + %101 = OpExtInst %float %1 FMax %104 %108 + %109 = OpFOrdEqual %bool %101 %float_0 + OpBranch %100 + %100 = OpLabel + %110 = OpPhi %bool %false %97 %109 %99 + OpSelectionMerge %112 None + OpBranchConditional %110 %111 %112 + %111 = OpLabel + %114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %115 = OpLoad %v4float %114 + %116 = OpVectorShuffle %v2float %115 %115 0 1 + %117 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %118 = OpLoad %v4float %117 + %119 = OpVectorShuffle %v2float %118 %118 0 1 + %113 = OpExtInst %v2float %1 FMax %116 %119 + %120 = OpVectorShuffle %v2float %34 %34 0 1 + %121 = OpFOrdEqual %v2bool %113 %120 + %122 = OpAll %bool %121 + OpBranch %112 + %112 = OpLabel + %123 = OpPhi %bool %false %100 %122 %111 + OpSelectionMerge %125 None + OpBranchConditional %123 %124 %125 + %124 = OpLabel + %127 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %128 = OpLoad %v4float %127 + %129 = OpVectorShuffle %v3float %128 %128 0 1 2 + %130 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %131 = OpLoad %v4float %130 + %132 = OpVectorShuffle %v3float %131 %131 0 1 2 + %126 = OpExtInst %v3float %1 FMax %129 %132 + %133 = OpVectorShuffle %v3float %34 %34 0 1 2 + %134 = OpFOrdEqual %v3bool %126 %133 + %135 = OpAll %bool %134 + OpBranch %125 + %125 = OpLabel + %136 = OpPhi %bool %false %112 %135 %124 + OpSelectionMerge %138 None + OpBranchConditional %136 %137 %138 + %137 = OpLabel + %140 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %141 = OpLoad %v4float %140 + %142 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %143 = OpLoad %v4float %142 + %139 = OpExtInst %v4float %1 FMax %141 %143 + %144 = OpFOrdEqual %v4bool %139 %34 + %145 = OpAll %bool %144 + OpBranch %138 + %138 = OpLabel + %146 = OpPhi %bool %false %125 %145 %137 + OpSelectionMerge %148 None + OpBranchConditional %146 %147 %148 + %147 = OpLabel + OpBranch %148 + %148 = OpLabel + %149 = OpPhi %bool %false %138 %true %147 + OpSelectionMerge %151 None + OpBranchConditional %149 %150 %151 + %150 = OpLabel + %153 = OpVectorShuffle %v2float %34 %34 0 1 + %154 = OpFOrdEqual %v2bool %152 %153 + %155 = OpAll %bool %154 + OpBranch %151 + %151 = OpLabel + %156 = OpPhi %bool %false %148 %155 %150 + OpSelectionMerge %158 None + OpBranchConditional %156 %157 %158 + %157 = OpLabel + %160 = OpVectorShuffle %v3float %34 %34 0 1 2 + %161 = OpFOrdEqual %v3bool %159 %160 + %162 = OpAll %bool %161 + OpBranch %158 + %158 = OpLabel + %163 = OpPhi %bool %false %151 %162 %157 + OpSelectionMerge %165 None + OpBranchConditional %163 %164 %165 + %164 = OpLabel + OpBranch %165 + %165 = OpLabel + %166 = OpPhi %bool %false %158 %true %164 + OpSelectionMerge %170 None + OpBranchConditional %166 %168 %169 + %168 = OpLabel + %171 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %172 = OpLoad %v4float %171 + OpStore %167 %172 + OpBranch %170 + %169 = OpLabel + %173 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %175 = OpLoad %v4float %173 + OpStore %167 %175 + OpBranch %170 + %170 = OpLabel + %176 = OpLoad %v4float %167 + OpReturnValue %176 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/MaxFloat.skrp b/tests/sksl/intrinsics/MaxFloat.skrp index 64432fd3d700..6146dcedd670 100644 --- a/tests/sksl/intrinsics/MaxFloat.skrp +++ b/tests/sksl/intrinsics/MaxFloat.skrp @@ -1,30 +1,31 @@ +101 instructions + [immutable slots] -expectedA(0) = 0x3F000000 (0.5) -expectedA(1) = 0x3F000000 (0.5) -expectedA(2) = 0x3F400000 (0.75) -expectedA(3) = 0x40100000 (2.25) -expectedB(0) = 0 -expectedB(1) = 0x3F800000 (1.0) -expectedB(2) = 0x3F400000 (0.75) -expectedB(3) = 0x40100000 (2.25) +i0 = 0x3F000000 (0.5) +i1 = 0x3F000000 (0.5) +i2 = 0x3F400000 (0.75) +i3 = 0x40100000 (2.25) +i4 = 0 +i5 = 0x3F800000 (1.0) +i6 = 0x3F400000 (0.75) +i7 = 0x40100000 (2.25) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_uniform $0 = testInputs(0) max_imm_float $0 = max($0, 0x3F000000 (0.5)) -copy_slot_unmasked $1 = expectedA(0) -cmpeq_float $0 = equal($0, $1) +cmpeq_imm_float $0 = equal($0, 0x3F000000 (0.5)) copy_2_uniforms $1..2 = testInputs(0..1) splat_2_constants $3..4 = 0x3F000000 (0.5) max_2_floats $1..2 = max($1..2, $3..4) -copy_2_slots_unmasked $3..4 = expectedA(0..1) +copy_2_immutables_unmasked $3..4 = i0..1 [0x3F000000 (0.5), 0x3F000000 (0.5)] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_3_uniforms $1..3 = testInputs(0..2) splat_3_constants $4..6 = 0x3F000000 (0.5) max_3_floats $1..3 = max($1..3, $4..6) -copy_3_slots_unmasked $4..6 = expectedA(0..2) +copy_3_immutables_unmasked $4..6 = i0..2 [0x3F000000 (0.5), 0x3F000000 (0.5), 0x3F400000 (0.75)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 @@ -32,30 +33,27 @@ bitwise_and_int $0 &= $1 copy_4_uniforms $1..4 = testInputs splat_4_constants $5..8 = 0x3F000000 (0.5) max_4_floats $1..4 = max($1..4, $5..8) -copy_4_slots_unmasked $5..8 = expectedA +copy_4_immutables_unmasked $5..8 = i0..3 [0x3F000000 (0.5), 0x3F000000 (0.5), 0x3F400000 (0.75), 0x40100000 (2.25)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expectedA(0) +copy_constant $1 = 0x3F000000 (0.5) cmpeq_imm_float $1 = equal($1, 0x3F000000 (0.5)) bitwise_and_int $0 &= $1 splat_2_constants $1..2 = 0x3F000000 (0.5) -copy_2_slots_unmasked $3..4 = expectedA(0..1) +copy_2_immutables_unmasked $3..4 = i0..1 [0x3F000000 (0.5), 0x3F000000 (0.5)] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -splat_2_constants $1..2 = 0x3F000000 (0.5) -copy_constant $3 = 0x3F400000 (0.75) -copy_3_slots_unmasked $4..6 = expectedA(0..2) +copy_3_immutables_unmasked $1..3 = i0..2 [0x3F000000 (0.5), 0x3F000000 (0.5), 0x3F400000 (0.75)] +copy_3_immutables_unmasked $4..6 = i0..2 [0x3F000000 (0.5), 0x3F000000 (0.5), 0x3F400000 (0.75)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -splat_2_constants $1..2 = 0x3F000000 (0.5) -copy_constant $3 = 0x3F400000 (0.75) -copy_constant $4 = 0x40100000 (2.25) -copy_4_slots_unmasked $5..8 = expectedA +copy_4_immutables_unmasked $1..4 = i0..3 [0x3F000000 (0.5), 0x3F000000 (0.5), 0x3F400000 (0.75), 0x40100000 (2.25)] +copy_4_immutables_unmasked $5..8 = i0..3 [0x3F000000 (0.5), 0x3F000000 (0.5), 0x3F400000 (0.75), 0x40100000 (2.25)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -63,20 +61,19 @@ bitwise_and_int $0 &= $1 copy_uniform $1 = testInputs(0) copy_uniform $2 = colorGreen(0) max_float $1 = max($1, $2) -copy_slot_unmasked $2 = expectedB(0) -cmpeq_float $1 = equal($1, $2) +cmpeq_imm_float $1 = equal($1, 0) bitwise_and_int $0 &= $1 copy_2_uniforms $1..2 = testInputs(0..1) copy_2_uniforms $3..4 = colorGreen(0..1) max_2_floats $1..2 = max($1..2, $3..4) -copy_2_slots_unmasked $3..4 = expectedB(0..1) +copy_2_immutables_unmasked $3..4 = i4..5 [0, 0x3F800000 (1.0)] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_3_uniforms $1..3 = testInputs(0..2) copy_3_uniforms $4..6 = colorGreen(0..2) max_3_floats $1..3 = max($1..3, $4..6) -copy_3_slots_unmasked $4..6 = expectedB(0..2) +copy_3_immutables_unmasked $4..6 = i4..6 [0, 0x3F800000 (1.0), 0x3F400000 (0.75)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 @@ -84,33 +81,27 @@ bitwise_and_int $0 &= $1 copy_4_uniforms $1..4 = testInputs copy_4_uniforms $5..8 = colorGreen max_4_floats $1..4 = max($1..4, $5..8) -copy_4_slots_unmasked $5..8 = expectedB +copy_4_immutables_unmasked $5..8 = i4..7 [0, 0x3F800000 (1.0), 0x3F400000 (0.75), 0x40100000 (2.25)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expectedB(0) +copy_constant $1 = 0 cmpeq_imm_float $1 = equal($1, 0) bitwise_and_int $0 &= $1 -copy_constant $1 = 0 -copy_constant $2 = 0x3F800000 (1.0) -copy_2_slots_unmasked $3..4 = expectedB(0..1) +copy_2_immutables_unmasked $1..2 = i4..5 [0, 0x3F800000 (1.0)] +copy_2_immutables_unmasked $3..4 = i4..5 [0, 0x3F800000 (1.0)] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0 -copy_constant $2 = 0x3F800000 (1.0) -copy_constant $3 = 0x3F400000 (0.75) -copy_3_slots_unmasked $4..6 = expectedB(0..2) +copy_3_immutables_unmasked $1..3 = i4..6 [0, 0x3F800000 (1.0), 0x3F400000 (0.75)] +copy_3_immutables_unmasked $4..6 = i4..6 [0, 0x3F800000 (1.0), 0x3F400000 (0.75)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0 -copy_constant $2 = 0x3F800000 (1.0) -copy_constant $3 = 0x3F400000 (0.75) -copy_constant $4 = 0x40100000 (2.25) -copy_4_slots_unmasked $5..8 = expectedB +copy_4_immutables_unmasked $1..4 = i4..7 [0, 0x3F800000 (1.0), 0x3F400000 (0.75), 0x40100000 (2.25)] +copy_4_immutables_unmasked $5..8 = i4..7 [0, 0x3F800000 (1.0), 0x3F400000 (0.75), 0x40100000 (2.25)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 diff --git a/tests/sksl/intrinsics/MaxFloat.wgsl b/tests/sksl/intrinsics/MaxFloat.wgsl index 52501e78595c..40b4651980ee 100644 --- a/tests/sksl/intrinsics/MaxFloat.wgsl +++ b/tests/sksl/intrinsics/MaxFloat.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -24,7 +25,7 @@ fn main(_skParam0: vec2) -> vec4 { let _skTemp5 = max(_globalUniforms.testInputs.xy, _globalUniforms.colorGreen.xy); let _skTemp6 = max(_globalUniforms.testInputs.xyz, _globalUniforms.colorGreen.xyz); let _skTemp7 = max(_globalUniforms.testInputs, _globalUniforms.colorGreen); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((((((((((_skTemp0 == expectedA.x && all(_skTemp1 == expectedA.xy)) && all(_skTemp2 == expectedA.xyz)) && all(_skTemp3 == expectedA)) && 0.5 == expectedA.x) && all(vec2(0.5) == expectedA.xy)) && all(vec3(0.5, 0.5, 0.75) == expectedA.xyz)) && all(vec4(0.5, 0.5, 0.75, 2.25) == expectedA)) && _skTemp4 == expectedB.x) && all(_skTemp5 == expectedB.xy)) && all(_skTemp6 == expectedB.xyz)) && all(_skTemp7 == expectedB)) && 0.0 == expectedB.x) && all(vec2(0.0, 1.0) == expectedB.xy)) && all(vec3(0.0, 1.0, 0.75) == expectedB.xyz)) && all(vec4(0.0, 1.0, 0.75, 2.25) == expectedB))); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((((((((((_skTemp0 == expectedA.x) && all(_skTemp1 == expectedA.xy)) && all(_skTemp2 == expectedA.xyz)) && all(_skTemp3 == expectedA)) && (0.5 == expectedA.x)) && all(vec2(0.5) == expectedA.xy)) && all(vec3(0.5, 0.5, 0.75) == expectedA.xyz)) && all(vec4(0.5, 0.5, 0.75, 2.25) == expectedA)) && (_skTemp4 == expectedB.x)) && all(_skTemp5 == expectedB.xy)) && all(_skTemp6 == expectedB.xyz)) && all(_skTemp7 == expectedB)) && (0.0 == expectedB.x)) && all(vec2(0.0, 1.0) == expectedB.xy)) && all(vec3(0.0, 1.0, 0.75) == expectedB.xyz)) && all(vec4(0.0, 1.0, 0.75, 2.25) == expectedB))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/intrinsics/MaxInt.asm.frag b/tests/sksl/intrinsics/MaxInt.asm.frag index 9b9e09358ecc..860b11ad012e 100644 --- a/tests/sksl/intrinsics/MaxInt.asm.frag +++ b/tests/sksl/intrinsics/MaxInt.asm.frag @@ -1,286 +1,286 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testInputs" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %intValues "intValues" -OpName %intGreen "intGreen" -OpName %expectedA "expectedA" -OpName %expectedB "expectedB" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %33 RelaxedPrecision -OpDecorate %35 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %48 RelaxedPrecision -OpDecorate %49 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %177 RelaxedPrecision -OpDecorate %180 RelaxedPrecision -OpDecorate %181 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testInputs" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %intValues "intValues" + OpName %intGreen "intGreen" + OpName %expectedA "expectedA" + OpName %expectedB "expectedB" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %33 RelaxedPrecision + OpDecorate %35 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %48 RelaxedPrecision + OpDecorate %49 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %177 RelaxedPrecision + OpDecorate %180 RelaxedPrecision + OpDecorate %181 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%int = OpTypeInt 32 1 -%v4int = OpTypeVector %int 4 + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %int = OpTypeInt 32 1 + %v4int = OpTypeVector %int 4 %_ptr_Function_v4int = OpTypePointer Function %v4int %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_0 = OpConstant %int 0 -%float_100 = OpConstant %float 100 -%int_1 = OpConstant %int 1 -%int_50 = OpConstant %int 50 -%int_75 = OpConstant %int 75 -%int_225 = OpConstant %int 225 -%63 = OpConstantComposite %v4int %int_50 %int_50 %int_75 %int_225 -%int_100 = OpConstant %int 100 -%66 = OpConstantComposite %v4int %int_0 %int_100 %int_75 %int_225 -%false = OpConstantFalse %bool -%v2int = OpTypeVector %int 2 -%76 = OpConstantComposite %v2int %int_50 %int_50 -%v2bool = OpTypeVector %bool 2 -%v3int = OpTypeVector %int 3 -%87 = OpConstantComposite %v3int %int_50 %int_50 %int_50 -%v3bool = OpTypeVector %bool 3 -%96 = OpConstantComposite %v4int %int_50 %int_50 %int_50 %int_50 -%v4bool = OpTypeVector %bool 4 -%true = OpConstantTrue %bool -%113 = OpConstantComposite %v3int %int_50 %int_50 %int_75 -%156 = OpConstantComposite %v2int %int_0 %int_100 -%163 = OpConstantComposite %v3int %int_0 %int_100 %int_75 + %int_0 = OpConstant %int 0 + %float_100 = OpConstant %float 100 + %int_1 = OpConstant %int 1 + %int_50 = OpConstant %int 50 + %int_75 = OpConstant %int 75 + %int_225 = OpConstant %int 225 + %63 = OpConstantComposite %v4int %int_50 %int_50 %int_75 %int_225 + %int_100 = OpConstant %int 100 + %66 = OpConstantComposite %v4int %int_0 %int_100 %int_75 %int_225 + %false = OpConstantFalse %bool + %v2int = OpTypeVector %int 2 + %76 = OpConstantComposite %v2int %int_50 %int_50 + %v2bool = OpTypeVector %bool 2 + %v3int = OpTypeVector %int 3 + %87 = OpConstantComposite %v3int %int_50 %int_50 %int_50 + %v3bool = OpTypeVector %bool 3 + %96 = OpConstantComposite %v4int %int_50 %int_50 %int_50 %int_50 + %v4bool = OpTypeVector %bool 4 + %true = OpConstantTrue %bool + %113 = OpConstantComposite %v3int %int_50 %int_50 %int_75 + %156 = OpConstantComposite %v2int %int_0 %int_100 + %163 = OpConstantComposite %v3int %int_0 %int_100 %int_75 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_2 = OpConstant %int 2 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%intValues = OpVariable %_ptr_Function_v4int Function -%intGreen = OpVariable %_ptr_Function_v4int Function -%expectedA = OpVariable %_ptr_Function_v4int Function -%expectedB = OpVariable %_ptr_Function_v4int Function -%171 = OpVariable %_ptr_Function_v4float Function -%30 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%33 = OpLoad %v4float %30 -%35 = OpVectorTimesScalar %v4float %33 %float_100 -%36 = OpCompositeExtract %float %35 0 -%37 = OpConvertFToS %int %36 -%38 = OpCompositeExtract %float %35 1 -%39 = OpConvertFToS %int %38 -%40 = OpCompositeExtract %float %35 2 -%41 = OpConvertFToS %int %40 -%42 = OpCompositeExtract %float %35 3 -%43 = OpConvertFToS %int %42 -%44 = OpCompositeConstruct %v4int %37 %39 %41 %43 -OpStore %intValues %44 -%46 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%48 = OpLoad %v4float %46 -%49 = OpVectorTimesScalar %v4float %48 %float_100 -%50 = OpCompositeExtract %float %49 0 -%51 = OpConvertFToS %int %50 -%52 = OpCompositeExtract %float %49 1 -%53 = OpConvertFToS %int %52 -%54 = OpCompositeExtract %float %49 2 -%55 = OpConvertFToS %int %54 -%56 = OpCompositeExtract %float %49 3 -%57 = OpConvertFToS %int %56 -%58 = OpCompositeConstruct %v4int %51 %53 %55 %57 -OpStore %intGreen %58 -OpStore %expectedA %63 -OpStore %expectedB %66 -%69 = OpCompositeExtract %int %44 0 -%68 = OpExtInst %int %1 SMax %69 %int_50 -%70 = OpIEqual %bool %68 %int_50 -OpSelectionMerge %72 None -OpBranchConditional %70 %71 %72 -%71 = OpLabel -%74 = OpVectorShuffle %v2int %44 %44 0 1 -%73 = OpExtInst %v2int %1 SMax %74 %76 -%77 = OpVectorShuffle %v2int %63 %63 0 1 -%78 = OpIEqual %v2bool %73 %77 -%80 = OpAll %bool %78 -OpBranch %72 -%72 = OpLabel -%81 = OpPhi %bool %false %25 %80 %71 -OpSelectionMerge %83 None -OpBranchConditional %81 %82 %83 -%82 = OpLabel -%85 = OpVectorShuffle %v3int %44 %44 0 1 2 -%84 = OpExtInst %v3int %1 SMax %85 %87 -%88 = OpVectorShuffle %v3int %63 %63 0 1 2 -%89 = OpIEqual %v3bool %84 %88 -%91 = OpAll %bool %89 -OpBranch %83 -%83 = OpLabel -%92 = OpPhi %bool %false %72 %91 %82 -OpSelectionMerge %94 None -OpBranchConditional %92 %93 %94 -%93 = OpLabel -%95 = OpExtInst %v4int %1 SMax %44 %96 -%97 = OpIEqual %v4bool %95 %63 -%99 = OpAll %bool %97 -OpBranch %94 -%94 = OpLabel -%100 = OpPhi %bool %false %83 %99 %93 -OpSelectionMerge %102 None -OpBranchConditional %100 %101 %102 -%101 = OpLabel -OpBranch %102 -%102 = OpLabel -%104 = OpPhi %bool %false %94 %true %101 -OpSelectionMerge %106 None -OpBranchConditional %104 %105 %106 -%105 = OpLabel -%107 = OpVectorShuffle %v2int %63 %63 0 1 -%108 = OpIEqual %v2bool %76 %107 -%109 = OpAll %bool %108 -OpBranch %106 -%106 = OpLabel -%110 = OpPhi %bool %false %102 %109 %105 -OpSelectionMerge %112 None -OpBranchConditional %110 %111 %112 -%111 = OpLabel -%114 = OpVectorShuffle %v3int %63 %63 0 1 2 -%115 = OpIEqual %v3bool %113 %114 -%116 = OpAll %bool %115 -OpBranch %112 -%112 = OpLabel -%117 = OpPhi %bool %false %106 %116 %111 -OpSelectionMerge %119 None -OpBranchConditional %117 %118 %119 -%118 = OpLabel -OpBranch %119 -%119 = OpLabel -%120 = OpPhi %bool %false %112 %true %118 -OpSelectionMerge %122 None -OpBranchConditional %120 %121 %122 -%121 = OpLabel -%124 = OpCompositeExtract %int %58 0 -%123 = OpExtInst %int %1 SMax %69 %124 -%125 = OpIEqual %bool %123 %int_0 -OpBranch %122 -%122 = OpLabel -%126 = OpPhi %bool %false %119 %125 %121 -OpSelectionMerge %128 None -OpBranchConditional %126 %127 %128 -%127 = OpLabel -%130 = OpVectorShuffle %v2int %44 %44 0 1 -%131 = OpVectorShuffle %v2int %58 %58 0 1 -%129 = OpExtInst %v2int %1 SMax %130 %131 -%132 = OpVectorShuffle %v2int %66 %66 0 1 -%133 = OpIEqual %v2bool %129 %132 -%134 = OpAll %bool %133 -OpBranch %128 -%128 = OpLabel -%135 = OpPhi %bool %false %122 %134 %127 -OpSelectionMerge %137 None -OpBranchConditional %135 %136 %137 -%136 = OpLabel -%139 = OpVectorShuffle %v3int %44 %44 0 1 2 -%140 = OpVectorShuffle %v3int %58 %58 0 1 2 -%138 = OpExtInst %v3int %1 SMax %139 %140 -%141 = OpVectorShuffle %v3int %66 %66 0 1 2 -%142 = OpIEqual %v3bool %138 %141 -%143 = OpAll %bool %142 -OpBranch %137 -%137 = OpLabel -%144 = OpPhi %bool %false %128 %143 %136 -OpSelectionMerge %146 None -OpBranchConditional %144 %145 %146 -%145 = OpLabel -%147 = OpExtInst %v4int %1 SMax %44 %58 -%148 = OpIEqual %v4bool %147 %66 -%149 = OpAll %bool %148 -OpBranch %146 -%146 = OpLabel -%150 = OpPhi %bool %false %137 %149 %145 -OpSelectionMerge %152 None -OpBranchConditional %150 %151 %152 -%151 = OpLabel -OpBranch %152 -%152 = OpLabel -%153 = OpPhi %bool %false %146 %true %151 -OpSelectionMerge %155 None -OpBranchConditional %153 %154 %155 -%154 = OpLabel -%157 = OpVectorShuffle %v2int %66 %66 0 1 -%158 = OpIEqual %v2bool %156 %157 -%159 = OpAll %bool %158 -OpBranch %155 -%155 = OpLabel -%160 = OpPhi %bool %false %152 %159 %154 -OpSelectionMerge %162 None -OpBranchConditional %160 %161 %162 -%161 = OpLabel -%164 = OpVectorShuffle %v3int %66 %66 0 1 2 -%165 = OpIEqual %v3bool %163 %164 -%166 = OpAll %bool %165 -OpBranch %162 -%162 = OpLabel -%167 = OpPhi %bool %false %155 %166 %161 -OpSelectionMerge %169 None -OpBranchConditional %167 %168 %169 -%168 = OpLabel -OpBranch %169 -%169 = OpLabel -%170 = OpPhi %bool %false %162 %true %168 -OpSelectionMerge %175 None -OpBranchConditional %170 %173 %174 -%173 = OpLabel -%176 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%177 = OpLoad %v4float %176 -OpStore %171 %177 -OpBranch %175 -%174 = OpLabel -%178 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%180 = OpLoad %v4float %178 -OpStore %171 %180 -OpBranch %175 -%175 = OpLabel -%181 = OpLoad %v4float %171 -OpReturnValue %181 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %intValues = OpVariable %_ptr_Function_v4int Function + %intGreen = OpVariable %_ptr_Function_v4int Function + %expectedA = OpVariable %_ptr_Function_v4int Function + %expectedB = OpVariable %_ptr_Function_v4int Function + %171 = OpVariable %_ptr_Function_v4float Function + %30 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %33 = OpLoad %v4float %30 + %35 = OpVectorTimesScalar %v4float %33 %float_100 + %36 = OpCompositeExtract %float %35 0 + %37 = OpConvertFToS %int %36 + %38 = OpCompositeExtract %float %35 1 + %39 = OpConvertFToS %int %38 + %40 = OpCompositeExtract %float %35 2 + %41 = OpConvertFToS %int %40 + %42 = OpCompositeExtract %float %35 3 + %43 = OpConvertFToS %int %42 + %44 = OpCompositeConstruct %v4int %37 %39 %41 %43 + OpStore %intValues %44 + %46 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %48 = OpLoad %v4float %46 + %49 = OpVectorTimesScalar %v4float %48 %float_100 + %50 = OpCompositeExtract %float %49 0 + %51 = OpConvertFToS %int %50 + %52 = OpCompositeExtract %float %49 1 + %53 = OpConvertFToS %int %52 + %54 = OpCompositeExtract %float %49 2 + %55 = OpConvertFToS %int %54 + %56 = OpCompositeExtract %float %49 3 + %57 = OpConvertFToS %int %56 + %58 = OpCompositeConstruct %v4int %51 %53 %55 %57 + OpStore %intGreen %58 + OpStore %expectedA %63 + OpStore %expectedB %66 + %69 = OpCompositeExtract %int %44 0 + %68 = OpExtInst %int %1 SMax %69 %int_50 + %70 = OpIEqual %bool %68 %int_50 + OpSelectionMerge %72 None + OpBranchConditional %70 %71 %72 + %71 = OpLabel + %74 = OpVectorShuffle %v2int %44 %44 0 1 + %73 = OpExtInst %v2int %1 SMax %74 %76 + %77 = OpVectorShuffle %v2int %63 %63 0 1 + %78 = OpIEqual %v2bool %73 %77 + %80 = OpAll %bool %78 + OpBranch %72 + %72 = OpLabel + %81 = OpPhi %bool %false %25 %80 %71 + OpSelectionMerge %83 None + OpBranchConditional %81 %82 %83 + %82 = OpLabel + %85 = OpVectorShuffle %v3int %44 %44 0 1 2 + %84 = OpExtInst %v3int %1 SMax %85 %87 + %88 = OpVectorShuffle %v3int %63 %63 0 1 2 + %89 = OpIEqual %v3bool %84 %88 + %91 = OpAll %bool %89 + OpBranch %83 + %83 = OpLabel + %92 = OpPhi %bool %false %72 %91 %82 + OpSelectionMerge %94 None + OpBranchConditional %92 %93 %94 + %93 = OpLabel + %95 = OpExtInst %v4int %1 SMax %44 %96 + %97 = OpIEqual %v4bool %95 %63 + %99 = OpAll %bool %97 + OpBranch %94 + %94 = OpLabel + %100 = OpPhi %bool %false %83 %99 %93 + OpSelectionMerge %102 None + OpBranchConditional %100 %101 %102 + %101 = OpLabel + OpBranch %102 + %102 = OpLabel + %104 = OpPhi %bool %false %94 %true %101 + OpSelectionMerge %106 None + OpBranchConditional %104 %105 %106 + %105 = OpLabel + %107 = OpVectorShuffle %v2int %63 %63 0 1 + %108 = OpIEqual %v2bool %76 %107 + %109 = OpAll %bool %108 + OpBranch %106 + %106 = OpLabel + %110 = OpPhi %bool %false %102 %109 %105 + OpSelectionMerge %112 None + OpBranchConditional %110 %111 %112 + %111 = OpLabel + %114 = OpVectorShuffle %v3int %63 %63 0 1 2 + %115 = OpIEqual %v3bool %113 %114 + %116 = OpAll %bool %115 + OpBranch %112 + %112 = OpLabel + %117 = OpPhi %bool %false %106 %116 %111 + OpSelectionMerge %119 None + OpBranchConditional %117 %118 %119 + %118 = OpLabel + OpBranch %119 + %119 = OpLabel + %120 = OpPhi %bool %false %112 %true %118 + OpSelectionMerge %122 None + OpBranchConditional %120 %121 %122 + %121 = OpLabel + %124 = OpCompositeExtract %int %58 0 + %123 = OpExtInst %int %1 SMax %69 %124 + %125 = OpIEqual %bool %123 %int_0 + OpBranch %122 + %122 = OpLabel + %126 = OpPhi %bool %false %119 %125 %121 + OpSelectionMerge %128 None + OpBranchConditional %126 %127 %128 + %127 = OpLabel + %130 = OpVectorShuffle %v2int %44 %44 0 1 + %131 = OpVectorShuffle %v2int %58 %58 0 1 + %129 = OpExtInst %v2int %1 SMax %130 %131 + %132 = OpVectorShuffle %v2int %66 %66 0 1 + %133 = OpIEqual %v2bool %129 %132 + %134 = OpAll %bool %133 + OpBranch %128 + %128 = OpLabel + %135 = OpPhi %bool %false %122 %134 %127 + OpSelectionMerge %137 None + OpBranchConditional %135 %136 %137 + %136 = OpLabel + %139 = OpVectorShuffle %v3int %44 %44 0 1 2 + %140 = OpVectorShuffle %v3int %58 %58 0 1 2 + %138 = OpExtInst %v3int %1 SMax %139 %140 + %141 = OpVectorShuffle %v3int %66 %66 0 1 2 + %142 = OpIEqual %v3bool %138 %141 + %143 = OpAll %bool %142 + OpBranch %137 + %137 = OpLabel + %144 = OpPhi %bool %false %128 %143 %136 + OpSelectionMerge %146 None + OpBranchConditional %144 %145 %146 + %145 = OpLabel + %147 = OpExtInst %v4int %1 SMax %44 %58 + %148 = OpIEqual %v4bool %147 %66 + %149 = OpAll %bool %148 + OpBranch %146 + %146 = OpLabel + %150 = OpPhi %bool %false %137 %149 %145 + OpSelectionMerge %152 None + OpBranchConditional %150 %151 %152 + %151 = OpLabel + OpBranch %152 + %152 = OpLabel + %153 = OpPhi %bool %false %146 %true %151 + OpSelectionMerge %155 None + OpBranchConditional %153 %154 %155 + %154 = OpLabel + %157 = OpVectorShuffle %v2int %66 %66 0 1 + %158 = OpIEqual %v2bool %156 %157 + %159 = OpAll %bool %158 + OpBranch %155 + %155 = OpLabel + %160 = OpPhi %bool %false %152 %159 %154 + OpSelectionMerge %162 None + OpBranchConditional %160 %161 %162 + %161 = OpLabel + %164 = OpVectorShuffle %v3int %66 %66 0 1 2 + %165 = OpIEqual %v3bool %163 %164 + %166 = OpAll %bool %165 + OpBranch %162 + %162 = OpLabel + %167 = OpPhi %bool %false %155 %166 %161 + OpSelectionMerge %169 None + OpBranchConditional %167 %168 %169 + %168 = OpLabel + OpBranch %169 + %169 = OpLabel + %170 = OpPhi %bool %false %162 %true %168 + OpSelectionMerge %175 None + OpBranchConditional %170 %173 %174 + %173 = OpLabel + %176 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %177 = OpLoad %v4float %176 + OpStore %171 %177 + OpBranch %175 + %174 = OpLabel + %178 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %180 = OpLoad %v4float %178 + OpStore %171 %180 + OpBranch %175 + %175 = OpLabel + %181 = OpLoad %v4float %171 + OpReturnValue %181 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/MaxInt.skrp b/tests/sksl/intrinsics/MaxInt.skrp index c7dd0b82bdf4..5759faab6ce8 100644 --- a/tests/sksl/intrinsics/MaxInt.skrp +++ b/tests/sksl/intrinsics/MaxInt.skrp @@ -1,12 +1,14 @@ +112 instructions + [immutable slots] -expectedA(0) = 0x00000032 (7.006492e-44) -expectedA(1) = 0x00000032 (7.006492e-44) -expectedA(2) = 0x0000004B (1.050974e-43) -expectedA(3) = 0x000000E1 (3.152922e-43) -expectedB(0) = 0 -expectedB(1) = 0x00000064 (1.401298e-43) -expectedB(2) = 0x0000004B (1.050974e-43) -expectedB(3) = 0x000000E1 (3.152922e-43) +i0 = 0x00000032 (7.006492e-44) +i1 = 0x00000032 (7.006492e-44) +i2 = 0x0000004B (1.050974e-43) +i3 = 0x000000E1 (3.152922e-43) +i4 = 0 +i5 = 0x00000064 (1.401298e-43) +i6 = 0x0000004B (1.050974e-43) +i7 = 0x000000E1 (3.152922e-43) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -23,19 +25,18 @@ copy_4_slots_unmasked intGreen = $0..3 copy_slot_unmasked $0 = intValues(0) copy_constant $1 = 0x00000032 (7.006492e-44) max_int $0 = max($0, $1) -copy_slot_unmasked $1 = expectedA(0) -cmpeq_int $0 = equal($0, $1) +cmpeq_imm_int $0 = equal($0, 0x00000032) copy_2_slots_unmasked $1..2 = intValues(0..1) splat_2_constants $3..4 = 0x00000032 (7.006492e-44) max_2_ints $1..2 = max($1..2, $3..4) -copy_2_slots_unmasked $3..4 = expectedA(0..1) +copy_2_immutables_unmasked $3..4 = i0..1 [0x00000032 (7.006492e-44), 0x00000032 (7.006492e-44)] cmpeq_2_ints $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_3_slots_unmasked $1..3 = intValues(0..2) splat_3_constants $4..6 = 0x00000032 (7.006492e-44) max_3_ints $1..3 = max($1..3, $4..6) -copy_3_slots_unmasked $4..6 = expectedA(0..2) +copy_3_immutables_unmasked $4..6 = i0..2 [0x00000032 (7.006492e-44), 0x00000032 (7.006492e-44), 0x0000004B (1.050974e-43)] cmpeq_3_ints $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 @@ -43,30 +44,27 @@ bitwise_and_int $0 &= $1 copy_4_slots_unmasked $1..4 = intValues splat_4_constants $5..8 = 0x00000032 (7.006492e-44) max_4_ints $1..4 = max($1..4, $5..8) -copy_4_slots_unmasked $5..8 = expectedA +copy_4_immutables_unmasked $5..8 = i0..3 [0x00000032 (7.006492e-44), 0x00000032 (7.006492e-44), 0x0000004B (1.050974e-43), 0x000000E1 (3.152922e-43)] cmpeq_4_ints $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expectedA(0) +copy_constant $1 = 0x00000032 (7.006492e-44) cmpeq_imm_int $1 = equal($1, 0x00000032) bitwise_and_int $0 &= $1 splat_2_constants $1..2 = 0x00000032 (7.006492e-44) -copy_2_slots_unmasked $3..4 = expectedA(0..1) +copy_2_immutables_unmasked $3..4 = i0..1 [0x00000032 (7.006492e-44), 0x00000032 (7.006492e-44)] cmpeq_2_ints $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -splat_2_constants $1..2 = 0x00000032 (7.006492e-44) -copy_constant $3 = 0x0000004B (1.050974e-43) -copy_3_slots_unmasked $4..6 = expectedA(0..2) +copy_3_immutables_unmasked $1..3 = i0..2 [0x00000032 (7.006492e-44), 0x00000032 (7.006492e-44), 0x0000004B (1.050974e-43)] +copy_3_immutables_unmasked $4..6 = i0..2 [0x00000032 (7.006492e-44), 0x00000032 (7.006492e-44), 0x0000004B (1.050974e-43)] cmpeq_3_ints $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -splat_2_constants $1..2 = 0x00000032 (7.006492e-44) -copy_constant $3 = 0x0000004B (1.050974e-43) -copy_constant $4 = 0x000000E1 (3.152922e-43) -copy_4_slots_unmasked $5..8 = expectedA +copy_4_immutables_unmasked $1..4 = i0..3 [0x00000032 (7.006492e-44), 0x00000032 (7.006492e-44), 0x0000004B (1.050974e-43), 0x000000E1 (3.152922e-43)] +copy_4_immutables_unmasked $5..8 = i0..3 [0x00000032 (7.006492e-44), 0x00000032 (7.006492e-44), 0x0000004B (1.050974e-43), 0x000000E1 (3.152922e-43)] cmpeq_4_ints $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -74,20 +72,19 @@ bitwise_and_int $0 &= $1 copy_slot_unmasked $1 = intValues(0) copy_slot_unmasked $2 = intGreen(0) max_int $1 = max($1, $2) -copy_slot_unmasked $2 = expectedB(0) -cmpeq_int $1 = equal($1, $2) +cmpeq_imm_int $1 = equal($1, 0) bitwise_and_int $0 &= $1 copy_2_slots_unmasked $1..2 = intValues(0..1) copy_2_slots_unmasked $3..4 = intGreen(0..1) max_2_ints $1..2 = max($1..2, $3..4) -copy_2_slots_unmasked $3..4 = expectedB(0..1) +copy_2_immutables_unmasked $3..4 = i4..5 [0, 0x00000064 (1.401298e-43)] cmpeq_2_ints $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_3_slots_unmasked $1..3 = intValues(0..2) copy_3_slots_unmasked $4..6 = intGreen(0..2) max_3_ints $1..3 = max($1..3, $4..6) -copy_3_slots_unmasked $4..6 = expectedB(0..2) +copy_3_immutables_unmasked $4..6 = i4..6 [0, 0x00000064 (1.401298e-43), 0x0000004B (1.050974e-43)] cmpeq_3_ints $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 @@ -95,33 +92,27 @@ bitwise_and_int $0 &= $1 copy_4_slots_unmasked $1..4 = intValues copy_4_slots_unmasked $5..8 = intGreen max_4_ints $1..4 = max($1..4, $5..8) -copy_4_slots_unmasked $5..8 = expectedB +copy_4_immutables_unmasked $5..8 = i4..7 [0, 0x00000064 (1.401298e-43), 0x0000004B (1.050974e-43), 0x000000E1 (3.152922e-43)] cmpeq_4_ints $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expectedB(0) +copy_constant $1 = 0 cmpeq_imm_int $1 = equal($1, 0) bitwise_and_int $0 &= $1 -copy_constant $1 = 0 -copy_constant $2 = 0x00000064 (1.401298e-43) -copy_2_slots_unmasked $3..4 = expectedB(0..1) +copy_2_immutables_unmasked $1..2 = i4..5 [0, 0x00000064 (1.401298e-43)] +copy_2_immutables_unmasked $3..4 = i4..5 [0, 0x00000064 (1.401298e-43)] cmpeq_2_ints $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0 -copy_constant $2 = 0x00000064 (1.401298e-43) -copy_constant $3 = 0x0000004B (1.050974e-43) -copy_3_slots_unmasked $4..6 = expectedB(0..2) +copy_3_immutables_unmasked $1..3 = i4..6 [0, 0x00000064 (1.401298e-43), 0x0000004B (1.050974e-43)] +copy_3_immutables_unmasked $4..6 = i4..6 [0, 0x00000064 (1.401298e-43), 0x0000004B (1.050974e-43)] cmpeq_3_ints $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0 -copy_constant $2 = 0x00000064 (1.401298e-43) -copy_constant $3 = 0x0000004B (1.050974e-43) -copy_constant $4 = 0x000000E1 (3.152922e-43) -copy_4_slots_unmasked $5..8 = expectedB +copy_4_immutables_unmasked $1..4 = i4..7 [0, 0x00000064 (1.401298e-43), 0x0000004B (1.050974e-43), 0x000000E1 (3.152922e-43)] +copy_4_immutables_unmasked $5..8 = i4..7 [0, 0x00000064 (1.401298e-43), 0x0000004B (1.050974e-43), 0x000000E1 (3.152922e-43)] cmpeq_4_ints $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 diff --git a/tests/sksl/intrinsics/MaxInt.wgsl b/tests/sksl/intrinsics/MaxInt.wgsl index bb6673180ad0..441ad2d29865 100644 --- a/tests/sksl/intrinsics/MaxInt.wgsl +++ b/tests/sksl/intrinsics/MaxInt.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -26,7 +27,7 @@ fn main(_skParam0: vec2) -> vec4 { let _skTemp5 = max(intValues.xy, intGreen.xy); let _skTemp6 = max(intValues.xyz, intGreen.xyz); let _skTemp7 = max(intValues, intGreen); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((((((((((_skTemp0 == expectedA.x && all(_skTemp1 == expectedA.xy)) && all(_skTemp2 == expectedA.xyz)) && all(_skTemp3 == expectedA)) && 50 == expectedA.x) && all(vec2(50) == expectedA.xy)) && all(vec3(50, 50, 75) == expectedA.xyz)) && all(vec4(50, 50, 75, 225) == expectedA)) && _skTemp4 == expectedB.x) && all(_skTemp5 == expectedB.xy)) && all(_skTemp6 == expectedB.xyz)) && all(_skTemp7 == expectedB)) && 0 == expectedB.x) && all(vec2(0, 100) == expectedB.xy)) && all(vec3(0, 100, 75) == expectedB.xyz)) && all(vec4(0, 100, 75, 225) == expectedB))); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((((((((((_skTemp0 == expectedA.x) && all(_skTemp1 == expectedA.xy)) && all(_skTemp2 == expectedA.xyz)) && all(_skTemp3 == expectedA)) && (50 == expectedA.x)) && all(vec2(50) == expectedA.xy)) && all(vec3(50, 50, 75) == expectedA.xyz)) && all(vec4(50, 50, 75, 225) == expectedA)) && (_skTemp4 == expectedB.x)) && all(_skTemp5 == expectedB.xy)) && all(_skTemp6 == expectedB.xyz)) && all(_skTemp7 == expectedB)) && (0 == expectedB.x)) && all(vec2(0, 100) == expectedB.xy)) && all(vec3(0, 100, 75) == expectedB.xyz)) && all(vec4(0, 100, 75, 225) == expectedB))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/intrinsics/MaxUint.asm.frag b/tests/sksl/intrinsics/MaxUint.asm.frag index d694030e0e9f..d5499cae955c 100644 --- a/tests/sksl/intrinsics/MaxUint.asm.frag +++ b/tests/sksl/intrinsics/MaxUint.asm.frag @@ -1,291 +1,291 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testInputs" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %uintValues "uintValues" -OpName %uintGreen "uintGreen" -OpName %expectedA "expectedA" -OpName %expectedB "expectedB" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %30 RelaxedPrecision -OpDecorate %35 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %51 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %58 RelaxedPrecision -OpDecorate %181 RelaxedPrecision -OpDecorate %184 RelaxedPrecision -OpDecorate %185 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testInputs" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %uintValues "uintValues" + OpName %uintGreen "uintGreen" + OpName %expectedA "expectedA" + OpName %expectedB "expectedB" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %30 RelaxedPrecision + OpDecorate %35 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %58 RelaxedPrecision + OpDecorate %181 RelaxedPrecision + OpDecorate %184 RelaxedPrecision + OpDecorate %185 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%uint = OpTypeInt 32 0 -%v4uint = OpTypeVector %uint 4 + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %uint = OpTypeInt 32 0 + %v4uint = OpTypeVector %uint 4 %_ptr_Function_v4uint = OpTypePointer Function %v4uint %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%float_100 = OpConstant %float 100 -%int_1 = OpConstant %int 1 -%uint_125 = OpConstant %uint 125 -%uint_80 = OpConstant %uint 80 -%uint_225 = OpConstant %uint 225 -%65 = OpConstantComposite %v4uint %uint_125 %uint_80 %uint_80 %uint_225 -%uint_100 = OpConstant %uint 100 -%uint_75 = OpConstant %uint 75 -%69 = OpConstantComposite %v4uint %uint_125 %uint_100 %uint_75 %uint_225 -%false = OpConstantFalse %bool -%v2uint = OpTypeVector %uint 2 -%79 = OpConstantComposite %v2uint %uint_80 %uint_80 -%v2bool = OpTypeVector %bool 2 -%v3uint = OpTypeVector %uint 3 -%90 = OpConstantComposite %v3uint %uint_80 %uint_80 %uint_80 -%v3bool = OpTypeVector %bool 3 -%99 = OpConstantComposite %v4uint %uint_80 %uint_80 %uint_80 %uint_80 -%v4bool = OpTypeVector %bool 4 -%true = OpConstantTrue %bool -%110 = OpConstantComposite %v2uint %uint_125 %uint_80 -%117 = OpConstantComposite %v3uint %uint_125 %uint_80 %uint_80 -%160 = OpConstantComposite %v2uint %uint_125 %uint_100 -%167 = OpConstantComposite %v3uint %uint_125 %uint_100 %uint_75 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %float_100 = OpConstant %float 100 + %int_1 = OpConstant %int 1 + %uint_125 = OpConstant %uint 125 + %uint_80 = OpConstant %uint 80 + %uint_225 = OpConstant %uint 225 + %65 = OpConstantComposite %v4uint %uint_125 %uint_80 %uint_80 %uint_225 + %uint_100 = OpConstant %uint 100 + %uint_75 = OpConstant %uint 75 + %69 = OpConstantComposite %v4uint %uint_125 %uint_100 %uint_75 %uint_225 + %false = OpConstantFalse %bool + %v2uint = OpTypeVector %uint 2 + %79 = OpConstantComposite %v2uint %uint_80 %uint_80 + %v2bool = OpTypeVector %bool 2 + %v3uint = OpTypeVector %uint 3 + %90 = OpConstantComposite %v3uint %uint_80 %uint_80 %uint_80 + %v3bool = OpTypeVector %bool 3 + %99 = OpConstantComposite %v4uint %uint_80 %uint_80 %uint_80 %uint_80 + %v4bool = OpTypeVector %bool 4 + %true = OpConstantTrue %bool + %110 = OpConstantComposite %v2uint %uint_125 %uint_80 + %117 = OpConstantComposite %v3uint %uint_125 %uint_80 %uint_80 + %160 = OpConstantComposite %v2uint %uint_125 %uint_100 + %167 = OpConstantComposite %v3uint %uint_125 %uint_100 %uint_75 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_2 = OpConstant %int 2 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%uintValues = OpVariable %_ptr_Function_v4uint Function -%uintGreen = OpVariable %_ptr_Function_v4uint Function -%expectedA = OpVariable %_ptr_Function_v4uint Function -%expectedB = OpVariable %_ptr_Function_v4uint Function -%175 = OpVariable %_ptr_Function_v4float Function -%31 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%35 = OpLoad %v4float %31 -%30 = OpExtInst %v4float %1 FAbs %35 -%37 = OpVectorTimesScalar %v4float %30 %float_100 -%38 = OpCompositeExtract %float %37 0 -%39 = OpConvertFToU %uint %38 -%40 = OpCompositeExtract %float %37 1 -%41 = OpConvertFToU %uint %40 -%42 = OpCompositeExtract %float %37 2 -%43 = OpConvertFToU %uint %42 -%44 = OpCompositeExtract %float %37 3 -%45 = OpConvertFToU %uint %44 -%46 = OpCompositeConstruct %v4uint %39 %41 %43 %45 -OpStore %uintValues %46 -%48 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%50 = OpLoad %v4float %48 -%51 = OpVectorTimesScalar %v4float %50 %float_100 -%52 = OpCompositeExtract %float %51 0 -%53 = OpConvertFToU %uint %52 -%54 = OpCompositeExtract %float %51 1 -%55 = OpConvertFToU %uint %54 -%56 = OpCompositeExtract %float %51 2 -%57 = OpConvertFToU %uint %56 -%58 = OpCompositeExtract %float %51 3 -%59 = OpConvertFToU %uint %58 -%60 = OpCompositeConstruct %v4uint %53 %55 %57 %59 -OpStore %uintGreen %60 -OpStore %expectedA %65 -OpStore %expectedB %69 -%72 = OpCompositeExtract %uint %46 0 -%71 = OpExtInst %uint %1 UMax %72 %uint_80 -%73 = OpIEqual %bool %71 %uint_125 -OpSelectionMerge %75 None -OpBranchConditional %73 %74 %75 -%74 = OpLabel -%77 = OpVectorShuffle %v2uint %46 %46 0 1 -%76 = OpExtInst %v2uint %1 UMax %77 %79 -%80 = OpVectorShuffle %v2uint %65 %65 0 1 -%81 = OpIEqual %v2bool %76 %80 -%83 = OpAll %bool %81 -OpBranch %75 -%75 = OpLabel -%84 = OpPhi %bool %false %25 %83 %74 -OpSelectionMerge %86 None -OpBranchConditional %84 %85 %86 -%85 = OpLabel -%88 = OpVectorShuffle %v3uint %46 %46 0 1 2 -%87 = OpExtInst %v3uint %1 UMax %88 %90 -%91 = OpVectorShuffle %v3uint %65 %65 0 1 2 -%92 = OpIEqual %v3bool %87 %91 -%94 = OpAll %bool %92 -OpBranch %86 -%86 = OpLabel -%95 = OpPhi %bool %false %75 %94 %85 -OpSelectionMerge %97 None -OpBranchConditional %95 %96 %97 -%96 = OpLabel -%98 = OpExtInst %v4uint %1 UMax %46 %99 -%100 = OpIEqual %v4bool %98 %65 -%102 = OpAll %bool %100 -OpBranch %97 -%97 = OpLabel -%103 = OpPhi %bool %false %86 %102 %96 -OpSelectionMerge %105 None -OpBranchConditional %103 %104 %105 -%104 = OpLabel -OpBranch %105 -%105 = OpLabel -%107 = OpPhi %bool %false %97 %true %104 -OpSelectionMerge %109 None -OpBranchConditional %107 %108 %109 -%108 = OpLabel -%111 = OpVectorShuffle %v2uint %65 %65 0 1 -%112 = OpIEqual %v2bool %110 %111 -%113 = OpAll %bool %112 -OpBranch %109 -%109 = OpLabel -%114 = OpPhi %bool %false %105 %113 %108 -OpSelectionMerge %116 None -OpBranchConditional %114 %115 %116 -%115 = OpLabel -%118 = OpVectorShuffle %v3uint %65 %65 0 1 2 -%119 = OpIEqual %v3bool %117 %118 -%120 = OpAll %bool %119 -OpBranch %116 -%116 = OpLabel -%121 = OpPhi %bool %false %109 %120 %115 -OpSelectionMerge %123 None -OpBranchConditional %121 %122 %123 -%122 = OpLabel -OpBranch %123 -%123 = OpLabel -%124 = OpPhi %bool %false %116 %true %122 -OpSelectionMerge %126 None -OpBranchConditional %124 %125 %126 -%125 = OpLabel -%128 = OpCompositeExtract %uint %60 0 -%127 = OpExtInst %uint %1 UMax %72 %128 -%129 = OpIEqual %bool %127 %uint_125 -OpBranch %126 -%126 = OpLabel -%130 = OpPhi %bool %false %123 %129 %125 -OpSelectionMerge %132 None -OpBranchConditional %130 %131 %132 -%131 = OpLabel -%134 = OpVectorShuffle %v2uint %46 %46 0 1 -%135 = OpVectorShuffle %v2uint %60 %60 0 1 -%133 = OpExtInst %v2uint %1 UMax %134 %135 -%136 = OpVectorShuffle %v2uint %69 %69 0 1 -%137 = OpIEqual %v2bool %133 %136 -%138 = OpAll %bool %137 -OpBranch %132 -%132 = OpLabel -%139 = OpPhi %bool %false %126 %138 %131 -OpSelectionMerge %141 None -OpBranchConditional %139 %140 %141 -%140 = OpLabel -%143 = OpVectorShuffle %v3uint %46 %46 0 1 2 -%144 = OpVectorShuffle %v3uint %60 %60 0 1 2 -%142 = OpExtInst %v3uint %1 UMax %143 %144 -%145 = OpVectorShuffle %v3uint %69 %69 0 1 2 -%146 = OpIEqual %v3bool %142 %145 -%147 = OpAll %bool %146 -OpBranch %141 -%141 = OpLabel -%148 = OpPhi %bool %false %132 %147 %140 -OpSelectionMerge %150 None -OpBranchConditional %148 %149 %150 -%149 = OpLabel -%151 = OpExtInst %v4uint %1 UMax %46 %60 -%152 = OpIEqual %v4bool %151 %69 -%153 = OpAll %bool %152 -OpBranch %150 -%150 = OpLabel -%154 = OpPhi %bool %false %141 %153 %149 -OpSelectionMerge %156 None -OpBranchConditional %154 %155 %156 -%155 = OpLabel -OpBranch %156 -%156 = OpLabel -%157 = OpPhi %bool %false %150 %true %155 -OpSelectionMerge %159 None -OpBranchConditional %157 %158 %159 -%158 = OpLabel -%161 = OpVectorShuffle %v2uint %69 %69 0 1 -%162 = OpIEqual %v2bool %160 %161 -%163 = OpAll %bool %162 -OpBranch %159 -%159 = OpLabel -%164 = OpPhi %bool %false %156 %163 %158 -OpSelectionMerge %166 None -OpBranchConditional %164 %165 %166 -%165 = OpLabel -%168 = OpVectorShuffle %v3uint %69 %69 0 1 2 -%169 = OpIEqual %v3bool %167 %168 -%170 = OpAll %bool %169 -OpBranch %166 -%166 = OpLabel -%171 = OpPhi %bool %false %159 %170 %165 -OpSelectionMerge %173 None -OpBranchConditional %171 %172 %173 -%172 = OpLabel -OpBranch %173 -%173 = OpLabel -%174 = OpPhi %bool %false %166 %true %172 -OpSelectionMerge %179 None -OpBranchConditional %174 %177 %178 -%177 = OpLabel -%180 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%181 = OpLoad %v4float %180 -OpStore %175 %181 -OpBranch %179 -%178 = OpLabel -%182 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%184 = OpLoad %v4float %182 -OpStore %175 %184 -OpBranch %179 -%179 = OpLabel -%185 = OpLoad %v4float %175 -OpReturnValue %185 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %uintValues = OpVariable %_ptr_Function_v4uint Function + %uintGreen = OpVariable %_ptr_Function_v4uint Function + %expectedA = OpVariable %_ptr_Function_v4uint Function + %expectedB = OpVariable %_ptr_Function_v4uint Function + %175 = OpVariable %_ptr_Function_v4float Function + %31 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %35 = OpLoad %v4float %31 + %30 = OpExtInst %v4float %1 FAbs %35 + %37 = OpVectorTimesScalar %v4float %30 %float_100 + %38 = OpCompositeExtract %float %37 0 + %39 = OpConvertFToU %uint %38 + %40 = OpCompositeExtract %float %37 1 + %41 = OpConvertFToU %uint %40 + %42 = OpCompositeExtract %float %37 2 + %43 = OpConvertFToU %uint %42 + %44 = OpCompositeExtract %float %37 3 + %45 = OpConvertFToU %uint %44 + %46 = OpCompositeConstruct %v4uint %39 %41 %43 %45 + OpStore %uintValues %46 + %48 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %50 = OpLoad %v4float %48 + %51 = OpVectorTimesScalar %v4float %50 %float_100 + %52 = OpCompositeExtract %float %51 0 + %53 = OpConvertFToU %uint %52 + %54 = OpCompositeExtract %float %51 1 + %55 = OpConvertFToU %uint %54 + %56 = OpCompositeExtract %float %51 2 + %57 = OpConvertFToU %uint %56 + %58 = OpCompositeExtract %float %51 3 + %59 = OpConvertFToU %uint %58 + %60 = OpCompositeConstruct %v4uint %53 %55 %57 %59 + OpStore %uintGreen %60 + OpStore %expectedA %65 + OpStore %expectedB %69 + %72 = OpCompositeExtract %uint %46 0 + %71 = OpExtInst %uint %1 UMax %72 %uint_80 + %73 = OpIEqual %bool %71 %uint_125 + OpSelectionMerge %75 None + OpBranchConditional %73 %74 %75 + %74 = OpLabel + %77 = OpVectorShuffle %v2uint %46 %46 0 1 + %76 = OpExtInst %v2uint %1 UMax %77 %79 + %80 = OpVectorShuffle %v2uint %65 %65 0 1 + %81 = OpIEqual %v2bool %76 %80 + %83 = OpAll %bool %81 + OpBranch %75 + %75 = OpLabel + %84 = OpPhi %bool %false %25 %83 %74 + OpSelectionMerge %86 None + OpBranchConditional %84 %85 %86 + %85 = OpLabel + %88 = OpVectorShuffle %v3uint %46 %46 0 1 2 + %87 = OpExtInst %v3uint %1 UMax %88 %90 + %91 = OpVectorShuffle %v3uint %65 %65 0 1 2 + %92 = OpIEqual %v3bool %87 %91 + %94 = OpAll %bool %92 + OpBranch %86 + %86 = OpLabel + %95 = OpPhi %bool %false %75 %94 %85 + OpSelectionMerge %97 None + OpBranchConditional %95 %96 %97 + %96 = OpLabel + %98 = OpExtInst %v4uint %1 UMax %46 %99 + %100 = OpIEqual %v4bool %98 %65 + %102 = OpAll %bool %100 + OpBranch %97 + %97 = OpLabel + %103 = OpPhi %bool %false %86 %102 %96 + OpSelectionMerge %105 None + OpBranchConditional %103 %104 %105 + %104 = OpLabel + OpBranch %105 + %105 = OpLabel + %107 = OpPhi %bool %false %97 %true %104 + OpSelectionMerge %109 None + OpBranchConditional %107 %108 %109 + %108 = OpLabel + %111 = OpVectorShuffle %v2uint %65 %65 0 1 + %112 = OpIEqual %v2bool %110 %111 + %113 = OpAll %bool %112 + OpBranch %109 + %109 = OpLabel + %114 = OpPhi %bool %false %105 %113 %108 + OpSelectionMerge %116 None + OpBranchConditional %114 %115 %116 + %115 = OpLabel + %118 = OpVectorShuffle %v3uint %65 %65 0 1 2 + %119 = OpIEqual %v3bool %117 %118 + %120 = OpAll %bool %119 + OpBranch %116 + %116 = OpLabel + %121 = OpPhi %bool %false %109 %120 %115 + OpSelectionMerge %123 None + OpBranchConditional %121 %122 %123 + %122 = OpLabel + OpBranch %123 + %123 = OpLabel + %124 = OpPhi %bool %false %116 %true %122 + OpSelectionMerge %126 None + OpBranchConditional %124 %125 %126 + %125 = OpLabel + %128 = OpCompositeExtract %uint %60 0 + %127 = OpExtInst %uint %1 UMax %72 %128 + %129 = OpIEqual %bool %127 %uint_125 + OpBranch %126 + %126 = OpLabel + %130 = OpPhi %bool %false %123 %129 %125 + OpSelectionMerge %132 None + OpBranchConditional %130 %131 %132 + %131 = OpLabel + %134 = OpVectorShuffle %v2uint %46 %46 0 1 + %135 = OpVectorShuffle %v2uint %60 %60 0 1 + %133 = OpExtInst %v2uint %1 UMax %134 %135 + %136 = OpVectorShuffle %v2uint %69 %69 0 1 + %137 = OpIEqual %v2bool %133 %136 + %138 = OpAll %bool %137 + OpBranch %132 + %132 = OpLabel + %139 = OpPhi %bool %false %126 %138 %131 + OpSelectionMerge %141 None + OpBranchConditional %139 %140 %141 + %140 = OpLabel + %143 = OpVectorShuffle %v3uint %46 %46 0 1 2 + %144 = OpVectorShuffle %v3uint %60 %60 0 1 2 + %142 = OpExtInst %v3uint %1 UMax %143 %144 + %145 = OpVectorShuffle %v3uint %69 %69 0 1 2 + %146 = OpIEqual %v3bool %142 %145 + %147 = OpAll %bool %146 + OpBranch %141 + %141 = OpLabel + %148 = OpPhi %bool %false %132 %147 %140 + OpSelectionMerge %150 None + OpBranchConditional %148 %149 %150 + %149 = OpLabel + %151 = OpExtInst %v4uint %1 UMax %46 %60 + %152 = OpIEqual %v4bool %151 %69 + %153 = OpAll %bool %152 + OpBranch %150 + %150 = OpLabel + %154 = OpPhi %bool %false %141 %153 %149 + OpSelectionMerge %156 None + OpBranchConditional %154 %155 %156 + %155 = OpLabel + OpBranch %156 + %156 = OpLabel + %157 = OpPhi %bool %false %150 %true %155 + OpSelectionMerge %159 None + OpBranchConditional %157 %158 %159 + %158 = OpLabel + %161 = OpVectorShuffle %v2uint %69 %69 0 1 + %162 = OpIEqual %v2bool %160 %161 + %163 = OpAll %bool %162 + OpBranch %159 + %159 = OpLabel + %164 = OpPhi %bool %false %156 %163 %158 + OpSelectionMerge %166 None + OpBranchConditional %164 %165 %166 + %165 = OpLabel + %168 = OpVectorShuffle %v3uint %69 %69 0 1 2 + %169 = OpIEqual %v3bool %167 %168 + %170 = OpAll %bool %169 + OpBranch %166 + %166 = OpLabel + %171 = OpPhi %bool %false %159 %170 %165 + OpSelectionMerge %173 None + OpBranchConditional %171 %172 %173 + %172 = OpLabel + OpBranch %173 + %173 = OpLabel + %174 = OpPhi %bool %false %166 %true %172 + OpSelectionMerge %179 None + OpBranchConditional %174 %177 %178 + %177 = OpLabel + %180 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %181 = OpLoad %v4float %180 + OpStore %175 %181 + OpBranch %179 + %178 = OpLabel + %182 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %184 = OpLoad %v4float %182 + OpStore %175 %184 + OpBranch %179 + %179 = OpLabel + %185 = OpLoad %v4float %175 + OpReturnValue %185 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/MaxUint.skrp b/tests/sksl/intrinsics/MaxUint.skrp index 9c918ffcb442..68fa6d01eac6 100644 --- a/tests/sksl/intrinsics/MaxUint.skrp +++ b/tests/sksl/intrinsics/MaxUint.skrp @@ -1,12 +1,14 @@ +113 instructions + [immutable slots] -expectedA(0) = 0x0000007D (1.751623e-43) -expectedA(1) = 0x00000050 (1.121039e-43) -expectedA(2) = 0x00000050 (1.121039e-43) -expectedA(3) = 0x000000E1 (3.152922e-43) -expectedB(0) = 0x0000007D (1.751623e-43) -expectedB(1) = 0x00000064 (1.401298e-43) -expectedB(2) = 0x0000004B (1.050974e-43) -expectedB(3) = 0x000000E1 (3.152922e-43) +i0 = 0x0000007D (1.751623e-43) +i1 = 0x00000050 (1.121039e-43) +i2 = 0x00000050 (1.121039e-43) +i3 = 0x000000E1 (3.152922e-43) +i4 = 0x0000007D (1.751623e-43) +i5 = 0x00000064 (1.401298e-43) +i6 = 0x0000004B (1.050974e-43) +i7 = 0x000000E1 (3.152922e-43) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -24,19 +26,18 @@ copy_4_slots_unmasked uintGreen = $0..3 copy_slot_unmasked $0 = uintValues(0) copy_constant $1 = 0x00000050 (1.121039e-43) max_uint $0 = max($0, $1) -copy_slot_unmasked $1 = expectedA(0) -cmpeq_int $0 = equal($0, $1) +cmpeq_imm_int $0 = equal($0, 0x0000007D) copy_2_slots_unmasked $1..2 = uintValues(0..1) splat_2_constants $3..4 = 0x00000050 (1.121039e-43) max_2_uints $1..2 = max($1..2, $3..4) -copy_2_slots_unmasked $3..4 = expectedA(0..1) +copy_2_immutables_unmasked $3..4 = i0..1 [0x0000007D (1.751623e-43), 0x00000050 (1.121039e-43)] cmpeq_2_ints $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_3_slots_unmasked $1..3 = uintValues(0..2) splat_3_constants $4..6 = 0x00000050 (1.121039e-43) max_3_uints $1..3 = max($1..3, $4..6) -copy_3_slots_unmasked $4..6 = expectedA(0..2) +copy_3_immutables_unmasked $4..6 = i0..2 [0x0000007D (1.751623e-43), 0x00000050 (1.121039e-43), 0x00000050 (1.121039e-43)] cmpeq_3_ints $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 @@ -44,31 +45,27 @@ bitwise_and_int $0 &= $1 copy_4_slots_unmasked $1..4 = uintValues splat_4_constants $5..8 = 0x00000050 (1.121039e-43) max_4_uints $1..4 = max($1..4, $5..8) -copy_4_slots_unmasked $5..8 = expectedA +copy_4_immutables_unmasked $5..8 = i0..3 [0x0000007D (1.751623e-43), 0x00000050 (1.121039e-43), 0x00000050 (1.121039e-43), 0x000000E1 (3.152922e-43)] cmpeq_4_ints $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expectedA(0) +copy_constant $1 = 0x0000007D (1.751623e-43) cmpeq_imm_int $1 = equal($1, 0x0000007D) bitwise_and_int $0 &= $1 -copy_constant $1 = 0x0000007D (1.751623e-43) -copy_constant $2 = 0x00000050 (1.121039e-43) -copy_2_slots_unmasked $3..4 = expectedA(0..1) +copy_2_immutables_unmasked $1..2 = i0..1 [0x0000007D (1.751623e-43), 0x00000050 (1.121039e-43)] +copy_2_immutables_unmasked $3..4 = i0..1 [0x0000007D (1.751623e-43), 0x00000050 (1.121039e-43)] cmpeq_2_ints $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0x0000007D (1.751623e-43) -splat_2_constants $2..3 = 0x00000050 (1.121039e-43) -copy_3_slots_unmasked $4..6 = expectedA(0..2) +copy_3_immutables_unmasked $1..3 = i0..2 [0x0000007D (1.751623e-43), 0x00000050 (1.121039e-43), 0x00000050 (1.121039e-43)] +copy_3_immutables_unmasked $4..6 = i0..2 [0x0000007D (1.751623e-43), 0x00000050 (1.121039e-43), 0x00000050 (1.121039e-43)] cmpeq_3_ints $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0x0000007D (1.751623e-43) -splat_2_constants $2..3 = 0x00000050 (1.121039e-43) -copy_constant $4 = 0x000000E1 (3.152922e-43) -copy_4_slots_unmasked $5..8 = expectedA +copy_4_immutables_unmasked $1..4 = i0..3 [0x0000007D (1.751623e-43), 0x00000050 (1.121039e-43), 0x00000050 (1.121039e-43), 0x000000E1 (3.152922e-43)] +copy_4_immutables_unmasked $5..8 = i0..3 [0x0000007D (1.751623e-43), 0x00000050 (1.121039e-43), 0x00000050 (1.121039e-43), 0x000000E1 (3.152922e-43)] cmpeq_4_ints $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -76,20 +73,19 @@ bitwise_and_int $0 &= $1 copy_slot_unmasked $1 = uintValues(0) copy_slot_unmasked $2 = uintGreen(0) max_uint $1 = max($1, $2) -copy_slot_unmasked $2 = expectedB(0) -cmpeq_int $1 = equal($1, $2) +cmpeq_imm_int $1 = equal($1, 0x0000007D) bitwise_and_int $0 &= $1 copy_2_slots_unmasked $1..2 = uintValues(0..1) copy_2_slots_unmasked $3..4 = uintGreen(0..1) max_2_uints $1..2 = max($1..2, $3..4) -copy_2_slots_unmasked $3..4 = expectedB(0..1) +copy_2_immutables_unmasked $3..4 = i4..5 [0x0000007D (1.751623e-43), 0x00000064 (1.401298e-43)] cmpeq_2_ints $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_3_slots_unmasked $1..3 = uintValues(0..2) copy_3_slots_unmasked $4..6 = uintGreen(0..2) max_3_uints $1..3 = max($1..3, $4..6) -copy_3_slots_unmasked $4..6 = expectedB(0..2) +copy_3_immutables_unmasked $4..6 = i4..6 [0x0000007D (1.751623e-43), 0x00000064 (1.401298e-43), 0x0000004B (1.050974e-43)] cmpeq_3_ints $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 @@ -97,33 +93,27 @@ bitwise_and_int $0 &= $1 copy_4_slots_unmasked $1..4 = uintValues copy_4_slots_unmasked $5..8 = uintGreen max_4_uints $1..4 = max($1..4, $5..8) -copy_4_slots_unmasked $5..8 = expectedB +copy_4_immutables_unmasked $5..8 = i4..7 [0x0000007D (1.751623e-43), 0x00000064 (1.401298e-43), 0x0000004B (1.050974e-43), 0x000000E1 (3.152922e-43)] cmpeq_4_ints $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expectedB(0) +copy_constant $1 = 0x0000007D (1.751623e-43) cmpeq_imm_int $1 = equal($1, 0x0000007D) bitwise_and_int $0 &= $1 -copy_constant $1 = 0x0000007D (1.751623e-43) -copy_constant $2 = 0x00000064 (1.401298e-43) -copy_2_slots_unmasked $3..4 = expectedB(0..1) +copy_2_immutables_unmasked $1..2 = i4..5 [0x0000007D (1.751623e-43), 0x00000064 (1.401298e-43)] +copy_2_immutables_unmasked $3..4 = i4..5 [0x0000007D (1.751623e-43), 0x00000064 (1.401298e-43)] cmpeq_2_ints $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0x0000007D (1.751623e-43) -copy_constant $2 = 0x00000064 (1.401298e-43) -copy_constant $3 = 0x0000004B (1.050974e-43) -copy_3_slots_unmasked $4..6 = expectedB(0..2) +copy_3_immutables_unmasked $1..3 = i4..6 [0x0000007D (1.751623e-43), 0x00000064 (1.401298e-43), 0x0000004B (1.050974e-43)] +copy_3_immutables_unmasked $4..6 = i4..6 [0x0000007D (1.751623e-43), 0x00000064 (1.401298e-43), 0x0000004B (1.050974e-43)] cmpeq_3_ints $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0x0000007D (1.751623e-43) -copy_constant $2 = 0x00000064 (1.401298e-43) -copy_constant $3 = 0x0000004B (1.050974e-43) -copy_constant $4 = 0x000000E1 (3.152922e-43) -copy_4_slots_unmasked $5..8 = expectedB +copy_4_immutables_unmasked $1..4 = i4..7 [0x0000007D (1.751623e-43), 0x00000064 (1.401298e-43), 0x0000004B (1.050974e-43), 0x000000E1 (3.152922e-43)] +copy_4_immutables_unmasked $5..8 = i4..7 [0x0000007D (1.751623e-43), 0x00000064 (1.401298e-43), 0x0000004B (1.050974e-43), 0x000000E1 (3.152922e-43)] cmpeq_4_ints $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 diff --git a/tests/sksl/intrinsics/MaxUint.wgsl b/tests/sksl/intrinsics/MaxUint.wgsl index a3c36421577b..1a630d7cee1b 100644 --- a/tests/sksl/intrinsics/MaxUint.wgsl +++ b/tests/sksl/intrinsics/MaxUint.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -27,7 +28,7 @@ fn main(_skParam0: vec2) -> vec4 { let _skTemp6 = max(uintValues.xy, uintGreen.xy); let _skTemp7 = max(uintValues.xyz, uintGreen.xyz); let _skTemp8 = max(uintValues, uintGreen); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((((((((((_skTemp1 == expectedA.x && all(_skTemp2 == expectedA.xy)) && all(_skTemp3 == expectedA.xyz)) && all(_skTemp4 == expectedA)) && 125u == expectedA.x) && all(vec2(125u, 80u) == expectedA.xy)) && all(vec3(125u, 80u, 80u) == expectedA.xyz)) && all(vec4(125u, 80u, 80u, 225u) == expectedA)) && _skTemp5 == expectedB.x) && all(_skTemp6 == expectedB.xy)) && all(_skTemp7 == expectedB.xyz)) && all(_skTemp8 == expectedB)) && 125u == expectedB.x) && all(vec2(125u, 100u) == expectedB.xy)) && all(vec3(125u, 100u, 75u) == expectedB.xyz)) && all(vec4(125u, 100u, 75u, 225u) == expectedB))); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((((((((((_skTemp1 == expectedA.x) && all(_skTemp2 == expectedA.xy)) && all(_skTemp3 == expectedA.xyz)) && all(_skTemp4 == expectedA)) && (125u == expectedA.x)) && all(vec2(125u, 80u) == expectedA.xy)) && all(vec3(125u, 80u, 80u) == expectedA.xyz)) && all(vec4(125u, 80u, 80u, 225u) == expectedA)) && (_skTemp5 == expectedB.x)) && all(_skTemp6 == expectedB.xy)) && all(_skTemp7 == expectedB.xyz)) && all(_skTemp8 == expectedB)) && (125u == expectedB.x)) && all(vec2(125u, 100u) == expectedB.xy)) && all(vec3(125u, 100u, 75u) == expectedB.xyz)) && all(vec4(125u, 100u, 75u, 225u) == expectedB))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/intrinsics/MinFloat.asm.frag b/tests/sksl/intrinsics/MinFloat.asm.frag index ce1509857e9e..22de0cfe664b 100644 --- a/tests/sksl/intrinsics/MinFloat.asm.frag +++ b/tests/sksl/intrinsics/MinFloat.asm.frag @@ -1,270 +1,270 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testInputs" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %expectedA "expectedA" -OpName %expectedB "expectedB" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %107 RelaxedPrecision -OpDecorate %108 RelaxedPrecision -OpDecorate %118 RelaxedPrecision -OpDecorate %119 RelaxedPrecision -OpDecorate %131 RelaxedPrecision -OpDecorate %132 RelaxedPrecision -OpDecorate %143 RelaxedPrecision -OpDecorate %171 RelaxedPrecision -OpDecorate %174 RelaxedPrecision -OpDecorate %175 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testInputs" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %expectedA "expectedA" + OpName %expectedB "expectedB" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %107 RelaxedPrecision + OpDecorate %108 RelaxedPrecision + OpDecorate %118 RelaxedPrecision + OpDecorate %119 RelaxedPrecision + OpDecorate %131 RelaxedPrecision + OpDecorate %132 RelaxedPrecision + OpDecorate %143 RelaxedPrecision + OpDecorate %171 RelaxedPrecision + OpDecorate %174 RelaxedPrecision + OpDecorate %175 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float %float_n1_25 = OpConstant %float -1.25 -%float_0_5 = OpConstant %float 0.5 -%30 = OpConstantComposite %v4float %float_n1_25 %float_0 %float_0_5 %float_0_5 -%float_1 = OpConstant %float 1 -%33 = OpConstantComposite %v4float %float_n1_25 %float_0 %float_0 %float_1 -%false = OpConstantFalse %bool + %float_0_5 = OpConstant %float 0.5 + %30 = OpConstantComposite %v4float %float_n1_25 %float_0 %float_0_5 %float_0_5 + %float_1 = OpConstant %float 1 + %33 = OpConstantComposite %v4float %float_n1_25 %float_0 %float_0 %float_1 + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%49 = OpConstantComposite %v2float %float_0_5 %float_0_5 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%62 = OpConstantComposite %v3float %float_0_5 %float_0_5 %float_0_5 -%v3bool = OpTypeVector %bool 3 -%73 = OpConstantComposite %v4float %float_0_5 %float_0_5 %float_0_5 %float_0_5 -%v4bool = OpTypeVector %bool 4 -%true = OpConstantTrue %bool -%84 = OpConstantComposite %v2float %float_n1_25 %float_0 -%91 = OpConstantComposite %v3float %float_n1_25 %float_0 %float_0_5 -%int_1 = OpConstant %int 1 -%158 = OpConstantComposite %v3float %float_n1_25 %float_0 %float_0 -%int_2 = OpConstant %int 2 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %49 = OpConstantComposite %v2float %float_0_5 %float_0_5 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %62 = OpConstantComposite %v3float %float_0_5 %float_0_5 %float_0_5 + %v3bool = OpTypeVector %bool 3 + %73 = OpConstantComposite %v4float %float_0_5 %float_0_5 %float_0_5 %float_0_5 + %v4bool = OpTypeVector %bool 4 + %true = OpConstantTrue %bool + %84 = OpConstantComposite %v2float %float_n1_25 %float_0 + %91 = OpConstantComposite %v3float %float_n1_25 %float_0 %float_0_5 + %int_1 = OpConstant %int 1 + %158 = OpConstantComposite %v3float %float_n1_25 %float_0 %float_0 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%expectedA = OpVariable %_ptr_Function_v4float Function -%expectedB = OpVariable %_ptr_Function_v4float Function -%166 = OpVariable %_ptr_Function_v4float Function -OpStore %expectedA %30 -OpStore %expectedB %33 -%36 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%40 = OpLoad %v4float %36 -%41 = OpCompositeExtract %float %40 0 -%35 = OpExtInst %float %1 FMin %41 %float_0_5 -%42 = OpFOrdEqual %bool %35 %float_n1_25 -OpSelectionMerge %44 None -OpBranchConditional %42 %43 %44 -%43 = OpLabel -%46 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%47 = OpLoad %v4float %46 -%48 = OpVectorShuffle %v2float %47 %47 0 1 -%45 = OpExtInst %v2float %1 FMin %48 %49 -%50 = OpVectorShuffle %v2float %30 %30 0 1 -%51 = OpFOrdEqual %v2bool %45 %50 -%53 = OpAll %bool %51 -OpBranch %44 -%44 = OpLabel -%54 = OpPhi %bool %false %25 %53 %43 -OpSelectionMerge %56 None -OpBranchConditional %54 %55 %56 -%55 = OpLabel -%58 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%59 = OpLoad %v4float %58 -%60 = OpVectorShuffle %v3float %59 %59 0 1 2 -%57 = OpExtInst %v3float %1 FMin %60 %62 -%63 = OpVectorShuffle %v3float %30 %30 0 1 2 -%64 = OpFOrdEqual %v3bool %57 %63 -%66 = OpAll %bool %64 -OpBranch %56 -%56 = OpLabel -%67 = OpPhi %bool %false %44 %66 %55 -OpSelectionMerge %69 None -OpBranchConditional %67 %68 %69 -%68 = OpLabel -%71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%72 = OpLoad %v4float %71 -%70 = OpExtInst %v4float %1 FMin %72 %73 -%74 = OpFOrdEqual %v4bool %70 %30 -%76 = OpAll %bool %74 -OpBranch %69 -%69 = OpLabel -%77 = OpPhi %bool %false %56 %76 %68 -OpSelectionMerge %79 None -OpBranchConditional %77 %78 %79 -%78 = OpLabel -OpBranch %79 -%79 = OpLabel -%81 = OpPhi %bool %false %69 %true %78 -OpSelectionMerge %83 None -OpBranchConditional %81 %82 %83 -%82 = OpLabel -%85 = OpVectorShuffle %v2float %30 %30 0 1 -%86 = OpFOrdEqual %v2bool %84 %85 -%87 = OpAll %bool %86 -OpBranch %83 -%83 = OpLabel -%88 = OpPhi %bool %false %79 %87 %82 -OpSelectionMerge %90 None -OpBranchConditional %88 %89 %90 -%89 = OpLabel -%92 = OpVectorShuffle %v3float %30 %30 0 1 2 -%93 = OpFOrdEqual %v3bool %91 %92 -%94 = OpAll %bool %93 -OpBranch %90 -%90 = OpLabel -%95 = OpPhi %bool %false %83 %94 %89 -OpSelectionMerge %97 None -OpBranchConditional %95 %96 %97 -%96 = OpLabel -OpBranch %97 -%97 = OpLabel -%98 = OpPhi %bool %false %90 %true %96 -OpSelectionMerge %100 None -OpBranchConditional %98 %99 %100 -%99 = OpLabel -%102 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%103 = OpLoad %v4float %102 -%104 = OpCompositeExtract %float %103 0 -%105 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%107 = OpLoad %v4float %105 -%108 = OpCompositeExtract %float %107 0 -%101 = OpExtInst %float %1 FMin %104 %108 -%109 = OpFOrdEqual %bool %101 %float_n1_25 -OpBranch %100 -%100 = OpLabel -%110 = OpPhi %bool %false %97 %109 %99 -OpSelectionMerge %112 None -OpBranchConditional %110 %111 %112 -%111 = OpLabel -%114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%115 = OpLoad %v4float %114 -%116 = OpVectorShuffle %v2float %115 %115 0 1 -%117 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%118 = OpLoad %v4float %117 -%119 = OpVectorShuffle %v2float %118 %118 0 1 -%113 = OpExtInst %v2float %1 FMin %116 %119 -%120 = OpVectorShuffle %v2float %33 %33 0 1 -%121 = OpFOrdEqual %v2bool %113 %120 -%122 = OpAll %bool %121 -OpBranch %112 -%112 = OpLabel -%123 = OpPhi %bool %false %100 %122 %111 -OpSelectionMerge %125 None -OpBranchConditional %123 %124 %125 -%124 = OpLabel -%127 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%128 = OpLoad %v4float %127 -%129 = OpVectorShuffle %v3float %128 %128 0 1 2 -%130 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%131 = OpLoad %v4float %130 -%132 = OpVectorShuffle %v3float %131 %131 0 1 2 -%126 = OpExtInst %v3float %1 FMin %129 %132 -%133 = OpVectorShuffle %v3float %33 %33 0 1 2 -%134 = OpFOrdEqual %v3bool %126 %133 -%135 = OpAll %bool %134 -OpBranch %125 -%125 = OpLabel -%136 = OpPhi %bool %false %112 %135 %124 -OpSelectionMerge %138 None -OpBranchConditional %136 %137 %138 -%137 = OpLabel -%140 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%141 = OpLoad %v4float %140 -%142 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%143 = OpLoad %v4float %142 -%139 = OpExtInst %v4float %1 FMin %141 %143 -%144 = OpFOrdEqual %v4bool %139 %33 -%145 = OpAll %bool %144 -OpBranch %138 -%138 = OpLabel -%146 = OpPhi %bool %false %125 %145 %137 -OpSelectionMerge %148 None -OpBranchConditional %146 %147 %148 -%147 = OpLabel -OpBranch %148 -%148 = OpLabel -%149 = OpPhi %bool %false %138 %true %147 -OpSelectionMerge %151 None -OpBranchConditional %149 %150 %151 -%150 = OpLabel -%152 = OpVectorShuffle %v2float %33 %33 0 1 -%153 = OpFOrdEqual %v2bool %84 %152 -%154 = OpAll %bool %153 -OpBranch %151 -%151 = OpLabel -%155 = OpPhi %bool %false %148 %154 %150 -OpSelectionMerge %157 None -OpBranchConditional %155 %156 %157 -%156 = OpLabel -%159 = OpVectorShuffle %v3float %33 %33 0 1 2 -%160 = OpFOrdEqual %v3bool %158 %159 -%161 = OpAll %bool %160 -OpBranch %157 -%157 = OpLabel -%162 = OpPhi %bool %false %151 %161 %156 -OpSelectionMerge %164 None -OpBranchConditional %162 %163 %164 -%163 = OpLabel -OpBranch %164 -%164 = OpLabel -%165 = OpPhi %bool %false %157 %true %163 -OpSelectionMerge %169 None -OpBranchConditional %165 %167 %168 -%167 = OpLabel -%170 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%171 = OpLoad %v4float %170 -OpStore %166 %171 -OpBranch %169 -%168 = OpLabel -%172 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%174 = OpLoad %v4float %172 -OpStore %166 %174 -OpBranch %169 -%169 = OpLabel -%175 = OpLoad %v4float %166 -OpReturnValue %175 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %expectedA = OpVariable %_ptr_Function_v4float Function + %expectedB = OpVariable %_ptr_Function_v4float Function + %166 = OpVariable %_ptr_Function_v4float Function + OpStore %expectedA %30 + OpStore %expectedB %33 + %36 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %40 = OpLoad %v4float %36 + %41 = OpCompositeExtract %float %40 0 + %35 = OpExtInst %float %1 FMin %41 %float_0_5 + %42 = OpFOrdEqual %bool %35 %float_n1_25 + OpSelectionMerge %44 None + OpBranchConditional %42 %43 %44 + %43 = OpLabel + %46 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %47 = OpLoad %v4float %46 + %48 = OpVectorShuffle %v2float %47 %47 0 1 + %45 = OpExtInst %v2float %1 FMin %48 %49 + %50 = OpVectorShuffle %v2float %30 %30 0 1 + %51 = OpFOrdEqual %v2bool %45 %50 + %53 = OpAll %bool %51 + OpBranch %44 + %44 = OpLabel + %54 = OpPhi %bool %false %25 %53 %43 + OpSelectionMerge %56 None + OpBranchConditional %54 %55 %56 + %55 = OpLabel + %58 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %59 = OpLoad %v4float %58 + %60 = OpVectorShuffle %v3float %59 %59 0 1 2 + %57 = OpExtInst %v3float %1 FMin %60 %62 + %63 = OpVectorShuffle %v3float %30 %30 0 1 2 + %64 = OpFOrdEqual %v3bool %57 %63 + %66 = OpAll %bool %64 + OpBranch %56 + %56 = OpLabel + %67 = OpPhi %bool %false %44 %66 %55 + OpSelectionMerge %69 None + OpBranchConditional %67 %68 %69 + %68 = OpLabel + %71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %72 = OpLoad %v4float %71 + %70 = OpExtInst %v4float %1 FMin %72 %73 + %74 = OpFOrdEqual %v4bool %70 %30 + %76 = OpAll %bool %74 + OpBranch %69 + %69 = OpLabel + %77 = OpPhi %bool %false %56 %76 %68 + OpSelectionMerge %79 None + OpBranchConditional %77 %78 %79 + %78 = OpLabel + OpBranch %79 + %79 = OpLabel + %81 = OpPhi %bool %false %69 %true %78 + OpSelectionMerge %83 None + OpBranchConditional %81 %82 %83 + %82 = OpLabel + %85 = OpVectorShuffle %v2float %30 %30 0 1 + %86 = OpFOrdEqual %v2bool %84 %85 + %87 = OpAll %bool %86 + OpBranch %83 + %83 = OpLabel + %88 = OpPhi %bool %false %79 %87 %82 + OpSelectionMerge %90 None + OpBranchConditional %88 %89 %90 + %89 = OpLabel + %92 = OpVectorShuffle %v3float %30 %30 0 1 2 + %93 = OpFOrdEqual %v3bool %91 %92 + %94 = OpAll %bool %93 + OpBranch %90 + %90 = OpLabel + %95 = OpPhi %bool %false %83 %94 %89 + OpSelectionMerge %97 None + OpBranchConditional %95 %96 %97 + %96 = OpLabel + OpBranch %97 + %97 = OpLabel + %98 = OpPhi %bool %false %90 %true %96 + OpSelectionMerge %100 None + OpBranchConditional %98 %99 %100 + %99 = OpLabel + %102 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %103 = OpLoad %v4float %102 + %104 = OpCompositeExtract %float %103 0 + %105 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %107 = OpLoad %v4float %105 + %108 = OpCompositeExtract %float %107 0 + %101 = OpExtInst %float %1 FMin %104 %108 + %109 = OpFOrdEqual %bool %101 %float_n1_25 + OpBranch %100 + %100 = OpLabel + %110 = OpPhi %bool %false %97 %109 %99 + OpSelectionMerge %112 None + OpBranchConditional %110 %111 %112 + %111 = OpLabel + %114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %115 = OpLoad %v4float %114 + %116 = OpVectorShuffle %v2float %115 %115 0 1 + %117 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %118 = OpLoad %v4float %117 + %119 = OpVectorShuffle %v2float %118 %118 0 1 + %113 = OpExtInst %v2float %1 FMin %116 %119 + %120 = OpVectorShuffle %v2float %33 %33 0 1 + %121 = OpFOrdEqual %v2bool %113 %120 + %122 = OpAll %bool %121 + OpBranch %112 + %112 = OpLabel + %123 = OpPhi %bool %false %100 %122 %111 + OpSelectionMerge %125 None + OpBranchConditional %123 %124 %125 + %124 = OpLabel + %127 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %128 = OpLoad %v4float %127 + %129 = OpVectorShuffle %v3float %128 %128 0 1 2 + %130 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %131 = OpLoad %v4float %130 + %132 = OpVectorShuffle %v3float %131 %131 0 1 2 + %126 = OpExtInst %v3float %1 FMin %129 %132 + %133 = OpVectorShuffle %v3float %33 %33 0 1 2 + %134 = OpFOrdEqual %v3bool %126 %133 + %135 = OpAll %bool %134 + OpBranch %125 + %125 = OpLabel + %136 = OpPhi %bool %false %112 %135 %124 + OpSelectionMerge %138 None + OpBranchConditional %136 %137 %138 + %137 = OpLabel + %140 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %141 = OpLoad %v4float %140 + %142 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %143 = OpLoad %v4float %142 + %139 = OpExtInst %v4float %1 FMin %141 %143 + %144 = OpFOrdEqual %v4bool %139 %33 + %145 = OpAll %bool %144 + OpBranch %138 + %138 = OpLabel + %146 = OpPhi %bool %false %125 %145 %137 + OpSelectionMerge %148 None + OpBranchConditional %146 %147 %148 + %147 = OpLabel + OpBranch %148 + %148 = OpLabel + %149 = OpPhi %bool %false %138 %true %147 + OpSelectionMerge %151 None + OpBranchConditional %149 %150 %151 + %150 = OpLabel + %152 = OpVectorShuffle %v2float %33 %33 0 1 + %153 = OpFOrdEqual %v2bool %84 %152 + %154 = OpAll %bool %153 + OpBranch %151 + %151 = OpLabel + %155 = OpPhi %bool %false %148 %154 %150 + OpSelectionMerge %157 None + OpBranchConditional %155 %156 %157 + %156 = OpLabel + %159 = OpVectorShuffle %v3float %33 %33 0 1 2 + %160 = OpFOrdEqual %v3bool %158 %159 + %161 = OpAll %bool %160 + OpBranch %157 + %157 = OpLabel + %162 = OpPhi %bool %false %151 %161 %156 + OpSelectionMerge %164 None + OpBranchConditional %162 %163 %164 + %163 = OpLabel + OpBranch %164 + %164 = OpLabel + %165 = OpPhi %bool %false %157 %true %163 + OpSelectionMerge %169 None + OpBranchConditional %165 %167 %168 + %167 = OpLabel + %170 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %171 = OpLoad %v4float %170 + OpStore %166 %171 + OpBranch %169 + %168 = OpLabel + %172 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %174 = OpLoad %v4float %172 + OpStore %166 %174 + OpBranch %169 + %169 = OpLabel + %175 = OpLoad %v4float %166 + OpReturnValue %175 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/MinFloat.skrp b/tests/sksl/intrinsics/MinFloat.skrp index ec993a1d5fc7..e14d940ac17f 100644 --- a/tests/sksl/intrinsics/MinFloat.skrp +++ b/tests/sksl/intrinsics/MinFloat.skrp @@ -1,30 +1,31 @@ +101 instructions + [immutable slots] -expectedA(0) = 0xBFA00000 (-1.25) -expectedA(1) = 0 -expectedA(2) = 0x3F000000 (0.5) -expectedA(3) = 0x3F000000 (0.5) -expectedB(0) = 0xBFA00000 (-1.25) -expectedB(1) = 0 -expectedB(2) = 0 -expectedB(3) = 0x3F800000 (1.0) +i0 = 0xBFA00000 (-1.25) +i1 = 0 +i2 = 0x3F000000 (0.5) +i3 = 0x3F000000 (0.5) +i4 = 0xBFA00000 (-1.25) +i5 = 0 +i6 = 0 +i7 = 0x3F800000 (1.0) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_uniform $0 = testInputs(0) min_imm_float $0 = min($0, 0x3F000000 (0.5)) -copy_slot_unmasked $1 = expectedA(0) -cmpeq_float $0 = equal($0, $1) +cmpeq_imm_float $0 = equal($0, 0xBFA00000 (-1.25)) copy_2_uniforms $1..2 = testInputs(0..1) splat_2_constants $3..4 = 0x3F000000 (0.5) min_2_floats $1..2 = min($1..2, $3..4) -copy_2_slots_unmasked $3..4 = expectedA(0..1) +copy_2_immutables_unmasked $3..4 = i0..1 [0xBFA00000 (-1.25), 0] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_3_uniforms $1..3 = testInputs(0..2) splat_3_constants $4..6 = 0x3F000000 (0.5) min_3_floats $1..3 = min($1..3, $4..6) -copy_3_slots_unmasked $4..6 = expectedA(0..2) +copy_3_immutables_unmasked $4..6 = i0..2 [0xBFA00000 (-1.25), 0, 0x3F000000 (0.5)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 @@ -32,32 +33,27 @@ bitwise_and_int $0 &= $1 copy_4_uniforms $1..4 = testInputs splat_4_constants $5..8 = 0x3F000000 (0.5) min_4_floats $1..4 = min($1..4, $5..8) -copy_4_slots_unmasked $5..8 = expectedA +copy_4_immutables_unmasked $5..8 = i0..3 [0xBFA00000 (-1.25), 0, 0x3F000000 (0.5), 0x3F000000 (0.5)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expectedA(0) +copy_constant $1 = 0xBFA00000 (-1.25) cmpeq_imm_float $1 = equal($1, 0xBFA00000 (-1.25)) bitwise_and_int $0 &= $1 -copy_constant $1 = 0xBFA00000 (-1.25) -copy_constant $2 = 0 -copy_2_slots_unmasked $3..4 = expectedA(0..1) +copy_2_immutables_unmasked $1..2 = i4..5 [0xBFA00000 (-1.25), 0] +copy_2_immutables_unmasked $3..4 = i0..1 [0xBFA00000 (-1.25), 0] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0xBFA00000 (-1.25) -copy_constant $2 = 0 -copy_constant $3 = 0x3F000000 (0.5) -copy_3_slots_unmasked $4..6 = expectedA(0..2) +copy_3_immutables_unmasked $1..3 = i0..2 [0xBFA00000 (-1.25), 0, 0x3F000000 (0.5)] +copy_3_immutables_unmasked $4..6 = i0..2 [0xBFA00000 (-1.25), 0, 0x3F000000 (0.5)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0xBFA00000 (-1.25) -copy_constant $2 = 0 -splat_2_constants $3..4 = 0x3F000000 (0.5) -copy_4_slots_unmasked $5..8 = expectedA +copy_4_immutables_unmasked $1..4 = i0..3 [0xBFA00000 (-1.25), 0, 0x3F000000 (0.5), 0x3F000000 (0.5)] +copy_4_immutables_unmasked $5..8 = i0..3 [0xBFA00000 (-1.25), 0, 0x3F000000 (0.5), 0x3F000000 (0.5)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -65,20 +61,19 @@ bitwise_and_int $0 &= $1 copy_uniform $1 = testInputs(0) copy_uniform $2 = colorGreen(0) min_float $1 = min($1, $2) -copy_slot_unmasked $2 = expectedB(0) -cmpeq_float $1 = equal($1, $2) +cmpeq_imm_float $1 = equal($1, 0xBFA00000 (-1.25)) bitwise_and_int $0 &= $1 copy_2_uniforms $1..2 = testInputs(0..1) copy_2_uniforms $3..4 = colorGreen(0..1) min_2_floats $1..2 = min($1..2, $3..4) -copy_2_slots_unmasked $3..4 = expectedB(0..1) +copy_2_immutables_unmasked $3..4 = i4..5 [0xBFA00000 (-1.25), 0] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_3_uniforms $1..3 = testInputs(0..2) copy_3_uniforms $4..6 = colorGreen(0..2) min_3_floats $1..3 = min($1..3, $4..6) -copy_3_slots_unmasked $4..6 = expectedB(0..2) +copy_3_immutables_unmasked $4..6 = i4..6 [0xBFA00000 (-1.25), 0, 0] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 @@ -86,31 +81,27 @@ bitwise_and_int $0 &= $1 copy_4_uniforms $1..4 = testInputs copy_4_uniforms $5..8 = colorGreen min_4_floats $1..4 = min($1..4, $5..8) -copy_4_slots_unmasked $5..8 = expectedB +copy_4_immutables_unmasked $5..8 = i4..7 [0xBFA00000 (-1.25), 0, 0, 0x3F800000 (1.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expectedB(0) +copy_constant $1 = 0xBFA00000 (-1.25) cmpeq_imm_float $1 = equal($1, 0xBFA00000 (-1.25)) bitwise_and_int $0 &= $1 -copy_constant $1 = 0xBFA00000 (-1.25) -copy_constant $2 = 0 -copy_2_slots_unmasked $3..4 = expectedB(0..1) +copy_2_immutables_unmasked $1..2 = i4..5 [0xBFA00000 (-1.25), 0] +copy_2_immutables_unmasked $3..4 = i4..5 [0xBFA00000 (-1.25), 0] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0xBFA00000 (-1.25) -splat_2_constants $2..3 = 0 -copy_3_slots_unmasked $4..6 = expectedB(0..2) +copy_3_immutables_unmasked $1..3 = i4..6 [0xBFA00000 (-1.25), 0, 0] +copy_3_immutables_unmasked $4..6 = i4..6 [0xBFA00000 (-1.25), 0, 0] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0xBFA00000 (-1.25) -splat_2_constants $2..3 = 0 -copy_constant $4 = 0x3F800000 (1.0) -copy_4_slots_unmasked $5..8 = expectedB +copy_4_immutables_unmasked $1..4 = i4..7 [0xBFA00000 (-1.25), 0, 0, 0x3F800000 (1.0)] +copy_4_immutables_unmasked $5..8 = i4..7 [0xBFA00000 (-1.25), 0, 0, 0x3F800000 (1.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 diff --git a/tests/sksl/intrinsics/MinFloat.wgsl b/tests/sksl/intrinsics/MinFloat.wgsl index 49f6627199b3..f9387488b424 100644 --- a/tests/sksl/intrinsics/MinFloat.wgsl +++ b/tests/sksl/intrinsics/MinFloat.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -24,7 +25,7 @@ fn main(_skParam0: vec2) -> vec4 { let _skTemp5 = min(_globalUniforms.testInputs.xy, vec2(_globalUniforms.colorGreen.xy)); let _skTemp6 = min(_globalUniforms.testInputs.xyz, vec3(_globalUniforms.colorGreen.xyz)); let _skTemp7 = min(_globalUniforms.testInputs, vec4(_globalUniforms.colorGreen)); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((((((((((_skTemp0 == expectedA.x && all(_skTemp1 == expectedA.xy)) && all(_skTemp2 == expectedA.xyz)) && all(_skTemp3 == expectedA)) && -1.25 == expectedA.x) && all(vec2(-1.25, 0.0) == expectedA.xy)) && all(vec3(-1.25, 0.0, 0.5) == expectedA.xyz)) && all(vec4(-1.25, 0.0, 0.5, 0.5) == expectedA)) && _skTemp4 == expectedB.x) && all(_skTemp5 == expectedB.xy)) && all(_skTemp6 == expectedB.xyz)) && all(_skTemp7 == expectedB)) && -1.25 == expectedB.x) && all(vec2(-1.25, 0.0) == expectedB.xy)) && all(vec3(-1.25, 0.0, 0.0) == expectedB.xyz)) && all(vec4(-1.25, 0.0, 0.0, 1.0) == expectedB))); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((((((((((_skTemp0 == expectedA.x) && all(_skTemp1 == expectedA.xy)) && all(_skTemp2 == expectedA.xyz)) && all(_skTemp3 == expectedA)) && (-1.25 == expectedA.x)) && all(vec2(-1.25, 0.0) == expectedA.xy)) && all(vec3(-1.25, 0.0, 0.5) == expectedA.xyz)) && all(vec4(-1.25, 0.0, 0.5, 0.5) == expectedA)) && (_skTemp4 == expectedB.x)) && all(_skTemp5 == expectedB.xy)) && all(_skTemp6 == expectedB.xyz)) && all(_skTemp7 == expectedB)) && (-1.25 == expectedB.x)) && all(vec2(-1.25, 0.0) == expectedB.xy)) && all(vec3(-1.25, 0.0, 0.0) == expectedB.xyz)) && all(vec4(-1.25, 0.0, 0.0, 1.0) == expectedB))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/intrinsics/MinInt.asm.frag b/tests/sksl/intrinsics/MinInt.asm.frag index 911fe78046ca..ef847d99f9dc 100644 --- a/tests/sksl/intrinsics/MinInt.asm.frag +++ b/tests/sksl/intrinsics/MinInt.asm.frag @@ -1,285 +1,285 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testInputs" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %intValues "intValues" -OpName %intGreen "intGreen" -OpName %expectedA "expectedA" -OpName %expectedB "expectedB" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %33 RelaxedPrecision -OpDecorate %35 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %48 RelaxedPrecision -OpDecorate %49 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %176 RelaxedPrecision -OpDecorate %179 RelaxedPrecision -OpDecorate %180 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testInputs" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %intValues "intValues" + OpName %intGreen "intGreen" + OpName %expectedA "expectedA" + OpName %expectedB "expectedB" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %33 RelaxedPrecision + OpDecorate %35 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %48 RelaxedPrecision + OpDecorate %49 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %176 RelaxedPrecision + OpDecorate %179 RelaxedPrecision + OpDecorate %180 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%int = OpTypeInt 32 1 -%v4int = OpTypeVector %int 4 + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %int = OpTypeInt 32 1 + %v4int = OpTypeVector %int 4 %_ptr_Function_v4int = OpTypePointer Function %v4int %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_0 = OpConstant %int 0 -%float_100 = OpConstant %float 100 -%int_1 = OpConstant %int 1 -%int_n125 = OpConstant %int -125 -%int_50 = OpConstant %int 50 -%62 = OpConstantComposite %v4int %int_n125 %int_0 %int_50 %int_50 -%int_100 = OpConstant %int 100 -%65 = OpConstantComposite %v4int %int_n125 %int_0 %int_0 %int_100 -%false = OpConstantFalse %bool -%v2int = OpTypeVector %int 2 -%75 = OpConstantComposite %v2int %int_50 %int_50 -%v2bool = OpTypeVector %bool 2 -%v3int = OpTypeVector %int 3 -%86 = OpConstantComposite %v3int %int_50 %int_50 %int_50 -%v3bool = OpTypeVector %bool 3 -%95 = OpConstantComposite %v4int %int_50 %int_50 %int_50 %int_50 -%v4bool = OpTypeVector %bool 4 -%true = OpConstantTrue %bool -%106 = OpConstantComposite %v2int %int_n125 %int_0 -%113 = OpConstantComposite %v3int %int_n125 %int_0 %int_50 -%162 = OpConstantComposite %v3int %int_n125 %int_0 %int_0 + %int_0 = OpConstant %int 0 + %float_100 = OpConstant %float 100 + %int_1 = OpConstant %int 1 + %int_n125 = OpConstant %int -125 + %int_50 = OpConstant %int 50 + %62 = OpConstantComposite %v4int %int_n125 %int_0 %int_50 %int_50 + %int_100 = OpConstant %int 100 + %65 = OpConstantComposite %v4int %int_n125 %int_0 %int_0 %int_100 + %false = OpConstantFalse %bool + %v2int = OpTypeVector %int 2 + %75 = OpConstantComposite %v2int %int_50 %int_50 + %v2bool = OpTypeVector %bool 2 + %v3int = OpTypeVector %int 3 + %86 = OpConstantComposite %v3int %int_50 %int_50 %int_50 + %v3bool = OpTypeVector %bool 3 + %95 = OpConstantComposite %v4int %int_50 %int_50 %int_50 %int_50 + %v4bool = OpTypeVector %bool 4 + %true = OpConstantTrue %bool + %106 = OpConstantComposite %v2int %int_n125 %int_0 + %113 = OpConstantComposite %v3int %int_n125 %int_0 %int_50 + %162 = OpConstantComposite %v3int %int_n125 %int_0 %int_0 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_2 = OpConstant %int 2 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%intValues = OpVariable %_ptr_Function_v4int Function -%intGreen = OpVariable %_ptr_Function_v4int Function -%expectedA = OpVariable %_ptr_Function_v4int Function -%expectedB = OpVariable %_ptr_Function_v4int Function -%170 = OpVariable %_ptr_Function_v4float Function -%30 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%33 = OpLoad %v4float %30 -%35 = OpVectorTimesScalar %v4float %33 %float_100 -%36 = OpCompositeExtract %float %35 0 -%37 = OpConvertFToS %int %36 -%38 = OpCompositeExtract %float %35 1 -%39 = OpConvertFToS %int %38 -%40 = OpCompositeExtract %float %35 2 -%41 = OpConvertFToS %int %40 -%42 = OpCompositeExtract %float %35 3 -%43 = OpConvertFToS %int %42 -%44 = OpCompositeConstruct %v4int %37 %39 %41 %43 -OpStore %intValues %44 -%46 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%48 = OpLoad %v4float %46 -%49 = OpVectorTimesScalar %v4float %48 %float_100 -%50 = OpCompositeExtract %float %49 0 -%51 = OpConvertFToS %int %50 -%52 = OpCompositeExtract %float %49 1 -%53 = OpConvertFToS %int %52 -%54 = OpCompositeExtract %float %49 2 -%55 = OpConvertFToS %int %54 -%56 = OpCompositeExtract %float %49 3 -%57 = OpConvertFToS %int %56 -%58 = OpCompositeConstruct %v4int %51 %53 %55 %57 -OpStore %intGreen %58 -OpStore %expectedA %62 -OpStore %expectedB %65 -%68 = OpCompositeExtract %int %44 0 -%67 = OpExtInst %int %1 SMin %68 %int_50 -%69 = OpIEqual %bool %67 %int_n125 -OpSelectionMerge %71 None -OpBranchConditional %69 %70 %71 -%70 = OpLabel -%73 = OpVectorShuffle %v2int %44 %44 0 1 -%72 = OpExtInst %v2int %1 SMin %73 %75 -%76 = OpVectorShuffle %v2int %62 %62 0 1 -%77 = OpIEqual %v2bool %72 %76 -%79 = OpAll %bool %77 -OpBranch %71 -%71 = OpLabel -%80 = OpPhi %bool %false %25 %79 %70 -OpSelectionMerge %82 None -OpBranchConditional %80 %81 %82 -%81 = OpLabel -%84 = OpVectorShuffle %v3int %44 %44 0 1 2 -%83 = OpExtInst %v3int %1 SMin %84 %86 -%87 = OpVectorShuffle %v3int %62 %62 0 1 2 -%88 = OpIEqual %v3bool %83 %87 -%90 = OpAll %bool %88 -OpBranch %82 -%82 = OpLabel -%91 = OpPhi %bool %false %71 %90 %81 -OpSelectionMerge %93 None -OpBranchConditional %91 %92 %93 -%92 = OpLabel -%94 = OpExtInst %v4int %1 SMin %44 %95 -%96 = OpIEqual %v4bool %94 %62 -%98 = OpAll %bool %96 -OpBranch %93 -%93 = OpLabel -%99 = OpPhi %bool %false %82 %98 %92 -OpSelectionMerge %101 None -OpBranchConditional %99 %100 %101 -%100 = OpLabel -OpBranch %101 -%101 = OpLabel -%103 = OpPhi %bool %false %93 %true %100 -OpSelectionMerge %105 None -OpBranchConditional %103 %104 %105 -%104 = OpLabel -%107 = OpVectorShuffle %v2int %62 %62 0 1 -%108 = OpIEqual %v2bool %106 %107 -%109 = OpAll %bool %108 -OpBranch %105 -%105 = OpLabel -%110 = OpPhi %bool %false %101 %109 %104 -OpSelectionMerge %112 None -OpBranchConditional %110 %111 %112 -%111 = OpLabel -%114 = OpVectorShuffle %v3int %62 %62 0 1 2 -%115 = OpIEqual %v3bool %113 %114 -%116 = OpAll %bool %115 -OpBranch %112 -%112 = OpLabel -%117 = OpPhi %bool %false %105 %116 %111 -OpSelectionMerge %119 None -OpBranchConditional %117 %118 %119 -%118 = OpLabel -OpBranch %119 -%119 = OpLabel -%120 = OpPhi %bool %false %112 %true %118 -OpSelectionMerge %122 None -OpBranchConditional %120 %121 %122 -%121 = OpLabel -%124 = OpCompositeExtract %int %58 0 -%123 = OpExtInst %int %1 SMin %68 %124 -%125 = OpIEqual %bool %123 %int_n125 -OpBranch %122 -%122 = OpLabel -%126 = OpPhi %bool %false %119 %125 %121 -OpSelectionMerge %128 None -OpBranchConditional %126 %127 %128 -%127 = OpLabel -%130 = OpVectorShuffle %v2int %44 %44 0 1 -%131 = OpVectorShuffle %v2int %58 %58 0 1 -%129 = OpExtInst %v2int %1 SMin %130 %131 -%132 = OpVectorShuffle %v2int %65 %65 0 1 -%133 = OpIEqual %v2bool %129 %132 -%134 = OpAll %bool %133 -OpBranch %128 -%128 = OpLabel -%135 = OpPhi %bool %false %122 %134 %127 -OpSelectionMerge %137 None -OpBranchConditional %135 %136 %137 -%136 = OpLabel -%139 = OpVectorShuffle %v3int %44 %44 0 1 2 -%140 = OpVectorShuffle %v3int %58 %58 0 1 2 -%138 = OpExtInst %v3int %1 SMin %139 %140 -%141 = OpVectorShuffle %v3int %65 %65 0 1 2 -%142 = OpIEqual %v3bool %138 %141 -%143 = OpAll %bool %142 -OpBranch %137 -%137 = OpLabel -%144 = OpPhi %bool %false %128 %143 %136 -OpSelectionMerge %146 None -OpBranchConditional %144 %145 %146 -%145 = OpLabel -%147 = OpExtInst %v4int %1 SMin %44 %58 -%148 = OpIEqual %v4bool %147 %65 -%149 = OpAll %bool %148 -OpBranch %146 -%146 = OpLabel -%150 = OpPhi %bool %false %137 %149 %145 -OpSelectionMerge %152 None -OpBranchConditional %150 %151 %152 -%151 = OpLabel -OpBranch %152 -%152 = OpLabel -%153 = OpPhi %bool %false %146 %true %151 -OpSelectionMerge %155 None -OpBranchConditional %153 %154 %155 -%154 = OpLabel -%156 = OpVectorShuffle %v2int %65 %65 0 1 -%157 = OpIEqual %v2bool %106 %156 -%158 = OpAll %bool %157 -OpBranch %155 -%155 = OpLabel -%159 = OpPhi %bool %false %152 %158 %154 -OpSelectionMerge %161 None -OpBranchConditional %159 %160 %161 -%160 = OpLabel -%163 = OpVectorShuffle %v3int %65 %65 0 1 2 -%164 = OpIEqual %v3bool %162 %163 -%165 = OpAll %bool %164 -OpBranch %161 -%161 = OpLabel -%166 = OpPhi %bool %false %155 %165 %160 -OpSelectionMerge %168 None -OpBranchConditional %166 %167 %168 -%167 = OpLabel -OpBranch %168 -%168 = OpLabel -%169 = OpPhi %bool %false %161 %true %167 -OpSelectionMerge %174 None -OpBranchConditional %169 %172 %173 -%172 = OpLabel -%175 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%176 = OpLoad %v4float %175 -OpStore %170 %176 -OpBranch %174 -%173 = OpLabel -%177 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%179 = OpLoad %v4float %177 -OpStore %170 %179 -OpBranch %174 -%174 = OpLabel -%180 = OpLoad %v4float %170 -OpReturnValue %180 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %intValues = OpVariable %_ptr_Function_v4int Function + %intGreen = OpVariable %_ptr_Function_v4int Function + %expectedA = OpVariable %_ptr_Function_v4int Function + %expectedB = OpVariable %_ptr_Function_v4int Function + %170 = OpVariable %_ptr_Function_v4float Function + %30 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %33 = OpLoad %v4float %30 + %35 = OpVectorTimesScalar %v4float %33 %float_100 + %36 = OpCompositeExtract %float %35 0 + %37 = OpConvertFToS %int %36 + %38 = OpCompositeExtract %float %35 1 + %39 = OpConvertFToS %int %38 + %40 = OpCompositeExtract %float %35 2 + %41 = OpConvertFToS %int %40 + %42 = OpCompositeExtract %float %35 3 + %43 = OpConvertFToS %int %42 + %44 = OpCompositeConstruct %v4int %37 %39 %41 %43 + OpStore %intValues %44 + %46 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %48 = OpLoad %v4float %46 + %49 = OpVectorTimesScalar %v4float %48 %float_100 + %50 = OpCompositeExtract %float %49 0 + %51 = OpConvertFToS %int %50 + %52 = OpCompositeExtract %float %49 1 + %53 = OpConvertFToS %int %52 + %54 = OpCompositeExtract %float %49 2 + %55 = OpConvertFToS %int %54 + %56 = OpCompositeExtract %float %49 3 + %57 = OpConvertFToS %int %56 + %58 = OpCompositeConstruct %v4int %51 %53 %55 %57 + OpStore %intGreen %58 + OpStore %expectedA %62 + OpStore %expectedB %65 + %68 = OpCompositeExtract %int %44 0 + %67 = OpExtInst %int %1 SMin %68 %int_50 + %69 = OpIEqual %bool %67 %int_n125 + OpSelectionMerge %71 None + OpBranchConditional %69 %70 %71 + %70 = OpLabel + %73 = OpVectorShuffle %v2int %44 %44 0 1 + %72 = OpExtInst %v2int %1 SMin %73 %75 + %76 = OpVectorShuffle %v2int %62 %62 0 1 + %77 = OpIEqual %v2bool %72 %76 + %79 = OpAll %bool %77 + OpBranch %71 + %71 = OpLabel + %80 = OpPhi %bool %false %25 %79 %70 + OpSelectionMerge %82 None + OpBranchConditional %80 %81 %82 + %81 = OpLabel + %84 = OpVectorShuffle %v3int %44 %44 0 1 2 + %83 = OpExtInst %v3int %1 SMin %84 %86 + %87 = OpVectorShuffle %v3int %62 %62 0 1 2 + %88 = OpIEqual %v3bool %83 %87 + %90 = OpAll %bool %88 + OpBranch %82 + %82 = OpLabel + %91 = OpPhi %bool %false %71 %90 %81 + OpSelectionMerge %93 None + OpBranchConditional %91 %92 %93 + %92 = OpLabel + %94 = OpExtInst %v4int %1 SMin %44 %95 + %96 = OpIEqual %v4bool %94 %62 + %98 = OpAll %bool %96 + OpBranch %93 + %93 = OpLabel + %99 = OpPhi %bool %false %82 %98 %92 + OpSelectionMerge %101 None + OpBranchConditional %99 %100 %101 + %100 = OpLabel + OpBranch %101 + %101 = OpLabel + %103 = OpPhi %bool %false %93 %true %100 + OpSelectionMerge %105 None + OpBranchConditional %103 %104 %105 + %104 = OpLabel + %107 = OpVectorShuffle %v2int %62 %62 0 1 + %108 = OpIEqual %v2bool %106 %107 + %109 = OpAll %bool %108 + OpBranch %105 + %105 = OpLabel + %110 = OpPhi %bool %false %101 %109 %104 + OpSelectionMerge %112 None + OpBranchConditional %110 %111 %112 + %111 = OpLabel + %114 = OpVectorShuffle %v3int %62 %62 0 1 2 + %115 = OpIEqual %v3bool %113 %114 + %116 = OpAll %bool %115 + OpBranch %112 + %112 = OpLabel + %117 = OpPhi %bool %false %105 %116 %111 + OpSelectionMerge %119 None + OpBranchConditional %117 %118 %119 + %118 = OpLabel + OpBranch %119 + %119 = OpLabel + %120 = OpPhi %bool %false %112 %true %118 + OpSelectionMerge %122 None + OpBranchConditional %120 %121 %122 + %121 = OpLabel + %124 = OpCompositeExtract %int %58 0 + %123 = OpExtInst %int %1 SMin %68 %124 + %125 = OpIEqual %bool %123 %int_n125 + OpBranch %122 + %122 = OpLabel + %126 = OpPhi %bool %false %119 %125 %121 + OpSelectionMerge %128 None + OpBranchConditional %126 %127 %128 + %127 = OpLabel + %130 = OpVectorShuffle %v2int %44 %44 0 1 + %131 = OpVectorShuffle %v2int %58 %58 0 1 + %129 = OpExtInst %v2int %1 SMin %130 %131 + %132 = OpVectorShuffle %v2int %65 %65 0 1 + %133 = OpIEqual %v2bool %129 %132 + %134 = OpAll %bool %133 + OpBranch %128 + %128 = OpLabel + %135 = OpPhi %bool %false %122 %134 %127 + OpSelectionMerge %137 None + OpBranchConditional %135 %136 %137 + %136 = OpLabel + %139 = OpVectorShuffle %v3int %44 %44 0 1 2 + %140 = OpVectorShuffle %v3int %58 %58 0 1 2 + %138 = OpExtInst %v3int %1 SMin %139 %140 + %141 = OpVectorShuffle %v3int %65 %65 0 1 2 + %142 = OpIEqual %v3bool %138 %141 + %143 = OpAll %bool %142 + OpBranch %137 + %137 = OpLabel + %144 = OpPhi %bool %false %128 %143 %136 + OpSelectionMerge %146 None + OpBranchConditional %144 %145 %146 + %145 = OpLabel + %147 = OpExtInst %v4int %1 SMin %44 %58 + %148 = OpIEqual %v4bool %147 %65 + %149 = OpAll %bool %148 + OpBranch %146 + %146 = OpLabel + %150 = OpPhi %bool %false %137 %149 %145 + OpSelectionMerge %152 None + OpBranchConditional %150 %151 %152 + %151 = OpLabel + OpBranch %152 + %152 = OpLabel + %153 = OpPhi %bool %false %146 %true %151 + OpSelectionMerge %155 None + OpBranchConditional %153 %154 %155 + %154 = OpLabel + %156 = OpVectorShuffle %v2int %65 %65 0 1 + %157 = OpIEqual %v2bool %106 %156 + %158 = OpAll %bool %157 + OpBranch %155 + %155 = OpLabel + %159 = OpPhi %bool %false %152 %158 %154 + OpSelectionMerge %161 None + OpBranchConditional %159 %160 %161 + %160 = OpLabel + %163 = OpVectorShuffle %v3int %65 %65 0 1 2 + %164 = OpIEqual %v3bool %162 %163 + %165 = OpAll %bool %164 + OpBranch %161 + %161 = OpLabel + %166 = OpPhi %bool %false %155 %165 %160 + OpSelectionMerge %168 None + OpBranchConditional %166 %167 %168 + %167 = OpLabel + OpBranch %168 + %168 = OpLabel + %169 = OpPhi %bool %false %161 %true %167 + OpSelectionMerge %174 None + OpBranchConditional %169 %172 %173 + %172 = OpLabel + %175 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %176 = OpLoad %v4float %175 + OpStore %170 %176 + OpBranch %174 + %173 = OpLabel + %177 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %179 = OpLoad %v4float %177 + OpStore %170 %179 + OpBranch %174 + %174 = OpLabel + %180 = OpLoad %v4float %170 + OpReturnValue %180 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/MinInt.skrp b/tests/sksl/intrinsics/MinInt.skrp index 0fe3c68e186c..a9d7ac1b5956 100644 --- a/tests/sksl/intrinsics/MinInt.skrp +++ b/tests/sksl/intrinsics/MinInt.skrp @@ -1,12 +1,14 @@ +112 instructions + [immutable slots] -expectedA(0) = 0xFFFFFF83 -expectedA(1) = 0 -expectedA(2) = 0x00000032 (7.006492e-44) -expectedA(3) = 0x00000032 (7.006492e-44) -expectedB(0) = 0xFFFFFF83 -expectedB(1) = 0 -expectedB(2) = 0 -expectedB(3) = 0x00000064 (1.401298e-43) +i0 = 0xFFFFFF83 +i1 = 0 +i2 = 0x00000032 (7.006492e-44) +i3 = 0x00000032 (7.006492e-44) +i4 = 0xFFFFFF83 +i5 = 0 +i6 = 0 +i7 = 0x00000064 (1.401298e-43) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -23,19 +25,18 @@ copy_4_slots_unmasked intGreen = $0..3 copy_slot_unmasked $0 = intValues(0) copy_constant $1 = 0x00000032 (7.006492e-44) min_int $0 = min($0, $1) -copy_slot_unmasked $1 = expectedA(0) -cmpeq_int $0 = equal($0, $1) +cmpeq_imm_int $0 = equal($0, 0xFFFFFF83) copy_2_slots_unmasked $1..2 = intValues(0..1) splat_2_constants $3..4 = 0x00000032 (7.006492e-44) min_2_ints $1..2 = min($1..2, $3..4) -copy_2_slots_unmasked $3..4 = expectedA(0..1) +copy_2_immutables_unmasked $3..4 = i0..1 [0xFFFFFF83, 0] cmpeq_2_ints $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_3_slots_unmasked $1..3 = intValues(0..2) splat_3_constants $4..6 = 0x00000032 (7.006492e-44) min_3_ints $1..3 = min($1..3, $4..6) -copy_3_slots_unmasked $4..6 = expectedA(0..2) +copy_3_immutables_unmasked $4..6 = i0..2 [0xFFFFFF83, 0, 0x00000032 (7.006492e-44)] cmpeq_3_ints $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 @@ -43,32 +44,27 @@ bitwise_and_int $0 &= $1 copy_4_slots_unmasked $1..4 = intValues splat_4_constants $5..8 = 0x00000032 (7.006492e-44) min_4_ints $1..4 = min($1..4, $5..8) -copy_4_slots_unmasked $5..8 = expectedA +copy_4_immutables_unmasked $5..8 = i0..3 [0xFFFFFF83, 0, 0x00000032 (7.006492e-44), 0x00000032 (7.006492e-44)] cmpeq_4_ints $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expectedA(0) +copy_constant $1 = 0xFFFFFF83 cmpeq_imm_int $1 = equal($1, 0xFFFFFF83) bitwise_and_int $0 &= $1 -copy_constant $1 = 0xFFFFFF83 -copy_constant $2 = 0 -copy_2_slots_unmasked $3..4 = expectedA(0..1) +copy_2_immutables_unmasked $1..2 = i4..5 [0xFFFFFF83, 0] +copy_2_immutables_unmasked $3..4 = i0..1 [0xFFFFFF83, 0] cmpeq_2_ints $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0xFFFFFF83 -copy_constant $2 = 0 -copy_constant $3 = 0x00000032 (7.006492e-44) -copy_3_slots_unmasked $4..6 = expectedA(0..2) +copy_3_immutables_unmasked $1..3 = i0..2 [0xFFFFFF83, 0, 0x00000032 (7.006492e-44)] +copy_3_immutables_unmasked $4..6 = i0..2 [0xFFFFFF83, 0, 0x00000032 (7.006492e-44)] cmpeq_3_ints $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0xFFFFFF83 -copy_constant $2 = 0 -splat_2_constants $3..4 = 0x00000032 (7.006492e-44) -copy_4_slots_unmasked $5..8 = expectedA +copy_4_immutables_unmasked $1..4 = i0..3 [0xFFFFFF83, 0, 0x00000032 (7.006492e-44), 0x00000032 (7.006492e-44)] +copy_4_immutables_unmasked $5..8 = i0..3 [0xFFFFFF83, 0, 0x00000032 (7.006492e-44), 0x00000032 (7.006492e-44)] cmpeq_4_ints $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -76,20 +72,19 @@ bitwise_and_int $0 &= $1 copy_slot_unmasked $1 = intValues(0) copy_slot_unmasked $2 = intGreen(0) min_int $1 = min($1, $2) -copy_slot_unmasked $2 = expectedB(0) -cmpeq_int $1 = equal($1, $2) +cmpeq_imm_int $1 = equal($1, 0xFFFFFF83) bitwise_and_int $0 &= $1 copy_2_slots_unmasked $1..2 = intValues(0..1) copy_2_slots_unmasked $3..4 = intGreen(0..1) min_2_ints $1..2 = min($1..2, $3..4) -copy_2_slots_unmasked $3..4 = expectedB(0..1) +copy_2_immutables_unmasked $3..4 = i4..5 [0xFFFFFF83, 0] cmpeq_2_ints $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_3_slots_unmasked $1..3 = intValues(0..2) copy_3_slots_unmasked $4..6 = intGreen(0..2) min_3_ints $1..3 = min($1..3, $4..6) -copy_3_slots_unmasked $4..6 = expectedB(0..2) +copy_3_immutables_unmasked $4..6 = i4..6 [0xFFFFFF83, 0, 0] cmpeq_3_ints $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 @@ -97,31 +92,27 @@ bitwise_and_int $0 &= $1 copy_4_slots_unmasked $1..4 = intValues copy_4_slots_unmasked $5..8 = intGreen min_4_ints $1..4 = min($1..4, $5..8) -copy_4_slots_unmasked $5..8 = expectedB +copy_4_immutables_unmasked $5..8 = i4..7 [0xFFFFFF83, 0, 0, 0x00000064 (1.401298e-43)] cmpeq_4_ints $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expectedB(0) +copy_constant $1 = 0xFFFFFF83 cmpeq_imm_int $1 = equal($1, 0xFFFFFF83) bitwise_and_int $0 &= $1 -copy_constant $1 = 0xFFFFFF83 -copy_constant $2 = 0 -copy_2_slots_unmasked $3..4 = expectedB(0..1) +copy_2_immutables_unmasked $1..2 = i4..5 [0xFFFFFF83, 0] +copy_2_immutables_unmasked $3..4 = i4..5 [0xFFFFFF83, 0] cmpeq_2_ints $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0xFFFFFF83 -splat_2_constants $2..3 = 0 -copy_3_slots_unmasked $4..6 = expectedB(0..2) +copy_3_immutables_unmasked $1..3 = i4..6 [0xFFFFFF83, 0, 0] +copy_3_immutables_unmasked $4..6 = i4..6 [0xFFFFFF83, 0, 0] cmpeq_3_ints $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0xFFFFFF83 -splat_2_constants $2..3 = 0 -copy_constant $4 = 0x00000064 (1.401298e-43) -copy_4_slots_unmasked $5..8 = expectedB +copy_4_immutables_unmasked $1..4 = i4..7 [0xFFFFFF83, 0, 0, 0x00000064 (1.401298e-43)] +copy_4_immutables_unmasked $5..8 = i4..7 [0xFFFFFF83, 0, 0, 0x00000064 (1.401298e-43)] cmpeq_4_ints $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 diff --git a/tests/sksl/intrinsics/MinInt.wgsl b/tests/sksl/intrinsics/MinInt.wgsl index fd5aa114ba71..cb4a7cbf3e17 100644 --- a/tests/sksl/intrinsics/MinInt.wgsl +++ b/tests/sksl/intrinsics/MinInt.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -26,7 +27,7 @@ fn main(_skParam0: vec2) -> vec4 { let _skTemp5 = min(intValues.xy, intGreen.xy); let _skTemp6 = min(intValues.xyz, intGreen.xyz); let _skTemp7 = min(intValues, intGreen); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((((((((((_skTemp0 == expectedA.x && all(_skTemp1 == expectedA.xy)) && all(_skTemp2 == expectedA.xyz)) && all(_skTemp3 == expectedA)) && -125 == expectedA.x) && all(vec2(-125, 0) == expectedA.xy)) && all(vec3(-125, 0, 50) == expectedA.xyz)) && all(vec4(-125, 0, 50, 50) == expectedA)) && _skTemp4 == expectedB.x) && all(_skTemp5 == expectedB.xy)) && all(_skTemp6 == expectedB.xyz)) && all(_skTemp7 == expectedB)) && -125 == expectedB.x) && all(vec2(-125, 0) == expectedB.xy)) && all(vec3(-125, 0, 0) == expectedB.xyz)) && all(vec4(-125, 0, 0, 100) == expectedB))); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((((((((((_skTemp0 == expectedA.x) && all(_skTemp1 == expectedA.xy)) && all(_skTemp2 == expectedA.xyz)) && all(_skTemp3 == expectedA)) && (-125 == expectedA.x)) && all(vec2(-125, 0) == expectedA.xy)) && all(vec3(-125, 0, 50) == expectedA.xyz)) && all(vec4(-125, 0, 50, 50) == expectedA)) && (_skTemp4 == expectedB.x)) && all(_skTemp5 == expectedB.xy)) && all(_skTemp6 == expectedB.xyz)) && all(_skTemp7 == expectedB)) && (-125 == expectedB.x)) && all(vec2(-125, 0) == expectedB.xy)) && all(vec3(-125, 0, 0) == expectedB.xyz)) && all(vec4(-125, 0, 0, 100) == expectedB))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/intrinsics/MinUint.asm.frag b/tests/sksl/intrinsics/MinUint.asm.frag index 9511ba1c03d1..34d395a8f568 100644 --- a/tests/sksl/intrinsics/MinUint.asm.frag +++ b/tests/sksl/intrinsics/MinUint.asm.frag @@ -1,289 +1,289 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testInputs" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %uintValues "uintValues" -OpName %uintGreen "uintGreen" -OpName %expectedA "expectedA" -OpName %expectedB "expectedB" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %30 RelaxedPrecision -OpDecorate %35 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %51 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %58 RelaxedPrecision -OpDecorate %179 RelaxedPrecision -OpDecorate %182 RelaxedPrecision -OpDecorate %183 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testInputs" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %uintValues "uintValues" + OpName %uintGreen "uintGreen" + OpName %expectedA "expectedA" + OpName %expectedB "expectedB" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %30 RelaxedPrecision + OpDecorate %35 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %58 RelaxedPrecision + OpDecorate %179 RelaxedPrecision + OpDecorate %182 RelaxedPrecision + OpDecorate %183 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%uint = OpTypeInt 32 0 -%v4uint = OpTypeVector %uint 4 + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %uint = OpTypeInt 32 0 + %v4uint = OpTypeVector %uint 4 %_ptr_Function_v4uint = OpTypePointer Function %v4uint %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%float_100 = OpConstant %float 100 -%int_1 = OpConstant %int 1 -%uint_50 = OpConstant %uint 50 -%uint_0 = OpConstant %uint 0 -%64 = OpConstantComposite %v4uint %uint_50 %uint_0 %uint_50 %uint_50 -%uint_100 = OpConstant %uint 100 -%67 = OpConstantComposite %v4uint %uint_0 %uint_0 %uint_0 %uint_100 -%false = OpConstantFalse %bool -%v2uint = OpTypeVector %uint 2 -%77 = OpConstantComposite %v2uint %uint_50 %uint_50 -%v2bool = OpTypeVector %bool 2 -%v3uint = OpTypeVector %uint 3 -%88 = OpConstantComposite %v3uint %uint_50 %uint_50 %uint_50 -%v3bool = OpTypeVector %bool 3 -%97 = OpConstantComposite %v4uint %uint_50 %uint_50 %uint_50 %uint_50 -%v4bool = OpTypeVector %bool 4 -%true = OpConstantTrue %bool -%108 = OpConstantComposite %v2uint %uint_50 %uint_0 -%115 = OpConstantComposite %v3uint %uint_50 %uint_0 %uint_50 -%158 = OpConstantComposite %v2uint %uint_0 %uint_0 -%165 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %float_100 = OpConstant %float 100 + %int_1 = OpConstant %int 1 + %uint_50 = OpConstant %uint 50 + %uint_0 = OpConstant %uint 0 + %64 = OpConstantComposite %v4uint %uint_50 %uint_0 %uint_50 %uint_50 + %uint_100 = OpConstant %uint 100 + %67 = OpConstantComposite %v4uint %uint_0 %uint_0 %uint_0 %uint_100 + %false = OpConstantFalse %bool + %v2uint = OpTypeVector %uint 2 + %77 = OpConstantComposite %v2uint %uint_50 %uint_50 + %v2bool = OpTypeVector %bool 2 + %v3uint = OpTypeVector %uint 3 + %88 = OpConstantComposite %v3uint %uint_50 %uint_50 %uint_50 + %v3bool = OpTypeVector %bool 3 + %97 = OpConstantComposite %v4uint %uint_50 %uint_50 %uint_50 %uint_50 + %v4bool = OpTypeVector %bool 4 + %true = OpConstantTrue %bool + %108 = OpConstantComposite %v2uint %uint_50 %uint_0 + %115 = OpConstantComposite %v3uint %uint_50 %uint_0 %uint_50 + %158 = OpConstantComposite %v2uint %uint_0 %uint_0 + %165 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_0 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_2 = OpConstant %int 2 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%uintValues = OpVariable %_ptr_Function_v4uint Function -%uintGreen = OpVariable %_ptr_Function_v4uint Function -%expectedA = OpVariable %_ptr_Function_v4uint Function -%expectedB = OpVariable %_ptr_Function_v4uint Function -%173 = OpVariable %_ptr_Function_v4float Function -%31 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%35 = OpLoad %v4float %31 -%30 = OpExtInst %v4float %1 FAbs %35 -%37 = OpVectorTimesScalar %v4float %30 %float_100 -%38 = OpCompositeExtract %float %37 0 -%39 = OpConvertFToU %uint %38 -%40 = OpCompositeExtract %float %37 1 -%41 = OpConvertFToU %uint %40 -%42 = OpCompositeExtract %float %37 2 -%43 = OpConvertFToU %uint %42 -%44 = OpCompositeExtract %float %37 3 -%45 = OpConvertFToU %uint %44 -%46 = OpCompositeConstruct %v4uint %39 %41 %43 %45 -OpStore %uintValues %46 -%48 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%50 = OpLoad %v4float %48 -%51 = OpVectorTimesScalar %v4float %50 %float_100 -%52 = OpCompositeExtract %float %51 0 -%53 = OpConvertFToU %uint %52 -%54 = OpCompositeExtract %float %51 1 -%55 = OpConvertFToU %uint %54 -%56 = OpCompositeExtract %float %51 2 -%57 = OpConvertFToU %uint %56 -%58 = OpCompositeExtract %float %51 3 -%59 = OpConvertFToU %uint %58 -%60 = OpCompositeConstruct %v4uint %53 %55 %57 %59 -OpStore %uintGreen %60 -OpStore %expectedA %64 -OpStore %expectedB %67 -%70 = OpCompositeExtract %uint %46 0 -%69 = OpExtInst %uint %1 UMin %70 %uint_50 -%71 = OpIEqual %bool %69 %uint_50 -OpSelectionMerge %73 None -OpBranchConditional %71 %72 %73 -%72 = OpLabel -%75 = OpVectorShuffle %v2uint %46 %46 0 1 -%74 = OpExtInst %v2uint %1 UMin %75 %77 -%78 = OpVectorShuffle %v2uint %64 %64 0 1 -%79 = OpIEqual %v2bool %74 %78 -%81 = OpAll %bool %79 -OpBranch %73 -%73 = OpLabel -%82 = OpPhi %bool %false %25 %81 %72 -OpSelectionMerge %84 None -OpBranchConditional %82 %83 %84 -%83 = OpLabel -%86 = OpVectorShuffle %v3uint %46 %46 0 1 2 -%85 = OpExtInst %v3uint %1 UMin %86 %88 -%89 = OpVectorShuffle %v3uint %64 %64 0 1 2 -%90 = OpIEqual %v3bool %85 %89 -%92 = OpAll %bool %90 -OpBranch %84 -%84 = OpLabel -%93 = OpPhi %bool %false %73 %92 %83 -OpSelectionMerge %95 None -OpBranchConditional %93 %94 %95 -%94 = OpLabel -%96 = OpExtInst %v4uint %1 UMin %46 %97 -%98 = OpIEqual %v4bool %96 %64 -%100 = OpAll %bool %98 -OpBranch %95 -%95 = OpLabel -%101 = OpPhi %bool %false %84 %100 %94 -OpSelectionMerge %103 None -OpBranchConditional %101 %102 %103 -%102 = OpLabel -OpBranch %103 -%103 = OpLabel -%105 = OpPhi %bool %false %95 %true %102 -OpSelectionMerge %107 None -OpBranchConditional %105 %106 %107 -%106 = OpLabel -%109 = OpVectorShuffle %v2uint %64 %64 0 1 -%110 = OpIEqual %v2bool %108 %109 -%111 = OpAll %bool %110 -OpBranch %107 -%107 = OpLabel -%112 = OpPhi %bool %false %103 %111 %106 -OpSelectionMerge %114 None -OpBranchConditional %112 %113 %114 -%113 = OpLabel -%116 = OpVectorShuffle %v3uint %64 %64 0 1 2 -%117 = OpIEqual %v3bool %115 %116 -%118 = OpAll %bool %117 -OpBranch %114 -%114 = OpLabel -%119 = OpPhi %bool %false %107 %118 %113 -OpSelectionMerge %121 None -OpBranchConditional %119 %120 %121 -%120 = OpLabel -OpBranch %121 -%121 = OpLabel -%122 = OpPhi %bool %false %114 %true %120 -OpSelectionMerge %124 None -OpBranchConditional %122 %123 %124 -%123 = OpLabel -%126 = OpCompositeExtract %uint %60 0 -%125 = OpExtInst %uint %1 UMin %70 %126 -%127 = OpIEqual %bool %125 %uint_0 -OpBranch %124 -%124 = OpLabel -%128 = OpPhi %bool %false %121 %127 %123 -OpSelectionMerge %130 None -OpBranchConditional %128 %129 %130 -%129 = OpLabel -%132 = OpVectorShuffle %v2uint %46 %46 0 1 -%133 = OpVectorShuffle %v2uint %60 %60 0 1 -%131 = OpExtInst %v2uint %1 UMin %132 %133 -%134 = OpVectorShuffle %v2uint %67 %67 0 1 -%135 = OpIEqual %v2bool %131 %134 -%136 = OpAll %bool %135 -OpBranch %130 -%130 = OpLabel -%137 = OpPhi %bool %false %124 %136 %129 -OpSelectionMerge %139 None -OpBranchConditional %137 %138 %139 -%138 = OpLabel -%141 = OpVectorShuffle %v3uint %46 %46 0 1 2 -%142 = OpVectorShuffle %v3uint %60 %60 0 1 2 -%140 = OpExtInst %v3uint %1 UMin %141 %142 -%143 = OpVectorShuffle %v3uint %67 %67 0 1 2 -%144 = OpIEqual %v3bool %140 %143 -%145 = OpAll %bool %144 -OpBranch %139 -%139 = OpLabel -%146 = OpPhi %bool %false %130 %145 %138 -OpSelectionMerge %148 None -OpBranchConditional %146 %147 %148 -%147 = OpLabel -%149 = OpExtInst %v4uint %1 UMin %46 %60 -%150 = OpIEqual %v4bool %149 %67 -%151 = OpAll %bool %150 -OpBranch %148 -%148 = OpLabel -%152 = OpPhi %bool %false %139 %151 %147 -OpSelectionMerge %154 None -OpBranchConditional %152 %153 %154 -%153 = OpLabel -OpBranch %154 -%154 = OpLabel -%155 = OpPhi %bool %false %148 %true %153 -OpSelectionMerge %157 None -OpBranchConditional %155 %156 %157 -%156 = OpLabel -%159 = OpVectorShuffle %v2uint %67 %67 0 1 -%160 = OpIEqual %v2bool %158 %159 -%161 = OpAll %bool %160 -OpBranch %157 -%157 = OpLabel -%162 = OpPhi %bool %false %154 %161 %156 -OpSelectionMerge %164 None -OpBranchConditional %162 %163 %164 -%163 = OpLabel -%166 = OpVectorShuffle %v3uint %67 %67 0 1 2 -%167 = OpIEqual %v3bool %165 %166 -%168 = OpAll %bool %167 -OpBranch %164 -%164 = OpLabel -%169 = OpPhi %bool %false %157 %168 %163 -OpSelectionMerge %171 None -OpBranchConditional %169 %170 %171 -%170 = OpLabel -OpBranch %171 -%171 = OpLabel -%172 = OpPhi %bool %false %164 %true %170 -OpSelectionMerge %177 None -OpBranchConditional %172 %175 %176 -%175 = OpLabel -%178 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%179 = OpLoad %v4float %178 -OpStore %173 %179 -OpBranch %177 -%176 = OpLabel -%180 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%182 = OpLoad %v4float %180 -OpStore %173 %182 -OpBranch %177 -%177 = OpLabel -%183 = OpLoad %v4float %173 -OpReturnValue %183 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %uintValues = OpVariable %_ptr_Function_v4uint Function + %uintGreen = OpVariable %_ptr_Function_v4uint Function + %expectedA = OpVariable %_ptr_Function_v4uint Function + %expectedB = OpVariable %_ptr_Function_v4uint Function + %173 = OpVariable %_ptr_Function_v4float Function + %31 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %35 = OpLoad %v4float %31 + %30 = OpExtInst %v4float %1 FAbs %35 + %37 = OpVectorTimesScalar %v4float %30 %float_100 + %38 = OpCompositeExtract %float %37 0 + %39 = OpConvertFToU %uint %38 + %40 = OpCompositeExtract %float %37 1 + %41 = OpConvertFToU %uint %40 + %42 = OpCompositeExtract %float %37 2 + %43 = OpConvertFToU %uint %42 + %44 = OpCompositeExtract %float %37 3 + %45 = OpConvertFToU %uint %44 + %46 = OpCompositeConstruct %v4uint %39 %41 %43 %45 + OpStore %uintValues %46 + %48 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %50 = OpLoad %v4float %48 + %51 = OpVectorTimesScalar %v4float %50 %float_100 + %52 = OpCompositeExtract %float %51 0 + %53 = OpConvertFToU %uint %52 + %54 = OpCompositeExtract %float %51 1 + %55 = OpConvertFToU %uint %54 + %56 = OpCompositeExtract %float %51 2 + %57 = OpConvertFToU %uint %56 + %58 = OpCompositeExtract %float %51 3 + %59 = OpConvertFToU %uint %58 + %60 = OpCompositeConstruct %v4uint %53 %55 %57 %59 + OpStore %uintGreen %60 + OpStore %expectedA %64 + OpStore %expectedB %67 + %70 = OpCompositeExtract %uint %46 0 + %69 = OpExtInst %uint %1 UMin %70 %uint_50 + %71 = OpIEqual %bool %69 %uint_50 + OpSelectionMerge %73 None + OpBranchConditional %71 %72 %73 + %72 = OpLabel + %75 = OpVectorShuffle %v2uint %46 %46 0 1 + %74 = OpExtInst %v2uint %1 UMin %75 %77 + %78 = OpVectorShuffle %v2uint %64 %64 0 1 + %79 = OpIEqual %v2bool %74 %78 + %81 = OpAll %bool %79 + OpBranch %73 + %73 = OpLabel + %82 = OpPhi %bool %false %25 %81 %72 + OpSelectionMerge %84 None + OpBranchConditional %82 %83 %84 + %83 = OpLabel + %86 = OpVectorShuffle %v3uint %46 %46 0 1 2 + %85 = OpExtInst %v3uint %1 UMin %86 %88 + %89 = OpVectorShuffle %v3uint %64 %64 0 1 2 + %90 = OpIEqual %v3bool %85 %89 + %92 = OpAll %bool %90 + OpBranch %84 + %84 = OpLabel + %93 = OpPhi %bool %false %73 %92 %83 + OpSelectionMerge %95 None + OpBranchConditional %93 %94 %95 + %94 = OpLabel + %96 = OpExtInst %v4uint %1 UMin %46 %97 + %98 = OpIEqual %v4bool %96 %64 + %100 = OpAll %bool %98 + OpBranch %95 + %95 = OpLabel + %101 = OpPhi %bool %false %84 %100 %94 + OpSelectionMerge %103 None + OpBranchConditional %101 %102 %103 + %102 = OpLabel + OpBranch %103 + %103 = OpLabel + %105 = OpPhi %bool %false %95 %true %102 + OpSelectionMerge %107 None + OpBranchConditional %105 %106 %107 + %106 = OpLabel + %109 = OpVectorShuffle %v2uint %64 %64 0 1 + %110 = OpIEqual %v2bool %108 %109 + %111 = OpAll %bool %110 + OpBranch %107 + %107 = OpLabel + %112 = OpPhi %bool %false %103 %111 %106 + OpSelectionMerge %114 None + OpBranchConditional %112 %113 %114 + %113 = OpLabel + %116 = OpVectorShuffle %v3uint %64 %64 0 1 2 + %117 = OpIEqual %v3bool %115 %116 + %118 = OpAll %bool %117 + OpBranch %114 + %114 = OpLabel + %119 = OpPhi %bool %false %107 %118 %113 + OpSelectionMerge %121 None + OpBranchConditional %119 %120 %121 + %120 = OpLabel + OpBranch %121 + %121 = OpLabel + %122 = OpPhi %bool %false %114 %true %120 + OpSelectionMerge %124 None + OpBranchConditional %122 %123 %124 + %123 = OpLabel + %126 = OpCompositeExtract %uint %60 0 + %125 = OpExtInst %uint %1 UMin %70 %126 + %127 = OpIEqual %bool %125 %uint_0 + OpBranch %124 + %124 = OpLabel + %128 = OpPhi %bool %false %121 %127 %123 + OpSelectionMerge %130 None + OpBranchConditional %128 %129 %130 + %129 = OpLabel + %132 = OpVectorShuffle %v2uint %46 %46 0 1 + %133 = OpVectorShuffle %v2uint %60 %60 0 1 + %131 = OpExtInst %v2uint %1 UMin %132 %133 + %134 = OpVectorShuffle %v2uint %67 %67 0 1 + %135 = OpIEqual %v2bool %131 %134 + %136 = OpAll %bool %135 + OpBranch %130 + %130 = OpLabel + %137 = OpPhi %bool %false %124 %136 %129 + OpSelectionMerge %139 None + OpBranchConditional %137 %138 %139 + %138 = OpLabel + %141 = OpVectorShuffle %v3uint %46 %46 0 1 2 + %142 = OpVectorShuffle %v3uint %60 %60 0 1 2 + %140 = OpExtInst %v3uint %1 UMin %141 %142 + %143 = OpVectorShuffle %v3uint %67 %67 0 1 2 + %144 = OpIEqual %v3bool %140 %143 + %145 = OpAll %bool %144 + OpBranch %139 + %139 = OpLabel + %146 = OpPhi %bool %false %130 %145 %138 + OpSelectionMerge %148 None + OpBranchConditional %146 %147 %148 + %147 = OpLabel + %149 = OpExtInst %v4uint %1 UMin %46 %60 + %150 = OpIEqual %v4bool %149 %67 + %151 = OpAll %bool %150 + OpBranch %148 + %148 = OpLabel + %152 = OpPhi %bool %false %139 %151 %147 + OpSelectionMerge %154 None + OpBranchConditional %152 %153 %154 + %153 = OpLabel + OpBranch %154 + %154 = OpLabel + %155 = OpPhi %bool %false %148 %true %153 + OpSelectionMerge %157 None + OpBranchConditional %155 %156 %157 + %156 = OpLabel + %159 = OpVectorShuffle %v2uint %67 %67 0 1 + %160 = OpIEqual %v2bool %158 %159 + %161 = OpAll %bool %160 + OpBranch %157 + %157 = OpLabel + %162 = OpPhi %bool %false %154 %161 %156 + OpSelectionMerge %164 None + OpBranchConditional %162 %163 %164 + %163 = OpLabel + %166 = OpVectorShuffle %v3uint %67 %67 0 1 2 + %167 = OpIEqual %v3bool %165 %166 + %168 = OpAll %bool %167 + OpBranch %164 + %164 = OpLabel + %169 = OpPhi %bool %false %157 %168 %163 + OpSelectionMerge %171 None + OpBranchConditional %169 %170 %171 + %170 = OpLabel + OpBranch %171 + %171 = OpLabel + %172 = OpPhi %bool %false %164 %true %170 + OpSelectionMerge %177 None + OpBranchConditional %172 %175 %176 + %175 = OpLabel + %178 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %179 = OpLoad %v4float %178 + OpStore %173 %179 + OpBranch %177 + %176 = OpLabel + %180 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %182 = OpLoad %v4float %180 + OpStore %173 %182 + OpBranch %177 + %177 = OpLabel + %183 = OpLoad %v4float %173 + OpReturnValue %183 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/MinUint.skrp b/tests/sksl/intrinsics/MinUint.skrp index 2a1bd2aaeaf2..30282c432744 100644 --- a/tests/sksl/intrinsics/MinUint.skrp +++ b/tests/sksl/intrinsics/MinUint.skrp @@ -1,12 +1,14 @@ +113 instructions + [immutable slots] -expectedA(0) = 0x00000032 (7.006492e-44) -expectedA(1) = 0 -expectedA(2) = 0x00000032 (7.006492e-44) -expectedA(3) = 0x00000032 (7.006492e-44) -expectedB(0) = 0 -expectedB(1) = 0 -expectedB(2) = 0 -expectedB(3) = 0x00000064 (1.401298e-43) +i0 = 0x00000032 (7.006492e-44) +i1 = 0 +i2 = 0x00000032 (7.006492e-44) +i3 = 0x00000032 (7.006492e-44) +i4 = 0 +i5 = 0 +i6 = 0 +i7 = 0x00000064 (1.401298e-43) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -24,19 +26,18 @@ copy_4_slots_unmasked uintGreen = $0..3 copy_slot_unmasked $0 = uintValues(0) copy_constant $1 = 0x00000032 (7.006492e-44) min_uint $0 = min($0, $1) -copy_slot_unmasked $1 = expectedA(0) -cmpeq_int $0 = equal($0, $1) +cmpeq_imm_int $0 = equal($0, 0x00000032) copy_2_slots_unmasked $1..2 = uintValues(0..1) splat_2_constants $3..4 = 0x00000032 (7.006492e-44) min_2_uints $1..2 = min($1..2, $3..4) -copy_2_slots_unmasked $3..4 = expectedA(0..1) +copy_2_immutables_unmasked $3..4 = i0..1 [0x00000032 (7.006492e-44), 0] cmpeq_2_ints $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_3_slots_unmasked $1..3 = uintValues(0..2) splat_3_constants $4..6 = 0x00000032 (7.006492e-44) min_3_uints $1..3 = min($1..3, $4..6) -copy_3_slots_unmasked $4..6 = expectedA(0..2) +copy_3_immutables_unmasked $4..6 = i0..2 [0x00000032 (7.006492e-44), 0, 0x00000032 (7.006492e-44)] cmpeq_3_ints $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 @@ -44,32 +45,27 @@ bitwise_and_int $0 &= $1 copy_4_slots_unmasked $1..4 = uintValues splat_4_constants $5..8 = 0x00000032 (7.006492e-44) min_4_uints $1..4 = min($1..4, $5..8) -copy_4_slots_unmasked $5..8 = expectedA +copy_4_immutables_unmasked $5..8 = i0..3 [0x00000032 (7.006492e-44), 0, 0x00000032 (7.006492e-44), 0x00000032 (7.006492e-44)] cmpeq_4_ints $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expectedA(0) +copy_constant $1 = 0x00000032 (7.006492e-44) cmpeq_imm_int $1 = equal($1, 0x00000032) bitwise_and_int $0 &= $1 -copy_constant $1 = 0x00000032 (7.006492e-44) -copy_constant $2 = 0 -copy_2_slots_unmasked $3..4 = expectedA(0..1) +copy_2_immutables_unmasked $1..2 = i0..1 [0x00000032 (7.006492e-44), 0] +copy_2_immutables_unmasked $3..4 = i0..1 [0x00000032 (7.006492e-44), 0] cmpeq_2_ints $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0x00000032 (7.006492e-44) -copy_constant $2 = 0 -copy_constant $3 = 0x00000032 (7.006492e-44) -copy_3_slots_unmasked $4..6 = expectedA(0..2) +copy_3_immutables_unmasked $1..3 = i0..2 [0x00000032 (7.006492e-44), 0, 0x00000032 (7.006492e-44)] +copy_3_immutables_unmasked $4..6 = i0..2 [0x00000032 (7.006492e-44), 0, 0x00000032 (7.006492e-44)] cmpeq_3_ints $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0x00000032 (7.006492e-44) -copy_constant $2 = 0 -splat_2_constants $3..4 = 0x00000032 (7.006492e-44) -copy_4_slots_unmasked $5..8 = expectedA +copy_4_immutables_unmasked $1..4 = i0..3 [0x00000032 (7.006492e-44), 0, 0x00000032 (7.006492e-44), 0x00000032 (7.006492e-44)] +copy_4_immutables_unmasked $5..8 = i0..3 [0x00000032 (7.006492e-44), 0, 0x00000032 (7.006492e-44), 0x00000032 (7.006492e-44)] cmpeq_4_ints $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -77,20 +73,19 @@ bitwise_and_int $0 &= $1 copy_slot_unmasked $1 = uintValues(0) copy_slot_unmasked $2 = uintGreen(0) min_uint $1 = min($1, $2) -copy_slot_unmasked $2 = expectedB(0) -cmpeq_int $1 = equal($1, $2) +cmpeq_imm_int $1 = equal($1, 0) bitwise_and_int $0 &= $1 copy_2_slots_unmasked $1..2 = uintValues(0..1) copy_2_slots_unmasked $3..4 = uintGreen(0..1) min_2_uints $1..2 = min($1..2, $3..4) -copy_2_slots_unmasked $3..4 = expectedB(0..1) +copy_2_immutables_unmasked $3..4 = i4..5 [0, 0] cmpeq_2_ints $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_3_slots_unmasked $1..3 = uintValues(0..2) copy_3_slots_unmasked $4..6 = uintGreen(0..2) min_3_uints $1..3 = min($1..3, $4..6) -copy_3_slots_unmasked $4..6 = expectedB(0..2) +copy_3_immutables_unmasked $4..6 = i4..6 [0, 0, 0] cmpeq_3_ints $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 @@ -98,28 +93,27 @@ bitwise_and_int $0 &= $1 copy_4_slots_unmasked $1..4 = uintValues copy_4_slots_unmasked $5..8 = uintGreen min_4_uints $1..4 = min($1..4, $5..8) -copy_4_slots_unmasked $5..8 = expectedB +copy_4_immutables_unmasked $5..8 = i4..7 [0, 0, 0, 0x00000064 (1.401298e-43)] cmpeq_4_ints $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expectedB(0) +copy_constant $1 = 0 cmpeq_imm_int $1 = equal($1, 0) bitwise_and_int $0 &= $1 splat_2_constants $1..2 = 0 -copy_2_slots_unmasked $3..4 = expectedB(0..1) +copy_2_immutables_unmasked $3..4 = i4..5 [0, 0] cmpeq_2_ints $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 splat_3_constants $1..3 = 0 -copy_3_slots_unmasked $4..6 = expectedB(0..2) +copy_3_immutables_unmasked $4..6 = i4..6 [0, 0, 0] cmpeq_3_ints $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -splat_3_constants $1..3 = 0 -copy_constant $4 = 0x00000064 (1.401298e-43) -copy_4_slots_unmasked $5..8 = expectedB +copy_4_immutables_unmasked $1..4 = i4..7 [0, 0, 0, 0x00000064 (1.401298e-43)] +copy_4_immutables_unmasked $5..8 = i4..7 [0, 0, 0, 0x00000064 (1.401298e-43)] cmpeq_4_ints $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 diff --git a/tests/sksl/intrinsics/MinUint.wgsl b/tests/sksl/intrinsics/MinUint.wgsl index a9187826eef1..2d991335bda3 100644 --- a/tests/sksl/intrinsics/MinUint.wgsl +++ b/tests/sksl/intrinsics/MinUint.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -27,7 +28,7 @@ fn main(_skParam0: vec2) -> vec4 { let _skTemp6 = min(uintValues.xy, uintGreen.xy); let _skTemp7 = min(uintValues.xyz, uintGreen.xyz); let _skTemp8 = min(uintValues, uintGreen); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((((((((((_skTemp1 == expectedA.x && all(_skTemp2 == expectedA.xy)) && all(_skTemp3 == expectedA.xyz)) && all(_skTemp4 == expectedA)) && 50u == expectedA.x) && all(vec2(50u, 0u) == expectedA.xy)) && all(vec3(50u, 0u, 50u) == expectedA.xyz)) && all(vec4(50u, 0u, 50u, 50u) == expectedA)) && _skTemp5 == expectedB.x) && all(_skTemp6 == expectedB.xy)) && all(_skTemp7 == expectedB.xyz)) && all(_skTemp8 == expectedB)) && 0u == expectedB.x) && all(vec2(0u) == expectedB.xy)) && all(vec3(0u) == expectedB.xyz)) && all(vec4(0u, 0u, 0u, 100u) == expectedB))); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((((((((((_skTemp1 == expectedA.x) && all(_skTemp2 == expectedA.xy)) && all(_skTemp3 == expectedA.xyz)) && all(_skTemp4 == expectedA)) && (50u == expectedA.x)) && all(vec2(50u, 0u) == expectedA.xy)) && all(vec3(50u, 0u, 50u) == expectedA.xyz)) && all(vec4(50u, 0u, 50u, 50u) == expectedA)) && (_skTemp5 == expectedB.x)) && all(_skTemp6 == expectedB.xy)) && all(_skTemp7 == expectedB.xyz)) && all(_skTemp8 == expectedB)) && (0u == expectedB.x)) && all(vec2(0u) == expectedB.xy)) && all(vec3(0u) == expectedB.xyz)) && all(vec4(0u, 0u, 0u, 100u) == expectedB))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/intrinsics/MixBool.asm.frag b/tests/sksl/intrinsics/MixBool.asm.frag index 0889f45b3bb4..a1edf7e245d2 100644 --- a/tests/sksl/intrinsics/MixBool.asm.frag +++ b/tests/sksl/intrinsics/MixBool.asm.frag @@ -1,658 +1,658 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpMemberName %_UniformBuffer 2 "colorBlack" -OpMemberName %_UniformBuffer 3 "colorWhite" -OpMemberName %_UniformBuffer 4 "testInputs" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %intGreen "intGreen" -OpName %intRed "intRed" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 3 Offset 48 -OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 4 Offset 64 -OpMemberDecorate %_UniformBuffer 4 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %33 RelaxedPrecision -OpDecorate %35 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %48 RelaxedPrecision -OpDecorate %49 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %190 RelaxedPrecision -OpDecorate %191 RelaxedPrecision -OpDecorate %193 RelaxedPrecision -OpDecorate %194 RelaxedPrecision -OpDecorate %196 RelaxedPrecision -OpDecorate %197 RelaxedPrecision -OpDecorate %199 RelaxedPrecision -OpDecorate %200 RelaxedPrecision -OpDecorate %202 RelaxedPrecision -OpDecorate %203 RelaxedPrecision -OpDecorate %210 RelaxedPrecision -OpDecorate %211 RelaxedPrecision -OpDecorate %213 RelaxedPrecision -OpDecorate %214 RelaxedPrecision -OpDecorate %216 RelaxedPrecision -OpDecorate %217 RelaxedPrecision -OpDecorate %219 RelaxedPrecision -OpDecorate %220 RelaxedPrecision -OpDecorate %222 RelaxedPrecision -OpDecorate %223 RelaxedPrecision -OpDecorate %231 RelaxedPrecision -OpDecorate %232 RelaxedPrecision -OpDecorate %235 RelaxedPrecision -OpDecorate %236 RelaxedPrecision -OpDecorate %238 RelaxedPrecision -OpDecorate %239 RelaxedPrecision -OpDecorate %241 RelaxedPrecision -OpDecorate %242 RelaxedPrecision -OpDecorate %244 RelaxedPrecision -OpDecorate %245 RelaxedPrecision -OpDecorate %253 RelaxedPrecision -OpDecorate %255 RelaxedPrecision -OpDecorate %257 RelaxedPrecision -OpDecorate %259 RelaxedPrecision -OpDecorate %261 RelaxedPrecision -OpDecorate %269 RelaxedPrecision -OpDecorate %270 RelaxedPrecision -OpDecorate %272 RelaxedPrecision -OpDecorate %273 RelaxedPrecision -OpDecorate %275 RelaxedPrecision -OpDecorate %276 RelaxedPrecision -OpDecorate %278 RelaxedPrecision -OpDecorate %279 RelaxedPrecision -OpDecorate %281 RelaxedPrecision -OpDecorate %282 RelaxedPrecision -OpDecorate %289 RelaxedPrecision -OpDecorate %290 RelaxedPrecision -OpDecorate %292 RelaxedPrecision -OpDecorate %293 RelaxedPrecision -OpDecorate %295 RelaxedPrecision -OpDecorate %296 RelaxedPrecision -OpDecorate %298 RelaxedPrecision -OpDecorate %299 RelaxedPrecision -OpDecorate %301 RelaxedPrecision -OpDecorate %302 RelaxedPrecision -OpDecorate %310 RelaxedPrecision -OpDecorate %311 RelaxedPrecision -OpDecorate %313 RelaxedPrecision -OpDecorate %314 RelaxedPrecision -OpDecorate %316 RelaxedPrecision -OpDecorate %317 RelaxedPrecision -OpDecorate %319 RelaxedPrecision -OpDecorate %320 RelaxedPrecision -OpDecorate %322 RelaxedPrecision -OpDecorate %323 RelaxedPrecision -OpDecorate %331 RelaxedPrecision -OpDecorate %333 RelaxedPrecision -OpDecorate %335 RelaxedPrecision -OpDecorate %337 RelaxedPrecision -OpDecorate %339 RelaxedPrecision -OpDecorate %346 RelaxedPrecision -OpDecorate %347 RelaxedPrecision -OpDecorate %355 RelaxedPrecision -OpDecorate %356 RelaxedPrecision -OpDecorate %364 RelaxedPrecision -OpDecorate %365 RelaxedPrecision -OpDecorate %373 RelaxedPrecision -OpDecorate %380 RelaxedPrecision -OpDecorate %381 RelaxedPrecision -OpDecorate %388 RelaxedPrecision -OpDecorate %389 RelaxedPrecision -OpDecorate %397 RelaxedPrecision -OpDecorate %398 RelaxedPrecision -OpDecorate %406 RelaxedPrecision -OpDecorate %416 RelaxedPrecision -OpDecorate %418 RelaxedPrecision -OpDecorate %419 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpMemberName %_UniformBuffer 2 "colorBlack" + OpMemberName %_UniformBuffer 3 "colorWhite" + OpMemberName %_UniformBuffer 4 "testInputs" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %intGreen "intGreen" + OpName %intRed "intRed" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 3 Offset 48 + OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 4 Offset 64 + OpMemberDecorate %_UniformBuffer 4 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %33 RelaxedPrecision + OpDecorate %35 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %48 RelaxedPrecision + OpDecorate %49 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %190 RelaxedPrecision + OpDecorate %191 RelaxedPrecision + OpDecorate %193 RelaxedPrecision + OpDecorate %194 RelaxedPrecision + OpDecorate %196 RelaxedPrecision + OpDecorate %197 RelaxedPrecision + OpDecorate %199 RelaxedPrecision + OpDecorate %200 RelaxedPrecision + OpDecorate %202 RelaxedPrecision + OpDecorate %203 RelaxedPrecision + OpDecorate %210 RelaxedPrecision + OpDecorate %211 RelaxedPrecision + OpDecorate %213 RelaxedPrecision + OpDecorate %214 RelaxedPrecision + OpDecorate %216 RelaxedPrecision + OpDecorate %217 RelaxedPrecision + OpDecorate %219 RelaxedPrecision + OpDecorate %220 RelaxedPrecision + OpDecorate %222 RelaxedPrecision + OpDecorate %223 RelaxedPrecision + OpDecorate %231 RelaxedPrecision + OpDecorate %232 RelaxedPrecision + OpDecorate %235 RelaxedPrecision + OpDecorate %236 RelaxedPrecision + OpDecorate %238 RelaxedPrecision + OpDecorate %239 RelaxedPrecision + OpDecorate %241 RelaxedPrecision + OpDecorate %242 RelaxedPrecision + OpDecorate %244 RelaxedPrecision + OpDecorate %245 RelaxedPrecision + OpDecorate %253 RelaxedPrecision + OpDecorate %255 RelaxedPrecision + OpDecorate %257 RelaxedPrecision + OpDecorate %259 RelaxedPrecision + OpDecorate %261 RelaxedPrecision + OpDecorate %269 RelaxedPrecision + OpDecorate %270 RelaxedPrecision + OpDecorate %272 RelaxedPrecision + OpDecorate %273 RelaxedPrecision + OpDecorate %275 RelaxedPrecision + OpDecorate %276 RelaxedPrecision + OpDecorate %278 RelaxedPrecision + OpDecorate %279 RelaxedPrecision + OpDecorate %281 RelaxedPrecision + OpDecorate %282 RelaxedPrecision + OpDecorate %289 RelaxedPrecision + OpDecorate %290 RelaxedPrecision + OpDecorate %292 RelaxedPrecision + OpDecorate %293 RelaxedPrecision + OpDecorate %295 RelaxedPrecision + OpDecorate %296 RelaxedPrecision + OpDecorate %298 RelaxedPrecision + OpDecorate %299 RelaxedPrecision + OpDecorate %301 RelaxedPrecision + OpDecorate %302 RelaxedPrecision + OpDecorate %310 RelaxedPrecision + OpDecorate %311 RelaxedPrecision + OpDecorate %313 RelaxedPrecision + OpDecorate %314 RelaxedPrecision + OpDecorate %316 RelaxedPrecision + OpDecorate %317 RelaxedPrecision + OpDecorate %319 RelaxedPrecision + OpDecorate %320 RelaxedPrecision + OpDecorate %322 RelaxedPrecision + OpDecorate %323 RelaxedPrecision + OpDecorate %331 RelaxedPrecision + OpDecorate %333 RelaxedPrecision + OpDecorate %335 RelaxedPrecision + OpDecorate %337 RelaxedPrecision + OpDecorate %339 RelaxedPrecision + OpDecorate %346 RelaxedPrecision + OpDecorate %347 RelaxedPrecision + OpDecorate %355 RelaxedPrecision + OpDecorate %356 RelaxedPrecision + OpDecorate %364 RelaxedPrecision + OpDecorate %365 RelaxedPrecision + OpDecorate %373 RelaxedPrecision + OpDecorate %380 RelaxedPrecision + OpDecorate %381 RelaxedPrecision + OpDecorate %388 RelaxedPrecision + OpDecorate %389 RelaxedPrecision + OpDecorate %397 RelaxedPrecision + OpDecorate %398 RelaxedPrecision + OpDecorate %406 RelaxedPrecision + OpDecorate %416 RelaxedPrecision + OpDecorate %418 RelaxedPrecision + OpDecorate %419 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%int = OpTypeInt 32 1 -%v4int = OpTypeVector %int 4 + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %int = OpTypeInt 32 1 + %v4int = OpTypeVector %int 4 %_ptr_Function_v4int = OpTypePointer Function %v4int %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_0 = OpConstant %int 0 -%float_100 = OpConstant %float 100 -%int_1 = OpConstant %int 1 -%false = OpConstantFalse %bool -%v2int = OpTypeVector %int 2 -%v2bool = OpTypeVector %bool 2 -%71 = OpConstantComposite %v2bool %false %false -%v3int = OpTypeVector %int 3 -%v3bool = OpTypeVector %bool 3 -%85 = OpConstantComposite %v3bool %false %false %false -%v4bool = OpTypeVector %bool 4 -%96 = OpConstantComposite %v4bool %false %false %false %false -%true = OpConstantTrue %bool -%111 = OpConstantComposite %v2bool %true %true -%123 = OpConstantComposite %v3bool %true %true %true -%133 = OpConstantComposite %v4bool %true %true %true %true -%int_100 = OpConstant %int 100 -%144 = OpConstantComposite %v2int %int_0 %int_100 -%151 = OpConstantComposite %v3int %int_0 %int_100 %int_0 -%158 = OpConstantComposite %v4int %int_0 %int_100 %int_0 %int_100 -%168 = OpConstantComposite %v2int %int_100 %int_0 -%175 = OpConstantComposite %v3int %int_100 %int_0 %int_0 -%182 = OpConstantComposite %v4int %int_100 %int_0 %int_0 %int_100 -%v3float = OpTypeVector %float 3 -%float_1 = OpConstant %float 1 -%353 = OpConstantComposite %v2float %float_0 %float_1 -%362 = OpConstantComposite %v3float %float_0 %float_1 %float_0 -%371 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1 -%386 = OpConstantComposite %v2float %float_1 %float_0 -%395 = OpConstantComposite %v3float %float_1 %float_0 %float_0 -%404 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1 + %int_0 = OpConstant %int 0 + %float_100 = OpConstant %float 100 + %int_1 = OpConstant %int 1 + %false = OpConstantFalse %bool + %v2int = OpTypeVector %int 2 + %v2bool = OpTypeVector %bool 2 + %71 = OpConstantComposite %v2bool %false %false + %v3int = OpTypeVector %int 3 + %v3bool = OpTypeVector %bool 3 + %85 = OpConstantComposite %v3bool %false %false %false + %v4bool = OpTypeVector %bool 4 + %96 = OpConstantComposite %v4bool %false %false %false %false + %true = OpConstantTrue %bool + %111 = OpConstantComposite %v2bool %true %true + %123 = OpConstantComposite %v3bool %true %true %true + %133 = OpConstantComposite %v4bool %true %true %true %true + %int_100 = OpConstant %int 100 + %144 = OpConstantComposite %v2int %int_0 %int_100 + %151 = OpConstantComposite %v3int %int_0 %int_100 %int_0 + %158 = OpConstantComposite %v4int %int_0 %int_100 %int_0 %int_100 + %168 = OpConstantComposite %v2int %int_100 %int_0 + %175 = OpConstantComposite %v3int %int_100 %int_0 %int_0 + %182 = OpConstantComposite %v4int %int_100 %int_0 %int_0 %int_100 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %353 = OpConstantComposite %v2float %float_0 %float_1 + %362 = OpConstantComposite %v3float %float_0 %float_1 %float_0 + %371 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1 + %386 = OpConstantComposite %v2float %float_1 %float_0 + %395 = OpConstantComposite %v3float %float_1 %float_0 %float_0 + %404 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%intGreen = OpVariable %_ptr_Function_v4int Function -%intRed = OpVariable %_ptr_Function_v4int Function -%410 = OpVariable %_ptr_Function_v4float Function -%30 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%33 = OpLoad %v4float %30 -%35 = OpVectorTimesScalar %v4float %33 %float_100 -%36 = OpCompositeExtract %float %35 0 -%37 = OpConvertFToS %int %36 -%38 = OpCompositeExtract %float %35 1 -%39 = OpConvertFToS %int %38 -%40 = OpCompositeExtract %float %35 2 -%41 = OpConvertFToS %int %40 -%42 = OpCompositeExtract %float %35 3 -%43 = OpConvertFToS %int %42 -%44 = OpCompositeConstruct %v4int %37 %39 %41 %43 -OpStore %intGreen %44 -%46 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%48 = OpLoad %v4float %46 -%49 = OpVectorTimesScalar %v4float %48 %float_100 -%50 = OpCompositeExtract %float %49 0 -%51 = OpConvertFToS %int %50 -%52 = OpCompositeExtract %float %49 1 -%53 = OpConvertFToS %int %52 -%54 = OpCompositeExtract %float %49 2 -%55 = OpConvertFToS %int %54 -%56 = OpCompositeExtract %float %49 3 -%57 = OpConvertFToS %int %56 -%58 = OpCompositeConstruct %v4int %51 %53 %55 %57 -OpStore %intRed %58 -%61 = OpCompositeExtract %int %44 0 -%62 = OpCompositeExtract %int %58 0 -%60 = OpSelect %int %false %62 %61 -%63 = OpIEqual %bool %60 %61 -OpSelectionMerge %65 None -OpBranchConditional %63 %64 %65 -%64 = OpLabel -%67 = OpVectorShuffle %v2int %44 %44 0 1 -%69 = OpVectorShuffle %v2int %58 %58 0 1 -%72 = OpVectorShuffle %v2int %44 %44 0 1 -%73 = OpVectorShuffle %v2int %58 %58 0 1 -%66 = OpSelect %v2int %71 %73 %72 -%74 = OpVectorShuffle %v2int %44 %44 0 1 -%75 = OpIEqual %v2bool %66 %74 -%76 = OpAll %bool %75 -OpBranch %65 -%65 = OpLabel -%77 = OpPhi %bool %false %25 %76 %64 -OpSelectionMerge %79 None -OpBranchConditional %77 %78 %79 -%78 = OpLabel -%81 = OpVectorShuffle %v3int %44 %44 0 1 2 -%83 = OpVectorShuffle %v3int %58 %58 0 1 2 -%86 = OpVectorShuffle %v3int %44 %44 0 1 2 -%87 = OpVectorShuffle %v3int %58 %58 0 1 2 -%80 = OpSelect %v3int %85 %87 %86 -%88 = OpVectorShuffle %v3int %44 %44 0 1 2 -%89 = OpIEqual %v3bool %80 %88 -%90 = OpAll %bool %89 -OpBranch %79 -%79 = OpLabel -%91 = OpPhi %bool %false %65 %90 %78 -OpSelectionMerge %93 None -OpBranchConditional %91 %92 %93 -%92 = OpLabel -%94 = OpSelect %v4int %96 %58 %44 -%97 = OpIEqual %v4bool %94 %44 -%98 = OpAll %bool %97 -OpBranch %93 -%93 = OpLabel -%99 = OpPhi %bool %false %79 %98 %92 -OpSelectionMerge %101 None -OpBranchConditional %99 %100 %101 -%100 = OpLabel -%102 = OpSelect %int %true %62 %61 -%104 = OpIEqual %bool %102 %62 -OpBranch %101 -%101 = OpLabel -%105 = OpPhi %bool %false %93 %104 %100 -OpSelectionMerge %107 None -OpBranchConditional %105 %106 %107 -%106 = OpLabel -%109 = OpVectorShuffle %v2int %44 %44 0 1 -%110 = OpVectorShuffle %v2int %58 %58 0 1 -%112 = OpVectorShuffle %v2int %44 %44 0 1 -%113 = OpVectorShuffle %v2int %58 %58 0 1 -%108 = OpSelect %v2int %111 %113 %112 -%114 = OpVectorShuffle %v2int %58 %58 0 1 -%115 = OpIEqual %v2bool %108 %114 -%116 = OpAll %bool %115 -OpBranch %107 -%107 = OpLabel -%117 = OpPhi %bool %false %101 %116 %106 -OpSelectionMerge %119 None -OpBranchConditional %117 %118 %119 -%118 = OpLabel -%121 = OpVectorShuffle %v3int %44 %44 0 1 2 -%122 = OpVectorShuffle %v3int %58 %58 0 1 2 -%124 = OpVectorShuffle %v3int %44 %44 0 1 2 -%125 = OpVectorShuffle %v3int %58 %58 0 1 2 -%120 = OpSelect %v3int %123 %125 %124 -%126 = OpVectorShuffle %v3int %58 %58 0 1 2 -%127 = OpIEqual %v3bool %120 %126 -%128 = OpAll %bool %127 -OpBranch %119 -%119 = OpLabel -%129 = OpPhi %bool %false %107 %128 %118 -OpSelectionMerge %131 None -OpBranchConditional %129 %130 %131 -%130 = OpLabel -%132 = OpSelect %v4int %133 %58 %44 -%134 = OpIEqual %v4bool %132 %58 -%135 = OpAll %bool %134 -OpBranch %131 -%131 = OpLabel -%136 = OpPhi %bool %false %119 %135 %130 -OpSelectionMerge %138 None -OpBranchConditional %136 %137 %138 -%137 = OpLabel -%139 = OpIEqual %bool %int_0 %61 -OpBranch %138 -%138 = OpLabel -%140 = OpPhi %bool %false %131 %139 %137 -OpSelectionMerge %142 None -OpBranchConditional %140 %141 %142 -%141 = OpLabel -%145 = OpVectorShuffle %v2int %44 %44 0 1 -%146 = OpIEqual %v2bool %144 %145 -%147 = OpAll %bool %146 -OpBranch %142 -%142 = OpLabel -%148 = OpPhi %bool %false %138 %147 %141 -OpSelectionMerge %150 None -OpBranchConditional %148 %149 %150 -%149 = OpLabel -%152 = OpVectorShuffle %v3int %44 %44 0 1 2 -%153 = OpIEqual %v3bool %151 %152 -%154 = OpAll %bool %153 -OpBranch %150 -%150 = OpLabel -%155 = OpPhi %bool %false %142 %154 %149 -OpSelectionMerge %157 None -OpBranchConditional %155 %156 %157 -%156 = OpLabel -%159 = OpIEqual %v4bool %158 %44 -%160 = OpAll %bool %159 -OpBranch %157 -%157 = OpLabel -%161 = OpPhi %bool %false %150 %160 %156 -OpSelectionMerge %163 None -OpBranchConditional %161 %162 %163 -%162 = OpLabel -%164 = OpIEqual %bool %int_100 %62 -OpBranch %163 -%163 = OpLabel -%165 = OpPhi %bool %false %157 %164 %162 -OpSelectionMerge %167 None -OpBranchConditional %165 %166 %167 -%166 = OpLabel -%169 = OpVectorShuffle %v2int %58 %58 0 1 -%170 = OpIEqual %v2bool %168 %169 -%171 = OpAll %bool %170 -OpBranch %167 -%167 = OpLabel -%172 = OpPhi %bool %false %163 %171 %166 -OpSelectionMerge %174 None -OpBranchConditional %172 %173 %174 -%173 = OpLabel -%176 = OpVectorShuffle %v3int %58 %58 0 1 2 -%177 = OpIEqual %v3bool %175 %176 -%178 = OpAll %bool %177 -OpBranch %174 -%174 = OpLabel -%179 = OpPhi %bool %false %167 %178 %173 -OpSelectionMerge %181 None -OpBranchConditional %179 %180 %181 -%180 = OpLabel -%183 = OpIEqual %v4bool %182 %58 -%184 = OpAll %bool %183 -OpBranch %181 -%181 = OpLabel -%185 = OpPhi %bool %false %174 %184 %180 -OpSelectionMerge %187 None -OpBranchConditional %185 %186 %187 -%186 = OpLabel -%189 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%190 = OpLoad %v4float %189 -%191 = OpCompositeExtract %float %190 0 -%192 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%193 = OpLoad %v4float %192 -%194 = OpCompositeExtract %float %193 0 -%195 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%196 = OpLoad %v4float %195 -%197 = OpCompositeExtract %float %196 0 -%198 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%199 = OpLoad %v4float %198 -%200 = OpCompositeExtract %float %199 0 -%188 = OpSelect %float %false %200 %197 -%201 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%202 = OpLoad %v4float %201 -%203 = OpCompositeExtract %float %202 0 -%204 = OpFOrdEqual %bool %188 %203 -OpBranch %187 -%187 = OpLabel -%205 = OpPhi %bool %false %181 %204 %186 -OpSelectionMerge %207 None -OpBranchConditional %205 %206 %207 -%206 = OpLabel -%209 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%210 = OpLoad %v4float %209 -%211 = OpVectorShuffle %v2float %210 %210 0 1 -%212 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%213 = OpLoad %v4float %212 -%214 = OpVectorShuffle %v2float %213 %213 0 1 -%215 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%216 = OpLoad %v4float %215 -%217 = OpVectorShuffle %v2float %216 %216 0 1 -%218 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%219 = OpLoad %v4float %218 -%220 = OpVectorShuffle %v2float %219 %219 0 1 -%208 = OpSelect %v2float %71 %220 %217 -%221 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%222 = OpLoad %v4float %221 -%223 = OpVectorShuffle %v2float %222 %222 0 1 -%224 = OpFOrdEqual %v2bool %208 %223 -%225 = OpAll %bool %224 -OpBranch %207 -%207 = OpLabel -%226 = OpPhi %bool %false %187 %225 %206 -OpSelectionMerge %228 None -OpBranchConditional %226 %227 %228 -%227 = OpLabel -%230 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%231 = OpLoad %v4float %230 -%232 = OpVectorShuffle %v3float %231 %231 0 1 2 -%234 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%235 = OpLoad %v4float %234 -%236 = OpVectorShuffle %v3float %235 %235 0 1 2 -%237 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%238 = OpLoad %v4float %237 -%239 = OpVectorShuffle %v3float %238 %238 0 1 2 -%240 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%241 = OpLoad %v4float %240 -%242 = OpVectorShuffle %v3float %241 %241 0 1 2 -%229 = OpSelect %v3float %85 %242 %239 -%243 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%244 = OpLoad %v4float %243 -%245 = OpVectorShuffle %v3float %244 %244 0 1 2 -%246 = OpFOrdEqual %v3bool %229 %245 -%247 = OpAll %bool %246 -OpBranch %228 -%228 = OpLabel -%248 = OpPhi %bool %false %207 %247 %227 -OpSelectionMerge %250 None -OpBranchConditional %248 %249 %250 -%249 = OpLabel -%252 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%253 = OpLoad %v4float %252 -%254 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%255 = OpLoad %v4float %254 -%256 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%257 = OpLoad %v4float %256 -%258 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%259 = OpLoad %v4float %258 -%251 = OpSelect %v4float %96 %259 %257 -%260 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%261 = OpLoad %v4float %260 -%262 = OpFOrdEqual %v4bool %251 %261 -%263 = OpAll %bool %262 -OpBranch %250 -%250 = OpLabel -%264 = OpPhi %bool %false %228 %263 %249 -OpSelectionMerge %266 None -OpBranchConditional %264 %265 %266 -%265 = OpLabel -%268 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%269 = OpLoad %v4float %268 -%270 = OpCompositeExtract %float %269 0 -%271 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%272 = OpLoad %v4float %271 -%273 = OpCompositeExtract %float %272 0 -%274 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%275 = OpLoad %v4float %274 -%276 = OpCompositeExtract %float %275 0 -%277 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%278 = OpLoad %v4float %277 -%279 = OpCompositeExtract %float %278 0 -%267 = OpSelect %float %true %279 %276 -%280 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%281 = OpLoad %v4float %280 -%282 = OpCompositeExtract %float %281 0 -%283 = OpFOrdEqual %bool %267 %282 -OpBranch %266 -%266 = OpLabel -%284 = OpPhi %bool %false %250 %283 %265 -OpSelectionMerge %286 None -OpBranchConditional %284 %285 %286 -%285 = OpLabel -%288 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%289 = OpLoad %v4float %288 -%290 = OpVectorShuffle %v2float %289 %289 0 1 -%291 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%292 = OpLoad %v4float %291 -%293 = OpVectorShuffle %v2float %292 %292 0 1 -%294 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%295 = OpLoad %v4float %294 -%296 = OpVectorShuffle %v2float %295 %295 0 1 -%297 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%298 = OpLoad %v4float %297 -%299 = OpVectorShuffle %v2float %298 %298 0 1 -%287 = OpSelect %v2float %111 %299 %296 -%300 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%301 = OpLoad %v4float %300 -%302 = OpVectorShuffle %v2float %301 %301 0 1 -%303 = OpFOrdEqual %v2bool %287 %302 -%304 = OpAll %bool %303 -OpBranch %286 -%286 = OpLabel -%305 = OpPhi %bool %false %266 %304 %285 -OpSelectionMerge %307 None -OpBranchConditional %305 %306 %307 -%306 = OpLabel -%309 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%310 = OpLoad %v4float %309 -%311 = OpVectorShuffle %v3float %310 %310 0 1 2 -%312 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%313 = OpLoad %v4float %312 -%314 = OpVectorShuffle %v3float %313 %313 0 1 2 -%315 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%316 = OpLoad %v4float %315 -%317 = OpVectorShuffle %v3float %316 %316 0 1 2 -%318 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%319 = OpLoad %v4float %318 -%320 = OpVectorShuffle %v3float %319 %319 0 1 2 -%308 = OpSelect %v3float %123 %320 %317 -%321 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%322 = OpLoad %v4float %321 -%323 = OpVectorShuffle %v3float %322 %322 0 1 2 -%324 = OpFOrdEqual %v3bool %308 %323 -%325 = OpAll %bool %324 -OpBranch %307 -%307 = OpLabel -%326 = OpPhi %bool %false %286 %325 %306 -OpSelectionMerge %328 None -OpBranchConditional %326 %327 %328 -%327 = OpLabel -%330 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%331 = OpLoad %v4float %330 -%332 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%333 = OpLoad %v4float %332 -%334 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%335 = OpLoad %v4float %334 -%336 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%337 = OpLoad %v4float %336 -%329 = OpSelect %v4float %133 %337 %335 -%338 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%339 = OpLoad %v4float %338 -%340 = OpFOrdEqual %v4bool %329 %339 -%341 = OpAll %bool %340 -OpBranch %328 -%328 = OpLabel -%342 = OpPhi %bool %false %307 %341 %327 -OpSelectionMerge %344 None -OpBranchConditional %342 %343 %344 -%343 = OpLabel -%345 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%346 = OpLoad %v4float %345 -%347 = OpCompositeExtract %float %346 0 -%348 = OpFOrdEqual %bool %float_0 %347 -OpBranch %344 -%344 = OpLabel -%349 = OpPhi %bool %false %328 %348 %343 -OpSelectionMerge %351 None -OpBranchConditional %349 %350 %351 -%350 = OpLabel -%354 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%355 = OpLoad %v4float %354 -%356 = OpVectorShuffle %v2float %355 %355 0 1 -%357 = OpFOrdEqual %v2bool %353 %356 -%358 = OpAll %bool %357 -OpBranch %351 -%351 = OpLabel -%359 = OpPhi %bool %false %344 %358 %350 -OpSelectionMerge %361 None -OpBranchConditional %359 %360 %361 -%360 = OpLabel -%363 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%364 = OpLoad %v4float %363 -%365 = OpVectorShuffle %v3float %364 %364 0 1 2 -%366 = OpFOrdEqual %v3bool %362 %365 -%367 = OpAll %bool %366 -OpBranch %361 -%361 = OpLabel -%368 = OpPhi %bool %false %351 %367 %360 -OpSelectionMerge %370 None -OpBranchConditional %368 %369 %370 -%369 = OpLabel -%372 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%373 = OpLoad %v4float %372 -%374 = OpFOrdEqual %v4bool %371 %373 -%375 = OpAll %bool %374 -OpBranch %370 -%370 = OpLabel -%376 = OpPhi %bool %false %361 %375 %369 -OpSelectionMerge %378 None -OpBranchConditional %376 %377 %378 -%377 = OpLabel -%379 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%380 = OpLoad %v4float %379 -%381 = OpCompositeExtract %float %380 0 -%382 = OpFOrdEqual %bool %float_1 %381 -OpBranch %378 -%378 = OpLabel -%383 = OpPhi %bool %false %370 %382 %377 -OpSelectionMerge %385 None -OpBranchConditional %383 %384 %385 -%384 = OpLabel -%387 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%388 = OpLoad %v4float %387 -%389 = OpVectorShuffle %v2float %388 %388 0 1 -%390 = OpFOrdEqual %v2bool %386 %389 -%391 = OpAll %bool %390 -OpBranch %385 -%385 = OpLabel -%392 = OpPhi %bool %false %378 %391 %384 -OpSelectionMerge %394 None -OpBranchConditional %392 %393 %394 -%393 = OpLabel -%396 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%397 = OpLoad %v4float %396 -%398 = OpVectorShuffle %v3float %397 %397 0 1 2 -%399 = OpFOrdEqual %v3bool %395 %398 -%400 = OpAll %bool %399 -OpBranch %394 -%394 = OpLabel -%401 = OpPhi %bool %false %385 %400 %393 -OpSelectionMerge %403 None -OpBranchConditional %401 %402 %403 -%402 = OpLabel -%405 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%406 = OpLoad %v4float %405 -%407 = OpFOrdEqual %v4bool %404 %406 -%408 = OpAll %bool %407 -OpBranch %403 -%403 = OpLabel -%409 = OpPhi %bool %false %394 %408 %402 -OpSelectionMerge %414 None -OpBranchConditional %409 %412 %413 -%412 = OpLabel -%415 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%416 = OpLoad %v4float %415 -OpStore %410 %416 -OpBranch %414 -%413 = OpLabel -%417 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%418 = OpLoad %v4float %417 -OpStore %410 %418 -OpBranch %414 -%414 = OpLabel -%419 = OpLoad %v4float %410 -OpReturnValue %419 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %intGreen = OpVariable %_ptr_Function_v4int Function + %intRed = OpVariable %_ptr_Function_v4int Function + %410 = OpVariable %_ptr_Function_v4float Function + %30 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %33 = OpLoad %v4float %30 + %35 = OpVectorTimesScalar %v4float %33 %float_100 + %36 = OpCompositeExtract %float %35 0 + %37 = OpConvertFToS %int %36 + %38 = OpCompositeExtract %float %35 1 + %39 = OpConvertFToS %int %38 + %40 = OpCompositeExtract %float %35 2 + %41 = OpConvertFToS %int %40 + %42 = OpCompositeExtract %float %35 3 + %43 = OpConvertFToS %int %42 + %44 = OpCompositeConstruct %v4int %37 %39 %41 %43 + OpStore %intGreen %44 + %46 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %48 = OpLoad %v4float %46 + %49 = OpVectorTimesScalar %v4float %48 %float_100 + %50 = OpCompositeExtract %float %49 0 + %51 = OpConvertFToS %int %50 + %52 = OpCompositeExtract %float %49 1 + %53 = OpConvertFToS %int %52 + %54 = OpCompositeExtract %float %49 2 + %55 = OpConvertFToS %int %54 + %56 = OpCompositeExtract %float %49 3 + %57 = OpConvertFToS %int %56 + %58 = OpCompositeConstruct %v4int %51 %53 %55 %57 + OpStore %intRed %58 + %61 = OpCompositeExtract %int %44 0 + %62 = OpCompositeExtract %int %58 0 + %60 = OpSelect %int %false %62 %61 + %63 = OpIEqual %bool %60 %61 + OpSelectionMerge %65 None + OpBranchConditional %63 %64 %65 + %64 = OpLabel + %67 = OpVectorShuffle %v2int %44 %44 0 1 + %69 = OpVectorShuffle %v2int %58 %58 0 1 + %72 = OpVectorShuffle %v2int %44 %44 0 1 + %73 = OpVectorShuffle %v2int %58 %58 0 1 + %66 = OpSelect %v2int %71 %73 %72 + %74 = OpVectorShuffle %v2int %44 %44 0 1 + %75 = OpIEqual %v2bool %66 %74 + %76 = OpAll %bool %75 + OpBranch %65 + %65 = OpLabel + %77 = OpPhi %bool %false %25 %76 %64 + OpSelectionMerge %79 None + OpBranchConditional %77 %78 %79 + %78 = OpLabel + %81 = OpVectorShuffle %v3int %44 %44 0 1 2 + %83 = OpVectorShuffle %v3int %58 %58 0 1 2 + %86 = OpVectorShuffle %v3int %44 %44 0 1 2 + %87 = OpVectorShuffle %v3int %58 %58 0 1 2 + %80 = OpSelect %v3int %85 %87 %86 + %88 = OpVectorShuffle %v3int %44 %44 0 1 2 + %89 = OpIEqual %v3bool %80 %88 + %90 = OpAll %bool %89 + OpBranch %79 + %79 = OpLabel + %91 = OpPhi %bool %false %65 %90 %78 + OpSelectionMerge %93 None + OpBranchConditional %91 %92 %93 + %92 = OpLabel + %94 = OpSelect %v4int %96 %58 %44 + %97 = OpIEqual %v4bool %94 %44 + %98 = OpAll %bool %97 + OpBranch %93 + %93 = OpLabel + %99 = OpPhi %bool %false %79 %98 %92 + OpSelectionMerge %101 None + OpBranchConditional %99 %100 %101 + %100 = OpLabel + %102 = OpSelect %int %true %62 %61 + %104 = OpIEqual %bool %102 %62 + OpBranch %101 + %101 = OpLabel + %105 = OpPhi %bool %false %93 %104 %100 + OpSelectionMerge %107 None + OpBranchConditional %105 %106 %107 + %106 = OpLabel + %109 = OpVectorShuffle %v2int %44 %44 0 1 + %110 = OpVectorShuffle %v2int %58 %58 0 1 + %112 = OpVectorShuffle %v2int %44 %44 0 1 + %113 = OpVectorShuffle %v2int %58 %58 0 1 + %108 = OpSelect %v2int %111 %113 %112 + %114 = OpVectorShuffle %v2int %58 %58 0 1 + %115 = OpIEqual %v2bool %108 %114 + %116 = OpAll %bool %115 + OpBranch %107 + %107 = OpLabel + %117 = OpPhi %bool %false %101 %116 %106 + OpSelectionMerge %119 None + OpBranchConditional %117 %118 %119 + %118 = OpLabel + %121 = OpVectorShuffle %v3int %44 %44 0 1 2 + %122 = OpVectorShuffle %v3int %58 %58 0 1 2 + %124 = OpVectorShuffle %v3int %44 %44 0 1 2 + %125 = OpVectorShuffle %v3int %58 %58 0 1 2 + %120 = OpSelect %v3int %123 %125 %124 + %126 = OpVectorShuffle %v3int %58 %58 0 1 2 + %127 = OpIEqual %v3bool %120 %126 + %128 = OpAll %bool %127 + OpBranch %119 + %119 = OpLabel + %129 = OpPhi %bool %false %107 %128 %118 + OpSelectionMerge %131 None + OpBranchConditional %129 %130 %131 + %130 = OpLabel + %132 = OpSelect %v4int %133 %58 %44 + %134 = OpIEqual %v4bool %132 %58 + %135 = OpAll %bool %134 + OpBranch %131 + %131 = OpLabel + %136 = OpPhi %bool %false %119 %135 %130 + OpSelectionMerge %138 None + OpBranchConditional %136 %137 %138 + %137 = OpLabel + %139 = OpIEqual %bool %int_0 %61 + OpBranch %138 + %138 = OpLabel + %140 = OpPhi %bool %false %131 %139 %137 + OpSelectionMerge %142 None + OpBranchConditional %140 %141 %142 + %141 = OpLabel + %145 = OpVectorShuffle %v2int %44 %44 0 1 + %146 = OpIEqual %v2bool %144 %145 + %147 = OpAll %bool %146 + OpBranch %142 + %142 = OpLabel + %148 = OpPhi %bool %false %138 %147 %141 + OpSelectionMerge %150 None + OpBranchConditional %148 %149 %150 + %149 = OpLabel + %152 = OpVectorShuffle %v3int %44 %44 0 1 2 + %153 = OpIEqual %v3bool %151 %152 + %154 = OpAll %bool %153 + OpBranch %150 + %150 = OpLabel + %155 = OpPhi %bool %false %142 %154 %149 + OpSelectionMerge %157 None + OpBranchConditional %155 %156 %157 + %156 = OpLabel + %159 = OpIEqual %v4bool %158 %44 + %160 = OpAll %bool %159 + OpBranch %157 + %157 = OpLabel + %161 = OpPhi %bool %false %150 %160 %156 + OpSelectionMerge %163 None + OpBranchConditional %161 %162 %163 + %162 = OpLabel + %164 = OpIEqual %bool %int_100 %62 + OpBranch %163 + %163 = OpLabel + %165 = OpPhi %bool %false %157 %164 %162 + OpSelectionMerge %167 None + OpBranchConditional %165 %166 %167 + %166 = OpLabel + %169 = OpVectorShuffle %v2int %58 %58 0 1 + %170 = OpIEqual %v2bool %168 %169 + %171 = OpAll %bool %170 + OpBranch %167 + %167 = OpLabel + %172 = OpPhi %bool %false %163 %171 %166 + OpSelectionMerge %174 None + OpBranchConditional %172 %173 %174 + %173 = OpLabel + %176 = OpVectorShuffle %v3int %58 %58 0 1 2 + %177 = OpIEqual %v3bool %175 %176 + %178 = OpAll %bool %177 + OpBranch %174 + %174 = OpLabel + %179 = OpPhi %bool %false %167 %178 %173 + OpSelectionMerge %181 None + OpBranchConditional %179 %180 %181 + %180 = OpLabel + %183 = OpIEqual %v4bool %182 %58 + %184 = OpAll %bool %183 + OpBranch %181 + %181 = OpLabel + %185 = OpPhi %bool %false %174 %184 %180 + OpSelectionMerge %187 None + OpBranchConditional %185 %186 %187 + %186 = OpLabel + %189 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %190 = OpLoad %v4float %189 + %191 = OpCompositeExtract %float %190 0 + %192 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %193 = OpLoad %v4float %192 + %194 = OpCompositeExtract %float %193 0 + %195 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %196 = OpLoad %v4float %195 + %197 = OpCompositeExtract %float %196 0 + %198 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %199 = OpLoad %v4float %198 + %200 = OpCompositeExtract %float %199 0 + %188 = OpSelect %float %false %200 %197 + %201 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %202 = OpLoad %v4float %201 + %203 = OpCompositeExtract %float %202 0 + %204 = OpFOrdEqual %bool %188 %203 + OpBranch %187 + %187 = OpLabel + %205 = OpPhi %bool %false %181 %204 %186 + OpSelectionMerge %207 None + OpBranchConditional %205 %206 %207 + %206 = OpLabel + %209 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %210 = OpLoad %v4float %209 + %211 = OpVectorShuffle %v2float %210 %210 0 1 + %212 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %213 = OpLoad %v4float %212 + %214 = OpVectorShuffle %v2float %213 %213 0 1 + %215 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %216 = OpLoad %v4float %215 + %217 = OpVectorShuffle %v2float %216 %216 0 1 + %218 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %219 = OpLoad %v4float %218 + %220 = OpVectorShuffle %v2float %219 %219 0 1 + %208 = OpSelect %v2float %71 %220 %217 + %221 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %222 = OpLoad %v4float %221 + %223 = OpVectorShuffle %v2float %222 %222 0 1 + %224 = OpFOrdEqual %v2bool %208 %223 + %225 = OpAll %bool %224 + OpBranch %207 + %207 = OpLabel + %226 = OpPhi %bool %false %187 %225 %206 + OpSelectionMerge %228 None + OpBranchConditional %226 %227 %228 + %227 = OpLabel + %230 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %231 = OpLoad %v4float %230 + %232 = OpVectorShuffle %v3float %231 %231 0 1 2 + %234 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %235 = OpLoad %v4float %234 + %236 = OpVectorShuffle %v3float %235 %235 0 1 2 + %237 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %238 = OpLoad %v4float %237 + %239 = OpVectorShuffle %v3float %238 %238 0 1 2 + %240 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %241 = OpLoad %v4float %240 + %242 = OpVectorShuffle %v3float %241 %241 0 1 2 + %229 = OpSelect %v3float %85 %242 %239 + %243 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %244 = OpLoad %v4float %243 + %245 = OpVectorShuffle %v3float %244 %244 0 1 2 + %246 = OpFOrdEqual %v3bool %229 %245 + %247 = OpAll %bool %246 + OpBranch %228 + %228 = OpLabel + %248 = OpPhi %bool %false %207 %247 %227 + OpSelectionMerge %250 None + OpBranchConditional %248 %249 %250 + %249 = OpLabel + %252 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %253 = OpLoad %v4float %252 + %254 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %255 = OpLoad %v4float %254 + %256 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %257 = OpLoad %v4float %256 + %258 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %259 = OpLoad %v4float %258 + %251 = OpSelect %v4float %96 %259 %257 + %260 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %261 = OpLoad %v4float %260 + %262 = OpFOrdEqual %v4bool %251 %261 + %263 = OpAll %bool %262 + OpBranch %250 + %250 = OpLabel + %264 = OpPhi %bool %false %228 %263 %249 + OpSelectionMerge %266 None + OpBranchConditional %264 %265 %266 + %265 = OpLabel + %268 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %269 = OpLoad %v4float %268 + %270 = OpCompositeExtract %float %269 0 + %271 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %272 = OpLoad %v4float %271 + %273 = OpCompositeExtract %float %272 0 + %274 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %275 = OpLoad %v4float %274 + %276 = OpCompositeExtract %float %275 0 + %277 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %278 = OpLoad %v4float %277 + %279 = OpCompositeExtract %float %278 0 + %267 = OpSelect %float %true %279 %276 + %280 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %281 = OpLoad %v4float %280 + %282 = OpCompositeExtract %float %281 0 + %283 = OpFOrdEqual %bool %267 %282 + OpBranch %266 + %266 = OpLabel + %284 = OpPhi %bool %false %250 %283 %265 + OpSelectionMerge %286 None + OpBranchConditional %284 %285 %286 + %285 = OpLabel + %288 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %289 = OpLoad %v4float %288 + %290 = OpVectorShuffle %v2float %289 %289 0 1 + %291 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %292 = OpLoad %v4float %291 + %293 = OpVectorShuffle %v2float %292 %292 0 1 + %294 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %295 = OpLoad %v4float %294 + %296 = OpVectorShuffle %v2float %295 %295 0 1 + %297 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %298 = OpLoad %v4float %297 + %299 = OpVectorShuffle %v2float %298 %298 0 1 + %287 = OpSelect %v2float %111 %299 %296 + %300 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %301 = OpLoad %v4float %300 + %302 = OpVectorShuffle %v2float %301 %301 0 1 + %303 = OpFOrdEqual %v2bool %287 %302 + %304 = OpAll %bool %303 + OpBranch %286 + %286 = OpLabel + %305 = OpPhi %bool %false %266 %304 %285 + OpSelectionMerge %307 None + OpBranchConditional %305 %306 %307 + %306 = OpLabel + %309 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %310 = OpLoad %v4float %309 + %311 = OpVectorShuffle %v3float %310 %310 0 1 2 + %312 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %313 = OpLoad %v4float %312 + %314 = OpVectorShuffle %v3float %313 %313 0 1 2 + %315 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %316 = OpLoad %v4float %315 + %317 = OpVectorShuffle %v3float %316 %316 0 1 2 + %318 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %319 = OpLoad %v4float %318 + %320 = OpVectorShuffle %v3float %319 %319 0 1 2 + %308 = OpSelect %v3float %123 %320 %317 + %321 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %322 = OpLoad %v4float %321 + %323 = OpVectorShuffle %v3float %322 %322 0 1 2 + %324 = OpFOrdEqual %v3bool %308 %323 + %325 = OpAll %bool %324 + OpBranch %307 + %307 = OpLabel + %326 = OpPhi %bool %false %286 %325 %306 + OpSelectionMerge %328 None + OpBranchConditional %326 %327 %328 + %327 = OpLabel + %330 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %331 = OpLoad %v4float %330 + %332 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %333 = OpLoad %v4float %332 + %334 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %335 = OpLoad %v4float %334 + %336 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %337 = OpLoad %v4float %336 + %329 = OpSelect %v4float %133 %337 %335 + %338 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %339 = OpLoad %v4float %338 + %340 = OpFOrdEqual %v4bool %329 %339 + %341 = OpAll %bool %340 + OpBranch %328 + %328 = OpLabel + %342 = OpPhi %bool %false %307 %341 %327 + OpSelectionMerge %344 None + OpBranchConditional %342 %343 %344 + %343 = OpLabel + %345 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %346 = OpLoad %v4float %345 + %347 = OpCompositeExtract %float %346 0 + %348 = OpFOrdEqual %bool %float_0 %347 + OpBranch %344 + %344 = OpLabel + %349 = OpPhi %bool %false %328 %348 %343 + OpSelectionMerge %351 None + OpBranchConditional %349 %350 %351 + %350 = OpLabel + %354 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %355 = OpLoad %v4float %354 + %356 = OpVectorShuffle %v2float %355 %355 0 1 + %357 = OpFOrdEqual %v2bool %353 %356 + %358 = OpAll %bool %357 + OpBranch %351 + %351 = OpLabel + %359 = OpPhi %bool %false %344 %358 %350 + OpSelectionMerge %361 None + OpBranchConditional %359 %360 %361 + %360 = OpLabel + %363 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %364 = OpLoad %v4float %363 + %365 = OpVectorShuffle %v3float %364 %364 0 1 2 + %366 = OpFOrdEqual %v3bool %362 %365 + %367 = OpAll %bool %366 + OpBranch %361 + %361 = OpLabel + %368 = OpPhi %bool %false %351 %367 %360 + OpSelectionMerge %370 None + OpBranchConditional %368 %369 %370 + %369 = OpLabel + %372 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %373 = OpLoad %v4float %372 + %374 = OpFOrdEqual %v4bool %371 %373 + %375 = OpAll %bool %374 + OpBranch %370 + %370 = OpLabel + %376 = OpPhi %bool %false %361 %375 %369 + OpSelectionMerge %378 None + OpBranchConditional %376 %377 %378 + %377 = OpLabel + %379 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %380 = OpLoad %v4float %379 + %381 = OpCompositeExtract %float %380 0 + %382 = OpFOrdEqual %bool %float_1 %381 + OpBranch %378 + %378 = OpLabel + %383 = OpPhi %bool %false %370 %382 %377 + OpSelectionMerge %385 None + OpBranchConditional %383 %384 %385 + %384 = OpLabel + %387 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %388 = OpLoad %v4float %387 + %389 = OpVectorShuffle %v2float %388 %388 0 1 + %390 = OpFOrdEqual %v2bool %386 %389 + %391 = OpAll %bool %390 + OpBranch %385 + %385 = OpLabel + %392 = OpPhi %bool %false %378 %391 %384 + OpSelectionMerge %394 None + OpBranchConditional %392 %393 %394 + %393 = OpLabel + %396 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %397 = OpLoad %v4float %396 + %398 = OpVectorShuffle %v3float %397 %397 0 1 2 + %399 = OpFOrdEqual %v3bool %395 %398 + %400 = OpAll %bool %399 + OpBranch %394 + %394 = OpLabel + %401 = OpPhi %bool %false %385 %400 %393 + OpSelectionMerge %403 None + OpBranchConditional %401 %402 %403 + %402 = OpLabel + %405 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %406 = OpLoad %v4float %405 + %407 = OpFOrdEqual %v4bool %404 %406 + %408 = OpAll %bool %407 + OpBranch %403 + %403 = OpLabel + %409 = OpPhi %bool %false %394 %408 %402 + OpSelectionMerge %414 None + OpBranchConditional %409 %412 %413 + %412 = OpLabel + %415 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %416 = OpLoad %v4float %415 + OpStore %410 %416 + OpBranch %414 + %413 = OpLabel + %417 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %418 = OpLoad %v4float %417 + OpStore %410 %418 + OpBranch %414 + %414 = OpLabel + %419 = OpLoad %v4float %410 + OpReturnValue %419 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/MixBool.wgsl b/tests/sksl/intrinsics/MixBool.wgsl index 6ffb8d84de40..558bbe839a5c 100644 --- a/tests/sksl/intrinsics/MixBool.wgsl +++ b/tests/sksl/intrinsics/MixBool.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -34,7 +35,7 @@ fn main(_skParam0: vec2) -> vec4 { let _skTemp13 = select(_globalUniforms.colorGreen.xy, _globalUniforms.colorRed.xy, vec2(true)); let _skTemp14 = select(_globalUniforms.colorGreen.xyz, _globalUniforms.colorRed.xyz, vec3(true)); let _skTemp15 = select(_globalUniforms.colorGreen, _globalUniforms.colorRed, vec4(true)); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((((((((((((((((((((((((((_skTemp0 == intGreen.x && all(_skTemp1 == intGreen.xy)) && all(_skTemp2 == intGreen.xyz)) && all(_skTemp3 == intGreen)) && _skTemp4 == intRed.x) && all(_skTemp5 == intRed.xy)) && all(_skTemp6 == intRed.xyz)) && all(_skTemp7 == intRed)) && 0 == intGreen.x) && all(vec2(0, 100) == intGreen.xy)) && all(vec3(0, 100, 0) == intGreen.xyz)) && all(vec4(0, 100, 0, 100) == intGreen)) && 100 == intRed.x) && all(vec2(100, 0) == intRed.xy)) && all(vec3(100, 0, 0) == intRed.xyz)) && all(vec4(100, 0, 0, 100) == intRed)) && _skTemp8 == _globalUniforms.colorGreen.x) && all(_skTemp9 == _globalUniforms.colorGreen.xy)) && all(_skTemp10 == _globalUniforms.colorGreen.xyz)) && all(_skTemp11 == _globalUniforms.colorGreen)) && _skTemp12 == _globalUniforms.colorRed.x) && all(_skTemp13 == _globalUniforms.colorRed.xy)) && all(_skTemp14 == _globalUniforms.colorRed.xyz)) && all(_skTemp15 == _globalUniforms.colorRed)) && 0.0 == _globalUniforms.colorGreen.x) && all(vec2(0.0, 1.0) == _globalUniforms.colorGreen.xy)) && all(vec3(0.0, 1.0, 0.0) == _globalUniforms.colorGreen.xyz)) && all(vec4(0.0, 1.0, 0.0, 1.0) == _globalUniforms.colorGreen)) && 1.0 == _globalUniforms.colorRed.x) && all(vec2(1.0, 0.0) == _globalUniforms.colorRed.xy)) && all(vec3(1.0, 0.0, 0.0) == _globalUniforms.colorRed.xyz)) && all(vec4(1.0, 0.0, 0.0, 1.0) == _globalUniforms.colorRed))); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((((((((((((((((((((((((((_skTemp0 == intGreen.x) && all(_skTemp1 == intGreen.xy)) && all(_skTemp2 == intGreen.xyz)) && all(_skTemp3 == intGreen)) && (_skTemp4 == intRed.x)) && all(_skTemp5 == intRed.xy)) && all(_skTemp6 == intRed.xyz)) && all(_skTemp7 == intRed)) && (0 == intGreen.x)) && all(vec2(0, 100) == intGreen.xy)) && all(vec3(0, 100, 0) == intGreen.xyz)) && all(vec4(0, 100, 0, 100) == intGreen)) && (100 == intRed.x)) && all(vec2(100, 0) == intRed.xy)) && all(vec3(100, 0, 0) == intRed.xyz)) && all(vec4(100, 0, 0, 100) == intRed)) && (_skTemp8 == _globalUniforms.colorGreen.x)) && all(_skTemp9 == _globalUniforms.colorGreen.xy)) && all(_skTemp10 == _globalUniforms.colorGreen.xyz)) && all(_skTemp11 == _globalUniforms.colorGreen)) && (_skTemp12 == _globalUniforms.colorRed.x)) && all(_skTemp13 == _globalUniforms.colorRed.xy)) && all(_skTemp14 == _globalUniforms.colorRed.xyz)) && all(_skTemp15 == _globalUniforms.colorRed)) && (0.0 == _globalUniforms.colorGreen.x)) && all(vec2(0.0, 1.0) == _globalUniforms.colorGreen.xy)) && all(vec3(0.0, 1.0, 0.0) == _globalUniforms.colorGreen.xyz)) && all(vec4(0.0, 1.0, 0.0, 1.0) == _globalUniforms.colorGreen)) && (1.0 == _globalUniforms.colorRed.x)) && all(vec2(1.0, 0.0) == _globalUniforms.colorRed.xy)) && all(vec3(1.0, 0.0, 0.0) == _globalUniforms.colorRed.xyz)) && all(vec4(1.0, 0.0, 0.0, 1.0) == _globalUniforms.colorRed))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/intrinsics/MixFloatES2.asm.frag b/tests/sksl/intrinsics/MixFloatES2.asm.frag index 8f9b750c1426..b529ccbe1742 100644 --- a/tests/sksl/intrinsics/MixFloatES2.asm.frag +++ b/tests/sksl/intrinsics/MixFloatES2.asm.frag @@ -1,393 +1,393 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpMemberName %_UniformBuffer 2 "colorBlack" -OpMemberName %_UniformBuffer 3 "colorWhite" -OpMemberName %_UniformBuffer 4 "testInputs" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %expectedBW "expectedBW" -OpName %expectedWT "expectedWT" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 3 Offset 48 -OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 4 Offset 64 -OpMemberDecorate %_UniformBuffer 4 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %expectedBW RelaxedPrecision -OpDecorate %expectedWT RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %53 RelaxedPrecision -OpDecorate %55 RelaxedPrecision -OpDecorate %67 RelaxedPrecision -OpDecorate %69 RelaxedPrecision -OpDecorate %79 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %92 RelaxedPrecision -OpDecorate %93 RelaxedPrecision -OpDecorate %96 RelaxedPrecision -OpDecorate %97 RelaxedPrecision -OpDecorate %104 RelaxedPrecision -OpDecorate %105 RelaxedPrecision -OpDecorate %107 RelaxedPrecision -OpDecorate %108 RelaxedPrecision -OpDecorate %110 RelaxedPrecision -OpDecorate %119 RelaxedPrecision -OpDecorate %120 RelaxedPrecision -OpDecorate %123 RelaxedPrecision -OpDecorate %124 RelaxedPrecision -OpDecorate %126 RelaxedPrecision -OpDecorate %135 RelaxedPrecision -OpDecorate %137 RelaxedPrecision -OpDecorate %148 RelaxedPrecision -OpDecorate %154 RelaxedPrecision -OpDecorate %165 RelaxedPrecision -OpDecorate %166 RelaxedPrecision -OpDecorate %169 RelaxedPrecision -OpDecorate %170 RelaxedPrecision -OpDecorate %177 RelaxedPrecision -OpDecorate %178 RelaxedPrecision -OpDecorate %180 RelaxedPrecision -OpDecorate %181 RelaxedPrecision -OpDecorate %183 RelaxedPrecision -OpDecorate %191 RelaxedPrecision -OpDecorate %192 RelaxedPrecision -OpDecorate %194 RelaxedPrecision -OpDecorate %195 RelaxedPrecision -OpDecorate %197 RelaxedPrecision -OpDecorate %205 RelaxedPrecision -OpDecorate %207 RelaxedPrecision -OpDecorate %218 RelaxedPrecision -OpDecorate %225 RelaxedPrecision -OpDecorate %237 RelaxedPrecision -OpDecorate %239 RelaxedPrecision -OpDecorate %240 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpMemberName %_UniformBuffer 2 "colorBlack" + OpMemberName %_UniformBuffer 3 "colorWhite" + OpMemberName %_UniformBuffer 4 "testInputs" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %expectedBW "expectedBW" + OpName %expectedWT "expectedWT" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 3 Offset 48 + OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 4 Offset 64 + OpMemberDecorate %_UniformBuffer 4 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %expectedBW RelaxedPrecision + OpDecorate %expectedWT RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %53 RelaxedPrecision + OpDecorate %55 RelaxedPrecision + OpDecorate %67 RelaxedPrecision + OpDecorate %69 RelaxedPrecision + OpDecorate %79 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %92 RelaxedPrecision + OpDecorate %93 RelaxedPrecision + OpDecorate %96 RelaxedPrecision + OpDecorate %97 RelaxedPrecision + OpDecorate %104 RelaxedPrecision + OpDecorate %105 RelaxedPrecision + OpDecorate %107 RelaxedPrecision + OpDecorate %108 RelaxedPrecision + OpDecorate %110 RelaxedPrecision + OpDecorate %119 RelaxedPrecision + OpDecorate %120 RelaxedPrecision + OpDecorate %123 RelaxedPrecision + OpDecorate %124 RelaxedPrecision + OpDecorate %126 RelaxedPrecision + OpDecorate %135 RelaxedPrecision + OpDecorate %137 RelaxedPrecision + OpDecorate %148 RelaxedPrecision + OpDecorate %154 RelaxedPrecision + OpDecorate %165 RelaxedPrecision + OpDecorate %166 RelaxedPrecision + OpDecorate %169 RelaxedPrecision + OpDecorate %170 RelaxedPrecision + OpDecorate %177 RelaxedPrecision + OpDecorate %178 RelaxedPrecision + OpDecorate %180 RelaxedPrecision + OpDecorate %181 RelaxedPrecision + OpDecorate %183 RelaxedPrecision + OpDecorate %191 RelaxedPrecision + OpDecorate %192 RelaxedPrecision + OpDecorate %194 RelaxedPrecision + OpDecorate %195 RelaxedPrecision + OpDecorate %197 RelaxedPrecision + OpDecorate %205 RelaxedPrecision + OpDecorate %207 RelaxedPrecision + OpDecorate %218 RelaxedPrecision + OpDecorate %225 RelaxedPrecision + OpDecorate %237 RelaxedPrecision + OpDecorate %239 RelaxedPrecision + OpDecorate %240 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float -%float_0_5 = OpConstant %float 0.5 -%float_1 = OpConstant %float 1 -%30 = OpConstantComposite %v4float %float_0_5 %float_0_5 %float_0_5 %float_1 -%float_2_25 = OpConstant %float 2.25 -%33 = OpConstantComposite %v4float %float_1 %float_0_5 %float_1 %float_2_25 -%false = OpConstantFalse %bool + %float_0_5 = OpConstant %float 0.5 + %float_1 = OpConstant %float 1 + %30 = OpConstantComposite %v4float %float_0_5 %float_0_5 %float_0_5 %float_1 + %float_2_25 = OpConstant %float 2.25 + %33 = OpConstantComposite %v4float %float_1 %float_0_5 %float_1 %float_2_25 + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%44 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 -%45 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1 -%v4bool = OpTypeVector %bool 4 -%float_0_25 = OpConstant %float 0.25 -%57 = OpConstantComposite %v4float %float_0_25 %float_0_25 %float_0_25 %float_0_25 -%float_0_75 = OpConstant %float 0.75 -%59 = OpConstantComposite %v4float %float_0_25 %float_0_75 %float_0 %float_1 -%70 = OpConstantComposite %v4float %float_0_75 %float_0_75 %float_0_75 %float_0_75 -%71 = OpConstantComposite %v4float %float_0_75 %float_0_25 %float_0 %float_1 -%82 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 -%83 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1 -%int_2 = OpConstant %int 2 -%int_3 = OpConstant %int 3 -%109 = OpConstantComposite %v2float %float_0_5 %float_0_5 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%125 = OpConstantComposite %v3float %float_0_5 %float_0_5 %float_0_5 -%v3bool = OpTypeVector %bool 3 -%138 = OpConstantComposite %v4float %float_0_5 %float_0_5 %float_0_5 %float_0_5 -%true = OpConstantTrue %bool -%int_4 = OpConstant %int 4 -%182 = OpConstantComposite %v2float %float_0 %float_0_5 -%196 = OpConstantComposite %v3float %float_0 %float_0_5 %float_0 -%208 = OpConstantComposite %v4float %float_0 %float_0_5 %float_0 %float_1 -%217 = OpConstantComposite %v2float %float_1 %float_0_5 -%224 = OpConstantComposite %v3float %float_1 %float_0_5 %float_1 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %44 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %45 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1 + %v4bool = OpTypeVector %bool 4 + %float_0_25 = OpConstant %float 0.25 + %57 = OpConstantComposite %v4float %float_0_25 %float_0_25 %float_0_25 %float_0_25 + %float_0_75 = OpConstant %float 0.75 + %59 = OpConstantComposite %v4float %float_0_25 %float_0_75 %float_0 %float_1 + %70 = OpConstantComposite %v4float %float_0_75 %float_0_75 %float_0_75 %float_0_75 + %71 = OpConstantComposite %v4float %float_0_75 %float_0_25 %float_0 %float_1 + %82 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %83 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1 + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 + %109 = OpConstantComposite %v2float %float_0_5 %float_0_5 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %125 = OpConstantComposite %v3float %float_0_5 %float_0_5 %float_0_5 + %v3bool = OpTypeVector %bool 3 + %138 = OpConstantComposite %v4float %float_0_5 %float_0_5 %float_0_5 %float_0_5 + %true = OpConstantTrue %bool + %int_4 = OpConstant %int 4 + %182 = OpConstantComposite %v2float %float_0 %float_0_5 + %196 = OpConstantComposite %v3float %float_0 %float_0_5 %float_0 + %208 = OpConstantComposite %v4float %float_0 %float_0_5 %float_0 %float_1 + %217 = OpConstantComposite %v2float %float_1 %float_0_5 + %224 = OpConstantComposite %v3float %float_1 %float_0_5 %float_1 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%expectedBW = OpVariable %_ptr_Function_v4float Function -%expectedWT = OpVariable %_ptr_Function_v4float Function -%232 = OpVariable %_ptr_Function_v4float Function -OpStore %expectedBW %30 -OpStore %expectedWT %33 -%36 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%40 = OpLoad %v4float %36 -%41 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%43 = OpLoad %v4float %41 -%35 = OpExtInst %v4float %1 FMix %40 %43 %44 -%46 = OpFOrdEqual %v4bool %35 %45 -%48 = OpAll %bool %46 -OpSelectionMerge %50 None -OpBranchConditional %48 %49 %50 -%49 = OpLabel -%52 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%53 = OpLoad %v4float %52 -%54 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%55 = OpLoad %v4float %54 -%51 = OpExtInst %v4float %1 FMix %53 %55 %57 -%60 = OpFOrdEqual %v4bool %51 %59 -%61 = OpAll %bool %60 -OpBranch %50 -%50 = OpLabel -%62 = OpPhi %bool %false %25 %61 %49 -OpSelectionMerge %64 None -OpBranchConditional %62 %63 %64 -%63 = OpLabel -%66 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%67 = OpLoad %v4float %66 -%68 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%69 = OpLoad %v4float %68 -%65 = OpExtInst %v4float %1 FMix %67 %69 %70 -%72 = OpFOrdEqual %v4bool %65 %71 -%73 = OpAll %bool %72 -OpBranch %64 -%64 = OpLabel -%74 = OpPhi %bool %false %50 %73 %63 -OpSelectionMerge %76 None -OpBranchConditional %74 %75 %76 -%75 = OpLabel -%78 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%79 = OpLoad %v4float %78 -%80 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%81 = OpLoad %v4float %80 -%77 = OpExtInst %v4float %1 FMix %79 %81 %82 -%84 = OpFOrdEqual %v4bool %77 %83 -%85 = OpAll %bool %84 -OpBranch %76 -%76 = OpLabel -%86 = OpPhi %bool %false %64 %85 %75 -OpSelectionMerge %88 None -OpBranchConditional %86 %87 %88 -%87 = OpLabel -%90 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%92 = OpLoad %v4float %90 -%93 = OpCompositeExtract %float %92 0 -%94 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%96 = OpLoad %v4float %94 -%97 = OpCompositeExtract %float %96 0 -%89 = OpExtInst %float %1 FMix %93 %97 %float_0_5 -%98 = OpFOrdEqual %bool %89 %float_0_5 -OpBranch %88 -%88 = OpLabel -%99 = OpPhi %bool %false %76 %98 %87 -OpSelectionMerge %101 None -OpBranchConditional %99 %100 %101 -%100 = OpLabel -%103 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%104 = OpLoad %v4float %103 -%105 = OpVectorShuffle %v2float %104 %104 0 1 -%106 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%107 = OpLoad %v4float %106 -%108 = OpVectorShuffle %v2float %107 %107 0 1 -%102 = OpExtInst %v2float %1 FMix %105 %108 %109 -%110 = OpVectorShuffle %v2float %30 %30 0 1 -%111 = OpFOrdEqual %v2bool %102 %110 -%113 = OpAll %bool %111 -OpBranch %101 -%101 = OpLabel -%114 = OpPhi %bool %false %88 %113 %100 -OpSelectionMerge %116 None -OpBranchConditional %114 %115 %116 -%115 = OpLabel -%118 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%119 = OpLoad %v4float %118 -%120 = OpVectorShuffle %v3float %119 %119 0 1 2 -%122 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%123 = OpLoad %v4float %122 -%124 = OpVectorShuffle %v3float %123 %123 0 1 2 -%117 = OpExtInst %v3float %1 FMix %120 %124 %125 -%126 = OpVectorShuffle %v3float %30 %30 0 1 2 -%127 = OpFOrdEqual %v3bool %117 %126 -%129 = OpAll %bool %127 -OpBranch %116 -%116 = OpLabel -%130 = OpPhi %bool %false %101 %129 %115 -OpSelectionMerge %132 None -OpBranchConditional %130 %131 %132 -%131 = OpLabel -%134 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%135 = OpLoad %v4float %134 -%136 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%137 = OpLoad %v4float %136 -%133 = OpExtInst %v4float %1 FMix %135 %137 %138 -%139 = OpFOrdEqual %v4bool %133 %30 -%140 = OpAll %bool %139 -OpBranch %132 -%132 = OpLabel -%141 = OpPhi %bool %false %116 %140 %131 -OpSelectionMerge %143 None -OpBranchConditional %141 %142 %143 -%142 = OpLabel -OpBranch %143 -%143 = OpLabel -%145 = OpPhi %bool %false %132 %true %142 -OpSelectionMerge %147 None -OpBranchConditional %145 %146 %147 -%146 = OpLabel -%148 = OpVectorShuffle %v2float %30 %30 0 1 -%149 = OpFOrdEqual %v2bool %109 %148 -%150 = OpAll %bool %149 -OpBranch %147 -%147 = OpLabel -%151 = OpPhi %bool %false %143 %150 %146 -OpSelectionMerge %153 None -OpBranchConditional %151 %152 %153 -%152 = OpLabel -%154 = OpVectorShuffle %v3float %30 %30 0 1 2 -%155 = OpFOrdEqual %v3bool %125 %154 -%156 = OpAll %bool %155 -OpBranch %153 -%153 = OpLabel -%157 = OpPhi %bool %false %147 %156 %152 -OpSelectionMerge %159 None -OpBranchConditional %157 %158 %159 -%158 = OpLabel -OpBranch %159 -%159 = OpLabel -%160 = OpPhi %bool %false %153 %true %158 -OpSelectionMerge %162 None -OpBranchConditional %160 %161 %162 -%161 = OpLabel -%164 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%165 = OpLoad %v4float %164 -%166 = OpCompositeExtract %float %165 0 -%167 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 -%169 = OpLoad %v4float %167 -%170 = OpCompositeExtract %float %169 0 -%163 = OpExtInst %float %1 FMix %166 %170 %float_0 -%171 = OpFOrdEqual %bool %163 %float_1 -OpBranch %162 -%162 = OpLabel -%172 = OpPhi %bool %false %159 %171 %161 -OpSelectionMerge %174 None -OpBranchConditional %172 %173 %174 -%173 = OpLabel -%176 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%177 = OpLoad %v4float %176 -%178 = OpVectorShuffle %v2float %177 %177 0 1 -%179 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 -%180 = OpLoad %v4float %179 -%181 = OpVectorShuffle %v2float %180 %180 0 1 -%175 = OpExtInst %v2float %1 FMix %178 %181 %182 -%183 = OpVectorShuffle %v2float %33 %33 0 1 -%184 = OpFOrdEqual %v2bool %175 %183 -%185 = OpAll %bool %184 -OpBranch %174 -%174 = OpLabel -%186 = OpPhi %bool %false %162 %185 %173 -OpSelectionMerge %188 None -OpBranchConditional %186 %187 %188 -%187 = OpLabel -%190 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%191 = OpLoad %v4float %190 -%192 = OpVectorShuffle %v3float %191 %191 0 1 2 -%193 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 -%194 = OpLoad %v4float %193 -%195 = OpVectorShuffle %v3float %194 %194 0 1 2 -%189 = OpExtInst %v3float %1 FMix %192 %195 %196 -%197 = OpVectorShuffle %v3float %33 %33 0 1 2 -%198 = OpFOrdEqual %v3bool %189 %197 -%199 = OpAll %bool %198 -OpBranch %188 -%188 = OpLabel -%200 = OpPhi %bool %false %174 %199 %187 -OpSelectionMerge %202 None -OpBranchConditional %200 %201 %202 -%201 = OpLabel -%204 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%205 = OpLoad %v4float %204 -%206 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 -%207 = OpLoad %v4float %206 -%203 = OpExtInst %v4float %1 FMix %205 %207 %208 -%209 = OpFOrdEqual %v4bool %203 %33 -%210 = OpAll %bool %209 -OpBranch %202 -%202 = OpLabel -%211 = OpPhi %bool %false %188 %210 %201 -OpSelectionMerge %213 None -OpBranchConditional %211 %212 %213 -%212 = OpLabel -OpBranch %213 -%213 = OpLabel -%214 = OpPhi %bool %false %202 %true %212 -OpSelectionMerge %216 None -OpBranchConditional %214 %215 %216 -%215 = OpLabel -%218 = OpVectorShuffle %v2float %33 %33 0 1 -%219 = OpFOrdEqual %v2bool %217 %218 -%220 = OpAll %bool %219 -OpBranch %216 -%216 = OpLabel -%221 = OpPhi %bool %false %213 %220 %215 -OpSelectionMerge %223 None -OpBranchConditional %221 %222 %223 -%222 = OpLabel -%225 = OpVectorShuffle %v3float %33 %33 0 1 2 -%226 = OpFOrdEqual %v3bool %224 %225 -%227 = OpAll %bool %226 -OpBranch %223 -%223 = OpLabel -%228 = OpPhi %bool %false %216 %227 %222 -OpSelectionMerge %230 None -OpBranchConditional %228 %229 %230 -%229 = OpLabel -OpBranch %230 -%230 = OpLabel -%231 = OpPhi %bool %false %223 %true %229 -OpSelectionMerge %235 None -OpBranchConditional %231 %233 %234 -%233 = OpLabel -%236 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%237 = OpLoad %v4float %236 -OpStore %232 %237 -OpBranch %235 -%234 = OpLabel -%238 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%239 = OpLoad %v4float %238 -OpStore %232 %239 -OpBranch %235 -%235 = OpLabel -%240 = OpLoad %v4float %232 -OpReturnValue %240 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %expectedBW = OpVariable %_ptr_Function_v4float Function + %expectedWT = OpVariable %_ptr_Function_v4float Function + %232 = OpVariable %_ptr_Function_v4float Function + OpStore %expectedBW %30 + OpStore %expectedWT %33 + %36 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %40 = OpLoad %v4float %36 + %41 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %43 = OpLoad %v4float %41 + %35 = OpExtInst %v4float %1 FMix %40 %43 %44 + %46 = OpFOrdEqual %v4bool %35 %45 + %48 = OpAll %bool %46 + OpSelectionMerge %50 None + OpBranchConditional %48 %49 %50 + %49 = OpLabel + %52 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %53 = OpLoad %v4float %52 + %54 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %55 = OpLoad %v4float %54 + %51 = OpExtInst %v4float %1 FMix %53 %55 %57 + %60 = OpFOrdEqual %v4bool %51 %59 + %61 = OpAll %bool %60 + OpBranch %50 + %50 = OpLabel + %62 = OpPhi %bool %false %25 %61 %49 + OpSelectionMerge %64 None + OpBranchConditional %62 %63 %64 + %63 = OpLabel + %66 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %67 = OpLoad %v4float %66 + %68 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %69 = OpLoad %v4float %68 + %65 = OpExtInst %v4float %1 FMix %67 %69 %70 + %72 = OpFOrdEqual %v4bool %65 %71 + %73 = OpAll %bool %72 + OpBranch %64 + %64 = OpLabel + %74 = OpPhi %bool %false %50 %73 %63 + OpSelectionMerge %76 None + OpBranchConditional %74 %75 %76 + %75 = OpLabel + %78 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %79 = OpLoad %v4float %78 + %80 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %81 = OpLoad %v4float %80 + %77 = OpExtInst %v4float %1 FMix %79 %81 %82 + %84 = OpFOrdEqual %v4bool %77 %83 + %85 = OpAll %bool %84 + OpBranch %76 + %76 = OpLabel + %86 = OpPhi %bool %false %64 %85 %75 + OpSelectionMerge %88 None + OpBranchConditional %86 %87 %88 + %87 = OpLabel + %90 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %92 = OpLoad %v4float %90 + %93 = OpCompositeExtract %float %92 0 + %94 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %96 = OpLoad %v4float %94 + %97 = OpCompositeExtract %float %96 0 + %89 = OpExtInst %float %1 FMix %93 %97 %float_0_5 + %98 = OpFOrdEqual %bool %89 %float_0_5 + OpBranch %88 + %88 = OpLabel + %99 = OpPhi %bool %false %76 %98 %87 + OpSelectionMerge %101 None + OpBranchConditional %99 %100 %101 + %100 = OpLabel + %103 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %104 = OpLoad %v4float %103 + %105 = OpVectorShuffle %v2float %104 %104 0 1 + %106 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %107 = OpLoad %v4float %106 + %108 = OpVectorShuffle %v2float %107 %107 0 1 + %102 = OpExtInst %v2float %1 FMix %105 %108 %109 + %110 = OpVectorShuffle %v2float %30 %30 0 1 + %111 = OpFOrdEqual %v2bool %102 %110 + %113 = OpAll %bool %111 + OpBranch %101 + %101 = OpLabel + %114 = OpPhi %bool %false %88 %113 %100 + OpSelectionMerge %116 None + OpBranchConditional %114 %115 %116 + %115 = OpLabel + %118 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %119 = OpLoad %v4float %118 + %120 = OpVectorShuffle %v3float %119 %119 0 1 2 + %122 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %123 = OpLoad %v4float %122 + %124 = OpVectorShuffle %v3float %123 %123 0 1 2 + %117 = OpExtInst %v3float %1 FMix %120 %124 %125 + %126 = OpVectorShuffle %v3float %30 %30 0 1 2 + %127 = OpFOrdEqual %v3bool %117 %126 + %129 = OpAll %bool %127 + OpBranch %116 + %116 = OpLabel + %130 = OpPhi %bool %false %101 %129 %115 + OpSelectionMerge %132 None + OpBranchConditional %130 %131 %132 + %131 = OpLabel + %134 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %135 = OpLoad %v4float %134 + %136 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %137 = OpLoad %v4float %136 + %133 = OpExtInst %v4float %1 FMix %135 %137 %138 + %139 = OpFOrdEqual %v4bool %133 %30 + %140 = OpAll %bool %139 + OpBranch %132 + %132 = OpLabel + %141 = OpPhi %bool %false %116 %140 %131 + OpSelectionMerge %143 None + OpBranchConditional %141 %142 %143 + %142 = OpLabel + OpBranch %143 + %143 = OpLabel + %145 = OpPhi %bool %false %132 %true %142 + OpSelectionMerge %147 None + OpBranchConditional %145 %146 %147 + %146 = OpLabel + %148 = OpVectorShuffle %v2float %30 %30 0 1 + %149 = OpFOrdEqual %v2bool %109 %148 + %150 = OpAll %bool %149 + OpBranch %147 + %147 = OpLabel + %151 = OpPhi %bool %false %143 %150 %146 + OpSelectionMerge %153 None + OpBranchConditional %151 %152 %153 + %152 = OpLabel + %154 = OpVectorShuffle %v3float %30 %30 0 1 2 + %155 = OpFOrdEqual %v3bool %125 %154 + %156 = OpAll %bool %155 + OpBranch %153 + %153 = OpLabel + %157 = OpPhi %bool %false %147 %156 %152 + OpSelectionMerge %159 None + OpBranchConditional %157 %158 %159 + %158 = OpLabel + OpBranch %159 + %159 = OpLabel + %160 = OpPhi %bool %false %153 %true %158 + OpSelectionMerge %162 None + OpBranchConditional %160 %161 %162 + %161 = OpLabel + %164 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %165 = OpLoad %v4float %164 + %166 = OpCompositeExtract %float %165 0 + %167 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 + %169 = OpLoad %v4float %167 + %170 = OpCompositeExtract %float %169 0 + %163 = OpExtInst %float %1 FMix %166 %170 %float_0 + %171 = OpFOrdEqual %bool %163 %float_1 + OpBranch %162 + %162 = OpLabel + %172 = OpPhi %bool %false %159 %171 %161 + OpSelectionMerge %174 None + OpBranchConditional %172 %173 %174 + %173 = OpLabel + %176 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %177 = OpLoad %v4float %176 + %178 = OpVectorShuffle %v2float %177 %177 0 1 + %179 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 + %180 = OpLoad %v4float %179 + %181 = OpVectorShuffle %v2float %180 %180 0 1 + %175 = OpExtInst %v2float %1 FMix %178 %181 %182 + %183 = OpVectorShuffle %v2float %33 %33 0 1 + %184 = OpFOrdEqual %v2bool %175 %183 + %185 = OpAll %bool %184 + OpBranch %174 + %174 = OpLabel + %186 = OpPhi %bool %false %162 %185 %173 + OpSelectionMerge %188 None + OpBranchConditional %186 %187 %188 + %187 = OpLabel + %190 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %191 = OpLoad %v4float %190 + %192 = OpVectorShuffle %v3float %191 %191 0 1 2 + %193 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 + %194 = OpLoad %v4float %193 + %195 = OpVectorShuffle %v3float %194 %194 0 1 2 + %189 = OpExtInst %v3float %1 FMix %192 %195 %196 + %197 = OpVectorShuffle %v3float %33 %33 0 1 2 + %198 = OpFOrdEqual %v3bool %189 %197 + %199 = OpAll %bool %198 + OpBranch %188 + %188 = OpLabel + %200 = OpPhi %bool %false %174 %199 %187 + OpSelectionMerge %202 None + OpBranchConditional %200 %201 %202 + %201 = OpLabel + %204 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %205 = OpLoad %v4float %204 + %206 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 + %207 = OpLoad %v4float %206 + %203 = OpExtInst %v4float %1 FMix %205 %207 %208 + %209 = OpFOrdEqual %v4bool %203 %33 + %210 = OpAll %bool %209 + OpBranch %202 + %202 = OpLabel + %211 = OpPhi %bool %false %188 %210 %201 + OpSelectionMerge %213 None + OpBranchConditional %211 %212 %213 + %212 = OpLabel + OpBranch %213 + %213 = OpLabel + %214 = OpPhi %bool %false %202 %true %212 + OpSelectionMerge %216 None + OpBranchConditional %214 %215 %216 + %215 = OpLabel + %218 = OpVectorShuffle %v2float %33 %33 0 1 + %219 = OpFOrdEqual %v2bool %217 %218 + %220 = OpAll %bool %219 + OpBranch %216 + %216 = OpLabel + %221 = OpPhi %bool %false %213 %220 %215 + OpSelectionMerge %223 None + OpBranchConditional %221 %222 %223 + %222 = OpLabel + %225 = OpVectorShuffle %v3float %33 %33 0 1 2 + %226 = OpFOrdEqual %v3bool %224 %225 + %227 = OpAll %bool %226 + OpBranch %223 + %223 = OpLabel + %228 = OpPhi %bool %false %216 %227 %222 + OpSelectionMerge %230 None + OpBranchConditional %228 %229 %230 + %229 = OpLabel + OpBranch %230 + %230 = OpLabel + %231 = OpPhi %bool %false %223 %true %229 + OpSelectionMerge %235 None + OpBranchConditional %231 %233 %234 + %233 = OpLabel + %236 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %237 = OpLoad %v4float %236 + OpStore %232 %237 + OpBranch %235 + %234 = OpLabel + %238 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %239 = OpLoad %v4float %238 + OpStore %232 %239 + OpBranch %235 + %235 = OpLabel + %240 = OpLoad %v4float %232 + OpReturnValue %240 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/MixFloatES2.skrp b/tests/sksl/intrinsics/MixFloatES2.skrp index 3870361f27d5..2dc84c84b92b 100644 --- a/tests/sksl/intrinsics/MixFloatES2.skrp +++ b/tests/sksl/intrinsics/MixFloatES2.skrp @@ -1,12 +1,39 @@ +146 instructions + [immutable slots] -expectedBW(0) = 0x3F000000 (0.5) -expectedBW(1) = 0x3F000000 (0.5) -expectedBW(2) = 0x3F000000 (0.5) -expectedBW(3) = 0x3F800000 (1.0) -expectedWT(0) = 0x3F800000 (1.0) -expectedWT(1) = 0x3F000000 (0.5) -expectedWT(2) = 0x3F800000 (1.0) -expectedWT(3) = 0x40100000 (2.25) +i0 = 0x3F000000 (0.5) +i1 = 0x3F000000 (0.5) +i2 = 0x3F000000 (0.5) +i3 = 0x3F800000 (1.0) +i4 = 0x3F800000 (1.0) +i5 = 0x3F000000 (0.5) +i6 = 0x3F800000 (1.0) +i7 = 0x40100000 (2.25) +i8 = 0 +i9 = 0x3F800000 (1.0) +i10 = 0 +i11 = 0x3F800000 (1.0) +i12 = 0x3E800000 (0.25) +i13 = 0x3F400000 (0.75) +i14 = 0 +i15 = 0x3F800000 (1.0) +i16 = 0x3F400000 (0.75) +i17 = 0x3E800000 (0.25) +i18 = 0 +i19 = 0x3F800000 (1.0) +i20 = 0x3F800000 (1.0) +i21 = 0 +i22 = 0 +i23 = 0x3F800000 (1.0) +i24 = 0 +i25 = 0x3F000000 (0.5) +i26 = 0 +i27 = 0x3F000000 (0.5) +i28 = 0 +i29 = 0 +i30 = 0x3F000000 (0.5) +i31 = 0 +i32 = 0x3F800000 (1.0) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -14,10 +41,7 @@ splat_4_constants $0..3 = 0 copy_4_uniforms $4..7 = colorGreen copy_4_uniforms $8..11 = colorRed mix_4_floats $0..3 = mix($4..7, $8..11, $0..3) -copy_constant $4 = 0 -copy_constant $5 = 0x3F800000 (1.0) -copy_constant $6 = 0 -copy_constant $7 = 0x3F800000 (1.0) +copy_4_immutables_unmasked $4..7 = i8..11 [0, 0x3F800000 (1.0), 0, 0x3F800000 (1.0)] cmpeq_4_floats $0..3 = equal($0..3, $4..7) bitwise_and_2_ints $0..1 &= $2..3 bitwise_and_int $0 &= $1 @@ -25,10 +49,7 @@ splat_4_constants $1..4 = 0x3E800000 (0.25) copy_4_uniforms $5..8 = colorGreen copy_4_uniforms $9..12 = colorRed mix_4_floats $1..4 = mix($5..8, $9..12, $1..4) -copy_constant $5 = 0x3E800000 (0.25) -copy_constant $6 = 0x3F400000 (0.75) -copy_constant $7 = 0 -copy_constant $8 = 0x3F800000 (1.0) +copy_4_immutables_unmasked $5..8 = i12..15 [0x3E800000 (0.25), 0x3F400000 (0.75), 0, 0x3F800000 (1.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -37,10 +58,7 @@ splat_4_constants $1..4 = 0x3F400000 (0.75) copy_4_uniforms $5..8 = colorGreen copy_4_uniforms $9..12 = colorRed mix_4_floats $1..4 = mix($5..8, $9..12, $1..4) -copy_constant $5 = 0x3F400000 (0.75) -copy_constant $6 = 0x3E800000 (0.25) -copy_constant $7 = 0 -copy_constant $8 = 0x3F800000 (1.0) +copy_4_immutables_unmasked $5..8 = i16..19 [0x3F400000 (0.75), 0x3E800000 (0.25), 0, 0x3F800000 (1.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -49,9 +67,7 @@ splat_4_constants $1..4 = 0x3F800000 (1.0) copy_4_uniforms $5..8 = colorGreen copy_4_uniforms $9..12 = colorRed mix_4_floats $1..4 = mix($5..8, $9..12, $1..4) -copy_constant $5 = 0x3F800000 (1.0) -splat_2_constants $6..7 = 0 -copy_constant $8 = 0x3F800000 (1.0) +copy_4_immutables_unmasked $5..8 = i20..23 [0x3F800000 (1.0), 0, 0, 0x3F800000 (1.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -60,14 +76,13 @@ copy_constant $1 = 0x3F000000 (0.5) copy_uniform $2 = colorBlack(0) copy_uniform $3 = colorWhite(0) mix_float $1 = mix($2, $3, $1) -copy_slot_unmasked $2 = expectedBW(0) -cmpeq_float $1 = equal($1, $2) +cmpeq_imm_float $1 = equal($1, 0x3F000000 (0.5)) bitwise_and_int $0 &= $1 splat_2_constants $1..2 = 0x3F000000 (0.5) copy_2_uniforms $3..4 = colorBlack(0..1) copy_2_uniforms $5..6 = colorWhite(0..1) mix_2_floats $1..2 = mix($3..4, $5..6, $1..2) -copy_2_slots_unmasked $3..4 = expectedBW(0..1) +copy_2_immutables_unmasked $3..4 = i0..1 [0x3F000000 (0.5), 0x3F000000 (0.5)] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 @@ -75,7 +90,7 @@ splat_3_constants $1..3 = 0x3F000000 (0.5) copy_3_uniforms $4..6 = colorBlack(0..2) copy_3_uniforms $7..9 = colorWhite(0..2) mix_3_floats $1..3 = mix($4..6, $7..9, $1..3) -copy_3_slots_unmasked $4..6 = expectedBW(0..2) +copy_3_immutables_unmasked $4..6 = i0..2 [0x3F000000 (0.5), 0x3F000000 (0.5), 0x3F000000 (0.5)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 @@ -84,28 +99,27 @@ splat_4_constants $1..4 = 0x3F000000 (0.5) copy_4_uniforms $5..8 = colorBlack copy_4_uniforms $9..12 = colorWhite mix_4_floats $1..4 = mix($5..8, $9..12, $1..4) -copy_4_slots_unmasked $5..8 = expectedBW +copy_4_immutables_unmasked $5..8 = i0..3 [0x3F000000 (0.5), 0x3F000000 (0.5), 0x3F000000 (0.5), 0x3F800000 (1.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expectedBW(0) +copy_constant $1 = 0x3F000000 (0.5) cmpeq_imm_float $1 = equal($1, 0x3F000000 (0.5)) bitwise_and_int $0 &= $1 splat_2_constants $1..2 = 0x3F000000 (0.5) -copy_2_slots_unmasked $3..4 = expectedBW(0..1) +copy_2_immutables_unmasked $3..4 = i0..1 [0x3F000000 (0.5), 0x3F000000 (0.5)] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 splat_3_constants $1..3 = 0x3F000000 (0.5) -copy_3_slots_unmasked $4..6 = expectedBW(0..2) +copy_3_immutables_unmasked $4..6 = i0..2 [0x3F000000 (0.5), 0x3F000000 (0.5), 0x3F000000 (0.5)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -splat_3_constants $1..3 = 0x3F000000 (0.5) -copy_constant $4 = 0x3F800000 (1.0) -copy_4_slots_unmasked $5..8 = expectedBW +copy_4_immutables_unmasked $1..4 = i0..3 [0x3F000000 (0.5), 0x3F000000 (0.5), 0x3F000000 (0.5), 0x3F800000 (1.0)] +copy_4_immutables_unmasked $5..8 = i0..3 [0x3F000000 (0.5), 0x3F000000 (0.5), 0x3F000000 (0.5), 0x3F800000 (1.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -114,63 +128,50 @@ copy_constant $1 = 0 copy_uniform $2 = colorWhite(0) copy_uniform $3 = testInputs(0) mix_float $1 = mix($2, $3, $1) -copy_slot_unmasked $2 = expectedWT(0) -cmpeq_float $1 = equal($1, $2) +cmpeq_imm_float $1 = equal($1, 0x3F800000 (1.0)) bitwise_and_int $0 &= $1 -copy_constant $1 = 0 -copy_constant $2 = 0x3F000000 (0.5) +copy_2_immutables_unmasked $1..2 = i24..25 [0, 0x3F000000 (0.5)] copy_2_uniforms $3..4 = colorWhite(0..1) copy_2_uniforms $5..6 = testInputs(0..1) mix_2_floats $1..2 = mix($3..4, $5..6, $1..2) -copy_2_slots_unmasked $3..4 = expectedWT(0..1) +copy_2_immutables_unmasked $3..4 = i4..5 [0x3F800000 (1.0), 0x3F000000 (0.5)] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0 -copy_constant $2 = 0x3F000000 (0.5) -copy_constant $3 = 0 +copy_3_immutables_unmasked $1..3 = i26..28 [0, 0x3F000000 (0.5), 0] copy_3_uniforms $4..6 = colorWhite(0..2) copy_3_uniforms $7..9 = testInputs(0..2) mix_3_floats $1..3 = mix($4..6, $7..9, $1..3) -copy_3_slots_unmasked $4..6 = expectedWT(0..2) +copy_3_immutables_unmasked $4..6 = i4..6 [0x3F800000 (1.0), 0x3F000000 (0.5), 0x3F800000 (1.0)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0 -copy_constant $2 = 0x3F000000 (0.5) -copy_constant $3 = 0 -copy_constant $4 = 0x3F800000 (1.0) +copy_4_immutables_unmasked $1..4 = i29..32 [0, 0x3F000000 (0.5), 0, 0x3F800000 (1.0)] copy_4_uniforms $5..8 = colorWhite copy_4_uniforms $9..12 = testInputs mix_4_floats $1..4 = mix($5..8, $9..12, $1..4) -copy_4_slots_unmasked $5..8 = expectedWT +copy_4_immutables_unmasked $5..8 = i4..7 [0x3F800000 (1.0), 0x3F000000 (0.5), 0x3F800000 (1.0), 0x40100000 (2.25)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expectedWT(0) +copy_constant $1 = 0x3F800000 (1.0) cmpeq_imm_float $1 = equal($1, 0x3F800000 (1.0)) bitwise_and_int $0 &= $1 -copy_constant $1 = 0x3F800000 (1.0) -copy_constant $2 = 0x3F000000 (0.5) -copy_2_slots_unmasked $3..4 = expectedWT(0..1) +copy_2_immutables_unmasked $1..2 = i4..5 [0x3F800000 (1.0), 0x3F000000 (0.5)] +copy_2_immutables_unmasked $3..4 = i4..5 [0x3F800000 (1.0), 0x3F000000 (0.5)] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0x3F800000 (1.0) -copy_constant $2 = 0x3F000000 (0.5) -copy_constant $3 = 0x3F800000 (1.0) -copy_3_slots_unmasked $4..6 = expectedWT(0..2) +copy_3_immutables_unmasked $1..3 = i4..6 [0x3F800000 (1.0), 0x3F000000 (0.5), 0x3F800000 (1.0)] +copy_3_immutables_unmasked $4..6 = i4..6 [0x3F800000 (1.0), 0x3F000000 (0.5), 0x3F800000 (1.0)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0x3F800000 (1.0) -copy_constant $2 = 0x3F000000 (0.5) -copy_constant $3 = 0x3F800000 (1.0) -copy_constant $4 = 0x40100000 (2.25) -copy_4_slots_unmasked $5..8 = expectedWT +copy_4_immutables_unmasked $1..4 = i4..7 [0x3F800000 (1.0), 0x3F000000 (0.5), 0x3F800000 (1.0), 0x40100000 (2.25)] +copy_4_immutables_unmasked $5..8 = i4..7 [0x3F800000 (1.0), 0x3F000000 (0.5), 0x3F800000 (1.0), 0x40100000 (2.25)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 diff --git a/tests/sksl/intrinsics/MixFloatES2.wgsl b/tests/sksl/intrinsics/MixFloatES2.wgsl index d062c6314022..97f24b2cde28 100644 --- a/tests/sksl/intrinsics/MixFloatES2.wgsl +++ b/tests/sksl/intrinsics/MixFloatES2.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -30,7 +31,7 @@ fn main(_skParam0: vec2) -> vec4 { let _skTemp9 = mix(_globalUniforms.colorWhite.xy, _globalUniforms.testInputs.xy, vec2(0.0, 0.5)); let _skTemp10 = mix(_globalUniforms.colorWhite.xyz, _globalUniforms.testInputs.xyz, vec3(0.0, 0.5, 0.0)); let _skTemp11 = mix(_globalUniforms.colorWhite, _globalUniforms.testInputs, vec4(0.0, 0.5, 0.0, 1.0)); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((((((((((((((all(_skTemp0 == vec4(0.0, 1.0, 0.0, 1.0)) && all(_skTemp1 == vec4(0.25, 0.75, 0.0, 1.0))) && all(_skTemp2 == vec4(0.75, 0.25, 0.0, 1.0))) && all(_skTemp3 == vec4(1.0, 0.0, 0.0, 1.0))) && _skTemp4 == expectedBW.x) && all(_skTemp5 == expectedBW.xy)) && all(_skTemp6 == expectedBW.xyz)) && all(_skTemp7 == expectedBW)) && 0.5 == expectedBW.x) && all(vec2(0.5) == expectedBW.xy)) && all(vec3(0.5) == expectedBW.xyz)) && all(vec4(0.5, 0.5, 0.5, 1.0) == expectedBW)) && _skTemp8 == expectedWT.x) && all(_skTemp9 == expectedWT.xy)) && all(_skTemp10 == expectedWT.xyz)) && all(_skTemp11 == expectedWT)) && 1.0 == expectedWT.x) && all(vec2(1.0, 0.5) == expectedWT.xy)) && all(vec3(1.0, 0.5, 1.0) == expectedWT.xyz)) && all(vec4(1.0, 0.5, 1.0, 2.25) == expectedWT))); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((((((((((((((all(_skTemp0 == vec4(0.0, 1.0, 0.0, 1.0)) && all(_skTemp1 == vec4(0.25, 0.75, 0.0, 1.0))) && all(_skTemp2 == vec4(0.75, 0.25, 0.0, 1.0))) && all(_skTemp3 == vec4(1.0, 0.0, 0.0, 1.0))) && (_skTemp4 == expectedBW.x)) && all(_skTemp5 == expectedBW.xy)) && all(_skTemp6 == expectedBW.xyz)) && all(_skTemp7 == expectedBW)) && (0.5 == expectedBW.x)) && all(vec2(0.5) == expectedBW.xy)) && all(vec3(0.5) == expectedBW.xyz)) && all(vec4(0.5, 0.5, 0.5, 1.0) == expectedBW)) && (_skTemp8 == expectedWT.x)) && all(_skTemp9 == expectedWT.xy)) && all(_skTemp10 == expectedWT.xyz)) && all(_skTemp11 == expectedWT)) && (1.0 == expectedWT.x)) && all(vec2(1.0, 0.5) == expectedWT.xy)) && all(vec3(1.0, 0.5, 1.0) == expectedWT.xyz)) && all(vec4(1.0, 0.5, 1.0, 2.25) == expectedWT))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/intrinsics/MixFloatES3.asm.frag b/tests/sksl/intrinsics/MixFloatES3.asm.frag index d2fb455bcf5b..127cc4becdbe 100644 --- a/tests/sksl/intrinsics/MixFloatES3.asm.frag +++ b/tests/sksl/intrinsics/MixFloatES3.asm.frag @@ -1,408 +1,408 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpMemberName %_UniformBuffer 2 "colorBlack" -OpMemberName %_UniformBuffer 3 "colorWhite" -OpMemberName %_UniformBuffer 4 "testInputs" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %FTFT "FTFT" -OpName %TFTF "TFTF" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 3 Offset 48 -OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 4 Offset 64 -OpMemberDecorate %_UniformBuffer 4 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %33 RelaxedPrecision -OpDecorate %34 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %49 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %53 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %58 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %63 RelaxedPrecision -OpDecorate %64 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -OpDecorate %71 RelaxedPrecision -OpDecorate %73 RelaxedPrecision -OpDecorate %74 RelaxedPrecision -OpDecorate %78 RelaxedPrecision -OpDecorate %79 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %82 RelaxedPrecision -OpDecorate %85 RelaxedPrecision -OpDecorate %86 RelaxedPrecision -OpDecorate %88 RelaxedPrecision -OpDecorate %96 RelaxedPrecision -OpDecorate %97 RelaxedPrecision -OpDecorate %100 RelaxedPrecision -OpDecorate %101 RelaxedPrecision -OpDecorate %105 RelaxedPrecision -OpDecorate %106 RelaxedPrecision -OpDecorate %108 RelaxedPrecision -OpDecorate %109 RelaxedPrecision -OpDecorate %112 RelaxedPrecision -OpDecorate %113 RelaxedPrecision -OpDecorate %115 RelaxedPrecision -OpDecorate %116 RelaxedPrecision -OpDecorate %117 RelaxedPrecision -OpDecorate %125 RelaxedPrecision -OpDecorate %127 RelaxedPrecision -OpDecorate %129 RelaxedPrecision -OpDecorate %131 RelaxedPrecision -OpDecorate %133 RelaxedPrecision -OpDecorate %134 RelaxedPrecision -OpDecorate %136 RelaxedPrecision -OpDecorate %137 RelaxedPrecision -OpDecorate %138 RelaxedPrecision -OpDecorate %146 RelaxedPrecision -OpDecorate %147 RelaxedPrecision -OpDecorate %150 RelaxedPrecision -OpDecorate %151 RelaxedPrecision -OpDecorate %154 RelaxedPrecision -OpDecorate %155 RelaxedPrecision -OpDecorate %157 RelaxedPrecision -OpDecorate %158 RelaxedPrecision -OpDecorate %160 RelaxedPrecision -OpDecorate %161 RelaxedPrecision -OpDecorate %168 RelaxedPrecision -OpDecorate %169 RelaxedPrecision -OpDecorate %171 RelaxedPrecision -OpDecorate %172 RelaxedPrecision -OpDecorate %175 RelaxedPrecision -OpDecorate %176 RelaxedPrecision -OpDecorate %178 RelaxedPrecision -OpDecorate %179 RelaxedPrecision -OpDecorate %182 RelaxedPrecision -OpDecorate %183 RelaxedPrecision -OpDecorate %184 RelaxedPrecision -OpDecorate %192 RelaxedPrecision -OpDecorate %193 RelaxedPrecision -OpDecorate %195 RelaxedPrecision -OpDecorate %196 RelaxedPrecision -OpDecorate %199 RelaxedPrecision -OpDecorate %200 RelaxedPrecision -OpDecorate %202 RelaxedPrecision -OpDecorate %203 RelaxedPrecision -OpDecorate %206 RelaxedPrecision -OpDecorate %207 RelaxedPrecision -OpDecorate %209 RelaxedPrecision -OpDecorate %210 RelaxedPrecision -OpDecorate %211 RelaxedPrecision -OpDecorate %219 RelaxedPrecision -OpDecorate %221 RelaxedPrecision -OpDecorate %223 RelaxedPrecision -OpDecorate %225 RelaxedPrecision -OpDecorate %227 RelaxedPrecision -OpDecorate %228 RelaxedPrecision -OpDecorate %230 RelaxedPrecision -OpDecorate %231 RelaxedPrecision -OpDecorate %232 RelaxedPrecision -OpDecorate %242 RelaxedPrecision -OpDecorate %245 RelaxedPrecision -OpDecorate %246 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpMemberName %_UniformBuffer 2 "colorBlack" + OpMemberName %_UniformBuffer 3 "colorWhite" + OpMemberName %_UniformBuffer 4 "testInputs" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %FTFT "FTFT" + OpName %TFTF "TFTF" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 3 Offset 48 + OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 4 Offset 64 + OpMemberDecorate %_UniformBuffer 4 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %33 RelaxedPrecision + OpDecorate %34 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %49 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %53 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %58 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %63 RelaxedPrecision + OpDecorate %64 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %71 RelaxedPrecision + OpDecorate %73 RelaxedPrecision + OpDecorate %74 RelaxedPrecision + OpDecorate %78 RelaxedPrecision + OpDecorate %79 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %82 RelaxedPrecision + OpDecorate %85 RelaxedPrecision + OpDecorate %86 RelaxedPrecision + OpDecorate %88 RelaxedPrecision + OpDecorate %96 RelaxedPrecision + OpDecorate %97 RelaxedPrecision + OpDecorate %100 RelaxedPrecision + OpDecorate %101 RelaxedPrecision + OpDecorate %105 RelaxedPrecision + OpDecorate %106 RelaxedPrecision + OpDecorate %108 RelaxedPrecision + OpDecorate %109 RelaxedPrecision + OpDecorate %112 RelaxedPrecision + OpDecorate %113 RelaxedPrecision + OpDecorate %115 RelaxedPrecision + OpDecorate %116 RelaxedPrecision + OpDecorate %117 RelaxedPrecision + OpDecorate %125 RelaxedPrecision + OpDecorate %127 RelaxedPrecision + OpDecorate %129 RelaxedPrecision + OpDecorate %131 RelaxedPrecision + OpDecorate %133 RelaxedPrecision + OpDecorate %134 RelaxedPrecision + OpDecorate %136 RelaxedPrecision + OpDecorate %137 RelaxedPrecision + OpDecorate %138 RelaxedPrecision + OpDecorate %146 RelaxedPrecision + OpDecorate %147 RelaxedPrecision + OpDecorate %150 RelaxedPrecision + OpDecorate %151 RelaxedPrecision + OpDecorate %154 RelaxedPrecision + OpDecorate %155 RelaxedPrecision + OpDecorate %157 RelaxedPrecision + OpDecorate %158 RelaxedPrecision + OpDecorate %160 RelaxedPrecision + OpDecorate %161 RelaxedPrecision + OpDecorate %168 RelaxedPrecision + OpDecorate %169 RelaxedPrecision + OpDecorate %171 RelaxedPrecision + OpDecorate %172 RelaxedPrecision + OpDecorate %175 RelaxedPrecision + OpDecorate %176 RelaxedPrecision + OpDecorate %178 RelaxedPrecision + OpDecorate %179 RelaxedPrecision + OpDecorate %182 RelaxedPrecision + OpDecorate %183 RelaxedPrecision + OpDecorate %184 RelaxedPrecision + OpDecorate %192 RelaxedPrecision + OpDecorate %193 RelaxedPrecision + OpDecorate %195 RelaxedPrecision + OpDecorate %196 RelaxedPrecision + OpDecorate %199 RelaxedPrecision + OpDecorate %200 RelaxedPrecision + OpDecorate %202 RelaxedPrecision + OpDecorate %203 RelaxedPrecision + OpDecorate %206 RelaxedPrecision + OpDecorate %207 RelaxedPrecision + OpDecorate %209 RelaxedPrecision + OpDecorate %210 RelaxedPrecision + OpDecorate %211 RelaxedPrecision + OpDecorate %219 RelaxedPrecision + OpDecorate %221 RelaxedPrecision + OpDecorate %223 RelaxedPrecision + OpDecorate %225 RelaxedPrecision + OpDecorate %227 RelaxedPrecision + OpDecorate %228 RelaxedPrecision + OpDecorate %230 RelaxedPrecision + OpDecorate %231 RelaxedPrecision + OpDecorate %232 RelaxedPrecision + OpDecorate %242 RelaxedPrecision + OpDecorate %245 RelaxedPrecision + OpDecorate %246 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%v4bool = OpTypeVector %bool 4 + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %v4bool = OpTypeVector %bool 4 %_ptr_Function_v4bool = OpTypePointer Function %v4bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%false = OpConstantFalse %bool -%int_2 = OpConstant %int 2 -%int_3 = OpConstant %int 3 -%v2bool = OpTypeVector %bool 2 -%float_1 = OpConstant %float 1 -%v3float = OpTypeVector %float 3 -%v3bool = OpTypeVector %bool 3 -%int_4 = OpConstant %int 4 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %false = OpConstantFalse %bool + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 + %v2bool = OpTypeVector %bool 2 + %float_1 = OpConstant %float 1 + %v3float = OpTypeVector %float 3 + %v3bool = OpTypeVector %bool 3 + %int_4 = OpConstant %int 4 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_1 = OpConstant %int 1 + %int_1 = OpConstant %int 1 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%FTFT = OpVariable %_ptr_Function_v4bool Function -%TFTF = OpVariable %_ptr_Function_v4bool Function -%236 = OpVariable %_ptr_Function_v4float Function -%29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%33 = OpLoad %v4float %29 -%34 = OpCompositeExtract %float %33 0 -%35 = OpFUnordNotEqual %bool %34 %float_0 -%36 = OpCompositeExtract %float %33 1 -%37 = OpFUnordNotEqual %bool %36 %float_0 -%38 = OpCompositeExtract %float %33 2 -%39 = OpFUnordNotEqual %bool %38 %float_0 -%40 = OpCompositeExtract %float %33 3 -%41 = OpFUnordNotEqual %bool %40 %float_0 -%42 = OpCompositeConstruct %v4bool %35 %37 %39 %41 -OpStore %FTFT %42 -%44 = OpVectorShuffle %v4bool %42 %42 3 2 1 0 -OpStore %TFTF %44 -%47 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%49 = OpLoad %v4float %47 -%50 = OpCompositeExtract %float %49 0 -%51 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%53 = OpLoad %v4float %51 -%54 = OpCompositeExtract %float %53 0 -%55 = OpCompositeExtract %bool %42 0 -%56 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%57 = OpLoad %v4float %56 -%58 = OpCompositeExtract %float %57 0 -%59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%60 = OpLoad %v4float %59 -%61 = OpCompositeExtract %float %60 0 -%46 = OpSelect %float %55 %61 %58 -%62 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%63 = OpLoad %v4float %62 -%64 = OpCompositeExtract %float %63 0 -%65 = OpFOrdEqual %bool %46 %64 -OpSelectionMerge %67 None -OpBranchConditional %65 %66 %67 -%66 = OpLabel -%69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%70 = OpLoad %v4float %69 -%71 = OpVectorShuffle %v2float %70 %70 0 1 -%72 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%73 = OpLoad %v4float %72 -%74 = OpVectorShuffle %v2float %73 %73 0 1 -%75 = OpVectorShuffle %v2bool %42 %42 0 1 -%77 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%78 = OpLoad %v4float %77 -%79 = OpVectorShuffle %v2float %78 %78 0 1 -%80 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%81 = OpLoad %v4float %80 -%82 = OpVectorShuffle %v2float %81 %81 0 1 -%83 = OpVectorShuffle %v2bool %42 %42 0 1 -%68 = OpSelect %v2float %83 %82 %79 -%84 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%85 = OpLoad %v4float %84 -%86 = OpCompositeExtract %float %85 0 -%88 = OpCompositeConstruct %v2float %86 %float_1 -%89 = OpFOrdEqual %v2bool %68 %88 -%90 = OpAll %bool %89 -OpBranch %67 -%67 = OpLabel -%91 = OpPhi %bool %false %25 %90 %66 -OpSelectionMerge %93 None -OpBranchConditional %91 %92 %93 -%92 = OpLabel -%95 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%96 = OpLoad %v4float %95 -%97 = OpVectorShuffle %v3float %96 %96 0 1 2 -%99 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%100 = OpLoad %v4float %99 -%101 = OpVectorShuffle %v3float %100 %100 0 1 2 -%102 = OpVectorShuffle %v3bool %42 %42 0 1 2 -%104 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%105 = OpLoad %v4float %104 -%106 = OpVectorShuffle %v3float %105 %105 0 1 2 -%107 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%108 = OpLoad %v4float %107 -%109 = OpVectorShuffle %v3float %108 %108 0 1 2 -%110 = OpVectorShuffle %v3bool %42 %42 0 1 2 -%94 = OpSelect %v3float %110 %109 %106 -%111 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%112 = OpLoad %v4float %111 -%113 = OpCompositeExtract %float %112 0 -%114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%115 = OpLoad %v4float %114 -%116 = OpCompositeExtract %float %115 2 -%117 = OpCompositeConstruct %v3float %113 %float_1 %116 -%118 = OpFOrdEqual %v3bool %94 %117 -%119 = OpAll %bool %118 -OpBranch %93 -%93 = OpLabel -%120 = OpPhi %bool %false %67 %119 %92 -OpSelectionMerge %122 None -OpBranchConditional %120 %121 %122 -%121 = OpLabel -%124 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%125 = OpLoad %v4float %124 -%126 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%127 = OpLoad %v4float %126 -%128 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%129 = OpLoad %v4float %128 -%130 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%131 = OpLoad %v4float %130 -%123 = OpSelect %v4float %42 %131 %129 -%132 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%133 = OpLoad %v4float %132 -%134 = OpCompositeExtract %float %133 0 -%135 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%136 = OpLoad %v4float %135 -%137 = OpCompositeExtract %float %136 2 -%138 = OpCompositeConstruct %v4float %134 %float_1 %137 %float_1 -%139 = OpFOrdEqual %v4bool %123 %138 -%140 = OpAll %bool %139 -OpBranch %122 -%122 = OpLabel -%141 = OpPhi %bool %false %93 %140 %121 -OpSelectionMerge %143 None -OpBranchConditional %141 %142 %143 -%142 = OpLabel -%145 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%146 = OpLoad %v4float %145 -%147 = OpCompositeExtract %float %146 0 -%148 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 -%150 = OpLoad %v4float %148 -%151 = OpCompositeExtract %float %150 0 -%152 = OpCompositeExtract %bool %44 0 -%153 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%154 = OpLoad %v4float %153 -%155 = OpCompositeExtract %float %154 0 -%156 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 -%157 = OpLoad %v4float %156 -%158 = OpCompositeExtract %float %157 0 -%144 = OpSelect %float %152 %158 %155 -%159 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 -%160 = OpLoad %v4float %159 -%161 = OpCompositeExtract %float %160 0 -%162 = OpFOrdEqual %bool %144 %161 -OpBranch %143 -%143 = OpLabel -%163 = OpPhi %bool %false %122 %162 %142 -OpSelectionMerge %165 None -OpBranchConditional %163 %164 %165 -%164 = OpLabel -%167 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%168 = OpLoad %v4float %167 -%169 = OpVectorShuffle %v2float %168 %168 0 1 -%170 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 -%171 = OpLoad %v4float %170 -%172 = OpVectorShuffle %v2float %171 %171 0 1 -%173 = OpVectorShuffle %v2bool %44 %44 0 1 -%174 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%175 = OpLoad %v4float %174 -%176 = OpVectorShuffle %v2float %175 %175 0 1 -%177 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 -%178 = OpLoad %v4float %177 -%179 = OpVectorShuffle %v2float %178 %178 0 1 -%180 = OpVectorShuffle %v2bool %44 %44 0 1 -%166 = OpSelect %v2float %180 %179 %176 -%181 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 -%182 = OpLoad %v4float %181 -%183 = OpCompositeExtract %float %182 0 -%184 = OpCompositeConstruct %v2float %183 %float_1 -%185 = OpFOrdEqual %v2bool %166 %184 -%186 = OpAll %bool %185 -OpBranch %165 -%165 = OpLabel -%187 = OpPhi %bool %false %143 %186 %164 -OpSelectionMerge %189 None -OpBranchConditional %187 %188 %189 -%188 = OpLabel -%191 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%192 = OpLoad %v4float %191 -%193 = OpVectorShuffle %v3float %192 %192 0 1 2 -%194 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 -%195 = OpLoad %v4float %194 -%196 = OpVectorShuffle %v3float %195 %195 0 1 2 -%197 = OpVectorShuffle %v3bool %44 %44 0 1 2 -%198 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%199 = OpLoad %v4float %198 -%200 = OpVectorShuffle %v3float %199 %199 0 1 2 -%201 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 -%202 = OpLoad %v4float %201 -%203 = OpVectorShuffle %v3float %202 %202 0 1 2 -%204 = OpVectorShuffle %v3bool %44 %44 0 1 2 -%190 = OpSelect %v3float %204 %203 %200 -%205 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 -%206 = OpLoad %v4float %205 -%207 = OpCompositeExtract %float %206 0 -%208 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 -%209 = OpLoad %v4float %208 -%210 = OpCompositeExtract %float %209 2 -%211 = OpCompositeConstruct %v3float %207 %float_1 %210 -%212 = OpFOrdEqual %v3bool %190 %211 -%213 = OpAll %bool %212 -OpBranch %189 -%189 = OpLabel -%214 = OpPhi %bool %false %165 %213 %188 -OpSelectionMerge %216 None -OpBranchConditional %214 %215 %216 -%215 = OpLabel -%218 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%219 = OpLoad %v4float %218 -%220 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 -%221 = OpLoad %v4float %220 -%222 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%223 = OpLoad %v4float %222 -%224 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 -%225 = OpLoad %v4float %224 -%217 = OpSelect %v4float %44 %225 %223 -%226 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 -%227 = OpLoad %v4float %226 -%228 = OpCompositeExtract %float %227 0 -%229 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 -%230 = OpLoad %v4float %229 -%231 = OpCompositeExtract %float %230 2 -%232 = OpCompositeConstruct %v4float %228 %float_1 %231 %float_1 -%233 = OpFOrdEqual %v4bool %217 %232 -%234 = OpAll %bool %233 -OpBranch %216 -%216 = OpLabel -%235 = OpPhi %bool %false %189 %234 %215 -OpSelectionMerge %240 None -OpBranchConditional %235 %238 %239 -%238 = OpLabel -%241 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%242 = OpLoad %v4float %241 -OpStore %236 %242 -OpBranch %240 -%239 = OpLabel -%243 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%245 = OpLoad %v4float %243 -OpStore %236 %245 -OpBranch %240 -%240 = OpLabel -%246 = OpLoad %v4float %236 -OpReturnValue %246 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %FTFT = OpVariable %_ptr_Function_v4bool Function + %TFTF = OpVariable %_ptr_Function_v4bool Function + %236 = OpVariable %_ptr_Function_v4float Function + %29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %33 = OpLoad %v4float %29 + %34 = OpCompositeExtract %float %33 0 + %35 = OpFUnordNotEqual %bool %34 %float_0 + %36 = OpCompositeExtract %float %33 1 + %37 = OpFUnordNotEqual %bool %36 %float_0 + %38 = OpCompositeExtract %float %33 2 + %39 = OpFUnordNotEqual %bool %38 %float_0 + %40 = OpCompositeExtract %float %33 3 + %41 = OpFUnordNotEqual %bool %40 %float_0 + %42 = OpCompositeConstruct %v4bool %35 %37 %39 %41 + OpStore %FTFT %42 + %44 = OpVectorShuffle %v4bool %42 %42 3 2 1 0 + OpStore %TFTF %44 + %47 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %49 = OpLoad %v4float %47 + %50 = OpCompositeExtract %float %49 0 + %51 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %53 = OpLoad %v4float %51 + %54 = OpCompositeExtract %float %53 0 + %55 = OpCompositeExtract %bool %42 0 + %56 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %57 = OpLoad %v4float %56 + %58 = OpCompositeExtract %float %57 0 + %59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %60 = OpLoad %v4float %59 + %61 = OpCompositeExtract %float %60 0 + %46 = OpSelect %float %55 %61 %58 + %62 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %63 = OpLoad %v4float %62 + %64 = OpCompositeExtract %float %63 0 + %65 = OpFOrdEqual %bool %46 %64 + OpSelectionMerge %67 None + OpBranchConditional %65 %66 %67 + %66 = OpLabel + %69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %70 = OpLoad %v4float %69 + %71 = OpVectorShuffle %v2float %70 %70 0 1 + %72 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %73 = OpLoad %v4float %72 + %74 = OpVectorShuffle %v2float %73 %73 0 1 + %75 = OpVectorShuffle %v2bool %42 %42 0 1 + %77 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %78 = OpLoad %v4float %77 + %79 = OpVectorShuffle %v2float %78 %78 0 1 + %80 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %81 = OpLoad %v4float %80 + %82 = OpVectorShuffle %v2float %81 %81 0 1 + %83 = OpVectorShuffle %v2bool %42 %42 0 1 + %68 = OpSelect %v2float %83 %82 %79 + %84 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %85 = OpLoad %v4float %84 + %86 = OpCompositeExtract %float %85 0 + %88 = OpCompositeConstruct %v2float %86 %float_1 + %89 = OpFOrdEqual %v2bool %68 %88 + %90 = OpAll %bool %89 + OpBranch %67 + %67 = OpLabel + %91 = OpPhi %bool %false %25 %90 %66 + OpSelectionMerge %93 None + OpBranchConditional %91 %92 %93 + %92 = OpLabel + %95 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %96 = OpLoad %v4float %95 + %97 = OpVectorShuffle %v3float %96 %96 0 1 2 + %99 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %100 = OpLoad %v4float %99 + %101 = OpVectorShuffle %v3float %100 %100 0 1 2 + %102 = OpVectorShuffle %v3bool %42 %42 0 1 2 + %104 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %105 = OpLoad %v4float %104 + %106 = OpVectorShuffle %v3float %105 %105 0 1 2 + %107 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %108 = OpLoad %v4float %107 + %109 = OpVectorShuffle %v3float %108 %108 0 1 2 + %110 = OpVectorShuffle %v3bool %42 %42 0 1 2 + %94 = OpSelect %v3float %110 %109 %106 + %111 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %112 = OpLoad %v4float %111 + %113 = OpCompositeExtract %float %112 0 + %114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %115 = OpLoad %v4float %114 + %116 = OpCompositeExtract %float %115 2 + %117 = OpCompositeConstruct %v3float %113 %float_1 %116 + %118 = OpFOrdEqual %v3bool %94 %117 + %119 = OpAll %bool %118 + OpBranch %93 + %93 = OpLabel + %120 = OpPhi %bool %false %67 %119 %92 + OpSelectionMerge %122 None + OpBranchConditional %120 %121 %122 + %121 = OpLabel + %124 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %125 = OpLoad %v4float %124 + %126 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %127 = OpLoad %v4float %126 + %128 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %129 = OpLoad %v4float %128 + %130 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %131 = OpLoad %v4float %130 + %123 = OpSelect %v4float %42 %131 %129 + %132 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %133 = OpLoad %v4float %132 + %134 = OpCompositeExtract %float %133 0 + %135 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %136 = OpLoad %v4float %135 + %137 = OpCompositeExtract %float %136 2 + %138 = OpCompositeConstruct %v4float %134 %float_1 %137 %float_1 + %139 = OpFOrdEqual %v4bool %123 %138 + %140 = OpAll %bool %139 + OpBranch %122 + %122 = OpLabel + %141 = OpPhi %bool %false %93 %140 %121 + OpSelectionMerge %143 None + OpBranchConditional %141 %142 %143 + %142 = OpLabel + %145 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %146 = OpLoad %v4float %145 + %147 = OpCompositeExtract %float %146 0 + %148 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 + %150 = OpLoad %v4float %148 + %151 = OpCompositeExtract %float %150 0 + %152 = OpCompositeExtract %bool %44 0 + %153 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %154 = OpLoad %v4float %153 + %155 = OpCompositeExtract %float %154 0 + %156 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 + %157 = OpLoad %v4float %156 + %158 = OpCompositeExtract %float %157 0 + %144 = OpSelect %float %152 %158 %155 + %159 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 + %160 = OpLoad %v4float %159 + %161 = OpCompositeExtract %float %160 0 + %162 = OpFOrdEqual %bool %144 %161 + OpBranch %143 + %143 = OpLabel + %163 = OpPhi %bool %false %122 %162 %142 + OpSelectionMerge %165 None + OpBranchConditional %163 %164 %165 + %164 = OpLabel + %167 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %168 = OpLoad %v4float %167 + %169 = OpVectorShuffle %v2float %168 %168 0 1 + %170 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 + %171 = OpLoad %v4float %170 + %172 = OpVectorShuffle %v2float %171 %171 0 1 + %173 = OpVectorShuffle %v2bool %44 %44 0 1 + %174 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %175 = OpLoad %v4float %174 + %176 = OpVectorShuffle %v2float %175 %175 0 1 + %177 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 + %178 = OpLoad %v4float %177 + %179 = OpVectorShuffle %v2float %178 %178 0 1 + %180 = OpVectorShuffle %v2bool %44 %44 0 1 + %166 = OpSelect %v2float %180 %179 %176 + %181 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 + %182 = OpLoad %v4float %181 + %183 = OpCompositeExtract %float %182 0 + %184 = OpCompositeConstruct %v2float %183 %float_1 + %185 = OpFOrdEqual %v2bool %166 %184 + %186 = OpAll %bool %185 + OpBranch %165 + %165 = OpLabel + %187 = OpPhi %bool %false %143 %186 %164 + OpSelectionMerge %189 None + OpBranchConditional %187 %188 %189 + %188 = OpLabel + %191 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %192 = OpLoad %v4float %191 + %193 = OpVectorShuffle %v3float %192 %192 0 1 2 + %194 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 + %195 = OpLoad %v4float %194 + %196 = OpVectorShuffle %v3float %195 %195 0 1 2 + %197 = OpVectorShuffle %v3bool %44 %44 0 1 2 + %198 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %199 = OpLoad %v4float %198 + %200 = OpVectorShuffle %v3float %199 %199 0 1 2 + %201 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 + %202 = OpLoad %v4float %201 + %203 = OpVectorShuffle %v3float %202 %202 0 1 2 + %204 = OpVectorShuffle %v3bool %44 %44 0 1 2 + %190 = OpSelect %v3float %204 %203 %200 + %205 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 + %206 = OpLoad %v4float %205 + %207 = OpCompositeExtract %float %206 0 + %208 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 + %209 = OpLoad %v4float %208 + %210 = OpCompositeExtract %float %209 2 + %211 = OpCompositeConstruct %v3float %207 %float_1 %210 + %212 = OpFOrdEqual %v3bool %190 %211 + %213 = OpAll %bool %212 + OpBranch %189 + %189 = OpLabel + %214 = OpPhi %bool %false %165 %213 %188 + OpSelectionMerge %216 None + OpBranchConditional %214 %215 %216 + %215 = OpLabel + %218 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %219 = OpLoad %v4float %218 + %220 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 + %221 = OpLoad %v4float %220 + %222 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %223 = OpLoad %v4float %222 + %224 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 + %225 = OpLoad %v4float %224 + %217 = OpSelect %v4float %44 %225 %223 + %226 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 + %227 = OpLoad %v4float %226 + %228 = OpCompositeExtract %float %227 0 + %229 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 + %230 = OpLoad %v4float %229 + %231 = OpCompositeExtract %float %230 2 + %232 = OpCompositeConstruct %v4float %228 %float_1 %231 %float_1 + %233 = OpFOrdEqual %v4bool %217 %232 + %234 = OpAll %bool %233 + OpBranch %216 + %216 = OpLabel + %235 = OpPhi %bool %false %189 %234 %215 + OpSelectionMerge %240 None + OpBranchConditional %235 %238 %239 + %238 = OpLabel + %241 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %242 = OpLoad %v4float %241 + OpStore %236 %242 + OpBranch %240 + %239 = OpLabel + %243 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %245 = OpLoad %v4float %243 + OpStore %236 %245 + OpBranch %240 + %240 = OpLabel + %246 = OpLoad %v4float %236 + OpReturnValue %246 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/MixFloatES3.skrp b/tests/sksl/intrinsics/MixFloatES3.skrp index 97efcfd2de5d..00da48ef206b 100644 --- a/tests/sksl/intrinsics/MixFloatES3.skrp +++ b/tests/sksl/intrinsics/MixFloatES3.skrp @@ -1,3 +1,5 @@ +90 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_4_uniforms $0..3 = colorGreen diff --git a/tests/sksl/intrinsics/MixFloatES3.wgsl b/tests/sksl/intrinsics/MixFloatES3.wgsl index 3d1684dde4ce..6e41cef165bc 100644 --- a/tests/sksl/intrinsics/MixFloatES3.wgsl +++ b/tests/sksl/intrinsics/MixFloatES3.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -26,7 +27,7 @@ fn main(_skParam0: vec2) -> vec4 { let _skTemp5 = select(_globalUniforms.colorWhite.xy, _globalUniforms.testInputs.xy, TFTF.xy); let _skTemp6 = select(_globalUniforms.colorWhite.xyz, _globalUniforms.testInputs.xyz, TFTF.xyz); let _skTemp7 = select(_globalUniforms.colorWhite, _globalUniforms.testInputs, TFTF); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((_skTemp0 == _globalUniforms.colorBlack.x && all(_skTemp1 == vec2(_globalUniforms.colorBlack.x, 1.0))) && all(_skTemp2 == vec3(_globalUniforms.colorBlack.x, 1.0, _globalUniforms.colorBlack.z))) && all(_skTemp3 == vec4(_globalUniforms.colorBlack.x, 1.0, _globalUniforms.colorBlack.z, 1.0))) && _skTemp4 == _globalUniforms.testInputs.x) && all(_skTemp5 == vec2(_globalUniforms.testInputs.x, 1.0))) && all(_skTemp6 == vec3(_globalUniforms.testInputs.x, 1.0, _globalUniforms.testInputs.z))) && all(_skTemp7 == vec4(_globalUniforms.testInputs.x, 1.0, _globalUniforms.testInputs.z, 1.0)))); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((_skTemp0 == _globalUniforms.colorBlack.x) && all(_skTemp1 == vec2(_globalUniforms.colorBlack.x, 1.0))) && all(_skTemp2 == vec3(_globalUniforms.colorBlack.x, 1.0, _globalUniforms.colorBlack.z))) && all(_skTemp3 == vec4(_globalUniforms.colorBlack.x, 1.0, _globalUniforms.colorBlack.z, 1.0))) && (_skTemp4 == _globalUniforms.testInputs.x)) && all(_skTemp5 == vec2(_globalUniforms.testInputs.x, 1.0))) && all(_skTemp6 == vec3(_globalUniforms.testInputs.x, 1.0, _globalUniforms.testInputs.z))) && all(_skTemp7 == vec4(_globalUniforms.testInputs.x, 1.0, _globalUniforms.testInputs.z, 1.0)))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/intrinsics/Mod.asm.frag b/tests/sksl/intrinsics/Mod.asm.frag index cf077a9a4667..f3aff2a12fa9 100644 --- a/tests/sksl/intrinsics/Mod.asm.frag +++ b/tests/sksl/intrinsics/Mod.asm.frag @@ -1,300 +1,300 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testInputs" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpMemberName %_UniformBuffer 3 "colorWhite" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %expectedA "expectedA" -OpName %expectedB "expectedB" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 3 Offset 48 -OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %expectedA RelaxedPrecision -OpDecorate %expectedB RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %48 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %59 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %63 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %85 RelaxedPrecision -OpDecorate %92 RelaxedPrecision -OpDecorate %103 RelaxedPrecision -OpDecorate %104 RelaxedPrecision -OpDecorate %107 RelaxedPrecision -OpDecorate %108 RelaxedPrecision -OpDecorate %115 RelaxedPrecision -OpDecorate %116 RelaxedPrecision -OpDecorate %118 RelaxedPrecision -OpDecorate %119 RelaxedPrecision -OpDecorate %120 RelaxedPrecision -OpDecorate %128 RelaxedPrecision -OpDecorate %129 RelaxedPrecision -OpDecorate %131 RelaxedPrecision -OpDecorate %132 RelaxedPrecision -OpDecorate %133 RelaxedPrecision -OpDecorate %141 RelaxedPrecision -OpDecorate %143 RelaxedPrecision -OpDecorate %153 RelaxedPrecision -OpDecorate %160 RelaxedPrecision -OpDecorate %173 RelaxedPrecision -OpDecorate %176 RelaxedPrecision -OpDecorate %177 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testInputs" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpMemberName %_UniformBuffer 3 "colorWhite" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %expectedA "expectedA" + OpName %expectedB "expectedB" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 3 Offset 48 + OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %expectedA RelaxedPrecision + OpDecorate %expectedB RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %48 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %59 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %63 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %85 RelaxedPrecision + OpDecorate %92 RelaxedPrecision + OpDecorate %103 RelaxedPrecision + OpDecorate %104 RelaxedPrecision + OpDecorate %107 RelaxedPrecision + OpDecorate %108 RelaxedPrecision + OpDecorate %115 RelaxedPrecision + OpDecorate %116 RelaxedPrecision + OpDecorate %118 RelaxedPrecision + OpDecorate %119 RelaxedPrecision + OpDecorate %120 RelaxedPrecision + OpDecorate %128 RelaxedPrecision + OpDecorate %129 RelaxedPrecision + OpDecorate %131 RelaxedPrecision + OpDecorate %132 RelaxedPrecision + OpDecorate %133 RelaxedPrecision + OpDecorate %141 RelaxedPrecision + OpDecorate %143 RelaxedPrecision + OpDecorate %153 RelaxedPrecision + OpDecorate %160 RelaxedPrecision + OpDecorate %173 RelaxedPrecision + OpDecorate %176 RelaxedPrecision + OpDecorate %177 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float -%float_0_75 = OpConstant %float 0.75 -%float_0_25 = OpConstant %float 0.25 -%30 = OpConstantComposite %v4float %float_0_75 %float_0 %float_0_75 %float_0_25 -%float_1 = OpConstant %float 1 -%33 = OpConstantComposite %v4float %float_0_25 %float_0 %float_0_75 %float_1 -%false = OpConstantFalse %bool + %float_0_75 = OpConstant %float 0.75 + %float_0_25 = OpConstant %float 0.25 + %30 = OpConstantComposite %v4float %float_0_75 %float_0 %float_0_75 %float_0_25 + %float_1 = OpConstant %float 1 + %33 = OpConstantComposite %v4float %float_0_25 %float_0 %float_0_75 %float_1 + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%49 = OpConstantComposite %v2float %float_1 %float_1 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%62 = OpConstantComposite %v3float %float_1 %float_1 %float_1 -%v3bool = OpTypeVector %bool 3 -%73 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 -%v4bool = OpTypeVector %bool 4 -%true = OpConstantTrue %bool -%84 = OpConstantComposite %v2float %float_0_75 %float_0 -%91 = OpConstantComposite %v3float %float_0_75 %float_0 %float_0_75 -%int_3 = OpConstant %int 3 -%152 = OpConstantComposite %v2float %float_0_25 %float_0 -%159 = OpConstantComposite %v3float %float_0_25 %float_0 %float_0_75 -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %49 = OpConstantComposite %v2float %float_1 %float_1 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %62 = OpConstantComposite %v3float %float_1 %float_1 %float_1 + %v3bool = OpTypeVector %bool 3 + %73 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %v4bool = OpTypeVector %bool 4 + %true = OpConstantTrue %bool + %84 = OpConstantComposite %v2float %float_0_75 %float_0 + %91 = OpConstantComposite %v3float %float_0_75 %float_0 %float_0_75 + %int_3 = OpConstant %int 3 + %152 = OpConstantComposite %v2float %float_0_25 %float_0 + %159 = OpConstantComposite %v3float %float_0_25 %float_0 %float_0_75 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%expectedA = OpVariable %_ptr_Function_v4float Function -%expectedB = OpVariable %_ptr_Function_v4float Function -%167 = OpVariable %_ptr_Function_v4float Function -OpStore %expectedA %30 -OpStore %expectedB %33 -%36 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%40 = OpLoad %v4float %36 -%41 = OpCompositeExtract %float %40 0 -%35 = OpFMod %float %41 %float_1 -%42 = OpFOrdEqual %bool %35 %float_0_75 -OpSelectionMerge %44 None -OpBranchConditional %42 %43 %44 -%43 = OpLabel -%46 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%47 = OpLoad %v4float %46 -%48 = OpVectorShuffle %v2float %47 %47 0 1 -%45 = OpFMod %v2float %48 %49 -%50 = OpVectorShuffle %v2float %30 %30 0 1 -%51 = OpFOrdEqual %v2bool %45 %50 -%53 = OpAll %bool %51 -OpBranch %44 -%44 = OpLabel -%54 = OpPhi %bool %false %25 %53 %43 -OpSelectionMerge %56 None -OpBranchConditional %54 %55 %56 -%55 = OpLabel -%58 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%59 = OpLoad %v4float %58 -%60 = OpVectorShuffle %v3float %59 %59 0 1 2 -%57 = OpFMod %v3float %60 %62 -%63 = OpVectorShuffle %v3float %30 %30 0 1 2 -%64 = OpFOrdEqual %v3bool %57 %63 -%66 = OpAll %bool %64 -OpBranch %56 -%56 = OpLabel -%67 = OpPhi %bool %false %44 %66 %55 -OpSelectionMerge %69 None -OpBranchConditional %67 %68 %69 -%68 = OpLabel -%71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%72 = OpLoad %v4float %71 -%70 = OpFMod %v4float %72 %73 -%74 = OpFOrdEqual %v4bool %70 %30 -%76 = OpAll %bool %74 -OpBranch %69 -%69 = OpLabel -%77 = OpPhi %bool %false %56 %76 %68 -OpSelectionMerge %79 None -OpBranchConditional %77 %78 %79 -%78 = OpLabel -OpBranch %79 -%79 = OpLabel -%81 = OpPhi %bool %false %69 %true %78 -OpSelectionMerge %83 None -OpBranchConditional %81 %82 %83 -%82 = OpLabel -%85 = OpVectorShuffle %v2float %30 %30 0 1 -%86 = OpFOrdEqual %v2bool %84 %85 -%87 = OpAll %bool %86 -OpBranch %83 -%83 = OpLabel -%88 = OpPhi %bool %false %79 %87 %82 -OpSelectionMerge %90 None -OpBranchConditional %88 %89 %90 -%89 = OpLabel -%92 = OpVectorShuffle %v3float %30 %30 0 1 2 -%93 = OpFOrdEqual %v3bool %91 %92 -%94 = OpAll %bool %93 -OpBranch %90 -%90 = OpLabel -%95 = OpPhi %bool %false %83 %94 %89 -OpSelectionMerge %97 None -OpBranchConditional %95 %96 %97 -%96 = OpLabel -OpBranch %97 -%97 = OpLabel -%98 = OpPhi %bool %false %90 %true %96 -OpSelectionMerge %100 None -OpBranchConditional %98 %99 %100 -%99 = OpLabel -%102 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%103 = OpLoad %v4float %102 -%104 = OpCompositeExtract %float %103 0 -%105 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%107 = OpLoad %v4float %105 -%108 = OpCompositeExtract %float %107 0 -%101 = OpFMod %float %104 %108 -%109 = OpFOrdEqual %bool %101 %float_0_75 -OpBranch %100 -%100 = OpLabel -%110 = OpPhi %bool %false %97 %109 %99 -OpSelectionMerge %112 None -OpBranchConditional %110 %111 %112 -%111 = OpLabel -%114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%115 = OpLoad %v4float %114 -%116 = OpVectorShuffle %v2float %115 %115 0 1 -%117 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%118 = OpLoad %v4float %117 -%119 = OpVectorShuffle %v2float %118 %118 0 1 -%113 = OpFMod %v2float %116 %119 -%120 = OpVectorShuffle %v2float %30 %30 0 1 -%121 = OpFOrdEqual %v2bool %113 %120 -%122 = OpAll %bool %121 -OpBranch %112 -%112 = OpLabel -%123 = OpPhi %bool %false %100 %122 %111 -OpSelectionMerge %125 None -OpBranchConditional %123 %124 %125 -%124 = OpLabel -%127 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%128 = OpLoad %v4float %127 -%129 = OpVectorShuffle %v3float %128 %128 0 1 2 -%130 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%131 = OpLoad %v4float %130 -%132 = OpVectorShuffle %v3float %131 %131 0 1 2 -%126 = OpFMod %v3float %129 %132 -%133 = OpVectorShuffle %v3float %30 %30 0 1 2 -%134 = OpFOrdEqual %v3bool %126 %133 -%135 = OpAll %bool %134 -OpBranch %125 -%125 = OpLabel -%136 = OpPhi %bool %false %112 %135 %124 -OpSelectionMerge %138 None -OpBranchConditional %136 %137 %138 -%137 = OpLabel -%140 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%141 = OpLoad %v4float %140 -%142 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%143 = OpLoad %v4float %142 -%139 = OpFMod %v4float %141 %143 -%144 = OpFOrdEqual %v4bool %139 %30 -%145 = OpAll %bool %144 -OpBranch %138 -%138 = OpLabel -%146 = OpPhi %bool %false %125 %145 %137 -OpSelectionMerge %148 None -OpBranchConditional %146 %147 %148 -%147 = OpLabel -OpBranch %148 -%148 = OpLabel -%149 = OpPhi %bool %false %138 %true %147 -OpSelectionMerge %151 None -OpBranchConditional %149 %150 %151 -%150 = OpLabel -%153 = OpVectorShuffle %v2float %33 %33 0 1 -%154 = OpFOrdEqual %v2bool %152 %153 -%155 = OpAll %bool %154 -OpBranch %151 -%151 = OpLabel -%156 = OpPhi %bool %false %148 %155 %150 -OpSelectionMerge %158 None -OpBranchConditional %156 %157 %158 -%157 = OpLabel -%160 = OpVectorShuffle %v3float %33 %33 0 1 2 -%161 = OpFOrdEqual %v3bool %159 %160 -%162 = OpAll %bool %161 -OpBranch %158 -%158 = OpLabel -%163 = OpPhi %bool %false %151 %162 %157 -OpSelectionMerge %165 None -OpBranchConditional %163 %164 %165 -%164 = OpLabel -OpBranch %165 -%165 = OpLabel -%166 = OpPhi %bool %false %158 %true %164 -OpSelectionMerge %170 None -OpBranchConditional %166 %168 %169 -%168 = OpLabel -%171 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%173 = OpLoad %v4float %171 -OpStore %167 %173 -OpBranch %170 -%169 = OpLabel -%174 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%176 = OpLoad %v4float %174 -OpStore %167 %176 -OpBranch %170 -%170 = OpLabel -%177 = OpLoad %v4float %167 -OpReturnValue %177 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %expectedA = OpVariable %_ptr_Function_v4float Function + %expectedB = OpVariable %_ptr_Function_v4float Function + %167 = OpVariable %_ptr_Function_v4float Function + OpStore %expectedA %30 + OpStore %expectedB %33 + %36 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %40 = OpLoad %v4float %36 + %41 = OpCompositeExtract %float %40 0 + %35 = OpFMod %float %41 %float_1 + %42 = OpFOrdEqual %bool %35 %float_0_75 + OpSelectionMerge %44 None + OpBranchConditional %42 %43 %44 + %43 = OpLabel + %46 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %47 = OpLoad %v4float %46 + %48 = OpVectorShuffle %v2float %47 %47 0 1 + %45 = OpFMod %v2float %48 %49 + %50 = OpVectorShuffle %v2float %30 %30 0 1 + %51 = OpFOrdEqual %v2bool %45 %50 + %53 = OpAll %bool %51 + OpBranch %44 + %44 = OpLabel + %54 = OpPhi %bool %false %25 %53 %43 + OpSelectionMerge %56 None + OpBranchConditional %54 %55 %56 + %55 = OpLabel + %58 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %59 = OpLoad %v4float %58 + %60 = OpVectorShuffle %v3float %59 %59 0 1 2 + %57 = OpFMod %v3float %60 %62 + %63 = OpVectorShuffle %v3float %30 %30 0 1 2 + %64 = OpFOrdEqual %v3bool %57 %63 + %66 = OpAll %bool %64 + OpBranch %56 + %56 = OpLabel + %67 = OpPhi %bool %false %44 %66 %55 + OpSelectionMerge %69 None + OpBranchConditional %67 %68 %69 + %68 = OpLabel + %71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %72 = OpLoad %v4float %71 + %70 = OpFMod %v4float %72 %73 + %74 = OpFOrdEqual %v4bool %70 %30 + %76 = OpAll %bool %74 + OpBranch %69 + %69 = OpLabel + %77 = OpPhi %bool %false %56 %76 %68 + OpSelectionMerge %79 None + OpBranchConditional %77 %78 %79 + %78 = OpLabel + OpBranch %79 + %79 = OpLabel + %81 = OpPhi %bool %false %69 %true %78 + OpSelectionMerge %83 None + OpBranchConditional %81 %82 %83 + %82 = OpLabel + %85 = OpVectorShuffle %v2float %30 %30 0 1 + %86 = OpFOrdEqual %v2bool %84 %85 + %87 = OpAll %bool %86 + OpBranch %83 + %83 = OpLabel + %88 = OpPhi %bool %false %79 %87 %82 + OpSelectionMerge %90 None + OpBranchConditional %88 %89 %90 + %89 = OpLabel + %92 = OpVectorShuffle %v3float %30 %30 0 1 2 + %93 = OpFOrdEqual %v3bool %91 %92 + %94 = OpAll %bool %93 + OpBranch %90 + %90 = OpLabel + %95 = OpPhi %bool %false %83 %94 %89 + OpSelectionMerge %97 None + OpBranchConditional %95 %96 %97 + %96 = OpLabel + OpBranch %97 + %97 = OpLabel + %98 = OpPhi %bool %false %90 %true %96 + OpSelectionMerge %100 None + OpBranchConditional %98 %99 %100 + %99 = OpLabel + %102 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %103 = OpLoad %v4float %102 + %104 = OpCompositeExtract %float %103 0 + %105 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %107 = OpLoad %v4float %105 + %108 = OpCompositeExtract %float %107 0 + %101 = OpFMod %float %104 %108 + %109 = OpFOrdEqual %bool %101 %float_0_75 + OpBranch %100 + %100 = OpLabel + %110 = OpPhi %bool %false %97 %109 %99 + OpSelectionMerge %112 None + OpBranchConditional %110 %111 %112 + %111 = OpLabel + %114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %115 = OpLoad %v4float %114 + %116 = OpVectorShuffle %v2float %115 %115 0 1 + %117 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %118 = OpLoad %v4float %117 + %119 = OpVectorShuffle %v2float %118 %118 0 1 + %113 = OpFMod %v2float %116 %119 + %120 = OpVectorShuffle %v2float %30 %30 0 1 + %121 = OpFOrdEqual %v2bool %113 %120 + %122 = OpAll %bool %121 + OpBranch %112 + %112 = OpLabel + %123 = OpPhi %bool %false %100 %122 %111 + OpSelectionMerge %125 None + OpBranchConditional %123 %124 %125 + %124 = OpLabel + %127 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %128 = OpLoad %v4float %127 + %129 = OpVectorShuffle %v3float %128 %128 0 1 2 + %130 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %131 = OpLoad %v4float %130 + %132 = OpVectorShuffle %v3float %131 %131 0 1 2 + %126 = OpFMod %v3float %129 %132 + %133 = OpVectorShuffle %v3float %30 %30 0 1 2 + %134 = OpFOrdEqual %v3bool %126 %133 + %135 = OpAll %bool %134 + OpBranch %125 + %125 = OpLabel + %136 = OpPhi %bool %false %112 %135 %124 + OpSelectionMerge %138 None + OpBranchConditional %136 %137 %138 + %137 = OpLabel + %140 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %141 = OpLoad %v4float %140 + %142 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %143 = OpLoad %v4float %142 + %139 = OpFMod %v4float %141 %143 + %144 = OpFOrdEqual %v4bool %139 %30 + %145 = OpAll %bool %144 + OpBranch %138 + %138 = OpLabel + %146 = OpPhi %bool %false %125 %145 %137 + OpSelectionMerge %148 None + OpBranchConditional %146 %147 %148 + %147 = OpLabel + OpBranch %148 + %148 = OpLabel + %149 = OpPhi %bool %false %138 %true %147 + OpSelectionMerge %151 None + OpBranchConditional %149 %150 %151 + %150 = OpLabel + %153 = OpVectorShuffle %v2float %33 %33 0 1 + %154 = OpFOrdEqual %v2bool %152 %153 + %155 = OpAll %bool %154 + OpBranch %151 + %151 = OpLabel + %156 = OpPhi %bool %false %148 %155 %150 + OpSelectionMerge %158 None + OpBranchConditional %156 %157 %158 + %157 = OpLabel + %160 = OpVectorShuffle %v3float %33 %33 0 1 2 + %161 = OpFOrdEqual %v3bool %159 %160 + %162 = OpAll %bool %161 + OpBranch %158 + %158 = OpLabel + %163 = OpPhi %bool %false %151 %162 %157 + OpSelectionMerge %165 None + OpBranchConditional %163 %164 %165 + %164 = OpLabel + OpBranch %165 + %165 = OpLabel + %166 = OpPhi %bool %false %158 %true %164 + OpSelectionMerge %170 None + OpBranchConditional %166 %168 %169 + %168 = OpLabel + %171 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %173 = OpLoad %v4float %171 + OpStore %167 %173 + OpBranch %170 + %169 = OpLabel + %174 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %176 = OpLoad %v4float %174 + OpStore %167 %176 + OpBranch %170 + %170 = OpLabel + %177 = OpLoad %v4float %167 + OpReturnValue %177 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Mod.skrp b/tests/sksl/intrinsics/Mod.skrp index b767d8753942..99e236e5ee1e 100644 --- a/tests/sksl/intrinsics/Mod.skrp +++ b/tests/sksl/intrinsics/Mod.skrp @@ -1,31 +1,32 @@ +102 instructions + [immutable slots] -expectedA(0) = 0x3F400000 (0.75) -expectedA(1) = 0 -expectedA(2) = 0x3F400000 (0.75) -expectedA(3) = 0x3E800000 (0.25) -expectedB(0) = 0x3E800000 (0.25) -expectedB(1) = 0 -expectedB(2) = 0x3F400000 (0.75) -expectedB(3) = 0x3F800000 (1.0) +i0 = 0x3F400000 (0.75) +i1 = 0 +i2 = 0x3F400000 (0.75) +i3 = 0x3E800000 (0.25) +i4 = 0x3E800000 (0.25) +i5 = 0 +i6 = 0x3F400000 (0.75) +i7 = 0x3F800000 (1.0) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_uniform $0 = testInputs(0) copy_constant $1 = 0x3F800000 (1.0) mod_float $0 = mod($0, $1) -copy_slot_unmasked $1 = expectedA(0) -cmpeq_float $0 = equal($0, $1) +cmpeq_imm_float $0 = equal($0, 0x3F400000 (0.75)) copy_2_uniforms $1..2 = testInputs(0..1) splat_2_constants $3..4 = 0x3F800000 (1.0) mod_2_floats $1..2 = mod($1..2, $3..4) -copy_2_slots_unmasked $3..4 = expectedA(0..1) +copy_2_immutables_unmasked $3..4 = i0..1 [0x3F400000 (0.75), 0] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_3_uniforms $1..3 = testInputs(0..2) splat_3_constants $4..6 = 0x3F800000 (1.0) mod_3_floats $1..3 = mod($1..3, $4..6) -copy_3_slots_unmasked $4..6 = expectedA(0..2) +copy_3_immutables_unmasked $4..6 = i0..2 [0x3F400000 (0.75), 0, 0x3F400000 (0.75)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 @@ -33,33 +34,27 @@ bitwise_and_int $0 &= $1 copy_4_uniforms $1..4 = testInputs splat_4_constants $5..8 = 0x3F800000 (1.0) mod_4_floats $1..4 = mod($1..4, $5..8) -copy_4_slots_unmasked $5..8 = expectedA +copy_4_immutables_unmasked $5..8 = i0..3 [0x3F400000 (0.75), 0, 0x3F400000 (0.75), 0x3E800000 (0.25)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expectedA(0) +copy_constant $1 = 0x3F400000 (0.75) cmpeq_imm_float $1 = equal($1, 0x3F400000 (0.75)) bitwise_and_int $0 &= $1 -copy_constant $1 = 0x3F400000 (0.75) -copy_constant $2 = 0 -copy_2_slots_unmasked $3..4 = expectedA(0..1) +copy_2_immutables_unmasked $1..2 = i0..1 [0x3F400000 (0.75), 0] +copy_2_immutables_unmasked $3..4 = i0..1 [0x3F400000 (0.75), 0] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0x3F400000 (0.75) -copy_constant $2 = 0 -copy_constant $3 = 0x3F400000 (0.75) -copy_3_slots_unmasked $4..6 = expectedA(0..2) +copy_3_immutables_unmasked $1..3 = i0..2 [0x3F400000 (0.75), 0, 0x3F400000 (0.75)] +copy_3_immutables_unmasked $4..6 = i0..2 [0x3F400000 (0.75), 0, 0x3F400000 (0.75)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0x3F400000 (0.75) -copy_constant $2 = 0 -copy_constant $3 = 0x3F400000 (0.75) -copy_constant $4 = 0x3E800000 (0.25) -copy_4_slots_unmasked $5..8 = expectedA +copy_4_immutables_unmasked $1..4 = i0..3 [0x3F400000 (0.75), 0, 0x3F400000 (0.75), 0x3E800000 (0.25)] +copy_4_immutables_unmasked $5..8 = i0..3 [0x3F400000 (0.75), 0, 0x3F400000 (0.75), 0x3E800000 (0.25)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -67,20 +62,19 @@ bitwise_and_int $0 &= $1 copy_uniform $1 = testInputs(0) copy_uniform $2 = colorWhite(0) mod_float $1 = mod($1, $2) -copy_slot_unmasked $2 = expectedA(0) -cmpeq_float $1 = equal($1, $2) +cmpeq_imm_float $1 = equal($1, 0x3F400000 (0.75)) bitwise_and_int $0 &= $1 copy_2_uniforms $1..2 = testInputs(0..1) copy_2_uniforms $3..4 = colorWhite(0..1) mod_2_floats $1..2 = mod($1..2, $3..4) -copy_2_slots_unmasked $3..4 = expectedA(0..1) +copy_2_immutables_unmasked $3..4 = i0..1 [0x3F400000 (0.75), 0] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_3_uniforms $1..3 = testInputs(0..2) copy_3_uniforms $4..6 = colorWhite(0..2) mod_3_floats $1..3 = mod($1..3, $4..6) -copy_3_slots_unmasked $4..6 = expectedA(0..2) +copy_3_immutables_unmasked $4..6 = i0..2 [0x3F400000 (0.75), 0, 0x3F400000 (0.75)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 @@ -88,33 +82,27 @@ bitwise_and_int $0 &= $1 copy_4_uniforms $1..4 = testInputs copy_4_uniforms $5..8 = colorWhite mod_4_floats $1..4 = mod($1..4, $5..8) -copy_4_slots_unmasked $5..8 = expectedA +copy_4_immutables_unmasked $5..8 = i0..3 [0x3F400000 (0.75), 0, 0x3F400000 (0.75), 0x3E800000 (0.25)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expectedB(0) +copy_constant $1 = 0x3E800000 (0.25) cmpeq_imm_float $1 = equal($1, 0x3E800000 (0.25)) bitwise_and_int $0 &= $1 -copy_constant $1 = 0x3E800000 (0.25) -copy_constant $2 = 0 -copy_2_slots_unmasked $3..4 = expectedB(0..1) +copy_2_immutables_unmasked $1..2 = i4..5 [0x3E800000 (0.25), 0] +copy_2_immutables_unmasked $3..4 = i4..5 [0x3E800000 (0.25), 0] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0x3E800000 (0.25) -copy_constant $2 = 0 -copy_constant $3 = 0x3F400000 (0.75) -copy_3_slots_unmasked $4..6 = expectedB(0..2) +copy_3_immutables_unmasked $1..3 = i4..6 [0x3E800000 (0.25), 0, 0x3F400000 (0.75)] +copy_3_immutables_unmasked $4..6 = i4..6 [0x3E800000 (0.25), 0, 0x3F400000 (0.75)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0x3E800000 (0.25) -copy_constant $2 = 0 -copy_constant $3 = 0x3F400000 (0.75) -copy_constant $4 = 0x3F800000 (1.0) -copy_4_slots_unmasked $5..8 = expectedB +copy_4_immutables_unmasked $1..4 = i4..7 [0x3E800000 (0.25), 0, 0x3F400000 (0.75), 0x3F800000 (1.0)] +copy_4_immutables_unmasked $5..8 = i4..7 [0x3E800000 (0.25), 0, 0x3F400000 (0.75), 0x3F800000 (1.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 diff --git a/tests/sksl/intrinsics/Mod.wgsl b/tests/sksl/intrinsics/Mod.wgsl index 0d73efb6326d..367a8e65c259 100644 --- a/tests/sksl/intrinsics/Mod.wgsl +++ b/tests/sksl/intrinsics/Mod.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -34,7 +35,7 @@ fn main(_skParam0: vec2) -> vec4 { let _skTemp14 = _globalUniforms.colorWhite.xyz; let _skTemp15 = _skTemp13 - _skTemp14 * floor(_skTemp13 / _skTemp14); let _skTemp16 = _globalUniforms.testInputs - _globalUniforms.colorWhite * floor(_globalUniforms.testInputs / _globalUniforms.colorWhite); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((((((((((_skTemp1 == expectedA.x && all(_skTemp3 == expectedA.xy)) && all(_skTemp5 == expectedA.xyz)) && all(_skTemp6 == expectedA)) && 0.75 == expectedA.x) && all(vec2(0.75, 0.0) == expectedA.xy)) && all(vec3(0.75, 0.0, 0.75) == expectedA.xyz)) && all(vec4(0.75, 0.0, 0.75, 0.25) == expectedA)) && _skTemp9 == expectedA.x) && all(_skTemp12 == expectedA.xy)) && all(_skTemp15 == expectedA.xyz)) && all(_skTemp16 == expectedA)) && 0.25 == expectedB.x) && all(vec2(0.25, 0.0) == expectedB.xy)) && all(vec3(0.25, 0.0, 0.75) == expectedB.xyz)) && all(vec4(0.25, 0.0, 0.75, 1.0) == expectedB))); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((((((((((_skTemp1 == expectedA.x) && all(_skTemp3 == expectedA.xy)) && all(_skTemp5 == expectedA.xyz)) && all(_skTemp6 == expectedA)) && (0.75 == expectedA.x)) && all(vec2(0.75, 0.0) == expectedA.xy)) && all(vec3(0.75, 0.0, 0.75) == expectedA.xyz)) && all(vec4(0.75, 0.0, 0.75, 0.25) == expectedA)) && (_skTemp9 == expectedA.x)) && all(_skTemp12 == expectedA.xy)) && all(_skTemp15 == expectedA.xyz)) && all(_skTemp16 == expectedA)) && (0.25 == expectedB.x)) && all(vec2(0.25, 0.0) == expectedB.xy)) && all(vec3(0.25, 0.0, 0.75) == expectedB.xyz)) && all(vec4(0.25, 0.0, 0.75, 1.0) == expectedB))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/intrinsics/Modf.asm.frag b/tests/sksl/intrinsics/Modf.asm.frag index 1e77b7c31c4c..5124b2627345 100644 --- a/tests/sksl/intrinsics/Modf.asm.frag +++ b/tests/sksl/intrinsics/Modf.asm.frag @@ -1,205 +1,205 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %value "value" -OpName %ok "ok" -OpName %whole "whole" -OpName %fraction "fraction" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %127 RelaxedPrecision -OpDecorate %134 RelaxedPrecision -OpDecorate %136 RelaxedPrecision -OpDecorate %137 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %value "value" + OpName %ok "ok" + OpName %whole "whole" + OpName %fraction "fraction" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %127 RelaxedPrecision + OpDecorate %134 RelaxedPrecision + OpDecorate %136 RelaxedPrecision + OpDecorate %137 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float -%float_2_5 = OpConstant %float 2.5 -%float_n2_5 = OpConstant %float -2.5 -%float_8 = OpConstant %float 8 + %float_2_5 = OpConstant %float 2.5 + %float_n2_5 = OpConstant %float -2.5 + %float_8 = OpConstant %float 8 %float_n0_125 = OpConstant %float -0.125 -%32 = OpConstantComposite %v4float %float_2_5 %float_n2_5 %float_8 %float_n0_125 -%v4bool = OpTypeVector %bool 4 + %32 = OpConstantComposite %v4float %float_2_5 %float_n2_5 %float_8 %float_n0_125 + %v4bool = OpTypeVector %bool 4 %_ptr_Function_v4bool = OpTypePointer Function %v4bool -%false = OpConstantFalse %bool -%37 = OpConstantComposite %v4bool %false %false %false %false + %false = OpConstantFalse %bool + %37 = OpConstantComposite %v4bool %false %false %false %false %_ptr_Function_float = OpTypePointer Function %float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%float_2 = OpConstant %float 2 -%float_0_5 = OpConstant %float 0.5 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %float_2 = OpConstant %float 2 + %float_0_5 = OpConstant %float 0.5 %_ptr_Function_bool = OpTypePointer Function %bool -%float_n2 = OpConstant %float -2 -%72 = OpConstantComposite %v2float %float_2 %float_n2 -%v2bool = OpTypeVector %bool 2 -%float_n0_5 = OpConstant %float -0.5 -%80 = OpConstantComposite %v2float %float_0_5 %float_n0_5 -%int_1 = OpConstant %int 1 -%v3float = OpTypeVector %float 3 + %float_n2 = OpConstant %float -2 + %72 = OpConstantComposite %v2float %float_2 %float_n2 + %v2bool = OpTypeVector %bool 2 + %float_n0_5 = OpConstant %float -0.5 + %80 = OpConstantComposite %v2float %float_0_5 %float_n0_5 + %int_1 = OpConstant %int 1 + %v3float = OpTypeVector %float 3 %_ptr_Function_v3float = OpTypePointer Function %v3float -%98 = OpConstantComposite %v3float %float_2 %float_n2 %float_8 -%v3bool = OpTypeVector %bool 3 -%105 = OpConstantComposite %v3float %float_0_5 %float_n0_5 %float_0 -%int_2 = OpConstant %int 2 -%115 = OpConstantComposite %v4float %float_2 %float_n2 %float_8 %float_0 -%120 = OpConstantComposite %v4float %float_0_5 %float_n0_5 %float_0 %float_n0_125 -%int_3 = OpConstant %int 3 + %98 = OpConstantComposite %v3float %float_2 %float_n2 %float_8 + %v3bool = OpTypeVector %bool 3 + %105 = OpConstantComposite %v3float %float_0_5 %float_n0_5 %float_0 + %int_2 = OpConstant %int 2 + %115 = OpConstantComposite %v4float %float_2 %float_n2 %float_8 %float_0 + %120 = OpConstantComposite %v4float %float_0_5 %float_n0_5 %float_0 %float_n0_125 + %int_3 = OpConstant %int 3 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%value = OpVariable %_ptr_Function_v4float Function -%ok = OpVariable %_ptr_Function_v4bool Function -%whole = OpVariable %_ptr_Function_v4float Function -%fraction = OpVariable %_ptr_Function_v4float Function -%45 = OpVariable %_ptr_Function_float Function -%64 = OpVariable %_ptr_Function_v2float Function -%90 = OpVariable %_ptr_Function_v3float Function -%113 = OpVariable %_ptr_Function_v4float Function -%128 = OpVariable %_ptr_Function_v4float Function -OpStore %value %32 -OpStore %ok %37 -%41 = OpAccessChain %_ptr_Function_float %whole %int_0 -%40 = OpExtInst %float %1 Modf %float_2_5 %45 -%46 = OpLoad %float %45 -OpStore %41 %46 -%47 = OpAccessChain %_ptr_Function_float %fraction %int_0 -OpStore %47 %40 -%48 = OpLoad %v4float %whole -%49 = OpCompositeExtract %float %48 0 -%51 = OpFOrdEqual %bool %49 %float_2 -OpSelectionMerge %53 None -OpBranchConditional %51 %52 %53 -%52 = OpLabel -%54 = OpLoad %v4float %fraction -%55 = OpCompositeExtract %float %54 0 -%57 = OpFOrdEqual %bool %55 %float_0_5 -OpBranch %53 -%53 = OpLabel -%58 = OpPhi %bool %false %25 %57 %52 -%59 = OpAccessChain %_ptr_Function_bool %ok %int_0 -OpStore %59 %58 -%62 = OpLoad %v4float %value -%63 = OpVectorShuffle %v2float %62 %62 0 1 -%61 = OpExtInst %v2float %1 Modf %63 %64 -%65 = OpLoad %v2float %64 -%66 = OpLoad %v4float %whole -%67 = OpVectorShuffle %v4float %66 %65 4 5 2 3 -OpStore %whole %67 -%68 = OpLoad %v4float %fraction -%69 = OpVectorShuffle %v4float %68 %61 4 5 2 3 -OpStore %fraction %69 -%70 = OpVectorShuffle %v2float %67 %67 0 1 -%73 = OpFOrdEqual %v2bool %70 %72 -%75 = OpAll %bool %73 -OpSelectionMerge %77 None -OpBranchConditional %75 %76 %77 -%76 = OpLabel -%78 = OpVectorShuffle %v2float %69 %69 0 1 -%81 = OpFOrdEqual %v2bool %78 %80 -%82 = OpAll %bool %81 -OpBranch %77 -%77 = OpLabel -%83 = OpPhi %bool %false %53 %82 %76 -%84 = OpAccessChain %_ptr_Function_bool %ok %int_1 -OpStore %84 %83 -%87 = OpLoad %v4float %value -%88 = OpVectorShuffle %v3float %87 %87 0 1 2 -%86 = OpExtInst %v3float %1 Modf %88 %90 -%92 = OpLoad %v3float %90 -%93 = OpLoad %v4float %whole -%94 = OpVectorShuffle %v4float %93 %92 4 5 6 3 -OpStore %whole %94 -%95 = OpLoad %v4float %fraction -%96 = OpVectorShuffle %v4float %95 %86 4 5 6 3 -OpStore %fraction %96 -%97 = OpVectorShuffle %v3float %94 %94 0 1 2 -%99 = OpFOrdEqual %v3bool %97 %98 -%101 = OpAll %bool %99 -OpSelectionMerge %103 None -OpBranchConditional %101 %102 %103 -%102 = OpLabel -%104 = OpVectorShuffle %v3float %96 %96 0 1 2 -%106 = OpFOrdEqual %v3bool %104 %105 -%107 = OpAll %bool %106 -OpBranch %103 -%103 = OpLabel -%108 = OpPhi %bool %false %77 %107 %102 -%109 = OpAccessChain %_ptr_Function_bool %ok %int_2 -OpStore %109 %108 -%112 = OpLoad %v4float %value -%111 = OpExtInst %v4float %1 Modf %112 %113 -%114 = OpLoad %v4float %113 -OpStore %whole %114 -OpStore %fraction %111 -%116 = OpFOrdEqual %v4bool %114 %115 -%117 = OpAll %bool %116 -OpSelectionMerge %119 None -OpBranchConditional %117 %118 %119 -%118 = OpLabel -%121 = OpFOrdEqual %v4bool %111 %120 -%122 = OpAll %bool %121 -OpBranch %119 -%119 = OpLabel -%123 = OpPhi %bool %false %103 %122 %118 -%124 = OpAccessChain %_ptr_Function_bool %ok %int_3 -OpStore %124 %123 -%127 = OpLoad %v4bool %ok -%126 = OpAll %bool %127 -OpSelectionMerge %131 None -OpBranchConditional %126 %129 %130 -%129 = OpLabel -%132 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%134 = OpLoad %v4float %132 -OpStore %128 %134 -OpBranch %131 -%130 = OpLabel -%135 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%136 = OpLoad %v4float %135 -OpStore %128 %136 -OpBranch %131 -%131 = OpLabel -%137 = OpLoad %v4float %128 -OpReturnValue %137 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %value = OpVariable %_ptr_Function_v4float Function + %ok = OpVariable %_ptr_Function_v4bool Function + %whole = OpVariable %_ptr_Function_v4float Function + %fraction = OpVariable %_ptr_Function_v4float Function + %45 = OpVariable %_ptr_Function_float Function + %64 = OpVariable %_ptr_Function_v2float Function + %90 = OpVariable %_ptr_Function_v3float Function + %113 = OpVariable %_ptr_Function_v4float Function + %128 = OpVariable %_ptr_Function_v4float Function + OpStore %value %32 + OpStore %ok %37 + %41 = OpAccessChain %_ptr_Function_float %whole %int_0 + %40 = OpExtInst %float %1 Modf %float_2_5 %45 + %46 = OpLoad %float %45 + OpStore %41 %46 + %47 = OpAccessChain %_ptr_Function_float %fraction %int_0 + OpStore %47 %40 + %48 = OpLoad %v4float %whole + %49 = OpCompositeExtract %float %48 0 + %51 = OpFOrdEqual %bool %49 %float_2 + OpSelectionMerge %53 None + OpBranchConditional %51 %52 %53 + %52 = OpLabel + %54 = OpLoad %v4float %fraction + %55 = OpCompositeExtract %float %54 0 + %57 = OpFOrdEqual %bool %55 %float_0_5 + OpBranch %53 + %53 = OpLabel + %58 = OpPhi %bool %false %25 %57 %52 + %59 = OpAccessChain %_ptr_Function_bool %ok %int_0 + OpStore %59 %58 + %62 = OpLoad %v4float %value + %63 = OpVectorShuffle %v2float %62 %62 0 1 + %61 = OpExtInst %v2float %1 Modf %63 %64 + %65 = OpLoad %v2float %64 + %66 = OpLoad %v4float %whole + %67 = OpVectorShuffle %v4float %66 %65 4 5 2 3 + OpStore %whole %67 + %68 = OpLoad %v4float %fraction + %69 = OpVectorShuffle %v4float %68 %61 4 5 2 3 + OpStore %fraction %69 + %70 = OpVectorShuffle %v2float %67 %67 0 1 + %73 = OpFOrdEqual %v2bool %70 %72 + %75 = OpAll %bool %73 + OpSelectionMerge %77 None + OpBranchConditional %75 %76 %77 + %76 = OpLabel + %78 = OpVectorShuffle %v2float %69 %69 0 1 + %81 = OpFOrdEqual %v2bool %78 %80 + %82 = OpAll %bool %81 + OpBranch %77 + %77 = OpLabel + %83 = OpPhi %bool %false %53 %82 %76 + %84 = OpAccessChain %_ptr_Function_bool %ok %int_1 + OpStore %84 %83 + %87 = OpLoad %v4float %value + %88 = OpVectorShuffle %v3float %87 %87 0 1 2 + %86 = OpExtInst %v3float %1 Modf %88 %90 + %92 = OpLoad %v3float %90 + %93 = OpLoad %v4float %whole + %94 = OpVectorShuffle %v4float %93 %92 4 5 6 3 + OpStore %whole %94 + %95 = OpLoad %v4float %fraction + %96 = OpVectorShuffle %v4float %95 %86 4 5 6 3 + OpStore %fraction %96 + %97 = OpVectorShuffle %v3float %94 %94 0 1 2 + %99 = OpFOrdEqual %v3bool %97 %98 + %101 = OpAll %bool %99 + OpSelectionMerge %103 None + OpBranchConditional %101 %102 %103 + %102 = OpLabel + %104 = OpVectorShuffle %v3float %96 %96 0 1 2 + %106 = OpFOrdEqual %v3bool %104 %105 + %107 = OpAll %bool %106 + OpBranch %103 + %103 = OpLabel + %108 = OpPhi %bool %false %77 %107 %102 + %109 = OpAccessChain %_ptr_Function_bool %ok %int_2 + OpStore %109 %108 + %112 = OpLoad %v4float %value + %111 = OpExtInst %v4float %1 Modf %112 %113 + %114 = OpLoad %v4float %113 + OpStore %whole %114 + OpStore %fraction %111 + %116 = OpFOrdEqual %v4bool %114 %115 + %117 = OpAll %bool %116 + OpSelectionMerge %119 None + OpBranchConditional %117 %118 %119 + %118 = OpLabel + %121 = OpFOrdEqual %v4bool %111 %120 + %122 = OpAll %bool %121 + OpBranch %119 + %119 = OpLabel + %123 = OpPhi %bool %false %103 %122 %118 + %124 = OpAccessChain %_ptr_Function_bool %ok %int_3 + OpStore %124 %123 + %127 = OpLoad %v4bool %ok + %126 = OpAll %bool %127 + OpSelectionMerge %131 None + OpBranchConditional %126 %129 %130 + %129 = OpLabel + %132 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %134 = OpLoad %v4float %132 + OpStore %128 %134 + OpBranch %131 + %130 = OpLabel + %135 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %136 = OpLoad %v4float %135 + OpStore %128 %136 + OpBranch %131 + %131 = OpLabel + %137 = OpLoad %v4float %128 + OpReturnValue %137 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Modf.metal b/tests/sksl/intrinsics/Modf.metal index ee3f741763f4..627d5d6a59d0 100644 --- a/tests/sksl/intrinsics/Modf.metal +++ b/tests/sksl/intrinsics/Modf.metal @@ -10,46 +10,30 @@ struct Inputs { struct Outputs { half4 sk_FragColor [[color(0)]]; }; -float _skOutParamHelper0_modf(float _var0, thread float4& whole) { - float _var1; - float _skResult = modf(_var0, _var1); - whole.x = _var1; - return _skResult; -} -float2 _skOutParamHelper1_modf(float2 _var0, thread float4& whole) { - float2 _var1; - float2 _skResult = modf(_var0, _var1); - whole.xy = _var1; - return _skResult; -} -float3 _skOutParamHelper2_modf(float3 _var0, thread float4& whole) { - float3 _var1; - float3 _skResult = modf(_var0, _var1); - whole.xyz = _var1; - return _skResult; -} -float4 _skOutParamHelper3_modf(float4 _var0, thread float4& whole) { - float4 _var1; - float4 _skResult = modf(_var0, _var1); - whole = _var1; - return _skResult; -} fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) { Outputs _out; (void)_out; + float _skTemp0; + float _skTemp1; + float2 _skTemp2; + float2 _skTemp3; + float3 _skTemp4; + float3 _skTemp5; + float4 _skTemp6; + float4 _skTemp7; float4 value = float4(2.5, -2.5, 8.0, -0.125); const float4 expectedWhole = float4(2.0, -2.0, 8.0, 0.0); const float4 expectedFraction = float4(0.5, -0.5, 0.0, -0.125); bool4 ok = bool4(false); float4 whole; float4 fraction; - fraction.x = _skOutParamHelper0_modf(value.x, whole); + fraction.x = ((_skTemp1 = modf(value.x, _skTemp0)), (whole.x = _skTemp0), _skTemp1); ok.x = whole.x == 2.0 && fraction.x == 0.5; - fraction.xy = _skOutParamHelper1_modf(value.xy, whole); + fraction.xy = ((_skTemp3 = modf(value.xy, _skTemp2)), (whole.xy = _skTemp2), _skTemp3); ok.y = all(whole.xy == float2(2.0, -2.0)) && all(fraction.xy == float2(0.5, -0.5)); - fraction.xyz = _skOutParamHelper2_modf(value.xyz, whole); + fraction.xyz = ((_skTemp5 = modf(value.xyz, _skTemp4)), (whole.xyz = _skTemp4), _skTemp5); ok.z = all(whole.xyz == float3(2.0, -2.0, 8.0)) && all(fraction.xyz == float3(0.5, -0.5, 0.0)); - fraction = _skOutParamHelper3_modf(value, whole); + fraction = ((_skTemp7 = modf(value, _skTemp6)), (whole = _skTemp6), _skTemp7); ok.w = all(whole == expectedWhole) && all(fraction == expectedFraction); _out.sk_FragColor = all(ok) ? _uniforms.colorGreen : _uniforms.colorRed; return _out; diff --git a/tests/sksl/intrinsics/Modf.wgsl b/tests/sksl/intrinsics/Modf.wgsl new file mode 100644 index 000000000000..f12d6550a574 --- /dev/null +++ b/tests/sksl/intrinsics/Modf.wgsl @@ -0,0 +1,57 @@ +### Compilation failed: + +error: :23:20 error: no matching call to modf(f32, f32) + +2 candidate functions: + modf(T) -> __modf_result_T where: T is abstract-float, f32 or f16 + modf(vecN) -> __modf_result_vecN_T where: T is abstract-float, f32 or f16 + + let _skTemp0 = modf(value.x, whole.x); + ^^^^^^^^^^^^^^^^^^^^^^ + + +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var value: vec4 = vec4(2.5, -2.5, 8.0, -0.125); + const expectedWhole: vec4 = vec4(2.0, -2.0, 8.0, 0.0); + const expectedFraction: vec4 = vec4(0.5, -0.5, 0.0, -0.125); + var ok: vec4 = vec4(false); + var whole: vec4; + var fraction: vec4; + let _skTemp0 = modf(value.x, whole.x); + fraction.x = _skTemp0; + ok.x = (whole.x == 2.0) && (fraction.x == 0.5); + let _skTemp1 = modf(value.xy, whole.xy); + fraction = vec4((_skTemp1), fraction.zw).xyzw; + ok.y = all(whole.xy == vec2(2.0, -2.0)) && all(fraction.xy == vec2(0.5, -0.5)); + let _skTemp2 = modf(value.xyz, whole.xyz); + fraction = vec4((_skTemp2), fraction.w).xyzw; + ok.z = all(whole.xyz == vec3(2.0, -2.0, 8.0)) && all(fraction.xyz == vec3(0.5, -0.5, 0.0)); + let _skTemp3 = modf(value, whole); + fraction = _skTemp3; + ok.w = all(whole == expectedWhole) && all(fraction == expectedFraction); + let _skTemp4 = all(ok); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(_skTemp4)); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} + +1 error diff --git a/tests/sksl/intrinsics/Normalize.asm.frag b/tests/sksl/intrinsics/Normalize.asm.frag index f24d129f752a..4eee25927ca1 100644 --- a/tests/sksl/intrinsics/Normalize.asm.frag +++ b/tests/sksl/intrinsics/Normalize.asm.frag @@ -1,181 +1,181 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "inputVal" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %expectedVec "expectedVec" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %expectedVec RelaxedPrecision -OpDecorate %31 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %45 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %55 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %64 RelaxedPrecision -OpDecorate %66 RelaxedPrecision -OpDecorate %78 RelaxedPrecision -OpDecorate %85 RelaxedPrecision -OpDecorate %98 RelaxedPrecision -OpDecorate %101 RelaxedPrecision -OpDecorate %102 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "inputVal" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %expectedVec "expectedVec" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %expectedVec RelaxedPrecision + OpDecorate %31 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %45 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %55 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %64 RelaxedPrecision + OpDecorate %66 RelaxedPrecision + OpDecorate %78 RelaxedPrecision + OpDecorate %85 RelaxedPrecision + OpDecorate %98 RelaxedPrecision + OpDecorate %101 RelaxedPrecision + OpDecorate %102 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float -%float_1 = OpConstant %float 1 -%29 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_0 -%false = OpConstantFalse %bool + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_0 + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%v3bool = OpTypeVector %bool 3 -%v4bool = OpTypeVector %bool 4 -%true = OpConstantTrue %bool -%77 = OpConstantComposite %v2float %float_0 %float_1 -%84 = OpConstantComposite %v3float %float_0 %float_1 %float_0 -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %v3bool = OpTypeVector %bool 3 + %v4bool = OpTypeVector %bool 4 + %true = OpConstantTrue %bool + %77 = OpConstantComposite %v2float %float_0 %float_1 + %84 = OpConstantComposite %v3float %float_0 %float_1 %float_0 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel %expectedVec = OpVariable %_ptr_Function_v4float Function -%92 = OpVariable %_ptr_Function_v4float Function -OpStore %expectedVec %29 -%32 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%36 = OpLoad %v4float %32 -%37 = OpCompositeExtract %float %36 0 -%31 = OpExtInst %float %1 Normalize %37 -%38 = OpFOrdEqual %bool %31 %float_1 -OpSelectionMerge %40 None -OpBranchConditional %38 %39 %40 -%39 = OpLabel -%42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%43 = OpLoad %v4float %42 -%44 = OpVectorShuffle %v2float %43 %43 0 1 -%41 = OpExtInst %v2float %1 Normalize %44 -%45 = OpVectorShuffle %v2float %29 %29 0 1 -%46 = OpFOrdEqual %v2bool %41 %45 -%48 = OpAll %bool %46 -OpBranch %40 -%40 = OpLabel -%49 = OpPhi %bool %false %25 %48 %39 -OpSelectionMerge %51 None -OpBranchConditional %49 %50 %51 -%50 = OpLabel -%53 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%54 = OpLoad %v4float %53 -%55 = OpVectorShuffle %v3float %54 %54 0 1 2 -%52 = OpExtInst %v3float %1 Normalize %55 -%57 = OpVectorShuffle %v3float %29 %29 0 1 2 -%58 = OpFOrdEqual %v3bool %52 %57 -%60 = OpAll %bool %58 -OpBranch %51 -%51 = OpLabel -%61 = OpPhi %bool %false %40 %60 %50 -OpSelectionMerge %63 None -OpBranchConditional %61 %62 %63 -%62 = OpLabel -%65 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%66 = OpLoad %v4float %65 -%64 = OpExtInst %v4float %1 Normalize %66 -%67 = OpFOrdEqual %v4bool %64 %29 -%69 = OpAll %bool %67 -OpBranch %63 -%63 = OpLabel -%70 = OpPhi %bool %false %51 %69 %62 -OpSelectionMerge %72 None -OpBranchConditional %70 %71 %72 -%71 = OpLabel -OpBranch %72 -%72 = OpLabel -%74 = OpPhi %bool %false %63 %true %71 -OpSelectionMerge %76 None -OpBranchConditional %74 %75 %76 -%75 = OpLabel -%78 = OpVectorShuffle %v2float %29 %29 1 0 -%79 = OpFOrdEqual %v2bool %77 %78 -%80 = OpAll %bool %79 -OpBranch %76 -%76 = OpLabel -%81 = OpPhi %bool %false %72 %80 %75 -OpSelectionMerge %83 None -OpBranchConditional %81 %82 %83 -%82 = OpLabel -%85 = OpVectorShuffle %v3float %29 %29 2 0 1 -%86 = OpFOrdEqual %v3bool %84 %85 -%87 = OpAll %bool %86 -OpBranch %83 -%83 = OpLabel -%88 = OpPhi %bool %false %76 %87 %82 -OpSelectionMerge %90 None -OpBranchConditional %88 %89 %90 -%89 = OpLabel -OpBranch %90 -%90 = OpLabel -%91 = OpPhi %bool %false %83 %true %89 -OpSelectionMerge %95 None -OpBranchConditional %91 %93 %94 -%93 = OpLabel -%96 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%98 = OpLoad %v4float %96 -OpStore %92 %98 -OpBranch %95 -%94 = OpLabel -%99 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%101 = OpLoad %v4float %99 -OpStore %92 %101 -OpBranch %95 -%95 = OpLabel -%102 = OpLoad %v4float %92 -OpReturnValue %102 -OpFunctionEnd + %92 = OpVariable %_ptr_Function_v4float Function + OpStore %expectedVec %29 + %32 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %36 = OpLoad %v4float %32 + %37 = OpCompositeExtract %float %36 0 + %31 = OpExtInst %float %1 Normalize %37 + %38 = OpFOrdEqual %bool %31 %float_1 + OpSelectionMerge %40 None + OpBranchConditional %38 %39 %40 + %39 = OpLabel + %42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %43 = OpLoad %v4float %42 + %44 = OpVectorShuffle %v2float %43 %43 0 1 + %41 = OpExtInst %v2float %1 Normalize %44 + %45 = OpVectorShuffle %v2float %29 %29 0 1 + %46 = OpFOrdEqual %v2bool %41 %45 + %48 = OpAll %bool %46 + OpBranch %40 + %40 = OpLabel + %49 = OpPhi %bool %false %25 %48 %39 + OpSelectionMerge %51 None + OpBranchConditional %49 %50 %51 + %50 = OpLabel + %53 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %54 = OpLoad %v4float %53 + %55 = OpVectorShuffle %v3float %54 %54 0 1 2 + %52 = OpExtInst %v3float %1 Normalize %55 + %57 = OpVectorShuffle %v3float %29 %29 0 1 2 + %58 = OpFOrdEqual %v3bool %52 %57 + %60 = OpAll %bool %58 + OpBranch %51 + %51 = OpLabel + %61 = OpPhi %bool %false %40 %60 %50 + OpSelectionMerge %63 None + OpBranchConditional %61 %62 %63 + %62 = OpLabel + %65 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %66 = OpLoad %v4float %65 + %64 = OpExtInst %v4float %1 Normalize %66 + %67 = OpFOrdEqual %v4bool %64 %29 + %69 = OpAll %bool %67 + OpBranch %63 + %63 = OpLabel + %70 = OpPhi %bool %false %51 %69 %62 + OpSelectionMerge %72 None + OpBranchConditional %70 %71 %72 + %71 = OpLabel + OpBranch %72 + %72 = OpLabel + %74 = OpPhi %bool %false %63 %true %71 + OpSelectionMerge %76 None + OpBranchConditional %74 %75 %76 + %75 = OpLabel + %78 = OpVectorShuffle %v2float %29 %29 1 0 + %79 = OpFOrdEqual %v2bool %77 %78 + %80 = OpAll %bool %79 + OpBranch %76 + %76 = OpLabel + %81 = OpPhi %bool %false %72 %80 %75 + OpSelectionMerge %83 None + OpBranchConditional %81 %82 %83 + %82 = OpLabel + %85 = OpVectorShuffle %v3float %29 %29 2 0 1 + %86 = OpFOrdEqual %v3bool %84 %85 + %87 = OpAll %bool %86 + OpBranch %83 + %83 = OpLabel + %88 = OpPhi %bool %false %76 %87 %82 + OpSelectionMerge %90 None + OpBranchConditional %88 %89 %90 + %89 = OpLabel + OpBranch %90 + %90 = OpLabel + %91 = OpPhi %bool %false %83 %true %89 + OpSelectionMerge %95 None + OpBranchConditional %91 %93 %94 + %93 = OpLabel + %96 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %98 = OpLoad %v4float %96 + OpStore %92 %98 + OpBranch %95 + %94 = OpLabel + %99 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %101 = OpLoad %v4float %99 + OpStore %92 %101 + OpBranch %95 + %95 = OpLabel + %102 = OpLoad %v4float %92 + OpReturnValue %102 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Normalize.skrp b/tests/sksl/intrinsics/Normalize.skrp index 44e77777e43d..a481a8b35ef9 100644 --- a/tests/sksl/intrinsics/Normalize.skrp +++ b/tests/sksl/intrinsics/Normalize.skrp @@ -1,8 +1,15 @@ +69 instructions + [immutable slots] -expectedVec(0) = 0x3F800000 (1.0) -expectedVec(1) = 0 -expectedVec(2) = 0 -expectedVec(3) = 0 +i0 = 0x3F800000 (1.0) +i1 = 0 +i2 = 0 +i3 = 0 +i4 = 0 +i5 = 0x3F800000 (1.0) +i6 = 0 +i7 = 0x3F800000 (1.0) +i8 = 0 store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -10,16 +17,15 @@ copy_uniform $0 = inputVal(0) copy_slot_unmasked $1 = $0 bitwise_and_imm_int $1 &= 0x7FFFFFFF div_float $0 /= $1 -copy_slot_unmasked $1 = expectedVec(0) -cmpeq_float $0 = equal($0, $1) +cmpeq_imm_float $0 = equal($0, 0x3F800000 (1.0)) copy_2_uniforms $1..2 = inputVal(0..1) copy_2_slots_unmasked $3..4 = $1..2 copy_2_slots_unmasked $5..6 = $3..4 dot_2_floats $3 = dot($3..4, $5..6) -invsqrt_float $3 = inversesqrt($3) +sqrt_float $3 = sqrt($3) copy_slot_unmasked $4 = $3 -mul_2_floats $1..2 *= $3..4 -copy_2_slots_unmasked $3..4 = expectedVec(0..1) +div_2_floats $1..2 /= $3..4 +copy_2_immutables_unmasked $3..4 = i0..1 [0x3F800000 (1.0), 0] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 @@ -27,10 +33,10 @@ copy_3_uniforms $1..3 = inputVal(0..2) copy_3_slots_unmasked $4..6 = $1..3 copy_3_slots_unmasked $7..9 = $4..6 dot_3_floats $4 = dot($4..6, $7..9) -invsqrt_float $4 = inversesqrt($4) +sqrt_float $4 = sqrt($4) swizzle_3 $4..6 = ($4..6).xxx -mul_3_floats $1..3 *= $4..6 -copy_3_slots_unmasked $4..6 = expectedVec(0..2) +div_3_floats $1..3 /= $4..6 +copy_3_immutables_unmasked $4..6 = i0..2 [0x3F800000 (1.0), 0, 0] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 @@ -39,36 +45,32 @@ copy_4_uniforms $1..4 = inputVal copy_4_slots_unmasked $5..8 = $1..4 copy_4_slots_unmasked $9..12 = $5..8 dot_4_floats $5 = dot($5..8, $9..12) -invsqrt_float $5 = inversesqrt($5) +sqrt_float $5 = sqrt($5) swizzle_4 $5..8 = ($5..8).xxxx -mul_4_floats $1..4 *= $5..8 -copy_4_slots_unmasked $5..8 = expectedVec +div_4_floats $1..4 /= $5..8 +copy_4_immutables_unmasked $5..8 = i0..3 [0x3F800000 (1.0), 0, 0, 0] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expectedVec(0) +copy_constant $1 = 0x3F800000 (1.0) cmpeq_imm_float $1 = equal($1, 0x3F800000 (1.0)) bitwise_and_int $0 &= $1 -copy_constant $1 = 0 -copy_constant $2 = 0x3F800000 (1.0) -copy_4_slots_unmasked $3..6 = expectedVec +copy_2_immutables_unmasked $1..2 = i4..5 [0, 0x3F800000 (1.0)] +copy_4_immutables_unmasked $3..6 = i0..3 [0x3F800000 (1.0), 0, 0, 0] swizzle_2 $3..4 = ($3..4).yx cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0 -copy_constant $2 = 0x3F800000 (1.0) -copy_constant $3 = 0 -copy_4_slots_unmasked $4..7 = expectedVec +copy_3_immutables_unmasked $1..3 = i6..8 [0, 0x3F800000 (1.0), 0] +copy_4_immutables_unmasked $4..7 = i0..3 [0x3F800000 (1.0), 0, 0, 0] swizzle_3 $4..6 = ($4..6).zxy cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0x3F800000 (1.0) -splat_3_constants $2..4 = 0 -copy_4_slots_unmasked $5..8 = expectedVec +copy_4_immutables_unmasked $1..4 = i0..3 [0x3F800000 (1.0), 0, 0, 0] +copy_4_immutables_unmasked $5..8 = i0..3 [0x3F800000 (1.0), 0, 0, 0] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 diff --git a/tests/sksl/intrinsics/Normalize.wgsl b/tests/sksl/intrinsics/Normalize.wgsl index 9755bc340097..a77fb1ca66c8 100644 --- a/tests/sksl/intrinsics/Normalize.wgsl +++ b/tests/sksl/intrinsics/Normalize.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -19,7 +20,7 @@ fn main(_skParam0: vec2) -> vec4 { let _skTemp1 = normalize(_globalUniforms.inputVal.xy); let _skTemp2 = normalize(_globalUniforms.inputVal.xyz); let _skTemp3 = normalize(_globalUniforms.inputVal); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((_skTemp0 == expectedVec.x && all(_skTemp1 == expectedVec.xy)) && all(_skTemp2 == expectedVec.xyz)) && all(_skTemp3 == expectedVec)) && 1.0 == expectedVec.x) && all(vec2(0.0, 1.0) == expectedVec.yx)) && all(vec3(0.0, 1.0, 0.0) == expectedVec.zxy)) && all(vec4(1.0, 0.0, 0.0, 0.0) == expectedVec))); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((_skTemp0 == expectedVec.x) && all(_skTemp1 == expectedVec.xy)) && all(_skTemp2 == expectedVec.xyz)) && all(_skTemp3 == expectedVec)) && (1.0 == expectedVec.x)) && all(vec2(0.0, 1.0) == expectedVec.yx)) && all(vec3(0.0, 1.0, 0.0) == expectedVec.zxy)) && all(vec4(1.0, 0.0, 0.0, 0.0) == expectedVec))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/intrinsics/Not.asm.frag b/tests/sksl/intrinsics/Not.asm.frag index 3a8121c9242a..9f947da0c375 100644 --- a/tests/sksl/intrinsics/Not.asm.frag +++ b/tests/sksl/intrinsics/Not.asm.frag @@ -1,156 +1,156 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %inputVal "inputVal" -OpName %expected "expected" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %33 RelaxedPrecision -OpDecorate %34 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %91 RelaxedPrecision -OpDecorate %94 RelaxedPrecision -OpDecorate %95 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %inputVal "inputVal" + OpName %expected "expected" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %33 RelaxedPrecision + OpDecorate %34 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %91 RelaxedPrecision + OpDecorate %94 RelaxedPrecision + OpDecorate %95 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%v4bool = OpTypeVector %bool 4 + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %v4bool = OpTypeVector %bool 4 %_ptr_Function_v4bool = OpTypePointer Function %v4bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%true = OpConstantTrue %bool -%false = OpConstantFalse %bool -%46 = OpConstantComposite %v4bool %true %false %true %false -%v2bool = OpTypeVector %bool 2 -%v3bool = OpTypeVector %bool 3 -%70 = OpConstantComposite %v2bool %true %false -%77 = OpConstantComposite %v3bool %true %false %true + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %true = OpConstantTrue %bool + %false = OpConstantFalse %bool + %46 = OpConstantComposite %v4bool %true %false %true %false + %v2bool = OpTypeVector %bool 2 + %v3bool = OpTypeVector %bool 3 + %70 = OpConstantComposite %v2bool %true %false + %77 = OpConstantComposite %v3bool %true %false %true %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_1 = OpConstant %int 1 + %int_1 = OpConstant %int 1 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%inputVal = OpVariable %_ptr_Function_v4bool Function -%expected = OpVariable %_ptr_Function_v4bool Function -%85 = OpVariable %_ptr_Function_v4float Function -%29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%33 = OpLoad %v4float %29 -%34 = OpCompositeExtract %float %33 0 -%35 = OpFUnordNotEqual %bool %34 %float_0 -%36 = OpCompositeExtract %float %33 1 -%37 = OpFUnordNotEqual %bool %36 %float_0 -%38 = OpCompositeExtract %float %33 2 -%39 = OpFUnordNotEqual %bool %38 %float_0 -%40 = OpCompositeExtract %float %33 3 -%41 = OpFUnordNotEqual %bool %40 %float_0 -%42 = OpCompositeConstruct %v4bool %35 %37 %39 %41 -OpStore %inputVal %42 -OpStore %expected %46 -%48 = OpVectorShuffle %v2bool %42 %42 0 1 -%47 = OpLogicalNot %v2bool %48 -%50 = OpVectorShuffle %v2bool %46 %46 0 1 -%51 = OpLogicalEqual %v2bool %47 %50 -%52 = OpAll %bool %51 -OpSelectionMerge %54 None -OpBranchConditional %52 %53 %54 -%53 = OpLabel -%56 = OpVectorShuffle %v3bool %42 %42 0 1 2 -%55 = OpLogicalNot %v3bool %56 -%58 = OpVectorShuffle %v3bool %46 %46 0 1 2 -%59 = OpLogicalEqual %v3bool %55 %58 -%60 = OpAll %bool %59 -OpBranch %54 -%54 = OpLabel -%61 = OpPhi %bool %false %25 %60 %53 -OpSelectionMerge %63 None -OpBranchConditional %61 %62 %63 -%62 = OpLabel -%64 = OpLogicalNot %v4bool %42 -%65 = OpLogicalEqual %v4bool %64 %46 -%66 = OpAll %bool %65 -OpBranch %63 -%63 = OpLabel -%67 = OpPhi %bool %false %54 %66 %62 -OpSelectionMerge %69 None -OpBranchConditional %67 %68 %69 -%68 = OpLabel -%71 = OpVectorShuffle %v2bool %46 %46 0 1 -%72 = OpLogicalEqual %v2bool %70 %71 -%73 = OpAll %bool %72 -OpBranch %69 -%69 = OpLabel -%74 = OpPhi %bool %false %63 %73 %68 -OpSelectionMerge %76 None -OpBranchConditional %74 %75 %76 -%75 = OpLabel -%78 = OpVectorShuffle %v3bool %46 %46 0 1 2 -%79 = OpLogicalEqual %v3bool %77 %78 -%80 = OpAll %bool %79 -OpBranch %76 -%76 = OpLabel -%81 = OpPhi %bool %false %69 %80 %75 -OpSelectionMerge %83 None -OpBranchConditional %81 %82 %83 -%82 = OpLabel -OpBranch %83 -%83 = OpLabel -%84 = OpPhi %bool %false %76 %true %82 -OpSelectionMerge %89 None -OpBranchConditional %84 %87 %88 -%87 = OpLabel -%90 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%91 = OpLoad %v4float %90 -OpStore %85 %91 -OpBranch %89 -%88 = OpLabel -%92 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%94 = OpLoad %v4float %92 -OpStore %85 %94 -OpBranch %89 -%89 = OpLabel -%95 = OpLoad %v4float %85 -OpReturnValue %95 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %inputVal = OpVariable %_ptr_Function_v4bool Function + %expected = OpVariable %_ptr_Function_v4bool Function + %85 = OpVariable %_ptr_Function_v4float Function + %29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %33 = OpLoad %v4float %29 + %34 = OpCompositeExtract %float %33 0 + %35 = OpFUnordNotEqual %bool %34 %float_0 + %36 = OpCompositeExtract %float %33 1 + %37 = OpFUnordNotEqual %bool %36 %float_0 + %38 = OpCompositeExtract %float %33 2 + %39 = OpFUnordNotEqual %bool %38 %float_0 + %40 = OpCompositeExtract %float %33 3 + %41 = OpFUnordNotEqual %bool %40 %float_0 + %42 = OpCompositeConstruct %v4bool %35 %37 %39 %41 + OpStore %inputVal %42 + OpStore %expected %46 + %48 = OpVectorShuffle %v2bool %42 %42 0 1 + %47 = OpLogicalNot %v2bool %48 + %50 = OpVectorShuffle %v2bool %46 %46 0 1 + %51 = OpLogicalEqual %v2bool %47 %50 + %52 = OpAll %bool %51 + OpSelectionMerge %54 None + OpBranchConditional %52 %53 %54 + %53 = OpLabel + %56 = OpVectorShuffle %v3bool %42 %42 0 1 2 + %55 = OpLogicalNot %v3bool %56 + %58 = OpVectorShuffle %v3bool %46 %46 0 1 2 + %59 = OpLogicalEqual %v3bool %55 %58 + %60 = OpAll %bool %59 + OpBranch %54 + %54 = OpLabel + %61 = OpPhi %bool %false %25 %60 %53 + OpSelectionMerge %63 None + OpBranchConditional %61 %62 %63 + %62 = OpLabel + %64 = OpLogicalNot %v4bool %42 + %65 = OpLogicalEqual %v4bool %64 %46 + %66 = OpAll %bool %65 + OpBranch %63 + %63 = OpLabel + %67 = OpPhi %bool %false %54 %66 %62 + OpSelectionMerge %69 None + OpBranchConditional %67 %68 %69 + %68 = OpLabel + %71 = OpVectorShuffle %v2bool %46 %46 0 1 + %72 = OpLogicalEqual %v2bool %70 %71 + %73 = OpAll %bool %72 + OpBranch %69 + %69 = OpLabel + %74 = OpPhi %bool %false %63 %73 %68 + OpSelectionMerge %76 None + OpBranchConditional %74 %75 %76 + %75 = OpLabel + %78 = OpVectorShuffle %v3bool %46 %46 0 1 2 + %79 = OpLogicalEqual %v3bool %77 %78 + %80 = OpAll %bool %79 + OpBranch %76 + %76 = OpLabel + %81 = OpPhi %bool %false %69 %80 %75 + OpSelectionMerge %83 None + OpBranchConditional %81 %82 %83 + %82 = OpLabel + OpBranch %83 + %83 = OpLabel + %84 = OpPhi %bool %false %76 %true %82 + OpSelectionMerge %89 None + OpBranchConditional %84 %87 %88 + %87 = OpLabel + %90 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %91 = OpLoad %v4float %90 + OpStore %85 %91 + OpBranch %89 + %88 = OpLabel + %92 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %94 = OpLoad %v4float %92 + OpStore %85 %94 + OpBranch %89 + %89 = OpLabel + %95 = OpLoad %v4float %85 + OpReturnValue %95 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Not.skrp b/tests/sksl/intrinsics/Not.skrp index 5b162ca1f124..7e979be7212a 100644 --- a/tests/sksl/intrinsics/Not.skrp +++ b/tests/sksl/intrinsics/Not.skrp @@ -1,8 +1,10 @@ +50 instructions + [immutable slots] -expected(0) = 0xFFFFFFFF -expected(1) = 0 -expected(2) = 0xFFFFFFFF -expected(3) = 0 +i0 = 0xFFFFFFFF +i1 = 0 +i2 = 0xFFFFFFFF +i3 = 0 store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -13,13 +15,13 @@ copy_4_slots_unmasked inputVal = $0..3 copy_2_slots_unmasked $0..1 = inputVal(0..1) splat_2_constants $2..3 = 0xFFFFFFFF bitwise_xor_2_ints $0..1 ^= $2..3 -copy_2_slots_unmasked $2..3 = expected(0..1) +copy_2_immutables_unmasked $2..3 = i0..1 [0xFFFFFFFF, 0] cmpeq_2_ints $0..1 = equal($0..1, $2..3) bitwise_and_int $0 &= $1 copy_3_slots_unmasked $1..3 = inputVal(0..2) splat_3_constants $4..6 = 0xFFFFFFFF bitwise_xor_3_ints $1..3 ^= $4..6 -copy_3_slots_unmasked $4..6 = expected(0..2) +copy_3_immutables_unmasked $4..6 = i0..2 [0xFFFFFFFF, 0, 0xFFFFFFFF] cmpeq_3_ints $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 @@ -27,30 +29,24 @@ bitwise_and_int $0 &= $1 copy_4_slots_unmasked $1..4 = inputVal splat_4_constants $5..8 = 0xFFFFFFFF bitwise_xor_4_ints $1..4 ^= $5..8 -copy_4_slots_unmasked $5..8 = expected +copy_4_immutables_unmasked $5..8 = i0..3 [0xFFFFFFFF, 0, 0xFFFFFFFF, 0] cmpeq_4_ints $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0xFFFFFFFF -copy_constant $2 = 0 -copy_2_slots_unmasked $3..4 = expected(0..1) +copy_2_immutables_unmasked $1..2 = i0..1 [0xFFFFFFFF, 0] +copy_2_immutables_unmasked $3..4 = i0..1 [0xFFFFFFFF, 0] cmpeq_2_ints $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0xFFFFFFFF -copy_constant $2 = 0 -copy_constant $3 = 0xFFFFFFFF -copy_3_slots_unmasked $4..6 = expected(0..2) +copy_3_immutables_unmasked $1..3 = i0..2 [0xFFFFFFFF, 0, 0xFFFFFFFF] +copy_3_immutables_unmasked $4..6 = i0..2 [0xFFFFFFFF, 0, 0xFFFFFFFF] cmpeq_3_ints $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0xFFFFFFFF -copy_constant $2 = 0 -copy_constant $3 = 0xFFFFFFFF -copy_constant $4 = 0 -copy_4_slots_unmasked $5..8 = expected +copy_4_immutables_unmasked $1..4 = i0..3 [0xFFFFFFFF, 0, 0xFFFFFFFF, 0] +copy_4_immutables_unmasked $5..8 = i0..3 [0xFFFFFFFF, 0, 0xFFFFFFFF, 0] cmpeq_4_ints $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 diff --git a/tests/sksl/intrinsics/Not.wgsl b/tests/sksl/intrinsics/Not.wgsl index 47ca292298e9..43c8f55acb1b 100644 --- a/tests/sksl/intrinsics/Not.wgsl +++ b/tests/sksl/intrinsics/Not.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -15,7 +16,7 @@ fn main(_skParam0: vec2) -> vec4 { { var inputVal: vec4 = vec4(_globalUniforms.colorGreen); var expected: vec4 = vec4(true, false, true, false); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((all(!inputVal.xy == expected.xy) && all(!inputVal.xyz == expected.xyz)) && all(!inputVal == expected)) && all(vec2(true, false) == expected.xy)) && all(vec3(true, false, true) == expected.xyz)) && all(vec4(true, false, true, false) == expected))); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((all((!inputVal.xy) == expected.xy) && all((!inputVal.xyz) == expected.xyz)) && all((!inputVal) == expected)) && all(vec2(true, false) == expected.xy)) && all(vec3(true, false, true) == expected.xyz)) && all(vec4(true, false, true, false) == expected))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/intrinsics/NotEqual.asm.frag b/tests/sksl/intrinsics/NotEqual.asm.frag index 432060e0a192..e6dbd79125d1 100644 --- a/tests/sksl/intrinsics/NotEqual.asm.frag +++ b/tests/sksl/intrinsics/NotEqual.asm.frag @@ -1,126 +1,126 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "a" -OpMemberName %_UniformBuffer 1 "b" -OpMemberName %_UniformBuffer 2 "c" -OpMemberName %_UniformBuffer 3 "d" -OpMemberName %_UniformBuffer 4 "e" -OpMemberName %_UniformBuffer 5 "f" -OpName %main "main" -OpName %expectFFTT "expectFFTT" -OpName %expectTTFF "expectTTFF" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 3 Offset 40 -OpMemberDecorate %_UniformBuffer 4 Offset 48 -OpMemberDecorate %_UniformBuffer 5 Offset 64 -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %32 RelaxedPrecision -OpDecorate %35 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %65 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %75 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "a" + OpMemberName %_UniformBuffer 1 "b" + OpMemberName %_UniformBuffer 2 "c" + OpMemberName %_UniformBuffer 3 "d" + OpMemberName %_UniformBuffer 4 "e" + OpMemberName %_UniformBuffer 5 "f" + OpName %main "main" + OpName %expectFFTT "expectFFTT" + OpName %expectTTFF "expectTTFF" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 3 Offset 40 + OpMemberDecorate %_UniformBuffer 4 Offset 48 + OpMemberDecorate %_UniformBuffer 5 Offset 64 + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %32 RelaxedPrecision + OpDecorate %35 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %65 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %75 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%uint = OpTypeInt 32 0 -%v2uint = OpTypeVector %uint 2 -%int = OpTypeInt 32 1 -%v3int = OpTypeVector %int 3 + %uint = OpTypeInt 32 0 + %v2uint = OpTypeVector %uint 2 + %int = OpTypeInt 32 1 + %v3int = OpTypeVector %int 3 %_UniformBuffer = OpTypeStruct %v4float %v4float %v2uint %v2uint %v3int %v3int %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%18 = OpTypeFunction %void -%v4bool = OpTypeVector %bool 4 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %18 = OpTypeFunction %void + %v4bool = OpTypeVector %bool 4 %_ptr_Function_v4bool = OpTypePointer Function %v4bool -%false = OpConstantFalse %bool -%true = OpConstantTrue %bool -%25 = OpConstantComposite %v4bool %false %false %true %true -%27 = OpConstantComposite %v4bool %true %true %false %false + %false = OpConstantFalse %bool + %true = OpConstantTrue %bool + %25 = OpConstantComposite %v4bool %false %false %true %true + %27 = OpConstantComposite %v4bool %true %true %false %false %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 %_ptr_Output_float = OpTypePointer Output %float %_ptr_Uniform_v2uint = OpTypePointer Uniform %v2uint -%int_2 = OpConstant %int 2 -%int_3 = OpConstant %int 3 -%v2bool = OpTypeVector %bool 2 + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 + %v2bool = OpTypeVector %bool 2 %_ptr_Uniform_v3int = OpTypePointer Uniform %v3int -%int_4 = OpConstant %int 4 -%int_5 = OpConstant %int 5 -%v3bool = OpTypeVector %bool 3 -%main = OpFunction %void None %18 -%19 = OpLabel -%expectFFTT = OpVariable %_ptr_Function_v4bool Function -%expectTTFF = OpVariable %_ptr_Function_v4bool Function -OpStore %expectFFTT %25 -OpStore %expectTTFF %27 -%29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %29 -%33 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%35 = OpLoad %v4float %33 -%28 = OpFUnordNotEqual %v4bool %32 %35 -%36 = OpCompositeExtract %bool %28 0 -%37 = OpSelect %int %36 %int_1 %int_0 -%38 = OpConvertSToF %float %37 -%39 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 -OpStore %39 %38 -%42 = OpAccessChain %_ptr_Uniform_v2uint %10 %int_2 -%45 = OpLoad %v2uint %42 -%46 = OpAccessChain %_ptr_Uniform_v2uint %10 %int_3 -%48 = OpLoad %v2uint %46 -%41 = OpINotEqual %v2bool %45 %48 -%50 = OpCompositeExtract %bool %41 1 -%51 = OpSelect %int %50 %int_1 %int_0 -%52 = OpConvertSToF %float %51 -%53 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_1 -OpStore %53 %52 -%55 = OpAccessChain %_ptr_Uniform_v3int %10 %int_4 -%58 = OpLoad %v3int %55 -%59 = OpAccessChain %_ptr_Uniform_v3int %10 %int_5 -%61 = OpLoad %v3int %59 -%54 = OpINotEqual %v3bool %58 %61 -%63 = OpCompositeExtract %bool %54 2 -%64 = OpSelect %int %63 %int_1 %int_0 -%65 = OpConvertSToF %float %64 -%66 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_2 -OpStore %66 %65 -%68 = OpLoad %v4bool %expectTTFF -%67 = OpAny %bool %68 -OpSelectionMerge %70 None -OpBranchConditional %67 %70 %69 -%69 = OpLabel -%72 = OpLoad %v4bool %expectFFTT -%71 = OpAny %bool %72 -OpBranch %70 -%70 = OpLabel -%73 = OpPhi %bool %true %19 %71 %69 -%74 = OpSelect %int %73 %int_1 %int_0 -%75 = OpConvertSToF %float %74 -%76 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_3 -OpStore %76 %75 -OpReturn -OpFunctionEnd + %int_4 = OpConstant %int 4 + %int_5 = OpConstant %int 5 + %v3bool = OpTypeVector %bool 3 + %main = OpFunction %void None %18 + %19 = OpLabel + %expectFFTT = OpVariable %_ptr_Function_v4bool Function + %expectTTFF = OpVariable %_ptr_Function_v4bool Function + OpStore %expectFFTT %25 + OpStore %expectTTFF %27 + %29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %29 + %33 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %35 = OpLoad %v4float %33 + %28 = OpFUnordNotEqual %v4bool %32 %35 + %36 = OpCompositeExtract %bool %28 0 + %37 = OpSelect %int %36 %int_1 %int_0 + %38 = OpConvertSToF %float %37 + %39 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 + OpStore %39 %38 + %42 = OpAccessChain %_ptr_Uniform_v2uint %10 %int_2 + %45 = OpLoad %v2uint %42 + %46 = OpAccessChain %_ptr_Uniform_v2uint %10 %int_3 + %48 = OpLoad %v2uint %46 + %41 = OpINotEqual %v2bool %45 %48 + %50 = OpCompositeExtract %bool %41 1 + %51 = OpSelect %int %50 %int_1 %int_0 + %52 = OpConvertSToF %float %51 + %53 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_1 + OpStore %53 %52 + %55 = OpAccessChain %_ptr_Uniform_v3int %10 %int_4 + %58 = OpLoad %v3int %55 + %59 = OpAccessChain %_ptr_Uniform_v3int %10 %int_5 + %61 = OpLoad %v3int %59 + %54 = OpINotEqual %v3bool %58 %61 + %63 = OpCompositeExtract %bool %54 2 + %64 = OpSelect %int %63 %int_1 %int_0 + %65 = OpConvertSToF %float %64 + %66 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_2 + OpStore %66 %65 + %68 = OpLoad %v4bool %expectTTFF + %67 = OpAny %bool %68 + OpSelectionMerge %70 None + OpBranchConditional %67 %70 %69 + %69 = OpLabel + %72 = OpLoad %v4bool %expectFFTT + %71 = OpAny %bool %72 + OpBranch %70 + %70 = OpLabel + %73 = OpPhi %bool %true %19 %71 %69 + %74 = OpSelect %int %73 %int_1 %int_0 + %75 = OpConvertSToF %float %74 + %76 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_3 + OpStore %76 %75 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/intrinsics/NotEqual.wgsl b/tests/sksl/intrinsics/NotEqual.wgsl index 8898b1667773..92c25c45307a 100644 --- a/tests/sksl/intrinsics/NotEqual.wgsl +++ b/tests/sksl/intrinsics/NotEqual.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/intrinsics/OuterProduct.asm.frag b/tests/sksl/intrinsics/OuterProduct.asm.frag index 3d2bd7feb46d..fbb38f2af0dc 100644 --- a/tests/sksl/intrinsics/OuterProduct.asm.frag +++ b/tests/sksl/intrinsics/OuterProduct.asm.frag @@ -1,273 +1,273 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpMemberName %_UniformBuffer 2 "testMatrix2x2" -OpMemberName %_UniformBuffer 3 "testMatrix3x3" -OpMemberName %_UniformBuffer 4 "testInputs" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 ColMajor -OpMemberDecorate %_UniformBuffer 2 MatrixStride 16 -OpMemberDecorate %_UniformBuffer 3 Offset 64 -OpMemberDecorate %_UniformBuffer 3 ColMajor -OpMemberDecorate %_UniformBuffer 3 MatrixStride 16 -OpMemberDecorate %_UniformBuffer 4 Offset 112 -OpMemberDecorate %_UniformBuffer 4 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %119 RelaxedPrecision -OpDecorate %123 RelaxedPrecision -OpDecorate %159 RelaxedPrecision -OpDecorate %175 RelaxedPrecision -OpDecorate %203 RelaxedPrecision -OpDecorate %205 RelaxedPrecision -OpDecorate %206 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpMemberName %_UniformBuffer 2 "testMatrix2x2" + OpMemberName %_UniformBuffer 3 "testMatrix3x3" + OpMemberName %_UniformBuffer 4 "testInputs" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 ColMajor + OpMemberDecorate %_UniformBuffer 2 MatrixStride 16 + OpMemberDecorate %_UniformBuffer 3 Offset 64 + OpMemberDecorate %_UniformBuffer 3 ColMajor + OpMemberDecorate %_UniformBuffer 3 MatrixStride 16 + OpMemberDecorate %_UniformBuffer 4 Offset 112 + OpMemberDecorate %_UniformBuffer 4 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %119 RelaxedPrecision + OpDecorate %123 RelaxedPrecision + OpDecorate %159 RelaxedPrecision + OpDecorate %175 RelaxedPrecision + OpDecorate %203 RelaxedPrecision + OpDecorate %205 RelaxedPrecision + OpDecorate %206 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%v2float = OpTypeVector %float 2 + %v2float = OpTypeVector %float 2 %mat2v2float = OpTypeMatrix %v2float 2 -%v3float = OpTypeVector %float 3 + %v3float = OpTypeVector %float 3 %mat3v3float = OpTypeMatrix %v3float 3 %_UniformBuffer = OpTypeStruct %v4float %v4float %mat2v2float %mat3v3float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%19 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%22 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %19 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %22 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%26 = OpTypeFunction %v4float %_ptr_Function_v2float -%false = OpConstantFalse %bool + %26 = OpTypeFunction %v4float %_ptr_Function_v2float + %false = OpConstantFalse %bool %_ptr_Uniform_mat2v2float = OpTypePointer Uniform %mat2v2float -%int = OpTypeInt 32 1 -%int_2 = OpConstant %int 2 -%int_0 = OpConstant %int 0 + %int = OpTypeInt 32 1 + %int_2 = OpConstant %int 2 + %int_0 = OpConstant %int 0 %_ptr_Uniform_v2float = OpTypePointer Uniform %v2float -%int_1 = OpConstant %int 1 -%float_3 = OpConstant %float 3 -%float_6 = OpConstant %float 6 -%float_4 = OpConstant %float 4 -%float_8 = OpConstant %float 8 -%47 = OpConstantComposite %v2float %float_3 %float_6 -%48 = OpConstantComposite %v2float %float_4 %float_8 -%49 = OpConstantComposite %mat2v2float %47 %48 -%v2bool = OpTypeVector %bool 2 + %int_1 = OpConstant %int 1 + %float_3 = OpConstant %float 3 + %float_6 = OpConstant %float 6 + %float_4 = OpConstant %float 4 + %float_8 = OpConstant %float 8 + %47 = OpConstantComposite %v2float %float_3 %float_6 + %48 = OpConstantComposite %v2float %float_4 %float_8 + %49 = OpConstantComposite %mat2v2float %47 %48 + %v2bool = OpTypeVector %bool 2 %_ptr_Uniform_mat3v3float = OpTypePointer Uniform %mat3v3float -%int_3 = OpConstant %int 3 + %int_3 = OpConstant %int 3 %_ptr_Uniform_v3float = OpTypePointer Uniform %v3float -%float_12 = OpConstant %float 12 -%float_5 = OpConstant %float 5 -%float_10 = OpConstant %float 10 -%float_15 = OpConstant %float 15 -%float_18 = OpConstant %float 18 -%75 = OpConstantComposite %v3float %float_4 %float_8 %float_12 -%76 = OpConstantComposite %v3float %float_5 %float_10 %float_15 -%77 = OpConstantComposite %v3float %float_6 %float_12 %float_18 -%78 = OpConstantComposite %mat3v3float %75 %76 %77 -%v3bool = OpTypeVector %bool 3 + %float_12 = OpConstant %float 12 + %float_5 = OpConstant %float 5 + %float_10 = OpConstant %float 10 + %float_15 = OpConstant %float 15 + %float_18 = OpConstant %float 18 + %75 = OpConstantComposite %v3float %float_4 %float_8 %float_12 + %76 = OpConstantComposite %v3float %float_5 %float_10 %float_15 + %77 = OpConstantComposite %v3float %float_6 %float_12 %float_18 + %78 = OpConstantComposite %mat3v3float %75 %76 %77 + %v3bool = OpTypeVector %bool 3 %mat3v2float = OpTypeMatrix %v2float 3 -%102 = OpConstantComposite %v2float %float_5 %float_10 -%103 = OpConstantComposite %v2float %float_6 %float_12 -%104 = OpConstantComposite %mat3v2float %48 %102 %103 + %102 = OpConstantComposite %v2float %float_5 %float_10 + %103 = OpConstantComposite %v2float %float_6 %float_12 + %104 = OpConstantComposite %mat3v2float %48 %102 %103 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_4 = OpConstant %int 4 -%float_1 = OpConstant %float 1 -%float_2 = OpConstant %float 2 -%126 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_2 + %int_4 = OpConstant %int 4 + %float_1 = OpConstant %float 1 + %float_2 = OpConstant %float 2 + %126 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_2 %mat4v4float = OpTypeMatrix %v4float 4 %float_n1_25 = OpConstant %float -1.25 -%float_0_75 = OpConstant %float 0.75 -%float_2_25 = OpConstant %float 2.25 -%float_n2_5 = OpConstant %float -2.5 -%float_1_5 = OpConstant %float 1.5 -%float_4_5 = OpConstant %float 4.5 -%134 = OpConstantComposite %v4float %float_n1_25 %float_0 %float_0_75 %float_2_25 -%135 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 -%136 = OpConstantComposite %v4float %float_n2_5 %float_0 %float_1_5 %float_4_5 -%137 = OpConstantComposite %mat4v4float %134 %135 %135 %136 -%v4bool = OpTypeVector %bool 4 -%160 = OpConstantComposite %v2float %float_1 %float_2 + %float_0_75 = OpConstant %float 0.75 + %float_2_25 = OpConstant %float 2.25 + %float_n2_5 = OpConstant %float -2.5 + %float_1_5 = OpConstant %float 1.5 + %float_4_5 = OpConstant %float 4.5 + %134 = OpConstantComposite %v4float %float_n1_25 %float_0 %float_0_75 %float_2_25 + %135 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %136 = OpConstantComposite %v4float %float_n2_5 %float_0 %float_1_5 %float_4_5 + %137 = OpConstantComposite %mat4v4float %134 %135 %135 %136 + %v4bool = OpTypeVector %bool 4 + %160 = OpConstantComposite %v2float %float_1 %float_2 %mat2v4float = OpTypeMatrix %v4float 2 -%162 = OpConstantComposite %mat2v4float %134 %136 + %162 = OpConstantComposite %mat2v4float %134 %136 %mat4v2float = OpTypeMatrix %v2float 4 -%177 = OpConstantComposite %v2float %float_n1_25 %float_n2_5 -%178 = OpConstantComposite %v2float %float_0_75 %float_1_5 -%179 = OpConstantComposite %v2float %float_2_25 %float_4_5 -%180 = OpConstantComposite %mat4v2float %177 %22 %178 %179 + %177 = OpConstantComposite %v2float %float_n1_25 %float_n2_5 + %178 = OpConstantComposite %v2float %float_0_75 %float_1_5 + %179 = OpConstantComposite %v2float %float_2_25 %float_4_5 + %180 = OpConstantComposite %mat4v2float %177 %22 %178 %179 %_ptr_Function_v4float = OpTypePointer Function %v4float %_entrypoint_v = OpFunction %void None %19 -%20 = OpLabel -%23 = OpVariable %_ptr_Function_v2float Function -OpStore %23 %22 -%25 = OpFunctionCall %v4float %main %23 -OpStore %sk_FragColor %25 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %26 -%27 = OpFunctionParameter %_ptr_Function_v2float -%28 = OpLabel -%197 = OpVariable %_ptr_Function_v4float Function -%31 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2 -%36 = OpAccessChain %_ptr_Uniform_v2float %31 %int_0 -%38 = OpLoad %v2float %36 -%39 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2 -%41 = OpAccessChain %_ptr_Uniform_v2float %39 %int_1 -%42 = OpLoad %v2float %41 -%30 = OpOuterProduct %mat2v2float %38 %42 -%51 = OpCompositeExtract %v2float %30 0 -%52 = OpFOrdEqual %v2bool %51 %47 -%53 = OpAll %bool %52 -%54 = OpCompositeExtract %v2float %30 1 -%55 = OpFOrdEqual %v2bool %54 %48 -%56 = OpAll %bool %55 -%57 = OpLogicalAnd %bool %53 %56 -OpSelectionMerge %59 None -OpBranchConditional %57 %58 %59 -%58 = OpLabel -%61 = OpAccessChain %_ptr_Uniform_mat3v3float %10 %int_3 -%64 = OpAccessChain %_ptr_Uniform_v3float %61 %int_0 -%66 = OpLoad %v3float %64 -%67 = OpAccessChain %_ptr_Uniform_mat3v3float %10 %int_3 -%68 = OpAccessChain %_ptr_Uniform_v3float %67 %int_1 -%69 = OpLoad %v3float %68 -%60 = OpOuterProduct %mat3v3float %66 %69 -%80 = OpCompositeExtract %v3float %60 0 -%81 = OpFOrdEqual %v3bool %80 %75 -%82 = OpAll %bool %81 -%83 = OpCompositeExtract %v3float %60 1 -%84 = OpFOrdEqual %v3bool %83 %76 -%85 = OpAll %bool %84 -%86 = OpLogicalAnd %bool %82 %85 -%87 = OpCompositeExtract %v3float %60 2 -%88 = OpFOrdEqual %v3bool %87 %77 -%89 = OpAll %bool %88 -%90 = OpLogicalAnd %bool %86 %89 -OpBranch %59 -%59 = OpLabel -%91 = OpPhi %bool %false %28 %90 %58 -OpSelectionMerge %93 None -OpBranchConditional %91 %92 %93 -%92 = OpLabel -%95 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2 -%96 = OpAccessChain %_ptr_Uniform_v2float %95 %int_0 -%97 = OpLoad %v2float %96 -%98 = OpAccessChain %_ptr_Uniform_mat3v3float %10 %int_3 -%99 = OpAccessChain %_ptr_Uniform_v3float %98 %int_1 -%100 = OpLoad %v3float %99 -%94 = OpOuterProduct %mat3v2float %97 %100 -%105 = OpCompositeExtract %v2float %94 0 -%106 = OpFOrdEqual %v2bool %105 %48 -%107 = OpAll %bool %106 -%108 = OpCompositeExtract %v2float %94 1 -%109 = OpFOrdEqual %v2bool %108 %102 -%110 = OpAll %bool %109 -%111 = OpLogicalAnd %bool %107 %110 -%112 = OpCompositeExtract %v2float %94 2 -%113 = OpFOrdEqual %v2bool %112 %103 -%114 = OpAll %bool %113 -%115 = OpLogicalAnd %bool %111 %114 -OpBranch %93 -%93 = OpLabel -%116 = OpPhi %bool %false %59 %115 %92 -OpSelectionMerge %118 None -OpBranchConditional %116 %117 %118 -%117 = OpLabel -%120 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 -%123 = OpLoad %v4float %120 -%119 = OpOuterProduct %mat4v4float %123 %126 -%139 = OpCompositeExtract %v4float %119 0 -%140 = OpFOrdEqual %v4bool %139 %134 -%141 = OpAll %bool %140 -%142 = OpCompositeExtract %v4float %119 1 -%143 = OpFOrdEqual %v4bool %142 %135 -%144 = OpAll %bool %143 -%145 = OpLogicalAnd %bool %141 %144 -%146 = OpCompositeExtract %v4float %119 2 -%147 = OpFOrdEqual %v4bool %146 %135 -%148 = OpAll %bool %147 -%149 = OpLogicalAnd %bool %145 %148 -%150 = OpCompositeExtract %v4float %119 3 -%151 = OpFOrdEqual %v4bool %150 %136 -%152 = OpAll %bool %151 -%153 = OpLogicalAnd %bool %149 %152 -OpBranch %118 -%118 = OpLabel -%154 = OpPhi %bool %false %93 %153 %117 -OpSelectionMerge %156 None -OpBranchConditional %154 %155 %156 -%155 = OpLabel -%158 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 -%159 = OpLoad %v4float %158 -%157 = OpOuterProduct %mat2v4float %159 %160 -%163 = OpCompositeExtract %v4float %157 0 -%164 = OpFOrdEqual %v4bool %163 %134 -%165 = OpAll %bool %164 -%166 = OpCompositeExtract %v4float %157 1 -%167 = OpFOrdEqual %v4bool %166 %136 -%168 = OpAll %bool %167 -%169 = OpLogicalAnd %bool %165 %168 -OpBranch %156 -%156 = OpLabel -%170 = OpPhi %bool %false %118 %169 %155 -OpSelectionMerge %172 None -OpBranchConditional %170 %171 %172 -%171 = OpLabel -%174 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 -%175 = OpLoad %v4float %174 -%173 = OpOuterProduct %mat4v2float %160 %175 -%181 = OpCompositeExtract %v2float %173 0 -%182 = OpFOrdEqual %v2bool %181 %177 -%183 = OpAll %bool %182 -%184 = OpCompositeExtract %v2float %173 1 -%185 = OpFOrdEqual %v2bool %184 %22 -%186 = OpAll %bool %185 -%187 = OpLogicalAnd %bool %183 %186 -%188 = OpCompositeExtract %v2float %173 2 -%189 = OpFOrdEqual %v2bool %188 %178 -%190 = OpAll %bool %189 -%191 = OpLogicalAnd %bool %187 %190 -%192 = OpCompositeExtract %v2float %173 3 -%193 = OpFOrdEqual %v2bool %192 %179 -%194 = OpAll %bool %193 -%195 = OpLogicalAnd %bool %191 %194 -OpBranch %172 -%172 = OpLabel -%196 = OpPhi %bool %false %156 %195 %171 -OpSelectionMerge %201 None -OpBranchConditional %196 %199 %200 -%199 = OpLabel -%202 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%203 = OpLoad %v4float %202 -OpStore %197 %203 -OpBranch %201 -%200 = OpLabel -%204 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%205 = OpLoad %v4float %204 -OpStore %197 %205 -OpBranch %201 -%201 = OpLabel -%206 = OpLoad %v4float %197 -OpReturnValue %206 -OpFunctionEnd + %20 = OpLabel + %23 = OpVariable %_ptr_Function_v2float Function + OpStore %23 %22 + %25 = OpFunctionCall %v4float %main %23 + OpStore %sk_FragColor %25 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %26 + %27 = OpFunctionParameter %_ptr_Function_v2float + %28 = OpLabel + %197 = OpVariable %_ptr_Function_v4float Function + %31 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2 + %36 = OpAccessChain %_ptr_Uniform_v2float %31 %int_0 + %38 = OpLoad %v2float %36 + %39 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2 + %41 = OpAccessChain %_ptr_Uniform_v2float %39 %int_1 + %42 = OpLoad %v2float %41 + %30 = OpOuterProduct %mat2v2float %38 %42 + %51 = OpCompositeExtract %v2float %30 0 + %52 = OpFOrdEqual %v2bool %51 %47 + %53 = OpAll %bool %52 + %54 = OpCompositeExtract %v2float %30 1 + %55 = OpFOrdEqual %v2bool %54 %48 + %56 = OpAll %bool %55 + %57 = OpLogicalAnd %bool %53 %56 + OpSelectionMerge %59 None + OpBranchConditional %57 %58 %59 + %58 = OpLabel + %61 = OpAccessChain %_ptr_Uniform_mat3v3float %10 %int_3 + %64 = OpAccessChain %_ptr_Uniform_v3float %61 %int_0 + %66 = OpLoad %v3float %64 + %67 = OpAccessChain %_ptr_Uniform_mat3v3float %10 %int_3 + %68 = OpAccessChain %_ptr_Uniform_v3float %67 %int_1 + %69 = OpLoad %v3float %68 + %60 = OpOuterProduct %mat3v3float %66 %69 + %80 = OpCompositeExtract %v3float %60 0 + %81 = OpFOrdEqual %v3bool %80 %75 + %82 = OpAll %bool %81 + %83 = OpCompositeExtract %v3float %60 1 + %84 = OpFOrdEqual %v3bool %83 %76 + %85 = OpAll %bool %84 + %86 = OpLogicalAnd %bool %82 %85 + %87 = OpCompositeExtract %v3float %60 2 + %88 = OpFOrdEqual %v3bool %87 %77 + %89 = OpAll %bool %88 + %90 = OpLogicalAnd %bool %86 %89 + OpBranch %59 + %59 = OpLabel + %91 = OpPhi %bool %false %28 %90 %58 + OpSelectionMerge %93 None + OpBranchConditional %91 %92 %93 + %92 = OpLabel + %95 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2 + %96 = OpAccessChain %_ptr_Uniform_v2float %95 %int_0 + %97 = OpLoad %v2float %96 + %98 = OpAccessChain %_ptr_Uniform_mat3v3float %10 %int_3 + %99 = OpAccessChain %_ptr_Uniform_v3float %98 %int_1 + %100 = OpLoad %v3float %99 + %94 = OpOuterProduct %mat3v2float %97 %100 + %105 = OpCompositeExtract %v2float %94 0 + %106 = OpFOrdEqual %v2bool %105 %48 + %107 = OpAll %bool %106 + %108 = OpCompositeExtract %v2float %94 1 + %109 = OpFOrdEqual %v2bool %108 %102 + %110 = OpAll %bool %109 + %111 = OpLogicalAnd %bool %107 %110 + %112 = OpCompositeExtract %v2float %94 2 + %113 = OpFOrdEqual %v2bool %112 %103 + %114 = OpAll %bool %113 + %115 = OpLogicalAnd %bool %111 %114 + OpBranch %93 + %93 = OpLabel + %116 = OpPhi %bool %false %59 %115 %92 + OpSelectionMerge %118 None + OpBranchConditional %116 %117 %118 + %117 = OpLabel + %120 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 + %123 = OpLoad %v4float %120 + %119 = OpOuterProduct %mat4v4float %123 %126 + %139 = OpCompositeExtract %v4float %119 0 + %140 = OpFOrdEqual %v4bool %139 %134 + %141 = OpAll %bool %140 + %142 = OpCompositeExtract %v4float %119 1 + %143 = OpFOrdEqual %v4bool %142 %135 + %144 = OpAll %bool %143 + %145 = OpLogicalAnd %bool %141 %144 + %146 = OpCompositeExtract %v4float %119 2 + %147 = OpFOrdEqual %v4bool %146 %135 + %148 = OpAll %bool %147 + %149 = OpLogicalAnd %bool %145 %148 + %150 = OpCompositeExtract %v4float %119 3 + %151 = OpFOrdEqual %v4bool %150 %136 + %152 = OpAll %bool %151 + %153 = OpLogicalAnd %bool %149 %152 + OpBranch %118 + %118 = OpLabel + %154 = OpPhi %bool %false %93 %153 %117 + OpSelectionMerge %156 None + OpBranchConditional %154 %155 %156 + %155 = OpLabel + %158 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 + %159 = OpLoad %v4float %158 + %157 = OpOuterProduct %mat2v4float %159 %160 + %163 = OpCompositeExtract %v4float %157 0 + %164 = OpFOrdEqual %v4bool %163 %134 + %165 = OpAll %bool %164 + %166 = OpCompositeExtract %v4float %157 1 + %167 = OpFOrdEqual %v4bool %166 %136 + %168 = OpAll %bool %167 + %169 = OpLogicalAnd %bool %165 %168 + OpBranch %156 + %156 = OpLabel + %170 = OpPhi %bool %false %118 %169 %155 + OpSelectionMerge %172 None + OpBranchConditional %170 %171 %172 + %171 = OpLabel + %174 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 + %175 = OpLoad %v4float %174 + %173 = OpOuterProduct %mat4v2float %160 %175 + %181 = OpCompositeExtract %v2float %173 0 + %182 = OpFOrdEqual %v2bool %181 %177 + %183 = OpAll %bool %182 + %184 = OpCompositeExtract %v2float %173 1 + %185 = OpFOrdEqual %v2bool %184 %22 + %186 = OpAll %bool %185 + %187 = OpLogicalAnd %bool %183 %186 + %188 = OpCompositeExtract %v2float %173 2 + %189 = OpFOrdEqual %v2bool %188 %178 + %190 = OpAll %bool %189 + %191 = OpLogicalAnd %bool %187 %190 + %192 = OpCompositeExtract %v2float %173 3 + %193 = OpFOrdEqual %v2bool %192 %179 + %194 = OpAll %bool %193 + %195 = OpLogicalAnd %bool %191 %194 + OpBranch %172 + %172 = OpLabel + %196 = OpPhi %bool %false %156 %195 %171 + OpSelectionMerge %201 None + OpBranchConditional %196 %199 %200 + %199 = OpLabel + %202 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %203 = OpLoad %v4float %202 + OpStore %197 %203 + OpBranch %201 + %200 = OpLabel + %204 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %205 = OpLoad %v4float %204 + OpStore %197 %205 + OpBranch %201 + %201 = OpLabel + %206 = OpLoad %v4float %197 + OpReturnValue %206 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/OuterProduct.wgsl b/tests/sksl/intrinsics/OuterProduct.wgsl new file mode 100644 index 000000000000..629125feff43 --- /dev/null +++ b/tests/sksl/intrinsics/OuterProduct.wgsl @@ -0,0 +1,55 @@ +### Compilation failed: + +error: :21:20 error: unresolved call target 'outerProduct' + let _skTemp0 = outerProduct(_globalUniforms.testMatrix2x2[0], _globalUniforms.testMatrix2x2[1]); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, + testMatrix2x2: mat2x2, + testMatrix3x3: mat3x3, + testInputs: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + const c12: vec2 = vec2(1.0, 2.0); + let _skTemp0 = outerProduct(_globalUniforms.testMatrix2x2[0], _globalUniforms.testMatrix2x2[1]); + let _skTemp1 = _skTemp0; + let _skTemp2 = mat2x2(3.0, 6.0, 4.0, 8.0); + let _skTemp3 = outerProduct(_globalUniforms.testMatrix3x3[0], _globalUniforms.testMatrix3x3[1]); + let _skTemp4 = _skTemp3; + let _skTemp5 = mat3x3(4.0, 8.0, 12.0, 5.0, 10.0, 15.0, 6.0, 12.0, 18.0); + let _skTemp6 = outerProduct(_globalUniforms.testMatrix2x2[0], _globalUniforms.testMatrix3x3[1]); + let _skTemp7 = _skTemp6; + let _skTemp8 = mat3x2(4.0, 8.0, 5.0, 10.0, 6.0, 12.0); + let _skTemp9 = outerProduct(_globalUniforms.testInputs, vec4(1.0, 0.0, 0.0, 2.0)); + let _skTemp10 = mat4x4(_skTemp9); + let _skTemp11 = mat4x4(-1.25, 0.0, 0.75, 2.25, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -2.5, 0.0, 1.5, 4.5); + let _skTemp12 = outerProduct(vec4(_globalUniforms.testInputs), c12); + let _skTemp13 = _skTemp12; + let _skTemp14 = mat2x4(-1.25, 0.0, 0.75, 2.25, -2.5, 0.0, 1.5, 4.5); + let _skTemp15 = outerProduct(c12, vec4(_globalUniforms.testInputs)); + let _skTemp16 = _skTemp15; + let _skTemp17 = mat4x2(-1.25, -2.5, 0.0, 0.0, 0.75, 1.5, 2.25, 4.5); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((all(_skTemp1[0] == _skTemp2[0]) && all(_skTemp1[1] == _skTemp2[1])) && (all(_skTemp4[0] == _skTemp5[0]) && all(_skTemp4[1] == _skTemp5[1]) && all(_skTemp4[2] == _skTemp5[2]))) && (all(_skTemp7[0] == _skTemp8[0]) && all(_skTemp7[1] == _skTemp8[1]) && all(_skTemp7[2] == _skTemp8[2]))) && (all(_skTemp10[0] == _skTemp11[0]) && all(_skTemp10[1] == _skTemp11[1]) && all(_skTemp10[2] == _skTemp11[2]) && all(_skTemp10[3] == _skTemp11[3]))) && (all(_skTemp13[0] == _skTemp14[0]) && all(_skTemp13[1] == _skTemp14[1]))) && (all(_skTemp16[0] == _skTemp17[0]) && all(_skTemp16[1] == _skTemp17[1]) && all(_skTemp16[2] == _skTemp17[2]) && all(_skTemp16[3] == _skTemp17[3])))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} + +1 error diff --git a/tests/sksl/intrinsics/Pack.asm.frag b/tests/sksl/intrinsics/Pack.asm.frag index 99343e97a783..0d6dd9c979a1 100644 --- a/tests/sksl/intrinsics/Pack.asm.frag +++ b/tests/sksl/intrinsics/Pack.asm.frag @@ -1,86 +1,86 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "a" -OpMemberName %_UniformBuffer 1 "b" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %22 RelaxedPrecision -OpDecorate %24 RelaxedPrecision -OpDecorate %29 RelaxedPrecision -OpDecorate %30 RelaxedPrecision -OpDecorate %34 RelaxedPrecision -OpDecorate %35 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "a" + OpMemberName %_UniformBuffer 1 "b" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %22 RelaxedPrecision + OpDecorate %24 RelaxedPrecision + OpDecorate %29 RelaxedPrecision + OpDecorate %30 RelaxedPrecision + OpDecorate %34 RelaxedPrecision + OpDecorate %35 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%v2float = OpTypeVector %float 2 + %v2float = OpTypeVector %float 2 %_UniformBuffer = OpTypeStruct %v2float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void %_ptr_Uniform_v2float = OpTypePointer Uniform %v2float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%uint = OpTypeInt 32 0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %uint = OpTypeInt 32 0 %_ptr_Output_float = OpTypePointer Output %float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_1 = OpConstant %int 1 -%main = OpFunction %void None %15 -%16 = OpLabel -%18 = OpAccessChain %_ptr_Uniform_v2float %10 %int_0 -%22 = OpLoad %v2float %18 -%17 = OpExtInst %uint %1 PackHalf2x16 %22 -%24 = OpConvertUToF %float %17 -%25 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 -OpStore %25 %24 -%28 = OpAccessChain %_ptr_Uniform_v2float %10 %int_0 -%29 = OpLoad %v2float %28 -%27 = OpExtInst %uint %1 PackUnorm2x16 %29 -%30 = OpConvertUToF %float %27 -%31 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 -OpStore %31 %30 -%33 = OpAccessChain %_ptr_Uniform_v2float %10 %int_0 -%34 = OpLoad %v2float %33 -%32 = OpExtInst %uint %1 PackSnorm2x16 %34 -%35 = OpConvertUToF %float %32 -%36 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 -OpStore %36 %35 -%38 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%41 = OpLoad %v4float %38 -%37 = OpExtInst %uint %1 PackUnorm4x8 %41 -%42 = OpConvertUToF %float %37 -%43 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 -OpStore %43 %42 -%45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%46 = OpLoad %v4float %45 -%44 = OpExtInst %uint %1 PackSnorm4x8 %46 -%47 = OpConvertUToF %float %44 -%48 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 -OpStore %48 %47 -OpReturn -OpFunctionEnd + %int_1 = OpConstant %int 1 + %main = OpFunction %void None %15 + %16 = OpLabel + %18 = OpAccessChain %_ptr_Uniform_v2float %10 %int_0 + %22 = OpLoad %v2float %18 + %17 = OpExtInst %uint %1 PackHalf2x16 %22 + %24 = OpConvertUToF %float %17 + %25 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 + OpStore %25 %24 + %28 = OpAccessChain %_ptr_Uniform_v2float %10 %int_0 + %29 = OpLoad %v2float %28 + %27 = OpExtInst %uint %1 PackUnorm2x16 %29 + %30 = OpConvertUToF %float %27 + %31 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 + OpStore %31 %30 + %33 = OpAccessChain %_ptr_Uniform_v2float %10 %int_0 + %34 = OpLoad %v2float %33 + %32 = OpExtInst %uint %1 PackSnorm2x16 %34 + %35 = OpConvertUToF %float %32 + %36 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 + OpStore %36 %35 + %38 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %41 = OpLoad %v4float %38 + %37 = OpExtInst %uint %1 PackUnorm4x8 %41 + %42 = OpConvertUToF %float %37 + %43 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 + OpStore %43 %42 + %45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %46 = OpLoad %v4float %45 + %44 = OpExtInst %uint %1 PackSnorm4x8 %46 + %47 = OpConvertUToF %float %44 + %48 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 + OpStore %48 %47 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Pack.wgsl b/tests/sksl/intrinsics/Pack.wgsl new file mode 100644 index 000000000000..76195956c063 --- /dev/null +++ b/tests/sksl/intrinsics/Pack.wgsl @@ -0,0 +1,40 @@ +### Compilation failed: + +error: :15:20 error: unresolved call target 'packHalf2x16' + let _skTemp0 = packHalf2x16(vec2(_globalUniforms.a)); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + a: vec2, + b: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_stageOut: ptr) { + { + let _skTemp0 = packHalf2x16(vec2(_globalUniforms.a)); + (*_stageOut).sk_FragColor.x = f32(_skTemp0); + let _skTemp1 = packUnorm2x16(vec2(_globalUniforms.a)); + (*_stageOut).sk_FragColor.x = f32(_skTemp1); + let _skTemp2 = packSnorm2x16(vec2(_globalUniforms.a)); + (*_stageOut).sk_FragColor.x = f32(_skTemp2); + let _skTemp3 = packUnorm4x8(vec4(_globalUniforms.b)); + (*_stageOut).sk_FragColor.x = f32(_skTemp3); + let _skTemp4 = packSnorm4x8(vec4(_globalUniforms.b)); + (*_stageOut).sk_FragColor.x = f32(_skTemp4); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(&_stageOut); + return _stageOut; +} + +1 error diff --git a/tests/sksl/intrinsics/PackHalf2x16.asm.frag b/tests/sksl/intrinsics/PackHalf2x16.asm.frag index cb540c8e13b0..d3872bce8e3f 100644 --- a/tests/sksl/intrinsics/PackHalf2x16.asm.frag +++ b/tests/sksl/intrinsics/PackHalf2x16.asm.frag @@ -1,114 +1,114 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpMemberName %_UniformBuffer 2 "testInputs" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %xy "xy" -OpName %zw "zw" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %64 RelaxedPrecision -OpDecorate %67 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpMemberName %_UniformBuffer 2 "testInputs" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %xy "xy" + OpName %zw "zw" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %64 RelaxedPrecision + OpDecorate %67 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%uint = OpTypeInt 32 0 + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %uint = OpTypeInt 32 0 %_ptr_Function_uint = OpTypePointer Function %uint %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_2 = OpConstant %int 2 -%false = OpConstantFalse %bool + %int = OpTypeInt 32 1 + %int_2 = OpConstant %int 2 + %false = OpConstantFalse %bool %float_n1_25 = OpConstant %float -1.25 -%44 = OpConstantComposite %v2float %float_n1_25 %float_0 -%v2bool = OpTypeVector %bool 2 -%float_0_75 = OpConstant %float 0.75 -%float_2_25 = OpConstant %float 2.25 -%53 = OpConstantComposite %v2float %float_0_75 %float_2_25 + %44 = OpConstantComposite %v2float %float_n1_25 %float_0 + %v2bool = OpTypeVector %bool 2 + %float_0_75 = OpConstant %float 0.75 + %float_2_25 = OpConstant %float 2.25 + %53 = OpConstantComposite %v2float %float_0_75 %float_2_25 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%xy = OpVariable %_ptr_Function_uint Function -%zw = OpVariable %_ptr_Function_uint Function -%57 = OpVariable %_ptr_Function_v4float Function -%30 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%34 = OpLoad %v4float %30 -%35 = OpVectorShuffle %v2float %34 %34 0 1 -%29 = OpExtInst %uint %1 PackHalf2x16 %35 -OpStore %xy %29 -%38 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%39 = OpLoad %v4float %38 -%40 = OpVectorShuffle %v2float %39 %39 2 3 -%37 = OpExtInst %uint %1 PackHalf2x16 %40 -OpStore %zw %37 -%42 = OpExtInst %v2float %1 UnpackHalf2x16 %29 -%45 = OpFOrdEqual %v2bool %42 %44 -%47 = OpAll %bool %45 -OpSelectionMerge %49 None -OpBranchConditional %47 %48 %49 -%48 = OpLabel -%50 = OpExtInst %v2float %1 UnpackHalf2x16 %37 -%54 = OpFOrdEqual %v2bool %50 %53 -%55 = OpAll %bool %54 -OpBranch %49 -%49 = OpLabel -%56 = OpPhi %bool %false %25 %55 %48 -OpSelectionMerge %61 None -OpBranchConditional %56 %59 %60 -%59 = OpLabel -%62 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%64 = OpLoad %v4float %62 -OpStore %57 %64 -OpBranch %61 -%60 = OpLabel -%65 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%67 = OpLoad %v4float %65 -OpStore %57 %67 -OpBranch %61 -%61 = OpLabel -%68 = OpLoad %v4float %57 -OpReturnValue %68 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %xy = OpVariable %_ptr_Function_uint Function + %zw = OpVariable %_ptr_Function_uint Function + %57 = OpVariable %_ptr_Function_v4float Function + %30 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %34 = OpLoad %v4float %30 + %35 = OpVectorShuffle %v2float %34 %34 0 1 + %29 = OpExtInst %uint %1 PackHalf2x16 %35 + OpStore %xy %29 + %38 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %39 = OpLoad %v4float %38 + %40 = OpVectorShuffle %v2float %39 %39 2 3 + %37 = OpExtInst %uint %1 PackHalf2x16 %40 + OpStore %zw %37 + %42 = OpExtInst %v2float %1 UnpackHalf2x16 %29 + %45 = OpFOrdEqual %v2bool %42 %44 + %47 = OpAll %bool %45 + OpSelectionMerge %49 None + OpBranchConditional %47 %48 %49 + %48 = OpLabel + %50 = OpExtInst %v2float %1 UnpackHalf2x16 %37 + %54 = OpFOrdEqual %v2bool %50 %53 + %55 = OpAll %bool %54 + OpBranch %49 + %49 = OpLabel + %56 = OpPhi %bool %false %25 %55 %48 + OpSelectionMerge %61 None + OpBranchConditional %56 %59 %60 + %59 = OpLabel + %62 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %64 = OpLoad %v4float %62 + OpStore %57 %64 + OpBranch %61 + %60 = OpLabel + %65 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %67 = OpLoad %v4float %65 + OpStore %57 %67 + OpBranch %61 + %61 = OpLabel + %68 = OpLoad %v4float %57 + OpReturnValue %68 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/PackHalf2x16.wgsl b/tests/sksl/intrinsics/PackHalf2x16.wgsl new file mode 100644 index 000000000000..a8770aefe684 --- /dev/null +++ b/tests/sksl/intrinsics/PackHalf2x16.wgsl @@ -0,0 +1,40 @@ +### Compilation failed: + +error: :18:20 error: unresolved call target 'packHalf2x16' + let _skTemp0 = packHalf2x16(_globalUniforms.testInputs.xy); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, + testInputs: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + let _skTemp0 = packHalf2x16(_globalUniforms.testInputs.xy); + var xy: u32 = _skTemp0; + let _skTemp1 = packHalf2x16(_globalUniforms.testInputs.zw); + var zw: u32 = _skTemp1; + let _skTemp2 = unpackHalf2x16(xy); + let _skTemp3 = unpackHalf2x16(zw); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(all(_skTemp2 == vec2(-1.25, 0.0)) && all(_skTemp3 == vec2(0.75, 2.25)))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} + +1 error diff --git a/tests/sksl/intrinsics/PackSnorm2x16.asm.frag b/tests/sksl/intrinsics/PackSnorm2x16.asm.frag index c164cdabc3ce..f2d911d4bf37 100644 --- a/tests/sksl/intrinsics/PackSnorm2x16.asm.frag +++ b/tests/sksl/intrinsics/PackSnorm2x16.asm.frag @@ -1,120 +1,120 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpMemberName %_UniformBuffer 2 "testInputs" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %xy "xy" -OpName %zw "zw" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %70 RelaxedPrecision -OpDecorate %73 RelaxedPrecision -OpDecorate %74 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpMemberName %_UniformBuffer 2 "testInputs" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %xy "xy" + OpName %zw "zw" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %70 RelaxedPrecision + OpDecorate %73 RelaxedPrecision + OpDecorate %74 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%uint = OpTypeInt 32 0 + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %uint = OpTypeInt 32 0 %_ptr_Function_uint = OpTypePointer Function %uint %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_2 = OpConstant %int 2 -%false = OpConstantFalse %bool -%float_n1 = OpConstant %float -1 -%47 = OpConstantComposite %v2float %float_n1 %float_0 + %int = OpTypeInt 32 1 + %int_2 = OpConstant %int 2 + %false = OpConstantFalse %bool + %float_n1 = OpConstant %float -1 + %47 = OpConstantComposite %v2float %float_n1 %float_0 %float_0_015625 = OpConstant %float 0.015625 -%50 = OpConstantComposite %v2float %float_0_015625 %float_0_015625 -%v2bool = OpTypeVector %bool 2 -%float_0_75 = OpConstant %float 0.75 -%float_1 = OpConstant %float 1 -%60 = OpConstantComposite %v2float %float_0_75 %float_1 + %50 = OpConstantComposite %v2float %float_0_015625 %float_0_015625 + %v2bool = OpTypeVector %bool 2 + %float_0_75 = OpConstant %float 0.75 + %float_1 = OpConstant %float 1 + %60 = OpConstantComposite %v2float %float_0_75 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%xy = OpVariable %_ptr_Function_uint Function -%zw = OpVariable %_ptr_Function_uint Function -%63 = OpVariable %_ptr_Function_v4float Function -%30 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%34 = OpLoad %v4float %30 -%35 = OpVectorShuffle %v2float %34 %34 0 1 -%29 = OpExtInst %uint %1 PackSnorm2x16 %35 -OpStore %xy %29 -%38 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%39 = OpLoad %v4float %38 -%40 = OpVectorShuffle %v2float %39 %39 2 3 -%37 = OpExtInst %uint %1 PackSnorm2x16 %40 -OpStore %zw %37 -%45 = OpExtInst %v2float %1 UnpackSnorm2x16 %29 -%48 = OpFSub %v2float %45 %47 -%44 = OpExtInst %v2float %1 FAbs %48 -%43 = OpFOrdLessThan %v2bool %44 %50 -%42 = OpAll %bool %43 -OpSelectionMerge %53 None -OpBranchConditional %42 %52 %53 -%52 = OpLabel -%57 = OpExtInst %v2float %1 UnpackSnorm2x16 %37 -%61 = OpFSub %v2float %57 %60 -%56 = OpExtInst %v2float %1 FAbs %61 -%55 = OpFOrdLessThan %v2bool %56 %50 -%54 = OpAll %bool %55 -OpBranch %53 -%53 = OpLabel -%62 = OpPhi %bool %false %25 %54 %52 -OpSelectionMerge %67 None -OpBranchConditional %62 %65 %66 -%65 = OpLabel -%68 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%70 = OpLoad %v4float %68 -OpStore %63 %70 -OpBranch %67 -%66 = OpLabel -%71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%73 = OpLoad %v4float %71 -OpStore %63 %73 -OpBranch %67 -%67 = OpLabel -%74 = OpLoad %v4float %63 -OpReturnValue %74 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %xy = OpVariable %_ptr_Function_uint Function + %zw = OpVariable %_ptr_Function_uint Function + %63 = OpVariable %_ptr_Function_v4float Function + %30 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %34 = OpLoad %v4float %30 + %35 = OpVectorShuffle %v2float %34 %34 0 1 + %29 = OpExtInst %uint %1 PackSnorm2x16 %35 + OpStore %xy %29 + %38 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %39 = OpLoad %v4float %38 + %40 = OpVectorShuffle %v2float %39 %39 2 3 + %37 = OpExtInst %uint %1 PackSnorm2x16 %40 + OpStore %zw %37 + %45 = OpExtInst %v2float %1 UnpackSnorm2x16 %29 + %48 = OpFSub %v2float %45 %47 + %44 = OpExtInst %v2float %1 FAbs %48 + %43 = OpFOrdLessThan %v2bool %44 %50 + %42 = OpAll %bool %43 + OpSelectionMerge %53 None + OpBranchConditional %42 %52 %53 + %52 = OpLabel + %57 = OpExtInst %v2float %1 UnpackSnorm2x16 %37 + %61 = OpFSub %v2float %57 %60 + %56 = OpExtInst %v2float %1 FAbs %61 + %55 = OpFOrdLessThan %v2bool %56 %50 + %54 = OpAll %bool %55 + OpBranch %53 + %53 = OpLabel + %62 = OpPhi %bool %false %25 %54 %52 + OpSelectionMerge %67 None + OpBranchConditional %62 %65 %66 + %65 = OpLabel + %68 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %70 = OpLoad %v4float %68 + OpStore %63 %70 + OpBranch %67 + %66 = OpLabel + %71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %73 = OpLoad %v4float %71 + OpStore %63 %73 + OpBranch %67 + %67 = OpLabel + %74 = OpLoad %v4float %63 + OpReturnValue %74 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/PackSnorm2x16.wgsl b/tests/sksl/intrinsics/PackSnorm2x16.wgsl new file mode 100644 index 000000000000..d5c69d878e8c --- /dev/null +++ b/tests/sksl/intrinsics/PackSnorm2x16.wgsl @@ -0,0 +1,45 @@ +### Compilation failed: + +error: :18:20 error: unresolved call target 'packSnorm2x16' + let _skTemp0 = packSnorm2x16(_globalUniforms.testInputs.xy); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, + testInputs: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + let _skTemp0 = packSnorm2x16(_globalUniforms.testInputs.xy); + var xy: u32 = _skTemp0; + let _skTemp1 = packSnorm2x16(_globalUniforms.testInputs.zw); + var zw: u32 = _skTemp1; + const tolerance: vec2 = vec2(0.015625); + let _skTemp2 = unpackSnorm2x16(xy); + let _skTemp3 = abs(_skTemp2 - vec2(-1.0, 0.0)); + let _skTemp4 = all(_skTemp3 < tolerance); + let _skTemp5 = unpackSnorm2x16(zw); + let _skTemp6 = abs(_skTemp5 - vec2(0.75, 1.0)); + let _skTemp7 = all(_skTemp6 < tolerance); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(_skTemp4 && _skTemp7)); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} + +1 error diff --git a/tests/sksl/intrinsics/PackUnorm2x16.asm.frag b/tests/sksl/intrinsics/PackUnorm2x16.asm.frag index b12bca3f2349..626531e8002c 100644 --- a/tests/sksl/intrinsics/PackUnorm2x16.asm.frag +++ b/tests/sksl/intrinsics/PackUnorm2x16.asm.frag @@ -1,117 +1,117 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpMemberName %_UniformBuffer 2 "testInputs" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %xy "xy" -OpName %zw "zw" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %67 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -OpDecorate %71 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpMemberName %_UniformBuffer 2 "testInputs" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %xy "xy" + OpName %zw "zw" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %67 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %71 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%uint = OpTypeInt 32 0 + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %uint = OpTypeInt 32 0 %_ptr_Function_uint = OpTypePointer Function %uint %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_2 = OpConstant %int 2 -%false = OpConstantFalse %bool + %int = OpTypeInt 32 1 + %int_2 = OpConstant %int 2 + %false = OpConstantFalse %bool %float_0_015625 = OpConstant %float 0.015625 -%47 = OpConstantComposite %v2float %float_0_015625 %float_0_015625 -%v2bool = OpTypeVector %bool 2 -%float_0_75 = OpConstant %float 0.75 -%float_1 = OpConstant %float 1 -%57 = OpConstantComposite %v2float %float_0_75 %float_1 + %47 = OpConstantComposite %v2float %float_0_015625 %float_0_015625 + %v2bool = OpTypeVector %bool 2 + %float_0_75 = OpConstant %float 0.75 + %float_1 = OpConstant %float 1 + %57 = OpConstantComposite %v2float %float_0_75 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%xy = OpVariable %_ptr_Function_uint Function -%zw = OpVariable %_ptr_Function_uint Function -%60 = OpVariable %_ptr_Function_v4float Function -%30 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%34 = OpLoad %v4float %30 -%35 = OpVectorShuffle %v2float %34 %34 0 1 -%29 = OpExtInst %uint %1 PackUnorm2x16 %35 -OpStore %xy %29 -%38 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%39 = OpLoad %v4float %38 -%40 = OpVectorShuffle %v2float %39 %39 2 3 -%37 = OpExtInst %uint %1 PackUnorm2x16 %40 -OpStore %zw %37 -%45 = OpExtInst %v2float %1 UnpackUnorm2x16 %29 -%44 = OpExtInst %v2float %1 FAbs %45 -%43 = OpFOrdLessThan %v2bool %44 %47 -%42 = OpAll %bool %43 -OpSelectionMerge %50 None -OpBranchConditional %42 %49 %50 -%49 = OpLabel -%54 = OpExtInst %v2float %1 UnpackUnorm2x16 %37 -%58 = OpFSub %v2float %54 %57 -%53 = OpExtInst %v2float %1 FAbs %58 -%52 = OpFOrdLessThan %v2bool %53 %47 -%51 = OpAll %bool %52 -OpBranch %50 -%50 = OpLabel -%59 = OpPhi %bool %false %25 %51 %49 -OpSelectionMerge %64 None -OpBranchConditional %59 %62 %63 -%62 = OpLabel -%65 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%67 = OpLoad %v4float %65 -OpStore %60 %67 -OpBranch %64 -%63 = OpLabel -%68 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%70 = OpLoad %v4float %68 -OpStore %60 %70 -OpBranch %64 -%64 = OpLabel -%71 = OpLoad %v4float %60 -OpReturnValue %71 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %xy = OpVariable %_ptr_Function_uint Function + %zw = OpVariable %_ptr_Function_uint Function + %60 = OpVariable %_ptr_Function_v4float Function + %30 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %34 = OpLoad %v4float %30 + %35 = OpVectorShuffle %v2float %34 %34 0 1 + %29 = OpExtInst %uint %1 PackUnorm2x16 %35 + OpStore %xy %29 + %38 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %39 = OpLoad %v4float %38 + %40 = OpVectorShuffle %v2float %39 %39 2 3 + %37 = OpExtInst %uint %1 PackUnorm2x16 %40 + OpStore %zw %37 + %45 = OpExtInst %v2float %1 UnpackUnorm2x16 %29 + %44 = OpExtInst %v2float %1 FAbs %45 + %43 = OpFOrdLessThan %v2bool %44 %47 + %42 = OpAll %bool %43 + OpSelectionMerge %50 None + OpBranchConditional %42 %49 %50 + %49 = OpLabel + %54 = OpExtInst %v2float %1 UnpackUnorm2x16 %37 + %58 = OpFSub %v2float %54 %57 + %53 = OpExtInst %v2float %1 FAbs %58 + %52 = OpFOrdLessThan %v2bool %53 %47 + %51 = OpAll %bool %52 + OpBranch %50 + %50 = OpLabel + %59 = OpPhi %bool %false %25 %51 %49 + OpSelectionMerge %64 None + OpBranchConditional %59 %62 %63 + %62 = OpLabel + %65 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %67 = OpLoad %v4float %65 + OpStore %60 %67 + OpBranch %64 + %63 = OpLabel + %68 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %70 = OpLoad %v4float %68 + OpStore %60 %70 + OpBranch %64 + %64 = OpLabel + %71 = OpLoad %v4float %60 + OpReturnValue %71 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/PackUnorm2x16.wgsl b/tests/sksl/intrinsics/PackUnorm2x16.wgsl new file mode 100644 index 000000000000..28f00c799420 --- /dev/null +++ b/tests/sksl/intrinsics/PackUnorm2x16.wgsl @@ -0,0 +1,45 @@ +### Compilation failed: + +error: :18:20 error: unresolved call target 'packUnorm2x16' + let _skTemp0 = packUnorm2x16(_globalUniforms.testInputs.xy); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, + testInputs: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + let _skTemp0 = packUnorm2x16(_globalUniforms.testInputs.xy); + var xy: u32 = _skTemp0; + let _skTemp1 = packUnorm2x16(_globalUniforms.testInputs.zw); + var zw: u32 = _skTemp1; + const tolerance: vec2 = vec2(0.015625); + let _skTemp2 = unpackUnorm2x16(xy); + let _skTemp3 = abs(_skTemp2); + let _skTemp4 = all(_skTemp3 < tolerance); + let _skTemp5 = unpackUnorm2x16(zw); + let _skTemp6 = abs(_skTemp5 - vec2(0.75, 1.0)); + let _skTemp7 = all(_skTemp6 < tolerance); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(_skTemp4 && _skTemp7)); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} + +1 error diff --git a/tests/sksl/intrinsics/Pow.asm.frag b/tests/sksl/intrinsics/Pow.asm.frag index 46e74b195df0..391235978f6a 100644 --- a/tests/sksl/intrinsics/Pow.asm.frag +++ b/tests/sksl/intrinsics/Pow.asm.frag @@ -1,194 +1,194 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testInputs" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %expected "expected" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %expected RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %39 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %59 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %64 RelaxedPrecision -OpDecorate %71 RelaxedPrecision -OpDecorate %73 RelaxedPrecision -OpDecorate %88 RelaxedPrecision -OpDecorate %95 RelaxedPrecision -OpDecorate %111 RelaxedPrecision -OpDecorate %114 RelaxedPrecision -OpDecorate %115 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testInputs" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %expected "expected" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %expected RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %59 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %64 RelaxedPrecision + OpDecorate %71 RelaxedPrecision + OpDecorate %73 RelaxedPrecision + OpDecorate %88 RelaxedPrecision + OpDecorate %95 RelaxedPrecision + OpDecorate %111 RelaxedPrecision + OpDecorate %114 RelaxedPrecision + OpDecorate %115 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float %float_n1_5625 = OpConstant %float -1.5625 -%float_0_75 = OpConstant %float 0.75 + %float_0_75 = OpConstant %float 0.75 %float_3_375 = OpConstant %float 3.375 -%31 = OpConstantComposite %v4float %float_n1_5625 %float_0 %float_0_75 %float_3_375 -%false = OpConstantFalse %bool + %31 = OpConstantComposite %v4float %float_n1_5625 %float_0 %float_0_75 %float_3_375 + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%float_2 = OpConstant %float 2 -%float_3 = OpConstant %float 3 -%49 = OpConstantComposite %v2float %float_2 %float_3 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%float_1 = OpConstant %float 1 -%63 = OpConstantComposite %v3float %float_2 %float_3 %float_1 -%v3bool = OpTypeVector %bool 3 -%float_1_5 = OpConstant %float 1.5 -%75 = OpConstantComposite %v4float %float_2 %float_3 %float_1 %float_1_5 -%v4bool = OpTypeVector %bool 4 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %float_2 = OpConstant %float 2 + %float_3 = OpConstant %float 3 + %49 = OpConstantComposite %v2float %float_2 %float_3 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %63 = OpConstantComposite %v3float %float_2 %float_3 %float_1 + %v3bool = OpTypeVector %bool 3 + %float_1_5 = OpConstant %float 1.5 + %75 = OpConstantComposite %v4float %float_2 %float_3 %float_1 %float_1_5 + %v4bool = OpTypeVector %bool 4 %float_1_5625 = OpConstant %float 1.5625 -%87 = OpConstantComposite %v2float %float_1_5625 %float_0 -%94 = OpConstantComposite %v3float %float_1_5625 %float_0 %float_0_75 -%101 = OpConstantComposite %v4float %float_1_5625 %float_0 %float_0_75 %float_3_375 -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 + %87 = OpConstantComposite %v2float %float_1_5625 %float_0 + %94 = OpConstantComposite %v3float %float_1_5625 %float_0 %float_0_75 + %101 = OpConstantComposite %v4float %float_1_5625 %float_0 %float_0_75 %float_3_375 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%expected = OpVariable %_ptr_Function_v4float Function -%105 = OpVariable %_ptr_Function_v4float Function -OpStore %expected %31 -%34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%38 = OpLoad %v4float %34 -%39 = OpCompositeExtract %float %38 0 -%33 = OpExtInst %float %1 Pow %39 %float_2 -%41 = OpFOrdEqual %bool %33 %float_n1_5625 -OpSelectionMerge %43 None -OpBranchConditional %41 %42 %43 -%42 = OpLabel -%45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%46 = OpLoad %v4float %45 -%47 = OpVectorShuffle %v2float %46 %46 0 1 -%44 = OpExtInst %v2float %1 Pow %47 %49 -%50 = OpVectorShuffle %v2float %31 %31 0 1 -%51 = OpFOrdEqual %v2bool %44 %50 -%53 = OpAll %bool %51 -OpBranch %43 -%43 = OpLabel -%54 = OpPhi %bool %false %25 %53 %42 -OpSelectionMerge %56 None -OpBranchConditional %54 %55 %56 -%55 = OpLabel -%58 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%59 = OpLoad %v4float %58 -%60 = OpVectorShuffle %v3float %59 %59 0 1 2 -%57 = OpExtInst %v3float %1 Pow %60 %63 -%64 = OpVectorShuffle %v3float %31 %31 0 1 2 -%65 = OpFOrdEqual %v3bool %57 %64 -%67 = OpAll %bool %65 -OpBranch %56 -%56 = OpLabel -%68 = OpPhi %bool %false %43 %67 %55 -OpSelectionMerge %70 None -OpBranchConditional %68 %69 %70 -%69 = OpLabel -%72 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%73 = OpLoad %v4float %72 -%71 = OpExtInst %v4float %1 Pow %73 %75 -%76 = OpFOrdEqual %v4bool %71 %31 -%78 = OpAll %bool %76 -OpBranch %70 -%70 = OpLabel -%79 = OpPhi %bool %false %56 %78 %69 -OpSelectionMerge %81 None -OpBranchConditional %79 %80 %81 -%80 = OpLabel -%83 = OpFOrdEqual %bool %float_1_5625 %float_n1_5625 -OpBranch %81 -%81 = OpLabel -%84 = OpPhi %bool %false %70 %83 %80 -OpSelectionMerge %86 None -OpBranchConditional %84 %85 %86 -%85 = OpLabel -%88 = OpVectorShuffle %v2float %31 %31 0 1 -%89 = OpFOrdEqual %v2bool %87 %88 -%90 = OpAll %bool %89 -OpBranch %86 -%86 = OpLabel -%91 = OpPhi %bool %false %81 %90 %85 -OpSelectionMerge %93 None -OpBranchConditional %91 %92 %93 -%92 = OpLabel -%95 = OpVectorShuffle %v3float %31 %31 0 1 2 -%96 = OpFOrdEqual %v3bool %94 %95 -%97 = OpAll %bool %96 -OpBranch %93 -%93 = OpLabel -%98 = OpPhi %bool %false %86 %97 %92 -OpSelectionMerge %100 None -OpBranchConditional %98 %99 %100 -%99 = OpLabel -%102 = OpFOrdEqual %v4bool %101 %31 -%103 = OpAll %bool %102 -OpBranch %100 -%100 = OpLabel -%104 = OpPhi %bool %false %93 %103 %99 -OpSelectionMerge %108 None -OpBranchConditional %104 %106 %107 -%106 = OpLabel -%109 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%111 = OpLoad %v4float %109 -OpStore %105 %111 -OpBranch %108 -%107 = OpLabel -%112 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%114 = OpLoad %v4float %112 -OpStore %105 %114 -OpBranch %108 -%108 = OpLabel -%115 = OpLoad %v4float %105 -OpReturnValue %115 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %expected = OpVariable %_ptr_Function_v4float Function + %105 = OpVariable %_ptr_Function_v4float Function + OpStore %expected %31 + %34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %38 = OpLoad %v4float %34 + %39 = OpCompositeExtract %float %38 0 + %33 = OpExtInst %float %1 Pow %39 %float_2 + %41 = OpFOrdEqual %bool %33 %float_n1_5625 + OpSelectionMerge %43 None + OpBranchConditional %41 %42 %43 + %42 = OpLabel + %45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %46 = OpLoad %v4float %45 + %47 = OpVectorShuffle %v2float %46 %46 0 1 + %44 = OpExtInst %v2float %1 Pow %47 %49 + %50 = OpVectorShuffle %v2float %31 %31 0 1 + %51 = OpFOrdEqual %v2bool %44 %50 + %53 = OpAll %bool %51 + OpBranch %43 + %43 = OpLabel + %54 = OpPhi %bool %false %25 %53 %42 + OpSelectionMerge %56 None + OpBranchConditional %54 %55 %56 + %55 = OpLabel + %58 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %59 = OpLoad %v4float %58 + %60 = OpVectorShuffle %v3float %59 %59 0 1 2 + %57 = OpExtInst %v3float %1 Pow %60 %63 + %64 = OpVectorShuffle %v3float %31 %31 0 1 2 + %65 = OpFOrdEqual %v3bool %57 %64 + %67 = OpAll %bool %65 + OpBranch %56 + %56 = OpLabel + %68 = OpPhi %bool %false %43 %67 %55 + OpSelectionMerge %70 None + OpBranchConditional %68 %69 %70 + %69 = OpLabel + %72 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %73 = OpLoad %v4float %72 + %71 = OpExtInst %v4float %1 Pow %73 %75 + %76 = OpFOrdEqual %v4bool %71 %31 + %78 = OpAll %bool %76 + OpBranch %70 + %70 = OpLabel + %79 = OpPhi %bool %false %56 %78 %69 + OpSelectionMerge %81 None + OpBranchConditional %79 %80 %81 + %80 = OpLabel + %83 = OpFOrdEqual %bool %float_1_5625 %float_n1_5625 + OpBranch %81 + %81 = OpLabel + %84 = OpPhi %bool %false %70 %83 %80 + OpSelectionMerge %86 None + OpBranchConditional %84 %85 %86 + %85 = OpLabel + %88 = OpVectorShuffle %v2float %31 %31 0 1 + %89 = OpFOrdEqual %v2bool %87 %88 + %90 = OpAll %bool %89 + OpBranch %86 + %86 = OpLabel + %91 = OpPhi %bool %false %81 %90 %85 + OpSelectionMerge %93 None + OpBranchConditional %91 %92 %93 + %92 = OpLabel + %95 = OpVectorShuffle %v3float %31 %31 0 1 2 + %96 = OpFOrdEqual %v3bool %94 %95 + %97 = OpAll %bool %96 + OpBranch %93 + %93 = OpLabel + %98 = OpPhi %bool %false %86 %97 %92 + OpSelectionMerge %100 None + OpBranchConditional %98 %99 %100 + %99 = OpLabel + %102 = OpFOrdEqual %v4bool %101 %31 + %103 = OpAll %bool %102 + OpBranch %100 + %100 = OpLabel + %104 = OpPhi %bool %false %93 %103 %99 + OpSelectionMerge %108 None + OpBranchConditional %104 %106 %107 + %106 = OpLabel + %109 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %111 = OpLoad %v4float %109 + OpStore %105 %111 + OpBranch %108 + %107 = OpLabel + %112 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %114 = OpLoad %v4float %112 + OpStore %105 %114 + OpBranch %108 + %108 = OpLabel + %115 = OpLoad %v4float %105 + OpReturnValue %115 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Pow.skrp b/tests/sksl/intrinsics/Pow.skrp index 1b4af65a4bbc..dc2b9bdea53d 100644 --- a/tests/sksl/intrinsics/Pow.skrp +++ b/tests/sksl/intrinsics/Pow.skrp @@ -1,68 +1,69 @@ +54 instructions + [immutable slots] -expected(0) = 0xBFC80000 (-1.5625) -expected(1) = 0 -expected(2) = 0x3F400000 (0.75) -expected(3) = 0x40580000 (3.375) -exponents(0) = 0x40000000 (2.0) -exponents(1) = 0x40400000 (3.0) -exponents(2) = 0x3F800000 (1.0) -exponents(3) = 0x3FC00000 (1.5) +i0 = 0xBFC80000 (-1.5625) +i1 = 0 +i2 = 0x3F400000 (0.75) +i3 = 0x40580000 (3.375) +i4 = 0x40000000 (2.0) +i5 = 0x40400000 (3.0) +i6 = 0x3F800000 (1.0) +i7 = 0x3FC00000 (1.5) +i8 = 0x3FC80000 (1.5625) +i9 = 0 +i10 = 0x3FC80000 (1.5625) +i11 = 0 +i12 = 0x3F400000 (0.75) +i13 = 0x3FC80000 (1.5625) +i14 = 0 +i15 = 0x3F400000 (0.75) +i16 = 0x40580000 (3.375) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_uniform $0 = testInputs(0) copy_constant $1 = 0x40000000 (2.0) pow_n_floats $0 = pow($0, $1) -copy_slot_unmasked $1 = expected(0) -cmpeq_float $0 = equal($0, $1) +cmpeq_imm_float $0 = equal($0, 0xBFC80000 (-1.5625)) copy_2_uniforms $1..2 = testInputs(0..1) -copy_constant $3 = 0x40000000 (2.0) -copy_constant $4 = 0x40400000 (3.0) +copy_2_immutables_unmasked $3..4 = i4..5 [0x40000000 (2.0), 0x40400000 (3.0)] pow_n_floats $1..2 = pow($1..2, $3..4) -copy_2_slots_unmasked $3..4 = expected(0..1) +copy_2_immutables_unmasked $3..4 = i0..1 [0xBFC80000 (-1.5625), 0] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_3_uniforms $1..3 = testInputs(0..2) -copy_constant $4 = 0x40000000 (2.0) -copy_constant $5 = 0x40400000 (3.0) -copy_constant $6 = 0x3F800000 (1.0) +copy_3_immutables_unmasked $4..6 = i4..6 [0x40000000 (2.0), 0x40400000 (3.0), 0x3F800000 (1.0)] pow_n_floats $1..3 = pow($1..3, $4..6) -copy_3_slots_unmasked $4..6 = expected(0..2) +copy_3_immutables_unmasked $4..6 = i0..2 [0xBFC80000 (-1.5625), 0, 0x3F400000 (0.75)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_4_uniforms $1..4 = testInputs -copy_4_slots_unmasked $5..8 = exponents +copy_4_immutables_unmasked $5..8 = i4..7 [0x40000000 (2.0), 0x40400000 (3.0), 0x3F800000 (1.0), 0x3FC00000 (1.5)] pow_n_floats $1..4 = pow($1..4, $5..8) -copy_4_slots_unmasked $5..8 = expected +copy_4_immutables_unmasked $5..8 = i0..3 [0xBFC80000 (-1.5625), 0, 0x3F400000 (0.75), 0x40580000 (3.375)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expected(0) +copy_constant $1 = 0xBFC80000 (-1.5625) cmpeq_imm_float $1 = equal($1, 0x3FC80000 (1.5625)) bitwise_and_int $0 &= $1 -copy_constant $1 = 0x3FC80000 (1.5625) -copy_constant $2 = 0 -copy_2_slots_unmasked $3..4 = expected(0..1) +copy_2_immutables_unmasked $1..2 = i8..9 [0x3FC80000 (1.5625), 0] +copy_2_immutables_unmasked $3..4 = i0..1 [0xBFC80000 (-1.5625), 0] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0x3FC80000 (1.5625) -copy_constant $2 = 0 -copy_constant $3 = 0x3F400000 (0.75) -copy_3_slots_unmasked $4..6 = expected(0..2) +copy_3_immutables_unmasked $1..3 = i10..12 [0x3FC80000 (1.5625), 0, 0x3F400000 (0.75)] +copy_3_immutables_unmasked $4..6 = i0..2 [0xBFC80000 (-1.5625), 0, 0x3F400000 (0.75)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0x3FC80000 (1.5625) -copy_constant $2 = 0 -copy_constant $3 = 0x3F400000 (0.75) -copy_constant $4 = 0x40580000 (3.375) -copy_4_slots_unmasked $5..8 = expected +copy_4_immutables_unmasked $1..4 = i13..16 [0x3FC80000 (1.5625), 0, 0x3F400000 (0.75), 0x40580000 (3.375)] +copy_4_immutables_unmasked $5..8 = i0..3 [0xBFC80000 (-1.5625), 0, 0x3F400000 (0.75), 0x40580000 (3.375)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 diff --git a/tests/sksl/intrinsics/Pow.wgsl b/tests/sksl/intrinsics/Pow.wgsl index e47ccfbe8388..68da989612e8 100644 --- a/tests/sksl/intrinsics/Pow.wgsl +++ b/tests/sksl/intrinsics/Pow.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -20,7 +21,7 @@ fn main(_skParam0: vec2) -> vec4 { let _skTemp1 = pow(_globalUniforms.testInputs.xy, vec2(2.0, 3.0)); let _skTemp2 = pow(_globalUniforms.testInputs.xyz, vec3(2.0, 3.0, 1.0)); let _skTemp3 = pow(_globalUniforms.testInputs, exponents); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((_skTemp0 == expected.x && all(_skTemp1 == expected.xy)) && all(_skTemp2 == expected.xyz)) && all(_skTemp3 == expected)) && 1.5625 == expected.x) && all(vec2(1.5625, 0.0) == expected.xy)) && all(vec3(1.5625, 0.0, 0.75) == expected.xyz)) && all(vec4(1.5625, 0.0, 0.75, 3.375) == expected))); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((_skTemp0 == expected.x) && all(_skTemp1 == expected.xy)) && all(_skTemp2 == expected.xyz)) && all(_skTemp3 == expected)) && (1.5625 == expected.x)) && all(vec2(1.5625, 0.0) == expected.xy)) && all(vec3(1.5625, 0.0, 0.75) == expected.xyz)) && all(vec4(1.5625, 0.0, 0.75, 3.375) == expected))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/intrinsics/Radians.asm.frag b/tests/sksl/intrinsics/Radians.asm.frag index ba17bb5a3f9d..3d83709fd637 100644 --- a/tests/sksl/intrinsics/Radians.asm.frag +++ b/tests/sksl/intrinsics/Radians.asm.frag @@ -1,142 +1,142 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testInputs" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %90 RelaxedPrecision -OpDecorate %93 RelaxedPrecision -OpDecorate %94 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testInputs" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %90 RelaxedPrecision + OpDecorate %93 RelaxedPrecision + OpDecorate %94 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%false = OpConstantFalse %bool + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 %float_n0_021816615 = OpConstant %float -0.021816615 %float_0_000500000024 = OpConstant %float 0.000500000024 -%48 = OpConstantComposite %v2float %float_n0_021816615 %float_0 -%50 = OpConstantComposite %v2float %float_0_000500000024 %float_0_000500000024 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 + %48 = OpConstantComposite %v2float %float_n0_021816615 %float_0 + %50 = OpConstantComposite %v2float %float_0_000500000024 %float_0_000500000024 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 %float_0_0130899698 = OpConstant %float 0.0130899698 -%64 = OpConstantComposite %v3float %float_n0_021816615 %float_0 %float_0_0130899698 -%66 = OpConstantComposite %v3float %float_0_000500000024 %float_0_000500000024 %float_0_000500000024 -%v3bool = OpTypeVector %bool 3 + %64 = OpConstantComposite %v3float %float_n0_021816615 %float_0 %float_0_0130899698 + %66 = OpConstantComposite %v3float %float_0_000500000024 %float_0_000500000024 %float_0_000500000024 + %v3bool = OpTypeVector %bool 3 %float_0_0392699093 = OpConstant %float 0.0392699093 -%78 = OpConstantComposite %v4float %float_n0_021816615 %float_0 %float_0_0130899698 %float_0_0392699093 -%80 = OpConstantComposite %v4float %float_0_000500000024 %float_0_000500000024 %float_0_000500000024 %float_0_000500000024 -%v4bool = OpTypeVector %bool 4 + %78 = OpConstantComposite %v4float %float_n0_021816615 %float_0 %float_0_0130899698 %float_0_0392699093 + %80 = OpConstantComposite %v4float %float_0_000500000024 %float_0_000500000024 %float_0_000500000024 %float_0_000500000024 + %v4bool = OpTypeVector %bool 4 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%83 = OpVariable %_ptr_Function_v4float Function -%29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%33 = OpLoad %v4float %29 -%34 = OpCompositeExtract %float %33 0 -%28 = OpExtInst %float %1 Radians %34 -%36 = OpFSub %float %28 %float_n0_021816615 -%27 = OpExtInst %float %1 FAbs %36 -%38 = OpFOrdLessThan %bool %27 %float_0_000500000024 -OpSelectionMerge %40 None -OpBranchConditional %38 %39 %40 -%39 = OpLabel -%45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%46 = OpLoad %v4float %45 -%47 = OpVectorShuffle %v2float %46 %46 0 1 -%44 = OpExtInst %v2float %1 Radians %47 -%49 = OpFSub %v2float %44 %48 -%43 = OpExtInst %v2float %1 FAbs %49 -%42 = OpFOrdLessThan %v2bool %43 %50 -%41 = OpAll %bool %42 -OpBranch %40 -%40 = OpLabel -%52 = OpPhi %bool %false %25 %41 %39 -OpSelectionMerge %54 None -OpBranchConditional %52 %53 %54 -%53 = OpLabel -%59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%60 = OpLoad %v4float %59 -%61 = OpVectorShuffle %v3float %60 %60 0 1 2 -%58 = OpExtInst %v3float %1 Radians %61 -%65 = OpFSub %v3float %58 %64 -%57 = OpExtInst %v3float %1 FAbs %65 -%56 = OpFOrdLessThan %v3bool %57 %66 -%55 = OpAll %bool %56 -OpBranch %54 -%54 = OpLabel -%68 = OpPhi %bool %false %40 %55 %53 -OpSelectionMerge %70 None -OpBranchConditional %68 %69 %70 -%69 = OpLabel -%75 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%76 = OpLoad %v4float %75 -%74 = OpExtInst %v4float %1 Radians %76 -%79 = OpFSub %v4float %74 %78 -%73 = OpExtInst %v4float %1 FAbs %79 -%72 = OpFOrdLessThan %v4bool %73 %80 -%71 = OpAll %bool %72 -OpBranch %70 -%70 = OpLabel -%82 = OpPhi %bool %false %54 %71 %69 -OpSelectionMerge %87 None -OpBranchConditional %82 %85 %86 -%85 = OpLabel -%88 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%90 = OpLoad %v4float %88 -OpStore %83 %90 -OpBranch %87 -%86 = OpLabel -%91 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%93 = OpLoad %v4float %91 -OpStore %83 %93 -OpBranch %87 -%87 = OpLabel -%94 = OpLoad %v4float %83 -OpReturnValue %94 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %83 = OpVariable %_ptr_Function_v4float Function + %29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %33 = OpLoad %v4float %29 + %34 = OpCompositeExtract %float %33 0 + %28 = OpExtInst %float %1 Radians %34 + %36 = OpFSub %float %28 %float_n0_021816615 + %27 = OpExtInst %float %1 FAbs %36 + %38 = OpFOrdLessThan %bool %27 %float_0_000500000024 + OpSelectionMerge %40 None + OpBranchConditional %38 %39 %40 + %39 = OpLabel + %45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %46 = OpLoad %v4float %45 + %47 = OpVectorShuffle %v2float %46 %46 0 1 + %44 = OpExtInst %v2float %1 Radians %47 + %49 = OpFSub %v2float %44 %48 + %43 = OpExtInst %v2float %1 FAbs %49 + %42 = OpFOrdLessThan %v2bool %43 %50 + %41 = OpAll %bool %42 + OpBranch %40 + %40 = OpLabel + %52 = OpPhi %bool %false %25 %41 %39 + OpSelectionMerge %54 None + OpBranchConditional %52 %53 %54 + %53 = OpLabel + %59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %60 = OpLoad %v4float %59 + %61 = OpVectorShuffle %v3float %60 %60 0 1 2 + %58 = OpExtInst %v3float %1 Radians %61 + %65 = OpFSub %v3float %58 %64 + %57 = OpExtInst %v3float %1 FAbs %65 + %56 = OpFOrdLessThan %v3bool %57 %66 + %55 = OpAll %bool %56 + OpBranch %54 + %54 = OpLabel + %68 = OpPhi %bool %false %40 %55 %53 + OpSelectionMerge %70 None + OpBranchConditional %68 %69 %70 + %69 = OpLabel + %75 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %76 = OpLoad %v4float %75 + %74 = OpExtInst %v4float %1 Radians %76 + %79 = OpFSub %v4float %74 %78 + %73 = OpExtInst %v4float %1 FAbs %79 + %72 = OpFOrdLessThan %v4bool %73 %80 + %71 = OpAll %bool %72 + OpBranch %70 + %70 = OpLabel + %82 = OpPhi %bool %false %54 %71 %69 + OpSelectionMerge %87 None + OpBranchConditional %82 %85 %86 + %85 = OpLabel + %88 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %90 = OpLoad %v4float %88 + OpStore %83 %90 + OpBranch %87 + %86 = OpLabel + %91 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %93 = OpLoad %v4float %91 + OpStore %83 %93 + OpBranch %87 + %87 = OpLabel + %94 = OpLoad %v4float %83 + OpReturnValue %94 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Radians.skrp b/tests/sksl/intrinsics/Radians.skrp index e310ab1934ae..60c4548d69ac 100644 --- a/tests/sksl/intrinsics/Radians.skrp +++ b/tests/sksl/intrinsics/Radians.skrp @@ -1,12 +1,14 @@ +44 instructions + [immutable slots] -expected(0) = 0xBCB2B8C2 (-0.021816615) -expected(1) = 0 -expected(2) = 0x3C567750 (0.01308997) -expected(3) = 0x3D20D97C (0.03926991) -allowedDelta(0) = 0x3A03126F (0.0005) -allowedDelta(1) = 0x3A03126F (0.0005) -allowedDelta(2) = 0x3A03126F (0.0005) -allowedDelta(3) = 0x3A03126F (0.0005) +i0 = 0xBCB2B8C2 (-0.021816615) +i1 = 0 +i2 = 0x3C567750 (0.01308997) +i3 = 0x3D20D97C (0.03926991) +i4 = 0x3A03126F (0.0005) +i5 = 0x3A03126F (0.0005) +i6 = 0x3A03126F (0.0005) +i7 = 0x3A03126F (0.0005) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -18,8 +20,7 @@ cmplt_imm_float $4 = lessThan($4, 0x3A03126F (0.0005)) copy_2_uniforms $5..6 = testInputs(0..1) splat_2_constants $7..8 = 0x3C8EFA35 (0.0174532924) mul_2_floats $5..6 *= $7..8 -copy_constant $7 = 0xBCB2B8C2 (-0.021816615) -copy_constant $8 = 0 +copy_2_immutables_unmasked $7..8 = i0..1 [0xBCB2B8C2 (-0.021816615), 0] sub_2_floats $5..6 -= $7..8 bitwise_and_imm_2_ints $5..6 &= 0x7FFFFFFF splat_2_constants $7..8 = 0x3A03126F (0.0005) @@ -29,9 +30,7 @@ bitwise_and_int $4 &= $5 copy_3_uniforms $5..7 = testInputs(0..2) splat_3_constants $8..10 = 0x3C8EFA35 (0.0174532924) mul_3_floats $5..7 *= $8..10 -copy_constant $8 = 0xBCB2B8C2 (-0.021816615) -copy_constant $9 = 0 -copy_constant $10 = 0x3C567750 (0.01308997) +copy_3_immutables_unmasked $8..10 = i0..2 [0xBCB2B8C2 (-0.021816615), 0, 0x3C567750 (0.01308997)] sub_3_floats $5..7 -= $8..10 bitwise_and_imm_3_ints $5..7 &= 0x7FFFFFFF splat_3_constants $8..10 = 0x3A03126F (0.0005) @@ -42,7 +41,7 @@ bitwise_and_int $4 &= $5 copy_4_uniforms $5..8 = testInputs splat_4_constants $9..12 = 0x3C8EFA35 (0.0174532924) mul_4_floats $5..8 *= $9..12 -copy_4_slots_unmasked $9..12 = expected +copy_4_immutables_unmasked $9..12 = i0..3 [0xBCB2B8C2 (-0.021816615), 0, 0x3C567750 (0.01308997), 0x3D20D97C (0.03926991)] sub_4_floats $5..8 -= $9..12 bitwise_and_imm_4_ints $5..8 &= 0x7FFFFFFF splat_4_constants $9..12 = 0x3A03126F (0.0005) @@ -50,9 +49,9 @@ cmplt_4_floats $5..8 = lessThan($5..8, $9..12) bitwise_and_2_ints $5..6 &= $7..8 bitwise_and_int $5 &= $6 bitwise_and_int $4 &= $5 -branch_if_no_active_lanes_eq branch +3 (label 0 at #46) if no lanes of $4 == 0xFFFFFFFF +branch_if_no_active_lanes_eq branch +3 (label 0 at #43) if no lanes of $4 == 0xFFFFFFFF copy_4_uniforms $0..3 = colorGreen -jump jump +3 (label 1 at #48) +jump jump +3 (label 1 at #45) label label 0 copy_4_uniforms $0..3 = colorRed label label 0x00000001 diff --git a/tests/sksl/intrinsics/Radians.wgsl b/tests/sksl/intrinsics/Radians.wgsl index a025302d610a..1b940a5bbb80 100644 --- a/tests/sksl/intrinsics/Radians.wgsl +++ b/tests/sksl/intrinsics/Radians.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -27,7 +28,7 @@ fn main(_skParam0: vec2) -> vec4 { let _skTemp8 = radians(_globalUniforms.testInputs); let _skTemp9 = abs(_skTemp8 - expected); let _skTemp10 = all(_skTemp9 < allowedDelta); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((_skTemp1 < 0.0005 && _skTemp4) && _skTemp7) && _skTemp10)); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((_skTemp1 < 0.0005) && _skTemp4) && _skTemp7) && _skTemp10)); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/intrinsics/Reflect.asm.frag b/tests/sksl/intrinsics/Reflect.asm.frag index 70c13504790a..6fafe072ebb9 100644 --- a/tests/sksl/intrinsics/Reflect.asm.frag +++ b/tests/sksl/intrinsics/Reflect.asm.frag @@ -1,214 +1,219 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "I" -OpMemberName %_UniformBuffer 1 "N" -OpMemberName %_UniformBuffer 2 "colorGreen" -OpMemberName %_UniformBuffer 3 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %expectedX "expectedX" -OpName %expectedXY "expectedXY" -OpName %expectedXYZ "expectedXYZ" -OpName %expectedXYZW "expectedXYZW" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 3 Offset 48 -OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %expectedX RelaxedPrecision -OpDecorate %expectedXY RelaxedPrecision -OpDecorate %expectedXYZ RelaxedPrecision -OpDecorate %expectedXYZW RelaxedPrecision -OpDecorate %48 RelaxedPrecision -OpDecorate %53 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %58 RelaxedPrecision -OpDecorate %62 RelaxedPrecision -OpDecorate %64 RelaxedPrecision -OpDecorate %65 RelaxedPrecision -OpDecorate %67 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %75 RelaxedPrecision -OpDecorate %77 RelaxedPrecision -OpDecorate %78 RelaxedPrecision -OpDecorate %80 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %88 RelaxedPrecision -OpDecorate %90 RelaxedPrecision -OpDecorate %92 RelaxedPrecision -OpDecorate %116 RelaxedPrecision -OpDecorate %119 RelaxedPrecision -OpDecorate %120 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "I" + OpMemberName %_UniformBuffer 1 "N" + OpMemberName %_UniformBuffer 2 "colorGreen" + OpMemberName %_UniformBuffer 3 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %expectedX "expectedX" + OpName %expectedXY "expectedXY" + OpName %expectedXYZ "expectedXYZ" + OpName %expectedXYZW "expectedXYZW" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 3 Offset 48 + OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %expectedX RelaxedPrecision + OpDecorate %28 RelaxedPrecision + OpDecorate %expectedXY RelaxedPrecision + OpDecorate %expectedXYZ RelaxedPrecision + OpDecorate %expectedXYZW RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %65 RelaxedPrecision + OpDecorate %67 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %71 RelaxedPrecision + OpDecorate %78 RelaxedPrecision + OpDecorate %80 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %83 RelaxedPrecision + OpDecorate %84 RelaxedPrecision + OpDecorate %91 RelaxedPrecision + OpDecorate %93 RelaxedPrecision + OpDecorate %95 RelaxedPrecision + OpDecorate %119 RelaxedPrecision + OpDecorate %122 RelaxedPrecision + OpDecorate %123 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_float = OpTypePointer Function %float -%float_n49 = OpConstant %float -49 -%float_n169 = OpConstant %float -169 -%float_202 = OpConstant %float 202 -%32 = OpConstantComposite %v2float %float_n169 %float_202 -%v3float = OpTypeVector %float 3 +%float_996878592 = OpConstant %float 996878592 +%float_n1_99999996e_34 = OpConstant %float -1.99999996e+34 + %float_n49 = OpConstant %float -49 + %float_n169 = OpConstant %float -169 + %float_202 = OpConstant %float 202 + %35 = OpConstantComposite %v2float %float_n169 %float_202 + %v3float = OpTypeVector %float 3 %_ptr_Function_v3float = OpTypePointer Function %v3float -%float_n379 = OpConstant %float -379 -%float_454 = OpConstant %float 454 -%float_n529 = OpConstant %float -529 -%39 = OpConstantComposite %v3float %float_n379 %float_454 %float_n529 + %float_n379 = OpConstant %float -379 + %float_454 = OpConstant %float 454 + %float_n529 = OpConstant %float -529 + %42 = OpConstantComposite %v3float %float_n379 %float_454 %float_n529 %_ptr_Function_v4float = OpTypePointer Function %v4float -%float_n699 = OpConstant %float -699 -%float_838 = OpConstant %float 838 -%float_n977 = OpConstant %float -977 -%float_1116 = OpConstant %float 1116 -%46 = OpConstantComposite %v4float %float_n699 %float_838 %float_n977 %float_1116 -%false = OpConstantFalse %bool + %float_n699 = OpConstant %float -699 + %float_838 = OpConstant %float 838 + %float_n977 = OpConstant %float -977 + %float_1116 = OpConstant %float 1116 + %49 = OpConstantComposite %v4float %float_n699 %float_838 %float_n977 %float_1116 + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%v2bool = OpTypeVector %bool 2 -%v3bool = OpTypeVector %bool 3 -%v4bool = OpTypeVector %bool 4 -%true = OpConstantTrue %bool -%int_2 = OpConstant %int 2 -%int_3 = OpConstant %int 3 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %v2bool = OpTypeVector %bool 2 + %v3bool = OpTypeVector %bool 3 + %v4bool = OpTypeVector %bool 4 + %true = OpConstantTrue %bool + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%expectedX = OpVariable %_ptr_Function_float Function -%expectedXY = OpVariable %_ptr_Function_v2float Function + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %expectedX = OpVariable %_ptr_Function_float Function + %expectedXY = OpVariable %_ptr_Function_v2float Function %expectedXYZ = OpVariable %_ptr_Function_v3float Function %expectedXYZW = OpVariable %_ptr_Function_v4float Function -%110 = OpVariable %_ptr_Function_v4float Function -OpStore %expectedX %float_n49 -OpStore %expectedXY %32 -OpStore %expectedXYZ %39 -OpStore %expectedXYZW %46 -%49 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%53 = OpLoad %v4float %49 -%54 = OpCompositeExtract %float %53 0 -%55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%57 = OpLoad %v4float %55 -%58 = OpCompositeExtract %float %57 0 -%48 = OpExtInst %float %1 Reflect %54 %58 -%59 = OpFOrdEqual %bool %48 %float_n49 -OpSelectionMerge %61 None -OpBranchConditional %59 %60 %61 -%60 = OpLabel -%63 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%64 = OpLoad %v4float %63 -%65 = OpVectorShuffle %v2float %64 %64 0 1 -%66 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%67 = OpLoad %v4float %66 -%68 = OpVectorShuffle %v2float %67 %67 0 1 -%62 = OpExtInst %v2float %1 Reflect %65 %68 -%69 = OpFOrdEqual %v2bool %62 %32 -%71 = OpAll %bool %69 -OpBranch %61 -%61 = OpLabel -%72 = OpPhi %bool %false %25 %71 %60 -OpSelectionMerge %74 None -OpBranchConditional %72 %73 %74 -%73 = OpLabel -%76 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%77 = OpLoad %v4float %76 -%78 = OpVectorShuffle %v3float %77 %77 0 1 2 -%79 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%80 = OpLoad %v4float %79 -%81 = OpVectorShuffle %v3float %80 %80 0 1 2 -%75 = OpExtInst %v3float %1 Reflect %78 %81 -%82 = OpFOrdEqual %v3bool %75 %39 -%84 = OpAll %bool %82 -OpBranch %74 -%74 = OpLabel -%85 = OpPhi %bool %false %61 %84 %73 -OpSelectionMerge %87 None -OpBranchConditional %85 %86 %87 -%86 = OpLabel -%89 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%90 = OpLoad %v4float %89 -%91 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%92 = OpLoad %v4float %91 -%88 = OpExtInst %v4float %1 Reflect %90 %92 -%93 = OpFOrdEqual %v4bool %88 %46 -%95 = OpAll %bool %93 -OpBranch %87 -%87 = OpLabel -%96 = OpPhi %bool %false %74 %95 %86 -OpSelectionMerge %98 None -OpBranchConditional %96 %97 %98 -%97 = OpLabel -OpBranch %98 -%98 = OpLabel -%100 = OpPhi %bool %false %87 %true %97 -OpSelectionMerge %102 None -OpBranchConditional %100 %101 %102 -%101 = OpLabel -OpBranch %102 -%102 = OpLabel -%103 = OpPhi %bool %false %98 %true %101 -OpSelectionMerge %105 None -OpBranchConditional %103 %104 %105 -%104 = OpLabel -OpBranch %105 -%105 = OpLabel -%106 = OpPhi %bool %false %102 %true %104 -OpSelectionMerge %108 None -OpBranchConditional %106 %107 %108 -%107 = OpLabel -OpBranch %108 -%108 = OpLabel -%109 = OpPhi %bool %false %105 %true %107 -OpSelectionMerge %113 None -OpBranchConditional %109 %111 %112 -%111 = OpLabel -%114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%116 = OpLoad %v4float %114 -OpStore %110 %116 -OpBranch %113 -%112 = OpLabel -%117 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%119 = OpLoad %v4float %117 -OpStore %110 %119 -OpBranch %113 -%113 = OpLabel -%120 = OpLoad %v4float %110 -OpReturnValue %120 -OpFunctionEnd + %113 = OpVariable %_ptr_Function_v4float Function + %28 = OpExtInst %float %1 Reflect %float_996878592 %float_n1_99999996e_34 + OpStore %expectedX %28 + OpStore %expectedX %float_n49 + OpStore %expectedXY %35 + OpStore %expectedXYZ %42 + OpStore %expectedXYZW %49 + %52 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %56 = OpLoad %v4float %52 + %57 = OpCompositeExtract %float %56 0 + %58 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %60 = OpLoad %v4float %58 + %61 = OpCompositeExtract %float %60 0 + %51 = OpExtInst %float %1 Reflect %57 %61 + %62 = OpFOrdEqual %bool %51 %float_n49 + OpSelectionMerge %64 None + OpBranchConditional %62 %63 %64 + %63 = OpLabel + %66 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %67 = OpLoad %v4float %66 + %68 = OpVectorShuffle %v2float %67 %67 0 1 + %69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %70 = OpLoad %v4float %69 + %71 = OpVectorShuffle %v2float %70 %70 0 1 + %65 = OpExtInst %v2float %1 Reflect %68 %71 + %72 = OpFOrdEqual %v2bool %65 %35 + %74 = OpAll %bool %72 + OpBranch %64 + %64 = OpLabel + %75 = OpPhi %bool %false %25 %74 %63 + OpSelectionMerge %77 None + OpBranchConditional %75 %76 %77 + %76 = OpLabel + %79 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %80 = OpLoad %v4float %79 + %81 = OpVectorShuffle %v3float %80 %80 0 1 2 + %82 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %83 = OpLoad %v4float %82 + %84 = OpVectorShuffle %v3float %83 %83 0 1 2 + %78 = OpExtInst %v3float %1 Reflect %81 %84 + %85 = OpFOrdEqual %v3bool %78 %42 + %87 = OpAll %bool %85 + OpBranch %77 + %77 = OpLabel + %88 = OpPhi %bool %false %64 %87 %76 + OpSelectionMerge %90 None + OpBranchConditional %88 %89 %90 + %89 = OpLabel + %92 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %93 = OpLoad %v4float %92 + %94 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %95 = OpLoad %v4float %94 + %91 = OpExtInst %v4float %1 Reflect %93 %95 + %96 = OpFOrdEqual %v4bool %91 %49 + %98 = OpAll %bool %96 + OpBranch %90 + %90 = OpLabel + %99 = OpPhi %bool %false %77 %98 %89 + OpSelectionMerge %101 None + OpBranchConditional %99 %100 %101 + %100 = OpLabel + OpBranch %101 + %101 = OpLabel + %103 = OpPhi %bool %false %90 %true %100 + OpSelectionMerge %105 None + OpBranchConditional %103 %104 %105 + %104 = OpLabel + OpBranch %105 + %105 = OpLabel + %106 = OpPhi %bool %false %101 %true %104 + OpSelectionMerge %108 None + OpBranchConditional %106 %107 %108 + %107 = OpLabel + OpBranch %108 + %108 = OpLabel + %109 = OpPhi %bool %false %105 %true %107 + OpSelectionMerge %111 None + OpBranchConditional %109 %110 %111 + %110 = OpLabel + OpBranch %111 + %111 = OpLabel + %112 = OpPhi %bool %false %108 %true %110 + OpSelectionMerge %116 None + OpBranchConditional %112 %114 %115 + %114 = OpLabel + %117 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %119 = OpLoad %v4float %117 + OpStore %113 %119 + OpBranch %116 + %115 = OpLabel + %120 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %122 = OpLoad %v4float %120 + OpStore %113 %122 + OpBranch %116 + %116 = OpLabel + %123 = OpLoad %v4float %113 + OpReturnValue %123 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Reflect.glsl b/tests/sksl/intrinsics/Reflect.glsl index 0457e6874520..3d97714df0bb 100644 --- a/tests/sksl/intrinsics/Reflect.glsl +++ b/tests/sksl/intrinsics/Reflect.glsl @@ -5,7 +5,8 @@ uniform vec4 N; uniform vec4 colorGreen; uniform vec4 colorRed; vec4 main() { - float expectedX = -49.0; + float expectedX = reflect(9.968786e+08, -2e+34); + expectedX = -49.0; vec2 expectedXY = vec2(-169.0, 202.0); vec3 expectedXYZ = vec3(-379.0, 454.0, -529.0); vec4 expectedXYZW = vec4(-699.0, 838.0, -977.0, 1116.0); diff --git a/tests/sksl/intrinsics/Reflect.hlsl b/tests/sksl/intrinsics/Reflect.hlsl index 21559d6ce724..d985d04da77e 100644 --- a/tests/sksl/intrinsics/Reflect.hlsl +++ b/tests/sksl/intrinsics/Reflect.hlsl @@ -21,51 +21,43 @@ float spvReflect(float i, float n) float4 main(float2 _24) { - float expectedX = -49.0f; + float expectedX = spvReflect(996878592.0f, -1.9999999580429535907214788975919e+34f); + expectedX = -49.0f; float2 expectedXY = float2(-169.0f, 202.0f); float3 expectedXYZ = float3(-379.0f, 454.0f, -529.0f); float4 expectedXYZW = float4(-699.0f, 838.0f, -977.0f, 1116.0f); - bool _72 = false; + bool _75 = false; if (spvReflect(_10_I.x, _10_N.x) == (-49.0f)) { - float2 _62 = reflect(_10_I.xy, _10_N.xy); - _72 = all(bool2(_62.x == float2(-169.0f, 202.0f).x, _62.y == float2(-169.0f, 202.0f).y)); + float2 _65 = reflect(_10_I.xy, _10_N.xy); + _75 = all(bool2(_65.x == float2(-169.0f, 202.0f).x, _65.y == float2(-169.0f, 202.0f).y)); } else { - _72 = false; + _75 = false; } - bool _85 = false; - if (_72) + bool _88 = false; + if (_75) { - float3 _75 = reflect(_10_I.xyz, _10_N.xyz); - _85 = all(bool3(_75.x == float3(-379.0f, 454.0f, -529.0f).x, _75.y == float3(-379.0f, 454.0f, -529.0f).y, _75.z == float3(-379.0f, 454.0f, -529.0f).z)); + float3 _78 = reflect(_10_I.xyz, _10_N.xyz); + _88 = all(bool3(_78.x == float3(-379.0f, 454.0f, -529.0f).x, _78.y == float3(-379.0f, 454.0f, -529.0f).y, _78.z == float3(-379.0f, 454.0f, -529.0f).z)); } else { - _85 = false; + _88 = false; } - bool _96 = false; - if (_85) + bool _99 = false; + if (_88) { - float4 _88 = reflect(_10_I, _10_N); - _96 = all(bool4(_88.x == float4(-699.0f, 838.0f, -977.0f, 1116.0f).x, _88.y == float4(-699.0f, 838.0f, -977.0f, 1116.0f).y, _88.z == float4(-699.0f, 838.0f, -977.0f, 1116.0f).z, _88.w == float4(-699.0f, 838.0f, -977.0f, 1116.0f).w)); + float4 _91 = reflect(_10_I, _10_N); + _99 = all(bool4(_91.x == float4(-699.0f, 838.0f, -977.0f, 1116.0f).x, _91.y == float4(-699.0f, 838.0f, -977.0f, 1116.0f).y, _91.z == float4(-699.0f, 838.0f, -977.0f, 1116.0f).z, _91.w == float4(-699.0f, 838.0f, -977.0f, 1116.0f).w)); } else { - _96 = false; - } - bool _100 = false; - if (_96) - { - _100 = true; - } - else - { - _100 = false; + _99 = false; } bool _103 = false; - if (_100) + if (_99) { _103 = true; } @@ -91,16 +83,25 @@ float4 main(float2 _24) { _109 = false; } - float4 _110 = 0.0f.xxxx; + bool _112 = false; if (_109) { - _110 = _10_colorGreen; + _112 = true; + } + else + { + _112 = false; + } + float4 _113 = 0.0f.xxxx; + if (_112) + { + _113 = _10_colorGreen; } else { - _110 = _10_colorRed; + _113 = _10_colorRed; } - return _110; + return _113; } void frag_main() diff --git a/tests/sksl/intrinsics/Reflect.metal b/tests/sksl/intrinsics/Reflect.metal index f9c505caf07d..ca896eb18f7a 100644 --- a/tests/sksl/intrinsics/Reflect.metal +++ b/tests/sksl/intrinsics/Reflect.metal @@ -17,10 +17,13 @@ fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _unifo (void)_out; half _skTemp0; half _skTemp1; - half expectedX = -49.0h; + half _skTemp2; + half _skTemp3; + half expectedX = (_skTemp0 = 9.968786e+08h, _skTemp1 = -2e+34h, _skTemp0 - 2 * _skTemp1 * _skTemp0 * _skTemp1); + expectedX = -49.0h; half2 expectedXY = half2(-169.0h, 202.0h); half3 expectedXYZ = half3(-379.0h, 454.0h, -529.0h); half4 expectedXYZW = half4(-699.0h, 838.0h, -977.0h, 1116.0h); - _out.sk_FragColor = (((((((_skTemp0 = _uniforms.I.x, _skTemp1 = _uniforms.N.x, _skTemp0 - 2 * _skTemp1 * _skTemp0 * _skTemp1) == expectedX && all(reflect(_uniforms.I.xy, _uniforms.N.xy) == expectedXY)) && all(reflect(_uniforms.I.xyz, _uniforms.N.xyz) == expectedXYZ)) && all(reflect(_uniforms.I, _uniforms.N) == expectedXYZW)) && -49.0h == expectedX) && all(half2(-169.0h, 202.0h) == expectedXY)) && all(half3(-379.0h, 454.0h, -529.0h) == expectedXYZ)) && all(half4(-699.0h, 838.0h, -977.0h, 1116.0h) == expectedXYZW) ? _uniforms.colorGreen : _uniforms.colorRed; + _out.sk_FragColor = (((((((_skTemp2 = _uniforms.I.x, _skTemp3 = _uniforms.N.x, _skTemp2 - 2 * _skTemp3 * _skTemp2 * _skTemp3) == expectedX && all(reflect(_uniforms.I.xy, _uniforms.N.xy) == expectedXY)) && all(reflect(_uniforms.I.xyz, _uniforms.N.xyz) == expectedXYZ)) && all(reflect(_uniforms.I, _uniforms.N) == expectedXYZW)) && -49.0h == expectedX) && all(half2(-169.0h, 202.0h) == expectedXY)) && all(half3(-379.0h, 454.0h, -529.0h) == expectedXYZ)) && all(half4(-699.0h, 838.0h, -977.0h, 1116.0h) == expectedXYZW) ? _uniforms.colorGreen : _uniforms.colorRed; return _out; } diff --git a/tests/sksl/intrinsics/Reflect.skrp b/tests/sksl/intrinsics/Reflect.skrp index f1b660a8c568..db1dd6b9a740 100644 --- a/tests/sksl/intrinsics/Reflect.skrp +++ b/tests/sksl/intrinsics/Reflect.skrp @@ -1,17 +1,27 @@ +85 instructions + [immutable slots] -expectedX = 0xC2440000 (-49.0) -expectedXY(0) = 0xC3290000 (-169.0) -expectedXY(1) = 0x434A0000 (202.0) -expectedXYZ(0) = 0xC3BD8000 (-379.0) -expectedXYZ(1) = 0x43E30000 (454.0) -expectedXYZ(2) = 0xC4044000 (-529.0) -expectedXYZW(0) = 0xC42EC000 (-699.0) -expectedXYZW(1) = 0x44518000 (838.0) -expectedXYZW(2) = 0xC4744000 (-977.0) -expectedXYZW(3) = 0x448B8000 (1116.0) +i0 = 0xC3290000 (-169.0) +i1 = 0x434A0000 (202.0) +i2 = 0xC3BD8000 (-379.0) +i3 = 0x43E30000 (454.0) +i4 = 0xC4044000 (-529.0) +i5 = 0xC42EC000 (-699.0) +i6 = 0x44518000 (838.0) +i7 = 0xC4744000 (-977.0) +i8 = 0x448B8000 (1116.0) store_src_rg xy = src.rg init_lane_masks CondMask = LoopMask = RetMask = true +copy_constant $0 = 0x4E6DACA4 (9.968786e+08) +copy_constant $1 = 0xF87684DF (-2e+34) +copy_2_slots_unmasked $2..3 = $0..1 +mul_float $2 *= $3 +mul_imm_float $2 *= 0x40000000 (2.0) +mul_float $1 *= $2 +sub_float $0 -= $1 +copy_slot_unmasked expectedX = $0 +copy_constant expectedX = 0xC2440000 (-49.0) copy_uniform $0 = I(0) copy_uniform $1 = N(0) copy_2_slots_unmasked $2..3 = $0..1 @@ -29,7 +39,7 @@ mul_imm_float $5 *= 0x40000000 (2.0) copy_slot_unmasked $6 = $5 mul_2_floats $3..4 *= $5..6 sub_2_floats $1..2 -= $3..4 -copy_2_slots_unmasked $3..4 = expectedXY +copy_2_immutables_unmasked $3..4 = i0..1 [0xC3290000 (-169.0), 0x434A0000 (202.0)] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 @@ -42,7 +52,7 @@ mul_imm_float $7 *= 0x40000000 (2.0) swizzle_3 $7..9 = ($7..9).xxx mul_3_floats $4..6 *= $7..9 sub_3_floats $1..3 -= $4..6 -copy_3_slots_unmasked $4..6 = expectedXYZ +copy_3_immutables_unmasked $4..6 = i2..4 [0xC3BD8000 (-379.0), 0x43E30000 (454.0), 0xC4044000 (-529.0)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 @@ -56,7 +66,7 @@ mul_imm_float $9 *= 0x40000000 (2.0) swizzle_4 $9..12 = ($9..12).xxxx mul_4_floats $5..8 *= $9..12 sub_4_floats $1..4 -= $5..8 -copy_4_slots_unmasked $5..8 = expectedXYZW +copy_4_immutables_unmasked $5..8 = i5..8 [0xC42EC000 (-699.0), 0x44518000 (838.0), 0xC4744000 (-977.0), 0x448B8000 (1116.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -64,25 +74,19 @@ bitwise_and_int $0 &= $1 copy_slot_unmasked $1 = expectedX cmpeq_imm_float $1 = equal($1, 0xC2440000 (-49.0)) bitwise_and_int $0 &= $1 -copy_constant $1 = 0xC3290000 (-169.0) -copy_constant $2 = 0x434A0000 (202.0) -copy_2_slots_unmasked $3..4 = expectedXY +copy_2_immutables_unmasked $1..2 = i0..1 [0xC3290000 (-169.0), 0x434A0000 (202.0)] +copy_2_immutables_unmasked $3..4 = i0..1 [0xC3290000 (-169.0), 0x434A0000 (202.0)] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0xC3BD8000 (-379.0) -copy_constant $2 = 0x43E30000 (454.0) -copy_constant $3 = 0xC4044000 (-529.0) -copy_3_slots_unmasked $4..6 = expectedXYZ +copy_3_immutables_unmasked $1..3 = i2..4 [0xC3BD8000 (-379.0), 0x43E30000 (454.0), 0xC4044000 (-529.0)] +copy_3_immutables_unmasked $4..6 = i2..4 [0xC3BD8000 (-379.0), 0x43E30000 (454.0), 0xC4044000 (-529.0)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0xC42EC000 (-699.0) -copy_constant $2 = 0x44518000 (838.0) -copy_constant $3 = 0xC4744000 (-977.0) -copy_constant $4 = 0x448B8000 (1116.0) -copy_4_slots_unmasked $5..8 = expectedXYZW +copy_4_immutables_unmasked $1..4 = i5..8 [0xC42EC000 (-699.0), 0x44518000 (838.0), 0xC4744000 (-977.0), 0x448B8000 (1116.0)] +copy_4_immutables_unmasked $5..8 = i5..8 [0xC42EC000 (-699.0), 0x44518000 (838.0), 0xC4744000 (-977.0), 0x448B8000 (1116.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 diff --git a/tests/sksl/intrinsics/Reflect.wgsl b/tests/sksl/intrinsics/Reflect.wgsl new file mode 100644 index 000000000000..8df0e5006cf0 --- /dev/null +++ b/tests/sksl/intrinsics/Reflect.wgsl @@ -0,0 +1,39 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + I: vec4, + N: vec4, + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let xy = _skParam0; + { + let _skTemp0 = -2e+34; + let _skTemp1 = 9.968786e+08 - 2 * _skTemp0 * 9.968786e+08 * _skTemp0; + var expectedX: f32 = _skTemp1; + expectedX = -49.0; + var expectedXY: vec2 = vec2(-169.0, 202.0); + var expectedXYZ: vec3 = vec3(-379.0, 454.0, -529.0); + var expectedXYZW: vec4 = vec4(-699.0, 838.0, -977.0, 1116.0); + let _skTemp2 = _globalUniforms.I.x; + let _skTemp3 = _globalUniforms.N.x; + let _skTemp4 = _skTemp2 - 2 * _skTemp3 * _skTemp2 * _skTemp3; + let _skTemp5 = reflect(_globalUniforms.I.xy, _globalUniforms.N.xy); + let _skTemp6 = reflect(_globalUniforms.I.xyz, _globalUniforms.N.xyz); + let _skTemp7 = reflect(_globalUniforms.I, _globalUniforms.N); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((_skTemp4 == expectedX) && all(_skTemp5 == expectedXY)) && all(_skTemp6 == expectedXYZ)) && all(_skTemp7 == expectedXYZW)) && (-49.0 == expectedX)) && all(vec2(-169.0, 202.0) == expectedXY)) && all(vec3(-379.0, 454.0, -529.0) == expectedXYZ)) && all(vec4(-699.0, 838.0, -977.0, 1116.0) == expectedXYZW))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/intrinsics/Refract.asm.frag b/tests/sksl/intrinsics/Refract.asm.frag index 978d921310c0..9430122ba611 100644 --- a/tests/sksl/intrinsics/Refract.asm.frag +++ b/tests/sksl/intrinsics/Refract.asm.frag @@ -1,117 +1,124 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "a" -OpMemberName %_UniformBuffer 1 "b" -OpMemberName %_UniformBuffer 2 "c" -OpMemberName %_UniformBuffer 3 "d" -OpMemberName %_UniformBuffer 4 "e" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %result "result" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 4 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 8 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 3 Offset 16 -OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 4 Offset 32 -OpMemberDecorate %_UniformBuffer 4 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %result RelaxedPrecision -OpDecorate %28 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %39 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %49 RelaxedPrecision -OpDecorate %51 RelaxedPrecision -OpDecorate %55 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %59 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "a" + OpMemberName %_UniformBuffer 1 "b" + OpMemberName %_UniformBuffer 2 "c" + OpMemberName %_UniformBuffer 3 "d" + OpMemberName %_UniformBuffer 4 "e" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %result "result" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 4 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 8 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 3 Offset 16 + OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 4 Offset 32 + OpMemberDecorate %_UniformBuffer 4 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %result RelaxedPrecision + OpDecorate %28 RelaxedPrecision + OpDecorate %31 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %53 RelaxedPrecision + OpDecorate %55 RelaxedPrecision + OpDecorate %59 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %63 RelaxedPrecision + OpDecorate %64 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %float %float %float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float +%float_6_00000015e_26 = OpConstant %float 6.00000015e+26 + %float_2 = OpConstant %float 2 %_ptr_Uniform_float = OpTypePointer Uniform %float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 %_ptr_Function_float = OpTypePointer Function %float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_3 = OpConstant %int 3 -%int_4 = OpConstant %int 4 -%float_0_5 = OpConstant %float 0.5 + %int_3 = OpConstant %int 3 + %int_4 = OpConstant %int 4 + %float_0_5 = OpConstant %float 0.5 %float_n0_866025388 = OpConstant %float -0.866025388 -%54 = OpConstantComposite %v2float %float_0_5 %float_n0_866025388 -%v3float = OpTypeVector %float 3 -%58 = OpConstantComposite %v3float %float_0_5 %float_0 %float_n0_866025388 -%61 = OpConstantComposite %v4float %float_0_5 %float_0 %float_0 %float_n0_866025388 + %58 = OpConstantComposite %v2float %float_0_5 %float_n0_866025388 + %v3float = OpTypeVector %float 3 + %62 = OpConstantComposite %v3float %float_0_5 %float_0 %float_n0_866025388 + %65 = OpConstantComposite %v4float %float_0_5 %float_0 %float_0 %float_n0_866025388 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%result = OpVariable %_ptr_Function_v4float Function -%29 = OpAccessChain %_ptr_Uniform_float %10 %int_0 -%33 = OpLoad %float %29 -%34 = OpAccessChain %_ptr_Uniform_float %10 %int_1 -%36 = OpLoad %float %34 -%37 = OpAccessChain %_ptr_Uniform_float %10 %int_2 -%39 = OpLoad %float %37 -%28 = OpExtInst %float %1 Refract %33 %36 %39 -%40 = OpAccessChain %_ptr_Function_float %result %int_0 -OpStore %40 %28 -%43 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%46 = OpLoad %v4float %43 -%47 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 -%49 = OpLoad %v4float %47 -%50 = OpAccessChain %_ptr_Uniform_float %10 %int_2 -%51 = OpLoad %float %50 -%42 = OpExtInst %v4float %1 Refract %46 %49 %51 -OpStore %result %42 -%55 = OpLoad %v4float %result -%56 = OpVectorShuffle %v4float %55 %54 4 5 2 3 -OpStore %result %56 -%59 = OpLoad %v4float %result -%60 = OpVectorShuffle %v4float %59 %58 4 5 6 3 -OpStore %result %60 -OpStore %result %61 -OpReturnValue %61 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %result = OpVariable %_ptr_Function_v4float Function + %28 = OpExtInst %float %1 Refract %float_6_00000015e_26 %float_2 %float_2 + %31 = OpCompositeConstruct %v4float %28 %28 %28 %28 + OpStore %result %31 + %33 = OpAccessChain %_ptr_Uniform_float %10 %int_0 + %37 = OpLoad %float %33 + %38 = OpAccessChain %_ptr_Uniform_float %10 %int_1 + %40 = OpLoad %float %38 + %41 = OpAccessChain %_ptr_Uniform_float %10 %int_2 + %43 = OpLoad %float %41 + %32 = OpExtInst %float %1 Refract %37 %40 %43 + %44 = OpAccessChain %_ptr_Function_float %result %int_0 + OpStore %44 %32 + %47 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %50 = OpLoad %v4float %47 + %51 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4 + %53 = OpLoad %v4float %51 + %54 = OpAccessChain %_ptr_Uniform_float %10 %int_2 + %55 = OpLoad %float %54 + %46 = OpExtInst %v4float %1 Refract %50 %53 %55 + OpStore %result %46 + %59 = OpLoad %v4float %result + %60 = OpVectorShuffle %v4float %59 %58 4 5 2 3 + OpStore %result %60 + %63 = OpLoad %v4float %result + %64 = OpVectorShuffle %v4float %63 %62 4 5 6 3 + OpStore %result %64 + OpStore %result %65 + OpReturnValue %65 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Refract.glsl b/tests/sksl/intrinsics/Refract.glsl index 536e3afc2845..dce9d8510610 100644 --- a/tests/sksl/intrinsics/Refract.glsl +++ b/tests/sksl/intrinsics/Refract.glsl @@ -6,7 +6,7 @@ uniform float c; uniform vec4 d; uniform vec4 e; vec4 main() { - vec4 result; + vec4 result = vec4(refract(6e+26, 2.0, 2.0)); result.x = refract(a, b, c); result = refract(d, e, c); result.xy = vec2(0.5, -0.8660254); diff --git a/tests/sksl/intrinsics/Refract.hlsl b/tests/sksl/intrinsics/Refract.hlsl index da031fde6942..df2b64dbc19a 100644 --- a/tests/sksl/intrinsics/Refract.hlsl +++ b/tests/sksl/intrinsics/Refract.hlsl @@ -32,7 +32,7 @@ float spvRefract(float i, float n, float eta) float4 main(float2 _24) { - float4 result = 0.0f.xxxx; + float4 result = spvRefract(600000015226585740692422656.0f, 2.0f, 2.0f).xxxx; result.x = spvRefract(_10_a, _10_b, _10_c); result = refract(_10_d, _10_e, _10_c); result = float4(float2(0.5f, -0.866025388240814208984375f).x, float2(0.5f, -0.866025388240814208984375f).y, result.z, result.w); diff --git a/tests/sksl/intrinsics/Refract.metal b/tests/sksl/intrinsics/Refract.metal index 90e705e8bdb3..3011f6a73574 100644 --- a/tests/sksl/intrinsics/Refract.metal +++ b/tests/sksl/intrinsics/Refract.metal @@ -16,7 +16,7 @@ struct Outputs { fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) { Outputs _out; (void)_out; - half4 result; + half4 result = half4((refract(float2(6e+26h, 0), float2(2.0h, 0), 2.0h).x)); result.x = (refract(float2(_uniforms.a, 0), float2(_uniforms.b, 0), _uniforms.c).x); result = refract(_uniforms.d, _uniforms.e, _uniforms.c); result.xy = half2(0.5h, -0.8660254h); diff --git a/tests/sksl/intrinsics/Refract.skrp b/tests/sksl/intrinsics/Refract.skrp index 472b86de6e0b..c41a50f91935 100644 --- a/tests/sksl/intrinsics/Refract.skrp +++ b/tests/sksl/intrinsics/Refract.skrp @@ -1,6 +1,26 @@ +27 instructions + +[immutable slots] +i0 = 0x3F000000 (0.5) +i1 = 0xBF5DB3D7 (-0.8660254) +i2 = 0x3F000000 (0.5) +i3 = 0 +i4 = 0xBF5DB3D7 (-0.8660254) +i5 = 0x3F000000 (0.5) +i6 = 0 +i7 = 0 +i8 = 0xBF5DB3D7 (-0.8660254) + store_src_rg v0..1 = src.rg init_lane_masks CondMask = LoopMask = RetMask = true -splat_4_constants result = 0 +copy_constant $0 = 0x6BF82779 (6e+26) +splat_3_constants $1..3 = 0 +copy_constant $4 = 0x40000000 (2.0) +splat_3_constants $5..7 = 0 +copy_constant $8 = 0x40000000 (2.0) +refract_4_floats $0..3 = refract($0..3, $4..7, $8) +swizzle_4 $0..3 = ($0..3).xxxx +copy_4_slots_unmasked result = $0..3 copy_uniform $0 = a splat_3_constants $1..3 = 0 copy_uniform $4 = b @@ -13,13 +33,8 @@ copy_4_uniforms $4..7 = e copy_uniform $8 = c refract_4_floats $0..3 = refract($0..3, $4..7, $8) copy_4_slots_unmasked result = $0..3 -copy_constant result(0) = 0x3F000000 (0.5) -copy_constant result(1) = 0xBF5DB3D7 (-0.8660254) -copy_constant result(0) = 0x3F000000 (0.5) -copy_constant result(1) = 0 -copy_constant result(2) = 0xBF5DB3D7 (-0.8660254) -copy_constant result(0) = 0x3F000000 (0.5) -splat_2_constants result(1..2) = 0 -copy_constant result(3) = 0xBF5DB3D7 (-0.8660254) +copy_2_immutables_unmasked result(0..1) = i0..1 [0x3F000000 (0.5), 0xBF5DB3D7 (-0.8660254)] +copy_3_immutables_unmasked result(0..2) = i2..4 [0x3F000000 (0.5), 0, 0xBF5DB3D7 (-0.8660254)] +copy_4_immutables_unmasked result = i5..8 [0x3F000000 (0.5), 0, 0, 0xBF5DB3D7 (-0.8660254)] copy_4_slots_unmasked $0..3 = result load_src src.rgba = $0..3 diff --git a/tests/sksl/intrinsics/Refract.wgsl b/tests/sksl/intrinsics/Refract.wgsl new file mode 100644 index 000000000000..49a3270e6329 --- /dev/null +++ b/tests/sksl/intrinsics/Refract.wgsl @@ -0,0 +1,36 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + a: f32, + b: f32, + c: f32, + d: vec4, + e: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + { + let _skTemp0 = 2.0; + let _skTemp1 = refract(vec2(6e+26, 0), vec2(2.0, 0), _skTemp0).x; + var result: vec4 = vec4(_skTemp1); + let _skTemp2 = refract(vec2(_globalUniforms.a, 0), vec2(_globalUniforms.b, 0), _globalUniforms.c).x; + result.x = _skTemp2; + let _skTemp3 = refract(_globalUniforms.d, _globalUniforms.e, _globalUniforms.c); + result = _skTemp3; + result = vec4((vec2(0.5, -0.8660254)), result.zw).xyzw; + result = vec4((vec3(0.5, 0.0, -0.8660254)), result.w).xyzw; + result = vec4(0.5, 0.0, 0.0, -0.8660254); + return result; + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/intrinsics/Round.asm.frag b/tests/sksl/intrinsics/Round.asm.frag index c7deccd006a1..1a74f3d92e0e 100644 --- a/tests/sksl/intrinsics/Round.asm.frag +++ b/tests/sksl/intrinsics/Round.asm.frag @@ -1,142 +1,142 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testInputs" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %27 RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %49 RelaxedPrecision -OpDecorate %51 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %62 RelaxedPrecision -OpDecorate %64 RelaxedPrecision -OpDecorate %78 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %82 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testInputs" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %27 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %49 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %62 RelaxedPrecision + OpDecorate %64 RelaxedPrecision + OpDecorate %78 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %82 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%false = OpConstantFalse %bool + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%float_n1 = OpConstant %float -1 -%42 = OpConstantComposite %v2float %float_n1 %float_0 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%float_1 = OpConstant %float 1 -%55 = OpConstantComposite %v3float %float_n1 %float_0 %float_1 -%v3bool = OpTypeVector %bool 3 -%float_2 = OpConstant %float 2 -%66 = OpConstantComposite %v4float %float_n1 %float_0 %float_1 %float_2 -%v4bool = OpTypeVector %bool 4 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %float_n1 = OpConstant %float -1 + %42 = OpConstantComposite %v2float %float_n1 %float_0 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %55 = OpConstantComposite %v3float %float_n1 %float_0 %float_1 + %v3bool = OpTypeVector %bool 3 + %float_2 = OpConstant %float 2 + %66 = OpConstantComposite %v4float %float_n1 %float_0 %float_1 %float_2 + %v4bool = OpTypeVector %bool 4 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%71 = OpVariable %_ptr_Function_v4float Function -%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %28 -%33 = OpCompositeExtract %float %32 0 -%27 = OpExtInst %float %1 Round %33 -%35 = OpFOrdEqual %bool %27 %float_n1 -OpSelectionMerge %37 None -OpBranchConditional %35 %36 %37 -%36 = OpLabel -%39 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%40 = OpLoad %v4float %39 -%41 = OpVectorShuffle %v2float %40 %40 0 1 -%38 = OpExtInst %v2float %1 Round %41 -%43 = OpFOrdEqual %v2bool %38 %42 -%45 = OpAll %bool %43 -OpBranch %37 -%37 = OpLabel -%46 = OpPhi %bool %false %25 %45 %36 -OpSelectionMerge %48 None -OpBranchConditional %46 %47 %48 -%47 = OpLabel -%50 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%51 = OpLoad %v4float %50 -%52 = OpVectorShuffle %v3float %51 %51 0 1 2 -%49 = OpExtInst %v3float %1 Round %52 -%56 = OpFOrdEqual %v3bool %49 %55 -%58 = OpAll %bool %56 -OpBranch %48 -%48 = OpLabel -%59 = OpPhi %bool %false %37 %58 %47 -OpSelectionMerge %61 None -OpBranchConditional %59 %60 %61 -%60 = OpLabel -%63 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%64 = OpLoad %v4float %63 -%62 = OpExtInst %v4float %1 Round %64 -%67 = OpFOrdEqual %v4bool %62 %66 -%69 = OpAll %bool %67 -OpBranch %61 -%61 = OpLabel -%70 = OpPhi %bool %false %48 %69 %60 -OpSelectionMerge %75 None -OpBranchConditional %70 %73 %74 -%73 = OpLabel -%76 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%78 = OpLoad %v4float %76 -OpStore %71 %78 -OpBranch %75 -%74 = OpLabel -%79 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%81 = OpLoad %v4float %79 -OpStore %71 %81 -OpBranch %75 -%75 = OpLabel -%82 = OpLoad %v4float %71 -OpReturnValue %82 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %71 = OpVariable %_ptr_Function_v4float Function + %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %28 + %33 = OpCompositeExtract %float %32 0 + %27 = OpExtInst %float %1 Round %33 + %35 = OpFOrdEqual %bool %27 %float_n1 + OpSelectionMerge %37 None + OpBranchConditional %35 %36 %37 + %36 = OpLabel + %39 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %40 = OpLoad %v4float %39 + %41 = OpVectorShuffle %v2float %40 %40 0 1 + %38 = OpExtInst %v2float %1 Round %41 + %43 = OpFOrdEqual %v2bool %38 %42 + %45 = OpAll %bool %43 + OpBranch %37 + %37 = OpLabel + %46 = OpPhi %bool %false %25 %45 %36 + OpSelectionMerge %48 None + OpBranchConditional %46 %47 %48 + %47 = OpLabel + %50 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %51 = OpLoad %v4float %50 + %52 = OpVectorShuffle %v3float %51 %51 0 1 2 + %49 = OpExtInst %v3float %1 Round %52 + %56 = OpFOrdEqual %v3bool %49 %55 + %58 = OpAll %bool %56 + OpBranch %48 + %48 = OpLabel + %59 = OpPhi %bool %false %37 %58 %47 + OpSelectionMerge %61 None + OpBranchConditional %59 %60 %61 + %60 = OpLabel + %63 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %64 = OpLoad %v4float %63 + %62 = OpExtInst %v4float %1 Round %64 + %67 = OpFOrdEqual %v4bool %62 %66 + %69 = OpAll %bool %67 + OpBranch %61 + %61 = OpLabel + %70 = OpPhi %bool %false %48 %69 %60 + OpSelectionMerge %75 None + OpBranchConditional %70 %73 %74 + %73 = OpLabel + %76 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %78 = OpLoad %v4float %76 + OpStore %71 %78 + OpBranch %75 + %74 = OpLabel + %79 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %81 = OpLoad %v4float %79 + OpStore %71 %81 + OpBranch %75 + %75 = OpLabel + %82 = OpLoad %v4float %71 + OpReturnValue %82 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Round.wgsl b/tests/sksl/intrinsics/Round.wgsl new file mode 100644 index 000000000000..153ebfd655ed --- /dev/null +++ b/tests/sksl/intrinsics/Round.wgsl @@ -0,0 +1,30 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + testInputs: vec4, + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + const expectedA: vec4 = vec4(-1.0, 0.0, 1.0, 2.0); + let _skTemp0 = round(_globalUniforms.testInputs.x); + let _skTemp1 = round(_globalUniforms.testInputs.xy); + let _skTemp2 = round(_globalUniforms.testInputs.xyz); + let _skTemp3 = round(_globalUniforms.testInputs); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((f32(_skTemp0) == -1.0) && all(vec2(_skTemp1) == vec2(-1.0, 0.0))) && all(vec3(_skTemp2) == vec3(-1.0, 0.0, 1.0))) && all(vec4(_skTemp3) == expectedA))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/intrinsics/RoundEven.asm.frag b/tests/sksl/intrinsics/RoundEven.asm.frag index cc14991447bc..80a3a9687445 100644 --- a/tests/sksl/intrinsics/RoundEven.asm.frag +++ b/tests/sksl/intrinsics/RoundEven.asm.frag @@ -1,142 +1,142 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testInputs" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %27 RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %49 RelaxedPrecision -OpDecorate %51 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %62 RelaxedPrecision -OpDecorate %64 RelaxedPrecision -OpDecorate %78 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %82 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testInputs" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %27 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %49 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %62 RelaxedPrecision + OpDecorate %64 RelaxedPrecision + OpDecorate %78 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %82 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%false = OpConstantFalse %bool + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%float_n1 = OpConstant %float -1 -%42 = OpConstantComposite %v2float %float_n1 %float_0 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%float_1 = OpConstant %float 1 -%55 = OpConstantComposite %v3float %float_n1 %float_0 %float_1 -%v3bool = OpTypeVector %bool 3 -%float_2 = OpConstant %float 2 -%66 = OpConstantComposite %v4float %float_n1 %float_0 %float_1 %float_2 -%v4bool = OpTypeVector %bool 4 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %float_n1 = OpConstant %float -1 + %42 = OpConstantComposite %v2float %float_n1 %float_0 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %55 = OpConstantComposite %v3float %float_n1 %float_0 %float_1 + %v3bool = OpTypeVector %bool 3 + %float_2 = OpConstant %float 2 + %66 = OpConstantComposite %v4float %float_n1 %float_0 %float_1 %float_2 + %v4bool = OpTypeVector %bool 4 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%71 = OpVariable %_ptr_Function_v4float Function -%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %28 -%33 = OpCompositeExtract %float %32 0 -%27 = OpExtInst %float %1 RoundEven %33 -%35 = OpFOrdEqual %bool %27 %float_n1 -OpSelectionMerge %37 None -OpBranchConditional %35 %36 %37 -%36 = OpLabel -%39 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%40 = OpLoad %v4float %39 -%41 = OpVectorShuffle %v2float %40 %40 0 1 -%38 = OpExtInst %v2float %1 RoundEven %41 -%43 = OpFOrdEqual %v2bool %38 %42 -%45 = OpAll %bool %43 -OpBranch %37 -%37 = OpLabel -%46 = OpPhi %bool %false %25 %45 %36 -OpSelectionMerge %48 None -OpBranchConditional %46 %47 %48 -%47 = OpLabel -%50 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%51 = OpLoad %v4float %50 -%52 = OpVectorShuffle %v3float %51 %51 0 1 2 -%49 = OpExtInst %v3float %1 RoundEven %52 -%56 = OpFOrdEqual %v3bool %49 %55 -%58 = OpAll %bool %56 -OpBranch %48 -%48 = OpLabel -%59 = OpPhi %bool %false %37 %58 %47 -OpSelectionMerge %61 None -OpBranchConditional %59 %60 %61 -%60 = OpLabel -%63 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%64 = OpLoad %v4float %63 -%62 = OpExtInst %v4float %1 RoundEven %64 -%67 = OpFOrdEqual %v4bool %62 %66 -%69 = OpAll %bool %67 -OpBranch %61 -%61 = OpLabel -%70 = OpPhi %bool %false %48 %69 %60 -OpSelectionMerge %75 None -OpBranchConditional %70 %73 %74 -%73 = OpLabel -%76 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%78 = OpLoad %v4float %76 -OpStore %71 %78 -OpBranch %75 -%74 = OpLabel -%79 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%81 = OpLoad %v4float %79 -OpStore %71 %81 -OpBranch %75 -%75 = OpLabel -%82 = OpLoad %v4float %71 -OpReturnValue %82 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %71 = OpVariable %_ptr_Function_v4float Function + %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %28 + %33 = OpCompositeExtract %float %32 0 + %27 = OpExtInst %float %1 RoundEven %33 + %35 = OpFOrdEqual %bool %27 %float_n1 + OpSelectionMerge %37 None + OpBranchConditional %35 %36 %37 + %36 = OpLabel + %39 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %40 = OpLoad %v4float %39 + %41 = OpVectorShuffle %v2float %40 %40 0 1 + %38 = OpExtInst %v2float %1 RoundEven %41 + %43 = OpFOrdEqual %v2bool %38 %42 + %45 = OpAll %bool %43 + OpBranch %37 + %37 = OpLabel + %46 = OpPhi %bool %false %25 %45 %36 + OpSelectionMerge %48 None + OpBranchConditional %46 %47 %48 + %47 = OpLabel + %50 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %51 = OpLoad %v4float %50 + %52 = OpVectorShuffle %v3float %51 %51 0 1 2 + %49 = OpExtInst %v3float %1 RoundEven %52 + %56 = OpFOrdEqual %v3bool %49 %55 + %58 = OpAll %bool %56 + OpBranch %48 + %48 = OpLabel + %59 = OpPhi %bool %false %37 %58 %47 + OpSelectionMerge %61 None + OpBranchConditional %59 %60 %61 + %60 = OpLabel + %63 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %64 = OpLoad %v4float %63 + %62 = OpExtInst %v4float %1 RoundEven %64 + %67 = OpFOrdEqual %v4bool %62 %66 + %69 = OpAll %bool %67 + OpBranch %61 + %61 = OpLabel + %70 = OpPhi %bool %false %48 %69 %60 + OpSelectionMerge %75 None + OpBranchConditional %70 %73 %74 + %73 = OpLabel + %76 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %78 = OpLoad %v4float %76 + OpStore %71 %78 + OpBranch %75 + %74 = OpLabel + %79 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %81 = OpLoad %v4float %79 + OpStore %71 %81 + OpBranch %75 + %75 = OpLabel + %82 = OpLoad %v4float %71 + OpReturnValue %82 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/RoundEven.wgsl b/tests/sksl/intrinsics/RoundEven.wgsl new file mode 100644 index 000000000000..568d8d83cc84 --- /dev/null +++ b/tests/sksl/intrinsics/RoundEven.wgsl @@ -0,0 +1,39 @@ +### Compilation failed: + +error: :19:20 error: unresolved call target 'roundEven' + let _skTemp0 = roundEven(_globalUniforms.testInputs.x); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + testInputs: vec4, + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + const expectedA: vec4 = vec4(-1.0, 0.0, 1.0, 2.0); + let _skTemp0 = roundEven(_globalUniforms.testInputs.x); + let _skTemp1 = roundEven(_globalUniforms.testInputs.xy); + let _skTemp2 = roundEven(_globalUniforms.testInputs.xyz); + let _skTemp3 = roundEven(_globalUniforms.testInputs); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((f32(_skTemp0) == -1.0) && all(vec2(_skTemp1) == vec2(-1.0, 0.0))) && all(vec3(_skTemp2) == vec3(-1.0, 0.0, 1.0))) && all(vec4(_skTemp3) == expectedA))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} + +1 error diff --git a/tests/sksl/intrinsics/Sample.asm.frag b/tests/sksl/intrinsics/Sample.asm.frag index b29e586c8626..ae6565e98566 100644 --- a/tests/sksl/intrinsics/Sample.asm.frag +++ b/tests/sksl/intrinsics/Sample.asm.frag @@ -1,53 +1,53 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %t "t" -OpName %main "main" -OpName %c "c" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %t RelaxedPrecision -OpDecorate %t Binding 0 -OpDecorate %t DescriptorSet 0 -OpDecorate %c RelaxedPrecision -OpDecorate %20 RelaxedPrecision -OpDecorate %25 RelaxedPrecision -OpDecorate %29 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %t "t" + OpName %main "main" + OpName %c "c" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %t RelaxedPrecision + OpDecorate %t Binding 0 + OpDecorate %t DescriptorSet 0 + OpDecorate %c RelaxedPrecision + OpDecorate %20 RelaxedPrecision + OpDecorate %25 RelaxedPrecision + OpDecorate %29 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%11 = OpTypeImage %float 2D 0 0 0 1 Unknown -%12 = OpTypeSampledImage %11 + %11 = OpTypeImage %float 2D 0 0 0 1 Unknown + %12 = OpTypeSampledImage %11 %_ptr_UniformConstant_12 = OpTypePointer UniformConstant %12 -%t = OpVariable %_ptr_UniformConstant_12 UniformConstant -%void = OpTypeVoid -%15 = OpTypeFunction %void + %t = OpVariable %_ptr_UniformConstant_12 UniformConstant + %void = OpTypeVoid + %15 = OpTypeFunction %void %_ptr_Function_v4float = OpTypePointer Function %v4float -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%23 = OpConstantComposite %v2float %float_0 %float_0 -%float_1 = OpConstant %float 1 -%v3float = OpTypeVector %float 3 -%28 = OpConstantComposite %v3float %float_1 %float_1 %float_1 -%main = OpFunction %void None %15 -%16 = OpLabel -%c = OpVariable %_ptr_Function_v4float Function -%20 = OpLoad %12 %t -%19 = OpImageSampleImplicitLod %v4float %20 %23 -OpStore %c %19 -%25 = OpLoad %12 %t -%24 = OpImageSampleProjImplicitLod %v4float %25 %28 -%29 = OpFMul %v4float %19 %24 -OpStore %sk_FragColor %29 -OpReturn -OpFunctionEnd + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %23 = OpConstantComposite %v2float %float_0 %float_0 + %float_1 = OpConstant %float 1 + %v3float = OpTypeVector %float 3 + %28 = OpConstantComposite %v3float %float_1 %float_1 %float_1 + %main = OpFunction %void None %15 + %16 = OpLabel + %c = OpVariable %_ptr_Function_v4float Function + %20 = OpLoad %12 %t + %19 = OpImageSampleImplicitLod %v4float %20 %23 + OpStore %c %19 + %25 = OpLoad %12 %t + %24 = OpImageSampleProjImplicitLod %v4float %25 %28 + %29 = OpFMul %v4float %19 %24 + OpStore %sk_FragColor %29 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Sample.wgsl b/tests/sksl/intrinsics/Sample.wgsl new file mode 100644 index 000000000000..e929ffeb213f --- /dev/null +++ b/tests/sksl/intrinsics/Sample.wgsl @@ -0,0 +1,21 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +@group(0) @binding(10000) var t_Sampler: sampler; +@group(0) @binding(10001) var t_Texture: texture_2d; +fn main(_stageOut: ptr) { + { + var c: vec4 = textureSample(t_Texture, t_Sampler, vec2(0.0)); + let _skTemp2 = vec3(1.0); + (*_stageOut).sk_FragColor = c * textureSample(t_Texture, t_Sampler, _skTemp2.xy / _skTemp2.z); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(&_stageOut); + return _stageOut; +} diff --git a/tests/sksl/intrinsics/SampleGrad.asm.frag b/tests/sksl/intrinsics/SampleGrad.asm.frag index 195270dc8cbf..c65c98ed077a 100644 --- a/tests/sksl/intrinsics/SampleGrad.asm.frag +++ b/tests/sksl/intrinsics/SampleGrad.asm.frag @@ -1,72 +1,72 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %t "t" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %sksl_synthetic_uniforms "sksl_synthetic_uniforms" -OpMemberName %sksl_synthetic_uniforms 0 "u_skRTFlip" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %t RelaxedPrecision -OpDecorate %t Binding 0 -OpDecorate %t DescriptorSet 0 -OpDecorate %28 RelaxedPrecision -OpMemberDecorate %sksl_synthetic_uniforms 0 Offset 16384 -OpDecorate %sksl_synthetic_uniforms Block -OpDecorate %34 Binding 0 -OpDecorate %34 DescriptorSet 0 -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %t "t" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %sksl_synthetic_uniforms "sksl_synthetic_uniforms" + OpMemberName %sksl_synthetic_uniforms 0 "u_skRTFlip" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %t RelaxedPrecision + OpDecorate %t Binding 0 + OpDecorate %t DescriptorSet 0 + OpDecorate %28 RelaxedPrecision + OpMemberDecorate %sksl_synthetic_uniforms 0 Offset 16384 + OpDecorate %sksl_synthetic_uniforms Block + OpDecorate %34 Binding 0 + OpDecorate %34 DescriptorSet 0 + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%11 = OpTypeImage %float 2D 0 0 0 1 Unknown -%12 = OpTypeSampledImage %11 + %11 = OpTypeImage %float 2D 0 0 0 1 Unknown + %12 = OpTypeSampledImage %11 %_ptr_UniformConstant_12 = OpTypePointer UniformConstant %12 -%t = OpVariable %_ptr_UniformConstant_12 UniformConstant -%void = OpTypeVoid -%16 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%20 = OpConstantComposite %v2float %float_0 %float_0 + %t = OpVariable %_ptr_UniformConstant_12 UniformConstant + %void = OpTypeVoid + %16 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %20 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%24 = OpTypeFunction %v4float %_ptr_Function_v2float + %24 = OpTypeFunction %v4float %_ptr_Function_v2float %sksl_synthetic_uniforms = OpTypeStruct %v2float %_ptr_Uniform_sksl_synthetic_uniforms = OpTypePointer Uniform %sksl_synthetic_uniforms -%34 = OpVariable %_ptr_Uniform_sksl_synthetic_uniforms Uniform -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 + %34 = OpVariable %_ptr_Uniform_sksl_synthetic_uniforms Uniform + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 %_ptr_Uniform_v2float = OpTypePointer Uniform %v2float %_entrypoint_v = OpFunction %void None %16 -%17 = OpLabel -%21 = OpVariable %_ptr_Function_v2float Function -OpStore %21 %20 -%23 = OpFunctionCall %v4float %main %21 -OpStore %sk_FragColor %23 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %24 -%25 = OpFunctionParameter %_ptr_Function_v2float -%26 = OpLabel -%28 = OpLoad %12 %t -%29 = OpLoad %v2float %25 -%31 = OpLoad %v2float %25 -%30 = OpDPdx %v2float %31 -%33 = OpLoad %v2float %25 -%32 = OpDPdy %v2float %33 -%39 = OpAccessChain %_ptr_Uniform_v2float %34 %int_0 -%41 = OpLoad %v2float %39 -%42 = OpVectorShuffle %v2float %41 %41 1 1 -%43 = OpFMul %v2float %32 %42 -%27 = OpImageSampleExplicitLod %v4float %28 %29 Grad %30 %43 -OpReturnValue %27 -OpFunctionEnd + %17 = OpLabel + %21 = OpVariable %_ptr_Function_v2float Function + OpStore %21 %20 + %23 = OpFunctionCall %v4float %main %21 + OpStore %sk_FragColor %23 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %24 + %25 = OpFunctionParameter %_ptr_Function_v2float + %26 = OpLabel + %28 = OpLoad %12 %t + %29 = OpLoad %v2float %25 + %31 = OpLoad %v2float %25 + %30 = OpDPdx %v2float %31 + %33 = OpLoad %v2float %25 + %32 = OpDPdy %v2float %33 + %39 = OpAccessChain %_ptr_Uniform_v2float %34 %int_0 + %41 = OpLoad %v2float %39 + %42 = OpVectorShuffle %v2float %41 %41 1 1 + %43 = OpFMul %v2float %32 %42 + %27 = OpImageSampleExplicitLod %v4float %28 %29 Grad %30 %43 + OpReturnValue %27 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/SampleGrad.wgsl b/tests/sksl/intrinsics/SampleGrad.wgsl new file mode 100644 index 000000000000..9be789a6c5c4 --- /dev/null +++ b/tests/sksl/intrinsics/SampleGrad.wgsl @@ -0,0 +1,23 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +@group(0) @binding(10000) var t_Sampler: sampler; +@group(0) @binding(10001) var t_Texture: texture_2d; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + let _skTemp2 = dpdx(coords); + let _skTemp3 = dpdy(coords); + return textureSampleGrad(t_Texture, t_Sampler, coords, _skTemp2, _skTemp3); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/intrinsics/SampleLod.asm.frag b/tests/sksl/intrinsics/SampleLod.asm.frag index e61fa532873a..743f60007215 100644 --- a/tests/sksl/intrinsics/SampleLod.asm.frag +++ b/tests/sksl/intrinsics/SampleLod.asm.frag @@ -1,53 +1,53 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %t "t" -OpName %main "main" -OpName %c "c" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %t RelaxedPrecision -OpDecorate %t Binding 0 -OpDecorate %t DescriptorSet 0 -OpDecorate %c RelaxedPrecision -OpDecorate %20 RelaxedPrecision -OpDecorate %25 RelaxedPrecision -OpDecorate %29 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %t "t" + OpName %main "main" + OpName %c "c" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %t RelaxedPrecision + OpDecorate %t Binding 0 + OpDecorate %t DescriptorSet 0 + OpDecorate %c RelaxedPrecision + OpDecorate %20 RelaxedPrecision + OpDecorate %25 RelaxedPrecision + OpDecorate %29 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%11 = OpTypeImage %float 2D 0 0 0 1 Unknown -%12 = OpTypeSampledImage %11 + %11 = OpTypeImage %float 2D 0 0 0 1 Unknown + %12 = OpTypeSampledImage %11 %_ptr_UniformConstant_12 = OpTypePointer UniformConstant %12 -%t = OpVariable %_ptr_UniformConstant_12 UniformConstant -%void = OpTypeVoid -%15 = OpTypeFunction %void + %t = OpVariable %_ptr_UniformConstant_12 UniformConstant + %void = OpTypeVoid + %15 = OpTypeFunction %void %_ptr_Function_v4float = OpTypePointer Function %v4float -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%23 = OpConstantComposite %v2float %float_0 %float_0 -%float_1 = OpConstant %float 1 -%v3float = OpTypeVector %float 3 -%28 = OpConstantComposite %v3float %float_1 %float_1 %float_1 -%main = OpFunction %void None %15 -%16 = OpLabel -%c = OpVariable %_ptr_Function_v4float Function -%20 = OpLoad %12 %t -%19 = OpImageSampleExplicitLod %v4float %20 %23 Lod %float_0 -OpStore %c %19 -%25 = OpLoad %12 %t -%24 = OpImageSampleProjExplicitLod %v4float %25 %28 Lod %float_0 -%29 = OpFMul %v4float %19 %24 -OpStore %sk_FragColor %29 -OpReturn -OpFunctionEnd + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %23 = OpConstantComposite %v2float %float_0 %float_0 + %float_1 = OpConstant %float 1 + %v3float = OpTypeVector %float 3 + %28 = OpConstantComposite %v3float %float_1 %float_1 %float_1 + %main = OpFunction %void None %15 + %16 = OpLabel + %c = OpVariable %_ptr_Function_v4float Function + %20 = OpLoad %12 %t + %19 = OpImageSampleExplicitLod %v4float %20 %23 Lod %float_0 + OpStore %c %19 + %25 = OpLoad %12 %t + %24 = OpImageSampleProjExplicitLod %v4float %25 %28 Lod %float_0 + %29 = OpFMul %v4float %19 %24 + OpStore %sk_FragColor %29 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/intrinsics/SampleLod.wgsl b/tests/sksl/intrinsics/SampleLod.wgsl new file mode 100644 index 000000000000..938e4dff1d3f --- /dev/null +++ b/tests/sksl/intrinsics/SampleLod.wgsl @@ -0,0 +1,21 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +@group(0) @binding(10000) var t_Sampler: sampler; +@group(0) @binding(10001) var t_Texture: texture_2d; +fn main(_stageOut: ptr) { + { + var c: vec4 = textureSampleLevel(t_Texture, t_Sampler, vec2(0.0), 0.0); + let _skTemp2 = vec3(1.0); + (*_stageOut).sk_FragColor = c * textureSampleLevel(t_Texture, t_Sampler, _skTemp2.xy / _skTemp2.z, 0.0); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(&_stageOut); + return _stageOut; +} diff --git a/tests/sksl/intrinsics/Saturate.asm.frag b/tests/sksl/intrinsics/Saturate.asm.frag index 41b89f5f6dab..d309cbe399b2 100644 --- a/tests/sksl/intrinsics/Saturate.asm.frag +++ b/tests/sksl/intrinsics/Saturate.asm.frag @@ -1,182 +1,182 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testInputs" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %expected "expected" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %expected RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %45 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -OpDecorate %83 RelaxedPrecision -OpDecorate %90 RelaxedPrecision -OpDecorate %103 RelaxedPrecision -OpDecorate %106 RelaxedPrecision -OpDecorate %107 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testInputs" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %expected "expected" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %expected RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %45 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %83 RelaxedPrecision + OpDecorate %90 RelaxedPrecision + OpDecorate %103 RelaxedPrecision + OpDecorate %106 RelaxedPrecision + OpDecorate %107 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float -%float_0_75 = OpConstant %float 0.75 -%float_1 = OpConstant %float 1 -%30 = OpConstantComposite %v4float %float_0 %float_0 %float_0_75 %float_1 -%false = OpConstantFalse %bool + %float_0_75 = OpConstant %float 0.75 + %float_1 = OpConstant %float 1 + %30 = OpConstantComposite %v4float %float_0 %float_0 %float_0_75 %float_1 + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%46 = OpConstantComposite %v2float %float_1 %float_1 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%59 = OpConstantComposite %v3float %float_0 %float_0 %float_0 -%60 = OpConstantComposite %v3float %float_1 %float_1 %float_1 -%v3bool = OpTypeVector %bool 3 -%71 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 -%72 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 -%v4bool = OpTypeVector %bool 4 -%true = OpConstantTrue %bool -%89 = OpConstantComposite %v3float %float_0 %float_0 %float_0_75 -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %46 = OpConstantComposite %v2float %float_1 %float_1 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %59 = OpConstantComposite %v3float %float_0 %float_0 %float_0 + %60 = OpConstantComposite %v3float %float_1 %float_1 %float_1 + %v3bool = OpTypeVector %bool 3 + %71 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %72 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %v4bool = OpTypeVector %bool 4 + %true = OpConstantTrue %bool + %89 = OpConstantComposite %v3float %float_0 %float_0 %float_0_75 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%expected = OpVariable %_ptr_Function_v4float Function -%97 = OpVariable %_ptr_Function_v4float Function -OpStore %expected %30 -%33 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%37 = OpLoad %v4float %33 -%38 = OpCompositeExtract %float %37 0 -%32 = OpExtInst %float %1 FClamp %38 %float_0 %float_1 -%39 = OpFOrdEqual %bool %32 %float_0 -OpSelectionMerge %41 None -OpBranchConditional %39 %40 %41 -%40 = OpLabel -%43 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%44 = OpLoad %v4float %43 -%45 = OpVectorShuffle %v2float %44 %44 0 1 -%42 = OpExtInst %v2float %1 FClamp %45 %19 %46 -%47 = OpVectorShuffle %v2float %30 %30 0 1 -%48 = OpFOrdEqual %v2bool %42 %47 -%50 = OpAll %bool %48 -OpBranch %41 -%41 = OpLabel -%51 = OpPhi %bool %false %25 %50 %40 -OpSelectionMerge %53 None -OpBranchConditional %51 %52 %53 -%52 = OpLabel -%55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%56 = OpLoad %v4float %55 -%57 = OpVectorShuffle %v3float %56 %56 0 1 2 -%54 = OpExtInst %v3float %1 FClamp %57 %59 %60 -%61 = OpVectorShuffle %v3float %30 %30 0 1 2 -%62 = OpFOrdEqual %v3bool %54 %61 -%64 = OpAll %bool %62 -OpBranch %53 -%53 = OpLabel -%65 = OpPhi %bool %false %41 %64 %52 -OpSelectionMerge %67 None -OpBranchConditional %65 %66 %67 -%66 = OpLabel -%69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%70 = OpLoad %v4float %69 -%68 = OpExtInst %v4float %1 FClamp %70 %71 %72 -%73 = OpFOrdEqual %v4bool %68 %30 -%75 = OpAll %bool %73 -OpBranch %67 -%67 = OpLabel -%76 = OpPhi %bool %false %53 %75 %66 -OpSelectionMerge %78 None -OpBranchConditional %76 %77 %78 -%77 = OpLabel -OpBranch %78 -%78 = OpLabel -%80 = OpPhi %bool %false %67 %true %77 -OpSelectionMerge %82 None -OpBranchConditional %80 %81 %82 -%81 = OpLabel -%83 = OpVectorShuffle %v2float %30 %30 0 1 -%84 = OpFOrdEqual %v2bool %19 %83 -%85 = OpAll %bool %84 -OpBranch %82 -%82 = OpLabel -%86 = OpPhi %bool %false %78 %85 %81 -OpSelectionMerge %88 None -OpBranchConditional %86 %87 %88 -%87 = OpLabel -%90 = OpVectorShuffle %v3float %30 %30 0 1 2 -%91 = OpFOrdEqual %v3bool %89 %90 -%92 = OpAll %bool %91 -OpBranch %88 -%88 = OpLabel -%93 = OpPhi %bool %false %82 %92 %87 -OpSelectionMerge %95 None -OpBranchConditional %93 %94 %95 -%94 = OpLabel -OpBranch %95 -%95 = OpLabel -%96 = OpPhi %bool %false %88 %true %94 -OpSelectionMerge %100 None -OpBranchConditional %96 %98 %99 -%98 = OpLabel -%101 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%103 = OpLoad %v4float %101 -OpStore %97 %103 -OpBranch %100 -%99 = OpLabel -%104 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%106 = OpLoad %v4float %104 -OpStore %97 %106 -OpBranch %100 -%100 = OpLabel -%107 = OpLoad %v4float %97 -OpReturnValue %107 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %expected = OpVariable %_ptr_Function_v4float Function + %97 = OpVariable %_ptr_Function_v4float Function + OpStore %expected %30 + %33 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %37 = OpLoad %v4float %33 + %38 = OpCompositeExtract %float %37 0 + %32 = OpExtInst %float %1 FClamp %38 %float_0 %float_1 + %39 = OpFOrdEqual %bool %32 %float_0 + OpSelectionMerge %41 None + OpBranchConditional %39 %40 %41 + %40 = OpLabel + %43 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %44 = OpLoad %v4float %43 + %45 = OpVectorShuffle %v2float %44 %44 0 1 + %42 = OpExtInst %v2float %1 FClamp %45 %19 %46 + %47 = OpVectorShuffle %v2float %30 %30 0 1 + %48 = OpFOrdEqual %v2bool %42 %47 + %50 = OpAll %bool %48 + OpBranch %41 + %41 = OpLabel + %51 = OpPhi %bool %false %25 %50 %40 + OpSelectionMerge %53 None + OpBranchConditional %51 %52 %53 + %52 = OpLabel + %55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %56 = OpLoad %v4float %55 + %57 = OpVectorShuffle %v3float %56 %56 0 1 2 + %54 = OpExtInst %v3float %1 FClamp %57 %59 %60 + %61 = OpVectorShuffle %v3float %30 %30 0 1 2 + %62 = OpFOrdEqual %v3bool %54 %61 + %64 = OpAll %bool %62 + OpBranch %53 + %53 = OpLabel + %65 = OpPhi %bool %false %41 %64 %52 + OpSelectionMerge %67 None + OpBranchConditional %65 %66 %67 + %66 = OpLabel + %69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %70 = OpLoad %v4float %69 + %68 = OpExtInst %v4float %1 FClamp %70 %71 %72 + %73 = OpFOrdEqual %v4bool %68 %30 + %75 = OpAll %bool %73 + OpBranch %67 + %67 = OpLabel + %76 = OpPhi %bool %false %53 %75 %66 + OpSelectionMerge %78 None + OpBranchConditional %76 %77 %78 + %77 = OpLabel + OpBranch %78 + %78 = OpLabel + %80 = OpPhi %bool %false %67 %true %77 + OpSelectionMerge %82 None + OpBranchConditional %80 %81 %82 + %81 = OpLabel + %83 = OpVectorShuffle %v2float %30 %30 0 1 + %84 = OpFOrdEqual %v2bool %19 %83 + %85 = OpAll %bool %84 + OpBranch %82 + %82 = OpLabel + %86 = OpPhi %bool %false %78 %85 %81 + OpSelectionMerge %88 None + OpBranchConditional %86 %87 %88 + %87 = OpLabel + %90 = OpVectorShuffle %v3float %30 %30 0 1 2 + %91 = OpFOrdEqual %v3bool %89 %90 + %92 = OpAll %bool %91 + OpBranch %88 + %88 = OpLabel + %93 = OpPhi %bool %false %82 %92 %87 + OpSelectionMerge %95 None + OpBranchConditional %93 %94 %95 + %94 = OpLabel + OpBranch %95 + %95 = OpLabel + %96 = OpPhi %bool %false %88 %true %94 + OpSelectionMerge %100 None + OpBranchConditional %96 %98 %99 + %98 = OpLabel + %101 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %103 = OpLoad %v4float %101 + OpStore %97 %103 + OpBranch %100 + %99 = OpLabel + %104 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %106 = OpLoad %v4float %104 + OpStore %97 %106 + OpBranch %100 + %100 = OpLabel + %107 = OpLoad %v4float %97 + OpReturnValue %107 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Saturate.skrp b/tests/sksl/intrinsics/Saturate.skrp index a6363d6e86e9..b7733858c732 100644 --- a/tests/sksl/intrinsics/Saturate.skrp +++ b/tests/sksl/intrinsics/Saturate.skrp @@ -1,22 +1,23 @@ +60 instructions + [immutable slots] -expected(0) = 0 -expected(1) = 0 -expected(2) = 0x3F400000 (0.75) -expected(3) = 0x3F800000 (1.0) +i0 = 0 +i1 = 0 +i2 = 0x3F400000 (0.75) +i3 = 0x3F800000 (1.0) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_uniform $0 = testInputs(0) max_imm_float $0 = max($0, 0) min_imm_float $0 = min($0, 0x3F800000 (1.0)) -copy_slot_unmasked $1 = expected(0) -cmpeq_float $0 = equal($0, $1) +cmpeq_imm_float $0 = equal($0, 0) copy_2_uniforms $1..2 = testInputs(0..1) splat_2_constants $3..4 = 0 max_2_floats $1..2 = max($1..2, $3..4) splat_2_constants $3..4 = 0x3F800000 (1.0) min_2_floats $1..2 = min($1..2, $3..4) -copy_2_slots_unmasked $3..4 = expected(0..1) +copy_2_immutables_unmasked $3..4 = i0..1 [0, 0] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 @@ -25,7 +26,7 @@ splat_3_constants $4..6 = 0 max_3_floats $1..3 = max($1..3, $4..6) splat_3_constants $4..6 = 0x3F800000 (1.0) min_3_floats $1..3 = min($1..3, $4..6) -copy_3_slots_unmasked $4..6 = expected(0..2) +copy_3_immutables_unmasked $4..6 = i0..2 [0, 0, 0x3F400000 (0.75)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 @@ -35,30 +36,27 @@ splat_4_constants $5..8 = 0 max_4_floats $1..4 = max($1..4, $5..8) splat_4_constants $5..8 = 0x3F800000 (1.0) min_4_floats $1..4 = min($1..4, $5..8) -copy_4_slots_unmasked $5..8 = expected +copy_4_immutables_unmasked $5..8 = i0..3 [0, 0, 0x3F400000 (0.75), 0x3F800000 (1.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expected(0) +copy_constant $1 = 0 cmpeq_imm_float $1 = equal($1, 0) bitwise_and_int $0 &= $1 splat_2_constants $1..2 = 0 -copy_2_slots_unmasked $3..4 = expected(0..1) +copy_2_immutables_unmasked $3..4 = i0..1 [0, 0] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -splat_2_constants $1..2 = 0 -copy_constant $3 = 0x3F400000 (0.75) -copy_3_slots_unmasked $4..6 = expected(0..2) +copy_3_immutables_unmasked $1..3 = i0..2 [0, 0, 0x3F400000 (0.75)] +copy_3_immutables_unmasked $4..6 = i0..2 [0, 0, 0x3F400000 (0.75)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -splat_2_constants $1..2 = 0 -copy_constant $3 = 0x3F400000 (0.75) -copy_constant $4 = 0x3F800000 (1.0) -copy_4_slots_unmasked $5..8 = expected +copy_4_immutables_unmasked $1..4 = i0..3 [0, 0, 0x3F400000 (0.75), 0x3F800000 (1.0)] +copy_4_immutables_unmasked $5..8 = i0..3 [0, 0, 0x3F400000 (0.75), 0x3F800000 (1.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 diff --git a/tests/sksl/intrinsics/Saturate.wgsl b/tests/sksl/intrinsics/Saturate.wgsl new file mode 100644 index 000000000000..92ca69fc12fd --- /dev/null +++ b/tests/sksl/intrinsics/Saturate.wgsl @@ -0,0 +1,30 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + testInputs: vec4, + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var expected: vec4 = vec4(0.0, 0.0, 0.75, 1.0); + let _skTemp0 = saturate(_globalUniforms.testInputs.x); + let _skTemp1 = saturate(_globalUniforms.testInputs.xy); + let _skTemp2 = saturate(_globalUniforms.testInputs.xyz); + let _skTemp3 = saturate(_globalUniforms.testInputs); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((_skTemp0 == expected.x) && all(_skTemp1 == expected.xy)) && all(_skTemp2 == expected.xyz)) && all(_skTemp3 == expected)) && (0.0 == expected.x)) && all(vec2(0.0) == expected.xy)) && all(vec3(0.0, 0.0, 0.75) == expected.xyz)) && all(vec4(0.0, 0.0, 0.75, 1.0) == expected))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/intrinsics/SignFloat.asm.frag b/tests/sksl/intrinsics/SignFloat.asm.frag index 0d60d5dc37b4..ee3cd1d58494 100644 --- a/tests/sksl/intrinsics/SignFloat.asm.frag +++ b/tests/sksl/intrinsics/SignFloat.asm.frag @@ -1,182 +1,182 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testInputs" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %expected "expected" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %expected RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %45 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %53 RelaxedPrecision -OpDecorate %55 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %58 RelaxedPrecision -OpDecorate %65 RelaxedPrecision -OpDecorate %67 RelaxedPrecision -OpDecorate %79 RelaxedPrecision -OpDecorate %86 RelaxedPrecision -OpDecorate %99 RelaxedPrecision -OpDecorate %102 RelaxedPrecision -OpDecorate %103 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testInputs" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %expected "expected" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %expected RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %45 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %53 RelaxedPrecision + OpDecorate %55 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %58 RelaxedPrecision + OpDecorate %65 RelaxedPrecision + OpDecorate %67 RelaxedPrecision + OpDecorate %79 RelaxedPrecision + OpDecorate %86 RelaxedPrecision + OpDecorate %99 RelaxedPrecision + OpDecorate %102 RelaxedPrecision + OpDecorate %103 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float -%float_n1 = OpConstant %float -1 -%float_1 = OpConstant %float 1 -%30 = OpConstantComposite %v4float %float_n1 %float_0 %float_1 %float_1 -%false = OpConstantFalse %bool + %float_n1 = OpConstant %float -1 + %float_1 = OpConstant %float 1 + %30 = OpConstantComposite %v4float %float_n1 %float_0 %float_1 %float_1 + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%v3bool = OpTypeVector %bool 3 -%v4bool = OpTypeVector %bool 4 -%true = OpConstantTrue %bool -%78 = OpConstantComposite %v2float %float_n1 %float_0 -%85 = OpConstantComposite %v3float %float_n1 %float_0 %float_1 -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %v3bool = OpTypeVector %bool 3 + %v4bool = OpTypeVector %bool 4 + %true = OpConstantTrue %bool + %78 = OpConstantComposite %v2float %float_n1 %float_0 + %85 = OpConstantComposite %v3float %float_n1 %float_0 %float_1 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%expected = OpVariable %_ptr_Function_v4float Function -%93 = OpVariable %_ptr_Function_v4float Function -OpStore %expected %30 -%33 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%37 = OpLoad %v4float %33 -%38 = OpCompositeExtract %float %37 0 -%32 = OpExtInst %float %1 FSign %38 -%39 = OpFOrdEqual %bool %32 %float_n1 -OpSelectionMerge %41 None -OpBranchConditional %39 %40 %41 -%40 = OpLabel -%43 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%44 = OpLoad %v4float %43 -%45 = OpVectorShuffle %v2float %44 %44 0 1 -%42 = OpExtInst %v2float %1 FSign %45 -%46 = OpVectorShuffle %v2float %30 %30 0 1 -%47 = OpFOrdEqual %v2bool %42 %46 -%49 = OpAll %bool %47 -OpBranch %41 -%41 = OpLabel -%50 = OpPhi %bool %false %25 %49 %40 -OpSelectionMerge %52 None -OpBranchConditional %50 %51 %52 -%51 = OpLabel -%54 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%55 = OpLoad %v4float %54 -%56 = OpVectorShuffle %v3float %55 %55 0 1 2 -%53 = OpExtInst %v3float %1 FSign %56 -%58 = OpVectorShuffle %v3float %30 %30 0 1 2 -%59 = OpFOrdEqual %v3bool %53 %58 -%61 = OpAll %bool %59 -OpBranch %52 -%52 = OpLabel -%62 = OpPhi %bool %false %41 %61 %51 -OpSelectionMerge %64 None -OpBranchConditional %62 %63 %64 -%63 = OpLabel -%66 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%67 = OpLoad %v4float %66 -%65 = OpExtInst %v4float %1 FSign %67 -%68 = OpFOrdEqual %v4bool %65 %30 -%70 = OpAll %bool %68 -OpBranch %64 -%64 = OpLabel -%71 = OpPhi %bool %false %52 %70 %63 -OpSelectionMerge %73 None -OpBranchConditional %71 %72 %73 -%72 = OpLabel -OpBranch %73 -%73 = OpLabel -%75 = OpPhi %bool %false %64 %true %72 -OpSelectionMerge %77 None -OpBranchConditional %75 %76 %77 -%76 = OpLabel -%79 = OpVectorShuffle %v2float %30 %30 0 1 -%80 = OpFOrdEqual %v2bool %78 %79 -%81 = OpAll %bool %80 -OpBranch %77 -%77 = OpLabel -%82 = OpPhi %bool %false %73 %81 %76 -OpSelectionMerge %84 None -OpBranchConditional %82 %83 %84 -%83 = OpLabel -%86 = OpVectorShuffle %v3float %30 %30 0 1 2 -%87 = OpFOrdEqual %v3bool %85 %86 -%88 = OpAll %bool %87 -OpBranch %84 -%84 = OpLabel -%89 = OpPhi %bool %false %77 %88 %83 -OpSelectionMerge %91 None -OpBranchConditional %89 %90 %91 -%90 = OpLabel -OpBranch %91 -%91 = OpLabel -%92 = OpPhi %bool %false %84 %true %90 -OpSelectionMerge %96 None -OpBranchConditional %92 %94 %95 -%94 = OpLabel -%97 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%99 = OpLoad %v4float %97 -OpStore %93 %99 -OpBranch %96 -%95 = OpLabel -%100 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%102 = OpLoad %v4float %100 -OpStore %93 %102 -OpBranch %96 -%96 = OpLabel -%103 = OpLoad %v4float %93 -OpReturnValue %103 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %expected = OpVariable %_ptr_Function_v4float Function + %93 = OpVariable %_ptr_Function_v4float Function + OpStore %expected %30 + %33 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %37 = OpLoad %v4float %33 + %38 = OpCompositeExtract %float %37 0 + %32 = OpExtInst %float %1 FSign %38 + %39 = OpFOrdEqual %bool %32 %float_n1 + OpSelectionMerge %41 None + OpBranchConditional %39 %40 %41 + %40 = OpLabel + %43 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %44 = OpLoad %v4float %43 + %45 = OpVectorShuffle %v2float %44 %44 0 1 + %42 = OpExtInst %v2float %1 FSign %45 + %46 = OpVectorShuffle %v2float %30 %30 0 1 + %47 = OpFOrdEqual %v2bool %42 %46 + %49 = OpAll %bool %47 + OpBranch %41 + %41 = OpLabel + %50 = OpPhi %bool %false %25 %49 %40 + OpSelectionMerge %52 None + OpBranchConditional %50 %51 %52 + %51 = OpLabel + %54 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %55 = OpLoad %v4float %54 + %56 = OpVectorShuffle %v3float %55 %55 0 1 2 + %53 = OpExtInst %v3float %1 FSign %56 + %58 = OpVectorShuffle %v3float %30 %30 0 1 2 + %59 = OpFOrdEqual %v3bool %53 %58 + %61 = OpAll %bool %59 + OpBranch %52 + %52 = OpLabel + %62 = OpPhi %bool %false %41 %61 %51 + OpSelectionMerge %64 None + OpBranchConditional %62 %63 %64 + %63 = OpLabel + %66 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %67 = OpLoad %v4float %66 + %65 = OpExtInst %v4float %1 FSign %67 + %68 = OpFOrdEqual %v4bool %65 %30 + %70 = OpAll %bool %68 + OpBranch %64 + %64 = OpLabel + %71 = OpPhi %bool %false %52 %70 %63 + OpSelectionMerge %73 None + OpBranchConditional %71 %72 %73 + %72 = OpLabel + OpBranch %73 + %73 = OpLabel + %75 = OpPhi %bool %false %64 %true %72 + OpSelectionMerge %77 None + OpBranchConditional %75 %76 %77 + %76 = OpLabel + %79 = OpVectorShuffle %v2float %30 %30 0 1 + %80 = OpFOrdEqual %v2bool %78 %79 + %81 = OpAll %bool %80 + OpBranch %77 + %77 = OpLabel + %82 = OpPhi %bool %false %73 %81 %76 + OpSelectionMerge %84 None + OpBranchConditional %82 %83 %84 + %83 = OpLabel + %86 = OpVectorShuffle %v3float %30 %30 0 1 2 + %87 = OpFOrdEqual %v3bool %85 %86 + %88 = OpAll %bool %87 + OpBranch %84 + %84 = OpLabel + %89 = OpPhi %bool %false %77 %88 %83 + OpSelectionMerge %91 None + OpBranchConditional %89 %90 %91 + %90 = OpLabel + OpBranch %91 + %91 = OpLabel + %92 = OpPhi %bool %false %84 %true %90 + OpSelectionMerge %96 None + OpBranchConditional %92 %94 %95 + %94 = OpLabel + %97 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %99 = OpLoad %v4float %97 + OpStore %93 %99 + OpBranch %96 + %95 = OpLabel + %100 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %102 = OpLoad %v4float %100 + OpStore %93 %102 + OpBranch %96 + %96 = OpLabel + %103 = OpLoad %v4float %93 + OpReturnValue %103 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/SignFloat.skrp b/tests/sksl/intrinsics/SignFloat.skrp index 322192e11c59..f1713e990f56 100644 --- a/tests/sksl/intrinsics/SignFloat.skrp +++ b/tests/sksl/intrinsics/SignFloat.skrp @@ -1,8 +1,10 @@ +67 instructions + [immutable slots] -expected(0) = 0xBF800000 (-1.0) -expected(1) = 0 -expected(2) = 0x3F800000 (1.0) -expected(3) = 0x3F800000 (1.0) +i0 = 0xBF800000 (-1.0) +i1 = 0 +i2 = 0x3F800000 (1.0) +i3 = 0x3F800000 (1.0) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -10,8 +12,7 @@ copy_uniform $0 = testInputs(0) mul_imm_float $0 *= 0x7F7FFFFF (3.40282347e+38) max_imm_float $0 = max($0, 0xBF800000 (-1.0)) min_imm_float $0 = min($0, 0x3F800000 (1.0)) -copy_slot_unmasked $1 = expected(0) -cmpeq_float $0 = equal($0, $1) +cmpeq_imm_float $0 = equal($0, 0xBF800000 (-1.0)) copy_2_uniforms $1..2 = testInputs(0..1) splat_2_constants $3..4 = 0x7F7FFFFF (3.40282347e+38) mul_2_floats $1..2 *= $3..4 @@ -19,7 +20,7 @@ splat_2_constants $3..4 = 0xBF800000 (-1.0) max_2_floats $1..2 = max($1..2, $3..4) splat_2_constants $3..4 = 0x3F800000 (1.0) min_2_floats $1..2 = min($1..2, $3..4) -copy_2_slots_unmasked $3..4 = expected(0..1) +copy_2_immutables_unmasked $3..4 = i0..1 [0xBF800000 (-1.0), 0] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 @@ -30,7 +31,7 @@ splat_3_constants $4..6 = 0xBF800000 (-1.0) max_3_floats $1..3 = max($1..3, $4..6) splat_3_constants $4..6 = 0x3F800000 (1.0) min_3_floats $1..3 = min($1..3, $4..6) -copy_3_slots_unmasked $4..6 = expected(0..2) +copy_3_immutables_unmasked $4..6 = i0..2 [0xBF800000 (-1.0), 0, 0x3F800000 (1.0)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 @@ -42,32 +43,27 @@ splat_4_constants $5..8 = 0xBF800000 (-1.0) max_4_floats $1..4 = max($1..4, $5..8) splat_4_constants $5..8 = 0x3F800000 (1.0) min_4_floats $1..4 = min($1..4, $5..8) -copy_4_slots_unmasked $5..8 = expected +copy_4_immutables_unmasked $5..8 = i0..3 [0xBF800000 (-1.0), 0, 0x3F800000 (1.0), 0x3F800000 (1.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expected(0) +copy_constant $1 = 0xBF800000 (-1.0) cmpeq_imm_float $1 = equal($1, 0xBF800000 (-1.0)) bitwise_and_int $0 &= $1 -copy_constant $1 = 0xBF800000 (-1.0) -copy_constant $2 = 0 -copy_2_slots_unmasked $3..4 = expected(0..1) +copy_2_immutables_unmasked $1..2 = i0..1 [0xBF800000 (-1.0), 0] +copy_2_immutables_unmasked $3..4 = i0..1 [0xBF800000 (-1.0), 0] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0xBF800000 (-1.0) -copy_constant $2 = 0 -copy_constant $3 = 0x3F800000 (1.0) -copy_3_slots_unmasked $4..6 = expected(0..2) +copy_3_immutables_unmasked $1..3 = i0..2 [0xBF800000 (-1.0), 0, 0x3F800000 (1.0)] +copy_3_immutables_unmasked $4..6 = i0..2 [0xBF800000 (-1.0), 0, 0x3F800000 (1.0)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0xBF800000 (-1.0) -copy_constant $2 = 0 -splat_2_constants $3..4 = 0x3F800000 (1.0) -copy_4_slots_unmasked $5..8 = expected +copy_4_immutables_unmasked $1..4 = i0..3 [0xBF800000 (-1.0), 0, 0x3F800000 (1.0), 0x3F800000 (1.0)] +copy_4_immutables_unmasked $5..8 = i0..3 [0xBF800000 (-1.0), 0, 0x3F800000 (1.0), 0x3F800000 (1.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 diff --git a/tests/sksl/intrinsics/SignFloat.wgsl b/tests/sksl/intrinsics/SignFloat.wgsl index 6343a13936ca..d4c8c8382423 100644 --- a/tests/sksl/intrinsics/SignFloat.wgsl +++ b/tests/sksl/intrinsics/SignFloat.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -19,7 +20,7 @@ fn main(_skParam0: vec2) -> vec4 { let _skTemp1 = sign(_globalUniforms.testInputs.xy); let _skTemp2 = sign(_globalUniforms.testInputs.xyz); let _skTemp3 = sign(_globalUniforms.testInputs); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((_skTemp0 == expected.x && all(_skTemp1 == expected.xy)) && all(_skTemp2 == expected.xyz)) && all(_skTemp3 == expected)) && -1.0 == expected.x) && all(vec2(-1.0, 0.0) == expected.xy)) && all(vec3(-1.0, 0.0, 1.0) == expected.xyz)) && all(vec4(-1.0, 0.0, 1.0, 1.0) == expected))); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((_skTemp0 == expected.x) && all(_skTemp1 == expected.xy)) && all(_skTemp2 == expected.xyz)) && all(_skTemp3 == expected)) && (-1.0 == expected.x)) && all(vec2(-1.0, 0.0) == expected.xy)) && all(vec3(-1.0, 0.0, 1.0) == expected.xyz)) && all(vec4(-1.0, 0.0, 1.0, 1.0) == expected))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/intrinsics/SignInt.asm.frag b/tests/sksl/intrinsics/SignInt.asm.frag index bc9917f778c7..f9986c49774d 100644 --- a/tests/sksl/intrinsics/SignInt.asm.frag +++ b/tests/sksl/intrinsics/SignInt.asm.frag @@ -1,207 +1,207 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testInputs" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %expected "expected" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %38 RelaxedPrecision -OpDecorate %39 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %48 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %63 RelaxedPrecision -OpDecorate %64 RelaxedPrecision -OpDecorate %66 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -OpDecorate %83 RelaxedPrecision -OpDecorate %84 RelaxedPrecision -OpDecorate %86 RelaxedPrecision -OpDecorate %88 RelaxedPrecision -OpDecorate %90 RelaxedPrecision -OpDecorate %124 RelaxedPrecision -OpDecorate %127 RelaxedPrecision -OpDecorate %128 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testInputs" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %expected "expected" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %38 RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %48 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %63 RelaxedPrecision + OpDecorate %64 RelaxedPrecision + OpDecorate %66 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %83 RelaxedPrecision + OpDecorate %84 RelaxedPrecision + OpDecorate %86 RelaxedPrecision + OpDecorate %88 RelaxedPrecision + OpDecorate %90 RelaxedPrecision + OpDecorate %124 RelaxedPrecision + OpDecorate %127 RelaxedPrecision + OpDecorate %128 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%int = OpTypeInt 32 1 -%v4int = OpTypeVector %int 4 + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %int = OpTypeInt 32 1 + %v4int = OpTypeVector %int 4 %_ptr_Function_v4int = OpTypePointer Function %v4int -%int_n1 = OpConstant %int -1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%33 = OpConstantComposite %v4int %int_n1 %int_0 %int_0 %int_1 -%false = OpConstantFalse %bool + %int_n1 = OpConstant %int -1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %33 = OpConstantComposite %v4int %int_n1 %int_0 %int_0 %int_1 + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%v2int = OpTypeVector %int 2 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%v3int = OpTypeVector %int 3 -%v3bool = OpTypeVector %bool 3 -%v4bool = OpTypeVector %bool 4 -%true = OpConstantTrue %bool -%103 = OpConstantComposite %v2int %int_n1 %int_0 -%110 = OpConstantComposite %v3int %int_n1 %int_0 %int_0 + %v2int = OpTypeVector %int 2 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %v3int = OpTypeVector %int 3 + %v3bool = OpTypeVector %bool 3 + %v4bool = OpTypeVector %bool 4 + %true = OpConstantTrue %bool + %103 = OpConstantComposite %v2int %int_n1 %int_0 + %110 = OpConstantComposite %v3int %int_n1 %int_0 %int_0 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_2 = OpConstant %int 2 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%expected = OpVariable %_ptr_Function_v4int Function -%118 = OpVariable %_ptr_Function_v4float Function -OpStore %expected %33 -%36 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%38 = OpLoad %v4float %36 -%39 = OpCompositeExtract %float %38 0 -%40 = OpConvertFToS %int %39 -%35 = OpExtInst %int %1 SSign %40 -%41 = OpIEqual %bool %35 %int_n1 -OpSelectionMerge %43 None -OpBranchConditional %41 %42 %43 -%42 = OpLabel -%45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%46 = OpLoad %v4float %45 -%47 = OpVectorShuffle %v2float %46 %46 0 1 -%48 = OpCompositeExtract %float %47 0 -%49 = OpConvertFToS %int %48 -%50 = OpCompositeExtract %float %47 1 -%51 = OpConvertFToS %int %50 -%53 = OpCompositeConstruct %v2int %49 %51 -%44 = OpExtInst %v2int %1 SSign %53 -%54 = OpVectorShuffle %v2int %33 %33 0 1 -%55 = OpIEqual %v2bool %44 %54 -%57 = OpAll %bool %55 -OpBranch %43 -%43 = OpLabel -%58 = OpPhi %bool %false %25 %57 %42 -OpSelectionMerge %60 None -OpBranchConditional %58 %59 %60 -%59 = OpLabel -%62 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%63 = OpLoad %v4float %62 -%64 = OpVectorShuffle %v3float %63 %63 0 1 2 -%66 = OpCompositeExtract %float %64 0 -%67 = OpConvertFToS %int %66 -%68 = OpCompositeExtract %float %64 1 -%69 = OpConvertFToS %int %68 -%70 = OpCompositeExtract %float %64 2 -%71 = OpConvertFToS %int %70 -%73 = OpCompositeConstruct %v3int %67 %69 %71 -%61 = OpExtInst %v3int %1 SSign %73 -%74 = OpVectorShuffle %v3int %33 %33 0 1 2 -%75 = OpIEqual %v3bool %61 %74 -%77 = OpAll %bool %75 -OpBranch %60 -%60 = OpLabel -%78 = OpPhi %bool %false %43 %77 %59 -OpSelectionMerge %80 None -OpBranchConditional %78 %79 %80 -%79 = OpLabel -%82 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%83 = OpLoad %v4float %82 -%84 = OpCompositeExtract %float %83 0 -%85 = OpConvertFToS %int %84 -%86 = OpCompositeExtract %float %83 1 -%87 = OpConvertFToS %int %86 -%88 = OpCompositeExtract %float %83 2 -%89 = OpConvertFToS %int %88 -%90 = OpCompositeExtract %float %83 3 -%91 = OpConvertFToS %int %90 -%92 = OpCompositeConstruct %v4int %85 %87 %89 %91 -%81 = OpExtInst %v4int %1 SSign %92 -%93 = OpIEqual %v4bool %81 %33 -%95 = OpAll %bool %93 -OpBranch %80 -%80 = OpLabel -%96 = OpPhi %bool %false %60 %95 %79 -OpSelectionMerge %98 None -OpBranchConditional %96 %97 %98 -%97 = OpLabel -OpBranch %98 -%98 = OpLabel -%100 = OpPhi %bool %false %80 %true %97 -OpSelectionMerge %102 None -OpBranchConditional %100 %101 %102 -%101 = OpLabel -%104 = OpVectorShuffle %v2int %33 %33 0 1 -%105 = OpIEqual %v2bool %103 %104 -%106 = OpAll %bool %105 -OpBranch %102 -%102 = OpLabel -%107 = OpPhi %bool %false %98 %106 %101 -OpSelectionMerge %109 None -OpBranchConditional %107 %108 %109 -%108 = OpLabel -%111 = OpVectorShuffle %v3int %33 %33 0 1 2 -%112 = OpIEqual %v3bool %110 %111 -%113 = OpAll %bool %112 -OpBranch %109 -%109 = OpLabel -%114 = OpPhi %bool %false %102 %113 %108 -OpSelectionMerge %116 None -OpBranchConditional %114 %115 %116 -%115 = OpLabel -OpBranch %116 -%116 = OpLabel -%117 = OpPhi %bool %false %109 %true %115 -OpSelectionMerge %122 None -OpBranchConditional %117 %120 %121 -%120 = OpLabel -%123 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%124 = OpLoad %v4float %123 -OpStore %118 %124 -OpBranch %122 -%121 = OpLabel -%125 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%127 = OpLoad %v4float %125 -OpStore %118 %127 -OpBranch %122 -%122 = OpLabel -%128 = OpLoad %v4float %118 -OpReturnValue %128 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %expected = OpVariable %_ptr_Function_v4int Function + %118 = OpVariable %_ptr_Function_v4float Function + OpStore %expected %33 + %36 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %38 = OpLoad %v4float %36 + %39 = OpCompositeExtract %float %38 0 + %40 = OpConvertFToS %int %39 + %35 = OpExtInst %int %1 SSign %40 + %41 = OpIEqual %bool %35 %int_n1 + OpSelectionMerge %43 None + OpBranchConditional %41 %42 %43 + %42 = OpLabel + %45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %46 = OpLoad %v4float %45 + %47 = OpVectorShuffle %v2float %46 %46 0 1 + %48 = OpCompositeExtract %float %47 0 + %49 = OpConvertFToS %int %48 + %50 = OpCompositeExtract %float %47 1 + %51 = OpConvertFToS %int %50 + %53 = OpCompositeConstruct %v2int %49 %51 + %44 = OpExtInst %v2int %1 SSign %53 + %54 = OpVectorShuffle %v2int %33 %33 0 1 + %55 = OpIEqual %v2bool %44 %54 + %57 = OpAll %bool %55 + OpBranch %43 + %43 = OpLabel + %58 = OpPhi %bool %false %25 %57 %42 + OpSelectionMerge %60 None + OpBranchConditional %58 %59 %60 + %59 = OpLabel + %62 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %63 = OpLoad %v4float %62 + %64 = OpVectorShuffle %v3float %63 %63 0 1 2 + %66 = OpCompositeExtract %float %64 0 + %67 = OpConvertFToS %int %66 + %68 = OpCompositeExtract %float %64 1 + %69 = OpConvertFToS %int %68 + %70 = OpCompositeExtract %float %64 2 + %71 = OpConvertFToS %int %70 + %73 = OpCompositeConstruct %v3int %67 %69 %71 + %61 = OpExtInst %v3int %1 SSign %73 + %74 = OpVectorShuffle %v3int %33 %33 0 1 2 + %75 = OpIEqual %v3bool %61 %74 + %77 = OpAll %bool %75 + OpBranch %60 + %60 = OpLabel + %78 = OpPhi %bool %false %43 %77 %59 + OpSelectionMerge %80 None + OpBranchConditional %78 %79 %80 + %79 = OpLabel + %82 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %83 = OpLoad %v4float %82 + %84 = OpCompositeExtract %float %83 0 + %85 = OpConvertFToS %int %84 + %86 = OpCompositeExtract %float %83 1 + %87 = OpConvertFToS %int %86 + %88 = OpCompositeExtract %float %83 2 + %89 = OpConvertFToS %int %88 + %90 = OpCompositeExtract %float %83 3 + %91 = OpConvertFToS %int %90 + %92 = OpCompositeConstruct %v4int %85 %87 %89 %91 + %81 = OpExtInst %v4int %1 SSign %92 + %93 = OpIEqual %v4bool %81 %33 + %95 = OpAll %bool %93 + OpBranch %80 + %80 = OpLabel + %96 = OpPhi %bool %false %60 %95 %79 + OpSelectionMerge %98 None + OpBranchConditional %96 %97 %98 + %97 = OpLabel + OpBranch %98 + %98 = OpLabel + %100 = OpPhi %bool %false %80 %true %97 + OpSelectionMerge %102 None + OpBranchConditional %100 %101 %102 + %101 = OpLabel + %104 = OpVectorShuffle %v2int %33 %33 0 1 + %105 = OpIEqual %v2bool %103 %104 + %106 = OpAll %bool %105 + OpBranch %102 + %102 = OpLabel + %107 = OpPhi %bool %false %98 %106 %101 + OpSelectionMerge %109 None + OpBranchConditional %107 %108 %109 + %108 = OpLabel + %111 = OpVectorShuffle %v3int %33 %33 0 1 2 + %112 = OpIEqual %v3bool %110 %111 + %113 = OpAll %bool %112 + OpBranch %109 + %109 = OpLabel + %114 = OpPhi %bool %false %102 %113 %108 + OpSelectionMerge %116 None + OpBranchConditional %114 %115 %116 + %115 = OpLabel + OpBranch %116 + %116 = OpLabel + %117 = OpPhi %bool %false %109 %true %115 + OpSelectionMerge %122 None + OpBranchConditional %117 %120 %121 + %120 = OpLabel + %123 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %124 = OpLoad %v4float %123 + OpStore %118 %124 + OpBranch %122 + %121 = OpLabel + %125 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %127 = OpLoad %v4float %125 + OpStore %118 %127 + OpBranch %122 + %122 = OpLabel + %128 = OpLoad %v4float %118 + OpReturnValue %128 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/SignInt.skrp b/tests/sksl/intrinsics/SignInt.skrp index c5f1fb2ec5db..376a99f89f80 100644 --- a/tests/sksl/intrinsics/SignInt.skrp +++ b/tests/sksl/intrinsics/SignInt.skrp @@ -1,8 +1,10 @@ +66 instructions + [immutable slots] -expected(0) = 0xFFFFFFFF -expected(1) = 0 -expected(2) = 0 -expected(3) = 0x00000001 (1.401298e-45) +i0 = 0xFFFFFFFF +i1 = 0 +i2 = 0 +i3 = 0x00000001 (1.401298e-45) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -12,15 +14,14 @@ copy_constant $1 = 0xFFFFFFFF max_int $0 = max($0, $1) copy_constant $1 = 0x00000001 (1.401298e-45) min_int $0 = min($0, $1) -copy_slot_unmasked $1 = expected(0) -cmpeq_int $0 = equal($0, $1) +cmpeq_imm_int $0 = equal($0, 0xFFFFFFFF) copy_2_uniforms $1..2 = testInputs(0..1) cast_to_int_from_2_floats $1..2 = FloatToInt($1..2) splat_2_constants $3..4 = 0xFFFFFFFF max_2_ints $1..2 = max($1..2, $3..4) splat_2_constants $3..4 = 0x00000001 (1.401298e-45) min_2_ints $1..2 = min($1..2, $3..4) -copy_2_slots_unmasked $3..4 = expected(0..1) +copy_2_immutables_unmasked $3..4 = i0..1 [0xFFFFFFFF, 0] cmpeq_2_ints $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 @@ -30,7 +31,7 @@ splat_3_constants $4..6 = 0xFFFFFFFF max_3_ints $1..3 = max($1..3, $4..6) splat_3_constants $4..6 = 0x00000001 (1.401298e-45) min_3_ints $1..3 = min($1..3, $4..6) -copy_3_slots_unmasked $4..6 = expected(0..2) +copy_3_immutables_unmasked $4..6 = i0..2 [0xFFFFFFFF, 0, 0] cmpeq_3_ints $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 @@ -41,31 +42,27 @@ splat_4_constants $5..8 = 0xFFFFFFFF max_4_ints $1..4 = max($1..4, $5..8) splat_4_constants $5..8 = 0x00000001 (1.401298e-45) min_4_ints $1..4 = min($1..4, $5..8) -copy_4_slots_unmasked $5..8 = expected +copy_4_immutables_unmasked $5..8 = i0..3 [0xFFFFFFFF, 0, 0, 0x00000001 (1.401298e-45)] cmpeq_4_ints $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expected(0) +copy_constant $1 = 0xFFFFFFFF cmpeq_imm_int $1 = equal($1, 0xFFFFFFFF) bitwise_and_int $0 &= $1 -copy_constant $1 = 0xFFFFFFFF -copy_constant $2 = 0 -copy_2_slots_unmasked $3..4 = expected(0..1) +copy_2_immutables_unmasked $1..2 = i0..1 [0xFFFFFFFF, 0] +copy_2_immutables_unmasked $3..4 = i0..1 [0xFFFFFFFF, 0] cmpeq_2_ints $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0xFFFFFFFF -splat_2_constants $2..3 = 0 -copy_3_slots_unmasked $4..6 = expected(0..2) +copy_3_immutables_unmasked $1..3 = i0..2 [0xFFFFFFFF, 0, 0] +copy_3_immutables_unmasked $4..6 = i0..2 [0xFFFFFFFF, 0, 0] cmpeq_3_ints $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0xFFFFFFFF -splat_2_constants $2..3 = 0 -copy_constant $4 = 0x00000001 (1.401298e-45) -copy_4_slots_unmasked $5..8 = expected +copy_4_immutables_unmasked $1..4 = i0..3 [0xFFFFFFFF, 0, 0, 0x00000001 (1.401298e-45)] +copy_4_immutables_unmasked $5..8 = i0..3 [0xFFFFFFFF, 0, 0, 0x00000001 (1.401298e-45)] cmpeq_4_ints $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 diff --git a/tests/sksl/intrinsics/SignInt.wgsl b/tests/sksl/intrinsics/SignInt.wgsl index e2db12a7fbf3..676448cfd138 100644 --- a/tests/sksl/intrinsics/SignInt.wgsl +++ b/tests/sksl/intrinsics/SignInt.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -19,7 +20,7 @@ fn main(_skParam0: vec2) -> vec4 { let _skTemp1 = sign(vec2(_globalUniforms.testInputs.xy)); let _skTemp2 = sign(vec3(_globalUniforms.testInputs.xyz)); let _skTemp3 = sign(vec4(_globalUniforms.testInputs)); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((_skTemp0 == expected.x && all(_skTemp1 == expected.xy)) && all(_skTemp2 == expected.xyz)) && all(_skTemp3 == expected)) && -1 == expected.x) && all(vec2(-1, 0) == expected.xy)) && all(vec3(-1, 0, 0) == expected.xyz)) && all(vec4(-1, 0, 0, 1) == expected))); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((_skTemp0 == expected.x) && all(_skTemp1 == expected.xy)) && all(_skTemp2 == expected.xyz)) && all(_skTemp3 == expected)) && (-1 == expected.x)) && all(vec2(-1, 0) == expected.xy)) && all(vec3(-1, 0, 0) == expected.xyz)) && all(vec4(-1, 0, 0, 1) == expected))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/intrinsics/Sin.asm.frag b/tests/sksl/intrinsics/Sin.asm.frag index 4bcdeb881e1f..b8e08f45b55b 100644 --- a/tests/sksl/intrinsics/Sin.asm.frag +++ b/tests/sksl/intrinsics/Sin.asm.frag @@ -1,209 +1,209 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "inputVal" -OpMemberName %_UniformBuffer 1 "expected" -OpMemberName %_UniformBuffer 2 "colorGreen" -OpMemberName %_UniformBuffer 3 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 3 Offset 48 -OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %27 RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %80 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %87 RelaxedPrecision -OpDecorate %88 RelaxedPrecision -OpDecorate %96 RelaxedPrecision -OpDecorate %97 RelaxedPrecision -OpDecorate %105 RelaxedPrecision -OpDecorate %116 RelaxedPrecision -OpDecorate %119 RelaxedPrecision -OpDecorate %120 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "inputVal" + OpMemberName %_UniformBuffer 1 "expected" + OpMemberName %_UniformBuffer 2 "colorGreen" + OpMemberName %_UniformBuffer 3 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 3 Offset 48 + OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %27 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %80 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %87 RelaxedPrecision + OpDecorate %88 RelaxedPrecision + OpDecorate %96 RelaxedPrecision + OpDecorate %97 RelaxedPrecision + OpDecorate %105 RelaxedPrecision + OpDecorate %116 RelaxedPrecision + OpDecorate %119 RelaxedPrecision + OpDecorate %120 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%false = OpConstantFalse %bool + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%v3bool = OpTypeVector %bool 3 -%v4bool = OpTypeVector %bool 4 -%94 = OpConstantComposite %v3float %float_0 %float_0 %float_0 -%103 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %v3bool = OpTypeVector %bool 3 + %v4bool = OpTypeVector %bool 4 + %94 = OpConstantComposite %v3float %float_0 %float_0 %float_0 + %103 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_2 = OpConstant %int 2 -%int_3 = OpConstant %int 3 + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%109 = OpVariable %_ptr_Function_v4float Function -%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %28 -%33 = OpCompositeExtract %float %32 0 -%27 = OpExtInst %float %1 Sin %33 -%34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%36 = OpLoad %v4float %34 -%37 = OpCompositeExtract %float %36 0 -%38 = OpFOrdEqual %bool %27 %37 -OpSelectionMerge %40 None -OpBranchConditional %38 %39 %40 -%39 = OpLabel -%42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%43 = OpLoad %v4float %42 -%44 = OpVectorShuffle %v2float %43 %43 0 1 -%41 = OpExtInst %v2float %1 Sin %44 -%45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%46 = OpLoad %v4float %45 -%47 = OpVectorShuffle %v2float %46 %46 0 1 -%48 = OpFOrdEqual %v2bool %41 %47 -%50 = OpAll %bool %48 -OpBranch %40 -%40 = OpLabel -%51 = OpPhi %bool %false %25 %50 %39 -OpSelectionMerge %53 None -OpBranchConditional %51 %52 %53 -%52 = OpLabel -%55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%56 = OpLoad %v4float %55 -%57 = OpVectorShuffle %v3float %56 %56 0 1 2 -%54 = OpExtInst %v3float %1 Sin %57 -%59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%60 = OpLoad %v4float %59 -%61 = OpVectorShuffle %v3float %60 %60 0 1 2 -%62 = OpFOrdEqual %v3bool %54 %61 -%64 = OpAll %bool %62 -OpBranch %53 -%53 = OpLabel -%65 = OpPhi %bool %false %40 %64 %52 -OpSelectionMerge %67 None -OpBranchConditional %65 %66 %67 -%66 = OpLabel -%69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%70 = OpLoad %v4float %69 -%68 = OpExtInst %v4float %1 Sin %70 -%71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%72 = OpLoad %v4float %71 -%73 = OpFOrdEqual %v4bool %68 %72 -%75 = OpAll %bool %73 -OpBranch %67 -%67 = OpLabel -%76 = OpPhi %bool %false %53 %75 %66 -OpSelectionMerge %78 None -OpBranchConditional %76 %77 %78 -%77 = OpLabel -%79 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%80 = OpLoad %v4float %79 -%81 = OpCompositeExtract %float %80 0 -%82 = OpFOrdEqual %bool %float_0 %81 -OpBranch %78 -%78 = OpLabel -%83 = OpPhi %bool %false %67 %82 %77 -OpSelectionMerge %85 None -OpBranchConditional %83 %84 %85 -%84 = OpLabel -%86 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%87 = OpLoad %v4float %86 -%88 = OpVectorShuffle %v2float %87 %87 0 1 -%89 = OpFOrdEqual %v2bool %19 %88 -%90 = OpAll %bool %89 -OpBranch %85 -%85 = OpLabel -%91 = OpPhi %bool %false %78 %90 %84 -OpSelectionMerge %93 None -OpBranchConditional %91 %92 %93 -%92 = OpLabel -%95 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%96 = OpLoad %v4float %95 -%97 = OpVectorShuffle %v3float %96 %96 0 1 2 -%98 = OpFOrdEqual %v3bool %94 %97 -%99 = OpAll %bool %98 -OpBranch %93 -%93 = OpLabel -%100 = OpPhi %bool %false %85 %99 %92 -OpSelectionMerge %102 None -OpBranchConditional %100 %101 %102 -%101 = OpLabel -%104 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%105 = OpLoad %v4float %104 -%106 = OpFOrdEqual %v4bool %103 %105 -%107 = OpAll %bool %106 -OpBranch %102 -%102 = OpLabel -%108 = OpPhi %bool %false %93 %107 %101 -OpSelectionMerge %113 None -OpBranchConditional %108 %111 %112 -%111 = OpLabel -%114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%116 = OpLoad %v4float %114 -OpStore %109 %116 -OpBranch %113 -%112 = OpLabel -%117 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%119 = OpLoad %v4float %117 -OpStore %109 %119 -OpBranch %113 -%113 = OpLabel -%120 = OpLoad %v4float %109 -OpReturnValue %120 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %109 = OpVariable %_ptr_Function_v4float Function + %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %28 + %33 = OpCompositeExtract %float %32 0 + %27 = OpExtInst %float %1 Sin %33 + %34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %36 = OpLoad %v4float %34 + %37 = OpCompositeExtract %float %36 0 + %38 = OpFOrdEqual %bool %27 %37 + OpSelectionMerge %40 None + OpBranchConditional %38 %39 %40 + %39 = OpLabel + %42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %43 = OpLoad %v4float %42 + %44 = OpVectorShuffle %v2float %43 %43 0 1 + %41 = OpExtInst %v2float %1 Sin %44 + %45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %46 = OpLoad %v4float %45 + %47 = OpVectorShuffle %v2float %46 %46 0 1 + %48 = OpFOrdEqual %v2bool %41 %47 + %50 = OpAll %bool %48 + OpBranch %40 + %40 = OpLabel + %51 = OpPhi %bool %false %25 %50 %39 + OpSelectionMerge %53 None + OpBranchConditional %51 %52 %53 + %52 = OpLabel + %55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %56 = OpLoad %v4float %55 + %57 = OpVectorShuffle %v3float %56 %56 0 1 2 + %54 = OpExtInst %v3float %1 Sin %57 + %59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %60 = OpLoad %v4float %59 + %61 = OpVectorShuffle %v3float %60 %60 0 1 2 + %62 = OpFOrdEqual %v3bool %54 %61 + %64 = OpAll %bool %62 + OpBranch %53 + %53 = OpLabel + %65 = OpPhi %bool %false %40 %64 %52 + OpSelectionMerge %67 None + OpBranchConditional %65 %66 %67 + %66 = OpLabel + %69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %70 = OpLoad %v4float %69 + %68 = OpExtInst %v4float %1 Sin %70 + %71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %72 = OpLoad %v4float %71 + %73 = OpFOrdEqual %v4bool %68 %72 + %75 = OpAll %bool %73 + OpBranch %67 + %67 = OpLabel + %76 = OpPhi %bool %false %53 %75 %66 + OpSelectionMerge %78 None + OpBranchConditional %76 %77 %78 + %77 = OpLabel + %79 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %80 = OpLoad %v4float %79 + %81 = OpCompositeExtract %float %80 0 + %82 = OpFOrdEqual %bool %float_0 %81 + OpBranch %78 + %78 = OpLabel + %83 = OpPhi %bool %false %67 %82 %77 + OpSelectionMerge %85 None + OpBranchConditional %83 %84 %85 + %84 = OpLabel + %86 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %87 = OpLoad %v4float %86 + %88 = OpVectorShuffle %v2float %87 %87 0 1 + %89 = OpFOrdEqual %v2bool %19 %88 + %90 = OpAll %bool %89 + OpBranch %85 + %85 = OpLabel + %91 = OpPhi %bool %false %78 %90 %84 + OpSelectionMerge %93 None + OpBranchConditional %91 %92 %93 + %92 = OpLabel + %95 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %96 = OpLoad %v4float %95 + %97 = OpVectorShuffle %v3float %96 %96 0 1 2 + %98 = OpFOrdEqual %v3bool %94 %97 + %99 = OpAll %bool %98 + OpBranch %93 + %93 = OpLabel + %100 = OpPhi %bool %false %85 %99 %92 + OpSelectionMerge %102 None + OpBranchConditional %100 %101 %102 + %101 = OpLabel + %104 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %105 = OpLoad %v4float %104 + %106 = OpFOrdEqual %v4bool %103 %105 + %107 = OpAll %bool %106 + OpBranch %102 + %102 = OpLabel + %108 = OpPhi %bool %false %93 %107 %101 + OpSelectionMerge %113 None + OpBranchConditional %108 %111 %112 + %111 = OpLabel + %114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %116 = OpLoad %v4float %114 + OpStore %109 %116 + OpBranch %113 + %112 = OpLabel + %117 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %119 = OpLoad %v4float %117 + OpStore %109 %119 + OpBranch %113 + %113 = OpLabel + %120 = OpLoad %v4float %109 + OpReturnValue %120 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Sin.skrp b/tests/sksl/intrinsics/Sin.skrp index 2fc9aeacce0e..9d44a5306fab 100644 --- a/tests/sksl/intrinsics/Sin.skrp +++ b/tests/sksl/intrinsics/Sin.skrp @@ -1,3 +1,5 @@ +57 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_uniform $4 = inputVal(0) diff --git a/tests/sksl/intrinsics/Sin.wgsl b/tests/sksl/intrinsics/Sin.wgsl index 80616b5ca614..d8acf9e1c9bc 100644 --- a/tests/sksl/intrinsics/Sin.wgsl +++ b/tests/sksl/intrinsics/Sin.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -19,7 +20,7 @@ fn main(_skParam0: vec2) -> vec4 { let _skTemp1 = sin(_globalUniforms.inputVal.xy); let _skTemp2 = sin(_globalUniforms.inputVal.xyz); let _skTemp3 = sin(_globalUniforms.inputVal); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((_skTemp0 == _globalUniforms.expected.x && all(_skTemp1 == _globalUniforms.expected.xy)) && all(_skTemp2 == _globalUniforms.expected.xyz)) && all(_skTemp3 == _globalUniforms.expected)) && 0.0 == _globalUniforms.expected.x) && all(vec2(0.0) == _globalUniforms.expected.xy)) && all(vec3(0.0) == _globalUniforms.expected.xyz)) && all(vec4(0.0) == _globalUniforms.expected))); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((_skTemp0 == _globalUniforms.expected.x) && all(_skTemp1 == _globalUniforms.expected.xy)) && all(_skTemp2 == _globalUniforms.expected.xyz)) && all(_skTemp3 == _globalUniforms.expected)) && (0.0 == _globalUniforms.expected.x)) && all(vec2(0.0) == _globalUniforms.expected.xy)) && all(vec3(0.0) == _globalUniforms.expected.xyz)) && all(vec4(0.0) == _globalUniforms.expected))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/intrinsics/Sinh.asm.frag b/tests/sksl/intrinsics/Sinh.asm.frag index 5223ad362eb0..273e93a84b42 100644 --- a/tests/sksl/intrinsics/Sinh.asm.frag +++ b/tests/sksl/intrinsics/Sinh.asm.frag @@ -1,209 +1,209 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "inputVal" -OpMemberName %_UniformBuffer 1 "expected" -OpMemberName %_UniformBuffer 2 "colorGreen" -OpMemberName %_UniformBuffer 3 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 3 Offset 48 -OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %27 RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %80 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %87 RelaxedPrecision -OpDecorate %88 RelaxedPrecision -OpDecorate %96 RelaxedPrecision -OpDecorate %97 RelaxedPrecision -OpDecorate %105 RelaxedPrecision -OpDecorate %116 RelaxedPrecision -OpDecorate %119 RelaxedPrecision -OpDecorate %120 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "inputVal" + OpMemberName %_UniformBuffer 1 "expected" + OpMemberName %_UniformBuffer 2 "colorGreen" + OpMemberName %_UniformBuffer 3 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 3 Offset 48 + OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %27 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %80 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %87 RelaxedPrecision + OpDecorate %88 RelaxedPrecision + OpDecorate %96 RelaxedPrecision + OpDecorate %97 RelaxedPrecision + OpDecorate %105 RelaxedPrecision + OpDecorate %116 RelaxedPrecision + OpDecorate %119 RelaxedPrecision + OpDecorate %120 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%false = OpConstantFalse %bool + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%v3bool = OpTypeVector %bool 3 -%v4bool = OpTypeVector %bool 4 -%94 = OpConstantComposite %v3float %float_0 %float_0 %float_0 -%103 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %v3bool = OpTypeVector %bool 3 + %v4bool = OpTypeVector %bool 4 + %94 = OpConstantComposite %v3float %float_0 %float_0 %float_0 + %103 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_2 = OpConstant %int 2 -%int_3 = OpConstant %int 3 + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%109 = OpVariable %_ptr_Function_v4float Function -%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %28 -%33 = OpCompositeExtract %float %32 0 -%27 = OpExtInst %float %1 Sinh %33 -%34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%36 = OpLoad %v4float %34 -%37 = OpCompositeExtract %float %36 0 -%38 = OpFOrdEqual %bool %27 %37 -OpSelectionMerge %40 None -OpBranchConditional %38 %39 %40 -%39 = OpLabel -%42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%43 = OpLoad %v4float %42 -%44 = OpVectorShuffle %v2float %43 %43 0 1 -%41 = OpExtInst %v2float %1 Sinh %44 -%45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%46 = OpLoad %v4float %45 -%47 = OpVectorShuffle %v2float %46 %46 0 1 -%48 = OpFOrdEqual %v2bool %41 %47 -%50 = OpAll %bool %48 -OpBranch %40 -%40 = OpLabel -%51 = OpPhi %bool %false %25 %50 %39 -OpSelectionMerge %53 None -OpBranchConditional %51 %52 %53 -%52 = OpLabel -%55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%56 = OpLoad %v4float %55 -%57 = OpVectorShuffle %v3float %56 %56 0 1 2 -%54 = OpExtInst %v3float %1 Sinh %57 -%59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%60 = OpLoad %v4float %59 -%61 = OpVectorShuffle %v3float %60 %60 0 1 2 -%62 = OpFOrdEqual %v3bool %54 %61 -%64 = OpAll %bool %62 -OpBranch %53 -%53 = OpLabel -%65 = OpPhi %bool %false %40 %64 %52 -OpSelectionMerge %67 None -OpBranchConditional %65 %66 %67 -%66 = OpLabel -%69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%70 = OpLoad %v4float %69 -%68 = OpExtInst %v4float %1 Sinh %70 -%71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%72 = OpLoad %v4float %71 -%73 = OpFOrdEqual %v4bool %68 %72 -%75 = OpAll %bool %73 -OpBranch %67 -%67 = OpLabel -%76 = OpPhi %bool %false %53 %75 %66 -OpSelectionMerge %78 None -OpBranchConditional %76 %77 %78 -%77 = OpLabel -%79 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%80 = OpLoad %v4float %79 -%81 = OpCompositeExtract %float %80 0 -%82 = OpFOrdEqual %bool %float_0 %81 -OpBranch %78 -%78 = OpLabel -%83 = OpPhi %bool %false %67 %82 %77 -OpSelectionMerge %85 None -OpBranchConditional %83 %84 %85 -%84 = OpLabel -%86 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%87 = OpLoad %v4float %86 -%88 = OpVectorShuffle %v2float %87 %87 0 1 -%89 = OpFOrdEqual %v2bool %19 %88 -%90 = OpAll %bool %89 -OpBranch %85 -%85 = OpLabel -%91 = OpPhi %bool %false %78 %90 %84 -OpSelectionMerge %93 None -OpBranchConditional %91 %92 %93 -%92 = OpLabel -%95 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%96 = OpLoad %v4float %95 -%97 = OpVectorShuffle %v3float %96 %96 0 1 2 -%98 = OpFOrdEqual %v3bool %94 %97 -%99 = OpAll %bool %98 -OpBranch %93 -%93 = OpLabel -%100 = OpPhi %bool %false %85 %99 %92 -OpSelectionMerge %102 None -OpBranchConditional %100 %101 %102 -%101 = OpLabel -%104 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%105 = OpLoad %v4float %104 -%106 = OpFOrdEqual %v4bool %103 %105 -%107 = OpAll %bool %106 -OpBranch %102 -%102 = OpLabel -%108 = OpPhi %bool %false %93 %107 %101 -OpSelectionMerge %113 None -OpBranchConditional %108 %111 %112 -%111 = OpLabel -%114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%116 = OpLoad %v4float %114 -OpStore %109 %116 -OpBranch %113 -%112 = OpLabel -%117 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%119 = OpLoad %v4float %117 -OpStore %109 %119 -OpBranch %113 -%113 = OpLabel -%120 = OpLoad %v4float %109 -OpReturnValue %120 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %109 = OpVariable %_ptr_Function_v4float Function + %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %28 + %33 = OpCompositeExtract %float %32 0 + %27 = OpExtInst %float %1 Sinh %33 + %34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %36 = OpLoad %v4float %34 + %37 = OpCompositeExtract %float %36 0 + %38 = OpFOrdEqual %bool %27 %37 + OpSelectionMerge %40 None + OpBranchConditional %38 %39 %40 + %39 = OpLabel + %42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %43 = OpLoad %v4float %42 + %44 = OpVectorShuffle %v2float %43 %43 0 1 + %41 = OpExtInst %v2float %1 Sinh %44 + %45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %46 = OpLoad %v4float %45 + %47 = OpVectorShuffle %v2float %46 %46 0 1 + %48 = OpFOrdEqual %v2bool %41 %47 + %50 = OpAll %bool %48 + OpBranch %40 + %40 = OpLabel + %51 = OpPhi %bool %false %25 %50 %39 + OpSelectionMerge %53 None + OpBranchConditional %51 %52 %53 + %52 = OpLabel + %55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %56 = OpLoad %v4float %55 + %57 = OpVectorShuffle %v3float %56 %56 0 1 2 + %54 = OpExtInst %v3float %1 Sinh %57 + %59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %60 = OpLoad %v4float %59 + %61 = OpVectorShuffle %v3float %60 %60 0 1 2 + %62 = OpFOrdEqual %v3bool %54 %61 + %64 = OpAll %bool %62 + OpBranch %53 + %53 = OpLabel + %65 = OpPhi %bool %false %40 %64 %52 + OpSelectionMerge %67 None + OpBranchConditional %65 %66 %67 + %66 = OpLabel + %69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %70 = OpLoad %v4float %69 + %68 = OpExtInst %v4float %1 Sinh %70 + %71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %72 = OpLoad %v4float %71 + %73 = OpFOrdEqual %v4bool %68 %72 + %75 = OpAll %bool %73 + OpBranch %67 + %67 = OpLabel + %76 = OpPhi %bool %false %53 %75 %66 + OpSelectionMerge %78 None + OpBranchConditional %76 %77 %78 + %77 = OpLabel + %79 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %80 = OpLoad %v4float %79 + %81 = OpCompositeExtract %float %80 0 + %82 = OpFOrdEqual %bool %float_0 %81 + OpBranch %78 + %78 = OpLabel + %83 = OpPhi %bool %false %67 %82 %77 + OpSelectionMerge %85 None + OpBranchConditional %83 %84 %85 + %84 = OpLabel + %86 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %87 = OpLoad %v4float %86 + %88 = OpVectorShuffle %v2float %87 %87 0 1 + %89 = OpFOrdEqual %v2bool %19 %88 + %90 = OpAll %bool %89 + OpBranch %85 + %85 = OpLabel + %91 = OpPhi %bool %false %78 %90 %84 + OpSelectionMerge %93 None + OpBranchConditional %91 %92 %93 + %92 = OpLabel + %95 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %96 = OpLoad %v4float %95 + %97 = OpVectorShuffle %v3float %96 %96 0 1 2 + %98 = OpFOrdEqual %v3bool %94 %97 + %99 = OpAll %bool %98 + OpBranch %93 + %93 = OpLabel + %100 = OpPhi %bool %false %85 %99 %92 + OpSelectionMerge %102 None + OpBranchConditional %100 %101 %102 + %101 = OpLabel + %104 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %105 = OpLoad %v4float %104 + %106 = OpFOrdEqual %v4bool %103 %105 + %107 = OpAll %bool %106 + OpBranch %102 + %102 = OpLabel + %108 = OpPhi %bool %false %93 %107 %101 + OpSelectionMerge %113 None + OpBranchConditional %108 %111 %112 + %111 = OpLabel + %114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %116 = OpLoad %v4float %114 + OpStore %109 %116 + OpBranch %113 + %112 = OpLabel + %117 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %119 = OpLoad %v4float %117 + OpStore %109 %119 + OpBranch %113 + %113 = OpLabel + %120 = OpLoad %v4float %109 + OpReturnValue %120 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Sinh.wgsl b/tests/sksl/intrinsics/Sinh.wgsl new file mode 100644 index 000000000000..34c4a8b71202 --- /dev/null +++ b/tests/sksl/intrinsics/Sinh.wgsl @@ -0,0 +1,30 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + inputVal: vec4, + expected: vec4, + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + let _skTemp0 = sinh(_globalUniforms.inputVal.x); + let _skTemp1 = sinh(_globalUniforms.inputVal.xy); + let _skTemp2 = sinh(_globalUniforms.inputVal.xyz); + let _skTemp3 = sinh(_globalUniforms.inputVal); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((_skTemp0 == _globalUniforms.expected.x) && all(_skTemp1 == _globalUniforms.expected.xy)) && all(_skTemp2 == _globalUniforms.expected.xyz)) && all(_skTemp3 == _globalUniforms.expected)) && (0.0 == _globalUniforms.expected.x)) && all(vec2(0.0) == _globalUniforms.expected.xy)) && all(vec3(0.0) == _globalUniforms.expected.xyz)) && all(vec4(0.0) == _globalUniforms.expected))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/intrinsics/Smoothstep.asm.frag b/tests/sksl/intrinsics/Smoothstep.asm.frag index be000d4cdaf8..6c89b9a6d81e 100644 --- a/tests/sksl/intrinsics/Smoothstep.asm.frag +++ b/tests/sksl/intrinsics/Smoothstep.asm.frag @@ -1,362 +1,362 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testInputs" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %expectedA "expectedA" -OpName %expectedB "expectedB" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %expectedA RelaxedPrecision -OpDecorate %expectedB RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %59 RelaxedPrecision -OpDecorate %65 RelaxedPrecision -OpDecorate %79 RelaxedPrecision -OpDecorate %80 RelaxedPrecision -OpDecorate %83 RelaxedPrecision -OpDecorate %84 RelaxedPrecision -OpDecorate %92 RelaxedPrecision -OpDecorate %93 RelaxedPrecision -OpDecorate %94 RelaxedPrecision -OpDecorate %96 RelaxedPrecision -OpDecorate %97 RelaxedPrecision -OpDecorate %98 RelaxedPrecision -OpDecorate %100 RelaxedPrecision -OpDecorate %108 RelaxedPrecision -OpDecorate %109 RelaxedPrecision -OpDecorate %110 RelaxedPrecision -OpDecorate %112 RelaxedPrecision -OpDecorate %113 RelaxedPrecision -OpDecorate %114 RelaxedPrecision -OpDecorate %117 RelaxedPrecision -OpDecorate %125 RelaxedPrecision -OpDecorate %126 RelaxedPrecision -OpDecorate %127 RelaxedPrecision -OpDecorate %129 RelaxedPrecision -OpDecorate %130 RelaxedPrecision -OpDecorate %131 RelaxedPrecision -OpDecorate %144 RelaxedPrecision -OpDecorate %151 RelaxedPrecision -OpDecorate %162 RelaxedPrecision -OpDecorate %163 RelaxedPrecision -OpDecorate %165 RelaxedPrecision -OpDecorate %166 RelaxedPrecision -OpDecorate %173 RelaxedPrecision -OpDecorate %174 RelaxedPrecision -OpDecorate %176 RelaxedPrecision -OpDecorate %177 RelaxedPrecision -OpDecorate %178 RelaxedPrecision -OpDecorate %186 RelaxedPrecision -OpDecorate %187 RelaxedPrecision -OpDecorate %189 RelaxedPrecision -OpDecorate %190 RelaxedPrecision -OpDecorate %191 RelaxedPrecision -OpDecorate %199 RelaxedPrecision -OpDecorate %201 RelaxedPrecision -OpDecorate %210 RelaxedPrecision -OpDecorate %212 RelaxedPrecision -OpDecorate %213 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testInputs" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %expectedA "expectedA" + OpName %expectedB "expectedB" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %expectedA RelaxedPrecision + OpDecorate %expectedB RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %59 RelaxedPrecision + OpDecorate %65 RelaxedPrecision + OpDecorate %79 RelaxedPrecision + OpDecorate %80 RelaxedPrecision + OpDecorate %83 RelaxedPrecision + OpDecorate %84 RelaxedPrecision + OpDecorate %92 RelaxedPrecision + OpDecorate %93 RelaxedPrecision + OpDecorate %94 RelaxedPrecision + OpDecorate %96 RelaxedPrecision + OpDecorate %97 RelaxedPrecision + OpDecorate %98 RelaxedPrecision + OpDecorate %100 RelaxedPrecision + OpDecorate %108 RelaxedPrecision + OpDecorate %109 RelaxedPrecision + OpDecorate %110 RelaxedPrecision + OpDecorate %112 RelaxedPrecision + OpDecorate %113 RelaxedPrecision + OpDecorate %114 RelaxedPrecision + OpDecorate %117 RelaxedPrecision + OpDecorate %125 RelaxedPrecision + OpDecorate %126 RelaxedPrecision + OpDecorate %127 RelaxedPrecision + OpDecorate %129 RelaxedPrecision + OpDecorate %130 RelaxedPrecision + OpDecorate %131 RelaxedPrecision + OpDecorate %144 RelaxedPrecision + OpDecorate %151 RelaxedPrecision + OpDecorate %162 RelaxedPrecision + OpDecorate %163 RelaxedPrecision + OpDecorate %165 RelaxedPrecision + OpDecorate %166 RelaxedPrecision + OpDecorate %173 RelaxedPrecision + OpDecorate %174 RelaxedPrecision + OpDecorate %176 RelaxedPrecision + OpDecorate %177 RelaxedPrecision + OpDecorate %178 RelaxedPrecision + OpDecorate %186 RelaxedPrecision + OpDecorate %187 RelaxedPrecision + OpDecorate %189 RelaxedPrecision + OpDecorate %190 RelaxedPrecision + OpDecorate %191 RelaxedPrecision + OpDecorate %199 RelaxedPrecision + OpDecorate %201 RelaxedPrecision + OpDecorate %210 RelaxedPrecision + OpDecorate %212 RelaxedPrecision + OpDecorate %213 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float %float_0_84375 = OpConstant %float 0.84375 -%float_1 = OpConstant %float 1 -%30 = OpConstantComposite %v4float %float_0 %float_0 %float_0_84375 %float_1 -%32 = OpConstantComposite %v4float %float_1 %float_0 %float_1 %float_1 -%false = OpConstantFalse %bool -%true = OpConstantTrue %bool -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%45 = OpConstantComposite %v3float %float_0 %float_0 %float_0_84375 -%v3bool = OpTypeVector %bool 3 + %float_1 = OpConstant %float 1 + %30 = OpConstantComposite %v4float %float_0 %float_0 %float_0_84375 %float_1 + %32 = OpConstantComposite %v4float %float_1 %float_0 %float_1 %float_1 + %false = OpConstantFalse %bool + %true = OpConstantTrue %bool + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %45 = OpConstantComposite %v3float %float_0 %float_0 %float_0_84375 + %v3bool = OpTypeVector %bool 3 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_2 = OpConstant %int 2 -%int_1 = OpConstant %int 1 + %int = OpTypeInt 32 1 + %int_2 = OpConstant %int 2 + %int_1 = OpConstant %int 1 %float_n1_25 = OpConstant %float -1.25 -%99 = OpConstantComposite %v2float %float_n1_25 %float_0 -%float_0_75 = OpConstant %float 0.75 -%116 = OpConstantComposite %v3float %float_n1_25 %float_0 %float_0_75 -%float_2_25 = OpConstant %float 2.25 -%133 = OpConstantComposite %v4float %float_n1_25 %float_0 %float_0_75 %float_2_25 -%v4bool = OpTypeVector %bool 4 -%143 = OpConstantComposite %v2float %float_1 %float_0 -%150 = OpConstantComposite %v3float %float_1 %float_0 %float_1 + %99 = OpConstantComposite %v2float %float_n1_25 %float_0 + %float_0_75 = OpConstant %float 0.75 + %116 = OpConstantComposite %v3float %float_n1_25 %float_0 %float_0_75 + %float_2_25 = OpConstant %float 2.25 + %133 = OpConstantComposite %v4float %float_n1_25 %float_0 %float_0_75 %float_2_25 + %v4bool = OpTypeVector %bool 4 + %143 = OpConstantComposite %v2float %float_1 %float_0 + %150 = OpConstantComposite %v3float %float_1 %float_0 %float_1 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%expectedA = OpVariable %_ptr_Function_v4float Function -%expectedB = OpVariable %_ptr_Function_v4float Function -%205 = OpVariable %_ptr_Function_v4float Function -OpStore %expectedA %30 -OpStore %expectedB %32 -OpSelectionMerge %36 None -OpBranchConditional %true %35 %36 -%35 = OpLabel -%37 = OpVectorShuffle %v2float %30 %30 0 1 -%38 = OpFOrdEqual %v2bool %19 %37 -%40 = OpAll %bool %38 -OpBranch %36 -%36 = OpLabel -%41 = OpPhi %bool %false %25 %40 %35 -OpSelectionMerge %43 None -OpBranchConditional %41 %42 %43 -%42 = OpLabel -%46 = OpVectorShuffle %v3float %30 %30 0 1 2 -%47 = OpFOrdEqual %v3bool %45 %46 -%49 = OpAll %bool %47 -OpBranch %43 -%43 = OpLabel -%50 = OpPhi %bool %false %36 %49 %42 -OpSelectionMerge %52 None -OpBranchConditional %50 %51 %52 -%51 = OpLabel -OpBranch %52 -%52 = OpLabel -%53 = OpPhi %bool %false %43 %true %51 -OpSelectionMerge %55 None -OpBranchConditional %53 %54 %55 -%54 = OpLabel -OpBranch %55 -%55 = OpLabel -%56 = OpPhi %bool %false %52 %true %54 -OpSelectionMerge %58 None -OpBranchConditional %56 %57 %58 -%57 = OpLabel -%59 = OpVectorShuffle %v2float %30 %30 0 1 -%60 = OpFOrdEqual %v2bool %19 %59 -%61 = OpAll %bool %60 -OpBranch %58 -%58 = OpLabel -%62 = OpPhi %bool %false %55 %61 %57 -OpSelectionMerge %64 None -OpBranchConditional %62 %63 %64 -%63 = OpLabel -%65 = OpVectorShuffle %v3float %30 %30 0 1 2 -%66 = OpFOrdEqual %v3bool %45 %65 -%67 = OpAll %bool %66 -OpBranch %64 -%64 = OpLabel -%68 = OpPhi %bool %false %58 %67 %63 -OpSelectionMerge %70 None -OpBranchConditional %68 %69 %70 -%69 = OpLabel -OpBranch %70 -%70 = OpLabel -%71 = OpPhi %bool %false %64 %true %69 -OpSelectionMerge %73 None -OpBranchConditional %71 %72 %73 -%72 = OpLabel -%75 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%79 = OpLoad %v4float %75 -%80 = OpCompositeExtract %float %79 1 -%81 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%83 = OpLoad %v4float %81 -%84 = OpCompositeExtract %float %83 1 -%74 = OpExtInst %float %1 SmoothStep %80 %84 %float_n1_25 -%86 = OpFOrdEqual %bool %74 %float_0 -OpBranch %73 -%73 = OpLabel -%87 = OpPhi %bool %false %70 %86 %72 -OpSelectionMerge %89 None -OpBranchConditional %87 %88 %89 -%88 = OpLabel -%91 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%92 = OpLoad %v4float %91 -%93 = OpCompositeExtract %float %92 1 -%94 = OpCompositeConstruct %v2float %93 %93 -%95 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%96 = OpLoad %v4float %95 -%97 = OpCompositeExtract %float %96 1 -%98 = OpCompositeConstruct %v2float %97 %97 -%90 = OpExtInst %v2float %1 SmoothStep %94 %98 %99 -%100 = OpVectorShuffle %v2float %30 %30 0 1 -%101 = OpFOrdEqual %v2bool %90 %100 -%102 = OpAll %bool %101 -OpBranch %89 -%89 = OpLabel -%103 = OpPhi %bool %false %73 %102 %88 -OpSelectionMerge %105 None -OpBranchConditional %103 %104 %105 -%104 = OpLabel -%107 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%108 = OpLoad %v4float %107 -%109 = OpCompositeExtract %float %108 1 -%110 = OpCompositeConstruct %v3float %109 %109 %109 -%111 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%112 = OpLoad %v4float %111 -%113 = OpCompositeExtract %float %112 1 -%114 = OpCompositeConstruct %v3float %113 %113 %113 -%106 = OpExtInst %v3float %1 SmoothStep %110 %114 %116 -%117 = OpVectorShuffle %v3float %30 %30 0 1 2 -%118 = OpFOrdEqual %v3bool %106 %117 -%119 = OpAll %bool %118 -OpBranch %105 -%105 = OpLabel -%120 = OpPhi %bool %false %89 %119 %104 -OpSelectionMerge %122 None -OpBranchConditional %120 %121 %122 -%121 = OpLabel -%124 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%125 = OpLoad %v4float %124 -%126 = OpCompositeExtract %float %125 1 -%127 = OpCompositeConstruct %v4float %126 %126 %126 %126 -%128 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%129 = OpLoad %v4float %128 -%130 = OpCompositeExtract %float %129 1 -%131 = OpCompositeConstruct %v4float %130 %130 %130 %130 -%123 = OpExtInst %v4float %1 SmoothStep %127 %131 %133 -%134 = OpFOrdEqual %v4bool %123 %30 -%136 = OpAll %bool %134 -OpBranch %122 -%122 = OpLabel -%137 = OpPhi %bool %false %105 %136 %121 -OpSelectionMerge %139 None -OpBranchConditional %137 %138 %139 -%138 = OpLabel -OpBranch %139 -%139 = OpLabel -%140 = OpPhi %bool %false %122 %true %138 -OpSelectionMerge %142 None -OpBranchConditional %140 %141 %142 -%141 = OpLabel -%144 = OpVectorShuffle %v2float %32 %32 0 1 -%145 = OpFOrdEqual %v2bool %143 %144 -%146 = OpAll %bool %145 -OpBranch %142 -%142 = OpLabel -%147 = OpPhi %bool %false %139 %146 %141 -OpSelectionMerge %149 None -OpBranchConditional %147 %148 %149 -%148 = OpLabel -%151 = OpVectorShuffle %v3float %32 %32 0 1 2 -%152 = OpFOrdEqual %v3bool %150 %151 -%153 = OpAll %bool %152 -OpBranch %149 -%149 = OpLabel -%154 = OpPhi %bool %false %142 %153 %148 -OpSelectionMerge %156 None -OpBranchConditional %154 %155 %156 -%155 = OpLabel -OpBranch %156 -%156 = OpLabel -%157 = OpPhi %bool %false %149 %true %155 -OpSelectionMerge %159 None -OpBranchConditional %157 %158 %159 -%158 = OpLabel -%161 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%162 = OpLoad %v4float %161 -%163 = OpCompositeExtract %float %162 0 -%164 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%165 = OpLoad %v4float %164 -%166 = OpCompositeExtract %float %165 0 -%160 = OpExtInst %float %1 SmoothStep %163 %166 %float_n1_25 -%167 = OpFOrdEqual %bool %160 %float_1 -OpBranch %159 -%159 = OpLabel -%168 = OpPhi %bool %false %156 %167 %158 -OpSelectionMerge %170 None -OpBranchConditional %168 %169 %170 -%169 = OpLabel -%172 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%173 = OpLoad %v4float %172 -%174 = OpVectorShuffle %v2float %173 %173 0 1 -%175 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%176 = OpLoad %v4float %175 -%177 = OpVectorShuffle %v2float %176 %176 0 1 -%171 = OpExtInst %v2float %1 SmoothStep %174 %177 %99 -%178 = OpVectorShuffle %v2float %32 %32 0 1 -%179 = OpFOrdEqual %v2bool %171 %178 -%180 = OpAll %bool %179 -OpBranch %170 -%170 = OpLabel -%181 = OpPhi %bool %false %159 %180 %169 -OpSelectionMerge %183 None -OpBranchConditional %181 %182 %183 -%182 = OpLabel -%185 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%186 = OpLoad %v4float %185 -%187 = OpVectorShuffle %v3float %186 %186 0 1 2 -%188 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%189 = OpLoad %v4float %188 -%190 = OpVectorShuffle %v3float %189 %189 0 1 2 -%184 = OpExtInst %v3float %1 SmoothStep %187 %190 %116 -%191 = OpVectorShuffle %v3float %32 %32 0 1 2 -%192 = OpFOrdEqual %v3bool %184 %191 -%193 = OpAll %bool %192 -OpBranch %183 -%183 = OpLabel -%194 = OpPhi %bool %false %170 %193 %182 -OpSelectionMerge %196 None -OpBranchConditional %194 %195 %196 -%195 = OpLabel -%198 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%199 = OpLoad %v4float %198 -%200 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%201 = OpLoad %v4float %200 -%197 = OpExtInst %v4float %1 SmoothStep %199 %201 %133 -%202 = OpFOrdEqual %v4bool %197 %32 -%203 = OpAll %bool %202 -OpBranch %196 -%196 = OpLabel -%204 = OpPhi %bool %false %183 %203 %195 -OpSelectionMerge %208 None -OpBranchConditional %204 %206 %207 -%206 = OpLabel -%209 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%210 = OpLoad %v4float %209 -OpStore %205 %210 -OpBranch %208 -%207 = OpLabel -%211 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%212 = OpLoad %v4float %211 -OpStore %205 %212 -OpBranch %208 -%208 = OpLabel -%213 = OpLoad %v4float %205 -OpReturnValue %213 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %expectedA = OpVariable %_ptr_Function_v4float Function + %expectedB = OpVariable %_ptr_Function_v4float Function + %205 = OpVariable %_ptr_Function_v4float Function + OpStore %expectedA %30 + OpStore %expectedB %32 + OpSelectionMerge %36 None + OpBranchConditional %true %35 %36 + %35 = OpLabel + %37 = OpVectorShuffle %v2float %30 %30 0 1 + %38 = OpFOrdEqual %v2bool %19 %37 + %40 = OpAll %bool %38 + OpBranch %36 + %36 = OpLabel + %41 = OpPhi %bool %false %25 %40 %35 + OpSelectionMerge %43 None + OpBranchConditional %41 %42 %43 + %42 = OpLabel + %46 = OpVectorShuffle %v3float %30 %30 0 1 2 + %47 = OpFOrdEqual %v3bool %45 %46 + %49 = OpAll %bool %47 + OpBranch %43 + %43 = OpLabel + %50 = OpPhi %bool %false %36 %49 %42 + OpSelectionMerge %52 None + OpBranchConditional %50 %51 %52 + %51 = OpLabel + OpBranch %52 + %52 = OpLabel + %53 = OpPhi %bool %false %43 %true %51 + OpSelectionMerge %55 None + OpBranchConditional %53 %54 %55 + %54 = OpLabel + OpBranch %55 + %55 = OpLabel + %56 = OpPhi %bool %false %52 %true %54 + OpSelectionMerge %58 None + OpBranchConditional %56 %57 %58 + %57 = OpLabel + %59 = OpVectorShuffle %v2float %30 %30 0 1 + %60 = OpFOrdEqual %v2bool %19 %59 + %61 = OpAll %bool %60 + OpBranch %58 + %58 = OpLabel + %62 = OpPhi %bool %false %55 %61 %57 + OpSelectionMerge %64 None + OpBranchConditional %62 %63 %64 + %63 = OpLabel + %65 = OpVectorShuffle %v3float %30 %30 0 1 2 + %66 = OpFOrdEqual %v3bool %45 %65 + %67 = OpAll %bool %66 + OpBranch %64 + %64 = OpLabel + %68 = OpPhi %bool %false %58 %67 %63 + OpSelectionMerge %70 None + OpBranchConditional %68 %69 %70 + %69 = OpLabel + OpBranch %70 + %70 = OpLabel + %71 = OpPhi %bool %false %64 %true %69 + OpSelectionMerge %73 None + OpBranchConditional %71 %72 %73 + %72 = OpLabel + %75 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %79 = OpLoad %v4float %75 + %80 = OpCompositeExtract %float %79 1 + %81 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %83 = OpLoad %v4float %81 + %84 = OpCompositeExtract %float %83 1 + %74 = OpExtInst %float %1 SmoothStep %80 %84 %float_n1_25 + %86 = OpFOrdEqual %bool %74 %float_0 + OpBranch %73 + %73 = OpLabel + %87 = OpPhi %bool %false %70 %86 %72 + OpSelectionMerge %89 None + OpBranchConditional %87 %88 %89 + %88 = OpLabel + %91 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %92 = OpLoad %v4float %91 + %93 = OpCompositeExtract %float %92 1 + %94 = OpCompositeConstruct %v2float %93 %93 + %95 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %96 = OpLoad %v4float %95 + %97 = OpCompositeExtract %float %96 1 + %98 = OpCompositeConstruct %v2float %97 %97 + %90 = OpExtInst %v2float %1 SmoothStep %94 %98 %99 + %100 = OpVectorShuffle %v2float %30 %30 0 1 + %101 = OpFOrdEqual %v2bool %90 %100 + %102 = OpAll %bool %101 + OpBranch %89 + %89 = OpLabel + %103 = OpPhi %bool %false %73 %102 %88 + OpSelectionMerge %105 None + OpBranchConditional %103 %104 %105 + %104 = OpLabel + %107 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %108 = OpLoad %v4float %107 + %109 = OpCompositeExtract %float %108 1 + %110 = OpCompositeConstruct %v3float %109 %109 %109 + %111 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %112 = OpLoad %v4float %111 + %113 = OpCompositeExtract %float %112 1 + %114 = OpCompositeConstruct %v3float %113 %113 %113 + %106 = OpExtInst %v3float %1 SmoothStep %110 %114 %116 + %117 = OpVectorShuffle %v3float %30 %30 0 1 2 + %118 = OpFOrdEqual %v3bool %106 %117 + %119 = OpAll %bool %118 + OpBranch %105 + %105 = OpLabel + %120 = OpPhi %bool %false %89 %119 %104 + OpSelectionMerge %122 None + OpBranchConditional %120 %121 %122 + %121 = OpLabel + %124 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %125 = OpLoad %v4float %124 + %126 = OpCompositeExtract %float %125 1 + %127 = OpCompositeConstruct %v4float %126 %126 %126 %126 + %128 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %129 = OpLoad %v4float %128 + %130 = OpCompositeExtract %float %129 1 + %131 = OpCompositeConstruct %v4float %130 %130 %130 %130 + %123 = OpExtInst %v4float %1 SmoothStep %127 %131 %133 + %134 = OpFOrdEqual %v4bool %123 %30 + %136 = OpAll %bool %134 + OpBranch %122 + %122 = OpLabel + %137 = OpPhi %bool %false %105 %136 %121 + OpSelectionMerge %139 None + OpBranchConditional %137 %138 %139 + %138 = OpLabel + OpBranch %139 + %139 = OpLabel + %140 = OpPhi %bool %false %122 %true %138 + OpSelectionMerge %142 None + OpBranchConditional %140 %141 %142 + %141 = OpLabel + %144 = OpVectorShuffle %v2float %32 %32 0 1 + %145 = OpFOrdEqual %v2bool %143 %144 + %146 = OpAll %bool %145 + OpBranch %142 + %142 = OpLabel + %147 = OpPhi %bool %false %139 %146 %141 + OpSelectionMerge %149 None + OpBranchConditional %147 %148 %149 + %148 = OpLabel + %151 = OpVectorShuffle %v3float %32 %32 0 1 2 + %152 = OpFOrdEqual %v3bool %150 %151 + %153 = OpAll %bool %152 + OpBranch %149 + %149 = OpLabel + %154 = OpPhi %bool %false %142 %153 %148 + OpSelectionMerge %156 None + OpBranchConditional %154 %155 %156 + %155 = OpLabel + OpBranch %156 + %156 = OpLabel + %157 = OpPhi %bool %false %149 %true %155 + OpSelectionMerge %159 None + OpBranchConditional %157 %158 %159 + %158 = OpLabel + %161 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %162 = OpLoad %v4float %161 + %163 = OpCompositeExtract %float %162 0 + %164 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %165 = OpLoad %v4float %164 + %166 = OpCompositeExtract %float %165 0 + %160 = OpExtInst %float %1 SmoothStep %163 %166 %float_n1_25 + %167 = OpFOrdEqual %bool %160 %float_1 + OpBranch %159 + %159 = OpLabel + %168 = OpPhi %bool %false %156 %167 %158 + OpSelectionMerge %170 None + OpBranchConditional %168 %169 %170 + %169 = OpLabel + %172 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %173 = OpLoad %v4float %172 + %174 = OpVectorShuffle %v2float %173 %173 0 1 + %175 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %176 = OpLoad %v4float %175 + %177 = OpVectorShuffle %v2float %176 %176 0 1 + %171 = OpExtInst %v2float %1 SmoothStep %174 %177 %99 + %178 = OpVectorShuffle %v2float %32 %32 0 1 + %179 = OpFOrdEqual %v2bool %171 %178 + %180 = OpAll %bool %179 + OpBranch %170 + %170 = OpLabel + %181 = OpPhi %bool %false %159 %180 %169 + OpSelectionMerge %183 None + OpBranchConditional %181 %182 %183 + %182 = OpLabel + %185 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %186 = OpLoad %v4float %185 + %187 = OpVectorShuffle %v3float %186 %186 0 1 2 + %188 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %189 = OpLoad %v4float %188 + %190 = OpVectorShuffle %v3float %189 %189 0 1 2 + %184 = OpExtInst %v3float %1 SmoothStep %187 %190 %116 + %191 = OpVectorShuffle %v3float %32 %32 0 1 2 + %192 = OpFOrdEqual %v3bool %184 %191 + %193 = OpAll %bool %192 + OpBranch %183 + %183 = OpLabel + %194 = OpPhi %bool %false %170 %193 %182 + OpSelectionMerge %196 None + OpBranchConditional %194 %195 %196 + %195 = OpLabel + %198 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %199 = OpLoad %v4float %198 + %200 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %201 = OpLoad %v4float %200 + %197 = OpExtInst %v4float %1 SmoothStep %199 %201 %133 + %202 = OpFOrdEqual %v4bool %197 %32 + %203 = OpAll %bool %202 + OpBranch %196 + %196 = OpLabel + %204 = OpPhi %bool %false %183 %203 %195 + OpSelectionMerge %208 None + OpBranchConditional %204 %206 %207 + %206 = OpLabel + %209 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %210 = OpLoad %v4float %209 + OpStore %205 %210 + OpBranch %208 + %207 = OpLabel + %211 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %212 = OpLoad %v4float %211 + OpStore %205 %212 + OpBranch %208 + %208 = OpLabel + %213 = OpLoad %v4float %205 + OpReturnValue %213 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Smoothstep.skrp b/tests/sksl/intrinsics/Smoothstep.skrp index 87d361dbfa75..2258b5dc7683 100644 --- a/tests/sksl/intrinsics/Smoothstep.skrp +++ b/tests/sksl/intrinsics/Smoothstep.skrp @@ -1,60 +1,56 @@ +136 instructions + [immutable slots] -constVal(0) = 0xBFA00000 (-1.25) -constVal(1) = 0 -constVal(2) = 0x3F400000 (0.75) -constVal(3) = 0x40100000 (2.25) -expectedA(0) = 0 -expectedA(1) = 0 -expectedA(2) = 0x3F580000 (0.84375) -expectedA(3) = 0x3F800000 (1.0) -expectedB(0) = 0x3F800000 (1.0) -expectedB(1) = 0 -expectedB(2) = 0x3F800000 (1.0) -expectedB(3) = 0x3F800000 (1.0) +i0 = 0xBFA00000 (-1.25) +i1 = 0 +i2 = 0x3F400000 (0.75) +i3 = 0x40100000 (2.25) +i4 = 0 +i5 = 0 +i6 = 0x3F580000 (0.84375) +i7 = 0x3F800000 (1.0) +i8 = 0x3F800000 (1.0) +i9 = 0 +i10 = 0x3F800000 (1.0) +i11 = 0x3F800000 (1.0) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true -copy_slot_unmasked $0 = expectedA(0) +copy_constant $0 = 0 cmpeq_imm_float $0 = equal($0, 0) splat_2_constants $1..2 = 0 -copy_2_slots_unmasked $3..4 = expectedA(0..1) +copy_2_immutables_unmasked $3..4 = i4..5 [0, 0] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -splat_2_constants $1..2 = 0 -copy_constant $3 = 0x3F580000 (0.84375) -copy_3_slots_unmasked $4..6 = expectedA(0..2) +copy_3_immutables_unmasked $1..3 = i4..6 [0, 0, 0x3F580000 (0.84375)] +copy_3_immutables_unmasked $4..6 = i4..6 [0, 0, 0x3F580000 (0.84375)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -splat_2_constants $1..2 = 0 -copy_constant $3 = 0x3F580000 (0.84375) -copy_constant $4 = 0x3F800000 (1.0) -copy_4_slots_unmasked $5..8 = expectedA +copy_4_immutables_unmasked $1..4 = i4..7 [0, 0, 0x3F580000 (0.84375), 0x3F800000 (1.0)] +copy_4_immutables_unmasked $5..8 = i4..7 [0, 0, 0x3F580000 (0.84375), 0x3F800000 (1.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expectedA(0) +copy_constant $1 = 0 cmpeq_imm_float $1 = equal($1, 0) bitwise_and_int $0 &= $1 splat_2_constants $1..2 = 0 -copy_2_slots_unmasked $3..4 = expectedA(0..1) +copy_2_immutables_unmasked $3..4 = i4..5 [0, 0] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -splat_2_constants $1..2 = 0 -copy_constant $3 = 0x3F580000 (0.84375) -copy_3_slots_unmasked $4..6 = expectedA(0..2) +copy_3_immutables_unmasked $1..3 = i4..6 [0, 0, 0x3F580000 (0.84375)] +copy_3_immutables_unmasked $4..6 = i4..6 [0, 0, 0x3F580000 (0.84375)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -splat_2_constants $1..2 = 0 -copy_constant $3 = 0x3F580000 (0.84375) -copy_constant $4 = 0x3F800000 (1.0) -copy_4_slots_unmasked $5..8 = expectedA +copy_4_immutables_unmasked $1..4 = i4..7 [0, 0, 0x3F580000 (0.84375), 0x3F800000 (1.0)] +copy_4_immutables_unmasked $5..8 = i4..7 [0, 0, 0x3F580000 (0.84375), 0x3F800000 (1.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -63,17 +59,15 @@ copy_uniform $1 = colorRed(1) copy_uniform $2 = colorGreen(1) copy_constant $3 = 0xBFA00000 (-1.25) smoothstep_n_floats $1 = smoothstep($1, $2, $3) -copy_slot_unmasked $2 = expectedA(0) -cmpeq_float $1 = equal($1, $2) +cmpeq_imm_float $1 = equal($1, 0) bitwise_and_int $0 &= $1 copy_uniform $1 = colorRed(1) copy_slot_unmasked $2 = $1 copy_uniform $3 = colorGreen(1) copy_slot_unmasked $4 = $3 -copy_constant $5 = 0xBFA00000 (-1.25) -copy_constant $6 = 0 +copy_2_immutables_unmasked $5..6 = i0..1 [0xBFA00000 (-1.25), 0] smoothstep_n_floats $1..2 = smoothstep($1..2, $3..4, $5..6) -copy_2_slots_unmasked $3..4 = expectedA(0..1) +copy_2_immutables_unmasked $3..4 = i4..5 [0, 0] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 @@ -81,11 +75,9 @@ copy_uniform $1 = colorRed(1) swizzle_3 $1..3 = ($1..3).xxx copy_uniform $4 = colorGreen(1) swizzle_3 $4..6 = ($4..6).xxx -copy_constant $7 = 0xBFA00000 (-1.25) -copy_constant $8 = 0 -copy_constant $9 = 0x3F400000 (0.75) +copy_3_immutables_unmasked $7..9 = i0..2 [0xBFA00000 (-1.25), 0, 0x3F400000 (0.75)] smoothstep_n_floats $1..3 = smoothstep($1..3, $4..6, $7..9) -copy_3_slots_unmasked $4..6 = expectedA(0..2) +copy_3_immutables_unmasked $4..6 = i4..6 [0, 0, 0x3F580000 (0.84375)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 @@ -94,34 +86,29 @@ copy_uniform $1 = colorRed(1) swizzle_4 $1..4 = ($1..4).xxxx copy_uniform $5 = colorGreen(1) swizzle_4 $5..8 = ($5..8).xxxx -copy_4_slots_unmasked $9..12 = constVal +copy_4_immutables_unmasked $9..12 = i0..3 [0xBFA00000 (-1.25), 0, 0x3F400000 (0.75), 0x40100000 (2.25)] smoothstep_n_floats $1..4 = smoothstep($1..4, $5..8, $9..12) -copy_4_slots_unmasked $5..8 = expectedA +copy_4_immutables_unmasked $5..8 = i4..7 [0, 0, 0x3F580000 (0.84375), 0x3F800000 (1.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expectedB(0) +copy_constant $1 = 0x3F800000 (1.0) cmpeq_imm_float $1 = equal($1, 0x3F800000 (1.0)) bitwise_and_int $0 &= $1 -copy_constant $1 = 0x3F800000 (1.0) -copy_constant $2 = 0 -copy_2_slots_unmasked $3..4 = expectedB(0..1) +copy_2_immutables_unmasked $1..2 = i8..9 [0x3F800000 (1.0), 0] +copy_2_immutables_unmasked $3..4 = i8..9 [0x3F800000 (1.0), 0] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0x3F800000 (1.0) -copy_constant $2 = 0 -copy_constant $3 = 0x3F800000 (1.0) -copy_3_slots_unmasked $4..6 = expectedB(0..2) +copy_3_immutables_unmasked $1..3 = i8..10 [0x3F800000 (1.0), 0, 0x3F800000 (1.0)] +copy_3_immutables_unmasked $4..6 = i8..10 [0x3F800000 (1.0), 0, 0x3F800000 (1.0)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_constant $1 = 0x3F800000 (1.0) -copy_constant $2 = 0 -splat_2_constants $3..4 = 0x3F800000 (1.0) -copy_4_slots_unmasked $5..8 = expectedB +copy_4_immutables_unmasked $1..4 = i8..11 [0x3F800000 (1.0), 0, 0x3F800000 (1.0), 0x3F800000 (1.0)] +copy_4_immutables_unmasked $5..8 = i8..11 [0x3F800000 (1.0), 0, 0x3F800000 (1.0), 0x3F800000 (1.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -130,34 +117,30 @@ copy_uniform $1 = colorRed(0) copy_uniform $2 = colorGreen(0) copy_constant $3 = 0xBFA00000 (-1.25) smoothstep_n_floats $1 = smoothstep($1, $2, $3) -copy_slot_unmasked $2 = expectedB(0) -cmpeq_float $1 = equal($1, $2) +cmpeq_imm_float $1 = equal($1, 0x3F800000 (1.0)) bitwise_and_int $0 &= $1 copy_2_uniforms $1..2 = colorRed(0..1) copy_2_uniforms $3..4 = colorGreen(0..1) -copy_constant $5 = 0xBFA00000 (-1.25) -copy_constant $6 = 0 +copy_2_immutables_unmasked $5..6 = i0..1 [0xBFA00000 (-1.25), 0] smoothstep_n_floats $1..2 = smoothstep($1..2, $3..4, $5..6) -copy_2_slots_unmasked $3..4 = expectedB(0..1) +copy_2_immutables_unmasked $3..4 = i8..9 [0x3F800000 (1.0), 0] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_3_uniforms $1..3 = colorRed(0..2) copy_3_uniforms $4..6 = colorGreen(0..2) -copy_constant $7 = 0xBFA00000 (-1.25) -copy_constant $8 = 0 -copy_constant $9 = 0x3F400000 (0.75) +copy_3_immutables_unmasked $7..9 = i0..2 [0xBFA00000 (-1.25), 0, 0x3F400000 (0.75)] smoothstep_n_floats $1..3 = smoothstep($1..3, $4..6, $7..9) -copy_3_slots_unmasked $4..6 = expectedB(0..2) +copy_3_immutables_unmasked $4..6 = i8..10 [0x3F800000 (1.0), 0, 0x3F800000 (1.0)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_4_uniforms $1..4 = colorRed copy_4_uniforms $5..8 = colorGreen -copy_4_slots_unmasked $9..12 = constVal +copy_4_immutables_unmasked $9..12 = i0..3 [0xBFA00000 (-1.25), 0, 0x3F400000 (0.75), 0x40100000 (2.25)] smoothstep_n_floats $1..4 = smoothstep($1..4, $5..8, $9..12) -copy_4_slots_unmasked $5..8 = expectedB +copy_4_immutables_unmasked $5..8 = i8..11 [0x3F800000 (1.0), 0, 0x3F800000 (1.0), 0x3F800000 (1.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 diff --git a/tests/sksl/intrinsics/Smoothstep.wgsl b/tests/sksl/intrinsics/Smoothstep.wgsl index b4941ce4fa0c..3f84a66e7074 100644 --- a/tests/sksl/intrinsics/Smoothstep.wgsl +++ b/tests/sksl/intrinsics/Smoothstep.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -25,7 +26,7 @@ fn main(_skParam0: vec2) -> vec4 { let _skTemp5 = smoothstep(_globalUniforms.colorRed.xy, _globalUniforms.colorGreen.xy, vec2(-1.25, 0.0)); let _skTemp6 = smoothstep(_globalUniforms.colorRed.xyz, _globalUniforms.colorGreen.xyz, vec3(-1.25, 0.0, 0.75)); let _skTemp7 = smoothstep(_globalUniforms.colorRed, _globalUniforms.colorGreen, constVal); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((((((((((((((0.0 == expectedA.x && all(vec2(0.0) == expectedA.xy)) && all(vec3(0.0, 0.0, 0.84375) == expectedA.xyz)) && all(vec4(0.0, 0.0, 0.84375, 1.0) == expectedA)) && 0.0 == expectedA.x) && all(vec2(0.0) == expectedA.xy)) && all(vec3(0.0, 0.0, 0.84375) == expectedA.xyz)) && all(vec4(0.0, 0.0, 0.84375, 1.0) == expectedA)) && _skTemp0 == expectedA.x) && all(_skTemp1 == expectedA.xy)) && all(_skTemp2 == expectedA.xyz)) && all(_skTemp3 == expectedA)) && 1.0 == expectedB.x) && all(vec2(1.0, 0.0) == expectedB.xy)) && all(vec3(1.0, 0.0, 1.0) == expectedB.xyz)) && all(vec4(1.0, 0.0, 1.0, 1.0) == expectedB)) && _skTemp4 == expectedB.x) && all(_skTemp5 == expectedB.xy)) && all(_skTemp6 == expectedB.xyz)) && all(_skTemp7 == expectedB))); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((((((((((((((0.0 == expectedA.x) && all(vec2(0.0) == expectedA.xy)) && all(vec3(0.0, 0.0, 0.84375) == expectedA.xyz)) && all(vec4(0.0, 0.0, 0.84375, 1.0) == expectedA)) && (0.0 == expectedA.x)) && all(vec2(0.0) == expectedA.xy)) && all(vec3(0.0, 0.0, 0.84375) == expectedA.xyz)) && all(vec4(0.0, 0.0, 0.84375, 1.0) == expectedA)) && (_skTemp0 == expectedA.x)) && all(_skTemp1 == expectedA.xy)) && all(_skTemp2 == expectedA.xyz)) && all(_skTemp3 == expectedA)) && (1.0 == expectedB.x)) && all(vec2(1.0, 0.0) == expectedB.xy)) && all(vec3(1.0, 0.0, 1.0) == expectedB.xyz)) && all(vec4(1.0, 0.0, 1.0, 1.0) == expectedB)) && (_skTemp4 == expectedB.x)) && all(_skTemp5 == expectedB.xy)) && all(_skTemp6 == expectedB.xyz)) && all(_skTemp7 == expectedB))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/intrinsics/Sqrt.asm.frag b/tests/sksl/intrinsics/Sqrt.asm.frag index d37176ef0c78..222bfff1bd72 100644 --- a/tests/sksl/intrinsics/Sqrt.asm.frag +++ b/tests/sksl/intrinsics/Sqrt.asm.frag @@ -1,161 +1,161 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testMatrix2x2" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %inputVal "inputVal" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 ColMajor -OpMemberDecorate %_UniformBuffer 0 MatrixStride 16 -OpMemberDecorate %_UniformBuffer 1 Offset 32 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 48 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %104 RelaxedPrecision -OpDecorate %107 RelaxedPrecision -OpDecorate %108 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testMatrix2x2" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %inputVal "inputVal" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 ColMajor + OpMemberDecorate %_UniformBuffer 0 MatrixStride 16 + OpMemberDecorate %_UniformBuffer 1 Offset 32 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 48 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %104 RelaxedPrecision + OpDecorate %107 RelaxedPrecision + OpDecorate %108 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%v2float = OpTypeVector %float 2 + %v2float = OpTypeVector %float 2 %mat2v2float = OpTypeMatrix %v2float 2 %_UniformBuffer = OpTypeStruct %mat2v2float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%17 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%20 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %17 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %20 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%24 = OpTypeFunction %v4float %_ptr_Function_v2float -%float_n1 = OpConstant %float -1 -%float_n4 = OpConstant %float -4 -%float_n16 = OpConstant %float -16 -%float_n64 = OpConstant %float -64 -%32 = OpConstantComposite %v4float %float_n1 %float_n4 %float_n16 %float_n64 + %24 = OpTypeFunction %v4float %_ptr_Function_v2float + %float_n1 = OpConstant %float -1 + %float_n4 = OpConstant %float -4 + %float_n16 = OpConstant %float -16 + %float_n64 = OpConstant %float -64 + %32 = OpConstantComposite %v4float %float_n1 %float_n4 %float_n16 %float_n64 %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_mat2v2float = OpTypePointer Uniform %mat2v2float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%float_2 = OpConstant %float 2 -%float_6 = OpConstant %float 6 -%float_12 = OpConstant %float 12 -%49 = OpConstantComposite %v4float %float_0 %float_2 %float_6 %float_12 -%false = OpConstantFalse %bool -%float_1 = OpConstant %float 1 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %float_2 = OpConstant %float 2 + %float_6 = OpConstant %float 6 + %float_12 = OpConstant %float 12 + %49 = OpConstantComposite %v4float %float_0 %float_2 %float_6 %float_12 + %false = OpConstantFalse %bool + %float_1 = OpConstant %float 1 %float_0_0500000007 = OpConstant %float 0.0500000007 -%66 = OpConstantComposite %v2float %float_1 %float_2 -%68 = OpConstantComposite %v2float %float_0_0500000007 %float_0_0500000007 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%float_3 = OpConstant %float 3 -%80 = OpConstantComposite %v3float %float_1 %float_2 %float_3 -%82 = OpConstantComposite %v3float %float_0_0500000007 %float_0_0500000007 %float_0_0500000007 -%v3bool = OpTypeVector %bool 3 -%float_4 = OpConstant %float 4 -%92 = OpConstantComposite %v4float %float_1 %float_2 %float_3 %float_4 -%94 = OpConstantComposite %v4float %float_0_0500000007 %float_0_0500000007 %float_0_0500000007 %float_0_0500000007 -%v4bool = OpTypeVector %bool 4 + %66 = OpConstantComposite %v2float %float_1 %float_2 + %68 = OpConstantComposite %v2float %float_0_0500000007 %float_0_0500000007 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %float_3 = OpConstant %float 3 + %80 = OpConstantComposite %v3float %float_1 %float_2 %float_3 + %82 = OpConstantComposite %v3float %float_0_0500000007 %float_0_0500000007 %float_0_0500000007 + %v3bool = OpTypeVector %bool 3 + %float_4 = OpConstant %float 4 + %92 = OpConstantComposite %v4float %float_1 %float_2 %float_3 %float_4 + %94 = OpConstantComposite %v4float %float_0_0500000007 %float_0_0500000007 %float_0_0500000007 %float_0_0500000007 + %v4bool = OpTypeVector %bool 4 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %17 -%18 = OpLabel -%21 = OpVariable %_ptr_Function_v2float Function -OpStore %21 %20 -%23 = OpFunctionCall %v4float %main %21 -OpStore %sk_FragColor %23 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %24 -%25 = OpFunctionParameter %_ptr_Function_v2float -%26 = OpLabel -%inputVal = OpVariable %_ptr_Function_v4float Function -%97 = OpVariable %_ptr_Function_v4float Function -%27 = OpExtInst %v4float %1 Sqrt %32 -%33 = OpVectorShuffle %v2float %27 %27 0 1 -OpStore %25 %33 -%36 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_0 -%40 = OpLoad %mat2v2float %36 -%41 = OpCompositeExtract %float %40 0 0 -%42 = OpCompositeExtract %float %40 0 1 -%43 = OpCompositeExtract %float %40 1 0 -%44 = OpCompositeExtract %float %40 1 1 -%45 = OpCompositeConstruct %v4float %41 %42 %43 %44 -%50 = OpFAdd %v4float %45 %49 -OpStore %inputVal %50 -%54 = OpCompositeExtract %float %50 0 -%53 = OpExtInst %float %1 Sqrt %54 -%56 = OpFSub %float %53 %float_1 -%52 = OpExtInst %float %1 FAbs %56 -%58 = OpFOrdLessThan %bool %52 %float_0_0500000007 -OpSelectionMerge %60 None -OpBranchConditional %58 %59 %60 -%59 = OpLabel -%65 = OpVectorShuffle %v2float %50 %50 0 1 -%64 = OpExtInst %v2float %1 Sqrt %65 -%67 = OpFSub %v2float %64 %66 -%63 = OpExtInst %v2float %1 FAbs %67 -%62 = OpFOrdLessThan %v2bool %63 %68 -%61 = OpAll %bool %62 -OpBranch %60 -%60 = OpLabel -%70 = OpPhi %bool %false %26 %61 %59 -OpSelectionMerge %72 None -OpBranchConditional %70 %71 %72 -%71 = OpLabel -%77 = OpVectorShuffle %v3float %50 %50 0 1 2 -%76 = OpExtInst %v3float %1 Sqrt %77 -%81 = OpFSub %v3float %76 %80 -%75 = OpExtInst %v3float %1 FAbs %81 -%74 = OpFOrdLessThan %v3bool %75 %82 -%73 = OpAll %bool %74 -OpBranch %72 -%72 = OpLabel -%84 = OpPhi %bool %false %60 %73 %71 -OpSelectionMerge %86 None -OpBranchConditional %84 %85 %86 -%85 = OpLabel -%90 = OpExtInst %v4float %1 Sqrt %50 -%93 = OpFSub %v4float %90 %92 -%89 = OpExtInst %v4float %1 FAbs %93 -%88 = OpFOrdLessThan %v4bool %89 %94 -%87 = OpAll %bool %88 -OpBranch %86 -%86 = OpLabel -%96 = OpPhi %bool %false %72 %87 %85 -OpSelectionMerge %100 None -OpBranchConditional %96 %98 %99 -%98 = OpLabel -%101 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%104 = OpLoad %v4float %101 -OpStore %97 %104 -OpBranch %100 -%99 = OpLabel -%105 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%107 = OpLoad %v4float %105 -OpStore %97 %107 -OpBranch %100 -%100 = OpLabel -%108 = OpLoad %v4float %97 -OpReturnValue %108 -OpFunctionEnd + %18 = OpLabel + %21 = OpVariable %_ptr_Function_v2float Function + OpStore %21 %20 + %23 = OpFunctionCall %v4float %main %21 + OpStore %sk_FragColor %23 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %24 + %25 = OpFunctionParameter %_ptr_Function_v2float + %26 = OpLabel + %inputVal = OpVariable %_ptr_Function_v4float Function + %97 = OpVariable %_ptr_Function_v4float Function + %27 = OpExtInst %v4float %1 Sqrt %32 + %33 = OpVectorShuffle %v2float %27 %27 0 1 + OpStore %25 %33 + %36 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_0 + %40 = OpLoad %mat2v2float %36 + %41 = OpCompositeExtract %float %40 0 0 + %42 = OpCompositeExtract %float %40 0 1 + %43 = OpCompositeExtract %float %40 1 0 + %44 = OpCompositeExtract %float %40 1 1 + %45 = OpCompositeConstruct %v4float %41 %42 %43 %44 + %50 = OpFAdd %v4float %45 %49 + OpStore %inputVal %50 + %54 = OpCompositeExtract %float %50 0 + %53 = OpExtInst %float %1 Sqrt %54 + %56 = OpFSub %float %53 %float_1 + %52 = OpExtInst %float %1 FAbs %56 + %58 = OpFOrdLessThan %bool %52 %float_0_0500000007 + OpSelectionMerge %60 None + OpBranchConditional %58 %59 %60 + %59 = OpLabel + %65 = OpVectorShuffle %v2float %50 %50 0 1 + %64 = OpExtInst %v2float %1 Sqrt %65 + %67 = OpFSub %v2float %64 %66 + %63 = OpExtInst %v2float %1 FAbs %67 + %62 = OpFOrdLessThan %v2bool %63 %68 + %61 = OpAll %bool %62 + OpBranch %60 + %60 = OpLabel + %70 = OpPhi %bool %false %26 %61 %59 + OpSelectionMerge %72 None + OpBranchConditional %70 %71 %72 + %71 = OpLabel + %77 = OpVectorShuffle %v3float %50 %50 0 1 2 + %76 = OpExtInst %v3float %1 Sqrt %77 + %81 = OpFSub %v3float %76 %80 + %75 = OpExtInst %v3float %1 FAbs %81 + %74 = OpFOrdLessThan %v3bool %75 %82 + %73 = OpAll %bool %74 + OpBranch %72 + %72 = OpLabel + %84 = OpPhi %bool %false %60 %73 %71 + OpSelectionMerge %86 None + OpBranchConditional %84 %85 %86 + %85 = OpLabel + %90 = OpExtInst %v4float %1 Sqrt %50 + %93 = OpFSub %v4float %90 %92 + %89 = OpExtInst %v4float %1 FAbs %93 + %88 = OpFOrdLessThan %v4bool %89 %94 + %87 = OpAll %bool %88 + OpBranch %86 + %86 = OpLabel + %96 = OpPhi %bool %false %72 %87 %85 + OpSelectionMerge %100 None + OpBranchConditional %96 %98 %99 + %98 = OpLabel + %101 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %104 = OpLoad %v4float %101 + OpStore %97 %104 + OpBranch %100 + %99 = OpLabel + %105 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %107 = OpLoad %v4float %105 + OpStore %97 %107 + OpBranch %100 + %100 = OpLabel + %108 = OpLoad %v4float %97 + OpReturnValue %108 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Sqrt.skrp b/tests/sksl/intrinsics/Sqrt.skrp index 95c411fda220..cce20217ddc8 100644 --- a/tests/sksl/intrinsics/Sqrt.skrp +++ b/tests/sksl/intrinsics/Sqrt.skrp @@ -1,30 +1,33 @@ +57 instructions + [immutable slots] -negativeVal(0) = 0xBF800000 (-1.0) -negativeVal(1) = 0xC0800000 (-4.0) -negativeVal(2) = 0xC1800000 (-16.0) -negativeVal(3) = 0xC2800000 (-64.0) -expected(0) = 0x3F800000 (1.0) -expected(1) = 0x40000000 (2.0) -expected(2) = 0x40400000 (3.0) -expected(3) = 0x40800000 (4.0) -allowedDelta(0) = 0x3D4CCCCD (0.05) -allowedDelta(1) = 0x3D4CCCCD (0.05) -allowedDelta(2) = 0x3D4CCCCD (0.05) -allowedDelta(3) = 0x3D4CCCCD (0.05) +i0 = 0xBF800000 (-1.0) +i1 = 0xC0800000 (-4.0) +i2 = 0xC1800000 (-16.0) +i3 = 0xC2800000 (-64.0) +i4 = 0 +i5 = 0x40000000 (2.0) +i6 = 0x40C00000 (6.0) +i7 = 0x41400000 (12.0) +i8 = 0x3F800000 (1.0) +i9 = 0x40000000 (2.0) +i10 = 0x40400000 (3.0) +i11 = 0x40800000 (4.0) +i12 = 0x3D4CCCCD (0.05) +i13 = 0x3D4CCCCD (0.05) +i14 = 0x3D4CCCCD (0.05) +i15 = 0x3D4CCCCD (0.05) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true -copy_4_slots_unmasked $0..3 = negativeVal +copy_4_immutables_unmasked $0..3 = i0..3 [0xBF800000 (-1.0), 0xC0800000 (-4.0), 0xC1800000 (-16.0), 0xC2800000 (-64.0)] sqrt_float $0 = sqrt($0) sqrt_float $1 = sqrt($1) sqrt_float $2 = sqrt($2) sqrt_float $3 = sqrt($3) copy_2_slots_unmasked coords = $0..1 copy_4_uniforms $0..3 = testMatrix2x2 -copy_constant $4 = 0 -copy_constant $5 = 0x40000000 (2.0) -copy_constant $6 = 0x40C00000 (6.0) -copy_constant $7 = 0x41400000 (12.0) +copy_4_immutables_unmasked $4..7 = i4..7 [0, 0x40000000 (2.0), 0x40C00000 (6.0), 0x41400000 (12.0)] add_4_floats $0..3 += $4..7 copy_4_slots_unmasked inputVal = $0..3 copy_slot_unmasked $0 = inputVal(0) @@ -35,8 +38,7 @@ cmplt_imm_float $0 = lessThan($0, 0x3D4CCCCD (0.05)) copy_2_slots_unmasked $1..2 = inputVal(0..1) sqrt_float $1 = sqrt($1) sqrt_float $2 = sqrt($2) -copy_constant $3 = 0x3F800000 (1.0) -copy_constant $4 = 0x40000000 (2.0) +copy_2_immutables_unmasked $3..4 = i8..9 [0x3F800000 (1.0), 0x40000000 (2.0)] sub_2_floats $1..2 -= $3..4 bitwise_and_imm_2_ints $1..2 &= 0x7FFFFFFF splat_2_constants $3..4 = 0x3D4CCCCD (0.05) @@ -47,9 +49,7 @@ copy_3_slots_unmasked $1..3 = inputVal(0..2) sqrt_float $1 = sqrt($1) sqrt_float $2 = sqrt($2) sqrt_float $3 = sqrt($3) -copy_constant $4 = 0x3F800000 (1.0) -copy_constant $5 = 0x40000000 (2.0) -copy_constant $6 = 0x40400000 (3.0) +copy_3_immutables_unmasked $4..6 = i8..10 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0)] sub_3_floats $1..3 -= $4..6 bitwise_and_imm_3_ints $1..3 &= 0x7FFFFFFF splat_3_constants $4..6 = 0x3D4CCCCD (0.05) @@ -62,7 +62,7 @@ sqrt_float $1 = sqrt($1) sqrt_float $2 = sqrt($2) sqrt_float $3 = sqrt($3) sqrt_float $4 = sqrt($4) -copy_4_slots_unmasked $5..8 = expected +copy_4_immutables_unmasked $5..8 = i8..11 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] sub_4_floats $1..4 -= $5..8 bitwise_and_imm_4_ints $1..4 &= 0x7FFFFFFF splat_4_constants $5..8 = 0x3D4CCCCD (0.05) diff --git a/tests/sksl/intrinsics/Sqrt.wgsl b/tests/sksl/intrinsics/Sqrt.wgsl index 5d3ff6390df7..3bb44eb7aca0 100644 --- a/tests/sksl/intrinsics/Sqrt.wgsl +++ b/tests/sksl/intrinsics/Sqrt.wgsl @@ -1,10 +1,4 @@ -### Compilation failed: - -error: :18:20 error: sqrt must be called with a value >= 0 - let _skTemp0 = sqrt(negativeVal); - ^^^^^^^^^^^^^^^^^ - - +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -22,23 +16,24 @@ fn main(_skParam0: vec2) -> vec4 { var coords = _skParam0; { const negativeVal: vec4 = vec4(-1.0, -4.0, -16.0, -64.0); - let _skTemp0 = sqrt(negativeVal); - coords = _skTemp0.xy; + let _skTemp0 = negativeVal; + let _skTemp1 = sqrt(_skTemp0); + coords = _skTemp1.xy; var inputVal: vec4 = vec4(_globalUniforms.testMatrix2x2[0], _globalUniforms.testMatrix2x2[1]) + vec4(0.0, 2.0, 6.0, 12.0); const expected: vec4 = vec4(1.0, 2.0, 3.0, 4.0); const allowedDelta: vec4 = vec4(0.05); - let _skTemp1 = sqrt(inputVal.x); - let _skTemp2 = abs(_skTemp1 - 1.0); - let _skTemp3 = sqrt(inputVal.xy); - let _skTemp4 = abs(_skTemp3 - vec2(1.0, 2.0)); - let _skTemp5 = all(_skTemp4 < vec2(0.05)); - let _skTemp6 = sqrt(inputVal.xyz); - let _skTemp7 = abs(_skTemp6 - vec3(1.0, 2.0, 3.0)); - let _skTemp8 = all(_skTemp7 < vec3(0.05)); - let _skTemp9 = sqrt(inputVal); - let _skTemp10 = abs(_skTemp9 - expected); - let _skTemp11 = all(_skTemp10 < allowedDelta); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((_skTemp2 < 0.05 && _skTemp5) && _skTemp8) && _skTemp11)); + let _skTemp2 = sqrt(inputVal.x); + let _skTemp3 = abs(_skTemp2 - 1.0); + let _skTemp4 = sqrt(inputVal.xy); + let _skTemp5 = abs(_skTemp4 - vec2(1.0, 2.0)); + let _skTemp6 = all(_skTemp5 < vec2(0.05)); + let _skTemp7 = sqrt(inputVal.xyz); + let _skTemp8 = abs(_skTemp7 - vec3(1.0, 2.0, 3.0)); + let _skTemp9 = all(_skTemp8 < vec3(0.05)); + let _skTemp10 = sqrt(inputVal); + let _skTemp11 = abs(_skTemp10 - expected); + let _skTemp12 = all(_skTemp11 < allowedDelta); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((_skTemp3 < 0.05) && _skTemp6) && _skTemp9) && _skTemp12)); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { @@ -46,5 +41,3 @@ fn main(_skParam0: vec2) -> vec4 { _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); return _stageOut; } - -1 error diff --git a/tests/sksl/intrinsics/Step.asm.frag b/tests/sksl/intrinsics/Step.asm.frag index afeb1b12be25..bf96bd1095de 100644 --- a/tests/sksl/intrinsics/Step.asm.frag +++ b/tests/sksl/intrinsics/Step.asm.frag @@ -1,279 +1,392 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testInputs" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %expectedA "expectedA" -OpName %expectedB "expectedB" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %expectedA RelaxedPrecision -OpDecorate %expectedB RelaxedPrecision -OpDecorate %39 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %48 RelaxedPrecision -OpDecorate %49 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %62 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %83 RelaxedPrecision -OpDecorate %90 RelaxedPrecision -OpDecorate %101 RelaxedPrecision -OpDecorate %102 RelaxedPrecision -OpDecorate %109 RelaxedPrecision -OpDecorate %110 RelaxedPrecision -OpDecorate %112 RelaxedPrecision -OpDecorate %120 RelaxedPrecision -OpDecorate %121 RelaxedPrecision -OpDecorate %123 RelaxedPrecision -OpDecorate %131 RelaxedPrecision -OpDecorate %142 RelaxedPrecision -OpDecorate %149 RelaxedPrecision -OpDecorate %162 RelaxedPrecision -OpDecorate %165 RelaxedPrecision -OpDecorate %166 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testInputs" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %expectedA "expectedA" + OpName %expectedB "expectedB" + OpName %expectedC "expectedC" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %expectedA RelaxedPrecision + OpDecorate %expectedB RelaxedPrecision + OpDecorate %expectedC RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %49 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %62 RelaxedPrecision + OpDecorate %63 RelaxedPrecision + OpDecorate %64 RelaxedPrecision + OpDecorate %74 RelaxedPrecision + OpDecorate %85 RelaxedPrecision + OpDecorate %92 RelaxedPrecision + OpDecorate %103 RelaxedPrecision + OpDecorate %104 RelaxedPrecision + OpDecorate %111 RelaxedPrecision + OpDecorate %112 RelaxedPrecision + OpDecorate %114 RelaxedPrecision + OpDecorate %122 RelaxedPrecision + OpDecorate %123 RelaxedPrecision + OpDecorate %125 RelaxedPrecision + OpDecorate %133 RelaxedPrecision + OpDecorate %144 RelaxedPrecision + OpDecorate %151 RelaxedPrecision + OpDecorate %163 RelaxedPrecision + OpDecorate %164 RelaxedPrecision + OpDecorate %167 RelaxedPrecision + OpDecorate %168 RelaxedPrecision + OpDecorate %175 RelaxedPrecision + OpDecorate %176 RelaxedPrecision + OpDecorate %178 RelaxedPrecision + OpDecorate %179 RelaxedPrecision + OpDecorate %180 RelaxedPrecision + OpDecorate %188 RelaxedPrecision + OpDecorate %189 RelaxedPrecision + OpDecorate %191 RelaxedPrecision + OpDecorate %192 RelaxedPrecision + OpDecorate %193 RelaxedPrecision + OpDecorate %201 RelaxedPrecision + OpDecorate %203 RelaxedPrecision + OpDecorate %212 RelaxedPrecision + OpDecorate %219 RelaxedPrecision + OpDecorate %231 RelaxedPrecision + OpDecorate %233 RelaxedPrecision + OpDecorate %234 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float -%float_1 = OpConstant %float 1 -%29 = OpConstantComposite %v4float %float_0 %float_0 %float_1 %float_1 -%31 = OpConstantComposite %v4float %float_1 %float_1 %float_0 %float_0 -%false = OpConstantFalse %bool -%float_0_5 = OpConstant %float 0.5 + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v4float %float_0 %float_0 %float_1 %float_1 + %31 = OpConstantComposite %v4float %float_1 %float_1 %float_0 %float_0 + %33 = OpConstantComposite %v4float %float_0 %float_1 %float_1 %float_1 + %false = OpConstantFalse %bool + %float_0_5 = OpConstant %float 0.5 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%45 = OpConstantComposite %v2float %float_0_5 %float_0_5 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%58 = OpConstantComposite %v3float %float_0_5 %float_0_5 %float_0_5 -%v3bool = OpTypeVector %bool 3 -%70 = OpConstantComposite %v4float %float_0_5 %float_0_5 %float_0_5 %float_0_5 -%v4bool = OpTypeVector %bool 4 -%true = OpConstantTrue %bool -%89 = OpConstantComposite %v3float %float_0 %float_0 %float_1 -%111 = OpConstantComposite %v2float %float_0 %float_1 -%122 = OpConstantComposite %v3float %float_0 %float_1 %float_0 -%132 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1 -%141 = OpConstantComposite %v2float %float_1 %float_1 -%148 = OpConstantComposite %v3float %float_1 %float_1 %float_0 -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %47 = OpConstantComposite %v2float %float_0_5 %float_0_5 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %60 = OpConstantComposite %v3float %float_0_5 %float_0_5 %float_0_5 + %v3bool = OpTypeVector %bool 3 + %72 = OpConstantComposite %v4float %float_0_5 %float_0_5 %float_0_5 %float_0_5 + %v4bool = OpTypeVector %bool 4 + %true = OpConstantTrue %bool + %91 = OpConstantComposite %v3float %float_0 %float_0 %float_1 + %113 = OpConstantComposite %v2float %float_0 %float_1 + %124 = OpConstantComposite %v3float %float_0 %float_1 %float_0 + %134 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1 + %143 = OpConstantComposite %v2float %float_1 %float_1 + %150 = OpConstantComposite %v3float %float_1 %float_1 %float_0 + %int_2 = OpConstant %int 2 + %int_1 = OpConstant %int 1 + %218 = OpConstantComposite %v3float %float_0 %float_1 %float_1 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%expectedA = OpVariable %_ptr_Function_v4float Function -%expectedB = OpVariable %_ptr_Function_v4float Function -%156 = OpVariable %_ptr_Function_v4float Function -OpStore %expectedA %29 -OpStore %expectedB %31 -%35 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%39 = OpLoad %v4float %35 -%40 = OpCompositeExtract %float %39 0 -%33 = OpExtInst %float %1 Step %float_0_5 %40 -%41 = OpFOrdEqual %bool %33 %float_0 -OpSelectionMerge %43 None -OpBranchConditional %41 %42 %43 -%42 = OpLabel -%46 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%47 = OpLoad %v4float %46 -%48 = OpVectorShuffle %v2float %47 %47 0 1 -%44 = OpExtInst %v2float %1 Step %45 %48 -%49 = OpVectorShuffle %v2float %29 %29 0 1 -%50 = OpFOrdEqual %v2bool %44 %49 -%52 = OpAll %bool %50 -OpBranch %43 -%43 = OpLabel -%53 = OpPhi %bool %false %25 %52 %42 -OpSelectionMerge %55 None -OpBranchConditional %53 %54 %55 -%54 = OpLabel -%59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%60 = OpLoad %v4float %59 -%61 = OpVectorShuffle %v3float %60 %60 0 1 2 -%56 = OpExtInst %v3float %1 Step %58 %61 -%62 = OpVectorShuffle %v3float %29 %29 0 1 2 -%63 = OpFOrdEqual %v3bool %56 %62 -%65 = OpAll %bool %63 -OpBranch %55 -%55 = OpLabel -%66 = OpPhi %bool %false %43 %65 %54 -OpSelectionMerge %68 None -OpBranchConditional %66 %67 %68 -%67 = OpLabel -%71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%72 = OpLoad %v4float %71 -%69 = OpExtInst %v4float %1 Step %70 %72 -%73 = OpFOrdEqual %v4bool %69 %29 -%75 = OpAll %bool %73 -OpBranch %68 -%68 = OpLabel -%76 = OpPhi %bool %false %55 %75 %67 -OpSelectionMerge %78 None -OpBranchConditional %76 %77 %78 -%77 = OpLabel -OpBranch %78 -%78 = OpLabel -%80 = OpPhi %bool %false %68 %true %77 -OpSelectionMerge %82 None -OpBranchConditional %80 %81 %82 -%81 = OpLabel -%83 = OpVectorShuffle %v2float %29 %29 0 1 -%84 = OpFOrdEqual %v2bool %19 %83 -%85 = OpAll %bool %84 -OpBranch %82 -%82 = OpLabel -%86 = OpPhi %bool %false %78 %85 %81 -OpSelectionMerge %88 None -OpBranchConditional %86 %87 %88 -%87 = OpLabel -%90 = OpVectorShuffle %v3float %29 %29 0 1 2 -%91 = OpFOrdEqual %v3bool %89 %90 -%92 = OpAll %bool %91 -OpBranch %88 -%88 = OpLabel -%93 = OpPhi %bool %false %82 %92 %87 -OpSelectionMerge %95 None -OpBranchConditional %93 %94 %95 -%94 = OpLabel -OpBranch %95 -%95 = OpLabel -%96 = OpPhi %bool %false %88 %true %94 -OpSelectionMerge %98 None -OpBranchConditional %96 %97 %98 -%97 = OpLabel -%100 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%101 = OpLoad %v4float %100 -%102 = OpCompositeExtract %float %101 0 -%99 = OpExtInst %float %1 Step %102 %float_0 -%103 = OpFOrdEqual %bool %99 %float_1 -OpBranch %98 -%98 = OpLabel -%104 = OpPhi %bool %false %95 %103 %97 -OpSelectionMerge %106 None -OpBranchConditional %104 %105 %106 -%105 = OpLabel -%108 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%109 = OpLoad %v4float %108 -%110 = OpVectorShuffle %v2float %109 %109 0 1 -%107 = OpExtInst %v2float %1 Step %110 %111 -%112 = OpVectorShuffle %v2float %31 %31 0 1 -%113 = OpFOrdEqual %v2bool %107 %112 -%114 = OpAll %bool %113 -OpBranch %106 -%106 = OpLabel -%115 = OpPhi %bool %false %98 %114 %105 -OpSelectionMerge %117 None -OpBranchConditional %115 %116 %117 -%116 = OpLabel -%119 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%120 = OpLoad %v4float %119 -%121 = OpVectorShuffle %v3float %120 %120 0 1 2 -%118 = OpExtInst %v3float %1 Step %121 %122 -%123 = OpVectorShuffle %v3float %31 %31 0 1 2 -%124 = OpFOrdEqual %v3bool %118 %123 -%125 = OpAll %bool %124 -OpBranch %117 -%117 = OpLabel -%126 = OpPhi %bool %false %106 %125 %116 -OpSelectionMerge %128 None -OpBranchConditional %126 %127 %128 -%127 = OpLabel -%130 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%131 = OpLoad %v4float %130 -%129 = OpExtInst %v4float %1 Step %131 %132 -%133 = OpFOrdEqual %v4bool %129 %31 -%134 = OpAll %bool %133 -OpBranch %128 -%128 = OpLabel -%135 = OpPhi %bool %false %117 %134 %127 -OpSelectionMerge %137 None -OpBranchConditional %135 %136 %137 -%136 = OpLabel -OpBranch %137 -%137 = OpLabel -%138 = OpPhi %bool %false %128 %true %136 -OpSelectionMerge %140 None -OpBranchConditional %138 %139 %140 -%139 = OpLabel -%142 = OpVectorShuffle %v2float %31 %31 0 1 -%143 = OpFOrdEqual %v2bool %141 %142 -%144 = OpAll %bool %143 -OpBranch %140 -%140 = OpLabel -%145 = OpPhi %bool %false %137 %144 %139 -OpSelectionMerge %147 None -OpBranchConditional %145 %146 %147 -%146 = OpLabel -%149 = OpVectorShuffle %v3float %31 %31 0 1 2 -%150 = OpFOrdEqual %v3bool %148 %149 -%151 = OpAll %bool %150 -OpBranch %147 -%147 = OpLabel -%152 = OpPhi %bool %false %140 %151 %146 -OpSelectionMerge %154 None -OpBranchConditional %152 %153 %154 -%153 = OpLabel -OpBranch %154 -%154 = OpLabel -%155 = OpPhi %bool %false %147 %true %153 -OpSelectionMerge %159 None -OpBranchConditional %155 %157 %158 -%157 = OpLabel -%160 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%162 = OpLoad %v4float %160 -OpStore %156 %162 -OpBranch %159 -%158 = OpLabel -%163 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%165 = OpLoad %v4float %163 -OpStore %156 %165 -OpBranch %159 -%159 = OpLabel -%166 = OpLoad %v4float %156 -OpReturnValue %166 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %expectedA = OpVariable %_ptr_Function_v4float Function + %expectedB = OpVariable %_ptr_Function_v4float Function + %expectedC = OpVariable %_ptr_Function_v4float Function + %226 = OpVariable %_ptr_Function_v4float Function + OpStore %expectedA %29 + OpStore %expectedB %31 + OpStore %expectedC %33 + %37 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %41 = OpLoad %v4float %37 + %42 = OpCompositeExtract %float %41 0 + %35 = OpExtInst %float %1 Step %float_0_5 %42 + %43 = OpFOrdEqual %bool %35 %float_0 + OpSelectionMerge %45 None + OpBranchConditional %43 %44 %45 + %44 = OpLabel + %48 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %49 = OpLoad %v4float %48 + %50 = OpVectorShuffle %v2float %49 %49 0 1 + %46 = OpExtInst %v2float %1 Step %47 %50 + %51 = OpVectorShuffle %v2float %29 %29 0 1 + %52 = OpFOrdEqual %v2bool %46 %51 + %54 = OpAll %bool %52 + OpBranch %45 + %45 = OpLabel + %55 = OpPhi %bool %false %25 %54 %44 + OpSelectionMerge %57 None + OpBranchConditional %55 %56 %57 + %56 = OpLabel + %61 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %62 = OpLoad %v4float %61 + %63 = OpVectorShuffle %v3float %62 %62 0 1 2 + %58 = OpExtInst %v3float %1 Step %60 %63 + %64 = OpVectorShuffle %v3float %29 %29 0 1 2 + %65 = OpFOrdEqual %v3bool %58 %64 + %67 = OpAll %bool %65 + OpBranch %57 + %57 = OpLabel + %68 = OpPhi %bool %false %45 %67 %56 + OpSelectionMerge %70 None + OpBranchConditional %68 %69 %70 + %69 = OpLabel + %73 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %74 = OpLoad %v4float %73 + %71 = OpExtInst %v4float %1 Step %72 %74 + %75 = OpFOrdEqual %v4bool %71 %29 + %77 = OpAll %bool %75 + OpBranch %70 + %70 = OpLabel + %78 = OpPhi %bool %false %57 %77 %69 + OpSelectionMerge %80 None + OpBranchConditional %78 %79 %80 + %79 = OpLabel + OpBranch %80 + %80 = OpLabel + %82 = OpPhi %bool %false %70 %true %79 + OpSelectionMerge %84 None + OpBranchConditional %82 %83 %84 + %83 = OpLabel + %85 = OpVectorShuffle %v2float %29 %29 0 1 + %86 = OpFOrdEqual %v2bool %19 %85 + %87 = OpAll %bool %86 + OpBranch %84 + %84 = OpLabel + %88 = OpPhi %bool %false %80 %87 %83 + OpSelectionMerge %90 None + OpBranchConditional %88 %89 %90 + %89 = OpLabel + %92 = OpVectorShuffle %v3float %29 %29 0 1 2 + %93 = OpFOrdEqual %v3bool %91 %92 + %94 = OpAll %bool %93 + OpBranch %90 + %90 = OpLabel + %95 = OpPhi %bool %false %84 %94 %89 + OpSelectionMerge %97 None + OpBranchConditional %95 %96 %97 + %96 = OpLabel + OpBranch %97 + %97 = OpLabel + %98 = OpPhi %bool %false %90 %true %96 + OpSelectionMerge %100 None + OpBranchConditional %98 %99 %100 + %99 = OpLabel + %102 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %103 = OpLoad %v4float %102 + %104 = OpCompositeExtract %float %103 0 + %101 = OpExtInst %float %1 Step %104 %float_0 + %105 = OpFOrdEqual %bool %101 %float_1 + OpBranch %100 + %100 = OpLabel + %106 = OpPhi %bool %false %97 %105 %99 + OpSelectionMerge %108 None + OpBranchConditional %106 %107 %108 + %107 = OpLabel + %110 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %111 = OpLoad %v4float %110 + %112 = OpVectorShuffle %v2float %111 %111 0 1 + %109 = OpExtInst %v2float %1 Step %112 %113 + %114 = OpVectorShuffle %v2float %31 %31 0 1 + %115 = OpFOrdEqual %v2bool %109 %114 + %116 = OpAll %bool %115 + OpBranch %108 + %108 = OpLabel + %117 = OpPhi %bool %false %100 %116 %107 + OpSelectionMerge %119 None + OpBranchConditional %117 %118 %119 + %118 = OpLabel + %121 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %122 = OpLoad %v4float %121 + %123 = OpVectorShuffle %v3float %122 %122 0 1 2 + %120 = OpExtInst %v3float %1 Step %123 %124 + %125 = OpVectorShuffle %v3float %31 %31 0 1 2 + %126 = OpFOrdEqual %v3bool %120 %125 + %127 = OpAll %bool %126 + OpBranch %119 + %119 = OpLabel + %128 = OpPhi %bool %false %108 %127 %118 + OpSelectionMerge %130 None + OpBranchConditional %128 %129 %130 + %129 = OpLabel + %132 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %133 = OpLoad %v4float %132 + %131 = OpExtInst %v4float %1 Step %133 %134 + %135 = OpFOrdEqual %v4bool %131 %31 + %136 = OpAll %bool %135 + OpBranch %130 + %130 = OpLabel + %137 = OpPhi %bool %false %119 %136 %129 + OpSelectionMerge %139 None + OpBranchConditional %137 %138 %139 + %138 = OpLabel + OpBranch %139 + %139 = OpLabel + %140 = OpPhi %bool %false %130 %true %138 + OpSelectionMerge %142 None + OpBranchConditional %140 %141 %142 + %141 = OpLabel + %144 = OpVectorShuffle %v2float %31 %31 0 1 + %145 = OpFOrdEqual %v2bool %143 %144 + %146 = OpAll %bool %145 + OpBranch %142 + %142 = OpLabel + %147 = OpPhi %bool %false %139 %146 %141 + OpSelectionMerge %149 None + OpBranchConditional %147 %148 %149 + %148 = OpLabel + %151 = OpVectorShuffle %v3float %31 %31 0 1 2 + %152 = OpFOrdEqual %v3bool %150 %151 + %153 = OpAll %bool %152 + OpBranch %149 + %149 = OpLabel + %154 = OpPhi %bool %false %142 %153 %148 + OpSelectionMerge %156 None + OpBranchConditional %154 %155 %156 + %155 = OpLabel + OpBranch %156 + %156 = OpLabel + %157 = OpPhi %bool %false %149 %true %155 + OpSelectionMerge %159 None + OpBranchConditional %157 %158 %159 + %158 = OpLabel + %161 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %163 = OpLoad %v4float %161 + %164 = OpCompositeExtract %float %163 0 + %165 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %167 = OpLoad %v4float %165 + %168 = OpCompositeExtract %float %167 0 + %160 = OpExtInst %float %1 Step %164 %168 + %169 = OpFOrdEqual %bool %160 %float_0 + OpBranch %159 + %159 = OpLabel + %170 = OpPhi %bool %false %156 %169 %158 + OpSelectionMerge %172 None + OpBranchConditional %170 %171 %172 + %171 = OpLabel + %174 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %175 = OpLoad %v4float %174 + %176 = OpVectorShuffle %v2float %175 %175 0 1 + %177 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %178 = OpLoad %v4float %177 + %179 = OpVectorShuffle %v2float %178 %178 0 1 + %173 = OpExtInst %v2float %1 Step %176 %179 + %180 = OpVectorShuffle %v2float %33 %33 0 1 + %181 = OpFOrdEqual %v2bool %173 %180 + %182 = OpAll %bool %181 + OpBranch %172 + %172 = OpLabel + %183 = OpPhi %bool %false %159 %182 %171 + OpSelectionMerge %185 None + OpBranchConditional %183 %184 %185 + %184 = OpLabel + %187 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %188 = OpLoad %v4float %187 + %189 = OpVectorShuffle %v3float %188 %188 0 1 2 + %190 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %191 = OpLoad %v4float %190 + %192 = OpVectorShuffle %v3float %191 %191 0 1 2 + %186 = OpExtInst %v3float %1 Step %189 %192 + %193 = OpVectorShuffle %v3float %33 %33 0 1 2 + %194 = OpFOrdEqual %v3bool %186 %193 + %195 = OpAll %bool %194 + OpBranch %185 + %185 = OpLabel + %196 = OpPhi %bool %false %172 %195 %184 + OpSelectionMerge %198 None + OpBranchConditional %196 %197 %198 + %197 = OpLabel + %200 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %201 = OpLoad %v4float %200 + %202 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %203 = OpLoad %v4float %202 + %199 = OpExtInst %v4float %1 Step %201 %203 + %204 = OpFOrdEqual %v4bool %199 %33 + %205 = OpAll %bool %204 + OpBranch %198 + %198 = OpLabel + %206 = OpPhi %bool %false %185 %205 %197 + OpSelectionMerge %208 None + OpBranchConditional %206 %207 %208 + %207 = OpLabel + OpBranch %208 + %208 = OpLabel + %209 = OpPhi %bool %false %198 %true %207 + OpSelectionMerge %211 None + OpBranchConditional %209 %210 %211 + %210 = OpLabel + %212 = OpVectorShuffle %v2float %33 %33 0 1 + %213 = OpFOrdEqual %v2bool %113 %212 + %214 = OpAll %bool %213 + OpBranch %211 + %211 = OpLabel + %215 = OpPhi %bool %false %208 %214 %210 + OpSelectionMerge %217 None + OpBranchConditional %215 %216 %217 + %216 = OpLabel + %219 = OpVectorShuffle %v3float %33 %33 0 1 2 + %220 = OpFOrdEqual %v3bool %218 %219 + %221 = OpAll %bool %220 + OpBranch %217 + %217 = OpLabel + %222 = OpPhi %bool %false %211 %221 %216 + OpSelectionMerge %224 None + OpBranchConditional %222 %223 %224 + %223 = OpLabel + OpBranch %224 + %224 = OpLabel + %225 = OpPhi %bool %false %217 %true %223 + OpSelectionMerge %229 None + OpBranchConditional %225 %227 %228 + %227 = OpLabel + %230 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %231 = OpLoad %v4float %230 + OpStore %226 %231 + OpBranch %229 + %228 = OpLabel + %232 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %233 = OpLoad %v4float %232 + OpStore %226 %233 + OpBranch %229 + %229 = OpLabel + %234 = OpLoad %v4float %226 + OpReturnValue %234 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Step.glsl b/tests/sksl/intrinsics/Step.glsl index 704160763740..0a3b06eb0d2b 100644 --- a/tests/sksl/intrinsics/Step.glsl +++ b/tests/sksl/intrinsics/Step.glsl @@ -7,5 +7,6 @@ vec4 main() { const vec4 constGreen = vec4(0.0, 1.0, 0.0, 1.0); vec4 expectedA = vec4(0.0, 0.0, 1.0, 1.0); vec4 expectedB = vec4(1.0, 1.0, 0.0, 0.0); - return ((((((((((((((step(0.5, testInputs.x) == expectedA.x && step(0.5, testInputs.xy) == expectedA.xy) && step(0.5, testInputs.xyz) == expectedA.xyz) && step(0.5, testInputs) == expectedA) && 0.0 == expectedA.x) && vec2(0.0) == expectedA.xy) && vec3(0.0, 0.0, 1.0) == expectedA.xyz) && vec4(0.0, 0.0, 1.0, 1.0) == expectedA) && step(testInputs.x, 0.0) == expectedB.x) && step(testInputs.xy, vec2(0.0, 1.0)) == expectedB.xy) && step(testInputs.xyz, vec3(0.0, 1.0, 0.0)) == expectedB.xyz) && step(testInputs, constGreen) == expectedB) && 1.0 == expectedB.x) && vec2(1.0) == expectedB.xy) && vec3(1.0, 1.0, 0.0) == expectedB.xyz) && vec4(1.0, 1.0, 0.0, 0.0) == expectedB ? colorGreen : colorRed; + vec4 expectedC = vec4(0.0, 1.0, 1.0, 1.0); + return ((((((((((((((((((((((step(0.5, testInputs.x) == expectedA.x && step(0.5, testInputs.xy) == expectedA.xy) && step(0.5, testInputs.xyz) == expectedA.xyz) && step(0.5, testInputs) == expectedA) && 0.0 == expectedA.x) && vec2(0.0) == expectedA.xy) && vec3(0.0, 0.0, 1.0) == expectedA.xyz) && vec4(0.0, 0.0, 1.0, 1.0) == expectedA) && step(testInputs.x, 0.0) == expectedB.x) && step(testInputs.xy, vec2(0.0, 1.0)) == expectedB.xy) && step(testInputs.xyz, vec3(0.0, 1.0, 0.0)) == expectedB.xyz) && step(testInputs, constGreen) == expectedB) && 1.0 == expectedB.x) && vec2(1.0) == expectedB.xy) && vec3(1.0, 1.0, 0.0) == expectedB.xyz) && vec4(1.0, 1.0, 0.0, 0.0) == expectedB) && step(colorRed.x, colorGreen.x) == expectedC.x) && step(colorRed.xy, colorGreen.xy) == expectedC.xy) && step(colorRed.xyz, colorGreen.xyz) == expectedC.xyz) && step(colorRed, colorGreen) == expectedC) && 0.0 == expectedC.x) && vec2(0.0, 1.0) == expectedC.xy) && vec3(0.0, 1.0, 1.0) == expectedC.xyz) && vec4(0.0, 1.0, 1.0, 1.0) == expectedC ? colorGreen : colorRed; } diff --git a/tests/sksl/intrinsics/Step.hlsl b/tests/sksl/intrinsics/Step.hlsl index 75f1d03b09a6..00af71e0cffb 100644 --- a/tests/sksl/intrinsics/Step.hlsl +++ b/tests/sksl/intrinsics/Step.hlsl @@ -17,157 +17,233 @@ float4 main(float2 _24) { float4 expectedA = float4(0.0f, 0.0f, 1.0f, 1.0f); float4 expectedB = float4(1.0f, 1.0f, 0.0f, 0.0f); - bool _53 = false; + float4 expectedC = float4(0.0f, 1.0f, 1.0f, 1.0f); + bool _55 = false; if (step(0.5f, _10_testInputs.x) == 0.0f) { - float2 _44 = step(0.5f.xx, _10_testInputs.xy); - _53 = all(bool2(_44.x == float4(0.0f, 0.0f, 1.0f, 1.0f).xy.x, _44.y == float4(0.0f, 0.0f, 1.0f, 1.0f).xy.y)); + float2 _46 = step(0.5f.xx, _10_testInputs.xy); + _55 = all(bool2(_46.x == float4(0.0f, 0.0f, 1.0f, 1.0f).xy.x, _46.y == float4(0.0f, 0.0f, 1.0f, 1.0f).xy.y)); } else { - _53 = false; + _55 = false; } - bool _66 = false; - if (_53) + bool _68 = false; + if (_55) { - float3 _56 = step(0.5f.xxx, _10_testInputs.xyz); - _66 = all(bool3(_56.x == float4(0.0f, 0.0f, 1.0f, 1.0f).xyz.x, _56.y == float4(0.0f, 0.0f, 1.0f, 1.0f).xyz.y, _56.z == float4(0.0f, 0.0f, 1.0f, 1.0f).xyz.z)); + float3 _58 = step(0.5f.xxx, _10_testInputs.xyz); + _68 = all(bool3(_58.x == float4(0.0f, 0.0f, 1.0f, 1.0f).xyz.x, _58.y == float4(0.0f, 0.0f, 1.0f, 1.0f).xyz.y, _58.z == float4(0.0f, 0.0f, 1.0f, 1.0f).xyz.z)); } else { - _66 = false; + _68 = false; } - bool _76 = false; - if (_66) + bool _78 = false; + if (_68) { - float4 _69 = step(0.5f.xxxx, _10_testInputs); - _76 = all(bool4(_69.x == float4(0.0f, 0.0f, 1.0f, 1.0f).x, _69.y == float4(0.0f, 0.0f, 1.0f, 1.0f).y, _69.z == float4(0.0f, 0.0f, 1.0f, 1.0f).z, _69.w == float4(0.0f, 0.0f, 1.0f, 1.0f).w)); + float4 _71 = step(0.5f.xxxx, _10_testInputs); + _78 = all(bool4(_71.x == float4(0.0f, 0.0f, 1.0f, 1.0f).x, _71.y == float4(0.0f, 0.0f, 1.0f, 1.0f).y, _71.z == float4(0.0f, 0.0f, 1.0f, 1.0f).z, _71.w == float4(0.0f, 0.0f, 1.0f, 1.0f).w)); } else { - _76 = false; + _78 = false; } - bool _80 = false; - if (_76) + bool _82 = false; + if (_78) { - _80 = true; + _82 = true; } else { - _80 = false; + _82 = false; } - bool _86 = false; - if (_80) + bool _88 = false; + if (_82) { - _86 = all(bool2(0.0f.xx.x == float4(0.0f, 0.0f, 1.0f, 1.0f).xy.x, 0.0f.xx.y == float4(0.0f, 0.0f, 1.0f, 1.0f).xy.y)); + _88 = all(bool2(0.0f.xx.x == float4(0.0f, 0.0f, 1.0f, 1.0f).xy.x, 0.0f.xx.y == float4(0.0f, 0.0f, 1.0f, 1.0f).xy.y)); } else { - _86 = false; + _88 = false; } - bool _93 = false; - if (_86) + bool _95 = false; + if (_88) { - _93 = all(bool3(float3(0.0f, 0.0f, 1.0f).x == float4(0.0f, 0.0f, 1.0f, 1.0f).xyz.x, float3(0.0f, 0.0f, 1.0f).y == float4(0.0f, 0.0f, 1.0f, 1.0f).xyz.y, float3(0.0f, 0.0f, 1.0f).z == float4(0.0f, 0.0f, 1.0f, 1.0f).xyz.z)); + _95 = all(bool3(float3(0.0f, 0.0f, 1.0f).x == float4(0.0f, 0.0f, 1.0f, 1.0f).xyz.x, float3(0.0f, 0.0f, 1.0f).y == float4(0.0f, 0.0f, 1.0f, 1.0f).xyz.y, float3(0.0f, 0.0f, 1.0f).z == float4(0.0f, 0.0f, 1.0f, 1.0f).xyz.z)); } else { - _93 = false; + _95 = false; } - bool _96 = false; - if (_93) + bool _98 = false; + if (_95) { - _96 = true; + _98 = true; } else { - _96 = false; + _98 = false; } - bool _104 = false; - if (_96) + bool _106 = false; + if (_98) { - _104 = step(_10_testInputs.x, 0.0f) == 1.0f; + _106 = step(_10_testInputs.x, 0.0f) == 1.0f; } else { - _104 = false; + _106 = false; } - bool _115 = false; - if (_104) + bool _117 = false; + if (_106) { - float2 _107 = step(_10_testInputs.xy, float2(0.0f, 1.0f)); - _115 = all(bool2(_107.x == float4(1.0f, 1.0f, 0.0f, 0.0f).xy.x, _107.y == float4(1.0f, 1.0f, 0.0f, 0.0f).xy.y)); + float2 _109 = step(_10_testInputs.xy, float2(0.0f, 1.0f)); + _117 = all(bool2(_109.x == float4(1.0f, 1.0f, 0.0f, 0.0f).xy.x, _109.y == float4(1.0f, 1.0f, 0.0f, 0.0f).xy.y)); } else { - _115 = false; + _117 = false; } - bool _126 = false; - if (_115) + bool _128 = false; + if (_117) { - float3 _118 = step(_10_testInputs.xyz, float3(0.0f, 1.0f, 0.0f)); - _126 = all(bool3(_118.x == float4(1.0f, 1.0f, 0.0f, 0.0f).xyz.x, _118.y == float4(1.0f, 1.0f, 0.0f, 0.0f).xyz.y, _118.z == float4(1.0f, 1.0f, 0.0f, 0.0f).xyz.z)); + float3 _120 = step(_10_testInputs.xyz, float3(0.0f, 1.0f, 0.0f)); + _128 = all(bool3(_120.x == float4(1.0f, 1.0f, 0.0f, 0.0f).xyz.x, _120.y == float4(1.0f, 1.0f, 0.0f, 0.0f).xyz.y, _120.z == float4(1.0f, 1.0f, 0.0f, 0.0f).xyz.z)); } else { - _126 = false; + _128 = false; } - bool _135 = false; - if (_126) + bool _137 = false; + if (_128) { - float4 _129 = step(_10_testInputs, float4(0.0f, 1.0f, 0.0f, 1.0f)); - _135 = all(bool4(_129.x == float4(1.0f, 1.0f, 0.0f, 0.0f).x, _129.y == float4(1.0f, 1.0f, 0.0f, 0.0f).y, _129.z == float4(1.0f, 1.0f, 0.0f, 0.0f).z, _129.w == float4(1.0f, 1.0f, 0.0f, 0.0f).w)); + float4 _131 = step(_10_testInputs, float4(0.0f, 1.0f, 0.0f, 1.0f)); + _137 = all(bool4(_131.x == float4(1.0f, 1.0f, 0.0f, 0.0f).x, _131.y == float4(1.0f, 1.0f, 0.0f, 0.0f).y, _131.z == float4(1.0f, 1.0f, 0.0f, 0.0f).z, _131.w == float4(1.0f, 1.0f, 0.0f, 0.0f).w)); } else { - _135 = false; + _137 = false; } - bool _138 = false; - if (_135) + bool _140 = false; + if (_137) { - _138 = true; + _140 = true; } else { - _138 = false; + _140 = false; } - bool _145 = false; - if (_138) + bool _147 = false; + if (_140) { - _145 = all(bool2(1.0f.xx.x == float4(1.0f, 1.0f, 0.0f, 0.0f).xy.x, 1.0f.xx.y == float4(1.0f, 1.0f, 0.0f, 0.0f).xy.y)); + _147 = all(bool2(1.0f.xx.x == float4(1.0f, 1.0f, 0.0f, 0.0f).xy.x, 1.0f.xx.y == float4(1.0f, 1.0f, 0.0f, 0.0f).xy.y)); } else { - _145 = false; + _147 = false; } - bool _152 = false; - if (_145) + bool _154 = false; + if (_147) { - _152 = all(bool3(float3(1.0f, 1.0f, 0.0f).x == float4(1.0f, 1.0f, 0.0f, 0.0f).xyz.x, float3(1.0f, 1.0f, 0.0f).y == float4(1.0f, 1.0f, 0.0f, 0.0f).xyz.y, float3(1.0f, 1.0f, 0.0f).z == float4(1.0f, 1.0f, 0.0f, 0.0f).xyz.z)); + _154 = all(bool3(float3(1.0f, 1.0f, 0.0f).x == float4(1.0f, 1.0f, 0.0f, 0.0f).xyz.x, float3(1.0f, 1.0f, 0.0f).y == float4(1.0f, 1.0f, 0.0f, 0.0f).xyz.y, float3(1.0f, 1.0f, 0.0f).z == float4(1.0f, 1.0f, 0.0f, 0.0f).xyz.z)); } else { - _152 = false; + _154 = false; } - bool _155 = false; - if (_152) + bool _157 = false; + if (_154) { - _155 = true; + _157 = true; } else { - _155 = false; + _157 = false; } - float4 _156 = 0.0f.xxxx; - if (_155) + bool _170 = false; + if (_157) { - _156 = _10_colorGreen; + _170 = step(_10_colorRed.x, _10_colorGreen.x) == 0.0f; } else { - _156 = _10_colorRed; + _170 = false; } - return _156; + bool _183 = false; + if (_170) + { + float2 _173 = step(_10_colorRed.xy, _10_colorGreen.xy); + _183 = all(bool2(_173.x == float4(0.0f, 1.0f, 1.0f, 1.0f).xy.x, _173.y == float4(0.0f, 1.0f, 1.0f, 1.0f).xy.y)); + } + else + { + _183 = false; + } + bool _196 = false; + if (_183) + { + float3 _186 = step(_10_colorRed.xyz, _10_colorGreen.xyz); + _196 = all(bool3(_186.x == float4(0.0f, 1.0f, 1.0f, 1.0f).xyz.x, _186.y == float4(0.0f, 1.0f, 1.0f, 1.0f).xyz.y, _186.z == float4(0.0f, 1.0f, 1.0f, 1.0f).xyz.z)); + } + else + { + _196 = false; + } + bool _206 = false; + if (_196) + { + float4 _199 = step(_10_colorRed, _10_colorGreen); + _206 = all(bool4(_199.x == float4(0.0f, 1.0f, 1.0f, 1.0f).x, _199.y == float4(0.0f, 1.0f, 1.0f, 1.0f).y, _199.z == float4(0.0f, 1.0f, 1.0f, 1.0f).z, _199.w == float4(0.0f, 1.0f, 1.0f, 1.0f).w)); + } + else + { + _206 = false; + } + bool _209 = false; + if (_206) + { + _209 = true; + } + else + { + _209 = false; + } + bool _215 = false; + if (_209) + { + _215 = all(bool2(float2(0.0f, 1.0f).x == float4(0.0f, 1.0f, 1.0f, 1.0f).xy.x, float2(0.0f, 1.0f).y == float4(0.0f, 1.0f, 1.0f, 1.0f).xy.y)); + } + else + { + _215 = false; + } + bool _222 = false; + if (_215) + { + _222 = all(bool3(float3(0.0f, 1.0f, 1.0f).x == float4(0.0f, 1.0f, 1.0f, 1.0f).xyz.x, float3(0.0f, 1.0f, 1.0f).y == float4(0.0f, 1.0f, 1.0f, 1.0f).xyz.y, float3(0.0f, 1.0f, 1.0f).z == float4(0.0f, 1.0f, 1.0f, 1.0f).xyz.z)); + } + else + { + _222 = false; + } + bool _225 = false; + if (_222) + { + _225 = true; + } + else + { + _225 = false; + } + float4 _226 = 0.0f.xxxx; + if (_225) + { + _226 = _10_colorGreen; + } + else + { + _226 = _10_colorRed; + } + return _226; } void frag_main() diff --git a/tests/sksl/intrinsics/Step.metal b/tests/sksl/intrinsics/Step.metal index 835f1069acf4..32f6173482e3 100644 --- a/tests/sksl/intrinsics/Step.metal +++ b/tests/sksl/intrinsics/Step.metal @@ -17,6 +17,7 @@ fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _unifo const half4 constGreen = half4(0.0h, 1.0h, 0.0h, 1.0h); half4 expectedA = half4(0.0h, 0.0h, 1.0h, 1.0h); half4 expectedB = half4(1.0h, 1.0h, 0.0h, 0.0h); - _out.sk_FragColor = ((((((((((((((step(0.5h, _uniforms.testInputs.x) == expectedA.x && all(step(0.5h, _uniforms.testInputs.xy) == expectedA.xy)) && all(step(0.5h, _uniforms.testInputs.xyz) == expectedA.xyz)) && all(step(0.5h, _uniforms.testInputs) == expectedA)) && 0.0h == expectedA.x) && all(half2(0.0h) == expectedA.xy)) && all(half3(0.0h, 0.0h, 1.0h) == expectedA.xyz)) && all(half4(0.0h, 0.0h, 1.0h, 1.0h) == expectedA)) && step(_uniforms.testInputs.x, 0.0h) == expectedB.x) && all(step(_uniforms.testInputs.xy, half2(0.0h, 1.0h)) == expectedB.xy)) && all(step(_uniforms.testInputs.xyz, half3(0.0h, 1.0h, 0.0h)) == expectedB.xyz)) && all(step(_uniforms.testInputs, constGreen) == expectedB)) && 1.0h == expectedB.x) && all(half2(1.0h) == expectedB.xy)) && all(half3(1.0h, 1.0h, 0.0h) == expectedB.xyz)) && all(half4(1.0h, 1.0h, 0.0h, 0.0h) == expectedB) ? _uniforms.colorGreen : _uniforms.colorRed; + half4 expectedC = half4(0.0h, 1.0h, 1.0h, 1.0h); + _out.sk_FragColor = ((((((((((((((((((((((step(0.5h, _uniforms.testInputs.x) == expectedA.x && all(step(0.5h, _uniforms.testInputs.xy) == expectedA.xy)) && all(step(0.5h, _uniforms.testInputs.xyz) == expectedA.xyz)) && all(step(0.5h, _uniforms.testInputs) == expectedA)) && 0.0h == expectedA.x) && all(half2(0.0h) == expectedA.xy)) && all(half3(0.0h, 0.0h, 1.0h) == expectedA.xyz)) && all(half4(0.0h, 0.0h, 1.0h, 1.0h) == expectedA)) && step(_uniforms.testInputs.x, 0.0h) == expectedB.x) && all(step(_uniforms.testInputs.xy, half2(0.0h, 1.0h)) == expectedB.xy)) && all(step(_uniforms.testInputs.xyz, half3(0.0h, 1.0h, 0.0h)) == expectedB.xyz)) && all(step(_uniforms.testInputs, constGreen) == expectedB)) && 1.0h == expectedB.x) && all(half2(1.0h) == expectedB.xy)) && all(half3(1.0h, 1.0h, 0.0h) == expectedB.xyz)) && all(half4(1.0h, 1.0h, 0.0h, 0.0h) == expectedB)) && step(_uniforms.colorRed.x, _uniforms.colorGreen.x) == expectedC.x) && all(step(_uniforms.colorRed.xy, _uniforms.colorGreen.xy) == expectedC.xy)) && all(step(_uniforms.colorRed.xyz, _uniforms.colorGreen.xyz) == expectedC.xyz)) && all(step(_uniforms.colorRed, _uniforms.colorGreen) == expectedC)) && 0.0h == expectedC.x) && all(half2(0.0h, 1.0h) == expectedC.xy)) && all(half3(0.0h, 1.0h, 1.0h) == expectedC.xyz)) && all(half4(0.0h, 1.0h, 1.0h, 1.0h) == expectedC) ? _uniforms.colorGreen : _uniforms.colorRed; return _out; } diff --git a/tests/sksl/intrinsics/Step.skrp b/tests/sksl/intrinsics/Step.skrp index 641d31c755ec..c06e438ec342 100644 --- a/tests/sksl/intrinsics/Step.skrp +++ b/tests/sksl/intrinsics/Step.skrp @@ -1,126 +1,171 @@ +161 instructions + [immutable slots] -constGreen(0) = 0 -constGreen(1) = 0x3F800000 (1.0) -constGreen(2) = 0 -constGreen(3) = 0x3F800000 (1.0) -expectedA(0) = 0 -expectedA(1) = 0 -expectedA(2) = 0x3F800000 (1.0) -expectedA(3) = 0x3F800000 (1.0) -expectedB(0) = 0x3F800000 (1.0) -expectedB(1) = 0x3F800000 (1.0) -expectedB(2) = 0 -expectedB(3) = 0 +i0 = 0 +i1 = 0x3F800000 (1.0) +i2 = 0 +i3 = 0x3F800000 (1.0) +i4 = 0 +i5 = 0 +i6 = 0x3F800000 (1.0) +i7 = 0x3F800000 (1.0) +i8 = 0x3F800000 (1.0) +i9 = 0x3F800000 (1.0) +i10 = 0 +i11 = 0 store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_constant $0 = 0x3F000000 (0.5) copy_uniform $1 = testInputs(0) -cmplt_float $0 = lessThan($0, $1) +cmple_float $0 = lessThanEqual($0, $1) bitwise_and_imm_int $0 &= 0x3F800000 -copy_slot_unmasked $1 = expectedA(0) -cmpeq_float $0 = equal($0, $1) +cmpeq_imm_float $0 = equal($0, 0) splat_2_constants $1..2 = 0x3F000000 (0.5) copy_2_uniforms $3..4 = testInputs(0..1) -cmplt_2_floats $1..2 = lessThan($1..2, $3..4) +cmple_2_floats $1..2 = lessThanEqual($1..2, $3..4) bitwise_and_imm_2_ints $1..2 &= 0x3F800000 (1.0) -copy_2_slots_unmasked $3..4 = expectedA(0..1) +copy_2_immutables_unmasked $3..4 = i4..5 [0, 0] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 splat_3_constants $1..3 = 0x3F000000 (0.5) copy_3_uniforms $4..6 = testInputs(0..2) -cmplt_3_floats $1..3 = lessThan($1..3, $4..6) +cmple_3_floats $1..3 = lessThanEqual($1..3, $4..6) bitwise_and_imm_3_ints $1..3 &= 0x3F800000 (1.0) -copy_3_slots_unmasked $4..6 = expectedA(0..2) +copy_3_immutables_unmasked $4..6 = i4..6 [0, 0, 0x3F800000 (1.0)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 splat_4_constants $1..4 = 0x3F000000 (0.5) copy_4_uniforms $5..8 = testInputs -cmplt_4_floats $1..4 = lessThan($1..4, $5..8) +cmple_4_floats $1..4 = lessThanEqual($1..4, $5..8) bitwise_and_imm_4_ints $1..4 &= 0x3F800000 (1.0) -copy_4_slots_unmasked $5..8 = expectedA +copy_4_immutables_unmasked $5..8 = i4..7 [0, 0, 0x3F800000 (1.0), 0x3F800000 (1.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expectedA(0) +copy_constant $1 = 0 cmpeq_imm_float $1 = equal($1, 0) bitwise_and_int $0 &= $1 splat_2_constants $1..2 = 0 -copy_2_slots_unmasked $3..4 = expectedA(0..1) +copy_2_immutables_unmasked $3..4 = i4..5 [0, 0] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -splat_2_constants $1..2 = 0 -copy_constant $3 = 0x3F800000 (1.0) -copy_3_slots_unmasked $4..6 = expectedA(0..2) +copy_3_immutables_unmasked $1..3 = i4..6 [0, 0, 0x3F800000 (1.0)] +copy_3_immutables_unmasked $4..6 = i4..6 [0, 0, 0x3F800000 (1.0)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -splat_2_constants $1..2 = 0 -splat_2_constants $3..4 = 0x3F800000 (1.0) -copy_4_slots_unmasked $5..8 = expectedA +copy_4_immutables_unmasked $1..4 = i4..7 [0, 0, 0x3F800000 (1.0), 0x3F800000 (1.0)] +copy_4_immutables_unmasked $5..8 = i4..7 [0, 0, 0x3F800000 (1.0), 0x3F800000 (1.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_uniform $1 = testInputs(0) -cmplt_imm_float $1 = lessThan($1, 0) +cmple_imm_float $1 = lessThanEqual($1, 0) bitwise_and_imm_int $1 &= 0x3F800000 -copy_slot_unmasked $2 = expectedB(0) -cmpeq_float $1 = equal($1, $2) +cmpeq_imm_float $1 = equal($1, 0x3F800000 (1.0)) bitwise_and_int $0 &= $1 copy_2_uniforms $1..2 = testInputs(0..1) -copy_constant $3 = 0 -copy_constant $4 = 0x3F800000 (1.0) -cmplt_2_floats $1..2 = lessThan($1..2, $3..4) +copy_2_immutables_unmasked $3..4 = i0..1 [0, 0x3F800000 (1.0)] +cmple_2_floats $1..2 = lessThanEqual($1..2, $3..4) bitwise_and_imm_2_ints $1..2 &= 0x3F800000 (1.0) -copy_2_slots_unmasked $3..4 = expectedB(0..1) +copy_2_immutables_unmasked $3..4 = i8..9 [0x3F800000 (1.0), 0x3F800000 (1.0)] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_3_uniforms $1..3 = testInputs(0..2) -copy_constant $4 = 0 -copy_constant $5 = 0x3F800000 (1.0) -copy_constant $6 = 0 -cmplt_3_floats $1..3 = lessThan($1..3, $4..6) +copy_3_immutables_unmasked $4..6 = i0..2 [0, 0x3F800000 (1.0), 0] +cmple_3_floats $1..3 = lessThanEqual($1..3, $4..6) bitwise_and_imm_3_ints $1..3 &= 0x3F800000 (1.0) -copy_3_slots_unmasked $4..6 = expectedB(0..2) +copy_3_immutables_unmasked $4..6 = i8..10 [0x3F800000 (1.0), 0x3F800000 (1.0), 0] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_4_uniforms $1..4 = testInputs -copy_4_slots_unmasked $5..8 = constGreen -cmplt_4_floats $1..4 = lessThan($1..4, $5..8) +copy_4_immutables_unmasked $5..8 = i0..3 [0, 0x3F800000 (1.0), 0, 0x3F800000 (1.0)] +cmple_4_floats $1..4 = lessThanEqual($1..4, $5..8) bitwise_and_imm_4_ints $1..4 &= 0x3F800000 (1.0) -copy_4_slots_unmasked $5..8 = expectedB +copy_4_immutables_unmasked $5..8 = i8..11 [0x3F800000 (1.0), 0x3F800000 (1.0), 0, 0] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = expectedB(0) +copy_constant $1 = 0x3F800000 (1.0) cmpeq_imm_float $1 = equal($1, 0x3F800000 (1.0)) bitwise_and_int $0 &= $1 splat_2_constants $1..2 = 0x3F800000 (1.0) -copy_2_slots_unmasked $3..4 = expectedB(0..1) +copy_2_immutables_unmasked $3..4 = i8..9 [0x3F800000 (1.0), 0x3F800000 (1.0)] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -splat_2_constants $1..2 = 0x3F800000 (1.0) -copy_constant $3 = 0 -copy_3_slots_unmasked $4..6 = expectedB(0..2) +copy_3_immutables_unmasked $1..3 = i8..10 [0x3F800000 (1.0), 0x3F800000 (1.0), 0] +copy_3_immutables_unmasked $4..6 = i8..10 [0x3F800000 (1.0), 0x3F800000 (1.0), 0] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -splat_2_constants $1..2 = 0x3F800000 (1.0) -splat_2_constants $3..4 = 0 -copy_4_slots_unmasked $5..8 = expectedB +copy_4_immutables_unmasked $1..4 = i8..11 [0x3F800000 (1.0), 0x3F800000 (1.0), 0, 0] +copy_4_immutables_unmasked $5..8 = i8..11 [0x3F800000 (1.0), 0x3F800000 (1.0), 0, 0] +cmpeq_4_floats $1..4 = equal($1..4, $5..8) +bitwise_and_2_ints $1..2 &= $3..4 +bitwise_and_int $1 &= $2 +bitwise_and_int $0 &= $1 +copy_uniform $1 = colorRed(0) +copy_uniform $2 = colorGreen(0) +cmple_float $1 = lessThanEqual($1, $2) +bitwise_and_imm_int $1 &= 0x3F800000 +cmpeq_imm_float $1 = equal($1, 0) +bitwise_and_int $0 &= $1 +copy_2_uniforms $1..2 = colorRed(0..1) +copy_2_uniforms $3..4 = colorGreen(0..1) +cmple_2_floats $1..2 = lessThanEqual($1..2, $3..4) +bitwise_and_imm_2_ints $1..2 &= 0x3F800000 (1.0) +copy_2_immutables_unmasked $3..4 = i5..6 [0, 0x3F800000 (1.0)] +cmpeq_2_floats $1..2 = equal($1..2, $3..4) +bitwise_and_int $1 &= $2 +bitwise_and_int $0 &= $1 +copy_3_uniforms $1..3 = colorRed(0..2) +copy_3_uniforms $4..6 = colorGreen(0..2) +cmple_3_floats $1..3 = lessThanEqual($1..3, $4..6) +bitwise_and_imm_3_ints $1..3 &= 0x3F800000 (1.0) +copy_3_immutables_unmasked $4..6 = i5..7 [0, 0x3F800000 (1.0), 0x3F800000 (1.0)] +cmpeq_3_floats $1..3 = equal($1..3, $4..6) +bitwise_and_int $2 &= $3 +bitwise_and_int $1 &= $2 +bitwise_and_int $0 &= $1 +copy_4_uniforms $1..4 = colorRed +copy_4_uniforms $5..8 = colorGreen +cmple_4_floats $1..4 = lessThanEqual($1..4, $5..8) +bitwise_and_imm_4_ints $1..4 &= 0x3F800000 (1.0) +copy_4_immutables_unmasked $5..8 = i5..8 [0, 0x3F800000 (1.0), 0x3F800000 (1.0), 0x3F800000 (1.0)] +cmpeq_4_floats $1..4 = equal($1..4, $5..8) +bitwise_and_2_ints $1..2 &= $3..4 +bitwise_and_int $1 &= $2 +bitwise_and_int $0 &= $1 +copy_constant $1 = 0 +cmpeq_imm_float $1 = equal($1, 0) +bitwise_and_int $0 &= $1 +copy_2_immutables_unmasked $1..2 = i0..1 [0, 0x3F800000 (1.0)] +copy_2_immutables_unmasked $3..4 = i5..6 [0, 0x3F800000 (1.0)] +cmpeq_2_floats $1..2 = equal($1..2, $3..4) +bitwise_and_int $1 &= $2 +bitwise_and_int $0 &= $1 +copy_3_immutables_unmasked $1..3 = i5..7 [0, 0x3F800000 (1.0), 0x3F800000 (1.0)] +copy_3_immutables_unmasked $4..6 = i5..7 [0, 0x3F800000 (1.0), 0x3F800000 (1.0)] +cmpeq_3_floats $1..3 = equal($1..3, $4..6) +bitwise_and_int $2 &= $3 +bitwise_and_int $1 &= $2 +bitwise_and_int $0 &= $1 +copy_4_immutables_unmasked $1..4 = i5..8 [0, 0x3F800000 (1.0), 0x3F800000 (1.0), 0x3F800000 (1.0)] +copy_4_immutables_unmasked $5..8 = i5..8 [0, 0x3F800000 (1.0), 0x3F800000 (1.0), 0x3F800000 (1.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 diff --git a/tests/sksl/intrinsics/Step.wgsl b/tests/sksl/intrinsics/Step.wgsl index b87d92d2b31d..0eb458ebc41b 100644 --- a/tests/sksl/intrinsics/Step.wgsl +++ b/tests/sksl/intrinsics/Step.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -17,6 +18,7 @@ fn main(_skParam0: vec2) -> vec4 { const constGreen: vec4 = vec4(0.0, 1.0, 0.0, 1.0); var expectedA: vec4 = vec4(0.0, 0.0, 1.0, 1.0); var expectedB: vec4 = vec4(1.0, 1.0, 0.0, 0.0); + var expectedC: vec4 = vec4(0.0, 1.0, 1.0, 1.0); let _skTemp0 = step(0.5, _globalUniforms.testInputs.x); let _skTemp1 = step(vec2(0.5), _globalUniforms.testInputs.xy); let _skTemp2 = step(vec3(0.5), _globalUniforms.testInputs.xyz); @@ -25,7 +27,11 @@ fn main(_skParam0: vec2) -> vec4 { let _skTemp5 = step(_globalUniforms.testInputs.xy, vec2(0.0, 1.0)); let _skTemp6 = step(_globalUniforms.testInputs.xyz, vec3(0.0, 1.0, 0.0)); let _skTemp7 = step(_globalUniforms.testInputs, constGreen); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((((((((((_skTemp0 == expectedA.x && all(_skTemp1 == expectedA.xy)) && all(_skTemp2 == expectedA.xyz)) && all(_skTemp3 == expectedA)) && 0.0 == expectedA.x) && all(vec2(0.0) == expectedA.xy)) && all(vec3(0.0, 0.0, 1.0) == expectedA.xyz)) && all(vec4(0.0, 0.0, 1.0, 1.0) == expectedA)) && _skTemp4 == expectedB.x) && all(_skTemp5 == expectedB.xy)) && all(_skTemp6 == expectedB.xyz)) && all(_skTemp7 == expectedB)) && 1.0 == expectedB.x) && all(vec2(1.0) == expectedB.xy)) && all(vec3(1.0, 1.0, 0.0) == expectedB.xyz)) && all(vec4(1.0, 1.0, 0.0, 0.0) == expectedB))); + let _skTemp8 = step(_globalUniforms.colorRed.x, _globalUniforms.colorGreen.x); + let _skTemp9 = step(_globalUniforms.colorRed.xy, _globalUniforms.colorGreen.xy); + let _skTemp10 = step(_globalUniforms.colorRed.xyz, _globalUniforms.colorGreen.xyz); + let _skTemp11 = step(_globalUniforms.colorRed, _globalUniforms.colorGreen); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((((((((((((((((((_skTemp0 == expectedA.x) && all(_skTemp1 == expectedA.xy)) && all(_skTemp2 == expectedA.xyz)) && all(_skTemp3 == expectedA)) && (0.0 == expectedA.x)) && all(vec2(0.0) == expectedA.xy)) && all(vec3(0.0, 0.0, 1.0) == expectedA.xyz)) && all(vec4(0.0, 0.0, 1.0, 1.0) == expectedA)) && (_skTemp4 == expectedB.x)) && all(_skTemp5 == expectedB.xy)) && all(_skTemp6 == expectedB.xyz)) && all(_skTemp7 == expectedB)) && (1.0 == expectedB.x)) && all(vec2(1.0) == expectedB.xy)) && all(vec3(1.0, 1.0, 0.0) == expectedB.xyz)) && all(vec4(1.0, 1.0, 0.0, 0.0) == expectedB)) && (_skTemp8 == expectedC.x)) && all(_skTemp9 == expectedC.xy)) && all(_skTemp10 == expectedC.xyz)) && all(_skTemp11 == expectedC)) && (0.0 == expectedC.x)) && all(vec2(0.0, 1.0) == expectedC.xy)) && all(vec3(0.0, 1.0, 1.0) == expectedC.xyz)) && all(vec4(0.0, 1.0, 1.0, 1.0) == expectedC))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/intrinsics/Tan.asm.frag b/tests/sksl/intrinsics/Tan.asm.frag index ad1b7da33460..4f0224b59980 100644 --- a/tests/sksl/intrinsics/Tan.asm.frag +++ b/tests/sksl/intrinsics/Tan.asm.frag @@ -1,209 +1,209 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "inputVal" -OpMemberName %_UniformBuffer 1 "expected" -OpMemberName %_UniformBuffer 2 "colorGreen" -OpMemberName %_UniformBuffer 3 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 3 Offset 48 -OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %27 RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %80 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %87 RelaxedPrecision -OpDecorate %88 RelaxedPrecision -OpDecorate %96 RelaxedPrecision -OpDecorate %97 RelaxedPrecision -OpDecorate %105 RelaxedPrecision -OpDecorate %116 RelaxedPrecision -OpDecorate %119 RelaxedPrecision -OpDecorate %120 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "inputVal" + OpMemberName %_UniformBuffer 1 "expected" + OpMemberName %_UniformBuffer 2 "colorGreen" + OpMemberName %_UniformBuffer 3 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 3 Offset 48 + OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %27 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %80 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %87 RelaxedPrecision + OpDecorate %88 RelaxedPrecision + OpDecorate %96 RelaxedPrecision + OpDecorate %97 RelaxedPrecision + OpDecorate %105 RelaxedPrecision + OpDecorate %116 RelaxedPrecision + OpDecorate %119 RelaxedPrecision + OpDecorate %120 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%false = OpConstantFalse %bool + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%v3bool = OpTypeVector %bool 3 -%v4bool = OpTypeVector %bool 4 -%94 = OpConstantComposite %v3float %float_0 %float_0 %float_0 -%103 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %v3bool = OpTypeVector %bool 3 + %v4bool = OpTypeVector %bool 4 + %94 = OpConstantComposite %v3float %float_0 %float_0 %float_0 + %103 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_2 = OpConstant %int 2 -%int_3 = OpConstant %int 3 + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%109 = OpVariable %_ptr_Function_v4float Function -%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %28 -%33 = OpCompositeExtract %float %32 0 -%27 = OpExtInst %float %1 Tan %33 -%34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%36 = OpLoad %v4float %34 -%37 = OpCompositeExtract %float %36 0 -%38 = OpFOrdEqual %bool %27 %37 -OpSelectionMerge %40 None -OpBranchConditional %38 %39 %40 -%39 = OpLabel -%42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%43 = OpLoad %v4float %42 -%44 = OpVectorShuffle %v2float %43 %43 0 1 -%41 = OpExtInst %v2float %1 Tan %44 -%45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%46 = OpLoad %v4float %45 -%47 = OpVectorShuffle %v2float %46 %46 0 1 -%48 = OpFOrdEqual %v2bool %41 %47 -%50 = OpAll %bool %48 -OpBranch %40 -%40 = OpLabel -%51 = OpPhi %bool %false %25 %50 %39 -OpSelectionMerge %53 None -OpBranchConditional %51 %52 %53 -%52 = OpLabel -%55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%56 = OpLoad %v4float %55 -%57 = OpVectorShuffle %v3float %56 %56 0 1 2 -%54 = OpExtInst %v3float %1 Tan %57 -%59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%60 = OpLoad %v4float %59 -%61 = OpVectorShuffle %v3float %60 %60 0 1 2 -%62 = OpFOrdEqual %v3bool %54 %61 -%64 = OpAll %bool %62 -OpBranch %53 -%53 = OpLabel -%65 = OpPhi %bool %false %40 %64 %52 -OpSelectionMerge %67 None -OpBranchConditional %65 %66 %67 -%66 = OpLabel -%69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%70 = OpLoad %v4float %69 -%68 = OpExtInst %v4float %1 Tan %70 -%71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%72 = OpLoad %v4float %71 -%73 = OpFOrdEqual %v4bool %68 %72 -%75 = OpAll %bool %73 -OpBranch %67 -%67 = OpLabel -%76 = OpPhi %bool %false %53 %75 %66 -OpSelectionMerge %78 None -OpBranchConditional %76 %77 %78 -%77 = OpLabel -%79 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%80 = OpLoad %v4float %79 -%81 = OpCompositeExtract %float %80 0 -%82 = OpFOrdEqual %bool %float_0 %81 -OpBranch %78 -%78 = OpLabel -%83 = OpPhi %bool %false %67 %82 %77 -OpSelectionMerge %85 None -OpBranchConditional %83 %84 %85 -%84 = OpLabel -%86 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%87 = OpLoad %v4float %86 -%88 = OpVectorShuffle %v2float %87 %87 0 1 -%89 = OpFOrdEqual %v2bool %19 %88 -%90 = OpAll %bool %89 -OpBranch %85 -%85 = OpLabel -%91 = OpPhi %bool %false %78 %90 %84 -OpSelectionMerge %93 None -OpBranchConditional %91 %92 %93 -%92 = OpLabel -%95 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%96 = OpLoad %v4float %95 -%97 = OpVectorShuffle %v3float %96 %96 0 1 2 -%98 = OpFOrdEqual %v3bool %94 %97 -%99 = OpAll %bool %98 -OpBranch %93 -%93 = OpLabel -%100 = OpPhi %bool %false %85 %99 %92 -OpSelectionMerge %102 None -OpBranchConditional %100 %101 %102 -%101 = OpLabel -%104 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%105 = OpLoad %v4float %104 -%106 = OpFOrdEqual %v4bool %103 %105 -%107 = OpAll %bool %106 -OpBranch %102 -%102 = OpLabel -%108 = OpPhi %bool %false %93 %107 %101 -OpSelectionMerge %113 None -OpBranchConditional %108 %111 %112 -%111 = OpLabel -%114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%116 = OpLoad %v4float %114 -OpStore %109 %116 -OpBranch %113 -%112 = OpLabel -%117 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%119 = OpLoad %v4float %117 -OpStore %109 %119 -OpBranch %113 -%113 = OpLabel -%120 = OpLoad %v4float %109 -OpReturnValue %120 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %109 = OpVariable %_ptr_Function_v4float Function + %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %28 + %33 = OpCompositeExtract %float %32 0 + %27 = OpExtInst %float %1 Tan %33 + %34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %36 = OpLoad %v4float %34 + %37 = OpCompositeExtract %float %36 0 + %38 = OpFOrdEqual %bool %27 %37 + OpSelectionMerge %40 None + OpBranchConditional %38 %39 %40 + %39 = OpLabel + %42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %43 = OpLoad %v4float %42 + %44 = OpVectorShuffle %v2float %43 %43 0 1 + %41 = OpExtInst %v2float %1 Tan %44 + %45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %46 = OpLoad %v4float %45 + %47 = OpVectorShuffle %v2float %46 %46 0 1 + %48 = OpFOrdEqual %v2bool %41 %47 + %50 = OpAll %bool %48 + OpBranch %40 + %40 = OpLabel + %51 = OpPhi %bool %false %25 %50 %39 + OpSelectionMerge %53 None + OpBranchConditional %51 %52 %53 + %52 = OpLabel + %55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %56 = OpLoad %v4float %55 + %57 = OpVectorShuffle %v3float %56 %56 0 1 2 + %54 = OpExtInst %v3float %1 Tan %57 + %59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %60 = OpLoad %v4float %59 + %61 = OpVectorShuffle %v3float %60 %60 0 1 2 + %62 = OpFOrdEqual %v3bool %54 %61 + %64 = OpAll %bool %62 + OpBranch %53 + %53 = OpLabel + %65 = OpPhi %bool %false %40 %64 %52 + OpSelectionMerge %67 None + OpBranchConditional %65 %66 %67 + %66 = OpLabel + %69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %70 = OpLoad %v4float %69 + %68 = OpExtInst %v4float %1 Tan %70 + %71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %72 = OpLoad %v4float %71 + %73 = OpFOrdEqual %v4bool %68 %72 + %75 = OpAll %bool %73 + OpBranch %67 + %67 = OpLabel + %76 = OpPhi %bool %false %53 %75 %66 + OpSelectionMerge %78 None + OpBranchConditional %76 %77 %78 + %77 = OpLabel + %79 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %80 = OpLoad %v4float %79 + %81 = OpCompositeExtract %float %80 0 + %82 = OpFOrdEqual %bool %float_0 %81 + OpBranch %78 + %78 = OpLabel + %83 = OpPhi %bool %false %67 %82 %77 + OpSelectionMerge %85 None + OpBranchConditional %83 %84 %85 + %84 = OpLabel + %86 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %87 = OpLoad %v4float %86 + %88 = OpVectorShuffle %v2float %87 %87 0 1 + %89 = OpFOrdEqual %v2bool %19 %88 + %90 = OpAll %bool %89 + OpBranch %85 + %85 = OpLabel + %91 = OpPhi %bool %false %78 %90 %84 + OpSelectionMerge %93 None + OpBranchConditional %91 %92 %93 + %92 = OpLabel + %95 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %96 = OpLoad %v4float %95 + %97 = OpVectorShuffle %v3float %96 %96 0 1 2 + %98 = OpFOrdEqual %v3bool %94 %97 + %99 = OpAll %bool %98 + OpBranch %93 + %93 = OpLabel + %100 = OpPhi %bool %false %85 %99 %92 + OpSelectionMerge %102 None + OpBranchConditional %100 %101 %102 + %101 = OpLabel + %104 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %105 = OpLoad %v4float %104 + %106 = OpFOrdEqual %v4bool %103 %105 + %107 = OpAll %bool %106 + OpBranch %102 + %102 = OpLabel + %108 = OpPhi %bool %false %93 %107 %101 + OpSelectionMerge %113 None + OpBranchConditional %108 %111 %112 + %111 = OpLabel + %114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %116 = OpLoad %v4float %114 + OpStore %109 %116 + OpBranch %113 + %112 = OpLabel + %117 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %119 = OpLoad %v4float %117 + OpStore %109 %119 + OpBranch %113 + %113 = OpLabel + %120 = OpLoad %v4float %109 + OpReturnValue %120 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Tan.skrp b/tests/sksl/intrinsics/Tan.skrp index 33214e130d91..b93a32499d09 100644 --- a/tests/sksl/intrinsics/Tan.skrp +++ b/tests/sksl/intrinsics/Tan.skrp @@ -1,3 +1,5 @@ +57 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_uniform $4 = inputVal(0) diff --git a/tests/sksl/intrinsics/Tan.wgsl b/tests/sksl/intrinsics/Tan.wgsl index 2c69ef40aa40..4e219c345386 100644 --- a/tests/sksl/intrinsics/Tan.wgsl +++ b/tests/sksl/intrinsics/Tan.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -19,7 +20,7 @@ fn main(_skParam0: vec2) -> vec4 { let _skTemp1 = tan(_globalUniforms.inputVal.xy); let _skTemp2 = tan(_globalUniforms.inputVal.xyz); let _skTemp3 = tan(_globalUniforms.inputVal); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((_skTemp0 == _globalUniforms.expected.x && all(_skTemp1 == _globalUniforms.expected.xy)) && all(_skTemp2 == _globalUniforms.expected.xyz)) && all(_skTemp3 == _globalUniforms.expected)) && 0.0 == _globalUniforms.expected.x) && all(vec2(0.0) == _globalUniforms.expected.xy)) && all(vec3(0.0) == _globalUniforms.expected.xyz)) && all(vec4(0.0) == _globalUniforms.expected))); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((_skTemp0 == _globalUniforms.expected.x) && all(_skTemp1 == _globalUniforms.expected.xy)) && all(_skTemp2 == _globalUniforms.expected.xyz)) && all(_skTemp3 == _globalUniforms.expected)) && (0.0 == _globalUniforms.expected.x)) && all(vec2(0.0) == _globalUniforms.expected.xy)) && all(vec3(0.0) == _globalUniforms.expected.xyz)) && all(vec4(0.0) == _globalUniforms.expected))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/intrinsics/Tanh.asm.frag b/tests/sksl/intrinsics/Tanh.asm.frag index 04ed01e9dadb..91b3f2ad4815 100644 --- a/tests/sksl/intrinsics/Tanh.asm.frag +++ b/tests/sksl/intrinsics/Tanh.asm.frag @@ -1,209 +1,209 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "inputVal" -OpMemberName %_UniformBuffer 1 "expected" -OpMemberName %_UniformBuffer 2 "colorGreen" -OpMemberName %_UniformBuffer 3 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 3 Offset 48 -OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %27 RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %80 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %87 RelaxedPrecision -OpDecorate %88 RelaxedPrecision -OpDecorate %96 RelaxedPrecision -OpDecorate %97 RelaxedPrecision -OpDecorate %105 RelaxedPrecision -OpDecorate %116 RelaxedPrecision -OpDecorate %119 RelaxedPrecision -OpDecorate %120 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "inputVal" + OpMemberName %_UniformBuffer 1 "expected" + OpMemberName %_UniformBuffer 2 "colorGreen" + OpMemberName %_UniformBuffer 3 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 3 Offset 48 + OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %27 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %80 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %87 RelaxedPrecision + OpDecorate %88 RelaxedPrecision + OpDecorate %96 RelaxedPrecision + OpDecorate %97 RelaxedPrecision + OpDecorate %105 RelaxedPrecision + OpDecorate %116 RelaxedPrecision + OpDecorate %119 RelaxedPrecision + OpDecorate %120 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%false = OpConstantFalse %bool + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%v3bool = OpTypeVector %bool 3 -%v4bool = OpTypeVector %bool 4 -%94 = OpConstantComposite %v3float %float_0 %float_0 %float_0 -%103 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %v3bool = OpTypeVector %bool 3 + %v4bool = OpTypeVector %bool 4 + %94 = OpConstantComposite %v3float %float_0 %float_0 %float_0 + %103 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_2 = OpConstant %int 2 -%int_3 = OpConstant %int 3 + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%109 = OpVariable %_ptr_Function_v4float Function -%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %28 -%33 = OpCompositeExtract %float %32 0 -%27 = OpExtInst %float %1 Tanh %33 -%34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%36 = OpLoad %v4float %34 -%37 = OpCompositeExtract %float %36 0 -%38 = OpFOrdEqual %bool %27 %37 -OpSelectionMerge %40 None -OpBranchConditional %38 %39 %40 -%39 = OpLabel -%42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%43 = OpLoad %v4float %42 -%44 = OpVectorShuffle %v2float %43 %43 0 1 -%41 = OpExtInst %v2float %1 Tanh %44 -%45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%46 = OpLoad %v4float %45 -%47 = OpVectorShuffle %v2float %46 %46 0 1 -%48 = OpFOrdEqual %v2bool %41 %47 -%50 = OpAll %bool %48 -OpBranch %40 -%40 = OpLabel -%51 = OpPhi %bool %false %25 %50 %39 -OpSelectionMerge %53 None -OpBranchConditional %51 %52 %53 -%52 = OpLabel -%55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%56 = OpLoad %v4float %55 -%57 = OpVectorShuffle %v3float %56 %56 0 1 2 -%54 = OpExtInst %v3float %1 Tanh %57 -%59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%60 = OpLoad %v4float %59 -%61 = OpVectorShuffle %v3float %60 %60 0 1 2 -%62 = OpFOrdEqual %v3bool %54 %61 -%64 = OpAll %bool %62 -OpBranch %53 -%53 = OpLabel -%65 = OpPhi %bool %false %40 %64 %52 -OpSelectionMerge %67 None -OpBranchConditional %65 %66 %67 -%66 = OpLabel -%69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%70 = OpLoad %v4float %69 -%68 = OpExtInst %v4float %1 Tanh %70 -%71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%72 = OpLoad %v4float %71 -%73 = OpFOrdEqual %v4bool %68 %72 -%75 = OpAll %bool %73 -OpBranch %67 -%67 = OpLabel -%76 = OpPhi %bool %false %53 %75 %66 -OpSelectionMerge %78 None -OpBranchConditional %76 %77 %78 -%77 = OpLabel -%79 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%80 = OpLoad %v4float %79 -%81 = OpCompositeExtract %float %80 0 -%82 = OpFOrdEqual %bool %float_0 %81 -OpBranch %78 -%78 = OpLabel -%83 = OpPhi %bool %false %67 %82 %77 -OpSelectionMerge %85 None -OpBranchConditional %83 %84 %85 -%84 = OpLabel -%86 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%87 = OpLoad %v4float %86 -%88 = OpVectorShuffle %v2float %87 %87 0 1 -%89 = OpFOrdEqual %v2bool %19 %88 -%90 = OpAll %bool %89 -OpBranch %85 -%85 = OpLabel -%91 = OpPhi %bool %false %78 %90 %84 -OpSelectionMerge %93 None -OpBranchConditional %91 %92 %93 -%92 = OpLabel -%95 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%96 = OpLoad %v4float %95 -%97 = OpVectorShuffle %v3float %96 %96 0 1 2 -%98 = OpFOrdEqual %v3bool %94 %97 -%99 = OpAll %bool %98 -OpBranch %93 -%93 = OpLabel -%100 = OpPhi %bool %false %85 %99 %92 -OpSelectionMerge %102 None -OpBranchConditional %100 %101 %102 -%101 = OpLabel -%104 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%105 = OpLoad %v4float %104 -%106 = OpFOrdEqual %v4bool %103 %105 -%107 = OpAll %bool %106 -OpBranch %102 -%102 = OpLabel -%108 = OpPhi %bool %false %93 %107 %101 -OpSelectionMerge %113 None -OpBranchConditional %108 %111 %112 -%111 = OpLabel -%114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%116 = OpLoad %v4float %114 -OpStore %109 %116 -OpBranch %113 -%112 = OpLabel -%117 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%119 = OpLoad %v4float %117 -OpStore %109 %119 -OpBranch %113 -%113 = OpLabel -%120 = OpLoad %v4float %109 -OpReturnValue %120 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %109 = OpVariable %_ptr_Function_v4float Function + %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %28 + %33 = OpCompositeExtract %float %32 0 + %27 = OpExtInst %float %1 Tanh %33 + %34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %36 = OpLoad %v4float %34 + %37 = OpCompositeExtract %float %36 0 + %38 = OpFOrdEqual %bool %27 %37 + OpSelectionMerge %40 None + OpBranchConditional %38 %39 %40 + %39 = OpLabel + %42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %43 = OpLoad %v4float %42 + %44 = OpVectorShuffle %v2float %43 %43 0 1 + %41 = OpExtInst %v2float %1 Tanh %44 + %45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %46 = OpLoad %v4float %45 + %47 = OpVectorShuffle %v2float %46 %46 0 1 + %48 = OpFOrdEqual %v2bool %41 %47 + %50 = OpAll %bool %48 + OpBranch %40 + %40 = OpLabel + %51 = OpPhi %bool %false %25 %50 %39 + OpSelectionMerge %53 None + OpBranchConditional %51 %52 %53 + %52 = OpLabel + %55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %56 = OpLoad %v4float %55 + %57 = OpVectorShuffle %v3float %56 %56 0 1 2 + %54 = OpExtInst %v3float %1 Tanh %57 + %59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %60 = OpLoad %v4float %59 + %61 = OpVectorShuffle %v3float %60 %60 0 1 2 + %62 = OpFOrdEqual %v3bool %54 %61 + %64 = OpAll %bool %62 + OpBranch %53 + %53 = OpLabel + %65 = OpPhi %bool %false %40 %64 %52 + OpSelectionMerge %67 None + OpBranchConditional %65 %66 %67 + %66 = OpLabel + %69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %70 = OpLoad %v4float %69 + %68 = OpExtInst %v4float %1 Tanh %70 + %71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %72 = OpLoad %v4float %71 + %73 = OpFOrdEqual %v4bool %68 %72 + %75 = OpAll %bool %73 + OpBranch %67 + %67 = OpLabel + %76 = OpPhi %bool %false %53 %75 %66 + OpSelectionMerge %78 None + OpBranchConditional %76 %77 %78 + %77 = OpLabel + %79 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %80 = OpLoad %v4float %79 + %81 = OpCompositeExtract %float %80 0 + %82 = OpFOrdEqual %bool %float_0 %81 + OpBranch %78 + %78 = OpLabel + %83 = OpPhi %bool %false %67 %82 %77 + OpSelectionMerge %85 None + OpBranchConditional %83 %84 %85 + %84 = OpLabel + %86 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %87 = OpLoad %v4float %86 + %88 = OpVectorShuffle %v2float %87 %87 0 1 + %89 = OpFOrdEqual %v2bool %19 %88 + %90 = OpAll %bool %89 + OpBranch %85 + %85 = OpLabel + %91 = OpPhi %bool %false %78 %90 %84 + OpSelectionMerge %93 None + OpBranchConditional %91 %92 %93 + %92 = OpLabel + %95 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %96 = OpLoad %v4float %95 + %97 = OpVectorShuffle %v3float %96 %96 0 1 2 + %98 = OpFOrdEqual %v3bool %94 %97 + %99 = OpAll %bool %98 + OpBranch %93 + %93 = OpLabel + %100 = OpPhi %bool %false %85 %99 %92 + OpSelectionMerge %102 None + OpBranchConditional %100 %101 %102 + %101 = OpLabel + %104 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %105 = OpLoad %v4float %104 + %106 = OpFOrdEqual %v4bool %103 %105 + %107 = OpAll %bool %106 + OpBranch %102 + %102 = OpLabel + %108 = OpPhi %bool %false %93 %107 %101 + OpSelectionMerge %113 None + OpBranchConditional %108 %111 %112 + %111 = OpLabel + %114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %116 = OpLoad %v4float %114 + OpStore %109 %116 + OpBranch %113 + %112 = OpLabel + %117 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %119 = OpLoad %v4float %117 + OpStore %109 %119 + OpBranch %113 + %113 = OpLabel + %120 = OpLoad %v4float %109 + OpReturnValue %120 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Tanh.wgsl b/tests/sksl/intrinsics/Tanh.wgsl new file mode 100644 index 000000000000..64809732b0fd --- /dev/null +++ b/tests/sksl/intrinsics/Tanh.wgsl @@ -0,0 +1,30 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + inputVal: vec4, + expected: vec4, + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + let _skTemp0 = tanh(_globalUniforms.inputVal.x); + let _skTemp1 = tanh(_globalUniforms.inputVal.xy); + let _skTemp2 = tanh(_globalUniforms.inputVal.xyz); + let _skTemp3 = tanh(_globalUniforms.inputVal); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((_skTemp0 == _globalUniforms.expected.x) && all(_skTemp1 == _globalUniforms.expected.xy)) && all(_skTemp2 == _globalUniforms.expected.xyz)) && all(_skTemp3 == _globalUniforms.expected)) && (0.0 == _globalUniforms.expected.x)) && all(vec2(0.0) == _globalUniforms.expected.xy)) && all(vec3(0.0) == _globalUniforms.expected.xyz)) && all(vec4(0.0) == _globalUniforms.expected))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/intrinsics/Transpose.asm.frag b/tests/sksl/intrinsics/Transpose.asm.frag index 6d797f6b2a3b..90862fdf6a6b 100644 --- a/tests/sksl/intrinsics/Transpose.asm.frag +++ b/tests/sksl/intrinsics/Transpose.asm.frag @@ -1,171 +1,171 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testMatrix2x2" -OpMemberName %_UniformBuffer 1 "testMatrix3x3" -OpMemberName %_UniformBuffer 2 "colorGreen" -OpMemberName %_UniformBuffer 3 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %testMatrix2x3 "testMatrix2x3" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 ColMajor -OpMemberDecorate %_UniformBuffer 0 MatrixStride 16 -OpMemberDecorate %_UniformBuffer 1 Offset 32 -OpMemberDecorate %_UniformBuffer 1 ColMajor -OpMemberDecorate %_UniformBuffer 1 MatrixStride 16 -OpMemberDecorate %_UniformBuffer 2 Offset 80 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 3 Offset 96 -OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %114 RelaxedPrecision -OpDecorate %117 RelaxedPrecision -OpDecorate %118 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testMatrix2x2" + OpMemberName %_UniformBuffer 1 "testMatrix3x3" + OpMemberName %_UniformBuffer 2 "colorGreen" + OpMemberName %_UniformBuffer 3 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %testMatrix2x3 "testMatrix2x3" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 ColMajor + OpMemberDecorate %_UniformBuffer 0 MatrixStride 16 + OpMemberDecorate %_UniformBuffer 1 Offset 32 + OpMemberDecorate %_UniformBuffer 1 ColMajor + OpMemberDecorate %_UniformBuffer 1 MatrixStride 16 + OpMemberDecorate %_UniformBuffer 2 Offset 80 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 3 Offset 96 + OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %114 RelaxedPrecision + OpDecorate %117 RelaxedPrecision + OpDecorate %118 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%v2float = OpTypeVector %float 2 + %v2float = OpTypeVector %float 2 %mat2v2float = OpTypeMatrix %v2float 2 -%v3float = OpTypeVector %float 3 + %v3float = OpTypeVector %float 3 %mat3v3float = OpTypeMatrix %v3float 3 %_UniformBuffer = OpTypeStruct %mat2v2float %mat3v3float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%19 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%22 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %19 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %22 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%26 = OpTypeFunction %v4float %_ptr_Function_v2float + %26 = OpTypeFunction %v4float %_ptr_Function_v2float %mat2v3float = OpTypeMatrix %v3float 2 %_ptr_Function_mat2v3float = OpTypePointer Function %mat2v3float -%float_1 = OpConstant %float 1 -%float_2 = OpConstant %float 2 -%float_3 = OpConstant %float 3 -%float_4 = OpConstant %float 4 -%float_5 = OpConstant %float 5 -%float_6 = OpConstant %float 6 -%38 = OpConstantComposite %v3float %float_1 %float_2 %float_3 -%39 = OpConstantComposite %v3float %float_4 %float_5 %float_6 -%40 = OpConstantComposite %mat2v3float %38 %39 -%false = OpConstantFalse %bool + %float_1 = OpConstant %float 1 + %float_2 = OpConstant %float 2 + %float_3 = OpConstant %float 3 + %float_4 = OpConstant %float 4 + %float_5 = OpConstant %float 5 + %float_6 = OpConstant %float 6 + %38 = OpConstantComposite %v3float %float_1 %float_2 %float_3 + %39 = OpConstantComposite %v3float %float_4 %float_5 %float_6 + %40 = OpConstantComposite %mat2v3float %38 %39 + %false = OpConstantFalse %bool %_ptr_Uniform_mat2v2float = OpTypePointer Uniform %mat2v2float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%48 = OpConstantComposite %v2float %float_1 %float_3 -%49 = OpConstantComposite %v2float %float_2 %float_4 -%50 = OpConstantComposite %mat2v2float %48 %49 -%v2bool = OpTypeVector %bool 2 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %48 = OpConstantComposite %v2float %float_1 %float_3 + %49 = OpConstantComposite %v2float %float_2 %float_4 + %50 = OpConstantComposite %mat2v2float %48 %49 + %v2bool = OpTypeVector %bool 2 %mat3v2float = OpTypeMatrix %v2float 3 -%63 = OpConstantComposite %v2float %float_1 %float_4 -%64 = OpConstantComposite %v2float %float_2 %float_5 -%65 = OpConstantComposite %v2float %float_3 %float_6 -%66 = OpConstantComposite %mat3v2float %63 %64 %65 + %63 = OpConstantComposite %v2float %float_1 %float_4 + %64 = OpConstantComposite %v2float %float_2 %float_5 + %65 = OpConstantComposite %v2float %float_3 %float_6 + %66 = OpConstantComposite %mat3v2float %63 %64 %65 %_ptr_Uniform_mat3v3float = OpTypePointer Uniform %mat3v3float -%int_1 = OpConstant %int 1 -%float_7 = OpConstant %float 7 -%float_8 = OpConstant %float 8 -%float_9 = OpConstant %float 9 -%89 = OpConstantComposite %v3float %float_1 %float_4 %float_7 -%90 = OpConstantComposite %v3float %float_2 %float_5 %float_8 -%91 = OpConstantComposite %v3float %float_3 %float_6 %float_9 -%92 = OpConstantComposite %mat3v3float %89 %90 %91 -%v3bool = OpTypeVector %bool 3 + %int_1 = OpConstant %int 1 + %float_7 = OpConstant %float 7 + %float_8 = OpConstant %float 8 + %float_9 = OpConstant %float 9 + %89 = OpConstantComposite %v3float %float_1 %float_4 %float_7 + %90 = OpConstantComposite %v3float %float_2 %float_5 %float_8 + %91 = OpConstantComposite %v3float %float_3 %float_6 %float_9 + %92 = OpConstantComposite %mat3v3float %89 %90 %91 + %v3bool = OpTypeVector %bool 3 %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_2 = OpConstant %int 2 -%int_3 = OpConstant %int 3 + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 %_entrypoint_v = OpFunction %void None %19 -%20 = OpLabel -%23 = OpVariable %_ptr_Function_v2float Function -OpStore %23 %22 -%25 = OpFunctionCall %v4float %main %23 -OpStore %sk_FragColor %25 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %26 -%27 = OpFunctionParameter %_ptr_Function_v2float -%28 = OpLabel + %20 = OpLabel + %23 = OpVariable %_ptr_Function_v2float Function + OpStore %23 %22 + %25 = OpFunctionCall %v4float %main %23 + OpStore %sk_FragColor %25 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %26 + %27 = OpFunctionParameter %_ptr_Function_v2float + %28 = OpLabel %testMatrix2x3 = OpVariable %_ptr_Function_mat2v3float Function -%106 = OpVariable %_ptr_Function_v4float Function -OpStore %testMatrix2x3 %40 -%43 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_0 -%47 = OpLoad %mat2v2float %43 -%42 = OpTranspose %mat2v2float %47 -%52 = OpCompositeExtract %v2float %42 0 -%53 = OpFOrdEqual %v2bool %52 %48 -%54 = OpAll %bool %53 -%55 = OpCompositeExtract %v2float %42 1 -%56 = OpFOrdEqual %v2bool %55 %49 -%57 = OpAll %bool %56 -%58 = OpLogicalAnd %bool %54 %57 -OpSelectionMerge %60 None -OpBranchConditional %58 %59 %60 -%59 = OpLabel -%61 = OpTranspose %mat3v2float %40 -%67 = OpCompositeExtract %v2float %61 0 -%68 = OpFOrdEqual %v2bool %67 %63 -%69 = OpAll %bool %68 -%70 = OpCompositeExtract %v2float %61 1 -%71 = OpFOrdEqual %v2bool %70 %64 -%72 = OpAll %bool %71 -%73 = OpLogicalAnd %bool %69 %72 -%74 = OpCompositeExtract %v2float %61 2 -%75 = OpFOrdEqual %v2bool %74 %65 -%76 = OpAll %bool %75 -%77 = OpLogicalAnd %bool %73 %76 -OpBranch %60 -%60 = OpLabel -%78 = OpPhi %bool %false %28 %77 %59 -OpSelectionMerge %80 None -OpBranchConditional %78 %79 %80 -%79 = OpLabel -%82 = OpAccessChain %_ptr_Uniform_mat3v3float %10 %int_1 -%85 = OpLoad %mat3v3float %82 -%81 = OpTranspose %mat3v3float %85 -%94 = OpCompositeExtract %v3float %81 0 -%95 = OpFOrdEqual %v3bool %94 %89 -%96 = OpAll %bool %95 -%97 = OpCompositeExtract %v3float %81 1 -%98 = OpFOrdEqual %v3bool %97 %90 -%99 = OpAll %bool %98 -%100 = OpLogicalAnd %bool %96 %99 -%101 = OpCompositeExtract %v3float %81 2 -%102 = OpFOrdEqual %v3bool %101 %91 -%103 = OpAll %bool %102 -%104 = OpLogicalAnd %bool %100 %103 -OpBranch %80 -%80 = OpLabel -%105 = OpPhi %bool %false %60 %104 %79 -OpSelectionMerge %110 None -OpBranchConditional %105 %108 %109 -%108 = OpLabel -%111 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%114 = OpLoad %v4float %111 -OpStore %106 %114 -OpBranch %110 -%109 = OpLabel -%115 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%117 = OpLoad %v4float %115 -OpStore %106 %117 -OpBranch %110 -%110 = OpLabel -%118 = OpLoad %v4float %106 -OpReturnValue %118 -OpFunctionEnd + %106 = OpVariable %_ptr_Function_v4float Function + OpStore %testMatrix2x3 %40 + %43 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_0 + %47 = OpLoad %mat2v2float %43 + %42 = OpTranspose %mat2v2float %47 + %52 = OpCompositeExtract %v2float %42 0 + %53 = OpFOrdEqual %v2bool %52 %48 + %54 = OpAll %bool %53 + %55 = OpCompositeExtract %v2float %42 1 + %56 = OpFOrdEqual %v2bool %55 %49 + %57 = OpAll %bool %56 + %58 = OpLogicalAnd %bool %54 %57 + OpSelectionMerge %60 None + OpBranchConditional %58 %59 %60 + %59 = OpLabel + %61 = OpTranspose %mat3v2float %40 + %67 = OpCompositeExtract %v2float %61 0 + %68 = OpFOrdEqual %v2bool %67 %63 + %69 = OpAll %bool %68 + %70 = OpCompositeExtract %v2float %61 1 + %71 = OpFOrdEqual %v2bool %70 %64 + %72 = OpAll %bool %71 + %73 = OpLogicalAnd %bool %69 %72 + %74 = OpCompositeExtract %v2float %61 2 + %75 = OpFOrdEqual %v2bool %74 %65 + %76 = OpAll %bool %75 + %77 = OpLogicalAnd %bool %73 %76 + OpBranch %60 + %60 = OpLabel + %78 = OpPhi %bool %false %28 %77 %59 + OpSelectionMerge %80 None + OpBranchConditional %78 %79 %80 + %79 = OpLabel + %82 = OpAccessChain %_ptr_Uniform_mat3v3float %10 %int_1 + %85 = OpLoad %mat3v3float %82 + %81 = OpTranspose %mat3v3float %85 + %94 = OpCompositeExtract %v3float %81 0 + %95 = OpFOrdEqual %v3bool %94 %89 + %96 = OpAll %bool %95 + %97 = OpCompositeExtract %v3float %81 1 + %98 = OpFOrdEqual %v3bool %97 %90 + %99 = OpAll %bool %98 + %100 = OpLogicalAnd %bool %96 %99 + %101 = OpCompositeExtract %v3float %81 2 + %102 = OpFOrdEqual %v3bool %101 %91 + %103 = OpAll %bool %102 + %104 = OpLogicalAnd %bool %100 %103 + OpBranch %80 + %80 = OpLabel + %105 = OpPhi %bool %false %60 %104 %79 + OpSelectionMerge %110 None + OpBranchConditional %105 %108 %109 + %108 = OpLabel + %111 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %114 = OpLoad %v4float %111 + OpStore %106 %114 + OpBranch %110 + %109 = OpLabel + %115 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %117 = OpLoad %v4float %115 + OpStore %106 %117 + OpBranch %110 + %110 = OpLabel + %118 = OpLoad %v4float %106 + OpReturnValue %118 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Transpose.skrp b/tests/sksl/intrinsics/Transpose.skrp index 0c10b2206372..5503528d47a9 100644 --- a/tests/sksl/intrinsics/Transpose.skrp +++ b/tests/sksl/intrinsics/Transpose.skrp @@ -1,31 +1,45 @@ +36 instructions + [immutable slots] -testMatrix2x3(0) = 0x3F800000 (1.0) -testMatrix2x3(1) = 0x40000000 (2.0) -testMatrix2x3(2) = 0x40400000 (3.0) -testMatrix2x3(3) = 0x40800000 (4.0) -testMatrix2x3(4) = 0x40A00000 (5.0) -testMatrix2x3(5) = 0x40C00000 (6.0) +i0 = 0x3F800000 (1.0) +i1 = 0x40000000 (2.0) +i2 = 0x40400000 (3.0) +i3 = 0x40800000 (4.0) +i4 = 0x40A00000 (5.0) +i5 = 0x40C00000 (6.0) +i6 = 0x3F800000 (1.0) +i7 = 0x40400000 (3.0) +i8 = 0x40000000 (2.0) +i9 = 0x40800000 (4.0) +i10 = 0x3F800000 (1.0) +i11 = 0x40800000 (4.0) +i12 = 0x40000000 (2.0) +i13 = 0x40A00000 (5.0) +i14 = 0x40400000 (3.0) +i15 = 0x40C00000 (6.0) +i16 = 0x3F800000 (1.0) +i17 = 0x40800000 (4.0) +i18 = 0x40E00000 (7.0) +i19 = 0x40000000 (2.0) +i20 = 0x40A00000 (5.0) +i21 = 0x41000000 (8.0) +i22 = 0x40400000 (3.0) +i23 = 0x40C00000 (6.0) +i24 = 0x41100000 (9.0) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_4_uniforms $0..3 = testMatrix2x2 swizzle_3 $1..3 = ($1..3).yxz -copy_constant $4 = 0x3F800000 (1.0) -copy_constant $5 = 0x40400000 (3.0) -copy_constant $6 = 0x40000000 (2.0) -copy_constant $7 = 0x40800000 (4.0) +copy_4_immutables_unmasked $4..7 = i6..9 [0x3F800000 (1.0), 0x40400000 (3.0), 0x40000000 (2.0), 0x40800000 (4.0)] cmpeq_4_floats $0..3 = equal($0..3, $4..7) bitwise_and_2_ints $0..1 &= $2..3 bitwise_and_int $0 &= $1 -copy_4_slots_unmasked $1..4 = testMatrix2x3(0..3) -copy_2_slots_unmasked $5..6 = testMatrix2x3(4..5) +copy_4_immutables_unmasked $1..4 = i0..3 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] +copy_2_immutables_unmasked $5..6 = i4..5 [0x40A00000 (5.0), 0x40C00000 (6.0)] shuffle $2..6 = ($2..6)[2 0 3 1 4] -copy_constant $7 = 0x3F800000 (1.0) -copy_constant $8 = 0x40800000 (4.0) -copy_constant $9 = 0x40000000 (2.0) -copy_constant $10 = 0x40A00000 (5.0) -copy_constant $11 = 0x40400000 (3.0) -copy_constant $12 = 0x40C00000 (6.0) +copy_4_immutables_unmasked $7..10 = i10..13 [0x3F800000 (1.0), 0x40800000 (4.0), 0x40000000 (2.0), 0x40A00000 (5.0)] +copy_2_immutables_unmasked $11..12 = i14..15 [0x40400000 (3.0), 0x40C00000 (6.0)] cmpeq_n_floats $1..6 = equal($1..6, $7..12) bitwise_and_3_ints $1..3 &= $4..6 bitwise_and_int $2 &= $3 @@ -35,15 +49,9 @@ copy_4_uniforms $1..4 = testMatrix3x3(0..3) copy_4_uniforms $5..8 = testMatrix3x3(4..7) copy_uniform $9 = testMatrix3x3(8) shuffle $2..9 = ($2..9)[2 5 0 3 6 1 4 7] -copy_constant $10 = 0x3F800000 (1.0) -copy_constant $11 = 0x40800000 (4.0) -copy_constant $12 = 0x40E00000 (7.0) -copy_constant $13 = 0x40000000 (2.0) -copy_constant $14 = 0x40A00000 (5.0) -copy_constant $15 = 0x41000000 (8.0) -copy_constant $16 = 0x40400000 (3.0) -copy_constant $17 = 0x40C00000 (6.0) -copy_constant $18 = 0x41100000 (9.0) +copy_4_immutables_unmasked $10..13 = i16..19 [0x3F800000 (1.0), 0x40800000 (4.0), 0x40E00000 (7.0), 0x40000000 (2.0)] +copy_4_immutables_unmasked $14..17 = i20..23 [0x40A00000 (5.0), 0x41000000 (8.0), 0x40400000 (3.0), 0x40C00000 (6.0)] +copy_immutable_unmasked $18 = i24 [0x41100000 (9.0)] cmpeq_n_floats $1..9 = equal($1..9, $10..18) bitwise_and_4_ints $2..5 &= $6..9 bitwise_and_2_ints $2..3 &= $4..5 diff --git a/tests/sksl/intrinsics/Transpose.wgsl b/tests/sksl/intrinsics/Transpose.wgsl new file mode 100644 index 000000000000..c12c8b600794 --- /dev/null +++ b/tests/sksl/intrinsics/Transpose.wgsl @@ -0,0 +1,36 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + testMatrix2x2: mat2x2, + testMatrix3x3: mat3x3, + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var testMatrix2x3: mat2x3 = mat2x3(1.0, 2.0, 3.0, 4.0, 5.0, 6.0); + let _skTemp0 = transpose(_globalUniforms.testMatrix2x2); + let _skTemp1 = _skTemp0; + let _skTemp2 = mat2x2(1.0, 3.0, 2.0, 4.0); + let _skTemp3 = transpose(testMatrix2x3); + let _skTemp4 = _skTemp3; + let _skTemp5 = mat3x2(1.0, 4.0, 2.0, 5.0, 3.0, 6.0); + let _skTemp6 = transpose(_globalUniforms.testMatrix3x3); + let _skTemp7 = _skTemp6; + let _skTemp8 = mat3x3(1.0, 4.0, 7.0, 2.0, 5.0, 8.0, 3.0, 6.0, 9.0); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((all(_skTemp1[0] == _skTemp2[0]) && all(_skTemp1[1] == _skTemp2[1])) && (all(_skTemp4[0] == _skTemp5[0]) && all(_skTemp4[1] == _skTemp5[1]) && all(_skTemp4[2] == _skTemp5[2]))) && (all(_skTemp7[0] == _skTemp8[0]) && all(_skTemp7[1] == _skTemp8[1]) && all(_skTemp7[2] == _skTemp8[2])))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/intrinsics/Trunc.asm.frag b/tests/sksl/intrinsics/Trunc.asm.frag index 818bbfc4e02e..49b5917b1518 100644 --- a/tests/sksl/intrinsics/Trunc.asm.frag +++ b/tests/sksl/intrinsics/Trunc.asm.frag @@ -1,141 +1,141 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testInputs" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %27 RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %49 RelaxedPrecision -OpDecorate %51 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %63 RelaxedPrecision -OpDecorate %77 RelaxedPrecision -OpDecorate %80 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testInputs" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %27 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %49 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %63 RelaxedPrecision + OpDecorate %77 RelaxedPrecision + OpDecorate %80 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%false = OpConstantFalse %bool + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%float_n1 = OpConstant %float -1 -%42 = OpConstantComposite %v2float %float_n1 %float_0 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%54 = OpConstantComposite %v3float %float_n1 %float_0 %float_0 -%v3bool = OpTypeVector %bool 3 -%float_2 = OpConstant %float 2 -%65 = OpConstantComposite %v4float %float_n1 %float_0 %float_0 %float_2 -%v4bool = OpTypeVector %bool 4 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %float_n1 = OpConstant %float -1 + %42 = OpConstantComposite %v2float %float_n1 %float_0 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %54 = OpConstantComposite %v3float %float_n1 %float_0 %float_0 + %v3bool = OpTypeVector %bool 3 + %float_2 = OpConstant %float 2 + %65 = OpConstantComposite %v4float %float_n1 %float_0 %float_0 %float_2 + %v4bool = OpTypeVector %bool 4 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%70 = OpVariable %_ptr_Function_v4float Function -%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %28 -%33 = OpCompositeExtract %float %32 0 -%27 = OpExtInst %float %1 Trunc %33 -%35 = OpFOrdEqual %bool %27 %float_n1 -OpSelectionMerge %37 None -OpBranchConditional %35 %36 %37 -%36 = OpLabel -%39 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%40 = OpLoad %v4float %39 -%41 = OpVectorShuffle %v2float %40 %40 0 1 -%38 = OpExtInst %v2float %1 Trunc %41 -%43 = OpFOrdEqual %v2bool %38 %42 -%45 = OpAll %bool %43 -OpBranch %37 -%37 = OpLabel -%46 = OpPhi %bool %false %25 %45 %36 -OpSelectionMerge %48 None -OpBranchConditional %46 %47 %48 -%47 = OpLabel -%50 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%51 = OpLoad %v4float %50 -%52 = OpVectorShuffle %v3float %51 %51 0 1 2 -%49 = OpExtInst %v3float %1 Trunc %52 -%55 = OpFOrdEqual %v3bool %49 %54 -%57 = OpAll %bool %55 -OpBranch %48 -%48 = OpLabel -%58 = OpPhi %bool %false %37 %57 %47 -OpSelectionMerge %60 None -OpBranchConditional %58 %59 %60 -%59 = OpLabel -%62 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%63 = OpLoad %v4float %62 -%61 = OpExtInst %v4float %1 Trunc %63 -%66 = OpFOrdEqual %v4bool %61 %65 -%68 = OpAll %bool %66 -OpBranch %60 -%60 = OpLabel -%69 = OpPhi %bool %false %48 %68 %59 -OpSelectionMerge %74 None -OpBranchConditional %69 %72 %73 -%72 = OpLabel -%75 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%77 = OpLoad %v4float %75 -OpStore %70 %77 -OpBranch %74 -%73 = OpLabel -%78 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%80 = OpLoad %v4float %78 -OpStore %70 %80 -OpBranch %74 -%74 = OpLabel -%81 = OpLoad %v4float %70 -OpReturnValue %81 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %70 = OpVariable %_ptr_Function_v4float Function + %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %28 + %33 = OpCompositeExtract %float %32 0 + %27 = OpExtInst %float %1 Trunc %33 + %35 = OpFOrdEqual %bool %27 %float_n1 + OpSelectionMerge %37 None + OpBranchConditional %35 %36 %37 + %36 = OpLabel + %39 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %40 = OpLoad %v4float %39 + %41 = OpVectorShuffle %v2float %40 %40 0 1 + %38 = OpExtInst %v2float %1 Trunc %41 + %43 = OpFOrdEqual %v2bool %38 %42 + %45 = OpAll %bool %43 + OpBranch %37 + %37 = OpLabel + %46 = OpPhi %bool %false %25 %45 %36 + OpSelectionMerge %48 None + OpBranchConditional %46 %47 %48 + %47 = OpLabel + %50 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %51 = OpLoad %v4float %50 + %52 = OpVectorShuffle %v3float %51 %51 0 1 2 + %49 = OpExtInst %v3float %1 Trunc %52 + %55 = OpFOrdEqual %v3bool %49 %54 + %57 = OpAll %bool %55 + OpBranch %48 + %48 = OpLabel + %58 = OpPhi %bool %false %37 %57 %47 + OpSelectionMerge %60 None + OpBranchConditional %58 %59 %60 + %59 = OpLabel + %62 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %63 = OpLoad %v4float %62 + %61 = OpExtInst %v4float %1 Trunc %63 + %66 = OpFOrdEqual %v4bool %61 %65 + %68 = OpAll %bool %66 + OpBranch %60 + %60 = OpLabel + %69 = OpPhi %bool %false %48 %68 %59 + OpSelectionMerge %74 None + OpBranchConditional %69 %72 %73 + %72 = OpLabel + %75 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %77 = OpLoad %v4float %75 + OpStore %70 %77 + OpBranch %74 + %73 = OpLabel + %78 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %80 = OpLoad %v4float %78 + OpStore %70 %80 + OpBranch %74 + %74 = OpLabel + %81 = OpLoad %v4float %70 + OpReturnValue %81 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Trunc.skrp b/tests/sksl/intrinsics/Trunc.skrp index 91ef8779dcc2..8319d3582e3f 100644 --- a/tests/sksl/intrinsics/Trunc.skrp +++ b/tests/sksl/intrinsics/Trunc.skrp @@ -1,8 +1,10 @@ +34 instructions + [immutable slots] -expectedA(0) = 0xBF800000 (-1.0) -expectedA(1) = 0 -expectedA(2) = 0 -expectedA(3) = 0x40000000 (2.0) +i0 = 0xBF800000 (-1.0) +i1 = 0 +i2 = 0 +i3 = 0x40000000 (2.0) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -13,16 +15,14 @@ cmpeq_imm_float $4 = equal($4, 0xBF800000 (-1.0)) copy_2_uniforms $5..6 = testInputs(0..1) cast_to_int_from_2_floats $5..6 = FloatToInt($5..6) cast_to_float_from_2_ints $5..6 = IntToFloat($5..6) -copy_constant $7 = 0xBF800000 (-1.0) -copy_constant $8 = 0 +copy_2_immutables_unmasked $7..8 = i0..1 [0xBF800000 (-1.0), 0] cmpeq_2_floats $5..6 = equal($5..6, $7..8) bitwise_and_int $5 &= $6 bitwise_and_int $4 &= $5 copy_3_uniforms $5..7 = testInputs(0..2) cast_to_int_from_3_floats $5..7 = FloatToInt($5..7) cast_to_float_from_3_ints $5..7 = IntToFloat($5..7) -copy_constant $8 = 0xBF800000 (-1.0) -splat_2_constants $9..10 = 0 +copy_3_immutables_unmasked $8..10 = i0..2 [0xBF800000 (-1.0), 0, 0] cmpeq_3_floats $5..7 = equal($5..7, $8..10) bitwise_and_int $6 &= $7 bitwise_and_int $5 &= $6 @@ -30,14 +30,14 @@ bitwise_and_int $4 &= $5 copy_4_uniforms $5..8 = testInputs cast_to_int_from_4_floats $5..8 = FloatToInt($5..8) cast_to_float_from_4_ints $5..8 = IntToFloat($5..8) -copy_4_slots_unmasked $9..12 = expectedA +copy_4_immutables_unmasked $9..12 = i0..3 [0xBF800000 (-1.0), 0, 0, 0x40000000 (2.0)] cmpeq_4_floats $5..8 = equal($5..8, $9..12) bitwise_and_2_ints $5..6 &= $7..8 bitwise_and_int $5 &= $6 bitwise_and_int $4 &= $5 -branch_if_no_active_lanes_eq branch +3 (label 0 at #35) if no lanes of $4 == 0xFFFFFFFF +branch_if_no_active_lanes_eq branch +3 (label 0 at #33) if no lanes of $4 == 0xFFFFFFFF copy_4_uniforms $0..3 = colorGreen -jump jump +3 (label 1 at #37) +jump jump +3 (label 1 at #35) label label 0 copy_4_uniforms $0..3 = colorRed label label 0x00000001 diff --git a/tests/sksl/intrinsics/Trunc.wgsl b/tests/sksl/intrinsics/Trunc.wgsl new file mode 100644 index 000000000000..16905e03d6fe --- /dev/null +++ b/tests/sksl/intrinsics/Trunc.wgsl @@ -0,0 +1,30 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + testInputs: vec4, + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + const expectedA: vec4 = vec4(-1.0, 0.0, 0.0, 2.0); + let _skTemp0 = trunc(_globalUniforms.testInputs.x); + let _skTemp1 = trunc(_globalUniforms.testInputs.xy); + let _skTemp2 = trunc(_globalUniforms.testInputs.xyz); + let _skTemp3 = trunc(_globalUniforms.testInputs); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((f32(_skTemp0) == -1.0) && all(vec2(_skTemp1) == vec2(-1.0, 0.0))) && all(vec3(_skTemp2) == vec3(-1.0, 0.0, 0.0))) && all(vec4(_skTemp3) == expectedA))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/intrinsics/UintBitsToFloat.asm.frag b/tests/sksl/intrinsics/UintBitsToFloat.asm.frag index a0bc2afa6c55..3eb73c38282c 100644 --- a/tests/sksl/intrinsics/UintBitsToFloat.asm.frag +++ b/tests/sksl/intrinsics/UintBitsToFloat.asm.frag @@ -1,149 +1,149 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testMatrix2x2" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %inputVal "inputVal" -OpName %expectedB "expectedB" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 ColMajor -OpMemberDecorate %_UniformBuffer 0 MatrixStride 16 -OpMemberDecorate %_UniformBuffer 1 Offset 32 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 48 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %91 RelaxedPrecision -OpDecorate %94 RelaxedPrecision -OpDecorate %95 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testMatrix2x2" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %inputVal "inputVal" + OpName %expectedB "expectedB" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 ColMajor + OpMemberDecorate %_UniformBuffer 0 MatrixStride 16 + OpMemberDecorate %_UniformBuffer 1 Offset 32 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 48 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %91 RelaxedPrecision + OpDecorate %94 RelaxedPrecision + OpDecorate %95 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%v2float = OpTypeVector %float 2 + %v2float = OpTypeVector %float 2 %mat2v2float = OpTypeMatrix %v2float 2 %_UniformBuffer = OpTypeStruct %mat2v2float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%17 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%20 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %17 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %20 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%24 = OpTypeFunction %v4float %_ptr_Function_v2float + %24 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_mat2v2float = OpTypePointer Uniform %mat2v2float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%float_1 = OpConstant %float 1 -%float_n1 = OpConstant %float -1 -%41 = OpConstantComposite %v4float %float_1 %float_1 %float_n1 %float_n1 -%uint = OpTypeInt 32 0 -%v4uint = OpTypeVector %uint 4 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %float_1 = OpConstant %float 1 + %float_n1 = OpConstant %float -1 + %41 = OpConstantComposite %v4float %float_1 %float_1 %float_n1 %float_n1 + %uint = OpTypeInt 32 0 + %v4uint = OpTypeVector %uint 4 %_ptr_Function_v4uint = OpTypePointer Function %v4uint %uint_1065353216 = OpConstant %uint 1065353216 %uint_1073741824 = OpConstant %uint 1073741824 %uint_3225419776 = OpConstant %uint 3225419776 %uint_3229614080 = OpConstant %uint 3229614080 -%51 = OpConstantComposite %v4uint %uint_1065353216 %uint_1073741824 %uint_3225419776 %uint_3229614080 -%false = OpConstantFalse %bool -%v2uint = OpTypeVector %uint 2 -%v2bool = OpTypeVector %bool 2 -%v3float = OpTypeVector %float 3 -%v3uint = OpTypeVector %uint 3 -%v3bool = OpTypeVector %bool 3 -%v4bool = OpTypeVector %bool 4 + %51 = OpConstantComposite %v4uint %uint_1065353216 %uint_1073741824 %uint_3225419776 %uint_3229614080 + %false = OpConstantFalse %bool + %v2uint = OpTypeVector %uint 2 + %v2bool = OpTypeVector %bool 2 + %v3float = OpTypeVector %float 3 + %v3uint = OpTypeVector %uint 3 + %v3bool = OpTypeVector %bool 3 + %v4bool = OpTypeVector %bool 4 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %17 -%18 = OpLabel -%21 = OpVariable %_ptr_Function_v2float Function -OpStore %21 %20 -%23 = OpFunctionCall %v4float %main %21 -OpStore %sk_FragColor %23 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %24 -%25 = OpFunctionParameter %_ptr_Function_v2float -%26 = OpLabel -%inputVal = OpVariable %_ptr_Function_v4float Function -%expectedB = OpVariable %_ptr_Function_v4uint Function -%84 = OpVariable %_ptr_Function_v4float Function -%29 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_0 -%33 = OpLoad %mat2v2float %29 -%34 = OpCompositeExtract %float %33 0 0 -%35 = OpCompositeExtract %float %33 0 1 -%36 = OpCompositeExtract %float %33 1 0 -%37 = OpCompositeExtract %float %33 1 1 -%38 = OpCompositeConstruct %v4float %34 %35 %36 %37 -%42 = OpFMul %v4float %38 %41 -OpStore %inputVal %42 -OpStore %expectedB %51 -%53 = OpCompositeExtract %float %42 0 -%54 = OpBitcast %float %uint_1065353216 -%55 = OpFOrdEqual %bool %53 %54 -OpSelectionMerge %57 None -OpBranchConditional %55 %56 %57 -%56 = OpLabel -%58 = OpVectorShuffle %v2float %42 %42 0 1 -%60 = OpVectorShuffle %v2uint %51 %51 0 1 -%59 = OpBitcast %v2float %60 -%62 = OpFOrdEqual %v2bool %58 %59 -%64 = OpAll %bool %62 -OpBranch %57 -%57 = OpLabel -%65 = OpPhi %bool %false %26 %64 %56 -OpSelectionMerge %67 None -OpBranchConditional %65 %66 %67 -%66 = OpLabel -%68 = OpVectorShuffle %v3float %42 %42 0 1 2 -%71 = OpVectorShuffle %v3uint %51 %51 0 1 2 -%70 = OpBitcast %v3float %71 -%73 = OpFOrdEqual %v3bool %68 %70 -%75 = OpAll %bool %73 -OpBranch %67 -%67 = OpLabel -%76 = OpPhi %bool %false %57 %75 %66 -OpSelectionMerge %78 None -OpBranchConditional %76 %77 %78 -%77 = OpLabel -%79 = OpBitcast %v4float %51 -%80 = OpFOrdEqual %v4bool %42 %79 -%82 = OpAll %bool %80 -OpBranch %78 -%78 = OpLabel -%83 = OpPhi %bool %false %67 %82 %77 -OpSelectionMerge %87 None -OpBranchConditional %83 %85 %86 -%85 = OpLabel -%88 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%91 = OpLoad %v4float %88 -OpStore %84 %91 -OpBranch %87 -%86 = OpLabel -%92 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%94 = OpLoad %v4float %92 -OpStore %84 %94 -OpBranch %87 -%87 = OpLabel -%95 = OpLoad %v4float %84 -OpReturnValue %95 -OpFunctionEnd + %18 = OpLabel + %21 = OpVariable %_ptr_Function_v2float Function + OpStore %21 %20 + %23 = OpFunctionCall %v4float %main %21 + OpStore %sk_FragColor %23 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %24 + %25 = OpFunctionParameter %_ptr_Function_v2float + %26 = OpLabel + %inputVal = OpVariable %_ptr_Function_v4float Function + %expectedB = OpVariable %_ptr_Function_v4uint Function + %84 = OpVariable %_ptr_Function_v4float Function + %29 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_0 + %33 = OpLoad %mat2v2float %29 + %34 = OpCompositeExtract %float %33 0 0 + %35 = OpCompositeExtract %float %33 0 1 + %36 = OpCompositeExtract %float %33 1 0 + %37 = OpCompositeExtract %float %33 1 1 + %38 = OpCompositeConstruct %v4float %34 %35 %36 %37 + %42 = OpFMul %v4float %38 %41 + OpStore %inputVal %42 + OpStore %expectedB %51 + %53 = OpCompositeExtract %float %42 0 + %54 = OpBitcast %float %uint_1065353216 + %55 = OpFOrdEqual %bool %53 %54 + OpSelectionMerge %57 None + OpBranchConditional %55 %56 %57 + %56 = OpLabel + %58 = OpVectorShuffle %v2float %42 %42 0 1 + %60 = OpVectorShuffle %v2uint %51 %51 0 1 + %59 = OpBitcast %v2float %60 + %62 = OpFOrdEqual %v2bool %58 %59 + %64 = OpAll %bool %62 + OpBranch %57 + %57 = OpLabel + %65 = OpPhi %bool %false %26 %64 %56 + OpSelectionMerge %67 None + OpBranchConditional %65 %66 %67 + %66 = OpLabel + %68 = OpVectorShuffle %v3float %42 %42 0 1 2 + %71 = OpVectorShuffle %v3uint %51 %51 0 1 2 + %70 = OpBitcast %v3float %71 + %73 = OpFOrdEqual %v3bool %68 %70 + %75 = OpAll %bool %73 + OpBranch %67 + %67 = OpLabel + %76 = OpPhi %bool %false %57 %75 %66 + OpSelectionMerge %78 None + OpBranchConditional %76 %77 %78 + %77 = OpLabel + %79 = OpBitcast %v4float %51 + %80 = OpFOrdEqual %v4bool %42 %79 + %82 = OpAll %bool %80 + OpBranch %78 + %78 = OpLabel + %83 = OpPhi %bool %false %67 %82 %77 + OpSelectionMerge %87 None + OpBranchConditional %83 %85 %86 + %85 = OpLabel + %88 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %91 = OpLoad %v4float %88 + OpStore %84 %91 + OpBranch %87 + %86 = OpLabel + %92 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %94 = OpLoad %v4float %92 + OpStore %84 %94 + OpBranch %87 + %87 = OpLabel + %95 = OpLoad %v4float %84 + OpReturnValue %95 + OpFunctionEnd diff --git a/tests/sksl/intrinsics/UintBitsToFloat.skrp b/tests/sksl/intrinsics/UintBitsToFloat.skrp index f1534f543be4..208fc9620de8 100644 --- a/tests/sksl/intrinsics/UintBitsToFloat.skrp +++ b/tests/sksl/intrinsics/UintBitsToFloat.skrp @@ -1,32 +1,36 @@ +30 instructions + [immutable slots] -expectedB(0) = 0x3F800000 (1.0) -expectedB(1) = 0x40000000 (2.0) -expectedB(2) = 0xC0400000 (-3.0) -expectedB(3) = 0xC0800000 (-4.0) +i0 = 0x3F800000 (1.0) +i1 = 0x3F800000 (1.0) +i2 = 0xBF800000 (-1.0) +i3 = 0xBF800000 (-1.0) +i4 = 0x3F800000 (1.0) +i5 = 0x40000000 (2.0) +i6 = 0xC0400000 (-3.0) +i7 = 0xC0800000 (-4.0) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_4_uniforms $0..3 = testMatrix2x2 -splat_2_constants $4..5 = 0x3F800000 (1.0) -splat_2_constants $6..7 = 0xBF800000 (-1.0) +copy_4_immutables_unmasked $4..7 = i0..3 [0x3F800000 (1.0), 0x3F800000 (1.0), 0xBF800000 (-1.0), 0xBF800000 (-1.0)] mul_4_floats $0..3 *= $4..7 copy_4_slots_unmasked inputVal = $0..3 copy_slot_unmasked $0 = inputVal(0) -copy_slot_unmasked $1 = expectedB(0) -cmpeq_float $0 = equal($0, $1) +cmpeq_imm_float $0 = equal($0, 0x3F800000 (1.0)) copy_2_slots_unmasked $1..2 = inputVal(0..1) -copy_2_slots_unmasked $3..4 = expectedB(0..1) +copy_2_immutables_unmasked $3..4 = i4..5 [0x3F800000 (1.0), 0x40000000 (2.0)] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_3_slots_unmasked $1..3 = inputVal(0..2) -copy_3_slots_unmasked $4..6 = expectedB(0..2) +copy_3_immutables_unmasked $4..6 = i4..6 [0x3F800000 (1.0), 0x40000000 (2.0), 0xC0400000 (-3.0)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_4_slots_unmasked $1..4 = inputVal -copy_4_slots_unmasked $5..8 = expectedB +copy_4_immutables_unmasked $5..8 = i4..7 [0x3F800000 (1.0), 0x40000000 (2.0), 0xC0400000 (-3.0), 0xC0800000 (-4.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 diff --git a/tests/sksl/intrinsics/UintBitsToFloat.wgsl b/tests/sksl/intrinsics/UintBitsToFloat.wgsl new file mode 100644 index 000000000000..d0e5d9d5a1ed --- /dev/null +++ b/tests/sksl/intrinsics/UintBitsToFloat.wgsl @@ -0,0 +1,40 @@ +### Compilation failed: + +error: :20:20 error: unresolved call target 'uintBitsToFloat' + let _skTemp0 = uintBitsToFloat(expectedB.x); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + testMatrix2x2: mat2x2, + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var inputVal: vec4 = vec4(_globalUniforms.testMatrix2x2[0], _globalUniforms.testMatrix2x2[1]) * vec4(1.0, 1.0, -1.0, -1.0); + var expectedB: vec4 = vec4(1065353216u, 1073741824u, 3225419776u, 3229614080u); + let _skTemp0 = uintBitsToFloat(expectedB.x); + let _skTemp1 = uintBitsToFloat(expectedB.xy); + let _skTemp2 = uintBitsToFloat(expectedB.xyz); + let _skTemp3 = uintBitsToFloat(expectedB); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((inputVal.x == _skTemp0) && all(inputVal.xy == _skTemp1)) && all(inputVal.xyz == _skTemp2)) && all(inputVal == _skTemp3))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} + +1 error diff --git a/tests/sksl/intrinsics/Unpack.asm.frag b/tests/sksl/intrinsics/Unpack.asm.frag index 82eda7e0dfdf..a19b7ed7a94d 100644 --- a/tests/sksl/intrinsics/Unpack.asm.frag +++ b/tests/sksl/intrinsics/Unpack.asm.frag @@ -1,71 +1,71 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "a" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %24 RelaxedPrecision -OpDecorate %25 RelaxedPrecision -OpDecorate %29 RelaxedPrecision -OpDecorate %30 RelaxedPrecision -OpDecorate %34 RelaxedPrecision -OpDecorate %35 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "a" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %24 RelaxedPrecision + OpDecorate %25 RelaxedPrecision + OpDecorate %29 RelaxedPrecision + OpDecorate %30 RelaxedPrecision + OpDecorate %34 RelaxedPrecision + OpDecorate %35 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%uint = OpTypeInt 32 0 + %uint = OpTypeInt 32 0 %_UniformBuffer = OpTypeStruct %uint %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void %_ptr_Uniform_uint = OpTypePointer Uniform %uint -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%v2float = OpTypeVector %float 2 -%main = OpFunction %void None %15 -%16 = OpLabel -%18 = OpAccessChain %_ptr_Uniform_uint %10 %int_0 -%22 = OpLoad %uint %18 -%17 = OpExtInst %v2float %1 UnpackHalf2x16 %22 -%24 = OpLoad %v4float %sk_FragColor -%25 = OpVectorShuffle %v4float %24 %17 4 5 2 3 -OpStore %sk_FragColor %25 -%27 = OpAccessChain %_ptr_Uniform_uint %10 %int_0 -%28 = OpLoad %uint %27 -%26 = OpExtInst %v2float %1 UnpackUnorm2x16 %28 -%29 = OpLoad %v4float %sk_FragColor -%30 = OpVectorShuffle %v4float %29 %26 4 5 2 3 -OpStore %sk_FragColor %30 -%32 = OpAccessChain %_ptr_Uniform_uint %10 %int_0 -%33 = OpLoad %uint %32 -%31 = OpExtInst %v2float %1 UnpackSnorm2x16 %33 -%34 = OpLoad %v4float %sk_FragColor -%35 = OpVectorShuffle %v4float %34 %31 4 5 2 3 -OpStore %sk_FragColor %35 -%37 = OpAccessChain %_ptr_Uniform_uint %10 %int_0 -%38 = OpLoad %uint %37 -%36 = OpExtInst %v4float %1 UnpackUnorm4x8 %38 -OpStore %sk_FragColor %36 -%40 = OpAccessChain %_ptr_Uniform_uint %10 %int_0 -%41 = OpLoad %uint %40 -%39 = OpExtInst %v4float %1 UnpackSnorm4x8 %41 -OpStore %sk_FragColor %39 -OpReturn -OpFunctionEnd + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %v2float = OpTypeVector %float 2 + %main = OpFunction %void None %15 + %16 = OpLabel + %18 = OpAccessChain %_ptr_Uniform_uint %10 %int_0 + %22 = OpLoad %uint %18 + %17 = OpExtInst %v2float %1 UnpackHalf2x16 %22 + %24 = OpLoad %v4float %sk_FragColor + %25 = OpVectorShuffle %v4float %24 %17 4 5 2 3 + OpStore %sk_FragColor %25 + %27 = OpAccessChain %_ptr_Uniform_uint %10 %int_0 + %28 = OpLoad %uint %27 + %26 = OpExtInst %v2float %1 UnpackUnorm2x16 %28 + %29 = OpLoad %v4float %sk_FragColor + %30 = OpVectorShuffle %v4float %29 %26 4 5 2 3 + OpStore %sk_FragColor %30 + %32 = OpAccessChain %_ptr_Uniform_uint %10 %int_0 + %33 = OpLoad %uint %32 + %31 = OpExtInst %v2float %1 UnpackSnorm2x16 %33 + %34 = OpLoad %v4float %sk_FragColor + %35 = OpVectorShuffle %v4float %34 %31 4 5 2 3 + OpStore %sk_FragColor %35 + %37 = OpAccessChain %_ptr_Uniform_uint %10 %int_0 + %38 = OpLoad %uint %37 + %36 = OpExtInst %v4float %1 UnpackUnorm4x8 %38 + OpStore %sk_FragColor %36 + %40 = OpAccessChain %_ptr_Uniform_uint %10 %int_0 + %41 = OpLoad %uint %40 + %39 = OpExtInst %v4float %1 UnpackSnorm4x8 %41 + OpStore %sk_FragColor %39 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/intrinsics/Unpack.wgsl b/tests/sksl/intrinsics/Unpack.wgsl new file mode 100644 index 000000000000..46142e9dac42 --- /dev/null +++ b/tests/sksl/intrinsics/Unpack.wgsl @@ -0,0 +1,39 @@ +### Compilation failed: + +error: :14:20 error: unresolved call target 'unpackHalf2x16' + let _skTemp0 = unpackHalf2x16(_globalUniforms.a); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + a: u32, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_stageOut: ptr) { + { + let _skTemp0 = unpackHalf2x16(_globalUniforms.a); + (*_stageOut).sk_FragColor = vec4((vec2(_skTemp0)), (*_stageOut).sk_FragColor.zw).xyzw; + let _skTemp1 = unpackUnorm2x16(_globalUniforms.a); + (*_stageOut).sk_FragColor = vec4((vec2(_skTemp1)), (*_stageOut).sk_FragColor.zw).xyzw; + let _skTemp2 = unpackSnorm2x16(_globalUniforms.a); + (*_stageOut).sk_FragColor = vec4((vec2(_skTemp2)), (*_stageOut).sk_FragColor.zw).xyzw; + let _skTemp3 = unpackUnorm4x8(_globalUniforms.a); + (*_stageOut).sk_FragColor = vec4(_skTemp3); + let _skTemp4 = unpackSnorm4x8(_globalUniforms.a); + (*_stageOut).sk_FragColor = vec4(_skTemp4); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(&_stageOut); + return _stageOut; +} + +1 error diff --git a/tests/sksl/metal/OutParams.metal b/tests/sksl/metal/OutParams.metal index 92efc124629d..20207d8a6217 100644 --- a/tests/sksl/metal/OutParams.metal +++ b/tests/sksl/metal/OutParams.metal @@ -6,256 +6,6 @@ struct Inputs { struct Outputs { half4 sk_FragColor [[color(0)]]; }; -void out_half_vh(thread half& v); -void _skOutParamHelper0_out_half_vh(thread half& h) { - half _var0; - out_half_vh(_var0); - h = _var0; -} -void out_half2_vh2(thread half2& v); -void _skOutParamHelper1_out_half2_vh2(thread half2& h2) { - half2 _var0; - out_half2_vh2(_var0); - h2 = _var0; -} -void out_half3_vh3(thread half3& v); -void _skOutParamHelper2_out_half3_vh3(thread half3& h3) { - half3 _var0; - out_half3_vh3(_var0); - h3 = _var0; -} -void out_half4_vh4(thread half4& v); -void _skOutParamHelper3_out_half4_vh4(thread half4& h4) { - half4 _var0; - out_half4_vh4(_var0); - h4 = _var0; -} -void out_half_vh(thread half& v); -void _skOutParamHelper4_out_half_vh(thread half3& h3) { - half _var0; - out_half_vh(_var0); - h3.y = _var0; -} -void out_half2_vh2(thread half2& v); -void _skOutParamHelper5_out_half2_vh2(thread half3& h3) { - half2 _var0; - out_half2_vh2(_var0); - h3.xz = _var0; -} -void out_half4_vh4(thread half4& v); -void _skOutParamHelper6_out_half4_vh4(thread half4& h4) { - half4 _var0; - out_half4_vh4(_var0); - h4.zwxy = _var0; -} -void out_pair_vhh(thread half& v1, thread half& v2); -void _skOutParamHelper7_out_pair_vhh(thread half& h, thread half& h1) { - half _var0; - half _var1; - out_pair_vhh(_var0, _var1); - h = _var0; - h1 = _var1; -} -void out_pair_vhh(thread half& v1, thread half& v2); -void _skOutParamHelper8_out_pair_vhh(thread half& h, thread half&) { - half _var0; - half _var1; - out_pair_vhh(_var0, _var1); - h = _var0; - h = _var1; -} -void out_pair_vhh(thread half& v1, thread half& v2); -void _skOutParamHelper9_out_pair_vhh(thread half2& h2, thread half2&) { - half _var0; - half _var1; - out_pair_vhh(_var0, _var1); - h2.x = _var0; - h2.y = _var1; -} -void out_pair_vhh(thread half& v1, thread half& v2); -void _skOutParamHelper10_out_pair_vhh(thread half2& h2, thread half2&) { - half _var0; - half _var1; - out_pair_vhh(_var0, _var1); - h2.x = _var0; - h2.x = _var1; -} -void out_pair_vhh(thread half& v1, thread half& v2); -void _skOutParamHelper11_out_pair_vhh(thread half2& h2, thread half3& h3) { - half _var0; - half _var1; - out_pair_vhh(_var0, _var1); - h2.x = _var0; - h3.x = _var1; -} -void out_half2x2_vh22(thread half2x2& v); -void _skOutParamHelper12_out_half2x2_vh22(thread half2x2& h2x2) { - half2x2 _var0; - out_half2x2_vh22(_var0); - h2x2 = _var0; -} -void out_half3x3_vh33(thread half3x3& v); -void _skOutParamHelper13_out_half3x3_vh33(thread half3x3& h3x3) { - half3x3 _var0; - out_half3x3_vh33(_var0); - h3x3 = _var0; -} -void out_half4x4_vh44(thread half4x4& v); -void _skOutParamHelper14_out_half4x4_vh44(thread half4x4& h4x4) { - half4x4 _var0; - out_half4x4_vh44(_var0); - h4x4 = _var0; -} -void out_half3_vh3(thread half3& v); -void _skOutParamHelper15_out_half3_vh3(thread half3x3& h3x3) { - half3 _var0; - out_half3_vh3(_var0); - h3x3[1] = _var0; -} -void out_half4_vh4(thread half4& v); -void _skOutParamHelper16_out_half4_vh4(thread half4x4& h4x4) { - half4 _var0; - out_half4_vh4(_var0); - h4x4[3].zwxy = _var0; -} -void out_half2_vh2(thread half2& v); -void _skOutParamHelper17_out_half2_vh2(thread half2x2& h2x2) { - half2 _var0; - out_half2_vh2(_var0); - h2x2[0] = _var0; -} -void out_int_vi(thread int& v); -void _skOutParamHelper18_out_int_vi(thread int& i) { - int _var0; - out_int_vi(_var0); - i = _var0; -} -void out_int2_vi2(thread int2& v); -void _skOutParamHelper19_out_int2_vi2(thread int2& i2) { - int2 _var0; - out_int2_vi2(_var0); - i2 = _var0; -} -void out_int3_vi3(thread int3& v); -void _skOutParamHelper20_out_int3_vi3(thread int3& i3) { - int3 _var0; - out_int3_vi3(_var0); - i3 = _var0; -} -void out_int4_vi4(thread int4& v); -void _skOutParamHelper21_out_int4_vi4(thread int4& i4) { - int4 _var0; - out_int4_vi4(_var0); - i4 = _var0; -} -void out_int3_vi3(thread int3& v); -void _skOutParamHelper22_out_int3_vi3(thread int4& i4) { - int3 _var0; - out_int3_vi3(_var0); - i4.xyz = _var0; -} -void out_float_vf(thread float& v); -void _skOutParamHelper23_out_float_vf(thread float& f) { - float _var0; - out_float_vf(_var0); - f = _var0; -} -void out_float2_vf2(thread float2& v); -void _skOutParamHelper24_out_float2_vf2(thread float2& f2) { - float2 _var0; - out_float2_vf2(_var0); - f2 = _var0; -} -void out_float3_vf3(thread float3& v); -void _skOutParamHelper25_out_float3_vf3(thread float3& f3) { - float3 _var0; - out_float3_vf3(_var0); - f3 = _var0; -} -void out_float4_vf4(thread float4& v); -void _skOutParamHelper26_out_float4_vf4(thread float4& f4) { - float4 _var0; - out_float4_vf4(_var0); - f4 = _var0; -} -void out_float2_vf2(thread float2& v); -void _skOutParamHelper27_out_float2_vf2(thread float3& f3) { - float2 _var0; - out_float2_vf2(_var0); - f3.xy = _var0; -} -void out_float_vf(thread float& v); -void _skOutParamHelper28_out_float_vf(thread float2& f2) { - float _var0; - out_float_vf(_var0); - f2.x = _var0; -} -void out_float2x2_vf22(thread float2x2& v); -void _skOutParamHelper29_out_float2x2_vf22(thread float2x2& f2x2) { - float2x2 _var0; - out_float2x2_vf22(_var0); - f2x2 = _var0; -} -void out_float3x3_vf33(thread float3x3& v); -void _skOutParamHelper30_out_float3x3_vf33(thread float3x3& f3x3) { - float3x3 _var0; - out_float3x3_vf33(_var0); - f3x3 = _var0; -} -void out_float4x4_vf44(thread float4x4& v); -void _skOutParamHelper31_out_float4x4_vf44(thread float4x4& f4x4) { - float4x4 _var0; - out_float4x4_vf44(_var0); - f4x4 = _var0; -} -void out_float_vf(thread float& v); -void _skOutParamHelper32_out_float_vf(thread float2x2& f2x2) { - float _var0; - out_float_vf(_var0); - f2x2[0].x = _var0; -} -void out_float4_vf4(thread float4& v); -void _skOutParamHelper33_out_float4_vf4(thread float4x4& f4x4) { - float4 _var0; - out_float4_vf4(_var0); - f4x4[1] = _var0; -} -void out_bool_vb(thread bool& v); -void _skOutParamHelper34_out_bool_vb(thread bool& b) { - bool _var0; - out_bool_vb(_var0); - b = _var0; -} -void out_bool2_vb2(thread bool2& v); -void _skOutParamHelper35_out_bool2_vb2(thread bool2& b2) { - bool2 _var0; - out_bool2_vb2(_var0); - b2 = _var0; -} -void out_bool3_vb3(thread bool3& v); -void _skOutParamHelper36_out_bool3_vb3(thread bool3& b3) { - bool3 _var0; - out_bool3_vb3(_var0); - b3 = _var0; -} -void out_bool4_vb4(thread bool4& v); -void _skOutParamHelper37_out_bool4_vb4(thread bool4& b4) { - bool4 _var0; - out_bool4_vb4(_var0); - b4 = _var0; -} -void out_bool2_vb2(thread bool2& v); -void _skOutParamHelper38_out_bool2_vb2(thread bool4& b4) { - bool2 _var0; - out_bool2_vb2(_var0); - b4.xw = _var0; -} -void out_bool_vb(thread bool& v); -void _skOutParamHelper39_out_bool_vb(thread bool3& b3) { - bool _var0; - out_bool_vb(_var0); - b3.z = _var0; -} void out_half_vh(thread half& v) { v = 1.0h; } @@ -329,74 +79,119 @@ void out_pair_vhh(thread half& v1, thread half& v2) { fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) { Outputs _out; (void)_out; + half _skTemp0; + half2 _skTemp1; + half3 _skTemp2; + half4 _skTemp3; + half _skTemp4; + half2 _skTemp5; + half4 _skTemp6; + half _skTemp7; + half _skTemp8; + half _skTemp9; + half _skTemp10; + half _skTemp11; + half _skTemp12; + half _skTemp13; + half _skTemp14; + half _skTemp15; + half _skTemp16; + half2x2 _skTemp17; + half3x3 _skTemp18; + half4x4 _skTemp19; + half3 _skTemp20; + half4 _skTemp21; + half2 _skTemp22; + int _skTemp23; + int2 _skTemp24; + int3 _skTemp25; + int4 _skTemp26; + int3 _skTemp27; + float _skTemp28; + float2 _skTemp29; + float3 _skTemp30; + float4 _skTemp31; + float2 _skTemp32; + float _skTemp33; + float2x2 _skTemp34; + float3x3 _skTemp35; + float4x4 _skTemp36; + float _skTemp37; + float4 _skTemp38; + bool _skTemp39; + bool2 _skTemp40; + bool3 _skTemp41; + bool4 _skTemp42; + bool2 _skTemp43; + bool _skTemp44; half h; - _skOutParamHelper0_out_half_vh(h); + ((out_half_vh(_skTemp0)), (h = _skTemp0)); half2 h2; - _skOutParamHelper1_out_half2_vh2(h2); + ((out_half2_vh2(_skTemp1)), (h2 = _skTemp1)); half3 h3; - _skOutParamHelper2_out_half3_vh3(h3); + ((out_half3_vh3(_skTemp2)), (h3 = _skTemp2)); half4 h4; - _skOutParamHelper3_out_half4_vh4(h4); - _skOutParamHelper4_out_half_vh(h3); - _skOutParamHelper5_out_half2_vh2(h3); - _skOutParamHelper6_out_half4_vh4(h4); + ((out_half4_vh4(_skTemp3)), (h4 = _skTemp3)); + ((out_half_vh(_skTemp4)), (h3.y = _skTemp4)); + ((out_half2_vh2(_skTemp5)), (h3.xz = _skTemp5)); + ((out_half4_vh4(_skTemp6)), (h4.zwxy = _skTemp6)); _out.sk_FragColor = half4(h, h2.x, h3.x, h4.x); half h1; - _skOutParamHelper7_out_pair_vhh(h, h1); - _skOutParamHelper8_out_pair_vhh(h, h); - _skOutParamHelper9_out_pair_vhh(h2, h2); - _skOutParamHelper10_out_pair_vhh(h2, h2); - _skOutParamHelper11_out_pair_vhh(h2, h3); + ((out_pair_vhh(_skTemp7, _skTemp8)), (h = _skTemp7), (h1 = _skTemp8)); + ((out_pair_vhh(_skTemp9, _skTemp10)), (h = _skTemp9), (h = _skTemp10)); + ((out_pair_vhh(_skTemp11, _skTemp12)), (h2.x = _skTemp11), (h2.y = _skTemp12)); + ((out_pair_vhh(_skTemp13, _skTemp14)), (h2.x = _skTemp13), (h2.x = _skTemp14)); + ((out_pair_vhh(_skTemp15, _skTemp16)), (h2.x = _skTemp15), (h3.x = _skTemp16)); half2x2 h2x2; - _skOutParamHelper12_out_half2x2_vh22(h2x2); + ((out_half2x2_vh22(_skTemp17)), (h2x2 = _skTemp17)); half3x3 h3x3; - _skOutParamHelper13_out_half3x3_vh33(h3x3); + ((out_half3x3_vh33(_skTemp18)), (h3x3 = _skTemp18)); half4x4 h4x4; - _skOutParamHelper14_out_half4x4_vh44(h4x4); - _skOutParamHelper15_out_half3_vh3(h3x3); - _skOutParamHelper16_out_half4_vh4(h4x4); - _skOutParamHelper17_out_half2_vh2(h2x2); + ((out_half4x4_vh44(_skTemp19)), (h4x4 = _skTemp19)); + ((out_half3_vh3(_skTemp20)), (h3x3[1] = _skTemp20)); + ((out_half4_vh4(_skTemp21)), (h4x4[3].zwxy = _skTemp21)); + ((out_half2_vh2(_skTemp22)), (h2x2[0] = _skTemp22)); _out.sk_FragColor = half4(h2x2[0].x, h3x3[0].x, h4x4[0].x, 1.0h); int i; - _skOutParamHelper18_out_int_vi(i); + ((out_int_vi(_skTemp23)), (i = _skTemp23)); int2 i2; - _skOutParamHelper19_out_int2_vi2(i2); + ((out_int2_vi2(_skTemp24)), (i2 = _skTemp24)); int3 i3; - _skOutParamHelper20_out_int3_vi3(i3); + ((out_int3_vi3(_skTemp25)), (i3 = _skTemp25)); int4 i4; - _skOutParamHelper21_out_int4_vi4(i4); - _skOutParamHelper22_out_int3_vi3(i4); + ((out_int4_vi4(_skTemp26)), (i4 = _skTemp26)); + ((out_int3_vi3(_skTemp27)), (i4.xyz = _skTemp27)); _out.sk_FragColor = half4(half(i), half(i2.x), half(i3.x), half(i4.x)); float f; - _skOutParamHelper23_out_float_vf(f); + ((out_float_vf(_skTemp28)), (f = _skTemp28)); float2 f2; - _skOutParamHelper24_out_float2_vf2(f2); + ((out_float2_vf2(_skTemp29)), (f2 = _skTemp29)); float3 f3; - _skOutParamHelper25_out_float3_vf3(f3); + ((out_float3_vf3(_skTemp30)), (f3 = _skTemp30)); float4 f4; - _skOutParamHelper26_out_float4_vf4(f4); - _skOutParamHelper27_out_float2_vf2(f3); - _skOutParamHelper28_out_float_vf(f2); + ((out_float4_vf4(_skTemp31)), (f4 = _skTemp31)); + ((out_float2_vf2(_skTemp32)), (f3.xy = _skTemp32)); + ((out_float_vf(_skTemp33)), (f2.x = _skTemp33)); _out.sk_FragColor = half4(half(f), half(f2.x), half(f3.x), half(f4.x)); float2x2 f2x2; - _skOutParamHelper29_out_float2x2_vf22(f2x2); + ((out_float2x2_vf22(_skTemp34)), (f2x2 = _skTemp34)); float3x3 f3x3; - _skOutParamHelper30_out_float3x3_vf33(f3x3); + ((out_float3x3_vf33(_skTemp35)), (f3x3 = _skTemp35)); float4x4 f4x4; - _skOutParamHelper31_out_float4x4_vf44(f4x4); - _skOutParamHelper32_out_float_vf(f2x2); - _skOutParamHelper33_out_float4_vf4(f4x4); + ((out_float4x4_vf44(_skTemp36)), (f4x4 = _skTemp36)); + ((out_float_vf(_skTemp37)), (f2x2[0].x = _skTemp37)); + ((out_float4_vf4(_skTemp38)), (f4x4[1] = _skTemp38)); _out.sk_FragColor = half4(half(f2x2[0].x), half(f3x3[0].x), half(f4x4[0].x), 1.0h); bool b; - _skOutParamHelper34_out_bool_vb(b); + ((out_bool_vb(_skTemp39)), (b = _skTemp39)); bool2 b2; - _skOutParamHelper35_out_bool2_vb2(b2); + ((out_bool2_vb2(_skTemp40)), (b2 = _skTemp40)); bool3 b3; - _skOutParamHelper36_out_bool3_vb3(b3); + ((out_bool3_vb3(_skTemp41)), (b3 = _skTemp41)); bool4 b4; - _skOutParamHelper37_out_bool4_vb4(b4); - _skOutParamHelper38_out_bool2_vb2(b4); - _skOutParamHelper39_out_bool_vb(b3); + ((out_bool4_vb4(_skTemp42)), (b4 = _skTemp42)); + ((out_bool2_vb2(_skTemp43)), (b4.xw = _skTemp43)); + ((out_bool_vb(_skTemp44)), (b3.z = _skTemp44)); _out.sk_FragColor = half4(half(b), half(b2.x), half(b3.x), half(b4.x)); return _out; } diff --git a/tests/sksl/metal/SwizzleHelper.metal b/tests/sksl/metal/SwizzleHelper.metal index 2472ed1892c0..6243be718cab 100644 --- a/tests/sksl/metal/SwizzleHelper.metal +++ b/tests/sksl/metal/SwizzleHelper.metal @@ -9,17 +9,6 @@ struct Outputs { struct Globals { half2 glob; }; -half4 fn_h4hh2h2h3(thread Globals& _globals, half a, thread half2& b, thread half2& c, thread half3& d); -half4 _skOutParamHelper0_fn_h4hh2h2h3(thread Globals& _globals, half _var0, thread half3& b, thread half2& glob, thread half3x3& d) { - half2 _var1; - half2 _var2 = glob.yx; - half3 _var3 = d[1].zyx; - half4 _skResult = fn_h4hh2h2h3(_globals, _var0, _var1, _var2, _var3); - b.yz = _var1; - glob.yx = _var2; - d[1].zyx = _var3; - return _skResult; -} half4 fn_h4hh2h2h3(thread Globals& _globals, half a, thread half2& b, thread half2& c, thread half3& d) { a = _out.sk_FragColor.x + a; b = _out.sk_FragColor.yz - _globals.glob.y; @@ -32,9 +21,13 @@ fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front (void)_globals; Outputs _out; (void)_out; + half2 _skTemp0; + half2 _skTemp1; + half3 _skTemp2; + half4 _skTemp3; half2 a = half2(1.0h); half3 b = half3(2.0h); half3x3 d = half3x3(4.0h); - _out.sk_FragColor = _skOutParamHelper0_fn_h4hh2h2h3(_globals, a.x, b, _globals.glob, d); + _out.sk_FragColor = ((_skTemp3 = fn_h4hh2h2h3(_globals, a.x, _skTemp0, (_skTemp1 = _globals.glob.yx), (_skTemp2 = d[1].zyx))), (b.yz = _skTemp0), (_globals.glob.yx = _skTemp1), (d[1].zyx = _skTemp2), _skTemp3); return _out; } diff --git a/tests/sksl/realistic/BlueNeurons.skrp b/tests/sksl/realistic/BlueNeurons.skrp index 687b7cb47d2c..cea21130722f 100644 --- a/tests/sksl/realistic/BlueNeurons.skrp +++ b/tests/sksl/realistic/BlueNeurons.skrp @@ -1,3 +1,10 @@ +68 instructions + +[immutable slots] +i0 = 0x40000000 (2.0) +i1 = 0x40A00000 (5.0) +i2 = 0x41100000 (9.0) + store_src_rg fragcoord = src.rg init_lane_masks CondMask = LoopMask = RetMask = true splat_3_constants $0..2 = 0x3F000000 (0.5) @@ -58,9 +65,7 @@ copy_3_slots_unmasked $0..2 = p sin_float $0 = sin($0) sin_float $1 = sin($1) sin_float $2 = sin($2) -copy_constant $3 = 0x40000000 (2.0) -copy_constant $4 = 0x40A00000 (5.0) -copy_constant $5 = 0x41100000 (9.0) +copy_3_immutables_unmasked $3..5 = i0..2 [0x40000000 (2.0), 0x40A00000 (5.0), 0x41100000 (9.0)] add_3_floats $0..2 += $3..5 copy_3_slots_unmasked $3..5 = p copy_3_slots_unmasked $6..8 = $3..5 diff --git a/tests/sksl/realistic/GaussianBlur.asm.frag b/tests/sksl/realistic/GaussianBlur.asm.frag index 75f4a96ec083..d8c83b0c2cb3 100644 --- a/tests/sksl/realistic/GaussianBlur.asm.frag +++ b/tests/sksl/realistic/GaussianBlur.asm.frag @@ -1,733 +1,733 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor %vLocalCoord_Stage0 -OpExecutionMode %main OriginUpperLeft -OpName %uniformBuffer "uniformBuffer" -OpMemberName %uniformBuffer 0 "sk_RTAdjust" -OpMemberName %uniformBuffer 1 "uIncrement_Stage1_c0" -OpMemberName %uniformBuffer 2 "uKernel_Stage1_c0" -OpMemberName %uniformBuffer 3 "umatrix_Stage1_c0_c0" -OpMemberName %uniformBuffer 4 "uborder_Stage1_c0_c0_c0" -OpMemberName %uniformBuffer 5 "usubset_Stage1_c0_c0_c0" -OpMemberName %uniformBuffer 6 "unorm_Stage1_c0_c0_c0" -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %uTextureSampler_0_Stage1 "uTextureSampler_0_Stage1" -OpName %vLocalCoord_Stage0 "vLocalCoord_Stage0" -OpName %MatrixEffect_Stage1_c0_c0_h4h4f2 "MatrixEffect_Stage1_c0_c0_h4h4f2" -OpName %_1_inCoord "_1_inCoord" -OpName %_2_subsetCoord "_2_subsetCoord" -OpName %_3_clampedCoord "_3_clampedCoord" -OpName %_4_textureColor "_4_textureColor" -OpName %_5_snappedX "_5_snappedX" -OpName %main "main" -OpName %outputColor_Stage0 "outputColor_Stage0" -OpName %outputCoverage_Stage0 "outputCoverage_Stage0" -OpName %_6_output "_6_output" -OpName %_7_coord "_7_coord" -OpName %_8_coordSampled "_8_coordSampled" -OpName %output_Stage1 "output_Stage1" -OpDecorate %_arr_v4float_int_7 ArrayStride 16 -OpMemberDecorate %uniformBuffer 0 Offset 0 -OpMemberDecorate %uniformBuffer 1 Offset 16 -OpMemberDecorate %uniformBuffer 1 RelaxedPrecision -OpMemberDecorate %uniformBuffer 2 Offset 32 -OpMemberDecorate %uniformBuffer 2 RelaxedPrecision -OpMemberDecorate %uniformBuffer 3 Offset 144 -OpMemberDecorate %uniformBuffer 3 ColMajor -OpMemberDecorate %uniformBuffer 3 MatrixStride 16 -OpMemberDecorate %uniformBuffer 4 Offset 192 -OpMemberDecorate %uniformBuffer 4 RelaxedPrecision -OpMemberDecorate %uniformBuffer 5 Offset 208 -OpMemberDecorate %uniformBuffer 6 Offset 224 -OpDecorate %uniformBuffer Block -OpDecorate %4 Binding 0 -OpDecorate %4 DescriptorSet 0 -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %uTextureSampler_0_Stage1 RelaxedPrecision -OpDecorate %uTextureSampler_0_Stage1 Binding 0 -OpDecorate %uTextureSampler_0_Stage1 DescriptorSet 0 -OpDecorate %vLocalCoord_Stage0 Location 0 -OpDecorate %_4_textureColor RelaxedPrecision -OpDecorate %63 RelaxedPrecision -OpDecorate %93 RelaxedPrecision -OpDecorate %94 RelaxedPrecision -OpDecorate %outputColor_Stage0 RelaxedPrecision -OpDecorate %outputCoverage_Stage0 RelaxedPrecision -OpDecorate %_6_output RelaxedPrecision -OpDecorate %109 RelaxedPrecision -OpDecorate %110 RelaxedPrecision -OpDecorate %119 RelaxedPrecision -OpDecorate %120 RelaxedPrecision -OpDecorate %121 RelaxedPrecision -OpDecorate %122 RelaxedPrecision -OpDecorate %124 RelaxedPrecision -OpDecorate %130 RelaxedPrecision -OpDecorate %131 RelaxedPrecision -OpDecorate %132 RelaxedPrecision -OpDecorate %133 RelaxedPrecision -OpDecorate %135 RelaxedPrecision -OpDecorate %141 RelaxedPrecision -OpDecorate %142 RelaxedPrecision -OpDecorate %143 RelaxedPrecision -OpDecorate %144 RelaxedPrecision -OpDecorate %146 RelaxedPrecision -OpDecorate %152 RelaxedPrecision -OpDecorate %153 RelaxedPrecision -OpDecorate %154 RelaxedPrecision -OpDecorate %155 RelaxedPrecision -OpDecorate %157 RelaxedPrecision -OpDecorate %163 RelaxedPrecision -OpDecorate %164 RelaxedPrecision -OpDecorate %165 RelaxedPrecision -OpDecorate %166 RelaxedPrecision -OpDecorate %168 RelaxedPrecision -OpDecorate %174 RelaxedPrecision -OpDecorate %175 RelaxedPrecision -OpDecorate %176 RelaxedPrecision -OpDecorate %177 RelaxedPrecision -OpDecorate %179 RelaxedPrecision -OpDecorate %185 RelaxedPrecision -OpDecorate %186 RelaxedPrecision -OpDecorate %187 RelaxedPrecision -OpDecorate %188 RelaxedPrecision -OpDecorate %190 RelaxedPrecision -OpDecorate %196 RelaxedPrecision -OpDecorate %197 RelaxedPrecision -OpDecorate %198 RelaxedPrecision -OpDecorate %199 RelaxedPrecision -OpDecorate %201 RelaxedPrecision -OpDecorate %207 RelaxedPrecision -OpDecorate %208 RelaxedPrecision -OpDecorate %209 RelaxedPrecision -OpDecorate %210 RelaxedPrecision -OpDecorate %212 RelaxedPrecision -OpDecorate %218 RelaxedPrecision -OpDecorate %219 RelaxedPrecision -OpDecorate %220 RelaxedPrecision -OpDecorate %221 RelaxedPrecision -OpDecorate %223 RelaxedPrecision -OpDecorate %229 RelaxedPrecision -OpDecorate %230 RelaxedPrecision -OpDecorate %231 RelaxedPrecision -OpDecorate %232 RelaxedPrecision -OpDecorate %234 RelaxedPrecision -OpDecorate %240 RelaxedPrecision -OpDecorate %241 RelaxedPrecision -OpDecorate %242 RelaxedPrecision -OpDecorate %243 RelaxedPrecision -OpDecorate %245 RelaxedPrecision -OpDecorate %251 RelaxedPrecision -OpDecorate %252 RelaxedPrecision -OpDecorate %253 RelaxedPrecision -OpDecorate %254 RelaxedPrecision -OpDecorate %256 RelaxedPrecision -OpDecorate %262 RelaxedPrecision -OpDecorate %263 RelaxedPrecision -OpDecorate %264 RelaxedPrecision -OpDecorate %265 RelaxedPrecision -OpDecorate %267 RelaxedPrecision -OpDecorate %273 RelaxedPrecision -OpDecorate %274 RelaxedPrecision -OpDecorate %275 RelaxedPrecision -OpDecorate %276 RelaxedPrecision -OpDecorate %278 RelaxedPrecision -OpDecorate %284 RelaxedPrecision -OpDecorate %285 RelaxedPrecision -OpDecorate %286 RelaxedPrecision -OpDecorate %287 RelaxedPrecision -OpDecorate %289 RelaxedPrecision -OpDecorate %295 RelaxedPrecision -OpDecorate %296 RelaxedPrecision -OpDecorate %297 RelaxedPrecision -OpDecorate %298 RelaxedPrecision -OpDecorate %300 RelaxedPrecision -OpDecorate %306 RelaxedPrecision -OpDecorate %307 RelaxedPrecision -OpDecorate %308 RelaxedPrecision -OpDecorate %309 RelaxedPrecision -OpDecorate %311 RelaxedPrecision -OpDecorate %317 RelaxedPrecision -OpDecorate %318 RelaxedPrecision -OpDecorate %319 RelaxedPrecision -OpDecorate %320 RelaxedPrecision -OpDecorate %322 RelaxedPrecision -OpDecorate %328 RelaxedPrecision -OpDecorate %329 RelaxedPrecision -OpDecorate %330 RelaxedPrecision -OpDecorate %331 RelaxedPrecision -OpDecorate %333 RelaxedPrecision -OpDecorate %339 RelaxedPrecision -OpDecorate %340 RelaxedPrecision -OpDecorate %341 RelaxedPrecision -OpDecorate %342 RelaxedPrecision -OpDecorate %344 RelaxedPrecision -OpDecorate %350 RelaxedPrecision -OpDecorate %351 RelaxedPrecision -OpDecorate %352 RelaxedPrecision -OpDecorate %353 RelaxedPrecision -OpDecorate %355 RelaxedPrecision -OpDecorate %361 RelaxedPrecision -OpDecorate %362 RelaxedPrecision -OpDecorate %363 RelaxedPrecision -OpDecorate %364 RelaxedPrecision -OpDecorate %366 RelaxedPrecision -OpDecorate %372 RelaxedPrecision -OpDecorate %373 RelaxedPrecision -OpDecorate %374 RelaxedPrecision -OpDecorate %375 RelaxedPrecision -OpDecorate %377 RelaxedPrecision -OpDecorate %383 RelaxedPrecision -OpDecorate %384 RelaxedPrecision -OpDecorate %385 RelaxedPrecision -OpDecorate %386 RelaxedPrecision -OpDecorate %388 RelaxedPrecision -OpDecorate %390 RelaxedPrecision -OpDecorate %output_Stage1 RelaxedPrecision -OpDecorate %392 RelaxedPrecision -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 -%v2float = OpTypeVector %float 2 -%int = OpTypeInt 32 1 -%int_7 = OpConstant %int 7 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor %vLocalCoord_Stage0 + OpExecutionMode %main OriginUpperLeft + OpName %uniformBuffer "uniformBuffer" + OpMemberName %uniformBuffer 0 "sk_RTAdjust" + OpMemberName %uniformBuffer 1 "uIncrement_Stage1_c0" + OpMemberName %uniformBuffer 2 "uKernel_Stage1_c0" + OpMemberName %uniformBuffer 3 "umatrix_Stage1_c0_c0" + OpMemberName %uniformBuffer 4 "uborder_Stage1_c0_c0_c0" + OpMemberName %uniformBuffer 5 "usubset_Stage1_c0_c0_c0" + OpMemberName %uniformBuffer 6 "unorm_Stage1_c0_c0_c0" + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %uTextureSampler_0_Stage1 "uTextureSampler_0_Stage1" + OpName %vLocalCoord_Stage0 "vLocalCoord_Stage0" + OpName %MatrixEffect_Stage1_c0_c0_h4h4f2 "MatrixEffect_Stage1_c0_c0_h4h4f2" + OpName %_1_inCoord "_1_inCoord" + OpName %_2_subsetCoord "_2_subsetCoord" + OpName %_3_clampedCoord "_3_clampedCoord" + OpName %_4_textureColor "_4_textureColor" + OpName %_5_snappedX "_5_snappedX" + OpName %main "main" + OpName %outputColor_Stage0 "outputColor_Stage0" + OpName %outputCoverage_Stage0 "outputCoverage_Stage0" + OpName %_6_output "_6_output" + OpName %_7_coord "_7_coord" + OpName %_8_coordSampled "_8_coordSampled" + OpName %output_Stage1 "output_Stage1" + OpDecorate %_arr_v4float_int_7 ArrayStride 16 + OpMemberDecorate %uniformBuffer 0 Offset 0 + OpMemberDecorate %uniformBuffer 1 Offset 16 + OpMemberDecorate %uniformBuffer 1 RelaxedPrecision + OpMemberDecorate %uniformBuffer 2 Offset 32 + OpMemberDecorate %uniformBuffer 2 RelaxedPrecision + OpMemberDecorate %uniformBuffer 3 Offset 144 + OpMemberDecorate %uniformBuffer 3 ColMajor + OpMemberDecorate %uniformBuffer 3 MatrixStride 16 + OpMemberDecorate %uniformBuffer 4 Offset 192 + OpMemberDecorate %uniformBuffer 4 RelaxedPrecision + OpMemberDecorate %uniformBuffer 5 Offset 208 + OpMemberDecorate %uniformBuffer 6 Offset 224 + OpDecorate %uniformBuffer Block + OpDecorate %4 Binding 0 + OpDecorate %4 DescriptorSet 0 + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %uTextureSampler_0_Stage1 RelaxedPrecision + OpDecorate %uTextureSampler_0_Stage1 Binding 0 + OpDecorate %uTextureSampler_0_Stage1 DescriptorSet 0 + OpDecorate %vLocalCoord_Stage0 Location 0 + OpDecorate %_4_textureColor RelaxedPrecision + OpDecorate %63 RelaxedPrecision + OpDecorate %93 RelaxedPrecision + OpDecorate %94 RelaxedPrecision + OpDecorate %outputColor_Stage0 RelaxedPrecision + OpDecorate %outputCoverage_Stage0 RelaxedPrecision + OpDecorate %_6_output RelaxedPrecision + OpDecorate %109 RelaxedPrecision + OpDecorate %110 RelaxedPrecision + OpDecorate %119 RelaxedPrecision + OpDecorate %120 RelaxedPrecision + OpDecorate %121 RelaxedPrecision + OpDecorate %122 RelaxedPrecision + OpDecorate %124 RelaxedPrecision + OpDecorate %130 RelaxedPrecision + OpDecorate %131 RelaxedPrecision + OpDecorate %132 RelaxedPrecision + OpDecorate %133 RelaxedPrecision + OpDecorate %135 RelaxedPrecision + OpDecorate %141 RelaxedPrecision + OpDecorate %142 RelaxedPrecision + OpDecorate %143 RelaxedPrecision + OpDecorate %144 RelaxedPrecision + OpDecorate %146 RelaxedPrecision + OpDecorate %152 RelaxedPrecision + OpDecorate %153 RelaxedPrecision + OpDecorate %154 RelaxedPrecision + OpDecorate %155 RelaxedPrecision + OpDecorate %157 RelaxedPrecision + OpDecorate %163 RelaxedPrecision + OpDecorate %164 RelaxedPrecision + OpDecorate %165 RelaxedPrecision + OpDecorate %166 RelaxedPrecision + OpDecorate %168 RelaxedPrecision + OpDecorate %174 RelaxedPrecision + OpDecorate %175 RelaxedPrecision + OpDecorate %176 RelaxedPrecision + OpDecorate %177 RelaxedPrecision + OpDecorate %179 RelaxedPrecision + OpDecorate %185 RelaxedPrecision + OpDecorate %186 RelaxedPrecision + OpDecorate %187 RelaxedPrecision + OpDecorate %188 RelaxedPrecision + OpDecorate %190 RelaxedPrecision + OpDecorate %196 RelaxedPrecision + OpDecorate %197 RelaxedPrecision + OpDecorate %198 RelaxedPrecision + OpDecorate %199 RelaxedPrecision + OpDecorate %201 RelaxedPrecision + OpDecorate %207 RelaxedPrecision + OpDecorate %208 RelaxedPrecision + OpDecorate %209 RelaxedPrecision + OpDecorate %210 RelaxedPrecision + OpDecorate %212 RelaxedPrecision + OpDecorate %218 RelaxedPrecision + OpDecorate %219 RelaxedPrecision + OpDecorate %220 RelaxedPrecision + OpDecorate %221 RelaxedPrecision + OpDecorate %223 RelaxedPrecision + OpDecorate %229 RelaxedPrecision + OpDecorate %230 RelaxedPrecision + OpDecorate %231 RelaxedPrecision + OpDecorate %232 RelaxedPrecision + OpDecorate %234 RelaxedPrecision + OpDecorate %240 RelaxedPrecision + OpDecorate %241 RelaxedPrecision + OpDecorate %242 RelaxedPrecision + OpDecorate %243 RelaxedPrecision + OpDecorate %245 RelaxedPrecision + OpDecorate %251 RelaxedPrecision + OpDecorate %252 RelaxedPrecision + OpDecorate %253 RelaxedPrecision + OpDecorate %254 RelaxedPrecision + OpDecorate %256 RelaxedPrecision + OpDecorate %262 RelaxedPrecision + OpDecorate %263 RelaxedPrecision + OpDecorate %264 RelaxedPrecision + OpDecorate %265 RelaxedPrecision + OpDecorate %267 RelaxedPrecision + OpDecorate %273 RelaxedPrecision + OpDecorate %274 RelaxedPrecision + OpDecorate %275 RelaxedPrecision + OpDecorate %276 RelaxedPrecision + OpDecorate %278 RelaxedPrecision + OpDecorate %284 RelaxedPrecision + OpDecorate %285 RelaxedPrecision + OpDecorate %286 RelaxedPrecision + OpDecorate %287 RelaxedPrecision + OpDecorate %289 RelaxedPrecision + OpDecorate %295 RelaxedPrecision + OpDecorate %296 RelaxedPrecision + OpDecorate %297 RelaxedPrecision + OpDecorate %298 RelaxedPrecision + OpDecorate %300 RelaxedPrecision + OpDecorate %306 RelaxedPrecision + OpDecorate %307 RelaxedPrecision + OpDecorate %308 RelaxedPrecision + OpDecorate %309 RelaxedPrecision + OpDecorate %311 RelaxedPrecision + OpDecorate %317 RelaxedPrecision + OpDecorate %318 RelaxedPrecision + OpDecorate %319 RelaxedPrecision + OpDecorate %320 RelaxedPrecision + OpDecorate %322 RelaxedPrecision + OpDecorate %328 RelaxedPrecision + OpDecorate %329 RelaxedPrecision + OpDecorate %330 RelaxedPrecision + OpDecorate %331 RelaxedPrecision + OpDecorate %333 RelaxedPrecision + OpDecorate %339 RelaxedPrecision + OpDecorate %340 RelaxedPrecision + OpDecorate %341 RelaxedPrecision + OpDecorate %342 RelaxedPrecision + OpDecorate %344 RelaxedPrecision + OpDecorate %350 RelaxedPrecision + OpDecorate %351 RelaxedPrecision + OpDecorate %352 RelaxedPrecision + OpDecorate %353 RelaxedPrecision + OpDecorate %355 RelaxedPrecision + OpDecorate %361 RelaxedPrecision + OpDecorate %362 RelaxedPrecision + OpDecorate %363 RelaxedPrecision + OpDecorate %364 RelaxedPrecision + OpDecorate %366 RelaxedPrecision + OpDecorate %372 RelaxedPrecision + OpDecorate %373 RelaxedPrecision + OpDecorate %374 RelaxedPrecision + OpDecorate %375 RelaxedPrecision + OpDecorate %377 RelaxedPrecision + OpDecorate %383 RelaxedPrecision + OpDecorate %384 RelaxedPrecision + OpDecorate %385 RelaxedPrecision + OpDecorate %386 RelaxedPrecision + OpDecorate %388 RelaxedPrecision + OpDecorate %390 RelaxedPrecision + OpDecorate %output_Stage1 RelaxedPrecision + OpDecorate %392 RelaxedPrecision + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 + %v2float = OpTypeVector %float 2 + %int = OpTypeInt 32 1 + %int_7 = OpConstant %int 7 %_arr_v4float_int_7 = OpTypeArray %v4float %int_7 -%v3float = OpTypeVector %float 3 + %v3float = OpTypeVector %float 3 %mat3v3float = OpTypeMatrix %v3float 3 %uniformBuffer = OpTypeStruct %v4float %v2float %_arr_v4float_int_7 %mat3v3float %v4float %v4float %v4float %_ptr_Uniform_uniformBuffer = OpTypePointer Uniform %uniformBuffer -%4 = OpVariable %_ptr_Uniform_uniformBuffer Uniform -%bool = OpTypeBool + %4 = OpVariable %_ptr_Uniform_uniformBuffer Uniform + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%21 = OpTypeImage %float 2D 0 0 0 1 Unknown -%22 = OpTypeSampledImage %21 + %21 = OpTypeImage %float 2D 0 0 0 1 Unknown + %22 = OpTypeSampledImage %21 %_ptr_UniformConstant_22 = OpTypePointer UniformConstant %22 %uTextureSampler_0_Stage1 = OpVariable %_ptr_UniformConstant_22 UniformConstant %_ptr_Input_v2float = OpTypePointer Input %v2float %vLocalCoord_Stage0 = OpVariable %_ptr_Input_v2float Input %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Function_v2float = OpTypePointer Function %v2float -%28 = OpTypeFunction %v4float %_ptr_Function_v4float %_ptr_Function_v2float -%int_3 = OpConstant %int 3 + %28 = OpTypeFunction %v4float %_ptr_Function_v4float %_ptr_Function_v2float + %int_3 = OpConstant %int 3 %_ptr_Uniform_mat3v3float = OpTypePointer Uniform %mat3v3float -%float_1 = OpConstant %float 1 -%int_6 = OpConstant %int 6 + %float_1 = OpConstant %float 1 + %int_6 = OpConstant %int 6 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float %_ptr_Function_float = OpTypePointer Function %float -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 %float_0_00100000005 = OpConstant %float 0.00100000005 -%float_0_5 = OpConstant %float 0.5 -%true = OpConstantTrue %bool -%int_5 = OpConstant %int 5 -%int_4 = OpConstant %int 4 -%void = OpTypeVoid -%96 = OpTypeFunction %void -%100 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 -%float_0 = OpConstant %float 0 -%103 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 -%float_12 = OpConstant %float 12 + %float_0_5 = OpConstant %float 0.5 + %true = OpConstantTrue %bool + %int_5 = OpConstant %int 5 + %int_4 = OpConstant %int 4 + %void = OpTypeVoid + %96 = OpTypeFunction %void + %100 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %float_0 = OpConstant %float 0 + %103 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %float_12 = OpConstant %float 12 %_ptr_Uniform_v2float = OpTypePointer Uniform %v2float -%113 = OpConstantComposite %v2float %float_0 %float_0 -%int_2 = OpConstant %int 2 + %113 = OpConstantComposite %v2float %float_0 %float_0 + %int_2 = OpConstant %int 2 %MatrixEffect_Stage1_c0_c0_h4h4f2 = OpFunction %v4float None %28 -%29 = OpFunctionParameter %_ptr_Function_v4float -%30 = OpFunctionParameter %_ptr_Function_v2float -%31 = OpLabel -%_1_inCoord = OpVariable %_ptr_Function_v2float Function + %29 = OpFunctionParameter %_ptr_Function_v4float + %30 = OpFunctionParameter %_ptr_Function_v2float + %31 = OpLabel + %_1_inCoord = OpVariable %_ptr_Function_v2float Function %_2_subsetCoord = OpVariable %_ptr_Function_v2float Function %_3_clampedCoord = OpVariable %_ptr_Function_v2float Function %_4_textureColor = OpVariable %_ptr_Function_v4float Function %_5_snappedX = OpVariable %_ptr_Function_float Function -%34 = OpAccessChain %_ptr_Uniform_mat3v3float %4 %int_3 -%36 = OpLoad %mat3v3float %34 -%37 = OpLoad %v2float %30 -%38 = OpCompositeExtract %float %37 0 -%39 = OpCompositeExtract %float %37 1 -%41 = OpCompositeConstruct %v3float %38 %39 %float_1 -%42 = OpMatrixTimesVector %v3float %36 %41 -%43 = OpVectorShuffle %v2float %42 %42 0 1 -OpStore %_1_inCoord %43 -%45 = OpAccessChain %_ptr_Uniform_v4float %4 %int_6 -%47 = OpLoad %v4float %45 -%48 = OpVectorShuffle %v2float %47 %47 0 1 -%49 = OpFMul %v2float %43 %48 -OpStore %_1_inCoord %49 -%51 = OpCompositeExtract %float %49 0 -%52 = OpAccessChain %_ptr_Function_float %_2_subsetCoord %int_0 -OpStore %52 %51 -%55 = OpLoad %v2float %_1_inCoord -%56 = OpCompositeExtract %float %55 1 -%57 = OpAccessChain %_ptr_Function_float %_2_subsetCoord %int_1 -OpStore %57 %56 -%60 = OpLoad %v2float %_2_subsetCoord -OpStore %_3_clampedCoord %60 -%63 = OpLoad %22 %uTextureSampler_0_Stage1 -%64 = OpAccessChain %_ptr_Uniform_v4float %4 %int_6 -%65 = OpLoad %v4float %64 -%66 = OpVectorShuffle %v2float %65 %65 2 3 -%67 = OpFMul %v2float %60 %66 -%62 = OpImageSampleImplicitLod %v4float %63 %67 -OpStore %_4_textureColor %62 -%70 = OpLoad %v2float %_1_inCoord -%71 = OpCompositeExtract %float %70 0 -%73 = OpFAdd %float %71 %float_0_00100000005 -%69 = OpExtInst %float %1 Floor %73 -%75 = OpFAdd %float %69 %float_0_5 -OpStore %_5_snappedX %75 -%78 = OpAccessChain %_ptr_Uniform_v4float %4 %int_5 -%79 = OpLoad %v4float %78 -%80 = OpCompositeExtract %float %79 0 -%81 = OpFOrdLessThan %bool %75 %80 -OpSelectionMerge %83 None -OpBranchConditional %81 %83 %82 -%82 = OpLabel -%84 = OpAccessChain %_ptr_Uniform_v4float %4 %int_5 -%85 = OpLoad %v4float %84 -%86 = OpCompositeExtract %float %85 2 -%87 = OpFOrdGreaterThan %bool %75 %86 -OpBranch %83 -%83 = OpLabel -%88 = OpPhi %bool %true %31 %87 %82 -OpSelectionMerge %90 None -OpBranchConditional %88 %89 %90 -%89 = OpLabel -%92 = OpAccessChain %_ptr_Uniform_v4float %4 %int_4 -%93 = OpLoad %v4float %92 -OpStore %_4_textureColor %93 -OpBranch %90 -%90 = OpLabel -%94 = OpLoad %v4float %_4_textureColor -OpReturnValue %94 -OpFunctionEnd -%main = OpFunction %void None %96 -%97 = OpLabel + %34 = OpAccessChain %_ptr_Uniform_mat3v3float %4 %int_3 + %36 = OpLoad %mat3v3float %34 + %37 = OpLoad %v2float %30 + %38 = OpCompositeExtract %float %37 0 + %39 = OpCompositeExtract %float %37 1 + %41 = OpCompositeConstruct %v3float %38 %39 %float_1 + %42 = OpMatrixTimesVector %v3float %36 %41 + %43 = OpVectorShuffle %v2float %42 %42 0 1 + OpStore %_1_inCoord %43 + %45 = OpAccessChain %_ptr_Uniform_v4float %4 %int_6 + %47 = OpLoad %v4float %45 + %48 = OpVectorShuffle %v2float %47 %47 0 1 + %49 = OpFMul %v2float %43 %48 + OpStore %_1_inCoord %49 + %51 = OpCompositeExtract %float %49 0 + %52 = OpAccessChain %_ptr_Function_float %_2_subsetCoord %int_0 + OpStore %52 %51 + %55 = OpLoad %v2float %_1_inCoord + %56 = OpCompositeExtract %float %55 1 + %57 = OpAccessChain %_ptr_Function_float %_2_subsetCoord %int_1 + OpStore %57 %56 + %60 = OpLoad %v2float %_2_subsetCoord + OpStore %_3_clampedCoord %60 + %63 = OpLoad %22 %uTextureSampler_0_Stage1 + %64 = OpAccessChain %_ptr_Uniform_v4float %4 %int_6 + %65 = OpLoad %v4float %64 + %66 = OpVectorShuffle %v2float %65 %65 2 3 + %67 = OpFMul %v2float %60 %66 + %62 = OpImageSampleImplicitLod %v4float %63 %67 + OpStore %_4_textureColor %62 + %70 = OpLoad %v2float %_1_inCoord + %71 = OpCompositeExtract %float %70 0 + %73 = OpFAdd %float %71 %float_0_00100000005 + %69 = OpExtInst %float %1 Floor %73 + %75 = OpFAdd %float %69 %float_0_5 + OpStore %_5_snappedX %75 + %78 = OpAccessChain %_ptr_Uniform_v4float %4 %int_5 + %79 = OpLoad %v4float %78 + %80 = OpCompositeExtract %float %79 0 + %81 = OpFOrdLessThan %bool %75 %80 + OpSelectionMerge %83 None + OpBranchConditional %81 %83 %82 + %82 = OpLabel + %84 = OpAccessChain %_ptr_Uniform_v4float %4 %int_5 + %85 = OpLoad %v4float %84 + %86 = OpCompositeExtract %float %85 2 + %87 = OpFOrdGreaterThan %bool %75 %86 + OpBranch %83 + %83 = OpLabel + %88 = OpPhi %bool %true %31 %87 %82 + OpSelectionMerge %90 None + OpBranchConditional %88 %89 %90 + %89 = OpLabel + %92 = OpAccessChain %_ptr_Uniform_v4float %4 %int_4 + %93 = OpLoad %v4float %92 + OpStore %_4_textureColor %93 + OpBranch %90 + %90 = OpLabel + %94 = OpLoad %v4float %_4_textureColor + OpReturnValue %94 + OpFunctionEnd + %main = OpFunction %void None %96 + %97 = OpLabel %outputColor_Stage0 = OpVariable %_ptr_Function_v4float Function %outputCoverage_Stage0 = OpVariable %_ptr_Function_v4float Function -%_6_output = OpVariable %_ptr_Function_v4float Function -%_7_coord = OpVariable %_ptr_Function_v2float Function + %_6_output = OpVariable %_ptr_Function_v4float Function + %_7_coord = OpVariable %_ptr_Function_v2float Function %_8_coordSampled = OpVariable %_ptr_Function_v2float Function -%114 = OpVariable %_ptr_Function_v4float Function -%115 = OpVariable %_ptr_Function_v2float Function -%126 = OpVariable %_ptr_Function_v4float Function -%127 = OpVariable %_ptr_Function_v2float Function -%137 = OpVariable %_ptr_Function_v4float Function -%138 = OpVariable %_ptr_Function_v2float Function -%148 = OpVariable %_ptr_Function_v4float Function -%149 = OpVariable %_ptr_Function_v2float Function -%159 = OpVariable %_ptr_Function_v4float Function -%160 = OpVariable %_ptr_Function_v2float Function -%170 = OpVariable %_ptr_Function_v4float Function -%171 = OpVariable %_ptr_Function_v2float Function -%181 = OpVariable %_ptr_Function_v4float Function -%182 = OpVariable %_ptr_Function_v2float Function -%192 = OpVariable %_ptr_Function_v4float Function -%193 = OpVariable %_ptr_Function_v2float Function -%203 = OpVariable %_ptr_Function_v4float Function -%204 = OpVariable %_ptr_Function_v2float Function -%214 = OpVariable %_ptr_Function_v4float Function -%215 = OpVariable %_ptr_Function_v2float Function -%225 = OpVariable %_ptr_Function_v4float Function -%226 = OpVariable %_ptr_Function_v2float Function -%236 = OpVariable %_ptr_Function_v4float Function -%237 = OpVariable %_ptr_Function_v2float Function -%247 = OpVariable %_ptr_Function_v4float Function -%248 = OpVariable %_ptr_Function_v2float Function -%258 = OpVariable %_ptr_Function_v4float Function -%259 = OpVariable %_ptr_Function_v2float Function -%269 = OpVariable %_ptr_Function_v4float Function -%270 = OpVariable %_ptr_Function_v2float Function -%280 = OpVariable %_ptr_Function_v4float Function -%281 = OpVariable %_ptr_Function_v2float Function -%291 = OpVariable %_ptr_Function_v4float Function -%292 = OpVariable %_ptr_Function_v2float Function -%302 = OpVariable %_ptr_Function_v4float Function -%303 = OpVariable %_ptr_Function_v2float Function -%313 = OpVariable %_ptr_Function_v4float Function -%314 = OpVariable %_ptr_Function_v2float Function -%324 = OpVariable %_ptr_Function_v4float Function -%325 = OpVariable %_ptr_Function_v2float Function -%335 = OpVariable %_ptr_Function_v4float Function -%336 = OpVariable %_ptr_Function_v2float Function -%346 = OpVariable %_ptr_Function_v4float Function -%347 = OpVariable %_ptr_Function_v2float Function -%357 = OpVariable %_ptr_Function_v4float Function -%358 = OpVariable %_ptr_Function_v2float Function -%368 = OpVariable %_ptr_Function_v4float Function -%369 = OpVariable %_ptr_Function_v2float Function -%379 = OpVariable %_ptr_Function_v4float Function -%380 = OpVariable %_ptr_Function_v2float Function + %114 = OpVariable %_ptr_Function_v4float Function + %115 = OpVariable %_ptr_Function_v2float Function + %126 = OpVariable %_ptr_Function_v4float Function + %127 = OpVariable %_ptr_Function_v2float Function + %137 = OpVariable %_ptr_Function_v4float Function + %138 = OpVariable %_ptr_Function_v2float Function + %148 = OpVariable %_ptr_Function_v4float Function + %149 = OpVariable %_ptr_Function_v2float Function + %159 = OpVariable %_ptr_Function_v4float Function + %160 = OpVariable %_ptr_Function_v2float Function + %170 = OpVariable %_ptr_Function_v4float Function + %171 = OpVariable %_ptr_Function_v2float Function + %181 = OpVariable %_ptr_Function_v4float Function + %182 = OpVariable %_ptr_Function_v2float Function + %192 = OpVariable %_ptr_Function_v4float Function + %193 = OpVariable %_ptr_Function_v2float Function + %203 = OpVariable %_ptr_Function_v4float Function + %204 = OpVariable %_ptr_Function_v2float Function + %214 = OpVariable %_ptr_Function_v4float Function + %215 = OpVariable %_ptr_Function_v2float Function + %225 = OpVariable %_ptr_Function_v4float Function + %226 = OpVariable %_ptr_Function_v2float Function + %236 = OpVariable %_ptr_Function_v4float Function + %237 = OpVariable %_ptr_Function_v2float Function + %247 = OpVariable %_ptr_Function_v4float Function + %248 = OpVariable %_ptr_Function_v2float Function + %258 = OpVariable %_ptr_Function_v4float Function + %259 = OpVariable %_ptr_Function_v2float Function + %269 = OpVariable %_ptr_Function_v4float Function + %270 = OpVariable %_ptr_Function_v2float Function + %280 = OpVariable %_ptr_Function_v4float Function + %281 = OpVariable %_ptr_Function_v2float Function + %291 = OpVariable %_ptr_Function_v4float Function + %292 = OpVariable %_ptr_Function_v2float Function + %302 = OpVariable %_ptr_Function_v4float Function + %303 = OpVariable %_ptr_Function_v2float Function + %313 = OpVariable %_ptr_Function_v4float Function + %314 = OpVariable %_ptr_Function_v2float Function + %324 = OpVariable %_ptr_Function_v4float Function + %325 = OpVariable %_ptr_Function_v2float Function + %335 = OpVariable %_ptr_Function_v4float Function + %336 = OpVariable %_ptr_Function_v2float Function + %346 = OpVariable %_ptr_Function_v4float Function + %347 = OpVariable %_ptr_Function_v2float Function + %357 = OpVariable %_ptr_Function_v4float Function + %358 = OpVariable %_ptr_Function_v2float Function + %368 = OpVariable %_ptr_Function_v4float Function + %369 = OpVariable %_ptr_Function_v2float Function + %379 = OpVariable %_ptr_Function_v4float Function + %380 = OpVariable %_ptr_Function_v2float Function %output_Stage1 = OpVariable %_ptr_Function_v4float Function -OpStore %outputColor_Stage0 %100 -OpStore %outputCoverage_Stage0 %100 -OpStore %_6_output %103 -%105 = OpLoad %v2float %vLocalCoord_Stage0 -%107 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 -%109 = OpLoad %v2float %107 -%110 = OpVectorTimesScalar %v2float %109 %float_12 -%111 = OpFSub %v2float %105 %110 -OpStore %_7_coord %111 -OpStore %_8_coordSampled %113 -OpStore %_8_coordSampled %111 -OpStore %114 %100 -OpStore %115 %111 -%116 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %114 %115 -%118 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_0 -%119 = OpLoad %v4float %118 -%120 = OpCompositeExtract %float %119 0 -%121 = OpVectorTimesScalar %v4float %116 %120 -%122 = OpFAdd %v4float %103 %121 -OpStore %_6_output %122 -%123 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 -%124 = OpLoad %v2float %123 -%125 = OpFAdd %v2float %111 %124 -OpStore %_7_coord %125 -OpStore %_8_coordSampled %125 -OpStore %126 %100 -OpStore %127 %125 -%128 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %126 %127 -%129 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_0 -%130 = OpLoad %v4float %129 -%131 = OpCompositeExtract %float %130 1 -%132 = OpVectorTimesScalar %v4float %128 %131 -%133 = OpFAdd %v4float %122 %132 -OpStore %_6_output %133 -%134 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 -%135 = OpLoad %v2float %134 -%136 = OpFAdd %v2float %125 %135 -OpStore %_7_coord %136 -OpStore %_8_coordSampled %136 -OpStore %137 %100 -OpStore %138 %136 -%139 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %137 %138 -%140 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_0 -%141 = OpLoad %v4float %140 -%142 = OpCompositeExtract %float %141 2 -%143 = OpVectorTimesScalar %v4float %139 %142 -%144 = OpFAdd %v4float %133 %143 -OpStore %_6_output %144 -%145 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 -%146 = OpLoad %v2float %145 -%147 = OpFAdd %v2float %136 %146 -OpStore %_7_coord %147 -OpStore %_8_coordSampled %147 -OpStore %148 %100 -OpStore %149 %147 -%150 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %148 %149 -%151 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_0 -%152 = OpLoad %v4float %151 -%153 = OpCompositeExtract %float %152 3 -%154 = OpVectorTimesScalar %v4float %150 %153 -%155 = OpFAdd %v4float %144 %154 -OpStore %_6_output %155 -%156 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 -%157 = OpLoad %v2float %156 -%158 = OpFAdd %v2float %147 %157 -OpStore %_7_coord %158 -OpStore %_8_coordSampled %158 -OpStore %159 %100 -OpStore %160 %158 -%161 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %159 %160 -%162 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_1 -%163 = OpLoad %v4float %162 -%164 = OpCompositeExtract %float %163 0 -%165 = OpVectorTimesScalar %v4float %161 %164 -%166 = OpFAdd %v4float %155 %165 -OpStore %_6_output %166 -%167 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 -%168 = OpLoad %v2float %167 -%169 = OpFAdd %v2float %158 %168 -OpStore %_7_coord %169 -OpStore %_8_coordSampled %169 -OpStore %170 %100 -OpStore %171 %169 -%172 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %170 %171 -%173 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_1 -%174 = OpLoad %v4float %173 -%175 = OpCompositeExtract %float %174 1 -%176 = OpVectorTimesScalar %v4float %172 %175 -%177 = OpFAdd %v4float %166 %176 -OpStore %_6_output %177 -%178 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 -%179 = OpLoad %v2float %178 -%180 = OpFAdd %v2float %169 %179 -OpStore %_7_coord %180 -OpStore %_8_coordSampled %180 -OpStore %181 %100 -OpStore %182 %180 -%183 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %181 %182 -%184 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_1 -%185 = OpLoad %v4float %184 -%186 = OpCompositeExtract %float %185 2 -%187 = OpVectorTimesScalar %v4float %183 %186 -%188 = OpFAdd %v4float %177 %187 -OpStore %_6_output %188 -%189 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 -%190 = OpLoad %v2float %189 -%191 = OpFAdd %v2float %180 %190 -OpStore %_7_coord %191 -OpStore %_8_coordSampled %191 -OpStore %192 %100 -OpStore %193 %191 -%194 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %192 %193 -%195 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_1 -%196 = OpLoad %v4float %195 -%197 = OpCompositeExtract %float %196 3 -%198 = OpVectorTimesScalar %v4float %194 %197 -%199 = OpFAdd %v4float %188 %198 -OpStore %_6_output %199 -%200 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 -%201 = OpLoad %v2float %200 -%202 = OpFAdd %v2float %191 %201 -OpStore %_7_coord %202 -OpStore %_8_coordSampled %202 -OpStore %203 %100 -OpStore %204 %202 -%205 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %203 %204 -%206 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_2 -%207 = OpLoad %v4float %206 -%208 = OpCompositeExtract %float %207 0 -%209 = OpVectorTimesScalar %v4float %205 %208 -%210 = OpFAdd %v4float %199 %209 -OpStore %_6_output %210 -%211 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 -%212 = OpLoad %v2float %211 -%213 = OpFAdd %v2float %202 %212 -OpStore %_7_coord %213 -OpStore %_8_coordSampled %213 -OpStore %214 %100 -OpStore %215 %213 -%216 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %214 %215 -%217 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_2 -%218 = OpLoad %v4float %217 -%219 = OpCompositeExtract %float %218 1 -%220 = OpVectorTimesScalar %v4float %216 %219 -%221 = OpFAdd %v4float %210 %220 -OpStore %_6_output %221 -%222 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 -%223 = OpLoad %v2float %222 -%224 = OpFAdd %v2float %213 %223 -OpStore %_7_coord %224 -OpStore %_8_coordSampled %224 -OpStore %225 %100 -OpStore %226 %224 -%227 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %225 %226 -%228 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_2 -%229 = OpLoad %v4float %228 -%230 = OpCompositeExtract %float %229 2 -%231 = OpVectorTimesScalar %v4float %227 %230 -%232 = OpFAdd %v4float %221 %231 -OpStore %_6_output %232 -%233 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 -%234 = OpLoad %v2float %233 -%235 = OpFAdd %v2float %224 %234 -OpStore %_7_coord %235 -OpStore %_8_coordSampled %235 -OpStore %236 %100 -OpStore %237 %235 -%238 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %236 %237 -%239 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_2 -%240 = OpLoad %v4float %239 -%241 = OpCompositeExtract %float %240 3 -%242 = OpVectorTimesScalar %v4float %238 %241 -%243 = OpFAdd %v4float %232 %242 -OpStore %_6_output %243 -%244 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 -%245 = OpLoad %v2float %244 -%246 = OpFAdd %v2float %235 %245 -OpStore %_7_coord %246 -OpStore %_8_coordSampled %246 -OpStore %247 %100 -OpStore %248 %246 -%249 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %247 %248 -%250 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_3 -%251 = OpLoad %v4float %250 -%252 = OpCompositeExtract %float %251 0 -%253 = OpVectorTimesScalar %v4float %249 %252 -%254 = OpFAdd %v4float %243 %253 -OpStore %_6_output %254 -%255 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 -%256 = OpLoad %v2float %255 -%257 = OpFAdd %v2float %246 %256 -OpStore %_7_coord %257 -OpStore %_8_coordSampled %257 -OpStore %258 %100 -OpStore %259 %257 -%260 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %258 %259 -%261 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_3 -%262 = OpLoad %v4float %261 -%263 = OpCompositeExtract %float %262 1 -%264 = OpVectorTimesScalar %v4float %260 %263 -%265 = OpFAdd %v4float %254 %264 -OpStore %_6_output %265 -%266 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 -%267 = OpLoad %v2float %266 -%268 = OpFAdd %v2float %257 %267 -OpStore %_7_coord %268 -OpStore %_8_coordSampled %268 -OpStore %269 %100 -OpStore %270 %268 -%271 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %269 %270 -%272 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_3 -%273 = OpLoad %v4float %272 -%274 = OpCompositeExtract %float %273 2 -%275 = OpVectorTimesScalar %v4float %271 %274 -%276 = OpFAdd %v4float %265 %275 -OpStore %_6_output %276 -%277 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 -%278 = OpLoad %v2float %277 -%279 = OpFAdd %v2float %268 %278 -OpStore %_7_coord %279 -OpStore %_8_coordSampled %279 -OpStore %280 %100 -OpStore %281 %279 -%282 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %280 %281 -%283 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_3 -%284 = OpLoad %v4float %283 -%285 = OpCompositeExtract %float %284 3 -%286 = OpVectorTimesScalar %v4float %282 %285 -%287 = OpFAdd %v4float %276 %286 -OpStore %_6_output %287 -%288 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 -%289 = OpLoad %v2float %288 -%290 = OpFAdd %v2float %279 %289 -OpStore %_7_coord %290 -OpStore %_8_coordSampled %290 -OpStore %291 %100 -OpStore %292 %290 -%293 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %291 %292 -%294 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_4 -%295 = OpLoad %v4float %294 -%296 = OpCompositeExtract %float %295 0 -%297 = OpVectorTimesScalar %v4float %293 %296 -%298 = OpFAdd %v4float %287 %297 -OpStore %_6_output %298 -%299 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 -%300 = OpLoad %v2float %299 -%301 = OpFAdd %v2float %290 %300 -OpStore %_7_coord %301 -OpStore %_8_coordSampled %301 -OpStore %302 %100 -OpStore %303 %301 -%304 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %302 %303 -%305 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_4 -%306 = OpLoad %v4float %305 -%307 = OpCompositeExtract %float %306 1 -%308 = OpVectorTimesScalar %v4float %304 %307 -%309 = OpFAdd %v4float %298 %308 -OpStore %_6_output %309 -%310 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 -%311 = OpLoad %v2float %310 -%312 = OpFAdd %v2float %301 %311 -OpStore %_7_coord %312 -OpStore %_8_coordSampled %312 -OpStore %313 %100 -OpStore %314 %312 -%315 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %313 %314 -%316 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_4 -%317 = OpLoad %v4float %316 -%318 = OpCompositeExtract %float %317 2 -%319 = OpVectorTimesScalar %v4float %315 %318 -%320 = OpFAdd %v4float %309 %319 -OpStore %_6_output %320 -%321 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 -%322 = OpLoad %v2float %321 -%323 = OpFAdd %v2float %312 %322 -OpStore %_7_coord %323 -OpStore %_8_coordSampled %323 -OpStore %324 %100 -OpStore %325 %323 -%326 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %324 %325 -%327 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_4 -%328 = OpLoad %v4float %327 -%329 = OpCompositeExtract %float %328 3 -%330 = OpVectorTimesScalar %v4float %326 %329 -%331 = OpFAdd %v4float %320 %330 -OpStore %_6_output %331 -%332 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 -%333 = OpLoad %v2float %332 -%334 = OpFAdd %v2float %323 %333 -OpStore %_7_coord %334 -OpStore %_8_coordSampled %334 -OpStore %335 %100 -OpStore %336 %334 -%337 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %335 %336 -%338 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_5 -%339 = OpLoad %v4float %338 -%340 = OpCompositeExtract %float %339 0 -%341 = OpVectorTimesScalar %v4float %337 %340 -%342 = OpFAdd %v4float %331 %341 -OpStore %_6_output %342 -%343 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 -%344 = OpLoad %v2float %343 -%345 = OpFAdd %v2float %334 %344 -OpStore %_7_coord %345 -OpStore %_8_coordSampled %345 -OpStore %346 %100 -OpStore %347 %345 -%348 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %346 %347 -%349 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_5 -%350 = OpLoad %v4float %349 -%351 = OpCompositeExtract %float %350 1 -%352 = OpVectorTimesScalar %v4float %348 %351 -%353 = OpFAdd %v4float %342 %352 -OpStore %_6_output %353 -%354 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 -%355 = OpLoad %v2float %354 -%356 = OpFAdd %v2float %345 %355 -OpStore %_7_coord %356 -OpStore %_8_coordSampled %356 -OpStore %357 %100 -OpStore %358 %356 -%359 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %357 %358 -%360 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_5 -%361 = OpLoad %v4float %360 -%362 = OpCompositeExtract %float %361 2 -%363 = OpVectorTimesScalar %v4float %359 %362 -%364 = OpFAdd %v4float %353 %363 -OpStore %_6_output %364 -%365 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 -%366 = OpLoad %v2float %365 -%367 = OpFAdd %v2float %356 %366 -OpStore %_7_coord %367 -OpStore %_8_coordSampled %367 -OpStore %368 %100 -OpStore %369 %367 -%370 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %368 %369 -%371 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_5 -%372 = OpLoad %v4float %371 -%373 = OpCompositeExtract %float %372 3 -%374 = OpVectorTimesScalar %v4float %370 %373 -%375 = OpFAdd %v4float %364 %374 -OpStore %_6_output %375 -%376 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 -%377 = OpLoad %v2float %376 -%378 = OpFAdd %v2float %367 %377 -OpStore %_7_coord %378 -OpStore %_8_coordSampled %378 -OpStore %379 %100 -OpStore %380 %378 -%381 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %379 %380 -%382 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_6 -%383 = OpLoad %v4float %382 -%384 = OpCompositeExtract %float %383 0 -%385 = OpVectorTimesScalar %v4float %381 %384 -%386 = OpFAdd %v4float %375 %385 -OpStore %_6_output %386 -%387 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 -%388 = OpLoad %v2float %387 -%389 = OpFAdd %v2float %378 %388 -OpStore %_7_coord %389 -%390 = OpFMul %v4float %386 %100 -OpStore %_6_output %390 -OpStore %output_Stage1 %390 -%392 = OpFMul %v4float %390 %100 -OpStore %sk_FragColor %392 -OpReturn -OpFunctionEnd + OpStore %outputColor_Stage0 %100 + OpStore %outputCoverage_Stage0 %100 + OpStore %_6_output %103 + %105 = OpLoad %v2float %vLocalCoord_Stage0 + %107 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 + %109 = OpLoad %v2float %107 + %110 = OpVectorTimesScalar %v2float %109 %float_12 + %111 = OpFSub %v2float %105 %110 + OpStore %_7_coord %111 + OpStore %_8_coordSampled %113 + OpStore %_8_coordSampled %111 + OpStore %114 %100 + OpStore %115 %111 + %116 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %114 %115 + %118 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_0 + %119 = OpLoad %v4float %118 + %120 = OpCompositeExtract %float %119 0 + %121 = OpVectorTimesScalar %v4float %116 %120 + %122 = OpFAdd %v4float %103 %121 + OpStore %_6_output %122 + %123 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 + %124 = OpLoad %v2float %123 + %125 = OpFAdd %v2float %111 %124 + OpStore %_7_coord %125 + OpStore %_8_coordSampled %125 + OpStore %126 %100 + OpStore %127 %125 + %128 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %126 %127 + %129 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_0 + %130 = OpLoad %v4float %129 + %131 = OpCompositeExtract %float %130 1 + %132 = OpVectorTimesScalar %v4float %128 %131 + %133 = OpFAdd %v4float %122 %132 + OpStore %_6_output %133 + %134 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 + %135 = OpLoad %v2float %134 + %136 = OpFAdd %v2float %125 %135 + OpStore %_7_coord %136 + OpStore %_8_coordSampled %136 + OpStore %137 %100 + OpStore %138 %136 + %139 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %137 %138 + %140 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_0 + %141 = OpLoad %v4float %140 + %142 = OpCompositeExtract %float %141 2 + %143 = OpVectorTimesScalar %v4float %139 %142 + %144 = OpFAdd %v4float %133 %143 + OpStore %_6_output %144 + %145 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 + %146 = OpLoad %v2float %145 + %147 = OpFAdd %v2float %136 %146 + OpStore %_7_coord %147 + OpStore %_8_coordSampled %147 + OpStore %148 %100 + OpStore %149 %147 + %150 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %148 %149 + %151 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_0 + %152 = OpLoad %v4float %151 + %153 = OpCompositeExtract %float %152 3 + %154 = OpVectorTimesScalar %v4float %150 %153 + %155 = OpFAdd %v4float %144 %154 + OpStore %_6_output %155 + %156 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 + %157 = OpLoad %v2float %156 + %158 = OpFAdd %v2float %147 %157 + OpStore %_7_coord %158 + OpStore %_8_coordSampled %158 + OpStore %159 %100 + OpStore %160 %158 + %161 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %159 %160 + %162 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_1 + %163 = OpLoad %v4float %162 + %164 = OpCompositeExtract %float %163 0 + %165 = OpVectorTimesScalar %v4float %161 %164 + %166 = OpFAdd %v4float %155 %165 + OpStore %_6_output %166 + %167 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 + %168 = OpLoad %v2float %167 + %169 = OpFAdd %v2float %158 %168 + OpStore %_7_coord %169 + OpStore %_8_coordSampled %169 + OpStore %170 %100 + OpStore %171 %169 + %172 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %170 %171 + %173 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_1 + %174 = OpLoad %v4float %173 + %175 = OpCompositeExtract %float %174 1 + %176 = OpVectorTimesScalar %v4float %172 %175 + %177 = OpFAdd %v4float %166 %176 + OpStore %_6_output %177 + %178 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 + %179 = OpLoad %v2float %178 + %180 = OpFAdd %v2float %169 %179 + OpStore %_7_coord %180 + OpStore %_8_coordSampled %180 + OpStore %181 %100 + OpStore %182 %180 + %183 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %181 %182 + %184 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_1 + %185 = OpLoad %v4float %184 + %186 = OpCompositeExtract %float %185 2 + %187 = OpVectorTimesScalar %v4float %183 %186 + %188 = OpFAdd %v4float %177 %187 + OpStore %_6_output %188 + %189 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 + %190 = OpLoad %v2float %189 + %191 = OpFAdd %v2float %180 %190 + OpStore %_7_coord %191 + OpStore %_8_coordSampled %191 + OpStore %192 %100 + OpStore %193 %191 + %194 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %192 %193 + %195 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_1 + %196 = OpLoad %v4float %195 + %197 = OpCompositeExtract %float %196 3 + %198 = OpVectorTimesScalar %v4float %194 %197 + %199 = OpFAdd %v4float %188 %198 + OpStore %_6_output %199 + %200 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 + %201 = OpLoad %v2float %200 + %202 = OpFAdd %v2float %191 %201 + OpStore %_7_coord %202 + OpStore %_8_coordSampled %202 + OpStore %203 %100 + OpStore %204 %202 + %205 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %203 %204 + %206 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_2 + %207 = OpLoad %v4float %206 + %208 = OpCompositeExtract %float %207 0 + %209 = OpVectorTimesScalar %v4float %205 %208 + %210 = OpFAdd %v4float %199 %209 + OpStore %_6_output %210 + %211 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 + %212 = OpLoad %v2float %211 + %213 = OpFAdd %v2float %202 %212 + OpStore %_7_coord %213 + OpStore %_8_coordSampled %213 + OpStore %214 %100 + OpStore %215 %213 + %216 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %214 %215 + %217 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_2 + %218 = OpLoad %v4float %217 + %219 = OpCompositeExtract %float %218 1 + %220 = OpVectorTimesScalar %v4float %216 %219 + %221 = OpFAdd %v4float %210 %220 + OpStore %_6_output %221 + %222 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 + %223 = OpLoad %v2float %222 + %224 = OpFAdd %v2float %213 %223 + OpStore %_7_coord %224 + OpStore %_8_coordSampled %224 + OpStore %225 %100 + OpStore %226 %224 + %227 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %225 %226 + %228 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_2 + %229 = OpLoad %v4float %228 + %230 = OpCompositeExtract %float %229 2 + %231 = OpVectorTimesScalar %v4float %227 %230 + %232 = OpFAdd %v4float %221 %231 + OpStore %_6_output %232 + %233 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 + %234 = OpLoad %v2float %233 + %235 = OpFAdd %v2float %224 %234 + OpStore %_7_coord %235 + OpStore %_8_coordSampled %235 + OpStore %236 %100 + OpStore %237 %235 + %238 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %236 %237 + %239 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_2 + %240 = OpLoad %v4float %239 + %241 = OpCompositeExtract %float %240 3 + %242 = OpVectorTimesScalar %v4float %238 %241 + %243 = OpFAdd %v4float %232 %242 + OpStore %_6_output %243 + %244 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 + %245 = OpLoad %v2float %244 + %246 = OpFAdd %v2float %235 %245 + OpStore %_7_coord %246 + OpStore %_8_coordSampled %246 + OpStore %247 %100 + OpStore %248 %246 + %249 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %247 %248 + %250 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_3 + %251 = OpLoad %v4float %250 + %252 = OpCompositeExtract %float %251 0 + %253 = OpVectorTimesScalar %v4float %249 %252 + %254 = OpFAdd %v4float %243 %253 + OpStore %_6_output %254 + %255 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 + %256 = OpLoad %v2float %255 + %257 = OpFAdd %v2float %246 %256 + OpStore %_7_coord %257 + OpStore %_8_coordSampled %257 + OpStore %258 %100 + OpStore %259 %257 + %260 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %258 %259 + %261 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_3 + %262 = OpLoad %v4float %261 + %263 = OpCompositeExtract %float %262 1 + %264 = OpVectorTimesScalar %v4float %260 %263 + %265 = OpFAdd %v4float %254 %264 + OpStore %_6_output %265 + %266 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 + %267 = OpLoad %v2float %266 + %268 = OpFAdd %v2float %257 %267 + OpStore %_7_coord %268 + OpStore %_8_coordSampled %268 + OpStore %269 %100 + OpStore %270 %268 + %271 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %269 %270 + %272 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_3 + %273 = OpLoad %v4float %272 + %274 = OpCompositeExtract %float %273 2 + %275 = OpVectorTimesScalar %v4float %271 %274 + %276 = OpFAdd %v4float %265 %275 + OpStore %_6_output %276 + %277 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 + %278 = OpLoad %v2float %277 + %279 = OpFAdd %v2float %268 %278 + OpStore %_7_coord %279 + OpStore %_8_coordSampled %279 + OpStore %280 %100 + OpStore %281 %279 + %282 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %280 %281 + %283 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_3 + %284 = OpLoad %v4float %283 + %285 = OpCompositeExtract %float %284 3 + %286 = OpVectorTimesScalar %v4float %282 %285 + %287 = OpFAdd %v4float %276 %286 + OpStore %_6_output %287 + %288 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 + %289 = OpLoad %v2float %288 + %290 = OpFAdd %v2float %279 %289 + OpStore %_7_coord %290 + OpStore %_8_coordSampled %290 + OpStore %291 %100 + OpStore %292 %290 + %293 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %291 %292 + %294 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_4 + %295 = OpLoad %v4float %294 + %296 = OpCompositeExtract %float %295 0 + %297 = OpVectorTimesScalar %v4float %293 %296 + %298 = OpFAdd %v4float %287 %297 + OpStore %_6_output %298 + %299 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 + %300 = OpLoad %v2float %299 + %301 = OpFAdd %v2float %290 %300 + OpStore %_7_coord %301 + OpStore %_8_coordSampled %301 + OpStore %302 %100 + OpStore %303 %301 + %304 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %302 %303 + %305 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_4 + %306 = OpLoad %v4float %305 + %307 = OpCompositeExtract %float %306 1 + %308 = OpVectorTimesScalar %v4float %304 %307 + %309 = OpFAdd %v4float %298 %308 + OpStore %_6_output %309 + %310 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 + %311 = OpLoad %v2float %310 + %312 = OpFAdd %v2float %301 %311 + OpStore %_7_coord %312 + OpStore %_8_coordSampled %312 + OpStore %313 %100 + OpStore %314 %312 + %315 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %313 %314 + %316 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_4 + %317 = OpLoad %v4float %316 + %318 = OpCompositeExtract %float %317 2 + %319 = OpVectorTimesScalar %v4float %315 %318 + %320 = OpFAdd %v4float %309 %319 + OpStore %_6_output %320 + %321 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 + %322 = OpLoad %v2float %321 + %323 = OpFAdd %v2float %312 %322 + OpStore %_7_coord %323 + OpStore %_8_coordSampled %323 + OpStore %324 %100 + OpStore %325 %323 + %326 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %324 %325 + %327 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_4 + %328 = OpLoad %v4float %327 + %329 = OpCompositeExtract %float %328 3 + %330 = OpVectorTimesScalar %v4float %326 %329 + %331 = OpFAdd %v4float %320 %330 + OpStore %_6_output %331 + %332 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 + %333 = OpLoad %v2float %332 + %334 = OpFAdd %v2float %323 %333 + OpStore %_7_coord %334 + OpStore %_8_coordSampled %334 + OpStore %335 %100 + OpStore %336 %334 + %337 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %335 %336 + %338 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_5 + %339 = OpLoad %v4float %338 + %340 = OpCompositeExtract %float %339 0 + %341 = OpVectorTimesScalar %v4float %337 %340 + %342 = OpFAdd %v4float %331 %341 + OpStore %_6_output %342 + %343 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 + %344 = OpLoad %v2float %343 + %345 = OpFAdd %v2float %334 %344 + OpStore %_7_coord %345 + OpStore %_8_coordSampled %345 + OpStore %346 %100 + OpStore %347 %345 + %348 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %346 %347 + %349 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_5 + %350 = OpLoad %v4float %349 + %351 = OpCompositeExtract %float %350 1 + %352 = OpVectorTimesScalar %v4float %348 %351 + %353 = OpFAdd %v4float %342 %352 + OpStore %_6_output %353 + %354 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 + %355 = OpLoad %v2float %354 + %356 = OpFAdd %v2float %345 %355 + OpStore %_7_coord %356 + OpStore %_8_coordSampled %356 + OpStore %357 %100 + OpStore %358 %356 + %359 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %357 %358 + %360 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_5 + %361 = OpLoad %v4float %360 + %362 = OpCompositeExtract %float %361 2 + %363 = OpVectorTimesScalar %v4float %359 %362 + %364 = OpFAdd %v4float %353 %363 + OpStore %_6_output %364 + %365 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 + %366 = OpLoad %v2float %365 + %367 = OpFAdd %v2float %356 %366 + OpStore %_7_coord %367 + OpStore %_8_coordSampled %367 + OpStore %368 %100 + OpStore %369 %367 + %370 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %368 %369 + %371 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_5 + %372 = OpLoad %v4float %371 + %373 = OpCompositeExtract %float %372 3 + %374 = OpVectorTimesScalar %v4float %370 %373 + %375 = OpFAdd %v4float %364 %374 + OpStore %_6_output %375 + %376 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 + %377 = OpLoad %v2float %376 + %378 = OpFAdd %v2float %367 %377 + OpStore %_7_coord %378 + OpStore %_8_coordSampled %378 + OpStore %379 %100 + OpStore %380 %378 + %381 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0_h4h4f2 %379 %380 + %382 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_6 + %383 = OpLoad %v4float %382 + %384 = OpCompositeExtract %float %383 0 + %385 = OpVectorTimesScalar %v4float %381 %384 + %386 = OpFAdd %v4float %375 %385 + OpStore %_6_output %386 + %387 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1 + %388 = OpLoad %v2float %387 + %389 = OpFAdd %v2float %378 %388 + OpStore %_7_coord %389 + %390 = OpFMul %v4float %386 %100 + OpStore %_6_output %390 + OpStore %output_Stage1 %390 + %392 = OpFMul %v4float %390 %100 + OpStore %sk_FragColor %392 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/realistic/GaussianBlur.wgsl b/tests/sksl/realistic/GaussianBlur.wgsl new file mode 100644 index 000000000000..a580212a7212 --- /dev/null +++ b/tests/sksl/realistic/GaussianBlur.wgsl @@ -0,0 +1,164 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @location(0) vLocalCoord_Stage0: vec2, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct uniformBuffer { + @size(16) sk_RTAdjust: vec4, + @size(16) uIncrement_Stage1_c0: vec2, + @size(112) uKernel_Stage1_c0: array, 7>, + @size(48) umatrix_Stage1_c0_c0: mat3x3, + @size(16) uborder_Stage1_c0_c0_c0: vec4, + @size(16) usubset_Stage1_c0_c0_c0: vec4, + unorm_Stage1_c0_c0_c0: vec4, +}; +@group(0) @binding(0) var _uniform0 : uniformBuffer; +@group(0) @binding(10001) var uTextureSampler_0_Stage1_Sampler: sampler; +@group(0) @binding(10002) var uTextureSampler_0_Stage1_Texture: texture_2d; +fn MatrixEffect_Stage1_c0_c0_h4h4f2(_skParam0: vec4, _skParam1: vec2) -> vec4 { + let _input = _skParam0; + let _coords = _skParam1; + { + var _1_inCoord: vec2 = (_uniform0.umatrix_Stage1_c0_c0 * vec3(_coords, 1.0)).xy; + _1_inCoord = _1_inCoord * _uniform0.unorm_Stage1_c0_c0_c0.xy; + var _2_subsetCoord: vec2; + _2_subsetCoord.x = _1_inCoord.x; + _2_subsetCoord.y = _1_inCoord.y; + var _3_clampedCoord: vec2 = _2_subsetCoord; + var _4_textureColor: vec4 = textureSample(uTextureSampler_0_Stage1_Texture, uTextureSampler_0_Stage1_Sampler, _3_clampedCoord * _uniform0.unorm_Stage1_c0_c0_c0.zw); + let _skTemp3 = floor(_1_inCoord.x + 0.001); + var _5_snappedX: f32 = _skTemp3 + 0.5; + if (_5_snappedX < _uniform0.usubset_Stage1_c0_c0_c0.x) || (_5_snappedX > _uniform0.usubset_Stage1_c0_c0_c0.z) { + { + _4_textureColor = _uniform0.uborder_Stage1_c0_c0_c0; + } + } + return _4_textureColor; + } +} +fn main(_stageIn: FSIn, _stageOut: ptr) { + { + var outputColor_Stage0: vec4; + var outputCoverage_Stage0: vec4; + { + outputColor_Stage0 = vec4(1.0); + outputCoverage_Stage0 = vec4(1.0); + } + var _6_output: vec4 = vec4(0.0); + var _7_coord: vec2 = _stageIn.vLocalCoord_Stage0 - vec2(12.0 * _uniform0.uIncrement_Stage1_c0); + var _8_coordSampled: vec2 = vec2(0.0); + _8_coordSampled = _7_coord; + let _skTemp4 = MatrixEffect_Stage1_c0_c0_h4h4f2(outputColor_Stage0, _8_coordSampled); + _6_output = _6_output + _skTemp4 * _uniform0.uKernel_Stage1_c0[0].x; + _7_coord = _7_coord + vec2(_uniform0.uIncrement_Stage1_c0); + _8_coordSampled = _7_coord; + let _skTemp5 = MatrixEffect_Stage1_c0_c0_h4h4f2(outputColor_Stage0, _8_coordSampled); + _6_output = _6_output + _skTemp5 * _uniform0.uKernel_Stage1_c0[0].y; + _7_coord = _7_coord + vec2(_uniform0.uIncrement_Stage1_c0); + _8_coordSampled = _7_coord; + let _skTemp6 = MatrixEffect_Stage1_c0_c0_h4h4f2(outputColor_Stage0, _8_coordSampled); + _6_output = _6_output + _skTemp6 * _uniform0.uKernel_Stage1_c0[0].z; + _7_coord = _7_coord + vec2(_uniform0.uIncrement_Stage1_c0); + _8_coordSampled = _7_coord; + let _skTemp7 = MatrixEffect_Stage1_c0_c0_h4h4f2(outputColor_Stage0, _8_coordSampled); + _6_output = _6_output + _skTemp7 * _uniform0.uKernel_Stage1_c0[0].w; + _7_coord = _7_coord + vec2(_uniform0.uIncrement_Stage1_c0); + _8_coordSampled = _7_coord; + let _skTemp8 = MatrixEffect_Stage1_c0_c0_h4h4f2(outputColor_Stage0, _8_coordSampled); + _6_output = _6_output + _skTemp8 * _uniform0.uKernel_Stage1_c0[1].x; + _7_coord = _7_coord + vec2(_uniform0.uIncrement_Stage1_c0); + _8_coordSampled = _7_coord; + let _skTemp9 = MatrixEffect_Stage1_c0_c0_h4h4f2(outputColor_Stage0, _8_coordSampled); + _6_output = _6_output + _skTemp9 * _uniform0.uKernel_Stage1_c0[1].y; + _7_coord = _7_coord + vec2(_uniform0.uIncrement_Stage1_c0); + _8_coordSampled = _7_coord; + let _skTemp10 = MatrixEffect_Stage1_c0_c0_h4h4f2(outputColor_Stage0, _8_coordSampled); + _6_output = _6_output + _skTemp10 * _uniform0.uKernel_Stage1_c0[1].z; + _7_coord = _7_coord + vec2(_uniform0.uIncrement_Stage1_c0); + _8_coordSampled = _7_coord; + let _skTemp11 = MatrixEffect_Stage1_c0_c0_h4h4f2(outputColor_Stage0, _8_coordSampled); + _6_output = _6_output + _skTemp11 * _uniform0.uKernel_Stage1_c0[1].w; + _7_coord = _7_coord + vec2(_uniform0.uIncrement_Stage1_c0); + _8_coordSampled = _7_coord; + let _skTemp12 = MatrixEffect_Stage1_c0_c0_h4h4f2(outputColor_Stage0, _8_coordSampled); + _6_output = _6_output + _skTemp12 * _uniform0.uKernel_Stage1_c0[2].x; + _7_coord = _7_coord + vec2(_uniform0.uIncrement_Stage1_c0); + _8_coordSampled = _7_coord; + let _skTemp13 = MatrixEffect_Stage1_c0_c0_h4h4f2(outputColor_Stage0, _8_coordSampled); + _6_output = _6_output + _skTemp13 * _uniform0.uKernel_Stage1_c0[2].y; + _7_coord = _7_coord + vec2(_uniform0.uIncrement_Stage1_c0); + _8_coordSampled = _7_coord; + let _skTemp14 = MatrixEffect_Stage1_c0_c0_h4h4f2(outputColor_Stage0, _8_coordSampled); + _6_output = _6_output + _skTemp14 * _uniform0.uKernel_Stage1_c0[2].z; + _7_coord = _7_coord + vec2(_uniform0.uIncrement_Stage1_c0); + _8_coordSampled = _7_coord; + let _skTemp15 = MatrixEffect_Stage1_c0_c0_h4h4f2(outputColor_Stage0, _8_coordSampled); + _6_output = _6_output + _skTemp15 * _uniform0.uKernel_Stage1_c0[2].w; + _7_coord = _7_coord + vec2(_uniform0.uIncrement_Stage1_c0); + _8_coordSampled = _7_coord; + let _skTemp16 = MatrixEffect_Stage1_c0_c0_h4h4f2(outputColor_Stage0, _8_coordSampled); + _6_output = _6_output + _skTemp16 * _uniform0.uKernel_Stage1_c0[3].x; + _7_coord = _7_coord + vec2(_uniform0.uIncrement_Stage1_c0); + _8_coordSampled = _7_coord; + let _skTemp17 = MatrixEffect_Stage1_c0_c0_h4h4f2(outputColor_Stage0, _8_coordSampled); + _6_output = _6_output + _skTemp17 * _uniform0.uKernel_Stage1_c0[3].y; + _7_coord = _7_coord + vec2(_uniform0.uIncrement_Stage1_c0); + _8_coordSampled = _7_coord; + let _skTemp18 = MatrixEffect_Stage1_c0_c0_h4h4f2(outputColor_Stage0, _8_coordSampled); + _6_output = _6_output + _skTemp18 * _uniform0.uKernel_Stage1_c0[3].z; + _7_coord = _7_coord + vec2(_uniform0.uIncrement_Stage1_c0); + _8_coordSampled = _7_coord; + let _skTemp19 = MatrixEffect_Stage1_c0_c0_h4h4f2(outputColor_Stage0, _8_coordSampled); + _6_output = _6_output + _skTemp19 * _uniform0.uKernel_Stage1_c0[3].w; + _7_coord = _7_coord + vec2(_uniform0.uIncrement_Stage1_c0); + _8_coordSampled = _7_coord; + let _skTemp20 = MatrixEffect_Stage1_c0_c0_h4h4f2(outputColor_Stage0, _8_coordSampled); + _6_output = _6_output + _skTemp20 * _uniform0.uKernel_Stage1_c0[4].x; + _7_coord = _7_coord + vec2(_uniform0.uIncrement_Stage1_c0); + _8_coordSampled = _7_coord; + let _skTemp21 = MatrixEffect_Stage1_c0_c0_h4h4f2(outputColor_Stage0, _8_coordSampled); + _6_output = _6_output + _skTemp21 * _uniform0.uKernel_Stage1_c0[4].y; + _7_coord = _7_coord + vec2(_uniform0.uIncrement_Stage1_c0); + _8_coordSampled = _7_coord; + let _skTemp22 = MatrixEffect_Stage1_c0_c0_h4h4f2(outputColor_Stage0, _8_coordSampled); + _6_output = _6_output + _skTemp22 * _uniform0.uKernel_Stage1_c0[4].z; + _7_coord = _7_coord + vec2(_uniform0.uIncrement_Stage1_c0); + _8_coordSampled = _7_coord; + let _skTemp23 = MatrixEffect_Stage1_c0_c0_h4h4f2(outputColor_Stage0, _8_coordSampled); + _6_output = _6_output + _skTemp23 * _uniform0.uKernel_Stage1_c0[4].w; + _7_coord = _7_coord + vec2(_uniform0.uIncrement_Stage1_c0); + _8_coordSampled = _7_coord; + let _skTemp24 = MatrixEffect_Stage1_c0_c0_h4h4f2(outputColor_Stage0, _8_coordSampled); + _6_output = _6_output + _skTemp24 * _uniform0.uKernel_Stage1_c0[5].x; + _7_coord = _7_coord + vec2(_uniform0.uIncrement_Stage1_c0); + _8_coordSampled = _7_coord; + let _skTemp25 = MatrixEffect_Stage1_c0_c0_h4h4f2(outputColor_Stage0, _8_coordSampled); + _6_output = _6_output + _skTemp25 * _uniform0.uKernel_Stage1_c0[5].y; + _7_coord = _7_coord + vec2(_uniform0.uIncrement_Stage1_c0); + _8_coordSampled = _7_coord; + let _skTemp26 = MatrixEffect_Stage1_c0_c0_h4h4f2(outputColor_Stage0, _8_coordSampled); + _6_output = _6_output + _skTemp26 * _uniform0.uKernel_Stage1_c0[5].z; + _7_coord = _7_coord + vec2(_uniform0.uIncrement_Stage1_c0); + _8_coordSampled = _7_coord; + let _skTemp27 = MatrixEffect_Stage1_c0_c0_h4h4f2(outputColor_Stage0, _8_coordSampled); + _6_output = _6_output + _skTemp27 * _uniform0.uKernel_Stage1_c0[5].w; + _7_coord = _7_coord + vec2(_uniform0.uIncrement_Stage1_c0); + _8_coordSampled = _7_coord; + let _skTemp28 = MatrixEffect_Stage1_c0_c0_h4h4f2(outputColor_Stage0, _8_coordSampled); + _6_output = _6_output + _skTemp28 * _uniform0.uKernel_Stage1_c0[6].x; + _7_coord = _7_coord + vec2(_uniform0.uIncrement_Stage1_c0); + _6_output = _6_output * outputColor_Stage0; + var output_Stage1: vec4 = _6_output; + { + (*_stageOut).sk_FragColor = output_Stage1 * outputCoverage_Stage0; + } + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(_stageIn, &_stageOut); + return _stageOut; +} diff --git a/tests/sksl/realistic/HSLColorFilter.skrp b/tests/sksl/realistic/HSLColorFilter.skrp index 85da10ea78b3..6033077071de 100644 --- a/tests/sksl/realistic/HSLColorFilter.skrp +++ b/tests/sksl/realistic/HSLColorFilter.skrp @@ -1,3 +1,10 @@ +41 instructions + +[immutable slots] +i0 = 0 +i1 = 0x3F2AAAAB (0.6666667) +i2 = 0x3EAAAAAB (0.333333343) + store_src hsl = src.rgba init_lane_masks CondMask = LoopMask = RetMask = true copy_constant $0 = 0x3F800000 (1.0) @@ -11,9 +18,7 @@ mul_float $0 *= $1 copy_slot_unmasked C = $0 copy_4_slots_unmasked $0..3 = hsl swizzle_3 $0..2 = ($0..2).xxx -copy_constant $3 = 0 -copy_constant $4 = 0x3F2AAAAB (0.6666667) -copy_constant $5 = 0x3EAAAAAB (0.333333343) +copy_3_immutables_unmasked $3..5 = i0..2 [0, 0x3F2AAAAB (0.6666667), 0x3EAAAAAB (0.333333343)] add_3_floats $0..2 += $3..5 copy_3_slots_unmasked p = $0..2 copy_3_slots_unmasked $3..5 = $0..2 diff --git a/tests/sksl/realistic/HighContrastFilter.skrp b/tests/sksl/realistic/HighContrastFilter.skrp index ac41baec4e5f..7e91e7a4fb53 100644 --- a/tests/sksl/realistic/HighContrastFilter.skrp +++ b/tests/sksl/realistic/HighContrastFilter.skrp @@ -1,12 +1,20 @@ +168 instructions + +[immutable slots] +i0 = 0x3E59B3D0 (0.2126) +i1 = 0x3F371759 (0.7152) +i2 = 0x3D93DD98 (0.0722) +i3 = 0 +i4 = 0x3F2AAAAB (0.6666667) +i5 = 0x3EAAAAAB (0.333333343) + store_src inColor = src.rgba init_lane_masks CondMask = LoopMask = RetMask = true copy_3_slots_unmasked c = inColor(0..2) copy_uniform $0 = grayscale cmpeq_imm_float $0 = equal($0, 0x3F800000 (1.0)) -branch_if_no_active_lanes_eq branch +8 (label 0 at #14) if no lanes of $0 == 0xFFFFFFFF -copy_constant $1 = 0x3E59B3D0 (0.2126) -copy_constant $2 = 0x3F371759 (0.7152) -copy_constant $3 = 0x3D93DD98 (0.0722) +branch_if_no_active_lanes_eq branch +6 (label 0 at #12) if no lanes of $0 == 0xFFFFFFFF +copy_3_immutables_unmasked $1..3 = i0..2 [0x3E59B3D0 (0.2126), 0x3F371759 (0.7152), 0x3D93DD98 (0.0722)] copy_3_slots_unmasked $4..6 = c dot_3_floats $1 = dot($1..3, $4..6) swizzle_3 $1..3 = ($1..3).xxx @@ -14,16 +22,16 @@ copy_3_slots_unmasked c = $1..3 label label 0 copy_uniform $0 = invertStyle cmpeq_imm_float $0 = equal($0, 0x3F800000 (1.0)) -branch_if_no_active_lanes_eq branch +6 (label 2 at #23) if no lanes of $0 == 0xFFFFFFFF +branch_if_no_active_lanes_eq branch +6 (label 2 at #21) if no lanes of $0 == 0xFFFFFFFF splat_3_constants $1..3 = 0x3F800000 (1.0) copy_3_slots_unmasked $4..6 = c sub_3_floats $1..3 -= $4..6 copy_3_slots_unmasked c = $1..3 -jump jump +146 (label 3 at #168) +jump jump +143 (label 3 at #163) label label 0x00000002 copy_uniform $1 = invertStyle cmpeq_imm_float $1 = equal($1, 0x40000000 (2.0)) -branch_if_no_active_lanes_eq branch +141 (label 4 at #167) if no lanes of $1 == 0xFFFFFFFF +branch_if_no_active_lanes_eq branch +138 (label 4 at #162) if no lanes of $1 == 0xFFFFFFFF copy_2_slots_unmasked $2..3 = c(0..1) max_float $2 = max($2, $3) copy_slot_unmasked $3 = c(2) @@ -67,7 +75,7 @@ sub_float $4 -= $5 mul_float $3 *= $4 add_imm_float $3 += 0x40800000 (4.0) merge_condition_mask CondMask = $13 & $14 -branch_if_no_lanes_active branch_if_no_lanes_active +8 (label 9 at #78) +branch_if_no_lanes_active branch_if_no_lanes_active +8 (label 9 at #76) copy_slot_unmasked $4 = _3_invd copy_slot_unmasked $5 = c(2) copy_slot_unmasked $6 = c(0) @@ -76,9 +84,8 @@ mul_float $4 *= $5 add_imm_float $4 += 0x40000000 (2.0) copy_slot_masked $3 = Mask($4) label label 0x00000009 -load_condition_mask CondMask = $13 merge_condition_mask CondMask = $9 & $10 -branch_if_no_lanes_active branch_if_no_lanes_active +8 (label 8 at #89) +branch_if_no_lanes_active branch_if_no_lanes_active +8 (label 8 at #86) copy_slot_unmasked $4 = _3_invd copy_2_slots_unmasked $5..6 = c(1..2) sub_float $5 -= $6 @@ -106,7 +113,7 @@ copy_slot_unmasked $11 = _7_l cmplt_float $10 = lessThan($10, $11) copy_slot_unmasked $4 = _6_sum merge_condition_mask CondMask = $9 & $10 -branch_if_no_lanes_active branch_if_no_lanes_active +5 (label 11 at #114) +branch_if_no_lanes_active branch_if_no_lanes_active +5 (label 11 at #111) copy_constant $5 = 0x40000000 (2.0) copy_slot_unmasked $6 = _6_sum sub_float $5 -= $6 @@ -135,9 +142,7 @@ mul_float $2 *= $3 copy_slot_unmasked _9_C = $2 copy_3_slots_unmasked $2..4 = c swizzle_3 $2..4 = ($2..4).xxx -copy_constant $5 = 0 -copy_constant $6 = 0x3F2AAAAB (0.6666667) -copy_constant $7 = 0x3EAAAAAB (0.333333343) +copy_3_immutables_unmasked $5..7 = i3..5 [0, 0x3F2AAAAB (0.6666667), 0x3EAAAAAB (0.333333343)] add_3_floats $2..4 += $5..7 copy_3_slots_unmasked _10_p = $2..4 copy_3_slots_unmasked $5..7 = $2..4 diff --git a/tests/sksl/realistic/RippleShader.minified.sksl b/tests/sksl/realistic/RippleShader.minified.sksl new file mode 100644 index 000000000000..fa92490b1d59 --- /dev/null +++ b/tests/sksl/realistic/RippleShader.minified.sksl @@ -0,0 +1 @@ +uniform vec2 in_origin;uniform vec2 in_touch;uniform float in_progress;uniform float in_maxRadius;uniform vec2 in_resolutionScale;uniform vec2 in_noiseScale;uniform float in_hasMask;uniform float in_noisePhase;uniform float in_turbulencePhase;uniform vec2 in_tCircle1;uniform vec2 in_tCircle2;uniform vec2 in_tCircle3;uniform vec2 in_tRotation1;uniform vec2 in_tRotation2;uniform vec2 in_tRotation3;layout(color)uniform vec4 in_color;layout(color)uniform vec4 in_sparkleColor;uniform shader in_shader;float a(vec2 b){b=fract(b*vec2(5.3987,5.4421));b+=dot(b.yx,b+vec2(21.5351,14.3137));float c=b.x*b.y;return(fract(c*95.4307)+fract(c*75.04961))-1.;}float b(float c,float d,float e){return step(d,c)*(1.-step(e,c));}float c(vec2 d,float e){float f=a(d);float g=0.;for(float h=0.;h<4.;h+=1.){float j=h*.1;float k=j+.05;float m=sin(3.14159274*(e+.35*h));g+=b(f+m,j,k);}return saturate(g)*in_sparkleColor.w;}float d(vec2 e,vec2 f,float g,float h){float i=h*.5;float j=distance(e,f);return 1.-smoothstep(1.-i,1.+i,j/g);}float e(vec2 f,vec2 g,float h,float i,float j){float k=.05*h;float l=h*i;float m=d(f,g,l+k,j);float n=d(f,g,max(l-k,0.),j);return saturate(m-n);}float f(float g,float h,float i){float j=clamp(i,g,h);return(j-g)/(h-g);}mat2 g(vec2 h){return mat2(h.x,-h.y,h.y,h.x);}float h(vec2 i,vec2 j,float k,vec2 l,vec2 m,float n){j=g(m)*(l-j)+l;j=mod(j,n)/i;float o=(n/i.y)*.5;float p=.65*o;return d(j,vec2(o),p,p*50.);}float i(vec2 j,float k){const vec2 l=vec2(.8);j=j*l;float m=h(l,j,k,in_tCircle1,in_tRotation1,.17);float n=h(l,j,k,in_tCircle2,in_tRotation2,.2);float o=h(l,j,k,in_tCircle3,in_tRotation3,.275);float p=((m*m+n)-o)*.5;return saturate(.45+.8*p);}vec4 main(vec2 j){float k=f(0.,.13,in_progress);float l=f(0.,1.,in_progress);float m=f(.4,.5,in_progress);float n=f(.4,1.,in_progress);vec2 o=mix(in_touch,in_origin,saturate(in_progress*2.));float q=e(j,o,in_maxRadius,l,1.);float r=min(k,1.-m);vec2 s=j*in_resolutionScale;vec2 t=s-mod(s,in_noiseScale);float u=i(s,in_turbulencePhase);float v=((c(t,in_noisePhase)*q)*r)*u;float w=min(k,1.-n);float x=(d(j,o,in_maxRadius*l,1.)*w)*in_color.w;vec4 y=vec4(in_color.xyz*x,x);vec4 z=vec4(in_sparkleColor.xyz*in_sparkleColor.w,in_sparkleColor.w);float A=float(in_hasMask==1.?(in_shader.eval(j).w>0.?1.:0.):1.);return mix(y,z,v)*A;} diff --git a/tests/sksl/realistic/RippleShader.skrp b/tests/sksl/realistic/RippleShader.skrp new file mode 100644 index 000000000000..6edabdf6d9b0 --- /dev/null +++ b/tests/sksl/realistic/RippleShader.skrp @@ -0,0 +1,527 @@ +498 instructions, 1 invocations + +[immutable slots] +i0 = 0x40490FDB (3.14159274) +i1 = 0x3F4CCCCD (0.8) +i2 = 0x3F4CCCCD (0.8) +i3 = 0x40ACC227 (5.3987) +i4 = 0x40AE25AF (5.4421) +i5 = 0x41AC47E3 (21.5351) +i6 = 0x416504EA (14.3137) + +store_src_rg p = src.rg +init_lane_masks CondMask = LoopMask = RetMask = true +copy_constant start = 0 +copy_constant end = 0x3E051EB8 (0.13) +copy_uniform progress = in_progress +copy_slot_unmasked $0 = progress +copy_slot_unmasked $1 = start +max_float $0 = max($0, $1) +copy_slot_unmasked $1 = end +min_float $0 = min($0, $1) +copy_slot_unmasked sub = $0 +copy_slot_unmasked $1 = start +sub_float $0 -= $1 +copy_slot_unmasked $1 = end +copy_slot_unmasked $2 = start +sub_float $1 -= $2 +div_float $0 /= $1 +label label 0 +copy_slot_unmasked fadeIn = $0 +copy_constant start = 0 +copy_constant end = 0x3F800000 (1.0) +copy_uniform progress = in_progress +copy_slot_unmasked $0 = progress +copy_slot_unmasked $1 = start +max_float $0 = max($0, $1) +copy_slot_unmasked $1 = end +min_float $0 = min($0, $1) +copy_slot_unmasked sub = $0 +copy_slot_unmasked $1 = start +sub_float $0 -= $1 +copy_slot_unmasked $1 = end +copy_slot_unmasked $2 = start +sub_float $1 -= $2 +div_float $0 /= $1 +label label 0x00000001 +copy_slot_unmasked scaleIn = $0 +copy_constant start = 0x3ECCCCCD (0.4) +copy_constant end = 0x3F000000 (0.5) +copy_uniform progress = in_progress +copy_slot_unmasked $0 = progress +copy_slot_unmasked $1 = start +max_float $0 = max($0, $1) +copy_slot_unmasked $1 = end +min_float $0 = min($0, $1) +copy_slot_unmasked sub = $0 +copy_slot_unmasked $1 = start +sub_float $0 -= $1 +copy_slot_unmasked $1 = end +copy_slot_unmasked $2 = start +sub_float $1 -= $2 +div_float $0 /= $1 +label label 0x00000002 +copy_slot_unmasked fadeOutNoise = $0 +copy_constant start = 0x3ECCCCCD (0.4) +copy_constant end = 0x3F800000 (1.0) +copy_uniform progress = in_progress +copy_slot_unmasked $0 = progress +copy_slot_unmasked $1 = start +max_float $0 = max($0, $1) +copy_slot_unmasked $1 = end +min_float $0 = min($0, $1) +copy_slot_unmasked sub = $0 +copy_slot_unmasked $1 = start +sub_float $0 -= $1 +copy_slot_unmasked $1 = end +copy_slot_unmasked $2 = start +sub_float $1 -= $2 +div_float $0 /= $1 +label label 0x00000003 +copy_slot_unmasked fadeOutRipple = $0 +copy_uniform $0 = in_progress +mul_imm_float $0 *= 0x40000000 (2.0) +max_imm_float $0 = max($0, 0) +min_imm_float $0 = min($0, 0x3F800000 (1.0)) +copy_slot_unmasked $1 = $0 +copy_2_uniforms $2..3 = in_touch +copy_2_uniforms $4..5 = in_origin +mix_2_floats $0..1 = mix($2..3, $4..5, $0..1) +copy_2_slots_unmasked center = $0..1 +copy_uniform $0 = in_maxRadius +mul_imm_float $0 *= 0x3D4CCCCD (0.05) +copy_slot_unmasked _3_thickness = $0 +copy_uniform $0 = in_maxRadius +copy_slot_unmasked $1 = scaleIn +mul_float $0 *= $1 +copy_slot_unmasked _4_currentRadius = $0 +copy_2_slots_unmasked uv = p +copy_2_slots_unmasked xy = center +copy_slot_unmasked $0 = _4_currentRadius +copy_slot_unmasked $1 = _3_thickness +add_float $0 += $1 +copy_slot_unmasked radius = $0 +copy_constant blur = 0x3F800000 (1.0) +copy_slot_unmasked $0 = blur +mul_imm_float $0 *= 0x3F000000 (0.5) +copy_slot_unmasked blurHalf = $0 +copy_4_slots_unmasked $0..3 = uv, xy +sub_2_floats $0..1 -= $2..3 +copy_2_slots_unmasked $2..3 = $0..1 +dot_2_floats $0 = dot($0..1, $2..3) +sqrt_float $0 = sqrt($0) +copy_slot_unmasked d = $0 +splat_2_constants $0..1 = 0x3F800000 (1.0) +copy_slot_unmasked $2 = blurHalf +sub_float $1 -= $2 +copy_slot_unmasked $2 = blurHalf +add_imm_float $2 += 0x3F800000 (1.0) +copy_slot_unmasked $3 = d +copy_slot_unmasked $4 = radius +div_float $3 /= $4 +smoothstep_n_floats $1 = smoothstep($1, $2, $3) +sub_float $0 -= $1 +label label 0x00000004 +copy_slot_unmasked _5_circle_outer = $0 +copy_2_slots_unmasked uv = p +copy_2_slots_unmasked xy = center +copy_slot_unmasked $0 = _4_currentRadius +copy_slot_unmasked $1 = _3_thickness +sub_float $0 -= $1 +max_imm_float $0 = max($0, 0) +copy_slot_unmasked radius = $0 +copy_constant blur = 0x3F800000 (1.0) +copy_slot_unmasked $0 = blur +mul_imm_float $0 *= 0x3F000000 (0.5) +copy_slot_unmasked blurHalf = $0 +copy_4_slots_unmasked $0..3 = uv, xy +sub_2_floats $0..1 -= $2..3 +copy_2_slots_unmasked $2..3 = $0..1 +dot_2_floats $0 = dot($0..1, $2..3) +sqrt_float $0 = sqrt($0) +copy_slot_unmasked d = $0 +splat_2_constants $0..1 = 0x3F800000 (1.0) +copy_slot_unmasked $2 = blurHalf +sub_float $1 -= $2 +copy_slot_unmasked $2 = blurHalf +add_imm_float $2 += 0x3F800000 (1.0) +copy_slot_unmasked $3 = d +copy_slot_unmasked $4 = radius +div_float $3 /= $4 +smoothstep_n_floats $1 = smoothstep($1, $2, $3) +sub_float $0 -= $1 +label label 0x00000005 +copy_slot_unmasked _6_circle_inner = $0 +copy_slot_unmasked $0 = _5_circle_outer +copy_slot_unmasked $1 = _6_circle_inner +sub_float $0 -= $1 +max_imm_float $0 = max($0, 0) +min_imm_float $0 = min($0, 0x3F800000 (1.0)) +copy_slot_unmasked ring = $0 +copy_slot_unmasked $0 = fadeIn +copy_constant $1 = 0x3F800000 (1.0) +copy_slot_unmasked $2 = fadeOutNoise +sub_float $1 -= $2 +min_float $0 = min($0, $1) +copy_slot_unmasked alpha = $0 +copy_2_slots_unmasked $0..1 = p +copy_2_uniforms $2..3 = in_resolutionScale +mul_2_floats $0..1 *= $2..3 +copy_2_slots_unmasked uv₁ = $0..1 +copy_2_slots_unmasked $2..3 = uv₁ +copy_2_uniforms $4..5 = in_noiseScale +mod_2_floats $2..3 = mod($2..3, $4..5) +sub_2_floats $0..1 -= $2..3 +copy_2_slots_unmasked densityUv = $0..1 +copy_2_slots_unmasked _7_uv = uv₁ +copy_2_slots_unmasked $0..1 = _7_uv +splat_2_constants $2..3 = 0x3F4CCCCD (0.8) +mul_2_floats $0..1 *= $2..3 +copy_2_slots_unmasked _7_uv = $0..1 +splat_2_constants resolution = 0x3F4CCCCD (0.8) +copy_2_slots_unmasked coord = _7_uv +copy_3_uniforms time, center₁ = in_turbulencePhase, in_tCircle1 +copy_2_uniforms rotation = in_tRotation1 +copy_constant cell_diameter = 0x3E2E147B (0.17) +copy_2_slots_unmasked $2..3 = rotation +bitwise_xor_imm_int $3 ^= 0x80000000 +copy_slot_unmasked $4 = rotation(1) +copy_slot_unmasked $5 = rotation(0) +copy_2_slots_unmasked $6..7 = center₁ +copy_2_slots_unmasked $8..9 = coord +sub_2_floats $6..7 -= $8..9 +matrix_multiply_2 mat1x2($0..1) = mat2x2($2..5) * mat1x2($6..7) +copy_2_slots_unmasked $2..3 = center₁ +add_2_floats $0..1 += $2..3 +copy_2_slots_unmasked coord = $0..1 +copy_slot_unmasked $2 = cell_diameter +copy_slot_unmasked $3 = $2 +mod_2_floats $0..1 = mod($0..1, $2..3) +copy_2_slots_unmasked $2..3 = resolution +div_2_floats $0..1 /= $2..3 +copy_2_slots_unmasked coord = $0..1 +copy_slot_unmasked $0 = cell_diameter +copy_slot_unmasked $1 = resolution(1) +div_float $0 /= $1 +mul_imm_float $0 *= 0x3F000000 (0.5) +copy_slot_unmasked normal_radius = $0 +mul_imm_float $0 *= 0x3F266666 (0.65) +copy_slot_unmasked radius₁ = $0 +copy_2_slots_unmasked uv = coord +copy_slot_unmasked $0 = normal_radius +copy_slot_unmasked $1 = $0 +copy_2_slots_unmasked xy = $0..1 +copy_slot_unmasked radius = radius₁ +copy_slot_unmasked $0 = radius₁ +mul_imm_float $0 *= 0x42480000 (50.0) +copy_slot_unmasked blur = $0 +mul_imm_float $0 *= 0x3F000000 (0.5) +copy_slot_unmasked blurHalf = $0 +copy_4_slots_unmasked $0..3 = uv, xy +sub_2_floats $0..1 -= $2..3 +copy_2_slots_unmasked $2..3 = $0..1 +dot_2_floats $0 = dot($0..1, $2..3) +sqrt_float $0 = sqrt($0) +copy_slot_unmasked d = $0 +splat_2_constants $0..1 = 0x3F800000 (1.0) +copy_slot_unmasked $2 = blurHalf +sub_float $1 -= $2 +copy_slot_unmasked $2 = blurHalf +add_imm_float $2 += 0x3F800000 (1.0) +copy_slot_unmasked $3 = d +copy_slot_unmasked $4 = radius +div_float $3 /= $4 +smoothstep_n_floats $1 = smoothstep($1, $2, $3) +sub_float $0 -= $1 +label label 0x00000007 +label label 0x00000006 +copy_slot_unmasked _9_g1 = $0 +splat_2_constants resolution = 0x3F4CCCCD (0.8) +copy_2_slots_unmasked coord = _7_uv +copy_uniform time = in_turbulencePhase +copy_2_uniforms center₁ = in_tCircle2 +copy_2_uniforms rotation = in_tRotation2 +copy_constant cell_diameter = 0x3E4CCCCD (0.2) +copy_2_slots_unmasked $2..3 = rotation +bitwise_xor_imm_int $3 ^= 0x80000000 +copy_slot_unmasked $4 = rotation(1) +copy_slot_unmasked $5 = rotation(0) +copy_2_slots_unmasked $6..7 = center₁ +copy_2_slots_unmasked $8..9 = coord +sub_2_floats $6..7 -= $8..9 +matrix_multiply_2 mat1x2($0..1) = mat2x2($2..5) * mat1x2($6..7) +copy_2_slots_unmasked $2..3 = center₁ +add_2_floats $0..1 += $2..3 +copy_2_slots_unmasked coord = $0..1 +copy_slot_unmasked $2 = cell_diameter +copy_slot_unmasked $3 = $2 +mod_2_floats $0..1 = mod($0..1, $2..3) +copy_2_slots_unmasked $2..3 = resolution +div_2_floats $0..1 /= $2..3 +copy_2_slots_unmasked coord = $0..1 +copy_slot_unmasked $0 = cell_diameter +copy_slot_unmasked $1 = resolution(1) +div_float $0 /= $1 +mul_imm_float $0 *= 0x3F000000 (0.5) +copy_slot_unmasked normal_radius = $0 +mul_imm_float $0 *= 0x3F266666 (0.65) +copy_slot_unmasked radius₁ = $0 +copy_2_slots_unmasked uv = coord +copy_slot_unmasked $0 = normal_radius +copy_slot_unmasked $1 = $0 +copy_2_slots_unmasked xy = $0..1 +copy_slot_unmasked radius = radius₁ +copy_slot_unmasked $0 = radius₁ +mul_imm_float $0 *= 0x42480000 (50.0) +copy_slot_unmasked blur = $0 +mul_imm_float $0 *= 0x3F000000 (0.5) +copy_slot_unmasked blurHalf = $0 +copy_4_slots_unmasked $0..3 = uv, xy +sub_2_floats $0..1 -= $2..3 +copy_2_slots_unmasked $2..3 = $0..1 +dot_2_floats $0 = dot($0..1, $2..3) +sqrt_float $0 = sqrt($0) +copy_slot_unmasked d = $0 +splat_2_constants $0..1 = 0x3F800000 (1.0) +copy_slot_unmasked $2 = blurHalf +sub_float $1 -= $2 +copy_slot_unmasked $2 = blurHalf +add_imm_float $2 += 0x3F800000 (1.0) +copy_slot_unmasked $3 = d +copy_slot_unmasked $4 = radius +div_float $3 /= $4 +smoothstep_n_floats $1 = smoothstep($1, $2, $3) +sub_float $0 -= $1 +label label 0x00000009 +label label 0x00000008 +copy_slot_unmasked _10_g2 = $0 +splat_2_constants resolution = 0x3F4CCCCD (0.8) +copy_2_slots_unmasked coord = _7_uv +copy_uniform time = in_turbulencePhase +copy_2_uniforms center₁ = in_tCircle3 +copy_2_uniforms rotation = in_tRotation3 +copy_constant cell_diameter = 0x3E8CCCCD (0.275) +copy_2_slots_unmasked $2..3 = rotation +bitwise_xor_imm_int $3 ^= 0x80000000 +copy_slot_unmasked $4 = rotation(1) +copy_slot_unmasked $5 = rotation(0) +copy_2_slots_unmasked $6..7 = center₁ +copy_2_slots_unmasked $8..9 = coord +sub_2_floats $6..7 -= $8..9 +matrix_multiply_2 mat1x2($0..1) = mat2x2($2..5) * mat1x2($6..7) +copy_2_slots_unmasked $2..3 = center₁ +add_2_floats $0..1 += $2..3 +copy_2_slots_unmasked coord = $0..1 +copy_slot_unmasked $2 = cell_diameter +copy_slot_unmasked $3 = $2 +mod_2_floats $0..1 = mod($0..1, $2..3) +copy_2_slots_unmasked $2..3 = resolution +div_2_floats $0..1 /= $2..3 +copy_2_slots_unmasked coord = $0..1 +copy_slot_unmasked $0 = cell_diameter +copy_slot_unmasked $1 = resolution(1) +div_float $0 /= $1 +mul_imm_float $0 *= 0x3F000000 (0.5) +copy_slot_unmasked normal_radius = $0 +mul_imm_float $0 *= 0x3F266666 (0.65) +copy_slot_unmasked radius₁ = $0 +copy_2_slots_unmasked uv = coord +copy_slot_unmasked $0 = normal_radius +copy_slot_unmasked $1 = $0 +copy_2_slots_unmasked xy = $0..1 +copy_slot_unmasked radius = radius₁ +copy_slot_unmasked $0 = radius₁ +mul_imm_float $0 *= 0x42480000 (50.0) +copy_slot_unmasked blur = $0 +mul_imm_float $0 *= 0x3F000000 (0.5) +copy_slot_unmasked blurHalf = $0 +copy_4_slots_unmasked $0..3 = uv, xy +sub_2_floats $0..1 -= $2..3 +copy_2_slots_unmasked $2..3 = $0..1 +dot_2_floats $0 = dot($0..1, $2..3) +sqrt_float $0 = sqrt($0) +copy_slot_unmasked d = $0 +splat_2_constants $0..1 = 0x3F800000 (1.0) +copy_slot_unmasked $2 = blurHalf +sub_float $1 -= $2 +copy_slot_unmasked $2 = blurHalf +add_imm_float $2 += 0x3F800000 (1.0) +copy_slot_unmasked $3 = d +copy_slot_unmasked $4 = radius +div_float $3 /= $4 +smoothstep_n_floats $1 = smoothstep($1, $2, $3) +sub_float $0 -= $1 +label label 0x0000000B +label label 0x0000000A +copy_slot_unmasked _11_g3 = $0 +copy_slot_unmasked $0 = _9_g1 +copy_slot_unmasked $1 = _9_g1 +mul_float $0 *= $1 +copy_slot_unmasked $1 = _10_g2 +add_float $0 += $1 +copy_slot_unmasked $1 = _11_g3 +sub_float $0 -= $1 +mul_imm_float $0 *= 0x3F000000 (0.5) +copy_slot_unmasked _12_v = $0 +mul_imm_float $0 *= 0x3F4CCCCD (0.8) +add_imm_float $0 += 0x3EE66666 (0.45) +max_imm_float $0 = max($0, 0) +min_imm_float $0 = min($0, 0x3F800000 (1.0)) +copy_slot_unmasked turbulence = $0 +copy_2_slots_unmasked _13_n = densityUv +copy_2_slots_unmasked $0..1 = _13_n +copy_2_immutables_unmasked $2..3 = i3..4 [0x40ACC227 (5.3987), 0x40AE25AF (5.4421)] +mul_2_floats $0..1 *= $2..3 +copy_2_slots_unmasked $2..3 = $0..1 +floor_2_floats $2..3 = floor($2..3) +sub_2_floats $0..1 -= $2..3 +copy_2_slots_unmasked _13_n = $0..1 +copy_2_slots_unmasked $2..3 = _13_n +swizzle_2 $2..3 = ($2..3).yx +copy_2_slots_unmasked $4..5 = _13_n +copy_2_immutables_unmasked $6..7 = i5..6 [0x41AC47E3 (21.5351), 0x416504EA (14.3137)] +add_2_floats $4..5 += $6..7 +dot_2_floats $2 = dot($2..3, $4..5) +copy_slot_unmasked $3 = $2 +add_2_floats $0..1 += $2..3 +copy_2_slots_unmasked _13_n = $0..1 +mul_float $0 *= $1 +copy_slot_unmasked _14_xy = $0 +mul_imm_float $0 *= 0x42BEDC85 (95.4307) +copy_slot_unmasked $1 = $0 +floor_float $1 = floor($1) +sub_float $0 -= $1 +copy_slot_unmasked $1 = _14_xy +mul_imm_float $1 *= 0x42961966 (75.04961) +copy_slot_unmasked $2 = $1 +floor_float $2 = floor($2) +sub_float $1 -= $2 +add_float $0 += $1 +add_imm_float $0 += 0xBF800000 (-1.0) +copy_slot_unmasked _15_n = $0 +splat_2_constants _16_s, _17_i = 0 +label label 0x0000000D +copy_slot_unmasked $0 = _17_i +mul_imm_float $0 *= 0x3DCCCCCD (0.1) +copy_slot_unmasked _18_l = $0 +add_imm_float $0 += 0x3D4CCCCD (0.05) +copy_slot_unmasked _19_h = $0 +copy_uniform $0 = in_noisePhase +copy_slot_unmasked $1 = _17_i +mul_imm_float $1 *= 0x3EB33333 (0.35) +add_float $0 += $1 +mul_imm_float $0 *= 0x40490FDB (3.14159274) +sin_float $0 = sin($0) +copy_slot_unmasked _20_o = $0 +copy_slot_unmasked $0 = _15_n +copy_slot_unmasked $1 = _20_o +add_float $0 += $1 +copy_slot_unmasked _21_v = $0 +copy_slot_unmasked $0 = _16_s +copy_slot_unmasked $1 = _18_l +copy_slot_unmasked $2 = _21_v +cmple_float $1 = lessThanEqual($1, $2) +bitwise_and_imm_int $1 &= 0x3F800000 +copy_constant $2 = 0x3F800000 (1.0) +copy_slot_unmasked $3 = _19_h +copy_slot_unmasked $4 = _21_v +cmple_float $3 = lessThanEqual($3, $4) +bitwise_and_imm_int $3 &= 0x3F800000 +sub_float $2 -= $3 +mul_float $1 *= $2 +add_float $0 += $1 +copy_slot_unmasked _16_s = $0 +add_imm_float _17_i += 0x3F800000 (1.0) +copy_slot_unmasked $0 = _17_i +cmplt_imm_float $0 = lessThan($0, 0x40800000 (4.0)) +stack_rewind +branch_if_no_active_lanes_eq branch -35 (label 13 at #392) if no lanes of $0 == 0 +label label 0x0000000C +copy_slot_unmasked $0 = _16_s +max_imm_float $0 = max($0, 0) +min_imm_float $0 = min($0, 0x3F800000 (1.0)) +copy_uniform $1 = in_sparkleColor(3) +mul_float $0 *= $1 +copy_slot_unmasked $1 = ring +mul_float $0 *= $1 +copy_slot_unmasked $1 = alpha +mul_float $0 *= $1 +copy_slot_unmasked $1 = turbulence +mul_float $0 *= $1 +copy_slot_unmasked sparkleAlpha = $0 +copy_slot_unmasked $0 = fadeIn +copy_constant $1 = 0x3F800000 (1.0) +copy_slot_unmasked $2 = fadeOutRipple +sub_float $1 -= $2 +min_float $0 = min($0, $1) +copy_slot_unmasked fade = $0 +copy_2_slots_unmasked uv = p +copy_2_slots_unmasked xy = center +copy_uniform $0 = in_maxRadius +copy_slot_unmasked $1 = scaleIn +mul_float $0 *= $1 +copy_slot_unmasked radius = $0 +copy_constant blur = 0x3F800000 (1.0) +copy_slot_unmasked $0 = blur +mul_imm_float $0 *= 0x3F000000 (0.5) +copy_slot_unmasked blurHalf = $0 +copy_4_slots_unmasked $0..3 = uv, xy +sub_2_floats $0..1 -= $2..3 +copy_2_slots_unmasked $2..3 = $0..1 +dot_2_floats $0 = dot($0..1, $2..3) +sqrt_float $0 = sqrt($0) +copy_slot_unmasked d = $0 +splat_2_constants $0..1 = 0x3F800000 (1.0) +copy_slot_unmasked $2 = blurHalf +sub_float $1 -= $2 +copy_slot_unmasked $2 = blurHalf +add_imm_float $2 += 0x3F800000 (1.0) +copy_slot_unmasked $3 = d +copy_slot_unmasked $4 = radius +div_float $3 /= $4 +smoothstep_n_floats $1 = smoothstep($1, $2, $3) +sub_float $0 -= $1 +label label 0x0000000E +copy_slot_unmasked $1 = fade +mul_float $0 *= $1 +copy_uniform $1 = in_color(3) +mul_float $0 *= $1 +copy_slot_unmasked waveAlpha = $0 +copy_3_uniforms $0..2 = in_color(0..2) +copy_slot_unmasked $3 = waveAlpha +swizzle_3 $3..5 = ($3..5).xxx +mul_3_floats $0..2 *= $3..5 +copy_slot_unmasked waveColor(3) = waveAlpha +copy_3_slots_unmasked waveColor(0..2) = $0..2 +copy_4_uniforms $0..3 = in_sparkleColor +swizzle_3 $3..5 = ($3..5).xxx +mul_3_floats $0..2 *= $3..5 +copy_uniform sparkleColor(3) = in_sparkleColor(3) +copy_3_slots_unmasked sparkleColor(0..2) = $0..2 +copy_uniform $12 = in_hasMask +cmpeq_imm_float $12 = equal($12, 0x3F800000 (1.0)) +branch_if_no_active_lanes_eq branch +12 (label 15 at #504) if no lanes of $12 == 0xFFFFFFFF +copy_constant $0 = 0 +copy_2_slots_unmasked $1..2 = p +exchange_src swap(src.rgba, $1..4) +invoke_shader invoke_shader 0 +exchange_src swap(src.rgba, $1..4) +swizzle_1 $1 = ($1..4).w +cmplt_float $0 = lessThan($0, $1) +copy_constant $1 = 0 +copy_constant $2 = 0x3F800000 (1.0) +mix_int $0 = mix($1, $2, $0) +jump jump +3 (label 16 at #506) +label label 0x0000000F +copy_constant $0 = 0x3F800000 (1.0) +label label 0x00000010 +copy_slot_unmasked mask = $0 +copy_slot_unmasked $0 = sparkleAlpha +swizzle_4 $0..3 = ($0..3).xxxx +copy_4_slots_unmasked $4..7 = waveColor +copy_4_slots_unmasked $8..11 = sparkleColor +mix_4_floats $0..3 = mix($4..7, $8..11, $0..3) +copy_slot_unmasked $4 = mask +swizzle_4 $4..7 = ($4..7).xxxx +mul_4_floats $0..3 *= $4..7 +load_src src.rgba = $0..3 diff --git a/tests/sksl/realistic/RippleShader.stage b/tests/sksl/realistic/RippleShader.stage new file mode 100644 index 000000000000..3b2db182a45e --- /dev/null +++ b/tests/sksl/realistic/RippleShader.stage @@ -0,0 +1,85 @@ +uniform vec2 in_origin; +uniform vec2 in_touch; +uniform float in_progress; +uniform float in_maxRadius; +uniform vec2 in_resolutionScale; +uniform vec2 in_noiseScale; +uniform float in_hasMask; +uniform float in_noisePhase; +uniform float in_turbulencePhase; +uniform vec2 in_tCircle1; +uniform vec2 in_tCircle2; +uniform vec2 in_tCircle3; +uniform vec2 in_tRotation1; +uniform vec2 in_tRotation2; +uniform vec2 in_tRotation3; +layout (color) uniform vec4 in_color; +layout (color) uniform vec4 in_sparkleColor; +const float PI_0 = 3.14159274; +float softCircle_0(float2 uv, float2 xy, float radius, float blur); +float subProgress_0(float start, float end, float progress); +float circle_grid_0(float2 resolution, float2 coord, float time, float2 center, float2 rotation, float cell_diameter); +float softCircle_0(float2 uv, float2 xy, float radius, float blur) +{ + float blurHalf = blur * 0.5; + float d = distance(uv, xy); + return 1.0 - smoothstep(1.0 - blurHalf, 1.0 + blurHalf, d / radius); +} +float subProgress_0(float start, float end, float progress) +{ + float sub = clamp(progress, start, end); + return (sub - start) / (end - start); +} +float circle_grid_0(float2 resolution, float2 coord, float time, float2 center, float2 rotation, float cell_diameter) +{ + coord = float2x2(rotation.x, -rotation.y, rotation.y, rotation.x) * (center - coord) + center; + coord = mod(coord, cell_diameter) / resolution; + float normal_radius = (cell_diameter / resolution.y) * 0.5; + float radius = 0.65 * normal_radius; + return softCircle_0(coord, float2(normal_radius), radius, radius * 50.0); +} +float4 main(float2 p) +{ + float fadeIn = subProgress_0(0.0, 0.13, in_progress); + float scaleIn = subProgress_0(0.0, 1.0, in_progress); + float fadeOutNoise = subProgress_0(0.4, 0.5, in_progress); + float fadeOutRipple = subProgress_0(0.4, 1.0, in_progress); + float2 center = mix(in_touch, in_origin, saturate(in_progress * 2.0)); + float _3_thickness = 0.05 * in_maxRadius; + float _4_currentRadius = in_maxRadius * scaleIn; + float _5_circle_outer = softCircle_0(_coords, center, _4_currentRadius + _3_thickness, 1.0); + float _6_circle_inner = softCircle_0(_coords, center, max(_4_currentRadius - _3_thickness, 0.0), 1.0); + float ring = saturate(_5_circle_outer - _6_circle_inner); + float alpha = min(fadeIn, 1.0 - fadeOutNoise); + float2 uv = _coords * in_resolutionScale; + float2 densityUv = uv - mod(uv, in_noiseScale); + float2 _7_uv = uv; + const float2 _8_scale = float2(0.8); + _7_uv = _7_uv * _8_scale; + float _9_g1 = circle_grid_0(_8_scale, _7_uv, in_turbulencePhase, in_tCircle1, in_tRotation1, 0.17); + float _10_g2 = circle_grid_0(_8_scale, _7_uv, in_turbulencePhase, in_tCircle2, in_tRotation2, 0.2); + float _11_g3 = circle_grid_0(_8_scale, _7_uv, in_turbulencePhase, in_tCircle3, in_tRotation3, 0.275); + float _12_v = ((_9_g1 * _9_g1 + _10_g2) - _11_g3) * 0.5; + float turbulence = saturate(0.45 + 0.8 * _12_v); + float2 _13_n = densityUv; + _13_n = fract(_13_n * float2(5.3987, 5.4421)); + _13_n += dot(_13_n.yx, _13_n + float2(21.5351, 14.3137)); + float _14_xy = _13_n.x * _13_n.y; + float _15_n = (fract(_14_xy * 95.4307) + fract(_14_xy * 75.04961)) - 1.0; + float _16_s = 0.0; + for (float _17_i = 0.0;_17_i < 4.0; _17_i += 1.0) + { + float _18_l = _17_i * 0.1; + float _19_h = _18_l + 0.05; + float _20_o = sin(PI_0 * (in_noisePhase + 0.35 * _17_i)); + float _21_v = _15_n + _20_o; + _16_s += step(_18_l, _21_v) * (1.0 - step(_19_h, _21_v)); + } + float sparkleAlpha = (((saturate(_16_s) * in_sparkleColor.w) * ring) * alpha) * turbulence; + float fade = min(fadeIn, 1.0 - fadeOutRipple); + float waveAlpha = (softCircle_0(_coords, center, in_maxRadius * scaleIn, 1.0) * fade) * in_color.w; + float4 waveColor = float4(in_color.xyz * waveAlpha, waveAlpha); + float4 sparkleColor = float4(in_sparkleColor.xyz * in_sparkleColor.w, in_sparkleColor.w); + float mask = float(in_hasMask == 1.0 ? (child_0.eval(_coords).w > 0.0 ? 1.0 : 0.0) : 1.0); + return half4(mix(waveColor, sparkleColor, sparkleAlpha) * mask); +} diff --git a/tests/sksl/runtime/AllowNarrowingConversions.skrp b/tests/sksl/runtime/AllowNarrowingConversions.skrp index 03cd7954cca7..ea03f1d58458 100644 --- a/tests/sksl/runtime/AllowNarrowingConversions.skrp +++ b/tests/sksl/runtime/AllowNarrowingConversions.skrp @@ -1,19 +1,21 @@ +9 instructions + [immutable slots] -one(0) = 0x3F800000 (1.0) -one(1) = 0x3F800000 (1.0) -one(2) = 0x3F800000 (1.0) -one(3) = 0x3F800000 (1.0) -zero(0) = 0 -zero(1) = 0 -zero(2) = 0 -zero(3) = 0 +i0 = 0x3F800000 (1.0) +i1 = 0x3F800000 (1.0) +i2 = 0x3F800000 (1.0) +i3 = 0x3F800000 (1.0) +i4 = 0 +i5 = 0 +i6 = 0 +i7 = 0 store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_4_uniforms green = colorGreen copy_4_slots_unmasked $0..3 = green -copy_4_slots_unmasked $4..7 = one +splat_4_constants $4..7 = 0x3F800000 (1.0) mul_4_floats $0..3 *= $4..7 -copy_4_slots_unmasked $4..7 = zero +splat_4_constants $4..7 = 0 add_4_floats $0..3 += $4..7 load_src src.rgba = $0..3 diff --git a/tests/sksl/runtime/ArrayIndexing.skrp b/tests/sksl/runtime/ArrayIndexing.skrp index 726d15e256ee..84104634f493 100644 --- a/tests/sksl/runtime/ArrayIndexing.skrp +++ b/tests/sksl/runtime/ArrayIndexing.skrp @@ -1,3 +1,5 @@ +190 instructions + store_device_xy01 $12..15 = DeviceCoords.xy01 splat_2_constants $14..15 = 0x3F000000 (0.5) cmpeq_2_floats $12..13 = equal($12..13, $14..15) diff --git a/tests/sksl/runtime/ArrayNarrowingConversions.skrp b/tests/sksl/runtime/ArrayNarrowingConversions.skrp index 765e05e8993e..01c59d25ef2d 100644 --- a/tests/sksl/runtime/ArrayNarrowingConversions.skrp +++ b/tests/sksl/runtime/ArrayNarrowingConversions.skrp @@ -1,17 +1,17 @@ +38 instructions + [immutable slots] -cf2[0] = 0x3F800000 (1.0) -cf2[1] = 0x40000000 (2.0) +i0 = 0x00000001 (1.401298e-45) +i1 = 0x00000002 (2.802597e-45) +i2 = 0x3F800000 (1.0) +i3 = 0x40000000 (2.0) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true -copy_constant i2[0] = 0x00000001 (1.401298e-45) -copy_constant i2[1] = 0x00000002 (2.802597e-45) -copy_constant s2[0] = 0x00000001 (1.401298e-45) -copy_constant s2[1] = 0x00000002 (2.802597e-45) -copy_constant f2[0] = 0x3F800000 (1.0) -copy_constant f2[1] = 0x40000000 (2.0) -copy_constant h2[0] = 0x3F800000 (1.0) -copy_constant h2[1] = 0x40000000 (2.0) +copy_2_immutables_unmasked i2[0], i2[1] = i0..1 [0x00000001 (1.401298e-45), 0x00000002 (2.802597e-45)] +copy_2_immutables_unmasked s2[0], s2[1] = i0..1 [0x00000001 (1.401298e-45), 0x00000002 (2.802597e-45)] +copy_2_immutables_unmasked f2[0], f2[1] = i2..3 [0x3F800000 (1.0), 0x40000000 (2.0)] +copy_2_immutables_unmasked h2[0], h2[1] = i2..3 [0x3F800000 (1.0), 0x40000000 (2.0)] copy_2_slots_unmasked i2[0], i2[1] = s2[0], s2[1] copy_2_slots_unmasked s2[0], s2[1] = i2[0], i2[1] copy_2_slots_unmasked f2[0], f2[1] = h2[0], h2[1] @@ -28,15 +28,14 @@ cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_2_slots_unmasked $1..2 = i2[0], i2[1] -copy_constant $12 = 0x00000001 (1.401298e-45) -copy_constant $13 = 0x00000002 (2.802597e-45) +copy_2_immutables_unmasked $12..13 = i0..1 [0x00000001 (1.401298e-45), 0x00000002 (2.802597e-45)] copy_2_slots_unmasked $3..4 = $12..13 cmpeq_2_ints $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_2_slots_unmasked $12..13 = h2[0], h2[1] copy_2_slots_unmasked $1..2 = $12..13 -copy_2_slots_unmasked $3..4 = cf2[0], cf2[1] +copy_2_immutables_unmasked $3..4 = i2..3 [0x3F800000 (1.0), 0x40000000 (2.0)] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 diff --git a/tests/sksl/runtime/Blend.skrp b/tests/sksl/runtime/Blend.skrp index e91563df394b..3406c86ba07f 100644 --- a/tests/sksl/runtime/Blend.skrp +++ b/tests/sksl/runtime/Blend.skrp @@ -1,3 +1,5 @@ +14 instructions + store_src src = src.rgba store_dst dst = dst.rgba init_lane_masks CondMask = LoopMask = RetMask = true diff --git a/tests/sksl/runtime/ChildEffects.skrp b/tests/sksl/runtime/ChildEffects.skrp index c2be937cd150..7ab3ae4fcb13 100644 --- a/tests/sksl/runtime/ChildEffects.skrp +++ b/tests/sksl/runtime/ChildEffects.skrp @@ -1,3 +1,5 @@ +10 instructions, 5 invocations + store_src_rg xy = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_2_slots_unmasked $0..1 = xy diff --git a/tests/sksl/runtime/ColorConversion.skrp b/tests/sksl/runtime/ColorConversion.skrp index 61b2f82a1f37..b1e57d2e4052 100644 --- a/tests/sksl/runtime/ColorConversion.skrp +++ b/tests/sksl/runtime/ColorConversion.skrp @@ -1,3 +1,5 @@ +16 instructions, 3 invocations + store_src_rg xy = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_2_slots_unmasked $0..1 = xy diff --git a/tests/sksl/runtime/Commutative.skrp b/tests/sksl/runtime/Commutative.skrp index 16c324706781..830d88ae764c 100644 --- a/tests/sksl/runtime/Commutative.skrp +++ b/tests/sksl/runtime/Commutative.skrp @@ -1,3 +1,5 @@ +211 instructions + store_device_xy01 $13..16 = DeviceCoords.xy01 splat_2_constants $15..16 = 0x3F000000 (0.5) cmpeq_2_floats $13..14 = equal($13..14, $15..16) diff --git a/tests/sksl/runtime/ConstPreservation.skrp b/tests/sksl/runtime/ConstPreservation.skrp index 83e96dbefd54..b507ba408b5c 100644 --- a/tests/sksl/runtime/ConstPreservation.skrp +++ b/tests/sksl/runtime/ConstPreservation.skrp @@ -1,6 +1,8 @@ +10 instructions + [immutable slots] -r = 0 -g = 0x3F800000 (1.0) +i0 = 0 +i1 = 0x3F800000 (1.0) store_src_rg xy = src.rg init_lane_masks CondMask = LoopMask = RetMask = true diff --git a/tests/sksl/runtime/ConversionConstructors.skrp b/tests/sksl/runtime/ConversionConstructors.skrp index 98db2e426edf..a4efeebbacb8 100644 --- a/tests/sksl/runtime/ConversionConstructors.skrp +++ b/tests/sksl/runtime/ConversionConstructors.skrp @@ -1,3 +1,5 @@ +26 instructions + store_src_rg xy = src.rg init_lane_masks CondMask = LoopMask = RetMask = true splat_3_constants f, i, b = 0 diff --git a/tests/sksl/runtime/DivideByZero.skrp b/tests/sksl/runtime/DivideByZero.skrp index fede0b9a0280..2f9cdf9d9bec 100644 --- a/tests/sksl/runtime/DivideByZero.skrp +++ b/tests/sksl/runtime/DivideByZero.skrp @@ -1,3 +1,5 @@ +21 instructions + store_src_rg xy = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_uniform $0 = colorGreen(1) diff --git a/tests/sksl/runtime/GLSLTypeNames.skrp b/tests/sksl/runtime/GLSLTypeNames.skrp index 5330dcac5bf1..34168e43bf73 100644 --- a/tests/sksl/runtime/GLSLTypeNames.skrp +++ b/tests/sksl/runtime/GLSLTypeNames.skrp @@ -1,3 +1,5 @@ +7 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_constant f = 0 diff --git a/tests/sksl/runtime/GlobalVariables.skrp b/tests/sksl/runtime/GlobalVariables.skrp index 63d190f9f3f1..b87f33b00cef 100644 --- a/tests/sksl/runtime/GlobalVariables.skrp +++ b/tests/sksl/runtime/GlobalVariables.skrp @@ -1,6 +1,4 @@ -[immutable slots] -gInitialized = 0xBF800000 (-1.0) -gInitializedFromOther = 0x3F800000 (1.0) +39 instructions store_device_xy01 $3..6 = DeviceCoords.xy01 splat_2_constants $5..6 = 0x3F000000 (0.5) @@ -8,7 +6,9 @@ cmpeq_2_floats $3..4 = equal($3..4, $5..6) bitwise_and_int $3 &= $4 store_src_rg xy = src.rg init_lane_masks CondMask = LoopMask = RetMask = true +copy_constant gInitialized = 0xBF800000 (-1.0) trace_var TraceVar(gInitialized) when $3 is true +copy_constant gInitializedFromOther = 0x3F800000 (1.0) trace_var TraceVar(gInitializedFromOther) when $3 is true copy_constant gUninitialized = 0 trace_var TraceVar(gUninitialized) when $3 is true diff --git a/tests/sksl/runtime/LargeProgram_BlocklessLoops.skrp b/tests/sksl/runtime/LargeProgram_BlocklessLoops.skrp index 2322c25230ab..c3bdc5a48cfc 100644 --- a/tests/sksl/runtime/LargeProgram_BlocklessLoops.skrp +++ b/tests/sksl/runtime/LargeProgram_BlocklessLoops.skrp @@ -1,3 +1,5 @@ +29 instructions + store_src_rg xy = src.rg init_lane_masks CondMask = LoopMask = RetMask = true splat_2_constants i, a = 0 diff --git a/tests/sksl/runtime/LargeProgram_FlatLoop.skrp b/tests/sksl/runtime/LargeProgram_FlatLoop.skrp index cdc8abb1338c..13e7443d366d 100644 --- a/tests/sksl/runtime/LargeProgram_FlatLoop.skrp +++ b/tests/sksl/runtime/LargeProgram_FlatLoop.skrp @@ -1,3 +1,5 @@ +500 instructions + store_src_rg xy = src.rg init_lane_masks CondMask = LoopMask = RetMask = true splat_2_constants i, a = 0 diff --git a/tests/sksl/runtime/LargeProgram_Functions.skrp b/tests/sksl/runtime/LargeProgram_Functions.skrp index 1c1a3a23c067..a1b0a0aed573 100644 --- a/tests/sksl/runtime/LargeProgram_Functions.skrp +++ b/tests/sksl/runtime/LargeProgram_Functions.skrp @@ -1,3 +1,5 @@ +12253 instructions + store_src_rg xy = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_constant i = 0 diff --git a/tests/sksl/runtime/LargeProgram_NestedLoops.skrp b/tests/sksl/runtime/LargeProgram_NestedLoops.skrp index 2322c25230ab..c3bdc5a48cfc 100644 --- a/tests/sksl/runtime/LargeProgram_NestedLoops.skrp +++ b/tests/sksl/runtime/LargeProgram_NestedLoops.skrp @@ -1,3 +1,5 @@ +29 instructions + store_src_rg xy = src.rg init_lane_masks CondMask = LoopMask = RetMask = true splat_2_constants i, a = 0 diff --git a/tests/sksl/runtime/LargeProgram_SplitLoops.skrp b/tests/sksl/runtime/LargeProgram_SplitLoops.skrp index 7f33c179b7c6..d04f10eb2cf3 100644 --- a/tests/sksl/runtime/LargeProgram_SplitLoops.skrp +++ b/tests/sksl/runtime/LargeProgram_SplitLoops.skrp @@ -1,3 +1,5 @@ +38 instructions + store_src_rg xy = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_constant i = 0 diff --git a/tests/sksl/runtime/LargeProgram_StackDepth.skrp b/tests/sksl/runtime/LargeProgram_StackDepth.skrp index 8123e5e28499..9dd06e295105 100644 --- a/tests/sksl/runtime/LargeProgram_StackDepth.skrp +++ b/tests/sksl/runtime/LargeProgram_StackDepth.skrp @@ -1,3 +1,5 @@ +6 instructions + store_src_rg xy = src.rg init_lane_masks CondMask = LoopMask = RetMask = true splat_4_constants color = 0 diff --git a/tests/sksl/runtime/LargeProgram_ZeroIterFor.skrp b/tests/sksl/runtime/LargeProgram_ZeroIterFor.skrp index 7b9d33a83efd..fe09d975bd87 100644 --- a/tests/sksl/runtime/LargeProgram_ZeroIterFor.skrp +++ b/tests/sksl/runtime/LargeProgram_ZeroIterFor.skrp @@ -1,9 +1,11 @@ +6 instructions + [immutable slots] -i = 0 +i0 = 0 store_src_rg xy = src.rg init_lane_masks CondMask = LoopMask = RetMask = true -copy_slot_unmasked $0 = i +copy_constant $0 = 0 cast_to_float_from_int $0 = IntToFloat($0) swizzle_4 $0..3 = ($0..3).xxxx load_src src.rgba = $0..3 diff --git a/tests/sksl/runtime/LoopFloat.skrp b/tests/sksl/runtime/LoopFloat.skrp index 19386a5e010d..ec4fd5579406 100644 --- a/tests/sksl/runtime/LoopFloat.skrp +++ b/tests/sksl/runtime/LoopFloat.skrp @@ -1,7 +1,18 @@ +614 instructions + [immutable slots] -kZero = 0 -kTen = 0x41200000 (10.0) -kOne = 0x3F800000 (1.0) +i0 = 0x41100000 (9.0) +i1 = 0x3F800000 (1.0) +i2 = 0x40000000 (2.0) +i3 = 0x40400000 (3.0) +i4 = 0x41100000 (9.0) +i5 = 0x40400000 (3.0) +i6 = 0x40000000 (2.0) +i7 = 0x3F800000 (1.0) +i8 = 0x41100000 (9.0) +i9 = 0x41100000 (9.0) +i10 = 0x41100000 (9.0) +i11 = 0x3F800000 (1.0) store_device_xy01 $13..16 = DeviceCoords.xy01 splat_2_constants $15..16 = 0x3F000000 (0.5) @@ -13,7 +24,9 @@ copy_4_uniforms colorRed = colorRed trace_var TraceVar(colorRed) when $13 is true copy_4_uniforms colorGreen = colorGreen trace_var TraceVar(colorGreen) when $13 is true +copy_constant kZero = 0 trace_var TraceVar(kZero) when $13 is true +copy_constant kTen = 0x41200000 (10.0) trace_var TraceVar(kTen) when $13 is true trace_enter TraceEnter(half4 main(float2 pos)) when $13 is true trace_var TraceVar(pos) when $13 is true @@ -40,7 +53,7 @@ store_condition_mask $72 = CondMask store_condition_mask $79 = CondMask store_condition_mask $89 = CondMask store_condition_mask $99 = CondMask -branch_if_no_lanes_active branch_if_no_lanes_active +64 (label 10 at #102) +branch_if_no_lanes_active branch_if_no_lanes_active +64 (label 10 at #104) trace_enter TraceEnter(float return_loop(float five)) when $13 is true copy_slot_unmasked five₁ = five trace_var TraceVar(five₁) when $13 is true @@ -57,7 +70,7 @@ trace_line TraceLine(8) when $13 is true copy_constant i = 0 trace_var TraceVar(i) when $13 is true store_loop_mask $103 = LoopMask -jump jump +29 (label 12 at #84) +jump jump +29 (label 12 at #86) label label 0x0000000D copy_constant $104 = 0 copy_slot_unmasked $105 = $13 @@ -91,7 +104,7 @@ copy_slot_unmasked $104 = i cmplt_imm_float $104 = lessThan($104, 0x41200000 (10.0)) merge_loop_mask LoopMask &= $104 stack_rewind -branch_if_any_lanes_active branch_if_any_lanes_active -33 (label 13 at #56) +branch_if_any_lanes_active branch_if_any_lanes_active -33 (label 13 at #58) label label 0x0000000B load_loop_mask LoopMask = $103 trace_scope TraceScope(-1) when $102 is true @@ -108,7 +121,7 @@ label label 0x0000000A cmpeq_imm_float $100 = equal($100, 0x40A00000 (5.0)) copy_constant $90 = 0 merge_condition_mask CondMask = $99 & $100 -branch_if_no_lanes_active branch_if_no_lanes_active +71 (label 9 at #177) +branch_if_no_lanes_active branch_if_no_lanes_active +71 (label 9 at #179) trace_enter TraceEnter(float continue_loop(float five)) when $13 is true copy_slot_unmasked five₂ = five trace_var TraceVar(five₂) when $13 is true @@ -127,7 +140,7 @@ trace_line TraceLine(18) when $13 is true copy_constant i₁ = 0 trace_var TraceVar(i₁) when $13 is true store_loop_mask $93 = LoopMask -jump jump +33 (label 16 at #158) +jump jump +33 (label 16 at #160) label label 0x00000011 copy_constant $109 = 0 copy_constant $94 = 0 @@ -165,7 +178,7 @@ copy_slot_unmasked $94 = i₁ cmplt_imm_float $94 = lessThan($94, 0x41200000 (10.0)) merge_loop_mask LoopMask &= $94 stack_rewind -branch_if_any_lanes_active branch_if_any_lanes_active -37 (label 17 at #126) +branch_if_any_lanes_active branch_if_any_lanes_active -37 (label 17 at #128) label label 0x0000000F load_loop_mask LoopMask = $93 trace_scope TraceScope(-1) when $92 is true @@ -183,7 +196,7 @@ label label 0x00000009 load_condition_mask CondMask = $99 copy_constant $80 = 0 merge_condition_mask CondMask = $89 & $90 -branch_if_no_lanes_active branch_if_no_lanes_active +73 (label 8 at #254) +branch_if_no_lanes_active branch_if_no_lanes_active +74 (label 8 at #257) trace_enter TraceEnter(float break_loop(float five)) when $13 is true copy_slot_unmasked five₃ = five trace_var TraceVar(five₃) when $13 is true @@ -195,6 +208,7 @@ trace_line TraceLine(27) when $13 is true copy_constant sum₁ = 0 trace_var TraceVar(sum₁) when $13 is true trace_line TraceLine(28) when $13 is true +copy_constant kOne = 0x3F800000 (1.0) trace_var TraceVar(kOne) when $13 is true copy_constant $82 = 0 copy_slot_unmasked $83 = $13 @@ -204,7 +218,7 @@ trace_line TraceLine(29) when $13 is true copy_constant i₂ = 0 trace_var TraceVar(i₂) when $13 is true store_loop_mask $83 = LoopMask -jump jump +33 (label 20 at #235) +jump jump +33 (label 20 at #238) label label 0x00000015 copy_constant $84 = 0 copy_slot_unmasked $85 = $13 @@ -221,7 +235,7 @@ copy_slot_unmasked $88 = $13 copy_slot_masked $87 = Mask($88) trace_scope TraceScope(+1) when $87 is true trace_line TraceLine(30) when $13 is true -branch_if_all_lanes_active branch_if_all_lanes_active +22 (label 19 at #241) +branch_if_all_lanes_active branch_if_all_lanes_active +22 (label 19 at #244) mask_off_loop_mask LoopMask &= ~(CondMask & LoopMask & RetMask) trace_scope TraceScope(-1) when $87 is true load_condition_mask CondMask = $85 @@ -242,7 +256,7 @@ copy_slot_unmasked $84 = i₂ cmplt_imm_float $84 = lessThan($84, 0x41200000 (10.0)) merge_loop_mask LoopMask &= $84 stack_rewind -branch_if_any_lanes_active branch_if_any_lanes_active -37 (label 21 at #203) +branch_if_any_lanes_active branch_if_any_lanes_active -37 (label 21 at #206) label label 0x00000013 load_loop_mask LoopMask = $83 trace_scope TraceScope(-1) when $82 is true @@ -260,7 +274,7 @@ label label 0x00000008 load_condition_mask CondMask = $89 copy_constant $73 = 0 merge_condition_mask CondMask = $79 & $80 -branch_if_no_lanes_active branch_if_no_lanes_active +51 (label 7 at #309) +branch_if_no_lanes_active branch_if_no_lanes_active +51 (label 7 at #312) trace_enter TraceEnter(float float_loop()) when $13 is true copy_constant $74 = 0 copy_slot_unmasked $75 = $13 @@ -273,7 +287,7 @@ copy_constant $75 = 0 copy_slot_unmasked $76 = $13 copy_slot_masked $75 = Mask($76) trace_scope TraceScope(+1) when $75 is true -branch_if_no_lanes_active branch_if_no_lanes_active +24 (label 23 at #295) +branch_if_no_lanes_active branch_if_no_lanes_active +24 (label 23 at #298) trace_line TraceLine(39) when $13 is true copy_constant i₃ = 0x3DFBE76D (0.123) trace_var TraceVar(i₃) when $13 is true @@ -296,7 +310,7 @@ trace_var TraceVar(i₃) when $13 is true copy_slot_unmasked $76 = i₃ cmplt_imm_float $76 = lessThan($76, 0x3F19999A (0.6)) stack_rewind -branch_if_no_active_lanes_eq branch -19 (label 24 at #275) if no lanes of $76 == 0 +branch_if_no_active_lanes_eq branch -19 (label 24 at #278) if no lanes of $76 == 0 label label 0x00000017 trace_scope TraceScope(-1) when $75 is true trace_line TraceLine(42) when $13 is true @@ -315,7 +329,7 @@ label label 0x00000007 load_condition_mask CondMask = $79 copy_constant $62 = 0 merge_condition_mask CondMask = $72 & $73 -branch_if_no_lanes_active branch_if_no_lanes_active +56 (label 6 at #369) +branch_if_no_lanes_active branch_if_no_lanes_active +53 (label 6 at #369) trace_enter TraceEnter(bool loop_operator_le()) when $13 is true copy_constant $63 = 0 copy_slot_unmasked $64 = $13 @@ -330,7 +344,7 @@ copy_constant $64 = 0 copy_slot_unmasked $65 = $13 copy_slot_masked $64 = Mask($65) trace_scope TraceScope(+1) when $64 is true -branch_if_no_lanes_active branch_if_no_lanes_active +23 (label 26 at #351) +branch_if_no_lanes_active branch_if_no_lanes_active +23 (label 26 at #354) trace_line TraceLine(51) when $13 is true copy_constant i₄ = 0x3F800000 (1.0) trace_var TraceVar(i₄) when $13 is true @@ -352,15 +366,12 @@ trace_var TraceVar(i₄) when $13 is true copy_slot_unmasked $65 = i₄ cmple_imm_float $65 = lessThanEqual($65, 0x40400000 (3.0)) stack_rewind -branch_if_no_active_lanes_eq branch -18 (label 27 at #332) if no lanes of $65 == 0 +branch_if_no_active_lanes_eq branch -18 (label 27 at #335) if no lanes of $65 == 0 label label 0x0000001A trace_scope TraceScope(-1) when $64 is true trace_line TraceLine(54) when $13 is true copy_4_slots_unmasked $64..67 = result -copy_constant $68 = 0x41100000 (9.0) -copy_constant $69 = 0x3F800000 (1.0) -copy_constant $70 = 0x40000000 (2.0) -copy_constant $71 = 0x40400000 (3.0) +copy_4_immutables_unmasked $68..71 = i0..3 [0x41100000 (9.0), 0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0)] cmpeq_4_floats $64..67 = equal($64..67, $68..71) bitwise_and_2_ints $64..65 &= $66..67 bitwise_and_int $64 &= $65 @@ -375,7 +386,7 @@ label label 0x00000006 load_condition_mask CondMask = $72 copy_constant $51 = 0 merge_condition_mask CondMask = $61 & $62 -branch_if_no_lanes_active branch_if_no_lanes_active +56 (label 5 at #429) +branch_if_no_lanes_active branch_if_no_lanes_active +53 (label 5 at #426) trace_enter TraceEnter(bool loop_operator_lt()) when $13 is true copy_constant $52 = 0 copy_slot_unmasked $53 = $13 @@ -417,10 +428,7 @@ label label 0x0000001D trace_scope TraceScope(-1) when $53 is true trace_line TraceLine(66) when $13 is true copy_4_slots_unmasked $53..56 = result₁ -copy_constant $57 = 0x41100000 (9.0) -copy_constant $58 = 0x3F800000 (1.0) -copy_constant $59 = 0x40000000 (2.0) -copy_constant $60 = 0x40400000 (3.0) +copy_4_immutables_unmasked $57..60 = i0..3 [0x41100000 (9.0), 0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0)] cmpeq_4_floats $53..56 = equal($53..56, $57..60) bitwise_and_2_ints $53..54 &= $55..56 bitwise_and_int $53 &= $54 @@ -435,7 +443,7 @@ label label 0x00000005 load_condition_mask CondMask = $61 copy_constant $40 = 0 merge_condition_mask CondMask = $50 & $51 -branch_if_no_lanes_active branch_if_no_lanes_active +57 (label 4 at #490) +branch_if_no_lanes_active branch_if_no_lanes_active +54 (label 4 at #484) trace_enter TraceEnter(bool loop_operator_ge()) when $13 is true copy_constant $41 = 0 copy_slot_unmasked $42 = $13 @@ -450,7 +458,7 @@ copy_constant $42 = 0 copy_slot_unmasked $43 = $13 copy_slot_masked $42 = Mask($43) trace_scope TraceScope(+1) when $42 is true -branch_if_no_lanes_active branch_if_no_lanes_active +24 (label 32 at #472) +branch_if_no_lanes_active branch_if_no_lanes_active +24 (label 32 at #469) trace_line TraceLine(75) when $13 is true copy_constant i₆ = 0x40400000 (3.0) trace_var TraceVar(i₆) when $13 is true @@ -473,15 +481,12 @@ copy_constant $43 = 0x3F800000 (1.0) copy_slot_unmasked $44 = i₆ cmple_float $43 = lessThanEqual($43, $44) stack_rewind -branch_if_no_active_lanes_eq branch -19 (label 33 at #452) if no lanes of $43 == 0 +branch_if_no_active_lanes_eq branch -19 (label 33 at #449) if no lanes of $43 == 0 label label 0x00000020 trace_scope TraceScope(-1) when $42 is true trace_line TraceLine(78) when $13 is true copy_4_slots_unmasked $42..45 = result₂ -copy_constant $46 = 0x41100000 (9.0) -copy_constant $47 = 0x40400000 (3.0) -copy_constant $48 = 0x40000000 (2.0) -copy_constant $49 = 0x3F800000 (1.0) +copy_4_immutables_unmasked $46..49 = i4..7 [0x41100000 (9.0), 0x40400000 (3.0), 0x40000000 (2.0), 0x3F800000 (1.0)] cmpeq_4_floats $42..45 = equal($42..45, $46..49) bitwise_and_2_ints $42..43 &= $44..45 bitwise_and_int $42 &= $43 @@ -496,7 +501,7 @@ label label 0x00000004 load_condition_mask CondMask = $50 copy_constant $29 = 0 merge_condition_mask CondMask = $39 & $40 -branch_if_no_lanes_active branch_if_no_lanes_active +57 (label 3 at #551) +branch_if_no_lanes_active branch_if_no_lanes_active +54 (label 3 at #542) trace_enter TraceEnter(bool loop_operator_gt()) when $13 is true copy_constant $30 = 0 copy_slot_unmasked $31 = $13 @@ -511,7 +516,7 @@ copy_constant $31 = 0 copy_slot_unmasked $32 = $13 copy_slot_masked $31 = Mask($32) trace_scope TraceScope(+1) when $31 is true -branch_if_no_lanes_active branch_if_no_lanes_active +24 (label 35 at #533) +branch_if_no_lanes_active branch_if_no_lanes_active +24 (label 35 at #527) trace_line TraceLine(87) when $13 is true copy_constant i₇ = 0x40400000 (3.0) trace_var TraceVar(i₇) when $13 is true @@ -534,15 +539,12 @@ copy_constant $32 = 0 copy_slot_unmasked $33 = i₇ cmplt_float $32 = lessThan($32, $33) stack_rewind -branch_if_no_active_lanes_eq branch -19 (label 36 at #513) if no lanes of $32 == 0 +branch_if_no_active_lanes_eq branch -19 (label 36 at #507) if no lanes of $32 == 0 label label 0x00000023 trace_scope TraceScope(-1) when $31 is true trace_line TraceLine(90) when $13 is true copy_4_slots_unmasked $31..34 = result₃ -copy_constant $35 = 0x41100000 (9.0) -copy_constant $36 = 0x40400000 (3.0) -copy_constant $37 = 0x40000000 (2.0) -copy_constant $38 = 0x3F800000 (1.0) +copy_4_immutables_unmasked $35..38 = i4..7 [0x41100000 (9.0), 0x40400000 (3.0), 0x40000000 (2.0), 0x3F800000 (1.0)] cmpeq_4_floats $31..34 = equal($31..34, $35..38) bitwise_and_2_ints $31..32 &= $33..34 bitwise_and_int $31 &= $32 @@ -557,7 +559,7 @@ label label 0x00000003 load_condition_mask CondMask = $39 copy_constant $18 = 0 merge_condition_mask CondMask = $28 & $29 -branch_if_no_lanes_active branch_if_no_lanes_active +45 (label 2 at #600) +branch_if_no_lanes_active branch_if_no_lanes_active +44 (label 2 at #590) trace_enter TraceEnter(bool loop_operator_eq()) when $13 is true copy_constant $19 = 0 copy_slot_unmasked $20 = $13 @@ -571,7 +573,7 @@ copy_constant $20 = 0 copy_slot_unmasked $21 = $13 copy_slot_masked $20 = Mask($21) trace_scope TraceScope(+1) when $20 is true -branch_if_no_lanes_active branch_if_no_lanes_active +15 (label 38 at #584) +branch_if_no_lanes_active branch_if_no_lanes_active +15 (label 38 at #575) trace_line TraceLine(109) when $13 is true copy_constant i₈ = 0x3F800000 (1.0) trace_var TraceVar(i₈) when $13 is true @@ -590,8 +592,7 @@ label label 0x00000026 trace_scope TraceScope(-1) when $20 is true trace_line TraceLine(112) when $13 is true copy_4_slots_unmasked $20..23 = result₄ -splat_3_constants $24..26 = 0x41100000 (9.0) -copy_constant $27 = 0x3F800000 (1.0) +copy_4_immutables_unmasked $24..27 = i8..11 [0x41100000 (9.0), 0x41100000 (9.0), 0x41100000 (9.0), 0x3F800000 (1.0)] cmpeq_4_floats $20..23 = equal($20..23, $24..27) bitwise_and_2_ints $20..21 &= $22..23 bitwise_and_int $20 &= $21 @@ -606,7 +607,7 @@ label label 0x00000002 load_condition_mask CondMask = $28 copy_constant $1 = 0 merge_condition_mask CondMask = $17 & $18 -branch_if_no_lanes_active branch_if_no_lanes_active +55 (label 1 at #659) +branch_if_no_lanes_active branch_if_no_lanes_active +52 (label 1 at #646) trace_enter TraceEnter(bool loop_operator_ne()) when $13 is true copy_constant $2 = 0 copy_slot_unmasked $3 = $13 @@ -620,7 +621,7 @@ copy_constant $3 = 0 copy_slot_unmasked $4 = $13 copy_slot_masked $3 = Mask($4) trace_scope TraceScope(+1) when $3 is true -branch_if_no_lanes_active branch_if_no_lanes_active +23 (label 41 at #641) +branch_if_no_lanes_active branch_if_no_lanes_active +23 (label 41 at #631) trace_line TraceLine(98) when $13 is true copy_constant i₉ = 0x3F800000 (1.0) trace_var TraceVar(i₉) when $13 is true @@ -642,15 +643,12 @@ trace_var TraceVar(i₉) when $13 is true copy_slot_unmasked $4 = i₉ cmplt_imm_float $4 = lessThan($4, 0x40800000 (4.0)) stack_rewind -branch_if_no_active_lanes_eq branch -18 (label 42 at #622) if no lanes of $4 == 0 +branch_if_no_active_lanes_eq branch -18 (label 42 at #612) if no lanes of $4 == 0 label label 0x00000029 trace_scope TraceScope(-1) when $3 is true trace_line TraceLine(101) when $13 is true copy_4_slots_unmasked $3..6 = result₅ -copy_constant $7 = 0x41100000 (9.0) -copy_constant $8 = 0x3F800000 (1.0) -copy_constant $9 = 0x40000000 (2.0) -copy_constant $10 = 0x40400000 (3.0) +copy_4_immutables_unmasked $7..10 = i0..3 [0x41100000 (9.0), 0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0)] cmpeq_4_floats $3..6 = equal($3..6, $7..10) bitwise_and_2_ints $3..4 &= $5..6 bitwise_and_int $3 &= $4 diff --git a/tests/sksl/runtime/LoopInt.skrp b/tests/sksl/runtime/LoopInt.skrp index a6229be4ea2b..9d5ace7c69da 100644 --- a/tests/sksl/runtime/LoopInt.skrp +++ b/tests/sksl/runtime/LoopInt.skrp @@ -1,7 +1,18 @@ +563 instructions + [immutable slots] -kZero = 0 -kTen = 0x0000000A (1.401298e-44) -kOne = 0x00000001 (1.401298e-45) +i0 = 0x00000009 (1.261169e-44) +i1 = 0x00000001 (1.401298e-45) +i2 = 0x00000002 (2.802597e-45) +i3 = 0x00000003 (4.203895e-45) +i4 = 0x00000009 (1.261169e-44) +i5 = 0x00000003 (4.203895e-45) +i6 = 0x00000002 (2.802597e-45) +i7 = 0x00000001 (1.401298e-45) +i8 = 0x00000009 (1.261169e-44) +i9 = 0x00000009 (1.261169e-44) +i10 = 0x00000009 (1.261169e-44) +i11 = 0x00000001 (1.401298e-45) store_device_xy01 $13..16 = DeviceCoords.xy01 splat_2_constants $15..16 = 0x3F000000 (0.5) @@ -13,7 +24,9 @@ copy_4_uniforms colorRed = colorRed trace_var TraceVar(colorRed) when $13 is true copy_4_uniforms colorGreen = colorGreen trace_var TraceVar(colorGreen) when $13 is true +copy_constant kZero = 0 trace_var TraceVar(kZero) when $13 is true +copy_constant kTen = 0x0000000A (1.401298e-44) trace_var TraceVar(kTen) when $13 is true trace_enter TraceEnter(half4 main(float2 pos)) when $13 is true trace_var TraceVar(pos) when $13 is true @@ -40,7 +53,7 @@ store_condition_mask $61 = CondMask store_condition_mask $72 = CondMask store_condition_mask $82 = CondMask store_condition_mask $92 = CondMask -branch_if_no_lanes_active branch_if_no_lanes_active +64 (label 9 at #102) +branch_if_no_lanes_active branch_if_no_lanes_active +64 (label 9 at #104) trace_enter TraceEnter(int return_loop(int five)) when $13 is true copy_slot_unmasked five₁ = five trace_var TraceVar(five₁) when $13 is true @@ -57,7 +70,7 @@ trace_line TraceLine(8) when $13 is true copy_constant i = 0 trace_var TraceVar(i) when $13 is true store_loop_mask $96 = LoopMask -jump jump +29 (label 11 at #84) +jump jump +29 (label 11 at #86) label label 0x0000000C copy_constant $97 = 0 copy_slot_unmasked $98 = $13 @@ -91,7 +104,7 @@ copy_slot_unmasked $97 = i cmplt_imm_int $97 = lessThan($97, 0x0000000A) merge_loop_mask LoopMask &= $97 stack_rewind -branch_if_any_lanes_active branch_if_any_lanes_active -33 (label 12 at #56) +branch_if_any_lanes_active branch_if_any_lanes_active -33 (label 12 at #58) label label 0x0000000A load_loop_mask LoopMask = $96 trace_scope TraceScope(-1) when $95 is true @@ -108,7 +121,7 @@ label label 0x00000009 cmpeq_imm_int $93 = equal($93, 0x00000005) copy_constant $83 = 0 merge_condition_mask CondMask = $92 & $93 -branch_if_no_lanes_active branch_if_no_lanes_active +71 (label 8 at #177) +branch_if_no_lanes_active branch_if_no_lanes_active +71 (label 8 at #179) trace_enter TraceEnter(int continue_loop(int five)) when $13 is true copy_slot_unmasked five₂ = five trace_var TraceVar(five₂) when $13 is true @@ -127,7 +140,7 @@ trace_line TraceLine(18) when $13 is true copy_constant i₁ = 0 trace_var TraceVar(i₁) when $13 is true store_loop_mask $86 = LoopMask -jump jump +33 (label 15 at #158) +jump jump +33 (label 15 at #160) label label 0x00000010 copy_constant $102 = 0 copy_constant $87 = 0 @@ -165,7 +178,7 @@ copy_slot_unmasked $87 = i₁ cmplt_imm_int $87 = lessThan($87, 0x0000000A) merge_loop_mask LoopMask &= $87 stack_rewind -branch_if_any_lanes_active branch_if_any_lanes_active -37 (label 16 at #126) +branch_if_any_lanes_active branch_if_any_lanes_active -37 (label 16 at #128) label label 0x0000000E load_loop_mask LoopMask = $86 trace_scope TraceScope(-1) when $85 is true @@ -183,7 +196,7 @@ label label 0x00000008 load_condition_mask CondMask = $92 copy_constant $73 = 0 merge_condition_mask CondMask = $82 & $83 -branch_if_no_lanes_active branch_if_no_lanes_active +73 (label 7 at #254) +branch_if_no_lanes_active branch_if_no_lanes_active +74 (label 7 at #257) trace_enter TraceEnter(int break_loop(int five)) when $13 is true copy_constant five₃ = 0x00000005 (7.006492e-45) trace_var TraceVar(five₃) when $13 is true @@ -195,6 +208,7 @@ trace_line TraceLine(27) when $13 is true copy_constant sum₁ = 0 trace_var TraceVar(sum₁) when $13 is true trace_line TraceLine(28) when $13 is true +copy_constant kOne = 0x00000001 (1.401298e-45) trace_var TraceVar(kOne) when $13 is true copy_constant $75 = 0 copy_slot_unmasked $76 = $13 @@ -204,7 +218,7 @@ trace_line TraceLine(29) when $13 is true copy_constant i₂ = 0 trace_var TraceVar(i₂) when $13 is true store_loop_mask $76 = LoopMask -jump jump +33 (label 19 at #235) +jump jump +33 (label 19 at #238) label label 0x00000014 copy_constant $77 = 0 copy_slot_unmasked $78 = $13 @@ -221,7 +235,7 @@ copy_slot_unmasked $81 = $13 copy_slot_masked $80 = Mask($81) trace_scope TraceScope(+1) when $80 is true trace_line TraceLine(30) when $13 is true -branch_if_all_lanes_active branch_if_all_lanes_active +22 (label 18 at #241) +branch_if_all_lanes_active branch_if_all_lanes_active +22 (label 18 at #244) mask_off_loop_mask LoopMask &= ~(CondMask & LoopMask & RetMask) trace_scope TraceScope(-1) when $80 is true load_condition_mask CondMask = $78 @@ -242,7 +256,7 @@ copy_slot_unmasked $77 = i₂ cmplt_imm_int $77 = lessThan($77, 0x0000000A) merge_loop_mask LoopMask &= $77 stack_rewind -branch_if_any_lanes_active branch_if_any_lanes_active -37 (label 20 at #203) +branch_if_any_lanes_active branch_if_any_lanes_active -37 (label 20 at #206) label label 0x00000012 load_loop_mask LoopMask = $76 trace_scope TraceScope(-1) when $75 is true @@ -260,7 +274,7 @@ label label 0x00000007 load_condition_mask CondMask = $82 copy_constant $62 = 0 merge_condition_mask CondMask = $72 & $73 -branch_if_no_lanes_active branch_if_no_lanes_active +56 (label 6 at #314) +branch_if_no_lanes_active branch_if_no_lanes_active +53 (label 6 at #314) trace_enter TraceEnter(bool loop_operator_le()) when $13 is true copy_constant $63 = 0 copy_slot_unmasked $64 = $13 @@ -275,7 +289,7 @@ copy_constant $64 = 0 copy_slot_unmasked $65 = $13 copy_slot_masked $64 = Mask($65) trace_scope TraceScope(+1) when $64 is true -branch_if_no_lanes_active branch_if_no_lanes_active +23 (label 22 at #296) +branch_if_no_lanes_active branch_if_no_lanes_active +23 (label 22 at #299) trace_line TraceLine(42) when $13 is true copy_constant i₃ = 0x00000001 (1.401298e-45) trace_var TraceVar(i₃) when $13 is true @@ -297,15 +311,12 @@ trace_var TraceVar(i₃) when $13 is true copy_slot_unmasked $65 = i₃ cmple_imm_int $65 = lessThanEqual($65, 0x00000003) stack_rewind -branch_if_no_active_lanes_eq branch -18 (label 23 at #277) if no lanes of $65 == 0 +branch_if_no_active_lanes_eq branch -18 (label 23 at #280) if no lanes of $65 == 0 label label 0x00000016 trace_scope TraceScope(-1) when $64 is true trace_line TraceLine(45) when $13 is true copy_4_slots_unmasked $64..67 = result -copy_constant $68 = 0x00000009 (1.261169e-44) -copy_constant $69 = 0x00000001 (1.401298e-45) -copy_constant $70 = 0x00000002 (2.802597e-45) -copy_constant $71 = 0x00000003 (4.203895e-45) +copy_4_immutables_unmasked $68..71 = i0..3 [0x00000009 (1.261169e-44), 0x00000001 (1.401298e-45), 0x00000002 (2.802597e-45), 0x00000003 (4.203895e-45)] cmpeq_4_ints $64..67 = equal($64..67, $68..71) bitwise_and_2_ints $64..65 &= $66..67 bitwise_and_int $64 &= $65 @@ -320,7 +331,7 @@ label label 0x00000006 load_condition_mask CondMask = $72 copy_constant $51 = 0 merge_condition_mask CondMask = $61 & $62 -branch_if_no_lanes_active branch_if_no_lanes_active +56 (label 5 at #374) +branch_if_no_lanes_active branch_if_no_lanes_active +53 (label 5 at #371) trace_enter TraceEnter(bool loop_operator_lt()) when $13 is true copy_constant $52 = 0 copy_slot_unmasked $53 = $13 @@ -362,10 +373,7 @@ label label 0x00000019 trace_scope TraceScope(-1) when $53 is true trace_line TraceLine(57) when $13 is true copy_4_slots_unmasked $53..56 = result₁ -copy_constant $57 = 0x00000009 (1.261169e-44) -copy_constant $58 = 0x00000001 (1.401298e-45) -copy_constant $59 = 0x00000002 (2.802597e-45) -copy_constant $60 = 0x00000003 (4.203895e-45) +copy_4_immutables_unmasked $57..60 = i0..3 [0x00000009 (1.261169e-44), 0x00000001 (1.401298e-45), 0x00000002 (2.802597e-45), 0x00000003 (4.203895e-45)] cmpeq_4_ints $53..56 = equal($53..56, $57..60) bitwise_and_2_ints $53..54 &= $55..56 bitwise_and_int $53 &= $54 @@ -380,7 +388,7 @@ label label 0x00000005 load_condition_mask CondMask = $61 copy_constant $40 = 0 merge_condition_mask CondMask = $50 & $51 -branch_if_no_lanes_active branch_if_no_lanes_active +57 (label 4 at #435) +branch_if_no_lanes_active branch_if_no_lanes_active +54 (label 4 at #429) trace_enter TraceEnter(bool loop_operator_ge()) when $13 is true copy_constant $41 = 0 copy_slot_unmasked $42 = $13 @@ -395,7 +403,7 @@ copy_constant $42 = 0 copy_slot_unmasked $43 = $13 copy_slot_masked $42 = Mask($43) trace_scope TraceScope(+1) when $42 is true -branch_if_no_lanes_active branch_if_no_lanes_active +24 (label 28 at #417) +branch_if_no_lanes_active branch_if_no_lanes_active +24 (label 28 at #414) trace_line TraceLine(66) when $13 is true copy_constant i₅ = 0x00000003 (4.203895e-45) trace_var TraceVar(i₅) when $13 is true @@ -418,15 +426,12 @@ copy_constant $43 = 0x00000001 (1.401298e-45) copy_slot_unmasked $44 = i₅ cmple_int $43 = lessThanEqual($43, $44) stack_rewind -branch_if_no_active_lanes_eq branch -19 (label 29 at #397) if no lanes of $43 == 0 +branch_if_no_active_lanes_eq branch -19 (label 29 at #394) if no lanes of $43 == 0 label label 0x0000001C trace_scope TraceScope(-1) when $42 is true trace_line TraceLine(69) when $13 is true copy_4_slots_unmasked $42..45 = result₂ -copy_constant $46 = 0x00000009 (1.261169e-44) -copy_constant $47 = 0x00000003 (4.203895e-45) -copy_constant $48 = 0x00000002 (2.802597e-45) -copy_constant $49 = 0x00000001 (1.401298e-45) +copy_4_immutables_unmasked $46..49 = i4..7 [0x00000009 (1.261169e-44), 0x00000003 (4.203895e-45), 0x00000002 (2.802597e-45), 0x00000001 (1.401298e-45)] cmpeq_4_ints $42..45 = equal($42..45, $46..49) bitwise_and_2_ints $42..43 &= $44..45 bitwise_and_int $42 &= $43 @@ -441,7 +446,7 @@ label label 0x00000004 load_condition_mask CondMask = $50 copy_constant $29 = 0 merge_condition_mask CondMask = $39 & $40 -branch_if_no_lanes_active branch_if_no_lanes_active +57 (label 3 at #496) +branch_if_no_lanes_active branch_if_no_lanes_active +54 (label 3 at #487) trace_enter TraceEnter(bool loop_operator_gt()) when $13 is true copy_constant $30 = 0 copy_slot_unmasked $31 = $13 @@ -456,7 +461,7 @@ copy_constant $31 = 0 copy_slot_unmasked $32 = $13 copy_slot_masked $31 = Mask($32) trace_scope TraceScope(+1) when $31 is true -branch_if_no_lanes_active branch_if_no_lanes_active +24 (label 31 at #478) +branch_if_no_lanes_active branch_if_no_lanes_active +24 (label 31 at #472) trace_line TraceLine(78) when $13 is true copy_constant i₆ = 0x00000003 (4.203895e-45) trace_var TraceVar(i₆) when $13 is true @@ -479,15 +484,12 @@ copy_constant $32 = 0 copy_slot_unmasked $33 = i₆ cmplt_int $32 = lessThan($32, $33) stack_rewind -branch_if_no_active_lanes_eq branch -19 (label 32 at #458) if no lanes of $32 == 0 +branch_if_no_active_lanes_eq branch -19 (label 32 at #452) if no lanes of $32 == 0 label label 0x0000001F trace_scope TraceScope(-1) when $31 is true trace_line TraceLine(81) when $13 is true copy_4_slots_unmasked $31..34 = result₃ -copy_constant $35 = 0x00000009 (1.261169e-44) -copy_constant $36 = 0x00000003 (4.203895e-45) -copy_constant $37 = 0x00000002 (2.802597e-45) -copy_constant $38 = 0x00000001 (1.401298e-45) +copy_4_immutables_unmasked $35..38 = i4..7 [0x00000009 (1.261169e-44), 0x00000003 (4.203895e-45), 0x00000002 (2.802597e-45), 0x00000001 (1.401298e-45)] cmpeq_4_ints $31..34 = equal($31..34, $35..38) bitwise_and_2_ints $31..32 &= $33..34 bitwise_and_int $31 &= $32 @@ -502,7 +504,7 @@ label label 0x00000003 load_condition_mask CondMask = $39 copy_constant $18 = 0 merge_condition_mask CondMask = $28 & $29 -branch_if_no_lanes_active branch_if_no_lanes_active +45 (label 2 at #545) +branch_if_no_lanes_active branch_if_no_lanes_active +44 (label 2 at #535) trace_enter TraceEnter(bool loop_operator_eq()) when $13 is true copy_constant $19 = 0 copy_slot_unmasked $20 = $13 @@ -516,7 +518,7 @@ copy_constant $20 = 0 copy_slot_unmasked $21 = $13 copy_slot_masked $20 = Mask($21) trace_scope TraceScope(+1) when $20 is true -branch_if_no_lanes_active branch_if_no_lanes_active +15 (label 34 at #529) +branch_if_no_lanes_active branch_if_no_lanes_active +15 (label 34 at #520) trace_line TraceLine(100) when $13 is true copy_constant i₇ = 0x00000001 (1.401298e-45) trace_var TraceVar(i₇) when $13 is true @@ -535,8 +537,7 @@ label label 0x00000022 trace_scope TraceScope(-1) when $20 is true trace_line TraceLine(103) when $13 is true copy_4_slots_unmasked $20..23 = result₄ -splat_3_constants $24..26 = 0x00000009 (1.261169e-44) -copy_constant $27 = 0x00000001 (1.401298e-45) +copy_4_immutables_unmasked $24..27 = i8..11 [0x00000009 (1.261169e-44), 0x00000009 (1.261169e-44), 0x00000009 (1.261169e-44), 0x00000001 (1.401298e-45)] cmpeq_4_ints $20..23 = equal($20..23, $24..27) bitwise_and_2_ints $20..21 &= $22..23 bitwise_and_int $20 &= $21 @@ -551,7 +552,7 @@ label label 0x00000002 load_condition_mask CondMask = $28 copy_constant $1 = 0 merge_condition_mask CondMask = $17 & $18 -branch_if_no_lanes_active branch_if_no_lanes_active +55 (label 1 at #604) +branch_if_no_lanes_active branch_if_no_lanes_active +52 (label 1 at #591) trace_enter TraceEnter(bool loop_operator_ne()) when $13 is true copy_constant $2 = 0 copy_slot_unmasked $3 = $13 @@ -565,7 +566,7 @@ copy_constant $3 = 0 copy_slot_unmasked $4 = $13 copy_slot_masked $3 = Mask($4) trace_scope TraceScope(+1) when $3 is true -branch_if_no_lanes_active branch_if_no_lanes_active +23 (label 37 at #586) +branch_if_no_lanes_active branch_if_no_lanes_active +23 (label 37 at #576) trace_line TraceLine(89) when $13 is true copy_constant i₈ = 0x00000001 (1.401298e-45) trace_var TraceVar(i₈) when $13 is true @@ -587,15 +588,12 @@ trace_var TraceVar(i₈) when $13 is true copy_slot_unmasked $4 = i₈ cmpne_imm_int $4 = notEqual($4, 0x00000004) stack_rewind -branch_if_no_active_lanes_eq branch -18 (label 38 at #567) if no lanes of $4 == 0 +branch_if_no_active_lanes_eq branch -18 (label 38 at #557) if no lanes of $4 == 0 label label 0x00000025 trace_scope TraceScope(-1) when $3 is true trace_line TraceLine(92) when $13 is true copy_4_slots_unmasked $3..6 = result₅ -copy_constant $7 = 0x00000009 (1.261169e-44) -copy_constant $8 = 0x00000001 (1.401298e-45) -copy_constant $9 = 0x00000002 (2.802597e-45) -copy_constant $10 = 0x00000003 (4.203895e-45) +copy_4_immutables_unmasked $7..10 = i0..3 [0x00000009 (1.261169e-44), 0x00000001 (1.401298e-45), 0x00000002 (2.802597e-45), 0x00000003 (4.203895e-45)] cmpeq_4_ints $3..6 = equal($3..6, $7..10) bitwise_and_2_ints $3..4 &= $5..6 bitwise_and_int $3 &= $4 diff --git a/tests/sksl/runtime/MultipleCallsInOneStatement.skrp b/tests/sksl/runtime/MultipleCallsInOneStatement.skrp index 611d1b3eb2f6..70d7330784bd 100644 --- a/tests/sksl/runtime/MultipleCallsInOneStatement.skrp +++ b/tests/sksl/runtime/MultipleCallsInOneStatement.skrp @@ -1,3 +1,5 @@ +72 instructions + store_device_xy01 $13..16 = DeviceCoords.xy01 splat_2_constants $15..16 = 0x3F000000 (0.5) cmpeq_2_floats $13..14 = equal($13..14, $15..16) diff --git a/tests/sksl/runtime/Ossfuzz52603.skrp b/tests/sksl/runtime/Ossfuzz52603.skrp index b81e214ed244..266b477ed11a 100644 --- a/tests/sksl/runtime/Ossfuzz52603.skrp +++ b/tests/sksl/runtime/Ossfuzz52603.skrp @@ -1,3 +1,5 @@ +4 instructions + store_src_rg v0..1 = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_4_uniforms $0..3 = colorGreen diff --git a/tests/sksl/runtime/PrecisionQualifiers.skrp b/tests/sksl/runtime/PrecisionQualifiers.skrp index d3a0d93d560f..92e6c67200c2 100644 --- a/tests/sksl/runtime/PrecisionQualifiers.skrp +++ b/tests/sksl/runtime/PrecisionQualifiers.skrp @@ -1,61 +1,10 @@ +382 instructions + [immutable slots] -zero(0) = 0 -zero(1) = 0 -zero(2) = 0 -zero(3) = 0 -one(0) = 0x3F800000 (1.0) -one(1) = 0x3F800000 (1.0) -one(2) = 0x3F800000 (1.0) -one(3) = 0x3F800000 (1.0) -mp = 0x3F000000 (0.5) -ihp = 0x00000002 (2.802597e-45) -mp2(0) = 0x40000000 (2.0) -mp2(1) = 0x40000000 (2.0) -mp3(0) = 0x40400000 (3.0) -mp3(1) = 0x40400000 (3.0) -mp3(2) = 0x40400000 (3.0) -mp4(0) = 0x40800000 (4.0) -mp4(1) = 0x40800000 (4.0) -mp4(2) = 0x40800000 (4.0) -mp4(3) = 0x40800000 (4.0) -ihp2(0) = 0x00000002 (2.802597e-45) -ihp2(1) = 0x00000002 (2.802597e-45) -ihp3(0) = 0x00000003 (4.203895e-45) -ihp3(1) = 0x00000003 (4.203895e-45) -ihp3(2) = 0x00000003 (4.203895e-45) -ihp4(0) = 0x00000004 (5.605194e-45) -ihp4(1) = 0x00000004 (5.605194e-45) -ihp4(2) = 0x00000004 (5.605194e-45) -ihp4(3) = 0x00000004 (5.605194e-45) -mp2₁(0) = 0x40000000 (2.0) -mp2₁(1) = 0 -mp2₁(2) = 0 -mp2₁(3) = 0x40000000 (2.0) -mp3₁(0) = 0x40400000 (3.0) -mp3₁(1) = 0 -mp3₁(2) = 0 -mp3₁(3) = 0 -mp3₁(4) = 0x40400000 (3.0) -mp3₁(5) = 0 -mp3₁(6) = 0 -mp3₁(7) = 0 -mp3₁(8) = 0x40400000 (3.0) -mp4₁(0) = 0x40800000 (4.0) -mp4₁(1) = 0 -mp4₁(2) = 0 -mp4₁(3) = 0 -mp4₁(4) = 0 -mp4₁(5) = 0x40800000 (4.0) -mp4₁(6) = 0 -mp4₁(7) = 0 -mp4₁(8) = 0 -mp4₁(9) = 0 -mp4₁(10) = 0x40800000 (4.0) -mp4₁(11) = 0 -mp4₁(12) = 0 -mp4₁(13) = 0 -mp4₁(14) = 0 -mp4₁(15) = 0x40800000 (4.0) +i0 = 0 +i1 = 0x3F800000 (1.0) +i2 = 0x40000000 (2.0) +i3 = 0x40400000 (3.0) store_device_xy01 $13..16 = DeviceCoords.xy01 splat_2_constants $15..16 = 0x3F000000 (0.5) @@ -74,8 +23,10 @@ copy_slot_unmasked $1 = $13 copy_slot_masked $0 = Mask($1) trace_scope TraceScope(+1) when $0 is true trace_line TraceLine(58) when $13 is true +splat_4_constants zero = 0 trace_var TraceVar(zero) when $13 is true trace_line TraceLine(59) when $13 is true +splat_4_constants one = 0x3F800000 (1.0) trace_var TraceVar(one) when $13 is true trace_line TraceLine(60) when $13 is true copy_4_uniforms green = colorGreen @@ -106,18 +57,20 @@ store_condition_mask $25 = CondMask store_condition_mask $33 = CondMask store_condition_mask $69 = CondMask store_condition_mask $81 = CondMask -branch_if_no_lanes_active branch_if_no_lanes_active +27 (label 7 at #77) +branch_if_no_lanes_active branch_if_no_lanes_active +29 (label 7 at #81) trace_enter TraceEnter(bool test_scalar()) when $13 is true copy_constant $82 = 0 copy_slot_unmasked $83 = $13 copy_slot_masked $82 = Mask($83) trace_scope TraceScope(+1) when $82 is true trace_line TraceLine(6) when $13 is true +copy_constant mp = 0x3F000000 (0.5) trace_var TraceVar(mp) when $13 is true trace_line TraceLine(7) when $13 is true copy_slot_unmasked hp = mp trace_var TraceVar(hp) when $13 is true trace_line TraceLine(8) when $13 is true +copy_constant ihp = 0x00000002 (2.802597e-45) trace_var TraceVar(ihp) when $13 is true trace_line TraceLine(9) when $13 is true copy_slot_unmasked imp = ihp @@ -136,38 +89,44 @@ copy_slot_unmasked $82 = [test_scalar].result label label 0x00000007 copy_constant $70 = 0 merge_condition_mask CondMask = $81 & $82 -branch_if_no_lanes_active branch_if_no_lanes_active +76 (label 6 at #156) +branch_if_no_lanes_active branch_if_no_lanes_active +82 (label 6 at #166) trace_enter TraceEnter(bool test_vector()) when $13 is true copy_constant $71 = 0 copy_slot_unmasked $72 = $13 copy_slot_masked $71 = Mask($72) trace_scope TraceScope(+1) when $71 is true trace_line TraceLine(15) when $13 is true +splat_2_constants mp2 = 0x40000000 (2.0) trace_var TraceVar(mp2) when $13 is true trace_line TraceLine(16) when $13 is true copy_2_slots_unmasked hp2 = mp2 trace_var TraceVar(hp2) when $13 is true trace_line TraceLine(17) when $13 is true +splat_3_constants mp3 = 0x40400000 (3.0) trace_var TraceVar(mp3) when $13 is true trace_line TraceLine(18) when $13 is true copy_3_slots_unmasked hp3 = mp3 trace_var TraceVar(hp3) when $13 is true trace_line TraceLine(19) when $13 is true +splat_4_constants mp4 = 0x40800000 (4.0) trace_var TraceVar(mp4) when $13 is true trace_line TraceLine(20) when $13 is true copy_4_slots_unmasked hp4 = mp4 trace_var TraceVar(hp4) when $13 is true trace_line TraceLine(22) when $13 is true +splat_2_constants ihp2 = 0x00000002 (2.802597e-45) trace_var TraceVar(ihp2) when $13 is true trace_line TraceLine(23) when $13 is true copy_2_slots_unmasked imp2 = ihp2 trace_var TraceVar(imp2) when $13 is true trace_line TraceLine(24) when $13 is true +splat_3_constants ihp3 = 0x00000003 (4.203895e-45) trace_var TraceVar(ihp3) when $13 is true trace_line TraceLine(25) when $13 is true copy_3_slots_unmasked imp3 = ihp3 trace_var TraceVar(imp3) when $13 is true trace_line TraceLine(26) when $13 is true +splat_4_constants ihp4 = 0x00000004 (5.605194e-45) trace_var TraceVar(ihp4) when $13 is true trace_line TraceLine(27) when $13 is true copy_4_slots_unmasked imp4 = ihp4 @@ -216,18 +175,28 @@ label label 0x00000006 load_condition_mask CondMask = $81 copy_constant $34 = 0 merge_condition_mask CondMask = $69 & $70 -branch_if_no_lanes_active branch_if_no_lanes_active +66 (label 5 at #226) +branch_if_no_lanes_active branch_if_no_lanes_active +83 (label 5 at #253) trace_enter TraceEnter(bool test_matrix()) when $13 is true copy_constant $35 = 0 copy_slot_unmasked $36 = $13 copy_slot_masked $35 = Mask($36) trace_scope TraceScope(+1) when $35 is true trace_line TraceLine(34) when $13 is true +copy_constant $36 = 0 +copy_constant $37 = 0x40000000 (2.0) +swizzle_4 $36..39 = ($36..39).yxxy +copy_4_slots_unmasked mp2₁ = $36..39 trace_var TraceVar(mp2₁) when $13 is true trace_line TraceLine(35) when $13 is true copy_4_slots_unmasked hp2₁ = mp2₁ trace_var TraceVar(hp2₁) when $13 is true trace_line TraceLine(36) when $13 is true +copy_constant $36 = 0 +copy_constant $37 = 0x40400000 (3.0) +shuffle $36..44 = ($36..44)[1 0 0 0 1 0 0 0 1] +copy_4_slots_unmasked mp3₁(0..3) = $36..39 +copy_4_slots_unmasked mp3₁(4..7) = $40..43 +copy_slot_unmasked mp3₁(8) = $44 trace_var TraceVar(mp3₁) when $13 is true trace_line TraceLine(37) when $13 is true copy_4_slots_unmasked hp3₁(0..3) = mp3₁(0..3) @@ -235,6 +204,13 @@ copy_4_slots_unmasked hp3₁(4..7) = mp3₁(4..7) copy_slot_unmasked hp3₁(8) = mp3₁(8) trace_var TraceVar(hp3₁) when $13 is true trace_line TraceLine(38) when $13 is true +copy_constant $36 = 0 +copy_constant $37 = 0x40800000 (4.0) +shuffle $36..51 = ($36..51)[1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1] +copy_4_slots_unmasked mp4₁(0..3) = $36..39 +copy_4_slots_unmasked mp4₁(4..7) = $40..43 +copy_4_slots_unmasked mp4₁(8..11) = $44..47 +copy_4_slots_unmasked mp4₁(12..15) = $48..51 trace_var TraceVar(mp4₁) when $13 is true trace_line TraceLine(39) when $13 is true copy_4_slots_unmasked hp4₁(0..3) = mp4₁(0..3) @@ -286,7 +262,7 @@ label label 0x00000005 load_condition_mask CondMask = $69 copy_constant $26 = 0 merge_condition_mask CondMask = $33 & $34 -branch_if_no_lanes_active branch_if_no_lanes_active +66 (label 4 at #296) +branch_if_no_lanes_active branch_if_no_lanes_active +62 (label 4 at #319) trace_enter TraceEnter(bool test_array()) when $13 is true copy_constant $27 = 0 copy_slot_unmasked $28 = $13 @@ -310,26 +286,22 @@ trace_line TraceLine(47) when $13 is true splat_4_constants mv[0], mv[1] = 0 trace_var TraceVar(mv[0], mv[1]) when $13 is true trace_line TraceLine(47) when $13 is true -copy_constant $28 = 0 -copy_constant $29 = 0x3F800000 (1.0) +copy_2_immutables_unmasked $28..29 = i0..1 [0, 0x3F800000 (1.0)] copy_2_slots_masked mv[0] = Mask($28..29) trace_var TraceVar(mv[0]) when $13 is true trace_line TraceLine(47) when $13 is true -copy_constant $28 = 0x40000000 (2.0) -copy_constant $29 = 0x40400000 (3.0) +copy_2_immutables_unmasked $28..29 = i2..3 [0x40000000 (2.0), 0x40400000 (3.0)] copy_2_slots_masked mv[1] = Mask($28..29) trace_var TraceVar(mv[1]) when $13 is true trace_line TraceLine(48) when $13 is true splat_4_constants hv[0], hv[1] = 0 trace_var TraceVar(hv[0], hv[1]) when $13 is true trace_line TraceLine(48) when $13 is true -copy_constant $28 = 0 -copy_constant $29 = 0x3F800000 (1.0) +copy_2_immutables_unmasked $28..29 = i0..1 [0, 0x3F800000 (1.0)] copy_2_slots_masked hv[0] = Mask($28..29) trace_var TraceVar(hv[0]) when $13 is true trace_line TraceLine(48) when $13 is true -copy_constant $28 = 0x40000000 (2.0) -copy_constant $29 = 0x40400000 (3.0) +copy_2_immutables_unmasked $28..29 = i2..3 [0x40000000 (2.0), 0x40400000 (3.0)] copy_2_slots_masked hv[1] = Mask($28..29) trace_var TraceVar(hv[1]) when $13 is true trace_line TraceLine(50) when $13 is true @@ -356,7 +328,7 @@ label label 0x00000004 load_condition_mask CondMask = $33 copy_constant $22 = 0 merge_condition_mask CondMask = $25 & $26 -branch_if_no_lanes_active branch_if_no_lanes_active +18 (label 3 at #318) +branch_if_no_lanes_active branch_if_no_lanes_active +18 (label 3 at #341) trace_enter TraceEnter(bool highp_param(float value)) when $13 is true copy_constant value = 0x3F800000 (1.0) trace_var TraceVar(value) when $13 is true @@ -378,7 +350,7 @@ label label 0x00000003 load_condition_mask CondMask = $25 copy_constant $18 = 0 merge_condition_mask CondMask = $21 & $22 -branch_if_no_lanes_active branch_if_no_lanes_active +18 (label 2 at #340) +branch_if_no_lanes_active branch_if_no_lanes_active +18 (label 2 at #363) trace_enter TraceEnter(bool mediump_param(half value)) when $13 is true copy_constant value₁ = 0x40000000 (2.0) trace_var TraceVar(value₁) when $13 is true @@ -400,7 +372,7 @@ label label 0x00000002 load_condition_mask CondMask = $21 copy_constant $1 = 0 merge_condition_mask CondMask = $17 & $18 -branch_if_no_lanes_active branch_if_no_lanes_active +18 (label 1 at #362) +branch_if_no_lanes_active branch_if_no_lanes_active +18 (label 1 at #385) trace_enter TraceEnter(bool lowp_param(half value)) when $13 is true copy_constant value₂ = 0x40400000 (3.0) trace_var TraceVar(value₂) when $13 is true diff --git a/tests/sksl/runtime/QualifierOrder.skrp b/tests/sksl/runtime/QualifierOrder.skrp index 38d4202a80ad..8a32ac124db9 100644 --- a/tests/sksl/runtime/QualifierOrder.skrp +++ b/tests/sksl/runtime/QualifierOrder.skrp @@ -1,3 +1,5 @@ +9 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_2_slots_unmasked x = coords diff --git a/tests/sksl/runtime/RecursiveComparison_Arrays.skrp b/tests/sksl/runtime/RecursiveComparison_Arrays.skrp index da51e94b60af..e7b15eedfb6d 100644 --- a/tests/sksl/runtime/RecursiveComparison_Arrays.skrp +++ b/tests/sksl/runtime/RecursiveComparison_Arrays.skrp @@ -1,6 +1,8 @@ +402 instructions + [immutable slots] -EQ = 0xFFFFFFFF -NE = 0 +i0 = 0xFFFFFFFF +i1 = 0 store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -58,7 +60,7 @@ store_condition_mask $48 = CondMask store_condition_mask $57 = CondMask store_condition_mask $66 = CondMask store_condition_mask $74 = CondMask -copy_slot_unmasked $75 = EQ +copy_constant $75 = 0xFFFFFFFF copy_4_slots_unmasked $67..70 = _1_a[0], _1_a[1], _1_a[2], _2_b[0] copy_2_slots_unmasked $71..72 = _2_b[1], _2_b[2] cmpne_3_floats $67..69 = notEqual($67..69, $70..72) @@ -77,7 +79,7 @@ load_condition_mask CondMask = $74 copy_constant $58 = 0 merge_condition_mask CondMask = $66 & $67 branch_if_no_lanes_active branch_if_no_lanes_active +48 (label 7 at #123) -copy_slot_unmasked eq = NE +copy_constant eq = 0 copy_slot_unmasked f1 = F42 copy_slot_unmasked f2 = ZM copy_slot_unmasked f3 = ZP @@ -129,7 +131,7 @@ load_condition_mask CondMask = $66 copy_constant $49 = 0 merge_condition_mask CondMask = $57 & $58 branch_if_no_lanes_active branch_if_no_lanes_active +46 (label 6 at #173) -copy_slot_unmasked eq = NE +copy_constant eq = 0 copy_slot_unmasked f1 = F42 copy_2_slots_unmasked f2, f3 = NAN1, NAN2 copy_uniform $50 = colorGreen(0) @@ -179,7 +181,7 @@ load_condition_mask CondMask = $57 copy_constant $40 = 0 merge_condition_mask CondMask = $48 & $49 branch_if_no_lanes_active branch_if_no_lanes_active +47 (label 5 at #224) -copy_slot_unmasked eq = EQ +copy_constant eq = 0xFFFFFFFF copy_slot_unmasked f1 = F42 copy_2_slots_unmasked f2, f3 = NAN1, NAN2 copy_uniform $41 = colorGreen(0) @@ -230,7 +232,7 @@ load_condition_mask CondMask = $48 copy_constant $31 = 0 merge_condition_mask CondMask = $39 & $40 branch_if_no_lanes_active branch_if_no_lanes_active +43 (label 4 at #271) -copy_slot_unmasked eq₁ = NE +copy_constant eq₁ = 0 copy_3_slots_unmasked f1₁, f2₁, f3₁ = F42, F43, F44 copy_uniform $32 = colorGreen(0) add_imm_float $32 += 0x40000000 (2.0) @@ -277,7 +279,7 @@ load_condition_mask CondMask = $39 copy_constant $22 = 0 merge_condition_mask CondMask = $30 & $31 branch_if_no_lanes_active branch_if_no_lanes_active +44 (label 3 at #319) -copy_slot_unmasked eq₁ = EQ +copy_constant eq₁ = 0xFFFFFFFF copy_3_slots_unmasked f1₁, f2₁, f3₁ = F42, F43, F44 copy_uniform $23 = colorGreen(0) add_imm_float $23 += 0x40000000 (2.0) @@ -325,7 +327,7 @@ load_condition_mask CondMask = $30 copy_constant $13 = 0 merge_condition_mask CondMask = $21 & $22 branch_if_no_lanes_active branch_if_no_lanes_active +45 (label 2 at #368) -copy_slot_unmasked eq₁ = NE +copy_constant eq₁ = 0 copy_slot_unmasked f1₁ = NAN1 copy_slot_unmasked f2₁ = ZM copy_slot_unmasked f3₁ = ZP @@ -374,7 +376,7 @@ load_condition_mask CondMask = $21 copy_constant $0 = 0 merge_condition_mask CondMask = $12 & $13 branch_if_no_lanes_active branch_if_no_lanes_active +46 (label 1 at #418) -copy_slot_unmasked eq₁ = EQ +copy_constant eq₁ = 0xFFFFFFFF copy_slot_unmasked f1₁ = NAN1 copy_slot_unmasked f2₁ = ZM copy_slot_unmasked f3₁ = ZP diff --git a/tests/sksl/runtime/RecursiveComparison_Structs.skrp b/tests/sksl/runtime/RecursiveComparison_Structs.skrp index a2b6a3a09b8b..17299180815e 100644 --- a/tests/sksl/runtime/RecursiveComparison_Structs.skrp +++ b/tests/sksl/runtime/RecursiveComparison_Structs.skrp @@ -1,6 +1,8 @@ +499 instructions + [immutable slots] -EQ = 0xFFFFFFFF -NE = 0 +i0 = 0xFFFFFFFF +i1 = 0 store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -58,7 +60,7 @@ store_condition_mask $40 = CondMask store_condition_mask $47 = CondMask store_condition_mask $54 = CondMask store_condition_mask $60 = CondMask -copy_slot_unmasked $61 = EQ +copy_constant $61 = 0xFFFFFFFF copy_slot_unmasked $55 = _1_a.f1 copy_slot_unmasked $56 = _2_b.f1 cmpne_float $55 = notEqual($55, $56) @@ -89,7 +91,7 @@ load_condition_mask CondMask = $60 copy_constant $48 = 0 merge_condition_mask CondMask = $54 & $55 branch_if_no_lanes_active branch_if_no_lanes_active +60 (label 7 at #147) -copy_slot_unmasked eq = NE +copy_constant eq = 0 copy_slot_unmasked f1 = F42 copy_slot_unmasked f2 = ZM copy_slot_unmasked f3 = ZP @@ -153,7 +155,7 @@ load_condition_mask CondMask = $54 copy_constant $41 = 0 merge_condition_mask CondMask = $47 & $48 branch_if_no_lanes_active branch_if_no_lanes_active +58 (label 6 at #209) -copy_slot_unmasked eq = NE +copy_constant eq = 0 copy_slot_unmasked f1 = F42 copy_2_slots_unmasked f2, f3 = NAN1, NAN2 copy_uniform $42 = colorGreen(0) @@ -215,7 +217,7 @@ load_condition_mask CondMask = $47 copy_constant $34 = 0 merge_condition_mask CondMask = $40 & $41 branch_if_no_lanes_active branch_if_no_lanes_active +59 (label 5 at #272) -copy_slot_unmasked eq = EQ +copy_constant eq = 0xFFFFFFFF copy_slot_unmasked f1 = F42 copy_2_slots_unmasked f2, f3 = NAN1, NAN2 copy_uniform $35 = colorGreen(0) @@ -278,7 +280,7 @@ load_condition_mask CondMask = $40 copy_constant $27 = 0 merge_condition_mask CondMask = $33 & $34 branch_if_no_lanes_active branch_if_no_lanes_active +55 (label 4 at #331) -copy_slot_unmasked eq₁ = NE +copy_constant eq₁ = 0 copy_3_slots_unmasked f1₁, f2₁, f3₁ = F42, F43, F44 copy_uniform $28 = colorGreen(0) add_imm_float $28 += 0x40000000 (2.0) @@ -337,7 +339,7 @@ load_condition_mask CondMask = $33 copy_constant $20 = 0 merge_condition_mask CondMask = $26 & $27 branch_if_no_lanes_active branch_if_no_lanes_active +56 (label 3 at #391) -copy_slot_unmasked eq₁ = EQ +copy_constant eq₁ = 0xFFFFFFFF copy_3_slots_unmasked f1₁, f2₁, f3₁ = F42, F43, F44 copy_uniform $21 = colorGreen(0) add_imm_float $21 += 0x40000000 (2.0) @@ -397,7 +399,7 @@ load_condition_mask CondMask = $26 copy_constant $13 = 0 merge_condition_mask CondMask = $19 & $20 branch_if_no_lanes_active branch_if_no_lanes_active +57 (label 2 at #452) -copy_slot_unmasked eq₁ = NE +copy_constant eq₁ = 0 copy_slot_unmasked f1₁ = NAN1 copy_slot_unmasked f2₁ = ZM copy_slot_unmasked f3₁ = ZP @@ -458,7 +460,7 @@ load_condition_mask CondMask = $19 copy_constant $0 = 0 merge_condition_mask CondMask = $12 & $13 branch_if_no_lanes_active branch_if_no_lanes_active +59 (label 1 at #515) -copy_slot_unmasked eq₁ = EQ +copy_constant eq₁ = 0xFFFFFFFF copy_slot_unmasked f1₁ = NAN1 copy_slot_unmasked f2₁ = ZM copy_slot_unmasked f3₁ = ZP diff --git a/tests/sksl/runtime/RecursiveComparison_Types.skrp b/tests/sksl/runtime/RecursiveComparison_Types.skrp index 18ea73fe918f..0ea22828743c 100644 --- a/tests/sksl/runtime/RecursiveComparison_Types.skrp +++ b/tests/sksl/runtime/RecursiveComparison_Types.skrp @@ -1,6 +1,8 @@ +722 instructions + [immutable slots] -EQ = 0xFFFFFFFF -NE = 0 +i0 = 0xFFFFFFFF +i1 = 0 store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -80,7 +82,7 @@ store_condition_mask $48 = CondMask store_condition_mask $57 = CondMask store_condition_mask $66 = CondMask store_condition_mask $74 = CondMask -copy_slot_unmasked $75 = EQ +copy_constant $75 = 0xFFFFFFFF copy_slot_unmasked $67 = _1_a[0].f1 copy_slot_unmasked $68 = _2_b[0].f1 cmpne_float $67 = notEqual($67, $68) @@ -123,7 +125,7 @@ load_condition_mask CondMask = $74 copy_constant $58 = 0 merge_condition_mask CondMask = $66 & $67 branch_if_no_lanes_active branch_if_no_lanes_active +87 (label 7 at #208) -copy_slot_unmasked eq = NE +copy_constant eq = 0 copy_slot_unmasked f1 = F42 copy_slot_unmasked v2 = ZM copy_slot_unmasked f3 = ZP @@ -214,7 +216,7 @@ load_condition_mask CondMask = $66 copy_constant $49 = 0 merge_condition_mask CondMask = $57 & $58 branch_if_no_lanes_active branch_if_no_lanes_active +85 (label 6 at #297) -copy_slot_unmasked eq = NE +copy_constant eq = 0 copy_slot_unmasked f1 = F42 copy_2_slots_unmasked v2, f3 = NAN1, NAN2 copy_3_slots_unmasked f4, f5, f6 = F43, F44, F45 @@ -303,7 +305,7 @@ load_condition_mask CondMask = $57 copy_constant $40 = 0 merge_condition_mask CondMask = $48 & $49 branch_if_no_lanes_active branch_if_no_lanes_active +86 (label 5 at #387) -copy_slot_unmasked eq = EQ +copy_constant eq = 0xFFFFFFFF copy_slot_unmasked f1 = F42 copy_2_slots_unmasked v2, f3 = NAN1, NAN2 copy_3_slots_unmasked f4, f5, f6 = F43, F44, F45 @@ -393,7 +395,7 @@ load_condition_mask CondMask = $48 copy_constant $31 = 0 merge_condition_mask CondMask = $39 & $40 branch_if_no_lanes_active branch_if_no_lanes_active +82 (label 4 at #473) -copy_slot_unmasked eq₁ = NE +copy_constant eq₁ = 0 copy_4_slots_unmasked f1₁, v2₁, f3₁, f4₁ = F42, F43, F44, F45 copy_2_slots_unmasked f5₁, f6₁ = F46, F47 copy_uniform $32 = colorGreen(0) @@ -479,7 +481,7 @@ load_condition_mask CondMask = $39 copy_constant $22 = 0 merge_condition_mask CondMask = $30 & $31 branch_if_no_lanes_active branch_if_no_lanes_active +84 (label 3 at #561) -copy_slot_unmasked eq₁ = EQ +copy_constant eq₁ = 0xFFFFFFFF copy_4_slots_unmasked f1₁, v2₁, f3₁, f4₁ = F42, F43, F44, F45 copy_2_slots_unmasked f5₁, f6₁ = F46, F47 copy_uniform $23 = colorGreen(0) @@ -567,7 +569,7 @@ load_condition_mask CondMask = $30 copy_constant $13 = 0 merge_condition_mask CondMask = $21 & $22 branch_if_no_lanes_active branch_if_no_lanes_active +84 (label 2 at #649) -copy_slot_unmasked eq₁ = NE +copy_constant eq₁ = 0 copy_slot_unmasked f1₁ = NAN1 copy_slot_unmasked v2₁ = ZM copy_slot_unmasked f3₁ = ZP @@ -655,7 +657,7 @@ load_condition_mask CondMask = $21 copy_constant $0 = 0 merge_condition_mask CondMask = $12 & $13 branch_if_no_lanes_active branch_if_no_lanes_active +85 (label 1 at #738) -copy_slot_unmasked eq₁ = EQ +copy_constant eq₁ = 0xFFFFFFFF copy_slot_unmasked f1₁ = NAN1 copy_slot_unmasked v2₁ = ZM copy_slot_unmasked f3₁ = ZP diff --git a/tests/sksl/runtime/RecursiveComparison_Vectors.skrp b/tests/sksl/runtime/RecursiveComparison_Vectors.skrp index 284d7263baa8..30ccb0f86bfb 100644 --- a/tests/sksl/runtime/RecursiveComparison_Vectors.skrp +++ b/tests/sksl/runtime/RecursiveComparison_Vectors.skrp @@ -1,6 +1,8 @@ +376 instructions + [immutable slots] -EQ = 0xFFFFFFFF -NE = 0 +i0 = 0xFFFFFFFF +i1 = 0 store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -61,7 +63,7 @@ store_condition_mask $56 = CondMask store_condition_mask $67 = CondMask store_condition_mask $78 = CondMask store_condition_mask $88 = CondMask -copy_slot_unmasked $89 = EQ +copy_constant $89 = 0xFFFFFFFF copy_4_slots_unmasked $79..82 = _1_a copy_4_slots_unmasked $83..86 = _2_b cmpne_4_floats $79..82 = notEqual($79..82, $83..86) @@ -80,7 +82,7 @@ load_condition_mask CondMask = $88 copy_constant $68 = 0 merge_condition_mask CondMask = $78 & $79 branch_if_no_lanes_active branch_if_no_lanes_active +43 (label 7 at #121) -copy_slot_unmasked eq = NE +copy_constant eq = 0 copy_slot_unmasked f1 = F42 copy_slot_unmasked f2 = ZM copy_slot_unmasked f3 = ZP @@ -127,7 +129,7 @@ load_condition_mask CondMask = $78 copy_constant $57 = 0 merge_condition_mask CondMask = $67 & $68 branch_if_no_lanes_active branch_if_no_lanes_active +41 (label 6 at #166) -copy_slot_unmasked eq = NE +copy_constant eq = 0 copy_slot_unmasked f1 = F42 copy_2_slots_unmasked f2, f3 = NAN1, NAN2 copy_slot_unmasked f4 = F43 @@ -172,7 +174,7 @@ load_condition_mask CondMask = $67 copy_constant $46 = 0 merge_condition_mask CondMask = $56 & $57 branch_if_no_lanes_active branch_if_no_lanes_active +42 (label 5 at #212) -copy_slot_unmasked eq = EQ +copy_constant eq = 0xFFFFFFFF copy_slot_unmasked f1 = F42 copy_2_slots_unmasked f2, f3 = NAN1, NAN2 copy_slot_unmasked f4 = F43 @@ -218,7 +220,7 @@ load_condition_mask CondMask = $56 copy_constant $35 = 0 merge_condition_mask CondMask = $45 & $46 branch_if_no_lanes_active branch_if_no_lanes_active +39 (label 4 at #255) -copy_slot_unmasked eq₁ = NE +copy_constant eq₁ = 0 copy_4_slots_unmasked f1₁, f2₁, f3₁, f4₁ = F42, F43, F44, F45 copy_uniform $36 = colorGreen(0) add_imm_float $36 += 0x40000000 (2.0) @@ -261,7 +263,7 @@ load_condition_mask CondMask = $45 copy_constant $24 = 0 merge_condition_mask CondMask = $34 & $35 branch_if_no_lanes_active branch_if_no_lanes_active +40 (label 3 at #299) -copy_slot_unmasked eq₁ = EQ +copy_constant eq₁ = 0xFFFFFFFF copy_4_slots_unmasked f1₁, f2₁, f3₁, f4₁ = F42, F43, F44, F45 copy_uniform $25 = colorGreen(0) add_imm_float $25 += 0x40000000 (2.0) @@ -305,7 +307,7 @@ load_condition_mask CondMask = $34 copy_constant $13 = 0 merge_condition_mask CondMask = $23 & $24 branch_if_no_lanes_active branch_if_no_lanes_active +42 (label 2 at #345) -copy_slot_unmasked eq₁ = NE +copy_constant eq₁ = 0 copy_slot_unmasked f1₁ = NAN1 copy_slot_unmasked f2₁ = ZM copy_slot_unmasked f3₁ = ZP @@ -351,7 +353,7 @@ load_condition_mask CondMask = $23 copy_constant $0 = 0 merge_condition_mask CondMask = $12 & $13 branch_if_no_lanes_active branch_if_no_lanes_active +43 (label 1 at #392) -copy_slot_unmasked eq₁ = EQ +copy_constant eq₁ = 0xFFFFFFFF copy_slot_unmasked f1₁ = NAN1 copy_slot_unmasked f2₁ = ZM copy_slot_unmasked f3₁ = ZP diff --git a/tests/sksl/runtime/SampleWithExplicitCoord.skrp b/tests/sksl/runtime/SampleWithExplicitCoord.skrp index 769e4a11355d..75f85b2e77e6 100644 --- a/tests/sksl/runtime/SampleWithExplicitCoord.skrp +++ b/tests/sksl/runtime/SampleWithExplicitCoord.skrp @@ -1,3 +1,5 @@ +5 instructions, 1 invocations + store_src_rg p = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_2_slots_unmasked $0..1 = p diff --git a/tests/sksl/runtime/Switch.skrp b/tests/sksl/runtime/Switch.skrp index 97efb3e50edc..d4877f65978f 100644 --- a/tests/sksl/runtime/Switch.skrp +++ b/tests/sksl/runtime/Switch.skrp @@ -1,3 +1,5 @@ +29 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true splat_4_constants color = 0 diff --git a/tests/sksl/runtime/SwitchDefaultOnly.skrp b/tests/sksl/runtime/SwitchDefaultOnly.skrp index 1e04d062f890..48c55bf0645f 100644 --- a/tests/sksl/runtime/SwitchDefaultOnly.skrp +++ b/tests/sksl/runtime/SwitchDefaultOnly.skrp @@ -1,3 +1,5 @@ +14 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true store_loop_mask $0 = LoopMask diff --git a/tests/sksl/runtime/SwitchWithFallthrough.skrp b/tests/sksl/runtime/SwitchWithFallthrough.skrp index 03b46c428c0e..d451b8b68a33 100644 --- a/tests/sksl/runtime/SwitchWithFallthrough.skrp +++ b/tests/sksl/runtime/SwitchWithFallthrough.skrp @@ -1,3 +1,5 @@ +62 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_uniform $0 = colorGreen(1) diff --git a/tests/sksl/runtime/SwitchWithLoops.skrp b/tests/sksl/runtime/SwitchWithLoops.skrp index 412a8a9a536f..738604b26494 100644 --- a/tests/sksl/runtime/SwitchWithLoops.skrp +++ b/tests/sksl/runtime/SwitchWithLoops.skrp @@ -1,3 +1,5 @@ +127 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_uniform $0 = colorGreen(1) diff --git a/tests/sksl/runtime/VectorIndexing.skrp b/tests/sksl/runtime/VectorIndexing.skrp index e64a8c431fb5..bc247282de62 100644 --- a/tests/sksl/runtime/VectorIndexing.skrp +++ b/tests/sksl/runtime/VectorIndexing.skrp @@ -1,3 +1,5 @@ +52 instructions + store_src_rg xy = src.rg init_lane_masks CondMask = LoopMask = RetMask = true splat_2_constants _0_sum, _1_i = 0 diff --git a/tests/sksl/shared/ArrayCast.asm.frag b/tests/sksl/shared/ArrayCast.asm.frag index 50f5f4a97444..0b71ebee7680 100644 --- a/tests/sksl/shared/ArrayCast.asm.frag +++ b/tests/sksl/shared/ArrayCast.asm.frag @@ -1,166 +1,166 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %f "f" -OpName %h "h" -OpName %i3 "i3" -OpName %s3 "s3" -OpName %h2x2 "h2x2" -OpName %f2x2 "f2x2" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %_arr_float_int_4 ArrayStride 16 -OpDecorate %h RelaxedPrecision -OpDecorate %_arr_v3int_int_3 ArrayStride 16 -OpDecorate %_arr_mat2v2float_int_2 ArrayStride 32 -OpDecorate %98 RelaxedPrecision -OpDecorate %100 RelaxedPrecision -OpDecorate %101 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %f "f" + OpName %h "h" + OpName %i3 "i3" + OpName %s3 "s3" + OpName %h2x2 "h2x2" + OpName %f2x2 "f2x2" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %_arr_float_int_4 ArrayStride 16 + OpDecorate %h RelaxedPrecision + OpDecorate %_arr_v3int_int_3 ArrayStride 16 + OpDecorate %_arr_mat2v2float_int_2 ArrayStride 32 + OpDecorate %98 RelaxedPrecision + OpDecorate %100 RelaxedPrecision + OpDecorate %101 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%int = OpTypeInt 32 1 -%int_4 = OpConstant %int 4 + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %int = OpTypeInt 32 1 + %int_4 = OpConstant %int 4 %_arr_float_int_4 = OpTypeArray %float %int_4 %_ptr_Function__arr_float_int_4 = OpTypePointer Function %_arr_float_int_4 -%float_1 = OpConstant %float 1 -%float_2 = OpConstant %float 2 -%float_3 = OpConstant %float 3 -%float_4 = OpConstant %float 4 -%v3int = OpTypeVector %int 3 -%int_3 = OpConstant %int 3 + %float_1 = OpConstant %float 1 + %float_2 = OpConstant %float 2 + %float_3 = OpConstant %float 3 + %float_4 = OpConstant %float 4 + %v3int = OpTypeVector %int 3 + %int_3 = OpConstant %int 3 %_arr_v3int_int_3 = OpTypeArray %v3int %int_3 %_ptr_Function__arr_v3int_int_3 = OpTypePointer Function %_arr_v3int_int_3 -%int_1 = OpConstant %int 1 -%43 = OpConstantComposite %v3int %int_1 %int_1 %int_1 -%int_2 = OpConstant %int 2 -%45 = OpConstantComposite %v3int %int_2 %int_2 %int_2 -%46 = OpConstantComposite %v3int %int_3 %int_3 %int_3 + %int_1 = OpConstant %int 1 + %43 = OpConstantComposite %v3int %int_1 %int_1 %int_1 + %int_2 = OpConstant %int 2 + %45 = OpConstantComposite %v3int %int_2 %int_2 %int_2 + %46 = OpConstantComposite %v3int %int_3 %int_3 %int_3 %mat2v2float = OpTypeMatrix %v2float 2 %_arr_mat2v2float_int_2 = OpTypeArray %mat2v2float %int_2 %_ptr_Function__arr_mat2v2float_int_2 = OpTypePointer Function %_arr_mat2v2float_int_2 -%53 = OpConstantComposite %v2float %float_1 %float_2 -%54 = OpConstantComposite %v2float %float_3 %float_4 -%55 = OpConstantComposite %mat2v2float %53 %54 -%float_5 = OpConstant %float 5 -%float_6 = OpConstant %float 6 -%float_7 = OpConstant %float 7 -%float_8 = OpConstant %float 8 -%60 = OpConstantComposite %v2float %float_5 %float_6 -%61 = OpConstantComposite %v2float %float_7 %float_8 -%62 = OpConstantComposite %mat2v2float %60 %61 -%false = OpConstantFalse %bool -%true = OpConstantTrue %bool -%v2bool = OpTypeVector %bool 2 + %53 = OpConstantComposite %v2float %float_1 %float_2 + %54 = OpConstantComposite %v2float %float_3 %float_4 + %55 = OpConstantComposite %mat2v2float %53 %54 + %float_5 = OpConstant %float 5 + %float_6 = OpConstant %float 6 + %float_7 = OpConstant %float 7 + %float_8 = OpConstant %float 8 + %60 = OpConstantComposite %v2float %float_5 %float_6 + %61 = OpConstantComposite %v2float %float_7 %float_8 + %62 = OpConstantComposite %mat2v2float %60 %61 + %false = OpConstantFalse %bool + %true = OpConstantTrue %bool + %v2bool = OpTypeVector %bool 2 %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_0 = OpConstant %int 0 + %int_0 = OpConstant %int 0 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%f = OpVariable %_ptr_Function__arr_float_int_4 Function -%h = OpVariable %_ptr_Function__arr_float_int_4 Function -%i3 = OpVariable %_ptr_Function__arr_v3int_int_3 Function -%s3 = OpVariable %_ptr_Function__arr_v3int_int_3 Function -%h2x2 = OpVariable %_ptr_Function__arr_mat2v2float_int_2 Function -%f2x2 = OpVariable %_ptr_Function__arr_mat2v2float_int_2 Function -%90 = OpVariable %_ptr_Function_v4float Function -%35 = OpCompositeConstruct %_arr_float_int_4 %float_1 %float_2 %float_3 %float_4 -OpStore %f %35 -OpStore %h %35 -OpStore %f %35 -OpStore %h %35 -%47 = OpCompositeConstruct %_arr_v3int_int_3 %43 %45 %46 -OpStore %i3 %47 -OpStore %s3 %47 -OpStore %i3 %47 -OpStore %s3 %47 -%63 = OpCompositeConstruct %_arr_mat2v2float_int_2 %55 %62 -OpStore %h2x2 %63 -OpStore %f2x2 %63 -OpStore %f2x2 %63 -OpStore %h2x2 %63 -%67 = OpLogicalAnd %bool %true %true -%68 = OpLogicalAnd %bool %true %67 -%69 = OpLogicalAnd %bool %true %68 -OpSelectionMerge %71 None -OpBranchConditional %69 %70 %71 -%70 = OpLabel -%72 = OpLogicalAnd %bool %true %true -%73 = OpLogicalAnd %bool %true %72 -OpBranch %71 -%71 = OpLabel -%74 = OpPhi %bool %false %25 %73 %70 -OpSelectionMerge %76 None -OpBranchConditional %74 %75 %76 -%75 = OpLabel -%78 = OpFOrdEqual %v2bool %53 %53 -%79 = OpAll %bool %78 -%80 = OpFOrdEqual %v2bool %54 %54 -%81 = OpAll %bool %80 -%82 = OpLogicalAnd %bool %79 %81 -%83 = OpFOrdEqual %v2bool %60 %60 -%84 = OpAll %bool %83 -%85 = OpFOrdEqual %v2bool %61 %61 -%86 = OpAll %bool %85 -%87 = OpLogicalAnd %bool %84 %86 -%88 = OpLogicalAnd %bool %87 %82 -OpBranch %76 -%76 = OpLabel -%89 = OpPhi %bool %false %71 %88 %75 -OpSelectionMerge %94 None -OpBranchConditional %89 %92 %93 -%92 = OpLabel -%95 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%98 = OpLoad %v4float %95 -OpStore %90 %98 -OpBranch %94 -%93 = OpLabel -%99 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%100 = OpLoad %v4float %99 -OpStore %90 %100 -OpBranch %94 -%94 = OpLabel -%101 = OpLoad %v4float %90 -OpReturnValue %101 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %f = OpVariable %_ptr_Function__arr_float_int_4 Function + %h = OpVariable %_ptr_Function__arr_float_int_4 Function + %i3 = OpVariable %_ptr_Function__arr_v3int_int_3 Function + %s3 = OpVariable %_ptr_Function__arr_v3int_int_3 Function + %h2x2 = OpVariable %_ptr_Function__arr_mat2v2float_int_2 Function + %f2x2 = OpVariable %_ptr_Function__arr_mat2v2float_int_2 Function + %90 = OpVariable %_ptr_Function_v4float Function + %35 = OpCompositeConstruct %_arr_float_int_4 %float_1 %float_2 %float_3 %float_4 + OpStore %f %35 + OpStore %h %35 + OpStore %f %35 + OpStore %h %35 + %47 = OpCompositeConstruct %_arr_v3int_int_3 %43 %45 %46 + OpStore %i3 %47 + OpStore %s3 %47 + OpStore %i3 %47 + OpStore %s3 %47 + %63 = OpCompositeConstruct %_arr_mat2v2float_int_2 %55 %62 + OpStore %h2x2 %63 + OpStore %f2x2 %63 + OpStore %f2x2 %63 + OpStore %h2x2 %63 + %67 = OpLogicalAnd %bool %true %true + %68 = OpLogicalAnd %bool %true %67 + %69 = OpLogicalAnd %bool %true %68 + OpSelectionMerge %71 None + OpBranchConditional %69 %70 %71 + %70 = OpLabel + %72 = OpLogicalAnd %bool %true %true + %73 = OpLogicalAnd %bool %true %72 + OpBranch %71 + %71 = OpLabel + %74 = OpPhi %bool %false %25 %73 %70 + OpSelectionMerge %76 None + OpBranchConditional %74 %75 %76 + %75 = OpLabel + %78 = OpFOrdEqual %v2bool %53 %53 + %79 = OpAll %bool %78 + %80 = OpFOrdEqual %v2bool %54 %54 + %81 = OpAll %bool %80 + %82 = OpLogicalAnd %bool %79 %81 + %83 = OpFOrdEqual %v2bool %60 %60 + %84 = OpAll %bool %83 + %85 = OpFOrdEqual %v2bool %61 %61 + %86 = OpAll %bool %85 + %87 = OpLogicalAnd %bool %84 %86 + %88 = OpLogicalAnd %bool %87 %82 + OpBranch %76 + %76 = OpLabel + %89 = OpPhi %bool %false %71 %88 %75 + OpSelectionMerge %94 None + OpBranchConditional %89 %92 %93 + %92 = OpLabel + %95 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %98 = OpLoad %v4float %95 + OpStore %90 %98 + OpBranch %94 + %93 = OpLabel + %99 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %100 = OpLoad %v4float %99 + OpStore %90 %100 + OpBranch %94 + %94 = OpLabel + %101 = OpLoad %v4float %90 + OpReturnValue %101 + OpFunctionEnd diff --git a/tests/sksl/shared/ArrayCast.skrp b/tests/sksl/shared/ArrayCast.skrp index 426c5b249fa3..1d7ea3ae5d94 100644 --- a/tests/sksl/shared/ArrayCast.skrp +++ b/tests/sksl/shared/ArrayCast.skrp @@ -1,15 +1,37 @@ +72 instructions + +[immutable slots] +i0 = 0x3F800000 (1.0) +i1 = 0x40000000 (2.0) +i2 = 0x40400000 (3.0) +i3 = 0x40800000 (4.0) +i4 = 0x00000001 (1.401298e-45) +i5 = 0x00000001 (1.401298e-45) +i6 = 0x00000001 (1.401298e-45) +i7 = 0x00000002 (2.802597e-45) +i8 = 0x00000002 (2.802597e-45) +i9 = 0x00000002 (2.802597e-45) +i10 = 0x00000003 (4.203895e-45) +i11 = 0x00000003 (4.203895e-45) +i12 = 0x00000003 (4.203895e-45) +i13 = 0x3F800000 (1.0) +i14 = 0x40000000 (2.0) +i15 = 0x40400000 (3.0) +i16 = 0x40800000 (4.0) +i17 = 0x40A00000 (5.0) +i18 = 0x40C00000 (6.0) +i19 = 0x40E00000 (7.0) +i20 = 0x41000000 (8.0) + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true -copy_constant f[0] = 0x3F800000 (1.0) -copy_constant f[1] = 0x40000000 (2.0) -copy_constant f[2] = 0x40400000 (3.0) -copy_constant f[3] = 0x40800000 (4.0) +copy_4_immutables_unmasked f[0], f[1], f[2], f[3] = i0..3 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] copy_4_slots_unmasked h[0], h[1], h[2], h[3] = f[0], f[1], f[2], f[3] copy_4_slots_unmasked f[0], f[1], f[2], f[3] = h[0], h[1], h[2], h[3] copy_4_slots_unmasked h[0], h[1], h[2], h[3] = f[0], f[1], f[2], f[3] -splat_3_constants i3[0] = 0x00000001 (1.401298e-45) -splat_3_constants i3[1] = 0x00000002 (2.802597e-45) -splat_3_constants i3[2] = 0x00000003 (4.203895e-45) +copy_4_immutables_unmasked i3[0], i3[1](0) = i4..7 [0x00000001 (1.401298e-45), 0x00000001 (1.401298e-45), 0x00000001 (1.401298e-45), 0x00000002 (2.802597e-45)] +copy_4_immutables_unmasked i3[1](1..2), i3[2](0..1) = i8..11 [0x00000002 (2.802597e-45), 0x00000002 (2.802597e-45), 0x00000003 (4.203895e-45), 0x00000003 (4.203895e-45)] +copy_immutable_unmasked i3[2](2) = i12 [0x00000003 (4.203895e-45)] copy_4_slots_unmasked s3[0], s3[1](0) = i3[0], i3[1](0) copy_4_slots_unmasked s3[1](1..2), s3[2](0..1) = i3[1](1..2), i3[2](0..1) copy_slot_unmasked s3[2](2) = i3[2](2) @@ -19,14 +41,8 @@ copy_slot_unmasked i3[2](2) = s3[2](2) copy_4_slots_unmasked s3[0], s3[1](0) = i3[0], i3[1](0) copy_4_slots_unmasked s3[1](1..2), s3[2](0..1) = i3[1](1..2), i3[2](0..1) copy_slot_unmasked s3[2](2) = i3[2](2) -copy_constant h2x2[0](0) = 0x3F800000 (1.0) -copy_constant h2x2[0](1) = 0x40000000 (2.0) -copy_constant h2x2[0](2) = 0x40400000 (3.0) -copy_constant h2x2[0](3) = 0x40800000 (4.0) -copy_constant h2x2[1](0) = 0x40A00000 (5.0) -copy_constant h2x2[1](1) = 0x40C00000 (6.0) -copy_constant h2x2[1](2) = 0x40E00000 (7.0) -copy_constant h2x2[1](3) = 0x41000000 (8.0) +copy_4_immutables_unmasked h2x2[0] = i13..16 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked h2x2[1] = i17..20 [0x40A00000 (5.0), 0x40C00000 (6.0), 0x40E00000 (7.0), 0x41000000 (8.0)] copy_4_slots_unmasked f2x2[0] = h2x2[0] copy_4_slots_unmasked f2x2[1] = h2x2[1] copy_4_slots_unmasked f2x2[0] = h2x2[0] diff --git a/tests/sksl/shared/ArrayCast.wgsl b/tests/sksl/shared/ArrayCast.wgsl new file mode 100644 index 000000000000..30bc278edcef --- /dev/null +++ b/tests/sksl/shared/ArrayCast.wgsl @@ -0,0 +1,39 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var f: array = array(1.0, 2.0, 3.0, 4.0); + var h: array = f; + f = h; + h = f; + var i3: array, 3> = array, 3>(vec3(1), vec3(2), vec3(3)); + var s3: array, 3> = i3; + i3 = s3; + s3 = i3; + var h2x2: array, 2> = array, 2>(mat2x2(1.0, 2.0, 3.0, 4.0), mat2x2(5.0, 6.0, 7.0, 8.0)); + var f2x2: array, 2> = h2x2; + f2x2 = h2x2; + h2x2 = f2x2; + let _skTemp0 = h; + let _skTemp1 = s3; + let _skTemp2 = h2x2; + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((f[0] == _skTemp0[0]) && (f[1] == _skTemp0[1]) && (f[2] == _skTemp0[2]) && (f[3] == _skTemp0[3])) && (all(i3[0] == _skTemp1[0]) && all(i3[1] == _skTemp1[1]) && all(i3[2] == _skTemp1[2]))) && ((all(f2x2[0][0] == _skTemp2[0][0]) && all(f2x2[0][1] == _skTemp2[0][1])) && (all(f2x2[1][0] == _skTemp2[1][0]) && all(f2x2[1][1] == _skTemp2[1][1]))))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/ArrayComparison.asm.frag b/tests/sksl/shared/ArrayComparison.asm.frag index 37a247fa53ae..abae6d897da7 100644 --- a/tests/sksl/shared/ArrayComparison.asm.frag +++ b/tests/sksl/shared/ArrayComparison.asm.frag @@ -1,414 +1,414 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpMemberName %_UniformBuffer 2 "testArray" -OpMemberName %_UniformBuffer 3 "testArrayNegative" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %f1 "f1" -OpName %f2 "f2" -OpName %f3 "f3" -OpName %v1 "v1" -OpName %v2 "v2" -OpName %v3 "v3" -OpName %m1 "m1" -OpName %m2 "m2" -OpName %m3 "m3" -OpName %S "S" -OpMemberName %S 0 "x" -OpMemberName %S 1 "y" -OpName %s1 "s1" -OpName %s2 "s2" -OpName %s3 "s3" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %_arr_float_int_5 ArrayStride 16 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 3 Offset 112 -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %_arr_v3int_int_2 ArrayStride 16 -OpDecorate %_arr_mat2v2float_int_3 ArrayStride 32 -OpMemberDecorate %S 0 Offset 0 -OpMemberDecorate %S 1 Offset 4 -OpDecorate %_arr_S_int_3 ArrayStride 16 -OpDecorate %226 RelaxedPrecision -OpDecorate %228 RelaxedPrecision -OpDecorate %231 RelaxedPrecision -OpDecorate %233 RelaxedPrecision -OpDecorate %237 RelaxedPrecision -OpDecorate %239 RelaxedPrecision -OpDecorate %246 RelaxedPrecision -OpDecorate %248 RelaxedPrecision -OpDecorate %251 RelaxedPrecision -OpDecorate %253 RelaxedPrecision -OpDecorate %257 RelaxedPrecision -OpDecorate %259 RelaxedPrecision -OpDecorate %289 RelaxedPrecision -OpDecorate %291 RelaxedPrecision -OpDecorate %292 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpMemberName %_UniformBuffer 2 "testArray" + OpMemberName %_UniformBuffer 3 "testArrayNegative" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %f1 "f1" + OpName %f2 "f2" + OpName %f3 "f3" + OpName %v1 "v1" + OpName %v2 "v2" + OpName %v3 "v3" + OpName %m1 "m1" + OpName %m2 "m2" + OpName %m3 "m3" + OpName %S "S" + OpMemberName %S 0 "x" + OpMemberName %S 1 "y" + OpName %s1 "s1" + OpName %s2 "s2" + OpName %s3 "s3" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %_arr_float_int_5 ArrayStride 16 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 3 Offset 112 + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %_arr_v3int_int_2 ArrayStride 16 + OpDecorate %_arr_mat2v2float_int_3 ArrayStride 32 + OpMemberDecorate %S 0 Offset 0 + OpMemberDecorate %S 1 Offset 4 + OpDecorate %_arr_S_int_3 ArrayStride 16 + OpDecorate %226 RelaxedPrecision + OpDecorate %228 RelaxedPrecision + OpDecorate %231 RelaxedPrecision + OpDecorate %233 RelaxedPrecision + OpDecorate %237 RelaxedPrecision + OpDecorate %239 RelaxedPrecision + OpDecorate %246 RelaxedPrecision + OpDecorate %248 RelaxedPrecision + OpDecorate %251 RelaxedPrecision + OpDecorate %253 RelaxedPrecision + OpDecorate %257 RelaxedPrecision + OpDecorate %259 RelaxedPrecision + OpDecorate %289 RelaxedPrecision + OpDecorate %291 RelaxedPrecision + OpDecorate %292 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%int = OpTypeInt 32 1 -%int_5 = OpConstant %int 5 + %int = OpTypeInt 32 1 + %int_5 = OpConstant %int 5 %_arr_float_int_5 = OpTypeArray %float %int_5 %_UniformBuffer = OpTypeStruct %v4float %v4float %_arr_float_int_5 %_arr_float_int_5 %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%18 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%22 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %18 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %22 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%26 = OpTypeFunction %v4float %_ptr_Function_v2float + %26 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function__arr_float_int_5 = OpTypePointer Function %_arr_float_int_5 -%float_1 = OpConstant %float 1 -%float_2 = OpConstant %float 2 -%float_3 = OpConstant %float 3 -%float_4 = OpConstant %float 4 -%float_5 = OpConstant %float 5 -%float_n4 = OpConstant %float -4 -%v3int = OpTypeVector %int 3 -%int_2 = OpConstant %int 2 + %float_1 = OpConstant %float 1 + %float_2 = OpConstant %float 2 + %float_3 = OpConstant %float 3 + %float_4 = OpConstant %float 4 + %float_5 = OpConstant %float 5 + %float_n4 = OpConstant %float -4 + %v3int = OpTypeVector %int 3 + %int_2 = OpConstant %int 2 %_arr_v3int_int_2 = OpTypeArray %v3int %int_2 %_ptr_Function__arr_v3int_int_2 = OpTypePointer Function %_arr_v3int_int_2 -%int_1 = OpConstant %int 1 -%int_3 = OpConstant %int 3 -%48 = OpConstantComposite %v3int %int_1 %int_2 %int_3 -%int_4 = OpConstant %int 4 -%int_6 = OpConstant %int 6 -%51 = OpConstantComposite %v3int %int_4 %int_5 %int_6 -%int_n6 = OpConstant %int -6 -%56 = OpConstantComposite %v3int %int_4 %int_5 %int_n6 + %int_1 = OpConstant %int 1 + %int_3 = OpConstant %int 3 + %48 = OpConstantComposite %v3int %int_1 %int_2 %int_3 + %int_4 = OpConstant %int 4 + %int_6 = OpConstant %int 6 + %51 = OpConstantComposite %v3int %int_4 %int_5 %int_6 + %int_n6 = OpConstant %int -6 + %56 = OpConstantComposite %v3int %int_4 %int_5 %int_n6 %mat2v2float = OpTypeMatrix %v2float 2 %_arr_mat2v2float_int_3 = OpTypeArray %mat2v2float %int_3 %_ptr_Function__arr_mat2v2float_int_3 = OpTypePointer Function %_arr_mat2v2float_int_3 -%62 = OpConstantComposite %v2float %float_1 %float_0 -%63 = OpConstantComposite %v2float %float_0 %float_1 -%64 = OpConstantComposite %mat2v2float %62 %63 -%65 = OpConstantComposite %v2float %float_2 %float_0 -%66 = OpConstantComposite %v2float %float_0 %float_2 -%67 = OpConstantComposite %mat2v2float %65 %66 -%float_6 = OpConstant %float 6 -%69 = OpConstantComposite %v2float %float_3 %float_4 -%70 = OpConstantComposite %v2float %float_5 %float_6 -%71 = OpConstantComposite %mat2v2float %69 %70 -%75 = OpConstantComposite %v2float %float_2 %float_3 -%76 = OpConstantComposite %v2float %float_4 %float_5 -%77 = OpConstantComposite %mat2v2float %75 %76 -%78 = OpConstantComposite %v2float %float_6 %float_0 -%79 = OpConstantComposite %v2float %float_0 %float_6 -%80 = OpConstantComposite %mat2v2float %78 %79 -%S = OpTypeStruct %int %int + %62 = OpConstantComposite %v2float %float_1 %float_0 + %63 = OpConstantComposite %v2float %float_0 %float_1 + %64 = OpConstantComposite %mat2v2float %62 %63 + %65 = OpConstantComposite %v2float %float_2 %float_0 + %66 = OpConstantComposite %v2float %float_0 %float_2 + %67 = OpConstantComposite %mat2v2float %65 %66 + %float_6 = OpConstant %float 6 + %69 = OpConstantComposite %v2float %float_3 %float_4 + %70 = OpConstantComposite %v2float %float_5 %float_6 + %71 = OpConstantComposite %mat2v2float %69 %70 + %75 = OpConstantComposite %v2float %float_2 %float_3 + %76 = OpConstantComposite %v2float %float_4 %float_5 + %77 = OpConstantComposite %mat2v2float %75 %76 + %78 = OpConstantComposite %v2float %float_6 %float_0 + %79 = OpConstantComposite %v2float %float_0 %float_6 + %80 = OpConstantComposite %mat2v2float %78 %79 + %S = OpTypeStruct %int %int %_arr_S_int_3 = OpTypeArray %S %int_3 %_ptr_Function__arr_S_int_3 = OpTypePointer Function %_arr_S_int_3 -%int_0 = OpConstant %int 0 -%false = OpConstantFalse %bool -%true = OpConstantTrue %bool + %int_0 = OpConstant %int 0 + %false = OpConstantFalse %bool + %true = OpConstantTrue %bool %_ptr_Uniform__arr_float_int_5 = OpTypePointer Uniform %_arr_float_int_5 -%v3bool = OpTypeVector %bool 3 -%v2bool = OpTypeVector %bool 2 + %v3bool = OpTypeVector %bool 3 + %v2bool = OpTypeVector %bool 2 %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float %_entrypoint_v = OpFunction %void None %18 -%19 = OpLabel -%23 = OpVariable %_ptr_Function_v2float Function -OpStore %23 %22 -%25 = OpFunctionCall %v4float %main %23 -OpStore %sk_FragColor %25 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %26 -%27 = OpFunctionParameter %_ptr_Function_v2float -%28 = OpLabel -%f1 = OpVariable %_ptr_Function__arr_float_int_5 Function -%f2 = OpVariable %_ptr_Function__arr_float_int_5 Function -%f3 = OpVariable %_ptr_Function__arr_float_int_5 Function -%v1 = OpVariable %_ptr_Function__arr_v3int_int_2 Function -%v2 = OpVariable %_ptr_Function__arr_v3int_int_2 Function -%v3 = OpVariable %_ptr_Function__arr_v3int_int_2 Function -%m1 = OpVariable %_ptr_Function__arr_mat2v2float_int_3 Function -%m2 = OpVariable %_ptr_Function__arr_mat2v2float_int_3 Function -%m3 = OpVariable %_ptr_Function__arr_mat2v2float_int_3 Function -%s1 = OpVariable %_ptr_Function__arr_S_int_3 Function -%s2 = OpVariable %_ptr_Function__arr_S_int_3 Function -%s3 = OpVariable %_ptr_Function__arr_S_int_3 Function -%282 = OpVariable %_ptr_Function_v4float Function -%36 = OpCompositeConstruct %_arr_float_int_5 %float_1 %float_2 %float_3 %float_4 %float_5 -OpStore %f1 %36 -OpStore %f2 %36 -%40 = OpCompositeConstruct %_arr_float_int_5 %float_1 %float_2 %float_3 %float_n4 %float_5 -OpStore %f3 %40 -%52 = OpCompositeConstruct %_arr_v3int_int_2 %48 %51 -OpStore %v1 %52 -OpStore %v2 %52 -%57 = OpCompositeConstruct %_arr_v3int_int_2 %48 %56 -OpStore %v3 %57 -%72 = OpCompositeConstruct %_arr_mat2v2float_int_3 %64 %67 %71 -OpStore %m1 %72 -OpStore %m2 %72 -%81 = OpCompositeConstruct %_arr_mat2v2float_int_3 %64 %77 %80 -OpStore %m3 %81 -%86 = OpCompositeConstruct %S %int_1 %int_2 -%87 = OpCompositeConstruct %S %int_3 %int_4 -%88 = OpCompositeConstruct %S %int_5 %int_6 -%89 = OpCompositeConstruct %_arr_S_int_3 %86 %87 %88 -OpStore %s1 %89 -%92 = OpCompositeConstruct %S %int_0 %int_0 -%93 = OpCompositeConstruct %_arr_S_int_3 %86 %92 %88 -OpStore %s2 %93 -OpStore %s3 %89 -%97 = OpLogicalAnd %bool %true %true -%98 = OpLogicalAnd %bool %true %97 -%99 = OpLogicalAnd %bool %true %98 -%100 = OpLogicalAnd %bool %true %99 -OpSelectionMerge %102 None -OpBranchConditional %100 %101 %102 -%101 = OpLabel -%103 = OpLogicalOr %bool %false %false -%104 = OpLogicalOr %bool %false %103 -%105 = OpFUnordNotEqual %bool %float_4 %float_n4 -%106 = OpLogicalOr %bool %105 %104 -%107 = OpLogicalOr %bool %false %106 -OpBranch %102 -%102 = OpLabel -%108 = OpPhi %bool %false %28 %107 %101 -OpSelectionMerge %110 None -OpBranchConditional %108 %109 %110 -%109 = OpLabel -%111 = OpAccessChain %_ptr_Uniform__arr_float_int_5 %10 %int_2 -%113 = OpLoad %_arr_float_int_5 %111 -%114 = OpAccessChain %_ptr_Uniform__arr_float_int_5 %10 %int_3 -%115 = OpLoad %_arr_float_int_5 %114 -%116 = OpCompositeExtract %float %113 0 -%117 = OpCompositeExtract %float %115 0 -%118 = OpFUnordNotEqual %bool %116 %117 -%119 = OpCompositeExtract %float %113 1 -%120 = OpCompositeExtract %float %115 1 -%121 = OpFUnordNotEqual %bool %119 %120 -%122 = OpLogicalOr %bool %121 %118 -%123 = OpCompositeExtract %float %113 2 -%124 = OpCompositeExtract %float %115 2 -%125 = OpFUnordNotEqual %bool %123 %124 -%126 = OpLogicalOr %bool %125 %122 -%127 = OpCompositeExtract %float %113 3 -%128 = OpCompositeExtract %float %115 3 -%129 = OpFUnordNotEqual %bool %127 %128 -%130 = OpLogicalOr %bool %129 %126 -%131 = OpCompositeExtract %float %113 4 -%132 = OpCompositeExtract %float %115 4 -%133 = OpFUnordNotEqual %bool %131 %132 -%134 = OpLogicalOr %bool %133 %130 -OpBranch %110 -%110 = OpLabel -%135 = OpPhi %bool %false %102 %134 %109 -OpSelectionMerge %137 None -OpBranchConditional %135 %136 %137 -%136 = OpLabel -%138 = OpAccessChain %_ptr_Uniform__arr_float_int_5 %10 %int_2 -%139 = OpLoad %_arr_float_int_5 %138 -%140 = OpCompositeExtract %float %139 0 -%141 = OpFOrdEqual %bool %140 %float_1 -%142 = OpCompositeExtract %float %139 1 -%143 = OpFOrdEqual %bool %142 %float_2 -%144 = OpLogicalAnd %bool %143 %141 -%145 = OpCompositeExtract %float %139 2 -%146 = OpFOrdEqual %bool %145 %float_3 -%147 = OpLogicalAnd %bool %146 %144 -%148 = OpCompositeExtract %float %139 3 -%149 = OpFOrdEqual %bool %148 %float_4 -%150 = OpLogicalAnd %bool %149 %147 -%151 = OpCompositeExtract %float %139 4 -%152 = OpFOrdEqual %bool %151 %float_5 -%153 = OpLogicalAnd %bool %152 %150 -OpBranch %137 -%137 = OpLabel -%154 = OpPhi %bool %false %110 %153 %136 -OpSelectionMerge %156 None -OpBranchConditional %154 %155 %156 -%155 = OpLabel -%157 = OpAccessChain %_ptr_Uniform__arr_float_int_5 %10 %int_2 -%158 = OpLoad %_arr_float_int_5 %157 -%159 = OpCompositeExtract %float %158 0 -%160 = OpFUnordNotEqual %bool %159 %float_1 -%161 = OpCompositeExtract %float %158 1 -%162 = OpFUnordNotEqual %bool %161 %float_2 -%163 = OpLogicalOr %bool %162 %160 -%164 = OpCompositeExtract %float %158 2 -%165 = OpFUnordNotEqual %bool %164 %float_3 -%166 = OpLogicalOr %bool %165 %163 -%167 = OpCompositeExtract %float %158 3 -%168 = OpFUnordNotEqual %bool %167 %float_n4 -%169 = OpLogicalOr %bool %168 %166 -%170 = OpCompositeExtract %float %158 4 -%171 = OpFUnordNotEqual %bool %170 %float_5 -%172 = OpLogicalOr %bool %171 %169 -OpBranch %156 -%156 = OpLabel -%173 = OpPhi %bool %false %137 %172 %155 -OpSelectionMerge %175 None -OpBranchConditional %173 %174 %175 -%174 = OpLabel -%176 = OpAccessChain %_ptr_Uniform__arr_float_int_5 %10 %int_2 -%177 = OpLoad %_arr_float_int_5 %176 -%178 = OpCompositeExtract %float %177 0 -%179 = OpFOrdEqual %bool %float_1 %178 -%180 = OpCompositeExtract %float %177 1 -%181 = OpFOrdEqual %bool %float_2 %180 -%182 = OpLogicalAnd %bool %181 %179 -%183 = OpCompositeExtract %float %177 2 -%184 = OpFOrdEqual %bool %float_3 %183 -%185 = OpLogicalAnd %bool %184 %182 -%186 = OpCompositeExtract %float %177 3 -%187 = OpFOrdEqual %bool %float_4 %186 -%188 = OpLogicalAnd %bool %187 %185 -%189 = OpCompositeExtract %float %177 4 -%190 = OpFOrdEqual %bool %float_5 %189 -%191 = OpLogicalAnd %bool %190 %188 -OpBranch %175 -%175 = OpLabel -%192 = OpPhi %bool %false %156 %191 %174 -OpSelectionMerge %194 None -OpBranchConditional %192 %193 %194 -%193 = OpLabel -%195 = OpAccessChain %_ptr_Uniform__arr_float_int_5 %10 %int_2 -%196 = OpLoad %_arr_float_int_5 %195 -%197 = OpCompositeExtract %float %196 0 -%198 = OpFUnordNotEqual %bool %float_1 %197 -%199 = OpCompositeExtract %float %196 1 -%200 = OpFUnordNotEqual %bool %float_2 %199 -%201 = OpLogicalOr %bool %200 %198 -%202 = OpCompositeExtract %float %196 2 -%203 = OpFUnordNotEqual %bool %float_3 %202 -%204 = OpLogicalOr %bool %203 %201 -%205 = OpCompositeExtract %float %196 3 -%206 = OpFUnordNotEqual %bool %float_n4 %205 -%207 = OpLogicalOr %bool %206 %204 -%208 = OpCompositeExtract %float %196 4 -%209 = OpFUnordNotEqual %bool %float_5 %208 -%210 = OpLogicalOr %bool %209 %207 -OpBranch %194 -%194 = OpLabel -%211 = OpPhi %bool %false %175 %210 %193 -OpSelectionMerge %213 None -OpBranchConditional %211 %212 %213 -%212 = OpLabel -%214 = OpLogicalAnd %bool %true %true -OpBranch %213 -%213 = OpLabel -%215 = OpPhi %bool %false %194 %214 %212 -OpSelectionMerge %217 None -OpBranchConditional %215 %216 %217 -%216 = OpLabel -%218 = OpINotEqual %v3bool %51 %56 -%220 = OpAny %bool %218 -%221 = OpLogicalOr %bool %220 %false -OpBranch %217 -%217 = OpLabel -%222 = OpPhi %bool %false %213 %221 %216 -OpSelectionMerge %224 None -OpBranchConditional %222 %223 %224 -%223 = OpLabel -%226 = OpFOrdEqual %v2bool %62 %62 -%227 = OpAll %bool %226 -%228 = OpFOrdEqual %v2bool %63 %63 -%229 = OpAll %bool %228 -%230 = OpLogicalAnd %bool %227 %229 -%231 = OpFOrdEqual %v2bool %65 %65 -%232 = OpAll %bool %231 -%233 = OpFOrdEqual %v2bool %66 %66 -%234 = OpAll %bool %233 -%235 = OpLogicalAnd %bool %232 %234 -%236 = OpLogicalAnd %bool %235 %230 -%237 = OpFOrdEqual %v2bool %69 %69 -%238 = OpAll %bool %237 -%239 = OpFOrdEqual %v2bool %70 %70 -%240 = OpAll %bool %239 -%241 = OpLogicalAnd %bool %238 %240 -%242 = OpLogicalAnd %bool %241 %236 -OpBranch %224 -%224 = OpLabel -%243 = OpPhi %bool %false %217 %242 %223 -OpSelectionMerge %245 None -OpBranchConditional %243 %244 %245 -%244 = OpLabel -%246 = OpFUnordNotEqual %v2bool %62 %62 -%247 = OpAny %bool %246 -%248 = OpFUnordNotEqual %v2bool %63 %63 -%249 = OpAny %bool %248 -%250 = OpLogicalOr %bool %247 %249 -%251 = OpFUnordNotEqual %v2bool %65 %75 -%252 = OpAny %bool %251 -%253 = OpFUnordNotEqual %v2bool %66 %76 -%254 = OpAny %bool %253 -%255 = OpLogicalOr %bool %252 %254 -%256 = OpLogicalOr %bool %255 %250 -%257 = OpFUnordNotEqual %v2bool %69 %78 -%258 = OpAny %bool %257 -%259 = OpFUnordNotEqual %v2bool %70 %79 -%260 = OpAny %bool %259 -%261 = OpLogicalOr %bool %258 %260 -%262 = OpLogicalOr %bool %261 %256 -OpBranch %245 -%245 = OpLabel -%263 = OpPhi %bool %false %224 %262 %244 -OpSelectionMerge %265 None -OpBranchConditional %263 %264 %265 -%264 = OpLabel -%266 = OpLogicalOr %bool %false %false -%267 = OpINotEqual %bool %int_3 %int_0 -%268 = OpINotEqual %bool %int_4 %int_0 -%269 = OpLogicalOr %bool %268 %267 -%270 = OpLogicalOr %bool %269 %266 -%271 = OpLogicalOr %bool %false %false -%272 = OpLogicalOr %bool %271 %270 -OpBranch %265 -%265 = OpLabel -%273 = OpPhi %bool %false %245 %272 %264 -OpSelectionMerge %275 None -OpBranchConditional %273 %274 %275 -%274 = OpLabel -%276 = OpLogicalAnd %bool %true %true -%277 = OpLogicalAnd %bool %true %true -%278 = OpLogicalAnd %bool %277 %276 -%279 = OpLogicalAnd %bool %true %true -%280 = OpLogicalAnd %bool %279 %278 -OpBranch %275 -%275 = OpLabel -%281 = OpPhi %bool %false %265 %280 %274 -OpSelectionMerge %286 None -OpBranchConditional %281 %284 %285 -%284 = OpLabel -%287 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%289 = OpLoad %v4float %287 -OpStore %282 %289 -OpBranch %286 -%285 = OpLabel -%290 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%291 = OpLoad %v4float %290 -OpStore %282 %291 -OpBranch %286 -%286 = OpLabel -%292 = OpLoad %v4float %282 -OpReturnValue %292 -OpFunctionEnd + %19 = OpLabel + %23 = OpVariable %_ptr_Function_v2float Function + OpStore %23 %22 + %25 = OpFunctionCall %v4float %main %23 + OpStore %sk_FragColor %25 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %26 + %27 = OpFunctionParameter %_ptr_Function_v2float + %28 = OpLabel + %f1 = OpVariable %_ptr_Function__arr_float_int_5 Function + %f2 = OpVariable %_ptr_Function__arr_float_int_5 Function + %f3 = OpVariable %_ptr_Function__arr_float_int_5 Function + %v1 = OpVariable %_ptr_Function__arr_v3int_int_2 Function + %v2 = OpVariable %_ptr_Function__arr_v3int_int_2 Function + %v3 = OpVariable %_ptr_Function__arr_v3int_int_2 Function + %m1 = OpVariable %_ptr_Function__arr_mat2v2float_int_3 Function + %m2 = OpVariable %_ptr_Function__arr_mat2v2float_int_3 Function + %m3 = OpVariable %_ptr_Function__arr_mat2v2float_int_3 Function + %s1 = OpVariable %_ptr_Function__arr_S_int_3 Function + %s2 = OpVariable %_ptr_Function__arr_S_int_3 Function + %s3 = OpVariable %_ptr_Function__arr_S_int_3 Function + %282 = OpVariable %_ptr_Function_v4float Function + %36 = OpCompositeConstruct %_arr_float_int_5 %float_1 %float_2 %float_3 %float_4 %float_5 + OpStore %f1 %36 + OpStore %f2 %36 + %40 = OpCompositeConstruct %_arr_float_int_5 %float_1 %float_2 %float_3 %float_n4 %float_5 + OpStore %f3 %40 + %52 = OpCompositeConstruct %_arr_v3int_int_2 %48 %51 + OpStore %v1 %52 + OpStore %v2 %52 + %57 = OpCompositeConstruct %_arr_v3int_int_2 %48 %56 + OpStore %v3 %57 + %72 = OpCompositeConstruct %_arr_mat2v2float_int_3 %64 %67 %71 + OpStore %m1 %72 + OpStore %m2 %72 + %81 = OpCompositeConstruct %_arr_mat2v2float_int_3 %64 %77 %80 + OpStore %m3 %81 + %86 = OpCompositeConstruct %S %int_1 %int_2 + %87 = OpCompositeConstruct %S %int_3 %int_4 + %88 = OpCompositeConstruct %S %int_5 %int_6 + %89 = OpCompositeConstruct %_arr_S_int_3 %86 %87 %88 + OpStore %s1 %89 + %92 = OpCompositeConstruct %S %int_0 %int_0 + %93 = OpCompositeConstruct %_arr_S_int_3 %86 %92 %88 + OpStore %s2 %93 + OpStore %s3 %89 + %97 = OpLogicalAnd %bool %true %true + %98 = OpLogicalAnd %bool %true %97 + %99 = OpLogicalAnd %bool %true %98 + %100 = OpLogicalAnd %bool %true %99 + OpSelectionMerge %102 None + OpBranchConditional %100 %101 %102 + %101 = OpLabel + %103 = OpLogicalOr %bool %false %false + %104 = OpLogicalOr %bool %false %103 + %105 = OpFUnordNotEqual %bool %float_4 %float_n4 + %106 = OpLogicalOr %bool %105 %104 + %107 = OpLogicalOr %bool %false %106 + OpBranch %102 + %102 = OpLabel + %108 = OpPhi %bool %false %28 %107 %101 + OpSelectionMerge %110 None + OpBranchConditional %108 %109 %110 + %109 = OpLabel + %111 = OpAccessChain %_ptr_Uniform__arr_float_int_5 %10 %int_2 + %113 = OpLoad %_arr_float_int_5 %111 + %114 = OpAccessChain %_ptr_Uniform__arr_float_int_5 %10 %int_3 + %115 = OpLoad %_arr_float_int_5 %114 + %116 = OpCompositeExtract %float %113 0 + %117 = OpCompositeExtract %float %115 0 + %118 = OpFUnordNotEqual %bool %116 %117 + %119 = OpCompositeExtract %float %113 1 + %120 = OpCompositeExtract %float %115 1 + %121 = OpFUnordNotEqual %bool %119 %120 + %122 = OpLogicalOr %bool %121 %118 + %123 = OpCompositeExtract %float %113 2 + %124 = OpCompositeExtract %float %115 2 + %125 = OpFUnordNotEqual %bool %123 %124 + %126 = OpLogicalOr %bool %125 %122 + %127 = OpCompositeExtract %float %113 3 + %128 = OpCompositeExtract %float %115 3 + %129 = OpFUnordNotEqual %bool %127 %128 + %130 = OpLogicalOr %bool %129 %126 + %131 = OpCompositeExtract %float %113 4 + %132 = OpCompositeExtract %float %115 4 + %133 = OpFUnordNotEqual %bool %131 %132 + %134 = OpLogicalOr %bool %133 %130 + OpBranch %110 + %110 = OpLabel + %135 = OpPhi %bool %false %102 %134 %109 + OpSelectionMerge %137 None + OpBranchConditional %135 %136 %137 + %136 = OpLabel + %138 = OpAccessChain %_ptr_Uniform__arr_float_int_5 %10 %int_2 + %139 = OpLoad %_arr_float_int_5 %138 + %140 = OpCompositeExtract %float %139 0 + %141 = OpFOrdEqual %bool %140 %float_1 + %142 = OpCompositeExtract %float %139 1 + %143 = OpFOrdEqual %bool %142 %float_2 + %144 = OpLogicalAnd %bool %143 %141 + %145 = OpCompositeExtract %float %139 2 + %146 = OpFOrdEqual %bool %145 %float_3 + %147 = OpLogicalAnd %bool %146 %144 + %148 = OpCompositeExtract %float %139 3 + %149 = OpFOrdEqual %bool %148 %float_4 + %150 = OpLogicalAnd %bool %149 %147 + %151 = OpCompositeExtract %float %139 4 + %152 = OpFOrdEqual %bool %151 %float_5 + %153 = OpLogicalAnd %bool %152 %150 + OpBranch %137 + %137 = OpLabel + %154 = OpPhi %bool %false %110 %153 %136 + OpSelectionMerge %156 None + OpBranchConditional %154 %155 %156 + %155 = OpLabel + %157 = OpAccessChain %_ptr_Uniform__arr_float_int_5 %10 %int_2 + %158 = OpLoad %_arr_float_int_5 %157 + %159 = OpCompositeExtract %float %158 0 + %160 = OpFUnordNotEqual %bool %159 %float_1 + %161 = OpCompositeExtract %float %158 1 + %162 = OpFUnordNotEqual %bool %161 %float_2 + %163 = OpLogicalOr %bool %162 %160 + %164 = OpCompositeExtract %float %158 2 + %165 = OpFUnordNotEqual %bool %164 %float_3 + %166 = OpLogicalOr %bool %165 %163 + %167 = OpCompositeExtract %float %158 3 + %168 = OpFUnordNotEqual %bool %167 %float_n4 + %169 = OpLogicalOr %bool %168 %166 + %170 = OpCompositeExtract %float %158 4 + %171 = OpFUnordNotEqual %bool %170 %float_5 + %172 = OpLogicalOr %bool %171 %169 + OpBranch %156 + %156 = OpLabel + %173 = OpPhi %bool %false %137 %172 %155 + OpSelectionMerge %175 None + OpBranchConditional %173 %174 %175 + %174 = OpLabel + %176 = OpAccessChain %_ptr_Uniform__arr_float_int_5 %10 %int_2 + %177 = OpLoad %_arr_float_int_5 %176 + %178 = OpCompositeExtract %float %177 0 + %179 = OpFOrdEqual %bool %float_1 %178 + %180 = OpCompositeExtract %float %177 1 + %181 = OpFOrdEqual %bool %float_2 %180 + %182 = OpLogicalAnd %bool %181 %179 + %183 = OpCompositeExtract %float %177 2 + %184 = OpFOrdEqual %bool %float_3 %183 + %185 = OpLogicalAnd %bool %184 %182 + %186 = OpCompositeExtract %float %177 3 + %187 = OpFOrdEqual %bool %float_4 %186 + %188 = OpLogicalAnd %bool %187 %185 + %189 = OpCompositeExtract %float %177 4 + %190 = OpFOrdEqual %bool %float_5 %189 + %191 = OpLogicalAnd %bool %190 %188 + OpBranch %175 + %175 = OpLabel + %192 = OpPhi %bool %false %156 %191 %174 + OpSelectionMerge %194 None + OpBranchConditional %192 %193 %194 + %193 = OpLabel + %195 = OpAccessChain %_ptr_Uniform__arr_float_int_5 %10 %int_2 + %196 = OpLoad %_arr_float_int_5 %195 + %197 = OpCompositeExtract %float %196 0 + %198 = OpFUnordNotEqual %bool %float_1 %197 + %199 = OpCompositeExtract %float %196 1 + %200 = OpFUnordNotEqual %bool %float_2 %199 + %201 = OpLogicalOr %bool %200 %198 + %202 = OpCompositeExtract %float %196 2 + %203 = OpFUnordNotEqual %bool %float_3 %202 + %204 = OpLogicalOr %bool %203 %201 + %205 = OpCompositeExtract %float %196 3 + %206 = OpFUnordNotEqual %bool %float_n4 %205 + %207 = OpLogicalOr %bool %206 %204 + %208 = OpCompositeExtract %float %196 4 + %209 = OpFUnordNotEqual %bool %float_5 %208 + %210 = OpLogicalOr %bool %209 %207 + OpBranch %194 + %194 = OpLabel + %211 = OpPhi %bool %false %175 %210 %193 + OpSelectionMerge %213 None + OpBranchConditional %211 %212 %213 + %212 = OpLabel + %214 = OpLogicalAnd %bool %true %true + OpBranch %213 + %213 = OpLabel + %215 = OpPhi %bool %false %194 %214 %212 + OpSelectionMerge %217 None + OpBranchConditional %215 %216 %217 + %216 = OpLabel + %218 = OpINotEqual %v3bool %51 %56 + %220 = OpAny %bool %218 + %221 = OpLogicalOr %bool %220 %false + OpBranch %217 + %217 = OpLabel + %222 = OpPhi %bool %false %213 %221 %216 + OpSelectionMerge %224 None + OpBranchConditional %222 %223 %224 + %223 = OpLabel + %226 = OpFOrdEqual %v2bool %62 %62 + %227 = OpAll %bool %226 + %228 = OpFOrdEqual %v2bool %63 %63 + %229 = OpAll %bool %228 + %230 = OpLogicalAnd %bool %227 %229 + %231 = OpFOrdEqual %v2bool %65 %65 + %232 = OpAll %bool %231 + %233 = OpFOrdEqual %v2bool %66 %66 + %234 = OpAll %bool %233 + %235 = OpLogicalAnd %bool %232 %234 + %236 = OpLogicalAnd %bool %235 %230 + %237 = OpFOrdEqual %v2bool %69 %69 + %238 = OpAll %bool %237 + %239 = OpFOrdEqual %v2bool %70 %70 + %240 = OpAll %bool %239 + %241 = OpLogicalAnd %bool %238 %240 + %242 = OpLogicalAnd %bool %241 %236 + OpBranch %224 + %224 = OpLabel + %243 = OpPhi %bool %false %217 %242 %223 + OpSelectionMerge %245 None + OpBranchConditional %243 %244 %245 + %244 = OpLabel + %246 = OpFUnordNotEqual %v2bool %62 %62 + %247 = OpAny %bool %246 + %248 = OpFUnordNotEqual %v2bool %63 %63 + %249 = OpAny %bool %248 + %250 = OpLogicalOr %bool %247 %249 + %251 = OpFUnordNotEqual %v2bool %65 %75 + %252 = OpAny %bool %251 + %253 = OpFUnordNotEqual %v2bool %66 %76 + %254 = OpAny %bool %253 + %255 = OpLogicalOr %bool %252 %254 + %256 = OpLogicalOr %bool %255 %250 + %257 = OpFUnordNotEqual %v2bool %69 %78 + %258 = OpAny %bool %257 + %259 = OpFUnordNotEqual %v2bool %70 %79 + %260 = OpAny %bool %259 + %261 = OpLogicalOr %bool %258 %260 + %262 = OpLogicalOr %bool %261 %256 + OpBranch %245 + %245 = OpLabel + %263 = OpPhi %bool %false %224 %262 %244 + OpSelectionMerge %265 None + OpBranchConditional %263 %264 %265 + %264 = OpLabel + %266 = OpLogicalOr %bool %false %false + %267 = OpINotEqual %bool %int_3 %int_0 + %268 = OpINotEqual %bool %int_4 %int_0 + %269 = OpLogicalOr %bool %268 %267 + %270 = OpLogicalOr %bool %269 %266 + %271 = OpLogicalOr %bool %false %false + %272 = OpLogicalOr %bool %271 %270 + OpBranch %265 + %265 = OpLabel + %273 = OpPhi %bool %false %245 %272 %264 + OpSelectionMerge %275 None + OpBranchConditional %273 %274 %275 + %274 = OpLabel + %276 = OpLogicalAnd %bool %true %true + %277 = OpLogicalAnd %bool %true %true + %278 = OpLogicalAnd %bool %277 %276 + %279 = OpLogicalAnd %bool %true %true + %280 = OpLogicalAnd %bool %279 %278 + OpBranch %275 + %275 = OpLabel + %281 = OpPhi %bool %false %265 %280 %274 + OpSelectionMerge %286 None + OpBranchConditional %281 %284 %285 + %284 = OpLabel + %287 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %289 = OpLoad %v4float %287 + OpStore %282 %289 + OpBranch %286 + %285 = OpLabel + %290 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %291 = OpLoad %v4float %290 + OpStore %282 %291 + OpBranch %286 + %286 = OpLabel + %292 = OpLoad %v4float %282 + OpReturnValue %292 + OpFunctionEnd diff --git a/tests/sksl/shared/ArrayComparison.skrp b/tests/sksl/shared/ArrayComparison.skrp index e9b35492bc28..5239fcd8b8fc 100644 --- a/tests/sksl/shared/ArrayComparison.skrp +++ b/tests/sksl/shared/ArrayComparison.skrp @@ -1,105 +1,72 @@ +175 instructions + [immutable slots] -f1[0] = 0x3F800000 (1.0) -f1[1] = 0x40000000 (2.0) -f1[2] = 0x40400000 (3.0) -f1[3] = 0x40800000 (4.0) -f1[4] = 0x40A00000 (5.0) -f2[0] = 0x3F800000 (1.0) -f2[1] = 0x40000000 (2.0) -f2[2] = 0x40400000 (3.0) -f2[3] = 0x40800000 (4.0) -f2[4] = 0x40A00000 (5.0) -f3[0] = 0x3F800000 (1.0) -f3[1] = 0x40000000 (2.0) -f3[2] = 0x40400000 (3.0) -f3[3] = 0xC0800000 (-4.0) -f3[4] = 0x40A00000 (5.0) -v1[0](0) = 0x00000001 (1.401298e-45) -v1[0](1) = 0x00000002 (2.802597e-45) -v1[0](2) = 0x00000003 (4.203895e-45) -v1[1](0) = 0x00000004 (5.605194e-45) -v1[1](1) = 0x00000005 (7.006492e-45) -v1[1](2) = 0x00000006 (8.407791e-45) -v2[0](0) = 0x00000001 (1.401298e-45) -v2[0](1) = 0x00000002 (2.802597e-45) -v2[0](2) = 0x00000003 (4.203895e-45) -v2[1](0) = 0x00000004 (5.605194e-45) -v2[1](1) = 0x00000005 (7.006492e-45) -v2[1](2) = 0x00000006 (8.407791e-45) -v3[0](0) = 0x00000001 (1.401298e-45) -v3[0](1) = 0x00000002 (2.802597e-45) -v3[0](2) = 0x00000003 (4.203895e-45) -v3[1](0) = 0x00000004 (5.605194e-45) -v3[1](1) = 0x00000005 (7.006492e-45) -v3[1](2) = 0xFFFFFFFA -m1[0](0) = 0x3F800000 (1.0) -m1[0](1) = 0 -m1[0](2) = 0 -m1[0](3) = 0x3F800000 (1.0) -m1[1](0) = 0x40000000 (2.0) -m1[1](1) = 0 -m1[1](2) = 0 -m1[1](3) = 0x40000000 (2.0) -m1[2](0) = 0x40400000 (3.0) -m1[2](1) = 0x40800000 (4.0) -m1[2](2) = 0x40A00000 (5.0) -m1[2](3) = 0x40C00000 (6.0) -m2[0](0) = 0x3F800000 (1.0) -m2[0](1) = 0 -m2[0](2) = 0 -m2[0](3) = 0x3F800000 (1.0) -m2[1](0) = 0x40000000 (2.0) -m2[1](1) = 0 -m2[1](2) = 0 -m2[1](3) = 0x40000000 (2.0) -m2[2](0) = 0x40400000 (3.0) -m2[2](1) = 0x40800000 (4.0) -m2[2](2) = 0x40A00000 (5.0) -m2[2](3) = 0x40C00000 (6.0) -m3[0](0) = 0x3F800000 (1.0) -m3[0](1) = 0 -m3[0](2) = 0 -m3[0](3) = 0x3F800000 (1.0) -m3[1](0) = 0x40000000 (2.0) -m3[1](1) = 0x40400000 (3.0) -m3[1](2) = 0x40800000 (4.0) -m3[1](3) = 0x40A00000 (5.0) -m3[2](0) = 0x40C00000 (6.0) -m3[2](1) = 0 -m3[2](2) = 0 -m3[2](3) = 0x40C00000 (6.0) -s1[0].x = 0x00000001 (1.401298e-45) -s1[0].y = 0x00000002 (2.802597e-45) -s1[1].x = 0x00000003 (4.203895e-45) -s1[1].y = 0x00000004 (5.605194e-45) -s1[2].x = 0x00000005 (7.006492e-45) -s1[2].y = 0x00000006 (8.407791e-45) -s2[0].x = 0x00000001 (1.401298e-45) -s2[0].y = 0x00000002 (2.802597e-45) -s2[1].x = 0 -s2[1].y = 0 -s2[2].x = 0x00000005 (7.006492e-45) -s2[2].y = 0x00000006 (8.407791e-45) -s3[0].x = 0x00000001 (1.401298e-45) -s3[0].y = 0x00000002 (2.802597e-45) -s3[1].x = 0x00000003 (4.203895e-45) -s3[1].y = 0x00000004 (5.605194e-45) -s3[2].x = 0x00000005 (7.006492e-45) -s3[2].y = 0x00000006 (8.407791e-45) +i0 = 0x3F800000 (1.0) +i1 = 0x40000000 (2.0) +i2 = 0x40400000 (3.0) +i3 = 0x40800000 (4.0) +i4 = 0x40A00000 (5.0) +i5 = 0x3F800000 (1.0) +i6 = 0x40000000 (2.0) +i7 = 0x40400000 (3.0) +i8 = 0xC0800000 (-4.0) +i9 = 0x40A00000 (5.0) +i10 = 0x00000001 (1.401298e-45) +i11 = 0x00000002 (2.802597e-45) +i12 = 0x00000003 (4.203895e-45) +i13 = 0x00000004 (5.605194e-45) +i14 = 0x00000005 (7.006492e-45) +i15 = 0x00000006 (8.407791e-45) +i16 = 0x00000001 (1.401298e-45) +i17 = 0x00000002 (2.802597e-45) +i18 = 0x00000003 (4.203895e-45) +i19 = 0x00000004 (5.605194e-45) +i20 = 0x00000005 (7.006492e-45) +i21 = 0xFFFFFFFA +i22 = 0x3F800000 (1.0) +i23 = 0 +i24 = 0 +i25 = 0x3F800000 (1.0) +i26 = 0x40000000 (2.0) +i27 = 0 +i28 = 0 +i29 = 0x40000000 (2.0) +i30 = 0x40400000 (3.0) +i31 = 0x40800000 (4.0) +i32 = 0x40A00000 (5.0) +i33 = 0x40C00000 (6.0) +i34 = 0x3F800000 (1.0) +i35 = 0 +i36 = 0 +i37 = 0x3F800000 (1.0) +i38 = 0x40000000 (2.0) +i39 = 0x40400000 (3.0) +i40 = 0x40800000 (4.0) +i41 = 0x40A00000 (5.0) +i42 = 0x40C00000 (6.0) +i43 = 0 +i44 = 0 +i45 = 0x40C00000 (6.0) +i46 = 0x00000001 (1.401298e-45) +i47 = 0x00000002 (2.802597e-45) +i48 = 0 +i49 = 0 +i50 = 0x00000005 (7.006492e-45) +i51 = 0x00000006 (8.407791e-45) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true -copy_4_slots_unmasked $0..3 = f1[0], f1[1], f1[2], f1[3] -copy_4_slots_unmasked $4..7 = f1[4], f2[0], f2[1], f2[2] -copy_2_slots_unmasked $8..9 = f2[3], f2[4] +copy_4_immutables_unmasked $0..3 = i0..3 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] +copy_immutable_unmasked $4 = i4 [0x40A00000 (5.0)] +copy_4_immutables_unmasked $5..8 = i0..3 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] +copy_immutable_unmasked $9 = i4 [0x40A00000 (5.0)] cmpeq_n_floats $0..4 = equal($0..4, $5..9) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_4_slots_unmasked $1..4 = f1[0], f1[1], f1[2], f1[3] -copy_slot_unmasked $5 = f1[4] -copy_4_slots_unmasked $6..9 = f3[0], f3[1], f3[2], f3[3] -copy_slot_unmasked $10 = f3[4] +copy_4_immutables_unmasked $1..4 = i0..3 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked $5..8 = i4..7 [0x40A00000 (5.0), 0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0)] +copy_2_immutables_unmasked $9..10 = i8..9 [0xC0800000 (-4.0), 0x40A00000 (5.0)] cmpne_n_floats $1..5 = notEqual($1..5, $6..10) bitwise_or_2_ints $2..3 |= $4..5 bitwise_or_int $2 |= $3 @@ -115,8 +82,8 @@ bitwise_or_int $1 |= $2 bitwise_and_int $0 &= $1 copy_4_uniforms $1..4 = testArray[0], testArray[1], testArray[2], testArray[3] copy_uniform $5 = testArray[4] -copy_4_slots_unmasked $6..9 = f1[0], f1[1], f1[2], f1[3] -copy_slot_unmasked $10 = f1[4] +copy_4_immutables_unmasked $6..9 = i0..3 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] +copy_immutable_unmasked $10 = i4 [0x40A00000 (5.0)] cmpeq_n_floats $1..5 = equal($1..5, $6..10) bitwise_and_2_ints $2..3 &= $4..5 bitwise_and_int $2 &= $3 @@ -124,15 +91,15 @@ bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_4_uniforms $1..4 = testArray[0], testArray[1], testArray[2], testArray[3] copy_uniform $5 = testArray[4] -copy_4_slots_unmasked $6..9 = f3[0], f3[1], f3[2], f3[3] -copy_slot_unmasked $10 = f3[4] +copy_4_immutables_unmasked $6..9 = i5..8 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0xC0800000 (-4.0)] +copy_immutable_unmasked $10 = i9 [0x40A00000 (5.0)] cmpne_n_floats $1..5 = notEqual($1..5, $6..10) bitwise_or_2_ints $2..3 |= $4..5 bitwise_or_int $2 |= $3 bitwise_or_int $1 |= $2 bitwise_and_int $0 &= $1 -copy_4_slots_unmasked $1..4 = f1[0], f1[1], f1[2], f1[3] -copy_slot_unmasked $5 = f1[4] +copy_4_immutables_unmasked $1..4 = i0..3 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] +copy_immutable_unmasked $5 = i4 [0x40A00000 (5.0)] copy_4_uniforms $6..9 = testArray[0], testArray[1], testArray[2], testArray[3] copy_uniform $10 = testArray[4] cmpeq_n_floats $1..5 = equal($1..5, $6..10) @@ -140,8 +107,8 @@ bitwise_and_2_ints $2..3 &= $4..5 bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_4_slots_unmasked $1..4 = f3[0], f3[1], f3[2], f3[3] -copy_slot_unmasked $5 = f3[4] +copy_4_immutables_unmasked $1..4 = i5..8 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0xC0800000 (-4.0)] +copy_immutable_unmasked $5 = i9 [0x40A00000 (5.0)] copy_4_uniforms $6..9 = testArray[0], testArray[1], testArray[2], testArray[3] copy_uniform $10 = testArray[4] cmpne_n_floats $1..5 = notEqual($1..5, $6..10) @@ -149,109 +116,109 @@ bitwise_or_2_ints $2..3 |= $4..5 bitwise_or_int $2 |= $3 bitwise_or_int $1 |= $2 bitwise_and_int $0 &= $1 -copy_3_slots_unmasked $1..3 = v1[0] -copy_3_slots_unmasked $4..6 = v2[0] +copy_3_immutables_unmasked $1..3 = i10..12 [0x00000001 (1.401298e-45), 0x00000002 (2.802597e-45), 0x00000003 (4.203895e-45)] +copy_3_immutables_unmasked $4..6 = i10..12 [0x00000001 (1.401298e-45), 0x00000002 (2.802597e-45), 0x00000003 (4.203895e-45)] cmpeq_3_ints $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 -copy_3_slots_unmasked $2..4 = v1[1] -copy_3_slots_unmasked $5..7 = v2[1] +copy_3_immutables_unmasked $2..4 = i13..15 [0x00000004 (5.605194e-45), 0x00000005 (7.006492e-45), 0x00000006 (8.407791e-45)] +copy_3_immutables_unmasked $5..7 = i13..15 [0x00000004 (5.605194e-45), 0x00000005 (7.006492e-45), 0x00000006 (8.407791e-45)] cmpeq_3_ints $2..4 = equal($2..4, $5..7) bitwise_and_int $3 &= $4 bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_3_slots_unmasked $1..3 = v1[0] -copy_3_slots_unmasked $4..6 = v3[0] +copy_3_immutables_unmasked $1..3 = i10..12 [0x00000001 (1.401298e-45), 0x00000002 (2.802597e-45), 0x00000003 (4.203895e-45)] +copy_3_immutables_unmasked $4..6 = i16..18 [0x00000001 (1.401298e-45), 0x00000002 (2.802597e-45), 0x00000003 (4.203895e-45)] cmpne_3_ints $1..3 = notEqual($1..3, $4..6) bitwise_or_int $2 |= $3 bitwise_or_int $1 |= $2 -copy_3_slots_unmasked $2..4 = v1[1] -copy_3_slots_unmasked $5..7 = v3[1] +copy_3_immutables_unmasked $2..4 = i13..15 [0x00000004 (5.605194e-45), 0x00000005 (7.006492e-45), 0x00000006 (8.407791e-45)] +copy_3_immutables_unmasked $5..7 = i19..21 [0x00000004 (5.605194e-45), 0x00000005 (7.006492e-45), 0xFFFFFFFA] cmpne_3_ints $2..4 = notEqual($2..4, $5..7) bitwise_or_int $3 |= $4 bitwise_or_int $2 |= $3 bitwise_or_int $1 |= $2 bitwise_and_int $0 &= $1 -copy_4_slots_unmasked $1..4 = m1[0] -copy_4_slots_unmasked $5..8 = m2[0] +copy_4_immutables_unmasked $1..4 = i22..25 [0x3F800000 (1.0), 0, 0, 0x3F800000 (1.0)] +copy_4_immutables_unmasked $5..8 = i22..25 [0x3F800000 (1.0), 0, 0, 0x3F800000 (1.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 -copy_4_slots_unmasked $2..5 = m1[1] -copy_4_slots_unmasked $6..9 = m2[1] +copy_4_immutables_unmasked $2..5 = i26..29 [0x40000000 (2.0), 0, 0, 0x40000000 (2.0)] +copy_4_immutables_unmasked $6..9 = i26..29 [0x40000000 (2.0), 0, 0, 0x40000000 (2.0)] cmpeq_4_floats $2..5 = equal($2..5, $6..9) bitwise_and_2_ints $2..3 &= $4..5 bitwise_and_int $2 &= $3 -copy_4_slots_unmasked $3..6 = m1[2] -copy_4_slots_unmasked $7..10 = m2[2] +copy_4_immutables_unmasked $3..6 = i30..33 [0x40400000 (3.0), 0x40800000 (4.0), 0x40A00000 (5.0), 0x40C00000 (6.0)] +copy_4_immutables_unmasked $7..10 = i30..33 [0x40400000 (3.0), 0x40800000 (4.0), 0x40A00000 (5.0), 0x40C00000 (6.0)] cmpeq_4_floats $3..6 = equal($3..6, $7..10) bitwise_and_2_ints $3..4 &= $5..6 bitwise_and_int $3 &= $4 bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_4_slots_unmasked $1..4 = m1[0] -copy_4_slots_unmasked $5..8 = m3[0] +copy_4_immutables_unmasked $1..4 = i22..25 [0x3F800000 (1.0), 0, 0, 0x3F800000 (1.0)] +copy_4_immutables_unmasked $5..8 = i34..37 [0x3F800000 (1.0), 0, 0, 0x3F800000 (1.0)] cmpne_4_floats $1..4 = notEqual($1..4, $5..8) bitwise_or_2_ints $1..2 |= $3..4 bitwise_or_int $1 |= $2 -copy_4_slots_unmasked $2..5 = m1[1] -copy_4_slots_unmasked $6..9 = m3[1] +copy_4_immutables_unmasked $2..5 = i26..29 [0x40000000 (2.0), 0, 0, 0x40000000 (2.0)] +copy_4_immutables_unmasked $6..9 = i38..41 [0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0), 0x40A00000 (5.0)] cmpne_4_floats $2..5 = notEqual($2..5, $6..9) bitwise_or_2_ints $2..3 |= $4..5 bitwise_or_int $2 |= $3 -copy_4_slots_unmasked $3..6 = m1[2] -copy_4_slots_unmasked $7..10 = m3[2] +copy_4_immutables_unmasked $3..6 = i30..33 [0x40400000 (3.0), 0x40800000 (4.0), 0x40A00000 (5.0), 0x40C00000 (6.0)] +copy_4_immutables_unmasked $7..10 = i42..45 [0x40C00000 (6.0), 0, 0, 0x40C00000 (6.0)] cmpne_4_floats $3..6 = notEqual($3..6, $7..10) bitwise_or_2_ints $3..4 |= $5..6 bitwise_or_int $3 |= $4 bitwise_or_int $2 |= $3 bitwise_or_int $1 |= $2 bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = s1[0].x -copy_slot_unmasked $2 = s2[0].x +copy_immutable_unmasked $1 = i10 [0x00000001 (1.401298e-45)] +copy_immutable_unmasked $2 = i46 [0x00000001 (1.401298e-45)] cmpne_int $1 = notEqual($1, $2) -copy_slot_unmasked $2 = s1[0].y -copy_slot_unmasked $3 = s2[0].y +copy_immutable_unmasked $2 = i11 [0x00000002 (2.802597e-45)] +copy_immutable_unmasked $3 = i47 [0x00000002 (2.802597e-45)] cmpne_int $2 = notEqual($2, $3) bitwise_or_int $1 |= $2 -copy_slot_unmasked $2 = s1[1].x -copy_slot_unmasked $3 = s2[1].x +copy_immutable_unmasked $2 = i12 [0x00000003 (4.203895e-45)] +copy_immutable_unmasked $3 = i48 [0] cmpne_int $2 = notEqual($2, $3) -copy_slot_unmasked $3 = s1[1].y -copy_slot_unmasked $4 = s2[1].y +copy_immutable_unmasked $3 = i13 [0x00000004 (5.605194e-45)] +copy_immutable_unmasked $4 = i49 [0] cmpne_int $3 = notEqual($3, $4) bitwise_or_int $2 |= $3 -copy_slot_unmasked $3 = s1[2].x -copy_slot_unmasked $4 = s2[2].x +copy_immutable_unmasked $3 = i14 [0x00000005 (7.006492e-45)] +copy_immutable_unmasked $4 = i50 [0x00000005 (7.006492e-45)] cmpne_int $3 = notEqual($3, $4) -copy_slot_unmasked $4 = s1[2].y -copy_slot_unmasked $5 = s2[2].y +copy_immutable_unmasked $4 = i15 [0x00000006 (8.407791e-45)] +copy_immutable_unmasked $5 = i51 [0x00000006 (8.407791e-45)] cmpne_int $4 = notEqual($4, $5) bitwise_or_int $3 |= $4 bitwise_or_int $2 |= $3 bitwise_or_int $1 |= $2 bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = s3[0].x -copy_slot_unmasked $2 = s1[0].x +copy_immutable_unmasked $1 = i10 [0x00000001 (1.401298e-45)] +copy_immutable_unmasked $2 = i10 [0x00000001 (1.401298e-45)] cmpeq_int $1 = equal($1, $2) -copy_slot_unmasked $2 = s3[0].y -copy_slot_unmasked $3 = s1[0].y +copy_immutable_unmasked $2 = i11 [0x00000002 (2.802597e-45)] +copy_immutable_unmasked $3 = i11 [0x00000002 (2.802597e-45)] cmpeq_int $2 = equal($2, $3) bitwise_and_int $1 &= $2 -copy_slot_unmasked $2 = s3[1].x -copy_slot_unmasked $3 = s1[1].x +copy_immutable_unmasked $2 = i12 [0x00000003 (4.203895e-45)] +copy_immutable_unmasked $3 = i12 [0x00000003 (4.203895e-45)] cmpeq_int $2 = equal($2, $3) -copy_slot_unmasked $3 = s3[1].y -copy_slot_unmasked $4 = s1[1].y +copy_immutable_unmasked $3 = i13 [0x00000004 (5.605194e-45)] +copy_immutable_unmasked $4 = i13 [0x00000004 (5.605194e-45)] cmpeq_int $3 = equal($3, $4) bitwise_and_int $2 &= $3 -copy_slot_unmasked $3 = s3[2].x -copy_slot_unmasked $4 = s1[2].x +copy_immutable_unmasked $3 = i14 [0x00000005 (7.006492e-45)] +copy_immutable_unmasked $4 = i14 [0x00000005 (7.006492e-45)] cmpeq_int $3 = equal($3, $4) -copy_slot_unmasked $4 = s3[2].y -copy_slot_unmasked $5 = s1[2].y +copy_immutable_unmasked $4 = i15 [0x00000006 (8.407791e-45)] +copy_immutable_unmasked $5 = i15 [0x00000006 (8.407791e-45)] cmpeq_int $4 = equal($4, $5) bitwise_and_int $3 &= $4 bitwise_and_int $2 &= $3 diff --git a/tests/sksl/shared/ArrayComparison.wgsl b/tests/sksl/shared/ArrayComparison.wgsl index 901c83b6d858..3c120cfa6477 100644 --- a/tests/sksl/shared/ArrayComparison.wgsl +++ b/tests/sksl/shared/ArrayComparison.wgsl @@ -1,10 +1,10 @@ ### Compilation failed: -error: :11:14 error: uniform storage requires that array elements are aligned to 16 bytes, but array element of type 'f32' has a stride of 4 bytes. Consider using a vector or struct as the element type instead. +error: :12:14 error: uniform storage requires that array elements are aligned to 16 bytes, but array element of type 'f32' has a stride of 4 bytes. Consider using a vector or struct as the element type instead. testArray: array, ^^^^^^^^^^^^^ -:8:1 note: see layout of struct: +:9:1 note: see layout of struct: /* align(16) size(80) */ struct _GlobalUniforms { /* offset( 0) align(16) size(16) */ colorGreen : vec4; /* offset(16) align(16) size(16) */ colorRed : vec4; @@ -15,11 +15,12 @@ error: :11:14 error: uniform storage requires that array elements are aligned to struct _GlobalUniforms { ^^^^^^ -:14:36 note: '_GlobalUniforms' used in address space 'uniform' here +:15:36 note: '_GlobalUniforms' used in address space 'uniform' here @binding(0) @group(0) var _globalUniforms: _GlobalUniforms; ^^^^^^^^^^^^^^^ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -53,7 +54,7 @@ fn main(_skParam0: vec2) -> vec4 { var s1: array = array(S(1, 2), S(3, 4), S(5, 6)); var s2: array = array(S(1, 2), S(0, 0), S(5, 6)); var s3: array = array(S(1, 2), S(3, 4), S(5, 6)); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((((((((f1[0] == f2[0] && f1[1] == f2[1] && f1[2] == f2[2] && f1[3] == f2[3] && f1[4] == f2[4]) && (f1[0] != f3[0] || f1[1] != f3[1] || f1[2] != f3[2] || f1[3] != f3[3] || f1[4] != f3[4])) && (_globalUniforms.testArray[0] != _globalUniforms.testArrayNegative[0] || _globalUniforms.testArray[1] != _globalUniforms.testArrayNegative[1] || _globalUniforms.testArray[2] != _globalUniforms.testArrayNegative[2] || _globalUniforms.testArray[3] != _globalUniforms.testArrayNegative[3] || _globalUniforms.testArray[4] != _globalUniforms.testArrayNegative[4])) && (_globalUniforms.testArray[0] == f1[0] && _globalUniforms.testArray[1] == f1[1] && _globalUniforms.testArray[2] == f1[2] && _globalUniforms.testArray[3] == f1[3] && _globalUniforms.testArray[4] == f1[4])) && (_globalUniforms.testArray[0] != f3[0] || _globalUniforms.testArray[1] != f3[1] || _globalUniforms.testArray[2] != f3[2] || _globalUniforms.testArray[3] != f3[3] || _globalUniforms.testArray[4] != f3[4])) && (f1[0] == _globalUniforms.testArray[0] && f1[1] == _globalUniforms.testArray[1] && f1[2] == _globalUniforms.testArray[2] && f1[3] == _globalUniforms.testArray[3] && f1[4] == _globalUniforms.testArray[4])) && (f3[0] != _globalUniforms.testArray[0] || f3[1] != _globalUniforms.testArray[1] || f3[2] != _globalUniforms.testArray[2] || f3[3] != _globalUniforms.testArray[3] || f3[4] != _globalUniforms.testArray[4])) && (all(v1[0] == v2[0]) && all(v1[1] == v2[1]))) && (any(v1[0] != v3[0]) || any(v1[1] != v3[1]))) && ((all(m1[0][0] == m2[0][0]) && all(m1[0][1] == m2[0][1])) && (all(m1[1][0] == m2[1][0]) && all(m1[1][1] == m2[1][1])) && (all(m1[2][0] == m2[2][0]) && all(m1[2][1] == m2[2][1])))) && ((any(m1[0][0] != m3[0][0]) || any(m1[0][1] != m3[0][1])) || (any(m1[1][0] != m3[1][0]) || any(m1[1][1] != m3[1][1])) || (any(m1[2][0] != m3[2][0]) || any(m1[2][1] != m3[2][1])))) && ((s1[0].x != s2[0].x || s1[0].y != s2[0].y) || (s1[1].x != s2[1].x || s1[1].y != s2[1].y) || (s1[2].x != s2[2].x || s1[2].y != s2[2].y))) && ((s3[0].x == s1[0].x && s3[0].y == s1[0].y) && (s3[1].x == s1[1].x && s3[1].y == s1[1].y) && (s3[2].x == s1[2].x && s3[2].y == s1[2].y)))); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((((((((f1[0] == f2[0]) && (f1[1] == f2[1]) && (f1[2] == f2[2]) && (f1[3] == f2[3]) && (f1[4] == f2[4])) && ((f1[0] != f3[0]) || (f1[1] != f3[1]) || (f1[2] != f3[2]) || (f1[3] != f3[3]) || (f1[4] != f3[4]))) && ((_globalUniforms.testArray[0] != _globalUniforms.testArrayNegative[0]) || (_globalUniforms.testArray[1] != _globalUniforms.testArrayNegative[1]) || (_globalUniforms.testArray[2] != _globalUniforms.testArrayNegative[2]) || (_globalUniforms.testArray[3] != _globalUniforms.testArrayNegative[3]) || (_globalUniforms.testArray[4] != _globalUniforms.testArrayNegative[4]))) && ((_globalUniforms.testArray[0] == f1[0]) && (_globalUniforms.testArray[1] == f1[1]) && (_globalUniforms.testArray[2] == f1[2]) && (_globalUniforms.testArray[3] == f1[3]) && (_globalUniforms.testArray[4] == f1[4]))) && ((_globalUniforms.testArray[0] != f3[0]) || (_globalUniforms.testArray[1] != f3[1]) || (_globalUniforms.testArray[2] != f3[2]) || (_globalUniforms.testArray[3] != f3[3]) || (_globalUniforms.testArray[4] != f3[4]))) && ((f1[0] == _globalUniforms.testArray[0]) && (f1[1] == _globalUniforms.testArray[1]) && (f1[2] == _globalUniforms.testArray[2]) && (f1[3] == _globalUniforms.testArray[3]) && (f1[4] == _globalUniforms.testArray[4]))) && ((f3[0] != _globalUniforms.testArray[0]) || (f3[1] != _globalUniforms.testArray[1]) || (f3[2] != _globalUniforms.testArray[2]) || (f3[3] != _globalUniforms.testArray[3]) || (f3[4] != _globalUniforms.testArray[4]))) && (all(v1[0] == v2[0]) && all(v1[1] == v2[1]))) && (any(v1[0] != v3[0]) || any(v1[1] != v3[1]))) && ((all(m1[0][0] == m2[0][0]) && all(m1[0][1] == m2[0][1])) && (all(m1[1][0] == m2[1][0]) && all(m1[1][1] == m2[1][1])) && (all(m1[2][0] == m2[2][0]) && all(m1[2][1] == m2[2][1])))) && ((any(m1[0][0] != m3[0][0]) || any(m1[0][1] != m3[0][1])) || (any(m1[1][0] != m3[1][0]) || any(m1[1][1] != m3[1][1])) || (any(m1[2][0] != m3[2][0]) || any(m1[2][1] != m3[2][1])))) && (((s1[0].x != s2[0].x) || (s1[0].y != s2[0].y)) || ((s1[1].x != s2[1].x) || (s1[1].y != s2[1].y)) || ((s1[2].x != s2[2].x) || (s1[2].y != s2[2].y)))) && (((s3[0].x == s1[0].x) && (s3[0].y == s1[0].y)) && ((s3[1].x == s1[1].x) && (s3[1].y == s1[1].y)) && ((s3[2].x == s1[2].x) && (s3[2].y == s1[2].y))))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/shared/ArrayConstructors.asm.frag b/tests/sksl/shared/ArrayConstructors.asm.frag index 1943e3de7b30..907ff9a2803b 100644 --- a/tests/sksl/shared/ArrayConstructors.asm.frag +++ b/tests/sksl/shared/ArrayConstructors.asm.frag @@ -1,126 +1,126 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %test1 "test1" -OpName %test2 "test2" -OpName %test3 "test3" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %_arr_float_int_4 ArrayStride 16 -OpDecorate %_arr_v2float_int_2 ArrayStride 16 -OpDecorate %_arr_mat4v4float_int_1 ArrayStride 64 -OpDecorate %77 RelaxedPrecision -OpDecorate %79 RelaxedPrecision -OpDecorate %80 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %test1 "test1" + OpName %test2 "test2" + OpName %test3 "test3" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %_arr_float_int_4 ArrayStride 16 + OpDecorate %_arr_v2float_int_2 ArrayStride 16 + OpDecorate %_arr_mat4v4float_int_1 ArrayStride 64 + OpDecorate %77 RelaxedPrecision + OpDecorate %79 RelaxedPrecision + OpDecorate %80 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%int = OpTypeInt 32 1 -%int_4 = OpConstant %int 4 + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %int = OpTypeInt 32 1 + %int_4 = OpConstant %int 4 %_arr_float_int_4 = OpTypeArray %float %int_4 %_ptr_Function__arr_float_int_4 = OpTypePointer Function %_arr_float_int_4 -%float_1 = OpConstant %float 1 -%float_2 = OpConstant %float 2 -%float_3 = OpConstant %float 3 -%float_4 = OpConstant %float 4 -%int_2 = OpConstant %int 2 + %float_1 = OpConstant %float 1 + %float_2 = OpConstant %float 2 + %float_3 = OpConstant %float 3 + %float_4 = OpConstant %float 4 + %int_2 = OpConstant %int 2 %_arr_v2float_int_2 = OpTypeArray %v2float %int_2 %_ptr_Function__arr_v2float_int_2 = OpTypePointer Function %_arr_v2float_int_2 -%40 = OpConstantComposite %v2float %float_1 %float_2 -%41 = OpConstantComposite %v2float %float_3 %float_4 + %40 = OpConstantComposite %v2float %float_1 %float_2 + %41 = OpConstantComposite %v2float %float_3 %float_4 %mat4v4float = OpTypeMatrix %v4float 4 -%int_1 = OpConstant %int 1 + %int_1 = OpConstant %int 1 %_arr_mat4v4float_int_1 = OpTypeArray %mat4v4float %int_1 %_ptr_Function__arr_mat4v4float_int_1 = OpTypePointer Function %_arr_mat4v4float_int_1 -%float_16 = OpConstant %float 16 -%49 = OpConstantComposite %v4float %float_16 %float_0 %float_0 %float_0 -%50 = OpConstantComposite %v4float %float_0 %float_16 %float_0 %float_0 -%51 = OpConstantComposite %v4float %float_0 %float_0 %float_16 %float_0 -%52 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_16 -%53 = OpConstantComposite %mat4v4float %49 %50 %51 %52 -%int_3 = OpConstant %int 3 + %float_16 = OpConstant %float 16 + %49 = OpConstantComposite %v4float %float_16 %float_0 %float_0 %float_0 + %50 = OpConstantComposite %v4float %float_0 %float_16 %float_0 %float_0 + %51 = OpConstantComposite %v4float %float_0 %float_0 %float_16 %float_0 + %52 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_16 + %53 = OpConstantComposite %mat4v4float %49 %50 %51 %52 + %int_3 = OpConstant %int 3 %_ptr_Function_float = OpTypePointer Function %float -%int_0 = OpConstant %int 0 + %int_0 = OpConstant %int 0 %_ptr_Function_v4float = OpTypePointer Function %v4float -%float_24 = OpConstant %float 24 + %float_24 = OpConstant %float 24 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%test1 = OpVariable %_ptr_Function__arr_float_int_4 Function -%test2 = OpVariable %_ptr_Function__arr_v2float_int_2 Function -%test3 = OpVariable %_ptr_Function__arr_mat4v4float_int_1 Function -%71 = OpVariable %_ptr_Function_v4float Function -%35 = OpCompositeConstruct %_arr_float_int_4 %float_1 %float_2 %float_3 %float_4 -OpStore %test1 %35 -%42 = OpCompositeConstruct %_arr_v2float_int_2 %40 %41 -OpStore %test2 %42 -%54 = OpCompositeConstruct %_arr_mat4v4float_int_1 %53 -OpStore %test3 %54 -%56 = OpAccessChain %_ptr_Function_float %test1 %int_3 -%58 = OpLoad %float %56 -%59 = OpAccessChain %_ptr_Function_v2float %test2 %int_1 -%60 = OpLoad %v2float %59 -%61 = OpCompositeExtract %float %60 1 -%62 = OpFAdd %float %58 %61 -%64 = OpAccessChain %_ptr_Function_v4float %test3 %int_0 %int_3 -%66 = OpLoad %v4float %64 -%67 = OpCompositeExtract %float %66 3 -%68 = OpFAdd %float %62 %67 -%70 = OpFOrdEqual %bool %68 %float_24 -OpSelectionMerge %74 None -OpBranchConditional %70 %72 %73 -%72 = OpLabel -%75 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%77 = OpLoad %v4float %75 -OpStore %71 %77 -OpBranch %74 -%73 = OpLabel -%78 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%79 = OpLoad %v4float %78 -OpStore %71 %79 -OpBranch %74 -%74 = OpLabel -%80 = OpLoad %v4float %71 -OpReturnValue %80 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %test1 = OpVariable %_ptr_Function__arr_float_int_4 Function + %test2 = OpVariable %_ptr_Function__arr_v2float_int_2 Function + %test3 = OpVariable %_ptr_Function__arr_mat4v4float_int_1 Function + %71 = OpVariable %_ptr_Function_v4float Function + %35 = OpCompositeConstruct %_arr_float_int_4 %float_1 %float_2 %float_3 %float_4 + OpStore %test1 %35 + %42 = OpCompositeConstruct %_arr_v2float_int_2 %40 %41 + OpStore %test2 %42 + %54 = OpCompositeConstruct %_arr_mat4v4float_int_1 %53 + OpStore %test3 %54 + %56 = OpAccessChain %_ptr_Function_float %test1 %int_3 + %58 = OpLoad %float %56 + %59 = OpAccessChain %_ptr_Function_v2float %test2 %int_1 + %60 = OpLoad %v2float %59 + %61 = OpCompositeExtract %float %60 1 + %62 = OpFAdd %float %58 %61 + %64 = OpAccessChain %_ptr_Function_v4float %test3 %int_0 %int_3 + %66 = OpLoad %v4float %64 + %67 = OpCompositeExtract %float %66 3 + %68 = OpFAdd %float %62 %67 + %70 = OpFOrdEqual %bool %68 %float_24 + OpSelectionMerge %74 None + OpBranchConditional %70 %72 %73 + %72 = OpLabel + %75 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %77 = OpLoad %v4float %75 + OpStore %71 %77 + OpBranch %74 + %73 = OpLabel + %78 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %79 = OpLoad %v4float %78 + OpStore %71 %79 + OpBranch %74 + %74 = OpLabel + %80 = OpLoad %v4float %71 + OpReturnValue %80 + OpFunctionEnd diff --git a/tests/sksl/shared/ArrayConstructors.skrp b/tests/sksl/shared/ArrayConstructors.skrp index ececb2ae0afd..d48e7e7be3be 100644 --- a/tests/sksl/shared/ArrayConstructors.skrp +++ b/tests/sksl/shared/ArrayConstructors.skrp @@ -1,36 +1,34 @@ +15 instructions + [immutable slots] -test1[0] = 0x3F800000 (1.0) -test1[1] = 0x40000000 (2.0) -test1[2] = 0x40400000 (3.0) -test1[3] = 0x40800000 (4.0) -test2[0](0) = 0x3F800000 (1.0) -test2[0](1) = 0x40000000 (2.0) -test2[1](0) = 0x40400000 (3.0) -test2[1](1) = 0x40800000 (4.0) -test3[0](0) = 0x41800000 (16.0) -test3[0](1) = 0 -test3[0](2) = 0 -test3[0](3) = 0 -test3[0](4) = 0 -test3[0](5) = 0x41800000 (16.0) -test3[0](6) = 0 -test3[0](7) = 0 -test3[0](8) = 0 -test3[0](9) = 0 -test3[0](10) = 0x41800000 (16.0) -test3[0](11) = 0 -test3[0](12) = 0 -test3[0](13) = 0 -test3[0](14) = 0 -test3[0](15) = 0x41800000 (16.0) +i0 = 0x3F800000 (1.0) +i1 = 0x40000000 (2.0) +i2 = 0x40400000 (3.0) +i3 = 0x40800000 (4.0) +i4 = 0x41800000 (16.0) +i5 = 0 +i6 = 0 +i7 = 0 +i8 = 0 +i9 = 0x41800000 (16.0) +i10 = 0 +i11 = 0 +i12 = 0 +i13 = 0 +i14 = 0x41800000 (16.0) +i15 = 0 +i16 = 0 +i17 = 0 +i18 = 0 +i19 = 0x41800000 (16.0) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true -copy_slot_unmasked $0 = test1[3] -copy_2_slots_unmasked $1..2 = test2[1] +copy_immutable_unmasked $0 = i3 [0x40800000 (4.0)] +copy_2_immutables_unmasked $1..2 = i2..3 [0x40400000 (3.0), 0x40800000 (4.0)] swizzle_1 $1 = ($1..2).y add_float $0 += $1 -copy_4_slots_unmasked $1..4 = test3[0](12..15) +copy_4_immutables_unmasked $1..4 = i16..19 [0, 0, 0, 0x41800000 (16.0)] swizzle_1 $1 = ($1..4).w add_float $0 += $1 cmpeq_imm_float $0 = equal($0, 0x41C00000 (24.0)) diff --git a/tests/sksl/shared/ArrayConstructors.wgsl b/tests/sksl/shared/ArrayConstructors.wgsl index 8a5e8e84ec9c..c509ae5eeba0 100644 --- a/tests/sksl/shared/ArrayConstructors.wgsl +++ b/tests/sksl/shared/ArrayConstructors.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -16,7 +17,7 @@ fn main(_skParam0: vec2) -> vec4 { var test1: array = array(1.0, 2.0, 3.0, 4.0); var test2: array, 2> = array, 2>(vec2(1.0, 2.0), vec2(3.0, 4.0)); var test3: array, 1> = array, 1>(mat4x4(16.0, 0.0, 0.0, 0.0, 0.0, 16.0, 0.0, 0.0, 0.0, 0.0, 16.0, 0.0, 0.0, 0.0, 0.0, 16.0)); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((test1[3] + test2[1].y) + test3[0][3].w == 24.0)); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((test1[3] + test2[1].y) + test3[0][3].w) == 24.0))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/shared/ArrayFollowedByScalar.asm.frag b/tests/sksl/shared/ArrayFollowedByScalar.asm.frag index 21864ef8f0b0..769463914c5d 100644 --- a/tests/sksl/shared/ArrayFollowedByScalar.asm.frag +++ b/tests/sksl/shared/ArrayFollowedByScalar.asm.frag @@ -1,74 +1,74 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %rgb "rgb" -OpName %a "a" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %rgb RelaxedPrecision -OpDecorate %_arr_float_int_3 ArrayStride 16 -OpDecorate %a RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %rgb "rgb" + OpName %a "a" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %rgb RelaxedPrecision + OpDecorate %_arr_float_int_3 ArrayStride 16 + OpDecorate %a RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%12 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%16 = OpConstantComposite %v2float %float_0 %float_0 + %void = OpTypeVoid + %12 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %16 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%20 = OpTypeFunction %v4float %_ptr_Function_v2float -%int = OpTypeInt 32 1 -%int_3 = OpConstant %int 3 + %20 = OpTypeFunction %v4float %_ptr_Function_v2float + %int = OpTypeInt 32 1 + %int_3 = OpConstant %int 3 %_arr_float_int_3 = OpTypeArray %float %int_3 %_ptr_Function__arr_float_int_3 = OpTypePointer Function %_arr_float_int_3 %_ptr_Function_float = OpTypePointer Function %float -%int_0 = OpConstant %int 0 -%float_1 = OpConstant %float 1 -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 + %int_0 = OpConstant %int 0 + %float_1 = OpConstant %float 1 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %12 -%13 = OpLabel -%17 = OpVariable %_ptr_Function_v2float Function -OpStore %17 %16 -%19 = OpFunctionCall %v4float %main %17 -OpStore %sk_FragColor %19 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %20 -%21 = OpFunctionParameter %_ptr_Function_v2float -%22 = OpLabel -%rgb = OpVariable %_ptr_Function__arr_float_int_3 Function -%a = OpVariable %_ptr_Function_float Function -%31 = OpAccessChain %_ptr_Function_float %rgb %int_0 -OpStore %31 %float_0 -%34 = OpAccessChain %_ptr_Function_float %rgb %int_1 -OpStore %34 %float_1 -%36 = OpAccessChain %_ptr_Function_float %rgb %int_2 -OpStore %36 %float_0 -OpStore %a %float_1 -%37 = OpAccessChain %_ptr_Function_float %rgb %int_0 -%38 = OpLoad %float %37 -%39 = OpAccessChain %_ptr_Function_float %rgb %int_1 -%40 = OpLoad %float %39 -%41 = OpAccessChain %_ptr_Function_float %rgb %int_2 -%42 = OpLoad %float %41 -%43 = OpCompositeConstruct %v4float %38 %40 %42 %float_1 -OpReturnValue %43 -OpFunctionEnd + %13 = OpLabel + %17 = OpVariable %_ptr_Function_v2float Function + OpStore %17 %16 + %19 = OpFunctionCall %v4float %main %17 + OpStore %sk_FragColor %19 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %20 + %21 = OpFunctionParameter %_ptr_Function_v2float + %22 = OpLabel + %rgb = OpVariable %_ptr_Function__arr_float_int_3 Function + %a = OpVariable %_ptr_Function_float Function + %31 = OpAccessChain %_ptr_Function_float %rgb %int_0 + OpStore %31 %float_0 + %34 = OpAccessChain %_ptr_Function_float %rgb %int_1 + OpStore %34 %float_1 + %36 = OpAccessChain %_ptr_Function_float %rgb %int_2 + OpStore %36 %float_0 + OpStore %a %float_1 + %37 = OpAccessChain %_ptr_Function_float %rgb %int_0 + %38 = OpLoad %float %37 + %39 = OpAccessChain %_ptr_Function_float %rgb %int_1 + %40 = OpLoad %float %39 + %41 = OpAccessChain %_ptr_Function_float %rgb %int_2 + %42 = OpLoad %float %41 + %43 = OpCompositeConstruct %v4float %38 %40 %42 %float_1 + OpReturnValue %43 + OpFunctionEnd diff --git a/tests/sksl/shared/ArrayFollowedByScalar.skrp b/tests/sksl/shared/ArrayFollowedByScalar.skrp index 6e04c5796520..ab494281a64d 100644 --- a/tests/sksl/shared/ArrayFollowedByScalar.skrp +++ b/tests/sksl/shared/ArrayFollowedByScalar.skrp @@ -1,3 +1,5 @@ +9 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true splat_4_constants rgb[0], rgb[1], rgb[2], a = 0 diff --git a/tests/sksl/shared/ArrayFollowedByScalar.wgsl b/tests/sksl/shared/ArrayFollowedByScalar.wgsl index a436b110bc64..34b04c8c11a2 100644 --- a/tests/sksl/shared/ArrayFollowedByScalar.wgsl +++ b/tests/sksl/shared/ArrayFollowedByScalar.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, diff --git a/tests/sksl/shared/ArrayIndexTypes.asm.frag b/tests/sksl/shared/ArrayIndexTypes.asm.frag index 4d3d8ec7ba79..04660c961c06 100644 --- a/tests/sksl/shared/ArrayIndexTypes.asm.frag +++ b/tests/sksl/shared/ArrayIndexTypes.asm.frag @@ -1,71 +1,71 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %main "main" -OpName %array "array" -OpName %x "x" -OpName %y "y" -OpName %z "z" -OpName %w "w" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %_arr_float_int_4 ArrayStride 16 -OpDecorate %x RelaxedPrecision -OpDecorate %y RelaxedPrecision -OpDecorate %43 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %main "main" + OpName %array "array" + OpName %x "x" + OpName %y "y" + OpName %z "z" + OpName %w "w" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %_arr_float_int_4 ArrayStride 16 + OpDecorate %x RelaxedPrecision + OpDecorate %y RelaxedPrecision + OpDecorate %43 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%11 = OpTypeFunction %void -%int = OpTypeInt 32 1 -%int_4 = OpConstant %int 4 + %void = OpTypeVoid + %11 = OpTypeFunction %void + %int = OpTypeInt 32 1 + %int_4 = OpConstant %int 4 %_arr_float_int_4 = OpTypeArray %float %int_4 %_ptr_Function__arr_float_int_4 = OpTypePointer Function %_arr_float_int_4 -%float_1 = OpConstant %float 1 -%float_2 = OpConstant %float 2 -%float_3 = OpConstant %float 3 -%float_4 = OpConstant %float 4 + %float_1 = OpConstant %float 1 + %float_2 = OpConstant %float 2 + %float_3 = OpConstant %float 3 + %float_4 = OpConstant %float 4 %_ptr_Function_int = OpTypePointer Function %int -%int_0 = OpConstant %int 0 -%uint = OpTypeInt 32 0 + %int_0 = OpConstant %int 0 + %uint = OpTypeInt 32 0 %_ptr_Function_uint = OpTypePointer Function %uint -%uint_1 = OpConstant %uint 1 -%int_2 = OpConstant %int 2 -%uint_3 = OpConstant %uint 3 + %uint_1 = OpConstant %uint 1 + %int_2 = OpConstant %int 2 + %uint_3 = OpConstant %uint 3 %_ptr_Function_float = OpTypePointer Function %float -%main = OpFunction %void None %11 -%12 = OpLabel -%array = OpVariable %_ptr_Function__arr_float_int_4 Function -%x = OpVariable %_ptr_Function_int Function -%y = OpVariable %_ptr_Function_uint Function -%z = OpVariable %_ptr_Function_int Function -%w = OpVariable %_ptr_Function_uint Function -%22 = OpCompositeConstruct %_arr_float_int_4 %float_1 %float_2 %float_3 %float_4 -OpStore %array %22 -OpStore %x %int_0 -OpStore %y %uint_1 -OpStore %z %int_2 -OpStore %w %uint_3 -%34 = OpAccessChain %_ptr_Function_float %array %int_0 -%36 = OpLoad %float %34 -%37 = OpAccessChain %_ptr_Function_float %array %uint_1 -%38 = OpLoad %float %37 -%39 = OpAccessChain %_ptr_Function_float %array %int_2 -%40 = OpLoad %float %39 -%41 = OpAccessChain %_ptr_Function_float %array %uint_3 -%42 = OpLoad %float %41 -%43 = OpCompositeConstruct %v4float %36 %38 %40 %42 -OpStore %sk_FragColor %43 -OpReturn -OpFunctionEnd + %main = OpFunction %void None %11 + %12 = OpLabel + %array = OpVariable %_ptr_Function__arr_float_int_4 Function + %x = OpVariable %_ptr_Function_int Function + %y = OpVariable %_ptr_Function_uint Function + %z = OpVariable %_ptr_Function_int Function + %w = OpVariable %_ptr_Function_uint Function + %22 = OpCompositeConstruct %_arr_float_int_4 %float_1 %float_2 %float_3 %float_4 + OpStore %array %22 + OpStore %x %int_0 + OpStore %y %uint_1 + OpStore %z %int_2 + OpStore %w %uint_3 + %34 = OpAccessChain %_ptr_Function_float %array %int_0 + %36 = OpLoad %float %34 + %37 = OpAccessChain %_ptr_Function_float %array %uint_1 + %38 = OpLoad %float %37 + %39 = OpAccessChain %_ptr_Function_float %array %int_2 + %40 = OpLoad %float %39 + %41 = OpAccessChain %_ptr_Function_float %array %uint_3 + %42 = OpLoad %float %41 + %43 = OpCompositeConstruct %v4float %36 %38 %40 %42 + OpStore %sk_FragColor %43 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/ArrayIndexTypes.wgsl b/tests/sksl/shared/ArrayIndexTypes.wgsl index f1bedf500600..9fdae16e950d 100644 --- a/tests/sksl/shared/ArrayIndexTypes.wgsl +++ b/tests/sksl/shared/ArrayIndexTypes.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/shared/ArrayNarrowingConversions.asm.frag b/tests/sksl/shared/ArrayNarrowingConversions.asm.frag index 63d396558367..b1c89b698190 100644 --- a/tests/sksl/shared/ArrayNarrowingConversions.asm.frag +++ b/tests/sksl/shared/ArrayNarrowingConversions.asm.frag @@ -1,136 +1,136 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %i2 "i2" -OpName %s2 "s2" -OpName %f2 "f2" -OpName %h2 "h2" -OpName %cf2 "cf2" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %_arr_int_int_2 ArrayStride 16 -OpDecorate %s2 RelaxedPrecision -OpDecorate %34 RelaxedPrecision -OpDecorate %_arr_float_int_2 ArrayStride 16 -OpDecorate %h2 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %67 RelaxedPrecision -OpDecorate %69 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %i2 "i2" + OpName %s2 "s2" + OpName %f2 "f2" + OpName %h2 "h2" + OpName %cf2 "cf2" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %_arr_int_int_2 ArrayStride 16 + OpDecorate %s2 RelaxedPrecision + OpDecorate %34 RelaxedPrecision + OpDecorate %_arr_float_int_2 ArrayStride 16 + OpDecorate %h2 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %67 RelaxedPrecision + OpDecorate %69 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%int = OpTypeInt 32 1 -%int_2 = OpConstant %int 2 + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %int = OpTypeInt 32 1 + %int_2 = OpConstant %int 2 %_arr_int_int_2 = OpTypeArray %int %int_2 %_ptr_Function__arr_int_int_2 = OpTypePointer Function %_arr_int_int_2 -%int_1 = OpConstant %int 1 + %int_1 = OpConstant %int 1 %_arr_float_int_2 = OpTypeArray %float %int_2 %_ptr_Function__arr_float_int_2 = OpTypePointer Function %_arr_float_int_2 -%float_1 = OpConstant %float 1 -%float_2 = OpConstant %float 2 -%false = OpConstantFalse %bool -%true = OpConstantTrue %bool + %float_1 = OpConstant %float 1 + %float_2 = OpConstant %float 2 + %false = OpConstantFalse %bool + %true = OpConstantTrue %bool %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_0 = OpConstant %int 0 + %int_0 = OpConstant %int 0 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%i2 = OpVariable %_ptr_Function__arr_int_int_2 Function -%s2 = OpVariable %_ptr_Function__arr_int_int_2 Function -%f2 = OpVariable %_ptr_Function__arr_float_int_2 Function -%h2 = OpVariable %_ptr_Function__arr_float_int_2 Function -%cf2 = OpVariable %_ptr_Function__arr_float_int_2 Function -%59 = OpVariable %_ptr_Function_v4float Function -%32 = OpCompositeConstruct %_arr_int_int_2 %int_1 %int_2 -OpStore %i2 %32 -%34 = OpCompositeConstruct %_arr_int_int_2 %int_1 %int_2 -OpStore %s2 %34 -%40 = OpCompositeConstruct %_arr_float_int_2 %float_1 %float_2 -OpStore %f2 %40 -%42 = OpCompositeConstruct %_arr_float_int_2 %float_1 %float_2 -OpStore %h2 %42 -OpStore %i2 %34 -OpStore %s2 %34 -OpStore %f2 %42 -OpStore %h2 %42 -OpStore %cf2 %40 -%46 = OpLogicalAnd %bool %true %true -OpSelectionMerge %48 None -OpBranchConditional %46 %47 %48 -%47 = OpLabel -%49 = OpLogicalAnd %bool %true %true -OpBranch %48 -%48 = OpLabel -%50 = OpPhi %bool %false %25 %49 %47 -OpSelectionMerge %52 None -OpBranchConditional %50 %51 %52 -%51 = OpLabel -%53 = OpLogicalAnd %bool %true %true -OpBranch %52 -%52 = OpLabel -%54 = OpPhi %bool %false %48 %53 %51 -OpSelectionMerge %56 None -OpBranchConditional %54 %55 %56 -%55 = OpLabel -%57 = OpLogicalAnd %bool %true %true -OpBranch %56 -%56 = OpLabel -%58 = OpPhi %bool %false %52 %57 %55 -OpSelectionMerge %63 None -OpBranchConditional %58 %61 %62 -%61 = OpLabel -%64 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%67 = OpLoad %v4float %64 -OpStore %59 %67 -OpBranch %63 -%62 = OpLabel -%68 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%69 = OpLoad %v4float %68 -OpStore %59 %69 -OpBranch %63 -%63 = OpLabel -%70 = OpLoad %v4float %59 -OpReturnValue %70 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %i2 = OpVariable %_ptr_Function__arr_int_int_2 Function + %s2 = OpVariable %_ptr_Function__arr_int_int_2 Function + %f2 = OpVariable %_ptr_Function__arr_float_int_2 Function + %h2 = OpVariable %_ptr_Function__arr_float_int_2 Function + %cf2 = OpVariable %_ptr_Function__arr_float_int_2 Function + %59 = OpVariable %_ptr_Function_v4float Function + %32 = OpCompositeConstruct %_arr_int_int_2 %int_1 %int_2 + OpStore %i2 %32 + %34 = OpCompositeConstruct %_arr_int_int_2 %int_1 %int_2 + OpStore %s2 %34 + %40 = OpCompositeConstruct %_arr_float_int_2 %float_1 %float_2 + OpStore %f2 %40 + %42 = OpCompositeConstruct %_arr_float_int_2 %float_1 %float_2 + OpStore %h2 %42 + OpStore %i2 %34 + OpStore %s2 %34 + OpStore %f2 %42 + OpStore %h2 %42 + OpStore %cf2 %40 + %46 = OpLogicalAnd %bool %true %true + OpSelectionMerge %48 None + OpBranchConditional %46 %47 %48 + %47 = OpLabel + %49 = OpLogicalAnd %bool %true %true + OpBranch %48 + %48 = OpLabel + %50 = OpPhi %bool %false %25 %49 %47 + OpSelectionMerge %52 None + OpBranchConditional %50 %51 %52 + %51 = OpLabel + %53 = OpLogicalAnd %bool %true %true + OpBranch %52 + %52 = OpLabel + %54 = OpPhi %bool %false %48 %53 %51 + OpSelectionMerge %56 None + OpBranchConditional %54 %55 %56 + %55 = OpLabel + %57 = OpLogicalAnd %bool %true %true + OpBranch %56 + %56 = OpLabel + %58 = OpPhi %bool %false %52 %57 %55 + OpSelectionMerge %63 None + OpBranchConditional %58 %61 %62 + %61 = OpLabel + %64 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %67 = OpLoad %v4float %64 + OpStore %59 %67 + OpBranch %63 + %62 = OpLabel + %68 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %69 = OpLoad %v4float %68 + OpStore %59 %69 + OpBranch %63 + %63 = OpLabel + %70 = OpLoad %v4float %59 + OpReturnValue %70 + OpFunctionEnd diff --git a/tests/sksl/shared/ArrayNarrowingConversions.skrp b/tests/sksl/shared/ArrayNarrowingConversions.skrp index 765e05e8993e..01c59d25ef2d 100644 --- a/tests/sksl/shared/ArrayNarrowingConversions.skrp +++ b/tests/sksl/shared/ArrayNarrowingConversions.skrp @@ -1,17 +1,17 @@ +38 instructions + [immutable slots] -cf2[0] = 0x3F800000 (1.0) -cf2[1] = 0x40000000 (2.0) +i0 = 0x00000001 (1.401298e-45) +i1 = 0x00000002 (2.802597e-45) +i2 = 0x3F800000 (1.0) +i3 = 0x40000000 (2.0) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true -copy_constant i2[0] = 0x00000001 (1.401298e-45) -copy_constant i2[1] = 0x00000002 (2.802597e-45) -copy_constant s2[0] = 0x00000001 (1.401298e-45) -copy_constant s2[1] = 0x00000002 (2.802597e-45) -copy_constant f2[0] = 0x3F800000 (1.0) -copy_constant f2[1] = 0x40000000 (2.0) -copy_constant h2[0] = 0x3F800000 (1.0) -copy_constant h2[1] = 0x40000000 (2.0) +copy_2_immutables_unmasked i2[0], i2[1] = i0..1 [0x00000001 (1.401298e-45), 0x00000002 (2.802597e-45)] +copy_2_immutables_unmasked s2[0], s2[1] = i0..1 [0x00000001 (1.401298e-45), 0x00000002 (2.802597e-45)] +copy_2_immutables_unmasked f2[0], f2[1] = i2..3 [0x3F800000 (1.0), 0x40000000 (2.0)] +copy_2_immutables_unmasked h2[0], h2[1] = i2..3 [0x3F800000 (1.0), 0x40000000 (2.0)] copy_2_slots_unmasked i2[0], i2[1] = s2[0], s2[1] copy_2_slots_unmasked s2[0], s2[1] = i2[0], i2[1] copy_2_slots_unmasked f2[0], f2[1] = h2[0], h2[1] @@ -28,15 +28,14 @@ cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_2_slots_unmasked $1..2 = i2[0], i2[1] -copy_constant $12 = 0x00000001 (1.401298e-45) -copy_constant $13 = 0x00000002 (2.802597e-45) +copy_2_immutables_unmasked $12..13 = i0..1 [0x00000001 (1.401298e-45), 0x00000002 (2.802597e-45)] copy_2_slots_unmasked $3..4 = $12..13 cmpeq_2_ints $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_2_slots_unmasked $12..13 = h2[0], h2[1] copy_2_slots_unmasked $1..2 = $12..13 -copy_2_slots_unmasked $3..4 = cf2[0], cf2[1] +copy_2_immutables_unmasked $3..4 = i2..3 [0x3F800000 (1.0), 0x40000000 (2.0)] cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 diff --git a/tests/sksl/shared/ArrayNarrowingConversions.wgsl b/tests/sksl/shared/ArrayNarrowingConversions.wgsl new file mode 100644 index 000000000000..7ca4cbbebde4 --- /dev/null +++ b/tests/sksl/shared/ArrayNarrowingConversions.wgsl @@ -0,0 +1,37 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var i2: array = array(1, 2); + var s2: array = array(1, 2); + var f2: array = array(1.0, 2.0); + var h2: array = array(1.0, 2.0); + i2 = s2; + s2 = i2; + f2 = h2; + h2 = f2; + const cf2: array = array(1.0, 2.0); + let _skTemp0 = s2; + let _skTemp1 = h2; + let _skTemp2 = array(1, 2); + let _skTemp3 = h2; + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((i2[0] == _skTemp0[0]) && (i2[1] == _skTemp0[1])) && ((f2[0] == _skTemp1[0]) && (f2[1] == _skTemp1[1]))) && ((i2[0] == _skTemp2[0]) && (i2[1] == _skTemp2[1]))) && ((_skTemp3[0] == cf2[0]) && (_skTemp3[1] == cf2[1])))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/ArrayTypes.asm.frag b/tests/sksl/shared/ArrayTypes.asm.frag index 2cc78ca0bee8..c2d611713304 100644 --- a/tests/sksl/shared/ArrayTypes.asm.frag +++ b/tests/sksl/shared/ArrayTypes.asm.frag @@ -1,136 +1,136 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_entrypoint_v "_entrypoint_v" -OpName %S "S" -OpMemberName %S 0 "v" -OpName %initialize_vS "initialize_vS" -OpName %main "main" -OpName %x "x" -OpName %y "y" -OpName %z "z" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %S 0 Offset 0 -OpDecorate %_arr_S_int_2 ArrayStride 16 -OpDecorate %_arr_v2float_int_2 ArrayStride 16 -OpDecorate %99 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_entrypoint_v "_entrypoint_v" + OpName %S "S" + OpMemberName %S 0 "v" + OpName %initialize_vS "initialize_vS" + OpName %main "main" + OpName %x "x" + OpName %y "y" + OpName %z "z" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %S 0 Offset 0 + OpDecorate %_arr_S_int_2 ArrayStride 16 + OpDecorate %_arr_v2float_int_2 ArrayStride 16 + OpDecorate %99 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%13 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%17 = OpConstantComposite %v2float %float_0 %float_0 + %void = OpTypeVoid + %13 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %17 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%S = OpTypeStruct %v2float -%int = OpTypeInt 32 1 -%int_2 = OpConstant %int 2 + %S = OpTypeStruct %v2float + %int = OpTypeInt 32 1 + %int_2 = OpConstant %int 2 %_arr_S_int_2 = OpTypeArray %S %int_2 %_ptr_Function__arr_S_int_2 = OpTypePointer Function %_arr_S_int_2 -%26 = OpTypeFunction %void %_ptr_Function__arr_S_int_2 -%float_1 = OpConstant %float 1 -%30 = OpConstantComposite %v2float %float_0 %float_1 -%int_0 = OpConstant %int 0 -%float_2 = OpConstant %float 2 -%34 = OpConstantComposite %v2float %float_2 %float_1 -%int_1 = OpConstant %int 1 -%37 = OpTypeFunction %v4float %_ptr_Function_v2float + %26 = OpTypeFunction %void %_ptr_Function__arr_S_int_2 + %float_1 = OpConstant %float 1 + %30 = OpConstantComposite %v2float %float_0 %float_1 + %int_0 = OpConstant %int 0 + %float_2 = OpConstant %float 2 + %34 = OpConstantComposite %v2float %float_2 %float_1 + %int_1 = OpConstant %int 1 + %37 = OpTypeFunction %v4float %_ptr_Function_v2float %_arr_v2float_int_2 = OpTypeArray %v2float %int_2 %_ptr_Function__arr_v2float_int_2 = OpTypePointer Function %_arr_v2float_int_2 -%44 = OpConstantComposite %v2float %float_1 %float_0 -%float_n1 = OpConstant %float -1 -%49 = OpConstantComposite %v2float %float_n1 %float_2 + %44 = OpConstantComposite %v2float %float_1 %float_0 + %float_n1 = OpConstant %float -1 + %49 = OpConstantComposite %v2float %float_n1 %float_2 %_entrypoint_v = OpFunction %void None %13 -%14 = OpLabel -%18 = OpVariable %_ptr_Function_v2float Function -OpStore %18 %17 -%20 = OpFunctionCall %v4float %main %18 -OpStore %sk_FragColor %20 -OpReturn -OpFunctionEnd + %14 = OpLabel + %18 = OpVariable %_ptr_Function_v2float Function + OpStore %18 %17 + %20 = OpFunctionCall %v4float %main %18 + OpStore %sk_FragColor %20 + OpReturn + OpFunctionEnd %initialize_vS = OpFunction %void None %26 -%27 = OpFunctionParameter %_ptr_Function__arr_S_int_2 -%28 = OpLabel -%32 = OpAccessChain %_ptr_Function_v2float %27 %int_0 %int_0 -OpStore %32 %30 -%36 = OpAccessChain %_ptr_Function_v2float %27 %int_1 %int_0 -OpStore %36 %34 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %37 -%38 = OpFunctionParameter %_ptr_Function_v2float -%39 = OpLabel -%x = OpVariable %_ptr_Function__arr_v2float_int_2 Function -%y = OpVariable %_ptr_Function__arr_v2float_int_2 Function -%z = OpVariable %_ptr_Function__arr_S_int_2 Function -%52 = OpVariable %_ptr_Function__arr_S_int_2 Function -%43 = OpAccessChain %_ptr_Function_v2float %x %int_0 -OpStore %43 %17 -%45 = OpAccessChain %_ptr_Function_v2float %x %int_1 -OpStore %45 %44 -%47 = OpAccessChain %_ptr_Function_v2float %y %int_0 -OpStore %47 %30 -%50 = OpAccessChain %_ptr_Function_v2float %y %int_1 -OpStore %50 %49 -%53 = OpFunctionCall %void %initialize_vS %52 -%54 = OpLoad %_arr_S_int_2 %52 -OpStore %z %54 -%55 = OpAccessChain %_ptr_Function_v2float %x %int_0 -%56 = OpLoad %v2float %55 -%57 = OpCompositeExtract %float %56 0 -%58 = OpAccessChain %_ptr_Function_v2float %x %int_0 -%59 = OpLoad %v2float %58 -%60 = OpCompositeExtract %float %59 1 -%61 = OpFMul %float %57 %60 -%62 = OpAccessChain %_ptr_Function_v2float %z %int_0 %int_0 -%63 = OpLoad %v2float %62 -%64 = OpCompositeExtract %float %63 0 -%65 = OpFAdd %float %61 %64 -%66 = OpAccessChain %_ptr_Function_v2float %x %int_1 -%67 = OpLoad %v2float %66 -%68 = OpCompositeExtract %float %67 0 -%69 = OpAccessChain %_ptr_Function_v2float %x %int_1 -%70 = OpLoad %v2float %69 -%71 = OpCompositeExtract %float %70 1 -%72 = OpAccessChain %_ptr_Function_v2float %z %int_0 %int_0 -%73 = OpLoad %v2float %72 -%74 = OpCompositeExtract %float %73 1 -%75 = OpFMul %float %71 %74 -%76 = OpFSub %float %68 %75 -%77 = OpAccessChain %_ptr_Function_v2float %y %int_0 -%78 = OpLoad %v2float %77 -%79 = OpCompositeExtract %float %78 0 -%80 = OpAccessChain %_ptr_Function_v2float %y %int_0 -%81 = OpLoad %v2float %80 -%82 = OpCompositeExtract %float %81 1 -%83 = OpFDiv %float %79 %82 -%84 = OpAccessChain %_ptr_Function_v2float %z %int_1 %int_0 -%85 = OpLoad %v2float %84 -%86 = OpCompositeExtract %float %85 0 -%87 = OpFDiv %float %83 %86 -%88 = OpAccessChain %_ptr_Function_v2float %y %int_1 -%89 = OpLoad %v2float %88 -%90 = OpCompositeExtract %float %89 0 -%91 = OpAccessChain %_ptr_Function_v2float %y %int_1 -%92 = OpLoad %v2float %91 -%93 = OpCompositeExtract %float %92 1 -%94 = OpAccessChain %_ptr_Function_v2float %z %int_1 %int_0 -%95 = OpLoad %v2float %94 -%96 = OpCompositeExtract %float %95 1 -%97 = OpFMul %float %93 %96 -%98 = OpFAdd %float %90 %97 -%99 = OpCompositeConstruct %v4float %65 %76 %87 %98 -OpReturnValue %99 -OpFunctionEnd + %27 = OpFunctionParameter %_ptr_Function__arr_S_int_2 + %28 = OpLabel + %32 = OpAccessChain %_ptr_Function_v2float %27 %int_0 %int_0 + OpStore %32 %30 + %36 = OpAccessChain %_ptr_Function_v2float %27 %int_1 %int_0 + OpStore %36 %34 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %37 + %38 = OpFunctionParameter %_ptr_Function_v2float + %39 = OpLabel + %x = OpVariable %_ptr_Function__arr_v2float_int_2 Function + %y = OpVariable %_ptr_Function__arr_v2float_int_2 Function + %z = OpVariable %_ptr_Function__arr_S_int_2 Function + %52 = OpVariable %_ptr_Function__arr_S_int_2 Function + %43 = OpAccessChain %_ptr_Function_v2float %x %int_0 + OpStore %43 %17 + %45 = OpAccessChain %_ptr_Function_v2float %x %int_1 + OpStore %45 %44 + %47 = OpAccessChain %_ptr_Function_v2float %y %int_0 + OpStore %47 %30 + %50 = OpAccessChain %_ptr_Function_v2float %y %int_1 + OpStore %50 %49 + %53 = OpFunctionCall %void %initialize_vS %52 + %54 = OpLoad %_arr_S_int_2 %52 + OpStore %z %54 + %55 = OpAccessChain %_ptr_Function_v2float %x %int_0 + %56 = OpLoad %v2float %55 + %57 = OpCompositeExtract %float %56 0 + %58 = OpAccessChain %_ptr_Function_v2float %x %int_0 + %59 = OpLoad %v2float %58 + %60 = OpCompositeExtract %float %59 1 + %61 = OpFMul %float %57 %60 + %62 = OpAccessChain %_ptr_Function_v2float %z %int_0 %int_0 + %63 = OpLoad %v2float %62 + %64 = OpCompositeExtract %float %63 0 + %65 = OpFAdd %float %61 %64 + %66 = OpAccessChain %_ptr_Function_v2float %x %int_1 + %67 = OpLoad %v2float %66 + %68 = OpCompositeExtract %float %67 0 + %69 = OpAccessChain %_ptr_Function_v2float %x %int_1 + %70 = OpLoad %v2float %69 + %71 = OpCompositeExtract %float %70 1 + %72 = OpAccessChain %_ptr_Function_v2float %z %int_0 %int_0 + %73 = OpLoad %v2float %72 + %74 = OpCompositeExtract %float %73 1 + %75 = OpFMul %float %71 %74 + %76 = OpFSub %float %68 %75 + %77 = OpAccessChain %_ptr_Function_v2float %y %int_0 + %78 = OpLoad %v2float %77 + %79 = OpCompositeExtract %float %78 0 + %80 = OpAccessChain %_ptr_Function_v2float %y %int_0 + %81 = OpLoad %v2float %80 + %82 = OpCompositeExtract %float %81 1 + %83 = OpFDiv %float %79 %82 + %84 = OpAccessChain %_ptr_Function_v2float %z %int_1 %int_0 + %85 = OpLoad %v2float %84 + %86 = OpCompositeExtract %float %85 0 + %87 = OpFDiv %float %83 %86 + %88 = OpAccessChain %_ptr_Function_v2float %y %int_1 + %89 = OpLoad %v2float %88 + %90 = OpCompositeExtract %float %89 0 + %91 = OpAccessChain %_ptr_Function_v2float %y %int_1 + %92 = OpLoad %v2float %91 + %93 = OpCompositeExtract %float %92 1 + %94 = OpAccessChain %_ptr_Function_v2float %z %int_1 %int_0 + %95 = OpLoad %v2float %94 + %96 = OpCompositeExtract %float %95 1 + %97 = OpFMul %float %93 %96 + %98 = OpFAdd %float %90 %97 + %99 = OpCompositeConstruct %v4float %65 %76 %87 %98 + OpReturnValue %99 + OpFunctionEnd diff --git a/tests/sksl/shared/ArrayTypes.metal b/tests/sksl/shared/ArrayTypes.metal index ba517af62835..44f8ee059370 100644 --- a/tests/sksl/shared/ArrayTypes.metal +++ b/tests/sksl/shared/ArrayTypes.metal @@ -9,12 +9,6 @@ struct Inputs { struct Outputs { half4 sk_FragColor [[color(0)]]; }; -void initialize_vS(thread array& z); -void _skOutParamHelper0_initialize_vS(thread array& z) { - array _var0; - initialize_vS(_var0); - z = _var0; -} void initialize_vS(thread array& z) { z[0].v = float2(0.0, 1.0); z[1].v = float2(2.0, 1.0); @@ -22,6 +16,7 @@ void initialize_vS(thread array& z) { fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) { Outputs _out; (void)_out; + array _skTemp0; array x; x[0] = float2(0.0); x[1] = float2(1.0, 0.0); @@ -29,7 +24,7 @@ fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front y[0] = float2(0.0, 1.0); y[1] = float2(-1.0, 2.0); array z; - _skOutParamHelper0_initialize_vS(z); + ((initialize_vS(_skTemp0)), (z = _skTemp0)); _out.sk_FragColor = half4(half(x[0].x * x[0].y + z[0].v.x), half(x[1].x - x[1].y * z[0].v.y), half((y[0].x / y[0].y) / z[1].v.x), half(y[1].x + y[1].y * z[1].v.y)); return _out; } diff --git a/tests/sksl/shared/ArrayTypes.skrp b/tests/sksl/shared/ArrayTypes.skrp index 025a87b2c7fb..cd189dbbb7c0 100644 --- a/tests/sksl/shared/ArrayTypes.skrp +++ b/tests/sksl/shared/ArrayTypes.skrp @@ -1,19 +1,26 @@ +39 instructions + +[immutable slots] +i0 = 0x3F800000 (1.0) +i1 = 0 +i2 = 0 +i3 = 0x3F800000 (1.0) +i4 = 0xBF800000 (-1.0) +i5 = 0x40000000 (2.0) +i6 = 0x40000000 (2.0) +i7 = 0x3F800000 (1.0) + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true splat_4_constants x[0], x[1] = 0 splat_2_constants x[0] = 0 -copy_constant x[1](0) = 0x3F800000 (1.0) -splat_4_constants x[1](1), y[0], y[1](0) = 0 -copy_constant y[1](1) = 0 -copy_constant y[0](0) = 0 -copy_constant y[0](1) = 0x3F800000 (1.0) -copy_constant y[1](0) = 0xBF800000 (-1.0) -copy_constant y[1](1) = 0x40000000 (2.0) +copy_2_immutables_unmasked x[1] = i0..1 [0x3F800000 (1.0), 0] +splat_4_constants y[0], y[1] = 0 +copy_2_immutables_unmasked y[0] = i2..3 [0, 0x3F800000 (1.0)] +copy_2_immutables_unmasked y[1] = i4..5 [0xBF800000 (-1.0), 0x40000000 (2.0)] splat_4_constants z[0].v, z[1].v = 0 -copy_constant z[0].v₁(0) = 0 -copy_constant z[0].v₁(1) = 0x3F800000 (1.0) -copy_constant z[1].v₁(0) = 0x40000000 (2.0) -copy_constant z[1].v₁(1) = 0x3F800000 (1.0) +copy_2_immutables_unmasked z[0].v₁ = i2..3 [0, 0x3F800000 (1.0)] +copy_2_immutables_unmasked z[1].v₁ = i6..7 [0x40000000 (2.0), 0x3F800000 (1.0)] copy_4_slots_unmasked z[0].v, z[1].v = z[0].v₁, z[1].v₁ label label 0 copy_slot_unmasked $0 = x[0](0) diff --git a/tests/sksl/shared/ArrayTypes.wgsl b/tests/sksl/shared/ArrayTypes.wgsl index 8f520245afac..76344271c03b 100644 --- a/tests/sksl/shared/ArrayTypes.wgsl +++ b/tests/sksl/shared/ArrayTypes.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, diff --git a/tests/sksl/shared/Assignment.asm.frag b/tests/sksl/shared/Assignment.asm.frag index 1d0c2b711215..2e3e3200c0cd 100644 --- a/tests/sksl/shared/Assignment.asm.frag +++ b/tests/sksl/shared/Assignment.asm.frag @@ -1,131 +1,131 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %globalVar "globalVar" -OpName %S "S" -OpMemberName %S 0 "f" -OpMemberName %S 1 "af" -OpMemberName %S 2 "h4" -OpMemberName %S 3 "ah4" -OpName %globalStruct "globalStruct" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpName %_entrypoint_v "_entrypoint_v" -OpName %keepAlive_vh "keepAlive_vh" -OpName %keepAlive_vf "keepAlive_vf" -OpName %keepAlive_vi "keepAlive_vi" -OpName %assignToFunctionParameter_vif "assignToFunctionParameter_vif" -OpName %main "main" -OpName %i "i" -OpName %i4 "i4" -OpName %f3x3 "f3x3" -OpName %x "x" -OpName %ai "ai" -OpName %ai4 "ai4" -OpName %ah3x3 "ah3x3" -OpName %af4 "af4" -OpName %s "s" -OpName %l "l" -OpName %repeat "repeat" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %globalVar RelaxedPrecision -OpDecorate %_arr_float_int_5 ArrayStride 16 -OpDecorate %_arr_v4float_int_5 ArrayStride 16 -OpMemberDecorate %S 0 Offset 0 -OpMemberDecorate %S 1 Offset 16 -OpMemberDecorate %S 2 Offset 96 -OpMemberDecorate %S 2 RelaxedPrecision -OpMemberDecorate %S 3 Offset 112 -OpMemberDecorate %S 3 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %23 Binding 0 -OpDecorate %23 DescriptorSet 0 -OpDecorate %x RelaxedPrecision -OpDecorate %83 RelaxedPrecision -OpDecorate %84 RelaxedPrecision -OpDecorate %_arr_int_int_1 ArrayStride 16 -OpDecorate %_arr_v4int_int_1 ArrayStride 16 -OpDecorate %_arr_mat3v3float_int_1 ArrayStride 48 -OpDecorate %_arr_v4float_int_1 ArrayStride 16 -OpDecorate %112 RelaxedPrecision -OpDecorate %113 RelaxedPrecision -OpDecorate %116 RelaxedPrecision -OpDecorate %117 RelaxedPrecision -OpDecorate %l RelaxedPrecision -OpDecorate %150 RelaxedPrecision -OpDecorate %151 RelaxedPrecision -OpDecorate %153 RelaxedPrecision -OpDecorate %175 RelaxedPrecision -OpDecorate %176 RelaxedPrecision -OpDecorate %178 RelaxedPrecision -OpDecorate %184 RelaxedPrecision -OpDecorate %185 RelaxedPrecision -OpDecorate %187 RelaxedPrecision -OpDecorate %200 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %globalVar "globalVar" + OpName %S "S" + OpMemberName %S 0 "f" + OpMemberName %S 1 "af" + OpMemberName %S 2 "h4" + OpMemberName %S 3 "ah4" + OpName %globalStruct "globalStruct" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpName %_entrypoint_v "_entrypoint_v" + OpName %keepAlive_vh "keepAlive_vh" + OpName %keepAlive_vf "keepAlive_vf" + OpName %keepAlive_vi "keepAlive_vi" + OpName %assignToFunctionParameter_vif "assignToFunctionParameter_vif" + OpName %main "main" + OpName %i "i" + OpName %i4 "i4" + OpName %f3x3 "f3x3" + OpName %x "x" + OpName %ai "ai" + OpName %ai4 "ai4" + OpName %ah3x3 "ah3x3" + OpName %af4 "af4" + OpName %s "s" + OpName %l "l" + OpName %repeat "repeat" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %globalVar RelaxedPrecision + OpDecorate %_arr_float_int_5 ArrayStride 16 + OpDecorate %_arr_v4float_int_5 ArrayStride 16 + OpMemberDecorate %S 0 Offset 0 + OpMemberDecorate %S 1 Offset 16 + OpMemberDecorate %S 2 Offset 96 + OpMemberDecorate %S 2 RelaxedPrecision + OpMemberDecorate %S 3 Offset 112 + OpMemberDecorate %S 3 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %23 Binding 0 + OpDecorate %23 DescriptorSet 0 + OpDecorate %x RelaxedPrecision + OpDecorate %83 RelaxedPrecision + OpDecorate %84 RelaxedPrecision + OpDecorate %_arr_int_int_1 ArrayStride 16 + OpDecorate %_arr_v4int_int_1 ArrayStride 16 + OpDecorate %_arr_mat3v3float_int_1 ArrayStride 48 + OpDecorate %_arr_v4float_int_1 ArrayStride 16 + OpDecorate %112 RelaxedPrecision + OpDecorate %113 RelaxedPrecision + OpDecorate %116 RelaxedPrecision + OpDecorate %117 RelaxedPrecision + OpDecorate %l RelaxedPrecision + OpDecorate %150 RelaxedPrecision + OpDecorate %151 RelaxedPrecision + OpDecorate %153 RelaxedPrecision + OpDecorate %175 RelaxedPrecision + OpDecorate %176 RelaxedPrecision + OpDecorate %178 RelaxedPrecision + OpDecorate %184 RelaxedPrecision + OpDecorate %185 RelaxedPrecision + OpDecorate %187 RelaxedPrecision + OpDecorate %200 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_ptr_Private_v4float = OpTypePointer Private %v4float -%globalVar = OpVariable %_ptr_Private_v4float Private -%int = OpTypeInt 32 1 -%int_5 = OpConstant %int 5 + %globalVar = OpVariable %_ptr_Private_v4float Private + %int = OpTypeInt 32 1 + %int_5 = OpConstant %int 5 %_arr_float_int_5 = OpTypeArray %float %int_5 %_arr_v4float_int_5 = OpTypeArray %v4float %int_5 -%S = OpTypeStruct %float %_arr_float_int_5 %v4float %_arr_v4float_int_5 + %S = OpTypeStruct %float %_arr_float_int_5 %v4float %_arr_v4float_int_5 %_ptr_Private_S = OpTypePointer Private %S %globalStruct = OpVariable %_ptr_Private_S Private %_UniformBuffer = OpTypeStruct %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%23 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%28 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%32 = OpConstantComposite %v2float %float_0 %float_0 + %23 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %28 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %32 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float %_ptr_Function_float = OpTypePointer Function %float -%37 = OpTypeFunction %void %_ptr_Function_float + %37 = OpTypeFunction %void %_ptr_Function_float %_ptr_Function_int = OpTypePointer Function %int -%43 = OpTypeFunction %void %_ptr_Function_int -%46 = OpTypeFunction %void %_ptr_Function_int %_ptr_Function_float -%int_1 = OpConstant %int 1 -%float_1 = OpConstant %float 1 -%52 = OpTypeFunction %v4float %_ptr_Function_v2float -%int_0 = OpConstant %int 0 -%v4int = OpTypeVector %int 4 + %43 = OpTypeFunction %void %_ptr_Function_int + %46 = OpTypeFunction %void %_ptr_Function_int %_ptr_Function_float + %int_1 = OpConstant %int 1 + %float_1 = OpConstant %float 1 + %52 = OpTypeFunction %v4float %_ptr_Function_v2float + %int_0 = OpConstant %int 0 + %v4int = OpTypeVector %int 4 %_ptr_Function_v4int = OpTypePointer Function %v4int -%int_2 = OpConstant %int 2 -%int_3 = OpConstant %int 3 -%int_4 = OpConstant %int 4 -%63 = OpConstantComposite %v4int %int_1 %int_2 %int_3 %int_4 -%v3float = OpTypeVector %float 3 + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 + %int_4 = OpConstant %int 4 + %63 = OpConstantComposite %v4int %int_1 %int_2 %int_3 %int_4 + %v3float = OpTypeVector %float 3 %mat3v3float = OpTypeMatrix %v3float 3 %_ptr_Function_mat3v3float = OpTypePointer Function %mat3v3float -%float_2 = OpConstant %float 2 -%float_3 = OpConstant %float 3 -%float_4 = OpConstant %float 4 -%float_5 = OpConstant %float 5 -%float_6 = OpConstant %float 6 -%float_7 = OpConstant %float 7 -%float_8 = OpConstant %float 8 -%float_9 = OpConstant %float 9 -%76 = OpConstantComposite %v3float %float_1 %float_2 %float_3 -%77 = OpConstantComposite %v3float %float_4 %float_5 %float_6 -%78 = OpConstantComposite %v3float %float_7 %float_8 %float_9 -%79 = OpConstantComposite %mat3v3float %76 %77 %78 + %float_2 = OpConstant %float 2 + %float_3 = OpConstant %float 3 + %float_4 = OpConstant %float 4 + %float_5 = OpConstant %float 5 + %float_6 = OpConstant %float 6 + %float_7 = OpConstant %float 7 + %float_8 = OpConstant %float 8 + %float_9 = OpConstant %float 9 + %76 = OpConstantComposite %v3float %float_1 %float_2 %float_3 + %77 = OpConstantComposite %v3float %float_4 %float_5 %float_6 + %78 = OpConstantComposite %v3float %float_7 %float_8 %float_9 + %79 = OpConstantComposite %mat3v3float %76 %77 %78 %_ptr_Function_v4float = OpTypePointer Function %v4float %_arr_int_int_1 = OpTypeArray %int %int_1 %_ptr_Function__arr_int_int_1 = OpTypePointer Function %_arr_int_int_1 @@ -135,203 +135,203 @@ OpDecorate %200 RelaxedPrecision %_ptr_Function__arr_mat3v3float_int_1 = OpTypePointer Function %_arr_mat3v3float_int_1 %_arr_v4float_int_1 = OpTypeArray %v4float %int_1 %_ptr_Function__arr_v4float_int_1 = OpTypePointer Function %_arr_v4float_int_1 -%102 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %102 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_S = OpTypePointer Function %S -%110 = OpConstantComposite %v3float %float_9 %float_9 %float_9 -%114 = OpConstantComposite %v2float %float_5 %float_5 -%118 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %110 = OpConstantComposite %v3float %float_9 %float_9 %float_9 + %114 = OpConstantComposite %v2float %float_5 %float_5 + %118 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 %_ptr_Private_float = OpTypePointer Private %float %_ptr_Function_v3float = OpTypePointer Function %v3float -%139 = OpConstantComposite %v4float %float_2 %float_2 %float_2 %float_2 + %139 = OpConstantComposite %v4float %float_2 %float_2 %float_2 %float_2 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float %_entrypoint_v = OpFunction %void None %28 -%29 = OpLabel -%33 = OpVariable %_ptr_Function_v2float Function -OpStore %33 %32 -%35 = OpFunctionCall %v4float %main %33 -OpStore %sk_FragColor %35 -OpReturn -OpFunctionEnd + %29 = OpLabel + %33 = OpVariable %_ptr_Function_v2float Function + OpStore %33 %32 + %35 = OpFunctionCall %v4float %main %33 + OpStore %sk_FragColor %35 + OpReturn + OpFunctionEnd %keepAlive_vh = OpFunction %void None %37 -%38 = OpFunctionParameter %_ptr_Function_float -%39 = OpLabel -OpReturn -OpFunctionEnd + %38 = OpFunctionParameter %_ptr_Function_float + %39 = OpLabel + OpReturn + OpFunctionEnd %keepAlive_vf = OpFunction %void None %37 -%40 = OpFunctionParameter %_ptr_Function_float -%41 = OpLabel -OpReturn -OpFunctionEnd + %40 = OpFunctionParameter %_ptr_Function_float + %41 = OpLabel + OpReturn + OpFunctionEnd %keepAlive_vi = OpFunction %void None %43 -%44 = OpFunctionParameter %_ptr_Function_int -%45 = OpLabel -OpReturn -OpFunctionEnd + %44 = OpFunctionParameter %_ptr_Function_int + %45 = OpLabel + OpReturn + OpFunctionEnd %assignToFunctionParameter_vif = OpFunction %void None %46 -%47 = OpFunctionParameter %_ptr_Function_int -%48 = OpFunctionParameter %_ptr_Function_float -%49 = OpLabel -OpStore %47 %int_1 -OpStore %48 %float_1 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %52 -%53 = OpFunctionParameter %_ptr_Function_v2float -%54 = OpLabel -%i = OpVariable %_ptr_Function_int Function -%i4 = OpVariable %_ptr_Function_v4int Function -%f3x3 = OpVariable %_ptr_Function_mat3v3float Function -%x = OpVariable %_ptr_Function_v4float Function -%ai = OpVariable %_ptr_Function__arr_int_int_1 Function -%ai4 = OpVariable %_ptr_Function__arr_v4int_int_1 Function -%ah3x3 = OpVariable %_ptr_Function__arr_mat3v3float_int_1 Function -%af4 = OpVariable %_ptr_Function__arr_v4float_int_1 Function -%s = OpVariable %_ptr_Function_S Function -%121 = OpVariable %_ptr_Function_int Function -%126 = OpVariable %_ptr_Function_float Function -%l = OpVariable %_ptr_Function_float Function -%repeat = OpVariable %_ptr_Function_float Function -%145 = OpVariable %_ptr_Function_float Function -%151 = OpVariable %_ptr_Function_float Function -%155 = OpVariable %_ptr_Function_int Function -%160 = OpVariable %_ptr_Function_int Function -%165 = OpVariable %_ptr_Function_int Function -%171 = OpVariable %_ptr_Function_int Function -%176 = OpVariable %_ptr_Function_float Function -%181 = OpVariable %_ptr_Function_float Function -%185 = OpVariable %_ptr_Function_float Function -%191 = OpVariable %_ptr_Function_float Function -%195 = OpVariable %_ptr_Function_float Function -OpStore %i %int_0 -OpStore %i4 %63 -OpStore %f3x3 %79 -%82 = OpAccessChain %_ptr_Function_float %x %int_3 -OpStore %82 %float_0 -%83 = OpLoad %v4float %x -%84 = OpVectorShuffle %v4float %83 %32 5 4 2 3 -OpStore %x %84 -%88 = OpAccessChain %_ptr_Function_int %ai %int_0 -OpStore %88 %int_0 -%92 = OpAccessChain %_ptr_Function_v4int %ai4 %int_0 -OpStore %92 %63 -%96 = OpAccessChain %_ptr_Function_mat3v3float %ah3x3 %int_0 -OpStore %96 %79 -%100 = OpAccessChain %_ptr_Function_v4float %af4 %int_0 -%101 = OpAccessChain %_ptr_Function_float %100 %int_0 -OpStore %101 %float_0 -%103 = OpAccessChain %_ptr_Function_v4float %af4 %int_0 -%104 = OpLoad %v4float %103 -%105 = OpVectorShuffle %v4float %104 %102 6 4 7 5 -OpStore %103 %105 -%108 = OpAccessChain %_ptr_Function_float %s %int_0 -OpStore %108 %float_0 -%109 = OpAccessChain %_ptr_Function_float %s %int_1 %int_1 -OpStore %109 %float_0 -%111 = OpAccessChain %_ptr_Function_v4float %s %int_2 -%112 = OpLoad %v4float %111 -%113 = OpVectorShuffle %v4float %112 %110 5 6 4 3 -OpStore %111 %113 -%115 = OpAccessChain %_ptr_Function_v4float %s %int_3 %int_2 -%116 = OpLoad %v4float %115 -%117 = OpVectorShuffle %v4float %116 %114 0 4 2 5 -OpStore %115 %117 -OpStore %globalVar %118 -%119 = OpAccessChain %_ptr_Private_float %globalStruct %int_0 -OpStore %119 %float_0 -OpStore %121 %int_0 -%122 = OpAccessChain %_ptr_Function_v3float %f3x3 %int_0 -%124 = OpAccessChain %_ptr_Function_float %122 %int_0 -%125 = OpLoad %float %124 -OpStore %126 %125 -%127 = OpFunctionCall %void %assignToFunctionParameter_vif %121 %126 -%128 = OpLoad %float %126 -OpStore %124 %128 -OpStore %l %float_0 -%130 = OpAccessChain %_ptr_Function_int %ai %int_0 -%131 = OpLoad %int %130 -%132 = OpAccessChain %_ptr_Function_v4int %ai4 %int_0 -%133 = OpLoad %v4int %132 -%134 = OpCompositeExtract %int %133 0 -%135 = OpIAdd %int %131 %134 -OpStore %130 %135 -%136 = OpAccessChain %_ptr_Function_float %s %int_0 -OpStore %136 %float_1 -%137 = OpAccessChain %_ptr_Function_float %s %int_1 %int_0 -OpStore %137 %float_2 -%138 = OpAccessChain %_ptr_Function_v4float %s %int_2 -OpStore %138 %102 -%140 = OpAccessChain %_ptr_Function_v4float %s %int_3 %int_0 -OpStore %140 %139 -OpStore %repeat %float_1 -OpStore %repeat %float_1 -%142 = OpAccessChain %_ptr_Function_v4float %af4 %int_0 -%143 = OpAccessChain %_ptr_Function_float %142 %int_0 -%144 = OpLoad %float %143 -OpStore %145 %144 -%146 = OpFunctionCall %void %keepAlive_vf %145 -%147 = OpLoad %float %145 -OpStore %143 %147 -%148 = OpAccessChain %_ptr_Function_v3float %ah3x3 %int_0 %int_0 -%149 = OpAccessChain %_ptr_Function_float %148 %int_0 -%150 = OpLoad %float %149 -OpStore %151 %150 -%152 = OpFunctionCall %void %keepAlive_vh %151 -%153 = OpLoad %float %151 -OpStore %149 %153 -%154 = OpLoad %int %i -OpStore %155 %154 -%156 = OpFunctionCall %void %keepAlive_vi %155 -%157 = OpLoad %int %155 -OpStore %i %157 -%158 = OpAccessChain %_ptr_Function_int %i4 %int_1 -%159 = OpLoad %int %158 -OpStore %160 %159 -%161 = OpFunctionCall %void %keepAlive_vi %160 -%162 = OpLoad %int %160 -OpStore %158 %162 -%163 = OpAccessChain %_ptr_Function_int %ai %int_0 -%164 = OpLoad %int %163 -OpStore %165 %164 -%166 = OpFunctionCall %void %keepAlive_vi %165 -%167 = OpLoad %int %165 -OpStore %163 %167 -%168 = OpAccessChain %_ptr_Function_v4int %ai4 %int_0 -%169 = OpAccessChain %_ptr_Function_int %168 %int_0 -%170 = OpLoad %int %169 -OpStore %171 %170 -%172 = OpFunctionCall %void %keepAlive_vi %171 -%173 = OpLoad %int %171 -OpStore %169 %173 -%174 = OpAccessChain %_ptr_Function_float %x %int_1 -%175 = OpLoad %float %174 -OpStore %176 %175 -%177 = OpFunctionCall %void %keepAlive_vh %176 -%178 = OpLoad %float %176 -OpStore %174 %178 -%179 = OpAccessChain %_ptr_Function_float %s %int_0 -%180 = OpLoad %float %179 -OpStore %181 %180 -%182 = OpFunctionCall %void %keepAlive_vf %181 -%183 = OpLoad %float %181 -OpStore %179 %183 -%184 = OpLoad %float %l -OpStore %185 %184 -%186 = OpFunctionCall %void %keepAlive_vh %185 -%187 = OpLoad %float %185 -OpStore %l %187 -%188 = OpAccessChain %_ptr_Function_v3float %f3x3 %int_0 -%189 = OpAccessChain %_ptr_Function_float %188 %int_0 -%190 = OpLoad %float %189 -OpStore %191 %190 -%192 = OpFunctionCall %void %keepAlive_vf %191 -%193 = OpLoad %float %191 -OpStore %189 %193 -%194 = OpLoad %float %repeat -OpStore %195 %194 -%196 = OpFunctionCall %void %keepAlive_vf %195 -%197 = OpLoad %float %195 -OpStore %repeat %197 -%198 = OpAccessChain %_ptr_Uniform_v4float %23 %int_0 -%200 = OpLoad %v4float %198 -OpReturnValue %200 -OpFunctionEnd + %47 = OpFunctionParameter %_ptr_Function_int + %48 = OpFunctionParameter %_ptr_Function_float + %49 = OpLabel + OpStore %47 %int_1 + OpStore %48 %float_1 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %52 + %53 = OpFunctionParameter %_ptr_Function_v2float + %54 = OpLabel + %i = OpVariable %_ptr_Function_int Function + %i4 = OpVariable %_ptr_Function_v4int Function + %f3x3 = OpVariable %_ptr_Function_mat3v3float Function + %x = OpVariable %_ptr_Function_v4float Function + %ai = OpVariable %_ptr_Function__arr_int_int_1 Function + %ai4 = OpVariable %_ptr_Function__arr_v4int_int_1 Function + %ah3x3 = OpVariable %_ptr_Function__arr_mat3v3float_int_1 Function + %af4 = OpVariable %_ptr_Function__arr_v4float_int_1 Function + %s = OpVariable %_ptr_Function_S Function + %121 = OpVariable %_ptr_Function_int Function + %126 = OpVariable %_ptr_Function_float Function + %l = OpVariable %_ptr_Function_float Function + %repeat = OpVariable %_ptr_Function_float Function + %145 = OpVariable %_ptr_Function_float Function + %151 = OpVariable %_ptr_Function_float Function + %155 = OpVariable %_ptr_Function_int Function + %160 = OpVariable %_ptr_Function_int Function + %165 = OpVariable %_ptr_Function_int Function + %171 = OpVariable %_ptr_Function_int Function + %176 = OpVariable %_ptr_Function_float Function + %181 = OpVariable %_ptr_Function_float Function + %185 = OpVariable %_ptr_Function_float Function + %191 = OpVariable %_ptr_Function_float Function + %195 = OpVariable %_ptr_Function_float Function + OpStore %i %int_0 + OpStore %i4 %63 + OpStore %f3x3 %79 + %82 = OpAccessChain %_ptr_Function_float %x %int_3 + OpStore %82 %float_0 + %83 = OpLoad %v4float %x + %84 = OpVectorShuffle %v4float %83 %32 5 4 2 3 + OpStore %x %84 + %88 = OpAccessChain %_ptr_Function_int %ai %int_0 + OpStore %88 %int_0 + %92 = OpAccessChain %_ptr_Function_v4int %ai4 %int_0 + OpStore %92 %63 + %96 = OpAccessChain %_ptr_Function_mat3v3float %ah3x3 %int_0 + OpStore %96 %79 + %100 = OpAccessChain %_ptr_Function_v4float %af4 %int_0 + %101 = OpAccessChain %_ptr_Function_float %100 %int_0 + OpStore %101 %float_0 + %103 = OpAccessChain %_ptr_Function_v4float %af4 %int_0 + %104 = OpLoad %v4float %103 + %105 = OpVectorShuffle %v4float %104 %102 6 4 7 5 + OpStore %103 %105 + %108 = OpAccessChain %_ptr_Function_float %s %int_0 + OpStore %108 %float_0 + %109 = OpAccessChain %_ptr_Function_float %s %int_1 %int_1 + OpStore %109 %float_0 + %111 = OpAccessChain %_ptr_Function_v4float %s %int_2 + %112 = OpLoad %v4float %111 + %113 = OpVectorShuffle %v4float %112 %110 5 6 4 3 + OpStore %111 %113 + %115 = OpAccessChain %_ptr_Function_v4float %s %int_3 %int_2 + %116 = OpLoad %v4float %115 + %117 = OpVectorShuffle %v4float %116 %114 0 4 2 5 + OpStore %115 %117 + OpStore %globalVar %118 + %119 = OpAccessChain %_ptr_Private_float %globalStruct %int_0 + OpStore %119 %float_0 + OpStore %121 %int_0 + %122 = OpAccessChain %_ptr_Function_v3float %f3x3 %int_0 + %124 = OpAccessChain %_ptr_Function_float %122 %int_0 + %125 = OpLoad %float %124 + OpStore %126 %125 + %127 = OpFunctionCall %void %assignToFunctionParameter_vif %121 %126 + %128 = OpLoad %float %126 + OpStore %124 %128 + OpStore %l %float_0 + %130 = OpAccessChain %_ptr_Function_int %ai %int_0 + %131 = OpLoad %int %130 + %132 = OpAccessChain %_ptr_Function_v4int %ai4 %int_0 + %133 = OpLoad %v4int %132 + %134 = OpCompositeExtract %int %133 0 + %135 = OpIAdd %int %131 %134 + OpStore %130 %135 + %136 = OpAccessChain %_ptr_Function_float %s %int_0 + OpStore %136 %float_1 + %137 = OpAccessChain %_ptr_Function_float %s %int_1 %int_0 + OpStore %137 %float_2 + %138 = OpAccessChain %_ptr_Function_v4float %s %int_2 + OpStore %138 %102 + %140 = OpAccessChain %_ptr_Function_v4float %s %int_3 %int_0 + OpStore %140 %139 + OpStore %repeat %float_1 + OpStore %repeat %float_1 + %142 = OpAccessChain %_ptr_Function_v4float %af4 %int_0 + %143 = OpAccessChain %_ptr_Function_float %142 %int_0 + %144 = OpLoad %float %143 + OpStore %145 %144 + %146 = OpFunctionCall %void %keepAlive_vf %145 + %147 = OpLoad %float %145 + OpStore %143 %147 + %148 = OpAccessChain %_ptr_Function_v3float %ah3x3 %int_0 %int_0 + %149 = OpAccessChain %_ptr_Function_float %148 %int_0 + %150 = OpLoad %float %149 + OpStore %151 %150 + %152 = OpFunctionCall %void %keepAlive_vh %151 + %153 = OpLoad %float %151 + OpStore %149 %153 + %154 = OpLoad %int %i + OpStore %155 %154 + %156 = OpFunctionCall %void %keepAlive_vi %155 + %157 = OpLoad %int %155 + OpStore %i %157 + %158 = OpAccessChain %_ptr_Function_int %i4 %int_1 + %159 = OpLoad %int %158 + OpStore %160 %159 + %161 = OpFunctionCall %void %keepAlive_vi %160 + %162 = OpLoad %int %160 + OpStore %158 %162 + %163 = OpAccessChain %_ptr_Function_int %ai %int_0 + %164 = OpLoad %int %163 + OpStore %165 %164 + %166 = OpFunctionCall %void %keepAlive_vi %165 + %167 = OpLoad %int %165 + OpStore %163 %167 + %168 = OpAccessChain %_ptr_Function_v4int %ai4 %int_0 + %169 = OpAccessChain %_ptr_Function_int %168 %int_0 + %170 = OpLoad %int %169 + OpStore %171 %170 + %172 = OpFunctionCall %void %keepAlive_vi %171 + %173 = OpLoad %int %171 + OpStore %169 %173 + %174 = OpAccessChain %_ptr_Function_float %x %int_1 + %175 = OpLoad %float %174 + OpStore %176 %175 + %177 = OpFunctionCall %void %keepAlive_vh %176 + %178 = OpLoad %float %176 + OpStore %174 %178 + %179 = OpAccessChain %_ptr_Function_float %s %int_0 + %180 = OpLoad %float %179 + OpStore %181 %180 + %182 = OpFunctionCall %void %keepAlive_vf %181 + %183 = OpLoad %float %181 + OpStore %179 %183 + %184 = OpLoad %float %l + OpStore %185 %184 + %186 = OpFunctionCall %void %keepAlive_vh %185 + %187 = OpLoad %float %185 + OpStore %l %187 + %188 = OpAccessChain %_ptr_Function_v3float %f3x3 %int_0 + %189 = OpAccessChain %_ptr_Function_float %188 %int_0 + %190 = OpLoad %float %189 + OpStore %191 %190 + %192 = OpFunctionCall %void %keepAlive_vf %191 + %193 = OpLoad %float %191 + OpStore %189 %193 + %194 = OpLoad %float %repeat + OpStore %195 %194 + %196 = OpFunctionCall %void %keepAlive_vf %195 + %197 = OpLoad %float %195 + OpStore %repeat %197 + %198 = OpAccessChain %_ptr_Uniform_v4float %23 %int_0 + %200 = OpLoad %v4float %198 + OpReturnValue %200 + OpFunctionEnd diff --git a/tests/sksl/shared/Assignment.metal b/tests/sksl/shared/Assignment.metal index 75f0d54af0ae..0b8e8dd95b34 100644 --- a/tests/sksl/shared/Assignment.metal +++ b/tests/sksl/shared/Assignment.metal @@ -19,78 +19,6 @@ struct Globals { half4 globalVar; S globalStruct; }; -void assignToFunctionParameter_vif(int x, thread float& y); -void _skOutParamHelper0_assignToFunctionParameter_vif(int _var0, thread float3x3& f3x3) { - float _var1 = f3x3[0].x; - assignToFunctionParameter_vif(_var0, _var1); - f3x3[0].x = _var1; -} -void keepAlive_vf(thread float& f); -void _skOutParamHelper1_keepAlive_vf(thread array& af4) { - float _var0 = af4[0].x; - keepAlive_vf(_var0); - af4[0].x = _var0; -} -void keepAlive_vh(thread half& h); -void _skOutParamHelper2_keepAlive_vh(thread array& ah3x3) { - half _var0 = ah3x3[0][0].x; - keepAlive_vh(_var0); - ah3x3[0][0].x = _var0; -} -void keepAlive_vi(thread int& i); -void _skOutParamHelper3_keepAlive_vi(thread int& i) { - int _var0 = i; - keepAlive_vi(_var0); - i = _var0; -} -void keepAlive_vi(thread int& i); -void _skOutParamHelper4_keepAlive_vi(thread int4& i4) { - int _var0 = i4.y; - keepAlive_vi(_var0); - i4.y = _var0; -} -void keepAlive_vi(thread int& i); -void _skOutParamHelper5_keepAlive_vi(thread array& ai) { - int _var0 = ai[0]; - keepAlive_vi(_var0); - ai[0] = _var0; -} -void keepAlive_vi(thread int& i); -void _skOutParamHelper6_keepAlive_vi(thread array& ai4) { - int _var0 = ai4[0].x; - keepAlive_vi(_var0); - ai4[0].x = _var0; -} -void keepAlive_vh(thread half& h); -void _skOutParamHelper7_keepAlive_vh(thread half4& x) { - half _var0 = x.y; - keepAlive_vh(_var0); - x.y = _var0; -} -void keepAlive_vf(thread float& f); -void _skOutParamHelper8_keepAlive_vf(thread S& s) { - float _var0 = s.f; - keepAlive_vf(_var0); - s.f = _var0; -} -void keepAlive_vh(thread half& h); -void _skOutParamHelper9_keepAlive_vh(thread half& l) { - half _var0 = l; - keepAlive_vh(_var0); - l = _var0; -} -void keepAlive_vf(thread float& f); -void _skOutParamHelper10_keepAlive_vf(thread float3x3& f3x3) { - float _var0 = f3x3[0].x; - keepAlive_vf(_var0); - f3x3[0].x = _var0; -} -void keepAlive_vf(thread float& f); -void _skOutParamHelper11_keepAlive_vf(thread float& repeat) { - float _var0 = repeat; - keepAlive_vf(_var0); - repeat = _var0; -} void keepAlive_vh(thread half& h) { } void keepAlive_vf(thread float& f) { @@ -106,6 +34,18 @@ fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _unifo (void)_globals; Outputs _out; (void)_out; + float _skTemp0; + float _skTemp1; + half _skTemp2; + int _skTemp3; + int _skTemp4; + int _skTemp5; + int _skTemp6; + half _skTemp7; + float _skTemp8; + half _skTemp9; + float _skTemp10; + float _skTemp11; int i = 0; int4 i4 = int4(1, 2, 3, 4); float3x3 f3x3 = float3x3(float3(1.0, 2.0, 3.0), float3(4.0, 5.0, 6.0), float3(7.0, 8.0, 9.0)); @@ -128,7 +68,7 @@ fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _unifo s.ah4[2].yw = half2(5.0h); _globals.globalVar = half4(0.0h); _globals.globalStruct.f = 0.0; - _skOutParamHelper0_assignToFunctionParameter_vif(0, f3x3); + ((assignToFunctionParameter_vif(0, (_skTemp0 = f3x3[0].x))), (f3x3[0].x = _skTemp0)); half l; l = 0.0h; ai[0] += ai4[0].x; @@ -138,17 +78,17 @@ fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _unifo s.ah4[0] = half4(2.0h); float repeat; repeat = (repeat = 1.0); - _skOutParamHelper1_keepAlive_vf(af4); - _skOutParamHelper2_keepAlive_vh(ah3x3); - _skOutParamHelper3_keepAlive_vi(i); - _skOutParamHelper4_keepAlive_vi(i4); - _skOutParamHelper5_keepAlive_vi(ai); - _skOutParamHelper6_keepAlive_vi(ai4); - _skOutParamHelper7_keepAlive_vh(x); - _skOutParamHelper8_keepAlive_vf(s); - _skOutParamHelper9_keepAlive_vh(l); - _skOutParamHelper10_keepAlive_vf(f3x3); - _skOutParamHelper11_keepAlive_vf(repeat); + ((keepAlive_vf((_skTemp1 = af4[0].x))), (af4[0].x = _skTemp1)); + ((keepAlive_vh((_skTemp2 = ah3x3[0][0].x))), (ah3x3[0][0].x = _skTemp2)); + ((keepAlive_vi((_skTemp3 = i))), (i = _skTemp3)); + ((keepAlive_vi((_skTemp4 = i4.y))), (i4.y = _skTemp4)); + ((keepAlive_vi((_skTemp5 = ai[0]))), (ai[0] = _skTemp5)); + ((keepAlive_vi((_skTemp6 = ai4[0].x))), (ai4[0].x = _skTemp6)); + ((keepAlive_vh((_skTemp7 = x.y))), (x.y = _skTemp7)); + ((keepAlive_vf((_skTemp8 = s.f))), (s.f = _skTemp8)); + ((keepAlive_vh((_skTemp9 = l))), (l = _skTemp9)); + ((keepAlive_vf((_skTemp10 = f3x3[0].x))), (f3x3[0].x = _skTemp10)); + ((keepAlive_vf((_skTemp11 = repeat))), (repeat = _skTemp11)); _out.sk_FragColor = _uniforms.colorGreen; return _out; } diff --git a/tests/sksl/shared/Assignment.skrp b/tests/sksl/shared/Assignment.skrp index ad05ee0287a5..39611e551a36 100644 --- a/tests/sksl/shared/Assignment.skrp +++ b/tests/sksl/shared/Assignment.skrp @@ -1,3 +1,20 @@ +92 instructions + +[immutable slots] +i0 = 0x00000001 (1.401298e-45) +i1 = 0x00000002 (2.802597e-45) +i2 = 0x00000003 (4.203895e-45) +i3 = 0x00000004 (5.605194e-45) +i4 = 0x3F800000 (1.0) +i5 = 0x40000000 (2.0) +i6 = 0x40400000 (3.0) +i7 = 0x40800000 (4.0) +i8 = 0x40A00000 (5.0) +i9 = 0x40C00000 (6.0) +i10 = 0x40E00000 (7.0) +i11 = 0x41000000 (8.0) +i12 = 0x41100000 (9.0) + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true splat_4_constants globalVar = 0 @@ -10,19 +27,10 @@ splat_4_constants globalStruct.ah4[2](2..3), globalStruct.ah4[3](0. splat_4_constants globalStruct.ah4[3](2..3), globalStruct.ah4[4](0..1) = 0 splat_2_constants globalStruct.ah4[4](2..3) = 0 copy_constant i = 0 -copy_constant i4(0) = 0x00000001 (1.401298e-45) -copy_constant i4(1) = 0x00000002 (2.802597e-45) -copy_constant i4(2) = 0x00000003 (4.203895e-45) -copy_constant i4(3) = 0x00000004 (5.605194e-45) -copy_constant f3x3(0) = 0x3F800000 (1.0) -copy_constant f3x3(1) = 0x40000000 (2.0) -copy_constant f3x3(2) = 0x40400000 (3.0) -copy_constant f3x3(3) = 0x40800000 (4.0) -copy_constant f3x3(4) = 0x40A00000 (5.0) -copy_constant f3x3(5) = 0x40C00000 (6.0) -copy_constant f3x3(6) = 0x40E00000 (7.0) -copy_constant f3x3(7) = 0x41000000 (8.0) -copy_constant f3x3(8) = 0x41100000 (9.0) +copy_4_immutables_unmasked i4 = i0..3 [0x00000001 (1.401298e-45), 0x00000002 (2.802597e-45), 0x00000003 (4.203895e-45), 0x00000004 (5.605194e-45)] +copy_4_immutables_unmasked f3x3(0..3) = i4..7 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked f3x3(4..7) = i8..11 [0x40A00000 (5.0), 0x40C00000 (6.0), 0x40E00000 (7.0), 0x41000000 (8.0)] +copy_immutable_unmasked f3x3(8) = i12 [0x41100000 (9.0)] splat_4_constants x = 0 copy_constant x(3) = 0 splat_2_constants $0..1 = 0 @@ -30,22 +38,13 @@ swizzle_copy_2_slots_masked (x(0..1)).yx = Mask($0..1) copy_constant ai[0] = 0 splat_4_constants ai[0], ai4[0](0..2) = 0 copy_constant ai4[0](3) = 0 -copy_constant ai4[0](0) = 0x00000001 (1.401298e-45) -copy_constant ai4[0](1) = 0x00000002 (2.802597e-45) -copy_constant ai4[0](2) = 0x00000003 (4.203895e-45) -copy_constant ai4[0](3) = 0x00000004 (5.605194e-45) +copy_4_immutables_unmasked ai4[0] = i0..3 [0x00000001 (1.401298e-45), 0x00000002 (2.802597e-45), 0x00000003 (4.203895e-45), 0x00000004 (5.605194e-45)] splat_4_constants ah3x3[0](0..3) = 0 splat_4_constants ah3x3[0](4..7) = 0 copy_constant ah3x3[0](8) = 0 -copy_constant ah3x3[0](0) = 0x3F800000 (1.0) -copy_constant ah3x3[0](1) = 0x40000000 (2.0) -copy_constant ah3x3[0](2) = 0x40400000 (3.0) -copy_constant ah3x3[0](3) = 0x40800000 (4.0) -copy_constant ah3x3[0](4) = 0x40A00000 (5.0) -copy_constant ah3x3[0](5) = 0x40C00000 (6.0) -copy_constant ah3x3[0](6) = 0x40E00000 (7.0) -copy_constant ah3x3[0](7) = 0x41000000 (8.0) -copy_constant ah3x3[0](8) = 0x41100000 (9.0) +copy_4_immutables_unmasked ah3x3[0](0..3) = i4..7 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked ah3x3[0](4..7) = i8..11 [0x40A00000 (5.0), 0x40C00000 (6.0), 0x40E00000 (7.0), 0x41000000 (8.0)] +copy_immutable_unmasked ah3x3[0](8) = i12 [0x41100000 (9.0)] splat_4_constants af4[0] = 0 copy_constant af4[0](0) = 0 splat_4_constants $0..3 = 0x3F800000 (1.0) diff --git a/tests/sksl/shared/Assignment.wgsl b/tests/sksl/shared/Assignment.wgsl index 07793c95772f..a5df108bf8a8 100644 --- a/tests/sksl/shared/Assignment.wgsl +++ b/tests/sksl/shared/Assignment.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, diff --git a/tests/sksl/shared/Caps.asm.frag b/tests/sksl/shared/Caps.asm.frag index ac3b97980bb3..ab229b96a202 100644 --- a/tests/sksl/shared/Caps.asm.frag +++ b/tests/sksl/shared/Caps.asm.frag @@ -1,54 +1,54 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %main "main" -OpName %x "x" -OpName %y "y" -OpName %z "z" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %20 RelaxedPrecision -OpDecorate %21 RelaxedPrecision -OpDecorate %22 RelaxedPrecision -OpDecorate %24 RelaxedPrecision -OpDecorate %25 RelaxedPrecision -OpDecorate %26 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %main "main" + OpName %x "x" + OpName %y "y" + OpName %z "z" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %20 RelaxedPrecision + OpDecorate %21 RelaxedPrecision + OpDecorate %22 RelaxedPrecision + OpDecorate %24 RelaxedPrecision + OpDecorate %25 RelaxedPrecision + OpDecorate %26 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%11 = OpTypeFunction %void -%int = OpTypeInt 32 1 + %void = OpTypeVoid + %11 = OpTypeFunction %void + %int = OpTypeInt 32 1 %_ptr_Function_int = OpTypePointer Function %int -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%v3float = OpTypeVector %float 3 -%main = OpFunction %void None %11 -%12 = OpLabel -%x = OpVariable %_ptr_Function_int Function -%y = OpVariable %_ptr_Function_int Function -%z = OpVariable %_ptr_Function_int Function -OpStore %x %int_0 -OpStore %y %int_0 -OpStore %z %int_0 -OpStore %x %int_1 -OpStore %z %int_1 -%20 = OpConvertSToF %float %int_1 -%21 = OpConvertSToF %float %int_0 -%22 = OpConvertSToF %float %int_1 -%24 = OpCompositeConstruct %v3float %20 %21 %22 -%25 = OpLoad %v4float %sk_FragColor -%26 = OpVectorShuffle %v4float %25 %24 4 5 6 3 -OpStore %sk_FragColor %26 -OpReturn -OpFunctionEnd + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %v3float = OpTypeVector %float 3 + %main = OpFunction %void None %11 + %12 = OpLabel + %x = OpVariable %_ptr_Function_int Function + %y = OpVariable %_ptr_Function_int Function + %z = OpVariable %_ptr_Function_int Function + OpStore %x %int_0 + OpStore %y %int_0 + OpStore %z %int_0 + OpStore %x %int_1 + OpStore %z %int_1 + %20 = OpConvertSToF %float %int_1 + %21 = OpConvertSToF %float %int_0 + %22 = OpConvertSToF %float %int_1 + %24 = OpCompositeConstruct %v3float %20 %21 %22 + %25 = OpLoad %v4float %sk_FragColor + %26 = OpVectorShuffle %v4float %25 %24 4 5 6 3 + OpStore %sk_FragColor %26 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/Caps.wgsl b/tests/sksl/shared/Caps.wgsl new file mode 100644 index 000000000000..ff66e0cd8463 --- /dev/null +++ b/tests/sksl/shared/Caps.wgsl @@ -0,0 +1,22 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +fn main(_stageOut: ptr) { + { + var x: i32 = 0; + var y: i32 = 0; + var z: i32 = 0; + x = 1; + z = 1; + (*_stageOut).sk_FragColor = vec4((vec3(f32(x), f32(y), f32(z))), (*_stageOut).sk_FragColor.w).xyzw; + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(&_stageOut); + return _stageOut; +} diff --git a/tests/sksl/shared/CastsRoundTowardZero.asm.frag b/tests/sksl/shared/CastsRoundTowardZero.asm.frag index 3928fcbb13a0..b3d2addb9c1e 100644 --- a/tests/sksl/shared/CastsRoundTowardZero.asm.frag +++ b/tests/sksl/shared/CastsRoundTowardZero.asm.frag @@ -1,81 +1,81 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %ok "ok" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %38 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %ok "ok" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %38 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_bool = OpTypePointer Function %bool -%true = OpConstantTrue %bool + %true = OpConstantTrue %bool %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%ok = OpVariable %_ptr_Function_bool Function -%29 = OpVariable %_ptr_Function_v4float Function -OpStore %ok %true -OpSelectionMerge %33 None -OpBranchConditional %true %31 %32 -%31 = OpLabel -%34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%38 = OpLoad %v4float %34 -OpStore %29 %38 -OpBranch %33 -%32 = OpLabel -%39 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%41 = OpLoad %v4float %39 -OpStore %29 %41 -OpBranch %33 -%33 = OpLabel -%42 = OpLoad %v4float %29 -OpReturnValue %42 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %ok = OpVariable %_ptr_Function_bool Function + %29 = OpVariable %_ptr_Function_v4float Function + OpStore %ok %true + OpSelectionMerge %33 None + OpBranchConditional %true %31 %32 + %31 = OpLabel + %34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %38 = OpLoad %v4float %34 + OpStore %29 %38 + OpBranch %33 + %32 = OpLabel + %39 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %41 = OpLoad %v4float %39 + OpStore %29 %41 + OpBranch %33 + %33 = OpLabel + %42 = OpLoad %v4float %29 + OpReturnValue %42 + OpFunctionEnd diff --git a/tests/sksl/shared/CastsRoundTowardZero.skrp b/tests/sksl/shared/CastsRoundTowardZero.skrp index 7790cf819396..dc6bbf3b9a34 100644 --- a/tests/sksl/shared/CastsRoundTowardZero.skrp +++ b/tests/sksl/shared/CastsRoundTowardZero.skrp @@ -1,10 +1,11 @@ +7 instructions + [immutable slots] -ok = 0xFFFFFFFF +i0 = 0xFFFFFFFF store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true -copy_slot_unmasked $0 = ok -swizzle_4 $0..3 = ($0..3).xxxx +splat_4_constants $0..3 = 0xFFFFFFFF copy_4_uniforms $4..7 = colorRed copy_4_uniforms $8..11 = colorGreen mix_4_ints $0..3 = mix($4..7, $8..11, $0..3) diff --git a/tests/sksl/shared/CastsRoundTowardZero.wgsl b/tests/sksl/shared/CastsRoundTowardZero.wgsl new file mode 100644 index 000000000000..c4c58c90b495 --- /dev/null +++ b/tests/sksl/shared/CastsRoundTowardZero.wgsl @@ -0,0 +1,25 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var ok: bool = true; + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(ok)); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/Clockwise.asm.frag b/tests/sksl/shared/Clockwise.asm.frag index 9238dde59beb..216dbcc4000a 100644 --- a/tests/sksl/shared/Clockwise.asm.frag +++ b/tests/sksl/shared/Clockwise.asm.frag @@ -1,54 +1,54 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %main "main" -OpName %sksl_synthetic_uniforms "sksl_synthetic_uniforms" -OpMemberName %sksl_synthetic_uniforms 0 "u_skRTFlip" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %sksl_synthetic_uniforms 0 Offset 16384 -OpDecorate %sksl_synthetic_uniforms Block -OpDecorate %13 Binding 0 -OpDecorate %13 DescriptorSet 0 -OpDecorate %25 RelaxedPrecision -OpDecorate %30 RelaxedPrecision -OpDecorate %31 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %main "main" + OpName %sksl_synthetic_uniforms "sksl_synthetic_uniforms" + OpMemberName %sksl_synthetic_uniforms 0 "u_skRTFlip" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %sksl_synthetic_uniforms 0 Offset 16384 + OpDecorate %sksl_synthetic_uniforms Block + OpDecorate %13 Binding 0 + OpDecorate %13 DescriptorSet 0 + OpDecorate %25 RelaxedPrecision + OpDecorate %30 RelaxedPrecision + OpDecorate %31 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%11 = OpTypeFunction %void -%v2float = OpTypeVector %float 2 + %void = OpTypeVoid + %11 = OpTypeFunction %void + %v2float = OpTypeVector %float 2 %sksl_synthetic_uniforms = OpTypeStruct %v2float %_ptr_Uniform_sksl_synthetic_uniforms = OpTypePointer Uniform %sksl_synthetic_uniforms -%13 = OpVariable %_ptr_Uniform_sksl_synthetic_uniforms Uniform -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 + %13 = OpVariable %_ptr_Uniform_sksl_synthetic_uniforms Uniform + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 %_ptr_Uniform_v2float = OpTypePointer Uniform %v2float -%float_0 = OpConstant %float 0 -%int_1 = OpConstant %int 1 -%int_n1 = OpConstant %int -1 -%main = OpFunction %void None %11 -%12 = OpLabel -%19 = OpAccessChain %_ptr_Uniform_v2float %13 %int_0 -%21 = OpLoad %v2float %19 -%22 = OpCompositeExtract %float %21 1 -%24 = OpFOrdGreaterThan %bool %22 %float_0 -%25 = OpLoad %bool %sk_Clockwise -%26 = OpLogicalNotEqual %bool %24 %25 -%27 = OpSelect %int %26 %int_1 %int_n1 -%30 = OpConvertSToF %float %27 -%31 = OpCompositeConstruct %v4float %30 %30 %30 %30 -OpStore %sk_FragColor %31 -OpReturn -OpFunctionEnd + %float_0 = OpConstant %float 0 + %int_1 = OpConstant %int 1 + %int_n1 = OpConstant %int -1 + %main = OpFunction %void None %11 + %12 = OpLabel + %19 = OpAccessChain %_ptr_Uniform_v2float %13 %int_0 + %21 = OpLoad %v2float %19 + %22 = OpCompositeExtract %float %21 1 + %24 = OpFOrdGreaterThan %bool %22 %float_0 + %25 = OpLoad %bool %sk_Clockwise + %26 = OpLogicalNotEqual %bool %24 %25 + %27 = OpSelect %int %26 %int_1 %int_n1 + %30 = OpConvertSToF %float %27 + %31 = OpCompositeConstruct %v4float %30 %30 %30 %30 + OpStore %sk_FragColor %31 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/Clockwise.wgsl b/tests/sksl/shared/Clockwise.wgsl new file mode 100644 index 000000000000..9ba7dae2c69b --- /dev/null +++ b/tests/sksl/shared/Clockwise.wgsl @@ -0,0 +1,17 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +fn main(_stageIn: FSIn, _stageOut: ptr) { + { + (*_stageOut).sk_FragColor = vec4(f32(select(-1, 1, _stageIn.sk_Clockwise))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(_stageIn, &_stageOut); + return _stageOut; +} diff --git a/tests/sksl/shared/ClockwiseNoRTFlip.asm.frag b/tests/sksl/shared/ClockwiseNoRTFlip.asm.frag index 0d9a5a631a5d..09dcacf5571d 100644 --- a/tests/sksl/shared/ClockwiseNoRTFlip.asm.frag +++ b/tests/sksl/shared/ClockwiseNoRTFlip.asm.frag @@ -1,36 +1,36 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %13 RelaxedPrecision -OpDecorate %18 RelaxedPrecision -OpDecorate %19 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %13 RelaxedPrecision + OpDecorate %18 RelaxedPrecision + OpDecorate %19 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%11 = OpTypeFunction %void -%int = OpTypeInt 32 1 -%int_1 = OpConstant %int 1 -%int_n1 = OpConstant %int -1 -%main = OpFunction %void None %11 -%12 = OpLabel -%13 = OpLoad %bool %sk_Clockwise -%14 = OpSelect %int %13 %int_1 %int_n1 -%18 = OpConvertSToF %float %14 -%19 = OpCompositeConstruct %v4float %18 %18 %18 %18 -OpStore %sk_FragColor %19 -OpReturn -OpFunctionEnd + %void = OpTypeVoid + %11 = OpTypeFunction %void + %int = OpTypeInt 32 1 + %int_1 = OpConstant %int 1 + %int_n1 = OpConstant %int -1 + %main = OpFunction %void None %11 + %12 = OpLabel + %13 = OpLoad %bool %sk_Clockwise + %14 = OpSelect %int %13 %int_1 %int_n1 + %18 = OpConvertSToF %float %14 + %19 = OpCompositeConstruct %v4float %18 %18 %18 %18 + OpStore %sk_FragColor %19 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/ClockwiseNoRTFlip.wgsl b/tests/sksl/shared/ClockwiseNoRTFlip.wgsl new file mode 100644 index 000000000000..9ba7dae2c69b --- /dev/null +++ b/tests/sksl/shared/ClockwiseNoRTFlip.wgsl @@ -0,0 +1,17 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +fn main(_stageIn: FSIn, _stageOut: ptr) { + { + (*_stageOut).sk_FragColor = vec4(f32(select(-1, 1, _stageIn.sk_Clockwise))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(_stageIn, &_stageOut); + return _stageOut; +} diff --git a/tests/sksl/shared/CommaMixedTypes.asm.frag b/tests/sksl/shared/CommaMixedTypes.asm.frag index fc964240a36b..987ba2642adb 100644 --- a/tests/sksl/shared/CommaMixedTypes.asm.frag +++ b/tests/sksl/shared/CommaMixedTypes.asm.frag @@ -1,106 +1,106 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "unknownInput" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %result "result" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %result RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %51 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %64 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "unknownInput" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %result "result" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %result RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %64 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_float = OpTypePointer Uniform %float -%int = OpTypeInt 32 1 -%int_1 = OpConstant %int 1 + %int = OpTypeInt 32 1 + %int_1 = OpConstant %int 1 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_0 = OpConstant %int 0 + %int_0 = OpConstant %int 0 %_ptr_Function_float = OpTypePointer Function %float -%float_2 = OpConstant %float 2 -%41 = OpConstantComposite %v2float %float_2 %float_2 -%float_3 = OpConstant %float 3 -%v3float = OpTypeVector %float 3 -%48 = OpConstantComposite %v3float %float_3 %float_3 %float_3 -%int_2 = OpConstant %int 2 -%float_4 = OpConstant %float 4 -%55 = OpConstantComposite %v2float %float_4 %float_0 -%56 = OpConstantComposite %v2float %float_0 %float_4 + %float_2 = OpConstant %float 2 + %41 = OpConstantComposite %v2float %float_2 %float_2 + %float_3 = OpConstant %float 3 + %v3float = OpTypeVector %float 3 + %48 = OpConstantComposite %v3float %float_3 %float_3 %float_3 + %int_2 = OpConstant %int 2 + %float_4 = OpConstant %float 4 + %55 = OpConstantComposite %v2float %float_4 %float_0 + %56 = OpConstantComposite %v2float %float_0 %float_4 %mat2v2float = OpTypeMatrix %v2float 2 -%58 = OpConstantComposite %mat2v2float %55 %56 -%int_3 = OpConstant %int 3 + %58 = OpConstantComposite %mat2v2float %55 %56 + %int_3 = OpConstant %int 3 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%result = OpVariable %_ptr_Function_v4float Function -%28 = OpAccessChain %_ptr_Uniform_float %10 %int_1 -%32 = OpLoad %float %28 -%33 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%36 = OpLoad %v4float %33 -%37 = OpCompositeExtract %float %36 0 -%38 = OpAccessChain %_ptr_Function_float %result %int_0 -OpStore %38 %37 -%42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%43 = OpLoad %v4float %42 -%44 = OpCompositeExtract %float %43 1 -%45 = OpAccessChain %_ptr_Function_float %result %int_1 -OpStore %45 %44 -%49 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%50 = OpLoad %v4float %49 -%51 = OpCompositeExtract %float %50 2 -%52 = OpAccessChain %_ptr_Function_float %result %int_2 -OpStore %52 %51 -%59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%60 = OpLoad %v4float %59 -%61 = OpCompositeExtract %float %60 3 -%62 = OpAccessChain %_ptr_Function_float %result %int_3 -OpStore %62 %61 -%64 = OpLoad %v4float %result -OpReturnValue %64 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %result = OpVariable %_ptr_Function_v4float Function + %28 = OpAccessChain %_ptr_Uniform_float %10 %int_1 + %32 = OpLoad %float %28 + %33 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %36 = OpLoad %v4float %33 + %37 = OpCompositeExtract %float %36 0 + %38 = OpAccessChain %_ptr_Function_float %result %int_0 + OpStore %38 %37 + %42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %43 = OpLoad %v4float %42 + %44 = OpCompositeExtract %float %43 1 + %45 = OpAccessChain %_ptr_Function_float %result %int_1 + OpStore %45 %44 + %49 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %50 = OpLoad %v4float %49 + %51 = OpCompositeExtract %float %50 2 + %52 = OpAccessChain %_ptr_Function_float %result %int_2 + OpStore %52 %51 + %59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %60 = OpLoad %v4float %59 + %61 = OpCompositeExtract %float %60 3 + %62 = OpAccessChain %_ptr_Function_float %result %int_3 + OpStore %62 %61 + %64 = OpLoad %v4float %result + OpReturnValue %64 + OpFunctionEnd diff --git a/tests/sksl/shared/CommaMixedTypes.skrp b/tests/sksl/shared/CommaMixedTypes.skrp index 423f9694335d..44187e0e755b 100644 --- a/tests/sksl/shared/CommaMixedTypes.skrp +++ b/tests/sksl/shared/CommaMixedTypes.skrp @@ -1,3 +1,5 @@ +6 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true splat_4_constants result = 0 diff --git a/tests/sksl/shared/CommaMixedTypes.wgsl b/tests/sksl/shared/CommaMixedTypes.wgsl index 9bb89ac2bc47..654073edc225 100644 --- a/tests/sksl/shared/CommaMixedTypes.wgsl +++ b/tests/sksl/shared/CommaMixedTypes.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, diff --git a/tests/sksl/shared/CommaSideEffects.asm.frag b/tests/sksl/shared/CommaSideEffects.asm.frag index b9eac75e2079..c070e5e91257 100644 --- a/tests/sksl/shared/CommaSideEffects.asm.frag +++ b/tests/sksl/shared/CommaSideEffects.asm.frag @@ -1,177 +1,177 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorRed" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorWhite" -OpMemberName %_UniformBuffer 3 "colorBlack" -OpName %_entrypoint_v "_entrypoint_v" -OpName %setToColorBlack_vh4 "setToColorBlack_vh4" -OpName %main "main" -OpName %a "a" -OpName %b "b" -OpName %c "c" -OpName %d "d" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 3 Offset 48 -OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %11 Binding 0 -OpDecorate %11 DescriptorSet 0 -OpDecorate %32 RelaxedPrecision -OpDecorate %a RelaxedPrecision -OpDecorate %b RelaxedPrecision -OpDecorate %c RelaxedPrecision -OpDecorate %d RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %45 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %48 RelaxedPrecision -OpDecorate %51 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %53 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %55 RelaxedPrecision -OpDecorate %58 RelaxedPrecision -OpDecorate %65 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %79 RelaxedPrecision -OpDecorate %88 RelaxedPrecision -OpDecorate %90 RelaxedPrecision -OpDecorate %91 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorRed" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorWhite" + OpMemberName %_UniformBuffer 3 "colorBlack" + OpName %_entrypoint_v "_entrypoint_v" + OpName %setToColorBlack_vh4 "setToColorBlack_vh4" + OpName %main "main" + OpName %a "a" + OpName %b "b" + OpName %c "c" + OpName %d "d" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 3 Offset 48 + OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %11 Binding 0 + OpDecorate %11 DescriptorSet 0 + OpDecorate %32 RelaxedPrecision + OpDecorate %a RelaxedPrecision + OpDecorate %b RelaxedPrecision + OpDecorate %c RelaxedPrecision + OpDecorate %d RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %45 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %48 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %53 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %55 RelaxedPrecision + OpDecorate %58 RelaxedPrecision + OpDecorate %65 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %79 RelaxedPrecision + OpDecorate %88 RelaxedPrecision + OpDecorate %90 RelaxedPrecision + OpDecorate %91 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%16 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%20 = OpConstantComposite %v2float %float_0 %float_0 + %11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %16 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %20 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float %_ptr_Function_v4float = OpTypePointer Function %v4float -%25 = OpTypeFunction %void %_ptr_Function_v4float + %25 = OpTypeFunction %void %_ptr_Function_v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_3 = OpConstant %int 3 -%33 = OpTypeFunction %v4float %_ptr_Function_v2float -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 -%false = OpConstantFalse %bool -%v4bool = OpTypeVector %bool 4 + %int = OpTypeInt 32 1 + %int_3 = OpConstant %int 3 + %33 = OpTypeFunction %v4float %_ptr_Function_v2float + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 + %false = OpConstantFalse %bool + %v4bool = OpTypeVector %bool 4 %_entrypoint_v = OpFunction %void None %16 -%17 = OpLabel -%21 = OpVariable %_ptr_Function_v2float Function -OpStore %21 %20 -%23 = OpFunctionCall %v4float %main %21 -OpStore %sk_FragColor %23 -OpReturn -OpFunctionEnd + %17 = OpLabel + %21 = OpVariable %_ptr_Function_v2float Function + OpStore %21 %20 + %23 = OpFunctionCall %v4float %main %21 + OpStore %sk_FragColor %23 + OpReturn + OpFunctionEnd %setToColorBlack_vh4 = OpFunction %void None %25 -%26 = OpFunctionParameter %_ptr_Function_v4float -%27 = OpLabel -%28 = OpAccessChain %_ptr_Uniform_v4float %11 %int_3 -%32 = OpLoad %v4float %28 -OpStore %26 %32 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %33 -%34 = OpFunctionParameter %_ptr_Function_v2float -%35 = OpLabel -%a = OpVariable %_ptr_Function_v4float Function -%b = OpVariable %_ptr_Function_v4float Function -%c = OpVariable %_ptr_Function_v4float Function -%d = OpVariable %_ptr_Function_v4float Function -%46 = OpVariable %_ptr_Function_v4float Function -%83 = OpVariable %_ptr_Function_v4float Function -%40 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 -%42 = OpLoad %v4float %40 -OpStore %b %42 -%43 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 -%45 = OpLoad %v4float %43 -OpStore %c %45 -%47 = OpFunctionCall %void %setToColorBlack_vh4 %46 -%48 = OpLoad %v4float %46 -OpStore %d %48 -%49 = OpAccessChain %_ptr_Uniform_v4float %11 %int_2 -%51 = OpLoad %v4float %49 -OpStore %a %51 -%52 = OpFMul %v4float %51 %51 -OpStore %a %52 -%53 = OpFMul %v4float %42 %42 -OpStore %b %53 -%54 = OpFMul %v4float %45 %45 -OpStore %c %54 -%55 = OpFMul %v4float %48 %48 -OpStore %d %55 -%57 = OpAccessChain %_ptr_Uniform_v4float %11 %int_2 -%58 = OpLoad %v4float %57 -%59 = OpFOrdEqual %v4bool %52 %58 -%61 = OpAll %bool %59 -OpSelectionMerge %63 None -OpBranchConditional %61 %62 %63 -%62 = OpLabel -%64 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 -%65 = OpLoad %v4float %64 -%66 = OpFOrdEqual %v4bool %53 %65 -%67 = OpAll %bool %66 -OpBranch %63 -%63 = OpLabel -%68 = OpPhi %bool %false %35 %67 %62 -OpSelectionMerge %70 None -OpBranchConditional %68 %69 %70 -%69 = OpLabel -%71 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 -%72 = OpLoad %v4float %71 -%73 = OpFOrdEqual %v4bool %54 %72 -%74 = OpAll %bool %73 -OpBranch %70 -%70 = OpLabel -%75 = OpPhi %bool %false %63 %74 %69 -OpSelectionMerge %77 None -OpBranchConditional %75 %76 %77 -%76 = OpLabel -%78 = OpAccessChain %_ptr_Uniform_v4float %11 %int_3 -%79 = OpLoad %v4float %78 -%80 = OpFOrdEqual %v4bool %55 %79 -%81 = OpAll %bool %80 -OpBranch %77 -%77 = OpLabel -%82 = OpPhi %bool %false %70 %81 %76 -OpSelectionMerge %86 None -OpBranchConditional %82 %84 %85 -%84 = OpLabel -%87 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 -%88 = OpLoad %v4float %87 -OpStore %83 %88 -OpBranch %86 -%85 = OpLabel -%89 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 -%90 = OpLoad %v4float %89 -OpStore %83 %90 -OpBranch %86 -%86 = OpLabel -%91 = OpLoad %v4float %83 -OpReturnValue %91 -OpFunctionEnd + %26 = OpFunctionParameter %_ptr_Function_v4float + %27 = OpLabel + %28 = OpAccessChain %_ptr_Uniform_v4float %11 %int_3 + %32 = OpLoad %v4float %28 + OpStore %26 %32 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %33 + %34 = OpFunctionParameter %_ptr_Function_v2float + %35 = OpLabel + %a = OpVariable %_ptr_Function_v4float Function + %b = OpVariable %_ptr_Function_v4float Function + %c = OpVariable %_ptr_Function_v4float Function + %d = OpVariable %_ptr_Function_v4float Function + %46 = OpVariable %_ptr_Function_v4float Function + %83 = OpVariable %_ptr_Function_v4float Function + %40 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 + %42 = OpLoad %v4float %40 + OpStore %b %42 + %43 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 + %45 = OpLoad %v4float %43 + OpStore %c %45 + %47 = OpFunctionCall %void %setToColorBlack_vh4 %46 + %48 = OpLoad %v4float %46 + OpStore %d %48 + %49 = OpAccessChain %_ptr_Uniform_v4float %11 %int_2 + %51 = OpLoad %v4float %49 + OpStore %a %51 + %52 = OpFMul %v4float %51 %51 + OpStore %a %52 + %53 = OpFMul %v4float %42 %42 + OpStore %b %53 + %54 = OpFMul %v4float %45 %45 + OpStore %c %54 + %55 = OpFMul %v4float %48 %48 + OpStore %d %55 + %57 = OpAccessChain %_ptr_Uniform_v4float %11 %int_2 + %58 = OpLoad %v4float %57 + %59 = OpFOrdEqual %v4bool %52 %58 + %61 = OpAll %bool %59 + OpSelectionMerge %63 None + OpBranchConditional %61 %62 %63 + %62 = OpLabel + %64 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 + %65 = OpLoad %v4float %64 + %66 = OpFOrdEqual %v4bool %53 %65 + %67 = OpAll %bool %66 + OpBranch %63 + %63 = OpLabel + %68 = OpPhi %bool %false %35 %67 %62 + OpSelectionMerge %70 None + OpBranchConditional %68 %69 %70 + %69 = OpLabel + %71 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 + %72 = OpLoad %v4float %71 + %73 = OpFOrdEqual %v4bool %54 %72 + %74 = OpAll %bool %73 + OpBranch %70 + %70 = OpLabel + %75 = OpPhi %bool %false %63 %74 %69 + OpSelectionMerge %77 None + OpBranchConditional %75 %76 %77 + %76 = OpLabel + %78 = OpAccessChain %_ptr_Uniform_v4float %11 %int_3 + %79 = OpLoad %v4float %78 + %80 = OpFOrdEqual %v4bool %55 %79 + %81 = OpAll %bool %80 + OpBranch %77 + %77 = OpLabel + %82 = OpPhi %bool %false %70 %81 %76 + OpSelectionMerge %86 None + OpBranchConditional %82 %84 %85 + %84 = OpLabel + %87 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 + %88 = OpLoad %v4float %87 + OpStore %83 %88 + OpBranch %86 + %85 = OpLabel + %89 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 + %90 = OpLoad %v4float %89 + OpStore %83 %90 + OpBranch %86 + %86 = OpLabel + %91 = OpLoad %v4float %83 + OpReturnValue %91 + OpFunctionEnd diff --git a/tests/sksl/shared/CommaSideEffects.metal b/tests/sksl/shared/CommaSideEffects.metal index 1da9344a1222..5a3e303d032f 100644 --- a/tests/sksl/shared/CommaSideEffects.metal +++ b/tests/sksl/shared/CommaSideEffects.metal @@ -12,24 +12,19 @@ struct Inputs { struct Outputs { half4 sk_FragColor [[color(0)]]; }; -void setToColorBlack_vh4(Uniforms _uniforms, thread half4& x); -void _skOutParamHelper0_setToColorBlack_vh4(Uniforms _uniforms, thread half4& d) { - half4 _var0; - setToColorBlack_vh4(_uniforms, _var0); - d = _var0; -} void setToColorBlack_vh4(Uniforms _uniforms, thread half4& x) { x = _uniforms.colorBlack; } fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) { Outputs _out; (void)_out; + half4 _skTemp0; half4 a; half4 b; half4 c; half4 d; b = _uniforms.colorRed, c = _uniforms.colorGreen; - a = ( _skOutParamHelper0_setToColorBlack_vh4(_uniforms, d), _uniforms.colorWhite); + a = (((setToColorBlack_vh4(_uniforms, _skTemp0)), (d = _skTemp0)), _uniforms.colorWhite); a *= a; b *= b; c *= c; diff --git a/tests/sksl/shared/CommaSideEffects.skrp b/tests/sksl/shared/CommaSideEffects.skrp index 79888ac5cbb9..7e066f402fec 100644 --- a/tests/sksl/shared/CommaSideEffects.skrp +++ b/tests/sksl/shared/CommaSideEffects.skrp @@ -1,3 +1,5 @@ +55 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true splat_4_constants a = 0 diff --git a/tests/sksl/shared/CommaSideEffects.wgsl b/tests/sksl/shared/CommaSideEffects.wgsl index c280e5e4755b..e1a59f3dabba 100644 --- a/tests/sksl/shared/CommaSideEffects.wgsl +++ b/tests/sksl/shared/CommaSideEffects.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, diff --git a/tests/sksl/shared/CompileTimeConstantVariables.asm.frag b/tests/sksl/shared/CompileTimeConstantVariables.asm.frag index 42d9885f04ac..bbe4e2a3dda2 100644 --- a/tests/sksl/shared/CompileTimeConstantVariables.asm.frag +++ b/tests/sksl/shared/CompileTimeConstantVariables.asm.frag @@ -1,129 +1,129 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %integerInput "integerInput" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %58 RelaxedPrecision -OpDecorate %59 RelaxedPrecision -OpDecorate %67 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %integerInput "integerInput" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %58 RelaxedPrecision + OpDecorate %59 RelaxedPrecision + OpDecorate %67 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%int = OpTypeInt 32 1 + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %int = OpTypeInt 32 1 %_ptr_Function_int = OpTypePointer Function %int %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_0 = OpConstant %int 0 + %int_0 = OpConstant %int 0 %float_2_1400001 = OpConstant %float 2.1400001 -%40 = OpConstantComposite %v4float %float_2_1400001 %float_2_1400001 %float_2_1400001 %float_2_1400001 -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 -%float_1 = OpConstant %float 1 + %40 = OpConstantComposite %v4float %float_2_1400001 %float_2_1400001 %float_2_1400001 %float_2_1400001 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 + %float_1 = OpConstant %float 1 %float_0_200000003 = OpConstant %float 0.200000003 -%55 = OpConstantComposite %v4float %float_1 %float_0_200000003 %float_2_1400001 %float_1 + %55 = OpConstantComposite %v4float %float_1 %float_0_200000003 %float_2_1400001 %float_1 %float_3_1400001 = OpConstant %float 3.1400001 -%65 = OpConstantComposite %v4float %float_3_1400001 %float_3_1400001 %float_3_1400001 %float_3_1400001 -%74 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 -%75 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1 + %65 = OpConstantComposite %v4float %float_3_1400001 %float_3_1400001 %float_3_1400001 %float_3_1400001 + %74 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %75 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel %integerInput = OpVariable %_ptr_Function_int Function -%29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %29 -%33 = OpCompositeExtract %float %32 1 -%34 = OpConvertFToS %int %33 -OpStore %integerInput %34 -%35 = OpIEqual %bool %34 %int_0 -OpSelectionMerge %38 None -OpBranchConditional %35 %36 %37 -%36 = OpLabel -OpReturnValue %40 -%37 = OpLabel -%42 = OpIEqual %bool %34 %int_1 -OpSelectionMerge %45 None -OpBranchConditional %42 %43 %44 -%43 = OpLabel -%46 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%47 = OpLoad %v4float %46 -OpReturnValue %47 -%44 = OpLabel -%49 = OpIEqual %bool %34 %int_2 -OpSelectionMerge %52 None -OpBranchConditional %49 %50 %51 -%50 = OpLabel -OpReturnValue %55 -%51 = OpLabel -%57 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%58 = OpLoad %v4float %57 -%59 = OpCompositeExtract %float %58 0 -%60 = OpFMul %float %59 %float_3_1400001 -%61 = OpFOrdLessThan %bool %float_3_1400001 %60 -OpSelectionMerge %64 None -OpBranchConditional %61 %62 %63 -%62 = OpLabel -OpReturnValue %65 -%63 = OpLabel -%66 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%67 = OpLoad %v4float %66 -%68 = OpCompositeExtract %float %67 0 -%69 = OpFMul %float %68 %float_2_1400001 -%70 = OpFOrdGreaterThanEqual %bool %float_2_1400001 %69 -OpSelectionMerge %73 None -OpBranchConditional %70 %71 %72 -%71 = OpLabel -OpReturnValue %74 -%72 = OpLabel -OpReturnValue %75 -%73 = OpLabel -OpBranch %64 -%64 = OpLabel -OpBranch %52 -%52 = OpLabel -OpBranch %45 -%45 = OpLabel -OpBranch %38 -%38 = OpLabel -OpUnreachable -OpFunctionEnd + %29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %29 + %33 = OpCompositeExtract %float %32 1 + %34 = OpConvertFToS %int %33 + OpStore %integerInput %34 + %35 = OpIEqual %bool %34 %int_0 + OpSelectionMerge %38 None + OpBranchConditional %35 %36 %37 + %36 = OpLabel + OpReturnValue %40 + %37 = OpLabel + %42 = OpIEqual %bool %34 %int_1 + OpSelectionMerge %45 None + OpBranchConditional %42 %43 %44 + %43 = OpLabel + %46 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %47 = OpLoad %v4float %46 + OpReturnValue %47 + %44 = OpLabel + %49 = OpIEqual %bool %34 %int_2 + OpSelectionMerge %52 None + OpBranchConditional %49 %50 %51 + %50 = OpLabel + OpReturnValue %55 + %51 = OpLabel + %57 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %58 = OpLoad %v4float %57 + %59 = OpCompositeExtract %float %58 0 + %60 = OpFMul %float %59 %float_3_1400001 + %61 = OpFOrdLessThan %bool %float_3_1400001 %60 + OpSelectionMerge %64 None + OpBranchConditional %61 %62 %63 + %62 = OpLabel + OpReturnValue %65 + %63 = OpLabel + %66 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %67 = OpLoad %v4float %66 + %68 = OpCompositeExtract %float %67 0 + %69 = OpFMul %float %68 %float_2_1400001 + %70 = OpFOrdGreaterThanEqual %bool %float_2_1400001 %69 + OpSelectionMerge %73 None + OpBranchConditional %70 %71 %72 + %71 = OpLabel + OpReturnValue %74 + %72 = OpLabel + OpReturnValue %75 + %73 = OpLabel + OpBranch %64 + %64 = OpLabel + OpBranch %52 + %52 = OpLabel + OpBranch %45 + %45 = OpLabel + OpBranch %38 + %38 = OpLabel + OpUnreachable + OpFunctionEnd diff --git a/tests/sksl/shared/CompileTimeConstantVariables.skrp b/tests/sksl/shared/CompileTimeConstantVariables.skrp index f792bc5a6422..00633ce0732e 100644 --- a/tests/sksl/shared/CompileTimeConstantVariables.skrp +++ b/tests/sksl/shared/CompileTimeConstantVariables.skrp @@ -1,15 +1,19 @@ +47 instructions + [immutable slots] -kConstant = 0 -kOtherConstant = 0x00000001 (1.401298e-45) -kAnotherConstant = 0x00000002 (2.802597e-45) -kFloatConstant = 0x4008F5C3 (2.14) -kFloatConstantAlias = 0x4008F5C3 (2.14) -kConstVec(0) = 0x3F800000 (1.0) -kConstVec(1) = 0x3E4CCCCD (0.2) -kConstVec(2) = 0x4008F5C3 (2.14) -kConstVec(3) = 0x3F800000 (1.0) -kLocalFloatConstant = 0x4048F5C3 (3.14) -kLocalFloatConstantAlias = 0x4048F5C3 (3.14) +i0 = 0 +i1 = 0x00000001 (1.401298e-45) +i2 = 0x00000002 (2.802597e-45) +i3 = 0x4008F5C3 (2.14) +i4 = 0x3F800000 (1.0) +i5 = 0x3E4CCCCD (0.2) +i6 = 0x4008F5C3 (2.14) +i7 = 0x3F800000 (1.0) +i8 = 0x4048F5C3 (3.14) +i9 = 0x3F800000 (1.0) +i10 = 0 +i11 = 0 +i12 = 0x3F800000 (1.0) store_src_rg v0..1 = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -34,7 +38,7 @@ store_condition_mask $4 = CondMask copy_slot_unmasked $5 = integerInput cmpeq_imm_int $5 = equal($5, 0x00000002) merge_condition_mask CondMask = $4 & $5 -copy_4_slots_unmasked $6..9 = kConstVec +copy_4_immutables_unmasked $6..9 = i4..7 [0x3F800000 (1.0), 0x3E4CCCCD (0.2), 0x4008F5C3 (2.14), 0x3F800000 (1.0)] copy_4_slots_masked [main].result = Mask($6..9) merge_inv_condition_mask CondMask = $4 & ~$5 copy_constant $6 = 0x4048F5C3 (3.14) @@ -44,7 +48,7 @@ cmplt_float $6 = lessThan($6, $7) branch_if_no_active_lanes_eq branch +4 (label 0 at #35) if no lanes of $6 == 0xFFFFFFFF splat_4_constants $7..10 = 0x4048F5C3 (3.14) copy_4_slots_masked [main].result = Mask($7..10) -jump jump +15 (label 1 at #49) +jump jump +13 (label 1 at #47) label label 0 copy_uniform $7 = colorGreen(0) mul_imm_float $7 *= 0x4008F5C3 (2.14) @@ -52,11 +56,9 @@ cmple_imm_float $7 = lessThanEqual($7, 0x4008F5C3 (2.14)) branch_if_no_active_lanes_eq branch +4 (label 2 at #43) if no lanes of $7 == 0xFFFFFFFF splat_4_constants $8..11 = 0 copy_4_slots_masked [main].result = Mask($8..11) -jump jump +6 (label 3 at #48) +jump jump +4 (label 3 at #46) label label 0x00000002 -copy_constant $8 = 0x3F800000 (1.0) -splat_2_constants $9..10 = 0 -copy_constant $11 = 0x3F800000 (1.0) +copy_4_immutables_unmasked $8..11 = i9..12 [0x3F800000 (1.0), 0, 0, 0x3F800000 (1.0)] copy_4_slots_masked [main].result = Mask($8..11) label label 0x00000003 label label 0x00000001 diff --git a/tests/sksl/shared/CompileTimeConstantVariables.wgsl b/tests/sksl/shared/CompileTimeConstantVariables.wgsl new file mode 100644 index 000000000000..38eaf71a3383 --- /dev/null +++ b/tests/sksl/shared/CompileTimeConstantVariables.wgsl @@ -0,0 +1,72 @@ +/* + +:58:3 warning: code is unreachable + return vec4(); + ^^^^^^ + +*/ + +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +const kConstant: i32 = 0; +const kOtherConstant: i32 = 1; +const kAnotherConstant: i32 = 2; +const kFloatConstant: f32 = 2.14; +const kFloatConstantAlias: f32 = kFloatConstant; +const kConstVec: vec4 = vec4(1.0, 0.2, 2.14, 1.0); +fn main(_skParam0: vec2) -> vec4 { + { + const kLocalFloatConstant: f32 = 3.14; + let kLocalFloatConstantAlias: f32 = kLocalFloatConstant; + var integerInput: i32 = i32(_globalUniforms.colorGreen.y); + if integerInput == kConstant { + { + return vec4(2.14); + } + } else { + if integerInput == kOtherConstant { + { + return _globalUniforms.colorGreen; + } + } else { + if integerInput == kAnotherConstant { + { + return kConstVec; + } + } else { + if kLocalFloatConstantAlias < (f32(_globalUniforms.colorGreen.x) * kLocalFloatConstant) { + { + return vec4(3.14); + } + } else { + if kFloatConstantAlias >= (f32(_globalUniforms.colorGreen.x) * kFloatConstantAlias) { + { + return vec4(0.0); + } + } else { + { + return vec4(1.0, 0.0, 0.0, 1.0); + } + } + } + } + } + } + } + return vec4(); +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/ComplexDelete.asm.frag b/tests/sksl/shared/ComplexDelete.asm.frag index e022f70c98a3..16a06f9afd16 100644 --- a/tests/sksl/shared/ComplexDelete.asm.frag +++ b/tests/sksl/shared/ComplexDelete.asm.frag @@ -1,112 +1,112 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %s "s" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorXform" -OpName %main "main" -OpName %tmpColor "tmpColor" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %s RelaxedPrecision -OpDecorate %s Binding 0 -OpDecorate %s DescriptorSet 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 ColMajor -OpMemberDecorate %_UniformBuffer 0 MatrixStride 16 -OpDecorate %_UniformBuffer Block -OpDecorate %14 Binding 0 -OpDecorate %14 DescriptorSet 0 -OpDecorate %24 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %s "s" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorXform" + OpName %main "main" + OpName %tmpColor "tmpColor" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %s RelaxedPrecision + OpDecorate %s Binding 0 + OpDecorate %s DescriptorSet 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 ColMajor + OpMemberDecorate %_UniformBuffer 0 MatrixStride 16 + OpDecorate %_UniformBuffer Block + OpDecorate %14 Binding 0 + OpDecorate %14 DescriptorSet 0 + OpDecorate %24 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%11 = OpTypeImage %float 2D 0 0 0 1 Unknown -%12 = OpTypeSampledImage %11 + %11 = OpTypeImage %float 2D 0 0 0 1 Unknown + %12 = OpTypeSampledImage %11 %_ptr_UniformConstant_12 = OpTypePointer UniformConstant %12 -%s = OpVariable %_ptr_UniformConstant_12 UniformConstant + %s = OpVariable %_ptr_UniformConstant_12 UniformConstant %mat4v4float = OpTypeMatrix %v4float 4 %_UniformBuffer = OpTypeStruct %mat4v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%14 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%19 = OpTypeFunction %void + %14 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %19 = OpTypeFunction %void %_ptr_Function_v4float = OpTypePointer Function %v4float -%float_1 = OpConstant %float 1 -%v2float = OpTypeVector %float 2 -%27 = OpConstantComposite %v2float %float_1 %float_1 + %float_1 = OpConstant %float 1 + %v2float = OpTypeVector %float 2 + %27 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Uniform_mat4v4float = OpTypePointer Uniform %mat4v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%float_0 = OpConstant %float 0 -%34 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_0 -%35 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_0 -%36 = OpConstantComposite %v4float %float_0 %float_0 %float_1 %float_0 -%37 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_1 -%38 = OpConstantComposite %mat4v4float %34 %35 %36 %37 -%v4bool = OpTypeVector %bool 4 -%v3float = OpTypeVector %float 3 -%70 = OpConstantComposite %v3float %float_0 %float_0 %float_0 -%main = OpFunction %void None %19 -%20 = OpLabel -%tmpColor = OpVariable %_ptr_Function_v4float Function -%55 = OpVariable %_ptr_Function_v4float Function -%24 = OpLoad %12 %s -%23 = OpImageSampleImplicitLod %v4float %24 %27 -OpStore %tmpColor %23 -%28 = OpAccessChain %_ptr_Uniform_mat4v4float %14 %int_0 -%32 = OpLoad %mat4v4float %28 -%40 = OpCompositeExtract %v4float %32 0 -%41 = OpFUnordNotEqual %v4bool %40 %34 -%42 = OpAny %bool %41 -%43 = OpCompositeExtract %v4float %32 1 -%44 = OpFUnordNotEqual %v4bool %43 %35 -%45 = OpAny %bool %44 -%46 = OpLogicalOr %bool %42 %45 -%47 = OpCompositeExtract %v4float %32 2 -%48 = OpFUnordNotEqual %v4bool %47 %36 -%49 = OpAny %bool %48 -%50 = OpLogicalOr %bool %46 %49 -%51 = OpCompositeExtract %v4float %32 3 -%52 = OpFUnordNotEqual %v4bool %51 %37 -%53 = OpAny %bool %52 -%54 = OpLogicalOr %bool %50 %53 -OpSelectionMerge %58 None -OpBranchConditional %54 %56 %57 -%56 = OpLabel -%60 = OpAccessChain %_ptr_Uniform_mat4v4float %14 %int_0 -%61 = OpLoad %mat4v4float %60 -%62 = OpVectorShuffle %v3float %23 %23 0 1 2 -%64 = OpCompositeExtract %float %62 0 -%65 = OpCompositeExtract %float %62 1 -%66 = OpCompositeExtract %float %62 2 -%67 = OpCompositeConstruct %v4float %64 %65 %66 %float_1 -%68 = OpMatrixTimesVector %v4float %61 %67 -%69 = OpVectorShuffle %v3float %68 %68 0 1 2 -%71 = OpCompositeExtract %float %23 3 -%72 = OpCompositeConstruct %v3float %71 %71 %71 -%59 = OpExtInst %v3float %1 FClamp %69 %70 %72 -%73 = OpCompositeExtract %float %59 0 -%74 = OpCompositeExtract %float %59 1 -%75 = OpCompositeExtract %float %59 2 -%76 = OpCompositeConstruct %v4float %73 %74 %75 %71 -OpStore %55 %76 -OpBranch %58 -%57 = OpLabel -OpStore %55 %23 -OpBranch %58 -%58 = OpLabel -%77 = OpLoad %v4float %55 -OpStore %sk_FragColor %77 -OpReturn -OpFunctionEnd + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %float_0 = OpConstant %float 0 + %34 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_0 + %35 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_0 + %36 = OpConstantComposite %v4float %float_0 %float_0 %float_1 %float_0 + %37 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_1 + %38 = OpConstantComposite %mat4v4float %34 %35 %36 %37 + %v4bool = OpTypeVector %bool 4 + %v3float = OpTypeVector %float 3 + %70 = OpConstantComposite %v3float %float_0 %float_0 %float_0 + %main = OpFunction %void None %19 + %20 = OpLabel + %tmpColor = OpVariable %_ptr_Function_v4float Function + %55 = OpVariable %_ptr_Function_v4float Function + %24 = OpLoad %12 %s + %23 = OpImageSampleImplicitLod %v4float %24 %27 + OpStore %tmpColor %23 + %28 = OpAccessChain %_ptr_Uniform_mat4v4float %14 %int_0 + %32 = OpLoad %mat4v4float %28 + %40 = OpCompositeExtract %v4float %32 0 + %41 = OpFUnordNotEqual %v4bool %40 %34 + %42 = OpAny %bool %41 + %43 = OpCompositeExtract %v4float %32 1 + %44 = OpFUnordNotEqual %v4bool %43 %35 + %45 = OpAny %bool %44 + %46 = OpLogicalOr %bool %42 %45 + %47 = OpCompositeExtract %v4float %32 2 + %48 = OpFUnordNotEqual %v4bool %47 %36 + %49 = OpAny %bool %48 + %50 = OpLogicalOr %bool %46 %49 + %51 = OpCompositeExtract %v4float %32 3 + %52 = OpFUnordNotEqual %v4bool %51 %37 + %53 = OpAny %bool %52 + %54 = OpLogicalOr %bool %50 %53 + OpSelectionMerge %58 None + OpBranchConditional %54 %56 %57 + %56 = OpLabel + %60 = OpAccessChain %_ptr_Uniform_mat4v4float %14 %int_0 + %61 = OpLoad %mat4v4float %60 + %62 = OpVectorShuffle %v3float %23 %23 0 1 2 + %64 = OpCompositeExtract %float %62 0 + %65 = OpCompositeExtract %float %62 1 + %66 = OpCompositeExtract %float %62 2 + %67 = OpCompositeConstruct %v4float %64 %65 %66 %float_1 + %68 = OpMatrixTimesVector %v4float %61 %67 + %69 = OpVectorShuffle %v3float %68 %68 0 1 2 + %71 = OpCompositeExtract %float %23 3 + %72 = OpCompositeConstruct %v3float %71 %71 %71 + %59 = OpExtInst %v3float %1 FClamp %69 %70 %72 + %73 = OpCompositeExtract %float %59 0 + %74 = OpCompositeExtract %float %59 1 + %75 = OpCompositeExtract %float %59 2 + %76 = OpCompositeConstruct %v4float %73 %74 %75 %71 + OpStore %55 %76 + OpBranch %58 + %57 = OpLabel + OpStore %55 %23 + OpBranch %58 + %58 = OpLabel + %77 = OpLoad %v4float %55 + OpStore %sk_FragColor %77 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/ComplexDelete.wgsl b/tests/sksl/shared/ComplexDelete.wgsl new file mode 100644 index 000000000000..c689f1ec6d81 --- /dev/null +++ b/tests/sksl/shared/ComplexDelete.wgsl @@ -0,0 +1,27 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorXform: mat4x4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +@group(0) @binding(10000) var s_Sampler: sampler; +@group(0) @binding(10001) var s_Texture: texture_2d; +fn main(_stageOut: ptr) { + { + var tmpColor: vec4; + tmpColor = vec4(textureSample(s_Texture, s_Sampler, vec2(1.0))); + let _skTemp2 = clamp((_globalUniforms.colorXform * vec4(tmpColor.xyz, 1.0)).xyz, vec3(0.0), vec3(tmpColor.w)); + let _skTemp3 = mat4x4(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0); + (*_stageOut).sk_FragColor = vec4(select(tmpColor, vec4(_skTemp2, tmpColor.w), vec4((any(_globalUniforms.colorXform[0] != _skTemp3[0]) || any(_globalUniforms.colorXform[1] != _skTemp3[1]) || any(_globalUniforms.colorXform[2] != _skTemp3[2]) || any(_globalUniforms.colorXform[3] != _skTemp3[3]))))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(&_stageOut); + return _stageOut; +} diff --git a/tests/sksl/shared/ConstArray.asm.frag b/tests/sksl/shared/ConstArray.asm.frag index d8fefc854205..eb3a85717d15 100644 --- a/tests/sksl/shared/ConstArray.asm.frag +++ b/tests/sksl/shared/ConstArray.asm.frag @@ -1,42 +1,42 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%12 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%16 = OpConstantComposite %v2float %float_0 %float_0 + %void = OpTypeVoid + %12 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %16 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%20 = OpTypeFunction %v4float %_ptr_Function_v2float -%float_1 = OpConstant %float 1 -%24 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1 + %20 = OpTypeFunction %v4float %_ptr_Function_v2float + %float_1 = OpConstant %float 1 + %24 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1 %_entrypoint_v = OpFunction %void None %12 -%13 = OpLabel -%17 = OpVariable %_ptr_Function_v2float Function -OpStore %17 %16 -%19 = OpFunctionCall %v4float %main %17 -OpStore %sk_FragColor %19 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %20 -%21 = OpFunctionParameter %_ptr_Function_v2float -%22 = OpLabel -OpReturnValue %24 -OpFunctionEnd + %13 = OpLabel + %17 = OpVariable %_ptr_Function_v2float Function + OpStore %17 %16 + %19 = OpFunctionCall %v4float %main %17 + OpStore %sk_FragColor %19 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %20 + %21 = OpFunctionParameter %_ptr_Function_v2float + %22 = OpLabel + OpReturnValue %24 + OpFunctionEnd diff --git a/tests/sksl/shared/ConstArray.skrp b/tests/sksl/shared/ConstArray.skrp index e3d3588fa931..4a9d29a23599 100644 --- a/tests/sksl/shared/ConstArray.skrp +++ b/tests/sksl/shared/ConstArray.skrp @@ -1,7 +1,12 @@ +4 instructions + +[immutable slots] +i0 = 0 +i1 = 0x3F800000 (1.0) +i2 = 0 +i3 = 0x3F800000 (1.0) + store_src_rg xy = src.rg init_lane_masks CondMask = LoopMask = RetMask = true -copy_constant $0 = 0 -copy_constant $1 = 0x3F800000 (1.0) -copy_constant $2 = 0 -copy_constant $3 = 0x3F800000 (1.0) +copy_4_immutables_unmasked $0..3 = i0..3 [0, 0x3F800000 (1.0), 0, 0x3F800000 (1.0)] load_src src.rgba = $0..3 diff --git a/tests/sksl/shared/ConstArray.wgsl b/tests/sksl/shared/ConstArray.wgsl index f85fc88fc7c8..4d8cc4f82a0e 100644 --- a/tests/sksl/shared/ConstArray.wgsl +++ b/tests/sksl/shared/ConstArray.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, diff --git a/tests/sksl/shared/ConstGlobal.asm.frag b/tests/sksl/shared/ConstGlobal.asm.frag index 5f916cd6288f..b25145b567ce 100644 --- a/tests/sksl/shared/ConstGlobal.asm.frag +++ b/tests/sksl/shared/ConstGlobal.asm.frag @@ -1,151 +1,151 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %MATRIXFIVE "MATRIXFIVE" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %verify_const_globals_biih44 "verify_const_globals_biih44" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %MATRIXFIVE RelaxedPrecision -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %21 Binding 0 -OpDecorate %21 DescriptorSet 0 -OpDecorate %53 RelaxedPrecision -OpDecorate %55 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %58 RelaxedPrecision -OpDecorate %59 RelaxedPrecision -OpDecorate %62 RelaxedPrecision -OpDecorate %63 RelaxedPrecision -OpDecorate %66 RelaxedPrecision -OpDecorate %67 RelaxedPrecision -OpDecorate %86 RelaxedPrecision -OpDecorate %89 RelaxedPrecision -OpDecorate %90 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %MATRIXFIVE "MATRIXFIVE" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %verify_const_globals_biih44 "verify_const_globals_biih44" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %MATRIXFIVE RelaxedPrecision + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %21 Binding 0 + OpDecorate %21 DescriptorSet 0 + OpDecorate %53 RelaxedPrecision + OpDecorate %55 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %58 RelaxedPrecision + OpDecorate %59 RelaxedPrecision + OpDecorate %62 RelaxedPrecision + OpDecorate %63 RelaxedPrecision + OpDecorate %66 RelaxedPrecision + OpDecorate %67 RelaxedPrecision + OpDecorate %86 RelaxedPrecision + OpDecorate %89 RelaxedPrecision + OpDecorate %90 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %mat4v4float = OpTypeMatrix %v4float 4 %_ptr_Private_mat4v4float = OpTypePointer Private %mat4v4float -%MATRIXFIVE = OpVariable %_ptr_Private_mat4v4float Private -%float_5 = OpConstant %float 5 -%float_0 = OpConstant %float 0 -%16 = OpConstantComposite %v4float %float_5 %float_0 %float_0 %float_0 -%17 = OpConstantComposite %v4float %float_0 %float_5 %float_0 %float_0 -%18 = OpConstantComposite %v4float %float_0 %float_0 %float_5 %float_0 -%19 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_5 -%20 = OpConstantComposite %mat4v4float %16 %17 %18 %19 + %MATRIXFIVE = OpVariable %_ptr_Private_mat4v4float Private + %float_5 = OpConstant %float 5 + %float_0 = OpConstant %float 0 + %16 = OpConstantComposite %v4float %float_5 %float_0 %float_0 %float_0 + %17 = OpConstantComposite %v4float %float_0 %float_5 %float_0 %float_0 + %18 = OpConstantComposite %v4float %float_0 %float_0 %float_5 %float_0 + %19 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_5 + %20 = OpConstantComposite %mat4v4float %16 %17 %18 %19 %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%21 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%26 = OpTypeFunction %void -%v2float = OpTypeVector %float 2 -%29 = OpConstantComposite %v2float %float_0 %float_0 + %21 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %26 = OpTypeFunction %void + %v2float = OpTypeVector %float 2 + %29 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%int = OpTypeInt 32 1 + %int = OpTypeInt 32 1 %_ptr_Function_int = OpTypePointer Function %int %_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float -%36 = OpTypeFunction %bool %_ptr_Function_int %_ptr_Function_int %_ptr_Function_mat4v4float -%false = OpConstantFalse %bool -%int_7 = OpConstant %int 7 -%int_10 = OpConstant %int 10 -%v4bool = OpTypeVector %bool 4 -%71 = OpTypeFunction %v4float %_ptr_Function_v2float + %36 = OpTypeFunction %bool %_ptr_Function_int %_ptr_Function_int %_ptr_Function_mat4v4float + %false = OpConstantFalse %bool + %int_7 = OpConstant %int 7 + %int_10 = OpConstant %int 10 + %v4bool = OpTypeVector %bool 4 + %71 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 %_entrypoint_v = OpFunction %void None %26 -%27 = OpLabel -%30 = OpVariable %_ptr_Function_v2float Function -OpStore %30 %29 -%32 = OpFunctionCall %v4float %main %30 -OpStore %sk_FragColor %32 -OpReturn -OpFunctionEnd + %27 = OpLabel + %30 = OpVariable %_ptr_Function_v2float Function + OpStore %30 %29 + %32 = OpFunctionCall %v4float %main %30 + OpStore %sk_FragColor %32 + OpReturn + OpFunctionEnd %verify_const_globals_biih44 = OpFunction %bool None %36 -%37 = OpFunctionParameter %_ptr_Function_int -%38 = OpFunctionParameter %_ptr_Function_int -%39 = OpFunctionParameter %_ptr_Function_mat4v4float -%40 = OpLabel -%42 = OpLoad %int %37 -%44 = OpIEqual %bool %42 %int_7 -OpSelectionMerge %46 None -OpBranchConditional %44 %45 %46 -%45 = OpLabel -%47 = OpLoad %int %38 -%49 = OpIEqual %bool %47 %int_10 -OpBranch %46 -%46 = OpLabel -%50 = OpPhi %bool %false %40 %49 %45 -OpSelectionMerge %52 None -OpBranchConditional %50 %51 %52 -%51 = OpLabel -%53 = OpLoad %mat4v4float %39 -%55 = OpCompositeExtract %v4float %53 0 -%56 = OpFOrdEqual %v4bool %55 %16 -%57 = OpAll %bool %56 -%58 = OpCompositeExtract %v4float %53 1 -%59 = OpFOrdEqual %v4bool %58 %17 -%60 = OpAll %bool %59 -%61 = OpLogicalAnd %bool %57 %60 -%62 = OpCompositeExtract %v4float %53 2 -%63 = OpFOrdEqual %v4bool %62 %18 -%64 = OpAll %bool %63 -%65 = OpLogicalAnd %bool %61 %64 -%66 = OpCompositeExtract %v4float %53 3 -%67 = OpFOrdEqual %v4bool %66 %19 -%68 = OpAll %bool %67 -%69 = OpLogicalAnd %bool %65 %68 -OpBranch %52 -%52 = OpLabel -%70 = OpPhi %bool %false %46 %69 %51 -OpReturnValue %70 -OpFunctionEnd -%main = OpFunction %v4float None %71 -%72 = OpFunctionParameter %_ptr_Function_v2float -%73 = OpLabel -%74 = OpVariable %_ptr_Function_int Function -%75 = OpVariable %_ptr_Function_int Function -%76 = OpVariable %_ptr_Function_mat4v4float Function -%78 = OpVariable %_ptr_Function_v4float Function -OpStore %MATRIXFIVE %20 -OpStore %74 %int_7 -OpStore %75 %int_10 -OpStore %76 %20 -%77 = OpFunctionCall %bool %verify_const_globals_biih44 %74 %75 %76 -OpSelectionMerge %82 None -OpBranchConditional %77 %80 %81 -%80 = OpLabel -%83 = OpAccessChain %_ptr_Uniform_v4float %21 %int_0 -%86 = OpLoad %v4float %83 -OpStore %78 %86 -OpBranch %82 -%81 = OpLabel -%87 = OpAccessChain %_ptr_Uniform_v4float %21 %int_1 -%89 = OpLoad %v4float %87 -OpStore %78 %89 -OpBranch %82 -%82 = OpLabel -%90 = OpLoad %v4float %78 -OpReturnValue %90 -OpFunctionEnd + %37 = OpFunctionParameter %_ptr_Function_int + %38 = OpFunctionParameter %_ptr_Function_int + %39 = OpFunctionParameter %_ptr_Function_mat4v4float + %40 = OpLabel + %42 = OpLoad %int %37 + %44 = OpIEqual %bool %42 %int_7 + OpSelectionMerge %46 None + OpBranchConditional %44 %45 %46 + %45 = OpLabel + %47 = OpLoad %int %38 + %49 = OpIEqual %bool %47 %int_10 + OpBranch %46 + %46 = OpLabel + %50 = OpPhi %bool %false %40 %49 %45 + OpSelectionMerge %52 None + OpBranchConditional %50 %51 %52 + %51 = OpLabel + %53 = OpLoad %mat4v4float %39 + %55 = OpCompositeExtract %v4float %53 0 + %56 = OpFOrdEqual %v4bool %55 %16 + %57 = OpAll %bool %56 + %58 = OpCompositeExtract %v4float %53 1 + %59 = OpFOrdEqual %v4bool %58 %17 + %60 = OpAll %bool %59 + %61 = OpLogicalAnd %bool %57 %60 + %62 = OpCompositeExtract %v4float %53 2 + %63 = OpFOrdEqual %v4bool %62 %18 + %64 = OpAll %bool %63 + %65 = OpLogicalAnd %bool %61 %64 + %66 = OpCompositeExtract %v4float %53 3 + %67 = OpFOrdEqual %v4bool %66 %19 + %68 = OpAll %bool %67 + %69 = OpLogicalAnd %bool %65 %68 + OpBranch %52 + %52 = OpLabel + %70 = OpPhi %bool %false %46 %69 %51 + OpReturnValue %70 + OpFunctionEnd + %main = OpFunction %v4float None %71 + %72 = OpFunctionParameter %_ptr_Function_v2float + %73 = OpLabel + %74 = OpVariable %_ptr_Function_int Function + %75 = OpVariable %_ptr_Function_int Function + %76 = OpVariable %_ptr_Function_mat4v4float Function + %78 = OpVariable %_ptr_Function_v4float Function + OpStore %MATRIXFIVE %20 + OpStore %74 %int_7 + OpStore %75 %int_10 + OpStore %76 %20 + %77 = OpFunctionCall %bool %verify_const_globals_biih44 %74 %75 %76 + OpSelectionMerge %82 None + OpBranchConditional %77 %80 %81 + %80 = OpLabel + %83 = OpAccessChain %_ptr_Uniform_v4float %21 %int_0 + %86 = OpLoad %v4float %83 + OpStore %78 %86 + OpBranch %82 + %81 = OpLabel + %87 = OpAccessChain %_ptr_Uniform_v4float %21 %int_1 + %89 = OpLoad %v4float %87 + OpStore %78 %89 + OpBranch %82 + %82 = OpLabel + %90 = OpLoad %v4float %78 + OpReturnValue %90 + OpFunctionEnd diff --git a/tests/sksl/shared/ConstGlobal.skrp b/tests/sksl/shared/ConstGlobal.skrp index 85e8a553ef10..cd4e0d4eac5b 100644 --- a/tests/sksl/shared/ConstGlobal.skrp +++ b/tests/sksl/shared/ConstGlobal.skrp @@ -1,31 +1,33 @@ +32 instructions + [immutable slots] -SEVEN = 0x00000007 (9.809089e-45) -TEN = 0x0000000A (1.401298e-44) -MATRIXFIVE(0) = 0x40A00000 (5.0) -MATRIXFIVE(1) = 0 -MATRIXFIVE(2) = 0 -MATRIXFIVE(3) = 0 -MATRIXFIVE(4) = 0 -MATRIXFIVE(5) = 0x40A00000 (5.0) -MATRIXFIVE(6) = 0 -MATRIXFIVE(7) = 0 -MATRIXFIVE(8) = 0 -MATRIXFIVE(9) = 0 -MATRIXFIVE(10) = 0x40A00000 (5.0) -MATRIXFIVE(11) = 0 -MATRIXFIVE(12) = 0 -MATRIXFIVE(13) = 0 -MATRIXFIVE(14) = 0 -MATRIXFIVE(15) = 0x40A00000 (5.0) +i0 = 0x00000007 (9.809089e-45) +i1 = 0x0000000A (1.401298e-44) +i2 = 0x40A00000 (5.0) +i3 = 0 +i4 = 0 +i5 = 0 +i6 = 0 +i7 = 0x40A00000 (5.0) +i8 = 0 +i9 = 0 +i10 = 0 +i11 = 0 +i12 = 0x40A00000 (5.0) +i13 = 0 +i14 = 0 +i15 = 0 +i16 = 0 +i17 = 0x40A00000 (5.0) store_src_rg xy = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_constant seven = 0x00000007 (9.809089e-45) copy_constant ten = 0x0000000A (1.401298e-44) -copy_4_slots_unmasked matrixFive(0..3) = MATRIXFIVE(0..3) -copy_4_slots_unmasked matrixFive(4..7) = MATRIXFIVE(4..7) -copy_4_slots_unmasked matrixFive(8..11) = MATRIXFIVE(8..11) -copy_4_slots_unmasked matrixFive(12..15) = MATRIXFIVE(12..15) +copy_4_immutables_unmasked matrixFive(0..3) = i2..5 [0x40A00000 (5.0), 0, 0, 0] +copy_4_immutables_unmasked matrixFive(4..7) = i6..9 [0, 0x40A00000 (5.0), 0, 0] +copy_4_immutables_unmasked matrixFive(8..11) = i10..13 [0, 0, 0x40A00000 (5.0), 0] +copy_4_immutables_unmasked matrixFive(12..15) = i14..17 [0, 0, 0, 0x40A00000 (5.0)] copy_slot_unmasked $0 = seven cmpeq_imm_int $0 = equal($0, 0x00000007) copy_slot_unmasked $1 = ten diff --git a/tests/sksl/shared/ConstGlobal.wgsl b/tests/sksl/shared/ConstGlobal.wgsl index d0253db2573d..26aa5c45f11e 100644 --- a/tests/sksl/shared/ConstGlobal.wgsl +++ b/tests/sksl/shared/ConstGlobal.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -19,7 +20,7 @@ fn verify_const_globals_biih44(_skParam0: i32, _skParam1: i32, _skParam2: mat4x4 let matrixFive = _skParam2; { let _skTemp0 = mat4x4(5.0, 0.0, 0.0, 0.0, 0.0, 5.0, 0.0, 0.0, 0.0, 0.0, 5.0, 0.0, 0.0, 0.0, 0.0, 5.0); - return (seven == 7 && ten == 10) && (all(matrixFive[0] == _skTemp0[0]) && all(matrixFive[1] == _skTemp0[1]) && all(matrixFive[2] == _skTemp0[2]) && all(matrixFive[3] == _skTemp0[3])); + return ((seven == 7) && (ten == 10)) && (all(matrixFive[0] == _skTemp0[0]) && all(matrixFive[1] == _skTemp0[1]) && all(matrixFive[2] == _skTemp0[2]) && all(matrixFive[3] == _skTemp0[3])); } } fn main(_skParam0: vec2) -> vec4 { diff --git a/tests/sksl/shared/ConstVariableComparison.asm.frag b/tests/sksl/shared/ConstVariableComparison.asm.frag index d4ffc392f11c..727a91ac40fe 100644 --- a/tests/sksl/shared/ConstVariableComparison.asm.frag +++ b/tests/sksl/shared/ConstVariableComparison.asm.frag @@ -1,59 +1,59 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %30 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %30 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%26 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%30 = OpLoad %v4float %26 -OpReturnValue %30 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %26 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %30 = OpLoad %v4float %26 + OpReturnValue %30 + OpFunctionEnd diff --git a/tests/sksl/shared/ConstVariableComparison.skrp b/tests/sksl/shared/ConstVariableComparison.skrp index eb638383c6a7..441fd464130a 100644 --- a/tests/sksl/shared/ConstVariableComparison.skrp +++ b/tests/sksl/shared/ConstVariableComparison.skrp @@ -1,3 +1,5 @@ +4 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_4_uniforms $0..3 = colorGreen diff --git a/tests/sksl/shared/ConstVariableComparison.wgsl b/tests/sksl/shared/ConstVariableComparison.wgsl new file mode 100644 index 000000000000..84aee4222c03 --- /dev/null +++ b/tests/sksl/shared/ConstVariableComparison.wgsl @@ -0,0 +1,26 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + { + return _globalUniforms.colorGreen; + } + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/ConstantCompositeAccessViaConstantIndex.asm.frag b/tests/sksl/shared/ConstantCompositeAccessViaConstantIndex.asm.frag index e88abf850a01..4c2ac4f758e0 100644 --- a/tests/sksl/shared/ConstantCompositeAccessViaConstantIndex.asm.frag +++ b/tests/sksl/shared/ConstantCompositeAccessViaConstantIndex.asm.frag @@ -1,229 +1,229 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %globalArray "globalArray" -OpName %globalMatrix "globalMatrix" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorRed" -OpMemberName %_UniformBuffer 1 "testMatrix2x2" -OpMemberName %_UniformBuffer 2 "testArray" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %localArray "localArray" -OpName %localMatrix "localMatrix" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %globalArray RelaxedPrecision -OpDecorate %_arr_float_int_5 ArrayStride 16 -OpDecorate %16 RelaxedPrecision -OpDecorate %globalMatrix RelaxedPrecision -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 ColMajor -OpMemberDecorate %_UniformBuffer 1 MatrixStride 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 48 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %23 Binding 0 -OpDecorate %23 DescriptorSet 0 -OpDecorate %localArray RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %localMatrix RelaxedPrecision -OpDecorate %53 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %59 RelaxedPrecision -OpDecorate %62 RelaxedPrecision -OpDecorate %65 RelaxedPrecision -OpDecorate %73 RelaxedPrecision -OpDecorate %74 RelaxedPrecision -OpDecorate %84 RelaxedPrecision -OpDecorate %85 RelaxedPrecision -OpDecorate %86 RelaxedPrecision -OpDecorate %88 RelaxedPrecision -OpDecorate %89 RelaxedPrecision -OpDecorate %96 RelaxedPrecision -OpDecorate %97 RelaxedPrecision -OpDecorate %99 RelaxedPrecision -OpDecorate %102 RelaxedPrecision -OpDecorate %105 RelaxedPrecision -OpDecorate %108 RelaxedPrecision -OpDecorate %115 RelaxedPrecision -OpDecorate %116 RelaxedPrecision -OpDecorate %123 RelaxedPrecision -OpDecorate %124 RelaxedPrecision -OpDecorate %125 RelaxedPrecision -OpDecorate %127 RelaxedPrecision -OpDecorate %128 RelaxedPrecision -OpDecorate %135 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %globalArray "globalArray" + OpName %globalMatrix "globalMatrix" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorRed" + OpMemberName %_UniformBuffer 1 "testMatrix2x2" + OpMemberName %_UniformBuffer 2 "testArray" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %localArray "localArray" + OpName %localMatrix "localMatrix" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %globalArray RelaxedPrecision + OpDecorate %_arr_float_int_5 ArrayStride 16 + OpDecorate %16 RelaxedPrecision + OpDecorate %globalMatrix RelaxedPrecision + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 ColMajor + OpMemberDecorate %_UniformBuffer 1 MatrixStride 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 48 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %23 Binding 0 + OpDecorate %23 DescriptorSet 0 + OpDecorate %localArray RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %localMatrix RelaxedPrecision + OpDecorate %53 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %59 RelaxedPrecision + OpDecorate %62 RelaxedPrecision + OpDecorate %65 RelaxedPrecision + OpDecorate %73 RelaxedPrecision + OpDecorate %74 RelaxedPrecision + OpDecorate %84 RelaxedPrecision + OpDecorate %85 RelaxedPrecision + OpDecorate %86 RelaxedPrecision + OpDecorate %88 RelaxedPrecision + OpDecorate %89 RelaxedPrecision + OpDecorate %96 RelaxedPrecision + OpDecorate %97 RelaxedPrecision + OpDecorate %99 RelaxedPrecision + OpDecorate %102 RelaxedPrecision + OpDecorate %105 RelaxedPrecision + OpDecorate %108 RelaxedPrecision + OpDecorate %115 RelaxedPrecision + OpDecorate %116 RelaxedPrecision + OpDecorate %123 RelaxedPrecision + OpDecorate %124 RelaxedPrecision + OpDecorate %125 RelaxedPrecision + OpDecorate %127 RelaxedPrecision + OpDecorate %128 RelaxedPrecision + OpDecorate %135 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%int = OpTypeInt 32 1 -%int_5 = OpConstant %int 5 + %int = OpTypeInt 32 1 + %int_5 = OpConstant %int 5 %_arr_float_int_5 = OpTypeArray %float %int_5 %_ptr_Private__arr_float_int_5 = OpTypePointer Private %_arr_float_int_5 %globalArray = OpVariable %_ptr_Private__arr_float_int_5 Private -%float_1 = OpConstant %float 1 -%v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %v2float = OpTypeVector %float 2 %mat2v2float = OpTypeMatrix %v2float 2 %_ptr_Private_mat2v2float = OpTypePointer Private %mat2v2float %globalMatrix = OpVariable %_ptr_Private_mat2v2float Private -%21 = OpConstantComposite %v2float %float_1 %float_1 -%22 = OpConstantComposite %mat2v2float %21 %21 + %21 = OpConstantComposite %v2float %float_1 %float_1 + %22 = OpConstantComposite %mat2v2float %21 %21 %_UniformBuffer = OpTypeStruct %v4float %mat2v2float %_arr_float_int_5 %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%23 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%28 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%31 = OpConstantComposite %v2float %float_0 %float_0 + %23 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %28 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %31 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%35 = OpTypeFunction %v4float %_ptr_Function_v2float + %35 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function__arr_float_int_5 = OpTypePointer Function %_arr_float_int_5 -%float_2 = OpConstant %float 2 -%float_3 = OpConstant %float 3 -%float_4 = OpConstant %float 4 + %float_2 = OpConstant %float 2 + %float_3 = OpConstant %float 3 + %float_4 = OpConstant %float 4 %_ptr_Function_mat2v2float = OpTypePointer Function %mat2v2float -%46 = OpConstantComposite %v2float %float_0 %float_1 -%47 = OpConstantComposite %v2float %float_2 %float_3 -%48 = OpConstantComposite %mat2v2float %46 %47 -%true = OpConstantTrue %bool + %46 = OpConstantComposite %v2float %float_0 %float_1 + %47 = OpConstantComposite %v2float %float_2 %float_3 + %48 = OpConstantComposite %mat2v2float %46 %47 + %true = OpConstantTrue %bool %_ptr_Uniform__arr_float_int_5 = OpTypePointer Uniform %_arr_float_int_5 -%int_2 = OpConstant %int 2 + %int_2 = OpConstant %int 2 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_0 = OpConstant %int 0 -%v2bool = OpTypeVector %bool 2 + %int_0 = OpConstant %int 0 + %v2bool = OpTypeVector %bool 2 %_ptr_Uniform_mat2v2float = OpTypePointer Uniform %mat2v2float -%int_1 = OpConstant %int 1 -%136 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1 + %int_1 = OpConstant %int 1 + %136 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1 %_entrypoint_v = OpFunction %void None %28 -%29 = OpLabel -%32 = OpVariable %_ptr_Function_v2float Function -OpStore %32 %31 -%34 = OpFunctionCall %v4float %main %32 -OpStore %sk_FragColor %34 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %35 -%36 = OpFunctionParameter %_ptr_Function_v2float -%37 = OpLabel -%localArray = OpVariable %_ptr_Function__arr_float_int_5 Function + %29 = OpLabel + %32 = OpVariable %_ptr_Function_v2float Function + OpStore %32 %31 + %34 = OpFunctionCall %v4float %main %32 + OpStore %sk_FragColor %34 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %35 + %36 = OpFunctionParameter %_ptr_Function_v2float + %37 = OpLabel + %localArray = OpVariable %_ptr_Function__arr_float_int_5 Function %localMatrix = OpVariable %_ptr_Function_mat2v2float Function -%16 = OpCompositeConstruct %_arr_float_int_5 %float_1 %float_1 %float_1 %float_1 %float_1 -OpStore %globalArray %16 -OpStore %globalMatrix %22 -%43 = OpCompositeConstruct %_arr_float_int_5 %float_0 %float_1 %float_2 %float_3 %float_4 -OpStore %localArray %43 -OpStore %localMatrix %48 -%50 = OpAccessChain %_ptr_Uniform__arr_float_int_5 %23 %int_2 -%53 = OpLoad %_arr_float_int_5 %50 -%54 = OpCompositeExtract %float %53 0 -%55 = OpFOrdEqual %bool %float_1 %54 -%56 = OpCompositeExtract %float %53 1 -%57 = OpFOrdEqual %bool %float_1 %56 -%58 = OpLogicalAnd %bool %57 %55 -%59 = OpCompositeExtract %float %53 2 -%60 = OpFOrdEqual %bool %float_1 %59 -%61 = OpLogicalAnd %bool %60 %58 -%62 = OpCompositeExtract %float %53 3 -%63 = OpFOrdEqual %bool %float_1 %62 -%64 = OpLogicalAnd %bool %63 %61 -%65 = OpCompositeExtract %float %53 4 -%66 = OpFOrdEqual %bool %float_1 %65 -%67 = OpLogicalAnd %bool %66 %64 -OpSelectionMerge %69 None -OpBranchConditional %67 %69 %68 -%68 = OpLabel -%70 = OpAccessChain %_ptr_Uniform_v4float %23 %int_0 -%73 = OpLoad %v4float %70 -%74 = OpVectorShuffle %v2float %73 %73 0 1 -%75 = OpFOrdEqual %v2bool %21 %74 -%77 = OpAll %bool %75 -OpBranch %69 -%69 = OpLabel -%78 = OpPhi %bool %true %37 %77 %68 -OpSelectionMerge %80 None -OpBranchConditional %78 %80 %79 -%79 = OpLabel -%81 = OpAccessChain %_ptr_Uniform_mat2v2float %23 %int_1 -%84 = OpLoad %mat2v2float %81 -%85 = OpCompositeExtract %v2float %84 0 -%86 = OpFOrdEqual %v2bool %21 %85 -%87 = OpAll %bool %86 -%88 = OpCompositeExtract %v2float %84 1 -%89 = OpFOrdEqual %v2bool %21 %88 -%90 = OpAll %bool %89 -%91 = OpLogicalAnd %bool %87 %90 -OpBranch %80 -%80 = OpLabel -%92 = OpPhi %bool %true %69 %91 %79 -OpSelectionMerge %94 None -OpBranchConditional %92 %94 %93 -%93 = OpLabel -%95 = OpAccessChain %_ptr_Uniform__arr_float_int_5 %23 %int_2 -%96 = OpLoad %_arr_float_int_5 %95 -%97 = OpCompositeExtract %float %96 0 -%98 = OpFOrdEqual %bool %float_0 %97 -%99 = OpCompositeExtract %float %96 1 -%100 = OpFOrdEqual %bool %float_1 %99 -%101 = OpLogicalAnd %bool %100 %98 -%102 = OpCompositeExtract %float %96 2 -%103 = OpFOrdEqual %bool %float_2 %102 -%104 = OpLogicalAnd %bool %103 %101 -%105 = OpCompositeExtract %float %96 3 -%106 = OpFOrdEqual %bool %float_3 %105 -%107 = OpLogicalAnd %bool %106 %104 -%108 = OpCompositeExtract %float %96 4 -%109 = OpFOrdEqual %bool %float_4 %108 -%110 = OpLogicalAnd %bool %109 %107 -OpBranch %94 -%94 = OpLabel -%111 = OpPhi %bool %true %80 %110 %93 -OpSelectionMerge %113 None -OpBranchConditional %111 %113 %112 -%112 = OpLabel -%114 = OpAccessChain %_ptr_Uniform_v4float %23 %int_0 -%115 = OpLoad %v4float %114 -%116 = OpVectorShuffle %v2float %115 %115 0 1 -%117 = OpFOrdEqual %v2bool %21 %116 -%118 = OpAll %bool %117 -OpBranch %113 -%113 = OpLabel -%119 = OpPhi %bool %true %94 %118 %112 -OpSelectionMerge %121 None -OpBranchConditional %119 %121 %120 -%120 = OpLabel -%122 = OpAccessChain %_ptr_Uniform_mat2v2float %23 %int_1 -%123 = OpLoad %mat2v2float %122 -%124 = OpCompositeExtract %v2float %123 0 -%125 = OpFOrdEqual %v2bool %46 %124 -%126 = OpAll %bool %125 -%127 = OpCompositeExtract %v2float %123 1 -%128 = OpFOrdEqual %v2bool %47 %127 -%129 = OpAll %bool %128 -%130 = OpLogicalAnd %bool %126 %129 -OpBranch %121 -%121 = OpLabel -%131 = OpPhi %bool %true %113 %130 %120 -OpSelectionMerge %133 None -OpBranchConditional %131 %132 %133 -%132 = OpLabel -%134 = OpAccessChain %_ptr_Uniform_v4float %23 %int_0 -%135 = OpLoad %v4float %134 -OpReturnValue %135 -%133 = OpLabel -OpReturnValue %136 -OpFunctionEnd + %16 = OpCompositeConstruct %_arr_float_int_5 %float_1 %float_1 %float_1 %float_1 %float_1 + OpStore %globalArray %16 + OpStore %globalMatrix %22 + %43 = OpCompositeConstruct %_arr_float_int_5 %float_0 %float_1 %float_2 %float_3 %float_4 + OpStore %localArray %43 + OpStore %localMatrix %48 + %50 = OpAccessChain %_ptr_Uniform__arr_float_int_5 %23 %int_2 + %53 = OpLoad %_arr_float_int_5 %50 + %54 = OpCompositeExtract %float %53 0 + %55 = OpFOrdEqual %bool %float_1 %54 + %56 = OpCompositeExtract %float %53 1 + %57 = OpFOrdEqual %bool %float_1 %56 + %58 = OpLogicalAnd %bool %57 %55 + %59 = OpCompositeExtract %float %53 2 + %60 = OpFOrdEqual %bool %float_1 %59 + %61 = OpLogicalAnd %bool %60 %58 + %62 = OpCompositeExtract %float %53 3 + %63 = OpFOrdEqual %bool %float_1 %62 + %64 = OpLogicalAnd %bool %63 %61 + %65 = OpCompositeExtract %float %53 4 + %66 = OpFOrdEqual %bool %float_1 %65 + %67 = OpLogicalAnd %bool %66 %64 + OpSelectionMerge %69 None + OpBranchConditional %67 %69 %68 + %68 = OpLabel + %70 = OpAccessChain %_ptr_Uniform_v4float %23 %int_0 + %73 = OpLoad %v4float %70 + %74 = OpVectorShuffle %v2float %73 %73 0 1 + %75 = OpFOrdEqual %v2bool %21 %74 + %77 = OpAll %bool %75 + OpBranch %69 + %69 = OpLabel + %78 = OpPhi %bool %true %37 %77 %68 + OpSelectionMerge %80 None + OpBranchConditional %78 %80 %79 + %79 = OpLabel + %81 = OpAccessChain %_ptr_Uniform_mat2v2float %23 %int_1 + %84 = OpLoad %mat2v2float %81 + %85 = OpCompositeExtract %v2float %84 0 + %86 = OpFOrdEqual %v2bool %21 %85 + %87 = OpAll %bool %86 + %88 = OpCompositeExtract %v2float %84 1 + %89 = OpFOrdEqual %v2bool %21 %88 + %90 = OpAll %bool %89 + %91 = OpLogicalAnd %bool %87 %90 + OpBranch %80 + %80 = OpLabel + %92 = OpPhi %bool %true %69 %91 %79 + OpSelectionMerge %94 None + OpBranchConditional %92 %94 %93 + %93 = OpLabel + %95 = OpAccessChain %_ptr_Uniform__arr_float_int_5 %23 %int_2 + %96 = OpLoad %_arr_float_int_5 %95 + %97 = OpCompositeExtract %float %96 0 + %98 = OpFOrdEqual %bool %float_0 %97 + %99 = OpCompositeExtract %float %96 1 + %100 = OpFOrdEqual %bool %float_1 %99 + %101 = OpLogicalAnd %bool %100 %98 + %102 = OpCompositeExtract %float %96 2 + %103 = OpFOrdEqual %bool %float_2 %102 + %104 = OpLogicalAnd %bool %103 %101 + %105 = OpCompositeExtract %float %96 3 + %106 = OpFOrdEqual %bool %float_3 %105 + %107 = OpLogicalAnd %bool %106 %104 + %108 = OpCompositeExtract %float %96 4 + %109 = OpFOrdEqual %bool %float_4 %108 + %110 = OpLogicalAnd %bool %109 %107 + OpBranch %94 + %94 = OpLabel + %111 = OpPhi %bool %true %80 %110 %93 + OpSelectionMerge %113 None + OpBranchConditional %111 %113 %112 + %112 = OpLabel + %114 = OpAccessChain %_ptr_Uniform_v4float %23 %int_0 + %115 = OpLoad %v4float %114 + %116 = OpVectorShuffle %v2float %115 %115 0 1 + %117 = OpFOrdEqual %v2bool %21 %116 + %118 = OpAll %bool %117 + OpBranch %113 + %113 = OpLabel + %119 = OpPhi %bool %true %94 %118 %112 + OpSelectionMerge %121 None + OpBranchConditional %119 %121 %120 + %120 = OpLabel + %122 = OpAccessChain %_ptr_Uniform_mat2v2float %23 %int_1 + %123 = OpLoad %mat2v2float %122 + %124 = OpCompositeExtract %v2float %123 0 + %125 = OpFOrdEqual %v2bool %46 %124 + %126 = OpAll %bool %125 + %127 = OpCompositeExtract %v2float %123 1 + %128 = OpFOrdEqual %v2bool %47 %127 + %129 = OpAll %bool %128 + %130 = OpLogicalAnd %bool %126 %129 + OpBranch %121 + %121 = OpLabel + %131 = OpPhi %bool %true %113 %130 %120 + OpSelectionMerge %133 None + OpBranchConditional %131 %132 %133 + %132 = OpLabel + %134 = OpAccessChain %_ptr_Uniform_v4float %23 %int_0 + %135 = OpLoad %v4float %134 + OpReturnValue %135 + %133 = OpLabel + OpReturnValue %136 + OpFunctionEnd diff --git a/tests/sksl/shared/ConstantCompositeAccessViaConstantIndex.skrp b/tests/sksl/shared/ConstantCompositeAccessViaConstantIndex.skrp index 7454cb0b45b3..61f0eb62e7a3 100644 --- a/tests/sksl/shared/ConstantCompositeAccessViaConstantIndex.skrp +++ b/tests/sksl/shared/ConstantCompositeAccessViaConstantIndex.skrp @@ -1,31 +1,25 @@ +49 instructions + [immutable slots] -globalArray[0] = 0x3F800000 (1.0) -globalArray[1] = 0x3F800000 (1.0) -globalArray[2] = 0x3F800000 (1.0) -globalArray[3] = 0x3F800000 (1.0) -globalArray[4] = 0x3F800000 (1.0) -globalVector(0) = 0x3F800000 (1.0) -globalVector(1) = 0x3F800000 (1.0) -globalMatrix(0) = 0x3F800000 (1.0) -globalMatrix(1) = 0x3F800000 (1.0) -globalMatrix(2) = 0x3F800000 (1.0) -globalMatrix(3) = 0x3F800000 (1.0) -localArray[0] = 0 -localArray[1] = 0x3F800000 (1.0) -localArray[2] = 0x40000000 (2.0) -localArray[3] = 0x40400000 (3.0) -localArray[4] = 0x40800000 (4.0) -localVector(0) = 0x3F800000 (1.0) -localVector(1) = 0x3F800000 (1.0) -localMatrix(0) = 0 -localMatrix(1) = 0x3F800000 (1.0) -localMatrix(2) = 0x40000000 (2.0) -localMatrix(3) = 0x40400000 (3.0) +i0 = 0x3F800000 (1.0) +i1 = 0x3F800000 (1.0) +i2 = 0x3F800000 (1.0) +i3 = 0x3F800000 (1.0) +i4 = 0x3F800000 (1.0) +i5 = 0 +i6 = 0x3F800000 (1.0) +i7 = 0x40000000 (2.0) +i8 = 0x40400000 (3.0) +i9 = 0x40800000 (4.0) +i10 = 0 +i11 = 0x3F800000 (1.0) +i12 = 0 +i13 = 0x3F800000 (1.0) store_src_rg v0..1 = src.rg init_lane_masks CondMask = LoopMask = RetMask = true -copy_4_slots_unmasked $0..3 = globalArray[0], globalArray[1], globalArray[2], globalArray[3] -copy_slot_unmasked $4 = globalArray[4] +copy_4_immutables_unmasked $0..3 = i0..3 [0x3F800000 (1.0), 0x3F800000 (1.0), 0x3F800000 (1.0), 0x3F800000 (1.0)] +copy_immutable_unmasked $4 = i4 [0x3F800000 (1.0)] copy_4_uniforms $5..8 = testArray[0], testArray[1], testArray[2], testArray[3] copy_uniform $9 = testArray[4] cmpeq_n_floats $0..4 = equal($0..4, $5..9) @@ -37,14 +31,14 @@ copy_2_uniforms $3..4 = colorRed(0..1) cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_or_int $0 |= $1 -copy_4_slots_unmasked $1..4 = globalMatrix +copy_4_immutables_unmasked $1..4 = i0..3 [0x3F800000 (1.0), 0x3F800000 (1.0), 0x3F800000 (1.0), 0x3F800000 (1.0)] copy_4_uniforms $5..8 = testMatrix2x2 cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_or_int $0 |= $1 -copy_4_slots_unmasked $1..4 = localArray[0], localArray[1], localArray[2], localArray[3] -copy_slot_unmasked $5 = localArray[4] +copy_4_immutables_unmasked $1..4 = i5..8 [0, 0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0)] +copy_immutable_unmasked $5 = i9 [0x40800000 (4.0)] copy_4_uniforms $6..9 = testArray[0], testArray[1], testArray[2], testArray[3] copy_uniform $10 = testArray[4] cmpeq_n_floats $1..5 = equal($1..5, $6..10) @@ -57,7 +51,7 @@ copy_2_uniforms $3..4 = colorRed(0..1) cmpeq_2_floats $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_or_int $0 |= $1 -copy_4_slots_unmasked $1..4 = localMatrix +copy_4_immutables_unmasked $1..4 = i5..8 [0, 0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0)] copy_4_uniforms $5..8 = testMatrix2x2 cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 @@ -68,10 +62,7 @@ copy_4_uniforms $1..4 = colorRed copy_4_slots_masked [main].result = Mask($1..4) mask_off_return_mask RetMask &= ~(CondMask & LoopMask & RetMask) label label 0 -copy_constant $0 = 0 -copy_constant $1 = 0x3F800000 (1.0) -copy_constant $2 = 0 -copy_constant $3 = 0x3F800000 (1.0) +copy_4_immutables_unmasked $0..3 = i10..13 [0, 0x3F800000 (1.0), 0, 0x3F800000 (1.0)] copy_4_slots_masked [main].result = Mask($0..3) mask_off_return_mask RetMask &= ~(CondMask & LoopMask & RetMask) load_src src.rgba = [main].result diff --git a/tests/sksl/shared/ConstantCompositeAccessViaConstantIndex.wgsl b/tests/sksl/shared/ConstantCompositeAccessViaConstantIndex.wgsl new file mode 100644 index 000000000000..67a579b48183 --- /dev/null +++ b/tests/sksl/shared/ConstantCompositeAccessViaConstantIndex.wgsl @@ -0,0 +1,58 @@ +### Compilation failed: + +error: :12:14 error: uniform storage requires that array elements are aligned to 16 bytes, but array element of type 'f32' has a stride of 4 bytes. Consider using a vector or struct as the element type instead. + testArray: array, + ^^^^^^^^^^^^^ + +:9:1 note: see layout of struct: +/* align(16) size(64) */ struct _GlobalUniforms { +/* offset( 0) align(16) size(16) */ colorRed : vec4; +/* offset(16) align( 8) size(16) */ testMatrix2x2 : mat2x2; +/* offset(32) align( 4) size(20) */ testArray : array; +/* offset(52) align( 1) size(12) */ // -- implicit struct size padding --; +/* */ }; +struct _GlobalUniforms { +^^^^^^ + +:14:36 note: '_GlobalUniforms' used in address space 'uniform' here +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; + ^^^^^^^^^^^^^^^ + + +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorRed: vec4, + testMatrix2x2: mat2x2, + testArray: array, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +const globalArray: array = array(1.0, 1.0, 1.0, 1.0, 1.0); +const globalVector: vec2 = vec2(1.0); +const globalMatrix: mat2x2 = mat2x2(1.0, 1.0, 1.0, 1.0); +fn main(_skParam0: vec2) -> vec4 { + { + const localArray: array = array(0.0, 1.0, 2.0, 3.0, 4.0); + const localVector: vec2 = vec2(1.0); + const localMatrix: mat2x2 = mat2x2(0.0, 1.0, 2.0, 3.0); + if ((((((globalArray[0] == _globalUniforms.testArray[0]) && (globalArray[1] == _globalUniforms.testArray[1]) && (globalArray[2] == _globalUniforms.testArray[2]) && (globalArray[3] == _globalUniforms.testArray[3]) && (globalArray[4] == _globalUniforms.testArray[4])) || all(globalVector == _globalUniforms.colorRed.xy)) || (all(globalMatrix[0] == _globalUniforms.testMatrix2x2[0]) && all(globalMatrix[1] == _globalUniforms.testMatrix2x2[1]))) || ((localArray[0] == _globalUniforms.testArray[0]) && (localArray[1] == _globalUniforms.testArray[1]) && (localArray[2] == _globalUniforms.testArray[2]) && (localArray[3] == _globalUniforms.testArray[3]) && (localArray[4] == _globalUniforms.testArray[4]))) || all(localVector == _globalUniforms.colorRed.xy)) || (all(localMatrix[0] == _globalUniforms.testMatrix2x2[0]) && all(localMatrix[1] == _globalUniforms.testMatrix2x2[1])) { + { + return _globalUniforms.colorRed; + } + } + return vec4(0.0, 1.0, 0.0, 1.0); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} + +1 error diff --git a/tests/sksl/shared/ConstantCompositeAccessViaDynamicIndex.asm.frag b/tests/sksl/shared/ConstantCompositeAccessViaDynamicIndex.asm.frag index 79a38b5f6b06..062b7e5843e2 100644 --- a/tests/sksl/shared/ConstantCompositeAccessViaDynamicIndex.asm.frag +++ b/tests/sksl/shared/ConstantCompositeAccessViaDynamicIndex.asm.frag @@ -1,117 +1,117 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %zero "zero" -OpName %globalArray "globalArray" -OpName %globalMatrix "globalMatrix" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %localArray "localArray" -OpName %localMatrix "localMatrix" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %globalArray RelaxedPrecision -OpDecorate %_arr_float_int_2 ArrayStride 16 -OpDecorate %19 RelaxedPrecision -OpDecorate %globalMatrix RelaxedPrecision -OpDecorate %localArray RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %localMatrix RelaxedPrecision -OpDecorate %51 RelaxedPrecision -OpDecorate %55 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %65 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %69 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -OpDecorate %71 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %zero "zero" + OpName %globalArray "globalArray" + OpName %globalMatrix "globalMatrix" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %localArray "localArray" + OpName %localMatrix "localMatrix" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %globalArray RelaxedPrecision + OpDecorate %_arr_float_int_2 ArrayStride 16 + OpDecorate %19 RelaxedPrecision + OpDecorate %globalMatrix RelaxedPrecision + OpDecorate %localArray RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %localMatrix RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %55 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %65 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %69 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %71 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%int = OpTypeInt 32 1 + %int = OpTypeInt 32 1 %_ptr_Private_int = OpTypePointer Private %int -%zero = OpVariable %_ptr_Private_int Private -%int_0 = OpConstant %int 0 -%int_2 = OpConstant %int 2 + %zero = OpVariable %_ptr_Private_int Private + %int_0 = OpConstant %int 0 + %int_2 = OpConstant %int 2 %_arr_float_int_2 = OpTypeArray %float %int_2 %_ptr_Private__arr_float_int_2 = OpTypePointer Private %_arr_float_int_2 %globalArray = OpVariable %_ptr_Private__arr_float_int_2 Private -%float_1 = OpConstant %float 1 -%v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %v2float = OpTypeVector %float 2 %mat2v2float = OpTypeMatrix %v2float 2 %_ptr_Private_mat2v2float = OpTypePointer Private %mat2v2float %globalMatrix = OpVariable %_ptr_Private_mat2v2float Private -%24 = OpConstantComposite %v2float %float_1 %float_1 -%25 = OpConstantComposite %mat2v2float %24 %24 -%void = OpTypeVoid -%28 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%31 = OpConstantComposite %v2float %float_0 %float_0 + %24 = OpConstantComposite %v2float %float_1 %float_1 + %25 = OpConstantComposite %mat2v2float %24 %24 + %void = OpTypeVoid + %28 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %31 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%35 = OpTypeFunction %v4float %_ptr_Function_v2float + %35 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function__arr_float_int_2 = OpTypePointer Function %_arr_float_int_2 %_ptr_Function_mat2v2float = OpTypePointer Function %mat2v2float -%float_2 = OpConstant %float 2 -%float_3 = OpConstant %float 3 -%45 = OpConstantComposite %v2float %float_0 %float_1 -%46 = OpConstantComposite %v2float %float_2 %float_3 -%47 = OpConstantComposite %mat2v2float %45 %46 + %float_2 = OpConstant %float 2 + %float_3 = OpConstant %float 3 + %45 = OpConstantComposite %v2float %float_0 %float_1 + %46 = OpConstantComposite %v2float %float_2 %float_3 + %47 = OpConstantComposite %mat2v2float %45 %46 %_ptr_Private_float = OpTypePointer Private %float %_ptr_Function_float = OpTypePointer Function %float %_ptr_Private_v2float = OpTypePointer Private %v2float %_entrypoint_v = OpFunction %void None %28 -%29 = OpLabel -%32 = OpVariable %_ptr_Function_v2float Function -OpStore %32 %31 -%34 = OpFunctionCall %v4float %main %32 -OpStore %sk_FragColor %34 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %35 -%36 = OpFunctionParameter %_ptr_Function_v2float -%37 = OpLabel -%localArray = OpVariable %_ptr_Function__arr_float_int_2 Function + %29 = OpLabel + %32 = OpVariable %_ptr_Function_v2float Function + OpStore %32 %31 + %34 = OpFunctionCall %v4float %main %32 + OpStore %sk_FragColor %34 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %35 + %36 = OpFunctionParameter %_ptr_Function_v2float + %37 = OpLabel + %localArray = OpVariable %_ptr_Function__arr_float_int_2 Function %localMatrix = OpVariable %_ptr_Function_mat2v2float Function -OpStore %zero %int_0 -%19 = OpCompositeConstruct %_arr_float_int_2 %float_1 %float_1 -OpStore %globalArray %19 -OpStore %globalMatrix %25 -%40 = OpCompositeConstruct %_arr_float_int_2 %float_0 %float_1 -OpStore %localArray %40 -OpStore %localMatrix %47 -%48 = OpLoad %int %zero -%49 = OpAccessChain %_ptr_Private_float %globalArray %48 -%51 = OpLoad %float %49 -%52 = OpLoad %int %zero -%53 = OpAccessChain %_ptr_Function_float %localArray %52 -%55 = OpLoad %float %53 -%56 = OpFMul %float %51 %55 -%57 = OpLoad %int %zero -%58 = OpVectorExtractDynamic %float %24 %57 -%59 = OpLoad %int %zero -%60 = OpVectorExtractDynamic %float %24 %59 -%61 = OpFMul %float %58 %60 -%62 = OpLoad %int %zero -%63 = OpAccessChain %_ptr_Private_v2float %globalMatrix %62 -%65 = OpLoad %v2float %63 -%66 = OpLoad %int %zero -%67 = OpAccessChain %_ptr_Function_v2float %localMatrix %66 -%68 = OpLoad %v2float %67 -%69 = OpFMul %v2float %65 %68 -%70 = OpCompositeExtract %float %69 0 -%71 = OpCompositeExtract %float %69 1 -%72 = OpCompositeConstruct %v4float %56 %61 %70 %71 -OpReturnValue %72 -OpFunctionEnd + OpStore %zero %int_0 + %19 = OpCompositeConstruct %_arr_float_int_2 %float_1 %float_1 + OpStore %globalArray %19 + OpStore %globalMatrix %25 + %40 = OpCompositeConstruct %_arr_float_int_2 %float_0 %float_1 + OpStore %localArray %40 + OpStore %localMatrix %47 + %48 = OpLoad %int %zero + %49 = OpAccessChain %_ptr_Private_float %globalArray %48 + %51 = OpLoad %float %49 + %52 = OpLoad %int %zero + %53 = OpAccessChain %_ptr_Function_float %localArray %52 + %55 = OpLoad %float %53 + %56 = OpFMul %float %51 %55 + %57 = OpLoad %int %zero + %58 = OpVectorExtractDynamic %float %24 %57 + %59 = OpLoad %int %zero + %60 = OpVectorExtractDynamic %float %24 %59 + %61 = OpFMul %float %58 %60 + %62 = OpLoad %int %zero + %63 = OpAccessChain %_ptr_Private_v2float %globalMatrix %62 + %65 = OpLoad %v2float %63 + %66 = OpLoad %int %zero + %67 = OpAccessChain %_ptr_Function_v2float %localMatrix %66 + %68 = OpLoad %v2float %67 + %69 = OpFMul %v2float %65 %68 + %70 = OpCompositeExtract %float %69 0 + %71 = OpCompositeExtract %float %69 1 + %72 = OpCompositeConstruct %v4float %56 %61 %70 %71 + OpReturnValue %72 + OpFunctionEnd diff --git a/tests/sksl/shared/ConstantCompositeAccessViaDynamicIndex.skrp b/tests/sksl/shared/ConstantCompositeAccessViaDynamicIndex.skrp index 420acd9e8d65..c398be5c8f02 100644 --- a/tests/sksl/shared/ConstantCompositeAccessViaDynamicIndex.skrp +++ b/tests/sksl/shared/ConstantCompositeAccessViaDynamicIndex.skrp @@ -1,39 +1,35 @@ +20 instructions + [immutable slots] -zero = 0 -globalArray[0] = 0x3F800000 (1.0) -globalArray[1] = 0x3F800000 (1.0) -globalVector(0) = 0x3F800000 (1.0) -globalVector(1) = 0x3F800000 (1.0) -globalMatrix(0) = 0x3F800000 (1.0) -globalMatrix(1) = 0x3F800000 (1.0) -globalMatrix(2) = 0x3F800000 (1.0) -globalMatrix(3) = 0x3F800000 (1.0) -localArray[0] = 0 -localArray[1] = 0x3F800000 (1.0) -localVector(0) = 0x3F800000 (1.0) -localVector(1) = 0x3F800000 (1.0) -localMatrix(0) = 0 -localMatrix(1) = 0x3F800000 (1.0) -localMatrix(2) = 0x40000000 (2.0) -localMatrix(3) = 0x40400000 (3.0) +i0 = 0 +i1 = 0x3F800000 (1.0) +i2 = 0x3F800000 (1.0) +i3 = 0x3F800000 (1.0) +i4 = 0x3F800000 (1.0) +i5 = 0x3F800000 (1.0) +i6 = 0x3F800000 (1.0) +i7 = 0 +i8 = 0x3F800000 (1.0) +i9 = 0x40000000 (2.0) +i10 = 0x40400000 (3.0) store_src_rg v0..1 = src.rg init_lane_masks CondMask = LoopMask = RetMask = true -copy_slot_unmasked $6 = zero -copy_from_indirect_unmasked $0 = Indirect(globalArray[0] + $6) -copy_slot_unmasked $6 = zero -copy_from_indirect_unmasked $1 = Indirect(localArray[0] + $6) +copy_constant $6 = 0 +copy_from_indirect_uniform_unm $0 = Indirect(i1 [0x3F800000 (1.0)] + $6) +copy_constant $6 = 0 +copy_from_indirect_uniform_unm $1 = Indirect(i0 [0] + $6) mul_float $0 *= $1 -copy_slot_unmasked $6 = zero -copy_from_indirect_unmasked $1 = Indirect(globalVector(0) + $6) -copy_slot_unmasked $6 = zero -copy_from_indirect_unmasked $2 = Indirect(localVector(0) + $6) +copy_constant $6 = 0 +copy_from_indirect_uniform_unm $1 = Indirect(i1 [0x3F800000 (1.0)] + $6) +copy_constant $6 = 0 +copy_from_indirect_uniform_unm $2 = Indirect(i5 [0x3F800000 (1.0)] + $6) mul_float $1 *= $2 -copy_slot_unmasked $6 = zero +copy_constant $6 = 0 mul_imm_int $6 *= 0x00000002 -copy_from_indirect_unmasked $2..3 = Indirect(globalMatrix(0..1) + $6) -copy_slot_unmasked $6 = zero +copy_from_indirect_uniform_unm $2..3 = Indirect(i3..4 [0x3F800000 (1.0), 0x3F800000 (1.0)] + $6) +copy_constant $6 = 0 mul_imm_int $6 *= 0x00000002 -copy_from_indirect_unmasked $4..5 = Indirect(localMatrix(0..1) + $6) +copy_from_indirect_uniform_unm $4..5 = Indirect(i7..8 [0, 0x3F800000 (1.0)] + $6) mul_2_floats $2..3 *= $4..5 load_src src.rgba = $0..3 diff --git a/tests/sksl/shared/ConstantCompositeAccessViaDynamicIndex.wgsl b/tests/sksl/shared/ConstantCompositeAccessViaDynamicIndex.wgsl new file mode 100644 index 000000000000..2fc8bc4eced4 --- /dev/null +++ b/tests/sksl/shared/ConstantCompositeAccessViaDynamicIndex.wgsl @@ -0,0 +1,25 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +var zero: i32 = 0; +const globalArray: array = array(1.0, 1.0); +const globalVector: vec2 = vec2(1.0); +const globalMatrix: mat2x2 = mat2x2(1.0, 1.0, 1.0, 1.0); +fn main(_skParam0: vec2) -> vec4 { + { + const localArray: array = array(0.0, 1.0); + const localVector: vec2 = vec2(1.0); + const localMatrix: mat2x2 = mat2x2(0.0, 1.0, 2.0, 3.0); + return vec4(globalArray[zero] * localArray[zero], globalVector[zero] * localVector[zero], globalMatrix[zero] * localMatrix[zero]); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/ConstantIf.asm.frag b/tests/sksl/shared/ConstantIf.asm.frag index 6ff140177ee8..c8e9e88d6986 100644 --- a/tests/sksl/shared/ConstantIf.asm.frag +++ b/tests/sksl/shared/ConstantIf.asm.frag @@ -1,114 +1,114 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %a "a" -OpName %b "b" -OpName %c "c" -OpName %d "d" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %54 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %a "a" + OpName %b "b" + OpName %c "c" + OpName %d "d" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %54 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%int = OpTypeInt 32 1 + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %int = OpTypeInt 32 1 %_ptr_Function_int = OpTypePointer Function %int -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 -%int_5 = OpConstant %int 5 -%false = OpConstantFalse %bool -%true = OpConstantTrue %bool + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 + %int_5 = OpConstant %int 5 + %false = OpConstantFalse %bool + %true = OpConstantTrue %bool %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%a = OpVariable %_ptr_Function_int Function -%b = OpVariable %_ptr_Function_int Function -%c = OpVariable %_ptr_Function_int Function -%d = OpVariable %_ptr_Function_int Function -%47 = OpVariable %_ptr_Function_v4float Function -OpStore %a %int_0 -OpStore %b %int_0 -OpStore %c %int_0 -OpStore %d %int_0 -OpStore %a %int_1 -OpStore %b %int_2 -OpStore %c %int_5 -OpSelectionMerge %39 None -OpBranchConditional %true %38 %39 -%38 = OpLabel -OpBranch %39 -%39 = OpLabel -%40 = OpPhi %bool %false %25 %true %38 -OpSelectionMerge %42 None -OpBranchConditional %40 %41 %42 -%41 = OpLabel -OpBranch %42 -%42 = OpLabel -%43 = OpPhi %bool %false %39 %true %41 -OpSelectionMerge %45 None -OpBranchConditional %43 %44 %45 -%44 = OpLabel -OpBranch %45 -%45 = OpLabel -%46 = OpPhi %bool %false %42 %true %44 -OpSelectionMerge %51 None -OpBranchConditional %46 %49 %50 -%49 = OpLabel -%52 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%54 = OpLoad %v4float %52 -OpStore %47 %54 -OpBranch %51 -%50 = OpLabel -%55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%56 = OpLoad %v4float %55 -OpStore %47 %56 -OpBranch %51 -%51 = OpLabel -%57 = OpLoad %v4float %47 -OpReturnValue %57 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %a = OpVariable %_ptr_Function_int Function + %b = OpVariable %_ptr_Function_int Function + %c = OpVariable %_ptr_Function_int Function + %d = OpVariable %_ptr_Function_int Function + %47 = OpVariable %_ptr_Function_v4float Function + OpStore %a %int_0 + OpStore %b %int_0 + OpStore %c %int_0 + OpStore %d %int_0 + OpStore %a %int_1 + OpStore %b %int_2 + OpStore %c %int_5 + OpSelectionMerge %39 None + OpBranchConditional %true %38 %39 + %38 = OpLabel + OpBranch %39 + %39 = OpLabel + %40 = OpPhi %bool %false %25 %true %38 + OpSelectionMerge %42 None + OpBranchConditional %40 %41 %42 + %41 = OpLabel + OpBranch %42 + %42 = OpLabel + %43 = OpPhi %bool %false %39 %true %41 + OpSelectionMerge %45 None + OpBranchConditional %43 %44 %45 + %44 = OpLabel + OpBranch %45 + %45 = OpLabel + %46 = OpPhi %bool %false %42 %true %44 + OpSelectionMerge %51 None + OpBranchConditional %46 %49 %50 + %49 = OpLabel + %52 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %54 = OpLoad %v4float %52 + OpStore %47 %54 + OpBranch %51 + %50 = OpLabel + %55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %56 = OpLoad %v4float %55 + OpStore %47 %56 + OpBranch %51 + %51 = OpLabel + %57 = OpLoad %v4float %47 + OpReturnValue %57 + OpFunctionEnd diff --git a/tests/sksl/shared/ConstantIf.skrp b/tests/sksl/shared/ConstantIf.skrp index 78d926dc0775..9dc9fd150513 100644 --- a/tests/sksl/shared/ConstantIf.skrp +++ b/tests/sksl/shared/ConstantIf.skrp @@ -1,5 +1,7 @@ +22 instructions + [immutable slots] -d = 0 +i0 = 0 store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -15,7 +17,7 @@ bitwise_and_int $0 &= $1 copy_slot_unmasked $1 = c cmpeq_imm_int $1 = equal($1, 0x00000005) bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = d +copy_constant $1 = 0 cmpeq_imm_int $1 = equal($1, 0) bitwise_and_int $0 &= $1 swizzle_4 $0..3 = ($0..3).xxxx diff --git a/tests/sksl/shared/ConstantIf.wgsl b/tests/sksl/shared/ConstantIf.wgsl index c15c605260d7..7b8c9565b686 100644 --- a/tests/sksl/shared/ConstantIf.wgsl +++ b/tests/sksl/shared/ConstantIf.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -20,7 +21,7 @@ fn main(_skParam0: vec2) -> vec4 { a = 1; b = 2; c = 5; - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((a == 1 && b == 2) && c == 5) && d == 0)); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((a == 1) && (b == 2)) && (c == 5)) && (d == 0))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/shared/Control.asm.frag b/tests/sksl/shared/Control.asm.frag index 5f52710b0dfb..536ebc2020d8 100644 --- a/tests/sksl/shared/Control.asm.frag +++ b/tests/sksl/shared/Control.asm.frag @@ -1,142 +1,142 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "unknownInput" -OpName %main "main" -OpName %i "i" -OpName %i_0 "i" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %38 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %49 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %53 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "unknownInput" + OpName %main "main" + OpName %i "i" + OpName %i_0 "i" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %38 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %49 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %53 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%14 = OpTypeFunction %void + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %14 = OpTypeFunction %void %_ptr_Uniform_float = OpTypePointer Uniform %float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%float_5 = OpConstant %float 5 -%float_0_75 = OpConstant %float 0.75 -%27 = OpConstantComposite %v4float %float_0_75 %float_0_75 %float_0_75 %float_0_75 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %float_5 = OpConstant %float 5 + %float_0_75 = OpConstant %float 0.75 + %27 = OpConstantComposite %v4float %float_0_75 %float_0_75 %float_0_75 %float_0_75 %_ptr_Function_int = OpTypePointer Function %int -%int_10 = OpConstant %int 10 -%float_0_5 = OpConstant %float 0.5 -%int_1 = OpConstant %int 1 -%float_0_25 = OpConstant %float 0.25 -%51 = OpConstantComposite %v4float %float_0_25 %float_0_25 %float_0_25 %float_0_25 -%int_2 = OpConstant %int 2 -%int_100 = OpConstant %int 100 -%main = OpFunction %void None %14 -%15 = OpLabel -%i = OpVariable %_ptr_Function_int Function -%i_0 = OpVariable %_ptr_Function_int Function -%16 = OpAccessChain %_ptr_Uniform_float %10 %int_0 -%20 = OpLoad %float %16 -%22 = OpFOrdGreaterThan %bool %20 %float_5 -OpSelectionMerge %25 None -OpBranchConditional %22 %23 %24 -%23 = OpLabel -OpStore %sk_FragColor %27 -OpBranch %25 -%24 = OpLabel -OpKill -%25 = OpLabel -OpStore %i %int_0 -OpBranch %30 -%30 = OpLabel -OpLoopMerge %34 %33 None -OpBranch %31 -%31 = OpLabel -%35 = OpLoad %int %i -%37 = OpSLessThan %bool %35 %int_10 -OpBranchConditional %37 %32 %34 -%32 = OpLabel -%38 = OpLoad %v4float %sk_FragColor -%40 = OpVectorTimesScalar %v4float %38 %float_0_5 -OpStore %sk_FragColor %40 -%41 = OpLoad %int %i -%43 = OpIAdd %int %41 %int_1 -OpStore %i %43 -OpBranch %33 -%33 = OpLabel -OpBranch %30 -%34 = OpLabel -OpBranch %44 -%44 = OpLabel -OpLoopMerge %48 %47 None -OpBranch %45 -%45 = OpLabel -%49 = OpLoad %v4float %sk_FragColor -%52 = OpFAdd %v4float %49 %51 -OpStore %sk_FragColor %52 -OpBranch %46 -%46 = OpLabel -OpBranch %47 -%47 = OpLabel -%53 = OpLoad %v4float %sk_FragColor -%54 = OpCompositeExtract %float %53 0 -%55 = OpFOrdLessThan %bool %54 %float_0_75 -OpBranchConditional %55 %44 %48 -%48 = OpLabel -OpStore %i_0 %int_0 -OpBranch %57 -%57 = OpLabel -OpLoopMerge %61 %60 None -OpBranch %58 -%58 = OpLabel -%62 = OpLoad %int %i_0 -%63 = OpSLessThan %bool %62 %int_10 -OpBranchConditional %63 %59 %61 -%59 = OpLabel -%64 = OpLoad %int %i_0 -%66 = OpSMod %int %64 %int_2 -%67 = OpIEqual %bool %66 %int_1 -OpSelectionMerge %70 None -OpBranchConditional %67 %68 %69 -%68 = OpLabel -OpBranch %61 -%69 = OpLabel -%71 = OpLoad %int %i_0 -%73 = OpSGreaterThan %bool %71 %int_100 -OpSelectionMerge %76 None -OpBranchConditional %73 %74 %75 -%74 = OpLabel -OpReturn -%75 = OpLabel -OpBranch %60 -%76 = OpLabel -OpBranch %70 -%70 = OpLabel -OpBranch %60 -%60 = OpLabel -%77 = OpLoad %int %i_0 -%78 = OpIAdd %int %77 %int_1 -OpStore %i_0 %78 -OpBranch %57 -%61 = OpLabel -OpReturn -OpFunctionEnd + %int_10 = OpConstant %int 10 + %float_0_5 = OpConstant %float 0.5 + %int_1 = OpConstant %int 1 + %float_0_25 = OpConstant %float 0.25 + %51 = OpConstantComposite %v4float %float_0_25 %float_0_25 %float_0_25 %float_0_25 + %int_2 = OpConstant %int 2 + %int_100 = OpConstant %int 100 + %main = OpFunction %void None %14 + %15 = OpLabel + %i = OpVariable %_ptr_Function_int Function + %i_0 = OpVariable %_ptr_Function_int Function + %16 = OpAccessChain %_ptr_Uniform_float %10 %int_0 + %20 = OpLoad %float %16 + %22 = OpFOrdGreaterThan %bool %20 %float_5 + OpSelectionMerge %25 None + OpBranchConditional %22 %23 %24 + %23 = OpLabel + OpStore %sk_FragColor %27 + OpBranch %25 + %24 = OpLabel + OpKill + %25 = OpLabel + OpStore %i %int_0 + OpBranch %30 + %30 = OpLabel + OpLoopMerge %34 %33 None + OpBranch %31 + %31 = OpLabel + %35 = OpLoad %int %i + %37 = OpSLessThan %bool %35 %int_10 + OpBranchConditional %37 %32 %34 + %32 = OpLabel + %38 = OpLoad %v4float %sk_FragColor + %40 = OpVectorTimesScalar %v4float %38 %float_0_5 + OpStore %sk_FragColor %40 + %41 = OpLoad %int %i + %43 = OpIAdd %int %41 %int_1 + OpStore %i %43 + OpBranch %33 + %33 = OpLabel + OpBranch %30 + %34 = OpLabel + OpBranch %44 + %44 = OpLabel + OpLoopMerge %48 %47 None + OpBranch %45 + %45 = OpLabel + %49 = OpLoad %v4float %sk_FragColor + %52 = OpFAdd %v4float %49 %51 + OpStore %sk_FragColor %52 + OpBranch %46 + %46 = OpLabel + OpBranch %47 + %47 = OpLabel + %53 = OpLoad %v4float %sk_FragColor + %54 = OpCompositeExtract %float %53 0 + %55 = OpFOrdLessThan %bool %54 %float_0_75 + OpBranchConditional %55 %44 %48 + %48 = OpLabel + OpStore %i_0 %int_0 + OpBranch %57 + %57 = OpLabel + OpLoopMerge %61 %60 None + OpBranch %58 + %58 = OpLabel + %62 = OpLoad %int %i_0 + %63 = OpSLessThan %bool %62 %int_10 + OpBranchConditional %63 %59 %61 + %59 = OpLabel + %64 = OpLoad %int %i_0 + %66 = OpSMod %int %64 %int_2 + %67 = OpIEqual %bool %66 %int_1 + OpSelectionMerge %70 None + OpBranchConditional %67 %68 %69 + %68 = OpLabel + OpBranch %61 + %69 = OpLabel + %71 = OpLoad %int %i_0 + %73 = OpSGreaterThan %bool %71 %int_100 + OpSelectionMerge %76 None + OpBranchConditional %73 %74 %75 + %74 = OpLabel + OpReturn + %75 = OpLabel + OpBranch %60 + %76 = OpLabel + OpBranch %70 + %70 = OpLabel + OpBranch %60 + %60 = OpLabel + %77 = OpLoad %int %i_0 + %78 = OpIAdd %int %77 %int_1 + OpStore %i_0 %78 + OpBranch %57 + %61 = OpLabel + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/Control.wgsl b/tests/sksl/shared/Control.wgsl index b023e74f956c..ca5d596a0dfe 100644 --- a/tests/sksl/shared/Control.wgsl +++ b/tests/sksl/shared/Control.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; @@ -10,7 +11,7 @@ struct _GlobalUniforms { @binding(0) @group(0) var _globalUniforms: _GlobalUniforms; fn main(_stageOut: ptr) { { - if (_globalUniforms.unknownInput > 5.0) { + if _globalUniforms.unknownInput > 5.0 { { (*_stageOut).sk_FragColor = vec4(0.75); } @@ -42,10 +43,10 @@ fn main(_stageOut: ptr) { var i: i32 = 0; loop { { - if (i % 2 == 1) { + if (i % 2) == 1 { break; } else { - if (i > 100) { + if i > 100 { return ; } else { continue; diff --git a/tests/sksl/shared/DeadDoWhileLoop.asm.frag b/tests/sksl/shared/DeadDoWhileLoop.asm.frag index cbd513a09b12..75c0245a470a 100644 --- a/tests/sksl/shared/DeadDoWhileLoop.asm.frag +++ b/tests/sksl/shared/DeadDoWhileLoop.asm.frag @@ -1,40 +1,40 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%11 = OpTypeFunction %void -%float_1 = OpConstant %float 1 -%19 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 -%false = OpConstantFalse %bool -%main = OpFunction %void None %11 -%12 = OpLabel -OpBranch %13 -%13 = OpLabel -OpLoopMerge %17 %16 None -OpBranch %14 -%14 = OpLabel -OpStore %sk_FragColor %19 -OpBranch %15 -%15 = OpLabel -OpBranch %16 -%16 = OpLabel -OpBranchConditional %false %13 %17 -%17 = OpLabel -OpReturn -OpFunctionEnd + %void = OpTypeVoid + %11 = OpTypeFunction %void + %float_1 = OpConstant %float 1 + %19 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %false = OpConstantFalse %bool + %main = OpFunction %void None %11 + %12 = OpLabel + OpBranch %13 + %13 = OpLabel + OpLoopMerge %17 %16 None + OpBranch %14 + %14 = OpLabel + OpStore %sk_FragColor %19 + OpBranch %15 + %15 = OpLabel + OpBranch %16 + %16 = OpLabel + OpBranchConditional %false %13 %17 + %17 = OpLabel + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/DeadDoWhileLoop.wgsl b/tests/sksl/shared/DeadDoWhileLoop.wgsl index 6779d4d613a0..c9326f7fa036 100644 --- a/tests/sksl/shared/DeadDoWhileLoop.wgsl +++ b/tests/sksl/shared/DeadDoWhileLoop.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/shared/DeadGlobals.asm.frag b/tests/sksl/shared/DeadGlobals.asm.frag index d4ffc392f11c..727a91ac40fe 100644 --- a/tests/sksl/shared/DeadGlobals.asm.frag +++ b/tests/sksl/shared/DeadGlobals.asm.frag @@ -1,59 +1,59 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %30 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %30 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%26 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%30 = OpLoad %v4float %26 -OpReturnValue %30 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %26 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %30 = OpLoad %v4float %26 + OpReturnValue %30 + OpFunctionEnd diff --git a/tests/sksl/shared/DeadGlobals.skrp b/tests/sksl/shared/DeadGlobals.skrp index b81e214ed244..266b477ed11a 100644 --- a/tests/sksl/shared/DeadGlobals.skrp +++ b/tests/sksl/shared/DeadGlobals.skrp @@ -1,3 +1,5 @@ +4 instructions + store_src_rg v0..1 = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_4_uniforms $0..3 = colorGreen diff --git a/tests/sksl/shared/DeadGlobals.wgsl b/tests/sksl/shared/DeadGlobals.wgsl new file mode 100644 index 000000000000..42cd7e2ca0bf --- /dev/null +++ b/tests/sksl/shared/DeadGlobals.wgsl @@ -0,0 +1,23 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + { + return _globalUniforms.colorGreen; + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/DeadIfStatement.asm.frag b/tests/sksl/shared/DeadIfStatement.asm.frag index d4ffc392f11c..727a91ac40fe 100644 --- a/tests/sksl/shared/DeadIfStatement.asm.frag +++ b/tests/sksl/shared/DeadIfStatement.asm.frag @@ -1,59 +1,59 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %30 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %30 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%26 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%30 = OpLoad %v4float %26 -OpReturnValue %30 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %26 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %30 = OpLoad %v4float %26 + OpReturnValue %30 + OpFunctionEnd diff --git a/tests/sksl/shared/DeadIfStatement.skrp b/tests/sksl/shared/DeadIfStatement.skrp index 6ddb6856750c..65e091b7955d 100644 --- a/tests/sksl/shared/DeadIfStatement.skrp +++ b/tests/sksl/shared/DeadIfStatement.skrp @@ -1,3 +1,5 @@ +6 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_4_uniforms $0..3 = colorGreen diff --git a/tests/sksl/shared/DeadIfStatement.wgsl b/tests/sksl/shared/DeadIfStatement.wgsl new file mode 100644 index 000000000000..d86a7bb82825 --- /dev/null +++ b/tests/sksl/shared/DeadIfStatement.wgsl @@ -0,0 +1,24 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + return _globalUniforms.colorGreen; + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/DeadLoopVariable.asm.frag b/tests/sksl/shared/DeadLoopVariable.asm.frag index 6a6e25a7f794..e63944077136 100644 --- a/tests/sksl/shared/DeadLoopVariable.asm.frag +++ b/tests/sksl/shared/DeadLoopVariable.asm.frag @@ -1,74 +1,74 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %x "x" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %40 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %x "x" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %40 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%int = OpTypeInt 32 1 + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %int = OpTypeInt 32 1 %_ptr_Function_int = OpTypePointer Function %int -%int_0 = OpConstant %int 0 -%int_4 = OpConstant %int 4 + %int_0 = OpConstant %int 0 + %int_4 = OpConstant %int 4 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%x = OpVariable %_ptr_Function_int Function -OpStore %x %int_0 -OpBranch %30 -%30 = OpLabel -OpLoopMerge %34 %33 None -OpBranch %31 -%31 = OpLabel -%35 = OpLoad %int %x -%37 = OpSLessThan %bool %35 %int_4 -OpBranchConditional %37 %32 %34 -%32 = OpLabel -OpBranch %34 -%33 = OpLabel -OpBranch %30 -%34 = OpLabel -%38 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%40 = OpLoad %v4float %38 -OpReturnValue %40 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %x = OpVariable %_ptr_Function_int Function + OpStore %x %int_0 + OpBranch %30 + %30 = OpLabel + OpLoopMerge %34 %33 None + OpBranch %31 + %31 = OpLabel + %35 = OpLoad %int %x + %37 = OpSLessThan %bool %35 %int_4 + OpBranchConditional %37 %32 %34 + %32 = OpLabel + OpBranch %34 + %33 = OpLabel + OpBranch %30 + %34 = OpLabel + %38 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %40 = OpLoad %v4float %38 + OpReturnValue %40 + OpFunctionEnd diff --git a/tests/sksl/shared/DeadLoopVariable.skrp b/tests/sksl/shared/DeadLoopVariable.skrp index 08ce9c07f6b0..fb60285b1352 100644 --- a/tests/sksl/shared/DeadLoopVariable.skrp +++ b/tests/sksl/shared/DeadLoopVariable.skrp @@ -1,5 +1,7 @@ +14 instructions + [immutable slots] -x = 0 +i0 = 0 store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -9,7 +11,7 @@ label label 0x00000002 branch_if_all_lanes_active branch_if_all_lanes_active +8 (label 0 at #14) mask_off_loop_mask LoopMask &= ~(CondMask & LoopMask & RetMask) label label 0x00000001 -copy_slot_unmasked $1 = x +copy_constant $1 = 0 cmplt_imm_int $1 = lessThan($1, 0x00000004) merge_loop_mask LoopMask &= $1 stack_rewind diff --git a/tests/sksl/shared/DeadLoopVariable.wgsl b/tests/sksl/shared/DeadLoopVariable.wgsl new file mode 100644 index 000000000000..c86f7b06080c --- /dev/null +++ b/tests/sksl/shared/DeadLoopVariable.wgsl @@ -0,0 +1,35 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + { + var x: i32 = 0; + loop { + if x < 4 { + { + break; + } + } else { + break; + } + } + } + return _globalUniforms.colorGreen; + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/DeadReturn.asm.frag b/tests/sksl/shared/DeadReturn.asm.frag index 40c57d1435c2..50062acb32a7 100644 --- a/tests/sksl/shared/DeadReturn.asm.frag +++ b/tests/sksl/shared/DeadReturn.asm.frag @@ -1,193 +1,193 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %scratchVar "scratchVar" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %test_flat_b "test_flat_b" -OpName %test_if_b "test_if_b" -OpName %test_else_b "test_else_b" -OpName %test_loop_if_b "test_loop_if_b" -OpName %x "x" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %18 Binding 0 -OpDecorate %18 DescriptorSet 0 -OpDecorate %37 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %51 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %69 RelaxedPrecision -OpDecorate %100 RelaxedPrecision -OpDecorate %102 RelaxedPrecision -OpDecorate %103 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %scratchVar "scratchVar" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %test_flat_b "test_flat_b" + OpName %test_if_b "test_if_b" + OpName %test_else_b "test_else_b" + OpName %test_loop_if_b "test_loop_if_b" + OpName %x "x" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %18 Binding 0 + OpDecorate %18 DescriptorSet 0 + OpDecorate %37 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %69 RelaxedPrecision + OpDecorate %100 RelaxedPrecision + OpDecorate %102 RelaxedPrecision + OpDecorate %103 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%int = OpTypeInt 32 1 + %int = OpTypeInt 32 1 %_ptr_Private_int = OpTypePointer Private %int -%scratchVar = OpVariable %_ptr_Private_int Private -%int_0 = OpConstant %int 0 + %scratchVar = OpVariable %_ptr_Private_int Private + %int_0 = OpConstant %int 0 %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%18 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%23 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%27 = OpConstantComposite %v2float %float_0 %float_0 + %18 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %23 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %27 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%31 = OpTypeFunction %bool -%true = OpConstantTrue %bool + %31 = OpTypeFunction %bool + %true = OpConstantTrue %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_1 = OpConstant %int 1 -%false = OpConstantFalse %bool + %int_1 = OpConstant %int 1 + %false = OpConstantFalse %bool %_ptr_Function_int = OpTypePointer Function %int -%78 = OpTypeFunction %v4float %_ptr_Function_v2float + %78 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float %_entrypoint_v = OpFunction %void None %23 -%24 = OpLabel -%28 = OpVariable %_ptr_Function_v2float Function -OpStore %28 %27 -%30 = OpFunctionCall %v4float %main %28 -OpStore %sk_FragColor %30 -OpReturn -OpFunctionEnd + %24 = OpLabel + %28 = OpVariable %_ptr_Function_v2float Function + OpStore %28 %27 + %30 = OpFunctionCall %v4float %main %28 + OpStore %sk_FragColor %30 + OpReturn + OpFunctionEnd %test_flat_b = OpFunction %bool None %31 -%32 = OpLabel -OpReturnValue %true -OpFunctionEnd -%test_if_b = OpFunction %bool None %31 -%34 = OpLabel -%35 = OpAccessChain %_ptr_Uniform_v4float %18 %int_0 -%37 = OpLoad %v4float %35 -%38 = OpCompositeExtract %float %37 1 -%39 = OpFOrdGreaterThan %bool %38 %float_0 -OpSelectionMerge %42 None -OpBranchConditional %39 %40 %41 -%40 = OpLabel -OpReturnValue %true -%41 = OpLabel -%44 = OpLoad %int %scratchVar -%45 = OpIAdd %int %44 %int_1 -OpStore %scratchVar %45 -OpBranch %42 -%42 = OpLabel -%46 = OpLoad %int %scratchVar -%47 = OpIAdd %int %46 %int_1 -OpStore %scratchVar %47 -OpReturnValue %false -OpFunctionEnd + %32 = OpLabel + OpReturnValue %true + OpFunctionEnd + %test_if_b = OpFunction %bool None %31 + %34 = OpLabel + %35 = OpAccessChain %_ptr_Uniform_v4float %18 %int_0 + %37 = OpLoad %v4float %35 + %38 = OpCompositeExtract %float %37 1 + %39 = OpFOrdGreaterThan %bool %38 %float_0 + OpSelectionMerge %42 None + OpBranchConditional %39 %40 %41 + %40 = OpLabel + OpReturnValue %true + %41 = OpLabel + %44 = OpLoad %int %scratchVar + %45 = OpIAdd %int %44 %int_1 + OpStore %scratchVar %45 + OpBranch %42 + %42 = OpLabel + %46 = OpLoad %int %scratchVar + %47 = OpIAdd %int %46 %int_1 + OpStore %scratchVar %47 + OpReturnValue %false + OpFunctionEnd %test_else_b = OpFunction %bool None %31 -%49 = OpLabel -%50 = OpAccessChain %_ptr_Uniform_v4float %18 %int_0 -%51 = OpLoad %v4float %50 -%52 = OpCompositeExtract %float %51 1 -%53 = OpFOrdEqual %bool %52 %float_0 -OpSelectionMerge %56 None -OpBranchConditional %53 %54 %55 -%54 = OpLabel -OpReturnValue %false -%55 = OpLabel -OpReturnValue %true -%56 = OpLabel -OpUnreachable -OpFunctionEnd + %49 = OpLabel + %50 = OpAccessChain %_ptr_Uniform_v4float %18 %int_0 + %51 = OpLoad %v4float %50 + %52 = OpCompositeExtract %float %51 1 + %53 = OpFOrdEqual %bool %52 %float_0 + OpSelectionMerge %56 None + OpBranchConditional %53 %54 %55 + %54 = OpLabel + OpReturnValue %false + %55 = OpLabel + OpReturnValue %true + %56 = OpLabel + OpUnreachable + OpFunctionEnd %test_loop_if_b = OpFunction %bool None %31 -%57 = OpLabel -%x = OpVariable %_ptr_Function_int Function -OpStore %x %int_0 -OpBranch %60 -%60 = OpLabel -OpLoopMerge %64 %63 None -OpBranch %61 -%61 = OpLabel -%65 = OpLoad %int %x -%66 = OpSLessThanEqual %bool %65 %int_1 -OpBranchConditional %66 %62 %64 -%62 = OpLabel -%67 = OpAccessChain %_ptr_Uniform_v4float %18 %int_0 -%68 = OpLoad %v4float %67 -%69 = OpCompositeExtract %float %68 1 -%70 = OpFOrdEqual %bool %69 %float_0 -OpSelectionMerge %73 None -OpBranchConditional %70 %71 %72 -%71 = OpLabel -OpReturnValue %false -%72 = OpLabel -OpReturnValue %true -%73 = OpLabel -OpBranch %63 -%63 = OpLabel -%74 = OpLoad %int %x -%75 = OpIAdd %int %74 %int_1 -OpStore %x %75 -OpBranch %60 -%64 = OpLabel -%76 = OpLoad %int %scratchVar -%77 = OpIAdd %int %76 %int_1 -OpStore %scratchVar %77 -OpReturnValue %true -OpFunctionEnd -%main = OpFunction %v4float None %78 -%79 = OpFunctionParameter %_ptr_Function_v2float -%80 = OpLabel -%94 = OpVariable %_ptr_Function_v4float Function -OpStore %scratchVar %int_0 -%81 = OpFunctionCall %bool %test_flat_b -OpSelectionMerge %83 None -OpBranchConditional %81 %82 %83 -%82 = OpLabel -%84 = OpFunctionCall %bool %test_if_b -OpBranch %83 -%83 = OpLabel -%85 = OpPhi %bool %false %80 %84 %82 -OpSelectionMerge %87 None -OpBranchConditional %85 %86 %87 -%86 = OpLabel -%88 = OpFunctionCall %bool %test_else_b -OpBranch %87 -%87 = OpLabel -%89 = OpPhi %bool %false %83 %88 %86 -OpSelectionMerge %91 None -OpBranchConditional %89 %90 %91 -%90 = OpLabel -%92 = OpFunctionCall %bool %test_loop_if_b -OpBranch %91 -%91 = OpLabel -%93 = OpPhi %bool %false %87 %92 %90 -OpSelectionMerge %98 None -OpBranchConditional %93 %96 %97 -%96 = OpLabel -%99 = OpAccessChain %_ptr_Uniform_v4float %18 %int_0 -%100 = OpLoad %v4float %99 -OpStore %94 %100 -OpBranch %98 -%97 = OpLabel -%101 = OpAccessChain %_ptr_Uniform_v4float %18 %int_1 -%102 = OpLoad %v4float %101 -OpStore %94 %102 -OpBranch %98 -%98 = OpLabel -%103 = OpLoad %v4float %94 -OpReturnValue %103 -OpFunctionEnd + %57 = OpLabel + %x = OpVariable %_ptr_Function_int Function + OpStore %x %int_0 + OpBranch %60 + %60 = OpLabel + OpLoopMerge %64 %63 None + OpBranch %61 + %61 = OpLabel + %65 = OpLoad %int %x + %66 = OpSLessThanEqual %bool %65 %int_1 + OpBranchConditional %66 %62 %64 + %62 = OpLabel + %67 = OpAccessChain %_ptr_Uniform_v4float %18 %int_0 + %68 = OpLoad %v4float %67 + %69 = OpCompositeExtract %float %68 1 + %70 = OpFOrdEqual %bool %69 %float_0 + OpSelectionMerge %73 None + OpBranchConditional %70 %71 %72 + %71 = OpLabel + OpReturnValue %false + %72 = OpLabel + OpReturnValue %true + %73 = OpLabel + OpBranch %63 + %63 = OpLabel + %74 = OpLoad %int %x + %75 = OpIAdd %int %74 %int_1 + OpStore %x %75 + OpBranch %60 + %64 = OpLabel + %76 = OpLoad %int %scratchVar + %77 = OpIAdd %int %76 %int_1 + OpStore %scratchVar %77 + OpReturnValue %true + OpFunctionEnd + %main = OpFunction %v4float None %78 + %79 = OpFunctionParameter %_ptr_Function_v2float + %80 = OpLabel + %94 = OpVariable %_ptr_Function_v4float Function + OpStore %scratchVar %int_0 + %81 = OpFunctionCall %bool %test_flat_b + OpSelectionMerge %83 None + OpBranchConditional %81 %82 %83 + %82 = OpLabel + %84 = OpFunctionCall %bool %test_if_b + OpBranch %83 + %83 = OpLabel + %85 = OpPhi %bool %false %80 %84 %82 + OpSelectionMerge %87 None + OpBranchConditional %85 %86 %87 + %86 = OpLabel + %88 = OpFunctionCall %bool %test_else_b + OpBranch %87 + %87 = OpLabel + %89 = OpPhi %bool %false %83 %88 %86 + OpSelectionMerge %91 None + OpBranchConditional %89 %90 %91 + %90 = OpLabel + %92 = OpFunctionCall %bool %test_loop_if_b + OpBranch %91 + %91 = OpLabel + %93 = OpPhi %bool %false %87 %92 %90 + OpSelectionMerge %98 None + OpBranchConditional %93 %96 %97 + %96 = OpLabel + %99 = OpAccessChain %_ptr_Uniform_v4float %18 %int_0 + %100 = OpLoad %v4float %99 + OpStore %94 %100 + OpBranch %98 + %97 = OpLabel + %101 = OpAccessChain %_ptr_Uniform_v4float %18 %int_1 + %102 = OpLoad %v4float %101 + OpStore %94 %102 + OpBranch %98 + %98 = OpLabel + %103 = OpLoad %v4float %94 + OpReturnValue %103 + OpFunctionEnd diff --git a/tests/sksl/shared/DeadReturn.skrp b/tests/sksl/shared/DeadReturn.skrp index 50e4a5d0f4a1..7c285128876a 100644 --- a/tests/sksl/shared/DeadReturn.skrp +++ b/tests/sksl/shared/DeadReturn.skrp @@ -1,3 +1,5 @@ +94 instructions + store_src_rg xy = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_constant scratchVar = 0 diff --git a/tests/sksl/shared/DeadReturn.wgsl b/tests/sksl/shared/DeadReturn.wgsl index 017e6a00933a..92590af7b823 100644 --- a/tests/sksl/shared/DeadReturn.wgsl +++ b/tests/sksl/shared/DeadReturn.wgsl @@ -1,11 +1,12 @@ /* -:46:3 warning: code is unreachable +:47:3 warning: code is unreachable return bool(); ^^^^^^ */ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -26,7 +27,7 @@ fn test_flat_b() -> bool { } fn test_if_b() -> bool { { - if (_globalUniforms.colorGreen.y > 0.0) { + if _globalUniforms.colorGreen.y > 0.0 { { return true; } @@ -41,7 +42,7 @@ fn test_if_b() -> bool { } fn test_else_b() -> bool { { - if (_globalUniforms.colorGreen.y == 0.0) { + if _globalUniforms.colorGreen.y == 0.0 { { return false; } @@ -59,7 +60,7 @@ fn test_loop_if_b() -> bool { var x: i32 = 0; loop { { - if (_globalUniforms.colorGreen.y == 0.0) { + if _globalUniforms.colorGreen.y == 0.0 { { return false; } diff --git a/tests/sksl/shared/DeadReturnES3.asm.frag b/tests/sksl/shared/DeadReturnES3.asm.frag index 969bd56d3fbe..df111b7b7b44 100644 --- a/tests/sksl/shared/DeadReturnES3.asm.frag +++ b/tests/sksl/shared/DeadReturnES3.asm.frag @@ -1,286 +1,286 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %test_return_b "test_return_b" -OpName %test_break_b "test_break_b" -OpName %test_continue_b "test_continue_b" -OpName %test_if_return_b "test_if_return_b" -OpName %test_if_break_b "test_if_break_b" -OpName %test_else_b "test_else_b" -OpName %test_loop_return_b "test_loop_return_b" -OpName %test_loop_break_b "test_loop_break_b" -OpName %x "x" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %18 Binding 0 -OpDecorate %18 DescriptorSet 0 -OpDecorate %62 RelaxedPrecision -OpDecorate %63 RelaxedPrecision -OpDecorate %75 RelaxedPrecision -OpDecorate %76 RelaxedPrecision -OpDecorate %88 RelaxedPrecision -OpDecorate %89 RelaxedPrecision -OpDecorate %146 RelaxedPrecision -OpDecorate %148 RelaxedPrecision -OpDecorate %149 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %test_return_b "test_return_b" + OpName %test_break_b "test_break_b" + OpName %test_continue_b "test_continue_b" + OpName %test_if_return_b "test_if_return_b" + OpName %test_if_break_b "test_if_break_b" + OpName %test_else_b "test_else_b" + OpName %test_loop_return_b "test_loop_return_b" + OpName %test_loop_break_b "test_loop_break_b" + OpName %x "x" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %18 Binding 0 + OpDecorate %18 DescriptorSet 0 + OpDecorate %62 RelaxedPrecision + OpDecorate %63 RelaxedPrecision + OpDecorate %75 RelaxedPrecision + OpDecorate %76 RelaxedPrecision + OpDecorate %88 RelaxedPrecision + OpDecorate %89 RelaxedPrecision + OpDecorate %146 RelaxedPrecision + OpDecorate %148 RelaxedPrecision + OpDecorate %149 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%18 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%23 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%27 = OpConstantComposite %v2float %float_0 %float_0 + %18 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %23 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %27 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%31 = OpTypeFunction %bool -%true = OpConstantTrue %bool -%false = OpConstantFalse %bool + %31 = OpTypeFunction %bool + %true = OpConstantTrue %bool + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 %_ptr_Function_int = OpTypePointer Function %int -%int_1 = OpConstant %int 1 -%108 = OpTypeFunction %v4float %_ptr_Function_v2float + %int_1 = OpConstant %int 1 + %108 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float %_entrypoint_v = OpFunction %void None %23 -%24 = OpLabel -%28 = OpVariable %_ptr_Function_v2float Function -OpStore %28 %27 -%30 = OpFunctionCall %v4float %main %28 -OpStore %sk_FragColor %30 -OpReturn -OpFunctionEnd + %24 = OpLabel + %28 = OpVariable %_ptr_Function_v2float Function + OpStore %28 %27 + %30 = OpFunctionCall %v4float %main %28 + OpStore %sk_FragColor %30 + OpReturn + OpFunctionEnd %test_return_b = OpFunction %bool None %31 -%32 = OpLabel -OpBranch %33 -%33 = OpLabel -OpLoopMerge %37 %36 None -OpBranch %34 -%34 = OpLabel -OpReturnValue %true -%36 = OpLabel -OpBranchConditional %false %33 %37 -%37 = OpLabel -OpUnreachable -OpFunctionEnd + %32 = OpLabel + OpBranch %33 + %33 = OpLabel + OpLoopMerge %37 %36 None + OpBranch %34 + %34 = OpLabel + OpReturnValue %true + %36 = OpLabel + OpBranchConditional %false %33 %37 + %37 = OpLabel + OpUnreachable + OpFunctionEnd %test_break_b = OpFunction %bool None %31 -%40 = OpLabel -OpBranch %41 -%41 = OpLabel -OpLoopMerge %45 %44 None -OpBranch %42 -%42 = OpLabel -OpBranch %45 -%44 = OpLabel -OpBranchConditional %false %41 %45 -%45 = OpLabel -OpReturnValue %true -OpFunctionEnd + %40 = OpLabel + OpBranch %41 + %41 = OpLabel + OpLoopMerge %45 %44 None + OpBranch %42 + %42 = OpLabel + OpBranch %45 + %44 = OpLabel + OpBranchConditional %false %41 %45 + %45 = OpLabel + OpReturnValue %true + OpFunctionEnd %test_continue_b = OpFunction %bool None %31 -%46 = OpLabel -OpBranch %47 -%47 = OpLabel -OpLoopMerge %51 %50 None -OpBranch %48 -%48 = OpLabel -OpBranch %50 -%50 = OpLabel -OpBranchConditional %false %47 %51 -%51 = OpLabel -OpReturnValue %true -OpFunctionEnd + %46 = OpLabel + OpBranch %47 + %47 = OpLabel + OpLoopMerge %51 %50 None + OpBranch %48 + %48 = OpLabel + OpBranch %50 + %50 = OpLabel + OpBranchConditional %false %47 %51 + %51 = OpLabel + OpReturnValue %true + OpFunctionEnd %test_if_return_b = OpFunction %bool None %31 -%52 = OpLabel -OpBranch %53 -%53 = OpLabel -OpLoopMerge %57 %56 None -OpBranch %54 -%54 = OpLabel -%58 = OpAccessChain %_ptr_Uniform_v4float %18 %int_0 -%62 = OpLoad %v4float %58 -%63 = OpCompositeExtract %float %62 1 -%64 = OpFOrdGreaterThan %bool %63 %float_0 -OpSelectionMerge %67 None -OpBranchConditional %64 %65 %66 -%65 = OpLabel -OpReturnValue %true -%66 = OpLabel -OpBranch %57 -%67 = OpLabel -OpBranch %56 -%56 = OpLabel -OpBranchConditional %false %53 %57 -%57 = OpLabel -OpReturnValue %false -OpFunctionEnd + %52 = OpLabel + OpBranch %53 + %53 = OpLabel + OpLoopMerge %57 %56 None + OpBranch %54 + %54 = OpLabel + %58 = OpAccessChain %_ptr_Uniform_v4float %18 %int_0 + %62 = OpLoad %v4float %58 + %63 = OpCompositeExtract %float %62 1 + %64 = OpFOrdGreaterThan %bool %63 %float_0 + OpSelectionMerge %67 None + OpBranchConditional %64 %65 %66 + %65 = OpLabel + OpReturnValue %true + %66 = OpLabel + OpBranch %57 + %67 = OpLabel + OpBranch %56 + %56 = OpLabel + OpBranchConditional %false %53 %57 + %57 = OpLabel + OpReturnValue %false + OpFunctionEnd %test_if_break_b = OpFunction %bool None %31 -%68 = OpLabel -OpBranch %69 -%69 = OpLabel -OpLoopMerge %73 %72 None -OpBranch %70 -%70 = OpLabel -%74 = OpAccessChain %_ptr_Uniform_v4float %18 %int_0 -%75 = OpLoad %v4float %74 -%76 = OpCompositeExtract %float %75 1 -%77 = OpFOrdGreaterThan %bool %76 %float_0 -OpSelectionMerge %80 None -OpBranchConditional %77 %78 %79 -%78 = OpLabel -OpBranch %73 -%79 = OpLabel -OpBranch %72 -%80 = OpLabel -OpBranch %71 -%71 = OpLabel -OpBranch %72 -%72 = OpLabel -OpBranchConditional %false %69 %73 -%73 = OpLabel -OpReturnValue %true -OpFunctionEnd + %68 = OpLabel + OpBranch %69 + %69 = OpLabel + OpLoopMerge %73 %72 None + OpBranch %70 + %70 = OpLabel + %74 = OpAccessChain %_ptr_Uniform_v4float %18 %int_0 + %75 = OpLoad %v4float %74 + %76 = OpCompositeExtract %float %75 1 + %77 = OpFOrdGreaterThan %bool %76 %float_0 + OpSelectionMerge %80 None + OpBranchConditional %77 %78 %79 + %78 = OpLabel + OpBranch %73 + %79 = OpLabel + OpBranch %72 + %80 = OpLabel + OpBranch %71 + %71 = OpLabel + OpBranch %72 + %72 = OpLabel + OpBranchConditional %false %69 %73 + %73 = OpLabel + OpReturnValue %true + OpFunctionEnd %test_else_b = OpFunction %bool None %31 -%81 = OpLabel -OpBranch %82 -%82 = OpLabel -OpLoopMerge %86 %85 None -OpBranch %83 -%83 = OpLabel -%87 = OpAccessChain %_ptr_Uniform_v4float %18 %int_0 -%88 = OpLoad %v4float %87 -%89 = OpCompositeExtract %float %88 1 -%90 = OpFOrdEqual %bool %89 %float_0 -OpSelectionMerge %93 None -OpBranchConditional %90 %91 %92 -%91 = OpLabel -OpReturnValue %false -%92 = OpLabel -OpReturnValue %true -%93 = OpLabel -OpBranch %84 -%84 = OpLabel -OpBranch %85 -%85 = OpLabel -OpBranchConditional %false %82 %86 -%86 = OpLabel -OpUnreachable -OpFunctionEnd + %81 = OpLabel + OpBranch %82 + %82 = OpLabel + OpLoopMerge %86 %85 None + OpBranch %83 + %83 = OpLabel + %87 = OpAccessChain %_ptr_Uniform_v4float %18 %int_0 + %88 = OpLoad %v4float %87 + %89 = OpCompositeExtract %float %88 1 + %90 = OpFOrdEqual %bool %89 %float_0 + OpSelectionMerge %93 None + OpBranchConditional %90 %91 %92 + %91 = OpLabel + OpReturnValue %false + %92 = OpLabel + OpReturnValue %true + %93 = OpLabel + OpBranch %84 + %84 = OpLabel + OpBranch %85 + %85 = OpLabel + OpBranchConditional %false %82 %86 + %86 = OpLabel + OpUnreachable + OpFunctionEnd %test_loop_return_b = OpFunction %bool None %31 -%94 = OpLabel -OpReturnValue %true -OpFunctionEnd + %94 = OpLabel + OpReturnValue %true + OpFunctionEnd %test_loop_break_b = OpFunction %bool None %31 -%95 = OpLabel -%x = OpVariable %_ptr_Function_int Function -OpStore %x %int_0 -OpBranch %98 -%98 = OpLabel -OpLoopMerge %102 %101 None -OpBranch %99 -%99 = OpLabel -%103 = OpLoad %int %x -%105 = OpSLessThanEqual %bool %103 %int_1 -OpBranchConditional %105 %100 %102 -%100 = OpLabel -OpBranch %102 -%101 = OpLabel -%106 = OpLoad %int %x -%107 = OpIAdd %int %106 %int_1 -OpStore %x %107 -OpBranch %98 -%102 = OpLabel -OpReturnValue %true -OpFunctionEnd -%main = OpFunction %v4float None %108 -%109 = OpFunctionParameter %_ptr_Function_v2float -%110 = OpLabel -%140 = OpVariable %_ptr_Function_v4float Function -%111 = OpFunctionCall %bool %test_return_b -OpSelectionMerge %113 None -OpBranchConditional %111 %112 %113 -%112 = OpLabel -%114 = OpFunctionCall %bool %test_break_b -OpBranch %113 -%113 = OpLabel -%115 = OpPhi %bool %false %110 %114 %112 -OpSelectionMerge %117 None -OpBranchConditional %115 %116 %117 -%116 = OpLabel -%118 = OpFunctionCall %bool %test_continue_b -OpBranch %117 -%117 = OpLabel -%119 = OpPhi %bool %false %113 %118 %116 -OpSelectionMerge %121 None -OpBranchConditional %119 %120 %121 -%120 = OpLabel -%122 = OpFunctionCall %bool %test_if_return_b -OpBranch %121 -%121 = OpLabel -%123 = OpPhi %bool %false %117 %122 %120 -OpSelectionMerge %125 None -OpBranchConditional %123 %124 %125 -%124 = OpLabel -%126 = OpFunctionCall %bool %test_if_break_b -OpBranch %125 -%125 = OpLabel -%127 = OpPhi %bool %false %121 %126 %124 -OpSelectionMerge %129 None -OpBranchConditional %127 %128 %129 -%128 = OpLabel -%130 = OpFunctionCall %bool %test_else_b -OpBranch %129 -%129 = OpLabel -%131 = OpPhi %bool %false %125 %130 %128 -OpSelectionMerge %133 None -OpBranchConditional %131 %132 %133 -%132 = OpLabel -%134 = OpFunctionCall %bool %test_loop_return_b -OpBranch %133 -%133 = OpLabel -%135 = OpPhi %bool %false %129 %134 %132 -OpSelectionMerge %137 None -OpBranchConditional %135 %136 %137 -%136 = OpLabel -%138 = OpFunctionCall %bool %test_loop_break_b -OpBranch %137 -%137 = OpLabel -%139 = OpPhi %bool %false %133 %138 %136 -OpSelectionMerge %144 None -OpBranchConditional %139 %142 %143 -%142 = OpLabel -%145 = OpAccessChain %_ptr_Uniform_v4float %18 %int_0 -%146 = OpLoad %v4float %145 -OpStore %140 %146 -OpBranch %144 -%143 = OpLabel -%147 = OpAccessChain %_ptr_Uniform_v4float %18 %int_1 -%148 = OpLoad %v4float %147 -OpStore %140 %148 -OpBranch %144 -%144 = OpLabel -%149 = OpLoad %v4float %140 -OpReturnValue %149 -OpFunctionEnd + %95 = OpLabel + %x = OpVariable %_ptr_Function_int Function + OpStore %x %int_0 + OpBranch %98 + %98 = OpLabel + OpLoopMerge %102 %101 None + OpBranch %99 + %99 = OpLabel + %103 = OpLoad %int %x + %105 = OpSLessThanEqual %bool %103 %int_1 + OpBranchConditional %105 %100 %102 + %100 = OpLabel + OpBranch %102 + %101 = OpLabel + %106 = OpLoad %int %x + %107 = OpIAdd %int %106 %int_1 + OpStore %x %107 + OpBranch %98 + %102 = OpLabel + OpReturnValue %true + OpFunctionEnd + %main = OpFunction %v4float None %108 + %109 = OpFunctionParameter %_ptr_Function_v2float + %110 = OpLabel + %140 = OpVariable %_ptr_Function_v4float Function + %111 = OpFunctionCall %bool %test_return_b + OpSelectionMerge %113 None + OpBranchConditional %111 %112 %113 + %112 = OpLabel + %114 = OpFunctionCall %bool %test_break_b + OpBranch %113 + %113 = OpLabel + %115 = OpPhi %bool %false %110 %114 %112 + OpSelectionMerge %117 None + OpBranchConditional %115 %116 %117 + %116 = OpLabel + %118 = OpFunctionCall %bool %test_continue_b + OpBranch %117 + %117 = OpLabel + %119 = OpPhi %bool %false %113 %118 %116 + OpSelectionMerge %121 None + OpBranchConditional %119 %120 %121 + %120 = OpLabel + %122 = OpFunctionCall %bool %test_if_return_b + OpBranch %121 + %121 = OpLabel + %123 = OpPhi %bool %false %117 %122 %120 + OpSelectionMerge %125 None + OpBranchConditional %123 %124 %125 + %124 = OpLabel + %126 = OpFunctionCall %bool %test_if_break_b + OpBranch %125 + %125 = OpLabel + %127 = OpPhi %bool %false %121 %126 %124 + OpSelectionMerge %129 None + OpBranchConditional %127 %128 %129 + %128 = OpLabel + %130 = OpFunctionCall %bool %test_else_b + OpBranch %129 + %129 = OpLabel + %131 = OpPhi %bool %false %125 %130 %128 + OpSelectionMerge %133 None + OpBranchConditional %131 %132 %133 + %132 = OpLabel + %134 = OpFunctionCall %bool %test_loop_return_b + OpBranch %133 + %133 = OpLabel + %135 = OpPhi %bool %false %129 %134 %132 + OpSelectionMerge %137 None + OpBranchConditional %135 %136 %137 + %136 = OpLabel + %138 = OpFunctionCall %bool %test_loop_break_b + OpBranch %137 + %137 = OpLabel + %139 = OpPhi %bool %false %133 %138 %136 + OpSelectionMerge %144 None + OpBranchConditional %139 %142 %143 + %142 = OpLabel + %145 = OpAccessChain %_ptr_Uniform_v4float %18 %int_0 + %146 = OpLoad %v4float %145 + OpStore %140 %146 + OpBranch %144 + %143 = OpLabel + %147 = OpAccessChain %_ptr_Uniform_v4float %18 %int_1 + %148 = OpLoad %v4float %147 + OpStore %140 %148 + OpBranch %144 + %144 = OpLabel + %149 = OpLoad %v4float %140 + OpReturnValue %149 + OpFunctionEnd diff --git a/tests/sksl/shared/DeadReturnES3.skrp b/tests/sksl/shared/DeadReturnES3.skrp index adffdf33d0d5..40f48b7d24fa 100644 --- a/tests/sksl/shared/DeadReturnES3.skrp +++ b/tests/sksl/shared/DeadReturnES3.skrp @@ -1,3 +1,5 @@ +157 instructions + store_src_rg xy = src.rg init_lane_masks CondMask = LoopMask = RetMask = true store_condition_mask $12 = CondMask diff --git a/tests/sksl/shared/DeadReturnES3.wgsl b/tests/sksl/shared/DeadReturnES3.wgsl index 16a46fbfaa7a..7ea26adaabf5 100644 --- a/tests/sksl/shared/DeadReturnES3.wgsl +++ b/tests/sksl/shared/DeadReturnES3.wgsl @@ -1,11 +1,12 @@ /* -:65:9 warning: code is unreachable +:66:9 warning: code is unreachable continue; ^^^^^^^^ */ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -61,7 +62,7 @@ fn test_if_return_b() -> bool { { loop { { - if (_globalUniforms.colorGreen.y > 0.0) { + if _globalUniforms.colorGreen.y > 0.0 { { return true; } @@ -83,7 +84,7 @@ fn test_if_break_b() -> bool { { loop { { - if (_globalUniforms.colorGreen.y > 0.0) { + if _globalUniforms.colorGreen.y > 0.0 { { break; } @@ -104,7 +105,7 @@ fn test_else_b() -> bool { { loop { { - if (_globalUniforms.colorGreen.y == 0.0) { + if _globalUniforms.colorGreen.y == 0.0 { { return false; } diff --git a/tests/sksl/shared/DeadStripFunctions.asm.frag b/tests/sksl/shared/DeadStripFunctions.asm.frag index dcde8292be2e..d1a8d0cf834e 100644 --- a/tests/sksl/shared/DeadStripFunctions.asm.frag +++ b/tests/sksl/shared/DeadStripFunctions.asm.frag @@ -1,159 +1,159 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %unpremul_h4h4 "unpremul_h4h4" -OpName %live_fn_h4h4h4 "live_fn_h4h4h4" -OpName %main "main" -OpName %a "a" -OpName %b "b" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %12 Binding 0 -OpDecorate %12 DescriptorSet 0 -OpDecorate %29 RelaxedPrecision -OpDecorate %30 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %34 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %39 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %49 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %51 RelaxedPrecision -OpDecorate %a RelaxedPrecision -OpDecorate %b RelaxedPrecision -OpDecorate %85 RelaxedPrecision -OpDecorate %88 RelaxedPrecision -OpDecorate %89 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %unpremul_h4h4 "unpremul_h4h4" + OpName %live_fn_h4h4h4 "live_fn_h4h4h4" + OpName %main "main" + OpName %a "a" + OpName %b "b" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %12 Binding 0 + OpDecorate %12 DescriptorSet 0 + OpDecorate %29 RelaxedPrecision + OpDecorate %30 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %34 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %49 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %a RelaxedPrecision + OpDecorate %b RelaxedPrecision + OpDecorate %85 RelaxedPrecision + OpDecorate %88 RelaxedPrecision + OpDecorate %89 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%12 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%17 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%21 = OpConstantComposite %v2float %float_0 %float_0 + %12 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %17 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %21 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float %_ptr_Function_v4float = OpTypePointer Function %v4float -%26 = OpTypeFunction %v4float %_ptr_Function_v4float -%v3float = OpTypeVector %float 3 + %26 = OpTypeFunction %v4float %_ptr_Function_v4float + %v3float = OpTypeVector %float 3 %float_9_99999975en05 = OpConstant %float 9.99999975e-05 -%float_1 = OpConstant %float 1 -%45 = OpTypeFunction %v4float %_ptr_Function_v4float %_ptr_Function_v4float -%52 = OpTypeFunction %v4float %_ptr_Function_v2float -%float_3 = OpConstant %float 3 -%58 = OpConstantComposite %v4float %float_3 %float_3 %float_3 %float_3 -%float_n5 = OpConstant %float -5 -%61 = OpConstantComposite %v4float %float_n5 %float_n5 %float_n5 %float_n5 -%64 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 -%false = OpConstantFalse %bool -%68 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 -%v4bool = OpTypeVector %bool 4 + %float_1 = OpConstant %float 1 + %45 = OpTypeFunction %v4float %_ptr_Function_v4float %_ptr_Function_v4float + %52 = OpTypeFunction %v4float %_ptr_Function_v2float + %float_3 = OpConstant %float 3 + %58 = OpConstantComposite %v4float %float_3 %float_3 %float_3 %float_3 + %float_n5 = OpConstant %float -5 + %61 = OpConstantComposite %v4float %float_n5 %float_n5 %float_n5 %float_n5 + %64 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %false = OpConstantFalse %bool + %68 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %v4bool = OpTypeVector %bool 4 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 %_entrypoint_v = OpFunction %void None %17 -%18 = OpLabel -%22 = OpVariable %_ptr_Function_v2float Function -OpStore %22 %21 -%24 = OpFunctionCall %v4float %main %22 -OpStore %sk_FragColor %24 -OpReturn -OpFunctionEnd + %18 = OpLabel + %22 = OpVariable %_ptr_Function_v2float Function + OpStore %22 %21 + %24 = OpFunctionCall %v4float %main %22 + OpStore %sk_FragColor %24 + OpReturn + OpFunctionEnd %unpremul_h4h4 = OpFunction %v4float None %26 -%27 = OpFunctionParameter %_ptr_Function_v4float -%28 = OpLabel -%29 = OpLoad %v4float %27 -%30 = OpVectorShuffle %v3float %29 %29 0 1 2 -%33 = OpLoad %v4float %27 -%34 = OpCompositeExtract %float %33 3 -%32 = OpExtInst %float %1 FMax %34 %float_9_99999975en05 -%37 = OpFDiv %float %float_1 %32 -%38 = OpVectorTimesScalar %v3float %30 %37 -%39 = OpCompositeExtract %float %38 0 -%40 = OpCompositeExtract %float %38 1 -%41 = OpCompositeExtract %float %38 2 -%42 = OpLoad %v4float %27 -%43 = OpCompositeExtract %float %42 3 -%44 = OpCompositeConstruct %v4float %39 %40 %41 %43 -OpReturnValue %44 -OpFunctionEnd + %27 = OpFunctionParameter %_ptr_Function_v4float + %28 = OpLabel + %29 = OpLoad %v4float %27 + %30 = OpVectorShuffle %v3float %29 %29 0 1 2 + %33 = OpLoad %v4float %27 + %34 = OpCompositeExtract %float %33 3 + %32 = OpExtInst %float %1 FMax %34 %float_9_99999975en05 + %37 = OpFDiv %float %float_1 %32 + %38 = OpVectorTimesScalar %v3float %30 %37 + %39 = OpCompositeExtract %float %38 0 + %40 = OpCompositeExtract %float %38 1 + %41 = OpCompositeExtract %float %38 2 + %42 = OpLoad %v4float %27 + %43 = OpCompositeExtract %float %42 3 + %44 = OpCompositeConstruct %v4float %39 %40 %41 %43 + OpReturnValue %44 + OpFunctionEnd %live_fn_h4h4h4 = OpFunction %v4float None %45 -%46 = OpFunctionParameter %_ptr_Function_v4float -%47 = OpFunctionParameter %_ptr_Function_v4float -%48 = OpLabel -%49 = OpLoad %v4float %46 -%50 = OpLoad %v4float %47 -%51 = OpFAdd %v4float %49 %50 -OpReturnValue %51 -OpFunctionEnd -%main = OpFunction %v4float None %52 -%53 = OpFunctionParameter %_ptr_Function_v2float -%54 = OpLabel -%a = OpVariable %_ptr_Function_v4float Function -%b = OpVariable %_ptr_Function_v4float Function -%59 = OpVariable %_ptr_Function_v4float Function -%62 = OpVariable %_ptr_Function_v4float Function -%65 = OpVariable %_ptr_Function_v4float Function -%77 = OpVariable %_ptr_Function_v4float Function -OpStore %59 %58 -OpStore %62 %61 -%63 = OpFunctionCall %v4float %live_fn_h4h4h4 %59 %62 -OpStore %a %63 -OpStore %65 %64 -%66 = OpFunctionCall %v4float %unpremul_h4h4 %65 -OpStore %b %66 -%69 = OpFUnordNotEqual %v4bool %63 %68 -%71 = OpAny %bool %69 -OpSelectionMerge %73 None -OpBranchConditional %71 %72 %73 -%72 = OpLabel -%74 = OpFUnordNotEqual %v4bool %66 %68 -%75 = OpAny %bool %74 -OpBranch %73 -%73 = OpLabel -%76 = OpPhi %bool %false %54 %75 %72 -OpSelectionMerge %80 None -OpBranchConditional %76 %78 %79 -%78 = OpLabel -%81 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 -%85 = OpLoad %v4float %81 -OpStore %77 %85 -OpBranch %80 -%79 = OpLabel -%86 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1 -%88 = OpLoad %v4float %86 -OpStore %77 %88 -OpBranch %80 -%80 = OpLabel -%89 = OpLoad %v4float %77 -OpReturnValue %89 -OpFunctionEnd + %46 = OpFunctionParameter %_ptr_Function_v4float + %47 = OpFunctionParameter %_ptr_Function_v4float + %48 = OpLabel + %49 = OpLoad %v4float %46 + %50 = OpLoad %v4float %47 + %51 = OpFAdd %v4float %49 %50 + OpReturnValue %51 + OpFunctionEnd + %main = OpFunction %v4float None %52 + %53 = OpFunctionParameter %_ptr_Function_v2float + %54 = OpLabel + %a = OpVariable %_ptr_Function_v4float Function + %b = OpVariable %_ptr_Function_v4float Function + %59 = OpVariable %_ptr_Function_v4float Function + %62 = OpVariable %_ptr_Function_v4float Function + %65 = OpVariable %_ptr_Function_v4float Function + %77 = OpVariable %_ptr_Function_v4float Function + OpStore %59 %58 + OpStore %62 %61 + %63 = OpFunctionCall %v4float %live_fn_h4h4h4 %59 %62 + OpStore %a %63 + OpStore %65 %64 + %66 = OpFunctionCall %v4float %unpremul_h4h4 %65 + OpStore %b %66 + %69 = OpFUnordNotEqual %v4bool %63 %68 + %71 = OpAny %bool %69 + OpSelectionMerge %73 None + OpBranchConditional %71 %72 %73 + %72 = OpLabel + %74 = OpFUnordNotEqual %v4bool %66 %68 + %75 = OpAny %bool %74 + OpBranch %73 + %73 = OpLabel + %76 = OpPhi %bool %false %54 %75 %72 + OpSelectionMerge %80 None + OpBranchConditional %76 %78 %79 + %78 = OpLabel + %81 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 + %85 = OpLoad %v4float %81 + OpStore %77 %85 + OpBranch %80 + %79 = OpLabel + %86 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1 + %88 = OpLoad %v4float %86 + OpStore %77 %88 + OpBranch %80 + %80 = OpLabel + %89 = OpLoad %v4float %77 + OpReturnValue %89 + OpFunctionEnd diff --git a/tests/sksl/shared/DeadStripFunctions.skrp b/tests/sksl/shared/DeadStripFunctions.skrp index 886864787f20..e2a6d06fbbef 100644 --- a/tests/sksl/shared/DeadStripFunctions.skrp +++ b/tests/sksl/shared/DeadStripFunctions.skrp @@ -1,3 +1,5 @@ +33 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true splat_4_constants a = 0 diff --git a/tests/sksl/shared/DeadStripFunctions.wgsl b/tests/sksl/shared/DeadStripFunctions.wgsl new file mode 100644 index 000000000000..6e274c345294 --- /dev/null +++ b/tests/sksl/shared/DeadStripFunctions.wgsl @@ -0,0 +1,48 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn unpremul_h4h4(_skParam0: vec4) -> vec4 { + let color = _skParam0; + { + let _skTemp0 = max(color.w, 0.0001); + return vec4(color.xyz / _skTemp0, color.w); + } +} +fn live_fn_h4h4h4(_skParam0: vec4, _skParam1: vec4) -> vec4 { + let a = _skParam0; + let b = _skParam1; + { + return a + b; + } +} +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var a: vec4; + var b: vec4; + { + let _skTemp1 = live_fn_h4h4h4(vec4(3.0), vec4(-5.0)); + a = _skTemp1; + } + { + let _skTemp2 = unpremul_h4h4(vec4(1.0)); + b = _skTemp2; + } + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(any(a != vec4(0.0)) && any(b != vec4(0.0)))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/DependentInitializers.asm.frag b/tests/sksl/shared/DependentInitializers.asm.frag index 4b401584a601..cdfe0a7ab9eb 100644 --- a/tests/sksl/shared/DependentInitializers.asm.frag +++ b/tests/sksl/shared/DependentInitializers.asm.frag @@ -1,88 +1,88 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %x "x" -OpName %y "y" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %43 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %x "x" + OpName %y "y" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %43 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_float = OpTypePointer Function %float -%float_0_5 = OpConstant %float 0.5 -%float_2 = OpConstant %float 2 -%float_1 = OpConstant %float 1 + %float_0_5 = OpConstant %float 0.5 + %float_2 = OpConstant %float 2 + %float_1 = OpConstant %float 1 %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%x = OpVariable %_ptr_Function_float Function -%y = OpVariable %_ptr_Function_float Function -%34 = OpVariable %_ptr_Function_v4float Function -OpStore %x %float_0_5 -%31 = OpFMul %float %float_0_5 %float_2 -OpStore %y %31 -%33 = OpFOrdEqual %bool %31 %float_1 -OpSelectionMerge %38 None -OpBranchConditional %33 %36 %37 -%36 = OpLabel -%39 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%43 = OpLoad %v4float %39 -OpStore %34 %43 -OpBranch %38 -%37 = OpLabel -%44 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%46 = OpLoad %v4float %44 -OpStore %34 %46 -OpBranch %38 -%38 = OpLabel -%47 = OpLoad %v4float %34 -OpReturnValue %47 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %x = OpVariable %_ptr_Function_float Function + %y = OpVariable %_ptr_Function_float Function + %34 = OpVariable %_ptr_Function_v4float Function + OpStore %x %float_0_5 + %31 = OpFMul %float %float_0_5 %float_2 + OpStore %y %31 + %33 = OpFOrdEqual %bool %31 %float_1 + OpSelectionMerge %38 None + OpBranchConditional %33 %36 %37 + %36 = OpLabel + %39 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %43 = OpLoad %v4float %39 + OpStore %34 %43 + OpBranch %38 + %37 = OpLabel + %44 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %46 = OpLoad %v4float %44 + OpStore %34 %46 + OpBranch %38 + %38 = OpLabel + %47 = OpLoad %v4float %34 + OpReturnValue %47 + OpFunctionEnd diff --git a/tests/sksl/shared/DependentInitializers.skrp b/tests/sksl/shared/DependentInitializers.skrp index 690c25dcebdd..c093bf394760 100644 --- a/tests/sksl/shared/DependentInitializers.skrp +++ b/tests/sksl/shared/DependentInitializers.skrp @@ -1,9 +1,11 @@ +11 instructions + [immutable slots] -x = 0x3F000000 (0.5) +i0 = 0x3F000000 (0.5) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true -copy_slot_unmasked $0 = x +copy_constant $0 = 0x3F000000 (0.5) mul_imm_float $0 *= 0x40000000 (2.0) copy_slot_unmasked y = $0 cmpeq_imm_float $0 = equal($0, 0x3F800000 (1.0)) diff --git a/tests/sksl/shared/DependentInitializers.wgsl b/tests/sksl/shared/DependentInitializers.wgsl new file mode 100644 index 000000000000..61df150e266b --- /dev/null +++ b/tests/sksl/shared/DependentInitializers.wgsl @@ -0,0 +1,26 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var x: f32 = 0.5; + var y: f32 = x * 2.0; + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((y == 1.0))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/DerivativesUnused.asm.frag b/tests/sksl/shared/DerivativesUnused.asm.frag index 435f1b126767..0b1f4f436862 100644 --- a/tests/sksl/shared/DerivativesUnused.asm.frag +++ b/tests/sksl/shared/DerivativesUnused.asm.frag @@ -1,31 +1,31 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%11 = OpTypeFunction %void -%float_1 = OpConstant %float 1 + %void = OpTypeVoid + %11 = OpTypeFunction %void + %float_1 = OpConstant %float 1 %_ptr_Output_float = OpTypePointer Output %float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%main = OpFunction %void None %11 -%12 = OpLabel -%14 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 -OpStore %14 %float_1 -OpReturn -OpFunctionEnd + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %main = OpFunction %void None %11 + %12 = OpLabel + %14 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 + OpStore %14 %float_1 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/DerivativesUnused.wgsl b/tests/sksl/shared/DerivativesUnused.wgsl new file mode 100644 index 000000000000..305d373bcec6 --- /dev/null +++ b/tests/sksl/shared/DerivativesUnused.wgsl @@ -0,0 +1,17 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +fn main(_stageOut: ptr) { + { + (*_stageOut).sk_FragColor.x = 1.0; + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(&_stageOut); + return _stageOut; +} diff --git a/tests/sksl/shared/Discard.asm.frag b/tests/sksl/shared/Discard.asm.frag index 11bb1e2c8eab..39a2eccf8c75 100644 --- a/tests/sksl/shared/Discard.asm.frag +++ b/tests/sksl/shared/Discard.asm.frag @@ -1,25 +1,25 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%11 = OpTypeFunction %void -%main = OpFunction %void None %11 -%12 = OpLabel -OpKill -OpFunctionEnd + %void = OpTypeVoid + %11 = OpTypeFunction %void + %main = OpFunction %void None %11 + %12 = OpLabel + OpKill + OpFunctionEnd diff --git a/tests/sksl/shared/Discard.wgsl b/tests/sksl/shared/Discard.wgsl index 9151f377a913..8707c276be79 100644 --- a/tests/sksl/shared/Discard.wgsl +++ b/tests/sksl/shared/Discard.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/shared/DoWhileControlFlow.asm.frag b/tests/sksl/shared/DoWhileControlFlow.asm.frag index 0e89c5d90aef..88705c15489c 100644 --- a/tests/sksl/shared/DoWhileControlFlow.asm.frag +++ b/tests/sksl/shared/DoWhileControlFlow.asm.frag @@ -1,121 +1,121 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %x "x" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %x RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %39 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %45 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %55 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %63 RelaxedPrecision -OpDecorate %64 RelaxedPrecision -OpDecorate %66 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %x "x" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %x RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %45 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %55 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %63 RelaxedPrecision + OpDecorate %64 RelaxedPrecision + OpDecorate %66 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%12 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%16 = OpConstantComposite %v2float %float_0 %float_0 + %void = OpTypeVoid + %12 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %16 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%20 = OpTypeFunction %v4float %_ptr_Function_v2float + %20 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float -%float_1 = OpConstant %float 1 -%26 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_float = OpTypePointer Function %float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%float_0_25 = OpConstant %float 0.25 -%int_2 = OpConstant %int 2 -%int_1 = OpConstant %int 1 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %float_0_25 = OpConstant %float 0.25 + %int_2 = OpConstant %int 2 + %int_1 = OpConstant %int 1 %_entrypoint_v = OpFunction %void None %12 -%13 = OpLabel -%17 = OpVariable %_ptr_Function_v2float Function -OpStore %17 %16 -%19 = OpFunctionCall %v4float %main %17 -OpStore %sk_FragColor %19 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %20 -%21 = OpFunctionParameter %_ptr_Function_v2float -%22 = OpLabel -%x = OpVariable %_ptr_Function_v4float Function -OpStore %x %26 -OpBranch %27 -%27 = OpLabel -OpLoopMerge %31 %30 None -OpBranch %28 -%28 = OpLabel -%32 = OpAccessChain %_ptr_Function_float %x %int_0 -%36 = OpLoad %float %32 -%38 = OpFSub %float %36 %float_0_25 -OpStore %32 %38 -%39 = OpLoad %v4float %x -%40 = OpCompositeExtract %float %39 0 -%41 = OpFOrdLessThanEqual %bool %40 %float_0 -OpSelectionMerge %43 None -OpBranchConditional %41 %42 %43 -%42 = OpLabel -OpBranch %31 -%43 = OpLabel -OpBranch %29 -%29 = OpLabel -OpBranch %30 -%30 = OpLabel -%44 = OpLoad %v4float %x -%45 = OpCompositeExtract %float %44 3 -%46 = OpFOrdEqual %bool %45 %float_1 -OpBranchConditional %46 %27 %31 -%31 = OpLabel -OpBranch %47 -%47 = OpLabel -OpLoopMerge %51 %50 None -OpBranch %48 -%48 = OpLabel -%52 = OpAccessChain %_ptr_Function_float %x %int_2 -%54 = OpLoad %float %52 -%55 = OpFSub %float %54 %float_0_25 -OpStore %52 %55 -%56 = OpLoad %v4float %x -%57 = OpCompositeExtract %float %56 3 -%58 = OpFOrdEqual %bool %57 %float_1 -OpSelectionMerge %60 None -OpBranchConditional %58 %59 %60 -%59 = OpLabel -OpBranch %50 -%60 = OpLabel -%61 = OpAccessChain %_ptr_Function_float %x %int_1 -OpStore %61 %float_0 -OpBranch %49 -%49 = OpLabel -OpBranch %50 -%50 = OpLabel -%63 = OpLoad %v4float %x -%64 = OpCompositeExtract %float %63 2 -%65 = OpFOrdGreaterThan %bool %64 %float_0 -OpBranchConditional %65 %47 %51 -%51 = OpLabel -%66 = OpLoad %v4float %x -OpReturnValue %66 -OpFunctionEnd + %13 = OpLabel + %17 = OpVariable %_ptr_Function_v2float Function + OpStore %17 %16 + %19 = OpFunctionCall %v4float %main %17 + OpStore %sk_FragColor %19 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %20 + %21 = OpFunctionParameter %_ptr_Function_v2float + %22 = OpLabel + %x = OpVariable %_ptr_Function_v4float Function + OpStore %x %26 + OpBranch %27 + %27 = OpLabel + OpLoopMerge %31 %30 None + OpBranch %28 + %28 = OpLabel + %32 = OpAccessChain %_ptr_Function_float %x %int_0 + %36 = OpLoad %float %32 + %38 = OpFSub %float %36 %float_0_25 + OpStore %32 %38 + %39 = OpLoad %v4float %x + %40 = OpCompositeExtract %float %39 0 + %41 = OpFOrdLessThanEqual %bool %40 %float_0 + OpSelectionMerge %43 None + OpBranchConditional %41 %42 %43 + %42 = OpLabel + OpBranch %31 + %43 = OpLabel + OpBranch %29 + %29 = OpLabel + OpBranch %30 + %30 = OpLabel + %44 = OpLoad %v4float %x + %45 = OpCompositeExtract %float %44 3 + %46 = OpFOrdEqual %bool %45 %float_1 + OpBranchConditional %46 %27 %31 + %31 = OpLabel + OpBranch %47 + %47 = OpLabel + OpLoopMerge %51 %50 None + OpBranch %48 + %48 = OpLabel + %52 = OpAccessChain %_ptr_Function_float %x %int_2 + %54 = OpLoad %float %52 + %55 = OpFSub %float %54 %float_0_25 + OpStore %52 %55 + %56 = OpLoad %v4float %x + %57 = OpCompositeExtract %float %56 3 + %58 = OpFOrdEqual %bool %57 %float_1 + OpSelectionMerge %60 None + OpBranchConditional %58 %59 %60 + %59 = OpLabel + OpBranch %50 + %60 = OpLabel + %61 = OpAccessChain %_ptr_Function_float %x %int_1 + OpStore %61 %float_0 + OpBranch %49 + %49 = OpLabel + OpBranch %50 + %50 = OpLabel + %63 = OpLoad %v4float %x + %64 = OpCompositeExtract %float %63 2 + %65 = OpFOrdGreaterThan %bool %64 %float_0 + OpBranchConditional %65 %47 %51 + %51 = OpLabel + %66 = OpLoad %v4float %x + OpReturnValue %66 + OpFunctionEnd diff --git a/tests/sksl/shared/DoWhileControlFlow.skrp b/tests/sksl/shared/DoWhileControlFlow.skrp index 83d084014874..81acb58b8f06 100644 --- a/tests/sksl/shared/DoWhileControlFlow.skrp +++ b/tests/sksl/shared/DoWhileControlFlow.skrp @@ -1,3 +1,5 @@ +43 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true splat_4_constants x = 0x3F800000 (1.0) diff --git a/tests/sksl/shared/DoWhileControlFlow.wgsl b/tests/sksl/shared/DoWhileControlFlow.wgsl index 3807f6ab2b8f..d5b934961d1a 100644 --- a/tests/sksl/shared/DoWhileControlFlow.wgsl +++ b/tests/sksl/shared/DoWhileControlFlow.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -12,7 +13,7 @@ fn main(_skParam0: vec2) -> vec4 { loop { { x.x = x.x - 0.25; - if (x.x <= 0.0) { + if x.x <= 0.0 { break; } } @@ -23,7 +24,7 @@ fn main(_skParam0: vec2) -> vec4 { loop { { x.z = x.z - 0.25; - if (x.w == 1.0) { + if x.w == 1.0 { continue; } x.y = 0.0; diff --git a/tests/sksl/shared/DoubleNegation.asm.frag b/tests/sksl/shared/DoubleNegation.asm.frag index 43fd71053500..4c810a1cfbcb 100644 --- a/tests/sksl/shared/DoubleNegation.asm.frag +++ b/tests/sksl/shared/DoubleNegation.asm.frag @@ -1,77 +1,77 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %30 RelaxedPrecision -OpDecorate %31 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %35 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %39 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %30 RelaxedPrecision + OpDecorate %31 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %35 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%26 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%30 = OpLoad %v4float %26 -%31 = OpCompositeExtract %float %30 0 -%32 = OpConvertFToS %int %31 -%33 = OpConvertSToF %float %32 -%34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%35 = OpLoad %v4float %34 -%36 = OpCompositeExtract %float %35 1 -%37 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%38 = OpLoad %v4float %37 -%39 = OpVectorShuffle %v2float %38 %38 2 3 -%40 = OpCompositeExtract %float %39 0 -%41 = OpCompositeExtract %float %39 1 -%42 = OpCompositeConstruct %v4float %33 %36 %40 %41 -OpReturnValue %42 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %26 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %30 = OpLoad %v4float %26 + %31 = OpCompositeExtract %float %30 0 + %32 = OpConvertFToS %int %31 + %33 = OpConvertSToF %float %32 + %34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %35 = OpLoad %v4float %34 + %36 = OpCompositeExtract %float %35 1 + %37 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %38 = OpLoad %v4float %37 + %39 = OpVectorShuffle %v2float %38 %38 2 3 + %40 = OpCompositeExtract %float %39 0 + %41 = OpCompositeExtract %float %39 1 + %42 = OpCompositeConstruct %v4float %33 %36 %40 %41 + OpReturnValue %42 + OpFunctionEnd diff --git a/tests/sksl/shared/DoubleNegation.skrp b/tests/sksl/shared/DoubleNegation.skrp index add45ff1be3d..a90d8ee47ce5 100644 --- a/tests/sksl/shared/DoubleNegation.skrp +++ b/tests/sksl/shared/DoubleNegation.skrp @@ -1,3 +1,5 @@ +7 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_uniform $0 = colorGreen(0) diff --git a/tests/sksl/shared/DoubleNegation.wgsl b/tests/sksl/shared/DoubleNegation.wgsl new file mode 100644 index 000000000000..59635a798144 --- /dev/null +++ b/tests/sksl/shared/DoubleNegation.wgsl @@ -0,0 +1,23 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + return vec4(f32(i32(_globalUniforms.colorGreen.x)), _globalUniforms.colorGreen.y, _globalUniforms.colorGreen.zw); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/EmptyBlocksES2.asm.frag b/tests/sksl/shared/EmptyBlocksES2.asm.frag index ad243feed39a..497271fdf642 100644 --- a/tests/sksl/shared/EmptyBlocksES2.asm.frag +++ b/tests/sksl/shared/EmptyBlocksES2.asm.frag @@ -1,90 +1,90 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "unknownInput" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %color "color" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %color RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "unknownInput" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %color "color" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %color RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float -%28 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %28 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 %_ptr_Uniform_float = OpTypePointer Uniform %float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%float_1 = OpConstant %float 1 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %float_1 = OpConstant %float 1 %_ptr_Function_float = OpTypePointer Function %float -%int_1 = OpConstant %int 1 -%float_2 = OpConstant %float 2 -%int_3 = OpConstant %int 3 + %int_1 = OpConstant %int 1 + %float_2 = OpConstant %float 2 + %int_3 = OpConstant %int 3 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%color = OpVariable %_ptr_Function_v4float Function -OpStore %color %28 -%29 = OpAccessChain %_ptr_Uniform_float %10 %int_0 -%33 = OpLoad %float %29 -%35 = OpFOrdEqual %bool %33 %float_1 -OpSelectionMerge %37 None -OpBranchConditional %35 %36 %37 -%36 = OpLabel -%38 = OpAccessChain %_ptr_Function_float %color %int_1 -OpStore %38 %float_1 -OpBranch %37 -%37 = OpLabel -%41 = OpAccessChain %_ptr_Uniform_float %10 %int_0 -%42 = OpLoad %float %41 -%44 = OpFOrdEqual %bool %42 %float_2 -OpSelectionMerge %47 None -OpBranchConditional %44 %45 %46 -%45 = OpLabel -OpBranch %47 -%46 = OpLabel -%48 = OpAccessChain %_ptr_Function_float %color %int_3 -OpStore %48 %float_1 -OpBranch %47 -%47 = OpLabel -%50 = OpLoad %v4float %color -OpReturnValue %50 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %color = OpVariable %_ptr_Function_v4float Function + OpStore %color %28 + %29 = OpAccessChain %_ptr_Uniform_float %10 %int_0 + %33 = OpLoad %float %29 + %35 = OpFOrdEqual %bool %33 %float_1 + OpSelectionMerge %37 None + OpBranchConditional %35 %36 %37 + %36 = OpLabel + %38 = OpAccessChain %_ptr_Function_float %color %int_1 + OpStore %38 %float_1 + OpBranch %37 + %37 = OpLabel + %41 = OpAccessChain %_ptr_Uniform_float %10 %int_0 + %42 = OpLoad %float %41 + %44 = OpFOrdEqual %bool %42 %float_2 + OpSelectionMerge %47 None + OpBranchConditional %44 %45 %46 + %45 = OpLabel + OpBranch %47 + %46 = OpLabel + %48 = OpAccessChain %_ptr_Function_float %color %int_3 + OpStore %48 %float_1 + OpBranch %47 + %47 = OpLabel + %50 = OpLoad %v4float %color + OpReturnValue %50 + OpFunctionEnd diff --git a/tests/sksl/shared/EmptyBlocksES2.skrp b/tests/sksl/shared/EmptyBlocksES2.skrp index 0c0ae7308ec4..48b6ec18f131 100644 --- a/tests/sksl/shared/EmptyBlocksES2.skrp +++ b/tests/sksl/shared/EmptyBlocksES2.skrp @@ -1,3 +1,5 @@ +14 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true splat_4_constants color = 0 diff --git a/tests/sksl/shared/EmptyBlocksES2.wgsl b/tests/sksl/shared/EmptyBlocksES2.wgsl index 2d0874c3e66f..434c56d7ac3e 100644 --- a/tests/sksl/shared/EmptyBlocksES2.wgsl +++ b/tests/sksl/shared/EmptyBlocksES2.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -13,10 +14,10 @@ fn main(_skParam0: vec2) -> vec4 { let coords = _skParam0; { var color: vec4 = vec4(0.0); - if (_globalUniforms.unknownInput == 1.0) { + if _globalUniforms.unknownInput == 1.0 { color.y = 1.0; } - if (_globalUniforms.unknownInput == 2.0) { + if _globalUniforms.unknownInput == 2.0 { ; } else { color.w = 1.0; diff --git a/tests/sksl/shared/EmptyBlocksES3.asm.frag b/tests/sksl/shared/EmptyBlocksES3.asm.frag index 29f543cd2768..58e1c9beda7f 100644 --- a/tests/sksl/shared/EmptyBlocksES3.asm.frag +++ b/tests/sksl/shared/EmptyBlocksES3.asm.frag @@ -1,128 +1,128 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorWhite" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %color "color" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %color RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %34 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %58 RelaxedPrecision -OpDecorate %59 RelaxedPrecision -OpDecorate %67 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorWhite" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %color "color" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %color RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %34 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %58 RelaxedPrecision + OpDecorate %59 RelaxedPrecision + OpDecorate %67 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float -%28 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %28 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%float_1 = OpConstant %float 1 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %float_1 = OpConstant %float 1 %_ptr_Function_float = OpTypePointer Function %float -%int_1 = OpConstant %int 1 -%float_2 = OpConstant %float 2 -%int_3 = OpConstant %int 3 + %int_1 = OpConstant %int 1 + %float_2 = OpConstant %float 2 + %int_3 = OpConstant %int 3 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%color = OpVariable %_ptr_Function_v4float Function -OpStore %color %28 -%29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%33 = OpLoad %v4float %29 -%34 = OpCompositeExtract %float %33 0 -%36 = OpFOrdEqual %bool %34 %float_1 -OpSelectionMerge %38 None -OpBranchConditional %36 %37 %38 -%37 = OpLabel -%39 = OpAccessChain %_ptr_Function_float %color %int_1 -OpStore %39 %float_1 -OpBranch %38 -%38 = OpLabel -%42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%43 = OpLoad %v4float %42 -%44 = OpCompositeExtract %float %43 0 -%46 = OpFOrdEqual %bool %44 %float_2 -OpSelectionMerge %49 None -OpBranchConditional %46 %47 %48 -%47 = OpLabel -OpBranch %49 -%48 = OpLabel -%50 = OpAccessChain %_ptr_Function_float %color %int_3 -OpStore %50 %float_1 -OpBranch %49 -%49 = OpLabel -OpBranch %52 -%52 = OpLabel -OpLoopMerge %56 %55 None -OpBranch %53 -%53 = OpLabel -%57 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%58 = OpLoad %v4float %57 -%59 = OpCompositeExtract %float %58 0 -%60 = OpFOrdEqual %bool %59 %float_2 -OpBranchConditional %60 %54 %56 -%54 = OpLabel -OpBranch %55 -%55 = OpLabel -OpBranch %52 -%56 = OpLabel -OpBranch %61 -%61 = OpLabel -OpLoopMerge %65 %64 None -OpBranch %62 -%62 = OpLabel -OpBranch %63 -%63 = OpLabel -OpBranch %64 -%64 = OpLabel -%66 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%67 = OpLoad %v4float %66 -%68 = OpCompositeExtract %float %67 0 -%69 = OpFOrdEqual %bool %68 %float_2 -OpBranchConditional %69 %61 %65 -%65 = OpLabel -%70 = OpLoad %v4float %color -OpReturnValue %70 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %color = OpVariable %_ptr_Function_v4float Function + OpStore %color %28 + %29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %33 = OpLoad %v4float %29 + %34 = OpCompositeExtract %float %33 0 + %36 = OpFOrdEqual %bool %34 %float_1 + OpSelectionMerge %38 None + OpBranchConditional %36 %37 %38 + %37 = OpLabel + %39 = OpAccessChain %_ptr_Function_float %color %int_1 + OpStore %39 %float_1 + OpBranch %38 + %38 = OpLabel + %42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %43 = OpLoad %v4float %42 + %44 = OpCompositeExtract %float %43 0 + %46 = OpFOrdEqual %bool %44 %float_2 + OpSelectionMerge %49 None + OpBranchConditional %46 %47 %48 + %47 = OpLabel + OpBranch %49 + %48 = OpLabel + %50 = OpAccessChain %_ptr_Function_float %color %int_3 + OpStore %50 %float_1 + OpBranch %49 + %49 = OpLabel + OpBranch %52 + %52 = OpLabel + OpLoopMerge %56 %55 None + OpBranch %53 + %53 = OpLabel + %57 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %58 = OpLoad %v4float %57 + %59 = OpCompositeExtract %float %58 0 + %60 = OpFOrdEqual %bool %59 %float_2 + OpBranchConditional %60 %54 %56 + %54 = OpLabel + OpBranch %55 + %55 = OpLabel + OpBranch %52 + %56 = OpLabel + OpBranch %61 + %61 = OpLabel + OpLoopMerge %65 %64 None + OpBranch %62 + %62 = OpLabel + OpBranch %63 + %63 = OpLabel + OpBranch %64 + %64 = OpLabel + %66 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %67 = OpLoad %v4float %66 + %68 = OpCompositeExtract %float %67 0 + %69 = OpFOrdEqual %bool %68 %float_2 + OpBranchConditional %69 %61 %65 + %65 = OpLabel + %70 = OpLoad %v4float %color + OpReturnValue %70 + OpFunctionEnd diff --git a/tests/sksl/shared/EmptyBlocksES3.skrp b/tests/sksl/shared/EmptyBlocksES3.skrp index a45d10c82b4e..80e6b3dde372 100644 --- a/tests/sksl/shared/EmptyBlocksES3.skrp +++ b/tests/sksl/shared/EmptyBlocksES3.skrp @@ -1,3 +1,5 @@ +29 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true splat_4_constants color = 0 diff --git a/tests/sksl/shared/EmptyBlocksES3.wgsl b/tests/sksl/shared/EmptyBlocksES3.wgsl index f0c90d4182ad..556297d6a22d 100644 --- a/tests/sksl/shared/EmptyBlocksES3.wgsl +++ b/tests/sksl/shared/EmptyBlocksES3.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -13,10 +14,10 @@ fn main(_skParam0: vec2) -> vec4 { let coords = _skParam0; { var color: vec4 = vec4(0.0); - if (_globalUniforms.colorWhite.x == 1.0) { + if _globalUniforms.colorWhite.x == 1.0 { color.y = 1.0; } - if (_globalUniforms.colorWhite.x == 2.0) { + if _globalUniforms.colorWhite.x == 2.0 { ; } else { color.w = 1.0; diff --git a/tests/sksl/shared/ForLoopControlFlow.asm.frag b/tests/sksl/shared/ForLoopControlFlow.asm.frag index 4214195796ef..44cb1a578847 100644 --- a/tests/sksl/shared/ForLoopControlFlow.asm.frag +++ b/tests/sksl/shared/ForLoopControlFlow.asm.frag @@ -1,146 +1,146 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorWhite" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %x "x" -OpName %r "r" -OpName %b "b" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %x RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %r RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %45 RelaxedPrecision -OpDecorate %48 RelaxedPrecision -OpDecorate %49 RelaxedPrecision -OpDecorate %53 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %b RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %63 RelaxedPrecision -OpDecorate %66 RelaxedPrecision -OpDecorate %67 RelaxedPrecision -OpDecorate %73 RelaxedPrecision -OpDecorate %74 RelaxedPrecision -OpDecorate %75 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorWhite" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %x "x" + OpName %r "r" + OpName %b "b" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %x RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %r RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %45 RelaxedPrecision + OpDecorate %48 RelaxedPrecision + OpDecorate %49 RelaxedPrecision + OpDecorate %53 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %b RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %63 RelaxedPrecision + OpDecorate %66 RelaxedPrecision + OpDecorate %67 RelaxedPrecision + OpDecorate %73 RelaxedPrecision + OpDecorate %74 RelaxedPrecision + OpDecorate %75 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 %_ptr_Function_float = OpTypePointer Function %float -%float_n5 = OpConstant %float -5 -%float_5 = OpConstant %float 5 -%float_1 = OpConstant %float 1 -%int_2 = OpConstant %int 2 -%int_1 = OpConstant %int 1 + %float_n5 = OpConstant %float -5 + %float_5 = OpConstant %float 5 + %float_1 = OpConstant %float 1 + %int_2 = OpConstant %int 2 + %int_1 = OpConstant %int 1 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%x = OpVariable %_ptr_Function_v4float Function -%r = OpVariable %_ptr_Function_float Function -%b = OpVariable %_ptr_Function_float Function -%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %28 -OpStore %x %32 -OpStore %r %float_n5 -OpBranch %36 -%36 = OpLabel -OpLoopMerge %40 %39 None -OpBranch %37 -%37 = OpLabel -%41 = OpLoad %float %r -%43 = OpFOrdLessThan %bool %41 %float_5 -OpBranchConditional %43 %38 %40 -%38 = OpLabel -%45 = OpLoad %float %r -%44 = OpExtInst %float %1 FClamp %45 %float_0 %float_1 -%47 = OpAccessChain %_ptr_Function_float %x %int_0 -OpStore %47 %44 -%48 = OpLoad %v4float %x -%49 = OpCompositeExtract %float %48 0 -%50 = OpFOrdEqual %bool %49 %float_0 -OpSelectionMerge %52 None -OpBranchConditional %50 %51 %52 -%51 = OpLabel -OpBranch %40 -%52 = OpLabel -OpBranch %39 -%39 = OpLabel -%53 = OpLoad %float %r -%54 = OpFAdd %float %53 %float_1 -OpStore %r %54 -OpBranch %36 -%40 = OpLabel -OpStore %b %float_5 -OpBranch %56 -%56 = OpLabel -OpLoopMerge %60 %59 None -OpBranch %57 -%57 = OpLabel -%61 = OpLoad %float %b -%62 = OpFOrdGreaterThanEqual %bool %61 %float_0 -OpBranchConditional %62 %58 %60 -%58 = OpLabel -%63 = OpLoad %float %b -%64 = OpAccessChain %_ptr_Function_float %x %int_2 -OpStore %64 %63 -%66 = OpLoad %v4float %x -%67 = OpCompositeExtract %float %66 3 -%68 = OpFOrdEqual %bool %67 %float_1 -OpSelectionMerge %70 None -OpBranchConditional %68 %69 %70 -%69 = OpLabel -OpBranch %59 -%70 = OpLabel -%71 = OpAccessChain %_ptr_Function_float %x %int_1 -OpStore %71 %float_0 -OpBranch %59 -%59 = OpLabel -%73 = OpLoad %float %b -%74 = OpFSub %float %73 %float_1 -OpStore %b %74 -OpBranch %56 -%60 = OpLabel -%75 = OpLoad %v4float %x -OpReturnValue %75 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %x = OpVariable %_ptr_Function_v4float Function + %r = OpVariable %_ptr_Function_float Function + %b = OpVariable %_ptr_Function_float Function + %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %28 + OpStore %x %32 + OpStore %r %float_n5 + OpBranch %36 + %36 = OpLabel + OpLoopMerge %40 %39 None + OpBranch %37 + %37 = OpLabel + %41 = OpLoad %float %r + %43 = OpFOrdLessThan %bool %41 %float_5 + OpBranchConditional %43 %38 %40 + %38 = OpLabel + %45 = OpLoad %float %r + %44 = OpExtInst %float %1 FClamp %45 %float_0 %float_1 + %47 = OpAccessChain %_ptr_Function_float %x %int_0 + OpStore %47 %44 + %48 = OpLoad %v4float %x + %49 = OpCompositeExtract %float %48 0 + %50 = OpFOrdEqual %bool %49 %float_0 + OpSelectionMerge %52 None + OpBranchConditional %50 %51 %52 + %51 = OpLabel + OpBranch %40 + %52 = OpLabel + OpBranch %39 + %39 = OpLabel + %53 = OpLoad %float %r + %54 = OpFAdd %float %53 %float_1 + OpStore %r %54 + OpBranch %36 + %40 = OpLabel + OpStore %b %float_5 + OpBranch %56 + %56 = OpLabel + OpLoopMerge %60 %59 None + OpBranch %57 + %57 = OpLabel + %61 = OpLoad %float %b + %62 = OpFOrdGreaterThanEqual %bool %61 %float_0 + OpBranchConditional %62 %58 %60 + %58 = OpLabel + %63 = OpLoad %float %b + %64 = OpAccessChain %_ptr_Function_float %x %int_2 + OpStore %64 %63 + %66 = OpLoad %v4float %x + %67 = OpCompositeExtract %float %66 3 + %68 = OpFOrdEqual %bool %67 %float_1 + OpSelectionMerge %70 None + OpBranchConditional %68 %69 %70 + %69 = OpLabel + OpBranch %59 + %70 = OpLabel + %71 = OpAccessChain %_ptr_Function_float %x %int_1 + OpStore %71 %float_0 + OpBranch %59 + %59 = OpLabel + %73 = OpLoad %float %b + %74 = OpFSub %float %73 %float_1 + OpStore %b %74 + OpBranch %56 + %60 = OpLabel + %75 = OpLoad %v4float %x + OpReturnValue %75 + OpFunctionEnd diff --git a/tests/sksl/shared/ForLoopControlFlow.skrp b/tests/sksl/shared/ForLoopControlFlow.skrp index 962cdc1c74ee..a387691e7b6a 100644 --- a/tests/sksl/shared/ForLoopControlFlow.skrp +++ b/tests/sksl/shared/ForLoopControlFlow.skrp @@ -1,3 +1,5 @@ +53 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_4_uniforms x = colorWhite diff --git a/tests/sksl/shared/ForLoopControlFlow.wgsl b/tests/sksl/shared/ForLoopControlFlow.wgsl new file mode 100644 index 000000000000..3f5b15b3affe --- /dev/null +++ b/tests/sksl/shared/ForLoopControlFlow.wgsl @@ -0,0 +1,56 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorWhite: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var x: vec4 = _globalUniforms.colorWhite; + { + var r: f32 = -5.0; + loop { + { + let _skTemp0 = saturate(r); + x.x = _skTemp0; + if x.x == 0.0 { + break; + } + } + continuing { + r = r + 1.0; + break if r >= 5.0; + } + } + } + { + var b: f32 = 5.0; + loop { + { + x.z = b; + if x.w == 1.0 { + continue; + } + x.y = 0.0; + } + continuing { + b = b - 1.0; + break if b < 0.0; + } + } + } + return x; + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/ForLoopMultipleInit.asm.frag b/tests/sksl/shared/ForLoopMultipleInit.asm.frag index 3ad87507d92d..385345dcca84 100644 --- a/tests/sksl/shared/ForLoopMultipleInit.asm.frag +++ b/tests/sksl/shared/ForLoopMultipleInit.asm.frag @@ -1,211 +1,211 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %result "result" -OpName %a "a" -OpName %b "b" -OpName %c "c" -OpName %d "d" -OpName %e "e" -OpName %f "f" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %result RelaxedPrecision -OpDecorate %a RelaxedPrecision -OpDecorate %b RelaxedPrecision -OpDecorate %35 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %48 RelaxedPrecision -OpDecorate %51 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %53 RelaxedPrecision -OpDecorate %55 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %58 RelaxedPrecision -OpDecorate %71 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %_arr_float_int_2 ArrayStride 16 -OpDecorate %_arr_float_int_4 ArrayStride 16 -OpDecorate %118 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %result "result" + OpName %a "a" + OpName %b "b" + OpName %c "c" + OpName %d "d" + OpName %e "e" + OpName %f "f" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %result RelaxedPrecision + OpDecorate %a RelaxedPrecision + OpDecorate %b RelaxedPrecision + OpDecorate %35 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %48 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %53 RelaxedPrecision + OpDecorate %55 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %58 RelaxedPrecision + OpDecorate %71 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %_arr_float_int_2 ArrayStride 16 + OpDecorate %_arr_float_int_4 ArrayStride 16 + OpDecorate %118 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%12 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%16 = OpConstantComposite %v2float %float_0 %float_0 + %void = OpTypeVoid + %12 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %16 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%20 = OpTypeFunction %v4float %_ptr_Function_v2float + %20 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float -%25 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %25 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 %_ptr_Function_float = OpTypePointer Function %float -%false = OpConstantFalse %bool -%float_10 = OpConstant %float 10 -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%float_1 = OpConstant %float 1 + %false = OpConstantFalse %bool + %float_10 = OpConstant %float 10 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %float_1 = OpConstant %float 1 %_ptr_Function_int = OpTypePointer Function %int -%int_10 = OpConstant %int 10 -%int_2 = OpConstant %int 2 + %int_10 = OpConstant %int 10 + %int_2 = OpConstant %int 2 %_arr_float_int_2 = OpTypeArray %float %int_2 %_ptr_Function__arr_float_int_2 = OpTypePointer Function %_arr_float_int_2 -%int_4 = OpConstant %int 4 + %int_4 = OpConstant %int 4 %_arr_float_int_4 = OpTypeArray %float %int_4 %_ptr_Function__arr_float_int_4 = OpTypePointer Function %_arr_float_int_4 -%float_2 = OpConstant %float 2 -%float_3 = OpConstant %float 3 -%float_4 = OpConstant %float 4 -%float_9 = OpConstant %float 9 -%int_3 = OpConstant %int 3 + %float_2 = OpConstant %float 2 + %float_3 = OpConstant %float 3 + %float_4 = OpConstant %float 4 + %float_9 = OpConstant %float 9 + %int_3 = OpConstant %int 3 %_entrypoint_v = OpFunction %void None %12 -%13 = OpLabel -%17 = OpVariable %_ptr_Function_v2float Function -OpStore %17 %16 -%19 = OpFunctionCall %v4float %main %17 -OpStore %sk_FragColor %19 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %20 -%21 = OpFunctionParameter %_ptr_Function_v2float -%22 = OpLabel -%result = OpVariable %_ptr_Function_v4float Function -%a = OpVariable %_ptr_Function_float Function -%b = OpVariable %_ptr_Function_float Function -%c = OpVariable %_ptr_Function_int Function -%d = OpVariable %_ptr_Function__arr_float_int_2 Function -%e = OpVariable %_ptr_Function__arr_float_int_4 Function -%f = OpVariable %_ptr_Function_float Function -OpStore %result %25 -OpStore %a %float_0 -OpStore %b %float_0 -OpBranch %29 -%29 = OpLabel -OpLoopMerge %33 %32 None -OpBranch %30 -%30 = OpLabel -%35 = OpLoad %float %a -%37 = OpFOrdLessThan %bool %35 %float_10 -OpSelectionMerge %39 None -OpBranchConditional %37 %38 %39 -%38 = OpLabel -%40 = OpLoad %float %b -%41 = OpFOrdLessThan %bool %40 %float_10 -OpBranch %39 -%39 = OpLabel -%42 = OpPhi %bool %false %30 %41 %38 -OpBranchConditional %42 %31 %33 -%31 = OpLabel -%43 = OpAccessChain %_ptr_Function_float %result %int_0 -%46 = OpLoad %float %43 -%47 = OpLoad %float %a -%48 = OpFAdd %float %46 %47 -OpStore %43 %48 -%49 = OpAccessChain %_ptr_Function_float %result %int_1 -%51 = OpLoad %float %49 -%52 = OpLoad %float %b -%53 = OpFAdd %float %51 %52 -OpStore %49 %53 -OpBranch %32 -%32 = OpLabel -%55 = OpLoad %float %a -%56 = OpFAdd %float %55 %float_1 -OpStore %a %56 -%57 = OpLoad %float %b -%58 = OpFAdd %float %57 %float_1 -OpStore %b %58 -OpBranch %29 -%33 = OpLabel -OpStore %c %int_0 -OpBranch %61 -%61 = OpLabel -OpLoopMerge %65 %64 None -OpBranch %62 -%62 = OpLabel -%66 = OpLoad %int %c -%68 = OpSLessThan %bool %66 %int_10 -OpBranchConditional %68 %63 %65 -%63 = OpLabel -%69 = OpAccessChain %_ptr_Function_float %result %int_2 -%71 = OpLoad %float %69 -%72 = OpFAdd %float %71 %float_1 -OpStore %69 %72 -OpBranch %64 -%64 = OpLabel -%73 = OpLoad %int %c -%74 = OpIAdd %int %73 %int_1 -OpStore %c %74 -OpBranch %61 -%65 = OpLabel -%78 = OpCompositeConstruct %_arr_float_int_2 %float_0 %float_10 -OpStore %d %78 -%86 = OpCompositeConstruct %_arr_float_int_4 %float_1 %float_2 %float_3 %float_4 -OpStore %e %86 -OpStore %f %float_9 -OpBranch %89 -%89 = OpLabel -OpLoopMerge %93 %92 None -OpBranch %90 -%90 = OpLabel -%94 = OpAccessChain %_ptr_Function_float %d %int_0 -%95 = OpLoad %float %94 -%96 = OpAccessChain %_ptr_Function_float %d %int_1 -%97 = OpLoad %float %96 -%98 = OpFOrdLessThan %bool %95 %97 -OpBranchConditional %98 %91 %93 -%91 = OpLabel -%99 = OpAccessChain %_ptr_Function_float %e %int_0 -%100 = OpLoad %float %99 -%101 = OpLoad %float %f -%102 = OpFMul %float %100 %101 -%103 = OpAccessChain %_ptr_Function_float %result %int_3 -OpStore %103 %102 -OpBranch %92 -%92 = OpLabel -%105 = OpAccessChain %_ptr_Function_float %d %int_0 -%106 = OpLoad %float %105 -%107 = OpFAdd %float %106 %float_1 -OpStore %105 %107 -OpBranch %89 -%93 = OpLabel -OpBranch %108 -%108 = OpLabel -OpLoopMerge %112 %111 None -OpBranch %109 -%109 = OpLabel -OpBranch %110 -%110 = OpLabel -OpBranch %112 -%111 = OpLabel -OpBranch %108 -%112 = OpLabel -OpBranch %113 -%113 = OpLabel -OpLoopMerge %117 %116 None -OpBranch %114 -%114 = OpLabel -OpBranch %115 -%115 = OpLabel -OpBranch %117 -%116 = OpLabel -OpBranch %113 -%117 = OpLabel -%118 = OpLoad %v4float %result -OpReturnValue %118 -OpFunctionEnd + %13 = OpLabel + %17 = OpVariable %_ptr_Function_v2float Function + OpStore %17 %16 + %19 = OpFunctionCall %v4float %main %17 + OpStore %sk_FragColor %19 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %20 + %21 = OpFunctionParameter %_ptr_Function_v2float + %22 = OpLabel + %result = OpVariable %_ptr_Function_v4float Function + %a = OpVariable %_ptr_Function_float Function + %b = OpVariable %_ptr_Function_float Function + %c = OpVariable %_ptr_Function_int Function + %d = OpVariable %_ptr_Function__arr_float_int_2 Function + %e = OpVariable %_ptr_Function__arr_float_int_4 Function + %f = OpVariable %_ptr_Function_float Function + OpStore %result %25 + OpStore %a %float_0 + OpStore %b %float_0 + OpBranch %29 + %29 = OpLabel + OpLoopMerge %33 %32 None + OpBranch %30 + %30 = OpLabel + %35 = OpLoad %float %a + %37 = OpFOrdLessThan %bool %35 %float_10 + OpSelectionMerge %39 None + OpBranchConditional %37 %38 %39 + %38 = OpLabel + %40 = OpLoad %float %b + %41 = OpFOrdLessThan %bool %40 %float_10 + OpBranch %39 + %39 = OpLabel + %42 = OpPhi %bool %false %30 %41 %38 + OpBranchConditional %42 %31 %33 + %31 = OpLabel + %43 = OpAccessChain %_ptr_Function_float %result %int_0 + %46 = OpLoad %float %43 + %47 = OpLoad %float %a + %48 = OpFAdd %float %46 %47 + OpStore %43 %48 + %49 = OpAccessChain %_ptr_Function_float %result %int_1 + %51 = OpLoad %float %49 + %52 = OpLoad %float %b + %53 = OpFAdd %float %51 %52 + OpStore %49 %53 + OpBranch %32 + %32 = OpLabel + %55 = OpLoad %float %a + %56 = OpFAdd %float %55 %float_1 + OpStore %a %56 + %57 = OpLoad %float %b + %58 = OpFAdd %float %57 %float_1 + OpStore %b %58 + OpBranch %29 + %33 = OpLabel + OpStore %c %int_0 + OpBranch %61 + %61 = OpLabel + OpLoopMerge %65 %64 None + OpBranch %62 + %62 = OpLabel + %66 = OpLoad %int %c + %68 = OpSLessThan %bool %66 %int_10 + OpBranchConditional %68 %63 %65 + %63 = OpLabel + %69 = OpAccessChain %_ptr_Function_float %result %int_2 + %71 = OpLoad %float %69 + %72 = OpFAdd %float %71 %float_1 + OpStore %69 %72 + OpBranch %64 + %64 = OpLabel + %73 = OpLoad %int %c + %74 = OpIAdd %int %73 %int_1 + OpStore %c %74 + OpBranch %61 + %65 = OpLabel + %78 = OpCompositeConstruct %_arr_float_int_2 %float_0 %float_10 + OpStore %d %78 + %86 = OpCompositeConstruct %_arr_float_int_4 %float_1 %float_2 %float_3 %float_4 + OpStore %e %86 + OpStore %f %float_9 + OpBranch %89 + %89 = OpLabel + OpLoopMerge %93 %92 None + OpBranch %90 + %90 = OpLabel + %94 = OpAccessChain %_ptr_Function_float %d %int_0 + %95 = OpLoad %float %94 + %96 = OpAccessChain %_ptr_Function_float %d %int_1 + %97 = OpLoad %float %96 + %98 = OpFOrdLessThan %bool %95 %97 + OpBranchConditional %98 %91 %93 + %91 = OpLabel + %99 = OpAccessChain %_ptr_Function_float %e %int_0 + %100 = OpLoad %float %99 + %101 = OpLoad %float %f + %102 = OpFMul %float %100 %101 + %103 = OpAccessChain %_ptr_Function_float %result %int_3 + OpStore %103 %102 + OpBranch %92 + %92 = OpLabel + %105 = OpAccessChain %_ptr_Function_float %d %int_0 + %106 = OpLoad %float %105 + %107 = OpFAdd %float %106 %float_1 + OpStore %105 %107 + OpBranch %89 + %93 = OpLabel + OpBranch %108 + %108 = OpLabel + OpLoopMerge %112 %111 None + OpBranch %109 + %109 = OpLabel + OpBranch %110 + %110 = OpLabel + OpBranch %112 + %111 = OpLabel + OpBranch %108 + %112 = OpLabel + OpBranch %113 + %113 = OpLabel + OpLoopMerge %117 %116 None + OpBranch %114 + %114 = OpLabel + OpBranch %115 + %115 = OpLabel + OpBranch %117 + %116 = OpLabel + OpBranch %113 + %117 = OpLabel + %118 = OpLoad %v4float %result + OpReturnValue %118 + OpFunctionEnd diff --git a/tests/sksl/shared/ForLoopMultipleInit.skrp b/tests/sksl/shared/ForLoopMultipleInit.skrp index b79efdfd30de..b12162341e81 100644 --- a/tests/sksl/shared/ForLoopMultipleInit.skrp +++ b/tests/sksl/shared/ForLoopMultipleInit.skrp @@ -1,9 +1,13 @@ +75 instructions + [immutable slots] -e[0] = 0x3F800000 (1.0) -e[1] = 0x40000000 (2.0) -e[2] = 0x40400000 (3.0) -e[3] = 0x40800000 (4.0) -f = 0x41100000 (9.0) +i0 = 0 +i1 = 0x41200000 (10.0) +i2 = 0x3F800000 (1.0) +i3 = 0x40000000 (2.0) +i4 = 0x40400000 (3.0) +i5 = 0x40800000 (4.0) +i6 = 0x41100000 (9.0) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -55,14 +59,12 @@ stack_rewind branch_if_any_lanes_active branch_if_any_lanes_active -12 (label 5 at #36) label label 0x00000003 load_loop_mask LoopMask = $0 -copy_constant d[0] = 0 -copy_constant d[1] = 0x41200000 (10.0) +copy_2_immutables_unmasked d[0], d[1] = i0..1 [0, 0x41200000 (10.0)] store_loop_mask $0 = LoopMask -jump jump +9 (label 7 at #63) +jump jump +8 (label 7 at #61) label label 0x00000008 -copy_slot_unmasked $1 = e[0] -copy_slot_unmasked $2 = f -mul_float $1 *= $2 +copy_immutable_unmasked $1 = i2 [0x3F800000 (1.0)] +mul_imm_float $1 *= 0x41100000 (9.0) copy_slot_masked result(3) = Mask($1) copy_slot_unmasked $1 = d[0] add_imm_float $1 += 0x3F800000 (1.0) @@ -72,27 +74,27 @@ copy_2_slots_unmasked $1..2 = d[0], d[1] cmplt_float $1 = lessThan($1, $2) merge_loop_mask LoopMask &= $1 stack_rewind -branch_if_any_lanes_active branch_if_any_lanes_active -13 (label 8 at #55) +branch_if_any_lanes_active branch_if_any_lanes_active -12 (label 8 at #54) label label 0x00000006 load_loop_mask LoopMask = $0 store_loop_mask $0 = LoopMask -jump jump +4 (label 10 at #76) +jump jump +4 (label 10 at #74) label label 0x0000000B -branch_if_all_lanes_active branch_if_all_lanes_active +5 (label 9 at #79) +branch_if_all_lanes_active branch_if_all_lanes_active +5 (label 9 at #77) mask_off_loop_mask LoopMask &= ~(CondMask & LoopMask & RetMask) label label 0x0000000A stack_rewind -branch_if_any_lanes_active branch_if_any_lanes_active -5 (label 11 at #73) +branch_if_any_lanes_active branch_if_any_lanes_active -5 (label 11 at #71) label label 0x00000009 load_loop_mask LoopMask = $0 store_loop_mask $0 = LoopMask -jump jump +4 (label 13 at #86) +jump jump +4 (label 13 at #84) label label 0x0000000E -branch_if_all_lanes_active branch_if_all_lanes_active +5 (label 12 at #89) +branch_if_all_lanes_active branch_if_all_lanes_active +5 (label 12 at #87) mask_off_loop_mask LoopMask &= ~(CondMask & LoopMask & RetMask) label label 0x0000000D stack_rewind -branch_if_any_lanes_active branch_if_any_lanes_active -5 (label 14 at #83) +branch_if_any_lanes_active branch_if_any_lanes_active -5 (label 14 at #81) label label 0x0000000C load_loop_mask LoopMask = $0 copy_4_slots_unmasked $0..3 = result diff --git a/tests/sksl/shared/ForLoopMultipleInit.wgsl b/tests/sksl/shared/ForLoopMultipleInit.wgsl index b99ffda950da..07617d71aaa9 100644 --- a/tests/sksl/shared/ForLoopMultipleInit.wgsl +++ b/tests/sksl/shared/ForLoopMultipleInit.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -13,7 +14,7 @@ fn main(_skParam0: vec2) -> vec4 { var a: f32 = 0.0; var b: f32 = 0.0; loop { - if a < 10.0 && b < 10.0 { + if (a < 10.0) && (b < 10.0) { { result.x = result.x + a; result.y = result.y + b; diff --git a/tests/sksl/shared/FragCoords.asm.frag b/tests/sksl/shared/FragCoords.asm.frag index 51e844ea093d..295884c9b37e 100644 --- a/tests/sksl/shared/FragCoords.asm.frag +++ b/tests/sksl/shared/FragCoords.asm.frag @@ -1,76 +1,76 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor %sk_FragCoord -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %sk_FragCoord "sk_FragCoord" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %sksl_synthetic_uniforms "sksl_synthetic_uniforms" -OpMemberName %sksl_synthetic_uniforms 0 "u_skRTFlip" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %sk_FragCoord BuiltIn FragCoord -OpMemberDecorate %sksl_synthetic_uniforms 0 Offset 16384 -OpDecorate %sksl_synthetic_uniforms Block -OpDecorate %25 Binding 0 -OpDecorate %25 DescriptorSet 0 -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor %sk_FragCoord + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %sk_FragCoord "sk_FragCoord" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %sksl_synthetic_uniforms "sksl_synthetic_uniforms" + OpMemberName %sksl_synthetic_uniforms 0 "u_skRTFlip" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %sk_FragCoord BuiltIn FragCoord + OpMemberDecorate %sksl_synthetic_uniforms 0 Offset 16384 + OpDecorate %sksl_synthetic_uniforms Block + OpDecorate %25 Binding 0 + OpDecorate %25 DescriptorSet 0 + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_ptr_Input_v4float = OpTypePointer Input %v4float %sk_FragCoord = OpVariable %_ptr_Input_v4float Input -%void = OpTypeVoid -%14 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%18 = OpConstantComposite %v2float %float_0 %float_0 + %void = OpTypeVoid + %14 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %18 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%22 = OpTypeFunction %v4float %_ptr_Function_v2float + %22 = OpTypeFunction %v4float %_ptr_Function_v2float %sksl_synthetic_uniforms = OpTypeStruct %v2float %_ptr_Uniform_sksl_synthetic_uniforms = OpTypePointer Uniform %sksl_synthetic_uniforms -%25 = OpVariable %_ptr_Uniform_sksl_synthetic_uniforms Uniform -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 + %25 = OpVariable %_ptr_Uniform_sksl_synthetic_uniforms Uniform + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 %_ptr_Uniform_v2float = OpTypePointer Uniform %v2float -%float_1 = OpConstant %float 1 + %float_1 = OpConstant %float 1 %_entrypoint_v = OpFunction %void None %14 -%15 = OpLabel -%19 = OpVariable %_ptr_Function_v2float Function -OpStore %19 %18 -%21 = OpFunctionCall %v4float %main %19 -OpStore %sk_FragColor %21 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %22 -%23 = OpFunctionParameter %_ptr_Function_v2float -%24 = OpLabel -%30 = OpAccessChain %_ptr_Uniform_v2float %25 %int_0 -%32 = OpLoad %v2float %30 -%33 = OpCompositeExtract %float %32 0 -%34 = OpAccessChain %_ptr_Uniform_v2float %25 %int_0 -%35 = OpLoad %v2float %34 -%36 = OpCompositeExtract %float %35 1 -%37 = OpLoad %v4float %sk_FragCoord -%38 = OpCompositeExtract %float %37 0 -%39 = OpLoad %v4float %sk_FragCoord -%40 = OpCompositeExtract %float %39 1 -%41 = OpLoad %v4float %sk_FragCoord -%42 = OpVectorShuffle %v2float %41 %41 2 3 -%43 = OpFMul %float %36 %40 -%44 = OpFAdd %float %33 %43 -%45 = OpCompositeConstruct %v4float %38 %44 %42 -%46 = OpVectorShuffle %v2float %45 %45 1 0 -%47 = OpCompositeExtract %float %46 0 -%48 = OpCompositeExtract %float %46 1 -%50 = OpCompositeConstruct %v4float %47 %48 %float_1 %float_1 -OpReturnValue %50 -OpFunctionEnd + %15 = OpLabel + %19 = OpVariable %_ptr_Function_v2float Function + OpStore %19 %18 + %21 = OpFunctionCall %v4float %main %19 + OpStore %sk_FragColor %21 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %22 + %23 = OpFunctionParameter %_ptr_Function_v2float + %24 = OpLabel + %30 = OpAccessChain %_ptr_Uniform_v2float %25 %int_0 + %32 = OpLoad %v2float %30 + %33 = OpCompositeExtract %float %32 0 + %34 = OpAccessChain %_ptr_Uniform_v2float %25 %int_0 + %35 = OpLoad %v2float %34 + %36 = OpCompositeExtract %float %35 1 + %37 = OpLoad %v4float %sk_FragCoord + %38 = OpCompositeExtract %float %37 0 + %39 = OpLoad %v4float %sk_FragCoord + %40 = OpCompositeExtract %float %39 1 + %41 = OpLoad %v4float %sk_FragCoord + %42 = OpVectorShuffle %v2float %41 %41 2 3 + %43 = OpFMul %float %36 %40 + %44 = OpFAdd %float %33 %43 + %45 = OpCompositeConstruct %v4float %38 %44 %42 + %46 = OpVectorShuffle %v2float %45 %45 1 0 + %47 = OpCompositeExtract %float %46 0 + %48 = OpCompositeExtract %float %46 1 + %50 = OpCompositeConstruct %v4float %47 %48 %float_1 %float_1 + OpReturnValue %50 + OpFunctionEnd diff --git a/tests/sksl/shared/FragCoords.skrp b/tests/sksl/shared/FragCoords.skrp index e8c6478a490c..03e0ab0a389c 100644 --- a/tests/sksl/shared/FragCoords.skrp +++ b/tests/sksl/shared/FragCoords.skrp @@ -1,3 +1,5 @@ +7 instructions + store_src_rg v0..1 = src.rg init_lane_masks CondMask = LoopMask = RetMask = true store_device_xy01 sk_FragCoord = DeviceCoords.xy01 diff --git a/tests/sksl/shared/FragCoords.wgsl b/tests/sksl/shared/FragCoords.wgsl new file mode 100644 index 000000000000..f2f7130573e1 --- /dev/null +++ b/tests/sksl/shared/FragCoords.wgsl @@ -0,0 +1,18 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +fn main(_stageIn: FSIn, _skParam0: vec2) -> vec4 { + { + return vec4(vec4(_stageIn.sk_FragCoord.yx, 1.0, 1.0)); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn, _stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/FragCoordsNoRTFlip.asm.frag b/tests/sksl/shared/FragCoordsNoRTFlip.asm.frag index 2e8835b7a3d7..741c38f10ddf 100644 --- a/tests/sksl/shared/FragCoordsNoRTFlip.asm.frag +++ b/tests/sksl/shared/FragCoordsNoRTFlip.asm.frag @@ -1,37 +1,37 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor %sk_FragCoord -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %sk_FragCoord "sk_FragCoord" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %sk_FragCoord BuiltIn FragCoord -OpDecorate %18 RelaxedPrecision -OpDecorate %19 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor %sk_FragCoord + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %sk_FragCoord "sk_FragCoord" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %sk_FragCoord BuiltIn FragCoord + OpDecorate %18 RelaxedPrecision + OpDecorate %19 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_ptr_Input_v4float = OpTypePointer Input %v4float %sk_FragCoord = OpVariable %_ptr_Input_v4float Input -%void = OpTypeVoid -%13 = OpTypeFunction %void -%v2float = OpTypeVector %float 2 -%main = OpFunction %void None %13 -%14 = OpLabel -%15 = OpLoad %v4float %sk_FragCoord -%16 = OpVectorShuffle %v2float %15 %15 0 1 -%18 = OpLoad %v4float %sk_FragColor -%19 = OpVectorShuffle %v4float %18 %16 4 5 2 3 -OpStore %sk_FragColor %19 -OpReturn -OpFunctionEnd + %void = OpTypeVoid + %13 = OpTypeFunction %void + %v2float = OpTypeVector %float 2 + %main = OpFunction %void None %13 + %14 = OpLabel + %15 = OpLoad %v4float %sk_FragCoord + %16 = OpVectorShuffle %v2float %15 %15 0 1 + %18 = OpLoad %v4float %sk_FragColor + %19 = OpVectorShuffle %v4float %18 %16 4 5 2 3 + OpStore %sk_FragColor %19 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/FragCoordsNoRTFlip.wgsl b/tests/sksl/shared/FragCoordsNoRTFlip.wgsl new file mode 100644 index 000000000000..cef4bee61570 --- /dev/null +++ b/tests/sksl/shared/FragCoordsNoRTFlip.wgsl @@ -0,0 +1,18 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +fn main(_stageIn: FSIn, _stageOut: ptr) { + { + (*_stageOut).sk_FragColor = vec4((vec2(_stageIn.sk_FragCoord.xy)), (*_stageOut).sk_FragColor.zw).xyzw; + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(_stageIn, &_stageOut); + return _stageOut; +} diff --git a/tests/sksl/shared/FunctionAnonymousParameters.asm.frag b/tests/sksl/shared/FunctionAnonymousParameters.asm.frag index 98db8607facf..1ef06e612373 100644 --- a/tests/sksl/shared/FunctionAnonymousParameters.asm.frag +++ b/tests/sksl/shared/FunctionAnonymousParameters.asm.frag @@ -1,124 +1,124 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %fnGreen_h4bf2 "fnGreen_h4bf2" -OpName %S "S" -OpMemberName %S 0 "i" -OpName %fnRed_h4ifS "fnRed_h4ifS" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %12 Binding 0 -OpDecorate %12 DescriptorSet 0 -OpDecorate %34 RelaxedPrecision -OpMemberDecorate %S 0 Offset 0 -OpDecorate %46 RelaxedPrecision -OpDecorate %51 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %71 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %fnGreen_h4bf2 "fnGreen_h4bf2" + OpName %S "S" + OpMemberName %S 0 "i" + OpName %fnRed_h4ifS "fnRed_h4ifS" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %12 Binding 0 + OpDecorate %12 DescriptorSet 0 + OpDecorate %34 RelaxedPrecision + OpMemberDecorate %S 0 Offset 0 + OpDecorate %46 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %71 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%12 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%17 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%21 = OpConstantComposite %v2float %float_0 %float_0 + %12 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %17 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %21 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float %_ptr_Function_bool = OpTypePointer Function %bool -%26 = OpTypeFunction %v4float %_ptr_Function_bool %_ptr_Function_v2float + %26 = OpTypeFunction %v4float %_ptr_Function_bool %_ptr_Function_v2float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 %_ptr_Function_int = OpTypePointer Function %int %_ptr_Function_float = OpTypePointer Function %float -%S = OpTypeStruct %int + %S = OpTypeStruct %int %_ptr_Function_S = OpTypePointer Function %S -%39 = OpTypeFunction %v4float %_ptr_Function_int %_ptr_Function_float %_ptr_Function_S -%int_1 = OpConstant %int 1 -%47 = OpTypeFunction %v4float %_ptr_Function_v2float + %39 = OpTypeFunction %v4float %_ptr_Function_int %_ptr_Function_float %_ptr_Function_S + %int_1 = OpConstant %int 1 + %47 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float -%true = OpConstantTrue %bool -%int_123 = OpConstant %int 123 + %true = OpConstantTrue %bool + %int_123 = OpConstant %int 123 %float_3_1400001 = OpConstant %float 3.1400001 %_entrypoint_v = OpFunction %void None %17 -%18 = OpLabel -%22 = OpVariable %_ptr_Function_v2float Function -OpStore %22 %21 -%24 = OpFunctionCall %v4float %main %22 -OpStore %sk_FragColor %24 -OpReturn -OpFunctionEnd + %18 = OpLabel + %22 = OpVariable %_ptr_Function_v2float Function + OpStore %22 %21 + %24 = OpFunctionCall %v4float %main %22 + OpStore %sk_FragColor %24 + OpReturn + OpFunctionEnd %fnGreen_h4bf2 = OpFunction %v4float None %26 -%27 = OpFunctionParameter %_ptr_Function_bool -%28 = OpFunctionParameter %_ptr_Function_v2float -%29 = OpLabel -%30 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 -%34 = OpLoad %v4float %30 -OpReturnValue %34 -OpFunctionEnd + %27 = OpFunctionParameter %_ptr_Function_bool + %28 = OpFunctionParameter %_ptr_Function_v2float + %29 = OpLabel + %30 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 + %34 = OpLoad %v4float %30 + OpReturnValue %34 + OpFunctionEnd %fnRed_h4ifS = OpFunction %v4float None %39 -%40 = OpFunctionParameter %_ptr_Function_int -%41 = OpFunctionParameter %_ptr_Function_float -%42 = OpFunctionParameter %_ptr_Function_S -%43 = OpLabel -%44 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1 -%46 = OpLoad %v4float %44 -OpReturnValue %46 -OpFunctionEnd -%main = OpFunction %v4float None %47 -%48 = OpFunctionParameter %_ptr_Function_v2float -%49 = OpLabel -%54 = OpVariable %_ptr_Function_v4float Function -%60 = OpVariable %_ptr_Function_bool Function -%62 = OpVariable %_ptr_Function_v2float Function -%65 = OpVariable %_ptr_Function_int Function -%67 = OpVariable %_ptr_Function_float Function -%69 = OpVariable %_ptr_Function_S Function -%50 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 -%51 = OpLoad %v4float %50 -%52 = OpCompositeExtract %float %51 1 -%53 = OpFUnordNotEqual %bool %52 %float_0 -OpSelectionMerge %58 None -OpBranchConditional %53 %56 %57 -%56 = OpLabel -OpStore %60 %true -%61 = OpLoad %v2float %48 -OpStore %62 %61 -%63 = OpFunctionCall %v4float %fnGreen_h4bf2 %60 %62 -OpStore %54 %63 -OpBranch %58 -%57 = OpLabel -OpStore %65 %int_123 -OpStore %67 %float_3_1400001 -%68 = OpCompositeConstruct %S %int_0 -OpStore %69 %68 -%70 = OpFunctionCall %v4float %fnRed_h4ifS %65 %67 %69 -OpStore %54 %70 -OpBranch %58 -%58 = OpLabel -%71 = OpLoad %v4float %54 -OpReturnValue %71 -OpFunctionEnd + %40 = OpFunctionParameter %_ptr_Function_int + %41 = OpFunctionParameter %_ptr_Function_float + %42 = OpFunctionParameter %_ptr_Function_S + %43 = OpLabel + %44 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1 + %46 = OpLoad %v4float %44 + OpReturnValue %46 + OpFunctionEnd + %main = OpFunction %v4float None %47 + %48 = OpFunctionParameter %_ptr_Function_v2float + %49 = OpLabel + %54 = OpVariable %_ptr_Function_v4float Function + %60 = OpVariable %_ptr_Function_bool Function + %62 = OpVariable %_ptr_Function_v2float Function + %65 = OpVariable %_ptr_Function_int Function + %67 = OpVariable %_ptr_Function_float Function + %69 = OpVariable %_ptr_Function_S Function + %50 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 + %51 = OpLoad %v4float %50 + %52 = OpCompositeExtract %float %51 1 + %53 = OpFUnordNotEqual %bool %52 %float_0 + OpSelectionMerge %58 None + OpBranchConditional %53 %56 %57 + %56 = OpLabel + OpStore %60 %true + %61 = OpLoad %v2float %48 + OpStore %62 %61 + %63 = OpFunctionCall %v4float %fnGreen_h4bf2 %60 %62 + OpStore %54 %63 + OpBranch %58 + %57 = OpLabel + OpStore %65 %int_123 + OpStore %67 %float_3_1400001 + %68 = OpCompositeConstruct %S %int_0 + OpStore %69 %68 + %70 = OpFunctionCall %v4float %fnRed_h4ifS %65 %67 %69 + OpStore %54 %70 + OpBranch %58 + %58 = OpLabel + %71 = OpLoad %v4float %54 + OpReturnValue %71 + OpFunctionEnd diff --git a/tests/sksl/shared/FunctionAnonymousParameters.skrp b/tests/sksl/shared/FunctionAnonymousParameters.skrp index d26863cf7354..3f45f84d6864 100644 --- a/tests/sksl/shared/FunctionAnonymousParameters.skrp +++ b/tests/sksl/shared/FunctionAnonymousParameters.skrp @@ -1,3 +1,5 @@ +14 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_uniform $4 = colorGreen(1) diff --git a/tests/sksl/shared/FunctionAnonymousParameters.wgsl b/tests/sksl/shared/FunctionAnonymousParameters.wgsl index 3bb39b480b2e..ed71f57a0f43 100644 --- a/tests/sksl/shared/FunctionAnonymousParameters.wgsl +++ b/tests/sksl/shared/FunctionAnonymousParameters.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, diff --git a/tests/sksl/shared/FunctionArgTypeMatch.asm.frag b/tests/sksl/shared/FunctionArgTypeMatch.asm.frag index 8648bc8a09e1..f9b6e405a3ce 100644 --- a/tests/sksl/shared/FunctionArgTypeMatch.asm.frag +++ b/tests/sksl/shared/FunctionArgTypeMatch.asm.frag @@ -1,487 +1,487 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %takes_void_b "takes_void_b" -OpName %takes_float_bf "takes_float_bf" -OpName %takes_float2_bf2 "takes_float2_bf2" -OpName %takes_float3_bf3 "takes_float3_bf3" -OpName %takes_float4_bf4 "takes_float4_bf4" -OpName %takes_float2x2_bf22 "takes_float2x2_bf22" -OpName %takes_float3x3_bf33 "takes_float3x3_bf33" -OpName %takes_float4x4_bf44 "takes_float4x4_bf44" -OpName %takes_half_bh "takes_half_bh" -OpName %takes_half2_bh2 "takes_half2_bh2" -OpName %takes_half3_bh3 "takes_half3_bh3" -OpName %takes_half4_bh4 "takes_half4_bh4" -OpName %takes_half2x2_bh22 "takes_half2x2_bh22" -OpName %takes_half3x3_bh33 "takes_half3x3_bh33" -OpName %takes_half4x4_bh44 "takes_half4x4_bh44" -OpName %takes_bool_bb "takes_bool_bb" -OpName %takes_bool2_bb2 "takes_bool2_bb2" -OpName %takes_bool3_bb3 "takes_bool3_bb3" -OpName %takes_bool4_bb4 "takes_bool4_bb4" -OpName %takes_int_bi "takes_int_bi" -OpName %takes_int2_bi2 "takes_int2_bi2" -OpName %takes_int3_bi3 "takes_int3_bi3" -OpName %takes_int4_bi4 "takes_int4_bi4" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %33 Binding 0 -OpDecorate %33 DescriptorSet 0 -OpDecorate %287 RelaxedPrecision -OpDecorate %289 RelaxedPrecision -OpDecorate %290 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %takes_void_b "takes_void_b" + OpName %takes_float_bf "takes_float_bf" + OpName %takes_float2_bf2 "takes_float2_bf2" + OpName %takes_float3_bf3 "takes_float3_bf3" + OpName %takes_float4_bf4 "takes_float4_bf4" + OpName %takes_float2x2_bf22 "takes_float2x2_bf22" + OpName %takes_float3x3_bf33 "takes_float3x3_bf33" + OpName %takes_float4x4_bf44 "takes_float4x4_bf44" + OpName %takes_half_bh "takes_half_bh" + OpName %takes_half2_bh2 "takes_half2_bh2" + OpName %takes_half3_bh3 "takes_half3_bh3" + OpName %takes_half4_bh4 "takes_half4_bh4" + OpName %takes_half2x2_bh22 "takes_half2x2_bh22" + OpName %takes_half3x3_bh33 "takes_half3x3_bh33" + OpName %takes_half4x4_bh44 "takes_half4x4_bh44" + OpName %takes_bool_bb "takes_bool_bb" + OpName %takes_bool2_bb2 "takes_bool2_bb2" + OpName %takes_bool3_bb3 "takes_bool3_bb3" + OpName %takes_bool4_bb4 "takes_bool4_bb4" + OpName %takes_int_bi "takes_int_bi" + OpName %takes_int2_bi2 "takes_int2_bi2" + OpName %takes_int3_bi3 "takes_int3_bi3" + OpName %takes_int4_bi4 "takes_int4_bi4" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %33 Binding 0 + OpDecorate %33 DescriptorSet 0 + OpDecorate %287 RelaxedPrecision + OpDecorate %289 RelaxedPrecision + OpDecorate %290 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%33 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%38 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%42 = OpConstantComposite %v2float %float_0 %float_0 + %33 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %38 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %42 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%46 = OpTypeFunction %bool -%true = OpConstantTrue %bool + %46 = OpTypeFunction %bool + %true = OpConstantTrue %bool %_ptr_Function_float = OpTypePointer Function %float -%50 = OpTypeFunction %bool %_ptr_Function_float -%53 = OpTypeFunction %bool %_ptr_Function_v2float -%v3float = OpTypeVector %float 3 + %50 = OpTypeFunction %bool %_ptr_Function_float + %53 = OpTypeFunction %bool %_ptr_Function_v2float + %v3float = OpTypeVector %float 3 %_ptr_Function_v3float = OpTypePointer Function %v3float -%58 = OpTypeFunction %bool %_ptr_Function_v3float + %58 = OpTypeFunction %bool %_ptr_Function_v3float %_ptr_Function_v4float = OpTypePointer Function %v4float -%62 = OpTypeFunction %bool %_ptr_Function_v4float + %62 = OpTypeFunction %bool %_ptr_Function_v4float %mat2v2float = OpTypeMatrix %v2float 2 %_ptr_Function_mat2v2float = OpTypePointer Function %mat2v2float -%67 = OpTypeFunction %bool %_ptr_Function_mat2v2float + %67 = OpTypeFunction %bool %_ptr_Function_mat2v2float %mat3v3float = OpTypeMatrix %v3float 3 %_ptr_Function_mat3v3float = OpTypePointer Function %mat3v3float -%72 = OpTypeFunction %bool %_ptr_Function_mat3v3float + %72 = OpTypeFunction %bool %_ptr_Function_mat3v3float %mat4v4float = OpTypeMatrix %v4float 4 %_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float -%77 = OpTypeFunction %bool %_ptr_Function_mat4v4float + %77 = OpTypeFunction %bool %_ptr_Function_mat4v4float %_ptr_Function_bool = OpTypePointer Function %bool -%95 = OpTypeFunction %bool %_ptr_Function_bool -%v2bool = OpTypeVector %bool 2 + %95 = OpTypeFunction %bool %_ptr_Function_bool + %v2bool = OpTypeVector %bool 2 %_ptr_Function_v2bool = OpTypePointer Function %v2bool -%100 = OpTypeFunction %bool %_ptr_Function_v2bool -%v3bool = OpTypeVector %bool 3 + %100 = OpTypeFunction %bool %_ptr_Function_v2bool + %v3bool = OpTypeVector %bool 3 %_ptr_Function_v3bool = OpTypePointer Function %v3bool -%105 = OpTypeFunction %bool %_ptr_Function_v3bool -%v4bool = OpTypeVector %bool 4 + %105 = OpTypeFunction %bool %_ptr_Function_v3bool + %v4bool = OpTypeVector %bool 4 %_ptr_Function_v4bool = OpTypePointer Function %v4bool -%110 = OpTypeFunction %bool %_ptr_Function_v4bool -%int = OpTypeInt 32 1 + %110 = OpTypeFunction %bool %_ptr_Function_v4bool + %int = OpTypeInt 32 1 %_ptr_Function_int = OpTypePointer Function %int -%115 = OpTypeFunction %bool %_ptr_Function_int -%v2int = OpTypeVector %int 2 + %115 = OpTypeFunction %bool %_ptr_Function_int + %v2int = OpTypeVector %int 2 %_ptr_Function_v2int = OpTypePointer Function %v2int -%120 = OpTypeFunction %bool %_ptr_Function_v2int -%v3int = OpTypeVector %int 3 + %120 = OpTypeFunction %bool %_ptr_Function_v2int + %v3int = OpTypeVector %int 3 %_ptr_Function_v3int = OpTypePointer Function %v3int -%125 = OpTypeFunction %bool %_ptr_Function_v3int -%v4int = OpTypeVector %int 4 + %125 = OpTypeFunction %bool %_ptr_Function_v3int + %v4int = OpTypeVector %int 4 %_ptr_Function_v4int = OpTypePointer Function %v4int -%130 = OpTypeFunction %bool %_ptr_Function_v4int -%133 = OpTypeFunction %v4float %_ptr_Function_v2float -%false = OpConstantFalse %bool -%float_1 = OpConstant %float 1 -%float_2 = OpConstant %float 2 -%150 = OpConstantComposite %v2float %float_2 %float_2 -%float_3 = OpConstant %float 3 -%157 = OpConstantComposite %v3float %float_3 %float_3 %float_3 -%float_4 = OpConstant %float 4 -%164 = OpConstantComposite %v4float %float_4 %float_4 %float_4 %float_4 -%170 = OpConstantComposite %v2float %float_2 %float_0 -%171 = OpConstantComposite %v2float %float_0 %float_2 -%172 = OpConstantComposite %mat2v2float %170 %171 -%178 = OpConstantComposite %v3float %float_3 %float_0 %float_0 -%179 = OpConstantComposite %v3float %float_0 %float_3 %float_0 -%180 = OpConstantComposite %v3float %float_0 %float_0 %float_3 -%181 = OpConstantComposite %mat3v3float %178 %179 %180 -%187 = OpConstantComposite %v4float %float_4 %float_0 %float_0 %float_0 -%188 = OpConstantComposite %v4float %float_0 %float_4 %float_0 %float_0 -%189 = OpConstantComposite %v4float %float_0 %float_0 %float_4 %float_0 -%190 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_4 -%191 = OpConstantComposite %mat4v4float %187 %188 %189 %190 -%237 = OpConstantComposite %v2bool %true %true -%243 = OpConstantComposite %v3bool %true %true %true -%249 = OpConstantComposite %v4bool %true %true %true %true -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 -%262 = OpConstantComposite %v2int %int_2 %int_2 -%int_3 = OpConstant %int 3 -%269 = OpConstantComposite %v3int %int_3 %int_3 %int_3 -%int_4 = OpConstant %int 4 -%276 = OpConstantComposite %v4int %int_4 %int_4 %int_4 %int_4 + %130 = OpTypeFunction %bool %_ptr_Function_v4int + %133 = OpTypeFunction %v4float %_ptr_Function_v2float + %false = OpConstantFalse %bool + %float_1 = OpConstant %float 1 + %float_2 = OpConstant %float 2 + %150 = OpConstantComposite %v2float %float_2 %float_2 + %float_3 = OpConstant %float 3 + %157 = OpConstantComposite %v3float %float_3 %float_3 %float_3 + %float_4 = OpConstant %float 4 + %164 = OpConstantComposite %v4float %float_4 %float_4 %float_4 %float_4 + %170 = OpConstantComposite %v2float %float_2 %float_0 + %171 = OpConstantComposite %v2float %float_0 %float_2 + %172 = OpConstantComposite %mat2v2float %170 %171 + %178 = OpConstantComposite %v3float %float_3 %float_0 %float_0 + %179 = OpConstantComposite %v3float %float_0 %float_3 %float_0 + %180 = OpConstantComposite %v3float %float_0 %float_0 %float_3 + %181 = OpConstantComposite %mat3v3float %178 %179 %180 + %187 = OpConstantComposite %v4float %float_4 %float_0 %float_0 %float_0 + %188 = OpConstantComposite %v4float %float_0 %float_4 %float_0 %float_0 + %189 = OpConstantComposite %v4float %float_0 %float_0 %float_4 %float_0 + %190 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_4 + %191 = OpConstantComposite %mat4v4float %187 %188 %189 %190 + %237 = OpConstantComposite %v2bool %true %true + %243 = OpConstantComposite %v3bool %true %true %true + %249 = OpConstantComposite %v4bool %true %true %true %true + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 + %262 = OpConstantComposite %v2int %int_2 %int_2 + %int_3 = OpConstant %int 3 + %269 = OpConstantComposite %v3int %int_3 %int_3 %int_3 + %int_4 = OpConstant %int 4 + %276 = OpConstantComposite %v4int %int_4 %int_4 %int_4 %int_4 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_0 = OpConstant %int 0 + %int_0 = OpConstant %int 0 %_entrypoint_v = OpFunction %void None %38 -%39 = OpLabel -%43 = OpVariable %_ptr_Function_v2float Function -OpStore %43 %42 -%45 = OpFunctionCall %v4float %main %43 -OpStore %sk_FragColor %45 -OpReturn -OpFunctionEnd + %39 = OpLabel + %43 = OpVariable %_ptr_Function_v2float Function + OpStore %43 %42 + %45 = OpFunctionCall %v4float %main %43 + OpStore %sk_FragColor %45 + OpReturn + OpFunctionEnd %takes_void_b = OpFunction %bool None %46 -%47 = OpLabel -OpReturnValue %true -OpFunctionEnd + %47 = OpLabel + OpReturnValue %true + OpFunctionEnd %takes_float_bf = OpFunction %bool None %50 -%51 = OpFunctionParameter %_ptr_Function_float -%52 = OpLabel -OpReturnValue %true -OpFunctionEnd + %51 = OpFunctionParameter %_ptr_Function_float + %52 = OpLabel + OpReturnValue %true + OpFunctionEnd %takes_float2_bf2 = OpFunction %bool None %53 -%54 = OpFunctionParameter %_ptr_Function_v2float -%55 = OpLabel -OpReturnValue %true -OpFunctionEnd + %54 = OpFunctionParameter %_ptr_Function_v2float + %55 = OpLabel + OpReturnValue %true + OpFunctionEnd %takes_float3_bf3 = OpFunction %bool None %58 -%59 = OpFunctionParameter %_ptr_Function_v3float -%60 = OpLabel -OpReturnValue %true -OpFunctionEnd + %59 = OpFunctionParameter %_ptr_Function_v3float + %60 = OpLabel + OpReturnValue %true + OpFunctionEnd %takes_float4_bf4 = OpFunction %bool None %62 -%63 = OpFunctionParameter %_ptr_Function_v4float -%64 = OpLabel -OpReturnValue %true -OpFunctionEnd + %63 = OpFunctionParameter %_ptr_Function_v4float + %64 = OpLabel + OpReturnValue %true + OpFunctionEnd %takes_float2x2_bf22 = OpFunction %bool None %67 -%68 = OpFunctionParameter %_ptr_Function_mat2v2float -%69 = OpLabel -OpReturnValue %true -OpFunctionEnd + %68 = OpFunctionParameter %_ptr_Function_mat2v2float + %69 = OpLabel + OpReturnValue %true + OpFunctionEnd %takes_float3x3_bf33 = OpFunction %bool None %72 -%73 = OpFunctionParameter %_ptr_Function_mat3v3float -%74 = OpLabel -OpReturnValue %true -OpFunctionEnd + %73 = OpFunctionParameter %_ptr_Function_mat3v3float + %74 = OpLabel + OpReturnValue %true + OpFunctionEnd %takes_float4x4_bf44 = OpFunction %bool None %77 -%78 = OpFunctionParameter %_ptr_Function_mat4v4float -%79 = OpLabel -OpReturnValue %true -OpFunctionEnd + %78 = OpFunctionParameter %_ptr_Function_mat4v4float + %79 = OpLabel + OpReturnValue %true + OpFunctionEnd %takes_half_bh = OpFunction %bool None %50 -%80 = OpFunctionParameter %_ptr_Function_float -%81 = OpLabel -OpReturnValue %true -OpFunctionEnd + %80 = OpFunctionParameter %_ptr_Function_float + %81 = OpLabel + OpReturnValue %true + OpFunctionEnd %takes_half2_bh2 = OpFunction %bool None %53 -%82 = OpFunctionParameter %_ptr_Function_v2float -%83 = OpLabel -OpReturnValue %true -OpFunctionEnd + %82 = OpFunctionParameter %_ptr_Function_v2float + %83 = OpLabel + OpReturnValue %true + OpFunctionEnd %takes_half3_bh3 = OpFunction %bool None %58 -%84 = OpFunctionParameter %_ptr_Function_v3float -%85 = OpLabel -OpReturnValue %true -OpFunctionEnd + %84 = OpFunctionParameter %_ptr_Function_v3float + %85 = OpLabel + OpReturnValue %true + OpFunctionEnd %takes_half4_bh4 = OpFunction %bool None %62 -%86 = OpFunctionParameter %_ptr_Function_v4float -%87 = OpLabel -OpReturnValue %true -OpFunctionEnd + %86 = OpFunctionParameter %_ptr_Function_v4float + %87 = OpLabel + OpReturnValue %true + OpFunctionEnd %takes_half2x2_bh22 = OpFunction %bool None %67 -%88 = OpFunctionParameter %_ptr_Function_mat2v2float -%89 = OpLabel -OpReturnValue %true -OpFunctionEnd + %88 = OpFunctionParameter %_ptr_Function_mat2v2float + %89 = OpLabel + OpReturnValue %true + OpFunctionEnd %takes_half3x3_bh33 = OpFunction %bool None %72 -%90 = OpFunctionParameter %_ptr_Function_mat3v3float -%91 = OpLabel -OpReturnValue %true -OpFunctionEnd + %90 = OpFunctionParameter %_ptr_Function_mat3v3float + %91 = OpLabel + OpReturnValue %true + OpFunctionEnd %takes_half4x4_bh44 = OpFunction %bool None %77 -%92 = OpFunctionParameter %_ptr_Function_mat4v4float -%93 = OpLabel -OpReturnValue %true -OpFunctionEnd + %92 = OpFunctionParameter %_ptr_Function_mat4v4float + %93 = OpLabel + OpReturnValue %true + OpFunctionEnd %takes_bool_bb = OpFunction %bool None %95 -%96 = OpFunctionParameter %_ptr_Function_bool -%97 = OpLabel -OpReturnValue %true -OpFunctionEnd + %96 = OpFunctionParameter %_ptr_Function_bool + %97 = OpLabel + OpReturnValue %true + OpFunctionEnd %takes_bool2_bb2 = OpFunction %bool None %100 -%101 = OpFunctionParameter %_ptr_Function_v2bool -%102 = OpLabel -OpReturnValue %true -OpFunctionEnd + %101 = OpFunctionParameter %_ptr_Function_v2bool + %102 = OpLabel + OpReturnValue %true + OpFunctionEnd %takes_bool3_bb3 = OpFunction %bool None %105 -%106 = OpFunctionParameter %_ptr_Function_v3bool -%107 = OpLabel -OpReturnValue %true -OpFunctionEnd + %106 = OpFunctionParameter %_ptr_Function_v3bool + %107 = OpLabel + OpReturnValue %true + OpFunctionEnd %takes_bool4_bb4 = OpFunction %bool None %110 -%111 = OpFunctionParameter %_ptr_Function_v4bool -%112 = OpLabel -OpReturnValue %true -OpFunctionEnd + %111 = OpFunctionParameter %_ptr_Function_v4bool + %112 = OpLabel + OpReturnValue %true + OpFunctionEnd %takes_int_bi = OpFunction %bool None %115 -%116 = OpFunctionParameter %_ptr_Function_int -%117 = OpLabel -OpReturnValue %true -OpFunctionEnd + %116 = OpFunctionParameter %_ptr_Function_int + %117 = OpLabel + OpReturnValue %true + OpFunctionEnd %takes_int2_bi2 = OpFunction %bool None %120 -%121 = OpFunctionParameter %_ptr_Function_v2int -%122 = OpLabel -OpReturnValue %true -OpFunctionEnd + %121 = OpFunctionParameter %_ptr_Function_v2int + %122 = OpLabel + OpReturnValue %true + OpFunctionEnd %takes_int3_bi3 = OpFunction %bool None %125 -%126 = OpFunctionParameter %_ptr_Function_v3int -%127 = OpLabel -OpReturnValue %true -OpFunctionEnd + %126 = OpFunctionParameter %_ptr_Function_v3int + %127 = OpLabel + OpReturnValue %true + OpFunctionEnd %takes_int4_bi4 = OpFunction %bool None %130 -%131 = OpFunctionParameter %_ptr_Function_v4int -%132 = OpLabel -OpReturnValue %true -OpFunctionEnd -%main = OpFunction %v4float None %133 -%134 = OpFunctionParameter %_ptr_Function_v2float -%135 = OpLabel -%144 = OpVariable %_ptr_Function_float Function -%151 = OpVariable %_ptr_Function_v2float Function -%158 = OpVariable %_ptr_Function_v3float Function -%165 = OpVariable %_ptr_Function_v4float Function -%173 = OpVariable %_ptr_Function_mat2v2float Function -%182 = OpVariable %_ptr_Function_mat3v3float Function -%192 = OpVariable %_ptr_Function_mat4v4float Function -%197 = OpVariable %_ptr_Function_float Function -%202 = OpVariable %_ptr_Function_v2float Function -%207 = OpVariable %_ptr_Function_v3float Function -%212 = OpVariable %_ptr_Function_v4float Function -%217 = OpVariable %_ptr_Function_mat2v2float Function -%222 = OpVariable %_ptr_Function_mat3v3float Function -%227 = OpVariable %_ptr_Function_mat4v4float Function -%232 = OpVariable %_ptr_Function_bool Function -%238 = OpVariable %_ptr_Function_v2bool Function -%244 = OpVariable %_ptr_Function_v3bool Function -%250 = OpVariable %_ptr_Function_v4bool Function -%256 = OpVariable %_ptr_Function_int Function -%263 = OpVariable %_ptr_Function_v2int Function -%270 = OpVariable %_ptr_Function_v3int Function -%277 = OpVariable %_ptr_Function_v4int Function -%280 = OpVariable %_ptr_Function_v4float Function -OpSelectionMerge %138 None -OpBranchConditional %true %137 %138 -%137 = OpLabel -%139 = OpFunctionCall %bool %takes_void_b -OpBranch %138 -%138 = OpLabel -%140 = OpPhi %bool %false %135 %139 %137 -OpSelectionMerge %142 None -OpBranchConditional %140 %141 %142 -%141 = OpLabel -OpStore %144 %float_1 -%145 = OpFunctionCall %bool %takes_float_bf %144 -OpBranch %142 -%142 = OpLabel -%146 = OpPhi %bool %false %138 %145 %141 -OpSelectionMerge %148 None -OpBranchConditional %146 %147 %148 -%147 = OpLabel -OpStore %151 %150 -%152 = OpFunctionCall %bool %takes_float2_bf2 %151 -OpBranch %148 -%148 = OpLabel -%153 = OpPhi %bool %false %142 %152 %147 -OpSelectionMerge %155 None -OpBranchConditional %153 %154 %155 -%154 = OpLabel -OpStore %158 %157 -%159 = OpFunctionCall %bool %takes_float3_bf3 %158 -OpBranch %155 -%155 = OpLabel -%160 = OpPhi %bool %false %148 %159 %154 -OpSelectionMerge %162 None -OpBranchConditional %160 %161 %162 -%161 = OpLabel -OpStore %165 %164 -%166 = OpFunctionCall %bool %takes_float4_bf4 %165 -OpBranch %162 -%162 = OpLabel -%167 = OpPhi %bool %false %155 %166 %161 -OpSelectionMerge %169 None -OpBranchConditional %167 %168 %169 -%168 = OpLabel -OpStore %173 %172 -%174 = OpFunctionCall %bool %takes_float2x2_bf22 %173 -OpBranch %169 -%169 = OpLabel -%175 = OpPhi %bool %false %162 %174 %168 -OpSelectionMerge %177 None -OpBranchConditional %175 %176 %177 -%176 = OpLabel -OpStore %182 %181 -%183 = OpFunctionCall %bool %takes_float3x3_bf33 %182 -OpBranch %177 -%177 = OpLabel -%184 = OpPhi %bool %false %169 %183 %176 -OpSelectionMerge %186 None -OpBranchConditional %184 %185 %186 -%185 = OpLabel -OpStore %192 %191 -%193 = OpFunctionCall %bool %takes_float4x4_bf44 %192 -OpBranch %186 -%186 = OpLabel -%194 = OpPhi %bool %false %177 %193 %185 -OpSelectionMerge %196 None -OpBranchConditional %194 %195 %196 -%195 = OpLabel -OpStore %197 %float_1 -%198 = OpFunctionCall %bool %takes_half_bh %197 -OpBranch %196 -%196 = OpLabel -%199 = OpPhi %bool %false %186 %198 %195 -OpSelectionMerge %201 None -OpBranchConditional %199 %200 %201 -%200 = OpLabel -OpStore %202 %150 -%203 = OpFunctionCall %bool %takes_half2_bh2 %202 -OpBranch %201 -%201 = OpLabel -%204 = OpPhi %bool %false %196 %203 %200 -OpSelectionMerge %206 None -OpBranchConditional %204 %205 %206 -%205 = OpLabel -OpStore %207 %157 -%208 = OpFunctionCall %bool %takes_half3_bh3 %207 -OpBranch %206 -%206 = OpLabel -%209 = OpPhi %bool %false %201 %208 %205 -OpSelectionMerge %211 None -OpBranchConditional %209 %210 %211 -%210 = OpLabel -OpStore %212 %164 -%213 = OpFunctionCall %bool %takes_half4_bh4 %212 -OpBranch %211 -%211 = OpLabel -%214 = OpPhi %bool %false %206 %213 %210 -OpSelectionMerge %216 None -OpBranchConditional %214 %215 %216 -%215 = OpLabel -OpStore %217 %172 -%218 = OpFunctionCall %bool %takes_half2x2_bh22 %217 -OpBranch %216 -%216 = OpLabel -%219 = OpPhi %bool %false %211 %218 %215 -OpSelectionMerge %221 None -OpBranchConditional %219 %220 %221 -%220 = OpLabel -OpStore %222 %181 -%223 = OpFunctionCall %bool %takes_half3x3_bh33 %222 -OpBranch %221 -%221 = OpLabel -%224 = OpPhi %bool %false %216 %223 %220 -OpSelectionMerge %226 None -OpBranchConditional %224 %225 %226 -%225 = OpLabel -OpStore %227 %191 -%228 = OpFunctionCall %bool %takes_half4x4_bh44 %227 -OpBranch %226 -%226 = OpLabel -%229 = OpPhi %bool %false %221 %228 %225 -OpSelectionMerge %231 None -OpBranchConditional %229 %230 %231 -%230 = OpLabel -OpStore %232 %true -%233 = OpFunctionCall %bool %takes_bool_bb %232 -OpBranch %231 -%231 = OpLabel -%234 = OpPhi %bool %false %226 %233 %230 -OpSelectionMerge %236 None -OpBranchConditional %234 %235 %236 -%235 = OpLabel -OpStore %238 %237 -%239 = OpFunctionCall %bool %takes_bool2_bb2 %238 -OpBranch %236 -%236 = OpLabel -%240 = OpPhi %bool %false %231 %239 %235 -OpSelectionMerge %242 None -OpBranchConditional %240 %241 %242 -%241 = OpLabel -OpStore %244 %243 -%245 = OpFunctionCall %bool %takes_bool3_bb3 %244 -OpBranch %242 -%242 = OpLabel -%246 = OpPhi %bool %false %236 %245 %241 -OpSelectionMerge %248 None -OpBranchConditional %246 %247 %248 -%247 = OpLabel -OpStore %250 %249 -%251 = OpFunctionCall %bool %takes_bool4_bb4 %250 -OpBranch %248 -%248 = OpLabel -%252 = OpPhi %bool %false %242 %251 %247 -OpSelectionMerge %254 None -OpBranchConditional %252 %253 %254 -%253 = OpLabel -OpStore %256 %int_1 -%257 = OpFunctionCall %bool %takes_int_bi %256 -OpBranch %254 -%254 = OpLabel -%258 = OpPhi %bool %false %248 %257 %253 -OpSelectionMerge %260 None -OpBranchConditional %258 %259 %260 -%259 = OpLabel -OpStore %263 %262 -%264 = OpFunctionCall %bool %takes_int2_bi2 %263 -OpBranch %260 -%260 = OpLabel -%265 = OpPhi %bool %false %254 %264 %259 -OpSelectionMerge %267 None -OpBranchConditional %265 %266 %267 -%266 = OpLabel -OpStore %270 %269 -%271 = OpFunctionCall %bool %takes_int3_bi3 %270 -OpBranch %267 -%267 = OpLabel -%272 = OpPhi %bool %false %260 %271 %266 -OpSelectionMerge %274 None -OpBranchConditional %272 %273 %274 -%273 = OpLabel -OpStore %277 %276 -%278 = OpFunctionCall %bool %takes_int4_bi4 %277 -OpBranch %274 -%274 = OpLabel -%279 = OpPhi %bool %false %267 %278 %273 -OpSelectionMerge %283 None -OpBranchConditional %279 %281 %282 -%281 = OpLabel -%284 = OpAccessChain %_ptr_Uniform_v4float %33 %int_0 -%287 = OpLoad %v4float %284 -OpStore %280 %287 -OpBranch %283 -%282 = OpLabel -%288 = OpAccessChain %_ptr_Uniform_v4float %33 %int_1 -%289 = OpLoad %v4float %288 -OpStore %280 %289 -OpBranch %283 -%283 = OpLabel -%290 = OpLoad %v4float %280 -OpReturnValue %290 -OpFunctionEnd + %131 = OpFunctionParameter %_ptr_Function_v4int + %132 = OpLabel + OpReturnValue %true + OpFunctionEnd + %main = OpFunction %v4float None %133 + %134 = OpFunctionParameter %_ptr_Function_v2float + %135 = OpLabel + %144 = OpVariable %_ptr_Function_float Function + %151 = OpVariable %_ptr_Function_v2float Function + %158 = OpVariable %_ptr_Function_v3float Function + %165 = OpVariable %_ptr_Function_v4float Function + %173 = OpVariable %_ptr_Function_mat2v2float Function + %182 = OpVariable %_ptr_Function_mat3v3float Function + %192 = OpVariable %_ptr_Function_mat4v4float Function + %197 = OpVariable %_ptr_Function_float Function + %202 = OpVariable %_ptr_Function_v2float Function + %207 = OpVariable %_ptr_Function_v3float Function + %212 = OpVariable %_ptr_Function_v4float Function + %217 = OpVariable %_ptr_Function_mat2v2float Function + %222 = OpVariable %_ptr_Function_mat3v3float Function + %227 = OpVariable %_ptr_Function_mat4v4float Function + %232 = OpVariable %_ptr_Function_bool Function + %238 = OpVariable %_ptr_Function_v2bool Function + %244 = OpVariable %_ptr_Function_v3bool Function + %250 = OpVariable %_ptr_Function_v4bool Function + %256 = OpVariable %_ptr_Function_int Function + %263 = OpVariable %_ptr_Function_v2int Function + %270 = OpVariable %_ptr_Function_v3int Function + %277 = OpVariable %_ptr_Function_v4int Function + %280 = OpVariable %_ptr_Function_v4float Function + OpSelectionMerge %138 None + OpBranchConditional %true %137 %138 + %137 = OpLabel + %139 = OpFunctionCall %bool %takes_void_b + OpBranch %138 + %138 = OpLabel + %140 = OpPhi %bool %false %135 %139 %137 + OpSelectionMerge %142 None + OpBranchConditional %140 %141 %142 + %141 = OpLabel + OpStore %144 %float_1 + %145 = OpFunctionCall %bool %takes_float_bf %144 + OpBranch %142 + %142 = OpLabel + %146 = OpPhi %bool %false %138 %145 %141 + OpSelectionMerge %148 None + OpBranchConditional %146 %147 %148 + %147 = OpLabel + OpStore %151 %150 + %152 = OpFunctionCall %bool %takes_float2_bf2 %151 + OpBranch %148 + %148 = OpLabel + %153 = OpPhi %bool %false %142 %152 %147 + OpSelectionMerge %155 None + OpBranchConditional %153 %154 %155 + %154 = OpLabel + OpStore %158 %157 + %159 = OpFunctionCall %bool %takes_float3_bf3 %158 + OpBranch %155 + %155 = OpLabel + %160 = OpPhi %bool %false %148 %159 %154 + OpSelectionMerge %162 None + OpBranchConditional %160 %161 %162 + %161 = OpLabel + OpStore %165 %164 + %166 = OpFunctionCall %bool %takes_float4_bf4 %165 + OpBranch %162 + %162 = OpLabel + %167 = OpPhi %bool %false %155 %166 %161 + OpSelectionMerge %169 None + OpBranchConditional %167 %168 %169 + %168 = OpLabel + OpStore %173 %172 + %174 = OpFunctionCall %bool %takes_float2x2_bf22 %173 + OpBranch %169 + %169 = OpLabel + %175 = OpPhi %bool %false %162 %174 %168 + OpSelectionMerge %177 None + OpBranchConditional %175 %176 %177 + %176 = OpLabel + OpStore %182 %181 + %183 = OpFunctionCall %bool %takes_float3x3_bf33 %182 + OpBranch %177 + %177 = OpLabel + %184 = OpPhi %bool %false %169 %183 %176 + OpSelectionMerge %186 None + OpBranchConditional %184 %185 %186 + %185 = OpLabel + OpStore %192 %191 + %193 = OpFunctionCall %bool %takes_float4x4_bf44 %192 + OpBranch %186 + %186 = OpLabel + %194 = OpPhi %bool %false %177 %193 %185 + OpSelectionMerge %196 None + OpBranchConditional %194 %195 %196 + %195 = OpLabel + OpStore %197 %float_1 + %198 = OpFunctionCall %bool %takes_half_bh %197 + OpBranch %196 + %196 = OpLabel + %199 = OpPhi %bool %false %186 %198 %195 + OpSelectionMerge %201 None + OpBranchConditional %199 %200 %201 + %200 = OpLabel + OpStore %202 %150 + %203 = OpFunctionCall %bool %takes_half2_bh2 %202 + OpBranch %201 + %201 = OpLabel + %204 = OpPhi %bool %false %196 %203 %200 + OpSelectionMerge %206 None + OpBranchConditional %204 %205 %206 + %205 = OpLabel + OpStore %207 %157 + %208 = OpFunctionCall %bool %takes_half3_bh3 %207 + OpBranch %206 + %206 = OpLabel + %209 = OpPhi %bool %false %201 %208 %205 + OpSelectionMerge %211 None + OpBranchConditional %209 %210 %211 + %210 = OpLabel + OpStore %212 %164 + %213 = OpFunctionCall %bool %takes_half4_bh4 %212 + OpBranch %211 + %211 = OpLabel + %214 = OpPhi %bool %false %206 %213 %210 + OpSelectionMerge %216 None + OpBranchConditional %214 %215 %216 + %215 = OpLabel + OpStore %217 %172 + %218 = OpFunctionCall %bool %takes_half2x2_bh22 %217 + OpBranch %216 + %216 = OpLabel + %219 = OpPhi %bool %false %211 %218 %215 + OpSelectionMerge %221 None + OpBranchConditional %219 %220 %221 + %220 = OpLabel + OpStore %222 %181 + %223 = OpFunctionCall %bool %takes_half3x3_bh33 %222 + OpBranch %221 + %221 = OpLabel + %224 = OpPhi %bool %false %216 %223 %220 + OpSelectionMerge %226 None + OpBranchConditional %224 %225 %226 + %225 = OpLabel + OpStore %227 %191 + %228 = OpFunctionCall %bool %takes_half4x4_bh44 %227 + OpBranch %226 + %226 = OpLabel + %229 = OpPhi %bool %false %221 %228 %225 + OpSelectionMerge %231 None + OpBranchConditional %229 %230 %231 + %230 = OpLabel + OpStore %232 %true + %233 = OpFunctionCall %bool %takes_bool_bb %232 + OpBranch %231 + %231 = OpLabel + %234 = OpPhi %bool %false %226 %233 %230 + OpSelectionMerge %236 None + OpBranchConditional %234 %235 %236 + %235 = OpLabel + OpStore %238 %237 + %239 = OpFunctionCall %bool %takes_bool2_bb2 %238 + OpBranch %236 + %236 = OpLabel + %240 = OpPhi %bool %false %231 %239 %235 + OpSelectionMerge %242 None + OpBranchConditional %240 %241 %242 + %241 = OpLabel + OpStore %244 %243 + %245 = OpFunctionCall %bool %takes_bool3_bb3 %244 + OpBranch %242 + %242 = OpLabel + %246 = OpPhi %bool %false %236 %245 %241 + OpSelectionMerge %248 None + OpBranchConditional %246 %247 %248 + %247 = OpLabel + OpStore %250 %249 + %251 = OpFunctionCall %bool %takes_bool4_bb4 %250 + OpBranch %248 + %248 = OpLabel + %252 = OpPhi %bool %false %242 %251 %247 + OpSelectionMerge %254 None + OpBranchConditional %252 %253 %254 + %253 = OpLabel + OpStore %256 %int_1 + %257 = OpFunctionCall %bool %takes_int_bi %256 + OpBranch %254 + %254 = OpLabel + %258 = OpPhi %bool %false %248 %257 %253 + OpSelectionMerge %260 None + OpBranchConditional %258 %259 %260 + %259 = OpLabel + OpStore %263 %262 + %264 = OpFunctionCall %bool %takes_int2_bi2 %263 + OpBranch %260 + %260 = OpLabel + %265 = OpPhi %bool %false %254 %264 %259 + OpSelectionMerge %267 None + OpBranchConditional %265 %266 %267 + %266 = OpLabel + OpStore %270 %269 + %271 = OpFunctionCall %bool %takes_int3_bi3 %270 + OpBranch %267 + %267 = OpLabel + %272 = OpPhi %bool %false %260 %271 %266 + OpSelectionMerge %274 None + OpBranchConditional %272 %273 %274 + %273 = OpLabel + OpStore %277 %276 + %278 = OpFunctionCall %bool %takes_int4_bi4 %277 + OpBranch %274 + %274 = OpLabel + %279 = OpPhi %bool %false %267 %278 %273 + OpSelectionMerge %283 None + OpBranchConditional %279 %281 %282 + %281 = OpLabel + %284 = OpAccessChain %_ptr_Uniform_v4float %33 %int_0 + %287 = OpLoad %v4float %284 + OpStore %280 %287 + OpBranch %283 + %282 = OpLabel + %288 = OpAccessChain %_ptr_Uniform_v4float %33 %int_1 + %289 = OpLoad %v4float %288 + OpStore %280 %289 + OpBranch %283 + %283 = OpLabel + %290 = OpLoad %v4float %280 + OpReturnValue %290 + OpFunctionEnd diff --git a/tests/sksl/shared/FunctionArgTypeMatch.skrp b/tests/sksl/shared/FunctionArgTypeMatch.skrp index f8dd1912b0c2..f47d5b0171bf 100644 --- a/tests/sksl/shared/FunctionArgTypeMatch.skrp +++ b/tests/sksl/shared/FunctionArgTypeMatch.skrp @@ -1,3 +1,5 @@ +217 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true store_condition_mask $12 = CondMask diff --git a/tests/sksl/shared/FunctionArgTypeMatch.wgsl b/tests/sksl/shared/FunctionArgTypeMatch.wgsl new file mode 100644 index 000000000000..424f26930974 --- /dev/null +++ b/tests/sksl/shared/FunctionArgTypeMatch.wgsl @@ -0,0 +1,328 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn takes_void_b() -> bool { + { + return true; + } +} +fn takes_float_bf(_skParam0: f32) -> bool { + let x = _skParam0; + { + return true; + } +} +fn takes_float2_bf2(_skParam0: vec2) -> bool { + let x = _skParam0; + { + return true; + } +} +fn takes_float3_bf3(_skParam0: vec3) -> bool { + let x = _skParam0; + { + return true; + } +} +fn takes_float4_bf4(_skParam0: vec4) -> bool { + let x = _skParam0; + { + return true; + } +} +fn takes_float2x2_bf22(_skParam0: mat2x2) -> bool { + let x = _skParam0; + { + return true; + } +} +fn takes_float3x3_bf33(_skParam0: mat3x3) -> bool { + let x = _skParam0; + { + return true; + } +} +fn takes_float4x4_bf44(_skParam0: mat4x4) -> bool { + let x = _skParam0; + { + return true; + } +} +fn takes_half_bh(_skParam0: f32) -> bool { + let x = _skParam0; + { + return true; + } +} +fn takes_half2_bh2(_skParam0: vec2) -> bool { + let x = _skParam0; + { + return true; + } +} +fn takes_half3_bh3(_skParam0: vec3) -> bool { + let x = _skParam0; + { + return true; + } +} +fn takes_half4_bh4(_skParam0: vec4) -> bool { + let x = _skParam0; + { + return true; + } +} +fn takes_half2x2_bh22(_skParam0: mat2x2) -> bool { + let x = _skParam0; + { + return true; + } +} +fn takes_half3x3_bh33(_skParam0: mat3x3) -> bool { + let x = _skParam0; + { + return true; + } +} +fn takes_half4x4_bh44(_skParam0: mat4x4) -> bool { + let x = _skParam0; + { + return true; + } +} +fn takes_bool_bb(_skParam0: bool) -> bool { + let x = _skParam0; + { + return true; + } +} +fn takes_bool2_bb2(_skParam0: vec2) -> bool { + let x = _skParam0; + { + return true; + } +} +fn takes_bool3_bb3(_skParam0: vec3) -> bool { + let x = _skParam0; + { + return true; + } +} +fn takes_bool4_bb4(_skParam0: vec4) -> bool { + let x = _skParam0; + { + return true; + } +} +fn takes_int_bi(_skParam0: i32) -> bool { + let x = _skParam0; + { + return true; + } +} +fn takes_int2_bi2(_skParam0: vec2) -> bool { + let x = _skParam0; + { + return true; + } +} +fn takes_int3_bi3(_skParam0: vec3) -> bool { + let x = _skParam0; + { + return true; + } +} +fn takes_int4_bi4(_skParam0: vec4) -> bool { + let x = _skParam0; + { + return true; + } +} +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var _skTemp0: vec4; + var _skTemp1: bool; + var _skTemp2: bool; + var _skTemp3: bool; + var _skTemp4: bool; + var _skTemp5: bool; + var _skTemp6: bool; + var _skTemp7: bool; + var _skTemp8: bool; + var _skTemp9: bool; + var _skTemp10: bool; + var _skTemp11: bool; + var _skTemp12: bool; + var _skTemp13: bool; + var _skTemp14: bool; + var _skTemp15: bool; + var _skTemp16: bool; + var _skTemp17: bool; + var _skTemp18: bool; + var _skTemp19: bool; + var _skTemp20: bool; + var _skTemp21: bool; + var _skTemp22: bool; + var _skTemp23: bool; + if true { + let _skTemp24 = takes_void_b(); + _skTemp23 = _skTemp24; + } else { + _skTemp23 = false; + } + if _skTemp23 { + let _skTemp25 = takes_float_bf(1.0); + _skTemp22 = _skTemp25; + } else { + _skTemp22 = false; + } + if _skTemp22 { + let _skTemp26 = takes_float2_bf2(vec2(2.0)); + _skTemp21 = _skTemp26; + } else { + _skTemp21 = false; + } + if _skTemp21 { + let _skTemp27 = takes_float3_bf3(vec3(3.0)); + _skTemp20 = _skTemp27; + } else { + _skTemp20 = false; + } + if _skTemp20 { + let _skTemp28 = takes_float4_bf4(vec4(4.0)); + _skTemp19 = _skTemp28; + } else { + _skTemp19 = false; + } + if _skTemp19 { + let _skTemp29 = takes_float2x2_bf22(mat2x2(2.0, 0.0, 0.0, 2.0)); + _skTemp18 = _skTemp29; + } else { + _skTemp18 = false; + } + if _skTemp18 { + let _skTemp30 = takes_float3x3_bf33(mat3x3(3.0, 0.0, 0.0, 0.0, 3.0, 0.0, 0.0, 0.0, 3.0)); + _skTemp17 = _skTemp30; + } else { + _skTemp17 = false; + } + if _skTemp17 { + let _skTemp31 = takes_float4x4_bf44(mat4x4(4.0, 0.0, 0.0, 0.0, 0.0, 4.0, 0.0, 0.0, 0.0, 0.0, 4.0, 0.0, 0.0, 0.0, 0.0, 4.0)); + _skTemp16 = _skTemp31; + } else { + _skTemp16 = false; + } + if _skTemp16 { + let _skTemp32 = takes_half_bh(1.0); + _skTemp15 = _skTemp32; + } else { + _skTemp15 = false; + } + if _skTemp15 { + let _skTemp33 = takes_half2_bh2(vec2(2.0)); + _skTemp14 = _skTemp33; + } else { + _skTemp14 = false; + } + if _skTemp14 { + let _skTemp34 = takes_half3_bh3(vec3(3.0)); + _skTemp13 = _skTemp34; + } else { + _skTemp13 = false; + } + if _skTemp13 { + let _skTemp35 = takes_half4_bh4(vec4(4.0)); + _skTemp12 = _skTemp35; + } else { + _skTemp12 = false; + } + if _skTemp12 { + let _skTemp36 = takes_half2x2_bh22(mat2x2(2.0, 0.0, 0.0, 2.0)); + _skTemp11 = _skTemp36; + } else { + _skTemp11 = false; + } + if _skTemp11 { + let _skTemp37 = takes_half3x3_bh33(mat3x3(3.0, 0.0, 0.0, 0.0, 3.0, 0.0, 0.0, 0.0, 3.0)); + _skTemp10 = _skTemp37; + } else { + _skTemp10 = false; + } + if _skTemp10 { + let _skTemp38 = takes_half4x4_bh44(mat4x4(4.0, 0.0, 0.0, 0.0, 0.0, 4.0, 0.0, 0.0, 0.0, 0.0, 4.0, 0.0, 0.0, 0.0, 0.0, 4.0)); + _skTemp9 = _skTemp38; + } else { + _skTemp9 = false; + } + if _skTemp9 { + let _skTemp39 = takes_bool_bb(true); + _skTemp8 = _skTemp39; + } else { + _skTemp8 = false; + } + if _skTemp8 { + let _skTemp40 = takes_bool2_bb2(vec2(true)); + _skTemp7 = _skTemp40; + } else { + _skTemp7 = false; + } + if _skTemp7 { + let _skTemp41 = takes_bool3_bb3(vec3(true)); + _skTemp6 = _skTemp41; + } else { + _skTemp6 = false; + } + if _skTemp6 { + let _skTemp42 = takes_bool4_bb4(vec4(true)); + _skTemp5 = _skTemp42; + } else { + _skTemp5 = false; + } + if _skTemp5 { + let _skTemp43 = takes_int_bi(1); + _skTemp4 = _skTemp43; + } else { + _skTemp4 = false; + } + if _skTemp4 { + let _skTemp44 = takes_int2_bi2(vec2(2)); + _skTemp3 = _skTemp44; + } else { + _skTemp3 = false; + } + if _skTemp3 { + let _skTemp45 = takes_int3_bi3(vec3(3)); + _skTemp2 = _skTemp45; + } else { + _skTemp2 = false; + } + if _skTemp2 { + let _skTemp46 = takes_int4_bi4(vec4(4)); + _skTemp1 = _skTemp46; + } else { + _skTemp1 = false; + } + if _skTemp1 { + _skTemp0 = _globalUniforms.colorGreen; + } else { + _skTemp0 = _globalUniforms.colorRed; + } + return _skTemp0; + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/FunctionParametersOfTextureAndSamplerType.asm.frag b/tests/sksl/shared/FunctionParametersOfTextureAndSamplerType.asm.frag index 846e3f1df8a9..acc577e82d13 100644 --- a/tests/sksl/shared/FunctionParametersOfTextureAndSamplerType.asm.frag +++ b/tests/sksl/shared/FunctionParametersOfTextureAndSamplerType.asm.frag @@ -1,66 +1,66 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor %c -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %aTexture "aTexture" -OpName %aSampledTexture "aSampledTexture" -OpName %c "c" -OpName %helpers_helper_h4ZT "helpers_helper_h4ZT" -OpName %helper_h4TZ "helper_h4TZ" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %aTexture Binding 1 -OpDecorate %aTexture DescriptorSet 0 -OpDecorate %aSampledTexture RelaxedPrecision -OpDecorate %aSampledTexture Binding 2 -OpDecorate %aSampledTexture DescriptorSet 0 -OpDecorate %c Location 1 -OpDecorate %26 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor %c + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %aTexture "aTexture" + OpName %aSampledTexture "aSampledTexture" + OpName %c "c" + OpName %helpers_helper_h4ZT "helpers_helper_h4ZT" + OpName %helper_h4TZ "helper_h4TZ" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %aTexture Binding 1 + OpDecorate %aTexture DescriptorSet 0 + OpDecorate %aSampledTexture RelaxedPrecision + OpDecorate %aSampledTexture Binding 2 + OpDecorate %aSampledTexture DescriptorSet 0 + OpDecorate %c Location 1 + OpDecorate %26 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%13 = OpTypeImage %float 2D 0 0 0 1 Unknown + %13 = OpTypeImage %float 2D 0 0 0 1 Unknown %_ptr_UniformConstant_13 = OpTypePointer UniformConstant %13 -%aTexture = OpVariable %_ptr_UniformConstant_13 UniformConstant -%16 = OpTypeSampledImage %13 + %aTexture = OpVariable %_ptr_UniformConstant_13 UniformConstant + %16 = OpTypeSampledImage %13 %_ptr_UniformConstant_16 = OpTypePointer UniformConstant %16 %aSampledTexture = OpVariable %_ptr_UniformConstant_16 UniformConstant -%v2float = OpTypeVector %float 2 + %v2float = OpTypeVector %float 2 %_ptr_Input_v2float = OpTypePointer Input %v2float -%c = OpVariable %_ptr_Input_v2float Input -%21 = OpTypeFunction %v4float %_ptr_UniformConstant_16 %_ptr_UniformConstant_13 -%28 = OpTypeFunction %v4float %_ptr_UniformConstant_13 %_ptr_UniformConstant_16 -%void = OpTypeVoid -%34 = OpTypeFunction %void + %c = OpVariable %_ptr_Input_v2float Input + %21 = OpTypeFunction %v4float %_ptr_UniformConstant_16 %_ptr_UniformConstant_13 + %28 = OpTypeFunction %v4float %_ptr_UniformConstant_13 %_ptr_UniformConstant_16 + %void = OpTypeVoid + %34 = OpTypeFunction %void %helpers_helper_h4ZT = OpFunction %v4float None %21 -%22 = OpFunctionParameter %_ptr_UniformConstant_16 -%23 = OpFunctionParameter %_ptr_UniformConstant_13 -%24 = OpLabel -%26 = OpLoad %16 %22 -%27 = OpLoad %v2float %c -%25 = OpImageSampleImplicitLod %v4float %26 %27 -OpReturnValue %25 -OpFunctionEnd + %22 = OpFunctionParameter %_ptr_UniformConstant_16 + %23 = OpFunctionParameter %_ptr_UniformConstant_13 + %24 = OpLabel + %26 = OpLoad %16 %22 + %27 = OpLoad %v2float %c + %25 = OpImageSampleImplicitLod %v4float %26 %27 + OpReturnValue %25 + OpFunctionEnd %helper_h4TZ = OpFunction %v4float None %28 -%29 = OpFunctionParameter %_ptr_UniformConstant_13 -%30 = OpFunctionParameter %_ptr_UniformConstant_16 -%31 = OpLabel -%32 = OpFunctionCall %v4float %helpers_helper_h4ZT %30 %29 -OpReturnValue %32 -OpFunctionEnd -%main = OpFunction %void None %34 -%35 = OpLabel -%36 = OpFunctionCall %v4float %helper_h4TZ %aTexture %aSampledTexture -OpStore %sk_FragColor %36 -OpReturn -OpFunctionEnd + %29 = OpFunctionParameter %_ptr_UniformConstant_13 + %30 = OpFunctionParameter %_ptr_UniformConstant_16 + %31 = OpLabel + %32 = OpFunctionCall %v4float %helpers_helper_h4ZT %30 %29 + OpReturnValue %32 + OpFunctionEnd + %main = OpFunction %void None %34 + %35 = OpLabel + %36 = OpFunctionCall %v4float %helper_h4TZ %aTexture %aSampledTexture + OpStore %sk_FragColor %36 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/FunctionParametersOfTextureAndSamplerType.wgsl b/tests/sksl/shared/FunctionParametersOfTextureAndSamplerType.wgsl new file mode 100644 index 000000000000..ec3289b5e76f --- /dev/null +++ b/tests/sksl/shared/FunctionParametersOfTextureAndSamplerType.wgsl @@ -0,0 +1,33 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @location(1) c: vec2, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +@group(0) @binding(1) var aTexture: texture_2d; +@group(0) @binding(10000) var aSampledTexture_Sampler: sampler; +@group(0) @binding(10001) var aSampledTexture_Texture: texture_2d; +fn helpers_helper_h4ZT(_stageIn: FSIn, s_Texture: texture_2d, s_Sampler: sampler, t: texture_2d) -> vec4 { + { + return textureSample(s_Texture, s_Sampler, _stageIn.c); + } +} +fn helper_h4TZ(_stageIn: FSIn, t: texture_2d, s_Texture: texture_2d, s_Sampler: sampler) -> vec4 { + { + let _skTemp2 = helpers_helper_h4ZT(_stageIn, s_Texture, s_Sampler, t); + return _skTemp2; + } +} +fn main(_stageIn: FSIn, _stageOut: ptr) { + { + let _skTemp3 = helper_h4TZ(_stageIn, aTexture, aSampledTexture_Texture, aSampledTexture_Sampler); + (*_stageOut).sk_FragColor = _skTemp3; + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(_stageIn, &_stageOut); + return _stageOut; +} diff --git a/tests/sksl/shared/FunctionPrototype.asm.frag b/tests/sksl/shared/FunctionPrototype.asm.frag index 504aa9b8eba7..e9f3f92177c1 100644 --- a/tests/sksl/shared/FunctionPrototype.asm.frag +++ b/tests/sksl/shared/FunctionPrototype.asm.frag @@ -1,73 +1,73 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpName %_entrypoint_v "_entrypoint_v" -OpName %this_function_is_defined_before_use_h4h4 "this_function_is_defined_before_use_h4h4" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %11 Binding 0 -OpDecorate %11 DescriptorSet 0 -OpDecorate %28 RelaxedPrecision -OpDecorate %29 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpName %_entrypoint_v "_entrypoint_v" + OpName %this_function_is_defined_before_use_h4h4 "this_function_is_defined_before_use_h4h4" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %11 Binding 0 + OpDecorate %11 DescriptorSet 0 + OpDecorate %28 RelaxedPrecision + OpDecorate %29 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%16 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%20 = OpConstantComposite %v2float %float_0 %float_0 + %11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %16 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %20 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float %_ptr_Function_v4float = OpTypePointer Function %v4float -%25 = OpTypeFunction %v4float %_ptr_Function_v4float -%30 = OpTypeFunction %v4float %_ptr_Function_v2float + %25 = OpTypeFunction %v4float %_ptr_Function_v4float + %30 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 %_entrypoint_v = OpFunction %void None %16 -%17 = OpLabel -%21 = OpVariable %_ptr_Function_v2float Function -OpStore %21 %20 -%23 = OpFunctionCall %v4float %main %21 -OpStore %sk_FragColor %23 -OpReturn -OpFunctionEnd + %17 = OpLabel + %21 = OpVariable %_ptr_Function_v2float Function + OpStore %21 %20 + %23 = OpFunctionCall %v4float %main %21 + OpStore %sk_FragColor %23 + OpReturn + OpFunctionEnd %this_function_is_defined_before_use_h4h4 = OpFunction %v4float None %25 -%26 = OpFunctionParameter %_ptr_Function_v4float -%27 = OpLabel -%28 = OpLoad %v4float %26 -%29 = OpFNegate %v4float %28 -OpReturnValue %29 -OpFunctionEnd -%main = OpFunction %v4float None %30 -%31 = OpFunctionParameter %_ptr_Function_v2float -%32 = OpLabel -%39 = OpVariable %_ptr_Function_v4float Function -%33 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 -%37 = OpLoad %v4float %33 -%38 = OpFNegate %v4float %37 -OpStore %39 %38 -%40 = OpFunctionCall %v4float %this_function_is_defined_before_use_h4h4 %39 -OpReturnValue %40 -OpFunctionEnd + %26 = OpFunctionParameter %_ptr_Function_v4float + %27 = OpLabel + %28 = OpLoad %v4float %26 + %29 = OpFNegate %v4float %28 + OpReturnValue %29 + OpFunctionEnd + %main = OpFunction %v4float None %30 + %31 = OpFunctionParameter %_ptr_Function_v2float + %32 = OpLabel + %39 = OpVariable %_ptr_Function_v4float Function + %33 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 + %37 = OpLoad %v4float %33 + %38 = OpFNegate %v4float %37 + OpStore %39 %38 + %40 = OpFunctionCall %v4float %this_function_is_defined_before_use_h4h4 %39 + OpReturnValue %40 + OpFunctionEnd diff --git a/tests/sksl/shared/FunctionPrototype.skrp b/tests/sksl/shared/FunctionPrototype.skrp index 63deedfe7f58..38fc71ae2271 100644 --- a/tests/sksl/shared/FunctionPrototype.skrp +++ b/tests/sksl/shared/FunctionPrototype.skrp @@ -1,3 +1,5 @@ +9 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_4_uniforms $0..3 = colorGreen diff --git a/tests/sksl/shared/FunctionPrototype.wgsl b/tests/sksl/shared/FunctionPrototype.wgsl new file mode 100644 index 000000000000..e7c83dca9705 --- /dev/null +++ b/tests/sksl/shared/FunctionPrototype.wgsl @@ -0,0 +1,30 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn this_function_is_defined_before_use_h4h4(_skParam0: vec4) -> vec4 { + let x = _skParam0; + { + return -x; + } +} +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + let _skTemp0 = this_function_is_defined_before_use_h4h4(-_globalUniforms.colorGreen); + return _skTemp0; + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/FunctionReturnTypeMatch.asm.frag b/tests/sksl/shared/FunctionReturnTypeMatch.asm.frag index 0e0c28a7d486..79925126b88a 100644 --- a/tests/sksl/shared/FunctionReturnTypeMatch.asm.frag +++ b/tests/sksl/shared/FunctionReturnTypeMatch.asm.frag @@ -1,170 +1,170 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %returns_float2_f2 "returns_float2_f2" -OpName %returns_float3_f3 "returns_float3_f3" -OpName %returns_float4_f4 "returns_float4_f4" -OpName %returns_float2x2_f22 "returns_float2x2_f22" -OpName %returns_float3x3_f33 "returns_float3x3_f33" -OpName %returns_float4x4_f44 "returns_float4x4_f44" -OpName %returns_half_h "returns_half_h" -OpName %returns_half2_h2 "returns_half2_h2" -OpName %returns_half3_h3 "returns_half3_h3" -OpName %returns_half4_h4 "returns_half4_h4" -OpName %returns_half2x2_h22 "returns_half2x2_h22" -OpName %returns_half3x3_h33 "returns_half3x3_h33" -OpName %returns_half4x4_h44 "returns_half4x4_h44" -OpName %returns_bool_b "returns_bool_b" -OpName %returns_bool2_b2 "returns_bool2_b2" -OpName %returns_bool3_b3 "returns_bool3_b3" -OpName %returns_bool4_b4 "returns_bool4_b4" -OpName %returns_int_i "returns_int_i" -OpName %returns_int2_i2 "returns_int2_i2" -OpName %returns_int3_i3 "returns_int3_i3" -OpName %returns_int4_i4 "returns_int4_i4" -OpName %main "main" -OpName %x1 "x1" -OpName %x2 "x2" -OpName %x3 "x3" -OpName %x4 "x4" -OpName %x5 "x5" -OpName %x6 "x6" -OpName %x7 "x7" -OpName %x8 "x8" -OpName %x9 "x9" -OpName %x10 "x10" -OpName %x11 "x11" -OpName %x12 "x12" -OpName %x13 "x13" -OpName %x14 "x14" -OpName %x15 "x15" -OpName %x16 "x16" -OpName %x17 "x17" -OpName %x18 "x18" -OpName %x19 "x19" -OpName %x20 "x20" -OpName %x21 "x21" -OpName %x22 "x22" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %31 Binding 0 -OpDecorate %31 DescriptorSet 0 -OpDecorate %x8 RelaxedPrecision -OpDecorate %x9 RelaxedPrecision -OpDecorate %x10 RelaxedPrecision -OpDecorate %x11 RelaxedPrecision -OpDecorate %x12 RelaxedPrecision -OpDecorate %x13 RelaxedPrecision -OpDecorate %x14 RelaxedPrecision -OpDecorate %250 RelaxedPrecision -OpDecorate %251 RelaxedPrecision -OpDecorate %253 RelaxedPrecision -OpDecorate %254 RelaxedPrecision -OpDecorate %261 RelaxedPrecision -OpDecorate %262 RelaxedPrecision -OpDecorate %264 RelaxedPrecision -OpDecorate %265 RelaxedPrecision -OpDecorate %268 RelaxedPrecision -OpDecorate %269 RelaxedPrecision -OpDecorate %276 RelaxedPrecision -OpDecorate %277 RelaxedPrecision -OpDecorate %279 RelaxedPrecision -OpDecorate %280 RelaxedPrecision -OpDecorate %283 RelaxedPrecision -OpDecorate %284 RelaxedPrecision -OpDecorate %287 RelaxedPrecision -OpDecorate %288 RelaxedPrecision -OpDecorate %345 RelaxedPrecision -OpDecorate %347 RelaxedPrecision -OpDecorate %348 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %returns_float2_f2 "returns_float2_f2" + OpName %returns_float3_f3 "returns_float3_f3" + OpName %returns_float4_f4 "returns_float4_f4" + OpName %returns_float2x2_f22 "returns_float2x2_f22" + OpName %returns_float3x3_f33 "returns_float3x3_f33" + OpName %returns_float4x4_f44 "returns_float4x4_f44" + OpName %returns_half_h "returns_half_h" + OpName %returns_half2_h2 "returns_half2_h2" + OpName %returns_half3_h3 "returns_half3_h3" + OpName %returns_half4_h4 "returns_half4_h4" + OpName %returns_half2x2_h22 "returns_half2x2_h22" + OpName %returns_half3x3_h33 "returns_half3x3_h33" + OpName %returns_half4x4_h44 "returns_half4x4_h44" + OpName %returns_bool_b "returns_bool_b" + OpName %returns_bool2_b2 "returns_bool2_b2" + OpName %returns_bool3_b3 "returns_bool3_b3" + OpName %returns_bool4_b4 "returns_bool4_b4" + OpName %returns_int_i "returns_int_i" + OpName %returns_int2_i2 "returns_int2_i2" + OpName %returns_int3_i3 "returns_int3_i3" + OpName %returns_int4_i4 "returns_int4_i4" + OpName %main "main" + OpName %x1 "x1" + OpName %x2 "x2" + OpName %x3 "x3" + OpName %x4 "x4" + OpName %x5 "x5" + OpName %x6 "x6" + OpName %x7 "x7" + OpName %x8 "x8" + OpName %x9 "x9" + OpName %x10 "x10" + OpName %x11 "x11" + OpName %x12 "x12" + OpName %x13 "x13" + OpName %x14 "x14" + OpName %x15 "x15" + OpName %x16 "x16" + OpName %x17 "x17" + OpName %x18 "x18" + OpName %x19 "x19" + OpName %x20 "x20" + OpName %x21 "x21" + OpName %x22 "x22" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %31 Binding 0 + OpDecorate %31 DescriptorSet 0 + OpDecorate %x8 RelaxedPrecision + OpDecorate %x9 RelaxedPrecision + OpDecorate %x10 RelaxedPrecision + OpDecorate %x11 RelaxedPrecision + OpDecorate %x12 RelaxedPrecision + OpDecorate %x13 RelaxedPrecision + OpDecorate %x14 RelaxedPrecision + OpDecorate %250 RelaxedPrecision + OpDecorate %251 RelaxedPrecision + OpDecorate %253 RelaxedPrecision + OpDecorate %254 RelaxedPrecision + OpDecorate %261 RelaxedPrecision + OpDecorate %262 RelaxedPrecision + OpDecorate %264 RelaxedPrecision + OpDecorate %265 RelaxedPrecision + OpDecorate %268 RelaxedPrecision + OpDecorate %269 RelaxedPrecision + OpDecorate %276 RelaxedPrecision + OpDecorate %277 RelaxedPrecision + OpDecorate %279 RelaxedPrecision + OpDecorate %280 RelaxedPrecision + OpDecorate %283 RelaxedPrecision + OpDecorate %284 RelaxedPrecision + OpDecorate %287 RelaxedPrecision + OpDecorate %288 RelaxedPrecision + OpDecorate %345 RelaxedPrecision + OpDecorate %347 RelaxedPrecision + OpDecorate %348 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%31 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%36 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%40 = OpConstantComposite %v2float %float_0 %float_0 + %31 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %36 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %40 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%44 = OpTypeFunction %v2float -%float_2 = OpConstant %float 2 -%47 = OpConstantComposite %v2float %float_2 %float_2 -%v3float = OpTypeVector %float 3 -%49 = OpTypeFunction %v3float -%float_3 = OpConstant %float 3 -%52 = OpConstantComposite %v3float %float_3 %float_3 %float_3 -%53 = OpTypeFunction %v4float -%float_4 = OpConstant %float 4 -%56 = OpConstantComposite %v4float %float_4 %float_4 %float_4 %float_4 + %44 = OpTypeFunction %v2float + %float_2 = OpConstant %float 2 + %47 = OpConstantComposite %v2float %float_2 %float_2 + %v3float = OpTypeVector %float 3 + %49 = OpTypeFunction %v3float + %float_3 = OpConstant %float 3 + %52 = OpConstantComposite %v3float %float_3 %float_3 %float_3 + %53 = OpTypeFunction %v4float + %float_4 = OpConstant %float 4 + %56 = OpConstantComposite %v4float %float_4 %float_4 %float_4 %float_4 %mat2v2float = OpTypeMatrix %v2float 2 -%58 = OpTypeFunction %mat2v2float -%60 = OpConstantComposite %v2float %float_2 %float_0 -%61 = OpConstantComposite %v2float %float_0 %float_2 -%62 = OpConstantComposite %mat2v2float %60 %61 + %58 = OpTypeFunction %mat2v2float + %60 = OpConstantComposite %v2float %float_2 %float_0 + %61 = OpConstantComposite %v2float %float_0 %float_2 + %62 = OpConstantComposite %mat2v2float %60 %61 %mat3v3float = OpTypeMatrix %v3float 3 -%64 = OpTypeFunction %mat3v3float -%66 = OpConstantComposite %v3float %float_3 %float_0 %float_0 -%67 = OpConstantComposite %v3float %float_0 %float_3 %float_0 -%68 = OpConstantComposite %v3float %float_0 %float_0 %float_3 -%69 = OpConstantComposite %mat3v3float %66 %67 %68 + %64 = OpTypeFunction %mat3v3float + %66 = OpConstantComposite %v3float %float_3 %float_0 %float_0 + %67 = OpConstantComposite %v3float %float_0 %float_3 %float_0 + %68 = OpConstantComposite %v3float %float_0 %float_0 %float_3 + %69 = OpConstantComposite %mat3v3float %66 %67 %68 %mat4v4float = OpTypeMatrix %v4float 4 -%71 = OpTypeFunction %mat4v4float -%73 = OpConstantComposite %v4float %float_4 %float_0 %float_0 %float_0 -%74 = OpConstantComposite %v4float %float_0 %float_4 %float_0 %float_0 -%75 = OpConstantComposite %v4float %float_0 %float_0 %float_4 %float_0 -%76 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_4 -%77 = OpConstantComposite %mat4v4float %73 %74 %75 %76 -%78 = OpTypeFunction %float -%float_1 = OpConstant %float 1 -%87 = OpTypeFunction %bool -%true = OpConstantTrue %bool -%v2bool = OpTypeVector %bool 2 -%91 = OpTypeFunction %v2bool -%93 = OpConstantComposite %v2bool %true %true -%v3bool = OpTypeVector %bool 3 -%95 = OpTypeFunction %v3bool -%97 = OpConstantComposite %v3bool %true %true %true -%v4bool = OpTypeVector %bool 4 -%99 = OpTypeFunction %v4bool -%101 = OpConstantComposite %v4bool %true %true %true %true -%int = OpTypeInt 32 1 -%103 = OpTypeFunction %int -%int_1 = OpConstant %int 1 -%v2int = OpTypeVector %int 2 -%107 = OpTypeFunction %v2int -%int_2 = OpConstant %int 2 -%110 = OpConstantComposite %v2int %int_2 %int_2 -%v3int = OpTypeVector %int 3 -%112 = OpTypeFunction %v3int -%int_3 = OpConstant %int 3 -%115 = OpConstantComposite %v3int %int_3 %int_3 %int_3 -%v4int = OpTypeVector %int 4 -%117 = OpTypeFunction %v4int -%int_4 = OpConstant %int 4 -%120 = OpConstantComposite %v4int %int_4 %int_4 %int_4 %int_4 -%121 = OpTypeFunction %v4float %_ptr_Function_v2float + %71 = OpTypeFunction %mat4v4float + %73 = OpConstantComposite %v4float %float_4 %float_0 %float_0 %float_0 + %74 = OpConstantComposite %v4float %float_0 %float_4 %float_0 %float_0 + %75 = OpConstantComposite %v4float %float_0 %float_0 %float_4 %float_0 + %76 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_4 + %77 = OpConstantComposite %mat4v4float %73 %74 %75 %76 + %78 = OpTypeFunction %float + %float_1 = OpConstant %float 1 + %87 = OpTypeFunction %bool + %true = OpConstantTrue %bool + %v2bool = OpTypeVector %bool 2 + %91 = OpTypeFunction %v2bool + %93 = OpConstantComposite %v2bool %true %true + %v3bool = OpTypeVector %bool 3 + %95 = OpTypeFunction %v3bool + %97 = OpConstantComposite %v3bool %true %true %true + %v4bool = OpTypeVector %bool 4 + %99 = OpTypeFunction %v4bool + %101 = OpConstantComposite %v4bool %true %true %true %true + %int = OpTypeInt 32 1 + %103 = OpTypeFunction %int + %int_1 = OpConstant %int 1 + %v2int = OpTypeVector %int 2 + %107 = OpTypeFunction %v2int + %int_2 = OpConstant %int 2 + %110 = OpConstantComposite %v2int %int_2 %int_2 + %v3int = OpTypeVector %int 3 + %112 = OpTypeFunction %v3int + %int_3 = OpConstant %int 3 + %115 = OpConstantComposite %v3int %int_3 %int_3 %int_3 + %v4int = OpTypeVector %int 4 + %117 = OpTypeFunction %v4int + %int_4 = OpConstant %int 4 + %120 = OpConstantComposite %v4int %int_4 %int_4 %int_4 %int_4 + %121 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_float = OpTypePointer Function %float %_ptr_Function_v3float = OpTypePointer Function %v3float %_ptr_Function_v4float = OpTypePointer Function %v4float @@ -179,402 +179,402 @@ OpDecorate %348 RelaxedPrecision %_ptr_Function_v2int = OpTypePointer Function %v2int %_ptr_Function_v3int = OpTypePointer Function %v3int %_ptr_Function_v4int = OpTypePointer Function %v4int -%false = OpConstantFalse %bool + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_0 = OpConstant %int 0 + %int_0 = OpConstant %int 0 %_entrypoint_v = OpFunction %void None %36 -%37 = OpLabel -%41 = OpVariable %_ptr_Function_v2float Function -OpStore %41 %40 -%43 = OpFunctionCall %v4float %main %41 -OpStore %sk_FragColor %43 -OpReturn -OpFunctionEnd + %37 = OpLabel + %41 = OpVariable %_ptr_Function_v2float Function + OpStore %41 %40 + %43 = OpFunctionCall %v4float %main %41 + OpStore %sk_FragColor %43 + OpReturn + OpFunctionEnd %returns_float2_f2 = OpFunction %v2float None %44 -%45 = OpLabel -OpReturnValue %47 -OpFunctionEnd + %45 = OpLabel + OpReturnValue %47 + OpFunctionEnd %returns_float3_f3 = OpFunction %v3float None %49 -%50 = OpLabel -OpReturnValue %52 -OpFunctionEnd + %50 = OpLabel + OpReturnValue %52 + OpFunctionEnd %returns_float4_f4 = OpFunction %v4float None %53 -%54 = OpLabel -OpReturnValue %56 -OpFunctionEnd + %54 = OpLabel + OpReturnValue %56 + OpFunctionEnd %returns_float2x2_f22 = OpFunction %mat2v2float None %58 -%59 = OpLabel -OpReturnValue %62 -OpFunctionEnd + %59 = OpLabel + OpReturnValue %62 + OpFunctionEnd %returns_float3x3_f33 = OpFunction %mat3v3float None %64 -%65 = OpLabel -OpReturnValue %69 -OpFunctionEnd + %65 = OpLabel + OpReturnValue %69 + OpFunctionEnd %returns_float4x4_f44 = OpFunction %mat4v4float None %71 -%72 = OpLabel -OpReturnValue %77 -OpFunctionEnd + %72 = OpLabel + OpReturnValue %77 + OpFunctionEnd %returns_half_h = OpFunction %float None %78 -%79 = OpLabel -OpReturnValue %float_1 -OpFunctionEnd + %79 = OpLabel + OpReturnValue %float_1 + OpFunctionEnd %returns_half2_h2 = OpFunction %v2float None %44 -%81 = OpLabel -OpReturnValue %47 -OpFunctionEnd + %81 = OpLabel + OpReturnValue %47 + OpFunctionEnd %returns_half3_h3 = OpFunction %v3float None %49 -%82 = OpLabel -OpReturnValue %52 -OpFunctionEnd + %82 = OpLabel + OpReturnValue %52 + OpFunctionEnd %returns_half4_h4 = OpFunction %v4float None %53 -%83 = OpLabel -OpReturnValue %56 -OpFunctionEnd + %83 = OpLabel + OpReturnValue %56 + OpFunctionEnd %returns_half2x2_h22 = OpFunction %mat2v2float None %58 -%84 = OpLabel -OpReturnValue %62 -OpFunctionEnd + %84 = OpLabel + OpReturnValue %62 + OpFunctionEnd %returns_half3x3_h33 = OpFunction %mat3v3float None %64 -%85 = OpLabel -OpReturnValue %69 -OpFunctionEnd + %85 = OpLabel + OpReturnValue %69 + OpFunctionEnd %returns_half4x4_h44 = OpFunction %mat4v4float None %71 -%86 = OpLabel -OpReturnValue %77 -OpFunctionEnd + %86 = OpLabel + OpReturnValue %77 + OpFunctionEnd %returns_bool_b = OpFunction %bool None %87 -%88 = OpLabel -OpReturnValue %true -OpFunctionEnd + %88 = OpLabel + OpReturnValue %true + OpFunctionEnd %returns_bool2_b2 = OpFunction %v2bool None %91 -%92 = OpLabel -OpReturnValue %93 -OpFunctionEnd + %92 = OpLabel + OpReturnValue %93 + OpFunctionEnd %returns_bool3_b3 = OpFunction %v3bool None %95 -%96 = OpLabel -OpReturnValue %97 -OpFunctionEnd + %96 = OpLabel + OpReturnValue %97 + OpFunctionEnd %returns_bool4_b4 = OpFunction %v4bool None %99 -%100 = OpLabel -OpReturnValue %101 -OpFunctionEnd + %100 = OpLabel + OpReturnValue %101 + OpFunctionEnd %returns_int_i = OpFunction %int None %103 -%104 = OpLabel -OpReturnValue %int_1 -OpFunctionEnd + %104 = OpLabel + OpReturnValue %int_1 + OpFunctionEnd %returns_int2_i2 = OpFunction %v2int None %107 -%108 = OpLabel -OpReturnValue %110 -OpFunctionEnd + %108 = OpLabel + OpReturnValue %110 + OpFunctionEnd %returns_int3_i3 = OpFunction %v3int None %112 -%113 = OpLabel -OpReturnValue %115 -OpFunctionEnd + %113 = OpLabel + OpReturnValue %115 + OpFunctionEnd %returns_int4_i4 = OpFunction %v4int None %117 -%118 = OpLabel -OpReturnValue %120 -OpFunctionEnd -%main = OpFunction %v4float None %121 -%122 = OpFunctionParameter %_ptr_Function_v2float -%123 = OpLabel -%x1 = OpVariable %_ptr_Function_float Function -%x2 = OpVariable %_ptr_Function_v2float Function -%x3 = OpVariable %_ptr_Function_v3float Function -%x4 = OpVariable %_ptr_Function_v4float Function -%x5 = OpVariable %_ptr_Function_mat2v2float Function -%x6 = OpVariable %_ptr_Function_mat3v3float Function -%x7 = OpVariable %_ptr_Function_mat4v4float Function -%x8 = OpVariable %_ptr_Function_float Function -%x9 = OpVariable %_ptr_Function_v2float Function -%x10 = OpVariable %_ptr_Function_v3float Function -%x11 = OpVariable %_ptr_Function_v4float Function -%x12 = OpVariable %_ptr_Function_mat2v2float Function -%x13 = OpVariable %_ptr_Function_mat3v3float Function -%x14 = OpVariable %_ptr_Function_mat4v4float Function -%x15 = OpVariable %_ptr_Function_bool Function -%x16 = OpVariable %_ptr_Function_v2bool Function -%x17 = OpVariable %_ptr_Function_v3bool Function -%x18 = OpVariable %_ptr_Function_v4bool Function -%x19 = OpVariable %_ptr_Function_int Function -%x20 = OpVariable %_ptr_Function_v2int Function -%x21 = OpVariable %_ptr_Function_v3int Function -%x22 = OpVariable %_ptr_Function_v4int Function -%338 = OpVariable %_ptr_Function_v4float Function -OpStore %x1 %float_1 -OpStore %x2 %47 -OpStore %x3 %52 -OpStore %x4 %56 -OpStore %x5 %62 -OpStore %x6 %69 -OpStore %x7 %77 -OpStore %x8 %float_1 -OpStore %x9 %47 -OpStore %x10 %52 -OpStore %x11 %56 -OpStore %x12 %62 -OpStore %x13 %69 -OpStore %x14 %77 -OpStore %x15 %true -OpStore %x16 %93 -OpStore %x17 %97 -OpStore %x18 %101 -OpStore %x19 %int_1 -OpStore %x20 %110 -OpStore %x21 %115 -OpStore %x22 %120 -OpSelectionMerge %162 None -OpBranchConditional %true %161 %162 -%161 = OpLabel -%163 = OpFunctionCall %v2float %returns_float2_f2 -%164 = OpFOrdEqual %v2bool %47 %163 -%165 = OpAll %bool %164 -OpBranch %162 -%162 = OpLabel -%166 = OpPhi %bool %false %123 %165 %161 -OpSelectionMerge %168 None -OpBranchConditional %166 %167 %168 -%167 = OpLabel -%169 = OpFunctionCall %v3float %returns_float3_f3 -%170 = OpFOrdEqual %v3bool %52 %169 -%171 = OpAll %bool %170 -OpBranch %168 -%168 = OpLabel -%172 = OpPhi %bool %false %162 %171 %167 -OpSelectionMerge %174 None -OpBranchConditional %172 %173 %174 -%173 = OpLabel -%175 = OpFunctionCall %v4float %returns_float4_f4 -%176 = OpFOrdEqual %v4bool %56 %175 -%177 = OpAll %bool %176 -OpBranch %174 -%174 = OpLabel -%178 = OpPhi %bool %false %168 %177 %173 -OpSelectionMerge %180 None -OpBranchConditional %178 %179 %180 -%179 = OpLabel -%181 = OpFunctionCall %mat2v2float %returns_float2x2_f22 -%182 = OpCompositeExtract %v2float %181 0 -%183 = OpFOrdEqual %v2bool %60 %182 -%184 = OpAll %bool %183 -%185 = OpCompositeExtract %v2float %181 1 -%186 = OpFOrdEqual %v2bool %61 %185 -%187 = OpAll %bool %186 -%188 = OpLogicalAnd %bool %184 %187 -OpBranch %180 -%180 = OpLabel -%189 = OpPhi %bool %false %174 %188 %179 -OpSelectionMerge %191 None -OpBranchConditional %189 %190 %191 -%190 = OpLabel -%192 = OpFunctionCall %mat3v3float %returns_float3x3_f33 -%193 = OpCompositeExtract %v3float %192 0 -%194 = OpFOrdEqual %v3bool %66 %193 -%195 = OpAll %bool %194 -%196 = OpCompositeExtract %v3float %192 1 -%197 = OpFOrdEqual %v3bool %67 %196 -%198 = OpAll %bool %197 -%199 = OpLogicalAnd %bool %195 %198 -%200 = OpCompositeExtract %v3float %192 2 -%201 = OpFOrdEqual %v3bool %68 %200 -%202 = OpAll %bool %201 -%203 = OpLogicalAnd %bool %199 %202 -OpBranch %191 -%191 = OpLabel -%204 = OpPhi %bool %false %180 %203 %190 -OpSelectionMerge %206 None -OpBranchConditional %204 %205 %206 -%205 = OpLabel -%207 = OpFunctionCall %mat4v4float %returns_float4x4_f44 -%208 = OpCompositeExtract %v4float %207 0 -%209 = OpFOrdEqual %v4bool %73 %208 -%210 = OpAll %bool %209 -%211 = OpCompositeExtract %v4float %207 1 -%212 = OpFOrdEqual %v4bool %74 %211 -%213 = OpAll %bool %212 -%214 = OpLogicalAnd %bool %210 %213 -%215 = OpCompositeExtract %v4float %207 2 -%216 = OpFOrdEqual %v4bool %75 %215 -%217 = OpAll %bool %216 -%218 = OpLogicalAnd %bool %214 %217 -%219 = OpCompositeExtract %v4float %207 3 -%220 = OpFOrdEqual %v4bool %76 %219 -%221 = OpAll %bool %220 -%222 = OpLogicalAnd %bool %218 %221 -OpBranch %206 -%206 = OpLabel -%223 = OpPhi %bool %false %191 %222 %205 -OpSelectionMerge %225 None -OpBranchConditional %223 %224 %225 -%224 = OpLabel -%226 = OpFunctionCall %float %returns_half_h -%227 = OpFOrdEqual %bool %float_1 %226 -OpBranch %225 -%225 = OpLabel -%228 = OpPhi %bool %false %206 %227 %224 -OpSelectionMerge %230 None -OpBranchConditional %228 %229 %230 -%229 = OpLabel -%231 = OpFunctionCall %v2float %returns_half2_h2 -%232 = OpFOrdEqual %v2bool %47 %231 -%233 = OpAll %bool %232 -OpBranch %230 -%230 = OpLabel -%234 = OpPhi %bool %false %225 %233 %229 -OpSelectionMerge %236 None -OpBranchConditional %234 %235 %236 -%235 = OpLabel -%237 = OpFunctionCall %v3float %returns_half3_h3 -%238 = OpFOrdEqual %v3bool %52 %237 -%239 = OpAll %bool %238 -OpBranch %236 -%236 = OpLabel -%240 = OpPhi %bool %false %230 %239 %235 -OpSelectionMerge %242 None -OpBranchConditional %240 %241 %242 -%241 = OpLabel -%243 = OpFunctionCall %v4float %returns_half4_h4 -%244 = OpFOrdEqual %v4bool %56 %243 -%245 = OpAll %bool %244 -OpBranch %242 -%242 = OpLabel -%246 = OpPhi %bool %false %236 %245 %241 -OpSelectionMerge %248 None -OpBranchConditional %246 %247 %248 -%247 = OpLabel -%249 = OpFunctionCall %mat2v2float %returns_half2x2_h22 -%250 = OpCompositeExtract %v2float %249 0 -%251 = OpFOrdEqual %v2bool %60 %250 -%252 = OpAll %bool %251 -%253 = OpCompositeExtract %v2float %249 1 -%254 = OpFOrdEqual %v2bool %61 %253 -%255 = OpAll %bool %254 -%256 = OpLogicalAnd %bool %252 %255 -OpBranch %248 -%248 = OpLabel -%257 = OpPhi %bool %false %242 %256 %247 -OpSelectionMerge %259 None -OpBranchConditional %257 %258 %259 -%258 = OpLabel -%260 = OpFunctionCall %mat3v3float %returns_half3x3_h33 -%261 = OpCompositeExtract %v3float %260 0 -%262 = OpFOrdEqual %v3bool %66 %261 -%263 = OpAll %bool %262 -%264 = OpCompositeExtract %v3float %260 1 -%265 = OpFOrdEqual %v3bool %67 %264 -%266 = OpAll %bool %265 -%267 = OpLogicalAnd %bool %263 %266 -%268 = OpCompositeExtract %v3float %260 2 -%269 = OpFOrdEqual %v3bool %68 %268 -%270 = OpAll %bool %269 -%271 = OpLogicalAnd %bool %267 %270 -OpBranch %259 -%259 = OpLabel -%272 = OpPhi %bool %false %248 %271 %258 -OpSelectionMerge %274 None -OpBranchConditional %272 %273 %274 -%273 = OpLabel -%275 = OpFunctionCall %mat4v4float %returns_half4x4_h44 -%276 = OpCompositeExtract %v4float %275 0 -%277 = OpFOrdEqual %v4bool %73 %276 -%278 = OpAll %bool %277 -%279 = OpCompositeExtract %v4float %275 1 -%280 = OpFOrdEqual %v4bool %74 %279 -%281 = OpAll %bool %280 -%282 = OpLogicalAnd %bool %278 %281 -%283 = OpCompositeExtract %v4float %275 2 -%284 = OpFOrdEqual %v4bool %75 %283 -%285 = OpAll %bool %284 -%286 = OpLogicalAnd %bool %282 %285 -%287 = OpCompositeExtract %v4float %275 3 -%288 = OpFOrdEqual %v4bool %76 %287 -%289 = OpAll %bool %288 -%290 = OpLogicalAnd %bool %286 %289 -OpBranch %274 -%274 = OpLabel -%291 = OpPhi %bool %false %259 %290 %273 -OpSelectionMerge %293 None -OpBranchConditional %291 %292 %293 -%292 = OpLabel -%294 = OpFunctionCall %bool %returns_bool_b -%295 = OpLogicalEqual %bool %true %294 -OpBranch %293 -%293 = OpLabel -%296 = OpPhi %bool %false %274 %295 %292 -OpSelectionMerge %298 None -OpBranchConditional %296 %297 %298 -%297 = OpLabel -%299 = OpFunctionCall %v2bool %returns_bool2_b2 -%300 = OpLogicalEqual %v2bool %93 %299 -%301 = OpAll %bool %300 -OpBranch %298 -%298 = OpLabel -%302 = OpPhi %bool %false %293 %301 %297 -OpSelectionMerge %304 None -OpBranchConditional %302 %303 %304 -%303 = OpLabel -%305 = OpFunctionCall %v3bool %returns_bool3_b3 -%306 = OpLogicalEqual %v3bool %97 %305 -%307 = OpAll %bool %306 -OpBranch %304 -%304 = OpLabel -%308 = OpPhi %bool %false %298 %307 %303 -OpSelectionMerge %310 None -OpBranchConditional %308 %309 %310 -%309 = OpLabel -%311 = OpFunctionCall %v4bool %returns_bool4_b4 -%312 = OpLogicalEqual %v4bool %101 %311 -%313 = OpAll %bool %312 -OpBranch %310 -%310 = OpLabel -%314 = OpPhi %bool %false %304 %313 %309 -OpSelectionMerge %316 None -OpBranchConditional %314 %315 %316 -%315 = OpLabel -%317 = OpFunctionCall %int %returns_int_i -%318 = OpIEqual %bool %int_1 %317 -OpBranch %316 -%316 = OpLabel -%319 = OpPhi %bool %false %310 %318 %315 -OpSelectionMerge %321 None -OpBranchConditional %319 %320 %321 -%320 = OpLabel -%322 = OpFunctionCall %v2int %returns_int2_i2 -%323 = OpIEqual %v2bool %110 %322 -%324 = OpAll %bool %323 -OpBranch %321 -%321 = OpLabel -%325 = OpPhi %bool %false %316 %324 %320 -OpSelectionMerge %327 None -OpBranchConditional %325 %326 %327 -%326 = OpLabel -%328 = OpFunctionCall %v3int %returns_int3_i3 -%329 = OpIEqual %v3bool %115 %328 -%330 = OpAll %bool %329 -OpBranch %327 -%327 = OpLabel -%331 = OpPhi %bool %false %321 %330 %326 -OpSelectionMerge %333 None -OpBranchConditional %331 %332 %333 -%332 = OpLabel -%334 = OpFunctionCall %v4int %returns_int4_i4 -%335 = OpIEqual %v4bool %120 %334 -%336 = OpAll %bool %335 -OpBranch %333 -%333 = OpLabel -%337 = OpPhi %bool %false %327 %336 %332 -OpSelectionMerge %341 None -OpBranchConditional %337 %339 %340 -%339 = OpLabel -%342 = OpAccessChain %_ptr_Uniform_v4float %31 %int_0 -%345 = OpLoad %v4float %342 -OpStore %338 %345 -OpBranch %341 -%340 = OpLabel -%346 = OpAccessChain %_ptr_Uniform_v4float %31 %int_1 -%347 = OpLoad %v4float %346 -OpStore %338 %347 -OpBranch %341 -%341 = OpLabel -%348 = OpLoad %v4float %338 -OpReturnValue %348 -OpFunctionEnd + %118 = OpLabel + OpReturnValue %120 + OpFunctionEnd + %main = OpFunction %v4float None %121 + %122 = OpFunctionParameter %_ptr_Function_v2float + %123 = OpLabel + %x1 = OpVariable %_ptr_Function_float Function + %x2 = OpVariable %_ptr_Function_v2float Function + %x3 = OpVariable %_ptr_Function_v3float Function + %x4 = OpVariable %_ptr_Function_v4float Function + %x5 = OpVariable %_ptr_Function_mat2v2float Function + %x6 = OpVariable %_ptr_Function_mat3v3float Function + %x7 = OpVariable %_ptr_Function_mat4v4float Function + %x8 = OpVariable %_ptr_Function_float Function + %x9 = OpVariable %_ptr_Function_v2float Function + %x10 = OpVariable %_ptr_Function_v3float Function + %x11 = OpVariable %_ptr_Function_v4float Function + %x12 = OpVariable %_ptr_Function_mat2v2float Function + %x13 = OpVariable %_ptr_Function_mat3v3float Function + %x14 = OpVariable %_ptr_Function_mat4v4float Function + %x15 = OpVariable %_ptr_Function_bool Function + %x16 = OpVariable %_ptr_Function_v2bool Function + %x17 = OpVariable %_ptr_Function_v3bool Function + %x18 = OpVariable %_ptr_Function_v4bool Function + %x19 = OpVariable %_ptr_Function_int Function + %x20 = OpVariable %_ptr_Function_v2int Function + %x21 = OpVariable %_ptr_Function_v3int Function + %x22 = OpVariable %_ptr_Function_v4int Function + %338 = OpVariable %_ptr_Function_v4float Function + OpStore %x1 %float_1 + OpStore %x2 %47 + OpStore %x3 %52 + OpStore %x4 %56 + OpStore %x5 %62 + OpStore %x6 %69 + OpStore %x7 %77 + OpStore %x8 %float_1 + OpStore %x9 %47 + OpStore %x10 %52 + OpStore %x11 %56 + OpStore %x12 %62 + OpStore %x13 %69 + OpStore %x14 %77 + OpStore %x15 %true + OpStore %x16 %93 + OpStore %x17 %97 + OpStore %x18 %101 + OpStore %x19 %int_1 + OpStore %x20 %110 + OpStore %x21 %115 + OpStore %x22 %120 + OpSelectionMerge %162 None + OpBranchConditional %true %161 %162 + %161 = OpLabel + %163 = OpFunctionCall %v2float %returns_float2_f2 + %164 = OpFOrdEqual %v2bool %47 %163 + %165 = OpAll %bool %164 + OpBranch %162 + %162 = OpLabel + %166 = OpPhi %bool %false %123 %165 %161 + OpSelectionMerge %168 None + OpBranchConditional %166 %167 %168 + %167 = OpLabel + %169 = OpFunctionCall %v3float %returns_float3_f3 + %170 = OpFOrdEqual %v3bool %52 %169 + %171 = OpAll %bool %170 + OpBranch %168 + %168 = OpLabel + %172 = OpPhi %bool %false %162 %171 %167 + OpSelectionMerge %174 None + OpBranchConditional %172 %173 %174 + %173 = OpLabel + %175 = OpFunctionCall %v4float %returns_float4_f4 + %176 = OpFOrdEqual %v4bool %56 %175 + %177 = OpAll %bool %176 + OpBranch %174 + %174 = OpLabel + %178 = OpPhi %bool %false %168 %177 %173 + OpSelectionMerge %180 None + OpBranchConditional %178 %179 %180 + %179 = OpLabel + %181 = OpFunctionCall %mat2v2float %returns_float2x2_f22 + %182 = OpCompositeExtract %v2float %181 0 + %183 = OpFOrdEqual %v2bool %60 %182 + %184 = OpAll %bool %183 + %185 = OpCompositeExtract %v2float %181 1 + %186 = OpFOrdEqual %v2bool %61 %185 + %187 = OpAll %bool %186 + %188 = OpLogicalAnd %bool %184 %187 + OpBranch %180 + %180 = OpLabel + %189 = OpPhi %bool %false %174 %188 %179 + OpSelectionMerge %191 None + OpBranchConditional %189 %190 %191 + %190 = OpLabel + %192 = OpFunctionCall %mat3v3float %returns_float3x3_f33 + %193 = OpCompositeExtract %v3float %192 0 + %194 = OpFOrdEqual %v3bool %66 %193 + %195 = OpAll %bool %194 + %196 = OpCompositeExtract %v3float %192 1 + %197 = OpFOrdEqual %v3bool %67 %196 + %198 = OpAll %bool %197 + %199 = OpLogicalAnd %bool %195 %198 + %200 = OpCompositeExtract %v3float %192 2 + %201 = OpFOrdEqual %v3bool %68 %200 + %202 = OpAll %bool %201 + %203 = OpLogicalAnd %bool %199 %202 + OpBranch %191 + %191 = OpLabel + %204 = OpPhi %bool %false %180 %203 %190 + OpSelectionMerge %206 None + OpBranchConditional %204 %205 %206 + %205 = OpLabel + %207 = OpFunctionCall %mat4v4float %returns_float4x4_f44 + %208 = OpCompositeExtract %v4float %207 0 + %209 = OpFOrdEqual %v4bool %73 %208 + %210 = OpAll %bool %209 + %211 = OpCompositeExtract %v4float %207 1 + %212 = OpFOrdEqual %v4bool %74 %211 + %213 = OpAll %bool %212 + %214 = OpLogicalAnd %bool %210 %213 + %215 = OpCompositeExtract %v4float %207 2 + %216 = OpFOrdEqual %v4bool %75 %215 + %217 = OpAll %bool %216 + %218 = OpLogicalAnd %bool %214 %217 + %219 = OpCompositeExtract %v4float %207 3 + %220 = OpFOrdEqual %v4bool %76 %219 + %221 = OpAll %bool %220 + %222 = OpLogicalAnd %bool %218 %221 + OpBranch %206 + %206 = OpLabel + %223 = OpPhi %bool %false %191 %222 %205 + OpSelectionMerge %225 None + OpBranchConditional %223 %224 %225 + %224 = OpLabel + %226 = OpFunctionCall %float %returns_half_h + %227 = OpFOrdEqual %bool %float_1 %226 + OpBranch %225 + %225 = OpLabel + %228 = OpPhi %bool %false %206 %227 %224 + OpSelectionMerge %230 None + OpBranchConditional %228 %229 %230 + %229 = OpLabel + %231 = OpFunctionCall %v2float %returns_half2_h2 + %232 = OpFOrdEqual %v2bool %47 %231 + %233 = OpAll %bool %232 + OpBranch %230 + %230 = OpLabel + %234 = OpPhi %bool %false %225 %233 %229 + OpSelectionMerge %236 None + OpBranchConditional %234 %235 %236 + %235 = OpLabel + %237 = OpFunctionCall %v3float %returns_half3_h3 + %238 = OpFOrdEqual %v3bool %52 %237 + %239 = OpAll %bool %238 + OpBranch %236 + %236 = OpLabel + %240 = OpPhi %bool %false %230 %239 %235 + OpSelectionMerge %242 None + OpBranchConditional %240 %241 %242 + %241 = OpLabel + %243 = OpFunctionCall %v4float %returns_half4_h4 + %244 = OpFOrdEqual %v4bool %56 %243 + %245 = OpAll %bool %244 + OpBranch %242 + %242 = OpLabel + %246 = OpPhi %bool %false %236 %245 %241 + OpSelectionMerge %248 None + OpBranchConditional %246 %247 %248 + %247 = OpLabel + %249 = OpFunctionCall %mat2v2float %returns_half2x2_h22 + %250 = OpCompositeExtract %v2float %249 0 + %251 = OpFOrdEqual %v2bool %60 %250 + %252 = OpAll %bool %251 + %253 = OpCompositeExtract %v2float %249 1 + %254 = OpFOrdEqual %v2bool %61 %253 + %255 = OpAll %bool %254 + %256 = OpLogicalAnd %bool %252 %255 + OpBranch %248 + %248 = OpLabel + %257 = OpPhi %bool %false %242 %256 %247 + OpSelectionMerge %259 None + OpBranchConditional %257 %258 %259 + %258 = OpLabel + %260 = OpFunctionCall %mat3v3float %returns_half3x3_h33 + %261 = OpCompositeExtract %v3float %260 0 + %262 = OpFOrdEqual %v3bool %66 %261 + %263 = OpAll %bool %262 + %264 = OpCompositeExtract %v3float %260 1 + %265 = OpFOrdEqual %v3bool %67 %264 + %266 = OpAll %bool %265 + %267 = OpLogicalAnd %bool %263 %266 + %268 = OpCompositeExtract %v3float %260 2 + %269 = OpFOrdEqual %v3bool %68 %268 + %270 = OpAll %bool %269 + %271 = OpLogicalAnd %bool %267 %270 + OpBranch %259 + %259 = OpLabel + %272 = OpPhi %bool %false %248 %271 %258 + OpSelectionMerge %274 None + OpBranchConditional %272 %273 %274 + %273 = OpLabel + %275 = OpFunctionCall %mat4v4float %returns_half4x4_h44 + %276 = OpCompositeExtract %v4float %275 0 + %277 = OpFOrdEqual %v4bool %73 %276 + %278 = OpAll %bool %277 + %279 = OpCompositeExtract %v4float %275 1 + %280 = OpFOrdEqual %v4bool %74 %279 + %281 = OpAll %bool %280 + %282 = OpLogicalAnd %bool %278 %281 + %283 = OpCompositeExtract %v4float %275 2 + %284 = OpFOrdEqual %v4bool %75 %283 + %285 = OpAll %bool %284 + %286 = OpLogicalAnd %bool %282 %285 + %287 = OpCompositeExtract %v4float %275 3 + %288 = OpFOrdEqual %v4bool %76 %287 + %289 = OpAll %bool %288 + %290 = OpLogicalAnd %bool %286 %289 + OpBranch %274 + %274 = OpLabel + %291 = OpPhi %bool %false %259 %290 %273 + OpSelectionMerge %293 None + OpBranchConditional %291 %292 %293 + %292 = OpLabel + %294 = OpFunctionCall %bool %returns_bool_b + %295 = OpLogicalEqual %bool %true %294 + OpBranch %293 + %293 = OpLabel + %296 = OpPhi %bool %false %274 %295 %292 + OpSelectionMerge %298 None + OpBranchConditional %296 %297 %298 + %297 = OpLabel + %299 = OpFunctionCall %v2bool %returns_bool2_b2 + %300 = OpLogicalEqual %v2bool %93 %299 + %301 = OpAll %bool %300 + OpBranch %298 + %298 = OpLabel + %302 = OpPhi %bool %false %293 %301 %297 + OpSelectionMerge %304 None + OpBranchConditional %302 %303 %304 + %303 = OpLabel + %305 = OpFunctionCall %v3bool %returns_bool3_b3 + %306 = OpLogicalEqual %v3bool %97 %305 + %307 = OpAll %bool %306 + OpBranch %304 + %304 = OpLabel + %308 = OpPhi %bool %false %298 %307 %303 + OpSelectionMerge %310 None + OpBranchConditional %308 %309 %310 + %309 = OpLabel + %311 = OpFunctionCall %v4bool %returns_bool4_b4 + %312 = OpLogicalEqual %v4bool %101 %311 + %313 = OpAll %bool %312 + OpBranch %310 + %310 = OpLabel + %314 = OpPhi %bool %false %304 %313 %309 + OpSelectionMerge %316 None + OpBranchConditional %314 %315 %316 + %315 = OpLabel + %317 = OpFunctionCall %int %returns_int_i + %318 = OpIEqual %bool %int_1 %317 + OpBranch %316 + %316 = OpLabel + %319 = OpPhi %bool %false %310 %318 %315 + OpSelectionMerge %321 None + OpBranchConditional %319 %320 %321 + %320 = OpLabel + %322 = OpFunctionCall %v2int %returns_int2_i2 + %323 = OpIEqual %v2bool %110 %322 + %324 = OpAll %bool %323 + OpBranch %321 + %321 = OpLabel + %325 = OpPhi %bool %false %316 %324 %320 + OpSelectionMerge %327 None + OpBranchConditional %325 %326 %327 + %326 = OpLabel + %328 = OpFunctionCall %v3int %returns_int3_i3 + %329 = OpIEqual %v3bool %115 %328 + %330 = OpAll %bool %329 + OpBranch %327 + %327 = OpLabel + %331 = OpPhi %bool %false %321 %330 %326 + OpSelectionMerge %333 None + OpBranchConditional %331 %332 %333 + %332 = OpLabel + %334 = OpFunctionCall %v4int %returns_int4_i4 + %335 = OpIEqual %v4bool %120 %334 + %336 = OpAll %bool %335 + OpBranch %333 + %333 = OpLabel + %337 = OpPhi %bool %false %327 %336 %332 + OpSelectionMerge %341 None + OpBranchConditional %337 %339 %340 + %339 = OpLabel + %342 = OpAccessChain %_ptr_Uniform_v4float %31 %int_0 + %345 = OpLoad %v4float %342 + OpStore %338 %345 + OpBranch %341 + %340 = OpLabel + %346 = OpAccessChain %_ptr_Uniform_v4float %31 %int_1 + %347 = OpLoad %v4float %346 + OpStore %338 %347 + OpBranch %341 + %341 = OpLabel + %348 = OpLoad %v4float %338 + OpReturnValue %348 + OpFunctionEnd diff --git a/tests/sksl/shared/FunctionReturnTypeMatch.skrp b/tests/sksl/shared/FunctionReturnTypeMatch.skrp index 092b528f2b9e..0f6072fe8877 100644 --- a/tests/sksl/shared/FunctionReturnTypeMatch.skrp +++ b/tests/sksl/shared/FunctionReturnTypeMatch.skrp @@ -1,102 +1,62 @@ +283 instructions + [immutable slots] -x1 = 0x3F800000 (1.0) -x2(0) = 0x40000000 (2.0) -x2(1) = 0x40000000 (2.0) -x3(0) = 0x40400000 (3.0) -x3(1) = 0x40400000 (3.0) -x3(2) = 0x40400000 (3.0) -x4(0) = 0x40800000 (4.0) -x4(1) = 0x40800000 (4.0) -x4(2) = 0x40800000 (4.0) -x4(3) = 0x40800000 (4.0) -x5(0) = 0x40000000 (2.0) -x5(1) = 0 -x5(2) = 0 -x5(3) = 0x40000000 (2.0) -x6(0) = 0x40400000 (3.0) -x6(1) = 0 -x6(2) = 0 -x6(3) = 0 -x6(4) = 0x40400000 (3.0) -x6(5) = 0 -x6(6) = 0 -x6(7) = 0 -x6(8) = 0x40400000 (3.0) -x7(0) = 0x40800000 (4.0) -x7(1) = 0 -x7(2) = 0 -x7(3) = 0 -x7(4) = 0 -x7(5) = 0x40800000 (4.0) -x7(6) = 0 -x7(7) = 0 -x7(8) = 0 -x7(9) = 0 -x7(10) = 0x40800000 (4.0) -x7(11) = 0 -x7(12) = 0 -x7(13) = 0 -x7(14) = 0 -x7(15) = 0x40800000 (4.0) -x8 = 0x3F800000 (1.0) -x9(0) = 0x40000000 (2.0) -x9(1) = 0x40000000 (2.0) -x10(0) = 0x40400000 (3.0) -x10(1) = 0x40400000 (3.0) -x10(2) = 0x40400000 (3.0) -x11(0) = 0x40800000 (4.0) -x11(1) = 0x40800000 (4.0) -x11(2) = 0x40800000 (4.0) -x11(3) = 0x40800000 (4.0) -x12(0) = 0x40000000 (2.0) -x12(1) = 0 -x12(2) = 0 -x12(3) = 0x40000000 (2.0) -x13(0) = 0x40400000 (3.0) -x13(1) = 0 -x13(2) = 0 -x13(3) = 0 -x13(4) = 0x40400000 (3.0) -x13(5) = 0 -x13(6) = 0 -x13(7) = 0 -x13(8) = 0x40400000 (3.0) -x14(0) = 0x40800000 (4.0) -x14(1) = 0 -x14(2) = 0 -x14(3) = 0 -x14(4) = 0 -x14(5) = 0x40800000 (4.0) -x14(6) = 0 -x14(7) = 0 -x14(8) = 0 -x14(9) = 0 -x14(10) = 0x40800000 (4.0) -x14(11) = 0 -x14(12) = 0 -x14(13) = 0 -x14(14) = 0 -x14(15) = 0x40800000 (4.0) -x15 = 0xFFFFFFFF -x16(0) = 0xFFFFFFFF -x16(1) = 0xFFFFFFFF -x17(0) = 0xFFFFFFFF -x17(1) = 0xFFFFFFFF -x17(2) = 0xFFFFFFFF -x18(0) = 0xFFFFFFFF -x18(1) = 0xFFFFFFFF -x18(2) = 0xFFFFFFFF -x18(3) = 0xFFFFFFFF -x19 = 0x00000001 (1.401298e-45) -x20(0) = 0x00000002 (2.802597e-45) -x20(1) = 0x00000002 (2.802597e-45) -x21(0) = 0x00000003 (4.203895e-45) -x21(1) = 0x00000003 (4.203895e-45) -x21(2) = 0x00000003 (4.203895e-45) -x22(0) = 0x00000004 (5.605194e-45) -x22(1) = 0x00000004 (5.605194e-45) -x22(2) = 0x00000004 (5.605194e-45) -x22(3) = 0x00000004 (5.605194e-45) +i0 = 0x3F800000 (1.0) +i1 = 0x40000000 (2.0) +i2 = 0x40000000 (2.0) +i3 = 0x40400000 (3.0) +i4 = 0x40400000 (3.0) +i5 = 0x40400000 (3.0) +i6 = 0x40800000 (4.0) +i7 = 0x40800000 (4.0) +i8 = 0x40800000 (4.0) +i9 = 0x40800000 (4.0) +i10 = 0x40000000 (2.0) +i11 = 0 +i12 = 0 +i13 = 0x40000000 (2.0) +i14 = 0x40400000 (3.0) +i15 = 0 +i16 = 0 +i17 = 0 +i18 = 0x40400000 (3.0) +i19 = 0 +i20 = 0 +i21 = 0 +i22 = 0x40400000 (3.0) +i23 = 0x40800000 (4.0) +i24 = 0 +i25 = 0 +i26 = 0 +i27 = 0 +i28 = 0x40800000 (4.0) +i29 = 0 +i30 = 0 +i31 = 0 +i32 = 0 +i33 = 0x40800000 (4.0) +i34 = 0 +i35 = 0 +i36 = 0 +i37 = 0 +i38 = 0x40800000 (4.0) +i39 = 0xFFFFFFFF +i40 = 0xFFFFFFFF +i41 = 0xFFFFFFFF +i42 = 0xFFFFFFFF +i43 = 0xFFFFFFFF +i44 = 0xFFFFFFFF +i45 = 0xFFFFFFFF +i46 = 0x00000001 (1.401298e-45) +i47 = 0x00000002 (2.802597e-45) +i48 = 0x00000002 (2.802597e-45) +i49 = 0x00000003 (4.203895e-45) +i50 = 0x00000003 (4.203895e-45) +i51 = 0x00000003 (4.203895e-45) +i52 = 0x00000004 (5.605194e-45) +i53 = 0x00000004 (5.605194e-45) +i54 = 0x00000004 (5.605194e-45) +i55 = 0x00000004 (5.605194e-45) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -121,12 +81,12 @@ store_condition_mask $214 = CondMask store_condition_mask $224 = CondMask store_condition_mask $232 = CondMask store_condition_mask $238 = CondMask -copy_slot_unmasked $239 = x1 +copy_constant $239 = 0x3F800000 (1.0) cmpeq_imm_float $239 = equal($239, 0x3F800000 (1.0)) copy_constant $233 = 0 merge_condition_mask CondMask = $238 & $239 branch_if_no_lanes_active branch_if_no_lanes_active +8 (label 21 at #36) -copy_2_slots_unmasked $234..235 = x2 +splat_2_constants $234..235 = 0x40000000 (2.0) branch_if_no_lanes_active branch_if_no_lanes_active +2 (label 22 at #32) splat_2_constants $236..237 = 0x40000000 (2.0) label label 0x00000016 @@ -138,7 +98,7 @@ load_condition_mask CondMask = $238 copy_constant $225 = 0 merge_condition_mask CondMask = $232 & $233 branch_if_no_lanes_active branch_if_no_lanes_active +9 (label 20 at #49) -copy_3_slots_unmasked $226..228 = x3 +splat_3_constants $226..228 = 0x40400000 (3.0) branch_if_no_lanes_active branch_if_no_lanes_active +2 (label 23 at #44) splat_3_constants $229..231 = 0x40400000 (3.0) label label 0x00000017 @@ -151,7 +111,7 @@ load_condition_mask CondMask = $232 copy_constant $215 = 0 merge_condition_mask CondMask = $224 & $225 branch_if_no_lanes_active branch_if_no_lanes_active +9 (label 19 at #62) -copy_4_slots_unmasked $216..219 = x4 +splat_4_constants $216..219 = 0x40800000 (4.0) branch_if_no_lanes_active branch_if_no_lanes_active +2 (label 24 at #57) splat_4_constants $220..223 = 0x40800000 (4.0) label label 0x00000018 @@ -164,7 +124,7 @@ load_condition_mask CondMask = $224 copy_constant $205 = 0 merge_condition_mask CondMask = $214 & $215 branch_if_no_lanes_active branch_if_no_lanes_active +11 (label 18 at #77) -copy_4_slots_unmasked $206..209 = x5 +copy_4_immutables_unmasked $206..209 = i10..13 [0x40000000 (2.0), 0, 0, 0x40000000 (2.0)] branch_if_no_lanes_active branch_if_no_lanes_active +4 (label 25 at #72) copy_constant $210 = 0 copy_constant $211 = 0x40000000 (2.0) @@ -179,9 +139,9 @@ load_condition_mask CondMask = $214 copy_constant $185 = 0 merge_condition_mask CondMask = $204 & $205 branch_if_no_lanes_active branch_if_no_lanes_active +15 (label 17 at #96) -copy_4_slots_unmasked $186..189 = x6(0..3) -copy_4_slots_unmasked $190..193 = x6(4..7) -copy_slot_unmasked $194 = x6(8) +copy_4_immutables_unmasked $186..189 = i14..17 [0x40400000 (3.0), 0, 0, 0] +copy_4_immutables_unmasked $190..193 = i18..21 [0x40400000 (3.0), 0, 0, 0] +copy_immutable_unmasked $194 = i22 [0x40400000 (3.0)] branch_if_no_lanes_active branch_if_no_lanes_active +4 (label 26 at #89) copy_constant $195 = 0 copy_constant $196 = 0x40400000 (3.0) @@ -198,10 +158,10 @@ load_condition_mask CondMask = $204 copy_constant $151 = 0 merge_condition_mask CondMask = $184 & $185 branch_if_no_lanes_active branch_if_no_lanes_active +17 (label 16 at #117) -copy_4_slots_unmasked $152..155 = x7(0..3) -copy_4_slots_unmasked $156..159 = x7(4..7) -copy_4_slots_unmasked $160..163 = x7(8..11) -copy_4_slots_unmasked $164..167 = x7(12..15) +copy_4_immutables_unmasked $152..155 = i23..26 [0x40800000 (4.0), 0, 0, 0] +copy_4_immutables_unmasked $156..159 = i27..30 [0, 0x40800000 (4.0), 0, 0] +copy_4_immutables_unmasked $160..163 = i31..34 [0, 0, 0x40800000 (4.0), 0] +copy_4_immutables_unmasked $164..167 = i35..38 [0, 0, 0, 0x40800000 (4.0)] branch_if_no_lanes_active branch_if_no_lanes_active +4 (label 27 at #109) copy_constant $168 = 0 copy_constant $169 = 0x40800000 (4.0) @@ -219,7 +179,7 @@ load_condition_mask CondMask = $184 copy_constant $147 = 0 merge_condition_mask CondMask = $150 & $151 branch_if_no_lanes_active branch_if_no_lanes_active +7 (label 15 at #128) -copy_slot_unmasked $148 = x8 +copy_constant $148 = 0x3F800000 (1.0) branch_if_no_lanes_active branch_if_no_lanes_active +2 (label 28 at #125) copy_constant $149 = 0x3F800000 (1.0) label label 0x0000001C @@ -230,7 +190,7 @@ load_condition_mask CondMask = $150 copy_constant $141 = 0 merge_condition_mask CondMask = $146 & $147 branch_if_no_lanes_active branch_if_no_lanes_active +8 (label 14 at #140) -copy_2_slots_unmasked $142..143 = x9 +splat_2_constants $142..143 = 0x40000000 (2.0) branch_if_no_lanes_active branch_if_no_lanes_active +2 (label 29 at #136) splat_2_constants $144..145 = 0x40000000 (2.0) label label 0x0000001D @@ -242,7 +202,7 @@ load_condition_mask CondMask = $146 copy_constant $133 = 0 merge_condition_mask CondMask = $140 & $141 branch_if_no_lanes_active branch_if_no_lanes_active +9 (label 13 at #153) -copy_3_slots_unmasked $134..136 = x10 +splat_3_constants $134..136 = 0x40400000 (3.0) branch_if_no_lanes_active branch_if_no_lanes_active +2 (label 30 at #148) splat_3_constants $137..139 = 0x40400000 (3.0) label label 0x0000001E @@ -255,7 +215,7 @@ load_condition_mask CondMask = $140 copy_constant $123 = 0 merge_condition_mask CondMask = $132 & $133 branch_if_no_lanes_active branch_if_no_lanes_active +9 (label 12 at #166) -copy_4_slots_unmasked $124..127 = x11 +splat_4_constants $124..127 = 0x40800000 (4.0) branch_if_no_lanes_active branch_if_no_lanes_active +2 (label 31 at #161) splat_4_constants $128..131 = 0x40800000 (4.0) label label 0x0000001F @@ -268,7 +228,7 @@ load_condition_mask CondMask = $132 copy_constant $113 = 0 merge_condition_mask CondMask = $122 & $123 branch_if_no_lanes_active branch_if_no_lanes_active +11 (label 11 at #181) -copy_4_slots_unmasked $114..117 = x12 +copy_4_immutables_unmasked $114..117 = i10..13 [0x40000000 (2.0), 0, 0, 0x40000000 (2.0)] branch_if_no_lanes_active branch_if_no_lanes_active +4 (label 32 at #176) copy_constant $118 = 0 copy_constant $119 = 0x40000000 (2.0) @@ -283,9 +243,9 @@ load_condition_mask CondMask = $122 copy_constant $93 = 0 merge_condition_mask CondMask = $112 & $113 branch_if_no_lanes_active branch_if_no_lanes_active +15 (label 10 at #200) -copy_4_slots_unmasked $94..97 = x13(0..3) -copy_4_slots_unmasked $98..101 = x13(4..7) -copy_slot_unmasked $102 = x13(8) +copy_4_immutables_unmasked $94..97 = i14..17 [0x40400000 (3.0), 0, 0, 0] +copy_4_immutables_unmasked $98..101 = i18..21 [0x40400000 (3.0), 0, 0, 0] +copy_immutable_unmasked $102 = i22 [0x40400000 (3.0)] branch_if_no_lanes_active branch_if_no_lanes_active +4 (label 33 at #193) copy_constant $103 = 0 copy_constant $104 = 0x40400000 (3.0) @@ -302,10 +262,10 @@ load_condition_mask CondMask = $112 copy_constant $59 = 0 merge_condition_mask CondMask = $92 & $93 branch_if_no_lanes_active branch_if_no_lanes_active +17 (label 9 at #221) -copy_4_slots_unmasked $60..63 = x14(0..3) -copy_4_slots_unmasked $64..67 = x14(4..7) -copy_4_slots_unmasked $68..71 = x14(8..11) -copy_4_slots_unmasked $72..75 = x14(12..15) +copy_4_immutables_unmasked $60..63 = i23..26 [0x40800000 (4.0), 0, 0, 0] +copy_4_immutables_unmasked $64..67 = i27..30 [0, 0x40800000 (4.0), 0, 0] +copy_4_immutables_unmasked $68..71 = i31..34 [0, 0, 0x40800000 (4.0), 0] +copy_4_immutables_unmasked $72..75 = i35..38 [0, 0, 0, 0x40800000 (4.0)] branch_if_no_lanes_active branch_if_no_lanes_active +4 (label 34 at #213) copy_constant $76 = 0 copy_constant $77 = 0x40800000 (4.0) @@ -323,7 +283,7 @@ load_condition_mask CondMask = $92 copy_constant $55 = 0 merge_condition_mask CondMask = $58 & $59 branch_if_no_lanes_active branch_if_no_lanes_active +7 (label 8 at #232) -copy_slot_unmasked $56 = x15 +copy_constant $56 = 0xFFFFFFFF branch_if_no_lanes_active branch_if_no_lanes_active +2 (label 35 at #229) copy_constant $57 = 0xFFFFFFFF label label 0x00000023 @@ -334,7 +294,7 @@ load_condition_mask CondMask = $58 copy_constant $49 = 0 merge_condition_mask CondMask = $54 & $55 branch_if_no_lanes_active branch_if_no_lanes_active +8 (label 7 at #244) -copy_2_slots_unmasked $50..51 = x16 +splat_2_constants $50..51 = 0xFFFFFFFF branch_if_no_lanes_active branch_if_no_lanes_active +2 (label 36 at #240) splat_2_constants $52..53 = 0xFFFFFFFF label label 0x00000024 @@ -346,7 +306,7 @@ load_condition_mask CondMask = $54 copy_constant $41 = 0 merge_condition_mask CondMask = $48 & $49 branch_if_no_lanes_active branch_if_no_lanes_active +9 (label 6 at #257) -copy_3_slots_unmasked $42..44 = x17 +splat_3_constants $42..44 = 0xFFFFFFFF branch_if_no_lanes_active branch_if_no_lanes_active +2 (label 37 at #252) splat_3_constants $45..47 = 0xFFFFFFFF label label 0x00000025 @@ -359,7 +319,7 @@ load_condition_mask CondMask = $48 copy_constant $31 = 0 merge_condition_mask CondMask = $40 & $41 branch_if_no_lanes_active branch_if_no_lanes_active +9 (label 5 at #270) -copy_4_slots_unmasked $32..35 = x18 +splat_4_constants $32..35 = 0xFFFFFFFF branch_if_no_lanes_active branch_if_no_lanes_active +2 (label 38 at #265) splat_4_constants $36..39 = 0xFFFFFFFF label label 0x00000026 @@ -372,7 +332,7 @@ load_condition_mask CondMask = $40 copy_constant $27 = 0 merge_condition_mask CondMask = $30 & $31 branch_if_no_lanes_active branch_if_no_lanes_active +7 (label 4 at #281) -copy_slot_unmasked $28 = x19 +copy_constant $28 = 0x00000001 (1.401298e-45) branch_if_no_lanes_active branch_if_no_lanes_active +2 (label 39 at #278) copy_constant $29 = 0x00000001 (1.401298e-45) label label 0x00000027 @@ -383,7 +343,7 @@ load_condition_mask CondMask = $30 copy_constant $21 = 0 merge_condition_mask CondMask = $26 & $27 branch_if_no_lanes_active branch_if_no_lanes_active +8 (label 3 at #293) -copy_2_slots_unmasked $22..23 = x20 +splat_2_constants $22..23 = 0x00000002 (2.802597e-45) branch_if_no_lanes_active branch_if_no_lanes_active +2 (label 40 at #289) splat_2_constants $24..25 = 0x00000002 (2.802597e-45) label label 0x00000028 @@ -395,7 +355,7 @@ load_condition_mask CondMask = $26 copy_constant $13 = 0 merge_condition_mask CondMask = $20 & $21 branch_if_no_lanes_active branch_if_no_lanes_active +9 (label 2 at #306) -copy_3_slots_unmasked $14..16 = x21 +splat_3_constants $14..16 = 0x00000003 (4.203895e-45) branch_if_no_lanes_active branch_if_no_lanes_active +2 (label 41 at #301) splat_3_constants $17..19 = 0x00000003 (4.203895e-45) label label 0x00000029 @@ -408,7 +368,7 @@ load_condition_mask CondMask = $20 copy_constant $0 = 0 merge_condition_mask CondMask = $12 & $13 branch_if_no_lanes_active branch_if_no_lanes_active +9 (label 1 at #319) -copy_4_slots_unmasked $1..4 = x22 +splat_4_constants $1..4 = 0x00000004 (5.605194e-45) branch_if_no_lanes_active branch_if_no_lanes_active +2 (label 42 at #314) splat_4_constants $5..8 = 0x00000004 (5.605194e-45) label label 0x0000002A diff --git a/tests/sksl/shared/FunctionReturnTypeMatch.wgsl b/tests/sksl/shared/FunctionReturnTypeMatch.wgsl new file mode 100644 index 000000000000..2f4d6bcc45bd --- /dev/null +++ b/tests/sksl/shared/FunctionReturnTypeMatch.wgsl @@ -0,0 +1,310 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn returns_float2_f2() -> vec2 { + { + return vec2(2.0); + } +} +fn returns_float3_f3() -> vec3 { + { + return vec3(3.0); + } +} +fn returns_float4_f4() -> vec4 { + { + return vec4(4.0); + } +} +fn returns_float2x2_f22() -> mat2x2 { + { + return mat2x2(2.0, 0.0, 0.0, 2.0); + } +} +fn returns_float3x3_f33() -> mat3x3 { + { + return mat3x3(3.0, 0.0, 0.0, 0.0, 3.0, 0.0, 0.0, 0.0, 3.0); + } +} +fn returns_float4x4_f44() -> mat4x4 { + { + return mat4x4(4.0, 0.0, 0.0, 0.0, 0.0, 4.0, 0.0, 0.0, 0.0, 0.0, 4.0, 0.0, 0.0, 0.0, 0.0, 4.0); + } +} +fn returns_half_h() -> f32 { + { + return 1.0; + } +} +fn returns_half2_h2() -> vec2 { + { + return vec2(2.0); + } +} +fn returns_half3_h3() -> vec3 { + { + return vec3(3.0); + } +} +fn returns_half4_h4() -> vec4 { + { + return vec4(4.0); + } +} +fn returns_half2x2_h22() -> mat2x2 { + { + return mat2x2(2.0, 0.0, 0.0, 2.0); + } +} +fn returns_half3x3_h33() -> mat3x3 { + { + return mat3x3(3.0, 0.0, 0.0, 0.0, 3.0, 0.0, 0.0, 0.0, 3.0); + } +} +fn returns_half4x4_h44() -> mat4x4 { + { + return mat4x4(4.0, 0.0, 0.0, 0.0, 0.0, 4.0, 0.0, 0.0, 0.0, 0.0, 4.0, 0.0, 0.0, 0.0, 0.0, 4.0); + } +} +fn returns_bool_b() -> bool { + { + return true; + } +} +fn returns_bool2_b2() -> vec2 { + { + return vec2(true); + } +} +fn returns_bool3_b3() -> vec3 { + { + return vec3(true); + } +} +fn returns_bool4_b4() -> vec4 { + { + return vec4(true); + } +} +fn returns_int_i() -> i32 { + { + return 1; + } +} +fn returns_int2_i2() -> vec2 { + { + return vec2(2); + } +} +fn returns_int3_i3() -> vec3 { + { + return vec3(3); + } +} +fn returns_int4_i4() -> vec4 { + { + return vec4(4); + } +} +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var x1: f32 = 1.0; + var x2: vec2 = vec2(2.0); + var x3: vec3 = vec3(3.0); + var x4: vec4 = vec4(4.0); + var x5: mat2x2 = mat2x2(2.0, 0.0, 0.0, 2.0); + var x6: mat3x3 = mat3x3(3.0, 0.0, 0.0, 0.0, 3.0, 0.0, 0.0, 0.0, 3.0); + var x7: mat4x4 = mat4x4(4.0, 0.0, 0.0, 0.0, 0.0, 4.0, 0.0, 0.0, 0.0, 0.0, 4.0, 0.0, 0.0, 0.0, 0.0, 4.0); + var x8: f32 = 1.0; + var x9: vec2 = vec2(2.0); + var x10: vec3 = vec3(3.0); + var x11: vec4 = vec4(4.0); + var x12: mat2x2 = mat2x2(2.0, 0.0, 0.0, 2.0); + var x13: mat3x3 = mat3x3(3.0, 0.0, 0.0, 0.0, 3.0, 0.0, 0.0, 0.0, 3.0); + var x14: mat4x4 = mat4x4(4.0, 0.0, 0.0, 0.0, 0.0, 4.0, 0.0, 0.0, 0.0, 0.0, 4.0, 0.0, 0.0, 0.0, 0.0, 4.0); + var x15: bool = true; + var x16: vec2 = vec2(true); + var x17: vec3 = vec3(true); + var x18: vec4 = vec4(true); + var x19: i32 = 1; + var x20: vec2 = vec2(2); + var x21: vec3 = vec3(3); + var x22: vec4 = vec4(4); + var _skTemp0: vec4; + var _skTemp1: bool; + var _skTemp2: bool; + var _skTemp3: bool; + var _skTemp4: bool; + var _skTemp5: bool; + var _skTemp6: bool; + var _skTemp7: bool; + var _skTemp8: bool; + var _skTemp9: bool; + var _skTemp10: bool; + var _skTemp11: bool; + var _skTemp12: bool; + var _skTemp13: bool; + var _skTemp14: bool; + var _skTemp15: bool; + var _skTemp16: bool; + var _skTemp17: bool; + var _skTemp18: bool; + var _skTemp19: bool; + var _skTemp20: bool; + var _skTemp21: bool; + if x1 == 1.0 { + let _skTemp22 = returns_float2_f2(); + _skTemp21 = all(x2 == _skTemp22); + } else { + _skTemp21 = false; + } + if _skTemp21 { + let _skTemp23 = returns_float3_f3(); + _skTemp20 = all(x3 == _skTemp23); + } else { + _skTemp20 = false; + } + if _skTemp20 { + let _skTemp24 = returns_float4_f4(); + _skTemp19 = all(x4 == _skTemp24); + } else { + _skTemp19 = false; + } + if _skTemp19 { + let _skTemp25 = returns_float2x2_f22(); + let _skTemp26 = _skTemp25; + _skTemp18 = (all(x5[0] == _skTemp26[0]) && all(x5[1] == _skTemp26[1])); + } else { + _skTemp18 = false; + } + if _skTemp18 { + let _skTemp27 = returns_float3x3_f33(); + let _skTemp28 = _skTemp27; + _skTemp17 = (all(x6[0] == _skTemp28[0]) && all(x6[1] == _skTemp28[1]) && all(x6[2] == _skTemp28[2])); + } else { + _skTemp17 = false; + } + if _skTemp17 { + let _skTemp29 = returns_float4x4_f44(); + let _skTemp30 = _skTemp29; + _skTemp16 = (all(x7[0] == _skTemp30[0]) && all(x7[1] == _skTemp30[1]) && all(x7[2] == _skTemp30[2]) && all(x7[3] == _skTemp30[3])); + } else { + _skTemp16 = false; + } + if _skTemp16 { + let _skTemp31 = returns_half_h(); + _skTemp15 = (x8 == _skTemp31); + } else { + _skTemp15 = false; + } + if _skTemp15 { + let _skTemp32 = returns_half2_h2(); + _skTemp14 = all(x9 == _skTemp32); + } else { + _skTemp14 = false; + } + if _skTemp14 { + let _skTemp33 = returns_half3_h3(); + _skTemp13 = all(x10 == _skTemp33); + } else { + _skTemp13 = false; + } + if _skTemp13 { + let _skTemp34 = returns_half4_h4(); + _skTemp12 = all(x11 == _skTemp34); + } else { + _skTemp12 = false; + } + if _skTemp12 { + let _skTemp35 = returns_half2x2_h22(); + let _skTemp36 = _skTemp35; + _skTemp11 = (all(x12[0] == _skTemp36[0]) && all(x12[1] == _skTemp36[1])); + } else { + _skTemp11 = false; + } + if _skTemp11 { + let _skTemp37 = returns_half3x3_h33(); + let _skTemp38 = _skTemp37; + _skTemp10 = (all(x13[0] == _skTemp38[0]) && all(x13[1] == _skTemp38[1]) && all(x13[2] == _skTemp38[2])); + } else { + _skTemp10 = false; + } + if _skTemp10 { + let _skTemp39 = returns_half4x4_h44(); + let _skTemp40 = _skTemp39; + _skTemp9 = (all(x14[0] == _skTemp40[0]) && all(x14[1] == _skTemp40[1]) && all(x14[2] == _skTemp40[2]) && all(x14[3] == _skTemp40[3])); + } else { + _skTemp9 = false; + } + if _skTemp9 { + let _skTemp41 = returns_bool_b(); + _skTemp8 = (x15 == _skTemp41); + } else { + _skTemp8 = false; + } + if _skTemp8 { + let _skTemp42 = returns_bool2_b2(); + _skTemp7 = all(x16 == _skTemp42); + } else { + _skTemp7 = false; + } + if _skTemp7 { + let _skTemp43 = returns_bool3_b3(); + _skTemp6 = all(x17 == _skTemp43); + } else { + _skTemp6 = false; + } + if _skTemp6 { + let _skTemp44 = returns_bool4_b4(); + _skTemp5 = all(x18 == _skTemp44); + } else { + _skTemp5 = false; + } + if _skTemp5 { + let _skTemp45 = returns_int_i(); + _skTemp4 = (x19 == _skTemp45); + } else { + _skTemp4 = false; + } + if _skTemp4 { + let _skTemp46 = returns_int2_i2(); + _skTemp3 = all(x20 == _skTemp46); + } else { + _skTemp3 = false; + } + if _skTemp3 { + let _skTemp47 = returns_int3_i3(); + _skTemp2 = all(x21 == _skTemp47); + } else { + _skTemp2 = false; + } + if _skTemp2 { + let _skTemp48 = returns_int4_i4(); + _skTemp1 = all(x22 == _skTemp48); + } else { + _skTemp1 = false; + } + if _skTemp1 { + _skTemp0 = _globalUniforms.colorGreen; + } else { + _skTemp0 = _globalUniforms.colorRed; + } + return _skTemp0; + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/Functions.asm.frag b/tests/sksl/shared/Functions.asm.frag index c40af9edc748..8e0af78af24b 100644 --- a/tests/sksl/shared/Functions.asm.frag +++ b/tests/sksl/shared/Functions.asm.frag @@ -1,130 +1,130 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %foo_ff2 "foo_ff2" -OpName %bar_vf "bar_vf" -OpName %y "y" -OpName %main "main" -OpName %x "x" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %12 Binding 0 -OpDecorate %12 DescriptorSet 0 -OpDecorate %_arr_float_int_2 ArrayStride 16 -OpDecorate %74 RelaxedPrecision -OpDecorate %76 RelaxedPrecision -OpDecorate %77 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %foo_ff2 "foo_ff2" + OpName %bar_vf "bar_vf" + OpName %y "y" + OpName %main "main" + OpName %x "x" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %12 Binding 0 + OpDecorate %12 DescriptorSet 0 + OpDecorate %_arr_float_int_2 ArrayStride 16 + OpDecorate %74 RelaxedPrecision + OpDecorate %76 RelaxedPrecision + OpDecorate %77 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%12 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%17 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%21 = OpConstantComposite %v2float %float_0 %float_0 + %12 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %17 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %21 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%25 = OpTypeFunction %float %_ptr_Function_v2float + %25 = OpTypeFunction %float %_ptr_Function_v2float %_ptr_Function_float = OpTypePointer Function %float -%34 = OpTypeFunction %void %_ptr_Function_float -%int = OpTypeInt 32 1 -%int_2 = OpConstant %int 2 + %34 = OpTypeFunction %void %_ptr_Function_float + %int = OpTypeInt 32 1 + %int_2 = OpConstant %int 2 %_arr_float_int_2 = OpTypeArray %float %int_2 %_ptr_Function__arr_float_int_2 = OpTypePointer Function %_arr_float_int_2 -%int_0 = OpConstant %int 0 -%float_2 = OpConstant %float 2 -%int_1 = OpConstant %int 1 -%57 = OpTypeFunction %v4float %_ptr_Function_v2float -%float_10 = OpConstant %float 10 -%float_200 = OpConstant %float 200 + %int_0 = OpConstant %int 0 + %float_2 = OpConstant %float 2 + %int_1 = OpConstant %int 1 + %57 = OpTypeFunction %v4float %_ptr_Function_v2float + %float_10 = OpConstant %float 10 + %float_200 = OpConstant %float 200 %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float %_entrypoint_v = OpFunction %void None %17 -%18 = OpLabel -%22 = OpVariable %_ptr_Function_v2float Function -OpStore %22 %21 -%24 = OpFunctionCall %v4float %main %22 -OpStore %sk_FragColor %24 -OpReturn -OpFunctionEnd -%foo_ff2 = OpFunction %float None %25 -%26 = OpFunctionParameter %_ptr_Function_v2float -%27 = OpLabel -%28 = OpLoad %v2float %26 -%29 = OpCompositeExtract %float %28 0 -%30 = OpLoad %v2float %26 -%31 = OpCompositeExtract %float %30 1 -%32 = OpFMul %float %29 %31 -OpReturnValue %32 -OpFunctionEnd -%bar_vf = OpFunction %void None %34 -%35 = OpFunctionParameter %_ptr_Function_float -%36 = OpLabel -%y = OpVariable %_ptr_Function__arr_float_int_2 Function -%55 = OpVariable %_ptr_Function_v2float Function -%42 = OpLoad %float %35 -%44 = OpAccessChain %_ptr_Function_float %y %int_0 -OpStore %44 %42 -%45 = OpLoad %float %35 -%47 = OpFMul %float %45 %float_2 -%49 = OpAccessChain %_ptr_Function_float %y %int_1 -OpStore %49 %47 -%50 = OpAccessChain %_ptr_Function_float %y %int_0 -%51 = OpLoad %float %50 -%52 = OpAccessChain %_ptr_Function_float %y %int_1 -%53 = OpLoad %float %52 -%54 = OpCompositeConstruct %v2float %51 %53 -OpStore %55 %54 -%56 = OpFunctionCall %float %foo_ff2 %55 -OpStore %35 %56 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %57 -%58 = OpFunctionParameter %_ptr_Function_v2float -%59 = OpLabel -%x = OpVariable %_ptr_Function_float Function -%62 = OpVariable %_ptr_Function_float Function -%67 = OpVariable %_ptr_Function_v4float Function -OpStore %x %float_10 -OpStore %62 %float_10 -%63 = OpFunctionCall %void %bar_vf %62 -%64 = OpLoad %float %62 -OpStore %x %64 -%66 = OpFOrdEqual %bool %64 %float_200 -OpSelectionMerge %71 None -OpBranchConditional %66 %69 %70 -%69 = OpLabel -%72 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 -%74 = OpLoad %v4float %72 -OpStore %67 %74 -OpBranch %71 -%70 = OpLabel -%75 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1 -%76 = OpLoad %v4float %75 -OpStore %67 %76 -OpBranch %71 -%71 = OpLabel -%77 = OpLoad %v4float %67 -OpReturnValue %77 -OpFunctionEnd + %18 = OpLabel + %22 = OpVariable %_ptr_Function_v2float Function + OpStore %22 %21 + %24 = OpFunctionCall %v4float %main %22 + OpStore %sk_FragColor %24 + OpReturn + OpFunctionEnd + %foo_ff2 = OpFunction %float None %25 + %26 = OpFunctionParameter %_ptr_Function_v2float + %27 = OpLabel + %28 = OpLoad %v2float %26 + %29 = OpCompositeExtract %float %28 0 + %30 = OpLoad %v2float %26 + %31 = OpCompositeExtract %float %30 1 + %32 = OpFMul %float %29 %31 + OpReturnValue %32 + OpFunctionEnd + %bar_vf = OpFunction %void None %34 + %35 = OpFunctionParameter %_ptr_Function_float + %36 = OpLabel + %y = OpVariable %_ptr_Function__arr_float_int_2 Function + %55 = OpVariable %_ptr_Function_v2float Function + %42 = OpLoad %float %35 + %44 = OpAccessChain %_ptr_Function_float %y %int_0 + OpStore %44 %42 + %45 = OpLoad %float %35 + %47 = OpFMul %float %45 %float_2 + %49 = OpAccessChain %_ptr_Function_float %y %int_1 + OpStore %49 %47 + %50 = OpAccessChain %_ptr_Function_float %y %int_0 + %51 = OpLoad %float %50 + %52 = OpAccessChain %_ptr_Function_float %y %int_1 + %53 = OpLoad %float %52 + %54 = OpCompositeConstruct %v2float %51 %53 + OpStore %55 %54 + %56 = OpFunctionCall %float %foo_ff2 %55 + OpStore %35 %56 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %57 + %58 = OpFunctionParameter %_ptr_Function_v2float + %59 = OpLabel + %x = OpVariable %_ptr_Function_float Function + %62 = OpVariable %_ptr_Function_float Function + %67 = OpVariable %_ptr_Function_v4float Function + OpStore %x %float_10 + OpStore %62 %float_10 + %63 = OpFunctionCall %void %bar_vf %62 + %64 = OpLoad %float %62 + OpStore %x %64 + %66 = OpFOrdEqual %bool %64 %float_200 + OpSelectionMerge %71 None + OpBranchConditional %66 %69 %70 + %69 = OpLabel + %72 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 + %74 = OpLoad %v4float %72 + OpStore %67 %74 + OpBranch %71 + %70 = OpLabel + %75 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1 + %76 = OpLoad %v4float %75 + OpStore %67 %76 + OpBranch %71 + %71 = OpLabel + %77 = OpLoad %v4float %67 + OpReturnValue %77 + OpFunctionEnd diff --git a/tests/sksl/shared/Functions.metal b/tests/sksl/shared/Functions.metal index 4cae7132fed9..5afe9d1c5aa2 100644 --- a/tests/sksl/shared/Functions.metal +++ b/tests/sksl/shared/Functions.metal @@ -10,12 +10,6 @@ struct Inputs { struct Outputs { half4 sk_FragColor [[color(0)]]; }; -void bar_vf(thread float& x); -void _skOutParamHelper0_bar_vf(thread float& x) { - float _var0 = x; - bar_vf(_var0); - x = _var0; -} float foo_ff2(const float2 v) { return v.x * v.y; } @@ -28,8 +22,9 @@ void bar_vf(thread float& x) { fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) { Outputs _out; (void)_out; + float _skTemp0; float x = 10.0; - _skOutParamHelper0_bar_vf(x); + ((bar_vf((_skTemp0 = x))), (x = _skTemp0)); _out.sk_FragColor = x == 200.0 ? _uniforms.colorGreen : _uniforms.colorRed; return _out; } diff --git a/tests/sksl/shared/Functions.skrp b/tests/sksl/shared/Functions.skrp index fc5782d02a9b..f5a0f04787e7 100644 --- a/tests/sksl/shared/Functions.skrp +++ b/tests/sksl/shared/Functions.skrp @@ -1,3 +1,5 @@ +21 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_constant x = 0x41200000 (10.0) diff --git a/tests/sksl/shared/Functions.wgsl b/tests/sksl/shared/Functions.wgsl new file mode 100644 index 000000000000..21c7736065c5 --- /dev/null +++ b/tests/sksl/shared/Functions.wgsl @@ -0,0 +1,44 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn foo_ff2(_skParam0: vec2) -> f32 { + let v = _skParam0; + { + return v.x * v.y; + } +} +fn bar_vf(_skParam0: ptr) { + let x = _skParam0; + { + var y: array; + y[0] = (*x); + y[1] = (*x) * 2.0; + let _skTemp0 = foo_ff2(vec2(y[0], y[1])); + (*x) = _skTemp0; + } +} +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var x: f32 = 10.0; + var _skTemp1: f32 = x; + bar_vf(&_skTemp1); + x = _skTemp1; + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((x == 200.0))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/GeometricIntrinsics.asm.frag b/tests/sksl/shared/GeometricIntrinsics.asm.frag index 00dc30005706..3883c3b4a73b 100644 --- a/tests/sksl/shared/GeometricIntrinsics.asm.frag +++ b/tests/sksl/shared/GeometricIntrinsics.asm.frag @@ -1,88 +1,88 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %_0_x "_0_x" -OpName %_1_x "_1_x" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %50 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %_0_x "_0_x" + OpName %_1_x "_1_x" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %50 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_float = OpTypePointer Function %float -%float_1 = OpConstant %float 1 -%float_2 = OpConstant %float 2 -%35 = OpConstantComposite %v2float %float_1 %float_2 -%float_3 = OpConstant %float 3 -%float_4 = OpConstant %float 4 -%41 = OpConstantComposite %v2float %float_3 %float_4 + %float_1 = OpConstant %float 1 + %float_2 = OpConstant %float 2 + %35 = OpConstantComposite %v2float %float_1 %float_2 + %float_3 = OpConstant %float 3 + %float_4 = OpConstant %float 4 + %41 = OpConstantComposite %v2float %float_3 %float_4 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%_0_x = OpVariable %_ptr_Function_float Function -%_1_x = OpVariable %_ptr_Function_v2float Function -OpStore %_0_x %float_1 -%29 = OpExtInst %float %1 Length %float_1 -OpStore %_0_x %29 -%30 = OpExtInst %float %1 Distance %29 %float_2 -OpStore %_0_x %30 -%32 = OpFMul %float %30 %float_2 -OpStore %_0_x %32 -%33 = OpExtInst %float %1 Normalize %32 -OpStore %_0_x %33 -OpStore %_1_x %35 -%36 = OpExtInst %float %1 Length %35 -%37 = OpCompositeConstruct %v2float %36 %36 -OpStore %_1_x %37 -%38 = OpExtInst %float %1 Distance %37 %41 -%42 = OpCompositeConstruct %v2float %38 %38 -OpStore %_1_x %42 -%43 = OpDot %float %42 %41 -%44 = OpCompositeConstruct %v2float %43 %43 -OpStore %_1_x %44 -%45 = OpExtInst %v2float %1 Normalize %44 -OpStore %_1_x %45 -%46 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%50 = OpLoad %v4float %46 -OpReturnValue %50 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %_0_x = OpVariable %_ptr_Function_float Function + %_1_x = OpVariable %_ptr_Function_v2float Function + OpStore %_0_x %float_1 + %29 = OpExtInst %float %1 Length %float_1 + OpStore %_0_x %29 + %30 = OpExtInst %float %1 Distance %29 %float_2 + OpStore %_0_x %30 + %32 = OpFMul %float %30 %float_2 + OpStore %_0_x %32 + %33 = OpExtInst %float %1 Normalize %32 + OpStore %_0_x %33 + OpStore %_1_x %35 + %36 = OpExtInst %float %1 Length %35 + %37 = OpCompositeConstruct %v2float %36 %36 + OpStore %_1_x %37 + %38 = OpExtInst %float %1 Distance %37 %41 + %42 = OpCompositeConstruct %v2float %38 %38 + OpStore %_1_x %42 + %43 = OpDot %float %42 %41 + %44 = OpCompositeConstruct %v2float %43 %43 + OpStore %_1_x %44 + %45 = OpExtInst %v2float %1 Normalize %44 + OpStore %_1_x %45 + %46 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %50 = OpLoad %v4float %46 + OpReturnValue %50 + OpFunctionEnd diff --git a/tests/sksl/shared/GeometricIntrinsics.skrp b/tests/sksl/shared/GeometricIntrinsics.skrp index 90b9bff6389b..cf0ed6d58935 100644 --- a/tests/sksl/shared/GeometricIntrinsics.skrp +++ b/tests/sksl/shared/GeometricIntrinsics.skrp @@ -1,3 +1,11 @@ +42 instructions + +[immutable slots] +i0 = 0x3F800000 (1.0) +i1 = 0x40000000 (2.0) +i2 = 0x40400000 (3.0) +i3 = 0x40800000 (4.0) + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_constant _0_x = 0x3F800000 (1.0) @@ -13,33 +21,30 @@ copy_slot_unmasked $1 = $0 bitwise_and_imm_int $1 &= 0x7FFFFFFF div_float $0 /= $1 copy_slot_unmasked _0_x = $0 -copy_constant _1_x(0) = 0x3F800000 (1.0) -copy_constant _1_x(1) = 0x40000000 (2.0) +copy_2_immutables_unmasked _1_x = i0..1 [0x3F800000 (1.0), 0x40000000 (2.0)] copy_2_slots_unmasked $0..1 = _1_x copy_2_slots_unmasked $2..3 = $0..1 dot_2_floats $0 = dot($0..1, $2..3) sqrt_float $0 = sqrt($0) copy_slot_unmasked $1 = $0 copy_2_slots_unmasked _1_x = $0..1 -copy_constant $2 = 0x40400000 (3.0) -copy_constant $3 = 0x40800000 (4.0) +copy_2_immutables_unmasked $2..3 = i2..3 [0x40400000 (3.0), 0x40800000 (4.0)] sub_2_floats $0..1 -= $2..3 copy_2_slots_unmasked $2..3 = $0..1 dot_2_floats $0 = dot($0..1, $2..3) sqrt_float $0 = sqrt($0) copy_slot_unmasked $1 = $0 copy_2_slots_unmasked _1_x = $0..1 -copy_constant $2 = 0x40400000 (3.0) -copy_constant $3 = 0x40800000 (4.0) +copy_2_immutables_unmasked $2..3 = i2..3 [0x40400000 (3.0), 0x40800000 (4.0)] dot_2_floats $0 = dot($0..1, $2..3) copy_slot_unmasked $1 = $0 copy_2_slots_unmasked _1_x = $0..1 copy_2_slots_unmasked $2..3 = $0..1 copy_2_slots_unmasked $4..5 = $2..3 dot_2_floats $2 = dot($2..3, $4..5) -invsqrt_float $2 = inversesqrt($2) +sqrt_float $2 = sqrt($2) copy_slot_unmasked $3 = $2 -mul_2_floats $0..1 *= $2..3 +div_2_floats $0..1 /= $2..3 copy_2_slots_unmasked _1_x = $0..1 copy_4_uniforms $0..3 = colorGreen load_src src.rgba = $0..3 diff --git a/tests/sksl/shared/GeometricIntrinsics.wgsl b/tests/sksl/shared/GeometricIntrinsics.wgsl new file mode 100644 index 000000000000..35d49f807c29 --- /dev/null +++ b/tests/sksl/shared/GeometricIntrinsics.wgsl @@ -0,0 +1,40 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var _0_x: f32 = 1.0; + let _skTemp0 = length(_0_x); + _0_x = _skTemp0; + let _skTemp1 = distance(_0_x, 2.0); + _0_x = _skTemp1; + _0_x = _0_x * 2.0; + let _skTemp2 = sign(_0_x); + _0_x = _skTemp2; + var _1_x: vec2 = vec2(1.0, 2.0); + let _skTemp3 = length(_1_x); + _1_x = vec2(_skTemp3); + let _skTemp4 = distance(_1_x, vec2(3.0, 4.0)); + _1_x = vec2(_skTemp4); + let _skTemp5 = dot(_1_x, vec2(3.0, 4.0)); + _1_x = vec2(_skTemp5); + let _skTemp6 = normalize(_1_x); + _1_x = _skTemp6; + return _globalUniforms.colorGreen; + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/HelloWorld.asm.frag b/tests/sksl/shared/HelloWorld.asm.frag index d8fefc854205..eb3a85717d15 100644 --- a/tests/sksl/shared/HelloWorld.asm.frag +++ b/tests/sksl/shared/HelloWorld.asm.frag @@ -1,42 +1,42 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%12 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%16 = OpConstantComposite %v2float %float_0 %float_0 + %void = OpTypeVoid + %12 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %16 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%20 = OpTypeFunction %v4float %_ptr_Function_v2float -%float_1 = OpConstant %float 1 -%24 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1 + %20 = OpTypeFunction %v4float %_ptr_Function_v2float + %float_1 = OpConstant %float 1 + %24 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1 %_entrypoint_v = OpFunction %void None %12 -%13 = OpLabel -%17 = OpVariable %_ptr_Function_v2float Function -OpStore %17 %16 -%19 = OpFunctionCall %v4float %main %17 -OpStore %sk_FragColor %19 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %20 -%21 = OpFunctionParameter %_ptr_Function_v2float -%22 = OpLabel -OpReturnValue %24 -OpFunctionEnd + %13 = OpLabel + %17 = OpVariable %_ptr_Function_v2float Function + OpStore %17 %16 + %19 = OpFunctionCall %v4float %main %17 + OpStore %sk_FragColor %19 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %20 + %21 = OpFunctionParameter %_ptr_Function_v2float + %22 = OpLabel + OpReturnValue %24 + OpFunctionEnd diff --git a/tests/sksl/shared/HelloWorld.skrp b/tests/sksl/shared/HelloWorld.skrp index 66bcd51ae404..caed4cabf2a2 100644 --- a/tests/sksl/shared/HelloWorld.skrp +++ b/tests/sksl/shared/HelloWorld.skrp @@ -1,7 +1,12 @@ +4 instructions + +[immutable slots] +i0 = 0 +i1 = 0x3F800000 (1.0) +i2 = 0 +i3 = 0x3F800000 (1.0) + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true -copy_constant $0 = 0 -copy_constant $1 = 0x3F800000 (1.0) -copy_constant $2 = 0 -copy_constant $3 = 0x3F800000 (1.0) +copy_4_immutables_unmasked $0..3 = i0..3 [0, 0x3F800000 (1.0), 0, 0x3F800000 (1.0)] load_src src.rgba = $0..3 diff --git a/tests/sksl/shared/HelloWorld.wgsl b/tests/sksl/shared/HelloWorld.wgsl index 2d910f2bee15..4b2655f8660a 100644 --- a/tests/sksl/shared/HelloWorld.wgsl +++ b/tests/sksl/shared/HelloWorld.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, diff --git a/tests/sksl/shared/Hex.asm.frag b/tests/sksl/shared/Hex.asm.frag index 446cee756e08..e6656a795b3c 100644 --- a/tests/sksl/shared/Hex.asm.frag +++ b/tests/sksl/shared/Hex.asm.frag @@ -1,87 +1,87 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %i1 "i1" -OpName %i2 "i2" -OpName %i3 "i3" -OpName %i4 "i4" -OpName %i5 "i5" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %46 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %i1 "i1" + OpName %i2 "i2" + OpName %i3 "i3" + OpName %i4 "i4" + OpName %i5 "i5" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %46 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%int = OpTypeInt 32 1 + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %int = OpTypeInt 32 1 %_ptr_Function_int = OpTypePointer Function %int -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%int_4660 = OpConstant %int 4660 -%int_32766 = OpConstant %int 32766 -%int_n32766 = OpConstant %int -32766 -%int_19132 = OpConstant %int 19132 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %int_4660 = OpConstant %int 4660 + %int_32766 = OpConstant %int 32766 + %int_n32766 = OpConstant %int -32766 + %int_19132 = OpConstant %int 19132 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%i1 = OpVariable %_ptr_Function_int Function -%i2 = OpVariable %_ptr_Function_int Function -%i3 = OpVariable %_ptr_Function_int Function -%i4 = OpVariable %_ptr_Function_int Function -%i5 = OpVariable %_ptr_Function_int Function -OpStore %i1 %int_0 -%31 = OpIAdd %int %int_0 %int_1 -OpStore %i1 %31 -OpStore %i2 %int_4660 -%34 = OpIAdd %int %int_4660 %int_1 -OpStore %i2 %34 -OpStore %i3 %int_32766 -%37 = OpIAdd %int %int_32766 %int_1 -OpStore %i3 %37 -OpStore %i4 %int_n32766 -%40 = OpIAdd %int %int_n32766 %int_1 -OpStore %i4 %40 -OpStore %i5 %int_19132 -%43 = OpIAdd %int %int_19132 %int_1 -OpStore %i5 %43 -%44 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%46 = OpLoad %v4float %44 -OpReturnValue %46 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %i1 = OpVariable %_ptr_Function_int Function + %i2 = OpVariable %_ptr_Function_int Function + %i3 = OpVariable %_ptr_Function_int Function + %i4 = OpVariable %_ptr_Function_int Function + %i5 = OpVariable %_ptr_Function_int Function + OpStore %i1 %int_0 + %31 = OpIAdd %int %int_0 %int_1 + OpStore %i1 %31 + OpStore %i2 %int_4660 + %34 = OpIAdd %int %int_4660 %int_1 + OpStore %i2 %34 + OpStore %i3 %int_32766 + %37 = OpIAdd %int %int_32766 %int_1 + OpStore %i3 %37 + OpStore %i4 %int_n32766 + %40 = OpIAdd %int %int_n32766 %int_1 + OpStore %i4 %40 + OpStore %i5 %int_19132 + %43 = OpIAdd %int %int_19132 %int_1 + OpStore %i5 %43 + %44 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %46 = OpLoad %v4float %44 + OpReturnValue %46 + OpFunctionEnd diff --git a/tests/sksl/shared/Hex.skrp b/tests/sksl/shared/Hex.skrp index 112b738c2292..2c8f707e390f 100644 --- a/tests/sksl/shared/Hex.skrp +++ b/tests/sksl/shared/Hex.skrp @@ -1,3 +1,5 @@ +14 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_constant i1 = 0 diff --git a/tests/sksl/shared/Hex.wgsl b/tests/sksl/shared/Hex.wgsl new file mode 100644 index 000000000000..5916b1d36893 --- /dev/null +++ b/tests/sksl/shared/Hex.wgsl @@ -0,0 +1,33 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var i1: i32 = 0; + i1 = i1 + i32(1); + var i2: i32 = 4660; + i2 = i2 + i32(1); + var i3: i32 = 32766; + i3 = i3 + i32(1); + var i4: i32 = -32766; + i4 = i4 + i32(1); + var i5: i32 = 19132; + i5 = i5 + i32(1); + return _globalUniforms.colorGreen; + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/HexUnsigned.asm.frag b/tests/sksl/shared/HexUnsigned.asm.frag index 50a692177497..14ebf8af117f 100644 --- a/tests/sksl/shared/HexUnsigned.asm.frag +++ b/tests/sksl/shared/HexUnsigned.asm.frag @@ -1,91 +1,91 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %u1 "u1" -OpName %u2 "u2" -OpName %u3 "u3" -OpName %u4 "u4" -OpName %u5 "u5" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %u5 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %48 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %u1 "u1" + OpName %u2 "u2" + OpName %u3 "u3" + OpName %u4 "u4" + OpName %u5 "u5" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %u5 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %48 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%uint = OpTypeInt 32 0 + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %uint = OpTypeInt 32 0 %_ptr_Function_uint = OpTypePointer Function %uint -%uint_0 = OpConstant %uint 0 -%uint_1 = OpConstant %uint 1 + %uint_0 = OpConstant %uint 0 + %uint_1 = OpConstant %uint 1 %uint_305441741 = OpConstant %uint 305441741 %uint_2147483646 = OpConstant %uint 2147483646 %uint_4294967294 = OpConstant %uint 4294967294 -%uint_65534 = OpConstant %uint 65534 + %uint_65534 = OpConstant %uint 65534 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%u1 = OpVariable %_ptr_Function_uint Function -%u2 = OpVariable %_ptr_Function_uint Function -%u3 = OpVariable %_ptr_Function_uint Function -%u4 = OpVariable %_ptr_Function_uint Function -%u5 = OpVariable %_ptr_Function_uint Function -OpStore %u1 %uint_0 -%31 = OpIAdd %uint %uint_0 %uint_1 -OpStore %u1 %31 -OpStore %u2 %uint_305441741 -%34 = OpIAdd %uint %uint_305441741 %uint_1 -OpStore %u2 %34 -OpStore %u3 %uint_2147483646 -%37 = OpIAdd %uint %uint_2147483646 %uint_1 -OpStore %u3 %37 -OpStore %u4 %uint_4294967294 -%40 = OpIAdd %uint %uint_4294967294 %uint_1 -OpStore %u4 %40 -OpStore %u5 %uint_65534 -%43 = OpIAdd %uint %uint_65534 %uint_1 -OpStore %u5 %43 -%44 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%48 = OpLoad %v4float %44 -OpReturnValue %48 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %u1 = OpVariable %_ptr_Function_uint Function + %u2 = OpVariable %_ptr_Function_uint Function + %u3 = OpVariable %_ptr_Function_uint Function + %u4 = OpVariable %_ptr_Function_uint Function + %u5 = OpVariable %_ptr_Function_uint Function + OpStore %u1 %uint_0 + %31 = OpIAdd %uint %uint_0 %uint_1 + OpStore %u1 %31 + OpStore %u2 %uint_305441741 + %34 = OpIAdd %uint %uint_305441741 %uint_1 + OpStore %u2 %34 + OpStore %u3 %uint_2147483646 + %37 = OpIAdd %uint %uint_2147483646 %uint_1 + OpStore %u3 %37 + OpStore %u4 %uint_4294967294 + %40 = OpIAdd %uint %uint_4294967294 %uint_1 + OpStore %u4 %40 + OpStore %u5 %uint_65534 + %43 = OpIAdd %uint %uint_65534 %uint_1 + OpStore %u5 %43 + %44 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %48 = OpLoad %v4float %44 + OpReturnValue %48 + OpFunctionEnd diff --git a/tests/sksl/shared/HexUnsigned.skrp b/tests/sksl/shared/HexUnsigned.skrp index 929f84c0521b..87277379b539 100644 --- a/tests/sksl/shared/HexUnsigned.skrp +++ b/tests/sksl/shared/HexUnsigned.skrp @@ -1,3 +1,5 @@ +14 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_constant u1 = 0 diff --git a/tests/sksl/shared/HexUnsigned.wgsl b/tests/sksl/shared/HexUnsigned.wgsl new file mode 100644 index 000000000000..34c8ec6134ee --- /dev/null +++ b/tests/sksl/shared/HexUnsigned.wgsl @@ -0,0 +1,33 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var u1: u32 = 0u; + u1 = u1 + u32(1); + var u2: u32 = 305441741u; + u2 = u2 + u32(1); + var u3: u32 = 2147483646u; + u3 = u3 + u32(1); + var u4: u32 = 4294967294u; + u4 = u4 + u32(1); + var u5: u32 = 65534u; + u5 = u5 + u32(1); + return _globalUniforms.colorGreen; + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/InoutParameters.asm.frag b/tests/sksl/shared/InoutParameters.asm.frag index 1ae64107a95a..1605000f259c 100644 --- a/tests/sksl/shared/InoutParameters.asm.frag +++ b/tests/sksl/shared/InoutParameters.asm.frag @@ -1,135 +1,134 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpName %_entrypoint_v "_entrypoint_v" -OpName %outParameterWrite_vh4 "outParameterWrite_vh4" -OpName %outParameterWriteIndirect_vh4 "outParameterWriteIndirect_vh4" -OpName %inoutParameterWrite_vh4 "inoutParameterWrite_vh4" -OpName %inoutParameterWriteIndirect_vh4 "inoutParameterWriteIndirect_vh4" -OpName %main "main" -OpName %c "c" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %14 Binding 0 -OpDecorate %14 DescriptorSet 0 -OpDecorate %35 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %45 RelaxedPrecision -OpDecorate %48 RelaxedPrecision -OpDecorate %49 RelaxedPrecision -OpDecorate %51 RelaxedPrecision -OpDecorate %c RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %58 RelaxedPrecision -OpDecorate %59 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %62 RelaxedPrecision -OpDecorate %64 RelaxedPrecision -OpDecorate %65 RelaxedPrecision -OpDecorate %67 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpName %_entrypoint_v "_entrypoint_v" + OpName %outParameterWrite_vh4 "outParameterWrite_vh4" + OpName %outParameterWriteIndirect_vh4 "outParameterWriteIndirect_vh4" + OpName %inoutParameterWrite_vh4 "inoutParameterWrite_vh4" + OpName %inoutParameterWriteIndirect_vh4 "inoutParameterWriteIndirect_vh4" + OpName %main "main" + OpName %c "c" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %14 Binding 0 + OpDecorate %14 DescriptorSet 0 + OpDecorate %35 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %45 RelaxedPrecision + OpDecorate %48 RelaxedPrecision + OpDecorate %49 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %c RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %58 RelaxedPrecision + OpDecorate %59 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %62 RelaxedPrecision + OpDecorate %64 RelaxedPrecision + OpDecorate %65 RelaxedPrecision + OpDecorate %67 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%14 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%19 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%23 = OpConstantComposite %v2float %float_0 %float_0 + %14 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %19 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %23 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float %_ptr_Function_v4float = OpTypePointer Function %v4float -%28 = OpTypeFunction %void %_ptr_Function_v4float + %28 = OpTypeFunction %void %_ptr_Function_v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%52 = OpTypeFunction %v4float %_ptr_Function_v2float -%false = OpConstantFalse %bool + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %52 = OpTypeFunction %v4float %_ptr_Function_v2float %_entrypoint_v = OpFunction %void None %19 -%20 = OpLabel -%24 = OpVariable %_ptr_Function_v2float Function -OpStore %24 %23 -%26 = OpFunctionCall %v4float %main %24 -OpStore %sk_FragColor %26 -OpReturn -OpFunctionEnd + %20 = OpLabel + %24 = OpVariable %_ptr_Function_v2float Function + OpStore %24 %23 + %26 = OpFunctionCall %v4float %main %24 + OpStore %sk_FragColor %26 + OpReturn + OpFunctionEnd %outParameterWrite_vh4 = OpFunction %void None %28 -%29 = OpFunctionParameter %_ptr_Function_v4float -%30 = OpLabel -%31 = OpAccessChain %_ptr_Uniform_v4float %14 %int_0 -%35 = OpLoad %v4float %31 -OpStore %29 %35 -OpReturn -OpFunctionEnd + %29 = OpFunctionParameter %_ptr_Function_v4float + %30 = OpLabel + %31 = OpAccessChain %_ptr_Uniform_v4float %14 %int_0 + %35 = OpLoad %v4float %31 + OpStore %29 %35 + OpReturn + OpFunctionEnd %outParameterWriteIndirect_vh4 = OpFunction %void None %28 -%36 = OpFunctionParameter %_ptr_Function_v4float -%37 = OpLabel -%38 = OpVariable %_ptr_Function_v4float Function -%39 = OpFunctionCall %void %outParameterWrite_vh4 %38 -%40 = OpLoad %v4float %38 -OpStore %36 %40 -OpReturn -OpFunctionEnd + %36 = OpFunctionParameter %_ptr_Function_v4float + %37 = OpLabel + %38 = OpVariable %_ptr_Function_v4float Function + %39 = OpFunctionCall %void %outParameterWrite_vh4 %38 + %40 = OpLoad %v4float %38 + OpStore %36 %40 + OpReturn + OpFunctionEnd %inoutParameterWrite_vh4 = OpFunction %void None %28 -%41 = OpFunctionParameter %_ptr_Function_v4float -%42 = OpLabel -%43 = OpLoad %v4float %41 -%44 = OpLoad %v4float %41 -%45 = OpFMul %v4float %43 %44 -OpStore %41 %45 -OpReturn -OpFunctionEnd + %41 = OpFunctionParameter %_ptr_Function_v4float + %42 = OpLabel + %43 = OpLoad %v4float %41 + %44 = OpLoad %v4float %41 + %45 = OpFMul %v4float %43 %44 + OpStore %41 %45 + OpReturn + OpFunctionEnd %inoutParameterWriteIndirect_vh4 = OpFunction %void None %28 -%46 = OpFunctionParameter %_ptr_Function_v4float -%47 = OpLabel -%49 = OpVariable %_ptr_Function_v4float Function -%48 = OpLoad %v4float %46 -OpStore %49 %48 -%50 = OpFunctionCall %void %inoutParameterWrite_vh4 %49 -%51 = OpLoad %v4float %49 -OpStore %46 %51 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %52 -%53 = OpFunctionParameter %_ptr_Function_v2float -%54 = OpLabel -%c = OpVariable %_ptr_Function_v4float Function -%56 = OpVariable %_ptr_Function_v4float Function -%59 = OpVariable %_ptr_Function_v4float Function -%62 = OpVariable %_ptr_Function_v4float Function -%65 = OpVariable %_ptr_Function_v4float Function -%57 = OpFunctionCall %void %outParameterWrite_vh4 %56 -%58 = OpLoad %v4float %56 -OpStore %c %58 -%60 = OpFunctionCall %void %outParameterWriteIndirect_vh4 %59 -%61 = OpLoad %v4float %59 -OpStore %c %61 -OpStore %62 %61 -%63 = OpFunctionCall %void %inoutParameterWrite_vh4 %62 -%64 = OpLoad %v4float %62 -OpStore %c %64 -OpStore %65 %64 -%66 = OpFunctionCall %void %inoutParameterWriteIndirect_vh4 %65 -%67 = OpLoad %v4float %65 -OpStore %c %67 -OpReturnValue %67 -OpFunctionEnd + %46 = OpFunctionParameter %_ptr_Function_v4float + %47 = OpLabel + %49 = OpVariable %_ptr_Function_v4float Function + %48 = OpLoad %v4float %46 + OpStore %49 %48 + %50 = OpFunctionCall %void %inoutParameterWrite_vh4 %49 + %51 = OpLoad %v4float %49 + OpStore %46 %51 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %52 + %53 = OpFunctionParameter %_ptr_Function_v2float + %54 = OpLabel + %c = OpVariable %_ptr_Function_v4float Function + %56 = OpVariable %_ptr_Function_v4float Function + %59 = OpVariable %_ptr_Function_v4float Function + %62 = OpVariable %_ptr_Function_v4float Function + %65 = OpVariable %_ptr_Function_v4float Function + %57 = OpFunctionCall %void %outParameterWrite_vh4 %56 + %58 = OpLoad %v4float %56 + OpStore %c %58 + %60 = OpFunctionCall %void %outParameterWriteIndirect_vh4 %59 + %61 = OpLoad %v4float %59 + OpStore %c %61 + OpStore %62 %61 + %63 = OpFunctionCall %void %inoutParameterWrite_vh4 %62 + %64 = OpLoad %v4float %62 + OpStore %c %64 + OpStore %65 %64 + %66 = OpFunctionCall %void %inoutParameterWriteIndirect_vh4 %65 + %67 = OpLoad %v4float %65 + OpStore %c %67 + OpReturnValue %67 + OpFunctionEnd diff --git a/tests/sksl/shared/InoutParameters.metal b/tests/sksl/shared/InoutParameters.metal index bdd38aedba5b..2e5a1aefd3c4 100644 --- a/tests/sksl/shared/InoutParameters.metal +++ b/tests/sksl/shared/InoutParameters.metal @@ -9,62 +9,32 @@ struct Inputs { struct Outputs { half4 sk_FragColor [[color(0)]]; }; -void outParameterWrite_vh4(Uniforms _uniforms, thread half4& x); -void _skOutParamHelper0_outParameterWrite_vh4(Uniforms _uniforms, thread half4& c) { - half4 _var0; - outParameterWrite_vh4(_uniforms, _var0); - c = _var0; -} -void inoutParameterWrite_vh4(thread half4& x); -void _skOutParamHelper1_inoutParameterWrite_vh4(thread half4& x) { - half4 _var0 = x; - inoutParameterWrite_vh4(_var0); - x = _var0; -} -void outParameterWrite_vh4(Uniforms _uniforms, thread half4& x); -void _skOutParamHelper2_outParameterWrite_vh4(Uniforms _uniforms, thread half4& c) { - half4 _var0; - outParameterWrite_vh4(_uniforms, _var0); - c = _var0; -} -void outParameterWriteIndirect_vh4(Uniforms _uniforms, thread half4& c); -void _skOutParamHelper3_outParameterWriteIndirect_vh4(Uniforms _uniforms, thread half4& c) { - half4 _var0; - outParameterWriteIndirect_vh4(_uniforms, _var0); - c = _var0; -} -void inoutParameterWrite_vh4(thread half4& x); -void _skOutParamHelper4_inoutParameterWrite_vh4(thread half4& c) { - half4 _var0 = c; - inoutParameterWrite_vh4(_var0); - c = _var0; -} -void inoutParameterWriteIndirect_vh4(thread half4& x); -void _skOutParamHelper5_inoutParameterWriteIndirect_vh4(thread half4& c) { - half4 _var0 = c; - inoutParameterWriteIndirect_vh4(_var0); - c = _var0; -} void outParameterWrite_vh4(Uniforms _uniforms, thread half4& x) { x = _uniforms.colorGreen; } void outParameterWriteIndirect_vh4(Uniforms _uniforms, thread half4& c) { - _skOutParamHelper0_outParameterWrite_vh4(_uniforms, c); + half4 _skTemp0; + ((outParameterWrite_vh4(_uniforms, _skTemp0)), (c = _skTemp0)); } void inoutParameterWrite_vh4(thread half4& x) { x *= x; } void inoutParameterWriteIndirect_vh4(thread half4& x) { - _skOutParamHelper1_inoutParameterWrite_vh4(x); + half4 _skTemp1; + ((inoutParameterWrite_vh4((_skTemp1 = x))), (x = _skTemp1)); } fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) { Outputs _out; (void)_out; + half4 _skTemp2; + half4 _skTemp3; + half4 _skTemp4; + half4 _skTemp5; half4 c; - _skOutParamHelper2_outParameterWrite_vh4(_uniforms, c); - _skOutParamHelper3_outParameterWriteIndirect_vh4(_uniforms, c); - _skOutParamHelper4_inoutParameterWrite_vh4(c); - _skOutParamHelper5_inoutParameterWriteIndirect_vh4(c); + ((outParameterWrite_vh4(_uniforms, _skTemp2)), (c = _skTemp2)); + ((outParameterWriteIndirect_vh4(_uniforms, _skTemp3)), (c = _skTemp3)); + ((inoutParameterWrite_vh4((_skTemp4 = c))), (c = _skTemp4)); + ((inoutParameterWriteIndirect_vh4((_skTemp5 = c))), (c = _skTemp5)); _out.sk_FragColor = c; return _out; } diff --git a/tests/sksl/shared/InoutParameters.skrp b/tests/sksl/shared/InoutParameters.skrp index 0db8f75a107c..8a096ad63ad1 100644 --- a/tests/sksl/shared/InoutParameters.skrp +++ b/tests/sksl/shared/InoutParameters.skrp @@ -1,3 +1,5 @@ +24 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true splat_4_constants c = 0 diff --git a/tests/sksl/shared/InoutParameters.wgsl b/tests/sksl/shared/InoutParameters.wgsl index bed3d949911d..663744cdc7a1 100644 --- a/tests/sksl/shared/InoutParameters.wgsl +++ b/tests/sksl/shared/InoutParameters.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, diff --git a/tests/sksl/shared/InoutParamsAreDistinct.asm.frag b/tests/sksl/shared/InoutParamsAreDistinct.asm.frag index 09259adf31b1..28056c0b029c 100644 --- a/tests/sksl/shared/InoutParamsAreDistinct.asm.frag +++ b/tests/sksl/shared/InoutParamsAreDistinct.asm.frag @@ -1,114 +1,114 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %inout_params_are_distinct_bhh "inout_params_are_distinct_bhh" -OpName %main "main" -OpName %x "x" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %11 Binding 0 -OpDecorate %11 DescriptorSet 0 -OpDecorate %x RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %58 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %inout_params_are_distinct_bhh "inout_params_are_distinct_bhh" + OpName %main "main" + OpName %x "x" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %11 Binding 0 + OpDecorate %11 DescriptorSet 0 + OpDecorate %x RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %58 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%16 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%20 = OpConstantComposite %v2float %float_0 %float_0 + %11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %16 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %20 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float %_ptr_Function_float = OpTypePointer Function %float -%25 = OpTypeFunction %bool %_ptr_Function_float %_ptr_Function_float -%float_1 = OpConstant %float 1 -%float_2 = OpConstant %float 2 -%false = OpConstantFalse %bool -%true = OpConstantTrue %bool -%36 = OpTypeFunction %v4float %_ptr_Function_v2float + %25 = OpTypeFunction %bool %_ptr_Function_float %_ptr_Function_float + %float_1 = OpConstant %float 1 + %float_2 = OpConstant %float 2 + %false = OpConstantFalse %bool + %true = OpConstantTrue %bool + %36 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 %_entrypoint_v = OpFunction %void None %16 -%17 = OpLabel -%21 = OpVariable %_ptr_Function_v2float Function -OpStore %21 %20 -%23 = OpFunctionCall %v4float %main %21 -OpStore %sk_FragColor %23 -OpReturn -OpFunctionEnd + %17 = OpLabel + %21 = OpVariable %_ptr_Function_v2float Function + OpStore %21 %20 + %23 = OpFunctionCall %v4float %main %21 + OpStore %sk_FragColor %23 + OpReturn + OpFunctionEnd %inout_params_are_distinct_bhh = OpFunction %bool None %25 -%26 = OpFunctionParameter %_ptr_Function_float -%27 = OpFunctionParameter %_ptr_Function_float -%28 = OpLabel -OpStore %26 %float_1 -OpStore %27 %float_2 -OpSelectionMerge %34 None -OpBranchConditional %true %33 %34 -%33 = OpLabel -OpBranch %34 -%34 = OpLabel -%35 = OpPhi %bool %false %28 %true %33 -OpReturnValue %35 -OpFunctionEnd -%main = OpFunction %v4float None %36 -%37 = OpFunctionParameter %_ptr_Function_v2float -%38 = OpLabel -%x = OpVariable %_ptr_Function_float Function -%40 = OpVariable %_ptr_Function_float Function -%41 = OpVariable %_ptr_Function_float Function -%45 = OpVariable %_ptr_Function_v4float Function -OpStore %x %float_0 -OpStore %40 %float_0 -OpStore %41 %float_0 -%42 = OpFunctionCall %bool %inout_params_are_distinct_bhh %40 %41 -%43 = OpLoad %float %40 -OpStore %x %43 -%44 = OpLoad %float %41 -OpStore %x %44 -OpSelectionMerge %49 None -OpBranchConditional %42 %47 %48 -%47 = OpLabel -%50 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 -%54 = OpLoad %v4float %50 -OpStore %45 %54 -OpBranch %49 -%48 = OpLabel -%55 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 -%57 = OpLoad %v4float %55 -OpStore %45 %57 -OpBranch %49 -%49 = OpLabel -%58 = OpLoad %v4float %45 -OpReturnValue %58 -OpFunctionEnd + %26 = OpFunctionParameter %_ptr_Function_float + %27 = OpFunctionParameter %_ptr_Function_float + %28 = OpLabel + OpStore %26 %float_1 + OpStore %27 %float_2 + OpSelectionMerge %34 None + OpBranchConditional %true %33 %34 + %33 = OpLabel + OpBranch %34 + %34 = OpLabel + %35 = OpPhi %bool %false %28 %true %33 + OpReturnValue %35 + OpFunctionEnd + %main = OpFunction %v4float None %36 + %37 = OpFunctionParameter %_ptr_Function_v2float + %38 = OpLabel + %x = OpVariable %_ptr_Function_float Function + %40 = OpVariable %_ptr_Function_float Function + %41 = OpVariable %_ptr_Function_float Function + %45 = OpVariable %_ptr_Function_v4float Function + OpStore %x %float_0 + OpStore %40 %float_0 + OpStore %41 %float_0 + %42 = OpFunctionCall %bool %inout_params_are_distinct_bhh %40 %41 + %43 = OpLoad %float %40 + OpStore %x %43 + %44 = OpLoad %float %41 + OpStore %x %44 + OpSelectionMerge %49 None + OpBranchConditional %42 %47 %48 + %47 = OpLabel + %50 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 + %54 = OpLoad %v4float %50 + OpStore %45 %54 + OpBranch %49 + %48 = OpLabel + %55 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 + %57 = OpLoad %v4float %55 + OpStore %45 %57 + OpBranch %49 + %49 = OpLabel + %58 = OpLoad %v4float %45 + OpReturnValue %58 + OpFunctionEnd diff --git a/tests/sksl/shared/InoutParamsAreDistinct.metal b/tests/sksl/shared/InoutParamsAreDistinct.metal index 86d42ee18974..317565aefad4 100644 --- a/tests/sksl/shared/InoutParamsAreDistinct.metal +++ b/tests/sksl/shared/InoutParamsAreDistinct.metal @@ -10,15 +10,6 @@ struct Inputs { struct Outputs { half4 sk_FragColor [[color(0)]]; }; -bool inout_params_are_distinct_bhh(thread half& x, thread half& y); -bool _skOutParamHelper0_inout_params_are_distinct_bhh(thread half& x, thread half&) { - half _var0 = x; - half _var1 = x; - bool _skResult = inout_params_are_distinct_bhh(_var0, _var1); - x = _var0; - x = _var1; - return _skResult; -} bool inout_params_are_distinct_bhh(thread half& x, thread half& y) { x = 1.0h; y = 2.0h; @@ -27,7 +18,10 @@ bool inout_params_are_distinct_bhh(thread half& x, thread half& y) { fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) { Outputs _out; (void)_out; + half _skTemp0; + half _skTemp1; + bool _skTemp2; half x = 0.0h; - _out.sk_FragColor = _skOutParamHelper0_inout_params_are_distinct_bhh(x, x) ? _uniforms.colorGreen : _uniforms.colorRed; + _out.sk_FragColor = ((_skTemp2 = inout_params_are_distinct_bhh((_skTemp0 = x), (_skTemp1 = x))), (x = _skTemp0), (x = _skTemp1), _skTemp2) ? _uniforms.colorGreen : _uniforms.colorRed; return _out; } diff --git a/tests/sksl/shared/InoutParamsAreDistinct.skrp b/tests/sksl/shared/InoutParamsAreDistinct.skrp index 8058d40c8063..cbe178d4978c 100644 --- a/tests/sksl/shared/InoutParamsAreDistinct.skrp +++ b/tests/sksl/shared/InoutParamsAreDistinct.skrp @@ -1,3 +1,5 @@ +19 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_constant x = 0 diff --git a/tests/sksl/shared/InoutParamsAreDistinct.wgsl b/tests/sksl/shared/InoutParamsAreDistinct.wgsl index 47ad2b576a70..ae8b7ce0bc1c 100644 --- a/tests/sksl/shared/InoutParamsAreDistinct.wgsl +++ b/tests/sksl/shared/InoutParamsAreDistinct.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -16,7 +17,7 @@ fn inout_params_are_distinct_bhh(_skParam0: ptr, _skParam1: ptr) -> vec4 { diff --git a/tests/sksl/shared/InstanceID.asm.vert b/tests/sksl/shared/InstanceID.asm.vert index 0a268a3c9081..6b44d61225ae 100644 --- a/tests/sksl/shared/InstanceID.asm.vert +++ b/tests/sksl/shared/InstanceID.asm.vert @@ -1,22 +1,22 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Vertex %main "main" %sk_InstanceID %id -OpName %sk_InstanceID "sk_InstanceID" -OpName %id "id" -OpName %main "main" -OpDecorate %sk_InstanceID BuiltIn InstanceIndex -OpDecorate %id Location 1 -%int = OpTypeInt 32 1 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %main "main" %sk_InstanceID %id + OpName %sk_InstanceID "sk_InstanceID" + OpName %id "id" + OpName %main "main" + OpDecorate %sk_InstanceID BuiltIn InstanceIndex + OpDecorate %id Location 1 + %int = OpTypeInt 32 1 %_ptr_Input_int = OpTypePointer Input %int %sk_InstanceID = OpVariable %_ptr_Input_int Input %_ptr_Output_int = OpTypePointer Output %int -%id = OpVariable %_ptr_Output_int Output -%void = OpTypeVoid -%9 = OpTypeFunction %void -%main = OpFunction %void None %9 -%10 = OpLabel -%11 = OpLoad %int %sk_InstanceID -OpStore %id %11 -OpReturn -OpFunctionEnd + %id = OpVariable %_ptr_Output_int Output + %void = OpTypeVoid + %9 = OpTypeFunction %void + %main = OpFunction %void None %9 + %10 = OpLabel + %11 = OpLoad %int %sk_InstanceID + OpStore %id %11 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/InstanceID.wgsl b/tests/sksl/shared/InstanceID.wgsl index ca4d1d92721f..df178a6e8909 100644 --- a/tests/sksl/shared/InstanceID.wgsl +++ b/tests/sksl/shared/InstanceID.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct VSIn { @builtin(instance_index) sk_InstanceID: u32, }; diff --git a/tests/sksl/shared/InstanceIDInFunction.asm.vert b/tests/sksl/shared/InstanceIDInFunction.asm.vert new file mode 100644 index 000000000000..a57dc68784ab --- /dev/null +++ b/tests/sksl/shared/InstanceIDInFunction.asm.vert @@ -0,0 +1,29 @@ + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %main "main" %sk_InstanceID %id + OpName %sk_InstanceID "sk_InstanceID" + OpName %id "id" + OpName %fn_i "fn_i" + OpName %main "main" + OpDecorate %sk_InstanceID BuiltIn InstanceIndex + OpDecorate %id Location 1 + %int = OpTypeInt 32 1 +%_ptr_Input_int = OpTypePointer Input %int +%sk_InstanceID = OpVariable %_ptr_Input_int Input +%_ptr_Output_int = OpTypePointer Output %int + %id = OpVariable %_ptr_Output_int Output + %9 = OpTypeFunction %int + %void = OpTypeVoid + %13 = OpTypeFunction %void + %fn_i = OpFunction %int None %9 + %10 = OpLabel + %11 = OpLoad %int %sk_InstanceID + OpReturnValue %11 + OpFunctionEnd + %main = OpFunction %void None %13 + %14 = OpLabel + %15 = OpFunctionCall %int %fn_i + OpStore %id %15 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/InstanceIDInFunction.glsl b/tests/sksl/shared/InstanceIDInFunction.glsl new file mode 100644 index 000000000000..90f02b9500a0 --- /dev/null +++ b/tests/sksl/shared/InstanceIDInFunction.glsl @@ -0,0 +1,8 @@ + +layout (location = 1) out int id; +int fn_i() { + return gl_InstanceID; +} +void main() { + id = fn_i(); +} diff --git a/tests/sksl/shared/InstanceIDInFunction.hlsl b/tests/sksl/shared/InstanceIDInFunction.hlsl new file mode 100644 index 000000000000..95d520212ad1 --- /dev/null +++ b/tests/sksl/shared/InstanceIDInFunction.hlsl @@ -0,0 +1,31 @@ +static int gl_InstanceIndex; +static int id; + +struct SPIRV_Cross_Input +{ + uint gl_InstanceIndex : SV_InstanceID; +}; + +struct SPIRV_Cross_Output +{ + int id : TEXCOORD1; +}; + +int fn_i() +{ + return gl_InstanceIndex; +} + +void vert_main() +{ + id = fn_i(); +} + +SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input) +{ + gl_InstanceIndex = int(stage_input.gl_InstanceIndex); + vert_main(); + SPIRV_Cross_Output stage_output; + stage_output.id = id; + return stage_output; +} diff --git a/tests/sksl/shared/InstanceIDInFunction.metal b/tests/sksl/shared/InstanceIDInFunction.metal new file mode 100644 index 000000000000..1ef8ddfee5cd --- /dev/null +++ b/tests/sksl/shared/InstanceIDInFunction.metal @@ -0,0 +1,19 @@ +#include +#include +using namespace metal; +struct Inputs { +}; +struct Outputs { + float4 sk_Position [[position]]; + int id [[user(locn1)]]; + float sk_PointSize [[point_size]]; +}; +int fn_i(uint sk_InstanceID) { + return sk_InstanceID; +} +vertex Outputs vertexMain(Inputs _in [[stage_in]], uint sk_VertexID [[vertex_id]], uint sk_InstanceID [[instance_id]]) { + Outputs _out; + (void)_out; + _out.id = fn_i(sk_InstanceID); + return _out; +} diff --git a/tests/sksl/shared/InstanceIDInFunction.skrp b/tests/sksl/shared/InstanceIDInFunction.skrp new file mode 100644 index 000000000000..a08f8de61f37 --- /dev/null +++ b/tests/sksl/shared/InstanceIDInFunction.skrp @@ -0,0 +1,3 @@ +### Compilation failed: + +Runtime shaders do not support vertex programs diff --git a/tests/sksl/shared/InstanceIDInFunction.wgsl b/tests/sksl/shared/InstanceIDInFunction.wgsl new file mode 100644 index 000000000000..fc8ace997c39 --- /dev/null +++ b/tests/sksl/shared/InstanceIDInFunction.wgsl @@ -0,0 +1,24 @@ +diagnostic(off, derivative_uniformity); +struct VSIn { + @builtin(instance_index) sk_InstanceID: u32, +}; +struct VSOut { + @location(1) @interpolate(flat) id: i32, + @builtin(position) sk_Position: vec4, +}; +fn fn_i(_stageIn: VSIn) -> i32 { + { + return i32(_stageIn.sk_InstanceID); + } +} +fn main(_stageIn: VSIn, _stageOut: ptr) { + { + let _skTemp0 = fn_i(_stageIn); + (*_stageOut).id = _skTemp0; + } +} +@vertex fn vertexMain(_stageIn: VSIn) -> VSOut { + var _stageOut: VSOut; + main(_stageIn, &_stageOut); + return _stageOut; +} diff --git a/tests/sksl/shared/IntegerDivisionES3.asm.frag b/tests/sksl/shared/IntegerDivisionES3.asm.frag index 6efb028c9225..d16b27660ae7 100644 --- a/tests/sksl/shared/IntegerDivisionES3.asm.frag +++ b/tests/sksl/shared/IntegerDivisionES3.asm.frag @@ -1,164 +1,164 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %zero "zero" -OpName %one "one" -OpName %x "x" -OpName %y "y" -OpName %_0_x "_0_x" -OpName %_1_result "_1_result" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %90 RelaxedPrecision -OpDecorate %96 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %zero "zero" + OpName %one "one" + OpName %x "x" + OpName %y "y" + OpName %_0_x "_0_x" + OpName %_1_result "_1_result" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %90 RelaxedPrecision + OpDecorate %96 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%int = OpTypeInt 32 1 + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %int = OpTypeInt 32 1 %_ptr_Function_int = OpTypePointer Function %int %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_0 = OpConstant %int 0 -%int_100 = OpConstant %int 100 -%int_1 = OpConstant %int 1 -%float_1 = OpConstant %float 1 + %int_0 = OpConstant %int 0 + %int_100 = OpConstant %int 100 + %int_1 = OpConstant %int 1 + %float_1 = OpConstant %float 1 %float_0_00392156886 = OpConstant %float 0.00392156886 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%zero = OpVariable %_ptr_Function_int Function -%one = OpVariable %_ptr_Function_int Function -%x = OpVariable %_ptr_Function_int Function -%y = OpVariable %_ptr_Function_int Function -%_0_x = OpVariable %_ptr_Function_int Function -%_1_result = OpVariable %_ptr_Function_int Function -%29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %29 -%33 = OpCompositeExtract %float %32 0 -%34 = OpConvertFToS %int %33 -OpStore %zero %34 -%36 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%37 = OpLoad %v4float %36 -%38 = OpCompositeExtract %float %37 1 -%39 = OpConvertFToS %int %38 -OpStore %one %39 -OpStore %x %34 -OpBranch %41 -%41 = OpLabel -OpLoopMerge %45 %44 None -OpBranch %42 -%42 = OpLabel -%46 = OpLoad %int %x -%48 = OpSLessThan %bool %46 %int_100 -OpBranchConditional %48 %43 %45 -%43 = OpLabel -%50 = OpLoad %int %one -OpStore %y %50 -OpBranch %51 -%51 = OpLabel -OpLoopMerge %55 %54 None -OpBranch %52 -%52 = OpLabel -%56 = OpLoad %int %y -%57 = OpSLessThan %bool %56 %int_100 -OpBranchConditional %57 %53 %55 -%53 = OpLabel -%59 = OpLoad %int %x -OpStore %_0_x %59 -OpStore %_1_result %int_0 -OpBranch %61 -%61 = OpLabel -OpLoopMerge %65 %64 None -OpBranch %62 -%62 = OpLabel -%66 = OpLoad %int %_0_x -%67 = OpLoad %int %y -%68 = OpSGreaterThanEqual %bool %66 %67 -OpBranchConditional %68 %63 %65 -%63 = OpLabel -%70 = OpLoad %int %_1_result -%71 = OpIAdd %int %70 %int_1 -OpStore %_1_result %71 -%72 = OpLoad %int %_0_x -%73 = OpLoad %int %y -%74 = OpISub %int %72 %73 -OpStore %_0_x %74 -OpBranch %64 -%64 = OpLabel -OpBranch %61 -%65 = OpLabel -%75 = OpLoad %int %x -%76 = OpLoad %int %y -%77 = OpSDiv %int %75 %76 -%78 = OpLoad %int %_1_result -%79 = OpINotEqual %bool %77 %78 -OpSelectionMerge %81 None -OpBranchConditional %79 %80 %81 -%80 = OpLabel -%83 = OpLoad %int %x -%84 = OpConvertSToF %float %83 -%86 = OpFMul %float %84 %float_0_00392156886 -%87 = OpLoad %int %y -%88 = OpConvertSToF %float %87 -%89 = OpFMul %float %88 %float_0_00392156886 -%90 = OpCompositeConstruct %v4float %float_1 %86 %89 %float_1 -OpReturnValue %90 -%81 = OpLabel -OpBranch %54 -%54 = OpLabel -%91 = OpLoad %int %y -%92 = OpIAdd %int %91 %int_1 -OpStore %y %92 -OpBranch %51 -%55 = OpLabel -OpBranch %44 -%44 = OpLabel -%93 = OpLoad %int %x -%94 = OpIAdd %int %93 %int_1 -OpStore %x %94 -OpBranch %41 -%45 = OpLabel -%95 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%96 = OpLoad %v4float %95 -OpReturnValue %96 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %zero = OpVariable %_ptr_Function_int Function + %one = OpVariable %_ptr_Function_int Function + %x = OpVariable %_ptr_Function_int Function + %y = OpVariable %_ptr_Function_int Function + %_0_x = OpVariable %_ptr_Function_int Function + %_1_result = OpVariable %_ptr_Function_int Function + %29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %29 + %33 = OpCompositeExtract %float %32 0 + %34 = OpConvertFToS %int %33 + OpStore %zero %34 + %36 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %37 = OpLoad %v4float %36 + %38 = OpCompositeExtract %float %37 1 + %39 = OpConvertFToS %int %38 + OpStore %one %39 + OpStore %x %34 + OpBranch %41 + %41 = OpLabel + OpLoopMerge %45 %44 None + OpBranch %42 + %42 = OpLabel + %46 = OpLoad %int %x + %48 = OpSLessThan %bool %46 %int_100 + OpBranchConditional %48 %43 %45 + %43 = OpLabel + %50 = OpLoad %int %one + OpStore %y %50 + OpBranch %51 + %51 = OpLabel + OpLoopMerge %55 %54 None + OpBranch %52 + %52 = OpLabel + %56 = OpLoad %int %y + %57 = OpSLessThan %bool %56 %int_100 + OpBranchConditional %57 %53 %55 + %53 = OpLabel + %59 = OpLoad %int %x + OpStore %_0_x %59 + OpStore %_1_result %int_0 + OpBranch %61 + %61 = OpLabel + OpLoopMerge %65 %64 None + OpBranch %62 + %62 = OpLabel + %66 = OpLoad %int %_0_x + %67 = OpLoad %int %y + %68 = OpSGreaterThanEqual %bool %66 %67 + OpBranchConditional %68 %63 %65 + %63 = OpLabel + %70 = OpLoad %int %_1_result + %71 = OpIAdd %int %70 %int_1 + OpStore %_1_result %71 + %72 = OpLoad %int %_0_x + %73 = OpLoad %int %y + %74 = OpISub %int %72 %73 + OpStore %_0_x %74 + OpBranch %64 + %64 = OpLabel + OpBranch %61 + %65 = OpLabel + %75 = OpLoad %int %x + %76 = OpLoad %int %y + %77 = OpSDiv %int %75 %76 + %78 = OpLoad %int %_1_result + %79 = OpINotEqual %bool %77 %78 + OpSelectionMerge %81 None + OpBranchConditional %79 %80 %81 + %80 = OpLabel + %83 = OpLoad %int %x + %84 = OpConvertSToF %float %83 + %86 = OpFMul %float %84 %float_0_00392156886 + %87 = OpLoad %int %y + %88 = OpConvertSToF %float %87 + %89 = OpFMul %float %88 %float_0_00392156886 + %90 = OpCompositeConstruct %v4float %float_1 %86 %89 %float_1 + OpReturnValue %90 + %81 = OpLabel + OpBranch %54 + %54 = OpLabel + %91 = OpLoad %int %y + %92 = OpIAdd %int %91 %int_1 + OpStore %y %92 + OpBranch %51 + %55 = OpLabel + OpBranch %44 + %44 = OpLabel + %93 = OpLoad %int %x + %94 = OpIAdd %int %93 %int_1 + OpStore %x %94 + OpBranch %41 + %45 = OpLabel + %95 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %96 = OpLoad %v4float %95 + OpReturnValue %96 + OpFunctionEnd diff --git a/tests/sksl/shared/IntegerDivisionES3.skrp b/tests/sksl/shared/IntegerDivisionES3.skrp index 4341d3c9f7cf..52738933d257 100644 --- a/tests/sksl/shared/IntegerDivisionES3.skrp +++ b/tests/sksl/shared/IntegerDivisionES3.skrp @@ -1,3 +1,5 @@ +70 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_uniform $0 = colorGreen(0) diff --git a/tests/sksl/shared/IntegerDivisionES3.wgsl b/tests/sksl/shared/IntegerDivisionES3.wgsl index 0782a21ddc75..a79699e28993 100644 --- a/tests/sksl/shared/IntegerDivisionES3.wgsl +++ b/tests/sksl/shared/IntegerDivisionES3.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -36,7 +37,7 @@ fn main(_skParam0: vec2) -> vec4 { break; } } - if (x / y != _1_result) { + if (x / y) != _1_result { { return vec4(1.0, f32(f32(x) * 0.003921569), f32(f32(y) * 0.003921569), 1.0); } diff --git a/tests/sksl/shared/InterfaceBlockBuffer.asm.frag b/tests/sksl/shared/InterfaceBlockBuffer.asm.frag index d321e34191d0..38fc92e58d43 100644 --- a/tests/sksl/shared/InterfaceBlockBuffer.asm.frag +++ b/tests/sksl/shared/InterfaceBlockBuffer.asm.frag @@ -1,42 +1,42 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %testBlock "testBlock" -OpMemberName %testBlock 0 "x" -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %main "main" -OpMemberDecorate %testBlock 0 Offset 0 -OpDecorate %testBlock BufferBlock -OpDecorate %3 Binding 456 -OpDecorate %3 DescriptorSet 0 -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %21 RelaxedPrecision -%float = OpTypeFloat 32 -%testBlock = OpTypeStruct %float + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %testBlock "testBlock" + OpMemberName %testBlock 0 "x" + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %main "main" + OpMemberDecorate %testBlock 0 Offset 0 + OpDecorate %testBlock BufferBlock + OpDecorate %3 Binding 456 + OpDecorate %3 DescriptorSet 0 + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %21 RelaxedPrecision + %float = OpTypeFloat 32 + %testBlock = OpTypeStruct %float %_ptr_Uniform_testBlock = OpTypePointer Uniform %testBlock -%3 = OpVariable %_ptr_Uniform_testBlock Uniform -%bool = OpTypeBool + %3 = OpVariable %_ptr_Uniform_testBlock Uniform + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%v4float = OpTypeVector %float 4 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%14 = OpTypeFunction %void -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 + %void = OpTypeVoid + %14 = OpTypeFunction %void + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 %_ptr_Uniform_float = OpTypePointer Uniform %float -%main = OpFunction %void None %14 -%15 = OpLabel -%18 = OpAccessChain %_ptr_Uniform_float %3 %int_0 -%20 = OpLoad %float %18 -%21 = OpCompositeConstruct %v4float %20 %20 %20 %20 -OpStore %sk_FragColor %21 -OpReturn -OpFunctionEnd + %main = OpFunction %void None %14 + %15 = OpLabel + %18 = OpAccessChain %_ptr_Uniform_float %3 %int_0 + %20 = OpLoad %float %18 + %21 = OpCompositeConstruct %v4float %20 %20 %20 %20 + OpStore %sk_FragColor %21 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/InterfaceBlockBuffer.wgsl b/tests/sksl/shared/InterfaceBlockBuffer.wgsl new file mode 100644 index 000000000000..25043f2734a9 --- /dev/null +++ b/tests/sksl/shared/InterfaceBlockBuffer.wgsl @@ -0,0 +1,21 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct testBlock { + x: f32, +}; +@group(0) @binding(456) var test : testBlock; +fn main(_stageOut: ptr) { + { + (*_stageOut).sk_FragColor = vec4(f32(test.x)); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(&_stageOut); + return _stageOut; +} diff --git a/tests/sksl/shared/InterfaceBlockMultipleAnonymous.asm.frag b/tests/sksl/shared/InterfaceBlockMultipleAnonymous.asm.frag index 9ce4bc65d7b5..486f1e8d4a41 100644 --- a/tests/sksl/shared/InterfaceBlockMultipleAnonymous.asm.frag +++ b/tests/sksl/shared/InterfaceBlockMultipleAnonymous.asm.frag @@ -1,62 +1,62 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %testBlockA "testBlockA" -OpMemberName %testBlockA 0 "x" -OpName %testBlockB "testBlockB" -OpMemberName %testBlockB 0 "y" -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %main "main" -OpMemberDecorate %testBlockA 0 Offset 0 -OpDecorate %testBlockA Block -OpDecorate %3 Binding 1 -OpDecorate %3 DescriptorSet 0 -OpMemberDecorate %testBlockB 0 Offset 0 -OpDecorate %testBlockB Block -OpDecorate %8 Binding 2 -OpDecorate %8 DescriptorSet 0 -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %25 RelaxedPrecision -OpDecorate %26 RelaxedPrecision -OpDecorate %29 RelaxedPrecision -OpDecorate %30 RelaxedPrecision -OpDecorate %31 RelaxedPrecision -%float = OpTypeFloat 32 -%v2float = OpTypeVector %float 2 -%testBlockA = OpTypeStruct %v2float + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %testBlockA "testBlockA" + OpMemberName %testBlockA 0 "x" + OpName %testBlockB "testBlockB" + OpMemberName %testBlockB 0 "y" + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %main "main" + OpMemberDecorate %testBlockA 0 Offset 0 + OpDecorate %testBlockA Block + OpDecorate %3 Binding 1 + OpDecorate %3 DescriptorSet 0 + OpMemberDecorate %testBlockB 0 Offset 0 + OpDecorate %testBlockB Block + OpDecorate %8 Binding 2 + OpDecorate %8 DescriptorSet 0 + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %25 RelaxedPrecision + OpDecorate %26 RelaxedPrecision + OpDecorate %29 RelaxedPrecision + OpDecorate %30 RelaxedPrecision + OpDecorate %31 RelaxedPrecision + %float = OpTypeFloat 32 + %v2float = OpTypeVector %float 2 + %testBlockA = OpTypeStruct %v2float %_ptr_Uniform_testBlockA = OpTypePointer Uniform %testBlockA -%3 = OpVariable %_ptr_Uniform_testBlockA Uniform -%testBlockB = OpTypeStruct %v2float + %3 = OpVariable %_ptr_Uniform_testBlockA Uniform + %testBlockB = OpTypeStruct %v2float %_ptr_Uniform_testBlockB = OpTypePointer Uniform %testBlockB -%8 = OpVariable %_ptr_Uniform_testBlockB Uniform -%bool = OpTypeBool + %8 = OpVariable %_ptr_Uniform_testBlockB Uniform + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%v4float = OpTypeVector %float 4 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%18 = OpTypeFunction %void -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 + %void = OpTypeVoid + %18 = OpTypeFunction %void + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 %_ptr_Uniform_v2float = OpTypePointer Uniform %v2float -%main = OpFunction %void None %18 -%19 = OpLabel -%22 = OpAccessChain %_ptr_Uniform_v2float %3 %int_0 -%24 = OpLoad %v2float %22 -%25 = OpCompositeExtract %float %24 0 -%26 = OpCompositeExtract %float %24 1 -%27 = OpAccessChain %_ptr_Uniform_v2float %8 %int_0 -%28 = OpLoad %v2float %27 -%29 = OpCompositeExtract %float %28 0 -%30 = OpCompositeExtract %float %28 1 -%31 = OpCompositeConstruct %v4float %25 %26 %29 %30 -OpStore %sk_FragColor %31 -OpReturn -OpFunctionEnd + %main = OpFunction %void None %18 + %19 = OpLabel + %22 = OpAccessChain %_ptr_Uniform_v2float %3 %int_0 + %24 = OpLoad %v2float %22 + %25 = OpCompositeExtract %float %24 0 + %26 = OpCompositeExtract %float %24 1 + %27 = OpAccessChain %_ptr_Uniform_v2float %8 %int_0 + %28 = OpLoad %v2float %27 + %29 = OpCompositeExtract %float %28 0 + %30 = OpCompositeExtract %float %28 1 + %31 = OpCompositeConstruct %v4float %25 %26 %29 %30 + OpStore %sk_FragColor %31 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/InterfaceBlockMultipleAnonymous.wgsl b/tests/sksl/shared/InterfaceBlockMultipleAnonymous.wgsl new file mode 100644 index 000000000000..27559c2f15f5 --- /dev/null +++ b/tests/sksl/shared/InterfaceBlockMultipleAnonymous.wgsl @@ -0,0 +1,25 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct testBlockA { + x: vec2, +}; +@group(0) @binding(1) var _uniform0 : testBlockA; +struct testBlockB { + y: vec2, +}; +@group(0) @binding(2) var _uniform1 : testBlockB; +fn main(_stageOut: ptr) { + { + (*_stageOut).sk_FragColor = vec4(vec2(_uniform0.x), vec2(_uniform1.y)); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(&_stageOut); + return _stageOut; +} diff --git a/tests/sksl/shared/InterfaceBlockNamed.asm.frag b/tests/sksl/shared/InterfaceBlockNamed.asm.frag index 621062245b66..667cd7e385e2 100644 --- a/tests/sksl/shared/InterfaceBlockNamed.asm.frag +++ b/tests/sksl/shared/InterfaceBlockNamed.asm.frag @@ -1,42 +1,42 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %testBlock "testBlock" -OpMemberName %testBlock 0 "x" -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %main "main" -OpMemberDecorate %testBlock 0 Offset 0 -OpDecorate %testBlock Block -OpDecorate %3 Binding 456 -OpDecorate %3 DescriptorSet 0 -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %21 RelaxedPrecision -%float = OpTypeFloat 32 -%testBlock = OpTypeStruct %float + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %testBlock "testBlock" + OpMemberName %testBlock 0 "x" + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %main "main" + OpMemberDecorate %testBlock 0 Offset 0 + OpDecorate %testBlock Block + OpDecorate %3 Binding 456 + OpDecorate %3 DescriptorSet 0 + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %21 RelaxedPrecision + %float = OpTypeFloat 32 + %testBlock = OpTypeStruct %float %_ptr_Uniform_testBlock = OpTypePointer Uniform %testBlock -%3 = OpVariable %_ptr_Uniform_testBlock Uniform -%bool = OpTypeBool + %3 = OpVariable %_ptr_Uniform_testBlock Uniform + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%v4float = OpTypeVector %float 4 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%14 = OpTypeFunction %void -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 + %void = OpTypeVoid + %14 = OpTypeFunction %void + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 %_ptr_Uniform_float = OpTypePointer Uniform %float -%main = OpFunction %void None %14 -%15 = OpLabel -%18 = OpAccessChain %_ptr_Uniform_float %3 %int_0 -%20 = OpLoad %float %18 -%21 = OpCompositeConstruct %v4float %20 %20 %20 %20 -OpStore %sk_FragColor %21 -OpReturn -OpFunctionEnd + %main = OpFunction %void None %14 + %15 = OpLabel + %18 = OpAccessChain %_ptr_Uniform_float %3 %int_0 + %20 = OpLoad %float %18 + %21 = OpCompositeConstruct %v4float %20 %20 %20 %20 + OpStore %sk_FragColor %21 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/InterfaceBlockNamed.wgsl b/tests/sksl/shared/InterfaceBlockNamed.wgsl new file mode 100644 index 000000000000..45c412029163 --- /dev/null +++ b/tests/sksl/shared/InterfaceBlockNamed.wgsl @@ -0,0 +1,21 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct testBlock { + x: f32, +}; +@group(0) @binding(456) var test : testBlock; +fn main(_stageOut: ptr) { + { + (*_stageOut).sk_FragColor = vec4(f32(test.x)); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(&_stageOut); + return _stageOut; +} diff --git a/tests/sksl/shared/InterfaceBlockNamedArray.asm.frag b/tests/sksl/shared/InterfaceBlockNamedArray.asm.frag index 0f5372d90743..67eb19d1c2a7 100644 --- a/tests/sksl/shared/InterfaceBlockNamedArray.asm.frag +++ b/tests/sksl/shared/InterfaceBlockNamedArray.asm.frag @@ -3,51 +3,51 @@ error: SPIR-V validation error: Block decoration on target '8[%_arr_testBlock_int_2]' must be a structure type OpDecorate %_arr_testBlock_int_2 Block -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %testBlock "testBlock" -OpMemberName %testBlock 0 "x" -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %main "main" -OpMemberDecorate %testBlock 0 Offset 0 -OpDecorate %_arr_testBlock_int_2 ArrayStride 16 -OpDecorate %_arr_testBlock_int_2 Block -OpDecorate %3 Binding 123 -OpDecorate %3 DescriptorSet 0 -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %24 RelaxedPrecision -%float = OpTypeFloat 32 -%testBlock = OpTypeStruct %float -%int = OpTypeInt 32 1 -%int_2 = OpConstant %int 2 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %testBlock "testBlock" + OpMemberName %testBlock 0 "x" + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %main "main" + OpMemberDecorate %testBlock 0 Offset 0 + OpDecorate %_arr_testBlock_int_2 ArrayStride 16 + OpDecorate %_arr_testBlock_int_2 Block + OpDecorate %3 Binding 123 + OpDecorate %3 DescriptorSet 0 + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %24 RelaxedPrecision + %float = OpTypeFloat 32 + %testBlock = OpTypeStruct %float + %int = OpTypeInt 32 1 + %int_2 = OpConstant %int 2 %_arr_testBlock_int_2 = OpTypeArray %testBlock %int_2 %_ptr_Uniform__arr_testBlock_int_2 = OpTypePointer Uniform %_arr_testBlock_int_2 -%3 = OpVariable %_ptr_Uniform__arr_testBlock_int_2 Uniform -%bool = OpTypeBool + %3 = OpVariable %_ptr_Uniform__arr_testBlock_int_2 Uniform + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%v4float = OpTypeVector %float 4 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%17 = OpTypeFunction %void -%int_1 = OpConstant %int 1 -%int_0 = OpConstant %int 0 + %void = OpTypeVoid + %17 = OpTypeFunction %void + %int_1 = OpConstant %int 1 + %int_0 = OpConstant %int 0 %_ptr_Uniform_float = OpTypePointer Uniform %float -%main = OpFunction %void None %17 -%18 = OpLabel -%21 = OpAccessChain %_ptr_Uniform_float %3 %int_1 %int_0 -%23 = OpLoad %float %21 -%24 = OpCompositeConstruct %v4float %23 %23 %23 %23 -OpStore %sk_FragColor %24 -OpReturn -OpFunctionEnd + %main = OpFunction %void None %17 + %18 = OpLabel + %21 = OpAccessChain %_ptr_Uniform_float %3 %int_1 %int_0 + %23 = OpLoad %float %21 + %24 = OpCompositeConstruct %v4float %23 %23 %23 %23 + OpStore %sk_FragColor %24 + OpReturn + OpFunctionEnd 1 error diff --git a/tests/sksl/shared/InterfaceBlockNamedArray.hlsl b/tests/sksl/shared/InterfaceBlockNamedArray.hlsl index 0f5372d90743..67eb19d1c2a7 100644 --- a/tests/sksl/shared/InterfaceBlockNamedArray.hlsl +++ b/tests/sksl/shared/InterfaceBlockNamedArray.hlsl @@ -3,51 +3,51 @@ error: SPIR-V validation error: Block decoration on target '8[%_arr_testBlock_int_2]' must be a structure type OpDecorate %_arr_testBlock_int_2 Block -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %testBlock "testBlock" -OpMemberName %testBlock 0 "x" -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %main "main" -OpMemberDecorate %testBlock 0 Offset 0 -OpDecorate %_arr_testBlock_int_2 ArrayStride 16 -OpDecorate %_arr_testBlock_int_2 Block -OpDecorate %3 Binding 123 -OpDecorate %3 DescriptorSet 0 -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %24 RelaxedPrecision -%float = OpTypeFloat 32 -%testBlock = OpTypeStruct %float -%int = OpTypeInt 32 1 -%int_2 = OpConstant %int 2 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %testBlock "testBlock" + OpMemberName %testBlock 0 "x" + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %main "main" + OpMemberDecorate %testBlock 0 Offset 0 + OpDecorate %_arr_testBlock_int_2 ArrayStride 16 + OpDecorate %_arr_testBlock_int_2 Block + OpDecorate %3 Binding 123 + OpDecorate %3 DescriptorSet 0 + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %24 RelaxedPrecision + %float = OpTypeFloat 32 + %testBlock = OpTypeStruct %float + %int = OpTypeInt 32 1 + %int_2 = OpConstant %int 2 %_arr_testBlock_int_2 = OpTypeArray %testBlock %int_2 %_ptr_Uniform__arr_testBlock_int_2 = OpTypePointer Uniform %_arr_testBlock_int_2 -%3 = OpVariable %_ptr_Uniform__arr_testBlock_int_2 Uniform -%bool = OpTypeBool + %3 = OpVariable %_ptr_Uniform__arr_testBlock_int_2 Uniform + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%v4float = OpTypeVector %float 4 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%17 = OpTypeFunction %void -%int_1 = OpConstant %int 1 -%int_0 = OpConstant %int 0 + %void = OpTypeVoid + %17 = OpTypeFunction %void + %int_1 = OpConstant %int 1 + %int_0 = OpConstant %int 0 %_ptr_Uniform_float = OpTypePointer Uniform %float -%main = OpFunction %void None %17 -%18 = OpLabel -%21 = OpAccessChain %_ptr_Uniform_float %3 %int_1 %int_0 -%23 = OpLoad %float %21 -%24 = OpCompositeConstruct %v4float %23 %23 %23 %23 -OpStore %sk_FragColor %24 -OpReturn -OpFunctionEnd + %main = OpFunction %void None %17 + %18 = OpLabel + %21 = OpAccessChain %_ptr_Uniform_float %3 %int_1 %int_0 + %23 = OpLoad %float %21 + %24 = OpCompositeConstruct %v4float %23 %23 %23 %23 + OpStore %sk_FragColor %24 + OpReturn + OpFunctionEnd 1 error diff --git a/tests/sksl/shared/InterfaceBlockNamedArray.wgsl b/tests/sksl/shared/InterfaceBlockNamedArray.wgsl new file mode 100644 index 000000000000..4aa658608bec --- /dev/null +++ b/tests/sksl/shared/InterfaceBlockNamedArray.wgsl @@ -0,0 +1,30 @@ +### Compilation failed: + +error: :11:38 error: uniform storage requires that array elements are aligned to 16 bytes, but array element of type 'testBlock' has a stride of 4 bytes. Consider using the @size attribute on the last struct member. +@group(0) @binding(123) var test : array; + ^^^^ + + +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct testBlock { + x: f32, +}; +@group(0) @binding(123) var test : array; +fn main(_stageOut: ptr) { + { + (*_stageOut).sk_FragColor = vec4(f32(test[1].x)); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(&_stageOut); + return _stageOut; +} + +1 error diff --git a/tests/sksl/shared/LogicalAndShortCircuit.asm.frag b/tests/sksl/shared/LogicalAndShortCircuit.asm.frag index 0e70d06d88e3..1bada7eb420a 100644 --- a/tests/sksl/shared/LogicalAndShortCircuit.asm.frag +++ b/tests/sksl/shared/LogicalAndShortCircuit.asm.frag @@ -1,231 +1,231 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %TrueFalse_b "TrueFalse_b" -OpName %x "x" -OpName %y "y" -OpName %FalseTrue_b "FalseTrue_b" -OpName %x_0 "x" -OpName %y_0 "y" -OpName %FalseFalse_b "FalseFalse_b" -OpName %x_1 "x" -OpName %y_1 "y" -OpName %main "main" -OpName %_0_TrueTrue "_0_TrueTrue" -OpName %_2_y "_2_y" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %13 Binding 0 -OpDecorate %13 DescriptorSet 0 -OpDecorate %96 RelaxedPrecision -OpDecorate %117 RelaxedPrecision -OpDecorate %119 RelaxedPrecision -OpDecorate %120 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %TrueFalse_b "TrueFalse_b" + OpName %x "x" + OpName %y "y" + OpName %FalseTrue_b "FalseTrue_b" + OpName %x_0 "x" + OpName %y_0 "y" + OpName %FalseFalse_b "FalseFalse_b" + OpName %x_1 "x" + OpName %y_1 "y" + OpName %main "main" + OpName %_0_TrueTrue "_0_TrueTrue" + OpName %_2_y "_2_y" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %13 Binding 0 + OpDecorate %13 DescriptorSet 0 + OpDecorate %96 RelaxedPrecision + OpDecorate %117 RelaxedPrecision + OpDecorate %119 RelaxedPrecision + OpDecorate %120 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%13 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%18 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%22 = OpConstantComposite %v2float %float_0 %float_0 + %13 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %18 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %22 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%26 = OpTypeFunction %bool -%int = OpTypeInt 32 1 + %26 = OpTypeFunction %bool + %int = OpTypeInt 32 1 %_ptr_Function_int = OpTypePointer Function %int -%int_1 = OpConstant %int 1 -%false = OpConstantFalse %bool -%true = OpConstantTrue %bool -%int_3 = OpConstant %int 3 -%int_2 = OpConstant %int 2 -%84 = OpTypeFunction %v4float %_ptr_Function_v2float + %int_1 = OpConstant %int 1 + %false = OpConstantFalse %bool + %true = OpConstantTrue %bool + %int_3 = OpConstant %int 3 + %int_2 = OpConstant %int 2 + %84 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_bool = OpTypePointer Function %bool %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_0 = OpConstant %int 0 + %int_0 = OpConstant %int 0 %_entrypoint_v = OpFunction %void None %18 -%19 = OpLabel -%23 = OpVariable %_ptr_Function_v2float Function -OpStore %23 %22 -%25 = OpFunctionCall %v4float %main %23 -OpStore %sk_FragColor %25 -OpReturn -OpFunctionEnd + %19 = OpLabel + %23 = OpVariable %_ptr_Function_v2float Function + OpStore %23 %22 + %25 = OpFunctionCall %v4float %main %23 + OpStore %sk_FragColor %25 + OpReturn + OpFunctionEnd %TrueFalse_b = OpFunction %bool None %26 -%27 = OpLabel -%x = OpVariable %_ptr_Function_int Function -%y = OpVariable %_ptr_Function_int Function -OpStore %x %int_1 -OpStore %y %int_1 -OpSelectionMerge %36 None -OpBranchConditional %true %35 %36 -%35 = OpLabel -%37 = OpIAdd %int %int_1 %int_1 -OpStore %y %37 -%39 = OpIEqual %bool %37 %int_3 -OpBranch %36 -%36 = OpLabel -%40 = OpPhi %bool %false %27 %39 %35 -OpSelectionMerge %43 None -OpBranchConditional %40 %41 %42 -%41 = OpLabel -OpReturnValue %false -%42 = OpLabel -OpSelectionMerge %45 None -OpBranchConditional %true %44 %45 -%44 = OpLabel -%46 = OpLoad %int %y -%48 = OpIEqual %bool %46 %int_2 -OpBranch %45 -%45 = OpLabel -%49 = OpPhi %bool %false %42 %48 %44 -OpReturnValue %49 -%43 = OpLabel -OpUnreachable -OpFunctionEnd + %27 = OpLabel + %x = OpVariable %_ptr_Function_int Function + %y = OpVariable %_ptr_Function_int Function + OpStore %x %int_1 + OpStore %y %int_1 + OpSelectionMerge %36 None + OpBranchConditional %true %35 %36 + %35 = OpLabel + %37 = OpIAdd %int %int_1 %int_1 + OpStore %y %37 + %39 = OpIEqual %bool %37 %int_3 + OpBranch %36 + %36 = OpLabel + %40 = OpPhi %bool %false %27 %39 %35 + OpSelectionMerge %43 None + OpBranchConditional %40 %41 %42 + %41 = OpLabel + OpReturnValue %false + %42 = OpLabel + OpSelectionMerge %45 None + OpBranchConditional %true %44 %45 + %44 = OpLabel + %46 = OpLoad %int %y + %48 = OpIEqual %bool %46 %int_2 + OpBranch %45 + %45 = OpLabel + %49 = OpPhi %bool %false %42 %48 %44 + OpReturnValue %49 + %43 = OpLabel + OpUnreachable + OpFunctionEnd %FalseTrue_b = OpFunction %bool None %26 -%50 = OpLabel -%x_0 = OpVariable %_ptr_Function_int Function -%y_0 = OpVariable %_ptr_Function_int Function -OpStore %x_0 %int_1 -OpStore %y_0 %int_1 -%53 = OpIEqual %bool %int_1 %int_2 -OpSelectionMerge %55 None -OpBranchConditional %53 %54 %55 -%54 = OpLabel -%56 = OpIAdd %int %int_1 %int_1 -OpStore %y_0 %56 -%57 = OpIEqual %bool %56 %int_2 -OpBranch %55 -%55 = OpLabel -%58 = OpPhi %bool %false %50 %57 %54 -OpSelectionMerge %61 None -OpBranchConditional %58 %59 %60 -%59 = OpLabel -OpReturnValue %false -%60 = OpLabel -OpSelectionMerge %63 None -OpBranchConditional %true %62 %63 -%62 = OpLabel -%64 = OpLoad %int %y_0 -%65 = OpIEqual %bool %64 %int_1 -OpBranch %63 -%63 = OpLabel -%66 = OpPhi %bool %false %60 %65 %62 -OpReturnValue %66 -%61 = OpLabel -OpUnreachable -OpFunctionEnd + %50 = OpLabel + %x_0 = OpVariable %_ptr_Function_int Function + %y_0 = OpVariable %_ptr_Function_int Function + OpStore %x_0 %int_1 + OpStore %y_0 %int_1 + %53 = OpIEqual %bool %int_1 %int_2 + OpSelectionMerge %55 None + OpBranchConditional %53 %54 %55 + %54 = OpLabel + %56 = OpIAdd %int %int_1 %int_1 + OpStore %y_0 %56 + %57 = OpIEqual %bool %56 %int_2 + OpBranch %55 + %55 = OpLabel + %58 = OpPhi %bool %false %50 %57 %54 + OpSelectionMerge %61 None + OpBranchConditional %58 %59 %60 + %59 = OpLabel + OpReturnValue %false + %60 = OpLabel + OpSelectionMerge %63 None + OpBranchConditional %true %62 %63 + %62 = OpLabel + %64 = OpLoad %int %y_0 + %65 = OpIEqual %bool %64 %int_1 + OpBranch %63 + %63 = OpLabel + %66 = OpPhi %bool %false %60 %65 %62 + OpReturnValue %66 + %61 = OpLabel + OpUnreachable + OpFunctionEnd %FalseFalse_b = OpFunction %bool None %26 -%67 = OpLabel -%x_1 = OpVariable %_ptr_Function_int Function -%y_1 = OpVariable %_ptr_Function_int Function -OpStore %x_1 %int_1 -OpStore %y_1 %int_1 -%70 = OpIEqual %bool %int_1 %int_2 -OpSelectionMerge %72 None -OpBranchConditional %70 %71 %72 -%71 = OpLabel -%73 = OpIAdd %int %int_1 %int_1 -OpStore %y_1 %73 -%74 = OpIEqual %bool %73 %int_3 -OpBranch %72 -%72 = OpLabel -%75 = OpPhi %bool %false %67 %74 %71 -OpSelectionMerge %78 None -OpBranchConditional %75 %76 %77 -%76 = OpLabel -OpReturnValue %false -%77 = OpLabel -OpSelectionMerge %80 None -OpBranchConditional %true %79 %80 -%79 = OpLabel -%81 = OpLoad %int %y_1 -%82 = OpIEqual %bool %81 %int_1 -OpBranch %80 -%80 = OpLabel -%83 = OpPhi %bool %false %77 %82 %79 -OpReturnValue %83 -%78 = OpLabel -OpUnreachable -OpFunctionEnd -%main = OpFunction %v4float None %84 -%85 = OpFunctionParameter %_ptr_Function_v2float -%86 = OpLabel + %67 = OpLabel + %x_1 = OpVariable %_ptr_Function_int Function + %y_1 = OpVariable %_ptr_Function_int Function + OpStore %x_1 %int_1 + OpStore %y_1 %int_1 + %70 = OpIEqual %bool %int_1 %int_2 + OpSelectionMerge %72 None + OpBranchConditional %70 %71 %72 + %71 = OpLabel + %73 = OpIAdd %int %int_1 %int_1 + OpStore %y_1 %73 + %74 = OpIEqual %bool %73 %int_3 + OpBranch %72 + %72 = OpLabel + %75 = OpPhi %bool %false %67 %74 %71 + OpSelectionMerge %78 None + OpBranchConditional %75 %76 %77 + %76 = OpLabel + OpReturnValue %false + %77 = OpLabel + OpSelectionMerge %80 None + OpBranchConditional %true %79 %80 + %79 = OpLabel + %81 = OpLoad %int %y_1 + %82 = OpIEqual %bool %81 %int_1 + OpBranch %80 + %80 = OpLabel + %83 = OpPhi %bool %false %77 %82 %79 + OpReturnValue %83 + %78 = OpLabel + OpUnreachable + OpFunctionEnd + %main = OpFunction %v4float None %84 + %85 = OpFunctionParameter %_ptr_Function_v2float + %86 = OpLabel %_0_TrueTrue = OpVariable %_ptr_Function_bool Function -%_2_y = OpVariable %_ptr_Function_int Function -%109 = OpVariable %_ptr_Function_v4float Function -OpStore %_2_y %int_1 -%90 = OpIAdd %int %int_1 %int_1 -OpStore %_2_y %90 -%91 = OpIEqual %bool %90 %int_2 -OpSelectionMerge %94 None -OpBranchConditional %91 %92 %93 -%92 = OpLabel -%95 = OpIEqual %bool %90 %int_2 -OpStore %_0_TrueTrue %95 -OpBranch %94 -%93 = OpLabel -OpStore %_0_TrueTrue %false -OpBranch %94 -%94 = OpLabel -%96 = OpLoad %bool %_0_TrueTrue -OpSelectionMerge %98 None -OpBranchConditional %96 %97 %98 -%97 = OpLabel -%99 = OpFunctionCall %bool %TrueFalse_b -OpBranch %98 -%98 = OpLabel -%100 = OpPhi %bool %false %94 %99 %97 -OpSelectionMerge %102 None -OpBranchConditional %100 %101 %102 -%101 = OpLabel -%103 = OpFunctionCall %bool %FalseTrue_b -OpBranch %102 -%102 = OpLabel -%104 = OpPhi %bool %false %98 %103 %101 -OpSelectionMerge %106 None -OpBranchConditional %104 %105 %106 -%105 = OpLabel -%107 = OpFunctionCall %bool %FalseFalse_b -OpBranch %106 -%106 = OpLabel -%108 = OpPhi %bool %false %102 %107 %105 -OpSelectionMerge %113 None -OpBranchConditional %108 %111 %112 -%111 = OpLabel -%114 = OpAccessChain %_ptr_Uniform_v4float %13 %int_0 -%117 = OpLoad %v4float %114 -OpStore %109 %117 -OpBranch %113 -%112 = OpLabel -%118 = OpAccessChain %_ptr_Uniform_v4float %13 %int_1 -%119 = OpLoad %v4float %118 -OpStore %109 %119 -OpBranch %113 -%113 = OpLabel -%120 = OpLoad %v4float %109 -OpReturnValue %120 -OpFunctionEnd + %_2_y = OpVariable %_ptr_Function_int Function + %109 = OpVariable %_ptr_Function_v4float Function + OpStore %_2_y %int_1 + %90 = OpIAdd %int %int_1 %int_1 + OpStore %_2_y %90 + %91 = OpIEqual %bool %90 %int_2 + OpSelectionMerge %94 None + OpBranchConditional %91 %92 %93 + %92 = OpLabel + %95 = OpIEqual %bool %90 %int_2 + OpStore %_0_TrueTrue %95 + OpBranch %94 + %93 = OpLabel + OpStore %_0_TrueTrue %false + OpBranch %94 + %94 = OpLabel + %96 = OpLoad %bool %_0_TrueTrue + OpSelectionMerge %98 None + OpBranchConditional %96 %97 %98 + %97 = OpLabel + %99 = OpFunctionCall %bool %TrueFalse_b + OpBranch %98 + %98 = OpLabel + %100 = OpPhi %bool %false %94 %99 %97 + OpSelectionMerge %102 None + OpBranchConditional %100 %101 %102 + %101 = OpLabel + %103 = OpFunctionCall %bool %FalseTrue_b + OpBranch %102 + %102 = OpLabel + %104 = OpPhi %bool %false %98 %103 %101 + OpSelectionMerge %106 None + OpBranchConditional %104 %105 %106 + %105 = OpLabel + %107 = OpFunctionCall %bool %FalseFalse_b + OpBranch %106 + %106 = OpLabel + %108 = OpPhi %bool %false %102 %107 %105 + OpSelectionMerge %113 None + OpBranchConditional %108 %111 %112 + %111 = OpLabel + %114 = OpAccessChain %_ptr_Uniform_v4float %13 %int_0 + %117 = OpLoad %v4float %114 + OpStore %109 %117 + OpBranch %113 + %112 = OpLabel + %118 = OpAccessChain %_ptr_Uniform_v4float %13 %int_1 + %119 = OpLoad %v4float %118 + OpStore %109 %119 + OpBranch %113 + %113 = OpLabel + %120 = OpLoad %v4float %109 + OpReturnValue %120 + OpFunctionEnd diff --git a/tests/sksl/shared/LogicalAndShortCircuit.skrp b/tests/sksl/shared/LogicalAndShortCircuit.skrp index 28458bc60f55..931548704402 100644 --- a/tests/sksl/shared/LogicalAndShortCircuit.skrp +++ b/tests/sksl/shared/LogicalAndShortCircuit.skrp @@ -1,7 +1,7 @@ +116 instructions + [immutable slots] -x = 0x00000001 (1.401298e-45) -x₁ = 0x00000001 (1.401298e-45) -x₂ = 0x00000001 (1.401298e-45) +i0 = 0x00000001 (1.401298e-45) store_src_rg v0..1 = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -26,11 +26,11 @@ store_condition_mask $24 = CondMask copy_slot_unmasked $25 = _0_TrueTrue copy_constant $19 = 0 merge_condition_mask CondMask = $24 & $25 -branch_if_no_lanes_active branch_if_no_lanes_active +30 (label 3 at #54) +branch_if_no_lanes_active branch_if_no_lanes_active +29 (label 3 at #53) copy_constant y = 0x00000001 (1.401298e-45) store_condition_mask $20 = CondMask store_condition_mask $26 = CondMask -copy_slot_unmasked $27 = x +copy_constant $27 = 0x00000001 (1.401298e-45) cmpeq_imm_int $27 = equal($27, 0x00000001) copy_constant $21 = 0 merge_condition_mask CondMask = $26 & $27 @@ -41,12 +41,11 @@ copy_slot_masked y = Mask($22) cmpeq_imm_int $22 = equal($22, 0x00000003) copy_slot_masked $21 = Mask($22) label label 0x00000005 -load_condition_mask CondMask = $26 merge_condition_mask CondMask = $20 & $21 copy_constant $22 = 0 copy_slot_masked [TrueFalse].result = Mask($22) merge_inv_condition_mask CondMask = $20 & ~$21 -copy_slot_unmasked $22 = x +copy_constant $22 = 0x00000001 (1.401298e-45) cmpeq_imm_int $22 = equal($22, 0x00000001) copy_slot_unmasked $23 = y cmpeq_imm_int $23 = equal($23, 0x00000002) @@ -60,27 +59,26 @@ label label 0x00000003 load_condition_mask CondMask = $24 copy_constant $13 = 0 merge_condition_mask CondMask = $18 & $19 -branch_if_no_lanes_active branch_if_no_lanes_active +30 (label 2 at #88) +branch_if_no_lanes_active branch_if_no_lanes_active +29 (label 2 at #86) copy_constant y₁ = 0x00000001 (1.401298e-45) store_condition_mask $14 = CondMask store_condition_mask $24 = CondMask -copy_slot_unmasked $25 = x₁ +copy_constant $25 = 0x00000001 (1.401298e-45) cmpeq_imm_int $25 = equal($25, 0x00000002) copy_constant $15 = 0 merge_condition_mask CondMask = $24 & $25 -branch_if_no_lanes_active branch_if_no_lanes_active +6 (label 7 at #72) +branch_if_no_lanes_active branch_if_no_lanes_active +6 (label 7 at #71) copy_slot_unmasked $16 = y₁ add_imm_int $16 += 0x00000001 copy_slot_masked y₁ = Mask($16) cmpeq_imm_int $16 = equal($16, 0x00000002) copy_slot_masked $15 = Mask($16) label label 0x00000007 -load_condition_mask CondMask = $24 merge_condition_mask CondMask = $14 & $15 copy_constant $16 = 0 copy_slot_masked [FalseTrue].result = Mask($16) merge_inv_condition_mask CondMask = $14 & ~$15 -copy_slot_unmasked $16 = x₁ +copy_constant $16 = 0x00000001 (1.401298e-45) cmpeq_imm_int $16 = equal($16, 0x00000001) copy_slot_unmasked $17 = y₁ cmpeq_imm_int $17 = equal($17, 0x00000001) @@ -94,27 +92,26 @@ label label 0x00000002 load_condition_mask CondMask = $18 copy_constant $0 = 0 merge_condition_mask CondMask = $12 & $13 -branch_if_no_lanes_active branch_if_no_lanes_active +30 (label 1 at #122) +branch_if_no_lanes_active branch_if_no_lanes_active +29 (label 1 at #119) copy_constant y₂ = 0x00000001 (1.401298e-45) store_condition_mask $1 = CondMask store_condition_mask $18 = CondMask -copy_slot_unmasked $19 = x₂ +copy_constant $19 = 0x00000001 (1.401298e-45) cmpeq_imm_int $19 = equal($19, 0x00000002) copy_constant $2 = 0 merge_condition_mask CondMask = $18 & $19 -branch_if_no_lanes_active branch_if_no_lanes_active +6 (label 9 at #106) +branch_if_no_lanes_active branch_if_no_lanes_active +6 (label 9 at #104) copy_slot_unmasked $3 = y₂ add_imm_int $3 += 0x00000001 copy_slot_masked y₂ = Mask($3) cmpeq_imm_int $3 = equal($3, 0x00000003) copy_slot_masked $2 = Mask($3) label label 0x00000009 -load_condition_mask CondMask = $18 merge_condition_mask CondMask = $1 & $2 copy_constant $3 = 0 copy_slot_masked [FalseFalse].result = Mask($3) merge_inv_condition_mask CondMask = $1 & ~$2 -copy_slot_unmasked $3 = x₂ +copy_constant $3 = 0x00000001 (1.401298e-45) cmpeq_imm_int $3 = equal($3, 0x00000001) copy_slot_unmasked $4 = y₂ cmpeq_imm_int $4 = equal($4, 0x00000001) diff --git a/tests/sksl/shared/LogicalAndShortCircuit.wgsl b/tests/sksl/shared/LogicalAndShortCircuit.wgsl index d48dd8439c87..48e97243982d 100644 --- a/tests/sksl/shared/LogicalAndShortCircuit.wgsl +++ b/tests/sksl/shared/LogicalAndShortCircuit.wgsl @@ -1,19 +1,20 @@ /* -:34:3 warning: code is unreachable +:35:3 warning: code is unreachable return bool(); ^^^^^^ -:57:3 warning: code is unreachable +:58:3 warning: code is unreachable return bool(); ^^^^^^ -:80:3 warning: code is unreachable +:81:3 warning: code is unreachable return bool(); ^^^^^^ */ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -33,17 +34,17 @@ fn TrueFalse_b() -> bool { var _skTemp0: bool; if x == 1 { y = y + 1; - _skTemp0 = y == 3; + _skTemp0 = (y == 3); } else { _skTemp0 = false; } - if (_skTemp0) { + if _skTemp0 { { return false; } } else { { - return x == 1 && y == 2; + return (x == 1) && (y == 2); } } } @@ -56,17 +57,17 @@ fn FalseTrue_b() -> bool { var _skTemp1: bool; if x == 2 { y = y + 1; - _skTemp1 = y == 2; + _skTemp1 = (y == 2); } else { _skTemp1 = false; } - if (_skTemp1) { + if _skTemp1 { { return false; } } else { { - return x == 1 && y == 1; + return (x == 1) && (y == 1); } } } @@ -79,17 +80,17 @@ fn FalseFalse_b() -> bool { var _skTemp2: bool; if x == 2 { y = y + 1; - _skTemp2 = y == 3; + _skTemp2 = (y == 3); } else { _skTemp2 = false; } - if (_skTemp2) { + if _skTemp2 { { return false; } } else { { - return x == 1 && y == 1; + return (x == 1) && (y == 1); } } } @@ -100,9 +101,9 @@ fn main(_skParam0: vec2) -> vec4 { var _0_TrueTrue: bool; var _2_y: i32 = 1; _2_y = _2_y + 1; - if (_2_y == 2) { + if _2_y == 2 { { - _0_TrueTrue = _2_y == 2; + _0_TrueTrue = (_2_y == 2); } } else { { diff --git a/tests/sksl/shared/LogicalOrShortCircuit.asm.frag b/tests/sksl/shared/LogicalOrShortCircuit.asm.frag index 43df203ec007..34fbdd3b9f66 100644 --- a/tests/sksl/shared/LogicalOrShortCircuit.asm.frag +++ b/tests/sksl/shared/LogicalOrShortCircuit.asm.frag @@ -1,217 +1,217 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %TrueFalse_b "TrueFalse_b" -OpName %x "x" -OpName %y "y" -OpName %FalseTrue_b "FalseTrue_b" -OpName %x_0 "x" -OpName %y_0 "y" -OpName %FalseFalse_b "FalseFalse_b" -OpName %x_1 "x" -OpName %y_1 "y" -OpName %main "main" -OpName %_0_TrueTrue "_0_TrueTrue" -OpName %_2_y "_2_y" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %13 Binding 0 -OpDecorate %13 DescriptorSet 0 -OpDecorate %110 RelaxedPrecision -OpDecorate %112 RelaxedPrecision -OpDecorate %113 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %TrueFalse_b "TrueFalse_b" + OpName %x "x" + OpName %y "y" + OpName %FalseTrue_b "FalseTrue_b" + OpName %x_0 "x" + OpName %y_0 "y" + OpName %FalseFalse_b "FalseFalse_b" + OpName %x_1 "x" + OpName %y_1 "y" + OpName %main "main" + OpName %_0_TrueTrue "_0_TrueTrue" + OpName %_2_y "_2_y" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %13 Binding 0 + OpDecorate %13 DescriptorSet 0 + OpDecorate %110 RelaxedPrecision + OpDecorate %112 RelaxedPrecision + OpDecorate %113 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%13 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%18 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%22 = OpConstantComposite %v2float %float_0 %float_0 + %13 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %18 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %22 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%26 = OpTypeFunction %bool -%int = OpTypeInt 32 1 + %26 = OpTypeFunction %bool + %int = OpTypeInt 32 1 %_ptr_Function_int = OpTypePointer Function %int -%int_1 = OpConstant %int 1 -%true = OpConstantTrue %bool -%int_3 = OpConstant %int 3 -%false = OpConstantFalse %bool -%int_2 = OpConstant %int 2 -%84 = OpTypeFunction %v4float %_ptr_Function_v2float + %int_1 = OpConstant %int 1 + %true = OpConstantTrue %bool + %int_3 = OpConstant %int 3 + %false = OpConstantFalse %bool + %int_2 = OpConstant %int 2 + %84 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_bool = OpTypePointer Function %bool %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_0 = OpConstant %int 0 + %int_0 = OpConstant %int 0 %_entrypoint_v = OpFunction %void None %18 -%19 = OpLabel -%23 = OpVariable %_ptr_Function_v2float Function -OpStore %23 %22 -%25 = OpFunctionCall %v4float %main %23 -OpStore %sk_FragColor %25 -OpReturn -OpFunctionEnd + %19 = OpLabel + %23 = OpVariable %_ptr_Function_v2float Function + OpStore %23 %22 + %25 = OpFunctionCall %v4float %main %23 + OpStore %sk_FragColor %25 + OpReturn + OpFunctionEnd %TrueFalse_b = OpFunction %bool None %26 -%27 = OpLabel -%x = OpVariable %_ptr_Function_int Function -%y = OpVariable %_ptr_Function_int Function -OpStore %x %int_1 -OpStore %y %int_1 -OpSelectionMerge %35 None -OpBranchConditional %true %35 %34 -%34 = OpLabel -%36 = OpIAdd %int %int_1 %int_1 -OpStore %y %36 -%38 = OpIEqual %bool %36 %int_3 -OpBranch %35 -%35 = OpLabel -%39 = OpPhi %bool %true %27 %38 %34 -OpSelectionMerge %42 None -OpBranchConditional %39 %40 %41 -%40 = OpLabel -OpSelectionMerge %45 None -OpBranchConditional %true %44 %45 -%44 = OpLabel -%46 = OpLoad %int %y -%47 = OpIEqual %bool %46 %int_1 -OpBranch %45 -%45 = OpLabel -%48 = OpPhi %bool %false %40 %47 %44 -OpReturnValue %48 -%41 = OpLabel -OpReturnValue %false -%42 = OpLabel -OpUnreachable -OpFunctionEnd + %27 = OpLabel + %x = OpVariable %_ptr_Function_int Function + %y = OpVariable %_ptr_Function_int Function + OpStore %x %int_1 + OpStore %y %int_1 + OpSelectionMerge %35 None + OpBranchConditional %true %35 %34 + %34 = OpLabel + %36 = OpIAdd %int %int_1 %int_1 + OpStore %y %36 + %38 = OpIEqual %bool %36 %int_3 + OpBranch %35 + %35 = OpLabel + %39 = OpPhi %bool %true %27 %38 %34 + OpSelectionMerge %42 None + OpBranchConditional %39 %40 %41 + %40 = OpLabel + OpSelectionMerge %45 None + OpBranchConditional %true %44 %45 + %44 = OpLabel + %46 = OpLoad %int %y + %47 = OpIEqual %bool %46 %int_1 + OpBranch %45 + %45 = OpLabel + %48 = OpPhi %bool %false %40 %47 %44 + OpReturnValue %48 + %41 = OpLabel + OpReturnValue %false + %42 = OpLabel + OpUnreachable + OpFunctionEnd %FalseTrue_b = OpFunction %bool None %26 -%49 = OpLabel -%x_0 = OpVariable %_ptr_Function_int Function -%y_0 = OpVariable %_ptr_Function_int Function -OpStore %x_0 %int_1 -OpStore %y_0 %int_1 -%53 = OpIEqual %bool %int_1 %int_2 -OpSelectionMerge %55 None -OpBranchConditional %53 %55 %54 -%54 = OpLabel -%56 = OpIAdd %int %int_1 %int_1 -OpStore %y_0 %56 -%57 = OpIEqual %bool %56 %int_2 -OpBranch %55 -%55 = OpLabel -%58 = OpPhi %bool %true %49 %57 %54 -OpSelectionMerge %61 None -OpBranchConditional %58 %59 %60 -%59 = OpLabel -OpSelectionMerge %63 None -OpBranchConditional %true %62 %63 -%62 = OpLabel -%64 = OpLoad %int %y_0 -%65 = OpIEqual %bool %64 %int_2 -OpBranch %63 -%63 = OpLabel -%66 = OpPhi %bool %false %59 %65 %62 -OpReturnValue %66 -%60 = OpLabel -OpReturnValue %false -%61 = OpLabel -OpUnreachable -OpFunctionEnd + %49 = OpLabel + %x_0 = OpVariable %_ptr_Function_int Function + %y_0 = OpVariable %_ptr_Function_int Function + OpStore %x_0 %int_1 + OpStore %y_0 %int_1 + %53 = OpIEqual %bool %int_1 %int_2 + OpSelectionMerge %55 None + OpBranchConditional %53 %55 %54 + %54 = OpLabel + %56 = OpIAdd %int %int_1 %int_1 + OpStore %y_0 %56 + %57 = OpIEqual %bool %56 %int_2 + OpBranch %55 + %55 = OpLabel + %58 = OpPhi %bool %true %49 %57 %54 + OpSelectionMerge %61 None + OpBranchConditional %58 %59 %60 + %59 = OpLabel + OpSelectionMerge %63 None + OpBranchConditional %true %62 %63 + %62 = OpLabel + %64 = OpLoad %int %y_0 + %65 = OpIEqual %bool %64 %int_2 + OpBranch %63 + %63 = OpLabel + %66 = OpPhi %bool %false %59 %65 %62 + OpReturnValue %66 + %60 = OpLabel + OpReturnValue %false + %61 = OpLabel + OpUnreachable + OpFunctionEnd %FalseFalse_b = OpFunction %bool None %26 -%67 = OpLabel -%x_1 = OpVariable %_ptr_Function_int Function -%y_1 = OpVariable %_ptr_Function_int Function -OpStore %x_1 %int_1 -OpStore %y_1 %int_1 -%70 = OpIEqual %bool %int_1 %int_2 -OpSelectionMerge %72 None -OpBranchConditional %70 %72 %71 -%71 = OpLabel -%73 = OpIAdd %int %int_1 %int_1 -OpStore %y_1 %73 -%74 = OpIEqual %bool %73 %int_3 -OpBranch %72 -%72 = OpLabel -%75 = OpPhi %bool %true %67 %74 %71 -OpSelectionMerge %78 None -OpBranchConditional %75 %76 %77 -%76 = OpLabel -OpReturnValue %false -%77 = OpLabel -OpSelectionMerge %80 None -OpBranchConditional %true %79 %80 -%79 = OpLabel -%81 = OpLoad %int %y_1 -%82 = OpIEqual %bool %81 %int_2 -OpBranch %80 -%80 = OpLabel -%83 = OpPhi %bool %false %77 %82 %79 -OpReturnValue %83 -%78 = OpLabel -OpUnreachable -OpFunctionEnd -%main = OpFunction %v4float None %84 -%85 = OpFunctionParameter %_ptr_Function_v2float -%86 = OpLabel + %67 = OpLabel + %x_1 = OpVariable %_ptr_Function_int Function + %y_1 = OpVariable %_ptr_Function_int Function + OpStore %x_1 %int_1 + OpStore %y_1 %int_1 + %70 = OpIEqual %bool %int_1 %int_2 + OpSelectionMerge %72 None + OpBranchConditional %70 %72 %71 + %71 = OpLabel + %73 = OpIAdd %int %int_1 %int_1 + OpStore %y_1 %73 + %74 = OpIEqual %bool %73 %int_3 + OpBranch %72 + %72 = OpLabel + %75 = OpPhi %bool %true %67 %74 %71 + OpSelectionMerge %78 None + OpBranchConditional %75 %76 %77 + %76 = OpLabel + OpReturnValue %false + %77 = OpLabel + OpSelectionMerge %80 None + OpBranchConditional %true %79 %80 + %79 = OpLabel + %81 = OpLoad %int %y_1 + %82 = OpIEqual %bool %81 %int_2 + OpBranch %80 + %80 = OpLabel + %83 = OpPhi %bool %false %77 %82 %79 + OpReturnValue %83 + %78 = OpLabel + OpUnreachable + OpFunctionEnd + %main = OpFunction %v4float None %84 + %85 = OpFunctionParameter %_ptr_Function_v2float + %86 = OpLabel %_0_TrueTrue = OpVariable %_ptr_Function_bool Function -%_2_y = OpVariable %_ptr_Function_int Function -%102 = OpVariable %_ptr_Function_v4float Function -OpStore %_2_y %int_1 -OpStore %_0_TrueTrue %true -OpSelectionMerge %91 None -OpBranchConditional %true %90 %91 -%90 = OpLabel -%92 = OpFunctionCall %bool %TrueFalse_b -OpBranch %91 -%91 = OpLabel -%93 = OpPhi %bool %false %86 %92 %90 -OpSelectionMerge %95 None -OpBranchConditional %93 %94 %95 -%94 = OpLabel -%96 = OpFunctionCall %bool %FalseTrue_b -OpBranch %95 -%95 = OpLabel -%97 = OpPhi %bool %false %91 %96 %94 -OpSelectionMerge %99 None -OpBranchConditional %97 %98 %99 -%98 = OpLabel -%100 = OpFunctionCall %bool %FalseFalse_b -OpBranch %99 -%99 = OpLabel -%101 = OpPhi %bool %false %95 %100 %98 -OpSelectionMerge %106 None -OpBranchConditional %101 %104 %105 -%104 = OpLabel -%107 = OpAccessChain %_ptr_Uniform_v4float %13 %int_0 -%110 = OpLoad %v4float %107 -OpStore %102 %110 -OpBranch %106 -%105 = OpLabel -%111 = OpAccessChain %_ptr_Uniform_v4float %13 %int_1 -%112 = OpLoad %v4float %111 -OpStore %102 %112 -OpBranch %106 -%106 = OpLabel -%113 = OpLoad %v4float %102 -OpReturnValue %113 -OpFunctionEnd + %_2_y = OpVariable %_ptr_Function_int Function + %102 = OpVariable %_ptr_Function_v4float Function + OpStore %_2_y %int_1 + OpStore %_0_TrueTrue %true + OpSelectionMerge %91 None + OpBranchConditional %true %90 %91 + %90 = OpLabel + %92 = OpFunctionCall %bool %TrueFalse_b + OpBranch %91 + %91 = OpLabel + %93 = OpPhi %bool %false %86 %92 %90 + OpSelectionMerge %95 None + OpBranchConditional %93 %94 %95 + %94 = OpLabel + %96 = OpFunctionCall %bool %FalseTrue_b + OpBranch %95 + %95 = OpLabel + %97 = OpPhi %bool %false %91 %96 %94 + OpSelectionMerge %99 None + OpBranchConditional %97 %98 %99 + %98 = OpLabel + %100 = OpFunctionCall %bool %FalseFalse_b + OpBranch %99 + %99 = OpLabel + %101 = OpPhi %bool %false %95 %100 %98 + OpSelectionMerge %106 None + OpBranchConditional %101 %104 %105 + %104 = OpLabel + %107 = OpAccessChain %_ptr_Uniform_v4float %13 %int_0 + %110 = OpLoad %v4float %107 + OpStore %102 %110 + OpBranch %106 + %105 = OpLabel + %111 = OpAccessChain %_ptr_Uniform_v4float %13 %int_1 + %112 = OpLoad %v4float %111 + OpStore %102 %112 + OpBranch %106 + %106 = OpLabel + %113 = OpLoad %v4float %102 + OpReturnValue %113 + OpFunctionEnd diff --git a/tests/sksl/shared/LogicalOrShortCircuit.skrp b/tests/sksl/shared/LogicalOrShortCircuit.skrp index e86d3ebd85e2..bc8aae2a5f8d 100644 --- a/tests/sksl/shared/LogicalOrShortCircuit.skrp +++ b/tests/sksl/shared/LogicalOrShortCircuit.skrp @@ -1,13 +1,12 @@ +105 instructions + [immutable slots] -_2_y = 0x00000001 (1.401298e-45) -x = 0x00000001 (1.401298e-45) -x₁ = 0x00000001 (1.401298e-45) -x₂ = 0x00000001 (1.401298e-45) +i0 = 0x00000001 (1.401298e-45) store_src_rg v0..1 = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_constant _0_TrueTrue = 0 -copy_slot_unmasked $0 = _2_y +copy_constant $0 = 0x00000001 (1.401298e-45) cmpeq_imm_int $0 = equal($0, 0x00000001) copy_slot_unmasked _0_TrueTrue = $0 store_condition_mask $12 = CondMask @@ -16,11 +15,11 @@ store_condition_mask $24 = CondMask copy_slot_unmasked $25 = _0_TrueTrue copy_constant $19 = 0 merge_condition_mask CondMask = $24 & $25 -branch_if_no_lanes_active branch_if_no_lanes_active +29 (label 3 at #42) +branch_if_no_lanes_active branch_if_no_lanes_active +28 (label 3 at #41) copy_constant y = 0x00000001 (1.401298e-45) store_condition_mask $20 = CondMask store_condition_mask $26 = CondMask -copy_slot_unmasked $27 = x +copy_constant $27 = 0x00000001 (1.401298e-45) cmpeq_imm_int $27 = equal($27, 0x00000001) merge_condition_mask CondMask = $26 & $27 copy_constant $21 = 0xFFFFFFFF @@ -30,9 +29,8 @@ add_imm_int $22 += 0x00000001 copy_slot_masked y = Mask($22) cmpeq_imm_int $22 = equal($22, 0x00000003) copy_slot_masked $21 = Mask($22) -load_condition_mask CondMask = $26 merge_condition_mask CondMask = $20 & $21 -copy_slot_unmasked $22 = x +copy_constant $22 = 0x00000001 (1.401298e-45) cmpeq_imm_int $22 = equal($22, 0x00000001) copy_slot_unmasked $23 = y cmpeq_imm_int $23 = equal($23, 0x00000001) @@ -49,11 +47,11 @@ label label 0x00000003 load_condition_mask CondMask = $24 copy_constant $13 = 0 merge_condition_mask CondMask = $18 & $19 -branch_if_no_lanes_active branch_if_no_lanes_active +29 (label 2 at #75) +branch_if_no_lanes_active branch_if_no_lanes_active +28 (label 2 at #73) copy_constant y₁ = 0x00000001 (1.401298e-45) store_condition_mask $14 = CondMask store_condition_mask $24 = CondMask -copy_slot_unmasked $25 = x₁ +copy_constant $25 = 0x00000001 (1.401298e-45) cmpeq_imm_int $25 = equal($25, 0x00000002) merge_condition_mask CondMask = $24 & $25 copy_constant $15 = 0xFFFFFFFF @@ -63,9 +61,8 @@ add_imm_int $16 += 0x00000001 copy_slot_masked y₁ = Mask($16) cmpeq_imm_int $16 = equal($16, 0x00000002) copy_slot_masked $15 = Mask($16) -load_condition_mask CondMask = $24 merge_condition_mask CondMask = $14 & $15 -copy_slot_unmasked $16 = x₁ +copy_constant $16 = 0x00000001 (1.401298e-45) cmpeq_imm_int $16 = equal($16, 0x00000001) copy_slot_unmasked $17 = y₁ cmpeq_imm_int $17 = equal($17, 0x00000002) @@ -82,11 +79,11 @@ label label 0x00000002 load_condition_mask CondMask = $18 copy_constant $0 = 0 merge_condition_mask CondMask = $12 & $13 -branch_if_no_lanes_active branch_if_no_lanes_active +29 (label 1 at #108) +branch_if_no_lanes_active branch_if_no_lanes_active +28 (label 1 at #105) copy_constant y₂ = 0x00000001 (1.401298e-45) store_condition_mask $1 = CondMask store_condition_mask $18 = CondMask -copy_slot_unmasked $19 = x₂ +copy_constant $19 = 0x00000001 (1.401298e-45) cmpeq_imm_int $19 = equal($19, 0x00000002) merge_condition_mask CondMask = $18 & $19 copy_constant $2 = 0xFFFFFFFF @@ -96,12 +93,11 @@ add_imm_int $3 += 0x00000001 copy_slot_masked y₂ = Mask($3) cmpeq_imm_int $3 = equal($3, 0x00000003) copy_slot_masked $2 = Mask($3) -load_condition_mask CondMask = $18 merge_condition_mask CondMask = $1 & $2 copy_constant $3 = 0 copy_slot_masked [FalseFalse].result = Mask($3) merge_inv_condition_mask CondMask = $1 & ~$2 -copy_slot_unmasked $3 = x₂ +copy_constant $3 = 0x00000001 (1.401298e-45) cmpeq_imm_int $3 = equal($3, 0x00000001) copy_slot_unmasked $4 = y₂ cmpeq_imm_int $4 = equal($4, 0x00000002) diff --git a/tests/sksl/shared/LogicalOrShortCircuit.wgsl b/tests/sksl/shared/LogicalOrShortCircuit.wgsl index 763d15aef658..acc10eb331b2 100644 --- a/tests/sksl/shared/LogicalOrShortCircuit.wgsl +++ b/tests/sksl/shared/LogicalOrShortCircuit.wgsl @@ -1,19 +1,20 @@ /* -:34:3 warning: code is unreachable +:35:3 warning: code is unreachable return bool(); ^^^^^^ -:57:3 warning: code is unreachable +:58:3 warning: code is unreachable return bool(); ^^^^^^ -:80:3 warning: code is unreachable +:81:3 warning: code is unreachable return bool(); ^^^^^^ */ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -35,11 +36,11 @@ fn TrueFalse_b() -> bool { _skTemp0 = true; } else { y = y + 1; - _skTemp0 = y == 3; + _skTemp0 = (y == 3); } - if (_skTemp0) { + if _skTemp0 { { - return x == 1 && y == 1; + return (x == 1) && (y == 1); } } else { { @@ -58,11 +59,11 @@ fn FalseTrue_b() -> bool { _skTemp1 = true; } else { y = y + 1; - _skTemp1 = y == 2; + _skTemp1 = (y == 2); } - if (_skTemp1) { + if _skTemp1 { { - return x == 1 && y == 2; + return (x == 1) && (y == 2); } } else { { @@ -81,15 +82,15 @@ fn FalseFalse_b() -> bool { _skTemp2 = true; } else { y = y + 1; - _skTemp2 = y == 3; + _skTemp2 = (y == 3); } - if (_skTemp2) { + if _skTemp2 { { return false; } } else { { - return x == 1 && y == 2; + return (x == 1) && (y == 2); } } } @@ -100,7 +101,7 @@ fn main(_skParam0: vec2) -> vec4 { var _0_TrueTrue: bool; var _2_y: i32 = 1; { - _0_TrueTrue = _2_y == 1; + _0_TrueTrue = (_2_y == 1); } var _skTemp3: vec4; var _skTemp4: bool; diff --git a/tests/sksl/shared/Matrices.asm.frag b/tests/sksl/shared/Matrices.asm.frag index 1dee6518f5ad..79e9e469c9df 100644 --- a/tests/sksl/shared/Matrices.asm.frag +++ b/tests/sksl/shared/Matrices.asm.frag @@ -1,523 +1,523 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %test_half_b "test_half_b" -OpName %ok "ok" -OpName %m1 "m1" -OpName %m3 "m3" -OpName %m4 "m4" -OpName %m5 "m5" -OpName %m7 "m7" -OpName %m9 "m9" -OpName %m10 "m10" -OpName %m11 "m11" -OpName %test_comma_b "test_comma_b" -OpName %x "x" -OpName %y "y" -OpName %main "main" -OpName %_0_ok "_0_ok" -OpName %_1_m1 "_1_m1" -OpName %_2_m3 "_2_m3" -OpName %_3_m4 "_3_m4" -OpName %_4_m5 "_4_m5" -OpName %_7_m10 "_7_m10" -OpName %_8_m11 "_8_m11" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %12 Binding 0 -OpDecorate %12 DescriptorSet 0 -OpDecorate %m1 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %m3 RelaxedPrecision -OpDecorate %53 RelaxedPrecision -OpDecorate %55 RelaxedPrecision -OpDecorate %m4 RelaxedPrecision -OpDecorate %66 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %82 RelaxedPrecision -OpDecorate %84 RelaxedPrecision -OpDecorate %85 RelaxedPrecision -OpDecorate %m5 RelaxedPrecision -OpDecorate %93 RelaxedPrecision -OpDecorate %94 RelaxedPrecision -OpDecorate %95 RelaxedPrecision -OpDecorate %96 RelaxedPrecision -OpDecorate %97 RelaxedPrecision -OpDecorate %103 RelaxedPrecision -OpDecorate %105 RelaxedPrecision -OpDecorate %109 RelaxedPrecision -OpDecorate %110 RelaxedPrecision -OpDecorate %111 RelaxedPrecision -OpDecorate %119 RelaxedPrecision -OpDecorate %121 RelaxedPrecision -OpDecorate %m7 RelaxedPrecision -OpDecorate %132 RelaxedPrecision -OpDecorate %134 RelaxedPrecision -OpDecorate %m9 RelaxedPrecision -OpDecorate %150 RelaxedPrecision -OpDecorate %152 RelaxedPrecision -OpDecorate %155 RelaxedPrecision -OpDecorate %m10 RelaxedPrecision -OpDecorate %171 RelaxedPrecision -OpDecorate %173 RelaxedPrecision -OpDecorate %176 RelaxedPrecision -OpDecorate %179 RelaxedPrecision -OpDecorate %m11 RelaxedPrecision -OpDecorate %187 RelaxedPrecision -OpDecorate %188 RelaxedPrecision -OpDecorate %189 RelaxedPrecision -OpDecorate %190 RelaxedPrecision -OpDecorate %191 RelaxedPrecision -OpDecorate %199 RelaxedPrecision -OpDecorate %201 RelaxedPrecision -OpDecorate %204 RelaxedPrecision -OpDecorate %207 RelaxedPrecision -OpDecorate %316 RelaxedPrecision -OpDecorate %318 RelaxedPrecision -OpDecorate %319 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %test_half_b "test_half_b" + OpName %ok "ok" + OpName %m1 "m1" + OpName %m3 "m3" + OpName %m4 "m4" + OpName %m5 "m5" + OpName %m7 "m7" + OpName %m9 "m9" + OpName %m10 "m10" + OpName %m11 "m11" + OpName %test_comma_b "test_comma_b" + OpName %x "x" + OpName %y "y" + OpName %main "main" + OpName %_0_ok "_0_ok" + OpName %_1_m1 "_1_m1" + OpName %_2_m3 "_2_m3" + OpName %_3_m4 "_3_m4" + OpName %_4_m5 "_4_m5" + OpName %_7_m10 "_7_m10" + OpName %_8_m11 "_8_m11" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %12 Binding 0 + OpDecorate %12 DescriptorSet 0 + OpDecorate %m1 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %m3 RelaxedPrecision + OpDecorate %53 RelaxedPrecision + OpDecorate %55 RelaxedPrecision + OpDecorate %m4 RelaxedPrecision + OpDecorate %66 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %82 RelaxedPrecision + OpDecorate %84 RelaxedPrecision + OpDecorate %85 RelaxedPrecision + OpDecorate %m5 RelaxedPrecision + OpDecorate %93 RelaxedPrecision + OpDecorate %94 RelaxedPrecision + OpDecorate %95 RelaxedPrecision + OpDecorate %96 RelaxedPrecision + OpDecorate %97 RelaxedPrecision + OpDecorate %103 RelaxedPrecision + OpDecorate %105 RelaxedPrecision + OpDecorate %109 RelaxedPrecision + OpDecorate %110 RelaxedPrecision + OpDecorate %111 RelaxedPrecision + OpDecorate %119 RelaxedPrecision + OpDecorate %121 RelaxedPrecision + OpDecorate %m7 RelaxedPrecision + OpDecorate %132 RelaxedPrecision + OpDecorate %134 RelaxedPrecision + OpDecorate %m9 RelaxedPrecision + OpDecorate %150 RelaxedPrecision + OpDecorate %152 RelaxedPrecision + OpDecorate %155 RelaxedPrecision + OpDecorate %m10 RelaxedPrecision + OpDecorate %171 RelaxedPrecision + OpDecorate %173 RelaxedPrecision + OpDecorate %176 RelaxedPrecision + OpDecorate %179 RelaxedPrecision + OpDecorate %m11 RelaxedPrecision + OpDecorate %187 RelaxedPrecision + OpDecorate %188 RelaxedPrecision + OpDecorate %189 RelaxedPrecision + OpDecorate %190 RelaxedPrecision + OpDecorate %191 RelaxedPrecision + OpDecorate %199 RelaxedPrecision + OpDecorate %201 RelaxedPrecision + OpDecorate %204 RelaxedPrecision + OpDecorate %207 RelaxedPrecision + OpDecorate %316 RelaxedPrecision + OpDecorate %318 RelaxedPrecision + OpDecorate %319 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%12 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%17 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%21 = OpConstantComposite %v2float %float_0 %float_0 + %12 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %17 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %21 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%25 = OpTypeFunction %bool + %25 = OpTypeFunction %bool %_ptr_Function_bool = OpTypePointer Function %bool -%true = OpConstantTrue %bool + %true = OpConstantTrue %bool %mat2v2float = OpTypeMatrix %v2float 2 %_ptr_Function_mat2v2float = OpTypePointer Function %mat2v2float -%float_1 = OpConstant %float 1 -%float_2 = OpConstant %float 2 -%float_3 = OpConstant %float 3 -%float_4 = OpConstant %float 4 -%37 = OpConstantComposite %v2float %float_1 %float_2 -%38 = OpConstantComposite %v2float %float_3 %float_4 -%39 = OpConstantComposite %mat2v2float %37 %38 -%false = OpConstantFalse %bool -%v2bool = OpTypeVector %bool 2 -%float_6 = OpConstant %float 6 -%61 = OpConstantComposite %v2float %float_6 %float_0 -%62 = OpConstantComposite %v2float %float_0 %float_6 -%63 = OpConstantComposite %mat2v2float %61 %62 -%float_12 = OpConstant %float 12 -%float_18 = OpConstant %float 18 -%float_24 = OpConstant %float 24 -%78 = OpConstantComposite %v2float %float_6 %float_12 -%79 = OpConstantComposite %v2float %float_18 %float_24 -%80 = OpConstantComposite %mat2v2float %78 %79 -%int = OpTypeInt 32 1 -%int_1 = OpConstant %int 1 -%100 = OpConstantComposite %v2float %float_4 %float_0 -%101 = OpConstantComposite %v2float %float_0 %float_4 -%102 = OpConstantComposite %mat2v2float %100 %101 -%float_5 = OpConstant %float 5 -%float_8 = OpConstant %float 8 -%116 = OpConstantComposite %v2float %float_5 %float_2 -%117 = OpConstantComposite %v2float %float_3 %float_8 -%118 = OpConstantComposite %mat2v2float %116 %117 -%float_7 = OpConstant %float 7 -%127 = OpConstantComposite %v2float %float_5 %float_6 -%128 = OpConstantComposite %v2float %float_7 %float_8 -%129 = OpConstantComposite %mat2v2float %127 %128 -%v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %float_2 = OpConstant %float 2 + %float_3 = OpConstant %float 3 + %float_4 = OpConstant %float 4 + %37 = OpConstantComposite %v2float %float_1 %float_2 + %38 = OpConstantComposite %v2float %float_3 %float_4 + %39 = OpConstantComposite %mat2v2float %37 %38 + %false = OpConstantFalse %bool + %v2bool = OpTypeVector %bool 2 + %float_6 = OpConstant %float 6 + %61 = OpConstantComposite %v2float %float_6 %float_0 + %62 = OpConstantComposite %v2float %float_0 %float_6 + %63 = OpConstantComposite %mat2v2float %61 %62 + %float_12 = OpConstant %float 12 + %float_18 = OpConstant %float 18 + %float_24 = OpConstant %float 24 + %78 = OpConstantComposite %v2float %float_6 %float_12 + %79 = OpConstantComposite %v2float %float_18 %float_24 + %80 = OpConstantComposite %mat2v2float %78 %79 + %int = OpTypeInt 32 1 + %int_1 = OpConstant %int 1 + %100 = OpConstantComposite %v2float %float_4 %float_0 + %101 = OpConstantComposite %v2float %float_0 %float_4 + %102 = OpConstantComposite %mat2v2float %100 %101 + %float_5 = OpConstant %float 5 + %float_8 = OpConstant %float 8 + %116 = OpConstantComposite %v2float %float_5 %float_2 + %117 = OpConstantComposite %v2float %float_3 %float_8 + %118 = OpConstantComposite %mat2v2float %116 %117 + %float_7 = OpConstant %float 7 + %127 = OpConstantComposite %v2float %float_5 %float_6 + %128 = OpConstantComposite %v2float %float_7 %float_8 + %129 = OpConstantComposite %mat2v2float %127 %128 + %v3float = OpTypeVector %float 3 %mat3v3float = OpTypeMatrix %v3float 3 %_ptr_Function_mat3v3float = OpTypePointer Function %mat3v3float -%float_9 = OpConstant %float 9 -%143 = OpConstantComposite %v3float %float_9 %float_0 %float_0 -%144 = OpConstantComposite %v3float %float_0 %float_9 %float_0 -%145 = OpConstantComposite %v3float %float_0 %float_0 %float_9 -%146 = OpConstantComposite %mat3v3float %143 %144 %145 -%v3bool = OpTypeVector %bool 3 + %float_9 = OpConstant %float 9 + %143 = OpConstantComposite %v3float %float_9 %float_0 %float_0 + %144 = OpConstantComposite %v3float %float_0 %float_9 %float_0 + %145 = OpConstantComposite %v3float %float_0 %float_0 %float_9 + %146 = OpConstantComposite %mat3v3float %143 %144 %145 + %v3bool = OpTypeVector %bool 3 %mat4v4float = OpTypeMatrix %v4float 4 %_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float -%float_11 = OpConstant %float 11 -%163 = OpConstantComposite %v4float %float_11 %float_0 %float_0 %float_0 -%164 = OpConstantComposite %v4float %float_0 %float_11 %float_0 %float_0 -%165 = OpConstantComposite %v4float %float_0 %float_0 %float_11 %float_0 -%166 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_11 -%167 = OpConstantComposite %mat4v4float %163 %164 %165 %166 -%v4bool = OpTypeVector %bool 4 -%float_20 = OpConstant %float 20 -%185 = OpConstantComposite %v4float %float_20 %float_20 %float_20 %float_20 -%186 = OpConstantComposite %mat4v4float %185 %185 %185 %185 -%194 = OpConstantComposite %v4float %float_9 %float_20 %float_20 %float_20 -%195 = OpConstantComposite %v4float %float_20 %float_9 %float_20 %float_20 -%196 = OpConstantComposite %v4float %float_20 %float_20 %float_9 %float_20 -%197 = OpConstantComposite %v4float %float_20 %float_20 %float_20 %float_9 -%198 = OpConstantComposite %mat4v4float %194 %195 %196 %197 -%219 = OpTypeFunction %v4float %_ptr_Function_v2float + %float_11 = OpConstant %float 11 + %163 = OpConstantComposite %v4float %float_11 %float_0 %float_0 %float_0 + %164 = OpConstantComposite %v4float %float_0 %float_11 %float_0 %float_0 + %165 = OpConstantComposite %v4float %float_0 %float_0 %float_11 %float_0 + %166 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_11 + %167 = OpConstantComposite %mat4v4float %163 %164 %165 %166 + %v4bool = OpTypeVector %bool 4 + %float_20 = OpConstant %float 20 + %185 = OpConstantComposite %v4float %float_20 %float_20 %float_20 %float_20 + %186 = OpConstantComposite %mat4v4float %185 %185 %185 %185 + %194 = OpConstantComposite %v4float %float_9 %float_20 %float_20 %float_20 + %195 = OpConstantComposite %v4float %float_20 %float_9 %float_20 %float_20 + %196 = OpConstantComposite %v4float %float_20 %float_20 %float_9 %float_20 + %197 = OpConstantComposite %v4float %float_20 %float_20 %float_20 %float_9 + %198 = OpConstantComposite %mat4v4float %194 %195 %196 %197 + %219 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_0 = OpConstant %int 0 + %int_0 = OpConstant %int 0 %_entrypoint_v = OpFunction %void None %17 -%18 = OpLabel -%22 = OpVariable %_ptr_Function_v2float Function -OpStore %22 %21 -%24 = OpFunctionCall %v4float %main %22 -OpStore %sk_FragColor %24 -OpReturn -OpFunctionEnd + %18 = OpLabel + %22 = OpVariable %_ptr_Function_v2float Function + OpStore %22 %21 + %24 = OpFunctionCall %v4float %main %22 + OpStore %sk_FragColor %24 + OpReturn + OpFunctionEnd %test_half_b = OpFunction %bool None %25 -%26 = OpLabel -%ok = OpVariable %_ptr_Function_bool Function -%m1 = OpVariable %_ptr_Function_mat2v2float Function -%m3 = OpVariable %_ptr_Function_mat2v2float Function -%m4 = OpVariable %_ptr_Function_mat2v2float Function -%m5 = OpVariable %_ptr_Function_mat2v2float Function -%m7 = OpVariable %_ptr_Function_mat2v2float Function -%m9 = OpVariable %_ptr_Function_mat3v3float Function -%m10 = OpVariable %_ptr_Function_mat4v4float Function -%m11 = OpVariable %_ptr_Function_mat4v4float Function -OpStore %ok %true -OpStore %m1 %39 -OpSelectionMerge %42 None -OpBranchConditional %true %41 %42 -%41 = OpLabel -%44 = OpFOrdEqual %v2bool %37 %37 -%45 = OpAll %bool %44 -%46 = OpFOrdEqual %v2bool %38 %38 -%47 = OpAll %bool %46 -%48 = OpLogicalAnd %bool %45 %47 -OpBranch %42 -%42 = OpLabel -%49 = OpPhi %bool %false %26 %48 %41 -OpStore %ok %49 -OpStore %m3 %39 -OpSelectionMerge %52 None -OpBranchConditional %49 %51 %52 -%51 = OpLabel -%53 = OpFOrdEqual %v2bool %37 %37 -%54 = OpAll %bool %53 -%55 = OpFOrdEqual %v2bool %38 %38 -%56 = OpAll %bool %55 -%57 = OpLogicalAnd %bool %54 %56 -OpBranch %52 -%52 = OpLabel -%58 = OpPhi %bool %false %42 %57 %51 -OpStore %ok %58 -OpStore %m4 %63 -OpSelectionMerge %65 None -OpBranchConditional %58 %64 %65 -%64 = OpLabel -%66 = OpFOrdEqual %v2bool %61 %61 -%67 = OpAll %bool %66 -%68 = OpFOrdEqual %v2bool %62 %62 -%69 = OpAll %bool %68 -%70 = OpLogicalAnd %bool %67 %69 -OpBranch %65 -%65 = OpLabel -%71 = OpPhi %bool %false %52 %70 %64 -OpStore %ok %71 -%72 = OpMatrixTimesMatrix %mat2v2float %39 %63 -OpStore %m3 %72 -OpSelectionMerge %74 None -OpBranchConditional %71 %73 %74 -%73 = OpLabel -%81 = OpCompositeExtract %v2float %72 0 -%82 = OpFOrdEqual %v2bool %81 %78 -%83 = OpAll %bool %82 -%84 = OpCompositeExtract %v2float %72 1 -%85 = OpFOrdEqual %v2bool %84 %79 -%86 = OpAll %bool %85 -%87 = OpLogicalAnd %bool %83 %86 -OpBranch %74 -%74 = OpLabel -%88 = OpPhi %bool %false %65 %87 %73 -OpStore %ok %88 -%92 = OpAccessChain %_ptr_Function_v2float %m1 %int_1 -%93 = OpLoad %v2float %92 -%94 = OpCompositeExtract %float %93 1 -%95 = OpCompositeConstruct %v2float %94 %float_0 -%96 = OpCompositeConstruct %v2float %float_0 %94 -%97 = OpCompositeConstruct %mat2v2float %95 %96 -OpStore %m5 %97 -OpSelectionMerge %99 None -OpBranchConditional %88 %98 %99 -%98 = OpLabel -%103 = OpFOrdEqual %v2bool %95 %100 -%104 = OpAll %bool %103 -%105 = OpFOrdEqual %v2bool %96 %101 -%106 = OpAll %bool %105 -%107 = OpLogicalAnd %bool %104 %106 -OpBranch %99 -%99 = OpLabel -%108 = OpPhi %bool %false %74 %107 %98 -OpStore %ok %108 -%109 = OpFAdd %v2float %37 %95 -%110 = OpFAdd %v2float %38 %96 -%111 = OpCompositeConstruct %mat2v2float %109 %110 -OpStore %m1 %111 -OpSelectionMerge %113 None -OpBranchConditional %108 %112 %113 -%112 = OpLabel -%119 = OpFOrdEqual %v2bool %109 %116 -%120 = OpAll %bool %119 -%121 = OpFOrdEqual %v2bool %110 %117 -%122 = OpAll %bool %121 -%123 = OpLogicalAnd %bool %120 %122 -OpBranch %113 -%113 = OpLabel -%124 = OpPhi %bool %false %99 %123 %112 -OpStore %ok %124 -OpStore %m7 %129 -OpSelectionMerge %131 None -OpBranchConditional %124 %130 %131 -%130 = OpLabel -%132 = OpFOrdEqual %v2bool %127 %127 -%133 = OpAll %bool %132 -%134 = OpFOrdEqual %v2bool %128 %128 -%135 = OpAll %bool %134 -%136 = OpLogicalAnd %bool %133 %135 -OpBranch %131 -%131 = OpLabel -%137 = OpPhi %bool %false %113 %136 %130 -OpStore %ok %137 -OpStore %m9 %146 -OpSelectionMerge %148 None -OpBranchConditional %137 %147 %148 -%147 = OpLabel -%150 = OpFOrdEqual %v3bool %143 %143 -%151 = OpAll %bool %150 -%152 = OpFOrdEqual %v3bool %144 %144 -%153 = OpAll %bool %152 -%154 = OpLogicalAnd %bool %151 %153 -%155 = OpFOrdEqual %v3bool %145 %145 -%156 = OpAll %bool %155 -%157 = OpLogicalAnd %bool %154 %156 -OpBranch %148 -%148 = OpLabel -%158 = OpPhi %bool %false %131 %157 %147 -OpStore %ok %158 -OpStore %m10 %167 -OpSelectionMerge %169 None -OpBranchConditional %158 %168 %169 -%168 = OpLabel -%171 = OpFOrdEqual %v4bool %163 %163 -%172 = OpAll %bool %171 -%173 = OpFOrdEqual %v4bool %164 %164 -%174 = OpAll %bool %173 -%175 = OpLogicalAnd %bool %172 %174 -%176 = OpFOrdEqual %v4bool %165 %165 -%177 = OpAll %bool %176 -%178 = OpLogicalAnd %bool %175 %177 -%179 = OpFOrdEqual %v4bool %166 %166 -%180 = OpAll %bool %179 -%181 = OpLogicalAnd %bool %178 %180 -OpBranch %169 -%169 = OpLabel -%182 = OpPhi %bool %false %148 %181 %168 -OpStore %ok %182 -OpStore %m11 %186 -%187 = OpFSub %v4float %185 %163 -%188 = OpFSub %v4float %185 %164 -%189 = OpFSub %v4float %185 %165 -%190 = OpFSub %v4float %185 %166 -%191 = OpCompositeConstruct %mat4v4float %187 %188 %189 %190 -OpStore %m11 %191 -OpSelectionMerge %193 None -OpBranchConditional %182 %192 %193 -%192 = OpLabel -%199 = OpFOrdEqual %v4bool %187 %194 -%200 = OpAll %bool %199 -%201 = OpFOrdEqual %v4bool %188 %195 -%202 = OpAll %bool %201 -%203 = OpLogicalAnd %bool %200 %202 -%204 = OpFOrdEqual %v4bool %189 %196 -%205 = OpAll %bool %204 -%206 = OpLogicalAnd %bool %203 %205 -%207 = OpFOrdEqual %v4bool %190 %197 -%208 = OpAll %bool %207 -%209 = OpLogicalAnd %bool %206 %208 -OpBranch %193 -%193 = OpLabel -%210 = OpPhi %bool %false %169 %209 %192 -OpStore %ok %210 -OpReturnValue %210 -OpFunctionEnd + %26 = OpLabel + %ok = OpVariable %_ptr_Function_bool Function + %m1 = OpVariable %_ptr_Function_mat2v2float Function + %m3 = OpVariable %_ptr_Function_mat2v2float Function + %m4 = OpVariable %_ptr_Function_mat2v2float Function + %m5 = OpVariable %_ptr_Function_mat2v2float Function + %m7 = OpVariable %_ptr_Function_mat2v2float Function + %m9 = OpVariable %_ptr_Function_mat3v3float Function + %m10 = OpVariable %_ptr_Function_mat4v4float Function + %m11 = OpVariable %_ptr_Function_mat4v4float Function + OpStore %ok %true + OpStore %m1 %39 + OpSelectionMerge %42 None + OpBranchConditional %true %41 %42 + %41 = OpLabel + %44 = OpFOrdEqual %v2bool %37 %37 + %45 = OpAll %bool %44 + %46 = OpFOrdEqual %v2bool %38 %38 + %47 = OpAll %bool %46 + %48 = OpLogicalAnd %bool %45 %47 + OpBranch %42 + %42 = OpLabel + %49 = OpPhi %bool %false %26 %48 %41 + OpStore %ok %49 + OpStore %m3 %39 + OpSelectionMerge %52 None + OpBranchConditional %49 %51 %52 + %51 = OpLabel + %53 = OpFOrdEqual %v2bool %37 %37 + %54 = OpAll %bool %53 + %55 = OpFOrdEqual %v2bool %38 %38 + %56 = OpAll %bool %55 + %57 = OpLogicalAnd %bool %54 %56 + OpBranch %52 + %52 = OpLabel + %58 = OpPhi %bool %false %42 %57 %51 + OpStore %ok %58 + OpStore %m4 %63 + OpSelectionMerge %65 None + OpBranchConditional %58 %64 %65 + %64 = OpLabel + %66 = OpFOrdEqual %v2bool %61 %61 + %67 = OpAll %bool %66 + %68 = OpFOrdEqual %v2bool %62 %62 + %69 = OpAll %bool %68 + %70 = OpLogicalAnd %bool %67 %69 + OpBranch %65 + %65 = OpLabel + %71 = OpPhi %bool %false %52 %70 %64 + OpStore %ok %71 + %72 = OpMatrixTimesMatrix %mat2v2float %39 %63 + OpStore %m3 %72 + OpSelectionMerge %74 None + OpBranchConditional %71 %73 %74 + %73 = OpLabel + %81 = OpCompositeExtract %v2float %72 0 + %82 = OpFOrdEqual %v2bool %81 %78 + %83 = OpAll %bool %82 + %84 = OpCompositeExtract %v2float %72 1 + %85 = OpFOrdEqual %v2bool %84 %79 + %86 = OpAll %bool %85 + %87 = OpLogicalAnd %bool %83 %86 + OpBranch %74 + %74 = OpLabel + %88 = OpPhi %bool %false %65 %87 %73 + OpStore %ok %88 + %92 = OpAccessChain %_ptr_Function_v2float %m1 %int_1 + %93 = OpLoad %v2float %92 + %94 = OpCompositeExtract %float %93 1 + %95 = OpCompositeConstruct %v2float %94 %float_0 + %96 = OpCompositeConstruct %v2float %float_0 %94 + %97 = OpCompositeConstruct %mat2v2float %95 %96 + OpStore %m5 %97 + OpSelectionMerge %99 None + OpBranchConditional %88 %98 %99 + %98 = OpLabel + %103 = OpFOrdEqual %v2bool %95 %100 + %104 = OpAll %bool %103 + %105 = OpFOrdEqual %v2bool %96 %101 + %106 = OpAll %bool %105 + %107 = OpLogicalAnd %bool %104 %106 + OpBranch %99 + %99 = OpLabel + %108 = OpPhi %bool %false %74 %107 %98 + OpStore %ok %108 + %109 = OpFAdd %v2float %37 %95 + %110 = OpFAdd %v2float %38 %96 + %111 = OpCompositeConstruct %mat2v2float %109 %110 + OpStore %m1 %111 + OpSelectionMerge %113 None + OpBranchConditional %108 %112 %113 + %112 = OpLabel + %119 = OpFOrdEqual %v2bool %109 %116 + %120 = OpAll %bool %119 + %121 = OpFOrdEqual %v2bool %110 %117 + %122 = OpAll %bool %121 + %123 = OpLogicalAnd %bool %120 %122 + OpBranch %113 + %113 = OpLabel + %124 = OpPhi %bool %false %99 %123 %112 + OpStore %ok %124 + OpStore %m7 %129 + OpSelectionMerge %131 None + OpBranchConditional %124 %130 %131 + %130 = OpLabel + %132 = OpFOrdEqual %v2bool %127 %127 + %133 = OpAll %bool %132 + %134 = OpFOrdEqual %v2bool %128 %128 + %135 = OpAll %bool %134 + %136 = OpLogicalAnd %bool %133 %135 + OpBranch %131 + %131 = OpLabel + %137 = OpPhi %bool %false %113 %136 %130 + OpStore %ok %137 + OpStore %m9 %146 + OpSelectionMerge %148 None + OpBranchConditional %137 %147 %148 + %147 = OpLabel + %150 = OpFOrdEqual %v3bool %143 %143 + %151 = OpAll %bool %150 + %152 = OpFOrdEqual %v3bool %144 %144 + %153 = OpAll %bool %152 + %154 = OpLogicalAnd %bool %151 %153 + %155 = OpFOrdEqual %v3bool %145 %145 + %156 = OpAll %bool %155 + %157 = OpLogicalAnd %bool %154 %156 + OpBranch %148 + %148 = OpLabel + %158 = OpPhi %bool %false %131 %157 %147 + OpStore %ok %158 + OpStore %m10 %167 + OpSelectionMerge %169 None + OpBranchConditional %158 %168 %169 + %168 = OpLabel + %171 = OpFOrdEqual %v4bool %163 %163 + %172 = OpAll %bool %171 + %173 = OpFOrdEqual %v4bool %164 %164 + %174 = OpAll %bool %173 + %175 = OpLogicalAnd %bool %172 %174 + %176 = OpFOrdEqual %v4bool %165 %165 + %177 = OpAll %bool %176 + %178 = OpLogicalAnd %bool %175 %177 + %179 = OpFOrdEqual %v4bool %166 %166 + %180 = OpAll %bool %179 + %181 = OpLogicalAnd %bool %178 %180 + OpBranch %169 + %169 = OpLabel + %182 = OpPhi %bool %false %148 %181 %168 + OpStore %ok %182 + OpStore %m11 %186 + %187 = OpFSub %v4float %185 %163 + %188 = OpFSub %v4float %185 %164 + %189 = OpFSub %v4float %185 %165 + %190 = OpFSub %v4float %185 %166 + %191 = OpCompositeConstruct %mat4v4float %187 %188 %189 %190 + OpStore %m11 %191 + OpSelectionMerge %193 None + OpBranchConditional %182 %192 %193 + %192 = OpLabel + %199 = OpFOrdEqual %v4bool %187 %194 + %200 = OpAll %bool %199 + %201 = OpFOrdEqual %v4bool %188 %195 + %202 = OpAll %bool %201 + %203 = OpLogicalAnd %bool %200 %202 + %204 = OpFOrdEqual %v4bool %189 %196 + %205 = OpAll %bool %204 + %206 = OpLogicalAnd %bool %203 %205 + %207 = OpFOrdEqual %v4bool %190 %197 + %208 = OpAll %bool %207 + %209 = OpLogicalAnd %bool %206 %208 + OpBranch %193 + %193 = OpLabel + %210 = OpPhi %bool %false %169 %209 %192 + OpStore %ok %210 + OpReturnValue %210 + OpFunctionEnd %test_comma_b = OpFunction %bool None %25 -%211 = OpLabel -%x = OpVariable %_ptr_Function_mat2v2float Function -%y = OpVariable %_ptr_Function_mat2v2float Function -OpStore %x %39 -OpStore %y %39 -%214 = OpFOrdEqual %v2bool %37 %37 -%215 = OpAll %bool %214 -%216 = OpFOrdEqual %v2bool %38 %38 -%217 = OpAll %bool %216 -%218 = OpLogicalAnd %bool %215 %217 -OpReturnValue %218 -OpFunctionEnd -%main = OpFunction %v4float None %219 -%220 = OpFunctionParameter %_ptr_Function_v2float -%221 = OpLabel -%_0_ok = OpVariable %_ptr_Function_bool Function -%_1_m1 = OpVariable %_ptr_Function_mat2v2float Function -%_2_m3 = OpVariable %_ptr_Function_mat2v2float Function -%_3_m4 = OpVariable %_ptr_Function_mat2v2float Function -%_4_m5 = OpVariable %_ptr_Function_mat2v2float Function -%_7_m10 = OpVariable %_ptr_Function_mat4v4float Function -%_8_m11 = OpVariable %_ptr_Function_mat4v4float Function -%308 = OpVariable %_ptr_Function_v4float Function -OpStore %_0_ok %true -OpStore %_1_m1 %39 -OpSelectionMerge %225 None -OpBranchConditional %true %224 %225 -%224 = OpLabel -%226 = OpFOrdEqual %v2bool %37 %37 -%227 = OpAll %bool %226 -%228 = OpFOrdEqual %v2bool %38 %38 -%229 = OpAll %bool %228 -%230 = OpLogicalAnd %bool %227 %229 -OpBranch %225 -%225 = OpLabel -%231 = OpPhi %bool %false %221 %230 %224 -OpStore %_0_ok %231 -OpStore %_2_m3 %39 -OpSelectionMerge %234 None -OpBranchConditional %231 %233 %234 -%233 = OpLabel -%235 = OpFOrdEqual %v2bool %37 %37 -%236 = OpAll %bool %235 -%237 = OpFOrdEqual %v2bool %38 %38 -%238 = OpAll %bool %237 -%239 = OpLogicalAnd %bool %236 %238 -OpBranch %234 -%234 = OpLabel -%240 = OpPhi %bool %false %225 %239 %233 -OpStore %_0_ok %240 -OpStore %_3_m4 %63 -%242 = OpMatrixTimesMatrix %mat2v2float %39 %63 -OpStore %_2_m3 %242 -OpSelectionMerge %244 None -OpBranchConditional %240 %243 %244 -%243 = OpLabel -%245 = OpCompositeExtract %v2float %242 0 -%246 = OpFOrdEqual %v2bool %245 %78 -%247 = OpAll %bool %246 -%248 = OpCompositeExtract %v2float %242 1 -%249 = OpFOrdEqual %v2bool %248 %79 -%250 = OpAll %bool %249 -%251 = OpLogicalAnd %bool %247 %250 -OpBranch %244 -%244 = OpLabel -%252 = OpPhi %bool %false %234 %251 %243 -OpStore %_0_ok %252 -%254 = OpAccessChain %_ptr_Function_v2float %_1_m1 %int_1 -%255 = OpLoad %v2float %254 -%256 = OpCompositeExtract %float %255 1 -%257 = OpCompositeConstruct %v2float %256 %float_0 -%258 = OpCompositeConstruct %v2float %float_0 %256 -%259 = OpCompositeConstruct %mat2v2float %257 %258 -OpStore %_4_m5 %259 -OpSelectionMerge %261 None -OpBranchConditional %252 %260 %261 -%260 = OpLabel -%262 = OpFOrdEqual %v2bool %257 %100 -%263 = OpAll %bool %262 -%264 = OpFOrdEqual %v2bool %258 %101 -%265 = OpAll %bool %264 -%266 = OpLogicalAnd %bool %263 %265 -OpBranch %261 -%261 = OpLabel -%267 = OpPhi %bool %false %244 %266 %260 -OpStore %_0_ok %267 -%268 = OpFAdd %v2float %37 %257 -%269 = OpFAdd %v2float %38 %258 -%270 = OpCompositeConstruct %mat2v2float %268 %269 -OpStore %_1_m1 %270 -OpSelectionMerge %272 None -OpBranchConditional %267 %271 %272 -%271 = OpLabel -%273 = OpFOrdEqual %v2bool %268 %116 -%274 = OpAll %bool %273 -%275 = OpFOrdEqual %v2bool %269 %117 -%276 = OpAll %bool %275 -%277 = OpLogicalAnd %bool %274 %276 -OpBranch %272 -%272 = OpLabel -%278 = OpPhi %bool %false %261 %277 %271 -OpStore %_0_ok %278 -OpStore %_7_m10 %167 -OpStore %_8_m11 %186 -%281 = OpFSub %v4float %185 %163 -%282 = OpFSub %v4float %185 %164 -%283 = OpFSub %v4float %185 %165 -%284 = OpFSub %v4float %185 %166 -%285 = OpCompositeConstruct %mat4v4float %281 %282 %283 %284 -OpStore %_8_m11 %285 -OpSelectionMerge %287 None -OpBranchConditional %278 %286 %287 -%286 = OpLabel -%288 = OpFOrdEqual %v4bool %281 %194 -%289 = OpAll %bool %288 -%290 = OpFOrdEqual %v4bool %282 %195 -%291 = OpAll %bool %290 -%292 = OpLogicalAnd %bool %289 %291 -%293 = OpFOrdEqual %v4bool %283 %196 -%294 = OpAll %bool %293 -%295 = OpLogicalAnd %bool %292 %294 -%296 = OpFOrdEqual %v4bool %284 %197 -%297 = OpAll %bool %296 -%298 = OpLogicalAnd %bool %295 %297 -OpBranch %287 -%287 = OpLabel -%299 = OpPhi %bool %false %272 %298 %286 -OpStore %_0_ok %299 -OpSelectionMerge %301 None -OpBranchConditional %299 %300 %301 -%300 = OpLabel -%302 = OpFunctionCall %bool %test_half_b -OpBranch %301 -%301 = OpLabel -%303 = OpPhi %bool %false %287 %302 %300 -OpSelectionMerge %305 None -OpBranchConditional %303 %304 %305 -%304 = OpLabel -%306 = OpFunctionCall %bool %test_comma_b -OpBranch %305 -%305 = OpLabel -%307 = OpPhi %bool %false %301 %306 %304 -OpSelectionMerge %312 None -OpBranchConditional %307 %310 %311 -%310 = OpLabel -%313 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 -%316 = OpLoad %v4float %313 -OpStore %308 %316 -OpBranch %312 -%311 = OpLabel -%317 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1 -%318 = OpLoad %v4float %317 -OpStore %308 %318 -OpBranch %312 -%312 = OpLabel -%319 = OpLoad %v4float %308 -OpReturnValue %319 -OpFunctionEnd + %211 = OpLabel + %x = OpVariable %_ptr_Function_mat2v2float Function + %y = OpVariable %_ptr_Function_mat2v2float Function + OpStore %x %39 + OpStore %y %39 + %214 = OpFOrdEqual %v2bool %37 %37 + %215 = OpAll %bool %214 + %216 = OpFOrdEqual %v2bool %38 %38 + %217 = OpAll %bool %216 + %218 = OpLogicalAnd %bool %215 %217 + OpReturnValue %218 + OpFunctionEnd + %main = OpFunction %v4float None %219 + %220 = OpFunctionParameter %_ptr_Function_v2float + %221 = OpLabel + %_0_ok = OpVariable %_ptr_Function_bool Function + %_1_m1 = OpVariable %_ptr_Function_mat2v2float Function + %_2_m3 = OpVariable %_ptr_Function_mat2v2float Function + %_3_m4 = OpVariable %_ptr_Function_mat2v2float Function + %_4_m5 = OpVariable %_ptr_Function_mat2v2float Function + %_7_m10 = OpVariable %_ptr_Function_mat4v4float Function + %_8_m11 = OpVariable %_ptr_Function_mat4v4float Function + %308 = OpVariable %_ptr_Function_v4float Function + OpStore %_0_ok %true + OpStore %_1_m1 %39 + OpSelectionMerge %225 None + OpBranchConditional %true %224 %225 + %224 = OpLabel + %226 = OpFOrdEqual %v2bool %37 %37 + %227 = OpAll %bool %226 + %228 = OpFOrdEqual %v2bool %38 %38 + %229 = OpAll %bool %228 + %230 = OpLogicalAnd %bool %227 %229 + OpBranch %225 + %225 = OpLabel + %231 = OpPhi %bool %false %221 %230 %224 + OpStore %_0_ok %231 + OpStore %_2_m3 %39 + OpSelectionMerge %234 None + OpBranchConditional %231 %233 %234 + %233 = OpLabel + %235 = OpFOrdEqual %v2bool %37 %37 + %236 = OpAll %bool %235 + %237 = OpFOrdEqual %v2bool %38 %38 + %238 = OpAll %bool %237 + %239 = OpLogicalAnd %bool %236 %238 + OpBranch %234 + %234 = OpLabel + %240 = OpPhi %bool %false %225 %239 %233 + OpStore %_0_ok %240 + OpStore %_3_m4 %63 + %242 = OpMatrixTimesMatrix %mat2v2float %39 %63 + OpStore %_2_m3 %242 + OpSelectionMerge %244 None + OpBranchConditional %240 %243 %244 + %243 = OpLabel + %245 = OpCompositeExtract %v2float %242 0 + %246 = OpFOrdEqual %v2bool %245 %78 + %247 = OpAll %bool %246 + %248 = OpCompositeExtract %v2float %242 1 + %249 = OpFOrdEqual %v2bool %248 %79 + %250 = OpAll %bool %249 + %251 = OpLogicalAnd %bool %247 %250 + OpBranch %244 + %244 = OpLabel + %252 = OpPhi %bool %false %234 %251 %243 + OpStore %_0_ok %252 + %254 = OpAccessChain %_ptr_Function_v2float %_1_m1 %int_1 + %255 = OpLoad %v2float %254 + %256 = OpCompositeExtract %float %255 1 + %257 = OpCompositeConstruct %v2float %256 %float_0 + %258 = OpCompositeConstruct %v2float %float_0 %256 + %259 = OpCompositeConstruct %mat2v2float %257 %258 + OpStore %_4_m5 %259 + OpSelectionMerge %261 None + OpBranchConditional %252 %260 %261 + %260 = OpLabel + %262 = OpFOrdEqual %v2bool %257 %100 + %263 = OpAll %bool %262 + %264 = OpFOrdEqual %v2bool %258 %101 + %265 = OpAll %bool %264 + %266 = OpLogicalAnd %bool %263 %265 + OpBranch %261 + %261 = OpLabel + %267 = OpPhi %bool %false %244 %266 %260 + OpStore %_0_ok %267 + %268 = OpFAdd %v2float %37 %257 + %269 = OpFAdd %v2float %38 %258 + %270 = OpCompositeConstruct %mat2v2float %268 %269 + OpStore %_1_m1 %270 + OpSelectionMerge %272 None + OpBranchConditional %267 %271 %272 + %271 = OpLabel + %273 = OpFOrdEqual %v2bool %268 %116 + %274 = OpAll %bool %273 + %275 = OpFOrdEqual %v2bool %269 %117 + %276 = OpAll %bool %275 + %277 = OpLogicalAnd %bool %274 %276 + OpBranch %272 + %272 = OpLabel + %278 = OpPhi %bool %false %261 %277 %271 + OpStore %_0_ok %278 + OpStore %_7_m10 %167 + OpStore %_8_m11 %186 + %281 = OpFSub %v4float %185 %163 + %282 = OpFSub %v4float %185 %164 + %283 = OpFSub %v4float %185 %165 + %284 = OpFSub %v4float %185 %166 + %285 = OpCompositeConstruct %mat4v4float %281 %282 %283 %284 + OpStore %_8_m11 %285 + OpSelectionMerge %287 None + OpBranchConditional %278 %286 %287 + %286 = OpLabel + %288 = OpFOrdEqual %v4bool %281 %194 + %289 = OpAll %bool %288 + %290 = OpFOrdEqual %v4bool %282 %195 + %291 = OpAll %bool %290 + %292 = OpLogicalAnd %bool %289 %291 + %293 = OpFOrdEqual %v4bool %283 %196 + %294 = OpAll %bool %293 + %295 = OpLogicalAnd %bool %292 %294 + %296 = OpFOrdEqual %v4bool %284 %197 + %297 = OpAll %bool %296 + %298 = OpLogicalAnd %bool %295 %297 + OpBranch %287 + %287 = OpLabel + %299 = OpPhi %bool %false %272 %298 %286 + OpStore %_0_ok %299 + OpSelectionMerge %301 None + OpBranchConditional %299 %300 %301 + %300 = OpLabel + %302 = OpFunctionCall %bool %test_half_b + OpBranch %301 + %301 = OpLabel + %303 = OpPhi %bool %false %287 %302 %300 + OpSelectionMerge %305 None + OpBranchConditional %303 %304 %305 + %304 = OpLabel + %306 = OpFunctionCall %bool %test_comma_b + OpBranch %305 + %305 = OpLabel + %307 = OpPhi %bool %false %301 %306 %304 + OpSelectionMerge %312 None + OpBranchConditional %307 %310 %311 + %310 = OpLabel + %313 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 + %316 = OpLoad %v4float %313 + OpStore %308 %316 + OpBranch %312 + %311 = OpLabel + %317 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1 + %318 = OpLoad %v4float %317 + OpStore %308 %318 + OpBranch %312 + %312 = OpLabel + %319 = OpLoad %v4float %308 + OpReturnValue %319 + OpFunctionEnd diff --git a/tests/sksl/shared/Matrices.skrp b/tests/sksl/shared/Matrices.skrp index 66269d419745..5cafbac93509 100644 --- a/tests/sksl/shared/Matrices.skrp +++ b/tests/sksl/shared/Matrices.skrp @@ -1,71 +1,95 @@ +256 instructions + [immutable slots] -_3_m4(0) = 0x40C00000 (6.0) -_3_m4(1) = 0 -_3_m4(2) = 0 -_3_m4(3) = 0x40C00000 (6.0) -_7_m10(0) = 0x41300000 (11.0) -_7_m10(1) = 0 -_7_m10(2) = 0 -_7_m10(3) = 0 -_7_m10(4) = 0 -_7_m10(5) = 0x41300000 (11.0) -_7_m10(6) = 0 -_7_m10(7) = 0 -_7_m10(8) = 0 -_7_m10(9) = 0 -_7_m10(10) = 0x41300000 (11.0) -_7_m10(11) = 0 -_7_m10(12) = 0 -_7_m10(13) = 0 -_7_m10(14) = 0 -_7_m10(15) = 0x41300000 (11.0) -m4(0) = 0x40C00000 (6.0) -m4(1) = 0 -m4(2) = 0 -m4(3) = 0x40C00000 (6.0) -m7(0) = 0x40A00000 (5.0) -m7(1) = 0x40C00000 (6.0) -m7(2) = 0x40E00000 (7.0) -m7(3) = 0x41000000 (8.0) -m9(0) = 0x41100000 (9.0) -m9(1) = 0 -m9(2) = 0 -m9(3) = 0 -m9(4) = 0x41100000 (9.0) -m9(5) = 0 -m9(6) = 0 -m9(7) = 0 -m9(8) = 0x41100000 (9.0) -m10(0) = 0x41300000 (11.0) -m10(1) = 0 -m10(2) = 0 -m10(3) = 0 -m10(4) = 0 -m10(5) = 0x41300000 (11.0) -m10(6) = 0 -m10(7) = 0 -m10(8) = 0 -m10(9) = 0 -m10(10) = 0x41300000 (11.0) -m10(11) = 0 -m10(12) = 0 -m10(13) = 0 -m10(14) = 0 -m10(15) = 0x41300000 (11.0) +i0 = 0x3F800000 (1.0) +i1 = 0x40000000 (2.0) +i2 = 0x40400000 (3.0) +i3 = 0x40800000 (4.0) +i4 = 0x40C00000 (6.0) +i5 = 0 +i6 = 0 +i7 = 0x40C00000 (6.0) +i8 = 0x40C00000 (6.0) +i9 = 0x41400000 (12.0) +i10 = 0x41900000 (18.0) +i11 = 0x41C00000 (24.0) +i12 = 0x40800000 (4.0) +i13 = 0 +i14 = 0 +i15 = 0x40800000 (4.0) +i16 = 0x40A00000 (5.0) +i17 = 0x40000000 (2.0) +i18 = 0x40400000 (3.0) +i19 = 0x41000000 (8.0) +i20 = 0x41300000 (11.0) +i21 = 0 +i22 = 0 +i23 = 0 +i24 = 0 +i25 = 0x41300000 (11.0) +i26 = 0 +i27 = 0 +i28 = 0 +i29 = 0 +i30 = 0x41300000 (11.0) +i31 = 0 +i32 = 0 +i33 = 0 +i34 = 0 +i35 = 0x41300000 (11.0) +i36 = 0x41A00000 (20.0) +i37 = 0x41A00000 (20.0) +i38 = 0x41A00000 (20.0) +i39 = 0x41A00000 (20.0) +i40 = 0x41A00000 (20.0) +i41 = 0x41A00000 (20.0) +i42 = 0x41A00000 (20.0) +i43 = 0x41A00000 (20.0) +i44 = 0x41A00000 (20.0) +i45 = 0x41A00000 (20.0) +i46 = 0x41A00000 (20.0) +i47 = 0x41A00000 (20.0) +i48 = 0x41A00000 (20.0) +i49 = 0x41A00000 (20.0) +i50 = 0x41A00000 (20.0) +i51 = 0x41A00000 (20.0) +i52 = 0x41100000 (9.0) +i53 = 0x41A00000 (20.0) +i54 = 0x41A00000 (20.0) +i55 = 0x41A00000 (20.0) +i56 = 0x41A00000 (20.0) +i57 = 0x41100000 (9.0) +i58 = 0x41A00000 (20.0) +i59 = 0x41A00000 (20.0) +i60 = 0x41A00000 (20.0) +i61 = 0x41A00000 (20.0) +i62 = 0x41100000 (9.0) +i63 = 0x41A00000 (20.0) +i64 = 0x41A00000 (20.0) +i65 = 0x41A00000 (20.0) +i66 = 0x41A00000 (20.0) +i67 = 0x41100000 (9.0) +i68 = 0x40A00000 (5.0) +i69 = 0x40C00000 (6.0) +i70 = 0x40E00000 (7.0) +i71 = 0x41000000 (8.0) +i72 = 0x41100000 (9.0) +i73 = 0 +i74 = 0 +i75 = 0 +i76 = 0x41100000 (9.0) +i77 = 0 +i78 = 0 +i79 = 0 +i80 = 0x41100000 (9.0) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_constant _0_ok = 0xFFFFFFFF -copy_constant _1_m1(0) = 0x3F800000 (1.0) -copy_constant _1_m1(1) = 0x40000000 (2.0) -copy_constant _1_m1(2) = 0x40400000 (3.0) -copy_constant _1_m1(3) = 0x40800000 (4.0) +copy_4_immutables_unmasked _1_m1 = i0..3 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] copy_4_slots_unmasked $0..3 = _0_ok, _1_m1(0..2) copy_slot_unmasked $4 = _1_m1(3) -copy_constant $5 = 0x3F800000 (1.0) -copy_constant $6 = 0x40000000 (2.0) -copy_constant $7 = 0x40400000 (3.0) -copy_constant $8 = 0x40800000 (4.0) +copy_4_immutables_unmasked $5..8 = i0..3 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -74,25 +98,19 @@ copy_slot_unmasked _0_ok = $0 copy_4_slots_unmasked _2_m3 = _1_m1 copy_slot_unmasked $0 = _0_ok copy_4_slots_unmasked $1..4 = _2_m3 -copy_constant $5 = 0x3F800000 (1.0) -copy_constant $6 = 0x40000000 (2.0) -copy_constant $7 = 0x40400000 (3.0) -copy_constant $8 = 0x40800000 (4.0) +copy_4_immutables_unmasked $5..8 = i0..3 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_slot_unmasked _0_ok = $0 copy_4_slots_unmasked $4..7 = _2_m3 -copy_4_slots_unmasked $8..11 = _3_m4 +copy_4_immutables_unmasked $8..11 = i4..7 [0x40C00000 (6.0), 0, 0, 0x40C00000 (6.0)] matrix_multiply_2 mat2x2($0..3) = mat2x2($4..7) * mat2x2($8..11) copy_4_slots_unmasked _2_m3 = $0..3 copy_slot_unmasked $0 = _0_ok copy_4_slots_unmasked $1..4 = _2_m3 -copy_constant $5 = 0x40C00000 (6.0) -copy_constant $6 = 0x41400000 (12.0) -copy_constant $7 = 0x41900000 (18.0) -copy_constant $8 = 0x41C00000 (24.0) +copy_4_immutables_unmasked $5..8 = i8..11 [0x40C00000 (6.0), 0x41400000 (12.0), 0x41900000 (18.0), 0x41C00000 (24.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -105,9 +123,7 @@ swizzle_4 $0..3 = ($0..3).yxxy copy_4_slots_unmasked _4_m5 = $0..3 copy_slot_unmasked $0 = _0_ok copy_4_slots_unmasked $1..4 = _4_m5 -copy_constant $5 = 0x40800000 (4.0) -splat_2_constants $6..7 = 0 -copy_constant $8 = 0x40800000 (4.0) +copy_4_immutables_unmasked $5..8 = i12..15 [0x40800000 (4.0), 0, 0, 0x40800000 (4.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -119,27 +135,24 @@ add_4_floats $0..3 += $4..7 copy_4_slots_unmasked _1_m1 = $0..3 copy_4_slots_unmasked $0..3 = _0_ok, _1_m1(0..2) copy_slot_unmasked $4 = _1_m1(3) -copy_constant $5 = 0x40A00000 (5.0) -copy_constant $6 = 0x40000000 (2.0) -copy_constant $7 = 0x40400000 (3.0) -copy_constant $8 = 0x41000000 (8.0) +copy_4_immutables_unmasked $5..8 = i16..19 [0x40A00000 (5.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x41000000 (8.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_slot_unmasked _0_ok = $0 -splat_4_constants _8_m11(0..3) = 0x41A00000 (20.0) -splat_4_constants _8_m11(4..7) = 0x41A00000 (20.0) -splat_4_constants _8_m11(8..11) = 0x41A00000 (20.0) -splat_4_constants _8_m11(12..15) = 0x41A00000 (20.0) +copy_4_immutables_unmasked _8_m11(0..3) = i36..39 [0x41A00000 (20.0), 0x41A00000 (20.0), 0x41A00000 (20.0), 0x41A00000 (20.0)] +copy_4_immutables_unmasked _8_m11(4..7) = i40..43 [0x41A00000 (20.0), 0x41A00000 (20.0), 0x41A00000 (20.0), 0x41A00000 (20.0)] +copy_4_immutables_unmasked _8_m11(8..11) = i44..47 [0x41A00000 (20.0), 0x41A00000 (20.0), 0x41A00000 (20.0), 0x41A00000 (20.0)] +copy_4_immutables_unmasked _8_m11(12..15) = i48..51 [0x41A00000 (20.0), 0x41A00000 (20.0), 0x41A00000 (20.0), 0x41A00000 (20.0)] copy_4_slots_unmasked $0..3 = _8_m11(0..3) copy_4_slots_unmasked $4..7 = _8_m11(4..7) copy_4_slots_unmasked $8..11 = _8_m11(8..11) copy_4_slots_unmasked $12..15 = _8_m11(12..15) -copy_4_slots_unmasked $16..19 = _7_m10(0..3) -copy_4_slots_unmasked $20..23 = _7_m10(4..7) -copy_4_slots_unmasked $24..27 = _7_m10(8..11) -copy_4_slots_unmasked $28..31 = _7_m10(12..15) +copy_4_immutables_unmasked $16..19 = i20..23 [0x41300000 (11.0), 0, 0, 0] +copy_4_immutables_unmasked $20..23 = i24..27 [0, 0x41300000 (11.0), 0, 0] +copy_4_immutables_unmasked $24..27 = i28..31 [0, 0, 0x41300000 (11.0), 0] +copy_4_immutables_unmasked $28..31 = i32..35 [0, 0, 0, 0x41300000 (11.0)] sub_n_floats $0..15 -= $16..31 copy_4_slots_unmasked _8_m11(0..3) = $0..3 copy_4_slots_unmasked _8_m11(4..7) = $4..7 @@ -150,13 +163,10 @@ copy_4_slots_unmasked $1..4 = _8_m11(0..3) copy_4_slots_unmasked $5..8 = _8_m11(4..7) copy_4_slots_unmasked $9..12 = _8_m11(8..11) copy_4_slots_unmasked $13..16 = _8_m11(12..15) -copy_constant $17 = 0x41100000 (9.0) -splat_4_constants $18..21 = 0x41A00000 (20.0) -copy_constant $22 = 0x41100000 (9.0) -splat_4_constants $23..26 = 0x41A00000 (20.0) -copy_constant $27 = 0x41100000 (9.0) -splat_4_constants $28..31 = 0x41A00000 (20.0) -copy_constant $32 = 0x41100000 (9.0) +copy_4_immutables_unmasked $17..20 = i52..55 [0x41100000 (9.0), 0x41A00000 (20.0), 0x41A00000 (20.0), 0x41A00000 (20.0)] +copy_4_immutables_unmasked $21..24 = i56..59 [0x41A00000 (20.0), 0x41100000 (9.0), 0x41A00000 (20.0), 0x41A00000 (20.0)] +copy_4_immutables_unmasked $25..28 = i60..63 [0x41A00000 (20.0), 0x41A00000 (20.0), 0x41100000 (9.0), 0x41A00000 (20.0)] +copy_4_immutables_unmasked $29..32 = i64..67 [0x41A00000 (20.0), 0x41A00000 (20.0), 0x41A00000 (20.0), 0x41100000 (9.0)] cmpeq_n_floats $1..16 = equal($1..16, $17..32) bitwise_and_4_ints $9..12 &= $13..16 bitwise_and_4_ints $5..8 &= $9..12 @@ -170,18 +180,12 @@ store_condition_mask $68 = CondMask copy_slot_unmasked $69 = _0_ok copy_constant $34 = 0 merge_condition_mask CondMask = $68 & $69 -branch_if_no_lanes_active branch_if_no_lanes_active +170 (label 2 at #288) +branch_if_no_lanes_active branch_if_no_lanes_active +138 (label 2 at #236) copy_constant ok = 0xFFFFFFFF -copy_constant m1(0) = 0x3F800000 (1.0) -copy_constant m1(1) = 0x40000000 (2.0) -copy_constant m1(2) = 0x40400000 (3.0) -copy_constant m1(3) = 0x40800000 (4.0) +copy_4_immutables_unmasked m1 = i0..3 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] copy_4_slots_unmasked $35..38 = ok, m1(0..2) copy_slot_unmasked $39 = m1(3) -copy_constant $40 = 0x3F800000 (1.0) -copy_constant $41 = 0x40000000 (2.0) -copy_constant $42 = 0x40400000 (3.0) -copy_constant $43 = 0x40800000 (4.0) +copy_4_immutables_unmasked $40..43 = i0..3 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] cmpeq_4_floats $36..39 = equal($36..39, $40..43) bitwise_and_2_ints $36..37 &= $38..39 bitwise_and_int $36 &= $37 @@ -190,35 +194,26 @@ copy_slot_masked ok = Mask($35) copy_4_slots_unmasked m3 = m1 copy_slot_unmasked $35 = ok copy_4_slots_unmasked $36..39 = m3 -copy_constant $40 = 0x3F800000 (1.0) -copy_constant $41 = 0x40000000 (2.0) -copy_constant $42 = 0x40400000 (3.0) -copy_constant $43 = 0x40800000 (4.0) +copy_4_immutables_unmasked $40..43 = i0..3 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] cmpeq_4_floats $36..39 = equal($36..39, $40..43) bitwise_and_2_ints $36..37 &= $38..39 bitwise_and_int $36 &= $37 bitwise_and_int $35 &= $36 copy_slot_masked ok = Mask($35) -copy_slot_unmasked $35 = ok -copy_4_slots_unmasked $36..39 = m4 -copy_constant $40 = 0x40C00000 (6.0) -splat_2_constants $41..42 = 0 -copy_constant $43 = 0x40C00000 (6.0) +copy_4_immutables_unmasked $36..39 = i4..7 [0x40C00000 (6.0), 0, 0, 0x40C00000 (6.0)] +copy_4_immutables_unmasked $40..43 = i4..7 [0x40C00000 (6.0), 0, 0, 0x40C00000 (6.0)] cmpeq_4_floats $36..39 = equal($36..39, $40..43) bitwise_and_2_ints $36..37 &= $38..39 bitwise_and_int $36 &= $37 bitwise_and_int $35 &= $36 copy_slot_masked ok = Mask($35) copy_4_slots_unmasked $39..42 = m3 -copy_4_slots_unmasked $43..46 = m4 +copy_4_immutables_unmasked $43..46 = i4..7 [0x40C00000 (6.0), 0, 0, 0x40C00000 (6.0)] matrix_multiply_2 mat2x2($35..38) = mat2x2($39..42) * mat2x2($43..46) copy_4_slots_masked m3 = Mask($35..38) copy_slot_unmasked $35 = ok copy_4_slots_unmasked $36..39 = m3 -copy_constant $40 = 0x40C00000 (6.0) -copy_constant $41 = 0x41400000 (12.0) -copy_constant $42 = 0x41900000 (18.0) -copy_constant $43 = 0x41C00000 (24.0) +copy_4_immutables_unmasked $40..43 = i8..11 [0x40C00000 (6.0), 0x41400000 (12.0), 0x41900000 (18.0), 0x41C00000 (24.0)] cmpeq_4_floats $36..39 = equal($36..39, $40..43) bitwise_and_2_ints $36..37 &= $38..39 bitwise_and_int $36 &= $37 @@ -231,9 +226,7 @@ swizzle_4 $35..38 = ($35..38).yxxy copy_4_slots_unmasked m5 = $35..38 copy_slot_unmasked $35 = ok copy_4_slots_unmasked $36..39 = m5 -copy_constant $40 = 0x40800000 (4.0) -splat_2_constants $41..42 = 0 -copy_constant $43 = 0x40800000 (4.0) +copy_4_immutables_unmasked $40..43 = i12..15 [0x40800000 (4.0), 0, 0, 0x40800000 (4.0)] cmpeq_4_floats $36..39 = equal($36..39, $40..43) bitwise_and_2_ints $36..37 &= $38..39 bitwise_and_int $36 &= $37 @@ -245,35 +238,27 @@ add_4_floats $35..38 += $39..42 copy_4_slots_masked m1 = Mask($35..38) copy_4_slots_unmasked $35..38 = ok, m1(0..2) copy_slot_unmasked $39 = m1(3) -copy_constant $40 = 0x40A00000 (5.0) -copy_constant $41 = 0x40000000 (2.0) -copy_constant $42 = 0x40400000 (3.0) -copy_constant $43 = 0x41000000 (8.0) +copy_4_immutables_unmasked $40..43 = i16..19 [0x40A00000 (5.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x41000000 (8.0)] cmpeq_4_floats $36..39 = equal($36..39, $40..43) bitwise_and_2_ints $36..37 &= $38..39 bitwise_and_int $36 &= $37 bitwise_and_int $35 &= $36 copy_slot_masked ok = Mask($35) copy_slot_unmasked $35 = ok -copy_4_slots_unmasked $36..39 = m7 -copy_constant $40 = 0x40A00000 (5.0) -copy_constant $41 = 0x40C00000 (6.0) -copy_constant $42 = 0x40E00000 (7.0) -copy_constant $43 = 0x41000000 (8.0) +copy_4_immutables_unmasked $36..39 = i68..71 [0x40A00000 (5.0), 0x40C00000 (6.0), 0x40E00000 (7.0), 0x41000000 (8.0)] +copy_4_immutables_unmasked $40..43 = i68..71 [0x40A00000 (5.0), 0x40C00000 (6.0), 0x40E00000 (7.0), 0x41000000 (8.0)] cmpeq_4_floats $36..39 = equal($36..39, $40..43) bitwise_and_2_ints $36..37 &= $38..39 bitwise_and_int $36 &= $37 bitwise_and_int $35 &= $36 copy_slot_masked ok = Mask($35) copy_slot_unmasked $35 = ok -copy_4_slots_unmasked $36..39 = m9(0..3) -copy_4_slots_unmasked $40..43 = m9(4..7) -copy_slot_unmasked $44 = m9(8) -copy_constant $45 = 0x41100000 (9.0) -splat_3_constants $46..48 = 0 -copy_constant $49 = 0x41100000 (9.0) -splat_3_constants $50..52 = 0 -copy_constant $53 = 0x41100000 (9.0) +copy_4_immutables_unmasked $36..39 = i72..75 [0x41100000 (9.0), 0, 0, 0] +copy_4_immutables_unmasked $40..43 = i76..79 [0x41100000 (9.0), 0, 0, 0] +copy_immutable_unmasked $44 = i80 [0x41100000 (9.0)] +copy_4_immutables_unmasked $45..48 = i72..75 [0x41100000 (9.0), 0, 0, 0] +copy_4_immutables_unmasked $49..52 = i76..79 [0x41100000 (9.0), 0, 0, 0] +copy_immutable_unmasked $53 = i80 [0x41100000 (9.0)] cmpeq_n_floats $36..44 = equal($36..44, $45..53) bitwise_and_4_ints $37..40 &= $41..44 bitwise_and_2_ints $37..38 &= $39..40 @@ -281,18 +266,14 @@ bitwise_and_int $37 &= $38 bitwise_and_int $36 &= $37 bitwise_and_int $35 &= $36 copy_slot_masked ok = Mask($35) -copy_slot_unmasked $35 = ok -copy_4_slots_unmasked $36..39 = m10(0..3) -copy_4_slots_unmasked $40..43 = m10(4..7) -copy_4_slots_unmasked $44..47 = m10(8..11) -copy_4_slots_unmasked $48..51 = m10(12..15) -copy_constant $52 = 0x41300000 (11.0) -splat_4_constants $53..56 = 0 -copy_constant $57 = 0x41300000 (11.0) -splat_4_constants $58..61 = 0 -copy_constant $62 = 0x41300000 (11.0) -splat_4_constants $63..66 = 0 -copy_constant $67 = 0x41300000 (11.0) +copy_4_immutables_unmasked $36..39 = i20..23 [0x41300000 (11.0), 0, 0, 0] +copy_4_immutables_unmasked $40..43 = i24..27 [0, 0x41300000 (11.0), 0, 0] +copy_4_immutables_unmasked $44..47 = i28..31 [0, 0, 0x41300000 (11.0), 0] +copy_4_immutables_unmasked $48..51 = i32..35 [0, 0, 0, 0x41300000 (11.0)] +copy_4_immutables_unmasked $52..55 = i20..23 [0x41300000 (11.0), 0, 0, 0] +copy_4_immutables_unmasked $56..59 = i24..27 [0, 0x41300000 (11.0), 0, 0] +copy_4_immutables_unmasked $60..63 = i28..31 [0, 0, 0x41300000 (11.0), 0] +copy_4_immutables_unmasked $64..67 = i32..35 [0, 0, 0, 0x41300000 (11.0)] cmpeq_n_floats $36..51 = equal($36..51, $52..67) bitwise_and_4_ints $44..47 &= $48..51 bitwise_and_4_ints $40..43 &= $44..47 @@ -301,18 +282,18 @@ bitwise_and_2_ints $36..37 &= $38..39 bitwise_and_int $36 &= $37 bitwise_and_int $35 &= $36 copy_slot_masked ok = Mask($35) -splat_4_constants m11(0..3) = 0x41A00000 (20.0) -splat_4_constants m11(4..7) = 0x41A00000 (20.0) -splat_4_constants m11(8..11) = 0x41A00000 (20.0) -splat_4_constants m11(12..15) = 0x41A00000 (20.0) +copy_4_immutables_unmasked m11(0..3) = i36..39 [0x41A00000 (20.0), 0x41A00000 (20.0), 0x41A00000 (20.0), 0x41A00000 (20.0)] +copy_4_immutables_unmasked m11(4..7) = i40..43 [0x41A00000 (20.0), 0x41A00000 (20.0), 0x41A00000 (20.0), 0x41A00000 (20.0)] +copy_4_immutables_unmasked m11(8..11) = i44..47 [0x41A00000 (20.0), 0x41A00000 (20.0), 0x41A00000 (20.0), 0x41A00000 (20.0)] +copy_4_immutables_unmasked m11(12..15) = i48..51 [0x41A00000 (20.0), 0x41A00000 (20.0), 0x41A00000 (20.0), 0x41A00000 (20.0)] copy_4_slots_unmasked $35..38 = m11(0..3) copy_4_slots_unmasked $39..42 = m11(4..7) copy_4_slots_unmasked $43..46 = m11(8..11) copy_4_slots_unmasked $47..50 = m11(12..15) -copy_4_slots_unmasked $51..54 = m10(0..3) -copy_4_slots_unmasked $55..58 = m10(4..7) -copy_4_slots_unmasked $59..62 = m10(8..11) -copy_4_slots_unmasked $63..66 = m10(12..15) +copy_4_immutables_unmasked $51..54 = i20..23 [0x41300000 (11.0), 0, 0, 0] +copy_4_immutables_unmasked $55..58 = i24..27 [0, 0x41300000 (11.0), 0, 0] +copy_4_immutables_unmasked $59..62 = i28..31 [0, 0, 0x41300000 (11.0), 0] +copy_4_immutables_unmasked $63..66 = i32..35 [0, 0, 0, 0x41300000 (11.0)] sub_n_floats $35..50 -= $51..66 copy_4_slots_masked m11(0..3) = Mask($35..38) copy_4_slots_masked m11(4..7) = Mask($39..42) @@ -323,13 +304,10 @@ copy_4_slots_unmasked $36..39 = m11(0..3) copy_4_slots_unmasked $40..43 = m11(4..7) copy_4_slots_unmasked $44..47 = m11(8..11) copy_4_slots_unmasked $48..51 = m11(12..15) -copy_constant $52 = 0x41100000 (9.0) -splat_4_constants $53..56 = 0x41A00000 (20.0) -copy_constant $57 = 0x41100000 (9.0) -splat_4_constants $58..61 = 0x41A00000 (20.0) -copy_constant $62 = 0x41100000 (9.0) -splat_4_constants $63..66 = 0x41A00000 (20.0) -copy_constant $67 = 0x41100000 (9.0) +copy_4_immutables_unmasked $52..55 = i52..55 [0x41100000 (9.0), 0x41A00000 (20.0), 0x41A00000 (20.0), 0x41A00000 (20.0)] +copy_4_immutables_unmasked $56..59 = i56..59 [0x41A00000 (20.0), 0x41100000 (9.0), 0x41A00000 (20.0), 0x41A00000 (20.0)] +copy_4_immutables_unmasked $60..63 = i60..63 [0x41A00000 (20.0), 0x41A00000 (20.0), 0x41100000 (9.0), 0x41A00000 (20.0)] +copy_4_immutables_unmasked $64..67 = i64..67 [0x41A00000 (20.0), 0x41A00000 (20.0), 0x41A00000 (20.0), 0x41100000 (9.0)] cmpeq_n_floats $36..51 = equal($36..51, $52..67) bitwise_and_4_ints $44..47 &= $48..51 bitwise_and_4_ints $40..43 &= $44..47 @@ -344,18 +322,12 @@ label label 0x00000002 load_condition_mask CondMask = $68 copy_constant $0 = 0 merge_condition_mask CondMask = $33 & $34 -branch_if_no_lanes_active branch_if_no_lanes_active +20 (label 1 at #312) +branch_if_no_lanes_active branch_if_no_lanes_active +14 (label 1 at #254) splat_4_constants x = 0 splat_4_constants y = 0 -copy_constant $1 = 0x3F800000 (1.0) -copy_constant $2 = 0x40000000 (2.0) -copy_constant $3 = 0x40400000 (3.0) -copy_constant $4 = 0x40800000 (4.0) +copy_4_immutables_unmasked $1..4 = i0..3 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] copy_4_slots_masked x = Mask($1..4) -copy_constant $1 = 0x3F800000 (1.0) -copy_constant $2 = 0x40000000 (2.0) -copy_constant $3 = 0x40400000 (3.0) -copy_constant $4 = 0x40800000 (4.0) +copy_4_immutables_unmasked $1..4 = i0..3 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] copy_4_slots_masked y = Mask($1..4) copy_4_slots_unmasked $1..4 = x copy_4_slots_unmasked $5..8 = y diff --git a/tests/sksl/shared/Matrices.wgsl b/tests/sksl/shared/Matrices.wgsl index 51ac3a7980d2..a65d67009088 100644 --- a/tests/sksl/shared/Matrices.wgsl +++ b/tests/sksl/shared/Matrices.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, diff --git a/tests/sksl/shared/MatricesNonsquare.asm.frag b/tests/sksl/shared/MatricesNonsquare.asm.frag index c9b1f229acbc..42ec14c80506 100644 --- a/tests/sksl/shared/MatricesNonsquare.asm.frag +++ b/tests/sksl/shared/MatricesNonsquare.asm.frag @@ -1,545 +1,545 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %test_half_b "test_half_b" -OpName %ok "ok" -OpName %m23 "m23" -OpName %m24 "m24" -OpName %m32 "m32" -OpName %m34 "m34" -OpName %m42 "m42" -OpName %m43 "m43" -OpName %m22 "m22" -OpName %m33 "m33" -OpName %main "main" -OpName %_0_ok "_0_ok" -OpName %_1_m23 "_1_m23" -OpName %_2_m24 "_2_m24" -OpName %_3_m32 "_3_m32" -OpName %_7_m22 "_7_m22" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %11 Binding 0 -OpDecorate %11 DescriptorSet 0 -OpDecorate %m23 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %m24 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %59 RelaxedPrecision -OpDecorate %m32 RelaxedPrecision -OpDecorate %73 RelaxedPrecision -OpDecorate %75 RelaxedPrecision -OpDecorate %78 RelaxedPrecision -OpDecorate %m34 RelaxedPrecision -OpDecorate %92 RelaxedPrecision -OpDecorate %94 RelaxedPrecision -OpDecorate %97 RelaxedPrecision -OpDecorate %m42 RelaxedPrecision -OpDecorate %110 RelaxedPrecision -OpDecorate %112 RelaxedPrecision -OpDecorate %115 RelaxedPrecision -OpDecorate %118 RelaxedPrecision -OpDecorate %m43 RelaxedPrecision -OpDecorate %133 RelaxedPrecision -OpDecorate %135 RelaxedPrecision -OpDecorate %138 RelaxedPrecision -OpDecorate %141 RelaxedPrecision -OpDecorate %m22 RelaxedPrecision -OpDecorate %148 RelaxedPrecision -OpDecorate %155 RelaxedPrecision -OpDecorate %156 RelaxedPrecision -OpDecorate %158 RelaxedPrecision -OpDecorate %159 RelaxedPrecision -OpDecorate %m33 RelaxedPrecision -OpDecorate %166 RelaxedPrecision -OpDecorate %174 RelaxedPrecision -OpDecorate %175 RelaxedPrecision -OpDecorate %177 RelaxedPrecision -OpDecorate %178 RelaxedPrecision -OpDecorate %181 RelaxedPrecision -OpDecorate %182 RelaxedPrecision -OpDecorate %189 RelaxedPrecision -OpDecorate %190 RelaxedPrecision -OpDecorate %191 RelaxedPrecision -OpDecorate %197 RelaxedPrecision -OpDecorate %199 RelaxedPrecision -OpDecorate %205 RelaxedPrecision -OpDecorate %206 RelaxedPrecision -OpDecorate %207 RelaxedPrecision -OpDecorate %208 RelaxedPrecision -OpDecorate %216 RelaxedPrecision -OpDecorate %218 RelaxedPrecision -OpDecorate %221 RelaxedPrecision -OpDecorate %226 RelaxedPrecision -OpDecorate %233 RelaxedPrecision -OpDecorate %234 RelaxedPrecision -OpDecorate %236 RelaxedPrecision -OpDecorate %237 RelaxedPrecision -OpDecorate %337 RelaxedPrecision -OpDecorate %340 RelaxedPrecision -OpDecorate %341 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %test_half_b "test_half_b" + OpName %ok "ok" + OpName %m23 "m23" + OpName %m24 "m24" + OpName %m32 "m32" + OpName %m34 "m34" + OpName %m42 "m42" + OpName %m43 "m43" + OpName %m22 "m22" + OpName %m33 "m33" + OpName %main "main" + OpName %_0_ok "_0_ok" + OpName %_1_m23 "_1_m23" + OpName %_2_m24 "_2_m24" + OpName %_3_m32 "_3_m32" + OpName %_7_m22 "_7_m22" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %11 Binding 0 + OpDecorate %11 DescriptorSet 0 + OpDecorate %m23 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %m24 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %59 RelaxedPrecision + OpDecorate %m32 RelaxedPrecision + OpDecorate %73 RelaxedPrecision + OpDecorate %75 RelaxedPrecision + OpDecorate %78 RelaxedPrecision + OpDecorate %m34 RelaxedPrecision + OpDecorate %92 RelaxedPrecision + OpDecorate %94 RelaxedPrecision + OpDecorate %97 RelaxedPrecision + OpDecorate %m42 RelaxedPrecision + OpDecorate %110 RelaxedPrecision + OpDecorate %112 RelaxedPrecision + OpDecorate %115 RelaxedPrecision + OpDecorate %118 RelaxedPrecision + OpDecorate %m43 RelaxedPrecision + OpDecorate %133 RelaxedPrecision + OpDecorate %135 RelaxedPrecision + OpDecorate %138 RelaxedPrecision + OpDecorate %141 RelaxedPrecision + OpDecorate %m22 RelaxedPrecision + OpDecorate %148 RelaxedPrecision + OpDecorate %155 RelaxedPrecision + OpDecorate %156 RelaxedPrecision + OpDecorate %158 RelaxedPrecision + OpDecorate %159 RelaxedPrecision + OpDecorate %m33 RelaxedPrecision + OpDecorate %166 RelaxedPrecision + OpDecorate %174 RelaxedPrecision + OpDecorate %175 RelaxedPrecision + OpDecorate %177 RelaxedPrecision + OpDecorate %178 RelaxedPrecision + OpDecorate %181 RelaxedPrecision + OpDecorate %182 RelaxedPrecision + OpDecorate %189 RelaxedPrecision + OpDecorate %190 RelaxedPrecision + OpDecorate %191 RelaxedPrecision + OpDecorate %197 RelaxedPrecision + OpDecorate %199 RelaxedPrecision + OpDecorate %205 RelaxedPrecision + OpDecorate %206 RelaxedPrecision + OpDecorate %207 RelaxedPrecision + OpDecorate %208 RelaxedPrecision + OpDecorate %216 RelaxedPrecision + OpDecorate %218 RelaxedPrecision + OpDecorate %221 RelaxedPrecision + OpDecorate %226 RelaxedPrecision + OpDecorate %233 RelaxedPrecision + OpDecorate %234 RelaxedPrecision + OpDecorate %236 RelaxedPrecision + OpDecorate %237 RelaxedPrecision + OpDecorate %337 RelaxedPrecision + OpDecorate %340 RelaxedPrecision + OpDecorate %341 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%16 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%20 = OpConstantComposite %v2float %float_0 %float_0 + %11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %16 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %20 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%24 = OpTypeFunction %bool + %24 = OpTypeFunction %bool %_ptr_Function_bool = OpTypePointer Function %bool -%true = OpConstantTrue %bool -%v3float = OpTypeVector %float 3 + %true = OpConstantTrue %bool + %v3float = OpTypeVector %float 3 %mat2v3float = OpTypeMatrix %v3float 2 %_ptr_Function_mat2v3float = OpTypePointer Function %mat2v3float -%float_2 = OpConstant %float 2 -%34 = OpConstantComposite %v3float %float_2 %float_0 %float_0 -%35 = OpConstantComposite %v3float %float_0 %float_2 %float_0 -%36 = OpConstantComposite %mat2v3float %34 %35 -%false = OpConstantFalse %bool -%v3bool = OpTypeVector %bool 3 + %float_2 = OpConstant %float 2 + %34 = OpConstantComposite %v3float %float_2 %float_0 %float_0 + %35 = OpConstantComposite %v3float %float_0 %float_2 %float_0 + %36 = OpConstantComposite %mat2v3float %34 %35 + %false = OpConstantFalse %bool + %v3bool = OpTypeVector %bool 3 %mat2v4float = OpTypeMatrix %v4float 2 %_ptr_Function_mat2v4float = OpTypePointer Function %mat2v4float -%float_3 = OpConstant %float 3 -%51 = OpConstantComposite %v4float %float_3 %float_0 %float_0 %float_0 -%52 = OpConstantComposite %v4float %float_0 %float_3 %float_0 %float_0 -%53 = OpConstantComposite %mat2v4float %51 %52 -%v4bool = OpTypeVector %bool 4 + %float_3 = OpConstant %float 3 + %51 = OpConstantComposite %v4float %float_3 %float_0 %float_0 %float_0 + %52 = OpConstantComposite %v4float %float_0 %float_3 %float_0 %float_0 + %53 = OpConstantComposite %mat2v4float %51 %52 + %v4bool = OpTypeVector %bool 4 %mat3v2float = OpTypeMatrix %v2float 3 %_ptr_Function_mat3v2float = OpTypePointer Function %mat3v2float -%float_4 = OpConstant %float 4 -%67 = OpConstantComposite %v2float %float_4 %float_0 -%68 = OpConstantComposite %v2float %float_0 %float_4 -%69 = OpConstantComposite %mat3v2float %67 %68 %20 -%v2bool = OpTypeVector %bool 2 + %float_4 = OpConstant %float 4 + %67 = OpConstantComposite %v2float %float_4 %float_0 + %68 = OpConstantComposite %v2float %float_0 %float_4 + %69 = OpConstantComposite %mat3v2float %67 %68 %20 + %v2bool = OpTypeVector %bool 2 %mat3v4float = OpTypeMatrix %v4float 3 %_ptr_Function_mat3v4float = OpTypePointer Function %mat3v4float -%float_5 = OpConstant %float 5 -%86 = OpConstantComposite %v4float %float_5 %float_0 %float_0 %float_0 -%87 = OpConstantComposite %v4float %float_0 %float_5 %float_0 %float_0 -%88 = OpConstantComposite %v4float %float_0 %float_0 %float_5 %float_0 -%89 = OpConstantComposite %mat3v4float %86 %87 %88 + %float_5 = OpConstant %float 5 + %86 = OpConstantComposite %v4float %float_5 %float_0 %float_0 %float_0 + %87 = OpConstantComposite %v4float %float_0 %float_5 %float_0 %float_0 + %88 = OpConstantComposite %v4float %float_0 %float_0 %float_5 %float_0 + %89 = OpConstantComposite %mat3v4float %86 %87 %88 %mat4v2float = OpTypeMatrix %v2float 4 %_ptr_Function_mat4v2float = OpTypePointer Function %mat4v2float -%float_6 = OpConstant %float 6 -%105 = OpConstantComposite %v2float %float_6 %float_0 -%106 = OpConstantComposite %v2float %float_0 %float_6 -%107 = OpConstantComposite %mat4v2float %105 %106 %20 %20 + %float_6 = OpConstant %float 6 + %105 = OpConstantComposite %v2float %float_6 %float_0 + %106 = OpConstantComposite %v2float %float_0 %float_6 + %107 = OpConstantComposite %mat4v2float %105 %106 %20 %20 %mat4v3float = OpTypeMatrix %v3float 4 %_ptr_Function_mat4v3float = OpTypePointer Function %mat4v3float -%float_7 = OpConstant %float 7 -%126 = OpConstantComposite %v3float %float_7 %float_0 %float_0 -%127 = OpConstantComposite %v3float %float_0 %float_7 %float_0 -%128 = OpConstantComposite %v3float %float_0 %float_0 %float_7 -%129 = OpConstantComposite %v3float %float_0 %float_0 %float_0 -%130 = OpConstantComposite %mat4v3float %126 %127 %128 %129 + %float_7 = OpConstant %float 7 + %126 = OpConstantComposite %v3float %float_7 %float_0 %float_0 + %127 = OpConstantComposite %v3float %float_0 %float_7 %float_0 + %128 = OpConstantComposite %v3float %float_0 %float_0 %float_7 + %129 = OpConstantComposite %v3float %float_0 %float_0 %float_0 + %130 = OpConstantComposite %mat4v3float %126 %127 %128 %129 %mat2v2float = OpTypeMatrix %v2float 2 %_ptr_Function_mat2v2float = OpTypePointer Function %mat2v2float -%float_8 = OpConstant %float 8 -%152 = OpConstantComposite %v2float %float_8 %float_0 -%153 = OpConstantComposite %v2float %float_0 %float_8 -%154 = OpConstantComposite %mat2v2float %152 %153 + %float_8 = OpConstant %float 8 + %152 = OpConstantComposite %v2float %float_8 %float_0 + %153 = OpConstantComposite %v2float %float_0 %float_8 + %154 = OpConstantComposite %mat2v2float %152 %153 %mat3v3float = OpTypeMatrix %v3float 3 %_ptr_Function_mat3v3float = OpTypePointer Function %mat3v3float -%float_35 = OpConstant %float 35 -%170 = OpConstantComposite %v3float %float_35 %float_0 %float_0 -%171 = OpConstantComposite %v3float %float_0 %float_35 %float_0 -%172 = OpConstantComposite %v3float %float_0 %float_0 %float_35 -%173 = OpConstantComposite %mat3v3float %170 %171 %172 -%float_1 = OpConstant %float 1 -%187 = OpConstantComposite %v3float %float_1 %float_1 %float_1 -%188 = OpConstantComposite %mat2v3float %187 %187 -%194 = OpConstantComposite %v3float %float_3 %float_1 %float_1 -%195 = OpConstantComposite %v3float %float_1 %float_3 %float_1 -%196 = OpConstantComposite %mat2v3float %194 %195 -%203 = OpConstantComposite %v2float %float_2 %float_2 -%204 = OpConstantComposite %mat3v2float %203 %203 %203 -%float_n2 = OpConstant %float -2 -%212 = OpConstantComposite %v2float %float_2 %float_n2 -%213 = OpConstantComposite %v2float %float_n2 %float_2 -%214 = OpConstantComposite %v2float %float_n2 %float_n2 -%215 = OpConstantComposite %mat3v2float %212 %213 %214 -%float_0_25 = OpConstant %float 0.25 -%float_0_75 = OpConstant %float 0.75 -%230 = OpConstantComposite %v4float %float_0_75 %float_0 %float_0 %float_0 -%231 = OpConstantComposite %v4float %float_0 %float_0_75 %float_0 %float_0 -%232 = OpConstantComposite %mat2v4float %230 %231 -%241 = OpTypeFunction %v4float %_ptr_Function_v2float + %float_35 = OpConstant %float 35 + %170 = OpConstantComposite %v3float %float_35 %float_0 %float_0 + %171 = OpConstantComposite %v3float %float_0 %float_35 %float_0 + %172 = OpConstantComposite %v3float %float_0 %float_0 %float_35 + %173 = OpConstantComposite %mat3v3float %170 %171 %172 + %float_1 = OpConstant %float 1 + %187 = OpConstantComposite %v3float %float_1 %float_1 %float_1 + %188 = OpConstantComposite %mat2v3float %187 %187 + %194 = OpConstantComposite %v3float %float_3 %float_1 %float_1 + %195 = OpConstantComposite %v3float %float_1 %float_3 %float_1 + %196 = OpConstantComposite %mat2v3float %194 %195 + %203 = OpConstantComposite %v2float %float_2 %float_2 + %204 = OpConstantComposite %mat3v2float %203 %203 %203 + %float_n2 = OpConstant %float -2 + %212 = OpConstantComposite %v2float %float_2 %float_n2 + %213 = OpConstantComposite %v2float %float_n2 %float_2 + %214 = OpConstantComposite %v2float %float_n2 %float_n2 + %215 = OpConstantComposite %mat3v2float %212 %213 %214 + %float_0_25 = OpConstant %float 0.25 + %float_0_75 = OpConstant %float 0.75 + %230 = OpConstantComposite %v4float %float_0_75 %float_0 %float_0 %float_0 + %231 = OpConstantComposite %v4float %float_0 %float_0_75 %float_0 %float_0 + %232 = OpConstantComposite %mat2v4float %230 %231 + %241 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 %_entrypoint_v = OpFunction %void None %16 -%17 = OpLabel -%21 = OpVariable %_ptr_Function_v2float Function -OpStore %21 %20 -%23 = OpFunctionCall %v4float %main %21 -OpStore %sk_FragColor %23 -OpReturn -OpFunctionEnd + %17 = OpLabel + %21 = OpVariable %_ptr_Function_v2float Function + OpStore %21 %20 + %23 = OpFunctionCall %v4float %main %21 + OpStore %sk_FragColor %23 + OpReturn + OpFunctionEnd %test_half_b = OpFunction %bool None %24 -%25 = OpLabel -%ok = OpVariable %_ptr_Function_bool Function -%m23 = OpVariable %_ptr_Function_mat2v3float Function -%m24 = OpVariable %_ptr_Function_mat2v4float Function -%m32 = OpVariable %_ptr_Function_mat3v2float Function -%m34 = OpVariable %_ptr_Function_mat3v4float Function -%m42 = OpVariable %_ptr_Function_mat4v2float Function -%m43 = OpVariable %_ptr_Function_mat4v3float Function -%m22 = OpVariable %_ptr_Function_mat2v2float Function -%m33 = OpVariable %_ptr_Function_mat3v3float Function -OpStore %ok %true -OpStore %m23 %36 -OpSelectionMerge %39 None -OpBranchConditional %true %38 %39 -%38 = OpLabel -%41 = OpFOrdEqual %v3bool %34 %34 -%42 = OpAll %bool %41 -%43 = OpFOrdEqual %v3bool %35 %35 -%44 = OpAll %bool %43 -%45 = OpLogicalAnd %bool %42 %44 -OpBranch %39 -%39 = OpLabel -%46 = OpPhi %bool %false %25 %45 %38 -OpStore %ok %46 -OpStore %m24 %53 -OpSelectionMerge %55 None -OpBranchConditional %46 %54 %55 -%54 = OpLabel -%57 = OpFOrdEqual %v4bool %51 %51 -%58 = OpAll %bool %57 -%59 = OpFOrdEqual %v4bool %52 %52 -%60 = OpAll %bool %59 -%61 = OpLogicalAnd %bool %58 %60 -OpBranch %55 -%55 = OpLabel -%62 = OpPhi %bool %false %39 %61 %54 -OpStore %ok %62 -OpStore %m32 %69 -OpSelectionMerge %71 None -OpBranchConditional %62 %70 %71 -%70 = OpLabel -%73 = OpFOrdEqual %v2bool %67 %67 -%74 = OpAll %bool %73 -%75 = OpFOrdEqual %v2bool %68 %68 -%76 = OpAll %bool %75 -%77 = OpLogicalAnd %bool %74 %76 -%78 = OpFOrdEqual %v2bool %20 %20 -%79 = OpAll %bool %78 -%80 = OpLogicalAnd %bool %77 %79 -OpBranch %71 -%71 = OpLabel -%81 = OpPhi %bool %false %55 %80 %70 -OpStore %ok %81 -OpStore %m34 %89 -OpSelectionMerge %91 None -OpBranchConditional %81 %90 %91 -%90 = OpLabel -%92 = OpFOrdEqual %v4bool %86 %86 -%93 = OpAll %bool %92 -%94 = OpFOrdEqual %v4bool %87 %87 -%95 = OpAll %bool %94 -%96 = OpLogicalAnd %bool %93 %95 -%97 = OpFOrdEqual %v4bool %88 %88 -%98 = OpAll %bool %97 -%99 = OpLogicalAnd %bool %96 %98 -OpBranch %91 -%91 = OpLabel -%100 = OpPhi %bool %false %71 %99 %90 -OpStore %ok %100 -OpStore %m42 %107 -OpSelectionMerge %109 None -OpBranchConditional %100 %108 %109 -%108 = OpLabel -%110 = OpFOrdEqual %v2bool %105 %105 -%111 = OpAll %bool %110 -%112 = OpFOrdEqual %v2bool %106 %106 -%113 = OpAll %bool %112 -%114 = OpLogicalAnd %bool %111 %113 -%115 = OpFOrdEqual %v2bool %20 %20 -%116 = OpAll %bool %115 -%117 = OpLogicalAnd %bool %114 %116 -%118 = OpFOrdEqual %v2bool %20 %20 -%119 = OpAll %bool %118 -%120 = OpLogicalAnd %bool %117 %119 -OpBranch %109 -%109 = OpLabel -%121 = OpPhi %bool %false %91 %120 %108 -OpStore %ok %121 -OpStore %m43 %130 -OpSelectionMerge %132 None -OpBranchConditional %121 %131 %132 -%131 = OpLabel -%133 = OpFOrdEqual %v3bool %126 %126 -%134 = OpAll %bool %133 -%135 = OpFOrdEqual %v3bool %127 %127 -%136 = OpAll %bool %135 -%137 = OpLogicalAnd %bool %134 %136 -%138 = OpFOrdEqual %v3bool %128 %128 -%139 = OpAll %bool %138 -%140 = OpLogicalAnd %bool %137 %139 -%141 = OpFOrdEqual %v3bool %129 %129 -%142 = OpAll %bool %141 -%143 = OpLogicalAnd %bool %140 %142 -OpBranch %132 -%132 = OpLabel -%144 = OpPhi %bool %false %109 %143 %131 -OpStore %ok %144 -%148 = OpMatrixTimesMatrix %mat2v2float %69 %36 -OpStore %m22 %148 -OpSelectionMerge %150 None -OpBranchConditional %144 %149 %150 -%149 = OpLabel -%155 = OpCompositeExtract %v2float %148 0 -%156 = OpFOrdEqual %v2bool %155 %152 -%157 = OpAll %bool %156 -%158 = OpCompositeExtract %v2float %148 1 -%159 = OpFOrdEqual %v2bool %158 %153 -%160 = OpAll %bool %159 -%161 = OpLogicalAnd %bool %157 %160 -OpBranch %150 -%150 = OpLabel -%162 = OpPhi %bool %false %132 %161 %149 -OpStore %ok %162 -%166 = OpMatrixTimesMatrix %mat3v3float %130 %89 -OpStore %m33 %166 -OpSelectionMerge %168 None -OpBranchConditional %162 %167 %168 -%167 = OpLabel -%174 = OpCompositeExtract %v3float %166 0 -%175 = OpFOrdEqual %v3bool %174 %170 -%176 = OpAll %bool %175 -%177 = OpCompositeExtract %v3float %166 1 -%178 = OpFOrdEqual %v3bool %177 %171 -%179 = OpAll %bool %178 -%180 = OpLogicalAnd %bool %176 %179 -%181 = OpCompositeExtract %v3float %166 2 -%182 = OpFOrdEqual %v3bool %181 %172 -%183 = OpAll %bool %182 -%184 = OpLogicalAnd %bool %180 %183 -OpBranch %168 -%168 = OpLabel -%185 = OpPhi %bool %false %150 %184 %167 -OpStore %ok %185 -%189 = OpFAdd %v3float %34 %187 -%190 = OpFAdd %v3float %35 %187 -%191 = OpCompositeConstruct %mat2v3float %189 %190 -OpStore %m23 %191 -OpSelectionMerge %193 None -OpBranchConditional %185 %192 %193 -%192 = OpLabel -%197 = OpFOrdEqual %v3bool %189 %194 -%198 = OpAll %bool %197 -%199 = OpFOrdEqual %v3bool %190 %195 -%200 = OpAll %bool %199 -%201 = OpLogicalAnd %bool %198 %200 -OpBranch %193 -%193 = OpLabel -%202 = OpPhi %bool %false %168 %201 %192 -OpStore %ok %202 -%205 = OpFSub %v2float %67 %203 -%206 = OpFSub %v2float %68 %203 -%207 = OpFSub %v2float %20 %203 -%208 = OpCompositeConstruct %mat3v2float %205 %206 %207 -OpStore %m32 %208 -OpSelectionMerge %210 None -OpBranchConditional %202 %209 %210 -%209 = OpLabel -%216 = OpFOrdEqual %v2bool %205 %212 -%217 = OpAll %bool %216 -%218 = OpFOrdEqual %v2bool %206 %213 -%219 = OpAll %bool %218 -%220 = OpLogicalAnd %bool %217 %219 -%221 = OpFOrdEqual %v2bool %207 %214 -%222 = OpAll %bool %221 -%223 = OpLogicalAnd %bool %220 %222 -OpBranch %210 -%210 = OpLabel -%224 = OpPhi %bool %false %193 %223 %209 -OpStore %ok %224 -%226 = OpMatrixTimesScalar %mat2v4float %53 %float_0_25 -OpStore %m24 %226 -OpSelectionMerge %228 None -OpBranchConditional %224 %227 %228 -%227 = OpLabel -%233 = OpCompositeExtract %v4float %226 0 -%234 = OpFOrdEqual %v4bool %233 %230 -%235 = OpAll %bool %234 -%236 = OpCompositeExtract %v4float %226 1 -%237 = OpFOrdEqual %v4bool %236 %231 -%238 = OpAll %bool %237 -%239 = OpLogicalAnd %bool %235 %238 -OpBranch %228 -%228 = OpLabel -%240 = OpPhi %bool %false %210 %239 %227 -OpStore %ok %240 -OpReturnValue %240 -OpFunctionEnd -%main = OpFunction %v4float None %241 -%242 = OpFunctionParameter %_ptr_Function_v2float -%243 = OpLabel -%_0_ok = OpVariable %_ptr_Function_bool Function -%_1_m23 = OpVariable %_ptr_Function_mat2v3float Function -%_2_m24 = OpVariable %_ptr_Function_mat2v4float Function -%_3_m32 = OpVariable %_ptr_Function_mat3v2float Function -%_7_m22 = OpVariable %_ptr_Function_mat2v2float Function -%328 = OpVariable %_ptr_Function_v4float Function -OpStore %_0_ok %true -OpStore %_1_m23 %36 -OpSelectionMerge %247 None -OpBranchConditional %true %246 %247 -%246 = OpLabel -%248 = OpFOrdEqual %v3bool %34 %34 -%249 = OpAll %bool %248 -%250 = OpFOrdEqual %v3bool %35 %35 -%251 = OpAll %bool %250 -%252 = OpLogicalAnd %bool %249 %251 -OpBranch %247 -%247 = OpLabel -%253 = OpPhi %bool %false %243 %252 %246 -OpStore %_0_ok %253 -OpStore %_2_m24 %53 -OpSelectionMerge %256 None -OpBranchConditional %253 %255 %256 -%255 = OpLabel -%257 = OpFOrdEqual %v4bool %51 %51 -%258 = OpAll %bool %257 -%259 = OpFOrdEqual %v4bool %52 %52 -%260 = OpAll %bool %259 -%261 = OpLogicalAnd %bool %258 %260 -OpBranch %256 -%256 = OpLabel -%262 = OpPhi %bool %false %247 %261 %255 -OpStore %_0_ok %262 -OpStore %_3_m32 %69 -OpSelectionMerge %265 None -OpBranchConditional %262 %264 %265 -%264 = OpLabel -%266 = OpFOrdEqual %v2bool %67 %67 -%267 = OpAll %bool %266 -%268 = OpFOrdEqual %v2bool %68 %68 -%269 = OpAll %bool %268 -%270 = OpLogicalAnd %bool %267 %269 -%271 = OpFOrdEqual %v2bool %20 %20 -%272 = OpAll %bool %271 -%273 = OpLogicalAnd %bool %270 %272 -OpBranch %265 -%265 = OpLabel -%274 = OpPhi %bool %false %256 %273 %264 -OpStore %_0_ok %274 -%276 = OpMatrixTimesMatrix %mat2v2float %69 %36 -OpStore %_7_m22 %276 -OpSelectionMerge %278 None -OpBranchConditional %274 %277 %278 -%277 = OpLabel -%279 = OpCompositeExtract %v2float %276 0 -%280 = OpFOrdEqual %v2bool %279 %152 -%281 = OpAll %bool %280 -%282 = OpCompositeExtract %v2float %276 1 -%283 = OpFOrdEqual %v2bool %282 %153 -%284 = OpAll %bool %283 -%285 = OpLogicalAnd %bool %281 %284 -OpBranch %278 -%278 = OpLabel -%286 = OpPhi %bool %false %265 %285 %277 -OpStore %_0_ok %286 -%287 = OpFAdd %v3float %34 %187 -%288 = OpFAdd %v3float %35 %187 -%289 = OpCompositeConstruct %mat2v3float %287 %288 -OpStore %_1_m23 %289 -OpSelectionMerge %291 None -OpBranchConditional %286 %290 %291 -%290 = OpLabel -%292 = OpFOrdEqual %v3bool %287 %194 -%293 = OpAll %bool %292 -%294 = OpFOrdEqual %v3bool %288 %195 -%295 = OpAll %bool %294 -%296 = OpLogicalAnd %bool %293 %295 -OpBranch %291 -%291 = OpLabel -%297 = OpPhi %bool %false %278 %296 %290 -OpStore %_0_ok %297 -%298 = OpFSub %v2float %67 %203 -%299 = OpFSub %v2float %68 %203 -%300 = OpFSub %v2float %20 %203 -%301 = OpCompositeConstruct %mat3v2float %298 %299 %300 -OpStore %_3_m32 %301 -OpSelectionMerge %303 None -OpBranchConditional %297 %302 %303 -%302 = OpLabel -%304 = OpFOrdEqual %v2bool %298 %212 -%305 = OpAll %bool %304 -%306 = OpFOrdEqual %v2bool %299 %213 -%307 = OpAll %bool %306 -%308 = OpLogicalAnd %bool %305 %307 -%309 = OpFOrdEqual %v2bool %300 %214 -%310 = OpAll %bool %309 -%311 = OpLogicalAnd %bool %308 %310 -OpBranch %303 -%303 = OpLabel -%312 = OpPhi %bool %false %291 %311 %302 -OpStore %_0_ok %312 -%313 = OpMatrixTimesScalar %mat2v4float %53 %float_0_25 -OpStore %_2_m24 %313 -OpSelectionMerge %315 None -OpBranchConditional %312 %314 %315 -%314 = OpLabel -%316 = OpCompositeExtract %v4float %313 0 -%317 = OpFOrdEqual %v4bool %316 %230 -%318 = OpAll %bool %317 -%319 = OpCompositeExtract %v4float %313 1 -%320 = OpFOrdEqual %v4bool %319 %231 -%321 = OpAll %bool %320 -%322 = OpLogicalAnd %bool %318 %321 -OpBranch %315 -%315 = OpLabel -%323 = OpPhi %bool %false %303 %322 %314 -OpStore %_0_ok %323 -OpSelectionMerge %325 None -OpBranchConditional %323 %324 %325 -%324 = OpLabel -%326 = OpFunctionCall %bool %test_half_b -OpBranch %325 -%325 = OpLabel -%327 = OpPhi %bool %false %315 %326 %324 -OpSelectionMerge %332 None -OpBranchConditional %327 %330 %331 -%330 = OpLabel -%333 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 -%337 = OpLoad %v4float %333 -OpStore %328 %337 -OpBranch %332 -%331 = OpLabel -%338 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 -%340 = OpLoad %v4float %338 -OpStore %328 %340 -OpBranch %332 -%332 = OpLabel -%341 = OpLoad %v4float %328 -OpReturnValue %341 -OpFunctionEnd + %25 = OpLabel + %ok = OpVariable %_ptr_Function_bool Function + %m23 = OpVariable %_ptr_Function_mat2v3float Function + %m24 = OpVariable %_ptr_Function_mat2v4float Function + %m32 = OpVariable %_ptr_Function_mat3v2float Function + %m34 = OpVariable %_ptr_Function_mat3v4float Function + %m42 = OpVariable %_ptr_Function_mat4v2float Function + %m43 = OpVariable %_ptr_Function_mat4v3float Function + %m22 = OpVariable %_ptr_Function_mat2v2float Function + %m33 = OpVariable %_ptr_Function_mat3v3float Function + OpStore %ok %true + OpStore %m23 %36 + OpSelectionMerge %39 None + OpBranchConditional %true %38 %39 + %38 = OpLabel + %41 = OpFOrdEqual %v3bool %34 %34 + %42 = OpAll %bool %41 + %43 = OpFOrdEqual %v3bool %35 %35 + %44 = OpAll %bool %43 + %45 = OpLogicalAnd %bool %42 %44 + OpBranch %39 + %39 = OpLabel + %46 = OpPhi %bool %false %25 %45 %38 + OpStore %ok %46 + OpStore %m24 %53 + OpSelectionMerge %55 None + OpBranchConditional %46 %54 %55 + %54 = OpLabel + %57 = OpFOrdEqual %v4bool %51 %51 + %58 = OpAll %bool %57 + %59 = OpFOrdEqual %v4bool %52 %52 + %60 = OpAll %bool %59 + %61 = OpLogicalAnd %bool %58 %60 + OpBranch %55 + %55 = OpLabel + %62 = OpPhi %bool %false %39 %61 %54 + OpStore %ok %62 + OpStore %m32 %69 + OpSelectionMerge %71 None + OpBranchConditional %62 %70 %71 + %70 = OpLabel + %73 = OpFOrdEqual %v2bool %67 %67 + %74 = OpAll %bool %73 + %75 = OpFOrdEqual %v2bool %68 %68 + %76 = OpAll %bool %75 + %77 = OpLogicalAnd %bool %74 %76 + %78 = OpFOrdEqual %v2bool %20 %20 + %79 = OpAll %bool %78 + %80 = OpLogicalAnd %bool %77 %79 + OpBranch %71 + %71 = OpLabel + %81 = OpPhi %bool %false %55 %80 %70 + OpStore %ok %81 + OpStore %m34 %89 + OpSelectionMerge %91 None + OpBranchConditional %81 %90 %91 + %90 = OpLabel + %92 = OpFOrdEqual %v4bool %86 %86 + %93 = OpAll %bool %92 + %94 = OpFOrdEqual %v4bool %87 %87 + %95 = OpAll %bool %94 + %96 = OpLogicalAnd %bool %93 %95 + %97 = OpFOrdEqual %v4bool %88 %88 + %98 = OpAll %bool %97 + %99 = OpLogicalAnd %bool %96 %98 + OpBranch %91 + %91 = OpLabel + %100 = OpPhi %bool %false %71 %99 %90 + OpStore %ok %100 + OpStore %m42 %107 + OpSelectionMerge %109 None + OpBranchConditional %100 %108 %109 + %108 = OpLabel + %110 = OpFOrdEqual %v2bool %105 %105 + %111 = OpAll %bool %110 + %112 = OpFOrdEqual %v2bool %106 %106 + %113 = OpAll %bool %112 + %114 = OpLogicalAnd %bool %111 %113 + %115 = OpFOrdEqual %v2bool %20 %20 + %116 = OpAll %bool %115 + %117 = OpLogicalAnd %bool %114 %116 + %118 = OpFOrdEqual %v2bool %20 %20 + %119 = OpAll %bool %118 + %120 = OpLogicalAnd %bool %117 %119 + OpBranch %109 + %109 = OpLabel + %121 = OpPhi %bool %false %91 %120 %108 + OpStore %ok %121 + OpStore %m43 %130 + OpSelectionMerge %132 None + OpBranchConditional %121 %131 %132 + %131 = OpLabel + %133 = OpFOrdEqual %v3bool %126 %126 + %134 = OpAll %bool %133 + %135 = OpFOrdEqual %v3bool %127 %127 + %136 = OpAll %bool %135 + %137 = OpLogicalAnd %bool %134 %136 + %138 = OpFOrdEqual %v3bool %128 %128 + %139 = OpAll %bool %138 + %140 = OpLogicalAnd %bool %137 %139 + %141 = OpFOrdEqual %v3bool %129 %129 + %142 = OpAll %bool %141 + %143 = OpLogicalAnd %bool %140 %142 + OpBranch %132 + %132 = OpLabel + %144 = OpPhi %bool %false %109 %143 %131 + OpStore %ok %144 + %148 = OpMatrixTimesMatrix %mat2v2float %69 %36 + OpStore %m22 %148 + OpSelectionMerge %150 None + OpBranchConditional %144 %149 %150 + %149 = OpLabel + %155 = OpCompositeExtract %v2float %148 0 + %156 = OpFOrdEqual %v2bool %155 %152 + %157 = OpAll %bool %156 + %158 = OpCompositeExtract %v2float %148 1 + %159 = OpFOrdEqual %v2bool %158 %153 + %160 = OpAll %bool %159 + %161 = OpLogicalAnd %bool %157 %160 + OpBranch %150 + %150 = OpLabel + %162 = OpPhi %bool %false %132 %161 %149 + OpStore %ok %162 + %166 = OpMatrixTimesMatrix %mat3v3float %130 %89 + OpStore %m33 %166 + OpSelectionMerge %168 None + OpBranchConditional %162 %167 %168 + %167 = OpLabel + %174 = OpCompositeExtract %v3float %166 0 + %175 = OpFOrdEqual %v3bool %174 %170 + %176 = OpAll %bool %175 + %177 = OpCompositeExtract %v3float %166 1 + %178 = OpFOrdEqual %v3bool %177 %171 + %179 = OpAll %bool %178 + %180 = OpLogicalAnd %bool %176 %179 + %181 = OpCompositeExtract %v3float %166 2 + %182 = OpFOrdEqual %v3bool %181 %172 + %183 = OpAll %bool %182 + %184 = OpLogicalAnd %bool %180 %183 + OpBranch %168 + %168 = OpLabel + %185 = OpPhi %bool %false %150 %184 %167 + OpStore %ok %185 + %189 = OpFAdd %v3float %34 %187 + %190 = OpFAdd %v3float %35 %187 + %191 = OpCompositeConstruct %mat2v3float %189 %190 + OpStore %m23 %191 + OpSelectionMerge %193 None + OpBranchConditional %185 %192 %193 + %192 = OpLabel + %197 = OpFOrdEqual %v3bool %189 %194 + %198 = OpAll %bool %197 + %199 = OpFOrdEqual %v3bool %190 %195 + %200 = OpAll %bool %199 + %201 = OpLogicalAnd %bool %198 %200 + OpBranch %193 + %193 = OpLabel + %202 = OpPhi %bool %false %168 %201 %192 + OpStore %ok %202 + %205 = OpFSub %v2float %67 %203 + %206 = OpFSub %v2float %68 %203 + %207 = OpFSub %v2float %20 %203 + %208 = OpCompositeConstruct %mat3v2float %205 %206 %207 + OpStore %m32 %208 + OpSelectionMerge %210 None + OpBranchConditional %202 %209 %210 + %209 = OpLabel + %216 = OpFOrdEqual %v2bool %205 %212 + %217 = OpAll %bool %216 + %218 = OpFOrdEqual %v2bool %206 %213 + %219 = OpAll %bool %218 + %220 = OpLogicalAnd %bool %217 %219 + %221 = OpFOrdEqual %v2bool %207 %214 + %222 = OpAll %bool %221 + %223 = OpLogicalAnd %bool %220 %222 + OpBranch %210 + %210 = OpLabel + %224 = OpPhi %bool %false %193 %223 %209 + OpStore %ok %224 + %226 = OpMatrixTimesScalar %mat2v4float %53 %float_0_25 + OpStore %m24 %226 + OpSelectionMerge %228 None + OpBranchConditional %224 %227 %228 + %227 = OpLabel + %233 = OpCompositeExtract %v4float %226 0 + %234 = OpFOrdEqual %v4bool %233 %230 + %235 = OpAll %bool %234 + %236 = OpCompositeExtract %v4float %226 1 + %237 = OpFOrdEqual %v4bool %236 %231 + %238 = OpAll %bool %237 + %239 = OpLogicalAnd %bool %235 %238 + OpBranch %228 + %228 = OpLabel + %240 = OpPhi %bool %false %210 %239 %227 + OpStore %ok %240 + OpReturnValue %240 + OpFunctionEnd + %main = OpFunction %v4float None %241 + %242 = OpFunctionParameter %_ptr_Function_v2float + %243 = OpLabel + %_0_ok = OpVariable %_ptr_Function_bool Function + %_1_m23 = OpVariable %_ptr_Function_mat2v3float Function + %_2_m24 = OpVariable %_ptr_Function_mat2v4float Function + %_3_m32 = OpVariable %_ptr_Function_mat3v2float Function + %_7_m22 = OpVariable %_ptr_Function_mat2v2float Function + %328 = OpVariable %_ptr_Function_v4float Function + OpStore %_0_ok %true + OpStore %_1_m23 %36 + OpSelectionMerge %247 None + OpBranchConditional %true %246 %247 + %246 = OpLabel + %248 = OpFOrdEqual %v3bool %34 %34 + %249 = OpAll %bool %248 + %250 = OpFOrdEqual %v3bool %35 %35 + %251 = OpAll %bool %250 + %252 = OpLogicalAnd %bool %249 %251 + OpBranch %247 + %247 = OpLabel + %253 = OpPhi %bool %false %243 %252 %246 + OpStore %_0_ok %253 + OpStore %_2_m24 %53 + OpSelectionMerge %256 None + OpBranchConditional %253 %255 %256 + %255 = OpLabel + %257 = OpFOrdEqual %v4bool %51 %51 + %258 = OpAll %bool %257 + %259 = OpFOrdEqual %v4bool %52 %52 + %260 = OpAll %bool %259 + %261 = OpLogicalAnd %bool %258 %260 + OpBranch %256 + %256 = OpLabel + %262 = OpPhi %bool %false %247 %261 %255 + OpStore %_0_ok %262 + OpStore %_3_m32 %69 + OpSelectionMerge %265 None + OpBranchConditional %262 %264 %265 + %264 = OpLabel + %266 = OpFOrdEqual %v2bool %67 %67 + %267 = OpAll %bool %266 + %268 = OpFOrdEqual %v2bool %68 %68 + %269 = OpAll %bool %268 + %270 = OpLogicalAnd %bool %267 %269 + %271 = OpFOrdEqual %v2bool %20 %20 + %272 = OpAll %bool %271 + %273 = OpLogicalAnd %bool %270 %272 + OpBranch %265 + %265 = OpLabel + %274 = OpPhi %bool %false %256 %273 %264 + OpStore %_0_ok %274 + %276 = OpMatrixTimesMatrix %mat2v2float %69 %36 + OpStore %_7_m22 %276 + OpSelectionMerge %278 None + OpBranchConditional %274 %277 %278 + %277 = OpLabel + %279 = OpCompositeExtract %v2float %276 0 + %280 = OpFOrdEqual %v2bool %279 %152 + %281 = OpAll %bool %280 + %282 = OpCompositeExtract %v2float %276 1 + %283 = OpFOrdEqual %v2bool %282 %153 + %284 = OpAll %bool %283 + %285 = OpLogicalAnd %bool %281 %284 + OpBranch %278 + %278 = OpLabel + %286 = OpPhi %bool %false %265 %285 %277 + OpStore %_0_ok %286 + %287 = OpFAdd %v3float %34 %187 + %288 = OpFAdd %v3float %35 %187 + %289 = OpCompositeConstruct %mat2v3float %287 %288 + OpStore %_1_m23 %289 + OpSelectionMerge %291 None + OpBranchConditional %286 %290 %291 + %290 = OpLabel + %292 = OpFOrdEqual %v3bool %287 %194 + %293 = OpAll %bool %292 + %294 = OpFOrdEqual %v3bool %288 %195 + %295 = OpAll %bool %294 + %296 = OpLogicalAnd %bool %293 %295 + OpBranch %291 + %291 = OpLabel + %297 = OpPhi %bool %false %278 %296 %290 + OpStore %_0_ok %297 + %298 = OpFSub %v2float %67 %203 + %299 = OpFSub %v2float %68 %203 + %300 = OpFSub %v2float %20 %203 + %301 = OpCompositeConstruct %mat3v2float %298 %299 %300 + OpStore %_3_m32 %301 + OpSelectionMerge %303 None + OpBranchConditional %297 %302 %303 + %302 = OpLabel + %304 = OpFOrdEqual %v2bool %298 %212 + %305 = OpAll %bool %304 + %306 = OpFOrdEqual %v2bool %299 %213 + %307 = OpAll %bool %306 + %308 = OpLogicalAnd %bool %305 %307 + %309 = OpFOrdEqual %v2bool %300 %214 + %310 = OpAll %bool %309 + %311 = OpLogicalAnd %bool %308 %310 + OpBranch %303 + %303 = OpLabel + %312 = OpPhi %bool %false %291 %311 %302 + OpStore %_0_ok %312 + %313 = OpMatrixTimesScalar %mat2v4float %53 %float_0_25 + OpStore %_2_m24 %313 + OpSelectionMerge %315 None + OpBranchConditional %312 %314 %315 + %314 = OpLabel + %316 = OpCompositeExtract %v4float %313 0 + %317 = OpFOrdEqual %v4bool %316 %230 + %318 = OpAll %bool %317 + %319 = OpCompositeExtract %v4float %313 1 + %320 = OpFOrdEqual %v4bool %319 %231 + %321 = OpAll %bool %320 + %322 = OpLogicalAnd %bool %318 %321 + OpBranch %315 + %315 = OpLabel + %323 = OpPhi %bool %false %303 %322 %314 + OpStore %_0_ok %323 + OpSelectionMerge %325 None + OpBranchConditional %323 %324 %325 + %324 = OpLabel + %326 = OpFunctionCall %bool %test_half_b + OpBranch %325 + %325 = OpLabel + %327 = OpPhi %bool %false %315 %326 %324 + OpSelectionMerge %332 None + OpBranchConditional %327 %330 %331 + %330 = OpLabel + %333 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 + %337 = OpLoad %v4float %333 + OpStore %328 %337 + OpBranch %332 + %331 = OpLabel + %338 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 + %340 = OpLoad %v4float %338 + OpStore %328 %340 + OpBranch %332 + %332 = OpLabel + %341 = OpLoad %v4float %328 + OpReturnValue %341 + OpFunctionEnd diff --git a/tests/sksl/shared/MatricesNonsquare.skrp b/tests/sksl/shared/MatricesNonsquare.skrp index 784c9c55ec33..00ac6a6c5f67 100644 --- a/tests/sksl/shared/MatricesNonsquare.skrp +++ b/tests/sksl/shared/MatricesNonsquare.skrp @@ -1,36 +1,78 @@ +311 instructions + [immutable slots] -m34(0) = 0x40A00000 (5.0) -m34(1) = 0 -m34(2) = 0 -m34(3) = 0 -m34(4) = 0 -m34(5) = 0x40A00000 (5.0) -m34(6) = 0 -m34(7) = 0 -m34(8) = 0 -m34(9) = 0 -m34(10) = 0x40A00000 (5.0) -m34(11) = 0 -m42(0) = 0x40C00000 (6.0) -m42(1) = 0 -m42(2) = 0 -m42(3) = 0x40C00000 (6.0) -m42(4) = 0 -m42(5) = 0 -m42(6) = 0 -m42(7) = 0 -m43(0) = 0x40E00000 (7.0) -m43(1) = 0 -m43(2) = 0 -m43(3) = 0 -m43(4) = 0x40E00000 (7.0) -m43(5) = 0 -m43(6) = 0 -m43(7) = 0 -m43(8) = 0x40E00000 (7.0) -m43(9) = 0 -m43(10) = 0 -m43(11) = 0 +i0 = 0x40000000 (2.0) +i1 = 0 +i2 = 0 +i3 = 0 +i4 = 0x40000000 (2.0) +i5 = 0 +i6 = 0x40400000 (3.0) +i7 = 0 +i8 = 0 +i9 = 0 +i10 = 0 +i11 = 0x40400000 (3.0) +i12 = 0 +i13 = 0 +i14 = 0x40800000 (4.0) +i15 = 0 +i16 = 0 +i17 = 0x40800000 (4.0) +i18 = 0 +i19 = 0 +i20 = 0x40400000 (3.0) +i21 = 0x3F800000 (1.0) +i22 = 0x3F800000 (1.0) +i23 = 0x3F800000 (1.0) +i24 = 0x40400000 (3.0) +i25 = 0x3F800000 (1.0) +i26 = 0x40000000 (2.0) +i27 = 0xC0000000 (-2.0) +i28 = 0xC0000000 (-2.0) +i29 = 0x40000000 (2.0) +i30 = 0xC0000000 (-2.0) +i31 = 0xC0000000 (-2.0) +i32 = 0x3F400000 (0.75) +i33 = 0 +i34 = 0 +i35 = 0 +i36 = 0 +i37 = 0x3F400000 (0.75) +i38 = 0 +i39 = 0 +i40 = 0x40A00000 (5.0) +i41 = 0 +i42 = 0 +i43 = 0 +i44 = 0 +i45 = 0x40A00000 (5.0) +i46 = 0 +i47 = 0 +i48 = 0 +i49 = 0 +i50 = 0x40A00000 (5.0) +i51 = 0 +i52 = 0x40C00000 (6.0) +i53 = 0 +i54 = 0 +i55 = 0x40C00000 (6.0) +i56 = 0 +i57 = 0 +i58 = 0 +i59 = 0 +i60 = 0x40E00000 (7.0) +i61 = 0 +i62 = 0 +i63 = 0 +i64 = 0x40E00000 (7.0) +i65 = 0 +i66 = 0 +i67 = 0 +i68 = 0x40E00000 (7.0) +i69 = 0 +i70 = 0 +i71 = 0 store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -42,10 +84,8 @@ copy_4_slots_unmasked _1_m23(0..3) = $0..3 copy_2_slots_unmasked _1_m23(4..5) = $4..5 copy_4_slots_unmasked $0..3 = _0_ok, _1_m23(0..2) copy_3_slots_unmasked $4..6 = _1_m23(3..5) -copy_constant $7 = 0x40000000 (2.0) -splat_3_constants $8..10 = 0 -copy_constant $11 = 0x40000000 (2.0) -copy_constant $12 = 0 +copy_4_immutables_unmasked $7..10 = i0..3 [0x40000000 (2.0), 0, 0, 0] +copy_2_immutables_unmasked $11..12 = i4..5 [0x40000000 (2.0), 0] cmpeq_n_floats $1..6 = equal($1..6, $7..12) bitwise_and_3_ints $1..3 &= $4..6 bitwise_and_int $2 &= $3 @@ -60,10 +100,8 @@ copy_4_slots_unmasked _2_m24(4..7) = $4..7 copy_slot_unmasked $0 = _0_ok copy_4_slots_unmasked $1..4 = _2_m24(0..3) copy_4_slots_unmasked $5..8 = _2_m24(4..7) -copy_constant $9 = 0x40400000 (3.0) -splat_4_constants $10..13 = 0 -copy_constant $14 = 0x40400000 (3.0) -splat_2_constants $15..16 = 0 +copy_4_immutables_unmasked $9..12 = i6..9 [0x40400000 (3.0), 0, 0, 0] +copy_4_immutables_unmasked $13..16 = i10..13 [0, 0x40400000 (3.0), 0, 0] cmpeq_n_floats $1..8 = equal($1..8, $9..16) bitwise_and_4_ints $1..4 &= $5..8 bitwise_and_2_ints $1..2 &= $3..4 @@ -78,10 +116,8 @@ copy_2_slots_unmasked _3_m32(4..5) = $4..5 copy_slot_unmasked $0 = _0_ok copy_4_slots_unmasked $1..4 = _3_m32(0..3) copy_2_slots_unmasked $5..6 = _3_m32(4..5) -copy_constant $7 = 0x40800000 (4.0) -splat_2_constants $8..9 = 0 -copy_constant $10 = 0x40800000 (4.0) -splat_2_constants $11..12 = 0 +copy_4_immutables_unmasked $7..10 = i14..17 [0x40800000 (4.0), 0, 0, 0x40800000 (4.0)] +copy_2_immutables_unmasked $11..12 = i18..19 [0, 0] cmpeq_n_floats $1..6 = equal($1..6, $7..12) bitwise_and_3_ints $1..3 &= $4..6 bitwise_and_int $2 &= $3 @@ -113,10 +149,8 @@ copy_4_slots_unmasked _1_m23(0..3) = $0..3 copy_2_slots_unmasked _1_m23(4..5) = $4..5 copy_4_slots_unmasked $0..3 = _0_ok, _1_m23(0..2) copy_3_slots_unmasked $4..6 = _1_m23(3..5) -copy_constant $7 = 0x40400000 (3.0) -splat_3_constants $8..10 = 0x3F800000 (1.0) -copy_constant $11 = 0x40400000 (3.0) -copy_constant $12 = 0x3F800000 (1.0) +copy_4_immutables_unmasked $7..10 = i20..23 [0x40400000 (3.0), 0x3F800000 (1.0), 0x3F800000 (1.0), 0x3F800000 (1.0)] +copy_2_immutables_unmasked $11..12 = i24..25 [0x40400000 (3.0), 0x3F800000 (1.0)] cmpeq_n_floats $1..6 = equal($1..6, $7..12) bitwise_and_3_ints $1..3 &= $4..6 bitwise_and_int $2 &= $3 @@ -133,10 +167,8 @@ copy_2_slots_unmasked _3_m32(4..5) = $4..5 copy_slot_unmasked $0 = _0_ok copy_4_slots_unmasked $1..4 = _3_m32(0..3) copy_2_slots_unmasked $5..6 = _3_m32(4..5) -copy_constant $7 = 0x40000000 (2.0) -splat_2_constants $8..9 = 0xC0000000 (-2.0) -copy_constant $10 = 0x40000000 (2.0) -splat_2_constants $11..12 = 0xC0000000 (-2.0) +copy_4_immutables_unmasked $7..10 = i26..29 [0x40000000 (2.0), 0xC0000000 (-2.0), 0xC0000000 (-2.0), 0x40000000 (2.0)] +copy_2_immutables_unmasked $11..12 = i30..31 [0xC0000000 (-2.0), 0xC0000000 (-2.0)] cmpeq_n_floats $1..6 = equal($1..6, $7..12) bitwise_and_3_ints $1..3 &= $4..6 bitwise_and_int $2 &= $3 @@ -153,10 +185,8 @@ copy_4_slots_unmasked _2_m24(4..7) = $4..7 copy_slot_unmasked $0 = _0_ok copy_4_slots_unmasked $1..4 = _2_m24(0..3) copy_4_slots_unmasked $5..8 = _2_m24(4..7) -copy_constant $9 = 0x3F400000 (0.75) -splat_4_constants $10..13 = 0 -copy_constant $14 = 0x3F400000 (0.75) -splat_2_constants $15..16 = 0 +copy_4_immutables_unmasked $9..12 = i32..35 [0x3F400000 (0.75), 0, 0, 0] +copy_4_immutables_unmasked $13..16 = i36..39 [0, 0x3F400000 (0.75), 0, 0] cmpeq_n_floats $1..8 = equal($1..8, $9..16) bitwise_and_4_ints $1..4 &= $5..8 bitwise_and_2_ints $1..2 &= $3..4 @@ -167,7 +197,7 @@ store_condition_mask $34 = CondMask copy_slot_unmasked $35 = _0_ok copy_constant $0 = 0 merge_condition_mask CondMask = $34 & $35 -branch_if_no_lanes_active branch_if_no_lanes_active +203 (label 1 at #339) +branch_if_no_lanes_active branch_if_no_lanes_active +183 (label 1 at #307) copy_constant ok = 0xFFFFFFFF copy_constant $1 = 0 copy_constant $2 = 0x40000000 (2.0) @@ -176,10 +206,8 @@ copy_4_slots_unmasked m23(0..3) = $1..4 copy_2_slots_unmasked m23(4..5) = $5..6 copy_4_slots_unmasked $1..4 = ok, m23(0..2) copy_3_slots_unmasked $5..7 = m23(3..5) -copy_constant $8 = 0x40000000 (2.0) -splat_3_constants $9..11 = 0 -copy_constant $12 = 0x40000000 (2.0) -copy_constant $13 = 0 +copy_4_immutables_unmasked $8..11 = i0..3 [0x40000000 (2.0), 0, 0, 0] +copy_2_immutables_unmasked $12..13 = i4..5 [0x40000000 (2.0), 0] cmpeq_n_floats $2..7 = equal($2..7, $8..13) bitwise_and_3_ints $2..4 &= $5..7 bitwise_and_int $3 &= $4 @@ -194,10 +222,8 @@ copy_4_slots_unmasked m24(4..7) = $5..8 copy_slot_unmasked $1 = ok copy_4_slots_unmasked $2..5 = m24(0..3) copy_4_slots_unmasked $6..9 = m24(4..7) -copy_constant $10 = 0x40400000 (3.0) -splat_4_constants $11..14 = 0 -copy_constant $15 = 0x40400000 (3.0) -splat_2_constants $16..17 = 0 +copy_4_immutables_unmasked $10..13 = i6..9 [0x40400000 (3.0), 0, 0, 0] +copy_4_immutables_unmasked $14..17 = i10..13 [0, 0x40400000 (3.0), 0, 0] cmpeq_n_floats $2..9 = equal($2..9, $10..17) bitwise_and_4_ints $2..5 &= $6..9 bitwise_and_2_ints $2..3 &= $4..5 @@ -212,10 +238,8 @@ copy_2_slots_unmasked m32(4..5) = $5..6 copy_slot_unmasked $1 = ok copy_4_slots_unmasked $2..5 = m32(0..3) copy_2_slots_unmasked $6..7 = m32(4..5) -copy_constant $8 = 0x40800000 (4.0) -splat_2_constants $9..10 = 0 -copy_constant $11 = 0x40800000 (4.0) -splat_2_constants $12..13 = 0 +copy_4_immutables_unmasked $8..11 = i14..17 [0x40800000 (4.0), 0, 0, 0x40800000 (4.0)] +copy_2_immutables_unmasked $12..13 = i18..19 [0, 0] cmpeq_n_floats $2..7 = equal($2..7, $8..13) bitwise_and_3_ints $2..4 &= $5..7 bitwise_and_int $3 &= $4 @@ -223,15 +247,12 @@ bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 copy_slot_masked ok = Mask($1) copy_slot_unmasked $1 = ok -copy_4_slots_unmasked $2..5 = m34(0..3) -copy_4_slots_unmasked $6..9 = m34(4..7) -copy_4_slots_unmasked $10..13 = m34(8..11) -copy_constant $14 = 0x40A00000 (5.0) -splat_4_constants $15..18 = 0 -copy_constant $19 = 0x40A00000 (5.0) -splat_4_constants $20..23 = 0 -copy_constant $24 = 0x40A00000 (5.0) -copy_constant $25 = 0 +copy_4_immutables_unmasked $2..5 = i40..43 [0x40A00000 (5.0), 0, 0, 0] +copy_4_immutables_unmasked $6..9 = i44..47 [0, 0x40A00000 (5.0), 0, 0] +copy_4_immutables_unmasked $10..13 = i48..51 [0, 0, 0x40A00000 (5.0), 0] +copy_4_immutables_unmasked $14..17 = i40..43 [0x40A00000 (5.0), 0, 0, 0] +copy_4_immutables_unmasked $18..21 = i44..47 [0, 0x40A00000 (5.0), 0, 0] +copy_4_immutables_unmasked $22..25 = i48..51 [0, 0, 0x40A00000 (5.0), 0] cmpeq_n_floats $2..13 = equal($2..13, $14..25) bitwise_and_4_ints $6..9 &= $10..13 bitwise_and_4_ints $2..5 &= $6..9 @@ -240,12 +261,10 @@ bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 copy_slot_masked ok = Mask($1) copy_slot_unmasked $1 = ok -copy_4_slots_unmasked $2..5 = m42(0..3) -copy_4_slots_unmasked $6..9 = m42(4..7) -copy_constant $10 = 0x40C00000 (6.0) -splat_2_constants $11..12 = 0 -copy_constant $13 = 0x40C00000 (6.0) -splat_4_constants $14..17 = 0 +copy_4_immutables_unmasked $2..5 = i52..55 [0x40C00000 (6.0), 0, 0, 0x40C00000 (6.0)] +copy_4_immutables_unmasked $6..9 = i56..59 [0, 0, 0, 0] +copy_4_immutables_unmasked $10..13 = i52..55 [0x40C00000 (6.0), 0, 0, 0x40C00000 (6.0)] +copy_4_immutables_unmasked $14..17 = i56..59 [0, 0, 0, 0] cmpeq_n_floats $2..9 = equal($2..9, $10..17) bitwise_and_4_ints $2..5 &= $6..9 bitwise_and_2_ints $2..3 &= $4..5 @@ -253,15 +272,12 @@ bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 copy_slot_masked ok = Mask($1) copy_slot_unmasked $1 = ok -copy_4_slots_unmasked $2..5 = m43(0..3) -copy_4_slots_unmasked $6..9 = m43(4..7) -copy_4_slots_unmasked $10..13 = m43(8..11) -copy_constant $14 = 0x40E00000 (7.0) -splat_3_constants $15..17 = 0 -copy_constant $18 = 0x40E00000 (7.0) -splat_3_constants $19..21 = 0 -copy_constant $22 = 0x40E00000 (7.0) -splat_3_constants $23..25 = 0 +copy_4_immutables_unmasked $2..5 = i60..63 [0x40E00000 (7.0), 0, 0, 0] +copy_4_immutables_unmasked $6..9 = i64..67 [0x40E00000 (7.0), 0, 0, 0] +copy_4_immutables_unmasked $10..13 = i68..71 [0x40E00000 (7.0), 0, 0, 0] +copy_4_immutables_unmasked $14..17 = i60..63 [0x40E00000 (7.0), 0, 0, 0] +copy_4_immutables_unmasked $18..21 = i64..67 [0x40E00000 (7.0), 0, 0, 0] +copy_4_immutables_unmasked $22..25 = i68..71 [0x40E00000 (7.0), 0, 0, 0] cmpeq_n_floats $2..13 = equal($2..13, $14..25) bitwise_and_4_ints $6..9 &= $10..13 bitwise_and_4_ints $2..5 &= $6..9 @@ -285,12 +301,12 @@ bitwise_and_2_ints $2..3 &= $4..5 bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 copy_slot_masked ok = Mask($1) -copy_4_slots_unmasked $10..13 = m43(0..3) -copy_4_slots_unmasked $14..17 = m43(4..7) -copy_4_slots_unmasked $18..21 = m43(8..11) -copy_4_slots_unmasked $22..25 = m34(0..3) -copy_4_slots_unmasked $26..29 = m34(4..7) -copy_4_slots_unmasked $30..33 = m34(8..11) +copy_4_immutables_unmasked $10..13 = i60..63 [0x40E00000 (7.0), 0, 0, 0] +copy_4_immutables_unmasked $14..17 = i64..67 [0x40E00000 (7.0), 0, 0, 0] +copy_4_immutables_unmasked $18..21 = i68..71 [0x40E00000 (7.0), 0, 0, 0] +copy_4_immutables_unmasked $22..25 = i40..43 [0x40A00000 (5.0), 0, 0, 0] +copy_4_immutables_unmasked $26..29 = i44..47 [0, 0x40A00000 (5.0), 0, 0] +copy_4_immutables_unmasked $30..33 = i48..51 [0, 0, 0x40A00000 (5.0), 0] matrix_multiply_4 mat3x3($1..9) = mat4x3($10..21) * mat3x4($22..33) copy_4_slots_unmasked m33(0..3) = $1..4 copy_4_slots_unmasked m33(4..7) = $5..8 @@ -318,10 +334,8 @@ copy_4_slots_masked m23(0..3) = Mask($1..4) copy_2_slots_masked m23(4..5) = Mask($5..6) copy_4_slots_unmasked $1..4 = ok, m23(0..2) copy_3_slots_unmasked $5..7 = m23(3..5) -copy_constant $8 = 0x40400000 (3.0) -splat_3_constants $9..11 = 0x3F800000 (1.0) -copy_constant $12 = 0x40400000 (3.0) -copy_constant $13 = 0x3F800000 (1.0) +copy_4_immutables_unmasked $8..11 = i20..23 [0x40400000 (3.0), 0x3F800000 (1.0), 0x3F800000 (1.0), 0x3F800000 (1.0)] +copy_2_immutables_unmasked $12..13 = i24..25 [0x40400000 (3.0), 0x3F800000 (1.0)] cmpeq_n_floats $2..7 = equal($2..7, $8..13) bitwise_and_3_ints $2..4 &= $5..7 bitwise_and_int $3 &= $4 @@ -338,10 +352,8 @@ copy_2_slots_masked m32(4..5) = Mask($5..6) copy_slot_unmasked $1 = ok copy_4_slots_unmasked $2..5 = m32(0..3) copy_2_slots_unmasked $6..7 = m32(4..5) -copy_constant $8 = 0x40000000 (2.0) -splat_2_constants $9..10 = 0xC0000000 (-2.0) -copy_constant $11 = 0x40000000 (2.0) -splat_2_constants $12..13 = 0xC0000000 (-2.0) +copy_4_immutables_unmasked $8..11 = i26..29 [0x40000000 (2.0), 0xC0000000 (-2.0), 0xC0000000 (-2.0), 0x40000000 (2.0)] +copy_2_immutables_unmasked $12..13 = i30..31 [0xC0000000 (-2.0), 0xC0000000 (-2.0)] cmpeq_n_floats $2..7 = equal($2..7, $8..13) bitwise_and_3_ints $2..4 &= $5..7 bitwise_and_int $3 &= $4 @@ -358,10 +370,8 @@ copy_4_slots_masked m24(4..7) = Mask($5..8) copy_slot_unmasked $1 = ok copy_4_slots_unmasked $2..5 = m24(0..3) copy_4_slots_unmasked $6..9 = m24(4..7) -copy_constant $10 = 0x3F400000 (0.75) -splat_4_constants $11..14 = 0 -copy_constant $15 = 0x3F400000 (0.75) -splat_2_constants $16..17 = 0 +copy_4_immutables_unmasked $10..13 = i32..35 [0x3F400000 (0.75), 0, 0, 0] +copy_4_immutables_unmasked $14..17 = i36..39 [0, 0x3F400000 (0.75), 0, 0] cmpeq_n_floats $2..9 = equal($2..9, $10..17) bitwise_and_4_ints $2..5 &= $6..9 bitwise_and_2_ints $2..3 &= $4..5 diff --git a/tests/sksl/shared/MatricesNonsquare.wgsl b/tests/sksl/shared/MatricesNonsquare.wgsl new file mode 100644 index 000000000000..cf57bb28fe97 --- /dev/null +++ b/tests/sksl/shared/MatricesNonsquare.wgsl @@ -0,0 +1,98 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn test_half_b() -> bool { + { + var ok: bool = true; + var m23: mat2x3 = mat2x3(2.0, 0.0, 0.0, 0.0, 2.0, 0.0); + let _skTemp0 = mat2x3(2.0, 0.0, 0.0, 0.0, 2.0, 0.0); + ok = ok && (all(m23[0] == _skTemp0[0]) && all(m23[1] == _skTemp0[1])); + var m24: mat2x4 = mat2x4(3.0, 0.0, 0.0, 0.0, 0.0, 3.0, 0.0, 0.0); + let _skTemp1 = mat2x4(3.0, 0.0, 0.0, 0.0, 0.0, 3.0, 0.0, 0.0); + ok = ok && (all(m24[0] == _skTemp1[0]) && all(m24[1] == _skTemp1[1])); + var m32: mat3x2 = mat3x2(4.0, 0.0, 0.0, 4.0, 0.0, 0.0); + let _skTemp2 = mat3x2(4.0, 0.0, 0.0, 4.0, 0.0, 0.0); + ok = ok && (all(m32[0] == _skTemp2[0]) && all(m32[1] == _skTemp2[1]) && all(m32[2] == _skTemp2[2])); + var m34: mat3x4 = mat3x4(5.0, 0.0, 0.0, 0.0, 0.0, 5.0, 0.0, 0.0, 0.0, 0.0, 5.0, 0.0); + let _skTemp3 = mat3x4(5.0, 0.0, 0.0, 0.0, 0.0, 5.0, 0.0, 0.0, 0.0, 0.0, 5.0, 0.0); + ok = ok && (all(m34[0] == _skTemp3[0]) && all(m34[1] == _skTemp3[1]) && all(m34[2] == _skTemp3[2])); + var m42: mat4x2 = mat4x2(6.0, 0.0, 0.0, 6.0, 0.0, 0.0, 0.0, 0.0); + let _skTemp4 = mat4x2(6.0, 0.0, 0.0, 6.0, 0.0, 0.0, 0.0, 0.0); + ok = ok && (all(m42[0] == _skTemp4[0]) && all(m42[1] == _skTemp4[1]) && all(m42[2] == _skTemp4[2]) && all(m42[3] == _skTemp4[3])); + var m43: mat4x3 = mat4x3(7.0, 0.0, 0.0, 0.0, 7.0, 0.0, 0.0, 0.0, 7.0, 0.0, 0.0, 0.0); + let _skTemp5 = mat4x3(7.0, 0.0, 0.0, 0.0, 7.0, 0.0, 0.0, 0.0, 7.0, 0.0, 0.0, 0.0); + ok = ok && (all(m43[0] == _skTemp5[0]) && all(m43[1] == _skTemp5[1]) && all(m43[2] == _skTemp5[2]) && all(m43[3] == _skTemp5[3])); + var m22: mat2x2 = m32 * m23; + let _skTemp6 = mat2x2(8.0, 0.0, 0.0, 8.0); + ok = ok && (all(m22[0] == _skTemp6[0]) && all(m22[1] == _skTemp6[1])); + var m33: mat3x3 = m43 * m34; + let _skTemp7 = mat3x3(35.0, 0.0, 0.0, 0.0, 35.0, 0.0, 0.0, 0.0, 35.0); + ok = ok && (all(m33[0] == _skTemp7[0]) && all(m33[1] == _skTemp7[1]) && all(m33[2] == _skTemp7[2])); + m23 = m23 + mat2x3(1.0, 1.0, 1.0, 1.0, 1.0, 1.0); + let _skTemp8 = mat2x3(3.0, 1.0, 1.0, 1.0, 3.0, 1.0); + ok = ok && (all(m23[0] == _skTemp8[0]) && all(m23[1] == _skTemp8[1])); + m32 = m32 - mat3x2(2.0, 2.0, 2.0, 2.0, 2.0, 2.0); + let _skTemp9 = mat3x2(2.0, -2.0, -2.0, 2.0, -2.0, -2.0); + ok = ok && (all(m32[0] == _skTemp9[0]) && all(m32[1] == _skTemp9[1]) && all(m32[2] == _skTemp9[2])); + m24 = m24 * 0.25; + let _skTemp10 = mat2x4(0.75, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0, 0.0); + ok = ok && (all(m24[0] == _skTemp10[0]) && all(m24[1] == _skTemp10[1])); + return ok; + } +} +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var _0_ok: bool = true; + var _1_m23: mat2x3 = mat2x3(2.0, 0.0, 0.0, 0.0, 2.0, 0.0); + let _skTemp11 = mat2x3(2.0, 0.0, 0.0, 0.0, 2.0, 0.0); + _0_ok = _0_ok && (all(_1_m23[0] == _skTemp11[0]) && all(_1_m23[1] == _skTemp11[1])); + var _2_m24: mat2x4 = mat2x4(3.0, 0.0, 0.0, 0.0, 0.0, 3.0, 0.0, 0.0); + let _skTemp12 = mat2x4(3.0, 0.0, 0.0, 0.0, 0.0, 3.0, 0.0, 0.0); + _0_ok = _0_ok && (all(_2_m24[0] == _skTemp12[0]) && all(_2_m24[1] == _skTemp12[1])); + var _3_m32: mat3x2 = mat3x2(4.0, 0.0, 0.0, 4.0, 0.0, 0.0); + let _skTemp13 = mat3x2(4.0, 0.0, 0.0, 4.0, 0.0, 0.0); + _0_ok = _0_ok && (all(_3_m32[0] == _skTemp13[0]) && all(_3_m32[1] == _skTemp13[1]) && all(_3_m32[2] == _skTemp13[2])); + var _7_m22: mat2x2 = _3_m32 * _1_m23; + let _skTemp14 = mat2x2(8.0, 0.0, 0.0, 8.0); + _0_ok = _0_ok && (all(_7_m22[0] == _skTemp14[0]) && all(_7_m22[1] == _skTemp14[1])); + _1_m23 = _1_m23 + mat2x3(1.0, 1.0, 1.0, 1.0, 1.0, 1.0); + let _skTemp15 = mat2x3(3.0, 1.0, 1.0, 1.0, 3.0, 1.0); + _0_ok = _0_ok && (all(_1_m23[0] == _skTemp15[0]) && all(_1_m23[1] == _skTemp15[1])); + _3_m32 = _3_m32 - mat3x2(2.0, 2.0, 2.0, 2.0, 2.0, 2.0); + let _skTemp16 = mat3x2(2.0, -2.0, -2.0, 2.0, -2.0, -2.0); + _0_ok = _0_ok && (all(_3_m32[0] == _skTemp16[0]) && all(_3_m32[1] == _skTemp16[1]) && all(_3_m32[2] == _skTemp16[2])); + _2_m24 = _2_m24 * 0.25; + let _skTemp17 = mat2x4(0.75, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0, 0.0); + _0_ok = _0_ok && (all(_2_m24[0] == _skTemp17[0]) && all(_2_m24[1] == _skTemp17[1])); + var _skTemp18: vec4; + var _skTemp19: bool; + if _0_ok { + let _skTemp20 = test_half_b(); + _skTemp19 = _skTemp20; + } else { + _skTemp19 = false; + } + if _skTemp19 { + _skTemp18 = _globalUniforms.colorGreen; + } else { + _skTemp18 = _globalUniforms.colorRed; + } + return _skTemp18; + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/MatrixConstructorsES2.asm.frag b/tests/sksl/shared/MatrixConstructorsES2.asm.frag index 75d8ffe79fd2..16b659ede17c 100644 --- a/tests/sksl/shared/MatrixConstructorsES2.asm.frag +++ b/tests/sksl/shared/MatrixConstructorsES2.asm.frag @@ -1,192 +1,192 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpMemberName %_UniformBuffer 2 "testMatrix2x2" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %f4 "f4" -OpName %ok "ok" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 ColMajor -OpMemberDecorate %_UniformBuffer 2 MatrixStride 16 -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %135 RelaxedPrecision -OpDecorate %138 RelaxedPrecision -OpDecorate %139 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpMemberName %_UniformBuffer 2 "testMatrix2x2" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %f4 "f4" + OpName %ok "ok" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 ColMajor + OpMemberDecorate %_UniformBuffer 2 MatrixStride 16 + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %135 RelaxedPrecision + OpDecorate %138 RelaxedPrecision + OpDecorate %139 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%v2float = OpTypeVector %float 2 + %v2float = OpTypeVector %float 2 %mat2v2float = OpTypeMatrix %v2float 2 %_UniformBuffer = OpTypeStruct %v4float %v4float %mat2v2float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%17 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%20 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %17 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %20 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%24 = OpTypeFunction %v4float %_ptr_Function_v2float + %24 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_mat2v2float = OpTypePointer Uniform %mat2v2float -%int = OpTypeInt 32 1 -%int_2 = OpConstant %int 2 + %int = OpTypeInt 32 1 + %int_2 = OpConstant %int 2 %_ptr_Function_bool = OpTypePointer Function %bool -%v3float = OpTypeVector %float 3 -%float_4 = OpConstant %float 4 -%float_1 = OpConstant %float 1 -%float_2 = OpConstant %float 2 -%float_3 = OpConstant %float 3 -%53 = OpConstantComposite %v2float %float_1 %float_2 -%54 = OpConstantComposite %v2float %float_3 %float_4 -%55 = OpConstantComposite %mat2v2float %53 %54 -%v2bool = OpTypeVector %bool 2 -%false = OpConstantFalse %bool + %v3float = OpTypeVector %float 3 + %float_4 = OpConstant %float 4 + %float_1 = OpConstant %float 1 + %float_2 = OpConstant %float 2 + %float_3 = OpConstant %float 3 + %53 = OpConstantComposite %v2float %float_1 %float_2 + %54 = OpConstantComposite %v2float %float_3 %float_4 + %55 = OpConstantComposite %mat2v2float %53 %54 + %v2bool = OpTypeVector %bool 2 + %false = OpConstantFalse %bool %mat3v3float = OpTypeMatrix %v3float 3 -%76 = OpConstantComposite %v3float %float_1 %float_2 %float_3 -%77 = OpConstantComposite %v3float %float_4 %float_1 %float_2 -%78 = OpConstantComposite %v3float %float_3 %float_4 %float_1 -%79 = OpConstantComposite %mat3v3float %76 %77 %78 -%v3bool = OpTypeVector %bool 3 + %76 = OpConstantComposite %v3float %float_1 %float_2 %float_3 + %77 = OpConstantComposite %v3float %float_4 %float_1 %float_2 + %78 = OpConstantComposite %v3float %float_3 %float_4 %float_1 + %79 = OpConstantComposite %mat3v3float %76 %77 %78 + %v3bool = OpTypeVector %bool 3 %mat4v4float = OpTypeMatrix %v4float 4 -%113 = OpConstantComposite %v4float %float_1 %float_2 %float_3 %float_4 -%114 = OpConstantComposite %mat4v4float %113 %113 %113 %113 -%v4bool = OpTypeVector %bool 4 + %113 = OpConstantComposite %v4float %float_1 %float_2 %float_3 %float_4 + %114 = OpConstantComposite %mat4v4float %113 %113 %113 %113 + %v4bool = OpTypeVector %bool 4 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 %_entrypoint_v = OpFunction %void None %17 -%18 = OpLabel -%21 = OpVariable %_ptr_Function_v2float Function -OpStore %21 %20 -%23 = OpFunctionCall %v4float %main %21 -OpStore %sk_FragColor %23 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %24 -%25 = OpFunctionParameter %_ptr_Function_v2float -%26 = OpLabel -%f4 = OpVariable %_ptr_Function_v4float Function -%ok = OpVariable %_ptr_Function_bool Function -%128 = OpVariable %_ptr_Function_v4float Function -%29 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2 -%33 = OpLoad %mat2v2float %29 -%34 = OpCompositeExtract %float %33 0 0 -%35 = OpCompositeExtract %float %33 0 1 -%36 = OpCompositeExtract %float %33 1 0 -%37 = OpCompositeExtract %float %33 1 1 -%38 = OpCompositeConstruct %v4float %34 %35 %36 %37 -OpStore %f4 %38 -%41 = OpVectorShuffle %v3float %38 %38 0 1 2 -%44 = OpCompositeExtract %float %41 0 -%45 = OpCompositeExtract %float %41 1 -%46 = OpCompositeConstruct %v2float %44 %45 -%47 = OpCompositeExtract %float %41 2 -%48 = OpCompositeConstruct %v2float %47 %float_4 -%49 = OpCompositeConstruct %mat2v2float %46 %48 -%57 = OpFOrdEqual %v2bool %46 %53 -%58 = OpAll %bool %57 -%59 = OpFOrdEqual %v2bool %48 %54 -%60 = OpAll %bool %59 -%61 = OpLogicalAnd %bool %58 %60 -OpStore %ok %61 -OpSelectionMerge %64 None -OpBranchConditional %61 %63 %64 -%63 = OpLabel -%65 = OpVectorShuffle %v2float %38 %38 0 1 -%66 = OpVectorShuffle %v2float %38 %38 2 3 -%67 = OpCompositeExtract %float %65 0 -%68 = OpCompositeExtract %float %65 1 -%69 = OpCompositeExtract %float %66 0 -%70 = OpCompositeConstruct %v3float %67 %68 %69 -%71 = OpCompositeExtract %float %66 1 -%72 = OpCompositeConstruct %v3float %71 %34 %35 -%73 = OpCompositeConstruct %v3float %36 %37 %34 -%75 = OpCompositeConstruct %mat3v3float %70 %72 %73 -%81 = OpFOrdEqual %v3bool %70 %76 -%82 = OpAll %bool %81 -%83 = OpFOrdEqual %v3bool %72 %77 -%84 = OpAll %bool %83 -%85 = OpLogicalAnd %bool %82 %84 -%86 = OpFOrdEqual %v3bool %73 %78 -%87 = OpAll %bool %86 -%88 = OpLogicalAnd %bool %85 %87 -OpBranch %64 -%64 = OpLabel -%89 = OpPhi %bool %false %26 %88 %63 -OpStore %ok %89 -OpSelectionMerge %91 None -OpBranchConditional %89 %90 %91 -%90 = OpLabel -%92 = OpVectorShuffle %v3float %38 %38 0 1 2 -%93 = OpVectorShuffle %v3float %38 %38 3 0 1 -%94 = OpVectorShuffle %v4float %38 %38 2 3 0 1 -%95 = OpVectorShuffle %v2float %38 %38 2 3 -%96 = OpCompositeExtract %float %92 0 -%97 = OpCompositeExtract %float %92 1 -%98 = OpCompositeExtract %float %92 2 -%99 = OpCompositeExtract %float %93 0 -%100 = OpCompositeConstruct %v4float %96 %97 %98 %99 -%101 = OpCompositeExtract %float %93 1 -%102 = OpCompositeExtract %float %93 2 -%103 = OpCompositeExtract %float %94 0 -%104 = OpCompositeExtract %float %94 1 -%105 = OpCompositeConstruct %v4float %101 %102 %103 %104 -%106 = OpCompositeExtract %float %94 2 -%107 = OpCompositeExtract %float %94 3 -%108 = OpCompositeExtract %float %95 0 -%109 = OpCompositeExtract %float %95 1 -%110 = OpCompositeConstruct %v4float %106 %107 %108 %109 -%112 = OpCompositeConstruct %mat4v4float %100 %105 %110 %38 -%116 = OpFOrdEqual %v4bool %100 %113 -%117 = OpAll %bool %116 -%118 = OpFOrdEqual %v4bool %105 %113 -%119 = OpAll %bool %118 -%120 = OpLogicalAnd %bool %117 %119 -%121 = OpFOrdEqual %v4bool %110 %113 -%122 = OpAll %bool %121 -%123 = OpLogicalAnd %bool %120 %122 -%124 = OpFOrdEqual %v4bool %38 %113 -%125 = OpAll %bool %124 -%126 = OpLogicalAnd %bool %123 %125 -OpBranch %91 -%91 = OpLabel -%127 = OpPhi %bool %false %64 %126 %90 -OpStore %ok %127 -OpSelectionMerge %131 None -OpBranchConditional %127 %129 %130 -%129 = OpLabel -%132 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%135 = OpLoad %v4float %132 -OpStore %128 %135 -OpBranch %131 -%130 = OpLabel -%136 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%138 = OpLoad %v4float %136 -OpStore %128 %138 -OpBranch %131 -%131 = OpLabel -%139 = OpLoad %v4float %128 -OpReturnValue %139 -OpFunctionEnd + %18 = OpLabel + %21 = OpVariable %_ptr_Function_v2float Function + OpStore %21 %20 + %23 = OpFunctionCall %v4float %main %21 + OpStore %sk_FragColor %23 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %24 + %25 = OpFunctionParameter %_ptr_Function_v2float + %26 = OpLabel + %f4 = OpVariable %_ptr_Function_v4float Function + %ok = OpVariable %_ptr_Function_bool Function + %128 = OpVariable %_ptr_Function_v4float Function + %29 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2 + %33 = OpLoad %mat2v2float %29 + %34 = OpCompositeExtract %float %33 0 0 + %35 = OpCompositeExtract %float %33 0 1 + %36 = OpCompositeExtract %float %33 1 0 + %37 = OpCompositeExtract %float %33 1 1 + %38 = OpCompositeConstruct %v4float %34 %35 %36 %37 + OpStore %f4 %38 + %41 = OpVectorShuffle %v3float %38 %38 0 1 2 + %44 = OpCompositeExtract %float %41 0 + %45 = OpCompositeExtract %float %41 1 + %46 = OpCompositeConstruct %v2float %44 %45 + %47 = OpCompositeExtract %float %41 2 + %48 = OpCompositeConstruct %v2float %47 %float_4 + %49 = OpCompositeConstruct %mat2v2float %46 %48 + %57 = OpFOrdEqual %v2bool %46 %53 + %58 = OpAll %bool %57 + %59 = OpFOrdEqual %v2bool %48 %54 + %60 = OpAll %bool %59 + %61 = OpLogicalAnd %bool %58 %60 + OpStore %ok %61 + OpSelectionMerge %64 None + OpBranchConditional %61 %63 %64 + %63 = OpLabel + %65 = OpVectorShuffle %v2float %38 %38 0 1 + %66 = OpVectorShuffle %v2float %38 %38 2 3 + %67 = OpCompositeExtract %float %65 0 + %68 = OpCompositeExtract %float %65 1 + %69 = OpCompositeExtract %float %66 0 + %70 = OpCompositeConstruct %v3float %67 %68 %69 + %71 = OpCompositeExtract %float %66 1 + %72 = OpCompositeConstruct %v3float %71 %34 %35 + %73 = OpCompositeConstruct %v3float %36 %37 %34 + %75 = OpCompositeConstruct %mat3v3float %70 %72 %73 + %81 = OpFOrdEqual %v3bool %70 %76 + %82 = OpAll %bool %81 + %83 = OpFOrdEqual %v3bool %72 %77 + %84 = OpAll %bool %83 + %85 = OpLogicalAnd %bool %82 %84 + %86 = OpFOrdEqual %v3bool %73 %78 + %87 = OpAll %bool %86 + %88 = OpLogicalAnd %bool %85 %87 + OpBranch %64 + %64 = OpLabel + %89 = OpPhi %bool %false %26 %88 %63 + OpStore %ok %89 + OpSelectionMerge %91 None + OpBranchConditional %89 %90 %91 + %90 = OpLabel + %92 = OpVectorShuffle %v3float %38 %38 0 1 2 + %93 = OpVectorShuffle %v3float %38 %38 3 0 1 + %94 = OpVectorShuffle %v4float %38 %38 2 3 0 1 + %95 = OpVectorShuffle %v2float %38 %38 2 3 + %96 = OpCompositeExtract %float %92 0 + %97 = OpCompositeExtract %float %92 1 + %98 = OpCompositeExtract %float %92 2 + %99 = OpCompositeExtract %float %93 0 + %100 = OpCompositeConstruct %v4float %96 %97 %98 %99 + %101 = OpCompositeExtract %float %93 1 + %102 = OpCompositeExtract %float %93 2 + %103 = OpCompositeExtract %float %94 0 + %104 = OpCompositeExtract %float %94 1 + %105 = OpCompositeConstruct %v4float %101 %102 %103 %104 + %106 = OpCompositeExtract %float %94 2 + %107 = OpCompositeExtract %float %94 3 + %108 = OpCompositeExtract %float %95 0 + %109 = OpCompositeExtract %float %95 1 + %110 = OpCompositeConstruct %v4float %106 %107 %108 %109 + %112 = OpCompositeConstruct %mat4v4float %100 %105 %110 %38 + %116 = OpFOrdEqual %v4bool %100 %113 + %117 = OpAll %bool %116 + %118 = OpFOrdEqual %v4bool %105 %113 + %119 = OpAll %bool %118 + %120 = OpLogicalAnd %bool %117 %119 + %121 = OpFOrdEqual %v4bool %110 %113 + %122 = OpAll %bool %121 + %123 = OpLogicalAnd %bool %120 %122 + %124 = OpFOrdEqual %v4bool %38 %113 + %125 = OpAll %bool %124 + %126 = OpLogicalAnd %bool %123 %125 + OpBranch %91 + %91 = OpLabel + %127 = OpPhi %bool %false %64 %126 %90 + OpStore %ok %127 + OpSelectionMerge %131 None + OpBranchConditional %127 %129 %130 + %129 = OpLabel + %132 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %135 = OpLoad %v4float %132 + OpStore %128 %135 + OpBranch %131 + %130 = OpLabel + %136 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %138 = OpLoad %v4float %136 + OpStore %128 %138 + OpBranch %131 + %131 = OpLabel + %139 = OpLoad %v4float %128 + OpReturnValue %139 + OpFunctionEnd diff --git a/tests/sksl/shared/MatrixConstructorsES2.skrp b/tests/sksl/shared/MatrixConstructorsES2.skrp index e8cfd699fece..4d98ed12bce9 100644 --- a/tests/sksl/shared/MatrixConstructorsES2.skrp +++ b/tests/sksl/shared/MatrixConstructorsES2.skrp @@ -1,12 +1,42 @@ +47 instructions + +[immutable slots] +i0 = 0x3F800000 (1.0) +i1 = 0x40000000 (2.0) +i2 = 0x40400000 (3.0) +i3 = 0x40800000 (4.0) +i4 = 0x3F800000 (1.0) +i5 = 0x40000000 (2.0) +i6 = 0x40400000 (3.0) +i7 = 0x40800000 (4.0) +i8 = 0x3F800000 (1.0) +i9 = 0x40000000 (2.0) +i10 = 0x40400000 (3.0) +i11 = 0x40800000 (4.0) +i12 = 0x3F800000 (1.0) +i13 = 0x3F800000 (1.0) +i14 = 0x40000000 (2.0) +i15 = 0x40400000 (3.0) +i16 = 0x40800000 (4.0) +i17 = 0x3F800000 (1.0) +i18 = 0x40000000 (2.0) +i19 = 0x40400000 (3.0) +i20 = 0x40800000 (4.0) +i21 = 0x3F800000 (1.0) +i22 = 0x40000000 (2.0) +i23 = 0x40400000 (3.0) +i24 = 0x40800000 (4.0) +i25 = 0x3F800000 (1.0) +i26 = 0x40000000 (2.0) +i27 = 0x40400000 (3.0) +i28 = 0x40800000 (4.0) + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_4_uniforms f4 = testMatrix2x2 copy_3_slots_unmasked $0..2 = f4(0..2) copy_constant $3 = 0x40800000 (4.0) -copy_constant $4 = 0x3F800000 (1.0) -copy_constant $5 = 0x40000000 (2.0) -copy_constant $6 = 0x40400000 (3.0) -copy_constant $7 = 0x40800000 (4.0) +copy_4_immutables_unmasked $4..7 = i0..3 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] cmpeq_4_floats $0..3 = equal($0..3, $4..7) bitwise_and_2_ints $0..1 &= $2..3 bitwise_and_int $0 &= $1 @@ -14,15 +44,9 @@ copy_slot_unmasked ok = $0 copy_4_slots_unmasked $1..4 = f4 copy_4_slots_unmasked $5..8 = f4 copy_slot_unmasked $9 = f4(0) -copy_constant $10 = 0x3F800000 (1.0) -copy_constant $11 = 0x40000000 (2.0) -copy_constant $12 = 0x40400000 (3.0) -copy_constant $13 = 0x40800000 (4.0) -copy_constant $14 = 0x3F800000 (1.0) -copy_constant $15 = 0x40000000 (2.0) -copy_constant $16 = 0x40400000 (3.0) -copy_constant $17 = 0x40800000 (4.0) -copy_constant $18 = 0x3F800000 (1.0) +copy_4_immutables_unmasked $10..13 = i4..7 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked $14..17 = i8..11 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] +copy_immutable_unmasked $18 = i12 [0x3F800000 (1.0)] cmpeq_n_floats $1..9 = equal($1..9, $10..18) bitwise_and_4_ints $2..5 &= $6..9 bitwise_and_2_ints $2..3 &= $4..5 @@ -37,22 +61,10 @@ copy_4_slots_unmasked $7..10 = f4 swizzle_4 $7..10 = ($7..10).zwxy copy_2_slots_unmasked $11..12 = f4(2..3) copy_4_slots_unmasked $13..16 = f4 -copy_constant $17 = 0x3F800000 (1.0) -copy_constant $18 = 0x40000000 (2.0) -copy_constant $19 = 0x40400000 (3.0) -copy_constant $20 = 0x40800000 (4.0) -copy_constant $21 = 0x3F800000 (1.0) -copy_constant $22 = 0x40000000 (2.0) -copy_constant $23 = 0x40400000 (3.0) -copy_constant $24 = 0x40800000 (4.0) -copy_constant $25 = 0x3F800000 (1.0) -copy_constant $26 = 0x40000000 (2.0) -copy_constant $27 = 0x40400000 (3.0) -copy_constant $28 = 0x40800000 (4.0) -copy_constant $29 = 0x3F800000 (1.0) -copy_constant $30 = 0x40000000 (2.0) -copy_constant $31 = 0x40400000 (3.0) -copy_constant $32 = 0x40800000 (4.0) +copy_4_immutables_unmasked $17..20 = i13..16 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked $21..24 = i17..20 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked $25..28 = i21..24 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked $29..32 = i25..28 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] cmpeq_n_floats $1..16 = equal($1..16, $17..32) bitwise_and_4_ints $9..12 &= $13..16 bitwise_and_4_ints $5..8 &= $9..12 diff --git a/tests/sksl/shared/MatrixConstructorsES2.wgsl b/tests/sksl/shared/MatrixConstructorsES2.wgsl index 86007465325a..798cf3afbd3a 100644 --- a/tests/sksl/shared/MatrixConstructorsES2.wgsl +++ b/tests/sksl/shared/MatrixConstructorsES2.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, diff --git a/tests/sksl/shared/MatrixConstructorsES3.asm.frag b/tests/sksl/shared/MatrixConstructorsES3.asm.frag index 92238d2287a2..235e52c00d53 100644 --- a/tests/sksl/shared/MatrixConstructorsES3.asm.frag +++ b/tests/sksl/shared/MatrixConstructorsES3.asm.frag @@ -1,248 +1,248 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpMemberName %_UniformBuffer 2 "testMatrix2x2" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %f4 "f4" -OpName %ok "ok" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 ColMajor -OpMemberDecorate %_UniformBuffer 2 MatrixStride 16 -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %183 RelaxedPrecision -OpDecorate %186 RelaxedPrecision -OpDecorate %187 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpMemberName %_UniformBuffer 2 "testMatrix2x2" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %f4 "f4" + OpName %ok "ok" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 ColMajor + OpMemberDecorate %_UniformBuffer 2 MatrixStride 16 + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %183 RelaxedPrecision + OpDecorate %186 RelaxedPrecision + OpDecorate %187 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%v2float = OpTypeVector %float 2 + %v2float = OpTypeVector %float 2 %mat2v2float = OpTypeMatrix %v2float 2 %_UniformBuffer = OpTypeStruct %v4float %v4float %mat2v2float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%17 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%20 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %17 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %20 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%24 = OpTypeFunction %v4float %_ptr_Function_v2float + %24 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_mat2v2float = OpTypePointer Uniform %mat2v2float -%int = OpTypeInt 32 1 -%int_2 = OpConstant %int 2 + %int = OpTypeInt 32 1 + %int_2 = OpConstant %int 2 %_ptr_Function_bool = OpTypePointer Function %bool -%v3float = OpTypeVector %float 3 + %v3float = OpTypeVector %float 3 %mat2v3float = OpTypeMatrix %v3float 2 -%float_1 = OpConstant %float 1 -%float_2 = OpConstant %float 2 -%float_3 = OpConstant %float 3 -%float_4 = OpConstant %float 4 -%53 = OpConstantComposite %v3float %float_1 %float_2 %float_3 -%54 = OpConstantComposite %v3float %float_4 %float_1 %float_2 -%55 = OpConstantComposite %mat2v3float %53 %54 -%v3bool = OpTypeVector %bool 3 -%false = OpConstantFalse %bool + %float_1 = OpConstant %float 1 + %float_2 = OpConstant %float 2 + %float_3 = OpConstant %float 3 + %float_4 = OpConstant %float 4 + %53 = OpConstantComposite %v3float %float_1 %float_2 %float_3 + %54 = OpConstantComposite %v3float %float_4 %float_1 %float_2 + %55 = OpConstantComposite %mat2v3float %53 %54 + %v3bool = OpTypeVector %bool 3 + %false = OpConstantFalse %bool %mat2v4float = OpTypeMatrix %v4float 2 -%78 = OpConstantComposite %v4float %float_1 %float_2 %float_3 %float_4 -%79 = OpConstantComposite %mat2v4float %78 %78 -%v4bool = OpTypeVector %bool 4 + %78 = OpConstantComposite %v4float %float_1 %float_2 %float_3 %float_4 + %79 = OpConstantComposite %mat2v4float %78 %78 + %v4bool = OpTypeVector %bool 4 %mat3v3float = OpTypeMatrix %v3float 3 -%100 = OpConstantComposite %v3float %float_3 %float_4 %float_1 -%101 = OpConstantComposite %mat3v3float %53 %54 %100 + %100 = OpConstantComposite %v3float %float_3 %float_4 %float_1 + %101 = OpConstantComposite %mat3v3float %53 %54 %100 %mat4v2float = OpTypeMatrix %v2float 4 -%128 = OpConstantComposite %v2float %float_1 %float_2 -%129 = OpConstantComposite %v2float %float_3 %float_4 -%130 = OpConstantComposite %mat4v2float %128 %129 %128 %129 -%v2bool = OpTypeVector %bool 2 + %128 = OpConstantComposite %v2float %float_1 %float_2 + %129 = OpConstantComposite %v2float %float_3 %float_4 + %130 = OpConstantComposite %mat4v2float %128 %129 %128 %129 + %v2bool = OpTypeVector %bool 2 %mat4v3float = OpTypeMatrix %v3float 4 -%162 = OpConstantComposite %v3float %float_2 %float_3 %float_4 -%163 = OpConstantComposite %mat4v3float %53 %54 %100 %162 + %162 = OpConstantComposite %v3float %float_2 %float_3 %float_4 + %163 = OpConstantComposite %mat4v3float %53 %54 %100 %162 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 %_entrypoint_v = OpFunction %void None %17 -%18 = OpLabel -%21 = OpVariable %_ptr_Function_v2float Function -OpStore %21 %20 -%23 = OpFunctionCall %v4float %main %21 -OpStore %sk_FragColor %23 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %24 -%25 = OpFunctionParameter %_ptr_Function_v2float -%26 = OpLabel -%f4 = OpVariable %_ptr_Function_v4float Function -%ok = OpVariable %_ptr_Function_bool Function -%176 = OpVariable %_ptr_Function_v4float Function -%29 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2 -%33 = OpLoad %mat2v2float %29 -%34 = OpCompositeExtract %float %33 0 0 -%35 = OpCompositeExtract %float %33 0 1 -%36 = OpCompositeExtract %float %33 1 0 -%37 = OpCompositeExtract %float %33 1 1 -%38 = OpCompositeConstruct %v4float %34 %35 %36 %37 -OpStore %f4 %38 -%41 = OpVectorShuffle %v2float %38 %38 0 1 -%43 = OpCompositeConstruct %v3float %34 %35 %36 -%44 = OpCompositeExtract %float %41 0 -%45 = OpCompositeExtract %float %41 1 -%46 = OpCompositeConstruct %v3float %37 %44 %45 -%48 = OpCompositeConstruct %mat2v3float %43 %46 -%57 = OpFOrdEqual %v3bool %43 %53 -%58 = OpAll %bool %57 -%59 = OpFOrdEqual %v3bool %46 %54 -%60 = OpAll %bool %59 -%61 = OpLogicalAnd %bool %58 %60 -OpStore %ok %61 -OpSelectionMerge %64 None -OpBranchConditional %61 %63 %64 -%63 = OpLabel -%65 = OpVectorShuffle %v3float %38 %38 0 1 2 -%66 = OpVectorShuffle %v4float %38 %38 3 0 1 2 -%67 = OpCompositeExtract %float %65 0 -%68 = OpCompositeExtract %float %65 1 -%69 = OpCompositeExtract %float %65 2 -%70 = OpCompositeExtract %float %66 0 -%71 = OpCompositeConstruct %v4float %67 %68 %69 %70 -%72 = OpCompositeExtract %float %66 1 -%73 = OpCompositeExtract %float %66 2 -%74 = OpCompositeExtract %float %66 3 -%75 = OpCompositeConstruct %v4float %72 %73 %74 %37 -%77 = OpCompositeConstruct %mat2v4float %71 %75 -%81 = OpFOrdEqual %v4bool %71 %78 -%82 = OpAll %bool %81 -%83 = OpFOrdEqual %v4bool %75 %78 -%84 = OpAll %bool %83 -%85 = OpLogicalAnd %bool %82 %84 -OpBranch %64 -%64 = OpLabel -%86 = OpPhi %bool %false %26 %85 %63 -OpStore %ok %86 -OpSelectionMerge %88 None -OpBranchConditional %86 %87 %88 -%87 = OpLabel -%89 = OpVectorShuffle %v2float %38 %38 0 1 -%90 = OpVectorShuffle %v2float %38 %38 2 3 -%91 = OpCompositeExtract %float %89 0 -%92 = OpCompositeExtract %float %89 1 -%93 = OpCompositeExtract %float %90 0 -%94 = OpCompositeConstruct %v3float %91 %92 %93 -%95 = OpCompositeExtract %float %90 1 -%96 = OpCompositeConstruct %v3float %95 %34 %35 -%97 = OpCompositeConstruct %v3float %36 %37 %34 -%99 = OpCompositeConstruct %mat3v3float %94 %96 %97 -%102 = OpFOrdEqual %v3bool %94 %53 -%103 = OpAll %bool %102 -%104 = OpFOrdEqual %v3bool %96 %54 -%105 = OpAll %bool %104 -%106 = OpLogicalAnd %bool %103 %105 -%107 = OpFOrdEqual %v3bool %97 %100 -%108 = OpAll %bool %107 -%109 = OpLogicalAnd %bool %106 %108 -OpBranch %88 -%88 = OpLabel -%110 = OpPhi %bool %false %64 %109 %87 -OpStore %ok %110 -OpSelectionMerge %112 None -OpBranchConditional %110 %111 %112 -%111 = OpLabel -%113 = OpVectorShuffle %v3float %38 %38 0 1 2 -%114 = OpVectorShuffle %v4float %38 %38 3 0 1 2 -%115 = OpCompositeExtract %float %113 0 -%116 = OpCompositeExtract %float %113 1 -%117 = OpCompositeConstruct %v2float %115 %116 -%118 = OpCompositeExtract %float %113 2 -%119 = OpCompositeExtract %float %114 0 -%120 = OpCompositeConstruct %v2float %118 %119 -%121 = OpCompositeExtract %float %114 1 -%122 = OpCompositeExtract %float %114 2 -%123 = OpCompositeConstruct %v2float %121 %122 -%124 = OpCompositeExtract %float %114 3 -%125 = OpCompositeConstruct %v2float %124 %37 -%127 = OpCompositeConstruct %mat4v2float %117 %120 %123 %125 -%132 = OpFOrdEqual %v2bool %117 %128 -%133 = OpAll %bool %132 -%134 = OpFOrdEqual %v2bool %120 %129 -%135 = OpAll %bool %134 -%136 = OpLogicalAnd %bool %133 %135 -%137 = OpFOrdEqual %v2bool %123 %128 -%138 = OpAll %bool %137 -%139 = OpLogicalAnd %bool %136 %138 -%140 = OpFOrdEqual %v2bool %125 %129 -%141 = OpAll %bool %140 -%142 = OpLogicalAnd %bool %139 %141 -OpBranch %112 -%112 = OpLabel -%143 = OpPhi %bool %false %88 %142 %111 -OpStore %ok %143 -OpSelectionMerge %145 None -OpBranchConditional %143 %144 %145 -%144 = OpLabel -%146 = OpVectorShuffle %v4float %38 %38 1 2 3 0 -%147 = OpVectorShuffle %v4float %38 %38 1 2 3 0 -%148 = OpVectorShuffle %v3float %38 %38 1 2 3 -%149 = OpCompositeExtract %float %146 0 -%150 = OpCompositeExtract %float %146 1 -%151 = OpCompositeConstruct %v3float %34 %149 %150 -%152 = OpCompositeExtract %float %146 2 -%153 = OpCompositeExtract %float %146 3 -%154 = OpCompositeExtract %float %147 0 -%155 = OpCompositeConstruct %v3float %152 %153 %154 -%156 = OpCompositeExtract %float %147 1 -%157 = OpCompositeExtract %float %147 2 -%158 = OpCompositeExtract %float %147 3 -%159 = OpCompositeConstruct %v3float %156 %157 %158 -%161 = OpCompositeConstruct %mat4v3float %151 %155 %159 %148 -%164 = OpFOrdEqual %v3bool %151 %53 -%165 = OpAll %bool %164 -%166 = OpFOrdEqual %v3bool %155 %54 -%167 = OpAll %bool %166 -%168 = OpLogicalAnd %bool %165 %167 -%169 = OpFOrdEqual %v3bool %159 %100 -%170 = OpAll %bool %169 -%171 = OpLogicalAnd %bool %168 %170 -%172 = OpFOrdEqual %v3bool %148 %162 -%173 = OpAll %bool %172 -%174 = OpLogicalAnd %bool %171 %173 -OpBranch %145 -%145 = OpLabel -%175 = OpPhi %bool %false %112 %174 %144 -OpStore %ok %175 -OpSelectionMerge %179 None -OpBranchConditional %175 %177 %178 -%177 = OpLabel -%180 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%183 = OpLoad %v4float %180 -OpStore %176 %183 -OpBranch %179 -%178 = OpLabel -%184 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%186 = OpLoad %v4float %184 -OpStore %176 %186 -OpBranch %179 -%179 = OpLabel -%187 = OpLoad %v4float %176 -OpReturnValue %187 -OpFunctionEnd + %18 = OpLabel + %21 = OpVariable %_ptr_Function_v2float Function + OpStore %21 %20 + %23 = OpFunctionCall %v4float %main %21 + OpStore %sk_FragColor %23 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %24 + %25 = OpFunctionParameter %_ptr_Function_v2float + %26 = OpLabel + %f4 = OpVariable %_ptr_Function_v4float Function + %ok = OpVariable %_ptr_Function_bool Function + %176 = OpVariable %_ptr_Function_v4float Function + %29 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2 + %33 = OpLoad %mat2v2float %29 + %34 = OpCompositeExtract %float %33 0 0 + %35 = OpCompositeExtract %float %33 0 1 + %36 = OpCompositeExtract %float %33 1 0 + %37 = OpCompositeExtract %float %33 1 1 + %38 = OpCompositeConstruct %v4float %34 %35 %36 %37 + OpStore %f4 %38 + %41 = OpVectorShuffle %v2float %38 %38 0 1 + %43 = OpCompositeConstruct %v3float %34 %35 %36 + %44 = OpCompositeExtract %float %41 0 + %45 = OpCompositeExtract %float %41 1 + %46 = OpCompositeConstruct %v3float %37 %44 %45 + %48 = OpCompositeConstruct %mat2v3float %43 %46 + %57 = OpFOrdEqual %v3bool %43 %53 + %58 = OpAll %bool %57 + %59 = OpFOrdEqual %v3bool %46 %54 + %60 = OpAll %bool %59 + %61 = OpLogicalAnd %bool %58 %60 + OpStore %ok %61 + OpSelectionMerge %64 None + OpBranchConditional %61 %63 %64 + %63 = OpLabel + %65 = OpVectorShuffle %v3float %38 %38 0 1 2 + %66 = OpVectorShuffle %v4float %38 %38 3 0 1 2 + %67 = OpCompositeExtract %float %65 0 + %68 = OpCompositeExtract %float %65 1 + %69 = OpCompositeExtract %float %65 2 + %70 = OpCompositeExtract %float %66 0 + %71 = OpCompositeConstruct %v4float %67 %68 %69 %70 + %72 = OpCompositeExtract %float %66 1 + %73 = OpCompositeExtract %float %66 2 + %74 = OpCompositeExtract %float %66 3 + %75 = OpCompositeConstruct %v4float %72 %73 %74 %37 + %77 = OpCompositeConstruct %mat2v4float %71 %75 + %81 = OpFOrdEqual %v4bool %71 %78 + %82 = OpAll %bool %81 + %83 = OpFOrdEqual %v4bool %75 %78 + %84 = OpAll %bool %83 + %85 = OpLogicalAnd %bool %82 %84 + OpBranch %64 + %64 = OpLabel + %86 = OpPhi %bool %false %26 %85 %63 + OpStore %ok %86 + OpSelectionMerge %88 None + OpBranchConditional %86 %87 %88 + %87 = OpLabel + %89 = OpVectorShuffle %v2float %38 %38 0 1 + %90 = OpVectorShuffle %v2float %38 %38 2 3 + %91 = OpCompositeExtract %float %89 0 + %92 = OpCompositeExtract %float %89 1 + %93 = OpCompositeExtract %float %90 0 + %94 = OpCompositeConstruct %v3float %91 %92 %93 + %95 = OpCompositeExtract %float %90 1 + %96 = OpCompositeConstruct %v3float %95 %34 %35 + %97 = OpCompositeConstruct %v3float %36 %37 %34 + %99 = OpCompositeConstruct %mat3v3float %94 %96 %97 + %102 = OpFOrdEqual %v3bool %94 %53 + %103 = OpAll %bool %102 + %104 = OpFOrdEqual %v3bool %96 %54 + %105 = OpAll %bool %104 + %106 = OpLogicalAnd %bool %103 %105 + %107 = OpFOrdEqual %v3bool %97 %100 + %108 = OpAll %bool %107 + %109 = OpLogicalAnd %bool %106 %108 + OpBranch %88 + %88 = OpLabel + %110 = OpPhi %bool %false %64 %109 %87 + OpStore %ok %110 + OpSelectionMerge %112 None + OpBranchConditional %110 %111 %112 + %111 = OpLabel + %113 = OpVectorShuffle %v3float %38 %38 0 1 2 + %114 = OpVectorShuffle %v4float %38 %38 3 0 1 2 + %115 = OpCompositeExtract %float %113 0 + %116 = OpCompositeExtract %float %113 1 + %117 = OpCompositeConstruct %v2float %115 %116 + %118 = OpCompositeExtract %float %113 2 + %119 = OpCompositeExtract %float %114 0 + %120 = OpCompositeConstruct %v2float %118 %119 + %121 = OpCompositeExtract %float %114 1 + %122 = OpCompositeExtract %float %114 2 + %123 = OpCompositeConstruct %v2float %121 %122 + %124 = OpCompositeExtract %float %114 3 + %125 = OpCompositeConstruct %v2float %124 %37 + %127 = OpCompositeConstruct %mat4v2float %117 %120 %123 %125 + %132 = OpFOrdEqual %v2bool %117 %128 + %133 = OpAll %bool %132 + %134 = OpFOrdEqual %v2bool %120 %129 + %135 = OpAll %bool %134 + %136 = OpLogicalAnd %bool %133 %135 + %137 = OpFOrdEqual %v2bool %123 %128 + %138 = OpAll %bool %137 + %139 = OpLogicalAnd %bool %136 %138 + %140 = OpFOrdEqual %v2bool %125 %129 + %141 = OpAll %bool %140 + %142 = OpLogicalAnd %bool %139 %141 + OpBranch %112 + %112 = OpLabel + %143 = OpPhi %bool %false %88 %142 %111 + OpStore %ok %143 + OpSelectionMerge %145 None + OpBranchConditional %143 %144 %145 + %144 = OpLabel + %146 = OpVectorShuffle %v4float %38 %38 1 2 3 0 + %147 = OpVectorShuffle %v4float %38 %38 1 2 3 0 + %148 = OpVectorShuffle %v3float %38 %38 1 2 3 + %149 = OpCompositeExtract %float %146 0 + %150 = OpCompositeExtract %float %146 1 + %151 = OpCompositeConstruct %v3float %34 %149 %150 + %152 = OpCompositeExtract %float %146 2 + %153 = OpCompositeExtract %float %146 3 + %154 = OpCompositeExtract %float %147 0 + %155 = OpCompositeConstruct %v3float %152 %153 %154 + %156 = OpCompositeExtract %float %147 1 + %157 = OpCompositeExtract %float %147 2 + %158 = OpCompositeExtract %float %147 3 + %159 = OpCompositeConstruct %v3float %156 %157 %158 + %161 = OpCompositeConstruct %mat4v3float %151 %155 %159 %148 + %164 = OpFOrdEqual %v3bool %151 %53 + %165 = OpAll %bool %164 + %166 = OpFOrdEqual %v3bool %155 %54 + %167 = OpAll %bool %166 + %168 = OpLogicalAnd %bool %165 %167 + %169 = OpFOrdEqual %v3bool %159 %100 + %170 = OpAll %bool %169 + %171 = OpLogicalAnd %bool %168 %170 + %172 = OpFOrdEqual %v3bool %148 %162 + %173 = OpAll %bool %172 + %174 = OpLogicalAnd %bool %171 %173 + OpBranch %145 + %145 = OpLabel + %175 = OpPhi %bool %false %112 %174 %144 + OpStore %ok %175 + OpSelectionMerge %179 None + OpBranchConditional %175 %177 %178 + %177 = OpLabel + %180 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %183 = OpLoad %v4float %180 + OpStore %176 %183 + OpBranch %179 + %178 = OpLabel + %184 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %186 = OpLoad %v4float %184 + OpStore %176 %186 + OpBranch %179 + %179 = OpLabel + %187 = OpLoad %v4float %176 + OpReturnValue %187 + OpFunctionEnd diff --git a/tests/sksl/shared/MatrixConstructorsES3.skrp b/tests/sksl/shared/MatrixConstructorsES3.skrp index ead525e3f394..0fde8af5c3a3 100644 --- a/tests/sksl/shared/MatrixConstructorsES3.skrp +++ b/tests/sksl/shared/MatrixConstructorsES3.skrp @@ -1,14 +1,37 @@ +70 instructions + +[immutable slots] +i0 = 0x3F800000 (1.0) +i1 = 0x40000000 (2.0) +i2 = 0x40400000 (3.0) +i3 = 0x40800000 (4.0) +i4 = 0x3F800000 (1.0) +i5 = 0x40000000 (2.0) +i6 = 0x3F800000 (1.0) +i7 = 0x40000000 (2.0) +i8 = 0x40400000 (3.0) +i9 = 0x40800000 (4.0) +i10 = 0x3F800000 (1.0) +i11 = 0x40000000 (2.0) +i12 = 0x40400000 (3.0) +i13 = 0x40800000 (4.0) +i14 = 0x3F800000 (1.0) +i15 = 0x40000000 (2.0) +i16 = 0x40400000 (3.0) +i17 = 0x40800000 (4.0) +i18 = 0x3F800000 (1.0) +i19 = 0x40000000 (2.0) +i20 = 0x40400000 (3.0) +i21 = 0x40800000 (4.0) +i22 = 0x3F800000 (1.0) + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_4_uniforms f4 = testMatrix2x2 copy_4_slots_unmasked $0..3 = f4 copy_2_slots_unmasked $4..5 = f4(0..1) -copy_constant $6 = 0x3F800000 (1.0) -copy_constant $7 = 0x40000000 (2.0) -copy_constant $8 = 0x40400000 (3.0) -copy_constant $9 = 0x40800000 (4.0) -copy_constant $10 = 0x3F800000 (1.0) -copy_constant $11 = 0x40000000 (2.0) +copy_4_immutables_unmasked $6..9 = i0..3 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] +copy_2_immutables_unmasked $10..11 = i4..5 [0x3F800000 (1.0), 0x40000000 (2.0)] cmpeq_n_floats $0..5 = equal($0..5, $6..11) bitwise_and_3_ints $0..2 &= $3..5 bitwise_and_int $1 &= $2 @@ -18,14 +41,8 @@ copy_3_slots_unmasked $1..3 = f4(0..2) copy_4_slots_unmasked $4..7 = f4 swizzle_4 $4..7 = ($4..7).wxyz copy_slot_unmasked $8 = f4(3) -copy_constant $9 = 0x3F800000 (1.0) -copy_constant $10 = 0x40000000 (2.0) -copy_constant $11 = 0x40400000 (3.0) -copy_constant $12 = 0x40800000 (4.0) -copy_constant $13 = 0x3F800000 (1.0) -copy_constant $14 = 0x40000000 (2.0) -copy_constant $15 = 0x40400000 (3.0) -copy_constant $16 = 0x40800000 (4.0) +copy_4_immutables_unmasked $9..12 = i6..9 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked $13..16 = i10..13 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] cmpeq_n_floats $1..8 = equal($1..8, $9..16) bitwise_and_4_ints $1..4 &= $5..8 bitwise_and_2_ints $1..2 &= $3..4 @@ -35,15 +52,9 @@ copy_slot_unmasked ok = $0 copy_4_slots_unmasked $1..4 = f4 copy_4_slots_unmasked $5..8 = f4 copy_slot_unmasked $9 = f4(0) -copy_constant $10 = 0x3F800000 (1.0) -copy_constant $11 = 0x40000000 (2.0) -copy_constant $12 = 0x40400000 (3.0) -copy_constant $13 = 0x40800000 (4.0) -copy_constant $14 = 0x3F800000 (1.0) -copy_constant $15 = 0x40000000 (2.0) -copy_constant $16 = 0x40400000 (3.0) -copy_constant $17 = 0x40800000 (4.0) -copy_constant $18 = 0x3F800000 (1.0) +copy_4_immutables_unmasked $10..13 = i14..17 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked $14..17 = i18..21 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] +copy_immutable_unmasked $18 = i22 [0x3F800000 (1.0)] cmpeq_n_floats $1..9 = equal($1..9, $10..18) bitwise_and_4_ints $2..5 &= $6..9 bitwise_and_2_ints $2..3 &= $4..5 @@ -55,14 +66,8 @@ copy_3_slots_unmasked $1..3 = f4(0..2) copy_4_slots_unmasked $4..7 = f4 swizzle_4 $4..7 = ($4..7).wxyz copy_slot_unmasked $8 = f4(3) -copy_constant $9 = 0x3F800000 (1.0) -copy_constant $10 = 0x40000000 (2.0) -copy_constant $11 = 0x40400000 (3.0) -copy_constant $12 = 0x40800000 (4.0) -copy_constant $13 = 0x3F800000 (1.0) -copy_constant $14 = 0x40000000 (2.0) -copy_constant $15 = 0x40400000 (3.0) -copy_constant $16 = 0x40800000 (4.0) +copy_4_immutables_unmasked $9..12 = i6..9 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked $13..16 = i10..13 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] cmpeq_n_floats $1..8 = equal($1..8, $9..16) bitwise_and_4_ints $1..4 &= $5..8 bitwise_and_2_ints $1..2 &= $3..4 @@ -75,18 +80,9 @@ swizzle_4 $2..5 = ($2..5).yzwx copy_4_slots_unmasked $6..9 = f4 swizzle_4 $6..9 = ($6..9).yzwx copy_3_slots_unmasked $10..12 = f4(1..3) -copy_constant $13 = 0x3F800000 (1.0) -copy_constant $14 = 0x40000000 (2.0) -copy_constant $15 = 0x40400000 (3.0) -copy_constant $16 = 0x40800000 (4.0) -copy_constant $17 = 0x3F800000 (1.0) -copy_constant $18 = 0x40000000 (2.0) -copy_constant $19 = 0x40400000 (3.0) -copy_constant $20 = 0x40800000 (4.0) -copy_constant $21 = 0x3F800000 (1.0) -copy_constant $22 = 0x40000000 (2.0) -copy_constant $23 = 0x40400000 (3.0) -copy_constant $24 = 0x40800000 (4.0) +copy_4_immutables_unmasked $13..16 = i6..9 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked $17..20 = i10..13 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked $21..24 = i14..17 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] cmpeq_n_floats $1..12 = equal($1..12, $13..24) bitwise_and_4_ints $5..8 &= $9..12 bitwise_and_4_ints $1..4 &= $5..8 diff --git a/tests/sksl/shared/MatrixConstructorsES3.wgsl b/tests/sksl/shared/MatrixConstructorsES3.wgsl index acc4cd81a1c0..876eca7d894f 100644 --- a/tests/sksl/shared/MatrixConstructorsES3.wgsl +++ b/tests/sksl/shared/MatrixConstructorsES3.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, diff --git a/tests/sksl/shared/MatrixEquality.asm.frag b/tests/sksl/shared/MatrixEquality.asm.frag index a3ab9b1f7ad0..656ee9d5a47b 100644 --- a/tests/sksl/shared/MatrixEquality.asm.frag +++ b/tests/sksl/shared/MatrixEquality.asm.frag @@ -1,843 +1,843 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpMemberName %_UniformBuffer 2 "testMatrix2x2" -OpMemberName %_UniformBuffer 3 "testMatrix3x3" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %_0_ok "_0_ok" -OpName %_1_zero "_1_zero" -OpName %_2_one "_2_one" -OpName %_3_two "_3_two" -OpName %_4_nine "_4_nine" -OpName %_5_m "_5_m" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 ColMajor -OpMemberDecorate %_UniformBuffer 2 MatrixStride 16 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 3 Offset 64 -OpMemberDecorate %_UniformBuffer 3 ColMajor -OpMemberDecorate %_UniformBuffer 3 MatrixStride 16 -OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %39 RelaxedPrecision -OpDecorate %48 RelaxedPrecision -OpDecorate %49 RelaxedPrecision -OpDecorate %51 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %73 RelaxedPrecision -OpDecorate %75 RelaxedPrecision -OpDecorate %76 RelaxedPrecision -OpDecorate %79 RelaxedPrecision -OpDecorate %80 RelaxedPrecision -OpDecorate %87 RelaxedPrecision -OpDecorate %92 RelaxedPrecision -OpDecorate %93 RelaxedPrecision -OpDecorate %95 RelaxedPrecision -OpDecorate %96 RelaxedPrecision -OpDecorate %103 RelaxedPrecision -OpDecorate %108 RelaxedPrecision -OpDecorate %109 RelaxedPrecision -OpDecorate %111 RelaxedPrecision -OpDecorate %112 RelaxedPrecision -OpDecorate %115 RelaxedPrecision -OpDecorate %116 RelaxedPrecision -OpDecorate %125 RelaxedPrecision -OpDecorate %126 RelaxedPrecision -OpDecorate %129 RelaxedPrecision -OpDecorate %130 RelaxedPrecision -OpDecorate %423 RelaxedPrecision -OpDecorate %424 RelaxedPrecision -OpDecorate %425 RelaxedPrecision -OpDecorate %426 RelaxedPrecision -OpDecorate %427 RelaxedPrecision -OpDecorate %428 RelaxedPrecision -OpDecorate %439 RelaxedPrecision -OpDecorate %440 RelaxedPrecision -OpDecorate %441 RelaxedPrecision -OpDecorate %442 RelaxedPrecision -OpDecorate %443 RelaxedPrecision -OpDecorate %444 RelaxedPrecision -OpDecorate %448 RelaxedPrecision -OpDecorate %449 RelaxedPrecision -OpDecorate %450 RelaxedPrecision -OpDecorate %451 RelaxedPrecision -OpDecorate %452 RelaxedPrecision -OpDecorate %453 RelaxedPrecision -OpDecorate %460 RelaxedPrecision -OpDecorate %461 RelaxedPrecision -OpDecorate %462 RelaxedPrecision -OpDecorate %463 RelaxedPrecision -OpDecorate %464 RelaxedPrecision -OpDecorate %465 RelaxedPrecision -OpDecorate %569 RelaxedPrecision -OpDecorate %571 RelaxedPrecision -OpDecorate %572 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpMemberName %_UniformBuffer 2 "testMatrix2x2" + OpMemberName %_UniformBuffer 3 "testMatrix3x3" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %_0_ok "_0_ok" + OpName %_1_zero "_1_zero" + OpName %_2_one "_2_one" + OpName %_3_two "_3_two" + OpName %_4_nine "_4_nine" + OpName %_5_m "_5_m" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 ColMajor + OpMemberDecorate %_UniformBuffer 2 MatrixStride 16 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 3 Offset 64 + OpMemberDecorate %_UniformBuffer 3 ColMajor + OpMemberDecorate %_UniformBuffer 3 MatrixStride 16 + OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %39 RelaxedPrecision + OpDecorate %48 RelaxedPrecision + OpDecorate %49 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %73 RelaxedPrecision + OpDecorate %75 RelaxedPrecision + OpDecorate %76 RelaxedPrecision + OpDecorate %79 RelaxedPrecision + OpDecorate %80 RelaxedPrecision + OpDecorate %87 RelaxedPrecision + OpDecorate %92 RelaxedPrecision + OpDecorate %93 RelaxedPrecision + OpDecorate %95 RelaxedPrecision + OpDecorate %96 RelaxedPrecision + OpDecorate %103 RelaxedPrecision + OpDecorate %108 RelaxedPrecision + OpDecorate %109 RelaxedPrecision + OpDecorate %111 RelaxedPrecision + OpDecorate %112 RelaxedPrecision + OpDecorate %115 RelaxedPrecision + OpDecorate %116 RelaxedPrecision + OpDecorate %125 RelaxedPrecision + OpDecorate %126 RelaxedPrecision + OpDecorate %129 RelaxedPrecision + OpDecorate %130 RelaxedPrecision + OpDecorate %423 RelaxedPrecision + OpDecorate %424 RelaxedPrecision + OpDecorate %425 RelaxedPrecision + OpDecorate %426 RelaxedPrecision + OpDecorate %427 RelaxedPrecision + OpDecorate %428 RelaxedPrecision + OpDecorate %439 RelaxedPrecision + OpDecorate %440 RelaxedPrecision + OpDecorate %441 RelaxedPrecision + OpDecorate %442 RelaxedPrecision + OpDecorate %443 RelaxedPrecision + OpDecorate %444 RelaxedPrecision + OpDecorate %448 RelaxedPrecision + OpDecorate %449 RelaxedPrecision + OpDecorate %450 RelaxedPrecision + OpDecorate %451 RelaxedPrecision + OpDecorate %452 RelaxedPrecision + OpDecorate %453 RelaxedPrecision + OpDecorate %460 RelaxedPrecision + OpDecorate %461 RelaxedPrecision + OpDecorate %462 RelaxedPrecision + OpDecorate %463 RelaxedPrecision + OpDecorate %464 RelaxedPrecision + OpDecorate %465 RelaxedPrecision + OpDecorate %569 RelaxedPrecision + OpDecorate %571 RelaxedPrecision + OpDecorate %572 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%v2float = OpTypeVector %float 2 + %v2float = OpTypeVector %float 2 %mat2v2float = OpTypeMatrix %v2float 2 -%v3float = OpTypeVector %float 3 + %v3float = OpTypeVector %float 3 %mat3v3float = OpTypeMatrix %v3float 3 %_UniformBuffer = OpTypeStruct %v4float %v4float %mat2v2float %mat3v3float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%19 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%22 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %19 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %22 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%26 = OpTypeFunction %v4float %_ptr_Function_v2float + %26 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_bool = OpTypePointer Function %bool -%true = OpConstantTrue %bool -%false = OpConstantFalse %bool + %true = OpConstantTrue %bool + %false = OpConstantFalse %bool %_ptr_Uniform_mat2v2float = OpTypePointer Uniform %mat2v2float -%int = OpTypeInt 32 1 -%int_2 = OpConstant %int 2 -%float_1 = OpConstant %float 1 -%float_2 = OpConstant %float 2 -%float_3 = OpConstant %float 3 -%float_4 = OpConstant %float 4 -%44 = OpConstantComposite %v2float %float_1 %float_2 -%45 = OpConstantComposite %v2float %float_3 %float_4 -%46 = OpConstantComposite %mat2v2float %44 %45 -%v2bool = OpTypeVector %bool 2 + %int = OpTypeInt 32 1 + %int_2 = OpConstant %int 2 + %float_1 = OpConstant %float 1 + %float_2 = OpConstant %float 2 + %float_3 = OpConstant %float 3 + %float_4 = OpConstant %float 4 + %44 = OpConstantComposite %v2float %float_1 %float_2 + %45 = OpConstantComposite %v2float %float_3 %float_4 + %46 = OpConstantComposite %mat2v2float %44 %45 + %v2bool = OpTypeVector %bool 2 %_ptr_Uniform_mat3v3float = OpTypePointer Uniform %mat3v3float -%int_3 = OpConstant %int 3 -%float_5 = OpConstant %float 5 -%float_6 = OpConstant %float 6 -%float_7 = OpConstant %float 7 -%float_8 = OpConstant %float 8 -%float_9 = OpConstant %float 9 -%67 = OpConstantComposite %v3float %float_1 %float_2 %float_3 -%68 = OpConstantComposite %v3float %float_4 %float_5 %float_6 -%69 = OpConstantComposite %v3float %float_7 %float_8 %float_9 -%70 = OpConstantComposite %mat3v3float %67 %68 %69 -%v3bool = OpTypeVector %bool 3 -%float_100 = OpConstant %float 100 -%89 = OpConstantComposite %v2float %float_100 %float_0 -%90 = OpConstantComposite %v2float %float_0 %float_100 -%91 = OpConstantComposite %mat2v2float %89 %90 -%104 = OpConstantComposite %v3float %float_9 %float_8 %float_7 -%105 = OpConstantComposite %v3float %float_6 %float_5 %float_4 -%106 = OpConstantComposite %v3float %float_3 %float_2 %float_1 -%107 = OpConstantComposite %mat3v3float %104 %105 %106 + %int_3 = OpConstant %int 3 + %float_5 = OpConstant %float 5 + %float_6 = OpConstant %float 6 + %float_7 = OpConstant %float 7 + %float_8 = OpConstant %float 8 + %float_9 = OpConstant %float 9 + %67 = OpConstantComposite %v3float %float_1 %float_2 %float_3 + %68 = OpConstantComposite %v3float %float_4 %float_5 %float_6 + %69 = OpConstantComposite %v3float %float_7 %float_8 %float_9 + %70 = OpConstantComposite %mat3v3float %67 %68 %69 + %v3bool = OpTypeVector %bool 3 + %float_100 = OpConstant %float 100 + %89 = OpConstantComposite %v2float %float_100 %float_0 + %90 = OpConstantComposite %v2float %float_0 %float_100 + %91 = OpConstantComposite %mat2v2float %89 %90 + %104 = OpConstantComposite %v3float %float_9 %float_8 %float_7 + %105 = OpConstantComposite %v3float %float_6 %float_5 %float_4 + %106 = OpConstantComposite %v3float %float_3 %float_2 %float_1 + %107 = OpConstantComposite %mat3v3float %104 %105 %106 %_ptr_Function_float = OpTypePointer Function %float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_0 = OpConstant %int 0 -%140 = OpConstantComposite %v2float %float_1 %float_0 -%141 = OpConstantComposite %v2float %float_0 %float_1 -%142 = OpConstantComposite %mat2v2float %140 %141 -%176 = OpConstantComposite %mat2v2float %22 %22 -%float_n1 = OpConstant %float -1 -%190 = OpConstantComposite %v2float %float_n1 %float_0 -%191 = OpConstantComposite %v2float %float_0 %float_n1 -%192 = OpConstantComposite %mat2v2float %190 %191 -%float_n0 = OpConstant %float -0 -%205 = OpConstantComposite %v2float %float_n0 %float_0 -%206 = OpConstantComposite %v2float %float_0 %float_n0 -%207 = OpConstantComposite %mat2v2float %205 %206 -%293 = OpConstantComposite %v3float %float_1 %float_0 %float_0 -%294 = OpConstantComposite %v3float %float_0 %float_1 %float_0 -%295 = OpConstantComposite %v3float %float_0 %float_0 %float_1 -%296 = OpConstantComposite %mat3v3float %293 %294 %295 -%312 = OpConstantComposite %v2float %float_9 %float_0 -%313 = OpConstantComposite %v2float %float_0 %float_9 -%314 = OpConstantComposite %mat2v2float %312 %313 -%315 = OpConstantComposite %v3float %float_9 %float_0 %float_0 -%316 = OpConstantComposite %v3float %float_0 %float_9 %float_0 -%317 = OpConstantComposite %mat3v3float %315 %316 %295 -%431 = OpConstantComposite %v4float %float_1 %float_2 %float_3 %float_4 -%v4bool = OpTypeVector %bool 4 -%468 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %int_0 = OpConstant %int 0 + %140 = OpConstantComposite %v2float %float_1 %float_0 + %141 = OpConstantComposite %v2float %float_0 %float_1 + %142 = OpConstantComposite %mat2v2float %140 %141 + %176 = OpConstantComposite %mat2v2float %22 %22 + %float_n1 = OpConstant %float -1 + %190 = OpConstantComposite %v2float %float_n1 %float_0 + %191 = OpConstantComposite %v2float %float_0 %float_n1 + %192 = OpConstantComposite %mat2v2float %190 %191 + %float_n0 = OpConstant %float -0 + %205 = OpConstantComposite %v2float %float_n0 %float_0 + %206 = OpConstantComposite %v2float %float_0 %float_n0 + %207 = OpConstantComposite %mat2v2float %205 %206 + %293 = OpConstantComposite %v3float %float_1 %float_0 %float_0 + %294 = OpConstantComposite %v3float %float_0 %float_1 %float_0 + %295 = OpConstantComposite %v3float %float_0 %float_0 %float_1 + %296 = OpConstantComposite %mat3v3float %293 %294 %295 + %312 = OpConstantComposite %v2float %float_9 %float_0 + %313 = OpConstantComposite %v2float %float_0 %float_9 + %314 = OpConstantComposite %mat2v2float %312 %313 + %315 = OpConstantComposite %v3float %float_9 %float_0 %float_0 + %316 = OpConstantComposite %v3float %float_0 %float_9 %float_0 + %317 = OpConstantComposite %mat3v3float %315 %316 %295 + %431 = OpConstantComposite %v4float %float_1 %float_2 %float_3 %float_4 + %v4bool = OpTypeVector %bool 4 + %468 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 %_ptr_Function_mat3v3float = OpTypePointer Function %mat3v3float %_ptr_Function_v3float = OpTypePointer Function %v3float -%int_1 = OpConstant %int 1 + %int_1 = OpConstant %int 1 %_ptr_Function_v4float = OpTypePointer Function %v4float %_entrypoint_v = OpFunction %void None %19 -%20 = OpLabel -%23 = OpVariable %_ptr_Function_v2float Function -OpStore %23 %22 -%25 = OpFunctionCall %v4float %main %23 -OpStore %sk_FragColor %25 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %26 -%27 = OpFunctionParameter %_ptr_Function_v2float -%28 = OpLabel -%_0_ok = OpVariable %_ptr_Function_bool Function -%_1_zero = OpVariable %_ptr_Function_float Function -%_2_one = OpVariable %_ptr_Function_float Function -%_3_two = OpVariable %_ptr_Function_float Function -%_4_nine = OpVariable %_ptr_Function_float Function -%_5_m = OpVariable %_ptr_Function_mat3v3float Function -%563 = OpVariable %_ptr_Function_v4float Function -OpStore %_0_ok %true -OpSelectionMerge %34 None -OpBranchConditional %true %33 %34 -%33 = OpLabel -%35 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2 -%39 = OpLoad %mat2v2float %35 -%48 = OpCompositeExtract %v2float %39 0 -%49 = OpFOrdEqual %v2bool %48 %44 -%50 = OpAll %bool %49 -%51 = OpCompositeExtract %v2float %39 1 -%52 = OpFOrdEqual %v2bool %51 %45 -%53 = OpAll %bool %52 -%54 = OpLogicalAnd %bool %50 %53 -OpBranch %34 -%34 = OpLabel -%55 = OpPhi %bool %false %28 %54 %33 -OpStore %_0_ok %55 -OpSelectionMerge %57 None -OpBranchConditional %55 %56 %57 -%56 = OpLabel -%58 = OpAccessChain %_ptr_Uniform_mat3v3float %10 %int_3 -%61 = OpLoad %mat3v3float %58 -%72 = OpCompositeExtract %v3float %61 0 -%73 = OpFOrdEqual %v3bool %72 %67 -%74 = OpAll %bool %73 -%75 = OpCompositeExtract %v3float %61 1 -%76 = OpFOrdEqual %v3bool %75 %68 -%77 = OpAll %bool %76 -%78 = OpLogicalAnd %bool %74 %77 -%79 = OpCompositeExtract %v3float %61 2 -%80 = OpFOrdEqual %v3bool %79 %69 -%81 = OpAll %bool %80 -%82 = OpLogicalAnd %bool %78 %81 -OpBranch %57 -%57 = OpLabel -%83 = OpPhi %bool %false %34 %82 %56 -OpStore %_0_ok %83 -OpSelectionMerge %85 None -OpBranchConditional %83 %84 %85 -%84 = OpLabel -%86 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2 -%87 = OpLoad %mat2v2float %86 -%92 = OpCompositeExtract %v2float %87 0 -%93 = OpFUnordNotEqual %v2bool %92 %89 -%94 = OpAny %bool %93 -%95 = OpCompositeExtract %v2float %87 1 -%96 = OpFUnordNotEqual %v2bool %95 %90 -%97 = OpAny %bool %96 -%98 = OpLogicalOr %bool %94 %97 -OpBranch %85 -%85 = OpLabel -%99 = OpPhi %bool %false %57 %98 %84 -OpStore %_0_ok %99 -OpSelectionMerge %101 None -OpBranchConditional %99 %100 %101 -%100 = OpLabel -%102 = OpAccessChain %_ptr_Uniform_mat3v3float %10 %int_3 -%103 = OpLoad %mat3v3float %102 -%108 = OpCompositeExtract %v3float %103 0 -%109 = OpFUnordNotEqual %v3bool %108 %104 -%110 = OpAny %bool %109 -%111 = OpCompositeExtract %v3float %103 1 -%112 = OpFUnordNotEqual %v3bool %111 %105 -%113 = OpAny %bool %112 -%114 = OpLogicalOr %bool %110 %113 -%115 = OpCompositeExtract %v3float %103 2 -%116 = OpFUnordNotEqual %v3bool %115 %106 -%117 = OpAny %bool %116 -%118 = OpLogicalOr %bool %114 %117 -OpBranch %101 -%101 = OpLabel -%119 = OpPhi %bool %false %85 %118 %100 -OpStore %_0_ok %119 -%122 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%125 = OpLoad %v4float %122 -%126 = OpCompositeExtract %float %125 0 -OpStore %_1_zero %126 -%128 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%129 = OpLoad %v4float %128 -%130 = OpCompositeExtract %float %129 1 -OpStore %_2_one %130 -%132 = OpFMul %float %float_2 %130 -OpStore %_3_two %132 -%134 = OpFMul %float %float_9 %130 -OpStore %_4_nine %134 -OpSelectionMerge %136 None -OpBranchConditional %119 %135 %136 -%135 = OpLabel -%137 = OpCompositeConstruct %v2float %130 %126 -%138 = OpCompositeConstruct %v2float %126 %130 -%139 = OpCompositeConstruct %mat2v2float %137 %138 -%143 = OpFOrdEqual %v2bool %137 %140 -%144 = OpAll %bool %143 -%145 = OpFOrdEqual %v2bool %138 %141 -%146 = OpAll %bool %145 -%147 = OpLogicalAnd %bool %144 %146 -OpBranch %136 -%136 = OpLabel -%148 = OpPhi %bool %false %101 %147 %135 -OpStore %_0_ok %148 -OpSelectionMerge %150 None -OpBranchConditional %148 %149 %150 -%149 = OpLabel -%151 = OpCompositeConstruct %v2float %130 %130 -%152 = OpCompositeConstruct %v2float %130 %126 -%153 = OpCompositeConstruct %mat2v2float %152 %151 -%154 = OpFUnordNotEqual %v2bool %152 %140 -%155 = OpAny %bool %154 -%156 = OpFUnordNotEqual %v2bool %151 %141 -%157 = OpAny %bool %156 -%158 = OpLogicalOr %bool %155 %157 -OpBranch %150 -%150 = OpLabel -%159 = OpPhi %bool %false %136 %158 %149 -OpStore %_0_ok %159 -OpSelectionMerge %161 None -OpBranchConditional %159 %160 %161 -%160 = OpLabel -%162 = OpCompositeConstruct %v2float %130 %float_0 -%163 = OpCompositeConstruct %v2float %float_0 %130 -%164 = OpCompositeConstruct %mat2v2float %162 %163 -%165 = OpFOrdEqual %v2bool %162 %140 -%166 = OpAll %bool %165 -%167 = OpFOrdEqual %v2bool %163 %141 -%168 = OpAll %bool %167 -%169 = OpLogicalAnd %bool %166 %168 -OpBranch %161 -%161 = OpLabel -%170 = OpPhi %bool %false %150 %169 %160 -OpStore %_0_ok %170 -OpSelectionMerge %172 None -OpBranchConditional %170 %171 %172 -%171 = OpLabel -%173 = OpCompositeConstruct %v2float %130 %float_0 -%174 = OpCompositeConstruct %v2float %float_0 %130 -%175 = OpCompositeConstruct %mat2v2float %173 %174 -%177 = OpFUnordNotEqual %v2bool %173 %22 -%178 = OpAny %bool %177 -%179 = OpFUnordNotEqual %v2bool %174 %22 -%180 = OpAny %bool %179 -%181 = OpLogicalOr %bool %178 %180 -OpBranch %172 -%172 = OpLabel -%182 = OpPhi %bool %false %161 %181 %171 -OpStore %_0_ok %182 -OpSelectionMerge %184 None -OpBranchConditional %182 %183 %184 -%183 = OpLabel -%185 = OpFNegate %float %130 -%186 = OpCompositeConstruct %v2float %185 %float_0 -%187 = OpCompositeConstruct %v2float %float_0 %185 -%188 = OpCompositeConstruct %mat2v2float %186 %187 -%193 = OpFOrdEqual %v2bool %186 %190 -%194 = OpAll %bool %193 -%195 = OpFOrdEqual %v2bool %187 %191 -%196 = OpAll %bool %195 -%197 = OpLogicalAnd %bool %194 %196 -OpBranch %184 -%184 = OpLabel -%198 = OpPhi %bool %false %172 %197 %183 -OpStore %_0_ok %198 -OpSelectionMerge %200 None -OpBranchConditional %198 %199 %200 -%199 = OpLabel -%201 = OpCompositeConstruct %v2float %126 %float_0 -%202 = OpCompositeConstruct %v2float %float_0 %126 -%203 = OpCompositeConstruct %mat2v2float %201 %202 -%208 = OpFOrdEqual %v2bool %201 %205 -%209 = OpAll %bool %208 -%210 = OpFOrdEqual %v2bool %202 %206 -%211 = OpAll %bool %210 -%212 = OpLogicalAnd %bool %209 %211 -OpBranch %200 -%200 = OpLabel -%213 = OpPhi %bool %false %184 %212 %199 -OpStore %_0_ok %213 -OpSelectionMerge %215 None -OpBranchConditional %213 %214 %215 -%214 = OpLabel -%216 = OpFNegate %float %130 -%217 = OpCompositeConstruct %v2float %216 %float_0 -%218 = OpCompositeConstruct %v2float %float_0 %216 -%219 = OpCompositeConstruct %mat2v2float %217 %218 -%220 = OpFNegate %v2float %217 -%221 = OpFNegate %v2float %218 -%222 = OpCompositeConstruct %mat2v2float %220 %221 -%223 = OpFOrdEqual %v2bool %220 %140 -%224 = OpAll %bool %223 -%225 = OpFOrdEqual %v2bool %221 %141 -%226 = OpAll %bool %225 -%227 = OpLogicalAnd %bool %224 %226 -OpBranch %215 -%215 = OpLabel -%228 = OpPhi %bool %false %200 %227 %214 -OpStore %_0_ok %228 -OpSelectionMerge %230 None -OpBranchConditional %228 %229 %230 -%229 = OpLabel -%231 = OpCompositeConstruct %v2float %126 %float_0 -%232 = OpCompositeConstruct %v2float %float_0 %126 -%233 = OpCompositeConstruct %mat2v2float %231 %232 -%234 = OpFNegate %v2float %231 -%235 = OpFNegate %v2float %232 -%236 = OpCompositeConstruct %mat2v2float %234 %235 -%237 = OpFOrdEqual %v2bool %234 %205 -%238 = OpAll %bool %237 -%239 = OpFOrdEqual %v2bool %235 %206 -%240 = OpAll %bool %239 -%241 = OpLogicalAnd %bool %238 %240 -OpBranch %230 -%230 = OpLabel -%242 = OpPhi %bool %false %215 %241 %229 -OpStore %_0_ok %242 -OpSelectionMerge %244 None -OpBranchConditional %242 %243 %244 -%243 = OpLabel -%245 = OpCompositeConstruct %v2float %130 %float_0 -%246 = OpCompositeConstruct %v2float %float_0 %130 -%247 = OpCompositeConstruct %mat2v2float %245 %246 -%248 = OpFOrdEqual %v2bool %245 %140 -%249 = OpAll %bool %248 -%250 = OpFOrdEqual %v2bool %246 %141 -%251 = OpAll %bool %250 -%252 = OpLogicalAnd %bool %249 %251 -OpBranch %244 -%244 = OpLabel -%253 = OpPhi %bool %false %230 %252 %243 -OpStore %_0_ok %253 -OpSelectionMerge %255 None -OpBranchConditional %253 %254 %255 -%254 = OpLabel -%256 = OpCompositeConstruct %v2float %132 %float_0 -%257 = OpCompositeConstruct %v2float %float_0 %132 -%258 = OpCompositeConstruct %mat2v2float %256 %257 -%259 = OpFUnordNotEqual %v2bool %256 %140 -%260 = OpAny %bool %259 -%261 = OpFUnordNotEqual %v2bool %257 %141 -%262 = OpAny %bool %261 -%263 = OpLogicalOr %bool %260 %262 -OpBranch %255 -%255 = OpLabel -%264 = OpPhi %bool %false %244 %263 %254 -OpStore %_0_ok %264 -OpSelectionMerge %266 None -OpBranchConditional %264 %265 %266 -%265 = OpLabel -%267 = OpCompositeConstruct %v2float %130 %float_0 -%268 = OpCompositeConstruct %v2float %float_0 %130 -%269 = OpCompositeConstruct %mat2v2float %267 %268 -%270 = OpFOrdEqual %v2bool %267 %140 -%271 = OpAll %bool %270 -%272 = OpFOrdEqual %v2bool %268 %141 -%273 = OpAll %bool %272 -%274 = OpLogicalAnd %bool %271 %273 -OpBranch %266 -%266 = OpLabel -%275 = OpPhi %bool %false %255 %274 %265 -OpStore %_0_ok %275 -OpSelectionMerge %277 None -OpBranchConditional %275 %276 %277 -%276 = OpLabel -%278 = OpCompositeConstruct %v2float %130 %float_0 -%279 = OpCompositeConstruct %v2float %float_0 %130 -%280 = OpCompositeConstruct %mat2v2float %278 %279 -%281 = OpFUnordNotEqual %v2bool %278 %22 -%282 = OpAny %bool %281 -%283 = OpFUnordNotEqual %v2bool %279 %22 -%284 = OpAny %bool %283 -%285 = OpLogicalOr %bool %282 %284 -OpBranch %277 -%277 = OpLabel -%286 = OpPhi %bool %false %266 %285 %276 -OpStore %_0_ok %286 -OpSelectionMerge %288 None -OpBranchConditional %286 %287 %288 -%287 = OpLabel -%289 = OpCompositeConstruct %v3float %130 %126 %126 -%290 = OpCompositeConstruct %v3float %126 %130 %126 -%291 = OpCompositeConstruct %v3float %126 %126 %130 -%292 = OpCompositeConstruct %mat3v3float %289 %290 %291 -%297 = OpFOrdEqual %v3bool %289 %293 -%298 = OpAll %bool %297 -%299 = OpFOrdEqual %v3bool %290 %294 -%300 = OpAll %bool %299 -%301 = OpLogicalAnd %bool %298 %300 -%302 = OpFOrdEqual %v3bool %291 %295 -%303 = OpAll %bool %302 -%304 = OpLogicalAnd %bool %301 %303 -OpBranch %288 -%288 = OpLabel -%305 = OpPhi %bool %false %277 %304 %287 -OpStore %_0_ok %305 -OpSelectionMerge %307 None -OpBranchConditional %305 %306 %307 -%306 = OpLabel -%308 = OpCompositeConstruct %v3float %134 %126 %126 -%309 = OpCompositeConstruct %v3float %126 %134 %126 -%310 = OpCompositeConstruct %v3float %126 %126 %130 -%311 = OpCompositeConstruct %mat3v3float %308 %309 %310 -%318 = OpFOrdEqual %v3bool %308 %315 -%319 = OpAll %bool %318 -%320 = OpFOrdEqual %v3bool %309 %316 -%321 = OpAll %bool %320 -%322 = OpLogicalAnd %bool %319 %321 -%323 = OpFOrdEqual %v3bool %310 %295 -%324 = OpAll %bool %323 -%325 = OpLogicalAnd %bool %322 %324 -OpBranch %307 -%307 = OpLabel -%326 = OpPhi %bool %false %288 %325 %306 -OpStore %_0_ok %326 -OpSelectionMerge %328 None -OpBranchConditional %326 %327 %328 -%327 = OpLabel -%329 = OpCompositeConstruct %v3float %130 %float_0 %float_0 -%330 = OpCompositeConstruct %v3float %float_0 %130 %float_0 -%331 = OpCompositeConstruct %v3float %float_0 %float_0 %130 -%332 = OpCompositeConstruct %mat3v3float %329 %330 %331 -%333 = OpFOrdEqual %v3bool %329 %293 -%334 = OpAll %bool %333 -%335 = OpFOrdEqual %v3bool %330 %294 -%336 = OpAll %bool %335 -%337 = OpLogicalAnd %bool %334 %336 -%338 = OpFOrdEqual %v3bool %331 %295 -%339 = OpAll %bool %338 -%340 = OpLogicalAnd %bool %337 %339 -OpBranch %328 -%328 = OpLabel -%341 = OpPhi %bool %false %307 %340 %327 -OpStore %_0_ok %341 -OpSelectionMerge %343 None -OpBranchConditional %341 %342 %343 -%342 = OpLabel -%344 = OpCompositeConstruct %v3float %134 %float_0 %float_0 -%345 = OpCompositeConstruct %v3float %float_0 %134 %float_0 -%346 = OpCompositeConstruct %v3float %float_0 %float_0 %130 -%347 = OpCompositeConstruct %mat3v3float %344 %345 %346 -%348 = OpFOrdEqual %v3bool %344 %315 -%349 = OpAll %bool %348 -%350 = OpFOrdEqual %v3bool %345 %316 -%351 = OpAll %bool %350 -%352 = OpLogicalAnd %bool %349 %351 -%353 = OpFOrdEqual %v3bool %346 %295 -%354 = OpAll %bool %353 -%355 = OpLogicalAnd %bool %352 %354 -OpBranch %343 -%343 = OpLabel -%356 = OpPhi %bool %false %328 %355 %342 -OpStore %_0_ok %356 -OpSelectionMerge %358 None -OpBranchConditional %356 %357 %358 -%357 = OpLabel -%359 = OpCompositeConstruct %v3float %130 %float_0 %float_0 -%360 = OpCompositeConstruct %v3float %float_0 %130 %float_0 -%361 = OpCompositeConstruct %v3float %float_0 %float_0 %130 -%362 = OpCompositeConstruct %mat3v3float %359 %360 %361 -%363 = OpVectorShuffle %v2float %359 %359 0 1 -%364 = OpVectorShuffle %v2float %360 %360 0 1 -%365 = OpCompositeConstruct %mat2v2float %363 %364 -%366 = OpFOrdEqual %v2bool %363 %140 -%367 = OpAll %bool %366 -%368 = OpFOrdEqual %v2bool %364 %141 -%369 = OpAll %bool %368 -%370 = OpLogicalAnd %bool %367 %369 -OpBranch %358 -%358 = OpLabel -%371 = OpPhi %bool %false %343 %370 %357 -OpStore %_0_ok %371 -OpSelectionMerge %373 None -OpBranchConditional %371 %372 %373 -%372 = OpLabel -%374 = OpCompositeConstruct %v3float %130 %float_0 %float_0 -%375 = OpCompositeConstruct %v3float %float_0 %130 %float_0 -%376 = OpCompositeConstruct %v3float %float_0 %float_0 %130 -%377 = OpCompositeConstruct %mat3v3float %374 %375 %376 -%378 = OpVectorShuffle %v2float %374 %374 0 1 -%379 = OpVectorShuffle %v2float %375 %375 0 1 -%380 = OpCompositeConstruct %mat2v2float %378 %379 -%381 = OpFOrdEqual %v2bool %378 %140 -%382 = OpAll %bool %381 -%383 = OpFOrdEqual %v2bool %379 %141 -%384 = OpAll %bool %383 -%385 = OpLogicalAnd %bool %382 %384 -OpBranch %373 -%373 = OpLabel -%386 = OpPhi %bool %false %358 %385 %372 -OpStore %_0_ok %386 -OpSelectionMerge %388 None -OpBranchConditional %386 %387 %388 -%387 = OpLabel -%389 = OpCompositeConstruct %v2float %130 %126 -%390 = OpCompositeConstruct %v2float %126 %130 -%391 = OpCompositeConstruct %mat2v2float %389 %390 -%392 = OpFOrdEqual %v2bool %389 %140 -%393 = OpAll %bool %392 -%394 = OpFOrdEqual %v2bool %390 %141 -%395 = OpAll %bool %394 -%396 = OpLogicalAnd %bool %393 %395 -OpBranch %388 -%388 = OpLabel -%397 = OpPhi %bool %false %373 %396 %387 -OpStore %_0_ok %397 -OpSelectionMerge %399 None -OpBranchConditional %397 %398 %399 -%398 = OpLabel -%400 = OpCompositeConstruct %v2float %130 %126 -%401 = OpCompositeConstruct %v2float %126 %130 -%402 = OpCompositeConstruct %mat2v2float %400 %401 -%403 = OpFOrdEqual %v2bool %400 %140 -%404 = OpAll %bool %403 -%405 = OpFOrdEqual %v2bool %401 %141 -%406 = OpAll %bool %405 -%407 = OpLogicalAnd %bool %404 %406 -OpBranch %399 -%399 = OpLabel -%408 = OpPhi %bool %false %388 %407 %398 -OpStore %_0_ok %408 -OpSelectionMerge %410 None -OpBranchConditional %408 %409 %410 -%409 = OpLabel -%411 = OpCompositeConstruct %v2float %130 %126 -%412 = OpCompositeConstruct %v2float %126 %130 -%413 = OpCompositeConstruct %mat2v2float %411 %412 -%414 = OpFOrdEqual %v2bool %411 %140 -%415 = OpAll %bool %414 -%416 = OpFOrdEqual %v2bool %412 %141 -%417 = OpAll %bool %416 -%418 = OpLogicalAnd %bool %415 %417 -OpBranch %410 -%410 = OpLabel -%419 = OpPhi %bool %false %399 %418 %409 -OpStore %_0_ok %419 -OpSelectionMerge %421 None -OpBranchConditional %419 %420 %421 -%420 = OpLabel -%422 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2 -%423 = OpLoad %mat2v2float %422 -%424 = OpCompositeExtract %float %423 0 0 -%425 = OpCompositeExtract %float %423 0 1 -%426 = OpCompositeExtract %float %423 1 0 -%427 = OpCompositeExtract %float %423 1 1 -%428 = OpCompositeConstruct %v4float %424 %425 %426 %427 -%429 = OpCompositeConstruct %v4float %130 %130 %130 %130 -%430 = OpFMul %v4float %428 %429 -%432 = OpFOrdEqual %v4bool %430 %431 -%434 = OpAll %bool %432 -OpBranch %421 -%421 = OpLabel -%435 = OpPhi %bool %false %410 %434 %420 -OpStore %_0_ok %435 -OpSelectionMerge %437 None -OpBranchConditional %435 %436 %437 -%436 = OpLabel -%438 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2 -%439 = OpLoad %mat2v2float %438 -%440 = OpCompositeExtract %float %439 0 0 -%441 = OpCompositeExtract %float %439 0 1 -%442 = OpCompositeExtract %float %439 1 0 -%443 = OpCompositeExtract %float %439 1 1 -%444 = OpCompositeConstruct %v4float %440 %441 %442 %443 -%445 = OpCompositeConstruct %v4float %130 %130 %130 %130 -%446 = OpFMul %v4float %444 %445 -%447 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2 -%448 = OpLoad %mat2v2float %447 -%449 = OpCompositeExtract %float %448 0 0 -%450 = OpCompositeExtract %float %448 0 1 -%451 = OpCompositeExtract %float %448 1 0 -%452 = OpCompositeExtract %float %448 1 1 -%453 = OpCompositeConstruct %v4float %449 %450 %451 %452 -%454 = OpFOrdEqual %v4bool %446 %453 -%455 = OpAll %bool %454 -OpBranch %437 -%437 = OpLabel -%456 = OpPhi %bool %false %421 %455 %436 -OpStore %_0_ok %456 -OpSelectionMerge %458 None -OpBranchConditional %456 %457 %458 -%457 = OpLabel -%459 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2 -%460 = OpLoad %mat2v2float %459 -%461 = OpCompositeExtract %float %460 0 0 -%462 = OpCompositeExtract %float %460 0 1 -%463 = OpCompositeExtract %float %460 1 0 -%464 = OpCompositeExtract %float %460 1 1 -%465 = OpCompositeConstruct %v4float %461 %462 %463 %464 -%466 = OpCompositeConstruct %v4float %126 %126 %126 %126 -%467 = OpFMul %v4float %465 %466 -%469 = OpFOrdEqual %v4bool %467 %468 -%470 = OpAll %bool %469 -OpBranch %458 -%458 = OpLabel -%471 = OpPhi %bool %false %437 %470 %457 -OpStore %_0_ok %471 -%474 = OpCompositeConstruct %v3float %130 %132 %float_3 -%475 = OpCompositeConstruct %v3float %float_7 %float_8 %134 -%476 = OpCompositeConstruct %mat3v3float %474 %68 %475 -OpStore %_5_m %476 -OpSelectionMerge %478 None -OpBranchConditional %471 %477 %478 -%477 = OpLabel -%479 = OpAccessChain %_ptr_Function_v3float %_5_m %int_0 -%481 = OpLoad %v3float %479 -%482 = OpFOrdEqual %v3bool %481 %67 -%483 = OpAll %bool %482 -OpBranch %478 -%478 = OpLabel -%484 = OpPhi %bool %false %458 %483 %477 -OpStore %_0_ok %484 -OpSelectionMerge %486 None -OpBranchConditional %484 %485 %486 -%485 = OpLabel -%488 = OpAccessChain %_ptr_Function_v3float %_5_m %int_1 -%489 = OpLoad %v3float %488 -%490 = OpFOrdEqual %v3bool %489 %68 -%491 = OpAll %bool %490 -OpBranch %486 -%486 = OpLabel -%492 = OpPhi %bool %false %478 %491 %485 -OpStore %_0_ok %492 -OpSelectionMerge %494 None -OpBranchConditional %492 %493 %494 -%493 = OpLabel -%495 = OpAccessChain %_ptr_Function_v3float %_5_m %int_2 -%496 = OpLoad %v3float %495 -%497 = OpFOrdEqual %v3bool %496 %69 -%498 = OpAll %bool %497 -OpBranch %494 -%494 = OpLabel -%499 = OpPhi %bool %false %486 %498 %493 -OpStore %_0_ok %499 -OpSelectionMerge %501 None -OpBranchConditional %499 %500 %501 -%500 = OpLabel -%502 = OpAccessChain %_ptr_Function_v3float %_5_m %int_0 -%503 = OpLoad %v3float %502 -%504 = OpCompositeExtract %float %503 0 -%505 = OpFOrdEqual %bool %504 %float_1 -OpBranch %501 -%501 = OpLabel -%506 = OpPhi %bool %false %494 %505 %500 -OpStore %_0_ok %506 -OpSelectionMerge %508 None -OpBranchConditional %506 %507 %508 -%507 = OpLabel -%509 = OpAccessChain %_ptr_Function_v3float %_5_m %int_0 -%510 = OpLoad %v3float %509 -%511 = OpCompositeExtract %float %510 1 -%512 = OpFOrdEqual %bool %511 %float_2 -OpBranch %508 -%508 = OpLabel -%513 = OpPhi %bool %false %501 %512 %507 -OpStore %_0_ok %513 -OpSelectionMerge %515 None -OpBranchConditional %513 %514 %515 -%514 = OpLabel -%516 = OpAccessChain %_ptr_Function_v3float %_5_m %int_0 -%517 = OpLoad %v3float %516 -%518 = OpCompositeExtract %float %517 2 -%519 = OpFOrdEqual %bool %518 %float_3 -OpBranch %515 -%515 = OpLabel -%520 = OpPhi %bool %false %508 %519 %514 -OpStore %_0_ok %520 -OpSelectionMerge %522 None -OpBranchConditional %520 %521 %522 -%521 = OpLabel -%523 = OpAccessChain %_ptr_Function_v3float %_5_m %int_1 -%524 = OpLoad %v3float %523 -%525 = OpCompositeExtract %float %524 0 -%526 = OpFOrdEqual %bool %525 %float_4 -OpBranch %522 -%522 = OpLabel -%527 = OpPhi %bool %false %515 %526 %521 -OpStore %_0_ok %527 -OpSelectionMerge %529 None -OpBranchConditional %527 %528 %529 -%528 = OpLabel -%530 = OpAccessChain %_ptr_Function_v3float %_5_m %int_1 -%531 = OpLoad %v3float %530 -%532 = OpCompositeExtract %float %531 1 -%533 = OpFOrdEqual %bool %532 %float_5 -OpBranch %529 -%529 = OpLabel -%534 = OpPhi %bool %false %522 %533 %528 -OpStore %_0_ok %534 -OpSelectionMerge %536 None -OpBranchConditional %534 %535 %536 -%535 = OpLabel -%537 = OpAccessChain %_ptr_Function_v3float %_5_m %int_1 -%538 = OpLoad %v3float %537 -%539 = OpCompositeExtract %float %538 2 -%540 = OpFOrdEqual %bool %539 %float_6 -OpBranch %536 -%536 = OpLabel -%541 = OpPhi %bool %false %529 %540 %535 -OpStore %_0_ok %541 -OpSelectionMerge %543 None -OpBranchConditional %541 %542 %543 -%542 = OpLabel -%544 = OpAccessChain %_ptr_Function_v3float %_5_m %int_2 -%545 = OpLoad %v3float %544 -%546 = OpCompositeExtract %float %545 0 -%547 = OpFOrdEqual %bool %546 %float_7 -OpBranch %543 -%543 = OpLabel -%548 = OpPhi %bool %false %536 %547 %542 -OpStore %_0_ok %548 -OpSelectionMerge %550 None -OpBranchConditional %548 %549 %550 -%549 = OpLabel -%551 = OpAccessChain %_ptr_Function_v3float %_5_m %int_2 -%552 = OpLoad %v3float %551 -%553 = OpCompositeExtract %float %552 1 -%554 = OpFOrdEqual %bool %553 %float_8 -OpBranch %550 -%550 = OpLabel -%555 = OpPhi %bool %false %543 %554 %549 -OpStore %_0_ok %555 -OpSelectionMerge %557 None -OpBranchConditional %555 %556 %557 -%556 = OpLabel -%558 = OpAccessChain %_ptr_Function_v3float %_5_m %int_2 -%559 = OpLoad %v3float %558 -%560 = OpCompositeExtract %float %559 2 -%561 = OpFOrdEqual %bool %560 %float_9 -OpBranch %557 -%557 = OpLabel -%562 = OpPhi %bool %false %550 %561 %556 -OpStore %_0_ok %562 -OpSelectionMerge %567 None -OpBranchConditional %562 %565 %566 -%565 = OpLabel -%568 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%569 = OpLoad %v4float %568 -OpStore %563 %569 -OpBranch %567 -%566 = OpLabel -%570 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%571 = OpLoad %v4float %570 -OpStore %563 %571 -OpBranch %567 -%567 = OpLabel -%572 = OpLoad %v4float %563 -OpReturnValue %572 -OpFunctionEnd + %20 = OpLabel + %23 = OpVariable %_ptr_Function_v2float Function + OpStore %23 %22 + %25 = OpFunctionCall %v4float %main %23 + OpStore %sk_FragColor %25 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %26 + %27 = OpFunctionParameter %_ptr_Function_v2float + %28 = OpLabel + %_0_ok = OpVariable %_ptr_Function_bool Function + %_1_zero = OpVariable %_ptr_Function_float Function + %_2_one = OpVariable %_ptr_Function_float Function + %_3_two = OpVariable %_ptr_Function_float Function + %_4_nine = OpVariable %_ptr_Function_float Function + %_5_m = OpVariable %_ptr_Function_mat3v3float Function + %563 = OpVariable %_ptr_Function_v4float Function + OpStore %_0_ok %true + OpSelectionMerge %34 None + OpBranchConditional %true %33 %34 + %33 = OpLabel + %35 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2 + %39 = OpLoad %mat2v2float %35 + %48 = OpCompositeExtract %v2float %39 0 + %49 = OpFOrdEqual %v2bool %48 %44 + %50 = OpAll %bool %49 + %51 = OpCompositeExtract %v2float %39 1 + %52 = OpFOrdEqual %v2bool %51 %45 + %53 = OpAll %bool %52 + %54 = OpLogicalAnd %bool %50 %53 + OpBranch %34 + %34 = OpLabel + %55 = OpPhi %bool %false %28 %54 %33 + OpStore %_0_ok %55 + OpSelectionMerge %57 None + OpBranchConditional %55 %56 %57 + %56 = OpLabel + %58 = OpAccessChain %_ptr_Uniform_mat3v3float %10 %int_3 + %61 = OpLoad %mat3v3float %58 + %72 = OpCompositeExtract %v3float %61 0 + %73 = OpFOrdEqual %v3bool %72 %67 + %74 = OpAll %bool %73 + %75 = OpCompositeExtract %v3float %61 1 + %76 = OpFOrdEqual %v3bool %75 %68 + %77 = OpAll %bool %76 + %78 = OpLogicalAnd %bool %74 %77 + %79 = OpCompositeExtract %v3float %61 2 + %80 = OpFOrdEqual %v3bool %79 %69 + %81 = OpAll %bool %80 + %82 = OpLogicalAnd %bool %78 %81 + OpBranch %57 + %57 = OpLabel + %83 = OpPhi %bool %false %34 %82 %56 + OpStore %_0_ok %83 + OpSelectionMerge %85 None + OpBranchConditional %83 %84 %85 + %84 = OpLabel + %86 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2 + %87 = OpLoad %mat2v2float %86 + %92 = OpCompositeExtract %v2float %87 0 + %93 = OpFUnordNotEqual %v2bool %92 %89 + %94 = OpAny %bool %93 + %95 = OpCompositeExtract %v2float %87 1 + %96 = OpFUnordNotEqual %v2bool %95 %90 + %97 = OpAny %bool %96 + %98 = OpLogicalOr %bool %94 %97 + OpBranch %85 + %85 = OpLabel + %99 = OpPhi %bool %false %57 %98 %84 + OpStore %_0_ok %99 + OpSelectionMerge %101 None + OpBranchConditional %99 %100 %101 + %100 = OpLabel + %102 = OpAccessChain %_ptr_Uniform_mat3v3float %10 %int_3 + %103 = OpLoad %mat3v3float %102 + %108 = OpCompositeExtract %v3float %103 0 + %109 = OpFUnordNotEqual %v3bool %108 %104 + %110 = OpAny %bool %109 + %111 = OpCompositeExtract %v3float %103 1 + %112 = OpFUnordNotEqual %v3bool %111 %105 + %113 = OpAny %bool %112 + %114 = OpLogicalOr %bool %110 %113 + %115 = OpCompositeExtract %v3float %103 2 + %116 = OpFUnordNotEqual %v3bool %115 %106 + %117 = OpAny %bool %116 + %118 = OpLogicalOr %bool %114 %117 + OpBranch %101 + %101 = OpLabel + %119 = OpPhi %bool %false %85 %118 %100 + OpStore %_0_ok %119 + %122 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %125 = OpLoad %v4float %122 + %126 = OpCompositeExtract %float %125 0 + OpStore %_1_zero %126 + %128 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %129 = OpLoad %v4float %128 + %130 = OpCompositeExtract %float %129 1 + OpStore %_2_one %130 + %132 = OpFMul %float %float_2 %130 + OpStore %_3_two %132 + %134 = OpFMul %float %float_9 %130 + OpStore %_4_nine %134 + OpSelectionMerge %136 None + OpBranchConditional %119 %135 %136 + %135 = OpLabel + %137 = OpCompositeConstruct %v2float %130 %126 + %138 = OpCompositeConstruct %v2float %126 %130 + %139 = OpCompositeConstruct %mat2v2float %137 %138 + %143 = OpFOrdEqual %v2bool %137 %140 + %144 = OpAll %bool %143 + %145 = OpFOrdEqual %v2bool %138 %141 + %146 = OpAll %bool %145 + %147 = OpLogicalAnd %bool %144 %146 + OpBranch %136 + %136 = OpLabel + %148 = OpPhi %bool %false %101 %147 %135 + OpStore %_0_ok %148 + OpSelectionMerge %150 None + OpBranchConditional %148 %149 %150 + %149 = OpLabel + %151 = OpCompositeConstruct %v2float %130 %130 + %152 = OpCompositeConstruct %v2float %130 %126 + %153 = OpCompositeConstruct %mat2v2float %152 %151 + %154 = OpFUnordNotEqual %v2bool %152 %140 + %155 = OpAny %bool %154 + %156 = OpFUnordNotEqual %v2bool %151 %141 + %157 = OpAny %bool %156 + %158 = OpLogicalOr %bool %155 %157 + OpBranch %150 + %150 = OpLabel + %159 = OpPhi %bool %false %136 %158 %149 + OpStore %_0_ok %159 + OpSelectionMerge %161 None + OpBranchConditional %159 %160 %161 + %160 = OpLabel + %162 = OpCompositeConstruct %v2float %130 %float_0 + %163 = OpCompositeConstruct %v2float %float_0 %130 + %164 = OpCompositeConstruct %mat2v2float %162 %163 + %165 = OpFOrdEqual %v2bool %162 %140 + %166 = OpAll %bool %165 + %167 = OpFOrdEqual %v2bool %163 %141 + %168 = OpAll %bool %167 + %169 = OpLogicalAnd %bool %166 %168 + OpBranch %161 + %161 = OpLabel + %170 = OpPhi %bool %false %150 %169 %160 + OpStore %_0_ok %170 + OpSelectionMerge %172 None + OpBranchConditional %170 %171 %172 + %171 = OpLabel + %173 = OpCompositeConstruct %v2float %130 %float_0 + %174 = OpCompositeConstruct %v2float %float_0 %130 + %175 = OpCompositeConstruct %mat2v2float %173 %174 + %177 = OpFUnordNotEqual %v2bool %173 %22 + %178 = OpAny %bool %177 + %179 = OpFUnordNotEqual %v2bool %174 %22 + %180 = OpAny %bool %179 + %181 = OpLogicalOr %bool %178 %180 + OpBranch %172 + %172 = OpLabel + %182 = OpPhi %bool %false %161 %181 %171 + OpStore %_0_ok %182 + OpSelectionMerge %184 None + OpBranchConditional %182 %183 %184 + %183 = OpLabel + %185 = OpFNegate %float %130 + %186 = OpCompositeConstruct %v2float %185 %float_0 + %187 = OpCompositeConstruct %v2float %float_0 %185 + %188 = OpCompositeConstruct %mat2v2float %186 %187 + %193 = OpFOrdEqual %v2bool %186 %190 + %194 = OpAll %bool %193 + %195 = OpFOrdEqual %v2bool %187 %191 + %196 = OpAll %bool %195 + %197 = OpLogicalAnd %bool %194 %196 + OpBranch %184 + %184 = OpLabel + %198 = OpPhi %bool %false %172 %197 %183 + OpStore %_0_ok %198 + OpSelectionMerge %200 None + OpBranchConditional %198 %199 %200 + %199 = OpLabel + %201 = OpCompositeConstruct %v2float %126 %float_0 + %202 = OpCompositeConstruct %v2float %float_0 %126 + %203 = OpCompositeConstruct %mat2v2float %201 %202 + %208 = OpFOrdEqual %v2bool %201 %205 + %209 = OpAll %bool %208 + %210 = OpFOrdEqual %v2bool %202 %206 + %211 = OpAll %bool %210 + %212 = OpLogicalAnd %bool %209 %211 + OpBranch %200 + %200 = OpLabel + %213 = OpPhi %bool %false %184 %212 %199 + OpStore %_0_ok %213 + OpSelectionMerge %215 None + OpBranchConditional %213 %214 %215 + %214 = OpLabel + %216 = OpFNegate %float %130 + %217 = OpCompositeConstruct %v2float %216 %float_0 + %218 = OpCompositeConstruct %v2float %float_0 %216 + %219 = OpCompositeConstruct %mat2v2float %217 %218 + %220 = OpFNegate %v2float %217 + %221 = OpFNegate %v2float %218 + %222 = OpCompositeConstruct %mat2v2float %220 %221 + %223 = OpFOrdEqual %v2bool %220 %140 + %224 = OpAll %bool %223 + %225 = OpFOrdEqual %v2bool %221 %141 + %226 = OpAll %bool %225 + %227 = OpLogicalAnd %bool %224 %226 + OpBranch %215 + %215 = OpLabel + %228 = OpPhi %bool %false %200 %227 %214 + OpStore %_0_ok %228 + OpSelectionMerge %230 None + OpBranchConditional %228 %229 %230 + %229 = OpLabel + %231 = OpCompositeConstruct %v2float %126 %float_0 + %232 = OpCompositeConstruct %v2float %float_0 %126 + %233 = OpCompositeConstruct %mat2v2float %231 %232 + %234 = OpFNegate %v2float %231 + %235 = OpFNegate %v2float %232 + %236 = OpCompositeConstruct %mat2v2float %234 %235 + %237 = OpFOrdEqual %v2bool %234 %205 + %238 = OpAll %bool %237 + %239 = OpFOrdEqual %v2bool %235 %206 + %240 = OpAll %bool %239 + %241 = OpLogicalAnd %bool %238 %240 + OpBranch %230 + %230 = OpLabel + %242 = OpPhi %bool %false %215 %241 %229 + OpStore %_0_ok %242 + OpSelectionMerge %244 None + OpBranchConditional %242 %243 %244 + %243 = OpLabel + %245 = OpCompositeConstruct %v2float %130 %float_0 + %246 = OpCompositeConstruct %v2float %float_0 %130 + %247 = OpCompositeConstruct %mat2v2float %245 %246 + %248 = OpFOrdEqual %v2bool %245 %140 + %249 = OpAll %bool %248 + %250 = OpFOrdEqual %v2bool %246 %141 + %251 = OpAll %bool %250 + %252 = OpLogicalAnd %bool %249 %251 + OpBranch %244 + %244 = OpLabel + %253 = OpPhi %bool %false %230 %252 %243 + OpStore %_0_ok %253 + OpSelectionMerge %255 None + OpBranchConditional %253 %254 %255 + %254 = OpLabel + %256 = OpCompositeConstruct %v2float %132 %float_0 + %257 = OpCompositeConstruct %v2float %float_0 %132 + %258 = OpCompositeConstruct %mat2v2float %256 %257 + %259 = OpFUnordNotEqual %v2bool %256 %140 + %260 = OpAny %bool %259 + %261 = OpFUnordNotEqual %v2bool %257 %141 + %262 = OpAny %bool %261 + %263 = OpLogicalOr %bool %260 %262 + OpBranch %255 + %255 = OpLabel + %264 = OpPhi %bool %false %244 %263 %254 + OpStore %_0_ok %264 + OpSelectionMerge %266 None + OpBranchConditional %264 %265 %266 + %265 = OpLabel + %267 = OpCompositeConstruct %v2float %130 %float_0 + %268 = OpCompositeConstruct %v2float %float_0 %130 + %269 = OpCompositeConstruct %mat2v2float %267 %268 + %270 = OpFOrdEqual %v2bool %267 %140 + %271 = OpAll %bool %270 + %272 = OpFOrdEqual %v2bool %268 %141 + %273 = OpAll %bool %272 + %274 = OpLogicalAnd %bool %271 %273 + OpBranch %266 + %266 = OpLabel + %275 = OpPhi %bool %false %255 %274 %265 + OpStore %_0_ok %275 + OpSelectionMerge %277 None + OpBranchConditional %275 %276 %277 + %276 = OpLabel + %278 = OpCompositeConstruct %v2float %130 %float_0 + %279 = OpCompositeConstruct %v2float %float_0 %130 + %280 = OpCompositeConstruct %mat2v2float %278 %279 + %281 = OpFUnordNotEqual %v2bool %278 %22 + %282 = OpAny %bool %281 + %283 = OpFUnordNotEqual %v2bool %279 %22 + %284 = OpAny %bool %283 + %285 = OpLogicalOr %bool %282 %284 + OpBranch %277 + %277 = OpLabel + %286 = OpPhi %bool %false %266 %285 %276 + OpStore %_0_ok %286 + OpSelectionMerge %288 None + OpBranchConditional %286 %287 %288 + %287 = OpLabel + %289 = OpCompositeConstruct %v3float %130 %126 %126 + %290 = OpCompositeConstruct %v3float %126 %130 %126 + %291 = OpCompositeConstruct %v3float %126 %126 %130 + %292 = OpCompositeConstruct %mat3v3float %289 %290 %291 + %297 = OpFOrdEqual %v3bool %289 %293 + %298 = OpAll %bool %297 + %299 = OpFOrdEqual %v3bool %290 %294 + %300 = OpAll %bool %299 + %301 = OpLogicalAnd %bool %298 %300 + %302 = OpFOrdEqual %v3bool %291 %295 + %303 = OpAll %bool %302 + %304 = OpLogicalAnd %bool %301 %303 + OpBranch %288 + %288 = OpLabel + %305 = OpPhi %bool %false %277 %304 %287 + OpStore %_0_ok %305 + OpSelectionMerge %307 None + OpBranchConditional %305 %306 %307 + %306 = OpLabel + %308 = OpCompositeConstruct %v3float %134 %126 %126 + %309 = OpCompositeConstruct %v3float %126 %134 %126 + %310 = OpCompositeConstruct %v3float %126 %126 %130 + %311 = OpCompositeConstruct %mat3v3float %308 %309 %310 + %318 = OpFOrdEqual %v3bool %308 %315 + %319 = OpAll %bool %318 + %320 = OpFOrdEqual %v3bool %309 %316 + %321 = OpAll %bool %320 + %322 = OpLogicalAnd %bool %319 %321 + %323 = OpFOrdEqual %v3bool %310 %295 + %324 = OpAll %bool %323 + %325 = OpLogicalAnd %bool %322 %324 + OpBranch %307 + %307 = OpLabel + %326 = OpPhi %bool %false %288 %325 %306 + OpStore %_0_ok %326 + OpSelectionMerge %328 None + OpBranchConditional %326 %327 %328 + %327 = OpLabel + %329 = OpCompositeConstruct %v3float %130 %float_0 %float_0 + %330 = OpCompositeConstruct %v3float %float_0 %130 %float_0 + %331 = OpCompositeConstruct %v3float %float_0 %float_0 %130 + %332 = OpCompositeConstruct %mat3v3float %329 %330 %331 + %333 = OpFOrdEqual %v3bool %329 %293 + %334 = OpAll %bool %333 + %335 = OpFOrdEqual %v3bool %330 %294 + %336 = OpAll %bool %335 + %337 = OpLogicalAnd %bool %334 %336 + %338 = OpFOrdEqual %v3bool %331 %295 + %339 = OpAll %bool %338 + %340 = OpLogicalAnd %bool %337 %339 + OpBranch %328 + %328 = OpLabel + %341 = OpPhi %bool %false %307 %340 %327 + OpStore %_0_ok %341 + OpSelectionMerge %343 None + OpBranchConditional %341 %342 %343 + %342 = OpLabel + %344 = OpCompositeConstruct %v3float %134 %float_0 %float_0 + %345 = OpCompositeConstruct %v3float %float_0 %134 %float_0 + %346 = OpCompositeConstruct %v3float %float_0 %float_0 %130 + %347 = OpCompositeConstruct %mat3v3float %344 %345 %346 + %348 = OpFOrdEqual %v3bool %344 %315 + %349 = OpAll %bool %348 + %350 = OpFOrdEqual %v3bool %345 %316 + %351 = OpAll %bool %350 + %352 = OpLogicalAnd %bool %349 %351 + %353 = OpFOrdEqual %v3bool %346 %295 + %354 = OpAll %bool %353 + %355 = OpLogicalAnd %bool %352 %354 + OpBranch %343 + %343 = OpLabel + %356 = OpPhi %bool %false %328 %355 %342 + OpStore %_0_ok %356 + OpSelectionMerge %358 None + OpBranchConditional %356 %357 %358 + %357 = OpLabel + %359 = OpCompositeConstruct %v3float %130 %float_0 %float_0 + %360 = OpCompositeConstruct %v3float %float_0 %130 %float_0 + %361 = OpCompositeConstruct %v3float %float_0 %float_0 %130 + %362 = OpCompositeConstruct %mat3v3float %359 %360 %361 + %363 = OpVectorShuffle %v2float %359 %359 0 1 + %364 = OpVectorShuffle %v2float %360 %360 0 1 + %365 = OpCompositeConstruct %mat2v2float %363 %364 + %366 = OpFOrdEqual %v2bool %363 %140 + %367 = OpAll %bool %366 + %368 = OpFOrdEqual %v2bool %364 %141 + %369 = OpAll %bool %368 + %370 = OpLogicalAnd %bool %367 %369 + OpBranch %358 + %358 = OpLabel + %371 = OpPhi %bool %false %343 %370 %357 + OpStore %_0_ok %371 + OpSelectionMerge %373 None + OpBranchConditional %371 %372 %373 + %372 = OpLabel + %374 = OpCompositeConstruct %v3float %130 %float_0 %float_0 + %375 = OpCompositeConstruct %v3float %float_0 %130 %float_0 + %376 = OpCompositeConstruct %v3float %float_0 %float_0 %130 + %377 = OpCompositeConstruct %mat3v3float %374 %375 %376 + %378 = OpVectorShuffle %v2float %374 %374 0 1 + %379 = OpVectorShuffle %v2float %375 %375 0 1 + %380 = OpCompositeConstruct %mat2v2float %378 %379 + %381 = OpFOrdEqual %v2bool %378 %140 + %382 = OpAll %bool %381 + %383 = OpFOrdEqual %v2bool %379 %141 + %384 = OpAll %bool %383 + %385 = OpLogicalAnd %bool %382 %384 + OpBranch %373 + %373 = OpLabel + %386 = OpPhi %bool %false %358 %385 %372 + OpStore %_0_ok %386 + OpSelectionMerge %388 None + OpBranchConditional %386 %387 %388 + %387 = OpLabel + %389 = OpCompositeConstruct %v2float %130 %126 + %390 = OpCompositeConstruct %v2float %126 %130 + %391 = OpCompositeConstruct %mat2v2float %389 %390 + %392 = OpFOrdEqual %v2bool %389 %140 + %393 = OpAll %bool %392 + %394 = OpFOrdEqual %v2bool %390 %141 + %395 = OpAll %bool %394 + %396 = OpLogicalAnd %bool %393 %395 + OpBranch %388 + %388 = OpLabel + %397 = OpPhi %bool %false %373 %396 %387 + OpStore %_0_ok %397 + OpSelectionMerge %399 None + OpBranchConditional %397 %398 %399 + %398 = OpLabel + %400 = OpCompositeConstruct %v2float %130 %126 + %401 = OpCompositeConstruct %v2float %126 %130 + %402 = OpCompositeConstruct %mat2v2float %400 %401 + %403 = OpFOrdEqual %v2bool %400 %140 + %404 = OpAll %bool %403 + %405 = OpFOrdEqual %v2bool %401 %141 + %406 = OpAll %bool %405 + %407 = OpLogicalAnd %bool %404 %406 + OpBranch %399 + %399 = OpLabel + %408 = OpPhi %bool %false %388 %407 %398 + OpStore %_0_ok %408 + OpSelectionMerge %410 None + OpBranchConditional %408 %409 %410 + %409 = OpLabel + %411 = OpCompositeConstruct %v2float %130 %126 + %412 = OpCompositeConstruct %v2float %126 %130 + %413 = OpCompositeConstruct %mat2v2float %411 %412 + %414 = OpFOrdEqual %v2bool %411 %140 + %415 = OpAll %bool %414 + %416 = OpFOrdEqual %v2bool %412 %141 + %417 = OpAll %bool %416 + %418 = OpLogicalAnd %bool %415 %417 + OpBranch %410 + %410 = OpLabel + %419 = OpPhi %bool %false %399 %418 %409 + OpStore %_0_ok %419 + OpSelectionMerge %421 None + OpBranchConditional %419 %420 %421 + %420 = OpLabel + %422 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2 + %423 = OpLoad %mat2v2float %422 + %424 = OpCompositeExtract %float %423 0 0 + %425 = OpCompositeExtract %float %423 0 1 + %426 = OpCompositeExtract %float %423 1 0 + %427 = OpCompositeExtract %float %423 1 1 + %428 = OpCompositeConstruct %v4float %424 %425 %426 %427 + %429 = OpCompositeConstruct %v4float %130 %130 %130 %130 + %430 = OpFMul %v4float %428 %429 + %432 = OpFOrdEqual %v4bool %430 %431 + %434 = OpAll %bool %432 + OpBranch %421 + %421 = OpLabel + %435 = OpPhi %bool %false %410 %434 %420 + OpStore %_0_ok %435 + OpSelectionMerge %437 None + OpBranchConditional %435 %436 %437 + %436 = OpLabel + %438 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2 + %439 = OpLoad %mat2v2float %438 + %440 = OpCompositeExtract %float %439 0 0 + %441 = OpCompositeExtract %float %439 0 1 + %442 = OpCompositeExtract %float %439 1 0 + %443 = OpCompositeExtract %float %439 1 1 + %444 = OpCompositeConstruct %v4float %440 %441 %442 %443 + %445 = OpCompositeConstruct %v4float %130 %130 %130 %130 + %446 = OpFMul %v4float %444 %445 + %447 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2 + %448 = OpLoad %mat2v2float %447 + %449 = OpCompositeExtract %float %448 0 0 + %450 = OpCompositeExtract %float %448 0 1 + %451 = OpCompositeExtract %float %448 1 0 + %452 = OpCompositeExtract %float %448 1 1 + %453 = OpCompositeConstruct %v4float %449 %450 %451 %452 + %454 = OpFOrdEqual %v4bool %446 %453 + %455 = OpAll %bool %454 + OpBranch %437 + %437 = OpLabel + %456 = OpPhi %bool %false %421 %455 %436 + OpStore %_0_ok %456 + OpSelectionMerge %458 None + OpBranchConditional %456 %457 %458 + %457 = OpLabel + %459 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2 + %460 = OpLoad %mat2v2float %459 + %461 = OpCompositeExtract %float %460 0 0 + %462 = OpCompositeExtract %float %460 0 1 + %463 = OpCompositeExtract %float %460 1 0 + %464 = OpCompositeExtract %float %460 1 1 + %465 = OpCompositeConstruct %v4float %461 %462 %463 %464 + %466 = OpCompositeConstruct %v4float %126 %126 %126 %126 + %467 = OpFMul %v4float %465 %466 + %469 = OpFOrdEqual %v4bool %467 %468 + %470 = OpAll %bool %469 + OpBranch %458 + %458 = OpLabel + %471 = OpPhi %bool %false %437 %470 %457 + OpStore %_0_ok %471 + %474 = OpCompositeConstruct %v3float %130 %132 %float_3 + %475 = OpCompositeConstruct %v3float %float_7 %float_8 %134 + %476 = OpCompositeConstruct %mat3v3float %474 %68 %475 + OpStore %_5_m %476 + OpSelectionMerge %478 None + OpBranchConditional %471 %477 %478 + %477 = OpLabel + %479 = OpAccessChain %_ptr_Function_v3float %_5_m %int_0 + %481 = OpLoad %v3float %479 + %482 = OpFOrdEqual %v3bool %481 %67 + %483 = OpAll %bool %482 + OpBranch %478 + %478 = OpLabel + %484 = OpPhi %bool %false %458 %483 %477 + OpStore %_0_ok %484 + OpSelectionMerge %486 None + OpBranchConditional %484 %485 %486 + %485 = OpLabel + %488 = OpAccessChain %_ptr_Function_v3float %_5_m %int_1 + %489 = OpLoad %v3float %488 + %490 = OpFOrdEqual %v3bool %489 %68 + %491 = OpAll %bool %490 + OpBranch %486 + %486 = OpLabel + %492 = OpPhi %bool %false %478 %491 %485 + OpStore %_0_ok %492 + OpSelectionMerge %494 None + OpBranchConditional %492 %493 %494 + %493 = OpLabel + %495 = OpAccessChain %_ptr_Function_v3float %_5_m %int_2 + %496 = OpLoad %v3float %495 + %497 = OpFOrdEqual %v3bool %496 %69 + %498 = OpAll %bool %497 + OpBranch %494 + %494 = OpLabel + %499 = OpPhi %bool %false %486 %498 %493 + OpStore %_0_ok %499 + OpSelectionMerge %501 None + OpBranchConditional %499 %500 %501 + %500 = OpLabel + %502 = OpAccessChain %_ptr_Function_v3float %_5_m %int_0 + %503 = OpLoad %v3float %502 + %504 = OpCompositeExtract %float %503 0 + %505 = OpFOrdEqual %bool %504 %float_1 + OpBranch %501 + %501 = OpLabel + %506 = OpPhi %bool %false %494 %505 %500 + OpStore %_0_ok %506 + OpSelectionMerge %508 None + OpBranchConditional %506 %507 %508 + %507 = OpLabel + %509 = OpAccessChain %_ptr_Function_v3float %_5_m %int_0 + %510 = OpLoad %v3float %509 + %511 = OpCompositeExtract %float %510 1 + %512 = OpFOrdEqual %bool %511 %float_2 + OpBranch %508 + %508 = OpLabel + %513 = OpPhi %bool %false %501 %512 %507 + OpStore %_0_ok %513 + OpSelectionMerge %515 None + OpBranchConditional %513 %514 %515 + %514 = OpLabel + %516 = OpAccessChain %_ptr_Function_v3float %_5_m %int_0 + %517 = OpLoad %v3float %516 + %518 = OpCompositeExtract %float %517 2 + %519 = OpFOrdEqual %bool %518 %float_3 + OpBranch %515 + %515 = OpLabel + %520 = OpPhi %bool %false %508 %519 %514 + OpStore %_0_ok %520 + OpSelectionMerge %522 None + OpBranchConditional %520 %521 %522 + %521 = OpLabel + %523 = OpAccessChain %_ptr_Function_v3float %_5_m %int_1 + %524 = OpLoad %v3float %523 + %525 = OpCompositeExtract %float %524 0 + %526 = OpFOrdEqual %bool %525 %float_4 + OpBranch %522 + %522 = OpLabel + %527 = OpPhi %bool %false %515 %526 %521 + OpStore %_0_ok %527 + OpSelectionMerge %529 None + OpBranchConditional %527 %528 %529 + %528 = OpLabel + %530 = OpAccessChain %_ptr_Function_v3float %_5_m %int_1 + %531 = OpLoad %v3float %530 + %532 = OpCompositeExtract %float %531 1 + %533 = OpFOrdEqual %bool %532 %float_5 + OpBranch %529 + %529 = OpLabel + %534 = OpPhi %bool %false %522 %533 %528 + OpStore %_0_ok %534 + OpSelectionMerge %536 None + OpBranchConditional %534 %535 %536 + %535 = OpLabel + %537 = OpAccessChain %_ptr_Function_v3float %_5_m %int_1 + %538 = OpLoad %v3float %537 + %539 = OpCompositeExtract %float %538 2 + %540 = OpFOrdEqual %bool %539 %float_6 + OpBranch %536 + %536 = OpLabel + %541 = OpPhi %bool %false %529 %540 %535 + OpStore %_0_ok %541 + OpSelectionMerge %543 None + OpBranchConditional %541 %542 %543 + %542 = OpLabel + %544 = OpAccessChain %_ptr_Function_v3float %_5_m %int_2 + %545 = OpLoad %v3float %544 + %546 = OpCompositeExtract %float %545 0 + %547 = OpFOrdEqual %bool %546 %float_7 + OpBranch %543 + %543 = OpLabel + %548 = OpPhi %bool %false %536 %547 %542 + OpStore %_0_ok %548 + OpSelectionMerge %550 None + OpBranchConditional %548 %549 %550 + %549 = OpLabel + %551 = OpAccessChain %_ptr_Function_v3float %_5_m %int_2 + %552 = OpLoad %v3float %551 + %553 = OpCompositeExtract %float %552 1 + %554 = OpFOrdEqual %bool %553 %float_8 + OpBranch %550 + %550 = OpLabel + %555 = OpPhi %bool %false %543 %554 %549 + OpStore %_0_ok %555 + OpSelectionMerge %557 None + OpBranchConditional %555 %556 %557 + %556 = OpLabel + %558 = OpAccessChain %_ptr_Function_v3float %_5_m %int_2 + %559 = OpLoad %v3float %558 + %560 = OpCompositeExtract %float %559 2 + %561 = OpFOrdEqual %bool %560 %float_9 + OpBranch %557 + %557 = OpLabel + %562 = OpPhi %bool %false %550 %561 %556 + OpStore %_0_ok %562 + OpSelectionMerge %567 None + OpBranchConditional %562 %565 %566 + %565 = OpLabel + %568 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %569 = OpLoad %v4float %568 + OpStore %563 %569 + OpBranch %567 + %566 = OpLabel + %570 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %571 = OpLoad %v4float %570 + OpStore %563 %571 + OpBranch %567 + %567 = OpLabel + %572 = OpLoad %v4float %563 + OpReturnValue %572 + OpFunctionEnd diff --git a/tests/sksl/shared/MatrixEquality.skrp b/tests/sksl/shared/MatrixEquality.skrp index 573775e97cc3..11ba43f10b06 100644 --- a/tests/sksl/shared/MatrixEquality.skrp +++ b/tests/sksl/shared/MatrixEquality.skrp @@ -1,12 +1,39 @@ +421 instructions + +[immutable slots] +i0 = 0x3F800000 (1.0) +i1 = 0x40000000 (2.0) +i2 = 0x40400000 (3.0) +i3 = 0x40800000 (4.0) +i4 = 0x3F800000 (1.0) +i5 = 0x40000000 (2.0) +i6 = 0x40400000 (3.0) +i7 = 0x40800000 (4.0) +i8 = 0x40A00000 (5.0) +i9 = 0x40C00000 (6.0) +i10 = 0x40E00000 (7.0) +i11 = 0x41000000 (8.0) +i12 = 0x41100000 (9.0) +i13 = 0x41100000 (9.0) +i14 = 0x41000000 (8.0) +i15 = 0x40E00000 (7.0) +i16 = 0x40C00000 (6.0) +i17 = 0x40A00000 (5.0) +i18 = 0x40800000 (4.0) +i19 = 0x40400000 (3.0) +i20 = 0x40000000 (2.0) +i21 = 0x3F800000 (1.0) +i22 = 0x3F800000 (1.0) +i23 = 0 +i24 = 0 +i25 = 0x3F800000 (1.0) + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_constant _0_ok = 0xFFFFFFFF copy_slot_unmasked $0 = _0_ok copy_4_uniforms $1..4 = testMatrix2x2 -copy_constant $5 = 0x3F800000 (1.0) -copy_constant $6 = 0x40000000 (2.0) -copy_constant $7 = 0x40400000 (3.0) -copy_constant $8 = 0x40800000 (4.0) +copy_4_immutables_unmasked $5..8 = i0..3 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -15,15 +42,9 @@ copy_slot_unmasked _0_ok = $0 copy_4_uniforms $1..4 = testMatrix3x3(0..3) copy_4_uniforms $5..8 = testMatrix3x3(4..7) copy_uniform $9 = testMatrix3x3(8) -copy_constant $10 = 0x3F800000 (1.0) -copy_constant $11 = 0x40000000 (2.0) -copy_constant $12 = 0x40400000 (3.0) -copy_constant $13 = 0x40800000 (4.0) -copy_constant $14 = 0x40A00000 (5.0) -copy_constant $15 = 0x40C00000 (6.0) -copy_constant $16 = 0x40E00000 (7.0) -copy_constant $17 = 0x41000000 (8.0) -copy_constant $18 = 0x41100000 (9.0) +copy_4_immutables_unmasked $10..13 = i4..7 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked $14..17 = i8..11 [0x40A00000 (5.0), 0x40C00000 (6.0), 0x40E00000 (7.0), 0x41000000 (8.0)] +copy_immutable_unmasked $18 = i12 [0x41100000 (9.0)] cmpeq_n_floats $1..9 = equal($1..9, $10..18) bitwise_and_4_ints $2..5 &= $6..9 bitwise_and_2_ints $2..3 &= $4..5 @@ -43,15 +64,9 @@ copy_slot_unmasked _0_ok = $0 copy_4_uniforms $1..4 = testMatrix3x3(0..3) copy_4_uniforms $5..8 = testMatrix3x3(4..7) copy_uniform $9 = testMatrix3x3(8) -copy_constant $10 = 0x41100000 (9.0) -copy_constant $11 = 0x41000000 (8.0) -copy_constant $12 = 0x40E00000 (7.0) -copy_constant $13 = 0x40C00000 (6.0) -copy_constant $14 = 0x40A00000 (5.0) -copy_constant $15 = 0x40800000 (4.0) -copy_constant $16 = 0x40400000 (3.0) -copy_constant $17 = 0x40000000 (2.0) -copy_constant $18 = 0x3F800000 (1.0) +copy_4_immutables_unmasked $10..13 = i13..16 [0x41100000 (9.0), 0x41000000 (8.0), 0x40E00000 (7.0), 0x40C00000 (6.0)] +copy_4_immutables_unmasked $14..17 = i17..20 [0x40A00000 (5.0), 0x40800000 (4.0), 0x40400000 (3.0), 0x40000000 (2.0)] +copy_immutable_unmasked $18 = i21 [0x3F800000 (1.0)] cmpne_n_floats $1..9 = notEqual($1..9, $10..18) bitwise_or_4_ints $2..5 |= $6..9 bitwise_or_2_ints $2..3 |= $4..5 @@ -70,9 +85,7 @@ copy_slot_unmasked $0 = _0_ok copy_slot_unmasked $1 = _2_one copy_slot_unmasked $2 = _1_zero copy_2_slots_unmasked $3..4 = _1_zero, _2_one -copy_constant $5 = 0x3F800000 (1.0) -splat_2_constants $6..7 = 0 -copy_constant $8 = 0x3F800000 (1.0) +copy_4_immutables_unmasked $5..8 = i22..25 [0x3F800000 (1.0), 0, 0, 0x3F800000 (1.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -81,9 +94,7 @@ copy_slot_unmasked _0_ok = $0 copy_slot_unmasked $1 = _2_one copy_2_slots_unmasked $2..3 = _1_zero, _2_one copy_slot_unmasked $4 = $3 -copy_constant $5 = 0x3F800000 (1.0) -splat_2_constants $6..7 = 0 -copy_constant $8 = 0x3F800000 (1.0) +copy_4_immutables_unmasked $5..8 = i22..25 [0x3F800000 (1.0), 0, 0, 0x3F800000 (1.0)] cmpne_4_floats $1..4 = notEqual($1..4, $5..8) bitwise_or_2_ints $1..2 |= $3..4 bitwise_or_int $1 |= $2 @@ -163,9 +174,7 @@ copy_slot_unmasked _0_ok = $0 copy_constant $1 = 0 copy_slot_unmasked $2 = _2_one swizzle_4 $1..4 = ($1..4).yxxy -copy_constant $5 = 0x3F800000 (1.0) -splat_2_constants $6..7 = 0 -copy_constant $8 = 0x3F800000 (1.0) +copy_4_immutables_unmasked $5..8 = i22..25 [0x3F800000 (1.0), 0, 0, 0x3F800000 (1.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -174,9 +183,7 @@ copy_slot_unmasked _0_ok = $0 copy_constant $1 = 0 copy_slot_unmasked $2 = _3_two swizzle_4 $1..4 = ($1..4).yxxy -copy_constant $5 = 0x3F800000 (1.0) -splat_2_constants $6..7 = 0 -copy_constant $8 = 0x3F800000 (1.0) +copy_4_immutables_unmasked $5..8 = i22..25 [0x3F800000 (1.0), 0, 0, 0x3F800000 (1.0)] cmpne_4_floats $1..4 = notEqual($1..4, $5..8) bitwise_or_2_ints $1..2 |= $3..4 bitwise_or_int $1 |= $2 @@ -339,10 +346,7 @@ copy_4_uniforms $1..4 = testMatrix2x2 copy_slot_unmasked $5 = _2_one swizzle_4 $5..8 = ($5..8).xxxx mul_4_floats $1..4 *= $5..8 -copy_constant $5 = 0x3F800000 (1.0) -copy_constant $6 = 0x40000000 (2.0) -copy_constant $7 = 0x40400000 (3.0) -copy_constant $8 = 0x40800000 (4.0) +copy_4_immutables_unmasked $5..8 = i4..7 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -378,27 +382,21 @@ copy_constant _5_m(7) = 0x41000000 (8.0) copy_slot_unmasked _5_m(8) = _4_nine copy_slot_unmasked $0 = _0_ok copy_3_slots_unmasked $1..3 = _5_m(0..2) -copy_constant $4 = 0x3F800000 (1.0) -copy_constant $5 = 0x40000000 (2.0) -copy_constant $6 = 0x40400000 (3.0) +copy_3_immutables_unmasked $4..6 = i4..6 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_slot_unmasked _0_ok = $0 copy_3_slots_unmasked $1..3 = _5_m(3..5) -copy_constant $4 = 0x40800000 (4.0) -copy_constant $5 = 0x40A00000 (5.0) -copy_constant $6 = 0x40C00000 (6.0) +copy_3_immutables_unmasked $4..6 = i7..9 [0x40800000 (4.0), 0x40A00000 (5.0), 0x40C00000 (6.0)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_slot_unmasked _0_ok = $0 copy_3_slots_unmasked $1..3 = _5_m(6..8) -copy_constant $4 = 0x40E00000 (7.0) -copy_constant $5 = 0x41000000 (8.0) -copy_constant $6 = 0x41100000 (9.0) +copy_3_immutables_unmasked $4..6 = i10..12 [0x40E00000 (7.0), 0x41000000 (8.0), 0x41100000 (9.0)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 diff --git a/tests/sksl/shared/MatrixEquality.wgsl b/tests/sksl/shared/MatrixEquality.wgsl index c19b6eea90ed..4d0da47932af 100644 --- a/tests/sksl/shared/MatrixEquality.wgsl +++ b/tests/sksl/shared/MatrixEquality.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -100,22 +101,22 @@ fn main(_skParam0: vec2) -> vec4 { let _skTemp53 = mat2x2(_2_one, _1_zero, _1_zero, _2_one); let _skTemp54 = mat2x2(1.0, 0.0, 0.0, 1.0); _0_ok = _0_ok && (all(_skTemp53[0] == _skTemp54[0]) && all(_skTemp53[1] == _skTemp54[1])); - _0_ok = _0_ok && all(vec4(vec4(_globalUniforms.testMatrix2x2[0], _globalUniforms.testMatrix2x2[1])) * vec4(_2_one) == vec4(1.0, 2.0, 3.0, 4.0)); - _0_ok = _0_ok && all(vec4(vec4(_globalUniforms.testMatrix2x2[0], _globalUniforms.testMatrix2x2[1])) * vec4(_2_one) == vec4(vec4(_globalUniforms.testMatrix2x2[0], _globalUniforms.testMatrix2x2[1]))); - _0_ok = _0_ok && all(vec4(vec4(_globalUniforms.testMatrix2x2[0], _globalUniforms.testMatrix2x2[1])) * vec4(_1_zero) == vec4(0.0)); + _0_ok = _0_ok && all((vec4(vec4(_globalUniforms.testMatrix2x2[0], _globalUniforms.testMatrix2x2[1])) * vec4(_2_one)) == vec4(1.0, 2.0, 3.0, 4.0)); + _0_ok = _0_ok && all((vec4(vec4(_globalUniforms.testMatrix2x2[0], _globalUniforms.testMatrix2x2[1])) * vec4(_2_one)) == vec4(vec4(_globalUniforms.testMatrix2x2[0], _globalUniforms.testMatrix2x2[1]))); + _0_ok = _0_ok && all((vec4(vec4(_globalUniforms.testMatrix2x2[0], _globalUniforms.testMatrix2x2[1])) * vec4(_1_zero)) == vec4(0.0)); var _5_m: mat3x3 = mat3x3(_2_one, _3_two, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, _4_nine); _0_ok = _0_ok && all(_5_m[0] == vec3(1.0, 2.0, 3.0)); _0_ok = _0_ok && all(_5_m[1] == vec3(4.0, 5.0, 6.0)); _0_ok = _0_ok && all(_5_m[2] == vec3(7.0, 8.0, 9.0)); - _0_ok = _0_ok && _5_m[0].x == 1.0; - _0_ok = _0_ok && _5_m[0].y == 2.0; - _0_ok = _0_ok && _5_m[0].z == 3.0; - _0_ok = _0_ok && _5_m[1].x == 4.0; - _0_ok = _0_ok && _5_m[1].y == 5.0; - _0_ok = _0_ok && _5_m[1].z == 6.0; - _0_ok = _0_ok && _5_m[2].x == 7.0; - _0_ok = _0_ok && _5_m[2].y == 8.0; - _0_ok = _0_ok && _5_m[2].z == 9.0; + _0_ok = _0_ok && (_5_m[0].x == 1.0); + _0_ok = _0_ok && (_5_m[0].y == 2.0); + _0_ok = _0_ok && (_5_m[0].z == 3.0); + _0_ok = _0_ok && (_5_m[1].x == 4.0); + _0_ok = _0_ok && (_5_m[1].y == 5.0); + _0_ok = _0_ok && (_5_m[1].z == 6.0); + _0_ok = _0_ok && (_5_m[2].x == 7.0); + _0_ok = _0_ok && (_5_m[2].y == 8.0); + _0_ok = _0_ok && (_5_m[2].z == 9.0); return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(_0_ok)); } } diff --git a/tests/sksl/shared/MatrixIndexLookup.asm.frag b/tests/sksl/shared/MatrixIndexLookup.asm.frag index 7a664d269187..e741a5090664 100644 --- a/tests/sksl/shared/MatrixIndexLookup.asm.frag +++ b/tests/sksl/shared/MatrixIndexLookup.asm.frag @@ -1,209 +1,209 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpMemberName %_UniformBuffer 2 "testMatrix3x3" -OpMemberName %_UniformBuffer 3 "testMatrix4x4" -OpName %_entrypoint_v "_entrypoint_v" -OpName %test3x3_b "test3x3_b" -OpName %matrix "matrix" -OpName %expected "expected" -OpName %index "index" -OpName %test4x4_b "test4x4_b" -OpName %matrix_0 "matrix" -OpName %expected_0 "expected" -OpName %index_0 "index" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 ColMajor -OpMemberDecorate %_UniformBuffer 2 MatrixStride 16 -OpMemberDecorate %_UniformBuffer 3 Offset 80 -OpMemberDecorate %_UniformBuffer 3 ColMajor -OpMemberDecorate %_UniformBuffer 3 MatrixStride 16 -OpDecorate %_UniformBuffer Block -OpDecorate %12 Binding 0 -OpDecorate %12 DescriptorSet 0 -OpDecorate %118 RelaxedPrecision -OpDecorate %120 RelaxedPrecision -OpDecorate %121 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpMemberName %_UniformBuffer 2 "testMatrix3x3" + OpMemberName %_UniformBuffer 3 "testMatrix4x4" + OpName %_entrypoint_v "_entrypoint_v" + OpName %test3x3_b "test3x3_b" + OpName %matrix "matrix" + OpName %expected "expected" + OpName %index "index" + OpName %test4x4_b "test4x4_b" + OpName %matrix_0 "matrix" + OpName %expected_0 "expected" + OpName %index_0 "index" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 ColMajor + OpMemberDecorate %_UniformBuffer 2 MatrixStride 16 + OpMemberDecorate %_UniformBuffer 3 Offset 80 + OpMemberDecorate %_UniformBuffer 3 ColMajor + OpMemberDecorate %_UniformBuffer 3 MatrixStride 16 + OpDecorate %_UniformBuffer Block + OpDecorate %12 Binding 0 + OpDecorate %12 DescriptorSet 0 + OpDecorate %118 RelaxedPrecision + OpDecorate %120 RelaxedPrecision + OpDecorate %121 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%v3float = OpTypeVector %float 3 + %v3float = OpTypeVector %float 3 %mat3v3float = OpTypeMatrix %v3float 3 %mat4v4float = OpTypeMatrix %v4float 4 %_UniformBuffer = OpTypeStruct %v4float %v4float %mat3v3float %mat4v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%12 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%20 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%24 = OpConstantComposite %v2float %float_0 %float_0 + %12 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %20 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %24 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%28 = OpTypeFunction %bool + %28 = OpTypeFunction %bool %_ptr_Function_mat3v3float = OpTypePointer Function %mat3v3float %_ptr_Uniform_mat3v3float = OpTypePointer Uniform %mat3v3float -%int = OpTypeInt 32 1 -%int_2 = OpConstant %int 2 + %int = OpTypeInt 32 1 + %int_2 = OpConstant %int 2 %_ptr_Function_v3float = OpTypePointer Function %v3float -%float_1 = OpConstant %float 1 -%float_2 = OpConstant %float 2 -%float_3 = OpConstant %float 3 -%42 = OpConstantComposite %v3float %float_1 %float_2 %float_3 + %float_1 = OpConstant %float 1 + %float_2 = OpConstant %float 2 + %float_3 = OpConstant %float 3 + %42 = OpConstantComposite %v3float %float_1 %float_2 %float_3 %_ptr_Function_int = OpTypePointer Function %int -%int_0 = OpConstant %int 0 -%int_3 = OpConstant %int 3 -%v3bool = OpTypeVector %bool 3 -%false = OpConstantFalse %bool -%65 = OpConstantComposite %v3float %float_3 %float_3 %float_3 -%int_1 = OpConstant %int 1 -%true = OpConstantTrue %bool + %int_0 = OpConstant %int 0 + %int_3 = OpConstant %int 3 + %v3bool = OpTypeVector %bool 3 + %false = OpConstantFalse %bool + %65 = OpConstantComposite %v3float %float_3 %float_3 %float_3 + %int_1 = OpConstant %int 1 + %true = OpConstantTrue %bool %_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float %_ptr_Uniform_mat4v4float = OpTypePointer Uniform %mat4v4float %_ptr_Function_v4float = OpTypePointer Function %v4float -%float_4 = OpConstant %float 4 -%80 = OpConstantComposite %v4float %float_1 %float_2 %float_3 %float_4 -%int_4 = OpConstant %int 4 -%v4bool = OpTypeVector %bool 4 -%100 = OpConstantComposite %v4float %float_4 %float_4 %float_4 %float_4 -%104 = OpTypeFunction %v4float %_ptr_Function_v2float + %float_4 = OpConstant %float 4 + %80 = OpConstantComposite %v4float %float_1 %float_2 %float_3 %float_4 + %int_4 = OpConstant %int 4 + %v4bool = OpTypeVector %bool 4 + %100 = OpConstantComposite %v4float %float_4 %float_4 %float_4 %float_4 + %104 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float %_entrypoint_v = OpFunction %void None %20 -%21 = OpLabel -%25 = OpVariable %_ptr_Function_v2float Function -OpStore %25 %24 -%27 = OpFunctionCall %v4float %main %25 -OpStore %sk_FragColor %27 -OpReturn -OpFunctionEnd -%test3x3_b = OpFunction %bool None %28 -%29 = OpLabel -%matrix = OpVariable %_ptr_Function_mat3v3float Function -%expected = OpVariable %_ptr_Function_v3float Function -%index = OpVariable %_ptr_Function_int Function -%32 = OpAccessChain %_ptr_Uniform_mat3v3float %12 %int_2 -%36 = OpLoad %mat3v3float %32 -OpStore %matrix %36 -OpStore %expected %42 -OpStore %index %int_0 -OpBranch %46 -%46 = OpLabel -OpLoopMerge %50 %49 None -OpBranch %47 -%47 = OpLabel -%51 = OpLoad %int %index -%53 = OpSLessThan %bool %51 %int_3 -OpBranchConditional %53 %48 %50 -%48 = OpLabel -%54 = OpLoad %int %index -%55 = OpAccessChain %_ptr_Function_v3float %matrix %54 -%56 = OpLoad %v3float %55 -%57 = OpLoad %v3float %expected -%58 = OpFUnordNotEqual %v3bool %56 %57 -%60 = OpAny %bool %58 -OpSelectionMerge %62 None -OpBranchConditional %60 %61 %62 -%61 = OpLabel -OpReturnValue %false -%62 = OpLabel -%64 = OpLoad %v3float %expected -%66 = OpFAdd %v3float %64 %65 -OpStore %expected %66 -OpBranch %49 -%49 = OpLabel -%68 = OpLoad %int %index -%69 = OpIAdd %int %68 %int_1 -OpStore %index %69 -OpBranch %46 -%50 = OpLabel -OpReturnValue %true -OpFunctionEnd -%test4x4_b = OpFunction %bool None %28 -%71 = OpLabel -%matrix_0 = OpVariable %_ptr_Function_mat4v4float Function -%expected_0 = OpVariable %_ptr_Function_v4float Function -%index_0 = OpVariable %_ptr_Function_int Function -%74 = OpAccessChain %_ptr_Uniform_mat4v4float %12 %int_3 -%76 = OpLoad %mat4v4float %74 -OpStore %matrix_0 %76 -OpStore %expected_0 %80 -OpStore %index_0 %int_0 -OpBranch %82 -%82 = OpLabel -OpLoopMerge %86 %85 None -OpBranch %83 -%83 = OpLabel -%87 = OpLoad %int %index_0 -%89 = OpSLessThan %bool %87 %int_4 -OpBranchConditional %89 %84 %86 -%84 = OpLabel -%90 = OpLoad %int %index_0 -%91 = OpAccessChain %_ptr_Function_v4float %matrix_0 %90 -%92 = OpLoad %v4float %91 -%93 = OpLoad %v4float %expected_0 -%94 = OpFUnordNotEqual %v4bool %92 %93 -%96 = OpAny %bool %94 -OpSelectionMerge %98 None -OpBranchConditional %96 %97 %98 -%97 = OpLabel -OpReturnValue %false -%98 = OpLabel -%99 = OpLoad %v4float %expected_0 -%101 = OpFAdd %v4float %99 %100 -OpStore %expected_0 %101 -OpBranch %85 -%85 = OpLabel -%102 = OpLoad %int %index_0 -%103 = OpIAdd %int %102 %int_1 -OpStore %index_0 %103 -OpBranch %82 -%86 = OpLabel -OpReturnValue %true -OpFunctionEnd -%main = OpFunction %v4float None %104 -%105 = OpFunctionParameter %_ptr_Function_v2float -%106 = OpLabel -%112 = OpVariable %_ptr_Function_v4float Function -%107 = OpFunctionCall %bool %test3x3_b -OpSelectionMerge %109 None -OpBranchConditional %107 %108 %109 -%108 = OpLabel -%110 = OpFunctionCall %bool %test4x4_b -OpBranch %109 -%109 = OpLabel -%111 = OpPhi %bool %false %106 %110 %108 -OpSelectionMerge %115 None -OpBranchConditional %111 %113 %114 -%113 = OpLabel -%116 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 -%118 = OpLoad %v4float %116 -OpStore %112 %118 -OpBranch %115 -%114 = OpLabel -%119 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1 -%120 = OpLoad %v4float %119 -OpStore %112 %120 -OpBranch %115 -%115 = OpLabel -%121 = OpLoad %v4float %112 -OpReturnValue %121 -OpFunctionEnd + %21 = OpLabel + %25 = OpVariable %_ptr_Function_v2float Function + OpStore %25 %24 + %27 = OpFunctionCall %v4float %main %25 + OpStore %sk_FragColor %27 + OpReturn + OpFunctionEnd + %test3x3_b = OpFunction %bool None %28 + %29 = OpLabel + %matrix = OpVariable %_ptr_Function_mat3v3float Function + %expected = OpVariable %_ptr_Function_v3float Function + %index = OpVariable %_ptr_Function_int Function + %32 = OpAccessChain %_ptr_Uniform_mat3v3float %12 %int_2 + %36 = OpLoad %mat3v3float %32 + OpStore %matrix %36 + OpStore %expected %42 + OpStore %index %int_0 + OpBranch %46 + %46 = OpLabel + OpLoopMerge %50 %49 None + OpBranch %47 + %47 = OpLabel + %51 = OpLoad %int %index + %53 = OpSLessThan %bool %51 %int_3 + OpBranchConditional %53 %48 %50 + %48 = OpLabel + %54 = OpLoad %int %index + %55 = OpAccessChain %_ptr_Function_v3float %matrix %54 + %56 = OpLoad %v3float %55 + %57 = OpLoad %v3float %expected + %58 = OpFUnordNotEqual %v3bool %56 %57 + %60 = OpAny %bool %58 + OpSelectionMerge %62 None + OpBranchConditional %60 %61 %62 + %61 = OpLabel + OpReturnValue %false + %62 = OpLabel + %64 = OpLoad %v3float %expected + %66 = OpFAdd %v3float %64 %65 + OpStore %expected %66 + OpBranch %49 + %49 = OpLabel + %68 = OpLoad %int %index + %69 = OpIAdd %int %68 %int_1 + OpStore %index %69 + OpBranch %46 + %50 = OpLabel + OpReturnValue %true + OpFunctionEnd + %test4x4_b = OpFunction %bool None %28 + %71 = OpLabel + %matrix_0 = OpVariable %_ptr_Function_mat4v4float Function + %expected_0 = OpVariable %_ptr_Function_v4float Function + %index_0 = OpVariable %_ptr_Function_int Function + %74 = OpAccessChain %_ptr_Uniform_mat4v4float %12 %int_3 + %76 = OpLoad %mat4v4float %74 + OpStore %matrix_0 %76 + OpStore %expected_0 %80 + OpStore %index_0 %int_0 + OpBranch %82 + %82 = OpLabel + OpLoopMerge %86 %85 None + OpBranch %83 + %83 = OpLabel + %87 = OpLoad %int %index_0 + %89 = OpSLessThan %bool %87 %int_4 + OpBranchConditional %89 %84 %86 + %84 = OpLabel + %90 = OpLoad %int %index_0 + %91 = OpAccessChain %_ptr_Function_v4float %matrix_0 %90 + %92 = OpLoad %v4float %91 + %93 = OpLoad %v4float %expected_0 + %94 = OpFUnordNotEqual %v4bool %92 %93 + %96 = OpAny %bool %94 + OpSelectionMerge %98 None + OpBranchConditional %96 %97 %98 + %97 = OpLabel + OpReturnValue %false + %98 = OpLabel + %99 = OpLoad %v4float %expected_0 + %101 = OpFAdd %v4float %99 %100 + OpStore %expected_0 %101 + OpBranch %85 + %85 = OpLabel + %102 = OpLoad %int %index_0 + %103 = OpIAdd %int %102 %int_1 + OpStore %index_0 %103 + OpBranch %82 + %86 = OpLabel + OpReturnValue %true + OpFunctionEnd + %main = OpFunction %v4float None %104 + %105 = OpFunctionParameter %_ptr_Function_v2float + %106 = OpLabel + %112 = OpVariable %_ptr_Function_v4float Function + %107 = OpFunctionCall %bool %test3x3_b + OpSelectionMerge %109 None + OpBranchConditional %107 %108 %109 + %108 = OpLabel + %110 = OpFunctionCall %bool %test4x4_b + OpBranch %109 + %109 = OpLabel + %111 = OpPhi %bool %false %106 %110 %108 + OpSelectionMerge %115 None + OpBranchConditional %111 %113 %114 + %113 = OpLabel + %116 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 + %118 = OpLoad %v4float %116 + OpStore %112 %118 + OpBranch %115 + %114 = OpLabel + %119 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1 + %120 = OpLoad %v4float %119 + OpStore %112 %120 + OpBranch %115 + %115 = OpLabel + %121 = OpLoad %v4float %112 + OpReturnValue %121 + OpFunctionEnd diff --git a/tests/sksl/shared/MatrixIndexLookup.skrp b/tests/sksl/shared/MatrixIndexLookup.skrp index 96460422d7d3..56bdaf759c12 100644 --- a/tests/sksl/shared/MatrixIndexLookup.skrp +++ b/tests/sksl/shared/MatrixIndexLookup.skrp @@ -1,17 +1,26 @@ +91 instructions + +[immutable slots] +i0 = 0x3F800000 (1.0) +i1 = 0x40000000 (2.0) +i2 = 0x40400000 (3.0) +i3 = 0x3F800000 (1.0) +i4 = 0x40000000 (2.0) +i5 = 0x40400000 (3.0) +i6 = 0x40800000 (4.0) + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true store_condition_mask $12 = CondMask -branch_if_no_lanes_active branch_if_no_lanes_active +44 (label 2 at #48) +branch_if_no_lanes_active branch_if_no_lanes_active +42 (label 2 at #46) store_return_mask $13 = RetMask copy_4_uniforms matrix(0..3) = testMatrix3x3(0..3) copy_4_uniforms matrix(4..7) = testMatrix3x3(4..7) copy_uniform matrix(8) = testMatrix3x3(8) -copy_constant expected(0) = 0x3F800000 (1.0) -copy_constant expected(1) = 0x40000000 (2.0) -copy_constant expected(2) = 0x40400000 (3.0) +copy_3_immutables_unmasked expected = i0..2 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0)] copy_constant index = 0 store_loop_mask $14 = LoopMask -jump jump +22 (label 4 at #36) +jump jump +22 (label 4 at #34) label label 0x00000005 store_condition_mask $15 = CondMask copy_slot_unmasked $22 = index @@ -38,7 +47,7 @@ copy_slot_unmasked $15 = index cmplt_imm_int $15 = lessThan($15, 0x00000003) merge_loop_mask LoopMask &= $15 stack_rewind -branch_if_any_lanes_active branch_if_any_lanes_active -26 (label 5 at #15) +branch_if_any_lanes_active branch_if_any_lanes_active -26 (label 5 at #13) label label 0x00000003 load_loop_mask LoopMask = $14 copy_constant $14 = 0xFFFFFFFF @@ -48,19 +57,16 @@ copy_slot_unmasked $13 = [test3x3].result label label 0x00000002 copy_constant $0 = 0 merge_condition_mask CondMask = $12 & $13 -branch_if_no_lanes_active branch_if_no_lanes_active +48 (label 1 at #99) +branch_if_no_lanes_active branch_if_no_lanes_active +45 (label 1 at #94) store_return_mask $1 = RetMask copy_4_uniforms matrix₁(0..3) = testMatrix4x4(0..3) copy_4_uniforms matrix₁(4..7) = testMatrix4x4(4..7) copy_4_uniforms matrix₁(8..11) = testMatrix4x4(8..11) copy_4_uniforms matrix₁(12..15) = testMatrix4x4(12..15) -copy_constant expected₁(0) = 0x3F800000 (1.0) -copy_constant expected₁(1) = 0x40000000 (2.0) -copy_constant expected₁(2) = 0x40400000 (3.0) -copy_constant expected₁(3) = 0x40800000 (4.0) +copy_4_immutables_unmasked expected₁ = i3..6 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] copy_constant index₁ = 0 store_loop_mask $2 = LoopMask -jump jump +22 (label 8 at #85) +jump jump +22 (label 8 at #80) label label 0x00000009 store_condition_mask $3 = CondMask copy_slot_unmasked $22 = index₁ @@ -87,7 +93,7 @@ copy_slot_unmasked $3 = index₁ cmplt_imm_int $3 = lessThan($3, 0x00000004) merge_loop_mask LoopMask &= $3 stack_rewind -branch_if_any_lanes_active branch_if_any_lanes_active -26 (label 9 at #64) +branch_if_any_lanes_active branch_if_any_lanes_active -26 (label 9 at #59) label label 0x00000007 load_loop_mask LoopMask = $2 copy_constant $2 = 0xFFFFFFFF diff --git a/tests/sksl/shared/MatrixIndexLookup.wgsl b/tests/sksl/shared/MatrixIndexLookup.wgsl index 6de7d21f6fff..50d9a775c296 100644 --- a/tests/sksl/shared/MatrixIndexLookup.wgsl +++ b/tests/sksl/shared/MatrixIndexLookup.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -20,7 +21,7 @@ fn test3x3_b() -> bool { var index: i32 = 0; loop { { - if (any(matrix[index] != expected)) { + if any(matrix[index] != expected) { { return false; } @@ -44,7 +45,7 @@ fn test4x4_b() -> bool { var index: i32 = 0; loop { { - if (any(matrix[index] != expected)) { + if any(matrix[index] != expected) { { return false; } diff --git a/tests/sksl/shared/MatrixIndexStore.asm.frag b/tests/sksl/shared/MatrixIndexStore.asm.frag index d203ea938ab0..9d5a982304d4 100644 --- a/tests/sksl/shared/MatrixIndexStore.asm.frag +++ b/tests/sksl/shared/MatrixIndexStore.asm.frag @@ -1,227 +1,227 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpMemberName %_UniformBuffer 2 "testMatrix3x3" -OpMemberName %_UniformBuffer 3 "testMatrix4x4" -OpName %_entrypoint_v "_entrypoint_v" -OpName %test3x3_b "test3x3_b" -OpName %matrix "matrix" -OpName %values "values" -OpName %index "index" -OpName %test4x4_b "test4x4_b" -OpName %matrix_0 "matrix" -OpName %values_0 "values" -OpName %index_0 "index" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 ColMajor -OpMemberDecorate %_UniformBuffer 2 MatrixStride 16 -OpMemberDecorate %_UniformBuffer 3 Offset 80 -OpMemberDecorate %_UniformBuffer 3 ColMajor -OpMemberDecorate %_UniformBuffer 3 MatrixStride 16 -OpDecorate %_UniformBuffer Block -OpDecorate %12 Binding 0 -OpDecorate %12 DescriptorSet 0 -OpDecorate %142 RelaxedPrecision -OpDecorate %144 RelaxedPrecision -OpDecorate %145 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpMemberName %_UniformBuffer 2 "testMatrix3x3" + OpMemberName %_UniformBuffer 3 "testMatrix4x4" + OpName %_entrypoint_v "_entrypoint_v" + OpName %test3x3_b "test3x3_b" + OpName %matrix "matrix" + OpName %values "values" + OpName %index "index" + OpName %test4x4_b "test4x4_b" + OpName %matrix_0 "matrix" + OpName %values_0 "values" + OpName %index_0 "index" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 ColMajor + OpMemberDecorate %_UniformBuffer 2 MatrixStride 16 + OpMemberDecorate %_UniformBuffer 3 Offset 80 + OpMemberDecorate %_UniformBuffer 3 ColMajor + OpMemberDecorate %_UniformBuffer 3 MatrixStride 16 + OpDecorate %_UniformBuffer Block + OpDecorate %12 Binding 0 + OpDecorate %12 DescriptorSet 0 + OpDecorate %142 RelaxedPrecision + OpDecorate %144 RelaxedPrecision + OpDecorate %145 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%v3float = OpTypeVector %float 3 + %v3float = OpTypeVector %float 3 %mat3v3float = OpTypeMatrix %v3float 3 %mat4v4float = OpTypeMatrix %v4float 4 %_UniformBuffer = OpTypeStruct %v4float %v4float %mat3v3float %mat4v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%12 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%20 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%24 = OpConstantComposite %v2float %float_0 %float_0 + %12 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %20 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %24 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%28 = OpTypeFunction %bool + %28 = OpTypeFunction %bool %_ptr_Function_mat3v3float = OpTypePointer Function %mat3v3float %_ptr_Function_v3float = OpTypePointer Function %v3float -%float_1 = OpConstant %float 1 -%float_2 = OpConstant %float 2 -%float_3 = OpConstant %float 3 -%37 = OpConstantComposite %v3float %float_1 %float_2 %float_3 -%int = OpTypeInt 32 1 + %float_1 = OpConstant %float 1 + %float_2 = OpConstant %float 2 + %float_3 = OpConstant %float 3 + %37 = OpConstantComposite %v3float %float_1 %float_2 %float_3 + %int = OpTypeInt 32 1 %_ptr_Function_int = OpTypePointer Function %int -%int_0 = OpConstant %int 0 -%int_3 = OpConstant %int 3 -%54 = OpConstantComposite %v3float %float_3 %float_3 %float_3 -%int_1 = OpConstant %int 1 + %int_0 = OpConstant %int 0 + %int_3 = OpConstant %int 3 + %54 = OpConstantComposite %v3float %float_3 %float_3 %float_3 + %int_1 = OpConstant %int 1 %_ptr_Uniform_mat3v3float = OpTypePointer Uniform %mat3v3float -%int_2 = OpConstant %int 2 -%v3bool = OpTypeVector %bool 3 + %int_2 = OpConstant %int 2 + %v3bool = OpTypeVector %bool 3 %_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float %_ptr_Function_v4float = OpTypePointer Function %v4float -%float_4 = OpConstant %float 4 -%85 = OpConstantComposite %v4float %float_1 %float_2 %float_3 %float_4 -%int_4 = OpConstant %int 4 -%99 = OpConstantComposite %v4float %float_4 %float_4 %float_4 %float_4 + %float_4 = OpConstant %float 4 + %85 = OpConstantComposite %v4float %float_1 %float_2 %float_3 %float_4 + %int_4 = OpConstant %int 4 + %99 = OpConstantComposite %v4float %float_4 %float_4 %float_4 %float_4 %_ptr_Uniform_mat4v4float = OpTypePointer Uniform %mat4v4float -%v4bool = OpTypeVector %bool 4 -%127 = OpTypeFunction %v4float %_ptr_Function_v2float -%false = OpConstantFalse %bool + %v4bool = OpTypeVector %bool 4 + %127 = OpTypeFunction %v4float %_ptr_Function_v2float + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float %_entrypoint_v = OpFunction %void None %20 -%21 = OpLabel -%25 = OpVariable %_ptr_Function_v2float Function -OpStore %25 %24 -%27 = OpFunctionCall %v4float %main %25 -OpStore %sk_FragColor %27 -OpReturn -OpFunctionEnd -%test3x3_b = OpFunction %bool None %28 -%29 = OpLabel -%matrix = OpVariable %_ptr_Function_mat3v3float Function -%values = OpVariable %_ptr_Function_v3float Function -%index = OpVariable %_ptr_Function_int Function -OpStore %values %37 -OpStore %index %int_0 -OpBranch %42 -%42 = OpLabel -OpLoopMerge %46 %45 None -OpBranch %43 -%43 = OpLabel -%47 = OpLoad %int %index -%49 = OpSLessThan %bool %47 %int_3 -OpBranchConditional %49 %44 %46 -%44 = OpLabel -%50 = OpLoad %v3float %values -%51 = OpLoad %int %index -%52 = OpAccessChain %_ptr_Function_v3float %matrix %51 -OpStore %52 %50 -%53 = OpLoad %v3float %values -%55 = OpFAdd %v3float %53 %54 -OpStore %values %55 -OpBranch %45 -%45 = OpLabel -%57 = OpLoad %int %index -%58 = OpIAdd %int %57 %int_1 -OpStore %index %58 -OpBranch %42 -%46 = OpLabel -%59 = OpLoad %mat3v3float %matrix -%60 = OpAccessChain %_ptr_Uniform_mat3v3float %12 %int_2 -%63 = OpLoad %mat3v3float %60 -%65 = OpCompositeExtract %v3float %59 0 -%66 = OpCompositeExtract %v3float %63 0 -%67 = OpFOrdEqual %v3bool %65 %66 -%68 = OpAll %bool %67 -%69 = OpCompositeExtract %v3float %59 1 -%70 = OpCompositeExtract %v3float %63 1 -%71 = OpFOrdEqual %v3bool %69 %70 -%72 = OpAll %bool %71 -%73 = OpLogicalAnd %bool %68 %72 -%74 = OpCompositeExtract %v3float %59 2 -%75 = OpCompositeExtract %v3float %63 2 -%76 = OpFOrdEqual %v3bool %74 %75 -%77 = OpAll %bool %76 -%78 = OpLogicalAnd %bool %73 %77 -OpReturnValue %78 -OpFunctionEnd -%test4x4_b = OpFunction %bool None %28 -%79 = OpLabel -%matrix_0 = OpVariable %_ptr_Function_mat4v4float Function -%values_0 = OpVariable %_ptr_Function_v4float Function -%index_0 = OpVariable %_ptr_Function_int Function -OpStore %values_0 %85 -OpStore %index_0 %int_0 -OpBranch %87 -%87 = OpLabel -OpLoopMerge %91 %90 None -OpBranch %88 -%88 = OpLabel -%92 = OpLoad %int %index_0 -%94 = OpSLessThan %bool %92 %int_4 -OpBranchConditional %94 %89 %91 -%89 = OpLabel -%95 = OpLoad %v4float %values_0 -%96 = OpLoad %int %index_0 -%97 = OpAccessChain %_ptr_Function_v4float %matrix_0 %96 -OpStore %97 %95 -%98 = OpLoad %v4float %values_0 -%100 = OpFAdd %v4float %98 %99 -OpStore %values_0 %100 -OpBranch %90 -%90 = OpLabel -%101 = OpLoad %int %index_0 -%102 = OpIAdd %int %101 %int_1 -OpStore %index_0 %102 -OpBranch %87 -%91 = OpLabel -%103 = OpLoad %mat4v4float %matrix_0 -%104 = OpAccessChain %_ptr_Uniform_mat4v4float %12 %int_3 -%106 = OpLoad %mat4v4float %104 -%108 = OpCompositeExtract %v4float %103 0 -%109 = OpCompositeExtract %v4float %106 0 -%110 = OpFOrdEqual %v4bool %108 %109 -%111 = OpAll %bool %110 -%112 = OpCompositeExtract %v4float %103 1 -%113 = OpCompositeExtract %v4float %106 1 -%114 = OpFOrdEqual %v4bool %112 %113 -%115 = OpAll %bool %114 -%116 = OpLogicalAnd %bool %111 %115 -%117 = OpCompositeExtract %v4float %103 2 -%118 = OpCompositeExtract %v4float %106 2 -%119 = OpFOrdEqual %v4bool %117 %118 -%120 = OpAll %bool %119 -%121 = OpLogicalAnd %bool %116 %120 -%122 = OpCompositeExtract %v4float %103 3 -%123 = OpCompositeExtract %v4float %106 3 -%124 = OpFOrdEqual %v4bool %122 %123 -%125 = OpAll %bool %124 -%126 = OpLogicalAnd %bool %121 %125 -OpReturnValue %126 -OpFunctionEnd -%main = OpFunction %v4float None %127 -%128 = OpFunctionParameter %_ptr_Function_v2float -%129 = OpLabel -%136 = OpVariable %_ptr_Function_v4float Function -%131 = OpFunctionCall %bool %test3x3_b -OpSelectionMerge %133 None -OpBranchConditional %131 %132 %133 -%132 = OpLabel -%134 = OpFunctionCall %bool %test4x4_b -OpBranch %133 -%133 = OpLabel -%135 = OpPhi %bool %false %129 %134 %132 -OpSelectionMerge %139 None -OpBranchConditional %135 %137 %138 -%137 = OpLabel -%140 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 -%142 = OpLoad %v4float %140 -OpStore %136 %142 -OpBranch %139 -%138 = OpLabel -%143 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1 -%144 = OpLoad %v4float %143 -OpStore %136 %144 -OpBranch %139 -%139 = OpLabel -%145 = OpLoad %v4float %136 -OpReturnValue %145 -OpFunctionEnd + %21 = OpLabel + %25 = OpVariable %_ptr_Function_v2float Function + OpStore %25 %24 + %27 = OpFunctionCall %v4float %main %25 + OpStore %sk_FragColor %27 + OpReturn + OpFunctionEnd + %test3x3_b = OpFunction %bool None %28 + %29 = OpLabel + %matrix = OpVariable %_ptr_Function_mat3v3float Function + %values = OpVariable %_ptr_Function_v3float Function + %index = OpVariable %_ptr_Function_int Function + OpStore %values %37 + OpStore %index %int_0 + OpBranch %42 + %42 = OpLabel + OpLoopMerge %46 %45 None + OpBranch %43 + %43 = OpLabel + %47 = OpLoad %int %index + %49 = OpSLessThan %bool %47 %int_3 + OpBranchConditional %49 %44 %46 + %44 = OpLabel + %50 = OpLoad %v3float %values + %51 = OpLoad %int %index + %52 = OpAccessChain %_ptr_Function_v3float %matrix %51 + OpStore %52 %50 + %53 = OpLoad %v3float %values + %55 = OpFAdd %v3float %53 %54 + OpStore %values %55 + OpBranch %45 + %45 = OpLabel + %57 = OpLoad %int %index + %58 = OpIAdd %int %57 %int_1 + OpStore %index %58 + OpBranch %42 + %46 = OpLabel + %59 = OpLoad %mat3v3float %matrix + %60 = OpAccessChain %_ptr_Uniform_mat3v3float %12 %int_2 + %63 = OpLoad %mat3v3float %60 + %65 = OpCompositeExtract %v3float %59 0 + %66 = OpCompositeExtract %v3float %63 0 + %67 = OpFOrdEqual %v3bool %65 %66 + %68 = OpAll %bool %67 + %69 = OpCompositeExtract %v3float %59 1 + %70 = OpCompositeExtract %v3float %63 1 + %71 = OpFOrdEqual %v3bool %69 %70 + %72 = OpAll %bool %71 + %73 = OpLogicalAnd %bool %68 %72 + %74 = OpCompositeExtract %v3float %59 2 + %75 = OpCompositeExtract %v3float %63 2 + %76 = OpFOrdEqual %v3bool %74 %75 + %77 = OpAll %bool %76 + %78 = OpLogicalAnd %bool %73 %77 + OpReturnValue %78 + OpFunctionEnd + %test4x4_b = OpFunction %bool None %28 + %79 = OpLabel + %matrix_0 = OpVariable %_ptr_Function_mat4v4float Function + %values_0 = OpVariable %_ptr_Function_v4float Function + %index_0 = OpVariable %_ptr_Function_int Function + OpStore %values_0 %85 + OpStore %index_0 %int_0 + OpBranch %87 + %87 = OpLabel + OpLoopMerge %91 %90 None + OpBranch %88 + %88 = OpLabel + %92 = OpLoad %int %index_0 + %94 = OpSLessThan %bool %92 %int_4 + OpBranchConditional %94 %89 %91 + %89 = OpLabel + %95 = OpLoad %v4float %values_0 + %96 = OpLoad %int %index_0 + %97 = OpAccessChain %_ptr_Function_v4float %matrix_0 %96 + OpStore %97 %95 + %98 = OpLoad %v4float %values_0 + %100 = OpFAdd %v4float %98 %99 + OpStore %values_0 %100 + OpBranch %90 + %90 = OpLabel + %101 = OpLoad %int %index_0 + %102 = OpIAdd %int %101 %int_1 + OpStore %index_0 %102 + OpBranch %87 + %91 = OpLabel + %103 = OpLoad %mat4v4float %matrix_0 + %104 = OpAccessChain %_ptr_Uniform_mat4v4float %12 %int_3 + %106 = OpLoad %mat4v4float %104 + %108 = OpCompositeExtract %v4float %103 0 + %109 = OpCompositeExtract %v4float %106 0 + %110 = OpFOrdEqual %v4bool %108 %109 + %111 = OpAll %bool %110 + %112 = OpCompositeExtract %v4float %103 1 + %113 = OpCompositeExtract %v4float %106 1 + %114 = OpFOrdEqual %v4bool %112 %113 + %115 = OpAll %bool %114 + %116 = OpLogicalAnd %bool %111 %115 + %117 = OpCompositeExtract %v4float %103 2 + %118 = OpCompositeExtract %v4float %106 2 + %119 = OpFOrdEqual %v4bool %117 %118 + %120 = OpAll %bool %119 + %121 = OpLogicalAnd %bool %116 %120 + %122 = OpCompositeExtract %v4float %103 3 + %123 = OpCompositeExtract %v4float %106 3 + %124 = OpFOrdEqual %v4bool %122 %123 + %125 = OpAll %bool %124 + %126 = OpLogicalAnd %bool %121 %125 + OpReturnValue %126 + OpFunctionEnd + %main = OpFunction %v4float None %127 + %128 = OpFunctionParameter %_ptr_Function_v2float + %129 = OpLabel + %136 = OpVariable %_ptr_Function_v4float Function + %131 = OpFunctionCall %bool %test3x3_b + OpSelectionMerge %133 None + OpBranchConditional %131 %132 %133 + %132 = OpLabel + %134 = OpFunctionCall %bool %test4x4_b + OpBranch %133 + %133 = OpLabel + %135 = OpPhi %bool %false %129 %134 %132 + OpSelectionMerge %139 None + OpBranchConditional %135 %137 %138 + %137 = OpLabel + %140 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 + %142 = OpLoad %v4float %140 + OpStore %136 %142 + OpBranch %139 + %138 = OpLabel + %143 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1 + %144 = OpLoad %v4float %143 + OpStore %136 %144 + OpBranch %139 + %139 = OpLabel + %145 = OpLoad %v4float %136 + OpReturnValue %145 + OpFunctionEnd diff --git a/tests/sksl/shared/MatrixIndexStore.skrp b/tests/sksl/shared/MatrixIndexStore.skrp index 9f4fbcb73530..a8977878621d 100644 --- a/tests/sksl/shared/MatrixIndexStore.skrp +++ b/tests/sksl/shared/MatrixIndexStore.skrp @@ -1,3 +1,14 @@ +176 instructions + +[immutable slots] +i0 = 0x3F800000 (1.0) +i1 = 0x40000000 (2.0) +i2 = 0x40400000 (3.0) +i3 = 0x3F800000 (1.0) +i4 = 0x40000000 (2.0) +i5 = 0x40400000 (3.0) +i6 = 0x40800000 (4.0) + store_device_xy01 $35..38 = DeviceCoords.xy01 splat_2_constants $37..38 = 0x3F000000 (0.5) cmpeq_2_floats $35..36 = equal($35..36, $37..38) @@ -25,7 +36,7 @@ copy_slot_masked $0 = Mask($1) trace_scope TraceScope(+1) when $0 is true trace_line TraceLine(28) when $35 is true store_condition_mask $39 = CondMask -branch_if_no_lanes_active branch_if_no_lanes_active +70 (label 2 at #98) +branch_if_no_lanes_active branch_if_no_lanes_active +68 (label 2 at #96) trace_enter TraceEnter(bool test3x3()) when $35 is true copy_constant $40 = 0 copy_slot_unmasked $41 = $35 @@ -37,15 +48,13 @@ splat_4_constants matrix(4..7) = 0 copy_constant matrix(8) = 0 trace_var TraceVar(matrix) when $35 is true trace_line TraceLine(9) when $35 is true -copy_constant values(0) = 0x3F800000 (1.0) -copy_constant values(1) = 0x40000000 (2.0) -copy_constant values(2) = 0x40400000 (3.0) +copy_3_immutables_unmasked values = i0..2 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0)] trace_var TraceVar(values) when $35 is true copy_constant $41 = 0 copy_slot_unmasked $42 = $35 copy_slot_masked $41 = Mask($42) trace_scope TraceScope(+1) when $41 is true -branch_if_no_lanes_active branch_if_no_lanes_active +31 (label 3 at #79) +branch_if_no_lanes_active branch_if_no_lanes_active +31 (label 3 at #77) trace_line TraceLine(10) when $35 is true copy_constant index = 0 trace_var TraceVar(index) when $35 is true @@ -75,7 +84,7 @@ trace_var TraceVar(index) when $35 is true copy_slot_unmasked $42 = index cmplt_imm_int $42 = lessThan($42, 0x00000003) stack_rewind -branch_if_no_active_lanes_eq branch -26 (label 4 at #52) if no lanes of $42 == 0 +branch_if_no_active_lanes_eq branch -26 (label 4 at #50) if no lanes of $42 == 0 label label 0x00000003 trace_scope TraceScope(-1) when $41 is true trace_line TraceLine(14) when $35 is true @@ -98,7 +107,7 @@ copy_slot_unmasked $40 = [test3x3].result label label 0x00000002 copy_constant $1 = 0 merge_condition_mask CondMask = $39 & $40 -branch_if_no_lanes_active branch_if_no_lanes_active +77 (label 1 at #178) +branch_if_no_lanes_active branch_if_no_lanes_active +74 (label 1 at #173) trace_enter TraceEnter(bool test4x4()) when $35 is true copy_constant $2 = 0 copy_slot_unmasked $3 = $35 @@ -111,16 +120,13 @@ splat_4_constants matrix₁(8..11) = 0 splat_4_constants matrix₁(12..15) = 0 trace_var TraceVar(matrix₁) when $35 is true trace_line TraceLine(19) when $35 is true -copy_constant values₁(0) = 0x3F800000 (1.0) -copy_constant values₁(1) = 0x40000000 (2.0) -copy_constant values₁(2) = 0x40400000 (3.0) -copy_constant values₁(3) = 0x40800000 (4.0) +copy_4_immutables_unmasked values₁ = i3..6 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] trace_var TraceVar(values₁) when $35 is true copy_constant $3 = 0 copy_slot_unmasked $4 = $35 copy_slot_masked $3 = Mask($4) trace_scope TraceScope(+1) when $3 is true -branch_if_no_lanes_active branch_if_no_lanes_active +31 (label 6 at #154) +branch_if_no_lanes_active branch_if_no_lanes_active +31 (label 6 at #149) trace_line TraceLine(20) when $35 is true copy_constant index₁ = 0 trace_var TraceVar(index₁) when $35 is true @@ -150,7 +156,7 @@ trace_var TraceVar(index₁) when $35 is true copy_slot_unmasked $4 = index₁ cmplt_imm_int $4 = lessThan($4, 0x00000004) stack_rewind -branch_if_no_active_lanes_eq branch -26 (label 7 at #127) if no lanes of $4 == 0 +branch_if_no_active_lanes_eq branch -26 (label 7 at #122) if no lanes of $4 == 0 label label 0x00000006 trace_scope TraceScope(-1) when $3 is true trace_line TraceLine(24) when $35 is true diff --git a/tests/sksl/shared/MatrixIndexStore.wgsl b/tests/sksl/shared/MatrixIndexStore.wgsl index 724dadbadc3a..9e7c4a1b8be5 100644 --- a/tests/sksl/shared/MatrixIndexStore.wgsl +++ b/tests/sksl/shared/MatrixIndexStore.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, diff --git a/tests/sksl/shared/MatrixOpEqualsES2.asm.frag b/tests/sksl/shared/MatrixOpEqualsES2.asm.frag index ff34994024c9..a89fcba940fa 100644 --- a/tests/sksl/shared/MatrixOpEqualsES2.asm.frag +++ b/tests/sksl/shared/MatrixOpEqualsES2.asm.frag @@ -1,779 +1,779 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorRed" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpName %_entrypoint_v "_entrypoint_v" -OpName %test_matrix_op_matrix_half_b "test_matrix_op_matrix_half_b" -OpName %ok "ok" -OpName %splat_4 "splat_4" -OpName %splat_2 "splat_2" -OpName %m "m" -OpName %m_0 "m" -OpName %m_1 "m" -OpName %m_2 "m" -OpName %m_3 "m" -OpName %m_4 "m" -OpName %main "main" -OpName %_0_ok "_0_ok" -OpName %_1_splat_4 "_1_splat_4" -OpName %_2_splat_2 "_2_splat_2" -OpName %_3_m "_3_m" -OpName %_4_m "_4_m" -OpName %_5_m "_5_m" -OpName %_6_m "_6_m" -OpName %_7_m "_7_m" -OpName %_8_m "_8_m" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %11 Binding 0 -OpDecorate %11 DescriptorSet 0 -OpDecorate %splat_4 RelaxedPrecision -OpDecorate %splat_2 RelaxedPrecision -OpDecorate %m RelaxedPrecision -OpDecorate %45 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %48 RelaxedPrecision -OpDecorate %58 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %63 RelaxedPrecision -OpDecorate %67 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %69 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -OpDecorate %79 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %84 RelaxedPrecision -OpDecorate %88 RelaxedPrecision -OpDecorate %89 RelaxedPrecision -OpDecorate %90 RelaxedPrecision -OpDecorate %91 RelaxedPrecision -OpDecorate %99 RelaxedPrecision -OpDecorate %101 RelaxedPrecision -OpDecorate %104 RelaxedPrecision -OpDecorate %108 RelaxedPrecision -OpDecorate %109 RelaxedPrecision -OpDecorate %110 RelaxedPrecision -OpDecorate %111 RelaxedPrecision -OpDecorate %114 RelaxedPrecision -OpDecorate %116 RelaxedPrecision -OpDecorate %119 RelaxedPrecision -OpDecorate %123 RelaxedPrecision -OpDecorate %124 RelaxedPrecision -OpDecorate %125 RelaxedPrecision -OpDecorate %126 RelaxedPrecision -OpDecorate %133 RelaxedPrecision -OpDecorate %135 RelaxedPrecision -OpDecorate %138 RelaxedPrecision -OpDecorate %142 RelaxedPrecision -OpDecorate %143 RelaxedPrecision -OpDecorate %144 RelaxedPrecision -OpDecorate %145 RelaxedPrecision -OpDecorate %148 RelaxedPrecision -OpDecorate %150 RelaxedPrecision -OpDecorate %153 RelaxedPrecision -OpDecorate %m_0 RelaxedPrecision -OpDecorate %183 RelaxedPrecision -OpDecorate %184 RelaxedPrecision -OpDecorate %185 RelaxedPrecision -OpDecorate %186 RelaxedPrecision -OpDecorate %187 RelaxedPrecision -OpDecorate %194 RelaxedPrecision -OpDecorate %196 RelaxedPrecision -OpDecorate %199 RelaxedPrecision -OpDecorate %202 RelaxedPrecision -OpDecorate %m_1 RelaxedPrecision -OpDecorate %218 RelaxedPrecision -OpDecorate %219 RelaxedPrecision -OpDecorate %220 RelaxedPrecision -OpDecorate %230 RelaxedPrecision -OpDecorate %232 RelaxedPrecision -OpDecorate %m_2 RelaxedPrecision -OpDecorate %242 RelaxedPrecision -OpDecorate %243 RelaxedPrecision -OpDecorate %244 RelaxedPrecision -OpDecorate %249 RelaxedPrecision -OpDecorate %251 RelaxedPrecision -OpDecorate %m_3 RelaxedPrecision -OpDecorate %260 RelaxedPrecision -OpDecorate %268 RelaxedPrecision -OpDecorate %269 RelaxedPrecision -OpDecorate %271 RelaxedPrecision -OpDecorate %272 RelaxedPrecision -OpDecorate %m_4 RelaxedPrecision -OpDecorate %285 RelaxedPrecision -OpDecorate %301 RelaxedPrecision -OpDecorate %302 RelaxedPrecision -OpDecorate %304 RelaxedPrecision -OpDecorate %305 RelaxedPrecision -OpDecorate %308 RelaxedPrecision -OpDecorate %309 RelaxedPrecision -OpDecorate %495 RelaxedPrecision -OpDecorate %498 RelaxedPrecision -OpDecorate %499 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorRed" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpName %_entrypoint_v "_entrypoint_v" + OpName %test_matrix_op_matrix_half_b "test_matrix_op_matrix_half_b" + OpName %ok "ok" + OpName %splat_4 "splat_4" + OpName %splat_2 "splat_2" + OpName %m "m" + OpName %m_0 "m" + OpName %m_1 "m" + OpName %m_2 "m" + OpName %m_3 "m" + OpName %m_4 "m" + OpName %main "main" + OpName %_0_ok "_0_ok" + OpName %_1_splat_4 "_1_splat_4" + OpName %_2_splat_2 "_2_splat_2" + OpName %_3_m "_3_m" + OpName %_4_m "_4_m" + OpName %_5_m "_5_m" + OpName %_6_m "_6_m" + OpName %_7_m "_7_m" + OpName %_8_m "_8_m" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %11 Binding 0 + OpDecorate %11 DescriptorSet 0 + OpDecorate %splat_4 RelaxedPrecision + OpDecorate %splat_2 RelaxedPrecision + OpDecorate %m RelaxedPrecision + OpDecorate %45 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %48 RelaxedPrecision + OpDecorate %58 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %63 RelaxedPrecision + OpDecorate %67 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %69 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %79 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %84 RelaxedPrecision + OpDecorate %88 RelaxedPrecision + OpDecorate %89 RelaxedPrecision + OpDecorate %90 RelaxedPrecision + OpDecorate %91 RelaxedPrecision + OpDecorate %99 RelaxedPrecision + OpDecorate %101 RelaxedPrecision + OpDecorate %104 RelaxedPrecision + OpDecorate %108 RelaxedPrecision + OpDecorate %109 RelaxedPrecision + OpDecorate %110 RelaxedPrecision + OpDecorate %111 RelaxedPrecision + OpDecorate %114 RelaxedPrecision + OpDecorate %116 RelaxedPrecision + OpDecorate %119 RelaxedPrecision + OpDecorate %123 RelaxedPrecision + OpDecorate %124 RelaxedPrecision + OpDecorate %125 RelaxedPrecision + OpDecorate %126 RelaxedPrecision + OpDecorate %133 RelaxedPrecision + OpDecorate %135 RelaxedPrecision + OpDecorate %138 RelaxedPrecision + OpDecorate %142 RelaxedPrecision + OpDecorate %143 RelaxedPrecision + OpDecorate %144 RelaxedPrecision + OpDecorate %145 RelaxedPrecision + OpDecorate %148 RelaxedPrecision + OpDecorate %150 RelaxedPrecision + OpDecorate %153 RelaxedPrecision + OpDecorate %m_0 RelaxedPrecision + OpDecorate %183 RelaxedPrecision + OpDecorate %184 RelaxedPrecision + OpDecorate %185 RelaxedPrecision + OpDecorate %186 RelaxedPrecision + OpDecorate %187 RelaxedPrecision + OpDecorate %194 RelaxedPrecision + OpDecorate %196 RelaxedPrecision + OpDecorate %199 RelaxedPrecision + OpDecorate %202 RelaxedPrecision + OpDecorate %m_1 RelaxedPrecision + OpDecorate %218 RelaxedPrecision + OpDecorate %219 RelaxedPrecision + OpDecorate %220 RelaxedPrecision + OpDecorate %230 RelaxedPrecision + OpDecorate %232 RelaxedPrecision + OpDecorate %m_2 RelaxedPrecision + OpDecorate %242 RelaxedPrecision + OpDecorate %243 RelaxedPrecision + OpDecorate %244 RelaxedPrecision + OpDecorate %249 RelaxedPrecision + OpDecorate %251 RelaxedPrecision + OpDecorate %m_3 RelaxedPrecision + OpDecorate %260 RelaxedPrecision + OpDecorate %268 RelaxedPrecision + OpDecorate %269 RelaxedPrecision + OpDecorate %271 RelaxedPrecision + OpDecorate %272 RelaxedPrecision + OpDecorate %m_4 RelaxedPrecision + OpDecorate %285 RelaxedPrecision + OpDecorate %301 RelaxedPrecision + OpDecorate %302 RelaxedPrecision + OpDecorate %304 RelaxedPrecision + OpDecorate %305 RelaxedPrecision + OpDecorate %308 RelaxedPrecision + OpDecorate %309 RelaxedPrecision + OpDecorate %495 RelaxedPrecision + OpDecorate %498 RelaxedPrecision + OpDecorate %499 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%16 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%20 = OpConstantComposite %v2float %float_0 %float_0 + %11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %16 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %20 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%24 = OpTypeFunction %bool + %24 = OpTypeFunction %bool %_ptr_Function_bool = OpTypePointer Function %bool -%true = OpConstantTrue %bool -%v3float = OpTypeVector %float 3 + %true = OpConstantTrue %bool + %v3float = OpTypeVector %float 3 %mat3v3float = OpTypeMatrix %v3float 3 %_ptr_Function_mat3v3float = OpTypePointer Function %mat3v3float -%float_4 = OpConstant %float 4 -%34 = OpConstantComposite %v3float %float_4 %float_4 %float_4 -%35 = OpConstantComposite %mat3v3float %34 %34 %34 -%float_2 = OpConstant %float 2 -%38 = OpConstantComposite %v3float %float_2 %float_2 %float_2 -%39 = OpConstantComposite %mat3v3float %38 %38 %38 -%41 = OpConstantComposite %v3float %float_2 %float_0 %float_0 -%42 = OpConstantComposite %v3float %float_0 %float_2 %float_0 -%43 = OpConstantComposite %v3float %float_0 %float_0 %float_2 -%44 = OpConstantComposite %mat3v3float %41 %42 %43 -%false = OpConstantFalse %bool -%float_6 = OpConstant %float 6 -%53 = OpConstantComposite %v3float %float_6 %float_4 %float_4 -%54 = OpConstantComposite %v3float %float_4 %float_6 %float_4 -%55 = OpConstantComposite %v3float %float_4 %float_4 %float_6 -%56 = OpConstantComposite %mat3v3float %53 %54 %55 -%v3bool = OpTypeVector %bool 3 -%float_n2 = OpConstant %float -2 -%float_n4 = OpConstant %float -4 -%75 = OpConstantComposite %v3float %float_n2 %float_n4 %float_n4 -%76 = OpConstantComposite %v3float %float_n4 %float_n2 %float_n4 -%77 = OpConstantComposite %v3float %float_n4 %float_n4 %float_n2 -%78 = OpConstantComposite %mat3v3float %75 %76 %77 -%float_0_5 = OpConstant %float 0.5 -%95 = OpConstantComposite %v3float %float_0_5 %float_0 %float_0 -%96 = OpConstantComposite %v3float %float_0 %float_0_5 %float_0 -%97 = OpConstantComposite %v3float %float_0 %float_0 %float_0_5 -%98 = OpConstantComposite %mat3v3float %95 %96 %97 -%129 = OpConstantComposite %v3float %float_2 %float_4 %float_4 -%130 = OpConstantComposite %v3float %float_4 %float_2 %float_4 -%131 = OpConstantComposite %v3float %float_4 %float_4 %float_2 -%132 = OpConstantComposite %mat3v3float %129 %130 %131 + %float_4 = OpConstant %float 4 + %34 = OpConstantComposite %v3float %float_4 %float_4 %float_4 + %35 = OpConstantComposite %mat3v3float %34 %34 %34 + %float_2 = OpConstant %float 2 + %38 = OpConstantComposite %v3float %float_2 %float_2 %float_2 + %39 = OpConstantComposite %mat3v3float %38 %38 %38 + %41 = OpConstantComposite %v3float %float_2 %float_0 %float_0 + %42 = OpConstantComposite %v3float %float_0 %float_2 %float_0 + %43 = OpConstantComposite %v3float %float_0 %float_0 %float_2 + %44 = OpConstantComposite %mat3v3float %41 %42 %43 + %false = OpConstantFalse %bool + %float_6 = OpConstant %float 6 + %53 = OpConstantComposite %v3float %float_6 %float_4 %float_4 + %54 = OpConstantComposite %v3float %float_4 %float_6 %float_4 + %55 = OpConstantComposite %v3float %float_4 %float_4 %float_6 + %56 = OpConstantComposite %mat3v3float %53 %54 %55 + %v3bool = OpTypeVector %bool 3 + %float_n2 = OpConstant %float -2 + %float_n4 = OpConstant %float -4 + %75 = OpConstantComposite %v3float %float_n2 %float_n4 %float_n4 + %76 = OpConstantComposite %v3float %float_n4 %float_n2 %float_n4 + %77 = OpConstantComposite %v3float %float_n4 %float_n4 %float_n2 + %78 = OpConstantComposite %mat3v3float %75 %76 %77 + %float_0_5 = OpConstant %float 0.5 + %95 = OpConstantComposite %v3float %float_0_5 %float_0 %float_0 + %96 = OpConstantComposite %v3float %float_0 %float_0_5 %float_0 + %97 = OpConstantComposite %v3float %float_0 %float_0 %float_0_5 + %98 = OpConstantComposite %mat3v3float %95 %96 %97 + %129 = OpConstantComposite %v3float %float_2 %float_4 %float_4 + %130 = OpConstantComposite %v3float %float_4 %float_2 %float_4 + %131 = OpConstantComposite %v3float %float_4 %float_4 %float_2 + %132 = OpConstantComposite %mat3v3float %129 %130 %131 %mat4v4float = OpTypeMatrix %v4float 4 %_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float -%float_1 = OpConstant %float 1 -%float_3 = OpConstant %float 3 -%float_5 = OpConstant %float 5 -%float_7 = OpConstant %float 7 -%float_8 = OpConstant %float 8 -%float_9 = OpConstant %float 9 -%float_10 = OpConstant %float 10 -%float_11 = OpConstant %float 11 -%float_12 = OpConstant %float 12 -%float_13 = OpConstant %float 13 -%float_14 = OpConstant %float 14 -%float_15 = OpConstant %float 15 -%float_16 = OpConstant %float 16 -%173 = OpConstantComposite %v4float %float_1 %float_2 %float_3 %float_4 -%174 = OpConstantComposite %v4float %float_5 %float_6 %float_7 %float_8 -%175 = OpConstantComposite %v4float %float_9 %float_10 %float_11 %float_12 -%176 = OpConstantComposite %v4float %float_13 %float_14 %float_15 %float_16 -%177 = OpConstantComposite %mat4v4float %173 %174 %175 %176 -%178 = OpConstantComposite %v4float %float_16 %float_15 %float_14 %float_13 -%179 = OpConstantComposite %v4float %float_12 %float_11 %float_10 %float_9 -%180 = OpConstantComposite %v4float %float_8 %float_7 %float_6 %float_5 -%181 = OpConstantComposite %v4float %float_4 %float_3 %float_2 %float_1 -%182 = OpConstantComposite %mat4v4float %178 %179 %180 %181 -%float_17 = OpConstant %float 17 -%191 = OpConstantComposite %v4float %float_17 %float_17 %float_17 %float_17 -%192 = OpConstantComposite %mat4v4float %191 %191 %191 %191 -%v4bool = OpTypeVector %bool 4 + %float_1 = OpConstant %float 1 + %float_3 = OpConstant %float 3 + %float_5 = OpConstant %float 5 + %float_7 = OpConstant %float 7 + %float_8 = OpConstant %float 8 + %float_9 = OpConstant %float 9 + %float_10 = OpConstant %float 10 + %float_11 = OpConstant %float 11 + %float_12 = OpConstant %float 12 + %float_13 = OpConstant %float 13 + %float_14 = OpConstant %float 14 + %float_15 = OpConstant %float 15 + %float_16 = OpConstant %float 16 + %173 = OpConstantComposite %v4float %float_1 %float_2 %float_3 %float_4 + %174 = OpConstantComposite %v4float %float_5 %float_6 %float_7 %float_8 + %175 = OpConstantComposite %v4float %float_9 %float_10 %float_11 %float_12 + %176 = OpConstantComposite %v4float %float_13 %float_14 %float_15 %float_16 + %177 = OpConstantComposite %mat4v4float %173 %174 %175 %176 + %178 = OpConstantComposite %v4float %float_16 %float_15 %float_14 %float_13 + %179 = OpConstantComposite %v4float %float_12 %float_11 %float_10 %float_9 + %180 = OpConstantComposite %v4float %float_8 %float_7 %float_6 %float_5 + %181 = OpConstantComposite %v4float %float_4 %float_3 %float_2 %float_1 + %182 = OpConstantComposite %mat4v4float %178 %179 %180 %181 + %float_17 = OpConstant %float 17 + %191 = OpConstantComposite %v4float %float_17 %float_17 %float_17 %float_17 + %192 = OpConstantComposite %mat4v4float %191 %191 %191 %191 + %v4bool = OpTypeVector %bool 4 %mat2v2float = OpTypeMatrix %v2float 2 %_ptr_Function_mat2v2float = OpTypePointer Function %mat2v2float -%float_20 = OpConstant %float 20 -%float_30 = OpConstant %float 30 -%float_40 = OpConstant %float 40 -%212 = OpConstantComposite %v2float %float_10 %float_20 -%213 = OpConstantComposite %v2float %float_30 %float_40 -%214 = OpConstantComposite %mat2v2float %212 %213 -%215 = OpConstantComposite %v2float %float_1 %float_2 -%216 = OpConstantComposite %v2float %float_3 %float_4 -%217 = OpConstantComposite %mat2v2float %215 %216 -%float_18 = OpConstant %float 18 -%float_27 = OpConstant %float 27 -%float_36 = OpConstant %float 36 -%226 = OpConstantComposite %v2float %float_9 %float_18 -%227 = OpConstantComposite %v2float %float_27 %float_36 -%228 = OpConstantComposite %mat2v2float %226 %227 -%v2bool = OpTypeVector %bool 2 -%237 = OpConstantComposite %v2float %float_2 %float_4 -%238 = OpConstantComposite %v2float %float_6 %float_8 -%239 = OpConstantComposite %mat2v2float %237 %238 -%240 = OpConstantComposite %v2float %float_2 %float_2 -%241 = OpConstantComposite %mat2v2float %240 %237 -%247 = OpConstantComposite %v2float %float_3 %float_2 -%248 = OpConstantComposite %mat2v2float %215 %247 -%256 = OpConstantComposite %v2float %float_7 %float_4 -%257 = OpConstantComposite %mat2v2float %215 %256 -%258 = OpConstantComposite %v2float %float_3 %float_5 -%259 = OpConstantComposite %mat2v2float %258 %247 -%float_38 = OpConstant %float 38 -%float_26 = OpConstant %float 26 -%265 = OpConstantComposite %v2float %float_38 %float_26 -%266 = OpConstantComposite %v2float %float_17 %float_14 -%267 = OpConstantComposite %mat2v2float %265 %266 -%277 = OpConstantComposite %v3float %float_10 %float_4 %float_2 -%278 = OpConstantComposite %v3float %float_20 %float_5 %float_3 -%279 = OpConstantComposite %v3float %float_10 %float_6 %float_5 -%280 = OpConstantComposite %mat3v3float %277 %278 %279 -%281 = OpConstantComposite %v3float %float_3 %float_3 %float_4 -%282 = OpConstantComposite %v3float %float_2 %float_3 %float_4 -%283 = OpConstantComposite %v3float %float_4 %float_9 %float_2 -%284 = OpConstantComposite %mat3v3float %281 %282 %283 -%float_130 = OpConstant %float 130 -%float_51 = OpConstant %float 51 -%float_35 = OpConstant %float 35 -%float_120 = OpConstant %float 120 -%float_47 = OpConstant %float 47 -%float_33 = OpConstant %float 33 -%float_240 = OpConstant %float 240 -%float_73 = OpConstant %float 73 -%float_45 = OpConstant %float 45 -%297 = OpConstantComposite %v3float %float_130 %float_51 %float_35 -%298 = OpConstantComposite %v3float %float_120 %float_47 %float_33 -%299 = OpConstantComposite %v3float %float_240 %float_73 %float_45 -%300 = OpConstantComposite %mat3v3float %297 %298 %299 -%313 = OpTypeFunction %v4float %_ptr_Function_v2float + %float_20 = OpConstant %float 20 + %float_30 = OpConstant %float 30 + %float_40 = OpConstant %float 40 + %212 = OpConstantComposite %v2float %float_10 %float_20 + %213 = OpConstantComposite %v2float %float_30 %float_40 + %214 = OpConstantComposite %mat2v2float %212 %213 + %215 = OpConstantComposite %v2float %float_1 %float_2 + %216 = OpConstantComposite %v2float %float_3 %float_4 + %217 = OpConstantComposite %mat2v2float %215 %216 + %float_18 = OpConstant %float 18 + %float_27 = OpConstant %float 27 + %float_36 = OpConstant %float 36 + %226 = OpConstantComposite %v2float %float_9 %float_18 + %227 = OpConstantComposite %v2float %float_27 %float_36 + %228 = OpConstantComposite %mat2v2float %226 %227 + %v2bool = OpTypeVector %bool 2 + %237 = OpConstantComposite %v2float %float_2 %float_4 + %238 = OpConstantComposite %v2float %float_6 %float_8 + %239 = OpConstantComposite %mat2v2float %237 %238 + %240 = OpConstantComposite %v2float %float_2 %float_2 + %241 = OpConstantComposite %mat2v2float %240 %237 + %247 = OpConstantComposite %v2float %float_3 %float_2 + %248 = OpConstantComposite %mat2v2float %215 %247 + %256 = OpConstantComposite %v2float %float_7 %float_4 + %257 = OpConstantComposite %mat2v2float %215 %256 + %258 = OpConstantComposite %v2float %float_3 %float_5 + %259 = OpConstantComposite %mat2v2float %258 %247 + %float_38 = OpConstant %float 38 + %float_26 = OpConstant %float 26 + %265 = OpConstantComposite %v2float %float_38 %float_26 + %266 = OpConstantComposite %v2float %float_17 %float_14 + %267 = OpConstantComposite %mat2v2float %265 %266 + %277 = OpConstantComposite %v3float %float_10 %float_4 %float_2 + %278 = OpConstantComposite %v3float %float_20 %float_5 %float_3 + %279 = OpConstantComposite %v3float %float_10 %float_6 %float_5 + %280 = OpConstantComposite %mat3v3float %277 %278 %279 + %281 = OpConstantComposite %v3float %float_3 %float_3 %float_4 + %282 = OpConstantComposite %v3float %float_2 %float_3 %float_4 + %283 = OpConstantComposite %v3float %float_4 %float_9 %float_2 + %284 = OpConstantComposite %mat3v3float %281 %282 %283 + %float_130 = OpConstant %float 130 + %float_51 = OpConstant %float 51 + %float_35 = OpConstant %float 35 + %float_120 = OpConstant %float 120 + %float_47 = OpConstant %float 47 + %float_33 = OpConstant %float 33 + %float_240 = OpConstant %float 240 + %float_73 = OpConstant %float 73 + %float_45 = OpConstant %float 45 + %297 = OpConstantComposite %v3float %float_130 %float_51 %float_35 + %298 = OpConstantComposite %v3float %float_120 %float_47 %float_33 + %299 = OpConstantComposite %v3float %float_240 %float_73 %float_45 + %300 = OpConstantComposite %mat3v3float %297 %298 %299 + %313 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_1 = OpConstant %int 1 -%int_0 = OpConstant %int 0 + %int = OpTypeInt 32 1 + %int_1 = OpConstant %int 1 + %int_0 = OpConstant %int 0 %_entrypoint_v = OpFunction %void None %16 -%17 = OpLabel -%21 = OpVariable %_ptr_Function_v2float Function -OpStore %21 %20 -%23 = OpFunctionCall %v4float %main %21 -OpStore %sk_FragColor %23 -OpReturn -OpFunctionEnd + %17 = OpLabel + %21 = OpVariable %_ptr_Function_v2float Function + OpStore %21 %20 + %23 = OpFunctionCall %v4float %main %21 + OpStore %sk_FragColor %23 + OpReturn + OpFunctionEnd %test_matrix_op_matrix_half_b = OpFunction %bool None %24 -%25 = OpLabel -%ok = OpVariable %_ptr_Function_bool Function -%splat_4 = OpVariable %_ptr_Function_mat3v3float Function -%splat_2 = OpVariable %_ptr_Function_mat3v3float Function -%m = OpVariable %_ptr_Function_mat3v3float Function -%m_0 = OpVariable %_ptr_Function_mat4v4float Function -%m_1 = OpVariable %_ptr_Function_mat2v2float Function -%m_2 = OpVariable %_ptr_Function_mat2v2float Function -%m_3 = OpVariable %_ptr_Function_mat2v2float Function -%m_4 = OpVariable %_ptr_Function_mat3v3float Function -OpStore %ok %true -OpStore %splat_4 %35 -OpStore %splat_2 %39 -OpStore %m %44 -%45 = OpFAdd %v3float %41 %34 -%46 = OpFAdd %v3float %42 %34 -%47 = OpFAdd %v3float %43 %34 -%48 = OpCompositeConstruct %mat3v3float %45 %46 %47 -OpStore %m %48 -OpSelectionMerge %51 None -OpBranchConditional %true %50 %51 -%50 = OpLabel -%58 = OpFOrdEqual %v3bool %45 %53 -%59 = OpAll %bool %58 -%60 = OpFOrdEqual %v3bool %46 %54 -%61 = OpAll %bool %60 -%62 = OpLogicalAnd %bool %59 %61 -%63 = OpFOrdEqual %v3bool %47 %55 -%64 = OpAll %bool %63 -%65 = OpLogicalAnd %bool %62 %64 -OpBranch %51 -%51 = OpLabel -%66 = OpPhi %bool %false %25 %65 %50 -OpStore %ok %66 -OpStore %m %44 -%67 = OpFSub %v3float %41 %34 -%68 = OpFSub %v3float %42 %34 -%69 = OpFSub %v3float %43 %34 -%70 = OpCompositeConstruct %mat3v3float %67 %68 %69 -OpStore %m %70 -OpSelectionMerge %72 None -OpBranchConditional %66 %71 %72 -%71 = OpLabel -%79 = OpFOrdEqual %v3bool %67 %75 -%80 = OpAll %bool %79 -%81 = OpFOrdEqual %v3bool %68 %76 -%82 = OpAll %bool %81 -%83 = OpLogicalAnd %bool %80 %82 -%84 = OpFOrdEqual %v3bool %69 %77 -%85 = OpAll %bool %84 -%86 = OpLogicalAnd %bool %83 %85 -OpBranch %72 -%72 = OpLabel -%87 = OpPhi %bool %false %51 %86 %71 -OpStore %ok %87 -OpStore %m %44 -%88 = OpFDiv %v3float %41 %34 -%89 = OpFDiv %v3float %42 %34 -%90 = OpFDiv %v3float %43 %34 -%91 = OpCompositeConstruct %mat3v3float %88 %89 %90 -OpStore %m %91 -OpSelectionMerge %93 None -OpBranchConditional %87 %92 %93 -%92 = OpLabel -%99 = OpFOrdEqual %v3bool %88 %95 -%100 = OpAll %bool %99 -%101 = OpFOrdEqual %v3bool %89 %96 -%102 = OpAll %bool %101 -%103 = OpLogicalAnd %bool %100 %102 -%104 = OpFOrdEqual %v3bool %90 %97 -%105 = OpAll %bool %104 -%106 = OpLogicalAnd %bool %103 %105 -OpBranch %93 -%93 = OpLabel -%107 = OpPhi %bool %false %72 %106 %92 -OpStore %ok %107 -OpStore %m %35 -%108 = OpFAdd %v3float %34 %41 -%109 = OpFAdd %v3float %34 %42 -%110 = OpFAdd %v3float %34 %43 -%111 = OpCompositeConstruct %mat3v3float %108 %109 %110 -OpStore %m %111 -OpSelectionMerge %113 None -OpBranchConditional %107 %112 %113 -%112 = OpLabel -%114 = OpFOrdEqual %v3bool %108 %53 -%115 = OpAll %bool %114 -%116 = OpFOrdEqual %v3bool %109 %54 -%117 = OpAll %bool %116 -%118 = OpLogicalAnd %bool %115 %117 -%119 = OpFOrdEqual %v3bool %110 %55 -%120 = OpAll %bool %119 -%121 = OpLogicalAnd %bool %118 %120 -OpBranch %113 -%113 = OpLabel -%122 = OpPhi %bool %false %93 %121 %112 -OpStore %ok %122 -OpStore %m %35 -%123 = OpFSub %v3float %34 %41 -%124 = OpFSub %v3float %34 %42 -%125 = OpFSub %v3float %34 %43 -%126 = OpCompositeConstruct %mat3v3float %123 %124 %125 -OpStore %m %126 -OpSelectionMerge %128 None -OpBranchConditional %122 %127 %128 -%127 = OpLabel -%133 = OpFOrdEqual %v3bool %123 %129 -%134 = OpAll %bool %133 -%135 = OpFOrdEqual %v3bool %124 %130 -%136 = OpAll %bool %135 -%137 = OpLogicalAnd %bool %134 %136 -%138 = OpFOrdEqual %v3bool %125 %131 -%139 = OpAll %bool %138 -%140 = OpLogicalAnd %bool %137 %139 -OpBranch %128 -%128 = OpLabel -%141 = OpPhi %bool %false %113 %140 %127 -OpStore %ok %141 -OpStore %m %35 -%142 = OpFDiv %v3float %34 %38 -%143 = OpFDiv %v3float %34 %38 -%144 = OpFDiv %v3float %34 %38 -%145 = OpCompositeConstruct %mat3v3float %142 %143 %144 -OpStore %m %145 -OpSelectionMerge %147 None -OpBranchConditional %141 %146 %147 -%146 = OpLabel -%148 = OpFOrdEqual %v3bool %142 %38 -%149 = OpAll %bool %148 -%150 = OpFOrdEqual %v3bool %143 %38 -%151 = OpAll %bool %150 -%152 = OpLogicalAnd %bool %149 %151 -%153 = OpFOrdEqual %v3bool %144 %38 -%154 = OpAll %bool %153 -%155 = OpLogicalAnd %bool %152 %154 -OpBranch %147 -%147 = OpLabel -%156 = OpPhi %bool %false %128 %155 %146 -OpStore %ok %156 -OpStore %m_0 %177 -%183 = OpFAdd %v4float %173 %178 -%184 = OpFAdd %v4float %174 %179 -%185 = OpFAdd %v4float %175 %180 -%186 = OpFAdd %v4float %176 %181 -%187 = OpCompositeConstruct %mat4v4float %183 %184 %185 %186 -OpStore %m_0 %187 -OpSelectionMerge %189 None -OpBranchConditional %156 %188 %189 -%188 = OpLabel -%194 = OpFOrdEqual %v4bool %183 %191 -%195 = OpAll %bool %194 -%196 = OpFOrdEqual %v4bool %184 %191 -%197 = OpAll %bool %196 -%198 = OpLogicalAnd %bool %195 %197 -%199 = OpFOrdEqual %v4bool %185 %191 -%200 = OpAll %bool %199 -%201 = OpLogicalAnd %bool %198 %200 -%202 = OpFOrdEqual %v4bool %186 %191 -%203 = OpAll %bool %202 -%204 = OpLogicalAnd %bool %201 %203 -OpBranch %189 -%189 = OpLabel -%205 = OpPhi %bool %false %147 %204 %188 -OpStore %ok %205 -OpStore %m_1 %214 -%218 = OpFSub %v2float %212 %215 -%219 = OpFSub %v2float %213 %216 -%220 = OpCompositeConstruct %mat2v2float %218 %219 -OpStore %m_1 %220 -OpSelectionMerge %222 None -OpBranchConditional %205 %221 %222 -%221 = OpLabel -%230 = OpFOrdEqual %v2bool %218 %226 -%231 = OpAll %bool %230 -%232 = OpFOrdEqual %v2bool %219 %227 -%233 = OpAll %bool %232 -%234 = OpLogicalAnd %bool %231 %233 -OpBranch %222 -%222 = OpLabel -%235 = OpPhi %bool %false %189 %234 %221 -OpStore %ok %235 -OpStore %m_2 %239 -%242 = OpFDiv %v2float %237 %240 -%243 = OpFDiv %v2float %238 %237 -%244 = OpCompositeConstruct %mat2v2float %242 %243 -OpStore %m_2 %244 -OpSelectionMerge %246 None -OpBranchConditional %235 %245 %246 -%245 = OpLabel -%249 = OpFOrdEqual %v2bool %242 %215 -%250 = OpAll %bool %249 -%251 = OpFOrdEqual %v2bool %243 %247 -%252 = OpAll %bool %251 -%253 = OpLogicalAnd %bool %250 %252 -OpBranch %246 -%246 = OpLabel -%254 = OpPhi %bool %false %222 %253 %245 -OpStore %ok %254 -OpStore %m_3 %257 -%260 = OpMatrixTimesMatrix %mat2v2float %257 %259 -OpStore %m_3 %260 -OpSelectionMerge %262 None -OpBranchConditional %254 %261 %262 -%261 = OpLabel -%268 = OpCompositeExtract %v2float %260 0 -%269 = OpFOrdEqual %v2bool %268 %265 -%270 = OpAll %bool %269 -%271 = OpCompositeExtract %v2float %260 1 -%272 = OpFOrdEqual %v2bool %271 %266 -%273 = OpAll %bool %272 -%274 = OpLogicalAnd %bool %270 %273 -OpBranch %262 -%262 = OpLabel -%275 = OpPhi %bool %false %246 %274 %261 -OpStore %ok %275 -OpStore %m_4 %280 -%285 = OpMatrixTimesMatrix %mat3v3float %280 %284 -OpStore %m_4 %285 -OpSelectionMerge %287 None -OpBranchConditional %275 %286 %287 -%286 = OpLabel -%301 = OpCompositeExtract %v3float %285 0 -%302 = OpFOrdEqual %v3bool %301 %297 -%303 = OpAll %bool %302 -%304 = OpCompositeExtract %v3float %285 1 -%305 = OpFOrdEqual %v3bool %304 %298 -%306 = OpAll %bool %305 -%307 = OpLogicalAnd %bool %303 %306 -%308 = OpCompositeExtract %v3float %285 2 -%309 = OpFOrdEqual %v3bool %308 %299 -%310 = OpAll %bool %309 -%311 = OpLogicalAnd %bool %307 %310 -OpBranch %287 -%287 = OpLabel -%312 = OpPhi %bool %false %262 %311 %286 -OpStore %ok %312 -OpReturnValue %312 -OpFunctionEnd -%main = OpFunction %v4float None %313 -%314 = OpFunctionParameter %_ptr_Function_v2float -%315 = OpLabel -%_0_ok = OpVariable %_ptr_Function_bool Function -%_1_splat_4 = OpVariable %_ptr_Function_mat3v3float Function -%_2_splat_2 = OpVariable %_ptr_Function_mat3v3float Function -%_3_m = OpVariable %_ptr_Function_mat3v3float Function -%_4_m = OpVariable %_ptr_Function_mat4v4float Function -%_5_m = OpVariable %_ptr_Function_mat2v2float Function -%_6_m = OpVariable %_ptr_Function_mat2v2float Function -%_7_m = OpVariable %_ptr_Function_mat2v2float Function -%_8_m = OpVariable %_ptr_Function_mat3v3float Function -%486 = OpVariable %_ptr_Function_v4float Function -OpStore %_0_ok %true -OpStore %_1_splat_4 %35 -OpStore %_2_splat_2 %39 -OpStore %_3_m %44 -%320 = OpFAdd %v3float %41 %34 -%321 = OpFAdd %v3float %42 %34 -%322 = OpFAdd %v3float %43 %34 -%323 = OpCompositeConstruct %mat3v3float %320 %321 %322 -OpStore %_3_m %323 -OpSelectionMerge %325 None -OpBranchConditional %true %324 %325 -%324 = OpLabel -%326 = OpFOrdEqual %v3bool %320 %53 -%327 = OpAll %bool %326 -%328 = OpFOrdEqual %v3bool %321 %54 -%329 = OpAll %bool %328 -%330 = OpLogicalAnd %bool %327 %329 -%331 = OpFOrdEqual %v3bool %322 %55 -%332 = OpAll %bool %331 -%333 = OpLogicalAnd %bool %330 %332 -OpBranch %325 -%325 = OpLabel -%334 = OpPhi %bool %false %315 %333 %324 -OpStore %_0_ok %334 -OpStore %_3_m %44 -%335 = OpFSub %v3float %41 %34 -%336 = OpFSub %v3float %42 %34 -%337 = OpFSub %v3float %43 %34 -%338 = OpCompositeConstruct %mat3v3float %335 %336 %337 -OpStore %_3_m %338 -OpSelectionMerge %340 None -OpBranchConditional %334 %339 %340 -%339 = OpLabel -%341 = OpFOrdEqual %v3bool %335 %75 -%342 = OpAll %bool %341 -%343 = OpFOrdEqual %v3bool %336 %76 -%344 = OpAll %bool %343 -%345 = OpLogicalAnd %bool %342 %344 -%346 = OpFOrdEqual %v3bool %337 %77 -%347 = OpAll %bool %346 -%348 = OpLogicalAnd %bool %345 %347 -OpBranch %340 -%340 = OpLabel -%349 = OpPhi %bool %false %325 %348 %339 -OpStore %_0_ok %349 -OpStore %_3_m %44 -%350 = OpFDiv %v3float %41 %34 -%351 = OpFDiv %v3float %42 %34 -%352 = OpFDiv %v3float %43 %34 -%353 = OpCompositeConstruct %mat3v3float %350 %351 %352 -OpStore %_3_m %353 -OpSelectionMerge %355 None -OpBranchConditional %349 %354 %355 -%354 = OpLabel -%356 = OpFOrdEqual %v3bool %350 %95 -%357 = OpAll %bool %356 -%358 = OpFOrdEqual %v3bool %351 %96 -%359 = OpAll %bool %358 -%360 = OpLogicalAnd %bool %357 %359 -%361 = OpFOrdEqual %v3bool %352 %97 -%362 = OpAll %bool %361 -%363 = OpLogicalAnd %bool %360 %362 -OpBranch %355 -%355 = OpLabel -%364 = OpPhi %bool %false %340 %363 %354 -OpStore %_0_ok %364 -OpStore %_3_m %35 -%365 = OpFAdd %v3float %34 %41 -%366 = OpFAdd %v3float %34 %42 -%367 = OpFAdd %v3float %34 %43 -%368 = OpCompositeConstruct %mat3v3float %365 %366 %367 -OpStore %_3_m %368 -OpSelectionMerge %370 None -OpBranchConditional %364 %369 %370 -%369 = OpLabel -%371 = OpFOrdEqual %v3bool %365 %53 -%372 = OpAll %bool %371 -%373 = OpFOrdEqual %v3bool %366 %54 -%374 = OpAll %bool %373 -%375 = OpLogicalAnd %bool %372 %374 -%376 = OpFOrdEqual %v3bool %367 %55 -%377 = OpAll %bool %376 -%378 = OpLogicalAnd %bool %375 %377 -OpBranch %370 -%370 = OpLabel -%379 = OpPhi %bool %false %355 %378 %369 -OpStore %_0_ok %379 -OpStore %_3_m %35 -%380 = OpFSub %v3float %34 %41 -%381 = OpFSub %v3float %34 %42 -%382 = OpFSub %v3float %34 %43 -%383 = OpCompositeConstruct %mat3v3float %380 %381 %382 -OpStore %_3_m %383 -OpSelectionMerge %385 None -OpBranchConditional %379 %384 %385 -%384 = OpLabel -%386 = OpFOrdEqual %v3bool %380 %129 -%387 = OpAll %bool %386 -%388 = OpFOrdEqual %v3bool %381 %130 -%389 = OpAll %bool %388 -%390 = OpLogicalAnd %bool %387 %389 -%391 = OpFOrdEqual %v3bool %382 %131 -%392 = OpAll %bool %391 -%393 = OpLogicalAnd %bool %390 %392 -OpBranch %385 -%385 = OpLabel -%394 = OpPhi %bool %false %370 %393 %384 -OpStore %_0_ok %394 -OpStore %_3_m %35 -%395 = OpFDiv %v3float %34 %38 -%396 = OpFDiv %v3float %34 %38 -%397 = OpFDiv %v3float %34 %38 -%398 = OpCompositeConstruct %mat3v3float %395 %396 %397 -OpStore %_3_m %398 -OpSelectionMerge %400 None -OpBranchConditional %394 %399 %400 -%399 = OpLabel -%401 = OpFOrdEqual %v3bool %395 %38 -%402 = OpAll %bool %401 -%403 = OpFOrdEqual %v3bool %396 %38 -%404 = OpAll %bool %403 -%405 = OpLogicalAnd %bool %402 %404 -%406 = OpFOrdEqual %v3bool %397 %38 -%407 = OpAll %bool %406 -%408 = OpLogicalAnd %bool %405 %407 -OpBranch %400 -%400 = OpLabel -%409 = OpPhi %bool %false %385 %408 %399 -OpStore %_0_ok %409 -OpStore %_4_m %177 -%411 = OpFAdd %v4float %173 %178 -%412 = OpFAdd %v4float %174 %179 -%413 = OpFAdd %v4float %175 %180 -%414 = OpFAdd %v4float %176 %181 -%415 = OpCompositeConstruct %mat4v4float %411 %412 %413 %414 -OpStore %_4_m %415 -OpSelectionMerge %417 None -OpBranchConditional %409 %416 %417 -%416 = OpLabel -%418 = OpFOrdEqual %v4bool %411 %191 -%419 = OpAll %bool %418 -%420 = OpFOrdEqual %v4bool %412 %191 -%421 = OpAll %bool %420 -%422 = OpLogicalAnd %bool %419 %421 -%423 = OpFOrdEqual %v4bool %413 %191 -%424 = OpAll %bool %423 -%425 = OpLogicalAnd %bool %422 %424 -%426 = OpFOrdEqual %v4bool %414 %191 -%427 = OpAll %bool %426 -%428 = OpLogicalAnd %bool %425 %427 -OpBranch %417 -%417 = OpLabel -%429 = OpPhi %bool %false %400 %428 %416 -OpStore %_0_ok %429 -OpStore %_5_m %214 -%431 = OpFSub %v2float %212 %215 -%432 = OpFSub %v2float %213 %216 -%433 = OpCompositeConstruct %mat2v2float %431 %432 -OpStore %_5_m %433 -OpSelectionMerge %435 None -OpBranchConditional %429 %434 %435 -%434 = OpLabel -%436 = OpFOrdEqual %v2bool %431 %226 -%437 = OpAll %bool %436 -%438 = OpFOrdEqual %v2bool %432 %227 -%439 = OpAll %bool %438 -%440 = OpLogicalAnd %bool %437 %439 -OpBranch %435 -%435 = OpLabel -%441 = OpPhi %bool %false %417 %440 %434 -OpStore %_0_ok %441 -OpStore %_6_m %239 -%443 = OpFDiv %v2float %237 %240 -%444 = OpFDiv %v2float %238 %237 -%445 = OpCompositeConstruct %mat2v2float %443 %444 -OpStore %_6_m %445 -OpSelectionMerge %447 None -OpBranchConditional %441 %446 %447 -%446 = OpLabel -%448 = OpFOrdEqual %v2bool %443 %215 -%449 = OpAll %bool %448 -%450 = OpFOrdEqual %v2bool %444 %247 -%451 = OpAll %bool %450 -%452 = OpLogicalAnd %bool %449 %451 -OpBranch %447 -%447 = OpLabel -%453 = OpPhi %bool %false %435 %452 %446 -OpStore %_0_ok %453 -OpStore %_7_m %257 -%455 = OpMatrixTimesMatrix %mat2v2float %257 %259 -OpStore %_7_m %455 -OpSelectionMerge %457 None -OpBranchConditional %453 %456 %457 -%456 = OpLabel -%458 = OpCompositeExtract %v2float %455 0 -%459 = OpFOrdEqual %v2bool %458 %265 -%460 = OpAll %bool %459 -%461 = OpCompositeExtract %v2float %455 1 -%462 = OpFOrdEqual %v2bool %461 %266 -%463 = OpAll %bool %462 -%464 = OpLogicalAnd %bool %460 %463 -OpBranch %457 -%457 = OpLabel -%465 = OpPhi %bool %false %447 %464 %456 -OpStore %_0_ok %465 -OpStore %_8_m %280 -%467 = OpMatrixTimesMatrix %mat3v3float %280 %284 -OpStore %_8_m %467 -OpSelectionMerge %469 None -OpBranchConditional %465 %468 %469 -%468 = OpLabel -%470 = OpCompositeExtract %v3float %467 0 -%471 = OpFOrdEqual %v3bool %470 %297 -%472 = OpAll %bool %471 -%473 = OpCompositeExtract %v3float %467 1 -%474 = OpFOrdEqual %v3bool %473 %298 -%475 = OpAll %bool %474 -%476 = OpLogicalAnd %bool %472 %475 -%477 = OpCompositeExtract %v3float %467 2 -%478 = OpFOrdEqual %v3bool %477 %299 -%479 = OpAll %bool %478 -%480 = OpLogicalAnd %bool %476 %479 -OpBranch %469 -%469 = OpLabel -%481 = OpPhi %bool %false %457 %480 %468 -OpStore %_0_ok %481 -OpSelectionMerge %483 None -OpBranchConditional %481 %482 %483 -%482 = OpLabel -%484 = OpFunctionCall %bool %test_matrix_op_matrix_half_b -OpBranch %483 -%483 = OpLabel -%485 = OpPhi %bool %false %469 %484 %482 -OpSelectionMerge %490 None -OpBranchConditional %485 %488 %489 -%488 = OpLabel -%491 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 -%495 = OpLoad %v4float %491 -OpStore %486 %495 -OpBranch %490 -%489 = OpLabel -%496 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 -%498 = OpLoad %v4float %496 -OpStore %486 %498 -OpBranch %490 -%490 = OpLabel -%499 = OpLoad %v4float %486 -OpReturnValue %499 -OpFunctionEnd + %25 = OpLabel + %ok = OpVariable %_ptr_Function_bool Function + %splat_4 = OpVariable %_ptr_Function_mat3v3float Function + %splat_2 = OpVariable %_ptr_Function_mat3v3float Function + %m = OpVariable %_ptr_Function_mat3v3float Function + %m_0 = OpVariable %_ptr_Function_mat4v4float Function + %m_1 = OpVariable %_ptr_Function_mat2v2float Function + %m_2 = OpVariable %_ptr_Function_mat2v2float Function + %m_3 = OpVariable %_ptr_Function_mat2v2float Function + %m_4 = OpVariable %_ptr_Function_mat3v3float Function + OpStore %ok %true + OpStore %splat_4 %35 + OpStore %splat_2 %39 + OpStore %m %44 + %45 = OpFAdd %v3float %41 %34 + %46 = OpFAdd %v3float %42 %34 + %47 = OpFAdd %v3float %43 %34 + %48 = OpCompositeConstruct %mat3v3float %45 %46 %47 + OpStore %m %48 + OpSelectionMerge %51 None + OpBranchConditional %true %50 %51 + %50 = OpLabel + %58 = OpFOrdEqual %v3bool %45 %53 + %59 = OpAll %bool %58 + %60 = OpFOrdEqual %v3bool %46 %54 + %61 = OpAll %bool %60 + %62 = OpLogicalAnd %bool %59 %61 + %63 = OpFOrdEqual %v3bool %47 %55 + %64 = OpAll %bool %63 + %65 = OpLogicalAnd %bool %62 %64 + OpBranch %51 + %51 = OpLabel + %66 = OpPhi %bool %false %25 %65 %50 + OpStore %ok %66 + OpStore %m %44 + %67 = OpFSub %v3float %41 %34 + %68 = OpFSub %v3float %42 %34 + %69 = OpFSub %v3float %43 %34 + %70 = OpCompositeConstruct %mat3v3float %67 %68 %69 + OpStore %m %70 + OpSelectionMerge %72 None + OpBranchConditional %66 %71 %72 + %71 = OpLabel + %79 = OpFOrdEqual %v3bool %67 %75 + %80 = OpAll %bool %79 + %81 = OpFOrdEqual %v3bool %68 %76 + %82 = OpAll %bool %81 + %83 = OpLogicalAnd %bool %80 %82 + %84 = OpFOrdEqual %v3bool %69 %77 + %85 = OpAll %bool %84 + %86 = OpLogicalAnd %bool %83 %85 + OpBranch %72 + %72 = OpLabel + %87 = OpPhi %bool %false %51 %86 %71 + OpStore %ok %87 + OpStore %m %44 + %88 = OpFDiv %v3float %41 %34 + %89 = OpFDiv %v3float %42 %34 + %90 = OpFDiv %v3float %43 %34 + %91 = OpCompositeConstruct %mat3v3float %88 %89 %90 + OpStore %m %91 + OpSelectionMerge %93 None + OpBranchConditional %87 %92 %93 + %92 = OpLabel + %99 = OpFOrdEqual %v3bool %88 %95 + %100 = OpAll %bool %99 + %101 = OpFOrdEqual %v3bool %89 %96 + %102 = OpAll %bool %101 + %103 = OpLogicalAnd %bool %100 %102 + %104 = OpFOrdEqual %v3bool %90 %97 + %105 = OpAll %bool %104 + %106 = OpLogicalAnd %bool %103 %105 + OpBranch %93 + %93 = OpLabel + %107 = OpPhi %bool %false %72 %106 %92 + OpStore %ok %107 + OpStore %m %35 + %108 = OpFAdd %v3float %34 %41 + %109 = OpFAdd %v3float %34 %42 + %110 = OpFAdd %v3float %34 %43 + %111 = OpCompositeConstruct %mat3v3float %108 %109 %110 + OpStore %m %111 + OpSelectionMerge %113 None + OpBranchConditional %107 %112 %113 + %112 = OpLabel + %114 = OpFOrdEqual %v3bool %108 %53 + %115 = OpAll %bool %114 + %116 = OpFOrdEqual %v3bool %109 %54 + %117 = OpAll %bool %116 + %118 = OpLogicalAnd %bool %115 %117 + %119 = OpFOrdEqual %v3bool %110 %55 + %120 = OpAll %bool %119 + %121 = OpLogicalAnd %bool %118 %120 + OpBranch %113 + %113 = OpLabel + %122 = OpPhi %bool %false %93 %121 %112 + OpStore %ok %122 + OpStore %m %35 + %123 = OpFSub %v3float %34 %41 + %124 = OpFSub %v3float %34 %42 + %125 = OpFSub %v3float %34 %43 + %126 = OpCompositeConstruct %mat3v3float %123 %124 %125 + OpStore %m %126 + OpSelectionMerge %128 None + OpBranchConditional %122 %127 %128 + %127 = OpLabel + %133 = OpFOrdEqual %v3bool %123 %129 + %134 = OpAll %bool %133 + %135 = OpFOrdEqual %v3bool %124 %130 + %136 = OpAll %bool %135 + %137 = OpLogicalAnd %bool %134 %136 + %138 = OpFOrdEqual %v3bool %125 %131 + %139 = OpAll %bool %138 + %140 = OpLogicalAnd %bool %137 %139 + OpBranch %128 + %128 = OpLabel + %141 = OpPhi %bool %false %113 %140 %127 + OpStore %ok %141 + OpStore %m %35 + %142 = OpFDiv %v3float %34 %38 + %143 = OpFDiv %v3float %34 %38 + %144 = OpFDiv %v3float %34 %38 + %145 = OpCompositeConstruct %mat3v3float %142 %143 %144 + OpStore %m %145 + OpSelectionMerge %147 None + OpBranchConditional %141 %146 %147 + %146 = OpLabel + %148 = OpFOrdEqual %v3bool %142 %38 + %149 = OpAll %bool %148 + %150 = OpFOrdEqual %v3bool %143 %38 + %151 = OpAll %bool %150 + %152 = OpLogicalAnd %bool %149 %151 + %153 = OpFOrdEqual %v3bool %144 %38 + %154 = OpAll %bool %153 + %155 = OpLogicalAnd %bool %152 %154 + OpBranch %147 + %147 = OpLabel + %156 = OpPhi %bool %false %128 %155 %146 + OpStore %ok %156 + OpStore %m_0 %177 + %183 = OpFAdd %v4float %173 %178 + %184 = OpFAdd %v4float %174 %179 + %185 = OpFAdd %v4float %175 %180 + %186 = OpFAdd %v4float %176 %181 + %187 = OpCompositeConstruct %mat4v4float %183 %184 %185 %186 + OpStore %m_0 %187 + OpSelectionMerge %189 None + OpBranchConditional %156 %188 %189 + %188 = OpLabel + %194 = OpFOrdEqual %v4bool %183 %191 + %195 = OpAll %bool %194 + %196 = OpFOrdEqual %v4bool %184 %191 + %197 = OpAll %bool %196 + %198 = OpLogicalAnd %bool %195 %197 + %199 = OpFOrdEqual %v4bool %185 %191 + %200 = OpAll %bool %199 + %201 = OpLogicalAnd %bool %198 %200 + %202 = OpFOrdEqual %v4bool %186 %191 + %203 = OpAll %bool %202 + %204 = OpLogicalAnd %bool %201 %203 + OpBranch %189 + %189 = OpLabel + %205 = OpPhi %bool %false %147 %204 %188 + OpStore %ok %205 + OpStore %m_1 %214 + %218 = OpFSub %v2float %212 %215 + %219 = OpFSub %v2float %213 %216 + %220 = OpCompositeConstruct %mat2v2float %218 %219 + OpStore %m_1 %220 + OpSelectionMerge %222 None + OpBranchConditional %205 %221 %222 + %221 = OpLabel + %230 = OpFOrdEqual %v2bool %218 %226 + %231 = OpAll %bool %230 + %232 = OpFOrdEqual %v2bool %219 %227 + %233 = OpAll %bool %232 + %234 = OpLogicalAnd %bool %231 %233 + OpBranch %222 + %222 = OpLabel + %235 = OpPhi %bool %false %189 %234 %221 + OpStore %ok %235 + OpStore %m_2 %239 + %242 = OpFDiv %v2float %237 %240 + %243 = OpFDiv %v2float %238 %237 + %244 = OpCompositeConstruct %mat2v2float %242 %243 + OpStore %m_2 %244 + OpSelectionMerge %246 None + OpBranchConditional %235 %245 %246 + %245 = OpLabel + %249 = OpFOrdEqual %v2bool %242 %215 + %250 = OpAll %bool %249 + %251 = OpFOrdEqual %v2bool %243 %247 + %252 = OpAll %bool %251 + %253 = OpLogicalAnd %bool %250 %252 + OpBranch %246 + %246 = OpLabel + %254 = OpPhi %bool %false %222 %253 %245 + OpStore %ok %254 + OpStore %m_3 %257 + %260 = OpMatrixTimesMatrix %mat2v2float %257 %259 + OpStore %m_3 %260 + OpSelectionMerge %262 None + OpBranchConditional %254 %261 %262 + %261 = OpLabel + %268 = OpCompositeExtract %v2float %260 0 + %269 = OpFOrdEqual %v2bool %268 %265 + %270 = OpAll %bool %269 + %271 = OpCompositeExtract %v2float %260 1 + %272 = OpFOrdEqual %v2bool %271 %266 + %273 = OpAll %bool %272 + %274 = OpLogicalAnd %bool %270 %273 + OpBranch %262 + %262 = OpLabel + %275 = OpPhi %bool %false %246 %274 %261 + OpStore %ok %275 + OpStore %m_4 %280 + %285 = OpMatrixTimesMatrix %mat3v3float %280 %284 + OpStore %m_4 %285 + OpSelectionMerge %287 None + OpBranchConditional %275 %286 %287 + %286 = OpLabel + %301 = OpCompositeExtract %v3float %285 0 + %302 = OpFOrdEqual %v3bool %301 %297 + %303 = OpAll %bool %302 + %304 = OpCompositeExtract %v3float %285 1 + %305 = OpFOrdEqual %v3bool %304 %298 + %306 = OpAll %bool %305 + %307 = OpLogicalAnd %bool %303 %306 + %308 = OpCompositeExtract %v3float %285 2 + %309 = OpFOrdEqual %v3bool %308 %299 + %310 = OpAll %bool %309 + %311 = OpLogicalAnd %bool %307 %310 + OpBranch %287 + %287 = OpLabel + %312 = OpPhi %bool %false %262 %311 %286 + OpStore %ok %312 + OpReturnValue %312 + OpFunctionEnd + %main = OpFunction %v4float None %313 + %314 = OpFunctionParameter %_ptr_Function_v2float + %315 = OpLabel + %_0_ok = OpVariable %_ptr_Function_bool Function + %_1_splat_4 = OpVariable %_ptr_Function_mat3v3float Function + %_2_splat_2 = OpVariable %_ptr_Function_mat3v3float Function + %_3_m = OpVariable %_ptr_Function_mat3v3float Function + %_4_m = OpVariable %_ptr_Function_mat4v4float Function + %_5_m = OpVariable %_ptr_Function_mat2v2float Function + %_6_m = OpVariable %_ptr_Function_mat2v2float Function + %_7_m = OpVariable %_ptr_Function_mat2v2float Function + %_8_m = OpVariable %_ptr_Function_mat3v3float Function + %486 = OpVariable %_ptr_Function_v4float Function + OpStore %_0_ok %true + OpStore %_1_splat_4 %35 + OpStore %_2_splat_2 %39 + OpStore %_3_m %44 + %320 = OpFAdd %v3float %41 %34 + %321 = OpFAdd %v3float %42 %34 + %322 = OpFAdd %v3float %43 %34 + %323 = OpCompositeConstruct %mat3v3float %320 %321 %322 + OpStore %_3_m %323 + OpSelectionMerge %325 None + OpBranchConditional %true %324 %325 + %324 = OpLabel + %326 = OpFOrdEqual %v3bool %320 %53 + %327 = OpAll %bool %326 + %328 = OpFOrdEqual %v3bool %321 %54 + %329 = OpAll %bool %328 + %330 = OpLogicalAnd %bool %327 %329 + %331 = OpFOrdEqual %v3bool %322 %55 + %332 = OpAll %bool %331 + %333 = OpLogicalAnd %bool %330 %332 + OpBranch %325 + %325 = OpLabel + %334 = OpPhi %bool %false %315 %333 %324 + OpStore %_0_ok %334 + OpStore %_3_m %44 + %335 = OpFSub %v3float %41 %34 + %336 = OpFSub %v3float %42 %34 + %337 = OpFSub %v3float %43 %34 + %338 = OpCompositeConstruct %mat3v3float %335 %336 %337 + OpStore %_3_m %338 + OpSelectionMerge %340 None + OpBranchConditional %334 %339 %340 + %339 = OpLabel + %341 = OpFOrdEqual %v3bool %335 %75 + %342 = OpAll %bool %341 + %343 = OpFOrdEqual %v3bool %336 %76 + %344 = OpAll %bool %343 + %345 = OpLogicalAnd %bool %342 %344 + %346 = OpFOrdEqual %v3bool %337 %77 + %347 = OpAll %bool %346 + %348 = OpLogicalAnd %bool %345 %347 + OpBranch %340 + %340 = OpLabel + %349 = OpPhi %bool %false %325 %348 %339 + OpStore %_0_ok %349 + OpStore %_3_m %44 + %350 = OpFDiv %v3float %41 %34 + %351 = OpFDiv %v3float %42 %34 + %352 = OpFDiv %v3float %43 %34 + %353 = OpCompositeConstruct %mat3v3float %350 %351 %352 + OpStore %_3_m %353 + OpSelectionMerge %355 None + OpBranchConditional %349 %354 %355 + %354 = OpLabel + %356 = OpFOrdEqual %v3bool %350 %95 + %357 = OpAll %bool %356 + %358 = OpFOrdEqual %v3bool %351 %96 + %359 = OpAll %bool %358 + %360 = OpLogicalAnd %bool %357 %359 + %361 = OpFOrdEqual %v3bool %352 %97 + %362 = OpAll %bool %361 + %363 = OpLogicalAnd %bool %360 %362 + OpBranch %355 + %355 = OpLabel + %364 = OpPhi %bool %false %340 %363 %354 + OpStore %_0_ok %364 + OpStore %_3_m %35 + %365 = OpFAdd %v3float %34 %41 + %366 = OpFAdd %v3float %34 %42 + %367 = OpFAdd %v3float %34 %43 + %368 = OpCompositeConstruct %mat3v3float %365 %366 %367 + OpStore %_3_m %368 + OpSelectionMerge %370 None + OpBranchConditional %364 %369 %370 + %369 = OpLabel + %371 = OpFOrdEqual %v3bool %365 %53 + %372 = OpAll %bool %371 + %373 = OpFOrdEqual %v3bool %366 %54 + %374 = OpAll %bool %373 + %375 = OpLogicalAnd %bool %372 %374 + %376 = OpFOrdEqual %v3bool %367 %55 + %377 = OpAll %bool %376 + %378 = OpLogicalAnd %bool %375 %377 + OpBranch %370 + %370 = OpLabel + %379 = OpPhi %bool %false %355 %378 %369 + OpStore %_0_ok %379 + OpStore %_3_m %35 + %380 = OpFSub %v3float %34 %41 + %381 = OpFSub %v3float %34 %42 + %382 = OpFSub %v3float %34 %43 + %383 = OpCompositeConstruct %mat3v3float %380 %381 %382 + OpStore %_3_m %383 + OpSelectionMerge %385 None + OpBranchConditional %379 %384 %385 + %384 = OpLabel + %386 = OpFOrdEqual %v3bool %380 %129 + %387 = OpAll %bool %386 + %388 = OpFOrdEqual %v3bool %381 %130 + %389 = OpAll %bool %388 + %390 = OpLogicalAnd %bool %387 %389 + %391 = OpFOrdEqual %v3bool %382 %131 + %392 = OpAll %bool %391 + %393 = OpLogicalAnd %bool %390 %392 + OpBranch %385 + %385 = OpLabel + %394 = OpPhi %bool %false %370 %393 %384 + OpStore %_0_ok %394 + OpStore %_3_m %35 + %395 = OpFDiv %v3float %34 %38 + %396 = OpFDiv %v3float %34 %38 + %397 = OpFDiv %v3float %34 %38 + %398 = OpCompositeConstruct %mat3v3float %395 %396 %397 + OpStore %_3_m %398 + OpSelectionMerge %400 None + OpBranchConditional %394 %399 %400 + %399 = OpLabel + %401 = OpFOrdEqual %v3bool %395 %38 + %402 = OpAll %bool %401 + %403 = OpFOrdEqual %v3bool %396 %38 + %404 = OpAll %bool %403 + %405 = OpLogicalAnd %bool %402 %404 + %406 = OpFOrdEqual %v3bool %397 %38 + %407 = OpAll %bool %406 + %408 = OpLogicalAnd %bool %405 %407 + OpBranch %400 + %400 = OpLabel + %409 = OpPhi %bool %false %385 %408 %399 + OpStore %_0_ok %409 + OpStore %_4_m %177 + %411 = OpFAdd %v4float %173 %178 + %412 = OpFAdd %v4float %174 %179 + %413 = OpFAdd %v4float %175 %180 + %414 = OpFAdd %v4float %176 %181 + %415 = OpCompositeConstruct %mat4v4float %411 %412 %413 %414 + OpStore %_4_m %415 + OpSelectionMerge %417 None + OpBranchConditional %409 %416 %417 + %416 = OpLabel + %418 = OpFOrdEqual %v4bool %411 %191 + %419 = OpAll %bool %418 + %420 = OpFOrdEqual %v4bool %412 %191 + %421 = OpAll %bool %420 + %422 = OpLogicalAnd %bool %419 %421 + %423 = OpFOrdEqual %v4bool %413 %191 + %424 = OpAll %bool %423 + %425 = OpLogicalAnd %bool %422 %424 + %426 = OpFOrdEqual %v4bool %414 %191 + %427 = OpAll %bool %426 + %428 = OpLogicalAnd %bool %425 %427 + OpBranch %417 + %417 = OpLabel + %429 = OpPhi %bool %false %400 %428 %416 + OpStore %_0_ok %429 + OpStore %_5_m %214 + %431 = OpFSub %v2float %212 %215 + %432 = OpFSub %v2float %213 %216 + %433 = OpCompositeConstruct %mat2v2float %431 %432 + OpStore %_5_m %433 + OpSelectionMerge %435 None + OpBranchConditional %429 %434 %435 + %434 = OpLabel + %436 = OpFOrdEqual %v2bool %431 %226 + %437 = OpAll %bool %436 + %438 = OpFOrdEqual %v2bool %432 %227 + %439 = OpAll %bool %438 + %440 = OpLogicalAnd %bool %437 %439 + OpBranch %435 + %435 = OpLabel + %441 = OpPhi %bool %false %417 %440 %434 + OpStore %_0_ok %441 + OpStore %_6_m %239 + %443 = OpFDiv %v2float %237 %240 + %444 = OpFDiv %v2float %238 %237 + %445 = OpCompositeConstruct %mat2v2float %443 %444 + OpStore %_6_m %445 + OpSelectionMerge %447 None + OpBranchConditional %441 %446 %447 + %446 = OpLabel + %448 = OpFOrdEqual %v2bool %443 %215 + %449 = OpAll %bool %448 + %450 = OpFOrdEqual %v2bool %444 %247 + %451 = OpAll %bool %450 + %452 = OpLogicalAnd %bool %449 %451 + OpBranch %447 + %447 = OpLabel + %453 = OpPhi %bool %false %435 %452 %446 + OpStore %_0_ok %453 + OpStore %_7_m %257 + %455 = OpMatrixTimesMatrix %mat2v2float %257 %259 + OpStore %_7_m %455 + OpSelectionMerge %457 None + OpBranchConditional %453 %456 %457 + %456 = OpLabel + %458 = OpCompositeExtract %v2float %455 0 + %459 = OpFOrdEqual %v2bool %458 %265 + %460 = OpAll %bool %459 + %461 = OpCompositeExtract %v2float %455 1 + %462 = OpFOrdEqual %v2bool %461 %266 + %463 = OpAll %bool %462 + %464 = OpLogicalAnd %bool %460 %463 + OpBranch %457 + %457 = OpLabel + %465 = OpPhi %bool %false %447 %464 %456 + OpStore %_0_ok %465 + OpStore %_8_m %280 + %467 = OpMatrixTimesMatrix %mat3v3float %280 %284 + OpStore %_8_m %467 + OpSelectionMerge %469 None + OpBranchConditional %465 %468 %469 + %468 = OpLabel + %470 = OpCompositeExtract %v3float %467 0 + %471 = OpFOrdEqual %v3bool %470 %297 + %472 = OpAll %bool %471 + %473 = OpCompositeExtract %v3float %467 1 + %474 = OpFOrdEqual %v3bool %473 %298 + %475 = OpAll %bool %474 + %476 = OpLogicalAnd %bool %472 %475 + %477 = OpCompositeExtract %v3float %467 2 + %478 = OpFOrdEqual %v3bool %477 %299 + %479 = OpAll %bool %478 + %480 = OpLogicalAnd %bool %476 %479 + OpBranch %469 + %469 = OpLabel + %481 = OpPhi %bool %false %457 %480 %468 + OpStore %_0_ok %481 + OpSelectionMerge %483 None + OpBranchConditional %481 %482 %483 + %482 = OpLabel + %484 = OpFunctionCall %bool %test_matrix_op_matrix_half_b + OpBranch %483 + %483 = OpLabel + %485 = OpPhi %bool %false %469 %484 %482 + OpSelectionMerge %490 None + OpBranchConditional %485 %488 %489 + %488 = OpLabel + %491 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 + %495 = OpLoad %v4float %491 + OpStore %486 %495 + OpBranch %490 + %489 = OpLabel + %496 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 + %498 = OpLoad %v4float %496 + OpStore %486 %498 + OpBranch %490 + %490 = OpLabel + %499 = OpLoad %v4float %486 + OpReturnValue %499 + OpFunctionEnd diff --git a/tests/sksl/shared/MatrixOpEqualsES2.skrp b/tests/sksl/shared/MatrixOpEqualsES2.skrp index d655b8b5cf05..0850a989f658 100644 --- a/tests/sksl/shared/MatrixOpEqualsES2.skrp +++ b/tests/sksl/shared/MatrixOpEqualsES2.skrp @@ -1,40 +1,158 @@ +529 instructions + [immutable slots] -_1_splat_4(0) = 0x40800000 (4.0) -_1_splat_4(1) = 0x40800000 (4.0) -_1_splat_4(2) = 0x40800000 (4.0) -_1_splat_4(3) = 0x40800000 (4.0) -_1_splat_4(4) = 0x40800000 (4.0) -_1_splat_4(5) = 0x40800000 (4.0) -_1_splat_4(6) = 0x40800000 (4.0) -_1_splat_4(7) = 0x40800000 (4.0) -_1_splat_4(8) = 0x40800000 (4.0) -_2_splat_2(0) = 0x40000000 (2.0) -_2_splat_2(1) = 0x40000000 (2.0) -_2_splat_2(2) = 0x40000000 (2.0) -_2_splat_2(3) = 0x40000000 (2.0) -_2_splat_2(4) = 0x40000000 (2.0) -_2_splat_2(5) = 0x40000000 (2.0) -_2_splat_2(6) = 0x40000000 (2.0) -_2_splat_2(7) = 0x40000000 (2.0) -_2_splat_2(8) = 0x40000000 (2.0) -splat_4(0) = 0x40800000 (4.0) -splat_4(1) = 0x40800000 (4.0) -splat_4(2) = 0x40800000 (4.0) -splat_4(3) = 0x40800000 (4.0) -splat_4(4) = 0x40800000 (4.0) -splat_4(5) = 0x40800000 (4.0) -splat_4(6) = 0x40800000 (4.0) -splat_4(7) = 0x40800000 (4.0) -splat_4(8) = 0x40800000 (4.0) -splat_2(0) = 0x40000000 (2.0) -splat_2(1) = 0x40000000 (2.0) -splat_2(2) = 0x40000000 (2.0) -splat_2(3) = 0x40000000 (2.0) -splat_2(4) = 0x40000000 (2.0) -splat_2(5) = 0x40000000 (2.0) -splat_2(6) = 0x40000000 (2.0) -splat_2(7) = 0x40000000 (2.0) -splat_2(8) = 0x40000000 (2.0) +i0 = 0x40800000 (4.0) +i1 = 0x40800000 (4.0) +i2 = 0x40800000 (4.0) +i3 = 0x40800000 (4.0) +i4 = 0x40800000 (4.0) +i5 = 0x40800000 (4.0) +i6 = 0x40800000 (4.0) +i7 = 0x40800000 (4.0) +i8 = 0x40800000 (4.0) +i9 = 0x40000000 (2.0) +i10 = 0x40000000 (2.0) +i11 = 0x40000000 (2.0) +i12 = 0x40000000 (2.0) +i13 = 0x40000000 (2.0) +i14 = 0x40000000 (2.0) +i15 = 0x40000000 (2.0) +i16 = 0x40000000 (2.0) +i17 = 0x40000000 (2.0) +i18 = 0x40C00000 (6.0) +i19 = 0x40800000 (4.0) +i20 = 0x40800000 (4.0) +i21 = 0x40800000 (4.0) +i22 = 0x40C00000 (6.0) +i23 = 0x40800000 (4.0) +i24 = 0x40800000 (4.0) +i25 = 0x40800000 (4.0) +i26 = 0x40C00000 (6.0) +i27 = 0xC0000000 (-2.0) +i28 = 0xC0800000 (-4.0) +i29 = 0xC0800000 (-4.0) +i30 = 0xC0800000 (-4.0) +i31 = 0xC0000000 (-2.0) +i32 = 0xC0800000 (-4.0) +i33 = 0xC0800000 (-4.0) +i34 = 0xC0800000 (-4.0) +i35 = 0xC0000000 (-2.0) +i36 = 0x40000000 (2.0) +i37 = 0x40800000 (4.0) +i38 = 0x40800000 (4.0) +i39 = 0x40800000 (4.0) +i40 = 0x40000000 (2.0) +i41 = 0x40800000 (4.0) +i42 = 0x40800000 (4.0) +i43 = 0x40800000 (4.0) +i44 = 0x40000000 (2.0) +i45 = 0x3F800000 (1.0) +i46 = 0x40000000 (2.0) +i47 = 0x40400000 (3.0) +i48 = 0x40800000 (4.0) +i49 = 0x40A00000 (5.0) +i50 = 0x40C00000 (6.0) +i51 = 0x40E00000 (7.0) +i52 = 0x41000000 (8.0) +i53 = 0x41100000 (9.0) +i54 = 0x41200000 (10.0) +i55 = 0x41300000 (11.0) +i56 = 0x41400000 (12.0) +i57 = 0x41500000 (13.0) +i58 = 0x41600000 (14.0) +i59 = 0x41700000 (15.0) +i60 = 0x41800000 (16.0) +i61 = 0x41800000 (16.0) +i62 = 0x41700000 (15.0) +i63 = 0x41600000 (14.0) +i64 = 0x41500000 (13.0) +i65 = 0x41400000 (12.0) +i66 = 0x41300000 (11.0) +i67 = 0x41200000 (10.0) +i68 = 0x41100000 (9.0) +i69 = 0x41000000 (8.0) +i70 = 0x40E00000 (7.0) +i71 = 0x40C00000 (6.0) +i72 = 0x40A00000 (5.0) +i73 = 0x40800000 (4.0) +i74 = 0x40400000 (3.0) +i75 = 0x40000000 (2.0) +i76 = 0x3F800000 (1.0) +i77 = 0x41880000 (17.0) +i78 = 0x41880000 (17.0) +i79 = 0x41880000 (17.0) +i80 = 0x41880000 (17.0) +i81 = 0x41880000 (17.0) +i82 = 0x41880000 (17.0) +i83 = 0x41880000 (17.0) +i84 = 0x41880000 (17.0) +i85 = 0x41880000 (17.0) +i86 = 0x41880000 (17.0) +i87 = 0x41880000 (17.0) +i88 = 0x41880000 (17.0) +i89 = 0x41880000 (17.0) +i90 = 0x41880000 (17.0) +i91 = 0x41880000 (17.0) +i92 = 0x41880000 (17.0) +i93 = 0x41200000 (10.0) +i94 = 0x41A00000 (20.0) +i95 = 0x41F00000 (30.0) +i96 = 0x42200000 (40.0) +i97 = 0x41100000 (9.0) +i98 = 0x41900000 (18.0) +i99 = 0x41D80000 (27.0) +i100 = 0x42100000 (36.0) +i101 = 0x40000000 (2.0) +i102 = 0x40800000 (4.0) +i103 = 0x40C00000 (6.0) +i104 = 0x41000000 (8.0) +i105 = 0x40000000 (2.0) +i106 = 0x40000000 (2.0) +i107 = 0x40000000 (2.0) +i108 = 0x40800000 (4.0) +i109 = 0x3F800000 (1.0) +i110 = 0x40000000 (2.0) +i111 = 0x40400000 (3.0) +i112 = 0x40000000 (2.0) +i113 = 0x3F800000 (1.0) +i114 = 0x40000000 (2.0) +i115 = 0x40E00000 (7.0) +i116 = 0x40800000 (4.0) +i117 = 0x40400000 (3.0) +i118 = 0x40A00000 (5.0) +i119 = 0x40400000 (3.0) +i120 = 0x40000000 (2.0) +i121 = 0x42180000 (38.0) +i122 = 0x41D00000 (26.0) +i123 = 0x41880000 (17.0) +i124 = 0x41600000 (14.0) +i125 = 0x41200000 (10.0) +i126 = 0x40800000 (4.0) +i127 = 0x40000000 (2.0) +i128 = 0x41A00000 (20.0) +i129 = 0x40A00000 (5.0) +i130 = 0x40400000 (3.0) +i131 = 0x41200000 (10.0) +i132 = 0x40C00000 (6.0) +i133 = 0x40A00000 (5.0) +i134 = 0x40400000 (3.0) +i135 = 0x40400000 (3.0) +i136 = 0x40800000 (4.0) +i137 = 0x40000000 (2.0) +i138 = 0x40400000 (3.0) +i139 = 0x40800000 (4.0) +i140 = 0x40800000 (4.0) +i141 = 0x41100000 (9.0) +i142 = 0x40000000 (2.0) +i143 = 0x43020000 (130.0) +i144 = 0x424C0000 (51.0) +i145 = 0x420C0000 (35.0) +i146 = 0x42F00000 (120.0) +i147 = 0x423C0000 (47.0) +i148 = 0x42040000 (33.0) +i149 = 0x43700000 (240.0) +i150 = 0x42920000 (73.0) +i151 = 0x42340000 (45.0) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -45,22 +163,19 @@ shuffle $0..8 = ($0..8)[1 0 0 0 1 0 0 0 1] copy_4_slots_unmasked _3_m(0..3) = $0..3 copy_4_slots_unmasked _3_m(4..7) = $4..7 copy_slot_unmasked _3_m(8) = $8 -copy_4_slots_unmasked $9..12 = _1_splat_4(0..3) -copy_4_slots_unmasked $13..16 = _1_splat_4(4..7) -copy_slot_unmasked $17 = _1_splat_4(8) +copy_4_immutables_unmasked $9..12 = i0..3 [0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked $13..16 = i4..7 [0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_immutable_unmasked $17 = i8 [0x40800000 (4.0)] add_n_floats $0..8 += $9..17 copy_4_slots_unmasked _3_m(0..3) = $0..3 copy_4_slots_unmasked _3_m(4..7) = $4..7 copy_slot_unmasked _3_m(8) = $8 -copy_slot_unmasked $0 = _0_ok -copy_4_slots_unmasked $1..4 = _3_m(0..3) -copy_4_slots_unmasked $5..8 = _3_m(4..7) -copy_slot_unmasked $9 = _3_m(8) -copy_constant $10 = 0x40C00000 (6.0) -splat_3_constants $11..13 = 0x40800000 (4.0) -copy_constant $14 = 0x40C00000 (6.0) -splat_3_constants $15..17 = 0x40800000 (4.0) -copy_constant $18 = 0x40C00000 (6.0) +copy_4_slots_unmasked $0..3 = _0_ok, _3_m(0..2) +copy_4_slots_unmasked $4..7 = _3_m(3..6) +copy_2_slots_unmasked $8..9 = _3_m(7..8) +copy_4_immutables_unmasked $10..13 = i18..21 [0x40C00000 (6.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked $14..17 = i22..25 [0x40C00000 (6.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_immutable_unmasked $18 = i26 [0x40C00000 (6.0)] cmpeq_n_floats $1..9 = equal($1..9, $10..18) bitwise_and_4_ints $2..5 &= $6..9 bitwise_and_2_ints $2..3 &= $4..5 @@ -74,22 +189,19 @@ shuffle $0..8 = ($0..8)[1 0 0 0 1 0 0 0 1] copy_4_slots_unmasked _3_m(0..3) = $0..3 copy_4_slots_unmasked _3_m(4..7) = $4..7 copy_slot_unmasked _3_m(8) = $8 -copy_4_slots_unmasked $9..12 = _1_splat_4(0..3) -copy_4_slots_unmasked $13..16 = _1_splat_4(4..7) -copy_slot_unmasked $17 = _1_splat_4(8) +copy_4_immutables_unmasked $9..12 = i0..3 [0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked $13..16 = i4..7 [0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_immutable_unmasked $17 = i8 [0x40800000 (4.0)] sub_n_floats $0..8 -= $9..17 copy_4_slots_unmasked _3_m(0..3) = $0..3 copy_4_slots_unmasked _3_m(4..7) = $4..7 copy_slot_unmasked _3_m(8) = $8 -copy_slot_unmasked $0 = _0_ok -copy_4_slots_unmasked $1..4 = _3_m(0..3) -copy_4_slots_unmasked $5..8 = _3_m(4..7) -copy_slot_unmasked $9 = _3_m(8) -copy_constant $10 = 0xC0000000 (-2.0) -splat_3_constants $11..13 = 0xC0800000 (-4.0) -copy_constant $14 = 0xC0000000 (-2.0) -splat_3_constants $15..17 = 0xC0800000 (-4.0) -copy_constant $18 = 0xC0000000 (-2.0) +copy_4_slots_unmasked $0..3 = _0_ok, _3_m(0..2) +copy_4_slots_unmasked $4..7 = _3_m(3..6) +copy_2_slots_unmasked $8..9 = _3_m(7..8) +copy_4_immutables_unmasked $10..13 = i27..30 [0xC0000000 (-2.0), 0xC0800000 (-4.0), 0xC0800000 (-4.0), 0xC0800000 (-4.0)] +copy_4_immutables_unmasked $14..17 = i31..34 [0xC0000000 (-2.0), 0xC0800000 (-4.0), 0xC0800000 (-4.0), 0xC0800000 (-4.0)] +copy_immutable_unmasked $18 = i35 [0xC0000000 (-2.0)] cmpeq_n_floats $1..9 = equal($1..9, $10..18) bitwise_and_4_ints $2..5 &= $6..9 bitwise_and_2_ints $2..3 &= $4..5 @@ -103,17 +215,16 @@ shuffle $0..8 = ($0..8)[1 0 0 0 1 0 0 0 1] copy_4_slots_unmasked _3_m(0..3) = $0..3 copy_4_slots_unmasked _3_m(4..7) = $4..7 copy_slot_unmasked _3_m(8) = $8 -copy_4_slots_unmasked $9..12 = _1_splat_4(0..3) -copy_4_slots_unmasked $13..16 = _1_splat_4(4..7) -copy_slot_unmasked $17 = _1_splat_4(8) +copy_4_immutables_unmasked $9..12 = i0..3 [0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked $13..16 = i4..7 [0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_immutable_unmasked $17 = i8 [0x40800000 (4.0)] div_n_floats $0..8 /= $9..17 copy_4_slots_unmasked _3_m(0..3) = $0..3 copy_4_slots_unmasked _3_m(4..7) = $4..7 copy_slot_unmasked _3_m(8) = $8 -copy_slot_unmasked $0 = _0_ok -copy_4_slots_unmasked $1..4 = _3_m(0..3) -copy_4_slots_unmasked $5..8 = _3_m(4..7) -copy_slot_unmasked $9 = _3_m(8) +copy_4_slots_unmasked $0..3 = _0_ok, _3_m(0..2) +copy_4_slots_unmasked $4..7 = _3_m(3..6) +copy_2_slots_unmasked $8..9 = _3_m(7..8) copy_constant $10 = 0 copy_constant $11 = 0x3F000000 (0.5) shuffle $10..18 = ($10..18)[1 0 0 0 1 0 0 0 1] @@ -124,9 +235,9 @@ bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_slot_unmasked _0_ok = $0 -copy_4_slots_unmasked _3_m(0..3) = _1_splat_4(0..3) -copy_4_slots_unmasked _3_m(4..7) = _1_splat_4(4..7) -copy_slot_unmasked _3_m(8) = _1_splat_4(8) +copy_4_immutables_unmasked _3_m(0..3) = i0..3 [0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked _3_m(4..7) = i4..7 [0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_immutable_unmasked _3_m(8) = i8 [0x40800000 (4.0)] copy_4_slots_unmasked $0..3 = _3_m(0..3) copy_4_slots_unmasked $4..7 = _3_m(4..7) copy_slot_unmasked $8 = _3_m(8) @@ -137,15 +248,12 @@ add_n_floats $0..8 += $9..17 copy_4_slots_unmasked _3_m(0..3) = $0..3 copy_4_slots_unmasked _3_m(4..7) = $4..7 copy_slot_unmasked _3_m(8) = $8 -copy_slot_unmasked $0 = _0_ok -copy_4_slots_unmasked $1..4 = _3_m(0..3) -copy_4_slots_unmasked $5..8 = _3_m(4..7) -copy_slot_unmasked $9 = _3_m(8) -copy_constant $10 = 0x40C00000 (6.0) -splat_3_constants $11..13 = 0x40800000 (4.0) -copy_constant $14 = 0x40C00000 (6.0) -splat_3_constants $15..17 = 0x40800000 (4.0) -copy_constant $18 = 0x40C00000 (6.0) +copy_4_slots_unmasked $0..3 = _0_ok, _3_m(0..2) +copy_4_slots_unmasked $4..7 = _3_m(3..6) +copy_2_slots_unmasked $8..9 = _3_m(7..8) +copy_4_immutables_unmasked $10..13 = i18..21 [0x40C00000 (6.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked $14..17 = i22..25 [0x40C00000 (6.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_immutable_unmasked $18 = i26 [0x40C00000 (6.0)] cmpeq_n_floats $1..9 = equal($1..9, $10..18) bitwise_and_4_ints $2..5 &= $6..9 bitwise_and_2_ints $2..3 &= $4..5 @@ -153,9 +261,9 @@ bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_slot_unmasked _0_ok = $0 -copy_4_slots_unmasked _3_m(0..3) = _1_splat_4(0..3) -copy_4_slots_unmasked _3_m(4..7) = _1_splat_4(4..7) -copy_slot_unmasked _3_m(8) = _1_splat_4(8) +copy_4_immutables_unmasked _3_m(0..3) = i0..3 [0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked _3_m(4..7) = i4..7 [0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_immutable_unmasked _3_m(8) = i8 [0x40800000 (4.0)] copy_4_slots_unmasked $0..3 = _3_m(0..3) copy_4_slots_unmasked $4..7 = _3_m(4..7) copy_slot_unmasked $8 = _3_m(8) @@ -166,15 +274,12 @@ sub_n_floats $0..8 -= $9..17 copy_4_slots_unmasked _3_m(0..3) = $0..3 copy_4_slots_unmasked _3_m(4..7) = $4..7 copy_slot_unmasked _3_m(8) = $8 -copy_slot_unmasked $0 = _0_ok -copy_4_slots_unmasked $1..4 = _3_m(0..3) -copy_4_slots_unmasked $5..8 = _3_m(4..7) -copy_slot_unmasked $9 = _3_m(8) -copy_constant $10 = 0x40000000 (2.0) -splat_3_constants $11..13 = 0x40800000 (4.0) -copy_constant $14 = 0x40000000 (2.0) -splat_3_constants $15..17 = 0x40800000 (4.0) -copy_constant $18 = 0x40000000 (2.0) +copy_4_slots_unmasked $0..3 = _0_ok, _3_m(0..2) +copy_4_slots_unmasked $4..7 = _3_m(3..6) +copy_2_slots_unmasked $8..9 = _3_m(7..8) +copy_4_immutables_unmasked $10..13 = i36..39 [0x40000000 (2.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked $14..17 = i40..43 [0x40000000 (2.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_immutable_unmasked $18 = i44 [0x40000000 (2.0)] cmpeq_n_floats $1..9 = equal($1..9, $10..18) bitwise_and_4_ints $2..5 &= $6..9 bitwise_and_2_ints $2..3 &= $4..5 @@ -182,26 +287,25 @@ bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_slot_unmasked _0_ok = $0 -copy_4_slots_unmasked _3_m(0..3) = _1_splat_4(0..3) -copy_4_slots_unmasked _3_m(4..7) = _1_splat_4(4..7) -copy_slot_unmasked _3_m(8) = _1_splat_4(8) +copy_4_immutables_unmasked _3_m(0..3) = i0..3 [0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked _3_m(4..7) = i4..7 [0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_immutable_unmasked _3_m(8) = i8 [0x40800000 (4.0)] copy_4_slots_unmasked $0..3 = _3_m(0..3) copy_4_slots_unmasked $4..7 = _3_m(4..7) copy_slot_unmasked $8 = _3_m(8) -copy_4_slots_unmasked $9..12 = _2_splat_2(0..3) -copy_4_slots_unmasked $13..16 = _2_splat_2(4..7) -copy_slot_unmasked $17 = _2_splat_2(8) +copy_4_immutables_unmasked $9..12 = i9..12 [0x40000000 (2.0), 0x40000000 (2.0), 0x40000000 (2.0), 0x40000000 (2.0)] +copy_4_immutables_unmasked $13..16 = i13..16 [0x40000000 (2.0), 0x40000000 (2.0), 0x40000000 (2.0), 0x40000000 (2.0)] +copy_immutable_unmasked $17 = i17 [0x40000000 (2.0)] div_n_floats $0..8 /= $9..17 copy_4_slots_unmasked _3_m(0..3) = $0..3 copy_4_slots_unmasked _3_m(4..7) = $4..7 copy_slot_unmasked _3_m(8) = $8 -copy_slot_unmasked $0 = _0_ok -copy_4_slots_unmasked $1..4 = _3_m(0..3) -copy_4_slots_unmasked $5..8 = _3_m(4..7) -copy_slot_unmasked $9 = _3_m(8) -splat_4_constants $10..13 = 0x40000000 (2.0) -splat_4_constants $14..17 = 0x40000000 (2.0) -copy_constant $18 = 0x40000000 (2.0) +copy_4_slots_unmasked $0..3 = _0_ok, _3_m(0..2) +copy_4_slots_unmasked $4..7 = _3_m(3..6) +copy_2_slots_unmasked $8..9 = _3_m(7..8) +copy_4_immutables_unmasked $10..13 = i9..12 [0x40000000 (2.0), 0x40000000 (2.0), 0x40000000 (2.0), 0x40000000 (2.0)] +copy_4_immutables_unmasked $14..17 = i13..16 [0x40000000 (2.0), 0x40000000 (2.0), 0x40000000 (2.0), 0x40000000 (2.0)] +copy_immutable_unmasked $18 = i17 [0x40000000 (2.0)] cmpeq_n_floats $1..9 = equal($1..9, $10..18) bitwise_and_4_ints $2..5 &= $6..9 bitwise_and_2_ints $2..3 &= $4..5 @@ -209,42 +313,18 @@ bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_slot_unmasked _0_ok = $0 -copy_constant _4_m(0) = 0x3F800000 (1.0) -copy_constant _4_m(1) = 0x40000000 (2.0) -copy_constant _4_m(2) = 0x40400000 (3.0) -copy_constant _4_m(3) = 0x40800000 (4.0) -copy_constant _4_m(4) = 0x40A00000 (5.0) -copy_constant _4_m(5) = 0x40C00000 (6.0) -copy_constant _4_m(6) = 0x40E00000 (7.0) -copy_constant _4_m(7) = 0x41000000 (8.0) -copy_constant _4_m(8) = 0x41100000 (9.0) -copy_constant _4_m(9) = 0x41200000 (10.0) -copy_constant _4_m(10) = 0x41300000 (11.0) -copy_constant _4_m(11) = 0x41400000 (12.0) -copy_constant _4_m(12) = 0x41500000 (13.0) -copy_constant _4_m(13) = 0x41600000 (14.0) -copy_constant _4_m(14) = 0x41700000 (15.0) -copy_constant _4_m(15) = 0x41800000 (16.0) +copy_4_immutables_unmasked _4_m(0..3) = i45..48 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked _4_m(4..7) = i49..52 [0x40A00000 (5.0), 0x40C00000 (6.0), 0x40E00000 (7.0), 0x41000000 (8.0)] +copy_4_immutables_unmasked _4_m(8..11) = i53..56 [0x41100000 (9.0), 0x41200000 (10.0), 0x41300000 (11.0), 0x41400000 (12.0)] +copy_4_immutables_unmasked _4_m(12..15) = i57..60 [0x41500000 (13.0), 0x41600000 (14.0), 0x41700000 (15.0), 0x41800000 (16.0)] copy_4_slots_unmasked $0..3 = _4_m(0..3) copy_4_slots_unmasked $4..7 = _4_m(4..7) copy_4_slots_unmasked $8..11 = _4_m(8..11) copy_4_slots_unmasked $12..15 = _4_m(12..15) -copy_constant $16 = 0x41800000 (16.0) -copy_constant $17 = 0x41700000 (15.0) -copy_constant $18 = 0x41600000 (14.0) -copy_constant $19 = 0x41500000 (13.0) -copy_constant $20 = 0x41400000 (12.0) -copy_constant $21 = 0x41300000 (11.0) -copy_constant $22 = 0x41200000 (10.0) -copy_constant $23 = 0x41100000 (9.0) -copy_constant $24 = 0x41000000 (8.0) -copy_constant $25 = 0x40E00000 (7.0) -copy_constant $26 = 0x40C00000 (6.0) -copy_constant $27 = 0x40A00000 (5.0) -copy_constant $28 = 0x40800000 (4.0) -copy_constant $29 = 0x40400000 (3.0) -copy_constant $30 = 0x40000000 (2.0) -copy_constant $31 = 0x3F800000 (1.0) +copy_4_immutables_unmasked $16..19 = i61..64 [0x41800000 (16.0), 0x41700000 (15.0), 0x41600000 (14.0), 0x41500000 (13.0)] +copy_4_immutables_unmasked $20..23 = i65..68 [0x41400000 (12.0), 0x41300000 (11.0), 0x41200000 (10.0), 0x41100000 (9.0)] +copy_4_immutables_unmasked $24..27 = i69..72 [0x41000000 (8.0), 0x40E00000 (7.0), 0x40C00000 (6.0), 0x40A00000 (5.0)] +copy_4_immutables_unmasked $28..31 = i73..76 [0x40800000 (4.0), 0x40400000 (3.0), 0x40000000 (2.0), 0x3F800000 (1.0)] add_n_floats $0..15 += $16..31 copy_4_slots_unmasked _4_m(0..3) = $0..3 copy_4_slots_unmasked _4_m(4..7) = $4..7 @@ -255,10 +335,10 @@ copy_4_slots_unmasked $1..4 = _4_m(0..3) copy_4_slots_unmasked $5..8 = _4_m(4..7) copy_4_slots_unmasked $9..12 = _4_m(8..11) copy_4_slots_unmasked $13..16 = _4_m(12..15) -splat_4_constants $17..20 = 0x41880000 (17.0) -splat_4_constants $21..24 = 0x41880000 (17.0) -splat_4_constants $25..28 = 0x41880000 (17.0) -splat_4_constants $29..32 = 0x41880000 (17.0) +copy_4_immutables_unmasked $17..20 = i77..80 [0x41880000 (17.0), 0x41880000 (17.0), 0x41880000 (17.0), 0x41880000 (17.0)] +copy_4_immutables_unmasked $21..24 = i81..84 [0x41880000 (17.0), 0x41880000 (17.0), 0x41880000 (17.0), 0x41880000 (17.0)] +copy_4_immutables_unmasked $25..28 = i85..88 [0x41880000 (17.0), 0x41880000 (17.0), 0x41880000 (17.0), 0x41880000 (17.0)] +copy_4_immutables_unmasked $29..32 = i89..92 [0x41880000 (17.0), 0x41880000 (17.0), 0x41880000 (17.0), 0x41880000 (17.0)] cmpeq_n_floats $1..16 = equal($1..16, $17..32) bitwise_and_4_ints $9..12 &= $13..16 bitwise_and_4_ints $5..8 &= $9..12 @@ -267,89 +347,54 @@ bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_slot_unmasked _0_ok = $0 -copy_constant _5_m(0) = 0x41200000 (10.0) -copy_constant _5_m(1) = 0x41A00000 (20.0) -copy_constant _5_m(2) = 0x41F00000 (30.0) -copy_constant _5_m(3) = 0x42200000 (40.0) +copy_4_immutables_unmasked _5_m = i93..96 [0x41200000 (10.0), 0x41A00000 (20.0), 0x41F00000 (30.0), 0x42200000 (40.0)] copy_4_slots_unmasked $0..3 = _5_m -copy_constant $4 = 0x3F800000 (1.0) -copy_constant $5 = 0x40000000 (2.0) -copy_constant $6 = 0x40400000 (3.0) -copy_constant $7 = 0x40800000 (4.0) +copy_4_immutables_unmasked $4..7 = i45..48 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] sub_4_floats $0..3 -= $4..7 copy_4_slots_unmasked _5_m = $0..3 copy_slot_unmasked $0 = _0_ok copy_4_slots_unmasked $1..4 = _5_m -copy_constant $5 = 0x41100000 (9.0) -copy_constant $6 = 0x41900000 (18.0) -copy_constant $7 = 0x41D80000 (27.0) -copy_constant $8 = 0x42100000 (36.0) +copy_4_immutables_unmasked $5..8 = i97..100 [0x41100000 (9.0), 0x41900000 (18.0), 0x41D80000 (27.0), 0x42100000 (36.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_slot_unmasked _0_ok = $0 -copy_constant _6_m(0) = 0x40000000 (2.0) -copy_constant _6_m(1) = 0x40800000 (4.0) -copy_constant _6_m(2) = 0x40C00000 (6.0) -copy_constant _6_m(3) = 0x41000000 (8.0) +copy_4_immutables_unmasked _6_m = i101..104 [0x40000000 (2.0), 0x40800000 (4.0), 0x40C00000 (6.0), 0x41000000 (8.0)] copy_4_slots_unmasked $0..3 = _6_m -splat_3_constants $4..6 = 0x40000000 (2.0) -copy_constant $7 = 0x40800000 (4.0) +copy_4_immutables_unmasked $4..7 = i105..108 [0x40000000 (2.0), 0x40000000 (2.0), 0x40000000 (2.0), 0x40800000 (4.0)] div_4_floats $0..3 /= $4..7 copy_4_slots_unmasked _6_m = $0..3 copy_slot_unmasked $0 = _0_ok copy_4_slots_unmasked $1..4 = _6_m -copy_constant $5 = 0x3F800000 (1.0) -copy_constant $6 = 0x40000000 (2.0) -copy_constant $7 = 0x40400000 (3.0) -copy_constant $8 = 0x40000000 (2.0) +copy_4_immutables_unmasked $5..8 = i109..112 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40000000 (2.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_slot_unmasked _0_ok = $0 -copy_constant _7_m(0) = 0x3F800000 (1.0) -copy_constant _7_m(1) = 0x40000000 (2.0) -copy_constant _7_m(2) = 0x40E00000 (7.0) -copy_constant _7_m(3) = 0x40800000 (4.0) +copy_4_immutables_unmasked _7_m = i113..116 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40E00000 (7.0), 0x40800000 (4.0)] copy_4_slots_unmasked $4..7 = _7_m -copy_constant $8 = 0x40400000 (3.0) -copy_constant $9 = 0x40A00000 (5.0) -copy_constant $10 = 0x40400000 (3.0) -copy_constant $11 = 0x40000000 (2.0) +copy_4_immutables_unmasked $8..11 = i117..120 [0x40400000 (3.0), 0x40A00000 (5.0), 0x40400000 (3.0), 0x40000000 (2.0)] matrix_multiply_2 mat2x2($0..3) = mat2x2($4..7) * mat2x2($8..11) copy_4_slots_unmasked _7_m = $0..3 copy_slot_unmasked $0 = _0_ok copy_4_slots_unmasked $1..4 = _7_m -copy_constant $5 = 0x42180000 (38.0) -copy_constant $6 = 0x41D00000 (26.0) -copy_constant $7 = 0x41880000 (17.0) -copy_constant $8 = 0x41600000 (14.0) +copy_4_immutables_unmasked $5..8 = i121..124 [0x42180000 (38.0), 0x41D00000 (26.0), 0x41880000 (17.0), 0x41600000 (14.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_slot_unmasked _0_ok = $0 -copy_constant _8_m(0) = 0x41200000 (10.0) -copy_constant _8_m(1) = 0x40800000 (4.0) -copy_constant _8_m(2) = 0x40000000 (2.0) -copy_constant _8_m(3) = 0x41A00000 (20.0) -copy_constant _8_m(4) = 0x40A00000 (5.0) -copy_constant _8_m(5) = 0x40400000 (3.0) -copy_constant _8_m(6) = 0x41200000 (10.0) -copy_constant _8_m(7) = 0x40C00000 (6.0) -copy_constant _8_m(8) = 0x40A00000 (5.0) +copy_4_immutables_unmasked _8_m(0..3) = i125..128 [0x41200000 (10.0), 0x40800000 (4.0), 0x40000000 (2.0), 0x41A00000 (20.0)] +copy_4_immutables_unmasked _8_m(4..7) = i129..132 [0x40A00000 (5.0), 0x40400000 (3.0), 0x41200000 (10.0), 0x40C00000 (6.0)] +copy_immutable_unmasked _8_m(8) = i133 [0x40A00000 (5.0)] copy_4_slots_unmasked $9..12 = _8_m(0..3) copy_4_slots_unmasked $13..16 = _8_m(4..7) copy_slot_unmasked $17 = _8_m(8) -splat_2_constants $18..19 = 0x40400000 (3.0) -copy_constant $20 = 0x40800000 (4.0) -copy_constant $21 = 0x40000000 (2.0) -copy_constant $22 = 0x40400000 (3.0) -splat_2_constants $23..24 = 0x40800000 (4.0) -copy_constant $25 = 0x41100000 (9.0) -copy_constant $26 = 0x40000000 (2.0) +copy_4_immutables_unmasked $18..21 = i134..137 [0x40400000 (3.0), 0x40400000 (3.0), 0x40800000 (4.0), 0x40000000 (2.0)] +copy_4_immutables_unmasked $22..25 = i138..141 [0x40400000 (3.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x41100000 (9.0)] +copy_immutable_unmasked $26 = i142 [0x40000000 (2.0)] matrix_multiply_3 mat3x3($0..8) = mat3x3($9..17) * mat3x3($18..26) copy_4_slots_unmasked _8_m(0..3) = $0..3 copy_4_slots_unmasked _8_m(4..7) = $4..7 @@ -358,15 +403,9 @@ copy_slot_unmasked $0 = _0_ok copy_4_slots_unmasked $1..4 = _8_m(0..3) copy_4_slots_unmasked $5..8 = _8_m(4..7) copy_slot_unmasked $9 = _8_m(8) -copy_constant $10 = 0x43020000 (130.0) -copy_constant $11 = 0x424C0000 (51.0) -copy_constant $12 = 0x420C0000 (35.0) -copy_constant $13 = 0x42F00000 (120.0) -copy_constant $14 = 0x423C0000 (47.0) -copy_constant $15 = 0x42040000 (33.0) -copy_constant $16 = 0x43700000 (240.0) -copy_constant $17 = 0x42920000 (73.0) -copy_constant $18 = 0x42340000 (45.0) +copy_4_immutables_unmasked $10..13 = i143..146 [0x43020000 (130.0), 0x424C0000 (51.0), 0x420C0000 (35.0), 0x42F00000 (120.0)] +copy_4_immutables_unmasked $14..17 = i147..150 [0x423C0000 (47.0), 0x42040000 (33.0), 0x43700000 (240.0), 0x42920000 (73.0)] +copy_immutable_unmasked $18 = i151 [0x42340000 (45.0)] cmpeq_n_floats $1..9 = equal($1..9, $10..18) bitwise_and_4_ints $2..5 &= $6..9 bitwise_and_2_ints $2..3 &= $4..5 @@ -378,7 +417,7 @@ store_condition_mask $34 = CondMask copy_slot_unmasked $35 = _0_ok copy_constant $0 = 0 merge_condition_mask CondMask = $34 & $35 -branch_if_no_lanes_active branch_if_no_lanes_active +340 (label 1 at #683) +branch_if_no_lanes_active branch_if_no_lanes_active +261 (label 1 at #525) copy_constant ok = 0xFFFFFFFF copy_constant $1 = 0 copy_constant $2 = 0x40000000 (2.0) @@ -386,22 +425,19 @@ shuffle $1..9 = ($1..9)[1 0 0 0 1 0 0 0 1] copy_4_slots_unmasked m(0..3) = $1..4 copy_4_slots_unmasked m(4..7) = $5..8 copy_slot_unmasked m(8) = $9 -copy_4_slots_unmasked $10..13 = splat_4(0..3) -copy_4_slots_unmasked $14..17 = splat_4(4..7) -copy_slot_unmasked $18 = splat_4(8) +copy_4_immutables_unmasked $10..13 = i0..3 [0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked $14..17 = i4..7 [0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_immutable_unmasked $18 = i8 [0x40800000 (4.0)] add_n_floats $1..9 += $10..18 copy_4_slots_masked m(0..3) = Mask($1..4) copy_4_slots_masked m(4..7) = Mask($5..8) copy_slot_masked m(8) = Mask($9) -copy_slot_unmasked $1 = ok -copy_4_slots_unmasked $2..5 = m(0..3) -copy_4_slots_unmasked $6..9 = m(4..7) -copy_slot_unmasked $10 = m(8) -copy_constant $11 = 0x40C00000 (6.0) -splat_3_constants $12..14 = 0x40800000 (4.0) -copy_constant $15 = 0x40C00000 (6.0) -splat_3_constants $16..18 = 0x40800000 (4.0) -copy_constant $19 = 0x40C00000 (6.0) +copy_4_slots_unmasked $1..4 = ok, m(0..2) +copy_4_slots_unmasked $5..8 = m(3..6) +copy_2_slots_unmasked $9..10 = m(7..8) +copy_4_immutables_unmasked $11..14 = i18..21 [0x40C00000 (6.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked $15..18 = i22..25 [0x40C00000 (6.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_immutable_unmasked $19 = i26 [0x40C00000 (6.0)] cmpeq_n_floats $2..10 = equal($2..10, $11..19) bitwise_and_4_ints $3..6 &= $7..10 bitwise_and_2_ints $3..4 &= $5..6 @@ -415,22 +451,19 @@ shuffle $1..9 = ($1..9)[1 0 0 0 1 0 0 0 1] copy_4_slots_masked m(0..3) = Mask($1..4) copy_4_slots_masked m(4..7) = Mask($5..8) copy_slot_masked m(8) = Mask($9) -copy_4_slots_unmasked $10..13 = splat_4(0..3) -copy_4_slots_unmasked $14..17 = splat_4(4..7) -copy_slot_unmasked $18 = splat_4(8) +copy_4_immutables_unmasked $10..13 = i0..3 [0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked $14..17 = i4..7 [0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_immutable_unmasked $18 = i8 [0x40800000 (4.0)] sub_n_floats $1..9 -= $10..18 copy_4_slots_masked m(0..3) = Mask($1..4) copy_4_slots_masked m(4..7) = Mask($5..8) copy_slot_masked m(8) = Mask($9) -copy_slot_unmasked $1 = ok -copy_4_slots_unmasked $2..5 = m(0..3) -copy_4_slots_unmasked $6..9 = m(4..7) -copy_slot_unmasked $10 = m(8) -copy_constant $11 = 0xC0000000 (-2.0) -splat_3_constants $12..14 = 0xC0800000 (-4.0) -copy_constant $15 = 0xC0000000 (-2.0) -splat_3_constants $16..18 = 0xC0800000 (-4.0) -copy_constant $19 = 0xC0000000 (-2.0) +copy_4_slots_unmasked $1..4 = ok, m(0..2) +copy_4_slots_unmasked $5..8 = m(3..6) +copy_2_slots_unmasked $9..10 = m(7..8) +copy_4_immutables_unmasked $11..14 = i27..30 [0xC0000000 (-2.0), 0xC0800000 (-4.0), 0xC0800000 (-4.0), 0xC0800000 (-4.0)] +copy_4_immutables_unmasked $15..18 = i31..34 [0xC0000000 (-2.0), 0xC0800000 (-4.0), 0xC0800000 (-4.0), 0xC0800000 (-4.0)] +copy_immutable_unmasked $19 = i35 [0xC0000000 (-2.0)] cmpeq_n_floats $2..10 = equal($2..10, $11..19) bitwise_and_4_ints $3..6 &= $7..10 bitwise_and_2_ints $3..4 &= $5..6 @@ -444,17 +477,16 @@ shuffle $1..9 = ($1..9)[1 0 0 0 1 0 0 0 1] copy_4_slots_masked m(0..3) = Mask($1..4) copy_4_slots_masked m(4..7) = Mask($5..8) copy_slot_masked m(8) = Mask($9) -copy_4_slots_unmasked $10..13 = splat_4(0..3) -copy_4_slots_unmasked $14..17 = splat_4(4..7) -copy_slot_unmasked $18 = splat_4(8) +copy_4_immutables_unmasked $10..13 = i0..3 [0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked $14..17 = i4..7 [0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_immutable_unmasked $18 = i8 [0x40800000 (4.0)] div_n_floats $1..9 /= $10..18 copy_4_slots_masked m(0..3) = Mask($1..4) copy_4_slots_masked m(4..7) = Mask($5..8) copy_slot_masked m(8) = Mask($9) -copy_slot_unmasked $1 = ok -copy_4_slots_unmasked $2..5 = m(0..3) -copy_4_slots_unmasked $6..9 = m(4..7) -copy_slot_unmasked $10 = m(8) +copy_4_slots_unmasked $1..4 = ok, m(0..2) +copy_4_slots_unmasked $5..8 = m(3..6) +copy_2_slots_unmasked $9..10 = m(7..8) copy_constant $11 = 0 copy_constant $12 = 0x3F000000 (0.5) shuffle $11..19 = ($11..19)[1 0 0 0 1 0 0 0 1] @@ -465,9 +497,9 @@ bitwise_and_int $3 &= $4 bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 copy_slot_masked ok = Mask($1) -copy_4_slots_unmasked $1..4 = splat_4(0..3) -copy_4_slots_unmasked $5..8 = splat_4(4..7) -copy_slot_unmasked $9 = splat_4(8) +copy_4_immutables_unmasked $1..4 = i0..3 [0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked $5..8 = i4..7 [0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_immutable_unmasked $9 = i8 [0x40800000 (4.0)] copy_4_slots_masked m(0..3) = Mask($1..4) copy_4_slots_masked m(4..7) = Mask($5..8) copy_slot_masked m(8) = Mask($9) @@ -478,15 +510,12 @@ add_n_floats $1..9 += $10..18 copy_4_slots_masked m(0..3) = Mask($1..4) copy_4_slots_masked m(4..7) = Mask($5..8) copy_slot_masked m(8) = Mask($9) -copy_slot_unmasked $1 = ok -copy_4_slots_unmasked $2..5 = m(0..3) -copy_4_slots_unmasked $6..9 = m(4..7) -copy_slot_unmasked $10 = m(8) -copy_constant $11 = 0x40C00000 (6.0) -splat_3_constants $12..14 = 0x40800000 (4.0) -copy_constant $15 = 0x40C00000 (6.0) -splat_3_constants $16..18 = 0x40800000 (4.0) -copy_constant $19 = 0x40C00000 (6.0) +copy_4_slots_unmasked $1..4 = ok, m(0..2) +copy_4_slots_unmasked $5..8 = m(3..6) +copy_2_slots_unmasked $9..10 = m(7..8) +copy_4_immutables_unmasked $11..14 = i18..21 [0x40C00000 (6.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked $15..18 = i22..25 [0x40C00000 (6.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_immutable_unmasked $19 = i26 [0x40C00000 (6.0)] cmpeq_n_floats $2..10 = equal($2..10, $11..19) bitwise_and_4_ints $3..6 &= $7..10 bitwise_and_2_ints $3..4 &= $5..6 @@ -494,9 +523,9 @@ bitwise_and_int $3 &= $4 bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 copy_slot_masked ok = Mask($1) -copy_4_slots_unmasked $1..4 = splat_4(0..3) -copy_4_slots_unmasked $5..8 = splat_4(4..7) -copy_slot_unmasked $9 = splat_4(8) +copy_4_immutables_unmasked $1..4 = i0..3 [0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked $5..8 = i4..7 [0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_immutable_unmasked $9 = i8 [0x40800000 (4.0)] copy_4_slots_masked m(0..3) = Mask($1..4) copy_4_slots_masked m(4..7) = Mask($5..8) copy_slot_masked m(8) = Mask($9) @@ -507,15 +536,12 @@ sub_n_floats $1..9 -= $10..18 copy_4_slots_masked m(0..3) = Mask($1..4) copy_4_slots_masked m(4..7) = Mask($5..8) copy_slot_masked m(8) = Mask($9) -copy_slot_unmasked $1 = ok -copy_4_slots_unmasked $2..5 = m(0..3) -copy_4_slots_unmasked $6..9 = m(4..7) -copy_slot_unmasked $10 = m(8) -copy_constant $11 = 0x40000000 (2.0) -splat_3_constants $12..14 = 0x40800000 (4.0) -copy_constant $15 = 0x40000000 (2.0) -splat_3_constants $16..18 = 0x40800000 (4.0) -copy_constant $19 = 0x40000000 (2.0) +copy_4_slots_unmasked $1..4 = ok, m(0..2) +copy_4_slots_unmasked $5..8 = m(3..6) +copy_2_slots_unmasked $9..10 = m(7..8) +copy_4_immutables_unmasked $11..14 = i36..39 [0x40000000 (2.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked $15..18 = i40..43 [0x40000000 (2.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_immutable_unmasked $19 = i44 [0x40000000 (2.0)] cmpeq_n_floats $2..10 = equal($2..10, $11..19) bitwise_and_4_ints $3..6 &= $7..10 bitwise_and_2_ints $3..4 &= $5..6 @@ -523,27 +549,25 @@ bitwise_and_int $3 &= $4 bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 copy_slot_masked ok = Mask($1) -copy_4_slots_unmasked $1..4 = splat_4(0..3) -copy_4_slots_unmasked $5..8 = splat_4(4..7) -copy_slot_unmasked $9 = splat_4(8) +copy_4_immutables_unmasked $1..4 = i0..3 [0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked $5..8 = i4..7 [0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_immutable_unmasked $9 = i8 [0x40800000 (4.0)] copy_4_slots_masked m(0..3) = Mask($1..4) copy_4_slots_masked m(4..7) = Mask($5..8) copy_slot_masked m(8) = Mask($9) -copy_4_slots_unmasked $10..13 = splat_2(0..3) -copy_4_slots_unmasked $14..17 = splat_2(4..7) -copy_slot_unmasked $18 = splat_2(8) +copy_4_immutables_unmasked $10..13 = i9..12 [0x40000000 (2.0), 0x40000000 (2.0), 0x40000000 (2.0), 0x40000000 (2.0)] +copy_4_immutables_unmasked $14..17 = i13..16 [0x40000000 (2.0), 0x40000000 (2.0), 0x40000000 (2.0), 0x40000000 (2.0)] +copy_immutable_unmasked $18 = i17 [0x40000000 (2.0)] div_n_floats $1..9 /= $10..18 copy_4_slots_masked m(0..3) = Mask($1..4) copy_4_slots_masked m(4..7) = Mask($5..8) copy_slot_masked m(8) = Mask($9) -copy_slot_unmasked $1 = ok -stack_rewind -copy_4_slots_unmasked $2..5 = m(0..3) -copy_4_slots_unmasked $6..9 = m(4..7) -copy_slot_unmasked $10 = m(8) -splat_4_constants $11..14 = 0x40000000 (2.0) -splat_4_constants $15..18 = 0x40000000 (2.0) -copy_constant $19 = 0x40000000 (2.0) +copy_4_slots_unmasked $1..4 = ok, m(0..2) +copy_4_slots_unmasked $5..8 = m(3..6) +copy_2_slots_unmasked $9..10 = m(7..8) +copy_4_immutables_unmasked $11..14 = i9..12 [0x40000000 (2.0), 0x40000000 (2.0), 0x40000000 (2.0), 0x40000000 (2.0)] +copy_4_immutables_unmasked $15..18 = i13..16 [0x40000000 (2.0), 0x40000000 (2.0), 0x40000000 (2.0), 0x40000000 (2.0)] +copy_immutable_unmasked $19 = i17 [0x40000000 (2.0)] cmpeq_n_floats $2..10 = equal($2..10, $11..19) bitwise_and_4_ints $3..6 &= $7..10 bitwise_and_2_ints $3..4 &= $5..6 @@ -551,42 +575,18 @@ bitwise_and_int $3 &= $4 bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 copy_slot_masked ok = Mask($1) -copy_constant m₁(0) = 0x3F800000 (1.0) -copy_constant m₁(1) = 0x40000000 (2.0) -copy_constant m₁(2) = 0x40400000 (3.0) -copy_constant m₁(3) = 0x40800000 (4.0) -copy_constant m₁(4) = 0x40A00000 (5.0) -copy_constant m₁(5) = 0x40C00000 (6.0) -copy_constant m₁(6) = 0x40E00000 (7.0) -copy_constant m₁(7) = 0x41000000 (8.0) -copy_constant m₁(8) = 0x41100000 (9.0) -copy_constant m₁(9) = 0x41200000 (10.0) -copy_constant m₁(10) = 0x41300000 (11.0) -copy_constant m₁(11) = 0x41400000 (12.0) -copy_constant m₁(12) = 0x41500000 (13.0) -copy_constant m₁(13) = 0x41600000 (14.0) -copy_constant m₁(14) = 0x41700000 (15.0) -copy_constant m₁(15) = 0x41800000 (16.0) +copy_4_immutables_unmasked m₁(0..3) = i45..48 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked m₁(4..7) = i49..52 [0x40A00000 (5.0), 0x40C00000 (6.0), 0x40E00000 (7.0), 0x41000000 (8.0)] +copy_4_immutables_unmasked m₁(8..11) = i53..56 [0x41100000 (9.0), 0x41200000 (10.0), 0x41300000 (11.0), 0x41400000 (12.0)] +copy_4_immutables_unmasked m₁(12..15) = i57..60 [0x41500000 (13.0), 0x41600000 (14.0), 0x41700000 (15.0), 0x41800000 (16.0)] copy_4_slots_unmasked $1..4 = m₁(0..3) copy_4_slots_unmasked $5..8 = m₁(4..7) copy_4_slots_unmasked $9..12 = m₁(8..11) copy_4_slots_unmasked $13..16 = m₁(12..15) -copy_constant $17 = 0x41800000 (16.0) -copy_constant $18 = 0x41700000 (15.0) -copy_constant $19 = 0x41600000 (14.0) -copy_constant $20 = 0x41500000 (13.0) -copy_constant $21 = 0x41400000 (12.0) -copy_constant $22 = 0x41300000 (11.0) -copy_constant $23 = 0x41200000 (10.0) -copy_constant $24 = 0x41100000 (9.0) -copy_constant $25 = 0x41000000 (8.0) -copy_constant $26 = 0x40E00000 (7.0) -copy_constant $27 = 0x40C00000 (6.0) -copy_constant $28 = 0x40A00000 (5.0) -copy_constant $29 = 0x40800000 (4.0) -copy_constant $30 = 0x40400000 (3.0) -copy_constant $31 = 0x40000000 (2.0) -copy_constant $32 = 0x3F800000 (1.0) +copy_4_immutables_unmasked $17..20 = i61..64 [0x41800000 (16.0), 0x41700000 (15.0), 0x41600000 (14.0), 0x41500000 (13.0)] +copy_4_immutables_unmasked $21..24 = i65..68 [0x41400000 (12.0), 0x41300000 (11.0), 0x41200000 (10.0), 0x41100000 (9.0)] +copy_4_immutables_unmasked $25..28 = i69..72 [0x41000000 (8.0), 0x40E00000 (7.0), 0x40C00000 (6.0), 0x40A00000 (5.0)] +copy_4_immutables_unmasked $29..32 = i73..76 [0x40800000 (4.0), 0x40400000 (3.0), 0x40000000 (2.0), 0x3F800000 (1.0)] add_n_floats $1..16 += $17..32 copy_4_slots_masked m₁(0..3) = Mask($1..4) copy_4_slots_masked m₁(4..7) = Mask($5..8) @@ -597,10 +597,10 @@ copy_4_slots_unmasked $2..5 = m₁(0..3) copy_4_slots_unmasked $6..9 = m₁(4..7) copy_4_slots_unmasked $10..13 = m₁(8..11) copy_4_slots_unmasked $14..17 = m₁(12..15) -splat_4_constants $18..21 = 0x41880000 (17.0) -splat_4_constants $22..25 = 0x41880000 (17.0) -splat_4_constants $26..29 = 0x41880000 (17.0) -splat_4_constants $30..33 = 0x41880000 (17.0) +copy_4_immutables_unmasked $18..21 = i77..80 [0x41880000 (17.0), 0x41880000 (17.0), 0x41880000 (17.0), 0x41880000 (17.0)] +copy_4_immutables_unmasked $22..25 = i81..84 [0x41880000 (17.0), 0x41880000 (17.0), 0x41880000 (17.0), 0x41880000 (17.0)] +copy_4_immutables_unmasked $26..29 = i85..88 [0x41880000 (17.0), 0x41880000 (17.0), 0x41880000 (17.0), 0x41880000 (17.0)] +copy_4_immutables_unmasked $30..33 = i89..92 [0x41880000 (17.0), 0x41880000 (17.0), 0x41880000 (17.0), 0x41880000 (17.0)] cmpeq_n_floats $2..17 = equal($2..17, $18..33) bitwise_and_4_ints $10..13 &= $14..17 bitwise_and_4_ints $6..9 &= $10..13 @@ -609,89 +609,55 @@ bitwise_and_2_ints $2..3 &= $4..5 bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 copy_slot_masked ok = Mask($1) -copy_constant m₂(0) = 0x41200000 (10.0) -copy_constant m₂(1) = 0x41A00000 (20.0) -copy_constant m₂(2) = 0x41F00000 (30.0) -copy_constant m₂(3) = 0x42200000 (40.0) +copy_4_immutables_unmasked m₂ = i93..96 [0x41200000 (10.0), 0x41A00000 (20.0), 0x41F00000 (30.0), 0x42200000 (40.0)] copy_4_slots_unmasked $1..4 = m₂ -copy_constant $5 = 0x3F800000 (1.0) -copy_constant $6 = 0x40000000 (2.0) -copy_constant $7 = 0x40400000 (3.0) -copy_constant $8 = 0x40800000 (4.0) +copy_4_immutables_unmasked $5..8 = i45..48 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] sub_4_floats $1..4 -= $5..8 copy_4_slots_masked m₂ = Mask($1..4) copy_slot_unmasked $1 = ok copy_4_slots_unmasked $2..5 = m₂ -copy_constant $6 = 0x41100000 (9.0) -copy_constant $7 = 0x41900000 (18.0) -copy_constant $8 = 0x41D80000 (27.0) -copy_constant $9 = 0x42100000 (36.0) +copy_4_immutables_unmasked $6..9 = i97..100 [0x41100000 (9.0), 0x41900000 (18.0), 0x41D80000 (27.0), 0x42100000 (36.0)] cmpeq_4_floats $2..5 = equal($2..5, $6..9) bitwise_and_2_ints $2..3 &= $4..5 bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 copy_slot_masked ok = Mask($1) -copy_constant m₃(0) = 0x40000000 (2.0) -copy_constant m₃(1) = 0x40800000 (4.0) -copy_constant m₃(2) = 0x40C00000 (6.0) -copy_constant m₃(3) = 0x41000000 (8.0) +copy_4_immutables_unmasked m₃ = i101..104 [0x40000000 (2.0), 0x40800000 (4.0), 0x40C00000 (6.0), 0x41000000 (8.0)] copy_4_slots_unmasked $1..4 = m₃ -splat_3_constants $5..7 = 0x40000000 (2.0) -copy_constant $8 = 0x40800000 (4.0) +copy_4_immutables_unmasked $5..8 = i105..108 [0x40000000 (2.0), 0x40000000 (2.0), 0x40000000 (2.0), 0x40800000 (4.0)] div_4_floats $1..4 /= $5..8 copy_4_slots_masked m₃ = Mask($1..4) copy_slot_unmasked $1 = ok copy_4_slots_unmasked $2..5 = m₃ -copy_constant $6 = 0x3F800000 (1.0) -copy_constant $7 = 0x40000000 (2.0) -copy_constant $8 = 0x40400000 (3.0) -copy_constant $9 = 0x40000000 (2.0) +copy_4_immutables_unmasked $6..9 = i109..112 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40000000 (2.0)] cmpeq_4_floats $2..5 = equal($2..5, $6..9) bitwise_and_2_ints $2..3 &= $4..5 bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 copy_slot_masked ok = Mask($1) -copy_constant m₄(0) = 0x3F800000 (1.0) -copy_constant m₄(1) = 0x40000000 (2.0) -copy_constant m₄(2) = 0x40E00000 (7.0) -copy_constant m₄(3) = 0x40800000 (4.0) +copy_4_immutables_unmasked m₄ = i113..116 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40E00000 (7.0), 0x40800000 (4.0)] copy_4_slots_unmasked $5..8 = m₄ -copy_constant $9 = 0x40400000 (3.0) -copy_constant $10 = 0x40A00000 (5.0) -copy_constant $11 = 0x40400000 (3.0) -copy_constant $12 = 0x40000000 (2.0) +copy_4_immutables_unmasked $9..12 = i117..120 [0x40400000 (3.0), 0x40A00000 (5.0), 0x40400000 (3.0), 0x40000000 (2.0)] matrix_multiply_2 mat2x2($1..4) = mat2x2($5..8) * mat2x2($9..12) copy_4_slots_masked m₄ = Mask($1..4) copy_slot_unmasked $1 = ok copy_4_slots_unmasked $2..5 = m₄ -copy_constant $6 = 0x42180000 (38.0) -copy_constant $7 = 0x41D00000 (26.0) -copy_constant $8 = 0x41880000 (17.0) -copy_constant $9 = 0x41600000 (14.0) +copy_4_immutables_unmasked $6..9 = i121..124 [0x42180000 (38.0), 0x41D00000 (26.0), 0x41880000 (17.0), 0x41600000 (14.0)] cmpeq_4_floats $2..5 = equal($2..5, $6..9) bitwise_and_2_ints $2..3 &= $4..5 bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 copy_slot_masked ok = Mask($1) -copy_constant m₅(0) = 0x41200000 (10.0) -copy_constant m₅(1) = 0x40800000 (4.0) -copy_constant m₅(2) = 0x40000000 (2.0) -copy_constant m₅(3) = 0x41A00000 (20.0) -copy_constant m₅(4) = 0x40A00000 (5.0) -copy_constant m₅(5) = 0x40400000 (3.0) -copy_constant m₅(6) = 0x41200000 (10.0) -copy_constant m₅(7) = 0x40C00000 (6.0) -copy_constant m₅(8) = 0x40A00000 (5.0) +copy_4_immutables_unmasked m₅(0..3) = i125..128 [0x41200000 (10.0), 0x40800000 (4.0), 0x40000000 (2.0), 0x41A00000 (20.0)] +copy_4_immutables_unmasked m₅(4..7) = i129..132 [0x40A00000 (5.0), 0x40400000 (3.0), 0x41200000 (10.0), 0x40C00000 (6.0)] +copy_immutable_unmasked m₅(8) = i133 [0x40A00000 (5.0)] copy_4_slots_unmasked $10..13 = m₅(0..3) copy_4_slots_unmasked $14..17 = m₅(4..7) copy_slot_unmasked $18 = m₅(8) -splat_2_constants $19..20 = 0x40400000 (3.0) -copy_constant $21 = 0x40800000 (4.0) -copy_constant $22 = 0x40000000 (2.0) -copy_constant $23 = 0x40400000 (3.0) -splat_2_constants $24..25 = 0x40800000 (4.0) -copy_constant $26 = 0x41100000 (9.0) -copy_constant $27 = 0x40000000 (2.0) +copy_4_immutables_unmasked $19..22 = i134..137 [0x40400000 (3.0), 0x40400000 (3.0), 0x40800000 (4.0), 0x40000000 (2.0)] +copy_4_immutables_unmasked $23..26 = i138..141 [0x40400000 (3.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x41100000 (9.0)] +copy_immutable_unmasked $27 = i142 [0x40000000 (2.0)] +stack_rewind matrix_multiply_3 mat3x3($1..9) = mat3x3($10..18) * mat3x3($19..27) copy_4_slots_masked m₅(0..3) = Mask($1..4) copy_4_slots_masked m₅(4..7) = Mask($5..8) @@ -700,15 +666,9 @@ copy_slot_unmasked $1 = ok copy_4_slots_unmasked $2..5 = m₅(0..3) copy_4_slots_unmasked $6..9 = m₅(4..7) copy_slot_unmasked $10 = m₅(8) -copy_constant $11 = 0x43020000 (130.0) -copy_constant $12 = 0x424C0000 (51.0) -copy_constant $13 = 0x420C0000 (35.0) -copy_constant $14 = 0x42F00000 (120.0) -copy_constant $15 = 0x423C0000 (47.0) -copy_constant $16 = 0x42040000 (33.0) -copy_constant $17 = 0x43700000 (240.0) -copy_constant $18 = 0x42920000 (73.0) -copy_constant $19 = 0x42340000 (45.0) +copy_4_immutables_unmasked $11..14 = i143..146 [0x43020000 (130.0), 0x424C0000 (51.0), 0x420C0000 (35.0), 0x42F00000 (120.0)] +copy_4_immutables_unmasked $15..18 = i147..150 [0x423C0000 (47.0), 0x42040000 (33.0), 0x43700000 (240.0), 0x42920000 (73.0)] +copy_immutable_unmasked $19 = i151 [0x42340000 (45.0)] cmpeq_n_floats $2..10 = equal($2..10, $11..19) bitwise_and_4_ints $3..6 &= $7..10 bitwise_and_2_ints $3..4 &= $5..6 diff --git a/tests/sksl/shared/MatrixOpEqualsES2.wgsl b/tests/sksl/shared/MatrixOpEqualsES2.wgsl new file mode 100644 index 000000000000..d725a60eb731 --- /dev/null +++ b/tests/sksl/shared/MatrixOpEqualsES2.wgsl @@ -0,0 +1,176 @@ +### Compilation failed: + +error: :29:13 error: no matching overload for operator / (mat3x3, mat3x3) + +4 candidate operators: + operator / (T, T) -> T where: T is abstract-float, abstract-int, f32, i32, u32 or f16 + operator / (vecN, T) -> vecN where: T is abstract-float, abstract-int, f32, i32, u32 or f16 + operator / (T, vecN) -> vecN where: T is abstract-float, abstract-int, f32, i32, u32 or f16 + operator / (vecN, vecN) -> vecN where: T is abstract-float, abstract-int, f32, i32, u32 or f16 + + m = m / splat_4; + ^ + + +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorRed: vec4, + colorGreen: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn test_matrix_op_matrix_half_b() -> bool { + { + var ok: bool = true; + { + const splat_4: mat3x3 = mat3x3(4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0); + const splat_2: mat3x3 = mat3x3(2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0); + var m: mat3x3 = mat3x3(2.0, 0.0, 0.0, 0.0, 2.0, 0.0, 0.0, 0.0, 2.0); + m = m + splat_4; + let _skTemp0 = mat3x3(6.0, 4.0, 4.0, 4.0, 6.0, 4.0, 4.0, 4.0, 6.0); + ok = ok && (all(m[0] == _skTemp0[0]) && all(m[1] == _skTemp0[1]) && all(m[2] == _skTemp0[2])); + m = mat3x3(2.0, 0.0, 0.0, 0.0, 2.0, 0.0, 0.0, 0.0, 2.0); + m = m - splat_4; + let _skTemp1 = mat3x3(-2.0, -4.0, -4.0, -4.0, -2.0, -4.0, -4.0, -4.0, -2.0); + ok = ok && (all(m[0] == _skTemp1[0]) && all(m[1] == _skTemp1[1]) && all(m[2] == _skTemp1[2])); + m = mat3x3(2.0, 0.0, 0.0, 0.0, 2.0, 0.0, 0.0, 0.0, 2.0); + m = m / splat_4; + let _skTemp2 = mat3x3(0.5, 0.0, 0.0, 0.0, 0.5, 0.0, 0.0, 0.0, 0.5); + ok = ok && (all(m[0] == _skTemp2[0]) && all(m[1] == _skTemp2[1]) && all(m[2] == _skTemp2[2])); + m = splat_4; + m = m + mat3x3(2.0, 0.0, 0.0, 0.0, 2.0, 0.0, 0.0, 0.0, 2.0); + let _skTemp3 = mat3x3(6.0, 4.0, 4.0, 4.0, 6.0, 4.0, 4.0, 4.0, 6.0); + ok = ok && (all(m[0] == _skTemp3[0]) && all(m[1] == _skTemp3[1]) && all(m[2] == _skTemp3[2])); + m = splat_4; + m = m - mat3x3(2.0, 0.0, 0.0, 0.0, 2.0, 0.0, 0.0, 0.0, 2.0); + let _skTemp4 = mat3x3(2.0, 4.0, 4.0, 4.0, 2.0, 4.0, 4.0, 4.0, 2.0); + ok = ok && (all(m[0] == _skTemp4[0]) && all(m[1] == _skTemp4[1]) && all(m[2] == _skTemp4[2])); + m = splat_4; + m = m / splat_2; + let _skTemp5 = mat3x3(2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0); + ok = ok && (all(m[0] == _skTemp5[0]) && all(m[1] == _skTemp5[1]) && all(m[2] == _skTemp5[2])); + } + { + var m: mat4x4 = mat4x4(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0); + m = m + mat4x4(16.0, 15.0, 14.0, 13.0, 12.0, 11.0, 10.0, 9.0, 8.0, 7.0, 6.0, 5.0, 4.0, 3.0, 2.0, 1.0); + let _skTemp6 = mat4x4(17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0); + ok = ok && (all(m[0] == _skTemp6[0]) && all(m[1] == _skTemp6[1]) && all(m[2] == _skTemp6[2]) && all(m[3] == _skTemp6[3])); + } + { + var m: mat2x2 = mat2x2(10.0, 20.0, 30.0, 40.0); + m = m - mat2x2(1.0, 2.0, 3.0, 4.0); + let _skTemp7 = mat2x2(9.0, 18.0, 27.0, 36.0); + ok = ok && (all(m[0] == _skTemp7[0]) && all(m[1] == _skTemp7[1])); + } + { + var m: mat2x2 = mat2x2(2.0, 4.0, 6.0, 8.0); + m = m / mat2x2(2.0, 2.0, 2.0, 4.0); + let _skTemp8 = mat2x2(1.0, 2.0, 3.0, 2.0); + ok = ok && (all(m[0] == _skTemp8[0]) && all(m[1] == _skTemp8[1])); + } + { + var m: mat2x2 = mat2x2(1.0, 2.0, 7.0, 4.0); + m = m * mat2x2(3.0, 5.0, 3.0, 2.0); + let _skTemp9 = mat2x2(38.0, 26.0, 17.0, 14.0); + ok = ok && (all(m[0] == _skTemp9[0]) && all(m[1] == _skTemp9[1])); + } + { + var m: mat3x3 = mat3x3(10.0, 4.0, 2.0, 20.0, 5.0, 3.0, 10.0, 6.0, 5.0); + m = m * mat3x3(3.0, 3.0, 4.0, 2.0, 3.0, 4.0, 4.0, 9.0, 2.0); + let _skTemp10 = mat3x3(130.0, 51.0, 35.0, 120.0, 47.0, 33.0, 240.0, 73.0, 45.0); + ok = ok && (all(m[0] == _skTemp10[0]) && all(m[1] == _skTemp10[1]) && all(m[2] == _skTemp10[2])); + } + return ok; + } +} +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var _0_ok: bool = true; + { + const _1_splat_4: mat3x3 = mat3x3(4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0); + const _2_splat_2: mat3x3 = mat3x3(2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0); + var _3_m: mat3x3 = mat3x3(2.0, 0.0, 0.0, 0.0, 2.0, 0.0, 0.0, 0.0, 2.0); + _3_m = _3_m + _1_splat_4; + let _skTemp11 = mat3x3(6.0, 4.0, 4.0, 4.0, 6.0, 4.0, 4.0, 4.0, 6.0); + _0_ok = _0_ok && (all(_3_m[0] == _skTemp11[0]) && all(_3_m[1] == _skTemp11[1]) && all(_3_m[2] == _skTemp11[2])); + _3_m = mat3x3(2.0, 0.0, 0.0, 0.0, 2.0, 0.0, 0.0, 0.0, 2.0); + _3_m = _3_m - _1_splat_4; + let _skTemp12 = mat3x3(-2.0, -4.0, -4.0, -4.0, -2.0, -4.0, -4.0, -4.0, -2.0); + _0_ok = _0_ok && (all(_3_m[0] == _skTemp12[0]) && all(_3_m[1] == _skTemp12[1]) && all(_3_m[2] == _skTemp12[2])); + _3_m = mat3x3(2.0, 0.0, 0.0, 0.0, 2.0, 0.0, 0.0, 0.0, 2.0); + _3_m = _3_m / _1_splat_4; + let _skTemp13 = mat3x3(0.5, 0.0, 0.0, 0.0, 0.5, 0.0, 0.0, 0.0, 0.5); + _0_ok = _0_ok && (all(_3_m[0] == _skTemp13[0]) && all(_3_m[1] == _skTemp13[1]) && all(_3_m[2] == _skTemp13[2])); + _3_m = _1_splat_4; + _3_m = _3_m + mat3x3(2.0, 0.0, 0.0, 0.0, 2.0, 0.0, 0.0, 0.0, 2.0); + let _skTemp14 = mat3x3(6.0, 4.0, 4.0, 4.0, 6.0, 4.0, 4.0, 4.0, 6.0); + _0_ok = _0_ok && (all(_3_m[0] == _skTemp14[0]) && all(_3_m[1] == _skTemp14[1]) && all(_3_m[2] == _skTemp14[2])); + _3_m = _1_splat_4; + _3_m = _3_m - mat3x3(2.0, 0.0, 0.0, 0.0, 2.0, 0.0, 0.0, 0.0, 2.0); + let _skTemp15 = mat3x3(2.0, 4.0, 4.0, 4.0, 2.0, 4.0, 4.0, 4.0, 2.0); + _0_ok = _0_ok && (all(_3_m[0] == _skTemp15[0]) && all(_3_m[1] == _skTemp15[1]) && all(_3_m[2] == _skTemp15[2])); + _3_m = _1_splat_4; + _3_m = _3_m / _2_splat_2; + let _skTemp16 = mat3x3(2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0); + _0_ok = _0_ok && (all(_3_m[0] == _skTemp16[0]) && all(_3_m[1] == _skTemp16[1]) && all(_3_m[2] == _skTemp16[2])); + } + { + var _4_m: mat4x4 = mat4x4(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0); + _4_m = _4_m + mat4x4(16.0, 15.0, 14.0, 13.0, 12.0, 11.0, 10.0, 9.0, 8.0, 7.0, 6.0, 5.0, 4.0, 3.0, 2.0, 1.0); + let _skTemp17 = mat4x4(17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0); + _0_ok = _0_ok && (all(_4_m[0] == _skTemp17[0]) && all(_4_m[1] == _skTemp17[1]) && all(_4_m[2] == _skTemp17[2]) && all(_4_m[3] == _skTemp17[3])); + } + { + var _5_m: mat2x2 = mat2x2(10.0, 20.0, 30.0, 40.0); + _5_m = _5_m - mat2x2(1.0, 2.0, 3.0, 4.0); + let _skTemp18 = mat2x2(9.0, 18.0, 27.0, 36.0); + _0_ok = _0_ok && (all(_5_m[0] == _skTemp18[0]) && all(_5_m[1] == _skTemp18[1])); + } + { + var _6_m: mat2x2 = mat2x2(2.0, 4.0, 6.0, 8.0); + _6_m = _6_m / mat2x2(2.0, 2.0, 2.0, 4.0); + let _skTemp19 = mat2x2(1.0, 2.0, 3.0, 2.0); + _0_ok = _0_ok && (all(_6_m[0] == _skTemp19[0]) && all(_6_m[1] == _skTemp19[1])); + } + { + var _7_m: mat2x2 = mat2x2(1.0, 2.0, 7.0, 4.0); + _7_m = _7_m * mat2x2(3.0, 5.0, 3.0, 2.0); + let _skTemp20 = mat2x2(38.0, 26.0, 17.0, 14.0); + _0_ok = _0_ok && (all(_7_m[0] == _skTemp20[0]) && all(_7_m[1] == _skTemp20[1])); + } + { + var _8_m: mat3x3 = mat3x3(10.0, 4.0, 2.0, 20.0, 5.0, 3.0, 10.0, 6.0, 5.0); + _8_m = _8_m * mat3x3(3.0, 3.0, 4.0, 2.0, 3.0, 4.0, 4.0, 9.0, 2.0); + let _skTemp21 = mat3x3(130.0, 51.0, 35.0, 120.0, 47.0, 33.0, 240.0, 73.0, 45.0); + _0_ok = _0_ok && (all(_8_m[0] == _skTemp21[0]) && all(_8_m[1] == _skTemp21[1]) && all(_8_m[2] == _skTemp21[2])); + } + var _skTemp22: vec4; + var _skTemp23: bool; + if _0_ok { + let _skTemp24 = test_matrix_op_matrix_half_b(); + _skTemp23 = _skTemp24; + } else { + _skTemp23 = false; + } + if _skTemp23 { + _skTemp22 = _globalUniforms.colorGreen; + } else { + _skTemp22 = _globalUniforms.colorRed; + } + return _skTemp22; + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} + +1 error diff --git a/tests/sksl/shared/MatrixOpEqualsES3.asm.frag b/tests/sksl/shared/MatrixOpEqualsES3.asm.frag index 02c11949f06c..db0618013482 100644 --- a/tests/sksl/shared/MatrixOpEqualsES3.asm.frag +++ b/tests/sksl/shared/MatrixOpEqualsES3.asm.frag @@ -1,728 +1,728 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorRed" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpName %_entrypoint_v "_entrypoint_v" -OpName %test_matrix_op_matrix_half_b "test_matrix_op_matrix_half_b" -OpName %ok "ok" -OpName %splat_4 "splat_4" -OpName %m "m" -OpName %splat_4_0 "splat_4" -OpName %m_0 "m" -OpName %m_1 "m" -OpName %m_2 "m" -OpName %m_3 "m" -OpName %m_4 "m" -OpName %main "main" -OpName %_0_ok "_0_ok" -OpName %_1_splat_4 "_1_splat_4" -OpName %_2_m "_2_m" -OpName %_3_splat_4 "_3_splat_4" -OpName %_4_m "_4_m" -OpName %_5_m "_5_m" -OpName %_6_m "_6_m" -OpName %_7_m "_7_m" -OpName %_8_m "_8_m" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %11 Binding 0 -OpDecorate %11 DescriptorSet 0 -OpDecorate %splat_4 RelaxedPrecision -OpDecorate %m RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %62 RelaxedPrecision -OpDecorate %63 RelaxedPrecision -OpDecorate %64 RelaxedPrecision -OpDecorate %73 RelaxedPrecision -OpDecorate %75 RelaxedPrecision -OpDecorate %78 RelaxedPrecision -OpDecorate %82 RelaxedPrecision -OpDecorate %83 RelaxedPrecision -OpDecorate %84 RelaxedPrecision -OpDecorate %85 RelaxedPrecision -OpDecorate %92 RelaxedPrecision -OpDecorate %94 RelaxedPrecision -OpDecorate %97 RelaxedPrecision -OpDecorate %splat_4_0 RelaxedPrecision -OpDecorate %m_0 RelaxedPrecision -OpDecorate %111 RelaxedPrecision -OpDecorate %112 RelaxedPrecision -OpDecorate %113 RelaxedPrecision -OpDecorate %120 RelaxedPrecision -OpDecorate %122 RelaxedPrecision -OpDecorate %126 RelaxedPrecision -OpDecorate %127 RelaxedPrecision -OpDecorate %128 RelaxedPrecision -OpDecorate %134 RelaxedPrecision -OpDecorate %136 RelaxedPrecision -OpDecorate %142 RelaxedPrecision -OpDecorate %143 RelaxedPrecision -OpDecorate %144 RelaxedPrecision -OpDecorate %147 RelaxedPrecision -OpDecorate %149 RelaxedPrecision -OpDecorate %m_1 RelaxedPrecision -OpDecorate %179 RelaxedPrecision -OpDecorate %180 RelaxedPrecision -OpDecorate %181 RelaxedPrecision -OpDecorate %182 RelaxedPrecision -OpDecorate %183 RelaxedPrecision -OpDecorate %189 RelaxedPrecision -OpDecorate %191 RelaxedPrecision -OpDecorate %194 RelaxedPrecision -OpDecorate %197 RelaxedPrecision -OpDecorate %m_2 RelaxedPrecision -OpDecorate %221 RelaxedPrecision -OpDecorate %222 RelaxedPrecision -OpDecorate %223 RelaxedPrecision -OpDecorate %224 RelaxedPrecision -OpDecorate %225 RelaxedPrecision -OpDecorate %240 RelaxedPrecision -OpDecorate %242 RelaxedPrecision -OpDecorate %245 RelaxedPrecision -OpDecorate %248 RelaxedPrecision -OpDecorate %m_3 RelaxedPrecision -OpDecorate %260 RelaxedPrecision -OpDecorate %261 RelaxedPrecision -OpDecorate %262 RelaxedPrecision -OpDecorate %269 RelaxedPrecision -OpDecorate %271 RelaxedPrecision -OpDecorate %m_4 RelaxedPrecision -OpDecorate %283 RelaxedPrecision -OpDecorate %294 RelaxedPrecision -OpDecorate %295 RelaxedPrecision -OpDecorate %297 RelaxedPrecision -OpDecorate %298 RelaxedPrecision -OpDecorate %465 RelaxedPrecision -OpDecorate %468 RelaxedPrecision -OpDecorate %469 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorRed" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpName %_entrypoint_v "_entrypoint_v" + OpName %test_matrix_op_matrix_half_b "test_matrix_op_matrix_half_b" + OpName %ok "ok" + OpName %splat_4 "splat_4" + OpName %m "m" + OpName %splat_4_0 "splat_4" + OpName %m_0 "m" + OpName %m_1 "m" + OpName %m_2 "m" + OpName %m_3 "m" + OpName %m_4 "m" + OpName %main "main" + OpName %_0_ok "_0_ok" + OpName %_1_splat_4 "_1_splat_4" + OpName %_2_m "_2_m" + OpName %_3_splat_4 "_3_splat_4" + OpName %_4_m "_4_m" + OpName %_5_m "_5_m" + OpName %_6_m "_6_m" + OpName %_7_m "_7_m" + OpName %_8_m "_8_m" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %11 Binding 0 + OpDecorate %11 DescriptorSet 0 + OpDecorate %splat_4 RelaxedPrecision + OpDecorate %m RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %62 RelaxedPrecision + OpDecorate %63 RelaxedPrecision + OpDecorate %64 RelaxedPrecision + OpDecorate %73 RelaxedPrecision + OpDecorate %75 RelaxedPrecision + OpDecorate %78 RelaxedPrecision + OpDecorate %82 RelaxedPrecision + OpDecorate %83 RelaxedPrecision + OpDecorate %84 RelaxedPrecision + OpDecorate %85 RelaxedPrecision + OpDecorate %92 RelaxedPrecision + OpDecorate %94 RelaxedPrecision + OpDecorate %97 RelaxedPrecision + OpDecorate %splat_4_0 RelaxedPrecision + OpDecorate %m_0 RelaxedPrecision + OpDecorate %111 RelaxedPrecision + OpDecorate %112 RelaxedPrecision + OpDecorate %113 RelaxedPrecision + OpDecorate %120 RelaxedPrecision + OpDecorate %122 RelaxedPrecision + OpDecorate %126 RelaxedPrecision + OpDecorate %127 RelaxedPrecision + OpDecorate %128 RelaxedPrecision + OpDecorate %134 RelaxedPrecision + OpDecorate %136 RelaxedPrecision + OpDecorate %142 RelaxedPrecision + OpDecorate %143 RelaxedPrecision + OpDecorate %144 RelaxedPrecision + OpDecorate %147 RelaxedPrecision + OpDecorate %149 RelaxedPrecision + OpDecorate %m_1 RelaxedPrecision + OpDecorate %179 RelaxedPrecision + OpDecorate %180 RelaxedPrecision + OpDecorate %181 RelaxedPrecision + OpDecorate %182 RelaxedPrecision + OpDecorate %183 RelaxedPrecision + OpDecorate %189 RelaxedPrecision + OpDecorate %191 RelaxedPrecision + OpDecorate %194 RelaxedPrecision + OpDecorate %197 RelaxedPrecision + OpDecorate %m_2 RelaxedPrecision + OpDecorate %221 RelaxedPrecision + OpDecorate %222 RelaxedPrecision + OpDecorate %223 RelaxedPrecision + OpDecorate %224 RelaxedPrecision + OpDecorate %225 RelaxedPrecision + OpDecorate %240 RelaxedPrecision + OpDecorate %242 RelaxedPrecision + OpDecorate %245 RelaxedPrecision + OpDecorate %248 RelaxedPrecision + OpDecorate %m_3 RelaxedPrecision + OpDecorate %260 RelaxedPrecision + OpDecorate %261 RelaxedPrecision + OpDecorate %262 RelaxedPrecision + OpDecorate %269 RelaxedPrecision + OpDecorate %271 RelaxedPrecision + OpDecorate %m_4 RelaxedPrecision + OpDecorate %283 RelaxedPrecision + OpDecorate %294 RelaxedPrecision + OpDecorate %295 RelaxedPrecision + OpDecorate %297 RelaxedPrecision + OpDecorate %298 RelaxedPrecision + OpDecorate %465 RelaxedPrecision + OpDecorate %468 RelaxedPrecision + OpDecorate %469 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%16 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%20 = OpConstantComposite %v2float %float_0 %float_0 + %11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %16 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %20 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%24 = OpTypeFunction %bool + %24 = OpTypeFunction %bool %_ptr_Function_bool = OpTypePointer Function %bool -%true = OpConstantTrue %bool + %true = OpConstantTrue %bool %mat3v2float = OpTypeMatrix %v2float 3 %_ptr_Function_mat3v2float = OpTypePointer Function %mat3v2float -%float_4 = OpConstant %float 4 -%33 = OpConstantComposite %v2float %float_4 %float_4 -%34 = OpConstantComposite %mat3v2float %33 %33 %33 -%float_2 = OpConstant %float 2 -%37 = OpConstantComposite %v2float %float_2 %float_0 -%38 = OpConstantComposite %v2float %float_0 %float_2 -%39 = OpConstantComposite %mat3v2float %37 %38 %20 -%false = OpConstantFalse %bool -%float_6 = OpConstant %float 6 -%48 = OpConstantComposite %v2float %float_6 %float_4 -%49 = OpConstantComposite %v2float %float_4 %float_6 -%50 = OpConstantComposite %mat3v2float %48 %49 %33 -%v2bool = OpTypeVector %bool 2 -%float_n2 = OpConstant %float -2 -%float_n4 = OpConstant %float -4 -%69 = OpConstantComposite %v2float %float_n2 %float_n4 -%70 = OpConstantComposite %v2float %float_n4 %float_n2 -%71 = OpConstantComposite %v2float %float_n4 %float_n4 -%72 = OpConstantComposite %mat3v2float %69 %70 %71 -%float_0_5 = OpConstant %float 0.5 -%89 = OpConstantComposite %v2float %float_0_5 %float_0 -%90 = OpConstantComposite %v2float %float_0 %float_0_5 -%91 = OpConstantComposite %mat3v2float %89 %90 %20 -%v3float = OpTypeVector %float 3 + %float_4 = OpConstant %float 4 + %33 = OpConstantComposite %v2float %float_4 %float_4 + %34 = OpConstantComposite %mat3v2float %33 %33 %33 + %float_2 = OpConstant %float 2 + %37 = OpConstantComposite %v2float %float_2 %float_0 + %38 = OpConstantComposite %v2float %float_0 %float_2 + %39 = OpConstantComposite %mat3v2float %37 %38 %20 + %false = OpConstantFalse %bool + %float_6 = OpConstant %float 6 + %48 = OpConstantComposite %v2float %float_6 %float_4 + %49 = OpConstantComposite %v2float %float_4 %float_6 + %50 = OpConstantComposite %mat3v2float %48 %49 %33 + %v2bool = OpTypeVector %bool 2 + %float_n2 = OpConstant %float -2 + %float_n4 = OpConstant %float -4 + %69 = OpConstantComposite %v2float %float_n2 %float_n4 + %70 = OpConstantComposite %v2float %float_n4 %float_n2 + %71 = OpConstantComposite %v2float %float_n4 %float_n4 + %72 = OpConstantComposite %mat3v2float %69 %70 %71 + %float_0_5 = OpConstant %float 0.5 + %89 = OpConstantComposite %v2float %float_0_5 %float_0 + %90 = OpConstantComposite %v2float %float_0 %float_0_5 + %91 = OpConstantComposite %mat3v2float %89 %90 %20 + %v3float = OpTypeVector %float 3 %mat2v3float = OpTypeMatrix %v3float 2 %_ptr_Function_mat2v3float = OpTypePointer Function %mat2v3float -%105 = OpConstantComposite %v3float %float_4 %float_4 %float_4 -%106 = OpConstantComposite %mat2v3float %105 %105 -%108 = OpConstantComposite %v3float %float_2 %float_0 %float_0 -%109 = OpConstantComposite %v3float %float_0 %float_2 %float_0 -%110 = OpConstantComposite %mat2v3float %108 %109 -%116 = OpConstantComposite %v3float %float_6 %float_4 %float_4 -%117 = OpConstantComposite %v3float %float_4 %float_6 %float_4 -%118 = OpConstantComposite %mat2v3float %116 %117 -%v3bool = OpTypeVector %bool 3 -%131 = OpConstantComposite %v3float %float_2 %float_4 %float_4 -%132 = OpConstantComposite %v3float %float_4 %float_2 %float_4 -%133 = OpConstantComposite %mat2v3float %131 %132 -%140 = OpConstantComposite %v3float %float_2 %float_2 %float_2 -%141 = OpConstantComposite %mat2v3float %140 %140 + %105 = OpConstantComposite %v3float %float_4 %float_4 %float_4 + %106 = OpConstantComposite %mat2v3float %105 %105 + %108 = OpConstantComposite %v3float %float_2 %float_0 %float_0 + %109 = OpConstantComposite %v3float %float_0 %float_2 %float_0 + %110 = OpConstantComposite %mat2v3float %108 %109 + %116 = OpConstantComposite %v3float %float_6 %float_4 %float_4 + %117 = OpConstantComposite %v3float %float_4 %float_6 %float_4 + %118 = OpConstantComposite %mat2v3float %116 %117 + %v3bool = OpTypeVector %bool 3 + %131 = OpConstantComposite %v3float %float_2 %float_4 %float_4 + %132 = OpConstantComposite %v3float %float_4 %float_2 %float_4 + %133 = OpConstantComposite %mat2v3float %131 %132 + %140 = OpConstantComposite %v3float %float_2 %float_2 %float_2 + %141 = OpConstantComposite %mat2v3float %140 %140 %mat4v3float = OpTypeMatrix %v3float 4 %_ptr_Function_mat4v3float = OpTypePointer Function %mat4v3float -%float_1 = OpConstant %float 1 -%float_3 = OpConstant %float 3 -%float_5 = OpConstant %float 5 -%float_7 = OpConstant %float 7 -%float_8 = OpConstant %float 8 -%float_9 = OpConstant %float 9 -%float_10 = OpConstant %float 10 -%float_11 = OpConstant %float 11 -%float_12 = OpConstant %float 12 -%165 = OpConstantComposite %v3float %float_1 %float_2 %float_3 -%166 = OpConstantComposite %v3float %float_4 %float_5 %float_6 -%167 = OpConstantComposite %v3float %float_7 %float_8 %float_9 -%168 = OpConstantComposite %v3float %float_10 %float_11 %float_12 -%169 = OpConstantComposite %mat4v3float %165 %166 %167 %168 -%float_16 = OpConstant %float 16 -%float_15 = OpConstant %float 15 -%float_14 = OpConstant %float 14 -%float_13 = OpConstant %float 13 -%174 = OpConstantComposite %v3float %float_16 %float_15 %float_14 -%175 = OpConstantComposite %v3float %float_13 %float_12 %float_11 -%176 = OpConstantComposite %v3float %float_10 %float_9 %float_8 -%177 = OpConstantComposite %v3float %float_7 %float_6 %float_5 -%178 = OpConstantComposite %mat4v3float %174 %175 %176 %177 -%float_17 = OpConstant %float 17 -%187 = OpConstantComposite %v3float %float_17 %float_17 %float_17 -%188 = OpConstantComposite %mat4v3float %187 %187 %187 %187 + %float_1 = OpConstant %float 1 + %float_3 = OpConstant %float 3 + %float_5 = OpConstant %float 5 + %float_7 = OpConstant %float 7 + %float_8 = OpConstant %float 8 + %float_9 = OpConstant %float 9 + %float_10 = OpConstant %float 10 + %float_11 = OpConstant %float 11 + %float_12 = OpConstant %float 12 + %165 = OpConstantComposite %v3float %float_1 %float_2 %float_3 + %166 = OpConstantComposite %v3float %float_4 %float_5 %float_6 + %167 = OpConstantComposite %v3float %float_7 %float_8 %float_9 + %168 = OpConstantComposite %v3float %float_10 %float_11 %float_12 + %169 = OpConstantComposite %mat4v3float %165 %166 %167 %168 + %float_16 = OpConstant %float 16 + %float_15 = OpConstant %float 15 + %float_14 = OpConstant %float 14 + %float_13 = OpConstant %float 13 + %174 = OpConstantComposite %v3float %float_16 %float_15 %float_14 + %175 = OpConstantComposite %v3float %float_13 %float_12 %float_11 + %176 = OpConstantComposite %v3float %float_10 %float_9 %float_8 + %177 = OpConstantComposite %v3float %float_7 %float_6 %float_5 + %178 = OpConstantComposite %mat4v3float %174 %175 %176 %177 + %float_17 = OpConstant %float 17 + %187 = OpConstantComposite %v3float %float_17 %float_17 %float_17 + %188 = OpConstantComposite %mat4v3float %187 %187 %187 %187 %mat4v2float = OpTypeMatrix %v2float 4 %_ptr_Function_mat4v2float = OpTypePointer Function %mat4v2float -%float_20 = OpConstant %float 20 -%float_30 = OpConstant %float 30 -%float_40 = OpConstant %float 40 -%float_50 = OpConstant %float 50 -%float_60 = OpConstant %float 60 -%float_70 = OpConstant %float 70 -%float_80 = OpConstant %float 80 -%211 = OpConstantComposite %v2float %float_10 %float_20 -%212 = OpConstantComposite %v2float %float_30 %float_40 -%213 = OpConstantComposite %v2float %float_50 %float_60 -%214 = OpConstantComposite %v2float %float_70 %float_80 -%215 = OpConstantComposite %mat4v2float %211 %212 %213 %214 -%216 = OpConstantComposite %v2float %float_1 %float_2 -%217 = OpConstantComposite %v2float %float_3 %float_4 -%218 = OpConstantComposite %v2float %float_5 %float_6 -%219 = OpConstantComposite %v2float %float_7 %float_8 -%220 = OpConstantComposite %mat4v2float %216 %217 %218 %219 -%float_18 = OpConstant %float 18 -%float_27 = OpConstant %float 27 -%float_36 = OpConstant %float 36 -%float_45 = OpConstant %float 45 -%float_54 = OpConstant %float 54 -%float_63 = OpConstant %float 63 -%float_72 = OpConstant %float 72 -%235 = OpConstantComposite %v2float %float_9 %float_18 -%236 = OpConstantComposite %v2float %float_27 %float_36 -%237 = OpConstantComposite %v2float %float_45 %float_54 -%238 = OpConstantComposite %v2float %float_63 %float_72 -%239 = OpConstantComposite %mat4v2float %235 %236 %237 %238 + %float_20 = OpConstant %float 20 + %float_30 = OpConstant %float 30 + %float_40 = OpConstant %float 40 + %float_50 = OpConstant %float 50 + %float_60 = OpConstant %float 60 + %float_70 = OpConstant %float 70 + %float_80 = OpConstant %float 80 + %211 = OpConstantComposite %v2float %float_10 %float_20 + %212 = OpConstantComposite %v2float %float_30 %float_40 + %213 = OpConstantComposite %v2float %float_50 %float_60 + %214 = OpConstantComposite %v2float %float_70 %float_80 + %215 = OpConstantComposite %mat4v2float %211 %212 %213 %214 + %216 = OpConstantComposite %v2float %float_1 %float_2 + %217 = OpConstantComposite %v2float %float_3 %float_4 + %218 = OpConstantComposite %v2float %float_5 %float_6 + %219 = OpConstantComposite %v2float %float_7 %float_8 + %220 = OpConstantComposite %mat4v2float %216 %217 %218 %219 + %float_18 = OpConstant %float 18 + %float_27 = OpConstant %float 27 + %float_36 = OpConstant %float 36 + %float_45 = OpConstant %float 45 + %float_54 = OpConstant %float 54 + %float_63 = OpConstant %float 63 + %float_72 = OpConstant %float 72 + %235 = OpConstantComposite %v2float %float_9 %float_18 + %236 = OpConstantComposite %v2float %float_27 %float_36 + %237 = OpConstantComposite %v2float %float_45 %float_54 + %238 = OpConstantComposite %v2float %float_63 %float_72 + %239 = OpConstantComposite %mat4v2float %235 %236 %237 %238 %mat2v4float = OpTypeMatrix %v4float 2 %_ptr_Function_mat2v4float = OpTypePointer Function %mat2v4float -%255 = OpConstantComposite %v4float %float_10 %float_20 %float_30 %float_40 -%256 = OpConstantComposite %mat2v4float %255 %255 -%257 = OpConstantComposite %v4float %float_10 %float_10 %float_10 %float_10 -%258 = OpConstantComposite %v4float %float_5 %float_5 %float_5 %float_5 -%259 = OpConstantComposite %mat2v4float %257 %258 -%265 = OpConstantComposite %v4float %float_1 %float_2 %float_3 %float_4 -%266 = OpConstantComposite %v4float %float_2 %float_4 %float_6 %float_8 -%267 = OpConstantComposite %mat2v4float %265 %266 -%v4bool = OpTypeVector %bool 4 -%276 = OpConstantComposite %v3float %float_7 %float_9 %float_11 -%277 = OpConstantComposite %v3float %float_8 %float_10 %float_12 -%278 = OpConstantComposite %mat2v3float %276 %277 -%279 = OpConstantComposite %v2float %float_1 %float_4 -%280 = OpConstantComposite %v2float %float_2 %float_5 + %255 = OpConstantComposite %v4float %float_10 %float_20 %float_30 %float_40 + %256 = OpConstantComposite %mat2v4float %255 %255 + %257 = OpConstantComposite %v4float %float_10 %float_10 %float_10 %float_10 + %258 = OpConstantComposite %v4float %float_5 %float_5 %float_5 %float_5 + %259 = OpConstantComposite %mat2v4float %257 %258 + %265 = OpConstantComposite %v4float %float_1 %float_2 %float_3 %float_4 + %266 = OpConstantComposite %v4float %float_2 %float_4 %float_6 %float_8 + %267 = OpConstantComposite %mat2v4float %265 %266 + %v4bool = OpTypeVector %bool 4 + %276 = OpConstantComposite %v3float %float_7 %float_9 %float_11 + %277 = OpConstantComposite %v3float %float_8 %float_10 %float_12 + %278 = OpConstantComposite %mat2v3float %276 %277 + %279 = OpConstantComposite %v2float %float_1 %float_4 + %280 = OpConstantComposite %v2float %float_2 %float_5 %mat2v2float = OpTypeMatrix %v2float 2 -%282 = OpConstantComposite %mat2v2float %279 %280 -%float_39 = OpConstant %float 39 -%float_49 = OpConstant %float 49 -%float_59 = OpConstant %float 59 -%float_68 = OpConstant %float 68 -%float_82 = OpConstant %float 82 -%291 = OpConstantComposite %v3float %float_39 %float_49 %float_59 -%292 = OpConstantComposite %v3float %float_54 %float_68 %float_82 -%293 = OpConstantComposite %mat2v3float %291 %292 -%302 = OpTypeFunction %v4float %_ptr_Function_v2float + %282 = OpConstantComposite %mat2v2float %279 %280 + %float_39 = OpConstant %float 39 + %float_49 = OpConstant %float 49 + %float_59 = OpConstant %float 59 + %float_68 = OpConstant %float 68 + %float_82 = OpConstant %float 82 + %291 = OpConstantComposite %v3float %float_39 %float_49 %float_59 + %292 = OpConstantComposite %v3float %float_54 %float_68 %float_82 + %293 = OpConstantComposite %mat2v3float %291 %292 + %302 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_1 = OpConstant %int 1 -%int_0 = OpConstant %int 0 + %int = OpTypeInt 32 1 + %int_1 = OpConstant %int 1 + %int_0 = OpConstant %int 0 %_entrypoint_v = OpFunction %void None %16 -%17 = OpLabel -%21 = OpVariable %_ptr_Function_v2float Function -OpStore %21 %20 -%23 = OpFunctionCall %v4float %main %21 -OpStore %sk_FragColor %23 -OpReturn -OpFunctionEnd + %17 = OpLabel + %21 = OpVariable %_ptr_Function_v2float Function + OpStore %21 %20 + %23 = OpFunctionCall %v4float %main %21 + OpStore %sk_FragColor %23 + OpReturn + OpFunctionEnd %test_matrix_op_matrix_half_b = OpFunction %bool None %24 -%25 = OpLabel -%ok = OpVariable %_ptr_Function_bool Function -%splat_4 = OpVariable %_ptr_Function_mat3v2float Function -%m = OpVariable %_ptr_Function_mat3v2float Function -%splat_4_0 = OpVariable %_ptr_Function_mat2v3float Function -%m_0 = OpVariable %_ptr_Function_mat2v3float Function -%m_1 = OpVariable %_ptr_Function_mat4v3float Function -%m_2 = OpVariable %_ptr_Function_mat4v2float Function -%m_3 = OpVariable %_ptr_Function_mat2v4float Function -%m_4 = OpVariable %_ptr_Function_mat2v3float Function -OpStore %ok %true -OpStore %splat_4 %34 -OpStore %m %39 -%40 = OpFAdd %v2float %37 %33 -%41 = OpFAdd %v2float %38 %33 -%42 = OpFAdd %v2float %20 %33 -%43 = OpCompositeConstruct %mat3v2float %40 %41 %42 -OpStore %m %43 -OpSelectionMerge %46 None -OpBranchConditional %true %45 %46 -%45 = OpLabel -%52 = OpFOrdEqual %v2bool %40 %48 -%53 = OpAll %bool %52 -%54 = OpFOrdEqual %v2bool %41 %49 -%55 = OpAll %bool %54 -%56 = OpLogicalAnd %bool %53 %55 -%57 = OpFOrdEqual %v2bool %42 %33 -%58 = OpAll %bool %57 -%59 = OpLogicalAnd %bool %56 %58 -OpBranch %46 -%46 = OpLabel -%60 = OpPhi %bool %false %25 %59 %45 -OpStore %ok %60 -OpStore %m %39 -%61 = OpFSub %v2float %37 %33 -%62 = OpFSub %v2float %38 %33 -%63 = OpFSub %v2float %20 %33 -%64 = OpCompositeConstruct %mat3v2float %61 %62 %63 -OpStore %m %64 -OpSelectionMerge %66 None -OpBranchConditional %60 %65 %66 -%65 = OpLabel -%73 = OpFOrdEqual %v2bool %61 %69 -%74 = OpAll %bool %73 -%75 = OpFOrdEqual %v2bool %62 %70 -%76 = OpAll %bool %75 -%77 = OpLogicalAnd %bool %74 %76 -%78 = OpFOrdEqual %v2bool %63 %71 -%79 = OpAll %bool %78 -%80 = OpLogicalAnd %bool %77 %79 -OpBranch %66 -%66 = OpLabel -%81 = OpPhi %bool %false %46 %80 %65 -OpStore %ok %81 -OpStore %m %39 -%82 = OpFDiv %v2float %37 %33 -%83 = OpFDiv %v2float %38 %33 -%84 = OpFDiv %v2float %20 %33 -%85 = OpCompositeConstruct %mat3v2float %82 %83 %84 -OpStore %m %85 -OpSelectionMerge %87 None -OpBranchConditional %81 %86 %87 -%86 = OpLabel -%92 = OpFOrdEqual %v2bool %82 %89 -%93 = OpAll %bool %92 -%94 = OpFOrdEqual %v2bool %83 %90 -%95 = OpAll %bool %94 -%96 = OpLogicalAnd %bool %93 %95 -%97 = OpFOrdEqual %v2bool %84 %20 -%98 = OpAll %bool %97 -%99 = OpLogicalAnd %bool %96 %98 -OpBranch %87 -%87 = OpLabel -%100 = OpPhi %bool %false %66 %99 %86 -OpStore %ok %100 -OpStore %splat_4_0 %106 -OpStore %m_0 %106 -%111 = OpFAdd %v3float %105 %108 -%112 = OpFAdd %v3float %105 %109 -%113 = OpCompositeConstruct %mat2v3float %111 %112 -OpStore %m_0 %113 -OpSelectionMerge %115 None -OpBranchConditional %100 %114 %115 -%114 = OpLabel -%120 = OpFOrdEqual %v3bool %111 %116 -%121 = OpAll %bool %120 -%122 = OpFOrdEqual %v3bool %112 %117 -%123 = OpAll %bool %122 -%124 = OpLogicalAnd %bool %121 %123 -OpBranch %115 -%115 = OpLabel -%125 = OpPhi %bool %false %87 %124 %114 -OpStore %ok %125 -OpStore %m_0 %106 -%126 = OpFSub %v3float %105 %108 -%127 = OpFSub %v3float %105 %109 -%128 = OpCompositeConstruct %mat2v3float %126 %127 -OpStore %m_0 %128 -OpSelectionMerge %130 None -OpBranchConditional %125 %129 %130 -%129 = OpLabel -%134 = OpFOrdEqual %v3bool %126 %131 -%135 = OpAll %bool %134 -%136 = OpFOrdEqual %v3bool %127 %132 -%137 = OpAll %bool %136 -%138 = OpLogicalAnd %bool %135 %137 -OpBranch %130 -%130 = OpLabel -%139 = OpPhi %bool %false %115 %138 %129 -OpStore %ok %139 -OpStore %m_0 %106 -%142 = OpFDiv %v3float %105 %140 -%143 = OpFDiv %v3float %105 %140 -%144 = OpCompositeConstruct %mat2v3float %142 %143 -OpStore %m_0 %144 -OpSelectionMerge %146 None -OpBranchConditional %139 %145 %146 -%145 = OpLabel -%147 = OpFOrdEqual %v3bool %142 %140 -%148 = OpAll %bool %147 -%149 = OpFOrdEqual %v3bool %143 %140 -%150 = OpAll %bool %149 -%151 = OpLogicalAnd %bool %148 %150 -OpBranch %146 -%146 = OpLabel -%152 = OpPhi %bool %false %130 %151 %145 -OpStore %ok %152 -OpStore %m_1 %169 -%179 = OpFAdd %v3float %165 %174 -%180 = OpFAdd %v3float %166 %175 -%181 = OpFAdd %v3float %167 %176 -%182 = OpFAdd %v3float %168 %177 -%183 = OpCompositeConstruct %mat4v3float %179 %180 %181 %182 -OpStore %m_1 %183 -OpSelectionMerge %185 None -OpBranchConditional %152 %184 %185 -%184 = OpLabel -%189 = OpFOrdEqual %v3bool %179 %187 -%190 = OpAll %bool %189 -%191 = OpFOrdEqual %v3bool %180 %187 -%192 = OpAll %bool %191 -%193 = OpLogicalAnd %bool %190 %192 -%194 = OpFOrdEqual %v3bool %181 %187 -%195 = OpAll %bool %194 -%196 = OpLogicalAnd %bool %193 %195 -%197 = OpFOrdEqual %v3bool %182 %187 -%198 = OpAll %bool %197 -%199 = OpLogicalAnd %bool %196 %198 -OpBranch %185 -%185 = OpLabel -%200 = OpPhi %bool %false %146 %199 %184 -OpStore %ok %200 -OpStore %m_2 %215 -%221 = OpFSub %v2float %211 %216 -%222 = OpFSub %v2float %212 %217 -%223 = OpFSub %v2float %213 %218 -%224 = OpFSub %v2float %214 %219 -%225 = OpCompositeConstruct %mat4v2float %221 %222 %223 %224 -OpStore %m_2 %225 -OpSelectionMerge %227 None -OpBranchConditional %200 %226 %227 -%226 = OpLabel -%240 = OpFOrdEqual %v2bool %221 %235 -%241 = OpAll %bool %240 -%242 = OpFOrdEqual %v2bool %222 %236 -%243 = OpAll %bool %242 -%244 = OpLogicalAnd %bool %241 %243 -%245 = OpFOrdEqual %v2bool %223 %237 -%246 = OpAll %bool %245 -%247 = OpLogicalAnd %bool %244 %246 -%248 = OpFOrdEqual %v2bool %224 %238 -%249 = OpAll %bool %248 -%250 = OpLogicalAnd %bool %247 %249 -OpBranch %227 -%227 = OpLabel -%251 = OpPhi %bool %false %185 %250 %226 -OpStore %ok %251 -OpStore %m_3 %256 -%260 = OpFDiv %v4float %255 %257 -%261 = OpFDiv %v4float %255 %258 -%262 = OpCompositeConstruct %mat2v4float %260 %261 -OpStore %m_3 %262 -OpSelectionMerge %264 None -OpBranchConditional %251 %263 %264 -%263 = OpLabel -%269 = OpFOrdEqual %v4bool %260 %265 -%270 = OpAll %bool %269 -%271 = OpFOrdEqual %v4bool %261 %266 -%272 = OpAll %bool %271 -%273 = OpLogicalAnd %bool %270 %272 -OpBranch %264 -%264 = OpLabel -%274 = OpPhi %bool %false %227 %273 %263 -OpStore %ok %274 -OpStore %m_4 %278 -%283 = OpMatrixTimesMatrix %mat2v3float %278 %282 -OpStore %m_4 %283 -OpSelectionMerge %285 None -OpBranchConditional %274 %284 %285 -%284 = OpLabel -%294 = OpCompositeExtract %v3float %283 0 -%295 = OpFOrdEqual %v3bool %294 %291 -%296 = OpAll %bool %295 -%297 = OpCompositeExtract %v3float %283 1 -%298 = OpFOrdEqual %v3bool %297 %292 -%299 = OpAll %bool %298 -%300 = OpLogicalAnd %bool %296 %299 -OpBranch %285 -%285 = OpLabel -%301 = OpPhi %bool %false %264 %300 %284 -OpStore %ok %301 -OpReturnValue %301 -OpFunctionEnd -%main = OpFunction %v4float None %302 -%303 = OpFunctionParameter %_ptr_Function_v2float -%304 = OpLabel -%_0_ok = OpVariable %_ptr_Function_bool Function -%_1_splat_4 = OpVariable %_ptr_Function_mat3v2float Function -%_2_m = OpVariable %_ptr_Function_mat3v2float Function -%_3_splat_4 = OpVariable %_ptr_Function_mat2v3float Function -%_4_m = OpVariable %_ptr_Function_mat2v3float Function -%_5_m = OpVariable %_ptr_Function_mat4v3float Function -%_6_m = OpVariable %_ptr_Function_mat4v2float Function -%_7_m = OpVariable %_ptr_Function_mat2v4float Function -%_8_m = OpVariable %_ptr_Function_mat2v3float Function -%456 = OpVariable %_ptr_Function_v4float Function -OpStore %_0_ok %true -OpStore %_1_splat_4 %34 -OpStore %_2_m %39 -%308 = OpFAdd %v2float %37 %33 -%309 = OpFAdd %v2float %38 %33 -%310 = OpFAdd %v2float %20 %33 -%311 = OpCompositeConstruct %mat3v2float %308 %309 %310 -OpStore %_2_m %311 -OpSelectionMerge %313 None -OpBranchConditional %true %312 %313 -%312 = OpLabel -%314 = OpFOrdEqual %v2bool %308 %48 -%315 = OpAll %bool %314 -%316 = OpFOrdEqual %v2bool %309 %49 -%317 = OpAll %bool %316 -%318 = OpLogicalAnd %bool %315 %317 -%319 = OpFOrdEqual %v2bool %310 %33 -%320 = OpAll %bool %319 -%321 = OpLogicalAnd %bool %318 %320 -OpBranch %313 -%313 = OpLabel -%322 = OpPhi %bool %false %304 %321 %312 -OpStore %_0_ok %322 -OpStore %_2_m %39 -%323 = OpFSub %v2float %37 %33 -%324 = OpFSub %v2float %38 %33 -%325 = OpFSub %v2float %20 %33 -%326 = OpCompositeConstruct %mat3v2float %323 %324 %325 -OpStore %_2_m %326 -OpSelectionMerge %328 None -OpBranchConditional %322 %327 %328 -%327 = OpLabel -%329 = OpFOrdEqual %v2bool %323 %69 -%330 = OpAll %bool %329 -%331 = OpFOrdEqual %v2bool %324 %70 -%332 = OpAll %bool %331 -%333 = OpLogicalAnd %bool %330 %332 -%334 = OpFOrdEqual %v2bool %325 %71 -%335 = OpAll %bool %334 -%336 = OpLogicalAnd %bool %333 %335 -OpBranch %328 -%328 = OpLabel -%337 = OpPhi %bool %false %313 %336 %327 -OpStore %_0_ok %337 -OpStore %_2_m %39 -%338 = OpFDiv %v2float %37 %33 -%339 = OpFDiv %v2float %38 %33 -%340 = OpFDiv %v2float %20 %33 -%341 = OpCompositeConstruct %mat3v2float %338 %339 %340 -OpStore %_2_m %341 -OpSelectionMerge %343 None -OpBranchConditional %337 %342 %343 -%342 = OpLabel -%344 = OpFOrdEqual %v2bool %338 %89 -%345 = OpAll %bool %344 -%346 = OpFOrdEqual %v2bool %339 %90 -%347 = OpAll %bool %346 -%348 = OpLogicalAnd %bool %345 %347 -%349 = OpFOrdEqual %v2bool %340 %20 -%350 = OpAll %bool %349 -%351 = OpLogicalAnd %bool %348 %350 -OpBranch %343 -%343 = OpLabel -%352 = OpPhi %bool %false %328 %351 %342 -OpStore %_0_ok %352 -OpStore %_3_splat_4 %106 -OpStore %_4_m %106 -%355 = OpFAdd %v3float %105 %108 -%356 = OpFAdd %v3float %105 %109 -%357 = OpCompositeConstruct %mat2v3float %355 %356 -OpStore %_4_m %357 -OpSelectionMerge %359 None -OpBranchConditional %352 %358 %359 -%358 = OpLabel -%360 = OpFOrdEqual %v3bool %355 %116 -%361 = OpAll %bool %360 -%362 = OpFOrdEqual %v3bool %356 %117 -%363 = OpAll %bool %362 -%364 = OpLogicalAnd %bool %361 %363 -OpBranch %359 -%359 = OpLabel -%365 = OpPhi %bool %false %343 %364 %358 -OpStore %_0_ok %365 -OpStore %_4_m %106 -%366 = OpFSub %v3float %105 %108 -%367 = OpFSub %v3float %105 %109 -%368 = OpCompositeConstruct %mat2v3float %366 %367 -OpStore %_4_m %368 -OpSelectionMerge %370 None -OpBranchConditional %365 %369 %370 -%369 = OpLabel -%371 = OpFOrdEqual %v3bool %366 %131 -%372 = OpAll %bool %371 -%373 = OpFOrdEqual %v3bool %367 %132 -%374 = OpAll %bool %373 -%375 = OpLogicalAnd %bool %372 %374 -OpBranch %370 -%370 = OpLabel -%376 = OpPhi %bool %false %359 %375 %369 -OpStore %_0_ok %376 -OpStore %_4_m %106 -%377 = OpFDiv %v3float %105 %140 -%378 = OpFDiv %v3float %105 %140 -%379 = OpCompositeConstruct %mat2v3float %377 %378 -OpStore %_4_m %379 -OpSelectionMerge %381 None -OpBranchConditional %376 %380 %381 -%380 = OpLabel -%382 = OpFOrdEqual %v3bool %377 %140 -%383 = OpAll %bool %382 -%384 = OpFOrdEqual %v3bool %378 %140 -%385 = OpAll %bool %384 -%386 = OpLogicalAnd %bool %383 %385 -OpBranch %381 -%381 = OpLabel -%387 = OpPhi %bool %false %370 %386 %380 -OpStore %_0_ok %387 -OpStore %_5_m %169 -%389 = OpFAdd %v3float %165 %174 -%390 = OpFAdd %v3float %166 %175 -%391 = OpFAdd %v3float %167 %176 -%392 = OpFAdd %v3float %168 %177 -%393 = OpCompositeConstruct %mat4v3float %389 %390 %391 %392 -OpStore %_5_m %393 -OpSelectionMerge %395 None -OpBranchConditional %387 %394 %395 -%394 = OpLabel -%396 = OpFOrdEqual %v3bool %389 %187 -%397 = OpAll %bool %396 -%398 = OpFOrdEqual %v3bool %390 %187 -%399 = OpAll %bool %398 -%400 = OpLogicalAnd %bool %397 %399 -%401 = OpFOrdEqual %v3bool %391 %187 -%402 = OpAll %bool %401 -%403 = OpLogicalAnd %bool %400 %402 -%404 = OpFOrdEqual %v3bool %392 %187 -%405 = OpAll %bool %404 -%406 = OpLogicalAnd %bool %403 %405 -OpBranch %395 -%395 = OpLabel -%407 = OpPhi %bool %false %381 %406 %394 -OpStore %_0_ok %407 -OpStore %_6_m %215 -%409 = OpFSub %v2float %211 %216 -%410 = OpFSub %v2float %212 %217 -%411 = OpFSub %v2float %213 %218 -%412 = OpFSub %v2float %214 %219 -%413 = OpCompositeConstruct %mat4v2float %409 %410 %411 %412 -OpStore %_6_m %413 -OpSelectionMerge %415 None -OpBranchConditional %407 %414 %415 -%414 = OpLabel -%416 = OpFOrdEqual %v2bool %409 %235 -%417 = OpAll %bool %416 -%418 = OpFOrdEqual %v2bool %410 %236 -%419 = OpAll %bool %418 -%420 = OpLogicalAnd %bool %417 %419 -%421 = OpFOrdEqual %v2bool %411 %237 -%422 = OpAll %bool %421 -%423 = OpLogicalAnd %bool %420 %422 -%424 = OpFOrdEqual %v2bool %412 %238 -%425 = OpAll %bool %424 -%426 = OpLogicalAnd %bool %423 %425 -OpBranch %415 -%415 = OpLabel -%427 = OpPhi %bool %false %395 %426 %414 -OpStore %_0_ok %427 -OpStore %_7_m %256 -%429 = OpFDiv %v4float %255 %257 -%430 = OpFDiv %v4float %255 %258 -%431 = OpCompositeConstruct %mat2v4float %429 %430 -OpStore %_7_m %431 -OpSelectionMerge %433 None -OpBranchConditional %427 %432 %433 -%432 = OpLabel -%434 = OpFOrdEqual %v4bool %429 %265 -%435 = OpAll %bool %434 -%436 = OpFOrdEqual %v4bool %430 %266 -%437 = OpAll %bool %436 -%438 = OpLogicalAnd %bool %435 %437 -OpBranch %433 -%433 = OpLabel -%439 = OpPhi %bool %false %415 %438 %432 -OpStore %_0_ok %439 -OpStore %_8_m %278 -%441 = OpMatrixTimesMatrix %mat2v3float %278 %282 -OpStore %_8_m %441 -OpSelectionMerge %443 None -OpBranchConditional %439 %442 %443 -%442 = OpLabel -%444 = OpCompositeExtract %v3float %441 0 -%445 = OpFOrdEqual %v3bool %444 %291 -%446 = OpAll %bool %445 -%447 = OpCompositeExtract %v3float %441 1 -%448 = OpFOrdEqual %v3bool %447 %292 -%449 = OpAll %bool %448 -%450 = OpLogicalAnd %bool %446 %449 -OpBranch %443 -%443 = OpLabel -%451 = OpPhi %bool %false %433 %450 %442 -OpStore %_0_ok %451 -OpSelectionMerge %453 None -OpBranchConditional %451 %452 %453 -%452 = OpLabel -%454 = OpFunctionCall %bool %test_matrix_op_matrix_half_b -OpBranch %453 -%453 = OpLabel -%455 = OpPhi %bool %false %443 %454 %452 -OpSelectionMerge %460 None -OpBranchConditional %455 %458 %459 -%458 = OpLabel -%461 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 -%465 = OpLoad %v4float %461 -OpStore %456 %465 -OpBranch %460 -%459 = OpLabel -%466 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 -%468 = OpLoad %v4float %466 -OpStore %456 %468 -OpBranch %460 -%460 = OpLabel -%469 = OpLoad %v4float %456 -OpReturnValue %469 -OpFunctionEnd + %25 = OpLabel + %ok = OpVariable %_ptr_Function_bool Function + %splat_4 = OpVariable %_ptr_Function_mat3v2float Function + %m = OpVariable %_ptr_Function_mat3v2float Function + %splat_4_0 = OpVariable %_ptr_Function_mat2v3float Function + %m_0 = OpVariable %_ptr_Function_mat2v3float Function + %m_1 = OpVariable %_ptr_Function_mat4v3float Function + %m_2 = OpVariable %_ptr_Function_mat4v2float Function + %m_3 = OpVariable %_ptr_Function_mat2v4float Function + %m_4 = OpVariable %_ptr_Function_mat2v3float Function + OpStore %ok %true + OpStore %splat_4 %34 + OpStore %m %39 + %40 = OpFAdd %v2float %37 %33 + %41 = OpFAdd %v2float %38 %33 + %42 = OpFAdd %v2float %20 %33 + %43 = OpCompositeConstruct %mat3v2float %40 %41 %42 + OpStore %m %43 + OpSelectionMerge %46 None + OpBranchConditional %true %45 %46 + %45 = OpLabel + %52 = OpFOrdEqual %v2bool %40 %48 + %53 = OpAll %bool %52 + %54 = OpFOrdEqual %v2bool %41 %49 + %55 = OpAll %bool %54 + %56 = OpLogicalAnd %bool %53 %55 + %57 = OpFOrdEqual %v2bool %42 %33 + %58 = OpAll %bool %57 + %59 = OpLogicalAnd %bool %56 %58 + OpBranch %46 + %46 = OpLabel + %60 = OpPhi %bool %false %25 %59 %45 + OpStore %ok %60 + OpStore %m %39 + %61 = OpFSub %v2float %37 %33 + %62 = OpFSub %v2float %38 %33 + %63 = OpFSub %v2float %20 %33 + %64 = OpCompositeConstruct %mat3v2float %61 %62 %63 + OpStore %m %64 + OpSelectionMerge %66 None + OpBranchConditional %60 %65 %66 + %65 = OpLabel + %73 = OpFOrdEqual %v2bool %61 %69 + %74 = OpAll %bool %73 + %75 = OpFOrdEqual %v2bool %62 %70 + %76 = OpAll %bool %75 + %77 = OpLogicalAnd %bool %74 %76 + %78 = OpFOrdEqual %v2bool %63 %71 + %79 = OpAll %bool %78 + %80 = OpLogicalAnd %bool %77 %79 + OpBranch %66 + %66 = OpLabel + %81 = OpPhi %bool %false %46 %80 %65 + OpStore %ok %81 + OpStore %m %39 + %82 = OpFDiv %v2float %37 %33 + %83 = OpFDiv %v2float %38 %33 + %84 = OpFDiv %v2float %20 %33 + %85 = OpCompositeConstruct %mat3v2float %82 %83 %84 + OpStore %m %85 + OpSelectionMerge %87 None + OpBranchConditional %81 %86 %87 + %86 = OpLabel + %92 = OpFOrdEqual %v2bool %82 %89 + %93 = OpAll %bool %92 + %94 = OpFOrdEqual %v2bool %83 %90 + %95 = OpAll %bool %94 + %96 = OpLogicalAnd %bool %93 %95 + %97 = OpFOrdEqual %v2bool %84 %20 + %98 = OpAll %bool %97 + %99 = OpLogicalAnd %bool %96 %98 + OpBranch %87 + %87 = OpLabel + %100 = OpPhi %bool %false %66 %99 %86 + OpStore %ok %100 + OpStore %splat_4_0 %106 + OpStore %m_0 %106 + %111 = OpFAdd %v3float %105 %108 + %112 = OpFAdd %v3float %105 %109 + %113 = OpCompositeConstruct %mat2v3float %111 %112 + OpStore %m_0 %113 + OpSelectionMerge %115 None + OpBranchConditional %100 %114 %115 + %114 = OpLabel + %120 = OpFOrdEqual %v3bool %111 %116 + %121 = OpAll %bool %120 + %122 = OpFOrdEqual %v3bool %112 %117 + %123 = OpAll %bool %122 + %124 = OpLogicalAnd %bool %121 %123 + OpBranch %115 + %115 = OpLabel + %125 = OpPhi %bool %false %87 %124 %114 + OpStore %ok %125 + OpStore %m_0 %106 + %126 = OpFSub %v3float %105 %108 + %127 = OpFSub %v3float %105 %109 + %128 = OpCompositeConstruct %mat2v3float %126 %127 + OpStore %m_0 %128 + OpSelectionMerge %130 None + OpBranchConditional %125 %129 %130 + %129 = OpLabel + %134 = OpFOrdEqual %v3bool %126 %131 + %135 = OpAll %bool %134 + %136 = OpFOrdEqual %v3bool %127 %132 + %137 = OpAll %bool %136 + %138 = OpLogicalAnd %bool %135 %137 + OpBranch %130 + %130 = OpLabel + %139 = OpPhi %bool %false %115 %138 %129 + OpStore %ok %139 + OpStore %m_0 %106 + %142 = OpFDiv %v3float %105 %140 + %143 = OpFDiv %v3float %105 %140 + %144 = OpCompositeConstruct %mat2v3float %142 %143 + OpStore %m_0 %144 + OpSelectionMerge %146 None + OpBranchConditional %139 %145 %146 + %145 = OpLabel + %147 = OpFOrdEqual %v3bool %142 %140 + %148 = OpAll %bool %147 + %149 = OpFOrdEqual %v3bool %143 %140 + %150 = OpAll %bool %149 + %151 = OpLogicalAnd %bool %148 %150 + OpBranch %146 + %146 = OpLabel + %152 = OpPhi %bool %false %130 %151 %145 + OpStore %ok %152 + OpStore %m_1 %169 + %179 = OpFAdd %v3float %165 %174 + %180 = OpFAdd %v3float %166 %175 + %181 = OpFAdd %v3float %167 %176 + %182 = OpFAdd %v3float %168 %177 + %183 = OpCompositeConstruct %mat4v3float %179 %180 %181 %182 + OpStore %m_1 %183 + OpSelectionMerge %185 None + OpBranchConditional %152 %184 %185 + %184 = OpLabel + %189 = OpFOrdEqual %v3bool %179 %187 + %190 = OpAll %bool %189 + %191 = OpFOrdEqual %v3bool %180 %187 + %192 = OpAll %bool %191 + %193 = OpLogicalAnd %bool %190 %192 + %194 = OpFOrdEqual %v3bool %181 %187 + %195 = OpAll %bool %194 + %196 = OpLogicalAnd %bool %193 %195 + %197 = OpFOrdEqual %v3bool %182 %187 + %198 = OpAll %bool %197 + %199 = OpLogicalAnd %bool %196 %198 + OpBranch %185 + %185 = OpLabel + %200 = OpPhi %bool %false %146 %199 %184 + OpStore %ok %200 + OpStore %m_2 %215 + %221 = OpFSub %v2float %211 %216 + %222 = OpFSub %v2float %212 %217 + %223 = OpFSub %v2float %213 %218 + %224 = OpFSub %v2float %214 %219 + %225 = OpCompositeConstruct %mat4v2float %221 %222 %223 %224 + OpStore %m_2 %225 + OpSelectionMerge %227 None + OpBranchConditional %200 %226 %227 + %226 = OpLabel + %240 = OpFOrdEqual %v2bool %221 %235 + %241 = OpAll %bool %240 + %242 = OpFOrdEqual %v2bool %222 %236 + %243 = OpAll %bool %242 + %244 = OpLogicalAnd %bool %241 %243 + %245 = OpFOrdEqual %v2bool %223 %237 + %246 = OpAll %bool %245 + %247 = OpLogicalAnd %bool %244 %246 + %248 = OpFOrdEqual %v2bool %224 %238 + %249 = OpAll %bool %248 + %250 = OpLogicalAnd %bool %247 %249 + OpBranch %227 + %227 = OpLabel + %251 = OpPhi %bool %false %185 %250 %226 + OpStore %ok %251 + OpStore %m_3 %256 + %260 = OpFDiv %v4float %255 %257 + %261 = OpFDiv %v4float %255 %258 + %262 = OpCompositeConstruct %mat2v4float %260 %261 + OpStore %m_3 %262 + OpSelectionMerge %264 None + OpBranchConditional %251 %263 %264 + %263 = OpLabel + %269 = OpFOrdEqual %v4bool %260 %265 + %270 = OpAll %bool %269 + %271 = OpFOrdEqual %v4bool %261 %266 + %272 = OpAll %bool %271 + %273 = OpLogicalAnd %bool %270 %272 + OpBranch %264 + %264 = OpLabel + %274 = OpPhi %bool %false %227 %273 %263 + OpStore %ok %274 + OpStore %m_4 %278 + %283 = OpMatrixTimesMatrix %mat2v3float %278 %282 + OpStore %m_4 %283 + OpSelectionMerge %285 None + OpBranchConditional %274 %284 %285 + %284 = OpLabel + %294 = OpCompositeExtract %v3float %283 0 + %295 = OpFOrdEqual %v3bool %294 %291 + %296 = OpAll %bool %295 + %297 = OpCompositeExtract %v3float %283 1 + %298 = OpFOrdEqual %v3bool %297 %292 + %299 = OpAll %bool %298 + %300 = OpLogicalAnd %bool %296 %299 + OpBranch %285 + %285 = OpLabel + %301 = OpPhi %bool %false %264 %300 %284 + OpStore %ok %301 + OpReturnValue %301 + OpFunctionEnd + %main = OpFunction %v4float None %302 + %303 = OpFunctionParameter %_ptr_Function_v2float + %304 = OpLabel + %_0_ok = OpVariable %_ptr_Function_bool Function + %_1_splat_4 = OpVariable %_ptr_Function_mat3v2float Function + %_2_m = OpVariable %_ptr_Function_mat3v2float Function + %_3_splat_4 = OpVariable %_ptr_Function_mat2v3float Function + %_4_m = OpVariable %_ptr_Function_mat2v3float Function + %_5_m = OpVariable %_ptr_Function_mat4v3float Function + %_6_m = OpVariable %_ptr_Function_mat4v2float Function + %_7_m = OpVariable %_ptr_Function_mat2v4float Function + %_8_m = OpVariable %_ptr_Function_mat2v3float Function + %456 = OpVariable %_ptr_Function_v4float Function + OpStore %_0_ok %true + OpStore %_1_splat_4 %34 + OpStore %_2_m %39 + %308 = OpFAdd %v2float %37 %33 + %309 = OpFAdd %v2float %38 %33 + %310 = OpFAdd %v2float %20 %33 + %311 = OpCompositeConstruct %mat3v2float %308 %309 %310 + OpStore %_2_m %311 + OpSelectionMerge %313 None + OpBranchConditional %true %312 %313 + %312 = OpLabel + %314 = OpFOrdEqual %v2bool %308 %48 + %315 = OpAll %bool %314 + %316 = OpFOrdEqual %v2bool %309 %49 + %317 = OpAll %bool %316 + %318 = OpLogicalAnd %bool %315 %317 + %319 = OpFOrdEqual %v2bool %310 %33 + %320 = OpAll %bool %319 + %321 = OpLogicalAnd %bool %318 %320 + OpBranch %313 + %313 = OpLabel + %322 = OpPhi %bool %false %304 %321 %312 + OpStore %_0_ok %322 + OpStore %_2_m %39 + %323 = OpFSub %v2float %37 %33 + %324 = OpFSub %v2float %38 %33 + %325 = OpFSub %v2float %20 %33 + %326 = OpCompositeConstruct %mat3v2float %323 %324 %325 + OpStore %_2_m %326 + OpSelectionMerge %328 None + OpBranchConditional %322 %327 %328 + %327 = OpLabel + %329 = OpFOrdEqual %v2bool %323 %69 + %330 = OpAll %bool %329 + %331 = OpFOrdEqual %v2bool %324 %70 + %332 = OpAll %bool %331 + %333 = OpLogicalAnd %bool %330 %332 + %334 = OpFOrdEqual %v2bool %325 %71 + %335 = OpAll %bool %334 + %336 = OpLogicalAnd %bool %333 %335 + OpBranch %328 + %328 = OpLabel + %337 = OpPhi %bool %false %313 %336 %327 + OpStore %_0_ok %337 + OpStore %_2_m %39 + %338 = OpFDiv %v2float %37 %33 + %339 = OpFDiv %v2float %38 %33 + %340 = OpFDiv %v2float %20 %33 + %341 = OpCompositeConstruct %mat3v2float %338 %339 %340 + OpStore %_2_m %341 + OpSelectionMerge %343 None + OpBranchConditional %337 %342 %343 + %342 = OpLabel + %344 = OpFOrdEqual %v2bool %338 %89 + %345 = OpAll %bool %344 + %346 = OpFOrdEqual %v2bool %339 %90 + %347 = OpAll %bool %346 + %348 = OpLogicalAnd %bool %345 %347 + %349 = OpFOrdEqual %v2bool %340 %20 + %350 = OpAll %bool %349 + %351 = OpLogicalAnd %bool %348 %350 + OpBranch %343 + %343 = OpLabel + %352 = OpPhi %bool %false %328 %351 %342 + OpStore %_0_ok %352 + OpStore %_3_splat_4 %106 + OpStore %_4_m %106 + %355 = OpFAdd %v3float %105 %108 + %356 = OpFAdd %v3float %105 %109 + %357 = OpCompositeConstruct %mat2v3float %355 %356 + OpStore %_4_m %357 + OpSelectionMerge %359 None + OpBranchConditional %352 %358 %359 + %358 = OpLabel + %360 = OpFOrdEqual %v3bool %355 %116 + %361 = OpAll %bool %360 + %362 = OpFOrdEqual %v3bool %356 %117 + %363 = OpAll %bool %362 + %364 = OpLogicalAnd %bool %361 %363 + OpBranch %359 + %359 = OpLabel + %365 = OpPhi %bool %false %343 %364 %358 + OpStore %_0_ok %365 + OpStore %_4_m %106 + %366 = OpFSub %v3float %105 %108 + %367 = OpFSub %v3float %105 %109 + %368 = OpCompositeConstruct %mat2v3float %366 %367 + OpStore %_4_m %368 + OpSelectionMerge %370 None + OpBranchConditional %365 %369 %370 + %369 = OpLabel + %371 = OpFOrdEqual %v3bool %366 %131 + %372 = OpAll %bool %371 + %373 = OpFOrdEqual %v3bool %367 %132 + %374 = OpAll %bool %373 + %375 = OpLogicalAnd %bool %372 %374 + OpBranch %370 + %370 = OpLabel + %376 = OpPhi %bool %false %359 %375 %369 + OpStore %_0_ok %376 + OpStore %_4_m %106 + %377 = OpFDiv %v3float %105 %140 + %378 = OpFDiv %v3float %105 %140 + %379 = OpCompositeConstruct %mat2v3float %377 %378 + OpStore %_4_m %379 + OpSelectionMerge %381 None + OpBranchConditional %376 %380 %381 + %380 = OpLabel + %382 = OpFOrdEqual %v3bool %377 %140 + %383 = OpAll %bool %382 + %384 = OpFOrdEqual %v3bool %378 %140 + %385 = OpAll %bool %384 + %386 = OpLogicalAnd %bool %383 %385 + OpBranch %381 + %381 = OpLabel + %387 = OpPhi %bool %false %370 %386 %380 + OpStore %_0_ok %387 + OpStore %_5_m %169 + %389 = OpFAdd %v3float %165 %174 + %390 = OpFAdd %v3float %166 %175 + %391 = OpFAdd %v3float %167 %176 + %392 = OpFAdd %v3float %168 %177 + %393 = OpCompositeConstruct %mat4v3float %389 %390 %391 %392 + OpStore %_5_m %393 + OpSelectionMerge %395 None + OpBranchConditional %387 %394 %395 + %394 = OpLabel + %396 = OpFOrdEqual %v3bool %389 %187 + %397 = OpAll %bool %396 + %398 = OpFOrdEqual %v3bool %390 %187 + %399 = OpAll %bool %398 + %400 = OpLogicalAnd %bool %397 %399 + %401 = OpFOrdEqual %v3bool %391 %187 + %402 = OpAll %bool %401 + %403 = OpLogicalAnd %bool %400 %402 + %404 = OpFOrdEqual %v3bool %392 %187 + %405 = OpAll %bool %404 + %406 = OpLogicalAnd %bool %403 %405 + OpBranch %395 + %395 = OpLabel + %407 = OpPhi %bool %false %381 %406 %394 + OpStore %_0_ok %407 + OpStore %_6_m %215 + %409 = OpFSub %v2float %211 %216 + %410 = OpFSub %v2float %212 %217 + %411 = OpFSub %v2float %213 %218 + %412 = OpFSub %v2float %214 %219 + %413 = OpCompositeConstruct %mat4v2float %409 %410 %411 %412 + OpStore %_6_m %413 + OpSelectionMerge %415 None + OpBranchConditional %407 %414 %415 + %414 = OpLabel + %416 = OpFOrdEqual %v2bool %409 %235 + %417 = OpAll %bool %416 + %418 = OpFOrdEqual %v2bool %410 %236 + %419 = OpAll %bool %418 + %420 = OpLogicalAnd %bool %417 %419 + %421 = OpFOrdEqual %v2bool %411 %237 + %422 = OpAll %bool %421 + %423 = OpLogicalAnd %bool %420 %422 + %424 = OpFOrdEqual %v2bool %412 %238 + %425 = OpAll %bool %424 + %426 = OpLogicalAnd %bool %423 %425 + OpBranch %415 + %415 = OpLabel + %427 = OpPhi %bool %false %395 %426 %414 + OpStore %_0_ok %427 + OpStore %_7_m %256 + %429 = OpFDiv %v4float %255 %257 + %430 = OpFDiv %v4float %255 %258 + %431 = OpCompositeConstruct %mat2v4float %429 %430 + OpStore %_7_m %431 + OpSelectionMerge %433 None + OpBranchConditional %427 %432 %433 + %432 = OpLabel + %434 = OpFOrdEqual %v4bool %429 %265 + %435 = OpAll %bool %434 + %436 = OpFOrdEqual %v4bool %430 %266 + %437 = OpAll %bool %436 + %438 = OpLogicalAnd %bool %435 %437 + OpBranch %433 + %433 = OpLabel + %439 = OpPhi %bool %false %415 %438 %432 + OpStore %_0_ok %439 + OpStore %_8_m %278 + %441 = OpMatrixTimesMatrix %mat2v3float %278 %282 + OpStore %_8_m %441 + OpSelectionMerge %443 None + OpBranchConditional %439 %442 %443 + %442 = OpLabel + %444 = OpCompositeExtract %v3float %441 0 + %445 = OpFOrdEqual %v3bool %444 %291 + %446 = OpAll %bool %445 + %447 = OpCompositeExtract %v3float %441 1 + %448 = OpFOrdEqual %v3bool %447 %292 + %449 = OpAll %bool %448 + %450 = OpLogicalAnd %bool %446 %449 + OpBranch %443 + %443 = OpLabel + %451 = OpPhi %bool %false %433 %450 %442 + OpStore %_0_ok %451 + OpSelectionMerge %453 None + OpBranchConditional %451 %452 %453 + %452 = OpLabel + %454 = OpFunctionCall %bool %test_matrix_op_matrix_half_b + OpBranch %453 + %453 = OpLabel + %455 = OpPhi %bool %false %443 %454 %452 + OpSelectionMerge %460 None + OpBranchConditional %455 %458 %459 + %458 = OpLabel + %461 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 + %465 = OpLoad %v4float %461 + OpStore %456 %465 + OpBranch %460 + %459 = OpLabel + %466 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 + %468 = OpLoad %v4float %466 + OpStore %456 %468 + OpBranch %460 + %460 = OpLabel + %469 = OpLoad %v4float %456 + OpReturnValue %469 + OpFunctionEnd diff --git a/tests/sksl/shared/MatrixOpEqualsES3.skrp b/tests/sksl/shared/MatrixOpEqualsES3.skrp index f7a034e3e08c..31340a12b537 100644 --- a/tests/sksl/shared/MatrixOpEqualsES3.skrp +++ b/tests/sksl/shared/MatrixOpEqualsES3.skrp @@ -1,28 +1,134 @@ +434 instructions + [immutable slots] -_1_splat_4(0) = 0x40800000 (4.0) -_1_splat_4(1) = 0x40800000 (4.0) -_1_splat_4(2) = 0x40800000 (4.0) -_1_splat_4(3) = 0x40800000 (4.0) -_1_splat_4(4) = 0x40800000 (4.0) -_1_splat_4(5) = 0x40800000 (4.0) -_3_splat_4(0) = 0x40800000 (4.0) -_3_splat_4(1) = 0x40800000 (4.0) -_3_splat_4(2) = 0x40800000 (4.0) -_3_splat_4(3) = 0x40800000 (4.0) -_3_splat_4(4) = 0x40800000 (4.0) -_3_splat_4(5) = 0x40800000 (4.0) -splat_4(0) = 0x40800000 (4.0) -splat_4(1) = 0x40800000 (4.0) -splat_4(2) = 0x40800000 (4.0) -splat_4(3) = 0x40800000 (4.0) -splat_4(4) = 0x40800000 (4.0) -splat_4(5) = 0x40800000 (4.0) -splat_4₁(0) = 0x40800000 (4.0) -splat_4₁(1) = 0x40800000 (4.0) -splat_4₁(2) = 0x40800000 (4.0) -splat_4₁(3) = 0x40800000 (4.0) -splat_4₁(4) = 0x40800000 (4.0) -splat_4₁(5) = 0x40800000 (4.0) +i0 = 0x40800000 (4.0) +i1 = 0x40800000 (4.0) +i2 = 0x40800000 (4.0) +i3 = 0x40800000 (4.0) +i4 = 0x40800000 (4.0) +i5 = 0x40800000 (4.0) +i6 = 0x40C00000 (6.0) +i7 = 0x40800000 (4.0) +i8 = 0x40800000 (4.0) +i9 = 0x40C00000 (6.0) +i10 = 0x40800000 (4.0) +i11 = 0x40800000 (4.0) +i12 = 0xC0000000 (-2.0) +i13 = 0xC0800000 (-4.0) +i14 = 0xC0800000 (-4.0) +i15 = 0xC0000000 (-2.0) +i16 = 0xC0800000 (-4.0) +i17 = 0xC0800000 (-4.0) +i18 = 0x40C00000 (6.0) +i19 = 0x40800000 (4.0) +i20 = 0x40800000 (4.0) +i21 = 0x40800000 (4.0) +i22 = 0x40C00000 (6.0) +i23 = 0x40800000 (4.0) +i24 = 0x40000000 (2.0) +i25 = 0x40800000 (4.0) +i26 = 0x40800000 (4.0) +i27 = 0x40800000 (4.0) +i28 = 0x40000000 (2.0) +i29 = 0x40800000 (4.0) +i30 = 0x40000000 (2.0) +i31 = 0x40000000 (2.0) +i32 = 0x40000000 (2.0) +i33 = 0x40000000 (2.0) +i34 = 0x40000000 (2.0) +i35 = 0x40000000 (2.0) +i36 = 0x3F800000 (1.0) +i37 = 0x40000000 (2.0) +i38 = 0x40400000 (3.0) +i39 = 0x40800000 (4.0) +i40 = 0x40A00000 (5.0) +i41 = 0x40C00000 (6.0) +i42 = 0x40E00000 (7.0) +i43 = 0x41000000 (8.0) +i44 = 0x41100000 (9.0) +i45 = 0x41200000 (10.0) +i46 = 0x41300000 (11.0) +i47 = 0x41400000 (12.0) +i48 = 0x41800000 (16.0) +i49 = 0x41700000 (15.0) +i50 = 0x41600000 (14.0) +i51 = 0x41500000 (13.0) +i52 = 0x41400000 (12.0) +i53 = 0x41300000 (11.0) +i54 = 0x41200000 (10.0) +i55 = 0x41100000 (9.0) +i56 = 0x41000000 (8.0) +i57 = 0x40E00000 (7.0) +i58 = 0x40C00000 (6.0) +i59 = 0x40A00000 (5.0) +i60 = 0x41880000 (17.0) +i61 = 0x41880000 (17.0) +i62 = 0x41880000 (17.0) +i63 = 0x41880000 (17.0) +i64 = 0x41880000 (17.0) +i65 = 0x41880000 (17.0) +i66 = 0x41880000 (17.0) +i67 = 0x41880000 (17.0) +i68 = 0x41880000 (17.0) +i69 = 0x41880000 (17.0) +i70 = 0x41880000 (17.0) +i71 = 0x41880000 (17.0) +i72 = 0x41200000 (10.0) +i73 = 0x41A00000 (20.0) +i74 = 0x41F00000 (30.0) +i75 = 0x42200000 (40.0) +i76 = 0x42480000 (50.0) +i77 = 0x42700000 (60.0) +i78 = 0x428C0000 (70.0) +i79 = 0x42A00000 (80.0) +i80 = 0x41100000 (9.0) +i81 = 0x41900000 (18.0) +i82 = 0x41D80000 (27.0) +i83 = 0x42100000 (36.0) +i84 = 0x42340000 (45.0) +i85 = 0x42580000 (54.0) +i86 = 0x427C0000 (63.0) +i87 = 0x42900000 (72.0) +i88 = 0x41200000 (10.0) +i89 = 0x41A00000 (20.0) +i90 = 0x41F00000 (30.0) +i91 = 0x42200000 (40.0) +i92 = 0x41200000 (10.0) +i93 = 0x41A00000 (20.0) +i94 = 0x41F00000 (30.0) +i95 = 0x42200000 (40.0) +i96 = 0x41200000 (10.0) +i97 = 0x41200000 (10.0) +i98 = 0x41200000 (10.0) +i99 = 0x41200000 (10.0) +i100 = 0x40A00000 (5.0) +i101 = 0x40A00000 (5.0) +i102 = 0x40A00000 (5.0) +i103 = 0x40A00000 (5.0) +i104 = 0x3F800000 (1.0) +i105 = 0x40000000 (2.0) +i106 = 0x40400000 (3.0) +i107 = 0x40800000 (4.0) +i108 = 0x40000000 (2.0) +i109 = 0x40800000 (4.0) +i110 = 0x40C00000 (6.0) +i111 = 0x41000000 (8.0) +i112 = 0x40E00000 (7.0) +i113 = 0x41100000 (9.0) +i114 = 0x41300000 (11.0) +i115 = 0x41000000 (8.0) +i116 = 0x41200000 (10.0) +i117 = 0x41400000 (12.0) +i118 = 0x3F800000 (1.0) +i119 = 0x40800000 (4.0) +i120 = 0x40000000 (2.0) +i121 = 0x40A00000 (5.0) +i122 = 0x421C0000 (39.0) +i123 = 0x42440000 (49.0) +i124 = 0x426C0000 (59.0) +i125 = 0x42580000 (54.0) +i126 = 0x42880000 (68.0) +i127 = 0x42A40000 (82.0) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -32,18 +138,15 @@ copy_constant $1 = 0x40000000 (2.0) shuffle $0..5 = ($0..5)[1 0 0 1 0 0] copy_4_slots_unmasked _2_m(0..3) = $0..3 copy_2_slots_unmasked _2_m(4..5) = $4..5 -copy_4_slots_unmasked $6..9 = _1_splat_4(0..3) -copy_2_slots_unmasked $10..11 = _1_splat_4(4..5) +copy_4_immutables_unmasked $6..9 = i0..3 [0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_2_immutables_unmasked $10..11 = i4..5 [0x40800000 (4.0), 0x40800000 (4.0)] add_n_floats $0..5 += $6..11 copy_4_slots_unmasked _2_m(0..3) = $0..3 copy_2_slots_unmasked _2_m(4..5) = $4..5 -copy_slot_unmasked $0 = _0_ok -copy_4_slots_unmasked $1..4 = _2_m(0..3) -copy_2_slots_unmasked $5..6 = _2_m(4..5) -copy_constant $7 = 0x40C00000 (6.0) -splat_2_constants $8..9 = 0x40800000 (4.0) -copy_constant $10 = 0x40C00000 (6.0) -splat_2_constants $11..12 = 0x40800000 (4.0) +copy_4_slots_unmasked $0..3 = _0_ok, _2_m(0..2) +copy_3_slots_unmasked $4..6 = _2_m(3..5) +copy_4_immutables_unmasked $7..10 = i6..9 [0x40C00000 (6.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40C00000 (6.0)] +copy_2_immutables_unmasked $11..12 = i10..11 [0x40800000 (4.0), 0x40800000 (4.0)] cmpeq_n_floats $1..6 = equal($1..6, $7..12) bitwise_and_3_ints $1..3 &= $4..6 bitwise_and_int $2 &= $3 @@ -55,18 +158,15 @@ copy_constant $1 = 0x40000000 (2.0) shuffle $0..5 = ($0..5)[1 0 0 1 0 0] copy_4_slots_unmasked _2_m(0..3) = $0..3 copy_2_slots_unmasked _2_m(4..5) = $4..5 -copy_4_slots_unmasked $6..9 = _1_splat_4(0..3) -copy_2_slots_unmasked $10..11 = _1_splat_4(4..5) +copy_4_immutables_unmasked $6..9 = i0..3 [0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_2_immutables_unmasked $10..11 = i4..5 [0x40800000 (4.0), 0x40800000 (4.0)] sub_n_floats $0..5 -= $6..11 copy_4_slots_unmasked _2_m(0..3) = $0..3 copy_2_slots_unmasked _2_m(4..5) = $4..5 -copy_slot_unmasked $0 = _0_ok -copy_4_slots_unmasked $1..4 = _2_m(0..3) -copy_2_slots_unmasked $5..6 = _2_m(4..5) -copy_constant $7 = 0xC0000000 (-2.0) -splat_2_constants $8..9 = 0xC0800000 (-4.0) -copy_constant $10 = 0xC0000000 (-2.0) -splat_2_constants $11..12 = 0xC0800000 (-4.0) +copy_4_slots_unmasked $0..3 = _0_ok, _2_m(0..2) +copy_3_slots_unmasked $4..6 = _2_m(3..5) +copy_4_immutables_unmasked $7..10 = i12..15 [0xC0000000 (-2.0), 0xC0800000 (-4.0), 0xC0800000 (-4.0), 0xC0000000 (-2.0)] +copy_2_immutables_unmasked $11..12 = i16..17 [0xC0800000 (-4.0), 0xC0800000 (-4.0)] cmpeq_n_floats $1..6 = equal($1..6, $7..12) bitwise_and_3_ints $1..3 &= $4..6 bitwise_and_int $2 &= $3 @@ -78,14 +178,13 @@ copy_constant $1 = 0x40000000 (2.0) shuffle $0..5 = ($0..5)[1 0 0 1 0 0] copy_4_slots_unmasked _2_m(0..3) = $0..3 copy_2_slots_unmasked _2_m(4..5) = $4..5 -copy_4_slots_unmasked $6..9 = _1_splat_4(0..3) -copy_2_slots_unmasked $10..11 = _1_splat_4(4..5) +copy_4_immutables_unmasked $6..9 = i0..3 [0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_2_immutables_unmasked $10..11 = i4..5 [0x40800000 (4.0), 0x40800000 (4.0)] div_n_floats $0..5 /= $6..11 copy_4_slots_unmasked _2_m(0..3) = $0..3 copy_2_slots_unmasked _2_m(4..5) = $4..5 -copy_slot_unmasked $0 = _0_ok -copy_4_slots_unmasked $1..4 = _2_m(0..3) -copy_2_slots_unmasked $5..6 = _2_m(4..5) +copy_4_slots_unmasked $0..3 = _0_ok, _2_m(0..2) +copy_3_slots_unmasked $4..6 = _2_m(3..5) copy_constant $7 = 0 copy_constant $8 = 0x3F000000 (0.5) shuffle $7..12 = ($7..12)[1 0 0 1 0 0] @@ -95,8 +194,8 @@ bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_slot_unmasked _0_ok = $0 -copy_4_slots_unmasked _4_m(0..3) = _3_splat_4(0..3) -copy_2_slots_unmasked _4_m(4..5) = _3_splat_4(4..5) +copy_4_immutables_unmasked _4_m(0..3) = i0..3 [0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_2_immutables_unmasked _4_m(4..5) = i4..5 [0x40800000 (4.0), 0x40800000 (4.0)] copy_4_slots_unmasked $0..3 = _4_m(0..3) copy_2_slots_unmasked $4..5 = _4_m(4..5) copy_constant $6 = 0 @@ -108,18 +207,16 @@ copy_2_slots_unmasked _4_m(4..5) = $4..5 copy_slot_unmasked $0 = _0_ok copy_4_slots_unmasked $1..4 = _4_m(0..3) copy_2_slots_unmasked $5..6 = _4_m(4..5) -copy_constant $7 = 0x40C00000 (6.0) -splat_3_constants $8..10 = 0x40800000 (4.0) -copy_constant $11 = 0x40C00000 (6.0) -copy_constant $12 = 0x40800000 (4.0) +copy_4_immutables_unmasked $7..10 = i18..21 [0x40C00000 (6.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_2_immutables_unmasked $11..12 = i22..23 [0x40C00000 (6.0), 0x40800000 (4.0)] cmpeq_n_floats $1..6 = equal($1..6, $7..12) bitwise_and_3_ints $1..3 &= $4..6 bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_slot_unmasked _0_ok = $0 -copy_4_slots_unmasked _4_m(0..3) = _3_splat_4(0..3) -copy_2_slots_unmasked _4_m(4..5) = _3_splat_4(4..5) +copy_4_immutables_unmasked _4_m(0..3) = i0..3 [0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_2_immutables_unmasked _4_m(4..5) = i4..5 [0x40800000 (4.0), 0x40800000 (4.0)] copy_4_slots_unmasked $0..3 = _4_m(0..3) copy_2_slots_unmasked $4..5 = _4_m(4..5) copy_constant $6 = 0 @@ -131,63 +228,43 @@ copy_2_slots_unmasked _4_m(4..5) = $4..5 copy_slot_unmasked $0 = _0_ok copy_4_slots_unmasked $1..4 = _4_m(0..3) copy_2_slots_unmasked $5..6 = _4_m(4..5) -copy_constant $7 = 0x40000000 (2.0) -splat_3_constants $8..10 = 0x40800000 (4.0) -copy_constant $11 = 0x40000000 (2.0) -copy_constant $12 = 0x40800000 (4.0) +copy_4_immutables_unmasked $7..10 = i24..27 [0x40000000 (2.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_2_immutables_unmasked $11..12 = i28..29 [0x40000000 (2.0), 0x40800000 (4.0)] cmpeq_n_floats $1..6 = equal($1..6, $7..12) bitwise_and_3_ints $1..3 &= $4..6 bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_slot_unmasked _0_ok = $0 -copy_4_slots_unmasked _4_m(0..3) = _3_splat_4(0..3) -copy_2_slots_unmasked _4_m(4..5) = _3_splat_4(4..5) +copy_4_immutables_unmasked _4_m(0..3) = i0..3 [0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_2_immutables_unmasked _4_m(4..5) = i4..5 [0x40800000 (4.0), 0x40800000 (4.0)] copy_4_slots_unmasked $0..3 = _4_m(0..3) copy_2_slots_unmasked $4..5 = _4_m(4..5) -splat_4_constants $6..9 = 0x40000000 (2.0) -splat_2_constants $10..11 = 0x40000000 (2.0) +copy_4_immutables_unmasked $6..9 = i30..33 [0x40000000 (2.0), 0x40000000 (2.0), 0x40000000 (2.0), 0x40000000 (2.0)] +copy_2_immutables_unmasked $10..11 = i34..35 [0x40000000 (2.0), 0x40000000 (2.0)] div_n_floats $0..5 /= $6..11 copy_4_slots_unmasked _4_m(0..3) = $0..3 copy_2_slots_unmasked _4_m(4..5) = $4..5 copy_slot_unmasked $0 = _0_ok copy_4_slots_unmasked $1..4 = _4_m(0..3) copy_2_slots_unmasked $5..6 = _4_m(4..5) -splat_4_constants $7..10 = 0x40000000 (2.0) -splat_2_constants $11..12 = 0x40000000 (2.0) +copy_4_immutables_unmasked $7..10 = i30..33 [0x40000000 (2.0), 0x40000000 (2.0), 0x40000000 (2.0), 0x40000000 (2.0)] +copy_2_immutables_unmasked $11..12 = i34..35 [0x40000000 (2.0), 0x40000000 (2.0)] cmpeq_n_floats $1..6 = equal($1..6, $7..12) bitwise_and_3_ints $1..3 &= $4..6 bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_slot_unmasked _0_ok = $0 -copy_constant _5_m(0) = 0x3F800000 (1.0) -copy_constant _5_m(1) = 0x40000000 (2.0) -copy_constant _5_m(2) = 0x40400000 (3.0) -copy_constant _5_m(3) = 0x40800000 (4.0) -copy_constant _5_m(4) = 0x40A00000 (5.0) -copy_constant _5_m(5) = 0x40C00000 (6.0) -copy_constant _5_m(6) = 0x40E00000 (7.0) -copy_constant _5_m(7) = 0x41000000 (8.0) -copy_constant _5_m(8) = 0x41100000 (9.0) -copy_constant _5_m(9) = 0x41200000 (10.0) -copy_constant _5_m(10) = 0x41300000 (11.0) -copy_constant _5_m(11) = 0x41400000 (12.0) +copy_4_immutables_unmasked _5_m(0..3) = i36..39 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked _5_m(4..7) = i40..43 [0x40A00000 (5.0), 0x40C00000 (6.0), 0x40E00000 (7.0), 0x41000000 (8.0)] +copy_4_immutables_unmasked _5_m(8..11) = i44..47 [0x41100000 (9.0), 0x41200000 (10.0), 0x41300000 (11.0), 0x41400000 (12.0)] copy_4_slots_unmasked $0..3 = _5_m(0..3) copy_4_slots_unmasked $4..7 = _5_m(4..7) copy_4_slots_unmasked $8..11 = _5_m(8..11) -copy_constant $12 = 0x41800000 (16.0) -copy_constant $13 = 0x41700000 (15.0) -copy_constant $14 = 0x41600000 (14.0) -copy_constant $15 = 0x41500000 (13.0) -copy_constant $16 = 0x41400000 (12.0) -copy_constant $17 = 0x41300000 (11.0) -copy_constant $18 = 0x41200000 (10.0) -copy_constant $19 = 0x41100000 (9.0) -copy_constant $20 = 0x41000000 (8.0) -copy_constant $21 = 0x40E00000 (7.0) -copy_constant $22 = 0x40C00000 (6.0) -copy_constant $23 = 0x40A00000 (5.0) +copy_4_immutables_unmasked $12..15 = i48..51 [0x41800000 (16.0), 0x41700000 (15.0), 0x41600000 (14.0), 0x41500000 (13.0)] +copy_4_immutables_unmasked $16..19 = i52..55 [0x41400000 (12.0), 0x41300000 (11.0), 0x41200000 (10.0), 0x41100000 (9.0)] +copy_4_immutables_unmasked $20..23 = i56..59 [0x41000000 (8.0), 0x40E00000 (7.0), 0x40C00000 (6.0), 0x40A00000 (5.0)] add_n_floats $0..11 += $12..23 copy_4_slots_unmasked _5_m(0..3) = $0..3 copy_4_slots_unmasked _5_m(4..7) = $4..7 @@ -196,9 +273,9 @@ copy_slot_unmasked $0 = _0_ok copy_4_slots_unmasked $1..4 = _5_m(0..3) copy_4_slots_unmasked $5..8 = _5_m(4..7) copy_4_slots_unmasked $9..12 = _5_m(8..11) -splat_4_constants $13..16 = 0x41880000 (17.0) -splat_4_constants $17..20 = 0x41880000 (17.0) -splat_4_constants $21..24 = 0x41880000 (17.0) +copy_4_immutables_unmasked $13..16 = i60..63 [0x41880000 (17.0), 0x41880000 (17.0), 0x41880000 (17.0), 0x41880000 (17.0)] +copy_4_immutables_unmasked $17..20 = i64..67 [0x41880000 (17.0), 0x41880000 (17.0), 0x41880000 (17.0), 0x41880000 (17.0)] +copy_4_immutables_unmasked $21..24 = i68..71 [0x41880000 (17.0), 0x41880000 (17.0), 0x41880000 (17.0), 0x41880000 (17.0)] cmpeq_n_floats $1..12 = equal($1..12, $13..24) bitwise_and_4_ints $5..8 &= $9..12 bitwise_and_4_ints $1..4 &= $5..8 @@ -206,100 +283,59 @@ bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_slot_unmasked _0_ok = $0 -copy_constant _6_m(0) = 0x41200000 (10.0) -copy_constant _6_m(1) = 0x41A00000 (20.0) -copy_constant _6_m(2) = 0x41F00000 (30.0) -copy_constant _6_m(3) = 0x42200000 (40.0) -copy_constant _6_m(4) = 0x42480000 (50.0) -copy_constant _6_m(5) = 0x42700000 (60.0) -copy_constant _6_m(6) = 0x428C0000 (70.0) -copy_constant _6_m(7) = 0x42A00000 (80.0) +copy_4_immutables_unmasked _6_m(0..3) = i72..75 [0x41200000 (10.0), 0x41A00000 (20.0), 0x41F00000 (30.0), 0x42200000 (40.0)] +copy_4_immutables_unmasked _6_m(4..7) = i76..79 [0x42480000 (50.0), 0x42700000 (60.0), 0x428C0000 (70.0), 0x42A00000 (80.0)] copy_4_slots_unmasked $0..3 = _6_m(0..3) copy_4_slots_unmasked $4..7 = _6_m(4..7) -copy_constant $8 = 0x3F800000 (1.0) -copy_constant $9 = 0x40000000 (2.0) -copy_constant $10 = 0x40400000 (3.0) -copy_constant $11 = 0x40800000 (4.0) -copy_constant $12 = 0x40A00000 (5.0) -copy_constant $13 = 0x40C00000 (6.0) -copy_constant $14 = 0x40E00000 (7.0) -copy_constant $15 = 0x41000000 (8.0) +copy_4_immutables_unmasked $8..11 = i36..39 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked $12..15 = i40..43 [0x40A00000 (5.0), 0x40C00000 (6.0), 0x40E00000 (7.0), 0x41000000 (8.0)] sub_n_floats $0..7 -= $8..15 copy_4_slots_unmasked _6_m(0..3) = $0..3 copy_4_slots_unmasked _6_m(4..7) = $4..7 copy_slot_unmasked $0 = _0_ok copy_4_slots_unmasked $1..4 = _6_m(0..3) copy_4_slots_unmasked $5..8 = _6_m(4..7) -copy_constant $9 = 0x41100000 (9.0) -copy_constant $10 = 0x41900000 (18.0) -copy_constant $11 = 0x41D80000 (27.0) -copy_constant $12 = 0x42100000 (36.0) -copy_constant $13 = 0x42340000 (45.0) -copy_constant $14 = 0x42580000 (54.0) -copy_constant $15 = 0x427C0000 (63.0) -copy_constant $16 = 0x42900000 (72.0) +copy_4_immutables_unmasked $9..12 = i80..83 [0x41100000 (9.0), 0x41900000 (18.0), 0x41D80000 (27.0), 0x42100000 (36.0)] +copy_4_immutables_unmasked $13..16 = i84..87 [0x42340000 (45.0), 0x42580000 (54.0), 0x427C0000 (63.0), 0x42900000 (72.0)] cmpeq_n_floats $1..8 = equal($1..8, $9..16) bitwise_and_4_ints $1..4 &= $5..8 bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_slot_unmasked _0_ok = $0 -copy_constant _7_m(0) = 0x41200000 (10.0) -copy_constant _7_m(1) = 0x41A00000 (20.0) -copy_constant _7_m(2) = 0x41F00000 (30.0) -copy_constant _7_m(3) = 0x42200000 (40.0) -copy_constant _7_m(4) = 0x41200000 (10.0) -copy_constant _7_m(5) = 0x41A00000 (20.0) -copy_constant _7_m(6) = 0x41F00000 (30.0) -copy_constant _7_m(7) = 0x42200000 (40.0) +copy_4_immutables_unmasked _7_m(0..3) = i88..91 [0x41200000 (10.0), 0x41A00000 (20.0), 0x41F00000 (30.0), 0x42200000 (40.0)] +copy_4_immutables_unmasked _7_m(4..7) = i92..95 [0x41200000 (10.0), 0x41A00000 (20.0), 0x41F00000 (30.0), 0x42200000 (40.0)] copy_4_slots_unmasked $0..3 = _7_m(0..3) copy_4_slots_unmasked $4..7 = _7_m(4..7) -splat_4_constants $8..11 = 0x41200000 (10.0) -splat_4_constants $12..15 = 0x40A00000 (5.0) +copy_4_immutables_unmasked $8..11 = i96..99 [0x41200000 (10.0), 0x41200000 (10.0), 0x41200000 (10.0), 0x41200000 (10.0)] +copy_4_immutables_unmasked $12..15 = i100..103 [0x40A00000 (5.0), 0x40A00000 (5.0), 0x40A00000 (5.0), 0x40A00000 (5.0)] div_n_floats $0..7 /= $8..15 copy_4_slots_unmasked _7_m(0..3) = $0..3 copy_4_slots_unmasked _7_m(4..7) = $4..7 copy_slot_unmasked $0 = _0_ok copy_4_slots_unmasked $1..4 = _7_m(0..3) copy_4_slots_unmasked $5..8 = _7_m(4..7) -copy_constant $9 = 0x3F800000 (1.0) -copy_constant $10 = 0x40000000 (2.0) -copy_constant $11 = 0x40400000 (3.0) -copy_constant $12 = 0x40800000 (4.0) -copy_constant $13 = 0x40000000 (2.0) -copy_constant $14 = 0x40800000 (4.0) -copy_constant $15 = 0x40C00000 (6.0) -copy_constant $16 = 0x41000000 (8.0) +copy_4_immutables_unmasked $9..12 = i104..107 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked $13..16 = i108..111 [0x40000000 (2.0), 0x40800000 (4.0), 0x40C00000 (6.0), 0x41000000 (8.0)] cmpeq_n_floats $1..8 = equal($1..8, $9..16) bitwise_and_4_ints $1..4 &= $5..8 bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_slot_unmasked _0_ok = $0 -copy_constant _8_m(0) = 0x40E00000 (7.0) -copy_constant _8_m(1) = 0x41100000 (9.0) -copy_constant _8_m(2) = 0x41300000 (11.0) -copy_constant _8_m(3) = 0x41000000 (8.0) -copy_constant _8_m(4) = 0x41200000 (10.0) -copy_constant _8_m(5) = 0x41400000 (12.0) +copy_4_immutables_unmasked _8_m(0..3) = i112..115 [0x40E00000 (7.0), 0x41100000 (9.0), 0x41300000 (11.0), 0x41000000 (8.0)] +copy_2_immutables_unmasked _8_m(4..5) = i116..117 [0x41200000 (10.0), 0x41400000 (12.0)] copy_4_slots_unmasked $6..9 = _8_m(0..3) copy_2_slots_unmasked $10..11 = _8_m(4..5) -copy_constant $12 = 0x3F800000 (1.0) -copy_constant $13 = 0x40800000 (4.0) -copy_constant $14 = 0x40000000 (2.0) -copy_constant $15 = 0x40A00000 (5.0) +copy_4_immutables_unmasked $12..15 = i118..121 [0x3F800000 (1.0), 0x40800000 (4.0), 0x40000000 (2.0), 0x40A00000 (5.0)] matrix_multiply_2 mat2x3($0..5) = mat2x3($6..11) * mat2x2($12..15) copy_4_slots_unmasked _8_m(0..3) = $0..3 copy_2_slots_unmasked _8_m(4..5) = $4..5 copy_slot_unmasked $0 = _0_ok copy_4_slots_unmasked $1..4 = _8_m(0..3) copy_2_slots_unmasked $5..6 = _8_m(4..5) -copy_constant $7 = 0x421C0000 (39.0) -copy_constant $8 = 0x42440000 (49.0) -copy_constant $9 = 0x426C0000 (59.0) -copy_constant $10 = 0x42580000 (54.0) -copy_constant $11 = 0x42880000 (68.0) -copy_constant $12 = 0x42A40000 (82.0) +copy_4_immutables_unmasked $7..10 = i122..125 [0x421C0000 (39.0), 0x42440000 (49.0), 0x426C0000 (59.0), 0x42580000 (54.0)] +copy_2_immutables_unmasked $11..12 = i126..127 [0x42880000 (68.0), 0x42A40000 (82.0)] cmpeq_n_floats $1..6 = equal($1..6, $7..12) bitwise_and_3_ints $1..3 &= $4..6 bitwise_and_int $2 &= $3 @@ -310,25 +346,22 @@ store_condition_mask $26 = CondMask copy_slot_unmasked $27 = _0_ok copy_constant $0 = 0 merge_condition_mask CondMask = $26 & $27 -branch_if_no_lanes_active branch_if_no_lanes_active +284 (label 1 at #571) +branch_if_no_lanes_active branch_if_no_lanes_active +213 (label 1 at #430) copy_constant ok = 0xFFFFFFFF copy_constant $1 = 0 copy_constant $2 = 0x40000000 (2.0) shuffle $1..6 = ($1..6)[1 0 0 1 0 0] copy_4_slots_unmasked m(0..3) = $1..4 copy_2_slots_unmasked m(4..5) = $5..6 -copy_4_slots_unmasked $7..10 = splat_4(0..3) -copy_2_slots_unmasked $11..12 = splat_4(4..5) +copy_4_immutables_unmasked $7..10 = i0..3 [0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_2_immutables_unmasked $11..12 = i4..5 [0x40800000 (4.0), 0x40800000 (4.0)] add_n_floats $1..6 += $7..12 copy_4_slots_masked m(0..3) = Mask($1..4) copy_2_slots_masked m(4..5) = Mask($5..6) -copy_slot_unmasked $1 = ok -copy_4_slots_unmasked $2..5 = m(0..3) -copy_2_slots_unmasked $6..7 = m(4..5) -copy_constant $8 = 0x40C00000 (6.0) -splat_2_constants $9..10 = 0x40800000 (4.0) -copy_constant $11 = 0x40C00000 (6.0) -splat_2_constants $12..13 = 0x40800000 (4.0) +copy_4_slots_unmasked $1..4 = ok, m(0..2) +copy_3_slots_unmasked $5..7 = m(3..5) +copy_4_immutables_unmasked $8..11 = i6..9 [0x40C00000 (6.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40C00000 (6.0)] +copy_2_immutables_unmasked $12..13 = i10..11 [0x40800000 (4.0), 0x40800000 (4.0)] cmpeq_n_floats $2..7 = equal($2..7, $8..13) bitwise_and_3_ints $2..4 &= $5..7 bitwise_and_int $3 &= $4 @@ -340,18 +373,15 @@ copy_constant $2 = 0x40000000 (2.0) shuffle $1..6 = ($1..6)[1 0 0 1 0 0] copy_4_slots_masked m(0..3) = Mask($1..4) copy_2_slots_masked m(4..5) = Mask($5..6) -copy_4_slots_unmasked $7..10 = splat_4(0..3) -copy_2_slots_unmasked $11..12 = splat_4(4..5) +copy_4_immutables_unmasked $7..10 = i0..3 [0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_2_immutables_unmasked $11..12 = i4..5 [0x40800000 (4.0), 0x40800000 (4.0)] sub_n_floats $1..6 -= $7..12 copy_4_slots_masked m(0..3) = Mask($1..4) copy_2_slots_masked m(4..5) = Mask($5..6) -copy_slot_unmasked $1 = ok -copy_4_slots_unmasked $2..5 = m(0..3) -copy_2_slots_unmasked $6..7 = m(4..5) -copy_constant $8 = 0xC0000000 (-2.0) -splat_2_constants $9..10 = 0xC0800000 (-4.0) -copy_constant $11 = 0xC0000000 (-2.0) -splat_2_constants $12..13 = 0xC0800000 (-4.0) +copy_4_slots_unmasked $1..4 = ok, m(0..2) +copy_3_slots_unmasked $5..7 = m(3..5) +copy_4_immutables_unmasked $8..11 = i12..15 [0xC0000000 (-2.0), 0xC0800000 (-4.0), 0xC0800000 (-4.0), 0xC0000000 (-2.0)] +copy_2_immutables_unmasked $12..13 = i16..17 [0xC0800000 (-4.0), 0xC0800000 (-4.0)] cmpeq_n_floats $2..7 = equal($2..7, $8..13) bitwise_and_3_ints $2..4 &= $5..7 bitwise_and_int $3 &= $4 @@ -363,14 +393,13 @@ copy_constant $2 = 0x40000000 (2.0) shuffle $1..6 = ($1..6)[1 0 0 1 0 0] copy_4_slots_masked m(0..3) = Mask($1..4) copy_2_slots_masked m(4..5) = Mask($5..6) -copy_4_slots_unmasked $7..10 = splat_4(0..3) -copy_2_slots_unmasked $11..12 = splat_4(4..5) +copy_4_immutables_unmasked $7..10 = i0..3 [0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_2_immutables_unmasked $11..12 = i4..5 [0x40800000 (4.0), 0x40800000 (4.0)] div_n_floats $1..6 /= $7..12 copy_4_slots_masked m(0..3) = Mask($1..4) copy_2_slots_masked m(4..5) = Mask($5..6) -copy_slot_unmasked $1 = ok -copy_4_slots_unmasked $2..5 = m(0..3) -copy_2_slots_unmasked $6..7 = m(4..5) +copy_4_slots_unmasked $1..4 = ok, m(0..2) +copy_3_slots_unmasked $5..7 = m(3..5) copy_constant $8 = 0 copy_constant $9 = 0x3F000000 (0.5) shuffle $8..13 = ($8..13)[1 0 0 1 0 0] @@ -380,8 +409,8 @@ bitwise_and_int $3 &= $4 bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 copy_slot_masked ok = Mask($1) -copy_4_slots_unmasked m₁(0..3) = splat_4₁(0..3) -copy_2_slots_unmasked m₁(4..5) = splat_4₁(4..5) +copy_4_immutables_unmasked m₁(0..3) = i0..3 [0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_2_immutables_unmasked m₁(4..5) = i4..5 [0x40800000 (4.0), 0x40800000 (4.0)] copy_4_slots_unmasked $1..4 = m₁(0..3) copy_2_slots_unmasked $5..6 = m₁(4..5) copy_constant $7 = 0 @@ -393,18 +422,16 @@ copy_2_slots_masked m₁(4..5) = Mask($5..6) copy_slot_unmasked $1 = ok copy_4_slots_unmasked $2..5 = m₁(0..3) copy_2_slots_unmasked $6..7 = m₁(4..5) -copy_constant $8 = 0x40C00000 (6.0) -splat_3_constants $9..11 = 0x40800000 (4.0) -copy_constant $12 = 0x40C00000 (6.0) -copy_constant $13 = 0x40800000 (4.0) +copy_4_immutables_unmasked $8..11 = i18..21 [0x40C00000 (6.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_2_immutables_unmasked $12..13 = i22..23 [0x40C00000 (6.0), 0x40800000 (4.0)] cmpeq_n_floats $2..7 = equal($2..7, $8..13) bitwise_and_3_ints $2..4 &= $5..7 bitwise_and_int $3 &= $4 bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 copy_slot_masked ok = Mask($1) -copy_4_slots_unmasked $1..4 = splat_4₁(0..3) -copy_2_slots_unmasked $5..6 = splat_4₁(4..5) +copy_4_immutables_unmasked $1..4 = i0..3 [0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_2_immutables_unmasked $5..6 = i4..5 [0x40800000 (4.0), 0x40800000 (4.0)] copy_4_slots_masked m₁(0..3) = Mask($1..4) copy_2_slots_masked m₁(4..5) = Mask($5..6) copy_constant $7 = 0 @@ -416,63 +443,43 @@ copy_2_slots_masked m₁(4..5) = Mask($5..6) copy_slot_unmasked $1 = ok copy_4_slots_unmasked $2..5 = m₁(0..3) copy_2_slots_unmasked $6..7 = m₁(4..5) -copy_constant $8 = 0x40000000 (2.0) -splat_3_constants $9..11 = 0x40800000 (4.0) -copy_constant $12 = 0x40000000 (2.0) -copy_constant $13 = 0x40800000 (4.0) +copy_4_immutables_unmasked $8..11 = i24..27 [0x40000000 (2.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_2_immutables_unmasked $12..13 = i28..29 [0x40000000 (2.0), 0x40800000 (4.0)] cmpeq_n_floats $2..7 = equal($2..7, $8..13) bitwise_and_3_ints $2..4 &= $5..7 bitwise_and_int $3 &= $4 bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 copy_slot_masked ok = Mask($1) -copy_4_slots_unmasked $1..4 = splat_4₁(0..3) -copy_2_slots_unmasked $5..6 = splat_4₁(4..5) +copy_4_immutables_unmasked $1..4 = i0..3 [0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0), 0x40800000 (4.0)] +copy_2_immutables_unmasked $5..6 = i4..5 [0x40800000 (4.0), 0x40800000 (4.0)] copy_4_slots_masked m₁(0..3) = Mask($1..4) copy_2_slots_masked m₁(4..5) = Mask($5..6) -splat_4_constants $7..10 = 0x40000000 (2.0) -splat_2_constants $11..12 = 0x40000000 (2.0) +copy_4_immutables_unmasked $7..10 = i30..33 [0x40000000 (2.0), 0x40000000 (2.0), 0x40000000 (2.0), 0x40000000 (2.0)] +copy_2_immutables_unmasked $11..12 = i34..35 [0x40000000 (2.0), 0x40000000 (2.0)] div_n_floats $1..6 /= $7..12 copy_4_slots_masked m₁(0..3) = Mask($1..4) copy_2_slots_masked m₁(4..5) = Mask($5..6) copy_slot_unmasked $1 = ok copy_4_slots_unmasked $2..5 = m₁(0..3) copy_2_slots_unmasked $6..7 = m₁(4..5) -splat_4_constants $8..11 = 0x40000000 (2.0) -splat_2_constants $12..13 = 0x40000000 (2.0) +copy_4_immutables_unmasked $8..11 = i30..33 [0x40000000 (2.0), 0x40000000 (2.0), 0x40000000 (2.0), 0x40000000 (2.0)] +copy_2_immutables_unmasked $12..13 = i34..35 [0x40000000 (2.0), 0x40000000 (2.0)] cmpeq_n_floats $2..7 = equal($2..7, $8..13) bitwise_and_3_ints $2..4 &= $5..7 bitwise_and_int $3 &= $4 bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 copy_slot_masked ok = Mask($1) -copy_constant m₂(0) = 0x3F800000 (1.0) -copy_constant m₂(1) = 0x40000000 (2.0) -copy_constant m₂(2) = 0x40400000 (3.0) -copy_constant m₂(3) = 0x40800000 (4.0) -copy_constant m₂(4) = 0x40A00000 (5.0) -copy_constant m₂(5) = 0x40C00000 (6.0) -copy_constant m₂(6) = 0x40E00000 (7.0) -copy_constant m₂(7) = 0x41000000 (8.0) -copy_constant m₂(8) = 0x41100000 (9.0) -copy_constant m₂(9) = 0x41200000 (10.0) -copy_constant m₂(10) = 0x41300000 (11.0) -copy_constant m₂(11) = 0x41400000 (12.0) +copy_4_immutables_unmasked m₂(0..3) = i36..39 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked m₂(4..7) = i40..43 [0x40A00000 (5.0), 0x40C00000 (6.0), 0x40E00000 (7.0), 0x41000000 (8.0)] +copy_4_immutables_unmasked m₂(8..11) = i44..47 [0x41100000 (9.0), 0x41200000 (10.0), 0x41300000 (11.0), 0x41400000 (12.0)] copy_4_slots_unmasked $1..4 = m₂(0..3) copy_4_slots_unmasked $5..8 = m₂(4..7) copy_4_slots_unmasked $9..12 = m₂(8..11) -copy_constant $13 = 0x41800000 (16.0) -copy_constant $14 = 0x41700000 (15.0) -copy_constant $15 = 0x41600000 (14.0) -copy_constant $16 = 0x41500000 (13.0) -copy_constant $17 = 0x41400000 (12.0) -copy_constant $18 = 0x41300000 (11.0) -copy_constant $19 = 0x41200000 (10.0) -copy_constant $20 = 0x41100000 (9.0) -copy_constant $21 = 0x41000000 (8.0) -copy_constant $22 = 0x40E00000 (7.0) -copy_constant $23 = 0x40C00000 (6.0) -copy_constant $24 = 0x40A00000 (5.0) +copy_4_immutables_unmasked $13..16 = i48..51 [0x41800000 (16.0), 0x41700000 (15.0), 0x41600000 (14.0), 0x41500000 (13.0)] +copy_4_immutables_unmasked $17..20 = i52..55 [0x41400000 (12.0), 0x41300000 (11.0), 0x41200000 (10.0), 0x41100000 (9.0)] +copy_4_immutables_unmasked $21..24 = i56..59 [0x41000000 (8.0), 0x40E00000 (7.0), 0x40C00000 (6.0), 0x40A00000 (5.0)] add_n_floats $1..12 += $13..24 copy_4_slots_masked m₂(0..3) = Mask($1..4) copy_4_slots_masked m₂(4..7) = Mask($5..8) @@ -481,9 +488,9 @@ copy_slot_unmasked $1 = ok copy_4_slots_unmasked $2..5 = m₂(0..3) copy_4_slots_unmasked $6..9 = m₂(4..7) copy_4_slots_unmasked $10..13 = m₂(8..11) -splat_4_constants $14..17 = 0x41880000 (17.0) -splat_4_constants $18..21 = 0x41880000 (17.0) -splat_4_constants $22..25 = 0x41880000 (17.0) +copy_4_immutables_unmasked $14..17 = i60..63 [0x41880000 (17.0), 0x41880000 (17.0), 0x41880000 (17.0), 0x41880000 (17.0)] +copy_4_immutables_unmasked $18..21 = i64..67 [0x41880000 (17.0), 0x41880000 (17.0), 0x41880000 (17.0), 0x41880000 (17.0)] +copy_4_immutables_unmasked $22..25 = i68..71 [0x41880000 (17.0), 0x41880000 (17.0), 0x41880000 (17.0), 0x41880000 (17.0)] cmpeq_n_floats $2..13 = equal($2..13, $14..25) bitwise_and_4_ints $6..9 &= $10..13 bitwise_and_4_ints $2..5 &= $6..9 @@ -491,101 +498,59 @@ bitwise_and_2_ints $2..3 &= $4..5 bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 copy_slot_masked ok = Mask($1) -copy_constant m₃(0) = 0x41200000 (10.0) -copy_constant m₃(1) = 0x41A00000 (20.0) -copy_constant m₃(2) = 0x41F00000 (30.0) -copy_constant m₃(3) = 0x42200000 (40.0) -copy_constant m₃(4) = 0x42480000 (50.0) -copy_constant m₃(5) = 0x42700000 (60.0) -copy_constant m₃(6) = 0x428C0000 (70.0) -copy_constant m₃(7) = 0x42A00000 (80.0) +copy_4_immutables_unmasked m₃(0..3) = i72..75 [0x41200000 (10.0), 0x41A00000 (20.0), 0x41F00000 (30.0), 0x42200000 (40.0)] +copy_4_immutables_unmasked m₃(4..7) = i76..79 [0x42480000 (50.0), 0x42700000 (60.0), 0x428C0000 (70.0), 0x42A00000 (80.0)] copy_4_slots_unmasked $1..4 = m₃(0..3) copy_4_slots_unmasked $5..8 = m₃(4..7) -copy_constant $9 = 0x3F800000 (1.0) -copy_constant $10 = 0x40000000 (2.0) -copy_constant $11 = 0x40400000 (3.0) -copy_constant $12 = 0x40800000 (4.0) -copy_constant $13 = 0x40A00000 (5.0) -copy_constant $14 = 0x40C00000 (6.0) -copy_constant $15 = 0x40E00000 (7.0) -copy_constant $16 = 0x41000000 (8.0) +copy_4_immutables_unmasked $9..12 = i36..39 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked $13..16 = i40..43 [0x40A00000 (5.0), 0x40C00000 (6.0), 0x40E00000 (7.0), 0x41000000 (8.0)] sub_n_floats $1..8 -= $9..16 copy_4_slots_masked m₃(0..3) = Mask($1..4) copy_4_slots_masked m₃(4..7) = Mask($5..8) copy_slot_unmasked $1 = ok copy_4_slots_unmasked $2..5 = m₃(0..3) copy_4_slots_unmasked $6..9 = m₃(4..7) -copy_constant $10 = 0x41100000 (9.0) -copy_constant $11 = 0x41900000 (18.0) -copy_constant $12 = 0x41D80000 (27.0) -copy_constant $13 = 0x42100000 (36.0) -copy_constant $14 = 0x42340000 (45.0) -copy_constant $15 = 0x42580000 (54.0) -copy_constant $16 = 0x427C0000 (63.0) -copy_constant $17 = 0x42900000 (72.0) +copy_4_immutables_unmasked $10..13 = i80..83 [0x41100000 (9.0), 0x41900000 (18.0), 0x41D80000 (27.0), 0x42100000 (36.0)] +copy_4_immutables_unmasked $14..17 = i84..87 [0x42340000 (45.0), 0x42580000 (54.0), 0x427C0000 (63.0), 0x42900000 (72.0)] cmpeq_n_floats $2..9 = equal($2..9, $10..17) bitwise_and_4_ints $2..5 &= $6..9 -stack_rewind bitwise_and_2_ints $2..3 &= $4..5 bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 copy_slot_masked ok = Mask($1) -copy_constant m₄(0) = 0x41200000 (10.0) -copy_constant m₄(1) = 0x41A00000 (20.0) -copy_constant m₄(2) = 0x41F00000 (30.0) -copy_constant m₄(3) = 0x42200000 (40.0) -copy_constant m₄(4) = 0x41200000 (10.0) -copy_constant m₄(5) = 0x41A00000 (20.0) -copy_constant m₄(6) = 0x41F00000 (30.0) -copy_constant m₄(7) = 0x42200000 (40.0) +copy_4_immutables_unmasked m₄(0..3) = i88..91 [0x41200000 (10.0), 0x41A00000 (20.0), 0x41F00000 (30.0), 0x42200000 (40.0)] +copy_4_immutables_unmasked m₄(4..7) = i92..95 [0x41200000 (10.0), 0x41A00000 (20.0), 0x41F00000 (30.0), 0x42200000 (40.0)] copy_4_slots_unmasked $1..4 = m₄(0..3) copy_4_slots_unmasked $5..8 = m₄(4..7) -splat_4_constants $9..12 = 0x41200000 (10.0) -splat_4_constants $13..16 = 0x40A00000 (5.0) +copy_4_immutables_unmasked $9..12 = i96..99 [0x41200000 (10.0), 0x41200000 (10.0), 0x41200000 (10.0), 0x41200000 (10.0)] +copy_4_immutables_unmasked $13..16 = i100..103 [0x40A00000 (5.0), 0x40A00000 (5.0), 0x40A00000 (5.0), 0x40A00000 (5.0)] div_n_floats $1..8 /= $9..16 copy_4_slots_masked m₄(0..3) = Mask($1..4) copy_4_slots_masked m₄(4..7) = Mask($5..8) copy_slot_unmasked $1 = ok copy_4_slots_unmasked $2..5 = m₄(0..3) copy_4_slots_unmasked $6..9 = m₄(4..7) -copy_constant $10 = 0x3F800000 (1.0) -copy_constant $11 = 0x40000000 (2.0) -copy_constant $12 = 0x40400000 (3.0) -copy_constant $13 = 0x40800000 (4.0) -copy_constant $14 = 0x40000000 (2.0) -copy_constant $15 = 0x40800000 (4.0) -copy_constant $16 = 0x40C00000 (6.0) -copy_constant $17 = 0x41000000 (8.0) +copy_4_immutables_unmasked $10..13 = i104..107 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] +copy_4_immutables_unmasked $14..17 = i108..111 [0x40000000 (2.0), 0x40800000 (4.0), 0x40C00000 (6.0), 0x41000000 (8.0)] cmpeq_n_floats $2..9 = equal($2..9, $10..17) bitwise_and_4_ints $2..5 &= $6..9 bitwise_and_2_ints $2..3 &= $4..5 bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 copy_slot_masked ok = Mask($1) -copy_constant m₅(0) = 0x40E00000 (7.0) -copy_constant m₅(1) = 0x41100000 (9.0) -copy_constant m₅(2) = 0x41300000 (11.0) -copy_constant m₅(3) = 0x41000000 (8.0) -copy_constant m₅(4) = 0x41200000 (10.0) -copy_constant m₅(5) = 0x41400000 (12.0) +copy_4_immutables_unmasked m₅(0..3) = i112..115 [0x40E00000 (7.0), 0x41100000 (9.0), 0x41300000 (11.0), 0x41000000 (8.0)] +copy_2_immutables_unmasked m₅(4..5) = i116..117 [0x41200000 (10.0), 0x41400000 (12.0)] copy_4_slots_unmasked $7..10 = m₅(0..3) copy_2_slots_unmasked $11..12 = m₅(4..5) -copy_constant $13 = 0x3F800000 (1.0) -copy_constant $14 = 0x40800000 (4.0) -copy_constant $15 = 0x40000000 (2.0) -copy_constant $16 = 0x40A00000 (5.0) +copy_4_immutables_unmasked $13..16 = i118..121 [0x3F800000 (1.0), 0x40800000 (4.0), 0x40000000 (2.0), 0x40A00000 (5.0)] matrix_multiply_2 mat2x3($1..6) = mat2x3($7..12) * mat2x2($13..16) copy_4_slots_masked m₅(0..3) = Mask($1..4) copy_2_slots_masked m₅(4..5) = Mask($5..6) copy_slot_unmasked $1 = ok copy_4_slots_unmasked $2..5 = m₅(0..3) copy_2_slots_unmasked $6..7 = m₅(4..5) -copy_constant $8 = 0x421C0000 (39.0) -copy_constant $9 = 0x42440000 (49.0) -copy_constant $10 = 0x426C0000 (59.0) -copy_constant $11 = 0x42580000 (54.0) -copy_constant $12 = 0x42880000 (68.0) -copy_constant $13 = 0x42A40000 (82.0) +copy_4_immutables_unmasked $8..11 = i122..125 [0x421C0000 (39.0), 0x42440000 (49.0), 0x426C0000 (59.0), 0x42580000 (54.0)] +copy_2_immutables_unmasked $12..13 = i126..127 [0x42880000 (68.0), 0x42A40000 (82.0)] cmpeq_n_floats $2..7 = equal($2..7, $8..13) bitwise_and_3_ints $2..4 &= $5..7 bitwise_and_int $3 &= $4 diff --git a/tests/sksl/shared/MatrixOpEqualsES3.wgsl b/tests/sksl/shared/MatrixOpEqualsES3.wgsl new file mode 100644 index 000000000000..bf29d74fab7a --- /dev/null +++ b/tests/sksl/shared/MatrixOpEqualsES3.wgsl @@ -0,0 +1,168 @@ +### Compilation failed: + +error: :28:13 error: no matching overload for operator / (mat3x2, mat3x2) + +4 candidate operators: + operator / (T, T) -> T where: T is abstract-float, abstract-int, f32, i32, u32 or f16 + operator / (vecN, T) -> vecN where: T is abstract-float, abstract-int, f32, i32, u32 or f16 + operator / (T, vecN) -> vecN where: T is abstract-float, abstract-int, f32, i32, u32 or f16 + operator / (vecN, vecN) -> vecN where: T is abstract-float, abstract-int, f32, i32, u32 or f16 + + m = m / splat_4; + ^ + + +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorRed: vec4, + colorGreen: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn test_matrix_op_matrix_half_b() -> bool { + { + var ok: bool = true; + { + const splat_4: mat3x2 = mat3x2(4.0, 4.0, 4.0, 4.0, 4.0, 4.0); + var m: mat3x2 = mat3x2(2.0, 0.0, 0.0, 2.0, 0.0, 0.0); + m = m + splat_4; + let _skTemp0 = mat3x2(6.0, 4.0, 4.0, 6.0, 4.0, 4.0); + ok = ok && (all(m[0] == _skTemp0[0]) && all(m[1] == _skTemp0[1]) && all(m[2] == _skTemp0[2])); + m = mat3x2(2.0, 0.0, 0.0, 2.0, 0.0, 0.0); + m = m - splat_4; + let _skTemp1 = mat3x2(-2.0, -4.0, -4.0, -2.0, -4.0, -4.0); + ok = ok && (all(m[0] == _skTemp1[0]) && all(m[1] == _skTemp1[1]) && all(m[2] == _skTemp1[2])); + m = mat3x2(2.0, 0.0, 0.0, 2.0, 0.0, 0.0); + m = m / splat_4; + let _skTemp2 = mat3x2(0.5, 0.0, 0.0, 0.5, 0.0, 0.0); + ok = ok && (all(m[0] == _skTemp2[0]) && all(m[1] == _skTemp2[1]) && all(m[2] == _skTemp2[2])); + } + { + const splat_4: mat2x3 = mat2x3(4.0, 4.0, 4.0, 4.0, 4.0, 4.0); + var m: mat2x3 = splat_4; + m = m + mat2x3(2.0, 0.0, 0.0, 0.0, 2.0, 0.0); + let _skTemp3 = mat2x3(6.0, 4.0, 4.0, 4.0, 6.0, 4.0); + ok = ok && (all(m[0] == _skTemp3[0]) && all(m[1] == _skTemp3[1])); + m = splat_4; + m = m - mat2x3(2.0, 0.0, 0.0, 0.0, 2.0, 0.0); + let _skTemp4 = mat2x3(2.0, 4.0, 4.0, 4.0, 2.0, 4.0); + ok = ok && (all(m[0] == _skTemp4[0]) && all(m[1] == _skTemp4[1])); + m = splat_4; + m = m / mat2x3(2.0, 2.0, 2.0, 2.0, 2.0, 2.0); + let _skTemp5 = mat2x3(2.0, 2.0, 2.0, 2.0, 2.0, 2.0); + ok = ok && (all(m[0] == _skTemp5[0]) && all(m[1] == _skTemp5[1])); + } + { + var m: mat4x3 = mat4x3(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0); + m = m + mat4x3(16.0, 15.0, 14.0, 13.0, 12.0, 11.0, 10.0, 9.0, 8.0, 7.0, 6.0, 5.0); + let _skTemp6 = mat4x3(17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0); + ok = ok && (all(m[0] == _skTemp6[0]) && all(m[1] == _skTemp6[1]) && all(m[2] == _skTemp6[2]) && all(m[3] == _skTemp6[3])); + } + { + var m: mat4x2 = mat4x2(10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0); + m = m - mat4x2(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0); + let _skTemp7 = mat4x2(9.0, 18.0, 27.0, 36.0, 45.0, 54.0, 63.0, 72.0); + ok = ok && (all(m[0] == _skTemp7[0]) && all(m[1] == _skTemp7[1]) && all(m[2] == _skTemp7[2]) && all(m[3] == _skTemp7[3])); + } + { + var m: mat2x4 = mat2x4(10.0, 20.0, 30.0, 40.0, 10.0, 20.0, 30.0, 40.0); + m = m / mat2x4(10.0, 10.0, 10.0, 10.0, 5.0, 5.0, 5.0, 5.0); + let _skTemp8 = mat2x4(1.0, 2.0, 3.0, 4.0, 2.0, 4.0, 6.0, 8.0); + ok = ok && (all(m[0] == _skTemp8[0]) && all(m[1] == _skTemp8[1])); + } + { + var m: mat2x3 = mat2x3(7.0, 9.0, 11.0, 8.0, 10.0, 12.0); + m = m * mat2x2(1.0, 4.0, 2.0, 5.0); + let _skTemp9 = mat2x3(39.0, 49.0, 59.0, 54.0, 68.0, 82.0); + ok = ok && (all(m[0] == _skTemp9[0]) && all(m[1] == _skTemp9[1])); + } + return ok; + } +} +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var _0_ok: bool = true; + { + const _1_splat_4: mat3x2 = mat3x2(4.0, 4.0, 4.0, 4.0, 4.0, 4.0); + var _2_m: mat3x2 = mat3x2(2.0, 0.0, 0.0, 2.0, 0.0, 0.0); + _2_m = _2_m + _1_splat_4; + let _skTemp10 = mat3x2(6.0, 4.0, 4.0, 6.0, 4.0, 4.0); + _0_ok = _0_ok && (all(_2_m[0] == _skTemp10[0]) && all(_2_m[1] == _skTemp10[1]) && all(_2_m[2] == _skTemp10[2])); + _2_m = mat3x2(2.0, 0.0, 0.0, 2.0, 0.0, 0.0); + _2_m = _2_m - _1_splat_4; + let _skTemp11 = mat3x2(-2.0, -4.0, -4.0, -2.0, -4.0, -4.0); + _0_ok = _0_ok && (all(_2_m[0] == _skTemp11[0]) && all(_2_m[1] == _skTemp11[1]) && all(_2_m[2] == _skTemp11[2])); + _2_m = mat3x2(2.0, 0.0, 0.0, 2.0, 0.0, 0.0); + _2_m = _2_m / _1_splat_4; + let _skTemp12 = mat3x2(0.5, 0.0, 0.0, 0.5, 0.0, 0.0); + _0_ok = _0_ok && (all(_2_m[0] == _skTemp12[0]) && all(_2_m[1] == _skTemp12[1]) && all(_2_m[2] == _skTemp12[2])); + } + { + const _3_splat_4: mat2x3 = mat2x3(4.0, 4.0, 4.0, 4.0, 4.0, 4.0); + var _4_m: mat2x3 = _3_splat_4; + _4_m = _4_m + mat2x3(2.0, 0.0, 0.0, 0.0, 2.0, 0.0); + let _skTemp13 = mat2x3(6.0, 4.0, 4.0, 4.0, 6.0, 4.0); + _0_ok = _0_ok && (all(_4_m[0] == _skTemp13[0]) && all(_4_m[1] == _skTemp13[1])); + _4_m = _3_splat_4; + _4_m = _4_m - mat2x3(2.0, 0.0, 0.0, 0.0, 2.0, 0.0); + let _skTemp14 = mat2x3(2.0, 4.0, 4.0, 4.0, 2.0, 4.0); + _0_ok = _0_ok && (all(_4_m[0] == _skTemp14[0]) && all(_4_m[1] == _skTemp14[1])); + _4_m = _3_splat_4; + _4_m = _4_m / mat2x3(2.0, 2.0, 2.0, 2.0, 2.0, 2.0); + let _skTemp15 = mat2x3(2.0, 2.0, 2.0, 2.0, 2.0, 2.0); + _0_ok = _0_ok && (all(_4_m[0] == _skTemp15[0]) && all(_4_m[1] == _skTemp15[1])); + } + { + var _5_m: mat4x3 = mat4x3(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0); + _5_m = _5_m + mat4x3(16.0, 15.0, 14.0, 13.0, 12.0, 11.0, 10.0, 9.0, 8.0, 7.0, 6.0, 5.0); + let _skTemp16 = mat4x3(17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0); + _0_ok = _0_ok && (all(_5_m[0] == _skTemp16[0]) && all(_5_m[1] == _skTemp16[1]) && all(_5_m[2] == _skTemp16[2]) && all(_5_m[3] == _skTemp16[3])); + } + { + var _6_m: mat4x2 = mat4x2(10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0); + _6_m = _6_m - mat4x2(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0); + let _skTemp17 = mat4x2(9.0, 18.0, 27.0, 36.0, 45.0, 54.0, 63.0, 72.0); + _0_ok = _0_ok && (all(_6_m[0] == _skTemp17[0]) && all(_6_m[1] == _skTemp17[1]) && all(_6_m[2] == _skTemp17[2]) && all(_6_m[3] == _skTemp17[3])); + } + { + var _7_m: mat2x4 = mat2x4(10.0, 20.0, 30.0, 40.0, 10.0, 20.0, 30.0, 40.0); + _7_m = _7_m / mat2x4(10.0, 10.0, 10.0, 10.0, 5.0, 5.0, 5.0, 5.0); + let _skTemp18 = mat2x4(1.0, 2.0, 3.0, 4.0, 2.0, 4.0, 6.0, 8.0); + _0_ok = _0_ok && (all(_7_m[0] == _skTemp18[0]) && all(_7_m[1] == _skTemp18[1])); + } + { + var _8_m: mat2x3 = mat2x3(7.0, 9.0, 11.0, 8.0, 10.0, 12.0); + _8_m = _8_m * mat2x2(1.0, 4.0, 2.0, 5.0); + let _skTemp19 = mat2x3(39.0, 49.0, 59.0, 54.0, 68.0, 82.0); + _0_ok = _0_ok && (all(_8_m[0] == _skTemp19[0]) && all(_8_m[1] == _skTemp19[1])); + } + var _skTemp20: vec4; + var _skTemp21: bool; + if _0_ok { + let _skTemp22 = test_matrix_op_matrix_half_b(); + _skTemp21 = _skTemp22; + } else { + _skTemp21 = false; + } + if _skTemp21 { + _skTemp20 = _globalUniforms.colorGreen; + } else { + _skTemp20 = _globalUniforms.colorRed; + } + return _skTemp20; + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} + +1 error diff --git a/tests/sksl/shared/MatrixScalarMath.asm.frag b/tests/sksl/shared/MatrixScalarMath.asm.frag index b3dc135146d2..7184b262b688 100644 --- a/tests/sksl/shared/MatrixScalarMath.asm.frag +++ b/tests/sksl/shared/MatrixScalarMath.asm.frag @@ -1,468 +1,468 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpMemberName %_UniformBuffer 2 "testInputs" -OpName %_entrypoint_v "_entrypoint_v" -OpName %test_bifffff22 "test_bifffff22" -OpName %one "one" -OpName %m2 "m2" -OpName %divisionTest_b "divisionTest_b" -OpName %ten "ten" -OpName %mat "mat" -OpName %div "div" -OpName %main "main" -OpName %f1 "f1" -OpName %f2 "f2" -OpName %f3 "f3" -OpName %f4 "f4" -OpName %_0_expected "_0_expected" -OpName %_1_one "_1_one" -OpName %_2_m2 "_2_m2" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpDecorate %_UniformBuffer Block -OpDecorate %12 Binding 0 -OpDecorate %12 DescriptorSet 0 -OpDecorate %42 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %123 RelaxedPrecision -OpDecorate %124 RelaxedPrecision -OpDecorate %126 RelaxedPrecision -OpDecorate %173 RelaxedPrecision -OpDecorate %174 RelaxedPrecision -OpDecorate %177 RelaxedPrecision -OpDecorate %178 RelaxedPrecision -OpDecorate %179 RelaxedPrecision -OpDecorate %183 RelaxedPrecision -OpDecorate %184 RelaxedPrecision -OpDecorate %185 RelaxedPrecision -OpDecorate %189 RelaxedPrecision -OpDecorate %190 RelaxedPrecision -OpDecorate %191 RelaxedPrecision -OpDecorate %202 RelaxedPrecision -OpDecorate %203 RelaxedPrecision -OpDecorate %315 RelaxedPrecision -OpDecorate %317 RelaxedPrecision -OpDecorate %318 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpMemberName %_UniformBuffer 2 "testInputs" + OpName %_entrypoint_v "_entrypoint_v" + OpName %test_bifffff22 "test_bifffff22" + OpName %one "one" + OpName %m2 "m2" + OpName %divisionTest_b "divisionTest_b" + OpName %ten "ten" + OpName %mat "mat" + OpName %div "div" + OpName %main "main" + OpName %f1 "f1" + OpName %f2 "f2" + OpName %f3 "f3" + OpName %f4 "f4" + OpName %_0_expected "_0_expected" + OpName %_1_one "_1_one" + OpName %_2_m2 "_2_m2" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpDecorate %_UniformBuffer Block + OpDecorate %12 Binding 0 + OpDecorate %12 DescriptorSet 0 + OpDecorate %42 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %123 RelaxedPrecision + OpDecorate %124 RelaxedPrecision + OpDecorate %126 RelaxedPrecision + OpDecorate %173 RelaxedPrecision + OpDecorate %174 RelaxedPrecision + OpDecorate %177 RelaxedPrecision + OpDecorate %178 RelaxedPrecision + OpDecorate %179 RelaxedPrecision + OpDecorate %183 RelaxedPrecision + OpDecorate %184 RelaxedPrecision + OpDecorate %185 RelaxedPrecision + OpDecorate %189 RelaxedPrecision + OpDecorate %190 RelaxedPrecision + OpDecorate %191 RelaxedPrecision + OpDecorate %202 RelaxedPrecision + OpDecorate %203 RelaxedPrecision + OpDecorate %315 RelaxedPrecision + OpDecorate %317 RelaxedPrecision + OpDecorate %318 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%12 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%17 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%21 = OpConstantComposite %v2float %float_0 %float_0 + %12 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %17 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %21 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%int = OpTypeInt 32 1 + %int = OpTypeInt 32 1 %_ptr_Function_int = OpTypePointer Function %int %_ptr_Function_float = OpTypePointer Function %float %mat2v2float = OpTypeMatrix %v2float 2 %_ptr_Function_mat2v2float = OpTypePointer Function %mat2v2float -%30 = OpTypeFunction %bool %_ptr_Function_int %_ptr_Function_float %_ptr_Function_float %_ptr_Function_float %_ptr_Function_float %_ptr_Function_mat2v2float + %30 = OpTypeFunction %bool %_ptr_Function_int %_ptr_Function_float %_ptr_Function_float %_ptr_Function_float %_ptr_Function_float %_ptr_Function_mat2v2float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_1 = OpConstant %int 1 -%float_1 = OpConstant %float 1 -%63 = OpConstantComposite %v2float %float_1 %float_1 -%64 = OpConstantComposite %mat2v2float %63 %63 -%float_2 = OpConstant %float 2 -%float_0_5 = OpConstant %float 0.5 -%false = OpConstantFalse %bool -%int_0 = OpConstant %int 0 -%119 = OpTypeFunction %bool -%float_10 = OpConstant %float 10 -%int_2 = OpConstant %int 2 -%float_8 = OpConstant %float 8 -%151 = OpConstantComposite %v4float %float_8 %float_8 %float_8 %float_8 + %int_1 = OpConstant %int 1 + %float_1 = OpConstant %float 1 + %63 = OpConstantComposite %v2float %float_1 %float_1 + %64 = OpConstantComposite %mat2v2float %63 %63 + %float_2 = OpConstant %float 2 + %float_0_5 = OpConstant %float 0.5 + %false = OpConstantFalse %bool + %int_0 = OpConstant %int 0 + %119 = OpTypeFunction %bool + %float_10 = OpConstant %float 10 + %int_2 = OpConstant %int 2 + %float_8 = OpConstant %float 8 + %151 = OpConstantComposite %v4float %float_8 %float_8 %float_8 %float_8 %float_0_00999999978 = OpConstant %float 0.00999999978 -%154 = OpConstantComposite %v4float %float_0_00999999978 %float_0_00999999978 %float_0_00999999978 %float_0_00999999978 -%v4bool = OpTypeVector %bool 4 -%168 = OpTypeFunction %v4float %_ptr_Function_v2float -%float_3 = OpConstant %float 3 -%float_4 = OpConstant %float 4 -%int_3 = OpConstant %int 3 -%int_4 = OpConstant %int 4 + %154 = OpConstantComposite %v4float %float_0_00999999978 %float_0_00999999978 %float_0_00999999978 %float_0_00999999978 + %v4bool = OpTypeVector %bool 4 + %168 = OpTypeFunction %v4float %_ptr_Function_v2float + %float_3 = OpConstant %float 3 + %float_4 = OpConstant %float 4 + %int_3 = OpConstant %int 3 + %int_4 = OpConstant %int 4 %_ptr_Function_v4float = OpTypePointer Function %v4float %_entrypoint_v = OpFunction %void None %17 -%18 = OpLabel -%22 = OpVariable %_ptr_Function_v2float Function -OpStore %22 %21 -%24 = OpFunctionCall %v4float %main %22 -OpStore %sk_FragColor %24 -OpReturn -OpFunctionEnd + %18 = OpLabel + %22 = OpVariable %_ptr_Function_v2float Function + OpStore %22 %21 + %24 = OpFunctionCall %v4float %main %22 + OpStore %sk_FragColor %24 + OpReturn + OpFunctionEnd %test_bifffff22 = OpFunction %bool None %30 -%31 = OpFunctionParameter %_ptr_Function_int -%32 = OpFunctionParameter %_ptr_Function_float -%33 = OpFunctionParameter %_ptr_Function_float -%34 = OpFunctionParameter %_ptr_Function_float -%35 = OpFunctionParameter %_ptr_Function_float -%36 = OpFunctionParameter %_ptr_Function_mat2v2float -%37 = OpLabel -%one = OpVariable %_ptr_Function_float Function -%m2 = OpVariable %_ptr_Function_mat2v2float Function -%39 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1 -%42 = OpLoad %v4float %39 -%43 = OpCompositeExtract %float %42 0 -OpStore %one %43 -%45 = OpLoad %float %32 -%46 = OpFMul %float %45 %43 -%47 = OpLoad %float %33 -%48 = OpFMul %float %47 %43 -%49 = OpLoad %float %34 -%50 = OpFMul %float %49 %43 -%51 = OpLoad %float %35 -%52 = OpFMul %float %51 %43 -%53 = OpCompositeConstruct %v2float %46 %48 -%54 = OpCompositeConstruct %v2float %50 %52 -%55 = OpCompositeConstruct %mat2v2float %53 %54 -OpStore %m2 %55 -%56 = OpLoad %int %31 -OpSelectionMerge %57 None -OpSwitch %56 %57 1 %58 2 %59 3 %60 4 %61 -%58 = OpLabel -%65 = OpFAdd %v2float %53 %63 -%66 = OpFAdd %v2float %54 %63 -%67 = OpCompositeConstruct %mat2v2float %65 %66 -OpStore %m2 %67 -OpBranch %57 -%59 = OpLabel -%68 = OpLoad %mat2v2float %m2 -%69 = OpCompositeExtract %v2float %68 0 -%70 = OpFSub %v2float %69 %63 -%71 = OpCompositeExtract %v2float %68 1 -%72 = OpFSub %v2float %71 %63 -%73 = OpCompositeConstruct %mat2v2float %70 %72 -OpStore %m2 %73 -OpBranch %57 -%60 = OpLabel -%74 = OpLoad %mat2v2float %m2 -%76 = OpMatrixTimesScalar %mat2v2float %74 %float_2 -OpStore %m2 %76 -OpBranch %57 -%61 = OpLabel -%77 = OpLoad %mat2v2float %m2 -%79 = OpMatrixTimesScalar %mat2v2float %77 %float_0_5 -OpStore %m2 %79 -OpBranch %57 -%57 = OpLabel -%82 = OpAccessChain %_ptr_Function_v2float %m2 %int_0 -%83 = OpLoad %v2float %82 -%84 = OpCompositeExtract %float %83 0 -%85 = OpAccessChain %_ptr_Function_v2float %36 %int_0 -%86 = OpLoad %v2float %85 -%87 = OpCompositeExtract %float %86 0 -%88 = OpFOrdEqual %bool %84 %87 -OpSelectionMerge %90 None -OpBranchConditional %88 %89 %90 -%89 = OpLabel -%91 = OpAccessChain %_ptr_Function_v2float %m2 %int_0 -%92 = OpLoad %v2float %91 -%93 = OpCompositeExtract %float %92 1 -%94 = OpAccessChain %_ptr_Function_v2float %36 %int_0 -%95 = OpLoad %v2float %94 -%96 = OpCompositeExtract %float %95 1 -%97 = OpFOrdEqual %bool %93 %96 -OpBranch %90 -%90 = OpLabel -%98 = OpPhi %bool %false %57 %97 %89 -OpSelectionMerge %100 None -OpBranchConditional %98 %99 %100 -%99 = OpLabel -%101 = OpAccessChain %_ptr_Function_v2float %m2 %int_1 -%102 = OpLoad %v2float %101 -%103 = OpCompositeExtract %float %102 0 -%104 = OpAccessChain %_ptr_Function_v2float %36 %int_1 -%105 = OpLoad %v2float %104 -%106 = OpCompositeExtract %float %105 0 -%107 = OpFOrdEqual %bool %103 %106 -OpBranch %100 -%100 = OpLabel -%108 = OpPhi %bool %false %90 %107 %99 -OpSelectionMerge %110 None -OpBranchConditional %108 %109 %110 -%109 = OpLabel -%111 = OpAccessChain %_ptr_Function_v2float %m2 %int_1 -%112 = OpLoad %v2float %111 -%113 = OpCompositeExtract %float %112 1 -%114 = OpAccessChain %_ptr_Function_v2float %36 %int_1 -%115 = OpLoad %v2float %114 -%116 = OpCompositeExtract %float %115 1 -%117 = OpFOrdEqual %bool %113 %116 -OpBranch %110 -%110 = OpLabel -%118 = OpPhi %bool %false %100 %117 %109 -OpReturnValue %118 -OpFunctionEnd + %31 = OpFunctionParameter %_ptr_Function_int + %32 = OpFunctionParameter %_ptr_Function_float + %33 = OpFunctionParameter %_ptr_Function_float + %34 = OpFunctionParameter %_ptr_Function_float + %35 = OpFunctionParameter %_ptr_Function_float + %36 = OpFunctionParameter %_ptr_Function_mat2v2float + %37 = OpLabel + %one = OpVariable %_ptr_Function_float Function + %m2 = OpVariable %_ptr_Function_mat2v2float Function + %39 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1 + %42 = OpLoad %v4float %39 + %43 = OpCompositeExtract %float %42 0 + OpStore %one %43 + %45 = OpLoad %float %32 + %46 = OpFMul %float %45 %43 + %47 = OpLoad %float %33 + %48 = OpFMul %float %47 %43 + %49 = OpLoad %float %34 + %50 = OpFMul %float %49 %43 + %51 = OpLoad %float %35 + %52 = OpFMul %float %51 %43 + %53 = OpCompositeConstruct %v2float %46 %48 + %54 = OpCompositeConstruct %v2float %50 %52 + %55 = OpCompositeConstruct %mat2v2float %53 %54 + OpStore %m2 %55 + %56 = OpLoad %int %31 + OpSelectionMerge %57 None + OpSwitch %56 %57 1 %58 2 %59 3 %60 4 %61 + %58 = OpLabel + %65 = OpFAdd %v2float %63 %53 + %66 = OpFAdd %v2float %63 %54 + %67 = OpCompositeConstruct %mat2v2float %65 %66 + OpStore %m2 %67 + OpBranch %57 + %59 = OpLabel + %68 = OpLoad %mat2v2float %m2 + %69 = OpCompositeExtract %v2float %68 0 + %70 = OpFSub %v2float %69 %63 + %71 = OpCompositeExtract %v2float %68 1 + %72 = OpFSub %v2float %71 %63 + %73 = OpCompositeConstruct %mat2v2float %70 %72 + OpStore %m2 %73 + OpBranch %57 + %60 = OpLabel + %74 = OpLoad %mat2v2float %m2 + %76 = OpMatrixTimesScalar %mat2v2float %74 %float_2 + OpStore %m2 %76 + OpBranch %57 + %61 = OpLabel + %77 = OpLoad %mat2v2float %m2 + %79 = OpMatrixTimesScalar %mat2v2float %77 %float_0_5 + OpStore %m2 %79 + OpBranch %57 + %57 = OpLabel + %82 = OpAccessChain %_ptr_Function_v2float %m2 %int_0 + %83 = OpLoad %v2float %82 + %84 = OpCompositeExtract %float %83 0 + %85 = OpAccessChain %_ptr_Function_v2float %36 %int_0 + %86 = OpLoad %v2float %85 + %87 = OpCompositeExtract %float %86 0 + %88 = OpFOrdEqual %bool %84 %87 + OpSelectionMerge %90 None + OpBranchConditional %88 %89 %90 + %89 = OpLabel + %91 = OpAccessChain %_ptr_Function_v2float %m2 %int_0 + %92 = OpLoad %v2float %91 + %93 = OpCompositeExtract %float %92 1 + %94 = OpAccessChain %_ptr_Function_v2float %36 %int_0 + %95 = OpLoad %v2float %94 + %96 = OpCompositeExtract %float %95 1 + %97 = OpFOrdEqual %bool %93 %96 + OpBranch %90 + %90 = OpLabel + %98 = OpPhi %bool %false %57 %97 %89 + OpSelectionMerge %100 None + OpBranchConditional %98 %99 %100 + %99 = OpLabel + %101 = OpAccessChain %_ptr_Function_v2float %m2 %int_1 + %102 = OpLoad %v2float %101 + %103 = OpCompositeExtract %float %102 0 + %104 = OpAccessChain %_ptr_Function_v2float %36 %int_1 + %105 = OpLoad %v2float %104 + %106 = OpCompositeExtract %float %105 0 + %107 = OpFOrdEqual %bool %103 %106 + OpBranch %100 + %100 = OpLabel + %108 = OpPhi %bool %false %90 %107 %99 + OpSelectionMerge %110 None + OpBranchConditional %108 %109 %110 + %109 = OpLabel + %111 = OpAccessChain %_ptr_Function_v2float %m2 %int_1 + %112 = OpLoad %v2float %111 + %113 = OpCompositeExtract %float %112 1 + %114 = OpAccessChain %_ptr_Function_v2float %36 %int_1 + %115 = OpLoad %v2float %114 + %116 = OpCompositeExtract %float %115 1 + %117 = OpFOrdEqual %bool %113 %116 + OpBranch %110 + %110 = OpLabel + %118 = OpPhi %bool %false %100 %117 %109 + OpReturnValue %118 + OpFunctionEnd %divisionTest_b = OpFunction %bool None %119 -%120 = OpLabel -%ten = OpVariable %_ptr_Function_float Function -%mat = OpVariable %_ptr_Function_mat2v2float Function -%div = OpVariable %_ptr_Function_mat2v2float Function -%122 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1 -%123 = OpLoad %v4float %122 -%124 = OpCompositeExtract %float %123 0 -%126 = OpFMul %float %124 %float_10 -OpStore %ten %126 -%128 = OpCompositeConstruct %v2float %126 %126 -%129 = OpCompositeConstruct %mat2v2float %128 %128 -OpStore %mat %129 -%131 = OpAccessChain %_ptr_Uniform_v4float %12 %int_2 -%133 = OpLoad %v4float %131 -%134 = OpCompositeExtract %float %133 0 -%135 = OpFDiv %float %float_1 %134 -%136 = OpMatrixTimesScalar %mat2v2float %129 %135 -OpStore %div %136 -%137 = OpAccessChain %_ptr_Uniform_v4float %12 %int_2 -%138 = OpLoad %v4float %137 -%139 = OpCompositeExtract %float %138 0 -%140 = OpFDiv %float %float_1 %139 -%141 = OpMatrixTimesScalar %mat2v2float %129 %140 -OpStore %mat %141 -%145 = OpCompositeExtract %float %136 0 0 -%146 = OpCompositeExtract %float %136 0 1 -%147 = OpCompositeExtract %float %136 1 0 -%148 = OpCompositeExtract %float %136 1 1 -%149 = OpCompositeConstruct %v4float %145 %146 %147 %148 -%152 = OpFAdd %v4float %149 %151 -%144 = OpExtInst %v4float %1 FAbs %152 -%143 = OpFOrdLessThan %v4bool %144 %154 -%142 = OpAll %bool %143 -OpSelectionMerge %157 None -OpBranchConditional %142 %156 %157 -%156 = OpLabel -%161 = OpCompositeExtract %float %141 0 0 -%162 = OpCompositeExtract %float %141 0 1 -%163 = OpCompositeExtract %float %141 1 0 -%164 = OpCompositeExtract %float %141 1 1 -%165 = OpCompositeConstruct %v4float %161 %162 %163 %164 -%166 = OpFAdd %v4float %165 %151 -%160 = OpExtInst %v4float %1 FAbs %166 -%159 = OpFOrdLessThan %v4bool %160 %154 -%158 = OpAll %bool %159 -OpBranch %157 -%157 = OpLabel -%167 = OpPhi %bool %false %120 %158 %156 -OpReturnValue %167 -OpFunctionEnd -%main = OpFunction %v4float None %168 -%169 = OpFunctionParameter %_ptr_Function_v2float -%170 = OpLabel -%f1 = OpVariable %_ptr_Function_float Function -%f2 = OpVariable %_ptr_Function_float Function -%f3 = OpVariable %_ptr_Function_float Function -%f4 = OpVariable %_ptr_Function_float Function + %120 = OpLabel + %ten = OpVariable %_ptr_Function_float Function + %mat = OpVariable %_ptr_Function_mat2v2float Function + %div = OpVariable %_ptr_Function_mat2v2float Function + %122 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1 + %123 = OpLoad %v4float %122 + %124 = OpCompositeExtract %float %123 0 + %126 = OpFMul %float %124 %float_10 + OpStore %ten %126 + %128 = OpCompositeConstruct %v2float %126 %126 + %129 = OpCompositeConstruct %mat2v2float %128 %128 + OpStore %mat %129 + %131 = OpAccessChain %_ptr_Uniform_v4float %12 %int_2 + %133 = OpLoad %v4float %131 + %134 = OpCompositeExtract %float %133 0 + %135 = OpFDiv %float %float_1 %134 + %136 = OpMatrixTimesScalar %mat2v2float %129 %135 + OpStore %div %136 + %137 = OpAccessChain %_ptr_Uniform_v4float %12 %int_2 + %138 = OpLoad %v4float %137 + %139 = OpCompositeExtract %float %138 0 + %140 = OpFDiv %float %float_1 %139 + %141 = OpMatrixTimesScalar %mat2v2float %129 %140 + OpStore %mat %141 + %145 = OpCompositeExtract %float %136 0 0 + %146 = OpCompositeExtract %float %136 0 1 + %147 = OpCompositeExtract %float %136 1 0 + %148 = OpCompositeExtract %float %136 1 1 + %149 = OpCompositeConstruct %v4float %145 %146 %147 %148 + %152 = OpFAdd %v4float %149 %151 + %144 = OpExtInst %v4float %1 FAbs %152 + %143 = OpFOrdLessThan %v4bool %144 %154 + %142 = OpAll %bool %143 + OpSelectionMerge %157 None + OpBranchConditional %142 %156 %157 + %156 = OpLabel + %161 = OpCompositeExtract %float %141 0 0 + %162 = OpCompositeExtract %float %141 0 1 + %163 = OpCompositeExtract %float %141 1 0 + %164 = OpCompositeExtract %float %141 1 1 + %165 = OpCompositeConstruct %v4float %161 %162 %163 %164 + %166 = OpFAdd %v4float %165 %151 + %160 = OpExtInst %v4float %1 FAbs %166 + %159 = OpFOrdLessThan %v4bool %160 %154 + %158 = OpAll %bool %159 + OpBranch %157 + %157 = OpLabel + %167 = OpPhi %bool %false %120 %158 %156 + OpReturnValue %167 + OpFunctionEnd + %main = OpFunction %v4float None %168 + %169 = OpFunctionParameter %_ptr_Function_v2float + %170 = OpLabel + %f1 = OpVariable %_ptr_Function_float Function + %f2 = OpVariable %_ptr_Function_float Function + %f3 = OpVariable %_ptr_Function_float Function + %f4 = OpVariable %_ptr_Function_float Function %_0_expected = OpVariable %_ptr_Function_mat2v2float Function -%_1_one = OpVariable %_ptr_Function_float Function -%_2_m2 = OpVariable %_ptr_Function_mat2v2float Function -%254 = OpVariable %_ptr_Function_int Function -%255 = OpVariable %_ptr_Function_float Function -%256 = OpVariable %_ptr_Function_float Function -%257 = OpVariable %_ptr_Function_float Function -%258 = OpVariable %_ptr_Function_float Function -%266 = OpVariable %_ptr_Function_mat2v2float Function -%272 = OpVariable %_ptr_Function_int Function -%273 = OpVariable %_ptr_Function_float Function -%274 = OpVariable %_ptr_Function_float Function -%275 = OpVariable %_ptr_Function_float Function -%276 = OpVariable %_ptr_Function_float Function -%284 = OpVariable %_ptr_Function_mat2v2float Function -%290 = OpVariable %_ptr_Function_int Function -%291 = OpVariable %_ptr_Function_float Function -%292 = OpVariable %_ptr_Function_float Function -%293 = OpVariable %_ptr_Function_float Function -%294 = OpVariable %_ptr_Function_float Function -%302 = OpVariable %_ptr_Function_mat2v2float Function -%309 = OpVariable %_ptr_Function_v4float Function -%172 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 -%173 = OpLoad %v4float %172 -%174 = OpCompositeExtract %float %173 1 -OpStore %f1 %174 -%176 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 -%177 = OpLoad %v4float %176 -%178 = OpCompositeExtract %float %177 1 -%179 = OpFMul %float %float_2 %178 -OpStore %f2 %179 -%182 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 -%183 = OpLoad %v4float %182 -%184 = OpCompositeExtract %float %183 1 -%185 = OpFMul %float %float_3 %184 -OpStore %f3 %185 -%188 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 -%189 = OpLoad %v4float %188 -%190 = OpCompositeExtract %float %189 1 -%191 = OpFMul %float %float_4 %190 -OpStore %f4 %191 -%193 = OpFAdd %float %174 %float_1 -%194 = OpFAdd %float %179 %float_1 -%195 = OpFAdd %float %185 %float_1 -%196 = OpFAdd %float %191 %float_1 -%197 = OpCompositeConstruct %v2float %193 %194 -%198 = OpCompositeConstruct %v2float %195 %196 -%199 = OpCompositeConstruct %mat2v2float %197 %198 -OpStore %_0_expected %199 -%201 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1 -%202 = OpLoad %v4float %201 -%203 = OpCompositeExtract %float %202 0 -OpStore %_1_one %203 -%205 = OpFMul %float %174 %203 -%206 = OpFMul %float %179 %203 -%207 = OpFMul %float %185 %203 -%208 = OpFMul %float %191 %203 -%209 = OpCompositeConstruct %v2float %205 %206 -%210 = OpCompositeConstruct %v2float %207 %208 -%211 = OpCompositeConstruct %mat2v2float %209 %210 -OpStore %_2_m2 %211 -%212 = OpFAdd %v2float %209 %63 -%213 = OpFAdd %v2float %210 %63 -%214 = OpCompositeConstruct %mat2v2float %212 %213 -OpStore %_2_m2 %214 -%215 = OpAccessChain %_ptr_Function_v2float %_2_m2 %int_0 -%216 = OpLoad %v2float %215 -%217 = OpCompositeExtract %float %216 0 -%218 = OpAccessChain %_ptr_Function_v2float %_0_expected %int_0 -%219 = OpLoad %v2float %218 -%220 = OpCompositeExtract %float %219 0 -%221 = OpFOrdEqual %bool %217 %220 -OpSelectionMerge %223 None -OpBranchConditional %221 %222 %223 -%222 = OpLabel -%224 = OpAccessChain %_ptr_Function_v2float %_2_m2 %int_0 -%225 = OpLoad %v2float %224 -%226 = OpCompositeExtract %float %225 1 -%227 = OpAccessChain %_ptr_Function_v2float %_0_expected %int_0 -%228 = OpLoad %v2float %227 -%229 = OpCompositeExtract %float %228 1 -%230 = OpFOrdEqual %bool %226 %229 -OpBranch %223 -%223 = OpLabel -%231 = OpPhi %bool %false %170 %230 %222 -OpSelectionMerge %233 None -OpBranchConditional %231 %232 %233 -%232 = OpLabel -%234 = OpAccessChain %_ptr_Function_v2float %_2_m2 %int_1 -%235 = OpLoad %v2float %234 -%236 = OpCompositeExtract %float %235 0 -%237 = OpAccessChain %_ptr_Function_v2float %_0_expected %int_1 -%238 = OpLoad %v2float %237 -%239 = OpCompositeExtract %float %238 0 -%240 = OpFOrdEqual %bool %236 %239 -OpBranch %233 -%233 = OpLabel -%241 = OpPhi %bool %false %223 %240 %232 -OpSelectionMerge %243 None -OpBranchConditional %241 %242 %243 -%242 = OpLabel -%244 = OpAccessChain %_ptr_Function_v2float %_2_m2 %int_1 -%245 = OpLoad %v2float %244 -%246 = OpCompositeExtract %float %245 1 -%247 = OpAccessChain %_ptr_Function_v2float %_0_expected %int_1 -%248 = OpLoad %v2float %247 -%249 = OpCompositeExtract %float %248 1 -%250 = OpFOrdEqual %bool %246 %249 -OpBranch %243 -%243 = OpLabel -%251 = OpPhi %bool %false %233 %250 %242 -OpSelectionMerge %253 None -OpBranchConditional %251 %252 %253 -%252 = OpLabel -OpStore %254 %int_2 -OpStore %255 %174 -OpStore %256 %179 -OpStore %257 %185 -OpStore %258 %191 -%259 = OpFSub %float %174 %float_1 -%260 = OpFSub %float %179 %float_1 -%261 = OpFSub %float %185 %float_1 -%262 = OpFSub %float %191 %float_1 -%263 = OpCompositeConstruct %v2float %259 %260 -%264 = OpCompositeConstruct %v2float %261 %262 -%265 = OpCompositeConstruct %mat2v2float %263 %264 -OpStore %266 %265 -%267 = OpFunctionCall %bool %test_bifffff22 %254 %255 %256 %257 %258 %266 -OpBranch %253 -%253 = OpLabel -%268 = OpPhi %bool %false %243 %267 %252 -OpSelectionMerge %270 None -OpBranchConditional %268 %269 %270 -%269 = OpLabel -OpStore %272 %int_3 -OpStore %273 %174 -OpStore %274 %179 -OpStore %275 %185 -OpStore %276 %191 -%277 = OpFMul %float %174 %float_2 -%278 = OpFMul %float %179 %float_2 -%279 = OpFMul %float %185 %float_2 -%280 = OpFMul %float %191 %float_2 -%281 = OpCompositeConstruct %v2float %277 %278 -%282 = OpCompositeConstruct %v2float %279 %280 -%283 = OpCompositeConstruct %mat2v2float %281 %282 -OpStore %284 %283 -%285 = OpFunctionCall %bool %test_bifffff22 %272 %273 %274 %275 %276 %284 -OpBranch %270 -%270 = OpLabel -%286 = OpPhi %bool %false %253 %285 %269 -OpSelectionMerge %288 None -OpBranchConditional %286 %287 %288 -%287 = OpLabel -OpStore %290 %int_4 -OpStore %291 %174 -OpStore %292 %179 -OpStore %293 %185 -OpStore %294 %191 -%295 = OpFMul %float %174 %float_0_5 -%296 = OpFMul %float %179 %float_0_5 -%297 = OpFMul %float %185 %float_0_5 -%298 = OpFMul %float %191 %float_0_5 -%299 = OpCompositeConstruct %v2float %295 %296 -%300 = OpCompositeConstruct %v2float %297 %298 -%301 = OpCompositeConstruct %mat2v2float %299 %300 -OpStore %302 %301 -%303 = OpFunctionCall %bool %test_bifffff22 %290 %291 %292 %293 %294 %302 -OpBranch %288 -%288 = OpLabel -%304 = OpPhi %bool %false %270 %303 %287 -OpSelectionMerge %306 None -OpBranchConditional %304 %305 %306 -%305 = OpLabel -%307 = OpFunctionCall %bool %divisionTest_b -OpBranch %306 -%306 = OpLabel -%308 = OpPhi %bool %false %288 %307 %305 -OpSelectionMerge %313 None -OpBranchConditional %308 %311 %312 -%311 = OpLabel -%314 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 -%315 = OpLoad %v4float %314 -OpStore %309 %315 -OpBranch %313 -%312 = OpLabel -%316 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1 -%317 = OpLoad %v4float %316 -OpStore %309 %317 -OpBranch %313 -%313 = OpLabel -%318 = OpLoad %v4float %309 -OpReturnValue %318 -OpFunctionEnd + %_1_one = OpVariable %_ptr_Function_float Function + %_2_m2 = OpVariable %_ptr_Function_mat2v2float Function + %254 = OpVariable %_ptr_Function_int Function + %255 = OpVariable %_ptr_Function_float Function + %256 = OpVariable %_ptr_Function_float Function + %257 = OpVariable %_ptr_Function_float Function + %258 = OpVariable %_ptr_Function_float Function + %266 = OpVariable %_ptr_Function_mat2v2float Function + %272 = OpVariable %_ptr_Function_int Function + %273 = OpVariable %_ptr_Function_float Function + %274 = OpVariable %_ptr_Function_float Function + %275 = OpVariable %_ptr_Function_float Function + %276 = OpVariable %_ptr_Function_float Function + %284 = OpVariable %_ptr_Function_mat2v2float Function + %290 = OpVariable %_ptr_Function_int Function + %291 = OpVariable %_ptr_Function_float Function + %292 = OpVariable %_ptr_Function_float Function + %293 = OpVariable %_ptr_Function_float Function + %294 = OpVariable %_ptr_Function_float Function + %302 = OpVariable %_ptr_Function_mat2v2float Function + %309 = OpVariable %_ptr_Function_v4float Function + %172 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 + %173 = OpLoad %v4float %172 + %174 = OpCompositeExtract %float %173 1 + OpStore %f1 %174 + %176 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 + %177 = OpLoad %v4float %176 + %178 = OpCompositeExtract %float %177 1 + %179 = OpFMul %float %float_2 %178 + OpStore %f2 %179 + %182 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 + %183 = OpLoad %v4float %182 + %184 = OpCompositeExtract %float %183 1 + %185 = OpFMul %float %float_3 %184 + OpStore %f3 %185 + %188 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 + %189 = OpLoad %v4float %188 + %190 = OpCompositeExtract %float %189 1 + %191 = OpFMul %float %float_4 %190 + OpStore %f4 %191 + %193 = OpFAdd %float %174 %float_1 + %194 = OpFAdd %float %179 %float_1 + %195 = OpFAdd %float %185 %float_1 + %196 = OpFAdd %float %191 %float_1 + %197 = OpCompositeConstruct %v2float %193 %194 + %198 = OpCompositeConstruct %v2float %195 %196 + %199 = OpCompositeConstruct %mat2v2float %197 %198 + OpStore %_0_expected %199 + %201 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1 + %202 = OpLoad %v4float %201 + %203 = OpCompositeExtract %float %202 0 + OpStore %_1_one %203 + %205 = OpFMul %float %174 %203 + %206 = OpFMul %float %179 %203 + %207 = OpFMul %float %185 %203 + %208 = OpFMul %float %191 %203 + %209 = OpCompositeConstruct %v2float %205 %206 + %210 = OpCompositeConstruct %v2float %207 %208 + %211 = OpCompositeConstruct %mat2v2float %209 %210 + OpStore %_2_m2 %211 + %212 = OpFAdd %v2float %63 %209 + %213 = OpFAdd %v2float %63 %210 + %214 = OpCompositeConstruct %mat2v2float %212 %213 + OpStore %_2_m2 %214 + %215 = OpAccessChain %_ptr_Function_v2float %_2_m2 %int_0 + %216 = OpLoad %v2float %215 + %217 = OpCompositeExtract %float %216 0 + %218 = OpAccessChain %_ptr_Function_v2float %_0_expected %int_0 + %219 = OpLoad %v2float %218 + %220 = OpCompositeExtract %float %219 0 + %221 = OpFOrdEqual %bool %217 %220 + OpSelectionMerge %223 None + OpBranchConditional %221 %222 %223 + %222 = OpLabel + %224 = OpAccessChain %_ptr_Function_v2float %_2_m2 %int_0 + %225 = OpLoad %v2float %224 + %226 = OpCompositeExtract %float %225 1 + %227 = OpAccessChain %_ptr_Function_v2float %_0_expected %int_0 + %228 = OpLoad %v2float %227 + %229 = OpCompositeExtract %float %228 1 + %230 = OpFOrdEqual %bool %226 %229 + OpBranch %223 + %223 = OpLabel + %231 = OpPhi %bool %false %170 %230 %222 + OpSelectionMerge %233 None + OpBranchConditional %231 %232 %233 + %232 = OpLabel + %234 = OpAccessChain %_ptr_Function_v2float %_2_m2 %int_1 + %235 = OpLoad %v2float %234 + %236 = OpCompositeExtract %float %235 0 + %237 = OpAccessChain %_ptr_Function_v2float %_0_expected %int_1 + %238 = OpLoad %v2float %237 + %239 = OpCompositeExtract %float %238 0 + %240 = OpFOrdEqual %bool %236 %239 + OpBranch %233 + %233 = OpLabel + %241 = OpPhi %bool %false %223 %240 %232 + OpSelectionMerge %243 None + OpBranchConditional %241 %242 %243 + %242 = OpLabel + %244 = OpAccessChain %_ptr_Function_v2float %_2_m2 %int_1 + %245 = OpLoad %v2float %244 + %246 = OpCompositeExtract %float %245 1 + %247 = OpAccessChain %_ptr_Function_v2float %_0_expected %int_1 + %248 = OpLoad %v2float %247 + %249 = OpCompositeExtract %float %248 1 + %250 = OpFOrdEqual %bool %246 %249 + OpBranch %243 + %243 = OpLabel + %251 = OpPhi %bool %false %233 %250 %242 + OpSelectionMerge %253 None + OpBranchConditional %251 %252 %253 + %252 = OpLabel + OpStore %254 %int_2 + OpStore %255 %174 + OpStore %256 %179 + OpStore %257 %185 + OpStore %258 %191 + %259 = OpFSub %float %174 %float_1 + %260 = OpFSub %float %179 %float_1 + %261 = OpFSub %float %185 %float_1 + %262 = OpFSub %float %191 %float_1 + %263 = OpCompositeConstruct %v2float %259 %260 + %264 = OpCompositeConstruct %v2float %261 %262 + %265 = OpCompositeConstruct %mat2v2float %263 %264 + OpStore %266 %265 + %267 = OpFunctionCall %bool %test_bifffff22 %254 %255 %256 %257 %258 %266 + OpBranch %253 + %253 = OpLabel + %268 = OpPhi %bool %false %243 %267 %252 + OpSelectionMerge %270 None + OpBranchConditional %268 %269 %270 + %269 = OpLabel + OpStore %272 %int_3 + OpStore %273 %174 + OpStore %274 %179 + OpStore %275 %185 + OpStore %276 %191 + %277 = OpFMul %float %174 %float_2 + %278 = OpFMul %float %179 %float_2 + %279 = OpFMul %float %185 %float_2 + %280 = OpFMul %float %191 %float_2 + %281 = OpCompositeConstruct %v2float %277 %278 + %282 = OpCompositeConstruct %v2float %279 %280 + %283 = OpCompositeConstruct %mat2v2float %281 %282 + OpStore %284 %283 + %285 = OpFunctionCall %bool %test_bifffff22 %272 %273 %274 %275 %276 %284 + OpBranch %270 + %270 = OpLabel + %286 = OpPhi %bool %false %253 %285 %269 + OpSelectionMerge %288 None + OpBranchConditional %286 %287 %288 + %287 = OpLabel + OpStore %290 %int_4 + OpStore %291 %174 + OpStore %292 %179 + OpStore %293 %185 + OpStore %294 %191 + %295 = OpFMul %float %174 %float_0_5 + %296 = OpFMul %float %179 %float_0_5 + %297 = OpFMul %float %185 %float_0_5 + %298 = OpFMul %float %191 %float_0_5 + %299 = OpCompositeConstruct %v2float %295 %296 + %300 = OpCompositeConstruct %v2float %297 %298 + %301 = OpCompositeConstruct %mat2v2float %299 %300 + OpStore %302 %301 + %303 = OpFunctionCall %bool %test_bifffff22 %290 %291 %292 %293 %294 %302 + OpBranch %288 + %288 = OpLabel + %304 = OpPhi %bool %false %270 %303 %287 + OpSelectionMerge %306 None + OpBranchConditional %304 %305 %306 + %305 = OpLabel + %307 = OpFunctionCall %bool %divisionTest_b + OpBranch %306 + %306 = OpLabel + %308 = OpPhi %bool %false %288 %307 %305 + OpSelectionMerge %313 None + OpBranchConditional %308 %311 %312 + %311 = OpLabel + %314 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 + %315 = OpLoad %v4float %314 + OpStore %309 %315 + OpBranch %313 + %312 = OpLabel + %316 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1 + %317 = OpLoad %v4float %316 + OpStore %309 %317 + OpBranch %313 + %313 = OpLabel + %318 = OpLoad %v4float %309 + OpReturnValue %318 + OpFunctionEnd diff --git a/tests/sksl/shared/MatrixScalarMath.glsl b/tests/sksl/shared/MatrixScalarMath.glsl index 4321c88fb4e0..b3d4bde66fe8 100644 --- a/tests/sksl/shared/MatrixScalarMath.glsl +++ b/tests/sksl/shared/MatrixScalarMath.glsl @@ -11,7 +11,7 @@ bool test_bifffff22(int op, float m11, float m12, float m21, float m22, mat2 exp mat2 m2 = mat2(m11 * one, m12 * one, m21 * one, m22 * one); switch (op) { case 1: - m2 += 1.0; + m2 = 1.0 + m2; break; case 2: m2 -= 1.0; @@ -20,7 +20,7 @@ bool test_bifffff22(int op, float m11, float m12, float m21, float m22, mat2 exp m2 *= 2.0; break; case 4: - m2 *= 0.5; + m2 = m2 * 0.5; break; } return ((m2[0].x == expected[0].x && m2[0].y == expected[0].y) && m2[1].x == expected[1].x) && m2[1].y == expected[1].y; @@ -41,7 +41,7 @@ vec4 main() { float _1_one = colorRed.x; mat2 _2_m2 = mat2(f1 * _1_one, f2 * _1_one, f3 * _1_one, f4 * _1_one); { - _2_m2 += 1.0; + _2_m2 = 1.0 + _2_m2; } return ((((((_2_m2[0].x == _0_expected[0].x && _2_m2[0].y == _0_expected[0].y) && _2_m2[1].x == _0_expected[1].x) && _2_m2[1].y == _0_expected[1].y) && test_bifffff22(minus, f1, f2, f3, f4, mat2(f1 - 1.0, f2 - 1.0, f3 - 1.0, f4 - 1.0))) && test_bifffff22(star, f1, f2, f3, f4, mat2(f1 * 2.0, f2 * 2.0, f3 * 2.0, f4 * 2.0))) && test_bifffff22(slash, f1, f2, f3, f4, mat2(f1 * 0.5, f2 * 0.5, f3 * 0.5, f4 * 0.5))) && divisionTest_b() ? colorGreen : colorRed; } diff --git a/tests/sksl/shared/MatrixScalarMath.hlsl b/tests/sksl/shared/MatrixScalarMath.hlsl index 5cee43e3fb89..fd804de7b768 100644 --- a/tests/sksl/shared/MatrixScalarMath.hlsl +++ b/tests/sksl/shared/MatrixScalarMath.hlsl @@ -23,7 +23,7 @@ bool test_bifffff22(int _31, float _32, float _33, float _34, float _35, float2x { case 1: { - m2 = float2x2(_53 + 1.0f.xx, _54 + 1.0f.xx); + m2 = float2x2(1.0f.xx + _53, 1.0f.xx + _54); break; } case 2: @@ -111,7 +111,7 @@ float4 main(float2 _169) float2 _209 = float2(_12_colorGreen.y * _12_colorRed.x, _179 * _12_colorRed.x); float2 _210 = float2(_185 * _12_colorRed.x, _191 * _12_colorRed.x); float2x2 _RESERVED_IDENTIFIER_FIXUP_2_m2 = float2x2(_209, _210); - _RESERVED_IDENTIFIER_FIXUP_2_m2 = float2x2(_209 + 1.0f.xx, _210 + 1.0f.xx); + _RESERVED_IDENTIFIER_FIXUP_2_m2 = float2x2(1.0f.xx + _209, 1.0f.xx + _210); bool _231 = false; if (_RESERVED_IDENTIFIER_FIXUP_2_m2[0].x == _RESERVED_IDENTIFIER_FIXUP_0_expected[0].x) { diff --git a/tests/sksl/shared/MatrixScalarMath.metal b/tests/sksl/shared/MatrixScalarMath.metal index 934690e02a87..bcfd2f067d39 100644 --- a/tests/sksl/shared/MatrixScalarMath.metal +++ b/tests/sksl/shared/MatrixScalarMath.metal @@ -23,7 +23,7 @@ bool test_bifffff22(Uniforms _uniforms, int op, float m11, float m12, float m21, float2x2 m2 = float2x2(float2(m11 * one, m12 * one), float2(m21 * one, m22 * one)); switch (op) { case 1: - m2 += (float2x2(1.0, 1.0, 1.0, 1.0) * 1.0); + m2 = (float2x2(1.0, 1.0, 1.0, 1.0) * 1.0) + m2; break; case 2: m2 -= (float2x2(1.0, 1.0, 1.0, 1.0) * 1.0); @@ -32,7 +32,7 @@ bool test_bifffff22(Uniforms _uniforms, int op, float m11, float m12, float m21, m2 *= 2.0; break; case 4: - m2 *= 0.5; + m2 = m2 * 0.5; break; } return ((m2[0].x == expected[0].x && m2[0].y == expected[0].y) && m2[1].x == expected[1].x) && m2[1].y == expected[1].y; @@ -55,7 +55,7 @@ fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _unifo float _1_one = float(_uniforms.colorRed.x); float2x2 _2_m2 = float2x2(float2(f1 * _1_one, f2 * _1_one), float2(f3 * _1_one, f4 * _1_one)); { - _2_m2 += (float2x2(1.0, 1.0, 1.0, 1.0) * 1.0); + _2_m2 = (float2x2(1.0, 1.0, 1.0, 1.0) * 1.0) + _2_m2; } _out.sk_FragColor = ((((((_2_m2[0].x == _0_expected[0].x && _2_m2[0].y == _0_expected[0].y) && _2_m2[1].x == _0_expected[1].x) && _2_m2[1].y == _0_expected[1].y) && test_bifffff22(_uniforms, minus, f1, f2, f3, f4, float2x2(float2(f1 - 1.0, f2 - 1.0), float2(f3 - 1.0, f4 - 1.0)))) && test_bifffff22(_uniforms, star, f1, f2, f3, f4, float2x2(float2(f1 * 2.0, f2 * 2.0), float2(f3 * 2.0, f4 * 2.0)))) && test_bifffff22(_uniforms, slash, f1, f2, f3, f4, float2x2(float2(f1 * 0.5, f2 * 0.5), float2(f3 * 0.5, f4 * 0.5)))) && divisionTest_b(_uniforms) ? _uniforms.colorGreen : _uniforms.colorRed; return _out; diff --git a/tests/sksl/shared/MatrixScalarMath.skrp b/tests/sksl/shared/MatrixScalarMath.skrp index 4a5cdb8ff4fa..9d104e19f521 100644 --- a/tests/sksl/shared/MatrixScalarMath.skrp +++ b/tests/sksl/shared/MatrixScalarMath.skrp @@ -1,7 +1,9 @@ +366 instructions + [immutable slots] -minus = 0x00000002 (2.802597e-45) -star = 0x00000003 (4.203895e-45) -slash = 0x00000004 (5.605194e-45) +i0 = 0x00000002 (2.802597e-45) +i1 = 0x00000003 (4.203895e-45) +i2 = 0x00000004 (5.605194e-45) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true diff --git a/tests/sksl/shared/MatrixScalarMath.wgsl b/tests/sksl/shared/MatrixScalarMath.wgsl new file mode 100644 index 000000000000..a42417b78d8c --- /dev/null +++ b/tests/sksl/shared/MatrixScalarMath.wgsl @@ -0,0 +1,119 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, + testInputs: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +const minus: i32 = 2; +const star: i32 = 3; +const slash: i32 = 4; +fn test_bifffff22(_skParam0: i32, _skParam1: f32, _skParam2: f32, _skParam3: f32, _skParam4: f32, _skParam5: mat2x2) -> bool { + let op = _skParam0; + let m11 = _skParam1; + let m12 = _skParam2; + let m21 = _skParam3; + let m22 = _skParam4; + let expected = _skParam5; + { + var one: f32 = f32(_globalUniforms.colorRed.x); + var m2: mat2x2 = mat2x2(m11 * one, m12 * one, m21 * one, m22 * one); + switch op { + case 1 { + m2 = mat2x2(1.0, 1.0, 1.0, 1.0) + m2; + break; + } + case 2 { + m2 = m2 - mat2x2(1.0, 1.0, 1.0, 1.0); + break; + } + case 3 { + m2 = m2 * 2.0; + break; + } + case 4 { + m2 = m2 * 0.5; + break; + } + case default {} + } + return (((m2[0].x == expected[0].x) && (m2[0].y == expected[0].y)) && (m2[1].x == expected[1].x)) && (m2[1].y == expected[1].y); + } +} +fn divisionTest_b() -> bool { + { + var ten: f32 = f32(_globalUniforms.colorRed.x * 10.0); + let _skTemp0 = vec2(ten); + let _skTemp1 = vec2(ten); + var mat: mat2x2 = mat2x2(_skTemp0[0], _skTemp0[1], _skTemp1[0], _skTemp1[1]); + var div: mat2x2 = mat * (1.0 / _globalUniforms.testInputs.x); + mat = mat * (1.0 / _globalUniforms.testInputs.x); + let _skTemp2 = abs(vec4(div[0], div[1]) + vec4(8.0)); + let _skTemp3 = all(_skTemp2 < vec4(0.01)); + let _skTemp4 = abs(vec4(mat[0], mat[1]) + vec4(8.0)); + let _skTemp5 = all(_skTemp4 < vec4(0.01)); + return _skTemp3 && _skTemp5; + } +} +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var f1: f32 = f32(_globalUniforms.colorGreen.y); + var f2: f32 = f32(2.0 * _globalUniforms.colorGreen.y); + var f3: f32 = f32(3.0 * _globalUniforms.colorGreen.y); + var f4: f32 = f32(4.0 * _globalUniforms.colorGreen.y); + var _0_expected: mat2x2 = mat2x2(f1 + 1.0, f2 + 1.0, f3 + 1.0, f4 + 1.0); + var _1_one: f32 = f32(_globalUniforms.colorRed.x); + var _2_m2: mat2x2 = mat2x2(f1 * _1_one, f2 * _1_one, f3 * _1_one, f4 * _1_one); + { + _2_m2 = mat2x2(1.0, 1.0, 1.0, 1.0) + _2_m2; + } + var _skTemp6: vec4; + var _skTemp7: bool; + var _skTemp8: bool; + var _skTemp9: bool; + var _skTemp10: bool; + if (((_2_m2[0].x == _0_expected[0].x) && (_2_m2[0].y == _0_expected[0].y)) && (_2_m2[1].x == _0_expected[1].x)) && (_2_m2[1].y == _0_expected[1].y) { + let _skTemp11 = test_bifffff22(minus, f1, f2, f3, f4, mat2x2(f1 - 1.0, f2 - 1.0, f3 - 1.0, f4 - 1.0)); + _skTemp10 = _skTemp11; + } else { + _skTemp10 = false; + } + if _skTemp10 { + let _skTemp12 = test_bifffff22(star, f1, f2, f3, f4, mat2x2(f1 * 2.0, f2 * 2.0, f3 * 2.0, f4 * 2.0)); + _skTemp9 = _skTemp12; + } else { + _skTemp9 = false; + } + if _skTemp9 { + let _skTemp13 = test_bifffff22(slash, f1, f2, f3, f4, mat2x2(f1 * 0.5, f2 * 0.5, f3 * 0.5, f4 * 0.5)); + _skTemp8 = _skTemp13; + } else { + _skTemp8 = false; + } + if _skTemp8 { + let _skTemp14 = divisionTest_b(); + _skTemp7 = _skTemp14; + } else { + _skTemp7 = false; + } + if _skTemp7 { + _skTemp6 = _globalUniforms.colorGreen; + } else { + _skTemp6 = _globalUniforms.colorRed; + } + return _skTemp6; + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/MatrixSwizzleStore.asm.frag b/tests/sksl/shared/MatrixSwizzleStore.asm.frag index 279df5798878..42c20058b0ac 100644 --- a/tests/sksl/shared/MatrixSwizzleStore.asm.frag +++ b/tests/sksl/shared/MatrixSwizzleStore.asm.frag @@ -1,241 +1,241 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpMemberName %_UniformBuffer 2 "testMatrix3x3" -OpMemberName %_UniformBuffer 3 "testMatrix4x4" -OpName %_entrypoint_v "_entrypoint_v" -OpName %test4x4_b "test4x4_b" -OpName %matrix "matrix" -OpName %values "values" -OpName %index "index" -OpName %main "main" -OpName %_0_matrix "_0_matrix" -OpName %_1_values "_1_values" -OpName %_2_index "_2_index" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 ColMajor -OpMemberDecorate %_UniformBuffer 2 MatrixStride 16 -OpMemberDecorate %_UniformBuffer 3 Offset 80 -OpMemberDecorate %_UniformBuffer 3 ColMajor -OpMemberDecorate %_UniformBuffer 3 MatrixStride 16 -OpDecorate %_UniformBuffer Block -OpDecorate %11 Binding 0 -OpDecorate %11 DescriptorSet 0 -OpDecorate %157 RelaxedPrecision -OpDecorate %159 RelaxedPrecision -OpDecorate %160 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpMemberName %_UniformBuffer 2 "testMatrix3x3" + OpMemberName %_UniformBuffer 3 "testMatrix4x4" + OpName %_entrypoint_v "_entrypoint_v" + OpName %test4x4_b "test4x4_b" + OpName %matrix "matrix" + OpName %values "values" + OpName %index "index" + OpName %main "main" + OpName %_0_matrix "_0_matrix" + OpName %_1_values "_1_values" + OpName %_2_index "_2_index" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 ColMajor + OpMemberDecorate %_UniformBuffer 2 MatrixStride 16 + OpMemberDecorate %_UniformBuffer 3 Offset 80 + OpMemberDecorate %_UniformBuffer 3 ColMajor + OpMemberDecorate %_UniformBuffer 3 MatrixStride 16 + OpDecorate %_UniformBuffer Block + OpDecorate %11 Binding 0 + OpDecorate %11 DescriptorSet 0 + OpDecorate %157 RelaxedPrecision + OpDecorate %159 RelaxedPrecision + OpDecorate %160 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%v3float = OpTypeVector %float 3 + %v3float = OpTypeVector %float 3 %mat3v3float = OpTypeMatrix %v3float 3 %mat4v4float = OpTypeMatrix %v4float 4 %_UniformBuffer = OpTypeStruct %v4float %v4float %mat3v3float %mat4v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%19 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%23 = OpConstantComposite %v2float %float_0 %float_0 + %11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %19 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %23 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%27 = OpTypeFunction %bool + %27 = OpTypeFunction %bool %_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float %_ptr_Function_v4float = OpTypePointer Function %v4float -%float_4 = OpConstant %float 4 -%float_3 = OpConstant %float 3 -%float_2 = OpConstant %float 2 -%float_1 = OpConstant %float 1 -%37 = OpConstantComposite %v4float %float_4 %float_3 %float_2 %float_1 -%int = OpTypeInt 32 1 + %float_4 = OpConstant %float 4 + %float_3 = OpConstant %float 3 + %float_2 = OpConstant %float 2 + %float_1 = OpConstant %float 1 + %37 = OpConstantComposite %v4float %float_4 %float_3 %float_2 %float_1 + %int = OpTypeInt 32 1 %_ptr_Function_int = OpTypePointer Function %int -%int_0 = OpConstant %int 0 -%int_4 = OpConstant %int 4 -%63 = OpConstantComposite %v4float %float_4 %float_4 %float_4 %float_4 -%int_1 = OpConstant %int 1 + %int_0 = OpConstant %int 0 + %int_4 = OpConstant %int 4 + %63 = OpConstantComposite %v4float %float_4 %float_4 %float_4 %float_4 + %int_1 = OpConstant %int 1 %_ptr_Uniform_mat4v4float = OpTypePointer Uniform %mat4v4float -%int_3 = OpConstant %int 3 -%v4bool = OpTypeVector %bool 4 -%93 = OpTypeFunction %v4float %_ptr_Function_v2float + %int_3 = OpConstant %int 3 + %v4bool = OpTypeVector %bool 4 + %93 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_mat3v3float = OpTypePointer Function %mat3v3float %_ptr_Function_v3float = OpTypePointer Function %v3float -%100 = OpConstantComposite %v3float %float_3 %float_2 %float_1 + %100 = OpConstantComposite %v3float %float_3 %float_2 %float_1 %_ptr_Function_float = OpTypePointer Function %float -%122 = OpConstantComposite %v3float %float_3 %float_3 %float_3 -%false = OpConstantFalse %bool + %122 = OpConstantComposite %v3float %float_3 %float_3 %float_3 + %false = OpConstantFalse %bool %_ptr_Uniform_mat3v3float = OpTypePointer Uniform %mat3v3float -%int_2 = OpConstant %int 2 -%v3bool = OpTypeVector %bool 3 + %int_2 = OpConstant %int 2 + %v3bool = OpTypeVector %bool 3 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float %_entrypoint_v = OpFunction %void None %19 -%20 = OpLabel -%24 = OpVariable %_ptr_Function_v2float Function -OpStore %24 %23 -%26 = OpFunctionCall %v4float %main %24 -OpStore %sk_FragColor %26 -OpReturn -OpFunctionEnd -%test4x4_b = OpFunction %bool None %27 -%28 = OpLabel -%matrix = OpVariable %_ptr_Function_mat4v4float Function -%values = OpVariable %_ptr_Function_v4float Function -%index = OpVariable %_ptr_Function_int Function -OpStore %values %37 -OpStore %index %int_0 -OpBranch %42 -%42 = OpLabel -OpLoopMerge %46 %45 None -OpBranch %43 -%43 = OpLabel -%47 = OpLoad %int %index -%49 = OpSLessThan %bool %47 %int_4 -OpBranchConditional %49 %44 %46 -%44 = OpLabel -%50 = OpLoad %v4float %values -%51 = OpVectorShuffle %v2float %50 %50 0 3 -%52 = OpLoad %int %index -%53 = OpAccessChain %_ptr_Function_v4float %matrix %52 -%54 = OpLoad %v4float %53 -%55 = OpVectorShuffle %v4float %54 %51 5 1 2 4 -OpStore %53 %55 -%56 = OpLoad %v4float %values -%57 = OpVectorShuffle %v2float %56 %56 1 2 -%58 = OpLoad %int %index -%59 = OpAccessChain %_ptr_Function_v4float %matrix %58 -%60 = OpLoad %v4float %59 -%61 = OpVectorShuffle %v4float %60 %57 0 5 4 3 -OpStore %59 %61 -%62 = OpLoad %v4float %values -%64 = OpFAdd %v4float %62 %63 -OpStore %values %64 -OpBranch %45 -%45 = OpLabel -%66 = OpLoad %int %index -%67 = OpIAdd %int %66 %int_1 -OpStore %index %67 -OpBranch %42 -%46 = OpLabel -%68 = OpLoad %mat4v4float %matrix -%69 = OpAccessChain %_ptr_Uniform_mat4v4float %11 %int_3 -%72 = OpLoad %mat4v4float %69 -%74 = OpCompositeExtract %v4float %68 0 -%75 = OpCompositeExtract %v4float %72 0 -%76 = OpFOrdEqual %v4bool %74 %75 -%77 = OpAll %bool %76 -%78 = OpCompositeExtract %v4float %68 1 -%79 = OpCompositeExtract %v4float %72 1 -%80 = OpFOrdEqual %v4bool %78 %79 -%81 = OpAll %bool %80 -%82 = OpLogicalAnd %bool %77 %81 -%83 = OpCompositeExtract %v4float %68 2 -%84 = OpCompositeExtract %v4float %72 2 -%85 = OpFOrdEqual %v4bool %83 %84 -%86 = OpAll %bool %85 -%87 = OpLogicalAnd %bool %82 %86 -%88 = OpCompositeExtract %v4float %68 3 -%89 = OpCompositeExtract %v4float %72 3 -%90 = OpFOrdEqual %v4bool %88 %89 -%91 = OpAll %bool %90 -%92 = OpLogicalAnd %bool %87 %91 -OpReturnValue %92 -OpFunctionEnd -%main = OpFunction %v4float None %93 -%94 = OpFunctionParameter %_ptr_Function_v2float -%95 = OpLabel -%_0_matrix = OpVariable %_ptr_Function_mat3v3float Function -%_1_values = OpVariable %_ptr_Function_v3float Function -%_2_index = OpVariable %_ptr_Function_int Function -%151 = OpVariable %_ptr_Function_v4float Function -OpStore %_1_values %100 -OpStore %_2_index %int_0 -OpBranch %102 -%102 = OpLabel -OpLoopMerge %106 %105 None -OpBranch %103 -%103 = OpLabel -%107 = OpLoad %int %_2_index -%108 = OpSLessThan %bool %107 %int_3 -OpBranchConditional %108 %104 %106 -%104 = OpLabel -%109 = OpLoad %v3float %_1_values -%110 = OpVectorShuffle %v2float %109 %109 0 2 -%111 = OpLoad %int %_2_index -%112 = OpAccessChain %_ptr_Function_v3float %_0_matrix %111 -%113 = OpLoad %v3float %112 -%114 = OpVectorShuffle %v3float %113 %110 4 1 3 -OpStore %112 %114 -%115 = OpLoad %v3float %_1_values -%116 = OpCompositeExtract %float %115 1 -%117 = OpLoad %int %_2_index -%118 = OpAccessChain %_ptr_Function_v3float %_0_matrix %117 -%119 = OpAccessChain %_ptr_Function_float %118 %int_1 -OpStore %119 %116 -%121 = OpLoad %v3float %_1_values -%123 = OpFAdd %v3float %121 %122 -OpStore %_1_values %123 -OpBranch %105 -%105 = OpLabel -%124 = OpLoad %int %_2_index -%125 = OpIAdd %int %124 %int_1 -OpStore %_2_index %125 -OpBranch %102 -%106 = OpLabel -%127 = OpLoad %mat3v3float %_0_matrix -%128 = OpAccessChain %_ptr_Uniform_mat3v3float %11 %int_2 -%131 = OpLoad %mat3v3float %128 -%133 = OpCompositeExtract %v3float %127 0 -%134 = OpCompositeExtract %v3float %131 0 -%135 = OpFOrdEqual %v3bool %133 %134 -%136 = OpAll %bool %135 -%137 = OpCompositeExtract %v3float %127 1 -%138 = OpCompositeExtract %v3float %131 1 -%139 = OpFOrdEqual %v3bool %137 %138 -%140 = OpAll %bool %139 -%141 = OpLogicalAnd %bool %136 %140 -%142 = OpCompositeExtract %v3float %127 2 -%143 = OpCompositeExtract %v3float %131 2 -%144 = OpFOrdEqual %v3bool %142 %143 -%145 = OpAll %bool %144 -%146 = OpLogicalAnd %bool %141 %145 -OpSelectionMerge %148 None -OpBranchConditional %146 %147 %148 -%147 = OpLabel -%149 = OpFunctionCall %bool %test4x4_b -OpBranch %148 -%148 = OpLabel -%150 = OpPhi %bool %false %106 %149 %147 -OpSelectionMerge %154 None -OpBranchConditional %150 %152 %153 -%152 = OpLabel -%155 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 -%157 = OpLoad %v4float %155 -OpStore %151 %157 -OpBranch %154 -%153 = OpLabel -%158 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 -%159 = OpLoad %v4float %158 -OpStore %151 %159 -OpBranch %154 -%154 = OpLabel -%160 = OpLoad %v4float %151 -OpReturnValue %160 -OpFunctionEnd + %20 = OpLabel + %24 = OpVariable %_ptr_Function_v2float Function + OpStore %24 %23 + %26 = OpFunctionCall %v4float %main %24 + OpStore %sk_FragColor %26 + OpReturn + OpFunctionEnd + %test4x4_b = OpFunction %bool None %27 + %28 = OpLabel + %matrix = OpVariable %_ptr_Function_mat4v4float Function + %values = OpVariable %_ptr_Function_v4float Function + %index = OpVariable %_ptr_Function_int Function + OpStore %values %37 + OpStore %index %int_0 + OpBranch %42 + %42 = OpLabel + OpLoopMerge %46 %45 None + OpBranch %43 + %43 = OpLabel + %47 = OpLoad %int %index + %49 = OpSLessThan %bool %47 %int_4 + OpBranchConditional %49 %44 %46 + %44 = OpLabel + %50 = OpLoad %v4float %values + %51 = OpVectorShuffle %v2float %50 %50 0 3 + %52 = OpLoad %int %index + %53 = OpAccessChain %_ptr_Function_v4float %matrix %52 + %54 = OpLoad %v4float %53 + %55 = OpVectorShuffle %v4float %54 %51 5 1 2 4 + OpStore %53 %55 + %56 = OpLoad %v4float %values + %57 = OpVectorShuffle %v2float %56 %56 1 2 + %58 = OpLoad %int %index + %59 = OpAccessChain %_ptr_Function_v4float %matrix %58 + %60 = OpLoad %v4float %59 + %61 = OpVectorShuffle %v4float %60 %57 0 5 4 3 + OpStore %59 %61 + %62 = OpLoad %v4float %values + %64 = OpFAdd %v4float %62 %63 + OpStore %values %64 + OpBranch %45 + %45 = OpLabel + %66 = OpLoad %int %index + %67 = OpIAdd %int %66 %int_1 + OpStore %index %67 + OpBranch %42 + %46 = OpLabel + %68 = OpLoad %mat4v4float %matrix + %69 = OpAccessChain %_ptr_Uniform_mat4v4float %11 %int_3 + %72 = OpLoad %mat4v4float %69 + %74 = OpCompositeExtract %v4float %68 0 + %75 = OpCompositeExtract %v4float %72 0 + %76 = OpFOrdEqual %v4bool %74 %75 + %77 = OpAll %bool %76 + %78 = OpCompositeExtract %v4float %68 1 + %79 = OpCompositeExtract %v4float %72 1 + %80 = OpFOrdEqual %v4bool %78 %79 + %81 = OpAll %bool %80 + %82 = OpLogicalAnd %bool %77 %81 + %83 = OpCompositeExtract %v4float %68 2 + %84 = OpCompositeExtract %v4float %72 2 + %85 = OpFOrdEqual %v4bool %83 %84 + %86 = OpAll %bool %85 + %87 = OpLogicalAnd %bool %82 %86 + %88 = OpCompositeExtract %v4float %68 3 + %89 = OpCompositeExtract %v4float %72 3 + %90 = OpFOrdEqual %v4bool %88 %89 + %91 = OpAll %bool %90 + %92 = OpLogicalAnd %bool %87 %91 + OpReturnValue %92 + OpFunctionEnd + %main = OpFunction %v4float None %93 + %94 = OpFunctionParameter %_ptr_Function_v2float + %95 = OpLabel + %_0_matrix = OpVariable %_ptr_Function_mat3v3float Function + %_1_values = OpVariable %_ptr_Function_v3float Function + %_2_index = OpVariable %_ptr_Function_int Function + %151 = OpVariable %_ptr_Function_v4float Function + OpStore %_1_values %100 + OpStore %_2_index %int_0 + OpBranch %102 + %102 = OpLabel + OpLoopMerge %106 %105 None + OpBranch %103 + %103 = OpLabel + %107 = OpLoad %int %_2_index + %108 = OpSLessThan %bool %107 %int_3 + OpBranchConditional %108 %104 %106 + %104 = OpLabel + %109 = OpLoad %v3float %_1_values + %110 = OpVectorShuffle %v2float %109 %109 0 2 + %111 = OpLoad %int %_2_index + %112 = OpAccessChain %_ptr_Function_v3float %_0_matrix %111 + %113 = OpLoad %v3float %112 + %114 = OpVectorShuffle %v3float %113 %110 4 1 3 + OpStore %112 %114 + %115 = OpLoad %v3float %_1_values + %116 = OpCompositeExtract %float %115 1 + %117 = OpLoad %int %_2_index + %118 = OpAccessChain %_ptr_Function_v3float %_0_matrix %117 + %119 = OpAccessChain %_ptr_Function_float %118 %int_1 + OpStore %119 %116 + %121 = OpLoad %v3float %_1_values + %123 = OpFAdd %v3float %121 %122 + OpStore %_1_values %123 + OpBranch %105 + %105 = OpLabel + %124 = OpLoad %int %_2_index + %125 = OpIAdd %int %124 %int_1 + OpStore %_2_index %125 + OpBranch %102 + %106 = OpLabel + %127 = OpLoad %mat3v3float %_0_matrix + %128 = OpAccessChain %_ptr_Uniform_mat3v3float %11 %int_2 + %131 = OpLoad %mat3v3float %128 + %133 = OpCompositeExtract %v3float %127 0 + %134 = OpCompositeExtract %v3float %131 0 + %135 = OpFOrdEqual %v3bool %133 %134 + %136 = OpAll %bool %135 + %137 = OpCompositeExtract %v3float %127 1 + %138 = OpCompositeExtract %v3float %131 1 + %139 = OpFOrdEqual %v3bool %137 %138 + %140 = OpAll %bool %139 + %141 = OpLogicalAnd %bool %136 %140 + %142 = OpCompositeExtract %v3float %127 2 + %143 = OpCompositeExtract %v3float %131 2 + %144 = OpFOrdEqual %v3bool %142 %143 + %145 = OpAll %bool %144 + %146 = OpLogicalAnd %bool %141 %145 + OpSelectionMerge %148 None + OpBranchConditional %146 %147 %148 + %147 = OpLabel + %149 = OpFunctionCall %bool %test4x4_b + OpBranch %148 + %148 = OpLabel + %150 = OpPhi %bool %false %106 %149 %147 + OpSelectionMerge %154 None + OpBranchConditional %150 %152 %153 + %152 = OpLabel + %155 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 + %157 = OpLoad %v4float %155 + OpStore %151 %157 + OpBranch %154 + %153 = OpLabel + %158 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 + %159 = OpLoad %v4float %158 + OpStore %151 %159 + OpBranch %154 + %154 = OpLabel + %160 = OpLoad %v4float %151 + OpReturnValue %160 + OpFunctionEnd diff --git a/tests/sksl/shared/MatrixSwizzleStore.skrp b/tests/sksl/shared/MatrixSwizzleStore.skrp index 957a29673ef2..8e811fb85996 100644 --- a/tests/sksl/shared/MatrixSwizzleStore.skrp +++ b/tests/sksl/shared/MatrixSwizzleStore.skrp @@ -1,11 +1,20 @@ +87 instructions + +[immutable slots] +i0 = 0x40400000 (3.0) +i1 = 0x40000000 (2.0) +i2 = 0x3F800000 (1.0) +i3 = 0x40800000 (4.0) +i4 = 0x40400000 (3.0) +i5 = 0x40000000 (2.0) +i6 = 0x3F800000 (1.0) + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true splat_4_constants _0_matrix(0..3) = 0 splat_4_constants _0_matrix(4..7) = 0 copy_constant _0_matrix(8) = 0 -copy_constant _1_values(0) = 0x40400000 (3.0) -copy_constant _1_values(1) = 0x40000000 (2.0) -copy_constant _1_values(2) = 0x3F800000 (1.0) +copy_3_immutables_unmasked _1_values = i0..2 [0x40400000 (3.0), 0x40000000 (2.0), 0x3F800000 (1.0)] copy_constant _2_index = 0 label label 0x00000001 copy_slot_unmasked $33 = _2_index @@ -25,7 +34,7 @@ add_imm_int _2_index += 0x00000001 copy_slot_unmasked $0 = _2_index cmplt_imm_int $0 = lessThan($0, 0x00000003) stack_rewind -branch_if_no_active_lanes_eq branch -18 (label 1 at #10) if no lanes of $0 == 0 +branch_if_no_active_lanes_eq branch -18 (label 1 at #8) if no lanes of $0 == 0 label label 0 store_condition_mask $33 = CondMask copy_4_slots_unmasked $34..37 = _0_matrix(0..3) @@ -41,16 +50,13 @@ bitwise_and_int $35 &= $36 bitwise_and_int $34 &= $35 copy_constant $0 = 0 merge_condition_mask CondMask = $33 & $34 -branch_if_no_lanes_active branch_if_no_lanes_active +48 (label 3 at #92) +branch_if_no_lanes_active branch_if_no_lanes_active +45 (label 3 at #87) splat_4_constants matrix(0..3) = 0 splat_4_constants matrix(4..7) = 0 splat_4_constants matrix(8..11) = 0 splat_4_constants matrix(12..15) = 0 -copy_constant values(0) = 0x40800000 (4.0) -copy_constant values(1) = 0x40400000 (3.0) -copy_constant values(2) = 0x40000000 (2.0) -copy_constant values(3) = 0x3F800000 (1.0) -branch_if_no_lanes_active branch_if_no_lanes_active +22 (label 5 at #75) +copy_4_immutables_unmasked values = i3..6 [0x40800000 (4.0), 0x40400000 (3.0), 0x40000000 (2.0), 0x3F800000 (1.0)] +branch_if_no_lanes_active branch_if_no_lanes_active +22 (label 5 at #70) copy_constant index = 0 label label 0x00000006 copy_slot_unmasked $52 = index @@ -71,7 +77,7 @@ add_imm_int $1 += 0x00000001 copy_slot_masked index = Mask($1) cmplt_imm_int $1 = lessThan($1, 0x00000004) stack_rewind -branch_if_no_active_lanes_eq branch -19 (label 6 at #55) if no lanes of $1 == 0 +branch_if_no_active_lanes_eq branch -19 (label 6 at #50) if no lanes of $1 == 0 label label 0x00000005 copy_4_slots_unmasked $1..4 = matrix(0..3) copy_4_slots_unmasked $5..8 = matrix(4..7) diff --git a/tests/sksl/shared/MatrixSwizzleStore.wgsl b/tests/sksl/shared/MatrixSwizzleStore.wgsl new file mode 100644 index 000000000000..a71783d24e8f --- /dev/null +++ b/tests/sksl/shared/MatrixSwizzleStore.wgsl @@ -0,0 +1,76 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, + testMatrix3x3: mat3x3, + testMatrix4x4: mat4x4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn test4x4_b() -> bool { + { + var matrix: mat4x4; + var values: vec4 = vec4(4.0, 3.0, 2.0, 1.0); + { + var index: i32 = 0; + loop { + { + matrix[index] = vec4((values.xw), matrix[index].yz).yzwx; + matrix[index] = vec4((values.yz), matrix[index].xw).zyxw; + values = values + 4.0; + } + continuing { + index = index + i32(1); + break if index >= 4; + } + } + } + return (all(matrix[0] == _globalUniforms.testMatrix4x4[0]) && all(matrix[1] == _globalUniforms.testMatrix4x4[1]) && all(matrix[2] == _globalUniforms.testMatrix4x4[2]) && all(matrix[3] == _globalUniforms.testMatrix4x4[3])); + } +} +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var _0_matrix: mat3x3; + var _1_values: vec3 = vec3(3.0, 2.0, 1.0); + { + var _2_index: i32 = 0; + loop { + { + _0_matrix[_2_index] = vec3((_1_values.xz), _0_matrix[_2_index].y).yzx; + _0_matrix[_2_index].y = _1_values.y; + _1_values = _1_values + 3.0; + } + continuing { + _2_index = _2_index + i32(1); + break if _2_index >= 3; + } + } + } + var _skTemp0: vec4; + var _skTemp1: bool; + if (all(_0_matrix[0] == _globalUniforms.testMatrix3x3[0]) && all(_0_matrix[1] == _globalUniforms.testMatrix3x3[1]) && all(_0_matrix[2] == _globalUniforms.testMatrix3x3[2])) { + let _skTemp2 = test4x4_b(); + _skTemp1 = _skTemp2; + } else { + _skTemp1 = false; + } + if _skTemp1 { + _skTemp0 = _globalUniforms.colorGreen; + } else { + _skTemp0 = _globalUniforms.colorRed; + } + return _skTemp0; + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/MatrixToVectorCast.asm.frag b/tests/sksl/shared/MatrixToVectorCast.asm.frag index 42929301849b..7614078e8cb7 100644 --- a/tests/sksl/shared/MatrixToVectorCast.asm.frag +++ b/tests/sksl/shared/MatrixToVectorCast.asm.frag @@ -1,199 +1,199 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpMemberName %_UniformBuffer 2 "testMatrix2x2" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %ok "ok" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 ColMajor -OpMemberDecorate %_UniformBuffer 2 MatrixStride 16 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %37 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %39 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %55 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %58 RelaxedPrecision -OpDecorate %59 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %67 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %69 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -OpDecorate %71 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %89 RelaxedPrecision -OpDecorate %90 RelaxedPrecision -OpDecorate %91 RelaxedPrecision -OpDecorate %92 RelaxedPrecision -OpDecorate %93 RelaxedPrecision -OpDecorate %94 RelaxedPrecision -OpDecorate %112 RelaxedPrecision -OpDecorate %114 RelaxedPrecision -OpDecorate %115 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpMemberName %_UniformBuffer 2 "testMatrix2x2" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %ok "ok" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 ColMajor + OpMemberDecorate %_UniformBuffer 2 MatrixStride 16 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %37 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %55 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %58 RelaxedPrecision + OpDecorate %59 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %67 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %69 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %71 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %89 RelaxedPrecision + OpDecorate %90 RelaxedPrecision + OpDecorate %91 RelaxedPrecision + OpDecorate %92 RelaxedPrecision + OpDecorate %93 RelaxedPrecision + OpDecorate %94 RelaxedPrecision + OpDecorate %112 RelaxedPrecision + OpDecorate %114 RelaxedPrecision + OpDecorate %115 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%v2float = OpTypeVector %float 2 + %v2float = OpTypeVector %float 2 %mat2v2float = OpTypeMatrix %v2float 2 %_UniformBuffer = OpTypeStruct %v4float %v4float %mat2v2float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%17 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%20 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %17 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %20 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%24 = OpTypeFunction %v4float %_ptr_Function_v2float + %24 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_bool = OpTypePointer Function %bool -%true = OpConstantTrue %bool -%false = OpConstantFalse %bool + %true = OpConstantTrue %bool + %false = OpConstantFalse %bool %_ptr_Uniform_mat2v2float = OpTypePointer Uniform %mat2v2float -%int = OpTypeInt 32 1 -%int_2 = OpConstant %int 2 -%float_1 = OpConstant %float 1 -%float_2 = OpConstant %float 2 -%float_3 = OpConstant %float 3 -%float_4 = OpConstant %float 4 -%47 = OpConstantComposite %v4float %float_1 %float_2 %float_3 %float_4 -%v4bool = OpTypeVector %bool 4 -%v4int = OpTypeVector %int 4 -%int_1 = OpConstant %int 1 -%int_3 = OpConstant %int 3 -%int_4 = OpConstant %int 4 -%82 = OpConstantComposite %v4int %int_1 %int_2 %int_3 %int_4 -%100 = OpConstantComposite %v4bool %true %true %true %true + %int = OpTypeInt 32 1 + %int_2 = OpConstant %int 2 + %float_1 = OpConstant %float 1 + %float_2 = OpConstant %float 2 + %float_3 = OpConstant %float 3 + %float_4 = OpConstant %float 4 + %47 = OpConstantComposite %v4float %float_1 %float_2 %float_3 %float_4 + %v4bool = OpTypeVector %bool 4 + %v4int = OpTypeVector %int 4 + %int_1 = OpConstant %int 1 + %int_3 = OpConstant %int 3 + %int_4 = OpConstant %int 4 + %82 = OpConstantComposite %v4int %int_1 %int_2 %int_3 %int_4 + %100 = OpConstantComposite %v4bool %true %true %true %true %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_0 = OpConstant %int 0 + %int_0 = OpConstant %int 0 %_entrypoint_v = OpFunction %void None %17 -%18 = OpLabel -%21 = OpVariable %_ptr_Function_v2float Function -OpStore %21 %20 -%23 = OpFunctionCall %v4float %main %21 -OpStore %sk_FragColor %23 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %24 -%25 = OpFunctionParameter %_ptr_Function_v2float -%26 = OpLabel -%ok = OpVariable %_ptr_Function_bool Function -%104 = OpVariable %_ptr_Function_v4float Function -OpStore %ok %true -OpSelectionMerge %32 None -OpBranchConditional %true %31 %32 -%31 = OpLabel -%33 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2 -%37 = OpLoad %mat2v2float %33 -%38 = OpCompositeExtract %float %37 0 0 -%39 = OpCompositeExtract %float %37 0 1 -%40 = OpCompositeExtract %float %37 1 0 -%41 = OpCompositeExtract %float %37 1 1 -%42 = OpCompositeConstruct %v4float %38 %39 %40 %41 -%48 = OpFOrdEqual %v4bool %42 %47 -%50 = OpAll %bool %48 -OpBranch %32 -%32 = OpLabel -%51 = OpPhi %bool %false %26 %50 %31 -OpStore %ok %51 -OpSelectionMerge %53 None -OpBranchConditional %51 %52 %53 -%52 = OpLabel -%54 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2 -%55 = OpLoad %mat2v2float %54 -%56 = OpCompositeExtract %float %55 0 0 -%57 = OpCompositeExtract %float %55 0 1 -%58 = OpCompositeExtract %float %55 1 0 -%59 = OpCompositeExtract %float %55 1 1 -%60 = OpCompositeConstruct %v4float %56 %57 %58 %59 -%61 = OpFOrdEqual %v4bool %60 %47 -%62 = OpAll %bool %61 -OpBranch %53 -%53 = OpLabel -%63 = OpPhi %bool %false %32 %62 %52 -OpStore %ok %63 -OpSelectionMerge %65 None -OpBranchConditional %63 %64 %65 -%64 = OpLabel -%66 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2 -%67 = OpLoad %mat2v2float %66 -%68 = OpCompositeExtract %float %67 0 0 -%69 = OpCompositeExtract %float %67 0 1 -%70 = OpCompositeExtract %float %67 1 0 -%71 = OpCompositeExtract %float %67 1 1 -%72 = OpCompositeConstruct %v4float %68 %69 %70 %71 -%73 = OpConvertFToS %int %68 -%74 = OpConvertFToS %int %69 -%75 = OpConvertFToS %int %70 -%76 = OpConvertFToS %int %71 -%78 = OpCompositeConstruct %v4int %73 %74 %75 %76 -%83 = OpIEqual %v4bool %78 %82 -%84 = OpAll %bool %83 -OpBranch %65 -%65 = OpLabel -%85 = OpPhi %bool %false %53 %84 %64 -OpStore %ok %85 -OpSelectionMerge %87 None -OpBranchConditional %85 %86 %87 -%86 = OpLabel -%88 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2 -%89 = OpLoad %mat2v2float %88 -%90 = OpCompositeExtract %float %89 0 0 -%91 = OpCompositeExtract %float %89 0 1 -%92 = OpCompositeExtract %float %89 1 0 -%93 = OpCompositeExtract %float %89 1 1 -%94 = OpCompositeConstruct %v4float %90 %91 %92 %93 -%95 = OpFUnordNotEqual %bool %90 %float_0 -%96 = OpFUnordNotEqual %bool %91 %float_0 -%97 = OpFUnordNotEqual %bool %92 %float_0 -%98 = OpFUnordNotEqual %bool %93 %float_0 -%99 = OpCompositeConstruct %v4bool %95 %96 %97 %98 -%101 = OpLogicalEqual %v4bool %99 %100 -%102 = OpAll %bool %101 -OpBranch %87 -%87 = OpLabel -%103 = OpPhi %bool %false %65 %102 %86 -OpStore %ok %103 -OpSelectionMerge %108 None -OpBranchConditional %103 %106 %107 -%106 = OpLabel -%109 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%112 = OpLoad %v4float %109 -OpStore %104 %112 -OpBranch %108 -%107 = OpLabel -%113 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%114 = OpLoad %v4float %113 -OpStore %104 %114 -OpBranch %108 -%108 = OpLabel -%115 = OpLoad %v4float %104 -OpReturnValue %115 -OpFunctionEnd + %18 = OpLabel + %21 = OpVariable %_ptr_Function_v2float Function + OpStore %21 %20 + %23 = OpFunctionCall %v4float %main %21 + OpStore %sk_FragColor %23 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %24 + %25 = OpFunctionParameter %_ptr_Function_v2float + %26 = OpLabel + %ok = OpVariable %_ptr_Function_bool Function + %104 = OpVariable %_ptr_Function_v4float Function + OpStore %ok %true + OpSelectionMerge %32 None + OpBranchConditional %true %31 %32 + %31 = OpLabel + %33 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2 + %37 = OpLoad %mat2v2float %33 + %38 = OpCompositeExtract %float %37 0 0 + %39 = OpCompositeExtract %float %37 0 1 + %40 = OpCompositeExtract %float %37 1 0 + %41 = OpCompositeExtract %float %37 1 1 + %42 = OpCompositeConstruct %v4float %38 %39 %40 %41 + %48 = OpFOrdEqual %v4bool %42 %47 + %50 = OpAll %bool %48 + OpBranch %32 + %32 = OpLabel + %51 = OpPhi %bool %false %26 %50 %31 + OpStore %ok %51 + OpSelectionMerge %53 None + OpBranchConditional %51 %52 %53 + %52 = OpLabel + %54 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2 + %55 = OpLoad %mat2v2float %54 + %56 = OpCompositeExtract %float %55 0 0 + %57 = OpCompositeExtract %float %55 0 1 + %58 = OpCompositeExtract %float %55 1 0 + %59 = OpCompositeExtract %float %55 1 1 + %60 = OpCompositeConstruct %v4float %56 %57 %58 %59 + %61 = OpFOrdEqual %v4bool %60 %47 + %62 = OpAll %bool %61 + OpBranch %53 + %53 = OpLabel + %63 = OpPhi %bool %false %32 %62 %52 + OpStore %ok %63 + OpSelectionMerge %65 None + OpBranchConditional %63 %64 %65 + %64 = OpLabel + %66 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2 + %67 = OpLoad %mat2v2float %66 + %68 = OpCompositeExtract %float %67 0 0 + %69 = OpCompositeExtract %float %67 0 1 + %70 = OpCompositeExtract %float %67 1 0 + %71 = OpCompositeExtract %float %67 1 1 + %72 = OpCompositeConstruct %v4float %68 %69 %70 %71 + %73 = OpConvertFToS %int %68 + %74 = OpConvertFToS %int %69 + %75 = OpConvertFToS %int %70 + %76 = OpConvertFToS %int %71 + %78 = OpCompositeConstruct %v4int %73 %74 %75 %76 + %83 = OpIEqual %v4bool %78 %82 + %84 = OpAll %bool %83 + OpBranch %65 + %65 = OpLabel + %85 = OpPhi %bool %false %53 %84 %64 + OpStore %ok %85 + OpSelectionMerge %87 None + OpBranchConditional %85 %86 %87 + %86 = OpLabel + %88 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2 + %89 = OpLoad %mat2v2float %88 + %90 = OpCompositeExtract %float %89 0 0 + %91 = OpCompositeExtract %float %89 0 1 + %92 = OpCompositeExtract %float %89 1 0 + %93 = OpCompositeExtract %float %89 1 1 + %94 = OpCompositeConstruct %v4float %90 %91 %92 %93 + %95 = OpFUnordNotEqual %bool %90 %float_0 + %96 = OpFUnordNotEqual %bool %91 %float_0 + %97 = OpFUnordNotEqual %bool %92 %float_0 + %98 = OpFUnordNotEqual %bool %93 %float_0 + %99 = OpCompositeConstruct %v4bool %95 %96 %97 %98 + %101 = OpLogicalEqual %v4bool %99 %100 + %102 = OpAll %bool %101 + OpBranch %87 + %87 = OpLabel + %103 = OpPhi %bool %false %65 %102 %86 + OpStore %ok %103 + OpSelectionMerge %108 None + OpBranchConditional %103 %106 %107 + %106 = OpLabel + %109 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %112 = OpLoad %v4float %109 + OpStore %104 %112 + OpBranch %108 + %107 = OpLabel + %113 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %114 = OpLoad %v4float %113 + OpStore %104 %114 + OpBranch %108 + %108 = OpLabel + %115 = OpLoad %v4float %104 + OpReturnValue %115 + OpFunctionEnd diff --git a/tests/sksl/shared/MatrixToVectorCast.skrp b/tests/sksl/shared/MatrixToVectorCast.skrp index 7cb1f66af8b3..9995fdb74f85 100644 --- a/tests/sksl/shared/MatrixToVectorCast.skrp +++ b/tests/sksl/shared/MatrixToVectorCast.skrp @@ -1,22 +1,28 @@ +40 instructions + +[immutable slots] +i0 = 0x3F800000 (1.0) +i1 = 0x40000000 (2.0) +i2 = 0x40400000 (3.0) +i3 = 0x40800000 (4.0) +i4 = 0x00000001 (1.401298e-45) +i5 = 0x00000002 (2.802597e-45) +i6 = 0x00000003 (4.203895e-45) +i7 = 0x00000004 (5.605194e-45) + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_constant ok = 0xFFFFFFFF copy_slot_unmasked $0 = ok copy_4_uniforms $1..4 = testMatrix2x2 -copy_constant $5 = 0x3F800000 (1.0) -copy_constant $6 = 0x40000000 (2.0) -copy_constant $7 = 0x40400000 (3.0) -copy_constant $8 = 0x40800000 (4.0) +copy_4_immutables_unmasked $5..8 = i0..3 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_slot_unmasked ok = $0 copy_4_uniforms $1..4 = testMatrix2x2 -copy_constant $5 = 0x3F800000 (1.0) -copy_constant $6 = 0x40000000 (2.0) -copy_constant $7 = 0x40400000 (3.0) -copy_constant $8 = 0x40800000 (4.0) +copy_4_immutables_unmasked $5..8 = i0..3 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -24,10 +30,7 @@ bitwise_and_int $0 &= $1 copy_slot_unmasked ok = $0 copy_4_uniforms $1..4 = testMatrix2x2 cast_to_int_from_4_floats $1..4 = FloatToInt($1..4) -copy_constant $5 = 0x00000001 (1.401298e-45) -copy_constant $6 = 0x00000002 (2.802597e-45) -copy_constant $7 = 0x00000003 (4.203895e-45) -copy_constant $8 = 0x00000004 (5.605194e-45) +copy_4_immutables_unmasked $5..8 = i4..7 [0x00000001 (1.401298e-45), 0x00000002 (2.802597e-45), 0x00000003 (4.203895e-45), 0x00000004 (5.605194e-45)] cmpeq_4_ints $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 diff --git a/tests/sksl/shared/MatrixToVectorCast.wgsl b/tests/sksl/shared/MatrixToVectorCast.wgsl new file mode 100644 index 000000000000..3e0b15eea1f8 --- /dev/null +++ b/tests/sksl/shared/MatrixToVectorCast.wgsl @@ -0,0 +1,30 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, + testMatrix2x2: mat2x2, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var ok: bool = true; + ok = ok && all(vec4(_globalUniforms.testMatrix2x2[0], _globalUniforms.testMatrix2x2[1]) == vec4(1.0, 2.0, 3.0, 4.0)); + ok = ok && all(vec4(vec4(_globalUniforms.testMatrix2x2[0], _globalUniforms.testMatrix2x2[1])) == vec4(1.0, 2.0, 3.0, 4.0)); + ok = ok && all(vec4(vec4(_globalUniforms.testMatrix2x2[0], _globalUniforms.testMatrix2x2[1])) == vec4(1, 2, 3, 4)); + ok = ok && all(vec4(vec4(_globalUniforms.testMatrix2x2[0], _globalUniforms.testMatrix2x2[1])) == vec4(true)); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(ok)); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/MultipleAssignments.asm.frag b/tests/sksl/shared/MultipleAssignments.asm.frag index 7db40048af3e..ac32be59ef41 100644 --- a/tests/sksl/shared/MultipleAssignments.asm.frag +++ b/tests/sksl/shared/MultipleAssignments.asm.frag @@ -1,64 +1,64 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %x "x" -OpName %y "y" -OpName %a "a" -OpName %b "b" -OpName %c "c" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %a RelaxedPrecision -OpDecorate %b RelaxedPrecision -OpDecorate %c RelaxedPrecision -OpDecorate %30 RelaxedPrecision -OpDecorate %31 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %x "x" + OpName %y "y" + OpName %a "a" + OpName %b "b" + OpName %c "c" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %a RelaxedPrecision + OpDecorate %b RelaxedPrecision + OpDecorate %c RelaxedPrecision + OpDecorate %30 RelaxedPrecision + OpDecorate %31 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%12 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%16 = OpConstantComposite %v2float %float_0 %float_0 + %void = OpTypeVoid + %12 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %16 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%20 = OpTypeFunction %v4float %_ptr_Function_v2float + %20 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_float = OpTypePointer Function %float -%float_1 = OpConstant %float 1 + %float_1 = OpConstant %float 1 %_entrypoint_v = OpFunction %void None %12 -%13 = OpLabel -%17 = OpVariable %_ptr_Function_v2float Function -OpStore %17 %16 -%19 = OpFunctionCall %v4float %main %17 -OpStore %sk_FragColor %19 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %20 -%21 = OpFunctionParameter %_ptr_Function_v2float -%22 = OpLabel -%x = OpVariable %_ptr_Function_float Function -%y = OpVariable %_ptr_Function_float Function -%a = OpVariable %_ptr_Function_float Function -%b = OpVariable %_ptr_Function_float Function -%c = OpVariable %_ptr_Function_float Function -OpStore %y %float_1 -OpStore %x %float_1 -OpStore %c %float_0 -OpStore %b %float_0 -OpStore %a %float_0 -%30 = OpFMul %float %float_0 %float_0 -%31 = OpCompositeConstruct %v4float %30 %float_1 %float_0 %float_1 -OpReturnValue %31 -OpFunctionEnd + %13 = OpLabel + %17 = OpVariable %_ptr_Function_v2float Function + OpStore %17 %16 + %19 = OpFunctionCall %v4float %main %17 + OpStore %sk_FragColor %19 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %20 + %21 = OpFunctionParameter %_ptr_Function_v2float + %22 = OpLabel + %x = OpVariable %_ptr_Function_float Function + %y = OpVariable %_ptr_Function_float Function + %a = OpVariable %_ptr_Function_float Function + %b = OpVariable %_ptr_Function_float Function + %c = OpVariable %_ptr_Function_float Function + OpStore %y %float_1 + OpStore %x %float_1 + OpStore %c %float_0 + OpStore %b %float_0 + OpStore %a %float_0 + %30 = OpFMul %float %float_0 %float_0 + %31 = OpCompositeConstruct %v4float %30 %float_1 %float_0 %float_1 + OpReturnValue %31 + OpFunctionEnd diff --git a/tests/sksl/shared/MultipleAssignments.skrp b/tests/sksl/shared/MultipleAssignments.skrp index e696a67e7ebe..fc4cd986d08b 100644 --- a/tests/sksl/shared/MultipleAssignments.skrp +++ b/tests/sksl/shared/MultipleAssignments.skrp @@ -1,3 +1,5 @@ +17 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true splat_2_constants x, y = 0 diff --git a/tests/sksl/shared/MultipleAssignments.wgsl b/tests/sksl/shared/MultipleAssignments.wgsl new file mode 100644 index 000000000000..b12fc75016ee --- /dev/null +++ b/tests/sksl/shared/MultipleAssignments.wgsl @@ -0,0 +1,29 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var x: f32; + var y: f32; + y = 1.0; + x = y; + var a: f32; + var b: f32; + var c: f32; + c = 0.0; + b = c; + a = b; + return vec4(a * b, f32(x), c, f32(y)); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/NoFragCoordsPos.asm.vert b/tests/sksl/shared/NoFragCoordsPos.asm.vert index 5be62c609c9e..7d6dc2f7a06e 100644 --- a/tests/sksl/shared/NoFragCoordsPos.asm.vert +++ b/tests/sksl/shared/NoFragCoordsPos.asm.vert @@ -1,32 +1,32 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Vertex %main "main" %3 %pos -OpName %sk_PerVertex "sk_PerVertex" -OpMemberName %sk_PerVertex 0 "sk_Position" -OpMemberName %sk_PerVertex 1 "sk_PointSize" -OpName %pos "pos" -OpName %main "main" -OpMemberDecorate %sk_PerVertex 0 BuiltIn Position -OpMemberDecorate %sk_PerVertex 1 BuiltIn PointSize -OpDecorate %sk_PerVertex Block -OpDecorate %pos Location 0 -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %main "main" %3 %pos + OpName %sk_PerVertex "sk_PerVertex" + OpMemberName %sk_PerVertex 0 "sk_Position" + OpMemberName %sk_PerVertex 1 "sk_PointSize" + OpName %pos "pos" + OpName %main "main" + OpMemberDecorate %sk_PerVertex 0 BuiltIn Position + OpMemberDecorate %sk_PerVertex 1 BuiltIn PointSize + OpDecorate %sk_PerVertex Block + OpDecorate %pos Location 0 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %sk_PerVertex = OpTypeStruct %v4float %float %_ptr_Output_sk_PerVertex = OpTypePointer Output %sk_PerVertex -%3 = OpVariable %_ptr_Output_sk_PerVertex Output + %3 = OpVariable %_ptr_Output_sk_PerVertex Output %_ptr_Input_v4float = OpTypePointer Input %v4float -%pos = OpVariable %_ptr_Input_v4float Input -%void = OpTypeVoid -%11 = OpTypeFunction %void -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 + %pos = OpVariable %_ptr_Input_v4float Input + %void = OpTypeVoid + %11 = OpTypeFunction %void + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 %_ptr_Output_v4float = OpTypePointer Output %v4float -%main = OpFunction %void None %11 -%12 = OpLabel -%13 = OpLoad %v4float %pos -%16 = OpAccessChain %_ptr_Output_v4float %3 %int_0 -OpStore %16 %13 -OpReturn -OpFunctionEnd + %main = OpFunction %void None %11 + %12 = OpLabel + %13 = OpLoad %v4float %pos + %16 = OpAccessChain %_ptr_Output_v4float %3 %int_0 + OpStore %16 %13 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/NoFragCoordsPos.wgsl b/tests/sksl/shared/NoFragCoordsPos.wgsl new file mode 100644 index 000000000000..c0ed61f2819f --- /dev/null +++ b/tests/sksl/shared/NoFragCoordsPos.wgsl @@ -0,0 +1,18 @@ +diagnostic(off, derivative_uniformity); +struct VSIn { + @location(0) pos: vec4, +}; +struct VSOut { + @builtin(position) sk_Position: vec4, +}; +/* unsupported */ var sk_PointSize: f32; +fn main(_stageIn: VSIn, _stageOut: ptr) { + { + (*_stageOut).sk_Position = _stageIn.pos; + } +} +@vertex fn vertexMain(_stageIn: VSIn) -> VSOut { + var _stageOut: VSOut; + main(_stageIn, &_stageOut); + return _stageOut; +} diff --git a/tests/sksl/shared/NoFragCoordsPosRT.asm.vert b/tests/sksl/shared/NoFragCoordsPosRT.asm.vert index aa69aa7c13c9..9f0c38370fe7 100644 --- a/tests/sksl/shared/NoFragCoordsPosRT.asm.vert +++ b/tests/sksl/shared/NoFragCoordsPosRT.asm.vert @@ -1,67 +1,67 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Vertex %main "main" %3 %pos -OpName %sk_PerVertex "sk_PerVertex" -OpMemberName %sk_PerVertex 0 "sk_Position" -OpMemberName %sk_PerVertex 1 "sk_PointSize" -OpName %pos "pos" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "sk_RTAdjust" -OpName %main "main" -OpMemberDecorate %sk_PerVertex 0 BuiltIn Position -OpMemberDecorate %sk_PerVertex 1 BuiltIn PointSize -OpDecorate %sk_PerVertex Block -OpDecorate %pos Location 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %main "main" %3 %pos + OpName %sk_PerVertex "sk_PerVertex" + OpMemberName %sk_PerVertex 0 "sk_Position" + OpMemberName %sk_PerVertex 1 "sk_PointSize" + OpName %pos "pos" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "sk_RTAdjust" + OpName %main "main" + OpMemberDecorate %sk_PerVertex 0 BuiltIn Position + OpMemberDecorate %sk_PerVertex 1 BuiltIn PointSize + OpDecorate %sk_PerVertex Block + OpDecorate %pos Location 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %sk_PerVertex = OpTypeStruct %v4float %float %_ptr_Output_sk_PerVertex = OpTypePointer Output %sk_PerVertex -%3 = OpVariable %_ptr_Output_sk_PerVertex Output + %3 = OpVariable %_ptr_Output_sk_PerVertex Output %_ptr_Input_v4float = OpTypePointer Input %v4float -%pos = OpVariable %_ptr_Input_v4float Input + %pos = OpVariable %_ptr_Input_v4float Input %_UniformBuffer = OpTypeStruct %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%14 = OpTypeFunction %void -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %14 = OpTypeFunction %void + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 %_ptr_Output_v4float = OpTypePointer Output %v4float -%v2float = OpTypeVector %float 2 + %v2float = OpTypeVector %float 2 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%float_0 = OpConstant %float 0 -%main = OpFunction %void None %14 -%15 = OpLabel -%16 = OpLoad %v4float %pos -%19 = OpAccessChain %_ptr_Output_v4float %3 %int_0 -OpStore %19 %16 -%21 = OpAccessChain %_ptr_Output_v4float %3 %int_0 -%22 = OpLoad %v4float %21 -%23 = OpVectorShuffle %v2float %22 %22 0 1 -%25 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%27 = OpLoad %v4float %25 -%28 = OpVectorShuffle %v2float %27 %27 0 2 -%29 = OpFMul %v2float %23 %28 -%30 = OpAccessChain %_ptr_Output_v4float %3 %int_0 -%31 = OpLoad %v4float %30 -%32 = OpVectorShuffle %v2float %31 %31 3 3 -%33 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%34 = OpLoad %v4float %33 -%35 = OpVectorShuffle %v2float %34 %34 1 3 -%36 = OpFMul %v2float %32 %35 -%37 = OpFAdd %v2float %29 %36 -%38 = OpCompositeExtract %float %37 0 -%39 = OpCompositeExtract %float %37 1 -%41 = OpAccessChain %_ptr_Output_v4float %3 %int_0 -%42 = OpLoad %v4float %41 -%43 = OpCompositeExtract %float %42 3 -%44 = OpCompositeConstruct %v4float %38 %39 %float_0 %43 -%45 = OpAccessChain %_ptr_Output_v4float %3 %int_0 -OpStore %45 %44 -OpReturn -OpFunctionEnd + %float_0 = OpConstant %float 0 + %main = OpFunction %void None %14 + %15 = OpLabel + %16 = OpLoad %v4float %pos + %19 = OpAccessChain %_ptr_Output_v4float %3 %int_0 + OpStore %19 %16 + %21 = OpAccessChain %_ptr_Output_v4float %3 %int_0 + %22 = OpLoad %v4float %21 + %23 = OpVectorShuffle %v2float %22 %22 0 1 + %25 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %27 = OpLoad %v4float %25 + %28 = OpVectorShuffle %v2float %27 %27 0 2 + %29 = OpFMul %v2float %23 %28 + %30 = OpAccessChain %_ptr_Output_v4float %3 %int_0 + %31 = OpLoad %v4float %30 + %32 = OpVectorShuffle %v2float %31 %31 3 3 + %33 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %34 = OpLoad %v4float %33 + %35 = OpVectorShuffle %v2float %34 %34 1 3 + %36 = OpFMul %v2float %32 %35 + %37 = OpFAdd %v2float %29 %36 + %38 = OpCompositeExtract %float %37 0 + %39 = OpCompositeExtract %float %37 1 + %41 = OpAccessChain %_ptr_Output_v4float %3 %int_0 + %42 = OpLoad %v4float %41 + %43 = OpCompositeExtract %float %42 3 + %44 = OpCompositeConstruct %v4float %38 %39 %float_0 %43 + %45 = OpAccessChain %_ptr_Output_v4float %3 %int_0 + OpStore %45 %44 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/NoFragCoordsPosRT.wgsl b/tests/sksl/shared/NoFragCoordsPosRT.wgsl new file mode 100644 index 000000000000..39c6710f8851 --- /dev/null +++ b/tests/sksl/shared/NoFragCoordsPosRT.wgsl @@ -0,0 +1,23 @@ +diagnostic(off, derivative_uniformity); +struct VSIn { + @location(0) pos: vec4, +}; +struct VSOut { + @builtin(position) sk_Position: vec4, +}; +/* unsupported */ var sk_PointSize: f32; +struct _GlobalUniforms { + sk_RTAdjust: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_stageIn: VSIn, _stageOut: ptr) { + { + (*_stageOut).sk_Position = _stageIn.pos; + (*_stageOut).sk_Position = vec4((*_stageOut).sk_Position.xy * _globalUniforms.sk_RTAdjust.xz + (*_stageOut).sk_Position.ww * _globalUniforms.sk_RTAdjust.yw, 0.0, (*_stageOut).sk_Position.w); + } +} +@vertex fn vertexMain(_stageIn: VSIn) -> VSOut { + var _stageOut: VSOut; + main(_stageIn, &_stageOut); + return _stageOut; +} diff --git a/tests/sksl/shared/NormalizationVert.asm.vert b/tests/sksl/shared/NormalizationVert.asm.vert index df30a40abc26..8c6f546c1c9b 100644 --- a/tests/sksl/shared/NormalizationVert.asm.vert +++ b/tests/sksl/shared/NormalizationVert.asm.vert @@ -1,64 +1,64 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Vertex %main "main" %3 -OpName %sk_PerVertex "sk_PerVertex" -OpMemberName %sk_PerVertex 0 "sk_Position" -OpMemberName %sk_PerVertex 1 "sk_PointSize" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "sk_RTAdjust" -OpName %main "main" -OpMemberDecorate %sk_PerVertex 0 BuiltIn Position -OpMemberDecorate %sk_PerVertex 1 BuiltIn PointSize -OpDecorate %sk_PerVertex Block -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpDecorate %_UniformBuffer Block -OpDecorate %8 Binding 0 -OpDecorate %8 DescriptorSet 0 -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %main "main" %3 + OpName %sk_PerVertex "sk_PerVertex" + OpMemberName %sk_PerVertex 0 "sk_Position" + OpMemberName %sk_PerVertex 1 "sk_PointSize" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "sk_RTAdjust" + OpName %main "main" + OpMemberDecorate %sk_PerVertex 0 BuiltIn Position + OpMemberDecorate %sk_PerVertex 1 BuiltIn PointSize + OpDecorate %sk_PerVertex Block + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpDecorate %_UniformBuffer Block + OpDecorate %8 Binding 0 + OpDecorate %8 DescriptorSet 0 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %sk_PerVertex = OpTypeStruct %v4float %float %_ptr_Output_sk_PerVertex = OpTypePointer Output %sk_PerVertex -%3 = OpVariable %_ptr_Output_sk_PerVertex Output + %3 = OpVariable %_ptr_Output_sk_PerVertex Output %_UniformBuffer = OpTypeStruct %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%8 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%12 = OpTypeFunction %void -%float_1 = OpConstant %float 1 -%15 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 + %8 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %12 = OpTypeFunction %void + %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 %_ptr_Output_v4float = OpTypePointer Output %v4float -%v2float = OpTypeVector %float 2 + %v2float = OpTypeVector %float 2 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%float_0 = OpConstant %float 0 -%main = OpFunction %void None %12 -%13 = OpLabel -%18 = OpAccessChain %_ptr_Output_v4float %3 %int_0 -OpStore %18 %15 -%20 = OpAccessChain %_ptr_Output_v4float %3 %int_0 -%21 = OpLoad %v4float %20 -%22 = OpVectorShuffle %v2float %21 %21 0 1 -%24 = OpAccessChain %_ptr_Uniform_v4float %8 %int_0 -%26 = OpLoad %v4float %24 -%27 = OpVectorShuffle %v2float %26 %26 0 2 -%28 = OpFMul %v2float %22 %27 -%29 = OpAccessChain %_ptr_Output_v4float %3 %int_0 -%30 = OpLoad %v4float %29 -%31 = OpVectorShuffle %v2float %30 %30 3 3 -%32 = OpAccessChain %_ptr_Uniform_v4float %8 %int_0 -%33 = OpLoad %v4float %32 -%34 = OpVectorShuffle %v2float %33 %33 1 3 -%35 = OpFMul %v2float %31 %34 -%36 = OpFAdd %v2float %28 %35 -%37 = OpCompositeExtract %float %36 0 -%38 = OpCompositeExtract %float %36 1 -%40 = OpAccessChain %_ptr_Output_v4float %3 %int_0 -%41 = OpLoad %v4float %40 -%42 = OpCompositeExtract %float %41 3 -%43 = OpCompositeConstruct %v4float %37 %38 %float_0 %42 -%44 = OpAccessChain %_ptr_Output_v4float %3 %int_0 -OpStore %44 %43 -OpReturn -OpFunctionEnd + %float_0 = OpConstant %float 0 + %main = OpFunction %void None %12 + %13 = OpLabel + %18 = OpAccessChain %_ptr_Output_v4float %3 %int_0 + OpStore %18 %15 + %20 = OpAccessChain %_ptr_Output_v4float %3 %int_0 + %21 = OpLoad %v4float %20 + %22 = OpVectorShuffle %v2float %21 %21 0 1 + %24 = OpAccessChain %_ptr_Uniform_v4float %8 %int_0 + %26 = OpLoad %v4float %24 + %27 = OpVectorShuffle %v2float %26 %26 0 2 + %28 = OpFMul %v2float %22 %27 + %29 = OpAccessChain %_ptr_Output_v4float %3 %int_0 + %30 = OpLoad %v4float %29 + %31 = OpVectorShuffle %v2float %30 %30 3 3 + %32 = OpAccessChain %_ptr_Uniform_v4float %8 %int_0 + %33 = OpLoad %v4float %32 + %34 = OpVectorShuffle %v2float %33 %33 1 3 + %35 = OpFMul %v2float %31 %34 + %36 = OpFAdd %v2float %28 %35 + %37 = OpCompositeExtract %float %36 0 + %38 = OpCompositeExtract %float %36 1 + %40 = OpAccessChain %_ptr_Output_v4float %3 %int_0 + %41 = OpLoad %v4float %40 + %42 = OpCompositeExtract %float %41 3 + %43 = OpCompositeConstruct %v4float %37 %38 %float_0 %42 + %44 = OpAccessChain %_ptr_Output_v4float %3 %int_0 + OpStore %44 %43 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/NormalizationVert.wgsl b/tests/sksl/shared/NormalizationVert.wgsl new file mode 100644 index 000000000000..182ef3f9150f --- /dev/null +++ b/tests/sksl/shared/NormalizationVert.wgsl @@ -0,0 +1,20 @@ +diagnostic(off, derivative_uniformity); +struct VSOut { + @builtin(position) sk_Position: vec4, +}; +/* unsupported */ var sk_PointSize: f32; +struct _GlobalUniforms { + sk_RTAdjust: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_stageOut: ptr) { + { + (*_stageOut).sk_Position = vec4(1.0); + (*_stageOut).sk_Position = vec4((*_stageOut).sk_Position.xy * _globalUniforms.sk_RTAdjust.xz + (*_stageOut).sk_Position.ww * _globalUniforms.sk_RTAdjust.yw, 0.0, (*_stageOut).sk_Position.w); + } +} +@vertex fn vertexMain() -> VSOut { + var _stageOut: VSOut; + main(&_stageOut); + return _stageOut; +} diff --git a/tests/sksl/shared/NumberCasts.asm.frag b/tests/sksl/shared/NumberCasts.asm.frag index 52b4f1acdd75..b142f0079f16 100644 --- a/tests/sksl/shared/NumberCasts.asm.frag +++ b/tests/sksl/shared/NumberCasts.asm.frag @@ -1,124 +1,124 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %B "B" -OpName %F "F" -OpName %I "I" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %60 RelaxedPrecision -OpDecorate %64 RelaxedPrecision -OpDecorate %69 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %82 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %B "B" + OpName %F "F" + OpName %I "I" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %60 RelaxedPrecision + OpDecorate %64 RelaxedPrecision + OpDecorate %69 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %82 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%12 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%16 = OpConstantComposite %v2float %float_0 %float_0 + %void = OpTypeVoid + %12 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %16 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%20 = OpTypeFunction %v4float %_ptr_Function_v2float -%v3bool = OpTypeVector %bool 3 + %20 = OpTypeFunction %v4float %_ptr_Function_v2float + %v3bool = OpTypeVector %bool 3 %_ptr_Function_v3bool = OpTypePointer Function %v3bool -%true = OpConstantTrue %bool + %true = OpConstantTrue %bool %_ptr_Function_bool = OpTypePointer Function %bool -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 -%v3float = OpTypeVector %float 3 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 + %v3float = OpTypeVector %float 3 %_ptr_Function_v3float = OpTypePointer Function %v3float %float_1_23000002 = OpConstant %float 1.23000002 %_ptr_Function_float = OpTypePointer Function %float -%float_1 = OpConstant %float 1 -%v3int = OpTypeVector %int 3 + %float_1 = OpConstant %float 1 + %v3int = OpTypeVector %int 3 %_ptr_Function_v3int = OpTypePointer Function %v3int %_ptr_Function_int = OpTypePointer Function %int -%false = OpConstantFalse %bool + %false = OpConstantFalse %bool %_entrypoint_v = OpFunction %void None %12 -%13 = OpLabel -%17 = OpVariable %_ptr_Function_v2float Function -OpStore %17 %16 -%19 = OpFunctionCall %v4float %main %17 -OpStore %sk_FragColor %19 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %20 -%21 = OpFunctionParameter %_ptr_Function_v2float -%22 = OpLabel -%B = OpVariable %_ptr_Function_v3bool Function -%F = OpVariable %_ptr_Function_v3float Function -%I = OpVariable %_ptr_Function_v3int Function -%27 = OpAccessChain %_ptr_Function_bool %B %int_0 -OpStore %27 %true -%31 = OpAccessChain %_ptr_Function_bool %B %int_1 -OpStore %31 %true -%33 = OpAccessChain %_ptr_Function_bool %B %int_2 -OpStore %33 %true -%39 = OpAccessChain %_ptr_Function_float %F %int_0 -OpStore %39 %float_1_23000002 -%41 = OpAccessChain %_ptr_Function_float %F %int_1 -OpStore %41 %float_0 -%43 = OpAccessChain %_ptr_Function_float %F %int_2 -OpStore %43 %float_1 -%47 = OpAccessChain %_ptr_Function_int %I %int_0 -OpStore %47 %int_1 -%49 = OpAccessChain %_ptr_Function_int %I %int_1 -OpStore %49 %int_1 -%50 = OpAccessChain %_ptr_Function_int %I %int_2 -OpStore %50 %int_1 -%51 = OpLoad %v3float %F -%52 = OpCompositeExtract %float %51 0 -%53 = OpLoad %v3float %F -%54 = OpCompositeExtract %float %53 1 -%55 = OpFMul %float %52 %54 -%56 = OpLoad %v3float %F -%57 = OpCompositeExtract %float %56 2 -%58 = OpFMul %float %55 %57 -%60 = OpLoad %v3bool %B -%61 = OpCompositeExtract %bool %60 0 -OpSelectionMerge %63 None -OpBranchConditional %61 %62 %63 -%62 = OpLabel -%64 = OpLoad %v3bool %B -%65 = OpCompositeExtract %bool %64 1 -OpBranch %63 -%63 = OpLabel -%66 = OpPhi %bool %false %22 %65 %62 -OpSelectionMerge %68 None -OpBranchConditional %66 %67 %68 -%67 = OpLabel -%69 = OpLoad %v3bool %B -%70 = OpCompositeExtract %bool %69 2 -OpBranch %68 -%68 = OpLabel -%71 = OpPhi %bool %false %63 %70 %67 -%72 = OpSelect %float %71 %float_1 %float_0 -%73 = OpLoad %v3int %I -%74 = OpCompositeExtract %int %73 0 -%75 = OpLoad %v3int %I -%76 = OpCompositeExtract %int %75 1 -%77 = OpIMul %int %74 %76 -%78 = OpLoad %v3int %I -%79 = OpCompositeExtract %int %78 2 -%80 = OpIMul %int %77 %79 -%81 = OpConvertSToF %float %80 -%82 = OpCompositeConstruct %v4float %58 %72 %float_0 %81 -OpReturnValue %82 -OpFunctionEnd + %13 = OpLabel + %17 = OpVariable %_ptr_Function_v2float Function + OpStore %17 %16 + %19 = OpFunctionCall %v4float %main %17 + OpStore %sk_FragColor %19 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %20 + %21 = OpFunctionParameter %_ptr_Function_v2float + %22 = OpLabel + %B = OpVariable %_ptr_Function_v3bool Function + %F = OpVariable %_ptr_Function_v3float Function + %I = OpVariable %_ptr_Function_v3int Function + %27 = OpAccessChain %_ptr_Function_bool %B %int_0 + OpStore %27 %true + %31 = OpAccessChain %_ptr_Function_bool %B %int_1 + OpStore %31 %true + %33 = OpAccessChain %_ptr_Function_bool %B %int_2 + OpStore %33 %true + %39 = OpAccessChain %_ptr_Function_float %F %int_0 + OpStore %39 %float_1_23000002 + %41 = OpAccessChain %_ptr_Function_float %F %int_1 + OpStore %41 %float_0 + %43 = OpAccessChain %_ptr_Function_float %F %int_2 + OpStore %43 %float_1 + %47 = OpAccessChain %_ptr_Function_int %I %int_0 + OpStore %47 %int_1 + %49 = OpAccessChain %_ptr_Function_int %I %int_1 + OpStore %49 %int_1 + %50 = OpAccessChain %_ptr_Function_int %I %int_2 + OpStore %50 %int_1 + %51 = OpLoad %v3float %F + %52 = OpCompositeExtract %float %51 0 + %53 = OpLoad %v3float %F + %54 = OpCompositeExtract %float %53 1 + %55 = OpFMul %float %52 %54 + %56 = OpLoad %v3float %F + %57 = OpCompositeExtract %float %56 2 + %58 = OpFMul %float %55 %57 + %60 = OpLoad %v3bool %B + %61 = OpCompositeExtract %bool %60 0 + OpSelectionMerge %63 None + OpBranchConditional %61 %62 %63 + %62 = OpLabel + %64 = OpLoad %v3bool %B + %65 = OpCompositeExtract %bool %64 1 + OpBranch %63 + %63 = OpLabel + %66 = OpPhi %bool %false %22 %65 %62 + OpSelectionMerge %68 None + OpBranchConditional %66 %67 %68 + %67 = OpLabel + %69 = OpLoad %v3bool %B + %70 = OpCompositeExtract %bool %69 2 + OpBranch %68 + %68 = OpLabel + %71 = OpPhi %bool %false %63 %70 %67 + %72 = OpSelect %float %71 %float_1 %float_0 + %73 = OpLoad %v3int %I + %74 = OpCompositeExtract %int %73 0 + %75 = OpLoad %v3int %I + %76 = OpCompositeExtract %int %75 1 + %77 = OpIMul %int %74 %76 + %78 = OpLoad %v3int %I + %79 = OpCompositeExtract %int %78 2 + %80 = OpIMul %int %77 %79 + %81 = OpConvertSToF %float %80 + %82 = OpCompositeConstruct %v4float %58 %72 %float_0 %81 + OpReturnValue %82 + OpFunctionEnd diff --git a/tests/sksl/shared/NumberCasts.skrp b/tests/sksl/shared/NumberCasts.skrp index d506dca7b26f..9029be02ceac 100644 --- a/tests/sksl/shared/NumberCasts.skrp +++ b/tests/sksl/shared/NumberCasts.skrp @@ -1,3 +1,5 @@ +26 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true splat_3_constants B = 0 diff --git a/tests/sksl/shared/NumberCasts.wgsl b/tests/sksl/shared/NumberCasts.wgsl new file mode 100644 index 000000000000..4804dc1f0cae --- /dev/null +++ b/tests/sksl/shared/NumberCasts.wgsl @@ -0,0 +1,31 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var B: vec3; + B.x = true; + B.y = true; + B.z = true; + var F: vec3; + F.x = 1.23; + F.y = 0.0; + F.z = 1.0; + var I: vec3; + I.x = 1; + I.y = 1; + I.z = 1; + return vec4(f32((F.x * F.y) * F.z), f32((B.x && B.y) && B.z), 0.0, f32((I.x * I.y) * I.z)); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/NumberConversions.asm.frag b/tests/sksl/shared/NumberConversions.asm.frag index b2b509643383..dd400917c7c3 100644 --- a/tests/sksl/shared/NumberConversions.asm.frag +++ b/tests/sksl/shared/NumberConversions.asm.frag @@ -1,417 +1,417 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "unknownInput" -OpName %main "main" -OpName %b "b" -OpName %s "s" -OpName %i "i" -OpName %us "us" -OpName %ui "ui" -OpName %h "h" -OpName %f "f" -OpName %s2s "s2s" -OpName %i2s "i2s" -OpName %us2s "us2s" -OpName %ui2s "ui2s" -OpName %h2s "h2s" -OpName %f2s "f2s" -OpName %b2s "b2s" -OpName %s2i "s2i" -OpName %i2i "i2i" -OpName %us2i "us2i" -OpName %ui2i "ui2i" -OpName %h2i "h2i" -OpName %f2i "f2i" -OpName %b2i "b2i" -OpName %s2us "s2us" -OpName %i2us "i2us" -OpName %us2us "us2us" -OpName %ui2us "ui2us" -OpName %h2us "h2us" -OpName %f2us "f2us" -OpName %b2us "b2us" -OpName %s2ui "s2ui" -OpName %i2ui "i2ui" -OpName %us2ui "us2ui" -OpName %ui2ui "ui2ui" -OpName %h2ui "h2ui" -OpName %f2ui "f2ui" -OpName %b2ui "b2ui" -OpName %s2f "s2f" -OpName %i2f "i2f" -OpName %us2f "us2f" -OpName %ui2f "ui2f" -OpName %h2f "h2f" -OpName %f2f "f2f" -OpName %b2f "b2f" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %s RelaxedPrecision -OpDecorate %26 RelaxedPrecision -OpDecorate %us RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %h RelaxedPrecision -OpDecorate %s2s RelaxedPrecision -OpDecorate %i2s RelaxedPrecision -OpDecorate %us2s RelaxedPrecision -OpDecorate %51 RelaxedPrecision -OpDecorate %ui2s RelaxedPrecision -OpDecorate %53 RelaxedPrecision -OpDecorate %h2s RelaxedPrecision -OpDecorate %55 RelaxedPrecision -OpDecorate %f2s RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %b2s RelaxedPrecision -OpDecorate %59 RelaxedPrecision -OpDecorate %s2us RelaxedPrecision -OpDecorate %74 RelaxedPrecision -OpDecorate %i2us RelaxedPrecision -OpDecorate %76 RelaxedPrecision -OpDecorate %us2us RelaxedPrecision -OpDecorate %ui2us RelaxedPrecision -OpDecorate %h2us RelaxedPrecision -OpDecorate %80 RelaxedPrecision -OpDecorate %f2us RelaxedPrecision -OpDecorate %82 RelaxedPrecision -OpDecorate %b2us RelaxedPrecision -OpDecorate %84 RelaxedPrecision -OpDecorate %113 RelaxedPrecision -OpDecorate %114 RelaxedPrecision -OpDecorate %115 RelaxedPrecision -OpDecorate %116 RelaxedPrecision -OpDecorate %117 RelaxedPrecision -OpDecorate %118 RelaxedPrecision -OpDecorate %119 RelaxedPrecision -OpDecorate %120 RelaxedPrecision -OpDecorate %121 RelaxedPrecision -OpDecorate %122 RelaxedPrecision -OpDecorate %123 RelaxedPrecision -OpDecorate %124 RelaxedPrecision -OpDecorate %125 RelaxedPrecision -OpDecorate %126 RelaxedPrecision -OpDecorate %127 RelaxedPrecision -OpDecorate %128 RelaxedPrecision -OpDecorate %129 RelaxedPrecision -OpDecorate %130 RelaxedPrecision -OpDecorate %131 RelaxedPrecision -OpDecorate %132 RelaxedPrecision -OpDecorate %133 RelaxedPrecision -OpDecorate %134 RelaxedPrecision -OpDecorate %135 RelaxedPrecision -OpDecorate %136 RelaxedPrecision -OpDecorate %137 RelaxedPrecision -OpDecorate %138 RelaxedPrecision -OpDecorate %139 RelaxedPrecision -OpDecorate %140 RelaxedPrecision -OpDecorate %141 RelaxedPrecision -OpDecorate %142 RelaxedPrecision -OpDecorate %143 RelaxedPrecision -OpDecorate %144 RelaxedPrecision -OpDecorate %145 RelaxedPrecision -OpDecorate %146 RelaxedPrecision -OpDecorate %147 RelaxedPrecision -OpDecorate %148 RelaxedPrecision -OpDecorate %149 RelaxedPrecision -OpDecorate %150 RelaxedPrecision -OpDecorate %151 RelaxedPrecision -OpDecorate %152 RelaxedPrecision -OpDecorate %153 RelaxedPrecision -OpDecorate %154 RelaxedPrecision -OpDecorate %155 RelaxedPrecision -OpDecorate %159 RelaxedPrecision -OpDecorate %160 RelaxedPrecision -OpDecorate %161 RelaxedPrecision -OpDecorate %162 RelaxedPrecision -OpDecorate %163 RelaxedPrecision -OpDecorate %164 RelaxedPrecision -OpDecorate %165 RelaxedPrecision -OpDecorate %166 RelaxedPrecision -OpDecorate %167 RelaxedPrecision -OpDecorate %168 RelaxedPrecision -OpDecorate %169 RelaxedPrecision -OpDecorate %170 RelaxedPrecision -OpDecorate %172 RelaxedPrecision -OpDecorate %173 RelaxedPrecision -OpDecorate %175 RelaxedPrecision -OpDecorate %176 RelaxedPrecision -OpDecorate %178 RelaxedPrecision -OpDecorate %179 RelaxedPrecision -OpDecorate %181 RelaxedPrecision -OpDecorate %182 RelaxedPrecision -OpDecorate %184 RelaxedPrecision -OpDecorate %185 RelaxedPrecision -OpDecorate %187 RelaxedPrecision -OpDecorate %188 RelaxedPrecision -OpDecorate %190 RelaxedPrecision -OpDecorate %191 RelaxedPrecision -OpDecorate %193 RelaxedPrecision -OpDecorate %195 RelaxedPrecision -OpDecorate %197 RelaxedPrecision -OpDecorate %199 RelaxedPrecision -OpDecorate %201 RelaxedPrecision -OpDecorate %203 RelaxedPrecision -OpDecorate %205 RelaxedPrecision -OpDecorate %206 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "unknownInput" + OpName %main "main" + OpName %b "b" + OpName %s "s" + OpName %i "i" + OpName %us "us" + OpName %ui "ui" + OpName %h "h" + OpName %f "f" + OpName %s2s "s2s" + OpName %i2s "i2s" + OpName %us2s "us2s" + OpName %ui2s "ui2s" + OpName %h2s "h2s" + OpName %f2s "f2s" + OpName %b2s "b2s" + OpName %s2i "s2i" + OpName %i2i "i2i" + OpName %us2i "us2i" + OpName %ui2i "ui2i" + OpName %h2i "h2i" + OpName %f2i "f2i" + OpName %b2i "b2i" + OpName %s2us "s2us" + OpName %i2us "i2us" + OpName %us2us "us2us" + OpName %ui2us "ui2us" + OpName %h2us "h2us" + OpName %f2us "f2us" + OpName %b2us "b2us" + OpName %s2ui "s2ui" + OpName %i2ui "i2ui" + OpName %us2ui "us2ui" + OpName %ui2ui "ui2ui" + OpName %h2ui "h2ui" + OpName %f2ui "f2ui" + OpName %b2ui "b2ui" + OpName %s2f "s2f" + OpName %i2f "i2f" + OpName %us2f "us2f" + OpName %ui2f "ui2f" + OpName %h2f "h2f" + OpName %f2f "f2f" + OpName %b2f "b2f" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %s RelaxedPrecision + OpDecorate %26 RelaxedPrecision + OpDecorate %us RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %h RelaxedPrecision + OpDecorate %s2s RelaxedPrecision + OpDecorate %i2s RelaxedPrecision + OpDecorate %us2s RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %ui2s RelaxedPrecision + OpDecorate %53 RelaxedPrecision + OpDecorate %h2s RelaxedPrecision + OpDecorate %55 RelaxedPrecision + OpDecorate %f2s RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %b2s RelaxedPrecision + OpDecorate %59 RelaxedPrecision + OpDecorate %s2us RelaxedPrecision + OpDecorate %74 RelaxedPrecision + OpDecorate %i2us RelaxedPrecision + OpDecorate %76 RelaxedPrecision + OpDecorate %us2us RelaxedPrecision + OpDecorate %ui2us RelaxedPrecision + OpDecorate %h2us RelaxedPrecision + OpDecorate %80 RelaxedPrecision + OpDecorate %f2us RelaxedPrecision + OpDecorate %82 RelaxedPrecision + OpDecorate %b2us RelaxedPrecision + OpDecorate %84 RelaxedPrecision + OpDecorate %113 RelaxedPrecision + OpDecorate %114 RelaxedPrecision + OpDecorate %115 RelaxedPrecision + OpDecorate %116 RelaxedPrecision + OpDecorate %117 RelaxedPrecision + OpDecorate %118 RelaxedPrecision + OpDecorate %119 RelaxedPrecision + OpDecorate %120 RelaxedPrecision + OpDecorate %121 RelaxedPrecision + OpDecorate %122 RelaxedPrecision + OpDecorate %123 RelaxedPrecision + OpDecorate %124 RelaxedPrecision + OpDecorate %125 RelaxedPrecision + OpDecorate %126 RelaxedPrecision + OpDecorate %127 RelaxedPrecision + OpDecorate %128 RelaxedPrecision + OpDecorate %129 RelaxedPrecision + OpDecorate %130 RelaxedPrecision + OpDecorate %131 RelaxedPrecision + OpDecorate %132 RelaxedPrecision + OpDecorate %133 RelaxedPrecision + OpDecorate %134 RelaxedPrecision + OpDecorate %135 RelaxedPrecision + OpDecorate %136 RelaxedPrecision + OpDecorate %137 RelaxedPrecision + OpDecorate %138 RelaxedPrecision + OpDecorate %139 RelaxedPrecision + OpDecorate %140 RelaxedPrecision + OpDecorate %141 RelaxedPrecision + OpDecorate %142 RelaxedPrecision + OpDecorate %143 RelaxedPrecision + OpDecorate %144 RelaxedPrecision + OpDecorate %145 RelaxedPrecision + OpDecorate %146 RelaxedPrecision + OpDecorate %147 RelaxedPrecision + OpDecorate %148 RelaxedPrecision + OpDecorate %149 RelaxedPrecision + OpDecorate %150 RelaxedPrecision + OpDecorate %151 RelaxedPrecision + OpDecorate %152 RelaxedPrecision + OpDecorate %153 RelaxedPrecision + OpDecorate %154 RelaxedPrecision + OpDecorate %155 RelaxedPrecision + OpDecorate %159 RelaxedPrecision + OpDecorate %160 RelaxedPrecision + OpDecorate %161 RelaxedPrecision + OpDecorate %162 RelaxedPrecision + OpDecorate %163 RelaxedPrecision + OpDecorate %164 RelaxedPrecision + OpDecorate %165 RelaxedPrecision + OpDecorate %166 RelaxedPrecision + OpDecorate %167 RelaxedPrecision + OpDecorate %168 RelaxedPrecision + OpDecorate %169 RelaxedPrecision + OpDecorate %170 RelaxedPrecision + OpDecorate %172 RelaxedPrecision + OpDecorate %173 RelaxedPrecision + OpDecorate %175 RelaxedPrecision + OpDecorate %176 RelaxedPrecision + OpDecorate %178 RelaxedPrecision + OpDecorate %179 RelaxedPrecision + OpDecorate %181 RelaxedPrecision + OpDecorate %182 RelaxedPrecision + OpDecorate %184 RelaxedPrecision + OpDecorate %185 RelaxedPrecision + OpDecorate %187 RelaxedPrecision + OpDecorate %188 RelaxedPrecision + OpDecorate %190 RelaxedPrecision + OpDecorate %191 RelaxedPrecision + OpDecorate %193 RelaxedPrecision + OpDecorate %195 RelaxedPrecision + OpDecorate %197 RelaxedPrecision + OpDecorate %199 RelaxedPrecision + OpDecorate %201 RelaxedPrecision + OpDecorate %203 RelaxedPrecision + OpDecorate %205 RelaxedPrecision + OpDecorate %206 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%14 = OpTypeFunction %void + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %14 = OpTypeFunction %void %_ptr_Function_bool = OpTypePointer Function %bool -%true = OpConstantTrue %bool -%int = OpTypeInt 32 1 + %true = OpConstantTrue %bool + %int = OpTypeInt 32 1 %_ptr_Function_int = OpTypePointer Function %int %_ptr_Uniform_float = OpTypePointer Uniform %float -%int_0 = OpConstant %int 0 -%uint = OpTypeInt 32 0 + %int_0 = OpConstant %int 0 + %uint = OpTypeInt 32 0 %_ptr_Function_uint = OpTypePointer Function %uint %_ptr_Function_float = OpTypePointer Function %float -%int_1 = OpConstant %int 1 -%uint_1 = OpConstant %uint 1 -%uint_0 = OpConstant %uint 0 -%float_1 = OpConstant %float 1 -%float_0 = OpConstant %float 0 + %int_1 = OpConstant %int 1 + %uint_1 = OpConstant %uint 1 + %uint_0 = OpConstant %uint 0 + %float_1 = OpConstant %float 1 + %float_0 = OpConstant %float 0 %_ptr_Output_float = OpTypePointer Output %float -%main = OpFunction %void None %14 -%15 = OpLabel -%b = OpVariable %_ptr_Function_bool Function -%s = OpVariable %_ptr_Function_int Function -%i = OpVariable %_ptr_Function_int Function -%us = OpVariable %_ptr_Function_uint Function -%ui = OpVariable %_ptr_Function_uint Function -%h = OpVariable %_ptr_Function_float Function -%f = OpVariable %_ptr_Function_float Function -%s2s = OpVariable %_ptr_Function_int Function -%i2s = OpVariable %_ptr_Function_int Function -%us2s = OpVariable %_ptr_Function_int Function -%ui2s = OpVariable %_ptr_Function_int Function -%h2s = OpVariable %_ptr_Function_int Function -%f2s = OpVariable %_ptr_Function_int Function -%b2s = OpVariable %_ptr_Function_int Function -%s2i = OpVariable %_ptr_Function_int Function -%i2i = OpVariable %_ptr_Function_int Function -%us2i = OpVariable %_ptr_Function_int Function -%ui2i = OpVariable %_ptr_Function_int Function -%h2i = OpVariable %_ptr_Function_int Function -%f2i = OpVariable %_ptr_Function_int Function -%b2i = OpVariable %_ptr_Function_int Function -%s2us = OpVariable %_ptr_Function_uint Function -%i2us = OpVariable %_ptr_Function_uint Function -%us2us = OpVariable %_ptr_Function_uint Function -%ui2us = OpVariable %_ptr_Function_uint Function -%h2us = OpVariable %_ptr_Function_uint Function -%f2us = OpVariable %_ptr_Function_uint Function -%b2us = OpVariable %_ptr_Function_uint Function -%s2ui = OpVariable %_ptr_Function_uint Function -%i2ui = OpVariable %_ptr_Function_uint Function -%us2ui = OpVariable %_ptr_Function_uint Function -%ui2ui = OpVariable %_ptr_Function_uint Function -%h2ui = OpVariable %_ptr_Function_uint Function -%f2ui = OpVariable %_ptr_Function_uint Function -%b2ui = OpVariable %_ptr_Function_uint Function -%s2f = OpVariable %_ptr_Function_float Function -%i2f = OpVariable %_ptr_Function_float Function -%us2f = OpVariable %_ptr_Function_float Function -%ui2f = OpVariable %_ptr_Function_float Function -%h2f = OpVariable %_ptr_Function_float Function -%f2f = OpVariable %_ptr_Function_float Function -%b2f = OpVariable %_ptr_Function_float Function -OpStore %b %true -%22 = OpAccessChain %_ptr_Uniform_float %10 %int_0 -%25 = OpLoad %float %22 -%26 = OpConvertFToS %int %25 -OpStore %s %26 -%28 = OpAccessChain %_ptr_Uniform_float %10 %int_0 -%29 = OpLoad %float %28 -%30 = OpConvertFToS %int %29 -OpStore %i %30 -%34 = OpAccessChain %_ptr_Uniform_float %10 %int_0 -%35 = OpLoad %float %34 -%36 = OpConvertFToU %uint %35 -OpStore %us %36 -%38 = OpAccessChain %_ptr_Uniform_float %10 %int_0 -%39 = OpLoad %float %38 -%40 = OpConvertFToU %uint %39 -OpStore %ui %40 -%43 = OpAccessChain %_ptr_Uniform_float %10 %int_0 -%44 = OpLoad %float %43 -OpStore %h %44 -%46 = OpAccessChain %_ptr_Uniform_float %10 %int_0 -%47 = OpLoad %float %46 -OpStore %f %47 -OpStore %s2s %26 -OpStore %i2s %30 -%51 = OpBitcast %int %36 -OpStore %us2s %51 -%53 = OpBitcast %int %40 -OpStore %ui2s %53 -%55 = OpConvertFToS %int %44 -OpStore %h2s %55 -%57 = OpConvertFToS %int %47 -OpStore %f2s %57 -%59 = OpSelect %int %true %int_1 %int_0 -OpStore %b2s %59 -OpStore %s2i %26 -OpStore %i2i %30 -%64 = OpBitcast %int %36 -OpStore %us2i %64 -%66 = OpBitcast %int %40 -OpStore %ui2i %66 -%68 = OpConvertFToS %int %44 -OpStore %h2i %68 -%70 = OpConvertFToS %int %47 -OpStore %f2i %70 -%72 = OpSelect %int %true %int_1 %int_0 -OpStore %b2i %72 -%74 = OpBitcast %uint %26 -OpStore %s2us %74 -%76 = OpBitcast %uint %30 -OpStore %i2us %76 -OpStore %us2us %36 -OpStore %ui2us %40 -%80 = OpConvertFToU %uint %44 -OpStore %h2us %80 -%82 = OpConvertFToU %uint %47 -OpStore %f2us %82 -%84 = OpSelect %uint %true %uint_1 %uint_0 -OpStore %b2us %84 -%88 = OpBitcast %uint %26 -OpStore %s2ui %88 -%90 = OpBitcast %uint %30 -OpStore %i2ui %90 -OpStore %us2ui %36 -OpStore %ui2ui %40 -%94 = OpConvertFToU %uint %44 -OpStore %h2ui %94 -%96 = OpConvertFToU %uint %47 -OpStore %f2ui %96 -%98 = OpSelect %uint %true %uint_1 %uint_0 -OpStore %b2ui %98 -%100 = OpConvertSToF %float %26 -OpStore %s2f %100 -%102 = OpConvertSToF %float %30 -OpStore %i2f %102 -%104 = OpConvertUToF %float %36 -OpStore %us2f %104 -%106 = OpConvertUToF %float %40 -OpStore %ui2f %106 -OpStore %h2f %44 -OpStore %f2f %47 -%110 = OpSelect %float %true %float_1 %float_0 -OpStore %b2f %110 -%113 = OpConvertSToF %float %26 -%114 = OpConvertSToF %float %30 -%115 = OpFAdd %float %113 %114 -%116 = OpConvertUToF %float %36 -%117 = OpFAdd %float %115 %116 -%118 = OpConvertUToF %float %40 -%119 = OpFAdd %float %117 %118 -%120 = OpFAdd %float %119 %44 -%121 = OpFAdd %float %120 %47 -%122 = OpConvertSToF %float %26 -%123 = OpFAdd %float %121 %122 -%124 = OpConvertSToF %float %30 -%125 = OpFAdd %float %123 %124 -%126 = OpConvertSToF %float %51 -%127 = OpFAdd %float %125 %126 -%128 = OpConvertSToF %float %53 -%129 = OpFAdd %float %127 %128 -%130 = OpConvertSToF %float %55 -%131 = OpFAdd %float %129 %130 -%132 = OpConvertSToF %float %57 -%133 = OpFAdd %float %131 %132 -%134 = OpConvertSToF %float %59 -%135 = OpFAdd %float %133 %134 -%136 = OpConvertSToF %float %26 -%137 = OpFAdd %float %135 %136 -%138 = OpConvertSToF %float %30 -%139 = OpFAdd %float %137 %138 -%140 = OpConvertSToF %float %64 -%141 = OpFAdd %float %139 %140 -%142 = OpConvertSToF %float %66 -%143 = OpFAdd %float %141 %142 -%144 = OpConvertSToF %float %68 -%145 = OpFAdd %float %143 %144 -%146 = OpConvertSToF %float %70 -%147 = OpFAdd %float %145 %146 -%148 = OpConvertSToF %float %72 -%149 = OpFAdd %float %147 %148 -%150 = OpConvertUToF %float %74 -%151 = OpFAdd %float %149 %150 -%152 = OpConvertUToF %float %76 -%153 = OpFAdd %float %151 %152 -%154 = OpConvertUToF %float %36 -%155 = OpFAdd %float %153 %154 -%156 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 -OpStore %156 %155 -%158 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 -%159 = OpLoad %float %158 -%160 = OpLoad %uint %ui2us -%161 = OpConvertUToF %float %160 -%162 = OpLoad %uint %h2us -%163 = OpConvertUToF %float %162 -%164 = OpFAdd %float %161 %163 -%165 = OpLoad %uint %f2us -%166 = OpConvertUToF %float %165 -%167 = OpFAdd %float %164 %166 -%168 = OpLoad %uint %b2us -%169 = OpConvertUToF %float %168 -%170 = OpFAdd %float %167 %169 -%171 = OpLoad %uint %s2ui -%172 = OpConvertUToF %float %171 -%173 = OpFAdd %float %170 %172 -%174 = OpLoad %uint %i2ui -%175 = OpConvertUToF %float %174 -%176 = OpFAdd %float %173 %175 -%177 = OpLoad %uint %us2ui -%178 = OpConvertUToF %float %177 -%179 = OpFAdd %float %176 %178 -%180 = OpLoad %uint %ui2ui -%181 = OpConvertUToF %float %180 -%182 = OpFAdd %float %179 %181 -%183 = OpLoad %uint %h2ui -%184 = OpConvertUToF %float %183 -%185 = OpFAdd %float %182 %184 -%186 = OpLoad %uint %f2ui -%187 = OpConvertUToF %float %186 -%188 = OpFAdd %float %185 %187 -%189 = OpLoad %uint %b2ui -%190 = OpConvertUToF %float %189 -%191 = OpFAdd %float %188 %190 -%192 = OpLoad %float %s2f -%193 = OpFAdd %float %191 %192 -%194 = OpLoad %float %i2f -%195 = OpFAdd %float %193 %194 -%196 = OpLoad %float %us2f -%197 = OpFAdd %float %195 %196 -%198 = OpLoad %float %ui2f -%199 = OpFAdd %float %197 %198 -%200 = OpLoad %float %h2f -%201 = OpFAdd %float %199 %200 -%202 = OpLoad %float %f2f -%203 = OpFAdd %float %201 %202 -%204 = OpLoad %float %b2f -%205 = OpFAdd %float %203 %204 -%206 = OpFAdd %float %159 %205 -OpStore %158 %206 -OpReturn -OpFunctionEnd + %main = OpFunction %void None %14 + %15 = OpLabel + %b = OpVariable %_ptr_Function_bool Function + %s = OpVariable %_ptr_Function_int Function + %i = OpVariable %_ptr_Function_int Function + %us = OpVariable %_ptr_Function_uint Function + %ui = OpVariable %_ptr_Function_uint Function + %h = OpVariable %_ptr_Function_float Function + %f = OpVariable %_ptr_Function_float Function + %s2s = OpVariable %_ptr_Function_int Function + %i2s = OpVariable %_ptr_Function_int Function + %us2s = OpVariable %_ptr_Function_int Function + %ui2s = OpVariable %_ptr_Function_int Function + %h2s = OpVariable %_ptr_Function_int Function + %f2s = OpVariable %_ptr_Function_int Function + %b2s = OpVariable %_ptr_Function_int Function + %s2i = OpVariable %_ptr_Function_int Function + %i2i = OpVariable %_ptr_Function_int Function + %us2i = OpVariable %_ptr_Function_int Function + %ui2i = OpVariable %_ptr_Function_int Function + %h2i = OpVariable %_ptr_Function_int Function + %f2i = OpVariable %_ptr_Function_int Function + %b2i = OpVariable %_ptr_Function_int Function + %s2us = OpVariable %_ptr_Function_uint Function + %i2us = OpVariable %_ptr_Function_uint Function + %us2us = OpVariable %_ptr_Function_uint Function + %ui2us = OpVariable %_ptr_Function_uint Function + %h2us = OpVariable %_ptr_Function_uint Function + %f2us = OpVariable %_ptr_Function_uint Function + %b2us = OpVariable %_ptr_Function_uint Function + %s2ui = OpVariable %_ptr_Function_uint Function + %i2ui = OpVariable %_ptr_Function_uint Function + %us2ui = OpVariable %_ptr_Function_uint Function + %ui2ui = OpVariable %_ptr_Function_uint Function + %h2ui = OpVariable %_ptr_Function_uint Function + %f2ui = OpVariable %_ptr_Function_uint Function + %b2ui = OpVariable %_ptr_Function_uint Function + %s2f = OpVariable %_ptr_Function_float Function + %i2f = OpVariable %_ptr_Function_float Function + %us2f = OpVariable %_ptr_Function_float Function + %ui2f = OpVariable %_ptr_Function_float Function + %h2f = OpVariable %_ptr_Function_float Function + %f2f = OpVariable %_ptr_Function_float Function + %b2f = OpVariable %_ptr_Function_float Function + OpStore %b %true + %22 = OpAccessChain %_ptr_Uniform_float %10 %int_0 + %25 = OpLoad %float %22 + %26 = OpConvertFToS %int %25 + OpStore %s %26 + %28 = OpAccessChain %_ptr_Uniform_float %10 %int_0 + %29 = OpLoad %float %28 + %30 = OpConvertFToS %int %29 + OpStore %i %30 + %34 = OpAccessChain %_ptr_Uniform_float %10 %int_0 + %35 = OpLoad %float %34 + %36 = OpConvertFToU %uint %35 + OpStore %us %36 + %38 = OpAccessChain %_ptr_Uniform_float %10 %int_0 + %39 = OpLoad %float %38 + %40 = OpConvertFToU %uint %39 + OpStore %ui %40 + %43 = OpAccessChain %_ptr_Uniform_float %10 %int_0 + %44 = OpLoad %float %43 + OpStore %h %44 + %46 = OpAccessChain %_ptr_Uniform_float %10 %int_0 + %47 = OpLoad %float %46 + OpStore %f %47 + OpStore %s2s %26 + OpStore %i2s %30 + %51 = OpBitcast %int %36 + OpStore %us2s %51 + %53 = OpBitcast %int %40 + OpStore %ui2s %53 + %55 = OpConvertFToS %int %44 + OpStore %h2s %55 + %57 = OpConvertFToS %int %47 + OpStore %f2s %57 + %59 = OpSelect %int %true %int_1 %int_0 + OpStore %b2s %59 + OpStore %s2i %26 + OpStore %i2i %30 + %64 = OpBitcast %int %36 + OpStore %us2i %64 + %66 = OpBitcast %int %40 + OpStore %ui2i %66 + %68 = OpConvertFToS %int %44 + OpStore %h2i %68 + %70 = OpConvertFToS %int %47 + OpStore %f2i %70 + %72 = OpSelect %int %true %int_1 %int_0 + OpStore %b2i %72 + %74 = OpBitcast %uint %26 + OpStore %s2us %74 + %76 = OpBitcast %uint %30 + OpStore %i2us %76 + OpStore %us2us %36 + OpStore %ui2us %40 + %80 = OpConvertFToU %uint %44 + OpStore %h2us %80 + %82 = OpConvertFToU %uint %47 + OpStore %f2us %82 + %84 = OpSelect %uint %true %uint_1 %uint_0 + OpStore %b2us %84 + %88 = OpBitcast %uint %26 + OpStore %s2ui %88 + %90 = OpBitcast %uint %30 + OpStore %i2ui %90 + OpStore %us2ui %36 + OpStore %ui2ui %40 + %94 = OpConvertFToU %uint %44 + OpStore %h2ui %94 + %96 = OpConvertFToU %uint %47 + OpStore %f2ui %96 + %98 = OpSelect %uint %true %uint_1 %uint_0 + OpStore %b2ui %98 + %100 = OpConvertSToF %float %26 + OpStore %s2f %100 + %102 = OpConvertSToF %float %30 + OpStore %i2f %102 + %104 = OpConvertUToF %float %36 + OpStore %us2f %104 + %106 = OpConvertUToF %float %40 + OpStore %ui2f %106 + OpStore %h2f %44 + OpStore %f2f %47 + %110 = OpSelect %float %true %float_1 %float_0 + OpStore %b2f %110 + %113 = OpConvertSToF %float %26 + %114 = OpConvertSToF %float %30 + %115 = OpFAdd %float %113 %114 + %116 = OpConvertUToF %float %36 + %117 = OpFAdd %float %115 %116 + %118 = OpConvertUToF %float %40 + %119 = OpFAdd %float %117 %118 + %120 = OpFAdd %float %119 %44 + %121 = OpFAdd %float %120 %47 + %122 = OpConvertSToF %float %26 + %123 = OpFAdd %float %121 %122 + %124 = OpConvertSToF %float %30 + %125 = OpFAdd %float %123 %124 + %126 = OpConvertSToF %float %51 + %127 = OpFAdd %float %125 %126 + %128 = OpConvertSToF %float %53 + %129 = OpFAdd %float %127 %128 + %130 = OpConvertSToF %float %55 + %131 = OpFAdd %float %129 %130 + %132 = OpConvertSToF %float %57 + %133 = OpFAdd %float %131 %132 + %134 = OpConvertSToF %float %59 + %135 = OpFAdd %float %133 %134 + %136 = OpConvertSToF %float %26 + %137 = OpFAdd %float %135 %136 + %138 = OpConvertSToF %float %30 + %139 = OpFAdd %float %137 %138 + %140 = OpConvertSToF %float %64 + %141 = OpFAdd %float %139 %140 + %142 = OpConvertSToF %float %66 + %143 = OpFAdd %float %141 %142 + %144 = OpConvertSToF %float %68 + %145 = OpFAdd %float %143 %144 + %146 = OpConvertSToF %float %70 + %147 = OpFAdd %float %145 %146 + %148 = OpConvertSToF %float %72 + %149 = OpFAdd %float %147 %148 + %150 = OpConvertUToF %float %74 + %151 = OpFAdd %float %149 %150 + %152 = OpConvertUToF %float %76 + %153 = OpFAdd %float %151 %152 + %154 = OpConvertUToF %float %36 + %155 = OpFAdd %float %153 %154 + %156 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 + OpStore %156 %155 + %158 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 + %159 = OpLoad %float %158 + %160 = OpLoad %uint %ui2us + %161 = OpConvertUToF %float %160 + %162 = OpLoad %uint %h2us + %163 = OpConvertUToF %float %162 + %164 = OpFAdd %float %161 %163 + %165 = OpLoad %uint %f2us + %166 = OpConvertUToF %float %165 + %167 = OpFAdd %float %164 %166 + %168 = OpLoad %uint %b2us + %169 = OpConvertUToF %float %168 + %170 = OpFAdd %float %167 %169 + %171 = OpLoad %uint %s2ui + %172 = OpConvertUToF %float %171 + %173 = OpFAdd %float %170 %172 + %174 = OpLoad %uint %i2ui + %175 = OpConvertUToF %float %174 + %176 = OpFAdd %float %173 %175 + %177 = OpLoad %uint %us2ui + %178 = OpConvertUToF %float %177 + %179 = OpFAdd %float %176 %178 + %180 = OpLoad %uint %ui2ui + %181 = OpConvertUToF %float %180 + %182 = OpFAdd %float %179 %181 + %183 = OpLoad %uint %h2ui + %184 = OpConvertUToF %float %183 + %185 = OpFAdd %float %182 %184 + %186 = OpLoad %uint %f2ui + %187 = OpConvertUToF %float %186 + %188 = OpFAdd %float %185 %187 + %189 = OpLoad %uint %b2ui + %190 = OpConvertUToF %float %189 + %191 = OpFAdd %float %188 %190 + %192 = OpLoad %float %s2f + %193 = OpFAdd %float %191 %192 + %194 = OpLoad %float %i2f + %195 = OpFAdd %float %193 %194 + %196 = OpLoad %float %us2f + %197 = OpFAdd %float %195 %196 + %198 = OpLoad %float %ui2f + %199 = OpFAdd %float %197 %198 + %200 = OpLoad %float %h2f + %201 = OpFAdd %float %199 %200 + %202 = OpLoad %float %f2f + %203 = OpFAdd %float %201 %202 + %204 = OpLoad %float %b2f + %205 = OpFAdd %float %203 %204 + %206 = OpFAdd %float %159 %205 + OpStore %158 %206 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/NumberConversions.wgsl b/tests/sksl/shared/NumberConversions.wgsl new file mode 100644 index 000000000000..e3fb4de362a1 --- /dev/null +++ b/tests/sksl/shared/NumberConversions.wgsl @@ -0,0 +1,64 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + unknownInput: f32, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_stageOut: ptr) { + { + var b: bool = true; + var s: i32 = i32(_globalUniforms.unknownInput); + var i: i32 = i32(_globalUniforms.unknownInput); + var us: u32 = u32(_globalUniforms.unknownInput); + var ui: u32 = u32(_globalUniforms.unknownInput); + var h: f32 = f32(_globalUniforms.unknownInput); + var f: f32 = _globalUniforms.unknownInput; + var s2s: i32 = s; + var i2s: i32 = i32(i); + var us2s: i32 = i32(us); + var ui2s: i32 = i32(ui); + var h2s: i32 = i32(h); + var f2s: i32 = i32(f); + var b2s: i32 = i32(b); + var s2i: i32 = i32(s); + var i2i: i32 = i; + var us2i: i32 = i32(us); + var ui2i: i32 = i32(ui); + var h2i: i32 = i32(h); + var f2i: i32 = i32(f); + var b2i: i32 = i32(b); + var s2us: u32 = u32(s); + var i2us: u32 = u32(i); + var us2us: u32 = us; + var ui2us: u32 = u32(ui); + var h2us: u32 = u32(h); + var f2us: u32 = u32(f); + var b2us: u32 = u32(b); + var s2ui: u32 = u32(s); + var i2ui: u32 = u32(i); + var us2ui: u32 = u32(us); + var ui2ui: u32 = ui; + var h2ui: u32 = u32(h); + var f2ui: u32 = u32(f); + var b2ui: u32 = u32(b); + var s2f: f32 = f32(s); + var i2f: f32 = f32(i); + var us2f: f32 = f32(us); + var ui2f: f32 = f32(ui); + var h2f: f32 = f32(h); + var f2f: f32 = f; + var b2f: f32 = f32(b); + (*_stageOut).sk_FragColor.x = (((((((((((((((((((((f32(s) + f32(i)) + f32(us)) + f32(ui)) + h) + f32(f)) + f32(s2s)) + f32(i2s)) + f32(us2s)) + f32(ui2s)) + f32(h2s)) + f32(f2s)) + f32(b2s)) + f32(s2i)) + f32(i2i)) + f32(us2i)) + f32(ui2i)) + f32(h2i)) + f32(f2i)) + f32(b2i)) + f32(s2us)) + f32(i2us)) + f32(us2us); + (*_stageOut).sk_FragColor.x = (*_stageOut).sk_FragColor.x + (((((((((((((((((f32(ui2us) + f32(h2us)) + f32(f2us)) + f32(b2us)) + f32(s2ui)) + f32(i2ui)) + f32(us2ui)) + f32(ui2ui)) + f32(h2ui)) + f32(f2ui)) + f32(b2ui)) + f32(s2f)) + f32(i2f)) + f32(us2f)) + f32(ui2f)) + f32(h2f)) + f32(f2f)) + f32(b2f)); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(&_stageOut); + return _stageOut; +} diff --git a/tests/sksl/shared/Octal.asm.frag b/tests/sksl/shared/Octal.asm.frag index f02e7b0616a5..10d5230cd144 100644 --- a/tests/sksl/shared/Octal.asm.frag +++ b/tests/sksl/shared/Octal.asm.frag @@ -1,112 +1,112 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %i1 "i1" -OpName %i2 "i2" -OpName %i3 "i3" -OpName %i4 "i4" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %55 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %58 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %i1 "i1" + OpName %i2 "i2" + OpName %i3 "i3" + OpName %i4 "i4" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %55 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %58 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%int = OpTypeInt 32 1 + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %int = OpTypeInt 32 1 %_ptr_Function_int = OpTypePointer Function %int -%int_1 = OpConstant %int 1 -%int_342391 = OpConstant %int 342391 + %int_1 = OpConstant %int 1 + %int_342391 = OpConstant %int 342391 %int_2000000000 = OpConstant %int 2000000000 %int_n2000000000 = OpConstant %int -2000000000 -%false = OpConstantFalse %bool -%true = OpConstantTrue %bool + %false = OpConstantFalse %bool + %true = OpConstantTrue %bool %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_0 = OpConstant %int 0 + %int_0 = OpConstant %int 0 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%i1 = OpVariable %_ptr_Function_int Function -%i2 = OpVariable %_ptr_Function_int Function -%i3 = OpVariable %_ptr_Function_int Function -%i4 = OpVariable %_ptr_Function_int Function -%47 = OpVariable %_ptr_Function_v4float Function -OpStore %i1 %int_1 -OpStore %i2 %int_342391 -OpStore %i3 %int_2000000000 -OpStore %i4 %int_n2000000000 -OpSelectionMerge %39 None -OpBranchConditional %true %38 %39 -%38 = OpLabel -OpBranch %39 -%39 = OpLabel -%40 = OpPhi %bool %false %25 %true %38 -OpSelectionMerge %42 None -OpBranchConditional %40 %41 %42 -%41 = OpLabel -OpBranch %42 -%42 = OpLabel -%43 = OpPhi %bool %false %39 %true %41 -OpSelectionMerge %45 None -OpBranchConditional %43 %44 %45 -%44 = OpLabel -OpBranch %45 -%45 = OpLabel -%46 = OpPhi %bool %false %42 %true %44 -OpSelectionMerge %51 None -OpBranchConditional %46 %49 %50 -%49 = OpLabel -%52 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%55 = OpLoad %v4float %52 -OpStore %47 %55 -OpBranch %51 -%50 = OpLabel -%56 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%57 = OpLoad %v4float %56 -OpStore %47 %57 -OpBranch %51 -%51 = OpLabel -%58 = OpLoad %v4float %47 -OpReturnValue %58 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %i1 = OpVariable %_ptr_Function_int Function + %i2 = OpVariable %_ptr_Function_int Function + %i3 = OpVariable %_ptr_Function_int Function + %i4 = OpVariable %_ptr_Function_int Function + %47 = OpVariable %_ptr_Function_v4float Function + OpStore %i1 %int_1 + OpStore %i2 %int_342391 + OpStore %i3 %int_2000000000 + OpStore %i4 %int_n2000000000 + OpSelectionMerge %39 None + OpBranchConditional %true %38 %39 + %38 = OpLabel + OpBranch %39 + %39 = OpLabel + %40 = OpPhi %bool %false %25 %true %38 + OpSelectionMerge %42 None + OpBranchConditional %40 %41 %42 + %41 = OpLabel + OpBranch %42 + %42 = OpLabel + %43 = OpPhi %bool %false %39 %true %41 + OpSelectionMerge %45 None + OpBranchConditional %43 %44 %45 + %44 = OpLabel + OpBranch %45 + %45 = OpLabel + %46 = OpPhi %bool %false %42 %true %44 + OpSelectionMerge %51 None + OpBranchConditional %46 %49 %50 + %49 = OpLabel + %52 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %55 = OpLoad %v4float %52 + OpStore %47 %55 + OpBranch %51 + %50 = OpLabel + %56 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %57 = OpLoad %v4float %56 + OpStore %47 %57 + OpBranch %51 + %51 = OpLabel + %58 = OpLoad %v4float %47 + OpReturnValue %58 + OpFunctionEnd diff --git a/tests/sksl/shared/Octal.skrp b/tests/sksl/shared/Octal.skrp index b927bf89f2c2..83e359038735 100644 --- a/tests/sksl/shared/Octal.skrp +++ b/tests/sksl/shared/Octal.skrp @@ -1,20 +1,22 @@ +18 instructions + [immutable slots] -i1 = 0x00000001 (1.401298e-45) -i2 = 0x00053977 (4.79792e-40) -i3 = 0x77359400 (3.682842e+33) -i4 = 0x88CA6C00 (-1.21828235e-33) +i0 = 0x00000001 (1.401298e-45) +i1 = 0x00053977 (4.79792e-40) +i2 = 0x77359400 (3.682842e+33) +i3 = 0x88CA6C00 (-1.21828235e-33) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true -copy_slot_unmasked $0 = i1 +copy_constant $0 = 0x00000001 (1.401298e-45) cmpeq_imm_int $0 = equal($0, 0x00000001) -copy_slot_unmasked $1 = i2 +copy_constant $1 = 0x00053977 (4.79792e-40) cmpeq_imm_int $1 = equal($1, 0x00053977) bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = i3 +copy_constant $1 = 0x77359400 (3.682842e+33) cmpeq_imm_int $1 = equal($1, 0x77359400) bitwise_and_int $0 &= $1 -copy_slot_unmasked $1 = i4 +copy_constant $1 = 0x88CA6C00 (-1.21828235e-33) cmpeq_imm_int $1 = equal($1, 0x88CA6C00) bitwise_and_int $0 &= $1 swizzle_4 $0..3 = ($0..3).xxxx diff --git a/tests/sksl/shared/Octal.wgsl b/tests/sksl/shared/Octal.wgsl new file mode 100644 index 000000000000..53283dffbe31 --- /dev/null +++ b/tests/sksl/shared/Octal.wgsl @@ -0,0 +1,28 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var i1: i32 = 1; + var i2: i32 = 342391; + var i3: i32 = 2000000000; + var i4: i32 = -2000000000; + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((i1 == 1) && (i2 == 342391)) && (i3 == 2000000000)) && (i4 == -2000000000))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/Offset.asm.frag b/tests/sksl/shared/Offset.asm.frag index 5785e6692a4a..8bf69879ec64 100644 --- a/tests/sksl/shared/Offset.asm.frag +++ b/tests/sksl/shared/Offset.asm.frag @@ -1,48 +1,48 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %main "main" -OpName %Test "Test" -OpMemberName %Test 0 "x" -OpMemberName %Test 1 "y" -OpMemberName %Test 2 "z" -OpName %t "t" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %Test 0 Offset 0 -OpMemberDecorate %Test 1 Offset 4 -OpMemberDecorate %Test 2 Offset 8 -OpDecorate %22 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %main "main" + OpName %Test "Test" + OpMemberName %Test 0 "x" + OpMemberName %Test 1 "y" + OpMemberName %Test 2 "z" + OpName %t "t" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %Test 0 Offset 0 + OpMemberDecorate %Test 1 Offset 4 + OpMemberDecorate %Test 2 Offset 8 + OpDecorate %22 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%11 = OpTypeFunction %void -%int = OpTypeInt 32 1 -%Test = OpTypeStruct %int %int %int + %void = OpTypeVoid + %11 = OpTypeFunction %void + %int = OpTypeInt 32 1 + %Test = OpTypeStruct %int %int %int %_ptr_Function_Test = OpTypePointer Function %Test -%int_0 = OpConstant %int 0 + %int_0 = OpConstant %int 0 %_ptr_Function_int = OpTypePointer Function %int %_ptr_Output_float = OpTypePointer Output %float -%main = OpFunction %void None %11 -%12 = OpLabel -%t = OpVariable %_ptr_Function_Test Function -%18 = OpAccessChain %_ptr_Function_int %t %int_0 -OpStore %18 %int_0 -%20 = OpAccessChain %_ptr_Function_int %t %int_0 -%21 = OpLoad %int %20 -%22 = OpConvertSToF %float %21 -%23 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 -OpStore %23 %22 -OpReturn -OpFunctionEnd + %main = OpFunction %void None %11 + %12 = OpLabel + %t = OpVariable %_ptr_Function_Test Function + %18 = OpAccessChain %_ptr_Function_int %t %int_0 + OpStore %18 %int_0 + %20 = OpAccessChain %_ptr_Function_int %t %int_0 + %21 = OpLoad %int %20 + %22 = OpConvertSToF %float %21 + %23 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 + OpStore %23 %22 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/Offset.wgsl b/tests/sksl/shared/Offset.wgsl new file mode 100644 index 000000000000..1c497972ffa4 --- /dev/null +++ b/tests/sksl/shared/Offset.wgsl @@ -0,0 +1,24 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct Test { + @size(4) x: i32, + y: i32, + z: i32, +}; +fn main(_stageOut: ptr) { + { + var t: Test; + t.x = 0; + (*_stageOut).sk_FragColor.x = f32(t.x); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(&_stageOut); + return _stageOut; +} diff --git a/tests/sksl/shared/OperatorsES2.asm.frag b/tests/sksl/shared/OperatorsES2.asm.frag index fb2a7a516e72..2346438b4b95 100644 --- a/tests/sksl/shared/OperatorsES2.asm.frag +++ b/tests/sksl/shared/OperatorsES2.asm.frag @@ -1,206 +1,206 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpMemberName %_UniformBuffer 2 "unknownInput" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %x "x" -OpName %y "y" -OpName %z "z" -OpName %b "b" -OpName %c "c" -OpName %d "d" -OpName %e "e" -OpName %f "f" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %61 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -OpDecorate %115 RelaxedPrecision -OpDecorate %117 RelaxedPrecision -OpDecorate %118 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpMemberName %_UniformBuffer 2 "unknownInput" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %x "x" + OpName %y "y" + OpName %z "z" + OpName %b "b" + OpName %c "c" + OpName %d "d" + OpName %e "e" + OpName %f "f" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %61 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %115 RelaxedPrecision + OpDecorate %117 RelaxedPrecision + OpDecorate %118 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_float = OpTypePointer Function %float -%float_1 = OpConstant %float 1 -%float_2 = OpConstant %float 2 -%int = OpTypeInt 32 1 + %float_1 = OpConstant %float 1 + %float_2 = OpConstant %float 2 + %int = OpTypeInt 32 1 %_ptr_Function_int = OpTypePointer Function %int -%int_3 = OpConstant %int 3 -%int_2 = OpConstant %int 2 -%int_4 = OpConstant %int 4 + %int_3 = OpConstant %int 3 + %int_2 = OpConstant %int 2 + %int_4 = OpConstant %int 4 %_ptr_Function_bool = OpTypePointer Function %bool -%true = OpConstantTrue %bool -%float_4 = OpConstant %float 4 -%false = OpConstantFalse %bool + %true = OpConstantTrue %bool + %float_4 = OpConstant %float 4 + %false = OpConstantFalse %bool %_ptr_Uniform_float = OpTypePointer Uniform %float -%float_12 = OpConstant %float 12 + %float_12 = OpConstant %float 12 %float_0_100000001 = OpConstant %float 0.100000001 -%float_6 = OpConstant %float 6 -%int_1 = OpConstant %int 1 -%int_6 = OpConstant %int 6 + %float_6 = OpConstant %float 6 + %int_1 = OpConstant %int 1 + %int_6 = OpConstant %int 6 %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_0 = OpConstant %int 0 + %int_0 = OpConstant %int 0 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%x = OpVariable %_ptr_Function_float Function -%y = OpVariable %_ptr_Function_float Function -%z = OpVariable %_ptr_Function_int Function -%b = OpVariable %_ptr_Function_bool Function -%c = OpVariable %_ptr_Function_bool Function -%d = OpVariable %_ptr_Function_bool Function -%e = OpVariable %_ptr_Function_bool Function -%f = OpVariable %_ptr_Function_bool Function -%107 = OpVariable %_ptr_Function_v4float Function -OpStore %x %float_1 -OpStore %y %float_2 -OpStore %z %int_3 -%35 = OpFSub %float %float_1 %float_1 -%36 = OpFMul %float %float_2 %float_1 -%37 = OpFMul %float %36 %float_1 -%38 = OpFSub %float %float_2 %float_1 -%39 = OpFMul %float %37 %38 -%40 = OpFAdd %float %35 %39 -OpStore %x %40 -%41 = OpFDiv %float %40 %float_2 -%42 = OpFDiv %float %41 %40 -OpStore %y %42 -%44 = OpSDiv %int %int_3 %int_2 -%45 = OpIMul %int %44 %int_3 -%47 = OpIAdd %int %45 %int_4 -%48 = OpISub %int %47 %int_2 -OpStore %z %48 -%53 = OpFOrdGreaterThan %bool %40 %float_4 -%54 = OpFOrdLessThan %bool %40 %float_2 -%55 = OpLogicalEqual %bool %53 %54 -OpSelectionMerge %57 None -OpBranchConditional %55 %57 %56 -%56 = OpLabel -%59 = OpAccessChain %_ptr_Uniform_float %10 %int_2 -%61 = OpLoad %float %59 -%62 = OpFOrdGreaterThanEqual %bool %float_2 %61 -OpSelectionMerge %64 None -OpBranchConditional %62 %63 %64 -%63 = OpLabel -%65 = OpFOrdLessThanEqual %bool %42 %40 -OpBranch %64 -%64 = OpLabel -%66 = OpPhi %bool %false %56 %65 %63 -OpBranch %57 -%57 = OpLabel -%67 = OpPhi %bool %true %25 %66 %64 -OpStore %b %67 -%69 = OpAccessChain %_ptr_Uniform_float %10 %int_2 -%70 = OpLoad %float %69 -%71 = OpFOrdGreaterThan %bool %70 %float_2 -OpStore %c %71 -%73 = OpLogicalNotEqual %bool %67 %71 -OpStore %d %73 -OpSelectionMerge %76 None -OpBranchConditional %67 %75 %76 -%75 = OpLabel -OpBranch %76 -%76 = OpLabel -%77 = OpPhi %bool %false %57 %71 %75 -OpStore %e %77 -OpSelectionMerge %80 None -OpBranchConditional %67 %80 %79 -%79 = OpLabel -OpBranch %80 -%80 = OpLabel -%81 = OpPhi %bool %true %76 %71 %79 -OpStore %f %81 -%83 = OpFAdd %float %40 %float_12 -OpStore %x %83 -%84 = OpFSub %float %83 %float_12 -OpStore %x %84 -%86 = OpFMul %float %42 %float_0_100000001 -OpStore %y %86 -%87 = OpFMul %float %84 %86 -OpStore %x %87 -OpStore %x %float_6 -%89 = OpSelect %float %67 %float_1 %float_0 -%90 = OpSelect %float %71 %float_1 %float_0 -%91 = OpFMul %float %89 %90 -%92 = OpSelect %float %73 %float_1 %float_0 -%93 = OpFMul %float %91 %92 -%94 = OpSelect %float %77 %float_1 %float_0 -%95 = OpFMul %float %93 %94 -%96 = OpSelect %float %81 %float_1 %float_0 -%97 = OpFMul %float %95 %96 -OpStore %y %97 -OpStore %y %float_6 -%99 = OpISub %int %48 %int_1 -OpStore %z %99 -OpStore %z %int_6 -OpSelectionMerge %102 None -OpBranchConditional %true %101 %102 -%101 = OpLabel -OpBranch %102 -%102 = OpLabel -%103 = OpPhi %bool %false %80 %true %101 -OpSelectionMerge %105 None -OpBranchConditional %103 %104 %105 -%104 = OpLabel -OpBranch %105 -%105 = OpLabel -%106 = OpPhi %bool %false %102 %true %104 -OpSelectionMerge %111 None -OpBranchConditional %106 %109 %110 -%109 = OpLabel -%112 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%115 = OpLoad %v4float %112 -OpStore %107 %115 -OpBranch %111 -%110 = OpLabel -%116 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%117 = OpLoad %v4float %116 -OpStore %107 %117 -OpBranch %111 -%111 = OpLabel -%118 = OpLoad %v4float %107 -OpReturnValue %118 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %x = OpVariable %_ptr_Function_float Function + %y = OpVariable %_ptr_Function_float Function + %z = OpVariable %_ptr_Function_int Function + %b = OpVariable %_ptr_Function_bool Function + %c = OpVariable %_ptr_Function_bool Function + %d = OpVariable %_ptr_Function_bool Function + %e = OpVariable %_ptr_Function_bool Function + %f = OpVariable %_ptr_Function_bool Function + %107 = OpVariable %_ptr_Function_v4float Function + OpStore %x %float_1 + OpStore %y %float_2 + OpStore %z %int_3 + %35 = OpFSub %float %float_1 %float_1 + %36 = OpFMul %float %float_2 %float_1 + %37 = OpFMul %float %36 %float_1 + %38 = OpFSub %float %float_2 %float_1 + %39 = OpFMul %float %37 %38 + %40 = OpFAdd %float %35 %39 + OpStore %x %40 + %41 = OpFDiv %float %40 %float_2 + %42 = OpFDiv %float %41 %40 + OpStore %y %42 + %44 = OpSDiv %int %int_3 %int_2 + %45 = OpIMul %int %44 %int_3 + %47 = OpIAdd %int %45 %int_4 + %48 = OpISub %int %47 %int_2 + OpStore %z %48 + %53 = OpFOrdGreaterThan %bool %40 %float_4 + %54 = OpFOrdLessThan %bool %40 %float_2 + %55 = OpLogicalEqual %bool %53 %54 + OpSelectionMerge %57 None + OpBranchConditional %55 %57 %56 + %56 = OpLabel + %59 = OpAccessChain %_ptr_Uniform_float %10 %int_2 + %61 = OpLoad %float %59 + %62 = OpFOrdGreaterThanEqual %bool %float_2 %61 + OpSelectionMerge %64 None + OpBranchConditional %62 %63 %64 + %63 = OpLabel + %65 = OpFOrdLessThanEqual %bool %42 %40 + OpBranch %64 + %64 = OpLabel + %66 = OpPhi %bool %false %56 %65 %63 + OpBranch %57 + %57 = OpLabel + %67 = OpPhi %bool %true %25 %66 %64 + OpStore %b %67 + %69 = OpAccessChain %_ptr_Uniform_float %10 %int_2 + %70 = OpLoad %float %69 + %71 = OpFOrdGreaterThan %bool %70 %float_2 + OpStore %c %71 + %73 = OpLogicalNotEqual %bool %67 %71 + OpStore %d %73 + OpSelectionMerge %76 None + OpBranchConditional %67 %75 %76 + %75 = OpLabel + OpBranch %76 + %76 = OpLabel + %77 = OpPhi %bool %false %57 %71 %75 + OpStore %e %77 + OpSelectionMerge %80 None + OpBranchConditional %67 %80 %79 + %79 = OpLabel + OpBranch %80 + %80 = OpLabel + %81 = OpPhi %bool %true %76 %71 %79 + OpStore %f %81 + %83 = OpFAdd %float %40 %float_12 + OpStore %x %83 + %84 = OpFSub %float %83 %float_12 + OpStore %x %84 + %86 = OpFMul %float %42 %float_0_100000001 + OpStore %y %86 + %87 = OpFMul %float %84 %86 + OpStore %x %87 + OpStore %x %float_6 + %89 = OpSelect %float %67 %float_1 %float_0 + %90 = OpSelect %float %71 %float_1 %float_0 + %91 = OpFMul %float %89 %90 + %92 = OpSelect %float %73 %float_1 %float_0 + %93 = OpFMul %float %91 %92 + %94 = OpSelect %float %77 %float_1 %float_0 + %95 = OpFMul %float %93 %94 + %96 = OpSelect %float %81 %float_1 %float_0 + %97 = OpFMul %float %95 %96 + OpStore %y %97 + OpStore %y %float_6 + %99 = OpISub %int %48 %int_1 + OpStore %z %99 + OpStore %z %int_6 + OpSelectionMerge %102 None + OpBranchConditional %true %101 %102 + %101 = OpLabel + OpBranch %102 + %102 = OpLabel + %103 = OpPhi %bool %false %80 %true %101 + OpSelectionMerge %105 None + OpBranchConditional %103 %104 %105 + %104 = OpLabel + OpBranch %105 + %105 = OpLabel + %106 = OpPhi %bool %false %102 %true %104 + OpSelectionMerge %111 None + OpBranchConditional %106 %109 %110 + %109 = OpLabel + %112 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %115 = OpLoad %v4float %112 + OpStore %107 %115 + OpBranch %111 + %110 = OpLabel + %116 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %117 = OpLoad %v4float %116 + OpStore %107 %117 + OpBranch %111 + %111 = OpLabel + %118 = OpLoad %v4float %107 + OpReturnValue %118 + OpFunctionEnd diff --git a/tests/sksl/shared/OperatorsES2.skrp b/tests/sksl/shared/OperatorsES2.skrp index 45c172477def..befcb2bd9dc0 100644 --- a/tests/sksl/shared/OperatorsES2.skrp +++ b/tests/sksl/shared/OperatorsES2.skrp @@ -1,3 +1,5 @@ +97 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_constant x = 0x3F800000 (1.0) diff --git a/tests/sksl/shared/OperatorsES2.wgsl b/tests/sksl/shared/OperatorsES2.wgsl new file mode 100644 index 000000000000..d246c2f73f9a --- /dev/null +++ b/tests/sksl/shared/OperatorsES2.wgsl @@ -0,0 +1,45 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, + unknownInput: f32, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var x: f32 = 1.0; + var y: f32 = 2.0; + var z: i32 = 3; + x = (x - x) + ((y * x) * x) * (y - x); + y = (x / y) / x; + z = ((z / 2) * 3 + 4) - 2; + var b: bool = ((x > 4.0) == (x < 2.0)) || ((2.0 >= _globalUniforms.unknownInput) && (y <= x)); + var c: bool = _globalUniforms.unknownInput > 2.0; + var d: bool = b != c; + var e: bool = b && c; + var f: bool = b || c; + x = x + 12.0; + x = x - 12.0; + y = y * 0.1; + x = x * y; + x = 6.0; + y = (((f32(b) * f32(c)) * f32(d)) * f32(e)) * f32(f); + y = 6.0; + z = z - 1; + z = 6; + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((x == 6.0) && (y == 6.0)) && (z == 6))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/OperatorsES3.asm.frag b/tests/sksl/shared/OperatorsES3.asm.frag index b086708e69f9..aa646e9740ec 100644 --- a/tests/sksl/shared/OperatorsES3.asm.frag +++ b/tests/sksl/shared/OperatorsES3.asm.frag @@ -1,252 +1,252 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpMemberName %_UniformBuffer 2 "unknownInput" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %x "x" -OpName %y "y" -OpName %z "z" -OpName %b "b" -OpName %c "c" -OpName %d "d" -OpName %e "e" -OpName %f "f" -OpName %w "w" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %101 RelaxedPrecision -OpDecorate %102 RelaxedPrecision -OpDecorate %116 RelaxedPrecision -OpDecorate %117 RelaxedPrecision -OpDecorate %147 RelaxedPrecision -OpDecorate %149 RelaxedPrecision -OpDecorate %150 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpMemberName %_UniformBuffer 2 "unknownInput" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %x "x" + OpName %y "y" + OpName %z "z" + OpName %b "b" + OpName %c "c" + OpName %d "d" + OpName %e "e" + OpName %f "f" + OpName %w "w" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %101 RelaxedPrecision + OpDecorate %102 RelaxedPrecision + OpDecorate %116 RelaxedPrecision + OpDecorate %117 RelaxedPrecision + OpDecorate %147 RelaxedPrecision + OpDecorate %149 RelaxedPrecision + OpDecorate %150 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_float = OpTypePointer Function %float -%float_1 = OpConstant %float 1 -%float_2 = OpConstant %float 2 -%int = OpTypeInt 32 1 + %float_1 = OpConstant %float 1 + %float_2 = OpConstant %float 2 + %int = OpTypeInt 32 1 %_ptr_Function_int = OpTypePointer Function %int -%int_3 = OpConstant %int 3 -%int_2 = OpConstant %int 2 -%int_4 = OpConstant %int 4 -%int_1 = OpConstant %int 1 + %int_3 = OpConstant %int 3 + %int_2 = OpConstant %int 2 + %int_4 = OpConstant %int 4 + %int_1 = OpConstant %int 1 %_ptr_Function_bool = OpTypePointer Function %bool -%true = OpConstantTrue %bool -%float_4 = OpConstant %float 4 -%false = OpConstantFalse %bool + %true = OpConstantTrue %bool + %float_4 = OpConstant %float 4 + %false = OpConstantFalse %bool %_ptr_Uniform_float = OpTypePointer Uniform %float -%float_12 = OpConstant %float 12 + %float_12 = OpConstant %float 12 %float_0_100000001 = OpConstant %float 0.100000001 -%int_0 = OpConstant %int 0 -%int_n1 = OpConstant %int -1 -%int_5 = OpConstant %int 5 + %int_0 = OpConstant %int 0 + %int_n1 = OpConstant %int -1 + %int_5 = OpConstant %int 5 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_6 = OpConstant %int 6 -%float_6 = OpConstant %float 6 -%v2int = OpTypeVector %int 2 + %int_6 = OpConstant %int 6 + %float_6 = OpConstant %float 6 + %v2int = OpTypeVector %int 2 %_ptr_Function_v2int = OpTypePointer Function %v2int %_ptr_Function_v4float = OpTypePointer Function %v4float %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%x = OpVariable %_ptr_Function_float Function -%y = OpVariable %_ptr_Function_float Function -%z = OpVariable %_ptr_Function_int Function -%b = OpVariable %_ptr_Function_bool Function -%c = OpVariable %_ptr_Function_bool Function -%d = OpVariable %_ptr_Function_bool Function -%e = OpVariable %_ptr_Function_bool Function -%f = OpVariable %_ptr_Function_bool Function -%w = OpVariable %_ptr_Function_v2int Function -%141 = OpVariable %_ptr_Function_v4float Function -OpStore %x %float_1 -OpStore %y %float_2 -OpStore %z %int_3 -%35 = OpFSub %float %float_1 %float_1 -%36 = OpFMul %float %float_2 %float_1 -%37 = OpFMul %float %36 %float_1 -%38 = OpFSub %float %float_2 %float_1 -%39 = OpFMul %float %37 %38 -%40 = OpFAdd %float %35 %39 -OpStore %x %40 -%41 = OpFDiv %float %40 %float_2 -%42 = OpFDiv %float %41 %40 -OpStore %y %42 -%44 = OpSDiv %int %int_3 %int_2 -%45 = OpSMod %int %44 %int_3 -%47 = OpShiftLeftLogical %int %45 %int_4 -%48 = OpShiftRightArithmetic %int %47 %int_2 -%50 = OpShiftLeftLogical %int %48 %int_1 -OpStore %z %50 -%55 = OpFOrdGreaterThan %bool %40 %float_4 -%56 = OpFOrdLessThan %bool %40 %float_2 -%57 = OpLogicalEqual %bool %55 %56 -OpSelectionMerge %59 None -OpBranchConditional %57 %59 %58 -%58 = OpLabel -%61 = OpAccessChain %_ptr_Uniform_float %10 %int_2 -%63 = OpLoad %float %61 -%64 = OpFOrdGreaterThanEqual %bool %float_2 %63 -OpSelectionMerge %66 None -OpBranchConditional %64 %65 %66 -%65 = OpLabel -%67 = OpFOrdLessThanEqual %bool %42 %40 -OpBranch %66 -%66 = OpLabel -%68 = OpPhi %bool %false %58 %67 %65 -OpBranch %59 -%59 = OpLabel -%69 = OpPhi %bool %true %25 %68 %66 -OpStore %b %69 -%71 = OpAccessChain %_ptr_Uniform_float %10 %int_2 -%72 = OpLoad %float %71 -%73 = OpFOrdGreaterThan %bool %72 %float_2 -OpStore %c %73 -%75 = OpLogicalNotEqual %bool %69 %73 -OpStore %d %75 -OpSelectionMerge %78 None -OpBranchConditional %69 %77 %78 -%77 = OpLabel -OpBranch %78 -%78 = OpLabel -%79 = OpPhi %bool %false %59 %73 %77 -OpStore %e %79 -OpSelectionMerge %82 None -OpBranchConditional %69 %82 %81 -%81 = OpLabel -OpBranch %82 -%82 = OpLabel -%83 = OpPhi %bool %true %78 %73 %81 -OpStore %f %83 -%85 = OpFAdd %float %40 %float_12 -OpStore %x %85 -%86 = OpFSub %float %85 %float_12 -OpStore %x %86 -%88 = OpFMul %float %42 %float_0_100000001 -OpStore %y %88 -%89 = OpFMul %float %86 %88 -OpStore %x %89 -%91 = OpBitwiseOr %int %50 %int_0 -OpStore %z %91 -%93 = OpBitwiseAnd %int %91 %int_n1 -OpStore %z %93 -%94 = OpBitwiseXor %int %93 %int_0 -OpStore %z %94 -%95 = OpShiftRightArithmetic %int %94 %int_2 -OpStore %z %95 -%96 = OpShiftLeftLogical %int %95 %int_4 -OpStore %z %96 -%98 = OpSMod %int %96 %int_5 -OpStore %z %98 -%99 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%101 = OpLoad %v4float %99 -%102 = OpVectorShuffle %v2float %101 %101 0 1 -%104 = OpConvertSToF %float %int_6 -OpStore %x %104 -%105 = OpSelect %float %69 %float_1 %float_0 -%106 = OpSelect %float %73 %float_1 %float_0 -%107 = OpFMul %float %105 %106 -%108 = OpSelect %float %75 %float_1 %float_0 -%109 = OpFMul %float %107 %108 -%110 = OpSelect %float %79 %float_1 %float_0 -%111 = OpFMul %float %109 %110 -%112 = OpSelect %float %83 %float_1 %float_0 -%113 = OpFMul %float %111 %112 -OpStore %y %float_6 -%115 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%116 = OpLoad %v4float %115 -%117 = OpVectorShuffle %v2float %116 %116 2 3 -OpStore %z %int_6 -%121 = OpNot %int %int_5 -%122 = OpCompositeConstruct %v2int %121 %121 -OpStore %w %122 -%123 = OpNot %v2int %122 -OpStore %w %123 -%124 = OpCompositeExtract %int %123 0 -%125 = OpIEqual %bool %124 %int_5 -OpSelectionMerge %127 None -OpBranchConditional %125 %126 %127 -%126 = OpLabel -%128 = OpCompositeExtract %int %123 1 -%129 = OpIEqual %bool %128 %int_5 -OpBranch %127 -%127 = OpLabel -%130 = OpPhi %bool %false %82 %129 %126 -OpSelectionMerge %132 None -OpBranchConditional %130 %131 %132 -%131 = OpLabel -%133 = OpFOrdEqual %bool %104 %float_6 -OpBranch %132 -%132 = OpLabel -%134 = OpPhi %bool %false %127 %133 %131 -OpSelectionMerge %136 None -OpBranchConditional %134 %135 %136 -%135 = OpLabel -OpBranch %136 -%136 = OpLabel -%137 = OpPhi %bool %false %132 %true %135 -OpSelectionMerge %139 None -OpBranchConditional %137 %138 %139 -%138 = OpLabel -OpBranch %139 -%139 = OpLabel -%140 = OpPhi %bool %false %136 %true %138 -OpSelectionMerge %145 None -OpBranchConditional %140 %143 %144 -%143 = OpLabel -%146 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%147 = OpLoad %v4float %146 -OpStore %141 %147 -OpBranch %145 -%144 = OpLabel -%148 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%149 = OpLoad %v4float %148 -OpStore %141 %149 -OpBranch %145 -%145 = OpLabel -%150 = OpLoad %v4float %141 -OpReturnValue %150 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %x = OpVariable %_ptr_Function_float Function + %y = OpVariable %_ptr_Function_float Function + %z = OpVariable %_ptr_Function_int Function + %b = OpVariable %_ptr_Function_bool Function + %c = OpVariable %_ptr_Function_bool Function + %d = OpVariable %_ptr_Function_bool Function + %e = OpVariable %_ptr_Function_bool Function + %f = OpVariable %_ptr_Function_bool Function + %w = OpVariable %_ptr_Function_v2int Function + %141 = OpVariable %_ptr_Function_v4float Function + OpStore %x %float_1 + OpStore %y %float_2 + OpStore %z %int_3 + %35 = OpFSub %float %float_1 %float_1 + %36 = OpFMul %float %float_2 %float_1 + %37 = OpFMul %float %36 %float_1 + %38 = OpFSub %float %float_2 %float_1 + %39 = OpFMul %float %37 %38 + %40 = OpFAdd %float %35 %39 + OpStore %x %40 + %41 = OpFDiv %float %40 %float_2 + %42 = OpFDiv %float %41 %40 + OpStore %y %42 + %44 = OpSDiv %int %int_3 %int_2 + %45 = OpSMod %int %44 %int_3 + %47 = OpShiftLeftLogical %int %45 %int_4 + %48 = OpShiftRightArithmetic %int %47 %int_2 + %50 = OpShiftLeftLogical %int %48 %int_1 + OpStore %z %50 + %55 = OpFOrdGreaterThan %bool %40 %float_4 + %56 = OpFOrdLessThan %bool %40 %float_2 + %57 = OpLogicalEqual %bool %55 %56 + OpSelectionMerge %59 None + OpBranchConditional %57 %59 %58 + %58 = OpLabel + %61 = OpAccessChain %_ptr_Uniform_float %10 %int_2 + %63 = OpLoad %float %61 + %64 = OpFOrdGreaterThanEqual %bool %float_2 %63 + OpSelectionMerge %66 None + OpBranchConditional %64 %65 %66 + %65 = OpLabel + %67 = OpFOrdLessThanEqual %bool %42 %40 + OpBranch %66 + %66 = OpLabel + %68 = OpPhi %bool %false %58 %67 %65 + OpBranch %59 + %59 = OpLabel + %69 = OpPhi %bool %true %25 %68 %66 + OpStore %b %69 + %71 = OpAccessChain %_ptr_Uniform_float %10 %int_2 + %72 = OpLoad %float %71 + %73 = OpFOrdGreaterThan %bool %72 %float_2 + OpStore %c %73 + %75 = OpLogicalNotEqual %bool %69 %73 + OpStore %d %75 + OpSelectionMerge %78 None + OpBranchConditional %69 %77 %78 + %77 = OpLabel + OpBranch %78 + %78 = OpLabel + %79 = OpPhi %bool %false %59 %73 %77 + OpStore %e %79 + OpSelectionMerge %82 None + OpBranchConditional %69 %82 %81 + %81 = OpLabel + OpBranch %82 + %82 = OpLabel + %83 = OpPhi %bool %true %78 %73 %81 + OpStore %f %83 + %85 = OpFAdd %float %40 %float_12 + OpStore %x %85 + %86 = OpFSub %float %85 %float_12 + OpStore %x %86 + %88 = OpFMul %float %42 %float_0_100000001 + OpStore %y %88 + %89 = OpFMul %float %86 %88 + OpStore %x %89 + %91 = OpBitwiseOr %int %50 %int_0 + OpStore %z %91 + %93 = OpBitwiseAnd %int %91 %int_n1 + OpStore %z %93 + %94 = OpBitwiseXor %int %93 %int_0 + OpStore %z %94 + %95 = OpShiftRightArithmetic %int %94 %int_2 + OpStore %z %95 + %96 = OpShiftLeftLogical %int %95 %int_4 + OpStore %z %96 + %98 = OpSMod %int %96 %int_5 + OpStore %z %98 + %99 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %101 = OpLoad %v4float %99 + %102 = OpVectorShuffle %v2float %101 %101 0 1 + %104 = OpConvertSToF %float %int_6 + OpStore %x %104 + %105 = OpSelect %float %69 %float_1 %float_0 + %106 = OpSelect %float %73 %float_1 %float_0 + %107 = OpFMul %float %105 %106 + %108 = OpSelect %float %75 %float_1 %float_0 + %109 = OpFMul %float %107 %108 + %110 = OpSelect %float %79 %float_1 %float_0 + %111 = OpFMul %float %109 %110 + %112 = OpSelect %float %83 %float_1 %float_0 + %113 = OpFMul %float %111 %112 + OpStore %y %float_6 + %115 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %116 = OpLoad %v4float %115 + %117 = OpVectorShuffle %v2float %116 %116 2 3 + OpStore %z %int_6 + %121 = OpNot %int %int_5 + %122 = OpCompositeConstruct %v2int %121 %121 + OpStore %w %122 + %123 = OpNot %v2int %122 + OpStore %w %123 + %124 = OpCompositeExtract %int %123 0 + %125 = OpIEqual %bool %124 %int_5 + OpSelectionMerge %127 None + OpBranchConditional %125 %126 %127 + %126 = OpLabel + %128 = OpCompositeExtract %int %123 1 + %129 = OpIEqual %bool %128 %int_5 + OpBranch %127 + %127 = OpLabel + %130 = OpPhi %bool %false %82 %129 %126 + OpSelectionMerge %132 None + OpBranchConditional %130 %131 %132 + %131 = OpLabel + %133 = OpFOrdEqual %bool %104 %float_6 + OpBranch %132 + %132 = OpLabel + %134 = OpPhi %bool %false %127 %133 %131 + OpSelectionMerge %136 None + OpBranchConditional %134 %135 %136 + %135 = OpLabel + OpBranch %136 + %136 = OpLabel + %137 = OpPhi %bool %false %132 %true %135 + OpSelectionMerge %139 None + OpBranchConditional %137 %138 %139 + %138 = OpLabel + OpBranch %139 + %139 = OpLabel + %140 = OpPhi %bool %false %136 %true %138 + OpSelectionMerge %145 None + OpBranchConditional %140 %143 %144 + %143 = OpLabel + %146 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %147 = OpLoad %v4float %146 + OpStore %141 %147 + OpBranch %145 + %144 = OpLabel + %148 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %149 = OpLoad %v4float %148 + OpStore %141 %149 + OpBranch %145 + %145 = OpLabel + %150 = OpLoad %v4float %141 + OpReturnValue %150 + OpFunctionEnd diff --git a/tests/sksl/shared/OperatorsES3.wgsl b/tests/sksl/shared/OperatorsES3.wgsl new file mode 100644 index 000000000000..36ea6b07c0fc --- /dev/null +++ b/tests/sksl/shared/OperatorsES3.wgsl @@ -0,0 +1,51 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, + unknownInput: f32, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var x: f32 = 1.0; + var y: f32 = 2.0; + var z: i32 = 3; + x = (x - x) + ((y * x) * x) * (y - x); + y = (x / y) / x; + z = ((((z / 2) % 3) << 4) >> 2) << 1; + var b: bool = ((x > 4.0) == (x < 2.0)) || ((2.0 >= _globalUniforms.unknownInput) && (y <= x)); + var c: bool = _globalUniforms.unknownInput > 2.0; + var d: bool = b != c; + var e: bool = b && c; + var f: bool = b || c; + x = x + 12.0; + x = x - 12.0; + y = y * 0.1; + x = x * y; + z = z | 0; + z = z & -1; + z = z ^ 0; + z = z >> 2; + z = z << 4; + z = z % 5; + x = f32(6); + y = f32(6.0); + z = i32(6); + var w: vec2 = vec2(~5); + w = ~w; + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((w.x == 5) && (w.y == 5)) && (x == 6.0)) && (y == 6.0)) && (z == 6))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/Ossfuzz26167.asm.frag b/tests/sksl/shared/Ossfuzz26167.asm.frag index 2fa66c983deb..13a91408fa21 100644 --- a/tests/sksl/shared/Ossfuzz26167.asm.frag +++ b/tests/sksl/shared/Ossfuzz26167.asm.frag @@ -1,18 +1,17 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%void = OpTypeVoid -%7 = OpTypeFunction %void -%false = OpConstantFalse %bool -%main = OpFunction %void None %7 -%8 = OpLabel -OpReturn -OpFunctionEnd + %void = OpTypeVoid + %7 = OpTypeFunction %void + %main = OpFunction %void None %7 + %8 = OpLabel + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/Ossfuzz26167.wgsl b/tests/sksl/shared/Ossfuzz26167.wgsl new file mode 100644 index 000000000000..eed097582e9a --- /dev/null +++ b/tests/sksl/shared/Ossfuzz26167.wgsl @@ -0,0 +1,24 @@ +### Compilation failed: + +error: :5:1 error: structures must have at least one member +struct FSOut { +^^^^^^ + + +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { +}; +fn main() { + { + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(); + return _stageOut; +} + +1 error diff --git a/tests/sksl/shared/Ossfuzz26759.asm.frag b/tests/sksl/shared/Ossfuzz26759.asm.frag index b06ed974d22b..febe611ef327 100644 --- a/tests/sksl/shared/Ossfuzz26759.asm.frag +++ b/tests/sksl/shared/Ossfuzz26759.asm.frag @@ -1,27 +1,27 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %main "main" -OpName %i "i" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %main "main" + OpName %i "i" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%void = OpTypeVoid -%7 = OpTypeFunction %void -%int = OpTypeInt 32 1 + %void = OpTypeVoid + %7 = OpTypeFunction %void + %int = OpTypeInt 32 1 %_ptr_Function_int = OpTypePointer Function %int -%int_1 = OpConstant %int 1 -%v3int = OpTypeVector %int 3 -%main = OpFunction %void None %7 -%8 = OpLabel -%i = OpVariable %_ptr_Function_int Function -%12 = OpLoad %int %i -%14 = OpISub %int %12 %int_1 -OpStore %i %14 -%16 = OpCompositeConstruct %v3int %12 %12 %12 -OpReturn -OpFunctionEnd + %int_1 = OpConstant %int 1 + %v3int = OpTypeVector %int 3 + %main = OpFunction %void None %7 + %8 = OpLabel + %i = OpVariable %_ptr_Function_int Function + %12 = OpLoad %int %i + %14 = OpISub %int %12 %int_1 + OpStore %i %14 + %16 = OpCompositeConstruct %v3int %12 %12 %12 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/Ossfuzz26759.wgsl b/tests/sksl/shared/Ossfuzz26759.wgsl new file mode 100644 index 000000000000..bee56062f7ae --- /dev/null +++ b/tests/sksl/shared/Ossfuzz26759.wgsl @@ -0,0 +1,27 @@ +### Compilation failed: + +error: :5:1 error: structures must have at least one member +struct FSOut { +^^^^^^ + + +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { +}; +fn main() { + { + var i: i32; + let _skTemp0 = i; + i = i - i32(1); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(); + return _stageOut; +} + +1 error diff --git a/tests/sksl/shared/Ossfuzz28794.asm.frag b/tests/sksl/shared/Ossfuzz28794.asm.frag index c97e5732a3c2..7c8d77143f3f 100644 --- a/tests/sksl/shared/Ossfuzz28794.asm.frag +++ b/tests/sksl/shared/Ossfuzz28794.asm.frag @@ -1,40 +1,40 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %main "main" -OpName %i "i" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %19 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %main "main" + OpName %i "i" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %19 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%11 = OpTypeFunction %void -%int = OpTypeInt 32 1 + %void = OpTypeVoid + %11 = OpTypeFunction %void + %int = OpTypeInt 32 1 %_ptr_Function_int = OpTypePointer Function %int -%int_1 = OpConstant %int 1 -%int_3 = OpConstant %int 3 + %int_1 = OpConstant %int 1 + %int_3 = OpConstant %int 3 %_ptr_Output_float = OpTypePointer Output %float -%int_0 = OpConstant %int 0 -%main = OpFunction %void None %11 -%12 = OpLabel -%i = OpVariable %_ptr_Function_int Function -OpStore %i %int_1 -OpStore %i %int_3 -%18 = OpIMul %int %int_1 %int_3 -%19 = OpConvertSToF %float %int_3 -%20 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 -OpStore %20 %19 -OpReturn -OpFunctionEnd + %int_0 = OpConstant %int 0 + %main = OpFunction %void None %11 + %12 = OpLabel + %i = OpVariable %_ptr_Function_int Function + OpStore %i %int_1 + OpStore %i %int_3 + %18 = OpIMul %int %int_1 %int_3 + %19 = OpConvertSToF %float %int_3 + %20 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 + OpStore %20 %19 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/Ossfuzz28794.wgsl b/tests/sksl/shared/Ossfuzz28794.wgsl new file mode 100644 index 000000000000..ae2889a8d863 --- /dev/null +++ b/tests/sksl/shared/Ossfuzz28794.wgsl @@ -0,0 +1,19 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +fn main(_stageOut: ptr) { + { + var i: i32 = 1; + i = 3; + (*_stageOut).sk_FragColor.x = f32(i); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(&_stageOut); + return _stageOut; +} diff --git a/tests/sksl/shared/Ossfuzz28904.asm.frag b/tests/sksl/shared/Ossfuzz28904.asm.frag index 80479533a3ae..a2e126f2b786 100644 --- a/tests/sksl/shared/Ossfuzz28904.asm.frag +++ b/tests/sksl/shared/Ossfuzz28904.asm.frag @@ -1,29 +1,28 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%11 = OpTypeFunction %void -%false = OpConstantFalse %bool -%float_0 = OpConstant %float 0 -%15 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 -%main = OpFunction %void None %11 -%12 = OpLabel -OpStore %sk_FragColor %15 -OpReturn -OpFunctionEnd + %void = OpTypeVoid + %11 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %14 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %main = OpFunction %void None %11 + %12 = OpLabel + OpStore %sk_FragColor %14 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/Ossfuzz28904.wgsl b/tests/sksl/shared/Ossfuzz28904.wgsl new file mode 100644 index 000000000000..9e96b7942811 --- /dev/null +++ b/tests/sksl/shared/Ossfuzz28904.wgsl @@ -0,0 +1,17 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +fn main(_stageOut: ptr) { + { + (*_stageOut).sk_FragColor = vec4(0.0); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(&_stageOut); + return _stageOut; +} diff --git a/tests/sksl/shared/Ossfuzz29085.asm.frag b/tests/sksl/shared/Ossfuzz29085.asm.frag index dd4565734322..13a91408fa21 100644 --- a/tests/sksl/shared/Ossfuzz29085.asm.frag +++ b/tests/sksl/shared/Ossfuzz29085.asm.frag @@ -1,17 +1,17 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%void = OpTypeVoid -%7 = OpTypeFunction %void -%main = OpFunction %void None %7 -%8 = OpLabel -OpReturn -OpFunctionEnd + %void = OpTypeVoid + %7 = OpTypeFunction %void + %main = OpFunction %void None %7 + %8 = OpLabel + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/Ossfuzz29085.wgsl b/tests/sksl/shared/Ossfuzz29085.wgsl new file mode 100644 index 000000000000..eed097582e9a --- /dev/null +++ b/tests/sksl/shared/Ossfuzz29085.wgsl @@ -0,0 +1,24 @@ +### Compilation failed: + +error: :5:1 error: structures must have at least one member +struct FSOut { +^^^^^^ + + +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { +}; +fn main() { + { + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(); + return _stageOut; +} + +1 error diff --git a/tests/sksl/shared/Ossfuzz29494.asm.frag b/tests/sksl/shared/Ossfuzz29494.asm.frag index 80479533a3ae..a2e126f2b786 100644 --- a/tests/sksl/shared/Ossfuzz29494.asm.frag +++ b/tests/sksl/shared/Ossfuzz29494.asm.frag @@ -1,29 +1,28 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%11 = OpTypeFunction %void -%false = OpConstantFalse %bool -%float_0 = OpConstant %float 0 -%15 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 -%main = OpFunction %void None %11 -%12 = OpLabel -OpStore %sk_FragColor %15 -OpReturn -OpFunctionEnd + %void = OpTypeVoid + %11 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %14 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %main = OpFunction %void None %11 + %12 = OpLabel + OpStore %sk_FragColor %14 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/Ossfuzz29494.wgsl b/tests/sksl/shared/Ossfuzz29494.wgsl new file mode 100644 index 000000000000..9e96b7942811 --- /dev/null +++ b/tests/sksl/shared/Ossfuzz29494.wgsl @@ -0,0 +1,17 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +fn main(_stageOut: ptr) { + { + (*_stageOut).sk_FragColor = vec4(0.0); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(&_stageOut); + return _stageOut; +} diff --git a/tests/sksl/shared/Ossfuzz36770.asm.frag b/tests/sksl/shared/Ossfuzz36770.asm.frag index cc3e16bb7ddf..efc04c18164a 100644 --- a/tests/sksl/shared/Ossfuzz36770.asm.frag +++ b/tests/sksl/shared/Ossfuzz36770.asm.frag @@ -3,30 +3,30 @@ error: SPIR-V validation error: [VUID-StandaloneSpirv-Location-04919] Member index 0 is missing a location assignment %T = OpTypeStruct %int -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %3 %sk_Clockwise -OpExecutionMode %main OriginUpperLeft -OpName %T "T" -OpMemberName %T 0 "x" -OpName %sk_Clockwise "sk_Clockwise" -OpName %main "main" -OpMemberDecorate %T 0 Offset 0 -OpDecorate %T Block -OpDecorate %sk_Clockwise BuiltIn FrontFacing -%int = OpTypeInt 32 1 -%T = OpTypeStruct %int + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %3 %sk_Clockwise + OpExecutionMode %main OriginUpperLeft + OpName %T "T" + OpMemberName %T 0 "x" + OpName %sk_Clockwise "sk_Clockwise" + OpName %main "main" + OpMemberDecorate %T 0 Offset 0 + OpDecorate %T Block + OpDecorate %sk_Clockwise BuiltIn FrontFacing + %int = OpTypeInt 32 1 + %T = OpTypeStruct %int %_ptr_Input_T = OpTypePointer Input %T -%3 = OpVariable %_ptr_Input_T Input -%bool = OpTypeBool + %3 = OpVariable %_ptr_Input_T Input + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%void = OpTypeVoid -%11 = OpTypeFunction %void -%main = OpFunction %void None %11 -%12 = OpLabel -OpReturn -OpFunctionEnd + %void = OpTypeVoid + %11 = OpTypeFunction %void + %main = OpFunction %void None %11 + %12 = OpLabel + OpReturn + OpFunctionEnd 1 error diff --git a/tests/sksl/shared/Ossfuzz36770.hlsl b/tests/sksl/shared/Ossfuzz36770.hlsl index cc3e16bb7ddf..efc04c18164a 100644 --- a/tests/sksl/shared/Ossfuzz36770.hlsl +++ b/tests/sksl/shared/Ossfuzz36770.hlsl @@ -3,30 +3,30 @@ error: SPIR-V validation error: [VUID-StandaloneSpirv-Location-04919] Member index 0 is missing a location assignment %T = OpTypeStruct %int -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %3 %sk_Clockwise -OpExecutionMode %main OriginUpperLeft -OpName %T "T" -OpMemberName %T 0 "x" -OpName %sk_Clockwise "sk_Clockwise" -OpName %main "main" -OpMemberDecorate %T 0 Offset 0 -OpDecorate %T Block -OpDecorate %sk_Clockwise BuiltIn FrontFacing -%int = OpTypeInt 32 1 -%T = OpTypeStruct %int + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %3 %sk_Clockwise + OpExecutionMode %main OriginUpperLeft + OpName %T "T" + OpMemberName %T 0 "x" + OpName %sk_Clockwise "sk_Clockwise" + OpName %main "main" + OpMemberDecorate %T 0 Offset 0 + OpDecorate %T Block + OpDecorate %sk_Clockwise BuiltIn FrontFacing + %int = OpTypeInt 32 1 + %T = OpTypeStruct %int %_ptr_Input_T = OpTypePointer Input %T -%3 = OpVariable %_ptr_Input_T Input -%bool = OpTypeBool + %3 = OpVariable %_ptr_Input_T Input + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%void = OpTypeVoid -%11 = OpTypeFunction %void -%main = OpFunction %void None %11 -%12 = OpLabel -OpReturn -OpFunctionEnd + %void = OpTypeVoid + %11 = OpTypeFunction %void + %main = OpFunction %void None %11 + %12 = OpLabel + OpReturn + OpFunctionEnd 1 error diff --git a/tests/sksl/shared/Ossfuzz36770.wgsl b/tests/sksl/shared/Ossfuzz36770.wgsl new file mode 100644 index 000000000000..eed097582e9a --- /dev/null +++ b/tests/sksl/shared/Ossfuzz36770.wgsl @@ -0,0 +1,24 @@ +### Compilation failed: + +error: :5:1 error: structures must have at least one member +struct FSOut { +^^^^^^ + + +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { +}; +fn main() { + { + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(); + return _stageOut; +} + +1 error diff --git a/tests/sksl/shared/Ossfuzz36852.asm.frag b/tests/sksl/shared/Ossfuzz36852.asm.frag index 49f42e04d754..ac0dd457b5da 100644 --- a/tests/sksl/shared/Ossfuzz36852.asm.frag +++ b/tests/sksl/shared/Ossfuzz36852.asm.frag @@ -1,61 +1,61 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %x "x" -OpName %y "y" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %x RelaxedPrecision -OpDecorate %34 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %x "x" + OpName %y "y" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %x RelaxedPrecision + OpDecorate %34 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%12 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%16 = OpConstantComposite %v2float %float_0 %float_0 + %void = OpTypeVoid + %12 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %16 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%20 = OpTypeFunction %v4float %_ptr_Function_v2float + %20 = OpTypeFunction %v4float %_ptr_Function_v2float %mat2v2float = OpTypeMatrix %v2float 2 %_ptr_Function_mat2v2float = OpTypePointer Function %mat2v2float -%float_1 = OpConstant %float 1 -%float_2 = OpConstant %float 2 -%float_3 = OpConstant %float 3 -%29 = OpConstantComposite %v2float %float_0 %float_1 -%30 = OpConstantComposite %v2float %float_2 %float_3 -%31 = OpConstantComposite %mat2v2float %29 %30 -%33 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3 + %float_1 = OpConstant %float 1 + %float_2 = OpConstant %float 2 + %float_3 = OpConstant %float 3 + %29 = OpConstantComposite %v2float %float_0 %float_1 + %30 = OpConstantComposite %v2float %float_2 %float_3 + %31 = OpConstantComposite %mat2v2float %29 %30 + %33 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3 %_entrypoint_v = OpFunction %void None %12 -%13 = OpLabel -%17 = OpVariable %_ptr_Function_v2float Function -OpStore %17 %16 -%19 = OpFunctionCall %v4float %main %17 -OpStore %sk_FragColor %19 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %20 -%21 = OpFunctionParameter %_ptr_Function_v2float -%22 = OpLabel -%x = OpVariable %_ptr_Function_mat2v2float Function -%y = OpVariable %_ptr_Function_v2float Function -OpStore %x %31 -%34 = OpVectorShuffle %v2float %33 %33 0 1 -OpStore %y %34 -%35 = OpCompositeExtract %float %34 0 -%36 = OpCompositeExtract %float %34 1 -%37 = OpCompositeConstruct %v4float %35 %36 %float_0 %float_1 -OpReturnValue %37 -OpFunctionEnd + %13 = OpLabel + %17 = OpVariable %_ptr_Function_v2float Function + OpStore %17 %16 + %19 = OpFunctionCall %v4float %main %17 + OpStore %sk_FragColor %19 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %20 + %21 = OpFunctionParameter %_ptr_Function_v2float + %22 = OpLabel + %x = OpVariable %_ptr_Function_mat2v2float Function + %y = OpVariable %_ptr_Function_v2float Function + OpStore %x %31 + %34 = OpVectorShuffle %v2float %33 %33 0 1 + OpStore %y %34 + %35 = OpCompositeExtract %float %34 0 + %36 = OpCompositeExtract %float %34 1 + %37 = OpCompositeConstruct %v4float %35 %36 %float_0 %float_1 + OpReturnValue %37 + OpFunctionEnd diff --git a/tests/sksl/shared/Ossfuzz36852.skrp b/tests/sksl/shared/Ossfuzz36852.skrp index 2e5188122b5a..ba3530138404 100644 --- a/tests/sksl/shared/Ossfuzz36852.skrp +++ b/tests/sksl/shared/Ossfuzz36852.skrp @@ -1,12 +1,14 @@ +7 instructions + [immutable slots] -x(0) = 0 -x(1) = 0x3F800000 (1.0) -x(2) = 0x40000000 (2.0) -x(3) = 0x40400000 (3.0) +i0 = 0 +i1 = 0x3F800000 (1.0) +i2 = 0x40000000 (2.0) +i3 = 0x40400000 (3.0) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true -copy_2_slots_unmasked y = x(0..1) +copy_2_immutables_unmasked y = i0..1 [0, 0x3F800000 (1.0)] copy_2_slots_unmasked $0..1 = y copy_constant $2 = 0 copy_constant $3 = 0x3F800000 (1.0) diff --git a/tests/sksl/shared/Ossfuzz36852.wgsl b/tests/sksl/shared/Ossfuzz36852.wgsl new file mode 100644 index 000000000000..9e90e1b906bc --- /dev/null +++ b/tests/sksl/shared/Ossfuzz36852.wgsl @@ -0,0 +1,21 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var x: mat2x2 = mat2x2(0.0, 1.0, 2.0, 3.0); + var y: vec2 = vec2(vec4(x[0], x[1]).xy); + return vec4(vec4(y, 0.0, 1.0)); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/Ossfuzz37466.asm.frag b/tests/sksl/shared/Ossfuzz37466.asm.frag index 5144c543fbd7..17637d8b8005 100644 --- a/tests/sksl/shared/Ossfuzz37466.asm.frag +++ b/tests/sksl/shared/Ossfuzz37466.asm.frag @@ -1,43 +1,43 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %foo_ff "foo_ff" -OpName %main "main" -OpName %y "y" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %_arr_float_int_2 ArrayStride 16 -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %foo_ff "foo_ff" + OpName %main "main" + OpName %y "y" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %_arr_float_int_2 ArrayStride 16 + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%int = OpTypeInt 32 1 -%int_2 = OpConstant %int 2 + %float = OpTypeFloat 32 + %int = OpTypeInt 32 1 + %int_2 = OpConstant %int 2 %_arr_float_int_2 = OpTypeArray %float %int_2 %_ptr_Function__arr_float_int_2 = OpTypePointer Function %_arr_float_int_2 -%12 = OpTypeFunction %float %_ptr_Function__arr_float_int_2 -%int_1 = OpConstant %int 1 + %12 = OpTypeFunction %float %_ptr_Function__arr_float_int_2 + %int_1 = OpConstant %int 1 %_ptr_Function_float = OpTypePointer Function %float -%int_0 = OpConstant %int 0 -%void = OpTypeVoid -%22 = OpTypeFunction %void -%foo_ff = OpFunction %float None %12 -%13 = OpFunctionParameter %_ptr_Function__arr_float_int_2 -%14 = OpLabel -%16 = OpAccessChain %_ptr_Function_float %13 %int_1 -%18 = OpLoad %float %16 -%20 = OpAccessChain %_ptr_Function_float %13 %int_0 -OpStore %20 %18 -OpReturnValue %18 -OpFunctionEnd -%main = OpFunction %void None %22 -%23 = OpLabel -%y = OpVariable %_ptr_Function__arr_float_int_2 Function -%26 = OpVariable %_ptr_Function__arr_float_int_2 Function -%25 = OpLoad %_arr_float_int_2 %y -OpStore %26 %25 -%27 = OpFunctionCall %float %foo_ff %26 -OpReturn -OpFunctionEnd + %int_0 = OpConstant %int 0 + %void = OpTypeVoid + %22 = OpTypeFunction %void + %foo_ff = OpFunction %float None %12 + %13 = OpFunctionParameter %_ptr_Function__arr_float_int_2 + %14 = OpLabel + %16 = OpAccessChain %_ptr_Function_float %13 %int_1 + %18 = OpLoad %float %16 + %20 = OpAccessChain %_ptr_Function_float %13 %int_0 + OpStore %20 %18 + OpReturnValue %18 + OpFunctionEnd + %main = OpFunction %void None %22 + %23 = OpLabel + %y = OpVariable %_ptr_Function__arr_float_int_2 Function + %26 = OpVariable %_ptr_Function__arr_float_int_2 Function + %25 = OpLoad %_arr_float_int_2 %y + OpStore %26 %25 + %27 = OpFunctionCall %float %foo_ff %26 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/Ossfuzz37466.wgsl b/tests/sksl/shared/Ossfuzz37466.wgsl new file mode 100644 index 000000000000..02c994592baf --- /dev/null +++ b/tests/sksl/shared/Ossfuzz37466.wgsl @@ -0,0 +1,33 @@ +### Compilation failed: + +error: :5:1 error: structures must have at least one member +struct FSOut { +^^^^^^ + + +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { +}; +fn foo_ff(_skParam0: array) -> f32 { + var v = _skParam0; + { + v[0] = v[1]; + return v[0]; + } +} +fn main() { + { + var y: array; + let _skTemp0 = foo_ff(y); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(); + return _stageOut; +} + +1 error diff --git a/tests/sksl/shared/Ossfuzz37677.asm.frag b/tests/sksl/shared/Ossfuzz37677.asm.frag index e2489c68afd5..66d7d79d5e8f 100644 --- a/tests/sksl/shared/Ossfuzz37677.asm.frag +++ b/tests/sksl/shared/Ossfuzz37677.asm.frag @@ -1,56 +1,56 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %30 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %30 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%26 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%30 = OpLoad %v4float %26 -OpReturnValue %30 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %26 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %30 = OpLoad %v4float %26 + OpReturnValue %30 + OpFunctionEnd diff --git a/tests/sksl/shared/Ossfuzz37677.skrp b/tests/sksl/shared/Ossfuzz37677.skrp index eb638383c6a7..441fd464130a 100644 --- a/tests/sksl/shared/Ossfuzz37677.skrp +++ b/tests/sksl/shared/Ossfuzz37677.skrp @@ -1,3 +1,5 @@ +4 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_4_uniforms $0..3 = colorGreen diff --git a/tests/sksl/shared/Ossfuzz37677.wgsl b/tests/sksl/shared/Ossfuzz37677.wgsl new file mode 100644 index 000000000000..aa750c8c7c9c --- /dev/null +++ b/tests/sksl/shared/Ossfuzz37677.wgsl @@ -0,0 +1,23 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + return _globalUniforms.colorGreen; + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/Ossfuzz37900.wgsl b/tests/sksl/shared/Ossfuzz37900.wgsl new file mode 100644 index 000000000000..5fb2b3c5fd46 --- /dev/null +++ b/tests/sksl/shared/Ossfuzz37900.wgsl @@ -0,0 +1,6 @@ +### Compilation failed: + +error: 2: array size is too large + int[2147483646] a, b=a, c=a, d=a, e=a, f=a, g=a, h=a, i=a, j=a, k=a; + ^^^^^^^^^^^^^^^ +1 error diff --git a/tests/sksl/shared/Ossfuzz41000.wgsl b/tests/sksl/shared/Ossfuzz41000.wgsl new file mode 100644 index 000000000000..638e623cf801 --- /dev/null +++ b/tests/sksl/shared/Ossfuzz41000.wgsl @@ -0,0 +1,19 @@ +### Compilation failed: + +error: :5:1 error: structures must have at least one member +struct FSOut { +^^^^^^ + + +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { +}; +struct _GlobalUniforms { + x: f32, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; + +1 error diff --git a/tests/sksl/shared/Ossfuzz50636.wgsl b/tests/sksl/shared/Ossfuzz50636.wgsl new file mode 100644 index 000000000000..754a50a7958e --- /dev/null +++ b/tests/sksl/shared/Ossfuzz50636.wgsl @@ -0,0 +1,6 @@ +### Compilation failed: + +error: 2: unsized arrays are not permitted here + int[]h; + ^^^^^^ +1 error diff --git a/tests/sksl/shared/Ossfuzz58483.asm.frag b/tests/sksl/shared/Ossfuzz58483.asm.frag index 37456f32e78d..135be0da8338 100644 --- a/tests/sksl/shared/Ossfuzz58483.asm.frag +++ b/tests/sksl/shared/Ossfuzz58483.asm.frag @@ -1,47 +1,47 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%12 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%16 = OpConstantComposite %v2float %float_0 %float_0 + %void = OpTypeVoid + %12 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %16 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%20 = OpTypeFunction %v4float %_ptr_Function_v2float + %20 = OpTypeFunction %v4float %_ptr_Function_v2float %float_0_333333343 = OpConstant %float 0.333333343 -%float_1 = OpConstant %float 1 -%28 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_entrypoint_v = OpFunction %void None %12 -%13 = OpLabel -%17 = OpVariable %_ptr_Function_v2float Function -OpStore %17 %16 -%19 = OpFunctionCall %v4float %main %17 -OpStore %sk_FragColor %19 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %20 -%21 = OpFunctionParameter %_ptr_Function_v2float -%22 = OpLabel -%23 = OpLoad %v2float %21 -%25 = OpVectorTimesScalar %v2float %23 %float_0_333333343 -OpStore %21 %25 -%26 = OpCompositeExtract %float %25 0 -OpReturnValue %28 -OpFunctionEnd + %13 = OpLabel + %17 = OpVariable %_ptr_Function_v2float Function + OpStore %17 %16 + %19 = OpFunctionCall %v4float %main %17 + OpStore %sk_FragColor %19 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %20 + %21 = OpFunctionParameter %_ptr_Function_v2float + %22 = OpLabel + %23 = OpLoad %v2float %21 + %25 = OpVectorTimesScalar %v2float %23 %float_0_333333343 + OpStore %21 %25 + %26 = OpCompositeExtract %float %25 0 + OpReturnValue %28 + OpFunctionEnd diff --git a/tests/sksl/shared/Ossfuzz58483.skrp b/tests/sksl/shared/Ossfuzz58483.skrp index 0f8f5ea509cf..7345b4bf1024 100644 --- a/tests/sksl/shared/Ossfuzz58483.skrp +++ b/tests/sksl/shared/Ossfuzz58483.skrp @@ -1,3 +1,5 @@ +8 instructions + store_src_rg p = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_2_slots_unmasked $0..1 = p diff --git a/tests/sksl/shared/Ossfuzz58483.wgsl b/tests/sksl/shared/Ossfuzz58483.wgsl new file mode 100644 index 000000000000..bf2c80299fbf --- /dev/null +++ b/tests/sksl/shared/Ossfuzz58483.wgsl @@ -0,0 +1,20 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +fn main(_skParam0: vec2) -> vec4 { + var p = _skParam0; + { + p = p * 0.333333343; + return vec4(1.0); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/Ossfuzz60077.asm.frag b/tests/sksl/shared/Ossfuzz60077.asm.frag new file mode 100644 index 000000000000..405162bd8e9e --- /dev/null +++ b/tests/sksl/shared/Ossfuzz60077.asm.frag @@ -0,0 +1,94 @@ + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_entrypoint_v "_entrypoint_v" + OpName %d_vi "d_vi" + OpName %b "b" + OpName %c_vi "c_vi" + OpName %b_vi "b_vi" + OpName %a_vi "a_vi" + OpName %main "main" + OpName %i "i" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + %bool = OpTypeBool +%_ptr_Input_bool = OpTypePointer Input %bool +%sk_Clockwise = OpVariable %_ptr_Input_bool Input + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float +%sk_FragColor = OpVariable %_ptr_Output_v4float Output + %void = OpTypeVoid + %16 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %20 = OpConstantComposite %v2float %float_0 %float_0 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %int = OpTypeInt 32 1 +%_ptr_Function_int = OpTypePointer Function %int + %26 = OpTypeFunction %void %_ptr_Function_int + %int_4 = OpConstant %int 4 + %49 = OpTypeFunction %v4float %_ptr_Function_v2float + %56 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 +%_entrypoint_v = OpFunction %void None %16 + %17 = OpLabel + %21 = OpVariable %_ptr_Function_v2float Function + OpStore %21 %20 + %23 = OpFunctionCall %v4float %main %21 + OpStore %sk_FragColor %23 + OpReturn + OpFunctionEnd + %d_vi = OpFunction %void None %26 + %27 = OpFunctionParameter %_ptr_Function_int + %28 = OpLabel + %b = OpVariable %_ptr_Function_int Function + OpStore %b %int_4 + OpReturn + OpFunctionEnd + %c_vi = OpFunction %void None %26 + %31 = OpFunctionParameter %_ptr_Function_int + %32 = OpLabel + %34 = OpVariable %_ptr_Function_int Function + %33 = OpLoad %int %31 + OpStore %34 %33 + %35 = OpFunctionCall %void %d_vi %34 + OpReturn + OpFunctionEnd + %b_vi = OpFunction %void None %26 + %36 = OpFunctionParameter %_ptr_Function_int + %37 = OpLabel + %39 = OpVariable %_ptr_Function_int Function + %38 = OpLoad %int %36 + OpStore %39 %38 + %40 = OpFunctionCall %void %c_vi %39 + OpReturn + OpFunctionEnd + %a_vi = OpFunction %void None %26 + %41 = OpFunctionParameter %_ptr_Function_int + %42 = OpLabel + %44 = OpVariable %_ptr_Function_int Function + %47 = OpVariable %_ptr_Function_int Function + %43 = OpLoad %int %41 + OpStore %44 %43 + %45 = OpFunctionCall %void %b_vi %44 + %46 = OpLoad %int %41 + OpStore %47 %46 + %48 = OpFunctionCall %void %b_vi %47 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %49 + %50 = OpFunctionParameter %_ptr_Function_v2float + %51 = OpLabel + %i = OpVariable %_ptr_Function_int Function + %54 = OpVariable %_ptr_Function_int Function + %53 = OpLoad %int %i + OpStore %54 %53 + %55 = OpFunctionCall %void %a_vi %54 + OpReturnValue %56 + OpFunctionEnd diff --git a/tests/sksl/shared/Ossfuzz60077.glsl b/tests/sksl/shared/Ossfuzz60077.glsl new file mode 100644 index 000000000000..78799f12e265 --- /dev/null +++ b/tests/sksl/shared/Ossfuzz60077.glsl @@ -0,0 +1,20 @@ + +out vec4 sk_FragColor; +void d_vi(int _skAnonymousParam0) { + int b = 4; +} +void c_vi(int i) { + d_vi(i); +} +void b_vi(int i) { + c_vi(i); +} +void a_vi(int i) { + b_vi(i); + b_vi(i); +} +vec4 main() { + int i; + a_vi(i); + return vec4(0.0); +} diff --git a/tests/sksl/shared/Ossfuzz60077.hlsl b/tests/sksl/shared/Ossfuzz60077.hlsl new file mode 100644 index 000000000000..513b742f1f3f --- /dev/null +++ b/tests/sksl/shared/Ossfuzz60077.hlsl @@ -0,0 +1,53 @@ +static float4 sk_FragColor; + +struct SPIRV_Cross_Output +{ + float4 sk_FragColor : SV_Target0; +}; + +void d_vi(int _27) +{ + int b = 4; +} + +void c_vi(int _31) +{ + int _34 = _31; + d_vi(_34); +} + +void b_vi(int _36) +{ + int _39 = _36; + c_vi(_39); +} + +void a_vi(int _41) +{ + int _44 = _41; + b_vi(_44); + int _47 = _41; + b_vi(_47); +} + +float4 main(float2 _50) +{ + int i = 0; + int _54 = i; + a_vi(_54); + return 0.0f.xxxx; +} + +void frag_main() +{ + float2 _21 = 0.0f.xx; + sk_FragColor = main(_21); +} + +SPIRV_Cross_Output main() +{ + frag_main(); + SPIRV_Cross_Output stage_output; + stage_output.sk_FragColor = sk_FragColor; + return stage_output; +} diff --git a/tests/sksl/shared/Ossfuzz60077.metal b/tests/sksl/shared/Ossfuzz60077.metal new file mode 100644 index 000000000000..c9014ca32f15 --- /dev/null +++ b/tests/sksl/shared/Ossfuzz60077.metal @@ -0,0 +1,29 @@ +#include +#include +using namespace metal; +struct Inputs { +}; +struct Outputs { + half4 sk_FragColor [[color(0)]]; +}; +void d_vi(int ) { + int b = 4; +} +void c_vi(int i) { + d_vi(i); +} +void b_vi(int i) { + c_vi(i); +} +void a_vi(int i) { + b_vi(i); + b_vi(i); +} +fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) { + Outputs _out; + (void)_out; + int i; + a_vi(i); + _out.sk_FragColor = half4(0.0h); + return _out; +} diff --git a/tests/sksl/shared/Ossfuzz60077.skrp b/tests/sksl/shared/Ossfuzz60077.skrp new file mode 100644 index 000000000000..3cc833c253ca --- /dev/null +++ b/tests/sksl/shared/Ossfuzz60077.skrp @@ -0,0 +1,24 @@ +12 instructions + +[immutable slots] +i0 = 0x00000004 (5.605194e-45) + +store_src_rg v0..1 = src.rg +init_lane_masks CondMask = LoopMask = RetMask = true +copy_constant i = 0 +copy_slot_unmasked i₁ = i +copy_slot_unmasked i₂ = i₁ +copy_slot_unmasked i₃ = i₂ +copy_slot_unmasked ₁ = i₃ +label label 0x00000003 +label label 0x00000002 +label label 0x00000001 +copy_slot_unmasked i₂ = i₁ +copy_slot_unmasked i₃ = i₂ +copy_slot_unmasked ₁ = i₃ +label label 0x00000006 +label label 0x00000005 +label label 0x00000004 +label label 0 +splat_4_constants $0..3 = 0 +load_src src.rgba = $0..3 diff --git a/tests/sksl/shared/Ossfuzz60077.wgsl b/tests/sksl/shared/Ossfuzz60077.wgsl new file mode 100644 index 000000000000..b80f8f9de392 --- /dev/null +++ b/tests/sksl/shared/Ossfuzz60077.wgsl @@ -0,0 +1,44 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +fn d_vi(_skParam0: i32) { + { + var b: i32 = 4; + } +} +fn c_vi(_skParam0: i32) { + let i = _skParam0; + { + d_vi(i); + } +} +fn b_vi(_skParam0: i32) { + let i = _skParam0; + { + c_vi(i); + } +} +fn a_vi(_skParam0: i32) { + let i = _skParam0; + { + b_vi(i); + b_vi(i); + } +} +fn main(_skParam0: vec2) -> vec4 { + { + var i: i32; + a_vi(i); + return vec4(0.0); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/OutParams.asm.frag b/tests/sksl/shared/OutParams.asm.frag index c91622009ac5..3553adf23753 100644 --- a/tests/sksl/shared/OutParams.asm.frag +++ b/tests/sksl/shared/OutParams.asm.frag @@ -1,823 +1,823 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpMemberName %_UniformBuffer 2 "colorWhite" -OpName %_entrypoint_v "_entrypoint_v" -OpName %out_half_vh "out_half_vh" -OpName %out_half2_vh2 "out_half2_vh2" -OpName %out_half3_vh3 "out_half3_vh3" -OpName %out_half4_vh4 "out_half4_vh4" -OpName %out_half2x2_vh22 "out_half2x2_vh22" -OpName %out_half3x3_vh33 "out_half3x3_vh33" -OpName %out_half4x4_vh44 "out_half4x4_vh44" -OpName %out_int_vi "out_int_vi" -OpName %out_int2_vi2 "out_int2_vi2" -OpName %out_int3_vi3 "out_int3_vi3" -OpName %out_int4_vi4 "out_int4_vi4" -OpName %out_float_vf "out_float_vf" -OpName %out_float2_vf2 "out_float2_vf2" -OpName %out_float3_vf3 "out_float3_vf3" -OpName %out_float4_vf4 "out_float4_vf4" -OpName %out_float2x2_vf22 "out_float2x2_vf22" -OpName %out_float3x3_vf33 "out_float3x3_vf33" -OpName %out_float4x4_vf44 "out_float4x4_vf44" -OpName %out_bool_vb "out_bool_vb" -OpName %out_bool2_vb2 "out_bool2_vb2" -OpName %out_bool3_vb3 "out_bool3_vb3" -OpName %out_bool4_vb4 "out_bool4_vb4" -OpName %main "main" -OpName %h "h" -OpName %h2 "h2" -OpName %h3 "h3" -OpName %h4 "h4" -OpName %h2x2 "h2x2" -OpName %h3x3 "h3x3" -OpName %h4x4 "h4x4" -OpName %i "i" -OpName %i2 "i2" -OpName %i3 "i3" -OpName %i4 "i4" -OpName %f "f" -OpName %f2 "f2" -OpName %f3 "f3" -OpName %f4 "f4" -OpName %f2x2 "f2x2" -OpName %f3x3 "f3x3" -OpName %f4x4 "f4x4" -OpName %b "b" -OpName %b2 "b2" -OpName %b3 "b3" -OpName %b4 "b4" -OpName %ok "ok" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %32 Binding 0 -OpDecorate %32 DescriptorSet 0 -OpDecorate %53 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %59 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %69 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -OpDecorate %76 RelaxedPrecision -OpDecorate %77 RelaxedPrecision -OpDecorate %78 RelaxedPrecision -OpDecorate %85 RelaxedPrecision -OpDecorate %86 RelaxedPrecision -OpDecorate %87 RelaxedPrecision -OpDecorate %88 RelaxedPrecision -OpDecorate %89 RelaxedPrecision -OpDecorate %96 RelaxedPrecision -OpDecorate %97 RelaxedPrecision -OpDecorate %98 RelaxedPrecision -OpDecorate %99 RelaxedPrecision -OpDecorate %100 RelaxedPrecision -OpDecorate %101 RelaxedPrecision -OpDecorate %108 RelaxedPrecision -OpDecorate %109 RelaxedPrecision -OpDecorate %110 RelaxedPrecision -OpDecorate %111 RelaxedPrecision -OpDecorate %112 RelaxedPrecision -OpDecorate %113 RelaxedPrecision -OpDecorate %114 RelaxedPrecision -OpDecorate %120 RelaxedPrecision -OpDecorate %121 RelaxedPrecision -OpDecorate %129 RelaxedPrecision -OpDecorate %130 RelaxedPrecision -OpDecorate %139 RelaxedPrecision -OpDecorate %140 RelaxedPrecision -OpDecorate %149 RelaxedPrecision -OpDecorate %150 RelaxedPrecision -OpDecorate %156 RelaxedPrecision -OpDecorate %157 RelaxedPrecision -OpDecorate %161 RelaxedPrecision -OpDecorate %162 RelaxedPrecision -OpDecorate %167 RelaxedPrecision -OpDecorate %168 RelaxedPrecision -OpDecorate %173 RelaxedPrecision -OpDecorate %174 RelaxedPrecision -OpDecorate %179 RelaxedPrecision -OpDecorate %180 RelaxedPrecision -OpDecorate %187 RelaxedPrecision -OpDecorate %188 RelaxedPrecision -OpDecorate %196 RelaxedPrecision -OpDecorate %197 RelaxedPrecision -OpDecorate %208 RelaxedPrecision -OpDecorate %209 RelaxedPrecision -OpDecorate %217 RelaxedPrecision -OpDecorate %218 RelaxedPrecision -OpDecorate %227 RelaxedPrecision -OpDecorate %228 RelaxedPrecision -OpDecorate %237 RelaxedPrecision -OpDecorate %238 RelaxedPrecision -OpDecorate %h RelaxedPrecision -OpDecorate %245 RelaxedPrecision -OpDecorate %247 RelaxedPrecision -OpDecorate %h2 RelaxedPrecision -OpDecorate %249 RelaxedPrecision -OpDecorate %251 RelaxedPrecision -OpDecorate %h3 RelaxedPrecision -OpDecorate %253 RelaxedPrecision -OpDecorate %255 RelaxedPrecision -OpDecorate %h4 RelaxedPrecision -OpDecorate %257 RelaxedPrecision -OpDecorate %259 RelaxedPrecision -OpDecorate %262 RelaxedPrecision -OpDecorate %264 RelaxedPrecision -OpDecorate %265 RelaxedPrecision -OpDecorate %267 RelaxedPrecision -OpDecorate %268 RelaxedPrecision -OpDecorate %269 RelaxedPrecision -OpDecorate %270 RelaxedPrecision -OpDecorate %272 RelaxedPrecision -OpDecorate %273 RelaxedPrecision -OpDecorate %274 RelaxedPrecision -OpDecorate %h2x2 RelaxedPrecision -OpDecorate %276 RelaxedPrecision -OpDecorate %278 RelaxedPrecision -OpDecorate %h3x3 RelaxedPrecision -OpDecorate %280 RelaxedPrecision -OpDecorate %282 RelaxedPrecision -OpDecorate %h4x4 RelaxedPrecision -OpDecorate %284 RelaxedPrecision -OpDecorate %286 RelaxedPrecision -OpDecorate %288 RelaxedPrecision -OpDecorate %290 RelaxedPrecision -OpDecorate %294 RelaxedPrecision -OpDecorate %296 RelaxedPrecision -OpDecorate %300 RelaxedPrecision -OpDecorate %302 RelaxedPrecision -OpDecorate %401 RelaxedPrecision -OpDecorate %402 RelaxedPrecision -OpDecorate %403 RelaxedPrecision -OpDecorate %404 RelaxedPrecision -OpDecorate %405 RelaxedPrecision -OpDecorate %406 RelaxedPrecision -OpDecorate %407 RelaxedPrecision -OpDecorate %408 RelaxedPrecision -OpDecorate %409 RelaxedPrecision -OpDecorate %410 RelaxedPrecision -OpDecorate %412 RelaxedPrecision -OpDecorate %413 RelaxedPrecision -OpDecorate %414 RelaxedPrecision -OpDecorate %416 RelaxedPrecision -OpDecorate %417 RelaxedPrecision -OpDecorate %418 RelaxedPrecision -OpDecorate %420 RelaxedPrecision -OpDecorate %421 RelaxedPrecision -OpDecorate %422 RelaxedPrecision -OpDecorate %467 RelaxedPrecision -OpDecorate %470 RelaxedPrecision -OpDecorate %475 RelaxedPrecision -OpDecorate %480 RelaxedPrecision -OpDecorate %489 RelaxedPrecision -OpDecorate %491 RelaxedPrecision -OpDecorate %492 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpMemberName %_UniformBuffer 2 "colorWhite" + OpName %_entrypoint_v "_entrypoint_v" + OpName %out_half_vh "out_half_vh" + OpName %out_half2_vh2 "out_half2_vh2" + OpName %out_half3_vh3 "out_half3_vh3" + OpName %out_half4_vh4 "out_half4_vh4" + OpName %out_half2x2_vh22 "out_half2x2_vh22" + OpName %out_half3x3_vh33 "out_half3x3_vh33" + OpName %out_half4x4_vh44 "out_half4x4_vh44" + OpName %out_int_vi "out_int_vi" + OpName %out_int2_vi2 "out_int2_vi2" + OpName %out_int3_vi3 "out_int3_vi3" + OpName %out_int4_vi4 "out_int4_vi4" + OpName %out_float_vf "out_float_vf" + OpName %out_float2_vf2 "out_float2_vf2" + OpName %out_float3_vf3 "out_float3_vf3" + OpName %out_float4_vf4 "out_float4_vf4" + OpName %out_float2x2_vf22 "out_float2x2_vf22" + OpName %out_float3x3_vf33 "out_float3x3_vf33" + OpName %out_float4x4_vf44 "out_float4x4_vf44" + OpName %out_bool_vb "out_bool_vb" + OpName %out_bool2_vb2 "out_bool2_vb2" + OpName %out_bool3_vb3 "out_bool3_vb3" + OpName %out_bool4_vb4 "out_bool4_vb4" + OpName %main "main" + OpName %h "h" + OpName %h2 "h2" + OpName %h3 "h3" + OpName %h4 "h4" + OpName %h2x2 "h2x2" + OpName %h3x3 "h3x3" + OpName %h4x4 "h4x4" + OpName %i "i" + OpName %i2 "i2" + OpName %i3 "i3" + OpName %i4 "i4" + OpName %f "f" + OpName %f2 "f2" + OpName %f3 "f3" + OpName %f4 "f4" + OpName %f2x2 "f2x2" + OpName %f3x3 "f3x3" + OpName %f4x4 "f4x4" + OpName %b "b" + OpName %b2 "b2" + OpName %b3 "b3" + OpName %b4 "b4" + OpName %ok "ok" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %32 Binding 0 + OpDecorate %32 DescriptorSet 0 + OpDecorate %53 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %59 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %69 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %76 RelaxedPrecision + OpDecorate %77 RelaxedPrecision + OpDecorate %78 RelaxedPrecision + OpDecorate %85 RelaxedPrecision + OpDecorate %86 RelaxedPrecision + OpDecorate %87 RelaxedPrecision + OpDecorate %88 RelaxedPrecision + OpDecorate %89 RelaxedPrecision + OpDecorate %96 RelaxedPrecision + OpDecorate %97 RelaxedPrecision + OpDecorate %98 RelaxedPrecision + OpDecorate %99 RelaxedPrecision + OpDecorate %100 RelaxedPrecision + OpDecorate %101 RelaxedPrecision + OpDecorate %108 RelaxedPrecision + OpDecorate %109 RelaxedPrecision + OpDecorate %110 RelaxedPrecision + OpDecorate %111 RelaxedPrecision + OpDecorate %112 RelaxedPrecision + OpDecorate %113 RelaxedPrecision + OpDecorate %114 RelaxedPrecision + OpDecorate %120 RelaxedPrecision + OpDecorate %121 RelaxedPrecision + OpDecorate %129 RelaxedPrecision + OpDecorate %130 RelaxedPrecision + OpDecorate %139 RelaxedPrecision + OpDecorate %140 RelaxedPrecision + OpDecorate %149 RelaxedPrecision + OpDecorate %150 RelaxedPrecision + OpDecorate %156 RelaxedPrecision + OpDecorate %157 RelaxedPrecision + OpDecorate %161 RelaxedPrecision + OpDecorate %162 RelaxedPrecision + OpDecorate %167 RelaxedPrecision + OpDecorate %168 RelaxedPrecision + OpDecorate %173 RelaxedPrecision + OpDecorate %174 RelaxedPrecision + OpDecorate %179 RelaxedPrecision + OpDecorate %180 RelaxedPrecision + OpDecorate %187 RelaxedPrecision + OpDecorate %188 RelaxedPrecision + OpDecorate %196 RelaxedPrecision + OpDecorate %197 RelaxedPrecision + OpDecorate %208 RelaxedPrecision + OpDecorate %209 RelaxedPrecision + OpDecorate %217 RelaxedPrecision + OpDecorate %218 RelaxedPrecision + OpDecorate %227 RelaxedPrecision + OpDecorate %228 RelaxedPrecision + OpDecorate %237 RelaxedPrecision + OpDecorate %238 RelaxedPrecision + OpDecorate %h RelaxedPrecision + OpDecorate %245 RelaxedPrecision + OpDecorate %247 RelaxedPrecision + OpDecorate %h2 RelaxedPrecision + OpDecorate %249 RelaxedPrecision + OpDecorate %251 RelaxedPrecision + OpDecorate %h3 RelaxedPrecision + OpDecorate %253 RelaxedPrecision + OpDecorate %255 RelaxedPrecision + OpDecorate %h4 RelaxedPrecision + OpDecorate %257 RelaxedPrecision + OpDecorate %259 RelaxedPrecision + OpDecorate %262 RelaxedPrecision + OpDecorate %264 RelaxedPrecision + OpDecorate %265 RelaxedPrecision + OpDecorate %267 RelaxedPrecision + OpDecorate %268 RelaxedPrecision + OpDecorate %269 RelaxedPrecision + OpDecorate %270 RelaxedPrecision + OpDecorate %272 RelaxedPrecision + OpDecorate %273 RelaxedPrecision + OpDecorate %274 RelaxedPrecision + OpDecorate %h2x2 RelaxedPrecision + OpDecorate %276 RelaxedPrecision + OpDecorate %278 RelaxedPrecision + OpDecorate %h3x3 RelaxedPrecision + OpDecorate %280 RelaxedPrecision + OpDecorate %282 RelaxedPrecision + OpDecorate %h4x4 RelaxedPrecision + OpDecorate %284 RelaxedPrecision + OpDecorate %286 RelaxedPrecision + OpDecorate %288 RelaxedPrecision + OpDecorate %290 RelaxedPrecision + OpDecorate %294 RelaxedPrecision + OpDecorate %296 RelaxedPrecision + OpDecorate %300 RelaxedPrecision + OpDecorate %302 RelaxedPrecision + OpDecorate %401 RelaxedPrecision + OpDecorate %402 RelaxedPrecision + OpDecorate %403 RelaxedPrecision + OpDecorate %404 RelaxedPrecision + OpDecorate %405 RelaxedPrecision + OpDecorate %406 RelaxedPrecision + OpDecorate %407 RelaxedPrecision + OpDecorate %408 RelaxedPrecision + OpDecorate %409 RelaxedPrecision + OpDecorate %410 RelaxedPrecision + OpDecorate %412 RelaxedPrecision + OpDecorate %413 RelaxedPrecision + OpDecorate %414 RelaxedPrecision + OpDecorate %416 RelaxedPrecision + OpDecorate %417 RelaxedPrecision + OpDecorate %418 RelaxedPrecision + OpDecorate %420 RelaxedPrecision + OpDecorate %421 RelaxedPrecision + OpDecorate %422 RelaxedPrecision + OpDecorate %467 RelaxedPrecision + OpDecorate %470 RelaxedPrecision + OpDecorate %475 RelaxedPrecision + OpDecorate %480 RelaxedPrecision + OpDecorate %489 RelaxedPrecision + OpDecorate %491 RelaxedPrecision + OpDecorate %492 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%32 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%37 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%41 = OpConstantComposite %v2float %float_0 %float_0 + %32 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %37 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %41 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float %_ptr_Function_float = OpTypePointer Function %float -%46 = OpTypeFunction %void %_ptr_Function_float + %46 = OpTypeFunction %void %_ptr_Function_float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_2 = OpConstant %int 2 -%55 = OpTypeFunction %void %_ptr_Function_v2float -%v3float = OpTypeVector %float 3 + %int = OpTypeInt 32 1 + %int_2 = OpConstant %int 2 + %55 = OpTypeFunction %void %_ptr_Function_v2float + %v3float = OpTypeVector %float 3 %_ptr_Function_v3float = OpTypePointer Function %v3float -%64 = OpTypeFunction %void %_ptr_Function_v3float + %64 = OpTypeFunction %void %_ptr_Function_v3float %_ptr_Function_v4float = OpTypePointer Function %v4float -%72 = OpTypeFunction %void %_ptr_Function_v4float + %72 = OpTypeFunction %void %_ptr_Function_v4float %mat2v2float = OpTypeMatrix %v2float 2 %_ptr_Function_mat2v2float = OpTypePointer Function %mat2v2float -%81 = OpTypeFunction %void %_ptr_Function_mat2v2float + %81 = OpTypeFunction %void %_ptr_Function_mat2v2float %mat3v3float = OpTypeMatrix %v3float 3 %_ptr_Function_mat3v3float = OpTypePointer Function %mat3v3float -%92 = OpTypeFunction %void %_ptr_Function_mat3v3float + %92 = OpTypeFunction %void %_ptr_Function_mat3v3float %mat4v4float = OpTypeMatrix %v4float 4 %_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float -%104 = OpTypeFunction %void %_ptr_Function_mat4v4float + %104 = OpTypeFunction %void %_ptr_Function_mat4v4float %_ptr_Function_int = OpTypePointer Function %int -%116 = OpTypeFunction %void %_ptr_Function_int -%v2int = OpTypeVector %int 2 + %116 = OpTypeFunction %void %_ptr_Function_int + %v2int = OpTypeVector %int 2 %_ptr_Function_v2int = OpTypePointer Function %v2int -%125 = OpTypeFunction %void %_ptr_Function_v2int -%v3int = OpTypeVector %int 3 + %125 = OpTypeFunction %void %_ptr_Function_v2int + %v3int = OpTypeVector %int 3 %_ptr_Function_v3int = OpTypePointer Function %v3int -%135 = OpTypeFunction %void %_ptr_Function_v3int -%v4int = OpTypeVector %int 4 + %135 = OpTypeFunction %void %_ptr_Function_v3int + %v4int = OpTypeVector %int 4 %_ptr_Function_v4int = OpTypePointer Function %v4int -%145 = OpTypeFunction %void %_ptr_Function_v4int + %145 = OpTypeFunction %void %_ptr_Function_v4int %_ptr_Function_bool = OpTypePointer Function %bool -%204 = OpTypeFunction %void %_ptr_Function_bool -%v2bool = OpTypeVector %bool 2 + %204 = OpTypeFunction %void %_ptr_Function_bool + %v2bool = OpTypeVector %bool 2 %_ptr_Function_v2bool = OpTypePointer Function %v2bool -%213 = OpTypeFunction %void %_ptr_Function_v2bool -%v3bool = OpTypeVector %bool 3 + %213 = OpTypeFunction %void %_ptr_Function_v2bool + %v3bool = OpTypeVector %bool 3 %_ptr_Function_v3bool = OpTypePointer Function %v3bool -%223 = OpTypeFunction %void %_ptr_Function_v3bool -%v4bool = OpTypeVector %bool 4 + %223 = OpTypeFunction %void %_ptr_Function_v3bool + %v4bool = OpTypeVector %bool 4 %_ptr_Function_v4bool = OpTypePointer Function %v4bool -%233 = OpTypeFunction %void %_ptr_Function_v4bool -%241 = OpTypeFunction %v4float %_ptr_Function_v2float -%int_1 = OpConstant %int 1 -%int_3 = OpConstant %int 3 -%int_0 = OpConstant %int 0 -%true = OpConstantTrue %bool -%false = OpConstantFalse %bool -%float_1 = OpConstant %float 1 + %233 = OpTypeFunction %void %_ptr_Function_v4bool + %241 = OpTypeFunction %v4float %_ptr_Function_v2float + %int_1 = OpConstant %int 1 + %int_3 = OpConstant %int 3 + %int_0 = OpConstant %int 0 + %true = OpConstantTrue %bool + %false = OpConstantFalse %bool + %float_1 = OpConstant %float 1 %_entrypoint_v = OpFunction %void None %37 -%38 = OpLabel -%42 = OpVariable %_ptr_Function_v2float Function -OpStore %42 %41 -%44 = OpFunctionCall %v4float %main %42 -OpStore %sk_FragColor %44 -OpReturn -OpFunctionEnd + %38 = OpLabel + %42 = OpVariable %_ptr_Function_v2float Function + OpStore %42 %41 + %44 = OpFunctionCall %v4float %main %42 + OpStore %sk_FragColor %44 + OpReturn + OpFunctionEnd %out_half_vh = OpFunction %void None %46 -%47 = OpFunctionParameter %_ptr_Function_float -%48 = OpLabel -%49 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 -%53 = OpLoad %v4float %49 -%54 = OpCompositeExtract %float %53 0 -OpStore %47 %54 -OpReturn -OpFunctionEnd + %47 = OpFunctionParameter %_ptr_Function_float + %48 = OpLabel + %49 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 + %53 = OpLoad %v4float %49 + %54 = OpCompositeExtract %float %53 0 + OpStore %47 %54 + OpReturn + OpFunctionEnd %out_half2_vh2 = OpFunction %void None %55 -%56 = OpFunctionParameter %_ptr_Function_v2float -%57 = OpLabel -%58 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 -%59 = OpLoad %v4float %58 -%60 = OpCompositeExtract %float %59 1 -%61 = OpCompositeConstruct %v2float %60 %60 -OpStore %56 %61 -OpReturn -OpFunctionEnd + %56 = OpFunctionParameter %_ptr_Function_v2float + %57 = OpLabel + %58 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 + %59 = OpLoad %v4float %58 + %60 = OpCompositeExtract %float %59 1 + %61 = OpCompositeConstruct %v2float %60 %60 + OpStore %56 %61 + OpReturn + OpFunctionEnd %out_half3_vh3 = OpFunction %void None %64 -%65 = OpFunctionParameter %_ptr_Function_v3float -%66 = OpLabel -%67 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 -%68 = OpLoad %v4float %67 -%69 = OpCompositeExtract %float %68 2 -%70 = OpCompositeConstruct %v3float %69 %69 %69 -OpStore %65 %70 -OpReturn -OpFunctionEnd + %65 = OpFunctionParameter %_ptr_Function_v3float + %66 = OpLabel + %67 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 + %68 = OpLoad %v4float %67 + %69 = OpCompositeExtract %float %68 2 + %70 = OpCompositeConstruct %v3float %69 %69 %69 + OpStore %65 %70 + OpReturn + OpFunctionEnd %out_half4_vh4 = OpFunction %void None %72 -%73 = OpFunctionParameter %_ptr_Function_v4float -%74 = OpLabel -%75 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 -%76 = OpLoad %v4float %75 -%77 = OpCompositeExtract %float %76 3 -%78 = OpCompositeConstruct %v4float %77 %77 %77 %77 -OpStore %73 %78 -OpReturn -OpFunctionEnd + %73 = OpFunctionParameter %_ptr_Function_v4float + %74 = OpLabel + %75 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 + %76 = OpLoad %v4float %75 + %77 = OpCompositeExtract %float %76 3 + %78 = OpCompositeConstruct %v4float %77 %77 %77 %77 + OpStore %73 %78 + OpReturn + OpFunctionEnd %out_half2x2_vh22 = OpFunction %void None %81 -%82 = OpFunctionParameter %_ptr_Function_mat2v2float -%83 = OpLabel -%84 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 -%85 = OpLoad %v4float %84 -%86 = OpCompositeExtract %float %85 0 -%87 = OpCompositeConstruct %v2float %86 %float_0 -%88 = OpCompositeConstruct %v2float %float_0 %86 -%89 = OpCompositeConstruct %mat2v2float %87 %88 -OpStore %82 %89 -OpReturn -OpFunctionEnd + %82 = OpFunctionParameter %_ptr_Function_mat2v2float + %83 = OpLabel + %84 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 + %85 = OpLoad %v4float %84 + %86 = OpCompositeExtract %float %85 0 + %87 = OpCompositeConstruct %v2float %86 %float_0 + %88 = OpCompositeConstruct %v2float %float_0 %86 + %89 = OpCompositeConstruct %mat2v2float %87 %88 + OpStore %82 %89 + OpReturn + OpFunctionEnd %out_half3x3_vh33 = OpFunction %void None %92 -%93 = OpFunctionParameter %_ptr_Function_mat3v3float -%94 = OpLabel -%95 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 -%96 = OpLoad %v4float %95 -%97 = OpCompositeExtract %float %96 1 -%98 = OpCompositeConstruct %v3float %97 %float_0 %float_0 -%99 = OpCompositeConstruct %v3float %float_0 %97 %float_0 -%100 = OpCompositeConstruct %v3float %float_0 %float_0 %97 -%101 = OpCompositeConstruct %mat3v3float %98 %99 %100 -OpStore %93 %101 -OpReturn -OpFunctionEnd + %93 = OpFunctionParameter %_ptr_Function_mat3v3float + %94 = OpLabel + %95 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 + %96 = OpLoad %v4float %95 + %97 = OpCompositeExtract %float %96 1 + %98 = OpCompositeConstruct %v3float %97 %float_0 %float_0 + %99 = OpCompositeConstruct %v3float %float_0 %97 %float_0 + %100 = OpCompositeConstruct %v3float %float_0 %float_0 %97 + %101 = OpCompositeConstruct %mat3v3float %98 %99 %100 + OpStore %93 %101 + OpReturn + OpFunctionEnd %out_half4x4_vh44 = OpFunction %void None %104 -%105 = OpFunctionParameter %_ptr_Function_mat4v4float -%106 = OpLabel -%107 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 -%108 = OpLoad %v4float %107 -%109 = OpCompositeExtract %float %108 2 -%110 = OpCompositeConstruct %v4float %109 %float_0 %float_0 %float_0 -%111 = OpCompositeConstruct %v4float %float_0 %109 %float_0 %float_0 -%112 = OpCompositeConstruct %v4float %float_0 %float_0 %109 %float_0 -%113 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %109 -%114 = OpCompositeConstruct %mat4v4float %110 %111 %112 %113 -OpStore %105 %114 -OpReturn -OpFunctionEnd -%out_int_vi = OpFunction %void None %116 -%117 = OpFunctionParameter %_ptr_Function_int -%118 = OpLabel -%119 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 -%120 = OpLoad %v4float %119 -%121 = OpCompositeExtract %float %120 0 -%122 = OpConvertFToS %int %121 -OpStore %117 %122 -OpReturn -OpFunctionEnd + %105 = OpFunctionParameter %_ptr_Function_mat4v4float + %106 = OpLabel + %107 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 + %108 = OpLoad %v4float %107 + %109 = OpCompositeExtract %float %108 2 + %110 = OpCompositeConstruct %v4float %109 %float_0 %float_0 %float_0 + %111 = OpCompositeConstruct %v4float %float_0 %109 %float_0 %float_0 + %112 = OpCompositeConstruct %v4float %float_0 %float_0 %109 %float_0 + %113 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %109 + %114 = OpCompositeConstruct %mat4v4float %110 %111 %112 %113 + OpStore %105 %114 + OpReturn + OpFunctionEnd + %out_int_vi = OpFunction %void None %116 + %117 = OpFunctionParameter %_ptr_Function_int + %118 = OpLabel + %119 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 + %120 = OpLoad %v4float %119 + %121 = OpCompositeExtract %float %120 0 + %122 = OpConvertFToS %int %121 + OpStore %117 %122 + OpReturn + OpFunctionEnd %out_int2_vi2 = OpFunction %void None %125 -%126 = OpFunctionParameter %_ptr_Function_v2int -%127 = OpLabel -%128 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 -%129 = OpLoad %v4float %128 -%130 = OpCompositeExtract %float %129 1 -%131 = OpConvertFToS %int %130 -%132 = OpCompositeConstruct %v2int %131 %131 -OpStore %126 %132 -OpReturn -OpFunctionEnd + %126 = OpFunctionParameter %_ptr_Function_v2int + %127 = OpLabel + %128 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 + %129 = OpLoad %v4float %128 + %130 = OpCompositeExtract %float %129 1 + %131 = OpConvertFToS %int %130 + %132 = OpCompositeConstruct %v2int %131 %131 + OpStore %126 %132 + OpReturn + OpFunctionEnd %out_int3_vi3 = OpFunction %void None %135 -%136 = OpFunctionParameter %_ptr_Function_v3int -%137 = OpLabel -%138 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 -%139 = OpLoad %v4float %138 -%140 = OpCompositeExtract %float %139 2 -%141 = OpConvertFToS %int %140 -%142 = OpCompositeConstruct %v3int %141 %141 %141 -OpStore %136 %142 -OpReturn -OpFunctionEnd + %136 = OpFunctionParameter %_ptr_Function_v3int + %137 = OpLabel + %138 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 + %139 = OpLoad %v4float %138 + %140 = OpCompositeExtract %float %139 2 + %141 = OpConvertFToS %int %140 + %142 = OpCompositeConstruct %v3int %141 %141 %141 + OpStore %136 %142 + OpReturn + OpFunctionEnd %out_int4_vi4 = OpFunction %void None %145 -%146 = OpFunctionParameter %_ptr_Function_v4int -%147 = OpLabel -%148 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 -%149 = OpLoad %v4float %148 -%150 = OpCompositeExtract %float %149 3 -%151 = OpConvertFToS %int %150 -%152 = OpCompositeConstruct %v4int %151 %151 %151 %151 -OpStore %146 %152 -OpReturn -OpFunctionEnd + %146 = OpFunctionParameter %_ptr_Function_v4int + %147 = OpLabel + %148 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 + %149 = OpLoad %v4float %148 + %150 = OpCompositeExtract %float %149 3 + %151 = OpConvertFToS %int %150 + %152 = OpCompositeConstruct %v4int %151 %151 %151 %151 + OpStore %146 %152 + OpReturn + OpFunctionEnd %out_float_vf = OpFunction %void None %46 -%153 = OpFunctionParameter %_ptr_Function_float -%154 = OpLabel -%155 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 -%156 = OpLoad %v4float %155 -%157 = OpCompositeExtract %float %156 0 -OpStore %153 %157 -OpReturn -OpFunctionEnd + %153 = OpFunctionParameter %_ptr_Function_float + %154 = OpLabel + %155 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 + %156 = OpLoad %v4float %155 + %157 = OpCompositeExtract %float %156 0 + OpStore %153 %157 + OpReturn + OpFunctionEnd %out_float2_vf2 = OpFunction %void None %55 -%158 = OpFunctionParameter %_ptr_Function_v2float -%159 = OpLabel -%160 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 -%161 = OpLoad %v4float %160 -%162 = OpCompositeExtract %float %161 1 -%163 = OpCompositeConstruct %v2float %162 %162 -OpStore %158 %163 -OpReturn -OpFunctionEnd + %158 = OpFunctionParameter %_ptr_Function_v2float + %159 = OpLabel + %160 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 + %161 = OpLoad %v4float %160 + %162 = OpCompositeExtract %float %161 1 + %163 = OpCompositeConstruct %v2float %162 %162 + OpStore %158 %163 + OpReturn + OpFunctionEnd %out_float3_vf3 = OpFunction %void None %64 -%164 = OpFunctionParameter %_ptr_Function_v3float -%165 = OpLabel -%166 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 -%167 = OpLoad %v4float %166 -%168 = OpCompositeExtract %float %167 2 -%169 = OpCompositeConstruct %v3float %168 %168 %168 -OpStore %164 %169 -OpReturn -OpFunctionEnd + %164 = OpFunctionParameter %_ptr_Function_v3float + %165 = OpLabel + %166 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 + %167 = OpLoad %v4float %166 + %168 = OpCompositeExtract %float %167 2 + %169 = OpCompositeConstruct %v3float %168 %168 %168 + OpStore %164 %169 + OpReturn + OpFunctionEnd %out_float4_vf4 = OpFunction %void None %72 -%170 = OpFunctionParameter %_ptr_Function_v4float -%171 = OpLabel -%172 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 -%173 = OpLoad %v4float %172 -%174 = OpCompositeExtract %float %173 3 -%175 = OpCompositeConstruct %v4float %174 %174 %174 %174 -OpStore %170 %175 -OpReturn -OpFunctionEnd + %170 = OpFunctionParameter %_ptr_Function_v4float + %171 = OpLabel + %172 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 + %173 = OpLoad %v4float %172 + %174 = OpCompositeExtract %float %173 3 + %175 = OpCompositeConstruct %v4float %174 %174 %174 %174 + OpStore %170 %175 + OpReturn + OpFunctionEnd %out_float2x2_vf22 = OpFunction %void None %81 -%176 = OpFunctionParameter %_ptr_Function_mat2v2float -%177 = OpLabel -%178 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 -%179 = OpLoad %v4float %178 -%180 = OpCompositeExtract %float %179 0 -%181 = OpCompositeConstruct %v2float %180 %float_0 -%182 = OpCompositeConstruct %v2float %float_0 %180 -%183 = OpCompositeConstruct %mat2v2float %181 %182 -OpStore %176 %183 -OpReturn -OpFunctionEnd + %176 = OpFunctionParameter %_ptr_Function_mat2v2float + %177 = OpLabel + %178 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 + %179 = OpLoad %v4float %178 + %180 = OpCompositeExtract %float %179 0 + %181 = OpCompositeConstruct %v2float %180 %float_0 + %182 = OpCompositeConstruct %v2float %float_0 %180 + %183 = OpCompositeConstruct %mat2v2float %181 %182 + OpStore %176 %183 + OpReturn + OpFunctionEnd %out_float3x3_vf33 = OpFunction %void None %92 -%184 = OpFunctionParameter %_ptr_Function_mat3v3float -%185 = OpLabel -%186 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 -%187 = OpLoad %v4float %186 -%188 = OpCompositeExtract %float %187 1 -%189 = OpCompositeConstruct %v3float %188 %float_0 %float_0 -%190 = OpCompositeConstruct %v3float %float_0 %188 %float_0 -%191 = OpCompositeConstruct %v3float %float_0 %float_0 %188 -%192 = OpCompositeConstruct %mat3v3float %189 %190 %191 -OpStore %184 %192 -OpReturn -OpFunctionEnd + %184 = OpFunctionParameter %_ptr_Function_mat3v3float + %185 = OpLabel + %186 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 + %187 = OpLoad %v4float %186 + %188 = OpCompositeExtract %float %187 1 + %189 = OpCompositeConstruct %v3float %188 %float_0 %float_0 + %190 = OpCompositeConstruct %v3float %float_0 %188 %float_0 + %191 = OpCompositeConstruct %v3float %float_0 %float_0 %188 + %192 = OpCompositeConstruct %mat3v3float %189 %190 %191 + OpStore %184 %192 + OpReturn + OpFunctionEnd %out_float4x4_vf44 = OpFunction %void None %104 -%193 = OpFunctionParameter %_ptr_Function_mat4v4float -%194 = OpLabel -%195 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 -%196 = OpLoad %v4float %195 -%197 = OpCompositeExtract %float %196 2 -%198 = OpCompositeConstruct %v4float %197 %float_0 %float_0 %float_0 -%199 = OpCompositeConstruct %v4float %float_0 %197 %float_0 %float_0 -%200 = OpCompositeConstruct %v4float %float_0 %float_0 %197 %float_0 -%201 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %197 -%202 = OpCompositeConstruct %mat4v4float %198 %199 %200 %201 -OpStore %193 %202 -OpReturn -OpFunctionEnd + %193 = OpFunctionParameter %_ptr_Function_mat4v4float + %194 = OpLabel + %195 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 + %196 = OpLoad %v4float %195 + %197 = OpCompositeExtract %float %196 2 + %198 = OpCompositeConstruct %v4float %197 %float_0 %float_0 %float_0 + %199 = OpCompositeConstruct %v4float %float_0 %197 %float_0 %float_0 + %200 = OpCompositeConstruct %v4float %float_0 %float_0 %197 %float_0 + %201 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %197 + %202 = OpCompositeConstruct %mat4v4float %198 %199 %200 %201 + OpStore %193 %202 + OpReturn + OpFunctionEnd %out_bool_vb = OpFunction %void None %204 -%205 = OpFunctionParameter %_ptr_Function_bool -%206 = OpLabel -%207 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 -%208 = OpLoad %v4float %207 -%209 = OpCompositeExtract %float %208 0 -%210 = OpFUnordNotEqual %bool %209 %float_0 -OpStore %205 %210 -OpReturn -OpFunctionEnd + %205 = OpFunctionParameter %_ptr_Function_bool + %206 = OpLabel + %207 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 + %208 = OpLoad %v4float %207 + %209 = OpCompositeExtract %float %208 0 + %210 = OpFUnordNotEqual %bool %209 %float_0 + OpStore %205 %210 + OpReturn + OpFunctionEnd %out_bool2_vb2 = OpFunction %void None %213 -%214 = OpFunctionParameter %_ptr_Function_v2bool -%215 = OpLabel -%216 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 -%217 = OpLoad %v4float %216 -%218 = OpCompositeExtract %float %217 1 -%219 = OpFUnordNotEqual %bool %218 %float_0 -%220 = OpCompositeConstruct %v2bool %219 %219 -OpStore %214 %220 -OpReturn -OpFunctionEnd + %214 = OpFunctionParameter %_ptr_Function_v2bool + %215 = OpLabel + %216 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 + %217 = OpLoad %v4float %216 + %218 = OpCompositeExtract %float %217 1 + %219 = OpFUnordNotEqual %bool %218 %float_0 + %220 = OpCompositeConstruct %v2bool %219 %219 + OpStore %214 %220 + OpReturn + OpFunctionEnd %out_bool3_vb3 = OpFunction %void None %223 -%224 = OpFunctionParameter %_ptr_Function_v3bool -%225 = OpLabel -%226 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 -%227 = OpLoad %v4float %226 -%228 = OpCompositeExtract %float %227 2 -%229 = OpFUnordNotEqual %bool %228 %float_0 -%230 = OpCompositeConstruct %v3bool %229 %229 %229 -OpStore %224 %230 -OpReturn -OpFunctionEnd + %224 = OpFunctionParameter %_ptr_Function_v3bool + %225 = OpLabel + %226 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 + %227 = OpLoad %v4float %226 + %228 = OpCompositeExtract %float %227 2 + %229 = OpFUnordNotEqual %bool %228 %float_0 + %230 = OpCompositeConstruct %v3bool %229 %229 %229 + OpStore %224 %230 + OpReturn + OpFunctionEnd %out_bool4_vb4 = OpFunction %void None %233 -%234 = OpFunctionParameter %_ptr_Function_v4bool -%235 = OpLabel -%236 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 -%237 = OpLoad %v4float %236 -%238 = OpCompositeExtract %float %237 3 -%239 = OpFUnordNotEqual %bool %238 %float_0 -%240 = OpCompositeConstruct %v4bool %239 %239 %239 %239 -OpStore %234 %240 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %241 -%242 = OpFunctionParameter %_ptr_Function_v2float -%243 = OpLabel -%h = OpVariable %_ptr_Function_float Function -%245 = OpVariable %_ptr_Function_float Function -%h2 = OpVariable %_ptr_Function_v2float Function -%249 = OpVariable %_ptr_Function_v2float Function -%h3 = OpVariable %_ptr_Function_v3float Function -%253 = OpVariable %_ptr_Function_v3float Function -%h4 = OpVariable %_ptr_Function_v4float Function -%257 = OpVariable %_ptr_Function_v4float Function -%262 = OpVariable %_ptr_Function_float Function -%265 = OpVariable %_ptr_Function_v2float Function -%270 = OpVariable %_ptr_Function_v4float Function -%h2x2 = OpVariable %_ptr_Function_mat2v2float Function -%276 = OpVariable %_ptr_Function_mat2v2float Function -%h3x3 = OpVariable %_ptr_Function_mat3v3float Function -%280 = OpVariable %_ptr_Function_mat3v3float Function -%h4x4 = OpVariable %_ptr_Function_mat4v4float Function -%284 = OpVariable %_ptr_Function_mat4v4float Function -%288 = OpVariable %_ptr_Function_v3float Function -%294 = OpVariable %_ptr_Function_float Function -%300 = OpVariable %_ptr_Function_float Function -%i = OpVariable %_ptr_Function_int Function -%304 = OpVariable %_ptr_Function_int Function -%i2 = OpVariable %_ptr_Function_v2int Function -%308 = OpVariable %_ptr_Function_v2int Function -%i3 = OpVariable %_ptr_Function_v3int Function -%312 = OpVariable %_ptr_Function_v3int Function -%i4 = OpVariable %_ptr_Function_v4int Function -%316 = OpVariable %_ptr_Function_v4int Function -%319 = OpVariable %_ptr_Function_v3int Function -%325 = OpVariable %_ptr_Function_int Function -%f = OpVariable %_ptr_Function_float Function -%329 = OpVariable %_ptr_Function_float Function -%f2 = OpVariable %_ptr_Function_v2float Function -%333 = OpVariable %_ptr_Function_v2float Function -%f3 = OpVariable %_ptr_Function_v3float Function -%337 = OpVariable %_ptr_Function_v3float Function -%f4 = OpVariable %_ptr_Function_v4float Function -%341 = OpVariable %_ptr_Function_v4float Function -%344 = OpVariable %_ptr_Function_v2float Function -%350 = OpVariable %_ptr_Function_float Function -%f2x2 = OpVariable %_ptr_Function_mat2v2float Function -%354 = OpVariable %_ptr_Function_mat2v2float Function -%f3x3 = OpVariable %_ptr_Function_mat3v3float Function -%358 = OpVariable %_ptr_Function_mat3v3float Function -%f4x4 = OpVariable %_ptr_Function_mat4v4float Function -%362 = OpVariable %_ptr_Function_mat4v4float Function -%367 = OpVariable %_ptr_Function_float Function -%b = OpVariable %_ptr_Function_bool Function -%371 = OpVariable %_ptr_Function_bool Function -%b2 = OpVariable %_ptr_Function_v2bool Function -%375 = OpVariable %_ptr_Function_v2bool Function -%b3 = OpVariable %_ptr_Function_v3bool Function -%379 = OpVariable %_ptr_Function_v3bool Function -%b4 = OpVariable %_ptr_Function_v4bool Function -%383 = OpVariable %_ptr_Function_v4bool Function -%386 = OpVariable %_ptr_Function_v2bool Function -%392 = OpVariable %_ptr_Function_bool Function -%ok = OpVariable %_ptr_Function_bool Function -%484 = OpVariable %_ptr_Function_v4float Function -%246 = OpFunctionCall %void %out_half_vh %245 -%247 = OpLoad %float %245 -OpStore %h %247 -%250 = OpFunctionCall %void %out_half2_vh2 %249 -%251 = OpLoad %v2float %249 -OpStore %h2 %251 -%254 = OpFunctionCall %void %out_half3_vh3 %253 -%255 = OpLoad %v3float %253 -OpStore %h3 %255 -%258 = OpFunctionCall %void %out_half4_vh4 %257 -%259 = OpLoad %v4float %257 -OpStore %h4 %259 -%260 = OpAccessChain %_ptr_Function_float %h3 %int_1 -%263 = OpFunctionCall %void %out_half_vh %262 -%264 = OpLoad %float %262 -OpStore %260 %264 -%266 = OpFunctionCall %void %out_half2_vh2 %265 -%267 = OpLoad %v2float %265 -%268 = OpLoad %v3float %h3 -%269 = OpVectorShuffle %v3float %268 %267 3 1 4 -OpStore %h3 %269 -%271 = OpFunctionCall %void %out_half4_vh4 %270 -%272 = OpLoad %v4float %270 -%273 = OpLoad %v4float %h4 -%274 = OpVectorShuffle %v4float %273 %272 6 7 4 5 -OpStore %h4 %274 -%277 = OpFunctionCall %void %out_half2x2_vh22 %276 -%278 = OpLoad %mat2v2float %276 -OpStore %h2x2 %278 -%281 = OpFunctionCall %void %out_half3x3_vh33 %280 -%282 = OpLoad %mat3v3float %280 -OpStore %h3x3 %282 -%285 = OpFunctionCall %void %out_half4x4_vh44 %284 -%286 = OpLoad %mat4v4float %284 -OpStore %h4x4 %286 -%287 = OpAccessChain %_ptr_Function_v3float %h3x3 %int_1 -%289 = OpFunctionCall %void %out_half3_vh3 %288 -%290 = OpLoad %v3float %288 -OpStore %287 %290 -%292 = OpAccessChain %_ptr_Function_v4float %h4x4 %int_3 -%293 = OpAccessChain %_ptr_Function_float %292 %int_3 -%295 = OpFunctionCall %void %out_half_vh %294 -%296 = OpLoad %float %294 -OpStore %293 %296 -%298 = OpAccessChain %_ptr_Function_v2float %h2x2 %int_0 -%299 = OpAccessChain %_ptr_Function_float %298 %int_0 -%301 = OpFunctionCall %void %out_half_vh %300 -%302 = OpLoad %float %300 -OpStore %299 %302 -%305 = OpFunctionCall %void %out_int_vi %304 -%306 = OpLoad %int %304 -OpStore %i %306 -%309 = OpFunctionCall %void %out_int2_vi2 %308 -%310 = OpLoad %v2int %308 -OpStore %i2 %310 -%313 = OpFunctionCall %void %out_int3_vi3 %312 -%314 = OpLoad %v3int %312 -OpStore %i3 %314 -%317 = OpFunctionCall %void %out_int4_vi4 %316 -%318 = OpLoad %v4int %316 -OpStore %i4 %318 -%320 = OpFunctionCall %void %out_int3_vi3 %319 -%321 = OpLoad %v3int %319 -%322 = OpLoad %v4int %i4 -%323 = OpVectorShuffle %v4int %322 %321 4 5 6 3 -OpStore %i4 %323 -%324 = OpAccessChain %_ptr_Function_int %i2 %int_1 -%326 = OpFunctionCall %void %out_int_vi %325 -%327 = OpLoad %int %325 -OpStore %324 %327 -%330 = OpFunctionCall %void %out_float_vf %329 -%331 = OpLoad %float %329 -OpStore %f %331 -%334 = OpFunctionCall %void %out_float2_vf2 %333 -%335 = OpLoad %v2float %333 -OpStore %f2 %335 -%338 = OpFunctionCall %void %out_float3_vf3 %337 -%339 = OpLoad %v3float %337 -OpStore %f3 %339 -%342 = OpFunctionCall %void %out_float4_vf4 %341 -%343 = OpLoad %v4float %341 -OpStore %f4 %343 -%345 = OpFunctionCall %void %out_float2_vf2 %344 -%346 = OpLoad %v2float %344 -%347 = OpLoad %v3float %f3 -%348 = OpVectorShuffle %v3float %347 %346 3 4 2 -OpStore %f3 %348 -%349 = OpAccessChain %_ptr_Function_float %f2 %int_0 -%351 = OpFunctionCall %void %out_float_vf %350 -%352 = OpLoad %float %350 -OpStore %349 %352 -%355 = OpFunctionCall %void %out_float2x2_vf22 %354 -%356 = OpLoad %mat2v2float %354 -OpStore %f2x2 %356 -%359 = OpFunctionCall %void %out_float3x3_vf33 %358 -%360 = OpLoad %mat3v3float %358 -OpStore %f3x3 %360 -%363 = OpFunctionCall %void %out_float4x4_vf44 %362 -%364 = OpLoad %mat4v4float %362 -OpStore %f4x4 %364 -%365 = OpAccessChain %_ptr_Function_v2float %f2x2 %int_0 -%366 = OpAccessChain %_ptr_Function_float %365 %int_0 -%368 = OpFunctionCall %void %out_float_vf %367 -%369 = OpLoad %float %367 -OpStore %366 %369 -%372 = OpFunctionCall %void %out_bool_vb %371 -%373 = OpLoad %bool %371 -OpStore %b %373 -%376 = OpFunctionCall %void %out_bool2_vb2 %375 -%377 = OpLoad %v2bool %375 -OpStore %b2 %377 -%380 = OpFunctionCall %void %out_bool3_vb3 %379 -%381 = OpLoad %v3bool %379 -OpStore %b3 %381 -%384 = OpFunctionCall %void %out_bool4_vb4 %383 -%385 = OpLoad %v4bool %383 -OpStore %b4 %385 -%387 = OpFunctionCall %void %out_bool2_vb2 %386 -%388 = OpLoad %v2bool %386 -%389 = OpLoad %v4bool %b4 -%390 = OpVectorShuffle %v4bool %389 %388 4 1 2 5 -OpStore %b4 %390 -%391 = OpAccessChain %_ptr_Function_bool %b3 %int_2 -%393 = OpFunctionCall %void %out_bool_vb %392 -%394 = OpLoad %bool %392 -OpStore %391 %394 -OpStore %ok %true -OpSelectionMerge %399 None -OpBranchConditional %true %398 %399 -%398 = OpLabel -%401 = OpLoad %float %h -%402 = OpLoad %v2float %h2 -%403 = OpCompositeExtract %float %402 0 -%404 = OpFMul %float %401 %403 -%405 = OpLoad %v3float %h3 -%406 = OpCompositeExtract %float %405 0 -%407 = OpFMul %float %404 %406 -%408 = OpLoad %v4float %h4 -%409 = OpCompositeExtract %float %408 0 -%410 = OpFMul %float %407 %409 -%411 = OpAccessChain %_ptr_Function_v2float %h2x2 %int_0 -%412 = OpLoad %v2float %411 -%413 = OpCompositeExtract %float %412 0 -%414 = OpFMul %float %410 %413 -%415 = OpAccessChain %_ptr_Function_v3float %h3x3 %int_0 -%416 = OpLoad %v3float %415 -%417 = OpCompositeExtract %float %416 0 -%418 = OpFMul %float %414 %417 -%419 = OpAccessChain %_ptr_Function_v4float %h4x4 %int_0 -%420 = OpLoad %v4float %419 -%421 = OpCompositeExtract %float %420 0 -%422 = OpFMul %float %418 %421 -%423 = OpFOrdEqual %bool %float_1 %422 -OpBranch %399 -%399 = OpLabel -%424 = OpPhi %bool %false %243 %423 %398 -OpStore %ok %424 -OpSelectionMerge %426 None -OpBranchConditional %424 %425 %426 -%425 = OpLabel -%427 = OpLoad %float %f -%428 = OpLoad %v2float %f2 -%429 = OpCompositeExtract %float %428 0 -%430 = OpFMul %float %427 %429 -%431 = OpLoad %v3float %f3 -%432 = OpCompositeExtract %float %431 0 -%433 = OpFMul %float %430 %432 -%434 = OpLoad %v4float %f4 -%435 = OpCompositeExtract %float %434 0 -%436 = OpFMul %float %433 %435 -%437 = OpAccessChain %_ptr_Function_v2float %f2x2 %int_0 -%438 = OpLoad %v2float %437 -%439 = OpCompositeExtract %float %438 0 -%440 = OpFMul %float %436 %439 -%441 = OpAccessChain %_ptr_Function_v3float %f3x3 %int_0 -%442 = OpLoad %v3float %441 -%443 = OpCompositeExtract %float %442 0 -%444 = OpFMul %float %440 %443 -%445 = OpAccessChain %_ptr_Function_v4float %f4x4 %int_0 -%446 = OpLoad %v4float %445 -%447 = OpCompositeExtract %float %446 0 -%448 = OpFMul %float %444 %447 -%449 = OpFOrdEqual %bool %float_1 %448 -OpBranch %426 -%426 = OpLabel -%450 = OpPhi %bool %false %399 %449 %425 -OpStore %ok %450 -OpSelectionMerge %452 None -OpBranchConditional %450 %451 %452 -%451 = OpLabel -%453 = OpLoad %int %i -%454 = OpLoad %v2int %i2 -%455 = OpCompositeExtract %int %454 0 -%456 = OpIMul %int %453 %455 -%457 = OpLoad %v3int %i3 -%458 = OpCompositeExtract %int %457 0 -%459 = OpIMul %int %456 %458 -%460 = OpLoad %v4int %i4 -%461 = OpCompositeExtract %int %460 0 -%462 = OpIMul %int %459 %461 -%463 = OpIEqual %bool %int_1 %462 -OpBranch %452 -%452 = OpLabel -%464 = OpPhi %bool %false %426 %463 %451 -OpStore %ok %464 -OpSelectionMerge %466 None -OpBranchConditional %464 %465 %466 -%465 = OpLabel -%467 = OpLoad %bool %b -OpSelectionMerge %469 None -OpBranchConditional %467 %468 %469 -%468 = OpLabel -%470 = OpLoad %v2bool %b2 -%471 = OpCompositeExtract %bool %470 0 -OpBranch %469 -%469 = OpLabel -%472 = OpPhi %bool %false %465 %471 %468 -OpSelectionMerge %474 None -OpBranchConditional %472 %473 %474 -%473 = OpLabel -%475 = OpLoad %v3bool %b3 -%476 = OpCompositeExtract %bool %475 0 -OpBranch %474 -%474 = OpLabel -%477 = OpPhi %bool %false %469 %476 %473 -OpSelectionMerge %479 None -OpBranchConditional %477 %478 %479 -%478 = OpLabel -%480 = OpLoad %v4bool %b4 -%481 = OpCompositeExtract %bool %480 0 -OpBranch %479 -%479 = OpLabel -%482 = OpPhi %bool %false %474 %481 %478 -OpBranch %466 -%466 = OpLabel -%483 = OpPhi %bool %false %452 %482 %479 -OpStore %ok %483 -OpSelectionMerge %487 None -OpBranchConditional %483 %485 %486 -%485 = OpLabel -%488 = OpAccessChain %_ptr_Uniform_v4float %32 %int_0 -%489 = OpLoad %v4float %488 -OpStore %484 %489 -OpBranch %487 -%486 = OpLabel -%490 = OpAccessChain %_ptr_Uniform_v4float %32 %int_1 -%491 = OpLoad %v4float %490 -OpStore %484 %491 -OpBranch %487 -%487 = OpLabel -%492 = OpLoad %v4float %484 -OpReturnValue %492 -OpFunctionEnd + %234 = OpFunctionParameter %_ptr_Function_v4bool + %235 = OpLabel + %236 = OpAccessChain %_ptr_Uniform_v4float %32 %int_2 + %237 = OpLoad %v4float %236 + %238 = OpCompositeExtract %float %237 3 + %239 = OpFUnordNotEqual %bool %238 %float_0 + %240 = OpCompositeConstruct %v4bool %239 %239 %239 %239 + OpStore %234 %240 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %241 + %242 = OpFunctionParameter %_ptr_Function_v2float + %243 = OpLabel + %h = OpVariable %_ptr_Function_float Function + %245 = OpVariable %_ptr_Function_float Function + %h2 = OpVariable %_ptr_Function_v2float Function + %249 = OpVariable %_ptr_Function_v2float Function + %h3 = OpVariable %_ptr_Function_v3float Function + %253 = OpVariable %_ptr_Function_v3float Function + %h4 = OpVariable %_ptr_Function_v4float Function + %257 = OpVariable %_ptr_Function_v4float Function + %262 = OpVariable %_ptr_Function_float Function + %265 = OpVariable %_ptr_Function_v2float Function + %270 = OpVariable %_ptr_Function_v4float Function + %h2x2 = OpVariable %_ptr_Function_mat2v2float Function + %276 = OpVariable %_ptr_Function_mat2v2float Function + %h3x3 = OpVariable %_ptr_Function_mat3v3float Function + %280 = OpVariable %_ptr_Function_mat3v3float Function + %h4x4 = OpVariable %_ptr_Function_mat4v4float Function + %284 = OpVariable %_ptr_Function_mat4v4float Function + %288 = OpVariable %_ptr_Function_v3float Function + %294 = OpVariable %_ptr_Function_float Function + %300 = OpVariable %_ptr_Function_float Function + %i = OpVariable %_ptr_Function_int Function + %304 = OpVariable %_ptr_Function_int Function + %i2 = OpVariable %_ptr_Function_v2int Function + %308 = OpVariable %_ptr_Function_v2int Function + %i3 = OpVariable %_ptr_Function_v3int Function + %312 = OpVariable %_ptr_Function_v3int Function + %i4 = OpVariable %_ptr_Function_v4int Function + %316 = OpVariable %_ptr_Function_v4int Function + %319 = OpVariable %_ptr_Function_v3int Function + %325 = OpVariable %_ptr_Function_int Function + %f = OpVariable %_ptr_Function_float Function + %329 = OpVariable %_ptr_Function_float Function + %f2 = OpVariable %_ptr_Function_v2float Function + %333 = OpVariable %_ptr_Function_v2float Function + %f3 = OpVariable %_ptr_Function_v3float Function + %337 = OpVariable %_ptr_Function_v3float Function + %f4 = OpVariable %_ptr_Function_v4float Function + %341 = OpVariable %_ptr_Function_v4float Function + %344 = OpVariable %_ptr_Function_v2float Function + %350 = OpVariable %_ptr_Function_float Function + %f2x2 = OpVariable %_ptr_Function_mat2v2float Function + %354 = OpVariable %_ptr_Function_mat2v2float Function + %f3x3 = OpVariable %_ptr_Function_mat3v3float Function + %358 = OpVariable %_ptr_Function_mat3v3float Function + %f4x4 = OpVariable %_ptr_Function_mat4v4float Function + %362 = OpVariable %_ptr_Function_mat4v4float Function + %367 = OpVariable %_ptr_Function_float Function + %b = OpVariable %_ptr_Function_bool Function + %371 = OpVariable %_ptr_Function_bool Function + %b2 = OpVariable %_ptr_Function_v2bool Function + %375 = OpVariable %_ptr_Function_v2bool Function + %b3 = OpVariable %_ptr_Function_v3bool Function + %379 = OpVariable %_ptr_Function_v3bool Function + %b4 = OpVariable %_ptr_Function_v4bool Function + %383 = OpVariable %_ptr_Function_v4bool Function + %386 = OpVariable %_ptr_Function_v2bool Function + %392 = OpVariable %_ptr_Function_bool Function + %ok = OpVariable %_ptr_Function_bool Function + %484 = OpVariable %_ptr_Function_v4float Function + %246 = OpFunctionCall %void %out_half_vh %245 + %247 = OpLoad %float %245 + OpStore %h %247 + %250 = OpFunctionCall %void %out_half2_vh2 %249 + %251 = OpLoad %v2float %249 + OpStore %h2 %251 + %254 = OpFunctionCall %void %out_half3_vh3 %253 + %255 = OpLoad %v3float %253 + OpStore %h3 %255 + %258 = OpFunctionCall %void %out_half4_vh4 %257 + %259 = OpLoad %v4float %257 + OpStore %h4 %259 + %260 = OpAccessChain %_ptr_Function_float %h3 %int_1 + %263 = OpFunctionCall %void %out_half_vh %262 + %264 = OpLoad %float %262 + OpStore %260 %264 + %266 = OpFunctionCall %void %out_half2_vh2 %265 + %267 = OpLoad %v2float %265 + %268 = OpLoad %v3float %h3 + %269 = OpVectorShuffle %v3float %268 %267 3 1 4 + OpStore %h3 %269 + %271 = OpFunctionCall %void %out_half4_vh4 %270 + %272 = OpLoad %v4float %270 + %273 = OpLoad %v4float %h4 + %274 = OpVectorShuffle %v4float %273 %272 6 7 4 5 + OpStore %h4 %274 + %277 = OpFunctionCall %void %out_half2x2_vh22 %276 + %278 = OpLoad %mat2v2float %276 + OpStore %h2x2 %278 + %281 = OpFunctionCall %void %out_half3x3_vh33 %280 + %282 = OpLoad %mat3v3float %280 + OpStore %h3x3 %282 + %285 = OpFunctionCall %void %out_half4x4_vh44 %284 + %286 = OpLoad %mat4v4float %284 + OpStore %h4x4 %286 + %287 = OpAccessChain %_ptr_Function_v3float %h3x3 %int_1 + %289 = OpFunctionCall %void %out_half3_vh3 %288 + %290 = OpLoad %v3float %288 + OpStore %287 %290 + %292 = OpAccessChain %_ptr_Function_v4float %h4x4 %int_3 + %293 = OpAccessChain %_ptr_Function_float %292 %int_3 + %295 = OpFunctionCall %void %out_half_vh %294 + %296 = OpLoad %float %294 + OpStore %293 %296 + %298 = OpAccessChain %_ptr_Function_v2float %h2x2 %int_0 + %299 = OpAccessChain %_ptr_Function_float %298 %int_0 + %301 = OpFunctionCall %void %out_half_vh %300 + %302 = OpLoad %float %300 + OpStore %299 %302 + %305 = OpFunctionCall %void %out_int_vi %304 + %306 = OpLoad %int %304 + OpStore %i %306 + %309 = OpFunctionCall %void %out_int2_vi2 %308 + %310 = OpLoad %v2int %308 + OpStore %i2 %310 + %313 = OpFunctionCall %void %out_int3_vi3 %312 + %314 = OpLoad %v3int %312 + OpStore %i3 %314 + %317 = OpFunctionCall %void %out_int4_vi4 %316 + %318 = OpLoad %v4int %316 + OpStore %i4 %318 + %320 = OpFunctionCall %void %out_int3_vi3 %319 + %321 = OpLoad %v3int %319 + %322 = OpLoad %v4int %i4 + %323 = OpVectorShuffle %v4int %322 %321 4 5 6 3 + OpStore %i4 %323 + %324 = OpAccessChain %_ptr_Function_int %i2 %int_1 + %326 = OpFunctionCall %void %out_int_vi %325 + %327 = OpLoad %int %325 + OpStore %324 %327 + %330 = OpFunctionCall %void %out_float_vf %329 + %331 = OpLoad %float %329 + OpStore %f %331 + %334 = OpFunctionCall %void %out_float2_vf2 %333 + %335 = OpLoad %v2float %333 + OpStore %f2 %335 + %338 = OpFunctionCall %void %out_float3_vf3 %337 + %339 = OpLoad %v3float %337 + OpStore %f3 %339 + %342 = OpFunctionCall %void %out_float4_vf4 %341 + %343 = OpLoad %v4float %341 + OpStore %f4 %343 + %345 = OpFunctionCall %void %out_float2_vf2 %344 + %346 = OpLoad %v2float %344 + %347 = OpLoad %v3float %f3 + %348 = OpVectorShuffle %v3float %347 %346 3 4 2 + OpStore %f3 %348 + %349 = OpAccessChain %_ptr_Function_float %f2 %int_0 + %351 = OpFunctionCall %void %out_float_vf %350 + %352 = OpLoad %float %350 + OpStore %349 %352 + %355 = OpFunctionCall %void %out_float2x2_vf22 %354 + %356 = OpLoad %mat2v2float %354 + OpStore %f2x2 %356 + %359 = OpFunctionCall %void %out_float3x3_vf33 %358 + %360 = OpLoad %mat3v3float %358 + OpStore %f3x3 %360 + %363 = OpFunctionCall %void %out_float4x4_vf44 %362 + %364 = OpLoad %mat4v4float %362 + OpStore %f4x4 %364 + %365 = OpAccessChain %_ptr_Function_v2float %f2x2 %int_0 + %366 = OpAccessChain %_ptr_Function_float %365 %int_0 + %368 = OpFunctionCall %void %out_float_vf %367 + %369 = OpLoad %float %367 + OpStore %366 %369 + %372 = OpFunctionCall %void %out_bool_vb %371 + %373 = OpLoad %bool %371 + OpStore %b %373 + %376 = OpFunctionCall %void %out_bool2_vb2 %375 + %377 = OpLoad %v2bool %375 + OpStore %b2 %377 + %380 = OpFunctionCall %void %out_bool3_vb3 %379 + %381 = OpLoad %v3bool %379 + OpStore %b3 %381 + %384 = OpFunctionCall %void %out_bool4_vb4 %383 + %385 = OpLoad %v4bool %383 + OpStore %b4 %385 + %387 = OpFunctionCall %void %out_bool2_vb2 %386 + %388 = OpLoad %v2bool %386 + %389 = OpLoad %v4bool %b4 + %390 = OpVectorShuffle %v4bool %389 %388 4 1 2 5 + OpStore %b4 %390 + %391 = OpAccessChain %_ptr_Function_bool %b3 %int_2 + %393 = OpFunctionCall %void %out_bool_vb %392 + %394 = OpLoad %bool %392 + OpStore %391 %394 + OpStore %ok %true + OpSelectionMerge %399 None + OpBranchConditional %true %398 %399 + %398 = OpLabel + %401 = OpLoad %float %h + %402 = OpLoad %v2float %h2 + %403 = OpCompositeExtract %float %402 0 + %404 = OpFMul %float %401 %403 + %405 = OpLoad %v3float %h3 + %406 = OpCompositeExtract %float %405 0 + %407 = OpFMul %float %404 %406 + %408 = OpLoad %v4float %h4 + %409 = OpCompositeExtract %float %408 0 + %410 = OpFMul %float %407 %409 + %411 = OpAccessChain %_ptr_Function_v2float %h2x2 %int_0 + %412 = OpLoad %v2float %411 + %413 = OpCompositeExtract %float %412 0 + %414 = OpFMul %float %410 %413 + %415 = OpAccessChain %_ptr_Function_v3float %h3x3 %int_0 + %416 = OpLoad %v3float %415 + %417 = OpCompositeExtract %float %416 0 + %418 = OpFMul %float %414 %417 + %419 = OpAccessChain %_ptr_Function_v4float %h4x4 %int_0 + %420 = OpLoad %v4float %419 + %421 = OpCompositeExtract %float %420 0 + %422 = OpFMul %float %418 %421 + %423 = OpFOrdEqual %bool %float_1 %422 + OpBranch %399 + %399 = OpLabel + %424 = OpPhi %bool %false %243 %423 %398 + OpStore %ok %424 + OpSelectionMerge %426 None + OpBranchConditional %424 %425 %426 + %425 = OpLabel + %427 = OpLoad %float %f + %428 = OpLoad %v2float %f2 + %429 = OpCompositeExtract %float %428 0 + %430 = OpFMul %float %427 %429 + %431 = OpLoad %v3float %f3 + %432 = OpCompositeExtract %float %431 0 + %433 = OpFMul %float %430 %432 + %434 = OpLoad %v4float %f4 + %435 = OpCompositeExtract %float %434 0 + %436 = OpFMul %float %433 %435 + %437 = OpAccessChain %_ptr_Function_v2float %f2x2 %int_0 + %438 = OpLoad %v2float %437 + %439 = OpCompositeExtract %float %438 0 + %440 = OpFMul %float %436 %439 + %441 = OpAccessChain %_ptr_Function_v3float %f3x3 %int_0 + %442 = OpLoad %v3float %441 + %443 = OpCompositeExtract %float %442 0 + %444 = OpFMul %float %440 %443 + %445 = OpAccessChain %_ptr_Function_v4float %f4x4 %int_0 + %446 = OpLoad %v4float %445 + %447 = OpCompositeExtract %float %446 0 + %448 = OpFMul %float %444 %447 + %449 = OpFOrdEqual %bool %float_1 %448 + OpBranch %426 + %426 = OpLabel + %450 = OpPhi %bool %false %399 %449 %425 + OpStore %ok %450 + OpSelectionMerge %452 None + OpBranchConditional %450 %451 %452 + %451 = OpLabel + %453 = OpLoad %int %i + %454 = OpLoad %v2int %i2 + %455 = OpCompositeExtract %int %454 0 + %456 = OpIMul %int %453 %455 + %457 = OpLoad %v3int %i3 + %458 = OpCompositeExtract %int %457 0 + %459 = OpIMul %int %456 %458 + %460 = OpLoad %v4int %i4 + %461 = OpCompositeExtract %int %460 0 + %462 = OpIMul %int %459 %461 + %463 = OpIEqual %bool %int_1 %462 + OpBranch %452 + %452 = OpLabel + %464 = OpPhi %bool %false %426 %463 %451 + OpStore %ok %464 + OpSelectionMerge %466 None + OpBranchConditional %464 %465 %466 + %465 = OpLabel + %467 = OpLoad %bool %b + OpSelectionMerge %469 None + OpBranchConditional %467 %468 %469 + %468 = OpLabel + %470 = OpLoad %v2bool %b2 + %471 = OpCompositeExtract %bool %470 0 + OpBranch %469 + %469 = OpLabel + %472 = OpPhi %bool %false %465 %471 %468 + OpSelectionMerge %474 None + OpBranchConditional %472 %473 %474 + %473 = OpLabel + %475 = OpLoad %v3bool %b3 + %476 = OpCompositeExtract %bool %475 0 + OpBranch %474 + %474 = OpLabel + %477 = OpPhi %bool %false %469 %476 %473 + OpSelectionMerge %479 None + OpBranchConditional %477 %478 %479 + %478 = OpLabel + %480 = OpLoad %v4bool %b4 + %481 = OpCompositeExtract %bool %480 0 + OpBranch %479 + %479 = OpLabel + %482 = OpPhi %bool %false %474 %481 %478 + OpBranch %466 + %466 = OpLabel + %483 = OpPhi %bool %false %452 %482 %479 + OpStore %ok %483 + OpSelectionMerge %487 None + OpBranchConditional %483 %485 %486 + %485 = OpLabel + %488 = OpAccessChain %_ptr_Uniform_v4float %32 %int_0 + %489 = OpLoad %v4float %488 + OpStore %484 %489 + OpBranch %487 + %486 = OpLabel + %490 = OpAccessChain %_ptr_Uniform_v4float %32 %int_1 + %491 = OpLoad %v4float %490 + OpStore %484 %491 + OpBranch %487 + %487 = OpLabel + %492 = OpLoad %v4float %484 + OpReturnValue %492 + OpFunctionEnd diff --git a/tests/sksl/shared/OutParams.metal b/tests/sksl/shared/OutParams.metal index 3c154d0bc9fe..475619860269 100644 --- a/tests/sksl/shared/OutParams.metal +++ b/tests/sksl/shared/OutParams.metal @@ -11,216 +11,6 @@ struct Inputs { struct Outputs { half4 sk_FragColor [[color(0)]]; }; -void out_half_vh(Uniforms _uniforms, thread half& v); -void _skOutParamHelper0_out_half_vh(Uniforms _uniforms, thread half& h) { - half _var0; - out_half_vh(_uniforms, _var0); - h = _var0; -} -void out_half2_vh2(Uniforms _uniforms, thread half2& v); -void _skOutParamHelper1_out_half2_vh2(Uniforms _uniforms, thread half2& h2) { - half2 _var0; - out_half2_vh2(_uniforms, _var0); - h2 = _var0; -} -void out_half3_vh3(Uniforms _uniforms, thread half3& v); -void _skOutParamHelper2_out_half3_vh3(Uniforms _uniforms, thread half3& h3) { - half3 _var0; - out_half3_vh3(_uniforms, _var0); - h3 = _var0; -} -void out_half4_vh4(Uniforms _uniforms, thread half4& v); -void _skOutParamHelper3_out_half4_vh4(Uniforms _uniforms, thread half4& h4) { - half4 _var0; - out_half4_vh4(_uniforms, _var0); - h4 = _var0; -} -void out_half_vh(Uniforms _uniforms, thread half& v); -void _skOutParamHelper4_out_half_vh(Uniforms _uniforms, thread half3& h3) { - half _var0; - out_half_vh(_uniforms, _var0); - h3.y = _var0; -} -void out_half2_vh2(Uniforms _uniforms, thread half2& v); -void _skOutParamHelper5_out_half2_vh2(Uniforms _uniforms, thread half3& h3) { - half2 _var0; - out_half2_vh2(_uniforms, _var0); - h3.xz = _var0; -} -void out_half4_vh4(Uniforms _uniforms, thread half4& v); -void _skOutParamHelper6_out_half4_vh4(Uniforms _uniforms, thread half4& h4) { - half4 _var0; - out_half4_vh4(_uniforms, _var0); - h4.zwxy = _var0; -} -void out_half2x2_vh22(Uniforms _uniforms, thread half2x2& v); -void _skOutParamHelper7_out_half2x2_vh22(Uniforms _uniforms, thread half2x2& h2x2) { - half2x2 _var0; - out_half2x2_vh22(_uniforms, _var0); - h2x2 = _var0; -} -void out_half3x3_vh33(Uniforms _uniforms, thread half3x3& v); -void _skOutParamHelper8_out_half3x3_vh33(Uniforms _uniforms, thread half3x3& h3x3) { - half3x3 _var0; - out_half3x3_vh33(_uniforms, _var0); - h3x3 = _var0; -} -void out_half4x4_vh44(Uniforms _uniforms, thread half4x4& v); -void _skOutParamHelper9_out_half4x4_vh44(Uniforms _uniforms, thread half4x4& h4x4) { - half4x4 _var0; - out_half4x4_vh44(_uniforms, _var0); - h4x4 = _var0; -} -void out_half3_vh3(Uniforms _uniforms, thread half3& v); -void _skOutParamHelper10_out_half3_vh3(Uniforms _uniforms, thread half3x3& h3x3) { - half3 _var0; - out_half3_vh3(_uniforms, _var0); - h3x3[1] = _var0; -} -void out_half_vh(Uniforms _uniforms, thread half& v); -void _skOutParamHelper11_out_half_vh(Uniforms _uniforms, thread half4x4& h4x4) { - half _var0; - out_half_vh(_uniforms, _var0); - h4x4[3].w = _var0; -} -void out_half_vh(Uniforms _uniforms, thread half& v); -void _skOutParamHelper12_out_half_vh(Uniforms _uniforms, thread half2x2& h2x2) { - half _var0; - out_half_vh(_uniforms, _var0); - h2x2[0].x = _var0; -} -void out_int_vi(Uniforms _uniforms, thread int& v); -void _skOutParamHelper13_out_int_vi(Uniforms _uniforms, thread int& i) { - int _var0; - out_int_vi(_uniforms, _var0); - i = _var0; -} -void out_int2_vi2(Uniforms _uniforms, thread int2& v); -void _skOutParamHelper14_out_int2_vi2(Uniforms _uniforms, thread int2& i2) { - int2 _var0; - out_int2_vi2(_uniforms, _var0); - i2 = _var0; -} -void out_int3_vi3(Uniforms _uniforms, thread int3& v); -void _skOutParamHelper15_out_int3_vi3(Uniforms _uniforms, thread int3& i3) { - int3 _var0; - out_int3_vi3(_uniforms, _var0); - i3 = _var0; -} -void out_int4_vi4(Uniforms _uniforms, thread int4& v); -void _skOutParamHelper16_out_int4_vi4(Uniforms _uniforms, thread int4& i4) { - int4 _var0; - out_int4_vi4(_uniforms, _var0); - i4 = _var0; -} -void out_int3_vi3(Uniforms _uniforms, thread int3& v); -void _skOutParamHelper17_out_int3_vi3(Uniforms _uniforms, thread int4& i4) { - int3 _var0; - out_int3_vi3(_uniforms, _var0); - i4.xyz = _var0; -} -void out_int_vi(Uniforms _uniforms, thread int& v); -void _skOutParamHelper18_out_int_vi(Uniforms _uniforms, thread int2& i2) { - int _var0; - out_int_vi(_uniforms, _var0); - i2.y = _var0; -} -void out_float_vf(Uniforms _uniforms, thread float& v); -void _skOutParamHelper19_out_float_vf(Uniforms _uniforms, thread float& f) { - float _var0; - out_float_vf(_uniforms, _var0); - f = _var0; -} -void out_float2_vf2(Uniforms _uniforms, thread float2& v); -void _skOutParamHelper20_out_float2_vf2(Uniforms _uniforms, thread float2& f2) { - float2 _var0; - out_float2_vf2(_uniforms, _var0); - f2 = _var0; -} -void out_float3_vf3(Uniforms _uniforms, thread float3& v); -void _skOutParamHelper21_out_float3_vf3(Uniforms _uniforms, thread float3& f3) { - float3 _var0; - out_float3_vf3(_uniforms, _var0); - f3 = _var0; -} -void out_float4_vf4(Uniforms _uniforms, thread float4& v); -void _skOutParamHelper22_out_float4_vf4(Uniforms _uniforms, thread float4& f4) { - float4 _var0; - out_float4_vf4(_uniforms, _var0); - f4 = _var0; -} -void out_float2_vf2(Uniforms _uniforms, thread float2& v); -void _skOutParamHelper23_out_float2_vf2(Uniforms _uniforms, thread float3& f3) { - float2 _var0; - out_float2_vf2(_uniforms, _var0); - f3.xy = _var0; -} -void out_float_vf(Uniforms _uniforms, thread float& v); -void _skOutParamHelper24_out_float_vf(Uniforms _uniforms, thread float2& f2) { - float _var0; - out_float_vf(_uniforms, _var0); - f2.x = _var0; -} -void out_float2x2_vf22(Uniforms _uniforms, thread float2x2& v); -void _skOutParamHelper25_out_float2x2_vf22(Uniforms _uniforms, thread float2x2& f2x2) { - float2x2 _var0; - out_float2x2_vf22(_uniforms, _var0); - f2x2 = _var0; -} -void out_float3x3_vf33(Uniforms _uniforms, thread float3x3& v); -void _skOutParamHelper26_out_float3x3_vf33(Uniforms _uniforms, thread float3x3& f3x3) { - float3x3 _var0; - out_float3x3_vf33(_uniforms, _var0); - f3x3 = _var0; -} -void out_float4x4_vf44(Uniforms _uniforms, thread float4x4& v); -void _skOutParamHelper27_out_float4x4_vf44(Uniforms _uniforms, thread float4x4& f4x4) { - float4x4 _var0; - out_float4x4_vf44(_uniforms, _var0); - f4x4 = _var0; -} -void out_float_vf(Uniforms _uniforms, thread float& v); -void _skOutParamHelper28_out_float_vf(Uniforms _uniforms, thread float2x2& f2x2) { - float _var0; - out_float_vf(_uniforms, _var0); - f2x2[0].x = _var0; -} -void out_bool_vb(Uniforms _uniforms, thread bool& v); -void _skOutParamHelper29_out_bool_vb(Uniforms _uniforms, thread bool& b) { - bool _var0; - out_bool_vb(_uniforms, _var0); - b = _var0; -} -void out_bool2_vb2(Uniforms _uniforms, thread bool2& v); -void _skOutParamHelper30_out_bool2_vb2(Uniforms _uniforms, thread bool2& b2) { - bool2 _var0; - out_bool2_vb2(_uniforms, _var0); - b2 = _var0; -} -void out_bool3_vb3(Uniforms _uniforms, thread bool3& v); -void _skOutParamHelper31_out_bool3_vb3(Uniforms _uniforms, thread bool3& b3) { - bool3 _var0; - out_bool3_vb3(_uniforms, _var0); - b3 = _var0; -} -void out_bool4_vb4(Uniforms _uniforms, thread bool4& v); -void _skOutParamHelper32_out_bool4_vb4(Uniforms _uniforms, thread bool4& b4) { - bool4 _var0; - out_bool4_vb4(_uniforms, _var0); - b4 = _var0; -} -void out_bool2_vb2(Uniforms _uniforms, thread bool2& v); -void _skOutParamHelper33_out_bool2_vb2(Uniforms _uniforms, thread bool4& b4) { - bool2 _var0; - out_bool2_vb2(_uniforms, _var0); - b4.xw = _var0; -} -void out_bool_vb(Uniforms _uniforms, thread bool& v); -void _skOutParamHelper34_out_bool_vb(Uniforms _uniforms, thread bool3& b3) { - bool _var0; - out_bool_vb(_uniforms, _var0); - b3.z = _var0; -} void out_half_vh(Uniforms _uniforms, thread half& v) { v = _uniforms.colorWhite.x; } @@ -290,63 +80,98 @@ void out_bool4_vb4(Uniforms _uniforms, thread bool4& v) { fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) { Outputs _out; (void)_out; + half _skTemp0; + half2 _skTemp1; + half3 _skTemp2; + half4 _skTemp3; + half _skTemp4; + half2 _skTemp5; + half4 _skTemp6; + half2x2 _skTemp7; + half3x3 _skTemp8; + half4x4 _skTemp9; + half3 _skTemp10; + half _skTemp11; + half _skTemp12; + int _skTemp13; + int2 _skTemp14; + int3 _skTemp15; + int4 _skTemp16; + int3 _skTemp17; + int _skTemp18; + float _skTemp19; + float2 _skTemp20; + float3 _skTemp21; + float4 _skTemp22; + float2 _skTemp23; + float _skTemp24; + float2x2 _skTemp25; + float3x3 _skTemp26; + float4x4 _skTemp27; + float _skTemp28; + bool _skTemp29; + bool2 _skTemp30; + bool3 _skTemp31; + bool4 _skTemp32; + bool2 _skTemp33; + bool _skTemp34; half h; - _skOutParamHelper0_out_half_vh(_uniforms, h); + ((out_half_vh(_uniforms, _skTemp0)), (h = _skTemp0)); half2 h2; - _skOutParamHelper1_out_half2_vh2(_uniforms, h2); + ((out_half2_vh2(_uniforms, _skTemp1)), (h2 = _skTemp1)); half3 h3; - _skOutParamHelper2_out_half3_vh3(_uniforms, h3); + ((out_half3_vh3(_uniforms, _skTemp2)), (h3 = _skTemp2)); half4 h4; - _skOutParamHelper3_out_half4_vh4(_uniforms, h4); - _skOutParamHelper4_out_half_vh(_uniforms, h3); - _skOutParamHelper5_out_half2_vh2(_uniforms, h3); - _skOutParamHelper6_out_half4_vh4(_uniforms, h4); + ((out_half4_vh4(_uniforms, _skTemp3)), (h4 = _skTemp3)); + ((out_half_vh(_uniforms, _skTemp4)), (h3.y = _skTemp4)); + ((out_half2_vh2(_uniforms, _skTemp5)), (h3.xz = _skTemp5)); + ((out_half4_vh4(_uniforms, _skTemp6)), (h4.zwxy = _skTemp6)); half2x2 h2x2; - _skOutParamHelper7_out_half2x2_vh22(_uniforms, h2x2); + ((out_half2x2_vh22(_uniforms, _skTemp7)), (h2x2 = _skTemp7)); half3x3 h3x3; - _skOutParamHelper8_out_half3x3_vh33(_uniforms, h3x3); + ((out_half3x3_vh33(_uniforms, _skTemp8)), (h3x3 = _skTemp8)); half4x4 h4x4; - _skOutParamHelper9_out_half4x4_vh44(_uniforms, h4x4); - _skOutParamHelper10_out_half3_vh3(_uniforms, h3x3); - _skOutParamHelper11_out_half_vh(_uniforms, h4x4); - _skOutParamHelper12_out_half_vh(_uniforms, h2x2); + ((out_half4x4_vh44(_uniforms, _skTemp9)), (h4x4 = _skTemp9)); + ((out_half3_vh3(_uniforms, _skTemp10)), (h3x3[1] = _skTemp10)); + ((out_half_vh(_uniforms, _skTemp11)), (h4x4[3].w = _skTemp11)); + ((out_half_vh(_uniforms, _skTemp12)), (h2x2[0].x = _skTemp12)); int i; - _skOutParamHelper13_out_int_vi(_uniforms, i); + ((out_int_vi(_uniforms, _skTemp13)), (i = _skTemp13)); int2 i2; - _skOutParamHelper14_out_int2_vi2(_uniforms, i2); + ((out_int2_vi2(_uniforms, _skTemp14)), (i2 = _skTemp14)); int3 i3; - _skOutParamHelper15_out_int3_vi3(_uniforms, i3); + ((out_int3_vi3(_uniforms, _skTemp15)), (i3 = _skTemp15)); int4 i4; - _skOutParamHelper16_out_int4_vi4(_uniforms, i4); - _skOutParamHelper17_out_int3_vi3(_uniforms, i4); - _skOutParamHelper18_out_int_vi(_uniforms, i2); + ((out_int4_vi4(_uniforms, _skTemp16)), (i4 = _skTemp16)); + ((out_int3_vi3(_uniforms, _skTemp17)), (i4.xyz = _skTemp17)); + ((out_int_vi(_uniforms, _skTemp18)), (i2.y = _skTemp18)); float f; - _skOutParamHelper19_out_float_vf(_uniforms, f); + ((out_float_vf(_uniforms, _skTemp19)), (f = _skTemp19)); float2 f2; - _skOutParamHelper20_out_float2_vf2(_uniforms, f2); + ((out_float2_vf2(_uniforms, _skTemp20)), (f2 = _skTemp20)); float3 f3; - _skOutParamHelper21_out_float3_vf3(_uniforms, f3); + ((out_float3_vf3(_uniforms, _skTemp21)), (f3 = _skTemp21)); float4 f4; - _skOutParamHelper22_out_float4_vf4(_uniforms, f4); - _skOutParamHelper23_out_float2_vf2(_uniforms, f3); - _skOutParamHelper24_out_float_vf(_uniforms, f2); + ((out_float4_vf4(_uniforms, _skTemp22)), (f4 = _skTemp22)); + ((out_float2_vf2(_uniforms, _skTemp23)), (f3.xy = _skTemp23)); + ((out_float_vf(_uniforms, _skTemp24)), (f2.x = _skTemp24)); float2x2 f2x2; - _skOutParamHelper25_out_float2x2_vf22(_uniforms, f2x2); + ((out_float2x2_vf22(_uniforms, _skTemp25)), (f2x2 = _skTemp25)); float3x3 f3x3; - _skOutParamHelper26_out_float3x3_vf33(_uniforms, f3x3); + ((out_float3x3_vf33(_uniforms, _skTemp26)), (f3x3 = _skTemp26)); float4x4 f4x4; - _skOutParamHelper27_out_float4x4_vf44(_uniforms, f4x4); - _skOutParamHelper28_out_float_vf(_uniforms, f2x2); + ((out_float4x4_vf44(_uniforms, _skTemp27)), (f4x4 = _skTemp27)); + ((out_float_vf(_uniforms, _skTemp28)), (f2x2[0].x = _skTemp28)); bool b; - _skOutParamHelper29_out_bool_vb(_uniforms, b); + ((out_bool_vb(_uniforms, _skTemp29)), (b = _skTemp29)); bool2 b2; - _skOutParamHelper30_out_bool2_vb2(_uniforms, b2); + ((out_bool2_vb2(_uniforms, _skTemp30)), (b2 = _skTemp30)); bool3 b3; - _skOutParamHelper31_out_bool3_vb3(_uniforms, b3); + ((out_bool3_vb3(_uniforms, _skTemp31)), (b3 = _skTemp31)); bool4 b4; - _skOutParamHelper32_out_bool4_vb4(_uniforms, b4); - _skOutParamHelper33_out_bool2_vb2(_uniforms, b4); - _skOutParamHelper34_out_bool_vb(_uniforms, b3); + ((out_bool4_vb4(_uniforms, _skTemp32)), (b4 = _skTemp32)); + ((out_bool2_vb2(_uniforms, _skTemp33)), (b4.xw = _skTemp33)); + ((out_bool_vb(_uniforms, _skTemp34)), (b3.z = _skTemp34)); bool ok = true; ok = ok && 1.0h == (((((h * h2.x) * h3.x) * h4.x) * h2x2[0].x) * h3x3[0].x) * h4x4[0].x; ok = ok && 1.0 == (((((f * f2.x) * f3.x) * f4.x) * f2x2[0].x) * f3x3[0].x) * f4x4[0].x; diff --git a/tests/sksl/shared/OutParams.skrp b/tests/sksl/shared/OutParams.skrp index 43db0ced652f..a0d8fab237e7 100644 --- a/tests/sksl/shared/OutParams.skrp +++ b/tests/sksl/shared/OutParams.skrp @@ -1,3 +1,5 @@ +252 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_constant h = 0 diff --git a/tests/sksl/shared/OutParams.wgsl b/tests/sksl/shared/OutParams.wgsl index 90d1c6798a80..0fd946477fae 100644 --- a/tests/sksl/shared/OutParams.wgsl +++ b/tests/sksl/shared/OutParams.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -280,9 +281,9 @@ fn main(_skParam0: vec2) -> vec4 { out_bool_vb(&_skTemp40); b3.z = _skTemp40; var ok: bool = true; - ok = ok && 1.0 == (((((h * h2.x) * h3.x) * h4.x) * h2x2[0].x) * h3x3[0].x) * h4x4[0].x; - ok = ok && 1.0 == (((((f * f2.x) * f3.x) * f4.x) * f2x2[0].x) * f3x3[0].x) * f4x4[0].x; - ok = ok && 1 == ((i * i2.x) * i3.x) * i4.x; + ok = ok && (1.0 == ((((((h * h2.x) * h3.x) * h4.x) * h2x2[0].x) * h3x3[0].x) * h4x4[0].x)); + ok = ok && (1.0 == ((((((f * f2.x) * f3.x) * f4.x) * f2x2[0].x) * f3x3[0].x) * f4x4[0].x)); + ok = ok && (1 == (((i * i2.x) * i3.x) * i4.x)); ok = ok && (((b && b2.x) && b3.x) && b4.x); return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(ok)); } diff --git a/tests/sksl/shared/OutParamsAreDistinct.asm.frag b/tests/sksl/shared/OutParamsAreDistinct.asm.frag index 4f08f567709a..16aa6db2cbda 100644 --- a/tests/sksl/shared/OutParamsAreDistinct.asm.frag +++ b/tests/sksl/shared/OutParamsAreDistinct.asm.frag @@ -1,112 +1,112 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %out_params_are_distinct_bhh "out_params_are_distinct_bhh" -OpName %main "main" -OpName %x "x" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %11 Binding 0 -OpDecorate %11 DescriptorSet 0 -OpDecorate %x RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %58 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %out_params_are_distinct_bhh "out_params_are_distinct_bhh" + OpName %main "main" + OpName %x "x" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %11 Binding 0 + OpDecorate %11 DescriptorSet 0 + OpDecorate %x RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %58 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%16 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%20 = OpConstantComposite %v2float %float_0 %float_0 + %11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %16 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %20 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float %_ptr_Function_float = OpTypePointer Function %float -%25 = OpTypeFunction %bool %_ptr_Function_float %_ptr_Function_float -%float_1 = OpConstant %float 1 -%float_2 = OpConstant %float 2 -%false = OpConstantFalse %bool -%true = OpConstantTrue %bool -%36 = OpTypeFunction %v4float %_ptr_Function_v2float + %25 = OpTypeFunction %bool %_ptr_Function_float %_ptr_Function_float + %float_1 = OpConstant %float 1 + %float_2 = OpConstant %float 2 + %false = OpConstantFalse %bool + %true = OpConstantTrue %bool + %36 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 %_entrypoint_v = OpFunction %void None %16 -%17 = OpLabel -%21 = OpVariable %_ptr_Function_v2float Function -OpStore %21 %20 -%23 = OpFunctionCall %v4float %main %21 -OpStore %sk_FragColor %23 -OpReturn -OpFunctionEnd + %17 = OpLabel + %21 = OpVariable %_ptr_Function_v2float Function + OpStore %21 %20 + %23 = OpFunctionCall %v4float %main %21 + OpStore %sk_FragColor %23 + OpReturn + OpFunctionEnd %out_params_are_distinct_bhh = OpFunction %bool None %25 -%26 = OpFunctionParameter %_ptr_Function_float -%27 = OpFunctionParameter %_ptr_Function_float -%28 = OpLabel -OpStore %26 %float_1 -OpStore %27 %float_2 -OpSelectionMerge %34 None -OpBranchConditional %true %33 %34 -%33 = OpLabel -OpBranch %34 -%34 = OpLabel -%35 = OpPhi %bool %false %28 %true %33 -OpReturnValue %35 -OpFunctionEnd -%main = OpFunction %v4float None %36 -%37 = OpFunctionParameter %_ptr_Function_v2float -%38 = OpLabel -%x = OpVariable %_ptr_Function_float Function -%40 = OpVariable %_ptr_Function_float Function -%41 = OpVariable %_ptr_Function_float Function -%45 = OpVariable %_ptr_Function_v4float Function -OpStore %x %float_0 -%42 = OpFunctionCall %bool %out_params_are_distinct_bhh %40 %41 -%43 = OpLoad %float %40 -OpStore %x %43 -%44 = OpLoad %float %41 -OpStore %x %44 -OpSelectionMerge %49 None -OpBranchConditional %42 %47 %48 -%47 = OpLabel -%50 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 -%54 = OpLoad %v4float %50 -OpStore %45 %54 -OpBranch %49 -%48 = OpLabel -%55 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 -%57 = OpLoad %v4float %55 -OpStore %45 %57 -OpBranch %49 -%49 = OpLabel -%58 = OpLoad %v4float %45 -OpReturnValue %58 -OpFunctionEnd + %26 = OpFunctionParameter %_ptr_Function_float + %27 = OpFunctionParameter %_ptr_Function_float + %28 = OpLabel + OpStore %26 %float_1 + OpStore %27 %float_2 + OpSelectionMerge %34 None + OpBranchConditional %true %33 %34 + %33 = OpLabel + OpBranch %34 + %34 = OpLabel + %35 = OpPhi %bool %false %28 %true %33 + OpReturnValue %35 + OpFunctionEnd + %main = OpFunction %v4float None %36 + %37 = OpFunctionParameter %_ptr_Function_v2float + %38 = OpLabel + %x = OpVariable %_ptr_Function_float Function + %40 = OpVariable %_ptr_Function_float Function + %41 = OpVariable %_ptr_Function_float Function + %45 = OpVariable %_ptr_Function_v4float Function + OpStore %x %float_0 + %42 = OpFunctionCall %bool %out_params_are_distinct_bhh %40 %41 + %43 = OpLoad %float %40 + OpStore %x %43 + %44 = OpLoad %float %41 + OpStore %x %44 + OpSelectionMerge %49 None + OpBranchConditional %42 %47 %48 + %47 = OpLabel + %50 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 + %54 = OpLoad %v4float %50 + OpStore %45 %54 + OpBranch %49 + %48 = OpLabel + %55 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 + %57 = OpLoad %v4float %55 + OpStore %45 %57 + OpBranch %49 + %49 = OpLabel + %58 = OpLoad %v4float %45 + OpReturnValue %58 + OpFunctionEnd diff --git a/tests/sksl/shared/OutParamsAreDistinct.metal b/tests/sksl/shared/OutParamsAreDistinct.metal index ae4561ab484b..0d0efe08f5fe 100644 --- a/tests/sksl/shared/OutParamsAreDistinct.metal +++ b/tests/sksl/shared/OutParamsAreDistinct.metal @@ -10,15 +10,6 @@ struct Inputs { struct Outputs { half4 sk_FragColor [[color(0)]]; }; -bool out_params_are_distinct_bhh(thread half& x, thread half& y); -bool _skOutParamHelper0_out_params_are_distinct_bhh(thread half& x, thread half&) { - half _var0; - half _var1; - bool _skResult = out_params_are_distinct_bhh(_var0, _var1); - x = _var0; - x = _var1; - return _skResult; -} bool out_params_are_distinct_bhh(thread half& x, thread half& y) { x = 1.0h; y = 2.0h; @@ -27,7 +18,10 @@ bool out_params_are_distinct_bhh(thread half& x, thread half& y) { fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) { Outputs _out; (void)_out; + half _skTemp0; + half _skTemp1; + bool _skTemp2; half x = 0.0h; - _out.sk_FragColor = _skOutParamHelper0_out_params_are_distinct_bhh(x, x) ? _uniforms.colorGreen : _uniforms.colorRed; + _out.sk_FragColor = ((_skTemp2 = out_params_are_distinct_bhh(_skTemp0, _skTemp1)), (x = _skTemp0), (x = _skTemp1), _skTemp2) ? _uniforms.colorGreen : _uniforms.colorRed; return _out; } diff --git a/tests/sksl/shared/OutParamsAreDistinct.skrp b/tests/sksl/shared/OutParamsAreDistinct.skrp index b0ca7482b8fe..f4afbae469a7 100644 --- a/tests/sksl/shared/OutParamsAreDistinct.skrp +++ b/tests/sksl/shared/OutParamsAreDistinct.skrp @@ -1,3 +1,5 @@ +17 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_constant x = 0 diff --git a/tests/sksl/shared/OutParamsAreDistinct.wgsl b/tests/sksl/shared/OutParamsAreDistinct.wgsl index 6c2baeec2977..1e62d64cf675 100644 --- a/tests/sksl/shared/OutParamsAreDistinct.wgsl +++ b/tests/sksl/shared/OutParamsAreDistinct.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -16,7 +17,7 @@ fn out_params_are_distinct_bhh(_skParam0: ptr, _skParam1: ptr) -> vec4 { diff --git a/tests/sksl/shared/OutParamsAreDistinctFromGlobal.asm.frag b/tests/sksl/shared/OutParamsAreDistinctFromGlobal.asm.frag index 7d15ee92f69f..2c9cf066b5b2 100644 --- a/tests/sksl/shared/OutParamsAreDistinctFromGlobal.asm.frag +++ b/tests/sksl/shared/OutParamsAreDistinctFromGlobal.asm.frag @@ -1,109 +1,109 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %x "x" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %out_params_are_distinct_from_global_bh "out_params_are_distinct_from_global_bh" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %x RelaxedPrecision -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %14 Binding 0 -OpDecorate %14 DescriptorSet 0 -OpDecorate %33 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %58 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %x "x" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %out_params_are_distinct_from_global_bh "out_params_are_distinct_from_global_bh" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %x RelaxedPrecision + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %14 Binding 0 + OpDecorate %14 DescriptorSet 0 + OpDecorate %33 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %58 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_ptr_Private_float = OpTypePointer Private %float -%x = OpVariable %_ptr_Private_float Private -%float_1 = OpConstant %float 1 + %x = OpVariable %_ptr_Private_float Private + %float_1 = OpConstant %float 1 %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%14 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%19 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%23 = OpConstantComposite %v2float %float_0 %float_0 + %14 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %19 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %23 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float %_ptr_Function_float = OpTypePointer Function %float -%28 = OpTypeFunction %bool %_ptr_Function_float -%float_2 = OpConstant %float 2 -%false = OpConstantFalse %bool -%true = OpConstantTrue %bool -%39 = OpTypeFunction %v4float %_ptr_Function_v2float + %28 = OpTypeFunction %bool %_ptr_Function_float + %float_2 = OpConstant %float 2 + %false = OpConstantFalse %bool + %true = OpConstantTrue %bool + %39 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 %_entrypoint_v = OpFunction %void None %19 -%20 = OpLabel -%24 = OpVariable %_ptr_Function_v2float Function -OpStore %24 %23 -%26 = OpFunctionCall %v4float %main %24 -OpStore %sk_FragColor %26 -OpReturn -OpFunctionEnd + %20 = OpLabel + %24 = OpVariable %_ptr_Function_v2float Function + OpStore %24 %23 + %26 = OpFunctionCall %v4float %main %24 + OpStore %sk_FragColor %26 + OpReturn + OpFunctionEnd %out_params_are_distinct_from_global_bh = OpFunction %bool None %28 -%29 = OpFunctionParameter %_ptr_Function_float -%30 = OpLabel -OpStore %29 %float_2 -%33 = OpLoad %float %x -%34 = OpFOrdEqual %bool %33 %float_1 -OpSelectionMerge %36 None -OpBranchConditional %34 %35 %36 -%35 = OpLabel -OpBranch %36 -%36 = OpLabel -%38 = OpPhi %bool %false %30 %true %35 -OpReturnValue %38 -OpFunctionEnd -%main = OpFunction %v4float None %39 -%40 = OpFunctionParameter %_ptr_Function_v2float -%41 = OpLabel -%42 = OpVariable %_ptr_Function_float Function -%45 = OpVariable %_ptr_Function_v4float Function -OpStore %x %float_1 -%43 = OpFunctionCall %bool %out_params_are_distinct_from_global_bh %42 -%44 = OpLoad %float %42 -OpStore %x %44 -OpSelectionMerge %49 None -OpBranchConditional %43 %47 %48 -%47 = OpLabel -%50 = OpAccessChain %_ptr_Uniform_v4float %14 %int_0 -%54 = OpLoad %v4float %50 -OpStore %45 %54 -OpBranch %49 -%48 = OpLabel -%55 = OpAccessChain %_ptr_Uniform_v4float %14 %int_1 -%57 = OpLoad %v4float %55 -OpStore %45 %57 -OpBranch %49 -%49 = OpLabel -%58 = OpLoad %v4float %45 -OpReturnValue %58 -OpFunctionEnd + %29 = OpFunctionParameter %_ptr_Function_float + %30 = OpLabel + OpStore %29 %float_2 + %33 = OpLoad %float %x + %34 = OpFOrdEqual %bool %33 %float_1 + OpSelectionMerge %36 None + OpBranchConditional %34 %35 %36 + %35 = OpLabel + OpBranch %36 + %36 = OpLabel + %38 = OpPhi %bool %false %30 %true %35 + OpReturnValue %38 + OpFunctionEnd + %main = OpFunction %v4float None %39 + %40 = OpFunctionParameter %_ptr_Function_v2float + %41 = OpLabel + %42 = OpVariable %_ptr_Function_float Function + %45 = OpVariable %_ptr_Function_v4float Function + OpStore %x %float_1 + %43 = OpFunctionCall %bool %out_params_are_distinct_from_global_bh %42 + %44 = OpLoad %float %42 + OpStore %x %44 + OpSelectionMerge %49 None + OpBranchConditional %43 %47 %48 + %47 = OpLabel + %50 = OpAccessChain %_ptr_Uniform_v4float %14 %int_0 + %54 = OpLoad %v4float %50 + OpStore %45 %54 + OpBranch %49 + %48 = OpLabel + %55 = OpAccessChain %_ptr_Uniform_v4float %14 %int_1 + %57 = OpLoad %v4float %55 + OpStore %45 %57 + OpBranch %49 + %49 = OpLabel + %58 = OpLoad %v4float %45 + OpReturnValue %58 + OpFunctionEnd diff --git a/tests/sksl/shared/OutParamsAreDistinctFromGlobal.metal b/tests/sksl/shared/OutParamsAreDistinctFromGlobal.metal index 373f087bd038..08ebd2fcbba9 100644 --- a/tests/sksl/shared/OutParamsAreDistinctFromGlobal.metal +++ b/tests/sksl/shared/OutParamsAreDistinctFromGlobal.metal @@ -13,13 +13,6 @@ struct Outputs { struct Globals { half x; }; -bool out_params_are_distinct_from_global_bh(thread Globals& _globals, thread half& y); -bool _skOutParamHelper0_out_params_are_distinct_from_global_bh(thread Globals& _globals, thread half& x) { - half _var0; - bool _skResult = out_params_are_distinct_from_global_bh(_globals, _var0); - x = _var0; - return _skResult; -} bool out_params_are_distinct_from_global_bh(thread Globals& _globals, thread half& y) { y = 2.0h; return _globals.x == 1.0h && y == 2.0h; @@ -29,6 +22,8 @@ fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _unifo (void)_globals; Outputs _out; (void)_out; - _out.sk_FragColor = _skOutParamHelper0_out_params_are_distinct_from_global_bh(_globals, _globals.x) ? _uniforms.colorGreen : _uniforms.colorRed; + half _skTemp0; + bool _skTemp1; + _out.sk_FragColor = ((_skTemp1 = out_params_are_distinct_from_global_bh(_globals, _skTemp0)), (_globals.x = _skTemp0), _skTemp1) ? _uniforms.colorGreen : _uniforms.colorRed; return _out; } diff --git a/tests/sksl/shared/OutParamsAreDistinctFromGlobal.skrp b/tests/sksl/shared/OutParamsAreDistinctFromGlobal.skrp index a4d3df46e83d..5c0641442644 100644 --- a/tests/sksl/shared/OutParamsAreDistinctFromGlobal.skrp +++ b/tests/sksl/shared/OutParamsAreDistinctFromGlobal.skrp @@ -1,3 +1,5 @@ +15 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_constant x = 0x3F800000 (1.0) diff --git a/tests/sksl/shared/OutParamsAreDistinctFromGlobal.wgsl b/tests/sksl/shared/OutParamsAreDistinctFromGlobal.wgsl index 43a5425647ee..8235f1dfaa86 100644 --- a/tests/sksl/shared/OutParamsAreDistinctFromGlobal.wgsl +++ b/tests/sksl/shared/OutParamsAreDistinctFromGlobal.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -15,7 +16,7 @@ fn out_params_are_distinct_from_global_bh(_skParam0: ptr) -> bool let y = _skParam0; { (*y) = 2.0; - return x == 1.0 && (*y) == 2.0; + return (x == 1.0) && ((*y) == 2.0); } } fn main(_skParam0: vec2) -> vec4 { diff --git a/tests/sksl/shared/OutParamsDoubleSwizzle.asm.frag b/tests/sksl/shared/OutParamsDoubleSwizzle.asm.frag index ba14670786a3..2ed23ca671d5 100644 --- a/tests/sksl/shared/OutParamsDoubleSwizzle.asm.frag +++ b/tests/sksl/shared/OutParamsDoubleSwizzle.asm.frag @@ -1,161 +1,161 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %swizzle_lvalue_h2hhh2h "swizzle_lvalue_h2hhh2h" -OpName %func_vh4 "func_vh4" -OpName %t "t" -OpName %main "main" -OpName %result "result" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %12 Binding 0 -OpDecorate %12 DescriptorSet 0 -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %34 RelaxedPrecision -OpDecorate %35 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %39 RelaxedPrecision -OpDecorate %t RelaxedPrecision -OpDecorate %49 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %51 RelaxedPrecision -OpDecorate %55 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %58 RelaxedPrecision -OpDecorate %59 RelaxedPrecision -OpDecorate %result RelaxedPrecision -OpDecorate %66 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %84 RelaxedPrecision -OpDecorate %85 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %swizzle_lvalue_h2hhh2h "swizzle_lvalue_h2hhh2h" + OpName %func_vh4 "func_vh4" + OpName %t "t" + OpName %main "main" + OpName %result "result" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %12 Binding 0 + OpDecorate %12 DescriptorSet 0 + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %34 RelaxedPrecision + OpDecorate %35 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %t RelaxedPrecision + OpDecorate %49 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %55 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %58 RelaxedPrecision + OpDecorate %59 RelaxedPrecision + OpDecorate %result RelaxedPrecision + OpDecorate %66 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %84 RelaxedPrecision + OpDecorate %85 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%12 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%17 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%21 = OpConstantComposite %v2float %float_0 %float_0 + %12 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %17 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %21 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float %_ptr_Function_float = OpTypePointer Function %float -%26 = OpTypeFunction %v2float %_ptr_Function_float %_ptr_Function_float %_ptr_Function_v2float %_ptr_Function_float + %26 = OpTypeFunction %v2float %_ptr_Function_float %_ptr_Function_float %_ptr_Function_v2float %_ptr_Function_float %_ptr_Function_v4float = OpTypePointer Function %v4float -%41 = OpTypeFunction %void %_ptr_Function_v4float -%float_1 = OpConstant %float 1 -%float_2 = OpConstant %float 2 -%float_5 = OpConstant %float 5 -%60 = OpTypeFunction %v4float %_ptr_Function_v2float -%float_3 = OpConstant %float 3 -%65 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3 -%69 = OpConstantComposite %v4float %float_2 %float_3 %float_0 %float_5 -%v4bool = OpTypeVector %bool 4 + %41 = OpTypeFunction %void %_ptr_Function_v4float + %float_1 = OpConstant %float 1 + %float_2 = OpConstant %float 2 + %float_5 = OpConstant %float 5 + %60 = OpTypeFunction %v4float %_ptr_Function_v2float + %float_3 = OpConstant %float 3 + %65 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3 + %69 = OpConstantComposite %v4float %float_2 %float_3 %float_0 %float_5 + %v4bool = OpTypeVector %bool 4 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 %_entrypoint_v = OpFunction %void None %17 -%18 = OpLabel -%22 = OpVariable %_ptr_Function_v2float Function -OpStore %22 %21 -%24 = OpFunctionCall %v4float %main %22 -OpStore %sk_FragColor %24 -OpReturn -OpFunctionEnd + %18 = OpLabel + %22 = OpVariable %_ptr_Function_v2float Function + OpStore %22 %21 + %24 = OpFunctionCall %v4float %main %22 + OpStore %sk_FragColor %24 + OpReturn + OpFunctionEnd %swizzle_lvalue_h2hhh2h = OpFunction %v2float None %26 -%27 = OpFunctionParameter %_ptr_Function_float -%28 = OpFunctionParameter %_ptr_Function_float -%29 = OpFunctionParameter %_ptr_Function_v2float -%30 = OpFunctionParameter %_ptr_Function_float -%31 = OpLabel -%32 = OpLoad %v2float %29 -%33 = OpLoad %v2float %29 -%34 = OpVectorShuffle %v2float %33 %32 3 2 -OpStore %29 %34 -%35 = OpLoad %float %27 -%36 = OpLoad %float %28 -%37 = OpFAdd %float %35 %36 -%38 = OpLoad %float %30 -%39 = OpCompositeConstruct %v2float %37 %38 -OpReturnValue %39 -OpFunctionEnd -%func_vh4 = OpFunction %void None %41 -%42 = OpFunctionParameter %_ptr_Function_v4float -%43 = OpLabel -%t = OpVariable %_ptr_Function_v2float Function -%46 = OpVariable %_ptr_Function_float Function -%48 = OpVariable %_ptr_Function_float Function -%51 = OpVariable %_ptr_Function_v2float Function -%53 = OpVariable %_ptr_Function_float Function -OpStore %46 %float_1 -OpStore %48 %float_2 -%49 = OpLoad %v4float %42 -%50 = OpVectorShuffle %v2float %49 %49 0 2 -OpStore %51 %50 -OpStore %53 %float_5 -%54 = OpFunctionCall %v2float %swizzle_lvalue_h2hhh2h %46 %48 %51 %53 -%55 = OpLoad %v2float %51 -%56 = OpLoad %v4float %42 -%57 = OpVectorShuffle %v4float %56 %55 4 1 5 3 -OpStore %42 %57 -OpStore %t %54 -%58 = OpLoad %v4float %42 -%59 = OpVectorShuffle %v4float %58 %54 0 4 2 5 -OpStore %42 %59 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %60 -%61 = OpFunctionParameter %_ptr_Function_v2float -%62 = OpLabel -%result = OpVariable %_ptr_Function_v4float Function -%66 = OpVariable %_ptr_Function_v4float Function -%73 = OpVariable %_ptr_Function_v4float Function -OpStore %result %65 -OpStore %66 %65 -%67 = OpFunctionCall %void %func_vh4 %66 -%68 = OpLoad %v4float %66 -OpStore %result %68 -%70 = OpFOrdEqual %v4bool %68 %69 -%72 = OpAll %bool %70 -OpSelectionMerge %76 None -OpBranchConditional %72 %74 %75 -%74 = OpLabel -%77 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 -%81 = OpLoad %v4float %77 -OpStore %73 %81 -OpBranch %76 -%75 = OpLabel -%82 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1 -%84 = OpLoad %v4float %82 -OpStore %73 %84 -OpBranch %76 -%76 = OpLabel -%85 = OpLoad %v4float %73 -OpReturnValue %85 -OpFunctionEnd + %27 = OpFunctionParameter %_ptr_Function_float + %28 = OpFunctionParameter %_ptr_Function_float + %29 = OpFunctionParameter %_ptr_Function_v2float + %30 = OpFunctionParameter %_ptr_Function_float + %31 = OpLabel + %32 = OpLoad %v2float %29 + %33 = OpLoad %v2float %29 + %34 = OpVectorShuffle %v2float %33 %32 3 2 + OpStore %29 %34 + %35 = OpLoad %float %27 + %36 = OpLoad %float %28 + %37 = OpFAdd %float %35 %36 + %38 = OpLoad %float %30 + %39 = OpCompositeConstruct %v2float %37 %38 + OpReturnValue %39 + OpFunctionEnd + %func_vh4 = OpFunction %void None %41 + %42 = OpFunctionParameter %_ptr_Function_v4float + %43 = OpLabel + %t = OpVariable %_ptr_Function_v2float Function + %46 = OpVariable %_ptr_Function_float Function + %48 = OpVariable %_ptr_Function_float Function + %51 = OpVariable %_ptr_Function_v2float Function + %53 = OpVariable %_ptr_Function_float Function + OpStore %46 %float_1 + OpStore %48 %float_2 + %49 = OpLoad %v4float %42 + %50 = OpVectorShuffle %v2float %49 %49 0 2 + OpStore %51 %50 + OpStore %53 %float_5 + %54 = OpFunctionCall %v2float %swizzle_lvalue_h2hhh2h %46 %48 %51 %53 + %55 = OpLoad %v2float %51 + %56 = OpLoad %v4float %42 + %57 = OpVectorShuffle %v4float %56 %55 4 1 5 3 + OpStore %42 %57 + OpStore %t %54 + %58 = OpLoad %v4float %42 + %59 = OpVectorShuffle %v4float %58 %54 0 4 2 5 + OpStore %42 %59 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %60 + %61 = OpFunctionParameter %_ptr_Function_v2float + %62 = OpLabel + %result = OpVariable %_ptr_Function_v4float Function + %66 = OpVariable %_ptr_Function_v4float Function + %73 = OpVariable %_ptr_Function_v4float Function + OpStore %result %65 + OpStore %66 %65 + %67 = OpFunctionCall %void %func_vh4 %66 + %68 = OpLoad %v4float %66 + OpStore %result %68 + %70 = OpFOrdEqual %v4bool %68 %69 + %72 = OpAll %bool %70 + OpSelectionMerge %76 None + OpBranchConditional %72 %74 %75 + %74 = OpLabel + %77 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 + %81 = OpLoad %v4float %77 + OpStore %73 %81 + OpBranch %76 + %75 = OpLabel + %82 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1 + %84 = OpLoad %v4float %82 + OpStore %73 %84 + OpBranch %76 + %76 = OpLabel + %85 = OpLoad %v4float %73 + OpReturnValue %85 + OpFunctionEnd diff --git a/tests/sksl/shared/OutParamsDoubleSwizzle.metal b/tests/sksl/shared/OutParamsDoubleSwizzle.metal index 34628da101ba..31b49057a7d3 100644 --- a/tests/sksl/shared/OutParamsDoubleSwizzle.metal +++ b/tests/sksl/shared/OutParamsDoubleSwizzle.metal @@ -10,32 +10,22 @@ struct Inputs { struct Outputs { half4 sk_FragColor [[color(0)]]; }; -half2 swizzle_lvalue_h2hhh2h(half x, half y, thread half2& color, half z); -half2 _skOutParamHelper0_swizzle_lvalue_h2hhh2h(half _var0, half _var1, thread half4& color, half _var3) { - half2 _var2 = color.xz; - half2 _skResult = swizzle_lvalue_h2hhh2h(_var0, _var1, _var2, _var3); - color.xz = _var2; - return _skResult; -} -void func_vh4(thread half4& color); -void _skOutParamHelper1_func_vh4(thread half4& result) { - half4 _var0 = result; - func_vh4(_var0); - result = _var0; -} half2 swizzle_lvalue_h2hhh2h(half x, half y, thread half2& color, half z) { color.yx = color; return half2(x + y, z); } void func_vh4(thread half4& color) { - half2 t = _skOutParamHelper0_swizzle_lvalue_h2hhh2h(1.0h, 2.0h, color, 5.0h); + half2 _skTemp0; + half2 _skTemp1; + half2 t = ((_skTemp1 = swizzle_lvalue_h2hhh2h(1.0h, 2.0h, (_skTemp0 = color.xz), 5.0h)), (color.xz = _skTemp0), _skTemp1); color.yw = t; } fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) { Outputs _out; (void)_out; + half4 _skTemp2; half4 result = half4(0.0h, 1.0h, 2.0h, 3.0h); - _skOutParamHelper1_func_vh4(result); + ((func_vh4((_skTemp2 = result))), (result = _skTemp2)); _out.sk_FragColor = all(result == half4(2.0h, 3.0h, 0.0h, 5.0h)) ? _uniforms.colorGreen : _uniforms.colorRed; return _out; } diff --git a/tests/sksl/shared/OutParamsDoubleSwizzle.skrp b/tests/sksl/shared/OutParamsDoubleSwizzle.skrp index 83a7ecb12426..4ce309495e1f 100644 --- a/tests/sksl/shared/OutParamsDoubleSwizzle.skrp +++ b/tests/sksl/shared/OutParamsDoubleSwizzle.skrp @@ -1,9 +1,18 @@ +30 instructions + +[immutable slots] +i0 = 0 +i1 = 0x3F800000 (1.0) +i2 = 0x40000000 (2.0) +i3 = 0x40400000 (3.0) +i4 = 0x40000000 (2.0) +i5 = 0x40400000 (3.0) +i6 = 0 +i7 = 0x40A00000 (5.0) + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true -copy_constant result(0) = 0 -copy_constant result(1) = 0x3F800000 (1.0) -copy_constant result(2) = 0x40000000 (2.0) -copy_constant result(3) = 0x40400000 (3.0) +copy_4_immutables_unmasked result = i0..3 [0, 0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0)] copy_4_slots_unmasked color = result copy_constant x = 0x3F800000 (1.0) copy_constant y = 0x40000000 (2.0) @@ -24,10 +33,7 @@ swizzle_copy_2_slots_masked (color).yw = Mask($0..1) copy_4_slots_unmasked result = color label label 0 copy_4_slots_unmasked $0..3 = result -copy_constant $4 = 0x40000000 (2.0) -copy_constant $5 = 0x40400000 (3.0) -copy_constant $6 = 0 -copy_constant $7 = 0x40A00000 (5.0) +copy_4_immutables_unmasked $4..7 = i4..7 [0x40000000 (2.0), 0x40400000 (3.0), 0, 0x40A00000 (5.0)] cmpeq_4_floats $0..3 = equal($0..3, $4..7) bitwise_and_2_ints $0..1 &= $2..3 bitwise_and_int $0 &= $1 diff --git a/tests/sksl/shared/OutParamsDoubleSwizzle.wgsl b/tests/sksl/shared/OutParamsDoubleSwizzle.wgsl index d8d1c33436d7..c873acb474c2 100644 --- a/tests/sksl/shared/OutParamsDoubleSwizzle.wgsl +++ b/tests/sksl/shared/OutParamsDoubleSwizzle.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, diff --git a/tests/sksl/shared/OutParamsFunctionCallInArgument.asm.frag b/tests/sksl/shared/OutParamsFunctionCallInArgument.asm.frag index 2ccd66254e1c..568c35eb0f9b 100644 --- a/tests/sksl/shared/OutParamsFunctionCallInArgument.asm.frag +++ b/tests/sksl/shared/OutParamsFunctionCallInArgument.asm.frag @@ -1,144 +1,144 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %out_param_func1_vh "out_param_func1_vh" -OpName %out_param_func2_ih "out_param_func2_ih" -OpName %main "main" -OpName %testArray "testArray" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %12 Binding 0 -OpDecorate %12 DescriptorSet 0 -OpDecorate %33 RelaxedPrecision -OpDecorate %34 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %testArray RelaxedPrecision -OpDecorate %_arr_float_int_2 ArrayStride 16 -OpDecorate %51 RelaxedPrecision -OpDecorate %53 RelaxedPrecision -OpDecorate %55 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %58 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %67 RelaxedPrecision -OpDecorate %76 RelaxedPrecision -OpDecorate %78 RelaxedPrecision -OpDecorate %79 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %out_param_func1_vh "out_param_func1_vh" + OpName %out_param_func2_ih "out_param_func2_ih" + OpName %main "main" + OpName %testArray "testArray" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %12 Binding 0 + OpDecorate %12 DescriptorSet 0 + OpDecorate %33 RelaxedPrecision + OpDecorate %34 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %testArray RelaxedPrecision + OpDecorate %_arr_float_int_2 ArrayStride 16 + OpDecorate %51 RelaxedPrecision + OpDecorate %53 RelaxedPrecision + OpDecorate %55 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %58 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %67 RelaxedPrecision + OpDecorate %76 RelaxedPrecision + OpDecorate %78 RelaxedPrecision + OpDecorate %79 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%12 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%17 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%21 = OpConstantComposite %v2float %float_0 %float_0 + %12 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %17 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %21 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float %_ptr_Function_float = OpTypePointer Function %float -%26 = OpTypeFunction %void %_ptr_Function_float + %26 = OpTypeFunction %void %_ptr_Function_float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%35 = OpTypeFunction %int %_ptr_Function_float -%int_1 = OpConstant %int 1 -%43 = OpTypeFunction %v4float %_ptr_Function_v2float -%int_2 = OpConstant %int 2 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %35 = OpTypeFunction %int %_ptr_Function_float + %int_1 = OpConstant %int 1 + %43 = OpTypeFunction %v4float %_ptr_Function_v2float + %int_2 = OpConstant %int 2 %_arr_float_int_2 = OpTypeArray %float %int_2 %_ptr_Function__arr_float_int_2 = OpTypePointer Function %_arr_float_int_2 -%false = OpConstantFalse %bool -%float_1 = OpConstant %float 1 + %false = OpConstantFalse %bool + %float_1 = OpConstant %float 1 %_ptr_Function_v4float = OpTypePointer Function %v4float %_entrypoint_v = OpFunction %void None %17 -%18 = OpLabel -%22 = OpVariable %_ptr_Function_v2float Function -OpStore %22 %21 -%24 = OpFunctionCall %v4float %main %22 -OpStore %sk_FragColor %24 -OpReturn -OpFunctionEnd + %18 = OpLabel + %22 = OpVariable %_ptr_Function_v2float Function + OpStore %22 %21 + %24 = OpFunctionCall %v4float %main %22 + OpStore %sk_FragColor %24 + OpReturn + OpFunctionEnd %out_param_func1_vh = OpFunction %void None %26 -%27 = OpFunctionParameter %_ptr_Function_float -%28 = OpLabel -%29 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 -%33 = OpLoad %v4float %29 -%34 = OpCompositeExtract %float %33 1 -OpStore %27 %34 -OpReturn -OpFunctionEnd + %27 = OpFunctionParameter %_ptr_Function_float + %28 = OpLabel + %29 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 + %33 = OpLoad %v4float %29 + %34 = OpCompositeExtract %float %33 1 + OpStore %27 %34 + OpReturn + OpFunctionEnd %out_param_func2_ih = OpFunction %int None %35 -%36 = OpFunctionParameter %_ptr_Function_float -%37 = OpLabel -%38 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1 -%40 = OpLoad %v4float %38 -%41 = OpCompositeExtract %float %40 0 -OpStore %36 %41 -%42 = OpConvertFToS %int %41 -OpReturnValue %42 -OpFunctionEnd -%main = OpFunction %v4float None %43 -%44 = OpFunctionParameter %_ptr_Function_v2float -%45 = OpLabel -%testArray = OpVariable %_ptr_Function__arr_float_int_2 Function -%51 = OpVariable %_ptr_Function_float Function -%56 = OpVariable %_ptr_Function_float Function -%70 = OpVariable %_ptr_Function_v4float Function -%50 = OpAccessChain %_ptr_Function_float %testArray %int_0 -%52 = OpFunctionCall %int %out_param_func2_ih %51 -%53 = OpLoad %float %51 -OpStore %50 %53 -%54 = OpAccessChain %_ptr_Function_float %testArray %52 -%55 = OpLoad %float %54 -OpStore %56 %55 -%57 = OpFunctionCall %void %out_param_func1_vh %56 -%58 = OpLoad %float %56 -OpStore %54 %58 -%60 = OpAccessChain %_ptr_Function_float %testArray %int_0 -%61 = OpLoad %float %60 -%63 = OpFOrdEqual %bool %61 %float_1 -OpSelectionMerge %65 None -OpBranchConditional %63 %64 %65 -%64 = OpLabel -%66 = OpAccessChain %_ptr_Function_float %testArray %int_1 -%67 = OpLoad %float %66 -%68 = OpFOrdEqual %bool %67 %float_1 -OpBranch %65 -%65 = OpLabel -%69 = OpPhi %bool %false %45 %68 %64 -OpSelectionMerge %74 None -OpBranchConditional %69 %72 %73 -%72 = OpLabel -%75 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 -%76 = OpLoad %v4float %75 -OpStore %70 %76 -OpBranch %74 -%73 = OpLabel -%77 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1 -%78 = OpLoad %v4float %77 -OpStore %70 %78 -OpBranch %74 -%74 = OpLabel -%79 = OpLoad %v4float %70 -OpReturnValue %79 -OpFunctionEnd + %36 = OpFunctionParameter %_ptr_Function_float + %37 = OpLabel + %38 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1 + %40 = OpLoad %v4float %38 + %41 = OpCompositeExtract %float %40 0 + OpStore %36 %41 + %42 = OpConvertFToS %int %41 + OpReturnValue %42 + OpFunctionEnd + %main = OpFunction %v4float None %43 + %44 = OpFunctionParameter %_ptr_Function_v2float + %45 = OpLabel + %testArray = OpVariable %_ptr_Function__arr_float_int_2 Function + %51 = OpVariable %_ptr_Function_float Function + %56 = OpVariable %_ptr_Function_float Function + %70 = OpVariable %_ptr_Function_v4float Function + %50 = OpAccessChain %_ptr_Function_float %testArray %int_0 + %52 = OpFunctionCall %int %out_param_func2_ih %51 + %53 = OpLoad %float %51 + OpStore %50 %53 + %54 = OpAccessChain %_ptr_Function_float %testArray %52 + %55 = OpLoad %float %54 + OpStore %56 %55 + %57 = OpFunctionCall %void %out_param_func1_vh %56 + %58 = OpLoad %float %56 + OpStore %54 %58 + %60 = OpAccessChain %_ptr_Function_float %testArray %int_0 + %61 = OpLoad %float %60 + %63 = OpFOrdEqual %bool %61 %float_1 + OpSelectionMerge %65 None + OpBranchConditional %63 %64 %65 + %64 = OpLabel + %66 = OpAccessChain %_ptr_Function_float %testArray %int_1 + %67 = OpLoad %float %66 + %68 = OpFOrdEqual %bool %67 %float_1 + OpBranch %65 + %65 = OpLabel + %69 = OpPhi %bool %false %45 %68 %64 + OpSelectionMerge %74 None + OpBranchConditional %69 %72 %73 + %72 = OpLabel + %75 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 + %76 = OpLoad %v4float %75 + OpStore %70 %76 + OpBranch %74 + %73 = OpLabel + %77 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1 + %78 = OpLoad %v4float %77 + OpStore %70 %78 + OpBranch %74 + %74 = OpLabel + %79 = OpLoad %v4float %70 + OpReturnValue %79 + OpFunctionEnd diff --git a/tests/sksl/shared/OutParamsFunctionCallInArgument.metal b/tests/sksl/shared/OutParamsFunctionCallInArgument.metal index 74b0e17d88e2..97df0a7c1f7a 100644 --- a/tests/sksl/shared/OutParamsFunctionCallInArgument.metal +++ b/tests/sksl/shared/OutParamsFunctionCallInArgument.metal @@ -10,26 +10,6 @@ struct Inputs { struct Outputs { half4 sk_FragColor [[color(0)]]; }; -int out_param_func2_ih(Uniforms _uniforms, thread half& v); -int _skOutParamHelper1_out_param_func2_ih(Uniforms _uniforms, thread array& testArray) { - half _var0; - int _skResult = out_param_func2_ih(_uniforms, _var0); - testArray[0] = _var0; - return _skResult; -} -int out_param_func2_ih(Uniforms _uniforms, thread half& v); -int _skOutParamHelper2_out_param_func2_ih(Uniforms _uniforms, thread array& testArray) { - half _var0; - int _skResult = out_param_func2_ih(_uniforms, _var0); - testArray[0] = _var0; - return _skResult; -} -void out_param_func1_vh(Uniforms _uniforms, thread half& v); -void _skOutParamHelper0_out_param_func1_vh(Uniforms _uniforms, thread array& testArray) { - half _var0 = testArray[ _skOutParamHelper1_out_param_func2_ih(_uniforms, testArray)]; - out_param_func1_vh(_uniforms, _var0); - testArray[ _skOutParamHelper2_out_param_func2_ih(_uniforms, testArray)] = _var0; -} void out_param_func1_vh(Uniforms _uniforms, thread half& v) { v = _uniforms.colorGreen.y; } @@ -40,8 +20,12 @@ int out_param_func2_ih(Uniforms _uniforms, thread half& v) { fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) { Outputs _out; (void)_out; + half _skTemp0; + int _skTemp1; + half _skTemp2; + int _skTemp3; array testArray; - _skOutParamHelper0_out_param_func1_vh(_uniforms, testArray); +(_skTemp1 = ((_skTemp3 = out_param_func2_ih(_uniforms, _skTemp2)), (testArray[0] = _skTemp2), _skTemp3), ((out_param_func1_vh(_uniforms, (_skTemp0 = testArray[_skTemp1]))), (testArray[_skTemp1] = _skTemp0))); _out.sk_FragColor = testArray[0] == 1.0h && testArray[1] == 1.0h ? _uniforms.colorGreen : _uniforms.colorRed; return _out; } diff --git a/tests/sksl/shared/OutParamsFunctionCallInArgument.skrp b/tests/sksl/shared/OutParamsFunctionCallInArgument.skrp index b73c5291d11b..400533525433 100644 --- a/tests/sksl/shared/OutParamsFunctionCallInArgument.skrp +++ b/tests/sksl/shared/OutParamsFunctionCallInArgument.skrp @@ -1,3 +1,5 @@ +22 instructions + store_src_rg c = src.rg init_lane_masks CondMask = LoopMask = RetMask = true splat_2_constants testArray[0], testArray[1] = 0 diff --git a/tests/sksl/shared/OutParamsFunctionCallInArgument.wgsl b/tests/sksl/shared/OutParamsFunctionCallInArgument.wgsl index 10cc871d636b..7e182257a1e9 100644 --- a/tests/sksl/shared/OutParamsFunctionCallInArgument.wgsl +++ b/tests/sksl/shared/OutParamsFunctionCallInArgument.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -34,7 +35,7 @@ fn main(_skParam0: vec2) -> vec4 { var _skTemp3: f32 = testArray[_skTemp2]; out_param_func1_vh(&_skTemp3); testArray[_skTemp2] = _skTemp3; - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(testArray[0] == 1.0 && testArray[1] == 1.0)); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((testArray[0] == 1.0) && (testArray[1] == 1.0))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/shared/Overflow.asm.frag b/tests/sksl/shared/Overflow.asm.frag index bce5ad9e702e..d4655c7fe9c6 100644 --- a/tests/sksl/shared/Overflow.asm.frag +++ b/tests/sksl/shared/Overflow.asm.frag @@ -1,374 +1,432 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %huge "huge" -OpName %hugeI "hugeI" -OpName %hugeU "hugeU" -OpName %hugeS "hugeS" -OpName %hugeUS "hugeUS" -OpName %hugeNI "hugeNI" -OpName %hugeNS "hugeNS" -OpName %hugeIvec "hugeIvec" -OpName %hugeUvec "hugeUvec" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %huge RelaxedPrecision -OpDecorate %hugeS RelaxedPrecision -OpDecorate %91 RelaxedPrecision -OpDecorate %92 RelaxedPrecision -OpDecorate %93 RelaxedPrecision -OpDecorate %94 RelaxedPrecision -OpDecorate %95 RelaxedPrecision -OpDecorate %96 RelaxedPrecision -OpDecorate %97 RelaxedPrecision -OpDecorate %98 RelaxedPrecision -OpDecorate %99 RelaxedPrecision -OpDecorate %100 RelaxedPrecision -OpDecorate %101 RelaxedPrecision -OpDecorate %102 RelaxedPrecision -OpDecorate %103 RelaxedPrecision -OpDecorate %104 RelaxedPrecision -OpDecorate %105 RelaxedPrecision -OpDecorate %106 RelaxedPrecision -OpDecorate %107 RelaxedPrecision -OpDecorate %hugeUS RelaxedPrecision -OpDecorate %110 RelaxedPrecision -OpDecorate %111 RelaxedPrecision -OpDecorate %112 RelaxedPrecision -OpDecorate %113 RelaxedPrecision -OpDecorate %114 RelaxedPrecision -OpDecorate %115 RelaxedPrecision -OpDecorate %116 RelaxedPrecision -OpDecorate %117 RelaxedPrecision -OpDecorate %118 RelaxedPrecision -OpDecorate %119 RelaxedPrecision -OpDecorate %120 RelaxedPrecision -OpDecorate %121 RelaxedPrecision -OpDecorate %122 RelaxedPrecision -OpDecorate %123 RelaxedPrecision -OpDecorate %124 RelaxedPrecision -OpDecorate %125 RelaxedPrecision -OpDecorate %hugeNS RelaxedPrecision -OpDecorate %149 RelaxedPrecision -OpDecorate %150 RelaxedPrecision -OpDecorate %151 RelaxedPrecision -OpDecorate %152 RelaxedPrecision -OpDecorate %153 RelaxedPrecision -OpDecorate %154 RelaxedPrecision -OpDecorate %155 RelaxedPrecision -OpDecorate %156 RelaxedPrecision -OpDecorate %157 RelaxedPrecision -OpDecorate %158 RelaxedPrecision -OpDecorate %159 RelaxedPrecision -OpDecorate %160 RelaxedPrecision -OpDecorate %161 RelaxedPrecision -OpDecorate %162 RelaxedPrecision -OpDecorate %163 RelaxedPrecision -OpDecorate %164 RelaxedPrecision -OpDecorate %207 RelaxedPrecision -OpDecorate %210 RelaxedPrecision -OpDecorate %212 RelaxedPrecision -OpDecorate %213 RelaxedPrecision -OpDecorate %215 RelaxedPrecision -OpDecorate %216 RelaxedPrecision -OpDecorate %218 RelaxedPrecision -OpDecorate %219 RelaxedPrecision -OpDecorate %221 RelaxedPrecision -OpDecorate %222 RelaxedPrecision -OpDecorate %224 RelaxedPrecision -OpDecorate %225 RelaxedPrecision -OpDecorate %227 RelaxedPrecision -OpDecorate %228 RelaxedPrecision -OpDecorate %231 RelaxedPrecision -OpDecorate %233 RelaxedPrecision -OpDecorate %235 RelaxedPrecision -OpDecorate %237 RelaxedPrecision -OpDecorate %238 RelaxedPrecision -OpDecorate %241 RelaxedPrecision -OpDecorate %244 RelaxedPrecision -OpDecorate %246 RelaxedPrecision -OpDecorate %248 RelaxedPrecision -OpDecorate %250 RelaxedPrecision -OpDecorate %251 RelaxedPrecision -OpDecorate %252 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %hugeH "hugeH" + OpName %hugeF "hugeF" + OpName %hugeI "hugeI" + OpName %hugeU "hugeU" + OpName %hugeS "hugeS" + OpName %hugeUS "hugeUS" + OpName %hugeNI "hugeNI" + OpName %hugeNS "hugeNS" + OpName %hugeIvec "hugeIvec" + OpName %hugeUvec "hugeUvec" + OpName %hugeMxM "hugeMxM" + OpName %hugeMxV "hugeMxV" + OpName %hugeVxM "hugeVxM" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %hugeH RelaxedPrecision + OpDecorate %30 RelaxedPrecision + OpDecorate %31 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %34 RelaxedPrecision + OpDecorate %35 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %hugeS RelaxedPrecision + OpDecorate %104 RelaxedPrecision + OpDecorate %105 RelaxedPrecision + OpDecorate %106 RelaxedPrecision + OpDecorate %107 RelaxedPrecision + OpDecorate %108 RelaxedPrecision + OpDecorate %109 RelaxedPrecision + OpDecorate %110 RelaxedPrecision + OpDecorate %111 RelaxedPrecision + OpDecorate %112 RelaxedPrecision + OpDecorate %113 RelaxedPrecision + OpDecorate %114 RelaxedPrecision + OpDecorate %115 RelaxedPrecision + OpDecorate %116 RelaxedPrecision + OpDecorate %117 RelaxedPrecision + OpDecorate %118 RelaxedPrecision + OpDecorate %119 RelaxedPrecision + OpDecorate %120 RelaxedPrecision + OpDecorate %hugeUS RelaxedPrecision + OpDecorate %123 RelaxedPrecision + OpDecorate %124 RelaxedPrecision + OpDecorate %125 RelaxedPrecision + OpDecorate %126 RelaxedPrecision + OpDecorate %127 RelaxedPrecision + OpDecorate %128 RelaxedPrecision + OpDecorate %129 RelaxedPrecision + OpDecorate %130 RelaxedPrecision + OpDecorate %131 RelaxedPrecision + OpDecorate %132 RelaxedPrecision + OpDecorate %133 RelaxedPrecision + OpDecorate %134 RelaxedPrecision + OpDecorate %135 RelaxedPrecision + OpDecorate %136 RelaxedPrecision + OpDecorate %137 RelaxedPrecision + OpDecorate %138 RelaxedPrecision + OpDecorate %hugeNS RelaxedPrecision + OpDecorate %162 RelaxedPrecision + OpDecorate %163 RelaxedPrecision + OpDecorate %164 RelaxedPrecision + OpDecorate %165 RelaxedPrecision + OpDecorate %166 RelaxedPrecision + OpDecorate %167 RelaxedPrecision + OpDecorate %168 RelaxedPrecision + OpDecorate %169 RelaxedPrecision + OpDecorate %170 RelaxedPrecision + OpDecorate %171 RelaxedPrecision + OpDecorate %172 RelaxedPrecision + OpDecorate %173 RelaxedPrecision + OpDecorate %174 RelaxedPrecision + OpDecorate %175 RelaxedPrecision + OpDecorate %176 RelaxedPrecision + OpDecorate %177 RelaxedPrecision + OpDecorate %232 RelaxedPrecision + OpDecorate %235 RelaxedPrecision + OpDecorate %237 RelaxedPrecision + OpDecorate %239 RelaxedPrecision + OpDecorate %240 RelaxedPrecision + OpDecorate %242 RelaxedPrecision + OpDecorate %243 RelaxedPrecision + OpDecorate %245 RelaxedPrecision + OpDecorate %246 RelaxedPrecision + OpDecorate %248 RelaxedPrecision + OpDecorate %249 RelaxedPrecision + OpDecorate %251 RelaxedPrecision + OpDecorate %252 RelaxedPrecision + OpDecorate %254 RelaxedPrecision + OpDecorate %255 RelaxedPrecision + OpDecorate %258 RelaxedPrecision + OpDecorate %260 RelaxedPrecision + OpDecorate %262 RelaxedPrecision + OpDecorate %264 RelaxedPrecision + OpDecorate %265 RelaxedPrecision + OpDecorate %268 RelaxedPrecision + OpDecorate %271 RelaxedPrecision + OpDecorate %273 RelaxedPrecision + OpDecorate %275 RelaxedPrecision + OpDecorate %277 RelaxedPrecision + OpDecorate %278 RelaxedPrecision + OpDecorate %279 RelaxedPrecision + OpDecorate %283 RelaxedPrecision + OpDecorate %285 RelaxedPrecision + OpDecorate %287 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_float = OpTypePointer Function %float -%float_9_00000076e_35 = OpConstant %float 9.00000076e+35 +%float_9_99999962e_35 = OpConstant %float 9.99999962e+35 %float_1e_09 = OpConstant %float 1e+09 -%int = OpTypeInt 32 1 + %int = OpTypeInt 32 1 %_ptr_Function_int = OpTypePointer Function %int %int_1073741824 = OpConstant %int 1073741824 -%int_2 = OpConstant %int 2 -%uint = OpTypeInt 32 0 + %int_2 = OpConstant %int 2 + %uint = OpTypeInt 32 0 %_ptr_Function_uint = OpTypePointer Function %uint %uint_2147483648 = OpConstant %uint 2147483648 -%uint_2 = OpConstant %uint 2 -%int_16384 = OpConstant %int 16384 -%uint_32768 = OpConstant %uint 32768 + %uint_2 = OpConstant %uint 2 + %int_16384 = OpConstant %int 16384 + %uint_32768 = OpConstant %uint 32768 %int_n2147483648 = OpConstant %int -2147483648 -%int_n32768 = OpConstant %int -32768 -%v4int = OpTypeVector %int 4 + %int_n32768 = OpConstant %int -32768 + %v4int = OpTypeVector %int 4 %_ptr_Function_v4int = OpTypePointer Function %v4int -%168 = OpConstantComposite %v4int %int_1073741824 %int_1073741824 %int_1073741824 %int_1073741824 -%169 = OpConstantComposite %v4int %int_2 %int_2 %int_2 %int_2 -%v4uint = OpTypeVector %uint 4 + %181 = OpConstantComposite %v4int %int_1073741824 %int_1073741824 %int_1073741824 %int_1073741824 + %182 = OpConstantComposite %v4int %int_2 %int_2 %int_2 %int_2 + %v4uint = OpTypeVector %uint 4 %_ptr_Function_v4uint = OpTypePointer Function %v4uint -%188 = OpConstantComposite %v4uint %uint_2147483648 %uint_2147483648 %uint_2147483648 %uint_2147483648 -%189 = OpConstantComposite %v4uint %uint_2 %uint_2 %uint_2 %uint_2 + %201 = OpConstantComposite %v4uint %uint_2147483648 %uint_2147483648 %uint_2147483648 %uint_2147483648 + %202 = OpConstantComposite %v4uint %uint_2 %uint_2 %uint_2 %uint_2 +%mat4v4float = OpTypeMatrix %v4float 4 +%_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float +%float_1_00000002e_20 = OpConstant %float 1.00000002e+20 + %221 = OpConstantComposite %v4float %float_1_00000002e_20 %float_1_00000002e_20 %float_1_00000002e_20 %float_1_00000002e_20 + %222 = OpConstantComposite %mat4v4float %221 %221 %221 %221 +%_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_0 = OpConstant %int 0 -%float_1 = OpConstant %float 1 -%239 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 -%240 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %int_0 = OpConstant %int 0 + %float_1 = OpConstant %float 1 + %266 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %267 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%huge = OpVariable %_ptr_Function_float Function -%hugeI = OpVariable %_ptr_Function_int Function -%hugeU = OpVariable %_ptr_Function_uint Function -%hugeS = OpVariable %_ptr_Function_int Function -%hugeUS = OpVariable %_ptr_Function_uint Function -%hugeNI = OpVariable %_ptr_Function_int Function -%hugeNS = OpVariable %_ptr_Function_int Function -%hugeIvec = OpVariable %_ptr_Function_v4int Function -%hugeUvec = OpVariable %_ptr_Function_v4uint Function -%30 = OpFMul %float %float_9_00000076e_35 %float_1e_09 -%31 = OpFMul %float %30 %float_1e_09 -%32 = OpFMul %float %31 %float_1e_09 -%33 = OpFMul %float %32 %float_1e_09 -%34 = OpFMul %float %33 %float_1e_09 -%35 = OpFMul %float %34 %float_1e_09 -%36 = OpFMul %float %35 %float_1e_09 -%37 = OpFMul %float %36 %float_1e_09 -%38 = OpFMul %float %37 %float_1e_09 -%39 = OpFMul %float %38 %float_1e_09 -OpStore %huge %39 -%45 = OpIMul %int %int_1073741824 %int_2 -%46 = OpIMul %int %45 %int_2 -%47 = OpIMul %int %46 %int_2 -%48 = OpIMul %int %47 %int_2 -%49 = OpIMul %int %48 %int_2 -%50 = OpIMul %int %49 %int_2 -%51 = OpIMul %int %50 %int_2 -%52 = OpIMul %int %51 %int_2 -%53 = OpIMul %int %52 %int_2 -%54 = OpIMul %int %53 %int_2 -%55 = OpIMul %int %54 %int_2 -%56 = OpIMul %int %55 %int_2 -%57 = OpIMul %int %56 %int_2 -%58 = OpIMul %int %57 %int_2 -%59 = OpIMul %int %58 %int_2 -%60 = OpIMul %int %59 %int_2 -%61 = OpIMul %int %60 %int_2 -%62 = OpIMul %int %61 %int_2 -%63 = OpIMul %int %62 %int_2 -%64 = OpIMul %int %63 %int_2 -OpStore %hugeI %64 -%70 = OpIMul %uint %uint_2147483648 %uint_2 -%71 = OpIMul %uint %70 %uint_2 -%72 = OpIMul %uint %71 %uint_2 -%73 = OpIMul %uint %72 %uint_2 -%74 = OpIMul %uint %73 %uint_2 -%75 = OpIMul %uint %74 %uint_2 -%76 = OpIMul %uint %75 %uint_2 -%77 = OpIMul %uint %76 %uint_2 -%78 = OpIMul %uint %77 %uint_2 -%79 = OpIMul %uint %78 %uint_2 -%80 = OpIMul %uint %79 %uint_2 -%81 = OpIMul %uint %80 %uint_2 -%82 = OpIMul %uint %81 %uint_2 -%83 = OpIMul %uint %82 %uint_2 -%84 = OpIMul %uint %83 %uint_2 -%85 = OpIMul %uint %84 %uint_2 -%86 = OpIMul %uint %85 %uint_2 -%87 = OpIMul %uint %86 %uint_2 -%88 = OpIMul %uint %87 %uint_2 -OpStore %hugeU %88 -%91 = OpIMul %int %int_16384 %int_2 -%92 = OpIMul %int %91 %int_2 -%93 = OpIMul %int %92 %int_2 -%94 = OpIMul %int %93 %int_2 -%95 = OpIMul %int %94 %int_2 -%96 = OpIMul %int %95 %int_2 -%97 = OpIMul %int %96 %int_2 -%98 = OpIMul %int %97 %int_2 -%99 = OpIMul %int %98 %int_2 -%100 = OpIMul %int %99 %int_2 -%101 = OpIMul %int %100 %int_2 -%102 = OpIMul %int %101 %int_2 -%103 = OpIMul %int %102 %int_2 -%104 = OpIMul %int %103 %int_2 -%105 = OpIMul %int %104 %int_2 -%106 = OpIMul %int %105 %int_2 -%107 = OpIMul %int %106 %int_2 -OpStore %hugeS %107 -%110 = OpIMul %uint %uint_32768 %uint_2 -%111 = OpIMul %uint %110 %uint_2 -%112 = OpIMul %uint %111 %uint_2 -%113 = OpIMul %uint %112 %uint_2 -%114 = OpIMul %uint %113 %uint_2 -%115 = OpIMul %uint %114 %uint_2 -%116 = OpIMul %uint %115 %uint_2 -%117 = OpIMul %uint %116 %uint_2 -%118 = OpIMul %uint %117 %uint_2 -%119 = OpIMul %uint %118 %uint_2 -%120 = OpIMul %uint %119 %uint_2 -%121 = OpIMul %uint %120 %uint_2 -%122 = OpIMul %uint %121 %uint_2 -%123 = OpIMul %uint %122 %uint_2 -%124 = OpIMul %uint %123 %uint_2 -%125 = OpIMul %uint %124 %uint_2 -OpStore %hugeUS %125 -%128 = OpIMul %int %int_n2147483648 %int_2 -%129 = OpIMul %int %128 %int_2 -%130 = OpIMul %int %129 %int_2 -%131 = OpIMul %int %130 %int_2 -%132 = OpIMul %int %131 %int_2 -%133 = OpIMul %int %132 %int_2 -%134 = OpIMul %int %133 %int_2 -%135 = OpIMul %int %134 %int_2 -%136 = OpIMul %int %135 %int_2 -%137 = OpIMul %int %136 %int_2 -%138 = OpIMul %int %137 %int_2 -%139 = OpIMul %int %138 %int_2 -%140 = OpIMul %int %139 %int_2 -%141 = OpIMul %int %140 %int_2 -%142 = OpIMul %int %141 %int_2 -%143 = OpIMul %int %142 %int_2 -%144 = OpIMul %int %143 %int_2 -%145 = OpIMul %int %144 %int_2 -%146 = OpIMul %int %145 %int_2 -OpStore %hugeNI %146 -%149 = OpIMul %int %int_n32768 %int_2 -%150 = OpIMul %int %149 %int_2 -%151 = OpIMul %int %150 %int_2 -%152 = OpIMul %int %151 %int_2 -%153 = OpIMul %int %152 %int_2 -%154 = OpIMul %int %153 %int_2 -%155 = OpIMul %int %154 %int_2 -%156 = OpIMul %int %155 %int_2 -%157 = OpIMul %int %156 %int_2 -%158 = OpIMul %int %157 %int_2 -%159 = OpIMul %int %158 %int_2 -%160 = OpIMul %int %159 %int_2 -%161 = OpIMul %int %160 %int_2 -%162 = OpIMul %int %161 %int_2 -%163 = OpIMul %int %162 %int_2 -%164 = OpIMul %int %163 %int_2 -OpStore %hugeNS %164 -%170 = OpIMul %v4int %168 %169 -%171 = OpIMul %v4int %170 %169 -%172 = OpIMul %v4int %171 %169 -%173 = OpIMul %v4int %172 %169 -%174 = OpIMul %v4int %173 %169 -%175 = OpIMul %v4int %174 %169 -%176 = OpIMul %v4int %175 %169 -%177 = OpIMul %v4int %176 %169 -%178 = OpIMul %v4int %177 %169 -%179 = OpIMul %v4int %178 %169 -%180 = OpIMul %v4int %179 %169 -%181 = OpIMul %v4int %180 %169 -%182 = OpIMul %v4int %181 %169 -%183 = OpIMul %v4int %182 %169 -%184 = OpIMul %v4int %183 %169 -OpStore %hugeIvec %184 -%190 = OpIMul %v4uint %188 %189 -%191 = OpIMul %v4uint %190 %189 -%192 = OpIMul %v4uint %191 %189 -%193 = OpIMul %v4uint %192 %189 -%194 = OpIMul %v4uint %193 %189 -%195 = OpIMul %v4uint %194 %189 -%196 = OpIMul %v4uint %195 %189 -%197 = OpIMul %v4uint %196 %189 -%198 = OpIMul %v4uint %197 %189 -%199 = OpIMul %v4uint %198 %189 -%200 = OpIMul %v4uint %199 %189 -%201 = OpIMul %v4uint %200 %189 -%202 = OpIMul %v4uint %201 %189 -%203 = OpIMul %v4uint %202 %189 -OpStore %hugeUvec %203 -%204 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%207 = OpLoad %v4float %204 -%208 = OpExtInst %float %1 FClamp %39 %float_0 %float_1 -%210 = OpVectorTimesScalar %v4float %207 %208 -%212 = OpConvertSToF %float %64 -%211 = OpExtInst %float %1 FClamp %212 %float_0 %float_1 -%213 = OpVectorTimesScalar %v4float %210 %211 -%215 = OpConvertUToF %float %88 -%214 = OpExtInst %float %1 FClamp %215 %float_0 %float_1 -%216 = OpVectorTimesScalar %v4float %213 %214 -%218 = OpConvertSToF %float %107 -%217 = OpExtInst %float %1 FClamp %218 %float_0 %float_1 -%219 = OpVectorTimesScalar %v4float %216 %217 -%221 = OpConvertUToF %float %125 -%220 = OpExtInst %float %1 FClamp %221 %float_0 %float_1 -%222 = OpVectorTimesScalar %v4float %219 %220 -%224 = OpConvertSToF %float %146 -%223 = OpExtInst %float %1 FClamp %224 %float_0 %float_1 -%225 = OpVectorTimesScalar %v4float %222 %223 -%227 = OpConvertSToF %float %164 -%226 = OpExtInst %float %1 FClamp %227 %float_0 %float_1 -%228 = OpVectorTimesScalar %v4float %225 %226 -%230 = OpCompositeExtract %int %184 0 -%231 = OpConvertSToF %float %230 -%232 = OpCompositeExtract %int %184 1 -%233 = OpConvertSToF %float %232 -%234 = OpCompositeExtract %int %184 2 -%235 = OpConvertSToF %float %234 -%236 = OpCompositeExtract %int %184 3 -%237 = OpConvertSToF %float %236 -%238 = OpCompositeConstruct %v4float %231 %233 %235 %237 -%229 = OpExtInst %v4float %1 FClamp %238 %239 %240 -%241 = OpFMul %v4float %228 %229 -%243 = OpCompositeExtract %uint %203 0 -%244 = OpConvertUToF %float %243 -%245 = OpCompositeExtract %uint %203 1 -%246 = OpConvertUToF %float %245 -%247 = OpCompositeExtract %uint %203 2 -%248 = OpConvertUToF %float %247 -%249 = OpCompositeExtract %uint %203 3 -%250 = OpConvertUToF %float %249 -%251 = OpCompositeConstruct %v4float %244 %246 %248 %250 -%242 = OpExtInst %v4float %1 FClamp %251 %239 %240 -%252 = OpFMul %v4float %241 %242 -OpReturnValue %252 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %hugeH = OpVariable %_ptr_Function_float Function + %hugeF = OpVariable %_ptr_Function_float Function + %hugeI = OpVariable %_ptr_Function_int Function + %hugeU = OpVariable %_ptr_Function_uint Function + %hugeS = OpVariable %_ptr_Function_int Function + %hugeUS = OpVariable %_ptr_Function_uint Function + %hugeNI = OpVariable %_ptr_Function_int Function + %hugeNS = OpVariable %_ptr_Function_int Function + %hugeIvec = OpVariable %_ptr_Function_v4int Function + %hugeUvec = OpVariable %_ptr_Function_v4uint Function + %hugeMxM = OpVariable %_ptr_Function_mat4v4float Function + %hugeMxV = OpVariable %_ptr_Function_v4float Function + %hugeVxM = OpVariable %_ptr_Function_v4float Function + %30 = OpFMul %float %float_9_99999962e_35 %float_1e_09 + %31 = OpFMul %float %30 %float_1e_09 + %32 = OpFMul %float %31 %float_1e_09 + %33 = OpFMul %float %32 %float_1e_09 + %34 = OpFMul %float %33 %float_1e_09 + %35 = OpFMul %float %34 %float_1e_09 + %36 = OpFMul %float %35 %float_1e_09 + %37 = OpFMul %float %36 %float_1e_09 + %38 = OpFMul %float %37 %float_1e_09 + %39 = OpFMul %float %38 %float_1e_09 + %40 = OpFMul %float %39 %float_1e_09 + OpStore %hugeH %40 + %42 = OpFMul %float %float_9_99999962e_35 %float_1e_09 + %43 = OpFMul %float %42 %float_1e_09 + %44 = OpFMul %float %43 %float_1e_09 + %45 = OpFMul %float %44 %float_1e_09 + %46 = OpFMul %float %45 %float_1e_09 + %47 = OpFMul %float %46 %float_1e_09 + %48 = OpFMul %float %47 %float_1e_09 + %49 = OpFMul %float %48 %float_1e_09 + %50 = OpFMul %float %49 %float_1e_09 + %51 = OpFMul %float %50 %float_1e_09 + %52 = OpFMul %float %51 %float_1e_09 + OpStore %hugeF %52 + %58 = OpIMul %int %int_1073741824 %int_2 + %59 = OpIMul %int %58 %int_2 + %60 = OpIMul %int %59 %int_2 + %61 = OpIMul %int %60 %int_2 + %62 = OpIMul %int %61 %int_2 + %63 = OpIMul %int %62 %int_2 + %64 = OpIMul %int %63 %int_2 + %65 = OpIMul %int %64 %int_2 + %66 = OpIMul %int %65 %int_2 + %67 = OpIMul %int %66 %int_2 + %68 = OpIMul %int %67 %int_2 + %69 = OpIMul %int %68 %int_2 + %70 = OpIMul %int %69 %int_2 + %71 = OpIMul %int %70 %int_2 + %72 = OpIMul %int %71 %int_2 + %73 = OpIMul %int %72 %int_2 + %74 = OpIMul %int %73 %int_2 + %75 = OpIMul %int %74 %int_2 + %76 = OpIMul %int %75 %int_2 + %77 = OpIMul %int %76 %int_2 + OpStore %hugeI %77 + %83 = OpIMul %uint %uint_2147483648 %uint_2 + %84 = OpIMul %uint %83 %uint_2 + %85 = OpIMul %uint %84 %uint_2 + %86 = OpIMul %uint %85 %uint_2 + %87 = OpIMul %uint %86 %uint_2 + %88 = OpIMul %uint %87 %uint_2 + %89 = OpIMul %uint %88 %uint_2 + %90 = OpIMul %uint %89 %uint_2 + %91 = OpIMul %uint %90 %uint_2 + %92 = OpIMul %uint %91 %uint_2 + %93 = OpIMul %uint %92 %uint_2 + %94 = OpIMul %uint %93 %uint_2 + %95 = OpIMul %uint %94 %uint_2 + %96 = OpIMul %uint %95 %uint_2 + %97 = OpIMul %uint %96 %uint_2 + %98 = OpIMul %uint %97 %uint_2 + %99 = OpIMul %uint %98 %uint_2 + %100 = OpIMul %uint %99 %uint_2 + %101 = OpIMul %uint %100 %uint_2 + OpStore %hugeU %101 + %104 = OpIMul %int %int_16384 %int_2 + %105 = OpIMul %int %104 %int_2 + %106 = OpIMul %int %105 %int_2 + %107 = OpIMul %int %106 %int_2 + %108 = OpIMul %int %107 %int_2 + %109 = OpIMul %int %108 %int_2 + %110 = OpIMul %int %109 %int_2 + %111 = OpIMul %int %110 %int_2 + %112 = OpIMul %int %111 %int_2 + %113 = OpIMul %int %112 %int_2 + %114 = OpIMul %int %113 %int_2 + %115 = OpIMul %int %114 %int_2 + %116 = OpIMul %int %115 %int_2 + %117 = OpIMul %int %116 %int_2 + %118 = OpIMul %int %117 %int_2 + %119 = OpIMul %int %118 %int_2 + %120 = OpIMul %int %119 %int_2 + OpStore %hugeS %120 + %123 = OpIMul %uint %uint_32768 %uint_2 + %124 = OpIMul %uint %123 %uint_2 + %125 = OpIMul %uint %124 %uint_2 + %126 = OpIMul %uint %125 %uint_2 + %127 = OpIMul %uint %126 %uint_2 + %128 = OpIMul %uint %127 %uint_2 + %129 = OpIMul %uint %128 %uint_2 + %130 = OpIMul %uint %129 %uint_2 + %131 = OpIMul %uint %130 %uint_2 + %132 = OpIMul %uint %131 %uint_2 + %133 = OpIMul %uint %132 %uint_2 + %134 = OpIMul %uint %133 %uint_2 + %135 = OpIMul %uint %134 %uint_2 + %136 = OpIMul %uint %135 %uint_2 + %137 = OpIMul %uint %136 %uint_2 + %138 = OpIMul %uint %137 %uint_2 + OpStore %hugeUS %138 + %141 = OpIMul %int %int_n2147483648 %int_2 + %142 = OpIMul %int %141 %int_2 + %143 = OpIMul %int %142 %int_2 + %144 = OpIMul %int %143 %int_2 + %145 = OpIMul %int %144 %int_2 + %146 = OpIMul %int %145 %int_2 + %147 = OpIMul %int %146 %int_2 + %148 = OpIMul %int %147 %int_2 + %149 = OpIMul %int %148 %int_2 + %150 = OpIMul %int %149 %int_2 + %151 = OpIMul %int %150 %int_2 + %152 = OpIMul %int %151 %int_2 + %153 = OpIMul %int %152 %int_2 + %154 = OpIMul %int %153 %int_2 + %155 = OpIMul %int %154 %int_2 + %156 = OpIMul %int %155 %int_2 + %157 = OpIMul %int %156 %int_2 + %158 = OpIMul %int %157 %int_2 + %159 = OpIMul %int %158 %int_2 + OpStore %hugeNI %159 + %162 = OpIMul %int %int_n32768 %int_2 + %163 = OpIMul %int %162 %int_2 + %164 = OpIMul %int %163 %int_2 + %165 = OpIMul %int %164 %int_2 + %166 = OpIMul %int %165 %int_2 + %167 = OpIMul %int %166 %int_2 + %168 = OpIMul %int %167 %int_2 + %169 = OpIMul %int %168 %int_2 + %170 = OpIMul %int %169 %int_2 + %171 = OpIMul %int %170 %int_2 + %172 = OpIMul %int %171 %int_2 + %173 = OpIMul %int %172 %int_2 + %174 = OpIMul %int %173 %int_2 + %175 = OpIMul %int %174 %int_2 + %176 = OpIMul %int %175 %int_2 + %177 = OpIMul %int %176 %int_2 + OpStore %hugeNS %177 + %183 = OpIMul %v4int %181 %182 + %184 = OpIMul %v4int %183 %182 + %185 = OpIMul %v4int %184 %182 + %186 = OpIMul %v4int %185 %182 + %187 = OpIMul %v4int %186 %182 + %188 = OpIMul %v4int %187 %182 + %189 = OpIMul %v4int %188 %182 + %190 = OpIMul %v4int %189 %182 + %191 = OpIMul %v4int %190 %182 + %192 = OpIMul %v4int %191 %182 + %193 = OpIMul %v4int %192 %182 + %194 = OpIMul %v4int %193 %182 + %195 = OpIMul %v4int %194 %182 + %196 = OpIMul %v4int %195 %182 + %197 = OpIMul %v4int %196 %182 + OpStore %hugeIvec %197 + %203 = OpIMul %v4uint %201 %202 + %204 = OpIMul %v4uint %203 %202 + %205 = OpIMul %v4uint %204 %202 + %206 = OpIMul %v4uint %205 %202 + %207 = OpIMul %v4uint %206 %202 + %208 = OpIMul %v4uint %207 %202 + %209 = OpIMul %v4uint %208 %202 + %210 = OpIMul %v4uint %209 %202 + %211 = OpIMul %v4uint %210 %202 + %212 = OpIMul %v4uint %211 %202 + %213 = OpIMul %v4uint %212 %202 + %214 = OpIMul %v4uint %213 %202 + %215 = OpIMul %v4uint %214 %202 + %216 = OpIMul %v4uint %215 %202 + OpStore %hugeUvec %216 + %223 = OpMatrixTimesMatrix %mat4v4float %222 %222 + OpStore %hugeMxM %223 + %226 = OpMatrixTimesVector %v4float %222 %221 + OpStore %hugeMxV %226 + %228 = OpVectorTimesMatrix %v4float %221 %222 + OpStore %hugeVxM %228 + %229 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %232 = OpLoad %v4float %229 + %233 = OpExtInst %float %1 FClamp %40 %float_0 %float_1 + %235 = OpVectorTimesScalar %v4float %232 %233 + %236 = OpExtInst %float %1 FClamp %52 %float_0 %float_1 + %237 = OpVectorTimesScalar %v4float %235 %236 + %239 = OpConvertSToF %float %77 + %238 = OpExtInst %float %1 FClamp %239 %float_0 %float_1 + %240 = OpVectorTimesScalar %v4float %237 %238 + %242 = OpConvertUToF %float %101 + %241 = OpExtInst %float %1 FClamp %242 %float_0 %float_1 + %243 = OpVectorTimesScalar %v4float %240 %241 + %245 = OpConvertSToF %float %120 + %244 = OpExtInst %float %1 FClamp %245 %float_0 %float_1 + %246 = OpVectorTimesScalar %v4float %243 %244 + %248 = OpConvertUToF %float %138 + %247 = OpExtInst %float %1 FClamp %248 %float_0 %float_1 + %249 = OpVectorTimesScalar %v4float %246 %247 + %251 = OpConvertSToF %float %159 + %250 = OpExtInst %float %1 FClamp %251 %float_0 %float_1 + %252 = OpVectorTimesScalar %v4float %249 %250 + %254 = OpConvertSToF %float %177 + %253 = OpExtInst %float %1 FClamp %254 %float_0 %float_1 + %255 = OpVectorTimesScalar %v4float %252 %253 + %257 = OpCompositeExtract %int %197 0 + %258 = OpConvertSToF %float %257 + %259 = OpCompositeExtract %int %197 1 + %260 = OpConvertSToF %float %259 + %261 = OpCompositeExtract %int %197 2 + %262 = OpConvertSToF %float %261 + %263 = OpCompositeExtract %int %197 3 + %264 = OpConvertSToF %float %263 + %265 = OpCompositeConstruct %v4float %258 %260 %262 %264 + %256 = OpExtInst %v4float %1 FClamp %265 %266 %267 + %268 = OpFMul %v4float %255 %256 + %270 = OpCompositeExtract %uint %216 0 + %271 = OpConvertUToF %float %270 + %272 = OpCompositeExtract %uint %216 1 + %273 = OpConvertUToF %float %272 + %274 = OpCompositeExtract %uint %216 2 + %275 = OpConvertUToF %float %274 + %276 = OpCompositeExtract %uint %216 3 + %277 = OpConvertUToF %float %276 + %278 = OpCompositeConstruct %v4float %271 %273 %275 %277 + %269 = OpExtInst %v4float %1 FClamp %278 %266 %267 + %279 = OpFMul %v4float %268 %269 + %281 = OpAccessChain %_ptr_Function_v4float %hugeMxM %int_0 + %282 = OpLoad %v4float %281 + %280 = OpExtInst %v4float %1 FClamp %282 %266 %267 + %283 = OpFMul %v4float %279 %280 + %284 = OpExtInst %v4float %1 FClamp %226 %266 %267 + %285 = OpFMul %v4float %283 %284 + %286 = OpExtInst %v4float %1 FClamp %228 %266 %267 + %287 = OpFMul %v4float %285 %286 + OpReturnValue %287 + OpFunctionEnd diff --git a/tests/sksl/shared/Overflow.glsl b/tests/sksl/shared/Overflow.glsl index a44344f9c622..e45f6f261185 100644 --- a/tests/sksl/shared/Overflow.glsl +++ b/tests/sksl/shared/Overflow.glsl @@ -2,7 +2,10 @@ out vec4 sk_FragColor; uniform vec4 colorGreen; vec4 main() { - float huge = (((((((((9.000001e+35 * 1e+09) * 1e+09) * 1e+09) * 1e+09) * 1e+09) * 1e+09) * 1e+09) * 1e+09) * 1e+09) * 1e+09; + const float h = 1e+09; + float hugeH = ((((((((((1e+36 * h) * h) * h) * h) * h) * h) * h) * h) * h) * h) * h; + const float f = 1e+09; + float hugeF = ((((((((((1e+36 * f) * f) * f) * f) * f) * f) * f) * f) * f) * f) * f; int hugeI = int((((((((((((((((((((1073741824 * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2); uint hugeU = ((((((((((((((((((2147483648u * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u; int hugeS = ((((((((((((((((16384 * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2; @@ -13,5 +16,8 @@ vec4 main() { ivec4 hugeIvec = ((((((((((((((ivec4(1073741824) * i4) * i4) * i4) * i4) * i4) * i4) * i4) * i4) * i4) * i4) * i4) * i4) * i4) * i4) * i4; const uvec4 u4 = uvec4(2u); uvec4 hugeUvec = (((((((((((((uvec4(2147483648u) * u4) * u4) * u4) * u4) * u4) * u4) * u4) * u4) * u4) * u4) * u4) * u4) * u4) * u4; - return ((((((((colorGreen * clamp(huge, 0.0, 1.0)) * clamp(float(hugeI), 0.0, 1.0)) * clamp(float(hugeU), 0.0, 1.0)) * clamp(float(hugeS), 0.0, 1.0)) * clamp(float(hugeUS), 0.0, 1.0)) * clamp(float(hugeNI), 0.0, 1.0)) * clamp(float(hugeNS), 0.0, 1.0)) * clamp(vec4(hugeIvec), 0.0, 1.0)) * clamp(vec4(hugeUvec), 0.0, 1.0); + mat4 hugeMxM = mat4(1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20) * mat4(1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20); + vec4 hugeMxV = mat4(1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20) * vec4(1e+20); + vec4 hugeVxM = vec4(1e+20) * mat4(1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20); + return ((((((((((((colorGreen * clamp(hugeH, 0.0, 1.0)) * clamp(hugeF, 0.0, 1.0)) * clamp(float(hugeI), 0.0, 1.0)) * clamp(float(hugeU), 0.0, 1.0)) * clamp(float(hugeS), 0.0, 1.0)) * clamp(float(hugeUS), 0.0, 1.0)) * clamp(float(hugeNI), 0.0, 1.0)) * clamp(float(hugeNS), 0.0, 1.0)) * clamp(vec4(hugeIvec), 0.0, 1.0)) * clamp(vec4(hugeUvec), 0.0, 1.0)) * clamp(hugeMxM[0], 0.0, 1.0)) * clamp(hugeMxV, 0.0, 1.0)) * clamp(hugeVxM, 0.0, 1.0); } diff --git a/tests/sksl/shared/Overflow.hlsl b/tests/sksl/shared/Overflow.hlsl index 65781c34037c..7e0bd5f4ec37 100644 --- a/tests/sksl/shared/Overflow.hlsl +++ b/tests/sksl/shared/Overflow.hlsl @@ -13,25 +13,32 @@ struct SPIRV_Cross_Output float4 main(float2 _24) { - float _39 = (((((((((9.0000007644071214079894667114892e+35f * 1000000000.0f) * 1000000000.0f) * 1000000000.0f) * 1000000000.0f) * 1000000000.0f) * 1000000000.0f) * 1000000000.0f) * 1000000000.0f) * 1000000000.0f) * 1000000000.0f; - float huge = _39; - int _64 = (((((((((((((((((((1073741824 * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2; - int hugeI = _64; - uint _88 = ((((((((((((((((((2147483648u * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u; - uint hugeU = _88; - int _107 = ((((((((((((((((16384 * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2; - int hugeS = _107; - uint _125 = (((((((((((((((32768u * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u; - uint hugeUS = _125; - int _146 = ((((((((((((((((((int(0x80000000) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2; - int hugeNI = _146; - int _164 = ((((((((((((((((-32768) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2; - int hugeNS = _164; - int4 _184 = ((((((((((((((int4(1073741824, 1073741824, 1073741824, 1073741824) * int4(2, 2, 2, 2)) * int4(2, 2, 2, 2)) * int4(2, 2, 2, 2)) * int4(2, 2, 2, 2)) * int4(2, 2, 2, 2)) * int4(2, 2, 2, 2)) * int4(2, 2, 2, 2)) * int4(2, 2, 2, 2)) * int4(2, 2, 2, 2)) * int4(2, 2, 2, 2)) * int4(2, 2, 2, 2)) * int4(2, 2, 2, 2)) * int4(2, 2, 2, 2)) * int4(2, 2, 2, 2)) * int4(2, 2, 2, 2); - int4 hugeIvec = _184; - uint4 _203 = (((((((((((((uint4(2147483648u, 2147483648u, 2147483648u, 2147483648u) * uint4(2u, 2u, 2u, 2u)) * uint4(2u, 2u, 2u, 2u)) * uint4(2u, 2u, 2u, 2u)) * uint4(2u, 2u, 2u, 2u)) * uint4(2u, 2u, 2u, 2u)) * uint4(2u, 2u, 2u, 2u)) * uint4(2u, 2u, 2u, 2u)) * uint4(2u, 2u, 2u, 2u)) * uint4(2u, 2u, 2u, 2u)) * uint4(2u, 2u, 2u, 2u)) * uint4(2u, 2u, 2u, 2u)) * uint4(2u, 2u, 2u, 2u)) * uint4(2u, 2u, 2u, 2u)) * uint4(2u, 2u, 2u, 2u); - uint4 hugeUvec = _203; - return ((((((((_10_colorGreen * clamp(_39, 0.0f, 1.0f)) * clamp(float(_64), 0.0f, 1.0f)) * clamp(float(_88), 0.0f, 1.0f)) * clamp(float(_107), 0.0f, 1.0f)) * clamp(float(_125), 0.0f, 1.0f)) * clamp(float(_146), 0.0f, 1.0f)) * clamp(float(_164), 0.0f, 1.0f)) * clamp(float4(float(_184.x), float(_184.y), float(_184.z), float(_184.w)), 0.0f.xxxx, 1.0f.xxxx)) * clamp(float4(float(_203.x), float(_203.y), float(_203.z), float(_203.w)), 0.0f.xxxx, 1.0f.xxxx); + float _40 = ((((((((((9.9999996169031624536541560020822e+35f * 1000000000.0f) * 1000000000.0f) * 1000000000.0f) * 1000000000.0f) * 1000000000.0f) * 1000000000.0f) * 1000000000.0f) * 1000000000.0f) * 1000000000.0f) * 1000000000.0f) * 1000000000.0f; + float hugeH = _40; + float _52 = ((((((((((9.9999996169031624536541560020822e+35f * 1000000000.0f) * 1000000000.0f) * 1000000000.0f) * 1000000000.0f) * 1000000000.0f) * 1000000000.0f) * 1000000000.0f) * 1000000000.0f) * 1000000000.0f) * 1000000000.0f) * 1000000000.0f; + float hugeF = _52; + int _77 = (((((((((((((((((((1073741824 * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2; + int hugeI = _77; + uint _101 = ((((((((((((((((((2147483648u * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u; + uint hugeU = _101; + int _120 = ((((((((((((((((16384 * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2; + int hugeS = _120; + uint _138 = (((((((((((((((32768u * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u; + uint hugeUS = _138; + int _159 = ((((((((((((((((((int(0x80000000) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2; + int hugeNI = _159; + int _177 = ((((((((((((((((-32768) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2; + int hugeNS = _177; + int4 _197 = ((((((((((((((int4(1073741824, 1073741824, 1073741824, 1073741824) * int4(2, 2, 2, 2)) * int4(2, 2, 2, 2)) * int4(2, 2, 2, 2)) * int4(2, 2, 2, 2)) * int4(2, 2, 2, 2)) * int4(2, 2, 2, 2)) * int4(2, 2, 2, 2)) * int4(2, 2, 2, 2)) * int4(2, 2, 2, 2)) * int4(2, 2, 2, 2)) * int4(2, 2, 2, 2)) * int4(2, 2, 2, 2)) * int4(2, 2, 2, 2)) * int4(2, 2, 2, 2)) * int4(2, 2, 2, 2); + int4 hugeIvec = _197; + uint4 _216 = (((((((((((((uint4(2147483648u, 2147483648u, 2147483648u, 2147483648u) * uint4(2u, 2u, 2u, 2u)) * uint4(2u, 2u, 2u, 2u)) * uint4(2u, 2u, 2u, 2u)) * uint4(2u, 2u, 2u, 2u)) * uint4(2u, 2u, 2u, 2u)) * uint4(2u, 2u, 2u, 2u)) * uint4(2u, 2u, 2u, 2u)) * uint4(2u, 2u, 2u, 2u)) * uint4(2u, 2u, 2u, 2u)) * uint4(2u, 2u, 2u, 2u)) * uint4(2u, 2u, 2u, 2u)) * uint4(2u, 2u, 2u, 2u)) * uint4(2u, 2u, 2u, 2u)) * uint4(2u, 2u, 2u, 2u); + uint4 hugeUvec = _216; + float4x4 hugeMxM = mul(float4x4(100000002004087734272.0f.xxxx, 100000002004087734272.0f.xxxx, 100000002004087734272.0f.xxxx, 100000002004087734272.0f.xxxx), float4x4(100000002004087734272.0f.xxxx, 100000002004087734272.0f.xxxx, 100000002004087734272.0f.xxxx, 100000002004087734272.0f.xxxx)); + float4 _226 = mul(100000002004087734272.0f.xxxx, float4x4(100000002004087734272.0f.xxxx, 100000002004087734272.0f.xxxx, 100000002004087734272.0f.xxxx, 100000002004087734272.0f.xxxx)); + float4 hugeMxV = _226; + float4 _228 = mul(float4x4(100000002004087734272.0f.xxxx, 100000002004087734272.0f.xxxx, 100000002004087734272.0f.xxxx, 100000002004087734272.0f.xxxx), 100000002004087734272.0f.xxxx); + float4 hugeVxM = _228; + return ((((((((((((_10_colorGreen * clamp(_40, 0.0f, 1.0f)) * clamp(_52, 0.0f, 1.0f)) * clamp(float(_77), 0.0f, 1.0f)) * clamp(float(_101), 0.0f, 1.0f)) * clamp(float(_120), 0.0f, 1.0f)) * clamp(float(_138), 0.0f, 1.0f)) * clamp(float(_159), 0.0f, 1.0f)) * clamp(float(_177), 0.0f, 1.0f)) * clamp(float4(float(_197.x), float(_197.y), float(_197.z), float(_197.w)), 0.0f.xxxx, 1.0f.xxxx)) * clamp(float4(float(_216.x), float(_216.y), float(_216.z), float(_216.w)), 0.0f.xxxx, 1.0f.xxxx)) * clamp(hugeMxM[0], 0.0f.xxxx, 1.0f.xxxx)) * clamp(_226, 0.0f.xxxx, 1.0f.xxxx)) * clamp(_228, 0.0f.xxxx, 1.0f.xxxx); } void frag_main() diff --git a/tests/sksl/shared/Overflow.metal b/tests/sksl/shared/Overflow.metal index 27d6fe208dd0..df824697d166 100644 --- a/tests/sksl/shared/Overflow.metal +++ b/tests/sksl/shared/Overflow.metal @@ -12,7 +12,10 @@ struct Outputs { fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) { Outputs _out; (void)_out; - half huge = half((((((((((9.000001e+35 * 1e+09) * 1e+09) * 1e+09) * 1e+09) * 1e+09) * 1e+09) * 1e+09) * 1e+09) * 1e+09) * 1e+09); + const half h = 1e+09h; + half hugeH = ((((((((((1e+36h * h) * h) * h) * h) * h) * h) * h) * h) * h) * h) * h; + const float f = 1e+09; + float hugeF = ((((((((((1e+36 * f) * f) * f) * f) * f) * f) * f) * f) * f) * f) * f; int hugeI = int((((((((((((((((((((1073741824 * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2); uint hugeU = ((((((((((((((((((2147483648u * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u; short hugeS = ((((((((((((((((16384 * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2; @@ -23,6 +26,9 @@ fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _unifo int4 hugeIvec = ((((((((((((((int4(1073741824) * i4) * i4) * i4) * i4) * i4) * i4) * i4) * i4) * i4) * i4) * i4) * i4) * i4) * i4) * i4; const uint4 u4 = uint4(2u); uint4 hugeUvec = (((((((((((((uint4(2147483648u) * u4) * u4) * u4) * u4) * u4) * u4) * u4) * u4) * u4) * u4) * u4) * u4) * u4) * u4; - _out.sk_FragColor = ((((((((_uniforms.colorGreen * saturate(huge)) * saturate(half(hugeI))) * saturate(half(hugeU))) * saturate(half(hugeS))) * saturate(half(hugeUS))) * saturate(half(hugeNI))) * saturate(half(hugeNS))) * saturate(half4(hugeIvec))) * saturate(half4(hugeUvec)); + float4x4 hugeMxM = float4x4(float4(1e+20, 1e+20, 1e+20, 1e+20), float4(1e+20, 1e+20, 1e+20, 1e+20), float4(1e+20, 1e+20, 1e+20, 1e+20), float4(1e+20, 1e+20, 1e+20, 1e+20)) * float4x4(float4(1e+20, 1e+20, 1e+20, 1e+20), float4(1e+20, 1e+20, 1e+20, 1e+20), float4(1e+20, 1e+20, 1e+20, 1e+20), float4(1e+20, 1e+20, 1e+20, 1e+20)); + float4 hugeMxV = float4x4(float4(1e+20, 1e+20, 1e+20, 1e+20), float4(1e+20, 1e+20, 1e+20, 1e+20), float4(1e+20, 1e+20, 1e+20, 1e+20), float4(1e+20, 1e+20, 1e+20, 1e+20)) * float4(1e+20); + float4 hugeVxM = float4(1e+20) * float4x4(float4(1e+20, 1e+20, 1e+20, 1e+20), float4(1e+20, 1e+20, 1e+20, 1e+20), float4(1e+20, 1e+20, 1e+20, 1e+20), float4(1e+20, 1e+20, 1e+20, 1e+20)); + _out.sk_FragColor = ((((((((((((_uniforms.colorGreen * saturate(hugeH)) * saturate(half(hugeF))) * saturate(half(hugeI))) * saturate(half(hugeU))) * saturate(half(hugeS))) * saturate(half(hugeUS))) * saturate(half(hugeNI))) * saturate(half(hugeNS))) * saturate(half4(hugeIvec))) * saturate(half4(hugeUvec))) * saturate(half4(hugeMxM[0]))) * saturate(half4(hugeMxV))) * saturate(half4(hugeVxM)); return _out; } diff --git a/tests/sksl/shared/Overflow.skrp b/tests/sksl/shared/Overflow.skrp index 6d90830da113..2168dd68598e 100644 --- a/tests/sksl/shared/Overflow.skrp +++ b/tests/sksl/shared/Overflow.skrp @@ -1,27 +1,56 @@ +316 instructions + [immutable slots] -i4(0) = 0x00000002 (2.802597e-45) -i4(1) = 0x00000002 (2.802597e-45) -i4(2) = 0x00000002 (2.802597e-45) -i4(3) = 0x00000002 (2.802597e-45) -u4(0) = 0x00000002 (2.802597e-45) -u4(1) = 0x00000002 (2.802597e-45) -u4(2) = 0x00000002 (2.802597e-45) -u4(3) = 0x00000002 (2.802597e-45) +i0 = 0x4E6E6B28 (1e+09) +i1 = 0x00000002 (2.802597e-45) +i2 = 0x00000002 (2.802597e-45) +i3 = 0x00000002 (2.802597e-45) +i4 = 0x00000002 (2.802597e-45) +i5 = 0x60AD78EC (1e+20) +i6 = 0x60AD78EC (1e+20) +i7 = 0x60AD78EC (1e+20) +i8 = 0x60AD78EC (1e+20) +i9 = 0x60AD78EC (1e+20) +i10 = 0x60AD78EC (1e+20) +i11 = 0x60AD78EC (1e+20) +i12 = 0x60AD78EC (1e+20) +i13 = 0x60AD78EC (1e+20) +i14 = 0x60AD78EC (1e+20) +i15 = 0x60AD78EC (1e+20) +i16 = 0x60AD78EC (1e+20) +i17 = 0x60AD78EC (1e+20) +i18 = 0x60AD78EC (1e+20) +i19 = 0x60AD78EC (1e+20) +i20 = 0x60AD78EC (1e+20) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true -copy_constant $0 = 0x7B2D556E (9.000001e+35) +copy_constant $0 = 0x7B4097CE (1e+36) +mul_imm_float $0 *= 0x4E6E6B28 (1e+09) +mul_imm_float $0 *= 0x4E6E6B28 (1e+09) +mul_imm_float $0 *= 0x4E6E6B28 (1e+09) +mul_imm_float $0 *= 0x4E6E6B28 (1e+09) +mul_imm_float $0 *= 0x4E6E6B28 (1e+09) +mul_imm_float $0 *= 0x4E6E6B28 (1e+09) +mul_imm_float $0 *= 0x4E6E6B28 (1e+09) mul_imm_float $0 *= 0x4E6E6B28 (1e+09) mul_imm_float $0 *= 0x4E6E6B28 (1e+09) mul_imm_float $0 *= 0x4E6E6B28 (1e+09) mul_imm_float $0 *= 0x4E6E6B28 (1e+09) +copy_slot_unmasked hugeH = $0 +copy_constant $0 = 0x7B4097CE (1e+36) mul_imm_float $0 *= 0x4E6E6B28 (1e+09) mul_imm_float $0 *= 0x4E6E6B28 (1e+09) mul_imm_float $0 *= 0x4E6E6B28 (1e+09) mul_imm_float $0 *= 0x4E6E6B28 (1e+09) mul_imm_float $0 *= 0x4E6E6B28 (1e+09) mul_imm_float $0 *= 0x4E6E6B28 (1e+09) -copy_slot_unmasked huge = $0 +mul_imm_float $0 *= 0x4E6E6B28 (1e+09) +mul_imm_float $0 *= 0x4E6E6B28 (1e+09) +mul_imm_float $0 *= 0x4E6E6B28 (1e+09) +mul_imm_float $0 *= 0x4E6E6B28 (1e+09) +mul_imm_float $0 *= 0x4E6E6B28 (1e+09) +copy_slot_unmasked hugeF = $0 copy_constant $0 = 0x40000000 (2.0) mul_imm_int $0 *= 0x00000002 mul_imm_int $0 *= 0x00000002 @@ -203,8 +232,40 @@ mul_4_ints $0..3 *= $4..7 splat_4_constants $4..7 = 0x00000002 (2.802597e-45) mul_4_ints $0..3 *= $4..7 copy_4_slots_unmasked hugeUvec = $0..3 +copy_4_immutables_unmasked $16..19 = i5..8 [0x60AD78EC (1e+20), 0x60AD78EC (1e+20), 0x60AD78EC (1e+20), 0x60AD78EC (1e+20)] +copy_4_immutables_unmasked $20..23 = i9..12 [0x60AD78EC (1e+20), 0x60AD78EC (1e+20), 0x60AD78EC (1e+20), 0x60AD78EC (1e+20)] +copy_4_immutables_unmasked $24..27 = i13..16 [0x60AD78EC (1e+20), 0x60AD78EC (1e+20), 0x60AD78EC (1e+20), 0x60AD78EC (1e+20)] +copy_4_immutables_unmasked $28..31 = i17..20 [0x60AD78EC (1e+20), 0x60AD78EC (1e+20), 0x60AD78EC (1e+20), 0x60AD78EC (1e+20)] +copy_4_immutables_unmasked $32..35 = i5..8 [0x60AD78EC (1e+20), 0x60AD78EC (1e+20), 0x60AD78EC (1e+20), 0x60AD78EC (1e+20)] +copy_4_immutables_unmasked $36..39 = i9..12 [0x60AD78EC (1e+20), 0x60AD78EC (1e+20), 0x60AD78EC (1e+20), 0x60AD78EC (1e+20)] +copy_4_immutables_unmasked $40..43 = i13..16 [0x60AD78EC (1e+20), 0x60AD78EC (1e+20), 0x60AD78EC (1e+20), 0x60AD78EC (1e+20)] +copy_4_immutables_unmasked $44..47 = i17..20 [0x60AD78EC (1e+20), 0x60AD78EC (1e+20), 0x60AD78EC (1e+20), 0x60AD78EC (1e+20)] +matrix_multiply_4 mat4x4($0..15) = mat4x4($16..31) * mat4x4($32..47) +copy_4_slots_unmasked hugeMxM(0..3) = $0..3 +copy_4_slots_unmasked hugeMxM(4..7) = $4..7 +copy_4_slots_unmasked hugeMxM(8..11) = $8..11 +copy_4_slots_unmasked hugeMxM(12..15) = $12..15 +copy_4_immutables_unmasked $4..7 = i5..8 [0x60AD78EC (1e+20), 0x60AD78EC (1e+20), 0x60AD78EC (1e+20), 0x60AD78EC (1e+20)] +copy_4_immutables_unmasked $8..11 = i9..12 [0x60AD78EC (1e+20), 0x60AD78EC (1e+20), 0x60AD78EC (1e+20), 0x60AD78EC (1e+20)] +copy_4_immutables_unmasked $12..15 = i13..16 [0x60AD78EC (1e+20), 0x60AD78EC (1e+20), 0x60AD78EC (1e+20), 0x60AD78EC (1e+20)] +copy_4_immutables_unmasked $16..19 = i17..20 [0x60AD78EC (1e+20), 0x60AD78EC (1e+20), 0x60AD78EC (1e+20), 0x60AD78EC (1e+20)] +splat_4_constants $20..23 = 0x60AD78EC (1e+20) +matrix_multiply_4 mat1x4($0..3) = mat4x4($4..19) * mat1x4($20..23) +copy_4_slots_unmasked hugeMxV = $0..3 +splat_4_constants $4..7 = 0x60AD78EC (1e+20) +copy_4_immutables_unmasked $8..11 = i5..8 [0x60AD78EC (1e+20), 0x60AD78EC (1e+20), 0x60AD78EC (1e+20), 0x60AD78EC (1e+20)] +copy_4_immutables_unmasked $12..15 = i9..12 [0x60AD78EC (1e+20), 0x60AD78EC (1e+20), 0x60AD78EC (1e+20), 0x60AD78EC (1e+20)] +copy_4_immutables_unmasked $16..19 = i13..16 [0x60AD78EC (1e+20), 0x60AD78EC (1e+20), 0x60AD78EC (1e+20), 0x60AD78EC (1e+20)] +copy_4_immutables_unmasked $20..23 = i17..20 [0x60AD78EC (1e+20), 0x60AD78EC (1e+20), 0x60AD78EC (1e+20), 0x60AD78EC (1e+20)] +matrix_multiply_4 mat4x1($0..3) = mat4x1($4..7) * mat4x4($8..23) +copy_4_slots_unmasked hugeVxM = $0..3 copy_4_uniforms $0..3 = colorGreen -copy_slot_unmasked $4 = huge +copy_slot_unmasked $4 = hugeH +max_imm_float $4 = max($4, 0) +min_imm_float $4 = min($4, 0x3F800000 (1.0)) +swizzle_4 $4..7 = ($4..7).xxxx +mul_4_floats $0..3 *= $4..7 +copy_slot_unmasked $4 = hugeF max_imm_float $4 = max($4, 0) min_imm_float $4 = min($4, 0x3F800000 (1.0)) swizzle_4 $4..7 = ($4..7).xxxx @@ -259,4 +320,22 @@ max_4_floats $4..7 = max($4..7, $8..11) splat_4_constants $8..11 = 0x3F800000 (1.0) min_4_floats $4..7 = min($4..7, $8..11) mul_4_floats $0..3 *= $4..7 +copy_4_slots_unmasked $4..7 = hugeMxM(0..3) +splat_4_constants $8..11 = 0 +max_4_floats $4..7 = max($4..7, $8..11) +splat_4_constants $8..11 = 0x3F800000 (1.0) +min_4_floats $4..7 = min($4..7, $8..11) +mul_4_floats $0..3 *= $4..7 +copy_4_slots_unmasked $4..7 = hugeMxV +splat_4_constants $8..11 = 0 +max_4_floats $4..7 = max($4..7, $8..11) +splat_4_constants $8..11 = 0x3F800000 (1.0) +min_4_floats $4..7 = min($4..7, $8..11) +mul_4_floats $0..3 *= $4..7 +copy_4_slots_unmasked $4..7 = hugeVxM +splat_4_constants $8..11 = 0 +max_4_floats $4..7 = max($4..7, $8..11) +splat_4_constants $8..11 = 0x3F800000 (1.0) +min_4_floats $4..7 = min($4..7, $8..11) +mul_4_floats $0..3 *= $4..7 load_src src.rgba = $0..3 diff --git a/tests/sksl/shared/Overflow.wgsl b/tests/sksl/shared/Overflow.wgsl new file mode 100644 index 000000000000..19f54c4cfd72 --- /dev/null +++ b/tests/sksl/shared/Overflow.wgsl @@ -0,0 +1,66 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + const h: f32 = 1e+09; + let _skTemp0 = 1e+36; + var hugeH: f32 = ((((((((((_skTemp0 * h) * h) * h) * h) * h) * h) * h) * h) * h) * h) * h; + const f: f32 = 1e+09; + let _skTemp1 = 1e+36; + var hugeF: f32 = ((((((((((_skTemp1 * f) * f) * f) * f) * f) * f) * f) * f) * f) * f) * f; + let _skTemp2 = 1073741824; + var hugeI: i32 = i32((((((((((((((((((((_skTemp2 * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2); + let _skTemp3 = 2147483648u; + var hugeU: u32 = ((((((((((((((((((_skTemp3 * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u; + let _skTemp4 = 16384; + var hugeS: i32 = ((((((((((((((((_skTemp4 * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2; + let _skTemp5 = 32768u; + var hugeUS: u32 = (((((((((((((((_skTemp5 * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u) * 2u; + let _skTemp6 = -2147483648; + var hugeNI: i32 = i32(((((((((((((((((((_skTemp6 * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2); + let _skTemp7 = -32768; + var hugeNS: i32 = (((((((((((((((_skTemp7 * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2) * 2; + const i4: vec4 = vec4(2); + let _skTemp8 = vec4(1073741824); + var hugeIvec: vec4 = ((((((((((((((_skTemp8 * i4) * i4) * i4) * i4) * i4) * i4) * i4) * i4) * i4) * i4) * i4) * i4) * i4) * i4) * i4; + const u4: vec4 = vec4(2u); + let _skTemp9 = vec4(2147483648u); + var hugeUvec: vec4 = (((((((((((((_skTemp9 * u4) * u4) * u4) * u4) * u4) * u4) * u4) * u4) * u4) * u4) * u4) * u4) * u4) * u4; + let _skTemp10 = mat4x4(1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20); + var hugeMxM: mat4x4 = _skTemp10 * mat4x4(1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20); + let _skTemp11 = mat4x4(1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20); + var hugeMxV: vec4 = _skTemp11 * vec4(1e+20); + let _skTemp12 = vec4(1e+20); + var hugeVxM: vec4 = _skTemp12 * mat4x4(1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20, 1e+20); + let _skTemp13 = saturate(hugeH); + let _skTemp14 = saturate(f32(hugeF)); + let _skTemp15 = saturate(f32(hugeI)); + let _skTemp16 = saturate(f32(hugeU)); + let _skTemp17 = saturate(f32(hugeS)); + let _skTemp18 = saturate(f32(hugeUS)); + let _skTemp19 = saturate(f32(hugeNI)); + let _skTemp20 = saturate(f32(hugeNS)); + let _skTemp21 = saturate(vec4(hugeIvec)); + let _skTemp22 = saturate(vec4(hugeUvec)); + let _skTemp23 = saturate(vec4(hugeMxM[0])); + let _skTemp24 = saturate(vec4(hugeMxV)); + let _skTemp25 = saturate(vec4(hugeVxM)); + return ((((((((((((_globalUniforms.colorGreen * _skTemp13) * _skTemp14) * _skTemp15) * _skTemp16) * _skTemp17) * _skTemp18) * _skTemp19) * _skTemp20) * _skTemp21) * _skTemp22) * _skTemp23) * _skTemp24) * _skTemp25; + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/PostfixExpressions.asm.frag b/tests/sksl/shared/PostfixExpressions.asm.frag index b1a225ea5478..3cd3a8f11e2a 100644 --- a/tests/sksl/shared/PostfixExpressions.asm.frag +++ b/tests/sksl/shared/PostfixExpressions.asm.frag @@ -1,271 +1,271 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %ok "ok" -OpName %i "i" -OpName %f "f" -OpName %f2 "f2" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %105 RelaxedPrecision -OpDecorate %135 RelaxedPrecision -OpDecorate %149 RelaxedPrecision -OpDecorate %151 RelaxedPrecision -OpDecorate %152 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %ok "ok" + OpName %i "i" + OpName %f "f" + OpName %f2 "f2" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %105 RelaxedPrecision + OpDecorate %135 RelaxedPrecision + OpDecorate %149 RelaxedPrecision + OpDecorate %151 RelaxedPrecision + OpDecorate %152 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_bool = OpTypePointer Function %bool -%true = OpConstantTrue %bool -%int = OpTypeInt 32 1 + %true = OpConstantTrue %bool + %int = OpTypeInt 32 1 %_ptr_Function_int = OpTypePointer Function %int -%int_5 = OpConstant %int 5 -%int_1 = OpConstant %int 1 -%false = OpConstantFalse %bool -%int_6 = OpConstant %int 6 -%int_7 = OpConstant %int 7 + %int_5 = OpConstant %int 5 + %int_1 = OpConstant %int 1 + %false = OpConstantFalse %bool + %int_6 = OpConstant %int 6 + %int_7 = OpConstant %int 7 %_ptr_Function_float = OpTypePointer Function %float -%float_0_5 = OpConstant %float 0.5 -%float_1 = OpConstant %float 1 -%float_1_5 = OpConstant %float 1.5 -%float_2_5 = OpConstant %float 2.5 -%100 = OpConstantComposite %v2float %float_0_5 %float_0_5 -%int_0 = OpConstant %int 0 + %float_0_5 = OpConstant %float 0.5 + %float_1 = OpConstant %float 1 + %float_1_5 = OpConstant %float 1.5 + %float_2_5 = OpConstant %float 2.5 + %100 = OpConstantComposite %v2float %float_0_5 %float_0_5 + %int_0 = OpConstant %int 0 %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%ok = OpVariable %_ptr_Function_bool Function -%i = OpVariable %_ptr_Function_int Function -%f = OpVariable %_ptr_Function_float Function -%f2 = OpVariable %_ptr_Function_v2float Function -%142 = OpVariable %_ptr_Function_v4float Function -OpStore %ok %true -OpStore %i %int_5 -%34 = OpIAdd %int %int_5 %int_1 -OpStore %i %34 -OpSelectionMerge %37 None -OpBranchConditional %true %36 %37 -%36 = OpLabel -%38 = OpIAdd %int %34 %int_1 -OpStore %i %38 -%40 = OpIEqual %bool %34 %int_6 -OpBranch %37 -%37 = OpLabel -%41 = OpPhi %bool %false %25 %40 %36 -OpStore %ok %41 -OpSelectionMerge %43 None -OpBranchConditional %41 %42 %43 -%42 = OpLabel -%44 = OpLoad %int %i -%46 = OpIEqual %bool %44 %int_7 -OpBranch %43 -%43 = OpLabel -%47 = OpPhi %bool %false %37 %46 %42 -OpStore %ok %47 -OpSelectionMerge %49 None -OpBranchConditional %47 %48 %49 -%48 = OpLabel -%50 = OpLoad %int %i -%51 = OpISub %int %50 %int_1 -OpStore %i %51 -%52 = OpIEqual %bool %50 %int_7 -OpBranch %49 -%49 = OpLabel -%53 = OpPhi %bool %false %43 %52 %48 -OpStore %ok %53 -OpSelectionMerge %55 None -OpBranchConditional %53 %54 %55 -%54 = OpLabel -%56 = OpLoad %int %i -%57 = OpIEqual %bool %56 %int_6 -OpBranch %55 -%55 = OpLabel -%58 = OpPhi %bool %false %49 %57 %54 -OpStore %ok %58 -%59 = OpLoad %int %i -%60 = OpISub %int %59 %int_1 -OpStore %i %60 -OpSelectionMerge %62 None -OpBranchConditional %58 %61 %62 -%61 = OpLabel -%63 = OpIEqual %bool %60 %int_5 -OpBranch %62 -%62 = OpLabel -%64 = OpPhi %bool %false %55 %63 %61 -OpStore %ok %64 -OpStore %f %float_0_5 -%69 = OpFAdd %float %float_0_5 %float_1 -OpStore %f %69 -OpSelectionMerge %71 None -OpBranchConditional %64 %70 %71 -%70 = OpLabel -%72 = OpFAdd %float %69 %float_1 -OpStore %f %72 -%74 = OpFOrdEqual %bool %69 %float_1_5 -OpBranch %71 -%71 = OpLabel -%75 = OpPhi %bool %false %62 %74 %70 -OpStore %ok %75 -OpSelectionMerge %77 None -OpBranchConditional %75 %76 %77 -%76 = OpLabel -%78 = OpLoad %float %f -%80 = OpFOrdEqual %bool %78 %float_2_5 -OpBranch %77 -%77 = OpLabel -%81 = OpPhi %bool %false %71 %80 %76 -OpStore %ok %81 -OpSelectionMerge %83 None -OpBranchConditional %81 %82 %83 -%82 = OpLabel -%84 = OpLoad %float %f -%85 = OpFSub %float %84 %float_1 -OpStore %f %85 -%86 = OpFOrdEqual %bool %84 %float_2_5 -OpBranch %83 -%83 = OpLabel -%87 = OpPhi %bool %false %77 %86 %82 -OpStore %ok %87 -OpSelectionMerge %89 None -OpBranchConditional %87 %88 %89 -%88 = OpLabel -%90 = OpLoad %float %f -%91 = OpFOrdEqual %bool %90 %float_1_5 -OpBranch %89 -%89 = OpLabel -%92 = OpPhi %bool %false %83 %91 %88 -OpStore %ok %92 -%93 = OpLoad %float %f -%94 = OpFSub %float %93 %float_1 -OpStore %f %94 -OpSelectionMerge %96 None -OpBranchConditional %92 %95 %96 -%95 = OpLabel -%97 = OpFOrdEqual %bool %94 %float_0_5 -OpBranch %96 -%96 = OpLabel -%98 = OpPhi %bool %false %89 %97 %95 -OpStore %ok %98 -OpStore %f2 %100 -%101 = OpAccessChain %_ptr_Function_float %f2 %int_0 -%103 = OpLoad %float %101 -%104 = OpFAdd %float %103 %float_1 -OpStore %101 %104 -%105 = OpLoad %bool %ok -OpSelectionMerge %107 None -OpBranchConditional %105 %106 %107 -%106 = OpLabel -%108 = OpAccessChain %_ptr_Function_float %f2 %int_0 -%109 = OpLoad %float %108 -%110 = OpFAdd %float %109 %float_1 -OpStore %108 %110 -%111 = OpFOrdEqual %bool %109 %float_1_5 -OpBranch %107 -%107 = OpLabel -%112 = OpPhi %bool %false %96 %111 %106 -OpStore %ok %112 -OpSelectionMerge %114 None -OpBranchConditional %112 %113 %114 -%113 = OpLabel -%115 = OpLoad %v2float %f2 -%116 = OpCompositeExtract %float %115 0 -%117 = OpFOrdEqual %bool %116 %float_2_5 -OpBranch %114 -%114 = OpLabel -%118 = OpPhi %bool %false %107 %117 %113 -OpStore %ok %118 -OpSelectionMerge %120 None -OpBranchConditional %118 %119 %120 -%119 = OpLabel -%121 = OpAccessChain %_ptr_Function_float %f2 %int_0 -%122 = OpLoad %float %121 -%123 = OpFSub %float %122 %float_1 -OpStore %121 %123 -%124 = OpFOrdEqual %bool %122 %float_2_5 -OpBranch %120 -%120 = OpLabel -%125 = OpPhi %bool %false %114 %124 %119 -OpStore %ok %125 -OpSelectionMerge %127 None -OpBranchConditional %125 %126 %127 -%126 = OpLabel -%128 = OpLoad %v2float %f2 -%129 = OpCompositeExtract %float %128 0 -%130 = OpFOrdEqual %bool %129 %float_1_5 -OpBranch %127 -%127 = OpLabel -%131 = OpPhi %bool %false %120 %130 %126 -OpStore %ok %131 -%132 = OpAccessChain %_ptr_Function_float %f2 %int_0 -%133 = OpLoad %float %132 -%134 = OpFSub %float %133 %float_1 -OpStore %132 %134 -%135 = OpLoad %bool %ok -OpSelectionMerge %137 None -OpBranchConditional %135 %136 %137 -%136 = OpLabel -%138 = OpLoad %v2float %f2 -%139 = OpCompositeExtract %float %138 0 -%140 = OpFOrdEqual %bool %139 %float_0_5 -OpBranch %137 -%137 = OpLabel -%141 = OpPhi %bool %false %127 %140 %136 -OpStore %ok %141 -OpSelectionMerge %146 None -OpBranchConditional %141 %144 %145 -%144 = OpLabel -%147 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%149 = OpLoad %v4float %147 -OpStore %142 %149 -OpBranch %146 -%145 = OpLabel -%150 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%151 = OpLoad %v4float %150 -OpStore %142 %151 -OpBranch %146 -%146 = OpLabel -%152 = OpLoad %v4float %142 -OpReturnValue %152 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %ok = OpVariable %_ptr_Function_bool Function + %i = OpVariable %_ptr_Function_int Function + %f = OpVariable %_ptr_Function_float Function + %f2 = OpVariable %_ptr_Function_v2float Function + %142 = OpVariable %_ptr_Function_v4float Function + OpStore %ok %true + OpStore %i %int_5 + %34 = OpIAdd %int %int_5 %int_1 + OpStore %i %34 + OpSelectionMerge %37 None + OpBranchConditional %true %36 %37 + %36 = OpLabel + %38 = OpIAdd %int %34 %int_1 + OpStore %i %38 + %40 = OpIEqual %bool %34 %int_6 + OpBranch %37 + %37 = OpLabel + %41 = OpPhi %bool %false %25 %40 %36 + OpStore %ok %41 + OpSelectionMerge %43 None + OpBranchConditional %41 %42 %43 + %42 = OpLabel + %44 = OpLoad %int %i + %46 = OpIEqual %bool %44 %int_7 + OpBranch %43 + %43 = OpLabel + %47 = OpPhi %bool %false %37 %46 %42 + OpStore %ok %47 + OpSelectionMerge %49 None + OpBranchConditional %47 %48 %49 + %48 = OpLabel + %50 = OpLoad %int %i + %51 = OpISub %int %50 %int_1 + OpStore %i %51 + %52 = OpIEqual %bool %50 %int_7 + OpBranch %49 + %49 = OpLabel + %53 = OpPhi %bool %false %43 %52 %48 + OpStore %ok %53 + OpSelectionMerge %55 None + OpBranchConditional %53 %54 %55 + %54 = OpLabel + %56 = OpLoad %int %i + %57 = OpIEqual %bool %56 %int_6 + OpBranch %55 + %55 = OpLabel + %58 = OpPhi %bool %false %49 %57 %54 + OpStore %ok %58 + %59 = OpLoad %int %i + %60 = OpISub %int %59 %int_1 + OpStore %i %60 + OpSelectionMerge %62 None + OpBranchConditional %58 %61 %62 + %61 = OpLabel + %63 = OpIEqual %bool %60 %int_5 + OpBranch %62 + %62 = OpLabel + %64 = OpPhi %bool %false %55 %63 %61 + OpStore %ok %64 + OpStore %f %float_0_5 + %69 = OpFAdd %float %float_0_5 %float_1 + OpStore %f %69 + OpSelectionMerge %71 None + OpBranchConditional %64 %70 %71 + %70 = OpLabel + %72 = OpFAdd %float %69 %float_1 + OpStore %f %72 + %74 = OpFOrdEqual %bool %69 %float_1_5 + OpBranch %71 + %71 = OpLabel + %75 = OpPhi %bool %false %62 %74 %70 + OpStore %ok %75 + OpSelectionMerge %77 None + OpBranchConditional %75 %76 %77 + %76 = OpLabel + %78 = OpLoad %float %f + %80 = OpFOrdEqual %bool %78 %float_2_5 + OpBranch %77 + %77 = OpLabel + %81 = OpPhi %bool %false %71 %80 %76 + OpStore %ok %81 + OpSelectionMerge %83 None + OpBranchConditional %81 %82 %83 + %82 = OpLabel + %84 = OpLoad %float %f + %85 = OpFSub %float %84 %float_1 + OpStore %f %85 + %86 = OpFOrdEqual %bool %84 %float_2_5 + OpBranch %83 + %83 = OpLabel + %87 = OpPhi %bool %false %77 %86 %82 + OpStore %ok %87 + OpSelectionMerge %89 None + OpBranchConditional %87 %88 %89 + %88 = OpLabel + %90 = OpLoad %float %f + %91 = OpFOrdEqual %bool %90 %float_1_5 + OpBranch %89 + %89 = OpLabel + %92 = OpPhi %bool %false %83 %91 %88 + OpStore %ok %92 + %93 = OpLoad %float %f + %94 = OpFSub %float %93 %float_1 + OpStore %f %94 + OpSelectionMerge %96 None + OpBranchConditional %92 %95 %96 + %95 = OpLabel + %97 = OpFOrdEqual %bool %94 %float_0_5 + OpBranch %96 + %96 = OpLabel + %98 = OpPhi %bool %false %89 %97 %95 + OpStore %ok %98 + OpStore %f2 %100 + %101 = OpAccessChain %_ptr_Function_float %f2 %int_0 + %103 = OpLoad %float %101 + %104 = OpFAdd %float %103 %float_1 + OpStore %101 %104 + %105 = OpLoad %bool %ok + OpSelectionMerge %107 None + OpBranchConditional %105 %106 %107 + %106 = OpLabel + %108 = OpAccessChain %_ptr_Function_float %f2 %int_0 + %109 = OpLoad %float %108 + %110 = OpFAdd %float %109 %float_1 + OpStore %108 %110 + %111 = OpFOrdEqual %bool %109 %float_1_5 + OpBranch %107 + %107 = OpLabel + %112 = OpPhi %bool %false %96 %111 %106 + OpStore %ok %112 + OpSelectionMerge %114 None + OpBranchConditional %112 %113 %114 + %113 = OpLabel + %115 = OpLoad %v2float %f2 + %116 = OpCompositeExtract %float %115 0 + %117 = OpFOrdEqual %bool %116 %float_2_5 + OpBranch %114 + %114 = OpLabel + %118 = OpPhi %bool %false %107 %117 %113 + OpStore %ok %118 + OpSelectionMerge %120 None + OpBranchConditional %118 %119 %120 + %119 = OpLabel + %121 = OpAccessChain %_ptr_Function_float %f2 %int_0 + %122 = OpLoad %float %121 + %123 = OpFSub %float %122 %float_1 + OpStore %121 %123 + %124 = OpFOrdEqual %bool %122 %float_2_5 + OpBranch %120 + %120 = OpLabel + %125 = OpPhi %bool %false %114 %124 %119 + OpStore %ok %125 + OpSelectionMerge %127 None + OpBranchConditional %125 %126 %127 + %126 = OpLabel + %128 = OpLoad %v2float %f2 + %129 = OpCompositeExtract %float %128 0 + %130 = OpFOrdEqual %bool %129 %float_1_5 + OpBranch %127 + %127 = OpLabel + %131 = OpPhi %bool %false %120 %130 %126 + OpStore %ok %131 + %132 = OpAccessChain %_ptr_Function_float %f2 %int_0 + %133 = OpLoad %float %132 + %134 = OpFSub %float %133 %float_1 + OpStore %132 %134 + %135 = OpLoad %bool %ok + OpSelectionMerge %137 None + OpBranchConditional %135 %136 %137 + %136 = OpLabel + %138 = OpLoad %v2float %f2 + %139 = OpCompositeExtract %float %138 0 + %140 = OpFOrdEqual %bool %139 %float_0_5 + OpBranch %137 + %137 = OpLabel + %141 = OpPhi %bool %false %127 %140 %136 + OpStore %ok %141 + OpSelectionMerge %146 None + OpBranchConditional %141 %144 %145 + %144 = OpLabel + %147 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %149 = OpLoad %v4float %147 + OpStore %142 %149 + OpBranch %146 + %145 = OpLabel + %150 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %151 = OpLoad %v4float %150 + OpStore %142 %151 + OpBranch %146 + %146 = OpLabel + %152 = OpLoad %v4float %142 + OpReturnValue %152 + OpFunctionEnd diff --git a/tests/sksl/shared/PostfixExpressions.skrp b/tests/sksl/shared/PostfixExpressions.skrp index f97854e3bc50..ecaae37ff460 100644 --- a/tests/sksl/shared/PostfixExpressions.skrp +++ b/tests/sksl/shared/PostfixExpressions.skrp @@ -1,3 +1,5 @@ +133 instructions + store_src_rg c = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_constant ok = 0xFFFFFFFF diff --git a/tests/sksl/shared/PostfixExpressions.wgsl b/tests/sksl/shared/PostfixExpressions.wgsl index ad5d68ca6bc5..389ef38a0740 100644 --- a/tests/sksl/shared/PostfixExpressions.wgsl +++ b/tests/sksl/shared/PostfixExpressions.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -20,72 +21,72 @@ fn main(_skParam0: vec2) -> vec4 { if ok { let _skTemp1 = i; i = i + i32(1); - _skTemp0 = _skTemp1 == 6; + _skTemp0 = (_skTemp1 == 6); } else { _skTemp0 = false; } ok = _skTemp0; - ok = ok && i == 7; + ok = ok && (i == 7); var _skTemp2: bool; if ok { let _skTemp3 = i; i = i - i32(1); - _skTemp2 = _skTemp3 == 7; + _skTemp2 = (_skTemp3 == 7); } else { _skTemp2 = false; } ok = _skTemp2; - ok = ok && i == 6; + ok = ok && (i == 6); i = i - i32(1); - ok = ok && i == 5; + ok = ok && (i == 5); var f: f32 = 0.5; f = f + f32(1); var _skTemp4: bool; if ok { let _skTemp5 = f; f = f + f32(1); - _skTemp4 = _skTemp5 == 1.5; + _skTemp4 = (_skTemp5 == 1.5); } else { _skTemp4 = false; } ok = _skTemp4; - ok = ok && f == 2.5; + ok = ok && (f == 2.5); var _skTemp6: bool; if ok { let _skTemp7 = f; f = f - f32(1); - _skTemp6 = _skTemp7 == 2.5; + _skTemp6 = (_skTemp7 == 2.5); } else { _skTemp6 = false; } ok = _skTemp6; - ok = ok && f == 1.5; + ok = ok && (f == 1.5); f = f - f32(1); - ok = ok && f == 0.5; + ok = ok && (f == 0.5); var f2: vec2 = vec2(0.5); f2.x = f2.x + f32(1); var _skTemp8: bool; if ok { let _skTemp9 = f2.x; f2.x = f2.x + f32(1); - _skTemp8 = _skTemp9 == 1.5; + _skTemp8 = (_skTemp9 == 1.5); } else { _skTemp8 = false; } ok = _skTemp8; - ok = ok && f2.x == 2.5; + ok = ok && (f2.x == 2.5); var _skTemp10: bool; if ok { let _skTemp11 = f2.x; f2.x = f2.x - f32(1); - _skTemp10 = _skTemp11 == 2.5; + _skTemp10 = (_skTemp11 == 2.5); } else { _skTemp10 = false; } ok = _skTemp10; - ok = ok && f2.x == 1.5; + ok = ok && (f2.x == 1.5); f2.x = f2.x - f32(1); - ok = ok && f2.x == 0.5; + ok = ok && (f2.x == 0.5); return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(ok)); } } diff --git a/tests/sksl/shared/PrefixExpressionsES2.asm.frag b/tests/sksl/shared/PrefixExpressionsES2.asm.frag index 7c1138ccf04c..5df675af67a2 100644 --- a/tests/sksl/shared/PrefixExpressionsES2.asm.frag +++ b/tests/sksl/shared/PrefixExpressionsES2.asm.frag @@ -1,350 +1,350 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpMemberName %_UniformBuffer 2 "testMatrix2x2" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %ok "ok" -OpName %i "i" -OpName %f "f" -OpName %f2 "f2" -OpName %iv "iv" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 ColMajor -OpMemberDecorate %_UniformBuffer 2 MatrixStride 16 -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %94 RelaxedPrecision -OpDecorate %118 RelaxedPrecision -OpDecorate %129 RelaxedPrecision -OpDecorate %130 RelaxedPrecision -OpDecorate %137 RelaxedPrecision -OpDecorate %138 RelaxedPrecision -OpDecorate %139 RelaxedPrecision -OpDecorate %146 RelaxedPrecision -OpDecorate %147 RelaxedPrecision -OpDecorate %203 RelaxedPrecision -OpDecorate %205 RelaxedPrecision -OpDecorate %206 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpMemberName %_UniformBuffer 2 "testMatrix2x2" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %ok "ok" + OpName %i "i" + OpName %f "f" + OpName %f2 "f2" + OpName %iv "iv" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 ColMajor + OpMemberDecorate %_UniformBuffer 2 MatrixStride 16 + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %94 RelaxedPrecision + OpDecorate %118 RelaxedPrecision + OpDecorate %129 RelaxedPrecision + OpDecorate %130 RelaxedPrecision + OpDecorate %137 RelaxedPrecision + OpDecorate %138 RelaxedPrecision + OpDecorate %139 RelaxedPrecision + OpDecorate %146 RelaxedPrecision + OpDecorate %147 RelaxedPrecision + OpDecorate %203 RelaxedPrecision + OpDecorate %205 RelaxedPrecision + OpDecorate %206 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%v2float = OpTypeVector %float 2 + %v2float = OpTypeVector %float 2 %mat2v2float = OpTypeMatrix %v2float 2 %_UniformBuffer = OpTypeStruct %v4float %v4float %mat2v2float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%17 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%20 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %17 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %20 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%24 = OpTypeFunction %v4float %_ptr_Function_v2float + %24 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_bool = OpTypePointer Function %bool -%true = OpConstantTrue %bool -%int = OpTypeInt 32 1 + %true = OpConstantTrue %bool + %int = OpTypeInt 32 1 %_ptr_Function_int = OpTypePointer Function %int -%int_5 = OpConstant %int 5 -%int_1 = OpConstant %int 1 -%false = OpConstantFalse %bool -%int_6 = OpConstant %int 6 -%int_7 = OpConstant %int 7 + %int_5 = OpConstant %int 5 + %int_1 = OpConstant %int 1 + %false = OpConstantFalse %bool + %int_6 = OpConstant %int 6 + %int_7 = OpConstant %int 7 %_ptr_Function_float = OpTypePointer Function %float -%float_0_5 = OpConstant %float 0.5 -%float_1 = OpConstant %float 1 -%float_1_5 = OpConstant %float 1.5 -%float_2_5 = OpConstant %float 2.5 -%89 = OpConstantComposite %v2float %float_0_5 %float_0_5 -%int_0 = OpConstant %int 0 + %float_0_5 = OpConstant %float 0.5 + %float_1 = OpConstant %float 1 + %float_1_5 = OpConstant %float 1.5 + %float_2_5 = OpConstant %float 2.5 + %89 = OpConstantComposite %v2float %float_0_5 %float_0_5 + %int_0 = OpConstant %int 0 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%float_n1 = OpConstant %float -1 -%144 = OpConstantComposite %v4float %float_0 %float_n1 %float_0 %float_n1 -%v4bool = OpTypeVector %bool 4 -%float_n2 = OpConstant %float -2 -%float_n3 = OpConstant %float -3 -%float_n4 = OpConstant %float -4 -%157 = OpConstantComposite %v2float %float_n1 %float_n2 -%158 = OpConstantComposite %v2float %float_n3 %float_n4 -%159 = OpConstantComposite %mat2v2float %157 %158 + %float_n1 = OpConstant %float -1 + %144 = OpConstantComposite %v4float %float_0 %float_n1 %float_0 %float_n1 + %v4bool = OpTypeVector %bool 4 + %float_n2 = OpConstant %float -2 + %float_n3 = OpConstant %float -3 + %float_n4 = OpConstant %float -4 + %157 = OpConstantComposite %v2float %float_n1 %float_n2 + %158 = OpConstantComposite %v2float %float_n3 %float_n4 + %159 = OpConstantComposite %mat2v2float %157 %158 %_ptr_Uniform_mat2v2float = OpTypePointer Uniform %mat2v2float -%int_2 = OpConstant %int 2 -%v2bool = OpTypeVector %bool 2 -%v2int = OpTypeVector %int 2 + %int_2 = OpConstant %int 2 + %v2bool = OpTypeVector %bool 2 + %v2int = OpTypeVector %int 2 %_ptr_Function_v2int = OpTypePointer Function %v2int -%int_n5 = OpConstant %int -5 -%193 = OpConstantComposite %v2int %int_n5 %int_5 + %int_n5 = OpConstant %int -5 + %193 = OpConstantComposite %v2int %int_n5 %int_5 %_ptr_Function_v4float = OpTypePointer Function %v4float %_entrypoint_v = OpFunction %void None %17 -%18 = OpLabel -%21 = OpVariable %_ptr_Function_v2float Function -OpStore %21 %20 -%23 = OpFunctionCall %v4float %main %21 -OpStore %sk_FragColor %23 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %24 -%25 = OpFunctionParameter %_ptr_Function_v2float -%26 = OpLabel -%ok = OpVariable %_ptr_Function_bool Function -%i = OpVariable %_ptr_Function_int Function -%f = OpVariable %_ptr_Function_float Function -%f2 = OpVariable %_ptr_Function_v2float Function -%iv = OpVariable %_ptr_Function_v2int Function -%197 = OpVariable %_ptr_Function_v4float Function -OpStore %ok %true -OpStore %i %int_5 -%35 = OpIAdd %int %int_5 %int_1 -OpStore %i %35 -OpSelectionMerge %38 None -OpBranchConditional %true %37 %38 -%37 = OpLabel -%40 = OpIEqual %bool %35 %int_6 -OpBranch %38 -%38 = OpLabel -%41 = OpPhi %bool %false %26 %40 %37 -OpStore %ok %41 -OpSelectionMerge %43 None -OpBranchConditional %41 %42 %43 -%42 = OpLabel -%44 = OpIAdd %int %35 %int_1 -OpStore %i %44 -%46 = OpIEqual %bool %44 %int_7 -OpBranch %43 -%43 = OpLabel -%47 = OpPhi %bool %false %38 %46 %42 -OpStore %ok %47 -OpSelectionMerge %49 None -OpBranchConditional %47 %48 %49 -%48 = OpLabel -%50 = OpLoad %int %i -%51 = OpISub %int %50 %int_1 -OpStore %i %51 -%52 = OpIEqual %bool %51 %int_6 -OpBranch %49 -%49 = OpLabel -%53 = OpPhi %bool %false %43 %52 %48 -OpStore %ok %53 -%54 = OpLoad %int %i -%55 = OpISub %int %54 %int_1 -OpStore %i %55 -OpSelectionMerge %57 None -OpBranchConditional %53 %56 %57 -%56 = OpLabel -%58 = OpIEqual %bool %55 %int_5 -OpBranch %57 -%57 = OpLabel -%59 = OpPhi %bool %false %49 %58 %56 -OpStore %ok %59 -OpStore %f %float_0_5 -%64 = OpFAdd %float %float_0_5 %float_1 -OpStore %f %64 -OpSelectionMerge %66 None -OpBranchConditional %59 %65 %66 -%65 = OpLabel -%68 = OpFOrdEqual %bool %64 %float_1_5 -OpBranch %66 -%66 = OpLabel -%69 = OpPhi %bool %false %57 %68 %65 -OpStore %ok %69 -OpSelectionMerge %71 None -OpBranchConditional %69 %70 %71 -%70 = OpLabel -%72 = OpFAdd %float %64 %float_1 -OpStore %f %72 -%74 = OpFOrdEqual %bool %72 %float_2_5 -OpBranch %71 -%71 = OpLabel -%75 = OpPhi %bool %false %66 %74 %70 -OpStore %ok %75 -OpSelectionMerge %77 None -OpBranchConditional %75 %76 %77 -%76 = OpLabel -%78 = OpLoad %float %f -%79 = OpFSub %float %78 %float_1 -OpStore %f %79 -%80 = OpFOrdEqual %bool %79 %float_1_5 -OpBranch %77 -%77 = OpLabel -%81 = OpPhi %bool %false %71 %80 %76 -OpStore %ok %81 -%82 = OpLoad %float %f -%83 = OpFSub %float %82 %float_1 -OpStore %f %83 -OpSelectionMerge %85 None -OpBranchConditional %81 %84 %85 -%84 = OpLabel -%86 = OpFOrdEqual %bool %83 %float_0_5 -OpBranch %85 -%85 = OpLabel -%87 = OpPhi %bool %false %77 %86 %84 -OpStore %ok %87 -OpStore %f2 %89 -%90 = OpAccessChain %_ptr_Function_float %f2 %int_0 -%92 = OpLoad %float %90 -%93 = OpFAdd %float %92 %float_1 -OpStore %90 %93 -%94 = OpLoad %bool %ok -OpSelectionMerge %96 None -OpBranchConditional %94 %95 %96 -%95 = OpLabel -%97 = OpLoad %v2float %f2 -%98 = OpCompositeExtract %float %97 0 -%99 = OpFOrdEqual %bool %98 %float_1_5 -OpBranch %96 -%96 = OpLabel -%100 = OpPhi %bool %false %85 %99 %95 -OpStore %ok %100 -OpSelectionMerge %102 None -OpBranchConditional %100 %101 %102 -%101 = OpLabel -%103 = OpAccessChain %_ptr_Function_float %f2 %int_0 -%104 = OpLoad %float %103 -%105 = OpFAdd %float %104 %float_1 -OpStore %103 %105 -%106 = OpFOrdEqual %bool %105 %float_2_5 -OpBranch %102 -%102 = OpLabel -%107 = OpPhi %bool %false %96 %106 %101 -OpStore %ok %107 -OpSelectionMerge %109 None -OpBranchConditional %107 %108 %109 -%108 = OpLabel -%110 = OpAccessChain %_ptr_Function_float %f2 %int_0 -%111 = OpLoad %float %110 -%112 = OpFSub %float %111 %float_1 -OpStore %110 %112 -%113 = OpFOrdEqual %bool %112 %float_1_5 -OpBranch %109 -%109 = OpLabel -%114 = OpPhi %bool %false %102 %113 %108 -OpStore %ok %114 -%115 = OpAccessChain %_ptr_Function_float %f2 %int_0 -%116 = OpLoad %float %115 -%117 = OpFSub %float %116 %float_1 -OpStore %115 %117 -%118 = OpLoad %bool %ok -OpSelectionMerge %120 None -OpBranchConditional %118 %119 %120 -%119 = OpLabel -%121 = OpLoad %v2float %f2 -%122 = OpCompositeExtract %float %121 0 -%123 = OpFOrdEqual %bool %122 %float_0_5 -OpBranch %120 -%120 = OpLabel -%124 = OpPhi %bool %false %109 %123 %119 -OpStore %ok %124 -OpSelectionMerge %126 None -OpBranchConditional %124 %125 %126 -%125 = OpLabel -%127 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%129 = OpLoad %v4float %127 -%130 = OpCompositeExtract %float %129 0 -%131 = OpFUnordNotEqual %bool %130 %float_1 -OpBranch %126 -%126 = OpLabel -%132 = OpPhi %bool %false %120 %131 %125 -OpStore %ok %132 -OpSelectionMerge %134 None -OpBranchConditional %132 %133 %134 -%133 = OpLabel -%136 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%137 = OpLoad %v4float %136 -%138 = OpCompositeExtract %float %137 1 -%139 = OpFNegate %float %138 -%140 = OpFOrdEqual %bool %float_n1 %139 -OpBranch %134 -%134 = OpLabel -%141 = OpPhi %bool %false %126 %140 %133 -OpStore %ok %141 -OpSelectionMerge %143 None -OpBranchConditional %141 %142 %143 -%142 = OpLabel -%145 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%146 = OpLoad %v4float %145 -%147 = OpFNegate %v4float %146 -%148 = OpFOrdEqual %v4bool %144 %147 -%150 = OpAll %bool %148 -OpBranch %143 -%143 = OpLabel -%151 = OpPhi %bool %false %134 %150 %142 -OpStore %ok %151 -OpSelectionMerge %153 None -OpBranchConditional %151 %152 %153 -%152 = OpLabel -%160 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2 -%163 = OpLoad %mat2v2float %160 -%164 = OpCompositeExtract %v2float %163 0 -%165 = OpFNegate %v2float %164 -%166 = OpCompositeExtract %v2float %163 1 -%167 = OpFNegate %v2float %166 -%168 = OpCompositeConstruct %mat2v2float %165 %167 -%170 = OpFOrdEqual %v2bool %157 %165 -%171 = OpAll %bool %170 -%172 = OpFOrdEqual %v2bool %158 %167 -%173 = OpAll %bool %172 -%174 = OpLogicalAnd %bool %171 %173 -OpBranch %153 -%153 = OpLabel -%175 = OpPhi %bool %false %143 %174 %152 -OpStore %ok %175 -%179 = OpLoad %int %i -%180 = OpLoad %int %i -%181 = OpSNegate %int %180 -%182 = OpCompositeConstruct %v2int %179 %181 -OpStore %iv %182 -OpSelectionMerge %184 None -OpBranchConditional %175 %183 %184 -%183 = OpLabel -%185 = OpLoad %int %i -%186 = OpSNegate %int %185 -%188 = OpIEqual %bool %186 %int_n5 -OpBranch %184 -%184 = OpLabel -%189 = OpPhi %bool %false %153 %188 %183 -OpStore %ok %189 -OpSelectionMerge %191 None -OpBranchConditional %189 %190 %191 -%190 = OpLabel -%192 = OpSNegate %v2int %182 -%194 = OpIEqual %v2bool %192 %193 -%195 = OpAll %bool %194 -OpBranch %191 -%191 = OpLabel -%196 = OpPhi %bool %false %184 %195 %190 -OpStore %ok %196 -OpSelectionMerge %201 None -OpBranchConditional %196 %199 %200 -%199 = OpLabel -%202 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%203 = OpLoad %v4float %202 -OpStore %197 %203 -OpBranch %201 -%200 = OpLabel -%204 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%205 = OpLoad %v4float %204 -OpStore %197 %205 -OpBranch %201 -%201 = OpLabel -%206 = OpLoad %v4float %197 -OpReturnValue %206 -OpFunctionEnd + %18 = OpLabel + %21 = OpVariable %_ptr_Function_v2float Function + OpStore %21 %20 + %23 = OpFunctionCall %v4float %main %21 + OpStore %sk_FragColor %23 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %24 + %25 = OpFunctionParameter %_ptr_Function_v2float + %26 = OpLabel + %ok = OpVariable %_ptr_Function_bool Function + %i = OpVariable %_ptr_Function_int Function + %f = OpVariable %_ptr_Function_float Function + %f2 = OpVariable %_ptr_Function_v2float Function + %iv = OpVariable %_ptr_Function_v2int Function + %197 = OpVariable %_ptr_Function_v4float Function + OpStore %ok %true + OpStore %i %int_5 + %35 = OpIAdd %int %int_5 %int_1 + OpStore %i %35 + OpSelectionMerge %38 None + OpBranchConditional %true %37 %38 + %37 = OpLabel + %40 = OpIEqual %bool %35 %int_6 + OpBranch %38 + %38 = OpLabel + %41 = OpPhi %bool %false %26 %40 %37 + OpStore %ok %41 + OpSelectionMerge %43 None + OpBranchConditional %41 %42 %43 + %42 = OpLabel + %44 = OpIAdd %int %35 %int_1 + OpStore %i %44 + %46 = OpIEqual %bool %44 %int_7 + OpBranch %43 + %43 = OpLabel + %47 = OpPhi %bool %false %38 %46 %42 + OpStore %ok %47 + OpSelectionMerge %49 None + OpBranchConditional %47 %48 %49 + %48 = OpLabel + %50 = OpLoad %int %i + %51 = OpISub %int %50 %int_1 + OpStore %i %51 + %52 = OpIEqual %bool %51 %int_6 + OpBranch %49 + %49 = OpLabel + %53 = OpPhi %bool %false %43 %52 %48 + OpStore %ok %53 + %54 = OpLoad %int %i + %55 = OpISub %int %54 %int_1 + OpStore %i %55 + OpSelectionMerge %57 None + OpBranchConditional %53 %56 %57 + %56 = OpLabel + %58 = OpIEqual %bool %55 %int_5 + OpBranch %57 + %57 = OpLabel + %59 = OpPhi %bool %false %49 %58 %56 + OpStore %ok %59 + OpStore %f %float_0_5 + %64 = OpFAdd %float %float_0_5 %float_1 + OpStore %f %64 + OpSelectionMerge %66 None + OpBranchConditional %59 %65 %66 + %65 = OpLabel + %68 = OpFOrdEqual %bool %64 %float_1_5 + OpBranch %66 + %66 = OpLabel + %69 = OpPhi %bool %false %57 %68 %65 + OpStore %ok %69 + OpSelectionMerge %71 None + OpBranchConditional %69 %70 %71 + %70 = OpLabel + %72 = OpFAdd %float %64 %float_1 + OpStore %f %72 + %74 = OpFOrdEqual %bool %72 %float_2_5 + OpBranch %71 + %71 = OpLabel + %75 = OpPhi %bool %false %66 %74 %70 + OpStore %ok %75 + OpSelectionMerge %77 None + OpBranchConditional %75 %76 %77 + %76 = OpLabel + %78 = OpLoad %float %f + %79 = OpFSub %float %78 %float_1 + OpStore %f %79 + %80 = OpFOrdEqual %bool %79 %float_1_5 + OpBranch %77 + %77 = OpLabel + %81 = OpPhi %bool %false %71 %80 %76 + OpStore %ok %81 + %82 = OpLoad %float %f + %83 = OpFSub %float %82 %float_1 + OpStore %f %83 + OpSelectionMerge %85 None + OpBranchConditional %81 %84 %85 + %84 = OpLabel + %86 = OpFOrdEqual %bool %83 %float_0_5 + OpBranch %85 + %85 = OpLabel + %87 = OpPhi %bool %false %77 %86 %84 + OpStore %ok %87 + OpStore %f2 %89 + %90 = OpAccessChain %_ptr_Function_float %f2 %int_0 + %92 = OpLoad %float %90 + %93 = OpFAdd %float %92 %float_1 + OpStore %90 %93 + %94 = OpLoad %bool %ok + OpSelectionMerge %96 None + OpBranchConditional %94 %95 %96 + %95 = OpLabel + %97 = OpLoad %v2float %f2 + %98 = OpCompositeExtract %float %97 0 + %99 = OpFOrdEqual %bool %98 %float_1_5 + OpBranch %96 + %96 = OpLabel + %100 = OpPhi %bool %false %85 %99 %95 + OpStore %ok %100 + OpSelectionMerge %102 None + OpBranchConditional %100 %101 %102 + %101 = OpLabel + %103 = OpAccessChain %_ptr_Function_float %f2 %int_0 + %104 = OpLoad %float %103 + %105 = OpFAdd %float %104 %float_1 + OpStore %103 %105 + %106 = OpFOrdEqual %bool %105 %float_2_5 + OpBranch %102 + %102 = OpLabel + %107 = OpPhi %bool %false %96 %106 %101 + OpStore %ok %107 + OpSelectionMerge %109 None + OpBranchConditional %107 %108 %109 + %108 = OpLabel + %110 = OpAccessChain %_ptr_Function_float %f2 %int_0 + %111 = OpLoad %float %110 + %112 = OpFSub %float %111 %float_1 + OpStore %110 %112 + %113 = OpFOrdEqual %bool %112 %float_1_5 + OpBranch %109 + %109 = OpLabel + %114 = OpPhi %bool %false %102 %113 %108 + OpStore %ok %114 + %115 = OpAccessChain %_ptr_Function_float %f2 %int_0 + %116 = OpLoad %float %115 + %117 = OpFSub %float %116 %float_1 + OpStore %115 %117 + %118 = OpLoad %bool %ok + OpSelectionMerge %120 None + OpBranchConditional %118 %119 %120 + %119 = OpLabel + %121 = OpLoad %v2float %f2 + %122 = OpCompositeExtract %float %121 0 + %123 = OpFOrdEqual %bool %122 %float_0_5 + OpBranch %120 + %120 = OpLabel + %124 = OpPhi %bool %false %109 %123 %119 + OpStore %ok %124 + OpSelectionMerge %126 None + OpBranchConditional %124 %125 %126 + %125 = OpLabel + %127 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %129 = OpLoad %v4float %127 + %130 = OpCompositeExtract %float %129 0 + %131 = OpFUnordNotEqual %bool %130 %float_1 + OpBranch %126 + %126 = OpLabel + %132 = OpPhi %bool %false %120 %131 %125 + OpStore %ok %132 + OpSelectionMerge %134 None + OpBranchConditional %132 %133 %134 + %133 = OpLabel + %136 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %137 = OpLoad %v4float %136 + %138 = OpCompositeExtract %float %137 1 + %139 = OpFNegate %float %138 + %140 = OpFOrdEqual %bool %float_n1 %139 + OpBranch %134 + %134 = OpLabel + %141 = OpPhi %bool %false %126 %140 %133 + OpStore %ok %141 + OpSelectionMerge %143 None + OpBranchConditional %141 %142 %143 + %142 = OpLabel + %145 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %146 = OpLoad %v4float %145 + %147 = OpFNegate %v4float %146 + %148 = OpFOrdEqual %v4bool %144 %147 + %150 = OpAll %bool %148 + OpBranch %143 + %143 = OpLabel + %151 = OpPhi %bool %false %134 %150 %142 + OpStore %ok %151 + OpSelectionMerge %153 None + OpBranchConditional %151 %152 %153 + %152 = OpLabel + %160 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2 + %163 = OpLoad %mat2v2float %160 + %164 = OpCompositeExtract %v2float %163 0 + %165 = OpFNegate %v2float %164 + %166 = OpCompositeExtract %v2float %163 1 + %167 = OpFNegate %v2float %166 + %168 = OpCompositeConstruct %mat2v2float %165 %167 + %170 = OpFOrdEqual %v2bool %157 %165 + %171 = OpAll %bool %170 + %172 = OpFOrdEqual %v2bool %158 %167 + %173 = OpAll %bool %172 + %174 = OpLogicalAnd %bool %171 %173 + OpBranch %153 + %153 = OpLabel + %175 = OpPhi %bool %false %143 %174 %152 + OpStore %ok %175 + %179 = OpLoad %int %i + %180 = OpLoad %int %i + %181 = OpSNegate %int %180 + %182 = OpCompositeConstruct %v2int %179 %181 + OpStore %iv %182 + OpSelectionMerge %184 None + OpBranchConditional %175 %183 %184 + %183 = OpLabel + %185 = OpLoad %int %i + %186 = OpSNegate %int %185 + %188 = OpIEqual %bool %186 %int_n5 + OpBranch %184 + %184 = OpLabel + %189 = OpPhi %bool %false %153 %188 %183 + OpStore %ok %189 + OpSelectionMerge %191 None + OpBranchConditional %189 %190 %191 + %190 = OpLabel + %192 = OpSNegate %v2int %182 + %194 = OpIEqual %v2bool %192 %193 + %195 = OpAll %bool %194 + OpBranch %191 + %191 = OpLabel + %196 = OpPhi %bool %false %184 %195 %190 + OpStore %ok %196 + OpSelectionMerge %201 None + OpBranchConditional %196 %199 %200 + %199 = OpLabel + %202 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %203 = OpLoad %v4float %202 + OpStore %197 %203 + OpBranch %201 + %200 = OpLabel + %204 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %205 = OpLoad %v4float %204 + OpStore %197 %205 + OpBranch %201 + %201 = OpLabel + %206 = OpLoad %v4float %197 + OpReturnValue %206 + OpFunctionEnd diff --git a/tests/sksl/shared/PrefixExpressionsES2.skrp b/tests/sksl/shared/PrefixExpressionsES2.skrp index 60160e168bb7..ddab04628f86 100644 --- a/tests/sksl/shared/PrefixExpressionsES2.skrp +++ b/tests/sksl/shared/PrefixExpressionsES2.skrp @@ -1,3 +1,17 @@ +161 instructions + +[immutable slots] +i0 = 0 +i1 = 0xBF800000 (-1.0) +i2 = 0 +i3 = 0xBF800000 (-1.0) +i4 = 0xBF800000 (-1.0) +i5 = 0xC0000000 (-2.0) +i6 = 0xC0400000 (-3.0) +i7 = 0xC0800000 (-4.0) +i8 = 0xFFFFFFFB +i9 = 0x00000005 (7.006492e-45) + store_src_rg v0..1 = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_constant ok = 0xFFFFFFFF @@ -125,10 +139,7 @@ bitwise_xor_imm_int $1 ^= 0x80000000 cmpeq_imm_float $1 = equal($1, 0xBF800000 (-1.0)) bitwise_and_int $0 &= $1 copy_slot_unmasked ok = $0 -copy_constant $1 = 0 -copy_constant $2 = 0xBF800000 (-1.0) -copy_constant $3 = 0 -copy_constant $4 = 0xBF800000 (-1.0) +copy_4_immutables_unmasked $1..4 = i0..3 [0, 0xBF800000 (-1.0), 0, 0xBF800000 (-1.0)] copy_4_uniforms $5..8 = colorGreen splat_4_constants $9..12 = 0x80000000 (-0.0) bitwise_xor_4_ints $5..8 ^= $9..12 @@ -137,10 +148,7 @@ bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_slot_unmasked ok = $0 -copy_constant $1 = 0xBF800000 (-1.0) -copy_constant $2 = 0xC0000000 (-2.0) -copy_constant $3 = 0xC0400000 (-3.0) -copy_constant $4 = 0xC0800000 (-4.0) +copy_4_immutables_unmasked $1..4 = i4..7 [0xBF800000 (-1.0), 0xC0000000 (-2.0), 0xC0400000 (-3.0), 0xC0800000 (-4.0)] copy_4_uniforms $5..8 = testMatrix2x2 splat_4_constants $9..12 = 0x80000000 (-0.0) bitwise_xor_4_ints $5..8 ^= $9..12 @@ -161,8 +169,7 @@ copy_slot_unmasked ok = $0 copy_2_slots_unmasked $1..2 = iv splat_2_constants $3..4 = 0xFFFFFFFF mul_2_ints $1..2 *= $3..4 -copy_constant $3 = 0xFFFFFFFB -copy_constant $4 = 0x00000005 (7.006492e-45) +copy_2_immutables_unmasked $3..4 = i8..9 [0xFFFFFFFB, 0x00000005 (7.006492e-45)] cmpeq_2_ints $1..2 = equal($1..2, $3..4) bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 diff --git a/tests/sksl/shared/PrefixExpressionsES2.wgsl b/tests/sksl/shared/PrefixExpressionsES2.wgsl index d305601b5625..3cd96520df12 100644 --- a/tests/sksl/shared/PrefixExpressionsES2.wgsl +++ b/tests/sksl/shared/PrefixExpressionsES2.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -16,11 +17,11 @@ fn main(_skParam0: vec2) -> vec4 { var ok: bool = true; var i: i32 = 5; i = i + i32(1); - ok = ok && i == 6; + ok = ok && (i == 6); var _skTemp0: bool; if ok { i = i + i32(1); - _skTemp0 = i == 7; + _skTemp0 = (i == 7); } else { _skTemp0 = false; } @@ -28,20 +29,20 @@ fn main(_skParam0: vec2) -> vec4 { var _skTemp1: bool; if ok { i = i - i32(1); - _skTemp1 = i == 6; + _skTemp1 = (i == 6); } else { _skTemp1 = false; } ok = _skTemp1; i = i - i32(1); - ok = ok && i == 5; + ok = ok && (i == 5); var f: f32 = 0.5; f = f + f32(1); - ok = ok && f == 1.5; + ok = ok && (f == 1.5); var _skTemp2: bool; if ok { f = f + f32(1); - _skTemp2 = f == 2.5; + _skTemp2 = (f == 2.5); } else { _skTemp2 = false; } @@ -49,20 +50,20 @@ fn main(_skParam0: vec2) -> vec4 { var _skTemp3: bool; if ok { f = f - f32(1); - _skTemp3 = f == 1.5; + _skTemp3 = (f == 1.5); } else { _skTemp3 = false; } ok = _skTemp3; f = f - f32(1); - ok = ok && f == 0.5; + ok = ok && (f == 0.5); var f2: vec2 = vec2(0.5); f2.x = f2.x + f32(1); - ok = ok && f2.x == 1.5; + ok = ok && (f2.x == 1.5); var _skTemp4: bool; if ok { f2.x = f2.x + f32(1); - _skTemp4 = f2.x == 2.5; + _skTemp4 = (f2.x == 2.5); } else { _skTemp4 = false; } @@ -70,22 +71,22 @@ fn main(_skParam0: vec2) -> vec4 { var _skTemp5: bool; if ok { f2.x = f2.x - f32(1); - _skTemp5 = f2.x == 1.5; + _skTemp5 = (f2.x == 1.5); } else { _skTemp5 = false; } ok = _skTemp5; f2.x = f2.x - f32(1); - ok = ok && f2.x == 0.5; - ok = ok && _globalUniforms.colorGreen.x != 1.0; - ok = ok && -1.0 == -_globalUniforms.colorGreen.y; - ok = ok && all(vec4(0.0, -1.0, 0.0, -1.0) == -_globalUniforms.colorGreen); + ok = ok && (f2.x == 0.5); + ok = ok && (_globalUniforms.colorGreen.x != 1.0); + ok = ok && (-1.0 == (-_globalUniforms.colorGreen.y)); + ok = ok && all(vec4(0.0, -1.0, 0.0, -1.0) == (-_globalUniforms.colorGreen)); let _skTemp6 = mat2x2(-1.0, -2.0, -3.0, -4.0); let _skTemp7 = (-1.0 * _globalUniforms.testMatrix2x2); ok = ok && (all(_skTemp6[0] == _skTemp7[0]) && all(_skTemp6[1] == _skTemp7[1])); var iv: vec2 = vec2(i, -i); - ok = ok && -i == -5; - ok = ok && all(-iv == vec2(-5, 5)); + ok = ok && ((-i) == -5); + ok = ok && all((-iv) == vec2(-5, 5)); return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(ok)); } } diff --git a/tests/sksl/shared/PrefixExpressionsES3.asm.frag b/tests/sksl/shared/PrefixExpressionsES3.asm.frag index bb09b3e67cd9..433cccf60258 100644 --- a/tests/sksl/shared/PrefixExpressionsES3.asm.frag +++ b/tests/sksl/shared/PrefixExpressionsES3.asm.frag @@ -1,132 +1,132 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %ok "ok" -OpName %val "val" -OpName %mask "mask" -OpName %imask "imask" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %76 RelaxedPrecision -OpDecorate %79 RelaxedPrecision -OpDecorate %80 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %ok "ok" + OpName %val "val" + OpName %mask "mask" + OpName %imask "imask" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %76 RelaxedPrecision + OpDecorate %79 RelaxedPrecision + OpDecorate %80 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_bool = OpTypePointer Function %bool -%true = OpConstantTrue %bool -%uint = OpTypeInt 32 0 + %true = OpConstantTrue %bool + %uint = OpTypeInt 32 0 %_ptr_Function_uint = OpTypePointer Function %uint %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%v2uint = OpTypeVector %uint 2 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %v2uint = OpTypeVector %uint 2 %_ptr_Function_v2uint = OpTypePointer Function %v2uint -%v2int = OpTypeVector %int 2 + %v2int = OpTypeVector %int 2 %_ptr_Function_v2int = OpTypePointer Function %v2int -%false = OpConstantFalse %bool -%uint_0 = OpConstant %uint 0 -%65 = OpConstantComposite %v2uint %uint_0 %uint_0 -%v2bool = OpTypeVector %bool 2 + %false = OpConstantFalse %bool + %uint_0 = OpConstant %uint 0 + %65 = OpConstantComposite %v2uint %uint_0 %uint_0 + %v2bool = OpTypeVector %bool 2 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_1 = OpConstant %int 1 + %int_1 = OpConstant %int 1 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%ok = OpVariable %_ptr_Function_bool Function -%val = OpVariable %_ptr_Function_uint Function -%mask = OpVariable %_ptr_Function_v2uint Function -%imask = OpVariable %_ptr_Function_v2int Function -%70 = OpVariable %_ptr_Function_v4float Function -OpStore %ok %true -%32 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%36 = OpLoad %v4float %32 -%37 = OpCompositeExtract %float %36 0 -%38 = OpConvertFToU %uint %37 -OpStore %val %38 -%42 = OpNot %uint %38 -%43 = OpCompositeConstruct %v2uint %38 %42 -OpStore %mask %43 -%47 = OpNot %v2uint %43 -%48 = OpCompositeExtract %uint %47 0 -%49 = OpBitcast %int %48 -%50 = OpCompositeExtract %uint %47 1 -%51 = OpBitcast %int %50 -%52 = OpCompositeConstruct %v2int %49 %51 -OpStore %imask %52 -%53 = OpNot %v2uint %43 -%54 = OpNot %v2int %52 -%55 = OpCompositeExtract %int %54 0 -%56 = OpBitcast %uint %55 -%57 = OpCompositeExtract %int %54 1 -%58 = OpBitcast %uint %57 -%59 = OpCompositeConstruct %v2uint %56 %58 -%60 = OpBitwiseAnd %v2uint %53 %59 -OpStore %mask %60 -OpSelectionMerge %63 None -OpBranchConditional %true %62 %63 -%62 = OpLabel -%66 = OpIEqual %v2bool %60 %65 -%68 = OpAll %bool %66 -OpBranch %63 -%63 = OpLabel -%69 = OpPhi %bool %false %25 %68 %62 -OpStore %ok %69 -OpSelectionMerge %74 None -OpBranchConditional %69 %72 %73 -%72 = OpLabel -%75 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%76 = OpLoad %v4float %75 -OpStore %70 %76 -OpBranch %74 -%73 = OpLabel -%77 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%79 = OpLoad %v4float %77 -OpStore %70 %79 -OpBranch %74 -%74 = OpLabel -%80 = OpLoad %v4float %70 -OpReturnValue %80 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %ok = OpVariable %_ptr_Function_bool Function + %val = OpVariable %_ptr_Function_uint Function + %mask = OpVariable %_ptr_Function_v2uint Function + %imask = OpVariable %_ptr_Function_v2int Function + %70 = OpVariable %_ptr_Function_v4float Function + OpStore %ok %true + %32 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %36 = OpLoad %v4float %32 + %37 = OpCompositeExtract %float %36 0 + %38 = OpConvertFToU %uint %37 + OpStore %val %38 + %42 = OpNot %uint %38 + %43 = OpCompositeConstruct %v2uint %38 %42 + OpStore %mask %43 + %47 = OpNot %v2uint %43 + %48 = OpCompositeExtract %uint %47 0 + %49 = OpBitcast %int %48 + %50 = OpCompositeExtract %uint %47 1 + %51 = OpBitcast %int %50 + %52 = OpCompositeConstruct %v2int %49 %51 + OpStore %imask %52 + %53 = OpNot %v2uint %43 + %54 = OpNot %v2int %52 + %55 = OpCompositeExtract %int %54 0 + %56 = OpBitcast %uint %55 + %57 = OpCompositeExtract %int %54 1 + %58 = OpBitcast %uint %57 + %59 = OpCompositeConstruct %v2uint %56 %58 + %60 = OpBitwiseAnd %v2uint %53 %59 + OpStore %mask %60 + OpSelectionMerge %63 None + OpBranchConditional %true %62 %63 + %62 = OpLabel + %66 = OpIEqual %v2bool %60 %65 + %68 = OpAll %bool %66 + OpBranch %63 + %63 = OpLabel + %69 = OpPhi %bool %false %25 %68 %62 + OpStore %ok %69 + OpSelectionMerge %74 None + OpBranchConditional %69 %72 %73 + %72 = OpLabel + %75 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %76 = OpLoad %v4float %75 + OpStore %70 %76 + OpBranch %74 + %73 = OpLabel + %77 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %79 = OpLoad %v4float %77 + OpStore %70 %79 + OpBranch %74 + %74 = OpLabel + %80 = OpLoad %v4float %70 + OpReturnValue %80 + OpFunctionEnd diff --git a/tests/sksl/shared/PrefixExpressionsES3.skrp b/tests/sksl/shared/PrefixExpressionsES3.skrp index 110c089ccf86..5be13f41b17f 100644 --- a/tests/sksl/shared/PrefixExpressionsES3.skrp +++ b/tests/sksl/shared/PrefixExpressionsES3.skrp @@ -1,3 +1,5 @@ +32 instructions + store_src_rg v0..1 = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_constant ok = 0xFFFFFFFF diff --git a/tests/sksl/shared/PrefixExpressionsES3.wgsl b/tests/sksl/shared/PrefixExpressionsES3.wgsl index 346e5e9b6e02..b3eb8941750a 100644 --- a/tests/sksl/shared/PrefixExpressionsES3.wgsl +++ b/tests/sksl/shared/PrefixExpressionsES3.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -16,7 +17,7 @@ fn main(_skParam0: vec2) -> vec4 { var val: u32 = u32(_globalUniforms.colorGreen.x); var mask: vec2 = vec2(val, ~val); var imask: vec2 = vec2(~mask); - mask = ~mask & vec2(~imask); + mask = (~mask) & vec2(~imask); ok = ok && all(mask == vec2(0u)); return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(ok)); } diff --git a/tests/sksl/shared/RectangleTexture.asm.frag b/tests/sksl/shared/RectangleTexture.asm.frag index 9246d7813439..2627bb7b0ac1 100644 --- a/tests/sksl/shared/RectangleTexture.asm.frag +++ b/tests/sksl/shared/RectangleTexture.asm.frag @@ -1,55 +1,55 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %test2D "test2D" -OpName %test2DRect "test2DRect" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %test2D RelaxedPrecision -OpDecorate %test2D Binding 0 -OpDecorate %test2D DescriptorSet 0 -OpDecorate %test2DRect RelaxedPrecision -OpDecorate %test2DRect Binding 1 -OpDecorate %test2DRect DescriptorSet 0 -OpDecorate %19 RelaxedPrecision -OpDecorate %24 RelaxedPrecision -OpDecorate %26 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %test2D "test2D" + OpName %test2DRect "test2DRect" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %test2D RelaxedPrecision + OpDecorate %test2D Binding 0 + OpDecorate %test2D DescriptorSet 0 + OpDecorate %test2DRect RelaxedPrecision + OpDecorate %test2DRect Binding 1 + OpDecorate %test2DRect DescriptorSet 0 + OpDecorate %19 RelaxedPrecision + OpDecorate %24 RelaxedPrecision + OpDecorate %26 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%11 = OpTypeImage %float 2D 0 0 0 1 Unknown -%12 = OpTypeSampledImage %11 + %11 = OpTypeImage %float 2D 0 0 0 1 Unknown + %12 = OpTypeSampledImage %11 %_ptr_UniformConstant_12 = OpTypePointer UniformConstant %12 -%test2D = OpVariable %_ptr_UniformConstant_12 UniformConstant -%test2DRect = OpVariable %_ptr_UniformConstant_12 UniformConstant -%void = OpTypeVoid -%16 = OpTypeFunction %void -%float_0_5 = OpConstant %float 0.5 -%v2float = OpTypeVector %float 2 -%22 = OpConstantComposite %v2float %float_0_5 %float_0_5 -%v3float = OpTypeVector %float 3 -%28 = OpConstantComposite %v3float %float_0_5 %float_0_5 %float_0_5 -%main = OpFunction %void None %16 -%17 = OpLabel -%19 = OpLoad %12 %test2D -%18 = OpImageSampleImplicitLod %v4float %19 %22 -OpStore %sk_FragColor %18 -%24 = OpLoad %12 %test2DRect -%23 = OpImageSampleImplicitLod %v4float %24 %22 -OpStore %sk_FragColor %23 -%26 = OpLoad %12 %test2DRect -%25 = OpImageSampleProjImplicitLod %v4float %26 %28 -OpStore %sk_FragColor %25 -OpReturn -OpFunctionEnd + %test2D = OpVariable %_ptr_UniformConstant_12 UniformConstant + %test2DRect = OpVariable %_ptr_UniformConstant_12 UniformConstant + %void = OpTypeVoid + %16 = OpTypeFunction %void + %float_0_5 = OpConstant %float 0.5 + %v2float = OpTypeVector %float 2 + %22 = OpConstantComposite %v2float %float_0_5 %float_0_5 + %v3float = OpTypeVector %float 3 + %28 = OpConstantComposite %v3float %float_0_5 %float_0_5 %float_0_5 + %main = OpFunction %void None %16 + %17 = OpLabel + %19 = OpLoad %12 %test2D + %18 = OpImageSampleImplicitLod %v4float %19 %22 + OpStore %sk_FragColor %18 + %24 = OpLoad %12 %test2DRect + %23 = OpImageSampleImplicitLod %v4float %24 %22 + OpStore %sk_FragColor %23 + %26 = OpLoad %12 %test2DRect + %25 = OpImageSampleProjImplicitLod %v4float %26 %28 + OpStore %sk_FragColor %25 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/RectangleTexture.wgsl b/tests/sksl/shared/RectangleTexture.wgsl new file mode 100644 index 000000000000..b8c87a4afb18 --- /dev/null +++ b/tests/sksl/shared/RectangleTexture.wgsl @@ -0,0 +1,24 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +@group(0) @binding(10000) var test2D_Sampler: sampler; +@group(0) @binding(10001) var test2D_Texture: texture_2d; +@group(0) @binding(10002) var test2DRect_Sampler: sampler; +@group(0) @binding(10003) var test2DRect_Texture: texture_2d; +fn main(_stageOut: ptr) { + { + (*_stageOut).sk_FragColor = textureSample(test2D_Texture, test2D_Sampler, vec2(0.5)); + (*_stageOut).sk_FragColor = textureSample(test2DRect_Texture, test2DRect_Sampler, vec2(0.5)); + let _skTemp4 = vec3(0.5); + (*_stageOut).sk_FragColor = textureSample(test2DRect_Texture, test2DRect_Sampler, _skTemp4.xy / _skTemp4.z); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(&_stageOut); + return _stageOut; +} diff --git a/tests/sksl/shared/ResizeMatrix.asm.frag b/tests/sksl/shared/ResizeMatrix.asm.frag index a9bc7cbebb1c..5f42bb78836a 100644 --- a/tests/sksl/shared/ResizeMatrix.asm.frag +++ b/tests/sksl/shared/ResizeMatrix.asm.frag @@ -1,168 +1,168 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %result "result" -OpName %a "a" -OpName %b "b" -OpName %c "c" -OpName %d "d" -OpName %e "e" -OpName %f "f" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %107 RelaxedPrecision -OpDecorate %110 RelaxedPrecision -OpDecorate %111 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %result "result" + OpName %a "a" + OpName %b "b" + OpName %c "c" + OpName %d "d" + OpName %e "e" + OpName %f "f" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %107 RelaxedPrecision + OpDecorate %110 RelaxedPrecision + OpDecorate %111 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_float = OpTypePointer Function %float %mat2v2float = OpTypeMatrix %v2float 2 %_ptr_Function_mat2v2float = OpTypePointer Function %mat2v2float -%float_1 = OpConstant %float 1 -%v3float = OpTypeVector %float 3 -%33 = OpConstantComposite %v3float %float_1 %float_0 %float_0 -%34 = OpConstantComposite %v3float %float_0 %float_1 %float_0 -%35 = OpConstantComposite %v3float %float_0 %float_0 %float_1 + %float_1 = OpConstant %float 1 + %v3float = OpTypeVector %float 3 + %33 = OpConstantComposite %v3float %float_1 %float_0 %float_0 + %34 = OpConstantComposite %v3float %float_0 %float_1 %float_0 + %35 = OpConstantComposite %v3float %float_0 %float_0 %float_1 %mat3v3float = OpTypeMatrix %v3float 3 -%37 = OpConstantComposite %mat3v3float %33 %34 %35 -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%48 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_0 -%49 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_0 -%50 = OpConstantComposite %v4float %float_0 %float_0 %float_1 %float_0 -%51 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_1 + %37 = OpConstantComposite %mat3v3float %33 %34 %35 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %48 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_0 + %49 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_0 + %50 = OpConstantComposite %v4float %float_0 %float_0 %float_1 %float_0 + %51 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_1 %mat4v4float = OpTypeMatrix %v4float 4 -%53 = OpConstantComposite %mat4v4float %48 %49 %50 %51 + %53 = OpConstantComposite %mat4v4float %48 %49 %50 %51 %_ptr_Function_mat3v3float = OpTypePointer Function %mat3v3float %_ptr_Function_v3float = OpTypePointer Function %v3float -%73 = OpConstantComposite %v2float %float_1 %float_0 -%74 = OpConstantComposite %v2float %float_0 %float_1 -%75 = OpConstantComposite %mat2v2float %73 %74 + %73 = OpConstantComposite %v2float %float_1 %float_0 + %74 = OpConstantComposite %v2float %float_0 %float_1 + %75 = OpConstantComposite %mat2v2float %73 %74 %_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float %_ptr_Function_v4float = OpTypePointer Function %v4float -%float_6 = OpConstant %float 6 + %float_6 = OpConstant %float 6 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_1 = OpConstant %int 1 + %int_1 = OpConstant %int 1 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%result = OpVariable %_ptr_Function_float Function -%a = OpVariable %_ptr_Function_mat2v2float Function -%b = OpVariable %_ptr_Function_mat2v2float Function -%c = OpVariable %_ptr_Function_mat3v3float Function -%d = OpVariable %_ptr_Function_mat3v3float Function -%e = OpVariable %_ptr_Function_mat4v4float Function -%f = OpVariable %_ptr_Function_mat2v2float Function -%101 = OpVariable %_ptr_Function_v4float Function -OpStore %result %float_0 -%38 = OpVectorShuffle %v2float %33 %33 0 1 -%39 = OpVectorShuffle %v2float %34 %34 0 1 -%40 = OpCompositeConstruct %mat2v2float %38 %39 -OpStore %a %40 -%43 = OpAccessChain %_ptr_Function_v2float %a %int_0 -%44 = OpLoad %v2float %43 -%45 = OpCompositeExtract %float %44 0 -%46 = OpFAdd %float %float_0 %45 -OpStore %result %46 -%54 = OpVectorShuffle %v2float %48 %48 0 1 -%55 = OpVectorShuffle %v2float %49 %49 0 1 -%56 = OpCompositeConstruct %mat2v2float %54 %55 -OpStore %b %56 -%57 = OpAccessChain %_ptr_Function_v2float %b %int_0 -%58 = OpLoad %v2float %57 -%59 = OpCompositeExtract %float %58 0 -%60 = OpFAdd %float %46 %59 -OpStore %result %60 -%63 = OpVectorShuffle %v3float %48 %48 0 1 2 -%64 = OpVectorShuffle %v3float %49 %49 0 1 2 -%65 = OpVectorShuffle %v3float %50 %50 0 1 2 -%66 = OpCompositeConstruct %mat3v3float %63 %64 %65 -OpStore %c %66 -%67 = OpAccessChain %_ptr_Function_v3float %c %int_0 -%69 = OpLoad %v3float %67 -%70 = OpCompositeExtract %float %69 0 -%71 = OpFAdd %float %60 %70 -OpStore %result %71 -OpStore %d %37 -%76 = OpAccessChain %_ptr_Function_v3float %d %int_0 -%77 = OpLoad %v3float %76 -%78 = OpCompositeExtract %float %77 0 -%79 = OpFAdd %float %71 %78 -OpStore %result %79 -OpStore %e %53 -%82 = OpAccessChain %_ptr_Function_v4float %e %int_0 -%84 = OpLoad %v4float %82 -%85 = OpCompositeExtract %float %84 0 -%86 = OpFAdd %float %79 %85 -OpStore %result %86 -%88 = OpVectorShuffle %v3float %48 %48 0 1 2 -%89 = OpVectorShuffle %v3float %49 %49 0 1 2 -%90 = OpVectorShuffle %v3float %50 %50 0 1 2 -%91 = OpCompositeConstruct %mat3v3float %88 %89 %90 -%92 = OpVectorShuffle %v2float %88 %88 0 1 -%93 = OpVectorShuffle %v2float %89 %89 0 1 -%94 = OpCompositeConstruct %mat2v2float %92 %93 -OpStore %f %94 -%95 = OpAccessChain %_ptr_Function_v2float %f %int_0 -%96 = OpLoad %v2float %95 -%97 = OpCompositeExtract %float %96 0 -%98 = OpFAdd %float %86 %97 -OpStore %result %98 -%100 = OpFOrdEqual %bool %98 %float_6 -OpSelectionMerge %104 None -OpBranchConditional %100 %102 %103 -%102 = OpLabel -%105 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%107 = OpLoad %v4float %105 -OpStore %101 %107 -OpBranch %104 -%103 = OpLabel -%108 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%110 = OpLoad %v4float %108 -OpStore %101 %110 -OpBranch %104 -%104 = OpLabel -%111 = OpLoad %v4float %101 -OpReturnValue %111 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %result = OpVariable %_ptr_Function_float Function + %a = OpVariable %_ptr_Function_mat2v2float Function + %b = OpVariable %_ptr_Function_mat2v2float Function + %c = OpVariable %_ptr_Function_mat3v3float Function + %d = OpVariable %_ptr_Function_mat3v3float Function + %e = OpVariable %_ptr_Function_mat4v4float Function + %f = OpVariable %_ptr_Function_mat2v2float Function + %101 = OpVariable %_ptr_Function_v4float Function + OpStore %result %float_0 + %38 = OpVectorShuffle %v2float %33 %33 0 1 + %39 = OpVectorShuffle %v2float %34 %34 0 1 + %40 = OpCompositeConstruct %mat2v2float %38 %39 + OpStore %a %40 + %43 = OpAccessChain %_ptr_Function_v2float %a %int_0 + %44 = OpLoad %v2float %43 + %45 = OpCompositeExtract %float %44 0 + %46 = OpFAdd %float %float_0 %45 + OpStore %result %46 + %54 = OpVectorShuffle %v2float %48 %48 0 1 + %55 = OpVectorShuffle %v2float %49 %49 0 1 + %56 = OpCompositeConstruct %mat2v2float %54 %55 + OpStore %b %56 + %57 = OpAccessChain %_ptr_Function_v2float %b %int_0 + %58 = OpLoad %v2float %57 + %59 = OpCompositeExtract %float %58 0 + %60 = OpFAdd %float %46 %59 + OpStore %result %60 + %63 = OpVectorShuffle %v3float %48 %48 0 1 2 + %64 = OpVectorShuffle %v3float %49 %49 0 1 2 + %65 = OpVectorShuffle %v3float %50 %50 0 1 2 + %66 = OpCompositeConstruct %mat3v3float %63 %64 %65 + OpStore %c %66 + %67 = OpAccessChain %_ptr_Function_v3float %c %int_0 + %69 = OpLoad %v3float %67 + %70 = OpCompositeExtract %float %69 0 + %71 = OpFAdd %float %60 %70 + OpStore %result %71 + OpStore %d %37 + %76 = OpAccessChain %_ptr_Function_v3float %d %int_0 + %77 = OpLoad %v3float %76 + %78 = OpCompositeExtract %float %77 0 + %79 = OpFAdd %float %71 %78 + OpStore %result %79 + OpStore %e %53 + %82 = OpAccessChain %_ptr_Function_v4float %e %int_0 + %84 = OpLoad %v4float %82 + %85 = OpCompositeExtract %float %84 0 + %86 = OpFAdd %float %79 %85 + OpStore %result %86 + %88 = OpVectorShuffle %v3float %48 %48 0 1 2 + %89 = OpVectorShuffle %v3float %49 %49 0 1 2 + %90 = OpVectorShuffle %v3float %50 %50 0 1 2 + %91 = OpCompositeConstruct %mat3v3float %88 %89 %90 + %92 = OpVectorShuffle %v2float %88 %88 0 1 + %93 = OpVectorShuffle %v2float %89 %89 0 1 + %94 = OpCompositeConstruct %mat2v2float %92 %93 + OpStore %f %94 + %95 = OpAccessChain %_ptr_Function_v2float %f %int_0 + %96 = OpLoad %v2float %95 + %97 = OpCompositeExtract %float %96 0 + %98 = OpFAdd %float %86 %97 + OpStore %result %98 + %100 = OpFOrdEqual %bool %98 %float_6 + OpSelectionMerge %104 None + OpBranchConditional %100 %102 %103 + %102 = OpLabel + %105 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %107 = OpLoad %v4float %105 + OpStore %101 %107 + OpBranch %104 + %103 = OpLabel + %108 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %110 = OpLoad %v4float %108 + OpStore %101 %110 + OpBranch %104 + %104 = OpLabel + %111 = OpLoad %v4float %101 + OpReturnValue %111 + OpFunctionEnd diff --git a/tests/sksl/shared/ResizeMatrix.skrp b/tests/sksl/shared/ResizeMatrix.skrp index 80fa8861bb03..8a78e34d6e5f 100644 --- a/tests/sksl/shared/ResizeMatrix.skrp +++ b/tests/sksl/shared/ResizeMatrix.skrp @@ -1,75 +1,58 @@ +30 instructions + [immutable slots] -a(0) = 0x3F800000 (1.0) -a(1) = 0 -a(2) = 0 -a(3) = 0x3F800000 (1.0) -b(0) = 0x3F800000 (1.0) -b(1) = 0 -b(2) = 0 -b(3) = 0x3F800000 (1.0) -c(0) = 0x3F800000 (1.0) -c(1) = 0 -c(2) = 0 -c(3) = 0 -c(4) = 0x3F800000 (1.0) -c(5) = 0 -c(6) = 0 -c(7) = 0 -c(8) = 0x3F800000 (1.0) -d(0) = 0x3F800000 (1.0) -d(1) = 0 -d(2) = 0 -d(3) = 0 -d(4) = 0x3F800000 (1.0) -d(5) = 0 -d(6) = 0 -d(7) = 0 -d(8) = 0x3F800000 (1.0) -e(0) = 0x3F800000 (1.0) -e(1) = 0 -e(2) = 0 -e(3) = 0 -e(4) = 0 -e(5) = 0x3F800000 (1.0) -e(6) = 0 -e(7) = 0 -e(8) = 0 -e(9) = 0 -e(10) = 0x3F800000 (1.0) -e(11) = 0 -e(12) = 0 -e(13) = 0 -e(14) = 0 -e(15) = 0x3F800000 (1.0) -f(0) = 0x3F800000 (1.0) -f(1) = 0 -f(2) = 0 -f(3) = 0x3F800000 (1.0) +i0 = 0x3F800000 (1.0) +i1 = 0 +i2 = 0 +i3 = 0x3F800000 (1.0) +i4 = 0x3F800000 (1.0) +i5 = 0 +i6 = 0 +i7 = 0 +i8 = 0x3F800000 (1.0) +i9 = 0 +i10 = 0 +i11 = 0 +i12 = 0x3F800000 (1.0) +i13 = 0x3F800000 (1.0) +i14 = 0 +i15 = 0 +i16 = 0 +i17 = 0 +i18 = 0x3F800000 (1.0) +i19 = 0 +i20 = 0 +i21 = 0 +i22 = 0 +i23 = 0x3F800000 (1.0) +i24 = 0 +i25 = 0 +i26 = 0 +i27 = 0 +i28 = 0x3F800000 (1.0) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_constant result = 0 -copy_2_slots_unmasked $0..1 = result, a(0) +copy_slot_unmasked $0 = result +copy_immutable_unmasked $1 = i0 [0x3F800000 (1.0)] add_float $0 += $1 copy_slot_unmasked result = $0 -copy_slot_unmasked $0 = result -copy_slot_unmasked $1 = b(0) +copy_immutable_unmasked $1 = i0 [0x3F800000 (1.0)] add_float $0 += $1 copy_slot_unmasked result = $0 copy_slot_unmasked $0 = result -copy_slot_unmasked $1 = c(0) +copy_immutable_unmasked $1 = i4 [0x3F800000 (1.0)] add_float $0 += $1 copy_slot_unmasked result = $0 -copy_slot_unmasked $0 = result -copy_slot_unmasked $1 = d(0) +copy_immutable_unmasked $1 = i4 [0x3F800000 (1.0)] add_float $0 += $1 copy_slot_unmasked result = $0 copy_slot_unmasked $0 = result -copy_slot_unmasked $1 = e(0) +copy_immutable_unmasked $1 = i13 [0x3F800000 (1.0)] add_float $0 += $1 copy_slot_unmasked result = $0 -copy_slot_unmasked $0 = result -copy_slot_unmasked $1 = f(0) +copy_immutable_unmasked $1 = i0 [0x3F800000 (1.0)] add_float $0 += $1 copy_slot_unmasked result = $0 cmpeq_imm_float $0 = equal($0, 0x40C00000 (6.0)) diff --git a/tests/sksl/shared/ResizeMatrix.wgsl b/tests/sksl/shared/ResizeMatrix.wgsl new file mode 100644 index 000000000000..eeeaeaac39a5 --- /dev/null +++ b/tests/sksl/shared/ResizeMatrix.wgsl @@ -0,0 +1,45 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var result: f32 = 0.0; + let _skTemp0 = mat3x3(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0); + var a: mat2x2 = mat2x2(_skTemp0[0][0], _skTemp0[0][1], _skTemp0[1][0], _skTemp0[1][1]); + result = result + a[0].x; + let _skTemp1 = mat4x4(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0); + var b: mat2x2 = mat2x2(_skTemp1[0][0], _skTemp1[0][1], _skTemp1[1][0], _skTemp1[1][1]); + result = result + b[0].x; + let _skTemp2 = mat4x4(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0); + var c: mat3x3 = mat3x3(_skTemp2[0][0], _skTemp2[0][1], _skTemp2[0][2], _skTemp2[1][0], _skTemp2[1][1], _skTemp2[1][2], _skTemp2[2][0], _skTemp2[2][1], _skTemp2[2][2]); + result = result + c[0].x; + let _skTemp3 = mat2x2(1.0, 0.0, 0.0, 1.0); + var d: mat3x3 = mat3x3(_skTemp3[0][0], _skTemp3[0][1], 0.0, _skTemp3[1][0], _skTemp3[1][1], 0.0, 0.0, 0.0, 1.0); + result = result + d[0].x; + let _skTemp4 = mat2x2(1.0, 0.0, 0.0, 1.0); + let _skTemp5 = mat3x3(_skTemp4[0][0], _skTemp4[0][1], 0.0, _skTemp4[1][0], _skTemp4[1][1], 0.0, 0.0, 0.0, 1.0); + var e: mat4x4 = mat4x4(_skTemp5[0][0], _skTemp5[0][1], _skTemp5[0][2], 0.0, _skTemp5[1][0], _skTemp5[1][1], _skTemp5[1][2], 0.0, _skTemp5[2][0], _skTemp5[2][1], _skTemp5[2][2], 0.0, 0.0, 0.0, 0.0, 1.0); + result = result + e[0].x; + let _skTemp6 = mat4x4(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0); + let _skTemp7 = mat3x3(_skTemp6[0][0], _skTemp6[0][1], _skTemp6[0][2], _skTemp6[1][0], _skTemp6[1][1], _skTemp6[1][2], _skTemp6[2][0], _skTemp6[2][1], _skTemp6[2][2]); + var f: mat2x2 = mat2x2(_skTemp7[0][0], _skTemp7[0][1], _skTemp7[1][0], _skTemp7[1][1]); + result = result + f[0].x; + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((result == 6.0))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/ResizeMatrixNonsquare.asm.frag b/tests/sksl/shared/ResizeMatrixNonsquare.asm.frag index 4726d6ab09d2..a3bda43cd549 100644 --- a/tests/sksl/shared/ResizeMatrixNonsquare.asm.frag +++ b/tests/sksl/shared/ResizeMatrixNonsquare.asm.frag @@ -1,166 +1,166 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %result "result" -OpName %g "g" -OpName %h "h" -OpName %i "i" -OpName %j "j" -OpName %k "k" -OpName %l "l" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %105 RelaxedPrecision -OpDecorate %108 RelaxedPrecision -OpDecorate %109 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %result "result" + OpName %g "g" + OpName %h "h" + OpName %i "i" + OpName %j "j" + OpName %k "k" + OpName %l "l" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %105 RelaxedPrecision + OpDecorate %108 RelaxedPrecision + OpDecorate %109 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_float = OpTypePointer Function %float -%v3float = OpTypeVector %float 3 + %v3float = OpTypeVector %float 3 %mat3v3float = OpTypeMatrix %v3float 3 %_ptr_Function_mat3v3float = OpTypePointer Function %mat3v3float -%float_1 = OpConstant %float 1 -%33 = OpConstantComposite %v3float %float_1 %float_0 %float_0 -%34 = OpConstantComposite %v3float %float_0 %float_1 %float_0 + %float_1 = OpConstant %float 1 + %33 = OpConstantComposite %v3float %float_1 %float_0 %float_0 + %34 = OpConstantComposite %v3float %float_0 %float_1 %float_0 %mat2v3float = OpTypeMatrix %v3float 2 -%36 = OpConstantComposite %mat2v3float %33 %34 -%37 = OpConstantComposite %v3float %float_0 %float_0 %float_1 -%38 = OpConstantComposite %mat3v3float %33 %34 %37 -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 + %36 = OpConstantComposite %mat2v3float %33 %34 + %37 = OpConstantComposite %v3float %float_0 %float_0 %float_1 + %38 = OpConstantComposite %mat3v3float %33 %34 %37 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 %_ptr_Function_v3float = OpTypePointer Function %v3float -%47 = OpConstantComposite %v2float %float_1 %float_0 -%48 = OpConstantComposite %v2float %float_0 %float_1 + %47 = OpConstantComposite %v2float %float_1 %float_0 + %48 = OpConstantComposite %v2float %float_0 %float_1 %mat3v2float = OpTypeMatrix %v2float 3 -%50 = OpConstantComposite %mat3v2float %47 %48 %19 + %50 = OpConstantComposite %mat3v2float %47 %48 %19 %mat4v4float = OpTypeMatrix %v4float 4 %_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float %mat4v2float = OpTypeMatrix %v2float 4 -%59 = OpConstantComposite %mat4v2float %47 %48 %19 %19 -%60 = OpConstantComposite %v3float %float_0 %float_0 %float_0 + %59 = OpConstantComposite %mat4v2float %47 %48 %19 %19 + %60 = OpConstantComposite %v3float %float_0 %float_0 %float_0 %mat4v3float = OpTypeMatrix %v3float 4 -%62 = OpConstantComposite %mat4v3float %33 %34 %37 %60 -%63 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_0 -%64 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_0 -%65 = OpConstantComposite %v4float %float_0 %float_0 %float_1 %float_0 -%66 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_1 -%67 = OpConstantComposite %mat4v4float %63 %64 %65 %66 + %62 = OpConstantComposite %mat4v3float %33 %34 %37 %60 + %63 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_0 + %64 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_0 + %65 = OpConstantComposite %v4float %float_0 %float_0 %float_1 %float_0 + %66 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_1 + %67 = OpConstantComposite %mat4v4float %63 %64 %65 %66 %_ptr_Function_v4float = OpTypePointer Function %v4float %mat2v4float = OpTypeMatrix %v4float 2 -%75 = OpConstantComposite %mat2v4float %63 %64 + %75 = OpConstantComposite %mat2v4float %63 %64 %mat3v4float = OpTypeMatrix %v4float 3 -%77 = OpConstantComposite %mat3v4float %63 %64 %65 + %77 = OpConstantComposite %mat3v4float %63 %64 %65 %_ptr_Function_mat2v4float = OpTypePointer Function %mat2v4float %_ptr_Function_mat4v2float = OpTypePointer Function %mat4v2float -%float_6 = OpConstant %float 6 + %float_6 = OpConstant %float 6 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_1 = OpConstant %int 1 + %int_1 = OpConstant %int 1 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%result = OpVariable %_ptr_Function_float Function -%g = OpVariable %_ptr_Function_mat3v3float Function -%h = OpVariable %_ptr_Function_mat3v3float Function -%i = OpVariable %_ptr_Function_mat4v4float Function -%j = OpVariable %_ptr_Function_mat4v4float Function -%k = OpVariable %_ptr_Function_mat2v4float Function -%l = OpVariable %_ptr_Function_mat4v2float Function -%99 = OpVariable %_ptr_Function_v4float Function -OpStore %result %float_0 -OpStore %g %38 -%41 = OpAccessChain %_ptr_Function_v3float %g %int_0 -%43 = OpLoad %v3float %41 -%44 = OpCompositeExtract %float %43 0 -%45 = OpFAdd %float %float_0 %44 -OpStore %result %45 -OpStore %h %38 -%51 = OpAccessChain %_ptr_Function_v3float %h %int_0 -%52 = OpLoad %v3float %51 -%53 = OpCompositeExtract %float %52 0 -%54 = OpFAdd %float %45 %53 -OpStore %result %54 -OpStore %i %67 -%68 = OpAccessChain %_ptr_Function_v4float %i %int_0 -%70 = OpLoad %v4float %68 -%71 = OpCompositeExtract %float %70 0 -%72 = OpFAdd %float %54 %71 -OpStore %result %72 -OpStore %j %67 -%78 = OpAccessChain %_ptr_Function_v4float %j %int_0 -%79 = OpLoad %v4float %78 -%80 = OpCompositeExtract %float %79 0 -%81 = OpFAdd %float %72 %80 -OpStore %result %81 -OpStore %k %75 -%84 = OpAccessChain %_ptr_Function_v4float %k %int_0 -%85 = OpLoad %v4float %84 -%86 = OpCompositeExtract %float %85 0 -%87 = OpFAdd %float %81 %86 -OpStore %result %87 -%90 = OpVectorShuffle %v2float %63 %63 0 1 -%91 = OpVectorShuffle %v2float %64 %64 0 1 -%92 = OpCompositeConstruct %mat4v2float %90 %91 %19 %19 -OpStore %l %92 -%93 = OpAccessChain %_ptr_Function_v2float %l %int_0 -%94 = OpLoad %v2float %93 -%95 = OpCompositeExtract %float %94 0 -%96 = OpFAdd %float %87 %95 -OpStore %result %96 -%98 = OpFOrdEqual %bool %96 %float_6 -OpSelectionMerge %102 None -OpBranchConditional %98 %100 %101 -%100 = OpLabel -%103 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%105 = OpLoad %v4float %103 -OpStore %99 %105 -OpBranch %102 -%101 = OpLabel -%106 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%108 = OpLoad %v4float %106 -OpStore %99 %108 -OpBranch %102 -%102 = OpLabel -%109 = OpLoad %v4float %99 -OpReturnValue %109 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %result = OpVariable %_ptr_Function_float Function + %g = OpVariable %_ptr_Function_mat3v3float Function + %h = OpVariable %_ptr_Function_mat3v3float Function + %i = OpVariable %_ptr_Function_mat4v4float Function + %j = OpVariable %_ptr_Function_mat4v4float Function + %k = OpVariable %_ptr_Function_mat2v4float Function + %l = OpVariable %_ptr_Function_mat4v2float Function + %99 = OpVariable %_ptr_Function_v4float Function + OpStore %result %float_0 + OpStore %g %38 + %41 = OpAccessChain %_ptr_Function_v3float %g %int_0 + %43 = OpLoad %v3float %41 + %44 = OpCompositeExtract %float %43 0 + %45 = OpFAdd %float %float_0 %44 + OpStore %result %45 + OpStore %h %38 + %51 = OpAccessChain %_ptr_Function_v3float %h %int_0 + %52 = OpLoad %v3float %51 + %53 = OpCompositeExtract %float %52 0 + %54 = OpFAdd %float %45 %53 + OpStore %result %54 + OpStore %i %67 + %68 = OpAccessChain %_ptr_Function_v4float %i %int_0 + %70 = OpLoad %v4float %68 + %71 = OpCompositeExtract %float %70 0 + %72 = OpFAdd %float %54 %71 + OpStore %result %72 + OpStore %j %67 + %78 = OpAccessChain %_ptr_Function_v4float %j %int_0 + %79 = OpLoad %v4float %78 + %80 = OpCompositeExtract %float %79 0 + %81 = OpFAdd %float %72 %80 + OpStore %result %81 + OpStore %k %75 + %84 = OpAccessChain %_ptr_Function_v4float %k %int_0 + %85 = OpLoad %v4float %84 + %86 = OpCompositeExtract %float %85 0 + %87 = OpFAdd %float %81 %86 + OpStore %result %87 + %90 = OpVectorShuffle %v2float %63 %63 0 1 + %91 = OpVectorShuffle %v2float %64 %64 0 1 + %92 = OpCompositeConstruct %mat4v2float %90 %91 %19 %19 + OpStore %l %92 + %93 = OpAccessChain %_ptr_Function_v2float %l %int_0 + %94 = OpLoad %v2float %93 + %95 = OpCompositeExtract %float %94 0 + %96 = OpFAdd %float %87 %95 + OpStore %result %96 + %98 = OpFOrdEqual %bool %96 %float_6 + OpSelectionMerge %102 None + OpBranchConditional %98 %100 %101 + %100 = OpLabel + %103 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %105 = OpLoad %v4float %103 + OpStore %99 %105 + OpBranch %102 + %101 = OpLabel + %106 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %108 = OpLoad %v4float %106 + OpStore %99 %108 + OpBranch %102 + %102 = OpLabel + %109 = OpLoad %v4float %99 + OpReturnValue %109 + OpFunctionEnd diff --git a/tests/sksl/shared/ResizeMatrixNonsquare.skrp b/tests/sksl/shared/ResizeMatrixNonsquare.skrp index 2b238b322c97..18bfdec5ad66 100644 --- a/tests/sksl/shared/ResizeMatrixNonsquare.skrp +++ b/tests/sksl/shared/ResizeMatrixNonsquare.skrp @@ -1,95 +1,62 @@ +30 instructions + [immutable slots] -g(0) = 0x3F800000 (1.0) -g(1) = 0 -g(2) = 0 -g(3) = 0 -g(4) = 0x3F800000 (1.0) -g(5) = 0 -g(6) = 0 -g(7) = 0 -g(8) = 0x3F800000 (1.0) -h(0) = 0x3F800000 (1.0) -h(1) = 0 -h(2) = 0 -h(3) = 0 -h(4) = 0x3F800000 (1.0) -h(5) = 0 -h(6) = 0 -h(7) = 0 -h(8) = 0x3F800000 (1.0) -i(0) = 0x3F800000 (1.0) -i(1) = 0 -i(2) = 0 -i(3) = 0 -i(4) = 0 -i(5) = 0x3F800000 (1.0) -i(6) = 0 -i(7) = 0 -i(8) = 0 -i(9) = 0 -i(10) = 0x3F800000 (1.0) -i(11) = 0 -i(12) = 0 -i(13) = 0 -i(14) = 0 -i(15) = 0x3F800000 (1.0) -j(0) = 0x3F800000 (1.0) -j(1) = 0 -j(2) = 0 -j(3) = 0 -j(4) = 0 -j(5) = 0x3F800000 (1.0) -j(6) = 0 -j(7) = 0 -j(8) = 0 -j(9) = 0 -j(10) = 0x3F800000 (1.0) -j(11) = 0 -j(12) = 0 -j(13) = 0 -j(14) = 0 -j(15) = 0x3F800000 (1.0) -k(0) = 0x3F800000 (1.0) -k(1) = 0 -k(2) = 0 -k(3) = 0 -k(4) = 0 -k(5) = 0x3F800000 (1.0) -k(6) = 0 -k(7) = 0 -l(0) = 0x3F800000 (1.0) -l(1) = 0 -l(2) = 0 -l(3) = 0x3F800000 (1.0) -l(4) = 0 -l(5) = 0 -l(6) = 0 -l(7) = 0 +i0 = 0x3F800000 (1.0) +i1 = 0 +i2 = 0 +i3 = 0 +i4 = 0x3F800000 (1.0) +i5 = 0 +i6 = 0 +i7 = 0 +i8 = 0x3F800000 (1.0) +i9 = 0x3F800000 (1.0) +i10 = 0 +i11 = 0 +i12 = 0 +i13 = 0 +i14 = 0x3F800000 (1.0) +i15 = 0 +i16 = 0 +i17 = 0 +i18 = 0 +i19 = 0x3F800000 (1.0) +i20 = 0 +i21 = 0 +i22 = 0 +i23 = 0 +i24 = 0x3F800000 (1.0) +i25 = 0x3F800000 (1.0) +i26 = 0 +i27 = 0 +i28 = 0x3F800000 (1.0) +i29 = 0 +i30 = 0 +i31 = 0 +i32 = 0 store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_constant result = 0 -copy_2_slots_unmasked $0..1 = result, g(0) +copy_slot_unmasked $0 = result +copy_immutable_unmasked $1 = i0 [0x3F800000 (1.0)] add_float $0 += $1 copy_slot_unmasked result = $0 -copy_slot_unmasked $0 = result -copy_slot_unmasked $1 = h(0) +copy_immutable_unmasked $1 = i0 [0x3F800000 (1.0)] add_float $0 += $1 copy_slot_unmasked result = $0 copy_slot_unmasked $0 = result -copy_slot_unmasked $1 = i(0) +copy_immutable_unmasked $1 = i9 [0x3F800000 (1.0)] add_float $0 += $1 copy_slot_unmasked result = $0 -copy_slot_unmasked $0 = result -copy_slot_unmasked $1 = j(0) +copy_immutable_unmasked $1 = i9 [0x3F800000 (1.0)] add_float $0 += $1 copy_slot_unmasked result = $0 -copy_slot_unmasked $0 = result -copy_slot_unmasked $1 = k(0) +copy_immutable_unmasked $1 = i14 [0x3F800000 (1.0)] add_float $0 += $1 copy_slot_unmasked result = $0 copy_slot_unmasked $0 = result -copy_slot_unmasked $1 = l(0) +copy_immutable_unmasked $1 = i25 [0x3F800000 (1.0)] add_float $0 += $1 copy_slot_unmasked result = $0 cmpeq_imm_float $0 = equal($0, 0x40C00000 (6.0)) diff --git a/tests/sksl/shared/ResizeMatrixNonsquare.wgsl b/tests/sksl/shared/ResizeMatrixNonsquare.wgsl new file mode 100644 index 000000000000..9f099646a173 --- /dev/null +++ b/tests/sksl/shared/ResizeMatrixNonsquare.wgsl @@ -0,0 +1,45 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var result: f32 = 0.0; + let _skTemp0 = mat2x3(1.0, 0.0, 0.0, 0.0, 1.0, 0.0); + var g: mat3x3 = mat3x3(_skTemp0[0][0], _skTemp0[0][1], _skTemp0[0][2], _skTemp0[1][0], _skTemp0[1][1], _skTemp0[1][2], 0.0, 0.0, 1.0); + result = result + g[0].x; + let _skTemp1 = mat3x2(1.0, 0.0, 0.0, 1.0, 0.0, 0.0); + var h: mat3x3 = mat3x3(_skTemp1[0][0], _skTemp1[0][1], 0.0, _skTemp1[1][0], _skTemp1[1][1], 0.0, _skTemp1[2][0], _skTemp1[2][1], 1.0); + result = result + h[0].x; + let _skTemp2 = mat4x2(1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0); + let _skTemp3 = mat4x3(_skTemp2[0][0], _skTemp2[0][1], 0.0, _skTemp2[1][0], _skTemp2[1][1], 0.0, _skTemp2[2][0], _skTemp2[2][1], 1.0, _skTemp2[3][0], _skTemp2[3][1], 0.0); + var i: mat4x4 = mat4x4(_skTemp3[0][0], _skTemp3[0][1], _skTemp3[0][2], 0.0, _skTemp3[1][0], _skTemp3[1][1], _skTemp3[1][2], 0.0, _skTemp3[2][0], _skTemp3[2][1], _skTemp3[2][2], 0.0, _skTemp3[3][0], _skTemp3[3][1], _skTemp3[3][2], 1.0); + result = result + i[0].x; + let _skTemp4 = mat2x4(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0); + let _skTemp5 = mat3x4(_skTemp4[0][0], _skTemp4[0][1], _skTemp4[0][2], _skTemp4[0][3], _skTemp4[1][0], _skTemp4[1][1], _skTemp4[1][2], _skTemp4[1][3], 0.0, 0.0, 1.0, 0.0); + var j: mat4x4 = mat4x4(_skTemp5[0][0], _skTemp5[0][1], _skTemp5[0][2], _skTemp5[0][3], _skTemp5[1][0], _skTemp5[1][1], _skTemp5[1][2], _skTemp5[1][3], _skTemp5[2][0], _skTemp5[2][1], _skTemp5[2][2], _skTemp5[2][3], 0.0, 0.0, 0.0, 1.0); + result = result + j[0].x; + let _skTemp6 = mat4x2(1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0); + var k: mat2x4 = mat2x4(_skTemp6[0][0], _skTemp6[0][1], 0.0, 0.0, _skTemp6[1][0], _skTemp6[1][1], 0.0, 0.0); + result = result + k[0].x; + let _skTemp7 = mat2x4(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0); + var l: mat4x2 = mat4x2(_skTemp7[0][0], _skTemp7[0][1], _skTemp7[1][0], _skTemp7[1][1], 0.0, 0.0, 0.0, 0.0); + result = result + l[0].x; + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((result == 6.0))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/ReturnBadTypeFromMain.asm.frag b/tests/sksl/shared/ReturnBadTypeFromMain.asm.frag index a149e761f63a..d662b87aba80 100644 --- a/tests/sksl/shared/ReturnBadTypeFromMain.asm.frag +++ b/tests/sksl/shared/ReturnBadTypeFromMain.asm.frag @@ -3,27 +3,27 @@ error: SPIR-V validation error: [VUID-StandaloneSpirv-None-04633] OpEntryPoint Entry Point '2[%main]'s function return type is not void. OpEntryPoint Fragment %main "main" %sk_Clockwise -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%int = OpTypeInt 32 1 -%v3int = OpTypeVector %int 3 -%8 = OpTypeFunction %v3int -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 -%int_3 = OpConstant %int 3 -%13 = OpConstantComposite %v3int %int_1 %int_2 %int_3 -%main = OpFunction %v3int None %8 -%9 = OpLabel -OpReturnValue %13 -OpFunctionEnd + %int = OpTypeInt 32 1 + %v3int = OpTypeVector %int 3 + %8 = OpTypeFunction %v3int + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 + %13 = OpConstantComposite %v3int %int_1 %int_2 %int_3 + %main = OpFunction %v3int None %8 + %9 = OpLabel + OpReturnValue %13 + OpFunctionEnd 1 error diff --git a/tests/sksl/shared/ReturnBadTypeFromMain.hlsl b/tests/sksl/shared/ReturnBadTypeFromMain.hlsl index a149e761f63a..d662b87aba80 100644 --- a/tests/sksl/shared/ReturnBadTypeFromMain.hlsl +++ b/tests/sksl/shared/ReturnBadTypeFromMain.hlsl @@ -3,27 +3,27 @@ error: SPIR-V validation error: [VUID-StandaloneSpirv-None-04633] OpEntryPoint Entry Point '2[%main]'s function return type is not void. OpEntryPoint Fragment %main "main" %sk_Clockwise -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%int = OpTypeInt 32 1 -%v3int = OpTypeVector %int 3 -%8 = OpTypeFunction %v3int -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 -%int_3 = OpConstant %int 3 -%13 = OpConstantComposite %v3int %int_1 %int_2 %int_3 -%main = OpFunction %v3int None %8 -%9 = OpLabel -OpReturnValue %13 -OpFunctionEnd + %int = OpTypeInt 32 1 + %v3int = OpTypeVector %int 3 + %8 = OpTypeFunction %v3int + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 + %13 = OpConstantComposite %v3int %int_1 %int_2 %int_3 + %main = OpFunction %v3int None %8 + %9 = OpLabel + OpReturnValue %13 + OpFunctionEnd 1 error diff --git a/tests/sksl/shared/ReturnBadTypeFromMain.wgsl b/tests/sksl/shared/ReturnBadTypeFromMain.wgsl new file mode 100644 index 000000000000..8394b761e2ff --- /dev/null +++ b/tests/sksl/shared/ReturnBadTypeFromMain.wgsl @@ -0,0 +1,25 @@ +### Compilation failed: + +error: :5:1 error: structures must have at least one member +struct FSOut { +^^^^^^ + + +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { +}; +fn main() -> vec3 { + { + return vec3(1, 2, 3); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(); + return _stageOut; +} + +1 error diff --git a/tests/sksl/shared/ReturnColorFromMain.asm.frag b/tests/sksl/shared/ReturnColorFromMain.asm.frag index 70bd64d26318..4942c3045b21 100644 --- a/tests/sksl/shared/ReturnColorFromMain.asm.frag +++ b/tests/sksl/shared/ReturnColorFromMain.asm.frag @@ -1,45 +1,45 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%12 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%16 = OpConstantComposite %v2float %float_0 %float_0 + %void = OpTypeVoid + %12 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %16 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%20 = OpTypeFunction %v4float %_ptr_Function_v2float -%float_1 = OpConstant %float 1 -%float_2 = OpConstant %float 2 -%float_3 = OpConstant %float 3 -%float_4 = OpConstant %float 4 -%27 = OpConstantComposite %v4float %float_1 %float_2 %float_3 %float_4 + %20 = OpTypeFunction %v4float %_ptr_Function_v2float + %float_1 = OpConstant %float 1 + %float_2 = OpConstant %float 2 + %float_3 = OpConstant %float 3 + %float_4 = OpConstant %float 4 + %27 = OpConstantComposite %v4float %float_1 %float_2 %float_3 %float_4 %_entrypoint_v = OpFunction %void None %12 -%13 = OpLabel -%17 = OpVariable %_ptr_Function_v2float Function -OpStore %17 %16 -%19 = OpFunctionCall %v4float %main %17 -OpStore %sk_FragColor %19 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %20 -%21 = OpFunctionParameter %_ptr_Function_v2float -%22 = OpLabel -OpReturnValue %27 -OpFunctionEnd + %13 = OpLabel + %17 = OpVariable %_ptr_Function_v2float Function + OpStore %17 %16 + %19 = OpFunctionCall %v4float %main %17 + OpStore %sk_FragColor %19 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %20 + %21 = OpFunctionParameter %_ptr_Function_v2float + %22 = OpLabel + OpReturnValue %27 + OpFunctionEnd diff --git a/tests/sksl/shared/ReturnColorFromMain.skrp b/tests/sksl/shared/ReturnColorFromMain.skrp index 84283428f9e9..726f77d7d0e4 100644 --- a/tests/sksl/shared/ReturnColorFromMain.skrp +++ b/tests/sksl/shared/ReturnColorFromMain.skrp @@ -1,7 +1,12 @@ +4 instructions + +[immutable slots] +i0 = 0x3F800000 (1.0) +i1 = 0x40000000 (2.0) +i2 = 0x40400000 (3.0) +i3 = 0x40800000 (4.0) + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true -copy_constant $0 = 0x3F800000 (1.0) -copy_constant $1 = 0x40000000 (2.0) -copy_constant $2 = 0x40400000 (3.0) -copy_constant $3 = 0x40800000 (4.0) +copy_4_immutables_unmasked $0..3 = i0..3 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] load_src src.rgba = $0..3 diff --git a/tests/sksl/shared/ReturnColorFromMain.wgsl b/tests/sksl/shared/ReturnColorFromMain.wgsl new file mode 100644 index 000000000000..933c6003ba66 --- /dev/null +++ b/tests/sksl/shared/ReturnColorFromMain.wgsl @@ -0,0 +1,19 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + return vec4(1.0, 2.0, 3.0, 4.0); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/ReturnsValueOnEveryPathES2.asm.frag b/tests/sksl/shared/ReturnsValueOnEveryPathES2.asm.frag index 91ddd7564d0b..79e3a77c3c03 100644 --- a/tests/sksl/shared/ReturnsValueOnEveryPathES2.asm.frag +++ b/tests/sksl/shared/ReturnsValueOnEveryPathES2.asm.frag @@ -1,273 +1,273 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpMemberName %_UniformBuffer 2 "unknownInput" -OpName %_entrypoint_v "_entrypoint_v" -OpName %return_on_both_sides_b "return_on_both_sides_b" -OpName %for_inside_body_b "for_inside_body_b" -OpName %x "x" -OpName %after_for_body_b "after_for_body_b" -OpName %x_0 "x" -OpName %for_with_double_sided_conditional_return_b "for_with_double_sided_conditional_return_b" -OpName %x_1 "x" -OpName %if_else_chain_b "if_else_chain_b" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %15 Binding 0 -OpDecorate %15 DescriptorSet 0 -OpDecorate %34 RelaxedPrecision -OpDecorate %77 RelaxedPrecision -OpDecorate %86 RelaxedPrecision -OpDecorate %92 RelaxedPrecision -OpDecorate %100 RelaxedPrecision -OpDecorate %107 RelaxedPrecision -OpDecorate %143 RelaxedPrecision -OpDecorate %145 RelaxedPrecision -OpDecorate %146 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpMemberName %_UniformBuffer 2 "unknownInput" + OpName %_entrypoint_v "_entrypoint_v" + OpName %return_on_both_sides_b "return_on_both_sides_b" + OpName %for_inside_body_b "for_inside_body_b" + OpName %x "x" + OpName %after_for_body_b "after_for_body_b" + OpName %x_0 "x" + OpName %for_with_double_sided_conditional_return_b "for_with_double_sided_conditional_return_b" + OpName %x_1 "x" + OpName %if_else_chain_b "if_else_chain_b" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %15 Binding 0 + OpDecorate %15 DescriptorSet 0 + OpDecorate %34 RelaxedPrecision + OpDecorate %77 RelaxedPrecision + OpDecorate %86 RelaxedPrecision + OpDecorate %92 RelaxedPrecision + OpDecorate %100 RelaxedPrecision + OpDecorate %107 RelaxedPrecision + OpDecorate %143 RelaxedPrecision + OpDecorate %145 RelaxedPrecision + OpDecorate %146 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%15 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%20 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%24 = OpConstantComposite %v2float %float_0 %float_0 + %15 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %20 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %24 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%28 = OpTypeFunction %bool + %28 = OpTypeFunction %bool %_ptr_Uniform_float = OpTypePointer Uniform %float -%int = OpTypeInt 32 1 -%int_2 = OpConstant %int 2 -%float_1 = OpConstant %float 1 -%true = OpConstantTrue %bool + %int = OpTypeInt 32 1 + %int_2 = OpConstant %int 2 + %float_1 = OpConstant %float 1 + %true = OpConstantTrue %bool %_ptr_Function_int = OpTypePointer Function %int -%int_0 = OpConstant %int 0 -%int_10 = OpConstant %int 10 -%int_1 = OpConstant %int 1 -%float_2 = OpConstant %float 2 -%false = OpConstantFalse %bool -%float_3 = OpConstant %float 3 -%float_4 = OpConstant %float 4 -%113 = OpTypeFunction %v4float %_ptr_Function_v2float + %int_0 = OpConstant %int 0 + %int_10 = OpConstant %int 10 + %int_1 = OpConstant %int 1 + %float_2 = OpConstant %float 2 + %false = OpConstantFalse %bool + %float_3 = OpConstant %float 3 + %float_4 = OpConstant %float 4 + %113 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float %_entrypoint_v = OpFunction %void None %20 -%21 = OpLabel -%25 = OpVariable %_ptr_Function_v2float Function -OpStore %25 %24 -%27 = OpFunctionCall %v4float %main %25 -OpStore %sk_FragColor %27 -OpReturn -OpFunctionEnd + %21 = OpLabel + %25 = OpVariable %_ptr_Function_v2float Function + OpStore %25 %24 + %27 = OpFunctionCall %v4float %main %25 + OpStore %sk_FragColor %27 + OpReturn + OpFunctionEnd %return_on_both_sides_b = OpFunction %bool None %28 -%29 = OpLabel -%30 = OpAccessChain %_ptr_Uniform_float %15 %int_2 -%34 = OpLoad %float %30 -%36 = OpFOrdEqual %bool %34 %float_1 -OpSelectionMerge %39 None -OpBranchConditional %36 %37 %38 -%37 = OpLabel -OpReturnValue %true -%38 = OpLabel -OpReturnValue %true -%39 = OpLabel -OpUnreachable -OpFunctionEnd + %29 = OpLabel + %30 = OpAccessChain %_ptr_Uniform_float %15 %int_2 + %34 = OpLoad %float %30 + %36 = OpFOrdEqual %bool %34 %float_1 + OpSelectionMerge %39 None + OpBranchConditional %36 %37 %38 + %37 = OpLabel + OpReturnValue %true + %38 = OpLabel + OpReturnValue %true + %39 = OpLabel + OpUnreachable + OpFunctionEnd %for_inside_body_b = OpFunction %bool None %28 -%41 = OpLabel -%x = OpVariable %_ptr_Function_int Function -OpStore %x %int_0 -OpBranch %45 -%45 = OpLabel -OpLoopMerge %49 %48 None -OpBranch %46 -%46 = OpLabel -%50 = OpLoad %int %x -%52 = OpSLessThanEqual %bool %50 %int_10 -OpBranchConditional %52 %47 %49 -%47 = OpLabel -OpReturnValue %true -%48 = OpLabel -%54 = OpLoad %int %x -%55 = OpIAdd %int %54 %int_1 -OpStore %x %55 -OpBranch %45 -%49 = OpLabel -OpUnreachable -OpFunctionEnd + %41 = OpLabel + %x = OpVariable %_ptr_Function_int Function + OpStore %x %int_0 + OpBranch %45 + %45 = OpLabel + OpLoopMerge %49 %48 None + OpBranch %46 + %46 = OpLabel + %50 = OpLoad %int %x + %52 = OpSLessThanEqual %bool %50 %int_10 + OpBranchConditional %52 %47 %49 + %47 = OpLabel + OpReturnValue %true + %48 = OpLabel + %54 = OpLoad %int %x + %55 = OpIAdd %int %54 %int_1 + OpStore %x %55 + OpBranch %45 + %49 = OpLabel + OpUnreachable + OpFunctionEnd %after_for_body_b = OpFunction %bool None %28 -%56 = OpLabel -%x_0 = OpVariable %_ptr_Function_int Function -OpStore %x_0 %int_0 -OpBranch %58 -%58 = OpLabel -OpLoopMerge %62 %61 None -OpBranch %59 -%59 = OpLabel -%63 = OpLoad %int %x_0 -%64 = OpSLessThanEqual %bool %63 %int_10 -OpBranchConditional %64 %60 %62 -%60 = OpLabel -OpBranch %61 -%61 = OpLabel -%65 = OpLoad %int %x_0 -%66 = OpIAdd %int %65 %int_1 -OpStore %x_0 %66 -OpBranch %58 -%62 = OpLabel -OpReturnValue %true -OpFunctionEnd + %56 = OpLabel + %x_0 = OpVariable %_ptr_Function_int Function + OpStore %x_0 %int_0 + OpBranch %58 + %58 = OpLabel + OpLoopMerge %62 %61 None + OpBranch %59 + %59 = OpLabel + %63 = OpLoad %int %x_0 + %64 = OpSLessThanEqual %bool %63 %int_10 + OpBranchConditional %64 %60 %62 + %60 = OpLabel + OpBranch %61 + %61 = OpLabel + %65 = OpLoad %int %x_0 + %66 = OpIAdd %int %65 %int_1 + OpStore %x_0 %66 + OpBranch %58 + %62 = OpLabel + OpReturnValue %true + OpFunctionEnd %for_with_double_sided_conditional_return_b = OpFunction %bool None %28 -%67 = OpLabel -%x_1 = OpVariable %_ptr_Function_int Function -OpStore %x_1 %int_0 -OpBranch %69 -%69 = OpLabel -OpLoopMerge %73 %72 None -OpBranch %70 -%70 = OpLabel -%74 = OpLoad %int %x_1 -%75 = OpSLessThanEqual %bool %74 %int_10 -OpBranchConditional %75 %71 %73 -%71 = OpLabel -%76 = OpAccessChain %_ptr_Uniform_float %15 %int_2 -%77 = OpLoad %float %76 -%78 = OpFOrdEqual %bool %77 %float_1 -OpSelectionMerge %81 None -OpBranchConditional %78 %79 %80 -%79 = OpLabel -OpReturnValue %true -%80 = OpLabel -OpReturnValue %true -%81 = OpLabel -OpBranch %72 -%72 = OpLabel -%82 = OpLoad %int %x_1 -%83 = OpIAdd %int %82 %int_1 -OpStore %x_1 %83 -OpBranch %69 -%73 = OpLabel -OpUnreachable -OpFunctionEnd + %67 = OpLabel + %x_1 = OpVariable %_ptr_Function_int Function + OpStore %x_1 %int_0 + OpBranch %69 + %69 = OpLabel + OpLoopMerge %73 %72 None + OpBranch %70 + %70 = OpLabel + %74 = OpLoad %int %x_1 + %75 = OpSLessThanEqual %bool %74 %int_10 + OpBranchConditional %75 %71 %73 + %71 = OpLabel + %76 = OpAccessChain %_ptr_Uniform_float %15 %int_2 + %77 = OpLoad %float %76 + %78 = OpFOrdEqual %bool %77 %float_1 + OpSelectionMerge %81 None + OpBranchConditional %78 %79 %80 + %79 = OpLabel + OpReturnValue %true + %80 = OpLabel + OpReturnValue %true + %81 = OpLabel + OpBranch %72 + %72 = OpLabel + %82 = OpLoad %int %x_1 + %83 = OpIAdd %int %82 %int_1 + OpStore %x_1 %83 + OpBranch %69 + %73 = OpLabel + OpUnreachable + OpFunctionEnd %if_else_chain_b = OpFunction %bool None %28 -%84 = OpLabel -%85 = OpAccessChain %_ptr_Uniform_float %15 %int_2 -%86 = OpLoad %float %85 -%87 = OpFOrdEqual %bool %86 %float_1 -OpSelectionMerge %90 None -OpBranchConditional %87 %88 %89 -%88 = OpLabel -OpReturnValue %true -%89 = OpLabel -%91 = OpAccessChain %_ptr_Uniform_float %15 %int_2 -%92 = OpLoad %float %91 -%94 = OpFOrdEqual %bool %92 %float_2 -OpSelectionMerge %97 None -OpBranchConditional %94 %95 %96 -%95 = OpLabel -OpReturnValue %false -%96 = OpLabel -%99 = OpAccessChain %_ptr_Uniform_float %15 %int_2 -%100 = OpLoad %float %99 -%102 = OpFOrdEqual %bool %100 %float_3 -OpSelectionMerge %105 None -OpBranchConditional %102 %103 %104 -%103 = OpLabel -OpReturnValue %true -%104 = OpLabel -%106 = OpAccessChain %_ptr_Uniform_float %15 %int_2 -%107 = OpLoad %float %106 -%109 = OpFOrdEqual %bool %107 %float_4 -OpSelectionMerge %112 None -OpBranchConditional %109 %110 %111 -%110 = OpLabel -OpReturnValue %false -%111 = OpLabel -OpReturnValue %true -%112 = OpLabel -OpBranch %105 -%105 = OpLabel -OpBranch %97 -%97 = OpLabel -OpBranch %90 -%90 = OpLabel -OpUnreachable -OpFunctionEnd -%main = OpFunction %v4float None %113 -%114 = OpFunctionParameter %_ptr_Function_v2float -%115 = OpLabel -%136 = OpVariable %_ptr_Function_v4float Function -OpSelectionMerge %117 None -OpBranchConditional %true %116 %117 -%116 = OpLabel -%118 = OpFunctionCall %bool %return_on_both_sides_b -OpBranch %117 -%117 = OpLabel -%119 = OpPhi %bool %false %115 %118 %116 -OpSelectionMerge %121 None -OpBranchConditional %119 %120 %121 -%120 = OpLabel -%122 = OpFunctionCall %bool %for_inside_body_b -OpBranch %121 -%121 = OpLabel -%123 = OpPhi %bool %false %117 %122 %120 -OpSelectionMerge %125 None -OpBranchConditional %123 %124 %125 -%124 = OpLabel -%126 = OpFunctionCall %bool %after_for_body_b -OpBranch %125 -%125 = OpLabel -%127 = OpPhi %bool %false %121 %126 %124 -OpSelectionMerge %129 None -OpBranchConditional %127 %128 %129 -%128 = OpLabel -%130 = OpFunctionCall %bool %for_with_double_sided_conditional_return_b -OpBranch %129 -%129 = OpLabel -%131 = OpPhi %bool %false %125 %130 %128 -OpSelectionMerge %133 None -OpBranchConditional %131 %132 %133 -%132 = OpLabel -%134 = OpFunctionCall %bool %if_else_chain_b -OpBranch %133 -%133 = OpLabel -%135 = OpPhi %bool %false %129 %134 %132 -OpSelectionMerge %140 None -OpBranchConditional %135 %138 %139 -%138 = OpLabel -%141 = OpAccessChain %_ptr_Uniform_v4float %15 %int_0 -%143 = OpLoad %v4float %141 -OpStore %136 %143 -OpBranch %140 -%139 = OpLabel -%144 = OpAccessChain %_ptr_Uniform_v4float %15 %int_1 -%145 = OpLoad %v4float %144 -OpStore %136 %145 -OpBranch %140 -%140 = OpLabel -%146 = OpLoad %v4float %136 -OpReturnValue %146 -OpFunctionEnd + %84 = OpLabel + %85 = OpAccessChain %_ptr_Uniform_float %15 %int_2 + %86 = OpLoad %float %85 + %87 = OpFOrdEqual %bool %86 %float_1 + OpSelectionMerge %90 None + OpBranchConditional %87 %88 %89 + %88 = OpLabel + OpReturnValue %true + %89 = OpLabel + %91 = OpAccessChain %_ptr_Uniform_float %15 %int_2 + %92 = OpLoad %float %91 + %94 = OpFOrdEqual %bool %92 %float_2 + OpSelectionMerge %97 None + OpBranchConditional %94 %95 %96 + %95 = OpLabel + OpReturnValue %false + %96 = OpLabel + %99 = OpAccessChain %_ptr_Uniform_float %15 %int_2 + %100 = OpLoad %float %99 + %102 = OpFOrdEqual %bool %100 %float_3 + OpSelectionMerge %105 None + OpBranchConditional %102 %103 %104 + %103 = OpLabel + OpReturnValue %true + %104 = OpLabel + %106 = OpAccessChain %_ptr_Uniform_float %15 %int_2 + %107 = OpLoad %float %106 + %109 = OpFOrdEqual %bool %107 %float_4 + OpSelectionMerge %112 None + OpBranchConditional %109 %110 %111 + %110 = OpLabel + OpReturnValue %false + %111 = OpLabel + OpReturnValue %true + %112 = OpLabel + OpBranch %105 + %105 = OpLabel + OpBranch %97 + %97 = OpLabel + OpBranch %90 + %90 = OpLabel + OpUnreachable + OpFunctionEnd + %main = OpFunction %v4float None %113 + %114 = OpFunctionParameter %_ptr_Function_v2float + %115 = OpLabel + %136 = OpVariable %_ptr_Function_v4float Function + OpSelectionMerge %117 None + OpBranchConditional %true %116 %117 + %116 = OpLabel + %118 = OpFunctionCall %bool %return_on_both_sides_b + OpBranch %117 + %117 = OpLabel + %119 = OpPhi %bool %false %115 %118 %116 + OpSelectionMerge %121 None + OpBranchConditional %119 %120 %121 + %120 = OpLabel + %122 = OpFunctionCall %bool %for_inside_body_b + OpBranch %121 + %121 = OpLabel + %123 = OpPhi %bool %false %117 %122 %120 + OpSelectionMerge %125 None + OpBranchConditional %123 %124 %125 + %124 = OpLabel + %126 = OpFunctionCall %bool %after_for_body_b + OpBranch %125 + %125 = OpLabel + %127 = OpPhi %bool %false %121 %126 %124 + OpSelectionMerge %129 None + OpBranchConditional %127 %128 %129 + %128 = OpLabel + %130 = OpFunctionCall %bool %for_with_double_sided_conditional_return_b + OpBranch %129 + %129 = OpLabel + %131 = OpPhi %bool %false %125 %130 %128 + OpSelectionMerge %133 None + OpBranchConditional %131 %132 %133 + %132 = OpLabel + %134 = OpFunctionCall %bool %if_else_chain_b + OpBranch %133 + %133 = OpLabel + %135 = OpPhi %bool %false %129 %134 %132 + OpSelectionMerge %140 None + OpBranchConditional %135 %138 %139 + %138 = OpLabel + %141 = OpAccessChain %_ptr_Uniform_v4float %15 %int_0 + %143 = OpLoad %v4float %141 + OpStore %136 %143 + OpBranch %140 + %139 = OpLabel + %144 = OpAccessChain %_ptr_Uniform_v4float %15 %int_1 + %145 = OpLoad %v4float %144 + OpStore %136 %145 + OpBranch %140 + %140 = OpLabel + %146 = OpLoad %v4float %136 + OpReturnValue %146 + OpFunctionEnd diff --git a/tests/sksl/shared/ReturnsValueOnEveryPathES2.skrp b/tests/sksl/shared/ReturnsValueOnEveryPathES2.skrp index fd6342fe62ec..2eebdf089f73 100644 --- a/tests/sksl/shared/ReturnsValueOnEveryPathES2.skrp +++ b/tests/sksl/shared/ReturnsValueOnEveryPathES2.skrp @@ -1,3 +1,5 @@ +123 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true store_condition_mask $12 = CondMask diff --git a/tests/sksl/shared/ReturnsValueOnEveryPathES2.wgsl b/tests/sksl/shared/ReturnsValueOnEveryPathES2.wgsl index c426baaad6e7..9d70858afb15 100644 --- a/tests/sksl/shared/ReturnsValueOnEveryPathES2.wgsl +++ b/tests/sksl/shared/ReturnsValueOnEveryPathES2.wgsl @@ -1,15 +1,16 @@ /* -:22:3 warning: code is unreachable +:23:3 warning: code is unreachable return bool(); ^^^^^^ -:98:3 warning: code is unreachable +:99:3 warning: code is unreachable return bool(); ^^^^^^ */ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -25,7 +26,7 @@ struct _GlobalUniforms { @binding(0) @group(0) var _globalUniforms: _GlobalUniforms; fn return_on_both_sides_b() -> bool { { - if (_globalUniforms.unknownInput == 1.0) { + if _globalUniforms.unknownInput == 1.0 { return true; } else { return true; @@ -72,7 +73,7 @@ fn for_with_double_sided_conditional_return_b() -> bool { var x: i32 = 0; loop { { - if (_globalUniforms.unknownInput == 1.0) { + if _globalUniforms.unknownInput == 1.0 { return true; } else { return true; @@ -89,16 +90,16 @@ fn for_with_double_sided_conditional_return_b() -> bool { } fn if_else_chain_b() -> bool { { - if (_globalUniforms.unknownInput == 1.0) { + if _globalUniforms.unknownInput == 1.0 { return true; } else { - if (_globalUniforms.unknownInput == 2.0) { + if _globalUniforms.unknownInput == 2.0 { return false; } else { - if (_globalUniforms.unknownInput == 3.0) { + if _globalUniforms.unknownInput == 3.0 { return true; } else { - if (_globalUniforms.unknownInput == 4.0) { + if _globalUniforms.unknownInput == 4.0 { return false; } else { return true; diff --git a/tests/sksl/shared/ReturnsValueOnEveryPathES3.asm.frag b/tests/sksl/shared/ReturnsValueOnEveryPathES3.asm.frag index b0ba0db8db77..9fe3164c1c91 100644 --- a/tests/sksl/shared/ReturnsValueOnEveryPathES3.asm.frag +++ b/tests/sksl/shared/ReturnsValueOnEveryPathES3.asm.frag @@ -1,415 +1,415 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpMemberName %_UniformBuffer 2 "unknownInput" -OpName %_entrypoint_v "_entrypoint_v" -OpName %inside_while_loop_b "inside_while_loop_b" -OpName %inside_infinite_do_loop_b "inside_infinite_do_loop_b" -OpName %inside_infinite_while_loop_b "inside_infinite_while_loop_b" -OpName %after_do_loop_b "after_do_loop_b" -OpName %after_while_loop_b "after_while_loop_b" -OpName %switch_with_all_returns_b "switch_with_all_returns_b" -OpName %switch_fallthrough_b "switch_fallthrough_b" -OpName %switch_fallthrough_twice_b "switch_fallthrough_twice_b" -OpName %switch_with_break_in_loop_b "switch_with_break_in_loop_b" -OpName %x "x" -OpName %switch_with_continue_in_loop_b "switch_with_continue_in_loop_b" -OpName %x_0 "x" -OpName %switch_with_if_that_returns_b "switch_with_if_that_returns_b" -OpName %switch_with_one_sided_if_then_fallthrough_b "switch_with_one_sided_if_then_fallthrough_b" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %22 Binding 0 -OpDecorate %22 DescriptorSet 0 -OpDecorate %46 RelaxedPrecision -OpDecorate %77 RelaxedPrecision -OpDecorate %85 RelaxedPrecision -OpDecorate %93 RelaxedPrecision -OpDecorate %101 RelaxedPrecision -OpDecorate %122 RelaxedPrecision -OpDecorate %139 RelaxedPrecision -OpDecorate %145 RelaxedPrecision -OpDecorate %152 RelaxedPrecision -OpDecorate %158 RelaxedPrecision -OpDecorate %217 RelaxedPrecision -OpDecorate %219 RelaxedPrecision -OpDecorate %220 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpMemberName %_UniformBuffer 2 "unknownInput" + OpName %_entrypoint_v "_entrypoint_v" + OpName %inside_while_loop_b "inside_while_loop_b" + OpName %inside_infinite_do_loop_b "inside_infinite_do_loop_b" + OpName %inside_infinite_while_loop_b "inside_infinite_while_loop_b" + OpName %after_do_loop_b "after_do_loop_b" + OpName %after_while_loop_b "after_while_loop_b" + OpName %switch_with_all_returns_b "switch_with_all_returns_b" + OpName %switch_fallthrough_b "switch_fallthrough_b" + OpName %switch_fallthrough_twice_b "switch_fallthrough_twice_b" + OpName %switch_with_break_in_loop_b "switch_with_break_in_loop_b" + OpName %x "x" + OpName %switch_with_continue_in_loop_b "switch_with_continue_in_loop_b" + OpName %x_0 "x" + OpName %switch_with_if_that_returns_b "switch_with_if_that_returns_b" + OpName %switch_with_one_sided_if_then_fallthrough_b "switch_with_one_sided_if_then_fallthrough_b" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %22 Binding 0 + OpDecorate %22 DescriptorSet 0 + OpDecorate %46 RelaxedPrecision + OpDecorate %77 RelaxedPrecision + OpDecorate %85 RelaxedPrecision + OpDecorate %93 RelaxedPrecision + OpDecorate %101 RelaxedPrecision + OpDecorate %122 RelaxedPrecision + OpDecorate %139 RelaxedPrecision + OpDecorate %145 RelaxedPrecision + OpDecorate %152 RelaxedPrecision + OpDecorate %158 RelaxedPrecision + OpDecorate %217 RelaxedPrecision + OpDecorate %219 RelaxedPrecision + OpDecorate %220 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%22 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%27 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%31 = OpConstantComposite %v2float %float_0 %float_0 + %22 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %27 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %31 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%35 = OpTypeFunction %bool + %35 = OpTypeFunction %bool %_ptr_Uniform_float = OpTypePointer Uniform %float -%int = OpTypeInt 32 1 -%int_2 = OpConstant %int 2 -%float_123 = OpConstant %float 123 -%false = OpConstantFalse %bool -%true = OpConstantTrue %bool + %int = OpTypeInt 32 1 + %int_2 = OpConstant %int 2 + %float_123 = OpConstant %float 123 + %false = OpConstantFalse %bool + %true = OpConstantTrue %bool %_ptr_Function_int = OpTypePointer Function %int -%int_0 = OpConstant %int 0 -%int_10 = OpConstant %int 10 -%int_1 = OpConstant %int 1 -%162 = OpTypeFunction %v4float %_ptr_Function_v2float + %int_0 = OpConstant %int 0 + %int_10 = OpConstant %int 10 + %int_1 = OpConstant %int 1 + %162 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float %_entrypoint_v = OpFunction %void None %27 -%28 = OpLabel -%32 = OpVariable %_ptr_Function_v2float Function -OpStore %32 %31 -%34 = OpFunctionCall %v4float %main %32 -OpStore %sk_FragColor %34 -OpReturn -OpFunctionEnd + %28 = OpLabel + %32 = OpVariable %_ptr_Function_v2float Function + OpStore %32 %31 + %34 = OpFunctionCall %v4float %main %32 + OpStore %sk_FragColor %34 + OpReturn + OpFunctionEnd %inside_while_loop_b = OpFunction %bool None %35 -%36 = OpLabel -OpBranch %37 -%37 = OpLabel -OpLoopMerge %41 %40 None -OpBranch %38 -%38 = OpLabel -%42 = OpAccessChain %_ptr_Uniform_float %22 %int_2 -%46 = OpLoad %float %42 -%48 = OpFOrdEqual %bool %46 %float_123 -OpBranchConditional %48 %39 %41 -%39 = OpLabel -OpReturnValue %false -%40 = OpLabel -OpBranch %37 -%41 = OpLabel -OpReturnValue %true -OpFunctionEnd + %36 = OpLabel + OpBranch %37 + %37 = OpLabel + OpLoopMerge %41 %40 None + OpBranch %38 + %38 = OpLabel + %42 = OpAccessChain %_ptr_Uniform_float %22 %int_2 + %46 = OpLoad %float %42 + %48 = OpFOrdEqual %bool %46 %float_123 + OpBranchConditional %48 %39 %41 + %39 = OpLabel + OpReturnValue %false + %40 = OpLabel + OpBranch %37 + %41 = OpLabel + OpReturnValue %true + OpFunctionEnd %inside_infinite_do_loop_b = OpFunction %bool None %35 -%51 = OpLabel -OpBranch %52 -%52 = OpLabel -OpLoopMerge %56 %55 None -OpBranch %53 -%53 = OpLabel -OpReturnValue %true -%55 = OpLabel -OpBranchConditional %true %52 %56 -%56 = OpLabel -OpUnreachable -OpFunctionEnd + %51 = OpLabel + OpBranch %52 + %52 = OpLabel + OpLoopMerge %56 %55 None + OpBranch %53 + %53 = OpLabel + OpReturnValue %true + %55 = OpLabel + OpBranchConditional %true %52 %56 + %56 = OpLabel + OpUnreachable + OpFunctionEnd %inside_infinite_while_loop_b = OpFunction %bool None %35 -%57 = OpLabel -OpBranch %58 -%58 = OpLabel -OpLoopMerge %62 %61 None -OpBranch %59 -%59 = OpLabel -OpBranchConditional %true %60 %62 -%60 = OpLabel -OpReturnValue %true -%61 = OpLabel -OpBranch %58 -%62 = OpLabel -OpUnreachable -OpFunctionEnd + %57 = OpLabel + OpBranch %58 + %58 = OpLabel + OpLoopMerge %62 %61 None + OpBranch %59 + %59 = OpLabel + OpBranchConditional %true %60 %62 + %60 = OpLabel + OpReturnValue %true + %61 = OpLabel + OpBranch %58 + %62 = OpLabel + OpUnreachable + OpFunctionEnd %after_do_loop_b = OpFunction %bool None %35 -%63 = OpLabel -OpBranch %64 -%64 = OpLabel -OpLoopMerge %68 %67 None -OpBranch %65 -%65 = OpLabel -OpBranch %68 -%67 = OpLabel -OpBranchConditional %true %64 %68 -%68 = OpLabel -OpReturnValue %true -OpFunctionEnd + %63 = OpLabel + OpBranch %64 + %64 = OpLabel + OpLoopMerge %68 %67 None + OpBranch %65 + %65 = OpLabel + OpBranch %68 + %67 = OpLabel + OpBranchConditional %true %64 %68 + %68 = OpLabel + OpReturnValue %true + OpFunctionEnd %after_while_loop_b = OpFunction %bool None %35 -%69 = OpLabel -OpBranch %70 -%70 = OpLabel -OpLoopMerge %74 %73 None -OpBranch %71 -%71 = OpLabel -OpBranchConditional %true %72 %74 -%72 = OpLabel -OpBranch %74 -%73 = OpLabel -OpBranch %70 -%74 = OpLabel -OpReturnValue %true -OpFunctionEnd + %69 = OpLabel + OpBranch %70 + %70 = OpLabel + OpLoopMerge %74 %73 None + OpBranch %71 + %71 = OpLabel + OpBranchConditional %true %72 %74 + %72 = OpLabel + OpBranch %74 + %73 = OpLabel + OpBranch %70 + %74 = OpLabel + OpReturnValue %true + OpFunctionEnd %switch_with_all_returns_b = OpFunction %bool None %35 -%75 = OpLabel -%76 = OpAccessChain %_ptr_Uniform_float %22 %int_2 -%77 = OpLoad %float %76 -%78 = OpConvertFToS %int %77 -OpSelectionMerge %79 None -OpSwitch %78 %82 1 %80 2 %81 -%80 = OpLabel -OpReturnValue %true -%81 = OpLabel -OpReturnValue %false -%82 = OpLabel -OpReturnValue %false -%79 = OpLabel -OpUnreachable -OpFunctionEnd + %75 = OpLabel + %76 = OpAccessChain %_ptr_Uniform_float %22 %int_2 + %77 = OpLoad %float %76 + %78 = OpConvertFToS %int %77 + OpSelectionMerge %79 None + OpSwitch %78 %82 1 %80 2 %81 + %80 = OpLabel + OpReturnValue %true + %81 = OpLabel + OpReturnValue %false + %82 = OpLabel + OpReturnValue %false + %79 = OpLabel + OpUnreachable + OpFunctionEnd %switch_fallthrough_b = OpFunction %bool None %35 -%83 = OpLabel -%84 = OpAccessChain %_ptr_Uniform_float %22 %int_2 -%85 = OpLoad %float %84 -%86 = OpConvertFToS %int %85 -OpSelectionMerge %87 None -OpSwitch %86 %90 1 %88 2 %90 -%88 = OpLabel -OpReturnValue %true -%90 = OpLabel -OpReturnValue %false -%87 = OpLabel -OpUnreachable -OpFunctionEnd + %83 = OpLabel + %84 = OpAccessChain %_ptr_Uniform_float %22 %int_2 + %85 = OpLoad %float %84 + %86 = OpConvertFToS %int %85 + OpSelectionMerge %87 None + OpSwitch %86 %90 1 %88 2 %90 + %88 = OpLabel + OpReturnValue %true + %90 = OpLabel + OpReturnValue %false + %87 = OpLabel + OpUnreachable + OpFunctionEnd %switch_fallthrough_twice_b = OpFunction %bool None %35 -%91 = OpLabel -%92 = OpAccessChain %_ptr_Uniform_float %22 %int_2 -%93 = OpLoad %float %92 -%94 = OpConvertFToS %int %93 -OpSelectionMerge %95 None -OpSwitch %94 %98 1 %98 2 %98 -%98 = OpLabel -OpReturnValue %true -%95 = OpLabel -OpUnreachable -OpFunctionEnd + %91 = OpLabel + %92 = OpAccessChain %_ptr_Uniform_float %22 %int_2 + %93 = OpLoad %float %92 + %94 = OpConvertFToS %int %93 + OpSelectionMerge %95 None + OpSwitch %94 %98 1 %98 2 %98 + %98 = OpLabel + OpReturnValue %true + %95 = OpLabel + OpUnreachable + OpFunctionEnd %switch_with_break_in_loop_b = OpFunction %bool None %35 -%99 = OpLabel -%x = OpVariable %_ptr_Function_int Function -%100 = OpAccessChain %_ptr_Uniform_float %22 %int_2 -%101 = OpLoad %float %100 -%102 = OpConvertFToS %int %101 -OpSelectionMerge %103 None -OpSwitch %102 %105 1 %104 -%104 = OpLabel -OpStore %x %int_0 -OpBranch %109 -%109 = OpLabel -OpLoopMerge %113 %112 None -OpBranch %110 -%110 = OpLabel -%114 = OpLoad %int %x -%116 = OpSLessThanEqual %bool %114 %int_10 -OpBranchConditional %116 %111 %113 -%111 = OpLabel -OpBranch %113 -%112 = OpLabel -%118 = OpLoad %int %x -%119 = OpIAdd %int %118 %int_1 -OpStore %x %119 -OpBranch %109 -%113 = OpLabel -OpBranch %105 -%105 = OpLabel -OpReturnValue %true -%103 = OpLabel -OpUnreachable -OpFunctionEnd + %99 = OpLabel + %x = OpVariable %_ptr_Function_int Function + %100 = OpAccessChain %_ptr_Uniform_float %22 %int_2 + %101 = OpLoad %float %100 + %102 = OpConvertFToS %int %101 + OpSelectionMerge %103 None + OpSwitch %102 %105 1 %104 + %104 = OpLabel + OpStore %x %int_0 + OpBranch %109 + %109 = OpLabel + OpLoopMerge %113 %112 None + OpBranch %110 + %110 = OpLabel + %114 = OpLoad %int %x + %116 = OpSLessThanEqual %bool %114 %int_10 + OpBranchConditional %116 %111 %113 + %111 = OpLabel + OpBranch %113 + %112 = OpLabel + %118 = OpLoad %int %x + %119 = OpIAdd %int %118 %int_1 + OpStore %x %119 + OpBranch %109 + %113 = OpLabel + OpBranch %105 + %105 = OpLabel + OpReturnValue %true + %103 = OpLabel + OpUnreachable + OpFunctionEnd %switch_with_continue_in_loop_b = OpFunction %bool None %35 -%120 = OpLabel -%x_0 = OpVariable %_ptr_Function_int Function -%121 = OpAccessChain %_ptr_Uniform_float %22 %int_2 -%122 = OpLoad %float %121 -%123 = OpConvertFToS %int %122 -OpSelectionMerge %124 None -OpSwitch %123 %126 1 %125 -%125 = OpLabel -OpStore %x_0 %int_0 -OpBranch %128 -%128 = OpLabel -OpLoopMerge %132 %131 None -OpBranch %129 -%129 = OpLabel -%133 = OpLoad %int %x_0 -%134 = OpSLessThanEqual %bool %133 %int_10 -OpBranchConditional %134 %130 %132 -%130 = OpLabel -OpBranch %131 -%131 = OpLabel -%135 = OpLoad %int %x_0 -%136 = OpIAdd %int %135 %int_1 -OpStore %x_0 %136 -OpBranch %128 -%132 = OpLabel -OpBranch %126 -%126 = OpLabel -OpReturnValue %true -%124 = OpLabel -OpUnreachable -OpFunctionEnd + %120 = OpLabel + %x_0 = OpVariable %_ptr_Function_int Function + %121 = OpAccessChain %_ptr_Uniform_float %22 %int_2 + %122 = OpLoad %float %121 + %123 = OpConvertFToS %int %122 + OpSelectionMerge %124 None + OpSwitch %123 %126 1 %125 + %125 = OpLabel + OpStore %x_0 %int_0 + OpBranch %128 + %128 = OpLabel + OpLoopMerge %132 %131 None + OpBranch %129 + %129 = OpLabel + %133 = OpLoad %int %x_0 + %134 = OpSLessThanEqual %bool %133 %int_10 + OpBranchConditional %134 %130 %132 + %130 = OpLabel + OpBranch %131 + %131 = OpLabel + %135 = OpLoad %int %x_0 + %136 = OpIAdd %int %135 %int_1 + OpStore %x_0 %136 + OpBranch %128 + %132 = OpLabel + OpBranch %126 + %126 = OpLabel + OpReturnValue %true + %124 = OpLabel + OpUnreachable + OpFunctionEnd %switch_with_if_that_returns_b = OpFunction %bool None %35 -%137 = OpLabel -%138 = OpAccessChain %_ptr_Uniform_float %22 %int_2 -%139 = OpLoad %float %138 -%140 = OpConvertFToS %int %139 -OpSelectionMerge %141 None -OpSwitch %140 %143 1 %142 -%142 = OpLabel -%144 = OpAccessChain %_ptr_Uniform_float %22 %int_2 -%145 = OpLoad %float %144 -%146 = OpFOrdEqual %bool %145 %float_123 -OpSelectionMerge %149 None -OpBranchConditional %146 %147 %148 -%147 = OpLabel -OpReturnValue %false -%148 = OpLabel -OpReturnValue %true -%149 = OpLabel -OpBranch %143 -%143 = OpLabel -OpReturnValue %true -%141 = OpLabel -OpUnreachable -OpFunctionEnd + %137 = OpLabel + %138 = OpAccessChain %_ptr_Uniform_float %22 %int_2 + %139 = OpLoad %float %138 + %140 = OpConvertFToS %int %139 + OpSelectionMerge %141 None + OpSwitch %140 %143 1 %142 + %142 = OpLabel + %144 = OpAccessChain %_ptr_Uniform_float %22 %int_2 + %145 = OpLoad %float %144 + %146 = OpFOrdEqual %bool %145 %float_123 + OpSelectionMerge %149 None + OpBranchConditional %146 %147 %148 + %147 = OpLabel + OpReturnValue %false + %148 = OpLabel + OpReturnValue %true + %149 = OpLabel + OpBranch %143 + %143 = OpLabel + OpReturnValue %true + %141 = OpLabel + OpUnreachable + OpFunctionEnd %switch_with_one_sided_if_then_fallthrough_b = OpFunction %bool None %35 -%150 = OpLabel -%151 = OpAccessChain %_ptr_Uniform_float %22 %int_2 -%152 = OpLoad %float %151 -%153 = OpConvertFToS %int %152 -OpSelectionMerge %154 None -OpSwitch %153 %156 1 %155 -%155 = OpLabel -%157 = OpAccessChain %_ptr_Uniform_float %22 %int_2 -%158 = OpLoad %float %157 -%159 = OpFOrdEqual %bool %158 %float_123 -OpSelectionMerge %161 None -OpBranchConditional %159 %160 %161 -%160 = OpLabel -OpReturnValue %false -%161 = OpLabel -OpBranch %156 -%156 = OpLabel -OpReturnValue %true -%154 = OpLabel -OpUnreachable -OpFunctionEnd -%main = OpFunction %v4float None %162 -%163 = OpFunctionParameter %_ptr_Function_v2float -%164 = OpLabel -%210 = OpVariable %_ptr_Function_v4float Function -%165 = OpFunctionCall %bool %inside_while_loop_b -OpSelectionMerge %167 None -OpBranchConditional %165 %166 %167 -%166 = OpLabel -%168 = OpFunctionCall %bool %inside_infinite_do_loop_b -OpBranch %167 -%167 = OpLabel -%169 = OpPhi %bool %false %164 %168 %166 -OpSelectionMerge %171 None -OpBranchConditional %169 %170 %171 -%170 = OpLabel -%172 = OpFunctionCall %bool %inside_infinite_while_loop_b -OpBranch %171 -%171 = OpLabel -%173 = OpPhi %bool %false %167 %172 %170 -OpSelectionMerge %175 None -OpBranchConditional %173 %174 %175 -%174 = OpLabel -%176 = OpFunctionCall %bool %after_do_loop_b -OpBranch %175 -%175 = OpLabel -%177 = OpPhi %bool %false %171 %176 %174 -OpSelectionMerge %179 None -OpBranchConditional %177 %178 %179 -%178 = OpLabel -%180 = OpFunctionCall %bool %after_while_loop_b -OpBranch %179 -%179 = OpLabel -%181 = OpPhi %bool %false %175 %180 %178 -OpSelectionMerge %183 None -OpBranchConditional %181 %182 %183 -%182 = OpLabel -%184 = OpFunctionCall %bool %switch_with_all_returns_b -OpBranch %183 -%183 = OpLabel -%185 = OpPhi %bool %false %179 %184 %182 -OpSelectionMerge %187 None -OpBranchConditional %185 %186 %187 -%186 = OpLabel -%188 = OpFunctionCall %bool %switch_fallthrough_b -OpBranch %187 -%187 = OpLabel -%189 = OpPhi %bool %false %183 %188 %186 -OpSelectionMerge %191 None -OpBranchConditional %189 %190 %191 -%190 = OpLabel -%192 = OpFunctionCall %bool %switch_fallthrough_twice_b -OpBranch %191 -%191 = OpLabel -%193 = OpPhi %bool %false %187 %192 %190 -OpSelectionMerge %195 None -OpBranchConditional %193 %194 %195 -%194 = OpLabel -%196 = OpFunctionCall %bool %switch_with_break_in_loop_b -OpBranch %195 -%195 = OpLabel -%197 = OpPhi %bool %false %191 %196 %194 -OpSelectionMerge %199 None -OpBranchConditional %197 %198 %199 -%198 = OpLabel -%200 = OpFunctionCall %bool %switch_with_continue_in_loop_b -OpBranch %199 -%199 = OpLabel -%201 = OpPhi %bool %false %195 %200 %198 -OpSelectionMerge %203 None -OpBranchConditional %201 %202 %203 -%202 = OpLabel -%204 = OpFunctionCall %bool %switch_with_if_that_returns_b -OpBranch %203 -%203 = OpLabel -%205 = OpPhi %bool %false %199 %204 %202 -OpSelectionMerge %207 None -OpBranchConditional %205 %206 %207 -%206 = OpLabel -%208 = OpFunctionCall %bool %switch_with_one_sided_if_then_fallthrough_b -OpBranch %207 -%207 = OpLabel -%209 = OpPhi %bool %false %203 %208 %206 -OpSelectionMerge %214 None -OpBranchConditional %209 %212 %213 -%212 = OpLabel -%215 = OpAccessChain %_ptr_Uniform_v4float %22 %int_0 -%217 = OpLoad %v4float %215 -OpStore %210 %217 -OpBranch %214 -%213 = OpLabel -%218 = OpAccessChain %_ptr_Uniform_v4float %22 %int_1 -%219 = OpLoad %v4float %218 -OpStore %210 %219 -OpBranch %214 -%214 = OpLabel -%220 = OpLoad %v4float %210 -OpReturnValue %220 -OpFunctionEnd + %150 = OpLabel + %151 = OpAccessChain %_ptr_Uniform_float %22 %int_2 + %152 = OpLoad %float %151 + %153 = OpConvertFToS %int %152 + OpSelectionMerge %154 None + OpSwitch %153 %156 1 %155 + %155 = OpLabel + %157 = OpAccessChain %_ptr_Uniform_float %22 %int_2 + %158 = OpLoad %float %157 + %159 = OpFOrdEqual %bool %158 %float_123 + OpSelectionMerge %161 None + OpBranchConditional %159 %160 %161 + %160 = OpLabel + OpReturnValue %false + %161 = OpLabel + OpBranch %156 + %156 = OpLabel + OpReturnValue %true + %154 = OpLabel + OpUnreachable + OpFunctionEnd + %main = OpFunction %v4float None %162 + %163 = OpFunctionParameter %_ptr_Function_v2float + %164 = OpLabel + %210 = OpVariable %_ptr_Function_v4float Function + %165 = OpFunctionCall %bool %inside_while_loop_b + OpSelectionMerge %167 None + OpBranchConditional %165 %166 %167 + %166 = OpLabel + %168 = OpFunctionCall %bool %inside_infinite_do_loop_b + OpBranch %167 + %167 = OpLabel + %169 = OpPhi %bool %false %164 %168 %166 + OpSelectionMerge %171 None + OpBranchConditional %169 %170 %171 + %170 = OpLabel + %172 = OpFunctionCall %bool %inside_infinite_while_loop_b + OpBranch %171 + %171 = OpLabel + %173 = OpPhi %bool %false %167 %172 %170 + OpSelectionMerge %175 None + OpBranchConditional %173 %174 %175 + %174 = OpLabel + %176 = OpFunctionCall %bool %after_do_loop_b + OpBranch %175 + %175 = OpLabel + %177 = OpPhi %bool %false %171 %176 %174 + OpSelectionMerge %179 None + OpBranchConditional %177 %178 %179 + %178 = OpLabel + %180 = OpFunctionCall %bool %after_while_loop_b + OpBranch %179 + %179 = OpLabel + %181 = OpPhi %bool %false %175 %180 %178 + OpSelectionMerge %183 None + OpBranchConditional %181 %182 %183 + %182 = OpLabel + %184 = OpFunctionCall %bool %switch_with_all_returns_b + OpBranch %183 + %183 = OpLabel + %185 = OpPhi %bool %false %179 %184 %182 + OpSelectionMerge %187 None + OpBranchConditional %185 %186 %187 + %186 = OpLabel + %188 = OpFunctionCall %bool %switch_fallthrough_b + OpBranch %187 + %187 = OpLabel + %189 = OpPhi %bool %false %183 %188 %186 + OpSelectionMerge %191 None + OpBranchConditional %189 %190 %191 + %190 = OpLabel + %192 = OpFunctionCall %bool %switch_fallthrough_twice_b + OpBranch %191 + %191 = OpLabel + %193 = OpPhi %bool %false %187 %192 %190 + OpSelectionMerge %195 None + OpBranchConditional %193 %194 %195 + %194 = OpLabel + %196 = OpFunctionCall %bool %switch_with_break_in_loop_b + OpBranch %195 + %195 = OpLabel + %197 = OpPhi %bool %false %191 %196 %194 + OpSelectionMerge %199 None + OpBranchConditional %197 %198 %199 + %198 = OpLabel + %200 = OpFunctionCall %bool %switch_with_continue_in_loop_b + OpBranch %199 + %199 = OpLabel + %201 = OpPhi %bool %false %195 %200 %198 + OpSelectionMerge %203 None + OpBranchConditional %201 %202 %203 + %202 = OpLabel + %204 = OpFunctionCall %bool %switch_with_if_that_returns_b + OpBranch %203 + %203 = OpLabel + %205 = OpPhi %bool %false %199 %204 %202 + OpSelectionMerge %207 None + OpBranchConditional %205 %206 %207 + %206 = OpLabel + %208 = OpFunctionCall %bool %switch_with_one_sided_if_then_fallthrough_b + OpBranch %207 + %207 = OpLabel + %209 = OpPhi %bool %false %203 %208 %206 + OpSelectionMerge %214 None + OpBranchConditional %209 %212 %213 + %212 = OpLabel + %215 = OpAccessChain %_ptr_Uniform_v4float %22 %int_0 + %217 = OpLoad %v4float %215 + OpStore %210 %217 + OpBranch %214 + %213 = OpLabel + %218 = OpAccessChain %_ptr_Uniform_v4float %22 %int_1 + %219 = OpLoad %v4float %218 + OpStore %210 %219 + OpBranch %214 + %214 = OpLabel + %220 = OpLoad %v4float %210 + OpReturnValue %220 + OpFunctionEnd diff --git a/tests/sksl/shared/ReturnsValueOnEveryPathES3.skrp b/tests/sksl/shared/ReturnsValueOnEveryPathES3.skrp index 13914805a0d5..90d875e7d5ce 100644 --- a/tests/sksl/shared/ReturnsValueOnEveryPathES3.skrp +++ b/tests/sksl/shared/ReturnsValueOnEveryPathES3.skrp @@ -1,3 +1,5 @@ +303 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true store_condition_mask $12 = CondMask diff --git a/tests/sksl/shared/ReturnsValueOnEveryPathES3.wgsl b/tests/sksl/shared/ReturnsValueOnEveryPathES3.wgsl new file mode 100644 index 000000000000..de0417416ca2 --- /dev/null +++ b/tests/sksl/shared/ReturnsValueOnEveryPathES3.wgsl @@ -0,0 +1,304 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, + unknownInput: f32, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn inside_while_loop_b() -> bool { + { + loop { + if _globalUniforms.unknownInput == 123.0 { + { + return false; + } + } else { + break; + } + } + return true; + } +} +fn inside_infinite_do_loop_b() -> bool { + { + loop { + { + return true; + } + continuing { + break if false; + } + } + } + return bool(); +} +fn inside_infinite_while_loop_b() -> bool { + { + loop { + if true { + { + return true; + } + } else { + break; + } + } + } + return bool(); +} +fn after_do_loop_b() -> bool { + { + loop { + { + break; + } + continuing { + break if false; + } + } + return true; + } +} +fn after_while_loop_b() -> bool { + { + loop { + if true { + { + break; + } + } else { + break; + } + } + return true; + } +} +fn switch_with_all_returns_b() -> bool { + { + let _skTemp0 = i32(_globalUniforms.unknownInput); + switch _skTemp0 { + case 1 { + return true; + } + case 2 { + return false; + } + case default { + return false; + } + } + } +} +fn switch_fallthrough_b() -> bool { + { + let _skTemp1 = i32(_globalUniforms.unknownInput); + switch _skTemp1 { + case 1 { + return true; + } + case 2, default { + return false; + } + } + } +} +fn switch_fallthrough_twice_b() -> bool { + { + let _skTemp2 = i32(_globalUniforms.unknownInput); + switch _skTemp2 { + case 1, 2, default { + return true; + } + } + } +} +fn switch_with_break_in_loop_b() -> bool { + { + let _skTemp3 = i32(_globalUniforms.unknownInput); + switch _skTemp3 { + case 1, default { + var _skTemp4: bool = false; + if _skTemp3 == 1 { + { + var x: i32 = 0; + loop { + { + break; + } + continuing { + x = x + i32(1); + break if x > 10; + } + } + } + // fallthrough + } + return true; + } + } + } +} +fn switch_with_continue_in_loop_b() -> bool { + { + let _skTemp5 = i32(_globalUniforms.unknownInput); + switch _skTemp5 { + case 1, default { + var _skTemp6: bool = false; + if _skTemp5 == 1 { + { + var x: i32 = 0; + loop { + { + continue; + } + continuing { + x = x + i32(1); + break if x > 10; + } + } + } + // fallthrough + } + return true; + } + } + } +} +fn switch_with_if_that_returns_b() -> bool { + { + let _skTemp7 = i32(_globalUniforms.unknownInput); + switch _skTemp7 { + case 1, default { + var _skTemp8: bool = false; + if _skTemp7 == 1 { + if _globalUniforms.unknownInput == 123.0 { + return false; + } else { + return true; + } + // fallthrough + } + return true; + } + } + } +} +fn switch_with_one_sided_if_then_fallthrough_b() -> bool { + { + let _skTemp9 = i32(_globalUniforms.unknownInput); + switch _skTemp9 { + case 1, default { + var _skTemp10: bool = false; + if _skTemp9 == 1 { + if _globalUniforms.unknownInput == 123.0 { + return false; + } + // fallthrough + } + return true; + } + } + } +} +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var _skTemp11: vec4; + var _skTemp12: bool; + var _skTemp13: bool; + var _skTemp14: bool; + var _skTemp15: bool; + var _skTemp16: bool; + var _skTemp17: bool; + var _skTemp18: bool; + var _skTemp19: bool; + var _skTemp20: bool; + var _skTemp21: bool; + var _skTemp22: bool; + let _skTemp23 = inside_while_loop_b(); + if _skTemp23 { + let _skTemp24 = inside_infinite_do_loop_b(); + _skTemp22 = _skTemp24; + } else { + _skTemp22 = false; + } + if _skTemp22 { + let _skTemp25 = inside_infinite_while_loop_b(); + _skTemp21 = _skTemp25; + } else { + _skTemp21 = false; + } + if _skTemp21 { + let _skTemp26 = after_do_loop_b(); + _skTemp20 = _skTemp26; + } else { + _skTemp20 = false; + } + if _skTemp20 { + let _skTemp27 = after_while_loop_b(); + _skTemp19 = _skTemp27; + } else { + _skTemp19 = false; + } + if _skTemp19 { + let _skTemp28 = switch_with_all_returns_b(); + _skTemp18 = _skTemp28; + } else { + _skTemp18 = false; + } + if _skTemp18 { + let _skTemp29 = switch_fallthrough_b(); + _skTemp17 = _skTemp29; + } else { + _skTemp17 = false; + } + if _skTemp17 { + let _skTemp30 = switch_fallthrough_twice_b(); + _skTemp16 = _skTemp30; + } else { + _skTemp16 = false; + } + if _skTemp16 { + let _skTemp31 = switch_with_break_in_loop_b(); + _skTemp15 = _skTemp31; + } else { + _skTemp15 = false; + } + if _skTemp15 { + let _skTemp32 = switch_with_continue_in_loop_b(); + _skTemp14 = _skTemp32; + } else { + _skTemp14 = false; + } + if _skTemp14 { + let _skTemp33 = switch_with_if_that_returns_b(); + _skTemp13 = _skTemp33; + } else { + _skTemp13 = false; + } + if _skTemp13 { + let _skTemp34 = switch_with_one_sided_if_then_fallthrough_b(); + _skTemp12 = _skTemp34; + } else { + _skTemp12 = false; + } + if _skTemp12 { + _skTemp11 = _globalUniforms.colorGreen; + } else { + _skTemp11 = _globalUniforms.colorRed; + } + return _skTemp11; + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/SampleLocations.asm.vert b/tests/sksl/shared/SampleLocations.asm.vert index 565fc411fa13..4a3ca93980da 100644 --- a/tests/sksl/shared/SampleLocations.asm.vert +++ b/tests/sksl/shared/SampleLocations.asm.vert @@ -1,201 +1,201 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Vertex %main "main" %3 %sk_InstanceID %sk_VertexID %vcoord_Stage0 -OpName %sk_PerVertex "sk_PerVertex" -OpMemberName %sk_PerVertex 0 "sk_Position" -OpMemberName %sk_PerVertex 1 "sk_PointSize" -OpName %sk_InstanceID "sk_InstanceID" -OpName %sk_VertexID "sk_VertexID" -OpName %vcoord_Stage0 "vcoord_Stage0" -OpName %main "main" -OpName %x "x" -OpName %y "y" -OpName %ileft "ileft" -OpName %iright "iright" -OpName %itop "itop" -OpName %ibot "ibot" -OpName %outset "outset" -OpName %l "l" -OpName %r "r" -OpName %t "t" -OpName %b "b" -OpName %vertexpos "vertexpos" -OpMemberDecorate %sk_PerVertex 0 BuiltIn Position -OpMemberDecorate %sk_PerVertex 1 BuiltIn PointSize -OpDecorate %sk_PerVertex Block -OpDecorate %sk_InstanceID BuiltIn InstanceIndex -OpDecorate %sk_VertexID BuiltIn VertexIndex -OpDecorate %vcoord_Stage0 Location 1 -OpDecorate %vcoord_Stage0 NoPerspective -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %main "main" %3 %sk_InstanceID %sk_VertexID %vcoord_Stage0 + OpName %sk_PerVertex "sk_PerVertex" + OpMemberName %sk_PerVertex 0 "sk_Position" + OpMemberName %sk_PerVertex 1 "sk_PointSize" + OpName %sk_InstanceID "sk_InstanceID" + OpName %sk_VertexID "sk_VertexID" + OpName %vcoord_Stage0 "vcoord_Stage0" + OpName %main "main" + OpName %x "x" + OpName %y "y" + OpName %ileft "ileft" + OpName %iright "iright" + OpName %itop "itop" + OpName %ibot "ibot" + OpName %outset "outset" + OpName %l "l" + OpName %r "r" + OpName %t "t" + OpName %b "b" + OpName %vertexpos "vertexpos" + OpMemberDecorate %sk_PerVertex 0 BuiltIn Position + OpMemberDecorate %sk_PerVertex 1 BuiltIn PointSize + OpDecorate %sk_PerVertex Block + OpDecorate %sk_InstanceID BuiltIn InstanceIndex + OpDecorate %sk_VertexID BuiltIn VertexIndex + OpDecorate %vcoord_Stage0 Location 1 + OpDecorate %vcoord_Stage0 NoPerspective + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %sk_PerVertex = OpTypeStruct %v4float %float %_ptr_Output_sk_PerVertex = OpTypePointer Output %sk_PerVertex -%3 = OpVariable %_ptr_Output_sk_PerVertex Output -%int = OpTypeInt 32 1 + %3 = OpVariable %_ptr_Output_sk_PerVertex Output + %int = OpTypeInt 32 1 %_ptr_Input_int = OpTypePointer Input %int %sk_InstanceID = OpVariable %_ptr_Input_int Input %sk_VertexID = OpVariable %_ptr_Input_int Input -%v2float = OpTypeVector %float 2 + %v2float = OpTypeVector %float 2 %_ptr_Output_v2float = OpTypePointer Output %v2float %vcoord_Stage0 = OpVariable %_ptr_Output_v2float Output -%void = OpTypeVoid -%16 = OpTypeFunction %void + %void = OpTypeVoid + %16 = OpTypeFunction %void %_ptr_Function_int = OpTypePointer Function %int -%int_200 = OpConstant %int 200 -%int_929 = OpConstant %int 929 -%int_17 = OpConstant %int 17 -%int_1 = OpConstant %int 1 -%int_1637 = OpConstant %int 1637 -%int_313 = OpConstant %int 313 -%int_1901 = OpConstant %int 1901 + %int_200 = OpConstant %int 200 + %int_929 = OpConstant %int 929 + %int_17 = OpConstant %int 17 + %int_1 = OpConstant %int 1 + %int_1637 = OpConstant %int 1637 + %int_313 = OpConstant %int 313 + %int_1901 = OpConstant %int 1901 %_ptr_Function_float = OpTypePointer Function %float %float_0_03125 = OpConstant %float 0.03125 -%int_0 = OpConstant %int 0 -%int_2 = OpConstant %int 2 -%bool = OpTypeBool + %int_0 = OpConstant %int 0 + %int_2 = OpConstant %int 2 + %bool = OpTypeBool %float_0_0625 = OpConstant %float 0.0625 %_ptr_Function_v2float = OpTypePointer Function %v2float -%int_n1 = OpConstant %int -1 + %int_n1 = OpConstant %int -1 %_ptr_Output_float = OpTypePointer Output %float -%float_0 = OpConstant %float 0 -%float_1 = OpConstant %float 1 + %float_0 = OpConstant %float 0 + %float_1 = OpConstant %float 1 %_ptr_Output_v4float = OpTypePointer Output %v4float -%main = OpFunction %void None %16 -%17 = OpLabel -%x = OpVariable %_ptr_Function_int Function -%y = OpVariable %_ptr_Function_int Function -%ileft = OpVariable %_ptr_Function_int Function -%iright = OpVariable %_ptr_Function_int Function -%itop = OpVariable %_ptr_Function_int Function -%ibot = OpVariable %_ptr_Function_int Function -%outset = OpVariable %_ptr_Function_float Function -%63 = OpVariable %_ptr_Function_float Function -%l = OpVariable %_ptr_Function_float Function -%r = OpVariable %_ptr_Function_float Function -%t = OpVariable %_ptr_Function_float Function -%b = OpVariable %_ptr_Function_float Function -%vertexpos = OpVariable %_ptr_Function_v2float Function -%92 = OpVariable %_ptr_Function_float Function -%104 = OpVariable %_ptr_Function_float Function -%20 = OpLoad %int %sk_InstanceID -%22 = OpSMod %int %20 %int_200 -OpStore %x %22 -%24 = OpLoad %int %sk_InstanceID -%25 = OpSDiv %int %24 %int_200 -OpStore %y %25 -%27 = OpLoad %int %sk_InstanceID -%29 = OpIMul %int %27 %int_929 -%31 = OpSMod %int %29 %int_17 -OpStore %ileft %31 -%34 = OpIAdd %int %31 %int_1 -%35 = OpLoad %int %sk_InstanceID -%37 = OpIMul %int %35 %int_1637 -%38 = OpISub %int %int_17 %31 -%39 = OpSMod %int %37 %38 -%40 = OpIAdd %int %34 %39 -OpStore %iright %40 -%42 = OpLoad %int %sk_InstanceID -%44 = OpIMul %int %42 %int_313 -%45 = OpSMod %int %44 %int_17 -OpStore %itop %45 -%47 = OpIAdd %int %45 %int_1 -%48 = OpLoad %int %sk_InstanceID -%50 = OpIMul %int %48 %int_1901 -%51 = OpISub %int %int_17 %45 -%52 = OpSMod %int %50 %51 -%53 = OpIAdd %int %47 %52 -OpStore %ibot %53 -OpStore %outset %float_0_03125 -%58 = OpIAdd %int %22 %25 -%60 = OpSMod %int %58 %int_2 -%61 = OpIEqual %bool %int_0 %60 -OpSelectionMerge %66 None -OpBranchConditional %61 %64 %65 -%64 = OpLabel -%67 = OpFNegate %float %float_0_03125 -OpStore %63 %67 -OpBranch %66 -%65 = OpLabel -OpStore %63 %float_0_03125 -OpBranch %66 -%66 = OpLabel -%68 = OpLoad %float %63 -OpStore %outset %68 -%70 = OpConvertSToF %float %31 -%72 = OpFMul %float %70 %float_0_0625 -%73 = OpFSub %float %72 %68 -OpStore %l %73 -%75 = OpConvertSToF %float %40 -%76 = OpFMul %float %75 %float_0_0625 -%77 = OpFAdd %float %76 %68 -OpStore %r %77 -%79 = OpConvertSToF %float %45 -%80 = OpFMul %float %79 %float_0_0625 -%81 = OpFSub %float %80 %68 -OpStore %t %81 -%83 = OpConvertSToF %float %53 -%84 = OpFMul %float %83 %float_0_0625 -%85 = OpFAdd %float %84 %68 -OpStore %b %85 -%88 = OpConvertSToF %float %22 -%89 = OpLoad %int %sk_VertexID -%90 = OpSMod %int %89 %int_2 -%91 = OpIEqual %bool %int_0 %90 -OpSelectionMerge %95 None -OpBranchConditional %91 %93 %94 -%93 = OpLabel -OpStore %92 %73 -OpBranch %95 -%94 = OpLabel -OpStore %92 %77 -OpBranch %95 -%95 = OpLabel -%96 = OpLoad %float %92 -%97 = OpFAdd %float %88 %96 -%98 = OpAccessChain %_ptr_Function_float %vertexpos %int_0 -OpStore %98 %97 -%99 = OpLoad %int %y -%100 = OpConvertSToF %float %99 -%101 = OpLoad %int %sk_VertexID -%102 = OpSDiv %int %101 %int_2 -%103 = OpIEqual %bool %int_0 %102 -OpSelectionMerge %107 None -OpBranchConditional %103 %105 %106 -%105 = OpLabel -%108 = OpLoad %float %t -OpStore %104 %108 -OpBranch %107 -%106 = OpLabel -%109 = OpLoad %float %b -OpStore %104 %109 -OpBranch %107 -%107 = OpLabel -%110 = OpLoad %float %104 -%111 = OpFAdd %float %100 %110 -%112 = OpAccessChain %_ptr_Function_float %vertexpos %int_1 -OpStore %112 %111 -%113 = OpLoad %int %sk_VertexID -%114 = OpSMod %int %113 %int_2 -%115 = OpIEqual %bool %int_0 %114 -%116 = OpSelect %int %115 %int_n1 %int_1 -%118 = OpConvertSToF %float %116 -%119 = OpAccessChain %_ptr_Output_float %vcoord_Stage0 %int_0 -OpStore %119 %118 -%121 = OpLoad %int %sk_VertexID -%122 = OpSDiv %int %121 %int_2 -%123 = OpIEqual %bool %int_0 %122 -%124 = OpSelect %int %123 %int_n1 %int_1 -%125 = OpConvertSToF %float %124 -%126 = OpAccessChain %_ptr_Output_float %vcoord_Stage0 %int_1 -OpStore %126 %125 -%127 = OpLoad %v2float %vertexpos -%128 = OpCompositeExtract %float %127 0 -%129 = OpLoad %v2float %vertexpos -%130 = OpCompositeExtract %float %129 1 -%133 = OpCompositeConstruct %v4float %128 %130 %float_0 %float_1 -%134 = OpAccessChain %_ptr_Output_v4float %3 %int_0 -OpStore %134 %133 -OpReturn -OpFunctionEnd + %main = OpFunction %void None %16 + %17 = OpLabel + %x = OpVariable %_ptr_Function_int Function + %y = OpVariable %_ptr_Function_int Function + %ileft = OpVariable %_ptr_Function_int Function + %iright = OpVariable %_ptr_Function_int Function + %itop = OpVariable %_ptr_Function_int Function + %ibot = OpVariable %_ptr_Function_int Function + %outset = OpVariable %_ptr_Function_float Function + %63 = OpVariable %_ptr_Function_float Function + %l = OpVariable %_ptr_Function_float Function + %r = OpVariable %_ptr_Function_float Function + %t = OpVariable %_ptr_Function_float Function + %b = OpVariable %_ptr_Function_float Function + %vertexpos = OpVariable %_ptr_Function_v2float Function + %92 = OpVariable %_ptr_Function_float Function + %104 = OpVariable %_ptr_Function_float Function + %20 = OpLoad %int %sk_InstanceID + %22 = OpSMod %int %20 %int_200 + OpStore %x %22 + %24 = OpLoad %int %sk_InstanceID + %25 = OpSDiv %int %24 %int_200 + OpStore %y %25 + %27 = OpLoad %int %sk_InstanceID + %29 = OpIMul %int %27 %int_929 + %31 = OpSMod %int %29 %int_17 + OpStore %ileft %31 + %34 = OpIAdd %int %31 %int_1 + %35 = OpLoad %int %sk_InstanceID + %37 = OpIMul %int %35 %int_1637 + %38 = OpISub %int %int_17 %31 + %39 = OpSMod %int %37 %38 + %40 = OpIAdd %int %34 %39 + OpStore %iright %40 + %42 = OpLoad %int %sk_InstanceID + %44 = OpIMul %int %42 %int_313 + %45 = OpSMod %int %44 %int_17 + OpStore %itop %45 + %47 = OpIAdd %int %45 %int_1 + %48 = OpLoad %int %sk_InstanceID + %50 = OpIMul %int %48 %int_1901 + %51 = OpISub %int %int_17 %45 + %52 = OpSMod %int %50 %51 + %53 = OpIAdd %int %47 %52 + OpStore %ibot %53 + OpStore %outset %float_0_03125 + %58 = OpIAdd %int %22 %25 + %60 = OpSMod %int %58 %int_2 + %61 = OpIEqual %bool %int_0 %60 + OpSelectionMerge %66 None + OpBranchConditional %61 %64 %65 + %64 = OpLabel + %67 = OpFNegate %float %float_0_03125 + OpStore %63 %67 + OpBranch %66 + %65 = OpLabel + OpStore %63 %float_0_03125 + OpBranch %66 + %66 = OpLabel + %68 = OpLoad %float %63 + OpStore %outset %68 + %70 = OpConvertSToF %float %31 + %72 = OpFMul %float %70 %float_0_0625 + %73 = OpFSub %float %72 %68 + OpStore %l %73 + %75 = OpConvertSToF %float %40 + %76 = OpFMul %float %75 %float_0_0625 + %77 = OpFAdd %float %76 %68 + OpStore %r %77 + %79 = OpConvertSToF %float %45 + %80 = OpFMul %float %79 %float_0_0625 + %81 = OpFSub %float %80 %68 + OpStore %t %81 + %83 = OpConvertSToF %float %53 + %84 = OpFMul %float %83 %float_0_0625 + %85 = OpFAdd %float %84 %68 + OpStore %b %85 + %88 = OpConvertSToF %float %22 + %89 = OpLoad %int %sk_VertexID + %90 = OpSMod %int %89 %int_2 + %91 = OpIEqual %bool %int_0 %90 + OpSelectionMerge %95 None + OpBranchConditional %91 %93 %94 + %93 = OpLabel + OpStore %92 %73 + OpBranch %95 + %94 = OpLabel + OpStore %92 %77 + OpBranch %95 + %95 = OpLabel + %96 = OpLoad %float %92 + %97 = OpFAdd %float %88 %96 + %98 = OpAccessChain %_ptr_Function_float %vertexpos %int_0 + OpStore %98 %97 + %99 = OpLoad %int %y + %100 = OpConvertSToF %float %99 + %101 = OpLoad %int %sk_VertexID + %102 = OpSDiv %int %101 %int_2 + %103 = OpIEqual %bool %int_0 %102 + OpSelectionMerge %107 None + OpBranchConditional %103 %105 %106 + %105 = OpLabel + %108 = OpLoad %float %t + OpStore %104 %108 + OpBranch %107 + %106 = OpLabel + %109 = OpLoad %float %b + OpStore %104 %109 + OpBranch %107 + %107 = OpLabel + %110 = OpLoad %float %104 + %111 = OpFAdd %float %100 %110 + %112 = OpAccessChain %_ptr_Function_float %vertexpos %int_1 + OpStore %112 %111 + %113 = OpLoad %int %sk_VertexID + %114 = OpSMod %int %113 %int_2 + %115 = OpIEqual %bool %int_0 %114 + %116 = OpSelect %int %115 %int_n1 %int_1 + %118 = OpConvertSToF %float %116 + %119 = OpAccessChain %_ptr_Output_float %vcoord_Stage0 %int_0 + OpStore %119 %118 + %121 = OpLoad %int %sk_VertexID + %122 = OpSDiv %int %121 %int_2 + %123 = OpIEqual %bool %int_0 %122 + %124 = OpSelect %int %123 %int_n1 %int_1 + %125 = OpConvertSToF %float %124 + %126 = OpAccessChain %_ptr_Output_float %vcoord_Stage0 %int_1 + OpStore %126 %125 + %127 = OpLoad %v2float %vertexpos + %128 = OpCompositeExtract %float %127 0 + %129 = OpLoad %v2float %vertexpos + %130 = OpCompositeExtract %float %129 1 + %133 = OpCompositeConstruct %v4float %128 %130 %float_0 %float_1 + %134 = OpAccessChain %_ptr_Output_v4float %3 %int_0 + OpStore %134 %133 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/SampleLocations.wgsl b/tests/sksl/shared/SampleLocations.wgsl new file mode 100644 index 000000000000..7fba82e225ba --- /dev/null +++ b/tests/sksl/shared/SampleLocations.wgsl @@ -0,0 +1,37 @@ +diagnostic(off, derivative_uniformity); +struct VSIn { + @builtin(instance_index) sk_InstanceID: u32, + @builtin(vertex_index) sk_VertexID: u32, +}; +struct VSOut { + @builtin(position) sk_Position: vec4, + @location(1) vcoord_Stage0: vec2, +}; +/* unsupported */ var sk_PointSize: f32; +fn main(_stageIn: VSIn, _stageOut: ptr) { + { + var x: i32 = i32(_stageIn.sk_InstanceID) % 200; + var y: i32 = i32(_stageIn.sk_InstanceID) / 200; + var ileft: i32 = (i32(_stageIn.sk_InstanceID) * 929) % 17; + var iright: i32 = (ileft + 1) + (i32(_stageIn.sk_InstanceID) * 1637) % (17 - ileft); + var itop: i32 = (i32(_stageIn.sk_InstanceID) * 313) % 17; + var ibot: i32 = (itop + 1) + (i32(_stageIn.sk_InstanceID) * 1901) % (17 - itop); + var outset: f32 = 0.03125; + outset = select(outset, -outset, (0 == ((x + y) % 2))); + var l: f32 = f32(ileft) * 0.0625 - outset; + var r: f32 = f32(iright) * 0.0625 + outset; + var t: f32 = f32(itop) * 0.0625 - outset; + var b: f32 = f32(ibot) * 0.0625 + outset; + var vertexpos: vec2; + vertexpos.x = f32(x) + (select(r, l, (0 == (i32(_stageIn.sk_VertexID) % 2)))); + vertexpos.y = f32(y) + (select(b, t, (0 == (i32(_stageIn.sk_VertexID) / 2)))); + (*_stageOut).vcoord_Stage0.x = f32(select(1, -1, (0 == (i32(_stageIn.sk_VertexID) % 2)))); + (*_stageOut).vcoord_Stage0.y = f32(select(1, -1, (0 == (i32(_stageIn.sk_VertexID) / 2)))); + (*_stageOut).sk_Position = vec4(vertexpos.x, vertexpos.y, 0.0, 1.0); + } +} +@vertex fn vertexMain(_stageIn: VSIn) -> VSOut { + var _stageOut: VSOut; + main(_stageIn, &_stageOut); + return _stageOut; +} diff --git a/tests/sksl/shared/ScalarConversionConstructorsES2.asm.frag b/tests/sksl/shared/ScalarConversionConstructorsES2.asm.frag index af37bd8ae595..03193e71c100 100644 --- a/tests/sksl/shared/ScalarConversionConstructorsES2.asm.frag +++ b/tests/sksl/shared/ScalarConversionConstructorsES2.asm.frag @@ -1,169 +1,169 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %f "f" -OpName %i "i" -OpName %b "b" -OpName %f1 "f1" -OpName %f2 "f2" -OpName %f3 "f3" -OpName %i1 "i1" -OpName %i2 "i2" -OpName %i3 "i3" -OpName %b1 "b1" -OpName %b2 "b2" -OpName %b3 "b3" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %63 RelaxedPrecision -OpDecorate %64 RelaxedPrecision -OpDecorate %65 RelaxedPrecision -OpDecorate %66 RelaxedPrecision -OpDecorate %67 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %69 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -OpDecorate %71 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %73 RelaxedPrecision -OpDecorate %74 RelaxedPrecision -OpDecorate %75 RelaxedPrecision -OpDecorate %76 RelaxedPrecision -OpDecorate %85 RelaxedPrecision -OpDecorate %87 RelaxedPrecision -OpDecorate %88 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %f "f" + OpName %i "i" + OpName %b "b" + OpName %f1 "f1" + OpName %f2 "f2" + OpName %f3 "f3" + OpName %i1 "i1" + OpName %i2 "i2" + OpName %i3 "i3" + OpName %b1 "b1" + OpName %b2 "b2" + OpName %b3 "b3" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %63 RelaxedPrecision + OpDecorate %64 RelaxedPrecision + OpDecorate %65 RelaxedPrecision + OpDecorate %66 RelaxedPrecision + OpDecorate %67 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %69 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %71 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %73 RelaxedPrecision + OpDecorate %74 RelaxedPrecision + OpDecorate %75 RelaxedPrecision + OpDecorate %76 RelaxedPrecision + OpDecorate %85 RelaxedPrecision + OpDecorate %87 RelaxedPrecision + OpDecorate %88 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_float = OpTypePointer Function %float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 %_ptr_Function_int = OpTypePointer Function %int %_ptr_Function_bool = OpTypePointer Function %bool -%float_1 = OpConstant %float 1 -%int_1 = OpConstant %int 1 -%float_9 = OpConstant %float 9 + %float_1 = OpConstant %float 1 + %int_1 = OpConstant %int 1 + %float_9 = OpConstant %float 9 %_ptr_Function_v4float = OpTypePointer Function %v4float %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%f = OpVariable %_ptr_Function_float Function -%i = OpVariable %_ptr_Function_int Function -%b = OpVariable %_ptr_Function_bool Function -%f1 = OpVariable %_ptr_Function_float Function -%f2 = OpVariable %_ptr_Function_float Function -%f3 = OpVariable %_ptr_Function_float Function -%i1 = OpVariable %_ptr_Function_int Function -%i2 = OpVariable %_ptr_Function_int Function -%i3 = OpVariable %_ptr_Function_int Function -%b1 = OpVariable %_ptr_Function_bool Function -%b2 = OpVariable %_ptr_Function_bool Function -%b3 = OpVariable %_ptr_Function_bool Function -%79 = OpVariable %_ptr_Function_v4float Function -%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %28 -%33 = OpCompositeExtract %float %32 1 -OpStore %f %33 -%36 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%37 = OpLoad %v4float %36 -%38 = OpCompositeExtract %float %37 1 -%39 = OpConvertFToS %int %38 -OpStore %i %39 -%42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%43 = OpLoad %v4float %42 -%44 = OpCompositeExtract %float %43 1 -%45 = OpFUnordNotEqual %bool %44 %float_0 -OpStore %b %45 -OpStore %f1 %33 -%48 = OpConvertSToF %float %39 -OpStore %f2 %48 -%50 = OpSelect %float %45 %float_1 %float_0 -OpStore %f3 %50 -%53 = OpConvertFToS %int %33 -OpStore %i1 %53 -OpStore %i2 %39 -%56 = OpSelect %int %45 %int_1 %int_0 -OpStore %i3 %56 -%59 = OpFUnordNotEqual %bool %33 %float_0 -OpStore %b1 %59 -%61 = OpINotEqual %bool %39 %int_0 -OpStore %b2 %61 -OpStore %b3 %45 -%63 = OpFAdd %float %33 %48 -%64 = OpFAdd %float %63 %50 -%65 = OpConvertSToF %float %53 -%66 = OpFAdd %float %64 %65 -%67 = OpConvertSToF %float %39 -%68 = OpFAdd %float %66 %67 -%69 = OpConvertSToF %float %56 -%70 = OpFAdd %float %68 %69 -%71 = OpSelect %float %59 %float_1 %float_0 -%72 = OpFAdd %float %70 %71 -%73 = OpSelect %float %61 %float_1 %float_0 -%74 = OpFAdd %float %72 %73 -%75 = OpSelect %float %45 %float_1 %float_0 -%76 = OpFAdd %float %74 %75 -%78 = OpFOrdEqual %bool %76 %float_9 -OpSelectionMerge %83 None -OpBranchConditional %78 %81 %82 -%81 = OpLabel -%84 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%85 = OpLoad %v4float %84 -OpStore %79 %85 -OpBranch %83 -%82 = OpLabel -%86 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%87 = OpLoad %v4float %86 -OpStore %79 %87 -OpBranch %83 -%83 = OpLabel -%88 = OpLoad %v4float %79 -OpReturnValue %88 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %f = OpVariable %_ptr_Function_float Function + %i = OpVariable %_ptr_Function_int Function + %b = OpVariable %_ptr_Function_bool Function + %f1 = OpVariable %_ptr_Function_float Function + %f2 = OpVariable %_ptr_Function_float Function + %f3 = OpVariable %_ptr_Function_float Function + %i1 = OpVariable %_ptr_Function_int Function + %i2 = OpVariable %_ptr_Function_int Function + %i3 = OpVariable %_ptr_Function_int Function + %b1 = OpVariable %_ptr_Function_bool Function + %b2 = OpVariable %_ptr_Function_bool Function + %b3 = OpVariable %_ptr_Function_bool Function + %79 = OpVariable %_ptr_Function_v4float Function + %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %28 + %33 = OpCompositeExtract %float %32 1 + OpStore %f %33 + %36 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %37 = OpLoad %v4float %36 + %38 = OpCompositeExtract %float %37 1 + %39 = OpConvertFToS %int %38 + OpStore %i %39 + %42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %43 = OpLoad %v4float %42 + %44 = OpCompositeExtract %float %43 1 + %45 = OpFUnordNotEqual %bool %44 %float_0 + OpStore %b %45 + OpStore %f1 %33 + %48 = OpConvertSToF %float %39 + OpStore %f2 %48 + %50 = OpSelect %float %45 %float_1 %float_0 + OpStore %f3 %50 + %53 = OpConvertFToS %int %33 + OpStore %i1 %53 + OpStore %i2 %39 + %56 = OpSelect %int %45 %int_1 %int_0 + OpStore %i3 %56 + %59 = OpFUnordNotEqual %bool %33 %float_0 + OpStore %b1 %59 + %61 = OpINotEqual %bool %39 %int_0 + OpStore %b2 %61 + OpStore %b3 %45 + %63 = OpFAdd %float %33 %48 + %64 = OpFAdd %float %63 %50 + %65 = OpConvertSToF %float %53 + %66 = OpFAdd %float %64 %65 + %67 = OpConvertSToF %float %39 + %68 = OpFAdd %float %66 %67 + %69 = OpConvertSToF %float %56 + %70 = OpFAdd %float %68 %69 + %71 = OpSelect %float %59 %float_1 %float_0 + %72 = OpFAdd %float %70 %71 + %73 = OpSelect %float %61 %float_1 %float_0 + %74 = OpFAdd %float %72 %73 + %75 = OpSelect %float %45 %float_1 %float_0 + %76 = OpFAdd %float %74 %75 + %78 = OpFOrdEqual %bool %76 %float_9 + OpSelectionMerge %83 None + OpBranchConditional %78 %81 %82 + %81 = OpLabel + %84 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %85 = OpLoad %v4float %84 + OpStore %79 %85 + OpBranch %83 + %82 = OpLabel + %86 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %87 = OpLoad %v4float %86 + OpStore %79 %87 + OpBranch %83 + %83 = OpLabel + %88 = OpLoad %v4float %79 + OpReturnValue %88 + OpFunctionEnd diff --git a/tests/sksl/shared/ScalarConversionConstructorsES2.skrp b/tests/sksl/shared/ScalarConversionConstructorsES2.skrp index 94f12445acb7..1a7cb875c85e 100644 --- a/tests/sksl/shared/ScalarConversionConstructorsES2.skrp +++ b/tests/sksl/shared/ScalarConversionConstructorsES2.skrp @@ -1,3 +1,5 @@ +58 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_uniform f = colorGreen(1) diff --git a/tests/sksl/shared/ScalarConversionConstructorsES2.wgsl b/tests/sksl/shared/ScalarConversionConstructorsES2.wgsl new file mode 100644 index 000000000000..df25d879a349 --- /dev/null +++ b/tests/sksl/shared/ScalarConversionConstructorsES2.wgsl @@ -0,0 +1,36 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var f: f32 = f32(_globalUniforms.colorGreen.y); + var i: i32 = i32(_globalUniforms.colorGreen.y); + var b: bool = bool(_globalUniforms.colorGreen.y); + var f1: f32 = f; + var f2: f32 = f32(i); + var f3: f32 = f32(b); + var i1: i32 = i32(f); + var i2: i32 = i; + var i3: i32 = i32(b); + var b1: bool = bool(f); + var b2: bool = bool(i); + var b3: bool = b; + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((((((((((f32(f1) + f32(f2)) + f32(f3)) + f32(i1)) + f32(i2)) + f32(i3)) + f32(b1)) + f32(b2)) + f32(b3)) == 9.0))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/ScalarConversionConstructorsES3.asm.frag b/tests/sksl/shared/ScalarConversionConstructorsES3.asm.frag index e964eb3fd04c..0d8ccb64cc68 100644 --- a/tests/sksl/shared/ScalarConversionConstructorsES3.asm.frag +++ b/tests/sksl/shared/ScalarConversionConstructorsES3.asm.frag @@ -1,235 +1,235 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %f "f" -OpName %i "i" -OpName %u "u" -OpName %b "b" -OpName %f1 "f1" -OpName %f2 "f2" -OpName %f3 "f3" -OpName %f4 "f4" -OpName %i1 "i1" -OpName %i2 "i2" -OpName %i3 "i3" -OpName %i4 "i4" -OpName %u1 "u1" -OpName %u2 "u2" -OpName %u3 "u3" -OpName %u4 "u4" -OpName %b1 "b1" -OpName %b2 "b2" -OpName %b3 "b3" -OpName %b4 "b4" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %45 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %51 RelaxedPrecision -OpDecorate %85 RelaxedPrecision -OpDecorate %86 RelaxedPrecision -OpDecorate %87 RelaxedPrecision -OpDecorate %88 RelaxedPrecision -OpDecorate %89 RelaxedPrecision -OpDecorate %90 RelaxedPrecision -OpDecorate %91 RelaxedPrecision -OpDecorate %92 RelaxedPrecision -OpDecorate %93 RelaxedPrecision -OpDecorate %94 RelaxedPrecision -OpDecorate %95 RelaxedPrecision -OpDecorate %96 RelaxedPrecision -OpDecorate %97 RelaxedPrecision -OpDecorate %98 RelaxedPrecision -OpDecorate %99 RelaxedPrecision -OpDecorate %100 RelaxedPrecision -OpDecorate %101 RelaxedPrecision -OpDecorate %102 RelaxedPrecision -OpDecorate %103 RelaxedPrecision -OpDecorate %104 RelaxedPrecision -OpDecorate %105 RelaxedPrecision -OpDecorate %106 RelaxedPrecision -OpDecorate %107 RelaxedPrecision -OpDecorate %108 RelaxedPrecision -OpDecorate %109 RelaxedPrecision -OpDecorate %110 RelaxedPrecision -OpDecorate %111 RelaxedPrecision -OpDecorate %120 RelaxedPrecision -OpDecorate %122 RelaxedPrecision -OpDecorate %123 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %f "f" + OpName %i "i" + OpName %u "u" + OpName %b "b" + OpName %f1 "f1" + OpName %f2 "f2" + OpName %f3 "f3" + OpName %f4 "f4" + OpName %i1 "i1" + OpName %i2 "i2" + OpName %i3 "i3" + OpName %i4 "i4" + OpName %u1 "u1" + OpName %u2 "u2" + OpName %u3 "u3" + OpName %u4 "u4" + OpName %b1 "b1" + OpName %b2 "b2" + OpName %b3 "b3" + OpName %b4 "b4" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %45 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %85 RelaxedPrecision + OpDecorate %86 RelaxedPrecision + OpDecorate %87 RelaxedPrecision + OpDecorate %88 RelaxedPrecision + OpDecorate %89 RelaxedPrecision + OpDecorate %90 RelaxedPrecision + OpDecorate %91 RelaxedPrecision + OpDecorate %92 RelaxedPrecision + OpDecorate %93 RelaxedPrecision + OpDecorate %94 RelaxedPrecision + OpDecorate %95 RelaxedPrecision + OpDecorate %96 RelaxedPrecision + OpDecorate %97 RelaxedPrecision + OpDecorate %98 RelaxedPrecision + OpDecorate %99 RelaxedPrecision + OpDecorate %100 RelaxedPrecision + OpDecorate %101 RelaxedPrecision + OpDecorate %102 RelaxedPrecision + OpDecorate %103 RelaxedPrecision + OpDecorate %104 RelaxedPrecision + OpDecorate %105 RelaxedPrecision + OpDecorate %106 RelaxedPrecision + OpDecorate %107 RelaxedPrecision + OpDecorate %108 RelaxedPrecision + OpDecorate %109 RelaxedPrecision + OpDecorate %110 RelaxedPrecision + OpDecorate %111 RelaxedPrecision + OpDecorate %120 RelaxedPrecision + OpDecorate %122 RelaxedPrecision + OpDecorate %123 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_float = OpTypePointer Function %float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 %_ptr_Function_int = OpTypePointer Function %int -%uint = OpTypeInt 32 0 + %uint = OpTypeInt 32 0 %_ptr_Function_uint = OpTypePointer Function %uint %_ptr_Function_bool = OpTypePointer Function %bool -%float_1 = OpConstant %float 1 -%int_1 = OpConstant %int 1 -%uint_1 = OpConstant %uint 1 -%uint_0 = OpConstant %uint 0 -%float_16 = OpConstant %float 16 + %float_1 = OpConstant %float 1 + %int_1 = OpConstant %int 1 + %uint_1 = OpConstant %uint 1 + %uint_0 = OpConstant %uint 0 + %float_16 = OpConstant %float 16 %_ptr_Function_v4float = OpTypePointer Function %v4float %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%f = OpVariable %_ptr_Function_float Function -%i = OpVariable %_ptr_Function_int Function -%u = OpVariable %_ptr_Function_uint Function -%b = OpVariable %_ptr_Function_bool Function -%f1 = OpVariable %_ptr_Function_float Function -%f2 = OpVariable %_ptr_Function_float Function -%f3 = OpVariable %_ptr_Function_float Function -%f4 = OpVariable %_ptr_Function_float Function -%i1 = OpVariable %_ptr_Function_int Function -%i2 = OpVariable %_ptr_Function_int Function -%i3 = OpVariable %_ptr_Function_int Function -%i4 = OpVariable %_ptr_Function_int Function -%u1 = OpVariable %_ptr_Function_uint Function -%u2 = OpVariable %_ptr_Function_uint Function -%u3 = OpVariable %_ptr_Function_uint Function -%u4 = OpVariable %_ptr_Function_uint Function -%b1 = OpVariable %_ptr_Function_bool Function -%b2 = OpVariable %_ptr_Function_bool Function -%b3 = OpVariable %_ptr_Function_bool Function -%b4 = OpVariable %_ptr_Function_bool Function -%114 = OpVariable %_ptr_Function_v4float Function -%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %28 -%33 = OpCompositeExtract %float %32 1 -OpStore %f %33 -%36 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%37 = OpLoad %v4float %36 -%38 = OpCompositeExtract %float %37 1 -%39 = OpConvertFToS %int %38 -OpStore %i %39 -%43 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%44 = OpLoad %v4float %43 -%45 = OpCompositeExtract %float %44 1 -%46 = OpConvertFToU %uint %45 -OpStore %u %46 -%49 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%50 = OpLoad %v4float %49 -%51 = OpCompositeExtract %float %50 1 -%52 = OpFUnordNotEqual %bool %51 %float_0 -OpStore %b %52 -OpStore %f1 %33 -%55 = OpConvertSToF %float %39 -OpStore %f2 %55 -%57 = OpConvertUToF %float %46 -OpStore %f3 %57 -%59 = OpSelect %float %52 %float_1 %float_0 -OpStore %f4 %59 -%62 = OpConvertFToS %int %33 -OpStore %i1 %62 -OpStore %i2 %39 -%65 = OpBitcast %int %46 -OpStore %i3 %65 -%67 = OpSelect %int %52 %int_1 %int_0 -OpStore %i4 %67 -%70 = OpConvertFToU %uint %33 -OpStore %u1 %70 -%72 = OpBitcast %uint %39 -OpStore %u2 %72 -OpStore %u3 %46 -%75 = OpSelect %uint %52 %uint_1 %uint_0 -OpStore %u4 %75 -%79 = OpFUnordNotEqual %bool %33 %float_0 -OpStore %b1 %79 -%81 = OpINotEqual %bool %39 %int_0 -OpStore %b2 %81 -%83 = OpINotEqual %bool %46 %uint_0 -OpStore %b3 %83 -OpStore %b4 %52 -%85 = OpFAdd %float %33 %55 -%86 = OpFAdd %float %85 %57 -%87 = OpFAdd %float %86 %59 -%88 = OpConvertSToF %float %62 -%89 = OpFAdd %float %87 %88 -%90 = OpConvertSToF %float %39 -%91 = OpFAdd %float %89 %90 -%92 = OpConvertSToF %float %65 -%93 = OpFAdd %float %91 %92 -%94 = OpConvertSToF %float %67 -%95 = OpFAdd %float %93 %94 -%96 = OpConvertUToF %float %70 -%97 = OpFAdd %float %95 %96 -%98 = OpConvertUToF %float %72 -%99 = OpFAdd %float %97 %98 -%100 = OpConvertUToF %float %46 -%101 = OpFAdd %float %99 %100 -%102 = OpConvertUToF %float %75 -%103 = OpFAdd %float %101 %102 -%104 = OpSelect %float %79 %float_1 %float_0 -%105 = OpFAdd %float %103 %104 -%106 = OpSelect %float %81 %float_1 %float_0 -%107 = OpFAdd %float %105 %106 -%108 = OpSelect %float %83 %float_1 %float_0 -%109 = OpFAdd %float %107 %108 -%110 = OpSelect %float %52 %float_1 %float_0 -%111 = OpFAdd %float %109 %110 -%113 = OpFOrdEqual %bool %111 %float_16 -OpSelectionMerge %118 None -OpBranchConditional %113 %116 %117 -%116 = OpLabel -%119 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%120 = OpLoad %v4float %119 -OpStore %114 %120 -OpBranch %118 -%117 = OpLabel -%121 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%122 = OpLoad %v4float %121 -OpStore %114 %122 -OpBranch %118 -%118 = OpLabel -%123 = OpLoad %v4float %114 -OpReturnValue %123 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %f = OpVariable %_ptr_Function_float Function + %i = OpVariable %_ptr_Function_int Function + %u = OpVariable %_ptr_Function_uint Function + %b = OpVariable %_ptr_Function_bool Function + %f1 = OpVariable %_ptr_Function_float Function + %f2 = OpVariable %_ptr_Function_float Function + %f3 = OpVariable %_ptr_Function_float Function + %f4 = OpVariable %_ptr_Function_float Function + %i1 = OpVariable %_ptr_Function_int Function + %i2 = OpVariable %_ptr_Function_int Function + %i3 = OpVariable %_ptr_Function_int Function + %i4 = OpVariable %_ptr_Function_int Function + %u1 = OpVariable %_ptr_Function_uint Function + %u2 = OpVariable %_ptr_Function_uint Function + %u3 = OpVariable %_ptr_Function_uint Function + %u4 = OpVariable %_ptr_Function_uint Function + %b1 = OpVariable %_ptr_Function_bool Function + %b2 = OpVariable %_ptr_Function_bool Function + %b3 = OpVariable %_ptr_Function_bool Function + %b4 = OpVariable %_ptr_Function_bool Function + %114 = OpVariable %_ptr_Function_v4float Function + %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %28 + %33 = OpCompositeExtract %float %32 1 + OpStore %f %33 + %36 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %37 = OpLoad %v4float %36 + %38 = OpCompositeExtract %float %37 1 + %39 = OpConvertFToS %int %38 + OpStore %i %39 + %43 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %44 = OpLoad %v4float %43 + %45 = OpCompositeExtract %float %44 1 + %46 = OpConvertFToU %uint %45 + OpStore %u %46 + %49 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %50 = OpLoad %v4float %49 + %51 = OpCompositeExtract %float %50 1 + %52 = OpFUnordNotEqual %bool %51 %float_0 + OpStore %b %52 + OpStore %f1 %33 + %55 = OpConvertSToF %float %39 + OpStore %f2 %55 + %57 = OpConvertUToF %float %46 + OpStore %f3 %57 + %59 = OpSelect %float %52 %float_1 %float_0 + OpStore %f4 %59 + %62 = OpConvertFToS %int %33 + OpStore %i1 %62 + OpStore %i2 %39 + %65 = OpBitcast %int %46 + OpStore %i3 %65 + %67 = OpSelect %int %52 %int_1 %int_0 + OpStore %i4 %67 + %70 = OpConvertFToU %uint %33 + OpStore %u1 %70 + %72 = OpBitcast %uint %39 + OpStore %u2 %72 + OpStore %u3 %46 + %75 = OpSelect %uint %52 %uint_1 %uint_0 + OpStore %u4 %75 + %79 = OpFUnordNotEqual %bool %33 %float_0 + OpStore %b1 %79 + %81 = OpINotEqual %bool %39 %int_0 + OpStore %b2 %81 + %83 = OpINotEqual %bool %46 %uint_0 + OpStore %b3 %83 + OpStore %b4 %52 + %85 = OpFAdd %float %33 %55 + %86 = OpFAdd %float %85 %57 + %87 = OpFAdd %float %86 %59 + %88 = OpConvertSToF %float %62 + %89 = OpFAdd %float %87 %88 + %90 = OpConvertSToF %float %39 + %91 = OpFAdd %float %89 %90 + %92 = OpConvertSToF %float %65 + %93 = OpFAdd %float %91 %92 + %94 = OpConvertSToF %float %67 + %95 = OpFAdd %float %93 %94 + %96 = OpConvertUToF %float %70 + %97 = OpFAdd %float %95 %96 + %98 = OpConvertUToF %float %72 + %99 = OpFAdd %float %97 %98 + %100 = OpConvertUToF %float %46 + %101 = OpFAdd %float %99 %100 + %102 = OpConvertUToF %float %75 + %103 = OpFAdd %float %101 %102 + %104 = OpSelect %float %79 %float_1 %float_0 + %105 = OpFAdd %float %103 %104 + %106 = OpSelect %float %81 %float_1 %float_0 + %107 = OpFAdd %float %105 %106 + %108 = OpSelect %float %83 %float_1 %float_0 + %109 = OpFAdd %float %107 %108 + %110 = OpSelect %float %52 %float_1 %float_0 + %111 = OpFAdd %float %109 %110 + %113 = OpFOrdEqual %bool %111 %float_16 + OpSelectionMerge %118 None + OpBranchConditional %113 %116 %117 + %116 = OpLabel + %119 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %120 = OpLoad %v4float %119 + OpStore %114 %120 + OpBranch %118 + %117 = OpLabel + %121 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %122 = OpLoad %v4float %121 + OpStore %114 %122 + OpBranch %118 + %118 = OpLabel + %123 = OpLoad %v4float %114 + OpReturnValue %123 + OpFunctionEnd diff --git a/tests/sksl/shared/ScalarConversionConstructorsES3.skrp b/tests/sksl/shared/ScalarConversionConstructorsES3.skrp index 0ed0927edfab..33f82e92cbeb 100644 --- a/tests/sksl/shared/ScalarConversionConstructorsES3.skrp +++ b/tests/sksl/shared/ScalarConversionConstructorsES3.skrp @@ -1,3 +1,5 @@ +94 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_uniform f = colorGreen(1) diff --git a/tests/sksl/shared/ScalarConversionConstructorsES3.wgsl b/tests/sksl/shared/ScalarConversionConstructorsES3.wgsl new file mode 100644 index 000000000000..c574847cd401 --- /dev/null +++ b/tests/sksl/shared/ScalarConversionConstructorsES3.wgsl @@ -0,0 +1,44 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var f: f32 = f32(_globalUniforms.colorGreen.y); + var i: i32 = i32(_globalUniforms.colorGreen.y); + var u: u32 = u32(_globalUniforms.colorGreen.y); + var b: bool = bool(_globalUniforms.colorGreen.y); + var f1: f32 = f; + var f2: f32 = f32(i); + var f3: f32 = f32(u); + var f4: f32 = f32(b); + var i1: i32 = i32(f); + var i2: i32 = i; + var i3: i32 = i32(u); + var i4: i32 = i32(b); + var u1: u32 = u32(f); + var u2: u32 = u32(i); + var u3: u32 = u; + var u4: u32 = u32(b); + var b1: bool = bool(f); + var b2: bool = bool(i); + var b3: bool = bool(u); + var b4: bool = b; + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((((((((((((((((f32(f1) + f32(f2)) + f32(f3)) + f32(f4)) + f32(i1)) + f32(i2)) + f32(i3)) + f32(i4)) + f32(u1)) + f32(u2)) + f32(u3)) + f32(u4)) + f32(b1)) + f32(b2)) + f32(b3)) + f32(b4)) == 16.0))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/ScopedSymbol.asm.frag b/tests/sksl/shared/ScopedSymbol.asm.frag index 6f7811e347a6..683bfcd87c6c 100644 --- a/tests/sksl/shared/ScopedSymbol.asm.frag +++ b/tests/sksl/shared/ScopedSymbol.asm.frag @@ -1,154 +1,154 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %glob "glob" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %block_variable_hides_global_variable_b "block_variable_hides_global_variable_b" -OpName %local_variable_hides_struct_b "local_variable_hides_struct_b" -OpName %S "S" -OpName %local_struct_variable_hides_struct_type_b "local_struct_variable_hides_struct_type_b" -OpName %S_0 "S" -OpMemberName %S_0 0 "i" -OpName %S_1 "S" -OpName %local_variable_hides_global_variable_b "local_variable_hides_global_variable_b" -OpName %glob_0 "glob" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %17 Binding 0 -OpDecorate %17 DescriptorSet 0 -OpMemberDecorate %S_0 0 Offset 0 -OpDecorate %79 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %82 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %glob "glob" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %block_variable_hides_global_variable_b "block_variable_hides_global_variable_b" + OpName %local_variable_hides_struct_b "local_variable_hides_struct_b" + OpName %S "S" + OpName %local_struct_variable_hides_struct_type_b "local_struct_variable_hides_struct_type_b" + OpName %S_0 "S" + OpMemberName %S_0 0 "i" + OpName %S_1 "S" + OpName %local_variable_hides_global_variable_b "local_variable_hides_global_variable_b" + OpName %glob_0 "glob" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %17 Binding 0 + OpDecorate %17 DescriptorSet 0 + OpMemberDecorate %S_0 0 Offset 0 + OpDecorate %79 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %82 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%int = OpTypeInt 32 1 + %int = OpTypeInt 32 1 %_ptr_Private_int = OpTypePointer Private %int -%glob = OpVariable %_ptr_Private_int Private + %glob = OpVariable %_ptr_Private_int Private %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%17 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%22 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%26 = OpConstantComposite %v2float %float_0 %float_0 + %17 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %22 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %26 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%30 = OpTypeFunction %bool -%int_2 = OpConstant %int 2 + %30 = OpTypeFunction %bool + %int_2 = OpConstant %int 2 %_ptr_Function_bool = OpTypePointer Function %bool -%true = OpConstantTrue %bool -%S_0 = OpTypeStruct %int + %true = OpConstantTrue %bool + %S_0 = OpTypeStruct %int %_ptr_Function_S_0 = OpTypePointer Function %S_0 -%int_1 = OpConstant %int 1 -%int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %int_0 = OpConstant %int 0 %_ptr_Function_int = OpTypePointer Function %int -%52 = OpTypeFunction %v4float %_ptr_Function_v2float -%false = OpConstantFalse %bool + %52 = OpTypeFunction %v4float %_ptr_Function_v2float + %false = OpConstantFalse %bool %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float %_entrypoint_v = OpFunction %void None %22 -%23 = OpLabel -%27 = OpVariable %_ptr_Function_v2float Function -OpStore %27 %26 -%29 = OpFunctionCall %v4float %main %27 -OpStore %sk_FragColor %29 -OpReturn -OpFunctionEnd + %23 = OpLabel + %27 = OpVariable %_ptr_Function_v2float Function + OpStore %27 %26 + %29 = OpFunctionCall %v4float %main %27 + OpStore %sk_FragColor %29 + OpReturn + OpFunctionEnd %block_variable_hides_global_variable_b = OpFunction %bool None %30 -%31 = OpLabel -%32 = OpLoad %int %glob -%34 = OpIEqual %bool %32 %int_2 -OpReturnValue %34 -OpFunctionEnd + %31 = OpLabel + %32 = OpLoad %int %glob + %34 = OpIEqual %bool %32 %int_2 + OpReturnValue %34 + OpFunctionEnd %local_variable_hides_struct_b = OpFunction %bool None %30 -%35 = OpLabel -%S = OpVariable %_ptr_Function_bool Function -OpStore %S %true -OpReturnValue %true -OpFunctionEnd + %35 = OpLabel + %S = OpVariable %_ptr_Function_bool Function + OpStore %S %true + OpReturnValue %true + OpFunctionEnd %local_struct_variable_hides_struct_type_b = OpFunction %bool None %30 -%39 = OpLabel -%S_1 = OpVariable %_ptr_Function_S_0 Function -%44 = OpCompositeConstruct %S_0 %int_1 -OpStore %S_1 %44 -%46 = OpAccessChain %_ptr_Function_int %S_1 %int_0 -%48 = OpLoad %int %46 -%49 = OpIEqual %bool %48 %int_1 -OpReturnValue %49 -OpFunctionEnd + %39 = OpLabel + %S_1 = OpVariable %_ptr_Function_S_0 Function + %44 = OpCompositeConstruct %S_0 %int_1 + OpStore %S_1 %44 + %46 = OpAccessChain %_ptr_Function_int %S_1 %int_0 + %48 = OpLoad %int %46 + %49 = OpIEqual %bool %48 %int_1 + OpReturnValue %49 + OpFunctionEnd %local_variable_hides_global_variable_b = OpFunction %bool None %30 -%50 = OpLabel -%glob_0 = OpVariable %_ptr_Function_int Function -OpStore %glob_0 %int_1 -OpReturnValue %true -OpFunctionEnd -%main = OpFunction %v4float None %52 -%53 = OpFunctionParameter %_ptr_Function_v2float -%54 = OpLabel -%72 = OpVariable %_ptr_Function_v4float Function -OpStore %glob %int_2 -OpSelectionMerge %57 None -OpBranchConditional %true %56 %57 -%56 = OpLabel -%58 = OpFunctionCall %bool %block_variable_hides_global_variable_b -OpBranch %57 -%57 = OpLabel -%59 = OpPhi %bool %false %54 %58 %56 -OpSelectionMerge %61 None -OpBranchConditional %59 %60 %61 -%60 = OpLabel -%62 = OpFunctionCall %bool %local_variable_hides_struct_b -OpBranch %61 -%61 = OpLabel -%63 = OpPhi %bool %false %57 %62 %60 -OpSelectionMerge %65 None -OpBranchConditional %63 %64 %65 -%64 = OpLabel -%66 = OpFunctionCall %bool %local_struct_variable_hides_struct_type_b -OpBranch %65 -%65 = OpLabel -%67 = OpPhi %bool %false %61 %66 %64 -OpSelectionMerge %69 None -OpBranchConditional %67 %68 %69 -%68 = OpLabel -%70 = OpFunctionCall %bool %local_variable_hides_global_variable_b -OpBranch %69 -%69 = OpLabel -%71 = OpPhi %bool %false %65 %70 %68 -OpSelectionMerge %76 None -OpBranchConditional %71 %74 %75 -%74 = OpLabel -%77 = OpAccessChain %_ptr_Uniform_v4float %17 %int_0 -%79 = OpLoad %v4float %77 -OpStore %72 %79 -OpBranch %76 -%75 = OpLabel -%80 = OpAccessChain %_ptr_Uniform_v4float %17 %int_1 -%81 = OpLoad %v4float %80 -OpStore %72 %81 -OpBranch %76 -%76 = OpLabel -%82 = OpLoad %v4float %72 -OpReturnValue %82 -OpFunctionEnd + %50 = OpLabel + %glob_0 = OpVariable %_ptr_Function_int Function + OpStore %glob_0 %int_1 + OpReturnValue %true + OpFunctionEnd + %main = OpFunction %v4float None %52 + %53 = OpFunctionParameter %_ptr_Function_v2float + %54 = OpLabel + %72 = OpVariable %_ptr_Function_v4float Function + OpStore %glob %int_2 + OpSelectionMerge %57 None + OpBranchConditional %true %56 %57 + %56 = OpLabel + %58 = OpFunctionCall %bool %block_variable_hides_global_variable_b + OpBranch %57 + %57 = OpLabel + %59 = OpPhi %bool %false %54 %58 %56 + OpSelectionMerge %61 None + OpBranchConditional %59 %60 %61 + %60 = OpLabel + %62 = OpFunctionCall %bool %local_variable_hides_struct_b + OpBranch %61 + %61 = OpLabel + %63 = OpPhi %bool %false %57 %62 %60 + OpSelectionMerge %65 None + OpBranchConditional %63 %64 %65 + %64 = OpLabel + %66 = OpFunctionCall %bool %local_struct_variable_hides_struct_type_b + OpBranch %65 + %65 = OpLabel + %67 = OpPhi %bool %false %61 %66 %64 + OpSelectionMerge %69 None + OpBranchConditional %67 %68 %69 + %68 = OpLabel + %70 = OpFunctionCall %bool %local_variable_hides_global_variable_b + OpBranch %69 + %69 = OpLabel + %71 = OpPhi %bool %false %65 %70 %68 + OpSelectionMerge %76 None + OpBranchConditional %71 %74 %75 + %74 = OpLabel + %77 = OpAccessChain %_ptr_Uniform_v4float %17 %int_0 + %79 = OpLoad %v4float %77 + OpStore %72 %79 + OpBranch %76 + %75 = OpLabel + %80 = OpAccessChain %_ptr_Uniform_v4float %17 %int_1 + %81 = OpLoad %v4float %80 + OpStore %72 %81 + OpBranch %76 + %76 = OpLabel + %82 = OpLoad %v4float %72 + OpReturnValue %82 + OpFunctionEnd diff --git a/tests/sksl/shared/ScopedSymbol.skrp b/tests/sksl/shared/ScopedSymbol.skrp index d6686b6fd5ad..159e782a2865 100644 --- a/tests/sksl/shared/ScopedSymbol.skrp +++ b/tests/sksl/shared/ScopedSymbol.skrp @@ -1,8 +1,8 @@ +39 instructions + [immutable slots] -_0_var = 0xFFFFFFFF -S = 0xFFFFFFFF -S.i = 0x00000001 (1.401298e-45) -glob₁ = 0x00000001 (1.401298e-45) +i0 = 0xFFFFFFFF +i1 = 0x00000001 (1.401298e-45) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -24,7 +24,7 @@ label label 0x00000005 copy_constant $16 = 0 merge_condition_mask CondMask = $18 & $19 branch_if_no_lanes_active branch_if_no_lanes_active +4 (label 3 at #24) -copy_slot_unmasked $17 = S +copy_constant $17 = 0xFFFFFFFF label label 0x00000007 copy_slot_masked $16 = Mask($17) label label 0x00000003 @@ -32,7 +32,7 @@ load_condition_mask CondMask = $18 copy_constant $13 = 0 merge_condition_mask CondMask = $15 & $16 branch_if_no_lanes_active branch_if_no_lanes_active +5 (label 2 at #33) -copy_slot_unmasked $14 = S.i +copy_immutable_unmasked $14 = i1 [0x00000001 (1.401298e-45)] cmpeq_imm_int $14 = equal($14, 0x00000001) label label 0x00000008 copy_slot_masked $13 = Mask($14) @@ -41,7 +41,7 @@ load_condition_mask CondMask = $15 copy_constant $0 = 0 merge_condition_mask CondMask = $12 & $13 branch_if_no_lanes_active branch_if_no_lanes_active +5 (label 1 at #42) -copy_slot_unmasked $1 = glob₁ +copy_constant $1 = 0x00000001 (1.401298e-45) cmpeq_imm_int $1 = equal($1, 0x00000001) label label 0x00000009 copy_slot_masked $0 = Mask($1) diff --git a/tests/sksl/shared/ScopedSymbol.wgsl b/tests/sksl/shared/ScopedSymbol.wgsl new file mode 100644 index 000000000000..0519f6ef5e21 --- /dev/null +++ b/tests/sksl/shared/ScopedSymbol.wgsl @@ -0,0 +1,87 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +var glob: i32; +fn block_variable_hides_global_variable_b() -> bool { + { + return glob == 2; + } +} +struct S { + i: i32, +}; +fn local_variable_hides_struct_b() -> bool { + { + var S: bool = true; + return S; + } +} +fn local_struct_variable_hides_struct_type_b() -> bool { + { + var S: S = S(1); + return S.i == 1; + } +} +fn local_variable_hides_global_variable_b() -> bool { + { + var glob: i32 = 1; + return glob == 1; + } +} +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + glob = 2; + const _0_var: bool = true; + var _skTemp0: vec4; + var _skTemp1: bool; + var _skTemp2: bool; + var _skTemp3: bool; + var _skTemp4: bool; + if _0_var { + let _skTemp5 = block_variable_hides_global_variable_b(); + _skTemp4 = _skTemp5; + } else { + _skTemp4 = false; + } + if _skTemp4 { + let _skTemp6 = local_variable_hides_struct_b(); + _skTemp3 = _skTemp6; + } else { + _skTemp3 = false; + } + if _skTemp3 { + let _skTemp7 = local_struct_variable_hides_struct_type_b(); + _skTemp2 = _skTemp7; + } else { + _skTemp2 = false; + } + if _skTemp2 { + let _skTemp8 = local_variable_hides_global_variable_b(); + _skTemp1 = _skTemp8; + } else { + _skTemp1 = false; + } + if _skTemp1 { + _skTemp0 = _globalUniforms.colorGreen; + } else { + _skTemp0 = _globalUniforms.colorRed; + } + return _skTemp0; + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/StackingVectorCasts.asm.frag b/tests/sksl/shared/StackingVectorCasts.asm.frag index d4ffc392f11c..727a91ac40fe 100644 --- a/tests/sksl/shared/StackingVectorCasts.asm.frag +++ b/tests/sksl/shared/StackingVectorCasts.asm.frag @@ -1,59 +1,59 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %30 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %30 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%26 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%30 = OpLoad %v4float %26 -OpReturnValue %30 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %26 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %30 = OpLoad %v4float %26 + OpReturnValue %30 + OpFunctionEnd diff --git a/tests/sksl/shared/StackingVectorCasts.skrp b/tests/sksl/shared/StackingVectorCasts.skrp index eb638383c6a7..441fd464130a 100644 --- a/tests/sksl/shared/StackingVectorCasts.skrp +++ b/tests/sksl/shared/StackingVectorCasts.skrp @@ -1,3 +1,5 @@ +4 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_4_uniforms $0..3 = colorGreen diff --git a/tests/sksl/shared/StackingVectorCasts.wgsl b/tests/sksl/shared/StackingVectorCasts.wgsl new file mode 100644 index 000000000000..d86a7bb82825 --- /dev/null +++ b/tests/sksl/shared/StackingVectorCasts.wgsl @@ -0,0 +1,24 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + return _globalUniforms.colorGreen; + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/StaticSwitch.asm.frag b/tests/sksl/shared/StaticSwitch.asm.frag index d4ffc392f11c..727a91ac40fe 100644 --- a/tests/sksl/shared/StaticSwitch.asm.frag +++ b/tests/sksl/shared/StaticSwitch.asm.frag @@ -1,59 +1,59 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %30 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %30 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%26 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%30 = OpLoad %v4float %26 -OpReturnValue %30 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %26 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %30 = OpLoad %v4float %26 + OpReturnValue %30 + OpFunctionEnd diff --git a/tests/sksl/shared/StaticSwitch.skrp b/tests/sksl/shared/StaticSwitch.skrp index 6c29e2f74ce2..139878b57b28 100644 --- a/tests/sksl/shared/StaticSwitch.skrp +++ b/tests/sksl/shared/StaticSwitch.skrp @@ -1,3 +1,5 @@ +4 instructions + store_src_rg xy = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_4_uniforms $0..3 = colorGreen diff --git a/tests/sksl/shared/StaticSwitch.wgsl b/tests/sksl/shared/StaticSwitch.wgsl new file mode 100644 index 000000000000..7938237bd317 --- /dev/null +++ b/tests/sksl/shared/StaticSwitch.wgsl @@ -0,0 +1,26 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let xy = _skParam0; + { + { + return _globalUniforms.colorGreen; + } + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/StaticSwitchWithBreak.asm.frag b/tests/sksl/shared/StaticSwitchWithBreak.asm.frag index 8fcaf5e98c0d..78f100c749e1 100644 --- a/tests/sksl/shared/StaticSwitchWithBreak.asm.frag +++ b/tests/sksl/shared/StaticSwitchWithBreak.asm.frag @@ -1,33 +1,33 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %main "main" -OpName %x "x" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %main "main" + OpName %x "x" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%11 = OpTypeFunction %void + %void = OpTypeVoid + %11 = OpTypeFunction %void %_ptr_Function_float = OpTypePointer Function %float -%float_0 = OpConstant %float 0 -%16 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 -%main = OpFunction %void None %11 -%12 = OpLabel -%x = OpVariable %_ptr_Function_float Function -OpStore %x %float_0 -OpStore %x %float_0 -OpStore %sk_FragColor %16 -OpReturn -OpFunctionEnd + %float_0 = OpConstant %float 0 + %16 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %main = OpFunction %void None %11 + %12 = OpLabel + %x = OpVariable %_ptr_Function_float Function + OpStore %x %float_0 + OpStore %x %float_0 + OpStore %sk_FragColor %16 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/StaticSwitchWithBreak.wgsl b/tests/sksl/shared/StaticSwitchWithBreak.wgsl new file mode 100644 index 000000000000..246a0eb4aa57 --- /dev/null +++ b/tests/sksl/shared/StaticSwitchWithBreak.wgsl @@ -0,0 +1,21 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +fn main(_stageOut: ptr) { + { + var x: f32 = 0.0; + { + x = 0.0; + } + (*_stageOut).sk_FragColor = vec4(f32(x)); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(&_stageOut); + return _stageOut; +} diff --git a/tests/sksl/shared/StaticSwitchWithBreakInsideBlock.asm.frag b/tests/sksl/shared/StaticSwitchWithBreakInsideBlock.asm.frag index 8fcaf5e98c0d..78f100c749e1 100644 --- a/tests/sksl/shared/StaticSwitchWithBreakInsideBlock.asm.frag +++ b/tests/sksl/shared/StaticSwitchWithBreakInsideBlock.asm.frag @@ -1,33 +1,33 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %main "main" -OpName %x "x" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %main "main" + OpName %x "x" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%11 = OpTypeFunction %void + %void = OpTypeVoid + %11 = OpTypeFunction %void %_ptr_Function_float = OpTypePointer Function %float -%float_0 = OpConstant %float 0 -%16 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 -%main = OpFunction %void None %11 -%12 = OpLabel -%x = OpVariable %_ptr_Function_float Function -OpStore %x %float_0 -OpStore %x %float_0 -OpStore %sk_FragColor %16 -OpReturn -OpFunctionEnd + %float_0 = OpConstant %float 0 + %16 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %main = OpFunction %void None %11 + %12 = OpLabel + %x = OpVariable %_ptr_Function_float Function + OpStore %x %float_0 + OpStore %x %float_0 + OpStore %sk_FragColor %16 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/StaticSwitchWithBreakInsideBlock.wgsl b/tests/sksl/shared/StaticSwitchWithBreakInsideBlock.wgsl new file mode 100644 index 000000000000..cacc3fc5faa9 --- /dev/null +++ b/tests/sksl/shared/StaticSwitchWithBreakInsideBlock.wgsl @@ -0,0 +1,23 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +fn main(_stageOut: ptr) { + { + var x: f32 = 0.0; + { + { + x = 0.0; + (*_stageOut).sk_FragColor = vec4(f32(x)); + } + } + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(&_stageOut); + return _stageOut; +} diff --git a/tests/sksl/shared/StaticSwitchWithConditionalBreak.asm.frag b/tests/sksl/shared/StaticSwitchWithConditionalBreak.asm.frag index dc4ffa29bb7e..7988e857da1e 100644 --- a/tests/sksl/shared/StaticSwitchWithConditionalBreak.asm.frag +++ b/tests/sksl/shared/StaticSwitchWithConditionalBreak.asm.frag @@ -1,67 +1,67 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "unknownInput" -OpName %main "main" -OpName %value "value" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %value RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "unknownInput" + OpName %main "main" + OpName %value "value" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %value RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%14 = OpTypeFunction %void + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %14 = OpTypeFunction %void %_ptr_Function_float = OpTypePointer Function %float -%float_0 = OpConstant %float 0 -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 + %float_0 = OpConstant %float 0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 %_ptr_Uniform_float = OpTypePointer Uniform %float -%float_2 = OpConstant %float 2 -%float_1 = OpConstant %float 1 -%main = OpFunction %void None %14 -%15 = OpLabel -%value = OpVariable %_ptr_Function_float Function -OpStore %value %float_0 -OpSelectionMerge %21 None -OpSwitch %int_0 %21 0 %22 1 %23 -%22 = OpLabel -OpStore %value %float_0 -%24 = OpAccessChain %_ptr_Uniform_float %10 %int_0 -%26 = OpLoad %float %24 -%28 = OpFOrdEqual %bool %26 %float_2 -OpSelectionMerge %30 None -OpBranchConditional %28 %29 %30 -%29 = OpLabel -OpBranch %21 -%30 = OpLabel -OpBranch %23 -%23 = OpLabel -OpStore %value %float_1 -OpBranch %21 -%21 = OpLabel -%32 = OpLoad %float %value -%33 = OpCompositeConstruct %v4float %32 %32 %32 %32 -OpStore %sk_FragColor %33 -OpReturn -OpFunctionEnd + %float_2 = OpConstant %float 2 + %float_1 = OpConstant %float 1 + %main = OpFunction %void None %14 + %15 = OpLabel + %value = OpVariable %_ptr_Function_float Function + OpStore %value %float_0 + OpSelectionMerge %21 None + OpSwitch %int_0 %21 0 %22 1 %23 + %22 = OpLabel + OpStore %value %float_0 + %24 = OpAccessChain %_ptr_Uniform_float %10 %int_0 + %26 = OpLoad %float %24 + %28 = OpFOrdEqual %bool %26 %float_2 + OpSelectionMerge %30 None + OpBranchConditional %28 %29 %30 + %29 = OpLabel + OpBranch %21 + %30 = OpLabel + OpBranch %23 + %23 = OpLabel + OpStore %value %float_1 + OpBranch %21 + %21 = OpLabel + %32 = OpLoad %float %value + %33 = OpCompositeConstruct %v4float %32 %32 %32 %32 + OpStore %sk_FragColor %33 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/StaticSwitchWithConditionalBreak.wgsl b/tests/sksl/shared/StaticSwitchWithConditionalBreak.wgsl new file mode 100644 index 000000000000..b7324e7f4e0e --- /dev/null +++ b/tests/sksl/shared/StaticSwitchWithConditionalBreak.wgsl @@ -0,0 +1,36 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + unknownInput: f32, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_stageOut: ptr) { + { + var value: f32 = 0.0; + switch 0 { + case 0, 1 { + var _skTemp0: bool = false; + if 0 == 0 { + value = 0.0; + if _globalUniforms.unknownInput == 2.0 { + break; + } + // fallthrough + } + value = 1.0; + } + case default {} + } + (*_stageOut).sk_FragColor = vec4(value); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(&_stageOut); + return _stageOut; +} diff --git a/tests/sksl/shared/StaticSwitchWithConditionalBreakInsideBlock.asm.frag b/tests/sksl/shared/StaticSwitchWithConditionalBreakInsideBlock.asm.frag index 96327a30ad93..6863386bb004 100644 --- a/tests/sksl/shared/StaticSwitchWithConditionalBreakInsideBlock.asm.frag +++ b/tests/sksl/shared/StaticSwitchWithConditionalBreakInsideBlock.asm.frag @@ -1,64 +1,64 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "unknownInput" -OpName %main "main" -OpName %value "value" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %value RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "unknownInput" + OpName %main "main" + OpName %value "value" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %value RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%14 = OpTypeFunction %void + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %14 = OpTypeFunction %void %_ptr_Function_float = OpTypePointer Function %float -%float_0 = OpConstant %float 0 -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 + %float_0 = OpConstant %float 0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 %_ptr_Uniform_float = OpTypePointer Uniform %float -%float_2 = OpConstant %float 2 -%31 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 -%float_1 = OpConstant %float 1 -%main = OpFunction %void None %14 -%15 = OpLabel -%value = OpVariable %_ptr_Function_float Function -OpStore %value %float_0 -OpSelectionMerge %21 None -OpSwitch %int_0 %21 0 %22 1 %23 -%22 = OpLabel -OpStore %value %float_0 -%24 = OpAccessChain %_ptr_Uniform_float %10 %int_0 -%26 = OpLoad %float %24 -%28 = OpFOrdEqual %bool %26 %float_2 -OpSelectionMerge %30 None -OpBranchConditional %28 %29 %30 -%29 = OpLabel -OpStore %sk_FragColor %31 -OpBranch %21 -%30 = OpLabel -OpBranch %23 -%23 = OpLabel -OpStore %value %float_1 -OpBranch %21 -%21 = OpLabel -OpReturn -OpFunctionEnd + %float_2 = OpConstant %float 2 + %31 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %float_1 = OpConstant %float 1 + %main = OpFunction %void None %14 + %15 = OpLabel + %value = OpVariable %_ptr_Function_float Function + OpStore %value %float_0 + OpSelectionMerge %21 None + OpSwitch %int_0 %21 0 %22 1 %23 + %22 = OpLabel + OpStore %value %float_0 + %24 = OpAccessChain %_ptr_Uniform_float %10 %int_0 + %26 = OpLoad %float %24 + %28 = OpFOrdEqual %bool %26 %float_2 + OpSelectionMerge %30 None + OpBranchConditional %28 %29 %30 + %29 = OpLabel + OpStore %sk_FragColor %31 + OpBranch %21 + %30 = OpLabel + OpBranch %23 + %23 = OpLabel + OpStore %value %float_1 + OpBranch %21 + %21 = OpLabel + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/StaticSwitchWithConditionalBreakInsideBlock.wgsl b/tests/sksl/shared/StaticSwitchWithConditionalBreakInsideBlock.wgsl new file mode 100644 index 000000000000..74abf8422caa --- /dev/null +++ b/tests/sksl/shared/StaticSwitchWithConditionalBreakInsideBlock.wgsl @@ -0,0 +1,38 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + unknownInput: f32, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_stageOut: ptr) { + { + var value: f32 = 0.0; + switch 0 { + case 0, 1 { + var _skTemp0: bool = false; + if 0 == 0 { + value = 0.0; + if _globalUniforms.unknownInput == 2.0 { + { + (*_stageOut).sk_FragColor = vec4(value); + break; + } + } + // fallthrough + } + value = 1.0; + } + case default {} + } + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(&_stageOut); + return _stageOut; +} diff --git a/tests/sksl/shared/StaticSwitchWithFallthroughA.asm.frag b/tests/sksl/shared/StaticSwitchWithFallthroughA.asm.frag index 7e01227a4369..b29777a134b8 100644 --- a/tests/sksl/shared/StaticSwitchWithFallthroughA.asm.frag +++ b/tests/sksl/shared/StaticSwitchWithFallthroughA.asm.frag @@ -1,35 +1,35 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %main "main" -OpName %x "x" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %main "main" + OpName %x "x" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%11 = OpTypeFunction %void + %void = OpTypeVoid + %11 = OpTypeFunction %void %_ptr_Function_float = OpTypePointer Function %float -%float_0 = OpConstant %float 0 -%float_1 = OpConstant %float 1 -%17 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 -%main = OpFunction %void None %11 -%12 = OpLabel -%x = OpVariable %_ptr_Function_float Function -OpStore %x %float_0 -OpStore %x %float_0 -OpStore %x %float_1 -OpStore %sk_FragColor %17 -OpReturn -OpFunctionEnd + %float_0 = OpConstant %float 0 + %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %main = OpFunction %void None %11 + %12 = OpLabel + %x = OpVariable %_ptr_Function_float Function + OpStore %x %float_0 + OpStore %x %float_0 + OpStore %x %float_1 + OpStore %sk_FragColor %17 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/StaticSwitchWithFallthroughA.wgsl b/tests/sksl/shared/StaticSwitchWithFallthroughA.wgsl new file mode 100644 index 000000000000..1d871bfb3f48 --- /dev/null +++ b/tests/sksl/shared/StaticSwitchWithFallthroughA.wgsl @@ -0,0 +1,22 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +fn main(_stageOut: ptr) { + { + var x: f32 = 0.0; + { + x = 0.0; + x = 1.0; + } + (*_stageOut).sk_FragColor = vec4(f32(x)); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(&_stageOut); + return _stageOut; +} diff --git a/tests/sksl/shared/StaticSwitchWithFallthroughB.asm.frag b/tests/sksl/shared/StaticSwitchWithFallthroughB.asm.frag index 59018e539d6a..e00950ae7255 100644 --- a/tests/sksl/shared/StaticSwitchWithFallthroughB.asm.frag +++ b/tests/sksl/shared/StaticSwitchWithFallthroughB.asm.frag @@ -1,34 +1,34 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %main "main" -OpName %x "x" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %main "main" + OpName %x "x" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%11 = OpTypeFunction %void + %void = OpTypeVoid + %11 = OpTypeFunction %void %_ptr_Function_float = OpTypePointer Function %float -%float_0 = OpConstant %float 0 -%float_1 = OpConstant %float 1 -%17 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 -%main = OpFunction %void None %11 -%12 = OpLabel -%x = OpVariable %_ptr_Function_float Function -OpStore %x %float_0 -OpStore %x %float_1 -OpStore %sk_FragColor %17 -OpReturn -OpFunctionEnd + %float_0 = OpConstant %float 0 + %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %main = OpFunction %void None %11 + %12 = OpLabel + %x = OpVariable %_ptr_Function_float Function + OpStore %x %float_0 + OpStore %x %float_1 + OpStore %sk_FragColor %17 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/StaticSwitchWithFallthroughB.wgsl b/tests/sksl/shared/StaticSwitchWithFallthroughB.wgsl new file mode 100644 index 000000000000..37e21ca181ad --- /dev/null +++ b/tests/sksl/shared/StaticSwitchWithFallthroughB.wgsl @@ -0,0 +1,21 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +fn main(_stageOut: ptr) { + { + var x: f32 = 0.0; + { + x = 1.0; + } + (*_stageOut).sk_FragColor = vec4(f32(x)); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(&_stageOut); + return _stageOut; +} diff --git a/tests/sksl/shared/StaticSwitchWithStaticConditionalBreak.asm.frag b/tests/sksl/shared/StaticSwitchWithStaticConditionalBreak.asm.frag index e609edc86819..ea0631ea3ebb 100644 --- a/tests/sksl/shared/StaticSwitchWithStaticConditionalBreak.asm.frag +++ b/tests/sksl/shared/StaticSwitchWithStaticConditionalBreak.asm.frag @@ -1,52 +1,52 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %main "main" -OpName %x "x" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %26 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %main "main" + OpName %x "x" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %26 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%11 = OpTypeFunction %void + %void = OpTypeVoid + %11 = OpTypeFunction %void %_ptr_Function_float = OpTypePointer Function %float -%float_0 = OpConstant %float 0 -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%float_1 = OpConstant %float 1 -%main = OpFunction %void None %11 -%12 = OpLabel -%x = OpVariable %_ptr_Function_float Function -OpStore %x %float_0 -OpSelectionMerge %18 None -OpSwitch %int_0 %18 0 %19 1 %20 -%19 = OpLabel -OpStore %x %float_0 -%22 = OpFOrdLessThan %bool %float_0 %float_1 -OpSelectionMerge %24 None -OpBranchConditional %22 %23 %24 -%23 = OpLabel -OpBranch %18 -%24 = OpLabel -OpBranch %20 -%20 = OpLabel -OpStore %x %float_1 -OpBranch %18 -%18 = OpLabel -%25 = OpLoad %float %x -%26 = OpCompositeConstruct %v4float %25 %25 %25 %25 -OpStore %sk_FragColor %26 -OpReturn -OpFunctionEnd + %float_0 = OpConstant %float 0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %float_1 = OpConstant %float 1 + %main = OpFunction %void None %11 + %12 = OpLabel + %x = OpVariable %_ptr_Function_float Function + OpStore %x %float_0 + OpSelectionMerge %18 None + OpSwitch %int_0 %18 0 %19 1 %20 + %19 = OpLabel + OpStore %x %float_0 + %22 = OpFOrdLessThan %bool %float_0 %float_1 + OpSelectionMerge %24 None + OpBranchConditional %22 %23 %24 + %23 = OpLabel + OpBranch %18 + %24 = OpLabel + OpBranch %20 + %20 = OpLabel + OpStore %x %float_1 + OpBranch %18 + %18 = OpLabel + %25 = OpLoad %float %x + %26 = OpCompositeConstruct %v4float %25 %25 %25 %25 + OpStore %sk_FragColor %26 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/StaticSwitchWithStaticConditionalBreak.wgsl b/tests/sksl/shared/StaticSwitchWithStaticConditionalBreak.wgsl new file mode 100644 index 000000000000..a9a84aa80f87 --- /dev/null +++ b/tests/sksl/shared/StaticSwitchWithStaticConditionalBreak.wgsl @@ -0,0 +1,32 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +fn main(_stageOut: ptr) { + { + var x: f32 = 0.0; + switch 0 { + case 0, 1 { + var _skTemp0: bool = false; + if 0 == 0 { + x = 0.0; + if x < 1.0 { + break; + } + // fallthrough + } + x = 1.0; + } + case default {} + } + (*_stageOut).sk_FragColor = vec4(f32(x)); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(&_stageOut); + return _stageOut; +} diff --git a/tests/sksl/shared/StaticSwitchWithStaticConditionalBreakInsideBlock.asm.frag b/tests/sksl/shared/StaticSwitchWithStaticConditionalBreakInsideBlock.asm.frag index 3d916fccaa61..18c64f65e8b2 100644 --- a/tests/sksl/shared/StaticSwitchWithStaticConditionalBreakInsideBlock.asm.frag +++ b/tests/sksl/shared/StaticSwitchWithStaticConditionalBreakInsideBlock.asm.frag @@ -1,50 +1,50 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %main "main" -OpName %x "x" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %main "main" + OpName %x "x" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%11 = OpTypeFunction %void + %void = OpTypeVoid + %11 = OpTypeFunction %void %_ptr_Function_float = OpTypePointer Function %float -%float_0 = OpConstant %float 0 -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%float_1 = OpConstant %float 1 -%25 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 -%main = OpFunction %void None %11 -%12 = OpLabel -%x = OpVariable %_ptr_Function_float Function -OpStore %x %float_0 -OpSelectionMerge %18 None -OpSwitch %int_0 %18 0 %19 1 %20 -%19 = OpLabel -OpStore %x %float_0 -%22 = OpFOrdLessThan %bool %float_0 %float_1 -OpSelectionMerge %24 None -OpBranchConditional %22 %23 %24 -%23 = OpLabel -OpStore %sk_FragColor %25 -OpBranch %18 -%24 = OpLabel -OpBranch %20 -%20 = OpLabel -OpStore %x %float_1 -OpBranch %18 -%18 = OpLabel -OpReturn -OpFunctionEnd + %float_0 = OpConstant %float 0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %float_1 = OpConstant %float 1 + %25 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %main = OpFunction %void None %11 + %12 = OpLabel + %x = OpVariable %_ptr_Function_float Function + OpStore %x %float_0 + OpSelectionMerge %18 None + OpSwitch %int_0 %18 0 %19 1 %20 + %19 = OpLabel + OpStore %x %float_0 + %22 = OpFOrdLessThan %bool %float_0 %float_1 + OpSelectionMerge %24 None + OpBranchConditional %22 %23 %24 + %23 = OpLabel + OpStore %sk_FragColor %25 + OpBranch %18 + %24 = OpLabel + OpBranch %20 + %20 = OpLabel + OpStore %x %float_1 + OpBranch %18 + %18 = OpLabel + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/StaticSwitchWithStaticConditionalBreakInsideBlock.wgsl b/tests/sksl/shared/StaticSwitchWithStaticConditionalBreakInsideBlock.wgsl new file mode 100644 index 000000000000..748453b06b7f --- /dev/null +++ b/tests/sksl/shared/StaticSwitchWithStaticConditionalBreakInsideBlock.wgsl @@ -0,0 +1,34 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +fn main(_stageOut: ptr) { + { + var x: f32 = 0.0; + switch 0 { + case 0, 1 { + var _skTemp0: bool = false; + if 0 == 0 { + x = 0.0; + if x < 1.0 { + { + (*_stageOut).sk_FragColor = vec4(f32(x)); + break; + } + } + // fallthrough + } + x = 1.0; + } + case default {} + } + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(&_stageOut); + return _stageOut; +} diff --git a/tests/sksl/shared/StorageBuffer.asm.frag b/tests/sksl/shared/StorageBuffer.asm.frag index 4cf611cda0bb..409a77d52340 100644 --- a/tests/sksl/shared/StorageBuffer.asm.frag +++ b/tests/sksl/shared/StorageBuffer.asm.frag @@ -1,97 +1,100 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %SomeData "SomeData" -OpMemberName %SomeData 0 "a" -OpMemberName %SomeData 1 "b" -OpName %storageBuffer "storageBuffer" -OpMemberName %storageBuffer 0 "offset" -OpMemberName %storageBuffer 1 "inputData" -OpName %outputBuffer "outputBuffer" -OpMemberName %outputBuffer 0 "outputData" -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpMemberDecorate %SomeData 0 Offset 0 -OpMemberDecorate %SomeData 1 Offset 16 -OpDecorate %_runtimearr_SomeData ArrayStride 32 -OpMemberDecorate %storageBuffer 0 Offset 0 -OpMemberDecorate %storageBuffer 1 Offset 16 -OpMemberDecorate %storageBuffer 1 RelaxedPrecision -OpDecorate %storageBuffer BufferBlock -OpDecorate %3 Binding 0 -OpDecorate %3 DescriptorSet 0 -OpMemberDecorate %outputBuffer 0 Offset 0 -OpMemberDecorate %outputBuffer 0 RelaxedPrecision -OpDecorate %outputBuffer BufferBlock -OpDecorate %12 Binding 1 -OpDecorate %12 DescriptorSet 0 -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %40 RelaxedPrecision -%uint = OpTypeInt 32 0 -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 -%v2float = OpTypeVector %float 2 -%SomeData = OpTypeStruct %v4float %v2float + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor %bufferIndex + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %SomeData "SomeData" + OpMemberName %SomeData 0 "a" + OpMemberName %SomeData 1 "b" + OpName %storageBuffer "storageBuffer" + OpMemberName %storageBuffer 0 "offset" + OpMemberName %storageBuffer 1 "inputData" + OpName %outputBuffer "outputBuffer" + OpMemberName %outputBuffer 0 "outputData" + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %bufferIndex "bufferIndex" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpMemberDecorate %SomeData 0 Offset 0 + OpMemberDecorate %SomeData 1 Offset 16 + OpDecorate %_runtimearr_SomeData ArrayStride 32 + OpMemberDecorate %storageBuffer 0 Offset 0 + OpMemberDecorate %storageBuffer 1 Offset 16 + OpMemberDecorate %storageBuffer 1 RelaxedPrecision + OpDecorate %storageBuffer BufferBlock + OpDecorate %3 Binding 0 + OpDecorate %3 DescriptorSet 0 + OpMemberDecorate %outputBuffer 0 Offset 0 + OpMemberDecorate %outputBuffer 0 RelaxedPrecision + OpDecorate %outputBuffer BufferBlock + OpDecorate %12 Binding 1 + OpDecorate %12 DescriptorSet 0 + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %bufferIndex Location 2 + OpDecorate %bufferIndex Flat + OpDecorate %42 RelaxedPrecision + %uint = OpTypeInt 32 0 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 + %v2float = OpTypeVector %float 2 + %SomeData = OpTypeStruct %v4float %v2float %_runtimearr_SomeData = OpTypeRuntimeArray %SomeData %storageBuffer = OpTypeStruct %uint %_runtimearr_SomeData %_ptr_Uniform_storageBuffer = OpTypePointer Uniform %storageBuffer -%3 = OpVariable %_ptr_Uniform_storageBuffer Uniform + %3 = OpVariable %_ptr_Uniform_storageBuffer Uniform %outputBuffer = OpTypeStruct %_runtimearr_SomeData %_ptr_Uniform_outputBuffer = OpTypePointer Uniform %outputBuffer -%12 = OpVariable %_ptr_Uniform_outputBuffer Uniform -%bool = OpTypeBool + %12 = OpVariable %_ptr_Uniform_outputBuffer Uniform + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%22 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%25 = OpConstantComposite %v2float %float_0 %float_0 + %int = OpTypeInt 32 1 +%_ptr_Input_int = OpTypePointer Input %int +%bufferIndex = OpVariable %_ptr_Input_int Input + %void = OpTypeVoid + %25 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %28 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%29 = OpTypeFunction %v4float %_ptr_Function_v2float -%int = OpTypeInt 32 1 -%int_1 = OpConstant %int 1 -%int_0 = OpConstant %int 0 + %32 = OpTypeFunction %v4float %_ptr_Function_v2float + %int_1 = OpConstant %int 1 + %int_0 = OpConstant %int 0 %_ptr_Uniform_uint = OpTypePointer Uniform %uint %_ptr_Uniform_SomeData = OpTypePointer Uniform %SomeData %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float %_ptr_Uniform_v2float = OpTypePointer Uniform %v2float -%_entrypoint_v = OpFunction %void None %22 -%23 = OpLabel -%26 = OpVariable %_ptr_Function_v2float Function -OpStore %26 %25 -%28 = OpFunctionCall %v4float %main %26 -OpStore %sk_FragColor %28 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %29 -%30 = OpFunctionParameter %_ptr_Function_v2float -%31 = OpLabel -%35 = OpAccessChain %_ptr_Uniform_uint %3 %int_0 -%37 = OpLoad %uint %35 -%38 = OpAccessChain %_ptr_Uniform_SomeData %3 %int_1 %37 -%40 = OpLoad %SomeData %38 -%41 = OpAccessChain %_ptr_Uniform_uint %3 %int_0 -%42 = OpLoad %uint %41 -%43 = OpAccessChain %_ptr_Uniform_SomeData %12 %int_0 %42 -OpStore %43 %40 -%44 = OpAccessChain %_ptr_Uniform_uint %3 %int_0 -%45 = OpLoad %uint %44 -%46 = OpAccessChain %_ptr_Uniform_v4float %3 %int_1 %45 %int_0 -%48 = OpLoad %v4float %46 -%49 = OpAccessChain %_ptr_Uniform_uint %3 %int_0 -%50 = OpLoad %uint %49 -%51 = OpAccessChain %_ptr_Uniform_v2float %3 %int_1 %50 %int_1 -%53 = OpLoad %v2float %51 -%54 = OpCompositeExtract %float %53 0 -%55 = OpVectorTimesScalar %v4float %48 %54 -OpReturnValue %55 -OpFunctionEnd +%_entrypoint_v = OpFunction %void None %25 + %26 = OpLabel + %29 = OpVariable %_ptr_Function_v2float Function + OpStore %29 %28 + %31 = OpFunctionCall %v4float %main %29 + OpStore %sk_FragColor %31 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %32 + %33 = OpFunctionParameter %_ptr_Function_v2float + %34 = OpLabel + %37 = OpAccessChain %_ptr_Uniform_uint %3 %int_0 + %39 = OpLoad %uint %37 + %40 = OpAccessChain %_ptr_Uniform_SomeData %3 %int_1 %39 + %42 = OpLoad %SomeData %40 + %43 = OpAccessChain %_ptr_Uniform_uint %3 %int_0 + %44 = OpLoad %uint %43 + %45 = OpAccessChain %_ptr_Uniform_SomeData %12 %int_0 %44 + OpStore %45 %42 + %46 = OpLoad %int %bufferIndex + %47 = OpAccessChain %_ptr_Uniform_v4float %3 %int_1 %46 %int_0 + %49 = OpLoad %v4float %47 + %50 = OpLoad %int %bufferIndex + %51 = OpAccessChain %_ptr_Uniform_v2float %3 %int_1 %50 %int_1 + %53 = OpLoad %v2float %51 + %54 = OpCompositeExtract %float %53 0 + %55 = OpVectorTimesScalar %v4float %49 %54 + OpReturnValue %55 + OpFunctionEnd diff --git a/tests/sksl/shared/StorageBuffer.glsl b/tests/sksl/shared/StorageBuffer.glsl index a5ce7da3f7db..06d094b218d6 100644 --- a/tests/sksl/shared/StorageBuffer.glsl +++ b/tests/sksl/shared/StorageBuffer.glsl @@ -11,7 +11,8 @@ layout (binding = 0, set = 0) readonly buffer storageBuffer { layout (binding = 1, set = 0) buffer outputBuffer { SomeData[] outputData; }; +layout (location = 2) flat in int bufferIndex; vec4 main() { outputData[offset] = inputData[offset]; - return inputData[offset].a * inputData[offset].b.x; + return inputData[bufferIndex].a * inputData[bufferIndex].b.x; } diff --git a/tests/sksl/shared/StorageBuffer.hlsl b/tests/sksl/shared/StorageBuffer.hlsl index 307ce89291ac..a8f7dca1cbcd 100644 --- a/tests/sksl/shared/StorageBuffer.hlsl +++ b/tests/sksl/shared/StorageBuffer.hlsl @@ -8,31 +8,38 @@ RWByteAddressBuffer _3 : register(u0, space0); RWByteAddressBuffer _12 : register(u1, space0); static float4 sk_FragColor; +static int bufferIndex; + +struct SPIRV_Cross_Input +{ + nointerpolation int bufferIndex : TEXCOORD2; +}; struct SPIRV_Cross_Output { float4 sk_FragColor : SV_Target0; }; -float4 main(float2 _30) +float4 main(float2 _33) { - SomeData _40 = { 0.0f.xxxx, 0.0f.xx }; - _40.a = asfloat(_3.Load4(_3.Load(0) * 32 + 16)); - _40.b = asfloat(_3.Load2(_3.Load(0) * 32 + 32)); - _12.Store4(_3.Load(0) * 32 + 0, asuint(_40.a)); - _12.Store2(_3.Load(0) * 32 + 16, asuint(_40.b)); - return asfloat(_3.Load4(_3.Load(0) * 32 + 16)) * asfloat(_3.Load2(_3.Load(0) * 32 + 32)).x; + SomeData _42 = { 0.0f.xxxx, 0.0f.xx }; + _42.a = asfloat(_3.Load4(_3.Load(0) * 32 + 16)); + _42.b = asfloat(_3.Load2(_3.Load(0) * 32 + 32)); + _12.Store4(_3.Load(0) * 32 + 0, asuint(_42.a)); + _12.Store2(_3.Load(0) * 32 + 16, asuint(_42.b)); + return asfloat(_3.Load4(bufferIndex * 32 + 16)) * asfloat(_3.Load2(bufferIndex * 32 + 32)).x; } void frag_main() { - float2 _26 = 0.0f.xx; - float4 _28 = main(_26); - sk_FragColor = _28; + float2 _29 = 0.0f.xx; + float4 _31 = main(_29); + sk_FragColor = _31; } -SPIRV_Cross_Output main() +SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input) { + bufferIndex = stage_input.bufferIndex; frag_main(); SPIRV_Cross_Output stage_output; stage_output.sk_FragColor = sk_FragColor; diff --git a/tests/sksl/shared/StorageBuffer.metal b/tests/sksl/shared/StorageBuffer.metal index babd67237d66..45e6daa25966 100644 --- a/tests/sksl/shared/StorageBuffer.metal +++ b/tests/sksl/shared/StorageBuffer.metal @@ -6,6 +6,7 @@ struct SomeData { float2 b; }; struct Inputs { + int bufferIndex [[user(locn2)]]; }; struct Outputs { half4 sk_FragColor [[color(0)]]; @@ -27,6 +28,6 @@ fragment Outputs fragmentMain(Inputs _in [[stage_in]], const device storageBuffe Outputs _out; (void)_out; _globals._anonInterface1->outputData[_globals._anonInterface0->offset] = _globals._anonInterface0->inputData[_globals._anonInterface0->offset]; - _out.sk_FragColor = half4(_globals._anonInterface0->inputData[_globals._anonInterface0->offset].a * _globals._anonInterface0->inputData[_globals._anonInterface0->offset].b.x); + _out.sk_FragColor = half4(_globals._anonInterface0->inputData[_in.bufferIndex].a * _globals._anonInterface0->inputData[_in.bufferIndex].b.x); return _out; } diff --git a/tests/sksl/shared/StorageBuffer.skrp b/tests/sksl/shared/StorageBuffer.skrp index 3658fa8639aa..8687b99104ff 100644 --- a/tests/sksl/shared/StorageBuffer.skrp +++ b/tests/sksl/shared/StorageBuffer.skrp @@ -12,28 +12,31 @@ error: 14: unsized arrays are not permitted here error: 12: interface blocks are not allowed in this kind of program layout(set=0, binding=1) buffer outputBuffer ^^^^^^^^^^^^ -error: 18: unknown identifier 'outputData' +error: 17: 'in' is not permitted here +layout(location=2) in flat int bufferIndex; +^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: 17: 'flat' is not permitted here +layout(location=2) in flat int bufferIndex; +^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: 17: layout qualifier 'location' is not permitted here +layout(location=2) in flat int bufferIndex; +^^^^^^^^^^^^^^^^^^^^^^^^^^ +error: 20: unknown identifier 'outputData' outputData[offset] = inputData[offset]; ^^^^^^^^^^ -error: 18: unknown identifier 'offset' +error: 20: unknown identifier 'offset' outputData[offset] = inputData[offset]; ^^^^^^ -error: 18: unknown identifier 'inputData' +error: 20: unknown identifier 'inputData' outputData[offset] = inputData[offset]; ^^^^^^^^^ -error: 18: unknown identifier 'offset' +error: 20: unknown identifier 'offset' outputData[offset] = inputData[offset]; ^^^^^^ -error: 19: unknown identifier 'inputData' - return half4(inputData[offset].a * inputData[offset].b.x); +error: 21: unknown identifier 'inputData' + return half4(inputData[bufferIndex].a * inputData[bufferIndex].b.x); ^^^^^^^^^ -error: 19: unknown identifier 'offset' - return half4(inputData[offset].a * inputData[offset].b.x); - ^^^^^^ -error: 19: unknown identifier 'inputData' - return half4(inputData[offset].a * inputData[offset].b.x); - ^^^^^^^^^ -error: 19: unknown identifier 'offset' - return half4(inputData[offset].a * inputData[offset].b.x); - ^^^^^^ -12 errors +error: 21: unknown identifier 'inputData' + return half4(inputData[bufferIndex].a * inputData[bufferIndex].b.x); + ^^^^^^^^^ +13 errors diff --git a/tests/sksl/shared/StorageBuffer.wgsl b/tests/sksl/shared/StorageBuffer.wgsl new file mode 100644 index 000000000000..819381807f96 --- /dev/null +++ b/tests/sksl/shared/StorageBuffer.wgsl @@ -0,0 +1,36 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @location(2) @interpolate(flat) bufferIndex: i32, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct storageBuffer { + offset: u32, + inputData: array, +}; +@group(0) @binding(0) var _storage0 : storageBuffer; +struct outputBuffer { + outputData: array, +}; +@group(0) @binding(1) var _storage1 : outputBuffer; +struct SomeData { + a: vec4, + b: vec2, +}; +fn main(_stageIn: FSIn, _skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + let _skTemp2 = _storage0.offset; + let _skTemp3 = _storage0.offset; + _storage1.outputData[_skTemp2] = _storage0.inputData[_skTemp3]; + return vec4(_storage0.inputData[_stageIn.bufferIndex].a * _storage0.inputData[_stageIn.bufferIndex].b.x); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn, _stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/StorageBufferVertex.asm.vert b/tests/sksl/shared/StorageBufferVertex.asm.vert index 5da93f1be44d..238c0513bfff 100644 --- a/tests/sksl/shared/StorageBufferVertex.asm.vert +++ b/tests/sksl/shared/StorageBufferVertex.asm.vert @@ -1,51 +1,51 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Vertex %main "main" %3 %sk_VertexID -OpName %sk_PerVertex "sk_PerVertex" -OpMemberName %sk_PerVertex 0 "sk_Position" -OpMemberName %sk_PerVertex 1 "sk_PointSize" -OpName %storageBuffer "storageBuffer" -OpMemberName %storageBuffer 0 "vertices" -OpName %sk_VertexID "sk_VertexID" -OpName %main "main" -OpMemberDecorate %sk_PerVertex 0 BuiltIn Position -OpMemberDecorate %sk_PerVertex 1 BuiltIn PointSize -OpDecorate %sk_PerVertex Block -OpDecorate %_runtimearr_v2float ArrayStride 16 -OpMemberDecorate %storageBuffer 0 Offset 0 -OpDecorate %storageBuffer BufferBlock -OpDecorate %8 Binding 0 -OpDecorate %8 DescriptorSet 0 -OpDecorate %sk_VertexID BuiltIn VertexIndex -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %main "main" %3 %sk_VertexID + OpName %sk_PerVertex "sk_PerVertex" + OpMemberName %sk_PerVertex 0 "sk_Position" + OpMemberName %sk_PerVertex 1 "sk_PointSize" + OpName %storageBuffer "storageBuffer" + OpMemberName %storageBuffer 0 "vertices" + OpName %sk_VertexID "sk_VertexID" + OpName %main "main" + OpMemberDecorate %sk_PerVertex 0 BuiltIn Position + OpMemberDecorate %sk_PerVertex 1 BuiltIn PointSize + OpDecorate %sk_PerVertex Block + OpDecorate %_runtimearr_v2float ArrayStride 16 + OpMemberDecorate %storageBuffer 0 Offset 0 + OpDecorate %storageBuffer BufferBlock + OpDecorate %8 Binding 0 + OpDecorate %8 DescriptorSet 0 + OpDecorate %sk_VertexID BuiltIn VertexIndex + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %sk_PerVertex = OpTypeStruct %v4float %float %_ptr_Output_sk_PerVertex = OpTypePointer Output %sk_PerVertex -%3 = OpVariable %_ptr_Output_sk_PerVertex Output -%v2float = OpTypeVector %float 2 + %3 = OpVariable %_ptr_Output_sk_PerVertex Output + %v2float = OpTypeVector %float 2 %_runtimearr_v2float = OpTypeRuntimeArray %v2float %storageBuffer = OpTypeStruct %_runtimearr_v2float %_ptr_Uniform_storageBuffer = OpTypePointer Uniform %storageBuffer -%8 = OpVariable %_ptr_Uniform_storageBuffer Uniform -%int = OpTypeInt 32 1 + %8 = OpVariable %_ptr_Uniform_storageBuffer Uniform + %int = OpTypeInt 32 1 %_ptr_Input_int = OpTypePointer Input %int %sk_VertexID = OpVariable %_ptr_Input_int Input -%void = OpTypeVoid -%17 = OpTypeFunction %void -%int_0 = OpConstant %int 0 + %void = OpTypeVoid + %17 = OpTypeFunction %void + %int_0 = OpConstant %int 0 %_ptr_Uniform_v2float = OpTypePointer Uniform %v2float -%float_1 = OpConstant %float 1 + %float_1 = OpConstant %float 1 %_ptr_Output_v4float = OpTypePointer Output %v4float -%main = OpFunction %void None %17 -%18 = OpLabel -%20 = OpLoad %int %sk_VertexID -%21 = OpAccessChain %_ptr_Uniform_v2float %8 %int_0 %20 -%23 = OpLoad %v2float %21 -%24 = OpCompositeExtract %float %23 0 -%25 = OpCompositeExtract %float %23 1 -%27 = OpCompositeConstruct %v4float %24 %25 %float_1 %float_1 -%28 = OpAccessChain %_ptr_Output_v4float %3 %int_0 -OpStore %28 %27 -OpReturn -OpFunctionEnd + %main = OpFunction %void None %17 + %18 = OpLabel + %20 = OpLoad %int %sk_VertexID + %21 = OpAccessChain %_ptr_Uniform_v2float %8 %int_0 %20 + %23 = OpLoad %v2float %21 + %24 = OpCompositeExtract %float %23 0 + %25 = OpCompositeExtract %float %23 1 + %27 = OpCompositeConstruct %v4float %24 %25 %float_1 %float_1 + %28 = OpAccessChain %_ptr_Output_v4float %3 %int_0 + OpStore %28 %27 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/StorageBufferVertex.wgsl b/tests/sksl/shared/StorageBufferVertex.wgsl new file mode 100644 index 000000000000..f5c6645b036f --- /dev/null +++ b/tests/sksl/shared/StorageBufferVertex.wgsl @@ -0,0 +1,22 @@ +diagnostic(off, derivative_uniformity); +struct VSIn { + @builtin(vertex_index) sk_VertexID: u32, +}; +struct VSOut { + @builtin(position) sk_Position: vec4, +}; +/* unsupported */ var sk_PointSize: f32; +struct storageBuffer { + vertices: array>, +}; +@group(0) @binding(0) var _storage0 : storageBuffer; +fn main(_stageIn: VSIn, _stageOut: ptr) { + { + (*_stageOut).sk_Position = vec4(_storage0.vertices[i32(_stageIn.sk_VertexID)], 1.0, 1.0); + } +} +@vertex fn vertexMain(_stageIn: VSIn) -> VSOut { + var _stageOut: VSOut; + main(_stageIn, &_stageOut); + return _stageOut; +} diff --git a/tests/sksl/shared/StructArrayFollowedByScalar.asm.frag b/tests/sksl/shared/StructArrayFollowedByScalar.asm.frag index bec8a516fec7..bb7676889ce7 100644 --- a/tests/sksl/shared/StructArrayFollowedByScalar.asm.frag +++ b/tests/sksl/shared/StructArrayFollowedByScalar.asm.frag @@ -1,82 +1,82 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %S "S" -OpMemberName %S 0 "rgb" -OpMemberName %S 1 "a" -OpName %s "s" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %_arr_float_int_3 ArrayStride 16 -OpMemberDecorate %S 0 Offset 0 -OpMemberDecorate %S 0 RelaxedPrecision -OpMemberDecorate %S 1 Offset 48 -OpMemberDecorate %S 1 RelaxedPrecision -OpDecorate %39 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %45 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %S "S" + OpMemberName %S 0 "rgb" + OpMemberName %S 1 "a" + OpName %s "s" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %_arr_float_int_3 ArrayStride 16 + OpMemberDecorate %S 0 Offset 0 + OpMemberDecorate %S 0 RelaxedPrecision + OpMemberDecorate %S 1 Offset 48 + OpMemberDecorate %S 1 RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %45 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%12 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%16 = OpConstantComposite %v2float %float_0 %float_0 + %void = OpTypeVoid + %12 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %16 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%20 = OpTypeFunction %v4float %_ptr_Function_v2float -%int = OpTypeInt 32 1 -%int_3 = OpConstant %int 3 + %20 = OpTypeFunction %v4float %_ptr_Function_v2float + %int = OpTypeInt 32 1 + %int_3 = OpConstant %int 3 %_arr_float_int_3 = OpTypeArray %float %int_3 -%S = OpTypeStruct %_arr_float_int_3 %float + %S = OpTypeStruct %_arr_float_int_3 %float %_ptr_Function_S = OpTypePointer Function %S -%int_0 = OpConstant %int 0 + %int_0 = OpConstant %int 0 %_ptr_Function_float = OpTypePointer Function %float -%float_1 = OpConstant %float 1 -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 + %float_1 = OpConstant %float 1 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %12 -%13 = OpLabel -%17 = OpVariable %_ptr_Function_v2float Function -OpStore %17 %16 -%19 = OpFunctionCall %v4float %main %17 -OpStore %sk_FragColor %19 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %20 -%21 = OpFunctionParameter %_ptr_Function_v2float -%22 = OpLabel -%s = OpVariable %_ptr_Function_S Function -%30 = OpAccessChain %_ptr_Function_float %s %int_0 %int_0 -OpStore %30 %float_0 -%34 = OpAccessChain %_ptr_Function_float %s %int_0 %int_1 -OpStore %34 %float_1 -%36 = OpAccessChain %_ptr_Function_float %s %int_0 %int_2 -OpStore %36 %float_0 -%37 = OpAccessChain %_ptr_Function_float %s %int_1 -OpStore %37 %float_1 -%38 = OpAccessChain %_ptr_Function_float %s %int_0 %int_0 -%39 = OpLoad %float %38 -%40 = OpAccessChain %_ptr_Function_float %s %int_0 %int_1 -%41 = OpLoad %float %40 -%42 = OpAccessChain %_ptr_Function_float %s %int_0 %int_2 -%43 = OpLoad %float %42 -%44 = OpAccessChain %_ptr_Function_float %s %int_1 -%45 = OpLoad %float %44 -%46 = OpCompositeConstruct %v4float %39 %41 %43 %45 -OpReturnValue %46 -OpFunctionEnd + %13 = OpLabel + %17 = OpVariable %_ptr_Function_v2float Function + OpStore %17 %16 + %19 = OpFunctionCall %v4float %main %17 + OpStore %sk_FragColor %19 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %20 + %21 = OpFunctionParameter %_ptr_Function_v2float + %22 = OpLabel + %s = OpVariable %_ptr_Function_S Function + %30 = OpAccessChain %_ptr_Function_float %s %int_0 %int_0 + OpStore %30 %float_0 + %34 = OpAccessChain %_ptr_Function_float %s %int_0 %int_1 + OpStore %34 %float_1 + %36 = OpAccessChain %_ptr_Function_float %s %int_0 %int_2 + OpStore %36 %float_0 + %37 = OpAccessChain %_ptr_Function_float %s %int_1 + OpStore %37 %float_1 + %38 = OpAccessChain %_ptr_Function_float %s %int_0 %int_0 + %39 = OpLoad %float %38 + %40 = OpAccessChain %_ptr_Function_float %s %int_0 %int_1 + %41 = OpLoad %float %40 + %42 = OpAccessChain %_ptr_Function_float %s %int_0 %int_2 + %43 = OpLoad %float %42 + %44 = OpAccessChain %_ptr_Function_float %s %int_1 + %45 = OpLoad %float %44 + %46 = OpCompositeConstruct %v4float %39 %41 %43 %45 + OpReturnValue %46 + OpFunctionEnd diff --git a/tests/sksl/shared/StructArrayFollowedByScalar.skrp b/tests/sksl/shared/StructArrayFollowedByScalar.skrp index 51dced3f2e06..cad15b6bbb82 100644 --- a/tests/sksl/shared/StructArrayFollowedByScalar.skrp +++ b/tests/sksl/shared/StructArrayFollowedByScalar.skrp @@ -1,3 +1,5 @@ +9 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true splat_4_constants s.rgb[0], s.rgb[1], s.rgb[2], s.a = 0 diff --git a/tests/sksl/shared/StructArrayFollowedByScalar.wgsl b/tests/sksl/shared/StructArrayFollowedByScalar.wgsl index 040330196eb2..3c5698d6364b 100644 --- a/tests/sksl/shared/StructArrayFollowedByScalar.wgsl +++ b/tests/sksl/shared/StructArrayFollowedByScalar.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, diff --git a/tests/sksl/shared/StructComparison.asm.frag b/tests/sksl/shared/StructComparison.asm.frag index ea5349bd6601..7abcbc3e7409 100644 --- a/tests/sksl/shared/StructComparison.asm.frag +++ b/tests/sksl/shared/StructComparison.asm.frag @@ -1,175 +1,175 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpMemberName %_UniformBuffer 2 "testArray" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %array "array" -OpName %S "S" -OpMemberName %S 0 "x" -OpMemberName %S 1 "y" -OpMemberName %S 2 "m" -OpMemberName %S 3 "a" -OpName %s1 "s1" -OpName %s2 "s2" -OpName %s3 "s3" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %_arr_float_int_5 ArrayStride 16 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpMemberDecorate %S 0 Offset 0 -OpMemberDecorate %S 1 Offset 4 -OpMemberDecorate %S 2 Offset 16 -OpMemberDecorate %S 2 ColMajor -OpMemberDecorate %S 2 MatrixStride 16 -OpMemberDecorate %S 2 RelaxedPrecision -OpMemberDecorate %S 3 Offset 48 -OpDecorate %61 RelaxedPrecision -OpDecorate %63 RelaxedPrecision -OpDecorate %85 RelaxedPrecision -OpDecorate %87 RelaxedPrecision -OpDecorate %105 RelaxedPrecision -OpDecorate %107 RelaxedPrecision -OpDecorate %108 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpMemberName %_UniformBuffer 2 "testArray" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %array "array" + OpName %S "S" + OpMemberName %S 0 "x" + OpMemberName %S 1 "y" + OpMemberName %S 2 "m" + OpMemberName %S 3 "a" + OpName %s1 "s1" + OpName %s2 "s2" + OpName %s3 "s3" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %_arr_float_int_5 ArrayStride 16 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpMemberDecorate %S 0 Offset 0 + OpMemberDecorate %S 1 Offset 4 + OpMemberDecorate %S 2 Offset 16 + OpMemberDecorate %S 2 ColMajor + OpMemberDecorate %S 2 MatrixStride 16 + OpMemberDecorate %S 2 RelaxedPrecision + OpMemberDecorate %S 3 Offset 48 + OpDecorate %61 RelaxedPrecision + OpDecorate %63 RelaxedPrecision + OpDecorate %85 RelaxedPrecision + OpDecorate %87 RelaxedPrecision + OpDecorate %105 RelaxedPrecision + OpDecorate %107 RelaxedPrecision + OpDecorate %108 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%int = OpTypeInt 32 1 -%int_5 = OpConstant %int 5 + %int = OpTypeInt 32 1 + %int_5 = OpConstant %int 5 %_arr_float_int_5 = OpTypeArray %float %int_5 %_UniformBuffer = OpTypeStruct %v4float %v4float %_arr_float_int_5 %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%18 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%22 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %18 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %22 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%26 = OpTypeFunction %v4float %_ptr_Function_v2float + %26 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function__arr_float_int_5 = OpTypePointer Function %_arr_float_int_5 -%float_1 = OpConstant %float 1 -%float_2 = OpConstant %float 2 -%float_3 = OpConstant %float 3 -%float_4 = OpConstant %float 4 -%float_5 = OpConstant %float 5 + %float_1 = OpConstant %float 1 + %float_2 = OpConstant %float 2 + %float_3 = OpConstant %float 3 + %float_4 = OpConstant %float 4 + %float_5 = OpConstant %float 5 %mat2v2float = OpTypeMatrix %v2float 2 -%S = OpTypeStruct %int %int %mat2v2float %_arr_float_int_5 + %S = OpTypeStruct %int %int %mat2v2float %_arr_float_int_5 %_ptr_Function_S = OpTypePointer Function %S -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 -%43 = OpConstantComposite %v2float %float_1 %float_0 -%44 = OpConstantComposite %v2float %float_0 %float_1 -%45 = OpConstantComposite %mat2v2float %43 %44 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 + %43 = OpConstantComposite %v2float %float_1 %float_0 + %44 = OpConstantComposite %v2float %float_0 %float_1 + %45 = OpConstantComposite %mat2v2float %43 %44 %_ptr_Uniform__arr_float_int_5 = OpTypePointer Uniform %_arr_float_int_5 -%53 = OpConstantComposite %v2float %float_2 %float_0 -%54 = OpConstantComposite %v2float %float_0 %float_2 -%55 = OpConstantComposite %mat2v2float %53 %54 -%false = OpConstantFalse %bool -%true = OpConstantTrue %bool -%v2bool = OpTypeVector %bool 2 + %53 = OpConstantComposite %v2float %float_2 %float_0 + %54 = OpConstantComposite %v2float %float_0 %float_2 + %55 = OpConstantComposite %mat2v2float %53 %54 + %false = OpConstantFalse %bool + %true = OpConstantTrue %bool + %v2bool = OpTypeVector %bool 2 %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_0 = OpConstant %int 0 + %int_0 = OpConstant %int 0 %_entrypoint_v = OpFunction %void None %18 -%19 = OpLabel -%23 = OpVariable %_ptr_Function_v2float Function -OpStore %23 %22 -%25 = OpFunctionCall %v4float %main %23 -OpStore %sk_FragColor %25 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %26 -%27 = OpFunctionParameter %_ptr_Function_v2float -%28 = OpLabel -%array = OpVariable %_ptr_Function__arr_float_int_5 Function -%s1 = OpVariable %_ptr_Function_S Function -%s2 = OpVariable %_ptr_Function_S Function -%s3 = OpVariable %_ptr_Function_S Function -%97 = OpVariable %_ptr_Function_v4float Function -%36 = OpCompositeConstruct %_arr_float_int_5 %float_1 %float_2 %float_3 %float_4 %float_5 -OpStore %array %36 -%46 = OpCompositeConstruct %S %int_1 %int_2 %45 %36 -OpStore %s1 %46 -%48 = OpAccessChain %_ptr_Uniform__arr_float_int_5 %10 %int_2 -%50 = OpLoad %_arr_float_int_5 %48 -%51 = OpCompositeConstruct %S %int_1 %int_2 %45 %50 -OpStore %s2 %51 -%56 = OpCompositeConstruct %S %int_1 %int_2 %55 %36 -OpStore %s3 %56 -%59 = OpLogicalAnd %bool %true %true -%61 = OpFOrdEqual %v2bool %43 %43 -%62 = OpAll %bool %61 -%63 = OpFOrdEqual %v2bool %44 %44 -%64 = OpAll %bool %63 -%65 = OpLogicalAnd %bool %62 %64 -%66 = OpLogicalAnd %bool %65 %59 -%67 = OpCompositeExtract %float %50 0 -%68 = OpFOrdEqual %bool %float_1 %67 -%69 = OpCompositeExtract %float %50 1 -%70 = OpFOrdEqual %bool %float_2 %69 -%71 = OpLogicalAnd %bool %70 %68 -%72 = OpCompositeExtract %float %50 2 -%73 = OpFOrdEqual %bool %float_3 %72 -%74 = OpLogicalAnd %bool %73 %71 -%75 = OpCompositeExtract %float %50 3 -%76 = OpFOrdEqual %bool %float_4 %75 -%77 = OpLogicalAnd %bool %76 %74 -%78 = OpCompositeExtract %float %50 4 -%79 = OpFOrdEqual %bool %float_5 %78 -%80 = OpLogicalAnd %bool %79 %77 -%81 = OpLogicalAnd %bool %80 %66 -OpSelectionMerge %83 None -OpBranchConditional %81 %82 %83 -%82 = OpLabel -%84 = OpLogicalOr %bool %false %false -%85 = OpFUnordNotEqual %v2bool %43 %53 -%86 = OpAny %bool %85 -%87 = OpFUnordNotEqual %v2bool %44 %54 -%88 = OpAny %bool %87 -%89 = OpLogicalOr %bool %86 %88 -%90 = OpLogicalOr %bool %89 %84 -%91 = OpLogicalOr %bool %false %false -%92 = OpLogicalOr %bool %false %91 -%93 = OpLogicalOr %bool %false %92 -%94 = OpLogicalOr %bool %false %93 -%95 = OpLogicalOr %bool %94 %90 -OpBranch %83 -%83 = OpLabel -%96 = OpPhi %bool %false %28 %95 %82 -OpSelectionMerge %101 None -OpBranchConditional %96 %99 %100 -%99 = OpLabel -%102 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%105 = OpLoad %v4float %102 -OpStore %97 %105 -OpBranch %101 -%100 = OpLabel -%106 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%107 = OpLoad %v4float %106 -OpStore %97 %107 -OpBranch %101 -%101 = OpLabel -%108 = OpLoad %v4float %97 -OpReturnValue %108 -OpFunctionEnd + %19 = OpLabel + %23 = OpVariable %_ptr_Function_v2float Function + OpStore %23 %22 + %25 = OpFunctionCall %v4float %main %23 + OpStore %sk_FragColor %25 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %26 + %27 = OpFunctionParameter %_ptr_Function_v2float + %28 = OpLabel + %array = OpVariable %_ptr_Function__arr_float_int_5 Function + %s1 = OpVariable %_ptr_Function_S Function + %s2 = OpVariable %_ptr_Function_S Function + %s3 = OpVariable %_ptr_Function_S Function + %97 = OpVariable %_ptr_Function_v4float Function + %36 = OpCompositeConstruct %_arr_float_int_5 %float_1 %float_2 %float_3 %float_4 %float_5 + OpStore %array %36 + %46 = OpCompositeConstruct %S %int_1 %int_2 %45 %36 + OpStore %s1 %46 + %48 = OpAccessChain %_ptr_Uniform__arr_float_int_5 %10 %int_2 + %50 = OpLoad %_arr_float_int_5 %48 + %51 = OpCompositeConstruct %S %int_1 %int_2 %45 %50 + OpStore %s2 %51 + %56 = OpCompositeConstruct %S %int_1 %int_2 %55 %36 + OpStore %s3 %56 + %59 = OpLogicalAnd %bool %true %true + %61 = OpFOrdEqual %v2bool %43 %43 + %62 = OpAll %bool %61 + %63 = OpFOrdEqual %v2bool %44 %44 + %64 = OpAll %bool %63 + %65 = OpLogicalAnd %bool %62 %64 + %66 = OpLogicalAnd %bool %65 %59 + %67 = OpCompositeExtract %float %50 0 + %68 = OpFOrdEqual %bool %float_1 %67 + %69 = OpCompositeExtract %float %50 1 + %70 = OpFOrdEqual %bool %float_2 %69 + %71 = OpLogicalAnd %bool %70 %68 + %72 = OpCompositeExtract %float %50 2 + %73 = OpFOrdEqual %bool %float_3 %72 + %74 = OpLogicalAnd %bool %73 %71 + %75 = OpCompositeExtract %float %50 3 + %76 = OpFOrdEqual %bool %float_4 %75 + %77 = OpLogicalAnd %bool %76 %74 + %78 = OpCompositeExtract %float %50 4 + %79 = OpFOrdEqual %bool %float_5 %78 + %80 = OpLogicalAnd %bool %79 %77 + %81 = OpLogicalAnd %bool %80 %66 + OpSelectionMerge %83 None + OpBranchConditional %81 %82 %83 + %82 = OpLabel + %84 = OpLogicalOr %bool %false %false + %85 = OpFUnordNotEqual %v2bool %43 %53 + %86 = OpAny %bool %85 + %87 = OpFUnordNotEqual %v2bool %44 %54 + %88 = OpAny %bool %87 + %89 = OpLogicalOr %bool %86 %88 + %90 = OpLogicalOr %bool %89 %84 + %91 = OpLogicalOr %bool %false %false + %92 = OpLogicalOr %bool %false %91 + %93 = OpLogicalOr %bool %false %92 + %94 = OpLogicalOr %bool %false %93 + %95 = OpLogicalOr %bool %94 %90 + OpBranch %83 + %83 = OpLabel + %96 = OpPhi %bool %false %28 %95 %82 + OpSelectionMerge %101 None + OpBranchConditional %96 %99 %100 + %99 = OpLabel + %102 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %105 = OpLoad %v4float %102 + OpStore %97 %105 + OpBranch %101 + %100 = OpLabel + %106 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %107 = OpLoad %v4float %106 + OpStore %97 %107 + OpBranch %101 + %101 = OpLabel + %108 = OpLoad %v4float %97 + OpReturnValue %108 + OpFunctionEnd diff --git a/tests/sksl/shared/StructComparison.skrp b/tests/sksl/shared/StructComparison.skrp index 85a3752d3498..45d1463cb818 100644 --- a/tests/sksl/shared/StructComparison.skrp +++ b/tests/sksl/shared/StructComparison.skrp @@ -1,20 +1,22 @@ +68 instructions + [immutable slots] -array[0] = 0x3F800000 (1.0) -array[1] = 0x40000000 (2.0) -array[2] = 0x40400000 (3.0) -array[3] = 0x40800000 (4.0) -array[4] = 0x40A00000 (5.0) -s3.x = 0x00000001 (1.401298e-45) -s3.y = 0x00000002 (2.802597e-45) -s3.m(0) = 0x40000000 (2.0) -s3.m(1) = 0 -s3.m(2) = 0 -s3.m(3) = 0x40000000 (2.0) -s3.a[0] = 0x3F800000 (1.0) -s3.a[1] = 0x40000000 (2.0) -s3.a[2] = 0x40400000 (3.0) -s3.a[3] = 0x40800000 (4.0) -s3.a[4] = 0x40A00000 (5.0) +i0 = 0x3F800000 (1.0) +i1 = 0x40000000 (2.0) +i2 = 0x40400000 (3.0) +i3 = 0x40800000 (4.0) +i4 = 0x40A00000 (5.0) +i5 = 0x00000001 (1.401298e-45) +i6 = 0x00000002 (2.802597e-45) +i7 = 0x40000000 (2.0) +i8 = 0 +i9 = 0 +i10 = 0x40000000 (2.0) +i11 = 0x3F800000 (1.0) +i12 = 0x40000000 (2.0) +i13 = 0x40400000 (3.0) +i14 = 0x40800000 (4.0) +i15 = 0x40A00000 (5.0) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -23,8 +25,8 @@ copy_constant $1 = 0x00000002 (2.802597e-45) copy_constant $2 = 0 copy_constant $3 = 0x3F800000 (1.0) swizzle_4 $2..5 = ($2..5).yxxy -copy_4_slots_unmasked s1.a[0], s1.a[1], s1.a[2], s1.a[3] = array[0], array[1], array[2], array[3] -copy_slot_unmasked s1.a[4] = array[4] +copy_4_immutables_unmasked s1.a[0], s1.a[1], s1.a[2], s1.a[3] = i0..3 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] +copy_immutable_unmasked s1.a[4] = i4 [0x40A00000 (5.0)] copy_4_slots_unmasked s1.x, s1.y, s1.m(0..1) = $0..3 copy_2_slots_unmasked s1.m(2..3) = $4..5 copy_constant $0 = 0x00000001 (1.401298e-45) @@ -58,20 +60,20 @@ bitwise_and_int $3 &= $4 bitwise_and_2_ints $0..1 &= $2..3 bitwise_and_int $0 &= $1 copy_slot_unmasked $1 = s1.x -copy_slot_unmasked $2 = s3.x +copy_immutable_unmasked $2 = i5 [0x00000001 (1.401298e-45)] cmpne_int $1 = notEqual($1, $2) copy_slot_unmasked $2 = s1.y -copy_slot_unmasked $3 = s3.y +copy_immutable_unmasked $3 = i6 [0x00000002 (2.802597e-45)] cmpne_int $2 = notEqual($2, $3) copy_4_slots_unmasked $3..6 = s1.m -copy_4_slots_unmasked $7..10 = s3.m +copy_4_immutables_unmasked $7..10 = i7..10 [0x40000000 (2.0), 0, 0, 0x40000000 (2.0)] cmpne_4_floats $3..6 = notEqual($3..6, $7..10) bitwise_or_2_ints $3..4 |= $5..6 bitwise_or_int $3 |= $4 copy_4_slots_unmasked $4..7 = s1.a[0], s1.a[1], s1.a[2], s1.a[3] copy_slot_unmasked $8 = s1.a[4] -copy_4_slots_unmasked $9..12 = s3.a[0], s3.a[1], s3.a[2], s3.a[3] -copy_slot_unmasked $13 = s3.a[4] +copy_4_immutables_unmasked $9..12 = i11..14 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] +copy_immutable_unmasked $13 = i15 [0x40A00000 (5.0)] cmpne_n_floats $4..8 = notEqual($4..8, $9..13) bitwise_or_2_ints $5..6 |= $7..8 bitwise_or_int $5 |= $6 diff --git a/tests/sksl/shared/StructComparison.wgsl b/tests/sksl/shared/StructComparison.wgsl index b7d83eb92f91..02b73b70517b 100644 --- a/tests/sksl/shared/StructComparison.wgsl +++ b/tests/sksl/shared/StructComparison.wgsl @@ -1,10 +1,10 @@ ### Compilation failed: -error: :11:14 error: uniform storage requires that array elements are aligned to 16 bytes, but array element of type 'f32' has a stride of 4 bytes. Consider using a vector or struct as the element type instead. +error: :12:14 error: uniform storage requires that array elements are aligned to 16 bytes, but array element of type 'f32' has a stride of 4 bytes. Consider using a vector or struct as the element type instead. testArray: array, ^^^^^^^^^^^^^ -:8:1 note: see layout of struct: +:9:1 note: see layout of struct: /* align(16) size(64) */ struct _GlobalUniforms { /* offset( 0) align(16) size(16) */ colorGreen : vec4; /* offset(16) align(16) size(16) */ colorRed : vec4; @@ -14,11 +14,12 @@ error: :11:14 error: uniform storage requires that array elements are aligned to struct _GlobalUniforms { ^^^^^^ -:13:36 note: '_GlobalUniforms' used in address space 'uniform' here +:14:36 note: '_GlobalUniforms' used in address space 'uniform' here @binding(0) @group(0) var _globalUniforms: _GlobalUniforms; ^^^^^^^^^^^^^^^ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -45,7 +46,7 @@ fn main(_skParam0: vec2) -> vec4 { var s1: S = S(1, 2, mat2x2(1.0, 0.0, 0.0, 1.0), _array); var s2: S = S(1, 2, mat2x2(1.0, 0.0, 0.0, 1.0), _globalUniforms.testArray); var s3: S = S(1, 2, mat2x2(2.0, 0.0, 0.0, 2.0), array(1.0, 2.0, 3.0, 4.0, 5.0)); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((s1.x == s2.x && s1.y == s2.y && (all(s1.m[0] == s2.m[0]) && all(s1.m[1] == s2.m[1])) && (s1.a[0] == s2.a[0] && s1.a[1] == s2.a[1] && s1.a[2] == s2.a[2] && s1.a[3] == s2.a[3] && s1.a[4] == s2.a[4])) && (s1.x != s3.x || s1.y != s3.y || (any(s1.m[0] != s3.m[0]) || any(s1.m[1] != s3.m[1])) || (s1.a[0] != s3.a[0] || s1.a[1] != s3.a[1] || s1.a[2] != s3.a[2] || s1.a[3] != s3.a[3] || s1.a[4] != s3.a[4])))); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(((s1.x == s2.x) && (s1.y == s2.y) && (all(s1.m[0] == s2.m[0]) && all(s1.m[1] == s2.m[1])) && ((s1.a[0] == s2.a[0]) && (s1.a[1] == s2.a[1]) && (s1.a[2] == s2.a[2]) && (s1.a[3] == s2.a[3]) && (s1.a[4] == s2.a[4]))) && ((s1.x != s3.x) || (s1.y != s3.y) || (any(s1.m[0] != s3.m[0]) || any(s1.m[1] != s3.m[1])) || ((s1.a[0] != s3.a[0]) || (s1.a[1] != s3.a[1]) || (s1.a[2] != s3.a[2]) || (s1.a[3] != s3.a[3]) || (s1.a[4] != s3.a[4]))))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/shared/StructIndexLookup.asm.frag b/tests/sksl/shared/StructIndexLookup.asm.frag index 0308175388aa..385d54e7bd50 100644 --- a/tests/sksl/shared/StructIndexLookup.asm.frag +++ b/tests/sksl/shared/StructIndexLookup.asm.frag @@ -1,237 +1,237 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %InnerLUT "InnerLUT" -OpMemberName %InnerLUT 0 "values" -OpName %OuterLUT "OuterLUT" -OpMemberName %OuterLUT 0 "inner" -OpName %Root "Root" -OpMemberName %Root 0 "outer" -OpName %data "data" -OpName %expected "expected" -OpName %i "i" -OpName %j "j" -OpName %k "k" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpMemberDecorate %InnerLUT 0 Offset 0 -OpDecorate %_arr_InnerLUT_int_3 ArrayStride 16 -OpMemberDecorate %OuterLUT 0 Offset 0 -OpMemberDecorate %OuterLUT 0 RelaxedPrecision -OpDecorate %_arr_OuterLUT_int_3 ArrayStride 48 -OpMemberDecorate %Root 0 Offset 0 -OpMemberDecorate %Root 0 RelaxedPrecision -OpDecorate %117 RelaxedPrecision -OpDecorate %139 RelaxedPrecision -OpDecorate %147 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %InnerLUT "InnerLUT" + OpMemberName %InnerLUT 0 "values" + OpName %OuterLUT "OuterLUT" + OpMemberName %OuterLUT 0 "inner" + OpName %Root "Root" + OpMemberName %Root 0 "outer" + OpName %data "data" + OpName %expected "expected" + OpName %i "i" + OpName %j "j" + OpName %k "k" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpMemberDecorate %InnerLUT 0 Offset 0 + OpDecorate %_arr_InnerLUT_int_3 ArrayStride 16 + OpMemberDecorate %OuterLUT 0 Offset 0 + OpMemberDecorate %OuterLUT 0 RelaxedPrecision + OpDecorate %_arr_OuterLUT_int_3 ArrayStride 48 + OpMemberDecorate %Root 0 Offset 0 + OpMemberDecorate %Root 0 RelaxedPrecision + OpDecorate %117 RelaxedPrecision + OpDecorate %139 RelaxedPrecision + OpDecorate %147 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%v3float = OpTypeVector %float 3 -%InnerLUT = OpTypeStruct %v3float -%int = OpTypeInt 32 1 -%int_3 = OpConstant %int 3 + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %v3float = OpTypeVector %float 3 + %InnerLUT = OpTypeStruct %v3float + %int = OpTypeInt 32 1 + %int_3 = OpConstant %int 3 %_arr_InnerLUT_int_3 = OpTypeArray %InnerLUT %int_3 -%OuterLUT = OpTypeStruct %_arr_InnerLUT_int_3 + %OuterLUT = OpTypeStruct %_arr_InnerLUT_int_3 %_arr_OuterLUT_int_3 = OpTypeArray %OuterLUT %int_3 -%Root = OpTypeStruct %_arr_OuterLUT_int_3 + %Root = OpTypeStruct %_arr_OuterLUT_int_3 %_ptr_Function_Root = OpTypePointer Function %Root -%float_1 = OpConstant %float 1 -%float_10 = OpConstant %float 10 -%float_100 = OpConstant %float 100 -%39 = OpConstantComposite %v3float %float_1 %float_10 %float_100 -%int_0 = OpConstant %int 0 + %float_1 = OpConstant %float 1 + %float_10 = OpConstant %float 10 + %float_100 = OpConstant %float 100 + %39 = OpConstantComposite %v3float %float_1 %float_10 %float_100 + %int_0 = OpConstant %int 0 %_ptr_Function_v3float = OpTypePointer Function %v3float -%float_2 = OpConstant %float 2 -%float_20 = OpConstant %float 20 -%float_200 = OpConstant %float 200 -%46 = OpConstantComposite %v3float %float_2 %float_20 %float_200 -%int_1 = OpConstant %int 1 -%float_3 = OpConstant %float 3 -%float_30 = OpConstant %float 30 -%float_300 = OpConstant %float 300 -%52 = OpConstantComposite %v3float %float_3 %float_30 %float_300 -%int_2 = OpConstant %int 2 -%float_4 = OpConstant %float 4 -%float_40 = OpConstant %float 40 -%float_400 = OpConstant %float 400 -%58 = OpConstantComposite %v3float %float_4 %float_40 %float_400 -%float_5 = OpConstant %float 5 -%float_50 = OpConstant %float 50 -%float_500 = OpConstant %float 500 -%63 = OpConstantComposite %v3float %float_5 %float_50 %float_500 -%float_6 = OpConstant %float 6 -%float_60 = OpConstant %float 60 -%float_600 = OpConstant %float 600 -%68 = OpConstantComposite %v3float %float_6 %float_60 %float_600 -%float_7 = OpConstant %float 7 -%float_70 = OpConstant %float 70 -%float_700 = OpConstant %float 700 -%73 = OpConstantComposite %v3float %float_7 %float_70 %float_700 -%float_8 = OpConstant %float 8 -%float_80 = OpConstant %float 80 -%float_800 = OpConstant %float 800 -%78 = OpConstantComposite %v3float %float_8 %float_80 %float_800 -%float_9 = OpConstant %float 9 -%float_90 = OpConstant %float 90 -%float_900 = OpConstant %float 900 -%83 = OpConstantComposite %v3float %float_9 %float_90 %float_900 -%86 = OpConstantComposite %v3float %float_0 %float_0 %float_0 + %float_2 = OpConstant %float 2 + %float_20 = OpConstant %float 20 + %float_200 = OpConstant %float 200 + %46 = OpConstantComposite %v3float %float_2 %float_20 %float_200 + %int_1 = OpConstant %int 1 + %float_3 = OpConstant %float 3 + %float_30 = OpConstant %float 30 + %float_300 = OpConstant %float 300 + %52 = OpConstantComposite %v3float %float_3 %float_30 %float_300 + %int_2 = OpConstant %int 2 + %float_4 = OpConstant %float 4 + %float_40 = OpConstant %float 40 + %float_400 = OpConstant %float 400 + %58 = OpConstantComposite %v3float %float_4 %float_40 %float_400 + %float_5 = OpConstant %float 5 + %float_50 = OpConstant %float 50 + %float_500 = OpConstant %float 500 + %63 = OpConstantComposite %v3float %float_5 %float_50 %float_500 + %float_6 = OpConstant %float 6 + %float_60 = OpConstant %float 60 + %float_600 = OpConstant %float 600 + %68 = OpConstantComposite %v3float %float_6 %float_60 %float_600 + %float_7 = OpConstant %float 7 + %float_70 = OpConstant %float 70 + %float_700 = OpConstant %float 700 + %73 = OpConstantComposite %v3float %float_7 %float_70 %float_700 + %float_8 = OpConstant %float 8 + %float_80 = OpConstant %float 80 + %float_800 = OpConstant %float 800 + %78 = OpConstantComposite %v3float %float_8 %float_80 %float_800 + %float_9 = OpConstant %float 9 + %float_90 = OpConstant %float 90 + %float_900 = OpConstant %float 900 + %83 = OpConstantComposite %v3float %float_9 %float_90 %float_900 + %86 = OpConstantComposite %v3float %float_0 %float_0 %float_0 %_ptr_Function_int = OpTypePointer Function %int -%v3bool = OpTypeVector %bool 3 + %v3bool = OpTypeVector %bool 3 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%data = OpVariable %_ptr_Function_Root Function -%expected = OpVariable %_ptr_Function_v3float Function -%i = OpVariable %_ptr_Function_int Function -%j = OpVariable %_ptr_Function_int Function -%k = OpVariable %_ptr_Function_int Function -%41 = OpAccessChain %_ptr_Function_v3float %data %int_0 %int_0 %int_0 %int_0 %int_0 -OpStore %41 %39 -%48 = OpAccessChain %_ptr_Function_v3float %data %int_0 %int_0 %int_0 %int_1 %int_0 -OpStore %48 %46 -%54 = OpAccessChain %_ptr_Function_v3float %data %int_0 %int_0 %int_0 %int_2 %int_0 -OpStore %54 %52 -%59 = OpAccessChain %_ptr_Function_v3float %data %int_0 %int_1 %int_0 %int_0 %int_0 -OpStore %59 %58 -%64 = OpAccessChain %_ptr_Function_v3float %data %int_0 %int_1 %int_0 %int_1 %int_0 -OpStore %64 %63 -%69 = OpAccessChain %_ptr_Function_v3float %data %int_0 %int_1 %int_0 %int_2 %int_0 -OpStore %69 %68 -%74 = OpAccessChain %_ptr_Function_v3float %data %int_0 %int_2 %int_0 %int_0 %int_0 -OpStore %74 %73 -%79 = OpAccessChain %_ptr_Function_v3float %data %int_0 %int_2 %int_0 %int_1 %int_0 -OpStore %79 %78 -%84 = OpAccessChain %_ptr_Function_v3float %data %int_0 %int_2 %int_0 %int_2 %int_0 -OpStore %84 %83 -OpStore %expected %86 -OpStore %i %int_0 -OpBranch %89 -%89 = OpLabel -OpLoopMerge %93 %92 None -OpBranch %90 -%90 = OpLabel -%94 = OpLoad %int %i -%95 = OpSLessThan %bool %94 %int_3 -OpBranchConditional %95 %91 %93 -%91 = OpLabel -OpStore %j %int_0 -OpBranch %97 -%97 = OpLabel -OpLoopMerge %101 %100 None -OpBranch %98 -%98 = OpLabel -%102 = OpLoad %int %j -%103 = OpSLessThan %bool %102 %int_3 -OpBranchConditional %103 %99 %101 -%99 = OpLabel -%104 = OpLoad %v3float %expected -%105 = OpFAdd %v3float %104 %39 -OpStore %expected %105 -%106 = OpLoad %int %i -%107 = OpLoad %int %j -%108 = OpAccessChain %_ptr_Function_v3float %data %int_0 %106 %int_0 %107 %int_0 -%109 = OpLoad %v3float %108 -%110 = OpFUnordNotEqual %v3bool %109 %105 -%112 = OpAny %bool %110 -OpSelectionMerge %114 None -OpBranchConditional %112 %113 %114 -%113 = OpLabel -%115 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%117 = OpLoad %v4float %115 -OpReturnValue %117 -%114 = OpLabel -OpStore %k %int_0 -OpBranch %119 -%119 = OpLabel -OpLoopMerge %123 %122 None -OpBranch %120 -%120 = OpLabel -%124 = OpLoad %int %k -%125 = OpSLessThan %bool %124 %int_3 -OpBranchConditional %125 %121 %123 -%121 = OpLabel -%126 = OpLoad %int %i -%127 = OpLoad %int %j -%128 = OpAccessChain %_ptr_Function_v3float %data %int_0 %126 %int_0 %127 %int_0 -%129 = OpLoad %v3float %128 -%130 = OpLoad %int %k -%131 = OpVectorExtractDynamic %float %129 %130 -%132 = OpLoad %v3float %expected -%133 = OpLoad %int %k -%134 = OpVectorExtractDynamic %float %132 %133 -%135 = OpFUnordNotEqual %bool %131 %134 -OpSelectionMerge %137 None -OpBranchConditional %135 %136 %137 -%136 = OpLabel -%138 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%139 = OpLoad %v4float %138 -OpReturnValue %139 -%137 = OpLabel -OpBranch %122 -%122 = OpLabel -%140 = OpLoad %int %k -%141 = OpIAdd %int %140 %int_1 -OpStore %k %141 -OpBranch %119 -%123 = OpLabel -OpBranch %100 -%100 = OpLabel -%142 = OpLoad %int %j -%143 = OpIAdd %int %142 %int_1 -OpStore %j %143 -OpBranch %97 -%101 = OpLabel -OpBranch %92 -%92 = OpLabel -%144 = OpLoad %int %i -%145 = OpIAdd %int %144 %int_1 -OpStore %i %145 -OpBranch %89 -%93 = OpLabel -%146 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%147 = OpLoad %v4float %146 -OpReturnValue %147 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %data = OpVariable %_ptr_Function_Root Function + %expected = OpVariable %_ptr_Function_v3float Function + %i = OpVariable %_ptr_Function_int Function + %j = OpVariable %_ptr_Function_int Function + %k = OpVariable %_ptr_Function_int Function + %41 = OpAccessChain %_ptr_Function_v3float %data %int_0 %int_0 %int_0 %int_0 %int_0 + OpStore %41 %39 + %48 = OpAccessChain %_ptr_Function_v3float %data %int_0 %int_0 %int_0 %int_1 %int_0 + OpStore %48 %46 + %54 = OpAccessChain %_ptr_Function_v3float %data %int_0 %int_0 %int_0 %int_2 %int_0 + OpStore %54 %52 + %59 = OpAccessChain %_ptr_Function_v3float %data %int_0 %int_1 %int_0 %int_0 %int_0 + OpStore %59 %58 + %64 = OpAccessChain %_ptr_Function_v3float %data %int_0 %int_1 %int_0 %int_1 %int_0 + OpStore %64 %63 + %69 = OpAccessChain %_ptr_Function_v3float %data %int_0 %int_1 %int_0 %int_2 %int_0 + OpStore %69 %68 + %74 = OpAccessChain %_ptr_Function_v3float %data %int_0 %int_2 %int_0 %int_0 %int_0 + OpStore %74 %73 + %79 = OpAccessChain %_ptr_Function_v3float %data %int_0 %int_2 %int_0 %int_1 %int_0 + OpStore %79 %78 + %84 = OpAccessChain %_ptr_Function_v3float %data %int_0 %int_2 %int_0 %int_2 %int_0 + OpStore %84 %83 + OpStore %expected %86 + OpStore %i %int_0 + OpBranch %89 + %89 = OpLabel + OpLoopMerge %93 %92 None + OpBranch %90 + %90 = OpLabel + %94 = OpLoad %int %i + %95 = OpSLessThan %bool %94 %int_3 + OpBranchConditional %95 %91 %93 + %91 = OpLabel + OpStore %j %int_0 + OpBranch %97 + %97 = OpLabel + OpLoopMerge %101 %100 None + OpBranch %98 + %98 = OpLabel + %102 = OpLoad %int %j + %103 = OpSLessThan %bool %102 %int_3 + OpBranchConditional %103 %99 %101 + %99 = OpLabel + %104 = OpLoad %v3float %expected + %105 = OpFAdd %v3float %104 %39 + OpStore %expected %105 + %106 = OpLoad %int %i + %107 = OpLoad %int %j + %108 = OpAccessChain %_ptr_Function_v3float %data %int_0 %106 %int_0 %107 %int_0 + %109 = OpLoad %v3float %108 + %110 = OpFUnordNotEqual %v3bool %109 %105 + %112 = OpAny %bool %110 + OpSelectionMerge %114 None + OpBranchConditional %112 %113 %114 + %113 = OpLabel + %115 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %117 = OpLoad %v4float %115 + OpReturnValue %117 + %114 = OpLabel + OpStore %k %int_0 + OpBranch %119 + %119 = OpLabel + OpLoopMerge %123 %122 None + OpBranch %120 + %120 = OpLabel + %124 = OpLoad %int %k + %125 = OpSLessThan %bool %124 %int_3 + OpBranchConditional %125 %121 %123 + %121 = OpLabel + %126 = OpLoad %int %i + %127 = OpLoad %int %j + %128 = OpAccessChain %_ptr_Function_v3float %data %int_0 %126 %int_0 %127 %int_0 + %129 = OpLoad %v3float %128 + %130 = OpLoad %int %k + %131 = OpVectorExtractDynamic %float %129 %130 + %132 = OpLoad %v3float %expected + %133 = OpLoad %int %k + %134 = OpVectorExtractDynamic %float %132 %133 + %135 = OpFUnordNotEqual %bool %131 %134 + OpSelectionMerge %137 None + OpBranchConditional %135 %136 %137 + %136 = OpLabel + %138 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %139 = OpLoad %v4float %138 + OpReturnValue %139 + %137 = OpLabel + OpBranch %122 + %122 = OpLabel + %140 = OpLoad %int %k + %141 = OpIAdd %int %140 %int_1 + OpStore %k %141 + OpBranch %119 + %123 = OpLabel + OpBranch %100 + %100 = OpLabel + %142 = OpLoad %int %j + %143 = OpIAdd %int %142 %int_1 + OpStore %j %143 + OpBranch %97 + %101 = OpLabel + OpBranch %92 + %92 = OpLabel + %144 = OpLoad %int %i + %145 = OpIAdd %int %144 %int_1 + OpStore %i %145 + OpBranch %89 + %93 = OpLabel + %146 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %147 = OpLoad %v4float %146 + OpReturnValue %147 + OpFunctionEnd diff --git a/tests/sksl/shared/StructIndexLookup.skrp b/tests/sksl/shared/StructIndexLookup.skrp index 4744806348e2..818881fababb 100644 --- a/tests/sksl/shared/StructIndexLookup.skrp +++ b/tests/sksl/shared/StructIndexLookup.skrp @@ -1,3 +1,34 @@ +107 instructions + +[immutable slots] +i0 = 0x3F800000 (1.0) +i1 = 0x41200000 (10.0) +i2 = 0x42C80000 (100.0) +i3 = 0x40000000 (2.0) +i4 = 0x41A00000 (20.0) +i5 = 0x43480000 (200.0) +i6 = 0x40400000 (3.0) +i7 = 0x41F00000 (30.0) +i8 = 0x43960000 (300.0) +i9 = 0x40800000 (4.0) +i10 = 0x42200000 (40.0) +i11 = 0x43C80000 (400.0) +i12 = 0x40A00000 (5.0) +i13 = 0x42480000 (50.0) +i14 = 0x43FA0000 (500.0) +i15 = 0x40C00000 (6.0) +i16 = 0x42700000 (60.0) +i17 = 0x44160000 (600.0) +i18 = 0x40E00000 (7.0) +i19 = 0x428C0000 (70.0) +i20 = 0x442F0000 (700.0) +i21 = 0x41000000 (8.0) +i22 = 0x42A00000 (80.0) +i23 = 0x44480000 (800.0) +i24 = 0x41100000 (9.0) +i25 = 0x42B40000 (90.0) +i26 = 0x44610000 (900.0) + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true splat_4_constants data.outer[0].inner[0].values, data.outer[0].inner[1].values(0) = 0 @@ -7,54 +38,34 @@ splat_4_constants data.outer[1].inner[1].values, data.outer[1].inne splat_4_constants data.outer[1].inner[2].values(1..2), data.outer[2].inner[0].values(0..1) = 0 splat_4_constants data.outer[2].inner[0].values(2), data.outer[2].inner[1].values = 0 splat_3_constants data.outer[2].inner[2].values = 0 -copy_constant $0 = 0x3F800000 (1.0) -copy_constant $1 = 0x41200000 (10.0) -copy_constant $2 = 0x42C80000 (100.0) +copy_3_immutables_unmasked $0..2 = i0..2 [0x3F800000 (1.0), 0x41200000 (10.0), 0x42C80000 (100.0)] copy_3_slots_masked data.outer[0].inner[0].values = Mask($0..2) -copy_constant $0 = 0x40000000 (2.0) -copy_constant $1 = 0x41A00000 (20.0) -copy_constant $2 = 0x43480000 (200.0) +copy_3_immutables_unmasked $0..2 = i3..5 [0x40000000 (2.0), 0x41A00000 (20.0), 0x43480000 (200.0)] copy_3_slots_masked data.outer[0].inner[1].values = Mask($0..2) -copy_constant $0 = 0x40400000 (3.0) -copy_constant $1 = 0x41F00000 (30.0) -copy_constant $2 = 0x43960000 (300.0) +copy_3_immutables_unmasked $0..2 = i6..8 [0x40400000 (3.0), 0x41F00000 (30.0), 0x43960000 (300.0)] copy_3_slots_masked data.outer[0].inner[2].values = Mask($0..2) -copy_constant $0 = 0x40800000 (4.0) -copy_constant $1 = 0x42200000 (40.0) -copy_constant $2 = 0x43C80000 (400.0) +copy_3_immutables_unmasked $0..2 = i9..11 [0x40800000 (4.0), 0x42200000 (40.0), 0x43C80000 (400.0)] copy_3_slots_masked data.outer[1].inner[0].values = Mask($0..2) -copy_constant $0 = 0x40A00000 (5.0) -copy_constant $1 = 0x42480000 (50.0) -copy_constant $2 = 0x43FA0000 (500.0) +copy_3_immutables_unmasked $0..2 = i12..14 [0x40A00000 (5.0), 0x42480000 (50.0), 0x43FA0000 (500.0)] copy_3_slots_masked data.outer[1].inner[1].values = Mask($0..2) -copy_constant $0 = 0x40C00000 (6.0) -copy_constant $1 = 0x42700000 (60.0) -copy_constant $2 = 0x44160000 (600.0) +copy_3_immutables_unmasked $0..2 = i15..17 [0x40C00000 (6.0), 0x42700000 (60.0), 0x44160000 (600.0)] copy_3_slots_masked data.outer[1].inner[2].values = Mask($0..2) -copy_constant $0 = 0x40E00000 (7.0) -copy_constant $1 = 0x428C0000 (70.0) -copy_constant $2 = 0x442F0000 (700.0) +copy_3_immutables_unmasked $0..2 = i18..20 [0x40E00000 (7.0), 0x428C0000 (70.0), 0x442F0000 (700.0)] copy_3_slots_masked data.outer[2].inner[0].values = Mask($0..2) -copy_constant $0 = 0x41000000 (8.0) -copy_constant $1 = 0x42A00000 (80.0) -copy_constant $2 = 0x44480000 (800.0) +copy_3_immutables_unmasked $0..2 = i21..23 [0x41000000 (8.0), 0x42A00000 (80.0), 0x44480000 (800.0)] copy_3_slots_masked data.outer[2].inner[1].values = Mask($0..2) -copy_constant $0 = 0x41100000 (9.0) -copy_constant $1 = 0x42B40000 (90.0) -copy_constant $2 = 0x44610000 (900.0) +copy_3_immutables_unmasked $0..2 = i24..26 [0x41100000 (9.0), 0x42B40000 (90.0), 0x44610000 (900.0)] copy_3_slots_masked data.outer[2].inner[2].values = Mask($0..2) splat_4_constants expected, i = 0 store_loop_mask $0 = LoopMask -jump jump +77 (label 1 at #125) +jump jump +75 (label 1 at #105) label label 0x00000002 copy_constant j = 0 store_loop_mask $1 = LoopMask -jump jump +62 (label 4 at #114) +jump jump +60 (label 4 at #94) label label 0x00000005 copy_3_slots_unmasked $2..4 = expected -copy_constant $5 = 0x3F800000 (1.0) -copy_constant $6 = 0x41200000 (10.0) -copy_constant $7 = 0x42C80000 (100.0) +copy_3_immutables_unmasked $5..7 = i0..2 [0x3F800000 (1.0), 0x41200000 (10.0), 0x42C80000 (100.0)] add_3_floats $2..4 += $5..7 copy_3_slots_masked expected = Mask($2..4) store_condition_mask $2 = CondMask @@ -76,7 +87,7 @@ mask_off_return_mask RetMask &= ~(CondMask & LoopMask & RetMask) load_condition_mask CondMask = $2 copy_constant k = 0 store_loop_mask $2 = LoopMask -jump jump +24 (label 7 at #103) +jump jump +24 (label 7 at #83) label label 0x00000008 store_condition_mask $3 = CondMask copy_slot_unmasked $9 = i @@ -105,7 +116,7 @@ copy_slot_unmasked $3 = k cmplt_imm_int $3 = lessThan($3, 0x00000003) merge_loop_mask LoopMask &= $3 stack_rewind -branch_if_any_lanes_active branch_if_any_lanes_active -28 (label 8 at #80) +branch_if_any_lanes_active branch_if_any_lanes_active -28 (label 8 at #60) label label 0x00000006 load_loop_mask LoopMask = $2 copy_slot_unmasked $2 = j @@ -116,7 +127,7 @@ copy_slot_unmasked $2 = j cmplt_imm_int $2 = lessThan($2, 0x00000003) merge_loop_mask LoopMask &= $2 stack_rewind -branch_if_any_lanes_active branch_if_any_lanes_active -66 (label 5 at #53) +branch_if_any_lanes_active branch_if_any_lanes_active -64 (label 5 at #35) label label 0x00000003 load_loop_mask LoopMask = $1 copy_slot_unmasked $1 = i @@ -127,7 +138,7 @@ copy_slot_unmasked $1 = i cmplt_imm_int $1 = lessThan($1, 0x00000003) merge_loop_mask LoopMask &= $1 stack_rewind -branch_if_any_lanes_active branch_if_any_lanes_active -81 (label 2 at #49) +branch_if_any_lanes_active branch_if_any_lanes_active -79 (label 2 at #31) label label 0 load_loop_mask LoopMask = $0 copy_4_uniforms $0..3 = colorGreen diff --git a/tests/sksl/shared/StructIndexLookup.wgsl b/tests/sksl/shared/StructIndexLookup.wgsl index ca20461552e6..fa2b72335f56 100644 --- a/tests/sksl/shared/StructIndexLookup.wgsl +++ b/tests/sksl/shared/StructIndexLookup.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -42,7 +43,7 @@ fn main(_skParam0: vec2) -> vec4 { loop { { expected = expected + vec3(1.0, 10.0, 100.0); - if (any(data.outer[i].inner[j].values != expected)) { + if any(data.outer[i].inner[j].values != expected) { { return _globalUniforms.colorRed; } @@ -51,7 +52,7 @@ fn main(_skParam0: vec2) -> vec4 { var k: i32 = 0; loop { { - if (data.outer[i].inner[j].values[k] != expected[k]) { + if data.outer[i].inner[j].values[k] != expected[k] { { return _globalUniforms.colorRed; } diff --git a/tests/sksl/shared/StructIndexStore.asm.frag b/tests/sksl/shared/StructIndexStore.asm.frag index e39beb3b3fc5..dafb1754573c 100644 --- a/tests/sksl/shared/StructIndexStore.asm.frag +++ b/tests/sksl/shared/StructIndexStore.asm.frag @@ -1,315 +1,315 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %InnerLUT "InnerLUT" -OpMemberName %InnerLUT 0 "values" -OpName %OuterLUT "OuterLUT" -OpMemberName %OuterLUT 0 "inner" -OpName %Root "Root" -OpMemberName %Root 0 "valueAtRoot" -OpMemberName %Root 1 "outer" -OpName %data "data" -OpName %values "values" -OpName %i "i" -OpName %j "j" -OpName %k "k" -OpName %ok "ok" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpMemberDecorate %InnerLUT 0 Offset 0 -OpDecorate %_arr_InnerLUT_int_3 ArrayStride 16 -OpMemberDecorate %OuterLUT 0 Offset 0 -OpMemberDecorate %OuterLUT 0 RelaxedPrecision -OpDecorate %_arr_OuterLUT_int_3 ArrayStride 48 -OpMemberDecorate %Root 0 Offset 0 -OpMemberDecorate %Root 1 Offset 16 -OpMemberDecorate %Root 1 RelaxedPrecision -OpDecorate %198 RelaxedPrecision -OpDecorate %200 RelaxedPrecision -OpDecorate %201 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %InnerLUT "InnerLUT" + OpMemberName %InnerLUT 0 "values" + OpName %OuterLUT "OuterLUT" + OpMemberName %OuterLUT 0 "inner" + OpName %Root "Root" + OpMemberName %Root 0 "valueAtRoot" + OpMemberName %Root 1 "outer" + OpName %data "data" + OpName %values "values" + OpName %i "i" + OpName %j "j" + OpName %k "k" + OpName %ok "ok" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpMemberDecorate %InnerLUT 0 Offset 0 + OpDecorate %_arr_InnerLUT_int_3 ArrayStride 16 + OpMemberDecorate %OuterLUT 0 Offset 0 + OpMemberDecorate %OuterLUT 0 RelaxedPrecision + OpDecorate %_arr_OuterLUT_int_3 ArrayStride 48 + OpMemberDecorate %Root 0 Offset 0 + OpMemberDecorate %Root 1 Offset 16 + OpMemberDecorate %Root 1 RelaxedPrecision + OpDecorate %198 RelaxedPrecision + OpDecorate %200 RelaxedPrecision + OpDecorate %201 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%int = OpTypeInt 32 1 -%v3float = OpTypeVector %float 3 -%InnerLUT = OpTypeStruct %v3float -%int_3 = OpConstant %int 3 + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %int = OpTypeInt 32 1 + %v3float = OpTypeVector %float 3 + %InnerLUT = OpTypeStruct %v3float + %int_3 = OpConstant %int 3 %_arr_InnerLUT_int_3 = OpTypeArray %InnerLUT %int_3 -%OuterLUT = OpTypeStruct %_arr_InnerLUT_int_3 + %OuterLUT = OpTypeStruct %_arr_InnerLUT_int_3 %_arr_OuterLUT_int_3 = OpTypeArray %OuterLUT %int_3 -%Root = OpTypeStruct %int %_arr_OuterLUT_int_3 + %Root = OpTypeStruct %int %_arr_OuterLUT_int_3 %_ptr_Function_Root = OpTypePointer Function %Root -%int_1234 = OpConstant %int 1234 -%int_0 = OpConstant %int 0 + %int_1234 = OpConstant %int 1234 + %int_0 = OpConstant %int 0 %_ptr_Function_int = OpTypePointer Function %int %_ptr_Function_v3float = OpTypePointer Function %v3float -%42 = OpConstantComposite %v3float %float_0 %float_0 %float_0 -%float_1 = OpConstant %float 1 -%float_10 = OpConstant %float 10 -%float_100 = OpConstant %float 100 -%63 = OpConstantComposite %v3float %float_1 %float_10 %float_100 -%int_1 = OpConstant %int 1 + %42 = OpConstantComposite %v3float %float_0 %float_0 %float_0 + %float_1 = OpConstant %float 1 + %float_10 = OpConstant %float 10 + %float_100 = OpConstant %float 100 + %63 = OpConstantComposite %v3float %float_1 %float_10 %float_100 + %int_1 = OpConstant %int 1 %_ptr_Function_float = OpTypePointer Function %float %_ptr_Function_bool = OpTypePointer Function %bool -%false = OpConstantFalse %bool -%v3bool = OpTypeVector %bool 3 -%float_2 = OpConstant %float 2 -%float_20 = OpConstant %float 20 -%float_200 = OpConstant %float 200 -%109 = OpConstantComposite %v3float %float_2 %float_20 %float_200 -%int_2 = OpConstant %int 2 -%float_3 = OpConstant %float 3 -%float_30 = OpConstant %float 30 -%float_300 = OpConstant %float 300 -%121 = OpConstantComposite %v3float %float_3 %float_30 %float_300 -%float_4 = OpConstant %float 4 -%float_40 = OpConstant %float 40 -%float_400 = OpConstant %float 400 -%132 = OpConstantComposite %v3float %float_4 %float_40 %float_400 -%float_5 = OpConstant %float 5 -%float_50 = OpConstant %float 50 -%float_500 = OpConstant %float 500 -%143 = OpConstantComposite %v3float %float_5 %float_50 %float_500 -%float_6 = OpConstant %float 6 -%float_60 = OpConstant %float 60 -%float_600 = OpConstant %float 600 -%154 = OpConstantComposite %v3float %float_6 %float_60 %float_600 -%float_7 = OpConstant %float 7 -%float_70 = OpConstant %float 70 -%float_700 = OpConstant %float 700 -%165 = OpConstantComposite %v3float %float_7 %float_70 %float_700 -%float_8 = OpConstant %float 8 -%float_80 = OpConstant %float 80 -%float_800 = OpConstant %float 800 -%176 = OpConstantComposite %v3float %float_8 %float_80 %float_800 -%float_9 = OpConstant %float 9 -%float_90 = OpConstant %float 90 -%float_900 = OpConstant %float 900 -%187 = OpConstantComposite %v3float %float_9 %float_90 %float_900 + %false = OpConstantFalse %bool + %v3bool = OpTypeVector %bool 3 + %float_2 = OpConstant %float 2 + %float_20 = OpConstant %float 20 + %float_200 = OpConstant %float 200 + %109 = OpConstantComposite %v3float %float_2 %float_20 %float_200 + %int_2 = OpConstant %int 2 + %float_3 = OpConstant %float 3 + %float_30 = OpConstant %float 30 + %float_300 = OpConstant %float 300 + %121 = OpConstantComposite %v3float %float_3 %float_30 %float_300 + %float_4 = OpConstant %float 4 + %float_40 = OpConstant %float 40 + %float_400 = OpConstant %float 400 + %132 = OpConstantComposite %v3float %float_4 %float_40 %float_400 + %float_5 = OpConstant %float 5 + %float_50 = OpConstant %float 50 + %float_500 = OpConstant %float 500 + %143 = OpConstantComposite %v3float %float_5 %float_50 %float_500 + %float_6 = OpConstant %float 6 + %float_60 = OpConstant %float 60 + %float_600 = OpConstant %float 600 + %154 = OpConstantComposite %v3float %float_6 %float_60 %float_600 + %float_7 = OpConstant %float 7 + %float_70 = OpConstant %float 70 + %float_700 = OpConstant %float 700 + %165 = OpConstantComposite %v3float %float_7 %float_70 %float_700 + %float_8 = OpConstant %float 8 + %float_80 = OpConstant %float 80 + %float_800 = OpConstant %float 800 + %176 = OpConstantComposite %v3float %float_8 %float_80 %float_800 + %float_9 = OpConstant %float 9 + %float_90 = OpConstant %float 90 + %float_900 = OpConstant %float 900 + %187 = OpConstantComposite %v3float %float_9 %float_90 %float_900 %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%data = OpVariable %_ptr_Function_Root Function -%values = OpVariable %_ptr_Function_v3float Function -%i = OpVariable %_ptr_Function_int Function -%j = OpVariable %_ptr_Function_int Function -%k = OpVariable %_ptr_Function_int Function -%ok = OpVariable %_ptr_Function_bool Function -%191 = OpVariable %_ptr_Function_v4float Function -%38 = OpAccessChain %_ptr_Function_int %data %int_0 -OpStore %38 %int_1234 -OpStore %values %42 -OpStore %i %int_0 -OpBranch %44 -%44 = OpLabel -OpLoopMerge %48 %47 None -OpBranch %45 -%45 = OpLabel -%49 = OpLoad %int %i -%50 = OpSLessThan %bool %49 %int_3 -OpBranchConditional %50 %46 %48 -%46 = OpLabel -OpStore %j %int_0 -OpBranch %52 -%52 = OpLabel -OpLoopMerge %56 %55 None -OpBranch %53 -%53 = OpLabel -%57 = OpLoad %int %j -%58 = OpSLessThan %bool %57 %int_3 -OpBranchConditional %58 %54 %56 -%54 = OpLabel -%59 = OpLoad %v3float %values -%64 = OpFAdd %v3float %59 %63 -OpStore %values %64 -OpStore %k %int_0 -OpBranch %66 -%66 = OpLabel -OpLoopMerge %70 %69 None -OpBranch %67 -%67 = OpLabel -%71 = OpLoad %int %k -%72 = OpSLessThan %bool %71 %int_3 -OpBranchConditional %72 %68 %70 -%68 = OpLabel -%73 = OpLoad %v3float %values -%74 = OpLoad %int %k -%75 = OpVectorExtractDynamic %float %73 %74 -%77 = OpLoad %int %i -%78 = OpLoad %int %j -%79 = OpLoad %int %k -%80 = OpAccessChain %_ptr_Function_float %data %int_1 %77 %int_0 %78 %int_0 %79 -OpStore %80 %75 -OpBranch %69 -%69 = OpLabel -%82 = OpLoad %int %k -%83 = OpIAdd %int %82 %int_1 -OpStore %k %83 -OpBranch %66 -%70 = OpLabel -OpBranch %55 -%55 = OpLabel -%84 = OpLoad %int %j -%85 = OpIAdd %int %84 %int_1 -OpStore %j %85 -OpBranch %52 -%56 = OpLabel -OpBranch %47 -%47 = OpLabel -%86 = OpLoad %int %i -%87 = OpIAdd %int %86 %int_1 -OpStore %i %87 -OpBranch %44 -%48 = OpLabel -%91 = OpAccessChain %_ptr_Function_int %data %int_0 -%92 = OpLoad %int %91 -%93 = OpIEqual %bool %92 %int_1234 -OpSelectionMerge %95 None -OpBranchConditional %93 %94 %95 -%94 = OpLabel -%96 = OpAccessChain %_ptr_Function_v3float %data %int_1 %int_0 %int_0 %int_0 %int_0 -%97 = OpLoad %v3float %96 -%98 = OpFOrdEqual %v3bool %97 %63 -%100 = OpAll %bool %98 -OpBranch %95 -%95 = OpLabel -%101 = OpPhi %bool %false %48 %100 %94 -OpSelectionMerge %103 None -OpBranchConditional %101 %102 %103 -%102 = OpLabel -%104 = OpAccessChain %_ptr_Function_v3float %data %int_1 %int_0 %int_0 %int_1 %int_0 -%105 = OpLoad %v3float %104 -%110 = OpFOrdEqual %v3bool %105 %109 -%111 = OpAll %bool %110 -OpBranch %103 -%103 = OpLabel -%112 = OpPhi %bool %false %95 %111 %102 -OpSelectionMerge %114 None -OpBranchConditional %112 %113 %114 -%113 = OpLabel -%116 = OpAccessChain %_ptr_Function_v3float %data %int_1 %int_0 %int_0 %int_2 %int_0 -%117 = OpLoad %v3float %116 -%122 = OpFOrdEqual %v3bool %117 %121 -%123 = OpAll %bool %122 -OpBranch %114 -%114 = OpLabel -%124 = OpPhi %bool %false %103 %123 %113 -OpSelectionMerge %126 None -OpBranchConditional %124 %125 %126 -%125 = OpLabel -%127 = OpAccessChain %_ptr_Function_v3float %data %int_1 %int_1 %int_0 %int_0 %int_0 -%128 = OpLoad %v3float %127 -%133 = OpFOrdEqual %v3bool %128 %132 -%134 = OpAll %bool %133 -OpBranch %126 -%126 = OpLabel -%135 = OpPhi %bool %false %114 %134 %125 -OpSelectionMerge %137 None -OpBranchConditional %135 %136 %137 -%136 = OpLabel -%138 = OpAccessChain %_ptr_Function_v3float %data %int_1 %int_1 %int_0 %int_1 %int_0 -%139 = OpLoad %v3float %138 -%144 = OpFOrdEqual %v3bool %139 %143 -%145 = OpAll %bool %144 -OpBranch %137 -%137 = OpLabel -%146 = OpPhi %bool %false %126 %145 %136 -OpSelectionMerge %148 None -OpBranchConditional %146 %147 %148 -%147 = OpLabel -%149 = OpAccessChain %_ptr_Function_v3float %data %int_1 %int_1 %int_0 %int_2 %int_0 -%150 = OpLoad %v3float %149 -%155 = OpFOrdEqual %v3bool %150 %154 -%156 = OpAll %bool %155 -OpBranch %148 -%148 = OpLabel -%157 = OpPhi %bool %false %137 %156 %147 -OpSelectionMerge %159 None -OpBranchConditional %157 %158 %159 -%158 = OpLabel -%160 = OpAccessChain %_ptr_Function_v3float %data %int_1 %int_2 %int_0 %int_0 %int_0 -%161 = OpLoad %v3float %160 -%166 = OpFOrdEqual %v3bool %161 %165 -%167 = OpAll %bool %166 -OpBranch %159 -%159 = OpLabel -%168 = OpPhi %bool %false %148 %167 %158 -OpSelectionMerge %170 None -OpBranchConditional %168 %169 %170 -%169 = OpLabel -%171 = OpAccessChain %_ptr_Function_v3float %data %int_1 %int_2 %int_0 %int_1 %int_0 -%172 = OpLoad %v3float %171 -%177 = OpFOrdEqual %v3bool %172 %176 -%178 = OpAll %bool %177 -OpBranch %170 -%170 = OpLabel -%179 = OpPhi %bool %false %159 %178 %169 -OpSelectionMerge %181 None -OpBranchConditional %179 %180 %181 -%180 = OpLabel -%182 = OpAccessChain %_ptr_Function_v3float %data %int_1 %int_2 %int_0 %int_2 %int_0 -%183 = OpLoad %v3float %182 -%188 = OpFOrdEqual %v3bool %183 %187 -%189 = OpAll %bool %188 -OpBranch %181 -%181 = OpLabel -%190 = OpPhi %bool %false %170 %189 %180 -OpStore %ok %190 -OpSelectionMerge %195 None -OpBranchConditional %190 %193 %194 -%193 = OpLabel -%196 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%198 = OpLoad %v4float %196 -OpStore %191 %198 -OpBranch %195 -%194 = OpLabel -%199 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%200 = OpLoad %v4float %199 -OpStore %191 %200 -OpBranch %195 -%195 = OpLabel -%201 = OpLoad %v4float %191 -OpReturnValue %201 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %data = OpVariable %_ptr_Function_Root Function + %values = OpVariable %_ptr_Function_v3float Function + %i = OpVariable %_ptr_Function_int Function + %j = OpVariable %_ptr_Function_int Function + %k = OpVariable %_ptr_Function_int Function + %ok = OpVariable %_ptr_Function_bool Function + %191 = OpVariable %_ptr_Function_v4float Function + %38 = OpAccessChain %_ptr_Function_int %data %int_0 + OpStore %38 %int_1234 + OpStore %values %42 + OpStore %i %int_0 + OpBranch %44 + %44 = OpLabel + OpLoopMerge %48 %47 None + OpBranch %45 + %45 = OpLabel + %49 = OpLoad %int %i + %50 = OpSLessThan %bool %49 %int_3 + OpBranchConditional %50 %46 %48 + %46 = OpLabel + OpStore %j %int_0 + OpBranch %52 + %52 = OpLabel + OpLoopMerge %56 %55 None + OpBranch %53 + %53 = OpLabel + %57 = OpLoad %int %j + %58 = OpSLessThan %bool %57 %int_3 + OpBranchConditional %58 %54 %56 + %54 = OpLabel + %59 = OpLoad %v3float %values + %64 = OpFAdd %v3float %59 %63 + OpStore %values %64 + OpStore %k %int_0 + OpBranch %66 + %66 = OpLabel + OpLoopMerge %70 %69 None + OpBranch %67 + %67 = OpLabel + %71 = OpLoad %int %k + %72 = OpSLessThan %bool %71 %int_3 + OpBranchConditional %72 %68 %70 + %68 = OpLabel + %73 = OpLoad %v3float %values + %74 = OpLoad %int %k + %75 = OpVectorExtractDynamic %float %73 %74 + %77 = OpLoad %int %i + %78 = OpLoad %int %j + %79 = OpLoad %int %k + %80 = OpAccessChain %_ptr_Function_float %data %int_1 %77 %int_0 %78 %int_0 %79 + OpStore %80 %75 + OpBranch %69 + %69 = OpLabel + %82 = OpLoad %int %k + %83 = OpIAdd %int %82 %int_1 + OpStore %k %83 + OpBranch %66 + %70 = OpLabel + OpBranch %55 + %55 = OpLabel + %84 = OpLoad %int %j + %85 = OpIAdd %int %84 %int_1 + OpStore %j %85 + OpBranch %52 + %56 = OpLabel + OpBranch %47 + %47 = OpLabel + %86 = OpLoad %int %i + %87 = OpIAdd %int %86 %int_1 + OpStore %i %87 + OpBranch %44 + %48 = OpLabel + %91 = OpAccessChain %_ptr_Function_int %data %int_0 + %92 = OpLoad %int %91 + %93 = OpIEqual %bool %92 %int_1234 + OpSelectionMerge %95 None + OpBranchConditional %93 %94 %95 + %94 = OpLabel + %96 = OpAccessChain %_ptr_Function_v3float %data %int_1 %int_0 %int_0 %int_0 %int_0 + %97 = OpLoad %v3float %96 + %98 = OpFOrdEqual %v3bool %97 %63 + %100 = OpAll %bool %98 + OpBranch %95 + %95 = OpLabel + %101 = OpPhi %bool %false %48 %100 %94 + OpSelectionMerge %103 None + OpBranchConditional %101 %102 %103 + %102 = OpLabel + %104 = OpAccessChain %_ptr_Function_v3float %data %int_1 %int_0 %int_0 %int_1 %int_0 + %105 = OpLoad %v3float %104 + %110 = OpFOrdEqual %v3bool %105 %109 + %111 = OpAll %bool %110 + OpBranch %103 + %103 = OpLabel + %112 = OpPhi %bool %false %95 %111 %102 + OpSelectionMerge %114 None + OpBranchConditional %112 %113 %114 + %113 = OpLabel + %116 = OpAccessChain %_ptr_Function_v3float %data %int_1 %int_0 %int_0 %int_2 %int_0 + %117 = OpLoad %v3float %116 + %122 = OpFOrdEqual %v3bool %117 %121 + %123 = OpAll %bool %122 + OpBranch %114 + %114 = OpLabel + %124 = OpPhi %bool %false %103 %123 %113 + OpSelectionMerge %126 None + OpBranchConditional %124 %125 %126 + %125 = OpLabel + %127 = OpAccessChain %_ptr_Function_v3float %data %int_1 %int_1 %int_0 %int_0 %int_0 + %128 = OpLoad %v3float %127 + %133 = OpFOrdEqual %v3bool %128 %132 + %134 = OpAll %bool %133 + OpBranch %126 + %126 = OpLabel + %135 = OpPhi %bool %false %114 %134 %125 + OpSelectionMerge %137 None + OpBranchConditional %135 %136 %137 + %136 = OpLabel + %138 = OpAccessChain %_ptr_Function_v3float %data %int_1 %int_1 %int_0 %int_1 %int_0 + %139 = OpLoad %v3float %138 + %144 = OpFOrdEqual %v3bool %139 %143 + %145 = OpAll %bool %144 + OpBranch %137 + %137 = OpLabel + %146 = OpPhi %bool %false %126 %145 %136 + OpSelectionMerge %148 None + OpBranchConditional %146 %147 %148 + %147 = OpLabel + %149 = OpAccessChain %_ptr_Function_v3float %data %int_1 %int_1 %int_0 %int_2 %int_0 + %150 = OpLoad %v3float %149 + %155 = OpFOrdEqual %v3bool %150 %154 + %156 = OpAll %bool %155 + OpBranch %148 + %148 = OpLabel + %157 = OpPhi %bool %false %137 %156 %147 + OpSelectionMerge %159 None + OpBranchConditional %157 %158 %159 + %158 = OpLabel + %160 = OpAccessChain %_ptr_Function_v3float %data %int_1 %int_2 %int_0 %int_0 %int_0 + %161 = OpLoad %v3float %160 + %166 = OpFOrdEqual %v3bool %161 %165 + %167 = OpAll %bool %166 + OpBranch %159 + %159 = OpLabel + %168 = OpPhi %bool %false %148 %167 %158 + OpSelectionMerge %170 None + OpBranchConditional %168 %169 %170 + %169 = OpLabel + %171 = OpAccessChain %_ptr_Function_v3float %data %int_1 %int_2 %int_0 %int_1 %int_0 + %172 = OpLoad %v3float %171 + %177 = OpFOrdEqual %v3bool %172 %176 + %178 = OpAll %bool %177 + OpBranch %170 + %170 = OpLabel + %179 = OpPhi %bool %false %159 %178 %169 + OpSelectionMerge %181 None + OpBranchConditional %179 %180 %181 + %180 = OpLabel + %182 = OpAccessChain %_ptr_Function_v3float %data %int_1 %int_2 %int_0 %int_2 %int_0 + %183 = OpLoad %v3float %182 + %188 = OpFOrdEqual %v3bool %183 %187 + %189 = OpAll %bool %188 + OpBranch %181 + %181 = OpLabel + %190 = OpPhi %bool %false %170 %189 %180 + OpStore %ok %190 + OpSelectionMerge %195 None + OpBranchConditional %190 %193 %194 + %193 = OpLabel + %196 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %198 = OpLoad %v4float %196 + OpStore %191 %198 + OpBranch %195 + %194 = OpLabel + %199 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %200 = OpLoad %v4float %199 + OpStore %191 %200 + OpBranch %195 + %195 = OpLabel + %201 = OpLoad %v4float %191 + OpReturnValue %201 + OpFunctionEnd diff --git a/tests/sksl/shared/StructIndexStore.skrp b/tests/sksl/shared/StructIndexStore.skrp index 9a3fd6e882b7..03009d0cc32b 100644 --- a/tests/sksl/shared/StructIndexStore.skrp +++ b/tests/sksl/shared/StructIndexStore.skrp @@ -1,3 +1,34 @@ +106 instructions + +[immutable slots] +i0 = 0x3F800000 (1.0) +i1 = 0x41200000 (10.0) +i2 = 0x42C80000 (100.0) +i3 = 0x40000000 (2.0) +i4 = 0x41A00000 (20.0) +i5 = 0x43480000 (200.0) +i6 = 0x40400000 (3.0) +i7 = 0x41F00000 (30.0) +i8 = 0x43960000 (300.0) +i9 = 0x40800000 (4.0) +i10 = 0x42200000 (40.0) +i11 = 0x43C80000 (400.0) +i12 = 0x40A00000 (5.0) +i13 = 0x42480000 (50.0) +i14 = 0x43FA0000 (500.0) +i15 = 0x40C00000 (6.0) +i16 = 0x42700000 (60.0) +i17 = 0x44160000 (600.0) +i18 = 0x40E00000 (7.0) +i19 = 0x428C0000 (70.0) +i20 = 0x442F0000 (700.0) +i21 = 0x41000000 (8.0) +i22 = 0x42A00000 (80.0) +i23 = 0x44480000 (800.0) +i24 = 0x41100000 (9.0) +i25 = 0x42B40000 (90.0) +i26 = 0x44610000 (900.0) + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true splat_4_constants data.valueAtRoot, data.outer[0].inner[0].values = 0 @@ -13,9 +44,7 @@ label label 0x00000001 copy_constant j = 0 label label 0x00000003 copy_3_slots_unmasked $0..2 = values -copy_constant $3 = 0x3F800000 (1.0) -copy_constant $4 = 0x41200000 (10.0) -copy_constant $5 = 0x42C80000 (100.0) +copy_3_immutables_unmasked $3..5 = i0..2 [0x3F800000 (1.0), 0x41200000 (10.0), 0x42C80000 (100.0)] add_3_floats $0..2 += $3..5 copy_3_slots_unmasked values = $0..2 copy_constant k = 0 @@ -36,90 +65,72 @@ add_imm_int k += 0x00000001 copy_slot_unmasked $0 = k cmplt_imm_int $0 = lessThan($0, 0x00000003) stack_rewind -branch_if_no_active_lanes_eq branch -17 (label 5 at #22) if no lanes of $0 == 0 +branch_if_no_active_lanes_eq branch -17 (label 5 at #20) if no lanes of $0 == 0 label label 0x00000004 add_imm_int j += 0x00000001 copy_slot_unmasked $0 = j cmplt_imm_int $0 = lessThan($0, 0x00000003) stack_rewind -branch_if_no_active_lanes_eq branch -31 (label 3 at #14) if no lanes of $0 == 0 +branch_if_no_active_lanes_eq branch -29 (label 3 at #14) if no lanes of $0 == 0 label label 0x00000002 add_imm_int i += 0x00000001 copy_slot_unmasked $0 = i cmplt_imm_int $0 = lessThan($0, 0x00000003) stack_rewind -branch_if_no_active_lanes_eq branch -39 (label 1 at #12) if no lanes of $0 == 0 +branch_if_no_active_lanes_eq branch -37 (label 1 at #12) if no lanes of $0 == 0 label label 0 copy_slot_unmasked $0 = data.valueAtRoot cmpeq_imm_int $0 = equal($0, 0x000004D2) copy_3_slots_unmasked $1..3 = data.outer[0].inner[0].values -copy_constant $4 = 0x3F800000 (1.0) -copy_constant $5 = 0x41200000 (10.0) -copy_constant $6 = 0x42C80000 (100.0) +copy_3_immutables_unmasked $4..6 = i0..2 [0x3F800000 (1.0), 0x41200000 (10.0), 0x42C80000 (100.0)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_3_slots_unmasked $1..3 = data.outer[0].inner[1].values -copy_constant $4 = 0x40000000 (2.0) -copy_constant $5 = 0x41A00000 (20.0) -copy_constant $6 = 0x43480000 (200.0) +copy_3_immutables_unmasked $4..6 = i3..5 [0x40000000 (2.0), 0x41A00000 (20.0), 0x43480000 (200.0)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_3_slots_unmasked $1..3 = data.outer[0].inner[2].values -copy_constant $4 = 0x40400000 (3.0) -copy_constant $5 = 0x41F00000 (30.0) -copy_constant $6 = 0x43960000 (300.0) +copy_3_immutables_unmasked $4..6 = i6..8 [0x40400000 (3.0), 0x41F00000 (30.0), 0x43960000 (300.0)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_3_slots_unmasked $1..3 = data.outer[1].inner[0].values -copy_constant $4 = 0x40800000 (4.0) -copy_constant $5 = 0x42200000 (40.0) -copy_constant $6 = 0x43C80000 (400.0) +copy_3_immutables_unmasked $4..6 = i9..11 [0x40800000 (4.0), 0x42200000 (40.0), 0x43C80000 (400.0)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_3_slots_unmasked $1..3 = data.outer[1].inner[1].values -copy_constant $4 = 0x40A00000 (5.0) -copy_constant $5 = 0x42480000 (50.0) -copy_constant $6 = 0x43FA0000 (500.0) +copy_3_immutables_unmasked $4..6 = i12..14 [0x40A00000 (5.0), 0x42480000 (50.0), 0x43FA0000 (500.0)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_3_slots_unmasked $1..3 = data.outer[1].inner[2].values -copy_constant $4 = 0x40C00000 (6.0) -copy_constant $5 = 0x42700000 (60.0) -copy_constant $6 = 0x44160000 (600.0) +copy_3_immutables_unmasked $4..6 = i15..17 [0x40C00000 (6.0), 0x42700000 (60.0), 0x44160000 (600.0)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_3_slots_unmasked $1..3 = data.outer[2].inner[0].values -copy_constant $4 = 0x40E00000 (7.0) -copy_constant $5 = 0x428C0000 (70.0) -copy_constant $6 = 0x442F0000 (700.0) +copy_3_immutables_unmasked $4..6 = i18..20 [0x40E00000 (7.0), 0x428C0000 (70.0), 0x442F0000 (700.0)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_3_slots_unmasked $1..3 = data.outer[2].inner[1].values -copy_constant $4 = 0x41000000 (8.0) -copy_constant $5 = 0x42A00000 (80.0) -copy_constant $6 = 0x44480000 (800.0) +copy_3_immutables_unmasked $4..6 = i21..23 [0x41000000 (8.0), 0x42A00000 (80.0), 0x44480000 (800.0)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_3_slots_unmasked $1..3 = data.outer[2].inner[2].values -copy_constant $4 = 0x41100000 (9.0) -copy_constant $5 = 0x42B40000 (90.0) -copy_constant $6 = 0x44610000 (900.0) +copy_3_immutables_unmasked $4..6 = i24..26 [0x41100000 (9.0), 0x42B40000 (90.0), 0x44610000 (900.0)] cmpeq_3_floats $1..3 = equal($1..3, $4..6) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 diff --git a/tests/sksl/shared/StructIndexStore.wgsl b/tests/sksl/shared/StructIndexStore.wgsl index c6c0f580193e..3c1d4796e394 100644 --- a/tests/sksl/shared/StructIndexStore.wgsl +++ b/tests/sksl/shared/StructIndexStore.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -61,7 +62,7 @@ fn main(_skParam0: vec2) -> vec4 { } } } - var ok: bool = ((((((((data.valueAtRoot == 1234 && all(data.outer[0].inner[0].values == vec3(1.0, 10.0, 100.0))) && all(data.outer[0].inner[1].values == vec3(2.0, 20.0, 200.0))) && all(data.outer[0].inner[2].values == vec3(3.0, 30.0, 300.0))) && all(data.outer[1].inner[0].values == vec3(4.0, 40.0, 400.0))) && all(data.outer[1].inner[1].values == vec3(5.0, 50.0, 500.0))) && all(data.outer[1].inner[2].values == vec3(6.0, 60.0, 600.0))) && all(data.outer[2].inner[0].values == vec3(7.0, 70.0, 700.0))) && all(data.outer[2].inner[1].values == vec3(8.0, 80.0, 800.0))) && all(data.outer[2].inner[2].values == vec3(9.0, 90.0, 900.0)); + var ok: bool = (((((((((data.valueAtRoot == 1234) && all(data.outer[0].inner[0].values == vec3(1.0, 10.0, 100.0))) && all(data.outer[0].inner[1].values == vec3(2.0, 20.0, 200.0))) && all(data.outer[0].inner[2].values == vec3(3.0, 30.0, 300.0))) && all(data.outer[1].inner[0].values == vec3(4.0, 40.0, 400.0))) && all(data.outer[1].inner[1].values == vec3(5.0, 50.0, 500.0))) && all(data.outer[1].inner[2].values == vec3(6.0, 60.0, 600.0))) && all(data.outer[2].inner[0].values == vec3(7.0, 70.0, 700.0))) && all(data.outer[2].inner[1].values == vec3(8.0, 80.0, 800.0))) && all(data.outer[2].inner[2].values == vec3(9.0, 90.0, 900.0)); return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(ok)); } } diff --git a/tests/sksl/shared/StructMaxDepth.wgsl b/tests/sksl/shared/StructMaxDepth.wgsl new file mode 100644 index 000000000000..16f75996b8af --- /dev/null +++ b/tests/sksl/shared/StructMaxDepth.wgsl @@ -0,0 +1,63 @@ +### Compilation failed: + +error: :5:1 error: structures must have at least one member +struct FSOut { +^^^^^^ + + +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { +}; +struct S1 { + x: i32, +}; +struct S2 { + x: S1, +}; +struct S3 { + x: S2, +}; +struct S4 { + x: S3, +}; +struct S5 { + x: S4, +}; +struct S6 { + x: S5, +}; +struct S7 { + x: S6, +}; +struct S8 { + x: S7, +}; +struct SA1 { + x: array, +}; +struct SA2 { + x: array, +}; +struct SA3 { + x: array, +}; +struct SA4 { + x: array, +}; +struct SA5 { + x: array, +}; +struct SA6 { + x: array, +}; +struct SA7 { + x: array, +}; +struct SA8 { + x: array, +}; + +1 error diff --git a/tests/sksl/shared/Structs.asm.frag b/tests/sksl/shared/Structs.asm.frag index 2fa4991569a0..70a3da22e538 100644 --- a/tests/sksl/shared/Structs.asm.frag +++ b/tests/sksl/shared/Structs.asm.frag @@ -1,69 +1,69 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %A "A" -OpMemberName %A 0 "x" -OpMemberName %A 1 "y" -OpName %a1 "a1" -OpName %B "B" -OpMemberName %B 0 "x" -OpMemberName %B 1 "y" -OpMemberName %B 2 "z" -OpName %b1 "b1" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %A 0 Offset 0 -OpMemberDecorate %A 1 Offset 4 -OpDecorate %_arr_float_int_2 ArrayStride 16 -OpMemberDecorate %B 0 Offset 0 -OpMemberDecorate %B 1 Offset 16 -OpMemberDecorate %B 2 Offset 48 -OpMemberDecorate %B 2 RelaxedPrecision -OpDecorate %30 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %A "A" + OpMemberName %A 0 "x" + OpMemberName %A 1 "y" + OpName %a1 "a1" + OpName %B "B" + OpMemberName %B 0 "x" + OpMemberName %B 1 "y" + OpMemberName %B 2 "z" + OpName %b1 "b1" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %A 0 Offset 0 + OpMemberDecorate %A 1 Offset 4 + OpDecorate %_arr_float_int_2 ArrayStride 16 + OpMemberDecorate %B 0 Offset 0 + OpMemberDecorate %B 1 Offset 16 + OpMemberDecorate %B 2 Offset 48 + OpMemberDecorate %B 2 RelaxedPrecision + OpDecorate %30 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%int = OpTypeInt 32 1 -%A = OpTypeStruct %int %int + %int = OpTypeInt 32 1 + %A = OpTypeStruct %int %int %_ptr_Private_A = OpTypePointer Private %A -%a1 = OpVariable %_ptr_Private_A Private -%int_2 = OpConstant %int 2 + %a1 = OpVariable %_ptr_Private_A Private + %int_2 = OpConstant %int 2 %_arr_float_int_2 = OpTypeArray %float %int_2 -%B = OpTypeStruct %float %_arr_float_int_2 %A + %B = OpTypeStruct %float %_arr_float_int_2 %A %_ptr_Private_B = OpTypePointer Private %B -%b1 = OpVariable %_ptr_Private_B Private -%void = OpTypeVoid -%20 = OpTypeFunction %void -%int_0 = OpConstant %int 0 + %b1 = OpVariable %_ptr_Private_B Private + %void = OpTypeVoid + %20 = OpTypeFunction %void + %int_0 = OpConstant %int 0 %_ptr_Private_int = OpTypePointer Private %int -%float_0 = OpConstant %float 0 + %float_0 = OpConstant %float 0 %_ptr_Private_float = OpTypePointer Private %float %_ptr_Output_float = OpTypePointer Output %float -%main = OpFunction %void None %20 -%21 = OpLabel -%23 = OpAccessChain %_ptr_Private_int %a1 %int_0 -OpStore %23 %int_0 -%26 = OpAccessChain %_ptr_Private_float %b1 %int_0 -OpStore %26 %float_0 -%28 = OpAccessChain %_ptr_Private_int %a1 %int_0 -%29 = OpLoad %int %28 -%30 = OpConvertSToF %float %29 -%31 = OpAccessChain %_ptr_Private_float %b1 %int_0 -%32 = OpLoad %float %31 -%33 = OpFAdd %float %30 %32 -%34 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 -OpStore %34 %33 -OpReturn -OpFunctionEnd + %main = OpFunction %void None %20 + %21 = OpLabel + %23 = OpAccessChain %_ptr_Private_int %a1 %int_0 + OpStore %23 %int_0 + %26 = OpAccessChain %_ptr_Private_float %b1 %int_0 + OpStore %26 %float_0 + %28 = OpAccessChain %_ptr_Private_int %a1 %int_0 + %29 = OpLoad %int %28 + %30 = OpConvertSToF %float %29 + %31 = OpAccessChain %_ptr_Private_float %b1 %int_0 + %32 = OpLoad %float %31 + %33 = OpFAdd %float %30 %32 + %34 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 + OpStore %34 %33 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/Structs.wgsl b/tests/sksl/shared/Structs.wgsl index faa7da7d2538..012e195edca3 100644 --- a/tests/sksl/shared/Structs.wgsl +++ b/tests/sksl/shared/Structs.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/shared/StructsInFunctions.asm.frag b/tests/sksl/shared/StructsInFunctions.asm.frag index 2161068d17b4..4484dc2f92f5 100644 --- a/tests/sksl/shared/StructsInFunctions.asm.frag +++ b/tests/sksl/shared/StructsInFunctions.asm.frag @@ -1,404 +1,404 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorRed" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpName %_entrypoint_v "_entrypoint_v" -OpName %S "S" -OpMemberName %S 0 "x" -OpMemberName %S 1 "y" -OpName %returns_a_struct_S "returns_a_struct_S" -OpName %s "s" -OpName %constructs_a_struct_S "constructs_a_struct_S" -OpName %accepts_a_struct_fS "accepts_a_struct_fS" -OpName %modifies_a_struct_vS "modifies_a_struct_vS" -OpName %main "main" -OpName %s_0 "s" -OpName %x "x" -OpName %expected "expected" -OpName %Nested "Nested" -OpMemberName %Nested 0 "a" -OpMemberName %Nested 1 "b" -OpName %n1 "n1" -OpName %n2 "n2" -OpName %n3 "n3" -OpName %Compound "Compound" -OpMemberName %Compound 0 "f4" -OpMemberName %Compound 1 "i3" -OpName %c1 "c1" -OpName %c2 "c2" -OpName %c3 "c3" -OpName %valid "valid" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %14 Binding 0 -OpDecorate %14 DescriptorSet 0 -OpMemberDecorate %S 0 Offset 0 -OpMemberDecorate %S 1 Offset 4 -OpDecorate %41 RelaxedPrecision -OpMemberDecorate %Nested 0 Offset 0 -OpMemberDecorate %Nested 0 RelaxedPrecision -OpMemberDecorate %Nested 1 Offset 16 -OpMemberDecorate %Nested 1 RelaxedPrecision -OpDecorate %85 RelaxedPrecision -OpDecorate %87 RelaxedPrecision -OpDecorate %89 RelaxedPrecision -OpMemberDecorate %Compound 0 Offset 0 -OpMemberDecorate %Compound 1 Offset 16 -OpDecorate %108 RelaxedPrecision -OpDecorate %109 RelaxedPrecision -OpDecorate %114 RelaxedPrecision -OpDecorate %115 RelaxedPrecision -OpDecorate %137 RelaxedPrecision -OpDecorate %138 RelaxedPrecision -OpDecorate %149 RelaxedPrecision -OpDecorate %159 RelaxedPrecision -OpDecorate %171 RelaxedPrecision -OpDecorate %172 RelaxedPrecision -OpDecorate %195 RelaxedPrecision -OpDecorate %196 RelaxedPrecision -OpDecorate %219 RelaxedPrecision -OpDecorate %257 RelaxedPrecision -OpDecorate %259 RelaxedPrecision -OpDecorate %260 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorRed" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpName %_entrypoint_v "_entrypoint_v" + OpName %S "S" + OpMemberName %S 0 "x" + OpMemberName %S 1 "y" + OpName %returns_a_struct_S "returns_a_struct_S" + OpName %s "s" + OpName %constructs_a_struct_S "constructs_a_struct_S" + OpName %accepts_a_struct_fS "accepts_a_struct_fS" + OpName %modifies_a_struct_vS "modifies_a_struct_vS" + OpName %main "main" + OpName %s_0 "s" + OpName %x "x" + OpName %expected "expected" + OpName %Nested "Nested" + OpMemberName %Nested 0 "a" + OpMemberName %Nested 1 "b" + OpName %n1 "n1" + OpName %n2 "n2" + OpName %n3 "n3" + OpName %Compound "Compound" + OpMemberName %Compound 0 "f4" + OpMemberName %Compound 1 "i3" + OpName %c1 "c1" + OpName %c2 "c2" + OpName %c3 "c3" + OpName %valid "valid" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %14 Binding 0 + OpDecorate %14 DescriptorSet 0 + OpMemberDecorate %S 0 Offset 0 + OpMemberDecorate %S 1 Offset 4 + OpDecorate %41 RelaxedPrecision + OpMemberDecorate %Nested 0 Offset 0 + OpMemberDecorate %Nested 0 RelaxedPrecision + OpMemberDecorate %Nested 1 Offset 16 + OpMemberDecorate %Nested 1 RelaxedPrecision + OpDecorate %85 RelaxedPrecision + OpDecorate %87 RelaxedPrecision + OpDecorate %89 RelaxedPrecision + OpMemberDecorate %Compound 0 Offset 0 + OpMemberDecorate %Compound 1 Offset 16 + OpDecorate %108 RelaxedPrecision + OpDecorate %109 RelaxedPrecision + OpDecorate %114 RelaxedPrecision + OpDecorate %115 RelaxedPrecision + OpDecorate %137 RelaxedPrecision + OpDecorate %138 RelaxedPrecision + OpDecorate %149 RelaxedPrecision + OpDecorate %159 RelaxedPrecision + OpDecorate %171 RelaxedPrecision + OpDecorate %172 RelaxedPrecision + OpDecorate %195 RelaxedPrecision + OpDecorate %196 RelaxedPrecision + OpDecorate %219 RelaxedPrecision + OpDecorate %257 RelaxedPrecision + OpDecorate %259 RelaxedPrecision + OpDecorate %260 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%14 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%19 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%23 = OpConstantComposite %v2float %float_0 %float_0 + %14 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %19 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %23 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%int = OpTypeInt 32 1 -%S = OpTypeStruct %float %int -%29 = OpTypeFunction %S + %int = OpTypeInt 32 1 + %S = OpTypeStruct %float %int + %29 = OpTypeFunction %S %_ptr_Function_S = OpTypePointer Function %S -%float_1 = OpConstant %float 1 -%int_0 = OpConstant %int 0 + %float_1 = OpConstant %float 1 + %int_0 = OpConstant %int 0 %_ptr_Function_float = OpTypePointer Function %float -%int_2 = OpConstant %int 2 -%int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 + %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int -%float_2 = OpConstant %float 2 -%int_3 = OpConstant %int 3 -%46 = OpTypeFunction %float %_ptr_Function_S -%55 = OpTypeFunction %void %_ptr_Function_S -%64 = OpTypeFunction %v4float %_ptr_Function_v2float -%Nested = OpTypeStruct %S %S + %float_2 = OpConstant %float 2 + %int_3 = OpConstant %int 3 + %46 = OpTypeFunction %float %_ptr_Function_S + %55 = OpTypeFunction %void %_ptr_Function_S + %64 = OpTypeFunction %v4float %_ptr_Function_v2float + %Nested = OpTypeStruct %S %S %_ptr_Function_Nested = OpTypePointer Function %Nested -%v3int = OpTypeVector %int 3 -%Compound = OpTypeStruct %v4float %v3int + %v3int = OpTypeVector %int 3 + %Compound = OpTypeStruct %v4float %v3int %_ptr_Function_Compound = OpTypePointer Function %Compound -%float_3 = OpConstant %float 3 -%float_4 = OpConstant %float 4 -%99 = OpConstantComposite %v4float %float_1 %float_2 %float_3 %float_4 -%int_5 = OpConstant %int 5 -%int_6 = OpConstant %int 6 -%int_7 = OpConstant %int 7 -%103 = OpConstantComposite %v3int %int_5 %int_6 %int_7 + %float_3 = OpConstant %float 3 + %float_4 = OpConstant %float 4 + %99 = OpConstantComposite %v4float %float_1 %float_2 %float_3 %float_4 + %int_5 = OpConstant %int 5 + %int_6 = OpConstant %int 6 + %int_7 = OpConstant %int 7 + %103 = OpConstantComposite %v3int %int_5 %int_6 %int_7 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float %_ptr_Function_bool = OpTypePointer Function %bool -%false = OpConstantFalse %bool -%v4bool = OpTypeVector %bool 4 -%true = OpConstantTrue %bool + %false = OpConstantFalse %bool + %v4bool = OpTypeVector %bool 4 + %true = OpConstantTrue %bool %_ptr_Function_v4float = OpTypePointer Function %v4float %_entrypoint_v = OpFunction %void None %19 -%20 = OpLabel -%24 = OpVariable %_ptr_Function_v2float Function -OpStore %24 %23 -%26 = OpFunctionCall %v4float %main %24 -OpStore %sk_FragColor %26 -OpReturn -OpFunctionEnd + %20 = OpLabel + %24 = OpVariable %_ptr_Function_v2float Function + OpStore %24 %23 + %26 = OpFunctionCall %v4float %main %24 + OpStore %sk_FragColor %26 + OpReturn + OpFunctionEnd %returns_a_struct_S = OpFunction %S None %29 -%30 = OpLabel -%s = OpVariable %_ptr_Function_S Function -%35 = OpAccessChain %_ptr_Function_float %s %int_0 -OpStore %35 %float_1 -%39 = OpAccessChain %_ptr_Function_int %s %int_1 -OpStore %39 %int_2 -%41 = OpLoad %S %s -OpReturnValue %41 -OpFunctionEnd + %30 = OpLabel + %s = OpVariable %_ptr_Function_S Function + %35 = OpAccessChain %_ptr_Function_float %s %int_0 + OpStore %35 %float_1 + %39 = OpAccessChain %_ptr_Function_int %s %int_1 + OpStore %39 %int_2 + %41 = OpLoad %S %s + OpReturnValue %41 + OpFunctionEnd %constructs_a_struct_S = OpFunction %S None %29 -%42 = OpLabel -%45 = OpCompositeConstruct %S %float_2 %int_3 -OpReturnValue %45 -OpFunctionEnd + %42 = OpLabel + %45 = OpCompositeConstruct %S %float_2 %int_3 + OpReturnValue %45 + OpFunctionEnd %accepts_a_struct_fS = OpFunction %float None %46 -%47 = OpFunctionParameter %_ptr_Function_S -%48 = OpLabel -%49 = OpAccessChain %_ptr_Function_float %47 %int_0 -%50 = OpLoad %float %49 -%51 = OpAccessChain %_ptr_Function_int %47 %int_1 -%52 = OpLoad %int %51 -%53 = OpConvertSToF %float %52 -%54 = OpFAdd %float %50 %53 -OpReturnValue %54 -OpFunctionEnd + %47 = OpFunctionParameter %_ptr_Function_S + %48 = OpLabel + %49 = OpAccessChain %_ptr_Function_float %47 %int_0 + %50 = OpLoad %float %49 + %51 = OpAccessChain %_ptr_Function_int %47 %int_1 + %52 = OpLoad %int %51 + %53 = OpConvertSToF %float %52 + %54 = OpFAdd %float %50 %53 + OpReturnValue %54 + OpFunctionEnd %modifies_a_struct_vS = OpFunction %void None %55 -%56 = OpFunctionParameter %_ptr_Function_S -%57 = OpLabel -%58 = OpAccessChain %_ptr_Function_float %56 %int_0 -%59 = OpLoad %float %58 -%60 = OpFAdd %float %59 %float_1 -OpStore %58 %60 -%61 = OpAccessChain %_ptr_Function_int %56 %int_1 -%62 = OpLoad %int %61 -%63 = OpIAdd %int %62 %int_1 -OpStore %61 %63 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %64 -%65 = OpFunctionParameter %_ptr_Function_v2float -%66 = OpLabel -%s_0 = OpVariable %_ptr_Function_S Function -%x = OpVariable %_ptr_Function_float Function -%70 = OpVariable %_ptr_Function_S Function -%72 = OpVariable %_ptr_Function_S Function -%expected = OpVariable %_ptr_Function_S Function -%n1 = OpVariable %_ptr_Function_Nested Function -%n2 = OpVariable %_ptr_Function_Nested Function -%n3 = OpVariable %_ptr_Function_Nested Function -%90 = OpVariable %_ptr_Function_S Function -%c1 = OpVariable %_ptr_Function_Compound Function -%c2 = OpVariable %_ptr_Function_Compound Function -%c3 = OpVariable %_ptr_Function_Compound Function -%valid = OpVariable %_ptr_Function_bool Function -%251 = OpVariable %_ptr_Function_v4float Function -%68 = OpFunctionCall %S %returns_a_struct_S -OpStore %s_0 %68 -OpStore %70 %68 -%71 = OpFunctionCall %float %accepts_a_struct_fS %70 -OpStore %x %71 -OpStore %72 %68 -%73 = OpFunctionCall %void %modifies_a_struct_vS %72 -%74 = OpLoad %S %72 -OpStore %s_0 %74 -%76 = OpFunctionCall %S %constructs_a_struct_S -OpStore %expected %76 -%82 = OpFunctionCall %S %returns_a_struct_S -%83 = OpAccessChain %_ptr_Function_S %n1 %int_0 -OpStore %83 %82 -%84 = OpAccessChain %_ptr_Function_S %n1 %int_0 -%85 = OpLoad %S %84 -%86 = OpAccessChain %_ptr_Function_S %n1 %int_1 -OpStore %86 %85 -%87 = OpLoad %Nested %n1 -OpStore %n2 %87 -OpStore %n3 %87 -%88 = OpAccessChain %_ptr_Function_S %n3 %int_1 -%89 = OpLoad %S %88 -OpStore %90 %89 -%91 = OpFunctionCall %void %modifies_a_struct_vS %90 -%92 = OpLoad %S %90 -OpStore %88 %92 -%104 = OpCompositeConstruct %Compound %99 %103 -OpStore %c1 %104 -%106 = OpAccessChain %_ptr_Uniform_v4float %14 %int_1 -%108 = OpLoad %v4float %106 -%109 = OpCompositeExtract %float %108 1 -%110 = OpCompositeConstruct %v4float %109 %float_2 %float_3 %float_4 -%111 = OpCompositeConstruct %Compound %110 %103 -OpStore %c2 %111 -%113 = OpAccessChain %_ptr_Uniform_v4float %14 %int_1 -%114 = OpLoad %v4float %113 -%115 = OpCompositeExtract %float %114 0 -%116 = OpCompositeConstruct %v4float %115 %float_2 %float_3 %float_4 -%117 = OpCompositeConstruct %Compound %116 %103 -OpStore %c3 %117 -%121 = OpLoad %float %x -%122 = OpFOrdEqual %bool %121 %float_3 -OpSelectionMerge %124 None -OpBranchConditional %122 %123 %124 -%123 = OpLabel -%125 = OpAccessChain %_ptr_Function_float %s_0 %int_0 -%126 = OpLoad %float %125 -%127 = OpFOrdEqual %bool %126 %float_2 -OpBranch %124 -%124 = OpLabel -%128 = OpPhi %bool %false %66 %127 %123 -OpSelectionMerge %130 None -OpBranchConditional %128 %129 %130 -%129 = OpLabel -%131 = OpAccessChain %_ptr_Function_int %s_0 %int_1 -%132 = OpLoad %int %131 -%133 = OpIEqual %bool %132 %int_3 -OpBranch %130 -%130 = OpLabel -%134 = OpPhi %bool %false %124 %133 %129 -OpSelectionMerge %136 None -OpBranchConditional %134 %135 %136 -%135 = OpLabel -%137 = OpLoad %S %s_0 -%138 = OpLoad %S %expected -%139 = OpCompositeExtract %float %137 0 -%140 = OpCompositeExtract %float %138 0 -%141 = OpFOrdEqual %bool %139 %140 -%142 = OpCompositeExtract %int %137 1 -%143 = OpCompositeExtract %int %138 1 -%144 = OpIEqual %bool %142 %143 -%145 = OpLogicalAnd %bool %144 %141 -OpBranch %136 -%136 = OpLabel -%146 = OpPhi %bool %false %130 %145 %135 -OpSelectionMerge %148 None -OpBranchConditional %146 %147 %148 -%147 = OpLabel -%149 = OpLoad %S %s_0 -%150 = OpCompositeConstruct %S %float_2 %int_3 -%151 = OpCompositeExtract %float %149 0 -%152 = OpFOrdEqual %bool %151 %float_2 -%153 = OpCompositeExtract %int %149 1 -%154 = OpIEqual %bool %153 %int_3 -%155 = OpLogicalAnd %bool %154 %152 -OpBranch %148 -%148 = OpLabel -%156 = OpPhi %bool %false %136 %155 %147 -OpSelectionMerge %158 None -OpBranchConditional %156 %157 %158 -%157 = OpLabel -%159 = OpLoad %S %s_0 -%160 = OpFunctionCall %S %returns_a_struct_S -%161 = OpCompositeExtract %float %159 0 -%162 = OpCompositeExtract %float %160 0 -%163 = OpFUnordNotEqual %bool %161 %162 -%164 = OpCompositeExtract %int %159 1 -%165 = OpCompositeExtract %int %160 1 -%166 = OpINotEqual %bool %164 %165 -%167 = OpLogicalOr %bool %166 %163 -OpBranch %158 -%158 = OpLabel -%168 = OpPhi %bool %false %148 %167 %157 -OpSelectionMerge %170 None -OpBranchConditional %168 %169 %170 -%169 = OpLabel -%171 = OpLoad %Nested %n1 -%172 = OpLoad %Nested %n2 -%173 = OpCompositeExtract %S %171 0 -%174 = OpCompositeExtract %S %172 0 -%175 = OpCompositeExtract %float %173 0 -%176 = OpCompositeExtract %float %174 0 -%177 = OpFOrdEqual %bool %175 %176 -%178 = OpCompositeExtract %int %173 1 -%179 = OpCompositeExtract %int %174 1 -%180 = OpIEqual %bool %178 %179 -%181 = OpLogicalAnd %bool %180 %177 -%182 = OpCompositeExtract %S %171 1 -%183 = OpCompositeExtract %S %172 1 -%184 = OpCompositeExtract %float %182 0 -%185 = OpCompositeExtract %float %183 0 -%186 = OpFOrdEqual %bool %184 %185 -%187 = OpCompositeExtract %int %182 1 -%188 = OpCompositeExtract %int %183 1 -%189 = OpIEqual %bool %187 %188 -%190 = OpLogicalAnd %bool %189 %186 -%191 = OpLogicalAnd %bool %190 %181 -OpBranch %170 -%170 = OpLabel -%192 = OpPhi %bool %false %158 %191 %169 -OpSelectionMerge %194 None -OpBranchConditional %192 %193 %194 -%193 = OpLabel -%195 = OpLoad %Nested %n1 -%196 = OpLoad %Nested %n3 -%197 = OpCompositeExtract %S %195 0 -%198 = OpCompositeExtract %S %196 0 -%199 = OpCompositeExtract %float %197 0 -%200 = OpCompositeExtract %float %198 0 -%201 = OpFUnordNotEqual %bool %199 %200 -%202 = OpCompositeExtract %int %197 1 -%203 = OpCompositeExtract %int %198 1 -%204 = OpINotEqual %bool %202 %203 -%205 = OpLogicalOr %bool %204 %201 -%206 = OpCompositeExtract %S %195 1 -%207 = OpCompositeExtract %S %196 1 -%208 = OpCompositeExtract %float %206 0 -%209 = OpCompositeExtract %float %207 0 -%210 = OpFUnordNotEqual %bool %208 %209 -%211 = OpCompositeExtract %int %206 1 -%212 = OpCompositeExtract %int %207 1 -%213 = OpINotEqual %bool %211 %212 -%214 = OpLogicalOr %bool %213 %210 -%215 = OpLogicalOr %bool %214 %205 -OpBranch %194 -%194 = OpLabel -%216 = OpPhi %bool %false %170 %215 %193 -OpSelectionMerge %218 None -OpBranchConditional %216 %217 %218 -%217 = OpLabel -%219 = OpLoad %Nested %n3 -%220 = OpCompositeConstruct %S %float_1 %int_2 -%221 = OpCompositeConstruct %S %float_2 %int_3 -%222 = OpCompositeConstruct %Nested %220 %221 -%223 = OpCompositeExtract %S %219 0 -%224 = OpCompositeExtract %float %223 0 -%225 = OpFOrdEqual %bool %224 %float_1 -%226 = OpCompositeExtract %int %223 1 -%227 = OpIEqual %bool %226 %int_2 -%228 = OpLogicalAnd %bool %227 %225 -%229 = OpCompositeExtract %S %219 1 -%230 = OpCompositeExtract %float %229 0 -%231 = OpFOrdEqual %bool %230 %float_2 -%232 = OpCompositeExtract %int %229 1 -%233 = OpIEqual %bool %232 %int_3 -%234 = OpLogicalAnd %bool %233 %231 -%235 = OpLogicalAnd %bool %234 %228 -OpBranch %218 -%218 = OpLabel -%236 = OpPhi %bool %false %194 %235 %217 -OpSelectionMerge %238 None -OpBranchConditional %236 %237 %238 -%237 = OpLabel -%239 = OpFOrdEqual %v4bool %99 %110 -%241 = OpAll %bool %239 -%243 = OpLogicalAnd %bool %true %241 -OpBranch %238 -%238 = OpLabel -%244 = OpPhi %bool %false %218 %243 %237 -OpSelectionMerge %246 None -OpBranchConditional %244 %245 %246 -%245 = OpLabel -%247 = OpFUnordNotEqual %v4bool %110 %116 -%248 = OpAny %bool %247 -%249 = OpLogicalOr %bool %false %248 -OpBranch %246 -%246 = OpLabel -%250 = OpPhi %bool %false %238 %249 %245 -OpStore %valid %250 -OpSelectionMerge %255 None -OpBranchConditional %250 %253 %254 -%253 = OpLabel -%256 = OpAccessChain %_ptr_Uniform_v4float %14 %int_1 -%257 = OpLoad %v4float %256 -OpStore %251 %257 -OpBranch %255 -%254 = OpLabel -%258 = OpAccessChain %_ptr_Uniform_v4float %14 %int_0 -%259 = OpLoad %v4float %258 -OpStore %251 %259 -OpBranch %255 -%255 = OpLabel -%260 = OpLoad %v4float %251 -OpReturnValue %260 -OpFunctionEnd + %56 = OpFunctionParameter %_ptr_Function_S + %57 = OpLabel + %58 = OpAccessChain %_ptr_Function_float %56 %int_0 + %59 = OpLoad %float %58 + %60 = OpFAdd %float %59 %float_1 + OpStore %58 %60 + %61 = OpAccessChain %_ptr_Function_int %56 %int_1 + %62 = OpLoad %int %61 + %63 = OpIAdd %int %62 %int_1 + OpStore %61 %63 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %64 + %65 = OpFunctionParameter %_ptr_Function_v2float + %66 = OpLabel + %s_0 = OpVariable %_ptr_Function_S Function + %x = OpVariable %_ptr_Function_float Function + %70 = OpVariable %_ptr_Function_S Function + %72 = OpVariable %_ptr_Function_S Function + %expected = OpVariable %_ptr_Function_S Function + %n1 = OpVariable %_ptr_Function_Nested Function + %n2 = OpVariable %_ptr_Function_Nested Function + %n3 = OpVariable %_ptr_Function_Nested Function + %90 = OpVariable %_ptr_Function_S Function + %c1 = OpVariable %_ptr_Function_Compound Function + %c2 = OpVariable %_ptr_Function_Compound Function + %c3 = OpVariable %_ptr_Function_Compound Function + %valid = OpVariable %_ptr_Function_bool Function + %251 = OpVariable %_ptr_Function_v4float Function + %68 = OpFunctionCall %S %returns_a_struct_S + OpStore %s_0 %68 + OpStore %70 %68 + %71 = OpFunctionCall %float %accepts_a_struct_fS %70 + OpStore %x %71 + OpStore %72 %68 + %73 = OpFunctionCall %void %modifies_a_struct_vS %72 + %74 = OpLoad %S %72 + OpStore %s_0 %74 + %76 = OpFunctionCall %S %constructs_a_struct_S + OpStore %expected %76 + %82 = OpFunctionCall %S %returns_a_struct_S + %83 = OpAccessChain %_ptr_Function_S %n1 %int_0 + OpStore %83 %82 + %84 = OpAccessChain %_ptr_Function_S %n1 %int_0 + %85 = OpLoad %S %84 + %86 = OpAccessChain %_ptr_Function_S %n1 %int_1 + OpStore %86 %85 + %87 = OpLoad %Nested %n1 + OpStore %n2 %87 + OpStore %n3 %87 + %88 = OpAccessChain %_ptr_Function_S %n3 %int_1 + %89 = OpLoad %S %88 + OpStore %90 %89 + %91 = OpFunctionCall %void %modifies_a_struct_vS %90 + %92 = OpLoad %S %90 + OpStore %88 %92 + %104 = OpCompositeConstruct %Compound %99 %103 + OpStore %c1 %104 + %106 = OpAccessChain %_ptr_Uniform_v4float %14 %int_1 + %108 = OpLoad %v4float %106 + %109 = OpCompositeExtract %float %108 1 + %110 = OpCompositeConstruct %v4float %109 %float_2 %float_3 %float_4 + %111 = OpCompositeConstruct %Compound %110 %103 + OpStore %c2 %111 + %113 = OpAccessChain %_ptr_Uniform_v4float %14 %int_1 + %114 = OpLoad %v4float %113 + %115 = OpCompositeExtract %float %114 0 + %116 = OpCompositeConstruct %v4float %115 %float_2 %float_3 %float_4 + %117 = OpCompositeConstruct %Compound %116 %103 + OpStore %c3 %117 + %121 = OpLoad %float %x + %122 = OpFOrdEqual %bool %121 %float_3 + OpSelectionMerge %124 None + OpBranchConditional %122 %123 %124 + %123 = OpLabel + %125 = OpAccessChain %_ptr_Function_float %s_0 %int_0 + %126 = OpLoad %float %125 + %127 = OpFOrdEqual %bool %126 %float_2 + OpBranch %124 + %124 = OpLabel + %128 = OpPhi %bool %false %66 %127 %123 + OpSelectionMerge %130 None + OpBranchConditional %128 %129 %130 + %129 = OpLabel + %131 = OpAccessChain %_ptr_Function_int %s_0 %int_1 + %132 = OpLoad %int %131 + %133 = OpIEqual %bool %132 %int_3 + OpBranch %130 + %130 = OpLabel + %134 = OpPhi %bool %false %124 %133 %129 + OpSelectionMerge %136 None + OpBranchConditional %134 %135 %136 + %135 = OpLabel + %137 = OpLoad %S %s_0 + %138 = OpLoad %S %expected + %139 = OpCompositeExtract %float %137 0 + %140 = OpCompositeExtract %float %138 0 + %141 = OpFOrdEqual %bool %139 %140 + %142 = OpCompositeExtract %int %137 1 + %143 = OpCompositeExtract %int %138 1 + %144 = OpIEqual %bool %142 %143 + %145 = OpLogicalAnd %bool %144 %141 + OpBranch %136 + %136 = OpLabel + %146 = OpPhi %bool %false %130 %145 %135 + OpSelectionMerge %148 None + OpBranchConditional %146 %147 %148 + %147 = OpLabel + %149 = OpLoad %S %s_0 + %150 = OpCompositeConstruct %S %float_2 %int_3 + %151 = OpCompositeExtract %float %149 0 + %152 = OpFOrdEqual %bool %151 %float_2 + %153 = OpCompositeExtract %int %149 1 + %154 = OpIEqual %bool %153 %int_3 + %155 = OpLogicalAnd %bool %154 %152 + OpBranch %148 + %148 = OpLabel + %156 = OpPhi %bool %false %136 %155 %147 + OpSelectionMerge %158 None + OpBranchConditional %156 %157 %158 + %157 = OpLabel + %159 = OpLoad %S %s_0 + %160 = OpFunctionCall %S %returns_a_struct_S + %161 = OpCompositeExtract %float %159 0 + %162 = OpCompositeExtract %float %160 0 + %163 = OpFUnordNotEqual %bool %161 %162 + %164 = OpCompositeExtract %int %159 1 + %165 = OpCompositeExtract %int %160 1 + %166 = OpINotEqual %bool %164 %165 + %167 = OpLogicalOr %bool %166 %163 + OpBranch %158 + %158 = OpLabel + %168 = OpPhi %bool %false %148 %167 %157 + OpSelectionMerge %170 None + OpBranchConditional %168 %169 %170 + %169 = OpLabel + %171 = OpLoad %Nested %n1 + %172 = OpLoad %Nested %n2 + %173 = OpCompositeExtract %S %171 0 + %174 = OpCompositeExtract %S %172 0 + %175 = OpCompositeExtract %float %173 0 + %176 = OpCompositeExtract %float %174 0 + %177 = OpFOrdEqual %bool %175 %176 + %178 = OpCompositeExtract %int %173 1 + %179 = OpCompositeExtract %int %174 1 + %180 = OpIEqual %bool %178 %179 + %181 = OpLogicalAnd %bool %180 %177 + %182 = OpCompositeExtract %S %171 1 + %183 = OpCompositeExtract %S %172 1 + %184 = OpCompositeExtract %float %182 0 + %185 = OpCompositeExtract %float %183 0 + %186 = OpFOrdEqual %bool %184 %185 + %187 = OpCompositeExtract %int %182 1 + %188 = OpCompositeExtract %int %183 1 + %189 = OpIEqual %bool %187 %188 + %190 = OpLogicalAnd %bool %189 %186 + %191 = OpLogicalAnd %bool %190 %181 + OpBranch %170 + %170 = OpLabel + %192 = OpPhi %bool %false %158 %191 %169 + OpSelectionMerge %194 None + OpBranchConditional %192 %193 %194 + %193 = OpLabel + %195 = OpLoad %Nested %n1 + %196 = OpLoad %Nested %n3 + %197 = OpCompositeExtract %S %195 0 + %198 = OpCompositeExtract %S %196 0 + %199 = OpCompositeExtract %float %197 0 + %200 = OpCompositeExtract %float %198 0 + %201 = OpFUnordNotEqual %bool %199 %200 + %202 = OpCompositeExtract %int %197 1 + %203 = OpCompositeExtract %int %198 1 + %204 = OpINotEqual %bool %202 %203 + %205 = OpLogicalOr %bool %204 %201 + %206 = OpCompositeExtract %S %195 1 + %207 = OpCompositeExtract %S %196 1 + %208 = OpCompositeExtract %float %206 0 + %209 = OpCompositeExtract %float %207 0 + %210 = OpFUnordNotEqual %bool %208 %209 + %211 = OpCompositeExtract %int %206 1 + %212 = OpCompositeExtract %int %207 1 + %213 = OpINotEqual %bool %211 %212 + %214 = OpLogicalOr %bool %213 %210 + %215 = OpLogicalOr %bool %214 %205 + OpBranch %194 + %194 = OpLabel + %216 = OpPhi %bool %false %170 %215 %193 + OpSelectionMerge %218 None + OpBranchConditional %216 %217 %218 + %217 = OpLabel + %219 = OpLoad %Nested %n3 + %220 = OpCompositeConstruct %S %float_1 %int_2 + %221 = OpCompositeConstruct %S %float_2 %int_3 + %222 = OpCompositeConstruct %Nested %220 %221 + %223 = OpCompositeExtract %S %219 0 + %224 = OpCompositeExtract %float %223 0 + %225 = OpFOrdEqual %bool %224 %float_1 + %226 = OpCompositeExtract %int %223 1 + %227 = OpIEqual %bool %226 %int_2 + %228 = OpLogicalAnd %bool %227 %225 + %229 = OpCompositeExtract %S %219 1 + %230 = OpCompositeExtract %float %229 0 + %231 = OpFOrdEqual %bool %230 %float_2 + %232 = OpCompositeExtract %int %229 1 + %233 = OpIEqual %bool %232 %int_3 + %234 = OpLogicalAnd %bool %233 %231 + %235 = OpLogicalAnd %bool %234 %228 + OpBranch %218 + %218 = OpLabel + %236 = OpPhi %bool %false %194 %235 %217 + OpSelectionMerge %238 None + OpBranchConditional %236 %237 %238 + %237 = OpLabel + %239 = OpFOrdEqual %v4bool %99 %110 + %241 = OpAll %bool %239 + %243 = OpLogicalAnd %bool %true %241 + OpBranch %238 + %238 = OpLabel + %244 = OpPhi %bool %false %218 %243 %237 + OpSelectionMerge %246 None + OpBranchConditional %244 %245 %246 + %245 = OpLabel + %247 = OpFUnordNotEqual %v4bool %110 %116 + %248 = OpAny %bool %247 + %249 = OpLogicalOr %bool %false %248 + OpBranch %246 + %246 = OpLabel + %250 = OpPhi %bool %false %238 %249 %245 + OpStore %valid %250 + OpSelectionMerge %255 None + OpBranchConditional %250 %253 %254 + %253 = OpLabel + %256 = OpAccessChain %_ptr_Uniform_v4float %14 %int_1 + %257 = OpLoad %v4float %256 + OpStore %251 %257 + OpBranch %255 + %254 = OpLabel + %258 = OpAccessChain %_ptr_Uniform_v4float %14 %int_0 + %259 = OpLoad %v4float %258 + OpStore %251 %259 + OpBranch %255 + %255 = OpLabel + %260 = OpLoad %v4float %251 + OpReturnValue %260 + OpFunctionEnd diff --git a/tests/sksl/shared/StructsInFunctions.metal b/tests/sksl/shared/StructsInFunctions.metal index 59f63d89854f..1e3fd0c43bb4 100644 --- a/tests/sksl/shared/StructsInFunctions.metal +++ b/tests/sksl/shared/StructsInFunctions.metal @@ -31,18 +31,6 @@ thread bool operator!=(thread const Nested& left, thread const Nested& right); thread bool operator==(thread const Compound& left, thread const Compound& right); thread bool operator!=(thread const Compound& left, thread const Compound& right); -void modifies_a_struct_vS(thread S& s); -void _skOutParamHelper0_modifies_a_struct_vS(thread S& s) { - S _var0 = s; - modifies_a_struct_vS(_var0); - s = _var0; -} -void modifies_a_struct_vS(thread S& s); -void _skOutParamHelper1_modifies_a_struct_vS(thread Nested& n3) { - S _var0 = n3.b; - modifies_a_struct_vS(_var0); - n3.b = _var0; -} thread bool operator==(thread const S& left, thread const S& right) { return all(left.x == right.x) && all(left.y == right.y); @@ -83,9 +71,11 @@ void modifies_a_struct_vS(thread S& s) { fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) { Outputs _out; (void)_out; + S _skTemp0; + S _skTemp1; S s = returns_a_struct_S(); float x = accepts_a_struct_fS(s); - _skOutParamHelper0_modifies_a_struct_vS(s); + ((modifies_a_struct_vS((_skTemp0 = s))), (s = _skTemp0)); S expected = constructs_a_struct_S(); Nested n1; Nested n2; @@ -94,7 +84,7 @@ fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _unifo n1.b = n1.a; n2 = n1; n3 = n2; - _skOutParamHelper1_modifies_a_struct_vS(n3); + ((modifies_a_struct_vS((_skTemp1 = n3.b))), (n3.b = _skTemp1)); Compound c1 = Compound{float4(1.0, 2.0, 3.0, 4.0), int3(5, 6, 7)}; Compound c2 = Compound{float4(float(_uniforms.colorGreen.y), 2.0, 3.0, 4.0), int3(5, 6, 7)}; Compound c3 = Compound{float4(float(_uniforms.colorGreen.x), 2.0, 3.0, 4.0), int3(5, 6, 7)}; diff --git a/tests/sksl/shared/StructsInFunctions.skrp b/tests/sksl/shared/StructsInFunctions.skrp index 4fa8a773fbac..30eda351c5a0 100644 --- a/tests/sksl/shared/StructsInFunctions.skrp +++ b/tests/sksl/shared/StructsInFunctions.skrp @@ -1,11 +1,19 @@ +166 instructions + [immutable slots] -c1.f4(0) = 0x3F800000 (1.0) -c1.f4(1) = 0x40000000 (2.0) -c1.f4(2) = 0x40400000 (3.0) -c1.f4(3) = 0x40800000 (4.0) -c1.i3(0) = 0x00000005 (7.006492e-45) -c1.i3(1) = 0x00000006 (8.407791e-45) -c1.i3(2) = 0x00000007 (9.809089e-45) +i0 = 0x40000000 (2.0) +i1 = 0x00000003 (4.203895e-45) +i2 = 0x3F800000 (1.0) +i3 = 0x40000000 (2.0) +i4 = 0x40400000 (3.0) +i5 = 0x40800000 (4.0) +i6 = 0x00000005 (7.006492e-45) +i7 = 0x00000006 (8.407791e-45) +i8 = 0x00000007 (9.809089e-45) +i9 = 0x3F800000 (1.0) +i10 = 0x00000002 (2.802597e-45) +i11 = 0x40000000 (2.0) +i12 = 0x00000003 (4.203895e-45) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -25,8 +33,7 @@ add_imm_float s.x₃ += 0x3F800000 (1.0) add_imm_int s.y₃ += 0x00000001 copy_2_slots_unmasked s.x₁, s.y₁ = s.x₃, s.y₃ label label 0x00000002 -copy_constant $0 = 0x40000000 (2.0) -copy_constant $1 = 0x00000003 (4.203895e-45) +copy_2_immutables_unmasked $0..1 = i0..1 [0x40000000 (2.0), 0x00000003 (4.203895e-45)] label label 0x00000003 copy_2_slots_unmasked expected.x, expected.y = $0..1 splat_4_constants n1.a.x, n1.a.y, n1.b.x, n1.b.y = 0 @@ -50,16 +57,12 @@ copy_uniform c2.f4(0) = colorGreen(1) copy_constant c2.f4(1) = 0x40000000 (2.0) copy_constant c2.f4(2) = 0x40400000 (3.0) copy_constant c2.f4(3) = 0x40800000 (4.0) -copy_constant c2.i3(0) = 0x00000005 (7.006492e-45) -copy_constant c2.i3(1) = 0x00000006 (8.407791e-45) -copy_constant c2.i3(2) = 0x00000007 (9.809089e-45) +copy_3_immutables_unmasked c2.i3 = i6..8 [0x00000005 (7.006492e-45), 0x00000006 (8.407791e-45), 0x00000007 (9.809089e-45)] copy_uniform c3.f4(0) = colorGreen(0) copy_constant c3.f4(1) = 0x40000000 (2.0) copy_constant c3.f4(2) = 0x40400000 (3.0) copy_constant c3.f4(3) = 0x40800000 (4.0) -copy_constant c3.i3(0) = 0x00000005 (7.006492e-45) -copy_constant c3.i3(1) = 0x00000006 (8.407791e-45) -copy_constant c3.i3(2) = 0x00000007 (9.809089e-45) +copy_3_immutables_unmasked c3.i3 = i6..8 [0x00000005 (7.006492e-45), 0x00000006 (8.407791e-45), 0x00000007 (9.809089e-45)] store_condition_mask $12 = CondMask copy_slot_unmasked $13 = x cmpeq_imm_float $13 = equal($13, 0x40400000 (3.0)) @@ -78,8 +81,7 @@ cmpeq_int $15 = equal($15, $16) bitwise_and_int $14 &= $15 bitwise_and_int $13 &= $14 copy_slot_unmasked $14 = s.x₁ -copy_constant $17 = 0x40000000 (2.0) -copy_constant $18 = 0x00000003 (4.203895e-45) +copy_2_immutables_unmasked $17..18 = i0..1 [0x40000000 (2.0), 0x00000003 (4.203895e-45)] copy_slot_unmasked $15 = $17 cmpeq_float $14 = equal($14, $15) copy_slot_unmasked $15 = s.y₁ @@ -89,9 +91,9 @@ bitwise_and_int $14 &= $15 bitwise_and_int $13 &= $14 copy_constant $0 = 0 merge_condition_mask CondMask = $12 & $13 -branch_if_no_lanes_active branch_if_no_lanes_active +17 (label 6 at #100) +branch_if_no_lanes_active branch_if_no_lanes_active +17 (label 6 at #94) copy_slot_unmasked $1 = s.x₁ -branch_if_no_lanes_active branch_if_no_lanes_active +7 (label 7 at #92) +branch_if_no_lanes_active branch_if_no_lanes_active +7 (label 7 at #86) splat_2_constants s.x, s.y = 0 copy_constant $17 = 0x3F800000 (1.0) copy_slot_masked s.x = Mask($17) @@ -141,10 +143,7 @@ bitwise_or_int $2 |= $3 bitwise_or_int $1 |= $2 bitwise_and_int $0 &= $1 copy_slot_unmasked $1 = n3.a.x -copy_constant $12 = 0x3F800000 (1.0) -copy_constant $13 = 0x00000002 (2.802597e-45) -copy_constant $14 = 0x40000000 (2.0) -copy_constant $15 = 0x00000003 (4.203895e-45) +copy_4_immutables_unmasked $12..15 = i9..12 [0x3F800000 (1.0), 0x00000002 (2.802597e-45), 0x40000000 (2.0), 0x00000003 (4.203895e-45)] copy_slot_unmasked $2 = $12 cmpeq_float $1 = equal($1, $2) copy_slot_unmasked $2 = n3.a.y @@ -160,12 +159,12 @@ cmpeq_int $3 = equal($3, $4) bitwise_and_int $2 &= $3 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_4_slots_unmasked $1..4 = c1.f4 +copy_4_immutables_unmasked $1..4 = i2..5 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0), 0x40800000 (4.0)] copy_4_slots_unmasked $5..8 = c2.f4 cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 -copy_3_slots_unmasked $2..4 = c1.i3 +copy_3_immutables_unmasked $2..4 = i6..8 [0x00000005 (7.006492e-45), 0x00000006 (8.407791e-45), 0x00000007 (9.809089e-45)] copy_3_slots_unmasked $5..7 = c2.i3 cmpeq_3_ints $2..4 = equal($2..4, $5..7) bitwise_and_int $3 &= $4 diff --git a/tests/sksl/shared/StructsInFunctions.wgsl b/tests/sksl/shared/StructsInFunctions.wgsl index c1e155af96bd..fea3c9b8a657 100644 --- a/tests/sksl/shared/StructsInFunctions.wgsl +++ b/tests/sksl/shared/StructsInFunctions.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -76,15 +77,15 @@ fn main(_skParam0: vec2) -> vec4 { var c3: Compound = Compound(vec4(f32(_globalUniforms.colorGreen.x), 2.0, 3.0, 4.0), vec3(5, 6, 7)); var _skTemp6: bool; let _skTemp7 = S(2.0, 3); - if (((x == 3.0 && s.x == 2.0) && s.y == 3) && (s.x == expected.x && s.y == expected.y)) && (s.x == _skTemp7.x && s.y == _skTemp7.y) { + if ((((x == 3.0) && (s.x == 2.0)) && (s.y == 3)) && ((s.x == expected.x) && (s.y == expected.y))) && ((s.x == _skTemp7.x) && (s.y == _skTemp7.y)) { let _skTemp8 = returns_a_struct_S(); let _skTemp9 = _skTemp8; - _skTemp6 = (s.x != _skTemp9.x || s.y != _skTemp9.y); + _skTemp6 = ((s.x != _skTemp9.x) || (s.y != _skTemp9.y)); } else { _skTemp6 = false; } let _skTemp10 = Nested(S(1.0, 2), S(2.0, 3)); - var valid: bool = ((((_skTemp6 && ((n1.a.x == n2.a.x && n1.a.y == n2.a.y) && (n1.b.x == n2.b.x && n1.b.y == n2.b.y))) && ((n1.a.x != n3.a.x || n1.a.y != n3.a.y) || (n1.b.x != n3.b.x || n1.b.y != n3.b.y))) && ((n3.a.x == _skTemp10.a.x && n3.a.y == _skTemp10.a.y) && (n3.b.x == _skTemp10.b.x && n3.b.y == _skTemp10.b.y))) && (all(c1.f4 == c2.f4) && all(c1.i3 == c2.i3))) && (any(c2.f4 != c3.f4) || any(c2.i3 != c3.i3)); + var valid: bool = ((((_skTemp6 && (((n1.a.x == n2.a.x) && (n1.a.y == n2.a.y)) && ((n1.b.x == n2.b.x) && (n1.b.y == n2.b.y)))) && (((n1.a.x != n3.a.x) || (n1.a.y != n3.a.y)) || ((n1.b.x != n3.b.x) || (n1.b.y != n3.b.y)))) && (((n3.a.x == _skTemp10.a.x) && (n3.a.y == _skTemp10.a.y)) && ((n3.b.x == _skTemp10.b.x) && (n3.b.y == _skTemp10.b.y)))) && (all(c1.f4 == c2.f4) && all(c1.i3 == c2.i3))) && (any(c2.f4 != c3.f4) || any(c2.i3 != c3.i3)); return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(valid)); } } diff --git a/tests/sksl/shared/Switch.asm.frag b/tests/sksl/shared/Switch.asm.frag index f9a1e1978b65..0e7d7fa58222 100644 --- a/tests/sksl/shared/Switch.asm.frag +++ b/tests/sksl/shared/Switch.asm.frag @@ -1,90 +1,90 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %color "color" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %color RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %45 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %color "color" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %color RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %45 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%color = OpVariable %_ptr_Function_v4float Function -%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %28 -%33 = OpCompositeExtract %float %32 1 -%34 = OpConvertFToS %int %33 -OpSelectionMerge %35 None -OpSwitch %34 %38 0 %36 1 %37 -%36 = OpLabel -%39 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%41 = OpLoad %v4float %39 -OpStore %color %41 -OpBranch %35 -%37 = OpLabel -%42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%43 = OpLoad %v4float %42 -OpStore %color %43 -OpBranch %35 -%38 = OpLabel -%44 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%45 = OpLoad %v4float %44 -OpStore %color %45 -OpBranch %35 -%35 = OpLabel -%46 = OpLoad %v4float %color -OpReturnValue %46 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %color = OpVariable %_ptr_Function_v4float Function + %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %28 + %33 = OpCompositeExtract %float %32 1 + %34 = OpConvertFToS %int %33 + OpSelectionMerge %35 None + OpSwitch %34 %38 0 %36 1 %37 + %36 = OpLabel + %39 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %41 = OpLoad %v4float %39 + OpStore %color %41 + OpBranch %35 + %37 = OpLabel + %42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %43 = OpLoad %v4float %42 + OpStore %color %43 + OpBranch %35 + %38 = OpLabel + %44 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %45 = OpLoad %v4float %44 + OpStore %color %45 + OpBranch %35 + %35 = OpLabel + %46 = OpLoad %v4float %color + OpReturnValue %46 + OpFunctionEnd diff --git a/tests/sksl/shared/SwitchDefaultOnly.asm.frag b/tests/sksl/shared/SwitchDefaultOnly.asm.frag index 9e437bf40013..d6c55d2e6451 100644 --- a/tests/sksl/shared/SwitchDefaultOnly.asm.frag +++ b/tests/sksl/shared/SwitchDefaultOnly.asm.frag @@ -1,70 +1,70 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %30 RelaxedPrecision -OpDecorate %31 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %30 RelaxedPrecision + OpDecorate %31 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%26 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%30 = OpLoad %v4float %26 -%31 = OpCompositeExtract %float %30 1 -%32 = OpConvertFToS %int %31 -OpSelectionMerge %33 None -OpSwitch %32 %34 -%34 = OpLabel -%35 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%36 = OpLoad %v4float %35 -OpReturnValue %36 -%33 = OpLabel -OpUnreachable -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %26 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %30 = OpLoad %v4float %26 + %31 = OpCompositeExtract %float %30 1 + %32 = OpConvertFToS %int %31 + OpSelectionMerge %33 None + OpSwitch %32 %34 + %34 = OpLabel + %35 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %36 = OpLoad %v4float %35 + OpReturnValue %36 + %33 = OpLabel + OpUnreachable + OpFunctionEnd diff --git a/tests/sksl/shared/SwitchWithEarlyReturn.asm.frag b/tests/sksl/shared/SwitchWithEarlyReturn.asm.frag index 0169413587cd..fe5980a119a3 100644 --- a/tests/sksl/shared/SwitchWithEarlyReturn.asm.frag +++ b/tests/sksl/shared/SwitchWithEarlyReturn.asm.frag @@ -1,504 +1,504 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %return_in_one_case_bi "return_in_one_case_bi" -OpName %val "val" -OpName %return_in_default_bi "return_in_default_bi" -OpName %return_in_every_case_bi "return_in_every_case_bi" -OpName %return_in_every_case_no_default_bi "return_in_every_case_no_default_bi" -OpName %val_0 "val" -OpName %case_has_break_before_return_bi "case_has_break_before_return_bi" -OpName %val_1 "val" -OpName %case_has_break_after_return_bi "case_has_break_after_return_bi" -OpName %no_return_in_default_bi "no_return_in_default_bi" -OpName %val_2 "val" -OpName %empty_default_bi "empty_default_bi" -OpName %val_3 "val" -OpName %return_with_fallthrough_bi "return_with_fallthrough_bi" -OpName %fallthrough_ends_in_break_bi "fallthrough_ends_in_break_bi" -OpName %val_4 "val" -OpName %fallthrough_to_default_with_break_bi "fallthrough_to_default_with_break_bi" -OpName %val_5 "val" -OpName %fallthrough_to_default_with_return_bi "fallthrough_to_default_with_return_bi" -OpName %fallthrough_with_loop_break_bi "fallthrough_with_loop_break_bi" -OpName %val_6 "val" -OpName %i "i" -OpName %fallthrough_with_loop_continue_bi "fallthrough_with_loop_continue_bi" -OpName %val_7 "val" -OpName %i_0 "i" -OpName %main "main" -OpName %x "x" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %24 Binding 0 -OpDecorate %24 DescriptorSet 0 -OpDecorate %194 RelaxedPrecision -OpDecorate %195 RelaxedPrecision -OpDecorate %270 RelaxedPrecision -OpDecorate %272 RelaxedPrecision -OpDecorate %273 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %return_in_one_case_bi "return_in_one_case_bi" + OpName %val "val" + OpName %return_in_default_bi "return_in_default_bi" + OpName %return_in_every_case_bi "return_in_every_case_bi" + OpName %return_in_every_case_no_default_bi "return_in_every_case_no_default_bi" + OpName %val_0 "val" + OpName %case_has_break_before_return_bi "case_has_break_before_return_bi" + OpName %val_1 "val" + OpName %case_has_break_after_return_bi "case_has_break_after_return_bi" + OpName %no_return_in_default_bi "no_return_in_default_bi" + OpName %val_2 "val" + OpName %empty_default_bi "empty_default_bi" + OpName %val_3 "val" + OpName %return_with_fallthrough_bi "return_with_fallthrough_bi" + OpName %fallthrough_ends_in_break_bi "fallthrough_ends_in_break_bi" + OpName %val_4 "val" + OpName %fallthrough_to_default_with_break_bi "fallthrough_to_default_with_break_bi" + OpName %val_5 "val" + OpName %fallthrough_to_default_with_return_bi "fallthrough_to_default_with_return_bi" + OpName %fallthrough_with_loop_break_bi "fallthrough_with_loop_break_bi" + OpName %val_6 "val" + OpName %i "i" + OpName %fallthrough_with_loop_continue_bi "fallthrough_with_loop_continue_bi" + OpName %val_7 "val" + OpName %i_0 "i" + OpName %main "main" + OpName %x "x" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %24 Binding 0 + OpDecorate %24 DescriptorSet 0 + OpDecorate %194 RelaxedPrecision + OpDecorate %195 RelaxedPrecision + OpDecorate %270 RelaxedPrecision + OpDecorate %272 RelaxedPrecision + OpDecorate %273 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%24 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%29 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%33 = OpConstantComposite %v2float %float_0 %float_0 + %24 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %29 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %33 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%int = OpTypeInt 32 1 + %int = OpTypeInt 32 1 %_ptr_Function_int = OpTypePointer Function %int -%39 = OpTypeFunction %bool %_ptr_Function_int -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%false = OpConstantFalse %bool -%true = OpConstantTrue %bool -%int_5 = OpConstant %int 5 -%188 = OpTypeFunction %v4float %_ptr_Function_v2float + %39 = OpTypeFunction %bool %_ptr_Function_int + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %false = OpConstantFalse %bool + %true = OpConstantTrue %bool + %int_5 = OpConstant %int 5 + %188 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float %_ptr_Function_v4float = OpTypePointer Function %v4float %_entrypoint_v = OpFunction %void None %29 -%30 = OpLabel -%34 = OpVariable %_ptr_Function_v2float Function -OpStore %34 %33 -%36 = OpFunctionCall %v4float %main %34 -OpStore %sk_FragColor %36 -OpReturn -OpFunctionEnd + %30 = OpLabel + %34 = OpVariable %_ptr_Function_v2float Function + OpStore %34 %33 + %36 = OpFunctionCall %v4float %main %34 + OpStore %sk_FragColor %36 + OpReturn + OpFunctionEnd %return_in_one_case_bi = OpFunction %bool None %39 -%40 = OpFunctionParameter %_ptr_Function_int -%41 = OpLabel -%val = OpVariable %_ptr_Function_int Function -OpStore %val %int_0 -%44 = OpLoad %int %40 -OpSelectionMerge %45 None -OpSwitch %44 %47 1 %46 -%46 = OpLabel -%49 = OpIAdd %int %int_0 %int_1 -OpStore %val %49 -OpReturnValue %false -%47 = OpLabel -%51 = OpLoad %int %val -%52 = OpIAdd %int %51 %int_1 -OpStore %val %52 -OpBranch %45 -%45 = OpLabel -%53 = OpLoad %int %val -%54 = OpIEqual %bool %53 %int_1 -OpReturnValue %54 -OpFunctionEnd + %40 = OpFunctionParameter %_ptr_Function_int + %41 = OpLabel + %val = OpVariable %_ptr_Function_int Function + OpStore %val %int_0 + %44 = OpLoad %int %40 + OpSelectionMerge %45 None + OpSwitch %44 %47 1 %46 + %46 = OpLabel + %49 = OpIAdd %int %int_0 %int_1 + OpStore %val %49 + OpReturnValue %false + %47 = OpLabel + %51 = OpLoad %int %val + %52 = OpIAdd %int %51 %int_1 + OpStore %val %52 + OpBranch %45 + %45 = OpLabel + %53 = OpLoad %int %val + %54 = OpIEqual %bool %53 %int_1 + OpReturnValue %54 + OpFunctionEnd %return_in_default_bi = OpFunction %bool None %39 -%55 = OpFunctionParameter %_ptr_Function_int -%56 = OpLabel -%57 = OpLoad %int %55 -OpSelectionMerge %58 None -OpSwitch %57 %59 -%59 = OpLabel -OpReturnValue %true -%58 = OpLabel -OpUnreachable -OpFunctionEnd + %55 = OpFunctionParameter %_ptr_Function_int + %56 = OpLabel + %57 = OpLoad %int %55 + OpSelectionMerge %58 None + OpSwitch %57 %59 + %59 = OpLabel + OpReturnValue %true + %58 = OpLabel + OpUnreachable + OpFunctionEnd %return_in_every_case_bi = OpFunction %bool None %39 -%61 = OpFunctionParameter %_ptr_Function_int -%62 = OpLabel -%63 = OpLoad %int %61 -OpSelectionMerge %64 None -OpSwitch %63 %66 1 %65 -%65 = OpLabel -OpReturnValue %false -%66 = OpLabel -OpReturnValue %true -%64 = OpLabel -OpUnreachable -OpFunctionEnd + %61 = OpFunctionParameter %_ptr_Function_int + %62 = OpLabel + %63 = OpLoad %int %61 + OpSelectionMerge %64 None + OpSwitch %63 %66 1 %65 + %65 = OpLabel + OpReturnValue %false + %66 = OpLabel + OpReturnValue %true + %64 = OpLabel + OpUnreachable + OpFunctionEnd %return_in_every_case_no_default_bi = OpFunction %bool None %39 -%67 = OpFunctionParameter %_ptr_Function_int -%68 = OpLabel -%val_0 = OpVariable %_ptr_Function_int Function -OpStore %val_0 %int_0 -%70 = OpLoad %int %67 -OpSelectionMerge %71 None -OpSwitch %70 %71 1 %72 2 %73 -%72 = OpLabel -OpReturnValue %false -%73 = OpLabel -OpReturnValue %true -%71 = OpLabel -%74 = OpIAdd %int %int_0 %int_1 -OpStore %val_0 %74 -%75 = OpIEqual %bool %74 %int_1 -OpReturnValue %75 -OpFunctionEnd + %67 = OpFunctionParameter %_ptr_Function_int + %68 = OpLabel + %val_0 = OpVariable %_ptr_Function_int Function + OpStore %val_0 %int_0 + %70 = OpLoad %int %67 + OpSelectionMerge %71 None + OpSwitch %70 %71 1 %72 2 %73 + %72 = OpLabel + OpReturnValue %false + %73 = OpLabel + OpReturnValue %true + %71 = OpLabel + %74 = OpIAdd %int %int_0 %int_1 + OpStore %val_0 %74 + %75 = OpIEqual %bool %74 %int_1 + OpReturnValue %75 + OpFunctionEnd %case_has_break_before_return_bi = OpFunction %bool None %39 -%76 = OpFunctionParameter %_ptr_Function_int -%77 = OpLabel -%val_1 = OpVariable %_ptr_Function_int Function -OpStore %val_1 %int_0 -%79 = OpLoad %int %76 -OpSelectionMerge %80 None -OpSwitch %79 %83 1 %81 2 %82 -%81 = OpLabel -OpBranch %80 -%82 = OpLabel -OpReturnValue %true -%83 = OpLabel -OpReturnValue %true -%80 = OpLabel -%84 = OpIAdd %int %int_0 %int_1 -OpStore %val_1 %84 -%85 = OpIEqual %bool %84 %int_1 -OpReturnValue %85 -OpFunctionEnd + %76 = OpFunctionParameter %_ptr_Function_int + %77 = OpLabel + %val_1 = OpVariable %_ptr_Function_int Function + OpStore %val_1 %int_0 + %79 = OpLoad %int %76 + OpSelectionMerge %80 None + OpSwitch %79 %83 1 %81 2 %82 + %81 = OpLabel + OpBranch %80 + %82 = OpLabel + OpReturnValue %true + %83 = OpLabel + OpReturnValue %true + %80 = OpLabel + %84 = OpIAdd %int %int_0 %int_1 + OpStore %val_1 %84 + %85 = OpIEqual %bool %84 %int_1 + OpReturnValue %85 + OpFunctionEnd %case_has_break_after_return_bi = OpFunction %bool None %39 -%86 = OpFunctionParameter %_ptr_Function_int -%87 = OpLabel -%88 = OpLoad %int %86 -OpSelectionMerge %89 None -OpSwitch %88 %92 1 %90 2 %91 -%90 = OpLabel -OpReturnValue %false -%91 = OpLabel -OpReturnValue %true -%92 = OpLabel -OpReturnValue %true -%89 = OpLabel -OpUnreachable -OpFunctionEnd + %86 = OpFunctionParameter %_ptr_Function_int + %87 = OpLabel + %88 = OpLoad %int %86 + OpSelectionMerge %89 None + OpSwitch %88 %92 1 %90 2 %91 + %90 = OpLabel + OpReturnValue %false + %91 = OpLabel + OpReturnValue %true + %92 = OpLabel + OpReturnValue %true + %89 = OpLabel + OpUnreachable + OpFunctionEnd %no_return_in_default_bi = OpFunction %bool None %39 -%93 = OpFunctionParameter %_ptr_Function_int -%94 = OpLabel -%val_2 = OpVariable %_ptr_Function_int Function -OpStore %val_2 %int_0 -%96 = OpLoad %int %93 -OpSelectionMerge %97 None -OpSwitch %96 %100 1 %98 2 %99 -%98 = OpLabel -OpReturnValue %false -%99 = OpLabel -OpReturnValue %true -%100 = OpLabel -OpBranch %97 -%97 = OpLabel -%101 = OpIAdd %int %int_0 %int_1 -OpStore %val_2 %101 -%102 = OpIEqual %bool %101 %int_1 -OpReturnValue %102 -OpFunctionEnd + %93 = OpFunctionParameter %_ptr_Function_int + %94 = OpLabel + %val_2 = OpVariable %_ptr_Function_int Function + OpStore %val_2 %int_0 + %96 = OpLoad %int %93 + OpSelectionMerge %97 None + OpSwitch %96 %100 1 %98 2 %99 + %98 = OpLabel + OpReturnValue %false + %99 = OpLabel + OpReturnValue %true + %100 = OpLabel + OpBranch %97 + %97 = OpLabel + %101 = OpIAdd %int %int_0 %int_1 + OpStore %val_2 %101 + %102 = OpIEqual %bool %101 %int_1 + OpReturnValue %102 + OpFunctionEnd %empty_default_bi = OpFunction %bool None %39 -%103 = OpFunctionParameter %_ptr_Function_int -%104 = OpLabel -%val_3 = OpVariable %_ptr_Function_int Function -OpStore %val_3 %int_0 -%106 = OpLoad %int %103 -OpSelectionMerge %107 None -OpSwitch %106 %110 1 %108 2 %109 -%108 = OpLabel -OpReturnValue %false -%109 = OpLabel -OpReturnValue %true -%110 = OpLabel -OpBranch %107 -%107 = OpLabel -%111 = OpIAdd %int %int_0 %int_1 -OpStore %val_3 %111 -%112 = OpIEqual %bool %111 %int_1 -OpReturnValue %112 -OpFunctionEnd + %103 = OpFunctionParameter %_ptr_Function_int + %104 = OpLabel + %val_3 = OpVariable %_ptr_Function_int Function + OpStore %val_3 %int_0 + %106 = OpLoad %int %103 + OpSelectionMerge %107 None + OpSwitch %106 %110 1 %108 2 %109 + %108 = OpLabel + OpReturnValue %false + %109 = OpLabel + OpReturnValue %true + %110 = OpLabel + OpBranch %107 + %107 = OpLabel + %111 = OpIAdd %int %int_0 %int_1 + OpStore %val_3 %111 + %112 = OpIEqual %bool %111 %int_1 + OpReturnValue %112 + OpFunctionEnd %return_with_fallthrough_bi = OpFunction %bool None %39 -%113 = OpFunctionParameter %_ptr_Function_int -%114 = OpLabel -%115 = OpLoad %int %113 -OpSelectionMerge %116 None -OpSwitch %115 %119 1 %118 2 %118 -%118 = OpLabel -OpReturnValue %true -%119 = OpLabel -OpReturnValue %false -%116 = OpLabel -OpUnreachable -OpFunctionEnd + %113 = OpFunctionParameter %_ptr_Function_int + %114 = OpLabel + %115 = OpLoad %int %113 + OpSelectionMerge %116 None + OpSwitch %115 %119 1 %118 2 %118 + %118 = OpLabel + OpReturnValue %true + %119 = OpLabel + OpReturnValue %false + %116 = OpLabel + OpUnreachable + OpFunctionEnd %fallthrough_ends_in_break_bi = OpFunction %bool None %39 -%120 = OpFunctionParameter %_ptr_Function_int -%121 = OpLabel -%val_4 = OpVariable %_ptr_Function_int Function -OpStore %val_4 %int_0 -%123 = OpLoad %int %120 -OpSelectionMerge %124 None -OpSwitch %123 %127 1 %126 2 %126 -%126 = OpLabel -OpBranch %124 -%127 = OpLabel -OpReturnValue %false -%124 = OpLabel -%128 = OpIAdd %int %int_0 %int_1 -OpStore %val_4 %128 -%129 = OpIEqual %bool %128 %int_1 -OpReturnValue %129 -OpFunctionEnd + %120 = OpFunctionParameter %_ptr_Function_int + %121 = OpLabel + %val_4 = OpVariable %_ptr_Function_int Function + OpStore %val_4 %int_0 + %123 = OpLoad %int %120 + OpSelectionMerge %124 None + OpSwitch %123 %127 1 %126 2 %126 + %126 = OpLabel + OpBranch %124 + %127 = OpLabel + OpReturnValue %false + %124 = OpLabel + %128 = OpIAdd %int %int_0 %int_1 + OpStore %val_4 %128 + %129 = OpIEqual %bool %128 %int_1 + OpReturnValue %129 + OpFunctionEnd %fallthrough_to_default_with_break_bi = OpFunction %bool None %39 -%130 = OpFunctionParameter %_ptr_Function_int -%131 = OpLabel -%val_5 = OpVariable %_ptr_Function_int Function -OpStore %val_5 %int_0 -%133 = OpLoad %int %130 -OpSelectionMerge %134 None -OpSwitch %133 %137 1 %137 2 %137 -%137 = OpLabel -OpBranch %134 -%134 = OpLabel -%138 = OpIAdd %int %int_0 %int_1 -OpStore %val_5 %138 -%139 = OpIEqual %bool %138 %int_1 -OpReturnValue %139 -OpFunctionEnd + %130 = OpFunctionParameter %_ptr_Function_int + %131 = OpLabel + %val_5 = OpVariable %_ptr_Function_int Function + OpStore %val_5 %int_0 + %133 = OpLoad %int %130 + OpSelectionMerge %134 None + OpSwitch %133 %137 1 %137 2 %137 + %137 = OpLabel + OpBranch %134 + %134 = OpLabel + %138 = OpIAdd %int %int_0 %int_1 + OpStore %val_5 %138 + %139 = OpIEqual %bool %138 %int_1 + OpReturnValue %139 + OpFunctionEnd %fallthrough_to_default_with_return_bi = OpFunction %bool None %39 -%140 = OpFunctionParameter %_ptr_Function_int -%141 = OpLabel -%142 = OpLoad %int %140 -OpSelectionMerge %143 None -OpSwitch %142 %146 1 %146 2 %146 -%146 = OpLabel -OpReturnValue %true -%143 = OpLabel -OpUnreachable -OpFunctionEnd + %140 = OpFunctionParameter %_ptr_Function_int + %141 = OpLabel + %142 = OpLoad %int %140 + OpSelectionMerge %143 None + OpSwitch %142 %146 1 %146 2 %146 + %146 = OpLabel + OpReturnValue %true + %143 = OpLabel + OpUnreachable + OpFunctionEnd %fallthrough_with_loop_break_bi = OpFunction %bool None %39 -%147 = OpFunctionParameter %_ptr_Function_int -%148 = OpLabel -%val_6 = OpVariable %_ptr_Function_int Function -%i = OpVariable %_ptr_Function_int Function -OpStore %val_6 %int_0 -%150 = OpLoad %int %147 -OpSelectionMerge %151 None -OpSwitch %150 %154 1 %152 2 %154 -%152 = OpLabel -OpStore %i %int_0 -OpBranch %156 -%156 = OpLabel -OpLoopMerge %160 %159 None -OpBranch %157 -%157 = OpLabel -%161 = OpLoad %int %i -%163 = OpSLessThan %bool %161 %int_5 -OpBranchConditional %163 %158 %160 -%158 = OpLabel -%164 = OpLoad %int %val_6 -%165 = OpIAdd %int %164 %int_1 -OpStore %val_6 %165 -OpBranch %160 -%159 = OpLabel -%166 = OpLoad %int %i -%167 = OpIAdd %int %166 %int_1 -OpStore %i %167 -OpBranch %156 -%160 = OpLabel -OpBranch %154 -%154 = OpLabel -OpReturnValue %true -%151 = OpLabel -OpUnreachable -OpFunctionEnd + %147 = OpFunctionParameter %_ptr_Function_int + %148 = OpLabel + %val_6 = OpVariable %_ptr_Function_int Function + %i = OpVariable %_ptr_Function_int Function + OpStore %val_6 %int_0 + %150 = OpLoad %int %147 + OpSelectionMerge %151 None + OpSwitch %150 %154 1 %152 2 %154 + %152 = OpLabel + OpStore %i %int_0 + OpBranch %156 + %156 = OpLabel + OpLoopMerge %160 %159 None + OpBranch %157 + %157 = OpLabel + %161 = OpLoad %int %i + %163 = OpSLessThan %bool %161 %int_5 + OpBranchConditional %163 %158 %160 + %158 = OpLabel + %164 = OpLoad %int %val_6 + %165 = OpIAdd %int %164 %int_1 + OpStore %val_6 %165 + OpBranch %160 + %159 = OpLabel + %166 = OpLoad %int %i + %167 = OpIAdd %int %166 %int_1 + OpStore %i %167 + OpBranch %156 + %160 = OpLabel + OpBranch %154 + %154 = OpLabel + OpReturnValue %true + %151 = OpLabel + OpUnreachable + OpFunctionEnd %fallthrough_with_loop_continue_bi = OpFunction %bool None %39 -%168 = OpFunctionParameter %_ptr_Function_int -%169 = OpLabel -%val_7 = OpVariable %_ptr_Function_int Function -%i_0 = OpVariable %_ptr_Function_int Function -OpStore %val_7 %int_0 -%171 = OpLoad %int %168 -OpSelectionMerge %172 None -OpSwitch %171 %175 1 %173 2 %175 -%173 = OpLabel -OpStore %i_0 %int_0 -OpBranch %177 -%177 = OpLabel -OpLoopMerge %181 %180 None -OpBranch %178 -%178 = OpLabel -%182 = OpLoad %int %i_0 -%183 = OpSLessThan %bool %182 %int_5 -OpBranchConditional %183 %179 %181 -%179 = OpLabel -%184 = OpLoad %int %val_7 -%185 = OpIAdd %int %184 %int_1 -OpStore %val_7 %185 -OpBranch %180 -%180 = OpLabel -%186 = OpLoad %int %i_0 -%187 = OpIAdd %int %186 %int_1 -OpStore %i_0 %187 -OpBranch %177 -%181 = OpLabel -OpBranch %175 -%175 = OpLabel -OpReturnValue %true -%172 = OpLabel -OpUnreachable -OpFunctionEnd -%main = OpFunction %v4float None %188 -%189 = OpFunctionParameter %_ptr_Function_v2float -%190 = OpLabel -%x = OpVariable %_ptr_Function_int Function -%197 = OpVariable %_ptr_Function_int Function -%201 = OpVariable %_ptr_Function_int Function -%206 = OpVariable %_ptr_Function_int Function -%211 = OpVariable %_ptr_Function_int Function -%216 = OpVariable %_ptr_Function_int Function -%221 = OpVariable %_ptr_Function_int Function -%226 = OpVariable %_ptr_Function_int Function -%231 = OpVariable %_ptr_Function_int Function -%236 = OpVariable %_ptr_Function_int Function -%241 = OpVariable %_ptr_Function_int Function -%246 = OpVariable %_ptr_Function_int Function -%251 = OpVariable %_ptr_Function_int Function -%256 = OpVariable %_ptr_Function_int Function -%261 = OpVariable %_ptr_Function_int Function -%264 = OpVariable %_ptr_Function_v4float Function -%192 = OpAccessChain %_ptr_Uniform_v4float %24 %int_0 -%194 = OpLoad %v4float %192 -%195 = OpCompositeExtract %float %194 1 -%196 = OpConvertFToS %int %195 -OpStore %x %196 -OpStore %197 %196 -%198 = OpFunctionCall %bool %return_in_one_case_bi %197 -OpSelectionMerge %200 None -OpBranchConditional %198 %199 %200 -%199 = OpLabel -OpStore %201 %196 -%202 = OpFunctionCall %bool %return_in_default_bi %201 -OpBranch %200 -%200 = OpLabel -%203 = OpPhi %bool %false %190 %202 %199 -OpSelectionMerge %205 None -OpBranchConditional %203 %204 %205 -%204 = OpLabel -OpStore %206 %196 -%207 = OpFunctionCall %bool %return_in_every_case_bi %206 -OpBranch %205 -%205 = OpLabel -%208 = OpPhi %bool %false %200 %207 %204 -OpSelectionMerge %210 None -OpBranchConditional %208 %209 %210 -%209 = OpLabel -OpStore %211 %196 -%212 = OpFunctionCall %bool %return_in_every_case_no_default_bi %211 -OpBranch %210 -%210 = OpLabel -%213 = OpPhi %bool %false %205 %212 %209 -OpSelectionMerge %215 None -OpBranchConditional %213 %214 %215 -%214 = OpLabel -OpStore %216 %196 -%217 = OpFunctionCall %bool %case_has_break_before_return_bi %216 -OpBranch %215 -%215 = OpLabel -%218 = OpPhi %bool %false %210 %217 %214 -OpSelectionMerge %220 None -OpBranchConditional %218 %219 %220 -%219 = OpLabel -OpStore %221 %196 -%222 = OpFunctionCall %bool %case_has_break_after_return_bi %221 -OpBranch %220 -%220 = OpLabel -%223 = OpPhi %bool %false %215 %222 %219 -OpSelectionMerge %225 None -OpBranchConditional %223 %224 %225 -%224 = OpLabel -OpStore %226 %196 -%227 = OpFunctionCall %bool %no_return_in_default_bi %226 -OpBranch %225 -%225 = OpLabel -%228 = OpPhi %bool %false %220 %227 %224 -OpSelectionMerge %230 None -OpBranchConditional %228 %229 %230 -%229 = OpLabel -OpStore %231 %196 -%232 = OpFunctionCall %bool %empty_default_bi %231 -OpBranch %230 -%230 = OpLabel -%233 = OpPhi %bool %false %225 %232 %229 -OpSelectionMerge %235 None -OpBranchConditional %233 %234 %235 -%234 = OpLabel -OpStore %236 %196 -%237 = OpFunctionCall %bool %return_with_fallthrough_bi %236 -OpBranch %235 -%235 = OpLabel -%238 = OpPhi %bool %false %230 %237 %234 -OpSelectionMerge %240 None -OpBranchConditional %238 %239 %240 -%239 = OpLabel -OpStore %241 %196 -%242 = OpFunctionCall %bool %fallthrough_ends_in_break_bi %241 -OpBranch %240 -%240 = OpLabel -%243 = OpPhi %bool %false %235 %242 %239 -OpSelectionMerge %245 None -OpBranchConditional %243 %244 %245 -%244 = OpLabel -OpStore %246 %196 -%247 = OpFunctionCall %bool %fallthrough_to_default_with_break_bi %246 -OpBranch %245 -%245 = OpLabel -%248 = OpPhi %bool %false %240 %247 %244 -OpSelectionMerge %250 None -OpBranchConditional %248 %249 %250 -%249 = OpLabel -OpStore %251 %196 -%252 = OpFunctionCall %bool %fallthrough_to_default_with_return_bi %251 -OpBranch %250 -%250 = OpLabel -%253 = OpPhi %bool %false %245 %252 %249 -OpSelectionMerge %255 None -OpBranchConditional %253 %254 %255 -%254 = OpLabel -OpStore %256 %196 -%257 = OpFunctionCall %bool %fallthrough_with_loop_break_bi %256 -OpBranch %255 -%255 = OpLabel -%258 = OpPhi %bool %false %250 %257 %254 -OpSelectionMerge %260 None -OpBranchConditional %258 %259 %260 -%259 = OpLabel -OpStore %261 %196 -%262 = OpFunctionCall %bool %fallthrough_with_loop_continue_bi %261 -OpBranch %260 -%260 = OpLabel -%263 = OpPhi %bool %false %255 %262 %259 -OpSelectionMerge %268 None -OpBranchConditional %263 %266 %267 -%266 = OpLabel -%269 = OpAccessChain %_ptr_Uniform_v4float %24 %int_0 -%270 = OpLoad %v4float %269 -OpStore %264 %270 -OpBranch %268 -%267 = OpLabel -%271 = OpAccessChain %_ptr_Uniform_v4float %24 %int_1 -%272 = OpLoad %v4float %271 -OpStore %264 %272 -OpBranch %268 -%268 = OpLabel -%273 = OpLoad %v4float %264 -OpReturnValue %273 -OpFunctionEnd + %168 = OpFunctionParameter %_ptr_Function_int + %169 = OpLabel + %val_7 = OpVariable %_ptr_Function_int Function + %i_0 = OpVariable %_ptr_Function_int Function + OpStore %val_7 %int_0 + %171 = OpLoad %int %168 + OpSelectionMerge %172 None + OpSwitch %171 %175 1 %173 2 %175 + %173 = OpLabel + OpStore %i_0 %int_0 + OpBranch %177 + %177 = OpLabel + OpLoopMerge %181 %180 None + OpBranch %178 + %178 = OpLabel + %182 = OpLoad %int %i_0 + %183 = OpSLessThan %bool %182 %int_5 + OpBranchConditional %183 %179 %181 + %179 = OpLabel + %184 = OpLoad %int %val_7 + %185 = OpIAdd %int %184 %int_1 + OpStore %val_7 %185 + OpBranch %180 + %180 = OpLabel + %186 = OpLoad %int %i_0 + %187 = OpIAdd %int %186 %int_1 + OpStore %i_0 %187 + OpBranch %177 + %181 = OpLabel + OpBranch %175 + %175 = OpLabel + OpReturnValue %true + %172 = OpLabel + OpUnreachable + OpFunctionEnd + %main = OpFunction %v4float None %188 + %189 = OpFunctionParameter %_ptr_Function_v2float + %190 = OpLabel + %x = OpVariable %_ptr_Function_int Function + %197 = OpVariable %_ptr_Function_int Function + %201 = OpVariable %_ptr_Function_int Function + %206 = OpVariable %_ptr_Function_int Function + %211 = OpVariable %_ptr_Function_int Function + %216 = OpVariable %_ptr_Function_int Function + %221 = OpVariable %_ptr_Function_int Function + %226 = OpVariable %_ptr_Function_int Function + %231 = OpVariable %_ptr_Function_int Function + %236 = OpVariable %_ptr_Function_int Function + %241 = OpVariable %_ptr_Function_int Function + %246 = OpVariable %_ptr_Function_int Function + %251 = OpVariable %_ptr_Function_int Function + %256 = OpVariable %_ptr_Function_int Function + %261 = OpVariable %_ptr_Function_int Function + %264 = OpVariable %_ptr_Function_v4float Function + %192 = OpAccessChain %_ptr_Uniform_v4float %24 %int_0 + %194 = OpLoad %v4float %192 + %195 = OpCompositeExtract %float %194 1 + %196 = OpConvertFToS %int %195 + OpStore %x %196 + OpStore %197 %196 + %198 = OpFunctionCall %bool %return_in_one_case_bi %197 + OpSelectionMerge %200 None + OpBranchConditional %198 %199 %200 + %199 = OpLabel + OpStore %201 %196 + %202 = OpFunctionCall %bool %return_in_default_bi %201 + OpBranch %200 + %200 = OpLabel + %203 = OpPhi %bool %false %190 %202 %199 + OpSelectionMerge %205 None + OpBranchConditional %203 %204 %205 + %204 = OpLabel + OpStore %206 %196 + %207 = OpFunctionCall %bool %return_in_every_case_bi %206 + OpBranch %205 + %205 = OpLabel + %208 = OpPhi %bool %false %200 %207 %204 + OpSelectionMerge %210 None + OpBranchConditional %208 %209 %210 + %209 = OpLabel + OpStore %211 %196 + %212 = OpFunctionCall %bool %return_in_every_case_no_default_bi %211 + OpBranch %210 + %210 = OpLabel + %213 = OpPhi %bool %false %205 %212 %209 + OpSelectionMerge %215 None + OpBranchConditional %213 %214 %215 + %214 = OpLabel + OpStore %216 %196 + %217 = OpFunctionCall %bool %case_has_break_before_return_bi %216 + OpBranch %215 + %215 = OpLabel + %218 = OpPhi %bool %false %210 %217 %214 + OpSelectionMerge %220 None + OpBranchConditional %218 %219 %220 + %219 = OpLabel + OpStore %221 %196 + %222 = OpFunctionCall %bool %case_has_break_after_return_bi %221 + OpBranch %220 + %220 = OpLabel + %223 = OpPhi %bool %false %215 %222 %219 + OpSelectionMerge %225 None + OpBranchConditional %223 %224 %225 + %224 = OpLabel + OpStore %226 %196 + %227 = OpFunctionCall %bool %no_return_in_default_bi %226 + OpBranch %225 + %225 = OpLabel + %228 = OpPhi %bool %false %220 %227 %224 + OpSelectionMerge %230 None + OpBranchConditional %228 %229 %230 + %229 = OpLabel + OpStore %231 %196 + %232 = OpFunctionCall %bool %empty_default_bi %231 + OpBranch %230 + %230 = OpLabel + %233 = OpPhi %bool %false %225 %232 %229 + OpSelectionMerge %235 None + OpBranchConditional %233 %234 %235 + %234 = OpLabel + OpStore %236 %196 + %237 = OpFunctionCall %bool %return_with_fallthrough_bi %236 + OpBranch %235 + %235 = OpLabel + %238 = OpPhi %bool %false %230 %237 %234 + OpSelectionMerge %240 None + OpBranchConditional %238 %239 %240 + %239 = OpLabel + OpStore %241 %196 + %242 = OpFunctionCall %bool %fallthrough_ends_in_break_bi %241 + OpBranch %240 + %240 = OpLabel + %243 = OpPhi %bool %false %235 %242 %239 + OpSelectionMerge %245 None + OpBranchConditional %243 %244 %245 + %244 = OpLabel + OpStore %246 %196 + %247 = OpFunctionCall %bool %fallthrough_to_default_with_break_bi %246 + OpBranch %245 + %245 = OpLabel + %248 = OpPhi %bool %false %240 %247 %244 + OpSelectionMerge %250 None + OpBranchConditional %248 %249 %250 + %249 = OpLabel + OpStore %251 %196 + %252 = OpFunctionCall %bool %fallthrough_to_default_with_return_bi %251 + OpBranch %250 + %250 = OpLabel + %253 = OpPhi %bool %false %245 %252 %249 + OpSelectionMerge %255 None + OpBranchConditional %253 %254 %255 + %254 = OpLabel + OpStore %256 %196 + %257 = OpFunctionCall %bool %fallthrough_with_loop_break_bi %256 + OpBranch %255 + %255 = OpLabel + %258 = OpPhi %bool %false %250 %257 %254 + OpSelectionMerge %260 None + OpBranchConditional %258 %259 %260 + %259 = OpLabel + OpStore %261 %196 + %262 = OpFunctionCall %bool %fallthrough_with_loop_continue_bi %261 + OpBranch %260 + %260 = OpLabel + %263 = OpPhi %bool %false %255 %262 %259 + OpSelectionMerge %268 None + OpBranchConditional %263 %266 %267 + %266 = OpLabel + %269 = OpAccessChain %_ptr_Uniform_v4float %24 %int_0 + %270 = OpLoad %v4float %269 + OpStore %264 %270 + OpBranch %268 + %267 = OpLabel + %271 = OpAccessChain %_ptr_Uniform_v4float %24 %int_1 + %272 = OpLoad %v4float %271 + OpStore %264 %272 + OpBranch %268 + %268 = OpLabel + %273 = OpLoad %v4float %264 + OpReturnValue %273 + OpFunctionEnd diff --git a/tests/sksl/shared/SwitchWithEarlyReturn.skrp b/tests/sksl/shared/SwitchWithEarlyReturn.skrp index 744ff900f45e..005fd694eb05 100644 --- a/tests/sksl/shared/SwitchWithEarlyReturn.skrp +++ b/tests/sksl/shared/SwitchWithEarlyReturn.skrp @@ -1,3 +1,5 @@ +430 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_uniform $0 = colorGreen(1) diff --git a/tests/sksl/shared/SwitchWithEarlyReturn.wgsl b/tests/sksl/shared/SwitchWithEarlyReturn.wgsl index 7491cf62581b..4f4898877533 100644 --- a/tests/sksl/shared/SwitchWithEarlyReturn.wgsl +++ b/tests/sksl/shared/SwitchWithEarlyReturn.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, diff --git a/tests/sksl/shared/SwitchWithFallthrough.asm.frag b/tests/sksl/shared/SwitchWithFallthrough.asm.frag index ebe94fbed5f7..8b15345d1018 100644 --- a/tests/sksl/shared/SwitchWithFallthrough.asm.frag +++ b/tests/sksl/shared/SwitchWithFallthrough.asm.frag @@ -1,175 +1,175 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %switch_fallthrough_twice_bi "switch_fallthrough_twice_bi" -OpName %ok "ok" -OpName %switch_fallthrough_groups_bi "switch_fallthrough_groups_bi" -OpName %ok_0 "ok" -OpName %main "main" -OpName %x "x" -OpName %_0_ok "_0_ok" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %12 Binding 0 -OpDecorate %12 DescriptorSet 0 -OpDecorate %41 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %65 RelaxedPrecision -OpDecorate %66 RelaxedPrecision -OpDecorate %74 RelaxedPrecision -OpDecorate %91 RelaxedPrecision -OpDecorate %94 RelaxedPrecision -OpDecorate %95 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %switch_fallthrough_twice_bi "switch_fallthrough_twice_bi" + OpName %ok "ok" + OpName %switch_fallthrough_groups_bi "switch_fallthrough_groups_bi" + OpName %ok_0 "ok" + OpName %main "main" + OpName %x "x" + OpName %_0_ok "_0_ok" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %12 Binding 0 + OpDecorate %12 DescriptorSet 0 + OpDecorate %41 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %65 RelaxedPrecision + OpDecorate %66 RelaxedPrecision + OpDecorate %74 RelaxedPrecision + OpDecorate %91 RelaxedPrecision + OpDecorate %94 RelaxedPrecision + OpDecorate %95 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%12 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%17 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%21 = OpConstantComposite %v2float %float_0 %float_0 + %12 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %17 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %21 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%int = OpTypeInt 32 1 + %int = OpTypeInt 32 1 %_ptr_Function_int = OpTypePointer Function %int -%27 = OpTypeFunction %bool %_ptr_Function_int + %27 = OpTypeFunction %bool %_ptr_Function_int %_ptr_Function_bool = OpTypePointer Function %bool -%false = OpConstantFalse %bool -%true = OpConstantTrue %bool -%58 = OpTypeFunction %v4float %_ptr_Function_v2float + %false = OpConstantFalse %bool + %true = OpConstantTrue %bool + %58 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_0 = OpConstant %int 0 + %int_0 = OpConstant %int 0 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_1 = OpConstant %int 1 + %int_1 = OpConstant %int 1 %_entrypoint_v = OpFunction %void None %17 -%18 = OpLabel -%22 = OpVariable %_ptr_Function_v2float Function -OpStore %22 %21 -%24 = OpFunctionCall %v4float %main %22 -OpStore %sk_FragColor %24 -OpReturn -OpFunctionEnd + %18 = OpLabel + %22 = OpVariable %_ptr_Function_v2float Function + OpStore %22 %21 + %24 = OpFunctionCall %v4float %main %22 + OpStore %sk_FragColor %24 + OpReturn + OpFunctionEnd %switch_fallthrough_twice_bi = OpFunction %bool None %27 -%28 = OpFunctionParameter %_ptr_Function_int -%29 = OpLabel -%ok = OpVariable %_ptr_Function_bool Function -OpStore %ok %false -%33 = OpLoad %int %28 -OpSelectionMerge %34 None -OpSwitch %33 %39 0 %35 1 %38 2 %38 3 %38 -%35 = OpLabel -OpBranch %34 -%38 = OpLabel -OpStore %ok %true -OpBranch %34 -%39 = OpLabel -OpBranch %34 -%34 = OpLabel -%41 = OpLoad %bool %ok -OpReturnValue %41 -OpFunctionEnd + %28 = OpFunctionParameter %_ptr_Function_int + %29 = OpLabel + %ok = OpVariable %_ptr_Function_bool Function + OpStore %ok %false + %33 = OpLoad %int %28 + OpSelectionMerge %34 None + OpSwitch %33 %39 0 %35 1 %38 2 %38 3 %38 + %35 = OpLabel + OpBranch %34 + %38 = OpLabel + OpStore %ok %true + OpBranch %34 + %39 = OpLabel + OpBranch %34 + %34 = OpLabel + %41 = OpLoad %bool %ok + OpReturnValue %41 + OpFunctionEnd %switch_fallthrough_groups_bi = OpFunction %bool None %27 -%42 = OpFunctionParameter %_ptr_Function_int -%43 = OpLabel -%ok_0 = OpVariable %_ptr_Function_bool Function -OpStore %ok_0 %false -%45 = OpLoad %int %42 -OpSelectionMerge %46 None -OpSwitch %45 %56 -1 %47 0 %48 1 %49 2 %51 3 %51 4 %52 5 %56 6 %56 7 %56 -%47 = OpLabel -OpStore %ok_0 %false -OpBranch %48 -%48 = OpLabel -OpReturnValue %false -%49 = OpLabel -OpStore %ok_0 %true -OpBranch %51 -%51 = OpLabel -OpBranch %46 -%52 = OpLabel -OpStore %ok_0 %false -OpBranch %56 -%56 = OpLabel -OpBranch %46 -%46 = OpLabel -%57 = OpLoad %bool %ok_0 -OpReturnValue %57 -OpFunctionEnd -%main = OpFunction %v4float None %58 -%59 = OpFunctionParameter %_ptr_Function_v2float -%60 = OpLabel -%x = OpVariable %_ptr_Function_int Function -%_0_ok = OpVariable %_ptr_Function_bool Function -%77 = OpVariable %_ptr_Function_int Function -%82 = OpVariable %_ptr_Function_int Function -%85 = OpVariable %_ptr_Function_v4float Function -%62 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 -%65 = OpLoad %v4float %62 -%66 = OpCompositeExtract %float %65 1 -%67 = OpConvertFToS %int %66 -OpStore %x %67 -OpStore %_0_ok %false -OpSelectionMerge %69 None -OpSwitch %67 %73 2 %70 1 %72 0 %72 -%70 = OpLabel -OpBranch %69 -%72 = OpLabel -OpStore %_0_ok %true -OpBranch %69 -%73 = OpLabel -OpBranch %69 -%69 = OpLabel -%74 = OpLoad %bool %_0_ok -OpSelectionMerge %76 None -OpBranchConditional %74 %75 %76 -%75 = OpLabel -OpStore %77 %67 -%78 = OpFunctionCall %bool %switch_fallthrough_twice_bi %77 -OpBranch %76 -%76 = OpLabel -%79 = OpPhi %bool %false %69 %78 %75 -OpSelectionMerge %81 None -OpBranchConditional %79 %80 %81 -%80 = OpLabel -OpStore %82 %67 -%83 = OpFunctionCall %bool %switch_fallthrough_groups_bi %82 -OpBranch %81 -%81 = OpLabel -%84 = OpPhi %bool %false %76 %83 %80 -OpSelectionMerge %89 None -OpBranchConditional %84 %87 %88 -%87 = OpLabel -%90 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 -%91 = OpLoad %v4float %90 -OpStore %85 %91 -OpBranch %89 -%88 = OpLabel -%92 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1 -%94 = OpLoad %v4float %92 -OpStore %85 %94 -OpBranch %89 -%89 = OpLabel -%95 = OpLoad %v4float %85 -OpReturnValue %95 -OpFunctionEnd + %42 = OpFunctionParameter %_ptr_Function_int + %43 = OpLabel + %ok_0 = OpVariable %_ptr_Function_bool Function + OpStore %ok_0 %false + %45 = OpLoad %int %42 + OpSelectionMerge %46 None + OpSwitch %45 %56 -1 %47 0 %48 1 %49 2 %51 3 %51 4 %52 5 %56 6 %56 7 %56 + %47 = OpLabel + OpStore %ok_0 %false + OpBranch %48 + %48 = OpLabel + OpReturnValue %false + %49 = OpLabel + OpStore %ok_0 %true + OpBranch %51 + %51 = OpLabel + OpBranch %46 + %52 = OpLabel + OpStore %ok_0 %false + OpBranch %56 + %56 = OpLabel + OpBranch %46 + %46 = OpLabel + %57 = OpLoad %bool %ok_0 + OpReturnValue %57 + OpFunctionEnd + %main = OpFunction %v4float None %58 + %59 = OpFunctionParameter %_ptr_Function_v2float + %60 = OpLabel + %x = OpVariable %_ptr_Function_int Function + %_0_ok = OpVariable %_ptr_Function_bool Function + %77 = OpVariable %_ptr_Function_int Function + %82 = OpVariable %_ptr_Function_int Function + %85 = OpVariable %_ptr_Function_v4float Function + %62 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 + %65 = OpLoad %v4float %62 + %66 = OpCompositeExtract %float %65 1 + %67 = OpConvertFToS %int %66 + OpStore %x %67 + OpStore %_0_ok %false + OpSelectionMerge %69 None + OpSwitch %67 %73 2 %70 1 %72 0 %72 + %70 = OpLabel + OpBranch %69 + %72 = OpLabel + OpStore %_0_ok %true + OpBranch %69 + %73 = OpLabel + OpBranch %69 + %69 = OpLabel + %74 = OpLoad %bool %_0_ok + OpSelectionMerge %76 None + OpBranchConditional %74 %75 %76 + %75 = OpLabel + OpStore %77 %67 + %78 = OpFunctionCall %bool %switch_fallthrough_twice_bi %77 + OpBranch %76 + %76 = OpLabel + %79 = OpPhi %bool %false %69 %78 %75 + OpSelectionMerge %81 None + OpBranchConditional %79 %80 %81 + %80 = OpLabel + OpStore %82 %67 + %83 = OpFunctionCall %bool %switch_fallthrough_groups_bi %82 + OpBranch %81 + %81 = OpLabel + %84 = OpPhi %bool %false %76 %83 %80 + OpSelectionMerge %89 None + OpBranchConditional %84 %87 %88 + %87 = OpLabel + %90 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 + %91 = OpLoad %v4float %90 + OpStore %85 %91 + OpBranch %89 + %88 = OpLabel + %92 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1 + %94 = OpLoad %v4float %92 + OpStore %85 %94 + OpBranch %89 + %89 = OpLabel + %95 = OpLoad %v4float %85 + OpReturnValue %95 + OpFunctionEnd diff --git a/tests/sksl/shared/SwitchWithLoops.asm.frag b/tests/sksl/shared/SwitchWithLoops.asm.frag index b5013ee89f0b..5da52112bd0d 100644 --- a/tests/sksl/shared/SwitchWithLoops.asm.frag +++ b/tests/sksl/shared/SwitchWithLoops.asm.frag @@ -1,237 +1,237 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %switch_with_continue_in_loop_bi "switch_with_continue_in_loop_bi" -OpName %val "val" -OpName %i "i" -OpName %loop_with_break_in_switch_bi "loop_with_break_in_switch_bi" -OpName %val_0 "val" -OpName %i_0 "i" -OpName %main "main" -OpName %x "x" -OpName %_0_val "_0_val" -OpName %_1_i "_1_i" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %12 Binding 0 -OpDecorate %12 DescriptorSet 0 -OpDecorate %86 RelaxedPrecision -OpDecorate %87 RelaxedPrecision -OpDecorate %128 RelaxedPrecision -OpDecorate %130 RelaxedPrecision -OpDecorate %131 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %switch_with_continue_in_loop_bi "switch_with_continue_in_loop_bi" + OpName %val "val" + OpName %i "i" + OpName %loop_with_break_in_switch_bi "loop_with_break_in_switch_bi" + OpName %val_0 "val" + OpName %i_0 "i" + OpName %main "main" + OpName %x "x" + OpName %_0_val "_0_val" + OpName %_1_i "_1_i" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %12 Binding 0 + OpDecorate %12 DescriptorSet 0 + OpDecorate %86 RelaxedPrecision + OpDecorate %87 RelaxedPrecision + OpDecorate %128 RelaxedPrecision + OpDecorate %130 RelaxedPrecision + OpDecorate %131 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%12 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%17 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%21 = OpConstantComposite %v2float %float_0 %float_0 + %12 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %17 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %21 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%int = OpTypeInt 32 1 + %int = OpTypeInt 32 1 %_ptr_Function_int = OpTypePointer Function %int -%27 = OpTypeFunction %bool %_ptr_Function_int -%int_0 = OpConstant %int 0 -%int_10 = OpConstant %int 10 -%int_1 = OpConstant %int 1 -%int_11 = OpConstant %int 11 -%false = OpConstantFalse %bool -%int_20 = OpConstant %int 20 -%80 = OpTypeFunction %v4float %_ptr_Function_v2float + %27 = OpTypeFunction %bool %_ptr_Function_int + %int_0 = OpConstant %int 0 + %int_10 = OpConstant %int 10 + %int_1 = OpConstant %int 1 + %int_11 = OpConstant %int 11 + %false = OpConstantFalse %bool + %int_20 = OpConstant %int 20 + %80 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_2 = OpConstant %int 2 + %int_2 = OpConstant %int 2 %_ptr_Function_v4float = OpTypePointer Function %v4float %_entrypoint_v = OpFunction %void None %17 -%18 = OpLabel -%22 = OpVariable %_ptr_Function_v2float Function -OpStore %22 %21 -%24 = OpFunctionCall %v4float %main %22 -OpStore %sk_FragColor %24 -OpReturn -OpFunctionEnd + %18 = OpLabel + %22 = OpVariable %_ptr_Function_v2float Function + OpStore %22 %21 + %24 = OpFunctionCall %v4float %main %22 + OpStore %sk_FragColor %24 + OpReturn + OpFunctionEnd %switch_with_continue_in_loop_bi = OpFunction %bool None %27 -%28 = OpFunctionParameter %_ptr_Function_int -%29 = OpLabel -%val = OpVariable %_ptr_Function_int Function -%i = OpVariable %_ptr_Function_int Function -OpStore %val %int_0 -%32 = OpLoad %int %28 -OpSelectionMerge %33 None -OpSwitch %32 %35 1 %34 -%34 = OpLabel -OpStore %i %int_0 -OpBranch %37 -%37 = OpLabel -OpLoopMerge %41 %40 None -OpBranch %38 -%38 = OpLabel -%42 = OpLoad %int %i -%44 = OpSLessThan %bool %42 %int_10 -OpBranchConditional %44 %39 %41 -%39 = OpLabel -%46 = OpLoad %int %val -%47 = OpIAdd %int %46 %int_1 -OpStore %val %47 -OpBranch %40 -%40 = OpLabel -%48 = OpLoad %int %i -%49 = OpIAdd %int %48 %int_1 -OpStore %i %49 -OpBranch %37 -%41 = OpLabel -OpBranch %35 -%35 = OpLabel -%50 = OpLoad %int %val -%51 = OpIAdd %int %50 %int_1 -OpStore %val %51 -OpBranch %33 -%33 = OpLabel -%52 = OpLoad %int %val -%54 = OpIEqual %bool %52 %int_11 -OpReturnValue %54 -OpFunctionEnd + %28 = OpFunctionParameter %_ptr_Function_int + %29 = OpLabel + %val = OpVariable %_ptr_Function_int Function + %i = OpVariable %_ptr_Function_int Function + OpStore %val %int_0 + %32 = OpLoad %int %28 + OpSelectionMerge %33 None + OpSwitch %32 %35 1 %34 + %34 = OpLabel + OpStore %i %int_0 + OpBranch %37 + %37 = OpLabel + OpLoopMerge %41 %40 None + OpBranch %38 + %38 = OpLabel + %42 = OpLoad %int %i + %44 = OpSLessThan %bool %42 %int_10 + OpBranchConditional %44 %39 %41 + %39 = OpLabel + %46 = OpLoad %int %val + %47 = OpIAdd %int %46 %int_1 + OpStore %val %47 + OpBranch %40 + %40 = OpLabel + %48 = OpLoad %int %i + %49 = OpIAdd %int %48 %int_1 + OpStore %i %49 + OpBranch %37 + %41 = OpLabel + OpBranch %35 + %35 = OpLabel + %50 = OpLoad %int %val + %51 = OpIAdd %int %50 %int_1 + OpStore %val %51 + OpBranch %33 + %33 = OpLabel + %52 = OpLoad %int %val + %54 = OpIEqual %bool %52 %int_11 + OpReturnValue %54 + OpFunctionEnd %loop_with_break_in_switch_bi = OpFunction %bool None %27 -%55 = OpFunctionParameter %_ptr_Function_int -%56 = OpLabel -%val_0 = OpVariable %_ptr_Function_int Function -%i_0 = OpVariable %_ptr_Function_int Function -OpStore %val_0 %int_0 -OpStore %i_0 %int_0 -OpBranch %59 -%59 = OpLabel -OpLoopMerge %63 %62 None -OpBranch %60 -%60 = OpLabel -%64 = OpLoad %int %i_0 -%65 = OpSLessThan %bool %64 %int_10 -OpBranchConditional %65 %61 %63 -%61 = OpLabel -%66 = OpLoad %int %55 -OpSelectionMerge %67 None -OpSwitch %66 %69 1 %68 -%68 = OpLabel -%70 = OpLoad %int %val_0 -%71 = OpIAdd %int %70 %int_1 -OpStore %val_0 %71 -OpBranch %67 -%69 = OpLabel -OpReturnValue %false -%67 = OpLabel -%73 = OpLoad %int %val_0 -%74 = OpIAdd %int %73 %int_1 -OpStore %val_0 %74 -OpBranch %62 -%62 = OpLabel -%75 = OpLoad %int %i_0 -%76 = OpIAdd %int %75 %int_1 -OpStore %i_0 %76 -OpBranch %59 -%63 = OpLabel -%77 = OpLoad %int %val_0 -%79 = OpIEqual %bool %77 %int_20 -OpReturnValue %79 -OpFunctionEnd -%main = OpFunction %v4float None %80 -%81 = OpFunctionParameter %_ptr_Function_v2float -%82 = OpLabel -%x = OpVariable %_ptr_Function_int Function -%_0_val = OpVariable %_ptr_Function_int Function -%_1_i = OpVariable %_ptr_Function_int Function -%113 = OpVariable %_ptr_Function_int Function -%119 = OpVariable %_ptr_Function_int Function -%122 = OpVariable %_ptr_Function_v4float Function -%84 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 -%86 = OpLoad %v4float %84 -%87 = OpCompositeExtract %float %86 1 -%88 = OpConvertFToS %int %87 -OpStore %x %88 -OpStore %_0_val %int_0 -OpSelectionMerge %90 None -OpSwitch %88 %92 1 %91 -%91 = OpLabel -OpStore %_1_i %int_0 -OpBranch %94 -%94 = OpLabel -OpLoopMerge %98 %97 None -OpBranch %95 -%95 = OpLabel -%99 = OpLoad %int %_1_i -%100 = OpSLessThan %bool %99 %int_10 -OpBranchConditional %100 %96 %98 -%96 = OpLabel -%101 = OpLoad %int %_0_val -%102 = OpIAdd %int %101 %int_1 -OpStore %_0_val %102 -OpBranch %98 -%97 = OpLabel -%103 = OpLoad %int %_1_i -%104 = OpIAdd %int %103 %int_1 -OpStore %_1_i %104 -OpBranch %94 -%98 = OpLabel -OpBranch %92 -%92 = OpLabel -%105 = OpLoad %int %_0_val -%106 = OpIAdd %int %105 %int_1 -OpStore %_0_val %106 -OpBranch %90 -%90 = OpLabel -%107 = OpLoad %int %_0_val -%109 = OpIEqual %bool %107 %int_2 -OpSelectionMerge %111 None -OpBranchConditional %109 %110 %111 -%110 = OpLabel -%112 = OpLoad %int %x -OpStore %113 %112 -%114 = OpFunctionCall %bool %switch_with_continue_in_loop_bi %113 -OpBranch %111 -%111 = OpLabel -%115 = OpPhi %bool %false %90 %114 %110 -OpSelectionMerge %117 None -OpBranchConditional %115 %116 %117 -%116 = OpLabel -%118 = OpLoad %int %x -OpStore %119 %118 -%120 = OpFunctionCall %bool %loop_with_break_in_switch_bi %119 -OpBranch %117 -%117 = OpLabel -%121 = OpPhi %bool %false %111 %120 %116 -OpSelectionMerge %126 None -OpBranchConditional %121 %124 %125 -%124 = OpLabel -%127 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 -%128 = OpLoad %v4float %127 -OpStore %122 %128 -OpBranch %126 -%125 = OpLabel -%129 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1 -%130 = OpLoad %v4float %129 -OpStore %122 %130 -OpBranch %126 -%126 = OpLabel -%131 = OpLoad %v4float %122 -OpReturnValue %131 -OpFunctionEnd + %55 = OpFunctionParameter %_ptr_Function_int + %56 = OpLabel + %val_0 = OpVariable %_ptr_Function_int Function + %i_0 = OpVariable %_ptr_Function_int Function + OpStore %val_0 %int_0 + OpStore %i_0 %int_0 + OpBranch %59 + %59 = OpLabel + OpLoopMerge %63 %62 None + OpBranch %60 + %60 = OpLabel + %64 = OpLoad %int %i_0 + %65 = OpSLessThan %bool %64 %int_10 + OpBranchConditional %65 %61 %63 + %61 = OpLabel + %66 = OpLoad %int %55 + OpSelectionMerge %67 None + OpSwitch %66 %69 1 %68 + %68 = OpLabel + %70 = OpLoad %int %val_0 + %71 = OpIAdd %int %70 %int_1 + OpStore %val_0 %71 + OpBranch %67 + %69 = OpLabel + OpReturnValue %false + %67 = OpLabel + %73 = OpLoad %int %val_0 + %74 = OpIAdd %int %73 %int_1 + OpStore %val_0 %74 + OpBranch %62 + %62 = OpLabel + %75 = OpLoad %int %i_0 + %76 = OpIAdd %int %75 %int_1 + OpStore %i_0 %76 + OpBranch %59 + %63 = OpLabel + %77 = OpLoad %int %val_0 + %79 = OpIEqual %bool %77 %int_20 + OpReturnValue %79 + OpFunctionEnd + %main = OpFunction %v4float None %80 + %81 = OpFunctionParameter %_ptr_Function_v2float + %82 = OpLabel + %x = OpVariable %_ptr_Function_int Function + %_0_val = OpVariable %_ptr_Function_int Function + %_1_i = OpVariable %_ptr_Function_int Function + %113 = OpVariable %_ptr_Function_int Function + %119 = OpVariable %_ptr_Function_int Function + %122 = OpVariable %_ptr_Function_v4float Function + %84 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 + %86 = OpLoad %v4float %84 + %87 = OpCompositeExtract %float %86 1 + %88 = OpConvertFToS %int %87 + OpStore %x %88 + OpStore %_0_val %int_0 + OpSelectionMerge %90 None + OpSwitch %88 %92 1 %91 + %91 = OpLabel + OpStore %_1_i %int_0 + OpBranch %94 + %94 = OpLabel + OpLoopMerge %98 %97 None + OpBranch %95 + %95 = OpLabel + %99 = OpLoad %int %_1_i + %100 = OpSLessThan %bool %99 %int_10 + OpBranchConditional %100 %96 %98 + %96 = OpLabel + %101 = OpLoad %int %_0_val + %102 = OpIAdd %int %101 %int_1 + OpStore %_0_val %102 + OpBranch %98 + %97 = OpLabel + %103 = OpLoad %int %_1_i + %104 = OpIAdd %int %103 %int_1 + OpStore %_1_i %104 + OpBranch %94 + %98 = OpLabel + OpBranch %92 + %92 = OpLabel + %105 = OpLoad %int %_0_val + %106 = OpIAdd %int %105 %int_1 + OpStore %_0_val %106 + OpBranch %90 + %90 = OpLabel + %107 = OpLoad %int %_0_val + %109 = OpIEqual %bool %107 %int_2 + OpSelectionMerge %111 None + OpBranchConditional %109 %110 %111 + %110 = OpLabel + %112 = OpLoad %int %x + OpStore %113 %112 + %114 = OpFunctionCall %bool %switch_with_continue_in_loop_bi %113 + OpBranch %111 + %111 = OpLabel + %115 = OpPhi %bool %false %90 %114 %110 + OpSelectionMerge %117 None + OpBranchConditional %115 %116 %117 + %116 = OpLabel + %118 = OpLoad %int %x + OpStore %119 %118 + %120 = OpFunctionCall %bool %loop_with_break_in_switch_bi %119 + OpBranch %117 + %117 = OpLabel + %121 = OpPhi %bool %false %111 %120 %116 + OpSelectionMerge %126 None + OpBranchConditional %121 %124 %125 + %124 = OpLabel + %127 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 + %128 = OpLoad %v4float %127 + OpStore %122 %128 + OpBranch %126 + %125 = OpLabel + %129 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1 + %130 = OpLoad %v4float %129 + OpStore %122 %130 + OpBranch %126 + %126 = OpLabel + %131 = OpLoad %v4float %122 + OpReturnValue %131 + OpFunctionEnd diff --git a/tests/sksl/shared/SwizzleAsLValue.asm.frag b/tests/sksl/shared/SwizzleAsLValue.asm.frag index a7f791d69d8a..93b6f1575ad4 100644 --- a/tests/sksl/shared/SwizzleAsLValue.asm.frag +++ b/tests/sksl/shared/SwizzleAsLValue.asm.frag @@ -1,135 +1,206 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %color "color" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %32 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %83 RelaxedPrecision -OpDecorate %84 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %scalar "scalar" + OpName %array "array" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %_arr_v4float_int_1 ArrayStride 16 + OpDecorate %36 RelaxedPrecision + OpDecorate %79 RelaxedPrecision + OpDecorate %134 RelaxedPrecision + OpDecorate %136 RelaxedPrecision + OpDecorate %137 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float + %int = OpTypeInt 32 1 + %int_1 = OpConstant %int 1 +%_arr_v4float_int_1 = OpTypeArray %v4float %int_1 +%_ptr_Function__arr_v4float_int_1 = OpTypePointer Function %_arr_v4float_int_1 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%float_0_5 = OpConstant %float 0.5 -%float_2 = OpConstant %float 2 + %int_0 = OpConstant %int 0 + %float_0_5 = OpConstant %float 0.5 + %float_2 = OpConstant %float 2 %_ptr_Function_float = OpTypePointer Function %float -%int_3 = OpConstant %int 3 -%int_1 = OpConstant %int 1 -%float_4 = OpConstant %float 4 -%v3float = OpTypeVector %float 3 -%47 = OpConstantComposite %v3float %float_0_5 %float_0_5 %float_0_5 -%float_0_25 = OpConstant %float 0.25 -%float_0_75 = OpConstant %float 0.75 -%55 = OpConstantComposite %v4float %float_0_25 %float_0 %float_0 %float_0_75 -%float_1 = OpConstant %float 1 -%72 = OpConstantComposite %v4float %float_1 %float_1 %float_0_25 %float_1 -%v4bool = OpTypeVector %bool 4 + %int_3 = OpConstant %int 3 + %float_4 = OpConstant %float 4 + %v3float = OpTypeVector %float 3 + %50 = OpConstantComposite %v3float %float_0_5 %float_0 %float_0 + %51 = OpConstantComposite %v3float %float_0 %float_0_5 %float_0 + %52 = OpConstantComposite %v3float %float_0 %float_0 %float_0_5 +%mat3v3float = OpTypeMatrix %v3float 3 + %54 = OpConstantComposite %mat3v3float %50 %51 %52 + %float_0_25 = OpConstant %float 0.25 + %float_0_75 = OpConstant %float 0.75 + %62 = OpConstantComposite %v4float %float_0_25 %float_0 %float_0 %float_0_75 + %float_1 = OpConstant %float 1 + %false = OpConstantFalse %bool + %118 = OpConstantComposite %v4float %float_1 %float_1 %float_0_25 %float_1 + %v4bool = OpTypeVector %bool 4 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%color = OpVariable %_ptr_Function_v4float Function -%64 = OpVariable %_ptr_Function_float Function -%76 = OpVariable %_ptr_Function_v4float Function -%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %28 -%34 = OpVectorTimesScalar %v4float %32 %float_0_5 -OpStore %color %34 -%36 = OpAccessChain %_ptr_Function_float %color %int_3 -OpStore %36 %float_2 -%39 = OpAccessChain %_ptr_Function_float %color %int_1 -%41 = OpLoad %float %39 -%43 = OpFMul %float %41 %float_4 -OpStore %39 %43 -%44 = OpLoad %v4float %color -%45 = OpVectorShuffle %v3float %44 %44 1 2 3 -%48 = OpFMul %v3float %45 %47 -%49 = OpLoad %v4float %color -%50 = OpVectorShuffle %v4float %49 %48 0 4 5 6 -OpStore %color %50 -%51 = OpLoad %v4float %color -%52 = OpVectorShuffle %v4float %51 %51 2 1 3 0 -%56 = OpFAdd %v4float %52 %55 -%57 = OpLoad %v4float %color -%58 = OpVectorShuffle %v4float %57 %56 7 5 4 6 -OpStore %color %58 -%59 = OpAccessChain %_ptr_Function_float %color %int_0 -%60 = OpLoad %float %59 -%61 = OpCompositeExtract %float %58 3 -%63 = OpFOrdLessThanEqual %bool %61 %float_1 -OpSelectionMerge %67 None -OpBranchConditional %63 %65 %66 -%65 = OpLabel -%68 = OpCompositeExtract %float %58 2 -OpStore %64 %68 -OpBranch %67 -%66 = OpLabel -OpStore %64 %float_0 -OpBranch %67 -%67 = OpLabel -%69 = OpLoad %float %64 -%70 = OpFAdd %float %60 %69 -OpStore %59 %70 -%71 = OpLoad %v4float %color -%73 = OpFOrdEqual %v4bool %71 %72 -%75 = OpAll %bool %73 -OpSelectionMerge %79 None -OpBranchConditional %75 %77 %78 -%77 = OpLabel -%80 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%81 = OpLoad %v4float %80 -OpStore %76 %81 -OpBranch %79 -%78 = OpLabel -%82 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%83 = OpLoad %v4float %82 -OpStore %76 %83 -OpBranch %79 -%79 = OpLabel -%84 = OpLoad %v4float %76 -OpReturnValue %84 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %scalar = OpVariable %_ptr_Function_v4float Function + %array = OpVariable %_ptr_Function__arr_v4float_int_1 Function + %71 = OpVariable %_ptr_Function_float Function + %107 = OpVariable %_ptr_Function_float Function + %129 = OpVariable %_ptr_Function_v4float Function + %33 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %36 = OpLoad %v4float %33 + %38 = OpVectorTimesScalar %v4float %36 %float_0_5 + OpStore %scalar %38 + %40 = OpAccessChain %_ptr_Function_float %scalar %int_3 + OpStore %40 %float_2 + %43 = OpAccessChain %_ptr_Function_float %scalar %int_1 + %44 = OpLoad %float %43 + %46 = OpFMul %float %44 %float_4 + OpStore %43 %46 + %47 = OpLoad %v4float %scalar + %48 = OpVectorShuffle %v3float %47 %47 1 2 3 + %55 = OpVectorTimesMatrix %v3float %48 %54 + %56 = OpLoad %v4float %scalar + %57 = OpVectorShuffle %v4float %56 %55 0 4 5 6 + OpStore %scalar %57 + %58 = OpLoad %v4float %scalar + %59 = OpVectorShuffle %v4float %58 %58 2 1 3 0 + %63 = OpFAdd %v4float %59 %62 + %64 = OpLoad %v4float %scalar + %65 = OpVectorShuffle %v4float %64 %63 7 5 4 6 + OpStore %scalar %65 + %66 = OpAccessChain %_ptr_Function_float %scalar %int_0 + %67 = OpLoad %float %66 + %68 = OpCompositeExtract %float %65 3 + %70 = OpFOrdLessThanEqual %bool %68 %float_1 + OpSelectionMerge %74 None + OpBranchConditional %70 %72 %73 + %72 = OpLabel + %75 = OpCompositeExtract %float %65 2 + OpStore %71 %75 + OpBranch %74 + %73 = OpLabel + OpStore %71 %float_0 + OpBranch %74 + %74 = OpLabel + %76 = OpLoad %float %71 + %77 = OpFAdd %float %67 %76 + OpStore %66 %77 + %78 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %79 = OpLoad %v4float %78 + %80 = OpVectorTimesScalar %v4float %79 %float_0_5 + %81 = OpAccessChain %_ptr_Function_v4float %array %int_0 + OpStore %81 %80 + %82 = OpAccessChain %_ptr_Function_v4float %array %int_0 + %83 = OpAccessChain %_ptr_Function_float %82 %int_3 + OpStore %83 %float_2 + %84 = OpAccessChain %_ptr_Function_v4float %array %int_0 + %85 = OpAccessChain %_ptr_Function_float %84 %int_1 + %86 = OpLoad %float %85 + %87 = OpFMul %float %86 %float_4 + OpStore %85 %87 + %88 = OpAccessChain %_ptr_Function_v4float %array %int_0 + %89 = OpLoad %v4float %88 + %90 = OpVectorShuffle %v3float %89 %89 1 2 3 + %91 = OpVectorTimesMatrix %v3float %90 %54 + %92 = OpLoad %v4float %88 + %93 = OpVectorShuffle %v4float %92 %91 0 4 5 6 + OpStore %88 %93 + %94 = OpAccessChain %_ptr_Function_v4float %array %int_0 + %95 = OpLoad %v4float %94 + %96 = OpVectorShuffle %v4float %95 %95 2 1 3 0 + %97 = OpFAdd %v4float %96 %62 + %98 = OpLoad %v4float %94 + %99 = OpVectorShuffle %v4float %98 %97 7 5 4 6 + OpStore %94 %99 + %100 = OpAccessChain %_ptr_Function_v4float %array %int_0 + %101 = OpAccessChain %_ptr_Function_float %100 %int_0 + %102 = OpLoad %float %101 + %103 = OpAccessChain %_ptr_Function_v4float %array %int_0 + %104 = OpLoad %v4float %103 + %105 = OpCompositeExtract %float %104 3 + %106 = OpFOrdLessThanEqual %bool %105 %float_1 + OpSelectionMerge %110 None + OpBranchConditional %106 %108 %109 + %108 = OpLabel + %111 = OpAccessChain %_ptr_Function_v4float %array %int_0 + %112 = OpLoad %v4float %111 + %113 = OpCompositeExtract %float %112 2 + OpStore %107 %113 + OpBranch %110 + %109 = OpLabel + OpStore %107 %float_0 + OpBranch %110 + %110 = OpLabel + %114 = OpLoad %float %107 + %115 = OpFAdd %float %102 %114 + OpStore %101 %115 + %117 = OpLoad %v4float %scalar + %119 = OpFOrdEqual %v4bool %117 %118 + %121 = OpAll %bool %119 + OpSelectionMerge %123 None + OpBranchConditional %121 %122 %123 + %122 = OpLabel + %124 = OpAccessChain %_ptr_Function_v4float %array %int_0 + %125 = OpLoad %v4float %124 + %126 = OpFOrdEqual %v4bool %125 %118 + %127 = OpAll %bool %126 + OpBranch %123 + %123 = OpLabel + %128 = OpPhi %bool %false %110 %127 %122 + OpSelectionMerge %132 None + OpBranchConditional %128 %130 %131 + %130 = OpLabel + %133 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %134 = OpLoad %v4float %133 + OpStore %129 %134 + OpBranch %132 + %131 = OpLabel + %135 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %136 = OpLoad %v4float %135 + OpStore %129 %136 + OpBranch %132 + %132 = OpLabel + %137 = OpLoad %v4float %129 + OpReturnValue %137 + OpFunctionEnd diff --git a/tests/sksl/shared/SwizzleAsLValue.glsl b/tests/sksl/shared/SwizzleAsLValue.glsl index 457463173ca8..af492bc108a9 100644 --- a/tests/sksl/shared/SwizzleAsLValue.glsl +++ b/tests/sksl/shared/SwizzleAsLValue.glsl @@ -3,11 +3,19 @@ out vec4 sk_FragColor; uniform vec4 colorGreen; uniform vec4 colorRed; vec4 main() { - vec4 color = colorGreen * 0.5; - color.w = 2.0; - color.y *= 4.0; - color.yzw *= vec3(0.5); - color.zywx += vec4(0.25, 0.0, 0.0, 0.75); - color.x += color.w <= 1.0 ? color.z : 0.0; - return color == vec4(1.0, 1.0, 0.25, 1.0) ? colorGreen : colorRed; + vec4 scalar; + vec4 array[1]; + scalar = colorGreen * 0.5; + scalar.w = 2.0; + scalar.y *= 4.0; + scalar.yzw *= mat3(0.5); + scalar.zywx += vec4(0.25, 0.0, 0.0, 0.75); + scalar.x += scalar.w <= 1.0 ? scalar.z : 0.0; + array[0] = colorGreen * 0.5; + array[0].w = 2.0; + array[0].y *= 4.0; + array[0].yzw *= mat3(0.5); + array[0].zywx += vec4(0.25, 0.0, 0.0, 0.75); + array[0].x += array[0].w <= 1.0 ? array[0].z : 0.0; + return scalar == vec4(1.0, 1.0, 0.25, 1.0) && array[0] == vec4(1.0, 1.0, 0.25, 1.0) ? colorGreen : colorRed; } diff --git a/tests/sksl/shared/SwizzleAsLValue.hlsl b/tests/sksl/shared/SwizzleAsLValue.hlsl index f55ceceed686..3ab0f3dcd75d 100644 --- a/tests/sksl/shared/SwizzleAsLValue.hlsl +++ b/tests/sksl/shared/SwizzleAsLValue.hlsl @@ -14,36 +14,63 @@ struct SPIRV_Cross_Output float4 main(float2 _24) { - float4 color = _10_colorGreen * 0.5f; - color.w = 2.0f; - color.y *= 4.0f; - float3 _48 = color.yzw * 0.5f.xxx; - color = float4(color.x, _48.x, _48.y, _48.z); - float4 _51 = color; - float4 _56 = _51.zywx + float4(0.25f, 0.0f, 0.0f, 0.75f); - float4 _57 = color; - float4 _58 = float4(_56.w, _56.y, _56.x, _56.z); - color = _58; - float _64 = 0.0f; - if (_58.w <= 1.0f) - { - _64 = _58.z; + float4 scalar = _10_colorGreen * 0.5f; + scalar.w = 2.0f; + scalar.y *= 4.0f; + float3 _55 = mul(float3x3(float3(0.5f, 0.0f, 0.0f), float3(0.0f, 0.5f, 0.0f), float3(0.0f, 0.0f, 0.5f)), scalar.yzw); + scalar = float4(scalar.x, _55.x, _55.y, _55.z); + float4 _58 = scalar; + float4 _63 = _58.zywx + float4(0.25f, 0.0f, 0.0f, 0.75f); + float4 _64 = scalar; + float4 _65 = float4(_63.w, _63.y, _63.x, _63.z); + scalar = _65; + float _71 = 0.0f; + if (_65.w <= 1.0f) + { + _71 = _65.z; + } + else + { + _71 = 0.0f; + } + scalar.x += _71; + float4 array[1] = { 0.0f.xxxx }; + array[0] = _10_colorGreen * 0.5f; + array[0].w = 2.0f; + array[0].y *= 4.0f; + float3 _91 = mul(float3x3(float3(0.5f, 0.0f, 0.0f), float3(0.0f, 0.5f, 0.0f), float3(0.0f, 0.0f, 0.5f)), array[0].yzw); + array[0] = float4(array[0].x, _91.x, _91.y, _91.z); + float4 _97 = array[0].zywx + float4(0.25f, 0.0f, 0.0f, 0.75f); + array[0] = float4(_97.w, _97.y, _97.x, _97.z); + float _107 = 0.0f; + if (array[0].w <= 1.0f) + { + _107 = array[0].z; + } + else + { + _107 = 0.0f; + } + array[0].x += _107; + bool _128 = false; + if (all(bool4(scalar.x == float4(1.0f, 1.0f, 0.25f, 1.0f).x, scalar.y == float4(1.0f, 1.0f, 0.25f, 1.0f).y, scalar.z == float4(1.0f, 1.0f, 0.25f, 1.0f).z, scalar.w == float4(1.0f, 1.0f, 0.25f, 1.0f).w))) + { + _128 = all(bool4(array[0].x == float4(1.0f, 1.0f, 0.25f, 1.0f).x, array[0].y == float4(1.0f, 1.0f, 0.25f, 1.0f).y, array[0].z == float4(1.0f, 1.0f, 0.25f, 1.0f).z, array[0].w == float4(1.0f, 1.0f, 0.25f, 1.0f).w)); } else { - _64 = 0.0f; + _128 = false; } - color.x += _64; - float4 _76 = 0.0f.xxxx; - if (all(bool4(color.x == float4(1.0f, 1.0f, 0.25f, 1.0f).x, color.y == float4(1.0f, 1.0f, 0.25f, 1.0f).y, color.z == float4(1.0f, 1.0f, 0.25f, 1.0f).z, color.w == float4(1.0f, 1.0f, 0.25f, 1.0f).w))) + float4 _129 = 0.0f.xxxx; + if (_128) { - _76 = _10_colorGreen; + _129 = _10_colorGreen; } else { - _76 = _10_colorRed; + _129 = _10_colorRed; } - return _76; + return _129; } void frag_main() diff --git a/tests/sksl/shared/SwizzleAsLValue.metal b/tests/sksl/shared/SwizzleAsLValue.metal index 270a577489f7..279398f49d29 100644 --- a/tests/sksl/shared/SwizzleAsLValue.metal +++ b/tests/sksl/shared/SwizzleAsLValue.metal @@ -13,12 +13,20 @@ struct Outputs { fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) { Outputs _out; (void)_out; - float4 color = float4(_uniforms.colorGreen) * 0.5; - color.w = 2.0; - color.y = color.y * 4.0; - color.yzw = color.yzw * float3(0.5); - color.zywx = color.zywx + float4(0.25, 0.0, 0.0, 0.75); - color.x = color.x + (color.w <= 1.0 ? color.z : 0.0); - _out.sk_FragColor = all(color == float4(1.0, 1.0, 0.25, 1.0)) ? _uniforms.colorGreen : _uniforms.colorRed; + float4 scalar; + array array; + scalar = float4(_uniforms.colorGreen) * 0.5; + scalar.w = 2.0; + scalar.y = scalar.y * 4.0; + scalar.yzw = scalar.yzw * float3x3(0.5); + scalar.zywx = scalar.zywx + float4(0.25, 0.0, 0.0, 0.75); + scalar.x = scalar.x + (scalar.w <= 1.0 ? scalar.z : 0.0); + array[0] = float4(_uniforms.colorGreen) * 0.5; + array[0].w = 2.0; + array[0].y = array[0].y * 4.0; + array[0].yzw = array[0].yzw * float3x3(0.5); + array[0].zywx = array[0].zywx + float4(0.25, 0.0, 0.0, 0.75); + array[0].x = array[0].x + (array[0].w <= 1.0 ? array[0].z : 0.0); + _out.sk_FragColor = all(scalar == float4(1.0, 1.0, 0.25, 1.0)) && all(array[0] == float4(1.0, 1.0, 0.25, 1.0)) ? _uniforms.colorGreen : _uniforms.colorRed; return _out; } diff --git a/tests/sksl/shared/SwizzleAsLValue.skrp b/tests/sksl/shared/SwizzleAsLValue.skrp index f6db1efb64ba..ffeab429979e 100644 --- a/tests/sksl/shared/SwizzleAsLValue.skrp +++ b/tests/sksl/shared/SwizzleAsLValue.skrp @@ -1,37 +1,82 @@ +72 instructions + +[immutable slots] +i0 = 0x3E800000 (0.25) +i1 = 0 +i2 = 0 +i3 = 0x3F400000 (0.75) +i4 = 0x3F800000 (1.0) +i5 = 0x3F800000 (1.0) +i6 = 0x3E800000 (0.25) +i7 = 0x3F800000 (1.0) + store_src_rg v0..1 = src.rg init_lane_masks CondMask = LoopMask = RetMask = true +splat_4_constants scalar = 0 +splat_4_constants array[0] = 0 copy_4_uniforms $0..3 = colorGreen splat_4_constants $4..7 = 0x3F000000 (0.5) mul_4_floats $0..3 *= $4..7 -copy_4_slots_unmasked color = $0..3 -copy_constant color(3) = 0x40000000 (2.0) -mul_imm_float color(1) *= 0x40800000 (4.0) -copy_3_slots_unmasked $0..2 = color(1..3) -splat_3_constants $3..5 = 0x3F000000 (0.5) -mul_3_floats $0..2 *= $3..5 -copy_3_slots_unmasked color(1..3) = $0..2 -copy_4_slots_unmasked $0..3 = color +copy_4_slots_unmasked scalar = $0..3 +copy_constant scalar(3) = 0x40000000 (2.0) +mul_imm_float scalar(1) *= 0x40800000 (4.0) +copy_3_slots_unmasked $3..5 = scalar(1..3) +copy_constant $6 = 0 +copy_constant $7 = 0x3F000000 (0.5) +shuffle $6..14 = ($6..14)[1 0 0 0 1 0 0 0 1] +matrix_multiply_3 mat3x1($0..2) = mat3x1($3..5) * mat3x3($6..14) +copy_3_slots_unmasked scalar(1..3) = $0..2 +copy_4_slots_unmasked $0..3 = scalar swizzle_4 $0..3 = ($0..3).zywx -copy_constant $4 = 0x3E800000 (0.25) -splat_2_constants $5..6 = 0 -copy_constant $7 = 0x3F400000 (0.75) +copy_4_immutables_unmasked $4..7 = i0..3 [0x3E800000 (0.25), 0, 0, 0x3F400000 (0.75)] add_4_floats $0..3 += $4..7 -swizzle_copy_4_slots_masked (color).zywx = Mask($0..3) -copy_slot_unmasked $0 = color(0) -copy_slot_unmasked $1 = color(3) +swizzle_copy_4_slots_masked (scalar).zywx = Mask($0..3) +copy_slot_unmasked $0 = scalar(0) +copy_slot_unmasked $1 = scalar(3) cmple_imm_float $1 = lessThanEqual($1, 0x3F800000 (1.0)) copy_constant $2 = 0 -copy_slot_unmasked $3 = color(2) +copy_slot_unmasked $3 = scalar(2) mix_int $1 = mix($2, $3, $1) add_float $0 += $1 -copy_slot_unmasked color(0) = $0 -copy_4_slots_unmasked $0..3 = color -splat_2_constants $4..5 = 0x3F800000 (1.0) -copy_constant $6 = 0x3E800000 (0.25) -copy_constant $7 = 0x3F800000 (1.0) +copy_slot_unmasked scalar(0) = $0 +copy_4_uniforms $0..3 = colorGreen +splat_4_constants $4..7 = 0x3F000000 (0.5) +mul_4_floats $0..3 *= $4..7 +copy_4_slots_unmasked array[0] = $0..3 +copy_constant array[0](3) = 0x40000000 (2.0) +mul_imm_float array[0](1) *= 0x40800000 (4.0) +copy_3_slots_unmasked $3..5 = array[0](1..3) +copy_constant $6 = 0 +copy_constant $7 = 0x3F000000 (0.5) +shuffle $6..14 = ($6..14)[1 0 0 0 1 0 0 0 1] +matrix_multiply_3 mat3x1($0..2) = mat3x1($3..5) * mat3x3($6..14) +copy_3_slots_unmasked array[0](1..3) = $0..2 +copy_4_slots_unmasked $0..3 = array[0] +swizzle_4 $0..3 = ($0..3).zywx +copy_4_immutables_unmasked $4..7 = i0..3 [0x3E800000 (0.25), 0, 0, 0x3F400000 (0.75)] +add_4_floats $0..3 += $4..7 +swizzle_copy_4_slots_masked (array[0]).zywx = Mask($0..3) +copy_slot_unmasked $0 = array[0](0) +copy_4_slots_unmasked $1..4 = array[0] +swizzle_1 $1 = ($1..4).w +cmple_imm_float $1 = lessThanEqual($1, 0x3F800000 (1.0)) +copy_constant $2 = 0 +copy_4_slots_unmasked $3..6 = array[0] +swizzle_1 $3 = ($3..5).z +mix_int $1 = mix($2, $3, $1) +add_float $0 += $1 +copy_slot_unmasked array[0](0) = $0 +copy_4_slots_unmasked $0..3 = scalar +copy_4_immutables_unmasked $4..7 = i4..7 [0x3F800000 (1.0), 0x3F800000 (1.0), 0x3E800000 (0.25), 0x3F800000 (1.0)] cmpeq_4_floats $0..3 = equal($0..3, $4..7) bitwise_and_2_ints $0..1 &= $2..3 bitwise_and_int $0 &= $1 +copy_4_slots_unmasked $1..4 = array[0] +copy_4_immutables_unmasked $5..8 = i4..7 [0x3F800000 (1.0), 0x3F800000 (1.0), 0x3E800000 (0.25), 0x3F800000 (1.0)] +cmpeq_4_floats $1..4 = equal($1..4, $5..8) +bitwise_and_2_ints $1..2 &= $3..4 +bitwise_and_int $1 &= $2 +bitwise_and_int $0 &= $1 swizzle_4 $0..3 = ($0..3).xxxx copy_4_uniforms $4..7 = colorRed copy_4_uniforms $8..11 = colorGreen diff --git a/tests/sksl/shared/SwizzleAsLValue.wgsl b/tests/sksl/shared/SwizzleAsLValue.wgsl index 054ac0fe80c1..375789e54faf 100644 --- a/tests/sksl/shared/SwizzleAsLValue.wgsl +++ b/tests/sksl/shared/SwizzleAsLValue.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -12,13 +13,21 @@ struct _GlobalUniforms { @binding(0) @group(0) var _globalUniforms: _GlobalUniforms; fn main(_skParam0: vec2) -> vec4 { { - var color: vec4 = vec4(_globalUniforms.colorGreen) * 0.5; - color.w = 2.0; - color.y = color.y * 4.0; - color = vec4((color.yzw * vec3(0.5)), color.x).wxyz; - color = (color.zywx + vec4(0.25, 0.0, 0.0, 0.75)).wyxz; - color.x = color.x + (select(0.0, color.z, color.w <= 1.0)); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(all(color == vec4(1.0, 1.0, 0.25, 1.0)))); + var scalar: vec4; + var _array: array, 1>; + scalar = vec4(_globalUniforms.colorGreen) * 0.5; + scalar.w = 2.0; + scalar.y = scalar.y * 4.0; + scalar = vec4((scalar.yzw * mat3x3(0.5, 0.0, 0.0, 0.0, 0.5, 0.0, 0.0, 0.0, 0.5)), scalar.x).wxyz; + scalar = (scalar.zywx + vec4(0.25, 0.0, 0.0, 0.75)).wyxz; + scalar.x = scalar.x + (select(0.0, scalar.z, scalar.w <= 1.0)); + _array[0] = vec4(_globalUniforms.colorGreen) * 0.5; + _array[0].w = 2.0; + _array[0].y = _array[0].y * 4.0; + _array[0] = vec4((_array[0].yzw * mat3x3(0.5, 0.0, 0.0, 0.0, 0.5, 0.0, 0.0, 0.0, 0.5)), _array[0].x).wxyz; + _array[0] = (_array[0].zywx + vec4(0.25, 0.0, 0.0, 0.75)).wyxz; + _array[0].x = _array[0].x + (select(0.0, _array[0].z, _array[0].w <= 1.0)); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(all(scalar == vec4(1.0, 1.0, 0.25, 1.0)) && all(_array[0] == vec4(1.0, 1.0, 0.25, 1.0)))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/shared/SwizzleAsLValueES3.asm.frag b/tests/sksl/shared/SwizzleAsLValueES3.asm.frag new file mode 100644 index 000000000000..b1b044383144 --- /dev/null +++ b/tests/sksl/shared/SwizzleAsLValueES3.asm.frag @@ -0,0 +1,186 @@ + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %gAccessCount "gAccessCount" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %Z_i "Z_i" + OpName %main "main" + OpName %array "array" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %15 Binding 0 + OpDecorate %15 DescriptorSet 0 + OpDecorate %_arr_v4float_int_1 ArrayStride 16 + OpDecorate %41 RelaxedPrecision + OpDecorate %122 RelaxedPrecision + OpDecorate %124 RelaxedPrecision + OpDecorate %125 RelaxedPrecision + %bool = OpTypeBool +%_ptr_Input_bool = OpTypePointer Input %bool +%sk_Clockwise = OpVariable %_ptr_Input_bool Input + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 +%_ptr_Output_v4float = OpTypePointer Output %v4float +%sk_FragColor = OpVariable %_ptr_Output_v4float Output + %int = OpTypeInt 32 1 +%_ptr_Private_int = OpTypePointer Private %int +%gAccessCount = OpVariable %_ptr_Private_int Private + %int_0 = OpConstant %int 0 +%_UniformBuffer = OpTypeStruct %v4float %v4float +%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer + %15 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %20 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %24 = OpConstantComposite %v2float %float_0 %float_0 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %28 = OpTypeFunction %int + %int_1 = OpConstant %int 1 + %33 = OpTypeFunction %v4float %_ptr_Function_v2float +%_arr_v4float_int_1 = OpTypeArray %v4float %int_1 +%_ptr_Function__arr_v4float_int_1 = OpTypePointer Function %_arr_v4float_int_1 +%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float + %float_0_5 = OpConstant %float 0.5 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %float_2 = OpConstant %float 2 +%_ptr_Function_float = OpTypePointer Function %float + %int_3 = OpConstant %int 3 + %float_4 = OpConstant %float 4 + %v3float = OpTypeVector %float 3 + %64 = OpConstantComposite %v3float %float_0_5 %float_0 %float_0 + %65 = OpConstantComposite %v3float %float_0 %float_0_5 %float_0 + %66 = OpConstantComposite %v3float %float_0 %float_0 %float_0_5 +%mat3v3float = OpTypeMatrix %v3float 3 + %68 = OpConstantComposite %mat3v3float %64 %65 %66 + %float_0_25 = OpConstant %float 0.25 + %float_0_75 = OpConstant %float 0.75 + %78 = OpConstantComposite %v4float %float_0_25 %float_0 %float_0 %float_0_75 + %float_1 = OpConstant %float 1 + %false = OpConstantFalse %bool + %int_8 = OpConstant %int 8 + %112 = OpConstantComposite %v4float %float_1 %float_1 %float_0_25 %float_1 + %v4bool = OpTypeVector %bool 4 +%_entrypoint_v = OpFunction %void None %20 + %21 = OpLabel + %25 = OpVariable %_ptr_Function_v2float Function + OpStore %25 %24 + %27 = OpFunctionCall %v4float %main %25 + OpStore %sk_FragColor %27 + OpReturn + OpFunctionEnd + %Z_i = OpFunction %int None %28 + %29 = OpLabel + %31 = OpLoad %int %gAccessCount + %32 = OpIAdd %int %31 %int_1 + OpStore %gAccessCount %32 + OpReturnValue %int_0 + OpFunctionEnd + %main = OpFunction %v4float None %33 + %34 = OpFunctionParameter %_ptr_Function_v2float + %35 = OpLabel + %array = OpVariable %_ptr_Function__arr_v4float_int_1 Function + %92 = OpVariable %_ptr_Function_float Function + %117 = OpVariable %_ptr_Function_v4float Function + OpStore %gAccessCount %int_0 + %39 = OpAccessChain %_ptr_Uniform_v4float %15 %int_0 + %41 = OpLoad %v4float %39 + %43 = OpVectorTimesScalar %v4float %41 %float_0_5 + %44 = OpFunctionCall %int %Z_i + %45 = OpAccessChain %_ptr_Function_v4float %array %44 + OpStore %45 %43 + %48 = OpFunctionCall %int %Z_i + %49 = OpAccessChain %_ptr_Function_v4float %array %48 + %50 = OpAccessChain %_ptr_Function_float %49 %int_3 + OpStore %50 %float_2 + %53 = OpFunctionCall %int %Z_i + %54 = OpAccessChain %_ptr_Function_v4float %array %53 + %55 = OpAccessChain %_ptr_Function_float %54 %int_1 + %56 = OpLoad %float %55 + %58 = OpFMul %float %56 %float_4 + OpStore %55 %58 + %59 = OpFunctionCall %int %Z_i + %60 = OpAccessChain %_ptr_Function_v4float %array %59 + %61 = OpLoad %v4float %60 + %62 = OpVectorShuffle %v3float %61 %61 1 2 3 + %69 = OpVectorTimesMatrix %v3float %62 %68 + %70 = OpLoad %v4float %60 + %71 = OpVectorShuffle %v4float %70 %69 0 4 5 6 + OpStore %60 %71 + %72 = OpFunctionCall %int %Z_i + %73 = OpAccessChain %_ptr_Function_v4float %array %72 + %74 = OpLoad %v4float %73 + %75 = OpVectorShuffle %v4float %74 %74 2 1 3 0 + %79 = OpFAdd %v4float %75 %78 + %80 = OpLoad %v4float %73 + %81 = OpVectorShuffle %v4float %80 %79 7 5 4 6 + OpStore %73 %81 + %82 = OpFunctionCall %int %Z_i + %83 = OpAccessChain %_ptr_Function_v4float %array %82 + %84 = OpAccessChain %_ptr_Function_float %83 %int_0 + %85 = OpLoad %float %84 + %86 = OpFunctionCall %int %Z_i + %87 = OpAccessChain %_ptr_Function_v4float %array %86 + %88 = OpLoad %v4float %87 + %89 = OpCompositeExtract %float %88 3 + %91 = OpFOrdLessThanEqual %bool %89 %float_1 + OpSelectionMerge %95 None + OpBranchConditional %91 %93 %94 + %93 = OpLabel + %96 = OpFunctionCall %int %Z_i + %97 = OpAccessChain %_ptr_Function_v4float %array %96 + %98 = OpLoad %v4float %97 + %99 = OpCompositeExtract %float %98 2 + OpStore %92 %99 + OpBranch %95 + %94 = OpLabel + %100 = OpFunctionCall %int %Z_i + %101 = OpConvertSToF %float %100 + OpStore %92 %101 + OpBranch %95 + %95 = OpLabel + %102 = OpLoad %float %92 + %103 = OpFAdd %float %85 %102 + OpStore %84 %103 + %105 = OpLoad %int %gAccessCount + %107 = OpIEqual %bool %105 %int_8 + OpSelectionMerge %109 None + OpBranchConditional %107 %108 %109 + %108 = OpLabel + %110 = OpAccessChain %_ptr_Function_v4float %array %int_0 + %111 = OpLoad %v4float %110 + %113 = OpFOrdEqual %v4bool %111 %112 + %115 = OpAll %bool %113 + OpBranch %109 + %109 = OpLabel + %116 = OpPhi %bool %false %95 %115 %108 + OpSelectionMerge %120 None + OpBranchConditional %116 %118 %119 + %118 = OpLabel + %121 = OpAccessChain %_ptr_Uniform_v4float %15 %int_0 + %122 = OpLoad %v4float %121 + OpStore %117 %122 + OpBranch %120 + %119 = OpLabel + %123 = OpAccessChain %_ptr_Uniform_v4float %15 %int_1 + %124 = OpLoad %v4float %123 + OpStore %117 %124 + OpBranch %120 + %120 = OpLabel + %125 = OpLoad %v4float %117 + OpReturnValue %125 + OpFunctionEnd diff --git a/tests/sksl/shared/SwizzleAsLValueES3.glsl b/tests/sksl/shared/SwizzleAsLValueES3.glsl new file mode 100644 index 000000000000..280d2de838ed --- /dev/null +++ b/tests/sksl/shared/SwizzleAsLValueES3.glsl @@ -0,0 +1,19 @@ + +out vec4 sk_FragColor; +uniform vec4 colorGreen; +uniform vec4 colorRed; +int gAccessCount = 0; +int Z_i() { + ++gAccessCount; + return 0; +} +vec4 main() { + vec4 array[1]; + array[Z_i()] = colorGreen * 0.5; + array[Z_i()].w = 2.0; + array[Z_i()].y *= 4.0; + array[Z_i()].yzw *= mat3(0.5); + array[Z_i()].zywx += vec4(0.25, 0.0, 0.0, 0.75); + array[Z_i()].x += array[Z_i()].w <= 1.0 ? array[Z_i()].z : float(Z_i()); + return gAccessCount == 8 && array[0] == vec4(1.0, 1.0, 0.25, 1.0) ? colorGreen : colorRed; +} diff --git a/tests/sksl/shared/SwizzleAsLValueES3.hlsl b/tests/sksl/shared/SwizzleAsLValueES3.hlsl new file mode 100644 index 000000000000..8945fec517d9 --- /dev/null +++ b/tests/sksl/shared/SwizzleAsLValueES3.hlsl @@ -0,0 +1,87 @@ +cbuffer _UniformBuffer : register(b0, space0) +{ + float4 _15_colorGreen : packoffset(c0); + float4 _15_colorRed : packoffset(c1); +}; + + +static float4 sk_FragColor; + +struct SPIRV_Cross_Output +{ + float4 sk_FragColor : SV_Target0; +}; + +static int gAccessCount = 0; + +int Z_i() +{ + gAccessCount++; + return 0; +} + +float4 main(float2 _34) +{ + gAccessCount = 0; + int _44 = Z_i(); + float4 array[1] = { 0.0f.xxxx }; + array[_44] = _15_colorGreen * 0.5f; + int _48 = Z_i(); + array[_48].w = 2.0f; + int _53 = Z_i(); + array[_53].y *= 4.0f; + int _59 = Z_i(); + float3 _69 = mul(float3x3(float3(0.5f, 0.0f, 0.0f), float3(0.0f, 0.5f, 0.0f), float3(0.0f, 0.0f, 0.5f)), array[_59].yzw); + array[_59] = float4(array[_59].x, _69.x, _69.y, _69.z); + int _72 = Z_i(); + float4 _79 = array[_72].zywx + float4(0.25f, 0.0f, 0.0f, 0.75f); + array[_72] = float4(_79.w, _79.y, _79.x, _79.z); + int _82 = Z_i(); + int _86 = Z_i(); + float _92 = 0.0f; + if (array[_86].w <= 1.0f) + { + int _96 = Z_i(); + _92 = array[_96].z; + } + else + { + int _100 = Z_i(); + _92 = float(_100); + } + array[_82].x += _92; + bool _116 = false; + if (gAccessCount == 8) + { + _116 = all(bool4(array[0].x == float4(1.0f, 1.0f, 0.25f, 1.0f).x, array[0].y == float4(1.0f, 1.0f, 0.25f, 1.0f).y, array[0].z == float4(1.0f, 1.0f, 0.25f, 1.0f).z, array[0].w == float4(1.0f, 1.0f, 0.25f, 1.0f).w)); + } + else + { + _116 = false; + } + float4 _117 = 0.0f.xxxx; + if (_116) + { + _117 = _15_colorGreen; + } + else + { + _117 = _15_colorRed; + } + return _117; +} + +void frag_main() +{ + float2 _25 = 0.0f.xx; + float4 _27 = main(_25); + sk_FragColor = _27; +} + +SPIRV_Cross_Output main() +{ + frag_main(); + SPIRV_Cross_Output stage_output; + stage_output.sk_FragColor = sk_FragColor; + return stage_output; +} diff --git a/tests/sksl/shared/SwizzleAsLValueES3.metal b/tests/sksl/shared/SwizzleAsLValueES3.metal new file mode 100644 index 000000000000..cff5116f29aa --- /dev/null +++ b/tests/sksl/shared/SwizzleAsLValueES3.metal @@ -0,0 +1,38 @@ +#include +#include +using namespace metal; +struct Uniforms { + half4 colorGreen; + half4 colorRed; +}; +struct Inputs { +}; +struct Outputs { + half4 sk_FragColor [[color(0)]]; +}; +struct Globals { + int gAccessCount; +}; +int Z_i(thread Globals& _globals) { + ++_globals.gAccessCount; + return 0; +} +fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) { + Globals _globals{0}; + (void)_globals; + Outputs _out; + (void)_out; + int _skTemp0; + int _skTemp1; + int _skTemp2; + int _skTemp3; + array array; + array[Z_i(_globals)] = float4(_uniforms.colorGreen) * 0.5; + array[Z_i(_globals)].w = 2.0; +(_skTemp0 = Z_i(_globals), array[_skTemp0].y = array[_skTemp0].y * 4.0); +(_skTemp1 = Z_i(_globals), array[_skTemp1].yzw = array[_skTemp1].yzw * float3x3(0.5)); +(_skTemp2 = Z_i(_globals), array[_skTemp2].zywx = array[_skTemp2].zywx + float4(0.25, 0.0, 0.0, 0.75)); +(_skTemp3 = Z_i(_globals), array[_skTemp3].x = array[_skTemp3].x + (array[Z_i(_globals)].w <= 1.0 ? array[Z_i(_globals)].z : float(Z_i(_globals)))); + _out.sk_FragColor = _globals.gAccessCount == 8 && all(array[0] == float4(1.0, 1.0, 0.25, 1.0)) ? _uniforms.colorGreen : _uniforms.colorRed; + return _out; +} diff --git a/tests/sksl/shared/SwizzleAsLValueES3.skrp b/tests/sksl/shared/SwizzleAsLValueES3.skrp new file mode 100644 index 000000000000..f1105e982aa8 --- /dev/null +++ b/tests/sksl/shared/SwizzleAsLValueES3.skrp @@ -0,0 +1,107 @@ +86 instructions + +[immutable slots] +i0 = 0x3E800000 (0.25) +i1 = 0 +i2 = 0 +i3 = 0x3F400000 (0.75) +i4 = 0x3F800000 (1.0) +i5 = 0x3F800000 (1.0) +i6 = 0x3E800000 (0.25) +i7 = 0x3F800000 (1.0) + +store_src_rg v0..1 = src.rg +init_lane_masks CondMask = LoopMask = RetMask = true +copy_constant gAccessCount = 0 +splat_4_constants array[0] = 0 +add_imm_int gAccessCount += 0x00000001 +copy_constant $15 = 0 +label label 0 +mul_imm_int $15 *= 0x00000004 +copy_4_uniforms $0..3 = colorGreen +splat_4_constants $4..7 = 0x3F000000 (0.5) +mul_4_floats $0..3 *= $4..7 +copy_to_indirect_masked Indirect(array[0] + $15) = Mask($0..3) +add_imm_int gAccessCount += 0x00000001 +copy_constant $15 = 0 +label label 0x00000001 +mul_imm_int $15 *= 0x00000004 +copy_constant $0 = 0x40000000 (2.0) +copy_to_indirect_masked Indirect(array[0](3) + $15) = Mask($0) +add_imm_int gAccessCount += 0x00000001 +copy_constant $15 = 0 +label label 0x00000002 +mul_imm_int $15 *= 0x00000004 +copy_from_indirect_unmasked $0 = Indirect(array[0](1) + $15) +mul_imm_float $0 *= 0x40800000 (4.0) +copy_to_indirect_masked Indirect(array[0](1) + $15) = Mask($0) +add_imm_int gAccessCount += 0x00000001 +copy_constant $15 = 0 +label label 0x00000003 +mul_imm_int $15 *= 0x00000004 +copy_from_indirect_unmasked $3..5 = Indirect(array[0](1..3) + $15) +copy_constant $6 = 0 +copy_constant $7 = 0x3F000000 (0.5) +shuffle $6..14 = ($6..14)[1 0 0 0 1 0 0 0 1] +matrix_multiply_3 mat3x1($0..2) = mat3x1($3..5) * mat3x3($6..14) +copy_to_indirect_masked Indirect(array[0](1..3) + $15) = Mask($0..2) +add_imm_int gAccessCount += 0x00000001 +copy_constant $15 = 0 +label label 0x00000004 +mul_imm_int $15 *= 0x00000004 +copy_from_indirect_unmasked $0..3 = Indirect(array[0] + $15) +swizzle_4 $0..3 = ($0..3).zywx +copy_4_immutables_unmasked $4..7 = i0..3 [0x3E800000 (0.25), 0, 0, 0x3F400000 (0.75)] +add_4_floats $0..3 += $4..7 +swizzle_copy_to_indirect_maske Indirect(array[0] + $15).zywx = Mask($0..3) +add_imm_int gAccessCount += 0x00000001 +copy_constant $15 = 0 +label label 0x00000005 +mul_imm_int $15 *= 0x00000004 +copy_from_indirect_unmasked $0 = Indirect(array[0](0) + $15) +store_condition_mask $16 = CondMask +branch_if_no_lanes_active branch_if_no_lanes_active +5 (label 7 at #56) +copy_slot_unmasked $21 = gAccessCount +add_imm_int $21 += 0x00000001 +copy_slot_masked gAccessCount = Mask($21) +copy_constant $21 = 0 +label label 0x00000007 +mul_imm_int $21 *= 0x00000004 +copy_from_indirect_unmasked $17..20 = Indirect(array[0] + $21) +swizzle_1 $17 = ($17..20).w +cmple_imm_float $17 = lessThanEqual($17, 0x3F800000 (1.0)) +merge_condition_mask CondMask = $16 & $17 +branch_if_no_lanes_active branch_if_no_lanes_active +5 (label 8 at #67) +copy_slot_unmasked $21 = gAccessCount +add_imm_int $21 += 0x00000001 +copy_slot_masked gAccessCount = Mask($21) +copy_constant $21 = 0 +label label 0x00000008 +mul_imm_int $21 *= 0x00000004 +copy_from_indirect_unmasked $1..4 = Indirect(array[0] + $21) +swizzle_1 $1 = ($1..3).z +merge_inv_condition_mask CondMask = $16 & ~$17 +branch_if_no_lanes_active branch_if_no_lanes_active +5 (label 9 at #77) +copy_slot_unmasked $2 = gAccessCount +add_imm_int $2 += 0x00000001 +copy_slot_masked gAccessCount = Mask($2) +copy_constant $2 = 0 +label label 0x00000009 +cast_to_float_from_int $2 = IntToFloat($2) +copy_slot_masked $1 = Mask($2) +load_condition_mask CondMask = $16 +add_float $0 += $1 +copy_to_indirect_masked Indirect(array[0](0) + $15) = Mask($0) +copy_slot_unmasked $0 = gAccessCount +cmpeq_imm_int $0 = equal($0, 0x00000008) +copy_4_slots_unmasked $1..4 = array[0] +copy_4_immutables_unmasked $5..8 = i4..7 [0x3F800000 (1.0), 0x3F800000 (1.0), 0x3E800000 (0.25), 0x3F800000 (1.0)] +cmpeq_4_floats $1..4 = equal($1..4, $5..8) +bitwise_and_2_ints $1..2 &= $3..4 +bitwise_and_int $1 &= $2 +bitwise_and_int $0 &= $1 +swizzle_4 $0..3 = ($0..3).xxxx +copy_4_uniforms $4..7 = colorRed +copy_4_uniforms $8..11 = colorGreen +mix_4_ints $0..3 = mix($4..7, $8..11, $0..3) +load_src src.rgba = $0..3 diff --git a/tests/sksl/shared/SwizzleAsLValueES3.wgsl b/tests/sksl/shared/SwizzleAsLValueES3.wgsl new file mode 100644 index 000000000000..dbf28acd2c00 --- /dev/null +++ b/tests/sksl/shared/SwizzleAsLValueES3.wgsl @@ -0,0 +1,60 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +var gAccessCount: i32 = 0; +fn Z_i() -> i32 { + { + gAccessCount = gAccessCount + i32(1); + return 0; + } +} +fn main(_skParam0: vec2) -> vec4 { + { + var _array: array, 1>; + let _skTemp0 = Z_i(); + let _skTemp1 = _skTemp0; + _array[_skTemp1] = vec4(_globalUniforms.colorGreen) * 0.5; + let _skTemp2 = Z_i(); + let _skTemp3 = _skTemp2; + _array[_skTemp3].w = 2.0; + let _skTemp4 = Z_i(); + let _skTemp5 = _skTemp4; + _array[_skTemp5].y = _array[_skTemp5].y * 4.0; + let _skTemp6 = Z_i(); + let _skTemp7 = _skTemp6; + _array[_skTemp7] = vec4((_array[_skTemp7].yzw * mat3x3(0.5, 0.0, 0.0, 0.0, 0.5, 0.0, 0.0, 0.0, 0.5)), _array[_skTemp7].x).wxyz; + let _skTemp8 = Z_i(); + let _skTemp9 = _skTemp8; + _array[_skTemp9] = (_array[_skTemp9].zywx + vec4(0.25, 0.0, 0.0, 0.75)).wyxz; + let _skTemp10 = Z_i(); + let _skTemp11 = _skTemp10; + var _skTemp12: f32; + let _skTemp13 = Z_i(); + let _skTemp14 = _skTemp13; + if _array[_skTemp14].w <= 1.0 { + let _skTemp15 = Z_i(); + let _skTemp16 = _skTemp15; + _skTemp12 = _array[_skTemp16].z; + } else { + let _skTemp17 = Z_i(); + _skTemp12 = f32(_skTemp17); + } + _array[_skTemp11].x = _array[_skTemp11].x + _skTemp12; + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((gAccessCount == 8) && all(_array[0] == vec4(1.0, 1.0, 0.25, 1.0)))); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/SwizzleBoolConstants.asm.frag b/tests/sksl/shared/SwizzleBoolConstants.asm.frag index 55f664ae3ebf..5e0cad9032f8 100644 --- a/tests/sksl/shared/SwizzleBoolConstants.asm.frag +++ b/tests/sksl/shared/SwizzleBoolConstants.asm.frag @@ -1,185 +1,185 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %v "v" -OpName %result "result" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %33 RelaxedPrecision -OpDecorate %34 RelaxedPrecision -OpDecorate %113 RelaxedPrecision -OpDecorate %116 RelaxedPrecision -OpDecorate %117 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %v "v" + OpName %result "result" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %33 RelaxedPrecision + OpDecorate %34 RelaxedPrecision + OpDecorate %113 RelaxedPrecision + OpDecorate %116 RelaxedPrecision + OpDecorate %117 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%v4bool = OpTypeVector %bool 4 + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %v4bool = OpTypeVector %bool 4 %_ptr_Function_v4bool = OpTypePointer Function %v4bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%true = OpConstantTrue %bool -%v2bool = OpTypeVector %bool 2 -%false = OpConstantFalse %bool -%v3bool = OpTypeVector %bool 3 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %true = OpConstantTrue %bool + %v2bool = OpTypeVector %bool 2 + %false = OpConstantFalse %bool + %v3bool = OpTypeVector %bool 3 %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_1 = OpConstant %int 1 + %int_1 = OpConstant %int 1 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%v = OpVariable %_ptr_Function_v4bool Function -%result = OpVariable %_ptr_Function_v4bool Function -%107 = OpVariable %_ptr_Function_v4float Function -%29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%33 = OpLoad %v4float %29 -%34 = OpCompositeExtract %float %33 1 -%35 = OpFUnordNotEqual %bool %34 %float_0 -%36 = OpCompositeConstruct %v4bool %35 %35 %35 %35 -OpStore %v %36 -%38 = OpCompositeExtract %bool %36 0 -%40 = OpCompositeConstruct %v4bool %38 %true %true %true -OpStore %result %40 -%41 = OpVectorShuffle %v2bool %36 %36 0 1 -%43 = OpCompositeExtract %bool %41 0 -%44 = OpCompositeExtract %bool %41 1 -%46 = OpCompositeConstruct %v4bool %43 %44 %false %true -OpStore %result %46 -%47 = OpCompositeConstruct %v4bool %38 %true %true %false -OpStore %result %47 -%48 = OpCompositeExtract %bool %36 1 -%49 = OpCompositeConstruct %v4bool %false %48 %true %true -OpStore %result %49 -%50 = OpVectorShuffle %v3bool %36 %36 0 1 2 -%52 = OpCompositeExtract %bool %50 0 -%53 = OpCompositeExtract %bool %50 1 -%54 = OpCompositeExtract %bool %50 2 -%55 = OpCompositeConstruct %v4bool %52 %53 %54 %true -OpStore %result %55 -%56 = OpVectorShuffle %v2bool %36 %36 0 1 -%57 = OpCompositeExtract %bool %56 0 -%58 = OpCompositeExtract %bool %56 1 -%59 = OpCompositeConstruct %v4bool %57 %58 %true %true -OpStore %result %59 -%60 = OpCompositeExtract %bool %36 2 -%61 = OpCompositeConstruct %v4bool %38 %false %60 %true -OpStore %result %61 -%62 = OpCompositeConstruct %v4bool %38 %true %false %false -OpStore %result %62 -%63 = OpVectorShuffle %v2bool %36 %36 1 2 -%64 = OpCompositeExtract %bool %63 0 -%65 = OpCompositeExtract %bool %63 1 -%66 = OpCompositeConstruct %v4bool %true %64 %65 %false -OpStore %result %66 -%67 = OpCompositeConstruct %v4bool %false %48 %true %false -OpStore %result %67 -%68 = OpCompositeConstruct %v4bool %true %true %60 %false -OpStore %result %68 -OpStore %result %36 -%69 = OpVectorShuffle %v3bool %36 %36 0 1 2 -%70 = OpCompositeExtract %bool %69 0 -%71 = OpCompositeExtract %bool %69 1 -%72 = OpCompositeExtract %bool %69 2 -%73 = OpCompositeConstruct %v4bool %70 %71 %72 %true -OpStore %result %73 -%74 = OpVectorShuffle %v2bool %36 %36 0 1 -%75 = OpCompositeExtract %bool %74 0 -%76 = OpCompositeExtract %bool %74 1 -%77 = OpCompositeExtract %bool %36 3 -%78 = OpCompositeConstruct %v4bool %75 %76 %false %77 -OpStore %result %78 -%79 = OpVectorShuffle %v2bool %36 %36 0 1 -%80 = OpCompositeExtract %bool %79 0 -%81 = OpCompositeExtract %bool %79 1 -%82 = OpCompositeConstruct %v4bool %80 %81 %true %false -OpStore %result %82 -%83 = OpVectorShuffle %v2bool %36 %36 2 3 -%84 = OpCompositeExtract %bool %83 0 -%85 = OpCompositeExtract %bool %83 1 -%86 = OpCompositeConstruct %v4bool %38 %true %84 %85 -OpStore %result %86 -OpStore %result %61 -%87 = OpCompositeConstruct %v4bool %38 %true %true %77 -OpStore %result %87 -%88 = OpCompositeConstruct %v4bool %38 %true %false %true -OpStore %result %88 -%89 = OpVectorShuffle %v3bool %36 %36 1 2 3 -%90 = OpCompositeExtract %bool %89 0 -%91 = OpCompositeExtract %bool %89 1 -%92 = OpCompositeExtract %bool %89 2 -%93 = OpCompositeConstruct %v4bool %true %90 %91 %92 -OpStore %result %93 -%94 = OpVectorShuffle %v2bool %36 %36 1 2 -%95 = OpCompositeExtract %bool %94 0 -%96 = OpCompositeExtract %bool %94 1 -%97 = OpCompositeConstruct %v4bool %false %95 %96 %true -OpStore %result %97 -%98 = OpCompositeConstruct %v4bool %false %48 %true %77 -OpStore %result %98 -%99 = OpCompositeConstruct %v4bool %true %48 %true %true -OpStore %result %99 -%100 = OpVectorShuffle %v2bool %36 %36 2 3 -%101 = OpCompositeExtract %bool %100 0 -%102 = OpCompositeExtract %bool %100 1 -%103 = OpCompositeConstruct %v4bool %false %false %101 %102 -OpStore %result %103 -%104 = OpCompositeConstruct %v4bool %false %false %60 %true -OpStore %result %104 -%105 = OpCompositeConstruct %v4bool %false %true %true %77 -OpStore %result %105 -%106 = OpAny %bool %105 -OpSelectionMerge %111 None -OpBranchConditional %106 %109 %110 -%109 = OpLabel -%112 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%113 = OpLoad %v4float %112 -OpStore %107 %113 -OpBranch %111 -%110 = OpLabel -%114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%116 = OpLoad %v4float %114 -OpStore %107 %116 -OpBranch %111 -%111 = OpLabel -%117 = OpLoad %v4float %107 -OpReturnValue %117 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %v = OpVariable %_ptr_Function_v4bool Function + %result = OpVariable %_ptr_Function_v4bool Function + %107 = OpVariable %_ptr_Function_v4float Function + %29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %33 = OpLoad %v4float %29 + %34 = OpCompositeExtract %float %33 1 + %35 = OpFUnordNotEqual %bool %34 %float_0 + %36 = OpCompositeConstruct %v4bool %35 %35 %35 %35 + OpStore %v %36 + %38 = OpCompositeExtract %bool %36 0 + %40 = OpCompositeConstruct %v4bool %38 %true %true %true + OpStore %result %40 + %41 = OpVectorShuffle %v2bool %36 %36 0 1 + %43 = OpCompositeExtract %bool %41 0 + %44 = OpCompositeExtract %bool %41 1 + %46 = OpCompositeConstruct %v4bool %43 %44 %false %true + OpStore %result %46 + %47 = OpCompositeConstruct %v4bool %38 %true %true %false + OpStore %result %47 + %48 = OpCompositeExtract %bool %36 1 + %49 = OpCompositeConstruct %v4bool %false %48 %true %true + OpStore %result %49 + %50 = OpVectorShuffle %v3bool %36 %36 0 1 2 + %52 = OpCompositeExtract %bool %50 0 + %53 = OpCompositeExtract %bool %50 1 + %54 = OpCompositeExtract %bool %50 2 + %55 = OpCompositeConstruct %v4bool %52 %53 %54 %true + OpStore %result %55 + %56 = OpVectorShuffle %v2bool %36 %36 0 1 + %57 = OpCompositeExtract %bool %56 0 + %58 = OpCompositeExtract %bool %56 1 + %59 = OpCompositeConstruct %v4bool %57 %58 %true %true + OpStore %result %59 + %60 = OpCompositeExtract %bool %36 2 + %61 = OpCompositeConstruct %v4bool %38 %false %60 %true + OpStore %result %61 + %62 = OpCompositeConstruct %v4bool %38 %true %false %false + OpStore %result %62 + %63 = OpVectorShuffle %v2bool %36 %36 1 2 + %64 = OpCompositeExtract %bool %63 0 + %65 = OpCompositeExtract %bool %63 1 + %66 = OpCompositeConstruct %v4bool %true %64 %65 %false + OpStore %result %66 + %67 = OpCompositeConstruct %v4bool %false %48 %true %false + OpStore %result %67 + %68 = OpCompositeConstruct %v4bool %true %true %60 %false + OpStore %result %68 + OpStore %result %36 + %69 = OpVectorShuffle %v3bool %36 %36 0 1 2 + %70 = OpCompositeExtract %bool %69 0 + %71 = OpCompositeExtract %bool %69 1 + %72 = OpCompositeExtract %bool %69 2 + %73 = OpCompositeConstruct %v4bool %70 %71 %72 %true + OpStore %result %73 + %74 = OpVectorShuffle %v2bool %36 %36 0 1 + %75 = OpCompositeExtract %bool %74 0 + %76 = OpCompositeExtract %bool %74 1 + %77 = OpCompositeExtract %bool %36 3 + %78 = OpCompositeConstruct %v4bool %75 %76 %false %77 + OpStore %result %78 + %79 = OpVectorShuffle %v2bool %36 %36 0 1 + %80 = OpCompositeExtract %bool %79 0 + %81 = OpCompositeExtract %bool %79 1 + %82 = OpCompositeConstruct %v4bool %80 %81 %true %false + OpStore %result %82 + %83 = OpVectorShuffle %v2bool %36 %36 2 3 + %84 = OpCompositeExtract %bool %83 0 + %85 = OpCompositeExtract %bool %83 1 + %86 = OpCompositeConstruct %v4bool %38 %true %84 %85 + OpStore %result %86 + OpStore %result %61 + %87 = OpCompositeConstruct %v4bool %38 %true %true %77 + OpStore %result %87 + %88 = OpCompositeConstruct %v4bool %38 %true %false %true + OpStore %result %88 + %89 = OpVectorShuffle %v3bool %36 %36 1 2 3 + %90 = OpCompositeExtract %bool %89 0 + %91 = OpCompositeExtract %bool %89 1 + %92 = OpCompositeExtract %bool %89 2 + %93 = OpCompositeConstruct %v4bool %true %90 %91 %92 + OpStore %result %93 + %94 = OpVectorShuffle %v2bool %36 %36 1 2 + %95 = OpCompositeExtract %bool %94 0 + %96 = OpCompositeExtract %bool %94 1 + %97 = OpCompositeConstruct %v4bool %false %95 %96 %true + OpStore %result %97 + %98 = OpCompositeConstruct %v4bool %false %48 %true %77 + OpStore %result %98 + %99 = OpCompositeConstruct %v4bool %true %48 %true %true + OpStore %result %99 + %100 = OpVectorShuffle %v2bool %36 %36 2 3 + %101 = OpCompositeExtract %bool %100 0 + %102 = OpCompositeExtract %bool %100 1 + %103 = OpCompositeConstruct %v4bool %false %false %101 %102 + OpStore %result %103 + %104 = OpCompositeConstruct %v4bool %false %false %60 %true + OpStore %result %104 + %105 = OpCompositeConstruct %v4bool %false %true %true %77 + OpStore %result %105 + %106 = OpAny %bool %105 + OpSelectionMerge %111 None + OpBranchConditional %106 %109 %110 + %109 = OpLabel + %112 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %113 = OpLoad %v4float %112 + OpStore %107 %113 + OpBranch %111 + %110 = OpLabel + %114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %116 = OpLoad %v4float %114 + OpStore %107 %116 + OpBranch %111 + %111 = OpLabel + %117 = OpLoad %v4float %107 + OpReturnValue %117 + OpFunctionEnd diff --git a/tests/sksl/shared/SwizzleBoolConstants.skrp b/tests/sksl/shared/SwizzleBoolConstants.skrp index 18f79db0839d..ad93f88a7976 100644 --- a/tests/sksl/shared/SwizzleBoolConstants.skrp +++ b/tests/sksl/shared/SwizzleBoolConstants.skrp @@ -1,3 +1,5 @@ +89 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_uniform $0 = colorGreen(1) diff --git a/tests/sksl/shared/SwizzleBoolConstants.wgsl b/tests/sksl/shared/SwizzleBoolConstants.wgsl index 1e5a79992d9e..f30a3e0529ce 100644 --- a/tests/sksl/shared/SwizzleBoolConstants.wgsl +++ b/tests/sksl/shared/SwizzleBoolConstants.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, diff --git a/tests/sksl/shared/SwizzleByConstantIndex.asm.frag b/tests/sksl/shared/SwizzleByConstantIndex.asm.frag index cd12a0422118..f5970c9ad159 100644 --- a/tests/sksl/shared/SwizzleByConstantIndex.asm.frag +++ b/tests/sksl/shared/SwizzleByConstantIndex.asm.frag @@ -1,191 +1,191 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testInputs" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %_0_v "_0_v" -OpName %_1_x "_1_x" -OpName %_2_y "_2_y" -OpName %_3_z "_3_z" -OpName %_4_w "_4_w" -OpName %a "a" -OpName %_9_x "_9_x" -OpName %_10_y "_10_y" -OpName %_11_z "_11_z" -OpName %_12_w "_12_w" -OpName %b "b" -OpName %c "c" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %_0_v RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %_1_x RelaxedPrecision -OpDecorate %35 RelaxedPrecision -OpDecorate %_2_y RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %_3_z RelaxedPrecision -OpDecorate %39 RelaxedPrecision -OpDecorate %_4_w RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %a RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %_9_x RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %_10_y RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %51 RelaxedPrecision -OpDecorate %_11_z RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %55 RelaxedPrecision -OpDecorate %_12_w RelaxedPrecision -OpDecorate %58 RelaxedPrecision -OpDecorate %59 RelaxedPrecision -OpDecorate %b RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %c RelaxedPrecision -OpDecorate %90 RelaxedPrecision -OpDecorate %93 RelaxedPrecision -OpDecorate %94 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testInputs" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %_0_v "_0_v" + OpName %_1_x "_1_x" + OpName %_2_y "_2_y" + OpName %_3_z "_3_z" + OpName %_4_w "_4_w" + OpName %a "a" + OpName %_9_x "_9_x" + OpName %_10_y "_10_y" + OpName %_11_z "_11_z" + OpName %_12_w "_12_w" + OpName %b "b" + OpName %c "c" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %_0_v RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %_1_x RelaxedPrecision + OpDecorate %35 RelaxedPrecision + OpDecorate %_2_y RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %_3_z RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %_4_w RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %a RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %_9_x RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %_10_y RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %_11_z RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %55 RelaxedPrecision + OpDecorate %_12_w RelaxedPrecision + OpDecorate %58 RelaxedPrecision + OpDecorate %59 RelaxedPrecision + OpDecorate %b RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %c RelaxedPrecision + OpDecorate %90 RelaxedPrecision + OpDecorate %93 RelaxedPrecision + OpDecorate %94 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 %_ptr_Function_float = OpTypePointer Function %float -%float_1 = OpConstant %float 1 -%float_2 = OpConstant %float 2 -%float_3 = OpConstant %float 3 -%66 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3 -%false = OpConstantFalse %bool + %float_1 = OpConstant %float 1 + %float_2 = OpConstant %float 2 + %float_3 = OpConstant %float 3 + %66 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3 + %false = OpConstantFalse %bool %float_n1_25 = OpConstant %float -1.25 -%float_0_75 = OpConstant %float 0.75 -%float_2_25 = OpConstant %float 2.25 -%71 = OpConstantComposite %v4float %float_n1_25 %float_0 %float_0_75 %float_2_25 -%v4bool = OpTypeVector %bool 4 -%true = OpConstantTrue %bool -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 + %float_0_75 = OpConstant %float 0.75 + %float_2_25 = OpConstant %float 2.25 + %71 = OpConstantComposite %v4float %float_n1_25 %float_0 %float_0_75 %float_2_25 + %v4bool = OpTypeVector %bool 4 + %true = OpConstantTrue %bool + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%_0_v = OpVariable %_ptr_Function_v4float Function -%_1_x = OpVariable %_ptr_Function_float Function -%_2_y = OpVariable %_ptr_Function_float Function -%_3_z = OpVariable %_ptr_Function_float Function -%_4_w = OpVariable %_ptr_Function_float Function -%a = OpVariable %_ptr_Function_v4float Function -%_9_x = OpVariable %_ptr_Function_float Function -%_10_y = OpVariable %_ptr_Function_float Function -%_11_z = OpVariable %_ptr_Function_float Function -%_12_w = OpVariable %_ptr_Function_float Function -%b = OpVariable %_ptr_Function_v4float Function -%c = OpVariable %_ptr_Function_v4float Function -%84 = OpVariable %_ptr_Function_v4float Function -%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %28 -OpStore %_0_v %32 -%35 = OpCompositeExtract %float %32 0 -OpStore %_1_x %35 -%37 = OpCompositeExtract %float %32 1 -OpStore %_2_y %37 -%39 = OpCompositeExtract %float %32 2 -OpStore %_3_z %39 -%41 = OpCompositeExtract %float %32 3 -OpStore %_4_w %41 -%43 = OpCompositeConstruct %v4float %35 %37 %39 %41 -OpStore %a %43 -%45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%46 = OpLoad %v4float %45 -%47 = OpCompositeExtract %float %46 0 -OpStore %_9_x %47 -%49 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%50 = OpLoad %v4float %49 -%51 = OpCompositeExtract %float %50 1 -OpStore %_10_y %51 -%53 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%54 = OpLoad %v4float %53 -%55 = OpCompositeExtract %float %54 2 -OpStore %_11_z %55 -%57 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%58 = OpLoad %v4float %57 -%59 = OpCompositeExtract %float %58 3 -OpStore %_12_w %59 -%61 = OpCompositeConstruct %v4float %47 %51 %55 %59 -OpStore %b %61 -OpStore %c %66 -%72 = OpFOrdEqual %v4bool %43 %71 -%74 = OpAll %bool %72 -OpSelectionMerge %76 None -OpBranchConditional %74 %75 %76 -%75 = OpLabel -%77 = OpFOrdEqual %v4bool %61 %71 -%78 = OpAll %bool %77 -OpBranch %76 -%76 = OpLabel -%79 = OpPhi %bool %false %25 %78 %75 -OpSelectionMerge %81 None -OpBranchConditional %79 %80 %81 -%80 = OpLabel -OpBranch %81 -%81 = OpLabel -%83 = OpPhi %bool %false %76 %true %80 -OpSelectionMerge %87 None -OpBranchConditional %83 %85 %86 -%85 = OpLabel -%88 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%90 = OpLoad %v4float %88 -OpStore %84 %90 -OpBranch %87 -%86 = OpLabel -%91 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%93 = OpLoad %v4float %91 -OpStore %84 %93 -OpBranch %87 -%87 = OpLabel -%94 = OpLoad %v4float %84 -OpReturnValue %94 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %_0_v = OpVariable %_ptr_Function_v4float Function + %_1_x = OpVariable %_ptr_Function_float Function + %_2_y = OpVariable %_ptr_Function_float Function + %_3_z = OpVariable %_ptr_Function_float Function + %_4_w = OpVariable %_ptr_Function_float Function + %a = OpVariable %_ptr_Function_v4float Function + %_9_x = OpVariable %_ptr_Function_float Function + %_10_y = OpVariable %_ptr_Function_float Function + %_11_z = OpVariable %_ptr_Function_float Function + %_12_w = OpVariable %_ptr_Function_float Function + %b = OpVariable %_ptr_Function_v4float Function + %c = OpVariable %_ptr_Function_v4float Function + %84 = OpVariable %_ptr_Function_v4float Function + %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %28 + OpStore %_0_v %32 + %35 = OpCompositeExtract %float %32 0 + OpStore %_1_x %35 + %37 = OpCompositeExtract %float %32 1 + OpStore %_2_y %37 + %39 = OpCompositeExtract %float %32 2 + OpStore %_3_z %39 + %41 = OpCompositeExtract %float %32 3 + OpStore %_4_w %41 + %43 = OpCompositeConstruct %v4float %35 %37 %39 %41 + OpStore %a %43 + %45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %46 = OpLoad %v4float %45 + %47 = OpCompositeExtract %float %46 0 + OpStore %_9_x %47 + %49 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %50 = OpLoad %v4float %49 + %51 = OpCompositeExtract %float %50 1 + OpStore %_10_y %51 + %53 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %54 = OpLoad %v4float %53 + %55 = OpCompositeExtract %float %54 2 + OpStore %_11_z %55 + %57 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %58 = OpLoad %v4float %57 + %59 = OpCompositeExtract %float %58 3 + OpStore %_12_w %59 + %61 = OpCompositeConstruct %v4float %47 %51 %55 %59 + OpStore %b %61 + OpStore %c %66 + %72 = OpFOrdEqual %v4bool %43 %71 + %74 = OpAll %bool %72 + OpSelectionMerge %76 None + OpBranchConditional %74 %75 %76 + %75 = OpLabel + %77 = OpFOrdEqual %v4bool %61 %71 + %78 = OpAll %bool %77 + OpBranch %76 + %76 = OpLabel + %79 = OpPhi %bool %false %25 %78 %75 + OpSelectionMerge %81 None + OpBranchConditional %79 %80 %81 + %80 = OpLabel + OpBranch %81 + %81 = OpLabel + %83 = OpPhi %bool %false %76 %true %80 + OpSelectionMerge %87 None + OpBranchConditional %83 %85 %86 + %85 = OpLabel + %88 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %90 = OpLoad %v4float %88 + OpStore %84 %90 + OpBranch %87 + %86 = OpLabel + %91 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %93 = OpLoad %v4float %91 + OpStore %84 %93 + OpBranch %87 + %87 = OpLabel + %94 = OpLoad %v4float %84 + OpReturnValue %94 + OpFunctionEnd diff --git a/tests/sksl/shared/SwizzleByConstantIndex.skrp b/tests/sksl/shared/SwizzleByConstantIndex.skrp index 770e1cd20b02..0678c2d90817 100644 --- a/tests/sksl/shared/SwizzleByConstantIndex.skrp +++ b/tests/sksl/shared/SwizzleByConstantIndex.skrp @@ -1,8 +1,14 @@ +29 instructions + [immutable slots] -c(0) = 0 -c(1) = 0x3F800000 (1.0) -c(2) = 0x40000000 (2.0) -c(3) = 0x40400000 (3.0) +i0 = 0 +i1 = 0x3F800000 (1.0) +i2 = 0x40000000 (2.0) +i3 = 0x40400000 (3.0) +i4 = 0xBFA00000 (-1.25) +i5 = 0 +i6 = 0x3F400000 (0.75) +i7 = 0x40100000 (2.25) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -12,27 +18,18 @@ copy_4_slots_unmasked a = _1_x, _2_y, _3_z, _4_w copy_4_uniforms _9_x, _10_y, _11_z, _12_w = testInputs copy_4_slots_unmasked b = _9_x, _10_y, _11_z, _12_w copy_4_slots_unmasked $0..3 = a -copy_constant $4 = 0xBFA00000 (-1.25) -copy_constant $5 = 0 -copy_constant $6 = 0x3F400000 (0.75) -copy_constant $7 = 0x40100000 (2.25) +copy_4_immutables_unmasked $4..7 = i4..7 [0xBFA00000 (-1.25), 0, 0x3F400000 (0.75), 0x40100000 (2.25)] cmpeq_4_floats $0..3 = equal($0..3, $4..7) bitwise_and_2_ints $0..1 &= $2..3 bitwise_and_int $0 &= $1 copy_4_slots_unmasked $1..4 = b -copy_constant $5 = 0xBFA00000 (-1.25) -copy_constant $6 = 0 -copy_constant $7 = 0x3F400000 (0.75) -copy_constant $8 = 0x40100000 (2.25) +copy_4_immutables_unmasked $5..8 = i4..7 [0xBFA00000 (-1.25), 0, 0x3F400000 (0.75), 0x40100000 (2.25)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 -copy_4_slots_unmasked $1..4 = c -copy_constant $5 = 0 -copy_constant $6 = 0x3F800000 (1.0) -copy_constant $7 = 0x40000000 (2.0) -copy_constant $8 = 0x40400000 (3.0) +copy_4_immutables_unmasked $1..4 = i0..3 [0, 0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0)] +copy_4_immutables_unmasked $5..8 = i0..3 [0, 0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 diff --git a/tests/sksl/shared/SwizzleByConstantIndex.wgsl b/tests/sksl/shared/SwizzleByConstantIndex.wgsl index 906b5efe251e..252353b9aae9 100644 --- a/tests/sksl/shared/SwizzleByConstantIndex.wgsl +++ b/tests/sksl/shared/SwizzleByConstantIndex.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, diff --git a/tests/sksl/shared/SwizzleByIndex.asm.frag b/tests/sksl/shared/SwizzleByIndex.asm.frag index 0b419d3aaf15..519eb3e4fd7a 100644 --- a/tests/sksl/shared/SwizzleByIndex.asm.frag +++ b/tests/sksl/shared/SwizzleByIndex.asm.frag @@ -1,144 +1,144 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testInputs" -OpMemberName %_UniformBuffer 1 "colorBlack" -OpMemberName %_UniformBuffer 2 "colorGreen" -OpMemberName %_UniformBuffer 3 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %_0_v "_0_v" -OpName %_1_i "_1_i" -OpName %_2_x "_2_x" -OpName %_3_y "_3_y" -OpName %_4_z "_4_z" -OpName %_5_w "_5_w" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 3 Offset 48 -OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %_0_v RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %39 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %45 RelaxedPrecision -OpDecorate %_2_x RelaxedPrecision -OpDecorate %_3_y RelaxedPrecision -OpDecorate %_4_z RelaxedPrecision -OpDecorate %_5_w RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %73 RelaxedPrecision -OpDecorate %76 RelaxedPrecision -OpDecorate %77 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testInputs" + OpMemberName %_UniformBuffer 1 "colorBlack" + OpMemberName %_UniformBuffer 2 "colorGreen" + OpMemberName %_UniformBuffer 3 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %_0_v "_0_v" + OpName %_1_i "_1_i" + OpName %_2_x "_2_x" + OpName %_3_y "_3_y" + OpName %_4_z "_4_z" + OpName %_5_w "_5_w" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 3 Offset 48 + OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %_0_v RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %45 RelaxedPrecision + OpDecorate %_2_x RelaxedPrecision + OpDecorate %_3_y RelaxedPrecision + OpDecorate %_4_z RelaxedPrecision + OpDecorate %_5_w RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %73 RelaxedPrecision + OpDecorate %76 RelaxedPrecision + OpDecorate %77 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%v4int = OpTypeVector %int 4 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %v4int = OpTypeVector %int 4 %_ptr_Function_v4int = OpTypePointer Function %v4int -%int_1 = OpConstant %int 1 + %int_1 = OpConstant %int 1 %_ptr_Function_float = OpTypePointer Function %float %float_n1_25 = OpConstant %float -1.25 -%63 = OpConstantComposite %v4float %float_n1_25 %float_n1_25 %float_n1_25 %float_0 -%v4bool = OpTypeVector %bool 4 -%int_2 = OpConstant %int 2 -%int_3 = OpConstant %int 3 + %63 = OpConstantComposite %v4float %float_n1_25 %float_n1_25 %float_n1_25 %float_0 + %v4bool = OpTypeVector %bool 4 + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%_0_v = OpVariable %_ptr_Function_v4float Function -%_1_i = OpVariable %_ptr_Function_v4int Function -%_2_x = OpVariable %_ptr_Function_float Function -%_3_y = OpVariable %_ptr_Function_float Function -%_4_z = OpVariable %_ptr_Function_float Function -%_5_w = OpVariable %_ptr_Function_float Function -%67 = OpVariable %_ptr_Function_v4float Function -%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %28 -OpStore %_0_v %32 -%36 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%38 = OpLoad %v4float %36 -%39 = OpCompositeExtract %float %38 0 -%40 = OpConvertFToS %int %39 -%41 = OpCompositeExtract %float %38 1 -%42 = OpConvertFToS %int %41 -%43 = OpCompositeExtract %float %38 2 -%44 = OpConvertFToS %int %43 -%45 = OpCompositeExtract %float %38 3 -%46 = OpConvertFToS %int %45 -%47 = OpCompositeConstruct %v4int %40 %42 %44 %46 -OpStore %_1_i %47 -%50 = OpCompositeExtract %int %47 0 -%51 = OpVectorExtractDynamic %float %32 %50 -OpStore %_2_x %51 -%53 = OpCompositeExtract %int %47 1 -%54 = OpVectorExtractDynamic %float %32 %53 -OpStore %_3_y %54 -%56 = OpCompositeExtract %int %47 2 -%57 = OpVectorExtractDynamic %float %32 %56 -OpStore %_4_z %57 -%59 = OpCompositeExtract %int %47 3 -%60 = OpVectorExtractDynamic %float %32 %59 -OpStore %_5_w %60 -%61 = OpCompositeConstruct %v4float %51 %54 %57 %60 -%64 = OpFOrdEqual %v4bool %61 %63 -%66 = OpAll %bool %64 -OpSelectionMerge %70 None -OpBranchConditional %66 %68 %69 -%68 = OpLabel -%71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%73 = OpLoad %v4float %71 -OpStore %67 %73 -OpBranch %70 -%69 = OpLabel -%74 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 -%76 = OpLoad %v4float %74 -OpStore %67 %76 -OpBranch %70 -%70 = OpLabel -%77 = OpLoad %v4float %67 -OpReturnValue %77 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %_0_v = OpVariable %_ptr_Function_v4float Function + %_1_i = OpVariable %_ptr_Function_v4int Function + %_2_x = OpVariable %_ptr_Function_float Function + %_3_y = OpVariable %_ptr_Function_float Function + %_4_z = OpVariable %_ptr_Function_float Function + %_5_w = OpVariable %_ptr_Function_float Function + %67 = OpVariable %_ptr_Function_v4float Function + %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %28 + OpStore %_0_v %32 + %36 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %38 = OpLoad %v4float %36 + %39 = OpCompositeExtract %float %38 0 + %40 = OpConvertFToS %int %39 + %41 = OpCompositeExtract %float %38 1 + %42 = OpConvertFToS %int %41 + %43 = OpCompositeExtract %float %38 2 + %44 = OpConvertFToS %int %43 + %45 = OpCompositeExtract %float %38 3 + %46 = OpConvertFToS %int %45 + %47 = OpCompositeConstruct %v4int %40 %42 %44 %46 + OpStore %_1_i %47 + %50 = OpCompositeExtract %int %47 0 + %51 = OpVectorExtractDynamic %float %32 %50 + OpStore %_2_x %51 + %53 = OpCompositeExtract %int %47 1 + %54 = OpVectorExtractDynamic %float %32 %53 + OpStore %_3_y %54 + %56 = OpCompositeExtract %int %47 2 + %57 = OpVectorExtractDynamic %float %32 %56 + OpStore %_4_z %57 + %59 = OpCompositeExtract %int %47 3 + %60 = OpVectorExtractDynamic %float %32 %59 + OpStore %_5_w %60 + %61 = OpCompositeConstruct %v4float %51 %54 %57 %60 + %64 = OpFOrdEqual %v4bool %61 %63 + %66 = OpAll %bool %64 + OpSelectionMerge %70 None + OpBranchConditional %66 %68 %69 + %68 = OpLabel + %71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %73 = OpLoad %v4float %71 + OpStore %67 %73 + OpBranch %70 + %69 = OpLabel + %74 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3 + %76 = OpLoad %v4float %74 + OpStore %67 %76 + OpBranch %70 + %70 = OpLabel + %77 = OpLoad %v4float %67 + OpReturnValue %77 + OpFunctionEnd diff --git a/tests/sksl/shared/SwizzleByIndex.skrp b/tests/sksl/shared/SwizzleByIndex.skrp index 1c2d1a1ebf69..175206fdaf8a 100644 --- a/tests/sksl/shared/SwizzleByIndex.skrp +++ b/tests/sksl/shared/SwizzleByIndex.skrp @@ -1,3 +1,11 @@ +28 instructions + +[immutable slots] +i0 = 0xBFA00000 (-1.25) +i1 = 0xBFA00000 (-1.25) +i2 = 0xBFA00000 (-1.25) +i3 = 0 + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_4_uniforms _0_v = testInputs @@ -17,8 +25,7 @@ copy_slot_unmasked $12 = _1_i(3) copy_from_indirect_unmasked $0 = Indirect(_0_v(0) + $12) copy_slot_unmasked _5_w = $0 copy_4_slots_unmasked $0..3 = _2_x, _3_y, _4_z, _5_w -splat_3_constants $4..6 = 0xBFA00000 (-1.25) -copy_constant $7 = 0 +copy_4_immutables_unmasked $4..7 = i0..3 [0xBFA00000 (-1.25), 0xBFA00000 (-1.25), 0xBFA00000 (-1.25), 0] cmpeq_4_floats $0..3 = equal($0..3, $4..7) bitwise_and_2_ints $0..1 &= $2..3 bitwise_and_int $0 &= $1 diff --git a/tests/sksl/shared/SwizzleByIndex.wgsl b/tests/sksl/shared/SwizzleByIndex.wgsl index fcf3d57c0ac4..1bccc84babea 100644 --- a/tests/sksl/shared/SwizzleByIndex.wgsl +++ b/tests/sksl/shared/SwizzleByIndex.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, diff --git a/tests/sksl/shared/SwizzleConstants.asm.frag b/tests/sksl/shared/SwizzleConstants.asm.frag index b14d3a83f018..948ac4fb1954 100644 --- a/tests/sksl/shared/SwizzleConstants.asm.frag +++ b/tests/sksl/shared/SwizzleConstants.asm.frag @@ -1,235 +1,235 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testInputs" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %v "v" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %v RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %35 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %39 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %45 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %48 RelaxedPrecision -OpDecorate %49 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %51 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %53 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %55 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %58 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %62 RelaxedPrecision -OpDecorate %63 RelaxedPrecision -OpDecorate %64 RelaxedPrecision -OpDecorate %65 RelaxedPrecision -OpDecorate %66 RelaxedPrecision -OpDecorate %67 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %69 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -OpDecorate %71 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %73 RelaxedPrecision -OpDecorate %74 RelaxedPrecision -OpDecorate %75 RelaxedPrecision -OpDecorate %76 RelaxedPrecision -OpDecorate %77 RelaxedPrecision -OpDecorate %78 RelaxedPrecision -OpDecorate %79 RelaxedPrecision -OpDecorate %80 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %82 RelaxedPrecision -OpDecorate %83 RelaxedPrecision -OpDecorate %84 RelaxedPrecision -OpDecorate %85 RelaxedPrecision -OpDecorate %86 RelaxedPrecision -OpDecorate %87 RelaxedPrecision -OpDecorate %88 RelaxedPrecision -OpDecorate %89 RelaxedPrecision -OpDecorate %90 RelaxedPrecision -OpDecorate %91 RelaxedPrecision -OpDecorate %92 RelaxedPrecision -OpDecorate %93 RelaxedPrecision -OpDecorate %94 RelaxedPrecision -OpDecorate %95 RelaxedPrecision -OpDecorate %103 RelaxedPrecision -OpDecorate %106 RelaxedPrecision -OpDecorate %107 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testInputs" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %v "v" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %v RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %35 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %45 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %48 RelaxedPrecision + OpDecorate %49 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %53 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %55 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %58 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %62 RelaxedPrecision + OpDecorate %63 RelaxedPrecision + OpDecorate %64 RelaxedPrecision + OpDecorate %65 RelaxedPrecision + OpDecorate %66 RelaxedPrecision + OpDecorate %67 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %69 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %71 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %73 RelaxedPrecision + OpDecorate %74 RelaxedPrecision + OpDecorate %75 RelaxedPrecision + OpDecorate %76 RelaxedPrecision + OpDecorate %77 RelaxedPrecision + OpDecorate %78 RelaxedPrecision + OpDecorate %79 RelaxedPrecision + OpDecorate %80 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %82 RelaxedPrecision + OpDecorate %83 RelaxedPrecision + OpDecorate %84 RelaxedPrecision + OpDecorate %85 RelaxedPrecision + OpDecorate %86 RelaxedPrecision + OpDecorate %87 RelaxedPrecision + OpDecorate %88 RelaxedPrecision + OpDecorate %89 RelaxedPrecision + OpDecorate %90 RelaxedPrecision + OpDecorate %91 RelaxedPrecision + OpDecorate %92 RelaxedPrecision + OpDecorate %93 RelaxedPrecision + OpDecorate %94 RelaxedPrecision + OpDecorate %95 RelaxedPrecision + OpDecorate %103 RelaxedPrecision + OpDecorate %106 RelaxedPrecision + OpDecorate %107 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%float_1 = OpConstant %float 1 -%41 = OpConstantComposite %v4float %float_0 %float_1 %float_1 %float_1 -%v3float = OpTypeVector %float 3 -%59 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 -%true = OpConstantTrue %bool -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %float_1 = OpConstant %float 1 + %41 = OpConstantComposite %v4float %float_0 %float_1 %float_1 %float_1 + %v3float = OpTypeVector %float 3 + %59 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %true = OpConstantTrue %bool + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%v = OpVariable %_ptr_Function_v4float Function -%97 = OpVariable %_ptr_Function_v4float Function -%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %28 -OpStore %v %32 -%33 = OpCompositeExtract %float %32 0 -%35 = OpCompositeConstruct %v4float %33 %float_1 %float_1 %float_1 -OpStore %v %35 -%36 = OpVectorShuffle %v2float %35 %35 0 1 -%37 = OpCompositeExtract %float %36 0 -%38 = OpCompositeExtract %float %36 1 -%39 = OpCompositeConstruct %v4float %37 %38 %float_1 %float_1 -OpStore %v %39 -%40 = OpCompositeConstruct %v4float %37 %float_1 %float_1 %float_1 -OpStore %v %40 -OpStore %v %41 -%42 = OpVectorShuffle %v3float %41 %41 0 1 2 -%44 = OpCompositeExtract %float %42 0 -%45 = OpCompositeExtract %float %42 1 -%46 = OpCompositeExtract %float %42 2 -%47 = OpCompositeConstruct %v4float %44 %45 %46 %float_1 -OpStore %v %47 -%48 = OpVectorShuffle %v2float %47 %47 0 1 -%49 = OpCompositeExtract %float %48 0 -%50 = OpCompositeExtract %float %48 1 -%51 = OpCompositeConstruct %v4float %49 %50 %float_1 %float_1 -OpStore %v %51 -%52 = OpCompositeConstruct %v4float %49 %float_0 %float_1 %float_1 -OpStore %v %52 -%53 = OpCompositeConstruct %v4float %49 %float_1 %float_0 %float_1 -OpStore %v %53 -%54 = OpVectorShuffle %v2float %53 %53 1 2 -%55 = OpCompositeExtract %float %54 0 -%56 = OpCompositeExtract %float %54 1 -%57 = OpCompositeConstruct %v4float %float_1 %55 %56 %float_1 -OpStore %v %57 -%58 = OpCompositeConstruct %v4float %float_0 %55 %float_1 %float_1 -OpStore %v %58 -OpStore %v %59 -%60 = OpVectorShuffle %v3float %59 %59 0 1 2 -%61 = OpCompositeExtract %float %60 0 -%62 = OpCompositeExtract %float %60 1 -%63 = OpCompositeExtract %float %60 2 -%64 = OpCompositeConstruct %v4float %61 %62 %63 %float_1 -OpStore %v %64 -%65 = OpVectorShuffle %v2float %64 %64 0 1 -%66 = OpCompositeExtract %float %65 0 -%67 = OpCompositeExtract %float %65 1 -%68 = OpCompositeConstruct %v4float %66 %67 %float_0 %float_1 -OpStore %v %68 -%69 = OpVectorShuffle %v2float %68 %68 0 1 -%70 = OpCompositeExtract %float %69 0 -%71 = OpCompositeExtract %float %69 1 -%72 = OpCompositeConstruct %v4float %70 %71 %float_1 %float_0 -OpStore %v %72 -%73 = OpVectorShuffle %v2float %72 %72 2 3 -%74 = OpCompositeExtract %float %73 0 -%75 = OpCompositeExtract %float %73 1 -%76 = OpCompositeConstruct %v4float %70 %float_1 %74 %75 -OpStore %v %76 -%77 = OpCompositeConstruct %v4float %70 %float_0 %74 %float_1 -OpStore %v %77 -%78 = OpCompositeConstruct %v4float %70 %float_1 %float_1 %float_1 -OpStore %v %78 -%79 = OpCompositeConstruct %v4float %70 %float_1 %float_0 %float_1 -OpStore %v %79 -%80 = OpVectorShuffle %v3float %79 %79 1 2 3 -%81 = OpCompositeExtract %float %80 0 -%82 = OpCompositeExtract %float %80 1 -%83 = OpCompositeExtract %float %80 2 -%84 = OpCompositeConstruct %v4float %float_1 %81 %82 %83 -OpStore %v %84 -%85 = OpVectorShuffle %v2float %84 %84 1 2 -%86 = OpCompositeExtract %float %85 0 -%87 = OpCompositeExtract %float %85 1 -%88 = OpCompositeConstruct %v4float %float_0 %86 %87 %float_1 -OpStore %v %88 -%89 = OpCompositeConstruct %v4float %float_0 %86 %float_1 %float_1 -OpStore %v %89 -%90 = OpCompositeConstruct %v4float %float_1 %86 %float_1 %float_1 -OpStore %v %90 -%91 = OpVectorShuffle %v2float %90 %90 2 3 -%92 = OpCompositeExtract %float %91 0 -%93 = OpCompositeExtract %float %91 1 -%94 = OpCompositeConstruct %v4float %float_0 %float_0 %92 %93 -OpStore %v %94 -%95 = OpCompositeConstruct %v4float %float_0 %float_0 %92 %float_1 -OpStore %v %95 -OpStore %v %41 -OpSelectionMerge %100 None -OpBranchConditional %true %98 %99 -%98 = OpLabel -%101 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%103 = OpLoad %v4float %101 -OpStore %97 %103 -OpBranch %100 -%99 = OpLabel -%104 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%106 = OpLoad %v4float %104 -OpStore %97 %106 -OpBranch %100 -%100 = OpLabel -%107 = OpLoad %v4float %97 -OpReturnValue %107 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %v = OpVariable %_ptr_Function_v4float Function + %97 = OpVariable %_ptr_Function_v4float Function + %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %28 + OpStore %v %32 + %33 = OpCompositeExtract %float %32 0 + %35 = OpCompositeConstruct %v4float %33 %float_1 %float_1 %float_1 + OpStore %v %35 + %36 = OpVectorShuffle %v2float %35 %35 0 1 + %37 = OpCompositeExtract %float %36 0 + %38 = OpCompositeExtract %float %36 1 + %39 = OpCompositeConstruct %v4float %37 %38 %float_1 %float_1 + OpStore %v %39 + %40 = OpCompositeConstruct %v4float %37 %float_1 %float_1 %float_1 + OpStore %v %40 + OpStore %v %41 + %42 = OpVectorShuffle %v3float %41 %41 0 1 2 + %44 = OpCompositeExtract %float %42 0 + %45 = OpCompositeExtract %float %42 1 + %46 = OpCompositeExtract %float %42 2 + %47 = OpCompositeConstruct %v4float %44 %45 %46 %float_1 + OpStore %v %47 + %48 = OpVectorShuffle %v2float %47 %47 0 1 + %49 = OpCompositeExtract %float %48 0 + %50 = OpCompositeExtract %float %48 1 + %51 = OpCompositeConstruct %v4float %49 %50 %float_1 %float_1 + OpStore %v %51 + %52 = OpCompositeConstruct %v4float %49 %float_0 %float_1 %float_1 + OpStore %v %52 + %53 = OpCompositeConstruct %v4float %49 %float_1 %float_0 %float_1 + OpStore %v %53 + %54 = OpVectorShuffle %v2float %53 %53 1 2 + %55 = OpCompositeExtract %float %54 0 + %56 = OpCompositeExtract %float %54 1 + %57 = OpCompositeConstruct %v4float %float_1 %55 %56 %float_1 + OpStore %v %57 + %58 = OpCompositeConstruct %v4float %float_0 %55 %float_1 %float_1 + OpStore %v %58 + OpStore %v %59 + %60 = OpVectorShuffle %v3float %59 %59 0 1 2 + %61 = OpCompositeExtract %float %60 0 + %62 = OpCompositeExtract %float %60 1 + %63 = OpCompositeExtract %float %60 2 + %64 = OpCompositeConstruct %v4float %61 %62 %63 %float_1 + OpStore %v %64 + %65 = OpVectorShuffle %v2float %64 %64 0 1 + %66 = OpCompositeExtract %float %65 0 + %67 = OpCompositeExtract %float %65 1 + %68 = OpCompositeConstruct %v4float %66 %67 %float_0 %float_1 + OpStore %v %68 + %69 = OpVectorShuffle %v2float %68 %68 0 1 + %70 = OpCompositeExtract %float %69 0 + %71 = OpCompositeExtract %float %69 1 + %72 = OpCompositeConstruct %v4float %70 %71 %float_1 %float_0 + OpStore %v %72 + %73 = OpVectorShuffle %v2float %72 %72 2 3 + %74 = OpCompositeExtract %float %73 0 + %75 = OpCompositeExtract %float %73 1 + %76 = OpCompositeConstruct %v4float %70 %float_1 %74 %75 + OpStore %v %76 + %77 = OpCompositeConstruct %v4float %70 %float_0 %74 %float_1 + OpStore %v %77 + %78 = OpCompositeConstruct %v4float %70 %float_1 %float_1 %float_1 + OpStore %v %78 + %79 = OpCompositeConstruct %v4float %70 %float_1 %float_0 %float_1 + OpStore %v %79 + %80 = OpVectorShuffle %v3float %79 %79 1 2 3 + %81 = OpCompositeExtract %float %80 0 + %82 = OpCompositeExtract %float %80 1 + %83 = OpCompositeExtract %float %80 2 + %84 = OpCompositeConstruct %v4float %float_1 %81 %82 %83 + OpStore %v %84 + %85 = OpVectorShuffle %v2float %84 %84 1 2 + %86 = OpCompositeExtract %float %85 0 + %87 = OpCompositeExtract %float %85 1 + %88 = OpCompositeConstruct %v4float %float_0 %86 %87 %float_1 + OpStore %v %88 + %89 = OpCompositeConstruct %v4float %float_0 %86 %float_1 %float_1 + OpStore %v %89 + %90 = OpCompositeConstruct %v4float %float_1 %86 %float_1 %float_1 + OpStore %v %90 + %91 = OpVectorShuffle %v2float %90 %90 2 3 + %92 = OpCompositeExtract %float %91 0 + %93 = OpCompositeExtract %float %91 1 + %94 = OpCompositeConstruct %v4float %float_0 %float_0 %92 %93 + OpStore %v %94 + %95 = OpCompositeConstruct %v4float %float_0 %float_0 %92 %float_1 + OpStore %v %95 + OpStore %v %41 + OpSelectionMerge %100 None + OpBranchConditional %true %98 %99 + %98 = OpLabel + %101 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %103 = OpLoad %v4float %101 + OpStore %97 %103 + OpBranch %100 + %99 = OpLabel + %104 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %106 = OpLoad %v4float %104 + OpStore %97 %106 + OpBranch %100 + %100 = OpLabel + %107 = OpLoad %v4float %97 + OpReturnValue %107 + OpFunctionEnd diff --git a/tests/sksl/shared/SwizzleConstants.skrp b/tests/sksl/shared/SwizzleConstants.skrp index 1ae3faffb77a..26eb064d53de 100644 --- a/tests/sksl/shared/SwizzleConstants.skrp +++ b/tests/sksl/shared/SwizzleConstants.skrp @@ -1,3 +1,11 @@ +54 instructions + +[immutable slots] +i0 = 0 +i1 = 0x3F800000 (1.0) +i2 = 0x3F800000 (1.0) +i3 = 0x3F800000 (1.0) + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_4_uniforms v = testInputs @@ -43,8 +51,7 @@ copy_constant v(3) = 0x3F800000 (1.0) copy_constant v(0) = 0 splat_2_constants v(1..2) = 0x3F800000 (1.0) copy_4_slots_unmasked $0..3 = v -copy_constant $4 = 0 -splat_3_constants $5..7 = 0x3F800000 (1.0) +copy_4_immutables_unmasked $4..7 = i0..3 [0, 0x3F800000 (1.0), 0x3F800000 (1.0), 0x3F800000 (1.0)] cmpeq_4_floats $0..3 = equal($0..3, $4..7) bitwise_and_2_ints $0..1 &= $2..3 bitwise_and_int $0 &= $1 diff --git a/tests/sksl/shared/SwizzleConstants.wgsl b/tests/sksl/shared/SwizzleConstants.wgsl index 810591fa250a..3d2da35cabb5 100644 --- a/tests/sksl/shared/SwizzleConstants.wgsl +++ b/tests/sksl/shared/SwizzleConstants.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, diff --git a/tests/sksl/shared/SwizzleIndexLookup.asm.frag b/tests/sksl/shared/SwizzleIndexLookup.asm.frag index 1d55f987d9c9..5bb5e8a1e155 100644 --- a/tests/sksl/shared/SwizzleIndexLookup.asm.frag +++ b/tests/sksl/shared/SwizzleIndexLookup.asm.frag @@ -1,252 +1,252 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpMemberName %_UniformBuffer 2 "testMatrix3x3" -OpMemberName %_UniformBuffer 3 "testMatrix4x4" -OpName %_entrypoint_v "_entrypoint_v" -OpName %test3x3_b "test3x3_b" -OpName %expected "expected" -OpName %c "c" -OpName %vec "vec" -OpName %r "r" -OpName %test4x4_b "test4x4_b" -OpName %expected_0 "expected" -OpName %c_0 "c" -OpName %vec_0 "vec" -OpName %r_0 "r" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 ColMajor -OpMemberDecorate %_UniformBuffer 2 MatrixStride 16 -OpMemberDecorate %_UniformBuffer 3 Offset 80 -OpMemberDecorate %_UniformBuffer 3 ColMajor -OpMemberDecorate %_UniformBuffer 3 MatrixStride 16 -OpDecorate %_UniformBuffer Block -OpDecorate %12 Binding 0 -OpDecorate %12 DescriptorSet 0 -OpDecorate %143 RelaxedPrecision -OpDecorate %145 RelaxedPrecision -OpDecorate %146 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpMemberName %_UniformBuffer 2 "testMatrix3x3" + OpMemberName %_UniformBuffer 3 "testMatrix4x4" + OpName %_entrypoint_v "_entrypoint_v" + OpName %test3x3_b "test3x3_b" + OpName %expected "expected" + OpName %c "c" + OpName %vec "vec" + OpName %r "r" + OpName %test4x4_b "test4x4_b" + OpName %expected_0 "expected" + OpName %c_0 "c" + OpName %vec_0 "vec" + OpName %r_0 "r" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 ColMajor + OpMemberDecorate %_UniformBuffer 2 MatrixStride 16 + OpMemberDecorate %_UniformBuffer 3 Offset 80 + OpMemberDecorate %_UniformBuffer 3 ColMajor + OpMemberDecorate %_UniformBuffer 3 MatrixStride 16 + OpDecorate %_UniformBuffer Block + OpDecorate %12 Binding 0 + OpDecorate %12 DescriptorSet 0 + OpDecorate %143 RelaxedPrecision + OpDecorate %145 RelaxedPrecision + OpDecorate %146 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%v3float = OpTypeVector %float 3 + %v3float = OpTypeVector %float 3 %mat3v3float = OpTypeMatrix %v3float 3 %mat4v4float = OpTypeMatrix %v4float 4 %_UniformBuffer = OpTypeStruct %v4float %v4float %mat3v3float %mat4v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%12 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%20 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%24 = OpConstantComposite %v2float %float_0 %float_0 + %12 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %20 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %24 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%28 = OpTypeFunction %bool + %28 = OpTypeFunction %bool %_ptr_Function_v3float = OpTypePointer Function %v3float -%float_3 = OpConstant %float 3 -%float_2 = OpConstant %float 2 -%float_1 = OpConstant %float 1 -%35 = OpConstantComposite %v3float %float_3 %float_2 %float_1 -%int = OpTypeInt 32 1 + %float_3 = OpConstant %float 3 + %float_2 = OpConstant %float 2 + %float_1 = OpConstant %float 1 + %35 = OpConstantComposite %v3float %float_3 %float_2 %float_1 + %int = OpTypeInt 32 1 %_ptr_Function_int = OpTypePointer Function %int -%int_0 = OpConstant %int 0 -%int_3 = OpConstant %int 3 + %int_0 = OpConstant %int 0 + %int_3 = OpConstant %int 3 %_ptr_Uniform_mat3v3float = OpTypePointer Uniform %mat3v3float -%int_2 = OpConstant %int 2 + %int_2 = OpConstant %int 2 %_ptr_Uniform_v3float = OpTypePointer Uniform %v3float -%false = OpConstantFalse %bool -%int_1 = OpConstant %int 1 -%79 = OpConstantComposite %v3float %float_3 %float_3 %float_3 -%true = OpConstantTrue %bool + %false = OpConstantFalse %bool + %int_1 = OpConstant %int 1 + %79 = OpConstantComposite %v3float %float_3 %float_3 %float_3 + %true = OpConstantTrue %bool %_ptr_Function_v4float = OpTypePointer Function %v4float -%float_4 = OpConstant %float 4 -%88 = OpConstantComposite %v4float %float_4 %float_3 %float_2 %float_1 -%int_4 = OpConstant %int 4 + %float_4 = OpConstant %float 4 + %88 = OpConstantComposite %v4float %float_4 %float_3 %float_2 %float_1 + %int_4 = OpConstant %int 4 %_ptr_Uniform_mat4v4float = OpTypePointer Uniform %mat4v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%126 = OpConstantComposite %v4float %float_4 %float_4 %float_4 %float_4 -%130 = OpTypeFunction %v4float %_ptr_Function_v2float + %126 = OpConstantComposite %v4float %float_4 %float_4 %float_4 %float_4 + %130 = OpTypeFunction %v4float %_ptr_Function_v2float %_entrypoint_v = OpFunction %void None %20 -%21 = OpLabel -%25 = OpVariable %_ptr_Function_v2float Function -OpStore %25 %24 -%27 = OpFunctionCall %v4float %main %25 -OpStore %sk_FragColor %27 -OpReturn -OpFunctionEnd -%test3x3_b = OpFunction %bool None %28 -%29 = OpLabel -%expected = OpVariable %_ptr_Function_v3float Function -%c = OpVariable %_ptr_Function_int Function -%vec = OpVariable %_ptr_Function_v3float Function -%r = OpVariable %_ptr_Function_int Function -OpStore %expected %35 -OpStore %c %int_0 -OpBranch %40 -%40 = OpLabel -OpLoopMerge %44 %43 None -OpBranch %41 -%41 = OpLabel -%45 = OpLoad %int %c -%47 = OpSLessThan %bool %45 %int_3 -OpBranchConditional %47 %42 %44 -%42 = OpLabel -%49 = OpAccessChain %_ptr_Uniform_mat3v3float %12 %int_2 -%52 = OpLoad %int %c -%53 = OpAccessChain %_ptr_Uniform_v3float %49 %52 -%55 = OpLoad %v3float %53 -OpStore %vec %55 -OpStore %r %int_0 -OpBranch %57 -%57 = OpLabel -OpLoopMerge %61 %60 None -OpBranch %58 -%58 = OpLabel -%62 = OpLoad %int %r -%63 = OpSLessThan %bool %62 %int_3 -OpBranchConditional %63 %59 %61 -%59 = OpLabel -%64 = OpLoad %v3float %vec -%65 = OpVectorShuffle %v3float %64 %64 2 1 0 -%66 = OpLoad %int %r -%67 = OpVectorExtractDynamic %float %65 %66 -%68 = OpLoad %v3float %expected -%69 = OpLoad %int %r -%70 = OpVectorExtractDynamic %float %68 %69 -%71 = OpFUnordNotEqual %bool %67 %70 -OpSelectionMerge %73 None -OpBranchConditional %71 %72 %73 -%72 = OpLabel -OpReturnValue %false -%73 = OpLabel -OpBranch %60 -%60 = OpLabel -%76 = OpLoad %int %r -%77 = OpIAdd %int %76 %int_1 -OpStore %r %77 -OpBranch %57 -%61 = OpLabel -%78 = OpLoad %v3float %expected -%80 = OpFAdd %v3float %78 %79 -OpStore %expected %80 -OpBranch %43 -%43 = OpLabel -%81 = OpLoad %int %c -%82 = OpIAdd %int %81 %int_1 -OpStore %c %82 -OpBranch %40 -%44 = OpLabel -OpReturnValue %true -OpFunctionEnd -%test4x4_b = OpFunction %bool None %28 -%84 = OpLabel -%expected_0 = OpVariable %_ptr_Function_v4float Function -%c_0 = OpVariable %_ptr_Function_int Function -%vec_0 = OpVariable %_ptr_Function_v4float Function -%r_0 = OpVariable %_ptr_Function_int Function -OpStore %expected_0 %88 -OpStore %c_0 %int_0 -OpBranch %90 -%90 = OpLabel -OpLoopMerge %94 %93 None -OpBranch %91 -%91 = OpLabel -%95 = OpLoad %int %c_0 -%97 = OpSLessThan %bool %95 %int_4 -OpBranchConditional %97 %92 %94 -%92 = OpLabel -%99 = OpAccessChain %_ptr_Uniform_mat4v4float %12 %int_3 -%101 = OpLoad %int %c_0 -%102 = OpAccessChain %_ptr_Uniform_v4float %99 %101 -%104 = OpLoad %v4float %102 -OpStore %vec_0 %104 -OpStore %r_0 %int_0 -OpBranch %106 -%106 = OpLabel -OpLoopMerge %110 %109 None -OpBranch %107 -%107 = OpLabel -%111 = OpLoad %int %r_0 -%112 = OpSLessThan %bool %111 %int_4 -OpBranchConditional %112 %108 %110 -%108 = OpLabel -%113 = OpLoad %v4float %vec_0 -%114 = OpVectorShuffle %v4float %113 %113 3 2 1 0 -%115 = OpLoad %int %r_0 -%116 = OpVectorExtractDynamic %float %114 %115 -%117 = OpLoad %v4float %expected_0 -%118 = OpLoad %int %r_0 -%119 = OpVectorExtractDynamic %float %117 %118 -%120 = OpFUnordNotEqual %bool %116 %119 -OpSelectionMerge %122 None -OpBranchConditional %120 %121 %122 -%121 = OpLabel -OpReturnValue %false -%122 = OpLabel -OpBranch %109 -%109 = OpLabel -%123 = OpLoad %int %r_0 -%124 = OpIAdd %int %123 %int_1 -OpStore %r_0 %124 -OpBranch %106 -%110 = OpLabel -%125 = OpLoad %v4float %expected_0 -%127 = OpFAdd %v4float %125 %126 -OpStore %expected_0 %127 -OpBranch %93 -%93 = OpLabel -%128 = OpLoad %int %c_0 -%129 = OpIAdd %int %128 %int_1 -OpStore %c_0 %129 -OpBranch %90 -%94 = OpLabel -OpReturnValue %true -OpFunctionEnd -%main = OpFunction %v4float None %130 -%131 = OpFunctionParameter %_ptr_Function_v2float -%132 = OpLabel -%138 = OpVariable %_ptr_Function_v4float Function -%133 = OpFunctionCall %bool %test3x3_b -OpSelectionMerge %135 None -OpBranchConditional %133 %134 %135 -%134 = OpLabel -%136 = OpFunctionCall %bool %test4x4_b -OpBranch %135 -%135 = OpLabel -%137 = OpPhi %bool %false %132 %136 %134 -OpSelectionMerge %141 None -OpBranchConditional %137 %139 %140 -%139 = OpLabel -%142 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 -%143 = OpLoad %v4float %142 -OpStore %138 %143 -OpBranch %141 -%140 = OpLabel -%144 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1 -%145 = OpLoad %v4float %144 -OpStore %138 %145 -OpBranch %141 -%141 = OpLabel -%146 = OpLoad %v4float %138 -OpReturnValue %146 -OpFunctionEnd + %21 = OpLabel + %25 = OpVariable %_ptr_Function_v2float Function + OpStore %25 %24 + %27 = OpFunctionCall %v4float %main %25 + OpStore %sk_FragColor %27 + OpReturn + OpFunctionEnd + %test3x3_b = OpFunction %bool None %28 + %29 = OpLabel + %expected = OpVariable %_ptr_Function_v3float Function + %c = OpVariable %_ptr_Function_int Function + %vec = OpVariable %_ptr_Function_v3float Function + %r = OpVariable %_ptr_Function_int Function + OpStore %expected %35 + OpStore %c %int_0 + OpBranch %40 + %40 = OpLabel + OpLoopMerge %44 %43 None + OpBranch %41 + %41 = OpLabel + %45 = OpLoad %int %c + %47 = OpSLessThan %bool %45 %int_3 + OpBranchConditional %47 %42 %44 + %42 = OpLabel + %49 = OpAccessChain %_ptr_Uniform_mat3v3float %12 %int_2 + %52 = OpLoad %int %c + %53 = OpAccessChain %_ptr_Uniform_v3float %49 %52 + %55 = OpLoad %v3float %53 + OpStore %vec %55 + OpStore %r %int_0 + OpBranch %57 + %57 = OpLabel + OpLoopMerge %61 %60 None + OpBranch %58 + %58 = OpLabel + %62 = OpLoad %int %r + %63 = OpSLessThan %bool %62 %int_3 + OpBranchConditional %63 %59 %61 + %59 = OpLabel + %64 = OpLoad %v3float %vec + %65 = OpVectorShuffle %v3float %64 %64 2 1 0 + %66 = OpLoad %int %r + %67 = OpVectorExtractDynamic %float %65 %66 + %68 = OpLoad %v3float %expected + %69 = OpLoad %int %r + %70 = OpVectorExtractDynamic %float %68 %69 + %71 = OpFUnordNotEqual %bool %67 %70 + OpSelectionMerge %73 None + OpBranchConditional %71 %72 %73 + %72 = OpLabel + OpReturnValue %false + %73 = OpLabel + OpBranch %60 + %60 = OpLabel + %76 = OpLoad %int %r + %77 = OpIAdd %int %76 %int_1 + OpStore %r %77 + OpBranch %57 + %61 = OpLabel + %78 = OpLoad %v3float %expected + %80 = OpFAdd %v3float %78 %79 + OpStore %expected %80 + OpBranch %43 + %43 = OpLabel + %81 = OpLoad %int %c + %82 = OpIAdd %int %81 %int_1 + OpStore %c %82 + OpBranch %40 + %44 = OpLabel + OpReturnValue %true + OpFunctionEnd + %test4x4_b = OpFunction %bool None %28 + %84 = OpLabel + %expected_0 = OpVariable %_ptr_Function_v4float Function + %c_0 = OpVariable %_ptr_Function_int Function + %vec_0 = OpVariable %_ptr_Function_v4float Function + %r_0 = OpVariable %_ptr_Function_int Function + OpStore %expected_0 %88 + OpStore %c_0 %int_0 + OpBranch %90 + %90 = OpLabel + OpLoopMerge %94 %93 None + OpBranch %91 + %91 = OpLabel + %95 = OpLoad %int %c_0 + %97 = OpSLessThan %bool %95 %int_4 + OpBranchConditional %97 %92 %94 + %92 = OpLabel + %99 = OpAccessChain %_ptr_Uniform_mat4v4float %12 %int_3 + %101 = OpLoad %int %c_0 + %102 = OpAccessChain %_ptr_Uniform_v4float %99 %101 + %104 = OpLoad %v4float %102 + OpStore %vec_0 %104 + OpStore %r_0 %int_0 + OpBranch %106 + %106 = OpLabel + OpLoopMerge %110 %109 None + OpBranch %107 + %107 = OpLabel + %111 = OpLoad %int %r_0 + %112 = OpSLessThan %bool %111 %int_4 + OpBranchConditional %112 %108 %110 + %108 = OpLabel + %113 = OpLoad %v4float %vec_0 + %114 = OpVectorShuffle %v4float %113 %113 3 2 1 0 + %115 = OpLoad %int %r_0 + %116 = OpVectorExtractDynamic %float %114 %115 + %117 = OpLoad %v4float %expected_0 + %118 = OpLoad %int %r_0 + %119 = OpVectorExtractDynamic %float %117 %118 + %120 = OpFUnordNotEqual %bool %116 %119 + OpSelectionMerge %122 None + OpBranchConditional %120 %121 %122 + %121 = OpLabel + OpReturnValue %false + %122 = OpLabel + OpBranch %109 + %109 = OpLabel + %123 = OpLoad %int %r_0 + %124 = OpIAdd %int %123 %int_1 + OpStore %r_0 %124 + OpBranch %106 + %110 = OpLabel + %125 = OpLoad %v4float %expected_0 + %127 = OpFAdd %v4float %125 %126 + OpStore %expected_0 %127 + OpBranch %93 + %93 = OpLabel + %128 = OpLoad %int %c_0 + %129 = OpIAdd %int %128 %int_1 + OpStore %c_0 %129 + OpBranch %90 + %94 = OpLabel + OpReturnValue %true + OpFunctionEnd + %main = OpFunction %v4float None %130 + %131 = OpFunctionParameter %_ptr_Function_v2float + %132 = OpLabel + %138 = OpVariable %_ptr_Function_v4float Function + %133 = OpFunctionCall %bool %test3x3_b + OpSelectionMerge %135 None + OpBranchConditional %133 %134 %135 + %134 = OpLabel + %136 = OpFunctionCall %bool %test4x4_b + OpBranch %135 + %135 = OpLabel + %137 = OpPhi %bool %false %132 %136 %134 + OpSelectionMerge %141 None + OpBranchConditional %137 %139 %140 + %139 = OpLabel + %142 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 + %143 = OpLoad %v4float %142 + OpStore %138 %143 + OpBranch %141 + %140 = OpLabel + %144 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1 + %145 = OpLoad %v4float %144 + OpStore %138 %145 + OpBranch %141 + %141 = OpLabel + %146 = OpLoad %v4float %138 + OpReturnValue %146 + OpFunctionEnd diff --git a/tests/sksl/shared/SwizzleIndexLookup.skrp b/tests/sksl/shared/SwizzleIndexLookup.skrp index 24cb9705cedf..44eb3dec8b5f 100644 --- a/tests/sksl/shared/SwizzleIndexLookup.skrp +++ b/tests/sksl/shared/SwizzleIndexLookup.skrp @@ -1,14 +1,30 @@ +116 instructions + +[immutable slots] +i0 = 0x40400000 (3.0) +i1 = 0x40000000 (2.0) +i2 = 0x3F800000 (1.0) +i3 = 0x00000002 (2.802597e-45) +i4 = 0x00000001 (1.401298e-45) +i5 = 0 +i6 = 0x40800000 (4.0) +i7 = 0x40400000 (3.0) +i8 = 0x40000000 (2.0) +i9 = 0x3F800000 (1.0) +i10 = 0x00000003 (4.203895e-45) +i11 = 0x00000002 (2.802597e-45) +i12 = 0x00000001 (1.401298e-45) +i13 = 0 + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true store_condition_mask $12 = CondMask -branch_if_no_lanes_active branch_if_no_lanes_active +62 (label 2 at #66) +branch_if_no_lanes_active branch_if_no_lanes_active +58 (label 2 at #62) store_return_mask $13 = RetMask -copy_constant expected(0) = 0x40400000 (3.0) -copy_constant expected(1) = 0x40000000 (2.0) -copy_constant expected(2) = 0x3F800000 (1.0) +copy_3_immutables_unmasked expected = i0..2 [0x40400000 (3.0), 0x40000000 (2.0), 0x3F800000 (1.0)] copy_constant c = 0 store_loop_mask $14 = LoopMask -jump jump +43 (label 4 at #54) +jump jump +41 (label 4 at #50) label label 0x00000005 copy_slot_unmasked $21 = c mul_imm_int $21 *= 0x00000003 @@ -16,13 +32,11 @@ copy_from_indirect_uniform_unm $15..17 = Indirect(testMatrix3x3(0..2) + $21) copy_3_slots_unmasked vec = $15..17 copy_constant r = 0 store_loop_mask $15 = LoopMask -jump jump +20 (label 7 at #39) +jump jump +18 (label 7 at #35) label label 0x00000008 store_condition_mask $16 = CondMask copy_slot_unmasked $22 = r -copy_constant $26 = 0x00000002 (2.802597e-45) -copy_constant $27 = 0x00000001 (1.401298e-45) -copy_constant $28 = 0 +copy_3_immutables_unmasked $26..28 = i3..5 [0x00000002 (2.802597e-45), 0x00000001 (1.401298e-45), 0] copy_from_indirect_unmasked $21 = Indirect($26 + $22) copy_from_indirect_unmasked $17 = Indirect(vec(0) + $21) copy_slot_unmasked $21 = r @@ -41,7 +55,7 @@ copy_slot_unmasked $16 = r cmplt_imm_int $16 = lessThan($16, 0x00000003) merge_loop_mask LoopMask &= $16 stack_rewind -branch_if_any_lanes_active branch_if_any_lanes_active -24 (label 8 at #20) +branch_if_any_lanes_active branch_if_any_lanes_active -22 (label 8 at #18) label label 0x00000006 load_loop_mask LoopMask = $15 copy_3_slots_unmasked $15..17 = expected @@ -56,7 +70,7 @@ copy_slot_unmasked $15 = c cmplt_imm_int $15 = lessThan($15, 0x00000003) merge_loop_mask LoopMask &= $15 stack_rewind -branch_if_any_lanes_active branch_if_any_lanes_active -47 (label 5 at #12) +branch_if_any_lanes_active branch_if_any_lanes_active -45 (label 5 at #10) label label 0x00000003 load_loop_mask LoopMask = $14 copy_constant $14 = 0xFFFFFFFF @@ -66,15 +80,12 @@ copy_slot_unmasked $13 = [test3x3].result label label 0x00000002 copy_constant $0 = 0 merge_condition_mask CondMask = $12 & $13 -branch_if_no_lanes_active branch_if_no_lanes_active +66 (label 1 at #135) +branch_if_no_lanes_active branch_if_no_lanes_active +60 (label 1 at #125) store_return_mask $1 = RetMask -copy_constant expected₁(0) = 0x40800000 (4.0) -copy_constant expected₁(1) = 0x40400000 (3.0) -copy_constant expected₁(2) = 0x40000000 (2.0) -copy_constant expected₁(3) = 0x3F800000 (1.0) +copy_4_immutables_unmasked expected₁ = i6..9 [0x40800000 (4.0), 0x40400000 (3.0), 0x40000000 (2.0), 0x3F800000 (1.0)] copy_constant c₁ = 0 store_loop_mask $2 = LoopMask -jump jump +44 (label 11 at #121) +jump jump +41 (label 11 at #111) label label 0x0000000C copy_slot_unmasked $21 = c₁ mul_imm_int $21 *= 0x00000004 @@ -82,14 +93,11 @@ copy_from_indirect_uniform_unm $3..6 = Indirect(testMatrix4x4(0..3) + $21) copy_4_slots_unmasked vec₁ = $3..6 copy_constant r₁ = 0 store_loop_mask $3 = LoopMask -jump jump +21 (label 14 at #106) +jump jump +18 (label 14 at #96) label label 0x0000000F store_condition_mask $4 = CondMask copy_slot_unmasked $26 = r₁ -copy_constant $22 = 0x00000003 (4.203895e-45) -copy_constant $23 = 0x00000002 (2.802597e-45) -copy_constant $24 = 0x00000001 (1.401298e-45) -copy_constant $25 = 0 +copy_4_immutables_unmasked $22..25 = i10..13 [0x00000003 (4.203895e-45), 0x00000002 (2.802597e-45), 0x00000001 (1.401298e-45), 0] copy_from_indirect_unmasked $21 = Indirect($22 + $26) copy_from_indirect_unmasked $5 = Indirect(vec₁(0) + $21) copy_slot_unmasked $21 = r₁ @@ -108,7 +116,7 @@ copy_slot_unmasked $4 = r₁ cmplt_imm_int $4 = lessThan($4, 0x00000004) merge_loop_mask LoopMask &= $4 stack_rewind -branch_if_any_lanes_active branch_if_any_lanes_active -25 (label 15 at #86) +branch_if_any_lanes_active branch_if_any_lanes_active -22 (label 15 at #79) label label 0x0000000D load_loop_mask LoopMask = $3 copy_4_slots_unmasked $3..6 = expected₁ @@ -123,7 +131,7 @@ copy_slot_unmasked $3 = c₁ cmplt_imm_int $3 = lessThan($3, 0x00000004) merge_loop_mask LoopMask &= $3 stack_rewind -branch_if_any_lanes_active branch_if_any_lanes_active -48 (label 12 at #78) +branch_if_any_lanes_active branch_if_any_lanes_active -45 (label 12 at #71) label label 0x0000000A load_loop_mask LoopMask = $2 copy_constant $2 = 0xFFFFFFFF diff --git a/tests/sksl/shared/SwizzleIndexLookup.wgsl b/tests/sksl/shared/SwizzleIndexLookup.wgsl index 8df78eebe763..91712f6dbe9e 100644 --- a/tests/sksl/shared/SwizzleIndexLookup.wgsl +++ b/tests/sksl/shared/SwizzleIndexLookup.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -24,7 +25,7 @@ fn test3x3_b() -> bool { var r: i32 = 0; loop { { - if (vec.zyx[r] != expected[r]) { + if vec.zyx[r] != expected[r] { { return false; } @@ -59,7 +60,7 @@ fn test4x4_b() -> bool { var r: i32 = 0; loop { { - if (vec.wzyx[r] != expected[r]) { + if vec.wzyx[r] != expected[r] { { return false; } diff --git a/tests/sksl/shared/SwizzleIndexStore.asm.frag b/tests/sksl/shared/SwizzleIndexStore.asm.frag index fa9ef691bd9b..b8a7f018d242 100644 --- a/tests/sksl/shared/SwizzleIndexStore.asm.frag +++ b/tests/sksl/shared/SwizzleIndexStore.asm.frag @@ -1,261 +1,261 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpMemberName %_UniformBuffer 2 "testMatrix3x3" -OpMemberName %_UniformBuffer 3 "testMatrix4x4" -OpName %_entrypoint_v "_entrypoint_v" -OpName %test3x3_b "test3x3_b" -OpName %expected "expected" -OpName %vec "vec" -OpName %c "c" -OpName %r "r" -OpName %test4x4_b "test4x4_b" -OpName %expected_0 "expected" -OpName %vec_0 "vec" -OpName %c_0 "c" -OpName %r_0 "r" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 ColMajor -OpMemberDecorate %_UniformBuffer 2 MatrixStride 16 -OpMemberDecorate %_UniformBuffer 3 Offset 80 -OpMemberDecorate %_UniformBuffer 3 ColMajor -OpMemberDecorate %_UniformBuffer 3 MatrixStride 16 -OpDecorate %_UniformBuffer Block -OpDecorate %12 Binding 0 -OpDecorate %12 DescriptorSet 0 -OpDecorate %152 RelaxedPrecision -OpDecorate %154 RelaxedPrecision -OpDecorate %155 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpMemberName %_UniformBuffer 2 "testMatrix3x3" + OpMemberName %_UniformBuffer 3 "testMatrix4x4" + OpName %_entrypoint_v "_entrypoint_v" + OpName %test3x3_b "test3x3_b" + OpName %expected "expected" + OpName %vec "vec" + OpName %c "c" + OpName %r "r" + OpName %test4x4_b "test4x4_b" + OpName %expected_0 "expected" + OpName %vec_0 "vec" + OpName %c_0 "c" + OpName %r_0 "r" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 ColMajor + OpMemberDecorate %_UniformBuffer 2 MatrixStride 16 + OpMemberDecorate %_UniformBuffer 3 Offset 80 + OpMemberDecorate %_UniformBuffer 3 ColMajor + OpMemberDecorate %_UniformBuffer 3 MatrixStride 16 + OpDecorate %_UniformBuffer Block + OpDecorate %12 Binding 0 + OpDecorate %12 DescriptorSet 0 + OpDecorate %152 RelaxedPrecision + OpDecorate %154 RelaxedPrecision + OpDecorate %155 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%v3float = OpTypeVector %float 3 + %v3float = OpTypeVector %float 3 %mat3v3float = OpTypeMatrix %v3float 3 %mat4v4float = OpTypeMatrix %v4float 4 %_UniformBuffer = OpTypeStruct %v4float %v4float %mat3v3float %mat4v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%12 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%20 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%24 = OpConstantComposite %v2float %float_0 %float_0 + %12 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %20 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %24 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%28 = OpTypeFunction %bool + %28 = OpTypeFunction %bool %_ptr_Function_v3float = OpTypePointer Function %v3float -%float_3 = OpConstant %float 3 -%float_2 = OpConstant %float 2 -%float_1 = OpConstant %float 1 -%35 = OpConstantComposite %v3float %float_3 %float_2 %float_1 -%int = OpTypeInt 32 1 + %float_3 = OpConstant %float 3 + %float_2 = OpConstant %float 2 + %float_1 = OpConstant %float 1 + %35 = OpConstantComposite %v3float %float_3 %float_2 %float_1 + %int = OpTypeInt 32 1 %_ptr_Function_int = OpTypePointer Function %int -%int_0 = OpConstant %int 0 -%int_3 = OpConstant %int 3 + %int_0 = OpConstant %int 0 + %int_3 = OpConstant %int 3 %_ptr_Uniform_mat3v3float = OpTypePointer Uniform %mat3v3float -%int_2 = OpConstant %int 2 + %int_2 = OpConstant %int 2 %_ptr_Uniform_v3float = OpTypePointer Uniform %v3float -%int_1 = OpConstant %int 1 -%v3int = OpTypeVector %int 3 -%68 = OpConstantComposite %v3int %int_2 %int_1 %int_0 + %int_1 = OpConstant %int 1 + %v3int = OpTypeVector %int 3 + %68 = OpConstantComposite %v3int %int_2 %int_1 %int_0 %_ptr_Function_float = OpTypePointer Function %float -%v3bool = OpTypeVector %bool 3 -%false = OpConstantFalse %bool -%84 = OpConstantComposite %v3float %float_3 %float_3 %float_3 -%true = OpConstantTrue %bool + %v3bool = OpTypeVector %bool 3 + %false = OpConstantFalse %bool + %84 = OpConstantComposite %v3float %float_3 %float_3 %float_3 + %true = OpConstantTrue %bool %_ptr_Function_v4float = OpTypePointer Function %v4float -%float_4 = OpConstant %float 4 -%93 = OpConstantComposite %v4float %float_4 %float_3 %float_2 %float_1 -%int_4 = OpConstant %int 4 + %float_4 = OpConstant %float 4 + %93 = OpConstantComposite %v4float %float_4 %float_3 %float_2 %float_1 + %int_4 = OpConstant %int 4 %_ptr_Uniform_mat4v4float = OpTypePointer Uniform %mat4v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%v4int = OpTypeVector %int 4 -%121 = OpConstantComposite %v4int %int_3 %int_2 %int_1 %int_0 -%v4bool = OpTypeVector %bool 4 -%135 = OpConstantComposite %v4float %float_4 %float_4 %float_4 %float_4 -%139 = OpTypeFunction %v4float %_ptr_Function_v2float + %v4int = OpTypeVector %int 4 + %121 = OpConstantComposite %v4int %int_3 %int_2 %int_1 %int_0 + %v4bool = OpTypeVector %bool 4 + %135 = OpConstantComposite %v4float %float_4 %float_4 %float_4 %float_4 + %139 = OpTypeFunction %v4float %_ptr_Function_v2float %_entrypoint_v = OpFunction %void None %20 -%21 = OpLabel -%25 = OpVariable %_ptr_Function_v2float Function -OpStore %25 %24 -%27 = OpFunctionCall %v4float %main %25 -OpStore %sk_FragColor %27 -OpReturn -OpFunctionEnd -%test3x3_b = OpFunction %bool None %28 -%29 = OpLabel -%expected = OpVariable %_ptr_Function_v3float Function -%vec = OpVariable %_ptr_Function_v3float Function -%c = OpVariable %_ptr_Function_int Function -%r = OpVariable %_ptr_Function_int Function -OpStore %expected %35 -OpStore %c %int_0 -OpBranch %41 -%41 = OpLabel -OpLoopMerge %45 %44 None -OpBranch %42 -%42 = OpLabel -%46 = OpLoad %int %c -%48 = OpSLessThan %bool %46 %int_3 -OpBranchConditional %48 %43 %45 -%43 = OpLabel -OpStore %r %int_0 -OpBranch %50 -%50 = OpLabel -OpLoopMerge %54 %53 None -OpBranch %51 -%51 = OpLabel -%55 = OpLoad %int %r -%56 = OpSLessThan %bool %55 %int_3 -OpBranchConditional %56 %52 %54 -%52 = OpLabel -%57 = OpAccessChain %_ptr_Uniform_mat3v3float %12 %int_2 -%60 = OpLoad %int %c -%61 = OpAccessChain %_ptr_Uniform_v3float %57 %60 -%63 = OpLoad %v3float %61 -%64 = OpLoad %int %r -%65 = OpVectorExtractDynamic %float %63 %64 -%69 = OpLoad %int %r -%70 = OpVectorExtractDynamic %int %68 %69 -%71 = OpAccessChain %_ptr_Function_float %vec %70 -OpStore %71 %65 -OpBranch %53 -%53 = OpLabel -%73 = OpLoad %int %r -%74 = OpIAdd %int %73 %int_1 -OpStore %r %74 -OpBranch %50 -%54 = OpLabel -%75 = OpLoad %v3float %vec -%76 = OpLoad %v3float %expected -%77 = OpFUnordNotEqual %v3bool %75 %76 -%79 = OpAny %bool %77 -OpSelectionMerge %81 None -OpBranchConditional %79 %80 %81 -%80 = OpLabel -OpReturnValue %false -%81 = OpLabel -%83 = OpLoad %v3float %expected -%85 = OpFAdd %v3float %83 %84 -OpStore %expected %85 -OpBranch %44 -%44 = OpLabel -%86 = OpLoad %int %c -%87 = OpIAdd %int %86 %int_1 -OpStore %c %87 -OpBranch %41 -%45 = OpLabel -OpReturnValue %true -OpFunctionEnd -%test4x4_b = OpFunction %bool None %28 -%89 = OpLabel -%expected_0 = OpVariable %_ptr_Function_v4float Function -%vec_0 = OpVariable %_ptr_Function_v4float Function -%c_0 = OpVariable %_ptr_Function_int Function -%r_0 = OpVariable %_ptr_Function_int Function -OpStore %expected_0 %93 -OpStore %c_0 %int_0 -OpBranch %96 -%96 = OpLabel -OpLoopMerge %100 %99 None -OpBranch %97 -%97 = OpLabel -%101 = OpLoad %int %c_0 -%103 = OpSLessThan %bool %101 %int_4 -OpBranchConditional %103 %98 %100 -%98 = OpLabel -OpStore %r_0 %int_0 -OpBranch %105 -%105 = OpLabel -OpLoopMerge %109 %108 None -OpBranch %106 -%106 = OpLabel -%110 = OpLoad %int %r_0 -%111 = OpSLessThan %bool %110 %int_4 -OpBranchConditional %111 %107 %109 -%107 = OpLabel -%112 = OpAccessChain %_ptr_Uniform_mat4v4float %12 %int_3 -%114 = OpLoad %int %c_0 -%115 = OpAccessChain %_ptr_Uniform_v4float %112 %114 -%117 = OpLoad %v4float %115 -%118 = OpLoad %int %r_0 -%119 = OpVectorExtractDynamic %float %117 %118 -%122 = OpLoad %int %r_0 -%123 = OpVectorExtractDynamic %int %121 %122 -%124 = OpAccessChain %_ptr_Function_float %vec_0 %123 -OpStore %124 %119 -OpBranch %108 -%108 = OpLabel -%125 = OpLoad %int %r_0 -%126 = OpIAdd %int %125 %int_1 -OpStore %r_0 %126 -OpBranch %105 -%109 = OpLabel -%127 = OpLoad %v4float %vec_0 -%128 = OpLoad %v4float %expected_0 -%129 = OpFUnordNotEqual %v4bool %127 %128 -%131 = OpAny %bool %129 -OpSelectionMerge %133 None -OpBranchConditional %131 %132 %133 -%132 = OpLabel -OpReturnValue %false -%133 = OpLabel -%134 = OpLoad %v4float %expected_0 -%136 = OpFAdd %v4float %134 %135 -OpStore %expected_0 %136 -OpBranch %99 -%99 = OpLabel -%137 = OpLoad %int %c_0 -%138 = OpIAdd %int %137 %int_1 -OpStore %c_0 %138 -OpBranch %96 -%100 = OpLabel -OpReturnValue %true -OpFunctionEnd -%main = OpFunction %v4float None %139 -%140 = OpFunctionParameter %_ptr_Function_v2float -%141 = OpLabel -%147 = OpVariable %_ptr_Function_v4float Function -%142 = OpFunctionCall %bool %test3x3_b -OpSelectionMerge %144 None -OpBranchConditional %142 %143 %144 -%143 = OpLabel -%145 = OpFunctionCall %bool %test4x4_b -OpBranch %144 -%144 = OpLabel -%146 = OpPhi %bool %false %141 %145 %143 -OpSelectionMerge %150 None -OpBranchConditional %146 %148 %149 -%148 = OpLabel -%151 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 -%152 = OpLoad %v4float %151 -OpStore %147 %152 -OpBranch %150 -%149 = OpLabel -%153 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1 -%154 = OpLoad %v4float %153 -OpStore %147 %154 -OpBranch %150 -%150 = OpLabel -%155 = OpLoad %v4float %147 -OpReturnValue %155 -OpFunctionEnd + %21 = OpLabel + %25 = OpVariable %_ptr_Function_v2float Function + OpStore %25 %24 + %27 = OpFunctionCall %v4float %main %25 + OpStore %sk_FragColor %27 + OpReturn + OpFunctionEnd + %test3x3_b = OpFunction %bool None %28 + %29 = OpLabel + %expected = OpVariable %_ptr_Function_v3float Function + %vec = OpVariable %_ptr_Function_v3float Function + %c = OpVariable %_ptr_Function_int Function + %r = OpVariable %_ptr_Function_int Function + OpStore %expected %35 + OpStore %c %int_0 + OpBranch %41 + %41 = OpLabel + OpLoopMerge %45 %44 None + OpBranch %42 + %42 = OpLabel + %46 = OpLoad %int %c + %48 = OpSLessThan %bool %46 %int_3 + OpBranchConditional %48 %43 %45 + %43 = OpLabel + OpStore %r %int_0 + OpBranch %50 + %50 = OpLabel + OpLoopMerge %54 %53 None + OpBranch %51 + %51 = OpLabel + %55 = OpLoad %int %r + %56 = OpSLessThan %bool %55 %int_3 + OpBranchConditional %56 %52 %54 + %52 = OpLabel + %57 = OpAccessChain %_ptr_Uniform_mat3v3float %12 %int_2 + %60 = OpLoad %int %c + %61 = OpAccessChain %_ptr_Uniform_v3float %57 %60 + %63 = OpLoad %v3float %61 + %64 = OpLoad %int %r + %65 = OpVectorExtractDynamic %float %63 %64 + %69 = OpLoad %int %r + %70 = OpVectorExtractDynamic %int %68 %69 + %71 = OpAccessChain %_ptr_Function_float %vec %70 + OpStore %71 %65 + OpBranch %53 + %53 = OpLabel + %73 = OpLoad %int %r + %74 = OpIAdd %int %73 %int_1 + OpStore %r %74 + OpBranch %50 + %54 = OpLabel + %75 = OpLoad %v3float %vec + %76 = OpLoad %v3float %expected + %77 = OpFUnordNotEqual %v3bool %75 %76 + %79 = OpAny %bool %77 + OpSelectionMerge %81 None + OpBranchConditional %79 %80 %81 + %80 = OpLabel + OpReturnValue %false + %81 = OpLabel + %83 = OpLoad %v3float %expected + %85 = OpFAdd %v3float %83 %84 + OpStore %expected %85 + OpBranch %44 + %44 = OpLabel + %86 = OpLoad %int %c + %87 = OpIAdd %int %86 %int_1 + OpStore %c %87 + OpBranch %41 + %45 = OpLabel + OpReturnValue %true + OpFunctionEnd + %test4x4_b = OpFunction %bool None %28 + %89 = OpLabel + %expected_0 = OpVariable %_ptr_Function_v4float Function + %vec_0 = OpVariable %_ptr_Function_v4float Function + %c_0 = OpVariable %_ptr_Function_int Function + %r_0 = OpVariable %_ptr_Function_int Function + OpStore %expected_0 %93 + OpStore %c_0 %int_0 + OpBranch %96 + %96 = OpLabel + OpLoopMerge %100 %99 None + OpBranch %97 + %97 = OpLabel + %101 = OpLoad %int %c_0 + %103 = OpSLessThan %bool %101 %int_4 + OpBranchConditional %103 %98 %100 + %98 = OpLabel + OpStore %r_0 %int_0 + OpBranch %105 + %105 = OpLabel + OpLoopMerge %109 %108 None + OpBranch %106 + %106 = OpLabel + %110 = OpLoad %int %r_0 + %111 = OpSLessThan %bool %110 %int_4 + OpBranchConditional %111 %107 %109 + %107 = OpLabel + %112 = OpAccessChain %_ptr_Uniform_mat4v4float %12 %int_3 + %114 = OpLoad %int %c_0 + %115 = OpAccessChain %_ptr_Uniform_v4float %112 %114 + %117 = OpLoad %v4float %115 + %118 = OpLoad %int %r_0 + %119 = OpVectorExtractDynamic %float %117 %118 + %122 = OpLoad %int %r_0 + %123 = OpVectorExtractDynamic %int %121 %122 + %124 = OpAccessChain %_ptr_Function_float %vec_0 %123 + OpStore %124 %119 + OpBranch %108 + %108 = OpLabel + %125 = OpLoad %int %r_0 + %126 = OpIAdd %int %125 %int_1 + OpStore %r_0 %126 + OpBranch %105 + %109 = OpLabel + %127 = OpLoad %v4float %vec_0 + %128 = OpLoad %v4float %expected_0 + %129 = OpFUnordNotEqual %v4bool %127 %128 + %131 = OpAny %bool %129 + OpSelectionMerge %133 None + OpBranchConditional %131 %132 %133 + %132 = OpLabel + OpReturnValue %false + %133 = OpLabel + %134 = OpLoad %v4float %expected_0 + %136 = OpFAdd %v4float %134 %135 + OpStore %expected_0 %136 + OpBranch %99 + %99 = OpLabel + %137 = OpLoad %int %c_0 + %138 = OpIAdd %int %137 %int_1 + OpStore %c_0 %138 + OpBranch %96 + %100 = OpLabel + OpReturnValue %true + OpFunctionEnd + %main = OpFunction %v4float None %139 + %140 = OpFunctionParameter %_ptr_Function_v2float + %141 = OpLabel + %147 = OpVariable %_ptr_Function_v4float Function + %142 = OpFunctionCall %bool %test3x3_b + OpSelectionMerge %144 None + OpBranchConditional %142 %143 %144 + %143 = OpLabel + %145 = OpFunctionCall %bool %test4x4_b + OpBranch %144 + %144 = OpLabel + %146 = OpPhi %bool %false %141 %145 %143 + OpSelectionMerge %150 None + OpBranchConditional %146 %148 %149 + %148 = OpLabel + %151 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0 + %152 = OpLoad %v4float %151 + OpStore %147 %152 + OpBranch %150 + %149 = OpLabel + %153 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1 + %154 = OpLoad %v4float %153 + OpStore %147 %154 + OpBranch %150 + %150 = OpLabel + %155 = OpLoad %v4float %147 + OpReturnValue %155 + OpFunctionEnd diff --git a/tests/sksl/shared/SwizzleIndexStore.skrp b/tests/sksl/shared/SwizzleIndexStore.skrp index 55921d47699a..56b07a3b9f17 100644 --- a/tests/sksl/shared/SwizzleIndexStore.skrp +++ b/tests/sksl/shared/SwizzleIndexStore.skrp @@ -1,22 +1,36 @@ +117 instructions + +[immutable slots] +i0 = 0x40400000 (3.0) +i1 = 0x40000000 (2.0) +i2 = 0x3F800000 (1.0) +i3 = 0x00000002 (2.802597e-45) +i4 = 0x00000001 (1.401298e-45) +i5 = 0 +i6 = 0x40800000 (4.0) +i7 = 0x40400000 (3.0) +i8 = 0x40000000 (2.0) +i9 = 0x3F800000 (1.0) +i10 = 0x00000003 (4.203895e-45) +i11 = 0x00000002 (2.802597e-45) +i12 = 0x00000001 (1.401298e-45) +i13 = 0 + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true store_condition_mask $12 = CondMask -branch_if_no_lanes_active branch_if_no_lanes_active +61 (label 2 at #65) +branch_if_no_lanes_active branch_if_no_lanes_active +57 (label 2 at #61) store_return_mask $13 = RetMask -copy_constant expected(0) = 0x40400000 (3.0) -copy_constant expected(1) = 0x40000000 (2.0) -copy_constant expected(2) = 0x3F800000 (1.0) +copy_3_immutables_unmasked expected = i0..2 [0x40400000 (3.0), 0x40000000 (2.0), 0x3F800000 (1.0)] splat_4_constants vec, c = 0 store_loop_mask $14 = LoopMask -jump jump +42 (label 4 at #53) +jump jump +40 (label 4 at #49) label label 0x00000005 -branch_if_no_lanes_active branch_if_no_lanes_active +21 (label 6 at #34) +branch_if_no_lanes_active branch_if_no_lanes_active +19 (label 6 at #30) copy_constant r = 0 label label 0x00000007 copy_slot_unmasked $23 = r -copy_constant $27 = 0x00000002 (2.802597e-45) -copy_constant $28 = 0x00000001 (1.401298e-45) -copy_constant $29 = 0 +copy_3_immutables_unmasked $27..29 = i3..5 [0x00000002 (2.802597e-45), 0x00000001 (1.401298e-45), 0] copy_from_indirect_unmasked $22 = Indirect($27 + $23) copy_slot_unmasked $27 = c mul_imm_int $27 *= 0x00000003 @@ -30,7 +44,7 @@ add_imm_int $15 += 0x00000001 copy_slot_masked r = Mask($15) cmplt_imm_int $15 = lessThan($15, 0x00000003) stack_rewind -branch_if_no_active_lanes_eq branch -18 (label 7 at #15) if no lanes of $15 == 0 +branch_if_no_active_lanes_eq branch -16 (label 7 at #13) if no lanes of $15 == 0 label label 0x00000006 store_condition_mask $15 = CondMask copy_3_slots_unmasked $16..18 = vec @@ -55,7 +69,7 @@ copy_slot_unmasked $15 = c cmplt_imm_int $15 = lessThan($15, 0x00000003) merge_loop_mask LoopMask &= $15 stack_rewind -branch_if_any_lanes_active branch_if_any_lanes_active -46 (label 5 at #12) +branch_if_any_lanes_active branch_if_any_lanes_active -44 (label 5 at #10) label label 0x00000003 load_loop_mask LoopMask = $14 copy_constant $14 = 0xFFFFFFFF @@ -65,25 +79,19 @@ copy_slot_unmasked $13 = [test3x3].result label label 0x00000002 copy_constant $0 = 0 merge_condition_mask CondMask = $12 & $13 -branch_if_no_lanes_active branch_if_no_lanes_active +66 (label 1 at #134) +branch_if_no_lanes_active branch_if_no_lanes_active +60 (label 1 at #124) store_return_mask $1 = RetMask -copy_constant expected₁(0) = 0x40800000 (4.0) -copy_constant expected₁(1) = 0x40400000 (3.0) -copy_constant expected₁(2) = 0x40000000 (2.0) -copy_constant expected₁(3) = 0x3F800000 (1.0) +copy_4_immutables_unmasked expected₁ = i6..9 [0x40800000 (4.0), 0x40400000 (3.0), 0x40000000 (2.0), 0x3F800000 (1.0)] splat_4_constants vec₁ = 0 copy_constant c₁ = 0 store_loop_mask $2 = LoopMask -jump jump +43 (label 10 at #120) +jump jump +40 (label 10 at #110) label label 0x0000000B -branch_if_no_lanes_active branch_if_no_lanes_active +22 (label 12 at #101) +branch_if_no_lanes_active branch_if_no_lanes_active +19 (label 12 at #91) copy_constant r₁ = 0 label label 0x0000000D copy_slot_unmasked $27 = r₁ -copy_constant $23 = 0x00000003 (4.203895e-45) -copy_constant $24 = 0x00000002 (2.802597e-45) -copy_constant $25 = 0x00000001 (1.401298e-45) -copy_constant $26 = 0 +copy_4_immutables_unmasked $23..26 = i10..13 [0x00000003 (4.203895e-45), 0x00000002 (2.802597e-45), 0x00000001 (1.401298e-45), 0] copy_from_indirect_unmasked $22 = Indirect($23 + $27) copy_slot_unmasked $23 = c₁ mul_imm_int $23 *= 0x00000004 @@ -97,7 +105,7 @@ add_imm_int $3 += 0x00000001 copy_slot_masked r₁ = Mask($3) cmplt_imm_int $3 = lessThan($3, 0x00000004) stack_rewind -branch_if_no_active_lanes_eq branch -19 (label 13 at #81) if no lanes of $3 == 0 +branch_if_no_active_lanes_eq branch -16 (label 13 at #74) if no lanes of $3 == 0 label label 0x0000000C store_condition_mask $3 = CondMask copy_4_slots_unmasked $4..7 = vec₁ @@ -122,7 +130,7 @@ copy_slot_unmasked $3 = c₁ cmplt_imm_int $3 = lessThan($3, 0x00000004) merge_loop_mask LoopMask &= $3 stack_rewind -branch_if_any_lanes_active branch_if_any_lanes_active -47 (label 11 at #78) +branch_if_any_lanes_active branch_if_any_lanes_active -44 (label 11 at #71) label label 0x00000009 load_loop_mask LoopMask = $2 copy_constant $2 = 0xFFFFFFFF diff --git a/tests/sksl/shared/SwizzleIndexStore.wgsl b/tests/sksl/shared/SwizzleIndexStore.wgsl index 506437280d24..354df082abd7 100644 --- a/tests/sksl/shared/SwizzleIndexStore.wgsl +++ b/tests/sksl/shared/SwizzleIndexStore.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -33,7 +34,7 @@ fn test3x3_b() -> bool { } } } - if (any(vec != expected)) { + if any(vec != expected) { { return false; } @@ -70,7 +71,7 @@ fn test4x4_b() -> bool { } } } - if (any(vec != expected)) { + if any(vec != expected) { { return false; } diff --git a/tests/sksl/shared/SwizzleLTRB.asm.frag b/tests/sksl/shared/SwizzleLTRB.asm.frag index 3747a2f9fc3c..03d8bfb18a43 100644 --- a/tests/sksl/shared/SwizzleLTRB.asm.frag +++ b/tests/sksl/shared/SwizzleLTRB.asm.frag @@ -1,58 +1,58 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %30 RelaxedPrecision -OpDecorate %31 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %30 RelaxedPrecision + OpDecorate %31 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%26 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%30 = OpLoad %v4float %26 -%31 = OpVectorShuffle %v4float %30 %30 2 3 1 0 -OpReturnValue %31 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %26 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %30 = OpLoad %v4float %26 + %31 = OpVectorShuffle %v4float %30 %30 2 3 1 0 + OpReturnValue %31 + OpFunctionEnd diff --git a/tests/sksl/shared/SwizzleLTRB.skrp b/tests/sksl/shared/SwizzleLTRB.skrp index d3fc25375bff..135b0ce050b7 100644 --- a/tests/sksl/shared/SwizzleLTRB.skrp +++ b/tests/sksl/shared/SwizzleLTRB.skrp @@ -1,3 +1,5 @@ +5 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_4_uniforms $0..3 = colorRed diff --git a/tests/sksl/shared/SwizzleLTRB.wgsl b/tests/sksl/shared/SwizzleLTRB.wgsl index 63bfae75633c..8e8782a7ef8f 100644 --- a/tests/sksl/shared/SwizzleLTRB.wgsl +++ b/tests/sksl/shared/SwizzleLTRB.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, diff --git a/tests/sksl/shared/SwizzleOpt.asm.frag b/tests/sksl/shared/SwizzleOpt.asm.frag index 10e9ec8c244c..012a2404e9c2 100644 --- a/tests/sksl/shared/SwizzleOpt.asm.frag +++ b/tests/sksl/shared/SwizzleOpt.asm.frag @@ -1,280 +1,280 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorRed" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "testInputs" -OpName %_entrypoint_v "_entrypoint_v" -OpName %fn_hh4 "fn_hh4" -OpName %x "x" -OpName %main "main" -OpName %v "v" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %11 Binding 0 -OpDecorate %11 DescriptorSet 0 -OpDecorate %40 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %v RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %51 RelaxedPrecision -OpDecorate %53 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %55 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %58 RelaxedPrecision -OpDecorate %59 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %62 RelaxedPrecision -OpDecorate %63 RelaxedPrecision -OpDecorate %64 RelaxedPrecision -OpDecorate %65 RelaxedPrecision -OpDecorate %66 RelaxedPrecision -OpDecorate %67 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %69 RelaxedPrecision -OpDecorate %70 RelaxedPrecision -OpDecorate %71 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %73 RelaxedPrecision -OpDecorate %74 RelaxedPrecision -OpDecorate %79 RelaxedPrecision -OpDecorate %80 RelaxedPrecision -OpDecorate %83 RelaxedPrecision -OpDecorate %84 RelaxedPrecision -OpDecorate %87 RelaxedPrecision -OpDecorate %90 RelaxedPrecision -OpDecorate %93 RelaxedPrecision -OpDecorate %94 RelaxedPrecision -OpDecorate %97 RelaxedPrecision -OpDecorate %98 RelaxedPrecision -OpDecorate %104 RelaxedPrecision -OpDecorate %105 RelaxedPrecision -OpDecorate %106 RelaxedPrecision -OpDecorate %107 RelaxedPrecision -OpDecorate %108 RelaxedPrecision -OpDecorate %109 RelaxedPrecision -OpDecorate %111 RelaxedPrecision -OpDecorate %112 RelaxedPrecision -OpDecorate %114 RelaxedPrecision -OpDecorate %115 RelaxedPrecision -OpDecorate %116 RelaxedPrecision -OpDecorate %117 RelaxedPrecision -OpDecorate %118 RelaxedPrecision -OpDecorate %119 RelaxedPrecision -OpDecorate %120 RelaxedPrecision -OpDecorate %121 RelaxedPrecision -OpDecorate %122 RelaxedPrecision -OpDecorate %123 RelaxedPrecision -OpDecorate %124 RelaxedPrecision -OpDecorate %125 RelaxedPrecision -OpDecorate %126 RelaxedPrecision -OpDecorate %127 RelaxedPrecision -OpDecorate %128 RelaxedPrecision -OpDecorate %129 RelaxedPrecision -OpDecorate %139 RelaxedPrecision -OpDecorate %141 RelaxedPrecision -OpDecorate %142 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorRed" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "testInputs" + OpName %_entrypoint_v "_entrypoint_v" + OpName %fn_hh4 "fn_hh4" + OpName %x "x" + OpName %main "main" + OpName %v "v" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %11 Binding 0 + OpDecorate %11 DescriptorSet 0 + OpDecorate %40 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %v RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %53 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %55 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %58 RelaxedPrecision + OpDecorate %59 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %62 RelaxedPrecision + OpDecorate %63 RelaxedPrecision + OpDecorate %64 RelaxedPrecision + OpDecorate %65 RelaxedPrecision + OpDecorate %66 RelaxedPrecision + OpDecorate %67 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %69 RelaxedPrecision + OpDecorate %70 RelaxedPrecision + OpDecorate %71 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %73 RelaxedPrecision + OpDecorate %74 RelaxedPrecision + OpDecorate %79 RelaxedPrecision + OpDecorate %80 RelaxedPrecision + OpDecorate %83 RelaxedPrecision + OpDecorate %84 RelaxedPrecision + OpDecorate %87 RelaxedPrecision + OpDecorate %90 RelaxedPrecision + OpDecorate %93 RelaxedPrecision + OpDecorate %94 RelaxedPrecision + OpDecorate %97 RelaxedPrecision + OpDecorate %98 RelaxedPrecision + OpDecorate %104 RelaxedPrecision + OpDecorate %105 RelaxedPrecision + OpDecorate %106 RelaxedPrecision + OpDecorate %107 RelaxedPrecision + OpDecorate %108 RelaxedPrecision + OpDecorate %109 RelaxedPrecision + OpDecorate %111 RelaxedPrecision + OpDecorate %112 RelaxedPrecision + OpDecorate %114 RelaxedPrecision + OpDecorate %115 RelaxedPrecision + OpDecorate %116 RelaxedPrecision + OpDecorate %117 RelaxedPrecision + OpDecorate %118 RelaxedPrecision + OpDecorate %119 RelaxedPrecision + OpDecorate %120 RelaxedPrecision + OpDecorate %121 RelaxedPrecision + OpDecorate %122 RelaxedPrecision + OpDecorate %123 RelaxedPrecision + OpDecorate %124 RelaxedPrecision + OpDecorate %125 RelaxedPrecision + OpDecorate %126 RelaxedPrecision + OpDecorate %127 RelaxedPrecision + OpDecorate %128 RelaxedPrecision + OpDecorate %129 RelaxedPrecision + OpDecorate %139 RelaxedPrecision + OpDecorate %141 RelaxedPrecision + OpDecorate %142 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%16 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%20 = OpConstantComposite %v2float %float_0 %float_0 + %11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %16 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %20 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float %_ptr_Function_v4float = OpTypePointer Function %v4float -%25 = OpTypeFunction %float %_ptr_Function_v4float -%int = OpTypeInt 32 1 + %25 = OpTypeFunction %float %_ptr_Function_v4float + %int = OpTypeInt 32 1 %_ptr_Function_int = OpTypePointer Function %int -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 -%44 = OpTypeFunction %v4float %_ptr_Function_v2float + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 + %44 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%v3float = OpTypeVector %float 3 -%float_1 = OpConstant %float 1 -%float_123 = OpConstant %float 123 -%float_456 = OpConstant %float 456 -%float_2 = OpConstant %float 2 -%float_3 = OpConstant %float 3 -%101 = OpConstantComposite %v4float %float_1 %float_1 %float_2 %float_3 -%int_0 = OpConstant %int 0 -%130 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 -%v4bool = OpTypeVector %bool 4 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %float_123 = OpConstant %float 123 + %float_456 = OpConstant %float 456 + %float_2 = OpConstant %float 2 + %float_3 = OpConstant %float 3 + %101 = OpConstantComposite %v4float %float_1 %float_1 %float_2 %float_3 + %int_0 = OpConstant %int 0 + %130 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %v4bool = OpTypeVector %bool 4 %_entrypoint_v = OpFunction %void None %16 -%17 = OpLabel -%21 = OpVariable %_ptr_Function_v2float Function -OpStore %21 %20 -%23 = OpFunctionCall %v4float %main %21 -OpStore %sk_FragColor %23 -OpReturn -OpFunctionEnd -%fn_hh4 = OpFunction %float None %25 -%26 = OpFunctionParameter %_ptr_Function_v4float -%27 = OpLabel -%x = OpVariable %_ptr_Function_int Function -OpStore %x %int_1 -OpBranch %32 -%32 = OpLabel -OpLoopMerge %36 %35 None -OpBranch %33 -%33 = OpLabel -%37 = OpLoad %int %x -%39 = OpSLessThanEqual %bool %37 %int_2 -OpBranchConditional %39 %34 %36 -%34 = OpLabel -%40 = OpLoad %v4float %26 -%41 = OpCompositeExtract %float %40 0 -OpReturnValue %41 -%35 = OpLabel -%42 = OpLoad %int %x -%43 = OpIAdd %int %42 %int_1 -OpStore %x %43 -OpBranch %32 -%36 = OpLabel -OpUnreachable -OpFunctionEnd -%main = OpFunction %v4float None %44 -%45 = OpFunctionParameter %_ptr_Function_v2float -%46 = OpLabel -%v = OpVariable %_ptr_Function_v4float Function -%75 = OpVariable %_ptr_Function_v4float Function -%81 = OpVariable %_ptr_Function_v4float Function -%85 = OpVariable %_ptr_Function_v4float Function -%88 = OpVariable %_ptr_Function_v4float Function -%91 = OpVariable %_ptr_Function_v4float Function -%95 = OpVariable %_ptr_Function_v4float Function -%134 = OpVariable %_ptr_Function_v4float Function -%48 = OpAccessChain %_ptr_Uniform_v4float %11 %int_2 -%50 = OpLoad %v4float %48 -OpStore %v %50 -%51 = OpVectorShuffle %v3float %50 %50 2 1 0 -%53 = OpCompositeExtract %float %51 0 -%54 = OpCompositeExtract %float %51 1 -%55 = OpCompositeExtract %float %51 2 -%56 = OpCompositeConstruct %v4float %float_0 %53 %54 %55 -OpStore %v %56 -%57 = OpVectorShuffle %v2float %56 %56 0 3 -%58 = OpCompositeExtract %float %57 0 -%59 = OpCompositeExtract %float %57 1 -%60 = OpCompositeConstruct %v4float %float_0 %float_0 %58 %59 -OpStore %v %60 -%62 = OpVectorShuffle %v2float %60 %60 3 0 -%63 = OpCompositeExtract %float %62 0 -%64 = OpCompositeExtract %float %62 1 -%65 = OpCompositeConstruct %v4float %float_1 %float_1 %63 %64 -OpStore %v %65 -%66 = OpVectorShuffle %v2float %65 %65 2 1 -%67 = OpCompositeExtract %float %66 0 -%68 = OpCompositeExtract %float %66 1 -%69 = OpCompositeConstruct %v4float %67 %68 %float_1 %float_1 -OpStore %v %69 -%70 = OpVectorShuffle %v2float %69 %69 0 0 -%71 = OpCompositeExtract %float %70 0 -%72 = OpCompositeExtract %float %70 1 -%73 = OpCompositeConstruct %v4float %71 %72 %float_1 %float_1 -OpStore %v %73 -%74 = OpVectorShuffle %v4float %73 %73 3 2 3 2 -OpStore %v %74 -OpStore %75 %74 -%76 = OpFunctionCall %float %fn_hh4 %75 -%79 = OpCompositeConstruct %v3float %76 %float_123 %float_456 -%80 = OpVectorShuffle %v4float %79 %79 1 1 2 2 -OpStore %v %80 -OpStore %81 %80 -%82 = OpFunctionCall %float %fn_hh4 %81 -%83 = OpCompositeConstruct %v3float %82 %float_123 %float_456 -%84 = OpVectorShuffle %v4float %83 %83 1 1 2 2 -OpStore %v %84 -OpStore %85 %84 -%86 = OpFunctionCall %float %fn_hh4 %85 -%87 = OpCompositeConstruct %v4float %float_123 %float_456 %float_456 %86 -OpStore %v %87 -OpStore %88 %87 -%89 = OpFunctionCall %float %fn_hh4 %88 -%90 = OpCompositeConstruct %v4float %float_123 %float_456 %float_456 %89 -OpStore %v %90 -OpStore %91 %90 -%92 = OpFunctionCall %float %fn_hh4 %91 -%93 = OpCompositeConstruct %v3float %92 %float_123 %float_456 -%94 = OpVectorShuffle %v4float %93 %93 1 0 0 2 -OpStore %v %94 -OpStore %95 %94 -%96 = OpFunctionCall %float %fn_hh4 %95 -%97 = OpCompositeConstruct %v3float %96 %float_123 %float_456 -%98 = OpVectorShuffle %v4float %97 %97 1 0 0 2 -OpStore %v %98 -OpStore %v %101 -%102 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 -%104 = OpLoad %v4float %102 -%105 = OpVectorShuffle %v3float %104 %104 0 1 2 -%106 = OpCompositeExtract %float %105 0 -%107 = OpCompositeExtract %float %105 1 -%108 = OpCompositeExtract %float %105 2 -%109 = OpCompositeConstruct %v4float %106 %107 %108 %float_1 -OpStore %v %109 -%110 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 -%111 = OpLoad %v4float %110 -%112 = OpCompositeExtract %float %111 0 -%113 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 -%114 = OpLoad %v4float %113 -%115 = OpVectorShuffle %v2float %114 %114 1 2 -%116 = OpCompositeExtract %float %115 0 -%117 = OpCompositeExtract %float %115 1 -%118 = OpCompositeConstruct %v4float %112 %float_1 %116 %117 -OpStore %v %118 -%119 = OpLoad %v4float %v -%120 = OpVectorShuffle %v4float %119 %118 7 6 5 4 -OpStore %v %120 -%121 = OpVectorShuffle %v2float %120 %120 1 2 -%122 = OpLoad %v4float %v -%123 = OpVectorShuffle %v4float %122 %121 4 1 2 5 -OpStore %v %123 -%124 = OpVectorShuffle %v2float %123 %123 3 3 -%125 = OpCompositeExtract %float %124 0 -%126 = OpCompositeExtract %float %124 1 -%127 = OpCompositeConstruct %v3float %125 %126 %float_1 -%128 = OpLoad %v4float %v -%129 = OpVectorShuffle %v4float %128 %127 6 5 4 3 -OpStore %v %129 -%131 = OpFOrdEqual %v4bool %129 %130 -%133 = OpAll %bool %131 -OpSelectionMerge %137 None -OpBranchConditional %133 %135 %136 -%135 = OpLabel -%138 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 -%139 = OpLoad %v4float %138 -OpStore %134 %139 -OpBranch %137 -%136 = OpLabel -%140 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 -%141 = OpLoad %v4float %140 -OpStore %134 %141 -OpBranch %137 -%137 = OpLabel -%142 = OpLoad %v4float %134 -OpReturnValue %142 -OpFunctionEnd + %17 = OpLabel + %21 = OpVariable %_ptr_Function_v2float Function + OpStore %21 %20 + %23 = OpFunctionCall %v4float %main %21 + OpStore %sk_FragColor %23 + OpReturn + OpFunctionEnd + %fn_hh4 = OpFunction %float None %25 + %26 = OpFunctionParameter %_ptr_Function_v4float + %27 = OpLabel + %x = OpVariable %_ptr_Function_int Function + OpStore %x %int_1 + OpBranch %32 + %32 = OpLabel + OpLoopMerge %36 %35 None + OpBranch %33 + %33 = OpLabel + %37 = OpLoad %int %x + %39 = OpSLessThanEqual %bool %37 %int_2 + OpBranchConditional %39 %34 %36 + %34 = OpLabel + %40 = OpLoad %v4float %26 + %41 = OpCompositeExtract %float %40 0 + OpReturnValue %41 + %35 = OpLabel + %42 = OpLoad %int %x + %43 = OpIAdd %int %42 %int_1 + OpStore %x %43 + OpBranch %32 + %36 = OpLabel + OpUnreachable + OpFunctionEnd + %main = OpFunction %v4float None %44 + %45 = OpFunctionParameter %_ptr_Function_v2float + %46 = OpLabel + %v = OpVariable %_ptr_Function_v4float Function + %75 = OpVariable %_ptr_Function_v4float Function + %81 = OpVariable %_ptr_Function_v4float Function + %85 = OpVariable %_ptr_Function_v4float Function + %88 = OpVariable %_ptr_Function_v4float Function + %91 = OpVariable %_ptr_Function_v4float Function + %95 = OpVariable %_ptr_Function_v4float Function + %134 = OpVariable %_ptr_Function_v4float Function + %48 = OpAccessChain %_ptr_Uniform_v4float %11 %int_2 + %50 = OpLoad %v4float %48 + OpStore %v %50 + %51 = OpVectorShuffle %v3float %50 %50 2 1 0 + %53 = OpCompositeExtract %float %51 0 + %54 = OpCompositeExtract %float %51 1 + %55 = OpCompositeExtract %float %51 2 + %56 = OpCompositeConstruct %v4float %float_0 %53 %54 %55 + OpStore %v %56 + %57 = OpVectorShuffle %v2float %56 %56 0 3 + %58 = OpCompositeExtract %float %57 0 + %59 = OpCompositeExtract %float %57 1 + %60 = OpCompositeConstruct %v4float %float_0 %float_0 %58 %59 + OpStore %v %60 + %62 = OpVectorShuffle %v2float %60 %60 3 0 + %63 = OpCompositeExtract %float %62 0 + %64 = OpCompositeExtract %float %62 1 + %65 = OpCompositeConstruct %v4float %float_1 %float_1 %63 %64 + OpStore %v %65 + %66 = OpVectorShuffle %v2float %65 %65 2 1 + %67 = OpCompositeExtract %float %66 0 + %68 = OpCompositeExtract %float %66 1 + %69 = OpCompositeConstruct %v4float %67 %68 %float_1 %float_1 + OpStore %v %69 + %70 = OpVectorShuffle %v2float %69 %69 0 0 + %71 = OpCompositeExtract %float %70 0 + %72 = OpCompositeExtract %float %70 1 + %73 = OpCompositeConstruct %v4float %71 %72 %float_1 %float_1 + OpStore %v %73 + %74 = OpVectorShuffle %v4float %73 %73 3 2 3 2 + OpStore %v %74 + OpStore %75 %74 + %76 = OpFunctionCall %float %fn_hh4 %75 + %79 = OpCompositeConstruct %v3float %76 %float_123 %float_456 + %80 = OpVectorShuffle %v4float %79 %79 1 1 2 2 + OpStore %v %80 + OpStore %81 %80 + %82 = OpFunctionCall %float %fn_hh4 %81 + %83 = OpCompositeConstruct %v3float %82 %float_123 %float_456 + %84 = OpVectorShuffle %v4float %83 %83 1 1 2 2 + OpStore %v %84 + OpStore %85 %84 + %86 = OpFunctionCall %float %fn_hh4 %85 + %87 = OpCompositeConstruct %v4float %float_123 %float_456 %float_456 %86 + OpStore %v %87 + OpStore %88 %87 + %89 = OpFunctionCall %float %fn_hh4 %88 + %90 = OpCompositeConstruct %v4float %float_123 %float_456 %float_456 %89 + OpStore %v %90 + OpStore %91 %90 + %92 = OpFunctionCall %float %fn_hh4 %91 + %93 = OpCompositeConstruct %v3float %92 %float_123 %float_456 + %94 = OpVectorShuffle %v4float %93 %93 1 0 0 2 + OpStore %v %94 + OpStore %95 %94 + %96 = OpFunctionCall %float %fn_hh4 %95 + %97 = OpCompositeConstruct %v3float %96 %float_123 %float_456 + %98 = OpVectorShuffle %v4float %97 %97 1 0 0 2 + OpStore %v %98 + OpStore %v %101 + %102 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 + %104 = OpLoad %v4float %102 + %105 = OpVectorShuffle %v3float %104 %104 0 1 2 + %106 = OpCompositeExtract %float %105 0 + %107 = OpCompositeExtract %float %105 1 + %108 = OpCompositeExtract %float %105 2 + %109 = OpCompositeConstruct %v4float %106 %107 %108 %float_1 + OpStore %v %109 + %110 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 + %111 = OpLoad %v4float %110 + %112 = OpCompositeExtract %float %111 0 + %113 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 + %114 = OpLoad %v4float %113 + %115 = OpVectorShuffle %v2float %114 %114 1 2 + %116 = OpCompositeExtract %float %115 0 + %117 = OpCompositeExtract %float %115 1 + %118 = OpCompositeConstruct %v4float %112 %float_1 %116 %117 + OpStore %v %118 + %119 = OpLoad %v4float %v + %120 = OpVectorShuffle %v4float %119 %118 7 6 5 4 + OpStore %v %120 + %121 = OpVectorShuffle %v2float %120 %120 1 2 + %122 = OpLoad %v4float %v + %123 = OpVectorShuffle %v4float %122 %121 4 1 2 5 + OpStore %v %123 + %124 = OpVectorShuffle %v2float %123 %123 3 3 + %125 = OpCompositeExtract %float %124 0 + %126 = OpCompositeExtract %float %124 1 + %127 = OpCompositeConstruct %v3float %125 %126 %float_1 + %128 = OpLoad %v4float %v + %129 = OpVectorShuffle %v4float %128 %127 6 5 4 3 + OpStore %v %129 + %131 = OpFOrdEqual %v4bool %129 %130 + %133 = OpAll %bool %131 + OpSelectionMerge %137 None + OpBranchConditional %133 %135 %136 + %135 = OpLabel + %138 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 + %139 = OpLoad %v4float %138 + OpStore %134 %139 + OpBranch %137 + %136 = OpLabel + %140 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 + %141 = OpLoad %v4float %140 + OpStore %134 %141 + OpBranch %137 + %137 = OpLabel + %142 = OpLoad %v4float %134 + OpReturnValue %142 + OpFunctionEnd diff --git a/tests/sksl/shared/SwizzleOpt.skrp b/tests/sksl/shared/SwizzleOpt.skrp index 840d563bc8fe..efc0c5851693 100644 --- a/tests/sksl/shared/SwizzleOpt.skrp +++ b/tests/sksl/shared/SwizzleOpt.skrp @@ -1,3 +1,11 @@ +185 instructions + +[immutable slots] +i0 = 0x3F800000 (1.0) +i1 = 0x3F800000 (1.0) +i2 = 0x40000000 (2.0) +i3 = 0x40400000 (3.0) + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_4_uniforms v = testInputs @@ -183,9 +191,7 @@ copy_constant $1 = 0x42F60000 (123.0) copy_constant $2 = 0x43E40000 (456.0) swizzle_4 $0..3 = ($0..3).yxxz copy_4_slots_unmasked v = $0..3 -splat_2_constants v(0..1) = 0x3F800000 (1.0) -copy_constant v(2) = 0x40000000 (2.0) -copy_constant v(3) = 0x40400000 (3.0) +copy_4_immutables_unmasked v = i0..3 [0x3F800000 (1.0), 0x3F800000 (1.0), 0x40000000 (2.0), 0x40400000 (3.0)] copy_3_uniforms v(0..2) = colorRed(0..2) copy_constant v(3) = 0x3F800000 (1.0) copy_uniform v(0) = colorRed(0) diff --git a/tests/sksl/shared/SwizzleOpt.wgsl b/tests/sksl/shared/SwizzleOpt.wgsl index 8244e257cf8b..1adccb1fdc3c 100644 --- a/tests/sksl/shared/SwizzleOpt.wgsl +++ b/tests/sksl/shared/SwizzleOpt.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, diff --git a/tests/sksl/shared/SwizzleScalar.asm.frag b/tests/sksl/shared/SwizzleScalar.asm.frag index bd603b73feab..26027a755bd1 100644 --- a/tests/sksl/shared/SwizzleScalar.asm.frag +++ b/tests/sksl/shared/SwizzleScalar.asm.frag @@ -1,91 +1,91 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "unknownInput" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %h4 "h4" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %h4 RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %35 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %45 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %48 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "unknownInput" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %h4 "h4" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %h4 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %35 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %45 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %48 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_float = OpTypePointer Uniform %float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%float_1 = OpConstant %float 1 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %float_1 = OpConstant %float 1 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%h4 = OpVariable %_ptr_Function_v4float Function -%28 = OpAccessChain %_ptr_Uniform_float %10 %int_0 -%32 = OpLoad %float %28 -%33 = OpCompositeConstruct %v4float %32 %32 %32 %32 -OpStore %h4 %33 -%34 = OpAccessChain %_ptr_Uniform_float %10 %int_0 -%35 = OpLoad %float %34 -%36 = OpCompositeConstruct %v2float %35 %35 -%37 = OpCompositeExtract %float %36 0 -%38 = OpCompositeExtract %float %36 1 -%40 = OpCompositeConstruct %v4float %37 %38 %float_0 %float_1 -OpStore %h4 %40 -%41 = OpAccessChain %_ptr_Uniform_float %10 %int_0 -%42 = OpLoad %float %41 -%43 = OpCompositeConstruct %v4float %float_0 %42 %float_1 %float_0 -OpStore %h4 %43 -%44 = OpAccessChain %_ptr_Uniform_float %10 %int_0 -%45 = OpLoad %float %44 -%46 = OpAccessChain %_ptr_Uniform_float %10 %int_0 -%47 = OpLoad %float %46 -%48 = OpCompositeConstruct %v4float %float_0 %45 %float_0 %47 -OpStore %h4 %48 -OpReturnValue %48 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %h4 = OpVariable %_ptr_Function_v4float Function + %28 = OpAccessChain %_ptr_Uniform_float %10 %int_0 + %32 = OpLoad %float %28 + %33 = OpCompositeConstruct %v4float %32 %32 %32 %32 + OpStore %h4 %33 + %34 = OpAccessChain %_ptr_Uniform_float %10 %int_0 + %35 = OpLoad %float %34 + %36 = OpCompositeConstruct %v2float %35 %35 + %37 = OpCompositeExtract %float %36 0 + %38 = OpCompositeExtract %float %36 1 + %40 = OpCompositeConstruct %v4float %37 %38 %float_0 %float_1 + OpStore %h4 %40 + %41 = OpAccessChain %_ptr_Uniform_float %10 %int_0 + %42 = OpLoad %float %41 + %43 = OpCompositeConstruct %v4float %float_0 %42 %float_1 %float_0 + OpStore %h4 %43 + %44 = OpAccessChain %_ptr_Uniform_float %10 %int_0 + %45 = OpLoad %float %44 + %46 = OpAccessChain %_ptr_Uniform_float %10 %int_0 + %47 = OpLoad %float %46 + %48 = OpCompositeConstruct %v4float %float_0 %45 %float_0 %47 + OpStore %h4 %48 + OpReturnValue %48 + OpFunctionEnd diff --git a/tests/sksl/shared/SwizzleScalar.skrp b/tests/sksl/shared/SwizzleScalar.skrp index 50e0ef77cee8..96dff22b8292 100644 --- a/tests/sksl/shared/SwizzleScalar.skrp +++ b/tests/sksl/shared/SwizzleScalar.skrp @@ -1,3 +1,5 @@ +20 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_uniform $0 = unknownInput diff --git a/tests/sksl/shared/SwizzleScalar.wgsl b/tests/sksl/shared/SwizzleScalar.wgsl index cb4a93cf4dbc..ae58a5901409 100644 --- a/tests/sksl/shared/SwizzleScalar.wgsl +++ b/tests/sksl/shared/SwizzleScalar.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, diff --git a/tests/sksl/shared/SwizzleScalarBool.asm.frag b/tests/sksl/shared/SwizzleScalarBool.asm.frag index 7ca0b95abf47..ccca87e02422 100644 --- a/tests/sksl/shared/SwizzleScalarBool.asm.frag +++ b/tests/sksl/shared/SwizzleScalarBool.asm.frag @@ -1,93 +1,93 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "unknownInput" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %b "b" -OpName %b4 "b4" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %32 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %55 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "unknownInput" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %b "b" + OpName %b4 "b4" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %32 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %55 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_bool = OpTypePointer Function %bool %_ptr_Uniform_float = OpTypePointer Uniform %float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%v4bool = OpTypeVector %bool 4 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %v4bool = OpTypeVector %bool 4 %_ptr_Function_v4bool = OpTypePointer Function %v4bool -%v2bool = OpTypeVector %bool 2 -%false = OpConstantFalse %bool -%true = OpConstantTrue %bool -%float_1 = OpConstant %float 1 + %v2bool = OpTypeVector %bool 2 + %false = OpConstantFalse %bool + %true = OpConstantTrue %bool + %float_1 = OpConstant %float 1 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%b = OpVariable %_ptr_Function_bool Function -%b4 = OpVariable %_ptr_Function_v4bool Function -%28 = OpAccessChain %_ptr_Uniform_float %10 %int_0 -%32 = OpLoad %float %28 -%33 = OpFUnordNotEqual %bool %32 %float_0 -OpStore %b %33 -%37 = OpCompositeConstruct %v4bool %33 %33 %33 %33 -OpStore %b4 %37 -%39 = OpCompositeConstruct %v2bool %33 %33 -%40 = OpCompositeExtract %bool %39 0 -%41 = OpCompositeExtract %bool %39 1 -%44 = OpCompositeConstruct %v4bool %40 %41 %false %true -OpStore %b4 %44 -%45 = OpCompositeConstruct %v4bool %false %33 %true %false -OpStore %b4 %45 -%46 = OpCompositeConstruct %v4bool %false %33 %false %33 -OpStore %b4 %46 -%47 = OpSelect %float %false %float_1 %float_0 -%49 = OpCompositeExtract %bool %46 1 -%50 = OpSelect %float %49 %float_1 %float_0 -%51 = OpCompositeExtract %bool %46 2 -%52 = OpSelect %float %51 %float_1 %float_0 -%53 = OpCompositeExtract %bool %46 3 -%54 = OpSelect %float %53 %float_1 %float_0 -%55 = OpCompositeConstruct %v4float %47 %50 %52 %54 -OpReturnValue %55 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %b = OpVariable %_ptr_Function_bool Function + %b4 = OpVariable %_ptr_Function_v4bool Function + %28 = OpAccessChain %_ptr_Uniform_float %10 %int_0 + %32 = OpLoad %float %28 + %33 = OpFUnordNotEqual %bool %32 %float_0 + OpStore %b %33 + %37 = OpCompositeConstruct %v4bool %33 %33 %33 %33 + OpStore %b4 %37 + %39 = OpCompositeConstruct %v2bool %33 %33 + %40 = OpCompositeExtract %bool %39 0 + %41 = OpCompositeExtract %bool %39 1 + %44 = OpCompositeConstruct %v4bool %40 %41 %false %true + OpStore %b4 %44 + %45 = OpCompositeConstruct %v4bool %false %33 %true %false + OpStore %b4 %45 + %46 = OpCompositeConstruct %v4bool %false %33 %false %33 + OpStore %b4 %46 + %47 = OpSelect %float %false %float_1 %float_0 + %49 = OpCompositeExtract %bool %46 1 + %50 = OpSelect %float %49 %float_1 %float_0 + %51 = OpCompositeExtract %bool %46 2 + %52 = OpSelect %float %51 %float_1 %float_0 + %53 = OpCompositeExtract %bool %46 3 + %54 = OpSelect %float %53 %float_1 %float_0 + %55 = OpCompositeConstruct %v4float %47 %50 %52 %54 + OpReturnValue %55 + OpFunctionEnd diff --git a/tests/sksl/shared/SwizzleScalarBool.skrp b/tests/sksl/shared/SwizzleScalarBool.skrp index 63ca583ff968..bbcaf2422079 100644 --- a/tests/sksl/shared/SwizzleScalarBool.skrp +++ b/tests/sksl/shared/SwizzleScalarBool.skrp @@ -1,3 +1,5 @@ +23 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_uniform $0 = unknownInput diff --git a/tests/sksl/shared/SwizzleScalarBool.wgsl b/tests/sksl/shared/SwizzleScalarBool.wgsl index f7c8b121a6d2..13c7ec62c7b7 100644 --- a/tests/sksl/shared/SwizzleScalarBool.wgsl +++ b/tests/sksl/shared/SwizzleScalarBool.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, diff --git a/tests/sksl/shared/SwizzleScalarInt.asm.frag b/tests/sksl/shared/SwizzleScalarInt.asm.frag index 28c68467df06..0d305d25ef4e 100644 --- a/tests/sksl/shared/SwizzleScalarInt.asm.frag +++ b/tests/sksl/shared/SwizzleScalarInt.asm.frag @@ -1,91 +1,91 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "unknownInput" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %i "i" -OpName %i4 "i4" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %32 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %48 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %53 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "unknownInput" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %i "i" + OpName %i4 "i4" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %32 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %48 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %53 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%int = OpTypeInt 32 1 + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %int = OpTypeInt 32 1 %_ptr_Function_int = OpTypePointer Function %int %_ptr_Uniform_float = OpTypePointer Uniform %float -%int_0 = OpConstant %int 0 -%v4int = OpTypeVector %int 4 + %int_0 = OpConstant %int 0 + %v4int = OpTypeVector %int 4 %_ptr_Function_v4int = OpTypePointer Function %v4int -%v2int = OpTypeVector %int 2 -%int_1 = OpConstant %int 1 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%i = OpVariable %_ptr_Function_int Function -%i4 = OpVariable %_ptr_Function_v4int Function -%29 = OpAccessChain %_ptr_Uniform_float %10 %int_0 -%32 = OpLoad %float %29 -%33 = OpConvertFToS %int %32 -OpStore %i %33 -%37 = OpCompositeConstruct %v4int %33 %33 %33 %33 -OpStore %i4 %37 -%39 = OpCompositeConstruct %v2int %33 %33 -%40 = OpCompositeExtract %int %39 0 -%41 = OpCompositeExtract %int %39 1 -%43 = OpCompositeConstruct %v4int %40 %41 %int_0 %int_1 -OpStore %i4 %43 -%44 = OpCompositeConstruct %v4int %int_0 %33 %int_1 %int_0 -OpStore %i4 %44 -%45 = OpCompositeConstruct %v4int %int_0 %33 %int_0 %33 -OpStore %i4 %45 -%46 = OpConvertSToF %float %int_0 -%47 = OpCompositeExtract %int %45 1 -%48 = OpConvertSToF %float %47 -%49 = OpCompositeExtract %int %45 2 -%50 = OpConvertSToF %float %49 -%51 = OpCompositeExtract %int %45 3 -%52 = OpConvertSToF %float %51 -%53 = OpCompositeConstruct %v4float %46 %48 %50 %52 -OpReturnValue %53 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %i = OpVariable %_ptr_Function_int Function + %i4 = OpVariable %_ptr_Function_v4int Function + %29 = OpAccessChain %_ptr_Uniform_float %10 %int_0 + %32 = OpLoad %float %29 + %33 = OpConvertFToS %int %32 + OpStore %i %33 + %37 = OpCompositeConstruct %v4int %33 %33 %33 %33 + OpStore %i4 %37 + %39 = OpCompositeConstruct %v2int %33 %33 + %40 = OpCompositeExtract %int %39 0 + %41 = OpCompositeExtract %int %39 1 + %43 = OpCompositeConstruct %v4int %40 %41 %int_0 %int_1 + OpStore %i4 %43 + %44 = OpCompositeConstruct %v4int %int_0 %33 %int_1 %int_0 + OpStore %i4 %44 + %45 = OpCompositeConstruct %v4int %int_0 %33 %int_0 %33 + OpStore %i4 %45 + %46 = OpConvertSToF %float %int_0 + %47 = OpCompositeExtract %int %45 1 + %48 = OpConvertSToF %float %47 + %49 = OpCompositeExtract %int %45 2 + %50 = OpConvertSToF %float %49 + %51 = OpCompositeExtract %int %45 3 + %52 = OpConvertSToF %float %51 + %53 = OpCompositeConstruct %v4float %46 %48 %50 %52 + OpReturnValue %53 + OpFunctionEnd diff --git a/tests/sksl/shared/SwizzleScalarInt.skrp b/tests/sksl/shared/SwizzleScalarInt.skrp index 026539faba7a..0fd59a2a6dc6 100644 --- a/tests/sksl/shared/SwizzleScalarInt.skrp +++ b/tests/sksl/shared/SwizzleScalarInt.skrp @@ -1,3 +1,5 @@ +23 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_uniform $0 = unknownInput diff --git a/tests/sksl/shared/SwizzleScalarInt.wgsl b/tests/sksl/shared/SwizzleScalarInt.wgsl index 425b94b2aec7..f2478cfa410b 100644 --- a/tests/sksl/shared/SwizzleScalarInt.wgsl +++ b/tests/sksl/shared/SwizzleScalarInt.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, diff --git a/tests/sksl/shared/TemporaryIndexLookup.asm.frag b/tests/sksl/shared/TemporaryIndexLookup.asm.frag index 264d7b16ab05..46b1600102b1 100644 --- a/tests/sksl/shared/TemporaryIndexLookup.asm.frag +++ b/tests/sksl/shared/TemporaryIndexLookup.asm.frag @@ -1,143 +1,143 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpMemberName %_UniformBuffer 2 "testMatrix3x3" -OpName %_entrypoint_v "_entrypoint_v" -OpName %GetTestMatrix_f33 "GetTestMatrix_f33" -OpName %main "main" -OpName %expected "expected" -OpName %i "i" -OpName %j "j" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 ColMajor -OpMemberDecorate %_UniformBuffer 2 MatrixStride 16 -OpDecorate %_UniformBuffer Block -OpDecorate %11 Binding 0 -OpDecorate %11 DescriptorSet 0 -OpDecorate %75 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpMemberName %_UniformBuffer 2 "testMatrix3x3" + OpName %_entrypoint_v "_entrypoint_v" + OpName %GetTestMatrix_f33 "GetTestMatrix_f33" + OpName %main "main" + OpName %expected "expected" + OpName %i "i" + OpName %j "j" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 ColMajor + OpMemberDecorate %_UniformBuffer 2 MatrixStride 16 + OpDecorate %_UniformBuffer Block + OpDecorate %11 Binding 0 + OpDecorate %11 DescriptorSet 0 + OpDecorate %75 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%v3float = OpTypeVector %float 3 + %v3float = OpTypeVector %float 3 %mat3v3float = OpTypeMatrix %v3float 3 %_UniformBuffer = OpTypeStruct %v4float %v4float %mat3v3float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%18 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%22 = OpConstantComposite %v2float %float_0 %float_0 + %11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %18 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %22 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%26 = OpTypeFunction %mat3v3float + %26 = OpTypeFunction %mat3v3float %_ptr_Uniform_mat3v3float = OpTypePointer Uniform %mat3v3float -%int = OpTypeInt 32 1 -%int_2 = OpConstant %int 2 -%33 = OpTypeFunction %v4float %_ptr_Function_v2float + %int = OpTypeInt 32 1 + %int_2 = OpConstant %int 2 + %33 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_float = OpTypePointer Function %float %_ptr_Function_int = OpTypePointer Function %int -%int_0 = OpConstant %int 0 -%int_3 = OpConstant %int 3 -%float_1 = OpConstant %float 1 + %int_0 = OpConstant %int 0 + %int_3 = OpConstant %int 3 + %float_1 = OpConstant %float 1 %_ptr_Function_mat3v3float = OpTypePointer Function %mat3v3float %_ptr_Function_v3float = OpTypePointer Function %v3float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_1 = OpConstant %int 1 + %int_1 = OpConstant %int 1 %_entrypoint_v = OpFunction %void None %18 -%19 = OpLabel -%23 = OpVariable %_ptr_Function_v2float Function -OpStore %23 %22 -%25 = OpFunctionCall %v4float %main %23 -OpStore %sk_FragColor %25 -OpReturn -OpFunctionEnd + %19 = OpLabel + %23 = OpVariable %_ptr_Function_v2float Function + OpStore %23 %22 + %25 = OpFunctionCall %v4float %main %23 + OpStore %sk_FragColor %25 + OpReturn + OpFunctionEnd %GetTestMatrix_f33 = OpFunction %mat3v3float None %26 -%27 = OpLabel -%28 = OpAccessChain %_ptr_Uniform_mat3v3float %11 %int_2 -%32 = OpLoad %mat3v3float %28 -OpReturnValue %32 -OpFunctionEnd -%main = OpFunction %v4float None %33 -%34 = OpFunctionParameter %_ptr_Function_v2float -%35 = OpLabel -%expected = OpVariable %_ptr_Function_float Function -%i = OpVariable %_ptr_Function_int Function -%j = OpVariable %_ptr_Function_int Function -%60 = OpVariable %_ptr_Function_mat3v3float Function -OpStore %expected %float_0 -OpStore %i %int_0 -OpBranch %41 -%41 = OpLabel -OpLoopMerge %45 %44 None -OpBranch %42 -%42 = OpLabel -%46 = OpLoad %int %i -%48 = OpSLessThan %bool %46 %int_3 -OpBranchConditional %48 %43 %45 -%43 = OpLabel -OpStore %j %int_0 -OpBranch %50 -%50 = OpLabel -OpLoopMerge %54 %53 None -OpBranch %51 -%51 = OpLabel -%55 = OpLoad %int %j -%56 = OpSLessThan %bool %55 %int_3 -OpBranchConditional %56 %52 %54 -%52 = OpLabel -%57 = OpLoad %float %expected -%59 = OpFAdd %float %57 %float_1 -OpStore %expected %59 -%62 = OpFunctionCall %mat3v3float %GetTestMatrix_f33 -OpStore %60 %62 -%63 = OpLoad %int %i -%64 = OpAccessChain %_ptr_Function_v3float %60 %63 -%66 = OpLoad %v3float %64 -%67 = OpLoad %int %j -%68 = OpVectorExtractDynamic %float %66 %67 -%69 = OpFUnordNotEqual %bool %68 %59 -OpSelectionMerge %71 None -OpBranchConditional %69 %70 %71 -%70 = OpLabel -%72 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 -%75 = OpLoad %v4float %72 -OpReturnValue %75 -%71 = OpLabel -OpBranch %53 -%53 = OpLabel -%76 = OpLoad %int %j -%77 = OpIAdd %int %76 %int_1 -OpStore %j %77 -OpBranch %50 -%54 = OpLabel -OpBranch %44 -%44 = OpLabel -%78 = OpLoad %int %i -%79 = OpIAdd %int %78 %int_1 -OpStore %i %79 -OpBranch %41 -%45 = OpLabel -%80 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 -%81 = OpLoad %v4float %80 -OpReturnValue %81 -OpFunctionEnd + %27 = OpLabel + %28 = OpAccessChain %_ptr_Uniform_mat3v3float %11 %int_2 + %32 = OpLoad %mat3v3float %28 + OpReturnValue %32 + OpFunctionEnd + %main = OpFunction %v4float None %33 + %34 = OpFunctionParameter %_ptr_Function_v2float + %35 = OpLabel + %expected = OpVariable %_ptr_Function_float Function + %i = OpVariable %_ptr_Function_int Function + %j = OpVariable %_ptr_Function_int Function + %60 = OpVariable %_ptr_Function_mat3v3float Function + OpStore %expected %float_0 + OpStore %i %int_0 + OpBranch %41 + %41 = OpLabel + OpLoopMerge %45 %44 None + OpBranch %42 + %42 = OpLabel + %46 = OpLoad %int %i + %48 = OpSLessThan %bool %46 %int_3 + OpBranchConditional %48 %43 %45 + %43 = OpLabel + OpStore %j %int_0 + OpBranch %50 + %50 = OpLabel + OpLoopMerge %54 %53 None + OpBranch %51 + %51 = OpLabel + %55 = OpLoad %int %j + %56 = OpSLessThan %bool %55 %int_3 + OpBranchConditional %56 %52 %54 + %52 = OpLabel + %57 = OpLoad %float %expected + %59 = OpFAdd %float %57 %float_1 + OpStore %expected %59 + %62 = OpFunctionCall %mat3v3float %GetTestMatrix_f33 + OpStore %60 %62 + %63 = OpLoad %int %i + %64 = OpAccessChain %_ptr_Function_v3float %60 %63 + %66 = OpLoad %v3float %64 + %67 = OpLoad %int %j + %68 = OpVectorExtractDynamic %float %66 %67 + %69 = OpFUnordNotEqual %bool %68 %59 + OpSelectionMerge %71 None + OpBranchConditional %69 %70 %71 + %70 = OpLabel + %72 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 + %75 = OpLoad %v4float %72 + OpReturnValue %75 + %71 = OpLabel + OpBranch %53 + %53 = OpLabel + %76 = OpLoad %int %j + %77 = OpIAdd %int %76 %int_1 + OpStore %j %77 + OpBranch %50 + %54 = OpLabel + OpBranch %44 + %44 = OpLabel + %78 = OpLoad %int %i + %79 = OpIAdd %int %78 %int_1 + OpStore %i %79 + OpBranch %41 + %45 = OpLabel + %80 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 + %81 = OpLoad %v4float %80 + OpReturnValue %81 + OpFunctionEnd diff --git a/tests/sksl/shared/TemporaryIndexLookup.skrp b/tests/sksl/shared/TemporaryIndexLookup.skrp index 4c1a16523516..e07ed07bafd0 100644 --- a/tests/sksl/shared/TemporaryIndexLookup.skrp +++ b/tests/sksl/shared/TemporaryIndexLookup.skrp @@ -1,3 +1,5 @@ +51 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true splat_2_constants expected, i = 0 diff --git a/tests/sksl/shared/TemporaryIndexLookup.wgsl b/tests/sksl/shared/TemporaryIndexLookup.wgsl new file mode 100644 index 000000000000..f255cb89cf8e --- /dev/null +++ b/tests/sksl/shared/TemporaryIndexLookup.wgsl @@ -0,0 +1,60 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, + testMatrix3x3: mat3x3, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn GetTestMatrix_f33() -> mat3x3 { + { + return _globalUniforms.testMatrix3x3; + } +} +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var expected: f32 = 0.0; + { + var i: i32 = 0; + loop { + { + { + var j: i32 = 0; + loop { + { + expected = expected + 1.0; + let _skTemp0 = GetTestMatrix_f33(); + if _skTemp0[i][j] != expected { + { + return _globalUniforms.colorRed; + } + } + } + continuing { + j = j + i32(1); + break if j >= 3; + } + } + } + } + continuing { + i = i + i32(1); + break if i >= 3; + } + } + } + return _globalUniforms.colorGreen; + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/TernaryAsLValueEntirelyFoldable.asm.frag b/tests/sksl/shared/TernaryAsLValueEntirelyFoldable.asm.frag index 09e01844fd11..0aa22028fd88 100644 --- a/tests/sksl/shared/TernaryAsLValueEntirelyFoldable.asm.frag +++ b/tests/sksl/shared/TernaryAsLValueEntirelyFoldable.asm.frag @@ -1,51 +1,51 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %r "r" -OpName %g "g" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %r RelaxedPrecision -OpDecorate %g RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %r "r" + OpName %g "g" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %r RelaxedPrecision + OpDecorate %g RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%12 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%16 = OpConstantComposite %v2float %float_0 %float_0 + %void = OpTypeVoid + %12 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %16 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%20 = OpTypeFunction %v4float %_ptr_Function_v2float + %20 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_float = OpTypePointer Function %float -%float_1 = OpConstant %float 1 -%27 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1 %_entrypoint_v = OpFunction %void None %12 -%13 = OpLabel -%17 = OpVariable %_ptr_Function_v2float Function -OpStore %17 %16 -%19 = OpFunctionCall %v4float %main %17 -OpStore %sk_FragColor %19 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %20 -%21 = OpFunctionParameter %_ptr_Function_v2float -%22 = OpLabel -%r = OpVariable %_ptr_Function_float Function -%g = OpVariable %_ptr_Function_float Function -OpStore %r %float_0 -OpStore %g %float_1 -OpReturnValue %27 -OpFunctionEnd + %13 = OpLabel + %17 = OpVariable %_ptr_Function_v2float Function + OpStore %17 %16 + %19 = OpFunctionCall %v4float %main %17 + OpStore %sk_FragColor %19 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %20 + %21 = OpFunctionParameter %_ptr_Function_v2float + %22 = OpLabel + %r = OpVariable %_ptr_Function_float Function + %g = OpVariable %_ptr_Function_float Function + OpStore %r %float_0 + OpStore %g %float_1 + OpReturnValue %27 + OpFunctionEnd diff --git a/tests/sksl/shared/TernaryAsLValueEntirelyFoldable.skrp b/tests/sksl/shared/TernaryAsLValueEntirelyFoldable.skrp index 822808ba5ec9..7a313ca54d12 100644 --- a/tests/sksl/shared/TernaryAsLValueEntirelyFoldable.skrp +++ b/tests/sksl/shared/TernaryAsLValueEntirelyFoldable.skrp @@ -1,3 +1,5 @@ +9 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true splat_2_constants r, g = 0 diff --git a/tests/sksl/shared/TernaryAsLValueEntirelyFoldable.wgsl b/tests/sksl/shared/TernaryAsLValueEntirelyFoldable.wgsl new file mode 100644 index 000000000000..c92a22c88aae --- /dev/null +++ b/tests/sksl/shared/TernaryAsLValueEntirelyFoldable.wgsl @@ -0,0 +1,23 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var r: f32; + var g: f32; + r = 0.0; + g = 1.0; + return vec4(r, g, 0.0, 1.0); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/TernaryAsLValueFoldableTest.asm.frag b/tests/sksl/shared/TernaryAsLValueFoldableTest.asm.frag index 336deb178d27..1acd5de89ab4 100644 --- a/tests/sksl/shared/TernaryAsLValueFoldableTest.asm.frag +++ b/tests/sksl/shared/TernaryAsLValueFoldableTest.asm.frag @@ -1,73 +1,73 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "unknownInput" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %r "r" -OpName %g "g" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %r RelaxedPrecision -OpDecorate %g RelaxedPrecision -OpDecorate %34 RelaxedPrecision -OpDecorate %35 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "unknownInput" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %r "r" + OpName %g "g" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %r RelaxedPrecision + OpDecorate %g RelaxedPrecision + OpDecorate %34 RelaxedPrecision + OpDecorate %35 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_float = OpTypePointer Function %float -%float_1 = OpConstant %float 1 + %float_1 = OpConstant %float 1 %_ptr_Uniform_float = OpTypePointer Uniform %float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%r = OpVariable %_ptr_Function_float Function -%g = OpVariable %_ptr_Function_float Function -%30 = OpAccessChain %_ptr_Uniform_float %10 %int_0 -%34 = OpLoad %float %30 -%35 = OpFSub %float %float_1 %34 -OpStore %r %35 -%36 = OpAccessChain %_ptr_Uniform_float %10 %int_0 -%37 = OpLoad %float %36 -OpStore %g %37 -%38 = OpCompositeConstruct %v4float %35 %37 %float_0 %float_1 -OpReturnValue %38 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %r = OpVariable %_ptr_Function_float Function + %g = OpVariable %_ptr_Function_float Function + %30 = OpAccessChain %_ptr_Uniform_float %10 %int_0 + %34 = OpLoad %float %30 + %35 = OpFSub %float %float_1 %34 + OpStore %r %35 + %36 = OpAccessChain %_ptr_Uniform_float %10 %int_0 + %37 = OpLoad %float %36 + OpStore %g %37 + %38 = OpCompositeConstruct %v4float %35 %37 %float_0 %float_1 + OpReturnValue %38 + OpFunctionEnd diff --git a/tests/sksl/shared/TernaryAsLValueFoldableTest.skrp b/tests/sksl/shared/TernaryAsLValueFoldableTest.skrp index 094cf26d2f29..01735a40c893 100644 --- a/tests/sksl/shared/TernaryAsLValueFoldableTest.skrp +++ b/tests/sksl/shared/TernaryAsLValueFoldableTest.skrp @@ -1,3 +1,5 @@ +12 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true splat_2_constants r, g = 0 diff --git a/tests/sksl/shared/TernaryAsLValueFoldableTest.wgsl b/tests/sksl/shared/TernaryAsLValueFoldableTest.wgsl new file mode 100644 index 000000000000..42b87162eb1c --- /dev/null +++ b/tests/sksl/shared/TernaryAsLValueFoldableTest.wgsl @@ -0,0 +1,27 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + unknownInput: f32, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var r: f32; + var g: f32; + r = 1.0 - _globalUniforms.unknownInput; + g = _globalUniforms.unknownInput; + return vec4(r, g, 0.0, 1.0); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/TernaryComplexNesting.asm.frag b/tests/sksl/shared/TernaryComplexNesting.asm.frag index fdf5e834283f..29fd7f531309 100644 --- a/tests/sksl/shared/TernaryComplexNesting.asm.frag +++ b/tests/sksl/shared/TernaryComplexNesting.asm.frag @@ -1,237 +1,237 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorWhite" -OpName %_entrypoint_v "_entrypoint_v" -OpName %IsEqual_bh4h4 "IsEqual_bh4h4" -OpName %main "main" -OpName %colorBlue "colorBlue" -OpName %colorGreen "colorGreen" -OpName %colorRed "colorRed" -OpName %result "result" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %11 Binding 0 -OpDecorate %11 DescriptorSet 0 -OpDecorate %29 RelaxedPrecision -OpDecorate %30 RelaxedPrecision -OpDecorate %colorBlue RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %45 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %colorGreen RelaxedPrecision -OpDecorate %49 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %53 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %colorRed RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %58 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %62 RelaxedPrecision -OpDecorate %result RelaxedPrecision -OpDecorate %66 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %91 RelaxedPrecision -OpDecorate %92 RelaxedPrecision -OpDecorate %93 RelaxedPrecision -OpDecorate %102 RelaxedPrecision -OpDecorate %113 RelaxedPrecision -OpDecorate %120 RelaxedPrecision -OpDecorate %121 RelaxedPrecision -OpDecorate %122 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorWhite" + OpName %_entrypoint_v "_entrypoint_v" + OpName %IsEqual_bh4h4 "IsEqual_bh4h4" + OpName %main "main" + OpName %colorBlue "colorBlue" + OpName %colorGreen "colorGreen" + OpName %colorRed "colorRed" + OpName %result "result" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %11 Binding 0 + OpDecorate %11 DescriptorSet 0 + OpDecorate %29 RelaxedPrecision + OpDecorate %30 RelaxedPrecision + OpDecorate %colorBlue RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %45 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %colorGreen RelaxedPrecision + OpDecorate %49 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %53 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %colorRed RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %58 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %62 RelaxedPrecision + OpDecorate %result RelaxedPrecision + OpDecorate %66 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %91 RelaxedPrecision + OpDecorate %92 RelaxedPrecision + OpDecorate %93 RelaxedPrecision + OpDecorate %102 RelaxedPrecision + OpDecorate %113 RelaxedPrecision + OpDecorate %120 RelaxedPrecision + OpDecorate %121 RelaxedPrecision + OpDecorate %122 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%16 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%20 = OpConstantComposite %v2float %float_0 %float_0 + %11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %16 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %20 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float %_ptr_Function_v4float = OpTypePointer Function %v4float -%25 = OpTypeFunction %bool %_ptr_Function_v4float %_ptr_Function_v4float -%v4bool = OpTypeVector %bool 4 -%34 = OpTypeFunction %v4float %_ptr_Function_v2float + %25 = OpTypeFunction %bool %_ptr_Function_v4float %_ptr_Function_v4float + %v4bool = OpTypeVector %bool 4 + %34 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 %_entrypoint_v = OpFunction %void None %16 -%17 = OpLabel -%21 = OpVariable %_ptr_Function_v2float Function -OpStore %21 %20 -%23 = OpFunctionCall %v4float %main %21 -OpStore %sk_FragColor %23 -OpReturn -OpFunctionEnd + %17 = OpLabel + %21 = OpVariable %_ptr_Function_v2float Function + OpStore %21 %20 + %23 = OpFunctionCall %v4float %main %21 + OpStore %sk_FragColor %23 + OpReturn + OpFunctionEnd %IsEqual_bh4h4 = OpFunction %bool None %25 -%26 = OpFunctionParameter %_ptr_Function_v4float -%27 = OpFunctionParameter %_ptr_Function_v4float -%28 = OpLabel -%29 = OpLoad %v4float %26 -%30 = OpLoad %v4float %27 -%31 = OpFOrdEqual %v4bool %29 %30 -%33 = OpAll %bool %31 -OpReturnValue %33 -OpFunctionEnd -%main = OpFunction %v4float None %34 -%35 = OpFunctionParameter %_ptr_Function_v2float -%36 = OpLabel -%colorBlue = OpVariable %_ptr_Function_v4float Function -%colorGreen = OpVariable %_ptr_Function_v4float Function -%colorRed = OpVariable %_ptr_Function_v4float Function -%result = OpVariable %_ptr_Function_v4float Function -%67 = OpVariable %_ptr_Function_v4float Function -%68 = OpVariable %_ptr_Function_v4float Function -%70 = OpVariable %_ptr_Function_v4float Function -%74 = OpVariable %_ptr_Function_v4float Function -%75 = OpVariable %_ptr_Function_v4float Function -%77 = OpVariable %_ptr_Function_v4float Function -%83 = OpVariable %_ptr_Function_v4float Function -%84 = OpVariable %_ptr_Function_v4float Function -%86 = OpVariable %_ptr_Function_v4float Function -%94 = OpVariable %_ptr_Function_v4float Function -%95 = OpVariable %_ptr_Function_v4float Function -%97 = OpVariable %_ptr_Function_v4float Function -%104 = OpVariable %_ptr_Function_v4float Function -%105 = OpVariable %_ptr_Function_v4float Function -%107 = OpVariable %_ptr_Function_v4float Function -%111 = OpVariable %_ptr_Function_v4float Function -%114 = OpVariable %_ptr_Function_v4float Function -%116 = OpVariable %_ptr_Function_v4float Function -%38 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 -%42 = OpLoad %v4float %38 -%43 = OpVectorShuffle %v2float %42 %42 2 3 -%44 = OpCompositeExtract %float %43 0 -%45 = OpCompositeExtract %float %43 1 -%46 = OpCompositeConstruct %v4float %float_0 %float_0 %44 %45 -OpStore %colorBlue %46 -%48 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 -%49 = OpLoad %v4float %48 -%50 = OpCompositeExtract %float %49 1 -%51 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 -%52 = OpLoad %v4float %51 -%53 = OpCompositeExtract %float %52 3 -%54 = OpCompositeConstruct %v4float %float_0 %50 %float_0 %53 -OpStore %colorGreen %54 -%56 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 -%57 = OpLoad %v4float %56 -%58 = OpCompositeExtract %float %57 0 -%59 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 -%60 = OpLoad %v4float %59 -%61 = OpCompositeExtract %float %60 3 -%62 = OpCompositeConstruct %v4float %58 %float_0 %float_0 %61 -OpStore %colorRed %62 -%65 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 -%66 = OpLoad %v4float %65 -OpStore %67 %66 -OpStore %68 %46 -%69 = OpFunctionCall %bool %IsEqual_bh4h4 %67 %68 -%64 = OpLogicalNot %bool %69 -OpSelectionMerge %73 None -OpBranchConditional %64 %71 %72 -%71 = OpLabel -OpStore %74 %54 -OpStore %75 %62 -%76 = OpFunctionCall %bool %IsEqual_bh4h4 %74 %75 -OpSelectionMerge %80 None -OpBranchConditional %76 %78 %79 -%78 = OpLabel -OpStore %77 %62 -OpBranch %80 -%79 = OpLabel -OpStore %77 %54 -OpBranch %80 -%80 = OpLabel -%81 = OpLoad %v4float %77 -OpStore %70 %81 -OpBranch %73 -%72 = OpLabel -OpStore %83 %62 -OpStore %84 %54 -%85 = OpFunctionCall %bool %IsEqual_bh4h4 %83 %84 -%82 = OpLogicalNot %bool %85 -OpSelectionMerge %89 None -OpBranchConditional %82 %87 %88 -%87 = OpLabel -OpStore %86 %46 -OpBranch %89 -%88 = OpLabel -%90 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 -%91 = OpLoad %v4float %90 -OpStore %86 %91 -OpBranch %89 -%89 = OpLabel -%92 = OpLoad %v4float %86 -OpStore %70 %92 -OpBranch %73 -%73 = OpLabel -%93 = OpLoad %v4float %70 -OpStore %result %93 -OpStore %94 %62 -OpStore %95 %46 -%96 = OpFunctionCall %bool %IsEqual_bh4h4 %94 %95 -OpSelectionMerge %100 None -OpBranchConditional %96 %98 %99 -%98 = OpLabel -%101 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 -%102 = OpLoad %v4float %101 -OpStore %97 %102 -OpBranch %100 -%99 = OpLabel -OpStore %104 %62 -OpStore %105 %54 -%106 = OpFunctionCall %bool %IsEqual_bh4h4 %104 %105 -%103 = OpLogicalNot %bool %106 -OpSelectionMerge %110 None -OpBranchConditional %103 %108 %109 -%108 = OpLabel -OpStore %107 %93 -OpBranch %110 -%109 = OpLabel -OpStore %111 %62 -%112 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 -%113 = OpLoad %v4float %112 -OpStore %114 %113 -%115 = OpFunctionCall %bool %IsEqual_bh4h4 %111 %114 -OpSelectionMerge %119 None -OpBranchConditional %115 %117 %118 -%117 = OpLabel -OpStore %116 %46 -OpBranch %119 -%118 = OpLabel -OpStore %116 %62 -OpBranch %119 -%119 = OpLabel -%120 = OpLoad %v4float %116 -OpStore %107 %120 -OpBranch %110 -%110 = OpLabel -%121 = OpLoad %v4float %107 -OpStore %97 %121 -OpBranch %100 -%100 = OpLabel -%122 = OpLoad %v4float %97 -OpReturnValue %122 -OpFunctionEnd + %26 = OpFunctionParameter %_ptr_Function_v4float + %27 = OpFunctionParameter %_ptr_Function_v4float + %28 = OpLabel + %29 = OpLoad %v4float %26 + %30 = OpLoad %v4float %27 + %31 = OpFOrdEqual %v4bool %29 %30 + %33 = OpAll %bool %31 + OpReturnValue %33 + OpFunctionEnd + %main = OpFunction %v4float None %34 + %35 = OpFunctionParameter %_ptr_Function_v2float + %36 = OpLabel + %colorBlue = OpVariable %_ptr_Function_v4float Function + %colorGreen = OpVariable %_ptr_Function_v4float Function + %colorRed = OpVariable %_ptr_Function_v4float Function + %result = OpVariable %_ptr_Function_v4float Function + %67 = OpVariable %_ptr_Function_v4float Function + %68 = OpVariable %_ptr_Function_v4float Function + %70 = OpVariable %_ptr_Function_v4float Function + %74 = OpVariable %_ptr_Function_v4float Function + %75 = OpVariable %_ptr_Function_v4float Function + %77 = OpVariable %_ptr_Function_v4float Function + %83 = OpVariable %_ptr_Function_v4float Function + %84 = OpVariable %_ptr_Function_v4float Function + %86 = OpVariable %_ptr_Function_v4float Function + %94 = OpVariable %_ptr_Function_v4float Function + %95 = OpVariable %_ptr_Function_v4float Function + %97 = OpVariable %_ptr_Function_v4float Function + %104 = OpVariable %_ptr_Function_v4float Function + %105 = OpVariable %_ptr_Function_v4float Function + %107 = OpVariable %_ptr_Function_v4float Function + %111 = OpVariable %_ptr_Function_v4float Function + %114 = OpVariable %_ptr_Function_v4float Function + %116 = OpVariable %_ptr_Function_v4float Function + %38 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 + %42 = OpLoad %v4float %38 + %43 = OpVectorShuffle %v2float %42 %42 2 3 + %44 = OpCompositeExtract %float %43 0 + %45 = OpCompositeExtract %float %43 1 + %46 = OpCompositeConstruct %v4float %float_0 %float_0 %44 %45 + OpStore %colorBlue %46 + %48 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 + %49 = OpLoad %v4float %48 + %50 = OpCompositeExtract %float %49 1 + %51 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 + %52 = OpLoad %v4float %51 + %53 = OpCompositeExtract %float %52 3 + %54 = OpCompositeConstruct %v4float %float_0 %50 %float_0 %53 + OpStore %colorGreen %54 + %56 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 + %57 = OpLoad %v4float %56 + %58 = OpCompositeExtract %float %57 0 + %59 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 + %60 = OpLoad %v4float %59 + %61 = OpCompositeExtract %float %60 3 + %62 = OpCompositeConstruct %v4float %58 %float_0 %float_0 %61 + OpStore %colorRed %62 + %65 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 + %66 = OpLoad %v4float %65 + OpStore %67 %66 + OpStore %68 %46 + %69 = OpFunctionCall %bool %IsEqual_bh4h4 %67 %68 + %64 = OpLogicalNot %bool %69 + OpSelectionMerge %73 None + OpBranchConditional %64 %71 %72 + %71 = OpLabel + OpStore %74 %54 + OpStore %75 %62 + %76 = OpFunctionCall %bool %IsEqual_bh4h4 %74 %75 + OpSelectionMerge %80 None + OpBranchConditional %76 %78 %79 + %78 = OpLabel + OpStore %77 %62 + OpBranch %80 + %79 = OpLabel + OpStore %77 %54 + OpBranch %80 + %80 = OpLabel + %81 = OpLoad %v4float %77 + OpStore %70 %81 + OpBranch %73 + %72 = OpLabel + OpStore %83 %62 + OpStore %84 %54 + %85 = OpFunctionCall %bool %IsEqual_bh4h4 %83 %84 + %82 = OpLogicalNot %bool %85 + OpSelectionMerge %89 None + OpBranchConditional %82 %87 %88 + %87 = OpLabel + OpStore %86 %46 + OpBranch %89 + %88 = OpLabel + %90 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 + %91 = OpLoad %v4float %90 + OpStore %86 %91 + OpBranch %89 + %89 = OpLabel + %92 = OpLoad %v4float %86 + OpStore %70 %92 + OpBranch %73 + %73 = OpLabel + %93 = OpLoad %v4float %70 + OpStore %result %93 + OpStore %94 %62 + OpStore %95 %46 + %96 = OpFunctionCall %bool %IsEqual_bh4h4 %94 %95 + OpSelectionMerge %100 None + OpBranchConditional %96 %98 %99 + %98 = OpLabel + %101 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 + %102 = OpLoad %v4float %101 + OpStore %97 %102 + OpBranch %100 + %99 = OpLabel + OpStore %104 %62 + OpStore %105 %54 + %106 = OpFunctionCall %bool %IsEqual_bh4h4 %104 %105 + %103 = OpLogicalNot %bool %106 + OpSelectionMerge %110 None + OpBranchConditional %103 %108 %109 + %108 = OpLabel + OpStore %107 %93 + OpBranch %110 + %109 = OpLabel + OpStore %111 %62 + %112 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 + %113 = OpLoad %v4float %112 + OpStore %114 %113 + %115 = OpFunctionCall %bool %IsEqual_bh4h4 %111 %114 + OpSelectionMerge %119 None + OpBranchConditional %115 %117 %118 + %117 = OpLabel + OpStore %116 %46 + OpBranch %119 + %118 = OpLabel + OpStore %116 %62 + OpBranch %119 + %119 = OpLabel + %120 = OpLoad %v4float %116 + OpStore %107 %120 + OpBranch %110 + %110 = OpLabel + %121 = OpLoad %v4float %107 + OpStore %97 %121 + OpBranch %100 + %100 = OpLabel + %122 = OpLoad %v4float %97 + OpReturnValue %122 + OpFunctionEnd diff --git a/tests/sksl/shared/TernaryComplexNesting.skrp b/tests/sksl/shared/TernaryComplexNesting.skrp index 2f84ea00cd34..8265e1cd7f59 100644 --- a/tests/sksl/shared/TernaryComplexNesting.skrp +++ b/tests/sksl/shared/TernaryComplexNesting.skrp @@ -1,3 +1,5 @@ +93 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true splat_2_constants colorBlue(0..1) = 0 diff --git a/tests/sksl/shared/TernaryComplexNesting.wgsl b/tests/sksl/shared/TernaryComplexNesting.wgsl index c43638b47aaf..994f380ba6c0 100644 --- a/tests/sksl/shared/TernaryComplexNesting.wgsl +++ b/tests/sksl/shared/TernaryComplexNesting.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, diff --git a/tests/sksl/shared/TernaryExpression.asm.frag b/tests/sksl/shared/TernaryExpression.asm.frag index 924ffc9c754c..48c54c67e380 100644 --- a/tests/sksl/shared/TernaryExpression.asm.frag +++ b/tests/sksl/shared/TernaryExpression.asm.frag @@ -1,131 +1,131 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %check "check" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %49 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %58 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %73 RelaxedPrecision -OpDecorate %75 RelaxedPrecision -OpDecorate %76 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %check "check" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %49 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %58 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %73 RelaxedPrecision + OpDecorate %75 RelaxedPrecision + OpDecorate %76 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float -%int = OpTypeInt 32 1 + %23 = OpTypeFunction %v4float %_ptr_Function_v2float + %int = OpTypeInt 32 1 %_ptr_Function_int = OpTypePointer Function %int -%int_0 = OpConstant %int 0 + %int_0 = OpConstant %int 0 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%float_1 = OpConstant %float 1 -%int_1 = OpConstant %int 1 -%v2bool = OpTypeVector %bool 2 + %float_1 = OpConstant %float 1 + %int_1 = OpConstant %int 1 + %v2bool = OpTypeVector %bool 2 %_ptr_Function_v4float = OpTypePointer Function %v4float %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%check = OpVariable %_ptr_Function_int Function -%67 = OpVariable %_ptr_Function_v4float Function -OpStore %check %int_0 -%30 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %30 -%33 = OpCompositeExtract %float %32 1 -%35 = OpFOrdEqual %bool %33 %float_1 -%36 = OpSelect %int %35 %int_0 %int_1 -%38 = OpIAdd %int %int_0 %36 -OpStore %check %38 -%39 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%40 = OpLoad %v4float %39 -%41 = OpCompositeExtract %float %40 0 -%42 = OpFOrdEqual %bool %41 %float_1 -%43 = OpSelect %int %42 %int_1 %int_0 -%44 = OpIAdd %int %38 %43 -OpStore %check %44 -%45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%46 = OpLoad %v4float %45 -%47 = OpVectorShuffle %v2float %46 %46 1 0 -%48 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%49 = OpLoad %v4float %48 -%50 = OpVectorShuffle %v2float %49 %49 0 1 -%51 = OpFOrdEqual %v2bool %47 %50 -%53 = OpAll %bool %51 -%54 = OpSelect %int %53 %int_0 %int_1 -%55 = OpIAdd %int %44 %54 -OpStore %check %55 -%56 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%57 = OpLoad %v4float %56 -%58 = OpVectorShuffle %v2float %57 %57 1 0 -%59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%60 = OpLoad %v4float %59 -%61 = OpVectorShuffle %v2float %60 %60 0 1 -%62 = OpFUnordNotEqual %v2bool %58 %61 -%63 = OpAny %bool %62 -%64 = OpSelect %int %63 %int_1 %int_0 -%65 = OpIAdd %int %55 %64 -OpStore %check %65 -%66 = OpIEqual %bool %65 %int_0 -OpSelectionMerge %71 None -OpBranchConditional %66 %69 %70 -%69 = OpLabel -%72 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%73 = OpLoad %v4float %72 -OpStore %67 %73 -OpBranch %71 -%70 = OpLabel -%74 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%75 = OpLoad %v4float %74 -OpStore %67 %75 -OpBranch %71 -%71 = OpLabel -%76 = OpLoad %v4float %67 -OpReturnValue %76 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %check = OpVariable %_ptr_Function_int Function + %67 = OpVariable %_ptr_Function_v4float Function + OpStore %check %int_0 + %30 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %30 + %33 = OpCompositeExtract %float %32 1 + %35 = OpFOrdEqual %bool %33 %float_1 + %36 = OpSelect %int %35 %int_0 %int_1 + %38 = OpIAdd %int %int_0 %36 + OpStore %check %38 + %39 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %40 = OpLoad %v4float %39 + %41 = OpCompositeExtract %float %40 0 + %42 = OpFOrdEqual %bool %41 %float_1 + %43 = OpSelect %int %42 %int_1 %int_0 + %44 = OpIAdd %int %38 %43 + OpStore %check %44 + %45 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %46 = OpLoad %v4float %45 + %47 = OpVectorShuffle %v2float %46 %46 1 0 + %48 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %49 = OpLoad %v4float %48 + %50 = OpVectorShuffle %v2float %49 %49 0 1 + %51 = OpFOrdEqual %v2bool %47 %50 + %53 = OpAll %bool %51 + %54 = OpSelect %int %53 %int_0 %int_1 + %55 = OpIAdd %int %44 %54 + OpStore %check %55 + %56 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %57 = OpLoad %v4float %56 + %58 = OpVectorShuffle %v2float %57 %57 1 0 + %59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %60 = OpLoad %v4float %59 + %61 = OpVectorShuffle %v2float %60 %60 0 1 + %62 = OpFUnordNotEqual %v2bool %58 %61 + %63 = OpAny %bool %62 + %64 = OpSelect %int %63 %int_1 %int_0 + %65 = OpIAdd %int %55 %64 + OpStore %check %65 + %66 = OpIEqual %bool %65 %int_0 + OpSelectionMerge %71 None + OpBranchConditional %66 %69 %70 + %69 = OpLabel + %72 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %73 = OpLoad %v4float %72 + OpStore %67 %73 + OpBranch %71 + %70 = OpLabel + %74 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %75 = OpLoad %v4float %74 + OpStore %67 %75 + OpBranch %71 + %71 = OpLabel + %76 = OpLoad %v4float %67 + OpReturnValue %76 + OpFunctionEnd diff --git a/tests/sksl/shared/TernaryExpression.skrp b/tests/sksl/shared/TernaryExpression.skrp index 9dd10b0747c4..44d9bce412ed 100644 --- a/tests/sksl/shared/TernaryExpression.skrp +++ b/tests/sksl/shared/TernaryExpression.skrp @@ -1,3 +1,5 @@ +48 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_constant check = 0 diff --git a/tests/sksl/shared/TernaryExpression.wgsl b/tests/sksl/shared/TernaryExpression.wgsl index 52854e1d318b..e684b0bdc5cd 100644 --- a/tests/sksl/shared/TernaryExpression.wgsl +++ b/tests/sksl/shared/TernaryExpression.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -14,11 +15,11 @@ fn main(_skParam0: vec2) -> vec4 { let coords = _skParam0; { var check: i32 = 0; - check = check + i32(select(1, 0, _globalUniforms.colorGreen.y == 1.0)); - check = check + i32(select(0, 1, _globalUniforms.colorGreen.x == 1.0)); + check = check + i32(select(1, 0, (_globalUniforms.colorGreen.y == 1.0))); + check = check + i32(select(0, 1, (_globalUniforms.colorGreen.x == 1.0))); check = check + i32(select(1, 0, all(_globalUniforms.colorGreen.yx == _globalUniforms.colorRed.xy))); check = check + i32(select(0, 1, any(_globalUniforms.colorGreen.yx != _globalUniforms.colorRed.xy))); - return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(check == 0)); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((check == 0))); } } @fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { diff --git a/tests/sksl/shared/TernaryNesting.asm.frag b/tests/sksl/shared/TernaryNesting.asm.frag index a080373a8292..351f2e339360 100644 --- a/tests/sksl/shared/TernaryNesting.asm.frag +++ b/tests/sksl/shared/TernaryNesting.asm.frag @@ -1,202 +1,202 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorWhite" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %colorBlue "colorBlue" -OpName %colorGreen "colorGreen" -OpName %colorRed "colorRed" -OpName %result "result" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %colorBlue RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %34 RelaxedPrecision -OpDecorate %35 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %colorGreen RelaxedPrecision -OpDecorate %39 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %colorRed RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %48 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %51 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %result RelaxedPrecision -OpDecorate %55 RelaxedPrecision -OpDecorate %69 RelaxedPrecision -OpDecorate %77 RelaxedPrecision -OpDecorate %78 RelaxedPrecision -OpDecorate %79 RelaxedPrecision -OpDecorate %87 RelaxedPrecision -OpDecorate %95 RelaxedPrecision -OpDecorate %102 RelaxedPrecision -OpDecorate %103 RelaxedPrecision -OpDecorate %104 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorWhite" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %colorBlue "colorBlue" + OpName %colorGreen "colorGreen" + OpName %colorRed "colorRed" + OpName %result "result" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %colorBlue RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %34 RelaxedPrecision + OpDecorate %35 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %colorGreen RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %colorRed RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %48 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %result RelaxedPrecision + OpDecorate %55 RelaxedPrecision + OpDecorate %69 RelaxedPrecision + OpDecorate %77 RelaxedPrecision + OpDecorate %78 RelaxedPrecision + OpDecorate %79 RelaxedPrecision + OpDecorate %87 RelaxedPrecision + OpDecorate %95 RelaxedPrecision + OpDecorate %102 RelaxedPrecision + OpDecorate %103 RelaxedPrecision + OpDecorate %104 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%v4bool = OpTypeVector %bool 4 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %v4bool = OpTypeVector %bool 4 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%colorBlue = OpVariable %_ptr_Function_v4float Function -%colorGreen = OpVariable %_ptr_Function_v4float Function -%colorRed = OpVariable %_ptr_Function_v4float Function -%result = OpVariable %_ptr_Function_v4float Function -%59 = OpVariable %_ptr_Function_v4float Function -%65 = OpVariable %_ptr_Function_v4float Function -%72 = OpVariable %_ptr_Function_v4float Function -%82 = OpVariable %_ptr_Function_v4float Function -%90 = OpVariable %_ptr_Function_v4float Function -%98 = OpVariable %_ptr_Function_v4float Function -%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%32 = OpLoad %v4float %28 -%33 = OpVectorShuffle %v2float %32 %32 2 3 -%34 = OpCompositeExtract %float %33 0 -%35 = OpCompositeExtract %float %33 1 -%36 = OpCompositeConstruct %v4float %float_0 %float_0 %34 %35 -OpStore %colorBlue %36 -%38 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%39 = OpLoad %v4float %38 -%40 = OpCompositeExtract %float %39 1 -%41 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%42 = OpLoad %v4float %41 -%43 = OpCompositeExtract %float %42 3 -%44 = OpCompositeConstruct %v4float %float_0 %40 %float_0 %43 -OpStore %colorGreen %44 -%46 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%47 = OpLoad %v4float %46 -%48 = OpCompositeExtract %float %47 0 -%49 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%50 = OpLoad %v4float %49 -%51 = OpCompositeExtract %float %50 3 -%52 = OpCompositeConstruct %v4float %48 %float_0 %float_0 %51 -OpStore %colorRed %52 -%54 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%55 = OpLoad %v4float %54 -%56 = OpFUnordNotEqual %v4bool %55 %36 -%58 = OpAny %bool %56 -OpSelectionMerge %62 None -OpBranchConditional %58 %60 %61 -%60 = OpLabel -%63 = OpFOrdEqual %v4bool %44 %52 -%64 = OpAll %bool %63 -OpSelectionMerge %68 None -OpBranchConditional %64 %66 %67 -%66 = OpLabel -OpStore %65 %52 -OpBranch %68 -%67 = OpLabel -OpStore %65 %44 -OpBranch %68 -%68 = OpLabel -%69 = OpLoad %v4float %65 -OpStore %59 %69 -OpBranch %62 -%61 = OpLabel -%70 = OpFUnordNotEqual %v4bool %52 %44 -%71 = OpAny %bool %70 -OpSelectionMerge %75 None -OpBranchConditional %71 %73 %74 -%73 = OpLabel -OpStore %72 %36 -OpBranch %75 -%74 = OpLabel -%76 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%77 = OpLoad %v4float %76 -OpStore %72 %77 -OpBranch %75 -%75 = OpLabel -%78 = OpLoad %v4float %72 -OpStore %59 %78 -OpBranch %62 -%62 = OpLabel -%79 = OpLoad %v4float %59 -OpStore %result %79 -%80 = OpFOrdEqual %v4bool %52 %36 -%81 = OpAll %bool %80 -OpSelectionMerge %85 None -OpBranchConditional %81 %83 %84 -%83 = OpLabel -%86 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%87 = OpLoad %v4float %86 -OpStore %82 %87 -OpBranch %85 -%84 = OpLabel -%88 = OpFUnordNotEqual %v4bool %52 %44 -%89 = OpAny %bool %88 -OpSelectionMerge %93 None -OpBranchConditional %89 %91 %92 -%91 = OpLabel -OpStore %90 %79 -OpBranch %93 -%92 = OpLabel -%94 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%95 = OpLoad %v4float %94 -%96 = OpFOrdEqual %v4bool %52 %95 -%97 = OpAll %bool %96 -OpSelectionMerge %101 None -OpBranchConditional %97 %99 %100 -%99 = OpLabel -OpStore %98 %36 -OpBranch %101 -%100 = OpLabel -OpStore %98 %52 -OpBranch %101 -%101 = OpLabel -%102 = OpLoad %v4float %98 -OpStore %90 %102 -OpBranch %93 -%93 = OpLabel -%103 = OpLoad %v4float %90 -OpStore %82 %103 -OpBranch %85 -%85 = OpLabel -%104 = OpLoad %v4float %82 -OpReturnValue %104 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %colorBlue = OpVariable %_ptr_Function_v4float Function + %colorGreen = OpVariable %_ptr_Function_v4float Function + %colorRed = OpVariable %_ptr_Function_v4float Function + %result = OpVariable %_ptr_Function_v4float Function + %59 = OpVariable %_ptr_Function_v4float Function + %65 = OpVariable %_ptr_Function_v4float Function + %72 = OpVariable %_ptr_Function_v4float Function + %82 = OpVariable %_ptr_Function_v4float Function + %90 = OpVariable %_ptr_Function_v4float Function + %98 = OpVariable %_ptr_Function_v4float Function + %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %32 = OpLoad %v4float %28 + %33 = OpVectorShuffle %v2float %32 %32 2 3 + %34 = OpCompositeExtract %float %33 0 + %35 = OpCompositeExtract %float %33 1 + %36 = OpCompositeConstruct %v4float %float_0 %float_0 %34 %35 + OpStore %colorBlue %36 + %38 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %39 = OpLoad %v4float %38 + %40 = OpCompositeExtract %float %39 1 + %41 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %42 = OpLoad %v4float %41 + %43 = OpCompositeExtract %float %42 3 + %44 = OpCompositeConstruct %v4float %float_0 %40 %float_0 %43 + OpStore %colorGreen %44 + %46 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %47 = OpLoad %v4float %46 + %48 = OpCompositeExtract %float %47 0 + %49 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %50 = OpLoad %v4float %49 + %51 = OpCompositeExtract %float %50 3 + %52 = OpCompositeConstruct %v4float %48 %float_0 %float_0 %51 + OpStore %colorRed %52 + %54 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %55 = OpLoad %v4float %54 + %56 = OpFUnordNotEqual %v4bool %55 %36 + %58 = OpAny %bool %56 + OpSelectionMerge %62 None + OpBranchConditional %58 %60 %61 + %60 = OpLabel + %63 = OpFOrdEqual %v4bool %44 %52 + %64 = OpAll %bool %63 + OpSelectionMerge %68 None + OpBranchConditional %64 %66 %67 + %66 = OpLabel + OpStore %65 %52 + OpBranch %68 + %67 = OpLabel + OpStore %65 %44 + OpBranch %68 + %68 = OpLabel + %69 = OpLoad %v4float %65 + OpStore %59 %69 + OpBranch %62 + %61 = OpLabel + %70 = OpFUnordNotEqual %v4bool %52 %44 + %71 = OpAny %bool %70 + OpSelectionMerge %75 None + OpBranchConditional %71 %73 %74 + %73 = OpLabel + OpStore %72 %36 + OpBranch %75 + %74 = OpLabel + %76 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %77 = OpLoad %v4float %76 + OpStore %72 %77 + OpBranch %75 + %75 = OpLabel + %78 = OpLoad %v4float %72 + OpStore %59 %78 + OpBranch %62 + %62 = OpLabel + %79 = OpLoad %v4float %59 + OpStore %result %79 + %80 = OpFOrdEqual %v4bool %52 %36 + %81 = OpAll %bool %80 + OpSelectionMerge %85 None + OpBranchConditional %81 %83 %84 + %83 = OpLabel + %86 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %87 = OpLoad %v4float %86 + OpStore %82 %87 + OpBranch %85 + %84 = OpLabel + %88 = OpFUnordNotEqual %v4bool %52 %44 + %89 = OpAny %bool %88 + OpSelectionMerge %93 None + OpBranchConditional %89 %91 %92 + %91 = OpLabel + OpStore %90 %79 + OpBranch %93 + %92 = OpLabel + %94 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %95 = OpLoad %v4float %94 + %96 = OpFOrdEqual %v4bool %52 %95 + %97 = OpAll %bool %96 + OpSelectionMerge %101 None + OpBranchConditional %97 %99 %100 + %99 = OpLabel + OpStore %98 %36 + OpBranch %101 + %100 = OpLabel + OpStore %98 %52 + OpBranch %101 + %101 = OpLabel + %102 = OpLoad %v4float %98 + OpStore %90 %102 + OpBranch %93 + %93 = OpLabel + %103 = OpLoad %v4float %90 + OpStore %82 %103 + OpBranch %85 + %85 = OpLabel + %104 = OpLoad %v4float %82 + OpReturnValue %104 + OpFunctionEnd diff --git a/tests/sksl/shared/TernaryNesting.skrp b/tests/sksl/shared/TernaryNesting.skrp index 061f08ab066d..6521aab6b41e 100644 --- a/tests/sksl/shared/TernaryNesting.skrp +++ b/tests/sksl/shared/TernaryNesting.skrp @@ -1,3 +1,5 @@ +66 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true splat_2_constants colorBlue(0..1) = 0 diff --git a/tests/sksl/shared/TernaryNesting.wgsl b/tests/sksl/shared/TernaryNesting.wgsl index 2fb7b6ee4b3a..902be7427e5c 100644 --- a/tests/sksl/shared/TernaryNesting.wgsl +++ b/tests/sksl/shared/TernaryNesting.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, diff --git a/tests/sksl/shared/TernarySideEffects.asm.frag b/tests/sksl/shared/TernarySideEffects.asm.frag index e934a76bdae5..da23fcb4068c 100644 --- a/tests/sksl/shared/TernarySideEffects.asm.frag +++ b/tests/sksl/shared/TernarySideEffects.asm.frag @@ -1,336 +1,336 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %x "x" -OpName %y "y" -OpName %b "b" -OpName %c "c" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %x RelaxedPrecision -OpDecorate %y RelaxedPrecision -OpDecorate %35 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %39 RelaxedPrecision -OpDecorate %45 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %48 RelaxedPrecision -OpDecorate %49 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %51 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %58 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %62 RelaxedPrecision -OpDecorate %63 RelaxedPrecision -OpDecorate %64 RelaxedPrecision -OpDecorate %65 RelaxedPrecision -OpDecorate %71 RelaxedPrecision -OpDecorate %73 RelaxedPrecision -OpDecorate %74 RelaxedPrecision -OpDecorate %75 RelaxedPrecision -OpDecorate %76 RelaxedPrecision -OpDecorate %77 RelaxedPrecision -OpDecorate %78 RelaxedPrecision -OpDecorate %84 RelaxedPrecision -OpDecorate %85 RelaxedPrecision -OpDecorate %86 RelaxedPrecision -OpDecorate %87 RelaxedPrecision -OpDecorate %88 RelaxedPrecision -OpDecorate %89 RelaxedPrecision -OpDecorate %95 RelaxedPrecision -OpDecorate %97 RelaxedPrecision -OpDecorate %98 RelaxedPrecision -OpDecorate %99 RelaxedPrecision -OpDecorate %100 RelaxedPrecision -OpDecorate %101 RelaxedPrecision -OpDecorate %107 RelaxedPrecision -OpDecorate %108 RelaxedPrecision -OpDecorate %109 RelaxedPrecision -OpDecorate %110 RelaxedPrecision -OpDecorate %111 RelaxedPrecision -OpDecorate %112 RelaxedPrecision -OpDecorate %118 RelaxedPrecision -OpDecorate %119 RelaxedPrecision -OpDecorate %121 RelaxedPrecision -OpDecorate %122 RelaxedPrecision -OpDecorate %141 RelaxedPrecision -OpDecorate %142 RelaxedPrecision -OpDecorate %147 RelaxedPrecision -OpDecorate %157 RelaxedPrecision -OpDecorate %159 RelaxedPrecision -OpDecorate %160 RelaxedPrecision -OpDecorate %161 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %x "x" + OpName %y "y" + OpName %b "b" + OpName %c "c" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %x RelaxedPrecision + OpDecorate %y RelaxedPrecision + OpDecorate %35 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %45 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %48 RelaxedPrecision + OpDecorate %49 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %58 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %62 RelaxedPrecision + OpDecorate %63 RelaxedPrecision + OpDecorate %64 RelaxedPrecision + OpDecorate %65 RelaxedPrecision + OpDecorate %71 RelaxedPrecision + OpDecorate %73 RelaxedPrecision + OpDecorate %74 RelaxedPrecision + OpDecorate %75 RelaxedPrecision + OpDecorate %76 RelaxedPrecision + OpDecorate %77 RelaxedPrecision + OpDecorate %78 RelaxedPrecision + OpDecorate %84 RelaxedPrecision + OpDecorate %85 RelaxedPrecision + OpDecorate %86 RelaxedPrecision + OpDecorate %87 RelaxedPrecision + OpDecorate %88 RelaxedPrecision + OpDecorate %89 RelaxedPrecision + OpDecorate %95 RelaxedPrecision + OpDecorate %97 RelaxedPrecision + OpDecorate %98 RelaxedPrecision + OpDecorate %99 RelaxedPrecision + OpDecorate %100 RelaxedPrecision + OpDecorate %101 RelaxedPrecision + OpDecorate %107 RelaxedPrecision + OpDecorate %108 RelaxedPrecision + OpDecorate %109 RelaxedPrecision + OpDecorate %110 RelaxedPrecision + OpDecorate %111 RelaxedPrecision + OpDecorate %112 RelaxedPrecision + OpDecorate %118 RelaxedPrecision + OpDecorate %119 RelaxedPrecision + OpDecorate %121 RelaxedPrecision + OpDecorate %122 RelaxedPrecision + OpDecorate %141 RelaxedPrecision + OpDecorate %142 RelaxedPrecision + OpDecorate %147 RelaxedPrecision + OpDecorate %157 RelaxedPrecision + OpDecorate %159 RelaxedPrecision + OpDecorate %160 RelaxedPrecision + OpDecorate %161 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_float = OpTypePointer Function %float -%float_1 = OpConstant %float 1 -%true = OpConstantTrue %bool -%float_3 = OpConstant %float 3 -%float_5 = OpConstant %float 5 -%float_9 = OpConstant %float 9 -%float_2 = OpConstant %float 2 -%float_4 = OpConstant %float 4 + %float_1 = OpConstant %float 1 + %true = OpConstantTrue %bool + %float_3 = OpConstant %float 3 + %float_5 = OpConstant %float 5 + %float_9 = OpConstant %float 9 + %float_2 = OpConstant %float 2 + %float_4 = OpConstant %float 4 %_ptr_Function_bool = OpTypePointer Function %bool -%false = OpConstantFalse %bool + %false = OpConstantFalse %bool %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_1 = OpConstant %int 1 -%float_8 = OpConstant %float 8 -%float_17 = OpConstant %float 17 -%int_0 = OpConstant %int 0 + %int = OpTypeInt 32 1 + %int_1 = OpConstant %int 1 + %float_8 = OpConstant %float 8 + %float_17 = OpConstant %float 17 + %int_0 = OpConstant %int 0 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%x = OpVariable %_ptr_Function_float Function -%y = OpVariable %_ptr_Function_float Function -%31 = OpVariable %_ptr_Function_float Function -%41 = OpVariable %_ptr_Function_float Function -%54 = OpVariable %_ptr_Function_float Function -%67 = OpVariable %_ptr_Function_float Function -%80 = OpVariable %_ptr_Function_float Function -%91 = OpVariable %_ptr_Function_float Function -%103 = OpVariable %_ptr_Function_float Function -%114 = OpVariable %_ptr_Function_float Function -%b = OpVariable %_ptr_Function_bool Function -%c = OpVariable %_ptr_Function_bool Function -%127 = OpVariable %_ptr_Function_bool Function -%132 = OpVariable %_ptr_Function_v4float Function -%151 = OpVariable %_ptr_Function_v4float Function -OpStore %x %float_1 -OpStore %y %float_1 -OpSelectionMerge %34 None -OpBranchConditional %true %32 %33 -%32 = OpLabel -%35 = OpFAdd %float %float_1 %float_1 -OpStore %x %35 -OpStore %31 %35 -OpBranch %34 -%33 = OpLabel -%36 = OpFAdd %float %float_1 %float_1 -OpStore %y %36 -OpStore %31 %36 -OpBranch %34 -%34 = OpLabel -%37 = OpLoad %float %31 -%38 = OpLoad %float %x -%39 = OpLoad %float %y -%40 = OpFOrdEqual %bool %38 %39 -OpSelectionMerge %44 None -OpBranchConditional %40 %42 %43 -%42 = OpLabel -%45 = OpLoad %float %x -%47 = OpFAdd %float %45 %float_3 -OpStore %x %47 -OpStore %41 %47 -OpBranch %44 -%43 = OpLabel -%48 = OpLoad %float %y -%49 = OpFAdd %float %48 %float_3 -OpStore %y %49 -OpStore %41 %49 -OpBranch %44 -%44 = OpLabel -%50 = OpLoad %float %41 -%51 = OpLoad %float %x -%52 = OpLoad %float %y -%53 = OpFOrdLessThan %bool %51 %52 -OpSelectionMerge %57 None -OpBranchConditional %53 %55 %56 -%55 = OpLabel -%58 = OpLoad %float %x -%60 = OpFAdd %float %58 %float_5 -OpStore %x %60 -OpStore %54 %60 -OpBranch %57 -%56 = OpLabel -%61 = OpLoad %float %y -%62 = OpFAdd %float %61 %float_5 -OpStore %y %62 -OpStore %54 %62 -OpBranch %57 -%57 = OpLabel -%63 = OpLoad %float %54 -%64 = OpLoad %float %y -%65 = OpLoad %float %x -%66 = OpFOrdGreaterThanEqual %bool %64 %65 -OpSelectionMerge %70 None -OpBranchConditional %66 %68 %69 -%68 = OpLabel -%71 = OpLoad %float %x -%73 = OpFAdd %float %71 %float_9 -OpStore %x %73 -OpStore %67 %73 -OpBranch %70 -%69 = OpLabel -%74 = OpLoad %float %y -%75 = OpFAdd %float %74 %float_9 -OpStore %y %75 -OpStore %67 %75 -OpBranch %70 -%70 = OpLabel -%76 = OpLoad %float %67 -%77 = OpLoad %float %x -%78 = OpLoad %float %y -%79 = OpFUnordNotEqual %bool %77 %78 -OpSelectionMerge %83 None -OpBranchConditional %79 %81 %82 -%81 = OpLabel -%84 = OpLoad %float %x -%85 = OpFAdd %float %84 %float_1 -OpStore %x %85 -OpStore %80 %85 -OpBranch %83 -%82 = OpLabel -%86 = OpLoad %float %y -OpStore %80 %86 -OpBranch %83 -%83 = OpLabel -%87 = OpLoad %float %80 -%88 = OpLoad %float %x -%89 = OpLoad %float %y -%90 = OpFOrdEqual %bool %88 %89 -OpSelectionMerge %94 None -OpBranchConditional %90 %92 %93 -%92 = OpLabel -%95 = OpLoad %float %x -%97 = OpFAdd %float %95 %float_2 -OpStore %x %97 -OpStore %91 %97 -OpBranch %94 -%93 = OpLabel -%98 = OpLoad %float %y -OpStore %91 %98 -OpBranch %94 -%94 = OpLabel -%99 = OpLoad %float %91 -%100 = OpLoad %float %x -%101 = OpLoad %float %y -%102 = OpFUnordNotEqual %bool %100 %101 -OpSelectionMerge %106 None -OpBranchConditional %102 %104 %105 -%104 = OpLabel -%107 = OpLoad %float %x -OpStore %103 %107 -OpBranch %106 -%105 = OpLabel -%108 = OpLoad %float %y -%109 = OpFAdd %float %108 %float_3 -OpStore %y %109 -OpStore %103 %109 -OpBranch %106 -%106 = OpLabel -%110 = OpLoad %float %103 -%111 = OpLoad %float %x -%112 = OpLoad %float %y -%113 = OpFOrdEqual %bool %111 %112 -OpSelectionMerge %117 None -OpBranchConditional %113 %115 %116 -%115 = OpLabel -%118 = OpLoad %float %x -OpStore %114 %118 -OpBranch %117 -%116 = OpLabel -%119 = OpLoad %float %y -%121 = OpFAdd %float %119 %float_4 -OpStore %y %121 -OpStore %114 %121 -OpBranch %117 -%117 = OpLabel -%122 = OpLoad %float %114 -OpStore %b %true -OpStore %b %false -OpSelectionMerge %130 None -OpBranchConditional %false %128 %129 -%128 = OpLabel -OpStore %127 %false -OpBranch %130 -%129 = OpLabel -OpStore %127 %false -OpBranch %130 -%130 = OpLabel -%131 = OpLoad %bool %127 -OpStore %c %131 -OpSelectionMerge %136 None -OpBranchConditional %131 %134 %135 -%134 = OpLabel -%137 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%141 = OpLoad %v4float %137 -OpStore %132 %141 -OpBranch %136 -%135 = OpLabel -%142 = OpLoad %float %x -%144 = OpFOrdEqual %bool %142 %float_8 -OpSelectionMerge %146 None -OpBranchConditional %144 %145 %146 -%145 = OpLabel -%147 = OpLoad %float %y -%149 = OpFOrdEqual %bool %147 %float_17 -OpBranch %146 -%146 = OpLabel -%150 = OpPhi %bool %false %135 %149 %145 -OpSelectionMerge %154 None -OpBranchConditional %150 %152 %153 -%152 = OpLabel -%155 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%157 = OpLoad %v4float %155 -OpStore %151 %157 -OpBranch %154 -%153 = OpLabel -%158 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%159 = OpLoad %v4float %158 -OpStore %151 %159 -OpBranch %154 -%154 = OpLabel -%160 = OpLoad %v4float %151 -OpStore %132 %160 -OpBranch %136 -%136 = OpLabel -%161 = OpLoad %v4float %132 -OpReturnValue %161 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %x = OpVariable %_ptr_Function_float Function + %y = OpVariable %_ptr_Function_float Function + %31 = OpVariable %_ptr_Function_float Function + %41 = OpVariable %_ptr_Function_float Function + %54 = OpVariable %_ptr_Function_float Function + %67 = OpVariable %_ptr_Function_float Function + %80 = OpVariable %_ptr_Function_float Function + %91 = OpVariable %_ptr_Function_float Function + %103 = OpVariable %_ptr_Function_float Function + %114 = OpVariable %_ptr_Function_float Function + %b = OpVariable %_ptr_Function_bool Function + %c = OpVariable %_ptr_Function_bool Function + %127 = OpVariable %_ptr_Function_bool Function + %132 = OpVariable %_ptr_Function_v4float Function + %151 = OpVariable %_ptr_Function_v4float Function + OpStore %x %float_1 + OpStore %y %float_1 + OpSelectionMerge %34 None + OpBranchConditional %true %32 %33 + %32 = OpLabel + %35 = OpFAdd %float %float_1 %float_1 + OpStore %x %35 + OpStore %31 %35 + OpBranch %34 + %33 = OpLabel + %36 = OpFAdd %float %float_1 %float_1 + OpStore %y %36 + OpStore %31 %36 + OpBranch %34 + %34 = OpLabel + %37 = OpLoad %float %31 + %38 = OpLoad %float %x + %39 = OpLoad %float %y + %40 = OpFOrdEqual %bool %38 %39 + OpSelectionMerge %44 None + OpBranchConditional %40 %42 %43 + %42 = OpLabel + %45 = OpLoad %float %x + %47 = OpFAdd %float %45 %float_3 + OpStore %x %47 + OpStore %41 %47 + OpBranch %44 + %43 = OpLabel + %48 = OpLoad %float %y + %49 = OpFAdd %float %48 %float_3 + OpStore %y %49 + OpStore %41 %49 + OpBranch %44 + %44 = OpLabel + %50 = OpLoad %float %41 + %51 = OpLoad %float %x + %52 = OpLoad %float %y + %53 = OpFOrdLessThan %bool %51 %52 + OpSelectionMerge %57 None + OpBranchConditional %53 %55 %56 + %55 = OpLabel + %58 = OpLoad %float %x + %60 = OpFAdd %float %58 %float_5 + OpStore %x %60 + OpStore %54 %60 + OpBranch %57 + %56 = OpLabel + %61 = OpLoad %float %y + %62 = OpFAdd %float %61 %float_5 + OpStore %y %62 + OpStore %54 %62 + OpBranch %57 + %57 = OpLabel + %63 = OpLoad %float %54 + %64 = OpLoad %float %y + %65 = OpLoad %float %x + %66 = OpFOrdGreaterThanEqual %bool %64 %65 + OpSelectionMerge %70 None + OpBranchConditional %66 %68 %69 + %68 = OpLabel + %71 = OpLoad %float %x + %73 = OpFAdd %float %71 %float_9 + OpStore %x %73 + OpStore %67 %73 + OpBranch %70 + %69 = OpLabel + %74 = OpLoad %float %y + %75 = OpFAdd %float %74 %float_9 + OpStore %y %75 + OpStore %67 %75 + OpBranch %70 + %70 = OpLabel + %76 = OpLoad %float %67 + %77 = OpLoad %float %x + %78 = OpLoad %float %y + %79 = OpFUnordNotEqual %bool %77 %78 + OpSelectionMerge %83 None + OpBranchConditional %79 %81 %82 + %81 = OpLabel + %84 = OpLoad %float %x + %85 = OpFAdd %float %84 %float_1 + OpStore %x %85 + OpStore %80 %85 + OpBranch %83 + %82 = OpLabel + %86 = OpLoad %float %y + OpStore %80 %86 + OpBranch %83 + %83 = OpLabel + %87 = OpLoad %float %80 + %88 = OpLoad %float %x + %89 = OpLoad %float %y + %90 = OpFOrdEqual %bool %88 %89 + OpSelectionMerge %94 None + OpBranchConditional %90 %92 %93 + %92 = OpLabel + %95 = OpLoad %float %x + %97 = OpFAdd %float %95 %float_2 + OpStore %x %97 + OpStore %91 %97 + OpBranch %94 + %93 = OpLabel + %98 = OpLoad %float %y + OpStore %91 %98 + OpBranch %94 + %94 = OpLabel + %99 = OpLoad %float %91 + %100 = OpLoad %float %x + %101 = OpLoad %float %y + %102 = OpFUnordNotEqual %bool %100 %101 + OpSelectionMerge %106 None + OpBranchConditional %102 %104 %105 + %104 = OpLabel + %107 = OpLoad %float %x + OpStore %103 %107 + OpBranch %106 + %105 = OpLabel + %108 = OpLoad %float %y + %109 = OpFAdd %float %108 %float_3 + OpStore %y %109 + OpStore %103 %109 + OpBranch %106 + %106 = OpLabel + %110 = OpLoad %float %103 + %111 = OpLoad %float %x + %112 = OpLoad %float %y + %113 = OpFOrdEqual %bool %111 %112 + OpSelectionMerge %117 None + OpBranchConditional %113 %115 %116 + %115 = OpLabel + %118 = OpLoad %float %x + OpStore %114 %118 + OpBranch %117 + %116 = OpLabel + %119 = OpLoad %float %y + %121 = OpFAdd %float %119 %float_4 + OpStore %y %121 + OpStore %114 %121 + OpBranch %117 + %117 = OpLabel + %122 = OpLoad %float %114 + OpStore %b %true + OpStore %b %false + OpSelectionMerge %130 None + OpBranchConditional %false %128 %129 + %128 = OpLabel + OpStore %127 %false + OpBranch %130 + %129 = OpLabel + OpStore %127 %false + OpBranch %130 + %130 = OpLabel + %131 = OpLoad %bool %127 + OpStore %c %131 + OpSelectionMerge %136 None + OpBranchConditional %131 %134 %135 + %134 = OpLabel + %137 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %141 = OpLoad %v4float %137 + OpStore %132 %141 + OpBranch %136 + %135 = OpLabel + %142 = OpLoad %float %x + %144 = OpFOrdEqual %bool %142 %float_8 + OpSelectionMerge %146 None + OpBranchConditional %144 %145 %146 + %145 = OpLabel + %147 = OpLoad %float %y + %149 = OpFOrdEqual %bool %147 %float_17 + OpBranch %146 + %146 = OpLabel + %150 = OpPhi %bool %false %135 %149 %145 + OpSelectionMerge %154 None + OpBranchConditional %150 %152 %153 + %152 = OpLabel + %155 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %157 = OpLoad %v4float %155 + OpStore %151 %157 + OpBranch %154 + %153 = OpLabel + %158 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %159 = OpLoad %v4float %158 + OpStore %151 %159 + OpBranch %154 + %154 = OpLabel + %160 = OpLoad %v4float %151 + OpStore %132 %160 + OpBranch %136 + %136 = OpLabel + %161 = OpLoad %v4float %132 + OpReturnValue %161 + OpFunctionEnd diff --git a/tests/sksl/shared/TernarySideEffects.skrp b/tests/sksl/shared/TernarySideEffects.skrp index f7c579344dcd..d20e23db3b92 100644 --- a/tests/sksl/shared/TernarySideEffects.skrp +++ b/tests/sksl/shared/TernarySideEffects.skrp @@ -1,3 +1,5 @@ +119 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true splat_2_constants x, y = 0x3F800000 (1.0) diff --git a/tests/sksl/shared/TernarySideEffects.wgsl b/tests/sksl/shared/TernarySideEffects.wgsl new file mode 100644 index 000000000000..857cd86ab846 --- /dev/null +++ b/tests/sksl/shared/TernarySideEffects.wgsl @@ -0,0 +1,95 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var x: f32 = 1.0; + var y: f32 = 1.0; + var _skTemp0: f32; + if x == y { + x = x + 1.0; + _skTemp0 = x; + } else { + y = y + 1.0; + _skTemp0 = y; + } + var _skTemp1: f32; + if x == y { + x = x + 3.0; + _skTemp1 = x; + } else { + y = y + 3.0; + _skTemp1 = y; + } + var _skTemp2: f32; + if x < y { + x = x + 5.0; + _skTemp2 = x; + } else { + y = y + 5.0; + _skTemp2 = y; + } + var _skTemp3: f32; + if y >= x { + x = x + 9.0; + _skTemp3 = x; + } else { + y = y + 9.0; + _skTemp3 = y; + } + var _skTemp4: f32; + if x != y { + x = x + 1.0; + _skTemp4 = x; + } else { + _skTemp4 = y; + } + var _skTemp5: f32; + if x == y { + x = x + 2.0; + _skTemp5 = x; + } else { + _skTemp5 = y; + } + var _skTemp6: f32; + if x != y { + _skTemp6 = x; + } else { + y = y + 3.0; + _skTemp6 = y; + } + var _skTemp7: f32; + if x == y { + _skTemp7 = x; + } else { + y = y + 4.0; + _skTemp7 = y; + } + var b: bool = true; + var _skTemp8: bool; + b = false; + if b { + _skTemp8 = false; + } else { + _skTemp8 = b; + } + var c: bool = _skTemp8; + return select((select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4((x == 8.0) && (y == 17.0)))), _globalUniforms.colorRed, vec4(c)); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/TernaryTrueFalseOptimization.asm.frag b/tests/sksl/shared/TernaryTrueFalseOptimization.asm.frag index 40b7661916e3..8f30b71c1e1a 100644 --- a/tests/sksl/shared/TernaryTrueFalseOptimization.asm.frag +++ b/tests/sksl/shared/TernaryTrueFalseOptimization.asm.frag @@ -1,220 +1,220 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %ok "ok" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %45 RelaxedPrecision -OpDecorate %51 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %55 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %64 RelaxedPrecision -OpDecorate %65 RelaxedPrecision -OpDecorate %67 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %75 RelaxedPrecision -OpDecorate %76 RelaxedPrecision -OpDecorate %78 RelaxedPrecision -OpDecorate %79 RelaxedPrecision -OpDecorate %85 RelaxedPrecision -OpDecorate %86 RelaxedPrecision -OpDecorate %88 RelaxedPrecision -OpDecorate %89 RelaxedPrecision -OpDecorate %96 RelaxedPrecision -OpDecorate %97 RelaxedPrecision -OpDecorate %99 RelaxedPrecision -OpDecorate %100 RelaxedPrecision -OpDecorate %106 RelaxedPrecision -OpDecorate %107 RelaxedPrecision -OpDecorate %109 RelaxedPrecision -OpDecorate %110 RelaxedPrecision -OpDecorate %120 RelaxedPrecision -OpDecorate %122 RelaxedPrecision -OpDecorate %123 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %ok "ok" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %45 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %55 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %64 RelaxedPrecision + OpDecorate %65 RelaxedPrecision + OpDecorate %67 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %75 RelaxedPrecision + OpDecorate %76 RelaxedPrecision + OpDecorate %78 RelaxedPrecision + OpDecorate %79 RelaxedPrecision + OpDecorate %85 RelaxedPrecision + OpDecorate %86 RelaxedPrecision + OpDecorate %88 RelaxedPrecision + OpDecorate %89 RelaxedPrecision + OpDecorate %96 RelaxedPrecision + OpDecorate %97 RelaxedPrecision + OpDecorate %99 RelaxedPrecision + OpDecorate %100 RelaxedPrecision + OpDecorate %106 RelaxedPrecision + OpDecorate %107 RelaxedPrecision + OpDecorate %109 RelaxedPrecision + OpDecorate %110 RelaxedPrecision + OpDecorate %120 RelaxedPrecision + OpDecorate %122 RelaxedPrecision + OpDecorate %123 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_bool = OpTypePointer Function %bool -%true = OpConstantTrue %bool -%false = OpConstantFalse %bool + %true = OpConstantTrue %bool + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%float_1 = OpConstant %float 1 -%int_1 = OpConstant %int 1 -%v2bool = OpTypeVector %bool 2 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %float_1 = OpConstant %float 1 + %int_1 = OpConstant %int 1 + %v2bool = OpTypeVector %bool 2 %_ptr_Function_v4float = OpTypePointer Function %v4float %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%ok = OpVariable %_ptr_Function_bool Function -%114 = OpVariable %_ptr_Function_v4float Function -OpStore %ok %true -OpSelectionMerge %31 None -OpBranchConditional %true %30 %31 -%30 = OpLabel -%32 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%36 = OpLoad %v4float %32 -%37 = OpCompositeExtract %float %36 1 -%39 = OpFOrdEqual %bool %37 %float_1 -OpBranch %31 -%31 = OpLabel -%40 = OpPhi %bool %false %25 %39 %30 -OpStore %ok %40 -OpSelectionMerge %42 None -OpBranchConditional %40 %41 %42 -%41 = OpLabel -%43 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%44 = OpLoad %v4float %43 -%45 = OpCompositeExtract %float %44 0 -%46 = OpFUnordNotEqual %bool %45 %float_1 -OpBranch %42 -%42 = OpLabel -%47 = OpPhi %bool %false %31 %46 %41 -OpStore %ok %47 -OpSelectionMerge %49 None -OpBranchConditional %47 %48 %49 -%48 = OpLabel -%50 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%51 = OpLoad %v4float %50 -%52 = OpVectorShuffle %v2float %51 %51 1 0 -%53 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%55 = OpLoad %v4float %53 -%56 = OpVectorShuffle %v2float %55 %55 0 1 -%57 = OpFOrdEqual %v2bool %52 %56 -%59 = OpAll %bool %57 -OpBranch %49 -%49 = OpLabel -%60 = OpPhi %bool %false %42 %59 %48 -OpStore %ok %60 -OpSelectionMerge %62 None -OpBranchConditional %60 %61 %62 -%61 = OpLabel -%63 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%64 = OpLoad %v4float %63 -%65 = OpVectorShuffle %v2float %64 %64 1 0 -%66 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%67 = OpLoad %v4float %66 -%68 = OpVectorShuffle %v2float %67 %67 0 1 -%69 = OpFOrdEqual %v2bool %65 %68 -%70 = OpAll %bool %69 -OpBranch %62 -%62 = OpLabel -%71 = OpPhi %bool %false %49 %70 %61 -OpStore %ok %71 -OpSelectionMerge %73 None -OpBranchConditional %71 %72 %73 -%72 = OpLabel -%74 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%75 = OpLoad %v4float %74 -%76 = OpVectorShuffle %v2float %75 %75 1 0 -%77 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%78 = OpLoad %v4float %77 -%79 = OpVectorShuffle %v2float %78 %78 0 1 -%80 = OpFOrdEqual %v2bool %76 %79 -%81 = OpAll %bool %80 -OpSelectionMerge %83 None -OpBranchConditional %81 %83 %82 -%82 = OpLabel -%84 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%85 = OpLoad %v4float %84 -%86 = OpCompositeExtract %float %85 3 -%87 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%88 = OpLoad %v4float %87 -%89 = OpCompositeExtract %float %88 3 -%90 = OpFUnordNotEqual %bool %86 %89 -OpBranch %83 -%83 = OpLabel -%91 = OpPhi %bool %true %72 %90 %82 -OpBranch %73 -%73 = OpLabel -%92 = OpPhi %bool %false %62 %91 %83 -OpStore %ok %92 -OpSelectionMerge %94 None -OpBranchConditional %92 %93 %94 -%93 = OpLabel -%95 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%96 = OpLoad %v4float %95 -%97 = OpVectorShuffle %v2float %96 %96 1 0 -%98 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%99 = OpLoad %v4float %98 -%100 = OpVectorShuffle %v2float %99 %99 0 1 -%101 = OpFUnordNotEqual %v2bool %97 %100 -%102 = OpAny %bool %101 -OpSelectionMerge %104 None -OpBranchConditional %102 %103 %104 -%103 = OpLabel -%105 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%106 = OpLoad %v4float %105 -%107 = OpCompositeExtract %float %106 3 -%108 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%109 = OpLoad %v4float %108 -%110 = OpCompositeExtract %float %109 3 -%111 = OpFOrdEqual %bool %107 %110 -OpBranch %104 -%104 = OpLabel -%112 = OpPhi %bool %false %93 %111 %103 -OpBranch %94 -%94 = OpLabel -%113 = OpPhi %bool %false %73 %112 %104 -OpStore %ok %113 -OpSelectionMerge %118 None -OpBranchConditional %113 %116 %117 -%116 = OpLabel -%119 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%120 = OpLoad %v4float %119 -OpStore %114 %120 -OpBranch %118 -%117 = OpLabel -%121 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%122 = OpLoad %v4float %121 -OpStore %114 %122 -OpBranch %118 -%118 = OpLabel -%123 = OpLoad %v4float %114 -OpReturnValue %123 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %ok = OpVariable %_ptr_Function_bool Function + %114 = OpVariable %_ptr_Function_v4float Function + OpStore %ok %true + OpSelectionMerge %31 None + OpBranchConditional %true %30 %31 + %30 = OpLabel + %32 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %36 = OpLoad %v4float %32 + %37 = OpCompositeExtract %float %36 1 + %39 = OpFOrdEqual %bool %37 %float_1 + OpBranch %31 + %31 = OpLabel + %40 = OpPhi %bool %false %25 %39 %30 + OpStore %ok %40 + OpSelectionMerge %42 None + OpBranchConditional %40 %41 %42 + %41 = OpLabel + %43 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %44 = OpLoad %v4float %43 + %45 = OpCompositeExtract %float %44 0 + %46 = OpFUnordNotEqual %bool %45 %float_1 + OpBranch %42 + %42 = OpLabel + %47 = OpPhi %bool %false %31 %46 %41 + OpStore %ok %47 + OpSelectionMerge %49 None + OpBranchConditional %47 %48 %49 + %48 = OpLabel + %50 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %51 = OpLoad %v4float %50 + %52 = OpVectorShuffle %v2float %51 %51 1 0 + %53 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %55 = OpLoad %v4float %53 + %56 = OpVectorShuffle %v2float %55 %55 0 1 + %57 = OpFOrdEqual %v2bool %52 %56 + %59 = OpAll %bool %57 + OpBranch %49 + %49 = OpLabel + %60 = OpPhi %bool %false %42 %59 %48 + OpStore %ok %60 + OpSelectionMerge %62 None + OpBranchConditional %60 %61 %62 + %61 = OpLabel + %63 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %64 = OpLoad %v4float %63 + %65 = OpVectorShuffle %v2float %64 %64 1 0 + %66 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %67 = OpLoad %v4float %66 + %68 = OpVectorShuffle %v2float %67 %67 0 1 + %69 = OpFOrdEqual %v2bool %65 %68 + %70 = OpAll %bool %69 + OpBranch %62 + %62 = OpLabel + %71 = OpPhi %bool %false %49 %70 %61 + OpStore %ok %71 + OpSelectionMerge %73 None + OpBranchConditional %71 %72 %73 + %72 = OpLabel + %74 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %75 = OpLoad %v4float %74 + %76 = OpVectorShuffle %v2float %75 %75 1 0 + %77 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %78 = OpLoad %v4float %77 + %79 = OpVectorShuffle %v2float %78 %78 0 1 + %80 = OpFOrdEqual %v2bool %76 %79 + %81 = OpAll %bool %80 + OpSelectionMerge %83 None + OpBranchConditional %81 %83 %82 + %82 = OpLabel + %84 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %85 = OpLoad %v4float %84 + %86 = OpCompositeExtract %float %85 3 + %87 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %88 = OpLoad %v4float %87 + %89 = OpCompositeExtract %float %88 3 + %90 = OpFUnordNotEqual %bool %86 %89 + OpBranch %83 + %83 = OpLabel + %91 = OpPhi %bool %true %72 %90 %82 + OpBranch %73 + %73 = OpLabel + %92 = OpPhi %bool %false %62 %91 %83 + OpStore %ok %92 + OpSelectionMerge %94 None + OpBranchConditional %92 %93 %94 + %93 = OpLabel + %95 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %96 = OpLoad %v4float %95 + %97 = OpVectorShuffle %v2float %96 %96 1 0 + %98 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %99 = OpLoad %v4float %98 + %100 = OpVectorShuffle %v2float %99 %99 0 1 + %101 = OpFUnordNotEqual %v2bool %97 %100 + %102 = OpAny %bool %101 + OpSelectionMerge %104 None + OpBranchConditional %102 %103 %104 + %103 = OpLabel + %105 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %106 = OpLoad %v4float %105 + %107 = OpCompositeExtract %float %106 3 + %108 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %109 = OpLoad %v4float %108 + %110 = OpCompositeExtract %float %109 3 + %111 = OpFOrdEqual %bool %107 %110 + OpBranch %104 + %104 = OpLabel + %112 = OpPhi %bool %false %93 %111 %103 + OpBranch %94 + %94 = OpLabel + %113 = OpPhi %bool %false %73 %112 %104 + OpStore %ok %113 + OpSelectionMerge %118 None + OpBranchConditional %113 %116 %117 + %116 = OpLabel + %119 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %120 = OpLoad %v4float %119 + OpStore %114 %120 + OpBranch %118 + %117 = OpLabel + %121 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %122 = OpLoad %v4float %121 + OpStore %114 %122 + OpBranch %118 + %118 = OpLabel + %123 = OpLoad %v4float %114 + OpReturnValue %123 + OpFunctionEnd diff --git a/tests/sksl/shared/TernaryTrueFalseOptimization.skrp b/tests/sksl/shared/TernaryTrueFalseOptimization.skrp index c84a1907089d..1373a5f5c61e 100644 --- a/tests/sksl/shared/TernaryTrueFalseOptimization.skrp +++ b/tests/sksl/shared/TernaryTrueFalseOptimization.skrp @@ -1,3 +1,5 @@ +53 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_constant ok = 0xFFFFFFFF diff --git a/tests/sksl/shared/TernaryTrueFalseOptimization.wgsl b/tests/sksl/shared/TernaryTrueFalseOptimization.wgsl index 027839bec251..f8320bf4ee03 100644 --- a/tests/sksl/shared/TernaryTrueFalseOptimization.wgsl +++ b/tests/sksl/shared/TernaryTrueFalseOptimization.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -14,12 +15,12 @@ fn main(_skParam0: vec2) -> vec4 { let coords = _skParam0; { var ok: bool = true; - ok = ok && _globalUniforms.colorGreen.y == 1.0; - ok = ok && _globalUniforms.colorGreen.x != 1.0; + ok = ok && (_globalUniforms.colorGreen.y == 1.0); + ok = ok && (_globalUniforms.colorGreen.x != 1.0); ok = ok && all(_globalUniforms.colorGreen.yx == _globalUniforms.colorRed.xy); ok = ok && all(_globalUniforms.colorGreen.yx == _globalUniforms.colorRed.xy); - ok = ok && (all(_globalUniforms.colorGreen.yx == _globalUniforms.colorRed.xy) || _globalUniforms.colorGreen.w != _globalUniforms.colorRed.w); - ok = ok && (any(_globalUniforms.colorGreen.yx != _globalUniforms.colorRed.xy) && _globalUniforms.colorGreen.w == _globalUniforms.colorRed.w); + ok = ok && (all(_globalUniforms.colorGreen.yx == _globalUniforms.colorRed.xy) || (_globalUniforms.colorGreen.w != _globalUniforms.colorRed.w)); + ok = ok && (any(_globalUniforms.colorGreen.yx != _globalUniforms.colorRed.xy) && (_globalUniforms.colorGreen.w == _globalUniforms.colorRed.w)); return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(ok)); } } diff --git a/tests/sksl/shared/Texture2D.asm.frag b/tests/sksl/shared/Texture2D.asm.frag index 8eabb593966b..400e7ac68bde 100644 --- a/tests/sksl/shared/Texture2D.asm.frag +++ b/tests/sksl/shared/Texture2D.asm.frag @@ -1,64 +1,64 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %tex "tex" -OpName %main "main" -OpName %a "a" -OpName %b "b" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %tex RelaxedPrecision -OpDecorate %tex Binding 0 -OpDecorate %tex DescriptorSet 0 -OpDecorate %20 RelaxedPrecision -OpDecorate %26 RelaxedPrecision -OpDecorate %30 RelaxedPrecision -OpDecorate %31 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %34 RelaxedPrecision -OpDecorate %35 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %tex "tex" + OpName %main "main" + OpName %a "a" + OpName %b "b" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %tex RelaxedPrecision + OpDecorate %tex Binding 0 + OpDecorate %tex DescriptorSet 0 + OpDecorate %20 RelaxedPrecision + OpDecorate %26 RelaxedPrecision + OpDecorate %30 RelaxedPrecision + OpDecorate %31 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %34 RelaxedPrecision + OpDecorate %35 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%11 = OpTypeImage %float 2D 0 0 0 1 Unknown -%12 = OpTypeSampledImage %11 + %11 = OpTypeImage %float 2D 0 0 0 1 Unknown + %12 = OpTypeSampledImage %11 %_ptr_UniformConstant_12 = OpTypePointer UniformConstant %12 -%tex = OpVariable %_ptr_UniformConstant_12 UniformConstant -%void = OpTypeVoid -%15 = OpTypeFunction %void + %tex = OpVariable %_ptr_UniformConstant_12 UniformConstant + %void = OpTypeVoid + %15 = OpTypeFunction %void %_ptr_Function_v4float = OpTypePointer Function %v4float -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%23 = OpConstantComposite %v2float %float_0 %float_0 -%v3float = OpTypeVector %float 3 -%28 = OpConstantComposite %v3float %float_0 %float_0 %float_0 -%main = OpFunction %void None %15 -%16 = OpLabel -%a = OpVariable %_ptr_Function_v4float Function -%b = OpVariable %_ptr_Function_v4float Function -%20 = OpLoad %12 %tex -%19 = OpImageSampleImplicitLod %v4float %20 %23 -OpStore %a %19 -%26 = OpLoad %12 %tex -%25 = OpImageSampleProjImplicitLod %v4float %26 %28 -OpStore %b %25 -%29 = OpVectorShuffle %v2float %19 %19 0 1 -%30 = OpCompositeExtract %float %29 0 -%31 = OpCompositeExtract %float %29 1 -%32 = OpVectorShuffle %v2float %25 %25 2 3 -%33 = OpCompositeExtract %float %32 0 -%34 = OpCompositeExtract %float %32 1 -%35 = OpCompositeConstruct %v4float %30 %31 %33 %34 -OpStore %sk_FragColor %35 -OpReturn -OpFunctionEnd + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %23 = OpConstantComposite %v2float %float_0 %float_0 + %v3float = OpTypeVector %float 3 + %28 = OpConstantComposite %v3float %float_0 %float_0 %float_0 + %main = OpFunction %void None %15 + %16 = OpLabel + %a = OpVariable %_ptr_Function_v4float Function + %b = OpVariable %_ptr_Function_v4float Function + %20 = OpLoad %12 %tex + %19 = OpImageSampleImplicitLod %v4float %20 %23 + OpStore %a %19 + %26 = OpLoad %12 %tex + %25 = OpImageSampleProjImplicitLod %v4float %26 %28 + OpStore %b %25 + %29 = OpVectorShuffle %v2float %19 %19 0 1 + %30 = OpCompositeExtract %float %29 0 + %31 = OpCompositeExtract %float %29 1 + %32 = OpVectorShuffle %v2float %25 %25 2 3 + %33 = OpCompositeExtract %float %32 0 + %34 = OpCompositeExtract %float %32 1 + %35 = OpCompositeConstruct %v4float %30 %31 %33 %34 + OpStore %sk_FragColor %35 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/Texture2D.wgsl b/tests/sksl/shared/Texture2D.wgsl new file mode 100644 index 000000000000..37dd27a07fe3 --- /dev/null +++ b/tests/sksl/shared/Texture2D.wgsl @@ -0,0 +1,22 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +@group(0) @binding(10000) var tex_Sampler: sampler; +@group(0) @binding(10001) var tex_Texture: texture_2d; +fn main(_stageOut: ptr) { + { + var a: vec4 = vec4(textureSample(tex_Texture, tex_Sampler, vec2(0.0))); + let _skTemp2 = vec3(0.0); + var b: vec4 = vec4(textureSample(tex_Texture, tex_Sampler, _skTemp2.xy / _skTemp2.z)); + (*_stageOut).sk_FragColor = vec4(vec2(a.xy), vec2(b.zw)); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(&_stageOut); + return _stageOut; +} diff --git a/tests/sksl/shared/TextureSharpen.asm.frag b/tests/sksl/shared/TextureSharpen.asm.frag index edc671a43689..760d6d9e0049 100644 --- a/tests/sksl/shared/TextureSharpen.asm.frag +++ b/tests/sksl/shared/TextureSharpen.asm.frag @@ -1,65 +1,65 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %s "s" -OpName %main "main" -OpName %a "a" -OpName %b "b" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %s RelaxedPrecision -OpDecorate %s Binding 0 -OpDecorate %s DescriptorSet 0 -OpDecorate %20 RelaxedPrecision -OpDecorate %27 RelaxedPrecision -OpDecorate %31 RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %34 RelaxedPrecision -OpDecorate %35 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %s "s" + OpName %main "main" + OpName %a "a" + OpName %b "b" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %s RelaxedPrecision + OpDecorate %s Binding 0 + OpDecorate %s DescriptorSet 0 + OpDecorate %20 RelaxedPrecision + OpDecorate %27 RelaxedPrecision + OpDecorate %31 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %34 RelaxedPrecision + OpDecorate %35 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%11 = OpTypeImage %float 2D 0 0 0 1 Unknown -%12 = OpTypeSampledImage %11 + %11 = OpTypeImage %float 2D 0 0 0 1 Unknown + %12 = OpTypeSampledImage %11 %_ptr_UniformConstant_12 = OpTypePointer UniformConstant %12 -%s = OpVariable %_ptr_UniformConstant_12 UniformConstant -%void = OpTypeVoid -%15 = OpTypeFunction %void + %s = OpVariable %_ptr_UniformConstant_12 UniformConstant + %void = OpTypeVoid + %15 = OpTypeFunction %void %_ptr_Function_v4float = OpTypePointer Function %v4float -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%23 = OpConstantComposite %v2float %float_0 %float_0 + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %23 = OpConstantComposite %v2float %float_0 %float_0 %float_n0_474999994 = OpConstant %float -0.474999994 -%v3float = OpTypeVector %float 3 -%29 = OpConstantComposite %v3float %float_0 %float_0 %float_0 -%main = OpFunction %void None %15 -%16 = OpLabel -%a = OpVariable %_ptr_Function_v4float Function -%b = OpVariable %_ptr_Function_v4float Function -%20 = OpLoad %12 %s -%19 = OpImageSampleImplicitLod %v4float %20 %23 Bias %float_n0_474999994 -OpStore %a %19 -%27 = OpLoad %12 %s -%26 = OpImageSampleProjImplicitLod %v4float %27 %29 Bias %float_n0_474999994 -OpStore %b %26 -%30 = OpVectorShuffle %v2float %19 %19 0 1 -%31 = OpCompositeExtract %float %30 0 -%32 = OpCompositeExtract %float %30 1 -%33 = OpVectorShuffle %v2float %26 %26 0 1 -%34 = OpCompositeExtract %float %33 0 -%35 = OpCompositeExtract %float %33 1 -%36 = OpCompositeConstruct %v4float %31 %32 %34 %35 -OpStore %sk_FragColor %36 -OpReturn -OpFunctionEnd + %v3float = OpTypeVector %float 3 + %29 = OpConstantComposite %v3float %float_0 %float_0 %float_0 + %main = OpFunction %void None %15 + %16 = OpLabel + %a = OpVariable %_ptr_Function_v4float Function + %b = OpVariable %_ptr_Function_v4float Function + %20 = OpLoad %12 %s + %19 = OpImageSampleImplicitLod %v4float %20 %23 Bias %float_n0_474999994 + OpStore %a %19 + %27 = OpLoad %12 %s + %26 = OpImageSampleProjImplicitLod %v4float %27 %29 Bias %float_n0_474999994 + OpStore %b %26 + %30 = OpVectorShuffle %v2float %19 %19 0 1 + %31 = OpCompositeExtract %float %30 0 + %32 = OpCompositeExtract %float %30 1 + %33 = OpVectorShuffle %v2float %26 %26 0 1 + %34 = OpCompositeExtract %float %33 0 + %35 = OpCompositeExtract %float %33 1 + %36 = OpCompositeConstruct %v4float %31 %32 %34 %35 + OpStore %sk_FragColor %36 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/TextureSharpen.wgsl b/tests/sksl/shared/TextureSharpen.wgsl new file mode 100644 index 000000000000..71ac6231fc44 --- /dev/null +++ b/tests/sksl/shared/TextureSharpen.wgsl @@ -0,0 +1,22 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +@group(0) @binding(10000) var s_Sampler: sampler; +@group(0) @binding(10001) var s_Texture: texture_2d; +fn main(_stageOut: ptr) { + { + var a: vec4 = vec4(textureSampleBias(s_Texture, s_Sampler, vec2(0.0), -0.475)); + let _skTemp2 = vec3(0.0); + var b: vec4 = vec4(textureSampleBias(s_Texture, s_Sampler, _skTemp2.xy / _skTemp2.z, -0.475)); + (*_stageOut).sk_FragColor = vec4(vec2(a.xy), vec2(b.xy)); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(&_stageOut); + return _stageOut; +} diff --git a/tests/sksl/shared/UnaryPositiveNegative.asm.frag b/tests/sksl/shared/UnaryPositiveNegative.asm.frag index ebb57bf0b147..c4c7ad37ed17 100644 --- a/tests/sksl/shared/UnaryPositiveNegative.asm.frag +++ b/tests/sksl/shared/UnaryPositiveNegative.asm.frag @@ -1,484 +1,484 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorWhite" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpMemberName %_UniformBuffer 3 "testMatrix2x2" -OpMemberName %_UniformBuffer 4 "testMatrix3x3" -OpMemberName %_UniformBuffer 5 "testMatrix4x4" -OpName %_entrypoint_v "_entrypoint_v" -OpName %test_iscalar_b "test_iscalar_b" -OpName %x "x" -OpName %test_fvec_b "test_fvec_b" -OpName %x_0 "x" -OpName %test_ivec_b "test_ivec_b" -OpName %x_1 "x" -OpName %test_mat2_b "test_mat2_b" -OpName %negated "negated" -OpName %x_2 "x" -OpName %test_mat3_b "test_mat3_b" -OpName %negated_0 "negated" -OpName %x_3 "x" -OpName %test_mat4_b "test_mat4_b" -OpName %negated_1 "negated" -OpName %x_4 "x" -OpName %test_hmat2_b "test_hmat2_b" -OpName %negated_2 "negated" -OpName %x_5 "x" -OpName %test_hmat3_b "test_hmat3_b" -OpName %negated_3 "negated" -OpName %x_6 "x" -OpName %test_hmat4_b "test_hmat4_b" -OpName %negated_4 "negated" -OpName %x_7 "x" -OpName %main "main" -OpName %_0_x "_0_x" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 3 Offset 48 -OpMemberDecorate %_UniformBuffer 3 ColMajor -OpMemberDecorate %_UniformBuffer 3 MatrixStride 16 -OpMemberDecorate %_UniformBuffer 4 Offset 80 -OpMemberDecorate %_UniformBuffer 4 ColMajor -OpMemberDecorate %_UniformBuffer 4 MatrixStride 16 -OpMemberDecorate %_UniformBuffer 5 Offset 128 -OpMemberDecorate %_UniformBuffer 5 ColMajor -OpMemberDecorate %_UniformBuffer 5 MatrixStride 16 -OpDecorate %_UniformBuffer Block -OpDecorate %19 Binding 0 -OpDecorate %19 DescriptorSet 0 -OpDecorate %44 RelaxedPrecision -OpDecorate %45 RelaxedPrecision -OpDecorate %x_0 RelaxedPrecision -OpDecorate %53 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %55 RelaxedPrecision -OpDecorate %66 RelaxedPrecision -OpDecorate %67 RelaxedPrecision -OpDecorate %negated_2 RelaxedPrecision -OpDecorate %x_5 RelaxedPrecision -OpDecorate %177 RelaxedPrecision -OpDecorate %178 RelaxedPrecision -OpDecorate %179 RelaxedPrecision -OpDecorate %180 RelaxedPrecision -OpDecorate %181 RelaxedPrecision -OpDecorate %182 RelaxedPrecision -OpDecorate %184 RelaxedPrecision -OpDecorate %negated_3 RelaxedPrecision -OpDecorate %x_6 RelaxedPrecision -OpDecorate %192 RelaxedPrecision -OpDecorate %193 RelaxedPrecision -OpDecorate %194 RelaxedPrecision -OpDecorate %195 RelaxedPrecision -OpDecorate %196 RelaxedPrecision -OpDecorate %197 RelaxedPrecision -OpDecorate %198 RelaxedPrecision -OpDecorate %199 RelaxedPrecision -OpDecorate %201 RelaxedPrecision -OpDecorate %204 RelaxedPrecision -OpDecorate %negated_4 RelaxedPrecision -OpDecorate %x_7 RelaxedPrecision -OpDecorate %212 RelaxedPrecision -OpDecorate %213 RelaxedPrecision -OpDecorate %214 RelaxedPrecision -OpDecorate %215 RelaxedPrecision -OpDecorate %216 RelaxedPrecision -OpDecorate %217 RelaxedPrecision -OpDecorate %218 RelaxedPrecision -OpDecorate %219 RelaxedPrecision -OpDecorate %220 RelaxedPrecision -OpDecorate %221 RelaxedPrecision -OpDecorate %223 RelaxedPrecision -OpDecorate %226 RelaxedPrecision -OpDecorate %229 RelaxedPrecision -OpDecorate %238 RelaxedPrecision -OpDecorate %239 RelaxedPrecision -OpDecorate %286 RelaxedPrecision -OpDecorate %289 RelaxedPrecision -OpDecorate %290 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorWhite" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpMemberName %_UniformBuffer 3 "testMatrix2x2" + OpMemberName %_UniformBuffer 4 "testMatrix3x3" + OpMemberName %_UniformBuffer 5 "testMatrix4x4" + OpName %_entrypoint_v "_entrypoint_v" + OpName %test_iscalar_b "test_iscalar_b" + OpName %x "x" + OpName %test_fvec_b "test_fvec_b" + OpName %x_0 "x" + OpName %test_ivec_b "test_ivec_b" + OpName %x_1 "x" + OpName %test_mat2_b "test_mat2_b" + OpName %negated "negated" + OpName %x_2 "x" + OpName %test_mat3_b "test_mat3_b" + OpName %negated_0 "negated" + OpName %x_3 "x" + OpName %test_mat4_b "test_mat4_b" + OpName %negated_1 "negated" + OpName %x_4 "x" + OpName %test_hmat2_b "test_hmat2_b" + OpName %negated_2 "negated" + OpName %x_5 "x" + OpName %test_hmat3_b "test_hmat3_b" + OpName %negated_3 "negated" + OpName %x_6 "x" + OpName %test_hmat4_b "test_hmat4_b" + OpName %negated_4 "negated" + OpName %x_7 "x" + OpName %main "main" + OpName %_0_x "_0_x" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 3 Offset 48 + OpMemberDecorate %_UniformBuffer 3 ColMajor + OpMemberDecorate %_UniformBuffer 3 MatrixStride 16 + OpMemberDecorate %_UniformBuffer 4 Offset 80 + OpMemberDecorate %_UniformBuffer 4 ColMajor + OpMemberDecorate %_UniformBuffer 4 MatrixStride 16 + OpMemberDecorate %_UniformBuffer 5 Offset 128 + OpMemberDecorate %_UniformBuffer 5 ColMajor + OpMemberDecorate %_UniformBuffer 5 MatrixStride 16 + OpDecorate %_UniformBuffer Block + OpDecorate %19 Binding 0 + OpDecorate %19 DescriptorSet 0 + OpDecorate %44 RelaxedPrecision + OpDecorate %45 RelaxedPrecision + OpDecorate %x_0 RelaxedPrecision + OpDecorate %53 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %55 RelaxedPrecision + OpDecorate %66 RelaxedPrecision + OpDecorate %67 RelaxedPrecision + OpDecorate %negated_2 RelaxedPrecision + OpDecorate %x_5 RelaxedPrecision + OpDecorate %177 RelaxedPrecision + OpDecorate %178 RelaxedPrecision + OpDecorate %179 RelaxedPrecision + OpDecorate %180 RelaxedPrecision + OpDecorate %181 RelaxedPrecision + OpDecorate %182 RelaxedPrecision + OpDecorate %184 RelaxedPrecision + OpDecorate %negated_3 RelaxedPrecision + OpDecorate %x_6 RelaxedPrecision + OpDecorate %192 RelaxedPrecision + OpDecorate %193 RelaxedPrecision + OpDecorate %194 RelaxedPrecision + OpDecorate %195 RelaxedPrecision + OpDecorate %196 RelaxedPrecision + OpDecorate %197 RelaxedPrecision + OpDecorate %198 RelaxedPrecision + OpDecorate %199 RelaxedPrecision + OpDecorate %201 RelaxedPrecision + OpDecorate %204 RelaxedPrecision + OpDecorate %negated_4 RelaxedPrecision + OpDecorate %x_7 RelaxedPrecision + OpDecorate %212 RelaxedPrecision + OpDecorate %213 RelaxedPrecision + OpDecorate %214 RelaxedPrecision + OpDecorate %215 RelaxedPrecision + OpDecorate %216 RelaxedPrecision + OpDecorate %217 RelaxedPrecision + OpDecorate %218 RelaxedPrecision + OpDecorate %219 RelaxedPrecision + OpDecorate %220 RelaxedPrecision + OpDecorate %221 RelaxedPrecision + OpDecorate %223 RelaxedPrecision + OpDecorate %226 RelaxedPrecision + OpDecorate %229 RelaxedPrecision + OpDecorate %238 RelaxedPrecision + OpDecorate %239 RelaxedPrecision + OpDecorate %286 RelaxedPrecision + OpDecorate %289 RelaxedPrecision + OpDecorate %290 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%v2float = OpTypeVector %float 2 + %v2float = OpTypeVector %float 2 %mat2v2float = OpTypeMatrix %v2float 2 -%v3float = OpTypeVector %float 3 + %v3float = OpTypeVector %float 3 %mat3v3float = OpTypeMatrix %v3float 3 %mat4v4float = OpTypeMatrix %v4float 4 %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %mat2v2float %mat3v3float %mat4v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%19 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%29 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%32 = OpConstantComposite %v2float %float_0 %float_0 + %19 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %29 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %32 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%36 = OpTypeFunction %bool -%int = OpTypeInt 32 1 + %36 = OpTypeFunction %bool + %int = OpTypeInt 32 1 %_ptr_Function_int = OpTypePointer Function %int %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_0 = OpConstant %int 0 -%int_n1 = OpConstant %int -1 -%float_n1 = OpConstant %float -1 -%57 = OpConstantComposite %v2float %float_n1 %float_n1 -%v2bool = OpTypeVector %bool 2 -%v2int = OpTypeVector %int 2 + %int_0 = OpConstant %int 0 + %int_n1 = OpConstant %int -1 + %float_n1 = OpConstant %float -1 + %57 = OpConstantComposite %v2float %float_n1 %float_n1 + %v2bool = OpTypeVector %bool 2 + %v2int = OpTypeVector %int 2 %_ptr_Function_v2int = OpTypePointer Function %v2int -%71 = OpConstantComposite %v2int %int_n1 %int_n1 + %71 = OpConstantComposite %v2int %int_n1 %int_n1 %_ptr_Function_mat2v2float = OpTypePointer Function %mat2v2float -%float_n2 = OpConstant %float -2 -%float_n3 = OpConstant %float -3 -%float_n4 = OpConstant %float -4 -%80 = OpConstantComposite %v2float %float_n1 %float_n2 -%81 = OpConstantComposite %v2float %float_n3 %float_n4 -%82 = OpConstantComposite %mat2v2float %80 %81 + %float_n2 = OpConstant %float -2 + %float_n3 = OpConstant %float -3 + %float_n4 = OpConstant %float -4 + %80 = OpConstantComposite %v2float %float_n1 %float_n2 + %81 = OpConstantComposite %v2float %float_n3 %float_n4 + %82 = OpConstantComposite %mat2v2float %80 %81 %_ptr_Uniform_mat2v2float = OpTypePointer Uniform %mat2v2float -%int_3 = OpConstant %int 3 + %int_3 = OpConstant %int 3 %_ptr_Function_mat3v3float = OpTypePointer Function %mat3v3float -%float_n5 = OpConstant %float -5 -%float_n6 = OpConstant %float -6 -%float_n7 = OpConstant %float -7 -%float_n8 = OpConstant %float -8 -%float_n9 = OpConstant %float -9 -%106 = OpConstantComposite %v3float %float_n1 %float_n2 %float_n3 -%107 = OpConstantComposite %v3float %float_n4 %float_n5 %float_n6 -%108 = OpConstantComposite %v3float %float_n7 %float_n8 %float_n9 -%109 = OpConstantComposite %mat3v3float %106 %107 %108 + %float_n5 = OpConstant %float -5 + %float_n6 = OpConstant %float -6 + %float_n7 = OpConstant %float -7 + %float_n8 = OpConstant %float -8 + %float_n9 = OpConstant %float -9 + %106 = OpConstantComposite %v3float %float_n1 %float_n2 %float_n3 + %107 = OpConstantComposite %v3float %float_n4 %float_n5 %float_n6 + %108 = OpConstantComposite %v3float %float_n7 %float_n8 %float_n9 + %109 = OpConstantComposite %mat3v3float %106 %107 %108 %_ptr_Uniform_mat3v3float = OpTypePointer Uniform %mat3v3float -%int_4 = OpConstant %int 4 -%v3bool = OpTypeVector %bool 3 + %int_4 = OpConstant %int 4 + %v3bool = OpTypeVector %bool 3 %_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float -%float_n10 = OpConstant %float -10 -%float_n11 = OpConstant %float -11 -%float_n12 = OpConstant %float -12 -%float_n13 = OpConstant %float -13 -%float_n14 = OpConstant %float -14 -%float_n15 = OpConstant %float -15 -%float_n16 = OpConstant %float -16 -%141 = OpConstantComposite %v4float %float_n1 %float_n2 %float_n3 %float_n4 -%142 = OpConstantComposite %v4float %float_n5 %float_n6 %float_n7 %float_n8 -%143 = OpConstantComposite %v4float %float_n9 %float_n10 %float_n11 %float_n12 -%144 = OpConstantComposite %v4float %float_n13 %float_n14 %float_n15 %float_n16 -%145 = OpConstantComposite %mat4v4float %141 %142 %143 %144 + %float_n10 = OpConstant %float -10 + %float_n11 = OpConstant %float -11 + %float_n12 = OpConstant %float -12 + %float_n13 = OpConstant %float -13 + %float_n14 = OpConstant %float -14 + %float_n15 = OpConstant %float -15 + %float_n16 = OpConstant %float -16 + %141 = OpConstantComposite %v4float %float_n1 %float_n2 %float_n3 %float_n4 + %142 = OpConstantComposite %v4float %float_n5 %float_n6 %float_n7 %float_n8 + %143 = OpConstantComposite %v4float %float_n9 %float_n10 %float_n11 %float_n12 + %144 = OpConstantComposite %v4float %float_n13 %float_n14 %float_n15 %float_n16 + %145 = OpConstantComposite %mat4v4float %141 %142 %143 %144 %_ptr_Uniform_mat4v4float = OpTypePointer Uniform %mat4v4float -%int_5 = OpConstant %int 5 -%v4bool = OpTypeVector %bool 4 -%232 = OpTypeFunction %v4float %_ptr_Function_v2float + %int_5 = OpConstant %int 5 + %v4bool = OpTypeVector %bool 4 + %232 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_float = OpTypePointer Function %float -%false = OpConstantFalse %bool + %false = OpConstantFalse %bool %_ptr_Function_v4float = OpTypePointer Function %v4float -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %29 -%30 = OpLabel -%33 = OpVariable %_ptr_Function_v2float Function -OpStore %33 %32 -%35 = OpFunctionCall %v4float %main %33 -OpStore %sk_FragColor %35 -OpReturn -OpFunctionEnd + %30 = OpLabel + %33 = OpVariable %_ptr_Function_v2float Function + OpStore %33 %32 + %35 = OpFunctionCall %v4float %main %33 + OpStore %sk_FragColor %35 + OpReturn + OpFunctionEnd %test_iscalar_b = OpFunction %bool None %36 -%37 = OpLabel -%x = OpVariable %_ptr_Function_int Function -%41 = OpAccessChain %_ptr_Uniform_v4float %19 %int_0 -%44 = OpLoad %v4float %41 -%45 = OpCompositeExtract %float %44 0 -%46 = OpConvertFToS %int %45 -OpStore %x %46 -%47 = OpSNegate %int %46 -OpStore %x %47 -%49 = OpIEqual %bool %47 %int_n1 -OpReturnValue %49 -OpFunctionEnd + %37 = OpLabel + %x = OpVariable %_ptr_Function_int Function + %41 = OpAccessChain %_ptr_Uniform_v4float %19 %int_0 + %44 = OpLoad %v4float %41 + %45 = OpCompositeExtract %float %44 0 + %46 = OpConvertFToS %int %45 + OpStore %x %46 + %47 = OpSNegate %int %46 + OpStore %x %47 + %49 = OpIEqual %bool %47 %int_n1 + OpReturnValue %49 + OpFunctionEnd %test_fvec_b = OpFunction %bool None %36 -%50 = OpLabel -%x_0 = OpVariable %_ptr_Function_v2float Function -%52 = OpAccessChain %_ptr_Uniform_v4float %19 %int_0 -%53 = OpLoad %v4float %52 -%54 = OpVectorShuffle %v2float %53 %53 0 1 -OpStore %x_0 %54 -%55 = OpFNegate %v2float %54 -OpStore %x_0 %55 -%58 = OpFOrdEqual %v2bool %55 %57 -%60 = OpAll %bool %58 -OpReturnValue %60 -OpFunctionEnd + %50 = OpLabel + %x_0 = OpVariable %_ptr_Function_v2float Function + %52 = OpAccessChain %_ptr_Uniform_v4float %19 %int_0 + %53 = OpLoad %v4float %52 + %54 = OpVectorShuffle %v2float %53 %53 0 1 + OpStore %x_0 %54 + %55 = OpFNegate %v2float %54 + OpStore %x_0 %55 + %58 = OpFOrdEqual %v2bool %55 %57 + %60 = OpAll %bool %58 + OpReturnValue %60 + OpFunctionEnd %test_ivec_b = OpFunction %bool None %36 -%61 = OpLabel -%x_1 = OpVariable %_ptr_Function_v2int Function -%65 = OpAccessChain %_ptr_Uniform_v4float %19 %int_0 -%66 = OpLoad %v4float %65 -%67 = OpCompositeExtract %float %66 0 -%68 = OpConvertFToS %int %67 -%69 = OpCompositeConstruct %v2int %68 %68 -OpStore %x_1 %69 -%70 = OpSNegate %v2int %69 -OpStore %x_1 %70 -%72 = OpIEqual %v2bool %70 %71 -%73 = OpAll %bool %72 -OpReturnValue %73 -OpFunctionEnd + %61 = OpLabel + %x_1 = OpVariable %_ptr_Function_v2int Function + %65 = OpAccessChain %_ptr_Uniform_v4float %19 %int_0 + %66 = OpLoad %v4float %65 + %67 = OpCompositeExtract %float %66 0 + %68 = OpConvertFToS %int %67 + %69 = OpCompositeConstruct %v2int %68 %68 + OpStore %x_1 %69 + %70 = OpSNegate %v2int %69 + OpStore %x_1 %70 + %72 = OpIEqual %v2bool %70 %71 + %73 = OpAll %bool %72 + OpReturnValue %73 + OpFunctionEnd %test_mat2_b = OpFunction %bool None %36 -%74 = OpLabel -%negated = OpVariable %_ptr_Function_mat2v2float Function -%x_2 = OpVariable %_ptr_Function_mat2v2float Function -OpStore %negated %82 -%84 = OpAccessChain %_ptr_Uniform_mat2v2float %19 %int_3 -%87 = OpLoad %mat2v2float %84 -OpStore %x_2 %87 -%88 = OpCompositeExtract %v2float %87 0 -%89 = OpFNegate %v2float %88 -%90 = OpCompositeExtract %v2float %87 1 -%91 = OpFNegate %v2float %90 -%92 = OpCompositeConstruct %mat2v2float %89 %91 -OpStore %x_2 %92 -%93 = OpFOrdEqual %v2bool %89 %80 -%94 = OpAll %bool %93 -%95 = OpFOrdEqual %v2bool %91 %81 -%96 = OpAll %bool %95 -%97 = OpLogicalAnd %bool %94 %96 -OpReturnValue %97 -OpFunctionEnd + %74 = OpLabel + %negated = OpVariable %_ptr_Function_mat2v2float Function + %x_2 = OpVariable %_ptr_Function_mat2v2float Function + OpStore %negated %82 + %84 = OpAccessChain %_ptr_Uniform_mat2v2float %19 %int_3 + %87 = OpLoad %mat2v2float %84 + OpStore %x_2 %87 + %88 = OpCompositeExtract %v2float %87 0 + %89 = OpFNegate %v2float %88 + %90 = OpCompositeExtract %v2float %87 1 + %91 = OpFNegate %v2float %90 + %92 = OpCompositeConstruct %mat2v2float %89 %91 + OpStore %x_2 %92 + %93 = OpFOrdEqual %v2bool %89 %80 + %94 = OpAll %bool %93 + %95 = OpFOrdEqual %v2bool %91 %81 + %96 = OpAll %bool %95 + %97 = OpLogicalAnd %bool %94 %96 + OpReturnValue %97 + OpFunctionEnd %test_mat3_b = OpFunction %bool None %36 -%98 = OpLabel -%negated_0 = OpVariable %_ptr_Function_mat3v3float Function -%x_3 = OpVariable %_ptr_Function_mat3v3float Function -OpStore %negated_0 %109 -%111 = OpAccessChain %_ptr_Uniform_mat3v3float %19 %int_4 -%114 = OpLoad %mat3v3float %111 -OpStore %x_3 %114 -%115 = OpCompositeExtract %v3float %114 0 -%116 = OpFNegate %v3float %115 -%117 = OpCompositeExtract %v3float %114 1 -%118 = OpFNegate %v3float %117 -%119 = OpCompositeExtract %v3float %114 2 -%120 = OpFNegate %v3float %119 -%121 = OpCompositeConstruct %mat3v3float %116 %118 %120 -OpStore %x_3 %121 -%123 = OpFOrdEqual %v3bool %116 %106 -%124 = OpAll %bool %123 -%125 = OpFOrdEqual %v3bool %118 %107 -%126 = OpAll %bool %125 -%127 = OpLogicalAnd %bool %124 %126 -%128 = OpFOrdEqual %v3bool %120 %108 -%129 = OpAll %bool %128 -%130 = OpLogicalAnd %bool %127 %129 -OpReturnValue %130 -OpFunctionEnd + %98 = OpLabel + %negated_0 = OpVariable %_ptr_Function_mat3v3float Function + %x_3 = OpVariable %_ptr_Function_mat3v3float Function + OpStore %negated_0 %109 + %111 = OpAccessChain %_ptr_Uniform_mat3v3float %19 %int_4 + %114 = OpLoad %mat3v3float %111 + OpStore %x_3 %114 + %115 = OpCompositeExtract %v3float %114 0 + %116 = OpFNegate %v3float %115 + %117 = OpCompositeExtract %v3float %114 1 + %118 = OpFNegate %v3float %117 + %119 = OpCompositeExtract %v3float %114 2 + %120 = OpFNegate %v3float %119 + %121 = OpCompositeConstruct %mat3v3float %116 %118 %120 + OpStore %x_3 %121 + %123 = OpFOrdEqual %v3bool %116 %106 + %124 = OpAll %bool %123 + %125 = OpFOrdEqual %v3bool %118 %107 + %126 = OpAll %bool %125 + %127 = OpLogicalAnd %bool %124 %126 + %128 = OpFOrdEqual %v3bool %120 %108 + %129 = OpAll %bool %128 + %130 = OpLogicalAnd %bool %127 %129 + OpReturnValue %130 + OpFunctionEnd %test_mat4_b = OpFunction %bool None %36 -%131 = OpLabel -%negated_1 = OpVariable %_ptr_Function_mat4v4float Function -%x_4 = OpVariable %_ptr_Function_mat4v4float Function -OpStore %negated_1 %145 -%147 = OpAccessChain %_ptr_Uniform_mat4v4float %19 %int_5 -%150 = OpLoad %mat4v4float %147 -OpStore %x_4 %150 -%151 = OpCompositeExtract %v4float %150 0 -%152 = OpFNegate %v4float %151 -%153 = OpCompositeExtract %v4float %150 1 -%154 = OpFNegate %v4float %153 -%155 = OpCompositeExtract %v4float %150 2 -%156 = OpFNegate %v4float %155 -%157 = OpCompositeExtract %v4float %150 3 -%158 = OpFNegate %v4float %157 -%159 = OpCompositeConstruct %mat4v4float %152 %154 %156 %158 -OpStore %x_4 %159 -%161 = OpFOrdEqual %v4bool %152 %141 -%162 = OpAll %bool %161 -%163 = OpFOrdEqual %v4bool %154 %142 -%164 = OpAll %bool %163 -%165 = OpLogicalAnd %bool %162 %164 -%166 = OpFOrdEqual %v4bool %156 %143 -%167 = OpAll %bool %166 -%168 = OpLogicalAnd %bool %165 %167 -%169 = OpFOrdEqual %v4bool %158 %144 -%170 = OpAll %bool %169 -%171 = OpLogicalAnd %bool %168 %170 -OpReturnValue %171 -OpFunctionEnd + %131 = OpLabel + %negated_1 = OpVariable %_ptr_Function_mat4v4float Function + %x_4 = OpVariable %_ptr_Function_mat4v4float Function + OpStore %negated_1 %145 + %147 = OpAccessChain %_ptr_Uniform_mat4v4float %19 %int_5 + %150 = OpLoad %mat4v4float %147 + OpStore %x_4 %150 + %151 = OpCompositeExtract %v4float %150 0 + %152 = OpFNegate %v4float %151 + %153 = OpCompositeExtract %v4float %150 1 + %154 = OpFNegate %v4float %153 + %155 = OpCompositeExtract %v4float %150 2 + %156 = OpFNegate %v4float %155 + %157 = OpCompositeExtract %v4float %150 3 + %158 = OpFNegate %v4float %157 + %159 = OpCompositeConstruct %mat4v4float %152 %154 %156 %158 + OpStore %x_4 %159 + %161 = OpFOrdEqual %v4bool %152 %141 + %162 = OpAll %bool %161 + %163 = OpFOrdEqual %v4bool %154 %142 + %164 = OpAll %bool %163 + %165 = OpLogicalAnd %bool %162 %164 + %166 = OpFOrdEqual %v4bool %156 %143 + %167 = OpAll %bool %166 + %168 = OpLogicalAnd %bool %165 %167 + %169 = OpFOrdEqual %v4bool %158 %144 + %170 = OpAll %bool %169 + %171 = OpLogicalAnd %bool %168 %170 + OpReturnValue %171 + OpFunctionEnd %test_hmat2_b = OpFunction %bool None %36 -%172 = OpLabel -%negated_2 = OpVariable %_ptr_Function_mat2v2float Function -%x_5 = OpVariable %_ptr_Function_mat2v2float Function -OpStore %negated_2 %82 -%175 = OpAccessChain %_ptr_Uniform_mat2v2float %19 %int_3 -%176 = OpLoad %mat2v2float %175 -OpStore %x_5 %176 -%177 = OpCompositeExtract %v2float %176 0 -%178 = OpFNegate %v2float %177 -%179 = OpCompositeExtract %v2float %176 1 -%180 = OpFNegate %v2float %179 -%181 = OpCompositeConstruct %mat2v2float %178 %180 -OpStore %x_5 %181 -%182 = OpFOrdEqual %v2bool %178 %80 -%183 = OpAll %bool %182 -%184 = OpFOrdEqual %v2bool %180 %81 -%185 = OpAll %bool %184 -%186 = OpLogicalAnd %bool %183 %185 -OpReturnValue %186 -OpFunctionEnd + %172 = OpLabel + %negated_2 = OpVariable %_ptr_Function_mat2v2float Function + %x_5 = OpVariable %_ptr_Function_mat2v2float Function + OpStore %negated_2 %82 + %175 = OpAccessChain %_ptr_Uniform_mat2v2float %19 %int_3 + %176 = OpLoad %mat2v2float %175 + OpStore %x_5 %176 + %177 = OpCompositeExtract %v2float %176 0 + %178 = OpFNegate %v2float %177 + %179 = OpCompositeExtract %v2float %176 1 + %180 = OpFNegate %v2float %179 + %181 = OpCompositeConstruct %mat2v2float %178 %180 + OpStore %x_5 %181 + %182 = OpFOrdEqual %v2bool %178 %80 + %183 = OpAll %bool %182 + %184 = OpFOrdEqual %v2bool %180 %81 + %185 = OpAll %bool %184 + %186 = OpLogicalAnd %bool %183 %185 + OpReturnValue %186 + OpFunctionEnd %test_hmat3_b = OpFunction %bool None %36 -%187 = OpLabel -%negated_3 = OpVariable %_ptr_Function_mat3v3float Function -%x_6 = OpVariable %_ptr_Function_mat3v3float Function -OpStore %negated_3 %109 -%190 = OpAccessChain %_ptr_Uniform_mat3v3float %19 %int_4 -%191 = OpLoad %mat3v3float %190 -OpStore %x_6 %191 -%192 = OpCompositeExtract %v3float %191 0 -%193 = OpFNegate %v3float %192 -%194 = OpCompositeExtract %v3float %191 1 -%195 = OpFNegate %v3float %194 -%196 = OpCompositeExtract %v3float %191 2 -%197 = OpFNegate %v3float %196 -%198 = OpCompositeConstruct %mat3v3float %193 %195 %197 -OpStore %x_6 %198 -%199 = OpFOrdEqual %v3bool %193 %106 -%200 = OpAll %bool %199 -%201 = OpFOrdEqual %v3bool %195 %107 -%202 = OpAll %bool %201 -%203 = OpLogicalAnd %bool %200 %202 -%204 = OpFOrdEqual %v3bool %197 %108 -%205 = OpAll %bool %204 -%206 = OpLogicalAnd %bool %203 %205 -OpReturnValue %206 -OpFunctionEnd + %187 = OpLabel + %negated_3 = OpVariable %_ptr_Function_mat3v3float Function + %x_6 = OpVariable %_ptr_Function_mat3v3float Function + OpStore %negated_3 %109 + %190 = OpAccessChain %_ptr_Uniform_mat3v3float %19 %int_4 + %191 = OpLoad %mat3v3float %190 + OpStore %x_6 %191 + %192 = OpCompositeExtract %v3float %191 0 + %193 = OpFNegate %v3float %192 + %194 = OpCompositeExtract %v3float %191 1 + %195 = OpFNegate %v3float %194 + %196 = OpCompositeExtract %v3float %191 2 + %197 = OpFNegate %v3float %196 + %198 = OpCompositeConstruct %mat3v3float %193 %195 %197 + OpStore %x_6 %198 + %199 = OpFOrdEqual %v3bool %193 %106 + %200 = OpAll %bool %199 + %201 = OpFOrdEqual %v3bool %195 %107 + %202 = OpAll %bool %201 + %203 = OpLogicalAnd %bool %200 %202 + %204 = OpFOrdEqual %v3bool %197 %108 + %205 = OpAll %bool %204 + %206 = OpLogicalAnd %bool %203 %205 + OpReturnValue %206 + OpFunctionEnd %test_hmat4_b = OpFunction %bool None %36 -%207 = OpLabel -%negated_4 = OpVariable %_ptr_Function_mat4v4float Function -%x_7 = OpVariable %_ptr_Function_mat4v4float Function -OpStore %negated_4 %145 -%210 = OpAccessChain %_ptr_Uniform_mat4v4float %19 %int_5 -%211 = OpLoad %mat4v4float %210 -OpStore %x_7 %211 -%212 = OpCompositeExtract %v4float %211 0 -%213 = OpFNegate %v4float %212 -%214 = OpCompositeExtract %v4float %211 1 -%215 = OpFNegate %v4float %214 -%216 = OpCompositeExtract %v4float %211 2 -%217 = OpFNegate %v4float %216 -%218 = OpCompositeExtract %v4float %211 3 -%219 = OpFNegate %v4float %218 -%220 = OpCompositeConstruct %mat4v4float %213 %215 %217 %219 -OpStore %x_7 %220 -%221 = OpFOrdEqual %v4bool %213 %141 -%222 = OpAll %bool %221 -%223 = OpFOrdEqual %v4bool %215 %142 -%224 = OpAll %bool %223 -%225 = OpLogicalAnd %bool %222 %224 -%226 = OpFOrdEqual %v4bool %217 %143 -%227 = OpAll %bool %226 -%228 = OpLogicalAnd %bool %225 %227 -%229 = OpFOrdEqual %v4bool %219 %144 -%230 = OpAll %bool %229 -%231 = OpLogicalAnd %bool %228 %230 -OpReturnValue %231 -OpFunctionEnd -%main = OpFunction %v4float None %232 -%233 = OpFunctionParameter %_ptr_Function_v2float -%234 = OpLabel -%_0_x = OpVariable %_ptr_Function_float Function -%279 = OpVariable %_ptr_Function_v4float Function -%237 = OpAccessChain %_ptr_Uniform_v4float %19 %int_0 -%238 = OpLoad %v4float %237 -%239 = OpCompositeExtract %float %238 0 -OpStore %_0_x %239 -%240 = OpFNegate %float %239 -OpStore %_0_x %240 -%242 = OpFOrdEqual %bool %240 %float_n1 -OpSelectionMerge %244 None -OpBranchConditional %242 %243 %244 -%243 = OpLabel -%245 = OpFunctionCall %bool %test_iscalar_b -OpBranch %244 -%244 = OpLabel -%246 = OpPhi %bool %false %234 %245 %243 -OpSelectionMerge %248 None -OpBranchConditional %246 %247 %248 -%247 = OpLabel -%249 = OpFunctionCall %bool %test_fvec_b -OpBranch %248 -%248 = OpLabel -%250 = OpPhi %bool %false %244 %249 %247 -OpSelectionMerge %252 None -OpBranchConditional %250 %251 %252 -%251 = OpLabel -%253 = OpFunctionCall %bool %test_ivec_b -OpBranch %252 -%252 = OpLabel -%254 = OpPhi %bool %false %248 %253 %251 -OpSelectionMerge %256 None -OpBranchConditional %254 %255 %256 -%255 = OpLabel -%257 = OpFunctionCall %bool %test_mat2_b -OpBranch %256 -%256 = OpLabel -%258 = OpPhi %bool %false %252 %257 %255 -OpSelectionMerge %260 None -OpBranchConditional %258 %259 %260 -%259 = OpLabel -%261 = OpFunctionCall %bool %test_mat3_b -OpBranch %260 -%260 = OpLabel -%262 = OpPhi %bool %false %256 %261 %259 -OpSelectionMerge %264 None -OpBranchConditional %262 %263 %264 -%263 = OpLabel -%265 = OpFunctionCall %bool %test_mat4_b -OpBranch %264 -%264 = OpLabel -%266 = OpPhi %bool %false %260 %265 %263 -OpSelectionMerge %268 None -OpBranchConditional %266 %267 %268 -%267 = OpLabel -%269 = OpFunctionCall %bool %test_hmat2_b -OpBranch %268 -%268 = OpLabel -%270 = OpPhi %bool %false %264 %269 %267 -OpSelectionMerge %272 None -OpBranchConditional %270 %271 %272 -%271 = OpLabel -%273 = OpFunctionCall %bool %test_hmat3_b -OpBranch %272 -%272 = OpLabel -%274 = OpPhi %bool %false %268 %273 %271 -OpSelectionMerge %276 None -OpBranchConditional %274 %275 %276 -%275 = OpLabel -%277 = OpFunctionCall %bool %test_hmat4_b -OpBranch %276 -%276 = OpLabel -%278 = OpPhi %bool %false %272 %277 %275 -OpSelectionMerge %283 None -OpBranchConditional %278 %281 %282 -%281 = OpLabel -%284 = OpAccessChain %_ptr_Uniform_v4float %19 %int_1 -%286 = OpLoad %v4float %284 -OpStore %279 %286 -OpBranch %283 -%282 = OpLabel -%287 = OpAccessChain %_ptr_Uniform_v4float %19 %int_2 -%289 = OpLoad %v4float %287 -OpStore %279 %289 -OpBranch %283 -%283 = OpLabel -%290 = OpLoad %v4float %279 -OpReturnValue %290 -OpFunctionEnd + %207 = OpLabel + %negated_4 = OpVariable %_ptr_Function_mat4v4float Function + %x_7 = OpVariable %_ptr_Function_mat4v4float Function + OpStore %negated_4 %145 + %210 = OpAccessChain %_ptr_Uniform_mat4v4float %19 %int_5 + %211 = OpLoad %mat4v4float %210 + OpStore %x_7 %211 + %212 = OpCompositeExtract %v4float %211 0 + %213 = OpFNegate %v4float %212 + %214 = OpCompositeExtract %v4float %211 1 + %215 = OpFNegate %v4float %214 + %216 = OpCompositeExtract %v4float %211 2 + %217 = OpFNegate %v4float %216 + %218 = OpCompositeExtract %v4float %211 3 + %219 = OpFNegate %v4float %218 + %220 = OpCompositeConstruct %mat4v4float %213 %215 %217 %219 + OpStore %x_7 %220 + %221 = OpFOrdEqual %v4bool %213 %141 + %222 = OpAll %bool %221 + %223 = OpFOrdEqual %v4bool %215 %142 + %224 = OpAll %bool %223 + %225 = OpLogicalAnd %bool %222 %224 + %226 = OpFOrdEqual %v4bool %217 %143 + %227 = OpAll %bool %226 + %228 = OpLogicalAnd %bool %225 %227 + %229 = OpFOrdEqual %v4bool %219 %144 + %230 = OpAll %bool %229 + %231 = OpLogicalAnd %bool %228 %230 + OpReturnValue %231 + OpFunctionEnd + %main = OpFunction %v4float None %232 + %233 = OpFunctionParameter %_ptr_Function_v2float + %234 = OpLabel + %_0_x = OpVariable %_ptr_Function_float Function + %279 = OpVariable %_ptr_Function_v4float Function + %237 = OpAccessChain %_ptr_Uniform_v4float %19 %int_0 + %238 = OpLoad %v4float %237 + %239 = OpCompositeExtract %float %238 0 + OpStore %_0_x %239 + %240 = OpFNegate %float %239 + OpStore %_0_x %240 + %242 = OpFOrdEqual %bool %240 %float_n1 + OpSelectionMerge %244 None + OpBranchConditional %242 %243 %244 + %243 = OpLabel + %245 = OpFunctionCall %bool %test_iscalar_b + OpBranch %244 + %244 = OpLabel + %246 = OpPhi %bool %false %234 %245 %243 + OpSelectionMerge %248 None + OpBranchConditional %246 %247 %248 + %247 = OpLabel + %249 = OpFunctionCall %bool %test_fvec_b + OpBranch %248 + %248 = OpLabel + %250 = OpPhi %bool %false %244 %249 %247 + OpSelectionMerge %252 None + OpBranchConditional %250 %251 %252 + %251 = OpLabel + %253 = OpFunctionCall %bool %test_ivec_b + OpBranch %252 + %252 = OpLabel + %254 = OpPhi %bool %false %248 %253 %251 + OpSelectionMerge %256 None + OpBranchConditional %254 %255 %256 + %255 = OpLabel + %257 = OpFunctionCall %bool %test_mat2_b + OpBranch %256 + %256 = OpLabel + %258 = OpPhi %bool %false %252 %257 %255 + OpSelectionMerge %260 None + OpBranchConditional %258 %259 %260 + %259 = OpLabel + %261 = OpFunctionCall %bool %test_mat3_b + OpBranch %260 + %260 = OpLabel + %262 = OpPhi %bool %false %256 %261 %259 + OpSelectionMerge %264 None + OpBranchConditional %262 %263 %264 + %263 = OpLabel + %265 = OpFunctionCall %bool %test_mat4_b + OpBranch %264 + %264 = OpLabel + %266 = OpPhi %bool %false %260 %265 %263 + OpSelectionMerge %268 None + OpBranchConditional %266 %267 %268 + %267 = OpLabel + %269 = OpFunctionCall %bool %test_hmat2_b + OpBranch %268 + %268 = OpLabel + %270 = OpPhi %bool %false %264 %269 %267 + OpSelectionMerge %272 None + OpBranchConditional %270 %271 %272 + %271 = OpLabel + %273 = OpFunctionCall %bool %test_hmat3_b + OpBranch %272 + %272 = OpLabel + %274 = OpPhi %bool %false %268 %273 %271 + OpSelectionMerge %276 None + OpBranchConditional %274 %275 %276 + %275 = OpLabel + %277 = OpFunctionCall %bool %test_hmat4_b + OpBranch %276 + %276 = OpLabel + %278 = OpPhi %bool %false %272 %277 %275 + OpSelectionMerge %283 None + OpBranchConditional %278 %281 %282 + %281 = OpLabel + %284 = OpAccessChain %_ptr_Uniform_v4float %19 %int_1 + %286 = OpLoad %v4float %284 + OpStore %279 %286 + OpBranch %283 + %282 = OpLabel + %287 = OpAccessChain %_ptr_Uniform_v4float %19 %int_2 + %289 = OpLoad %v4float %287 + OpStore %279 %289 + OpBranch %283 + %283 = OpLabel + %290 = OpLoad %v4float %279 + OpReturnValue %290 + OpFunctionEnd diff --git a/tests/sksl/shared/UnaryPositiveNegative.skrp b/tests/sksl/shared/UnaryPositiveNegative.skrp index 06a96bd1ba72..3f583d1b7ba5 100644 --- a/tests/sksl/shared/UnaryPositiveNegative.skrp +++ b/tests/sksl/shared/UnaryPositiveNegative.skrp @@ -1,62 +1,35 @@ +203 instructions + [immutable slots] -negated(0) = 0xBF800000 (-1.0) -negated(1) = 0xC0000000 (-2.0) -negated(2) = 0xC0400000 (-3.0) -negated(3) = 0xC0800000 (-4.0) -negated₁(0) = 0xBF800000 (-1.0) -negated₁(1) = 0xC0000000 (-2.0) -negated₁(2) = 0xC0400000 (-3.0) -negated₁(3) = 0xC0800000 (-4.0) -negated₁(4) = 0xC0A00000 (-5.0) -negated₁(5) = 0xC0C00000 (-6.0) -negated₁(6) = 0xC0E00000 (-7.0) -negated₁(7) = 0xC1000000 (-8.0) -negated₁(8) = 0xC1100000 (-9.0) -negated₂(0) = 0xBF800000 (-1.0) -negated₂(1) = 0xC0000000 (-2.0) -negated₂(2) = 0xC0400000 (-3.0) -negated₂(3) = 0xC0800000 (-4.0) -negated₂(4) = 0xC0A00000 (-5.0) -negated₂(5) = 0xC0C00000 (-6.0) -negated₂(6) = 0xC0E00000 (-7.0) -negated₂(7) = 0xC1000000 (-8.0) -negated₂(8) = 0xC1100000 (-9.0) -negated₂(9) = 0xC1200000 (-10.0) -negated₂(10) = 0xC1300000 (-11.0) -negated₂(11) = 0xC1400000 (-12.0) -negated₂(12) = 0xC1500000 (-13.0) -negated₂(13) = 0xC1600000 (-14.0) -negated₂(14) = 0xC1700000 (-15.0) -negated₂(15) = 0xC1800000 (-16.0) -negated₃(0) = 0xBF800000 (-1.0) -negated₃(1) = 0xC0000000 (-2.0) -negated₃(2) = 0xC0400000 (-3.0) -negated₃(3) = 0xC0800000 (-4.0) -negated₄(0) = 0xBF800000 (-1.0) -negated₄(1) = 0xC0000000 (-2.0) -negated₄(2) = 0xC0400000 (-3.0) -negated₄(3) = 0xC0800000 (-4.0) -negated₄(4) = 0xC0A00000 (-5.0) -negated₄(5) = 0xC0C00000 (-6.0) -negated₄(6) = 0xC0E00000 (-7.0) -negated₄(7) = 0xC1000000 (-8.0) -negated₄(8) = 0xC1100000 (-9.0) -negated₅(0) = 0xBF800000 (-1.0) -negated₅(1) = 0xC0000000 (-2.0) -negated₅(2) = 0xC0400000 (-3.0) -negated₅(3) = 0xC0800000 (-4.0) -negated₅(4) = 0xC0A00000 (-5.0) -negated₅(5) = 0xC0C00000 (-6.0) -negated₅(6) = 0xC0E00000 (-7.0) -negated₅(7) = 0xC1000000 (-8.0) -negated₅(8) = 0xC1100000 (-9.0) -negated₅(9) = 0xC1200000 (-10.0) -negated₅(10) = 0xC1300000 (-11.0) -negated₅(11) = 0xC1400000 (-12.0) -negated₅(12) = 0xC1500000 (-13.0) -negated₅(13) = 0xC1600000 (-14.0) -negated₅(14) = 0xC1700000 (-15.0) -negated₅(15) = 0xC1800000 (-16.0) +i0 = 0xBF800000 (-1.0) +i1 = 0xC0000000 (-2.0) +i2 = 0xC0400000 (-3.0) +i3 = 0xC0800000 (-4.0) +i4 = 0xBF800000 (-1.0) +i5 = 0xC0000000 (-2.0) +i6 = 0xC0400000 (-3.0) +i7 = 0xC0800000 (-4.0) +i8 = 0xC0A00000 (-5.0) +i9 = 0xC0C00000 (-6.0) +i10 = 0xC0E00000 (-7.0) +i11 = 0xC1000000 (-8.0) +i12 = 0xC1100000 (-9.0) +i13 = 0xBF800000 (-1.0) +i14 = 0xC0000000 (-2.0) +i15 = 0xC0400000 (-3.0) +i16 = 0xC0800000 (-4.0) +i17 = 0xC0A00000 (-5.0) +i18 = 0xC0C00000 (-6.0) +i19 = 0xC0E00000 (-7.0) +i20 = 0xC1000000 (-8.0) +i21 = 0xC1100000 (-9.0) +i22 = 0xC1200000 (-10.0) +i23 = 0xC1300000 (-11.0) +i24 = 0xC1400000 (-12.0) +i25 = 0xC1500000 (-13.0) +i26 = 0xC1600000 (-14.0) +i27 = 0xC1700000 (-15.0) +i28 = 0xC1800000 (-16.0) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true @@ -126,7 +99,7 @@ copy_4_slots_unmasked $119..122 = x₃ splat_4_constants $123..126 = 0x80000000 (-0.0) bitwise_xor_4_ints $119..122 ^= $123..126 copy_4_slots_masked x₃ = Mask($119..122) -copy_4_slots_unmasked $123..126 = negated +copy_4_immutables_unmasked $123..126 = i0..3 [0xBF800000 (-1.0), 0xC0000000 (-2.0), 0xC0400000 (-3.0), 0xC0800000 (-4.0)] cmpeq_4_floats $119..122 = equal($119..122, $123..126) bitwise_and_2_ints $119..120 &= $121..122 bitwise_and_int $119 &= $120 @@ -150,9 +123,9 @@ bitwise_xor_n_ints $99..107 ^= $108..116 copy_4_slots_masked x₄(0..3) = Mask($99..102) copy_4_slots_masked x₄(4..7) = Mask($103..106) copy_slot_masked x₄(8) = Mask($107) -copy_4_slots_unmasked $108..111 = negated₁(0..3) -copy_4_slots_unmasked $112..115 = negated₁(4..7) -copy_slot_unmasked $116 = negated₁(8) +copy_4_immutables_unmasked $108..111 = i4..7 [0xBF800000 (-1.0), 0xC0000000 (-2.0), 0xC0400000 (-3.0), 0xC0800000 (-4.0)] +copy_4_immutables_unmasked $112..115 = i8..11 [0xC0A00000 (-5.0), 0xC0C00000 (-6.0), 0xC0E00000 (-7.0), 0xC1000000 (-8.0)] +copy_immutable_unmasked $116 = i12 [0xC1100000 (-9.0)] cmpeq_n_floats $99..107 = equal($99..107, $108..116) bitwise_and_4_ints $100..103 &= $104..107 bitwise_and_2_ints $100..101 &= $102..103 @@ -182,10 +155,10 @@ copy_4_slots_masked x₅(0..3) = Mask($65..68) copy_4_slots_masked x₅(4..7) = Mask($69..72) copy_4_slots_masked x₅(8..11) = Mask($73..76) copy_4_slots_masked x₅(12..15) = Mask($77..80) -copy_4_slots_unmasked $81..84 = negated₂(0..3) -copy_4_slots_unmasked $85..88 = negated₂(4..7) -copy_4_slots_unmasked $89..92 = negated₂(8..11) -copy_4_slots_unmasked $93..96 = negated₂(12..15) +copy_4_immutables_unmasked $81..84 = i13..16 [0xBF800000 (-1.0), 0xC0000000 (-2.0), 0xC0400000 (-3.0), 0xC0800000 (-4.0)] +copy_4_immutables_unmasked $85..88 = i17..20 [0xC0A00000 (-5.0), 0xC0C00000 (-6.0), 0xC0E00000 (-7.0), 0xC1000000 (-8.0)] +copy_4_immutables_unmasked $89..92 = i21..24 [0xC1100000 (-9.0), 0xC1200000 (-10.0), 0xC1300000 (-11.0), 0xC1400000 (-12.0)] +copy_4_immutables_unmasked $93..96 = i25..28 [0xC1500000 (-13.0), 0xC1600000 (-14.0), 0xC1700000 (-15.0), 0xC1800000 (-16.0)] cmpeq_n_floats $65..80 = equal($65..80, $81..96) bitwise_and_4_ints $73..76 &= $77..80 bitwise_and_4_ints $69..72 &= $73..76 @@ -204,7 +177,7 @@ copy_4_slots_unmasked $55..58 = x₆ splat_4_constants $59..62 = 0x80000000 (-0.0) bitwise_xor_4_ints $55..58 ^= $59..62 copy_4_slots_masked x₆ = Mask($55..58) -copy_4_slots_unmasked $59..62 = negated₃ +copy_4_immutables_unmasked $59..62 = i4..7 [0xBF800000 (-1.0), 0xC0000000 (-2.0), 0xC0400000 (-3.0), 0xC0800000 (-4.0)] cmpeq_4_floats $55..58 = equal($55..58, $59..62) bitwise_and_2_ints $55..56 &= $57..58 bitwise_and_int $55 &= $56 @@ -228,9 +201,9 @@ bitwise_xor_n_ints $35..43 ^= $44..52 copy_4_slots_masked x₇(0..3) = Mask($35..38) copy_4_slots_masked x₇(4..7) = Mask($39..42) copy_slot_masked x₇(8) = Mask($43) -copy_4_slots_unmasked $44..47 = negated₄(0..3) -copy_4_slots_unmasked $48..51 = negated₄(4..7) -copy_slot_unmasked $52 = negated₄(8) +copy_4_immutables_unmasked $44..47 = i13..16 [0xBF800000 (-1.0), 0xC0000000 (-2.0), 0xC0400000 (-3.0), 0xC0800000 (-4.0)] +copy_4_immutables_unmasked $48..51 = i17..20 [0xC0A00000 (-5.0), 0xC0C00000 (-6.0), 0xC0E00000 (-7.0), 0xC1000000 (-8.0)] +copy_immutable_unmasked $52 = i21 [0xC1100000 (-9.0)] cmpeq_n_floats $35..43 = equal($35..43, $44..52) bitwise_and_4_ints $36..39 &= $40..43 bitwise_and_2_ints $36..37 &= $38..39 @@ -260,10 +233,10 @@ copy_4_slots_masked x₈(0..3) = Mask($1..4) copy_4_slots_masked x₈(4..7) = Mask($5..8) copy_4_slots_masked x₈(8..11) = Mask($9..12) copy_4_slots_masked x₈(12..15) = Mask($13..16) -copy_4_slots_unmasked $17..20 = negated₅(0..3) -copy_4_slots_unmasked $21..24 = negated₅(4..7) -copy_4_slots_unmasked $25..28 = negated₅(8..11) -copy_4_slots_unmasked $29..32 = negated₅(12..15) +copy_4_immutables_unmasked $17..20 = i13..16 [0xBF800000 (-1.0), 0xC0000000 (-2.0), 0xC0400000 (-3.0), 0xC0800000 (-4.0)] +copy_4_immutables_unmasked $21..24 = i17..20 [0xC0A00000 (-5.0), 0xC0C00000 (-6.0), 0xC0E00000 (-7.0), 0xC1000000 (-8.0)] +copy_4_immutables_unmasked $25..28 = i21..24 [0xC1100000 (-9.0), 0xC1200000 (-10.0), 0xC1300000 (-11.0), 0xC1400000 (-12.0)] +copy_4_immutables_unmasked $29..32 = i25..28 [0xC1500000 (-13.0), 0xC1600000 (-14.0), 0xC1700000 (-15.0), 0xC1800000 (-16.0)] cmpeq_n_floats $1..16 = equal($1..16, $17..32) bitwise_and_4_ints $9..12 &= $13..16 bitwise_and_4_ints $5..8 &= $9..12 diff --git a/tests/sksl/shared/UnaryPositiveNegative.wgsl b/tests/sksl/shared/UnaryPositiveNegative.wgsl index de15f97bc0a3..66e2cd9c61d0 100644 --- a/tests/sksl/shared/UnaryPositiveNegative.wgsl +++ b/tests/sksl/shared/UnaryPositiveNegative.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, diff --git a/tests/sksl/shared/UniformArray.asm.frag b/tests/sksl/shared/UniformArray.asm.frag index a7f7377077c7..939dae8d6d35 100644 --- a/tests/sksl/shared/UniformArray.asm.frag +++ b/tests/sksl/shared/UniformArray.asm.frag @@ -1,104 +1,104 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testArray" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %index "index" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %_arr_float_int_5 ArrayStride 16 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 1 Offset 80 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 96 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %55 RelaxedPrecision -OpDecorate %59 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testArray" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %index "index" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %_arr_float_int_5 ArrayStride 16 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 1 Offset 80 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 96 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %55 RelaxedPrecision + OpDecorate %59 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%int = OpTypeInt 32 1 -%int_5 = OpConstant %int 5 + %int = OpTypeInt 32 1 + %int_5 = OpConstant %int 5 %_arr_float_int_5 = OpTypeArray %float %int_5 %_UniformBuffer = OpTypeStruct %_arr_float_int_5 %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%18 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%22 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %18 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %22 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%26 = OpTypeFunction %v4float %_ptr_Function_v2float + %26 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_int = OpTypePointer Function %int -%int_0 = OpConstant %int 0 + %int_0 = OpConstant %int 0 %_ptr_Uniform__arr_float_int_5 = OpTypePointer Uniform %_arr_float_int_5 %_ptr_Uniform_float = OpTypePointer Uniform %float -%int_1 = OpConstant %int 1 + %int_1 = OpConstant %int 1 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_2 = OpConstant %int 2 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %18 -%19 = OpLabel -%23 = OpVariable %_ptr_Function_v2float Function -OpStore %23 %22 -%25 = OpFunctionCall %v4float %main %23 -OpStore %sk_FragColor %25 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %26 -%27 = OpFunctionParameter %_ptr_Function_v2float -%28 = OpLabel -%index = OpVariable %_ptr_Function_int Function -OpStore %index %int_0 -OpBranch %32 -%32 = OpLabel -OpLoopMerge %36 %35 None -OpBranch %33 -%33 = OpLabel -%37 = OpLoad %int %index -%38 = OpSLessThan %bool %37 %int_5 -OpBranchConditional %38 %34 %36 -%34 = OpLabel -%39 = OpAccessChain %_ptr_Uniform__arr_float_int_5 %10 %int_0 -%41 = OpLoad %int %index -%42 = OpAccessChain %_ptr_Uniform_float %39 %41 -%44 = OpLoad %float %42 -%45 = OpLoad %int %index -%47 = OpIAdd %int %45 %int_1 -%48 = OpConvertSToF %float %47 -%49 = OpFUnordNotEqual %bool %44 %48 -OpSelectionMerge %51 None -OpBranchConditional %49 %50 %51 -%50 = OpLabel -%52 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%55 = OpLoad %v4float %52 -OpReturnValue %55 -%51 = OpLabel -OpBranch %35 -%35 = OpLabel -%56 = OpLoad %int %index -%57 = OpIAdd %int %56 %int_1 -OpStore %index %57 -OpBranch %32 -%36 = OpLabel -%58 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%59 = OpLoad %v4float %58 -OpReturnValue %59 -OpFunctionEnd + %19 = OpLabel + %23 = OpVariable %_ptr_Function_v2float Function + OpStore %23 %22 + %25 = OpFunctionCall %v4float %main %23 + OpStore %sk_FragColor %25 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %26 + %27 = OpFunctionParameter %_ptr_Function_v2float + %28 = OpLabel + %index = OpVariable %_ptr_Function_int Function + OpStore %index %int_0 + OpBranch %32 + %32 = OpLabel + OpLoopMerge %36 %35 None + OpBranch %33 + %33 = OpLabel + %37 = OpLoad %int %index + %38 = OpSLessThan %bool %37 %int_5 + OpBranchConditional %38 %34 %36 + %34 = OpLabel + %39 = OpAccessChain %_ptr_Uniform__arr_float_int_5 %10 %int_0 + %41 = OpLoad %int %index + %42 = OpAccessChain %_ptr_Uniform_float %39 %41 + %44 = OpLoad %float %42 + %45 = OpLoad %int %index + %47 = OpIAdd %int %45 %int_1 + %48 = OpConvertSToF %float %47 + %49 = OpFUnordNotEqual %bool %44 %48 + OpSelectionMerge %51 None + OpBranchConditional %49 %50 %51 + %50 = OpLabel + %52 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %55 = OpLoad %v4float %52 + OpReturnValue %55 + %51 = OpLabel + OpBranch %35 + %35 = OpLabel + %56 = OpLoad %int %index + %57 = OpIAdd %int %56 %int_1 + OpStore %index %57 + OpBranch %32 + %36 = OpLabel + %58 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %59 = OpLoad %v4float %58 + OpReturnValue %59 + OpFunctionEnd diff --git a/tests/sksl/shared/UniformArray.skrp b/tests/sksl/shared/UniformArray.skrp index 1679c7bc713b..c711bda49956 100644 --- a/tests/sksl/shared/UniformArray.skrp +++ b/tests/sksl/shared/UniformArray.skrp @@ -1,3 +1,5 @@ +30 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_constant index = 0 diff --git a/tests/sksl/shared/UniformArray.wgsl b/tests/sksl/shared/UniformArray.wgsl new file mode 100644 index 000000000000..11c6a10be664 --- /dev/null +++ b/tests/sksl/shared/UniformArray.wgsl @@ -0,0 +1,64 @@ +### Compilation failed: + +error: :10:14 error: uniform storage requires that array elements are aligned to 16 bytes, but array element of type 'f32' has a stride of 4 bytes. Consider using a vector or struct as the element type instead. + testArray: array, + ^^^^^^^^^^^^^ + +:9:1 note: see layout of struct: +/* align(16) size(64) */ struct _GlobalUniforms { +/* offset( 0) align( 4) size(20) */ testArray : array; +/* offset(20) align( 1) size(12) */ // -- implicit field alignment padding --; +/* offset(32) align(16) size(16) */ colorGreen : vec4; +/* offset(48) align(16) size(16) */ colorRed : vec4; +/* */ }; +struct _GlobalUniforms { +^^^^^^ + +:14:36 note: '_GlobalUniforms' used in address space 'uniform' here +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; + ^^^^^^^^^^^^^^^ + + +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + testArray: array, + colorGreen: vec4, + colorRed: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + { + var index: i32 = 0; + loop { + { + if _globalUniforms.testArray[index] != f32(index + 1) { + { + return _globalUniforms.colorRed; + } + } + } + continuing { + index = index + i32(1); + break if index >= 5; + } + } + } + return _globalUniforms.colorGreen; + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} + +1 error diff --git a/tests/sksl/shared/UniformBuffers.asm.frag b/tests/sksl/shared/UniformBuffers.asm.frag index 30fed9099a40..50bb1dce7824 100644 --- a/tests/sksl/shared/UniformBuffers.asm.frag +++ b/tests/sksl/shared/UniformBuffers.asm.frag @@ -1,67 +1,67 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %testBlock "testBlock" -OpMemberName %testBlock 0 "x" -OpMemberName %testBlock 1 "w" -OpMemberName %testBlock 2 "y" -OpMemberName %testBlock 3 "z" -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %main "main" -OpDecorate %_arr_float_int_2 ArrayStride 16 -OpMemberDecorate %testBlock 0 Offset 0 -OpMemberDecorate %testBlock 0 RelaxedPrecision -OpMemberDecorate %testBlock 1 Offset 4 -OpMemberDecorate %testBlock 2 Offset 16 -OpMemberDecorate %testBlock 2 RelaxedPrecision -OpMemberDecorate %testBlock 3 Offset 48 -OpMemberDecorate %testBlock 3 ColMajor -OpMemberDecorate %testBlock 3 MatrixStride 16 -OpMemberDecorate %testBlock 3 RelaxedPrecision -OpDecorate %testBlock Block -OpDecorate %3 Binding 0 -OpDecorate %3 DescriptorSet 0 -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %24 RelaxedPrecision -OpDecorate %26 RelaxedPrecision -OpDecorate %29 RelaxedPrecision -OpDecorate %31 RelaxedPrecision -%float = OpTypeFloat 32 -%int = OpTypeInt 32 1 -%int_2 = OpConstant %int 2 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %testBlock "testBlock" + OpMemberName %testBlock 0 "x" + OpMemberName %testBlock 1 "w" + OpMemberName %testBlock 2 "y" + OpMemberName %testBlock 3 "z" + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %main "main" + OpDecorate %_arr_float_int_2 ArrayStride 16 + OpMemberDecorate %testBlock 0 Offset 0 + OpMemberDecorate %testBlock 0 RelaxedPrecision + OpMemberDecorate %testBlock 1 Offset 4 + OpMemberDecorate %testBlock 2 Offset 16 + OpMemberDecorate %testBlock 2 RelaxedPrecision + OpMemberDecorate %testBlock 3 Offset 48 + OpMemberDecorate %testBlock 3 ColMajor + OpMemberDecorate %testBlock 3 MatrixStride 16 + OpMemberDecorate %testBlock 3 RelaxedPrecision + OpDecorate %testBlock Block + OpDecorate %3 Binding 0 + OpDecorate %3 DescriptorSet 0 + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %24 RelaxedPrecision + OpDecorate %26 RelaxedPrecision + OpDecorate %29 RelaxedPrecision + OpDecorate %31 RelaxedPrecision + %float = OpTypeFloat 32 + %int = OpTypeInt 32 1 + %int_2 = OpConstant %int 2 %_arr_float_int_2 = OpTypeArray %float %int_2 -%v3float = OpTypeVector %float 3 + %v3float = OpTypeVector %float 3 %mat3v3float = OpTypeMatrix %v3float 3 -%testBlock = OpTypeStruct %float %int %_arr_float_int_2 %mat3v3float + %testBlock = OpTypeStruct %float %int %_arr_float_int_2 %mat3v3float %_ptr_Uniform_testBlock = OpTypePointer Uniform %testBlock -%3 = OpVariable %_ptr_Uniform_testBlock Uniform -%bool = OpTypeBool + %3 = OpVariable %_ptr_Uniform_testBlock Uniform + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%v4float = OpTypeVector %float 4 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%19 = OpTypeFunction %void -%int_0 = OpConstant %int 0 + %void = OpTypeVoid + %19 = OpTypeFunction %void + %int_0 = OpConstant %int 0 %_ptr_Uniform_float = OpTypePointer Uniform %float -%int_1 = OpConstant %int 1 -%float_0 = OpConstant %float 0 -%main = OpFunction %void None %19 -%20 = OpLabel -%22 = OpAccessChain %_ptr_Uniform_float %3 %int_0 -%24 = OpLoad %float %22 -%25 = OpAccessChain %_ptr_Uniform_float %3 %int_2 %int_0 -%26 = OpLoad %float %25 -%28 = OpAccessChain %_ptr_Uniform_float %3 %int_2 %int_1 -%29 = OpLoad %float %28 -%31 = OpCompositeConstruct %v4float %24 %26 %29 %float_0 -OpStore %sk_FragColor %31 -OpReturn -OpFunctionEnd + %int_1 = OpConstant %int 1 + %float_0 = OpConstant %float 0 + %main = OpFunction %void None %19 + %20 = OpLabel + %22 = OpAccessChain %_ptr_Uniform_float %3 %int_0 + %24 = OpLoad %float %22 + %25 = OpAccessChain %_ptr_Uniform_float %3 %int_2 %int_0 + %26 = OpLoad %float %25 + %28 = OpAccessChain %_ptr_Uniform_float %3 %int_2 %int_1 + %29 = OpLoad %float %28 + %31 = OpCompositeConstruct %v4float %24 %26 %29 %float_0 + OpStore %sk_FragColor %31 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/UniformBuffers.wgsl b/tests/sksl/shared/UniformBuffers.wgsl new file mode 100644 index 000000000000..7f8ae6d6bc15 --- /dev/null +++ b/tests/sksl/shared/UniformBuffers.wgsl @@ -0,0 +1,56 @@ +### Compilation failed: + +error: :20:16 error: uniform storage requires that array elements are aligned to 16 bytes, but array element of type 'f32' has a stride of 4 bytes. Consider using a vector or struct as the element type instead. + @size(32) y: array, + ^^^^^^^^^^^^^ + +:17:1 note: see layout of struct: +/* align(16) size(96) */ struct testBlock { +/* offset( 0) align( 4) size( 4) */ x : f32; +/* offset( 4) align( 4) size(12) */ w : i32; +/* offset(16) align( 4) size(32) */ y : array; +/* offset(48) align(16) size(48) */ z : _skMatrix33; +/* */ }; +struct testBlock { +^^^^^^ + +:23:36 note: 'testBlock' used in address space 'uniform' here +@group(0) @binding(0) var _uniform0 : testBlock; + ^^^^^^^^^ + + +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _skRow3 { + @size(16) r : vec3 +}; +struct _skMatrix33 { + c : array<_skRow3, 3> +}; +fn _skMatrixUnpack33(m : _skMatrix33) -> mat3x3 { + return mat3x3(m.c[0].r, m.c[1].r, m.c[2].r); +} +struct testBlock { + @size(4) x: f32, + @size(12) w: i32, + @size(32) y: array, + z: _skMatrix33, +}; +@group(0) @binding(0) var _uniform0 : testBlock; +fn main(_stageOut: ptr) { + { + (*_stageOut).sk_FragColor = vec4(_uniform0.x, _uniform0.y[0], _uniform0.y[1], 0.0); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(&_stageOut); + return _stageOut; +} + +1 error diff --git a/tests/sksl/shared/UniformMatrixResize.asm.frag b/tests/sksl/shared/UniformMatrixResize.asm.frag index f8b60ba33347..5cdfe3dbcbb3 100644 --- a/tests/sksl/shared/UniformMatrixResize.asm.frag +++ b/tests/sksl/shared/UniformMatrixResize.asm.frag @@ -1,140 +1,140 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "testMatrix3x3" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "colorRed" -OpName %_entrypoint_v "_entrypoint_v" -OpName %resizeMatrix_f22 "resizeMatrix_f22" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 ColMajor -OpMemberDecorate %_UniformBuffer 0 MatrixStride 16 -OpMemberDecorate %_UniformBuffer 1 Offset 48 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 64 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %11 Binding 0 -OpDecorate %11 DescriptorSet 0 -OpDecorate %89 RelaxedPrecision -OpDecorate %92 RelaxedPrecision -OpDecorate %93 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "testMatrix3x3" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "colorRed" + OpName %_entrypoint_v "_entrypoint_v" + OpName %resizeMatrix_f22 "resizeMatrix_f22" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 ColMajor + OpMemberDecorate %_UniformBuffer 0 MatrixStride 16 + OpMemberDecorate %_UniformBuffer 1 Offset 48 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 64 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %11 Binding 0 + OpDecorate %11 DescriptorSet 0 + OpDecorate %89 RelaxedPrecision + OpDecorate %92 RelaxedPrecision + OpDecorate %93 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%v3float = OpTypeVector %float 3 + %v3float = OpTypeVector %float 3 %mat3v3float = OpTypeMatrix %v3float 3 %_UniformBuffer = OpTypeStruct %mat3v3float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%18 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%22 = OpConstantComposite %v2float %float_0 %float_0 + %11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %18 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %22 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float %mat2v2float = OpTypeMatrix %v2float 2 -%27 = OpTypeFunction %mat2v2float + %27 = OpTypeFunction %mat2v2float %_ptr_Uniform_mat3v3float = OpTypePointer Uniform %mat3v3float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%float_1 = OpConstant %float 1 -%40 = OpTypeFunction %v4float %_ptr_Function_v2float -%false = OpConstantFalse %bool -%float_2 = OpConstant %float 2 -%float_4 = OpConstant %float 4 -%float_5 = OpConstant %float 5 -%48 = OpConstantComposite %v2float %float_1 %float_2 -%49 = OpConstantComposite %v2float %float_4 %float_5 -%50 = OpConstantComposite %mat2v2float %48 %49 -%v2bool = OpTypeVector %bool 2 -%66 = OpConstantComposite %v3float %float_0 %float_0 %float_1 -%68 = OpConstantComposite %v3float %float_1 %float_2 %float_0 -%69 = OpConstantComposite %v3float %float_4 %float_5 %float_0 -%70 = OpConstantComposite %mat3v3float %68 %69 %66 -%v3bool = OpTypeVector %bool 3 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %float_1 = OpConstant %float 1 + %40 = OpTypeFunction %v4float %_ptr_Function_v2float + %false = OpConstantFalse %bool + %float_2 = OpConstant %float 2 + %float_4 = OpConstant %float 4 + %float_5 = OpConstant %float 5 + %48 = OpConstantComposite %v2float %float_1 %float_2 + %49 = OpConstantComposite %v2float %float_4 %float_5 + %50 = OpConstantComposite %mat2v2float %48 %49 + %v2bool = OpTypeVector %bool 2 + %66 = OpConstantComposite %v3float %float_0 %float_0 %float_1 + %68 = OpConstantComposite %v3float %float_1 %float_2 %float_0 + %69 = OpConstantComposite %v3float %float_4 %float_5 %float_0 + %70 = OpConstantComposite %mat3v3float %68 %69 %66 + %v3bool = OpTypeVector %bool 3 %_ptr_Function_v4float = OpTypePointer Function %v4float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 %_entrypoint_v = OpFunction %void None %18 -%19 = OpLabel -%23 = OpVariable %_ptr_Function_v2float Function -OpStore %23 %22 -%25 = OpFunctionCall %v4float %main %23 -OpStore %sk_FragColor %25 -OpReturn -OpFunctionEnd + %19 = OpLabel + %23 = OpVariable %_ptr_Function_v2float Function + OpStore %23 %22 + %25 = OpFunctionCall %v4float %main %23 + OpStore %sk_FragColor %25 + OpReturn + OpFunctionEnd %resizeMatrix_f22 = OpFunction %mat2v2float None %27 -%28 = OpLabel -%29 = OpAccessChain %_ptr_Uniform_mat3v3float %11 %int_0 -%33 = OpLoad %mat3v3float %29 -%35 = OpCompositeExtract %v3float %33 0 -%36 = OpVectorShuffle %v2float %35 %35 0 1 -%37 = OpCompositeExtract %v3float %33 1 -%38 = OpVectorShuffle %v2float %37 %37 0 1 -%39 = OpCompositeConstruct %mat2v2float %36 %38 -OpReturnValue %39 -OpFunctionEnd -%main = OpFunction %v4float None %40 -%41 = OpFunctionParameter %_ptr_Function_v2float -%42 = OpLabel -%81 = OpVariable %_ptr_Function_v4float Function -%44 = OpFunctionCall %mat2v2float %resizeMatrix_f22 -%52 = OpCompositeExtract %v2float %44 0 -%53 = OpFOrdEqual %v2bool %52 %48 -%54 = OpAll %bool %53 -%55 = OpCompositeExtract %v2float %44 1 -%56 = OpFOrdEqual %v2bool %55 %49 -%57 = OpAll %bool %56 -%58 = OpLogicalAnd %bool %54 %57 -OpSelectionMerge %60 None -OpBranchConditional %58 %59 %60 -%59 = OpLabel -%61 = OpFunctionCall %mat2v2float %resizeMatrix_f22 -%62 = OpCompositeExtract %v2float %61 0 -%63 = OpCompositeConstruct %v3float %62 %float_0 -%64 = OpCompositeExtract %v2float %61 1 -%65 = OpCompositeConstruct %v3float %64 %float_0 -%67 = OpCompositeConstruct %mat3v3float %63 %65 %66 -%72 = OpFOrdEqual %v3bool %63 %68 -%73 = OpAll %bool %72 -%74 = OpFOrdEqual %v3bool %65 %69 -%75 = OpAll %bool %74 -%76 = OpLogicalAnd %bool %73 %75 -%77 = OpFOrdEqual %v3bool %66 %66 -%78 = OpAll %bool %77 -%79 = OpLogicalAnd %bool %76 %78 -OpBranch %60 -%60 = OpLabel -%80 = OpPhi %bool %false %42 %79 %59 -OpSelectionMerge %85 None -OpBranchConditional %80 %83 %84 -%83 = OpLabel -%86 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 -%89 = OpLoad %v4float %86 -OpStore %81 %89 -OpBranch %85 -%84 = OpLabel -%90 = OpAccessChain %_ptr_Uniform_v4float %11 %int_2 -%92 = OpLoad %v4float %90 -OpStore %81 %92 -OpBranch %85 -%85 = OpLabel -%93 = OpLoad %v4float %81 -OpReturnValue %93 -OpFunctionEnd + %28 = OpLabel + %29 = OpAccessChain %_ptr_Uniform_mat3v3float %11 %int_0 + %33 = OpLoad %mat3v3float %29 + %35 = OpCompositeExtract %v3float %33 0 + %36 = OpVectorShuffle %v2float %35 %35 0 1 + %37 = OpCompositeExtract %v3float %33 1 + %38 = OpVectorShuffle %v2float %37 %37 0 1 + %39 = OpCompositeConstruct %mat2v2float %36 %38 + OpReturnValue %39 + OpFunctionEnd + %main = OpFunction %v4float None %40 + %41 = OpFunctionParameter %_ptr_Function_v2float + %42 = OpLabel + %81 = OpVariable %_ptr_Function_v4float Function + %44 = OpFunctionCall %mat2v2float %resizeMatrix_f22 + %52 = OpCompositeExtract %v2float %44 0 + %53 = OpFOrdEqual %v2bool %52 %48 + %54 = OpAll %bool %53 + %55 = OpCompositeExtract %v2float %44 1 + %56 = OpFOrdEqual %v2bool %55 %49 + %57 = OpAll %bool %56 + %58 = OpLogicalAnd %bool %54 %57 + OpSelectionMerge %60 None + OpBranchConditional %58 %59 %60 + %59 = OpLabel + %61 = OpFunctionCall %mat2v2float %resizeMatrix_f22 + %62 = OpCompositeExtract %v2float %61 0 + %63 = OpCompositeConstruct %v3float %62 %float_0 + %64 = OpCompositeExtract %v2float %61 1 + %65 = OpCompositeConstruct %v3float %64 %float_0 + %67 = OpCompositeConstruct %mat3v3float %63 %65 %66 + %72 = OpFOrdEqual %v3bool %63 %68 + %73 = OpAll %bool %72 + %74 = OpFOrdEqual %v3bool %65 %69 + %75 = OpAll %bool %74 + %76 = OpLogicalAnd %bool %73 %75 + %77 = OpFOrdEqual %v3bool %66 %66 + %78 = OpAll %bool %77 + %79 = OpLogicalAnd %bool %76 %78 + OpBranch %60 + %60 = OpLabel + %80 = OpPhi %bool %false %42 %79 %59 + OpSelectionMerge %85 None + OpBranchConditional %80 %83 %84 + %83 = OpLabel + %86 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 + %89 = OpLoad %v4float %86 + OpStore %81 %89 + OpBranch %85 + %84 = OpLabel + %90 = OpAccessChain %_ptr_Uniform_v4float %11 %int_2 + %92 = OpLoad %v4float %90 + OpStore %81 %92 + OpBranch %85 + %85 = OpLabel + %93 = OpLoad %v4float %81 + OpReturnValue %93 + OpFunctionEnd diff --git a/tests/sksl/shared/UniformMatrixResize.skrp b/tests/sksl/shared/UniformMatrixResize.skrp index a0c51796871e..f40963772cb1 100644 --- a/tests/sksl/shared/UniformMatrixResize.skrp +++ b/tests/sksl/shared/UniformMatrixResize.skrp @@ -1,3 +1,20 @@ +37 instructions + +[immutable slots] +i0 = 0x3F800000 (1.0) +i1 = 0x40000000 (2.0) +i2 = 0x40800000 (4.0) +i3 = 0x40A00000 (5.0) +i4 = 0x3F800000 (1.0) +i5 = 0x40000000 (2.0) +i6 = 0 +i7 = 0x40800000 (4.0) +i8 = 0x40A00000 (5.0) +i9 = 0 +i10 = 0 +i11 = 0 +i12 = 0x3F800000 (1.0) + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true store_condition_mask $19 = CondMask @@ -7,16 +24,13 @@ copy_4_uniforms $24..27 = testMatrix3x3(4..7) copy_uniform $28 = testMatrix3x3(8) shuffle $22..23 = ($22..23)[1 2] label label 0x00000002 -copy_constant $24 = 0x3F800000 (1.0) -copy_constant $25 = 0x40000000 (2.0) -copy_constant $26 = 0x40800000 (4.0) -copy_constant $27 = 0x40A00000 (5.0) +copy_4_immutables_unmasked $24..27 = i0..3 [0x3F800000 (1.0), 0x40000000 (2.0), 0x40800000 (4.0), 0x40A00000 (5.0)] cmpeq_4_floats $20..23 = equal($20..23, $24..27) bitwise_and_2_ints $20..21 &= $22..23 bitwise_and_int $20 &= $21 copy_constant $0 = 0 merge_condition_mask CondMask = $19 & $20 -branch_if_no_lanes_active branch_if_no_lanes_active +22 (label 1 at #41) +branch_if_no_lanes_active branch_if_no_lanes_active +18 (label 1 at #34) copy_4_uniforms $1..4 = testMatrix3x3(0..3) copy_4_uniforms $5..8 = testMatrix3x3(4..7) copy_uniform $9 = testMatrix3x3(8) @@ -25,13 +39,9 @@ label label 0x00000003 copy_constant $5 = 0 copy_constant $6 = 0x3F800000 (1.0) shuffle $3..9 = ($3..9)[2 0 1 2 2 2 3] -copy_constant $10 = 0x3F800000 (1.0) -copy_constant $11 = 0x40000000 (2.0) -copy_constant $12 = 0 -copy_constant $13 = 0x40800000 (4.0) -copy_constant $14 = 0x40A00000 (5.0) -splat_3_constants $15..17 = 0 -copy_constant $18 = 0x3F800000 (1.0) +copy_4_immutables_unmasked $10..13 = i4..7 [0x3F800000 (1.0), 0x40000000 (2.0), 0, 0x40800000 (4.0)] +copy_4_immutables_unmasked $14..17 = i8..11 [0x40A00000 (5.0), 0, 0, 0] +copy_immutable_unmasked $18 = i12 [0x3F800000 (1.0)] cmpeq_n_floats $1..9 = equal($1..9, $10..18) bitwise_and_4_ints $2..5 &= $6..9 bitwise_and_2_ints $2..3 &= $4..5 diff --git a/tests/sksl/shared/UniformMatrixResize.wgsl b/tests/sksl/shared/UniformMatrixResize.wgsl index 7bf50fc89a23..e07428ac3936 100644 --- a/tests/sksl/shared/UniformMatrixResize.wgsl +++ b/tests/sksl/shared/UniformMatrixResize.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, diff --git a/tests/sksl/shared/UnusedVariables.asm.frag b/tests/sksl/shared/UnusedVariables.asm.frag index 2e1770643d58..38762f1debe4 100644 --- a/tests/sksl/shared/UnusedVariables.asm.frag +++ b/tests/sksl/shared/UnusedVariables.asm.frag @@ -1,124 +1,124 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_entrypoint_v "_entrypoint_v" -OpName %userfunc_ff "userfunc_ff" -OpName %main "main" -OpName %b "b" -OpName %c "c" -OpName %x "x" -OpName %d "d" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %64 RelaxedPrecision -OpDecorate %66 RelaxedPrecision -OpDecorate %69 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %73 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_entrypoint_v "_entrypoint_v" + OpName %userfunc_ff "userfunc_ff" + OpName %main "main" + OpName %b "b" + OpName %c "c" + OpName %x "x" + OpName %d "d" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %64 RelaxedPrecision + OpDecorate %66 RelaxedPrecision + OpDecorate %69 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %73 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%13 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%17 = OpConstantComposite %v2float %float_0 %float_0 + %void = OpTypeVoid + %13 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %17 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float %_ptr_Function_float = OpTypePointer Function %float -%22 = OpTypeFunction %float %_ptr_Function_float -%float_1 = OpConstant %float 1 -%28 = OpTypeFunction %v4float %_ptr_Function_v2float -%float_2 = OpConstant %float 2 -%float_3 = OpConstant %float 3 -%float_77 = OpConstant %float 77 -%int = OpTypeInt 32 1 + %22 = OpTypeFunction %float %_ptr_Function_float + %float_1 = OpConstant %float 1 + %28 = OpTypeFunction %v4float %_ptr_Function_v2float + %float_2 = OpConstant %float 2 + %float_3 = OpConstant %float 3 + %float_77 = OpConstant %float 77 + %int = OpTypeInt 32 1 %_ptr_Function_int = OpTypePointer Function %int -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%true = OpConstantTrue %bool -%float_5 = OpConstant %float 5 -%float_4 = OpConstant %float 4 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %true = OpConstantTrue %bool + %float_5 = OpConstant %float 5 + %float_4 = OpConstant %float 4 %_entrypoint_v = OpFunction %void None %13 -%14 = OpLabel -%18 = OpVariable %_ptr_Function_v2float Function -OpStore %18 %17 -%20 = OpFunctionCall %v4float %main %18 -OpStore %sk_FragColor %20 -OpReturn -OpFunctionEnd + %14 = OpLabel + %18 = OpVariable %_ptr_Function_v2float Function + OpStore %18 %17 + %20 = OpFunctionCall %v4float %main %18 + OpStore %sk_FragColor %20 + OpReturn + OpFunctionEnd %userfunc_ff = OpFunction %float None %22 -%23 = OpFunctionParameter %_ptr_Function_float -%24 = OpLabel -%25 = OpLoad %float %23 -%27 = OpFAdd %float %25 %float_1 -OpReturnValue %27 -OpFunctionEnd -%main = OpFunction %v4float None %28 -%29 = OpFunctionParameter %_ptr_Function_v2float -%30 = OpLabel -%b = OpVariable %_ptr_Function_float Function -%c = OpVariable %_ptr_Function_float Function -%40 = OpVariable %_ptr_Function_float Function -%43 = OpVariable %_ptr_Function_float Function -%x = OpVariable %_ptr_Function_int Function -%d = OpVariable %_ptr_Function_float Function -OpStore %b %float_2 -OpStore %c %float_3 -OpStore %b %float_2 -%36 = OpFAdd %float %float_3 %float_77 -OpStore %b %36 -%38 = OpFAdd %float %float_3 %float_77 -%37 = OpExtInst %float %1 Sin %38 -OpStore %b %37 -%39 = OpFAdd %float %float_3 %float_77 -OpStore %40 %39 -%41 = OpFunctionCall %float %userfunc_ff %40 -%42 = OpFAdd %float %float_3 %float_77 -OpStore %43 %42 -%44 = OpFunctionCall %float %userfunc_ff %43 -OpStore %b %44 -%45 = OpExtInst %float %1 Cos %float_3 -OpStore %b %45 -OpStore %b %45 -OpStore %x %int_0 -OpBranch %50 -%50 = OpLabel -OpLoopMerge %54 %53 None -OpBranch %51 -%51 = OpLabel -%55 = OpLoad %int %x -%57 = OpSLessThan %bool %55 %int_1 -OpBranchConditional %57 %52 %54 -%52 = OpLabel -OpBranch %53 -%53 = OpLabel -%58 = OpLoad %int %x -%59 = OpIAdd %int %58 %int_1 -OpStore %x %59 -OpBranch %50 -%54 = OpLabel -%61 = OpLoad %float %c -OpStore %d %61 -OpStore %b %float_3 -%62 = OpFAdd %float %61 %float_1 -OpStore %d %62 -%63 = OpFOrdEqual %bool %float_3 %float_2 -%64 = OpSelect %float %63 %float_1 %float_0 -%66 = OpSelect %float %true %float_1 %float_0 -%68 = OpFOrdEqual %bool %62 %float_5 -%69 = OpSelect %float %68 %float_1 %float_0 -%71 = OpFOrdEqual %bool %62 %float_4 -%72 = OpSelect %float %71 %float_1 %float_0 -%73 = OpCompositeConstruct %v4float %64 %66 %69 %72 -OpReturnValue %73 -OpFunctionEnd + %23 = OpFunctionParameter %_ptr_Function_float + %24 = OpLabel + %25 = OpLoad %float %23 + %27 = OpFAdd %float %25 %float_1 + OpReturnValue %27 + OpFunctionEnd + %main = OpFunction %v4float None %28 + %29 = OpFunctionParameter %_ptr_Function_v2float + %30 = OpLabel + %b = OpVariable %_ptr_Function_float Function + %c = OpVariable %_ptr_Function_float Function + %40 = OpVariable %_ptr_Function_float Function + %43 = OpVariable %_ptr_Function_float Function + %x = OpVariable %_ptr_Function_int Function + %d = OpVariable %_ptr_Function_float Function + OpStore %b %float_2 + OpStore %c %float_3 + OpStore %b %float_2 + %36 = OpFAdd %float %float_3 %float_77 + OpStore %b %36 + %38 = OpFAdd %float %float_3 %float_77 + %37 = OpExtInst %float %1 Sin %38 + OpStore %b %37 + %39 = OpFAdd %float %float_3 %float_77 + OpStore %40 %39 + %41 = OpFunctionCall %float %userfunc_ff %40 + %42 = OpFAdd %float %float_3 %float_77 + OpStore %43 %42 + %44 = OpFunctionCall %float %userfunc_ff %43 + OpStore %b %44 + %45 = OpExtInst %float %1 Cos %float_3 + OpStore %b %45 + OpStore %b %45 + OpStore %x %int_0 + OpBranch %50 + %50 = OpLabel + OpLoopMerge %54 %53 None + OpBranch %51 + %51 = OpLabel + %55 = OpLoad %int %x + %57 = OpSLessThan %bool %55 %int_1 + OpBranchConditional %57 %52 %54 + %52 = OpLabel + OpBranch %53 + %53 = OpLabel + %58 = OpLoad %int %x + %59 = OpIAdd %int %58 %int_1 + OpStore %x %59 + OpBranch %50 + %54 = OpLabel + %61 = OpLoad %float %c + OpStore %d %61 + OpStore %b %float_3 + %62 = OpFAdd %float %61 %float_1 + OpStore %d %62 + %63 = OpFOrdEqual %bool %float_3 %float_2 + %64 = OpSelect %float %63 %float_1 %float_0 + %66 = OpSelect %float %true %float_1 %float_0 + %68 = OpFOrdEqual %bool %62 %float_5 + %69 = OpSelect %float %68 %float_1 %float_0 + %71 = OpFOrdEqual %bool %62 %float_4 + %72 = OpSelect %float %71 %float_1 %float_0 + %73 = OpCompositeConstruct %v4float %64 %66 %69 %72 + OpReturnValue %73 + OpFunctionEnd diff --git a/tests/sksl/shared/UnusedVariables.skrp b/tests/sksl/shared/UnusedVariables.skrp index 1e0feba50d3d..6485fa6d0ed8 100644 --- a/tests/sksl/shared/UnusedVariables.skrp +++ b/tests/sksl/shared/UnusedVariables.skrp @@ -1,29 +1,31 @@ +55 instructions + [immutable slots] -c = 0x40400000 (3.0) +i0 = 0x40400000 (3.0) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_constant b = 0x40000000 (2.0) copy_constant b = 0x40000000 (2.0) -copy_slot_unmasked $0 = c +copy_constant $0 = 0x40400000 (3.0) add_imm_float $0 += 0x429A0000 (77.0) copy_slot_unmasked b = $0 -copy_slot_unmasked $0 = c +copy_constant $0 = 0x40400000 (3.0) add_imm_float $0 += 0x429A0000 (77.0) sin_float $0 = sin($0) copy_slot_unmasked b = $0 -copy_slot_unmasked $0 = c +copy_constant $0 = 0x40400000 (3.0) add_imm_float $0 += 0x429A0000 (77.0) copy_slot_unmasked v = $0 add_imm_float $0 += 0x3F800000 (1.0) label label 0 -copy_slot_unmasked $0 = c +copy_constant $0 = 0x40400000 (3.0) add_imm_float $0 += 0x429A0000 (77.0) copy_slot_unmasked v = $0 add_imm_float $0 += 0x3F800000 (1.0) label label 0x00000001 copy_slot_unmasked b = $0 -copy_slot_unmasked $0 = c +copy_constant $0 = 0x40400000 (3.0) cos_float $0 = cos($0) copy_slot_unmasked b = $0 copy_slot_unmasked b = $0 @@ -45,7 +47,7 @@ stack_rewind branch_if_any_lanes_active branch_if_any_lanes_active -12 (label 4 at #30) label label 0x00000002 load_loop_mask LoopMask = $0 -copy_slot_unmasked d = c +copy_constant d = 0x40400000 (3.0) copy_constant b = 0x40400000 (3.0) add_imm_float d += 0x3F800000 (1.0) copy_slot_unmasked $0 = b diff --git a/tests/sksl/shared/UnusedVariables.wgsl b/tests/sksl/shared/UnusedVariables.wgsl index a821f4f60b70..72df2af0525e 100644 --- a/tests/sksl/shared/UnusedVariables.wgsl +++ b/tests/sksl/shared/UnusedVariables.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, diff --git a/tests/sksl/shared/VectorConstructors.asm.frag b/tests/sksl/shared/VectorConstructors.asm.frag index 5c4fea433b02..f7366ed446ba 100644 --- a/tests/sksl/shared/VectorConstructors.asm.frag +++ b/tests/sksl/shared/VectorConstructors.asm.frag @@ -1,325 +1,325 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpMemberName %_UniformBuffer 2 "unknownInput" -OpName %_entrypoint_v "_entrypoint_v" -OpName %check_bf2f2f2f3i2i2f2f2f4i2b4f2f2f2b2b2b3i4 "check_bf2f2f2f3i2i2f2f2f4i2b4f2f2f2b2b2b3i4" -OpName %main "main" -OpName %v1 "v1" -OpName %v2 "v2" -OpName %v3 "v3" -OpName %v4 "v4" -OpName %v5 "v5" -OpName %v6 "v6" -OpName %v7 "v7" -OpName %v8 "v8" -OpName %v9 "v9" -OpName %v10 "v10" -OpName %v11 "v11" -OpName %v12 "v12" -OpName %v13 "v13" -OpName %v14 "v14" -OpName %v15 "v15" -OpName %v16 "v16" -OpName %v17 "v17" -OpName %v18 "v18" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpDecorate %_UniformBuffer Block -OpDecorate %11 Binding 0 -OpDecorate %11 DescriptorSet 0 -OpDecorate %62 RelaxedPrecision -OpDecorate %65 RelaxedPrecision -OpDecorate %68 RelaxedPrecision -OpDecorate %71 RelaxedPrecision -OpDecorate %72 RelaxedPrecision -OpDecorate %75 RelaxedPrecision -OpDecorate %76 RelaxedPrecision -OpDecorate %79 RelaxedPrecision -OpDecorate %82 RelaxedPrecision -OpDecorate %85 RelaxedPrecision -OpDecorate %88 RelaxedPrecision -OpDecorate %89 RelaxedPrecision -OpDecorate %90 RelaxedPrecision -OpDecorate %92 RelaxedPrecision -OpDecorate %94 RelaxedPrecision -OpDecorate %97 RelaxedPrecision -OpDecorate %100 RelaxedPrecision -OpDecorate %103 RelaxedPrecision -OpDecorate %104 RelaxedPrecision -OpDecorate %106 RelaxedPrecision -OpDecorate %107 RelaxedPrecision -OpDecorate %108 RelaxedPrecision -OpDecorate %110 RelaxedPrecision -OpDecorate %111 RelaxedPrecision -OpDecorate %112 RelaxedPrecision -OpDecorate %114 RelaxedPrecision -OpDecorate %115 RelaxedPrecision -OpDecorate %118 RelaxedPrecision -OpDecorate %119 RelaxedPrecision -OpDecorate %197 RelaxedPrecision -OpDecorate %199 RelaxedPrecision -OpDecorate %200 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpMemberName %_UniformBuffer 2 "unknownInput" + OpName %_entrypoint_v "_entrypoint_v" + OpName %check_bf2f2f2f3i2i2f2f2f4i2b4f2f2f2b2b2b3i4 "check_bf2f2f2f3i2i2f2f2f4i2b4f2f2f2b2b2b3i4" + OpName %main "main" + OpName %v1 "v1" + OpName %v2 "v2" + OpName %v3 "v3" + OpName %v4 "v4" + OpName %v5 "v5" + OpName %v6 "v6" + OpName %v7 "v7" + OpName %v8 "v8" + OpName %v9 "v9" + OpName %v10 "v10" + OpName %v11 "v11" + OpName %v12 "v12" + OpName %v13 "v13" + OpName %v14 "v14" + OpName %v15 "v15" + OpName %v16 "v16" + OpName %v17 "v17" + OpName %v18 "v18" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpDecorate %_UniformBuffer Block + OpDecorate %11 Binding 0 + OpDecorate %11 DescriptorSet 0 + OpDecorate %62 RelaxedPrecision + OpDecorate %65 RelaxedPrecision + OpDecorate %68 RelaxedPrecision + OpDecorate %71 RelaxedPrecision + OpDecorate %72 RelaxedPrecision + OpDecorate %75 RelaxedPrecision + OpDecorate %76 RelaxedPrecision + OpDecorate %79 RelaxedPrecision + OpDecorate %82 RelaxedPrecision + OpDecorate %85 RelaxedPrecision + OpDecorate %88 RelaxedPrecision + OpDecorate %89 RelaxedPrecision + OpDecorate %90 RelaxedPrecision + OpDecorate %92 RelaxedPrecision + OpDecorate %94 RelaxedPrecision + OpDecorate %97 RelaxedPrecision + OpDecorate %100 RelaxedPrecision + OpDecorate %103 RelaxedPrecision + OpDecorate %104 RelaxedPrecision + OpDecorate %106 RelaxedPrecision + OpDecorate %107 RelaxedPrecision + OpDecorate %108 RelaxedPrecision + OpDecorate %110 RelaxedPrecision + OpDecorate %111 RelaxedPrecision + OpDecorate %112 RelaxedPrecision + OpDecorate %114 RelaxedPrecision + OpDecorate %115 RelaxedPrecision + OpDecorate %118 RelaxedPrecision + OpDecorate %119 RelaxedPrecision + OpDecorate %197 RelaxedPrecision + OpDecorate %199 RelaxedPrecision + OpDecorate %200 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%16 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%20 = OpConstantComposite %v2float %float_0 %float_0 + %11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %16 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %20 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%v3float = OpTypeVector %float 3 + %v3float = OpTypeVector %float 3 %_ptr_Function_v3float = OpTypePointer Function %v3float -%int = OpTypeInt 32 1 -%v2int = OpTypeVector %int 2 + %int = OpTypeInt 32 1 + %v2int = OpTypeVector %int 2 %_ptr_Function_v2int = OpTypePointer Function %v2int %_ptr_Function_v4float = OpTypePointer Function %v4float -%v4bool = OpTypeVector %bool 4 + %v4bool = OpTypeVector %bool 4 %_ptr_Function_v4bool = OpTypePointer Function %v4bool -%v2bool = OpTypeVector %bool 2 + %v2bool = OpTypeVector %bool 2 %_ptr_Function_v2bool = OpTypePointer Function %v2bool -%v3bool = OpTypeVector %bool 3 + %v3bool = OpTypeVector %bool 3 %_ptr_Function_v3bool = OpTypePointer Function %v3bool -%v4int = OpTypeVector %int 4 + %v4int = OpTypeVector %int 4 %_ptr_Function_v4int = OpTypePointer Function %v4int -%38 = OpTypeFunction %bool %_ptr_Function_v2float %_ptr_Function_v2float %_ptr_Function_v2float %_ptr_Function_v3float %_ptr_Function_v2int %_ptr_Function_v2int %_ptr_Function_v2float %_ptr_Function_v2float %_ptr_Function_v4float %_ptr_Function_v2int %_ptr_Function_v4bool %_ptr_Function_v2float %_ptr_Function_v2float %_ptr_Function_v2float %_ptr_Function_v2bool %_ptr_Function_v2bool %_ptr_Function_v3bool %_ptr_Function_v4int -%float_1 = OpConstant %float 1 -%float_18 = OpConstant %float 18 -%122 = OpTypeFunction %v4float %_ptr_Function_v2float -%126 = OpConstantComposite %v2float %float_1 %float_1 -%float_2 = OpConstant %float 2 -%129 = OpConstantComposite %v2float %float_1 %float_2 -%132 = OpConstantComposite %v3float %float_1 %float_1 %float_1 -%int_1 = OpConstant %int 1 -%135 = OpConstantComposite %v2int %int_1 %int_1 -%int_2 = OpConstant %int 2 -%138 = OpConstantComposite %v2int %int_1 %int_2 + %38 = OpTypeFunction %bool %_ptr_Function_v2float %_ptr_Function_v2float %_ptr_Function_v2float %_ptr_Function_v3float %_ptr_Function_v2int %_ptr_Function_v2int %_ptr_Function_v2float %_ptr_Function_v2float %_ptr_Function_v4float %_ptr_Function_v2int %_ptr_Function_v4bool %_ptr_Function_v2float %_ptr_Function_v2float %_ptr_Function_v2float %_ptr_Function_v2bool %_ptr_Function_v2bool %_ptr_Function_v3bool %_ptr_Function_v4int + %float_1 = OpConstant %float 1 + %float_18 = OpConstant %float 18 + %122 = OpTypeFunction %v4float %_ptr_Function_v2float + %126 = OpConstantComposite %v2float %float_1 %float_1 + %float_2 = OpConstant %float 2 + %129 = OpConstantComposite %v2float %float_1 %float_2 + %132 = OpConstantComposite %v3float %float_1 %float_1 %float_1 + %int_1 = OpConstant %int 1 + %135 = OpConstantComposite %v2int %int_1 %int_1 + %int_2 = OpConstant %int 2 + %138 = OpConstantComposite %v2int %int_1 %int_2 %_ptr_Uniform_float = OpTypePointer Uniform %float -%float_3 = OpConstant %float 3 -%float_4 = OpConstant %float 4 -%int_3 = OpConstant %int 3 -%true = OpConstantTrue %bool -%false = OpConstantFalse %bool -%159 = OpConstantComposite %v4bool %true %false %true %false -%161 = OpConstantComposite %v2float %float_1 %float_0 -%165 = OpConstantComposite %v2bool %true %true -%168 = OpConstantComposite %v3bool %true %true %true -%170 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %float_3 = OpConstant %float 3 + %float_4 = OpConstant %float 4 + %int_3 = OpConstant %int 3 + %true = OpConstantTrue %bool + %false = OpConstantFalse %bool + %159 = OpConstantComposite %v4bool %true %false %true %false + %161 = OpConstantComposite %v2float %float_1 %float_0 + %165 = OpConstantComposite %v2bool %true %true + %168 = OpConstantComposite %v3bool %true %true %true + %170 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_0 = OpConstant %int 0 + %int_0 = OpConstant %int 0 %_entrypoint_v = OpFunction %void None %16 -%17 = OpLabel -%21 = OpVariable %_ptr_Function_v2float Function -OpStore %21 %20 -%23 = OpFunctionCall %v4float %main %21 -OpStore %sk_FragColor %23 -OpReturn -OpFunctionEnd + %17 = OpLabel + %21 = OpVariable %_ptr_Function_v2float Function + OpStore %21 %20 + %23 = OpFunctionCall %v4float %main %21 + OpStore %sk_FragColor %23 + OpReturn + OpFunctionEnd %check_bf2f2f2f3i2i2f2f2f4i2b4f2f2f2b2b2b3i4 = OpFunction %bool None %38 -%39 = OpFunctionParameter %_ptr_Function_v2float -%40 = OpFunctionParameter %_ptr_Function_v2float -%41 = OpFunctionParameter %_ptr_Function_v2float -%42 = OpFunctionParameter %_ptr_Function_v3float -%43 = OpFunctionParameter %_ptr_Function_v2int -%44 = OpFunctionParameter %_ptr_Function_v2int -%45 = OpFunctionParameter %_ptr_Function_v2float -%46 = OpFunctionParameter %_ptr_Function_v2float -%47 = OpFunctionParameter %_ptr_Function_v4float -%48 = OpFunctionParameter %_ptr_Function_v2int -%49 = OpFunctionParameter %_ptr_Function_v4bool -%50 = OpFunctionParameter %_ptr_Function_v2float -%51 = OpFunctionParameter %_ptr_Function_v2float -%52 = OpFunctionParameter %_ptr_Function_v2float -%53 = OpFunctionParameter %_ptr_Function_v2bool -%54 = OpFunctionParameter %_ptr_Function_v2bool -%55 = OpFunctionParameter %_ptr_Function_v3bool -%56 = OpFunctionParameter %_ptr_Function_v4int -%57 = OpLabel -%58 = OpLoad %v2float %39 -%59 = OpCompositeExtract %float %58 0 -%60 = OpLoad %v2float %40 -%61 = OpCompositeExtract %float %60 0 -%62 = OpFAdd %float %59 %61 -%63 = OpLoad %v2float %41 -%64 = OpCompositeExtract %float %63 0 -%65 = OpFAdd %float %62 %64 -%66 = OpLoad %v3float %42 -%67 = OpCompositeExtract %float %66 0 -%68 = OpFAdd %float %65 %67 -%69 = OpLoad %v2int %43 -%70 = OpCompositeExtract %int %69 0 -%71 = OpConvertSToF %float %70 -%72 = OpFAdd %float %68 %71 -%73 = OpLoad %v2int %44 -%74 = OpCompositeExtract %int %73 0 -%75 = OpConvertSToF %float %74 -%76 = OpFAdd %float %72 %75 -%77 = OpLoad %v2float %45 -%78 = OpCompositeExtract %float %77 0 -%79 = OpFAdd %float %76 %78 -%80 = OpLoad %v2float %46 -%81 = OpCompositeExtract %float %80 0 -%82 = OpFAdd %float %79 %81 -%83 = OpLoad %v4float %47 -%84 = OpCompositeExtract %float %83 0 -%85 = OpFAdd %float %82 %84 -%86 = OpLoad %v2int %48 -%87 = OpCompositeExtract %int %86 0 -%88 = OpConvertSToF %float %87 -%89 = OpFAdd %float %85 %88 -%90 = OpLoad %v4bool %49 -%91 = OpCompositeExtract %bool %90 0 -%92 = OpSelect %float %91 %float_1 %float_0 -%94 = OpFAdd %float %89 %92 -%95 = OpLoad %v2float %50 -%96 = OpCompositeExtract %float %95 0 -%97 = OpFAdd %float %94 %96 -%98 = OpLoad %v2float %51 -%99 = OpCompositeExtract %float %98 0 -%100 = OpFAdd %float %97 %99 -%101 = OpLoad %v2float %52 -%102 = OpCompositeExtract %float %101 0 -%103 = OpFAdd %float %100 %102 -%104 = OpLoad %v2bool %53 -%105 = OpCompositeExtract %bool %104 0 -%106 = OpSelect %float %105 %float_1 %float_0 -%107 = OpFAdd %float %103 %106 -%108 = OpLoad %v2bool %54 -%109 = OpCompositeExtract %bool %108 0 -%110 = OpSelect %float %109 %float_1 %float_0 -%111 = OpFAdd %float %107 %110 -%112 = OpLoad %v3bool %55 -%113 = OpCompositeExtract %bool %112 0 -%114 = OpSelect %float %113 %float_1 %float_0 -%115 = OpFAdd %float %111 %114 -%116 = OpLoad %v4int %56 -%117 = OpCompositeExtract %int %116 0 -%118 = OpConvertSToF %float %117 -%119 = OpFAdd %float %115 %118 -%121 = OpFOrdEqual %bool %119 %float_18 -OpReturnValue %121 -OpFunctionEnd -%main = OpFunction %v4float None %122 -%123 = OpFunctionParameter %_ptr_Function_v2float -%124 = OpLabel -%v1 = OpVariable %_ptr_Function_v2float Function -%v2 = OpVariable %_ptr_Function_v2float Function -%v3 = OpVariable %_ptr_Function_v2float Function -%v4 = OpVariable %_ptr_Function_v3float Function -%v5 = OpVariable %_ptr_Function_v2int Function -%v6 = OpVariable %_ptr_Function_v2int Function -%v7 = OpVariable %_ptr_Function_v2float Function -%v8 = OpVariable %_ptr_Function_v2float Function -%v9 = OpVariable %_ptr_Function_v4float Function -%v10 = OpVariable %_ptr_Function_v2int Function -%v11 = OpVariable %_ptr_Function_v4bool Function -%v12 = OpVariable %_ptr_Function_v2float Function -%v13 = OpVariable %_ptr_Function_v2float Function -%v14 = OpVariable %_ptr_Function_v2float Function -%v15 = OpVariable %_ptr_Function_v2bool Function -%v16 = OpVariable %_ptr_Function_v2bool Function -%v17 = OpVariable %_ptr_Function_v3bool Function -%v18 = OpVariable %_ptr_Function_v4int Function -%171 = OpVariable %_ptr_Function_v2float Function -%172 = OpVariable %_ptr_Function_v2float Function -%173 = OpVariable %_ptr_Function_v2float Function -%174 = OpVariable %_ptr_Function_v3float Function -%175 = OpVariable %_ptr_Function_v2int Function -%176 = OpVariable %_ptr_Function_v2int Function -%177 = OpVariable %_ptr_Function_v2float Function -%178 = OpVariable %_ptr_Function_v2float Function -%179 = OpVariable %_ptr_Function_v4float Function -%180 = OpVariable %_ptr_Function_v2int Function -%181 = OpVariable %_ptr_Function_v4bool Function -%182 = OpVariable %_ptr_Function_v2float Function -%183 = OpVariable %_ptr_Function_v2float Function -%184 = OpVariable %_ptr_Function_v2float Function -%185 = OpVariable %_ptr_Function_v2bool Function -%186 = OpVariable %_ptr_Function_v2bool Function -%187 = OpVariable %_ptr_Function_v3bool Function -%188 = OpVariable %_ptr_Function_v4int Function -%190 = OpVariable %_ptr_Function_v4float Function -OpStore %v1 %126 -OpStore %v2 %129 -OpStore %v3 %126 -OpStore %v4 %132 -OpStore %v5 %135 -OpStore %v6 %138 -OpStore %v7 %129 -%141 = OpConvertSToF %float %int_1 -%142 = OpConvertSToF %float %int_1 -%143 = OpCompositeConstruct %v2float %141 %142 -OpStore %v8 %143 -%145 = OpConvertSToF %float %int_1 -%146 = OpAccessChain %_ptr_Uniform_float %11 %int_2 -%148 = OpLoad %float %146 -%151 = OpCompositeConstruct %v4float %145 %148 %float_3 %float_4 -OpStore %v9 %151 -%154 = OpConvertFToS %int %float_1 -%155 = OpCompositeConstruct %v2int %int_3 %154 -OpStore %v10 %155 -OpStore %v11 %159 -OpStore %v12 %161 -OpStore %v13 %20 -OpStore %v14 %20 -OpStore %v15 %165 -OpStore %v16 %165 -OpStore %v17 %168 -OpStore %v18 %170 -OpStore %171 %126 -OpStore %172 %129 -OpStore %173 %126 -OpStore %174 %132 -OpStore %175 %135 -OpStore %176 %138 -OpStore %177 %129 -OpStore %178 %143 -OpStore %179 %151 -OpStore %180 %155 -OpStore %181 %159 -OpStore %182 %161 -OpStore %183 %20 -OpStore %184 %20 -OpStore %185 %165 -OpStore %186 %165 -OpStore %187 %168 -OpStore %188 %170 -%189 = OpFunctionCall %bool %check_bf2f2f2f3i2i2f2f2f4i2b4f2f2f2b2b2b3i4 %171 %172 %173 %174 %175 %176 %177 %178 %179 %180 %181 %182 %183 %184 %185 %186 %187 %188 -OpSelectionMerge %193 None -OpBranchConditional %189 %191 %192 -%191 = OpLabel -%194 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 -%197 = OpLoad %v4float %194 -OpStore %190 %197 -OpBranch %193 -%192 = OpLabel -%198 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 -%199 = OpLoad %v4float %198 -OpStore %190 %199 -OpBranch %193 -%193 = OpLabel -%200 = OpLoad %v4float %190 -OpReturnValue %200 -OpFunctionEnd + %39 = OpFunctionParameter %_ptr_Function_v2float + %40 = OpFunctionParameter %_ptr_Function_v2float + %41 = OpFunctionParameter %_ptr_Function_v2float + %42 = OpFunctionParameter %_ptr_Function_v3float + %43 = OpFunctionParameter %_ptr_Function_v2int + %44 = OpFunctionParameter %_ptr_Function_v2int + %45 = OpFunctionParameter %_ptr_Function_v2float + %46 = OpFunctionParameter %_ptr_Function_v2float + %47 = OpFunctionParameter %_ptr_Function_v4float + %48 = OpFunctionParameter %_ptr_Function_v2int + %49 = OpFunctionParameter %_ptr_Function_v4bool + %50 = OpFunctionParameter %_ptr_Function_v2float + %51 = OpFunctionParameter %_ptr_Function_v2float + %52 = OpFunctionParameter %_ptr_Function_v2float + %53 = OpFunctionParameter %_ptr_Function_v2bool + %54 = OpFunctionParameter %_ptr_Function_v2bool + %55 = OpFunctionParameter %_ptr_Function_v3bool + %56 = OpFunctionParameter %_ptr_Function_v4int + %57 = OpLabel + %58 = OpLoad %v2float %39 + %59 = OpCompositeExtract %float %58 0 + %60 = OpLoad %v2float %40 + %61 = OpCompositeExtract %float %60 0 + %62 = OpFAdd %float %59 %61 + %63 = OpLoad %v2float %41 + %64 = OpCompositeExtract %float %63 0 + %65 = OpFAdd %float %62 %64 + %66 = OpLoad %v3float %42 + %67 = OpCompositeExtract %float %66 0 + %68 = OpFAdd %float %65 %67 + %69 = OpLoad %v2int %43 + %70 = OpCompositeExtract %int %69 0 + %71 = OpConvertSToF %float %70 + %72 = OpFAdd %float %68 %71 + %73 = OpLoad %v2int %44 + %74 = OpCompositeExtract %int %73 0 + %75 = OpConvertSToF %float %74 + %76 = OpFAdd %float %72 %75 + %77 = OpLoad %v2float %45 + %78 = OpCompositeExtract %float %77 0 + %79 = OpFAdd %float %76 %78 + %80 = OpLoad %v2float %46 + %81 = OpCompositeExtract %float %80 0 + %82 = OpFAdd %float %79 %81 + %83 = OpLoad %v4float %47 + %84 = OpCompositeExtract %float %83 0 + %85 = OpFAdd %float %82 %84 + %86 = OpLoad %v2int %48 + %87 = OpCompositeExtract %int %86 0 + %88 = OpConvertSToF %float %87 + %89 = OpFAdd %float %85 %88 + %90 = OpLoad %v4bool %49 + %91 = OpCompositeExtract %bool %90 0 + %92 = OpSelect %float %91 %float_1 %float_0 + %94 = OpFAdd %float %89 %92 + %95 = OpLoad %v2float %50 + %96 = OpCompositeExtract %float %95 0 + %97 = OpFAdd %float %94 %96 + %98 = OpLoad %v2float %51 + %99 = OpCompositeExtract %float %98 0 + %100 = OpFAdd %float %97 %99 + %101 = OpLoad %v2float %52 + %102 = OpCompositeExtract %float %101 0 + %103 = OpFAdd %float %100 %102 + %104 = OpLoad %v2bool %53 + %105 = OpCompositeExtract %bool %104 0 + %106 = OpSelect %float %105 %float_1 %float_0 + %107 = OpFAdd %float %103 %106 + %108 = OpLoad %v2bool %54 + %109 = OpCompositeExtract %bool %108 0 + %110 = OpSelect %float %109 %float_1 %float_0 + %111 = OpFAdd %float %107 %110 + %112 = OpLoad %v3bool %55 + %113 = OpCompositeExtract %bool %112 0 + %114 = OpSelect %float %113 %float_1 %float_0 + %115 = OpFAdd %float %111 %114 + %116 = OpLoad %v4int %56 + %117 = OpCompositeExtract %int %116 0 + %118 = OpConvertSToF %float %117 + %119 = OpFAdd %float %115 %118 + %121 = OpFOrdEqual %bool %119 %float_18 + OpReturnValue %121 + OpFunctionEnd + %main = OpFunction %v4float None %122 + %123 = OpFunctionParameter %_ptr_Function_v2float + %124 = OpLabel + %v1 = OpVariable %_ptr_Function_v2float Function + %v2 = OpVariable %_ptr_Function_v2float Function + %v3 = OpVariable %_ptr_Function_v2float Function + %v4 = OpVariable %_ptr_Function_v3float Function + %v5 = OpVariable %_ptr_Function_v2int Function + %v6 = OpVariable %_ptr_Function_v2int Function + %v7 = OpVariable %_ptr_Function_v2float Function + %v8 = OpVariable %_ptr_Function_v2float Function + %v9 = OpVariable %_ptr_Function_v4float Function + %v10 = OpVariable %_ptr_Function_v2int Function + %v11 = OpVariable %_ptr_Function_v4bool Function + %v12 = OpVariable %_ptr_Function_v2float Function + %v13 = OpVariable %_ptr_Function_v2float Function + %v14 = OpVariable %_ptr_Function_v2float Function + %v15 = OpVariable %_ptr_Function_v2bool Function + %v16 = OpVariable %_ptr_Function_v2bool Function + %v17 = OpVariable %_ptr_Function_v3bool Function + %v18 = OpVariable %_ptr_Function_v4int Function + %171 = OpVariable %_ptr_Function_v2float Function + %172 = OpVariable %_ptr_Function_v2float Function + %173 = OpVariable %_ptr_Function_v2float Function + %174 = OpVariable %_ptr_Function_v3float Function + %175 = OpVariable %_ptr_Function_v2int Function + %176 = OpVariable %_ptr_Function_v2int Function + %177 = OpVariable %_ptr_Function_v2float Function + %178 = OpVariable %_ptr_Function_v2float Function + %179 = OpVariable %_ptr_Function_v4float Function + %180 = OpVariable %_ptr_Function_v2int Function + %181 = OpVariable %_ptr_Function_v4bool Function + %182 = OpVariable %_ptr_Function_v2float Function + %183 = OpVariable %_ptr_Function_v2float Function + %184 = OpVariable %_ptr_Function_v2float Function + %185 = OpVariable %_ptr_Function_v2bool Function + %186 = OpVariable %_ptr_Function_v2bool Function + %187 = OpVariable %_ptr_Function_v3bool Function + %188 = OpVariable %_ptr_Function_v4int Function + %190 = OpVariable %_ptr_Function_v4float Function + OpStore %v1 %126 + OpStore %v2 %129 + OpStore %v3 %126 + OpStore %v4 %132 + OpStore %v5 %135 + OpStore %v6 %138 + OpStore %v7 %129 + %141 = OpConvertSToF %float %int_1 + %142 = OpConvertSToF %float %int_1 + %143 = OpCompositeConstruct %v2float %141 %142 + OpStore %v8 %143 + %145 = OpConvertSToF %float %int_1 + %146 = OpAccessChain %_ptr_Uniform_float %11 %int_2 + %148 = OpLoad %float %146 + %151 = OpCompositeConstruct %v4float %145 %148 %float_3 %float_4 + OpStore %v9 %151 + %154 = OpConvertFToS %int %float_1 + %155 = OpCompositeConstruct %v2int %int_3 %154 + OpStore %v10 %155 + OpStore %v11 %159 + OpStore %v12 %161 + OpStore %v13 %20 + OpStore %v14 %20 + OpStore %v15 %165 + OpStore %v16 %165 + OpStore %v17 %168 + OpStore %v18 %170 + OpStore %171 %126 + OpStore %172 %129 + OpStore %173 %126 + OpStore %174 %132 + OpStore %175 %135 + OpStore %176 %138 + OpStore %177 %129 + OpStore %178 %143 + OpStore %179 %151 + OpStore %180 %155 + OpStore %181 %159 + OpStore %182 %161 + OpStore %183 %20 + OpStore %184 %20 + OpStore %185 %165 + OpStore %186 %165 + OpStore %187 %168 + OpStore %188 %170 + %189 = OpFunctionCall %bool %check_bf2f2f2f3i2i2f2f2f4i2b4f2f2f2b2b2b3i4 %171 %172 %173 %174 %175 %176 %177 %178 %179 %180 %181 %182 %183 %184 %185 %186 %187 %188 + OpSelectionMerge %193 None + OpBranchConditional %189 %191 %192 + %191 = OpLabel + %194 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 + %197 = OpLoad %v4float %194 + OpStore %190 %197 + OpBranch %193 + %192 = OpLabel + %198 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 + %199 = OpLoad %v4float %198 + OpStore %190 %199 + OpBranch %193 + %193 = OpLabel + %200 = OpLoad %v4float %190 + OpReturnValue %200 + OpFunctionEnd diff --git a/tests/sksl/shared/VectorConstructors.skrp b/tests/sksl/shared/VectorConstructors.skrp index b86d3e1c1735..4ef0c53b2784 100644 --- a/tests/sksl/shared/VectorConstructors.skrp +++ b/tests/sksl/shared/VectorConstructors.skrp @@ -1,81 +1,76 @@ +79 instructions + [immutable slots] -v1(0) = 0x3F800000 (1.0) -v1(1) = 0x3F800000 (1.0) -v2(0) = 0x3F800000 (1.0) -v2(1) = 0x40000000 (2.0) -v3(0) = 0x3F800000 (1.0) -v3(1) = 0x3F800000 (1.0) -v4(0) = 0x3F800000 (1.0) -v4(1) = 0x3F800000 (1.0) -v4(2) = 0x3F800000 (1.0) -v5(0) = 0x00000001 (1.401298e-45) -v5(1) = 0x00000001 (1.401298e-45) -v6(0) = 0x00000001 (1.401298e-45) -v6(1) = 0x00000002 (2.802597e-45) -v7(0) = 0x3F800000 (1.0) -v7(1) = 0x40000000 (2.0) -v11(0) = 0xFFFFFFFF -v11(1) = 0 -v11(2) = 0xFFFFFFFF -v11(3) = 0 -v12(0) = 0x3F800000 (1.0) -v12(1) = 0 -v13(0) = 0 -v13(1) = 0 -v14(0) = 0 -v14(1) = 0 -v15(0) = 0xFFFFFFFF -v15(1) = 0xFFFFFFFF -v16(0) = 0xFFFFFFFF -v16(1) = 0xFFFFFFFF -v17(0) = 0xFFFFFFFF -v17(1) = 0xFFFFFFFF -v17(2) = 0xFFFFFFFF -v18(0) = 0x00000001 (1.401298e-45) -v18(1) = 0x00000001 (1.401298e-45) -v18(2) = 0x00000001 (1.401298e-45) -v18(3) = 0x00000001 (1.401298e-45) +i0 = 0x3F800000 (1.0) +i1 = 0x3F800000 (1.0) +i2 = 0x3F800000 (1.0) +i3 = 0x40000000 (2.0) +i4 = 0x00000001 (1.401298e-45) +i5 = 0x00000001 (1.401298e-45) +i6 = 0x00000001 (1.401298e-45) +i7 = 0x00000002 (2.802597e-45) +i8 = 0xFFFFFFFF +i9 = 0 +i10 = 0xFFFFFFFF +i11 = 0 +i12 = 0x3F800000 (1.0) +i13 = 0 +i14 = 0 +i15 = 0 +i16 = 0xFFFFFFFF +i17 = 0xFFFFFFFF +i18 = 0xFFFFFFFF +i19 = 0xFFFFFFFF +i20 = 0xFFFFFFFF +i21 = 0x00000001 (1.401298e-45) +i22 = 0x00000001 (1.401298e-45) +i23 = 0x00000001 (1.401298e-45) +i24 = 0x00000001 (1.401298e-45) store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true -copy_2_slots_unmasked $0..1 = v5 +splat_2_constants $0..1 = 0x00000001 (1.401298e-45) cast_to_float_from_2_ints $0..1 = IntToFloat($0..1) copy_2_slots_unmasked v8 = $0..1 -copy_slot_unmasked $0 = v6(0) +copy_constant $0 = 0x00000001 (1.401298e-45) cast_to_float_from_int $0 = IntToFloat($0) copy_uniform v9(1) = unknownInput copy_constant v9(2) = 0x40400000 (3.0) copy_constant v9(3) = 0x40800000 (4.0) copy_slot_unmasked v9(0) = $0 copy_constant $0 = 0x00000003 (4.203895e-45) -copy_slot_unmasked $1 = v1(0) +copy_constant $1 = 0x3F800000 (1.0) cast_to_int_from_float $1 = FloatToInt($1) copy_2_slots_unmasked v10 = $0..1 -copy_4_slots_unmasked v1₁, v2₁ = v1, v2 -copy_4_slots_unmasked v3₁, v4₁(0..1) = v3, v4(0..1) -copy_4_slots_unmasked v4₁(2), v5₁, v6₁(0) = v4(2), v5, v6(0) -copy_4_slots_unmasked v6₁(1), v7₁, v8₁(0) = v6(1), v7, v8(0) -copy_4_slots_unmasked v8₁(1), v9₁(0..2) = v8(1), v9(0..2) -copy_4_slots_unmasked v9₁(3), v10₁, v11₁(0) = v9(3), v10, v11(0) -copy_4_slots_unmasked v11₁(1..3), v12₁(0) = v11(1..3), v12(0) -copy_4_slots_unmasked v12₁(1), v13₁, v14₁(0) = v12(1), v13, v14(0) -copy_4_slots_unmasked v14₁(1), v15₁, v16₁(0) = v14(1), v15, v16(0) -copy_4_slots_unmasked v16₁(1), v17₁ = v16(1), v17 -copy_4_slots_unmasked v18₁ = v18 -copy_slot_unmasked $0 = v1₁(0) -copy_slot_unmasked $1 = v2₁(0) -add_float $0 += $1 -copy_slot_unmasked $1 = v3₁(0) -add_float $0 += $1 -copy_slot_unmasked $1 = v4₁(0) -add_float $0 += $1 -copy_slot_unmasked $1 = v5₁(0) +splat_2_constants v1 = 0x3F800000 (1.0) +copy_2_immutables_unmasked v2 = i2..3 [0x3F800000 (1.0), 0x40000000 (2.0)] +splat_4_constants v3, v4(0..1) = 0x3F800000 (1.0) +copy_constant v4(2) = 0x3F800000 (1.0) +splat_2_constants v5 = 0x00000001 (1.401298e-45) +copy_2_immutables_unmasked v6 = i6..7 [0x00000001 (1.401298e-45), 0x00000002 (2.802597e-45)] +copy_2_immutables_unmasked v7 = i2..3 [0x3F800000 (1.0), 0x40000000 (2.0)] +copy_4_slots_unmasked v8₁, v9₁(0..1) = v8, v9(0..1) +copy_4_slots_unmasked v9₁(2..3), v10₁ = v9(2..3), v10 +copy_4_immutables_unmasked v11 = i8..11 [0xFFFFFFFF, 0, 0xFFFFFFFF, 0] +copy_2_immutables_unmasked v12 = i12..13 [0x3F800000 (1.0), 0] +splat_4_constants v13, v14 = 0 +splat_4_constants v15, v16 = 0xFFFFFFFF +splat_3_constants v17 = 0xFFFFFFFF +splat_4_constants v18 = 0x00000001 (1.401298e-45) +copy_slot_unmasked $0 = v1(0) +copy_slot_unmasked $1 = v2(0) +add_float $0 += $1 +copy_slot_unmasked $1 = v3(0) +add_float $0 += $1 +copy_slot_unmasked $1 = v4(0) +add_float $0 += $1 +copy_slot_unmasked $1 = v5(0) cast_to_float_from_int $1 = IntToFloat($1) add_float $0 += $1 -copy_slot_unmasked $1 = v6₁(0) +copy_slot_unmasked $1 = v6(0) cast_to_float_from_int $1 = IntToFloat($1) add_float $0 += $1 -copy_slot_unmasked $1 = v7₁(0) +copy_slot_unmasked $1 = v7(0) add_float $0 += $1 copy_slot_unmasked $1 = v8₁(0) add_float $0 += $1 @@ -84,25 +79,25 @@ add_float $0 += $1 copy_slot_unmasked $1 = v10₁(0) cast_to_float_from_int $1 = IntToFloat($1) add_float $0 += $1 -copy_slot_unmasked $1 = v11₁(0) +copy_slot_unmasked $1 = v11(0) bitwise_and_imm_int $1 &= 0x3F800000 add_float $0 += $1 -copy_slot_unmasked $1 = v12₁(0) +copy_slot_unmasked $1 = v12(0) add_float $0 += $1 -copy_slot_unmasked $1 = v13₁(0) +copy_slot_unmasked $1 = v13(0) add_float $0 += $1 -copy_slot_unmasked $1 = v14₁(0) +copy_slot_unmasked $1 = v14(0) add_float $0 += $1 -copy_slot_unmasked $1 = v15₁(0) +copy_slot_unmasked $1 = v15(0) bitwise_and_imm_int $1 &= 0x3F800000 add_float $0 += $1 -copy_slot_unmasked $1 = v16₁(0) +copy_slot_unmasked $1 = v16(0) bitwise_and_imm_int $1 &= 0x3F800000 add_float $0 += $1 -copy_slot_unmasked $1 = v17₁(0) +copy_slot_unmasked $1 = v17(0) bitwise_and_imm_int $1 &= 0x3F800000 add_float $0 += $1 -copy_slot_unmasked $1 = v18₁(0) +copy_slot_unmasked $1 = v18(0) cast_to_float_from_int $1 = IntToFloat($1) add_float $0 += $1 cmpeq_imm_float $0 = equal($0, 0x41900000 (18.0)) diff --git a/tests/sksl/shared/VectorConstructors.wgsl b/tests/sksl/shared/VectorConstructors.wgsl index 09c60b4e9bfe..2ae453f18f98 100644 --- a/tests/sksl/shared/VectorConstructors.wgsl +++ b/tests/sksl/shared/VectorConstructors.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -31,7 +32,7 @@ fn check_bf2f2f2f3i2i2f2f2f4i2b4f2f2f2b2b2b3i4(_skParam0: vec2, _skParam1: let v17 = _skParam16; let v18 = _skParam17; { - return ((((((((((((((((f32(v1.x) + f32(v2.x)) + f32(v3.x)) + f32(v4.x)) + f32(v5.x)) + f32(v6.x)) + f32(v7.x)) + f32(v8.x)) + f32(v9.x)) + f32(v10.x)) + f32(v11.x)) + f32(v12.x)) + f32(v13.x)) + f32(v14.x)) + f32(v15.x)) + f32(v16.x)) + f32(v17.x)) + f32(v18.x) == 18.0; + return (((((((((((((((((f32(v1.x) + f32(v2.x)) + f32(v3.x)) + f32(v4.x)) + f32(v5.x)) + f32(v6.x)) + f32(v7.x)) + f32(v8.x)) + f32(v9.x)) + f32(v10.x)) + f32(v11.x)) + f32(v12.x)) + f32(v13.x)) + f32(v14.x)) + f32(v15.x)) + f32(v16.x)) + f32(v17.x)) + f32(v18.x)) == 18.0; } } fn main(_skParam0: vec2) -> vec4 { diff --git a/tests/sksl/shared/VectorScalarMath.asm.frag b/tests/sksl/shared/VectorScalarMath.asm.frag index 1bbd2c47b207..50e918991644 100644 --- a/tests/sksl/shared/VectorScalarMath.asm.frag +++ b/tests/sksl/shared/VectorScalarMath.asm.frag @@ -1,638 +1,638 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorRed" -OpMemberName %_UniformBuffer 1 "colorGreen" -OpMemberName %_UniformBuffer 2 "unknownInput" -OpName %_entrypoint_v "_entrypoint_v" -OpName %test_int_b "test_int_b" -OpName %ok "ok" -OpName %inputRed "inputRed" -OpName %inputGreen "inputGreen" -OpName %x "x" -OpName %main "main" -OpName %_0_ok "_0_ok" -OpName %_1_inputRed "_1_inputRed" -OpName %_2_inputGreen "_2_inputGreen" -OpName %_3_x "_3_x" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %11 Binding 0 -OpDecorate %11 DescriptorSet 0 -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %39 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %49 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %56 RelaxedPrecision -OpDecorate %_1_inputRed RelaxedPrecision -OpDecorate %213 RelaxedPrecision -OpDecorate %_2_inputGreen RelaxedPrecision -OpDecorate %216 RelaxedPrecision -OpDecorate %_3_x RelaxedPrecision -OpDecorate %220 RelaxedPrecision -OpDecorate %228 RelaxedPrecision -OpDecorate %229 RelaxedPrecision -OpDecorate %238 RelaxedPrecision -OpDecorate %239 RelaxedPrecision -OpDecorate %240 RelaxedPrecision -OpDecorate %248 RelaxedPrecision -OpDecorate %251 RelaxedPrecision -OpDecorate %252 RelaxedPrecision -OpDecorate %253 RelaxedPrecision -OpDecorate %260 RelaxedPrecision -OpDecorate %261 RelaxedPrecision -OpDecorate %262 RelaxedPrecision -OpDecorate %263 RelaxedPrecision -OpDecorate %273 RelaxedPrecision -OpDecorate %274 RelaxedPrecision -OpDecorate %281 RelaxedPrecision -OpDecorate %288 RelaxedPrecision -OpDecorate %290 RelaxedPrecision -OpDecorate %297 RelaxedPrecision -OpDecorate %298 RelaxedPrecision -OpDecorate %299 RelaxedPrecision -OpDecorate %307 RelaxedPrecision -OpDecorate %308 RelaxedPrecision -OpDecorate %309 RelaxedPrecision -OpDecorate %310 RelaxedPrecision -OpDecorate %318 RelaxedPrecision -OpDecorate %320 RelaxedPrecision -OpDecorate %321 RelaxedPrecision -OpDecorate %322 RelaxedPrecision -OpDecorate %331 RelaxedPrecision -OpDecorate %332 RelaxedPrecision -OpDecorate %339 RelaxedPrecision -OpDecorate %340 RelaxedPrecision -OpDecorate %342 RelaxedPrecision -OpDecorate %344 RelaxedPrecision -OpDecorate %350 RelaxedPrecision -OpDecorate %351 RelaxedPrecision -OpDecorate %352 RelaxedPrecision -OpDecorate %353 RelaxedPrecision -OpDecorate %368 RelaxedPrecision -OpDecorate %370 RelaxedPrecision -OpDecorate %371 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorRed" + OpMemberName %_UniformBuffer 1 "colorGreen" + OpMemberName %_UniformBuffer 2 "unknownInput" + OpName %_entrypoint_v "_entrypoint_v" + OpName %test_int_b "test_int_b" + OpName %ok "ok" + OpName %inputRed "inputRed" + OpName %inputGreen "inputGreen" + OpName %x "x" + OpName %main "main" + OpName %_0_ok "_0_ok" + OpName %_1_inputRed "_1_inputRed" + OpName %_2_inputGreen "_2_inputGreen" + OpName %_3_x "_3_x" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %11 Binding 0 + OpDecorate %11 DescriptorSet 0 + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %49 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %56 RelaxedPrecision + OpDecorate %_1_inputRed RelaxedPrecision + OpDecorate %213 RelaxedPrecision + OpDecorate %_2_inputGreen RelaxedPrecision + OpDecorate %216 RelaxedPrecision + OpDecorate %_3_x RelaxedPrecision + OpDecorate %220 RelaxedPrecision + OpDecorate %228 RelaxedPrecision + OpDecorate %229 RelaxedPrecision + OpDecorate %238 RelaxedPrecision + OpDecorate %239 RelaxedPrecision + OpDecorate %240 RelaxedPrecision + OpDecorate %248 RelaxedPrecision + OpDecorate %251 RelaxedPrecision + OpDecorate %252 RelaxedPrecision + OpDecorate %253 RelaxedPrecision + OpDecorate %260 RelaxedPrecision + OpDecorate %261 RelaxedPrecision + OpDecorate %262 RelaxedPrecision + OpDecorate %263 RelaxedPrecision + OpDecorate %273 RelaxedPrecision + OpDecorate %274 RelaxedPrecision + OpDecorate %281 RelaxedPrecision + OpDecorate %288 RelaxedPrecision + OpDecorate %290 RelaxedPrecision + OpDecorate %297 RelaxedPrecision + OpDecorate %298 RelaxedPrecision + OpDecorate %299 RelaxedPrecision + OpDecorate %307 RelaxedPrecision + OpDecorate %308 RelaxedPrecision + OpDecorate %309 RelaxedPrecision + OpDecorate %310 RelaxedPrecision + OpDecorate %318 RelaxedPrecision + OpDecorate %320 RelaxedPrecision + OpDecorate %321 RelaxedPrecision + OpDecorate %322 RelaxedPrecision + OpDecorate %331 RelaxedPrecision + OpDecorate %332 RelaxedPrecision + OpDecorate %339 RelaxedPrecision + OpDecorate %340 RelaxedPrecision + OpDecorate %342 RelaxedPrecision + OpDecorate %344 RelaxedPrecision + OpDecorate %350 RelaxedPrecision + OpDecorate %351 RelaxedPrecision + OpDecorate %352 RelaxedPrecision + OpDecorate %353 RelaxedPrecision + OpDecorate %368 RelaxedPrecision + OpDecorate %370 RelaxedPrecision + OpDecorate %371 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%16 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%20 = OpConstantComposite %v2float %float_0 %float_0 + %11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %16 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %20 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%24 = OpTypeFunction %bool + %24 = OpTypeFunction %bool %_ptr_Function_bool = OpTypePointer Function %bool -%true = OpConstantTrue %bool -%int = OpTypeInt 32 1 -%v4int = OpTypeVector %int 4 + %true = OpConstantTrue %bool + %int = OpTypeInt 32 1 + %v4int = OpTypeVector %int 4 %_ptr_Function_v4int = OpTypePointer Function %v4int %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 -%61 = OpConstantComposite %v4int %int_2 %int_2 %int_2 %int_2 -%false = OpConstantFalse %bool -%int_3 = OpConstant %int 3 -%67 = OpConstantComposite %v4int %int_3 %int_2 %int_2 %int_3 -%v4bool = OpTypeVector %bool 4 -%int_n1 = OpConstant %int -1 -%int_n2 = OpConstant %int -2 -%78 = OpConstantComposite %v4int %int_n1 %int_n1 %int_n2 %int_n2 -%87 = OpConstantComposite %v4int %int_2 %int_1 %int_1 %int_2 -%v3int = OpTypeVector %int 3 -%int_9 = OpConstant %int 9 -%94 = OpConstantComposite %v3int %int_9 %int_9 %int_9 -%100 = OpConstantComposite %v4int %int_9 %int_9 %int_9 %int_2 -%v2int = OpTypeVector %int 2 -%int_4 = OpConstant %int 4 -%107 = OpConstantComposite %v2int %int_4 %int_4 -%113 = OpConstantComposite %v4int %int_2 %int_0 %int_9 %int_2 -%int_5 = OpConstant %int 5 -%118 = OpConstantComposite %v4int %int_5 %int_5 %int_5 %int_5 -%123 = OpConstantComposite %v4int %int_0 %int_5 %int_5 %int_0 -%int_10 = OpConstant %int 10 -%135 = OpConstantComposite %v4int %int_10 %int_10 %int_10 %int_10 -%139 = OpConstantComposite %v4int %int_9 %int_9 %int_10 %int_10 -%148 = OpConstantComposite %v4int %int_1 %int_2 %int_1 %int_2 -%int_8 = OpConstant %int 8 -%154 = OpConstantComposite %v3int %int_8 %int_8 %int_8 -%160 = OpConstantComposite %v4int %int_8 %int_8 %int_8 %int_2 -%int_36 = OpConstant %int 36 -%166 = OpConstantComposite %v2int %int_36 %int_36 -%int_18 = OpConstant %int 18 -%173 = OpConstantComposite %v4int %int_4 %int_18 %int_8 %int_2 -%int_37 = OpConstant %int 37 -%178 = OpConstantComposite %v4int %int_37 %int_37 %int_37 %int_37 -%183 = OpConstantComposite %v4int %int_2 %int_9 %int_18 %int_4 -%189 = OpConstantComposite %v4int %int_4 %int_4 %int_4 %int_4 -%206 = OpTypeFunction %v4float %_ptr_Function_v2float + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 + %61 = OpConstantComposite %v4int %int_2 %int_2 %int_2 %int_2 + %false = OpConstantFalse %bool + %int_3 = OpConstant %int 3 + %67 = OpConstantComposite %v4int %int_3 %int_2 %int_2 %int_3 + %v4bool = OpTypeVector %bool 4 + %int_n1 = OpConstant %int -1 + %int_n2 = OpConstant %int -2 + %78 = OpConstantComposite %v4int %int_n1 %int_n1 %int_n2 %int_n2 + %87 = OpConstantComposite %v4int %int_2 %int_1 %int_1 %int_2 + %v3int = OpTypeVector %int 3 + %int_9 = OpConstant %int 9 + %94 = OpConstantComposite %v3int %int_9 %int_9 %int_9 + %100 = OpConstantComposite %v4int %int_9 %int_9 %int_9 %int_2 + %v2int = OpTypeVector %int 2 + %int_4 = OpConstant %int 4 + %107 = OpConstantComposite %v2int %int_4 %int_4 + %113 = OpConstantComposite %v4int %int_2 %int_0 %int_9 %int_2 + %int_5 = OpConstant %int 5 + %118 = OpConstantComposite %v4int %int_5 %int_5 %int_5 %int_5 + %123 = OpConstantComposite %v4int %int_0 %int_5 %int_5 %int_0 + %int_10 = OpConstant %int 10 + %135 = OpConstantComposite %v4int %int_10 %int_10 %int_10 %int_10 + %139 = OpConstantComposite %v4int %int_9 %int_9 %int_10 %int_10 + %148 = OpConstantComposite %v4int %int_1 %int_2 %int_1 %int_2 + %int_8 = OpConstant %int 8 + %154 = OpConstantComposite %v3int %int_8 %int_8 %int_8 + %160 = OpConstantComposite %v4int %int_8 %int_8 %int_8 %int_2 + %int_36 = OpConstant %int 36 + %166 = OpConstantComposite %v2int %int_36 %int_36 + %int_18 = OpConstant %int 18 + %173 = OpConstantComposite %v4int %int_4 %int_18 %int_8 %int_2 + %int_37 = OpConstant %int 37 + %178 = OpConstantComposite %v4int %int_37 %int_37 %int_37 %int_37 + %183 = OpConstantComposite %v4int %int_2 %int_9 %int_18 %int_4 + %189 = OpConstantComposite %v4int %int_4 %int_4 %int_4 %int_4 + %206 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float -%float_2 = OpConstant %float 2 -%219 = OpConstantComposite %v4float %float_2 %float_2 %float_2 %float_2 -%float_3 = OpConstant %float 3 -%224 = OpConstantComposite %v4float %float_3 %float_2 %float_2 %float_3 -%float_n1 = OpConstant %float -1 -%float_n2 = OpConstant %float -2 -%234 = OpConstantComposite %v4float %float_n1 %float_n1 %float_n2 %float_n2 -%float_1 = OpConstant %float 1 -%244 = OpConstantComposite %v4float %float_2 %float_1 %float_1 %float_2 -%v3float = OpTypeVector %float 3 -%float_9 = OpConstant %float 9 -%256 = OpConstantComposite %v4float %float_9 %float_9 %float_9 %float_2 -%float_18 = OpConstant %float 18 -%float_4 = OpConstant %float 4 -%268 = OpConstantComposite %v4float %float_18 %float_4 %float_9 %float_2 -%float_5 = OpConstant %float 5 -%277 = OpConstantComposite %v4float %float_0 %float_5 %float_5 %float_0 -%float_10 = OpConstant %float 10 -%289 = OpConstantComposite %v4float %float_10 %float_10 %float_10 %float_10 -%293 = OpConstantComposite %v4float %float_9 %float_9 %float_10 %float_10 -%302 = OpConstantComposite %v4float %float_1 %float_2 %float_1 %float_2 -%float_8 = OpConstant %float 8 -%313 = OpConstantComposite %v4float %float_8 %float_8 %float_8 %float_2 -%float_32 = OpConstant %float 32 -%319 = OpConstantComposite %v2float %float_32 %float_32 -%float_16 = OpConstant %float 16 -%326 = OpConstantComposite %v4float %float_4 %float_16 %float_8 %float_2 -%330 = OpConstantComposite %v4float %float_32 %float_32 %float_32 %float_32 -%335 = OpConstantComposite %v4float %float_2 %float_8 %float_16 %float_4 -%341 = OpConstantComposite %v4float %float_4 %float_4 %float_4 %float_4 -%float_0_5 = OpConstant %float 0.5 + %float_2 = OpConstant %float 2 + %219 = OpConstantComposite %v4float %float_2 %float_2 %float_2 %float_2 + %float_3 = OpConstant %float 3 + %224 = OpConstantComposite %v4float %float_3 %float_2 %float_2 %float_3 + %float_n1 = OpConstant %float -1 + %float_n2 = OpConstant %float -2 + %234 = OpConstantComposite %v4float %float_n1 %float_n1 %float_n2 %float_n2 + %float_1 = OpConstant %float 1 + %244 = OpConstantComposite %v4float %float_2 %float_1 %float_1 %float_2 + %v3float = OpTypeVector %float 3 + %float_9 = OpConstant %float 9 + %256 = OpConstantComposite %v4float %float_9 %float_9 %float_9 %float_2 + %float_18 = OpConstant %float 18 + %float_4 = OpConstant %float 4 + %268 = OpConstantComposite %v4float %float_18 %float_4 %float_9 %float_2 + %float_5 = OpConstant %float 5 + %277 = OpConstantComposite %v4float %float_0 %float_5 %float_5 %float_0 + %float_10 = OpConstant %float 10 + %289 = OpConstantComposite %v4float %float_10 %float_10 %float_10 %float_10 + %293 = OpConstantComposite %v4float %float_9 %float_9 %float_10 %float_10 + %302 = OpConstantComposite %v4float %float_1 %float_2 %float_1 %float_2 + %float_8 = OpConstant %float 8 + %313 = OpConstantComposite %v4float %float_8 %float_8 %float_8 %float_2 + %float_32 = OpConstant %float 32 + %319 = OpConstantComposite %v2float %float_32 %float_32 + %float_16 = OpConstant %float 16 + %326 = OpConstantComposite %v4float %float_4 %float_16 %float_8 %float_2 + %330 = OpConstantComposite %v4float %float_32 %float_32 %float_32 %float_32 + %335 = OpConstantComposite %v4float %float_2 %float_8 %float_16 %float_4 + %341 = OpConstantComposite %v4float %float_4 %float_4 %float_4 %float_4 + %float_0_5 = OpConstant %float 0.5 %_entrypoint_v = OpFunction %void None %16 -%17 = OpLabel -%21 = OpVariable %_ptr_Function_v2float Function -OpStore %21 %20 -%23 = OpFunctionCall %v4float %main %21 -OpStore %sk_FragColor %23 -OpReturn -OpFunctionEnd -%test_int_b = OpFunction %bool None %24 -%25 = OpLabel -%ok = OpVariable %_ptr_Function_bool Function -%inputRed = OpVariable %_ptr_Function_v4int Function -%inputGreen = OpVariable %_ptr_Function_v4int Function -%x = OpVariable %_ptr_Function_v4int Function -OpStore %ok %true -%33 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 -%36 = OpLoad %v4float %33 -%37 = OpCompositeExtract %float %36 0 -%38 = OpConvertFToS %int %37 -%39 = OpCompositeExtract %float %36 1 -%40 = OpConvertFToS %int %39 -%41 = OpCompositeExtract %float %36 2 -%42 = OpConvertFToS %int %41 -%43 = OpCompositeExtract %float %36 3 -%44 = OpConvertFToS %int %43 -%45 = OpCompositeConstruct %v4int %38 %40 %42 %44 -OpStore %inputRed %45 -%47 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 -%49 = OpLoad %v4float %47 -%50 = OpCompositeExtract %float %49 0 -%51 = OpConvertFToS %int %50 -%52 = OpCompositeExtract %float %49 1 -%53 = OpConvertFToS %int %52 -%54 = OpCompositeExtract %float %49 2 -%55 = OpConvertFToS %int %54 -%56 = OpCompositeExtract %float %49 3 -%57 = OpConvertFToS %int %56 -%58 = OpCompositeConstruct %v4int %51 %53 %55 %57 -OpStore %inputGreen %58 -%62 = OpIAdd %v4int %45 %61 -OpStore %x %62 -OpSelectionMerge %65 None -OpBranchConditional %true %64 %65 -%64 = OpLabel -%68 = OpIEqual %v4bool %62 %67 -%70 = OpAll %bool %68 -OpBranch %65 -%65 = OpLabel -%71 = OpPhi %bool %false %25 %70 %64 -OpStore %ok %71 -%72 = OpVectorShuffle %v4int %58 %58 1 3 0 2 -%73 = OpISub %v4int %72 %61 -OpStore %x %73 -OpSelectionMerge %75 None -OpBranchConditional %71 %74 %75 -%74 = OpLabel -%79 = OpIEqual %v4bool %73 %78 -%80 = OpAll %bool %79 -OpBranch %75 -%75 = OpLabel -%81 = OpPhi %bool %false %65 %80 %74 -OpStore %ok %81 -%82 = OpCompositeExtract %int %58 1 -%83 = OpCompositeConstruct %v4int %82 %82 %82 %82 -%84 = OpIAdd %v4int %45 %83 -OpStore %x %84 -OpSelectionMerge %86 None -OpBranchConditional %81 %85 %86 -%85 = OpLabel -%88 = OpIEqual %v4bool %84 %87 -%89 = OpAll %bool %88 -OpBranch %86 -%86 = OpLabel -%90 = OpPhi %bool %false %75 %89 %85 -OpStore %ok %90 -%91 = OpVectorShuffle %v3int %58 %58 3 1 3 -%95 = OpIMul %v3int %91 %94 -%96 = OpLoad %v4int %x -%97 = OpVectorShuffle %v4int %96 %95 4 5 6 3 -OpStore %x %97 -OpSelectionMerge %99 None -OpBranchConditional %90 %98 %99 -%98 = OpLabel -%101 = OpIEqual %v4bool %97 %100 -%102 = OpAll %bool %101 -OpBranch %99 -%99 = OpLabel -%103 = OpPhi %bool %false %86 %102 %98 -OpStore %ok %103 -%104 = OpVectorShuffle %v2int %97 %97 2 3 -%108 = OpSDiv %v2int %104 %107 -%109 = OpLoad %v4int %x -%110 = OpVectorShuffle %v4int %109 %108 4 5 2 3 -OpStore %x %110 -OpSelectionMerge %112 None -OpBranchConditional %103 %111 %112 -%111 = OpLabel -%114 = OpIEqual %v4bool %110 %113 -%115 = OpAll %bool %114 -OpBranch %112 -%112 = OpLabel -%116 = OpPhi %bool %false %99 %115 %111 -OpStore %ok %116 -%119 = OpIMul %v4int %45 %118 -%120 = OpVectorShuffle %v4int %119 %119 1 0 3 2 -OpStore %x %120 -OpSelectionMerge %122 None -OpBranchConditional %116 %121 %122 -%121 = OpLabel -%124 = OpIEqual %v4bool %120 %123 -%125 = OpAll %bool %124 -OpBranch %122 -%122 = OpLabel -%126 = OpPhi %bool %false %112 %125 %121 -OpStore %ok %126 -%127 = OpIAdd %v4int %61 %45 -OpStore %x %127 -OpSelectionMerge %129 None -OpBranchConditional %126 %128 %129 -%128 = OpLabel -%130 = OpIEqual %v4bool %127 %67 -%131 = OpAll %bool %130 -OpBranch %129 -%129 = OpLabel -%132 = OpPhi %bool %false %122 %131 %128 -OpStore %ok %132 -%134 = OpVectorShuffle %v4int %58 %58 1 3 0 2 -%136 = OpISub %v4int %135 %134 -OpStore %x %136 -OpSelectionMerge %138 None -OpBranchConditional %132 %137 %138 -%137 = OpLabel -%140 = OpIEqual %v4bool %136 %139 -%141 = OpAll %bool %140 -OpBranch %138 -%138 = OpLabel -%142 = OpPhi %bool %false %129 %141 %137 -OpStore %ok %142 -%143 = OpCompositeExtract %int %45 0 -%144 = OpCompositeConstruct %v4int %143 %143 %143 %143 -%145 = OpIAdd %v4int %144 %58 -OpStore %x %145 -OpSelectionMerge %147 None -OpBranchConditional %142 %146 %147 -%146 = OpLabel -%149 = OpIEqual %v4bool %145 %148 -%150 = OpAll %bool %149 -OpBranch %147 -%147 = OpLabel -%151 = OpPhi %bool %false %138 %150 %146 -OpStore %ok %151 -%153 = OpVectorShuffle %v3int %58 %58 3 1 3 -%155 = OpIMul %v3int %154 %153 -%156 = OpLoad %v4int %x -%157 = OpVectorShuffle %v4int %156 %155 4 5 6 3 -OpStore %x %157 -OpSelectionMerge %159 None -OpBranchConditional %151 %158 %159 -%158 = OpLabel -%161 = OpIEqual %v4bool %157 %160 -%162 = OpAll %bool %161 -OpBranch %159 -%159 = OpLabel -%163 = OpPhi %bool %false %147 %162 %158 -OpStore %ok %163 -%165 = OpVectorShuffle %v2int %157 %157 2 3 -%167 = OpSDiv %v2int %166 %165 -%168 = OpLoad %v4int %x -%169 = OpVectorShuffle %v4int %168 %167 4 5 2 3 -OpStore %x %169 -OpSelectionMerge %171 None -OpBranchConditional %163 %170 %171 -%170 = OpLabel -%174 = OpIEqual %v4bool %169 %173 -%175 = OpAll %bool %174 -OpBranch %171 -%171 = OpLabel -%176 = OpPhi %bool %false %159 %175 %170 -OpStore %ok %176 -%179 = OpSDiv %v4int %178 %169 -%180 = OpVectorShuffle %v4int %179 %179 1 0 3 2 -OpStore %x %180 -OpSelectionMerge %182 None -OpBranchConditional %176 %181 %182 -%181 = OpLabel -%184 = OpIEqual %v4bool %180 %183 -%185 = OpAll %bool %184 -OpBranch %182 -%182 = OpLabel -%186 = OpPhi %bool %false %171 %185 %181 -OpStore %ok %186 -%187 = OpIAdd %v4int %180 %61 -OpStore %x %187 -%188 = OpIMul %v4int %187 %61 -OpStore %x %188 -%190 = OpISub %v4int %188 %189 -OpStore %x %190 -%191 = OpSDiv %v4int %190 %61 -OpStore %x %191 -OpSelectionMerge %193 None -OpBranchConditional %186 %192 %193 -%192 = OpLabel -%194 = OpIEqual %v4bool %191 %183 -%195 = OpAll %bool %194 -OpBranch %193 -%193 = OpLabel -%196 = OpPhi %bool %false %182 %195 %192 -OpStore %ok %196 -%197 = OpIAdd %v4int %191 %61 -OpStore %x %197 -%198 = OpIMul %v4int %197 %61 -OpStore %x %198 -%199 = OpISub %v4int %198 %189 -OpStore %x %199 -%200 = OpSDiv %v4int %199 %61 -OpStore %x %200 -OpSelectionMerge %202 None -OpBranchConditional %196 %201 %202 -%201 = OpLabel -%203 = OpIEqual %v4bool %200 %183 -%204 = OpAll %bool %203 -OpBranch %202 -%202 = OpLabel -%205 = OpPhi %bool %false %193 %204 %201 -OpStore %ok %205 -OpReturnValue %205 -OpFunctionEnd -%main = OpFunction %v4float None %206 -%207 = OpFunctionParameter %_ptr_Function_v2float -%208 = OpLabel -%_0_ok = OpVariable %_ptr_Function_bool Function + %17 = OpLabel + %21 = OpVariable %_ptr_Function_v2float Function + OpStore %21 %20 + %23 = OpFunctionCall %v4float %main %21 + OpStore %sk_FragColor %23 + OpReturn + OpFunctionEnd + %test_int_b = OpFunction %bool None %24 + %25 = OpLabel + %ok = OpVariable %_ptr_Function_bool Function + %inputRed = OpVariable %_ptr_Function_v4int Function + %inputGreen = OpVariable %_ptr_Function_v4int Function + %x = OpVariable %_ptr_Function_v4int Function + OpStore %ok %true + %33 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 + %36 = OpLoad %v4float %33 + %37 = OpCompositeExtract %float %36 0 + %38 = OpConvertFToS %int %37 + %39 = OpCompositeExtract %float %36 1 + %40 = OpConvertFToS %int %39 + %41 = OpCompositeExtract %float %36 2 + %42 = OpConvertFToS %int %41 + %43 = OpCompositeExtract %float %36 3 + %44 = OpConvertFToS %int %43 + %45 = OpCompositeConstruct %v4int %38 %40 %42 %44 + OpStore %inputRed %45 + %47 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 + %49 = OpLoad %v4float %47 + %50 = OpCompositeExtract %float %49 0 + %51 = OpConvertFToS %int %50 + %52 = OpCompositeExtract %float %49 1 + %53 = OpConvertFToS %int %52 + %54 = OpCompositeExtract %float %49 2 + %55 = OpConvertFToS %int %54 + %56 = OpCompositeExtract %float %49 3 + %57 = OpConvertFToS %int %56 + %58 = OpCompositeConstruct %v4int %51 %53 %55 %57 + OpStore %inputGreen %58 + %62 = OpIAdd %v4int %45 %61 + OpStore %x %62 + OpSelectionMerge %65 None + OpBranchConditional %true %64 %65 + %64 = OpLabel + %68 = OpIEqual %v4bool %62 %67 + %70 = OpAll %bool %68 + OpBranch %65 + %65 = OpLabel + %71 = OpPhi %bool %false %25 %70 %64 + OpStore %ok %71 + %72 = OpVectorShuffle %v4int %58 %58 1 3 0 2 + %73 = OpISub %v4int %72 %61 + OpStore %x %73 + OpSelectionMerge %75 None + OpBranchConditional %71 %74 %75 + %74 = OpLabel + %79 = OpIEqual %v4bool %73 %78 + %80 = OpAll %bool %79 + OpBranch %75 + %75 = OpLabel + %81 = OpPhi %bool %false %65 %80 %74 + OpStore %ok %81 + %82 = OpCompositeExtract %int %58 1 + %83 = OpCompositeConstruct %v4int %82 %82 %82 %82 + %84 = OpIAdd %v4int %45 %83 + OpStore %x %84 + OpSelectionMerge %86 None + OpBranchConditional %81 %85 %86 + %85 = OpLabel + %88 = OpIEqual %v4bool %84 %87 + %89 = OpAll %bool %88 + OpBranch %86 + %86 = OpLabel + %90 = OpPhi %bool %false %75 %89 %85 + OpStore %ok %90 + %91 = OpVectorShuffle %v3int %58 %58 3 1 3 + %95 = OpIMul %v3int %91 %94 + %96 = OpLoad %v4int %x + %97 = OpVectorShuffle %v4int %96 %95 4 5 6 3 + OpStore %x %97 + OpSelectionMerge %99 None + OpBranchConditional %90 %98 %99 + %98 = OpLabel + %101 = OpIEqual %v4bool %97 %100 + %102 = OpAll %bool %101 + OpBranch %99 + %99 = OpLabel + %103 = OpPhi %bool %false %86 %102 %98 + OpStore %ok %103 + %104 = OpVectorShuffle %v2int %97 %97 2 3 + %108 = OpSDiv %v2int %104 %107 + %109 = OpLoad %v4int %x + %110 = OpVectorShuffle %v4int %109 %108 4 5 2 3 + OpStore %x %110 + OpSelectionMerge %112 None + OpBranchConditional %103 %111 %112 + %111 = OpLabel + %114 = OpIEqual %v4bool %110 %113 + %115 = OpAll %bool %114 + OpBranch %112 + %112 = OpLabel + %116 = OpPhi %bool %false %99 %115 %111 + OpStore %ok %116 + %119 = OpIMul %v4int %45 %118 + %120 = OpVectorShuffle %v4int %119 %119 1 0 3 2 + OpStore %x %120 + OpSelectionMerge %122 None + OpBranchConditional %116 %121 %122 + %121 = OpLabel + %124 = OpIEqual %v4bool %120 %123 + %125 = OpAll %bool %124 + OpBranch %122 + %122 = OpLabel + %126 = OpPhi %bool %false %112 %125 %121 + OpStore %ok %126 + %127 = OpIAdd %v4int %61 %45 + OpStore %x %127 + OpSelectionMerge %129 None + OpBranchConditional %126 %128 %129 + %128 = OpLabel + %130 = OpIEqual %v4bool %127 %67 + %131 = OpAll %bool %130 + OpBranch %129 + %129 = OpLabel + %132 = OpPhi %bool %false %122 %131 %128 + OpStore %ok %132 + %134 = OpVectorShuffle %v4int %58 %58 1 3 0 2 + %136 = OpISub %v4int %135 %134 + OpStore %x %136 + OpSelectionMerge %138 None + OpBranchConditional %132 %137 %138 + %137 = OpLabel + %140 = OpIEqual %v4bool %136 %139 + %141 = OpAll %bool %140 + OpBranch %138 + %138 = OpLabel + %142 = OpPhi %bool %false %129 %141 %137 + OpStore %ok %142 + %143 = OpCompositeExtract %int %45 0 + %144 = OpCompositeConstruct %v4int %143 %143 %143 %143 + %145 = OpIAdd %v4int %144 %58 + OpStore %x %145 + OpSelectionMerge %147 None + OpBranchConditional %142 %146 %147 + %146 = OpLabel + %149 = OpIEqual %v4bool %145 %148 + %150 = OpAll %bool %149 + OpBranch %147 + %147 = OpLabel + %151 = OpPhi %bool %false %138 %150 %146 + OpStore %ok %151 + %153 = OpVectorShuffle %v3int %58 %58 3 1 3 + %155 = OpIMul %v3int %154 %153 + %156 = OpLoad %v4int %x + %157 = OpVectorShuffle %v4int %156 %155 4 5 6 3 + OpStore %x %157 + OpSelectionMerge %159 None + OpBranchConditional %151 %158 %159 + %158 = OpLabel + %161 = OpIEqual %v4bool %157 %160 + %162 = OpAll %bool %161 + OpBranch %159 + %159 = OpLabel + %163 = OpPhi %bool %false %147 %162 %158 + OpStore %ok %163 + %165 = OpVectorShuffle %v2int %157 %157 2 3 + %167 = OpSDiv %v2int %166 %165 + %168 = OpLoad %v4int %x + %169 = OpVectorShuffle %v4int %168 %167 4 5 2 3 + OpStore %x %169 + OpSelectionMerge %171 None + OpBranchConditional %163 %170 %171 + %170 = OpLabel + %174 = OpIEqual %v4bool %169 %173 + %175 = OpAll %bool %174 + OpBranch %171 + %171 = OpLabel + %176 = OpPhi %bool %false %159 %175 %170 + OpStore %ok %176 + %179 = OpSDiv %v4int %178 %169 + %180 = OpVectorShuffle %v4int %179 %179 1 0 3 2 + OpStore %x %180 + OpSelectionMerge %182 None + OpBranchConditional %176 %181 %182 + %181 = OpLabel + %184 = OpIEqual %v4bool %180 %183 + %185 = OpAll %bool %184 + OpBranch %182 + %182 = OpLabel + %186 = OpPhi %bool %false %171 %185 %181 + OpStore %ok %186 + %187 = OpIAdd %v4int %180 %61 + OpStore %x %187 + %188 = OpIMul %v4int %187 %61 + OpStore %x %188 + %190 = OpISub %v4int %188 %189 + OpStore %x %190 + %191 = OpSDiv %v4int %190 %61 + OpStore %x %191 + OpSelectionMerge %193 None + OpBranchConditional %186 %192 %193 + %192 = OpLabel + %194 = OpIEqual %v4bool %191 %183 + %195 = OpAll %bool %194 + OpBranch %193 + %193 = OpLabel + %196 = OpPhi %bool %false %182 %195 %192 + OpStore %ok %196 + %197 = OpIAdd %v4int %191 %61 + OpStore %x %197 + %198 = OpIMul %v4int %197 %61 + OpStore %x %198 + %199 = OpISub %v4int %198 %189 + OpStore %x %199 + %200 = OpSDiv %v4int %199 %61 + OpStore %x %200 + OpSelectionMerge %202 None + OpBranchConditional %196 %201 %202 + %201 = OpLabel + %203 = OpIEqual %v4bool %200 %183 + %204 = OpAll %bool %203 + OpBranch %202 + %202 = OpLabel + %205 = OpPhi %bool %false %193 %204 %201 + OpStore %ok %205 + OpReturnValue %205 + OpFunctionEnd + %main = OpFunction %v4float None %206 + %207 = OpFunctionParameter %_ptr_Function_v2float + %208 = OpLabel + %_0_ok = OpVariable %_ptr_Function_bool Function %_1_inputRed = OpVariable %_ptr_Function_v4float Function %_2_inputGreen = OpVariable %_ptr_Function_v4float Function -%_3_x = OpVariable %_ptr_Function_v4float Function -%363 = OpVariable %_ptr_Function_v4float Function -OpStore %_0_ok %true -%212 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 -%213 = OpLoad %v4float %212 -OpStore %_1_inputRed %213 -%215 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 -%216 = OpLoad %v4float %215 -OpStore %_2_inputGreen %216 -%220 = OpFAdd %v4float %213 %219 -OpStore %_3_x %220 -OpSelectionMerge %222 None -OpBranchConditional %true %221 %222 -%221 = OpLabel -%225 = OpFOrdEqual %v4bool %220 %224 -%226 = OpAll %bool %225 -OpBranch %222 -%222 = OpLabel -%227 = OpPhi %bool %false %208 %226 %221 -OpStore %_0_ok %227 -%228 = OpVectorShuffle %v4float %216 %216 1 3 0 2 -%229 = OpFSub %v4float %228 %219 -OpStore %_3_x %229 -OpSelectionMerge %231 None -OpBranchConditional %227 %230 %231 -%230 = OpLabel -%235 = OpFOrdEqual %v4bool %229 %234 -%236 = OpAll %bool %235 -OpBranch %231 -%231 = OpLabel -%237 = OpPhi %bool %false %222 %236 %230 -OpStore %_0_ok %237 -%238 = OpCompositeExtract %float %216 1 -%239 = OpCompositeConstruct %v4float %238 %238 %238 %238 -%240 = OpFAdd %v4float %213 %239 -OpStore %_3_x %240 -OpSelectionMerge %242 None -OpBranchConditional %237 %241 %242 -%241 = OpLabel -%245 = OpFOrdEqual %v4bool %240 %244 -%246 = OpAll %bool %245 -OpBranch %242 -%242 = OpLabel -%247 = OpPhi %bool %false %231 %246 %241 -OpStore %_0_ok %247 -%248 = OpVectorShuffle %v3float %216 %216 3 1 3 -%251 = OpVectorTimesScalar %v3float %248 %float_9 -%252 = OpLoad %v4float %_3_x -%253 = OpVectorShuffle %v4float %252 %251 4 5 6 3 -OpStore %_3_x %253 -OpSelectionMerge %255 None -OpBranchConditional %247 %254 %255 -%254 = OpLabel -%257 = OpFOrdEqual %v4bool %253 %256 -%258 = OpAll %bool %257 -OpBranch %255 -%255 = OpLabel -%259 = OpPhi %bool %false %242 %258 %254 -OpStore %_0_ok %259 -%260 = OpVectorShuffle %v2float %253 %253 2 3 -%261 = OpVectorTimesScalar %v2float %260 %float_2 -%262 = OpLoad %v4float %_3_x -%263 = OpVectorShuffle %v4float %262 %261 4 5 2 3 -OpStore %_3_x %263 -OpSelectionMerge %265 None -OpBranchConditional %259 %264 %265 -%264 = OpLabel -%269 = OpFOrdEqual %v4bool %263 %268 -%270 = OpAll %bool %269 -OpBranch %265 -%265 = OpLabel -%271 = OpPhi %bool %false %255 %270 %264 -OpStore %_0_ok %271 -%273 = OpVectorTimesScalar %v4float %213 %float_5 -%274 = OpVectorShuffle %v4float %273 %273 1 0 3 2 -OpStore %_3_x %274 -OpSelectionMerge %276 None -OpBranchConditional %271 %275 %276 -%275 = OpLabel -%278 = OpFOrdEqual %v4bool %274 %277 -%279 = OpAll %bool %278 -OpBranch %276 -%276 = OpLabel -%280 = OpPhi %bool %false %265 %279 %275 -OpStore %_0_ok %280 -%281 = OpFAdd %v4float %219 %213 -OpStore %_3_x %281 -OpSelectionMerge %283 None -OpBranchConditional %280 %282 %283 -%282 = OpLabel -%284 = OpFOrdEqual %v4bool %281 %224 -%285 = OpAll %bool %284 -OpBranch %283 -%283 = OpLabel -%286 = OpPhi %bool %false %276 %285 %282 -OpStore %_0_ok %286 -%288 = OpVectorShuffle %v4float %216 %216 1 3 0 2 -%290 = OpFSub %v4float %289 %288 -OpStore %_3_x %290 -OpSelectionMerge %292 None -OpBranchConditional %286 %291 %292 -%291 = OpLabel -%294 = OpFOrdEqual %v4bool %290 %293 -%295 = OpAll %bool %294 -OpBranch %292 -%292 = OpLabel -%296 = OpPhi %bool %false %283 %295 %291 -OpStore %_0_ok %296 -%297 = OpCompositeExtract %float %213 0 -%298 = OpCompositeConstruct %v4float %297 %297 %297 %297 -%299 = OpFAdd %v4float %298 %216 -OpStore %_3_x %299 -OpSelectionMerge %301 None -OpBranchConditional %296 %300 %301 -%300 = OpLabel -%303 = OpFOrdEqual %v4bool %299 %302 -%304 = OpAll %bool %303 -OpBranch %301 -%301 = OpLabel -%305 = OpPhi %bool %false %292 %304 %300 -OpStore %_0_ok %305 -%307 = OpVectorShuffle %v3float %216 %216 3 1 3 -%308 = OpVectorTimesScalar %v3float %307 %float_8 -%309 = OpLoad %v4float %_3_x -%310 = OpVectorShuffle %v4float %309 %308 4 5 6 3 -OpStore %_3_x %310 -OpSelectionMerge %312 None -OpBranchConditional %305 %311 %312 -%311 = OpLabel -%314 = OpFOrdEqual %v4bool %310 %313 -%315 = OpAll %bool %314 -OpBranch %312 -%312 = OpLabel -%316 = OpPhi %bool %false %301 %315 %311 -OpStore %_0_ok %316 -%318 = OpVectorShuffle %v2float %310 %310 2 3 -%320 = OpFDiv %v2float %319 %318 -%321 = OpLoad %v4float %_3_x -%322 = OpVectorShuffle %v4float %321 %320 4 5 2 3 -OpStore %_3_x %322 -OpSelectionMerge %324 None -OpBranchConditional %316 %323 %324 -%323 = OpLabel -%327 = OpFOrdEqual %v4bool %322 %326 -%328 = OpAll %bool %327 -OpBranch %324 -%324 = OpLabel -%329 = OpPhi %bool %false %312 %328 %323 -OpStore %_0_ok %329 -%331 = OpFDiv %v4float %330 %322 -%332 = OpVectorShuffle %v4float %331 %331 1 0 3 2 -OpStore %_3_x %332 -OpSelectionMerge %334 None -OpBranchConditional %329 %333 %334 -%333 = OpLabel -%336 = OpFOrdEqual %v4bool %332 %335 -%337 = OpAll %bool %336 -OpBranch %334 -%334 = OpLabel -%338 = OpPhi %bool %false %324 %337 %333 -OpStore %_0_ok %338 -%339 = OpFAdd %v4float %332 %219 -OpStore %_3_x %339 -%340 = OpVectorTimesScalar %v4float %339 %float_2 -OpStore %_3_x %340 -%342 = OpFSub %v4float %340 %341 -OpStore %_3_x %342 -%344 = OpVectorTimesScalar %v4float %342 %float_0_5 -OpStore %_3_x %344 -OpSelectionMerge %346 None -OpBranchConditional %338 %345 %346 -%345 = OpLabel -%347 = OpFOrdEqual %v4bool %344 %335 -%348 = OpAll %bool %347 -OpBranch %346 -%346 = OpLabel -%349 = OpPhi %bool %false %334 %348 %345 -OpStore %_0_ok %349 -%350 = OpFAdd %v4float %344 %219 -OpStore %_3_x %350 -%351 = OpVectorTimesScalar %v4float %350 %float_2 -OpStore %_3_x %351 -%352 = OpFSub %v4float %351 %341 -OpStore %_3_x %352 -%353 = OpVectorTimesScalar %v4float %352 %float_0_5 -OpStore %_3_x %353 -OpSelectionMerge %355 None -OpBranchConditional %349 %354 %355 -%354 = OpLabel -%356 = OpFOrdEqual %v4bool %353 %335 -%357 = OpAll %bool %356 -OpBranch %355 -%355 = OpLabel -%358 = OpPhi %bool %false %346 %357 %354 -OpStore %_0_ok %358 -OpSelectionMerge %360 None -OpBranchConditional %358 %359 %360 -%359 = OpLabel -%361 = OpFunctionCall %bool %test_int_b -OpBranch %360 -%360 = OpLabel -%362 = OpPhi %bool %false %355 %361 %359 -OpSelectionMerge %366 None -OpBranchConditional %362 %364 %365 -%364 = OpLabel -%367 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 -%368 = OpLoad %v4float %367 -OpStore %363 %368 -OpBranch %366 -%365 = OpLabel -%369 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 -%370 = OpLoad %v4float %369 -OpStore %363 %370 -OpBranch %366 -%366 = OpLabel -%371 = OpLoad %v4float %363 -OpReturnValue %371 -OpFunctionEnd + %_3_x = OpVariable %_ptr_Function_v4float Function + %363 = OpVariable %_ptr_Function_v4float Function + OpStore %_0_ok %true + %212 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 + %213 = OpLoad %v4float %212 + OpStore %_1_inputRed %213 + %215 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 + %216 = OpLoad %v4float %215 + OpStore %_2_inputGreen %216 + %220 = OpFAdd %v4float %213 %219 + OpStore %_3_x %220 + OpSelectionMerge %222 None + OpBranchConditional %true %221 %222 + %221 = OpLabel + %225 = OpFOrdEqual %v4bool %220 %224 + %226 = OpAll %bool %225 + OpBranch %222 + %222 = OpLabel + %227 = OpPhi %bool %false %208 %226 %221 + OpStore %_0_ok %227 + %228 = OpVectorShuffle %v4float %216 %216 1 3 0 2 + %229 = OpFSub %v4float %228 %219 + OpStore %_3_x %229 + OpSelectionMerge %231 None + OpBranchConditional %227 %230 %231 + %230 = OpLabel + %235 = OpFOrdEqual %v4bool %229 %234 + %236 = OpAll %bool %235 + OpBranch %231 + %231 = OpLabel + %237 = OpPhi %bool %false %222 %236 %230 + OpStore %_0_ok %237 + %238 = OpCompositeExtract %float %216 1 + %239 = OpCompositeConstruct %v4float %238 %238 %238 %238 + %240 = OpFAdd %v4float %213 %239 + OpStore %_3_x %240 + OpSelectionMerge %242 None + OpBranchConditional %237 %241 %242 + %241 = OpLabel + %245 = OpFOrdEqual %v4bool %240 %244 + %246 = OpAll %bool %245 + OpBranch %242 + %242 = OpLabel + %247 = OpPhi %bool %false %231 %246 %241 + OpStore %_0_ok %247 + %248 = OpVectorShuffle %v3float %216 %216 3 1 3 + %251 = OpVectorTimesScalar %v3float %248 %float_9 + %252 = OpLoad %v4float %_3_x + %253 = OpVectorShuffle %v4float %252 %251 4 5 6 3 + OpStore %_3_x %253 + OpSelectionMerge %255 None + OpBranchConditional %247 %254 %255 + %254 = OpLabel + %257 = OpFOrdEqual %v4bool %253 %256 + %258 = OpAll %bool %257 + OpBranch %255 + %255 = OpLabel + %259 = OpPhi %bool %false %242 %258 %254 + OpStore %_0_ok %259 + %260 = OpVectorShuffle %v2float %253 %253 2 3 + %261 = OpVectorTimesScalar %v2float %260 %float_2 + %262 = OpLoad %v4float %_3_x + %263 = OpVectorShuffle %v4float %262 %261 4 5 2 3 + OpStore %_3_x %263 + OpSelectionMerge %265 None + OpBranchConditional %259 %264 %265 + %264 = OpLabel + %269 = OpFOrdEqual %v4bool %263 %268 + %270 = OpAll %bool %269 + OpBranch %265 + %265 = OpLabel + %271 = OpPhi %bool %false %255 %270 %264 + OpStore %_0_ok %271 + %273 = OpVectorTimesScalar %v4float %213 %float_5 + %274 = OpVectorShuffle %v4float %273 %273 1 0 3 2 + OpStore %_3_x %274 + OpSelectionMerge %276 None + OpBranchConditional %271 %275 %276 + %275 = OpLabel + %278 = OpFOrdEqual %v4bool %274 %277 + %279 = OpAll %bool %278 + OpBranch %276 + %276 = OpLabel + %280 = OpPhi %bool %false %265 %279 %275 + OpStore %_0_ok %280 + %281 = OpFAdd %v4float %219 %213 + OpStore %_3_x %281 + OpSelectionMerge %283 None + OpBranchConditional %280 %282 %283 + %282 = OpLabel + %284 = OpFOrdEqual %v4bool %281 %224 + %285 = OpAll %bool %284 + OpBranch %283 + %283 = OpLabel + %286 = OpPhi %bool %false %276 %285 %282 + OpStore %_0_ok %286 + %288 = OpVectorShuffle %v4float %216 %216 1 3 0 2 + %290 = OpFSub %v4float %289 %288 + OpStore %_3_x %290 + OpSelectionMerge %292 None + OpBranchConditional %286 %291 %292 + %291 = OpLabel + %294 = OpFOrdEqual %v4bool %290 %293 + %295 = OpAll %bool %294 + OpBranch %292 + %292 = OpLabel + %296 = OpPhi %bool %false %283 %295 %291 + OpStore %_0_ok %296 + %297 = OpCompositeExtract %float %213 0 + %298 = OpCompositeConstruct %v4float %297 %297 %297 %297 + %299 = OpFAdd %v4float %298 %216 + OpStore %_3_x %299 + OpSelectionMerge %301 None + OpBranchConditional %296 %300 %301 + %300 = OpLabel + %303 = OpFOrdEqual %v4bool %299 %302 + %304 = OpAll %bool %303 + OpBranch %301 + %301 = OpLabel + %305 = OpPhi %bool %false %292 %304 %300 + OpStore %_0_ok %305 + %307 = OpVectorShuffle %v3float %216 %216 3 1 3 + %308 = OpVectorTimesScalar %v3float %307 %float_8 + %309 = OpLoad %v4float %_3_x + %310 = OpVectorShuffle %v4float %309 %308 4 5 6 3 + OpStore %_3_x %310 + OpSelectionMerge %312 None + OpBranchConditional %305 %311 %312 + %311 = OpLabel + %314 = OpFOrdEqual %v4bool %310 %313 + %315 = OpAll %bool %314 + OpBranch %312 + %312 = OpLabel + %316 = OpPhi %bool %false %301 %315 %311 + OpStore %_0_ok %316 + %318 = OpVectorShuffle %v2float %310 %310 2 3 + %320 = OpFDiv %v2float %319 %318 + %321 = OpLoad %v4float %_3_x + %322 = OpVectorShuffle %v4float %321 %320 4 5 2 3 + OpStore %_3_x %322 + OpSelectionMerge %324 None + OpBranchConditional %316 %323 %324 + %323 = OpLabel + %327 = OpFOrdEqual %v4bool %322 %326 + %328 = OpAll %bool %327 + OpBranch %324 + %324 = OpLabel + %329 = OpPhi %bool %false %312 %328 %323 + OpStore %_0_ok %329 + %331 = OpFDiv %v4float %330 %322 + %332 = OpVectorShuffle %v4float %331 %331 1 0 3 2 + OpStore %_3_x %332 + OpSelectionMerge %334 None + OpBranchConditional %329 %333 %334 + %333 = OpLabel + %336 = OpFOrdEqual %v4bool %332 %335 + %337 = OpAll %bool %336 + OpBranch %334 + %334 = OpLabel + %338 = OpPhi %bool %false %324 %337 %333 + OpStore %_0_ok %338 + %339 = OpFAdd %v4float %332 %219 + OpStore %_3_x %339 + %340 = OpVectorTimesScalar %v4float %339 %float_2 + OpStore %_3_x %340 + %342 = OpFSub %v4float %340 %341 + OpStore %_3_x %342 + %344 = OpVectorTimesScalar %v4float %342 %float_0_5 + OpStore %_3_x %344 + OpSelectionMerge %346 None + OpBranchConditional %338 %345 %346 + %345 = OpLabel + %347 = OpFOrdEqual %v4bool %344 %335 + %348 = OpAll %bool %347 + OpBranch %346 + %346 = OpLabel + %349 = OpPhi %bool %false %334 %348 %345 + OpStore %_0_ok %349 + %350 = OpFAdd %v4float %344 %219 + OpStore %_3_x %350 + %351 = OpVectorTimesScalar %v4float %350 %float_2 + OpStore %_3_x %351 + %352 = OpFSub %v4float %351 %341 + OpStore %_3_x %352 + %353 = OpVectorTimesScalar %v4float %352 %float_0_5 + OpStore %_3_x %353 + OpSelectionMerge %355 None + OpBranchConditional %349 %354 %355 + %354 = OpLabel + %356 = OpFOrdEqual %v4bool %353 %335 + %357 = OpAll %bool %356 + OpBranch %355 + %355 = OpLabel + %358 = OpPhi %bool %false %346 %357 %354 + OpStore %_0_ok %358 + OpSelectionMerge %360 None + OpBranchConditional %358 %359 %360 + %359 = OpLabel + %361 = OpFunctionCall %bool %test_int_b + OpBranch %360 + %360 = OpLabel + %362 = OpPhi %bool %false %355 %361 %359 + OpSelectionMerge %366 None + OpBranchConditional %362 %364 %365 + %364 = OpLabel + %367 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1 + %368 = OpLoad %v4float %367 + OpStore %363 %368 + OpBranch %366 + %365 = OpLabel + %369 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0 + %370 = OpLoad %v4float %369 + OpStore %363 %370 + OpBranch %366 + %366 = OpLabel + %371 = OpLoad %v4float %363 + OpReturnValue %371 + OpFunctionEnd diff --git a/tests/sksl/shared/VectorScalarMath.skrp b/tests/sksl/shared/VectorScalarMath.skrp index eb8bdfface63..68343498772f 100644 --- a/tests/sksl/shared/VectorScalarMath.skrp +++ b/tests/sksl/shared/VectorScalarMath.skrp @@ -1,3 +1,95 @@ +412 instructions + +[immutable slots] +i0 = 0x40400000 (3.0) +i1 = 0x40000000 (2.0) +i2 = 0x40000000 (2.0) +i3 = 0x40400000 (3.0) +i4 = 0xBF800000 (-1.0) +i5 = 0xBF800000 (-1.0) +i6 = 0xC0000000 (-2.0) +i7 = 0xC0000000 (-2.0) +i8 = 0x40000000 (2.0) +i9 = 0x3F800000 (1.0) +i10 = 0x3F800000 (1.0) +i11 = 0x40000000 (2.0) +i12 = 0x41100000 (9.0) +i13 = 0x41100000 (9.0) +i14 = 0x41100000 (9.0) +i15 = 0x40000000 (2.0) +i16 = 0x41900000 (18.0) +i17 = 0x40800000 (4.0) +i18 = 0x41100000 (9.0) +i19 = 0x40000000 (2.0) +i20 = 0 +i21 = 0x40A00000 (5.0) +i22 = 0x40A00000 (5.0) +i23 = 0 +i24 = 0x41100000 (9.0) +i25 = 0x41100000 (9.0) +i26 = 0x41200000 (10.0) +i27 = 0x41200000 (10.0) +i28 = 0x3F800000 (1.0) +i29 = 0x40000000 (2.0) +i30 = 0x3F800000 (1.0) +i31 = 0x40000000 (2.0) +i32 = 0x41000000 (8.0) +i33 = 0x41000000 (8.0) +i34 = 0x41000000 (8.0) +i35 = 0x40000000 (2.0) +i36 = 0x40800000 (4.0) +i37 = 0x41800000 (16.0) +i38 = 0x41000000 (8.0) +i39 = 0x40000000 (2.0) +i40 = 0x40000000 (2.0) +i41 = 0x41000000 (8.0) +i42 = 0x41800000 (16.0) +i43 = 0x40800000 (4.0) +i44 = 0x00000003 (4.203895e-45) +i45 = 0x00000002 (2.802597e-45) +i46 = 0x00000002 (2.802597e-45) +i47 = 0x00000003 (4.203895e-45) +i48 = 0xFFFFFFFF +i49 = 0xFFFFFFFF +i50 = 0xFFFFFFFE +i51 = 0xFFFFFFFE +i52 = 0x00000002 (2.802597e-45) +i53 = 0x00000001 (1.401298e-45) +i54 = 0x00000001 (1.401298e-45) +i55 = 0x00000002 (2.802597e-45) +i56 = 0x00000009 (1.261169e-44) +i57 = 0x00000009 (1.261169e-44) +i58 = 0x00000009 (1.261169e-44) +i59 = 0x00000002 (2.802597e-45) +i60 = 0x00000002 (2.802597e-45) +i61 = 0 +i62 = 0x00000009 (1.261169e-44) +i63 = 0x00000002 (2.802597e-45) +i64 = 0 +i65 = 0x00000005 (7.006492e-45) +i66 = 0x00000005 (7.006492e-45) +i67 = 0 +i68 = 0x00000009 (1.261169e-44) +i69 = 0x00000009 (1.261169e-44) +i70 = 0x0000000A (1.401298e-44) +i71 = 0x0000000A (1.401298e-44) +i72 = 0x00000001 (1.401298e-45) +i73 = 0x00000002 (2.802597e-45) +i74 = 0x00000001 (1.401298e-45) +i75 = 0x00000002 (2.802597e-45) +i76 = 0x00000008 (1.121039e-44) +i77 = 0x00000008 (1.121039e-44) +i78 = 0x00000008 (1.121039e-44) +i79 = 0x00000002 (2.802597e-45) +i80 = 0x00000004 (5.605194e-45) +i81 = 0x00000012 (2.522337e-44) +i82 = 0x00000008 (1.121039e-44) +i83 = 0x00000002 (2.802597e-45) +i84 = 0x00000002 (2.802597e-45) +i85 = 0x00000009 (1.261169e-44) +i86 = 0x00000012 (2.522337e-44) +i87 = 0x00000004 (5.605194e-45) + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_constant _0_ok = 0xFFFFFFFF @@ -9,9 +101,7 @@ add_4_floats $0..3 += $4..7 copy_4_slots_unmasked _3_x = $0..3 copy_slot_unmasked $0 = _0_ok copy_4_slots_unmasked $1..4 = _3_x -copy_constant $5 = 0x40400000 (3.0) -splat_2_constants $6..7 = 0x40000000 (2.0) -copy_constant $8 = 0x40400000 (3.0) +copy_4_immutables_unmasked $5..8 = i0..3 [0x40400000 (3.0), 0x40000000 (2.0), 0x40000000 (2.0), 0x40400000 (3.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -24,8 +114,7 @@ sub_4_floats $0..3 -= $4..7 copy_4_slots_unmasked _3_x = $0..3 copy_slot_unmasked $0 = _0_ok copy_4_slots_unmasked $1..4 = _3_x -splat_2_constants $5..6 = 0xBF800000 (-1.0) -splat_2_constants $7..8 = 0xC0000000 (-2.0) +copy_4_immutables_unmasked $5..8 = i4..7 [0xBF800000 (-1.0), 0xBF800000 (-1.0), 0xC0000000 (-2.0), 0xC0000000 (-2.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -38,9 +127,7 @@ add_4_floats $0..3 += $4..7 copy_4_slots_unmasked _3_x = $0..3 copy_slot_unmasked $0 = _0_ok copy_4_slots_unmasked $1..4 = _3_x -copy_constant $5 = 0x40000000 (2.0) -splat_2_constants $6..7 = 0x3F800000 (1.0) -copy_constant $8 = 0x40000000 (2.0) +copy_4_immutables_unmasked $5..8 = i8..11 [0x40000000 (2.0), 0x3F800000 (1.0), 0x3F800000 (1.0), 0x40000000 (2.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -53,8 +140,7 @@ mul_3_floats $0..2 *= $3..5 copy_3_slots_unmasked _3_x(0..2) = $0..2 copy_slot_unmasked $0 = _0_ok copy_4_slots_unmasked $1..4 = _3_x -splat_3_constants $5..7 = 0x41100000 (9.0) -copy_constant $8 = 0x40000000 (2.0) +copy_4_immutables_unmasked $5..8 = i12..15 [0x41100000 (9.0), 0x41100000 (9.0), 0x41100000 (9.0), 0x40000000 (2.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -66,10 +152,7 @@ mul_2_floats $0..1 *= $2..3 copy_2_slots_unmasked _3_x(0..1) = $0..1 copy_slot_unmasked $0 = _0_ok copy_4_slots_unmasked $1..4 = _3_x -copy_constant $5 = 0x41900000 (18.0) -copy_constant $6 = 0x40800000 (4.0) -copy_constant $7 = 0x41100000 (9.0) -copy_constant $8 = 0x40000000 (2.0) +copy_4_immutables_unmasked $5..8 = i16..19 [0x41900000 (18.0), 0x40800000 (4.0), 0x41100000 (9.0), 0x40000000 (2.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -82,9 +165,7 @@ swizzle_4 $0..3 = ($0..3).yxwz copy_4_slots_unmasked _3_x = $0..3 copy_slot_unmasked $0 = _0_ok copy_4_slots_unmasked $1..4 = _3_x -copy_constant $5 = 0 -splat_2_constants $6..7 = 0x40A00000 (5.0) -copy_constant $8 = 0 +copy_4_immutables_unmasked $5..8 = i20..23 [0, 0x40A00000 (5.0), 0x40A00000 (5.0), 0] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -96,9 +177,7 @@ add_4_floats $0..3 += $4..7 copy_4_slots_unmasked _3_x = $0..3 copy_slot_unmasked $0 = _0_ok copy_4_slots_unmasked $1..4 = _3_x -copy_constant $5 = 0x40400000 (3.0) -splat_2_constants $6..7 = 0x40000000 (2.0) -copy_constant $8 = 0x40400000 (3.0) +copy_4_immutables_unmasked $5..8 = i0..3 [0x40400000 (3.0), 0x40000000 (2.0), 0x40000000 (2.0), 0x40400000 (3.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -111,8 +190,7 @@ sub_4_floats $0..3 -= $4..7 copy_4_slots_unmasked _3_x = $0..3 copy_slot_unmasked $0 = _0_ok copy_4_slots_unmasked $1..4 = _3_x -splat_2_constants $5..6 = 0x41100000 (9.0) -splat_2_constants $7..8 = 0x41200000 (10.0) +copy_4_immutables_unmasked $5..8 = i24..27 [0x41100000 (9.0), 0x41100000 (9.0), 0x41200000 (10.0), 0x41200000 (10.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -125,10 +203,7 @@ add_4_floats $0..3 += $4..7 copy_4_slots_unmasked _3_x = $0..3 copy_slot_unmasked $0 = _0_ok copy_4_slots_unmasked $1..4 = _3_x -copy_constant $5 = 0x3F800000 (1.0) -copy_constant $6 = 0x40000000 (2.0) -copy_constant $7 = 0x3F800000 (1.0) -copy_constant $8 = 0x40000000 (2.0) +copy_4_immutables_unmasked $5..8 = i28..31 [0x3F800000 (1.0), 0x40000000 (2.0), 0x3F800000 (1.0), 0x40000000 (2.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -141,8 +216,7 @@ mul_3_floats $0..2 *= $3..5 copy_3_slots_unmasked _3_x(0..2) = $0..2 copy_slot_unmasked $0 = _0_ok copy_4_slots_unmasked $1..4 = _3_x -splat_3_constants $5..7 = 0x41000000 (8.0) -copy_constant $8 = 0x40000000 (2.0) +copy_4_immutables_unmasked $5..8 = i32..35 [0x41000000 (8.0), 0x41000000 (8.0), 0x41000000 (8.0), 0x40000000 (2.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -154,10 +228,7 @@ div_2_floats $0..1 /= $2..3 copy_2_slots_unmasked _3_x(0..1) = $0..1 copy_slot_unmasked $0 = _0_ok copy_4_slots_unmasked $1..4 = _3_x -copy_constant $5 = 0x40800000 (4.0) -copy_constant $6 = 0x41800000 (16.0) -copy_constant $7 = 0x41000000 (8.0) -copy_constant $8 = 0x40000000 (2.0) +copy_4_immutables_unmasked $5..8 = i36..39 [0x40800000 (4.0), 0x41800000 (16.0), 0x41000000 (8.0), 0x40000000 (2.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -170,10 +241,7 @@ swizzle_4 $0..3 = ($0..3).yxwz copy_4_slots_unmasked _3_x = $0..3 copy_slot_unmasked $0 = _0_ok copy_4_slots_unmasked $1..4 = _3_x -copy_constant $5 = 0x40000000 (2.0) -copy_constant $6 = 0x41000000 (8.0) -copy_constant $7 = 0x41800000 (16.0) -copy_constant $8 = 0x40800000 (4.0) +copy_4_immutables_unmasked $5..8 = i40..43 [0x40000000 (2.0), 0x41000000 (8.0), 0x41800000 (16.0), 0x40800000 (4.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -194,10 +262,7 @@ mul_4_floats $0..3 *= $4..7 copy_4_slots_unmasked _3_x = $0..3 copy_slot_unmasked $0 = _0_ok copy_4_slots_unmasked $1..4 = _3_x -copy_constant $5 = 0x40000000 (2.0) -copy_constant $6 = 0x41000000 (8.0) -copy_constant $7 = 0x41800000 (16.0) -copy_constant $8 = 0x40800000 (4.0) +copy_4_immutables_unmasked $5..8 = i40..43 [0x40000000 (2.0), 0x41000000 (8.0), 0x41800000 (16.0), 0x40800000 (4.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -218,10 +283,7 @@ mul_4_floats $0..3 *= $4..7 copy_4_slots_unmasked _3_x = $0..3 copy_slot_unmasked $0 = _0_ok copy_4_slots_unmasked $1..4 = _3_x -copy_constant $5 = 0x40000000 (2.0) -copy_constant $6 = 0x41000000 (8.0) -copy_constant $7 = 0x41800000 (16.0) -copy_constant $8 = 0x40800000 (4.0) +copy_4_immutables_unmasked $5..8 = i40..43 [0x40000000 (2.0), 0x41000000 (8.0), 0x41800000 (16.0), 0x40800000 (4.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -231,7 +293,7 @@ store_condition_mask $12 = CondMask copy_slot_unmasked $13 = _0_ok copy_constant $0 = 0 merge_condition_mask CondMask = $12 & $13 -branch_if_no_lanes_active branch_if_no_lanes_active +234 (label 1 at #468) +branch_if_no_lanes_active branch_if_no_lanes_active +204 (label 1 at #408) copy_constant ok = 0xFFFFFFFF copy_4_uniforms $1..4 = colorRed cast_to_int_from_4_floats $1..4 = FloatToInt($1..4) @@ -245,9 +307,7 @@ add_4_ints $1..4 += $5..8 copy_4_slots_unmasked x = $1..4 copy_slot_unmasked $1 = ok copy_4_slots_unmasked $2..5 = x -copy_constant $6 = 0x00000003 (4.203895e-45) -splat_2_constants $7..8 = 0x00000002 (2.802597e-45) -copy_constant $9 = 0x00000003 (4.203895e-45) +copy_4_immutables_unmasked $6..9 = i44..47 [0x00000003 (4.203895e-45), 0x00000002 (2.802597e-45), 0x00000002 (2.802597e-45), 0x00000003 (4.203895e-45)] cmpeq_4_ints $2..5 = equal($2..5, $6..9) bitwise_and_2_ints $2..3 &= $4..5 bitwise_and_int $2 &= $3 @@ -260,8 +320,7 @@ sub_4_ints $1..4 -= $5..8 copy_4_slots_masked x = Mask($1..4) copy_slot_unmasked $1 = ok copy_4_slots_unmasked $2..5 = x -splat_2_constants $6..7 = 0xFFFFFFFF -splat_2_constants $8..9 = 0xFFFFFFFE +copy_4_immutables_unmasked $6..9 = i48..51 [0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFE, 0xFFFFFFFE] cmpeq_4_ints $2..5 = equal($2..5, $6..9) bitwise_and_2_ints $2..3 &= $4..5 bitwise_and_int $2 &= $3 @@ -274,9 +333,7 @@ add_4_ints $1..4 += $5..8 copy_4_slots_masked x = Mask($1..4) copy_slot_unmasked $1 = ok copy_4_slots_unmasked $2..5 = x -copy_constant $6 = 0x00000002 (2.802597e-45) -splat_2_constants $7..8 = 0x00000001 (1.401298e-45) -copy_constant $9 = 0x00000002 (2.802597e-45) +copy_4_immutables_unmasked $6..9 = i52..55 [0x00000002 (2.802597e-45), 0x00000001 (1.401298e-45), 0x00000001 (1.401298e-45), 0x00000002 (2.802597e-45)] cmpeq_4_ints $2..5 = equal($2..5, $6..9) bitwise_and_2_ints $2..3 &= $4..5 bitwise_and_int $2 &= $3 @@ -289,8 +346,7 @@ mul_3_ints $1..3 *= $4..6 copy_3_slots_masked x(0..2) = Mask($1..3) copy_slot_unmasked $1 = ok copy_4_slots_unmasked $2..5 = x -splat_3_constants $6..8 = 0x00000009 (1.261169e-44) -copy_constant $9 = 0x00000002 (2.802597e-45) +copy_4_immutables_unmasked $6..9 = i56..59 [0x00000009 (1.261169e-44), 0x00000009 (1.261169e-44), 0x00000009 (1.261169e-44), 0x00000002 (2.802597e-45)] cmpeq_4_ints $2..5 = equal($2..5, $6..9) bitwise_and_2_ints $2..3 &= $4..5 bitwise_and_int $2 &= $3 @@ -302,10 +358,7 @@ div_2_ints $1..2 /= $3..4 copy_2_slots_masked x(0..1) = Mask($1..2) copy_slot_unmasked $1 = ok copy_4_slots_unmasked $2..5 = x -copy_constant $6 = 0x00000002 (2.802597e-45) -copy_constant $7 = 0 -copy_constant $8 = 0x00000009 (1.261169e-44) -copy_constant $9 = 0x00000002 (2.802597e-45) +copy_4_immutables_unmasked $6..9 = i60..63 [0x00000002 (2.802597e-45), 0, 0x00000009 (1.261169e-44), 0x00000002 (2.802597e-45)] cmpeq_4_ints $2..5 = equal($2..5, $6..9) bitwise_and_2_ints $2..3 &= $4..5 bitwise_and_int $2 &= $3 @@ -318,9 +371,7 @@ swizzle_4 $1..4 = ($1..4).yxwz copy_4_slots_masked x = Mask($1..4) copy_slot_unmasked $1 = ok copy_4_slots_unmasked $2..5 = x -copy_constant $6 = 0 -splat_2_constants $7..8 = 0x00000005 (7.006492e-45) -copy_constant $9 = 0 +copy_4_immutables_unmasked $6..9 = i64..67 [0, 0x00000005 (7.006492e-45), 0x00000005 (7.006492e-45), 0] cmpeq_4_ints $2..5 = equal($2..5, $6..9) bitwise_and_2_ints $2..3 &= $4..5 bitwise_and_int $2 &= $3 @@ -332,9 +383,7 @@ add_4_ints $1..4 += $5..8 copy_4_slots_masked x = Mask($1..4) copy_slot_unmasked $1 = ok copy_4_slots_unmasked $2..5 = x -copy_constant $6 = 0x00000003 (4.203895e-45) -splat_2_constants $7..8 = 0x00000002 (2.802597e-45) -copy_constant $9 = 0x00000003 (4.203895e-45) +copy_4_immutables_unmasked $6..9 = i44..47 [0x00000003 (4.203895e-45), 0x00000002 (2.802597e-45), 0x00000002 (2.802597e-45), 0x00000003 (4.203895e-45)] cmpeq_4_ints $2..5 = equal($2..5, $6..9) bitwise_and_2_ints $2..3 &= $4..5 bitwise_and_int $2 &= $3 @@ -347,8 +396,7 @@ sub_4_ints $1..4 -= $5..8 copy_4_slots_masked x = Mask($1..4) copy_slot_unmasked $1 = ok copy_4_slots_unmasked $2..5 = x -splat_2_constants $6..7 = 0x00000009 (1.261169e-44) -splat_2_constants $8..9 = 0x0000000A (1.401298e-44) +copy_4_immutables_unmasked $6..9 = i68..71 [0x00000009 (1.261169e-44), 0x00000009 (1.261169e-44), 0x0000000A (1.401298e-44), 0x0000000A (1.401298e-44)] cmpeq_4_ints $2..5 = equal($2..5, $6..9) bitwise_and_2_ints $2..3 &= $4..5 bitwise_and_int $2 &= $3 @@ -361,10 +409,7 @@ add_4_ints $1..4 += $5..8 copy_4_slots_masked x = Mask($1..4) copy_slot_unmasked $1 = ok copy_4_slots_unmasked $2..5 = x -copy_constant $6 = 0x00000001 (1.401298e-45) -copy_constant $7 = 0x00000002 (2.802597e-45) -copy_constant $8 = 0x00000001 (1.401298e-45) -copy_constant $9 = 0x00000002 (2.802597e-45) +copy_4_immutables_unmasked $6..9 = i72..75 [0x00000001 (1.401298e-45), 0x00000002 (2.802597e-45), 0x00000001 (1.401298e-45), 0x00000002 (2.802597e-45)] cmpeq_4_ints $2..5 = equal($2..5, $6..9) bitwise_and_2_ints $2..3 &= $4..5 bitwise_and_int $2 &= $3 @@ -377,8 +422,7 @@ mul_3_ints $1..3 *= $4..6 copy_3_slots_masked x(0..2) = Mask($1..3) copy_slot_unmasked $1 = ok copy_4_slots_unmasked $2..5 = x -splat_3_constants $6..8 = 0x00000008 (1.121039e-44) -copy_constant $9 = 0x00000002 (2.802597e-45) +copy_4_immutables_unmasked $6..9 = i76..79 [0x00000008 (1.121039e-44), 0x00000008 (1.121039e-44), 0x00000008 (1.121039e-44), 0x00000002 (2.802597e-45)] cmpeq_4_ints $2..5 = equal($2..5, $6..9) bitwise_and_2_ints $2..3 &= $4..5 bitwise_and_int $2 &= $3 @@ -390,10 +434,7 @@ div_2_ints $1..2 /= $3..4 copy_2_slots_masked x(0..1) = Mask($1..2) copy_slot_unmasked $1 = ok copy_4_slots_unmasked $2..5 = x -copy_constant $6 = 0x00000004 (5.605194e-45) -copy_constant $7 = 0x00000012 (2.522337e-44) -copy_constant $8 = 0x00000008 (1.121039e-44) -copy_constant $9 = 0x00000002 (2.802597e-45) +copy_4_immutables_unmasked $6..9 = i80..83 [0x00000004 (5.605194e-45), 0x00000012 (2.522337e-44), 0x00000008 (1.121039e-44), 0x00000002 (2.802597e-45)] cmpeq_4_ints $2..5 = equal($2..5, $6..9) bitwise_and_2_ints $2..3 &= $4..5 bitwise_and_int $2 &= $3 @@ -406,10 +447,7 @@ swizzle_4 $1..4 = ($1..4).yxwz copy_4_slots_masked x = Mask($1..4) copy_slot_unmasked $1 = ok copy_4_slots_unmasked $2..5 = x -copy_constant $6 = 0x00000002 (2.802597e-45) -copy_constant $7 = 0x00000009 (1.261169e-44) -copy_constant $8 = 0x00000012 (2.522337e-44) -copy_constant $9 = 0x00000004 (5.605194e-45) +copy_4_immutables_unmasked $6..9 = i84..87 [0x00000002 (2.802597e-45), 0x00000009 (1.261169e-44), 0x00000012 (2.522337e-44), 0x00000004 (5.605194e-45)] cmpeq_4_ints $2..5 = equal($2..5, $6..9) bitwise_and_2_ints $2..3 &= $4..5 bitwise_and_int $2 &= $3 @@ -430,10 +468,7 @@ div_4_ints $1..4 /= $5..8 copy_4_slots_masked x = Mask($1..4) copy_slot_unmasked $1 = ok copy_4_slots_unmasked $2..5 = x -copy_constant $6 = 0x00000002 (2.802597e-45) -copy_constant $7 = 0x00000009 (1.261169e-44) -copy_constant $8 = 0x00000012 (2.522337e-44) -copy_constant $9 = 0x00000004 (5.605194e-45) +copy_4_immutables_unmasked $6..9 = i84..87 [0x00000002 (2.802597e-45), 0x00000009 (1.261169e-44), 0x00000012 (2.522337e-44), 0x00000004 (5.605194e-45)] cmpeq_4_ints $2..5 = equal($2..5, $6..9) bitwise_and_2_ints $2..3 &= $4..5 bitwise_and_int $2 &= $3 @@ -454,10 +489,7 @@ div_4_ints $1..4 /= $5..8 copy_4_slots_masked x = Mask($1..4) copy_slot_unmasked $1 = ok copy_4_slots_unmasked $2..5 = x -copy_constant $6 = 0x00000002 (2.802597e-45) -copy_constant $7 = 0x00000009 (1.261169e-44) -copy_constant $8 = 0x00000012 (2.522337e-44) -copy_constant $9 = 0x00000004 (5.605194e-45) +copy_4_immutables_unmasked $6..9 = i84..87 [0x00000002 (2.802597e-45), 0x00000009 (1.261169e-44), 0x00000012 (2.522337e-44), 0x00000004 (5.605194e-45)] cmpeq_4_ints $2..5 = equal($2..5, $6..9) bitwise_and_2_ints $2..3 &= $4..5 bitwise_and_int $2 &= $3 diff --git a/tests/sksl/shared/VectorScalarMath.wgsl b/tests/sksl/shared/VectorScalarMath.wgsl new file mode 100644 index 000000000000..279924fd6ea8 --- /dev/null +++ b/tests/sksl/shared/VectorScalarMath.wgsl @@ -0,0 +1,117 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorRed: vec4, + colorGreen: vec4, + unknownInput: f32, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn test_int_b() -> bool { + { + var ok: bool = true; + var inputRed: vec4 = vec4(_globalUniforms.colorRed); + var inputGreen: vec4 = vec4(_globalUniforms.colorGreen); + var x: vec4 = inputRed + 2; + ok = ok && all(x == vec4(3, 2, 2, 3)); + x = inputGreen.ywxz - 2; + ok = ok && all(x == vec4(-1, -1, -2, -2)); + x = inputRed + inputGreen.y; + ok = ok && all(x == vec4(2, 1, 1, 2)); + x = vec4((inputGreen.wyw * 9), x.w).xyzw; + ok = ok && all(x == vec4(9, 9, 9, 2)); + x = vec4((x.zw / 4), x.zw).xyzw; + ok = ok && all(x == vec4(2, 0, 9, 2)); + x = (inputRed * 5).yxwz; + ok = ok && all(x == vec4(0, 5, 5, 0)); + x = 2 + inputRed; + ok = ok && all(x == vec4(3, 2, 2, 3)); + x = 10 - inputGreen.ywxz; + ok = ok && all(x == vec4(9, 9, 10, 10)); + x = inputRed.x + inputGreen; + ok = ok && all(x == vec4(1, 2, 1, 2)); + x = vec4((8 * inputGreen.wyw), x.w).xyzw; + ok = ok && all(x == vec4(8, 8, 8, 2)); + x = vec4((36 / x.zw), x.zw).xyzw; + ok = ok && all(x == vec4(4, 18, 8, 2)); + x = (37 / x).yxwz; + ok = ok && all(x == vec4(2, 9, 18, 4)); + x = x + 2; + x = x * 2; + x = x - 4; + x = x / 2; + ok = ok && all(x == vec4(2, 9, 18, 4)); + x = x + 2; + x = x * 2; + x = x - 4; + x = x / 2; + ok = ok && all(x == vec4(2, 9, 18, 4)); + return ok; + } +} +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var _0_ok: bool = true; + var _1_inputRed: vec4 = _globalUniforms.colorRed; + var _2_inputGreen: vec4 = _globalUniforms.colorGreen; + var _3_x: vec4 = _1_inputRed + 2.0; + _0_ok = _0_ok && all(_3_x == vec4(3.0, 2.0, 2.0, 3.0)); + _3_x = _2_inputGreen.ywxz - 2.0; + _0_ok = _0_ok && all(_3_x == vec4(-1.0, -1.0, -2.0, -2.0)); + _3_x = _1_inputRed + _2_inputGreen.y; + _0_ok = _0_ok && all(_3_x == vec4(2.0, 1.0, 1.0, 2.0)); + _3_x = vec4((_2_inputGreen.wyw * 9.0), _3_x.w).xyzw; + _0_ok = _0_ok && all(_3_x == vec4(9.0, 9.0, 9.0, 2.0)); + _3_x = vec4((_3_x.zw * 2.0), _3_x.zw).xyzw; + _0_ok = _0_ok && all(_3_x == vec4(18.0, 4.0, 9.0, 2.0)); + _3_x = (_1_inputRed * 5.0).yxwz; + _0_ok = _0_ok && all(_3_x == vec4(0.0, 5.0, 5.0, 0.0)); + _3_x = 2.0 + _1_inputRed; + _0_ok = _0_ok && all(_3_x == vec4(3.0, 2.0, 2.0, 3.0)); + _3_x = 10.0 - _2_inputGreen.ywxz; + _0_ok = _0_ok && all(_3_x == vec4(9.0, 9.0, 10.0, 10.0)); + _3_x = _1_inputRed.x + _2_inputGreen; + _0_ok = _0_ok && all(_3_x == vec4(1.0, 2.0, 1.0, 2.0)); + _3_x = vec4((8.0 * _2_inputGreen.wyw), _3_x.w).xyzw; + _0_ok = _0_ok && all(_3_x == vec4(8.0, 8.0, 8.0, 2.0)); + _3_x = vec4((32.0 / _3_x.zw), _3_x.zw).xyzw; + _0_ok = _0_ok && all(_3_x == vec4(4.0, 16.0, 8.0, 2.0)); + _3_x = (32.0 / _3_x).yxwz; + _0_ok = _0_ok && all(_3_x == vec4(2.0, 8.0, 16.0, 4.0)); + _3_x = _3_x + 2.0; + _3_x = _3_x * 2.0; + _3_x = _3_x - 4.0; + _3_x = _3_x * 0.5; + _0_ok = _0_ok && all(_3_x == vec4(2.0, 8.0, 16.0, 4.0)); + _3_x = _3_x + 2.0; + _3_x = _3_x * 2.0; + _3_x = _3_x - 4.0; + _3_x = _3_x * 0.5; + _0_ok = _0_ok && all(_3_x == vec4(2.0, 8.0, 16.0, 4.0)); + var _skTemp0: vec4; + var _skTemp1: bool; + if _0_ok { + let _skTemp2 = test_int_b(); + _skTemp1 = _skTemp2; + } else { + _skTemp1 = false; + } + if _skTemp1 { + _skTemp0 = _globalUniforms.colorGreen; + } else { + _skTemp0 = _globalUniforms.colorRed; + } + return _skTemp0; + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/VectorToMatrixCast.asm.frag b/tests/sksl/shared/VectorToMatrixCast.asm.frag index acba70f63a7d..70868a2b1948 100644 --- a/tests/sksl/shared/VectorToMatrixCast.asm.frag +++ b/tests/sksl/shared/VectorToMatrixCast.asm.frag @@ -1,469 +1,469 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpMemberName %_UniformBuffer 1 "colorRed" -OpMemberName %_UniformBuffer 2 "testInputs" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %ok "ok" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 1 Offset 16 -OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision -OpMemberDecorate %_UniformBuffer 2 Offset 32 -OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %38 RelaxedPrecision -OpDecorate %39 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %44 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %54 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -OpDecorate %79 RelaxedPrecision -OpDecorate %80 RelaxedPrecision -OpDecorate %81 RelaxedPrecision -OpDecorate %82 RelaxedPrecision -OpDecorate %83 RelaxedPrecision -OpDecorate %84 RelaxedPrecision -OpDecorate %85 RelaxedPrecision -OpDecorate %86 RelaxedPrecision -OpDecorate %90 RelaxedPrecision -OpDecorate %92 RelaxedPrecision -OpDecorate %99 RelaxedPrecision -OpDecorate %100 RelaxedPrecision -OpDecorate %101 RelaxedPrecision -OpDecorate %102 RelaxedPrecision -OpDecorate %103 RelaxedPrecision -OpDecorate %104 RelaxedPrecision -OpDecorate %105 RelaxedPrecision -OpDecorate %106 RelaxedPrecision -OpDecorate %107 RelaxedPrecision -OpDecorate %109 RelaxedPrecision -OpDecorate %116 RelaxedPrecision -OpDecorate %117 RelaxedPrecision -OpDecorate %119 RelaxedPrecision -OpDecorate %121 RelaxedPrecision -OpDecorate %123 RelaxedPrecision -OpDecorate %128 RelaxedPrecision -OpDecorate %130 RelaxedPrecision -OpDecorate %132 RelaxedPrecision -OpDecorate %134 RelaxedPrecision -OpDecorate %135 RelaxedPrecision -OpDecorate %136 RelaxedPrecision -OpDecorate %137 RelaxedPrecision -OpDecorate %138 RelaxedPrecision -OpDecorate %139 RelaxedPrecision -OpDecorate %140 RelaxedPrecision -OpDecorate %141 RelaxedPrecision -OpDecorate %142 RelaxedPrecision -OpDecorate %143 RelaxedPrecision -OpDecorate %145 RelaxedPrecision -OpDecorate %152 RelaxedPrecision -OpDecorate %153 RelaxedPrecision -OpDecorate %154 RelaxedPrecision -OpDecorate %155 RelaxedPrecision -OpDecorate %156 RelaxedPrecision -OpDecorate %157 RelaxedPrecision -OpDecorate %158 RelaxedPrecision -OpDecorate %159 RelaxedPrecision -OpDecorate %160 RelaxedPrecision -OpDecorate %162 RelaxedPrecision -OpDecorate %169 RelaxedPrecision -OpDecorate %170 RelaxedPrecision -OpDecorate %171 RelaxedPrecision -OpDecorate %172 RelaxedPrecision -OpDecorate %173 RelaxedPrecision -OpDecorate %174 RelaxedPrecision -OpDecorate %175 RelaxedPrecision -OpDecorate %176 RelaxedPrecision -OpDecorate %177 RelaxedPrecision -OpDecorate %179 RelaxedPrecision -OpDecorate %186 RelaxedPrecision -OpDecorate %187 RelaxedPrecision -OpDecorate %189 RelaxedPrecision -OpDecorate %191 RelaxedPrecision -OpDecorate %193 RelaxedPrecision -OpDecorate %198 RelaxedPrecision -OpDecorate %200 RelaxedPrecision -OpDecorate %202 RelaxedPrecision -OpDecorate %204 RelaxedPrecision -OpDecorate %205 RelaxedPrecision -OpDecorate %206 RelaxedPrecision -OpDecorate %207 RelaxedPrecision -OpDecorate %208 RelaxedPrecision -OpDecorate %209 RelaxedPrecision -OpDecorate %210 RelaxedPrecision -OpDecorate %211 RelaxedPrecision -OpDecorate %212 RelaxedPrecision -OpDecorate %213 RelaxedPrecision -OpDecorate %215 RelaxedPrecision -OpDecorate %222 RelaxedPrecision -OpDecorate %225 RelaxedPrecision -OpDecorate %226 RelaxedPrecision -OpDecorate %227 RelaxedPrecision -OpDecorate %228 RelaxedPrecision -OpDecorate %229 RelaxedPrecision -OpDecorate %230 RelaxedPrecision -OpDecorate %231 RelaxedPrecision -OpDecorate %232 RelaxedPrecision -OpDecorate %233 RelaxedPrecision -OpDecorate %237 RelaxedPrecision -OpDecorate %239 RelaxedPrecision -OpDecorate %246 RelaxedPrecision -OpDecorate %249 RelaxedPrecision -OpDecorate %250 RelaxedPrecision -OpDecorate %251 RelaxedPrecision -OpDecorate %252 RelaxedPrecision -OpDecorate %253 RelaxedPrecision -OpDecorate %254 RelaxedPrecision -OpDecorate %255 RelaxedPrecision -OpDecorate %256 RelaxedPrecision -OpDecorate %260 RelaxedPrecision -OpDecorate %262 RelaxedPrecision -OpDecorate %272 RelaxedPrecision -OpDecorate %274 RelaxedPrecision -OpDecorate %275 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpMemberName %_UniformBuffer 1 "colorRed" + OpMemberName %_UniformBuffer 2 "testInputs" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %ok "ok" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 1 Offset 16 + OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision + OpMemberDecorate %_UniformBuffer 2 Offset 32 + OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %38 RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %44 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %54 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + OpDecorate %79 RelaxedPrecision + OpDecorate %80 RelaxedPrecision + OpDecorate %81 RelaxedPrecision + OpDecorate %82 RelaxedPrecision + OpDecorate %83 RelaxedPrecision + OpDecorate %84 RelaxedPrecision + OpDecorate %85 RelaxedPrecision + OpDecorate %86 RelaxedPrecision + OpDecorate %90 RelaxedPrecision + OpDecorate %92 RelaxedPrecision + OpDecorate %99 RelaxedPrecision + OpDecorate %100 RelaxedPrecision + OpDecorate %101 RelaxedPrecision + OpDecorate %102 RelaxedPrecision + OpDecorate %103 RelaxedPrecision + OpDecorate %104 RelaxedPrecision + OpDecorate %105 RelaxedPrecision + OpDecorate %106 RelaxedPrecision + OpDecorate %107 RelaxedPrecision + OpDecorate %109 RelaxedPrecision + OpDecorate %116 RelaxedPrecision + OpDecorate %117 RelaxedPrecision + OpDecorate %119 RelaxedPrecision + OpDecorate %121 RelaxedPrecision + OpDecorate %123 RelaxedPrecision + OpDecorate %128 RelaxedPrecision + OpDecorate %130 RelaxedPrecision + OpDecorate %132 RelaxedPrecision + OpDecorate %134 RelaxedPrecision + OpDecorate %135 RelaxedPrecision + OpDecorate %136 RelaxedPrecision + OpDecorate %137 RelaxedPrecision + OpDecorate %138 RelaxedPrecision + OpDecorate %139 RelaxedPrecision + OpDecorate %140 RelaxedPrecision + OpDecorate %141 RelaxedPrecision + OpDecorate %142 RelaxedPrecision + OpDecorate %143 RelaxedPrecision + OpDecorate %145 RelaxedPrecision + OpDecorate %152 RelaxedPrecision + OpDecorate %153 RelaxedPrecision + OpDecorate %154 RelaxedPrecision + OpDecorate %155 RelaxedPrecision + OpDecorate %156 RelaxedPrecision + OpDecorate %157 RelaxedPrecision + OpDecorate %158 RelaxedPrecision + OpDecorate %159 RelaxedPrecision + OpDecorate %160 RelaxedPrecision + OpDecorate %162 RelaxedPrecision + OpDecorate %169 RelaxedPrecision + OpDecorate %170 RelaxedPrecision + OpDecorate %171 RelaxedPrecision + OpDecorate %172 RelaxedPrecision + OpDecorate %173 RelaxedPrecision + OpDecorate %174 RelaxedPrecision + OpDecorate %175 RelaxedPrecision + OpDecorate %176 RelaxedPrecision + OpDecorate %177 RelaxedPrecision + OpDecorate %179 RelaxedPrecision + OpDecorate %186 RelaxedPrecision + OpDecorate %187 RelaxedPrecision + OpDecorate %189 RelaxedPrecision + OpDecorate %191 RelaxedPrecision + OpDecorate %193 RelaxedPrecision + OpDecorate %198 RelaxedPrecision + OpDecorate %200 RelaxedPrecision + OpDecorate %202 RelaxedPrecision + OpDecorate %204 RelaxedPrecision + OpDecorate %205 RelaxedPrecision + OpDecorate %206 RelaxedPrecision + OpDecorate %207 RelaxedPrecision + OpDecorate %208 RelaxedPrecision + OpDecorate %209 RelaxedPrecision + OpDecorate %210 RelaxedPrecision + OpDecorate %211 RelaxedPrecision + OpDecorate %212 RelaxedPrecision + OpDecorate %213 RelaxedPrecision + OpDecorate %215 RelaxedPrecision + OpDecorate %222 RelaxedPrecision + OpDecorate %225 RelaxedPrecision + OpDecorate %226 RelaxedPrecision + OpDecorate %227 RelaxedPrecision + OpDecorate %228 RelaxedPrecision + OpDecorate %229 RelaxedPrecision + OpDecorate %230 RelaxedPrecision + OpDecorate %231 RelaxedPrecision + OpDecorate %232 RelaxedPrecision + OpDecorate %233 RelaxedPrecision + OpDecorate %237 RelaxedPrecision + OpDecorate %239 RelaxedPrecision + OpDecorate %246 RelaxedPrecision + OpDecorate %249 RelaxedPrecision + OpDecorate %250 RelaxedPrecision + OpDecorate %251 RelaxedPrecision + OpDecorate %252 RelaxedPrecision + OpDecorate %253 RelaxedPrecision + OpDecorate %254 RelaxedPrecision + OpDecorate %255 RelaxedPrecision + OpDecorate %256 RelaxedPrecision + OpDecorate %260 RelaxedPrecision + OpDecorate %262 RelaxedPrecision + OpDecorate %272 RelaxedPrecision + OpDecorate %274 RelaxedPrecision + OpDecorate %275 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_bool = OpTypePointer Function %bool -%true = OpConstantTrue %bool -%false = OpConstantFalse %bool + %true = OpConstantTrue %bool + %false = OpConstantFalse %bool %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_2 = OpConstant %int 2 + %int = OpTypeInt 32 1 + %int_2 = OpConstant %int 2 %mat2v2float = OpTypeMatrix %v2float 2 %float_n1_25 = OpConstant %float -1.25 -%float_0_75 = OpConstant %float 0.75 -%float_2_25 = OpConstant %float 2.25 -%48 = OpConstantComposite %v2float %float_n1_25 %float_0 -%49 = OpConstantComposite %v2float %float_0_75 %float_2_25 -%50 = OpConstantComposite %mat2v2float %48 %49 -%v2bool = OpTypeVector %bool 2 -%int_0 = OpConstant %int 0 -%float_1 = OpConstant %float 1 -%88 = OpConstantComposite %v2float %float_0 %float_1 -%89 = OpConstantComposite %mat2v2float %88 %88 -%v4int = OpTypeVector %int 4 -%v4bool = OpTypeVector %bool 4 -%int_1 = OpConstant %int 1 -%float_n1 = OpConstant %float -1 -%235 = OpConstantComposite %v2float %float_n1 %float_1 -%236 = OpConstantComposite %mat2v2float %235 %19 -%float_5 = OpConstant %float 5 -%248 = OpConstantComposite %v4float %float_5 %float_5 %float_5 %float_5 -%float_6 = OpConstant %float 6 -%258 = OpConstantComposite %v2float %float_5 %float_6 -%259 = OpConstantComposite %mat2v2float %258 %258 + %float_0_75 = OpConstant %float 0.75 + %float_2_25 = OpConstant %float 2.25 + %48 = OpConstantComposite %v2float %float_n1_25 %float_0 + %49 = OpConstantComposite %v2float %float_0_75 %float_2_25 + %50 = OpConstantComposite %mat2v2float %48 %49 + %v2bool = OpTypeVector %bool 2 + %int_0 = OpConstant %int 0 + %float_1 = OpConstant %float 1 + %88 = OpConstantComposite %v2float %float_0 %float_1 + %89 = OpConstantComposite %mat2v2float %88 %88 + %v4int = OpTypeVector %int 4 + %v4bool = OpTypeVector %bool 4 + %int_1 = OpConstant %int 1 + %float_n1 = OpConstant %float -1 + %235 = OpConstantComposite %v2float %float_n1 %float_1 + %236 = OpConstantComposite %mat2v2float %235 %19 + %float_5 = OpConstant %float 5 + %248 = OpConstantComposite %v4float %float_5 %float_5 %float_5 %float_5 + %float_6 = OpConstant %float 6 + %258 = OpConstantComposite %v2float %float_5 %float_6 + %259 = OpConstantComposite %mat2v2float %258 %258 %_ptr_Function_v4float = OpTypePointer Function %v4float %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%ok = OpVariable %_ptr_Function_bool Function -%266 = OpVariable %_ptr_Function_v4float Function -OpStore %ok %true -OpSelectionMerge %31 None -OpBranchConditional %true %30 %31 -%30 = OpLabel -%32 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%36 = OpLoad %v4float %32 -%37 = OpCompositeExtract %float %36 0 -%38 = OpCompositeExtract %float %36 1 -%39 = OpCompositeExtract %float %36 2 -%40 = OpCompositeExtract %float %36 3 -%41 = OpCompositeConstruct %v2float %37 %38 -%42 = OpCompositeConstruct %v2float %39 %40 -%44 = OpCompositeConstruct %mat2v2float %41 %42 -%52 = OpFOrdEqual %v2bool %41 %48 -%53 = OpAll %bool %52 -%54 = OpFOrdEqual %v2bool %42 %49 -%55 = OpAll %bool %54 -%56 = OpLogicalAnd %bool %53 %55 -OpBranch %31 -%31 = OpLabel -%57 = OpPhi %bool %false %25 %56 %30 -OpStore %ok %57 -OpSelectionMerge %59 None -OpBranchConditional %57 %58 %59 -%58 = OpLabel -%60 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 -%61 = OpLoad %v4float %60 -%62 = OpCompositeExtract %float %61 0 -%63 = OpCompositeExtract %float %61 1 -%64 = OpCompositeExtract %float %61 2 -%65 = OpCompositeExtract %float %61 3 -%66 = OpCompositeConstruct %v2float %62 %63 -%67 = OpCompositeConstruct %v2float %64 %65 -%68 = OpCompositeConstruct %mat2v2float %66 %67 -%69 = OpFOrdEqual %v2bool %66 %48 -%70 = OpAll %bool %69 -%71 = OpFOrdEqual %v2bool %67 %49 -%72 = OpAll %bool %71 -%73 = OpLogicalAnd %bool %70 %72 -OpBranch %59 -%59 = OpLabel -%74 = OpPhi %bool %false %31 %73 %58 -OpStore %ok %74 -OpSelectionMerge %76 None -OpBranchConditional %74 %75 %76 -%75 = OpLabel -%77 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%79 = OpLoad %v4float %77 -%80 = OpCompositeExtract %float %79 0 -%81 = OpCompositeExtract %float %79 1 -%82 = OpCompositeExtract %float %79 2 -%83 = OpCompositeExtract %float %79 3 -%84 = OpCompositeConstruct %v2float %80 %81 -%85 = OpCompositeConstruct %v2float %82 %83 -%86 = OpCompositeConstruct %mat2v2float %84 %85 -%90 = OpFOrdEqual %v2bool %84 %88 -%91 = OpAll %bool %90 -%92 = OpFOrdEqual %v2bool %85 %88 -%93 = OpAll %bool %92 -%94 = OpLogicalAnd %bool %91 %93 -OpBranch %76 -%76 = OpLabel -%95 = OpPhi %bool %false %59 %94 %75 -OpStore %ok %95 -OpSelectionMerge %97 None -OpBranchConditional %95 %96 %97 -%96 = OpLabel -%98 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%99 = OpLoad %v4float %98 -%100 = OpCompositeExtract %float %99 0 -%101 = OpCompositeExtract %float %99 1 -%102 = OpCompositeExtract %float %99 2 -%103 = OpCompositeExtract %float %99 3 -%104 = OpCompositeConstruct %v2float %100 %101 -%105 = OpCompositeConstruct %v2float %102 %103 -%106 = OpCompositeConstruct %mat2v2float %104 %105 -%107 = OpFOrdEqual %v2bool %104 %88 -%108 = OpAll %bool %107 -%109 = OpFOrdEqual %v2bool %105 %88 -%110 = OpAll %bool %109 -%111 = OpLogicalAnd %bool %108 %110 -OpBranch %97 -%97 = OpLabel -%112 = OpPhi %bool %false %76 %111 %96 -OpStore %ok %112 -OpSelectionMerge %114 None -OpBranchConditional %112 %113 %114 -%113 = OpLabel -%115 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%116 = OpLoad %v4float %115 -%117 = OpCompositeExtract %float %116 0 -%118 = OpConvertFToS %int %117 -%119 = OpCompositeExtract %float %116 1 -%120 = OpConvertFToS %int %119 -%121 = OpCompositeExtract %float %116 2 -%122 = OpConvertFToS %int %121 -%123 = OpCompositeExtract %float %116 3 -%124 = OpConvertFToS %int %123 -%126 = OpCompositeConstruct %v4int %118 %120 %122 %124 -%127 = OpCompositeExtract %int %126 0 -%128 = OpConvertSToF %float %127 -%129 = OpCompositeExtract %int %126 1 -%130 = OpConvertSToF %float %129 -%131 = OpCompositeExtract %int %126 2 -%132 = OpConvertSToF %float %131 -%133 = OpCompositeExtract %int %126 3 -%134 = OpConvertSToF %float %133 -%135 = OpCompositeConstruct %v4float %128 %130 %132 %134 -%136 = OpCompositeExtract %float %135 0 -%137 = OpCompositeExtract %float %135 1 -%138 = OpCompositeExtract %float %135 2 -%139 = OpCompositeExtract %float %135 3 -%140 = OpCompositeConstruct %v2float %136 %137 -%141 = OpCompositeConstruct %v2float %138 %139 -%142 = OpCompositeConstruct %mat2v2float %140 %141 -%143 = OpFOrdEqual %v2bool %140 %88 -%144 = OpAll %bool %143 -%145 = OpFOrdEqual %v2bool %141 %88 -%146 = OpAll %bool %145 -%147 = OpLogicalAnd %bool %144 %146 -OpBranch %114 -%114 = OpLabel -%148 = OpPhi %bool %false %97 %147 %113 -OpStore %ok %148 -OpSelectionMerge %150 None -OpBranchConditional %148 %149 %150 -%149 = OpLabel -%151 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%152 = OpLoad %v4float %151 -%153 = OpCompositeExtract %float %152 0 -%154 = OpCompositeExtract %float %152 1 -%155 = OpCompositeExtract %float %152 2 -%156 = OpCompositeExtract %float %152 3 -%157 = OpCompositeConstruct %v2float %153 %154 -%158 = OpCompositeConstruct %v2float %155 %156 -%159 = OpCompositeConstruct %mat2v2float %157 %158 -%160 = OpFOrdEqual %v2bool %157 %88 -%161 = OpAll %bool %160 -%162 = OpFOrdEqual %v2bool %158 %88 -%163 = OpAll %bool %162 -%164 = OpLogicalAnd %bool %161 %163 -OpBranch %150 -%150 = OpLabel -%165 = OpPhi %bool %false %114 %164 %149 -OpStore %ok %165 -OpSelectionMerge %167 None -OpBranchConditional %165 %166 %167 -%166 = OpLabel -%168 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%169 = OpLoad %v4float %168 -%170 = OpCompositeExtract %float %169 0 -%171 = OpCompositeExtract %float %169 1 -%172 = OpCompositeExtract %float %169 2 -%173 = OpCompositeExtract %float %169 3 -%174 = OpCompositeConstruct %v2float %170 %171 -%175 = OpCompositeConstruct %v2float %172 %173 -%176 = OpCompositeConstruct %mat2v2float %174 %175 -%177 = OpFOrdEqual %v2bool %174 %88 -%178 = OpAll %bool %177 -%179 = OpFOrdEqual %v2bool %175 %88 -%180 = OpAll %bool %179 -%181 = OpLogicalAnd %bool %178 %180 -OpBranch %167 -%167 = OpLabel -%182 = OpPhi %bool %false %150 %181 %166 -OpStore %ok %182 -OpSelectionMerge %184 None -OpBranchConditional %182 %183 %184 -%183 = OpLabel -%185 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%186 = OpLoad %v4float %185 -%187 = OpCompositeExtract %float %186 0 -%188 = OpFUnordNotEqual %bool %187 %float_0 -%189 = OpCompositeExtract %float %186 1 -%190 = OpFUnordNotEqual %bool %189 %float_0 -%191 = OpCompositeExtract %float %186 2 -%192 = OpFUnordNotEqual %bool %191 %float_0 -%193 = OpCompositeExtract %float %186 3 -%194 = OpFUnordNotEqual %bool %193 %float_0 -%196 = OpCompositeConstruct %v4bool %188 %190 %192 %194 -%197 = OpCompositeExtract %bool %196 0 -%198 = OpSelect %float %197 %float_1 %float_0 -%199 = OpCompositeExtract %bool %196 1 -%200 = OpSelect %float %199 %float_1 %float_0 -%201 = OpCompositeExtract %bool %196 2 -%202 = OpSelect %float %201 %float_1 %float_0 -%203 = OpCompositeExtract %bool %196 3 -%204 = OpSelect %float %203 %float_1 %float_0 -%205 = OpCompositeConstruct %v4float %198 %200 %202 %204 -%206 = OpCompositeExtract %float %205 0 -%207 = OpCompositeExtract %float %205 1 -%208 = OpCompositeExtract %float %205 2 -%209 = OpCompositeExtract %float %205 3 -%210 = OpCompositeConstruct %v2float %206 %207 -%211 = OpCompositeConstruct %v2float %208 %209 -%212 = OpCompositeConstruct %mat2v2float %210 %211 -%213 = OpFOrdEqual %v2bool %210 %88 -%214 = OpAll %bool %213 -%215 = OpFOrdEqual %v2bool %211 %88 -%216 = OpAll %bool %215 -%217 = OpLogicalAnd %bool %214 %216 -OpBranch %184 -%184 = OpLabel -%218 = OpPhi %bool %false %167 %217 %183 -OpStore %ok %218 -OpSelectionMerge %220 None -OpBranchConditional %218 %219 %220 -%219 = OpLabel -%221 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%222 = OpLoad %v4float %221 -%223 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%225 = OpLoad %v4float %223 -%226 = OpFSub %v4float %222 %225 -%227 = OpCompositeExtract %float %226 0 -%228 = OpCompositeExtract %float %226 1 -%229 = OpCompositeExtract %float %226 2 -%230 = OpCompositeExtract %float %226 3 -%231 = OpCompositeConstruct %v2float %227 %228 -%232 = OpCompositeConstruct %v2float %229 %230 -%233 = OpCompositeConstruct %mat2v2float %231 %232 -%237 = OpFOrdEqual %v2bool %231 %235 -%238 = OpAll %bool %237 -%239 = OpFOrdEqual %v2bool %232 %19 -%240 = OpAll %bool %239 -%241 = OpLogicalAnd %bool %238 %240 -OpBranch %220 -%220 = OpLabel -%242 = OpPhi %bool %false %184 %241 %219 -OpStore %ok %242 -OpSelectionMerge %244 None -OpBranchConditional %242 %243 %244 -%243 = OpLabel -%245 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%246 = OpLoad %v4float %245 -%249 = OpFAdd %v4float %246 %248 -%250 = OpCompositeExtract %float %249 0 -%251 = OpCompositeExtract %float %249 1 -%252 = OpCompositeExtract %float %249 2 -%253 = OpCompositeExtract %float %249 3 -%254 = OpCompositeConstruct %v2float %250 %251 -%255 = OpCompositeConstruct %v2float %252 %253 -%256 = OpCompositeConstruct %mat2v2float %254 %255 -%260 = OpFOrdEqual %v2bool %254 %258 -%261 = OpAll %bool %260 -%262 = OpFOrdEqual %v2bool %255 %258 -%263 = OpAll %bool %262 -%264 = OpLogicalAnd %bool %261 %263 -OpBranch %244 -%244 = OpLabel -%265 = OpPhi %bool %false %220 %264 %243 -OpStore %ok %265 -OpSelectionMerge %270 None -OpBranchConditional %265 %268 %269 -%268 = OpLabel -%271 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%272 = OpLoad %v4float %271 -OpStore %266 %272 -OpBranch %270 -%269 = OpLabel -%273 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 -%274 = OpLoad %v4float %273 -OpStore %266 %274 -OpBranch %270 -%270 = OpLabel -%275 = OpLoad %v4float %266 -OpReturnValue %275 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %ok = OpVariable %_ptr_Function_bool Function + %266 = OpVariable %_ptr_Function_v4float Function + OpStore %ok %true + OpSelectionMerge %31 None + OpBranchConditional %true %30 %31 + %30 = OpLabel + %32 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %36 = OpLoad %v4float %32 + %37 = OpCompositeExtract %float %36 0 + %38 = OpCompositeExtract %float %36 1 + %39 = OpCompositeExtract %float %36 2 + %40 = OpCompositeExtract %float %36 3 + %41 = OpCompositeConstruct %v2float %37 %38 + %42 = OpCompositeConstruct %v2float %39 %40 + %44 = OpCompositeConstruct %mat2v2float %41 %42 + %52 = OpFOrdEqual %v2bool %41 %48 + %53 = OpAll %bool %52 + %54 = OpFOrdEqual %v2bool %42 %49 + %55 = OpAll %bool %54 + %56 = OpLogicalAnd %bool %53 %55 + OpBranch %31 + %31 = OpLabel + %57 = OpPhi %bool %false %25 %56 %30 + OpStore %ok %57 + OpSelectionMerge %59 None + OpBranchConditional %57 %58 %59 + %58 = OpLabel + %60 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2 + %61 = OpLoad %v4float %60 + %62 = OpCompositeExtract %float %61 0 + %63 = OpCompositeExtract %float %61 1 + %64 = OpCompositeExtract %float %61 2 + %65 = OpCompositeExtract %float %61 3 + %66 = OpCompositeConstruct %v2float %62 %63 + %67 = OpCompositeConstruct %v2float %64 %65 + %68 = OpCompositeConstruct %mat2v2float %66 %67 + %69 = OpFOrdEqual %v2bool %66 %48 + %70 = OpAll %bool %69 + %71 = OpFOrdEqual %v2bool %67 %49 + %72 = OpAll %bool %71 + %73 = OpLogicalAnd %bool %70 %72 + OpBranch %59 + %59 = OpLabel + %74 = OpPhi %bool %false %31 %73 %58 + OpStore %ok %74 + OpSelectionMerge %76 None + OpBranchConditional %74 %75 %76 + %75 = OpLabel + %77 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %79 = OpLoad %v4float %77 + %80 = OpCompositeExtract %float %79 0 + %81 = OpCompositeExtract %float %79 1 + %82 = OpCompositeExtract %float %79 2 + %83 = OpCompositeExtract %float %79 3 + %84 = OpCompositeConstruct %v2float %80 %81 + %85 = OpCompositeConstruct %v2float %82 %83 + %86 = OpCompositeConstruct %mat2v2float %84 %85 + %90 = OpFOrdEqual %v2bool %84 %88 + %91 = OpAll %bool %90 + %92 = OpFOrdEqual %v2bool %85 %88 + %93 = OpAll %bool %92 + %94 = OpLogicalAnd %bool %91 %93 + OpBranch %76 + %76 = OpLabel + %95 = OpPhi %bool %false %59 %94 %75 + OpStore %ok %95 + OpSelectionMerge %97 None + OpBranchConditional %95 %96 %97 + %96 = OpLabel + %98 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %99 = OpLoad %v4float %98 + %100 = OpCompositeExtract %float %99 0 + %101 = OpCompositeExtract %float %99 1 + %102 = OpCompositeExtract %float %99 2 + %103 = OpCompositeExtract %float %99 3 + %104 = OpCompositeConstruct %v2float %100 %101 + %105 = OpCompositeConstruct %v2float %102 %103 + %106 = OpCompositeConstruct %mat2v2float %104 %105 + %107 = OpFOrdEqual %v2bool %104 %88 + %108 = OpAll %bool %107 + %109 = OpFOrdEqual %v2bool %105 %88 + %110 = OpAll %bool %109 + %111 = OpLogicalAnd %bool %108 %110 + OpBranch %97 + %97 = OpLabel + %112 = OpPhi %bool %false %76 %111 %96 + OpStore %ok %112 + OpSelectionMerge %114 None + OpBranchConditional %112 %113 %114 + %113 = OpLabel + %115 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %116 = OpLoad %v4float %115 + %117 = OpCompositeExtract %float %116 0 + %118 = OpConvertFToS %int %117 + %119 = OpCompositeExtract %float %116 1 + %120 = OpConvertFToS %int %119 + %121 = OpCompositeExtract %float %116 2 + %122 = OpConvertFToS %int %121 + %123 = OpCompositeExtract %float %116 3 + %124 = OpConvertFToS %int %123 + %126 = OpCompositeConstruct %v4int %118 %120 %122 %124 + %127 = OpCompositeExtract %int %126 0 + %128 = OpConvertSToF %float %127 + %129 = OpCompositeExtract %int %126 1 + %130 = OpConvertSToF %float %129 + %131 = OpCompositeExtract %int %126 2 + %132 = OpConvertSToF %float %131 + %133 = OpCompositeExtract %int %126 3 + %134 = OpConvertSToF %float %133 + %135 = OpCompositeConstruct %v4float %128 %130 %132 %134 + %136 = OpCompositeExtract %float %135 0 + %137 = OpCompositeExtract %float %135 1 + %138 = OpCompositeExtract %float %135 2 + %139 = OpCompositeExtract %float %135 3 + %140 = OpCompositeConstruct %v2float %136 %137 + %141 = OpCompositeConstruct %v2float %138 %139 + %142 = OpCompositeConstruct %mat2v2float %140 %141 + %143 = OpFOrdEqual %v2bool %140 %88 + %144 = OpAll %bool %143 + %145 = OpFOrdEqual %v2bool %141 %88 + %146 = OpAll %bool %145 + %147 = OpLogicalAnd %bool %144 %146 + OpBranch %114 + %114 = OpLabel + %148 = OpPhi %bool %false %97 %147 %113 + OpStore %ok %148 + OpSelectionMerge %150 None + OpBranchConditional %148 %149 %150 + %149 = OpLabel + %151 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %152 = OpLoad %v4float %151 + %153 = OpCompositeExtract %float %152 0 + %154 = OpCompositeExtract %float %152 1 + %155 = OpCompositeExtract %float %152 2 + %156 = OpCompositeExtract %float %152 3 + %157 = OpCompositeConstruct %v2float %153 %154 + %158 = OpCompositeConstruct %v2float %155 %156 + %159 = OpCompositeConstruct %mat2v2float %157 %158 + %160 = OpFOrdEqual %v2bool %157 %88 + %161 = OpAll %bool %160 + %162 = OpFOrdEqual %v2bool %158 %88 + %163 = OpAll %bool %162 + %164 = OpLogicalAnd %bool %161 %163 + OpBranch %150 + %150 = OpLabel + %165 = OpPhi %bool %false %114 %164 %149 + OpStore %ok %165 + OpSelectionMerge %167 None + OpBranchConditional %165 %166 %167 + %166 = OpLabel + %168 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %169 = OpLoad %v4float %168 + %170 = OpCompositeExtract %float %169 0 + %171 = OpCompositeExtract %float %169 1 + %172 = OpCompositeExtract %float %169 2 + %173 = OpCompositeExtract %float %169 3 + %174 = OpCompositeConstruct %v2float %170 %171 + %175 = OpCompositeConstruct %v2float %172 %173 + %176 = OpCompositeConstruct %mat2v2float %174 %175 + %177 = OpFOrdEqual %v2bool %174 %88 + %178 = OpAll %bool %177 + %179 = OpFOrdEqual %v2bool %175 %88 + %180 = OpAll %bool %179 + %181 = OpLogicalAnd %bool %178 %180 + OpBranch %167 + %167 = OpLabel + %182 = OpPhi %bool %false %150 %181 %166 + OpStore %ok %182 + OpSelectionMerge %184 None + OpBranchConditional %182 %183 %184 + %183 = OpLabel + %185 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %186 = OpLoad %v4float %185 + %187 = OpCompositeExtract %float %186 0 + %188 = OpFUnordNotEqual %bool %187 %float_0 + %189 = OpCompositeExtract %float %186 1 + %190 = OpFUnordNotEqual %bool %189 %float_0 + %191 = OpCompositeExtract %float %186 2 + %192 = OpFUnordNotEqual %bool %191 %float_0 + %193 = OpCompositeExtract %float %186 3 + %194 = OpFUnordNotEqual %bool %193 %float_0 + %196 = OpCompositeConstruct %v4bool %188 %190 %192 %194 + %197 = OpCompositeExtract %bool %196 0 + %198 = OpSelect %float %197 %float_1 %float_0 + %199 = OpCompositeExtract %bool %196 1 + %200 = OpSelect %float %199 %float_1 %float_0 + %201 = OpCompositeExtract %bool %196 2 + %202 = OpSelect %float %201 %float_1 %float_0 + %203 = OpCompositeExtract %bool %196 3 + %204 = OpSelect %float %203 %float_1 %float_0 + %205 = OpCompositeConstruct %v4float %198 %200 %202 %204 + %206 = OpCompositeExtract %float %205 0 + %207 = OpCompositeExtract %float %205 1 + %208 = OpCompositeExtract %float %205 2 + %209 = OpCompositeExtract %float %205 3 + %210 = OpCompositeConstruct %v2float %206 %207 + %211 = OpCompositeConstruct %v2float %208 %209 + %212 = OpCompositeConstruct %mat2v2float %210 %211 + %213 = OpFOrdEqual %v2bool %210 %88 + %214 = OpAll %bool %213 + %215 = OpFOrdEqual %v2bool %211 %88 + %216 = OpAll %bool %215 + %217 = OpLogicalAnd %bool %214 %216 + OpBranch %184 + %184 = OpLabel + %218 = OpPhi %bool %false %167 %217 %183 + OpStore %ok %218 + OpSelectionMerge %220 None + OpBranchConditional %218 %219 %220 + %219 = OpLabel + %221 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %222 = OpLoad %v4float %221 + %223 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %225 = OpLoad %v4float %223 + %226 = OpFSub %v4float %222 %225 + %227 = OpCompositeExtract %float %226 0 + %228 = OpCompositeExtract %float %226 1 + %229 = OpCompositeExtract %float %226 2 + %230 = OpCompositeExtract %float %226 3 + %231 = OpCompositeConstruct %v2float %227 %228 + %232 = OpCompositeConstruct %v2float %229 %230 + %233 = OpCompositeConstruct %mat2v2float %231 %232 + %237 = OpFOrdEqual %v2bool %231 %235 + %238 = OpAll %bool %237 + %239 = OpFOrdEqual %v2bool %232 %19 + %240 = OpAll %bool %239 + %241 = OpLogicalAnd %bool %238 %240 + OpBranch %220 + %220 = OpLabel + %242 = OpPhi %bool %false %184 %241 %219 + OpStore %ok %242 + OpSelectionMerge %244 None + OpBranchConditional %242 %243 %244 + %243 = OpLabel + %245 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %246 = OpLoad %v4float %245 + %249 = OpFAdd %v4float %246 %248 + %250 = OpCompositeExtract %float %249 0 + %251 = OpCompositeExtract %float %249 1 + %252 = OpCompositeExtract %float %249 2 + %253 = OpCompositeExtract %float %249 3 + %254 = OpCompositeConstruct %v2float %250 %251 + %255 = OpCompositeConstruct %v2float %252 %253 + %256 = OpCompositeConstruct %mat2v2float %254 %255 + %260 = OpFOrdEqual %v2bool %254 %258 + %261 = OpAll %bool %260 + %262 = OpFOrdEqual %v2bool %255 %258 + %263 = OpAll %bool %262 + %264 = OpLogicalAnd %bool %261 %263 + OpBranch %244 + %244 = OpLabel + %265 = OpPhi %bool %false %220 %264 %243 + OpStore %ok %265 + OpSelectionMerge %270 None + OpBranchConditional %265 %268 %269 + %268 = OpLabel + %271 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %272 = OpLoad %v4float %271 + OpStore %266 %272 + OpBranch %270 + %269 = OpLabel + %273 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1 + %274 = OpLoad %v4float %273 + OpStore %266 %274 + OpBranch %270 + %270 = OpLabel + %275 = OpLoad %v4float %266 + OpReturnValue %275 + OpFunctionEnd diff --git a/tests/sksl/shared/VectorToMatrixCast.skrp b/tests/sksl/shared/VectorToMatrixCast.skrp index de34f628192e..b955c3523613 100644 --- a/tests/sksl/shared/VectorToMatrixCast.skrp +++ b/tests/sksl/shared/VectorToMatrixCast.skrp @@ -1,42 +1,50 @@ +88 instructions + +[immutable slots] +i0 = 0xBFA00000 (-1.25) +i1 = 0 +i2 = 0x3F400000 (0.75) +i3 = 0x40100000 (2.25) +i4 = 0 +i5 = 0x3F800000 (1.0) +i6 = 0 +i7 = 0x3F800000 (1.0) +i8 = 0xBF800000 (-1.0) +i9 = 0x3F800000 (1.0) +i10 = 0 +i11 = 0 +i12 = 0x40A00000 (5.0) +i13 = 0x40C00000 (6.0) +i14 = 0x40A00000 (5.0) +i15 = 0x40C00000 (6.0) + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true copy_constant ok = 0xFFFFFFFF copy_slot_unmasked $0 = ok copy_4_uniforms $1..4 = testInputs -copy_constant $5 = 0xBFA00000 (-1.25) -copy_constant $6 = 0 -copy_constant $7 = 0x3F400000 (0.75) -copy_constant $8 = 0x40100000 (2.25) +copy_4_immutables_unmasked $5..8 = i0..3 [0xBFA00000 (-1.25), 0, 0x3F400000 (0.75), 0x40100000 (2.25)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_slot_unmasked ok = $0 copy_4_uniforms $1..4 = testInputs -copy_constant $5 = 0xBFA00000 (-1.25) -copy_constant $6 = 0 -copy_constant $7 = 0x3F400000 (0.75) -copy_constant $8 = 0x40100000 (2.25) +copy_4_immutables_unmasked $5..8 = i0..3 [0xBFA00000 (-1.25), 0, 0x3F400000 (0.75), 0x40100000 (2.25)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_slot_unmasked ok = $0 copy_4_uniforms $1..4 = colorGreen -copy_constant $5 = 0 -copy_constant $6 = 0x3F800000 (1.0) -copy_constant $7 = 0 -copy_constant $8 = 0x3F800000 (1.0) +copy_4_immutables_unmasked $5..8 = i4..7 [0, 0x3F800000 (1.0), 0, 0x3F800000 (1.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_slot_unmasked ok = $0 copy_4_uniforms $1..4 = colorGreen -copy_constant $5 = 0 -copy_constant $6 = 0x3F800000 (1.0) -copy_constant $7 = 0 -copy_constant $8 = 0x3F800000 (1.0) +copy_4_immutables_unmasked $5..8 = i4..7 [0, 0x3F800000 (1.0), 0, 0x3F800000 (1.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -45,30 +53,21 @@ copy_slot_unmasked ok = $0 copy_4_uniforms $1..4 = colorGreen cast_to_int_from_4_floats $1..4 = FloatToInt($1..4) cast_to_float_from_4_ints $1..4 = IntToFloat($1..4) -copy_constant $5 = 0 -copy_constant $6 = 0x3F800000 (1.0) -copy_constant $7 = 0 -copy_constant $8 = 0x3F800000 (1.0) +copy_4_immutables_unmasked $5..8 = i4..7 [0, 0x3F800000 (1.0), 0, 0x3F800000 (1.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_slot_unmasked ok = $0 copy_4_uniforms $1..4 = colorGreen -copy_constant $5 = 0 -copy_constant $6 = 0x3F800000 (1.0) -copy_constant $7 = 0 -copy_constant $8 = 0x3F800000 (1.0) +copy_4_immutables_unmasked $5..8 = i4..7 [0, 0x3F800000 (1.0), 0, 0x3F800000 (1.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 bitwise_and_int $0 &= $1 copy_slot_unmasked ok = $0 copy_4_uniforms $1..4 = colorGreen -copy_constant $5 = 0 -copy_constant $6 = 0x3F800000 (1.0) -copy_constant $7 = 0 -copy_constant $8 = 0x3F800000 (1.0) +copy_4_immutables_unmasked $5..8 = i4..7 [0, 0x3F800000 (1.0), 0, 0x3F800000 (1.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -78,10 +77,7 @@ copy_4_uniforms $1..4 = colorGreen splat_4_constants $5..8 = 0 cmpne_4_floats $1..4 = notEqual($1..4, $5..8) bitwise_and_imm_4_ints $1..4 &= 0x3F800000 (1.0) -copy_constant $5 = 0 -copy_constant $6 = 0x3F800000 (1.0) -copy_constant $7 = 0 -copy_constant $8 = 0x3F800000 (1.0) +copy_4_immutables_unmasked $5..8 = i4..7 [0, 0x3F800000 (1.0), 0, 0x3F800000 (1.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -90,9 +86,7 @@ copy_slot_unmasked ok = $0 copy_4_uniforms $1..4 = colorGreen copy_4_uniforms $5..8 = colorRed sub_4_floats $1..4 -= $5..8 -copy_constant $5 = 0xBF800000 (-1.0) -copy_constant $6 = 0x3F800000 (1.0) -splat_2_constants $7..8 = 0 +copy_4_immutables_unmasked $5..8 = i8..11 [0xBF800000 (-1.0), 0x3F800000 (1.0), 0, 0] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 @@ -101,10 +95,7 @@ copy_slot_unmasked ok = $0 copy_4_uniforms $1..4 = colorGreen splat_4_constants $5..8 = 0x40A00000 (5.0) add_4_floats $1..4 += $5..8 -copy_constant $5 = 0x40A00000 (5.0) -copy_constant $6 = 0x40C00000 (6.0) -copy_constant $7 = 0x40A00000 (5.0) -copy_constant $8 = 0x40C00000 (6.0) +copy_4_immutables_unmasked $5..8 = i12..15 [0x40A00000 (5.0), 0x40C00000 (6.0), 0x40A00000 (5.0), 0x40C00000 (6.0)] cmpeq_4_floats $1..4 = equal($1..4, $5..8) bitwise_and_2_ints $1..2 &= $3..4 bitwise_and_int $1 &= $2 diff --git a/tests/sksl/shared/VectorToMatrixCast.wgsl b/tests/sksl/shared/VectorToMatrixCast.wgsl new file mode 100644 index 000000000000..46d0e90175b5 --- /dev/null +++ b/tests/sksl/shared/VectorToMatrixCast.wgsl @@ -0,0 +1,61 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @builtin(position) sk_FragCoord: vec4, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _GlobalUniforms { + colorGreen: vec4, + colorRed: vec4, + testInputs: vec4, +}; +@binding(0) @group(0) var _globalUniforms: _GlobalUniforms; +fn main(_skParam0: vec2) -> vec4 { + let coords = _skParam0; + { + var ok: bool = true; + let _skTemp0 = mat2x2(_globalUniforms.testInputs[0], _globalUniforms.testInputs[1], _globalUniforms.testInputs[2], _globalUniforms.testInputs[3]); + let _skTemp1 = mat2x2(-1.25, 0.0, 0.75, 2.25); + ok = ok && (all(_skTemp0[0] == _skTemp1[0]) && all(_skTemp0[1] == _skTemp1[1])); + let _skTemp2 = vec4(_globalUniforms.testInputs); + let _skTemp3 = mat2x2(_skTemp2[0], _skTemp2[1], _skTemp2[2], _skTemp2[3]); + let _skTemp4 = mat2x2(-1.25, 0.0, 0.75, 2.25); + ok = ok && (all(_skTemp3[0] == _skTemp4[0]) && all(_skTemp3[1] == _skTemp4[1])); + let _skTemp5 = mat2x2(_globalUniforms.colorGreen[0], _globalUniforms.colorGreen[1], _globalUniforms.colorGreen[2], _globalUniforms.colorGreen[3]); + let _skTemp6 = mat2x2(0.0, 1.0, 0.0, 1.0); + ok = ok && (all(_skTemp5[0] == _skTemp6[0]) && all(_skTemp5[1] == _skTemp6[1])); + let _skTemp7 = mat2x2(_globalUniforms.colorGreen[0], _globalUniforms.colorGreen[1], _globalUniforms.colorGreen[2], _globalUniforms.colorGreen[3]); + let _skTemp8 = mat2x2(0.0, 1.0, 0.0, 1.0); + ok = ok && (all(_skTemp7[0] == _skTemp8[0]) && all(_skTemp7[1] == _skTemp8[1])); + let _skTemp9 = vec4(vec4(_globalUniforms.colorGreen)); + let _skTemp10 = mat2x2(_skTemp9[0], _skTemp9[1], _skTemp9[2], _skTemp9[3]); + let _skTemp11 = mat2x2(0.0, 1.0, 0.0, 1.0); + ok = ok && (all(_skTemp10[0] == _skTemp11[0]) && all(_skTemp10[1] == _skTemp11[1])); + let _skTemp12 = mat2x2(_globalUniforms.colorGreen[0], _globalUniforms.colorGreen[1], _globalUniforms.colorGreen[2], _globalUniforms.colorGreen[3]); + let _skTemp13 = mat2x2(0.0, 1.0, 0.0, 1.0); + ok = ok && (all(_skTemp12[0] == _skTemp13[0]) && all(_skTemp12[1] == _skTemp13[1])); + let _skTemp14 = mat2x2(_globalUniforms.colorGreen[0], _globalUniforms.colorGreen[1], _globalUniforms.colorGreen[2], _globalUniforms.colorGreen[3]); + let _skTemp15 = mat2x2(0.0, 1.0, 0.0, 1.0); + ok = ok && (all(_skTemp14[0] == _skTemp15[0]) && all(_skTemp14[1] == _skTemp15[1])); + let _skTemp16 = vec4(vec4(_globalUniforms.colorGreen)); + let _skTemp17 = mat2x2(_skTemp16[0], _skTemp16[1], _skTemp16[2], _skTemp16[3]); + let _skTemp18 = mat2x2(0.0, 1.0, 0.0, 1.0); + ok = ok && (all(_skTemp17[0] == _skTemp18[0]) && all(_skTemp17[1] == _skTemp18[1])); + let _skTemp19 = _globalUniforms.colorGreen - _globalUniforms.colorRed; + let _skTemp20 = mat2x2(_skTemp19[0], _skTemp19[1], _skTemp19[2], _skTemp19[3]); + let _skTemp21 = mat2x2(-1.0, 1.0, 0.0, 0.0); + ok = ok && (all(_skTemp20[0] == _skTemp21[0]) && all(_skTemp20[1] == _skTemp21[1])); + let _skTemp22 = _globalUniforms.colorGreen + 5.0; + let _skTemp23 = mat2x2(_skTemp22[0], _skTemp22[1], _skTemp22[2], _skTemp22[3]); + let _skTemp24 = mat2x2(5.0, 6.0, 5.0, 6.0); + ok = ok && (all(_skTemp23[0] == _skTemp24[0]) && all(_skTemp23[1] == _skTemp24[1])); + return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(ok)); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(_stageIn.sk_FragCoord.xy); + return _stageOut; +} diff --git a/tests/sksl/shared/VertexID.asm.vert b/tests/sksl/shared/VertexID.asm.vert index 3ef3ed35d1cc..3c20b6ef1a0c 100644 --- a/tests/sksl/shared/VertexID.asm.vert +++ b/tests/sksl/shared/VertexID.asm.vert @@ -1,22 +1,22 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Vertex %main "main" %sk_VertexID %id -OpName %sk_VertexID "sk_VertexID" -OpName %id "id" -OpName %main "main" -OpDecorate %sk_VertexID BuiltIn VertexIndex -OpDecorate %id Location 1 -%int = OpTypeInt 32 1 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %main "main" %sk_VertexID %id + OpName %sk_VertexID "sk_VertexID" + OpName %id "id" + OpName %main "main" + OpDecorate %sk_VertexID BuiltIn VertexIndex + OpDecorate %id Location 1 + %int = OpTypeInt 32 1 %_ptr_Input_int = OpTypePointer Input %int %sk_VertexID = OpVariable %_ptr_Input_int Input %_ptr_Output_int = OpTypePointer Output %int -%id = OpVariable %_ptr_Output_int Output -%void = OpTypeVoid -%9 = OpTypeFunction %void -%main = OpFunction %void None %9 -%10 = OpLabel -%11 = OpLoad %int %sk_VertexID -OpStore %id %11 -OpReturn -OpFunctionEnd + %id = OpVariable %_ptr_Output_int Output + %void = OpTypeVoid + %9 = OpTypeFunction %void + %main = OpFunction %void None %9 + %10 = OpLabel + %11 = OpLoad %int %sk_VertexID + OpStore %id %11 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/VertexID.wgsl b/tests/sksl/shared/VertexID.wgsl index 84315c62ee77..03f88f2ad575 100644 --- a/tests/sksl/shared/VertexID.wgsl +++ b/tests/sksl/shared/VertexID.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct VSIn { @builtin(vertex_index) sk_VertexID: u32, }; diff --git a/tests/sksl/shared/VertexIDInFunction.asm.vert b/tests/sksl/shared/VertexIDInFunction.asm.vert new file mode 100644 index 000000000000..2084b9ebd36a --- /dev/null +++ b/tests/sksl/shared/VertexIDInFunction.asm.vert @@ -0,0 +1,29 @@ + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Vertex %main "main" %sk_VertexID %id + OpName %sk_VertexID "sk_VertexID" + OpName %id "id" + OpName %fn_i "fn_i" + OpName %main "main" + OpDecorate %sk_VertexID BuiltIn VertexIndex + OpDecorate %id Location 1 + %int = OpTypeInt 32 1 +%_ptr_Input_int = OpTypePointer Input %int +%sk_VertexID = OpVariable %_ptr_Input_int Input +%_ptr_Output_int = OpTypePointer Output %int + %id = OpVariable %_ptr_Output_int Output + %9 = OpTypeFunction %int + %void = OpTypeVoid + %13 = OpTypeFunction %void + %fn_i = OpFunction %int None %9 + %10 = OpLabel + %11 = OpLoad %int %sk_VertexID + OpReturnValue %11 + OpFunctionEnd + %main = OpFunction %void None %13 + %14 = OpLabel + %15 = OpFunctionCall %int %fn_i + OpStore %id %15 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/shared/VertexIDInFunction.glsl b/tests/sksl/shared/VertexIDInFunction.glsl new file mode 100644 index 000000000000..ad59ea3ec866 --- /dev/null +++ b/tests/sksl/shared/VertexIDInFunction.glsl @@ -0,0 +1,8 @@ + +layout (location = 1) out int id; +int fn_i() { + return gl_VertexID; +} +void main() { + id = fn_i(); +} diff --git a/tests/sksl/shared/VertexIDInFunction.hlsl b/tests/sksl/shared/VertexIDInFunction.hlsl new file mode 100644 index 000000000000..603570ae9181 --- /dev/null +++ b/tests/sksl/shared/VertexIDInFunction.hlsl @@ -0,0 +1,31 @@ +static int gl_VertexIndex; +static int id; + +struct SPIRV_Cross_Input +{ + uint gl_VertexIndex : SV_VertexID; +}; + +struct SPIRV_Cross_Output +{ + int id : TEXCOORD1; +}; + +int fn_i() +{ + return gl_VertexIndex; +} + +void vert_main() +{ + id = fn_i(); +} + +SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input) +{ + gl_VertexIndex = int(stage_input.gl_VertexIndex); + vert_main(); + SPIRV_Cross_Output stage_output; + stage_output.id = id; + return stage_output; +} diff --git a/tests/sksl/shared/VertexIDInFunction.metal b/tests/sksl/shared/VertexIDInFunction.metal new file mode 100644 index 000000000000..1b31baaa90da --- /dev/null +++ b/tests/sksl/shared/VertexIDInFunction.metal @@ -0,0 +1,19 @@ +#include +#include +using namespace metal; +struct Inputs { +}; +struct Outputs { + float4 sk_Position [[position]]; + int id [[user(locn1)]]; + float sk_PointSize [[point_size]]; +}; +int fn_i(uint sk_VertexID) { + return sk_VertexID; +} +vertex Outputs vertexMain(Inputs _in [[stage_in]], uint sk_VertexID [[vertex_id]], uint sk_InstanceID [[instance_id]]) { + Outputs _out; + (void)_out; + _out.id = fn_i(sk_VertexID); + return _out; +} diff --git a/tests/sksl/shared/VertexIDInFunction.skrp b/tests/sksl/shared/VertexIDInFunction.skrp new file mode 100644 index 000000000000..a08f8de61f37 --- /dev/null +++ b/tests/sksl/shared/VertexIDInFunction.skrp @@ -0,0 +1,3 @@ +### Compilation failed: + +Runtime shaders do not support vertex programs diff --git a/tests/sksl/shared/VertexIDInFunction.wgsl b/tests/sksl/shared/VertexIDInFunction.wgsl new file mode 100644 index 000000000000..5a034c3ad245 --- /dev/null +++ b/tests/sksl/shared/VertexIDInFunction.wgsl @@ -0,0 +1,24 @@ +diagnostic(off, derivative_uniformity); +struct VSIn { + @builtin(vertex_index) sk_VertexID: u32, +}; +struct VSOut { + @location(1) @interpolate(flat) id: i32, + @builtin(position) sk_Position: vec4, +}; +fn fn_i(_stageIn: VSIn) -> i32 { + { + return i32(_stageIn.sk_VertexID); + } +} +fn main(_stageIn: VSIn, _stageOut: ptr) { + { + let _skTemp0 = fn_i(_stageIn); + (*_stageOut).id = _skTemp0; + } +} +@vertex fn vertexMain(_stageIn: VSIn) -> VSOut { + var _stageOut: VSOut; + main(_stageIn, &_stageOut); + return _stageOut; +} diff --git a/tests/sksl/shared/WhileLoopControlFlow.asm.frag b/tests/sksl/shared/WhileLoopControlFlow.asm.frag index 2c73186fee55..75692e7d264a 100644 --- a/tests/sksl/shared/WhileLoopControlFlow.asm.frag +++ b/tests/sksl/shared/WhileLoopControlFlow.asm.frag @@ -1,121 +1,121 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %x "x" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %x RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %39 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %43 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -OpDecorate %53 RelaxedPrecision -OpDecorate %57 RelaxedPrecision -OpDecorate %58 RelaxedPrecision -OpDecorate %59 RelaxedPrecision -OpDecorate %60 RelaxedPrecision -OpDecorate %66 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %x "x" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %x RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %39 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %43 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + OpDecorate %53 RelaxedPrecision + OpDecorate %57 RelaxedPrecision + OpDecorate %58 RelaxedPrecision + OpDecorate %59 RelaxedPrecision + OpDecorate %60 RelaxedPrecision + OpDecorate %66 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%12 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%16 = OpConstantComposite %v2float %float_0 %float_0 + %void = OpTypeVoid + %12 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %16 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%20 = OpTypeFunction %v4float %_ptr_Function_v2float + %20 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float = OpTypePointer Function %v4float -%float_1 = OpConstant %float 1 -%26 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_float = OpTypePointer Function %float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%float_0_25 = OpConstant %float 0.25 -%int_2 = OpConstant %int 2 -%int_1 = OpConstant %int 1 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %float_0_25 = OpConstant %float 0.25 + %int_2 = OpConstant %int 2 + %int_1 = OpConstant %int 1 %_entrypoint_v = OpFunction %void None %12 -%13 = OpLabel -%17 = OpVariable %_ptr_Function_v2float Function -OpStore %17 %16 -%19 = OpFunctionCall %v4float %main %17 -OpStore %sk_FragColor %19 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %20 -%21 = OpFunctionParameter %_ptr_Function_v2float -%22 = OpLabel -%x = OpVariable %_ptr_Function_v4float Function -OpStore %x %26 -OpBranch %27 -%27 = OpLabel -OpLoopMerge %31 %30 None -OpBranch %28 -%28 = OpLabel -%32 = OpLoad %v4float %x -%33 = OpCompositeExtract %float %32 3 -%34 = OpFOrdEqual %bool %33 %float_1 -OpBranchConditional %34 %29 %31 -%29 = OpLabel -%35 = OpAccessChain %_ptr_Function_float %x %int_0 -%39 = OpLoad %float %35 -%41 = OpFSub %float %39 %float_0_25 -OpStore %35 %41 -%42 = OpLoad %v4float %x -%43 = OpCompositeExtract %float %42 0 -%44 = OpFOrdLessThanEqual %bool %43 %float_0 -OpSelectionMerge %46 None -OpBranchConditional %44 %45 %46 -%45 = OpLabel -OpBranch %31 -%46 = OpLabel -OpBranch %30 -%30 = OpLabel -OpBranch %27 -%31 = OpLabel -OpBranch %47 -%47 = OpLabel -OpLoopMerge %51 %50 None -OpBranch %48 -%48 = OpLabel -%52 = OpLoad %v4float %x -%53 = OpCompositeExtract %float %52 2 -%54 = OpFOrdGreaterThan %bool %53 %float_0 -OpBranchConditional %54 %49 %51 -%49 = OpLabel -%55 = OpAccessChain %_ptr_Function_float %x %int_2 -%57 = OpLoad %float %55 -%58 = OpFSub %float %57 %float_0_25 -OpStore %55 %58 -%59 = OpLoad %v4float %x -%60 = OpCompositeExtract %float %59 3 -%61 = OpFOrdEqual %bool %60 %float_1 -OpSelectionMerge %63 None -OpBranchConditional %61 %62 %63 -%62 = OpLabel -OpBranch %50 -%63 = OpLabel -%64 = OpAccessChain %_ptr_Function_float %x %int_1 -OpStore %64 %float_0 -OpBranch %50 -%50 = OpLabel -OpBranch %47 -%51 = OpLabel -%66 = OpLoad %v4float %x -OpReturnValue %66 -OpFunctionEnd + %13 = OpLabel + %17 = OpVariable %_ptr_Function_v2float Function + OpStore %17 %16 + %19 = OpFunctionCall %v4float %main %17 + OpStore %sk_FragColor %19 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %20 + %21 = OpFunctionParameter %_ptr_Function_v2float + %22 = OpLabel + %x = OpVariable %_ptr_Function_v4float Function + OpStore %x %26 + OpBranch %27 + %27 = OpLabel + OpLoopMerge %31 %30 None + OpBranch %28 + %28 = OpLabel + %32 = OpLoad %v4float %x + %33 = OpCompositeExtract %float %32 3 + %34 = OpFOrdEqual %bool %33 %float_1 + OpBranchConditional %34 %29 %31 + %29 = OpLabel + %35 = OpAccessChain %_ptr_Function_float %x %int_0 + %39 = OpLoad %float %35 + %41 = OpFSub %float %39 %float_0_25 + OpStore %35 %41 + %42 = OpLoad %v4float %x + %43 = OpCompositeExtract %float %42 0 + %44 = OpFOrdLessThanEqual %bool %43 %float_0 + OpSelectionMerge %46 None + OpBranchConditional %44 %45 %46 + %45 = OpLabel + OpBranch %31 + %46 = OpLabel + OpBranch %30 + %30 = OpLabel + OpBranch %27 + %31 = OpLabel + OpBranch %47 + %47 = OpLabel + OpLoopMerge %51 %50 None + OpBranch %48 + %48 = OpLabel + %52 = OpLoad %v4float %x + %53 = OpCompositeExtract %float %52 2 + %54 = OpFOrdGreaterThan %bool %53 %float_0 + OpBranchConditional %54 %49 %51 + %49 = OpLabel + %55 = OpAccessChain %_ptr_Function_float %x %int_2 + %57 = OpLoad %float %55 + %58 = OpFSub %float %57 %float_0_25 + OpStore %55 %58 + %59 = OpLoad %v4float %x + %60 = OpCompositeExtract %float %59 3 + %61 = OpFOrdEqual %bool %60 %float_1 + OpSelectionMerge %63 None + OpBranchConditional %61 %62 %63 + %62 = OpLabel + OpBranch %50 + %63 = OpLabel + %64 = OpAccessChain %_ptr_Function_float %x %int_1 + OpStore %64 %float_0 + OpBranch %50 + %50 = OpLabel + OpBranch %47 + %51 = OpLabel + %66 = OpLoad %v4float %x + OpReturnValue %66 + OpFunctionEnd diff --git a/tests/sksl/shared/WhileLoopControlFlow.skrp b/tests/sksl/shared/WhileLoopControlFlow.skrp index edca7fa7163c..73bb34a5edd6 100644 --- a/tests/sksl/shared/WhileLoopControlFlow.skrp +++ b/tests/sksl/shared/WhileLoopControlFlow.skrp @@ -1,3 +1,5 @@ +45 instructions + store_src_rg coords = src.rg init_lane_masks CondMask = LoopMask = RetMask = true splat_4_constants x = 0x3F800000 (1.0) diff --git a/tests/sksl/shared/WhileLoopControlFlow.wgsl b/tests/sksl/shared/WhileLoopControlFlow.wgsl index ba86753ef238..473b6d7e7faf 100644 --- a/tests/sksl/shared/WhileLoopControlFlow.wgsl +++ b/tests/sksl/shared/WhileLoopControlFlow.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -13,7 +14,7 @@ fn main(_skParam0: vec2) -> vec4 { if x.w == 1.0 { { x.x = x.x - 0.25; - if (x.x <= 0.0) { + if x.x <= 0.0 { break; } } @@ -25,7 +26,7 @@ fn main(_skParam0: vec2) -> vec4 { if x.z > 0.0 { { x.z = x.z - 0.25; - if (x.w == 1.0) { + if x.w == 1.0 { continue; } x.y = 0.0; diff --git a/tests/sksl/spirv/ArrayStrideInDifferentLayouts.asm.frag b/tests/sksl/spirv/ArrayStrideInDifferentLayouts.asm.frag index 720aa2f2d965..096dd0cae797 100644 --- a/tests/sksl/spirv/ArrayStrideInDifferentLayouts.asm.frag +++ b/tests/sksl/spirv/ArrayStrideInDifferentLayouts.asm.frag @@ -1,99 +1,99 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %testPushConstants "testPushConstants" -OpMemberName %testPushConstants 0 "pushConstantArray" -OpName %testUniforms "testUniforms" -OpMemberName %testUniforms 0 "uniformArray" -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %main "main" -OpName %localArray "localArray" -OpDecorate %_arr_float_int_2 ArrayStride 4 -OpMemberDecorate %testPushConstants 0 Offset 0 -OpDecorate %testPushConstants Block -OpDecorate %_arr_float_int_2_0 ArrayStride 16 -OpMemberDecorate %testUniforms 0 Offset 0 -OpDecorate %testUniforms Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %61 RelaxedPrecision -%float = OpTypeFloat 32 -%int = OpTypeInt 32 1 -%int_2 = OpConstant %int 2 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %testPushConstants "testPushConstants" + OpMemberName %testPushConstants 0 "pushConstantArray" + OpName %testUniforms "testUniforms" + OpMemberName %testUniforms 0 "uniformArray" + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %main "main" + OpName %localArray "localArray" + OpDecorate %_arr_float_int_2 ArrayStride 4 + OpMemberDecorate %testPushConstants 0 Offset 0 + OpDecorate %testPushConstants Block + OpDecorate %_arr_float_int_2_0 ArrayStride 16 + OpMemberDecorate %testUniforms 0 Offset 0 + OpDecorate %testUniforms Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %61 RelaxedPrecision + %float = OpTypeFloat 32 + %int = OpTypeInt 32 1 + %int_2 = OpConstant %int 2 %_arr_float_int_2 = OpTypeArray %float %int_2 %testPushConstants = OpTypeStruct %_arr_float_int_2 %_ptr_PushConstant_testPushConstants = OpTypePointer PushConstant %testPushConstants -%3 = OpVariable %_ptr_PushConstant_testPushConstants PushConstant + %3 = OpVariable %_ptr_PushConstant_testPushConstants PushConstant %_arr_float_int_2_0 = OpTypeArray %float %int_2 %testUniforms = OpTypeStruct %_arr_float_int_2_0 %_ptr_Uniform_testUniforms = OpTypePointer Uniform %testUniforms -%10 = OpVariable %_ptr_Uniform_testUniforms Uniform -%bool = OpTypeBool + %10 = OpVariable %_ptr_Uniform_testUniforms Uniform + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%v4float = OpTypeVector %float 4 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%21 = OpTypeFunction %void + %void = OpTypeVoid + %21 = OpTypeFunction %void %_ptr_Function__arr_float_int_2_0 = OpTypePointer Function %_arr_float_int_2_0 -%float_1 = OpConstant %float 1 -%float_2 = OpConstant %float 2 -%false = OpConstantFalse %bool -%int_0 = OpConstant %int 0 + %float_1 = OpConstant %float 1 + %float_2 = OpConstant %float 2 + %false = OpConstantFalse %bool + %int_0 = OpConstant %int 0 %_ptr_Uniform__arr_float_int_2_0 = OpTypePointer Uniform %_arr_float_int_2_0 %_ptr_PushConstant__arr_float_int_2 = OpTypePointer PushConstant %_arr_float_int_2 %_ptr_Function_v4float = OpTypePointer Function %v4float -%58 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 -%float_0 = OpConstant %float 0 -%60 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 -%main = OpFunction %void None %21 -%22 = OpLabel -%localArray = OpVariable %_ptr_Function__arr_float_int_2_0 Function -%53 = OpVariable %_ptr_Function_v4float Function -%27 = OpCompositeConstruct %_arr_float_int_2_0 %float_1 %float_2 -OpStore %localArray %27 -%30 = OpAccessChain %_ptr_Uniform__arr_float_int_2_0 %10 %int_0 -%32 = OpLoad %_arr_float_int_2_0 %30 -%33 = OpCompositeExtract %float %32 0 -%34 = OpFOrdEqual %bool %float_1 %33 -%35 = OpCompositeExtract %float %32 1 -%36 = OpFOrdEqual %bool %float_2 %35 -%37 = OpLogicalAnd %bool %36 %34 -OpSelectionMerge %39 None -OpBranchConditional %37 %38 %39 -%38 = OpLabel -%40 = OpAccessChain %_ptr_Uniform__arr_float_int_2_0 %10 %int_0 -%41 = OpLoad %_arr_float_int_2_0 %40 -%42 = OpAccessChain %_ptr_PushConstant__arr_float_int_2 %3 %int_0 -%44 = OpLoad %_arr_float_int_2 %42 -%45 = OpCompositeExtract %float %41 0 -%46 = OpCompositeExtract %float %44 0 -%47 = OpFOrdEqual %bool %45 %46 -%48 = OpCompositeExtract %float %41 1 -%49 = OpCompositeExtract %float %44 1 -%50 = OpFOrdEqual %bool %48 %49 -%51 = OpLogicalAnd %bool %50 %47 -OpBranch %39 -%39 = OpLabel -%52 = OpPhi %bool %false %22 %51 %38 -OpSelectionMerge %57 None -OpBranchConditional %52 %55 %56 -%55 = OpLabel -OpStore %53 %58 -OpBranch %57 -%56 = OpLabel -OpStore %53 %60 -OpBranch %57 -%57 = OpLabel -%61 = OpLoad %v4float %53 -OpStore %sk_FragColor %61 -OpReturn -OpFunctionEnd + %58 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %float_0 = OpConstant %float 0 + %60 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %main = OpFunction %void None %21 + %22 = OpLabel + %localArray = OpVariable %_ptr_Function__arr_float_int_2_0 Function + %53 = OpVariable %_ptr_Function_v4float Function + %27 = OpCompositeConstruct %_arr_float_int_2_0 %float_1 %float_2 + OpStore %localArray %27 + %30 = OpAccessChain %_ptr_Uniform__arr_float_int_2_0 %10 %int_0 + %32 = OpLoad %_arr_float_int_2_0 %30 + %33 = OpCompositeExtract %float %32 0 + %34 = OpFOrdEqual %bool %float_1 %33 + %35 = OpCompositeExtract %float %32 1 + %36 = OpFOrdEqual %bool %float_2 %35 + %37 = OpLogicalAnd %bool %36 %34 + OpSelectionMerge %39 None + OpBranchConditional %37 %38 %39 + %38 = OpLabel + %40 = OpAccessChain %_ptr_Uniform__arr_float_int_2_0 %10 %int_0 + %41 = OpLoad %_arr_float_int_2_0 %40 + %42 = OpAccessChain %_ptr_PushConstant__arr_float_int_2 %3 %int_0 + %44 = OpLoad %_arr_float_int_2 %42 + %45 = OpCompositeExtract %float %41 0 + %46 = OpCompositeExtract %float %44 0 + %47 = OpFOrdEqual %bool %45 %46 + %48 = OpCompositeExtract %float %41 1 + %49 = OpCompositeExtract %float %44 1 + %50 = OpFOrdEqual %bool %48 %49 + %51 = OpLogicalAnd %bool %50 %47 + OpBranch %39 + %39 = OpLabel + %52 = OpPhi %bool %false %22 %51 %38 + OpSelectionMerge %57 None + OpBranchConditional %52 %55 %56 + %55 = OpLabel + OpStore %53 %58 + OpBranch %57 + %56 = OpLabel + OpStore %53 %60 + OpBranch %57 + %57 = OpLabel + %61 = OpLoad %v4float %53 + OpStore %sk_FragColor %61 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/spirv/CombinedSamplerTypeDawnCompatMode.asm.frag b/tests/sksl/spirv/CombinedSamplerTypeDawnCompatMode.asm.frag index 7f0f822cd55a..c7fe5b57dad5 100644 --- a/tests/sksl/spirv/CombinedSamplerTypeDawnCompatMode.asm.frag +++ b/tests/sksl/spirv/CombinedSamplerTypeDawnCompatMode.asm.frag @@ -1,99 +1,99 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %aSampler_texture "aSampler_texture" -OpName %aSampler_sampler "aSampler_sampler" -OpName %anotherSampler_texture "anotherSampler_texture" -OpName %anotherSampler_sampler "anotherSampler_sampler" -OpName %helpers_helper_h4Z "helpers_helper_h4Z" -OpName %helper_h4Z "helper_h4Z" -OpName %helper2_h4ZZ "helper2_h4ZZ" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %aSampler_texture Binding 2 -OpDecorate %aSampler_texture DescriptorSet 1 -OpDecorate %aSampler_sampler Binding 3 -OpDecorate %aSampler_sampler DescriptorSet 1 -OpDecorate %anotherSampler_texture Binding 4 -OpDecorate %anotherSampler_texture DescriptorSet 1 -OpDecorate %anotherSampler_sampler Binding 5 -OpDecorate %anotherSampler_sampler DescriptorSet 1 -OpDecorate %48 RelaxedPrecision -OpDecorate %59 RelaxedPrecision -OpDecorate %61 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %aSampler_texture "aSampler_texture" + OpName %aSampler_sampler "aSampler_sampler" + OpName %anotherSampler_texture "anotherSampler_texture" + OpName %anotherSampler_sampler "anotherSampler_sampler" + OpName %helpers_helper_h4Z "helpers_helper_h4Z" + OpName %helper_h4Z "helper_h4Z" + OpName %helper2_h4ZZ "helper2_h4ZZ" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %aSampler_texture Binding 2 + OpDecorate %aSampler_texture DescriptorSet 1 + OpDecorate %aSampler_sampler Binding 3 + OpDecorate %aSampler_sampler DescriptorSet 1 + OpDecorate %anotherSampler_texture Binding 4 + OpDecorate %anotherSampler_texture DescriptorSet 1 + OpDecorate %anotherSampler_sampler Binding 5 + OpDecorate %anotherSampler_sampler DescriptorSet 1 + OpDecorate %48 RelaxedPrecision + OpDecorate %59 RelaxedPrecision + OpDecorate %61 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%14 = OpTypeImage %float 2D 0 0 0 1 Unknown + %14 = OpTypeImage %float 2D 0 0 0 1 Unknown %_ptr_UniformConstant_14 = OpTypePointer UniformConstant %14 %aSampler_texture = OpVariable %_ptr_UniformConstant_14 UniformConstant -%17 = OpTypeSampler + %17 = OpTypeSampler %_ptr_UniformConstant_17 = OpTypePointer UniformConstant %17 %aSampler_sampler = OpVariable %_ptr_UniformConstant_17 UniformConstant %anotherSampler_texture = OpVariable %_ptr_UniformConstant_14 UniformConstant %anotherSampler_sampler = OpVariable %_ptr_UniformConstant_17 UniformConstant -%21 = OpTypeFunction %v4float %_ptr_UniformConstant_14 %_ptr_UniformConstant_17 -%29 = OpTypeSampledImage %14 -%float_1 = OpConstant %float 1 -%v2float = OpTypeVector %float 2 -%32 = OpConstantComposite %v2float %float_1 %float_1 -%37 = OpTypeFunction %v4float %_ptr_UniformConstant_14 %_ptr_UniformConstant_17 %_ptr_UniformConstant_14 %_ptr_UniformConstant_17 -%void = OpTypeVoid -%50 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%57 = OpConstantComposite %v2float %float_0 %float_0 + %21 = OpTypeFunction %v4float %_ptr_UniformConstant_14 %_ptr_UniformConstant_17 + %29 = OpTypeSampledImage %14 + %float_1 = OpConstant %float 1 + %v2float = OpTypeVector %float 2 + %32 = OpConstantComposite %v2float %float_1 %float_1 + %37 = OpTypeFunction %v4float %_ptr_UniformConstant_14 %_ptr_UniformConstant_17 %_ptr_UniformConstant_14 %_ptr_UniformConstant_17 + %void = OpTypeVoid + %50 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %57 = OpConstantComposite %v2float %float_0 %float_0 %helpers_helper_h4Z = OpFunction %v4float None %21 -%22 = OpFunctionParameter %_ptr_UniformConstant_14 -%23 = OpFunctionParameter %_ptr_UniformConstant_17 -%24 = OpLabel -%26 = OpLoad %14 %22 -%27 = OpLoad %17 %23 -%28 = OpSampledImage %29 %26 %27 -%25 = OpImageSampleImplicitLod %v4float %28 %32 -OpReturnValue %25 -OpFunctionEnd -%helper_h4Z = OpFunction %v4float None %21 -%33 = OpFunctionParameter %_ptr_UniformConstant_14 -%34 = OpFunctionParameter %_ptr_UniformConstant_17 -%35 = OpLabel -%36 = OpFunctionCall %v4float %helpers_helper_h4Z %33 %34 -OpReturnValue %36 -OpFunctionEnd + %22 = OpFunctionParameter %_ptr_UniformConstant_14 + %23 = OpFunctionParameter %_ptr_UniformConstant_17 + %24 = OpLabel + %26 = OpLoad %14 %22 + %27 = OpLoad %17 %23 + %28 = OpSampledImage %29 %26 %27 + %25 = OpImageSampleImplicitLod %v4float %28 %32 + OpReturnValue %25 + OpFunctionEnd + %helper_h4Z = OpFunction %v4float None %21 + %33 = OpFunctionParameter %_ptr_UniformConstant_14 + %34 = OpFunctionParameter %_ptr_UniformConstant_17 + %35 = OpLabel + %36 = OpFunctionCall %v4float %helpers_helper_h4Z %33 %34 + OpReturnValue %36 + OpFunctionEnd %helper2_h4ZZ = OpFunction %v4float None %37 -%38 = OpFunctionParameter %_ptr_UniformConstant_14 -%39 = OpFunctionParameter %_ptr_UniformConstant_17 -%40 = OpFunctionParameter %_ptr_UniformConstant_14 -%41 = OpFunctionParameter %_ptr_UniformConstant_17 -%42 = OpLabel -%44 = OpLoad %14 %38 -%45 = OpLoad %17 %39 -%46 = OpSampledImage %29 %44 %45 -%43 = OpImageSampleImplicitLod %v4float %46 %32 -%47 = OpFunctionCall %v4float %helper_h4Z %40 %41 -%48 = OpFAdd %v4float %43 %47 -OpReturnValue %48 -OpFunctionEnd -%main = OpFunction %void None %50 -%51 = OpLabel -%53 = OpLoad %14 %aSampler_texture -%54 = OpLoad %17 %aSampler_sampler -%55 = OpSampledImage %29 %53 %54 -%52 = OpImageSampleImplicitLod %v4float %55 %57 -%58 = OpFunctionCall %v4float %helper_h4Z %aSampler_texture %aSampler_sampler -%59 = OpFAdd %v4float %52 %58 -%60 = OpFunctionCall %v4float %helper2_h4ZZ %aSampler_texture %aSampler_sampler %anotherSampler_texture %anotherSampler_sampler -%61 = OpFAdd %v4float %59 %60 -OpStore %sk_FragColor %61 -OpReturn -OpFunctionEnd + %38 = OpFunctionParameter %_ptr_UniformConstant_14 + %39 = OpFunctionParameter %_ptr_UniformConstant_17 + %40 = OpFunctionParameter %_ptr_UniformConstant_14 + %41 = OpFunctionParameter %_ptr_UniformConstant_17 + %42 = OpLabel + %44 = OpLoad %14 %38 + %45 = OpLoad %17 %39 + %46 = OpSampledImage %29 %44 %45 + %43 = OpImageSampleImplicitLod %v4float %46 %32 + %47 = OpFunctionCall %v4float %helper_h4Z %40 %41 + %48 = OpFAdd %v4float %43 %47 + OpReturnValue %48 + OpFunctionEnd + %main = OpFunction %void None %50 + %51 = OpLabel + %53 = OpLoad %14 %aSampler_texture + %54 = OpLoad %17 %aSampler_sampler + %55 = OpSampledImage %29 %53 %54 + %52 = OpImageSampleImplicitLod %v4float %55 %57 + %58 = OpFunctionCall %v4float %helper_h4Z %aSampler_texture %aSampler_sampler + %59 = OpFAdd %v4float %52 %58 + %60 = OpFunctionCall %v4float %helper2_h4ZZ %aSampler_texture %aSampler_sampler %anotherSampler_texture %anotherSampler_sampler + %61 = OpFAdd %v4float %59 %60 + OpStore %sk_FragColor %61 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/spirv/CombinedSamplerTypeDawnCompatMode.wgsl b/tests/sksl/spirv/CombinedSamplerTypeDawnCompatMode.wgsl new file mode 100644 index 000000000000..9b0922e29989 --- /dev/null +++ b/tests/sksl/spirv/CombinedSamplerTypeDawnCompatMode.wgsl @@ -0,0 +1,40 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +@group(1) @binding(3) var aSampler_Sampler: sampler; +@group(1) @binding(2) var aSampler_Texture: texture_2d; +@group(1) @binding(5) var anotherSampler_Sampler: sampler; +@group(1) @binding(4) var anotherSampler_Texture: texture_2d; +fn helpers_helper_h4Z(s_Texture: texture_2d, s_Sampler: sampler) -> vec4 { + { + return textureSample(s_Texture, s_Sampler, vec2(1.0)); + } +} +fn helper_h4Z(s_Texture: texture_2d, s_Sampler: sampler) -> vec4 { + { + let _skTemp0 = helpers_helper_h4Z(s_Texture, s_Sampler); + return _skTemp0; + } +} +fn helper2_h4ZZ(s1_Texture: texture_2d, s1_Sampler: sampler, s2_Texture: texture_2d, s2_Sampler: sampler) -> vec4 { + { + let _skTemp1 = helper_h4Z(s2_Texture, s2_Sampler); + return textureSample(s1_Texture, s1_Sampler, vec2(1.0)) + _skTemp1; + } +} +fn main(_stageOut: ptr) { + { + let _skTemp2 = helper_h4Z(aSampler_Texture, aSampler_Sampler); + let _skTemp3 = helper2_h4ZZ(aSampler_Texture, aSampler_Sampler, anotherSampler_Texture, anotherSampler_Sampler); + (*_stageOut).sk_FragColor = (textureSample(aSampler_Texture, aSampler_Sampler, vec2(0.0)) + _skTemp2) + _skTemp3; + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(&_stageOut); + return _stageOut; +} diff --git a/tests/sksl/spirv/ConstantVectorFromVector.asm.frag b/tests/sksl/spirv/ConstantVectorFromVector.asm.frag index 3f654fe59751..5dab3fc9acc2 100644 --- a/tests/sksl/spirv/ConstantVectorFromVector.asm.frag +++ b/tests/sksl/spirv/ConstantVectorFromVector.asm.frag @@ -1,31 +1,31 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%11 = OpTypeFunction %void -%float_0 = OpConstant %float 0 + %void = OpTypeVoid + %11 = OpTypeFunction %void + %float_0 = OpConstant %float 0 %_ptr_Output_float = OpTypePointer Output %float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%main = OpFunction %void None %11 -%12 = OpLabel -%14 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 -OpStore %14 %float_0 -OpReturn -OpFunctionEnd + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %main = OpFunction %void None %11 + %12 = OpLabel + %14 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 + OpStore %14 %float_0 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/spirv/ConstantVectorize.asm.frag b/tests/sksl/spirv/ConstantVectorize.asm.frag index e2489c68afd5..66d7d79d5e8f 100644 --- a/tests/sksl/spirv/ConstantVectorize.asm.frag +++ b/tests/sksl/spirv/ConstantVectorize.asm.frag @@ -1,56 +1,56 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_UniformBuffer "_UniformBuffer" -OpMemberName %_UniformBuffer 0 "colorGreen" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %_UniformBuffer 0 Offset 0 -OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision -OpDecorate %_UniformBuffer Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %30 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_UniformBuffer "_UniformBuffer" + OpMemberName %_UniformBuffer 0 "colorGreen" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %_UniformBuffer 0 Offset 0 + OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision + OpDecorate %_UniformBuffer Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %30 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_UniformBuffer = OpTypeStruct %v4float %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer -%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform -%void = OpTypeVoid -%15 = OpTypeFunction %void -%float_0 = OpConstant %float 0 -%v2float = OpTypeVector %float 2 -%19 = OpConstantComposite %v2float %float_0 %float_0 + %10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform + %void = OpTypeVoid + %15 = OpTypeFunction %void + %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %19 = OpConstantComposite %v2float %float_0 %float_0 %_ptr_Function_v2float = OpTypePointer Function %v2float -%23 = OpTypeFunction %v4float %_ptr_Function_v2float + %23 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%20 = OpVariable %_ptr_Function_v2float Function -OpStore %20 %19 -%22 = OpFunctionCall %v4float %main %20 -OpStore %sk_FragColor %22 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %23 -%24 = OpFunctionParameter %_ptr_Function_v2float -%25 = OpLabel -%26 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 -%30 = OpLoad %v4float %26 -OpReturnValue %30 -OpFunctionEnd + %16 = OpLabel + %20 = OpVariable %_ptr_Function_v2float Function + OpStore %20 %19 + %22 = OpFunctionCall %v4float %main %20 + OpStore %sk_FragColor %22 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %23 + %24 = OpFunctionParameter %_ptr_Function_v2float + %25 = OpLabel + %26 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0 + %30 = OpLoad %v4float %26 + OpReturnValue %30 + OpFunctionEnd diff --git a/tests/sksl/spirv/FunctionParametersOfTextureAndSamplerTypeDawnCompatMode.asm.frag b/tests/sksl/spirv/FunctionParametersOfTextureAndSamplerTypeDawnCompatMode.asm.frag index 5ebe89329af3..d56d90ccabfc 100644 --- a/tests/sksl/spirv/FunctionParametersOfTextureAndSamplerTypeDawnCompatMode.asm.frag +++ b/tests/sksl/spirv/FunctionParametersOfTextureAndSamplerTypeDawnCompatMode.asm.frag @@ -1,73 +1,73 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor %c -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %aTexture "aTexture" -OpName %aSampledTexture_texture "aSampledTexture_texture" -OpName %aSampledTexture_sampler "aSampledTexture_sampler" -OpName %c "c" -OpName %helpers_helper_h4ZT "helpers_helper_h4ZT" -OpName %helper_h4TZ "helper_h4TZ" -OpName %main "main" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %aTexture Binding 1 -OpDecorate %aTexture DescriptorSet 0 -OpDecorate %aSampledTexture_texture Binding 2 -OpDecorate %aSampledTexture_texture DescriptorSet 0 -OpDecorate %aSampledTexture_sampler Binding 3 -OpDecorate %aSampledTexture_sampler DescriptorSet 0 -OpDecorate %c Location 1 -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor %c + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %aTexture "aTexture" + OpName %aSampledTexture_texture "aSampledTexture_texture" + OpName %aSampledTexture_sampler "aSampledTexture_sampler" + OpName %c "c" + OpName %helpers_helper_h4ZT "helpers_helper_h4ZT" + OpName %helper_h4TZ "helper_h4TZ" + OpName %main "main" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %aTexture Binding 1 + OpDecorate %aTexture DescriptorSet 0 + OpDecorate %aSampledTexture_texture Binding 2 + OpDecorate %aSampledTexture_texture DescriptorSet 0 + OpDecorate %aSampledTexture_sampler Binding 3 + OpDecorate %aSampledTexture_sampler DescriptorSet 0 + OpDecorate %c Location 1 + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%13 = OpTypeImage %float 2D 0 0 0 1 Unknown + %13 = OpTypeImage %float 2D 0 0 0 1 Unknown %_ptr_UniformConstant_13 = OpTypePointer UniformConstant %13 -%aTexture = OpVariable %_ptr_UniformConstant_13 UniformConstant + %aTexture = OpVariable %_ptr_UniformConstant_13 UniformConstant %aSampledTexture_texture = OpVariable %_ptr_UniformConstant_13 UniformConstant -%17 = OpTypeSampler + %17 = OpTypeSampler %_ptr_UniformConstant_17 = OpTypePointer UniformConstant %17 %aSampledTexture_sampler = OpVariable %_ptr_UniformConstant_17 UniformConstant -%v2float = OpTypeVector %float 2 + %v2float = OpTypeVector %float 2 %_ptr_Input_v2float = OpTypePointer Input %v2float -%c = OpVariable %_ptr_Input_v2float Input -%22 = OpTypeFunction %v4float %_ptr_UniformConstant_13 %_ptr_UniformConstant_17 %_ptr_UniformConstant_13 -%31 = OpTypeSampledImage %13 -%33 = OpTypeFunction %v4float %_ptr_UniformConstant_13 %_ptr_UniformConstant_13 %_ptr_UniformConstant_17 -%void = OpTypeVoid -%40 = OpTypeFunction %void + %c = OpVariable %_ptr_Input_v2float Input + %22 = OpTypeFunction %v4float %_ptr_UniformConstant_13 %_ptr_UniformConstant_17 %_ptr_UniformConstant_13 + %31 = OpTypeSampledImage %13 + %33 = OpTypeFunction %v4float %_ptr_UniformConstant_13 %_ptr_UniformConstant_13 %_ptr_UniformConstant_17 + %void = OpTypeVoid + %40 = OpTypeFunction %void %helpers_helper_h4ZT = OpFunction %v4float None %22 -%23 = OpFunctionParameter %_ptr_UniformConstant_13 -%24 = OpFunctionParameter %_ptr_UniformConstant_17 -%25 = OpFunctionParameter %_ptr_UniformConstant_13 -%26 = OpLabel -%28 = OpLoad %13 %23 -%29 = OpLoad %17 %24 -%30 = OpSampledImage %31 %28 %29 -%32 = OpLoad %v2float %c -%27 = OpImageSampleImplicitLod %v4float %30 %32 -OpReturnValue %27 -OpFunctionEnd + %23 = OpFunctionParameter %_ptr_UniformConstant_13 + %24 = OpFunctionParameter %_ptr_UniformConstant_17 + %25 = OpFunctionParameter %_ptr_UniformConstant_13 + %26 = OpLabel + %28 = OpLoad %13 %23 + %29 = OpLoad %17 %24 + %30 = OpSampledImage %31 %28 %29 + %32 = OpLoad %v2float %c + %27 = OpImageSampleImplicitLod %v4float %30 %32 + OpReturnValue %27 + OpFunctionEnd %helper_h4TZ = OpFunction %v4float None %33 -%34 = OpFunctionParameter %_ptr_UniformConstant_13 -%35 = OpFunctionParameter %_ptr_UniformConstant_13 -%36 = OpFunctionParameter %_ptr_UniformConstant_17 -%37 = OpLabel -%38 = OpFunctionCall %v4float %helpers_helper_h4ZT %35 %36 %34 -OpReturnValue %38 -OpFunctionEnd -%main = OpFunction %void None %40 -%41 = OpLabel -%42 = OpFunctionCall %v4float %helper_h4TZ %aTexture %aSampledTexture_texture %aSampledTexture_sampler -OpStore %sk_FragColor %42 -OpReturn -OpFunctionEnd + %34 = OpFunctionParameter %_ptr_UniformConstant_13 + %35 = OpFunctionParameter %_ptr_UniformConstant_13 + %36 = OpFunctionParameter %_ptr_UniformConstant_17 + %37 = OpLabel + %38 = OpFunctionCall %v4float %helpers_helper_h4ZT %35 %36 %34 + OpReturnValue %38 + OpFunctionEnd + %main = OpFunction %void None %40 + %41 = OpLabel + %42 = OpFunctionCall %v4float %helper_h4TZ %aTexture %aSampledTexture_texture %aSampledTexture_sampler + OpStore %sk_FragColor %42 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/spirv/FunctionParametersOfTextureAndSamplerTypeDawnCompatMode.wgsl b/tests/sksl/spirv/FunctionParametersOfTextureAndSamplerTypeDawnCompatMode.wgsl new file mode 100644 index 000000000000..6fbb548a5c61 --- /dev/null +++ b/tests/sksl/spirv/FunctionParametersOfTextureAndSamplerTypeDawnCompatMode.wgsl @@ -0,0 +1,33 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, + @location(1) c: vec2, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +@group(0) @binding(1) var aTexture: texture_2d; +@group(0) @binding(3) var aSampledTexture_Sampler: sampler; +@group(0) @binding(2) var aSampledTexture_Texture: texture_2d; +fn helpers_helper_h4ZT(_stageIn: FSIn, s_Texture: texture_2d, s_Sampler: sampler, t: texture_2d) -> vec4 { + { + return textureSample(s_Texture, s_Sampler, _stageIn.c); + } +} +fn helper_h4TZ(_stageIn: FSIn, t: texture_2d, s_Texture: texture_2d, s_Sampler: sampler) -> vec4 { + { + let _skTemp0 = helpers_helper_h4ZT(_stageIn, s_Texture, s_Sampler, t); + return _skTemp0; + } +} +fn main(_stageIn: FSIn, _stageOut: ptr) { + { + let _skTemp1 = helper_h4TZ(_stageIn, aTexture, aSampledTexture_Texture, aSampledTexture_Sampler); + (*_stageOut).sk_FragColor = _skTemp1; + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(_stageIn, &_stageOut); + return _stageOut; +} diff --git a/tests/sksl/spirv/InterfaceBlockPushConstant.asm.frag b/tests/sksl/spirv/InterfaceBlockPushConstant.asm.frag index baa9cc0bbdb2..b2a5befdb585 100644 --- a/tests/sksl/spirv/InterfaceBlockPushConstant.asm.frag +++ b/tests/sksl/spirv/InterfaceBlockPushConstant.asm.frag @@ -1,69 +1,69 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %testBlock "testBlock" -OpMemberName %testBlock 0 "m1" -OpMemberName %testBlock 1 "m2" -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %main "main" -OpMemberDecorate %testBlock 0 Offset 16 -OpMemberDecorate %testBlock 0 ColMajor -OpMemberDecorate %testBlock 0 MatrixStride 8 -OpMemberDecorate %testBlock 0 RelaxedPrecision -OpMemberDecorate %testBlock 1 Offset 32 -OpMemberDecorate %testBlock 1 ColMajor -OpMemberDecorate %testBlock 1 MatrixStride 8 -OpMemberDecorate %testBlock 1 RelaxedPrecision -OpDecorate %testBlock Block -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %22 RelaxedPrecision -OpDecorate %23 RelaxedPrecision -OpDecorate %26 RelaxedPrecision -OpDecorate %27 RelaxedPrecision -OpDecorate %29 RelaxedPrecision -OpDecorate %30 RelaxedPrecision -OpDecorate %32 RelaxedPrecision -OpDecorate %33 RelaxedPrecision -OpDecorate %34 RelaxedPrecision -%float = OpTypeFloat 32 -%v2float = OpTypeVector %float 2 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %testBlock "testBlock" + OpMemberName %testBlock 0 "m1" + OpMemberName %testBlock 1 "m2" + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %main "main" + OpMemberDecorate %testBlock 0 Offset 16 + OpMemberDecorate %testBlock 0 ColMajor + OpMemberDecorate %testBlock 0 MatrixStride 8 + OpMemberDecorate %testBlock 0 RelaxedPrecision + OpMemberDecorate %testBlock 1 Offset 32 + OpMemberDecorate %testBlock 1 ColMajor + OpMemberDecorate %testBlock 1 MatrixStride 8 + OpMemberDecorate %testBlock 1 RelaxedPrecision + OpDecorate %testBlock Block + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %22 RelaxedPrecision + OpDecorate %23 RelaxedPrecision + OpDecorate %26 RelaxedPrecision + OpDecorate %27 RelaxedPrecision + OpDecorate %29 RelaxedPrecision + OpDecorate %30 RelaxedPrecision + OpDecorate %32 RelaxedPrecision + OpDecorate %33 RelaxedPrecision + OpDecorate %34 RelaxedPrecision + %float = OpTypeFloat 32 + %v2float = OpTypeVector %float 2 %mat2v2float = OpTypeMatrix %v2float 2 -%testBlock = OpTypeStruct %mat2v2float %mat2v2float + %testBlock = OpTypeStruct %mat2v2float %mat2v2float %_ptr_PushConstant_testBlock = OpTypePointer PushConstant %testBlock -%3 = OpVariable %_ptr_PushConstant_testBlock PushConstant -%bool = OpTypeBool + %3 = OpVariable %_ptr_PushConstant_testBlock PushConstant + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%v4float = OpTypeVector %float 4 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%16 = OpTypeFunction %void -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 + %void = OpTypeVoid + %16 = OpTypeFunction %void + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 %_ptr_PushConstant_v2float = OpTypePointer PushConstant %v2float -%int_1 = OpConstant %int 1 -%main = OpFunction %void None %16 -%17 = OpLabel -%20 = OpAccessChain %_ptr_PushConstant_v2float %3 %int_0 %int_0 -%22 = OpLoad %v2float %20 -%23 = OpCompositeExtract %float %22 0 -%25 = OpAccessChain %_ptr_PushConstant_v2float %3 %int_0 %int_1 -%26 = OpLoad %v2float %25 -%27 = OpCompositeExtract %float %26 1 -%28 = OpAccessChain %_ptr_PushConstant_v2float %3 %int_1 %int_0 -%29 = OpLoad %v2float %28 -%30 = OpCompositeExtract %float %29 0 -%31 = OpAccessChain %_ptr_PushConstant_v2float %3 %int_1 %int_1 -%32 = OpLoad %v2float %31 -%33 = OpCompositeExtract %float %32 1 -%34 = OpCompositeConstruct %v4float %23 %27 %30 %33 -OpStore %sk_FragColor %34 -OpReturn -OpFunctionEnd + %int_1 = OpConstant %int 1 + %main = OpFunction %void None %16 + %17 = OpLabel + %20 = OpAccessChain %_ptr_PushConstant_v2float %3 %int_0 %int_0 + %22 = OpLoad %v2float %20 + %23 = OpCompositeExtract %float %22 0 + %25 = OpAccessChain %_ptr_PushConstant_v2float %3 %int_0 %int_1 + %26 = OpLoad %v2float %25 + %27 = OpCompositeExtract %float %26 1 + %28 = OpAccessChain %_ptr_PushConstant_v2float %3 %int_1 %int_0 + %29 = OpLoad %v2float %28 + %30 = OpCompositeExtract %float %29 0 + %31 = OpAccessChain %_ptr_PushConstant_v2float %3 %int_1 %int_1 + %32 = OpLoad %v2float %31 + %33 = OpCompositeExtract %float %32 1 + %34 = OpCompositeConstruct %v4float %23 %27 %30 %33 + OpStore %sk_FragColor %34 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/spirv/Ossfuzz35916.asm.frag b/tests/sksl/spirv/Ossfuzz35916.asm.frag index 017057e90eaf..62b59b65dbee 100644 --- a/tests/sksl/spirv/Ossfuzz35916.asm.frag +++ b/tests/sksl/spirv/Ossfuzz35916.asm.frag @@ -1,67 +1,67 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor %sk_FragCoord -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %sk_FragCoord "sk_FragCoord" -OpName %main "main" -OpName %sksl_synthetic_uniforms "sksl_synthetic_uniforms" -OpMemberName %sksl_synthetic_uniforms 0 "u_skRTFlip" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %sk_FragCoord BuiltIn FragCoord -OpDecorate %19 RelaxedPrecision -OpDecorate %21 RelaxedPrecision -OpMemberDecorate %sksl_synthetic_uniforms 0 Offset 16384 -OpDecorate %sksl_synthetic_uniforms Block -OpDecorate %22 Binding 0 -OpDecorate %22 DescriptorSet 0 -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor %sk_FragCoord + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %sk_FragCoord "sk_FragCoord" + OpName %main "main" + OpName %sksl_synthetic_uniforms "sksl_synthetic_uniforms" + OpMemberName %sksl_synthetic_uniforms 0 "u_skRTFlip" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %sk_FragCoord BuiltIn FragCoord + OpDecorate %19 RelaxedPrecision + OpDecorate %21 RelaxedPrecision + OpMemberDecorate %sksl_synthetic_uniforms 0 Offset 16384 + OpDecorate %sksl_synthetic_uniforms Block + OpDecorate %22 Binding 0 + OpDecorate %22 DescriptorSet 0 + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_ptr_Input_v4float = OpTypePointer Input %v4float %sk_FragCoord = OpVariable %_ptr_Input_v4float Input -%void = OpTypeVoid -%13 = OpTypeFunction %void + %void = OpTypeVoid + %13 = OpTypeFunction %void %_ptr_Output_float = OpTypePointer Output %float -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%float_1 = OpConstant %float 1 -%v2float = OpTypeVector %float 2 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %float_1 = OpConstant %float 1 + %v2float = OpTypeVector %float 2 %sksl_synthetic_uniforms = OpTypeStruct %v2float %_ptr_Uniform_sksl_synthetic_uniforms = OpTypePointer Uniform %sksl_synthetic_uniforms -%22 = OpVariable %_ptr_Uniform_sksl_synthetic_uniforms Uniform + %22 = OpVariable %_ptr_Uniform_sksl_synthetic_uniforms Uniform %_ptr_Uniform_v2float = OpTypePointer Uniform %v2float -%main = OpFunction %void None %13 -%14 = OpLabel -%15 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 -%19 = OpLoad %float %15 -%21 = OpFSub %float %19 %float_1 -OpStore %15 %21 -%26 = OpAccessChain %_ptr_Uniform_v2float %22 %int_0 -%28 = OpLoad %v2float %26 -%29 = OpCompositeExtract %float %28 0 -%30 = OpAccessChain %_ptr_Uniform_v2float %22 %int_0 -%31 = OpLoad %v2float %30 -%32 = OpCompositeExtract %float %31 1 -%33 = OpLoad %v4float %sk_FragCoord -%34 = OpCompositeExtract %float %33 0 -%35 = OpLoad %v4float %sk_FragCoord -%36 = OpCompositeExtract %float %35 1 -%37 = OpLoad %v4float %sk_FragCoord -%38 = OpVectorShuffle %v2float %37 %37 2 3 -%39 = OpFMul %float %32 %36 -%40 = OpFAdd %float %29 %39 -%41 = OpCompositeConstruct %v4float %34 %40 %38 -%42 = OpCompositeConstruct %v4float %19 %19 %19 %19 -%43 = OpFAdd %v4float %42 %41 -OpReturn -OpFunctionEnd + %main = OpFunction %void None %13 + %14 = OpLabel + %15 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0 + %19 = OpLoad %float %15 + %21 = OpFSub %float %19 %float_1 + OpStore %15 %21 + %26 = OpAccessChain %_ptr_Uniform_v2float %22 %int_0 + %28 = OpLoad %v2float %26 + %29 = OpCompositeExtract %float %28 0 + %30 = OpAccessChain %_ptr_Uniform_v2float %22 %int_0 + %31 = OpLoad %v2float %30 + %32 = OpCompositeExtract %float %31 1 + %33 = OpLoad %v4float %sk_FragCoord + %34 = OpCompositeExtract %float %33 0 + %35 = OpLoad %v4float %sk_FragCoord + %36 = OpCompositeExtract %float %35 1 + %37 = OpLoad %v4float %sk_FragCoord + %38 = OpVectorShuffle %v2float %37 %37 2 3 + %39 = OpFMul %float %32 %36 + %40 = OpFAdd %float %29 %39 + %41 = OpCompositeConstruct %v4float %34 %40 %38 + %42 = OpCompositeConstruct %v4float %19 %19 %19 %19 + %43 = OpFAdd %v4float %42 %41 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/spirv/Ossfuzz37627.asm.frag b/tests/sksl/spirv/Ossfuzz37627.asm.frag index b845d915dbdc..cdb08564e525 100644 --- a/tests/sksl/spirv/Ossfuzz37627.asm.frag +++ b/tests/sksl/spirv/Ossfuzz37627.asm.frag @@ -1,26 +1,26 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise -OpExecutionMode %main OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %main "main" -OpName %x "x" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise + OpExecutionMode %main OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %main "main" + OpName %x "x" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%void = OpTypeVoid -%7 = OpTypeFunction %void -%uint = OpTypeInt 32 0 + %void = OpTypeVoid + %7 = OpTypeFunction %void + %uint = OpTypeInt 32 0 %_ptr_Function_uint = OpTypePointer Function %uint -%uint_1 = OpConstant %uint 1 -%main = OpFunction %void None %7 -%8 = OpLabel -%x = OpVariable %_ptr_Function_uint Function -%13 = OpLoad %uint %x -%14 = OpIAdd %uint %13 %uint_1 -OpStore %x %14 -%15 = OpSNegate %uint %14 -OpReturn -OpFunctionEnd + %uint_1 = OpConstant %uint 1 + %main = OpFunction %void None %7 + %8 = OpLabel + %x = OpVariable %_ptr_Function_uint Function + %13 = OpLoad %uint %x + %14 = OpIAdd %uint %13 %uint_1 + OpStore %x %14 + %15 = OpSNegate %uint %14 + OpReturn + OpFunctionEnd diff --git a/tests/sksl/spirv/Ossfuzz53202.asm.frag b/tests/sksl/spirv/Ossfuzz53202.asm.frag index 01b6c70a3bc7..33328b6adee4 100644 --- a/tests/sksl/spirv/Ossfuzz53202.asm.frag +++ b/tests/sksl/spirv/Ossfuzz53202.asm.frag @@ -1,91 +1,91 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %colorR "colorR" -OpName %colorGreen "colorGreen" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %_0_ok "_0_ok" -OpName %_1_d "_1_d" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %colorR RelaxedPrecision -OpDecorate %colorGreen RelaxedPrecision -OpDecorate %_arr_float_int_2 ArrayStride 16 -OpDecorate %49 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %51 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %colorR "colorR" + OpName %colorGreen "colorGreen" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %_0_ok "_0_ok" + OpName %_1_d "_1_d" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %colorR RelaxedPrecision + OpDecorate %colorGreen RelaxedPrecision + OpDecorate %_arr_float_int_2 ArrayStride 16 + OpDecorate %49 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output %_ptr_Private_v4float = OpTypePointer Private %v4float -%colorR = OpVariable %_ptr_Private_v4float Private -%colorGreen = OpVariable %_ptr_Private_v4float Private -%void = OpTypeVoid -%15 = OpTypeFunction %void -%18 = OpTypeFunction %v4float -%int = OpTypeInt 32 1 + %colorR = OpVariable %_ptr_Private_v4float Private + %colorGreen = OpVariable %_ptr_Private_v4float Private + %void = OpTypeVoid + %15 = OpTypeFunction %void + %18 = OpTypeFunction %v4float + %int = OpTypeInt 32 1 %_ptr_Function_int = OpTypePointer Function %int -%int_2 = OpConstant %int 2 + %int_2 = OpConstant %int 2 %_arr_float_int_2 = OpTypeArray %float %int_2 %_ptr_Function__arr_float_int_2 = OpTypePointer Function %_arr_float_int_2 -%float_0 = OpConstant %float 0 -%float_1 = OpConstant %float 1 -%int_1 = OpConstant %int 1 + %float_0 = OpConstant %float 0 + %float_1 = OpConstant %float 1 + %int_1 = OpConstant %int 1 %_ptr_Function_float = OpTypePointer Function %float -%int_0 = OpConstant %int 0 + %int_0 = OpConstant %int 0 %_ptr_Function_v4float = OpTypePointer Function %v4float %_entrypoint_v = OpFunction %void None %15 -%16 = OpLabel -%17 = OpFunctionCall %v4float %main -OpStore %sk_FragColor %17 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %18 -%19 = OpLabel -%_0_ok = OpVariable %_ptr_Function_int Function -%_1_d = OpVariable %_ptr_Function__arr_float_int_2 Function -%44 = OpVariable %_ptr_Function_v4float Function -%29 = OpCompositeConstruct %_arr_float_int_2 %float_0 %float_1 -OpStore %_1_d %29 -OpBranch %30 -%30 = OpLabel -OpLoopMerge %34 %33 None -OpBranch %31 -%31 = OpLabel -%35 = OpNot %int %int_1 -%37 = OpAccessChain %_ptr_Function_float %_1_d %35 -%39 = OpLoad %float %37 -%40 = OpFOrdLessThan %bool %float_0 %39 -OpBranchConditional %40 %32 %34 -%32 = OpLabel -OpBranch %33 -%33 = OpLabel -OpBranch %30 -%34 = OpLabel -%41 = OpLoad %int %_0_ok -%43 = OpIEqual %bool %41 %int_0 -OpSelectionMerge %48 None -OpBranchConditional %43 %46 %47 -%46 = OpLabel -%49 = OpLoad %v4float %colorGreen -OpStore %44 %49 -OpBranch %48 -%47 = OpLabel -%50 = OpLoad %v4float %colorR -OpStore %44 %50 -OpBranch %48 -%48 = OpLabel -%51 = OpLoad %v4float %44 -OpReturnValue %51 -OpFunctionEnd + %16 = OpLabel + %17 = OpFunctionCall %v4float %main + OpStore %sk_FragColor %17 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %18 + %19 = OpLabel + %_0_ok = OpVariable %_ptr_Function_int Function + %_1_d = OpVariable %_ptr_Function__arr_float_int_2 Function + %44 = OpVariable %_ptr_Function_v4float Function + %29 = OpCompositeConstruct %_arr_float_int_2 %float_0 %float_1 + OpStore %_1_d %29 + OpBranch %30 + %30 = OpLabel + OpLoopMerge %34 %33 None + OpBranch %31 + %31 = OpLabel + %35 = OpNot %int %int_1 + %37 = OpAccessChain %_ptr_Function_float %_1_d %35 + %39 = OpLoad %float %37 + %40 = OpFOrdLessThan %bool %float_0 %39 + OpBranchConditional %40 %32 %34 + %32 = OpLabel + OpBranch %33 + %33 = OpLabel + OpBranch %30 + %34 = OpLabel + %41 = OpLoad %int %_0_ok + %43 = OpIEqual %bool %41 %int_0 + OpSelectionMerge %48 None + OpBranchConditional %43 %46 %47 + %46 = OpLabel + %49 = OpLoad %v4float %colorGreen + OpStore %44 %49 + OpBranch %48 + %47 = OpLabel + %50 = OpLoad %v4float %colorR + OpStore %44 %50 + OpBranch %48 + %48 = OpLabel + %51 = OpLoad %v4float %44 + OpReturnValue %51 + OpFunctionEnd diff --git a/tests/sksl/spirv/StructArrayMemberInDifferentLayouts.asm.frag b/tests/sksl/spirv/StructArrayMemberInDifferentLayouts.asm.frag index 2ab563789925..348c0cc6e559 100644 --- a/tests/sksl/spirv/StructArrayMemberInDifferentLayouts.asm.frag +++ b/tests/sksl/spirv/StructArrayMemberInDifferentLayouts.asm.frag @@ -3,97 +3,97 @@ error: SPIR-V validation error: Expected Constituent type to be equal to the corresponding member type of Result Type struct %30 = OpCompositeConstruct %S %29 -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor -OpExecutionMode %main OriginUpperLeft -OpName %testPushConstants "testPushConstants" -OpMemberName %testPushConstants 0 "pushConstantArray" -OpName %testUniforms "testUniforms" -OpMemberName %testUniforms 0 "uboArray" -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %main "main" -OpName %S "S" -OpMemberName %S 0 "a" -OpName %s1 "s1" -OpName %s2 "s2" -OpDecorate %_arr_float_int_2 ArrayStride 4 -OpMemberDecorate %testPushConstants 0 Offset 0 -OpDecorate %testPushConstants Block -OpDecorate %_arr_float_int_2_0 ArrayStride 16 -OpMemberDecorate %testUniforms 0 Offset 0 -OpDecorate %testUniforms Block -OpDecorate %10 Binding 0 -OpDecorate %10 DescriptorSet 0 -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpMemberDecorate %S 0 Offset 0 -OpDecorate %52 RelaxedPrecision -%float = OpTypeFloat 32 -%int = OpTypeInt 32 1 -%int_2 = OpConstant %int 2 + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %sk_Clockwise %sk_FragColor + OpExecutionMode %main OriginUpperLeft + OpName %testPushConstants "testPushConstants" + OpMemberName %testPushConstants 0 "pushConstantArray" + OpName %testUniforms "testUniforms" + OpMemberName %testUniforms 0 "uboArray" + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %main "main" + OpName %S "S" + OpMemberName %S 0 "a" + OpName %s1 "s1" + OpName %s2 "s2" + OpDecorate %_arr_float_int_2 ArrayStride 4 + OpMemberDecorate %testPushConstants 0 Offset 0 + OpDecorate %testPushConstants Block + OpDecorate %_arr_float_int_2_0 ArrayStride 16 + OpMemberDecorate %testUniforms 0 Offset 0 + OpDecorate %testUniforms Block + OpDecorate %10 Binding 0 + OpDecorate %10 DescriptorSet 0 + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpMemberDecorate %S 0 Offset 0 + OpDecorate %52 RelaxedPrecision + %float = OpTypeFloat 32 + %int = OpTypeInt 32 1 + %int_2 = OpConstant %int 2 %_arr_float_int_2 = OpTypeArray %float %int_2 %testPushConstants = OpTypeStruct %_arr_float_int_2 %_ptr_PushConstant_testPushConstants = OpTypePointer PushConstant %testPushConstants -%3 = OpVariable %_ptr_PushConstant_testPushConstants PushConstant + %3 = OpVariable %_ptr_PushConstant_testPushConstants PushConstant %_arr_float_int_2_0 = OpTypeArray %float %int_2 %testUniforms = OpTypeStruct %_arr_float_int_2_0 %_ptr_Uniform_testUniforms = OpTypePointer Uniform %testUniforms -%10 = OpVariable %_ptr_Uniform_testUniforms Uniform -%bool = OpTypeBool + %10 = OpVariable %_ptr_Uniform_testUniforms Uniform + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%v4float = OpTypeVector %float 4 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%21 = OpTypeFunction %void -%S = OpTypeStruct %_arr_float_int_2_0 + %void = OpTypeVoid + %21 = OpTypeFunction %void + %S = OpTypeStruct %_arr_float_int_2_0 %_ptr_Function_S = OpTypePointer Function %S -%int_0 = OpConstant %int 0 + %int_0 = OpConstant %int 0 %_ptr_PushConstant__arr_float_int_2 = OpTypePointer PushConstant %_arr_float_int_2 %_ptr_Uniform__arr_float_int_2_0 = OpTypePointer Uniform %_arr_float_int_2_0 %_ptr_Function_v4float = OpTypePointer Function %v4float -%float_1 = OpConstant %float 1 -%49 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 -%float_0 = OpConstant %float 0 -%51 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 -%main = OpFunction %void None %21 -%22 = OpLabel -%s1 = OpVariable %_ptr_Function_S Function -%s2 = OpVariable %_ptr_Function_S Function -%43 = OpVariable %_ptr_Function_v4float Function -%27 = OpAccessChain %_ptr_PushConstant__arr_float_int_2 %3 %int_0 -%29 = OpLoad %_arr_float_int_2 %27 -%30 = OpCompositeConstruct %S %29 -OpStore %s1 %30 -%32 = OpAccessChain %_ptr_Uniform__arr_float_int_2_0 %10 %int_0 -%34 = OpLoad %_arr_float_int_2_0 %32 -%35 = OpCompositeConstruct %S %34 -OpStore %s2 %35 -%36 = OpCompositeExtract %float %29 0 -%37 = OpCompositeExtract %float %34 0 -%38 = OpFOrdEqual %bool %36 %37 -%39 = OpCompositeExtract %float %29 1 -%40 = OpCompositeExtract %float %34 1 -%41 = OpFOrdEqual %bool %39 %40 -%42 = OpLogicalAnd %bool %41 %38 -OpSelectionMerge %47 None -OpBranchConditional %42 %45 %46 -%45 = OpLabel -OpStore %43 %49 -OpBranch %47 -%46 = OpLabel -OpStore %43 %51 -OpBranch %47 -%47 = OpLabel -%52 = OpLoad %v4float %43 -OpStore %sk_FragColor %52 -OpReturn -OpFunctionEnd + %float_1 = OpConstant %float 1 + %49 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %float_0 = OpConstant %float 0 + %51 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 + %main = OpFunction %void None %21 + %22 = OpLabel + %s1 = OpVariable %_ptr_Function_S Function + %s2 = OpVariable %_ptr_Function_S Function + %43 = OpVariable %_ptr_Function_v4float Function + %27 = OpAccessChain %_ptr_PushConstant__arr_float_int_2 %3 %int_0 + %29 = OpLoad %_arr_float_int_2 %27 + %30 = OpCompositeConstruct %S %29 + OpStore %s1 %30 + %32 = OpAccessChain %_ptr_Uniform__arr_float_int_2_0 %10 %int_0 + %34 = OpLoad %_arr_float_int_2_0 %32 + %35 = OpCompositeConstruct %S %34 + OpStore %s2 %35 + %36 = OpCompositeExtract %float %29 0 + %37 = OpCompositeExtract %float %34 0 + %38 = OpFOrdEqual %bool %36 %37 + %39 = OpCompositeExtract %float %29 1 + %40 = OpCompositeExtract %float %34 1 + %41 = OpFOrdEqual %bool %39 %40 + %42 = OpLogicalAnd %bool %41 %38 + OpSelectionMerge %47 None + OpBranchConditional %42 %45 %46 + %45 = OpLabel + OpStore %43 %49 + OpBranch %47 + %46 = OpLabel + OpStore %43 %51 + OpBranch %47 + %47 = OpLabel + %52 = OpLoad %v4float %43 + OpStore %sk_FragColor %52 + OpReturn + OpFunctionEnd 1 error diff --git a/tests/sksl/spirv/UnusedInterfaceBlock.asm.frag b/tests/sksl/spirv/UnusedInterfaceBlock.asm.frag index 98ff0e434046..8c3bdafeb900 100644 --- a/tests/sksl/spirv/UnusedInterfaceBlock.asm.frag +++ b/tests/sksl/spirv/UnusedInterfaceBlock.asm.frag @@ -3,30 +3,30 @@ error: SPIR-V validation error: [VUID-StandaloneSpirv-Location-04919] Member index 0 is missing a location assignment %s = OpTypeStruct %int -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %main "main" %3 %sk_Clockwise -OpExecutionMode %main OriginUpperLeft -OpName %s "s" -OpMemberName %s 0 "I" -OpName %sk_Clockwise "sk_Clockwise" -OpName %main "main" -OpMemberDecorate %s 0 Offset 0 -OpDecorate %s Block -OpDecorate %sk_Clockwise BuiltIn FrontFacing -%int = OpTypeInt 32 1 -%s = OpTypeStruct %int + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %main "main" %3 %sk_Clockwise + OpExecutionMode %main OriginUpperLeft + OpName %s "s" + OpMemberName %s 0 "I" + OpName %sk_Clockwise "sk_Clockwise" + OpName %main "main" + OpMemberDecorate %s 0 Offset 0 + OpDecorate %s Block + OpDecorate %sk_Clockwise BuiltIn FrontFacing + %int = OpTypeInt 32 1 + %s = OpTypeStruct %int %_ptr_Input_s = OpTypePointer Input %s -%3 = OpVariable %_ptr_Input_s Input -%bool = OpTypeBool + %3 = OpVariable %_ptr_Input_s Input + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%void = OpTypeVoid -%11 = OpTypeFunction %void -%main = OpFunction %void None %11 -%12 = OpLabel -OpReturn -OpFunctionEnd + %void = OpTypeVoid + %11 = OpTypeFunction %void + %main = OpFunction %void None %11 + %12 = OpLabel + OpReturn + OpFunctionEnd 1 error diff --git a/tests/sksl/wgsl/BuiltinFragmentStageIO.wgsl b/tests/sksl/wgsl/BuiltinFragmentStageIO.wgsl index d794a95a5b20..6aeac569e961 100644 --- a/tests/sksl/wgsl/BuiltinFragmentStageIO.wgsl +++ b/tests/sksl/wgsl/BuiltinFragmentStageIO.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, diff --git a/tests/sksl/wgsl/BuiltinVertexStageIO.wgsl b/tests/sksl/wgsl/BuiltinVertexStageIO.wgsl index 4f511fb7b48c..46357ccfc0ff 100644 --- a/tests/sksl/wgsl/BuiltinVertexStageIO.wgsl +++ b/tests/sksl/wgsl/BuiltinVertexStageIO.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct VSIn { @builtin(instance_index) sk_InstanceID: u32, @builtin(vertex_index) sk_VertexID: u32, diff --git a/tests/sksl/wgsl/CastMat2x2ToMat3x3.wgsl b/tests/sksl/wgsl/CastMat2x2ToMat3x3.wgsl index b38ed199edb7..8d1dc278f1c1 100644 --- a/tests/sksl/wgsl/CastMat2x2ToMat3x3.wgsl +++ b/tests/sksl/wgsl/CastMat2x2ToMat3x3.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/wgsl/CastMat2x2ToVec4.wgsl b/tests/sksl/wgsl/CastMat2x2ToVec4.wgsl index 4207d4799f10..cb1701092e93 100644 --- a/tests/sksl/wgsl/CastMat2x2ToVec4.wgsl +++ b/tests/sksl/wgsl/CastMat2x2ToVec4.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/wgsl/CastMat2x3ToMat4x4.wgsl b/tests/sksl/wgsl/CastMat2x3ToMat4x4.wgsl index 56e777bb46ca..6093f17399c3 100644 --- a/tests/sksl/wgsl/CastMat2x3ToMat4x4.wgsl +++ b/tests/sksl/wgsl/CastMat2x3ToMat4x4.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/wgsl/CastMat4x4ToMat3x4.wgsl b/tests/sksl/wgsl/CastMat4x4ToMat3x4.wgsl index 7bd416d23555..05c8fb7d2c1d 100644 --- a/tests/sksl/wgsl/CastMat4x4ToMat3x4.wgsl +++ b/tests/sksl/wgsl/CastMat4x4ToMat3x4.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/wgsl/CastMat4x4ToMat4x3.wgsl b/tests/sksl/wgsl/CastMat4x4ToMat4x3.wgsl index e90cf350e71f..58e7759bdf36 100644 --- a/tests/sksl/wgsl/CastMat4x4ToMat4x3.wgsl +++ b/tests/sksl/wgsl/CastMat4x4ToMat4x3.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/wgsl/CastVec4ToMat2x2.wgsl b/tests/sksl/wgsl/CastVec4ToMat2x2.wgsl index f4c4bf96dede..6cb9d9b74b48 100644 --- a/tests/sksl/wgsl/CastVec4ToMat2x2.wgsl +++ b/tests/sksl/wgsl/CastVec4ToMat2x2.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/wgsl/Equality.wgsl b/tests/sksl/wgsl/Equality.wgsl index 28a8d30ca90b..06350b39e103 100644 --- a/tests/sksl/wgsl/Equality.wgsl +++ b/tests/sksl/wgsl/Equality.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; @@ -30,14 +31,14 @@ struct _GlobalUniforms { fn main() -> vec4 { { var ok: bool = true; - ok = ok && _globalUniforms.f1 == _globalUniforms.f2; - ok = ok && _globalUniforms.h1 == _globalUniforms.h2; - ok = ok && _globalUniforms.f1 == f32(_globalUniforms.h2); - ok = ok && f32(_globalUniforms.h1) == _globalUniforms.f2; - ok = ok && _globalUniforms.f1 != _globalUniforms.f3; - ok = ok && _globalUniforms.h1 != _globalUniforms.h3; - ok = ok && _globalUniforms.f1 != f32(_globalUniforms.h3); - ok = ok && f32(_globalUniforms.h1) != _globalUniforms.f3; + ok = ok && (_globalUniforms.f1 == _globalUniforms.f2); + ok = ok && (_globalUniforms.h1 == _globalUniforms.h2); + ok = ok && (_globalUniforms.f1 == f32(_globalUniforms.h2)); + ok = ok && (f32(_globalUniforms.h1) == _globalUniforms.f2); + ok = ok && (_globalUniforms.f1 != _globalUniforms.f3); + ok = ok && (_globalUniforms.h1 != _globalUniforms.h3); + ok = ok && (_globalUniforms.f1 != f32(_globalUniforms.h3)); + ok = ok && (f32(_globalUniforms.h1) != _globalUniforms.f3); ok = ok && all(_globalUniforms.v1 == _globalUniforms.v2); ok = ok && all(_globalUniforms.hv1 == _globalUniforms.hv2); ok = ok && all(_globalUniforms.v1 == vec2(_globalUniforms.hv2)); diff --git a/tests/sksl/wgsl/FunctionCallDependencies.wgsl b/tests/sksl/wgsl/FunctionCallDependencies.wgsl index 82e1d971dd87..9d62010b6b8a 100644 --- a/tests/sksl/wgsl/FunctionCallDependencies.wgsl +++ b/tests/sksl/wgsl/FunctionCallDependencies.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, diff --git a/tests/sksl/wgsl/GlobalUniforms.wgsl b/tests/sksl/wgsl/GlobalUniforms.wgsl index 5aee95e4455e..16c9435888bf 100644 --- a/tests/sksl/wgsl/GlobalUniforms.wgsl +++ b/tests/sksl/wgsl/GlobalUniforms.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/wgsl/IfStatement.wgsl b/tests/sksl/wgsl/IfStatement.wgsl index 84686186e344..af299309e18d 100644 --- a/tests/sksl/wgsl/IfStatement.wgsl +++ b/tests/sksl/wgsl/IfStatement.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; @@ -11,11 +12,11 @@ struct _GlobalUniforms { @binding(0) @group(0) var _globalUniforms: _GlobalUniforms; fn unbraced_v(_stageOut: ptr) { { - if (_globalUniforms.colorGreen.y == 1.0) { + if _globalUniforms.colorGreen.y == 1.0 { (*_stageOut).sk_FragColor = _globalUniforms.colorGreen; } else { - if (_globalUniforms.colorRed.x == 1.0) { - if (_globalUniforms.colorRed.y == 0.0) { + if _globalUniforms.colorRed.x == 1.0 { + if _globalUniforms.colorRed.y == 0.0 { (*_stageOut).sk_FragColor = _globalUniforms.colorGreen; } else { (*_stageOut).sk_FragColor = _globalUniforms.colorRed; @@ -28,14 +29,14 @@ fn unbraced_v(_stageOut: ptr) { } fn braced_v(_stageOut: ptr) { { - if (_globalUniforms.colorGreen.y == 1.0) { + if _globalUniforms.colorGreen.y == 1.0 { { (*_stageOut).sk_FragColor = _globalUniforms.colorGreen; } } else { - if (_globalUniforms.colorRed.x == 1.0) { + if _globalUniforms.colorRed.x == 1.0 { { - if (_globalUniforms.colorRed.y == 0.0) { + if _globalUniforms.colorRed.y == 0.0 { { (*_stageOut).sk_FragColor = _globalUniforms.colorGreen; } diff --git a/tests/sksl/wgsl/IndexExpression.wgsl b/tests/sksl/wgsl/IndexExpression.wgsl index dec49432da45..5a3e91201e6f 100644 --- a/tests/sksl/wgsl/IndexExpression.wgsl +++ b/tests/sksl/wgsl/IndexExpression.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/wgsl/InterfaceBlockUniforms.wgsl b/tests/sksl/wgsl/InterfaceBlockUniforms.wgsl new file mode 100644 index 000000000000..cb2e59d3d251 --- /dev/null +++ b/tests/sksl/wgsl/InterfaceBlockUniforms.wgsl @@ -0,0 +1,31 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _skRow2 { + @size(16) r : vec2 +}; +struct _skMatrix22 { + c : array<_skRow2, 2> +}; +fn _skMatrixUnpack22(m : _skMatrix22) -> mat2x2 { + return mat2x2(m.c[0].r, m.c[1].r); +} +struct UniformBuffer { + @size(32) m1: _skMatrix22, + m2: _skMatrix22, +}; +@group(12) @binding(34) var _uniform0 : UniformBuffer; +fn main(_stageOut: ptr) { + { + (*_stageOut).sk_FragColor = vec4(_skMatrixUnpack22(_uniform0.m1)[0].x, _skMatrixUnpack22(_uniform0.m1)[1].y, _skMatrixUnpack22(_uniform0.m2)[0].x, _skMatrixUnpack22(_uniform0.m2)[1].y); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(&_stageOut); + return _stageOut; +} diff --git a/tests/sksl/wgsl/MainDoesNotHaveFragCoordParameter.wgsl b/tests/sksl/wgsl/MainDoesNotHaveFragCoordParameter.wgsl index 0568402fc121..b14a59902fdc 100644 --- a/tests/sksl/wgsl/MainDoesNotHaveFragCoordParameter.wgsl +++ b/tests/sksl/wgsl/MainDoesNotHaveFragCoordParameter.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, diff --git a/tests/sksl/wgsl/MainHasFragCoordParameter.wgsl b/tests/sksl/wgsl/MainHasFragCoordParameter.wgsl index 6b3dea9ae40e..7302da719333 100644 --- a/tests/sksl/wgsl/MainHasFragCoordParameter.wgsl +++ b/tests/sksl/wgsl/MainHasFragCoordParameter.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, diff --git a/tests/sksl/wgsl/MainHasVoidReturn.wgsl b/tests/sksl/wgsl/MainHasVoidReturn.wgsl index 04abbcba4644..b2e5388e4fca 100644 --- a/tests/sksl/wgsl/MainHasVoidReturn.wgsl +++ b/tests/sksl/wgsl/MainHasVoidReturn.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/wgsl/MatrixConstructorDiagonal.wgsl b/tests/sksl/wgsl/MatrixConstructorDiagonal.wgsl index 7cbb2a87bfde..e46d987afaec 100644 --- a/tests/sksl/wgsl/MatrixConstructorDiagonal.wgsl +++ b/tests/sksl/wgsl/MatrixConstructorDiagonal.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; @@ -14,8 +15,8 @@ struct _GlobalUniforms { fn main() -> vec4 { { var ok: bool = true; - ok = ok && all(mat2x2(2.0, 0.0, 0.0, 2.0) * vec2(_globalUniforms.f) == vec2(2.0 * _globalUniforms.f)); - ok = ok && all(mat4x4(2.0, 0.0, 0.0, 0.0, 0.0, 2.0, 0.0, 0.0, 0.0, 0.0, 2.0, 0.0, 0.0, 0.0, 0.0, 2.0) * vec4(_globalUniforms.h) == vec4(2.0 * _globalUniforms.h)); + ok = ok && all((mat2x2(2.0, 0.0, 0.0, 2.0) * vec2(_globalUniforms.f)) == vec2(2.0 * _globalUniforms.f)); + ok = ok && all((mat4x4(2.0, 0.0, 0.0, 0.0, 0.0, 2.0, 0.0, 0.0, 0.0, 0.0, 2.0, 0.0, 0.0, 0.0, 0.0, 2.0) * vec4(_globalUniforms.h)) == vec4(2.0 * _globalUniforms.h)); return select(_globalUniforms.colorRed, _globalUniforms.colorGreen, vec4(ok)); } } diff --git a/tests/sksl/wgsl/OutParams.wgsl b/tests/sksl/wgsl/OutParams.wgsl index faef12adccfd..8d9a99f38393 100644 --- a/tests/sksl/wgsl/OutParams.wgsl +++ b/tests/sksl/wgsl/OutParams.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, }; diff --git a/tests/sksl/wgsl/Sample.wgsl b/tests/sksl/wgsl/Sample.wgsl new file mode 100644 index 000000000000..c317e43d01a8 --- /dev/null +++ b/tests/sksl/wgsl/Sample.wgsl @@ -0,0 +1,24 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +@group(1) @binding(3) var tex_Sampler: sampler; +@group(1) @binding(2) var tex_Texture: texture_2d; +fn main(_stageOut: ptr) { + { + var a: vec4 = textureSample(tex_Texture, tex_Sampler, vec2(1.0)); + let _skTemp0 = vec3(1.0); + var b: vec4 = textureSample(tex_Texture, tex_Sampler, _skTemp0.xy / _skTemp0.z); + let _skTemp1 = vec3(1.0); + var c: vec4 = textureSampleBias(tex_Texture, tex_Sampler, _skTemp1.xy / _skTemp1.z, -0.75 + 0.0); + (*_stageOut).sk_FragColor = (a * b) * c; + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + main(&_stageOut); + return _stageOut; +} diff --git a/tests/sksl/wgsl/TernaryThenShortCircuit.wgsl b/tests/sksl/wgsl/TernaryThenShortCircuit.wgsl index 6824b0598031..32b1536fd00f 100644 --- a/tests/sksl/wgsl/TernaryThenShortCircuit.wgsl +++ b/tests/sksl/wgsl/TernaryThenShortCircuit.wgsl @@ -1,19 +1,20 @@ /* -:61:3 warning: code is unreachable +:62:3 warning: code is unreachable return bool(); ^^^^^^ -:94:3 warning: code is unreachable +:95:3 warning: code is unreachable return bool(); ^^^^^^ -:127:3 warning: code is unreachable +:128:3 warning: code is unreachable return bool(); ^^^^^^ */ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @builtin(position) sk_FragCoord: vec4, @@ -62,11 +63,11 @@ fn TrueFalse_b() -> bool { var _skTemp4: i32 = y; let _skTemp5 = Increment_ii(&_skTemp4); y = _skTemp4; - _skTemp0 = _skTemp5 == 3; + _skTemp0 = (_skTemp5 == 3); } - if (_skTemp0) { + if _skTemp0 { { - return x == 1 && y == 1; + return (x == 1) && (y == 1); } } else { { @@ -95,11 +96,11 @@ fn FalseTrue_b() -> bool { var _skTemp10: i32 = y; let _skTemp11 = Increment_ii(&_skTemp10); y = _skTemp10; - _skTemp6 = _skTemp11 == 2; + _skTemp6 = (_skTemp11 == 2); } - if (_skTemp6) { + if _skTemp6 { { - return x == 1 && y == 2; + return (x == 1) && (y == 2); } } else { { @@ -128,15 +129,15 @@ fn FalseFalse_b() -> bool { var _skTemp16: i32 = y; let _skTemp17 = Increment_ii(&_skTemp16); y = _skTemp16; - _skTemp12 = _skTemp17 == 3; + _skTemp12 = (_skTemp17 == 3); } - if (_skTemp12) { + if _skTemp12 { { return false; } } else { { - return x == 1 && y == 2; + return (x == 1) && (y == 2); } } } @@ -155,11 +156,11 @@ fn main(_skParam0: vec2) -> vec4 { var _skTemp20: i32 = _2_y; let _skTemp21 = Increment_ii(&_skTemp20); _2_y = _skTemp20; - _skTemp18 = _skTemp21 == 2; + _skTemp18 = (_skTemp21 == 2); } - if (_skTemp18) { + if _skTemp18 { { - _0_TrueTrue = _2_y == 1; + _0_TrueTrue = (_2_y == 1); } } else { { diff --git a/tests/sksl/wgsl/UniformMatrices.wgsl b/tests/sksl/wgsl/UniformMatrices.wgsl new file mode 100644 index 000000000000..66a110821f5c --- /dev/null +++ b/tests/sksl/wgsl/UniformMatrices.wgsl @@ -0,0 +1,62 @@ +diagnostic(off, derivative_uniformity); +struct FSIn { + @builtin(front_facing) sk_Clockwise: bool, +}; +struct FSOut { + @location(0) sk_FragColor: vec4, +}; +struct _skRow2 { + @size(16) r : vec2 +}; +struct _skMatrix22 { + c : array<_skRow2, 2> +}; +fn _skMatrixUnpack22(m : _skMatrix22) -> mat2x2 { + return mat2x2(m.c[0].r, m.c[1].r); +} +struct _skMatrix32 { + c : array<_skRow2, 3> +}; +fn _skMatrixUnpack32(m : _skMatrix32) -> mat3x2 { + return mat3x2(m.c[0].r, m.c[1].r, m.c[2].r); +} +struct _skMatrix42 { + c : array<_skRow2, 4> +}; +fn _skMatrixUnpack42(m : _skMatrix42) -> mat4x2 { + return mat4x2(m.c[0].r, m.c[1].r, m.c[2].r, m.c[3].r); +} +struct UniformBuffer { + u22: _skMatrix22, + u23: mat2x3, + u24: mat2x4, + u32: _skMatrix32, + u33: mat3x3, + u34: mat3x4, + u42: _skMatrix42, + u43: mat4x3, + u44: mat4x4, +}; +@group(0) @binding(1) var _uniform0 : UniformBuffer; +struct StorageBuffer { + s22: _skMatrix22, + s23: mat2x3, + s24: mat2x4, + s32: _skMatrix32, + s33: mat3x3, + s34: mat3x4, + s42: _skMatrix42, + s43: mat4x3, + s44: mat4x4, +}; +@group(0) @binding(2) var _storage1 : StorageBuffer; +fn main() -> vec4 { + { + return vec4(0.0); + } +} +@fragment fn fragmentMain(_stageIn: FSIn) -> FSOut { + var _stageOut: FSOut; + _stageOut.sk_FragColor = main(); + return _stageOut; +} diff --git a/tests/sksl/wgsl/UserDefinedPipelineIO.wgsl b/tests/sksl/wgsl/UserDefinedPipelineIO.wgsl index 7dcf2189ce57..fb3221ed3b9d 100644 --- a/tests/sksl/wgsl/UserDefinedPipelineIO.wgsl +++ b/tests/sksl/wgsl/UserDefinedPipelineIO.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct FSIn { @builtin(front_facing) sk_Clockwise: bool, @location(1) input1: f32, diff --git a/tests/sksl/wgsl/VertexPositionOutputIsAlwaysDeclared.wgsl b/tests/sksl/wgsl/VertexPositionOutputIsAlwaysDeclared.wgsl index 5472b5049aa9..90f16ce6ce95 100644 --- a/tests/sksl/wgsl/VertexPositionOutputIsAlwaysDeclared.wgsl +++ b/tests/sksl/wgsl/VertexPositionOutputIsAlwaysDeclared.wgsl @@ -1,3 +1,4 @@ +diagnostic(off, derivative_uniformity); struct VSOut { @builtin(position) sk_Position: vec4, }; diff --git a/tests/sksl/workarounds/RewriteMatrixVectorMultiply.asm.frag b/tests/sksl/workarounds/RewriteMatrixVectorMultiply.asm.frag index 3d973ec3d10a..d769dff712ba 100644 --- a/tests/sksl/workarounds/RewriteMatrixVectorMultiply.asm.frag +++ b/tests/sksl/workarounds/RewriteMatrixVectorMultiply.asm.frag @@ -1,86 +1,86 @@ -OpCapability Shader -%1 = OpExtInstImport "GLSL.std.450" -OpMemoryModel Logical GLSL450 -OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor -OpExecutionMode %_entrypoint_v OriginUpperLeft -OpName %sk_Clockwise "sk_Clockwise" -OpName %sk_FragColor "sk_FragColor" -OpName %_entrypoint_v "_entrypoint_v" -OpName %main "main" -OpName %m44 "m44" -OpName %v4 "v4" -OpDecorate %sk_Clockwise BuiltIn FrontFacing -OpDecorate %sk_FragColor RelaxedPrecision -OpDecorate %sk_FragColor Location 0 -OpDecorate %sk_FragColor Index 0 -OpDecorate %m44 RelaxedPrecision -OpDecorate %v4 RelaxedPrecision -OpDecorate %36 RelaxedPrecision -OpDecorate %37 RelaxedPrecision -OpDecorate %40 RelaxedPrecision -OpDecorate %41 RelaxedPrecision -OpDecorate %42 RelaxedPrecision -OpDecorate %45 RelaxedPrecision -OpDecorate %46 RelaxedPrecision -OpDecorate %47 RelaxedPrecision -OpDecorate %50 RelaxedPrecision -OpDecorate %51 RelaxedPrecision -OpDecorate %52 RelaxedPrecision -%bool = OpTypeBool + OpCapability Shader + %1 = OpExtInstImport "GLSL.std.450" + OpMemoryModel Logical GLSL450 + OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_Clockwise %sk_FragColor + OpExecutionMode %_entrypoint_v OriginUpperLeft + OpName %sk_Clockwise "sk_Clockwise" + OpName %sk_FragColor "sk_FragColor" + OpName %_entrypoint_v "_entrypoint_v" + OpName %main "main" + OpName %m44 "m44" + OpName %v4 "v4" + OpDecorate %sk_Clockwise BuiltIn FrontFacing + OpDecorate %sk_FragColor RelaxedPrecision + OpDecorate %sk_FragColor Location 0 + OpDecorate %sk_FragColor Index 0 + OpDecorate %m44 RelaxedPrecision + OpDecorate %v4 RelaxedPrecision + OpDecorate %36 RelaxedPrecision + OpDecorate %37 RelaxedPrecision + OpDecorate %40 RelaxedPrecision + OpDecorate %41 RelaxedPrecision + OpDecorate %42 RelaxedPrecision + OpDecorate %45 RelaxedPrecision + OpDecorate %46 RelaxedPrecision + OpDecorate %47 RelaxedPrecision + OpDecorate %50 RelaxedPrecision + OpDecorate %51 RelaxedPrecision + OpDecorate %52 RelaxedPrecision + %bool = OpTypeBool %_ptr_Input_bool = OpTypePointer Input %bool %sk_Clockwise = OpVariable %_ptr_Input_bool Input -%float = OpTypeFloat 32 -%v4float = OpTypeVector %float 4 + %float = OpTypeFloat 32 + %v4float = OpTypeVector %float 4 %_ptr_Output_v4float = OpTypePointer Output %v4float %sk_FragColor = OpVariable %_ptr_Output_v4float Output -%void = OpTypeVoid -%12 = OpTypeFunction %void -%15 = OpTypeFunction %v4float + %void = OpTypeVoid + %12 = OpTypeFunction %void + %15 = OpTypeFunction %v4float %mat4v4float = OpTypeMatrix %v4float 4 %_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float -%float_123 = OpConstant %float 123 -%float_0 = OpConstant %float 0 -%22 = OpConstantComposite %v4float %float_123 %float_0 %float_0 %float_0 -%23 = OpConstantComposite %v4float %float_0 %float_123 %float_0 %float_0 -%24 = OpConstantComposite %v4float %float_0 %float_0 %float_123 %float_0 -%25 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_123 -%26 = OpConstantComposite %mat4v4float %22 %23 %24 %25 + %float_123 = OpConstant %float 123 + %float_0 = OpConstant %float 0 + %22 = OpConstantComposite %v4float %float_123 %float_0 %float_0 %float_0 + %23 = OpConstantComposite %v4float %float_0 %float_123 %float_0 %float_0 + %24 = OpConstantComposite %v4float %float_0 %float_0 %float_123 %float_0 + %25 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_123 + %26 = OpConstantComposite %mat4v4float %22 %23 %24 %25 %_ptr_Function_v4float = OpTypePointer Function %v4float -%float_1 = OpConstant %float 1 -%float_2 = OpConstant %float 2 -%float_3 = OpConstant %float 3 -%32 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3 -%int = OpTypeInt 32 1 -%int_0 = OpConstant %int 0 -%int_1 = OpConstant %int 1 -%int_2 = OpConstant %int 2 -%int_3 = OpConstant %int 3 + %float_1 = OpConstant %float 1 + %float_2 = OpConstant %float 2 + %float_3 = OpConstant %float 3 + %32 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3 + %int = OpTypeInt 32 1 + %int_0 = OpConstant %int 0 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 %_entrypoint_v = OpFunction %void None %12 -%13 = OpLabel -%14 = OpFunctionCall %v4float %main -OpStore %sk_FragColor %14 -OpReturn -OpFunctionEnd -%main = OpFunction %v4float None %15 -%16 = OpLabel -%m44 = OpVariable %_ptr_Function_mat4v4float Function -%v4 = OpVariable %_ptr_Function_v4float Function -OpStore %m44 %26 -OpStore %v4 %32 -%35 = OpAccessChain %_ptr_Function_v4float %m44 %int_0 -%36 = OpLoad %v4float %35 -%37 = OpVectorTimesScalar %v4float %36 %float_0 -%39 = OpAccessChain %_ptr_Function_v4float %m44 %int_1 -%40 = OpLoad %v4float %39 -%41 = OpVectorTimesScalar %v4float %40 %float_1 -%42 = OpFAdd %v4float %37 %41 -%44 = OpAccessChain %_ptr_Function_v4float %m44 %int_2 -%45 = OpLoad %v4float %44 -%46 = OpVectorTimesScalar %v4float %45 %float_2 -%47 = OpFAdd %v4float %42 %46 -%49 = OpAccessChain %_ptr_Function_v4float %m44 %int_3 -%50 = OpLoad %v4float %49 -%51 = OpVectorTimesScalar %v4float %50 %float_3 -%52 = OpFAdd %v4float %47 %51 -OpReturnValue %52 -OpFunctionEnd + %13 = OpLabel + %14 = OpFunctionCall %v4float %main + OpStore %sk_FragColor %14 + OpReturn + OpFunctionEnd + %main = OpFunction %v4float None %15 + %16 = OpLabel + %m44 = OpVariable %_ptr_Function_mat4v4float Function + %v4 = OpVariable %_ptr_Function_v4float Function + OpStore %m44 %26 + OpStore %v4 %32 + %35 = OpAccessChain %_ptr_Function_v4float %m44 %int_0 + %36 = OpLoad %v4float %35 + %37 = OpVectorTimesScalar %v4float %36 %float_0 + %39 = OpAccessChain %_ptr_Function_v4float %m44 %int_1 + %40 = OpLoad %v4float %39 + %41 = OpVectorTimesScalar %v4float %40 %float_1 + %42 = OpFAdd %v4float %37 %41 + %44 = OpAccessChain %_ptr_Function_v4float %m44 %int_2 + %45 = OpLoad %v4float %44 + %46 = OpVectorTimesScalar %v4float %45 %float_2 + %47 = OpFAdd %v4float %42 %46 + %49 = OpAccessChain %_ptr_Function_v4float %m44 %int_3 + %50 = OpLoad %v4float %49 + %51 = OpVectorTimesScalar %v4float %50 %float_3 + %52 = OpFAdd %v4float %47 %51 + OpReturnValue %52 + OpFunctionEnd diff --git a/tests/testgroups.bzl b/tests/testgroups.bzl index 365a149d7a8d..8f9d5f831f12 100644 --- a/tests/testgroups.bzl +++ b/tests/testgroups.bzl @@ -167,7 +167,6 @@ CPU_ONLY_TESTS = [ "SkUTFTest.cpp", "SkSLDebugTracePlayerTest.cpp", "SkSLDebugTraceTest.cpp", - "SkVMTest.cpp", "SkVxTest.cpp", "SkXmpTest.cpp", "Skbug6389.cpp", @@ -311,6 +310,7 @@ GANESH_TESTS = [ "TextureBindingsResetTest.cpp", "TextureOpTest.cpp", "TextureProxyTest.cpp", + "TextureSizeTest.cpp", "TextureStripAtlasManagerTest.cpp", "TopoSortTest.cpp", "TraceMemoryDumpTest.cpp", diff --git a/tests/tests.bzl b/tests/tests.bzl index 11668b03e782..0733c1c6ed5a 100644 --- a/tests/tests.bzl +++ b/tests/tests.bzl @@ -148,7 +148,7 @@ def skia_ganesh_tests( name = new_target, size = "small", srcs = select({ - "//src/gpu:has_gpu_backend": [ + "//src/gpu:has_ganesh_backend": [ "BazelTestRunner.cpp", filename, ], @@ -157,7 +157,7 @@ def skia_ganesh_tests( }), deps = select({ # Only build and apply deps if we have a no-op test. - "//src/gpu:has_gpu_backend": [ + "//src/gpu:has_ganesh_backend": [ harness, "//:skia_internal", ] + extra_deps, diff --git a/third_party/harfbuzz/BUILD.gn b/third_party/harfbuzz/BUILD.gn index 8499b960292a..5b39dc213ef2 100644 --- a/third_party/harfbuzz/BUILD.gn +++ b/third_party/harfbuzz/BUILD.gn @@ -337,12 +337,12 @@ if (skia_use_system_harfbuzz) { "$_src/hb-subset-cff-common.cc", "$_src/hb-subset-cff-common.hh", "$_src/hb-subset-cff1.cc", - "$_src/hb-subset-cff1.hh", "$_src/hb-subset-cff2.cc", - "$_src/hb-subset-cff2.hh", "$_src/hb-subset-input.cc", "$_src/hb-subset-input.hh", "$_src/hb-subset-instancer-solver.cc", + "$_src/hb-subset-instancer-solver.hh", + "$_src/hb-subset-plan-member-list.hh", "$_src/hb-subset-plan.cc", "$_src/hb-subset-plan.hh", "$_src/hb-subset-repacker.cc", @@ -394,6 +394,17 @@ if (skia_use_system_harfbuzz) { "$_src/hb-style.h", "$_src/hb-uniscribe.cc", "$_src/hb-uniscribe.h", + "$_src/hb-wasm-api-blob.hh", + "$_src/hb-wasm-api-buffer.hh", + "$_src/hb-wasm-api-common.hh", + "$_src/hb-wasm-api-face.hh", + "$_src/hb-wasm-api-font.hh", + "$_src/hb-wasm-api-list.hh", + "$_src/hb-wasm-api-shape.hh", + "$_src/hb-wasm-api.cc", + "$_src/hb-wasm-api.h", + "$_src/hb-wasm-api.hh", + "$_src/hb-wasm-shape.cc", "$_src/main.cc", "$_src/test-algs.cc", "$_src/test-array.cc", @@ -414,10 +425,15 @@ if (skia_use_system_harfbuzz) { "$_src/test-repacker.cc", "$_src/test-serialize.cc", "$_src/test-set.cc", + "$_src/test-subset-instancer-solver.cc", + "$_src/test-tuple-varstore.cc", "$_src/test-unicode-ranges.cc", "$_src/test-use-table.cc", "$_src/test-vector.cc", "$_src/test.cc", + "$_src/wasm/graphite/shape.cc", + "$_src/wasm/sample/c/shape-fallback.cc", + "$_src/wasm/sample/c/shape-ot.cc", ] assert(unused_sources != []) } diff --git a/third_party/libgrapheme/BUILD.gn b/third_party/libgrapheme/BUILD.gn new file mode 100644 index 000000000000..3591995f3f7e --- /dev/null +++ b/third_party/libgrapheme/BUILD.gn @@ -0,0 +1,137 @@ +# Copyright 2022 Google LLC +# +# Use of this source code is governed by a ISC-License license that can be +# found in the LICENSE file. + +import("../third_party.gni") + +declare_args() { + UNICODE_VERSION = "15.0.0" +} + +config("c99") { + cflags_c = [] + if (is_win) { + cflags_c += [ "-std:c11" ] + } else { + cflags_c += [ "-std=c99" ] + } +} + +copy("copy_unicode_data") { + unicode_tools_dir = "../../third_party/externals/unicodetools/unicodetools/data/ucd/$UNICODE_VERSION" + external_data_dir = "../../third_party/externals/libgrapheme/data/" + sources = [ + "$unicode_tools_dir/BidiBrackets.txt", + "$unicode_tools_dir/BidiCharacterTest.txt", + "$unicode_tools_dir/BidiMirroring.txt", + "$unicode_tools_dir/BidiTest.txt", + "$unicode_tools_dir/DerivedCoreProperties.txt", + "$unicode_tools_dir/EastAsianWidth.txt", + "$unicode_tools_dir/LineBreak.txt", + "$unicode_tools_dir/SpecialCasing.txt", + "$unicode_tools_dir/UnicodeData.txt", + "$unicode_tools_dir/auxiliary/GraphemeBreakProperty.txt", + "$unicode_tools_dir/auxiliary/GraphemeBreakTest.txt", + "$unicode_tools_dir/auxiliary/LineBreakTest.txt", + "$unicode_tools_dir/auxiliary/SentenceBreakProperty.txt", + "$unicode_tools_dir/auxiliary/SentenceBreakTest.txt", + "$unicode_tools_dir/auxiliary/WordBreakProperty.txt", + "$unicode_tools_dir/auxiliary/WordBreakTest.txt", + "$unicode_tools_dir/emoji/emoji-data.txt", + "$unicode_tools_dir/extracted/DerivedBidiClass.txt", + ] + output_dir = rebase_path(external_data_dir, root_out_dir) + outputs = [ "$root_out_dir/$output_dir/{{source_file_part}}" ] +} + +template("compile_tool") { + executable(target_name) { + deps = [ ":copy_unicode_data" ] + forward_variables_from(invoker, "*", [ "deps" ]) + if (defined(invoker.deps)) { + deps += invoker.deps + } + configs += [ ":c99" ] + lib_dirs = [ "../../third_party/externals/libgrapheme/gen" ] + sources += [ "../../third_party/externals/libgrapheme/gen/util.c" ] + } +} + +compile_tool("bidirectional") { + sources = [ "../../third_party/externals/libgrapheme/gen/bidirectional.c" ] +} + +compile_tool("case") { + sources = [ "../../third_party/externals/libgrapheme/gen/case.c" ] +} + +compile_tool("character") { + sources = [ "../../third_party/externals/libgrapheme/gen/character.c" ] +} + +compile_tool("line") { + sources = [ "../../third_party/externals/libgrapheme/gen/line.c" ] +} + +compile_tool("sentence") { + sources = [ "../../third_party/externals/libgrapheme/gen/sentence.c" ] +} + +compile_tool("word") { + sources = [ "../../third_party/externals/libgrapheme/gen/word.c" ] +} + +# Run an executable that will produce a header +action_foreach("generate_headers") { + script = "generate_headers.py" + root_dir = rebase_path(root_out_dir, "") + args = [ + "$root_dir/{{source_name_part}}", + "../../third_party/externals/libgrapheme/gen/{{source_name_part}}.h", + "../../third_party/externals/libgrapheme/", + ] + _src = "../externals/libgrapheme/gen" + sources = [ + "$_src/bidirectional.c", + "$_src/case.c", + "$_src/character.c", + "$_src/line.c", + "$_src/sentence.c", + "$_src/word.c", + ] + output_dir = rebase_path(_src, root_out_dir) + outputs = [ "$root_out_dir/$output_dir/{{source_name_part}}.h" ] + deps = [ + ":bidirectional", + ":case", + ":character", + ":line", + ":sentence", + ":word", + ] +} + +source_set("headers") { + sources = get_target_outputs(":generate_headers") +} + +third_party("libgrapheme") { + public_include_dirs = [ "../externals/libgrapheme" ] + _src = "../externals/libgrapheme/src" + + configs = [ ":c99" ] + + sources = [ + "$_src/bidirectional.c", + "$_src/case.c", + "$_src/character.c", + "$_src/line.c", + "$_src/sentence.c", + "$_src/utf8.c", + "$_src/util.c", + "$_src/word.c", + ] + + deps = [ ":headers" ] +} diff --git a/third_party/libgrapheme/generate_headers.py b/third_party/libgrapheme/generate_headers.py new file mode 100644 index 000000000000..525c8eafefe5 --- /dev/null +++ b/third_party/libgrapheme/generate_headers.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python + +# Copyright 2023 Google LLC. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +''' +Generate c header out of txt file + +Output is a header +''' + +import subprocess +import sys + +header = open(sys.argv[2], "w") +code = subprocess.Popen(sys.argv[1], shell=True, universal_newlines=True, stdout=header, cwd=sys.argv[3]) +code.wait() diff --git a/third_party/libmicrohttpd/BUILD.gn b/third_party/libmicrohttpd/BUILD.gn index 1ba07f6f28f5..e887ac82a891 100644 --- a/third_party/libmicrohttpd/BUILD.gn +++ b/third_party/libmicrohttpd/BUILD.gn @@ -26,6 +26,9 @@ third_party("libmicrohttpd") { defines = [ "DAUTH_SUPPORT=1" ] libs = [] + if (is_clang) { + cflags = [ "-Wno-implicit-function-declaration" ] + } if (is_win) { sources += [ "../externals/microhttpd/src/platform/w32functions.c" ] diff --git a/third_party/vello/BUILD.gn b/third_party/vello/BUILD.gn index 7fc9b7aa953a..7ea2bd30ae3a 100644 --- a/third_party/vello/BUILD.gn +++ b/third_party/vello/BUILD.gn @@ -17,11 +17,16 @@ import("../third_party.gni") if (skia_enable_vello_shaders) { bazel_args = [] - if (is_mac && target_cpu == "arm64") { - # TODO: Normally the target toolchain would be specified with `--platforms` but that doesn't - # work. When building and running on an arm64 mac, setting `--host_platform` seems to do the - # right thing but may not be the right build configuration in the long run. - bazel_args += [ "--host_platform=//bazel/platform:mac_arm64_hermetic" ] + if (is_mac) { + if (host_cpu == "arm64") { + bazel_args += [ "--host_platform=//bazel/platform:mac_arm64_hermetic" ] + } + if (target_cpu == "arm64") { + bazel_args += [ + "--platforms=//bazel/platform:mac_arm64_hermetic", + "--cc_output_directory_tag=mac_arm64", + ] + } } if (!is_debug) { bazel_args += [ "--compilation_mode=opt" ] diff --git a/toolchain/BUILD.bazel b/toolchain/BUILD.bazel index 51915d43c8df..0ba94b75a9a8 100644 --- a/toolchain/BUILD.bazel +++ b/toolchain/BUILD.bazel @@ -68,6 +68,23 @@ toolchain( toolchain_type = "@rules_cc//cc:toolchain_type", ) +# Cross compilation toolchain for an Intel Mac host and Apple silicon target +toolchain( + name = "clang_host_mac_x64_target_mac_arm64_toolchain", + exec_compatible_with = [ + "@platforms//os:macos", + "@platforms//cpu:x86_64", + ], + target_compatible_with = [ + "@platforms//os:macos", + "@platforms//cpu:arm64", + "//bazel/platform:use_hermetic_toolchain", + ], + toolchain = ":mac_target_arm64", + # https://github.com/bazelbuild/rules_cc/blob/8bb0eb5c5ccd96b91753bb112096bb6993d16d13/cc/BUILD#L32-L36 + toolchain_type = "@rules_cc//cc:toolchain_type", +) + # Based on: # https://skia.googlesource.com/skcms/+/ba39d81f9797aa973bdf01aa6b0363b280352fba/toolchain/BUILD.bazel#28 toolchain( @@ -178,6 +195,11 @@ provide_mac_toolchain_config( name = "mac_toolchain_config", ) +provide_mac_toolchain_config( + name = "mac_arm64_toolchain_config", + cpu = "arm64", +) + # https://bazel.build/reference/be/c-cpp#cc_toolchain cc_toolchain( name = "linux_amd64_host", @@ -209,6 +231,20 @@ cc_toolchain( toolchain_config = ":mac_toolchain_config", ) +cc_toolchain( + name = "mac_target_arm64", + all_files = ":all_mac_files", # Apparently also used to compile objc code + ar_files = ":archive_mac_files", + compiler_files = ":compile_mac_files", + dwp_files = ":not_implemented", + linker_files = ":link_mac_files", + module_map = "@clang_mac//:generated_module_map", + objcopy_files = ":not_implemented", + strip_files = ":not_implemented", + supports_param_files = False, + toolchain_config = ":mac_arm64_toolchain_config", +) + filegroup( name = "ndk_arm64_v8a_toolchain_all_files", srcs = [ diff --git a/toolchain/download_linux_amd64_toolchain.bzl b/toolchain/download_linux_amd64_toolchain.bzl index 9e44ecdf73c7..ce0d55c1013e 100644 --- a/toolchain/download_linux_amd64_toolchain.bzl +++ b/toolchain/download_linux_amd64_toolchain.bzl @@ -282,6 +282,15 @@ filegroup( ), visibility = ["//visibility:public"], ) + +filegroup( + name = "link_libs", + srcs = [ + "lib/x86_64-unknown-linux-gnu/libc++.a", + "lib/x86_64-unknown-linux-gnu/libc++abi.a", +], + visibility = ["//visibility:public"], +) """, executable = False, ) diff --git a/toolchain/linux_trampolines/clang_trampoline_linux.sh b/toolchain/linux_trampolines/clang_trampoline_linux.sh index cd2865f70dab..2b17982ef07c 100755 --- a/toolchain/linux_trampolines/clang_trampoline_linux.sh +++ b/toolchain/linux_trampolines/clang_trampoline_linux.sh @@ -65,12 +65,14 @@ supported_files_or_dirs=( "src/core/SkGlyph.cpp" "src/core/SkGlyphRunPainter.cpp" "src/core/SkICC.cpp" + "src/core/SkImageFilterTypes.cpp" "src/core/SkImageGenerator.cpp" "src/core/SkImageInfo.cpp" "src/core/SkLineClipper.cpp" - "src/core/SkMD5.cpp" "src/core/SkMaskFilter.cpp" "src/core/SkMatrix.cpp" + "src/core/SkMD5.cpp" + "src/core/SkMesh.cpp" "src/core/SkMipmapAccessor.cpp" "src/core/SkMipmapBuilder.cpp" "src/core/SkPaint.cpp" @@ -78,8 +80,7 @@ supported_files_or_dirs=( "src/core/SkPathBuilder.cpp" "src/core/SkPathRef.cpp" "src/core/SkPathUtils.cpp" - "src/core/SkPictureData.cpp" - "src/core/SkPicturePlayback.cpp" + "src/core/SkPicture" "src/core/SkPixelRef.cpp" "src/core/SkPixmap.cpp" "src/core/SkPixmapDraw.cpp" @@ -87,10 +88,12 @@ supported_files_or_dirs=( "src/core/SkRRect.cpp" "src/core/SkReadBuffer.cpp" "src/core/SkReadPixelsRec.cpp" - "src/core/SkRecorder.cpp" + "src/core/SkRecord" "src/core/SkRect.cpp" "src/core/SkRuntime" "src/core/SkScalar.cpp" + "src/core/SkSpecialImage.cpp" + "src/core/SkSpecialSurface.cpp" "src/core/SkStream.cpp" "src/core/SkStrike" "src/core/SkString.cpp" @@ -111,6 +114,7 @@ supported_files_or_dirs=( "src/gpu/ganesh/GrImageContext.cpp" "src/gpu/ganesh/GrImageUtils.cpp" "src/gpu/ganesh/GrMemoryPool.cpp" + "src/gpu/ganesh/GrMeshBuffers.cpp" "src/gpu/ganesh/GrProcessor.cpp" "src/gpu/ganesh/GrPromiseImageTexture.cpp" "src/gpu/ganesh/GrRecordingContext.cpp" @@ -123,6 +127,7 @@ supported_files_or_dirs=( "src/gpu/ganesh/GrXferProcessor.cpp" "src/gpu/ganesh/SkGr.cpp" "src/gpu/ganesh/effects/GrPerlinNoise2Effect.cpp" + "src/gpu/ganesh/gl/GrGLBackendSurface.cpp" "src/pdf/SkJpeg" # See //bazel/generate_cpp_files_for_headers.bzl and //include/BUILD.bazel for more. diff --git a/toolchain/mac_toolchain_config.bzl b/toolchain/mac_toolchain_config.bzl index 5bc201ff67fd..7e568fd051ff 100644 --- a/toolchain/mac_toolchain_config.bzl +++ b/toolchain/mac_toolchain_config.bzl @@ -60,9 +60,11 @@ def _mac_toolchain_info(ctx): # https://bazel.build/rules/lib/cc_common#create_cc_toolchain_config_info.cxx_builtin_include_directories "%sysroot%/symlinks/xcode/MacSDK/Frameworks/", ], + # If `ctx.attr.cpu` is blank (which is declared as optional below), this config will target + # the host CPU. Specifying a target_cpu allows this config to be used for cross compilation. + target_cpu = ctx.attr.cpu, # These are required, but do nothing compiler = "", - target_cpu = "", target_libc = "", target_system_name = "", toolchain_identifier = "", @@ -81,6 +83,13 @@ def _import_platform_constraints(): for constraint in _platform_constraints_to_import: private_attr = _platform_constraints_to_import[constraint] rule_attributes[private_attr] = attr.label(default = constraint) + + # Define an optional attribute to allow the target architecture to be explicitly specified (e.g. + # when selecting a cross-compilation toolchain). + rule_attributes["cpu"] = attr.string( + mandatory = False, + values = ["arm64", "x64"], + ) return rule_attributes def _has_platform_constraint(ctx, official_constraint_name): diff --git a/tools/BUILD.bazel b/tools/BUILD.bazel index 2b03686b614e..b0c4f156ccf4 100644 --- a/tools/BUILD.bazel +++ b/tools/BUILD.bazel @@ -43,6 +43,21 @@ skia_cc_library( deps = ["//:skia_internal"], ) +skia_cc_library( + name = "hash_and_encode", + testonly = True, + srcs = [ + "HashAndEncode.cpp", + "//tools/flags", + ], + hdrs = ["HashAndEncode.h"], + visibility = ["//gm:__pkg__"], + deps = [ + "//:skia_internal", + "@libpng", + ], +) + py_binary( name = "embed_resources", srcs = ["embed_resources.py"], diff --git a/tools/ToolUtils.cpp b/tools/ToolUtils.cpp index 356f113179ba..cd8ec10f75e4 100644 --- a/tools/ToolUtils.cpp +++ b/tools/ToolUtils.cpp @@ -34,6 +34,7 @@ #include #if defined(SK_GRAPHITE) +#include "include/core/SkTiledImageUtils.h" #include "include/gpu/graphite/Image.h" #include "include/gpu/graphite/ImageProvider.h" @@ -701,14 +702,14 @@ class TestingImageProvider : public skgpu::graphite::ImageProvider { // since it can be used in that case. // TODO: we could get fancy and, if ever a mipmapped key eclipsed a non-mipmapped // key, we could remove the hidden non-mipmapped key/image from the cache. - uint64_t mipMappedKey = ((uint64_t)image->uniqueID() << 32) | 0x1; + ImageKey mipMappedKey(image, /* mipmapped= */ true); auto result = fCache.find(mipMappedKey); if (result != fCache.end()) { return result->second; } } - uint64_t key = ((uint64_t)image->uniqueID() << 32) | (requiredProps.fMipmapped ? 0x1 : 0x0); + ImageKey key(image, requiredProps.fMipmapped); auto result = fCache.find(key); if (result != fCache.end()) { @@ -727,7 +728,39 @@ class TestingImageProvider : public skgpu::graphite::ImageProvider { } private: - std::unordered_map> fCache; + class ImageKey { + public: + ImageKey(const SkImage* image, bool mipmapped) { + uint32_t flags = mipmapped ? 0x1 : 0x0; + SkTiledImageUtils::GetImageKeyValues(image, &fValues[1]); + fValues[kNumValues-1] = flags; + fValues[0] = SkChecksum::Hash32(&fValues[1], (kNumValues-1) * sizeof(uint32_t)); + } + + uint32_t hash() const { return fValues[0]; } + + bool operator==(const ImageKey& other) const { + for (int i = 0; i < kNumValues; ++i) { + if (fValues[i] != other.fValues[i]) { + return false; + } + } + + return true; + } + bool operator!=(const ImageKey& other) const { return !(*this == other); } + + private: + static const int kNumValues = SkTiledImageUtils::kNumImageKeyValues + 2; + + uint32_t fValues[kNumValues]; + }; + + struct ImageHash { + size_t operator()(const ImageKey& key) const { return key.hash(); } + }; + + std::unordered_map, ImageHash> fCache; }; skgpu::graphite::RecorderOptions CreateTestingRecorderOptions() { diff --git a/tools/debugger/BUILD.bazel b/tools/debugger/BUILD.bazel index 439a7bd5263d..e33293991835 100644 --- a/tools/debugger/BUILD.bazel +++ b/tools/debugger/BUILD.bazel @@ -20,7 +20,10 @@ skia_cc_library( "DrawCommand.h", "JsonWriteBuffer.h", ], - visibility = ["//tests:__subpackages__"], + visibility = [ + "//modules:__subpackages__", + "//tests:__subpackages__", + ], deps = [ "//:skia_internal", "//tools:sk_sharing_proc", diff --git a/tools/debugger/DebugCanvas.cpp b/tools/debugger/DebugCanvas.cpp index 9a0b6f363766..10201cce868a 100644 --- a/tools/debugger/DebugCanvas.cpp +++ b/tools/debugger/DebugCanvas.cpp @@ -353,7 +353,7 @@ void DebugCanvas::toJSON(SkJSONWriter& writer, this->getDrawCommandAt(i)->toJSON(writer, urlDataManager); #if defined(SK_GANESH) - if (at) { + if (at && at->isEnabled()) { writer.appendName(SKDEBUGCANVAS_ATTRIBUTE_AUDITTRAIL); at->toJson(writer, i); } diff --git a/tools/debugger/DrawCommand.cpp b/tools/debugger/DrawCommand.cpp index 7cb926832688..55984e9c4066 100644 --- a/tools/debugger/DrawCommand.cpp +++ b/tools/debugger/DrawCommand.cpp @@ -75,6 +75,7 @@ class GrDirectContext; #define DEBUGCANVAS_ATTRIBUTE_MODE "mode" #define DEBUGCANVAS_ATTRIBUTE_POINTS "points" #define DEBUGCANVAS_ATTRIBUTE_PATH "path" +#define DEBUGCANVAS_ATTRIBUTE_CLUSTERS "clusters" #define DEBUGCANVAS_ATTRIBUTE_TEXT "text" #define DEBUGCANVAS_ATTRIBUTE_COLOR "color" #define DEBUGCANVAS_ATTRIBUTE_ALPHA "alpha" @@ -1689,10 +1690,25 @@ bool DrawTextBlobCommand::render(SkCanvas* canvas) const { void DrawTextBlobCommand::toJSON(SkJSONWriter& writer, UrlDataManager& urlDataManager) const { INHERITED::toJSON(writer, urlDataManager); + writer.appendFloat(DEBUGCANVAS_ATTRIBUTE_X, fXPos); + writer.appendFloat(DEBUGCANVAS_ATTRIBUTE_Y, fYPos); + SkRect bounds = fBlob->bounds(); + writer.appendName(DEBUGCANVAS_ATTRIBUTE_BOUNDS); + MakeJsonRect(writer, bounds); + writer.appendName(DEBUGCANVAS_ATTRIBUTE_PAINT); + MakeJsonPaint(writer, fPaint, urlDataManager); + writer.beginArray(DEBUGCANVAS_ATTRIBUTE_RUNS); SkTextBlobRunIterator iter(fBlob.get()); while (!iter.done()) { writer.beginObject(); // run + if (iter.textSize()) { + writer.appendString(DEBUGCANVAS_ATTRIBUTE_TEXT, iter.text(), iter.textSize()); + } + writer.appendName(DEBUGCANVAS_ATTRIBUTE_FONT); + MakeJsonFont(iter.font(), writer, urlDataManager); + writer.appendName(DEBUGCANVAS_ATTRIBUTE_COORDS); + MakeJsonPoint(writer, iter.offset()); writer.beginArray(DEBUGCANVAS_ATTRIBUTE_GLYPHS); for (uint32_t i = 0; i < iter.glyphCount(); i++) { writer.appendU32(iter.glyphs()[i]); @@ -1717,22 +1733,17 @@ void DrawTextBlobCommand::toJSON(SkJSONWriter& writer, UrlDataManager& urlDataMa } writer.endArray(); // positions } - writer.appendName(DEBUGCANVAS_ATTRIBUTE_FONT); - MakeJsonFont(iter.font(), writer, urlDataManager); - writer.appendName(DEBUGCANVAS_ATTRIBUTE_COORDS); - MakeJsonPoint(writer, iter.offset()); - + if (iter.clusters()) { + writer.beginArray(DEBUGCANVAS_ATTRIBUTE_CLUSTERS); + for (uint32_t i = 0; i < iter.glyphCount(); i++) { + writer.appendU32(iter.clusters()[i]); + } + writer.endArray(); // clusters + } writer.endObject(); // run iter.next(); } writer.endArray(); // runs - writer.appendFloat(DEBUGCANVAS_ATTRIBUTE_X, fXPos); - writer.appendFloat(DEBUGCANVAS_ATTRIBUTE_Y, fYPos); - SkRect bounds = fBlob->bounds(); - writer.appendName(DEBUGCANVAS_ATTRIBUTE_COORDS); - MakeJsonRect(writer, bounds); - writer.appendName(DEBUGCANVAS_ATTRIBUTE_PAINT); - MakeJsonPaint(writer, fPaint, urlDataManager); SkString desc; // make the bounds local by applying the x,y diff --git a/tools/dump_record.cpp b/tools/dump_record.cpp index 8dcd481983d4..41cea1f99083 100644 --- a/tools/dump_record.cpp +++ b/tools/dump_record.cpp @@ -21,7 +21,6 @@ static DEFINE_string2(skps, r, "", ".SKPs to dump."); static DEFINE_string(match, "", "The usual filters on file names to dump."); static DEFINE_bool2(optimize, O, false, "Run SkRecordOptimize before dumping."); -static DEFINE_bool(optimize2, false, "Run SkRecordOptimize2 before dumping."); static DEFINE_int(tile, 1000000000, "Simulated tile size."); static DEFINE_bool(timeWithCommand, false, "If true, print time next to command, else in first column."); @@ -168,9 +167,6 @@ int main(int argc, char** argv) { if (FLAGS_optimize) { SkRecordOptimize(&record); } - if (FLAGS_optimize2) { - SkRecordOptimize2(&record); - } SkBitmap bitmap; bitmap.allocN32Pixels(w, h); diff --git a/tools/fiddle/all_examples.cpp b/tools/fiddle/all_examples.cpp index 9c456271a48b..0d1acef2b98f 100644 --- a/tools/fiddle/all_examples.cpp +++ b/tools/fiddle/all_examples.cpp @@ -1,7 +1,5 @@ // Copyright 2019 Google LLC. // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. -namespace skia_private {} -using namespace skia_private; #include "docs/examples/50_percent_gray.cpp" #include "docs/examples/50_percent_srgb.cpp" #include "docs/examples/Alpha_Constants_a.cpp" @@ -342,8 +340,6 @@ using namespace skia_private; #include "docs/examples/ImageInfo_bytesPerPixel.cpp" #include "docs/examples/ImageInfo_colorSpace.cpp" #include "docs/examples/ImageInfo_colorType.cpp" -#include "docs/examples/ImageInfo_computeByteSize.cpp" -#include "docs/examples/ImageInfo_computeMinByteSize.cpp" #include "docs/examples/ImageInfo_computeOffset.cpp" #include "docs/examples/ImageInfo_dimensions.cpp" #include "docs/examples/ImageInfo_empty_constructor.cpp" @@ -1030,7 +1026,6 @@ using namespace skia_private; #include "docs/examples/Surface_MakeRenderTarget.cpp" #include "docs/examples/Surface_MakeRenderTarget_2.cpp" #include "docs/examples/Surface_MakeRenderTarget_3.cpp" -#include "docs/examples/Surface_characterize.cpp" #include "docs/examples/Surface_draw.cpp" #include "docs/examples/Surface_draw_2.cpp" #include "docs/examples/Surface_getCanvas.cpp" diff --git a/tools/fiddle/make_all_examples_cpp.py b/tools/fiddle/make_all_examples_cpp.py index b4873aafcfa2..aec9f95dd8fc 100755 --- a/tools/fiddle/make_all_examples_cpp.py +++ b/tools/fiddle/make_all_examples_cpp.py @@ -10,9 +10,7 @@ with open('all_examples.cpp', 'w') as o: o.write('// Copyright 2019 Google LLC.\n// Use of this source code is ' 'governed by a BSD-style license that can be found in the ' - 'LICENSE file.\n' - 'namespace skia_private {}\n' - 'using namespace skia_private;\n') + 'LICENSE file.\n') for path in sorted(glob.glob('../../docs/examples/*.cpp')): # strip ../../ path = path[6:] diff --git a/tools/flags/BUILD.bazel b/tools/flags/BUILD.bazel index a772aaed6c56..54296512f747 100644 --- a/tools/flags/BUILD.bazel +++ b/tools/flags/BUILD.bazel @@ -14,6 +14,7 @@ skia_filegroup( visibility = [ "//modules/skottie:__pkg__", "//tests:__subpackages__", + "//tools:__pkg__", "//tools:__subpackages__", ], ) diff --git a/tools/flags/CommandLineFlags.h b/tools/flags/CommandLineFlags.h index b4a0e285b133..bdf76ec99107 100644 --- a/tools/flags/CommandLineFlags.h +++ b/tools/flags/CommandLineFlags.h @@ -192,57 +192,57 @@ class CommandLineFlags { #define TO_STRING2(s) #s #define TO_STRING(s) TO_STRING2(s) -#define DEFINE_bool(name, defaultValue, helpString) \ - bool FLAGS_##name; \ - SK_UNUSED static bool unused_##name = SkFlagInfo::CreateBoolFlag( \ +#define DEFINE_bool(name, defaultValue, helpString) \ + bool FLAGS_##name; \ + [[maybe_unused]] static bool unused_##name = SkFlagInfo::CreateBoolFlag( \ TO_STRING(name), nullptr, &FLAGS_##name, defaultValue, helpString) // bool 2 allows specifying a short name. No check is done to ensure that shortName // is actually shorter than name. -#define DEFINE_bool2(name, shortName, defaultValue, helpString) \ - bool FLAGS_##name; \ - SK_UNUSED static bool unused_##name = SkFlagInfo::CreateBoolFlag( \ +#define DEFINE_bool2(name, shortName, defaultValue, helpString) \ + bool FLAGS_##name; \ + [[maybe_unused]] static bool unused_##name = SkFlagInfo::CreateBoolFlag( \ TO_STRING(name), TO_STRING(shortName), &FLAGS_##name, defaultValue, helpString) #define DECLARE_bool(name) extern bool FLAGS_##name; -#define DEFINE_string(name, defaultValue, helpString) \ - CommandLineFlags::StringArray FLAGS_##name; \ - SK_UNUSED static bool unused_##name = SkFlagInfo::CreateStringFlag( \ +#define DEFINE_string(name, defaultValue, helpString) \ + CommandLineFlags::StringArray FLAGS_##name; \ + [[maybe_unused]] static bool unused_##name = SkFlagInfo::CreateStringFlag( \ TO_STRING(name), nullptr, &FLAGS_##name, defaultValue, helpString, nullptr) #define DEFINE_extended_string(name, defaultValue, helpString, extendedHelpString) \ CommandLineFlags::StringArray FLAGS_##name; \ - SK_UNUSED static bool unused_##name = SkFlagInfo::CreateStringFlag( \ + [[maybe_unused]] static bool unused_##name = SkFlagInfo::CreateStringFlag( \ TO_STRING(name), nullptr, &FLAGS_##name, defaultValue, helpString, extendedHelpString) // string2 allows specifying a short name. There is an assert that shortName // is only 1 character. -#define DEFINE_string2(name, shortName, defaultValue, helpString) \ - CommandLineFlags::StringArray FLAGS_##name; \ - SK_UNUSED static bool unused_##name = SkFlagInfo::CreateStringFlag(TO_STRING(name), \ - TO_STRING(shortName), \ - &FLAGS_##name, \ - defaultValue, \ - helpString, \ - nullptr) +#define DEFINE_string2(name, shortName, defaultValue, helpString) \ + CommandLineFlags::StringArray FLAGS_##name; \ + [[maybe_unused]] static bool unused_##name = SkFlagInfo::CreateStringFlag(TO_STRING(name), \ + TO_STRING(shortName),\ + &FLAGS_##name, \ + defaultValue, \ + helpString, \ + nullptr) #define DECLARE_string(name) extern CommandLineFlags::StringArray FLAGS_##name; #define DEFINE_int(name, defaultValue, helpString) \ - int FLAGS_##name; \ - SK_UNUSED static bool unused_##name = \ + int FLAGS_##name; \ + [[maybe_unused]] static bool unused_##name = \ SkFlagInfo::CreateIntFlag(TO_STRING(name), &FLAGS_##name, defaultValue, helpString) -#define DEFINE_int_2(name, shortName, defaultValue, helpString) \ - int FLAGS_##name; \ - SK_UNUSED static bool unused_##name = SkFlagInfo::CreateIntFlag( \ +#define DEFINE_int_2(name, shortName, defaultValue, helpString) \ + int FLAGS_##name; \ + [[maybe_unused]] static bool unused_##name = SkFlagInfo::CreateIntFlag( \ TO_STRING(name), TO_STRING(shortName), &FLAGS_##name, defaultValue, helpString) #define DECLARE_int(name) extern int FLAGS_##name; #define DEFINE_double(name, defaultValue, helpString) \ - double FLAGS_##name; \ - SK_UNUSED static bool unused_##name = \ + double FLAGS_##name; \ + [[maybe_unused]] static bool unused_##name = \ SkFlagInfo::CreateDoubleFlag(TO_STRING(name), &FLAGS_##name, defaultValue, helpString) #define DECLARE_double(name) extern double FLAGS_##name; diff --git a/tools/flags/CommonFlagsConfig.cpp b/tools/flags/CommonFlagsConfig.cpp index bdedb9765ad3..75bd358b5e92 100644 --- a/tools/flags/CommonFlagsConfig.cpp +++ b/tools/flags/CommonFlagsConfig.cpp @@ -73,7 +73,6 @@ static const struct { { "glslug", "gpu", "api=gl,slug=true" }, { "glserializeslug", "gpu", "api=gl,serializeSlug=true" }, { "glremoteslug", "gpu", "api=gl,remoteSlug=true" }, - { "gltestthreading", "gpu", "api=gl,testThreading=true" }, { "gltestpersistentcache", "gpu", "api=gl,testPersistentCache=1" }, { "gltestglslcache", "gpu", "api=gl,testPersistentCache=2" }, { "gltestprecompile", "gpu", "api=gl,testPrecompile=true" }, @@ -219,7 +218,6 @@ static const char configExtendedHelp[] = "\t Use multisampling with N samples.\n" "\tstencils\ttype: bool\tdefault: true.\n" "\t Allow the use of stencil buffers.\n" - "\ttestThreading\ttype: bool\tdefault: false.\n" "\t Run with and without worker threads, check that results match.\n" "\ttestPersistentCache\ttype: int\tdefault: 0.\n" "\t 1: Run using a pre-warmed binary GrContextOptions::fPersistentCache.\n" @@ -578,7 +576,6 @@ SkCommandLineConfigGpu::SkCommandLineConfigGpu(const SkString& tag, SkColorType colorType, SkAlphaType alphaType, bool useStencilBuffers, - bool testThreading, int testPersistentCache, bool testPrecompile, bool useDDLSink, @@ -594,7 +591,6 @@ SkCommandLineConfigGpu::SkCommandLineConfigGpu(const SkString& tag, , fSamples(samples) , fColorType(colorType) , fAlphaType(alphaType) - , fTestThreading(testThreading) , fTestPersistentCache(testPersistentCache) , fTestPrecompile(testPrecompile) , fUseDDLSink(useDDLSink) @@ -625,7 +621,6 @@ SkCommandLineConfigGpu* parse_command_line_config_gpu(const SkString& ta SkColorType colorType = kRGBA_8888_SkColorType; SkAlphaType alphaType = kPremul_SkAlphaType; bool useStencils = true; - bool testThreading = false; int testPersistentCache = 0; bool testPrecompile = false; bool useDDLs = false; @@ -649,7 +644,6 @@ SkCommandLineConfigGpu* parse_command_line_config_gpu(const SkString& ta extendedOptions.get_option_bool("dmsaa", &useDMSAA) && extendedOptions.get_option_gpu_color("color", &colorType, &alphaType) && extendedOptions.get_option_bool("stencils", &useStencils) && - extendedOptions.get_option_bool("testThreading", &testThreading) && extendedOptions.get_option_int("testPersistentCache", &testPersistentCache) && extendedOptions.get_option_bool("testPrecompile", &testPrecompile) && extendedOptions.get_option_bool("useDDLSink", &useDDLs) && @@ -659,8 +653,7 @@ SkCommandLineConfigGpu* parse_command_line_config_gpu(const SkString& ta extendedOptions.get_option_bool("reducedShaders", &reducedShaders) && extendedOptions.get_option_gpu_surf_type("surf", &surfType); - // testing threading and the persistent cache are mutually exclusive. - if (!validOptions || (testThreading && (testPersistentCache != 0))) { + if (!validOptions) { return nullptr; } @@ -681,7 +674,6 @@ SkCommandLineConfigGpu* parse_command_line_config_gpu(const SkString& ta colorType, alphaType, useStencils, - testThreading, testPersistentCache, testPrecompile, useDDLs, diff --git a/tools/flags/CommonFlagsConfig.h b/tools/flags/CommonFlagsConfig.h index 71dab26f9f21..ff1aca20c5f7 100644 --- a/tools/flags/CommonFlagsConfig.h +++ b/tools/flags/CommonFlagsConfig.h @@ -65,7 +65,6 @@ class SkCommandLineConfigGpu : public SkCommandLineConfig { SkColorType colorType, SkAlphaType alphaType, bool useStencilBuffers, - bool testThreading, int testPersistentCache, bool testPrecompile, bool useDDLSink, @@ -82,7 +81,6 @@ class SkCommandLineConfigGpu : public SkCommandLineConfig { int getSamples() const { return fSamples; } SkColorType getColorType() const { return fColorType; } SkAlphaType getAlphaType() const { return fAlphaType; } - bool getTestThreading() const { return fTestThreading; } int getTestPersistentCache() const { return fTestPersistentCache; } bool getTestPrecompile() const { return fTestPrecompile; } bool getUseDDLSink() const { return fUseDDLSink; } @@ -99,7 +97,6 @@ class SkCommandLineConfigGpu : public SkCommandLineConfig { int fSamples; SkColorType fColorType; SkAlphaType fAlphaType; - bool fTestThreading; int fTestPersistentCache; bool fTestPrecompile; bool fUseDDLSink; diff --git a/tools/flags/CommonFlagsGpu.cpp b/tools/flags/CommonFlagsGpu.cpp index a2e47096dcc5..167e5e8d00cc 100644 --- a/tools/flags/CommonFlagsGpu.cpp +++ b/tools/flags/CommonFlagsGpu.cpp @@ -14,8 +14,6 @@ DEFINE_int(gpuThreads, "Create this many extra threads to assist with GPU work, " "including software path rendering. Defaults to two."); -extern bool gSkBlobAsSlugTesting; - namespace CommonFlags { static DEFINE_bool(cachePathMasks, true, @@ -106,8 +104,6 @@ void SetCtxOptions(GrContextOptions* ctxOptions) { ctxOptions->fGpuPathRenderers = collect_gpu_path_renderers_from_flags(); ctxOptions->fDisableDriverCorrectnessWorkarounds = FLAGS_disableDriverCorrectnessWorkarounds; ctxOptions->fResourceCacheLimitOverride = FLAGS_gpuResourceCacheLimit; - // If testing with slugs ensure that padding is added in the atlas. - ctxOptions->fSupportBilerpFromGlyphAtlas |= gSkBlobAsSlugTesting; if (FLAGS_internalSamples >= 0) { ctxOptions->fInternalMultisampleCount = FLAGS_internalSamples; diff --git a/tools/fm/fm.cpp b/tools/fm/fm.cpp deleted file mode 100644 index 37d3e5d37ec2..000000000000 --- a/tools/fm/fm.cpp +++ /dev/null @@ -1,735 +0,0 @@ -// Copyright 2019 Google LLC. -// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. - -#include "gm/gm.h" -#include "include/codec/SkBmpDecoder.h" -#include "include/codec/SkCodec.h" -#include "include/codec/SkGifDecoder.h" -#include "include/codec/SkIcoDecoder.h" -#include "include/codec/SkJpegDecoder.h" -#include "include/codec/SkPngDecoder.h" -#include "include/codec/SkWbmpDecoder.h" -#include "include/codec/SkWebpDecoder.h" -#include "include/core/SkCanvas.h" -#include "include/core/SkColorSpace.h" -#include "include/core/SkGraphics.h" -#include "include/core/SkPicture.h" -#include "include/core/SkPictureRecorder.h" -#include "include/docs/SkPDFDocument.h" -#include "include/gpu/GrContextOptions.h" -#include "include/gpu/GrDirectContext.h" -#include "include/gpu/ganesh/SkSurfaceGanesh.h" -#include "src/core/SkColorSpacePriv.h" -#include "src/core/SkMD5.h" -#include "src/core/SkOSFile.h" -#include "src/core/SkTHash.h" -#include "src/core/SkTaskGroup.h" -#include "src/gpu/ganesh/GrDirectContextPriv.h" -#include "src/gpu/ganesh/GrGpu.h" -#include "src/utils/SkOSPath.h" -#include "tests/Test.h" -#include "tests/TestHarness.h" -#include "tools/AutoreleasePool.h" -#include "tools/CrashHandler.h" -#include "tools/HashAndEncode.h" -#include "tools/ToolUtils.h" -#include "tools/flags/CommandLineFlags.h" -#include "tools/flags/CommonFlags.h" -#include "tools/gpu/BackendSurfaceFactory.h" -#include "tools/gpu/GrContextFactory.h" -#include "tools/gpu/MemoryCache.h" -#include "tools/trace/EventTracingPriv.h" - -#include -#include -#include -#include -#include - -#if defined(SK_ENABLE_SVG) -#include "modules/svg/include/SkSVGDOM.h" -#include "modules/svg/include/SkSVGNode.h" -#include "modules/svg/include/SkSVGOpenTypeSVGDecoder.h" -#endif - -#if defined(SK_ENABLE_SKOTTIE) - #include "modules/skottie/include/Skottie.h" - #include "modules/skresources/include/SkResources.h" -#endif - -#ifdef SK_CODEC_DECODES_AVIF -#include "include/codec/SkAvifDecoder.h" -#endif - -#ifdef SK_HAS_HEIF_LIBRARY -#include "include/android/SkHeifDecoder.h" -#endif - -#ifdef SK_CODEC_DECODES_JPEGXL -#include "include/codec/SkJpegxlDecoder.h" -#endif - -#ifdef SK_CODEC_DECODES_RAW -#include "include/codec/SkRawDecoder.h" -#endif - -using namespace skia_private; - -using sk_gpu_test::GrContextFactory; - -static DEFINE_bool(listGMs , false, "Print GM names and exit."); -static DEFINE_bool(listTests, false, "Print unit test names and exit."); - -static DEFINE_string2(sources, s, "", "Which GMs, .skps, or images to draw."); -static DEFINE_string2(backend, b, "", "Backend used to create a canvas to draw into."); - -static DEFINE_string(ct , "8888", "The color type for any raster backend."); -static DEFINE_string(at , "premul", "The alpha type for any raster backend."); -static DEFINE_string(gamut , "srgb", "The color gamut for any raster backend."); -static DEFINE_string(tf , "srgb", "The transfer function for any raster backend."); -static DEFINE_bool (legacy, false, "Use a null SkColorSpace instead of --gamut and --tf?"); - -static DEFINE_bool (reducedshaders, false, "Use reduced shader set for any GPU backend."); -static DEFINE_int (samples , 0, "Samples per pixel in GPU backends."); -static DEFINE_bool (stencils , true, "If false, avoid stencil buffers in GPU backends."); -static DEFINE_bool (dit , false, "Use device-independent text in GPU backends."); -static DEFINE_string(surf , "default", "Backing store for GPU backend surfaces."); - -static DEFINE_bool( preAbandonGpuContext, false, "Abandon the GrContext before drawing."); -static DEFINE_bool( abandonGpuContext, false, "Abandon the GrContext after drawing."); -static DEFINE_bool(releaseAndAbandonGpuContext, false, - "Release all GPU resources and abandon the GrContext after drawing."); - -static DEFINE_bool(decodeToDst, false, - "Decode images to destination format rather than suggested natural format."); - -static DEFINE_double(rasterDPI, SK_ScalarDefaultRasterDPI, - "DPI for rasterized content in vector backends like --backend pdf."); -static DEFINE_bool(PDFA, false, "Create PDF/A with --backend pdf?"); - -static DEFINE_int(clipW, INT_MAX, "Limit source width."); -static DEFINE_int(clipH, INT_MAX, "Limit source height."); - -static DEFINE_bool (cpuDetect, true, "Detect CPU features for runtime optimizations?"); -static DEFINE_string2(writePath, w, "", "Write .pngs to this directory if set."); -static DEFINE_bool (quick, false, "Skip image hashing and encoding?"); -static DEFINE_int (race, 0, "If >0, use threads to induce race conditions?"); - -static DEFINE_string(writeShaders, "", "Write GLSL shaders to this directory if set."); - -static DEFINE_string(key, "", "Metadata passed through to .png encoder and .json output."); -static DEFINE_string(properties, "", "Metadata passed through to .png encoder and .json output."); - -template -struct FlagOption { - const char* label; - T value; -}; - -template -static bool parse_flag(const CommandLineFlags::StringArray& flag, - const char* flag_name, - const FlagOption (&array)[N], - T* value) { - for (auto entry : array) { - if (flag.contains(entry.label)) { - *value = entry.value; - return true; - } - } - fprintf(stderr, "Known values for --%s:\n", flag_name); - for (auto entry : array) { - fprintf(stderr, " --%s %s\n", flag_name, entry.label); - } - return false; -} - -struct Result { - enum { Ok, Skip, Fail } status; - SkString failure; -}; -static const Result ok = {Result::Ok, {}}, - skip = {Result::Skip, {}}; - -static Result fail(SkString why) { - return {Result::Fail, why}; -} - -struct Source { - SkString name; - SkISize size; - std::function draw; - std::function tweak = [](GrContextOptions*){}; -}; - -static void init(Source* source, std::shared_ptr gm) { - source->size = gm->getISize(); - source->tweak = [gm](GrContextOptions* options) { gm->modifyGrContextOptions(options); }; - source->draw = [gm](SkCanvas* canvas) { - - SkString err; - switch (gm->gpuSetup(canvas, &err)) { - case skiagm::DrawResult::kOk : break; - case skiagm::DrawResult::kSkip: return skip; - case skiagm::DrawResult::kFail: return fail(err); - } - - switch (gm->draw(canvas, &err)) { - case skiagm::DrawResult::kOk: break; - case skiagm::DrawResult::kSkip: return skip; - case skiagm::DrawResult::kFail: return fail(err); - } - return ok; - }; -} - -static void init(Source* source, sk_sp pic) { - source->size = pic->cullRect().roundOut().size(); - source->draw = [pic](SkCanvas* canvas) { - canvas->drawPicture(pic); - return ok; - }; -} - -static void init(Source* source, std::shared_ptr codec) { - source->size = codec->dimensions(); - source->draw = [codec](SkCanvas* canvas) { - SkImageInfo info = codec->getInfo(); - if (FLAGS_decodeToDst) { - info = canvas->imageInfo().makeDimensions(info.dimensions()); - } - - auto [image, result] = codec->getImage(info); - if (image) { - canvas->drawImage(image, 0,0); - return ok; - } - return fail(SkStringPrintf("codec->getPixels() failed: %d\n", result)); - }; -} - -#if defined(SK_ENABLE_SVG) -static void init(Source* source, sk_sp svg) { - if (svg->containerSize().isEmpty()) { - svg->setContainerSize({1000,1000}); - } - source->size = svg->containerSize().toCeil(); - source->draw = [svg](SkCanvas* canvas) { - svg->render(canvas); - return ok; - }; -} -#endif - -#if defined(SK_ENABLE_SKOTTIE) -static void init(Source* source, sk_sp animation) { - source->size = {1000,1000}; - source->draw = [animation](SkCanvas* canvas) { - canvas->clear(SK_ColorWHITE); - - // Draw frames in a shuffled order to exercise nonlinear frame progression. - // The film strip will still be in time order, just drawn out of order. - const int order[] = { 4, 0, 3, 1, 2 }; - const int tiles = std::size(order); - const float dim = 1000.0f / tiles; - - const float dt = 1.0f / (tiles*tiles - 1); - - for (int y : order) - for (int x : order) { - SkRect dst = {x*dim, y*dim, (x+1)*dim, (y+1)*dim}; - - SkAutoCanvasRestore _(canvas, /*doSave=*/true); - canvas->clipRect(dst, /*doAntiAlias=*/true); - canvas->concat(SkMatrix::RectToRect(SkRect::MakeSize(animation->size()), dst, - SkMatrix::kCenter_ScaleToFit)); - float t = (y*tiles + x) * dt; - animation->seek(t); - animation->render(canvas); - } - return ok; - }; -} -#endif - -static void register_codecs() { - SkCodecs::Register(SkPngDecoder::Decoder()); - SkCodecs::Register(SkJpegDecoder::Decoder()); - SkCodecs::Register(SkWebpDecoder::Decoder()); - SkCodecs::Register(SkGifDecoder::Decoder()); - SkCodecs::Register(SkBmpDecoder::Decoder()); - SkCodecs::Register(SkWbmpDecoder::Decoder()); - SkCodecs::Register(SkIcoDecoder::Decoder()); - -#ifdef SK_CODEC_DECODES_AVIF - SkCodecs::Register(SkAvifDecoder::Decoder()); -#endif -#ifdef SK_HAS_HEIF_LIBRARY - SkCodecs::Register(SkHeifDecoder::Decoder()); -#endif -#ifdef SK_CODEC_DECODES_JPEGXL - SkCodecs::Register(SkJpegxlDecoder::Decoder()); -#endif -#ifdef SK_CODEC_DECODES_RAW - SkCodecs::Register(SkRawDecoder::Decoder()); -#endif -} - -static void init_cpu_test(Source* source, const skiatest::Test& test) { - source->size = {1,1}; - source->draw = [test](SkCanvas* canvas) { - struct Reporter : public skiatest::Reporter { - SkString msg; - - void reportFailed(const skiatest::Failure& failure) override { - msg += failure.toString(); - msg += "\n"; - } - } reporter; - - test.cpu(&reporter); - - if (reporter.msg.isEmpty()) { - canvas->clear(SK_ColorGREEN); - return ok; - } - - canvas->clear(SK_ColorRED); - return fail(reporter.msg); - }; -} - -static sk_sp draw_with_cpu(std::function draw, - SkImageInfo info) { - if (sk_sp surface = SkSurfaces::Raster(info)) { - if (draw(surface->getCanvas())) { - return surface->makeImageSnapshot(); - } - } - return nullptr; -} - -static sk_sp draw_as_skp(std::function draw, - SkImageInfo info) { - SkPictureRecorder recorder; - if (draw(recorder.beginRecording(info.width(), info.height()))) { - return recorder.finishRecordingAsPicture()->serialize(); - } - return nullptr; -} - -static sk_sp draw_as_pdf(std::function draw, - SkImageInfo info, - SkString name) { - SkPDF::Metadata metadata; - metadata.fTitle = name; - metadata.fCreator = "Skia/FM"; - metadata.fRasterDPI = FLAGS_rasterDPI; - metadata.fPDFA = FLAGS_PDFA; - - SkDynamicMemoryWStream stream; - if (sk_sp doc = SkPDF::MakeDocument(&stream, metadata)) { - if (draw(doc->beginPage(info.width(), info.height()))) { - doc->endPage(); - doc->close(); - return stream.detachAsData(); - } - } - return nullptr; -} - -static sk_sp draw_with_gpu(std::function draw, - SkImageInfo info, - GrContextFactory::ContextType api, - GrContextFactory* factory) { - enum class SurfaceType { kDefault, kBackendTexture, kBackendRenderTarget }; - const FlagOption kSurfaceTypes[] = { - { "default", SurfaceType::kDefault }, - { "betex" , SurfaceType::kBackendTexture }, - { "bert" , SurfaceType::kBackendRenderTarget }, - }; - SurfaceType surfaceType; - if (!parse_flag(FLAGS_surf, "surf", kSurfaceTypes, &surfaceType)) { - return nullptr; - } - - auto overrides = GrContextFactory::ContextOverrides::kNone; - if (!FLAGS_stencils) { overrides |= GrContextFactory::ContextOverrides::kAvoidStencilBuffers; } - - auto context = factory->getContextInfo(api, overrides).directContext(); - - uint32_t flags = FLAGS_dit ? SkSurfaceProps::kUseDeviceIndependentFonts_Flag - : 0; - SkSurfaceProps props(flags, kRGB_H_SkPixelGeometry); - - sk_sp surface; - - switch (surfaceType) { - case SurfaceType::kDefault: - surface = SkSurfaces::RenderTarget( - context, skgpu::Budgeted::kNo, info, FLAGS_samples, &props); - break; - - case SurfaceType::kBackendTexture: - surface = sk_gpu_test::MakeBackendTextureSurface(context, - info, - kTopLeft_GrSurfaceOrigin, - FLAGS_samples, - GrMipmapped::kNo, - GrProtected::kNo, - &props); - break; - - case SurfaceType::kBackendRenderTarget: - surface = sk_gpu_test::MakeBackendRenderTargetSurface(context, - info, - kBottomLeft_GrSurfaceOrigin, - FLAGS_samples, - GrProtected::kNo, - &props); - break; - } - - if (!surface) { - fprintf(stderr, "Could not create GPU surface.\n"); - return nullptr; - } - - if (FLAGS_preAbandonGpuContext) { - factory->abandonContexts(); - } - - sk_sp image; - if (draw(surface->getCanvas())) { - image = surface->makeImageSnapshot(); - } - - if (FLAGS_abandonGpuContext) { - factory->abandonContexts(); - } else if (FLAGS_releaseAndAbandonGpuContext) { - factory->releaseResourcesAndAbandonContexts(); - } - - return image; -} - -TestHarness CurrentTestHarness() { - return TestHarness::kFM; -} - -int main(int argc, char** argv) { - CommandLineFlags::Parse(argc, argv); - SetupCrashHandler(); - SkTaskGroup::Enabler enabled(FLAGS_race); - - if (FLAGS_cpuDetect) { - SkGraphics::Init(); - } -#if defined(SK_ENABLE_SVG) - SkGraphics::SetOpenTypeSVGDecoderFactory(SkSVGOpenTypeSVGDecoder::Make); -#endif - - register_codecs(); - - initializeEventTracingForTools(); - CommonFlags::SetDefaultFontMgr(); - CommonFlags::SetAnalyticAA(); - - GrContextOptions baseOptions; - CommonFlags::SetCtxOptions(&baseOptions); - baseOptions.fReducedShaderVariations = FLAGS_reducedshaders; - - sk_gpu_test::MemoryCache memoryCache; - if (!FLAGS_writeShaders.isEmpty()) { - baseOptions.fPersistentCache = &memoryCache; - baseOptions.fShaderCacheStrategy = GrContextOptions::ShaderCacheStrategy::kBackendSource; - } - - THashMap gm_factories; - for (skiagm::GMFactory factory : skiagm::GMRegistry::Range()) { - std::unique_ptr gm{factory()}; - if (FLAGS_listGMs) { - fprintf(stdout, "%s\n", gm->getName()); - } else { - gm_factories.set(SkString{gm->getName()}, factory); - } - } - - THashMap tests; - for (const skiatest::Test& test : skiatest::TestRegistry::Range()) { - if (test.fTestType != skiatest::TestType::kCPU) { - continue; // TODO - } - if (FLAGS_listTests) { - fprintf(stdout, "%s\n", test.fName); - } else { - tests.set(SkString{test.fName}, &test); - } - } - - if (FLAGS_listGMs || FLAGS_listTests) { - return 0; - } - if (FLAGS_sources.isEmpty()) { - fprintf(stderr, "Please give me something to run using -s/--sources!\n"); - return 1; - } - - const int replicas = std::max(1, FLAGS_race); - - TArray sources; - for (const SkString& name : FLAGS_sources) - for (int replica = 0; replica < replicas; replica++) { - Source* source = &sources.push_back(); - source->name = name; - - if (skiagm::GMFactory* factory = gm_factories.find(name)) { - std::shared_ptr gm{(*factory)()}; - init(source, std::move(gm)); - continue; - } - - if (const skiatest::Test** test = tests.find(name)) { - init_cpu_test(source, **test); - continue; - } - - if (sk_sp blob = SkData::MakeFromFileName(name.c_str())) { - if (name.endsWith(".skp")) { - if (sk_sp pic = SkPicture::MakeFromData(blob.get())) { - init(source, pic); - continue; - } - } -#if defined(SK_ENABLE_SVG) - else if (name.endsWith(".svg")) { - SkMemoryStream stream{blob}; - if (sk_sp svg = SkSVGDOM::MakeFromStream(stream)) { - init(source, svg); - continue; - } - } -#endif -#if defined(SK_ENABLE_SKOTTIE) - else if (name.endsWith(".json")) { - const SkString dir = SkOSPath::Dirname(name.c_str()); - if (sk_sp animation = skottie::Animation::Builder() - .setResourceProvider(skresources::FileResourceProvider::Make(dir)) - .make((const char*)blob->data(), blob->size())) { - init(source, animation); - continue; - } - } -#endif - else if (std::shared_ptr codec = SkCodec::MakeFromData(blob)) { - init(source, codec); - continue; - } - } - - fprintf(stderr, "Don't understand source '%s'... bailing out.\n", name.c_str()); - return 1; - } - - enum NonGpuBackends { - kCPU_Backend = -1, - kSKP_Backend = -2, - kPDF_Backend = -3, - }; - const FlagOption kBackends[] = { - { "cpu" , kCPU_Backend }, - { "skp" , kSKP_Backend }, - { "pdf" , kPDF_Backend }, - { "gl" , GrContextFactory::kGL_ContextType }, - { "gles" , GrContextFactory::kGLES_ContextType }, - { "angle_d3d9_es2" , GrContextFactory::kANGLE_D3D9_ES2_ContextType }, - { "angle_d3d11_es2", GrContextFactory::kANGLE_D3D11_ES2_ContextType }, - { "angle_d3d11_es3", GrContextFactory::kANGLE_D3D11_ES3_ContextType }, - { "angle_gl_es2" , GrContextFactory::kANGLE_GL_ES2_ContextType }, - { "angle_gl_es3" , GrContextFactory::kANGLE_GL_ES3_ContextType }, - { "angle_mtl_es2" , GrContextFactory::kANGLE_Metal_ES2_ContextType }, - { "angle_mtl_es3" , GrContextFactory::kANGLE_Metal_ES3_ContextType }, - { "vk" , GrContextFactory::kVulkan_ContextType }, - { "mtl" , GrContextFactory::kMetal_ContextType }, - { "mock" , GrContextFactory::kMock_ContextType }, - }; - const FlagOption kColorTypes[] = { - { "a8", kAlpha_8_SkColorType }, - { "r8", kR8_unorm_SkColorType }, - { "565", kRGB_565_SkColorType }, - { "4444", kARGB_4444_SkColorType }, - { "8888", kN32_SkColorType }, - { "888x", kRGB_888x_SkColorType }, - { "1010102", kRGBA_1010102_SkColorType }, - { "101010x", kRGB_101010x_SkColorType }, - { "bgra1010102", kBGRA_1010102_SkColorType }, - { "bgr101010x", kBGR_101010x_SkColorType }, - { "f16norm", kRGBA_F16Norm_SkColorType }, - { "f16", kRGBA_F16_SkColorType }, - { "f32", kRGBA_F32_SkColorType }, - { "rgba", kRGBA_8888_SkColorType }, - { "bgra", kBGRA_8888_SkColorType }, - { "srgba", kSRGBA_8888_SkColorType }, - { "16161616", kR16G16B16A16_unorm_SkColorType }, - }; - const FlagOption kAlphaTypes[] = { - { "premul", kPremul_SkAlphaType }, - { "unpremul", kUnpremul_SkAlphaType }, - }; - const FlagOption kGamuts[] = { - { "srgb", SkNamedGamut::kSRGB }, - { "p3", SkNamedGamut::kDisplayP3 }, - { "rec2020", SkNamedGamut::kRec2020 }, - { "adobe", SkNamedGamut::kAdobeRGB }, - { "narrow", gNarrow_toXYZD50}, - }; - const FlagOption kTransferFunctions[] = { - { "srgb" , SkNamedTransferFn::kSRGB }, - { "rec2020", SkNamedTransferFn::kRec2020 }, - { "2.2" , SkNamedTransferFn::k2Dot2 }, - { "linear" , SkNamedTransferFn::kLinear }, - }; - - - int backend; - SkColorType ct; - SkAlphaType at; - skcms_Matrix3x3 gamut; - skcms_TransferFunction tf; - - if (!parse_flag(FLAGS_backend, "backend", kBackends , &backend) || - !parse_flag(FLAGS_ct , "ct" , kColorTypes , &ct) || - !parse_flag(FLAGS_at , "at" , kAlphaTypes , &at) || - !parse_flag(FLAGS_gamut , "gamut" , kGamuts , &gamut) || - !parse_flag(FLAGS_tf , "tf" , kTransferFunctions, &tf)) { - return 1; - } - - sk_sp cs = FLAGS_legacy ? nullptr - : SkColorSpace::MakeRGB(tf,gamut); - const SkColorInfo color_info{ct,at,cs}; - - for (int i = 0; i < sources.size(); i += replicas) - SkTaskGroup{}.batch(replicas, [=](int replica) { - Source source = sources[i+replica]; - - AutoreleasePool pool; - const auto start = std::chrono::steady_clock::now(); - - auto [w,h] = source.size; - w = std::min(w, FLAGS_clipW); - h = std::min(h, FLAGS_clipH); - const SkImageInfo info = SkImageInfo::Make({w,h}, color_info); - - auto draw = [&source](SkCanvas* canvas) { - Result result = source.draw(canvas); - switch (result.status) { - case Result::Ok: break; - case Result::Skip: return false; - case Result::Fail: - SK_ABORT("%s", result.failure.c_str()); - } - return true; - }; - - GrContextOptions options = baseOptions; - source.tweak(&options); - GrContextFactory factory(options); // N.B. factory must outlive image - - sk_sp image; - sk_sp blob; - const char* ext = ".png"; - switch (backend) { - case kCPU_Backend: - image = draw_with_cpu(draw, info); - break; - case kSKP_Backend: - blob = draw_as_skp(draw, info); - ext = ".skp"; - break; - case kPDF_Backend: - blob = draw_as_pdf(draw, info, source.name); - ext = ".pdf"; - break; - default: - image = draw_with_gpu(draw, info, (GrContextFactory::ContextType)backend, &factory); - break; - } - - // We read back a bitmap even when --quick is set and we won't use it, - // to keep us honest about deferred work, flushing pipelines, etc. - SkBitmap bitmap; - if (image && !image->asLegacyBitmap(&bitmap)) { - SK_ABORT("SkImage::asLegacyBitmap() failed."); - } - - // Our --race replicas have done their job by now if they're going to catch anything. - if (replica != 0) { - return; - } - - if (!image && !blob) { - fprintf(stdout, "%50s skipped\n", source.name.c_str()); - fflush(stdout); - return; - } - - SkString md5; - if (!FLAGS_quick) { - HashAndEncode hashAndEncode{bitmap}; - { - SkMD5 hash; - if (image) { - hashAndEncode.feedHash(&hash); - } else { - hash.write(blob->data(), blob->size()); - } - - SkMD5::Digest digest = hash.finish(); - for (int j = 0; j < 16; j++) { - md5.appendf("%02x", digest.data[j]); - } - } - - if (!FLAGS_writePath.isEmpty()) { - SkString path = SkStringPrintf("%s/%s%s", - FLAGS_writePath[0], source.name.c_str(), ext); - for (char* it = path.data(); *it != '\0'; it++) { - if (*it == '/' || *it == '\\') { - char prev = std::exchange(*it, '\0'); - sk_mkdir(path.c_str()); - *it = prev; - } - } - - SkFILEWStream file(path.c_str()); - if (image) { - if (!hashAndEncode.encodePNG(&file, md5.c_str(), - FLAGS_key, FLAGS_properties)) { - SK_ABORT("Could not write .png."); - } - } else { - file.write(blob->data(), blob->size()); - } - } - } - - const auto elapsed = std::chrono::steady_clock::now() - start; - fprintf(stdout, "%50s %s %7dms\n", - source.name.c_str(), - md5.c_str(), - (int)std::chrono::duration_cast(elapsed).count()); - fflush(stdout); - }); - - - if (!FLAGS_writeShaders.isEmpty()) { - sk_mkdir(FLAGS_writeShaders[0]); - GrBackendApi api = - GrContextFactory::ContextTypeBackend((GrContextFactory::ContextType)backend); - memoryCache.writeShadersToDisk(FLAGS_writeShaders[0], api); - - } - - return 0; -} diff --git a/tools/fm/fm_bot/fm_bot.go b/tools/fm/fm_bot/fm_bot.go deleted file mode 100644 index f077b8a30351..000000000000 --- a/tools/fm/fm_bot/fm_bot.go +++ /dev/null @@ -1,299 +0,0 @@ -// Copyright 2019 Google LLC. -// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. -package main - -import ( - "bufio" - "bytes" - "flag" - "fmt" - "log" - "math/rand" - "os" - "os/exec" - "path/filepath" - "runtime" - "strings" - "sync" - "sync/atomic" - "time" -) - -// Too many GPU processes and we'll start to overwhelm your GPU, -// even hanging your machine in the worst case. Here's a reasonable default. -func defaultGpuLimit() int { - limit := 8 - if n := runtime.NumCPU(); n < limit { - return n - } - return limit -} - -var script = flag.String("script", "", "A file with jobs to run, one per line. - for stdin.") -var random = flag.Bool("random", true, "Assign sources into job batches randomly?") -var quiet = flag.Bool("quiet", false, "Print only failures?") -var exact = flag.Bool("exact", false, "Match GM names only exactly.") -var cpuLimit = flag.Int("cpuLimit", runtime.NumCPU(), - "Maximum number of concurrent processes for CPU-bound work.") -var gpuLimit = flag.Int("gpuLimit", defaultGpuLimit(), - "Maximum number of concurrent processes for GPU-bound work.") - -func init() { - flag.StringVar(script, "s", *script, "Alias for --script.") - flag.BoolVar(random, "r", *random, "Alias for --random.") - flag.BoolVar(quiet, "q", *quiet, "Alias for --quiet.") - flag.BoolVar(exact, "e", *exact, "Alias for --exact.") - flag.IntVar(cpuLimit, "c", *cpuLimit, "Alias for --cpuLimit.") - flag.IntVar(gpuLimit, "g", *gpuLimit, "Alias for --gpuLimit.") -} - -// Query fm binary for list of all available GMs/tests by running with --listGMs/--listTests. -func listAll(flag string, fm string) (list []string, err error) { - cmd := exec.Command(fm, flag) - stdout, err := cmd.Output() - if err != nil { - return - } - // Names are listed line-by-line. - scanner := bufio.NewScanner(bytes.NewReader(stdout)) - for scanner.Scan() { - list = append(list, scanner.Text()) - } - err = scanner.Err() - return -} - -type work struct { - Sources []string - Flags []string -} - -func parseWork(args []string, gms []string, tests []string) (*work, error) { - w := &work{} - for _, arg := range args { - // Everything after a # is a comment. - if strings.HasPrefix(arg, "#") { - break - } - - // Treat "gm" or "gms" as a shortcut for all known GMs. - if arg == "gm" || arg == "gms" { - w.Sources = append(w.Sources, gms...) - continue - } - // Same for tests. - if arg == "test" || arg == "tests" { - w.Sources = append(w.Sources, tests...) - continue - } - - // -foo to remove foo if already added (e.g. by gms, tests). - if strings.HasPrefix(arg, "-") { - for i, s := range w.Sources { - if s == arg[1:] { - w.Sources = append(w.Sources[:i], w.Sources[i+1:]...) - break - } - } - continue - } - - // Is this an option to pass through to fm? - if parts := strings.Split(arg, "="); len(parts) == 2 { - f := "-" - if len(parts[0]) > 1 { - f += "-" - } - f += parts[0] - - w.Flags = append(w.Flags, f, parts[1]) - continue - } - - // Is this argument naming a GM or test? - matched := false - for _, gm := range gms { - if (*exact && gm == arg) || (!*exact && strings.Contains(gm, arg)) { - w.Sources = append(w.Sources, gm) - matched = true - } - } - for _, test := range tests { - if (*exact && test == arg) || (!*exact && strings.Contains(test, arg)) { - w.Sources = append(w.Sources, test) - matched = true - } - } - if matched { - continue - } - - // Anything left ought to be on the file system: a file, a directory, or a glob. - // Not all shells expand globs, so we'll do it here just in case. - matches, err := filepath.Glob(arg) - if err != nil { - return nil, err - } - if len(matches) == 0 { - return nil, fmt.Errorf("Don't understand '%s'.", arg) - } - - for _, match := range matches { - err := filepath.Walk(match, func(path string, info os.FileInfo, err error) error { - if !info.IsDir() { - w.Sources = append(w.Sources, path) - } - return err - }) - if err != nil { - return nil, err - } - } - } - return w, nil -} - -func main() { - flag.Parse() - - if flag.NArg() < 1 { - log.Fatal("Please pass an fm binary as the first argument.") - } - fm := flag.Args()[0] - - gms, err := listAll("--listGMs", fm) - if err != nil { - log.Fatalln("Could not query", fm, "for GMs:", err) - } - - tests, err := listAll("--listTests", fm) - if err != nil { - log.Fatalln("Could not query", fm, "for tests:", err) - } - - // One job can comes right on the command line, - // and any number can come one per line from -script. - jobs := [][]string{flag.Args()[1:]} - if *script != "" { - file := os.Stdin - if *script != "-" { - file, err = os.Open(*script) - if err != nil { - log.Fatal(err) - } - defer file.Close() - } - - scanner := bufio.NewScanner(file) - for scanner.Scan() { - jobs = append(jobs, strings.Fields(scanner.Text())) - } - if err = scanner.Err(); err != nil { - log.Fatal(err) - } - } - - wg := &sync.WaitGroup{} - var failures int32 = 0 - - worker := func(queue chan work) { - for w := range queue { - start := time.Now() - - args := w.Flags[:] - args = append(args, "-s") - args = append(args, w.Sources...) - - cmd := exec.Command(fm, args...) - output, err := cmd.CombinedOutput() - - status := "#done" - if err != nil { - status = fmt.Sprintf("#failed (%v)", err) - - if len(w.Sources) == 1 { - // If a source ran alone and failed, that's just a failure. - atomic.AddInt32(&failures, 1) - } else { - // If a batch of sources ran and failed, split them up and try again. - for _, source := range w.Sources { - wg.Add(1) - queue <- work{[]string{source}, w.Flags} - } - } - } - - if !*quiet || (err != nil && len(w.Sources) == 1) { - log.Printf("\n%v %v in %v:\n%s", - strings.Join(cmd.Args, " "), status, time.Since(start), output) - } - - wg.Done() - } - } - - cpu := make(chan work, 1<<20) - for i := 0; i < *cpuLimit; i++ { - go worker(cpu) - } - - gpu := make(chan work, 1<<20) - for i := 0; i < *gpuLimit; i++ { - go worker(gpu) - } - - for _, job := range jobs { - // Skip blank lines, empty command lines. - if len(job) == 0 { - continue - } - - w, err := parseWork(job, gms, tests) - if err != nil { - log.Fatal(err) - } - - // Determine if this is CPU-bound or GPU-bound work, conservatively assuming GPU. - queue, limit := gpu, *gpuLimit - backend := "" - for i, flag := range w.Flags { - if flag == "-b" || flag == "--backend" { - backend = w.Flags[i+1] - } - } - cpuBackends := map[string]bool{ - "cpu": true, - "skp": true, - "pdf": true, - } - if cpuBackends[backend] { - queue, limit = cpu, *cpuLimit - } - - if *random { - rand.Shuffle(len(w.Sources), func(i, j int) { - w.Sources[i], w.Sources[j] = w.Sources[j], w.Sources[i] - }) - } - - // Round up so there's at least one source per batch. - sourcesPerBatch := (len(w.Sources) + limit - 1) / limit - - for i := 0; i < len(w.Sources); i += sourcesPerBatch { - end := i + sourcesPerBatch - if end > len(w.Sources) { - end = len(w.Sources) - } - batch := w.Sources[i:end] - - wg.Add(1) - queue <- work{batch, w.Flags} - } - } - - wg.Wait() - - if failures > 0 { - log.Fatalln(failures, "failures after retries") - } -} diff --git a/tools/fonts/RandomScalerContext.cpp b/tools/fonts/RandomScalerContext.cpp index f4880be32ede..6fb753c50730 100644 --- a/tools/fonts/RandomScalerContext.cpp +++ b/tools/fonts/RandomScalerContext.cpp @@ -26,9 +26,8 @@ class RandomScalerContext : public SkScalerContext { bool fFakeIt); protected: - bool generateAdvance(SkGlyph*) override; - void generateMetrics(SkGlyph*, SkArenaAlloc*) override; - void generateImage(const SkGlyph&) override; + GlyphMetrics generateMetrics(const SkGlyph&, SkArenaAlloc*) override; + void generateImage(const SkGlyph&, void*) override; bool generatePath(const SkGlyph&, SkPath*) override; sk_sp generateDrawable(const SkGlyph&) override; void generateFontMetrics(SkFontMetrics*) override; @@ -54,56 +53,61 @@ RandomScalerContext::RandomScalerContext(sk_sp face, fProxy->forceGenerateImageFromPath(); } -bool RandomScalerContext::generateAdvance(SkGlyph* glyph) { return fProxy->generateAdvance(glyph); } - -void RandomScalerContext::generateMetrics(SkGlyph* glyph, SkArenaAlloc* alloc) { +SkScalerContext::GlyphMetrics RandomScalerContext::generateMetrics(const SkGlyph& origGlyph, + SkArenaAlloc* alloc) { // Here we will change the mask format of the glyph // NOTE: this may be overridden by the base class (e.g. if a mask filter is applied). SkMask::Format format = SkMask::kA8_Format; - switch (glyph->getGlyphID() % 4) { + switch (origGlyph.getGlyphID() % 4) { case 0: format = SkMask::kLCD16_Format; break; case 1: format = SkMask::kA8_Format; break; case 2: format = SkMask::kARGB32_Format; break; case 3: format = SkMask::kBW_Format; break; } - *glyph = fProxy->internalMakeGlyph(glyph->getPackedID(), format, alloc); + auto glyph = fProxy->internalMakeGlyph(origGlyph.getPackedID(), format, alloc); - if (fFakeIt || (glyph->getGlyphID() % 4) != 2) { - return; + GlyphMetrics mx(SkMask::kA8_Format); + mx.advance = glyph.advanceVector(); + mx.bounds = glyph.iRect(); + mx.maskFormat = glyph.maskFormat(); + mx.extraBits = glyph.extraBits(); + + if (fFakeIt || (glyph.getGlyphID() % 4) != 2) { + mx.neverRequestPath = glyph.setPathHasBeenCalled() && !glyph.path(); + mx.computeFromPath = !mx.neverRequestPath; + return mx; } - fProxy->getPath(*glyph, alloc); - if (!glyph->path()) { - return; + fProxy->getPath(glyph, alloc); + if (!glyph.path()) { + mx.neverRequestPath = true; + return mx; } // The proxy glyph has a path, but this glyph does not. // Stash the proxy glyph so it can be used later. - const SkGlyph* proxyGlyph = fProxyGlyphs.set(glyph->getPackedID(), std::move(*glyph)); + const auto packedID = glyph.getPackedID(); + const SkGlyph* proxyGlyph = fProxyGlyphs.set(packedID, std::move(glyph)); const SkPath& proxyPath = *proxyGlyph->path(); - *glyph = SkGlyph(glyph->getPackedID()); - glyph->setPath(alloc, nullptr, false); - glyph->fMaskFormat = SkMask::kARGB32_Format; - glyph->fAdvanceX = proxyGlyph->fAdvanceX; - glyph->fAdvanceY = proxyGlyph->fAdvanceY; + mx.neverRequestPath = true; + mx.maskFormat = SkMask::kARGB32_Format; + mx.advance = proxyGlyph->advanceVector(); + mx.extraBits = proxyGlyph->extraBits(); SkRect storage; const SkPaint& paint = this->getRandomTypeface()->paint(); const SkRect& newBounds = paint.doComputeFastBounds(proxyPath.getBounds(), &storage, SkPaint::kFill_Style); - SkIRect ibounds; - newBounds.roundOut(&ibounds); - glyph->fLeft = ibounds.fLeft; - glyph->fTop = ibounds.fTop; - glyph->fWidth = ibounds.width(); - glyph->fHeight = ibounds.height(); + newBounds.roundOut(&mx.bounds); + + return mx; } -void RandomScalerContext::generateImage(const SkGlyph& glyph) { +void RandomScalerContext::generateImage(const SkGlyph& glyph, void* imageBuffer) { if (fFakeIt) { - sk_bzero(glyph.fImage, glyph.imageSize()); + sk_bzero(imageBuffer, glyph.imageSize()); return; } @@ -116,13 +120,12 @@ void RandomScalerContext::generateImage(const SkGlyph& glyph) { const bool hairline = proxyGlyph->pathIsHairline(); SkBitmap bm; - bm.installPixels(SkImageInfo::MakeN32Premul(glyph.fWidth, glyph.fHeight), - glyph.fImage, - glyph.rowBytes()); + bm.installPixels(SkImageInfo::MakeN32Premul(glyph.width(), glyph.height()), + imageBuffer, glyph.rowBytes()); bm.eraseColor(0); SkCanvas canvas(bm); - canvas.translate(-SkIntToScalar(glyph.fLeft), -SkIntToScalar(glyph.fTop)); + canvas.translate(-SkIntToScalar(glyph.left()), -SkIntToScalar(glyph.top())); SkPaint paint = this->getRandomTypeface()->paint(); if (hairline) { // We have a device path with effects already applied which is normally a fill path. diff --git a/tools/fonts/TestSVGTypeface.cpp b/tools/fonts/TestSVGTypeface.cpp index 24427b4d55b2..e1e77ba5e20f 100644 --- a/tools/fonts/TestSVGTypeface.cpp +++ b/tools/fonts/TestSVGTypeface.cpp @@ -122,12 +122,9 @@ TestSVGTypeface::~TestSVGTypeface() {} TestSVGTypeface::Glyph::Glyph() : fOrigin{0, 0}, fAdvance(0) {} TestSVGTypeface::Glyph::~Glyph() {} -void TestSVGTypeface::getAdvance(SkGlyph* glyph) const { - SkGlyphID glyphID = glyph->getGlyphID(); - glyphID = glyphID < fGlyphCount ? glyphID : 0; - - glyph->fAdvanceX = fGlyphs[glyphID].fAdvance; - glyph->fAdvanceY = 0; +SkVector TestSVGTypeface::getAdvance(SkGlyphID glyphID) const { + glyphID = glyphID < fGlyphCount ? glyphID : 0; + return {fGlyphs[glyphID].fAdvance, 0}; } void TestSVGTypeface::getFontMetrics(SkFontMetrics* metrics) const { *metrics = fFontMetrics; } @@ -189,24 +186,18 @@ class SkTestSVGScalerContext : public SkScalerContext { return static_cast(this->getTypeface()); } - bool generateAdvance(SkGlyph* glyph) override { - this->getTestSVGTypeface()->getAdvance(glyph); - - const SkVector advance = - fMatrix.mapXY(SkFloatToScalar(glyph->fAdvanceX), SkFloatToScalar(glyph->fAdvanceY)); - glyph->fAdvanceX = SkScalarToFloat(advance.fX); - glyph->fAdvanceY = SkScalarToFloat(advance.fY); - return true; + SkVector computeAdvance(SkGlyphID glyphID) { + auto advance = this->getTestSVGTypeface()->getAdvance(glyphID); + return fMatrix.mapXY(advance.fX, advance.fY); } - void generateMetrics(SkGlyph* glyph, SkArenaAlloc* alloc) override { - SkGlyphID glyphID = glyph->getGlyphID(); + GlyphMetrics generateMetrics(const SkGlyph& glyph, SkArenaAlloc*) override { + SkGlyphID glyphID = glyph.getGlyphID(); glyphID = glyphID < this->getTestSVGTypeface()->fGlyphCount ? glyphID : 0; - glyph->zeroMetrics(); - glyph->fMaskFormat = SkMask::kARGB32_Format; - glyph->setPath(alloc, nullptr, false); - this->generateAdvance(glyph); + GlyphMetrics mx(SkMask::kARGB32_Format); + mx.neverRequestPath = true; + mx.advance = this->computeAdvance(glyph.getGlyphID()); TestSVGTypeface::Glyph& glyphData = this->getTestSVGTypeface()->fGlyphs[glyphID]; @@ -216,27 +207,21 @@ class SkTestSVGScalerContext : public SkScalerContext { containerSize.fWidth, containerSize.fHeight); fMatrix.mapRect(&newBounds); - SkScalar dx = SkFixedToScalar(glyph->getSubXFixed()); - SkScalar dy = SkFixedToScalar(glyph->getSubYFixed()); + SkScalar dx = SkFixedToScalar(glyph.getSubXFixed()); + SkScalar dy = SkFixedToScalar(glyph.getSubYFixed()); newBounds.offset(dx, dy); - - SkIRect ibounds; - newBounds.roundOut(&ibounds); - glyph->fLeft = ibounds.fLeft; - glyph->fTop = ibounds.fTop; - glyph->fWidth = ibounds.width(); - glyph->fHeight = ibounds.height(); + newBounds.roundOut(&mx.bounds); + return mx; } - void generateImage(const SkGlyph& glyph) override { + void generateImage(const SkGlyph& glyph, void* imageBuffer) override { SkGlyphID glyphID = glyph.getGlyphID(); glyphID = glyphID < this->getTestSVGTypeface()->fGlyphCount ? glyphID : 0; SkBitmap bm; // TODO: this should be SkImageInfo::MakeS32 when that passes all the tests. - bm.installPixels(SkImageInfo::MakeN32(glyph.fWidth, glyph.fHeight, kPremul_SkAlphaType), - glyph.fImage, - glyph.rowBytes()); + bm.installPixels(SkImageInfo::MakeN32(glyph.width(), glyph.height(), kPremul_SkAlphaType), + imageBuffer, glyph.rowBytes()); bm.eraseColor(0); TestSVGTypeface::Glyph& glyphData = this->getTestSVGTypeface()->fGlyphs[glyphID]; @@ -245,7 +230,7 @@ class SkTestSVGScalerContext : public SkScalerContext { SkScalar dy = SkFixedToScalar(glyph.getSubYFixed()); SkCanvas canvas(bm); - canvas.translate(-glyph.fLeft, -glyph.fTop); + canvas.translate(-glyph.left(), -glyph.top()); canvas.translate(dx, dy); canvas.concat(fMatrix); canvas.translate(glyphData.fOrigin.fX, -glyphData.fOrigin.fY); diff --git a/tools/fonts/TestSVGTypeface.h b/tools/fonts/TestSVGTypeface.h index f4f8ee03a1f9..19019458da7c 100644 --- a/tools/fonts/TestSVGTypeface.h +++ b/tools/fonts/TestSVGTypeface.h @@ -52,7 +52,7 @@ struct SkSVGTestTypefaceGlyphData { class TestSVGTypeface : public SkTypeface { public: ~TestSVGTypeface() override; - void getAdvance(SkGlyph* glyph) const; + SkVector getAdvance(SkGlyphID) const; void getFontMetrics(SkFontMetrics* metrics) const; static sk_sp Default(); diff --git a/tools/fonts/TestTypeface.cpp b/tools/fonts/TestTypeface.cpp index 400424b17183..01cf802b10f4 100644 --- a/tools/fonts/TestTypeface.cpp +++ b/tools/fonts/TestTypeface.cpp @@ -127,13 +127,11 @@ void SkTestFont::init(const SkScalar* pts, const unsigned char* verbs) { TestTypeface::TestTypeface(sk_sp testFont, const SkFontStyle& style) : SkTypeface(style, false), fTestFont(std::move(testFont)) {} -void TestTypeface::getAdvance(SkGlyph* glyph) { - SkGlyphID glyphID = glyph->getGlyphID(); - glyphID = glyphID < fTestFont->fCharCodesCount ? glyphID : 0; +SkVector TestTypeface::getAdvance(SkGlyphID glyphID) const { + glyphID = glyphID < fTestFont->fCharCodesCount ? glyphID : 0; // TODO(benjaminwagner): Update users to use floats. - glyph->fAdvanceX = SkFixedToFloat(fTestFont->fWidths[glyphID]); - glyph->fAdvanceY = 0; + return {SkFixedToFloat(fTestFont->fWidths[glyphID]), 0}; } void TestTypeface::getFontMetrics(SkFontMetrics* metrics) { *metrics = fTestFont->fMetrics; } @@ -260,23 +258,20 @@ class SkTestScalerContext : public SkScalerContext { return static_cast(this->getTypeface()); } - bool generateAdvance(SkGlyph* glyph) override { - this->getTestTypeface()->getAdvance(glyph); + GlyphMetrics generateMetrics(const SkGlyph& glyph, SkArenaAlloc*) override { + GlyphMetrics mx(glyph.maskFormat()); - const SkVector advance = - fMatrix.mapXY(SkFloatToScalar(glyph->fAdvanceX), SkFloatToScalar(glyph->fAdvanceY)); - glyph->fAdvanceX = SkScalarToFloat(advance.fX); - glyph->fAdvanceY = SkScalarToFloat(advance.fY); - return true; - } + auto advance = this->getTestTypeface()->getAdvance(glyph.getGlyphID()); + + mx.advance = fMatrix.mapXY(advance.fX, advance.fY); + return mx; - void generateMetrics(SkGlyph* glyph, SkArenaAlloc*) override { - glyph->zeroMetrics(); - this->generateAdvance(glyph); // Always generates from paths, so SkScalerContext::makeGlyph will figure the bounds. } - void generateImage(const SkGlyph&) override { SK_ABORT("Should have generated from path."); } + void generateImage(const SkGlyph&, void*) override { + SK_ABORT("Should have generated from path."); + } bool generatePath(const SkGlyph& glyph, SkPath* path) override { *path = this->getTestTypeface()->getPath(glyph.getGlyphID()).makeTransform(fMatrix); diff --git a/tools/fonts/TestTypeface.h b/tools/fonts/TestTypeface.h index de4077c548e4..a93bed2bfe9f 100644 --- a/tools/fonts/TestTypeface.h +++ b/tools/fonts/TestTypeface.h @@ -78,7 +78,7 @@ class TestTypeface : public SkTypeface { }; static const List& Typefaces(); - void getAdvance(SkGlyph* glyph); + SkVector getAdvance(SkGlyphID) const; void getFontMetrics(SkFontMetrics* metrics); SkPath getPath(SkGlyphID glyph); diff --git a/tools/gpu/BUILD.bazel b/tools/gpu/BUILD.bazel index 756e9c104152..9d6db2f00388 100644 --- a/tools/gpu/BUILD.bazel +++ b/tools/gpu/BUILD.bazel @@ -15,13 +15,15 @@ skia_cc_library( "FenceSync.h", "FlushFinishTracker.cpp", "FlushFinishTracker.h", + "GpuTimer.h", "GrContextFactory.cpp", "GrTest.cpp", "ManagedBackendTexture.cpp", "ManagedBackendTexture.h", "MemoryCache.cpp", "MemoryCache.h", - "GpuTimer.h", + "ProtectedUtils.cpp", + "ProtectedUtils.h", "ProxyUtils.cpp", "ProxyUtils.h", "TestContext.cpp", @@ -33,19 +35,19 @@ skia_cc_library( "//tools/gpu/mock:private_hdrs", "//tools/gpu/mock:srcs", ] + select_multi({ - "//src/gpu:gl_backend": [ + "//src/gpu:gl_ganesh": [ "//tools/gpu/gl:private_hdrs", "//tools/gpu/gl:srcs", ], - "//src/gpu:vulkan_backend": [ + "//src/gpu:vulkan_ganesh": [ "//tools/gpu/vk:private_hdrs", "//tools/gpu/vk:srcs", ], - "//src/gpu:dawn_backend": [ + "//src/gpu:dawn_ganesh": [ "//tools/gpu/dawn:private_hdrs", "//tools/gpu/dawn:srcs", ], - "//src/gpu:metal_backend": [ + "//src/gpu:metal_ganesh": [ "//tools/gpu/mtl:private_hdrs", "//tools/gpu/mtl:srcs", ], @@ -55,13 +57,14 @@ skia_cc_library( "GrContextFactory.h", ], visibility = [ + "//gm/surface_manager:__pkg__", "//modules/skottie:__pkg__", "//tests:__pkg__", "//tools/viewer:__pkg__", ], deps = ["//:skia_internal"] + select_multi({ - "//src/gpu:gl_backend": ["//tools/gpu/gl:deps"], - "//src/gpu:dawn_backend": ["//tools/gpu/dawn:deps"], + "//src/gpu:gl_ganesh": ["//tools/gpu/gl:deps"], + "//src/gpu:dawn_ganesh": ["//tools/gpu/dawn:deps"], }) + select({ "@platforms//os:macos": ["//tools:autorelease_pool_objc"], "//conditions:default": ["//tools:autorelease_pool"], diff --git a/tools/gpu/FenceSync.h b/tools/gpu/FenceSync.h index 146b3a2a2a29..9f4db97a6060 100644 --- a/tools/gpu/FenceSync.h +++ b/tools/gpu/FenceSync.h @@ -22,7 +22,7 @@ static constexpr PlatformFence kInvalidFence = 0; */ class FenceSync { public: - virtual PlatformFence SK_WARN_UNUSED_RESULT insertFence() const = 0; + [[nodiscard]] virtual PlatformFence insertFence() const = 0; virtual bool waitFence(PlatformFence) const = 0; virtual void deleteFence(PlatformFence) const = 0; diff --git a/tools/gpu/GpuTimer.h b/tools/gpu/GpuTimer.h index 368af7167fdd..9f77243e9a65 100644 --- a/tools/gpu/GpuTimer.h +++ b/tools/gpu/GpuTimer.h @@ -47,7 +47,7 @@ class GpuTimer { * * @return a query object that can retrieve the time elapsed once the timer has completed. */ - PlatformTimerQuery SK_WARN_UNUSED_RESULT queueStop() { + [[nodiscard]] PlatformTimerQuery queueStop() { SkASSERT(fActiveTimer); this->onQueueTimerStop(fActiveTimer); return std::exchange(fActiveTimer, kInvalidTimerQuery); diff --git a/tools/gpu/GrContextFactory.h b/tools/gpu/GrContextFactory.h index 48be4f662ed6..a701d149a977 100644 --- a/tools/gpu/GrContextFactory.h +++ b/tools/gpu/GrContextFactory.h @@ -80,6 +80,21 @@ class GrContextFactory : SkNoncopyable { } } + static bool IsNativeBackend(ContextType type) { + switch (type) { + case kDirect3D_ContextType: + case kGL_ContextType: + case kGLES_ContextType: + case kMetal_ContextType: + case kVulkan_ContextType: + return true; + default: + // Mock doesn't use the GPU, and Dawn and ANGLE add a layer between Skia and the + // native GPU backend. + return false; + } + } + static GrBackendApi ContextTypeBackend(ContextType type) { switch (type) { case kVulkan_ContextType: diff --git a/tools/gpu/MemoryCache.cpp b/tools/gpu/MemoryCache.cpp index 9bd5b0187173..532f60ff6452 100644 --- a/tools/gpu/MemoryCache.cpp +++ b/tools/gpu/MemoryCache.cpp @@ -87,10 +87,7 @@ void MemoryCache::writeShadersToDisk(const char* path, GrBackendApi api) { #endif hash.write(it->first.fKey->bytes(), bytesToHash); SkMD5::Digest digest = hash.finish(); - SkString md5; - for (int i = 0; i < 16; ++i) { - md5.appendf("%02x", digest.data[i]); - } + SkString md5 = digest.toLowercaseHexString(); SkSL::Program::Interface interfacesIgnored[kGrShaderTypeCount]; std::string shaders[kGrShaderTypeCount]; diff --git a/tools/gpu/ProtectedUtils.cpp b/tools/gpu/ProtectedUtils.cpp new file mode 100644 index 000000000000..096913920981 --- /dev/null +++ b/tools/gpu/ProtectedUtils.cpp @@ -0,0 +1,137 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "tools/gpu/ProtectedUtils.h" + +#include "include/gpu/ganesh/SkImageGanesh.h" +#include "include/gpu/ganesh/SkSurfaceGanesh.h" +#include "src/gpu/ganesh/GrDirectContextPriv.h" +#include "tools/gpu/BackendSurfaceFactory.h" +#include "tools/gpu/BackendTextureImageFactory.h" + +#ifdef SK_GL +#include "src/gpu/ganesh/gl/GrGLCaps.h" +#endif +#ifdef SK_VULKAN +#include "src/gpu/ganesh/vk/GrVkCaps.h" +#endif + +namespace ProtectedUtils { + +bool ContextSupportsProtected(GrDirectContext* dContext) { + [[maybe_unused]] const GrCaps* caps = dContext->priv().caps(); + +#ifdef SK_GL + if (dContext->backend() == GrBackendApi::kOpenGL) { + const GrGLCaps* glCaps = static_cast(caps); + return glCaps->supportsProtected(); + } +#endif +#ifdef SK_VULKAN + if (dContext->backend() == GrBackendApi::kVulkan) { + const GrVkCaps* vkCaps = static_cast(caps); + return vkCaps->supportsProtectedMemory(); + } +#endif + if (dContext->backend() == GrBackendApi::kMock) { + return true; + } + + // Metal, Dawn and D3D don't support protected textures + return false; +} + +sk_sp CreateProtectedSkSurface(GrDirectContext* dContext, + SkISize size, + bool textureable, + bool isProtected) { + SkSurfaceProps surfaceProps = SkSurfaceProps(0, kRGB_H_SkPixelGeometry); + sk_sp surface; + if (textureable) { + surface = sk_gpu_test::MakeBackendTextureSurface(dContext, + size, + kTopLeft_GrSurfaceOrigin, + 1, + kRGBA_8888_SkColorType, + /* colorSpace= */ nullptr, + GrMipmapped::kNo, + skgpu::Protected(isProtected), + &surfaceProps); + } else { + surface = sk_gpu_test::MakeBackendRenderTargetSurface(dContext, + size, + kTopLeft_GrSurfaceOrigin, + 1, + kRGBA_8888_SkColorType, + /* colorSpace= */ nullptr, + skgpu::Protected(isProtected), + &surfaceProps); + } + if (!surface) { + SK_ABORT("Could not create %s surface.", isProtected ? "protected" : "unprotected"); + return nullptr; + } + + SkCanvas* canvas = surface->getCanvas(); + + canvas->clear(SkColors::kBlue); + + if (textureable) { + GrBackendTexture backendTex = SkSurfaces::GetBackendTexture( + surface.get(), SkSurfaces::BackendHandleAccess::kFlushRead); + SkASSERT(backendTex.isValid()); + SkASSERT(backendTex.isProtected() == isProtected); + } else { + GrBackendRenderTarget backendRT = SkSurfaces::GetBackendRenderTarget( + surface.get(), SkSurfaces::BackendHandleAccess::kFlushRead); + SkASSERT(backendRT.isValid()); + SkASSERT(backendRT.isProtected() == isProtected); + } + + return surface; +} + +void CheckImageBEProtection(SkImage* image, bool expectingProtected) { + GrBackendTexture beTex; + GrSurfaceOrigin origin; + bool result = SkImages::GetBackendTextureFromImage(image, + &beTex, + /* flushPendingGrContextIO= */ true, + &origin); + if (!result) { + SK_ABORT("GetBackendTextureFromImage failed"); + return; + } + + SkASSERT(beTex.isValid()); + SkASSERT(beTex.isProtected() == expectingProtected); +} + +sk_sp CreateProtectedSkImage(GrDirectContext* dContext, + SkISize size, + SkColor4f color, + bool isProtected) { + SkImageInfo ii = SkImageInfo::Make(size, kRGBA_8888_SkColorType, kPremul_SkAlphaType); + + sk_sp image = sk_gpu_test::MakeBackendTextureImage(dContext, + ii, + color, + GrMipmapped::kNo, + GrRenderable::kNo, + kTopLeft_GrSurfaceOrigin, + skgpu::Protected(isProtected)); + if (!image) { + SK_ABORT("Could not create %s image.", isProtected ? "protected" : "unprotected"); + return nullptr; + } + + CheckImageBEProtection(image.get(), isProtected); + + return image; +} + +} // namespace ProtectedUtils diff --git a/tools/gpu/ProtectedUtils.h b/tools/gpu/ProtectedUtils.h new file mode 100644 index 000000000000..9d5c0b57fa52 --- /dev/null +++ b/tools/gpu/ProtectedUtils.h @@ -0,0 +1,37 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef ProtectedUtils_DEFINED +#define ProtectedUtils_DEFINED + +#include "include/core/SkColor.h" +#include "include/core/SkRefCnt.h" + +class GrDirectContext; +class SkImage; +class SkSurface; +struct SkISize; + +namespace ProtectedUtils { + +bool ContextSupportsProtected(GrDirectContext*); + +sk_sp CreateProtectedSkSurface(GrDirectContext*, + SkISize size, + bool textureable = true, + bool isProtected = true); + +void CheckImageBEProtection(SkImage*, bool expectingProtected); + +sk_sp CreateProtectedSkImage(GrDirectContext*, + SkISize size, + SkColor4f color, + bool isProtected); + +} // namespace ProtectedUtils + +#endif // ProtectedUtils_DEFINED diff --git a/tools/gpu/TestContext.h b/tools/gpu/TestContext.h index 25fa36d04dcc..008b95347610 100644 --- a/tools/gpu/TestContext.h +++ b/tools/gpu/TestContext.h @@ -58,7 +58,7 @@ class TestContext : public SkNoncopyable { * executes. If the concept of a current context doesn't make sense for this context type then * the returned object's destructor is a no-op. */ - SkScopeExit SK_WARN_UNUSED_RESULT makeCurrentAndAutoRestore() const; + [[nodiscard]] SkScopeExit makeCurrentAndAutoRestore() const; virtual GrBackendApi backend() = 0; diff --git a/tools/gpu/gl/interface/templates.go b/tools/gpu/gl/interface/templates.go index f2d674e50be3..cba6102a1288 100644 --- a/tools/gpu/gl/interface/templates.go +++ b/tools/gpu/gl/interface/templates.go @@ -76,7 +76,7 @@ sk_sp GrGLMakeAssembledGLESInterface(void *ctx, GrGLGetProc interface->fStandard = kGLES_GrGLStandard; interface->fExtensions.swap(&extensions); - return std::move(interface); + return interface; } #endif ` @@ -143,7 +143,7 @@ sk_sp GrGLMakeAssembledGLInterface(void *ctx, GrGLGetProc g interface->fStandard = kGL_GrGLStandard; interface->fExtensions.swap(&extensions); - return std::move(interface); + return interface; } #endif ` @@ -215,7 +215,7 @@ sk_sp GrGLMakeAssembledWebGLInterface(void *ctx, GrGLGetPro interface->fStandard = kWebGL_GrGLStandard; interface->fExtensions.swap(&extensions); - return std::move(interface); + return interface; } #endif ` diff --git a/tools/gpu/vk/VkTestUtils.cpp b/tools/gpu/vk/VkTestUtils.cpp index 68c275f348fb..bfd0e9e6bcce 100644 --- a/tools/gpu/vk/VkTestUtils.cpp +++ b/tools/gpu/vk/VkTestUtils.cpp @@ -447,6 +447,18 @@ static bool setup_features(skgpu::VulkanGetProc getProc, VkInstance inst, VkPhys tailPNext = &dynamicRenderingFeature->pNext; } + VkPhysicalDeviceInlineUniformBlockFeaturesEXT* inlineUniformFeature = nullptr; + if (extensions->hasExtension(VK_EXT_INLINE_UNIFORM_BLOCK_EXTENSION_NAME, 1)) { + inlineUniformFeature = (VkPhysicalDeviceInlineUniformBlockFeaturesEXT*)sk_malloc_throw( + sizeof(VkPhysicalDeviceInlineUniformBlockFeaturesEXT)); + inlineUniformFeature->sType = + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT; + inlineUniformFeature->pNext = nullptr; + inlineUniformFeature->inlineUniformBlock = VK_TRUE; + *tailPNext = inlineUniformFeature; + tailPNext = &inlineUniformFeature->pNext; + } + if (physDeviceVersion >= VK_MAKE_VERSION(1, 1, 0)) { ACQUIRE_VK_PROC_LOCAL(GetPhysicalDeviceFeatures2, inst, VK_NULL_HANDLE); grVkGetPhysicalDeviceFeatures2(physDev, features); @@ -485,6 +497,8 @@ bool CreateVkBackendContext(PFN_vkGetInstanceProcAddr getInstProc, isProtected)) { return false; } + + SkASSERT(skgpuCtx.fProtectedContext == skgpu::Protected(isProtected)); ctx->fInstance = skgpuCtx.fInstance; ctx->fPhysicalDevice = skgpuCtx.fPhysicalDevice; ctx->fDevice = skgpuCtx.fDevice; @@ -495,9 +509,7 @@ bool CreateVkBackendContext(PFN_vkGetInstanceProcAddr getInstProc, ctx->fDeviceFeatures2 = skgpuCtx.fDeviceFeatures2; ctx->fGetProc = skgpuCtx.fGetProc; ctx->fOwnsInstanceAndDevice = false; - ctx->fProtectedContext = - skgpuCtx.fProtectedContext == skgpu::Protected::kYes ? skgpu::Protected::kYes - : skgpu::Protected::kNo; + ctx->fProtectedContext = skgpuCtx.fProtectedContext; return true; } @@ -880,7 +892,7 @@ bool CreateVkBackendContext(PFN_vkGetInstanceProcAddr getInstProc, ctx->fVkExtensions = extensions; ctx->fDeviceFeatures2 = features; ctx->fGetProc = getProc; - ctx->fProtectedContext = isProtected ? skgpu::Protected::kYes : skgpu::Protected::kNo; + ctx->fProtectedContext = skgpu::Protected(isProtected); return true; } diff --git a/tools/graphite/ContextFactory.cpp b/tools/graphite/ContextFactory.cpp index 027e9bbbc0b7..97df2e488514 100644 --- a/tools/graphite/ContextFactory.cpp +++ b/tools/graphite/ContextFactory.cpp @@ -16,7 +16,7 @@ #include "tools/graphite/mtl/GraphiteMtlTestContext.h" #endif #ifdef SK_VULKAN -#include "tools/graphite/vk/VulkanTestContext.h" +#include "tools/graphite/vk/GraphiteVulkanTestContext.h" #endif namespace skiatest::graphite { @@ -36,6 +36,12 @@ ContextFactory::ContextInfo::ContextInfo(GrContextFactory::ContextType type, } //////////////////////////////////////////////////////////////////////////////////////////////////// +ContextFactory::ContextFactory(const skgpu::graphite::ContextOptions& options) + : fOptions(options) { +} + +ContextFactory::~ContextFactory() {} + std::tuple ContextFactory::getContextInfo( GrContextFactory::ContextType type) { @@ -93,7 +99,7 @@ std::tuple ContextFactory::getC return {}; } - std::unique_ptr context = testCtx->makeContext(); + std::unique_ptr context = testCtx->makeContext(fOptions); if (!context) { return {}; } diff --git a/tools/graphite/ContextFactory.h b/tools/graphite/ContextFactory.h index f6d0f9bcaa41..5f4a9b3cca20 100644 --- a/tools/graphite/ContextFactory.h +++ b/tools/graphite/ContextFactory.h @@ -10,6 +10,7 @@ #include #include "include/core/SkRefCnt.h" +#include "include/gpu/graphite/ContextOptions.h" #include "include/gpu/graphite/GraphiteTypes.h" #include "tools/graphite/GraphiteTestContext.h" @@ -51,17 +52,19 @@ class ContextFactory { std::unique_ptr fContext; }; + explicit ContextFactory(const skgpu::graphite::ContextOptions&); ContextFactory() = default; ContextFactory(const ContextFactory&) = delete; ContextFactory& operator=(const ContextFactory&) = delete; - ~ContextFactory() = default; + ~ContextFactory(); std::tuple getContextInfo( GrContextFactory::ContextType); private: std::vector fContexts; + const skgpu::graphite::ContextOptions fOptions; }; } // namespace skiatest::graphite diff --git a/tools/graphite/GraphiteTestContext.h b/tools/graphite/GraphiteTestContext.h index 2e7668f17f8c..940dea1d3530 100644 --- a/tools/graphite/GraphiteTestContext.h +++ b/tools/graphite/GraphiteTestContext.h @@ -13,6 +13,7 @@ namespace skgpu::graphite { class Context; +struct ContextOptions; class Recording; } @@ -33,7 +34,8 @@ class GraphiteTestContext { virtual skgpu::BackendApi backend() = 0; - virtual std::unique_ptr makeContext() = 0; + virtual std::unique_ptr makeContext( + const skgpu::graphite::ContextOptions&) = 0; bool getMaxGpuFrameLag(int *maxFrameLag) const { *maxFrameLag = kMaxFrameLag; diff --git a/tools/graphite/dawn/DawnTestContext.cpp b/tools/graphite/dawn/GraphiteDawnTestContext.cpp similarity index 93% rename from tools/graphite/dawn/DawnTestContext.cpp rename to tools/graphite/dawn/GraphiteDawnTestContext.cpp index 0ed82d69ed0f..0e1a294557f6 100644 --- a/tools/graphite/dawn/DawnTestContext.cpp +++ b/tools/graphite/dawn/GraphiteDawnTestContext.cpp @@ -25,13 +25,11 @@ std::unique_ptr DawnTestContext::Make(std::optional(); - - gInstance->DiscoverDefaultPhysicalDevices(); DawnProcTable backendProcs = dawn::native::GetProcs(); dawnProcSetProcs(&backendProcs); - std::vector adapters = gInstance->GetAdapters(); + gInstance = std::make_unique(); + std::vector adapters = gInstance->EnumerateAdapters(); SkASSERT(!adapters.empty()); // Sort adapters by adapterType(DiscreteGPU, IntegratedGPU, CPU) and // backendType(WebGPU, D3D11, D3D12, Metal, Vulkan, OpenGL, OpenGLES). @@ -105,12 +103,12 @@ std::unique_ptr DawnTestContext::Make(std::optional(new DawnTestContext(backendContext)); } -std::unique_ptr DawnTestContext::makeContext() { - skgpu::graphite::ContextOptions contextOptions; - contextOptions.fStoreContextRefInRecorder = true; // Needed to make synchronous readPixels work - return skgpu::graphite::ContextFactory::MakeDawn(fBackendContext, - contextOptions); +std::unique_ptr DawnTestContext::makeContext( + const skgpu::graphite::ContextOptions& options) { + skgpu::graphite::ContextOptions revisedOptions(options); + revisedOptions.fStoreContextRefInRecorder = true; // Needed to make synchronous readPixels work + + return skgpu::graphite::ContextFactory::MakeDawn(fBackendContext, revisedOptions); } } // namespace skiatest::graphite - diff --git a/tools/graphite/dawn/GraphiteDawnTestContext.h b/tools/graphite/dawn/GraphiteDawnTestContext.h index 7dde5ae65e7c..f33999f52ca9 100644 --- a/tools/graphite/dawn/GraphiteDawnTestContext.h +++ b/tools/graphite/dawn/GraphiteDawnTestContext.h @@ -27,7 +27,8 @@ class DawnTestContext : public GraphiteTestContext { skgpu::BackendApi backend() override { return skgpu::BackendApi::kDawn; } - std::unique_ptr makeContext() override; + std::unique_ptr makeContext( + const skgpu::graphite::ContextOptions&) override; const skgpu::graphite::DawnBackendContext& getBackendContext() const { return fBackendContext; diff --git a/tools/graphite/mtl/GraphiteMtlTestContext.h b/tools/graphite/mtl/GraphiteMtlTestContext.h index 1ba3dce3f9d8..088fa6e8acb2 100644 --- a/tools/graphite/mtl/GraphiteMtlTestContext.h +++ b/tools/graphite/mtl/GraphiteMtlTestContext.h @@ -22,7 +22,8 @@ class MtlTestContext : public GraphiteTestContext { skgpu::BackendApi backend() override { return skgpu::BackendApi::kMetal; } - std::unique_ptr makeContext() override; + std::unique_ptr makeContext( + const skgpu::graphite::ContextOptions&) override; const skgpu::graphite::MtlBackendContext& getBackendContext() const { return fMtl; diff --git a/tools/graphite/mtl/MtlTestContext.mm b/tools/graphite/mtl/GraphiteMtlTestContext.mm similarity index 83% rename from tools/graphite/mtl/MtlTestContext.mm rename to tools/graphite/mtl/GraphiteMtlTestContext.mm index e76cf76c1b00..31bd7896f004 100644 --- a/tools/graphite/mtl/MtlTestContext.mm +++ b/tools/graphite/mtl/GraphiteMtlTestContext.mm @@ -47,11 +47,12 @@ return std::unique_ptr(new MtlTestContext(backendContext)); } -std::unique_ptr MtlTestContext::makeContext() { - skgpu::graphite::ContextOptions contextOptions; - contextOptions.fStoreContextRefInRecorder = true; - return skgpu::graphite::ContextFactory::MakeMetal(fMtl, contextOptions); +std::unique_ptr MtlTestContext::makeContext( + const skgpu::graphite::ContextOptions& options) { + skgpu::graphite::ContextOptions revisedOptions(options); + revisedOptions.fStoreContextRefInRecorder = true; // Needed to make synchronous readPixels work + + return skgpu::graphite::ContextFactory::MakeMetal(fMtl, revisedOptions); } } // namespace skiatest::graphite - diff --git a/tools/graphite/vk/VulkanTestContext.cpp b/tools/graphite/vk/GraphiteVulkanTestContext.cpp similarity index 92% rename from tools/graphite/vk/VulkanTestContext.cpp rename to tools/graphite/vk/GraphiteVulkanTestContext.cpp index daf4463dbfd8..69d4d419ae2f 100644 --- a/tools/graphite/vk/VulkanTestContext.cpp +++ b/tools/graphite/vk/GraphiteVulkanTestContext.cpp @@ -5,7 +5,7 @@ * found in the LICENSE file. */ -#include "tools/graphite/vk/VulkanTestContext.h" +#include "tools/graphite/vk/GraphiteVulkanTestContext.h" #include "include/gpu/graphite/Context.h" #include "include/gpu/graphite/ContextOptions.h" @@ -82,10 +82,12 @@ VulkanTestContext::~VulkanTestContext() { delete fFeatures; } -std::unique_ptr VulkanTestContext::makeContext() { - skgpu::graphite::ContextOptions contextOptions; - contextOptions.fStoreContextRefInRecorder = true; - return skgpu::graphite::ContextFactory::MakeVulkan(fVulkan, contextOptions); +std::unique_ptr VulkanTestContext::makeContext( + const skgpu::graphite::ContextOptions& options) { + skgpu::graphite::ContextOptions revisedOptions(options); + revisedOptions.fStoreContextRefInRecorder = true; // Needed to make synchronous readPixels work + + return skgpu::graphite::ContextFactory::MakeVulkan(fVulkan, revisedOptions); } } // namespace skiatest::graphite diff --git a/tools/graphite/vk/VulkanTestContext.h b/tools/graphite/vk/GraphiteVulkanTestContext.h similarity index 93% rename from tools/graphite/vk/VulkanTestContext.h rename to tools/graphite/vk/GraphiteVulkanTestContext.h index 0e98161691fb..d16b5cb3b490 100644 --- a/tools/graphite/vk/VulkanTestContext.h +++ b/tools/graphite/vk/GraphiteVulkanTestContext.h @@ -22,7 +22,8 @@ class VulkanTestContext : public GraphiteTestContext { skgpu::BackendApi backend() override { return skgpu::BackendApi::kVulkan; } - std::unique_ptr makeContext() override; + std::unique_ptr makeContext( + const skgpu::graphite::ContextOptions&) override; const skgpu::VulkanBackendContext& getBackendContext() const { return fVulkan; diff --git a/tools/run-wasm-gm-tests/run-wasm-gm-tests.html b/tools/run-wasm-gm-tests/run-wasm-gm-tests.html index 476083b92034..00704df07304 100644 --- a/tools/run-wasm-gm-tests/run-wasm-gm-tests.html +++ b/tools/run-wasm-gm-tests/run-wasm-gm-tests.html @@ -244,6 +244,9 @@ 'SkSLPreserveSideEffects_GPU', 'SkSLStructFieldNoFolding_GPU', + // This SkSL test generates GLSL which violates the WebGL2 spec (b/294893925) + 'SkSLCommaExpressionsAllowInlining_GPU', + // These tests use files on disk, which is not supported for WASM 'Stream', 'StreamBuffer', diff --git a/tools/sk_app/BUILD.bazel b/tools/sk_app/BUILD.bazel index 4189c9fbf6c6..75fcb83e2a28 100644 --- a/tools/sk_app/BUILD.bazel +++ b/tools/sk_app/BUILD.bazel @@ -9,26 +9,9 @@ skia_cc_library( name = "sk_app", testonly = True, srcs = [ - "Window.cpp", - "WindowContext.cpp", - "RasterWindowContext.h", "CommandSet.cpp", - ] + select_multi( - { - "//src/gpu:dawn_backend": [ - "DawnWindowContext.h", - "DawnWindowContext.cpp", - ], - "//src/gpu:gl_backend": [ - "GLWindowContext.cpp", - "GLWindowContext.h", - ], - "//src/gpu:vulkan_backend": [ - "VulkanWindowContext.h", - "VulkanWindowContext.cpp", - ], - }, - ) + select({ + "Window.cpp", + ] + select({ "@platforms//os:linux": ["//tools/sk_app/unix:srcs"], "//conditions:default": [], # TODO(kjlubick) add Windows/Mac support @@ -36,15 +19,14 @@ skia_cc_library( hdrs = [ "Application.h", "CommandSet.h", - "DisplayParams.h", "Window.h", - "WindowContext.h", ], visibility = ["//:__subpackages__"], deps = [ "//:skia_internal", "//tools/skui", "//tools/timer", + "//tools/window", ] + select({ "@platforms//os:linux": ["//tools/sk_app/unix:deps"], "//conditions:default": [], @@ -55,21 +37,21 @@ skia_objc_library( name = "sk_app_objc", testonly = True, srcs = [ + "RasterWindowContext.h", "Window.cpp", "WindowContext.cpp", - "RasterWindowContext.h", ] + select_multi( { # TODO(kjlubick, jmbetancourt) Graphite backend - "//src/gpu:dawn_backend": [ + "//src/gpu:dawn_ganesh": [ "DawnWindowContext.h", "DawnWindowContext.cpp", ], - "//src/gpu:gl_backend": [ + "//src/gpu:gl_ganesh": [ "GLWindowContext.cpp", "GLWindowContext.h", ], - "//src/gpu:metal_backend": [ + "//src/gpu:metal_ganesh": [ "MetalWindowContext.h", "MetalWindowContext.mm", ], diff --git a/tools/sk_app/DisplayParams.h b/tools/sk_app/DisplayParams.h deleted file mode 100644 index ad71c3e244a4..000000000000 --- a/tools/sk_app/DisplayParams.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2016 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ -#ifndef DisplayParams_DEFINED -#define DisplayParams_DEFINED - -#include "include/core/SkColorSpace.h" -#include "include/core/SkImageInfo.h" -#include "include/core/SkSurfaceProps.h" -#include "include/gpu/GrContextOptions.h" - -namespace sk_app { - -struct DisplayParams { - DisplayParams() - : fColorType(kN32_SkColorType) - , fColorSpace(nullptr) - , fMSAASampleCount(1) - , fSurfaceProps(0, kRGB_H_SkPixelGeometry) - , fDisableVsync(false) - , fDelayDrawableAcquisition(false) - , fEnableBinaryArchive(false) - {} - - SkColorType fColorType; - sk_sp fColorSpace; - int fMSAASampleCount; - GrContextOptions fGrContextOptions; - SkSurfaceProps fSurfaceProps; - bool fDisableVsync; - bool fDelayDrawableAcquisition; - bool fEnableBinaryArchive; -}; - -} // namespace sk_app - -#endif diff --git a/tools/sk_app/GLWindowContext.cpp b/tools/sk_app/GLWindowContext.cpp deleted file mode 100644 index 10c56eadee57..000000000000 --- a/tools/sk_app/GLWindowContext.cpp +++ /dev/null @@ -1,98 +0,0 @@ - -/* - * Copyright 2015 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ -#include "tools/sk_app/GLWindowContext.h" - -#include "include/core/SkCanvas.h" -#include "include/core/SkSurface.h" -#include "include/gpu/GrBackendSurface.h" -#include "include/gpu/GrDirectContext.h" -#include "include/gpu/ganesh/SkSurfaceGanesh.h" -#include "src/base/SkMathPriv.h" -#include "src/gpu/ganesh/GrCaps.h" -#include "src/gpu/ganesh/GrDirectContextPriv.h" -#include "src/gpu/ganesh/gl/GrGLDefines.h" -#include "src/gpu/ganesh/gl/GrGLUtil.h" -#include "src/image/SkImage_Base.h" - -namespace sk_app { - -GLWindowContext::GLWindowContext(const DisplayParams& params) - : WindowContext(params) - , fBackendContext(nullptr) - , fSurface(nullptr) { - fDisplayParams.fMSAASampleCount = GrNextPow2(fDisplayParams.fMSAASampleCount); -} - -void GLWindowContext::initializeContext() { - SkASSERT(!fContext); - - fBackendContext = this->onInitializeContext(); - - fContext = GrDirectContext::MakeGL(fBackendContext, fDisplayParams.fGrContextOptions); - if (!fContext && fDisplayParams.fMSAASampleCount > 1) { - fDisplayParams.fMSAASampleCount /= 2; - this->initializeContext(); - return; - } -} - -void GLWindowContext::destroyContext() { - fSurface.reset(nullptr); - - if (fContext) { - // in case we have outstanding refs to this (lua?) - fContext->abandonContext(); - fContext.reset(); - } - - fBackendContext.reset(nullptr); - - this->onDestroyContext(); -} - -sk_sp GLWindowContext::getBackbufferSurface() { - if (nullptr == fSurface) { - if (fContext) { - GrGLint buffer; - GR_GL_CALL(fBackendContext.get(), GetIntegerv(GR_GL_FRAMEBUFFER_BINDING, &buffer)); - - GrGLFramebufferInfo fbInfo; - fbInfo.fFBOID = buffer; - fbInfo.fFormat = GR_GL_RGBA8; - fbInfo.fProtected = skgpu::Protected::kNo; - - GrBackendRenderTarget backendRT(fWidth, - fHeight, - fSampleCount, - fStencilBits, - fbInfo); - - fSurface = SkSurfaces::WrapBackendRenderTarget(fContext.get(), - backendRT, - kBottomLeft_GrSurfaceOrigin, - kRGBA_8888_SkColorType, - fDisplayParams.fColorSpace, - &fDisplayParams.fSurfaceProps); - } - } - - return fSurface; -} - -void GLWindowContext::resize(int w, int h) { - this->destroyContext(); - this->initializeContext(); -} - -void GLWindowContext::setDisplayParams(const DisplayParams& params) { - fDisplayParams = params; - this->destroyContext(); - this->initializeContext(); -} - -} //namespace sk_app diff --git a/tools/sk_app/GLWindowContext.h b/tools/sk_app/GLWindowContext.h deleted file mode 100644 index 95c139bb1d47..000000000000 --- a/tools/sk_app/GLWindowContext.h +++ /dev/null @@ -1,50 +0,0 @@ - -/* - * Copyright 2016 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ -#ifndef GLWindowContext_DEFINED -#define GLWindowContext_DEFINED - - -#include "include/gpu/gl/GrGLInterface.h" - -#include "include/core/SkRefCnt.h" -#include "include/core/SkSurface.h" - -#include "tools/sk_app/WindowContext.h" - -namespace sk_app { - -class GLWindowContext : public WindowContext { -public: - sk_sp getBackbufferSurface() override; - - bool isValid() override { return SkToBool(fBackendContext.get()); } - - void resize(int w, int h) override; - - void setDisplayParams(const DisplayParams& params) override; - -protected: - GLWindowContext(const DisplayParams&); - // This should be called by subclass constructor. It is also called when window/display - // parameters change. This will in turn call onInitializeContext(). - void initializeContext(); - virtual sk_sp onInitializeContext() = 0; - - // This should be called by subclass destructor. It is also called when window/display - // parameters change prior to initializing a new GL context. This will in turn call - // onDestroyContext(). - void destroyContext(); - virtual void onDestroyContext() = 0; - - sk_sp fBackendContext; - sk_sp fSurface; -}; - -} // namespace sk_app - -#endif diff --git a/tools/sk_app/Window.cpp b/tools/sk_app/Window.cpp index 05e08d72b173..cb46fa177658 100644 --- a/tools/sk_app/Window.cpp +++ b/tools/sk_app/Window.cpp @@ -9,7 +9,7 @@ #include "include/core/SkCanvas.h" #include "include/core/SkSurface.h" -#include "tools/sk_app/WindowContext.h" +#include "tools/window/WindowContext.h" #if defined(SK_GANESH) #include "include/gpu/GrDirectContext.h" @@ -57,8 +57,9 @@ bool Window::onMouse(int x, int y, skui::InputState state, skui::ModifierKey mod return this->signalLayers([=](Layer* layer) { return layer->onMouse(x, y, state, modifiers); }); } -bool Window::onMouseWheel(float delta, skui::ModifierKey modifiers) { - return this->signalLayers([=](Layer* layer) { return layer->onMouseWheel(delta, modifiers); }); +bool Window::onMouseWheel(float delta, int x, int y, skui::ModifierKey modifiers) { + return this->signalLayers( + [=](Layer* layer) { return layer->onMouseWheel(delta, x, y, modifiers); }); } bool Window::onTouch(intptr_t owner, skui::InputState state, float x, float y) { @@ -161,6 +162,17 @@ GrDirectContext* Window::directContext() const { return fWindowContext->directContext(); } +skgpu::graphite::Context* Window::graphiteContext() const { +#if defined(SK_GRAPHITE) + if (!fWindowContext) { + return nullptr; + } + return fWindowContext->graphiteContext(); +#else + return nullptr; +#endif +} + void Window::inval() { if (!fWindowContext) { return; diff --git a/tools/sk_app/Window.h b/tools/sk_app/Window.h index 2d2bbbde8f94..96e8cce54f54 100644 --- a/tools/sk_app/Window.h +++ b/tools/sk_app/Window.h @@ -11,10 +11,10 @@ #include "include/core/SkRect.h" #include "include/core/SkTypes.h" #include "include/private/base/SkTDArray.h" -#include "tools/sk_app/DisplayParams.h" #include "tools/skui/InputState.h" #include "tools/skui/Key.h" #include "tools/skui/ModifierKey.h" +#include "tools/window/DisplayParams.h" #include @@ -28,9 +28,13 @@ namespace skgpu::graphite { class Context; } -namespace sk_app { +using skwindow::DisplayParams; +namespace skwindow { class WindowContext; +} + +namespace sk_app { class Window { public: @@ -70,6 +74,9 @@ class Window { #endif #ifdef SK_VULKAN kVulkan_BackendType, +#if defined(SK_GRAPHITE) + kGraphiteVulkan_BackendType, +#endif #endif #ifdef SK_METAL kMetal_BackendType, @@ -107,7 +114,7 @@ class Window { virtual bool onChar(SkUnichar c, skui::ModifierKey) { return false; } virtual bool onKey(skui::Key, skui::InputState, skui::ModifierKey) { return false; } virtual bool onMouse(int x, int y, skui::InputState, skui::ModifierKey) { return false; } - virtual bool onMouseWheel(float delta, skui::ModifierKey) { return false; } + virtual bool onMouseWheel(float delta, int x, int y, skui::ModifierKey) { return false; } virtual bool onTouch(intptr_t owner, skui::InputState, float x, float y) { return false; } // Platform-detected gesture events virtual bool onFling(skui::InputState state) { return false; } @@ -131,7 +138,7 @@ class Window { bool onChar(SkUnichar c, skui::ModifierKey modifiers); bool onKey(skui::Key key, skui::InputState state, skui::ModifierKey modifiers); bool onMouse(int x, int y, skui::InputState state, skui::ModifierKey modifiers); - bool onMouseWheel(float delta, skui::ModifierKey modifiers); + bool onMouseWheel(float delta, int x, int y, skui::ModifierKey modifiers); bool onTouch(intptr_t owner, skui::InputState state, float x, float y); // multi-owner = multi-touch // Platform-detected gesture events bool onFling(skui::InputState state); @@ -163,7 +170,7 @@ class Window { DisplayParams fRequestedDisplayParams; bool fIsActive = true; - std::unique_ptr fWindowContext; + std::unique_ptr fWindowContext; virtual void onInval() = 0; diff --git a/tools/sk_app/WindowContext.cpp b/tools/sk_app/WindowContext.cpp deleted file mode 100644 index b1e70004c14c..000000000000 --- a/tools/sk_app/WindowContext.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2020 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#include "tools/sk_app/WindowContext.h" - -#include "include/gpu/GrDirectContext.h" -#if defined(SK_GRAPHITE) -#include "include/gpu/graphite/Context.h" -#include "include/gpu/graphite/Recorder.h" -#endif - -namespace sk_app { - -WindowContext::WindowContext(const DisplayParams& params) - : fDisplayParams(params) {} - -WindowContext::~WindowContext() {} - -void WindowContext::swapBuffers() { -#if defined(SK_GRAPHITE) - if (fGraphiteContext) { - SkASSERT(fGraphiteRecorder); - std::unique_ptr recording = fGraphiteRecorder->snap(); - if (recording) { - skgpu::graphite::InsertRecordingInfo info; - info.fRecording = recording.get(); - fGraphiteContext->insertRecording(info); - fGraphiteContext->submit(skgpu::graphite::SyncToCpu::kNo); - } - } -#endif - this->onSwapBuffers(); -} - -} //namespace sk_app diff --git a/tools/sk_app/WindowContext.h b/tools/sk_app/WindowContext.h deleted file mode 100644 index aa24dc598439..000000000000 --- a/tools/sk_app/WindowContext.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright 2016 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ -#ifndef WindowContext_DEFINED -#define WindowContext_DEFINED - -#include "include/core/SkRefCnt.h" -#include "include/core/SkSurfaceProps.h" -#include "include/gpu/GrTypes.h" -#include "tools/sk_app/DisplayParams.h" - -class GrDirectContext; -class SkSurface; -#if defined(SK_GRAPHITE) -namespace skgpu::graphite { -class Context; -class Recorder; -} -#endif - -namespace sk_app { - -class WindowContext { -public: - WindowContext(const DisplayParams&); - - virtual ~WindowContext(); - - virtual sk_sp getBackbufferSurface() = 0; - - void swapBuffers(); - - virtual bool isValid() = 0; - - virtual void resize(int w, int h) = 0; - - virtual void activate(bool isActive) {} - - const DisplayParams& getDisplayParams() { return fDisplayParams; } - virtual void setDisplayParams(const DisplayParams& params) = 0; - - GrDirectContext* directContext() const { return fContext.get(); } -#if defined(SK_GRAPHITE) - skgpu::graphite::Context* graphiteContext() const { return fGraphiteContext.get(); } - skgpu::graphite::Recorder* graphiteRecorder() const { return fGraphiteRecorder.get(); } -#endif - - int width() const { return fWidth; } - int height() const { return fHeight; } - SkISize dimensions() const { return {fWidth, fHeight}; } - int sampleCount() const { return fSampleCount; } - int stencilBits() const { return fStencilBits; } - -protected: - virtual bool isGpuContext() { return true; } - - virtual void onSwapBuffers() = 0; - - sk_sp fContext; -#if defined(SK_GRAPHITE) - std::unique_ptr fGraphiteContext; - std::unique_ptr fGraphiteRecorder; -#endif - - int fWidth; - int fHeight; - DisplayParams fDisplayParams; - - // parameters obtained from the native window - // Note that the platform .cpp file is responsible for - // initializing fSampleCount and fStencilBits! - int fSampleCount = 1; - int fStencilBits = 0; -}; - -} // namespace sk_app - -#endif diff --git a/tools/sk_app/android/GLWindowContext_android.cpp b/tools/sk_app/android/GLWindowContext_android.cpp deleted file mode 100644 index e024d6b3775b..000000000000 --- a/tools/sk_app/android/GLWindowContext_android.cpp +++ /dev/null @@ -1,154 +0,0 @@ - -/* - * Copyright 2016 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#include -#include -#include "include/gpu/gl/GrGLInterface.h" -#include "tools/sk_app/GLWindowContext.h" -#include "tools/sk_app/android/WindowContextFactory_android.h" - -using sk_app::GLWindowContext; -using sk_app::DisplayParams; - -namespace { -class GLWindowContext_android : public GLWindowContext { -public: - - GLWindowContext_android(ANativeWindow*, const DisplayParams&); - - ~GLWindowContext_android() override; - - sk_sp onInitializeContext() override; - void onDestroyContext() override; - -private: - void onSwapBuffers() override; - - EGLDisplay fDisplay; - EGLContext fEGLContext; - EGLSurface fSurfaceAndroid; - - // For setDisplayParams and resize which call onInitializeContext with null platformData - ANativeWindow* fNativeWindow = nullptr; -}; - -GLWindowContext_android::GLWindowContext_android(ANativeWindow* window, - const DisplayParams& params) - : GLWindowContext(params) - , fDisplay(EGL_NO_DISPLAY) - , fEGLContext(EGL_NO_CONTEXT) - , fSurfaceAndroid(EGL_NO_SURFACE) - , fNativeWindow(window) { - - // any config code here (particularly for msaa)? - - this->initializeContext(); -} - -GLWindowContext_android::~GLWindowContext_android() { - this->destroyContext(); -} - -sk_sp GLWindowContext_android::onInitializeContext() { - fWidth = ANativeWindow_getWidth(fNativeWindow); - fHeight = ANativeWindow_getHeight(fNativeWindow); - - fDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY); - - EGLint majorVersion; - EGLint minorVersion; - eglInitialize(fDisplay, &majorVersion, &minorVersion); - - SkAssertResult(eglBindAPI(EGL_OPENGL_ES_API)); - - EGLint numConfigs = 0; - EGLint eglSampleCnt = fDisplayParams.fMSAASampleCount > 1 ? fDisplayParams.fMSAASampleCount > 1 - : 0; - const EGLint configAttribs[] = { - EGL_SURFACE_TYPE, EGL_PBUFFER_BIT, - EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, - EGL_RED_SIZE, 8, - EGL_GREEN_SIZE, 8, - EGL_BLUE_SIZE, 8, - EGL_ALPHA_SIZE, 8, - EGL_STENCIL_SIZE, 8, - EGL_SAMPLE_BUFFERS, eglSampleCnt ? 1 : 0, - EGL_SAMPLES, eglSampleCnt, - EGL_NONE - }; - - EGLConfig surfaceConfig; - SkAssertResult(eglChooseConfig(fDisplay, configAttribs, &surfaceConfig, 1, &numConfigs)); - SkASSERT(numConfigs > 0); - - static const EGLint kEGLContextAttribsForOpenGLES[] = { - EGL_CONTEXT_CLIENT_VERSION, 2, - EGL_NONE - }; - fEGLContext = eglCreateContext( - fDisplay, surfaceConfig, nullptr, kEGLContextAttribsForOpenGLES); - SkASSERT(EGL_NO_CONTEXT != fEGLContext); - -// SkDebugf("EGL: %d.%d", majorVersion, minorVersion); -// SkDebugf("Vendor: %s", eglQueryString(fDisplay, EGL_VENDOR)); -// SkDebugf("Extensions: %s", eglQueryString(fDisplay, EGL_EXTENSIONS)); - - fSurfaceAndroid = eglCreateWindowSurface(fDisplay, surfaceConfig, fNativeWindow, nullptr); - SkASSERT(EGL_NO_SURFACE != fSurfaceAndroid); - - SkAssertResult(eglMakeCurrent(fDisplay, fSurfaceAndroid, fSurfaceAndroid, fEGLContext)); - // GLWindowContext::initializeContext will call GrGLMakeNativeInterface so we - // won't call it here. - - glClearStencil(0); - glClearColor(0, 0, 0, 0); - glStencilMask(0xffffffff); - glClear(GL_STENCIL_BUFFER_BIT | GL_COLOR_BUFFER_BIT); - - eglGetConfigAttrib(fDisplay, surfaceConfig, EGL_STENCIL_SIZE, &fStencilBits); - eglGetConfigAttrib(fDisplay, surfaceConfig, EGL_SAMPLES, &fSampleCount); - fSampleCount = std::max(fSampleCount, 1); - - eglSwapInterval(fDisplay, fDisplayParams.fDisableVsync ? 0 : 1); - - return GrGLMakeNativeInterface(); -} - -void GLWindowContext_android::onDestroyContext() { - if (!fDisplay || !fEGLContext || !fSurfaceAndroid) { - return; - } - eglMakeCurrent(fDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); - SkAssertResult(eglDestroySurface(fDisplay, fSurfaceAndroid)); - SkAssertResult(eglDestroyContext(fDisplay, fEGLContext)); - fEGLContext = EGL_NO_CONTEXT; - fSurfaceAndroid = EGL_NO_SURFACE; -} - -void GLWindowContext_android::onSwapBuffers() { - if (fDisplay && fEGLContext && fSurfaceAndroid) { - eglSwapBuffers(fDisplay, fSurfaceAndroid); - } -} - -} // anonymous namespace - -namespace sk_app { -namespace window_context_factory { - -std::unique_ptr MakeGLForAndroid(ANativeWindow* window, - const DisplayParams& params) { - std::unique_ptr ctx(new GLWindowContext_android(window, params)); - if (!ctx->isValid()) { - return nullptr; - } - return ctx; -} - -} // namespace window_context_factory -} // namespace sk_app diff --git a/tools/sk_app/android/VulkanWindowContext_android.cpp b/tools/sk_app/android/VulkanWindowContext_android.cpp deleted file mode 100644 index 5346df04abad..000000000000 --- a/tools/sk_app/android/VulkanWindowContext_android.cpp +++ /dev/null @@ -1,58 +0,0 @@ - -/* - * Copyright 2016 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#include "tools/sk_app/android/WindowContextFactory_android.h" - -#include "tools/sk_app/VulkanWindowContext.h" - -#include "tools/gpu/vk/VkTestUtils.h" - -namespace sk_app { - -namespace window_context_factory { - -std::unique_ptr MakeVulkanForAndroid(ANativeWindow* window, - const DisplayParams& params) { - PFN_vkGetInstanceProcAddr instProc; - if (!sk_gpu_test::LoadVkLibraryAndGetProcAddrFuncs(&instProc)) { - return nullptr; - } - - auto createVkSurface = [window, instProc] (VkInstance instance) -> VkSurfaceKHR { - PFN_vkCreateAndroidSurfaceKHR createAndroidSurfaceKHR = - (PFN_vkCreateAndroidSurfaceKHR) instProc(instance, "vkCreateAndroidSurfaceKHR"); - - if (!window) { - return VK_NULL_HANDLE; - } - VkSurfaceKHR surface; - - VkAndroidSurfaceCreateInfoKHR surfaceCreateInfo; - memset(&surfaceCreateInfo, 0, sizeof(VkAndroidSurfaceCreateInfoKHR)); - surfaceCreateInfo.sType = VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR; - surfaceCreateInfo.pNext = nullptr; - surfaceCreateInfo.flags = 0; - surfaceCreateInfo.window = window; - - VkResult res = createAndroidSurfaceKHR(instance, &surfaceCreateInfo, - nullptr, &surface); - return (VK_SUCCESS == res) ? surface : VK_NULL_HANDLE; - }; - - auto canPresent = [](VkInstance, VkPhysicalDevice, uint32_t) { return true; }; - - std::unique_ptr ctx( - new VulkanWindowContext(params, createVkSurface, canPresent, instProc)); - if (!ctx->isValid()) { - return nullptr; - } - return ctx; -} - -} // namespace window_context_factory -} // namespace sk_app diff --git a/tools/sk_app/android/WindowContextFactory_android.h b/tools/sk_app/android/WindowContextFactory_android.h deleted file mode 100644 index f7f234987898..000000000000 --- a/tools/sk_app/android/WindowContextFactory_android.h +++ /dev/null @@ -1,33 +0,0 @@ - -/* - * Copyright 2016 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#ifndef WindowContextFactory_android_DEFINED -#define WindowContextFactory_android_DEFINED - -#include - -#include - -namespace sk_app { - -class WindowContext; -struct DisplayParams; - -namespace window_context_factory { - -std::unique_ptr MakeVulkanForAndroid(ANativeWindow*, const DisplayParams&); - -std::unique_ptr MakeGLForAndroid(ANativeWindow*, const DisplayParams&); - -std::unique_ptr MakeRasterForAndroid(ANativeWindow*, const DisplayParams&); - -} // namespace window_context_factory - -} // namespace sk_app - -#endif diff --git a/tools/sk_app/android/Window_android.cpp b/tools/sk_app/android/Window_android.cpp index 129686b0f64d..ed5d897757d2 100644 --- a/tools/sk_app/android/Window_android.cpp +++ b/tools/sk_app/android/Window_android.cpp @@ -5,9 +5,9 @@ * found in the LICENSE file. */ -#include "tools/sk_app/WindowContext.h" -#include "tools/sk_app/android/WindowContextFactory_android.h" #include "tools/sk_app/android/Window_android.h" +#include "tools/window/WindowContext.h" +#include "tools/window/android/WindowContextFactory_android.h" namespace sk_app { @@ -50,20 +50,17 @@ void Window_android::initDisplay(ANativeWindow* window) { #ifdef SK_GL case kNativeGL_BackendType: default: - fWindowContext = - window_context_factory::MakeGLForAndroid(window, fRequestedDisplayParams); + fWindowContext = skwindow::MakeGLForAndroid(window, fRequestedDisplayParams); break; #else default: #endif case kRaster_BackendType: - fWindowContext = - window_context_factory::MakeRasterForAndroid(window, fRequestedDisplayParams); + fWindowContext = skwindow::MakeRasterForAndroid(window, fRequestedDisplayParams); break; #ifdef SK_VULKAN case kVulkan_BackendType: - fWindowContext = - window_context_factory::MakeVulkanForAndroid(window, fRequestedDisplayParams); + fWindowContext = skwindow::MakeVulkanForAndroid(window, fRequestedDisplayParams); break; #endif } diff --git a/tools/sk_app/ios/Window_ios.mm b/tools/sk_app/ios/Window_ios.mm index 1ff7d1ab4dd6..5577849352e3 100644 --- a/tools/sk_app/ios/Window_ios.mm +++ b/tools/sk_app/ios/Window_ios.mm @@ -5,8 +5,8 @@ * found in the LICENSE file. */ -#include "tools/sk_app/ios/WindowContextFactory_ios.h" #include "tools/sk_app/ios/Window_ios.h" +#include "tools/window/ios/WindowContextFactory_ios.h" #if __has_feature(objc_arc) #error "File should not be compiled with ARC." @@ -80,21 +80,21 @@ - (WindowViewController*)initWithWindow:(sk_app::Window_ios*)initWindow; bool Window_ios::attach(BackendType attachType) { this->initWindow(); - window_context_factory::IOSWindowInfo info; + skwindow::IOSWindowInfo info; info.fWindow = this; info.fViewController = fWindow.rootViewController; switch (attachType) { #ifdef SK_METAL case kMetal_BackendType: - fWindowContext = MakeMetalForIOS(info, fRequestedDisplayParams); + fWindowContext = skwindow::MakeMetalForIOS(info, fRequestedDisplayParams); break; #endif #ifdef SK_GL case kNativeGL_BackendType: - fWindowContext = MakeGLForIOS(info, fRequestedDisplayParams); + fWindowContext = skwindow::MakeGLForIOS(info, fRequestedDisplayParams); break; case kRaster_BackendType: - fWindowContext = MakeRasterForIOS(info, fRequestedDisplayParams); + fWindowContext = skwindow::MakeRasterForIOS(info, fRequestedDisplayParams); break; #endif default: diff --git a/tools/sk_app/mac/BUILD.bazel b/tools/sk_app/mac/BUILD.bazel index 71e40984af97..b165681ba8e9 100644 --- a/tools/sk_app/mac/BUILD.bazel +++ b/tools/sk_app/mac/BUILD.bazel @@ -10,14 +10,14 @@ skia_filegroup( srcs = [ "RasterWindowContext_mac.mm", "WindowContextFactory_mac.h", - "Window_mac.mm", "Window_mac.h", + "Window_mac.mm", "main_mac.mm", ] + select({ # TODO(kjlubick, jmbetancourt) Graphite backend - "//src/gpu:gl_backend": ["GLWindowContext_mac.mm"], - "//src/gpu:dawn_backend": ["DawnMTLWindowContext_mac.mm"], - "//src/gpu:metal_backend": ["MetalWindowContext_mac.mm"], + "//src/gpu:gl_ganesh": ["GLWindowContext_mac.mm"], + "//src/gpu:dawn_ganesh": ["DawnMTLWindowContext_mac.mm"], + "//src/gpu:metal_ganesh": ["MetalWindowContext_mac.mm"], "//conditions:default": [], }), visibility = ["//tools/sk_app:__pkg__"], diff --git a/tools/sk_app/mac/Window_mac.mm b/tools/sk_app/mac/Window_mac.mm index 53b209b4d5c5..1f67bff12e64 100644 --- a/tools/sk_app/mac/Window_mac.mm +++ b/tools/sk_app/mac/Window_mac.mm @@ -8,9 +8,9 @@ #include #include "include/core/SkTypes.h" -#include "tools/sk_app/mac/WindowContextFactory_mac.h" #include "tools/sk_app/mac/Window_mac.h" #include "tools/skui/ModifierKey.h" +#include "tools/window/mac/WindowContextFactory_mac.h" @interface WindowDelegate : NSObject @@ -119,7 +119,7 @@ - (MainView*)initWithWindow:(sk_app::Window_mac*)initWindow; bool Window_mac::attach(BackendType attachType) { this->initWindow(); - window_context_factory::MacWindowInfo info; + skwindow::MacWindowInfo info; info.fMainView = [fWindow contentView]; switch (attachType) { #ifdef SK_DAWN @@ -164,7 +164,7 @@ - (MainView*)initWithWindow:(sk_app::Window_mac*)initWindow; } float Window_mac::scaleFactor() const { - return sk_app::GetBackingScaleFactor(fWindow.contentView); + return skwindow::GetBackingScaleFactor(fWindow.contentView); } void Window_mac::PaintWindows() { @@ -191,7 +191,7 @@ - (WindowDelegate*)initWithWindow:(sk_app::Window_mac *)initWindow { - (void)windowDidResize:(NSNotification *)notification { NSView* view = fWindow->window().contentView; - CGFloat scale = sk_app::GetBackingScaleFactor(view); + CGFloat scale = skwindow::GetBackingScaleFactor(view); fWindow->onResize(view.bounds.size.width * scale, view.bounds.size.height * scale); fWindow->inval(); } @@ -413,7 +413,7 @@ -(void)flagsChanged:(NSEvent *)event { - (void)mouseDown:(NSEvent *)event { NSView* view = fWindow->window().contentView; - CGFloat backingScaleFactor = sk_app::GetBackingScaleFactor(view); + CGFloat backingScaleFactor = skwindow::GetBackingScaleFactor(view); skui::ModifierKey modifiers = [self updateModifierKeys:event]; @@ -425,7 +425,7 @@ - (void)mouseDown:(NSEvent *)event { - (void)mouseUp:(NSEvent *)event { NSView* view = fWindow->window().contentView; - CGFloat backingScaleFactor = sk_app::GetBackingScaleFactor(view); + CGFloat backingScaleFactor = skwindow::GetBackingScaleFactor(view); skui::ModifierKey modifiers = [self updateModifierKeys:event]; @@ -442,7 +442,7 @@ - (void)mouseDragged:(NSEvent *)event { - (void)mouseMoved:(NSEvent *)event { NSView* view = fWindow->window().contentView; - CGFloat backingScaleFactor = sk_app::GetBackingScaleFactor(view); + CGFloat backingScaleFactor = skwindow::GetBackingScaleFactor(view); skui::ModifierKey modifiers = [self updateModifierKeys:event]; @@ -453,10 +453,18 @@ - (void)mouseMoved:(NSEvent *)event { } - (void)scrollWheel:(NSEvent *)event { + NSView* view = fWindow->window().contentView; + CGFloat backingScaleFactor = skwindow::GetBackingScaleFactor(view); + skui::ModifierKey modifiers = [self updateModifierKeys:event]; // TODO: support hasPreciseScrollingDeltas? - fWindow->onMouseWheel([event scrollingDeltaY], modifiers); + const NSPoint pos = [event locationInWindow]; + const NSRect rect = [view frame]; + fWindow->onMouseWheel([event scrollingDeltaY], + pos.x * backingScaleFactor, + (rect.size.height - pos.y) * backingScaleFactor, + modifiers); } - (void)drawRect:(NSRect)rect { diff --git a/tools/sk_app/unix/BUILD.bazel b/tools/sk_app/unix/BUILD.bazel index 742ba05b1e8b..c2475e77ffd6 100644 --- a/tools/sk_app/unix/BUILD.bazel +++ b/tools/sk_app/unix/BUILD.bazel @@ -9,27 +9,20 @@ skia_filegroup( name = "srcs", testonly = True, srcs = [ - "RasterWindowContext_unix.cpp", - "WindowContextFactory_unix.h", "Window_unix.cpp", "Window_unix.h", "keysym2ucs.c", "keysym2ucs.h", "main_unix.cpp", - ] + select({ - "//src/gpu:dawn_backend": ["DawnVulkanWindowContext_unix.cpp"], - "//src/gpu:gl_backend": ["GLWindowContext_unix.cpp"], - "//src/gpu:vulkan_backend": ["VulkanWindowContext_unix.cpp"], - "//conditions:default": [], - }), + ], visibility = ["//tools/sk_app:__pkg__"], ) selects.config_setting_group( name = "dawn_or_vulkan", match_any = [ - "//src/gpu:dawn_backend", - "//src/gpu:vulkan_backend", + "//src/gpu:dawn_ganesh", + "//src/gpu:vulkan_ganesh", ], ) diff --git a/tools/sk_app/unix/Window_unix.cpp b/tools/sk_app/unix/Window_unix.cpp index ba4747d99c9f..cb7452d83fa5 100644 --- a/tools/sk_app/unix/Window_unix.cpp +++ b/tools/sk_app/unix/Window_unix.cpp @@ -5,13 +5,13 @@ * found in the LICENSE file. */ -#include "tools/sk_app/unix/WindowContextFactory_unix.h" +#include "tools/window/unix/WindowContextFactory_unix.h" #include "src/base/SkUTF.h" -#include "tools/sk_app/WindowContext.h" #include "tools/sk_app/unix/Window_unix.h" #include "tools/skui/ModifierKey.h" #include "tools/timer/Timer.h" +#include "tools/window/WindowContext.h" extern "C" { #include "tools/sk_app/unix/keysym2ucs.h" @@ -268,10 +268,10 @@ bool Window_unix::handleEvent(const XEvent& event) { skui::InputState::kDown, get_modifiers(event)); break; case Button4: - this->onMouseWheel(1.0f, get_modifiers(event)); + this->onMouseWheel(1.0f, 0, 0, get_modifiers(event)); break; case Button5: - this->onMouseWheel(-1.0f, get_modifiers(event)); + this->onMouseWheel(-1.0f, 0, 0, get_modifiers(event)); break; } break; @@ -380,7 +380,7 @@ bool Window_unix::attach(BackendType attachType) { this->initWindow(fDisplay); - window_context_factory::XlibWindowInfo winInfo; + skwindow::XlibWindowInfo winInfo; winInfo.fDisplay = fDisplay; winInfo.fWindow = fWindow; winInfo.fFBConfig = fFBConfig; @@ -397,32 +397,32 @@ bool Window_unix::attach(BackendType attachType) { switch (attachType) { #ifdef SK_DAWN case kDawn_BackendType: - fWindowContext = - window_context_factory::MakeDawnVulkanForXlib(winInfo, fRequestedDisplayParams); + fWindowContext = skwindow::MakeDawnVulkanForXlib(winInfo, fRequestedDisplayParams); break; #endif #if defined(SK_DAWN) && defined(SK_GRAPHITE) case kGraphiteDawn_BackendType: - fWindowContext = - window_context_factory::MakeGraphiteDawnVulkanForXlib(winInfo, - fRequestedDisplayParams); + fWindowContext = skwindow::MakeGraphiteDawnVulkanForXlib(winInfo, + fRequestedDisplayParams); break; #endif #ifdef SK_VULKAN case kVulkan_BackendType: - fWindowContext = - window_context_factory::MakeVulkanForXlib(winInfo, fRequestedDisplayParams); + fWindowContext = skwindow::MakeVulkanForXlib(winInfo, fRequestedDisplayParams); + break; +#endif +#if defined(SK_VULKAN) && defined(SK_GRAPHITE) + case kGraphiteVulkan_BackendType: + fWindowContext = skwindow::MakeGraphiteVulkanForXlib(winInfo, fRequestedDisplayParams); break; #endif #ifdef SK_GL case kNativeGL_BackendType: - fWindowContext = - window_context_factory::MakeGLForXlib(winInfo, fRequestedDisplayParams); + fWindowContext = skwindow::MakeGLForXlib(winInfo, fRequestedDisplayParams); break; #endif case kRaster_BackendType: - fWindowContext = - window_context_factory::MakeRasterForXlib(winInfo, fRequestedDisplayParams); + fWindowContext = skwindow::MakeRasterForXlib(winInfo, fRequestedDisplayParams); break; } this->onBackendCreated(); diff --git a/tools/sk_app/win/Window_win.cpp b/tools/sk_app/win/Window_win.cpp index 1db0a5977ef5..e51641e2107a 100644 --- a/tools/sk_app/win/Window_win.cpp +++ b/tools/sk_app/win/Window_win.cpp @@ -12,12 +12,12 @@ #include #include "src/base/SkUTF.h" -#include "tools/sk_app/WindowContext.h" -#include "tools/sk_app/win/WindowContextFactory_win.h" +#include "tools/window/WindowContext.h" +#include "tools/window/win/WindowContextFactory_win.h" #include "tools/skui/ModifierKey.h" #ifdef SK_VULKAN -#include "tools/sk_app/VulkanWindowContext.h" +#include "tools/window/VulkanWindowContext.h" #endif namespace sk_app { @@ -294,10 +294,14 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) get_modifiers(message, wParam, lParam)); } break; - case WM_MOUSEWHEEL: + case WM_MOUSEWHEEL: { + int xPos = GET_X_LPARAM(lParam); + int yPos = GET_Y_LPARAM(lParam); eventHandled = window->onMouseWheel(GET_WHEEL_DELTA_WPARAM(wParam) > 0 ? +1.0f : -1.0f, + xPos, + yPos, get_modifiers(message, wParam, lParam)); - break; + } break; case WM_TOUCH: { uint16_t numInputs = LOWORD(wParam); @@ -350,41 +354,40 @@ bool Window_win::attach(BackendType attachType) { switch (attachType) { #ifdef SK_GL case kNativeGL_BackendType: - fWindowContext = window_context_factory::MakeGLForWin(fHWnd, fRequestedDisplayParams); + fWindowContext = skwindow::MakeGLForWin(fHWnd, fRequestedDisplayParams); break; #endif #if SK_ANGLE case kANGLE_BackendType: - fWindowContext = - window_context_factory::MakeANGLEForWin(fHWnd, fRequestedDisplayParams); + fWindowContext = skwindow::MakeANGLEForWin(fHWnd, fRequestedDisplayParams); break; #endif #ifdef SK_DAWN case kDawn_BackendType: - fWindowContext = - window_context_factory::MakeDawnD3D12ForWin(fHWnd, fRequestedDisplayParams); + fWindowContext = skwindow::MakeDawnD3D12ForWin(fHWnd, fRequestedDisplayParams); break; #if defined(SK_GRAPHITE) case kGraphiteDawn_BackendType: - fWindowContext = window_context_factory::MakeGraphiteDawnD3D12ForWin( - fHWnd, fRequestedDisplayParams); + fWindowContext = skwindow::MakeGraphiteDawnD3D12ForWin(fHWnd, fRequestedDisplayParams); break; #endif #endif case kRaster_BackendType: - fWindowContext = - window_context_factory::MakeRasterForWin(fHWnd, fRequestedDisplayParams); + fWindowContext = skwindow::MakeRasterForWin(fHWnd, fRequestedDisplayParams); break; #ifdef SK_VULKAN case kVulkan_BackendType: - fWindowContext = - window_context_factory::MakeVulkanForWin(fHWnd, fRequestedDisplayParams); + fWindowContext = skwindow::MakeVulkanForWin(fHWnd, fRequestedDisplayParams); + break; +#if defined(SK_GRAPHITE) + case kGraphiteVulkan_BackendType: + fWindowContext = skwindow::MakeGraphiteVulkanForWin(fHWnd, fRequestedDisplayParams); break; #endif +#endif #ifdef SK_DIRECT3D case kDirect3D_BackendType: - fWindowContext = - window_context_factory::MakeD3D12ForWin(fHWnd, fRequestedDisplayParams); + fWindowContext = skwindow::MakeD3D12ForWin(fHWnd, fRequestedDisplayParams); break; #endif } diff --git a/tools/skpbench/README.md b/tools/skpbench/README.md index 7aaf700ba17e..95841f3fb999 100644 --- a/tools/skpbench/README.md +++ b/tools/skpbench/README.md @@ -60,37 +60,6 @@ Output appears in the following format `accum` is the time taken to draw all frames, divided by the number of frames. `metric` specifies that the unit is ms (milliseconds per frame) -## MSKP corpus - -A manually collected corpus of MSKPs from around 30 top apps (using skia via HWUI) and of about 20 -actions in RenderEngine exists in a google cloud storage folder managed by skia/infra/bots/assets/mskp/upload.py - -To download the fileset, first determine the highest current version of the fileset - -``` -gsutil ls gs://skia-assets/assets/mskp/ -``` - -Download the latest version. - -``` -gsutil cp gs://skia-assets/assets/mskp/5.zip ~/Downloads -``` - -Unzip the archive and adb push it to the device. - -To upload a new version of the corpus, use the steps above to download and unzip the last version, change the -content however you need, then Use the upload tool, passing the directory of the altered archive (not a zip file). -Note that you must provide it as an absolute path. - -``` -python upload.py --target_dir=/home/nifong/scratch/new_mskps -``` - -The upload script should print a version number. -Finally, submit something like https://skia-review.googlesource.com/c/skia/+/304376 -to point jobs at the new version. - ## Production skpbench is run as a tryjob from gerrit, where it uploads the results to perf.skia.org. diff --git a/tools/sksl-minify/SkSLMinify.cpp b/tools/sksl-minify/SkSLMinify.cpp index f2cf08c69873..efddabf0da2f 100644 --- a/tools/sksl-minify/SkSLMinify.cpp +++ b/tools/sksl-minify/SkSLMinify.cpp @@ -10,7 +10,6 @@ #include "src/base/SkStringView.h" #include "src/core/SkCpu.h" #include "src/core/SkOpts.h" -#include "src/opts/SkVM_opts.h" #include "src/sksl/SkSLCompiler.h" #include "src/sksl/SkSLFileOutputStream.h" #include "src/sksl/SkSLLexer.h" @@ -45,9 +44,6 @@ void SkDebugf(const char format[], ...) { namespace SkOpts { size_t raster_pipeline_highp_stride = 1; -#if defined(SK_ENABLE_SKVM) - decltype(interpret_skvm) interpret_skvm = SK_OPTS_NS::interpret_skvm; -#endif } static std::string base_name(const std::string& path) { @@ -117,13 +113,11 @@ static std::forward_list> compile_module_lis const SkSL::Module* parent = modules.empty() ? SkSL::ModuleLoader::Get().rootModule() : modules.front().get(); - std::unique_ptr m = - compiler.compileModule(kind, - modulePath->c_str(), - std::move(moduleSource), - parent, - SkSL::ModuleLoader::Get().coreModifiers(), - /*shouldInline=*/false); + std::unique_ptr m = compiler.compileModule(kind, + modulePath->c_str(), + std::move(moduleSource), + parent, + /*shouldInline=*/false); if (!m) { return {}; } diff --git a/tools/skslc/Main.cpp b/tools/skslc/Main.cpp index 1a02f9000de5..ba6ec50dc59f 100644 --- a/tools/skslc/Main.cpp +++ b/tools/skslc/Main.cpp @@ -11,7 +11,6 @@ #include "src/base/SkStringView.h" #include "src/core/SkCpu.h" #include "src/core/SkOpts.h" -#include "src/opts/SkVM_opts.h" #include "src/sksl/SkSLCompiler.h" #include "src/sksl/SkSLFileOutputStream.h" #include "src/sksl/SkSLProgramSettings.h" @@ -20,7 +19,6 @@ #include "src/sksl/codegen/SkSLPipelineStageCodeGenerator.h" #include "src/sksl/codegen/SkSLRasterPipelineBuilder.h" #include "src/sksl/codegen/SkSLRasterPipelineCodeGenerator.h" -#include "src/sksl/codegen/SkSLVMCodeGenerator.h" #include "src/sksl/ir/SkSLFunctionDeclaration.h" #include "src/sksl/ir/SkSLProgram.h" #include "src/sksl/ir/SkSLVarDeclarations.h" @@ -45,9 +43,6 @@ void SkDebugf(const char format[], ...) { namespace SkOpts { size_t raster_pipeline_highp_stride = 1; -#if defined(SK_ENABLE_SKVM) - decltype(interpret_skvm) interpret_skvm = SK_OPTS_NS::interpret_skvm; -#endif } static std::unique_ptr as_SkWStream(SkSL::OutputStream& s) { @@ -525,7 +520,7 @@ static ResultCode process_command(SkSpan args) { } else if (skstd::ends_with(inputPath, ".rts")) { kind = SkSL::ProgramKind::kRuntimeShader; } else { - printf("input filename must end in '.vert', '.frag', '.rtb', '.rtcf', " + printf("input filename must end in '.vert', '.frag', '.compute', '.rtb', '.rtcf', " "'.rts' or '.sksl'\n"); return ResultCode::kInputError; } @@ -584,7 +579,6 @@ static ResultCode process_command(SkSpan args) { return ResultCode::kSuccess; }; -#if defined(SK_ENABLE_SKVM) || defined(SK_ENABLE_SKSL_IN_RASTER_PIPELINE) auto compileProgramAsRuntimeShader = [&](const auto& writeFn) -> ResultCode { if (kind == SkSL::ProgramKind::kVertex) { emitCompileError("Runtime shaders do not support vertex programs\n"); @@ -596,7 +590,6 @@ static ResultCode process_command(SkSpan args) { } return compileProgram(writeFn); }; -#endif if (skstd::ends_with(outputPath, ".spirv")) { return compileProgram( @@ -604,7 +597,8 @@ static ResultCode process_command(SkSpan args) { return compiler.toSPIRV(program, out); }); } else if (skstd::ends_with(outputPath, ".asm.frag") || - skstd::ends_with(outputPath, ".asm.vert")) { + skstd::ends_with(outputPath, ".asm.vert") || + skstd::ends_with(outputPath, ".asm.comp")) { return compileProgram( [](SkSL::Compiler& compiler, SkSL::Program& program, SkSL::OutputStream& out) { // Compile program to SPIR-V assembly in a string-stream. @@ -616,8 +610,12 @@ static ResultCode process_command(SkSpan args) { spvtools::SpirvTools tools(SPV_ENV_VULKAN_1_0); const std::string& spirv(assembly.str()); std::string disassembly; + uint32_t options = spvtools::SpirvTools::kDefaultDisassembleOption; + options |= SPV_BINARY_TO_TEXT_OPTION_INDENT; if (!tools.Disassemble((const uint32_t*)spirv.data(), - spirv.size() / 4, &disassembly)) { + spirv.size() / 4, + &disassembly, + options)) { return false; } // Finally, write the disassembly to our output stream. @@ -644,7 +642,6 @@ static ResultCode process_command(SkSpan args) { [](SkSL::Compiler& compiler, SkSL::Program& program, SkSL::OutputStream& out) { return compiler.toWGSL(program, out); }); -#if defined(SK_ENABLE_SKSL_IN_RASTER_PIPELINE) } else if (skstd::ends_with(outputPath, ".skrp")) { settings.fMaxVersionAllowed = SkSL::Version::k300; return compileProgramAsRuntimeShader( @@ -662,10 +659,9 @@ static ResultCode process_command(SkSpan args) { compiler.errorReporter().error({}, "code is not supported"); return false; } - rasterProg->dump(as_SkWStream(out).get()); + rasterProg->dump(as_SkWStream(out).get(), /*writeInstructionCount=*/true); return true; }); -#endif } else if (skstd::ends_with(outputPath, ".stage")) { return compileProgram( [](SkSL::Compiler&, SkSL::Program& program, SkSL::OutputStream& out) { @@ -683,11 +679,11 @@ static ResultCode process_command(SkSpan args) { void defineFunction(const char* decl, const char* body, bool /*isMain*/) override { - fOutput += std::string(decl) + "{" + body + "}"; + fOutput += std::string(decl) + '{' + body + '}'; } void declareFunction(const char* decl) override { - fOutput += std::string(decl) + ";"; + fOutput += decl; } void defineStruct(const char* definition) override { @@ -699,25 +695,25 @@ static ResultCode process_command(SkSpan args) { } std::string sampleShader(int index, std::string coords) override { - return "child_" + std::to_string(index) + ".eval(" + coords + ")"; + return "child_" + std::to_string(index) + ".eval(" + coords + ')'; } std::string sampleColorFilter(int index, std::string color) override { - return "child_" + std::to_string(index) + ".eval(" + color + ")"; + return "child_" + std::to_string(index) + ".eval(" + color + ')'; } std::string sampleBlender(int index, std::string src, std::string dst) override { - return "child_" + std::to_string(index) + ".eval(" + src + ", " + - dst + ")"; + return "child_" + std::to_string(index) + + ".eval(" + src + ", " + dst + ')'; } std::string toLinearSrgb(std::string color) override { - return "toLinearSrgb(" + color + ")"; + return "toLinearSrgb(" + color + ')'; } std::string fromLinearSrgb(std::string color) override { - return "fromLinearSrgb(" + color + ")"; + return "fromLinearSrgb(" + color + ')'; } std::string fOutput; @@ -741,7 +737,7 @@ static ResultCode process_command(SkSpan args) { }); } else { printf("expected output path to end with one of: .glsl, .html, .metal, .hlsl, .wgsl, " - ".spirv, .asm.vert, .asm.frag, .skrp, .stage (got '%s')\n", + ".spirv, .asm.vert, .asm.frag, .asm.comp, .skrp, .stage (got '%s')\n", outputPath.c_str()); return ResultCode::kConfigurationError; } diff --git a/tools/skui/BUILD.bazel b/tools/skui/BUILD.bazel index e376136bbfc5..1234f1332c74 100644 --- a/tools/skui/BUILD.bazel +++ b/tools/skui/BUILD.bazel @@ -6,7 +6,7 @@ exports_files_legacy() skia_cc_library( name = "skui", - srcs = ["//include/private:SkBitmaskEnum.h"], + srcs = ["//src/base:SkBitmaskEnum.h"], hdrs = [ "InputState.h", "Key.h", diff --git a/tools/skui/ModifierKey.h b/tools/skui/ModifierKey.h index ffb950093ce8..891b3439df90 100644 --- a/tools/skui/ModifierKey.h +++ b/tools/skui/ModifierKey.h @@ -3,7 +3,7 @@ #ifndef skui_modifierkey_defined #define skui_modifierkey_defined -#include "include/private/SkBitmaskEnum.h" +#include "src/base/SkBitmaskEnum.h" namespace skui { enum class ModifierKey { diff --git a/tools/viewer/BUILD.bazel b/tools/viewer/BUILD.bazel index 3398b199f308..819da1aa08c4 100644 --- a/tools/viewer/BUILD.bazel +++ b/tools/viewer/BUILD.bazel @@ -47,7 +47,7 @@ cc_binary_with_flags( set_flags = { # Use the GL backend with the normal GL standard (as opposed to WebGL or GLES) "gpu_backend": [ - "gl_backend", + "gl_ganesh", ], "with_gl_standard": [ "gl_standard", diff --git a/tools/viewer/ImGuiLayer.cpp b/tools/viewer/ImGuiLayer.cpp index 61c32b1a2625..c5ea8fba3d52 100644 --- a/tools/viewer/ImGuiLayer.cpp +++ b/tools/viewer/ImGuiLayer.cpp @@ -22,7 +22,6 @@ #include "include/core/SkTime.h" #include "include/core/SkVertices.h" #include "include/private/base/SkTDArray.h" -#include "tools/sk_app/DisplayParams.h" #include "tools/skui/InputState.h" #include "tools/skui/Key.h" @@ -123,10 +122,10 @@ bool ImGuiLayer::onMouse(int x, int y, skui::InputState state, skui::ModifierKey return io.WantCaptureMouse; } -bool ImGuiLayer::onMouseWheel(float delta, skui::ModifierKey modifiers) { +bool ImGuiLayer::onMouseWheel(float delta, int, int, skui::ModifierKey modifiers) { ImGuiIO& io = ImGui::GetIO(); io.MouseWheel += delta; - return true; + return io.WantCaptureMouse; } void ImGuiLayer::skiaWidget(const ImVec2& size, SkiaWidgetFunc func) { diff --git a/tools/viewer/ImGuiLayer.h b/tools/viewer/ImGuiLayer.h index bc2c73e9d910..b386f0495392 100644 --- a/tools/viewer/ImGuiLayer.h +++ b/tools/viewer/ImGuiLayer.h @@ -144,7 +144,7 @@ class ImGuiLayer : public sk_app::Window::Layer { void onPrePaint() override; void onPaint(SkSurface*) override; bool onMouse(int x, int y, skui::InputState state, skui::ModifierKey modifiers) override; - bool onMouseWheel(float delta, skui::ModifierKey modifiers) override; + bool onMouseWheel(float delta, int x, int y, skui::ModifierKey modifiers) override; bool onKey(skui::Key key, skui::InputState state, skui::ModifierKey modifiers) override; bool onChar(SkUnichar c, skui::ModifierKey modifiers) override; diff --git a/tools/viewer/ImageFilterDAGSlide.cpp b/tools/viewer/ImageFilterDAGSlide.cpp index 3c74c7511296..ca781aff80b1 100644 --- a/tools/viewer/ImageFilterDAGSlide.cpp +++ b/tools/viewer/ImageFilterDAGSlide.cpp @@ -278,7 +278,7 @@ static float draw_dag(SkCanvas* canvas, SkSurface* nodeSurface, const FilterNode x, y + 0.5f * nodeResults->height(), line); // left of child canvas->save(); canvas->translate(x, y); - y = draw_dag(canvas, nodeSurface, node.fInputNodes[i]); + y += draw_dag(canvas, nodeSurface, node.fInputNodes[i]); canvas->restore(); } return std::max(y, nodeResults->height() + textHeight + kPad); diff --git a/tools/viewer/MeshSlide.cpp b/tools/viewer/MeshSlide.cpp index d85a804c4aa0..73978905d932 100644 --- a/tools/viewer/MeshSlide.cpp +++ b/tools/viewer/MeshSlide.cpp @@ -128,6 +128,21 @@ static constexpr struct VertexAnimator { } }, }, + { + "Twirlinator", + // Rotate vertices proportional to their distance to center. + [](const std::vector& uvs, float t, std::vector& out) { + static constexpr float kMaxRotate = SK_FloatPI*4; + + for (size_t i = 0; i < uvs.size(); ++i) { + // remap to [-.5,.5] + const auto uv = (uvs[i] - SkPoint{0.5,0.5}); + const auto angle = kMaxRotate * t * uv.length(); + + out[i] = SkMatrix::RotateRad(angle).mapPoint(uv) + SkPoint{0.5, 0.5}; + } + }, + }, { "Wigglynator", [](const std::vector& uvs, float t, std::vector& out) { @@ -320,10 +335,12 @@ class MeshSlide final : public Slide { const char* fLabel; size_t fCount; } gSizeInfo[] = { - { "4x4", 16 }, - { "8x8", 64 }, - { "16x16", 256 }, - { "32x32", 1024 }, + { "4x4", 16 }, + { "8x8", 64 }, + { "16x16", 256 }, + { "32x32", 1024 }, + { "64x64", 4096 }, + { "128x128", 16384 }, }; ImGui::SliderInt("Mesh Size", &fMeshSizeSelector, diff --git a/tools/viewer/ProtectedSlide.cpp b/tools/viewer/ProtectedSlide.cpp new file mode 100644 index 000000000000..dd506eaead9d --- /dev/null +++ b/tools/viewer/ProtectedSlide.cpp @@ -0,0 +1,76 @@ +/* + * Copyright 2023 Google LLC + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "include/core/SkCanvas.h" +#include "include/effects/SkImageFilters.h" +#include "include/gpu/GrDirectContext.h" +#include "include/gpu/ganesh/SkSurfaceGanesh.h" +#include "tools/gpu/ProtectedUtils.h" +#include "tools/viewer/Slide.h" + +class ProtectedSlide : public Slide { +public: + ProtectedSlide() { fName = "Protected"; } + + SkISize getDimensions() const override { return {kSize, 2*kSize}; } + + void draw(SkCanvas* canvas) override { + canvas->clear(SK_ColorDKGRAY); + +#if defined(SK_GANESH) + GrDirectContext* dContext = GrAsDirectContext(canvas->recordingContext()); + if (!dContext) { + canvas->clear(SK_ColorGREEN); + return; + } + + if (fCachedContext != dContext) { + fCachedContext = dContext; + + // Intentionally leak these. The issue is that, on Android, Viewer keeps recreating + // the context w/o signaling the slides. + (void) fProtectedImage.release(); + (void) fUnProtectedImage.release(); + + if (ProtectedUtils::ContextSupportsProtected(dContext)) { + fProtectedImage = ProtectedUtils::CreateProtectedSkImage(dContext, { kSize, kSize }, + SkColors::kRed, + /* isProtected= */ true); + } + + fUnProtectedImage = ProtectedUtils::CreateProtectedSkImage(dContext, { kSize, kSize }, + SkColors::kRed, + /* isProtected= */ false); + } + + SkPaint stroke; + stroke.setStyle(SkPaint::kStroke_Style); + stroke.setStrokeWidth(2); + + SkPaint paint; + paint.setColor(SK_ColorBLUE); + paint.setShader(fProtectedImage ? fProtectedImage->makeShader({}) : nullptr); + paint.setImageFilter(SkImageFilters::Blur(10, 10, nullptr)); + + canvas->drawRect(SkRect::MakeWH(kSize, kSize), paint); + canvas->drawRect(SkRect::MakeWH(kSize, kSize), stroke); + + paint.setShader(fUnProtectedImage->makeShader({})); + canvas->drawRect(SkRect::MakeXYWH(0, kSize, kSize, kSize), paint); + canvas->drawRect(SkRect::MakeXYWH(0, kSize, kSize, kSize), stroke); +#endif // SK_GANESH + } + +private: + static const int kSize = 128; + + GrDirectContext* fCachedContext = nullptr; + sk_sp fProtectedImage; + sk_sp fUnProtectedImage; +}; + +DEF_SLIDE( return new ProtectedSlide(); ) diff --git a/tools/viewer/SkottieSlide.cpp b/tools/viewer/SkottieSlide.cpp index 4d32de9a701b..dece427cb447 100644 --- a/tools/viewer/SkottieSlide.cpp +++ b/tools/viewer/SkottieSlide.cpp @@ -17,6 +17,7 @@ #include "modules/audioplayer/SkAudioPlayer.h" #include "modules/skottie/include/Skottie.h" #include "modules/skottie/include/SkottieProperty.h" +#include "modules/skottie/include/SlotManager.h" #include "modules/skottie/utils/SkottieUtils.h" #include "modules/skresources/include/SkResources.h" #include "src/core/SkOSFile.h" @@ -245,11 +246,11 @@ class SkottieSlide::TransformTracker : public skottie::PropertyObserver { }; // Holds a pointer to a slot manager and the list of slots for the UI widget to track -class SkottieSlide::SlotManagerWrapper { +class SkottieSlide::SlotManagerInterface { public: - SlotManagerWrapper(SkString path, sk_sp rp, - sk_sp po) - : fSlotManager(sk_make_sp(path, std::move(rp), std::move(po))) + SlotManagerInterface(sk_sp slotManager, sk_sp rp) + : fSlotManager(std::move(slotManager)) + , fResourceProvider(std::move(rp)) {} @@ -263,12 +264,20 @@ class SkottieSlide::SlotManagerWrapper { ImGui::ColorEdit4("Color", cSlot.second.data()); ImGui::PopID(); } - ImGui::Text("Opacity Slots"); - for (size_t i = 0; i < fOpacitySlots.size(); i++) { - auto& oSlot = fOpacitySlots.at(i); + ImGui::Text("Scalar Slots"); + for (size_t i = 0; i < fScalarSlots.size(); i++) { + auto& oSlot = fScalarSlots.at(i); ImGui::PushID(i); ImGui::Text("%s", oSlot.first.c_str()); - ImGui::InputFloat("Opacity", &(oSlot.second)); + ImGui::InputFloat("Scalar", &(oSlot.second)); + ImGui::PopID(); + } + ImGui::Text("Vec2 Slots"); + for (size_t i = 0; i < fVec2Slots.size(); i++) { + auto& vSlot = fVec2Slots.at(i); + ImGui::PushID(i); + ImGui::Text("%s", vSlot.first.c_str()); + ImGui::InputFloat2("x, y", &(vSlot.second.x)); ImGui::PopID(); } ImGui::Text("Text Slots"); @@ -276,7 +285,15 @@ class SkottieSlide::SlotManagerWrapper { auto& tSlot = fTextStringSlots.at(i); ImGui::PushID(i); ImGui::Text("%s", tSlot.first.c_str()); - ImGui::InputText("Text", tSlot.second.data(), tSlot.second.size()); + ImGui::InputText("Text", tSlot.second.source.data(), tSlot.second.source.size()); + if (ImGui::BeginCombo("Font", tSlot.second.font.data())) { + for (const auto& typeface : fTypefaceList) { + if (ImGui::Selectable(typeface, false)) { + tSlot.second.font = typeface; + } + } + ImGui::EndCombo(); + } ImGui::PopID(); } @@ -305,91 +322,108 @@ class SkottieSlide::SlotManagerWrapper { void pushSlots() { for(const auto& s : fColorSlots) { - fSlotManager->setColorSlot(s.first.data(), SkColor4f{s.second[0], s.second[1], - s.second[2], s.second[3]}.toSkColor()); + fSlotManager->setColorSlot(s.first, SkColor4f{s.second[0], s.second[1], + s.second[2], s.second[3]}.toSkColor()); + } + for(const auto& s : fScalarSlots) { + fSlotManager->setScalarSlot(s.first, s.second); } - for(const auto& s : fOpacitySlots) { - fSlotManager->setOpacitySlot(s.first.data(), s.second); + for(const auto& s : fVec2Slots) { + fSlotManager->setVec2Slot(s.first, {s.second.x, s.second.y}); } for(const auto& s : fTextStringSlots) { - fSlotManager->setTextStringSlot(s.first.data(), SkString(s.second.data())); + auto t = fSlotManager->getTextSlot(s.first); + t->fText = SkString(s.second.source.data()); + t->fTypeface = SkFontMgr::RefDefault()->matchFamilyStyle(s.second.font.c_str(), + SkFontStyle()); + fSlotManager->setTextSlot(s.first, *t); } for(const auto& s : fImageSlots) { - fSlotManager->setImageSlot(s.first.data(), "images/", s.second.c_str(), nullptr); - } - } - - void prepareImageAssetList(const char* dirname) { - fResList.clear(); - SkOSFile::Iter iter(dirname, ".png"); - for (SkString file; iter.next(&file); ) { - fResList.push_back(file); + auto image = fResourceProvider->loadImageAsset("images/", s.second.c_str(), nullptr); + fSlotManager->setImageSlot(s.first, image); } } void initializeSlotManagerUI() { + prepareImageAssetList(GetResourcePath("skottie/images").c_str()); // only initialize if slots are unpopulated - if (fColorSlots.empty() && fOpacitySlots.empty() && fTextStringSlots.empty()) { + if (fColorSlots.empty() && fScalarSlots.empty() && fTextStringSlots.empty()) { auto slotInfos = fSlotManager->getSlotInfo(); - for (const skottie_utils::SlotManager::SlotInfo &slotInfo : slotInfos) { - switch (slotInfo.type) { - case skottie_utils::SlotType::kColor: // color - addColorSlot(slotInfo.slotID); - break; - case skottie_utils::SlotType::kOpacity: // opacity - addOpacitySlot(slotInfo.slotID); - break; - case skottie_utils::SlotType::kText: // images - addTextSlot(slotInfo.slotID); - break; - case skottie_utils::SlotType::kImage: // text - addImageSlot(slotInfo.slotID); - break; - default: - SkDebugf("Unknown slot type: %s: %d\n", slotInfo.slotID.c_str(), slotInfo.type); - break; - } + for (const auto &sid : slotInfos.fColorSlotIDs) { + addColorSlot(sid); + } + for (const auto &sid : slotInfos.fScalarSlotIDs) { + addScalarSlot(sid); + } + for (const auto &sid : slotInfos.fVec2SlotIDs) { + addVec2Slot(sid); + } + for (const auto &sid : slotInfos.fImageSlotIDs) { + addImageSlot(sid); + } + for (const auto &sid : slotInfos.fTextSlotIDs) { + addTextSlot(sid); } } } - sk_sp getResourceProvider() { - return fSlotManager->getResourceProvider(); - } - - sk_sp getPropertyObserver() { - return fSlotManager->getPropertyObserver(); - } private: static constexpr int kBufferLen = 256; - const sk_sp fSlotManager; + sk_sp fSlotManager; const sk_sp fResourceProvider; std::vector fResList; + static constexpr std::array fTypefaceList = {"Arial", + "Courier New", + "Roboto-Regular", + "Georgia"}; using GuiTextBuffer = std::array; - void addColorSlot(std::string slotID) { - fColorSlots.push_back(std::make_pair(slotID, std::array{1.0f, 1.0f, 1.0f, 1.0f})); + void addColorSlot(SkString slotID) { + auto c = fSlotManager->getColorSlot(slotID); + SkColor4f color4f = SkColor4f::FromColor(*c); + fColorSlots.push_back(std::make_pair(slotID, color4f.array())); + } + + void addScalarSlot(SkString slotID) { + fScalarSlots.push_back(std::make_pair(slotID, *fSlotManager->getScalarSlot(slotID))); } - void addOpacitySlot(std::string slotID) { - fOpacitySlots.push_back(std::make_pair(slotID, 100.0f)); + void addVec2Slot(SkString slotID) { + fVec2Slots.push_back(std::make_pair(slotID, *fSlotManager->getVec2Slot(slotID))); } - void addTextSlot(std::string slotID) { + void addTextSlot(SkString slotID) { std::array textSource = {'\0'}; - fTextStringSlots.push_back(std::make_pair(slotID, textSource)); + SkString s = fSlotManager->getTextSlot(slotID)->fText; + std::copy(s.data(), s.data() + s.size(), textSource.data()); + TextSlotData data = {textSource, fTypefaceList[0]}; + fTextStringSlots.push_back(std::make_pair(slotID, data)); + } + + void addImageSlot(SkString slotID) { + fImageSlots.push_back(std::make_pair(slotID, fResList[0].data())); } - void addImageSlot(std::string slotID) { - fImageSlots.push_back(std::make_pair(slotID, std::string())); + void prepareImageAssetList(const char* dirname) { + fResList.clear(); + SkOSFile::Iter iter(dirname, ".png"); + for (SkString file; iter.next(&file); ) { + fResList.push_back(file); + } } - std::vector>> fColorSlots; - std::vector> fOpacitySlots; - std::vector> fTextStringSlots; - std::vector> fImageSlots; + struct TextSlotData { + GuiTextBuffer source; + std::string font; + }; + + std::vector>> fColorSlots; + std::vector> fScalarSlots; + std::vector> fVec2Slots; + std::vector> fTextStringSlots; + std::vector> fImageSlots; }; @@ -489,21 +523,20 @@ void SkottieSlide::init() { fTransformTracker = sk_make_sp(); auto text_tracker = sk_make_sp(fTransformTracker); - if (!fSlotManagerWrapper) { - fSlotManagerWrapper = std::make_unique(fPath, resource_provider, text_tracker); - } - builder.setLogger(logger) .setPrecompInterceptor(std::move(precomp_interceptor)) - .setResourceProvider(fSlotManagerWrapper->getResourceProvider()) - .setPropertyObserver(fSlotManagerWrapper->getPropertyObserver()); + .setResourceProvider(resource_provider) + .setPropertyObserver(text_tracker); fAnimation = builder.makeFromFile(fPath.c_str()); fAnimationStats = builder.getStats(); fTimeBase = 0; // force a time reset - fSlotManagerWrapper->prepareImageAssetList(GetResourcePath("skottie/images").c_str()); - fSlotManagerWrapper->initializeSlotManagerUI(); + if (!fSlotManagerInterface) { + fSlotManagerInterface = std::make_unique(builder.getSlotManager(), resource_provider); + } + + fSlotManagerInterface->initializeSlotManagerUI(); if (fAnimation) { fAnimation->seek(0); @@ -585,7 +618,7 @@ void SkottieSlide::draw(SkCanvas* canvas) { if (fShowSlotManager) { // not able to track layers with a PropertyObserver while using SM's PropertyObserver fShowTrackerUI = false; - fSlotManagerWrapper->renderUI(); + fSlotManagerInterface->renderUI(); } if (fShowTrackerUI) { fTransformTracker->renderUI(); diff --git a/tools/viewer/SkottieSlide.h b/tools/viewer/SkottieSlide.h index e88e195eab10..3342f0656d61 100644 --- a/tools/viewer/SkottieSlide.h +++ b/tools/viewer/SkottieSlide.h @@ -43,7 +43,7 @@ class SkottieSlide : public Slide { void renderUI(); class TransformTracker; - class SlotManagerWrapper; + class SlotManagerInterface; const SkString fPath; @@ -51,7 +51,7 @@ class SkottieSlide : public Slide { skottie::Animation::Builder::Stats fAnimationStats; sksg::InvalidationController fInvalController; sk_sp fTransformTracker; - std::unique_ptrfSlotManagerWrapper; + std::unique_ptrfSlotManagerInterface; sk_sp fTextEditor; std::vector fFrameTimes; SkSize fWinSize = SkSize::MakeEmpty(); diff --git a/tools/viewer/SlideDir.cpp b/tools/viewer/SlideDir.cpp index 0529a354892c..59d791a77f6a 100644 --- a/tools/viewer/SlideDir.cpp +++ b/tools/viewer/SlideDir.cpp @@ -15,7 +15,6 @@ #include "include/core/SkRect.h" #include "include/core/SkString.h" #include "include/core/SkTypeface.h" -#include "include/private/SkBitmaskEnum.h" #include "include/private/base/SkTPin.h" #include "include/utils/SkTextUtils.h" #include "modules/sksg/include/SkSGDraw.h" @@ -28,6 +27,7 @@ #include "modules/sksg/include/SkSGScene.h" #include "modules/sksg/include/SkSGText.h" #include "modules/sksg/include/SkSGTransform.h" +#include "src/base/SkBitmaskEnum.h" #include "tools/skui/InputState.h" #include "tools/skui/ModifierKey.h" #include "tools/timer/TimeUtils.h" diff --git a/tools/viewer/Viewer.cpp b/tools/viewer/Viewer.cpp index d8f7e8c11646..e77adc199f02 100644 --- a/tools/viewer/Viewer.cpp +++ b/tools/viewer/Viewer.cpp @@ -99,10 +99,17 @@ #include "src/gpu/ganesh/ops/TessellationPathRenderer.h" #endif +#if defined(SK_GRAPHITE) +#include "include/gpu/graphite/Context.h" +#include "src/gpu/graphite/ContextPriv.h" +#include "src/gpu/graphite/GlobalCache.h" +#include "src/gpu/graphite/GraphicsPipeline.h" +#endif + #include "imgui.h" #include "misc/cpp/imgui_stdlib.h" // For ImGui support of std::string -#ifdef SK_VULKAN +#if defined(SK_VULKAN) #include "spirv-tools/libspirv.hpp" #endif @@ -224,6 +231,7 @@ static DEFINE_bool(redraw, false, "Toggle continuous redraw."); static DEFINE_bool(offscreen, false, "Force rendering to an offscreen surface."); static DEFINE_bool(stats, false, "Display stats overlay on startup."); static DEFINE_bool(binaryarchive, false, "Enable MTLBinaryArchive use (if available)."); +static DEFINE_bool(createProtected, false, "Create a protected native backend (e.g., in EGL)."); #ifndef SK_GL static_assert(false, "viewer requires GL backend for raster.") @@ -243,6 +251,9 @@ const char* get_backend_string(sk_app::Window::BackendType type) { #endif #ifdef SK_VULKAN case sk_app::Window::kVulkan_BackendType: return "Vulkan"; +#if defined(SK_GRAPHITE) + case sk_app::Window::kGraphiteVulkan_BackendType: return "Vulkan (Graphite)"; +#endif #endif #ifdef SK_METAL case sk_app::Window::kMetal_BackendType: return "Metal"; @@ -274,6 +285,11 @@ static sk_app::Window::BackendType get_backend_type(const char* str) { if (0 == strcmp(str, "vk")) { return sk_app::Window::kVulkan_BackendType; } else +#if defined(SK_GRAPHITE) + if (0 == strcmp(str, "grvk")) { + return sk_app::Window::kGraphiteVulkan_BackendType; + } else +#endif #endif #if SK_ANGLE && defined(SK_BUILD_FOR_WIN) if (0 == strcmp(str, "angle")) { @@ -443,6 +459,8 @@ Viewer::Viewer(int argc, char** argv, void* platformData) displayParams.fSurfaceProps.flags() | SkSurfaceProps::kDynamicMSAA_Flag, displayParams.fSurfaceProps.pixelGeometry()); } + displayParams.fCreateProtectedNativeBackend = FLAGS_createProtected; + fWindow->setRequestedDisplayParams(displayParams); fDisplay = fWindow->getRequestedDisplayParams(); fRefresh = FLAGS_redraw; @@ -931,7 +949,7 @@ void Viewer::initSlides() { // GMs int firstGM = fSlides.size(); - for (skiagm::GMFactory gmFactory : skiagm::GMRegistry::Range()) { + for (const skiagm::GMFactory& gmFactory : skiagm::GMRegistry::Range()) { std::unique_ptr gm = gmFactory(); if (!CommandLineFlags::ShouldSkip(FLAGS_match, gm->getName())) { auto slide = sk_make_sp(std::move(gm)); @@ -1870,6 +1888,18 @@ bool Viewer::onMouse(int x, int y, skui::InputState state, skui::ModifierKey mod return true; } +bool Viewer::onMouseWheel(float delta, int x, int y, skui::ModifierKey) { + // Rather than updating the fixed zoom level, treat a mouse wheel event as a gesture, which + // applies a pre- and post-translation to the transform, resulting in a zoom effect centered at + // the mouse cursor position. + SkScalar scale = exp(delta * 0.001); + fGesture.startZoom(); + fGesture.updateZoom(scale, x, y, x, y); + fGesture.endZoom(); + fWindow->inval(); + return true; +} + bool Viewer::onFling(skui::InputState state) { if (skui::InputState::kRight == state) { this->setCurrentSlide(fCurrentSlide > 0 ? fCurrentSlide - 1 : fSlides.size() - 1); @@ -1982,7 +2012,7 @@ void Viewer::drawImGui() { DisplayParams params = fWindow->getRequestedDisplayParams(); bool displayParamsChanged = false; // heavy-weight, might recreate entire context bool uiParamsChanged = false; // light weight, just triggers window invalidation - auto ctx = fWindow->directContext(); + GrDirectContext* ctx = fWindow->directContext(); if (ImGui::Begin("Tools", &fShowImGuiDebugWindow, ImGuiWindowFlags_AlwaysVerticalScrollbar)) { @@ -1998,10 +2028,20 @@ void Viewer::drawImGui() { #if defined(SK_DAWN) ImGui::SameLine(); ImGui::RadioButton("Dawn", &newBackend, sk_app::Window::kDawn_BackendType); +#if defined(SK_GRAPHITE) + ImGui::SameLine(); + ImGui::RadioButton("Dawn (Graphite)", &newBackend, + sk_app::Window::kGraphiteDawn_BackendType); +#endif #endif #if defined(SK_VULKAN) && !defined(SK_BUILD_FOR_MAC) ImGui::SameLine(); ImGui::RadioButton("Vulkan", &newBackend, sk_app::Window::kVulkan_BackendType); +#if defined(SK_GRAPHITE) + ImGui::SameLine(); + ImGui::RadioButton("Vulkan (Graphite)", &newBackend, + sk_app::Window::kGraphiteVulkan_BackendType); +#endif #endif #if defined(SK_METAL) ImGui::SameLine(); @@ -2022,17 +2062,17 @@ void Viewer::drawImGui() { }); } - bool* wire = ¶ms.fGrContextOptions.fWireframeMode; - if (ctx && ImGui::Checkbox("Wireframe Mode", wire)) { - displayParamsChanged = true; - } + if (ctx) { + bool* wire = ¶ms.fGrContextOptions.fWireframeMode; + if (ImGui::Checkbox("Wireframe Mode", wire)) { + displayParamsChanged = true; + } - bool* reducedShaders = ¶ms.fGrContextOptions.fReducedShaderVariations; - if (ctx && ImGui::Checkbox("Reduced shaders", reducedShaders)) { - displayParamsChanged = true; - } + bool* reducedShaders = ¶ms.fGrContextOptions.fReducedShaderVariations; + if (ImGui::Checkbox("Reduced shaders", reducedShaders)) { + displayParamsChanged = true; + } - if (ctx) { // Determine the context's max sample count for MSAA radio buttons. int sampleCount = fWindow->sampleCount(); int maxMSAA = (fBackendType != sk_app::Window::kRaster_BackendType) ? @@ -2571,26 +2611,59 @@ void Viewer::drawImGui() { // caches on one frame, then set a flag to poll the cache on the next frame. static bool gLoadPending = false; if (gLoadPending) { - auto collectShaders = [this](sk_sp key, sk_sp data, - const SkString& description, int hitCount) { - CachedShader& entry(fCachedShaders.push_back()); - entry.fKey = key; - SkMD5 hash; - hash.write(key->bytes(), key->size()); - SkMD5::Digest digest = hash.finish(); - for (int i = 0; i < 16; ++i) { - entry.fKeyString.appendf("%02x", digest.data[i]); - } - entry.fKeyDescription = description; - - SkReadBuffer reader(data->data(), data->size()); - entry.fShaderType = GrPersistentCacheUtils::GetType(&reader); - GrPersistentCacheUtils::UnpackCachedShaders(&reader, entry.fShader, - entry.fInterfaces, - kGrShaderTypeCount); - }; fCachedShaders.clear(); - fPersistentCache.foreach(collectShaders); + + if (ctx) { + fPersistentCache.foreach([this](sk_sp key, + sk_sp data, + const SkString& description, + int hitCount) { + CachedShader& entry(fCachedShaders.push_back()); + entry.fKey = key; + SkMD5 hash; + hash.write(key->bytes(), key->size()); + entry.fKeyString = hash.finish().toHexString(); + entry.fKeyDescription = description; + + SkReadBuffer reader(data->data(), data->size()); + entry.fShaderType = GrPersistentCacheUtils::GetType(&reader); + GrPersistentCacheUtils::UnpackCachedShaders(&reader, entry.fShader, + entry.fInterfaces, + kGrShaderTypeCount); + }); + } +#if defined(SK_GRAPHITE) +#if GRAPHITE_TEST_UTILS + if (skgpu::graphite::Context* gctx = fWindow->graphiteContext()) { + // TODO(skia:14418): populate fCachedShaders with recently-used shaders + auto callback = [&](const skgpu::UniqueKey& key, + const skgpu::graphite::GraphicsPipeline* pipeline) { + // Retrieve the shaders from the pipeline. + const skgpu::graphite::GraphicsPipeline::Shaders& shaders = + pipeline->getPipelineShaders(); + + CachedShader& entry(fCachedShaders.push_back()); + entry.fKey = nullptr; + entry.fKeyString.printf("Pipeline 0x%08X", key.hash()); + + if (sksl) { + entry.fShader[kVertex_GrShaderType] = shaders.fSkSLVertexShader; + entry.fShader[kFragment_GrShaderType] = shaders.fSkSLFragmentShader; + entry.fShaderType = SkSetFourByteTag('S', 'K', 'S', 'L'); + } else { + entry.fShader[kVertex_GrShaderType] = shaders.fNativeVertexShader; + entry.fShader[kFragment_GrShaderType] = + shaders.fNativeFragmentShader; + // We could derive the shader type from the GraphicsPipeline's type + // if there is ever a need to. + entry.fShaderType = SkSetFourByteTag('?', '?', '?', '?'); + } + }; + gctx->priv().globalCache()->forEachGraphicsPipeline(callback); + } +#endif +#endif + gLoadPending = false; #if defined(SK_VULKAN) @@ -2611,10 +2684,14 @@ void Viewer::drawImGui() { // Defer actually doing the View/Apply logic so that we can trigger an Apply when we // start or finish hovering on a tree node in the list below: - bool doView = ImGui::Button("View"); ImGui::SameLine(); - bool doApply = ImGui::Button("Apply Changes"); ImGui::SameLine(); - bool doDump = ImGui::Button("Dump SkSL to resources/sksl/"); - + bool doView = ImGui::Button("View"); ImGui::SameLine(); + bool doApply = false; + bool doDump = false; + if (ctx) { + // TODO(skia:14418): we only have Ganesh implementations of Apply/Dump + doApply = ImGui::Button("Apply Changes"); ImGui::SameLine(); + doDump = ImGui::Button("Dump SkSL to resources/sksl/"); + } int newOptLevel = fOptLevel; ImGui::RadioButton("SkSL", &newOptLevel, kShaderOptLevel_Source); ImGui::SameLine(); @@ -2697,7 +2774,14 @@ void Viewer::drawImGui() { if (doView || sDoDeferredView) { fPersistentCache.reset(); - ctx->priv().getGpu()->resetShaderCacheForTesting(); + if (ctx) { + ctx->priv().getGpu()->resetShaderCacheForTesting(); + } +#if defined(SK_GRAPHITE) + if (skgpu::graphite::Context* gctx = fWindow->graphiteContext()) { + gctx->priv().globalCache()->deleteResources(); + } +#endif gLoadPending = true; sDoDeferredView = false; } @@ -2707,7 +2791,7 @@ void Viewer::drawImGui() { if (isVulkan && !sksl) { doApply = false; } - if (doApply) { + if (ctx && doApply) { fPersistentCache.reset(); ctx->priv().getGpu()->resetShaderCacheForTesting(); for (auto& entry : fCachedShaders) { diff --git a/tools/viewer/Viewer.h b/tools/viewer/Viewer.h index c3cad7681a95..501b4c480b55 100644 --- a/tools/viewer/Viewer.h +++ b/tools/viewer/Viewer.h @@ -20,12 +20,12 @@ #include "tools/gpu/MemoryCache.h" #include "tools/sk_app/Application.h" #include "tools/sk_app/CommandSet.h" -#include "tools/sk_app/DisplayParams.h" #include "tools/sk_app/Window.h" #include "tools/viewer/AnimTimer.h" #include "tools/viewer/ImGuiLayer.h" #include "tools/viewer/StatsLayer.h" #include "tools/viewer/TouchGesture.h" +#include "tools/window/DisplayParams.h" #include #include @@ -53,6 +53,7 @@ class Viewer : public sk_app::Application, sk_app::Window::Layer { void onResize(int width, int height) override; bool onTouch(intptr_t owner, skui::InputState state, float x, float y) override; bool onMouse(int x, int y, skui::InputState state, skui::ModifierKey modifiers) override; + bool onMouseWheel(float delta, int x, int y, skui::ModifierKey) override; void onUIStateChanged(const SkString& stateName, const SkString& stateValue) override; bool onKey(skui::Key key, skui::InputState state, skui::ModifierKey modifiers) override; bool onChar(SkUnichar c, skui::ModifierKey modifiers) override; @@ -261,7 +262,7 @@ class Viewer : public sk_app::Application, sk_app::Window::Layer { // fDisplay contains default values (fWindow.fRequestedDisplayParams contains the overrides), // fDisplayOverrides controls if overrides are applied. - sk_app::DisplayParams fDisplay; + skwindow::DisplayParams fDisplay; DisplayFields fDisplayOverrides; struct CachedShader { diff --git a/tools/window/BUILD.bazel b/tools/window/BUILD.bazel index 5e3f212ead54..e08e3699d0f2 100644 --- a/tools/window/BUILD.bazel +++ b/tools/window/BUILD.bazel @@ -1,4 +1,4 @@ -load("//bazel:skia_rules.bzl", "exports_files_legacy", "skia_cc_library") +load("//bazel:skia_rules.bzl", "exports_files_legacy", "select_multi", "skia_cc_library") licenses(["notice"]) @@ -6,19 +6,35 @@ exports_files_legacy() skia_cc_library( name = "window", + testonly = True, srcs = [ - # TODO: split up gpu backends into buffett style BUILD - "DisplayParams.h", - "GLWindowContext.cpp", - "GLWindowContext.h", - "VulkanWindowContext.cpp", - "VulkanWindowContext.h", + "RasterWindowContext.h", "WindowContext.cpp", - "WindowContext.h", - ] + select({ + ] + select_multi({ + "//src/gpu:dawn_ganesh": [ + "DawnWindowContext.h", + "DawnWindowContext.cpp", + ], + "//src/gpu:gl_ganesh": [ + "GLWindowContext.cpp", + "GLWindowContext.h", + ], + "//src/gpu:vulkan_ganesh": [ + "VulkanWindowContext.h", + "VulkanWindowContext.cpp", + ], + }) + select({ "@platforms//os:android": ["//tools/window/android:srcs"], "//conditions:default": [], + }) + select({ + "@platforms//os:linux": ["//tools/window/unix:srcs"], + "//conditions:default": [], + # TODO(kjlubick) add Windows/Mac support }), + hdrs = [ + "DisplayParams.h", + "WindowContext.h", + ], visibility = ["//:__subpackages__"], deps = [ "//:skia_internal", diff --git a/tools/window/BUILD.gn b/tools/window/BUILD.gn index c7e239d3d773..03a5d0a1ea21 100644 --- a/tools/window/BUILD.gn +++ b/tools/window/BUILD.gn @@ -5,6 +5,10 @@ import("../../gn/skia.gni") +if (skia_use_dawn) { + import("//third_party/externals/dawn/scripts/dawn_features.gni") +} + config("public_config") { defines = [] include_dirs = [ "." ] @@ -20,11 +24,44 @@ skia_component("window") { ] sources = [ "DisplayParams.h", + "RasterWindowContext.h", "WindowContext.cpp", "WindowContext.h", ] + + libs = [] + frameworks = [] + if (is_android) { - sources += [ "android/WindowContextFactory_android.h" ] + sources += [ + "android/RasterWindowContext_android.cpp", + "android/WindowContextFactory_android.h", + ] + libs += [ "android" ] + } else if (is_linux) { + sources += [ + "unix/RasterWindowContext_unix.cpp", + "unix/WindowContextFactory_unix.h", + ] + libs += [ + "GL", # Used by raster window context, so cannot be behind skia_use_gl. + "X11", + ] + } else if (is_win) { + sources += [ + "win/RasterWindowContext_win.cpp", + "win/WindowContextFactory_win.h", + ] + } else if (is_mac) { + sources += [ "mac/WindowContextFactory_mac.h" ] + frameworks += [ + "QuartzCore.framework", + "Cocoa.framework", + "Foundation.framework", + ] + } else if (is_ios) { + sources += [ "ios/WindowContextFactory_ios.h" ] + frameworks += [ "QuartzCore.framework" ] } if (skia_use_gl) { @@ -34,20 +71,128 @@ skia_component("window") { ] if (is_android) { sources += [ "android/GLWindowContext_android.cpp" ] + } else if (is_linux) { + sources += [ "unix/GLWindowContext_unix.cpp" ] + } else if (is_win) { + sources += [ "win/GLWindowContext_win.cpp" ] + if (skia_use_angle) { + sources += [ "win/ANGLEWindowContext_win.cpp" ] + } + } else if (is_mac) { + sources += [ + "mac/GLWindowContext_mac.mm", + "mac/RasterWindowContext_mac.mm", + ] + } else if (is_ios) { + sources += [ + "ios/GLWindowContext_ios.mm", + "ios/RasterWindowContext_ios.mm", + ] } } + if (skia_use_vulkan) { sources += [ "VulkanWindowContext.cpp", "VulkanWindowContext.h", ] + if (skia_enable_graphite) { + sources += [ + "GraphiteVulkanWindowContext.cpp", + "GraphiteVulkanWindowContext.h", + ] + } if (is_android) { sources += [ "android/VulkanWindowContext_android.cpp" ] + } else if (is_linux) { + sources += [ "unix/VulkanWindowContext_unix.cpp" ] + if (skia_enable_graphite) { + sources += [ "unix/GraphiteVulkanWindowContext_unix.cpp" ] + } + libs += [ "X11-xcb" ] + } else if (is_win) { + sources += [ "win/VulkanWindowContext_win.cpp" ] + if (skia_enable_graphite) { + sources += [ "win/GraphiteVulkanWindowContext_win.cpp" ] + } + } + } + + if (skia_use_metal) { + sources += [ + "MetalWindowContext.h", + "MetalWindowContext.mm", + ] + if (skia_enable_graphite) { + sources += [ + "GraphiteMetalWindowContext.h", + "GraphiteMetalWindowContext.mm", + ] } + if (is_mac) { + sources += [ "mac/MetalWindowContext_mac.mm" ] + if (skia_enable_graphite) { + sources += [ "mac/GraphiteMetalWindowContext_mac.mm" ] + } + } else if (is_ios) { + sources += [ "ios/MetalWindowContext_ios.mm" ] + } + } + + if (skia_use_direct3d) { + sources += [ "win/D3D12WindowContext_win.cpp" ] } + + if (skia_use_dawn) { + sources += [ + "DawnWindowContext.cpp", + "DawnWindowContext.h", + ] + if (is_linux) { + if (dawn_enable_vulkan) { + sources += [ "unix/DawnVulkanWindowContext_unix.cpp" ] + defines = [ "VK_USE_PLATFORM_XCB_KHR" ] + libs += [ "X11-xcb" ] + if (skia_enable_graphite) { + sources += [ + "GraphiteDawnWindowContext.cpp", + "GraphiteDawnWindowContext.h", + "unix/GraphiteDawnVulkanWindowContext_unix.cpp", + ] + } + } + } else if (is_win) { + if (dawn_enable_d3d12) { + sources += [ "win/DawnD3D12WindowContext_win.cpp" ] + if (skia_enable_graphite) { + sources += [ + "GraphiteDawnWindowContext.cpp", + "GraphiteDawnWindowContext.h", + "win/GraphiteDawnD3D12WindowContext_win.cpp", + ] + } + } + } else if (is_mac) { + if (dawn_enable_metal) { + sources += [ "mac/DawnMTLWindowContext_mac.mm" ] + if (skia_enable_graphite) { + sources += [ + "GraphiteDawnWindowContext.cpp", + "GraphiteDawnWindowContext.h", + "mac/GraphiteDawnMetalWindowContext_mac.mm", + ] + } + } + } + } + configs = [ "../../:skia_private" ] deps = [ "../..:gpu_tool_utils", "../..:skia", ] + + if (skia_use_gl && skia_use_angle) { + deps += [ "//third_party/angle2" ] + } } diff --git a/tools/sk_app/DawnWindowContext.cpp b/tools/window/DawnWindowContext.cpp similarity index 97% rename from tools/sk_app/DawnWindowContext.cpp rename to tools/window/DawnWindowContext.cpp index ea1db9a9cc83..d09a1ce75a59 100644 --- a/tools/sk_app/DawnWindowContext.cpp +++ b/tools/window/DawnWindowContext.cpp @@ -4,13 +4,12 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ -#include "tools/sk_app/DawnWindowContext.h" - #include "include/core/SkSurface.h" #include "include/gpu/GrBackendSurface.h" #include "include/gpu/GrDirectContext.h" #include "include/gpu/ganesh/SkSurfaceGanesh.h" #include "src/base/SkAutoMalloc.h" +#include "tools/window/DawnWindowContext.h" #include "dawn/dawn_proc.h" @@ -34,7 +33,7 @@ static wgpu::SwapChainDescriptor CreateSwapChainDesc(int width, return desc; } -namespace sk_app { +namespace skwindow::internal { DawnWindowContext::DawnWindowContext(const DisplayParams& params, wgpu::TextureFormat swapChainFormat) @@ -132,4 +131,4 @@ wgpu::Device DawnWindowContext::createDevice(wgpu::BackendType type) { return nullptr; } -} //namespace sk_app +} //namespace skwindow::internal diff --git a/tools/sk_app/DawnWindowContext.h b/tools/window/DawnWindowContext.h similarity index 93% rename from tools/sk_app/DawnWindowContext.h rename to tools/window/DawnWindowContext.h index d5d062ac8cb0..82130415891d 100644 --- a/tools/sk_app/DawnWindowContext.h +++ b/tools/window/DawnWindowContext.h @@ -10,11 +10,11 @@ #include "include/core/SkRefCnt.h" #include "include/core/SkSurface.h" -#include "tools/sk_app/WindowContext.h" +#include "tools/window/WindowContext.h" #include "webgpu/webgpu_cpp.h" #include "dawn/native/DawnNative.h" -namespace sk_app { +namespace skwindow::internal { class DawnWindowContext : public WindowContext { public: @@ -45,6 +45,6 @@ class DawnWindowContext : public WindowContext { std::unique_ptr fInstance; }; -} // namespace sk_app +} // namespace skwindow::internal #endif diff --git a/tools/window/DisplayParams.h b/tools/window/DisplayParams.h index b8fd43fb7beb..71eff4a68551 100644 --- a/tools/window/DisplayParams.h +++ b/tools/window/DisplayParams.h @@ -23,6 +23,7 @@ struct DisplayParams { , fDisableVsync(false) , fDelayDrawableAcquisition(false) , fEnableBinaryArchive(false) + , fCreateProtectedNativeBackend(false) {} SkColorType fColorType; @@ -33,6 +34,7 @@ struct DisplayParams { bool fDisableVsync; bool fDelayDrawableAcquisition; bool fEnableBinaryArchive; + bool fCreateProtectedNativeBackend = false; }; } // namespace skwindow diff --git a/tools/window/GLWindowContext.cpp b/tools/window/GLWindowContext.cpp index 3e26c0b93089..bd879624a6c1 100644 --- a/tools/window/GLWindowContext.cpp +++ b/tools/window/GLWindowContext.cpp @@ -11,6 +11,7 @@ #include "include/gpu/GrBackendSurface.h" #include "include/gpu/GrDirectContext.h" #include "include/gpu/ganesh/SkSurfaceGanesh.h" +#include "include/gpu/ganesh/gl/GrGLBackendSurface.h" #include "src/base/SkMathPriv.h" #include "src/gpu/ganesh/GrCaps.h" #include "src/gpu/ganesh/GrDirectContextPriv.h" @@ -63,13 +64,13 @@ sk_sp GLWindowContext::getBackbufferSurface() { GrGLFramebufferInfo fbInfo; fbInfo.fFBOID = buffer; fbInfo.fFormat = GR_GL_RGBA8; - fbInfo.fProtected = skgpu::Protected::kNo; + fbInfo.fProtected = skgpu::Protected(fDisplayParams.fCreateProtectedNativeBackend); - GrBackendRenderTarget backendRT(fWidth, - fHeight, - fSampleCount, - fStencilBits, - fbInfo); + auto backendRT = GrBackendRenderTargets::MakeGL(fWidth, + fHeight, + fSampleCount, + fStencilBits, + fbInfo); fSurface = SkSurfaces::WrapBackendRenderTarget(fContext.get(), backendRT, diff --git a/tools/sk_app/GraphiteDawnWindowContext.cpp b/tools/window/GraphiteDawnWindowContext.cpp similarity index 78% rename from tools/sk_app/GraphiteDawnWindowContext.cpp rename to tools/window/GraphiteDawnWindowContext.cpp index 8eaf9343f2c5..08e337a320a3 100644 --- a/tools/sk_app/GraphiteDawnWindowContext.cpp +++ b/tools/window/GraphiteDawnWindowContext.cpp @@ -5,7 +5,7 @@ * found in the LICENSE file. */ -#include "tools/sk_app/GraphiteDawnWindowContext.h" +#include "tools/window/GraphiteDawnWindowContext.h" #include "include/core/SkSurface.h" #include "include/gpu/graphite/BackendTexture.h" @@ -21,7 +21,7 @@ #include "dawn/dawn_proc.h" -namespace sk_app { +namespace skwindow::internal { GraphiteDawnWindowContext::GraphiteDawnWindowContext(const DisplayParams& params, wgpu::TextureFormat swapChainFormat) @@ -96,6 +96,17 @@ sk_sp GraphiteDawnWindowContext::getBackbufferSurface() { } void GraphiteDawnWindowContext::onSwapBuffers() { + if (fGraphiteContext) { + SkASSERT(fGraphiteRecorder); + std::unique_ptr recording = fGraphiteRecorder->snap(); + if (recording) { + skgpu::graphite::InsertRecordingInfo info; + info.fRecording = recording.get(); + fGraphiteContext->insertRecording(info); + fGraphiteContext->submit(skgpu::graphite::SyncToCpu::kNo); + } + } + fSwapChain.Present(); } @@ -104,27 +115,29 @@ void GraphiteDawnWindowContext::setDisplayParams(const DisplayParams& params) { } wgpu::Device GraphiteDawnWindowContext::createDevice(wgpu::BackendType type) { - fInstance->DiscoverDefaultPhysicalDevices(); DawnProcTable backendProcs = dawn::native::GetProcs(); dawnProcSetProcs(&backendProcs); - std::vector adapters = fInstance->GetAdapters(); - for (dawn::native::Adapter adapter : adapters) { - wgpu::AdapterProperties properties; - adapter.GetProperties(&properties); - if (properties.backendType != type) { - continue; - } - auto device = wgpu::Device::Acquire(adapter.CreateDevice()); - device.SetUncapturedErrorCallback( - [](WGPUErrorType type, const char* message, void*) { - SkDebugf("Device error: %s\n", message); - SkASSERT(false); - }, - 0); - return device; + wgpu::RequestAdapterOptions adapterOptions; + adapterOptions.backendType = type; + + std::vector adapters = fInstance->EnumerateAdapters(&adapterOptions); + if (adapters.empty()) { + return nullptr; + } + + auto device = wgpu::Device::Acquire(adapters[0].CreateDevice()); + if (!device) { + return nullptr; } - return nullptr; + + device.SetUncapturedErrorCallback( + [](WGPUErrorType type, const char* message, void*) { + SkDebugf("Device error: %s\n", message); + SkASSERT(false); + }, + nullptr); + return device; } wgpu::SwapChain GraphiteDawnWindowContext::createSwapChain() { @@ -139,4 +152,4 @@ wgpu::SwapChain GraphiteDawnWindowContext::createSwapChain() { return swapChain; } -} //namespace sk_app +} //namespace skwindow::internal diff --git a/tools/sk_app/GraphiteDawnWindowContext.h b/tools/window/GraphiteDawnWindowContext.h similarity index 93% rename from tools/sk_app/GraphiteDawnWindowContext.h rename to tools/window/GraphiteDawnWindowContext.h index 710270e3fe33..6a5bfb41b8a4 100644 --- a/tools/sk_app/GraphiteDawnWindowContext.h +++ b/tools/window/GraphiteDawnWindowContext.h @@ -7,11 +7,11 @@ #ifndef GraphiteDawnWindowContext_DEFINED #define GraphiteDawnWindowContext_DEFINED -#include "tools/sk_app/WindowContext.h" +#include "tools/window/WindowContext.h" #include "webgpu/webgpu_cpp.h" #include "dawn/native/DawnNative.h" -namespace sk_app { +namespace skwindow::internal { class GraphiteDawnWindowContext : public WindowContext { public: @@ -44,6 +44,6 @@ class GraphiteDawnWindowContext : public WindowContext { wgpu::SwapChain fSwapChain; }; -} // namespace sk_app +} // namespace skwindow::internal #endif diff --git a/tools/sk_app/GraphiteMetalWindowContext.h b/tools/window/GraphiteMetalWindowContext.h similarity index 93% rename from tools/sk_app/GraphiteMetalWindowContext.h rename to tools/window/GraphiteMetalWindowContext.h index f8671b513544..41e3b8171f2b 100644 --- a/tools/sk_app/GraphiteMetalWindowContext.h +++ b/tools/window/GraphiteMetalWindowContext.h @@ -10,14 +10,14 @@ #include "include/core/SkRefCnt.h" #include "include/ports/SkCFObject.h" -#include "tools/sk_app/WindowContext.h" +#include "tools/window/WindowContext.h" #import #import class SkSurface; -namespace sk_app { +namespace skwindow::internal { class GraphiteMetalWindowContext : public WindowContext { public: @@ -51,6 +51,6 @@ class GraphiteMetalWindowContext : public WindowContext { CFTypeRef fDrawableHandle; }; -} // namespace sk_app +} // namespace skwindow::internal #endif diff --git a/tools/sk_app/GraphiteMetalWindowContext.mm b/tools/window/GraphiteMetalWindowContext.mm similarity index 85% rename from tools/sk_app/GraphiteMetalWindowContext.mm rename to tools/window/GraphiteMetalWindowContext.mm index ca65ad5db646..17c566aaf6e9 100644 --- a/tools/sk_app/GraphiteMetalWindowContext.mm +++ b/tools/window/GraphiteMetalWindowContext.mm @@ -5,8 +5,6 @@ * found in the LICENSE file. */ -#include "tools/sk_app/GraphiteMetalWindowContext.h" - #include "include/core/SkSurface.h" #include "include/gpu/graphite/BackendTexture.h" #include "include/gpu/graphite/Context.h" @@ -19,11 +17,12 @@ #include "include/gpu/graphite/mtl/MtlGraphiteUtils.h" #include "src/base/SkMathPriv.h" #include "tools/ToolUtils.h" +#include "tools/window/GraphiteMetalWindowContext.h" -using sk_app::DisplayParams; -using sk_app::GraphiteMetalWindowContext; +using skwindow::DisplayParams; +using skwindow::internal::GraphiteMetalWindowContext; -namespace sk_app { +namespace skwindow::internal { GraphiteMetalWindowContext::GraphiteMetalWindowContext(const DisplayParams& params) : WindowContext(params) @@ -87,6 +86,9 @@ sk_sp GraphiteMetalWindowContext::getBackbufferSurface() { sk_sp surface; id currentDrawable = [fMetalLayer nextDrawable]; + if (currentDrawable == nil) { + return nullptr; + } skgpu::graphite::BackendTexture backendTex(this->dimensions(), (skgpu::graphite::MtlHandle)currentDrawable.texture); @@ -96,13 +98,23 @@ kBGRA_8888_SkColorType, fDisplayParams.fColorSpace, &fDisplayParams.fSurfaceProps); - fDrawableHandle = CFRetain((skgpu::graphite::MtlHandle) currentDrawable); return surface; } void GraphiteMetalWindowContext::onSwapBuffers() { + if (fGraphiteContext) { + SkASSERT(fGraphiteRecorder); + std::unique_ptr recording = fGraphiteRecorder->snap(); + if (recording) { + skgpu::graphite::InsertRecordingInfo info; + info.fRecording = recording.get(); + fGraphiteContext->insertRecording(info); + fGraphiteContext->submit(skgpu::graphite::SyncToCpu::kNo); + } + } + id currentDrawable = (id)fDrawableHandle; id commandBuffer([*fQueue commandBuffer]); @@ -123,4 +135,4 @@ void GraphiteMetalWindowContext::activate(bool isActive) {} -} //namespace sk_app +} //namespace skwindow::internal diff --git a/tools/sk_app/VulkanWindowContext.cpp b/tools/window/GraphiteVulkanWindowContext.cpp similarity index 70% rename from tools/sk_app/VulkanWindowContext.cpp rename to tools/window/GraphiteVulkanWindowContext.cpp index 59b5c067c2c8..22737cee5448 100644 --- a/tools/sk_app/VulkanWindowContext.cpp +++ b/tools/window/GraphiteVulkanWindowContext.cpp @@ -1,24 +1,29 @@ - /* - * Copyright 2015 Google Inc. + * Copyright 2023 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ -#include "tools/sk_app/VulkanWindowContext.h" +#include "tools/window/GraphiteVulkanWindowContext.h" #include "include/core/SkSurface.h" -#include "include/gpu/GrBackendSemaphore.h" -#include "include/gpu/GrBackendSurface.h" -#include "include/gpu/GrDirectContext.h" -#include "include/gpu/ganesh/SkSurfaceGanesh.h" -#include "include/gpu/vk/GrVkTypes.h" +#include "include/gpu/MutableTextureState.h" +#include "include/gpu/graphite/BackendSemaphore.h" +#include "include/gpu/graphite/BackendTexture.h" +#include "include/gpu/graphite/Context.h" +#include "include/gpu/graphite/ContextOptions.h" +#include "include/gpu/graphite/GraphiteTypes.h" +#include "include/gpu/graphite/Recorder.h" +#include "include/gpu/graphite/Surface.h" +#include "include/gpu/graphite/TextureInfo.h" +#include "include/gpu/graphite/vk/VulkanGraphiteTypes.h" +#include "include/gpu/graphite/vk/VulkanGraphiteUtils.h" #include "include/gpu/vk/VulkanExtensions.h" #include "src/base/SkAutoMalloc.h" -#include "src/gpu/ganesh/vk/GrVkImage.h" -#include "src/gpu/ganesh/vk/GrVkUtil.h" +#include "src/gpu/graphite/vk/VulkanGraphiteUtilsPriv.h" #include "src/gpu/vk/VulkanInterface.h" +#include "tools/ToolUtils.h" #ifdef VK_USE_PLATFORM_WIN32_KHR // windows wants to define this as CreateSemaphoreA or CreateSemaphoreW @@ -30,12 +35,12 @@ #define GET_DEV_PROC(F) f ## F = \ (PFN_vk ## F) backendContext.fGetProc("vk" #F, VK_NULL_HANDLE, fDevice) -namespace sk_app { +namespace skwindow::internal { -VulkanWindowContext::VulkanWindowContext(const DisplayParams& params, - CreateVkSurfaceFn createVkSurface, - CanPresentFn canPresent, - PFN_vkGetInstanceProcAddr instProc) +GraphiteVulkanWindowContext::GraphiteVulkanWindowContext(const DisplayParams& params, + CreateVkSurfaceFn createVkSurface, + CanPresentFn canPresent, + PFN_vkGetInstanceProcAddr instProc) : WindowContext(params) , fCreateVkSurfaceFn(createVkSurface) , fCanPresentFn(canPresent) @@ -49,12 +54,12 @@ VulkanWindowContext::VulkanWindowContext(const DisplayParams& params, this->initializeContext(); } -void VulkanWindowContext::initializeContext() { - SkASSERT(!fContext); +void GraphiteVulkanWindowContext::initializeContext() { + SkASSERT(!fGraphiteContext && !fGraphiteRecorder); // any config code here (particularly for msaa)? PFN_vkGetInstanceProcAddr getInstanceProc = fGetInstanceProcAddr; - GrVkBackendContext backendContext; + skgpu::VulkanBackendContext backendContext; skgpu::VulkanExtensions extensions; VkPhysicalDeviceFeatures2 features; if (!sk_gpu_test::CreateVkBackendContext(getInstanceProc, &backendContext, &extensions, @@ -90,7 +95,7 @@ void VulkanWindowContext::initializeContext() { uint32_t physDevVersion = physDeviceProperties.apiVersion; fInterface.reset(new skgpu::VulkanInterface(backendContext.fGetProc, fInstance, fDevice, - backendContext.fInstanceVersion, physDevVersion, + backendContext.fMaxAPIVersion, physDevVersion, &extensions)); GET_PROC(DestroyInstance); @@ -112,7 +117,10 @@ void VulkanWindowContext::initializeContext() { GET_DEV_PROC(QueuePresentKHR); GET_DEV_PROC(GetDeviceQueue); - fContext = GrDirectContext::MakeVulkan(backendContext, fDisplayParams.fGrContextOptions); + skgpu::graphite::ContextOptions contextOptions; + contextOptions.fStoreContextRefInRecorder = true; + fGraphiteContext = skgpu::graphite::ContextFactory::MakeVulkan(backendContext, contextOptions); + fGraphiteRecorder = fGraphiteContext->makeRecorder(ToolUtils::CreateTestingRecorderOptions()); fSurface = fCreateVkSurfaceFn(fInstance); if (VK_NULL_HANDLE == fSurface) { @@ -141,8 +149,8 @@ void VulkanWindowContext::initializeContext() { sk_gpu_test::FreeVulkanFeaturesStructs(&features); } -bool VulkanWindowContext::createSwapchain(int width, int height, - const DisplayParams& params) { +bool GraphiteVulkanWindowContext::createSwapchain(int width, int height, + const DisplayParams& params) { // check for capabilities VkSurfaceCapabilitiesKHR caps; VkResult res = fGetPhysicalDeviceSurfaceCapabilitiesKHR(fPhysicalDevice, fSurface, &caps); @@ -232,7 +240,7 @@ bool VulkanWindowContext::createSwapchain(int width, int height, VkColorSpaceKHR colorSpace = VK_COLORSPACE_SRGB_NONLINEAR_KHR; for (uint32_t i = 0; i < surfaceFormatCount; ++i) { VkFormat localFormat = surfaceFormats[i].format; - if (GrVkFormatIsSupported(localFormat)) { + if (skgpu::graphite::vkFormatIsSupported(localFormat)) { surfaceFormat = localFormat; colorSpace = surfaceFormats[i].colorSpace; break; @@ -316,6 +324,7 @@ bool VulkanWindowContext::createSwapchain(int width, int height, this->destroyBuffers(); fDestroySwapchainKHR(fDevice, swapchainCreateInfo.oldSwapchain, nullptr); + swapchainCreateInfo.oldSwapchain = VK_NULL_HANDLE; } if (!this->createBuffers(swapchainCreateInfo.imageFormat, usageFlags, colorType, @@ -325,14 +334,15 @@ bool VulkanWindowContext::createSwapchain(int width, int height, this->destroyBuffers(); fDestroySwapchainKHR(fDevice, swapchainCreateInfo.oldSwapchain, nullptr); + swapchainCreateInfo.oldSwapchain = VK_NULL_HANDLE; } return true; } -bool VulkanWindowContext::createBuffers(VkFormat format, VkImageUsageFlags usageFlags, - SkColorType colorType, - VkSharingMode sharingMode) { +bool GraphiteVulkanWindowContext::createBuffers(VkFormat format, VkImageUsageFlags usageFlags, + SkColorType colorType, + VkSharingMode sharingMode) { fGetSwapchainImagesKHR(fDevice, fSwapchain, &fImageCount, nullptr); SkASSERT(fImageCount); fImages = new VkImage[fImageCount]; @@ -344,38 +354,23 @@ bool VulkanWindowContext::createBuffers(VkFormat format, VkImageUsageFlags usage for (uint32_t i = 0; i < fImageCount; ++i) { fImageLayouts[i] = VK_IMAGE_LAYOUT_UNDEFINED; - GrVkImageInfo info; - info.fImage = fImages[i]; - info.fAlloc = skgpu::VulkanAlloc(); - info.fImageLayout = VK_IMAGE_LAYOUT_UNDEFINED; + skgpu::graphite::VulkanTextureInfo info; info.fImageTiling = VK_IMAGE_TILING_OPTIMAL; info.fFormat = format; info.fImageUsageFlags = usageFlags; - info.fLevelCount = 1; - info.fCurrentQueueFamily = fPresentQueueIndex; info.fSharingMode = sharingMode; - if (usageFlags & VK_IMAGE_USAGE_SAMPLED_BIT) { - GrBackendTexture backendTexture(fWidth, fHeight, info); - fSurfaces[i] = SkSurfaces::WrapBackendTexture(fContext.get(), - backendTexture, - kTopLeft_GrSurfaceOrigin, - fDisplayParams.fMSAASampleCount, - colorType, - fDisplayParams.fColorSpace, - &fDisplayParams.fSurfaceProps); - } else { - if (fDisplayParams.fMSAASampleCount > 1) { - return false; - } - GrBackendRenderTarget backendRT(fWidth, fHeight, fSampleCount, info); - fSurfaces[i] = SkSurfaces::WrapBackendRenderTarget(fContext.get(), - backendRT, - kTopLeft_GrSurfaceOrigin, - colorType, - fDisplayParams.fColorSpace, - &fDisplayParams.fSurfaceProps); - } + skgpu::graphite::BackendTexture backendTex(this->dimensions(), + info, + VK_IMAGE_LAYOUT_UNDEFINED, + fPresentQueueIndex, + fImages[i]); + fSurfaces[i] = SkSurfaces::WrapBackendTexture(this->graphiteRecorder(), + backendTex, + colorType, + fDisplayParams.fColorSpace, + &fDisplayParams.fSurfaceProps); + if (!fSurfaces[i]) { return false; } @@ -393,24 +388,24 @@ bool VulkanWindowContext::createBuffers(VkFormat format, VkImageUsageFlags usage fBackbuffers = new BackbufferInfo[fImageCount + 1]; for (uint32_t i = 0; i < fImageCount + 1; ++i) { fBackbuffers[i].fImageIndex = -1; - SkDEBUGCODE(VkResult result = )GR_VK_CALL(fInterface, - CreateSemaphore(fDevice, &semaphoreInfo, nullptr, - &fBackbuffers[i].fRenderSemaphore)); - SkASSERT(result == VK_SUCCESS); + VkResult result; + VULKAN_CALL_RESULT(fInterface, result, + CreateSemaphore(fDevice, &semaphoreInfo, nullptr, + &fBackbuffers[i].fRenderSemaphore)); } fCurrentBackbufferIndex = fImageCount; + return true; } -void VulkanWindowContext::destroyBuffers() { - +void GraphiteVulkanWindowContext::destroyBuffers() { if (fBackbuffers) { for (uint32_t i = 0; i < fImageCount + 1; ++i) { fBackbuffers[i].fImageIndex = -1; - GR_VK_CALL(fInterface, - DestroySemaphore(fDevice, - fBackbuffers[i].fRenderSemaphore, - nullptr)); + VULKAN_CALL(fInterface, + DestroySemaphore(fDevice, + fBackbuffers[i].fRenderSemaphore, + nullptr)); } } @@ -426,33 +421,40 @@ void VulkanWindowContext::destroyBuffers() { fImages = nullptr; } -VulkanWindowContext::~VulkanWindowContext() { - this->destroyContext(); +GraphiteVulkanWindowContext::~GraphiteVulkanWindowContext() { + this->destroyContext(); } -void VulkanWindowContext::destroyContext() { +void GraphiteVulkanWindowContext::destroyContext() { if (this->isValid()) { fQueueWaitIdle(fPresentQueue); fDeviceWaitIdle(fDevice); + if (fWaitSemaphore != VK_NULL_HANDLE) { + VULKAN_CALL(fInterface, DestroySemaphore(fDevice, fWaitSemaphore, nullptr)); + fWaitSemaphore = VK_NULL_HANDLE; + } + this->destroyBuffers(); - if (VK_NULL_HANDLE != fSwapchain) { + if (fSwapchain != VK_NULL_HANDLE) { fDestroySwapchainKHR(fDevice, fSwapchain, nullptr); fSwapchain = VK_NULL_HANDLE; } - if (VK_NULL_HANDLE != fSurface) { + if (fSurface != VK_NULL_HANDLE) { fDestroySurfaceKHR(fInstance, fSurface, nullptr); fSurface = VK_NULL_HANDLE; } } - SkASSERT(fContext->unique()); - fContext.reset(); + if (fGraphiteContext) { + fGraphiteRecorder.reset(); + fGraphiteContext.reset(); + } fInterface.reset(); - if (VK_NULL_HANDLE != fDevice) { + if (fDevice != VK_NULL_HANDLE) { fDestroyDevice(fDevice, nullptr); fDevice = VK_NULL_HANDLE; } @@ -465,13 +467,13 @@ void VulkanWindowContext::destroyContext() { fPhysicalDevice = VK_NULL_HANDLE; - if (VK_NULL_HANDLE != fInstance) { + if (fInstance != VK_NULL_HANDLE) { fDestroyInstance(fInstance, nullptr); fInstance = VK_NULL_HANDLE; } } -VulkanWindowContext::BackbufferInfo* VulkanWindowContext::getAvailableBackbuffer() { +GraphiteVulkanWindowContext::BackbufferInfo* GraphiteVulkanWindowContext::getAvailableBackbuffer() { SkASSERT(fBackbuffers); ++fCurrentBackbufferIndex; @@ -483,7 +485,7 @@ VulkanWindowContext::BackbufferInfo* VulkanWindowContext::getAvailableBackbuffer return backbuffer; } -sk_sp VulkanWindowContext::getBackbufferSurface() { +sk_sp GraphiteVulkanWindowContext::getBackbufferSurface() { BackbufferInfo* backbuffer = this->getAvailableBackbuffer(); SkASSERT(backbuffer); @@ -493,65 +495,91 @@ sk_sp VulkanWindowContext::getBackbufferSurface() { semaphoreInfo.sType = VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO; semaphoreInfo.pNext = nullptr; semaphoreInfo.flags = 0; - VkSemaphore semaphore; - SkDEBUGCODE(VkResult result = )GR_VK_CALL(fInterface, CreateSemaphore(fDevice, &semaphoreInfo, - nullptr, &semaphore)); - SkASSERT(result == VK_SUCCESS); + VkResult result; + VULKAN_CALL_RESULT(fInterface, result, + CreateSemaphore(fDevice, &semaphoreInfo, nullptr, &fWaitSemaphore)); // acquire the image VkResult res = fAcquireNextImageKHR(fDevice, fSwapchain, UINT64_MAX, - semaphore, VK_NULL_HANDLE, + fWaitSemaphore, VK_NULL_HANDLE, &backbuffer->fImageIndex); if (VK_ERROR_SURFACE_LOST_KHR == res) { - // need to figure out how to create a new vkSurface without the platformData* - // maybe use attach somehow? but need a Window - GR_VK_CALL(fInterface, DestroySemaphore(fDevice, semaphore, nullptr)); + // TODO: Recreate fSurface using fCreateVkSurfaceFn, and then rebuild the swapchain + VULKAN_CALL(fInterface, DestroySemaphore(fDevice, fWaitSemaphore, nullptr)); return nullptr; } if (VK_ERROR_OUT_OF_DATE_KHR == res) { // tear swapchain down and try again if (!this->createSwapchain(-1, -1, fDisplayParams)) { - GR_VK_CALL(fInterface, DestroySemaphore(fDevice, semaphore, nullptr)); + VULKAN_CALL(fInterface, DestroySemaphore(fDevice, fWaitSemaphore, nullptr)); return nullptr; } backbuffer = this->getAvailableBackbuffer(); // acquire the image res = fAcquireNextImageKHR(fDevice, fSwapchain, UINT64_MAX, - semaphore, VK_NULL_HANDLE, + fWaitSemaphore, VK_NULL_HANDLE, &backbuffer->fImageIndex); if (VK_SUCCESS != res) { - GR_VK_CALL(fInterface, DestroySemaphore(fDevice, semaphore, nullptr)); + VULKAN_CALL(fInterface, DestroySemaphore(fDevice, fWaitSemaphore, nullptr)); return nullptr; } } SkSurface* surface = fSurfaces[backbuffer->fImageIndex].get(); - GrBackendSemaphore beSemaphore; - beSemaphore.initVulkan(semaphore); - - surface->wait(1, &beSemaphore); - return sk_ref_sp(surface); } -void VulkanWindowContext::onSwapBuffers() { +void GraphiteVulkanWindowContext::onSwapBuffers() { + if (!fGraphiteContext) { + return; + } + SkASSERT(fGraphiteRecorder); BackbufferInfo* backbuffer = fBackbuffers + fCurrentBackbufferIndex; - sk_sp surface = fSurfaces[backbuffer->fImageIndex]; - - GrBackendSemaphore beSemaphore; - beSemaphore.initVulkan(backbuffer->fRenderSemaphore); - GrFlushInfo info; - info.fNumSemaphores = 1; - info.fSignalSemaphores = &beSemaphore; - skgpu::MutableTextureState presentState(VK_IMAGE_LAYOUT_PRESENT_SRC_KHR, fPresentQueueIndex); - auto dContext = surface->recordingContext()->asDirectContext(); - dContext->flush(surface, info, &presentState); - dContext->submit(); + std::unique_ptr recording = fGraphiteRecorder->snap(); + if (recording) { + skgpu::graphite::InsertRecordingInfo info; + info.fRecording = recording.get(); + + // set up surface for layout transition + info.fTargetSurface = fSurfaces[backbuffer->fImageIndex].get(); + skgpu::MutableTextureState presentState(VK_IMAGE_LAYOUT_PRESENT_SRC_KHR, + fPresentQueueIndex); + info.fTargetTextureState = &presentState; + + SkASSERT(fWaitSemaphore != VK_NULL_HANDLE); + skgpu::graphite::BackendSemaphore beWaitSemaphore(fWaitSemaphore); + info.fNumWaitSemaphores = 1; + info.fWaitSemaphores = &beWaitSemaphore; + skgpu::graphite::BackendSemaphore beSignalSemaphore(backbuffer->fRenderSemaphore); + info.fNumSignalSemaphores = 1; + info.fSignalSemaphores = &beSignalSemaphore; + + // Insert finishedProc to delete waitSemaphore when done + struct FinishContext { + sk_sp interface; + VkDevice device; + VkSemaphore waitSemaphore; + }; + auto* finishContext = new FinishContext{fInterface, fDevice, fWaitSemaphore}; + skgpu::graphite::GpuFinishedProc finishCallback = [](skgpu::graphite::GpuFinishedContext c, + skgpu::CallbackResult status) { + // regardless of the status we need to destroy the semaphore + const auto* context = reinterpret_cast(c); + VULKAN_CALL(context->interface, + DestroySemaphore(context->device, context->waitSemaphore, nullptr)); + }; + info.fFinishedContext = finishContext; + info.fFinishedProc = finishCallback; + + fGraphiteContext->insertRecording(info); + fGraphiteContext->submit(skgpu::graphite::SyncToCpu::kNo); + fWaitSemaphore = VK_NULL_HANDLE; // FinishCallback will destroy this + } // Submit present operation to present queue const VkPresentInfoKHR presentInfo = @@ -569,4 +597,4 @@ void VulkanWindowContext::onSwapBuffers() { fQueuePresentKHR(fPresentQueue, &presentInfo); } -} //namespace sk_app +} //namespace skwindow::internal diff --git a/tools/sk_app/VulkanWindowContext.h b/tools/window/GraphiteVulkanWindowContext.h similarity index 87% rename from tools/sk_app/VulkanWindowContext.h rename to tools/window/GraphiteVulkanWindowContext.h index 6a2c67d29d0f..c83138711bc4 100644 --- a/tools/sk_app/VulkanWindowContext.h +++ b/tools/window/GraphiteVulkanWindowContext.h @@ -1,30 +1,28 @@ - /* - * Copyright 2016 Google Inc. + * Copyright 2023 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ -#ifndef VulkanWindowContext_DEFINED -#define VulkanWindowContext_DEFINED +#ifndef GraphiteVulkanWindowContext_DEFINED +#define GraphiteVulkanWindowContext_DEFINED #include "include/core/SkTypes.h" #ifdef SK_VULKAN -#include "include/gpu/vk/GrVkBackendContext.h" #include "tools/gpu/vk/VkTestUtils.h" -#include "tools/sk_app/WindowContext.h" +#include "tools/window/WindowContext.h" class GrRenderTarget; namespace skgpu { struct VulkanInterface; } -namespace sk_app { +namespace skwindow::internal { -class VulkanWindowContext : public WindowContext { +class GraphiteVulkanWindowContext : public WindowContext { public: - ~VulkanWindowContext() override; + ~GraphiteVulkanWindowContext() override; sk_sp getBackbufferSurface() override; @@ -45,8 +43,8 @@ class VulkanWindowContext : public WindowContext { /** Platform specific function that determines whether presentation will succeed. */ using CanPresentFn = sk_gpu_test::CanPresentFn; - VulkanWindowContext(const DisplayParams&, CreateVkSurfaceFn, CanPresentFn, - PFN_vkGetInstanceProcAddr); + GraphiteVulkanWindowContext(const DisplayParams&, CreateVkSurfaceFn, CanPresentFn, + PFN_vkGetInstanceProcAddr); private: void initializeContext(); @@ -109,10 +107,11 @@ class VulkanWindowContext : public WindowContext { sk_sp* fSurfaces; // surfaces client renders to (may not be based on rts) BackbufferInfo* fBackbuffers; uint32_t fCurrentBackbufferIndex; + VkSemaphore fWaitSemaphore = VK_NULL_HANDLE; }; } // namespace sk_app #endif // SK_VULKAN -#endif +#endif // GraphiteVulkanWindowContext_DEFINED diff --git a/tools/sk_app/MetalWindowContext.h b/tools/window/MetalWindowContext.h similarity index 94% rename from tools/sk_app/MetalWindowContext.h rename to tools/window/MetalWindowContext.h index 74e047d32928..8f0f91b3e7b1 100644 --- a/tools/sk_app/MetalWindowContext.h +++ b/tools/window/MetalWindowContext.h @@ -12,12 +12,12 @@ #include "include/ports/SkCFObject.h" #include "include/private/gpu/ganesh/GrMtlTypesPriv.h" -#include "tools/sk_app/WindowContext.h" +#include "tools/window/WindowContext.h" #import #import -namespace sk_app { +namespace skwindow::internal { class MetalWindowContext : public WindowContext { public: @@ -57,6 +57,6 @@ class MetalWindowContext : public WindowContext { #endif }; -} // namespace sk_app +} // namespace skwindow::internal #endif diff --git a/tools/sk_app/MetalWindowContext.mm b/tools/window/MetalWindowContext.mm similarity index 96% rename from tools/sk_app/MetalWindowContext.mm rename to tools/window/MetalWindowContext.mm index ae9af00622a2..b76bfb091e6b 100644 --- a/tools/sk_app/MetalWindowContext.mm +++ b/tools/window/MetalWindowContext.mm @@ -5,8 +5,6 @@ * found in the LICENSE file. */ -#include "tools/sk_app/MetalWindowContext.h" - #include "include/core/SkCanvas.h" #include "include/core/SkSurface.h" #include "include/gpu/GrBackendSurface.h" @@ -19,11 +17,12 @@ #include "src/gpu/ganesh/GrCaps.h" #include "src/gpu/ganesh/GrDirectContextPriv.h" #include "src/image/SkImage_Base.h" +#include "tools/window/MetalWindowContext.h" -using sk_app::DisplayParams; -using sk_app::MetalWindowContext; +using skwindow::DisplayParams; +using skwindow::internal::MetalWindowContext; -namespace sk_app { +namespace skwindow::internal { MetalWindowContext::MetalWindowContext(const DisplayParams& params) : WindowContext(params) @@ -133,6 +132,9 @@ &fDrawableHandle); } else { id currentDrawable = [fMetalLayer nextDrawable]; + if (currentDrawable == nil) { + return nullptr; + } GrMtlTextureInfo fbInfo; fbInfo.fTexture.retain(currentDrawable.texture); @@ -193,4 +195,4 @@ GrBackendRenderTarget backendRT(fWidth, } } -} //namespace sk_app +} //namespace skwindow::internal diff --git a/tools/sk_app/RasterWindowContext.h b/tools/window/RasterWindowContext.h similarity index 80% rename from tools/sk_app/RasterWindowContext.h rename to tools/window/RasterWindowContext.h index 4a01aab88254..0f4db176a705 100644 --- a/tools/sk_app/RasterWindowContext.h +++ b/tools/window/RasterWindowContext.h @@ -8,9 +8,9 @@ #ifndef RasterWindowContext_DEFINED #define RasterWindowContext_DEFINED -#include "tools/sk_app/WindowContext.h" +#include "tools/window/WindowContext.h" -namespace sk_app { +namespace skwindow::internal { class RasterWindowContext : public WindowContext { public: @@ -20,6 +20,6 @@ class RasterWindowContext : public WindowContext { bool isGpuContext() override { return false; } }; -} // namespace sk_app +} // namespace skwindow::internal #endif diff --git a/tools/window/VulkanWindowContext.cpp b/tools/window/VulkanWindowContext.cpp index c9efef89b2fe..58a41112d037 100644 --- a/tools/window/VulkanWindowContext.cpp +++ b/tools/window/VulkanWindowContext.cpp @@ -58,7 +58,8 @@ void VulkanWindowContext::initializeContext() { VkPhysicalDeviceFeatures2 features; if (!sk_gpu_test::CreateVkBackendContext(getInstanceProc, &backendContext, &extensions, &features, &fDebugCallback, &fPresentQueueIndex, - fCanPresentFn)) { + fCanPresentFn, + fDisplayParams.fCreateProtectedNativeBackend)) { sk_gpu_test::FreeVulkanFeaturesStructs(&features); return; } @@ -278,6 +279,9 @@ bool VulkanWindowContext::createSwapchain(int width, int height, VkSwapchainCreateInfoKHR swapchainCreateInfo; memset(&swapchainCreateInfo, 0, sizeof(VkSwapchainCreateInfoKHR)); swapchainCreateInfo.sType = VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR; + swapchainCreateInfo.flags = fDisplayParams.fCreateProtectedNativeBackend + ? VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR + : 0; swapchainCreateInfo.surface = fSurface; swapchainCreateInfo.minImageCount = imageCount; swapchainCreateInfo.imageFormat = surfaceFormat; @@ -329,7 +333,8 @@ bool VulkanWindowContext::createSwapchain(int width, int height, return true; } -bool VulkanWindowContext::createBuffers(VkFormat format, VkImageUsageFlags usageFlags, +bool VulkanWindowContext::createBuffers(VkFormat format, + VkImageUsageFlags usageFlags, SkColorType colorType, VkSharingMode sharingMode) { fGetSwapchainImagesKHR(fDevice, fSwapchain, &fImageCount, nullptr); @@ -352,6 +357,7 @@ bool VulkanWindowContext::createBuffers(VkFormat format, VkImageUsageFlags usage info.fImageUsageFlags = usageFlags; info.fLevelCount = 1; info.fCurrentQueueFamily = fPresentQueueIndex; + info.fProtected = skgpu::Protected(fDisplayParams.fCreateProtectedNativeBackend); info.fSharingMode = sharingMode; if (usageFlags & VK_IMAGE_USAGE_SAMPLED_BIT) { diff --git a/tools/window/WindowContext.cpp b/tools/window/WindowContext.cpp index 6b994bdeb62e..d8e3bbbbae9c 100644 --- a/tools/window/WindowContext.cpp +++ b/tools/window/WindowContext.cpp @@ -21,18 +21,6 @@ WindowContext::WindowContext(const DisplayParams& params) WindowContext::~WindowContext() {} void WindowContext::swapBuffers() { -#if defined(SK_GRAPHITE) - if (fGraphiteContext) { - SkASSERT(fGraphiteRecorder); - std::unique_ptr recording = fGraphiteRecorder->snap(); - if (recording) { - skgpu::graphite::InsertRecordingInfo info; - info.fRecording = recording.get(); - fGraphiteContext->insertRecording(info); - fGraphiteContext->submit(skgpu::graphite::SyncToCpu::kNo); - } - } -#endif this->onSwapBuffers(); } diff --git a/tools/window/android/BUILD.bazel b/tools/window/android/BUILD.bazel index 4633d7a1a9fc..ea143db486ba 100644 --- a/tools/window/android/BUILD.bazel +++ b/tools/window/android/BUILD.bazel @@ -9,6 +9,7 @@ skia_filegroup( # TODO: break up into seperate targets srcs = [ "GLWindowContext_android.cpp", + "RasterWindowContext_android.cpp", "VulkanWindowContext_android.cpp", "WindowContextFactory_android.h", ], @@ -19,7 +20,7 @@ skia_cc_deps( name = "deps", visibility = ["//tools/window:__pkg__"], deps = select({ - "//src/gpu:vulkan_backend": ["//tools/gpu/vk:testutils"], + "//src/gpu:vulkan_ganesh": ["//tools/gpu/vk:testutils"], "//conditions:default": [], }), ) diff --git a/tools/window/android/GLWindowContext_android.cpp b/tools/window/android/GLWindowContext_android.cpp index e3fc1a1aef34..f142de12ca0f 100644 --- a/tools/window/android/GLWindowContext_android.cpp +++ b/tools/window/android/GLWindowContext_android.cpp @@ -11,6 +11,8 @@ #include "tools/window/GLWindowContext.h" #include "tools/window/android/WindowContextFactory_android.h" +#define EGL_PROTECTED_CONTENT_EXT 0x32C0 + namespace { class GLWindowContext_android : public skwindow::internal::GLWindowContext { public: @@ -62,6 +64,14 @@ sk_sp GLWindowContext_android::onInitializeContext() { EGLint minorVersion; eglInitialize(fDisplay, &majorVersion, &minorVersion); + const char* extensions = eglQueryString(fDisplay, EGL_EXTENSIONS); + + if (fDisplayParams.fCreateProtectedNativeBackend && + !strstr(extensions, "EGL_EXT_protected_content")) { + SkDebugf("Protected Context requested but no protected support\n"); + fDisplayParams.fCreateProtectedNativeBackend = false; + } + SkAssertResult(eglBindAPI(EGL_OPENGL_ES_API)); EGLint numConfigs = 0; @@ -84,12 +94,19 @@ sk_sp GLWindowContext_android::onInitializeContext() { SkAssertResult(eglChooseConfig(fDisplay, configAttribs, &surfaceConfig, 1, &numConfigs)); SkASSERT(numConfigs > 0); - static const EGLint kEGLContextAttribsForOpenGLES[] = { - EGL_CONTEXT_CLIENT_VERSION, 2, - EGL_NONE + std::vector kEGLContextAttribsForOpenGLES = { + EGL_CONTEXT_CLIENT_VERSION, 2, }; + + if (fDisplayParams.fCreateProtectedNativeBackend) { + kEGLContextAttribsForOpenGLES.push_back(EGL_PROTECTED_CONTENT_EXT); + kEGLContextAttribsForOpenGLES.push_back(EGL_TRUE); + } + + kEGLContextAttribsForOpenGLES.push_back(EGL_NONE); + fEGLContext = eglCreateContext( - fDisplay, surfaceConfig, nullptr, kEGLContextAttribsForOpenGLES); + fDisplay, surfaceConfig, nullptr, kEGLContextAttribsForOpenGLES.data()); SkASSERT(EGL_NO_CONTEXT != fEGLContext); // SkDebugf("EGL: %d.%d", majorVersion, minorVersion); diff --git a/tools/sk_app/android/RasterWindowContext_android.cpp b/tools/window/android/RasterWindowContext_android.cpp similarity index 92% rename from tools/sk_app/android/RasterWindowContext_android.cpp rename to tools/window/android/RasterWindowContext_android.cpp index 09b0a0b8ad68..e1d70b52a520 100644 --- a/tools/sk_app/android/RasterWindowContext_android.cpp +++ b/tools/window/android/RasterWindowContext_android.cpp @@ -8,11 +8,11 @@ #include "include/core/SkSurface.h" #include "include/core/SkTypes.h" -#include "tools/sk_app/RasterWindowContext.h" -#include "tools/sk_app/android/WindowContextFactory_android.h" +#include "tools/window/RasterWindowContext.h" +#include "tools/window/android/WindowContextFactory_android.h" -using sk_app::RasterWindowContext; -using sk_app::DisplayParams; +using skwindow::internal::RasterWindowContext; +using skwindow::DisplayParams; namespace { class RasterWindowContext_android : public RasterWindowContext { @@ -91,9 +91,7 @@ void RasterWindowContext_android::onSwapBuffers() { } } // anonymous namespace -namespace sk_app { -namespace window_context_factory { - +namespace skwindow { std::unique_ptr MakeRasterForAndroid(ANativeWindow* window, const DisplayParams& params) { std::unique_ptr ctx(new RasterWindowContext_android(window, params)); @@ -103,5 +101,4 @@ std::unique_ptr MakeRasterForAndroid(ANativeWindow* window, return ctx; } -} -} // namespace sk_app +} // namespace skwindow diff --git a/tools/window/android/WindowContextFactory_android.h b/tools/window/android/WindowContextFactory_android.h index 3cfaa1f3e1e0..4ceee26df00d 100644 --- a/tools/window/android/WindowContextFactory_android.h +++ b/tools/window/android/WindowContextFactory_android.h @@ -21,6 +21,8 @@ std::unique_ptr MakeVulkanForAndroid(ANativeWindow*, const Displa std::unique_ptr MakeGLForAndroid(ANativeWindow*, const DisplayParams&); +std::unique_ptr MakeRasterForAndroid(ANativeWindow*, const DisplayParams&); + } // namespace skwindow #endif diff --git a/tools/sk_app/ios/GLWindowContext_ios.mm b/tools/window/ios/GLWindowContext_ios.mm similarity index 93% rename from tools/sk_app/ios/GLWindowContext_ios.mm rename to tools/window/ios/GLWindowContext_ios.mm index eec21004f189..24587e1e9084 100644 --- a/tools/sk_app/ios/GLWindowContext_ios.mm +++ b/tools/window/ios/GLWindowContext_ios.mm @@ -7,15 +7,15 @@ */ #include "include/gpu/gl/GrGLInterface.h" -#include "tools/sk_app/GLWindowContext.h" -#include "tools/sk_app/ios/WindowContextFactory_ios.h" +#include "tools/window/GLWindowContext.h" +#include "tools/window/ios/WindowContextFactory_ios.h" #import #import -using sk_app::DisplayParams; -using sk_app::window_context_factory::IOSWindowInfo; -using sk_app::GLWindowContext; +using skwindow::DisplayParams; +using skwindow::IOSWindowInfo; +using skwindow::internal::GLWindowContext; @interface GLView : MainView @end @@ -151,8 +151,7 @@ + (Class) layerClass { } // anonymous namespace -namespace sk_app { -namespace window_context_factory { +namespace skwindow { std::unique_ptr MakeGLForIOS(const IOSWindowInfo& info, const DisplayParams& params) { @@ -163,5 +162,4 @@ + (Class) layerClass { return ctx; } -} // namespace window_context_factory -} // namespace sk_app +} // namespace skwindow diff --git a/tools/sk_app/ios/MetalWindowContext_ios.mm b/tools/window/ios/MetalWindowContext_ios.mm similarity index 89% rename from tools/sk_app/ios/MetalWindowContext_ios.mm rename to tools/window/ios/MetalWindowContext_ios.mm index 0dc686473927..4870c4f5cb07 100644 --- a/tools/sk_app/ios/MetalWindowContext_ios.mm +++ b/tools/window/ios/MetalWindowContext_ios.mm @@ -5,15 +5,15 @@ * found in the LICENSE file. */ -#include "tools/sk_app/MetalWindowContext.h" -#include "tools/sk_app/ios/WindowContextFactory_ios.h" +#include "tools/window/MetalWindowContext.h" +#include "tools/window/ios/WindowContextFactory_ios.h" #import #import -using sk_app::DisplayParams; -using sk_app::window_context_factory::IOSWindowInfo; -using sk_app::MetalWindowContext; +using skwindow::DisplayParams; +using skwindow::IOSWindowInfo; +using skwindow::internal::MetalWindowContext; @interface MetalView : MainView @end @@ -97,8 +97,7 @@ + (Class) layerClass { } // anonymous namespace -namespace sk_app { -namespace window_context_factory { +namespace skwindow { std::unique_ptr MakeMetalForIOS(const IOSWindowInfo& info, const DisplayParams& params) { @@ -109,5 +108,4 @@ + (Class) layerClass { return ctx; } -} // namespace window_context_factory -} // namespace sk_app +} // namespace skwindow diff --git a/tools/sk_app/ios/RasterWindowContext_ios.mm b/tools/window/ios/RasterWindowContext_ios.mm similarity index 92% rename from tools/sk_app/ios/RasterWindowContext_ios.mm rename to tools/window/ios/RasterWindowContext_ios.mm index 88014f6a593a..18d6d9cf82be 100644 --- a/tools/sk_app/ios/RasterWindowContext_ios.mm +++ b/tools/window/ios/RasterWindowContext_ios.mm @@ -8,17 +8,19 @@ #include "include/core/SkCanvas.h" #include "include/core/SkColorFilter.h" +#include "include/gpu/GrDirectContext.h" +#include "include/gpu/GrRecordingContext.h" #include "include/gpu/gl/GrGLInterface.h" #include "tools/ToolUtils.h" -#include "tools/sk_app/GLWindowContext.h" -#include "tools/sk_app/ios/WindowContextFactory_ios.h" +#include "tools/window/GLWindowContext.h" +#include "tools/window/ios/WindowContextFactory_ios.h" #import #import -using sk_app::DisplayParams; -using sk_app::window_context_factory::IOSWindowInfo; -using sk_app::GLWindowContext; +using skwindow::DisplayParams; +using skwindow::IOSWindowInfo; +using skwindow::internal::GLWindowContext; @interface RasterView : MainView @end @@ -164,7 +166,9 @@ + (Class) layerClass { sk_sp gpuSurface = GLWindowContext::getBackbufferSurface(); SkCanvas* gpuCanvas = gpuSurface->getCanvas(); gpuCanvas->drawImage(snapshot, 0, 0); - gpuCanvas->flush(); + auto dContext = GrAsDirectContext(gpuCanvas->recordingContext()); + dContext->flushAndSubmit(); + glBindRenderbuffer(GL_RENDERBUFFER, fRenderbuffer); [fGLContext presentRenderbuffer:GL_RENDERBUFFER]; } @@ -178,8 +182,7 @@ + (Class) layerClass { } // anonymous namespace -namespace sk_app { -namespace window_context_factory { +namespace skwindow { std::unique_ptr MakeRasterForIOS(const IOSWindowInfo& info, const DisplayParams& params) { @@ -190,5 +193,4 @@ + (Class) layerClass { return ctx; } -} // namespace window_context_factory -} // namespace sk_app +} // namespace skwindow diff --git a/tools/sk_app/ios/WindowContextFactory_ios.h b/tools/window/ios/WindowContextFactory_ios.h similarity index 85% rename from tools/sk_app/ios/WindowContextFactory_ios.h rename to tools/window/ios/WindowContextFactory_ios.h index be8759f97bff..f49f901711a3 100644 --- a/tools/sk_app/ios/WindowContextFactory_ios.h +++ b/tools/window/ios/WindowContextFactory_ios.h @@ -13,16 +13,14 @@ #import -#include "tools/sk_app/WindowContext.h" +#include "tools/window/WindowContext.h" #include -namespace sk_app { +namespace skwindow { struct DisplayParams; -namespace window_context_factory { - struct IOSWindowInfo { sk_app::Window_ios* fWindow; UIViewController* fViewController; @@ -44,8 +42,6 @@ std::unique_ptr MakeGLForIOS(const IOSWindowInfo&, const DisplayP std::unique_ptr MakeRasterForIOS(const IOSWindowInfo&, const DisplayParams&); #endif -} // namespace window_context_factory - -} // namespace sk_app +} // namespace skwindow #endif diff --git a/tools/sk_app/mac/DawnMTLWindowContext_mac.mm b/tools/window/mac/DawnMTLWindowContext_mac.mm similarity index 82% rename from tools/sk_app/mac/DawnMTLWindowContext_mac.mm rename to tools/window/mac/DawnMTLWindowContext_mac.mm index fc2ef500717f..f920b51041e8 100644 --- a/tools/sk_app/mac/DawnMTLWindowContext_mac.mm +++ b/tools/window/mac/DawnMTLWindowContext_mac.mm @@ -5,17 +5,20 @@ * found in the LICENSE file. */ -#include "tools/sk_app/DawnWindowContext.h" -#include "tools/sk_app/mac/WindowContextFactory_mac.h" +#include "tools/window/DawnWindowContext.h" +#include "tools/window/DisplayParams.h" +#include "tools/window/mac/WindowContextFactory_mac.h" #include "webgpu/webgpu_cpp.h" #include "dawn/native/DawnNative.h" #import #import -namespace sk_app { +using skwindow::DisplayParams; +using skwindow::MacWindowInfo; +using skwindow::internal::DawnWindowContext; -using sk_app::window_context_factory::MacWindowInfo; +namespace { class DawnMTLWindowContext : public DawnWindowContext { public: @@ -32,7 +35,7 @@ DawnMTLWindowContext::DawnMTLWindowContext(const MacWindowInfo& info, const DisplayParams& params) : DawnWindowContext(params, wgpu::TextureFormat::BGRA8Unorm) , fMainView(info.fMainView) { - CGFloat backingScaleFactor = sk_app::GetBackingScaleFactor(fMainView); + CGFloat backingScaleFactor = skwindow::GetBackingScaleFactor(fMainView); CGSize size = fMainView.bounds.size; size.width *= backingScaleFactor; size.height *= backingScaleFactor; @@ -47,7 +50,7 @@ fLayer = [CAMetalLayer layer]; [fLayer setFramebufferOnly: YES]; [fLayer setColorspace: CGColorSpaceCreateDeviceRGB()]; - [fLayer setContentsScale: sk_app::GetBackingScaleFactor(fMainView)]; + [fLayer setContentsScale: skwindow::GetBackingScaleFactor(fMainView)]; [fLayer setContentsGravity: kCAGravityTopLeft]; [fLayer setAutoresizingMask: kCALayerHeightSizable | kCALayerWidthSizable]; @@ -70,7 +73,7 @@ } void DawnMTLWindowContext::resize(int w, int h) { - CGFloat backingScaleFactor = sk_app::GetBackingScaleFactor(fMainView); + CGFloat backingScaleFactor = skwindow::GetBackingScaleFactor(fMainView); CGSize size = fMainView.bounds.size; size.width *= backingScaleFactor; size.height *= backingScaleFactor; @@ -81,7 +84,9 @@ DawnWindowContext::resize(size.width, size.height); } -namespace window_context_factory { +} // anonymous namespace + +namespace skwindow { std::unique_ptr MakeDawnMTLForMac(const MacWindowInfo& winInfo, const DisplayParams& params) { @@ -92,6 +97,4 @@ return ctx; } -} - -} //namespace sk_app +} // namespace skwindow diff --git a/tools/sk_app/mac/GLWindowContext_mac.mm b/tools/window/mac/GLWindowContext_mac.mm similarity index 92% rename from tools/sk_app/mac/GLWindowContext_mac.mm rename to tools/window/mac/GLWindowContext_mac.mm index 20e7ee2ad6c6..fabe584009b8 100644 --- a/tools/sk_app/mac/GLWindowContext_mac.mm +++ b/tools/window/mac/GLWindowContext_mac.mm @@ -7,15 +7,15 @@ */ #include "include/gpu/gl/GrGLInterface.h" -#include "tools/sk_app/GLWindowContext.h" -#include "tools/sk_app/mac/WindowContextFactory_mac.h" +#include "tools/window/GLWindowContext.h" +#include "tools/window/mac/WindowContextFactory_mac.h" #include #include -using sk_app::DisplayParams; -using sk_app::window_context_factory::MacWindowInfo; -using sk_app::GLWindowContext; +using skwindow::DisplayParams; +using skwindow::MacWindowInfo; +using skwindow::internal::GLWindowContext; namespace { @@ -131,7 +131,7 @@ fSampleCount = sampleCount; fSampleCount = std::max(fSampleCount, 1); - CGFloat backingScaleFactor = sk_app::GetBackingScaleFactor(fMainView); + CGFloat backingScaleFactor = skwindow::GetBackingScaleFactor(fMainView); fWidth = fMainView.bounds.size.width * backingScaleFactor; fHeight = fMainView.bounds.size.height * backingScaleFactor; glViewport(0, 0, fWidth, fHeight); @@ -160,8 +160,7 @@ } // anonymous namespace -namespace sk_app { -namespace window_context_factory { +namespace skwindow { std::unique_ptr MakeGLForMac(const MacWindowInfo& info, const DisplayParams& params) { @@ -172,5 +171,4 @@ return ctx; } -} // namespace window_context_factory -} // namespace sk_app +} // namespace skwindow diff --git a/tools/sk_app/mac/GraphiteDawnMetalWindowContext_mac.mm b/tools/window/mac/GraphiteDawnMetalWindowContext_mac.mm similarity index 87% rename from tools/sk_app/mac/GraphiteDawnMetalWindowContext_mac.mm rename to tools/window/mac/GraphiteDawnMetalWindowContext_mac.mm index fb3d535644dd..6acd78338fd1 100644 --- a/tools/sk_app/mac/GraphiteDawnMetalWindowContext_mac.mm +++ b/tools/window/mac/GraphiteDawnMetalWindowContext_mac.mm @@ -5,16 +5,16 @@ * found in the LICENSE file. */ -#include "tools/sk_app/GraphiteDawnWindowContext.h" -#include "tools/sk_app/mac/WindowContextFactory_mac.h" +#include "tools/window/GraphiteDawnWindowContext.h" +#include "tools/window/mac/WindowContextFactory_mac.h" #import #import #import -using sk_app::DisplayParams; -using sk_app::window_context_factory::MacWindowInfo; -using sk_app::GraphiteDawnWindowContext; +using skwindow::DisplayParams; +using skwindow::MacWindowInfo; +using skwindow::internal::GraphiteDawnWindowContext; namespace { @@ -40,7 +40,7 @@ : GraphiteDawnWindowContext(params, wgpu::TextureFormat::BGRA8Unorm) , fMainView(info.fMainView) { - CGFloat backingScaleFactor = sk_app::GetBackingScaleFactor(fMainView); + CGFloat backingScaleFactor = skwindow::GetBackingScaleFactor(fMainView); CGSize backingSize = fMainView.bounds.size; this->initializeContext(backingSize.width * backingScaleFactor, backingSize.height * backingScaleFactor); @@ -101,7 +101,7 @@ } bool GraphiteDawnMetalWindowContext_mac::resizeInternal() { - CGFloat backingScaleFactor = sk_app::GetBackingScaleFactor(fMainView); + CGFloat backingScaleFactor = skwindow::GetBackingScaleFactor(fMainView); CGSize backingSize = fMainView.bounds.size; backingSize.width *= backingScaleFactor; backingSize.height *= backingScaleFactor; @@ -118,11 +118,9 @@ return true; } - } // anonymous namespace -namespace sk_app { -namespace window_context_factory { +namespace skwindow { std::unique_ptr MakeGraphiteDawnMetalForMac(const MacWindowInfo& info, const DisplayParams& params) { @@ -133,5 +131,4 @@ return ctx; } -} // namespace window_context_factory -} // namespace sk_app +} // namespace skwindow diff --git a/tools/sk_app/mac/GraphiteMetalWindowContext_mac.mm b/tools/window/mac/GraphiteMetalWindowContext_mac.mm similarity index 86% rename from tools/sk_app/mac/GraphiteMetalWindowContext_mac.mm rename to tools/window/mac/GraphiteMetalWindowContext_mac.mm index 76581c44494e..74b460115cac 100644 --- a/tools/sk_app/mac/GraphiteMetalWindowContext_mac.mm +++ b/tools/window/mac/GraphiteMetalWindowContext_mac.mm @@ -5,15 +5,15 @@ * found in the LICENSE file. */ -#include "tools/sk_app/GraphiteMetalWindowContext.h" -#include "tools/sk_app/mac/WindowContextFactory_mac.h" +#include "tools/window/GraphiteMetalWindowContext.h" +#include "tools/window/mac/WindowContextFactory_mac.h" #import #import -using sk_app::DisplayParams; -using sk_app::window_context_factory::MacWindowInfo; -using sk_app::GraphiteMetalWindowContext; +using skwindow::DisplayParams; +using skwindow::MacWindowInfo; +using skwindow::internal::GraphiteMetalWindowContext; namespace { @@ -75,7 +75,7 @@ void GraphiteMetalWindowContext_mac::onDestroyContext() {} void GraphiteMetalWindowContext_mac::resize(int w, int h) { - CGFloat backingScaleFactor = sk_app::GetBackingScaleFactor(fMainView); + CGFloat backingScaleFactor = skwindow::GetBackingScaleFactor(fMainView); CGSize backingSize = fMainView.bounds.size; backingSize.width *= backingScaleFactor; backingSize.height *= backingScaleFactor; @@ -89,8 +89,7 @@ } // anonymous namespace -namespace sk_app { -namespace window_context_factory { +namespace skwindow { std::unique_ptr MakeGraphiteMetalForMac(const MacWindowInfo& info, const DisplayParams& params) { @@ -101,5 +100,4 @@ return ctx; } -} // namespace window_context_factory -} // namespace sk_app +} // namespace skwindow diff --git a/tools/sk_app/mac/MetalWindowContext_mac.mm b/tools/window/mac/MetalWindowContext_mac.mm similarity index 86% rename from tools/sk_app/mac/MetalWindowContext_mac.mm rename to tools/window/mac/MetalWindowContext_mac.mm index 952d81bd903e..400409ba2d27 100644 --- a/tools/sk_app/mac/MetalWindowContext_mac.mm +++ b/tools/window/mac/MetalWindowContext_mac.mm @@ -5,15 +5,15 @@ * found in the LICENSE file. */ -#include "tools/sk_app/MetalWindowContext.h" -#include "tools/sk_app/mac/WindowContextFactory_mac.h" +#include "tools/window/MetalWindowContext.h" +#include "tools/window/mac/WindowContextFactory_mac.h" #import #import -using sk_app::DisplayParams; -using sk_app::window_context_factory::MacWindowInfo; -using sk_app::MetalWindowContext; +using skwindow::DisplayParams; +using skwindow::MacWindowInfo; +using skwindow::internal::MetalWindowContext; namespace { @@ -74,7 +74,7 @@ void MetalWindowContext_mac::onDestroyContext() {} void MetalWindowContext_mac::resize(int w, int h) { - CGFloat backingScaleFactor = sk_app::GetBackingScaleFactor(fMainView); + CGFloat backingScaleFactor = skwindow::GetBackingScaleFactor(fMainView); CGSize backingSize = fMainView.bounds.size; backingSize.width *= backingScaleFactor; backingSize.height *= backingScaleFactor; @@ -88,8 +88,7 @@ } // anonymous namespace -namespace sk_app { -namespace window_context_factory { +namespace skwindow { std::unique_ptr MakeMetalForMac(const MacWindowInfo& info, const DisplayParams& params) { @@ -100,5 +99,4 @@ return ctx; } -} // namespace window_context_factory -} // namespace sk_app +} // namespace skwindow diff --git a/tools/sk_app/mac/RasterWindowContext_mac.mm b/tools/window/mac/RasterWindowContext_mac.mm similarity index 93% rename from tools/sk_app/mac/RasterWindowContext_mac.mm rename to tools/window/mac/RasterWindowContext_mac.mm index 9a1f447c2603..1b3f36309c0d 100644 --- a/tools/sk_app/mac/RasterWindowContext_mac.mm +++ b/tools/window/mac/RasterWindowContext_mac.mm @@ -9,17 +9,18 @@ #include "include/core/SkCanvas.h" #include "include/core/SkColorFilter.h" #include "include/gpu/gl/GrGLInterface.h" +#include "include/gpu/ganesh/SkSurfaceGanesh.h" #include "tools/ToolUtils.h" -#include "tools/sk_app/GLWindowContext.h" -#include "tools/sk_app/mac/WindowContextFactory_mac.h" +#include "tools/window/GLWindowContext.h" +#include "tools/window/mac/WindowContextFactory_mac.h" #include #include -using sk_app::DisplayParams; -using sk_app::window_context_factory::MacWindowInfo; -using sk_app::GLWindowContext; +using skwindow::DisplayParams; +using skwindow::MacWindowInfo; +using skwindow::internal::GLWindowContext; namespace { @@ -136,7 +137,7 @@ void onDestroyContext() override {} fSampleCount = sampleCount; fSampleCount = std::max(fSampleCount, 1); - CGFloat backingScaleFactor = sk_app::GetBackingScaleFactor(fMainView); + CGFloat backingScaleFactor = skwindow::GetBackingScaleFactor(fMainView); fWidth = fMainView.bounds.size.width * backingScaleFactor; fHeight = fMainView.bounds.size.height * backingScaleFactor; glViewport(0, 0, fWidth, fHeight); @@ -158,7 +159,7 @@ void onDestroyContext() override {} sk_sp gpuSurface = GLWindowContext::getBackbufferSurface(); SkCanvas* gpuCanvas = gpuSurface->getCanvas(); gpuCanvas->drawImage(snapshot, 0, 0); - gpuCanvas->flush(); + skgpu::ganesh::Flush(gpuSurface); [fGLContext flushBuffer]; } @@ -173,8 +174,7 @@ void onDestroyContext() override {} } // anonymous namespace -namespace sk_app { -namespace window_context_factory { +namespace skwindow { std::unique_ptr MakeRasterForMac(const MacWindowInfo& info, const DisplayParams& params) { @@ -185,5 +185,4 @@ void onDestroyContext() override {} return ctx; } -} // namespace window_context_factory -} // namespace sk_app +} // namespace skwindow diff --git a/tools/sk_app/mac/WindowContextFactory_mac.h b/tools/window/mac/WindowContextFactory_mac.h similarity index 90% rename from tools/sk_app/mac/WindowContextFactory_mac.h rename to tools/window/mac/WindowContextFactory_mac.h index 7ce5aac0bc6d..6f9c5b2b6dc0 100644 --- a/tools/sk_app/mac/WindowContextFactory_mac.h +++ b/tools/window/mac/WindowContextFactory_mac.h @@ -9,13 +9,13 @@ #ifndef WindowContextFactory_mac_DEFINED #define WindowContextFactory_mac_DEFINED -#include "tools/sk_app/WindowContext.h" +#include "tools/window/WindowContext.h" #include #include -namespace sk_app { +namespace skwindow { struct DisplayParams; @@ -29,8 +29,6 @@ static inline CGFloat GetBackingScaleFactor(NSView* view) { #endif } -namespace window_context_factory { - struct MacWindowInfo { NSView* fMainView; }; @@ -61,8 +59,6 @@ std::unique_ptr MakeGraphiteMetalForMac(const MacWindowInfo&, con #endif #endif -} // namespace window_context_factory - -} // namespace sk_app +} // namespace skwindow #endif diff --git a/tools/window/unix/BUILD.bazel b/tools/window/unix/BUILD.bazel new file mode 100644 index 000000000000..cef262e8a0ff --- /dev/null +++ b/tools/window/unix/BUILD.bazel @@ -0,0 +1,48 @@ +load("//bazel:skia_rules.bzl", "exports_files_legacy", "skia_cc_deps", "skia_filegroup") +load("//bazel:flags.bzl", "selects") + +licenses(["notice"]) + +exports_files_legacy() + +skia_filegroup( + name = "srcs", + testonly = True, + srcs = [ + "RasterWindowContext_unix.cpp", + "WindowContextFactory_unix.h", + ] + select({ + "//src/gpu:dawn_ganesh": ["DawnVulkanWindowContext_unix.cpp"], + "//src/gpu:gl_ganesh": ["GLWindowContext_unix.cpp"], + "//src/gpu:vulkan_ganesh": ["VulkanWindowContext_unix.cpp"], + "//conditions:default": [], + }), + visibility = ["//tools/window:__pkg__"], +) + +selects.config_setting_group( + name = "dawn_or_vulkan", + match_any = [ + "//src/gpu:dawn_ganesh", + "//src/gpu:vulkan_ganesh", + ], +) + +skia_cc_deps( + name = "deps", + testonly = True, + linkopts = [ + "-lX11", + "-lxcb", # dep of X11 + "-lXau", # dep of xcb + "-lXdmcp", # dep of xcb + ] + select({ + ":dawn_or_vulkan": ["-lX11-xcb"], + "//conditions:default": [], + }), + visibility = ["//tools/sk_app:__pkg__"], + deps = select({ + ":dawn_or_vulkan": ["//tools/gpu/vk:testutils"], + "//conditions:default": [], + }), +) diff --git a/tools/sk_app/unix/DawnVulkanWindowContext_unix.cpp b/tools/window/unix/DawnVulkanWindowContext_unix.cpp similarity index 86% rename from tools/sk_app/unix/DawnVulkanWindowContext_unix.cpp rename to tools/window/unix/DawnVulkanWindowContext_unix.cpp index 8ce1075b89d2..e4c059f81e1f 100644 --- a/tools/sk_app/unix/DawnVulkanWindowContext_unix.cpp +++ b/tools/window/unix/DawnVulkanWindowContext_unix.cpp @@ -5,15 +5,15 @@ * found in the LICENSE file. */ -#include "tools/sk_app/DawnWindowContext.h" -#include "tools/sk_app/unix/WindowContextFactory_unix.h" +#include "tools/window/DawnWindowContext.h" +#include "tools/window/unix/WindowContextFactory_unix.h" #include "dawn/native/DawnNative.h" -using sk_app::window_context_factory::XlibWindowInfo; -using sk_app::DisplayParams; -using sk_app::DawnWindowContext; +using skwindow::XlibWindowInfo; +using skwindow::DisplayParams; +using skwindow::internal::DawnWindowContext; -namespace sk_app { +namespace { class DawnVulkanWindowContext_xlib : public DawnWindowContext { public: @@ -54,7 +54,9 @@ wgpu::Device DawnVulkanWindowContext_xlib::onInitializeContext() { return this->createDevice(wgpu::BackendType::Vulkan); } -namespace window_context_factory { +} // anonymous namespace + +namespace skwindow { std::unique_ptr MakeDawnVulkanForXlib(const XlibWindowInfo& winInfo, const DisplayParams& params) { @@ -65,6 +67,4 @@ std::unique_ptr MakeDawnVulkanForXlib(const XlibWindowInfo& winIn return ctx; } -} - -} // namespace sk_app +} // namespace skwindow diff --git a/tools/sk_app/unix/GLWindowContext_unix.cpp b/tools/window/unix/GLWindowContext_unix.cpp similarity index 94% rename from tools/sk_app/unix/GLWindowContext_unix.cpp rename to tools/window/unix/GLWindowContext_unix.cpp index e749447d95b4..be7f0b8b9591 100644 --- a/tools/sk_app/unix/GLWindowContext_unix.cpp +++ b/tools/window/unix/GLWindowContext_unix.cpp @@ -7,14 +7,14 @@ */ #include "include/gpu/gl/GrGLInterface.h" -#include "tools/sk_app/GLWindowContext.h" -#include "tools/sk_app/unix/WindowContextFactory_unix.h" +#include "tools/window/GLWindowContext.h" +#include "tools/window/unix/WindowContextFactory_unix.h" #include -using sk_app::window_context_factory::XlibWindowInfo; -using sk_app::DisplayParams; -using sk_app::GLWindowContext; +using skwindow::XlibWindowInfo; +using skwindow::DisplayParams; +using skwindow::internal::GLWindowContext; namespace { @@ -174,9 +174,7 @@ void GLWindowContext_xlib::onSwapBuffers() { } // anonymous namespace -namespace sk_app { - -namespace window_context_factory { +namespace skwindow { std::unique_ptr MakeGLForXlib(const XlibWindowInfo& winInfo, const DisplayParams& params) { @@ -187,6 +185,4 @@ std::unique_ptr MakeGLForXlib(const XlibWindowInfo& winInfo, return ctx; } -} // namespace window_context_factory - -} // namespace sk_app +} // namespace skwindow diff --git a/tools/sk_app/unix/GraphiteDawnVulkanWindowContext_unix.cpp b/tools/window/unix/GraphiteDawnVulkanWindowContext_unix.cpp similarity index 87% rename from tools/sk_app/unix/GraphiteDawnVulkanWindowContext_unix.cpp rename to tools/window/unix/GraphiteDawnVulkanWindowContext_unix.cpp index 81f7e05c7690..6eef0da3fd96 100644 --- a/tools/sk_app/unix/GraphiteDawnVulkanWindowContext_unix.cpp +++ b/tools/window/unix/GraphiteDawnVulkanWindowContext_unix.cpp @@ -5,12 +5,12 @@ * found in the LICENSE file. */ -#include "tools/sk_app/GraphiteDawnWindowContext.h" -#include "tools/sk_app/unix/WindowContextFactory_unix.h" +#include "tools/window/GraphiteDawnWindowContext.h" +#include "tools/window/unix/WindowContextFactory_unix.h" -using sk_app::window_context_factory::XlibWindowInfo; -using sk_app::DisplayParams; -using sk_app::GraphiteDawnWindowContext; +using skwindow::XlibWindowInfo; +using skwindow::DisplayParams; +using skwindow::internal::GraphiteDawnWindowContext; namespace { @@ -84,8 +84,7 @@ void GraphiteDawnVulkanWindowContext_unix::resize(int w, int h) { } // anonymous namespace -namespace sk_app { -namespace window_context_factory { +namespace skwindow { std::unique_ptr MakeGraphiteDawnVulkanForXlib(const XlibWindowInfo& info, const DisplayParams& params) { @@ -96,5 +95,4 @@ std::unique_ptr MakeGraphiteDawnVulkanForXlib(const XlibWindowInf return ctx; } -} // namespace window_context_factory -} // namespace sk_app +} // namespace skwindow diff --git a/tools/window/unix/GraphiteVulkanWindowContext_unix.cpp b/tools/window/unix/GraphiteVulkanWindowContext_unix.cpp new file mode 100644 index 000000000000..a5d10e774552 --- /dev/null +++ b/tools/window/unix/GraphiteVulkanWindowContext_unix.cpp @@ -0,0 +1,81 @@ + +/* + * Copyright 2023 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "tools/gpu/vk/VkTestUtils.h" + +#include "tools/window/GraphiteVulkanWindowContext.h" +#include "tools/window/unix/WindowContextFactory_unix.h" + +#include + +namespace skwindow { + +std::unique_ptr MakeGraphiteVulkanForXlib(const XlibWindowInfo& info, + const DisplayParams& displayParams) { + PFN_vkGetInstanceProcAddr instProc; + if (!sk_gpu_test::LoadVkLibraryAndGetProcAddrFuncs(&instProc)) { + SkDebugf("Could not load vulkan library\n"); + return nullptr; + } + + auto createVkSurface = [&info, instProc](VkInstance instance) -> VkSurfaceKHR { + static PFN_vkCreateXcbSurfaceKHR createXcbSurfaceKHR = nullptr; + if (!createXcbSurfaceKHR) { + createXcbSurfaceKHR = + (PFN_vkCreateXcbSurfaceKHR) instProc(instance, "vkCreateXcbSurfaceKHR"); + } + + VkSurfaceKHR surface; + + VkXcbSurfaceCreateInfoKHR surfaceCreateInfo; + memset(&surfaceCreateInfo, 0, sizeof(VkXcbSurfaceCreateInfoKHR)); + surfaceCreateInfo.sType = VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR; + surfaceCreateInfo.pNext = nullptr; + surfaceCreateInfo.flags = 0; + surfaceCreateInfo.connection = XGetXCBConnection(info.fDisplay); + surfaceCreateInfo.window = info.fWindow; + + VkResult res = createXcbSurfaceKHR(instance, &surfaceCreateInfo, nullptr, &surface); + if (res != VK_SUCCESS) { + return VK_NULL_HANDLE; + } + + return surface; + }; + + auto canPresent = [&info, instProc](VkInstance instance, VkPhysicalDevice physDev, + uint32_t queueFamilyIndex) { + static PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR + getPhysicalDeviceXcbPresentationSupportKHR = nullptr; + if (!getPhysicalDeviceXcbPresentationSupportKHR) { + getPhysicalDeviceXcbPresentationSupportKHR = + (PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR) + instProc(instance, "vkGetPhysicalDeviceXcbPresentationSupportKHR"); + } + + Display* display = info.fDisplay; + VisualID visualID = XVisualIDFromVisual(DefaultVisual(info.fDisplay, + DefaultScreen(info.fDisplay))); + VkBool32 check = getPhysicalDeviceXcbPresentationSupportKHR(physDev, + queueFamilyIndex, + XGetXCBConnection(display), + visualID); + return (check != VK_FALSE); + }; + std::unique_ptr ctx( + new internal::GraphiteVulkanWindowContext(displayParams, + createVkSurface, + canPresent, + instProc)); + if (!ctx->isValid()) { + return nullptr; + } + return ctx; +} + +} // namespace skwindow diff --git a/tools/sk_app/unix/RasterWindowContext_unix.cpp b/tools/window/unix/RasterWindowContext_unix.cpp similarity index 91% rename from tools/sk_app/unix/RasterWindowContext_unix.cpp rename to tools/window/unix/RasterWindowContext_unix.cpp index 270234e4b9cd..9fa45d854d76 100644 --- a/tools/sk_app/unix/RasterWindowContext_unix.cpp +++ b/tools/window/unix/RasterWindowContext_unix.cpp @@ -6,11 +6,11 @@ */ #include "include/core/SkSurface.h" -#include "tools/sk_app/RasterWindowContext.h" -#include "tools/sk_app/unix/WindowContextFactory_unix.h" +#include "tools/window/RasterWindowContext.h" +#include "tools/window/unix/WindowContextFactory_unix.h" -using sk_app::RasterWindowContext; -using sk_app::DisplayParams; +using skwindow::DisplayParams; +using skwindow::internal::RasterWindowContext; namespace { @@ -85,8 +85,7 @@ void RasterWindowContext_xlib::onSwapBuffers() { } // anonymous namespace -namespace sk_app { -namespace window_context_factory { +namespace skwindow { std::unique_ptr MakeRasterForXlib(const XlibWindowInfo& info, const DisplayParams& params) { @@ -98,5 +97,4 @@ std::unique_ptr MakeRasterForXlib(const XlibWindowInfo& info, return ctx; } -} // namespace window_context_factory -} // namespace sk_app +} // namespace skwindow diff --git a/tools/sk_app/unix/VulkanWindowContext_unix.cpp b/tools/window/unix/VulkanWindowContext_unix.cpp similarity index 88% rename from tools/sk_app/unix/VulkanWindowContext_unix.cpp rename to tools/window/unix/VulkanWindowContext_unix.cpp index 33f320b20f1a..dfc9ac2502fe 100644 --- a/tools/sk_app/unix/VulkanWindowContext_unix.cpp +++ b/tools/window/unix/VulkanWindowContext_unix.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2016 Google Inc. * @@ -10,14 +9,12 @@ #include "tools/gpu/vk/VkTestUtils.h" -#include "tools/sk_app/VulkanWindowContext.h" -#include "tools/sk_app/unix/WindowContextFactory_unix.h" +#include "tools/window/VulkanWindowContext.h" +#include "tools/window/unix/WindowContextFactory_unix.h" #include -namespace sk_app { - -namespace window_context_factory { +namespace skwindow { std::unique_ptr MakeVulkanForXlib(const XlibWindowInfo& info, const DisplayParams& displayParams) { @@ -72,13 +69,14 @@ std::unique_ptr MakeVulkanForXlib(const XlibWindowInfo& info, return (VK_FALSE != check); }; std::unique_ptr ctx( - new VulkanWindowContext(displayParams, createVkSurface, canPresent, instProc)); + new internal::VulkanWindowContext(displayParams, + createVkSurface, + canPresent, + instProc)); if (!ctx->isValid()) { return nullptr; } return ctx; } -} // namespace window_context_factory - -} // namespace sk_app +} // namespace skwindow diff --git a/tools/sk_app/unix/WindowContextFactory_unix.h b/tools/window/unix/WindowContextFactory_unix.h similarity index 82% rename from tools/sk_app/unix/WindowContextFactory_unix.h rename to tools/window/unix/WindowContextFactory_unix.h index 1a340a28a406..19bc61d29f24 100644 --- a/tools/sk_app/unix/WindowContextFactory_unix.h +++ b/tools/window/unix/WindowContextFactory_unix.h @@ -20,13 +20,11 @@ typedef Window XWindow; -namespace sk_app { +namespace skwindow { class WindowContext; struct DisplayParams; -namespace window_context_factory { - struct XlibWindowInfo { Display* fDisplay; XWindow fWindow; @@ -36,9 +34,17 @@ struct XlibWindowInfo { int fHeight; }; +#ifdef SK_VULKAN std::unique_ptr MakeVulkanForXlib(const XlibWindowInfo&, const DisplayParams&); +#if defined(SK_GRAPHITE) +std::unique_ptr MakeGraphiteVulkanForXlib(const XlibWindowInfo&, + const DisplayParams&); +#endif +#endif +#ifdef SK_GL std::unique_ptr MakeGLForXlib(const XlibWindowInfo&, const DisplayParams&); +#endif #ifdef SK_DAWN std::unique_ptr MakeDawnVulkanForXlib(const XlibWindowInfo&, const DisplayParams&); @@ -51,8 +57,6 @@ std::unique_ptr MakeGraphiteDawnVulkanForXlib(const XlibWindowInf std::unique_ptr MakeRasterForXlib(const XlibWindowInfo&, const DisplayParams&); -} // namespace window_context_factory - -} // namespace sk_app +} // namespace skwindow #endif diff --git a/tools/sk_app/win/ANGLEWindowContext_win.cpp b/tools/window/win/ANGLEWindowContext_win.cpp similarity index 95% rename from tools/sk_app/win/ANGLEWindowContext_win.cpp rename to tools/window/win/ANGLEWindowContext_win.cpp index 849c90a6fc4c..7a6c5ed2f2e8 100644 --- a/tools/sk_app/win/ANGLEWindowContext_win.cpp +++ b/tools/window/win/ANGLEWindowContext_win.cpp @@ -12,11 +12,11 @@ #include #include "include/gpu/gl/GrGLAssembleInterface.h" #include "src/gpu/ganesh/gl/GrGLDefines.h" -#include "tools/sk_app/GLWindowContext.h" -#include "tools/sk_app/win/WindowContextFactory_win.h" +#include "tools/window/GLWindowContext.h" +#include "tools/window/win/WindowContextFactory_win.h" -using sk_app::GLWindowContext; -using sk_app::DisplayParams; +using skwindow::DisplayParams; +using skwindow::internal::GLWindowContext; namespace { @@ -162,8 +162,7 @@ void ANGLEGLWindowContext_win::onSwapBuffers() { } // anonymous namespace -namespace sk_app { -namespace window_context_factory { +namespace skwindow { std::unique_ptr MakeANGLEForWin(HWND wnd, const DisplayParams& params) { std::unique_ptr ctx(new ANGLEGLWindowContext_win(wnd, params)); @@ -173,5 +172,4 @@ std::unique_ptr MakeANGLEForWin(HWND wnd, const DisplayParams& pa return ctx; } -} // namespace window_context_factory -} // namespace sk_app +} // namespace skwindow diff --git a/tools/sk_app/win/D3D12WindowContext_win.cpp b/tools/window/win/D3D12WindowContext_win.cpp similarity index 97% rename from tools/sk_app/win/D3D12WindowContext_win.cpp rename to tools/window/win/D3D12WindowContext_win.cpp index 30face5ba567..32a7b33219b5 100644 --- a/tools/sk_app/win/D3D12WindowContext_win.cpp +++ b/tools/window/win/D3D12WindowContext_win.cpp @@ -11,8 +11,9 @@ #include "include/gpu/d3d/GrD3DBackendContext.h" #include "include/gpu/ganesh/SkSurfaceGanesh.h" #include "tools/gpu/d3d/D3DTestUtils.h" -#include "tools/sk_app/WindowContext.h" -#include "tools/sk_app/win/WindowContextFactory_win.h" +#include "tools/window/DisplayParams.h" +#include "tools/window/WindowContext.h" +#include "tools/window/win/WindowContextFactory_win.h" #include #include @@ -29,7 +30,10 @@ using namespace Microsoft::WRL; -namespace sk_app { +using skwindow::DisplayParams; +using skwindow::WindowContext; + +namespace { class D3D12WindowContext : public WindowContext { public: @@ -247,7 +251,9 @@ void D3D12WindowContext::setDisplayParams(const DisplayParams& params) { this->initializeContext(); } -namespace window_context_factory { +} // anonymous namespace + +namespace skwindow { std::unique_ptr MakeD3D12ForWin(HWND hwnd, const DisplayParams& params) { std::unique_ptr ctx(new D3D12WindowContext(hwnd, params)); @@ -257,6 +263,4 @@ std::unique_ptr MakeD3D12ForWin(HWND hwnd, const DisplayParams& p return ctx; } -} - -} //namespace sk_app +} // namespace skwindow diff --git a/tools/sk_app/win/DawnD3D12WindowContext_win.cpp b/tools/window/win/DawnD3D12WindowContext_win.cpp similarity index 85% rename from tools/sk_app/win/DawnD3D12WindowContext_win.cpp rename to tools/window/win/DawnD3D12WindowContext_win.cpp index 801b6ad20ec2..d19aca37adac 100644 --- a/tools/sk_app/win/DawnD3D12WindowContext_win.cpp +++ b/tools/window/win/DawnD3D12WindowContext_win.cpp @@ -5,12 +5,16 @@ * found in the LICENSE file. */ -#include "tools/sk_app/DawnWindowContext.h" -#include "tools/sk_app/win/WindowContextFactory_win.h" +#include "tools/window/DawnWindowContext.h" +#include "tools/window/DisplayParams.h" +#include "tools/window/win/WindowContextFactory_win.h" #include "webgpu/webgpu_cpp.h" #include "dawn/native/DawnNative.h" -namespace sk_app { +using skwindow::DisplayParams; +using skwindow::internal::DawnWindowContext; + +namespace { class DawnD3D12WindowContext : public DawnWindowContext { public: @@ -52,7 +56,9 @@ wgpu::Device DawnD3D12WindowContext::onInitializeContext() { void DawnD3D12WindowContext::onDestroyContext() { } -namespace window_context_factory { +} // anonymous namespace + +namespace skwindow { std::unique_ptr MakeDawnD3D12ForWin(HWND hwnd, const DisplayParams& params) { @@ -63,6 +69,4 @@ std::unique_ptr MakeDawnD3D12ForWin(HWND hwnd, return ctx; } -} - -} //namespace sk_app +} //namespace skwindow diff --git a/tools/sk_app/win/GLWindowContext_win.cpp b/tools/window/win/GLWindowContext_win.cpp similarity index 91% rename from tools/sk_app/win/GLWindowContext_win.cpp rename to tools/window/win/GLWindowContext_win.cpp index c509929d8f02..1b82070600dd 100644 --- a/tools/sk_app/win/GLWindowContext_win.cpp +++ b/tools/window/win/GLWindowContext_win.cpp @@ -8,24 +8,22 @@ #include "include/gpu/gl/GrGLInterface.h" #include "src/utils/win/SkWGL.h" -#include "tools/sk_app/GLWindowContext.h" -#include "tools/sk_app/win/WindowContextFactory_win.h" +#include "tools/window/GLWindowContext.h" +#include "tools/window/win/WindowContextFactory_win.h" #include #include -using sk_app::GLWindowContext; -using sk_app::DisplayParams; +using skwindow::DisplayParams; +using skwindow::internal::GLWindowContext; #if defined(_M_ARM64) -namespace sk_app { -namespace window_context_factory { +namespace skwindow { std::unique_ptr MakeGLForWin(HWND, const DisplayParams&) { return nullptr; } -} // namespace window_context_factory -} // namespace sk_app +} // namespace skwindow #else @@ -141,8 +139,7 @@ void GLWindowContext_win::onSwapBuffers() { } // anonymous namespace -namespace sk_app { -namespace window_context_factory { +namespace skwindow { std::unique_ptr MakeGLForWin(HWND wnd, const DisplayParams& params) { std::unique_ptr ctx(new GLWindowContext_win(wnd, params)); @@ -152,7 +149,6 @@ std::unique_ptr MakeGLForWin(HWND wnd, const DisplayParams& param return ctx; } -} // namespace window_context_factory -} // namespace sk_app +} // namespace skwindow #endif diff --git a/tools/sk_app/win/GraphiteDawnD3D12WindowContext_win.cpp b/tools/window/win/GraphiteDawnD3D12WindowContext_win.cpp similarity index 88% rename from tools/sk_app/win/GraphiteDawnD3D12WindowContext_win.cpp rename to tools/window/win/GraphiteDawnD3D12WindowContext_win.cpp index fac7636944d6..1af09aa6ea33 100644 --- a/tools/sk_app/win/GraphiteDawnD3D12WindowContext_win.cpp +++ b/tools/window/win/GraphiteDawnD3D12WindowContext_win.cpp @@ -5,11 +5,11 @@ * found in the LICENSE file. */ -#include "tools/sk_app/GraphiteDawnWindowContext.h" -#include "tools/sk_app/win/WindowContextFactory_win.h" +#include "tools/window/GraphiteDawnWindowContext.h" +#include "tools/window/win/WindowContextFactory_win.h" -using sk_app::DisplayParams; -using sk_app::GraphiteDawnWindowContext; +using skwindow::DisplayParams; +using skwindow::internal::GraphiteDawnWindowContext; namespace { @@ -75,8 +75,7 @@ void GraphiteDawnD3D12WindowContext_win::resize(int w, int h) { } // anonymous namespace -namespace sk_app { -namespace window_context_factory { +namespace skwindow { std::unique_ptr MakeGraphiteDawnD3D12ForWin(HWND hwnd, const DisplayParams& params) { std::unique_ptr ctx(new GraphiteDawnD3D12WindowContext_win(hwnd, params)); @@ -86,5 +85,4 @@ std::unique_ptr MakeGraphiteDawnD3D12ForWin(HWND hwnd, const Disp return ctx; } -} // namespace window_context_factory -} // namespace sk_app +} // namespace skwindow diff --git a/tools/window/win/GraphiteVulkanWindowContext_win.cpp b/tools/window/win/GraphiteVulkanWindowContext_win.cpp new file mode 100644 index 000000000000..6b823885d0c6 --- /dev/null +++ b/tools/window/win/GraphiteVulkanWindowContext_win.cpp @@ -0,0 +1,73 @@ +/* + * Copyright 2023 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "tools/window/win/WindowContextFactory_win.h" + +#include "tools/sk_app/win/Window_win.h" +#include "tools/window/GraphiteVulkanWindowContext.h" + +#include "tools/gpu/vk/VkTestUtils.h" + +#include + +namespace skwindow { + +std::unique_ptr MakeGraphiteVulkanForWin(HWND hwnd, const DisplayParams& params) { + PFN_vkGetInstanceProcAddr instProc; + if (!sk_gpu_test::LoadVkLibraryAndGetProcAddrFuncs(&instProc)) { + return nullptr; + } + + auto createVkSurface = [hwnd, instProc] (VkInstance instance) -> VkSurfaceKHR { + static PFN_vkCreateWin32SurfaceKHR createWin32SurfaceKHR = nullptr; + if (!createWin32SurfaceKHR) { + createWin32SurfaceKHR = (PFN_vkCreateWin32SurfaceKHR) + instProc(instance, "vkCreateWin32SurfaceKHR"); + } + HINSTANCE hinstance = GetModuleHandle(0); + VkSurfaceKHR surface; + + VkWin32SurfaceCreateInfoKHR surfaceCreateInfo; + memset(&surfaceCreateInfo, 0, sizeof(VkWin32SurfaceCreateInfoKHR)); + surfaceCreateInfo.sType = VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR; + surfaceCreateInfo.pNext = nullptr; + surfaceCreateInfo.flags = 0; + surfaceCreateInfo.hinstance = hinstance; + surfaceCreateInfo.hwnd = hwnd; + + VkResult res = createWin32SurfaceKHR(instance, &surfaceCreateInfo, nullptr, &surface); + if (VK_SUCCESS != res) { + return VK_NULL_HANDLE; + } + + return surface; + }; + + auto canPresent = [instProc] (VkInstance instance, VkPhysicalDevice physDev, + uint32_t queueFamilyIndex) { + static PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR + getPhysicalDeviceWin32PresentationSupportKHR = nullptr; + if (!getPhysicalDeviceWin32PresentationSupportKHR) { + getPhysicalDeviceWin32PresentationSupportKHR = + (PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR) + instProc(instance, "vkGetPhysicalDeviceWin32PresentationSupportKHR"); + } + + VkBool32 check = getPhysicalDeviceWin32PresentationSupportKHR(physDev, queueFamilyIndex); + return (VK_FALSE != check); + }; + + std::unique_ptr ctx( + new internal::GraphiteVulkanWindowContext(params, createVkSurface, + canPresent, instProc)); + if (!ctx->isValid()) { + return nullptr; + } + return ctx; +} + +} // namespace skwindow diff --git a/tools/sk_app/win/RasterWindowContext_win.cpp b/tools/window/win/RasterWindowContext_win.cpp similarity index 91% rename from tools/sk_app/win/RasterWindowContext_win.cpp rename to tools/window/win/RasterWindowContext_win.cpp index e93a8e692c31..a072cab81fa4 100644 --- a/tools/sk_app/win/RasterWindowContext_win.cpp +++ b/tools/window/win/RasterWindowContext_win.cpp @@ -7,13 +7,13 @@ #include "include/core/SkSurface.h" #include "src/base/SkAutoMalloc.h" -#include "tools/sk_app/RasterWindowContext.h" -#include "tools/sk_app/win/WindowContextFactory_win.h" +#include "tools/window/RasterWindowContext.h" +#include "tools/window/win/WindowContextFactory_win.h" #include -using sk_app::RasterWindowContext; -using sk_app::DisplayParams; +using skwindow::DisplayParams; +using skwindow::internal::RasterWindowContext; namespace { @@ -82,8 +82,7 @@ void RasterWindowContext_win::onSwapBuffers() { } // anonymous namespace -namespace sk_app { -namespace window_context_factory { +namespace skwindow { std::unique_ptr MakeRasterForWin(HWND wnd, const DisplayParams& params) { std::unique_ptr ctx(new RasterWindowContext_win(wnd, params)); @@ -93,5 +92,4 @@ std::unique_ptr MakeRasterForWin(HWND wnd, const DisplayParams& p return ctx; } -} // namespace window_context_factory -} // namespace sk_app +} // namespace skwindow diff --git a/tools/sk_app/win/VulkanWindowContext_win.cpp b/tools/window/win/VulkanWindowContext_win.cpp similarity index 88% rename from tools/sk_app/win/VulkanWindowContext_win.cpp rename to tools/window/win/VulkanWindowContext_win.cpp index 8526ad4c3e1a..32a3abaa4a52 100644 --- a/tools/sk_app/win/VulkanWindowContext_win.cpp +++ b/tools/window/win/VulkanWindowContext_win.cpp @@ -6,10 +6,10 @@ * found in the LICENSE file. */ -#include "tools/sk_app/win/WindowContextFactory_win.h" +#include "tools/window/win/WindowContextFactory_win.h" -#include "tools/sk_app/VulkanWindowContext.h" #include "tools/sk_app/win/Window_win.h" +#include "tools/window/VulkanWindowContext.h" #include "src/gpu/ganesh/vk/GrVkUtil.h" @@ -17,8 +17,7 @@ #include -namespace sk_app { -namespace window_context_factory { +namespace skwindow { std::unique_ptr MakeVulkanForWin(HWND hwnd, const DisplayParams& params) { PFN_vkGetInstanceProcAddr instProc; @@ -66,12 +65,11 @@ std::unique_ptr MakeVulkanForWin(HWND hwnd, const DisplayParams& }; std::unique_ptr ctx( - new VulkanWindowContext(params, createVkSurface, canPresent, instProc)); + new internal::VulkanWindowContext(params, createVkSurface, canPresent, instProc)); if (!ctx->isValid()) { return nullptr; } return ctx; } -} // namespace window_context_factory -} // namespace sk_app +} // namespace skwindow diff --git a/tools/sk_app/win/WindowContextFactory_win.h b/tools/window/win/WindowContextFactory_win.h similarity index 80% rename from tools/sk_app/win/WindowContextFactory_win.h rename to tools/window/win/WindowContextFactory_win.h index 591b425b84a8..6731abf7e03a 100644 --- a/tools/sk_app/win/WindowContextFactory_win.h +++ b/tools/window/win/WindowContextFactory_win.h @@ -13,18 +13,25 @@ #include -namespace sk_app { +namespace skwindow { class WindowContext; struct DisplayParams; -namespace window_context_factory { - +#ifdef SK_VULKAN std::unique_ptr MakeVulkanForWin(HWND, const DisplayParams&); +#if defined(SK_GRAPHITE) +std::unique_ptr MakeGraphiteVulkanForWin(HWND, const DisplayParams&); +#endif +#endif +#ifdef SK_GL std::unique_ptr MakeGLForWin(HWND, const DisplayParams&); +#endif +#ifdef SK_ANGLE std::unique_ptr MakeANGLEForWin(HWND, const DisplayParams&); +#endif #ifdef SK_DIRECT3D std::unique_ptr MakeD3D12ForWin(HWND, const DisplayParams&); @@ -39,8 +46,6 @@ std::unique_ptr MakeGraphiteDawnD3D12ForWin(HWND, const DisplayPa std::unique_ptr MakeRasterForWin(HWND, const DisplayParams&); -} // namespace window_context_factory - -} // namespace sk_app +} // namespace skwindow #endif